From 9b37750d64cc9e6013aface4fa375fe2658c1b88 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 11 Nov 2024 18:27:15 +1300 Subject: [PATCH 01/22] genbindings: support protected methods --- cmd/genbindings/clang2il.go | 43 ++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index b38b98d6..aa5d0e47 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -185,6 +185,14 @@ func processTypedef(node map[string]interface{}, addNamePrefix string) (CppTyped return CppTypedef{}, errors.New("processTypedef: ???") } +type visibilityState int + +const ( + VsPublic visibilityState = 1 + VsProtected = 2 + VsPrivate = 3 +) + // processClassType parses a single C++ class definition into our intermediate format. func processClassType(node map[string]interface{}, addNamePrefix string) (CppClass, error) { var ret CppClass @@ -229,10 +237,10 @@ func processClassType(node map[string]interface{}, addNamePrefix string) (CppCla } } - // Check if this was 'struct' (default visible) or 'class' (default invisible) - visibility := true + // Check if this was 'struct' (default public) or 'class' (default private) + visibility := VsPublic if tagUsed, ok := node["tagUsed"].(string); ok && tagUsed == "class" { - visibility = false + visibility = VsPrivate } // Check if this is an abstract class @@ -289,9 +297,11 @@ nextMethod: switch access { case "public": - visibility = true - case "private", "protected": - visibility = false + visibility = VsPublic + case "protected": + visibility = VsProtected + case "private": + visibility = VsPrivate default: panic("unexpected access visibility '" + access + "'") } @@ -315,7 +325,7 @@ nextMethod: // Child class type definition e.g. QAbstractEventDispatcher::TimerInfo // Parse as a whole child class - if !visibility { + if visibility != VsPublic { continue // Skip private/protected } @@ -341,7 +351,7 @@ nextMethod: case "EnumDecl": // Child class enum - if !visibility { + if visibility != VsPublic { continue // Skip private/protected } @@ -359,7 +369,7 @@ nextMethod: // This is an implicit ctor. Therefore the class is constructable // even if we're currently in a `private:` block. - } else if !visibility { + } else if visibility != VsPublic { continue // Skip private/protected } @@ -403,7 +413,8 @@ nextMethod: continue } - if !visibility { + if visibility != VsPublic { + // TODO Is there any use case for allowing MIQT to overload a virtual destructor? ret.CanDelete = false continue } @@ -415,8 +426,12 @@ nextMethod: } case "CXXMethodDecl": - if !visibility { - continue // Skip private/protected + + // If this is a virtual method, we want to allow overriding it even + // if it is protected + // But we can only call it if it is public + if visibility == VsPrivate { + continue // Skip private, ALLOW protected } // Check if this is `= delete` @@ -648,6 +663,10 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { mm.IsStatic = true } + if virtual, ok := node["virtual"].(bool); ok && virtual { + mm.IsVirtual = true + } + if methodInner, ok := node["inner"].([]interface{}); ok { paramCounter := 0 for _, methodObj := range methodInner { From aa2fdf98ca9f8a8a944d7a5bf8d009b8e431927d Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 11 Nov 2024 18:27:28 +1300 Subject: [PATCH 02/22] genbindings: subclass support for all virtual methods (1/3) --- cmd/genbindings/clang2il.go | 8 +++ cmd/genbindings/config-allowlist.go | 4 ++ cmd/genbindings/emitcabi.go | 91 +++++++++++++++++++++++------ cmd/genbindings/intermediate.go | 52 +++++++++++++++++ 4 files changed, 138 insertions(+), 17 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index aa5d0e47..628ca375 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -460,6 +460,14 @@ nextMethod: } mm.IsSignal = isSignal && !mm.IsStatic && AllowSignal(mm) + mm.IsProtected = (visibility == VsProtected) + + if mm.IsProtected && !mm.IsVirtual { + // Protected method, so we can't call it + // Non-virtual, so we can't override it + // There is nothing we can do with this function + continue nextMethod + } // Once all processing is complete, pass to exceptions for final decision diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 3ae2dda8..b874768b 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -186,6 +186,10 @@ func AllowSignal(mm CppMethod) bool { } } +func AllowVirtual(mm CppMethod) bool { + return true // AllowSignal(mm) +} + func AllowMethod(className string, mm CppMethod) error { for _, p := range mm.Parameters { diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 7bbbfc32..d5726253 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -674,23 +674,27 @@ extern "C" { for _, c := range src.Classes { - cClassName := cabiClassName(c.ClassName) + methodPrefixName := cabiClassName(c.ClassName) for i, ctor := range c.Ctors { - ret.WriteString(fmt.Sprintf("%s %s_new%s(%s);\n", cClassName+"*", cClassName, maybeSuffix(i), emitParametersCabi(ctor, ""))) + ret.WriteString(fmt.Sprintf("%s %s_new%s(%s);\n", methodPrefixName+"*", methodPrefixName, maybeSuffix(i), emitParametersCabi(ctor, ""))) } for _, m := range c.Methods { - ret.WriteString(fmt.Sprintf("%s %s_%s(%s);\n", m.ReturnType.RenderTypeCabi(), cClassName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+cClassName+"*"))) + ret.WriteString(fmt.Sprintf("%s %s_%s(%s);\n", m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*"))) if m.IsSignal { - ret.WriteString(fmt.Sprintf("%s %s_connect_%s(%s* self, intptr_t slot);\n", m.ReturnType.RenderTypeCabi(), cClassName, m.SafeMethodName(), cClassName)) + ret.WriteString(fmt.Sprintf("%s %s_connect_%s(%s* self, intptr_t slot);\n", m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), methodPrefixName)) } } + for _, m := range c.VirtualMethods() { + ret.WriteString(fmt.Sprintf("void %s_override_virtual_%s(%s* self, intptr_t slot);\n", methodPrefixName, m.SafeMethodName(), methodPrefixName)) + } + // delete if c.CanDelete { - ret.WriteString(fmt.Sprintf("void %s_Delete(%s* self);\n", cClassName, cClassName)) + ret.WriteString(fmt.Sprintf("void %s_Delete(%s* self);\n", methodPrefixName, methodPrefixName)) } ret.WriteString("\n") @@ -736,7 +740,49 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { for _, c := range src.Classes { - cClassName := cabiClassName(c.ClassName) + methodPrefixName := cabiClassName(c.ClassName) + cppClassName := c.ClassName + virtualMethods := c.VirtualMethods() + + if len(virtualMethods) > 0 { + ret.WriteString("class MiqtVirtual" + cppClassName + " : public virtual " + cppClassName + " {\n" + + "public:\n" + + "\tusing " + cppClassName + "::" + cppClassName + ";\n" + // inherit constructors + "\n", + ) + for _, m := range virtualMethods { + + maybeReturn := ifv(m.ReturnType.RenderTypeQtCpp() == "void", "", "return ") + + ret.WriteString( + "\tintptr_t handle__" + m.SafeMethodName() + " = 0;\n" + + + "\n" + + + "\t" + m.ReturnType.RenderTypeQtCpp() + " " + m.MethodName + "(...) override {\n" + + "\t\tif (handle__" + m.SafeMethodName() + " == 0) {\n" + + "\t\t\t" + maybeReturn + methodPrefixName + "::" + m.MethodName + "(...);\n" + + "\t\t} else {\n" + + "\t\t\t" + maybeReturn + "miqt_exec_callback_" + methodPrefixName + "_" + m.SafeMethodName() + "(...);\n" + + "\t\t}\n" + + "\t}\n" + + + "\n" + + + "\t" + m.ReturnType.RenderTypeQtCpp() + " virtualbase_" + m.SafeMethodName() + "(...) {\n" + + "\t\t" + maybeReturn + methodPrefixName + "::" + m.MethodName + "(...);\n" + + "\t}\n" + + + "\n", + ) + } + + ret.WriteString( + "};\n" + + "\n") + + cppClassName = "MiqtVirtual" + cppClassName + } for i, ctor := range c.Ctors { @@ -754,9 +800,9 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { "#endif\n"+ "}\n"+ "\n", - cClassName, cClassName, maybeSuffix(i), emitParametersCabi(ctor, ""), + methodPrefixName, methodPrefixName, maybeSuffix(i), emitParametersCabi(ctor, ""), preamble, - c.ClassName, forwarding, + cppClassName, forwarding, )) } else { @@ -766,9 +812,9 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { "\treturn new %s(%s);\n"+ "}\n"+ "\n", - cClassName, cClassName, maybeSuffix(i), emitParametersCabi(ctor, ""), + methodPrefixName, methodPrefixName, maybeSuffix(i), emitParametersCabi(ctor, ""), preamble, - c.ClassName, forwarding, + cppClassName, forwarding, )) } @@ -800,7 +846,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { "#endif\n"+ "}\n"+ "\n", - m.ReturnType.RenderTypeCabi(), cClassName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+cClassName+"*"), + m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*"), preamble, emitAssignCppToCabi("\treturn ", m.ReturnType, callTarget), m.ReturnType.RenderTypeCabi(), @@ -808,10 +854,10 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { } else if m.BecomesNonConstInVersion != nil { - nonConstCallTarget := "const_cast<" + cClassName + "*>(self)->" + m.CppCallTarget() + "(" + forwarding + ")" + nonConstCallTarget := "const_cast<" + methodPrefixName + "*>(self)->" + m.CppCallTarget() + "(" + forwarding + ")" ret.WriteString("" + - m.ReturnType.RenderTypeCabi() + " " + cClassName + "_" + m.SafeMethodName() + "(" + emitParametersCabi(m, ifv(m.IsConst, "const ", "")+cClassName+"*") + ") {\n" + + m.ReturnType.RenderTypeCabi() + " " + methodPrefixName + "_" + m.SafeMethodName() + "(" + emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*") + ") {\n" + preamble + "\n" + "// This method was changed from const to non-const in Qt " + *m.BecomesNonConstInVersion + "\n" + "#if QT_VERSION < QT_VERSION_CHECK(" + strings.Replace(*m.BecomesNonConstInVersion, `.`, `,`, -1) + ",0)\n" + @@ -831,7 +877,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { "%s"+ "}\n"+ "\n", - m.ReturnType.RenderTypeCabi(), cClassName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+cClassName+"*"), + m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*"), preamble, emitAssignCppToCabi("\treturn ", m.ReturnType, callTarget), )) @@ -860,8 +906,8 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { signalCode += "\t\t" + bindingFunc + "(" + strings.Join(paramArgs, `, `) + ");\n" ret.WriteString( - `void ` + cClassName + `_connect_` + m.SafeMethodName() + `(` + cClassName + `* self, intptr_t slot) {` + "\n" + - "\t" + c.ClassName + `::connect(self, ` + exactSignal + `, self, [=](` + emitParametersCpp(m) + `) {` + "\n" + + `void ` + methodPrefixName + `_connect_` + m.SafeMethodName() + `(` + methodPrefixName + `* self, intptr_t slot) {` + "\n" + + "\t" + cppClassName + `::connect(self, ` + exactSignal + `, self, [=](` + emitParametersCpp(m) + `) {` + "\n" + signalCode + "\t});\n" + "}\n" + @@ -871,6 +917,17 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { } + // Virtual override helpers + for _, m := range virtualMethods { + ret.WriteString( + `void ` + methodPrefixName + `_override_virtual_` + m.SafeMethodName() + `(` + methodPrefixName + `* self, intptr_t slot) {` + "\n" + + "\tstatic_cast<" + cppClassName + ">(self)->handle__" + m.SafeMethodName() + " = slot;\n" + + "}\n" + + "\n", + ) + + } + // Delete if c.CanDelete { ret.WriteString(fmt.Sprintf( @@ -878,7 +935,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { "\tdelete self;\n"+ "}\n"+ "\n", - cClassName, cClassName, + methodPrefixName, methodPrefixName, )) } } diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index b9d7b5c9..8dd6a600 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -238,6 +238,8 @@ type CppMethod struct { IsStatic bool IsSignal bool IsConst bool + IsVirtual bool + IsProtected bool // If true, we can't call this method but we may still be able to overload it HiddenParams []CppParameter // Populated if there is an overload with more parameters // Special quirks @@ -382,6 +384,56 @@ type CppClass struct { ChildEnums []CppEnum } +// Virtual checks if the class has any virtual methods. This requires global +// state knowledge as virtual methods might have been inherited. +// C++ constructors cannot be virtual. +func (c *CppClass) VirtualMethods() []CppMethod { + var ret []CppMethod + var retNames = make(map[string]struct{}, 0) // if name is present, a child class found it first + + for _, m := range c.Methods { + if !m.IsVirtual { + continue + } + if m.IsSignal { + continue + } + if !AllowVirtual(m) { + continue + } + + ret = append(ret, m) + retNames[m.MethodName] = struct{}{} + } + + for _, inh := range c.Inherits { + cinfo, ok := KnownClassnames[inh] + if !ok { + panic("Class " + c.ClassName + " inherits from unknown class " + inh) + } + + for _, m := range cinfo.Class.Methods { + if !m.IsVirtual { + continue + } + if m.IsSignal { + continue + } + if !AllowVirtual(m) { + continue + } + if _, ok := retNames[m.MethodName]; ok { + continue // Already found in a child class + } + + ret = append(ret, m) + retNames[m.MethodName] = struct{}{} + } + } + + return ret +} + type CppTypedef struct { Alias string UnderlyingType CppParameter From d25301c910eb98f9bb662c8a745ca7b239aa158f Mon Sep 17 00:00:00 2001 From: mappu Date: Fri, 15 Nov 2024 14:27:44 +1300 Subject: [PATCH 03/22] genbindings: track private methods, exclude from virtual overrides --- cmd/genbindings/clang2il.go | 17 +++++++++-------- cmd/genbindings/intermediate.go | 24 ++++++++++++++++++++++++ cmd/genbindings/util.go | 8 ++++++++ 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 628ca375..2eb65395 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -351,8 +351,8 @@ nextMethod: case "EnumDecl": // Child class enum - if visibility != VsPublic { - continue // Skip private/protected + if visibility == VsPrivate { + continue // Skip private, ALLOW protected } en, err := processEnum(node, nodename+"::") @@ -427,10 +427,17 @@ nextMethod: case "CXXMethodDecl": + // Method + methodName, ok := node["name"].(string) + if !ok { + return CppClass{}, errors.New("method has no name") + } + // If this is a virtual method, we want to allow overriding it even // if it is protected // But we can only call it if it is public if visibility == VsPrivate { + ret.PrivateMethods = append(ret.PrivateMethods, methodName) continue // Skip private, ALLOW protected } @@ -439,12 +446,6 @@ nextMethod: continue } - // Method - methodName, ok := node["name"].(string) - if !ok { - return CppClass{}, errors.New("method has no name") - } - var mm CppMethod mm.MethodName = methodName diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 8dd6a600..b1313449 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -382,6 +382,7 @@ type CppClass struct { ChildTypedefs []CppTypedef ChildClassdefs []CppClass ChildEnums []CppEnum + PrivateMethods []string } // Virtual checks if the class has any virtual methods. This requires global @@ -390,6 +391,7 @@ type CppClass struct { func (c *CppClass) VirtualMethods() []CppMethod { var ret []CppMethod var retNames = make(map[string]struct{}, 0) // if name is present, a child class found it first + var block = slice_to_set(c.PrivateMethods) for _, m := range c.Methods { if !m.IsVirtual { @@ -426,9 +428,31 @@ func (c *CppClass) VirtualMethods() []CppMethod { continue // Already found in a child class } + // It's possible that a child class marked a parent method as private + // (e.g. Qt 5 QAbstractTableModel marks parent() as private) + // But then we find the protected version further down + // Use a blocklist to prevent exposing any deeper methods in the call chain + if _, ok := block[m.MethodName]; ok { + continue // Marked as private in a child class + } + + // The class info we loaded has not had all typedefs applied to it + // m is copied by value. Mutate it + applyTypedefs_Method(&m) + // Same with astTransformBlocklist + if !blocklist_MethodAllowed(&m) { + continue + } + ret = append(ret, m) retNames[m.MethodName] = struct{}{} } + + // Append this parent's private-virtuals to blocklist so that we + // do not consider them for grandparent classes + for _, privMethod := range c.PrivateMethods { + block[privMethod] = struct{}{} + } } return ret diff --git a/cmd/genbindings/util.go b/cmd/genbindings/util.go index db4e075b..5beb03d6 100644 --- a/cmd/genbindings/util.go +++ b/cmd/genbindings/util.go @@ -38,3 +38,11 @@ func ifv[T any](condition bool, trueval T, falseval T) T { func addr[T any](s T) *T { return &s } + +func slice_to_set[T comparable](list []T) map[T]struct{} { + ret := make(map[T]struct{}, len(list)) + for _, v := range list { + ret[v] = struct{}{} + } + return ret +} \ No newline at end of file From 2ae1e6090c8dd85c38941b007027636529a4cec2 Mon Sep 17 00:00:00 2001 From: mappu Date: Fri, 15 Nov 2024 15:31:07 +1300 Subject: [PATCH 04/22] genbindings/clang2il: detect pure virtual, detect overrides --- cmd/genbindings/clang2il.go | 10 ++++++++++ cmd/genbindings/intermediate.go | 1 + 2 files changed, 11 insertions(+) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 2eb65395..9ad21f94 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -676,6 +676,10 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { mm.IsVirtual = true } + if pure, ok := node["pure"].(bool); ok && pure { + mm.IsPureVirtual = true + } + if methodInner, ok := node["inner"].([]interface{}); ok { paramCounter := 0 for _, methodObj := range methodInner { @@ -718,6 +722,12 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { // Next paramCounter++ + case "OverrideAttr": + // void keyPressEvent(QKeyEvent *e) override; + // This is a virtual method being overridden and is a replacement + // for actually using the 'virtual' keyword + mm.IsVirtual = true + default: // Something else inside a declaration?? log.Printf("==> NOT IMPLEMENTED CXXMethodDecl->%q\n", methodObj["kind"]) diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index b1313449..966a531a 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -239,6 +239,7 @@ type CppMethod struct { IsSignal bool IsConst bool IsVirtual bool + IsPureVirtual bool // Virtual method was declared with = 0 i.e. there is no base method here to call IsProtected bool // If true, we can't call this method but we may still be able to overload it HiddenParams []CppParameter // Populated if there is an overload with more parameters From 58f212303e75ff1c63769b1bc77b608981f6882f Mon Sep 17 00:00:00 2001 From: mappu Date: Fri, 15 Nov 2024 15:37:51 +1300 Subject: [PATCH 05/22] genbindings: subclass support for all virtual methods (2/3) --- cmd/genbindings/config-allowlist.go | 3 + cmd/genbindings/emitcabi.go | 215 ++++++++++++++++++++++++--- cmd/genbindings/emitgo.go | 64 +++++++- cmd/genbindings/intermediate.go | 6 +- cmd/genbindings/transformoptional.go | 5 + 5 files changed, 267 insertions(+), 26 deletions(-) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index b874768b..8a5a5cd0 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -440,6 +440,9 @@ func AllowType(p CppParameter, isReturnType bool) error { "QAbstractAudioBuffer", // Qt 5 Multimedia, this is a private/internal type only "QAbstractVideoBuffer", // Works in Qt 5, but in Qt 6 Multimedia this type is used in qvideoframe.h but is not defined anywhere (it was later added in Qt 6.8) "QRhi", // Qt 6 unstable types, used in Multimedia + "QPostEventList", // Qt QCoreApplication: private headers required + "QMetaCallEvent", // .. + "QPostEvent", // .. "____last____": return ErrTooComplex } diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index d5726253..392c8142 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -140,6 +140,15 @@ func emitParametersCpp(m CppMethod) string { return strings.Join(tmp, `, `) } +func emitParameterNames(m CppMethod) string { + tmp := make([]string, 0, len(m.Parameters)) + for _, p := range m.Parameters { + tmp = append(tmp, p.ParameterName) + } + + return strings.Join(tmp, `, `) +} + func emitParameterTypesCpp(m CppMethod, includeHidden bool) string { tmp := make([]string, 0, len(m.Parameters)) for _, p := range m.Parameters { @@ -522,6 +531,20 @@ func emitAssignCppToCabi(assignExpression string, p CppParameter, rvalue string) } +func getCppZeroValue(p CppParameter) string { + if p.Pointer { + return "nullptr" + } else if p.IsKnownEnum() { + return "(" + p.RenderTypeQtCpp() + ")(0)" + } else if p.IntType() { + return "0" + } else if p.ParameterType == "bool" { + return "false" + } else { + return p.RenderTypeQtCpp() + "()" + } +} + // getReferencedTypes finds all referenced Qt types in this file. func getReferencedTypes(src *CppParsedHeader) []string { @@ -563,6 +586,12 @@ func getReferencedTypes(src *CppParsedHeader) []string { } maybeAddType(m.ReturnType) } + for _, vm := range c.VirtualMethods() { + for _, p := range vm.Parameters { + maybeAddType(p) + } + maybeAddType(vm.ReturnType) + } } // Some types (e.g. QRgb) are found but are typedefs, not classes @@ -690,6 +719,8 @@ extern "C" { for _, m := range c.VirtualMethods() { ret.WriteString(fmt.Sprintf("void %s_override_virtual_%s(%s* self, intptr_t slot);\n", methodPrefixName, m.SafeMethodName(), methodPrefixName)) + + ret.WriteString(fmt.Sprintf("%s %s_virtualbase_%s(%s);\n", m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*"))) } // delete @@ -710,6 +741,11 @@ extern "C" { return ret.String(), nil } +func fullyQualifiedConstructor(className string) string { + parts := strings.Split(className, `::`) + return className + "::" + parts[len(parts)-1] +} + func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret := strings.Builder{} @@ -745,47 +781,141 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { virtualMethods := c.VirtualMethods() if len(virtualMethods) > 0 { - ret.WriteString("class MiqtVirtual" + cppClassName + " : public virtual " + cppClassName + " {\n" + + + overriddenClassName := "MiqtVirtual" + strings.Replace(cppClassName, `::`, ``, -1) + + ret.WriteString("class " + overriddenClassName + " : public virtual " + cppClassName + " {\n" + "public:\n" + - "\tusing " + cppClassName + "::" + cppClassName + ";\n" + // inherit constructors + "\tusing " + fullyQualifiedConstructor(cppClassName) + ";\n" + // inherit constructors "\n", ) - for _, m := range virtualMethods { - - maybeReturn := ifv(m.ReturnType.RenderTypeQtCpp() == "void", "", "return ") + if !c.CanDelete { ret.WriteString( - "\tintptr_t handle__" + m.SafeMethodName() + " = 0;\n" + - + "private:\n" + + "\t~" + overriddenClassName + "();\n" + // = delete;\n" + "\n" + + "public:\n" + + "\n", + ) + } - "\t" + m.ReturnType.RenderTypeQtCpp() + " " + m.MethodName + "(...) override {\n" + - "\t\tif (handle__" + m.SafeMethodName() + " == 0) {\n" + - "\t\t\t" + maybeReturn + methodPrefixName + "::" + m.MethodName + "(...);\n" + - "\t\t} else {\n" + - "\t\t\t" + maybeReturn + "miqt_exec_callback_" + methodPrefixName + "_" + m.SafeMethodName() + "(...);\n" + + for _, m := range virtualMethods { + + { + var maybeReturn, maybeReturn2 string + var returnTransformP, returnTransformF string + if !m.ReturnType.Void() { + maybeReturn = "return " + + maybeReturn2 = m.ReturnType.RenderTypeCabi() + " callback_return_value = " + returnParam := m.ReturnType // copy + returnParam.ParameterName = "callback_return_value" + returnTransformP, returnTransformF = emitCABI2CppForwarding(returnParam, "\t\t") + } + + paramArgs := []string{"handle__" + m.SafeMethodName()} + + var signalCode string + + for i, p := range m.Parameters { + signalCode += emitAssignCppToCabi(fmt.Sprintf("\t\t%s sigval%d = ", p.RenderTypeCabi(), i+1), p, p.ParameterName) + paramArgs = append(paramArgs, fmt.Sprintf("sigval%d", i+1)) + } + + ret.WriteString( + "\t// cgo.Handle value for overwritten implementation\n" + + "\tintptr_t handle__" + m.SafeMethodName() + " = 0;\n" + + "\n", + ) + + // In the case of method overloads, we always need to use the + // original method name (CppCallTarget), not the MethodName + + ret.WriteString( + "\t// Subclass to allow providing a Go implementation\n" + + "\t" + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + "override {\n" + + "\t\tif (handle__" + m.SafeMethodName() + " == 0) {\n", + ) + if m.IsPureVirtual { + if m.ReturnType.Void() { + ret.WriteString("\t\t\treturn; // Pure virtual, there is no base we can call\n") + } else { + ret.WriteString("\t\t\treturn " + getCppZeroValue(m.ReturnType) + "; // Pure virtual, there is no base we can call\n") + } + } else { + ret.WriteString("\t\t\t" + maybeReturn + methodPrefixName + "::" + m.CppCallTarget() + "(" + emitParameterNames(m) + ");\n") + } + ret.WriteString( "\t\t}\n" + - "\t}\n" + + "\t\t\n" + + signalCode + "\n" + + "\t\t" + maybeReturn2 + "miqt_exec_callback_" + methodPrefixName + "_" + m.SafeMethodName() + "(" + strings.Join(paramArgs, `, `) + ");\n" + + returnTransformP + "\n" + + "\t\t" + ifv(maybeReturn == "", "", "return "+returnTransformF+";") + "\n" + + "\t}\n" + + + "\n", + ) + } - "\n" + + // If there is a base version of this method, add a helper to + // allow calling it - "\t" + m.ReturnType.RenderTypeQtCpp() + " virtualbase_" + m.SafeMethodName() + "(...) {\n" + - "\t\t" + maybeReturn + methodPrefixName + "::" + m.MethodName + "(...);\n" + - "\t}\n" + + if !m.IsPureVirtual { - "\n", - ) + // The virtualbase wrapper needs to take CABI parameters, not + // real Qt parameters, in case there are protected enum types + // (e.g. QAbstractItemView::CursorAction) + + var parametersCabi []string + for _, p := range m.Parameters { + parametersCabi = append(parametersCabi, p.RenderTypeCabi()+" "+p.ParameterName) + } + vbpreamble, vbforwarding := emitParametersCABI2CppForwarding(m.Parameters, "\t\t") + + // To call the super/parent's version of this method, normally + // we use the scope operator (Base::Foo()), but that only works + // inside the actual overridden method itself + // Use a reinterpret_cast<> instead + + // vbCallTarget := "reinterpret_cast<" + ifv(m.IsConst, "const ", "") + c.ClassName + "*>(this)->" + m.CppCallTarget() + "(" + vbforwarding + ")" + vbCallTarget := methodPrefixName + "::" + m.CppCallTarget() + "(" + vbforwarding + ")" + + ret.WriteString( + "\t// Wrapper to allow calling protected method\n" + + "\t" + m.ReturnType.RenderTypeCabi() + " virtualbase_" + m.SafeMethodName() + "(" + strings.Join(parametersCabi, ", ") + ") " + ifv(m.IsConst, "const ", "") + "{\n" + + vbpreamble + "\n" + + emitAssignCppToCabi("\t\treturn ", m.ReturnType, vbCallTarget) + "\n" + + "\t}\n" + + + "\n", + ) + + } } ret.WriteString( "};\n" + "\n") - cppClassName = "MiqtVirtual" + cppClassName + cppClassName = overriddenClassName } for i, ctor := range c.Ctors { + if len(virtualMethods) > 0 && + len(ctor.Parameters) == 1 && + ctor.Parameters[0].ParameterType == c.ClassName && + (ctor.Parameters[0].Pointer || ctor.Parameters[0].ByRef) { + // This is a copy-constructor for the base class + // We can't just call it on the derived class, that doesn't work: + // ""an inherited constructor is not a candidate for initialization from an expression of the same or derived type"" + // @ref https://stackoverflow.com/q/57926023 + // FIXME need to block this in the header and in Go as well + continue + } + preamble, forwarding := emitParametersCABI2CppForwarding(ctor.Parameters, "\t") if ctor.LinuxOnly { @@ -822,6 +952,14 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { } for _, m := range c.Methods { + + // Protected virtual methods will be bound separately (the only + // useful thing is to expose calling the virtual base) + // Protected non-virtual methods should always be hidden + if m.IsProtected { + continue + } + // Need to take an extra 'self' parameter preamble, forwarding := emitParametersCABI2CppForwarding(m.Parameters, "\t") @@ -919,13 +1057,48 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { // Virtual override helpers for _, m := range virtualMethods { + + // Virtual methods: + // 1. Allow overriding + // (Never use a const self*) + ret.WriteString( `void ` + methodPrefixName + `_override_virtual_` + m.SafeMethodName() + `(` + methodPrefixName + `* self, intptr_t slot) {` + "\n" + - "\tstatic_cast<" + cppClassName + ">(self)->handle__" + m.SafeMethodName() + " = slot;\n" + + "\tdynamic_cast<" + cppClassName + "*>(self)->handle__" + m.SafeMethodName() + " = slot;\n" + "}\n" + "\n", ) + // 2. Add CABI function to call the base method + + if !m.IsPureVirtual { + // This is not generally exposed in the Go binding, but when overriding + // the method, allows Go code to call super() + + // It uses CABI-CABI, the CABI-QtC++ type conversion will be done + // inside the class method so as to allow for accessing protected + // types. + // Both the parameters and return type are given in CABI format. + + var parameterNames []string + for _, param := range m.Parameters { + parameterNames = append(parameterNames, param.ParameterName) + } + + // callTarget is an rvalue representing the full C++ function call. + // These are never static + + callTarget := "dynamic_cast<" + ifv(m.IsConst, "const ", "") + cppClassName + "*>(self)->virtualbase_" + m.SafeMethodName() + "(" + strings.Join(parameterNames, `, `) + ")" + + ret.WriteString( + m.ReturnType.RenderTypeCabi() + " " + methodPrefixName + "_virtualbase_" + m.SafeMethodName() + "(" + emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*") + ") {\n" + + "\t" + ifv(m.ReturnType.Void(), "", "return ") + callTarget + ";\n" + + "}\n" + + "\n", + ) + + } + } // Delete diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index f5c72b34..43aa0737 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -859,13 +859,15 @@ import "C" conversion += gfs.emitCabiToGo(fmt.Sprintf("slotval%d := ", i+1), pp, pp.ParameterName) + "\n" } - ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot func(` + gfs.emitParametersGo(m.Parameters) + `)) { + goCbType := `func(` + gfs.emitParametersGo(m.Parameters) + `)` + + ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot ` + goCbType + `) { C.` + goClassName + `_connect_` + m.SafeMethodName() + `(this.h, C.intptr_t(cgo.NewHandle(slot)) ) } //export miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + ` func miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + `(cb C.intptr_t` + ifv(len(m.Parameters) > 0, ", ", "") + strings.Join(cgoNamedParams, `, `) + `) { - gofunc, ok := cgo.Handle(cb).Value().(func(` + gfs.emitParametersGo(m.Parameters) + `)) + gofunc, ok := cgo.Handle(cb).Value().(` + goCbType + `) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -879,6 +881,64 @@ import "C" } } + for _, m := range c.VirtualMethods() { + gfs.imports["unsafe"] = struct{}{} + gfs.imports["runtime/cgo"] = struct{}{} + + var cgoNamedParams []string + var paramNames []string + conversion := "" + + if len(m.Parameters) > 0 { + conversion = "// Convert all CABI parameters to Go parameters\n" + } + for i, pp := range m.Parameters { + cgoNamedParams = append(cgoNamedParams, pp.ParameterName+" "+pp.parameterTypeCgo()) + + paramNames = append(paramNames, fmt.Sprintf("slotval%d", i+1)) + conversion += gfs.emitCabiToGo(fmt.Sprintf("slotval%d := ", i+1), pp, pp.ParameterName) + "\n" + } + + cabiReturnType := m.ReturnType.parameterTypeCgo() + if cabiReturnType == "C.void" { + cabiReturnType = "" + } + + goCbType := `func(` + gfs.emitParametersGo(m.Parameters) + `)` + if !m.ReturnType.Void() { + goCbType += " " + m.ReturnType.RenderTypeGo(&gfs) + } + + ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot ` + goCbType + `) { + C.` + goClassName + `_override_virtual_` + m.SafeMethodName() + `(this.h, C.intptr_t(cgo.NewHandle(slot)) ) + } + + //export miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + ` + func miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + `(cb C.intptr_t` + ifv(len(m.Parameters) > 0, ", ", "") + strings.Join(cgoNamedParams, `, `) + `) ` + cabiReturnType + `{ + gofunc, ok := cgo.Handle(cb).Value().(` + goCbType + `) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + `) + ret.WriteString(conversion + "\n") + if cabiReturnType == "" { + ret.WriteString(`gofunc(` + strings.Join(paramNames, `, `) + " )\n") + } else { + ret.WriteString(`virtualReturn := gofunc(` + strings.Join(paramNames, `, `) + " )\n") + virtualRetP := m.ReturnType // copy + virtualRetP.ParameterName = "virtualReturn" + binding, rvalue := gfs.emitParameterGo2CABIForwarding(virtualRetP) + ret.WriteString(binding + "\n") + ret.WriteString("return " + rvalue + "\n") + } + ret.WriteString(` + } + `) + + // TODO add package-private function to call the C++ base class method + } + if c.CanDelete { gfs.imports["runtime"] = struct{}{} // Finalizer diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 966a531a..d2bcd08a 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -406,7 +406,7 @@ func (c *CppClass) VirtualMethods() []CppMethod { } ret = append(ret, m) - retNames[m.MethodName] = struct{}{} + retNames[m.CppCallTarget()] = struct{}{} } for _, inh := range c.Inherits { @@ -425,7 +425,7 @@ func (c *CppClass) VirtualMethods() []CppMethod { if !AllowVirtual(m) { continue } - if _, ok := retNames[m.MethodName]; ok { + if _, ok := retNames[m.CppCallTarget()]; ok { continue // Already found in a child class } @@ -446,7 +446,7 @@ func (c *CppClass) VirtualMethods() []CppMethod { } ret = append(ret, m) - retNames[m.MethodName] = struct{}{} + retNames[m.CppCallTarget()] = struct{}{} } // Append this parent's private-virtuals to blocklist so that we diff --git a/cmd/genbindings/transformoptional.go b/cmd/genbindings/transformoptional.go index 8771cf2a..2d150fc7 100644 --- a/cmd/genbindings/transformoptional.go +++ b/cmd/genbindings/transformoptional.go @@ -16,6 +16,11 @@ func astTransformOptional(parsed *CppParsedHeader) { for j, m := range c.Methods { + // Treat virtual methods as if all parameters are mandatory + if m.IsVirtual { + continue + } + // Search for first optional parameter (they all must be last) optionalStart := -1 for k, p := range m.Parameters { From 943ccf7b3a9c1ad0ed11012f0ec7c802d74c2ca6 Mon Sep 17 00:00:00 2001 From: mappu Date: Fri, 15 Nov 2024 19:55:43 +1300 Subject: [PATCH 06/22] genbindings: subclass support for all virtual methods (3/3) --- cmd/genbindings/emitcabi.go | 49 +++++++++++++++------------------ cmd/genbindings/emitgo.go | 7 ++++- cmd/genbindings/intermediate.go | 22 +++++++++++++++ 3 files changed, 50 insertions(+), 28 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 392c8142..3af268dc 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -718,9 +718,9 @@ extern "C" { } for _, m := range c.VirtualMethods() { - ret.WriteString(fmt.Sprintf("void %s_override_virtual_%s(%s* self, intptr_t slot);\n", methodPrefixName, m.SafeMethodName(), methodPrefixName)) + ret.WriteString(fmt.Sprintf("void %s_override_virtual_%s(%s* self, intptr_t slot);\n", methodPrefixName, m.SafeMethodName(), "void" /*methodPrefixName*/)) - ret.WriteString(fmt.Sprintf("%s %s_virtualbase_%s(%s);\n", m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*"))) + ret.WriteString(fmt.Sprintf("%s %s_virtualbase_%s(%s);\n", m.ReturnType.RenderTypeCabi(), methodPrefixName, m.SafeMethodName(), emitParametersCabi(m, ifv(m.IsConst, "const ", "")+"void" /*methodPrefixName*/ +"*"))) } // delete @@ -786,18 +786,27 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret.WriteString("class " + overriddenClassName + " : public virtual " + cppClassName + " {\n" + "public:\n" + - "\tusing " + fullyQualifiedConstructor(cppClassName) + ";\n" + // inherit constructors "\n", ) + for _, ctor := range c.Ctors { + ret.WriteString("\t" + overriddenClassName + "(" + emitParametersCpp(ctor) + "): " + cppClassName + "(" + emitParameterNames(ctor) + ") {};\n") + } + ret.WriteString("\n") + if !c.CanDelete { ret.WriteString( "private:\n" + - "\t~" + overriddenClassName + "();\n" + // = delete;\n" + + "\tvirtual ~" + overriddenClassName + "();\n" + // = delete;\n" + "\n" + "public:\n" + "\n", ) + } else { + ret.WriteString( + "\tvirtual ~" + overriddenClassName + "() = default;\n" + + "\n", + ) } for _, m := range virtualMethods { @@ -834,7 +843,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret.WriteString( "\t// Subclass to allow providing a Go implementation\n" + - "\t" + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + "override {\n" + + "\tvirtual " + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + "override {\n" + "\t\tif (handle__" + m.SafeMethodName() + " == 0) {\n", ) if m.IsPureVirtual { @@ -845,6 +854,10 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { } } else { ret.WriteString("\t\t\t" + maybeReturn + methodPrefixName + "::" + m.CppCallTarget() + "(" + emitParameterNames(m) + ");\n") + + if m.ReturnType.Void() { + ret.WriteString("\t\t\treturn;\n") + } } ret.WriteString( "\t\t}\n" + @@ -874,12 +887,6 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { } vbpreamble, vbforwarding := emitParametersCABI2CppForwarding(m.Parameters, "\t\t") - // To call the super/parent's version of this method, normally - // we use the scope operator (Base::Foo()), but that only works - // inside the actual overridden method itself - // Use a reinterpret_cast<> instead - - // vbCallTarget := "reinterpret_cast<" + ifv(m.IsConst, "const ", "") + c.ClassName + "*>(this)->" + m.CppCallTarget() + "(" + vbforwarding + ")" vbCallTarget := methodPrefixName + "::" + m.CppCallTarget() + "(" + vbforwarding + ")" ret.WriteString( @@ -904,18 +911,6 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { for i, ctor := range c.Ctors { - if len(virtualMethods) > 0 && - len(ctor.Parameters) == 1 && - ctor.Parameters[0].ParameterType == c.ClassName && - (ctor.Parameters[0].Pointer || ctor.Parameters[0].ByRef) { - // This is a copy-constructor for the base class - // We can't just call it on the derived class, that doesn't work: - // ""an inherited constructor is not a candidate for initialization from an expression of the same or derived type"" - // @ref https://stackoverflow.com/q/57926023 - // FIXME need to block this in the header and in Go as well - continue - } - preamble, forwarding := emitParametersCABI2CppForwarding(ctor.Parameters, "\t") if ctor.LinuxOnly { @@ -1063,8 +1058,8 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { // (Never use a const self*) ret.WriteString( - `void ` + methodPrefixName + `_override_virtual_` + m.SafeMethodName() + `(` + methodPrefixName + `* self, intptr_t slot) {` + "\n" + - "\tdynamic_cast<" + cppClassName + "*>(self)->handle__" + m.SafeMethodName() + " = slot;\n" + + `void ` + methodPrefixName + `_override_virtual_` + m.SafeMethodName() + `(void* self, intptr_t slot) {` + "\n" + + "\t( (" + cppClassName + "*)(self) )->handle__" + m.SafeMethodName() + " = slot;\n" + "}\n" + "\n", ) @@ -1088,10 +1083,10 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { // callTarget is an rvalue representing the full C++ function call. // These are never static - callTarget := "dynamic_cast<" + ifv(m.IsConst, "const ", "") + cppClassName + "*>(self)->virtualbase_" + m.SafeMethodName() + "(" + strings.Join(parameterNames, `, `) + ")" + callTarget := "( (" + ifv(m.IsConst, "const ", "") + cppClassName + "*)(self) )->virtualbase_" + m.SafeMethodName() + "(" + strings.Join(parameterNames, `, `) + ")" ret.WriteString( - m.ReturnType.RenderTypeCabi() + " " + methodPrefixName + "_virtualbase_" + m.SafeMethodName() + "(" + emitParametersCabi(m, ifv(m.IsConst, "const ", "")+methodPrefixName+"*") + ") {\n" + + m.ReturnType.RenderTypeCabi() + " " + methodPrefixName + "_virtualbase_" + m.SafeMethodName() + "(" + emitParametersCabi(m, ifv(m.IsConst, "const ", "")+"void*") + ") {\n" + "\t" + ifv(m.ReturnType.Void(), "", "return ") + callTarget + ";\n" + "}\n" + "\n", diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 43aa0737..ff67fe94 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -806,6 +806,11 @@ import "C" } for _, m := range c.Methods { + + if m.IsProtected { + continue // Don't add a direct call for it + } + preamble, forwarding := gfs.emitParametersGo2CABIForwarding(m) returnTypeDecl := m.ReturnType.RenderTypeGo(&gfs) @@ -910,7 +915,7 @@ import "C" } ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot ` + goCbType + `) { - C.` + goClassName + `_override_virtual_` + m.SafeMethodName() + `(this.h, C.intptr_t(cgo.NewHandle(slot)) ) + C.` + goClassName + `_override_virtual_` + m.SafeMethodName() + `(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)) ) } //export miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + ` diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index d2bcd08a..eff54906 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -394,6 +394,28 @@ func (c *CppClass) VirtualMethods() []CppMethod { var retNames = make(map[string]struct{}, 0) // if name is present, a child class found it first var block = slice_to_set(c.PrivateMethods) + if len(c.Ctors) == 0 { + // This class can't be constructed + // Therefore there's no way to get a derived version of it for subclassing + // (Unless we add custom constructors, but that seems like there would be + // no in-Qt use for such a thing) + // Pretend that this class is non-virtual + return nil + } + + // FIXME Allowing the subclassing of QAccessibleWidget compiles fine, + // but, always gives a linker error: + // + // /usr/lib/go-1.19/pkg/tool/linux_amd64/link: running g++ failed: exit status 1 + // /usr/bin/ld: /tmp/go-link-1745036494/000362.o: in function `MiqtVirtualQAccessibleWidget::MiqtVirtualQAccessibleWidget(QWidget*)': + // undefined reference to `vtable for MiqtVirtualQAccessibleWidget' + // + // An undefined vtable usually indicates that the virtual class is missing + // definitions for some virtual methods, but AFAICT we have complete coverage. + if c.ClassName == "QAccessibleWidget" { + return nil + } + for _, m := range c.Methods { if !m.IsVirtual { continue From 73089d51206a2948ade29f2ff3778ad5b33d7056 Mon Sep 17 00:00:00 2001 From: mappu Date: Fri, 15 Nov 2024 19:55:52 +1300 Subject: [PATCH 07/22] examples/subclass: initial commit --- .gitignore | 1 + examples/subclass/main.go | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 examples/subclass/main.go diff --git a/.gitignore b/.gitignore index 8612113f..2e87edd7 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ examples/mdoutliner/mdoutliner6 examples/windowsmanifest/windowsmanifest examples/uidesigner/uidesigner examples/trivialwizard6/trivialwizard6 +examples/subclass/subclass examples/libraries/extras-scintillaedit/extras-scintillaedit examples/libraries/qt-multimedia/qt-multimedia examples/libraries/qt-network/qt-network diff --git a/examples/subclass/main.go b/examples/subclass/main.go new file mode 100644 index 00000000..79f25200 --- /dev/null +++ b/examples/subclass/main.go @@ -0,0 +1,37 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" +) + +func main() { + + qt.NewQApplication(os.Args) + + widget := qt.NewQWidget2() + widget.SetFixedWidth(320) + widget.SetFixedHeight(240) + + widget.OnPaintEvent(func(ev *qt.QPaintEvent) { + panic("xyz") + + ptr := qt.NewQPainter2(widget.QPaintDevice) + defer ptr.Delete() + + br := qt.NewQBrush12(qt.Black, qt.SolidPattern) + defer br.Delete() + + ptr.SetBrush(br) + + ptr.DrawRect2(80, 60, 160, 120) + ptr.End() + }) + + widget.Show() + widget.Repaint() + widget.Update() + + qt.QApplication_Exec() +} From 8d1c871de3d0378ae4fa42d6fabf5e8aa0686bdc Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:24:50 +1300 Subject: [PATCH 08/22] genbindings/inherits: direct vs indirect inheritance --- cmd/genbindings/clang2il.go | 2 +- cmd/genbindings/emitgo.go | 4 ++- cmd/genbindings/intermediate.go | 44 +++++++++++++++++++++++++++------ 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 9ad21f94..e8747a5b 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -265,7 +265,7 @@ func processClassType(node map[string]interface{}, addNamePrefix string) (CppCla if typ, ok := base["type"].(map[string]interface{}); ok { if qualType, ok := typ["qualType"].(string); ok { - ret.Inherits = append(ret.Inherits, qualType) + ret.DirectInherits = append(ret.DirectInherits, qualType) } } } diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index ff67fe94..80324043 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -709,7 +709,9 @@ import "C" `) // Embed all inherited types to directly allow calling inherited methods - for _, base := range c.Inherits { + // Only include the direct inherits; the recursive inherits will exist + // on these types already + for _, base := range c.DirectInherits { if pkg, ok := KnownClassnames[base]; ok && pkg.PackageName != gfs.currentPackageName { // Cross-package parent class diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index eff54906..2ed07665 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -372,13 +372,13 @@ func (e CppEnum) ShortEnumName() string { } type CppClass struct { - ClassName string - Abstract bool - Ctors []CppMethod // only use the parameters - Inherits []string // other class names - Methods []CppMethod - Props []CppProperty - CanDelete bool + ClassName string + Abstract bool + Ctors []CppMethod // only use the parameters + DirectInherits []string // other class names. This only includes direct inheritance - use AllInherits() to find recursive inheritance + Methods []CppMethod + Props []CppProperty + CanDelete bool ChildTypedefs []CppTypedef ChildClassdefs []CppClass @@ -431,7 +431,10 @@ func (c *CppClass) VirtualMethods() []CppMethod { retNames[m.CppCallTarget()] = struct{}{} } - for _, inh := range c.Inherits { + // Only allow virtual overrides for direct inherits, not all inherits - + // Go will automatically allow virtual overrides for the base type because + // the parent struct is nested + for _, inh := range c.DirectInherits { // AllInherits() { cinfo, ok := KnownClassnames[inh] if !ok { panic("Class " + c.ClassName + " inherits from unknown class " + inh) @@ -481,6 +484,31 @@ func (c *CppClass) VirtualMethods() []CppMethod { return ret } +// AllInherits recursively finds and lists all the parent classes of this class. +func (c *CppClass) AllInherits() []string { + var ret []string + + // FIXME prevent duplicates arising from diamond inheritance + + for _, baseClass := range c.DirectInherits { + + ret = append(ret, baseClass) + + // And everything that class inherits - unless - we've seen it before + baseClassInfo, ok := KnownClassnames[baseClass] + if !ok { + panic("Class " + c.ClassName + " inherits from unknown class " + baseClass) + } + + recurseInfo := baseClassInfo.Class.AllInherits() + for _, childClass := range recurseInfo { + ret = append(ret, childClass) + } + } + + return ret +} + type CppTypedef struct { Alias string UnderlyingType CppParameter From c6381d40e80b3c8bc08bba70da349e3fe0f198c0 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:24:57 +1300 Subject: [PATCH 09/22] genbindings/util: add slice_copy helper --- cmd/genbindings/util.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/genbindings/util.go b/cmd/genbindings/util.go index 5beb03d6..41735380 100644 --- a/cmd/genbindings/util.go +++ b/cmd/genbindings/util.go @@ -45,4 +45,12 @@ func slice_to_set[T comparable](list []T) map[T]struct{} { ret[v] = struct{}{} } return ret +} + +func slice_copy[T comparable](input []T) []T { + ret := make([]T, len(input)) + for i, elem := range input { + ret[i] = elem + } + return ret } \ No newline at end of file From eca87471ee2dff90281883f00a3015073f60a527 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:25:48 +1300 Subject: [PATCH 10/22] genbindings/types: pointer and return type fixes --- cmd/genbindings/emitcabi.go | 3 +++ cmd/genbindings/emitgo.go | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 3af268dc..a3b8cde0 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -35,6 +35,9 @@ func (p CppParameter) RenderTypeCabi() string { return "struct miqt_map " + cppComment("tuple of "+inner1.RenderTypeCabi()+" and "+inner2.RenderTypeCabi()) } else if (p.Pointer || p.ByRef) && p.QtClassType() { + if p.PointerCount > 1 { + return cabiClassName(p.ParameterType) + strings.Repeat("*", p.PointerCount) + } return cabiClassName(p.ParameterType) + "*" } else if p.QtClassType() && !p.Pointer { diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 80324043..7d94d3aa 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -13,7 +13,7 @@ import ( func goReservedWord(s string) bool { switch s { case "default", "const", "func", "var", "type", "len", "new", "copy", "import", "range", "string", "map", "int", "select", - "ret": // not a language-reserved word, but a binding-reserved word + "super", "ret": // not language-reserved words, but a binding-reserved words return true default: return false @@ -154,6 +154,20 @@ func (p CppParameter) RenderTypeGo(gfs *goFileState) string { return ret // ignore const } +func (p CppParameter) renderReturnTypeGo(gfs *goFileState) string { + ret := p.RenderTypeGo(gfs) + if ret == "void" { + ret = "" + } + + if p.QtClassType() && p.ParameterType != "QString" && p.ParameterType != "QByteArray" && !(p.Pointer || p.ByRef) { + // FIXME normalize this part + ret = "*" + ret + } + + return ret +} + func (p CppParameter) parameterTypeCgo() string { if p.ParameterType == "QString" { return "C.struct_miqt_string" @@ -703,6 +717,8 @@ import "C" goClassName := cabiClassName(c.ClassName) + // Type definition + ret.WriteString(` type ` + goClassName + ` struct { h *C.` + goClassName + ` From fb56258334347d476d69af75e4e7c5270c347300 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:27:19 +1300 Subject: [PATCH 11/22] genbindings: constructors return every subclass pointer --- cmd/genbindings/emitcabi.go | 34 +++++++++- cmd/genbindings/emitgo.go | 132 ++++++++++++++++++++++++++---------- 2 files changed, 129 insertions(+), 37 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index a3b8cde0..3f996f7a 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -595,6 +595,11 @@ func getReferencedTypes(src *CppParsedHeader) []string { } maybeAddType(vm.ReturnType) } + for _, cn := range c.AllInherits() { + maybeAddType(CppParameter{ + ParameterType: cn, + }) + } } // Some types (e.g. QRgb) are found but are typedefs, not classes @@ -709,7 +714,7 @@ extern "C" { methodPrefixName := cabiClassName(c.ClassName) for i, ctor := range c.Ctors { - ret.WriteString(fmt.Sprintf("%s %s_new%s(%s);\n", methodPrefixName+"*", methodPrefixName, maybeSuffix(i), emitParametersCabi(ctor, ""))) + ret.WriteString(fmt.Sprintf("void %s_new%s(%s);\n", methodPrefixName, maybeSuffix(i), emitParametersCabiConstructor(&c, &ctor))) } for _, m := range c.Methods { @@ -749,6 +754,33 @@ func fullyQualifiedConstructor(className string) string { return className + "::" + parts[len(parts)-1] } +func emitParametersCabiConstructor(c *CppClass, ctor *CppMethod) string { + + plist := slice_copy(ctor.Parameters) // semi-shallow copy + + plist = append(plist, CppParameter{ + ParameterName: cabiClassName("outptr_" + c.ClassName), + ParameterType: c.ClassName, + Pointer: true, + PointerCount: 2, + }) + for _, baseClass := range c.AllInherits() { + plist = append(plist, CppParameter{ + ParameterName: cabiClassName("outptr_" + baseClass), + ParameterType: baseClass, + Pointer: true, + PointerCount: 2, + }) + } + + slist := make([]string, 0, len(plist)) + for _, p := range plist { + slist = append(slist, p.RenderTypeCabi()+" "+p.ParameterName) + } + + return strings.Join(slist, `, `) +} + func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret := strings.Builder{} diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 7d94d3aa..905971c2 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -579,14 +579,22 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue shouldReturn = "" + namePrefix + "_ret := " crossPackage := "" - if pkg, ok := KnownClassnames[rt.ParameterType]; ok && pkg.PackageName != gfs.currentPackageName { + pkg, ok := KnownClassnames[rt.ParameterType] + if !ok { + panic("emitCabiToGo: Encountered an unknown Qt class") + } + + if pkg.PackageName != gfs.currentPackageName { crossPackage = path.Base(pkg.PackageName) + "." gfs.imports[importPathForQtPackage(pkg.PackageName)] = struct{}{} } + // FIXME This needs to somehow figure out the real child pointers + extraConstructArgs := strings.Repeat(", nil", len(pkg.Class.AllInherits())) + if rt.Pointer || rt.ByRef { gfs.imports["unsafe"] = struct{}{} - return assignExpr + " " + crossPackage + "UnsafeNew" + cabiClassName(rt.ParameterType) + "(unsafe.Pointer(" + rvalue + "))" + return assignExpr + " " + crossPackage + "UnsafeNew" + cabiClassName(rt.ParameterType) + "(unsafe.Pointer(" + rvalue + ")" + extraConstructArgs + ")" } else { // This is return by value, but CABI has new'd it into a @@ -596,10 +604,10 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue // of Go scope if crossPackage == "" { - afterword += namePrefix + "_goptr := new" + cabiClassName(rt.ParameterType) + "(" + namePrefix + "_ret)\n" + afterword += namePrefix + "_goptr := new" + cabiClassName(rt.ParameterType) + "(" + namePrefix + "_ret" + extraConstructArgs + ")\n" } else { gfs.imports["unsafe"] = struct{}{} - afterword += namePrefix + "_goptr := " + crossPackage + "UnsafeNew" + cabiClassName(rt.ParameterType) + "(unsafe.Pointer(" + namePrefix + "_ret))\n" + afterword += namePrefix + "_goptr := " + crossPackage + "UnsafeNew" + cabiClassName(rt.ParameterType) + "(unsafe.Pointer(" + namePrefix + "_ret)" + extraConstructArgs + ")\n" } afterword += namePrefix + "_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer\n" @@ -758,69 +766,121 @@ import "C" } `) + + // CGO types only exist within the same Go file, so other Go files can't + // call this same private ctor function, unless it goes through unsafe.Pointer{}. + // This is probably because C types can possibly violate the ODR whereas + // that never happens in Go's type system. + gfs.imports["unsafe"] = struct{}{} localInit := "h: h" - for _, base := range c.Inherits { - gfs.imports["unsafe"] = struct{}{} + unsafeInit := "h: (*C." + goClassName + ")(h)" + extraCArgs := "" + extraUnsafeArgs := "" + + // We require arguments for all inherits, but we only embed the direct inherits + // Any recursive inherits will be owned by the base + for _, base := range c.AllInherits() { + + extraCArgs += ", h_" + cabiClassName(base) + " *C." + cabiClassName(base) + extraUnsafeArgs += ", h_" + cabiClassName(base) + " unsafe.Pointer" + } + for _, base := range c.DirectInherits { ctorPrefix := "" - if pkg, ok := KnownClassnames[base]; ok && pkg.PackageName != gfs.currentPackageName { + pkg, ok := KnownClassnames[base] + if !ok { + panic("Class " + c.ClassName + " has unknown parent " + base) + } + + constructRequiresParams := pkg.Class.AllInherits() + var ixxParams []string = make([]string, 0, len(constructRequiresParams)+1) + ixxParams = append(ixxParams, "h_"+cabiClassName(base)) + for _, grandchildInheritedClass := range constructRequiresParams { + ixxParams = append(ixxParams, "h_"+cabiClassName(grandchildInheritedClass)) + } + + if pkg.PackageName != gfs.currentPackageName { ctorPrefix = path.Base(pkg.PackageName) + "." + + localInit += ",\n" + cabiClassName(base) + ": " + ctorPrefix + "UnsafeNew" + cabiClassName(base) + "(unsafe.Pointer(" + strings.Join(ixxParams, "), unsafe.Pointer(") + "))" + } else { + localInit += ",\n" + cabiClassName(base) + ": new" + cabiClassName(base) + "(" + strings.Join(ixxParams, ", ") + ")" + } - localInit += ", " + cabiClassName(base) + ": " + ctorPrefix + "UnsafeNew" + cabiClassName(base) + "(unsafe.Pointer(h))" + unsafeInit += ",\n" + cabiClassName(base) + ": " + ctorPrefix + "UnsafeNew" + cabiClassName(base) + "(" + strings.Join(ixxParams, ", ") + ")" } ret.WriteString(` - func new` + goClassName + `(h *C.` + goClassName + `) *` + goClassName + ` { + // new` + goClassName + ` constructs the type using only CGO pointers. + func new` + goClassName + `(h *C.` + goClassName + extraCArgs + `) *` + goClassName + ` { if h == nil { return nil } return &` + goClassName + `{` + localInit + `} } - `) - - // CGO types only exist within the same Go file, so other Go files can't - // call this same private ctor function, unless it goes through unsafe.Pointer{}. - // This is probably because C types can possibly violate the ODR whereas - // that never happens in Go's type system. - gfs.imports["unsafe"] = struct{}{} - ret.WriteString(` - func UnsafeNew` + goClassName + `(h unsafe.Pointer) *` + goClassName + ` { - return new` + goClassName + `( (*C.` + goClassName + `)(h) ) + // UnsafeNew` + goClassName + ` constructs the type using only unsafe pointers. + func UnsafeNew` + goClassName + `(h unsafe.Pointer` + extraUnsafeArgs + `) *` + goClassName + ` { + if h == nil { + return nil + } + + return &` + goClassName + `{` + unsafeInit + `} } `) + // + for i, ctor := range c.Ctors { preamble, forwarding := gfs.emitParametersGo2CABIForwarding(ctor) + ret.WriteString(` + // New` + goClassName + maybeSuffix(i) + ` constructs a new ` + c.ClassName + ` object. + func New` + goClassName + maybeSuffix(i) + `(` + gfs.emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` { + `, + ) + if ctor.LinuxOnly { gfs.imports["runtime"] = struct{}{} ret.WriteString(` - // New` + goClassName + maybeSuffix(i) + ` constructs a new ` + c.ClassName + ` object. - func New` + goClassName + maybeSuffix(i) + `(` + gfs.emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` { - if runtime.GOOS == "linux" { - ` + preamble + ` ret := C.` + goClassName + `_new` + maybeSuffix(i) + `(` + forwarding + `) - return new` + goClassName + `(ret) - } else { - panic("Unsupported OS") - } + if runtime.GOOS != "linux" { + panic("Unsupported OS") + } + `) } - - `) - } else { - ret.WriteString(` - // New` + goClassName + maybeSuffix(i) + ` constructs a new ` + c.ClassName + ` object. - func New` + goClassName + maybeSuffix(i) + `(` + gfs.emitParametersGo(ctor.Parameters) + `) *` + goClassName + ` { - ` + preamble + ` ret := C.` + goClassName + `_new` + maybeSuffix(i) + `(` + forwarding + `) - return new` + goClassName + `(ret) + + ret.WriteString(preamble) + + // Outptr management + + outptrs := make([]string, 0, len(c.AllInherits())+1) + ret.WriteString(`var outptr_` + cabiClassName(c.ClassName) + ` *C.` + goClassName + " = nil\n") + outptrs = append(outptrs, "outptr_"+cabiClassName(c.ClassName)) + for _, baseClass := range c.AllInherits() { + ret.WriteString(`var outptr_` + cabiClassName(baseClass) + ` *C.` + baseClass + " = nil\n") + outptrs = append(outptrs, "outptr_"+cabiClassName(baseClass)) + } + + if len(forwarding) > 0 { + forwarding += ", " + } + forwarding += "&" + strings.Join(outptrs, ", &") + + // Call Cgo constructor + + ret.WriteString(` + C.` + goClassName + `_new` + maybeSuffix(i) + `(` + forwarding + `) + ret := new` + goClassName + `(` + strings.Join(outptrs, `, `) + `) + ret.isSubclass = true + return ret } `) - } + } for _, m := range c.Methods { From 6fa97722c558c43bd84c30199d6f2936e851b6cf Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:28:00 +1300 Subject: [PATCH 12/22] genbindings: delete either subclass or direct class --- cmd/genbindings/emitcabi.go | 17 ++++++++++------- cmd/genbindings/emitgo.go | 3 ++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 3f996f7a..f3a433ba 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -733,7 +733,7 @@ extern "C" { // delete if c.CanDelete { - ret.WriteString(fmt.Sprintf("void %s_Delete(%s* self);\n", methodPrefixName, methodPrefixName)) + ret.WriteString(fmt.Sprintf("void %s_Delete(%s* self, bool isSubclass);\n", methodPrefixName, methodPrefixName)) } ret.WriteString("\n") @@ -1133,13 +1133,16 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { // Delete if c.CanDelete { - ret.WriteString(fmt.Sprintf( - "void %s_Delete(%s* self) {\n"+ - "\tdelete self;\n"+ - "}\n"+ + ret.WriteString( + "void " + methodPrefixName + "_Delete(" + methodPrefixName + "* self, bool isSubclass) {\n" + + "\tif (isSubclass) {\n" + + "\t\tdelete dynamic_cast<" + cppClassName + "*>( self );\n" + + "\t} else {\n" + + "\t\tdelete self;\n" + + "\t}\n" + + "}\n" + "\n", - methodPrefixName, methodPrefixName, - )) + ) } } diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 905971c2..70606eaa 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -730,6 +730,7 @@ import "C" ret.WriteString(` type ` + goClassName + ` struct { h *C.` + goClassName + ` + isSubclass bool `) // Embed all inherited types to directly allow calling inherited methods @@ -1028,7 +1029,7 @@ import "C" ret.WriteString(` // Delete this object from C++ memory. func (this *` + goClassName + `) Delete() { - C.` + goClassName + `_Delete(this.h) + C.` + goClassName + `_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted From 40abeecd543e05c7665f0110e6d87b1570d38fb1 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:28:30 +1300 Subject: [PATCH 13/22] genbindings/subclassing: accurate pointer type management for subclasses --- cmd/genbindings/config-allowlist.go | 5 ++ cmd/genbindings/emitcabi.go | 103 ++++++++++++++++------------ cmd/genbindings/emitgo.go | 103 +++++++++++++++++----------- cmd/genbindings/statetracker.go | 6 +- 4 files changed, 131 insertions(+), 86 deletions(-) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 8a5a5cd0..332ee755 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -187,6 +187,11 @@ func AllowSignal(mm CppMethod) bool { } func AllowVirtual(mm CppMethod) bool { + + if mm.MethodName == "metaObject" || mm.MethodName == "qt_metacast" { + return false + } + return true // AllowSignal(mm) } diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index f3a433ba..46b9377c 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -858,18 +858,11 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { returnTransformP, returnTransformF = emitCABI2CppForwarding(returnParam, "\t\t") } - paramArgs := []string{"handle__" + m.SafeMethodName()} - - var signalCode string - - for i, p := range m.Parameters { - signalCode += emitAssignCppToCabi(fmt.Sprintf("\t\t%s sigval%d = ", p.RenderTypeCabi(), i+1), p, p.ParameterName) - paramArgs = append(paramArgs, fmt.Sprintf("sigval%d", i+1)) - } + handleVarname := "handle__" + m.SafeMethodName() ret.WriteString( "\t// cgo.Handle value for overwritten implementation\n" + - "\tintptr_t handle__" + m.SafeMethodName() + " = 0;\n" + + "\tintptr_t " + handleVarname + " = 0;\n" + "\n", ) @@ -878,9 +871,10 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret.WriteString( "\t// Subclass to allow providing a Go implementation\n" + - "\tvirtual " + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + "override {\n" + - "\t\tif (handle__" + m.SafeMethodName() + " == 0) {\n", + "\tvirtual " + m.ReturnType.RenderTypeQtCpp() + " " + m.CppCallTarget() + "(" + emitParametersCpp(m) + ") " + ifv(m.IsConst, "const ", "") + "override {\n", ) + + ret.WriteString("\t\tif (" + handleVarname + " == 0) {\n") if m.IsPureVirtual { if m.ReturnType.Void() { ret.WriteString("\t\t\treturn; // Pure virtual, there is no base we can call\n") @@ -894,9 +888,29 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret.WriteString("\t\t\treturn;\n") } } + ret.WriteString("\t\t}\n") + + paramArgs := []string{} + if m.IsConst { + // We're calling a Cgo-exported function, but Cgo can't + // describe a const pointer to a custom class, unless + // it's a primitive or wrapped in a typedef. + // Just strip the const_cast away + paramArgs = append(paramArgs, "const_cast<"+overriddenClassName+"*>(this)") + } else { + paramArgs = append(paramArgs, "this") + } + paramArgs = append(paramArgs, handleVarname) + + var signalCode string + + for i, p := range m.Parameters { + signalCode += emitAssignCppToCabi(fmt.Sprintf("\t\t%s sigval%d = ", p.RenderTypeCabi(), i+1), p, p.ParameterName) + paramArgs = append(paramArgs, fmt.Sprintf("sigval%d", i+1)) + } + ret.WriteString( - "\t\t}\n" + - "\t\t\n" + + "\t\t\n" + signalCode + "\n" + "\t\t" + maybeReturn2 + "miqt_exec_callback_" + methodPrefixName + "_" + m.SafeMethodName() + "(" + strings.Join(paramArgs, `, `) + ");\n" + returnTransformP + "\n" + @@ -946,39 +960,40 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { for i, ctor := range c.Ctors { - preamble, forwarding := emitParametersCABI2CppForwarding(ctor.Parameters, "\t") + // The returned ctor needs to return a C++ pointer for not just the + // class itself, but also all of the inherited base classes + // That's because C++ virtual inheritance shifts the pointer; we + // need all the base pointers to call base methods from CGO + // Supply them all as out-parameters so we only need one roundtrip - if ctor.LinuxOnly { + preamble, forwarding := emitParametersCABI2CppForwarding(ctor.Parameters, "\t") - ret.WriteString(fmt.Sprintf( - "%s* %s_new%s(%s) {\n"+ - "#ifdef Q_OS_LINUX\n"+ - "%s"+ - "\treturn new %s(%s);\n"+ - "#else\n"+ - "\treturn nullptr;\n"+ - "#endif\n"+ - "}\n"+ - "\n", - methodPrefixName, methodPrefixName, maybeSuffix(i), emitParametersCabi(ctor, ""), - preamble, - cppClassName, forwarding, - )) + ret.WriteString( + "void " + methodPrefixName + "_new" + maybeSuffix(i) + "(" + emitParametersCabiConstructor(&c, &ctor) + ") {\n", + ) - } else { - ret.WriteString(fmt.Sprintf( - "%s* %s_new%s(%s) {\n"+ - "%s"+ - "\treturn new %s(%s);\n"+ - "}\n"+ - "\n", - methodPrefixName, methodPrefixName, maybeSuffix(i), emitParametersCabi(ctor, ""), - preamble, - cppClassName, forwarding, - )) + if ctor.LinuxOnly { + ret.WriteString( + "#ifndef Q_OS_LINUX\n" + + "\treturn;\n" + + "#endif\n", + ) + } + ret.WriteString( + preamble + + "\t" + cppClassName + "* ret = new " + cppClassName + "(" + forwarding + ");\n" + // Subclass class name + "\t*outptr_" + cabiClassName(c.ClassName) + " = ret;\n", // Original class name + ) + for _, baseClass := range c.AllInherits() { + ret.WriteString("\t*outptr_" + baseClass + " = static_cast<" + baseClass + "*>(ret);\n") } + ret.WriteString( + "}\n" + + "\n", + ) + } for _, m := range c.Methods { @@ -1088,13 +1103,15 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { // Virtual override helpers for _, m := range virtualMethods { - // Virtual methods: - // 1. Allow overriding + // Virtual methods: Allow overriding // (Never use a const self*) + // The pointer that we are passed is the base type, not the subclassed + // type. First cast the void* to the base type, and only then, + // upclass it ret.WriteString( `void ` + methodPrefixName + `_override_virtual_` + m.SafeMethodName() + `(void* self, intptr_t slot) {` + "\n" + - "\t( (" + cppClassName + "*)(self) )->handle__" + m.SafeMethodName() + " = slot;\n" + + "\tdynamic_cast<" + cppClassName + "*>( (" + cabiClassName(c.ClassName) + "*)(self) )->handle__" + m.SafeMethodName() + " = slot;\n" + "}\n" + "\n", ) diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 70606eaa..4ad60ec4 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -892,13 +892,7 @@ import "C" preamble, forwarding := gfs.emitParametersGo2CABIForwarding(m) - returnTypeDecl := m.ReturnType.RenderTypeGo(&gfs) - if returnTypeDecl == "void" { - returnTypeDecl = "" - } - if m.ReturnType.QtClassType() && m.ReturnType.ParameterType != "QString" && m.ReturnType.ParameterType != "QByteArray" && !(m.ReturnType.Pointer || m.ReturnType.ByRef) { - returnTypeDecl = "*" + returnTypeDecl - } + returnTypeDecl := m.ReturnType.renderReturnTypeGo(&gfs) rvalue := `C.` + goClassName + `_` + m.SafeMethodName() + `(` + forwarding + `)` @@ -969,58 +963,87 @@ import "C" gfs.imports["unsafe"] = struct{}{} gfs.imports["runtime/cgo"] = struct{}{} - var cgoNamedParams []string - var paramNames []string - conversion := "" + // Add a package-private function to call the C++ base class method + // QWidget_virtualbase_PaintEvent - if len(m.Parameters) > 0 { - conversion = "// Convert all CABI parameters to Go parameters\n" - } - for i, pp := range m.Parameters { - cgoNamedParams = append(cgoNamedParams, pp.ParameterName+" "+pp.parameterTypeCgo()) + { + preamble, forwarding := gfs.emitParametersGo2CABIForwarding(m) - paramNames = append(paramNames, fmt.Sprintf("slotval%d", i+1)) - conversion += gfs.emitCabiToGo(fmt.Sprintf("slotval%d := ", i+1), pp, pp.ParameterName) + "\n" - } + forwarding = "unsafe.Pointer(this.h)" + strings.TrimPrefix(forwarding, `this.h`) // TODO integrate properly - cabiReturnType := m.ReturnType.parameterTypeCgo() - if cabiReturnType == "C.void" { - cabiReturnType = "" - } + returnTypeDecl := m.ReturnType.renderReturnTypeGo(&gfs) + + ret.WriteString(` + func (this *` + goClassName + `) callVirtualBase_` + m.SafeMethodName() + `(` + gfs.emitParametersGo(m.Parameters) + `) ` + returnTypeDecl + ` { + ` + preamble + ` + ` + gfs.emitCabiToGo("return ", m.ReturnType, `C.`+goClassName+`_virtualbase_`+m.SafeMethodName()+`(`+forwarding+`)`) + ` + } + `) - goCbType := `func(` + gfs.emitParametersGo(m.Parameters) + `)` - if !m.ReturnType.Void() { - goCbType += " " + m.ReturnType.RenderTypeGo(&gfs) } - ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot ` + goCbType + `) { + // Add a function to set the virtual override handle + // It must be possible to call the base class version, so pass + // that a as a 'super' callback as an extra parameter + + { + + var cgoNamedParams []string + var paramNames []string = []string{"(&" + goClassName + "{h: self}).callVirtualBase_" + m.SafeMethodName()} + conversion := "" + + if len(m.Parameters) > 0 { + conversion = "// Convert all CABI parameters to Go parameters\n" + } + for i, pp := range m.Parameters { + cgoNamedParams = append(cgoNamedParams, pp.ParameterName+" "+pp.parameterTypeCgo()) + + paramNames = append(paramNames, fmt.Sprintf("slotval%d", i+1)) + conversion += gfs.emitCabiToGo(fmt.Sprintf("slotval%d := ", i+1), pp, pp.ParameterName) + "\n" + } + + cabiReturnType := m.ReturnType.parameterTypeCgo() + if cabiReturnType == "C.void" { + cabiReturnType = "" + } + + superCbType := `func(` + gfs.emitParametersGo(m.Parameters) + `) ` + m.ReturnType.renderReturnTypeGo(&gfs) + + goCbType := `func(super ` + superCbType + if len(m.Parameters) > 0 { + goCbType += `, ` + gfs.emitParametersGo(m.Parameters) + } + goCbType += `) ` + m.ReturnType.renderReturnTypeGo(&gfs) + + ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot ` + goCbType + `) { C.` + goClassName + `_override_virtual_` + m.SafeMethodName() + `(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)) ) } //export miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + ` - func miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + `(cb C.intptr_t` + ifv(len(m.Parameters) > 0, ", ", "") + strings.Join(cgoNamedParams, `, `) + `) ` + cabiReturnType + `{ + func miqt_exec_callback_` + goClassName + `_` + m.SafeMethodName() + `(self *C.` + goClassName + `, cb C.intptr_t` + ifv(len(m.Parameters) > 0, ", ", "") + strings.Join(cgoNamedParams, `, `) + `) ` + cabiReturnType + `{ gofunc, ok := cgo.Handle(cb).Value().(` + goCbType + `) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } `) - ret.WriteString(conversion + "\n") - if cabiReturnType == "" { - ret.WriteString(`gofunc(` + strings.Join(paramNames, `, `) + " )\n") - } else { - ret.WriteString(`virtualReturn := gofunc(` + strings.Join(paramNames, `, `) + " )\n") - virtualRetP := m.ReturnType // copy - virtualRetP.ParameterName = "virtualReturn" - binding, rvalue := gfs.emitParameterGo2CABIForwarding(virtualRetP) - ret.WriteString(binding + "\n") - ret.WriteString("return " + rvalue + "\n") - } - ret.WriteString(` + ret.WriteString(conversion + "\n") + if cabiReturnType == "" { + ret.WriteString(`gofunc(` + strings.Join(paramNames, `, `) + " )\n") + } else { + ret.WriteString(`virtualReturn := gofunc(` + strings.Join(paramNames, `, `) + " )\n") + virtualRetP := m.ReturnType // copy + virtualRetP.ParameterName = "virtualReturn" + binding, rvalue := gfs.emitParameterGo2CABIForwarding(virtualRetP) + ret.WriteString(binding + "\n") + ret.WriteString("return " + rvalue + "\n") + } + ret.WriteString(` } `) - // TODO add package-private function to call the C++ base class method + } + } if c.CanDelete { diff --git a/cmd/genbindings/statetracker.go b/cmd/genbindings/statetracker.go index c14639c5..5a1bf8e8 100644 --- a/cmd/genbindings/statetracker.go +++ b/cmd/genbindings/statetracker.go @@ -2,7 +2,7 @@ package main type lookupResultClass struct { PackageName string - Class *CppClass + Class CppClass } type lookupResultTypedef struct { @@ -28,8 +28,8 @@ func flushKnownTypes() { } func addKnownTypes(packageName string, parsed *CppParsedHeader) { - for i, c := range parsed.Classes { - KnownClassnames[c.ClassName] = lookupResultClass{packageName, &parsed.Classes[i] /* reference */} + for _, c := range parsed.Classes { + KnownClassnames[c.ClassName] = lookupResultClass{packageName, c /* copy */} } for _, td := range parsed.Typedefs { KnownTypedefs[td.Alias] = lookupResultTypedef{packageName, td /* copy */} From 0ff750727c0e3ea8f3db392aea504719e2a64ce9 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:28:40 +1300 Subject: [PATCH 14/22] examples/subclass: show super() calls --- examples/subclass/main.go | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/examples/subclass/main.go b/examples/subclass/main.go index 79f25200..66d34933 100644 --- a/examples/subclass/main.go +++ b/examples/subclass/main.go @@ -7,20 +7,32 @@ import ( ) func main() { - qt.NewQApplication(os.Args) + qt.QGuiApplication_SetApplicationDisplayName("Right-click to change color") + + w := qt.NewQGroupBox2() // qt.NewQw2() + w.SetTitle("QGroupBox title") + + w.SetFixedWidth(320) + w.SetFixedHeight(240) + w.SetMinimumHeight(100) + w.SetMinimumWidth(100) - widget := qt.NewQWidget2() - widget.SetFixedWidth(320) - widget.SetFixedHeight(240) + useColors := []qt.GlobalColor{ + qt.Black, qt.Red, qt.Green, qt.Blue, + } + currentColor := 0 - widget.OnPaintEvent(func(ev *qt.QPaintEvent) { - panic("xyz") + w.OnPaintEvent(func(super func(ev *qt.QPaintEvent), ev *qt.QPaintEvent) { + // Call the base class's PaintEvent to get initial content + // (Comment this out to see the QGroupBox disappear) + super(ev) - ptr := qt.NewQPainter2(widget.QPaintDevice) + // Then, draw on top of it + ptr := qt.NewQPainter2(w.QPaintDevice) defer ptr.Delete() - br := qt.NewQBrush12(qt.Black, qt.SolidPattern) + br := qt.NewQBrush12(useColors[currentColor], qt.SolidPattern) defer br.Delete() ptr.SetBrush(br) @@ -29,9 +41,14 @@ func main() { ptr.End() }) - widget.Show() - widget.Repaint() - widget.Update() + w.OnContextMenuEvent(func(super func(ev *qt.QContextMenuEvent), ev *qt.QContextMenuEvent) { + super(ev) + + currentColor = (currentColor + 1) % len(useColors) + w.Update() // repaints in next event loop tick + }) + + w.Show() qt.QApplication_Exec() } From 0884f371c1dcf68ffe5ff054e5ca201c6c5182ae Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:29:06 +1300 Subject: [PATCH 15/22] qt: rebuild (constructors, subclasses) --- qt-extras/scintillaedit/gen_ScintillaEdit.cpp | 2976 +++++-- qt-extras/scintillaedit/gen_ScintillaEdit.go | 7145 ++++++++++------ qt-extras/scintillaedit/gen_ScintillaEdit.h | 362 +- .../qscintilla/gen_qsciabstractapis.cpp | 9 +- .../qscintilla/gen_qsciabstractapis.go | 23 +- .../qscintilla/gen_qsciabstractapis.h | 4 +- .../qscintilla/gen_qsciapis.cpp | 277 +- .../qscintilla/gen_qsciapis.go | 230 +- .../qscintilla/gen_qsciapis.h | 16 +- .../qscintilla/gen_qscicommand.cpp | 8 +- .../qscintilla/gen_qscicommand.go | 13 +- .../qscintilla/gen_qscicommand.h | 2 +- .../qscintilla/gen_qscicommandset.go | 11 +- .../qscintilla/gen_qscidocument.cpp | 18 +- .../qscintilla/gen_qscidocument.go | 29 +- .../qscintilla/gen_qscidocument.h | 6 +- .../qscintilla/gen_qscilexer.cpp | 65 +- .../qscintilla/gen_qscilexer.go | 84 +- .../qscintilla/gen_qscilexer.h | 27 +- .../qscintilla/gen_qscilexeravs.cpp | 1180 ++- .../qscintilla/gen_qscilexeravs.go | 973 ++- .../qscintilla/gen_qscilexeravs.h | 84 +- .../qscintilla/gen_qscilexerbash.cpp | 1180 ++- .../qscintilla/gen_qscilexerbash.go | 973 ++- .../qscintilla/gen_qscilexerbash.h | 84 +- .../qscintilla/gen_qscilexerbatch.cpp | 1116 ++- .../qscintilla/gen_qscilexerbatch.go | 927 ++- .../qscintilla/gen_qscilexerbatch.h | 80 +- .../qscintilla/gen_qscilexercmake.cpp | 1148 ++- .../qscintilla/gen_qscilexercmake.go | 950 ++- .../qscintilla/gen_qscilexercmake.h | 82 +- .../qscintilla/gen_qscilexercoffeescript.cpp | 1115 ++- .../qscintilla/gen_qscilexercoffeescript.go | 927 ++- .../qscintilla/gen_qscilexercoffeescript.h | 80 +- .../qscintilla/gen_qscilexercpp.cpp | 1283 ++- .../qscintilla/gen_qscilexercpp.go | 1052 ++- .../qscintilla/gen_qscilexercpp.h | 92 +- .../qscintilla/gen_qscilexercsharp.cpp | 194 +- .../qscintilla/gen_qscilexercsharp.go | 159 +- .../qscintilla/gen_qscilexercsharp.h | 20 +- .../qscintilla/gen_qscilexercss.cpp | 1180 ++- .../qscintilla/gen_qscilexercss.go | 973 ++- .../qscintilla/gen_qscilexercss.h | 84 +- .../qscintilla/gen_qscilexercustom.cpp | 9 +- .../qscintilla/gen_qscilexercustom.go | 21 +- .../qscintilla/gen_qscilexercustom.h | 6 +- .../qscintilla/gen_qscilexerd.cpp | 1211 ++- .../qscintilla/gen_qscilexerd.go | 996 ++- .../qscintilla/gen_qscilexerd.h | 86 +- .../qscintilla/gen_qscilexerdiff.cpp | 1117 ++- .../qscintilla/gen_qscilexerdiff.go | 927 ++- .../qscintilla/gen_qscilexerdiff.h | 82 +- .../qscintilla/gen_qscilexeredifact.cpp | 1117 ++- .../qscintilla/gen_qscilexeredifact.go | 927 ++- .../qscintilla/gen_qscilexeredifact.h | 82 +- .../qscintilla/gen_qscilexerfortran.cpp | 66 +- .../qscintilla/gen_qscilexerfortran.go | 67 +- .../qscintilla/gen_qscilexerfortran.h | 12 +- .../qscintilla/gen_qscilexerfortran77.cpp | 1148 ++- .../qscintilla/gen_qscilexerfortran77.go | 950 ++- .../qscintilla/gen_qscilexerfortran77.h | 82 +- .../qscintilla/gen_qscilexerhtml.cpp | 1212 ++- .../qscintilla/gen_qscilexerhtml.go | 996 ++- .../qscintilla/gen_qscilexerhtml.h | 86 +- .../qscintilla/gen_qscilexeridl.cpp | 194 +- .../qscintilla/gen_qscilexeridl.go | 159 +- .../qscintilla/gen_qscilexeridl.h | 20 +- .../qscintilla/gen_qscilexerjava.cpp | 194 +- .../qscintilla/gen_qscilexerjava.go | 159 +- .../qscintilla/gen_qscilexerjava.h | 20 +- .../qscintilla/gen_qscilexerjavascript.cpp | 194 +- .../qscintilla/gen_qscilexerjavascript.go | 159 +- .../qscintilla/gen_qscilexerjavascript.h | 20 +- .../qscintilla/gen_qscilexerjson.cpp | 1116 ++- .../qscintilla/gen_qscilexerjson.go | 927 ++- .../qscintilla/gen_qscilexerjson.h | 80 +- .../qscintilla/gen_qscilexerlua.cpp | 1147 ++- .../qscintilla/gen_qscilexerlua.go | 950 ++- .../qscintilla/gen_qscilexerlua.h | 82 +- .../qscintilla/gen_qscilexermakefile.cpp | 1116 ++- .../qscintilla/gen_qscilexermakefile.go | 927 ++- .../qscintilla/gen_qscilexermakefile.h | 80 +- .../qscintilla/gen_qscilexermarkdown.cpp | 1116 ++- .../qscintilla/gen_qscilexermarkdown.go | 927 ++- .../qscintilla/gen_qscilexermarkdown.h | 80 +- .../qscintilla/gen_qscilexermatlab.cpp | 1116 ++- .../qscintilla/gen_qscilexermatlab.go | 927 ++- .../qscintilla/gen_qscilexermatlab.h | 80 +- .../qscintilla/gen_qscilexeroctave.cpp | 24 +- .../qscintilla/gen_qscilexeroctave.go | 43 +- .../qscintilla/gen_qscilexeroctave.h | 10 +- .../qscintilla/gen_qscilexerpascal.cpp | 1211 ++- .../qscintilla/gen_qscilexerpascal.go | 996 ++- .../qscintilla/gen_qscilexerpascal.h | 86 +- .../qscintilla/gen_qscilexerperl.cpp | 1179 ++- .../qscintilla/gen_qscilexerperl.go | 973 ++- .../qscintilla/gen_qscilexerperl.h | 84 +- .../qscintilla/gen_qscilexerpo.cpp | 1180 ++- .../qscintilla/gen_qscilexerpo.go | 973 ++- .../qscintilla/gen_qscilexerpo.h | 84 +- .../qscintilla/gen_qscilexerpostscript.cpp | 1244 ++- .../qscintilla/gen_qscilexerpostscript.go | 1019 ++- .../qscintilla/gen_qscilexerpostscript.h | 88 +- .../qscintilla/gen_qscilexerpov.cpp | 1212 ++- .../qscintilla/gen_qscilexerpov.go | 996 ++- .../qscintilla/gen_qscilexerpov.h | 86 +- .../qscintilla/gen_qscilexerproperties.cpp | 1148 ++- .../qscintilla/gen_qscilexerproperties.go | 950 ++- .../qscintilla/gen_qscilexerproperties.h | 82 +- .../qscintilla/gen_qscilexerpython.cpp | 1212 ++- .../qscintilla/gen_qscilexerpython.go | 996 ++- .../qscintilla/gen_qscilexerpython.h | 86 +- .../qscintilla/gen_qscilexerruby.cpp | 1116 ++- .../qscintilla/gen_qscilexerruby.go | 927 ++- .../qscintilla/gen_qscilexerruby.h | 80 +- .../qscintilla/gen_qscilexerspice.cpp | 1116 ++- .../qscintilla/gen_qscilexerspice.go | 927 ++- .../qscintilla/gen_qscilexerspice.h | 80 +- .../qscintilla/gen_qscilexersql.cpp | 1212 ++- .../qscintilla/gen_qscilexersql.go | 996 ++- .../qscintilla/gen_qscilexersql.h | 86 +- .../qscintilla/gen_qscilexertcl.cpp | 1116 ++- .../qscintilla/gen_qscilexertcl.go | 927 ++- .../qscintilla/gen_qscilexertcl.h | 80 +- .../qscintilla/gen_qscilexertex.cpp | 1117 ++- .../qscintilla/gen_qscilexertex.go | 927 ++- .../qscintilla/gen_qscilexertex.h | 82 +- .../qscintilla/gen_qscilexerverilog.cpp | 1116 ++- .../qscintilla/gen_qscilexerverilog.go | 927 ++- .../qscintilla/gen_qscilexerverilog.h | 80 +- .../qscintilla/gen_qscilexervhdl.cpp | 1276 ++- .../qscintilla/gen_qscilexervhdl.go | 1042 ++- .../qscintilla/gen_qscilexervhdl.h | 90 +- .../qscintilla/gen_qscilexerxml.cpp | 130 +- .../qscintilla/gen_qscilexerxml.go | 113 +- .../qscintilla/gen_qscilexerxml.h | 16 +- .../qscintilla/gen_qscilexeryaml.cpp | 1148 ++- .../qscintilla/gen_qscilexeryaml.go | 950 ++- .../qscintilla/gen_qscilexeryaml.h | 82 +- .../qscintilla/gen_qscimacro.cpp | 355 +- .../qscintilla/gen_qscimacro.go | 266 +- .../qscintilla/gen_qscimacro.h | 36 +- .../qscintilla/gen_qsciprinter.cpp | 444 +- .../qscintilla/gen_qsciprinter.go | 341 +- .../qscintilla/gen_qsciprinter.h | 54 +- .../qscintilla/gen_qsciscintilla.cpp | 5275 ++++++++++-- .../qscintilla/gen_qsciscintilla.go | 2755 ++++++- .../qscintilla/gen_qsciscintilla.h | 294 +- .../qscintilla/gen_qsciscintillabase.cpp | 1094 ++- .../qscintilla/gen_qsciscintillabase.go | 779 +- .../qscintilla/gen_qsciscintillabase.h | 130 +- .../qscintilla/gen_qscistyle.cpp | 33 +- .../qscintilla/gen_qscistyle.go | 53 +- .../qscintilla/gen_qscistyle.h | 12 +- .../qscintilla/gen_qscistyledtext.cpp | 23 +- .../qscintilla/gen_qscistyledtext.go | 37 +- .../qscintilla/gen_qscistyledtext.h | 8 +- .../qscintilla6/gen_qsciabstractapis.cpp | 9 +- .../qscintilla6/gen_qsciabstractapis.go | 23 +- .../qscintilla6/gen_qsciabstractapis.h | 4 +- .../qscintilla6/gen_qsciapis.cpp | 277 +- .../qscintilla6/gen_qsciapis.go | 230 +- .../qscintilla6/gen_qsciapis.h | 16 +- .../qscintilla6/gen_qscicommand.cpp | 8 +- .../qscintilla6/gen_qscicommand.go | 13 +- .../qscintilla6/gen_qscicommand.h | 2 +- .../qscintilla6/gen_qscicommandset.go | 11 +- .../qscintilla6/gen_qscidocument.cpp | 18 +- .../qscintilla6/gen_qscidocument.go | 29 +- .../qscintilla6/gen_qscidocument.h | 6 +- .../qscintilla6/gen_qscilexer.cpp | 65 +- .../qscintilla6/gen_qscilexer.go | 84 +- .../qscintilla6/gen_qscilexer.h | 27 +- .../qscintilla6/gen_qscilexeravs.cpp | 1180 ++- .../qscintilla6/gen_qscilexeravs.go | 973 ++- .../qscintilla6/gen_qscilexeravs.h | 84 +- .../qscintilla6/gen_qscilexerbash.cpp | 1180 ++- .../qscintilla6/gen_qscilexerbash.go | 973 ++- .../qscintilla6/gen_qscilexerbash.h | 84 +- .../qscintilla6/gen_qscilexerbatch.cpp | 1116 ++- .../qscintilla6/gen_qscilexerbatch.go | 927 ++- .../qscintilla6/gen_qscilexerbatch.h | 80 +- .../qscintilla6/gen_qscilexercmake.cpp | 1148 ++- .../qscintilla6/gen_qscilexercmake.go | 950 ++- .../qscintilla6/gen_qscilexercmake.h | 82 +- .../qscintilla6/gen_qscilexercoffeescript.cpp | 1115 ++- .../qscintilla6/gen_qscilexercoffeescript.go | 927 ++- .../qscintilla6/gen_qscilexercoffeescript.h | 80 +- .../qscintilla6/gen_qscilexercpp.cpp | 1283 ++- .../qscintilla6/gen_qscilexercpp.go | 1052 ++- .../qscintilla6/gen_qscilexercpp.h | 92 +- .../qscintilla6/gen_qscilexercsharp.cpp | 194 +- .../qscintilla6/gen_qscilexercsharp.go | 159 +- .../qscintilla6/gen_qscilexercsharp.h | 20 +- .../qscintilla6/gen_qscilexercss.cpp | 1180 ++- .../qscintilla6/gen_qscilexercss.go | 973 ++- .../qscintilla6/gen_qscilexercss.h | 84 +- .../qscintilla6/gen_qscilexercustom.cpp | 9 +- .../qscintilla6/gen_qscilexercustom.go | 21 +- .../qscintilla6/gen_qscilexercustom.h | 6 +- .../qscintilla6/gen_qscilexerd.cpp | 1211 ++- .../qscintilla6/gen_qscilexerd.go | 996 ++- .../qscintilla6/gen_qscilexerd.h | 86 +- .../qscintilla6/gen_qscilexerdiff.cpp | 1117 ++- .../qscintilla6/gen_qscilexerdiff.go | 927 ++- .../qscintilla6/gen_qscilexerdiff.h | 82 +- .../qscintilla6/gen_qscilexeredifact.cpp | 1117 ++- .../qscintilla6/gen_qscilexeredifact.go | 927 ++- .../qscintilla6/gen_qscilexeredifact.h | 82 +- .../qscintilla6/gen_qscilexerfortran.cpp | 66 +- .../qscintilla6/gen_qscilexerfortran.go | 67 +- .../qscintilla6/gen_qscilexerfortran.h | 12 +- .../qscintilla6/gen_qscilexerfortran77.cpp | 1148 ++- .../qscintilla6/gen_qscilexerfortran77.go | 950 ++- .../qscintilla6/gen_qscilexerfortran77.h | 82 +- .../qscintilla6/gen_qscilexerhtml.cpp | 1212 ++- .../qscintilla6/gen_qscilexerhtml.go | 996 ++- .../qscintilla6/gen_qscilexerhtml.h | 86 +- .../qscintilla6/gen_qscilexeridl.cpp | 194 +- .../qscintilla6/gen_qscilexeridl.go | 159 +- .../qscintilla6/gen_qscilexeridl.h | 20 +- .../qscintilla6/gen_qscilexerjava.cpp | 194 +- .../qscintilla6/gen_qscilexerjava.go | 159 +- .../qscintilla6/gen_qscilexerjava.h | 20 +- .../qscintilla6/gen_qscilexerjavascript.cpp | 194 +- .../qscintilla6/gen_qscilexerjavascript.go | 159 +- .../qscintilla6/gen_qscilexerjavascript.h | 20 +- .../qscintilla6/gen_qscilexerjson.cpp | 1116 ++- .../qscintilla6/gen_qscilexerjson.go | 927 ++- .../qscintilla6/gen_qscilexerjson.h | 80 +- .../qscintilla6/gen_qscilexerlua.cpp | 1147 ++- .../qscintilla6/gen_qscilexerlua.go | 950 ++- .../qscintilla6/gen_qscilexerlua.h | 82 +- .../qscintilla6/gen_qscilexermakefile.cpp | 1116 ++- .../qscintilla6/gen_qscilexermakefile.go | 927 ++- .../qscintilla6/gen_qscilexermakefile.h | 80 +- .../qscintilla6/gen_qscilexermarkdown.cpp | 1116 ++- .../qscintilla6/gen_qscilexermarkdown.go | 927 ++- .../qscintilla6/gen_qscilexermarkdown.h | 80 +- .../qscintilla6/gen_qscilexermatlab.cpp | 1116 ++- .../qscintilla6/gen_qscilexermatlab.go | 927 ++- .../qscintilla6/gen_qscilexermatlab.h | 80 +- .../qscintilla6/gen_qscilexeroctave.cpp | 24 +- .../qscintilla6/gen_qscilexeroctave.go | 43 +- .../qscintilla6/gen_qscilexeroctave.h | 10 +- .../qscintilla6/gen_qscilexerpascal.cpp | 1211 ++- .../qscintilla6/gen_qscilexerpascal.go | 996 ++- .../qscintilla6/gen_qscilexerpascal.h | 86 +- .../qscintilla6/gen_qscilexerperl.cpp | 1179 ++- .../qscintilla6/gen_qscilexerperl.go | 973 ++- .../qscintilla6/gen_qscilexerperl.h | 84 +- .../qscintilla6/gen_qscilexerpo.cpp | 1180 ++- .../qscintilla6/gen_qscilexerpo.go | 973 ++- .../qscintilla6/gen_qscilexerpo.h | 84 +- .../qscintilla6/gen_qscilexerpostscript.cpp | 1244 ++- .../qscintilla6/gen_qscilexerpostscript.go | 1019 ++- .../qscintilla6/gen_qscilexerpostscript.h | 88 +- .../qscintilla6/gen_qscilexerpov.cpp | 1212 ++- .../qscintilla6/gen_qscilexerpov.go | 996 ++- .../qscintilla6/gen_qscilexerpov.h | 86 +- .../qscintilla6/gen_qscilexerproperties.cpp | 1148 ++- .../qscintilla6/gen_qscilexerproperties.go | 950 ++- .../qscintilla6/gen_qscilexerproperties.h | 82 +- .../qscintilla6/gen_qscilexerpython.cpp | 1212 ++- .../qscintilla6/gen_qscilexerpython.go | 996 ++- .../qscintilla6/gen_qscilexerpython.h | 86 +- .../qscintilla6/gen_qscilexerruby.cpp | 1116 ++- .../qscintilla6/gen_qscilexerruby.go | 927 ++- .../qscintilla6/gen_qscilexerruby.h | 80 +- .../qscintilla6/gen_qscilexerspice.cpp | 1116 ++- .../qscintilla6/gen_qscilexerspice.go | 927 ++- .../qscintilla6/gen_qscilexerspice.h | 80 +- .../qscintilla6/gen_qscilexersql.cpp | 1212 ++- .../qscintilla6/gen_qscilexersql.go | 996 ++- .../qscintilla6/gen_qscilexersql.h | 86 +- .../qscintilla6/gen_qscilexertcl.cpp | 1116 ++- .../qscintilla6/gen_qscilexertcl.go | 927 ++- .../qscintilla6/gen_qscilexertcl.h | 80 +- .../qscintilla6/gen_qscilexertex.cpp | 1117 ++- .../qscintilla6/gen_qscilexertex.go | 927 ++- .../qscintilla6/gen_qscilexertex.h | 82 +- .../qscintilla6/gen_qscilexerverilog.cpp | 1116 ++- .../qscintilla6/gen_qscilexerverilog.go | 927 ++- .../qscintilla6/gen_qscilexerverilog.h | 80 +- .../qscintilla6/gen_qscilexervhdl.cpp | 1276 ++- .../qscintilla6/gen_qscilexervhdl.go | 1042 ++- .../qscintilla6/gen_qscilexervhdl.h | 90 +- .../qscintilla6/gen_qscilexerxml.cpp | 130 +- .../qscintilla6/gen_qscilexerxml.go | 113 +- .../qscintilla6/gen_qscilexerxml.h | 16 +- .../qscintilla6/gen_qscilexeryaml.cpp | 1148 ++- .../qscintilla6/gen_qscilexeryaml.go | 950 ++- .../qscintilla6/gen_qscilexeryaml.h | 82 +- .../qscintilla6/gen_qscimacro.cpp | 355 +- .../qscintilla6/gen_qscimacro.go | 266 +- .../qscintilla6/gen_qscimacro.h | 36 +- .../qscintilla6/gen_qsciprinter.cpp | 341 +- .../qscintilla6/gen_qsciprinter.go | 272 +- .../qscintilla6/gen_qsciprinter.h | 40 +- .../qscintilla6/gen_qsciscintilla.cpp | 5235 ++++++++++-- .../qscintilla6/gen_qsciscintilla.go | 2755 ++++++- .../qscintilla6/gen_qsciscintilla.h | 294 +- .../qscintilla6/gen_qsciscintillabase.cpp | 1094 ++- .../qscintilla6/gen_qsciscintillabase.go | 779 +- .../qscintilla6/gen_qsciscintillabase.h | 130 +- .../qscintilla6/gen_qscistyle.cpp | 33 +- .../qscintilla6/gen_qscistyle.go | 53 +- .../qscintilla6/gen_qscistyle.h | 12 +- .../qscintilla6/gen_qscistyledtext.cpp | 23 +- .../qscintilla6/gen_qscistyledtext.go | 37 +- .../qscintilla6/gen_qscistyledtext.h | 8 +- qt/cbor/gen_qcborarray.cpp | 54 +- qt/cbor/gen_qcborarray.go | 87 +- qt/cbor/gen_qcborarray.h | 18 +- qt/cbor/gen_qcborcommon.cpp | 8 +- qt/cbor/gen_qcborcommon.go | 13 +- qt/cbor/gen_qcborcommon.h | 2 +- qt/cbor/gen_qcbormap.cpp | 54 +- qt/cbor/gen_qcbormap.go | 87 +- qt/cbor/gen_qcbormap.h | 18 +- qt/cbor/gen_qcborstreamreader.cpp | 33 +- qt/cbor/gen_qcborstreamreader.go | 55 +- qt/cbor/gen_qcborstreamreader.h | 12 +- qt/cbor/gen_qcborstreamwriter.cpp | 13 +- qt/cbor/gen_qcborstreamwriter.go | 23 +- qt/cbor/gen_qcborstreamwriter.h | 4 +- qt/cbor/gen_qcborvalue.cpp | 139 +- qt/cbor/gen_qcborvalue.go | 223 +- qt/cbor/gen_qcborvalue.h | 52 +- qt/gen_qabstractanimation.cpp | 397 +- qt/gen_qabstractanimation.go | 310 +- qt/gen_qabstractanimation.h | 44 +- qt/gen_qabstractbutton.cpp | 18 +- qt/gen_qabstractbutton.go | 23 +- qt/gen_qabstractbutton.h | 36 +- qt/gen_qabstracteventdispatcher.cpp | 21 +- qt/gen_qabstracteventdispatcher.go | 46 +- qt/gen_qabstracteventdispatcher.h | 6 +- qt/gen_qabstractitemdelegate.cpp | 9 +- qt/gen_qabstractitemdelegate.go | 29 +- qt/gen_qabstractitemdelegate.h | 4 +- qt/gen_qabstractitemmodel.cpp | 220 +- qt/gen_qabstractitemmodel.go | 307 +- qt/gen_qabstractitemmodel.h | 72 +- qt/gen_qabstractitemview.cpp | 33 +- qt/gen_qabstractitemview.go | 79 +- qt/gen_qabstractitemview.h | 80 +- qt/gen_qabstractnativeeventfilter.cpp | 8 +- qt/gen_qabstractnativeeventfilter.go | 13 +- qt/gen_qabstractnativeeventfilter.h | 2 +- qt/gen_qabstractproxymodel.cpp | 57 +- qt/gen_qabstractproxymodel.go | 79 +- qt/gen_qabstractproxymodel.h | 22 +- qt/gen_qabstractscrollarea.cpp | 747 +- qt/gen_qabstractscrollarea.go | 577 +- qt/gen_qabstractscrollarea.h | 96 +- qt/gen_qabstractslider.cpp | 1442 +++- qt/gen_qabstractslider.go | 1064 ++- qt/gen_qabstractslider.h | 154 +- qt/gen_qabstractspinbox.cpp | 1571 +++- qt/gen_qabstractspinbox.go | 1160 ++- qt/gen_qabstractspinbox.h | 167 +- qt/gen_qabstractstate.cpp | 10 +- qt/gen_qabstractstate.go | 25 +- qt/gen_qabstractstate.h | 9 +- qt/gen_qabstracttextdocumentlayout.cpp | 48 +- qt/gen_qabstracttextdocumentlayout.go | 86 +- qt/gen_qabstracttextdocumentlayout.h | 20 +- qt/gen_qabstracttransition.cpp | 10 +- qt/gen_qabstracttransition.go | 31 +- qt/gen_qabstracttransition.h | 9 +- qt/gen_qaccessible.cpp | 504 +- qt/gen_qaccessible.go | 643 +- qt/gen_qaccessible.h | 91 +- qt/gen_qaccessiblebridge.cpp | 17 +- qt/gen_qaccessiblebridge.go | 34 +- qt/gen_qaccessiblebridge.h | 6 +- qt/gen_qaccessibleobject.cpp | 471 +- qt/gen_qaccessibleobject.go | 391 +- qt/gen_qaccessibleobject.h | 32 +- qt/gen_qaccessibleplugin.cpp | 8 +- qt/gen_qaccessibleplugin.go | 21 +- qt/gen_qaccessibleplugin.h | 2 +- qt/gen_qaccessiblewidget.cpp | 54 +- qt/gen_qaccessiblewidget.go | 85 +- qt/gen_qaccessiblewidget.h | 13 +- qt/gen_qaction.cpp | 299 +- qt/gen_qaction.go | 251 +- qt/gen_qaction.h | 37 +- qt/gen_qactiongroup.cpp | 258 +- qt/gen_qactiongroup.go | 210 +- qt/gen_qactiongroup.h | 26 +- qt/gen_qanimationgroup.cpp | 10 +- qt/gen_qanimationgroup.go | 25 +- qt/gen_qanimationgroup.h | 7 +- qt/gen_qapplication.cpp | 101 +- qt/gen_qapplication.go | 124 +- qt/gen_qapplication.h | 15 +- qt/gen_qarraydata.cpp | 16 +- qt/gen_qarraydata.go | 26 +- qt/gen_qarraydata.h | 4 +- qt/gen_qbackingstore.cpp | 13 +- qt/gen_qbackingstore.go | 23 +- qt/gen_qbackingstore.h | 4 +- qt/gen_qbasictimer.cpp | 18 +- qt/gen_qbasictimer.go | 29 +- qt/gen_qbasictimer.h | 6 +- qt/gen_qbitarray.cpp | 41 +- qt/gen_qbitarray.go | 66 +- qt/gen_qbitarray.h | 14 +- qt/gen_qbitmap.cpp | 166 +- qt/gen_qbitmap.go | 172 +- qt/gen_qbitmap.h | 26 +- qt/gen_qboxlayout.cpp | 1498 +++- qt/gen_qboxlayout.go | 1225 ++- qt/gen_qboxlayout.h | 112 +- qt/gen_qbrush.cpp | 237 +- qt/gen_qbrush.go | 399 +- qt/gen_qbrush.h | 80 +- qt/gen_qbuffer.cpp | 605 +- qt/gen_qbuffer.go | 474 +- qt/gen_qbuffer.h | 50 +- qt/gen_qbuttongroup.cpp | 285 +- qt/gen_qbuttongroup.go | 219 +- qt/gen_qbuttongroup.h | 28 +- qt/gen_qbytearraymatcher.cpp | 36 +- qt/gen_qbytearraymatcher.go | 58 +- qt/gen_qbytearraymatcher.h | 12 +- qt/gen_qcalendar.cpp | 46 +- qt/gen_qcalendar.go | 74 +- qt/gen_qcalendar.h | 16 +- qt/gen_qcalendarwidget.cpp | 1442 +++- qt/gen_qcalendarwidget.go | 1068 ++- qt/gen_qcalendarwidget.h | 152 +- qt/gen_qchar.cpp | 81 +- qt/gen_qchar.go | 130 +- qt/gen_qchar.h | 30 +- qt/gen_qcheckbox.cpp | 574 +- qt/gen_qcheckbox.go | 439 +- qt/gen_qcheckbox.h | 68 +- qt/gen_qclipboard.cpp | 1 + qt/gen_qclipboard.go | 31 +- qt/gen_qclipboard.h | 2 + qt/gen_qcollator.cpp | 36 +- qt/gen_qcollator.go | 58 +- qt/gen_qcollator.h | 12 +- qt/gen_qcolor.cpp | 68 +- qt/gen_qcolor.go | 109 +- qt/gen_qcolor.h | 26 +- qt/gen_qcolordialog.cpp | 541 +- qt/gen_qcolordialog.go | 411 +- qt/gen_qcolordialog.h | 62 +- qt/gen_qcolormap.cpp | 13 +- qt/gen_qcolormap.go | 21 +- qt/gen_qcolormap.h | 4 +- qt/gen_qcolorspace.cpp | 48 +- qt/gen_qcolorspace.go | 77 +- qt/gen_qcolorspace.h | 18 +- qt/gen_qcolortransform.cpp | 18 +- qt/gen_qcolortransform.go | 29 +- qt/gen_qcolortransform.h | 6 +- qt/gen_qcolumnview.cpp | 2013 ++++- qt/gen_qcolumnview.go | 1491 +++- qt/gen_qcolumnview.h | 173 +- qt/gen_qcombobox.cpp | 1443 +++- qt/gen_qcombobox.go | 1061 ++- qt/gen_qcombobox.h | 154 +- qt/gen_qcommandlineoption.cpp | 53 +- qt/gen_qcommandlineoption.go | 85 +- qt/gen_qcommandlineoption.h | 20 +- qt/gen_qcommandlineparser.cpp | 13 +- qt/gen_qcommandlineparser.go | 21 +- qt/gen_qcommandlineparser.h | 4 +- qt/gen_qcommandlinkbutton.cpp | 375 +- qt/gen_qcommandlinkbutton.go | 317 +- qt/gen_qcommandlinkbutton.h | 57 +- qt/gen_qcommonstyle.cpp | 906 +- qt/gen_qcommonstyle.go | 734 +- qt/gen_qcommonstyle.h | 98 +- qt/gen_qcompleter.cpp | 400 +- qt/gen_qcompleter.go | 331 +- qt/gen_qcompleter.h | 42 +- qt/gen_qconcatenatetablesproxymodel.cpp | 1337 ++- qt/gen_qconcatenatetablesproxymodel.go | 1116 ++- qt/gen_qconcatenatetablesproxymodel.h | 94 +- qt/gen_qcontiguouscache.cpp | 8 +- qt/gen_qcontiguouscache.go | 13 +- qt/gen_qcontiguouscache.h | 2 +- qt/gen_qcoreapplication.cpp | 300 +- qt/gen_qcoreapplication.go | 235 +- qt/gen_qcoreapplication.h | 29 +- qt/gen_qcoreevent.cpp | 78 +- qt/gen_qcoreevent.go | 146 +- qt/gen_qcoreevent.h | 24 +- qt/gen_qcryptographichash.cpp | 13 +- qt/gen_qcryptographichash.go | 21 +- qt/gen_qcryptographichash.h | 4 +- qt/gen_qcursor.cpp | 53 +- qt/gen_qcursor.go | 95 +- qt/gen_qcursor.h | 20 +- qt/gen_qdatastream.cpp | 36 +- qt/gen_qdatastream.go | 60 +- qt/gen_qdatastream.h | 12 +- qt/gen_qdatawidgetmapper.cpp | 295 +- qt/gen_qdatawidgetmapper.go | 234 +- qt/gen_qdatawidgetmapper.h | 30 +- qt/gen_qdatetime.cpp | 99 +- qt/gen_qdatetime.go | 159 +- qt/gen_qdatetime.h | 36 +- qt/gen_qdatetimeedit.cpp | 2316 +++++- qt/gen_qdatetimeedit.go | 2095 ++++- qt/gen_qdatetimeedit.h | 195 +- qt/gen_qdeadlinetimer.cpp | 43 +- qt/gen_qdeadlinetimer.go | 69 +- qt/gen_qdeadlinetimer.h | 16 +- qt/gen_qdebug.cpp | 39 +- qt/gen_qdebug.go | 63 +- qt/gen_qdebug.h | 12 +- qt/gen_qdesktopservices.cpp | 8 +- qt/gen_qdesktopservices.go | 13 +- qt/gen_qdesktopservices.h | 2 +- qt/gen_qdesktopwidget.cpp | 1362 ++- qt/gen_qdesktopwidget.go | 1002 ++- qt/gen_qdesktopwidget.h | 139 +- qt/gen_qdial.cpp | 458 +- qt/gen_qdial.go | 351 +- qt/gen_qdial.h | 59 +- qt/gen_qdialog.cpp | 1565 +++- qt/gen_qdialog.go | 1153 ++- qt/gen_qdialog.h | 160 +- qt/gen_qdialogbuttonbox.cpp | 1426 +++- qt/gen_qdialogbuttonbox.go | 1085 ++- qt/gen_qdialogbuttonbox.h | 156 +- qt/gen_qdir.cpp | 38 +- qt/gen_qdir.go | 61 +- qt/gen_qdir.h | 14 +- qt/gen_qdiriterator.cpp | 53 +- qt/gen_qdiriterator.go | 85 +- qt/gen_qdiriterator.h | 20 +- qt/gen_qdirmodel.cpp | 1374 +++- qt/gen_qdirmodel.go | 1158 ++- qt/gen_qdirmodel.h | 108 +- qt/gen_qdockwidget.cpp | 1410 +++- qt/gen_qdockwidget.go | 1059 ++- qt/gen_qdockwidget.h | 154 +- qt/gen_qdrag.cpp | 258 +- qt/gen_qdrag.go | 202 +- qt/gen_qdrag.h | 26 +- qt/gen_qdrawutil.cpp | 28 +- qt/gen_qdrawutil.go | 45 +- qt/gen_qdrawutil.h | 10 +- qt/gen_qeasingcurve.cpp | 23 +- qt/gen_qeasingcurve.go | 37 +- qt/gen_qeasingcurve.h | 8 +- qt/gen_qelapsedtimer.cpp | 13 +- qt/gen_qelapsedtimer.go | 21 +- qt/gen_qelapsedtimer.h | 4 +- qt/gen_qerrormessage.cpp | 517 +- qt/gen_qerrormessage.go | 390 +- qt/gen_qerrormessage.h | 58 +- qt/gen_qevent.cpp | 1104 ++- qt/gen_qevent.go | 1988 +++-- qt/gen_qevent.h | 334 +- qt/gen_qeventloop.cpp | 283 +- qt/gen_qeventloop.go | 243 +- qt/gen_qeventloop.h | 34 +- qt/gen_qeventtransition.cpp | 144 +- qt/gen_qeventtransition.go | 135 +- qt/gen_qeventtransition.h | 23 +- qt/gen_qexception.cpp | 21 +- qt/gen_qexception.go | 34 +- qt/gen_qexception.h | 6 +- qt/gen_qfactoryinterface.cpp | 8 +- qt/gen_qfactoryinterface.go | 13 +- qt/gen_qfactoryinterface.h | 2 +- qt/gen_qfile.cpp | 506 +- qt/gen_qfile.go | 414 +- qt/gen_qfile.h | 42 +- qt/gen_qfiledevice.cpp | 10 +- qt/gen_qfiledevice.go | 21 +- qt/gen_qfiledevice.h | 9 +- qt/gen_qfiledialog.cpp | 575 +- qt/gen_qfiledialog.go | 439 +- qt/gen_qfiledialog.h | 67 +- qt/gen_qfileiconprovider.cpp | 128 +- qt/gen_qfileiconprovider.go | 109 +- qt/gen_qfileiconprovider.h | 10 +- qt/gen_qfileinfo.cpp | 33 +- qt/gen_qfileinfo.go | 53 +- qt/gen_qfileinfo.h | 12 +- qt/gen_qfileselector.cpp | 261 +- qt/gen_qfileselector.go | 206 +- qt/gen_qfileselector.h | 28 +- qt/gen_qfilesystemmodel.cpp | 1431 +++- qt/gen_qfilesystemmodel.go | 1189 ++- qt/gen_qfilesystemmodel.h | 114 +- qt/gen_qfilesystemwatcher.cpp | 275 +- qt/gen_qfilesystemwatcher.go | 224 +- qt/gen_qfilesystemwatcher.h | 32 +- qt/gen_qfinalstate.cpp | 130 +- qt/gen_qfinalstate.go | 113 +- qt/gen_qfinalstate.h | 21 +- qt/gen_qfloat16.cpp | 18 +- qt/gen_qfloat16.go | 29 +- qt/gen_qfloat16.h | 6 +- qt/gen_qfocusframe.cpp | 1396 +++- qt/gen_qfocusframe.go | 1038 ++- qt/gen_qfocusframe.h | 147 +- qt/gen_qfont.cpp | 48 +- qt/gen_qfont.go | 77 +- qt/gen_qfont.h | 18 +- qt/gen_qfontcombobox.cpp | 686 +- qt/gen_qfontcombobox.go | 510 +- qt/gen_qfontcombobox.h | 77 +- qt/gen_qfontdatabase.cpp | 13 +- qt/gen_qfontdatabase.go | 21 +- qt/gen_qfontdatabase.h | 4 +- qt/gen_qfontdialog.cpp | 541 +- qt/gen_qfontdialog.go | 411 +- qt/gen_qfontdialog.h | 63 +- qt/gen_qfontinfo.cpp | 18 +- qt/gen_qfontinfo.go | 29 +- qt/gen_qfontinfo.h | 6 +- qt/gen_qfontmetrics.cpp | 51 +- qt/gen_qfontmetrics.go | 82 +- qt/gen_qfontmetrics.h | 18 +- qt/gen_qformlayout.cpp | 599 +- qt/gen_qformlayout.go | 479 +- qt/gen_qformlayout.h | 48 +- qt/gen_qframe.cpp | 1372 +++- qt/gen_qframe.go | 1021 ++- qt/gen_qframe.h | 145 +- qt/gen_qfutureinterface.cpp | 23 +- qt/gen_qfutureinterface.go | 41 +- qt/gen_qfutureinterface.h | 8 +- qt/gen_qfuturewatcher.cpp | 10 +- qt/gen_qfuturewatcher.go | 21 +- qt/gen_qfuturewatcher.h | 8 +- qt/gen_qgenericplugin.cpp | 8 +- qt/gen_qgenericplugin.go | 21 +- qt/gen_qgenericplugin.h | 2 +- qt/gen_qgenericpluginfactory.cpp | 8 +- qt/gen_qgenericpluginfactory.go | 13 +- qt/gen_qgenericpluginfactory.h | 2 +- qt/gen_qgesture.cpp | 391 +- qt/gen_qgesture.go | 460 +- qt/gen_qgesture.h | 64 +- qt/gen_qgesturerecognizer.cpp | 8 +- qt/gen_qgesturerecognizer.go | 15 +- qt/gen_qgesturerecognizer.h | 2 +- qt/gen_qglyphrun.cpp | 18 +- qt/gen_qglyphrun.go | 29 +- qt/gen_qglyphrun.h | 6 +- qt/gen_qgraphicsanchorlayout.cpp | 339 +- qt/gen_qgraphicsanchorlayout.go | 281 +- qt/gen_qgraphicsanchorlayout.h | 35 +- qt/gen_qgraphicseffect.cpp | 547 +- qt/gen_qgraphicseffect.go | 481 +- qt/gen_qgraphicseffect.h | 58 +- qt/gen_qgraphicsgridlayout.cpp | 333 +- qt/gen_qgraphicsgridlayout.go | 257 +- qt/gen_qgraphicsgridlayout.h | 31 +- qt/gen_qgraphicsitem.cpp | 7273 +++++++++++++++-- qt/gen_qgraphicsitem.go | 6411 +++++++++++++-- qt/gen_qgraphicsitem.h | 586 +- qt/gen_qgraphicsitemanimation.cpp | 327 +- qt/gen_qgraphicsitemanimation.go | 254 +- qt/gen_qgraphicsitemanimation.h | 34 +- qt/gen_qgraphicslayout.cpp | 8 +- qt/gen_qgraphicslayout.go | 21 +- qt/gen_qgraphicslayout.h | 2 +- qt/gen_qgraphicslayoutitem.cpp | 8 +- qt/gen_qgraphicslayoutitem.go | 13 +- qt/gen_qgraphicslayoutitem.h | 3 +- qt/gen_qgraphicslinearlayout.cpp | 353 +- qt/gen_qgraphicslinearlayout.go | 281 +- qt/gen_qgraphicslinearlayout.h | 35 +- qt/gen_qgraphicsproxywidget.cpp | 1627 +++- qt/gen_qgraphicsproxywidget.go | 1221 ++- qt/gen_qgraphicsproxywidget.h | 179 +- qt/gen_qgraphicsscene.cpp | 918 ++- qt/gen_qgraphicsscene.go | 745 +- qt/gen_qgraphicsscene.h | 108 +- qt/gen_qgraphicssceneevent.cpp | 177 +- qt/gen_qgraphicssceneevent.go | 344 +- qt/gen_qgraphicssceneevent.h | 50 +- qt/gen_qgraphicstransform.cpp | 152 +- qt/gen_qgraphicstransform.go | 149 +- qt/gen_qgraphicstransform.h | 18 +- qt/gen_qgraphicsview.cpp | 1038 ++- qt/gen_qgraphicsview.go | 789 +- qt/gen_qgraphicsview.h | 131 +- qt/gen_qgraphicswidget.cpp | 1115 ++- qt/gen_qgraphicswidget.go | 855 +- qt/gen_qgraphicswidget.h | 131 +- qt/gen_qgridlayout.cpp | 622 +- qt/gen_qgridlayout.go | 487 +- qt/gen_qgridlayout.h | 49 +- qt/gen_qgroupbox.cpp | 1420 +++- qt/gen_qgroupbox.go | 1054 ++- qt/gen_qgroupbox.h | 157 +- qt/gen_qguiapplication.cpp | 124 +- qt/gen_qguiapplication.go | 126 +- qt/gen_qguiapplication.h | 13 +- qt/gen_qhashfunctions.cpp | 26 +- qt/gen_qhashfunctions.go | 42 +- qt/gen_qhashfunctions.h | 8 +- qt/gen_qheaderview.cpp | 2131 ++++- qt/gen_qheaderview.go | 1560 +++- qt/gen_qheaderview.h | 198 +- qt/gen_qhistorystate.cpp | 145 +- qt/gen_qhistorystate.go | 137 +- qt/gen_qhistorystate.h | 23 +- qt/gen_qicon.cpp | 33 +- qt/gen_qicon.go | 77 +- qt/gen_qicon.h | 12 +- qt/gen_qiconengine.cpp | 62 +- qt/gen_qiconengine.go | 89 +- qt/gen_qiconengine.h | 14 +- qt/gen_qiconengineplugin.cpp | 19 +- qt/gen_qiconengineplugin.go | 37 +- qt/gen_qiconengineplugin.h | 7 +- qt/gen_qidentityproxymodel.cpp | 1412 +++- qt/gen_qidentityproxymodel.go | 1149 ++- qt/gen_qidentityproxymodel.h | 110 +- qt/gen_qimage.cpp | 273 +- qt/gen_qimage.go | 322 +- qt/gen_qimage.h | 39 +- qt/gen_qimageiohandler.cpp | 27 +- qt/gen_qimageiohandler.go | 50 +- qt/gen_qimageiohandler.h | 9 +- qt/gen_qimagereader.cpp | 33 +- qt/gen_qimagereader.go | 57 +- qt/gen_qimagereader.h | 12 +- qt/gen_qimagewriter.cpp | 28 +- qt/gen_qimagewriter.go | 47 +- qt/gen_qimagewriter.h | 10 +- qt/gen_qinputdialog.cpp | 506 +- qt/gen_qinputdialog.go | 376 +- qt/gen_qinputdialog.h | 54 +- qt/gen_qinputmethod.cpp | 1 + qt/gen_qinputmethod.go | 19 +- qt/gen_qinputmethod.h | 2 + qt/gen_qiodevice.cpp | 9 +- qt/gen_qiodevice.go | 21 +- qt/gen_qiodevice.h | 7 +- qt/gen_qitemdelegate.cpp | 613 +- qt/gen_qitemdelegate.go | 448 +- qt/gen_qitemdelegate.h | 54 +- qt/gen_qitemeditorfactory.cpp | 105 +- qt/gen_qitemeditorfactory.go | 103 +- qt/gen_qitemeditorfactory.h | 12 +- qt/gen_qitemselectionmodel.cpp | 469 +- qt/gen_qitemselectionmodel.go | 375 +- qt/gen_qitemselectionmodel.h | 50 +- qt/gen_qjsonarray.cpp | 69 +- qt/gen_qjsonarray.go | 111 +- qt/gen_qjsonarray.h | 24 +- qt/gen_qjsondocument.cpp | 36 +- qt/gen_qjsondocument.go | 58 +- qt/gen_qjsondocument.h | 12 +- qt/gen_qjsonobject.cpp | 69 +- qt/gen_qjsonobject.go | 111 +- qt/gen_qjsonobject.h | 24 +- qt/gen_qjsonvalue.cpp | 127 +- qt/gen_qjsonvalue.go | 204 +- qt/gen_qjsonvalue.h | 46 +- qt/gen_qkeyeventtransition.cpp | 149 +- qt/gen_qkeyeventtransition.go | 139 +- qt/gen_qkeyeventtransition.h | 24 +- qt/gen_qkeysequence.cpp | 53 +- qt/gen_qkeysequence.go | 85 +- qt/gen_qkeysequence.h | 20 +- qt/gen_qkeysequenceedit.cpp | 1419 +++- qt/gen_qkeysequenceedit.go | 1054 ++- qt/gen_qkeysequenceedit.h | 154 +- qt/gen_qlabel.cpp | 530 +- qt/gen_qlabel.go | 437 +- qt/gen_qlabel.h | 71 +- qt/gen_qlayout.cpp | 10 +- qt/gen_qlayout.go | 29 +- qt/gen_qlayout.h | 7 +- qt/gen_qlayoutitem.cpp | 1354 ++- qt/gen_qlayoutitem.go | 1087 ++- qt/gen_qlayoutitem.h | 102 +- qt/gen_qlcdnumber.cpp | 188 +- qt/gen_qlcdnumber.go | 165 +- qt/gen_qlcdnumber.h | 30 +- qt/gen_qlibrary.cpp | 303 +- qt/gen_qlibrary.go | 260 +- qt/gen_qlibrary.h | 40 +- qt/gen_qlibraryinfo.cpp | 8 +- qt/gen_qlibraryinfo.go | 13 +- qt/gen_qlibraryinfo.h | 2 +- qt/gen_qline.cpp | 61 +- qt/gen_qline.go | 98 +- qt/gen_qline.h | 22 +- qt/gen_qlineedit.cpp | 1392 +++- qt/gen_qlineedit.go | 1039 ++- qt/gen_qlineedit.h | 153 +- qt/gen_qlinkedlist.cpp | 13 +- qt/gen_qlinkedlist.go | 21 +- qt/gen_qlinkedlist.h | 4 +- qt/gen_qlistview.cpp | 2018 ++++- qt/gen_qlistview.go | 1486 +++- qt/gen_qlistview.h | 196 +- qt/gen_qlistwidget.cpp | 1824 ++++- qt/gen_qlistwidget.go | 1232 ++- qt/gen_qlistwidget.h | 153 +- qt/gen_qlocale.cpp | 38 +- qt/gen_qlocale.go | 61 +- qt/gen_qlocale.h | 14 +- qt/gen_qlockfile.cpp | 13 +- qt/gen_qlockfile.go | 21 +- qt/gen_qlockfile.h | 4 +- qt/gen_qloggingcategory.cpp | 13 +- qt/gen_qloggingcategory.go | 21 +- qt/gen_qloggingcategory.h | 4 +- qt/gen_qmainwindow.cpp | 1406 +++- qt/gen_qmainwindow.go | 1059 ++- qt/gen_qmainwindow.h | 142 +- qt/gen_qmargins.cpp | 51 +- qt/gen_qmargins.go | 82 +- qt/gen_qmargins.h | 18 +- qt/gen_qmatrix.cpp | 28 +- qt/gen_qmatrix.go | 45 +- qt/gen_qmatrix.h | 10 +- qt/gen_qmatrix4x4.cpp | 48 +- qt/gen_qmatrix4x4.go | 77 +- qt/gen_qmatrix4x4.h | 18 +- qt/gen_qmdiarea.cpp | 819 +- qt/gen_qmdiarea.go | 628 +- qt/gen_qmdiarea.h | 100 +- qt/gen_qmdisubwindow.cpp | 1474 +++- qt/gen_qmdisubwindow.go | 1102 ++- qt/gen_qmdisubwindow.h | 172 +- qt/gen_qmenu.cpp | 1421 +++- qt/gen_qmenu.go | 1102 ++- qt/gen_qmenu.h | 160 +- qt/gen_qmenubar.cpp | 1431 +++- qt/gen_qmenubar.go | 1084 ++- qt/gen_qmenubar.h | 158 +- qt/gen_qmessageauthenticationcode.cpp | 18 +- qt/gen_qmessageauthenticationcode.go | 29 +- qt/gen_qmessageauthenticationcode.h | 6 +- qt/gen_qmessagebox.cpp | 620 +- qt/gen_qmessagebox.go | 518 +- qt/gen_qmessagebox.h | 78 +- qt/gen_qmetaobject.cpp | 62 +- qt/gen_qmetaobject.go | 100 +- qt/gen_qmetaobject.h | 20 +- qt/gen_qmetatype.cpp | 137 +- qt/gen_qmetatype.go | 221 +- qt/gen_qmetatype.h | 44 +- qt/gen_qmimedata.cpp | 388 +- qt/gen_qmimedata.go | 306 +- qt/gen_qmimedata.h | 35 +- qt/gen_qmimedatabase.cpp | 13 +- qt/gen_qmimedatabase.go | 21 +- qt/gen_qmimedatabase.h | 4 +- qt/gen_qmimetype.cpp | 18 +- qt/gen_qmimetype.go | 29 +- qt/gen_qmimetype.h | 6 +- qt/gen_qmouseeventtransition.cpp | 149 +- qt/gen_qmouseeventtransition.go | 139 +- qt/gen_qmouseeventtransition.h | 24 +- qt/gen_qmovie.cpp | 317 +- qt/gen_qmovie.go | 265 +- qt/gen_qmovie.h | 40 +- qt/gen_qmutex.cpp | 64 +- qt/gen_qmutex.go | 112 +- qt/gen_qmutex.h | 20 +- qt/gen_qnamespace.cpp | 8 +- qt/gen_qnamespace.go | 13 +- qt/gen_qnamespace.h | 2 +- qt/gen_qobject.cpp | 300 +- qt/gen_qobject.go | 260 +- qt/gen_qobject.h | 41 +- qt/gen_qobjectcleanuphandler.cpp | 254 +- qt/gen_qobjectcleanuphandler.go | 197 +- qt/gen_qobjectcleanuphandler.h | 26 +- qt/gen_qobjectdefs.cpp | 119 +- qt/gen_qobjectdefs.go | 197 +- qt/gen_qobjectdefs.h | 40 +- qt/gen_qoffscreensurface.cpp | 365 +- qt/gen_qoffscreensurface.go | 295 +- qt/gen_qoffscreensurface.h | 38 +- qt/gen_qoperatingsystemversion.cpp | 23 +- qt/gen_qoperatingsystemversion.go | 37 +- qt/gen_qoperatingsystemversion.h | 8 +- qt/gen_qpagedpaintdevice.cpp | 17 +- qt/gen_qpagedpaintdevice.go | 34 +- qt/gen_qpagedpaintdevice.h | 6 +- qt/gen_qpagelayout.cpp | 33 +- qt/gen_qpagelayout.go | 53 +- qt/gen_qpagelayout.h | 12 +- qt/gen_qpagesize.cpp | 53 +- qt/gen_qpagesize.go | 85 +- qt/gen_qpagesize.h | 20 +- qt/gen_qpaintdevice.cpp | 10 +- qt/gen_qpaintdevice.go | 13 +- qt/gen_qpaintdevice.h | 10 +- qt/gen_qpaintdevicewindow.cpp | 15 +- qt/gen_qpaintdevicewindow.go | 23 +- qt/gen_qpaintdevicewindow.h | 20 +- qt/gen_qpaintengine.cpp | 32 +- qt/gen_qpaintengine.go | 47 +- qt/gen_qpaintengine.h | 9 +- qt/gen_qpainter.cpp | 26 +- qt/gen_qpainter.go | 42 +- qt/gen_qpainter.h | 8 +- qt/gen_qpainterpath.cpp | 49 +- qt/gen_qpainterpath.go | 79 +- qt/gen_qpainterpath.h | 16 +- qt/gen_qpalette.cpp | 43 +- qt/gen_qpalette.go | 69 +- qt/gen_qpalette.h | 16 +- qt/gen_qparallelanimationgroup.cpp | 198 +- qt/gen_qparallelanimationgroup.go | 162 +- qt/gen_qparallelanimationgroup.h | 26 +- qt/gen_qpauseanimation.cpp | 211 +- qt/gen_qpauseanimation.go | 180 +- qt/gen_qpauseanimation.h | 26 +- qt/gen_qpdfwriter.cpp | 462 +- qt/gen_qpdfwriter.go | 349 +- qt/gen_qpdfwriter.h | 50 +- qt/gen_qpen.cpp | 48 +- qt/gen_qpen.go | 77 +- qt/gen_qpen.h | 18 +- qt/gen_qpicture.cpp | 281 +- qt/gen_qpicture.go | 254 +- qt/gen_qpicture.h | 35 +- qt/gen_qpictureformatplugin.cpp | 9 +- qt/gen_qpictureformatplugin.go | 21 +- qt/gen_qpictureformatplugin.h | 4 +- qt/gen_qpixelformat.cpp | 33 +- qt/gen_qpixelformat.go | 53 +- qt/gen_qpixelformat.h | 12 +- qt/gen_qpixmap.cpp | 251 +- qt/gen_qpixmap.go | 297 +- qt/gen_qpixmap.h | 31 +- qt/gen_qpixmapcache.cpp | 26 +- qt/gen_qpixmapcache.go | 44 +- qt/gen_qpixmapcache.h | 8 +- qt/gen_qplaintextedit.cpp | 1809 +++- qt/gen_qplaintextedit.go | 1424 +++- qt/gen_qplaintextedit.h | 180 +- qt/gen_qplugin.cpp | 8 +- qt/gen_qplugin.go | 13 +- qt/gen_qplugin.h | 2 +- qt/gen_qpluginloader.cpp | 275 +- qt/gen_qpluginloader.go | 224 +- qt/gen_qpluginloader.h | 32 +- qt/gen_qpoint.cpp | 51 +- qt/gen_qpoint.go | 82 +- qt/gen_qpoint.h | 18 +- qt/gen_qprocess.cpp | 617 +- qt/gen_qprocess.go | 500 +- qt/gen_qprocess.h | 60 +- qt/gen_qprogressbar.cpp | 1403 +++- qt/gen_qprogressbar.go | 1037 ++- qt/gen_qprogressbar.h | 144 +- qt/gen_qprogressdialog.cpp | 558 +- qt/gen_qprogressdialog.go | 435 +- qt/gen_qprogressdialog.h | 66 +- qt/gen_qpropertyanimation.cpp | 256 +- qt/gen_qpropertyanimation.go | 214 +- qt/gen_qpropertyanimation.h | 33 +- qt/gen_qproxystyle.cpp | 949 ++- qt/gen_qproxystyle.go | 782 +- qt/gen_qproxystyle.h | 98 +- qt/gen_qpushbutton.cpp | 592 +- qt/gen_qpushbutton.go | 466 +- qt/gen_qpushbutton.h | 72 +- qt/gen_qquaternion.cpp | 38 +- qt/gen_qquaternion.go | 61 +- qt/gen_qquaternion.h | 14 +- qt/gen_qradiobutton.cpp | 572 +- qt/gen_qradiobutton.go | 440 +- qt/gen_qradiobutton.h | 66 +- qt/gen_qrandom.cpp | 77 +- qt/gen_qrandom.go | 134 +- qt/gen_qrandom.h | 26 +- qt/gen_qrasterwindow.cpp | 204 +- qt/gen_qrasterwindow.go | 168 +- qt/gen_qrasterwindow.h | 34 +- qt/gen_qrawfont.cpp | 38 +- qt/gen_qrawfont.go | 67 +- qt/gen_qrawfont.h | 14 +- qt/gen_qreadwritelock.cpp | 44 +- qt/gen_qreadwritelock.go | 71 +- qt/gen_qreadwritelock.h | 14 +- qt/gen_qrect.cpp | 71 +- qt/gen_qrect.go | 114 +- qt/gen_qrect.h | 26 +- qt/gen_qrefcount.cpp | 8 +- qt/gen_qrefcount.go | 13 +- qt/gen_qrefcount.h | 2 +- qt/gen_qregexp.cpp | 33 +- qt/gen_qregexp.go | 53 +- qt/gen_qregexp.h | 12 +- qt/gen_qregion.cpp | 43 +- qt/gen_qregion.go | 69 +- qt/gen_qregion.h | 16 +- qt/gen_qregularexpression.cpp | 64 +- qt/gen_qregularexpression.go | 103 +- qt/gen_qregularexpression.h | 22 +- qt/gen_qresource.cpp | 23 +- qt/gen_qresource.go | 37 +- qt/gen_qresource.h | 8 +- qt/gen_qresultstore.cpp | 49 +- qt/gen_qresultstore.go | 79 +- qt/gen_qresultstore.h | 16 +- qt/gen_qrgba64.cpp | 18 +- qt/gen_qrgba64.go | 29 +- qt/gen_qrgba64.h | 6 +- qt/gen_qrubberband.cpp | 1362 ++- qt/gen_qrubberband.go | 1010 ++- qt/gen_qrubberband.h | 144 +- qt/gen_qrunnable.cpp | 8 +- qt/gen_qrunnable.go | 13 +- qt/gen_qrunnable.h | 2 +- qt/gen_qsavefile.cpp | 475 +- qt/gen_qsavefile.go | 394 +- qt/gen_qsavefile.h | 41 +- qt/gen_qscopedpointer.cpp | 8 +- qt/gen_qscopedpointer.go | 13 +- qt/gen_qscopedpointer.h | 2 +- qt/gen_qscreen.cpp | 9 +- qt/gen_qscreen.go | 35 +- qt/gen_qscreen.h | 4 +- qt/gen_qscrollarea.cpp | 749 +- qt/gen_qscrollarea.go | 575 +- qt/gen_qscrollarea.h | 85 +- qt/gen_qscrollbar.cpp | 480 +- qt/gen_qscrollbar.go | 373 +- qt/gen_qscrollbar.h | 64 +- qt/gen_qscroller.go | 25 +- qt/gen_qscrollerproperties.cpp | 18 +- qt/gen_qscrollerproperties.go | 29 +- qt/gen_qscrollerproperties.h | 6 +- qt/gen_qsemaphore.cpp | 51 +- qt/gen_qsemaphore.go | 82 +- qt/gen_qsemaphore.h | 18 +- qt/gen_qsequentialanimationgroup.cpp | 199 +- qt/gen_qsequentialanimationgroup.go | 169 +- qt/gen_qsequentialanimationgroup.h | 24 +- qt/gen_qsessionmanager.cpp | 1 + qt/gen_qsessionmanager.go | 19 +- qt/gen_qsessionmanager.h | 2 + qt/gen_qsettings.cpp | 352 +- qt/gen_qsettings.go | 323 +- qt/gen_qsettings.h | 55 +- qt/gen_qshareddata.cpp | 18 +- qt/gen_qshareddata.go | 29 +- qt/gen_qshareddata.h | 6 +- qt/gen_qsharedmemory.cpp | 275 +- qt/gen_qsharedmemory.go | 224 +- qt/gen_qsharedmemory.h | 32 +- qt/gen_qshortcut.cpp | 287 +- qt/gen_qshortcut.go | 234 +- qt/gen_qshortcut.h | 37 +- qt/gen_qsignalmapper.cpp | 277 +- qt/gen_qsignalmapper.go | 209 +- qt/gen_qsignalmapper.h | 28 +- qt/gen_qsignaltransition.cpp | 144 +- qt/gen_qsignaltransition.go | 135 +- qt/gen_qsignaltransition.h | 23 +- qt/gen_qsize.cpp | 51 +- qt/gen_qsize.go | 82 +- qt/gen_qsize.h | 18 +- qt/gen_qsizegrip.cpp | 1386 +++- qt/gen_qsizegrip.go | 1025 ++- qt/gen_qsizegrip.h | 149 +- qt/gen_qsizepolicy.cpp | 28 +- qt/gen_qsizepolicy.go | 45 +- qt/gen_qsizepolicy.h | 10 +- qt/gen_qslider.cpp | 444 +- qt/gen_qslider.go | 352 +- qt/gen_qslider.h | 54 +- qt/gen_qsocketnotifier.cpp | 289 +- qt/gen_qsocketnotifier.go | 247 +- qt/gen_qsocketnotifier.h | 37 +- qt/gen_qsortfilterproxymodel.cpp | 1471 +++- qt/gen_qsortfilterproxymodel.go | 1209 ++- qt/gen_qsortfilterproxymodel.h | 128 +- qt/gen_qspinbox.cpp | 2169 ++++- qt/gen_qspinbox.go | 1850 ++++- qt/gen_qspinbox.h | 159 +- qt/gen_qsplashscreen.cpp | 1461 +++- qt/gen_qsplashscreen.go | 1111 ++- qt/gen_qsplashscreen.h | 161 +- qt/gen_qsplitter.cpp | 1800 +++- qt/gen_qsplitter.go | 1263 ++- qt/gen_qsplitter.h | 177 +- qt/gen_qstackedlayout.cpp | 604 +- qt/gen_qstackedlayout.go | 476 +- qt/gen_qstackedlayout.h | 48 +- qt/gen_qstackedwidget.cpp | 171 +- qt/gen_qstackedwidget.go | 145 +- qt/gen_qstackedwidget.h | 27 +- qt/gen_qstandarditemmodel.cpp | 2060 ++++- qt/gen_qstandarditemmodel.go | 1469 +++- qt/gen_qstandarditemmodel.h | 151 +- qt/gen_qstandardpaths.go | 11 +- qt/gen_qstate.cpp | 144 +- qt/gen_qstate.go | 143 +- qt/gen_qstate.h | 21 +- qt/gen_qstatemachine.cpp | 344 +- qt/gen_qstatemachine.go | 327 +- qt/gen_qstatemachine.h | 45 +- qt/gen_qstatictext.cpp | 23 +- qt/gen_qstatictext.go | 37 +- qt/gen_qstatictext.h | 8 +- qt/gen_qstatusbar.cpp | 1366 +++- qt/gen_qstatusbar.go | 1009 ++- qt/gen_qstatusbar.h | 146 +- qt/gen_qstorageinfo.cpp | 28 +- qt/gen_qstorageinfo.go | 45 +- qt/gen_qstorageinfo.h | 10 +- qt/gen_qstringbuilder.cpp | 8 +- qt/gen_qstringbuilder.go | 13 +- qt/gen_qstringbuilder.h | 2 +- qt/gen_qstringlistmodel.cpp | 606 +- qt/gen_qstringlistmodel.go | 534 +- qt/gen_qstringlistmodel.h | 62 +- qt/gen_qstringliteral.cpp | 8 +- qt/gen_qstringliteral.go | 13 +- qt/gen_qstringliteral.h | 2 +- qt/gen_qstringmatcher.cpp | 38 +- qt/gen_qstringmatcher.go | 61 +- qt/gen_qstringmatcher.h | 14 +- qt/gen_qstringview.cpp | 13 +- qt/gen_qstringview.go | 21 +- qt/gen_qstringview.h | 4 +- qt/gen_qstyle.cpp | 139 +- qt/gen_qstyle.go | 180 +- qt/gen_qstyle.h | 49 +- qt/gen_qstyleditemdelegate.cpp | 524 +- qt/gen_qstyleditemdelegate.go | 394 +- qt/gen_qstyleditemdelegate.h | 43 +- qt/gen_qstylefactory.cpp | 8 +- qt/gen_qstylefactory.go | 15 +- qt/gen_qstylefactory.h | 2 +- qt/gen_qstylehints.cpp | 9 +- qt/gen_qstylehints.go | 21 +- qt/gen_qstylehints.h | 4 +- qt/gen_qstyleoption.cpp | 604 +- qt/gen_qstyleoption.go | 1138 ++- qt/gen_qstyleoption.h | 180 +- qt/gen_qstylepainter.cpp | 27 +- qt/gen_qstylepainter.go | 50 +- qt/gen_qstylepainter.h | 10 +- qt/gen_qstyleplugin.cpp | 9 +- qt/gen_qstyleplugin.go | 23 +- qt/gen_qstyleplugin.h | 4 +- qt/gen_qsurface.cpp | 8 +- qt/gen_qsurface.go | 13 +- qt/gen_qsurface.h | 2 +- qt/gen_qsurfaceformat.cpp | 23 +- qt/gen_qsurfaceformat.go | 37 +- qt/gen_qsurfaceformat.h | 8 +- qt/gen_qsyntaxhighlighter.cpp | 9 +- qt/gen_qsyntaxhighlighter.go | 23 +- qt/gen_qsyntaxhighlighter.h | 5 +- qt/gen_qsystemsemaphore.cpp | 23 +- qt/gen_qsystemsemaphore.go | 37 +- qt/gen_qsystemsemaphore.h | 8 +- qt/gen_qsystemtrayicon.cpp | 279 +- qt/gen_qsystemtrayicon.go | 225 +- qt/gen_qsystemtrayicon.h | 33 +- qt/gen_qtabbar.cpp | 1561 +++- qt/gen_qtabbar.go | 1156 ++- qt/gen_qtabbar.h | 167 +- qt/gen_qtableview.cpp | 1983 ++++- qt/gen_qtableview.go | 1468 +++- qt/gen_qtableview.h | 182 +- qt/gen_qtablewidget.cpp | 1376 +++- qt/gen_qtablewidget.go | 1080 ++- qt/gen_qtablewidget.h | 138 +- qt/gen_qtabwidget.cpp | 1435 +++- qt/gen_qtabwidget.go | 1065 ++- qt/gen_qtabwidget.h | 152 +- qt/gen_qtemporarydir.cpp | 18 +- qt/gen_qtemporarydir.go | 29 +- qt/gen_qtemporarydir.h | 6 +- qt/gen_qtemporaryfile.cpp | 254 +- qt/gen_qtemporaryfile.go | 225 +- qt/gen_qtemporaryfile.h | 27 +- qt/gen_qtextboundaryfinder.cpp | 38 +- qt/gen_qtextboundaryfinder.go | 61 +- qt/gen_qtextboundaryfinder.h | 14 +- qt/gen_qtextbrowser.cpp | 1162 ++- qt/gen_qtextbrowser.go | 837 +- qt/gen_qtextbrowser.h | 126 +- qt/gen_qtextcodec.cpp | 54 +- qt/gen_qtextcodec.go | 98 +- qt/gen_qtextcodec.h | 20 +- qt/gen_qtextcursor.cpp | 33 +- qt/gen_qtextcursor.go | 81 +- qt/gen_qtextcursor.h | 12 +- qt/gen_qtextdocument.cpp | 401 +- qt/gen_qtextdocument.go | 324 +- qt/gen_qtextdocument.h | 42 +- qt/gen_qtextdocumentfragment.cpp | 28 +- qt/gen_qtextdocumentfragment.go | 45 +- qt/gen_qtextdocumentfragment.h | 10 +- qt/gen_qtextdocumentwriter.cpp | 28 +- qt/gen_qtextdocumentwriter.go | 47 +- qt/gen_qtextdocumentwriter.h | 10 +- qt/gen_qtextedit.cpp | 1221 ++- qt/gen_qtextedit.go | 988 ++- qt/gen_qtextedit.h | 153 +- qt/gen_qtextformat.cpp | 171 +- qt/gen_qtextformat.go | 337 +- qt/gen_qtextformat.h | 52 +- qt/gen_qtextlayout.cpp | 67 +- qt/gen_qtextlayout.go | 108 +- qt/gen_qtextlayout.h | 22 +- qt/gen_qtextlist.cpp | 130 +- qt/gen_qtextlist.go | 104 +- qt/gen_qtextlist.h | 16 +- qt/gen_qtextobject.cpp | 104 +- qt/gen_qtextobject.go | 233 +- qt/gen_qtextobject.h | 37 +- qt/gen_qtextoption.cpp | 51 +- qt/gen_qtextoption.go | 82 +- qt/gen_qtextoption.h | 18 +- qt/gen_qtextstream.cpp | 28 +- qt/gen_qtextstream.go | 47 +- qt/gen_qtextstream.h | 10 +- qt/gen_qtexttable.cpp | 37 +- qt/gen_qtexttable.go | 65 +- qt/gen_qtexttable.h | 16 +- qt/gen_qthread.cpp | 291 +- qt/gen_qthread.go | 230 +- qt/gen_qthread.h | 29 +- qt/gen_qthreadpool.cpp | 261 +- qt/gen_qthreadpool.go | 208 +- qt/gen_qthreadpool.h | 28 +- qt/gen_qthreadstorage.cpp | 13 +- qt/gen_qthreadstorage.go | 21 +- qt/gen_qthreadstorage.h | 4 +- qt/gen_qtimeline.cpp | 300 +- qt/gen_qtimeline.go | 240 +- qt/gen_qtimeline.h | 33 +- qt/gen_qtimer.cpp | 261 +- qt/gen_qtimer.go | 206 +- qt/gen_qtimer.h | 29 +- qt/gen_qtimezone.cpp | 56 +- qt/gen_qtimezone.go | 90 +- qt/gen_qtimezone.h | 20 +- qt/gen_qtoolbar.cpp | 1396 +++- qt/gen_qtoolbar.go | 1053 ++- qt/gen_qtoolbar.h | 146 +- qt/gen_qtoolbox.cpp | 276 +- qt/gen_qtoolbox.go | 226 +- qt/gen_qtoolbox.h | 41 +- qt/gen_qtoolbutton.cpp | 651 +- qt/gen_qtoolbutton.go | 490 +- qt/gen_qtoolbutton.h | 77 +- qt/gen_qtooltip.cpp | 8 +- qt/gen_qtooltip.go | 13 +- qt/gen_qtooltip.h | 2 +- qt/gen_qtouchdevice.cpp | 13 +- qt/gen_qtouchdevice.go | 21 +- qt/gen_qtouchdevice.h | 4 +- qt/gen_qtransform.cpp | 43 +- qt/gen_qtransform.go | 69 +- qt/gen_qtransform.h | 16 +- qt/gen_qtranslator.cpp | 359 +- qt/gen_qtranslator.go | 306 +- qt/gen_qtranslator.h | 36 +- qt/gen_qtransposeproxymodel.cpp | 1343 ++- qt/gen_qtransposeproxymodel.go | 1113 ++- qt/gen_qtransposeproxymodel.h | 110 +- qt/gen_qtreeview.cpp | 2477 +++++- qt/gen_qtreeview.go | 1523 +++- qt/gen_qtreeview.h | 200 +- qt/gen_qtreewidget.cpp | 2005 ++++- qt/gen_qtreewidget.go | 1418 +++- qt/gen_qtreewidget.h | 178 +- qt/gen_qtreewidgetitemiterator.cpp | 33 +- qt/gen_qtreewidgetitemiterator.go | 53 +- qt/gen_qtreewidgetitemiterator.h | 12 +- qt/gen_qundogroup.cpp | 275 +- qt/gen_qundogroup.go | 219 +- qt/gen_qundogroup.h | 28 +- qt/gen_qundostack.cpp | 436 +- qt/gen_qundostack.go | 345 +- qt/gen_qundostack.h | 46 +- qt/gen_qundoview.cpp | 1159 ++- qt/gen_qundoview.go | 882 +- qt/gen_qundoview.h | 116 +- qt/gen_qurl.cpp | 28 +- qt/gen_qurl.go | 45 +- qt/gen_qurl.h | 10 +- qt/gen_qurlquery.cpp | 28 +- qt/gen_qurlquery.go | 45 +- qt/gen_qurlquery.h | 10 +- qt/gen_quuid.cpp | 38 +- qt/gen_quuid.go | 61 +- qt/gen_quuid.h | 14 +- qt/gen_qvalidator.cpp | 613 +- qt/gen_qvalidator.go | 573 +- qt/gen_qvalidator.h | 65 +- qt/gen_qvariant.cpp | 298 +- qt/gen_qvariant.go | 478 +- qt/gen_qvariant.h | 112 +- qt/gen_qvariantanimation.cpp | 269 +- qt/gen_qvariantanimation.go | 212 +- qt/gen_qvariantanimation.h | 29 +- qt/gen_qvector2d.cpp | 48 +- qt/gen_qvector2d.go | 77 +- qt/gen_qvector2d.h | 18 +- qt/gen_qvector3d.cpp | 53 +- qt/gen_qvector3d.go | 85 +- qt/gen_qvector3d.h | 20 +- qt/gen_qvector4d.cpp | 58 +- qt/gen_qvector4d.go | 93 +- qt/gen_qvector4d.h | 22 +- qt/gen_qversionnumber.cpp | 33 +- qt/gen_qversionnumber.go | 53 +- qt/gen_qversionnumber.h | 12 +- qt/gen_qwaitcondition.cpp | 13 +- qt/gen_qwaitcondition.go | 21 +- qt/gen_qwaitcondition.h | 4 +- qt/gen_qwhatsthis.cpp | 8 +- qt/gen_qwhatsthis.go | 17 +- qt/gen_qwhatsthis.h | 2 +- qt/gen_qwidget.cpp | 1583 +++- qt/gen_qwidget.go | 1231 ++- qt/gen_qwidget.h | 185 +- qt/gen_qwidgetaction.cpp | 152 +- qt/gen_qwidgetaction.go | 134 +- qt/gen_qwidgetaction.h | 20 +- qt/gen_qwindow.cpp | 1024 ++- qt/gen_qwindow.go | 749 +- qt/gen_qwindow.h | 118 +- qt/gen_qwizard.cpp | 2337 +++++- qt/gen_qwizard.go | 1923 ++++- qt/gen_qwizard.h | 204 +- qt/gen_qxmlstream.cpp | 169 +- qt/gen_qxmlstream.go | 276 +- qt/gen_qxmlstream.h | 58 +- qt/multimedia/gen_qabstractvideobuffer.cpp | 16 +- qt/multimedia/gen_qabstractvideobuffer.go | 34 +- qt/multimedia/gen_qabstractvideobuffer.h | 4 +- qt/multimedia/gen_qabstractvideofilter.cpp | 17 +- qt/multimedia/gen_qabstractvideofilter.go | 34 +- qt/multimedia/gen_qabstractvideofilter.h | 6 +- qt/multimedia/gen_qabstractvideosurface.cpp | 25 +- qt/multimedia/gen_qabstractvideosurface.go | 35 +- qt/multimedia/gen_qabstractvideosurface.h | 7 +- qt/multimedia/gen_qaudiobuffer.cpp | 38 +- qt/multimedia/gen_qaudiobuffer.go | 61 +- qt/multimedia/gen_qaudiobuffer.h | 14 +- qt/multimedia/gen_qaudiodecoder.cpp | 206 +- qt/multimedia/gen_qaudiodecoder.go | 156 +- qt/multimedia/gen_qaudiodecoder.h | 20 +- qt/multimedia/gen_qaudiodecodercontrol.cpp | 10 +- qt/multimedia/gen_qaudiodecodercontrol.go | 23 +- qt/multimedia/gen_qaudiodecodercontrol.h | 6 +- qt/multimedia/gen_qaudiodeviceinfo.cpp | 18 +- qt/multimedia/gen_qaudiodeviceinfo.go | 29 +- qt/multimedia/gen_qaudiodeviceinfo.h | 6 +- .../gen_qaudioencodersettingscontrol.cpp | 25 +- .../gen_qaudioencodersettingscontrol.go | 35 +- .../gen_qaudioencodersettingscontrol.h | 9 +- qt/multimedia/gen_qaudioformat.cpp | 18 +- qt/multimedia/gen_qaudioformat.go | 29 +- qt/multimedia/gen_qaudioformat.h | 6 +- qt/multimedia/gen_qaudioinput.cpp | 293 +- qt/multimedia/gen_qaudioinput.go | 243 +- qt/multimedia/gen_qaudioinput.h | 36 +- .../gen_qaudioinputselectorcontrol.cpp | 10 +- .../gen_qaudioinputselectorcontrol.go | 21 +- .../gen_qaudioinputselectorcontrol.h | 6 +- qt/multimedia/gen_qaudiooutput.cpp | 293 +- qt/multimedia/gen_qaudiooutput.go | 243 +- qt/multimedia/gen_qaudiooutput.h | 36 +- .../gen_qaudiooutputselectorcontrol.cpp | 10 +- .../gen_qaudiooutputselectorcontrol.go | 21 +- .../gen_qaudiooutputselectorcontrol.h | 6 +- qt/multimedia/gen_qaudioprobe.cpp | 265 +- qt/multimedia/gen_qaudioprobe.go | 205 +- qt/multimedia/gen_qaudioprobe.h | 28 +- qt/multimedia/gen_qaudiorecorder.cpp | 102 +- qt/multimedia/gen_qaudiorecorder.go | 89 +- qt/multimedia/gen_qaudiorecorder.h | 16 +- qt/multimedia/gen_qaudiorolecontrol.cpp | 10 +- qt/multimedia/gen_qaudiorolecontrol.go | 21 +- qt/multimedia/gen_qaudiorolecontrol.h | 6 +- qt/multimedia/gen_qaudiosystem.cpp | 25 +- qt/multimedia/gen_qaudiosystem.go | 67 +- qt/multimedia/gen_qaudiosystem.h | 8 +- qt/multimedia/gen_qaudiosystemplugin.cpp | 17 +- qt/multimedia/gen_qaudiosystemplugin.go | 48 +- qt/multimedia/gen_qaudiosystemplugin.h | 6 +- qt/multimedia/gen_qcamera.cpp | 277 +- qt/multimedia/gen_qcamera.go | 257 +- qt/multimedia/gen_qcamera.h | 40 +- .../gen_qcameracapturebufferformatcontrol.cpp | 10 +- .../gen_qcameracapturebufferformatcontrol.go | 21 +- .../gen_qcameracapturebufferformatcontrol.h | 6 +- .../gen_qcameracapturedestinationcontrol.cpp | 10 +- .../gen_qcameracapturedestinationcontrol.go | 21 +- .../gen_qcameracapturedestinationcontrol.h | 6 +- qt/multimedia/gen_qcameracontrol.cpp | 10 +- qt/multimedia/gen_qcameracontrol.go | 21 +- qt/multimedia/gen_qcameracontrol.h | 6 +- qt/multimedia/gen_qcameraexposure.cpp | 1 + qt/multimedia/gen_qcameraexposure.go | 19 +- qt/multimedia/gen_qcameraexposure.h | 2 + qt/multimedia/gen_qcameraexposurecontrol.cpp | 10 +- qt/multimedia/gen_qcameraexposurecontrol.go | 21 +- qt/multimedia/gen_qcameraexposurecontrol.h | 6 +- qt/multimedia/gen_qcamerafeedbackcontrol.cpp | 10 +- qt/multimedia/gen_qcamerafeedbackcontrol.go | 21 +- qt/multimedia/gen_qcamerafeedbackcontrol.h | 6 +- qt/multimedia/gen_qcameraflashcontrol.cpp | 10 +- qt/multimedia/gen_qcameraflashcontrol.go | 21 +- qt/multimedia/gen_qcameraflashcontrol.h | 6 +- qt/multimedia/gen_qcamerafocus.cpp | 29 +- qt/multimedia/gen_qcamerafocus.go | 64 +- qt/multimedia/gen_qcamerafocus.h | 12 +- qt/multimedia/gen_qcamerafocuscontrol.cpp | 10 +- qt/multimedia/gen_qcamerafocuscontrol.go | 21 +- qt/multimedia/gen_qcamerafocuscontrol.h | 6 +- qt/multimedia/gen_qcameraimagecapture.cpp | 343 +- qt/multimedia/gen_qcameraimagecapture.go | 259 +- qt/multimedia/gen_qcameraimagecapture.h | 35 +- .../gen_qcameraimagecapturecontrol.cpp | 10 +- .../gen_qcameraimagecapturecontrol.go | 23 +- .../gen_qcameraimagecapturecontrol.h | 6 +- qt/multimedia/gen_qcameraimageprocessing.cpp | 1 + qt/multimedia/gen_qcameraimageprocessing.go | 19 +- qt/multimedia/gen_qcameraimageprocessing.h | 2 + .../gen_qcameraimageprocessingcontrol.cpp | 10 +- .../gen_qcameraimageprocessingcontrol.go | 21 +- .../gen_qcameraimageprocessingcontrol.h | 6 +- qt/multimedia/gen_qcamerainfo.cpp | 28 +- qt/multimedia/gen_qcamerainfo.go | 45 +- qt/multimedia/gen_qcamerainfo.h | 10 +- qt/multimedia/gen_qcamerainfocontrol.cpp | 10 +- qt/multimedia/gen_qcamerainfocontrol.go | 21 +- qt/multimedia/gen_qcamerainfocontrol.h | 6 +- qt/multimedia/gen_qcameralockscontrol.cpp | 10 +- qt/multimedia/gen_qcameralockscontrol.go | 21 +- qt/multimedia/gen_qcameralockscontrol.h | 6 +- qt/multimedia/gen_qcameraviewfinder.cpp | 331 +- qt/multimedia/gen_qcameraviewfinder.go | 261 +- qt/multimedia/gen_qcameraviewfinder.h | 47 +- .../gen_qcameraviewfindersettings.cpp | 18 +- .../gen_qcameraviewfindersettings.go | 29 +- qt/multimedia/gen_qcameraviewfindersettings.h | 6 +- .../gen_qcameraviewfindersettingscontrol.cpp | 18 +- .../gen_qcameraviewfindersettingscontrol.go | 42 +- .../gen_qcameraviewfindersettingscontrol.h | 8 +- qt/multimedia/gen_qcamerazoomcontrol.cpp | 10 +- qt/multimedia/gen_qcamerazoomcontrol.go | 21 +- qt/multimedia/gen_qcamerazoomcontrol.h | 6 +- qt/multimedia/gen_qcustomaudiorolecontrol.cpp | 10 +- qt/multimedia/gen_qcustomaudiorolecontrol.go | 21 +- qt/multimedia/gen_qcustomaudiorolecontrol.h | 6 +- qt/multimedia/gen_qgraphicsvideoitem.cpp | 271 +- qt/multimedia/gen_qgraphicsvideoitem.go | 229 +- qt/multimedia/gen_qgraphicsvideoitem.h | 38 +- qt/multimedia/gen_qimageencodercontrol.cpp | 25 +- qt/multimedia/gen_qimageencodercontrol.go | 38 +- qt/multimedia/gen_qimageencodercontrol.h | 9 +- qt/multimedia/gen_qmediaaudioprobecontrol.cpp | 10 +- qt/multimedia/gen_qmediaaudioprobecontrol.go | 21 +- qt/multimedia/gen_qmediaaudioprobecontrol.h | 6 +- .../gen_qmediaavailabilitycontrol.cpp | 10 +- .../gen_qmediaavailabilitycontrol.go | 21 +- qt/multimedia/gen_qmediaavailabilitycontrol.h | 6 +- qt/multimedia/gen_qmediabindableinterface.cpp | 8 +- qt/multimedia/gen_qmediabindableinterface.go | 15 +- qt/multimedia/gen_qmediabindableinterface.h | 3 +- qt/multimedia/gen_qmediacontainercontrol.cpp | 10 +- qt/multimedia/gen_qmediacontainercontrol.go | 21 +- qt/multimedia/gen_qmediacontainercontrol.h | 6 +- qt/multimedia/gen_qmediacontent.cpp | 53 +- qt/multimedia/gen_qmediacontent.go | 87 +- qt/multimedia/gen_qmediacontent.h | 20 +- qt/multimedia/gen_qmediacontrol.cpp | 9 +- qt/multimedia/gen_qmediacontrol.go | 21 +- qt/multimedia/gen_qmediacontrol.h | 4 +- qt/multimedia/gen_qmediaencodersettings.cpp | 54 +- qt/multimedia/gen_qmediaencodersettings.go | 87 +- qt/multimedia/gen_qmediaencodersettings.h | 18 +- .../gen_qmediagaplessplaybackcontrol.cpp | 10 +- .../gen_qmediagaplessplaybackcontrol.go | 21 +- .../gen_qmediagaplessplaybackcontrol.h | 6 +- .../gen_qmedianetworkaccesscontrol.cpp | 10 +- .../gen_qmedianetworkaccesscontrol.go | 21 +- .../gen_qmedianetworkaccesscontrol.h | 6 +- qt/multimedia/gen_qmediaobject.cpp | 8 +- qt/multimedia/gen_qmediaobject.go | 23 +- qt/multimedia/gen_qmediaobject.h | 2 +- qt/multimedia/gen_qmediaplayer.cpp | 230 +- qt/multimedia/gen_qmediaplayer.go | 168 +- qt/multimedia/gen_qmediaplayer.h | 22 +- qt/multimedia/gen_qmediaplayercontrol.cpp | 10 +- qt/multimedia/gen_qmediaplayercontrol.go | 23 +- qt/multimedia/gen_qmediaplayercontrol.h | 6 +- qt/multimedia/gen_qmediaplaylist.cpp | 345 +- qt/multimedia/gen_qmediaplaylist.go | 257 +- qt/multimedia/gen_qmediaplaylist.h | 35 +- qt/multimedia/gen_qmediarecorder.cpp | 351 +- qt/multimedia/gen_qmediarecorder.go | 257 +- qt/multimedia/gen_qmediarecorder.h | 35 +- qt/multimedia/gen_qmediarecordercontrol.cpp | 10 +- qt/multimedia/gen_qmediarecordercontrol.go | 21 +- qt/multimedia/gen_qmediarecordercontrol.h | 6 +- qt/multimedia/gen_qmediaresource.cpp | 38 +- qt/multimedia/gen_qmediaresource.go | 61 +- qt/multimedia/gen_qmediaresource.h | 14 +- qt/multimedia/gen_qmediaservice.cpp | 9 +- qt/multimedia/gen_qmediaservice.go | 23 +- qt/multimedia/gen_qmediaservice.h | 4 +- .../gen_qmediaserviceproviderplugin.cpp | 95 +- .../gen_qmediaserviceproviderplugin.go | 166 +- .../gen_qmediaserviceproviderplugin.h | 30 +- qt/multimedia/gen_qmediastreamscontrol.cpp | 10 +- qt/multimedia/gen_qmediastreamscontrol.go | 21 +- qt/multimedia/gen_qmediastreamscontrol.h | 6 +- qt/multimedia/gen_qmediatimerange.cpp | 51 +- qt/multimedia/gen_qmediatimerange.go | 82 +- qt/multimedia/gen_qmediatimerange.h | 18 +- qt/multimedia/gen_qmediavideoprobecontrol.cpp | 10 +- qt/multimedia/gen_qmediavideoprobecontrol.go | 21 +- qt/multimedia/gen_qmediavideoprobecontrol.h | 6 +- qt/multimedia/gen_qmetadatareadercontrol.cpp | 10 +- qt/multimedia/gen_qmetadatareadercontrol.go | 21 +- qt/multimedia/gen_qmetadatareadercontrol.h | 6 +- qt/multimedia/gen_qmetadatawritercontrol.cpp | 10 +- qt/multimedia/gen_qmetadatawritercontrol.go | 21 +- qt/multimedia/gen_qmetadatawritercontrol.h | 6 +- qt/multimedia/gen_qradiodata.cpp | 339 +- qt/multimedia/gen_qradiodata.go | 257 +- qt/multimedia/gen_qradiodata.h | 35 +- qt/multimedia/gen_qradiodatacontrol.cpp | 10 +- qt/multimedia/gen_qradiodatacontrol.go | 21 +- qt/multimedia/gen_qradiodatacontrol.h | 6 +- qt/multimedia/gen_qradiotuner.cpp | 210 +- qt/multimedia/gen_qradiotuner.go | 156 +- qt/multimedia/gen_qradiotuner.h | 20 +- qt/multimedia/gen_qradiotunercontrol.cpp | 18 +- qt/multimedia/gen_qradiotunercontrol.go | 29 +- qt/multimedia/gen_qradiotunercontrol.h | 9 +- qt/multimedia/gen_qsound.cpp | 261 +- qt/multimedia/gen_qsound.go | 206 +- qt/multimedia/gen_qsound.h | 28 +- qt/multimedia/gen_qsoundeffect.cpp | 293 +- qt/multimedia/gen_qsoundeffect.go | 223 +- qt/multimedia/gen_qsoundeffect.h | 32 +- .../gen_qvideodeviceselectorcontrol.cpp | 10 +- .../gen_qvideodeviceselectorcontrol.go | 21 +- .../gen_qvideodeviceselectorcontrol.h | 6 +- .../gen_qvideoencodersettingscontrol.cpp | 42 +- .../gen_qvideoencodersettingscontrol.go | 52 +- .../gen_qvideoencodersettingscontrol.h | 12 +- qt/multimedia/gen_qvideoframe.cpp | 28 +- qt/multimedia/gen_qvideoframe.go | 47 +- qt/multimedia/gen_qvideoframe.h | 10 +- qt/multimedia/gen_qvideoprobe.cpp | 265 +- qt/multimedia/gen_qvideoprobe.go | 205 +- qt/multimedia/gen_qvideoprobe.h | 28 +- qt/multimedia/gen_qvideorenderercontrol.cpp | 10 +- qt/multimedia/gen_qvideorenderercontrol.go | 23 +- qt/multimedia/gen_qvideorenderercontrol.h | 6 +- qt/multimedia/gen_qvideosurfaceformat.cpp | 28 +- qt/multimedia/gen_qvideosurfaceformat.go | 45 +- qt/multimedia/gen_qvideosurfaceformat.h | 10 +- qt/multimedia/gen_qvideowidget.cpp | 1437 +++- qt/multimedia/gen_qvideowidget.go | 1063 ++- qt/multimedia/gen_qvideowidget.h | 153 +- qt/multimedia/gen_qvideowidgetcontrol.cpp | 10 +- qt/multimedia/gen_qvideowidgetcontrol.go | 23 +- qt/multimedia/gen_qvideowidgetcontrol.h | 6 +- qt/multimedia/gen_qvideowindowcontrol.cpp | 10 +- qt/multimedia/gen_qvideowindowcontrol.go | 21 +- qt/multimedia/gen_qvideowindowcontrol.h | 6 +- qt/network/gen_qabstractnetworkcache.cpp | 27 +- qt/network/gen_qabstractnetworkcache.go | 54 +- qt/network/gen_qabstractnetworkcache.h | 10 +- qt/network/gen_qabstractsocket.cpp | 948 ++- qt/network/gen_qabstractsocket.go | 723 +- qt/network/gen_qabstractsocket.h | 86 +- qt/network/gen_qauthenticator.cpp | 18 +- qt/network/gen_qauthenticator.go | 29 +- qt/network/gen_qauthenticator.h | 6 +- qt/network/gen_qdnslookup.cpp | 387 +- qt/network/gen_qdnslookup.go | 386 +- qt/network/gen_qdnslookup.h | 66 +- qt/network/gen_qdtls.cpp | 545 +- qt/network/gen_qdtls.go | 447 +- qt/network/gen_qdtls.h | 56 +- qt/network/gen_qhostaddress.cpp | 56 +- qt/network/gen_qhostaddress.go | 90 +- qt/network/gen_qhostaddress.h | 20 +- qt/network/gen_qhostinfo.cpp | 23 +- qt/network/gen_qhostinfo.go | 37 +- qt/network/gen_qhostinfo.h | 8 +- qt/network/gen_qhstspolicy.cpp | 28 +- qt/network/gen_qhstspolicy.go | 45 +- qt/network/gen_qhstspolicy.h | 10 +- qt/network/gen_qhttp2configuration.cpp | 18 +- qt/network/gen_qhttp2configuration.go | 29 +- qt/network/gen_qhttp2configuration.h | 6 +- qt/network/gen_qhttpmultipart.cpp | 293 +- qt/network/gen_qhttpmultipart.go | 253 +- qt/network/gen_qhttpmultipart.h | 38 +- qt/network/gen_qlocalserver.cpp | 356 +- qt/network/gen_qlocalserver.go | 273 +- qt/network/gen_qlocalserver.h | 35 +- qt/network/gen_qlocalsocket.cpp | 566 +- qt/network/gen_qlocalsocket.go | 447 +- qt/network/gen_qlocalsocket.h | 51 +- qt/network/gen_qnetworkaccessmanager.cpp | 313 +- qt/network/gen_qnetworkaccessmanager.go | 272 +- qt/network/gen_qnetworkaccessmanager.h | 31 +- qt/network/gen_qnetworkconfigmanager.cpp | 271 +- qt/network/gen_qnetworkconfigmanager.go | 205 +- qt/network/gen_qnetworkconfigmanager.h | 28 +- qt/network/gen_qnetworkconfiguration.cpp | 18 +- qt/network/gen_qnetworkconfiguration.go | 29 +- qt/network/gen_qnetworkconfiguration.h | 6 +- qt/network/gen_qnetworkcookie.cpp | 28 +- qt/network/gen_qnetworkcookie.go | 45 +- qt/network/gen_qnetworkcookie.h | 10 +- qt/network/gen_qnetworkcookiejar.cpp | 493 +- qt/network/gen_qnetworkcookiejar.go | 389 +- qt/network/gen_qnetworkcookiejar.h | 41 +- qt/network/gen_qnetworkdatagram.cpp | 33 +- qt/network/gen_qnetworkdatagram.go | 53 +- qt/network/gen_qnetworkdatagram.h | 12 +- qt/network/gen_qnetworkdiskcache.cpp | 324 +- qt/network/gen_qnetworkdiskcache.go | 257 +- qt/network/gen_qnetworkdiskcache.h | 27 +- qt/network/gen_qnetworkinterface.cpp | 36 +- qt/network/gen_qnetworkinterface.go | 58 +- qt/network/gen_qnetworkinterface.h | 12 +- qt/network/gen_qnetworkproxy.cpp | 166 +- qt/network/gen_qnetworkproxy.go | 256 +- qt/network/gen_qnetworkproxy.h | 59 +- qt/network/gen_qnetworkreply.cpp | 10 +- qt/network/gen_qnetworkreply.go | 23 +- qt/network/gen_qnetworkreply.h | 10 +- qt/network/gen_qnetworkrequest.cpp | 23 +- qt/network/gen_qnetworkrequest.go | 37 +- qt/network/gen_qnetworkrequest.h | 8 +- qt/network/gen_qnetworksession.cpp | 275 +- qt/network/gen_qnetworksession.go | 205 +- qt/network/gen_qnetworksession.h | 30 +- qt/network/gen_qocspresponse.cpp | 18 +- qt/network/gen_qocspresponse.go | 29 +- qt/network/gen_qocspresponse.h | 6 +- qt/network/gen_qsslcertificate.cpp | 38 +- qt/network/gen_qsslcertificate.go | 61 +- qt/network/gen_qsslcertificate.h | 14 +- qt/network/gen_qsslcertificateextension.cpp | 18 +- qt/network/gen_qsslcertificateextension.go | 29 +- qt/network/gen_qsslcertificateextension.h | 6 +- qt/network/gen_qsslcipher.cpp | 28 +- qt/network/gen_qsslcipher.go | 45 +- qt/network/gen_qsslcipher.h | 10 +- qt/network/gen_qsslconfiguration.cpp | 18 +- qt/network/gen_qsslconfiguration.go | 29 +- qt/network/gen_qsslconfiguration.h | 6 +- .../gen_qssldiffiehellmanparameters.cpp | 18 +- qt/network/gen_qssldiffiehellmanparameters.go | 29 +- qt/network/gen_qssldiffiehellmanparameters.h | 6 +- qt/network/gen_qsslellipticcurve.cpp | 18 +- qt/network/gen_qsslellipticcurve.go | 29 +- qt/network/gen_qsslellipticcurve.h | 6 +- qt/network/gen_qsslerror.cpp | 28 +- qt/network/gen_qsslerror.go | 45 +- qt/network/gen_qsslerror.h | 10 +- qt/network/gen_qsslkey.cpp | 68 +- qt/network/gen_qsslkey.go | 109 +- qt/network/gen_qsslkey.h | 26 +- .../gen_qsslpresharedkeyauthenticator.cpp | 18 +- .../gen_qsslpresharedkeyauthenticator.go | 29 +- .../gen_qsslpresharedkeyauthenticator.h | 6 +- qt/network/gen_qsslsocket.cpp | 689 +- qt/network/gen_qsslsocket.go | 545 +- qt/network/gen_qsslsocket.h | 70 +- qt/network/gen_qtcpserver.cpp | 358 +- qt/network/gen_qtcpserver.go | 273 +- qt/network/gen_qtcpserver.h | 35 +- qt/network/gen_qtcpsocket.cpp | 722 +- qt/network/gen_qtcpsocket.go | 566 +- qt/network/gen_qtcpsocket.h | 54 +- qt/network/gen_qudpsocket.cpp | 722 +- qt/network/gen_qudpsocket.go | 566 +- qt/network/gen_qudpsocket.h | 54 +- qt/printsupport/gen_qabstractprintdialog.cpp | 485 +- qt/printsupport/gen_qabstractprintdialog.go | 367 +- qt/printsupport/gen_qabstractprintdialog.h | 54 +- qt/printsupport/gen_qpagesetupdialog.cpp | 505 +- qt/printsupport/gen_qpagesetupdialog.go | 391 +- qt/printsupport/gen_qpagesetupdialog.h | 58 +- qt/printsupport/gen_qprintdialog.cpp | 191 +- qt/printsupport/gen_qprintdialog.go | 163 +- qt/printsupport/gen_qprintdialog.h | 26 +- qt/printsupport/gen_qprintengine.cpp | 8 +- qt/printsupport/gen_qprintengine.go | 13 +- qt/printsupport/gen_qprintengine.h | 2 +- qt/printsupport/gen_qprinter.cpp | 273 +- qt/printsupport/gen_qprinter.go | 221 +- qt/printsupport/gen_qprinter.h | 29 +- qt/printsupport/gen_qprinterinfo.cpp | 23 +- qt/printsupport/gen_qprinterinfo.go | 37 +- qt/printsupport/gen_qprinterinfo.h | 8 +- qt/printsupport/gen_qprintpreviewdialog.cpp | 527 +- qt/printsupport/gen_qprintpreviewdialog.go | 416 +- qt/printsupport/gen_qprintpreviewdialog.h | 62 +- qt/printsupport/gen_qprintpreviewwidget.cpp | 1404 +++- qt/printsupport/gen_qprintpreviewwidget.go | 1055 ++- qt/printsupport/gen_qprintpreviewwidget.h | 150 +- qt6/cbor/gen_qcborarray.cpp | 54 +- qt6/cbor/gen_qcborarray.go | 99 +- qt6/cbor/gen_qcborarray.h | 18 +- qt6/cbor/gen_qcborcommon.cpp | 8 +- qt6/cbor/gen_qcborcommon.go | 13 +- qt6/cbor/gen_qcborcommon.h | 2 +- qt6/cbor/gen_qcbormap.cpp | 54 +- qt6/cbor/gen_qcbormap.go | 101 +- qt6/cbor/gen_qcbormap.h | 18 +- qt6/cbor/gen_qcborstreamreader.cpp | 33 +- qt6/cbor/gen_qcborstreamreader.go | 55 +- qt6/cbor/gen_qcborstreamreader.h | 12 +- qt6/cbor/gen_qcborstreamwriter.cpp | 13 +- qt6/cbor/gen_qcborstreamwriter.go | 23 +- qt6/cbor/gen_qcborstreamwriter.h | 4 +- qt6/cbor/gen_qcborvalue.cpp | 153 +- qt6/cbor/gen_qcborvalue.go | 261 +- qt6/cbor/gen_qcborvalue.h | 56 +- qt6/gen_qabstractanimation.cpp | 397 +- qt6/gen_qabstractanimation.go | 310 +- qt6/gen_qabstractanimation.h | 44 +- qt6/gen_qabstractbutton.cpp | 18 +- qt6/gen_qabstractbutton.go | 23 +- qt6/gen_qabstractbutton.h | 36 +- qt6/gen_qabstracteventdispatcher.cpp | 21 +- qt6/gen_qabstracteventdispatcher.go | 46 +- qt6/gen_qabstracteventdispatcher.h | 6 +- qt6/gen_qabstractfileiconprovider.cpp | 192 +- qt6/gen_qabstractfileiconprovider.go | 154 +- qt6/gen_qabstractfileiconprovider.h | 14 +- qt6/gen_qabstractitemdelegate.cpp | 9 +- qt6/gen_qabstractitemdelegate.go | 29 +- qt6/gen_qabstractitemdelegate.h | 4 +- qt6/gen_qabstractitemmodel.cpp | 266 +- qt6/gen_qabstractitemmodel.go | 381 +- qt6/gen_qabstractitemmodel.h | 89 +- qt6/gen_qabstractitemview.cpp | 33 +- qt6/gen_qabstractitemview.go | 81 +- qt6/gen_qabstractitemview.h | 80 +- qt6/gen_qabstractnativeeventfilter.cpp | 8 +- qt6/gen_qabstractnativeeventfilter.go | 13 +- qt6/gen_qabstractnativeeventfilter.h | 2 +- qt6/gen_qabstractproxymodel.cpp | 57 +- qt6/gen_qabstractproxymodel.go | 79 +- qt6/gen_qabstractproxymodel.h | 22 +- qt6/gen_qabstractscrollarea.cpp | 780 +- qt6/gen_qabstractscrollarea.go | 600 +- qt6/gen_qabstractscrollarea.h | 100 +- qt6/gen_qabstractslider.cpp | 1444 +++- qt6/gen_qabstractslider.go | 1064 ++- qt6/gen_qabstractslider.h | 156 +- qt6/gen_qabstractspinbox.cpp | 1606 +++- qt6/gen_qabstractspinbox.go | 1183 ++- qt6/gen_qabstractspinbox.h | 174 +- qt6/gen_qabstracttextdocumentlayout.cpp | 48 +- qt6/gen_qabstracttextdocumentlayout.go | 86 +- qt6/gen_qabstracttextdocumentlayout.h | 20 +- qt6/gen_qaccessible.cpp | 478 +- qt6/gen_qaccessible.go | 601 +- qt6/gen_qaccessible.h | 83 +- qt6/gen_qaccessible_base.cpp | 29 +- qt6/gen_qaccessible_base.go | 47 +- qt6/gen_qaccessible_base.h | 8 +- qt6/gen_qaccessiblebridge.cpp | 17 +- qt6/gen_qaccessiblebridge.go | 34 +- qt6/gen_qaccessiblebridge.h | 6 +- qt6/gen_qaccessibleobject.cpp | 471 +- qt6/gen_qaccessibleobject.go | 391 +- qt6/gen_qaccessibleobject.h | 32 +- qt6/gen_qaccessibleplugin.cpp | 8 +- qt6/gen_qaccessibleplugin.go | 21 +- qt6/gen_qaccessibleplugin.h | 2 +- qt6/gen_qaccessiblewidget.cpp | 54 +- qt6/gen_qaccessiblewidget.go | 85 +- qt6/gen_qaccessiblewidget.h | 13 +- qt6/gen_qaction.cpp | 305 +- qt6/gen_qaction.go | 243 +- qt6/gen_qaction.h | 37 +- qt6/gen_qactiongroup.cpp | 258 +- qt6/gen_qactiongroup.go | 210 +- qt6/gen_qactiongroup.h | 26 +- qt6/gen_qanimationgroup.cpp | 10 +- qt6/gen_qanimationgroup.go | 25 +- qt6/gen_qanimationgroup.h | 7 +- qt6/gen_qanystringview.cpp | 33 +- qt6/gen_qanystringview.go | 53 +- qt6/gen_qanystringview.h | 12 +- qt6/gen_qapplication.cpp | 101 +- qt6/gen_qapplication.go | 122 +- qt6/gen_qapplication.h | 15 +- qt6/gen_qarraydata.cpp | 16 +- qt6/gen_qarraydata.go | 26 +- qt6/gen_qarraydata.h | 4 +- qt6/gen_qbackingstore.cpp | 13 +- qt6/gen_qbackingstore.go | 23 +- qt6/gen_qbackingstore.h | 4 +- qt6/gen_qbasictimer.cpp | 13 +- qt6/gen_qbasictimer.go | 21 +- qt6/gen_qbasictimer.h | 4 +- qt6/gen_qbindingstorage.cpp | 21 +- qt6/gen_qbindingstorage.go | 34 +- qt6/gen_qbindingstorage.h | 6 +- qt6/gen_qbitarray.cpp | 41 +- qt6/gen_qbitarray.go | 66 +- qt6/gen_qbitarray.h | 14 +- qt6/gen_qbitmap.cpp | 166 +- qt6/gen_qbitmap.go | 172 +- qt6/gen_qbitmap.h | 26 +- qt6/gen_qboxlayout.cpp | 1842 ++++- qt6/gen_qboxlayout.go | 1572 +++- qt6/gen_qboxlayout.h | 126 +- qt6/gen_qbrush.cpp | 237 +- qt6/gen_qbrush.go | 399 +- qt6/gen_qbrush.h | 80 +- qt6/gen_qbuffer.cpp | 641 +- qt6/gen_qbuffer.go | 501 +- qt6/gen_qbuffer.h | 54 +- qt6/gen_qbuttongroup.cpp | 277 +- qt6/gen_qbuttongroup.go | 219 +- qt6/gen_qbuttongroup.h | 28 +- qt6/gen_qbytearraymatcher.cpp | 38 +- qt6/gen_qbytearraymatcher.go | 72 +- qt6/gen_qbytearraymatcher.h | 14 +- qt6/gen_qbytearrayview.cpp | 18 +- qt6/gen_qbytearrayview.go | 29 +- qt6/gen_qbytearrayview.h | 6 +- qt6/gen_qcalendar.cpp | 69 +- qt6/gen_qcalendar.go | 111 +- qt6/gen_qcalendar.h | 24 +- qt6/gen_qcalendarwidget.cpp | 1442 +++- qt6/gen_qcalendarwidget.go | 1071 ++- qt6/gen_qcalendarwidget.h | 154 +- qt6/gen_qchar.cpp | 81 +- qt6/gen_qchar.go | 130 +- qt6/gen_qchar.h | 30 +- qt6/gen_qcheckbox.cpp | 607 +- qt6/gen_qcheckbox.go | 462 +- qt6/gen_qcheckbox.h | 73 +- qt6/gen_qclipboard.cpp | 1 + qt6/gen_qclipboard.go | 31 +- qt6/gen_qclipboard.h | 2 + qt6/gen_qcollator.cpp | 36 +- qt6/gen_qcollator.go | 58 +- qt6/gen_qcollator.h | 12 +- qt6/gen_qcolor.cpp | 68 +- qt6/gen_qcolor.go | 109 +- qt6/gen_qcolor.h | 26 +- qt6/gen_qcolordialog.cpp | 541 +- qt6/gen_qcolordialog.go | 411 +- qt6/gen_qcolordialog.h | 62 +- qt6/gen_qcolormap.cpp | 13 +- qt6/gen_qcolormap.go | 21 +- qt6/gen_qcolormap.h | 4 +- qt6/gen_qcolorspace.cpp | 63 +- qt6/gen_qcolorspace.go | 101 +- qt6/gen_qcolorspace.h | 24 +- qt6/gen_qcolortransform.cpp | 18 +- qt6/gen_qcolortransform.go | 29 +- qt6/gen_qcolortransform.h | 6 +- qt6/gen_qcolumnview.cpp | 2049 ++++- qt6/gen_qcolumnview.go | 1513 +++- qt6/gen_qcolumnview.h | 177 +- qt6/gen_qcombobox.cpp | 1504 +++- qt6/gen_qcombobox.go | 1107 ++- qt6/gen_qcombobox.h | 163 +- qt6/gen_qcommandlineoption.cpp | 53 +- qt6/gen_qcommandlineoption.go | 85 +- qt6/gen_qcommandlineoption.h | 20 +- qt6/gen_qcommandlineparser.cpp | 13 +- qt6/gen_qcommandlineparser.go | 21 +- qt6/gen_qcommandlineparser.h | 4 +- qt6/gen_qcommandlinkbutton.cpp | 439 +- qt6/gen_qcommandlinkbutton.go | 363 +- qt6/gen_qcommandlinkbutton.h | 58 +- qt6/gen_qcommonstyle.cpp | 906 +- qt6/gen_qcommonstyle.go | 734 +- qt6/gen_qcommonstyle.h | 98 +- qt6/gen_qcompare.cpp | 13 +- qt6/gen_qcompare.go | 21 +- qt6/gen_qcompare.h | 4 +- qt6/gen_qcompleter.cpp | 400 +- qt6/gen_qcompleter.go | 331 +- qt6/gen_qcompleter.h | 42 +- qt6/gen_qconcatenatetablesproxymodel.cpp | 1437 +++- qt6/gen_qconcatenatetablesproxymodel.go | 1188 ++- qt6/gen_qconcatenatetablesproxymodel.h | 102 +- qt6/gen_qcontiguouscache.cpp | 8 +- qt6/gen_qcontiguouscache.go | 13 +- qt6/gen_qcontiguouscache.h | 2 +- qt6/gen_qcoreapplication.cpp | 304 +- qt6/gen_qcoreapplication.go | 235 +- qt6/gen_qcoreapplication.h | 29 +- qt6/gen_qcoreevent.cpp | 339 +- qt6/gen_qcoreevent.go | 294 +- qt6/gen_qcoreevent.h | 32 +- qt6/gen_qcryptographichash.cpp | 13 +- qt6/gen_qcryptographichash.go | 21 +- qt6/gen_qcryptographichash.h | 4 +- qt6/gen_qcursor.cpp | 53 +- qt6/gen_qcursor.go | 95 +- qt6/gen_qcursor.h | 20 +- qt6/gen_qdatastream.cpp | 40 +- qt6/gen_qdatastream.go | 73 +- qt6/gen_qdatastream.h | 14 +- qt6/gen_qdatawidgetmapper.cpp | 295 +- qt6/gen_qdatawidgetmapper.go | 234 +- qt6/gen_qdatawidgetmapper.h | 30 +- qt6/gen_qdatetime.cpp | 99 +- qt6/gen_qdatetime.go | 159 +- qt6/gen_qdatetime.h | 36 +- qt6/gen_qdatetimeedit.cpp | 2399 +++++- qt6/gen_qdatetimeedit.go | 2102 ++++- qt6/gen_qdatetimeedit.h | 204 +- qt6/gen_qdeadlinetimer.cpp | 43 +- qt6/gen_qdeadlinetimer.go | 69 +- qt6/gen_qdeadlinetimer.h | 16 +- qt6/gen_qdebug.cpp | 42 +- qt6/gen_qdebug.go | 127 +- qt6/gen_qdebug.h | 14 +- qt6/gen_qdesktopservices.cpp | 8 +- qt6/gen_qdesktopservices.go | 13 +- qt6/gen_qdesktopservices.h | 2 +- qt6/gen_qdial.cpp | 491 +- qt6/gen_qdial.go | 374 +- qt6/gen_qdial.h | 64 +- qt6/gen_qdialog.cpp | 1567 +++- qt6/gen_qdialog.go | 1151 ++- qt6/gen_qdialog.h | 162 +- qt6/gen_qdialogbuttonbox.cpp | 1428 +++- qt6/gen_qdialogbuttonbox.go | 1085 ++- qt6/gen_qdialogbuttonbox.h | 158 +- qt6/gen_qdir.cpp | 38 +- qt6/gen_qdir.go | 61 +- qt6/gen_qdir.h | 14 +- qt6/gen_qdiriterator.cpp | 53 +- qt6/gen_qdiriterator.go | 85 +- qt6/gen_qdiriterator.h | 20 +- qt6/gen_qdockwidget.cpp | 1445 +++- qt6/gen_qdockwidget.go | 1082 ++- qt6/gen_qdockwidget.h | 161 +- qt6/gen_qdrag.cpp | 258 +- qt6/gen_qdrag.go | 202 +- qt6/gen_qdrag.h | 26 +- qt6/gen_qdrawutil.cpp | 28 +- qt6/gen_qdrawutil.go | 45 +- qt6/gen_qdrawutil.h | 10 +- qt6/gen_qeasingcurve.cpp | 23 +- qt6/gen_qeasingcurve.go | 37 +- qt6/gen_qeasingcurve.h | 8 +- qt6/gen_qelapsedtimer.cpp | 13 +- qt6/gen_qelapsedtimer.go | 21 +- qt6/gen_qelapsedtimer.h | 4 +- qt6/gen_qerrormessage.cpp | 517 +- qt6/gen_qerrormessage.go | 390 +- qt6/gen_qerrormessage.h | 58 +- qt6/gen_qevent.cpp | 4560 ++++++++++- qt6/gen_qevent.go | 4054 +++++++-- qt6/gen_qevent.h | 490 +- qt6/gen_qeventloop.cpp | 283 +- qt6/gen_qeventloop.go | 243 +- qt6/gen_qeventloop.h | 34 +- qt6/gen_qeventpoint.cpp | 33 +- qt6/gen_qeventpoint.go | 55 +- qt6/gen_qeventpoint.h | 12 +- qt6/gen_qexception.cpp | 8 +- qt6/gen_qexception.go | 13 +- qt6/gen_qexception.h | 2 +- qt6/gen_qfactoryinterface.cpp | 8 +- qt6/gen_qfactoryinterface.go | 13 +- qt6/gen_qfactoryinterface.h | 2 +- qt6/gen_qfile.cpp | 511 +- qt6/gen_qfile.go | 418 +- qt6/gen_qfile.h | 44 +- qt6/gen_qfiledevice.cpp | 11 +- qt6/gen_qfiledevice.go | 21 +- qt6/gen_qfiledevice.h | 11 +- qt6/gen_qfiledialog.cpp | 575 +- qt6/gen_qfiledialog.go | 439 +- qt6/gen_qfiledialog.h | 67 +- qt6/gen_qfileiconprovider.cpp | 197 +- qt6/gen_qfileiconprovider.go | 163 +- qt6/gen_qfileiconprovider.h | 16 +- qt6/gen_qfileinfo.cpp | 33 +- qt6/gen_qfileinfo.go | 53 +- qt6/gen_qfileinfo.h | 12 +- qt6/gen_qfileselector.cpp | 261 +- qt6/gen_qfileselector.go | 206 +- qt6/gen_qfileselector.h | 28 +- qt6/gen_qfilesystemmodel.cpp | 1529 +++- qt6/gen_qfilesystemmodel.go | 1261 ++- qt6/gen_qfilesystemmodel.h | 120 +- qt6/gen_qfilesystemwatcher.cpp | 275 +- qt6/gen_qfilesystemwatcher.go | 224 +- qt6/gen_qfilesystemwatcher.h | 32 +- qt6/gen_qfloat16.cpp | 23 +- qt6/gen_qfloat16.go | 37 +- qt6/gen_qfloat16.h | 8 +- qt6/gen_qfocusframe.cpp | 1431 +++- qt6/gen_qfocusframe.go | 1061 ++- qt6/gen_qfocusframe.h | 154 +- qt6/gen_qfont.cpp | 63 +- qt6/gen_qfont.go | 101 +- qt6/gen_qfont.h | 24 +- qt6/gen_qfontcombobox.cpp | 752 +- qt6/gen_qfontcombobox.go | 556 +- qt6/gen_qfontcombobox.h | 85 +- qt6/gen_qfontdatabase.cpp | 13 +- qt6/gen_qfontdatabase.go | 21 +- qt6/gen_qfontdatabase.h | 4 +- qt6/gen_qfontdialog.cpp | 541 +- qt6/gen_qfontdialog.go | 411 +- qt6/gen_qfontdialog.h | 63 +- qt6/gen_qfontinfo.cpp | 18 +- qt6/gen_qfontinfo.go | 29 +- qt6/gen_qfontinfo.h | 6 +- qt6/gen_qfontmetrics.cpp | 51 +- qt6/gen_qfontmetrics.go | 82 +- qt6/gen_qfontmetrics.h | 18 +- qt6/gen_qformlayout.cpp | 695 +- qt6/gen_qformlayout.go | 550 +- qt6/gen_qformlayout.h | 54 +- qt6/gen_qframe.cpp | 1407 +++- qt6/gen_qframe.go | 1044 ++- qt6/gen_qframe.h | 152 +- qt6/gen_qfutureinterface.cpp | 23 +- qt6/gen_qfutureinterface.go | 48 +- qt6/gen_qfutureinterface.h | 8 +- qt6/gen_qfuturewatcher.cpp | 10 +- qt6/gen_qfuturewatcher.go | 21 +- qt6/gen_qfuturewatcher.h | 8 +- qt6/gen_qgenericplugin.cpp | 8 +- qt6/gen_qgenericplugin.go | 21 +- qt6/gen_qgenericplugin.h | 2 +- qt6/gen_qgenericpluginfactory.cpp | 8 +- qt6/gen_qgenericpluginfactory.go | 13 +- qt6/gen_qgenericpluginfactory.h | 2 +- qt6/gen_qgesture.cpp | 463 +- qt6/gen_qgesture.go | 504 +- qt6/gen_qgesture.h | 68 +- qt6/gen_qgesturerecognizer.cpp | 8 +- qt6/gen_qgesturerecognizer.go | 15 +- qt6/gen_qgesturerecognizer.h | 2 +- qt6/gen_qglyphrun.cpp | 18 +- qt6/gen_qglyphrun.go | 29 +- qt6/gen_qglyphrun.h | 6 +- qt6/gen_qgraphicsanchorlayout.cpp | 339 +- qt6/gen_qgraphicsanchorlayout.go | 281 +- qt6/gen_qgraphicsanchorlayout.h | 35 +- qt6/gen_qgraphicseffect.cpp | 547 +- qt6/gen_qgraphicseffect.go | 481 +- qt6/gen_qgraphicseffect.h | 58 +- qt6/gen_qgraphicsgridlayout.cpp | 333 +- qt6/gen_qgraphicsgridlayout.go | 257 +- qt6/gen_qgraphicsgridlayout.h | 31 +- qt6/gen_qgraphicsitem.cpp | 7219 ++++++++++++++-- qt6/gen_qgraphicsitem.go | 6299 ++++++++++++-- qt6/gen_qgraphicsitem.h | 586 +- qt6/gen_qgraphicsitemanimation.cpp | 327 +- qt6/gen_qgraphicsitemanimation.go | 254 +- qt6/gen_qgraphicsitemanimation.h | 34 +- qt6/gen_qgraphicslayout.cpp | 8 +- qt6/gen_qgraphicslayout.go | 21 +- qt6/gen_qgraphicslayout.h | 2 +- qt6/gen_qgraphicslayoutitem.cpp | 8 +- qt6/gen_qgraphicslayoutitem.go | 13 +- qt6/gen_qgraphicslayoutitem.h | 3 +- qt6/gen_qgraphicslinearlayout.cpp | 353 +- qt6/gen_qgraphicslinearlayout.go | 281 +- qt6/gen_qgraphicslinearlayout.h | 35 +- qt6/gen_qgraphicsproxywidget.cpp | 1627 +++- qt6/gen_qgraphicsproxywidget.go | 1221 ++- qt6/gen_qgraphicsproxywidget.h | 179 +- qt6/gen_qgraphicsscene.cpp | 949 ++- qt6/gen_qgraphicsscene.go | 770 +- qt6/gen_qgraphicsscene.h | 111 +- qt6/gen_qgraphicssceneevent.cpp | 248 +- qt6/gen_qgraphicssceneevent.go | 389 +- qt6/gen_qgraphicssceneevent.h | 56 +- qt6/gen_qgraphicstransform.cpp | 152 +- qt6/gen_qgraphicstransform.go | 149 +- qt6/gen_qgraphicstransform.h | 18 +- qt6/gen_qgraphicsview.cpp | 1038 ++- qt6/gen_qgraphicsview.go | 789 +- qt6/gen_qgraphicsview.h | 131 +- qt6/gen_qgraphicswidget.cpp | 1145 ++- qt6/gen_qgraphicswidget.go | 877 +- qt6/gen_qgraphicswidget.h | 133 +- qt6/gen_qgridlayout.cpp | 718 +- qt6/gen_qgridlayout.go | 558 +- qt6/gen_qgridlayout.h | 55 +- qt6/gen_qgroupbox.cpp | 1455 +++- qt6/gen_qgroupbox.go | 1077 ++- qt6/gen_qgroupbox.h | 164 +- qt6/gen_qguiapplication.cpp | 124 +- qt6/gen_qguiapplication.go | 126 +- qt6/gen_qguiapplication.h | 13 +- qt6/gen_qhashfunctions.cpp | 44 +- qt6/gen_qhashfunctions.go | 71 +- qt6/gen_qhashfunctions.h | 14 +- qt6/gen_qheaderview.cpp | 2741 ++++++- qt6/gen_qheaderview.go | 1629 +++- qt6/gen_qheaderview.h | 210 +- qt6/gen_qicon.cpp | 33 +- qt6/gen_qicon.go | 83 +- qt6/gen_qicon.h | 12 +- qt6/gen_qiconengine.cpp | 49 +- qt6/gen_qiconengine.go | 68 +- qt6/gen_qiconengine.h | 10 +- qt6/gen_qiconengineplugin.cpp | 19 +- qt6/gen_qiconengineplugin.go | 37 +- qt6/gen_qiconengineplugin.h | 7 +- qt6/gen_qidentityproxymodel.cpp | 1503 +++- qt6/gen_qidentityproxymodel.go | 1227 ++- qt6/gen_qidentityproxymodel.h | 116 +- qt6/gen_qimage.cpp | 273 +- qt6/gen_qimage.go | 326 +- qt6/gen_qimage.h | 39 +- qt6/gen_qimageiohandler.cpp | 27 +- qt6/gen_qimageiohandler.go | 50 +- qt6/gen_qimageiohandler.h | 9 +- qt6/gen_qimagereader.cpp | 33 +- qt6/gen_qimagereader.go | 57 +- qt6/gen_qimagereader.h | 12 +- qt6/gen_qimagewriter.cpp | 28 +- qt6/gen_qimagewriter.go | 47 +- qt6/gen_qimagewriter.h | 10 +- qt6/gen_qinputdevice.cpp | 284 +- qt6/gen_qinputdevice.go | 238 +- qt6/gen_qinputdevice.h | 34 +- qt6/gen_qinputdialog.cpp | 506 +- qt6/gen_qinputdialog.go | 376 +- qt6/gen_qinputdialog.h | 54 +- qt6/gen_qinputmethod.cpp | 1 + qt6/gen_qinputmethod.go | 19 +- qt6/gen_qinputmethod.h | 2 + qt6/gen_qiodevice.cpp | 10 +- qt6/gen_qiodevice.go | 23 +- qt6/gen_qiodevice.h | 10 +- qt6/gen_qiodevicebase.go | 11 +- qt6/gen_qitemdelegate.cpp | 613 +- qt6/gen_qitemdelegate.go | 448 +- qt6/gen_qitemdelegate.h | 54 +- qt6/gen_qitemeditorfactory.cpp | 105 +- qt6/gen_qitemeditorfactory.go | 103 +- qt6/gen_qitemeditorfactory.h | 12 +- qt6/gen_qitemselectionmodel.cpp | 469 +- qt6/gen_qitemselectionmodel.go | 375 +- qt6/gen_qitemselectionmodel.h | 50 +- qt6/gen_qjsonarray.cpp | 69 +- qt6/gen_qjsonarray.go | 119 +- qt6/gen_qjsonarray.h | 24 +- qt6/gen_qjsondocument.cpp | 36 +- qt6/gen_qjsondocument.go | 58 +- qt6/gen_qjsondocument.h | 12 +- qt6/gen_qjsonobject.cpp | 69 +- qt6/gen_qjsonobject.go | 121 +- qt6/gen_qjsonobject.h | 24 +- qt6/gen_qjsonvalue.cpp | 102 +- qt6/gen_qjsonvalue.go | 170 +- qt6/gen_qjsonvalue.h | 36 +- qt6/gen_qkeysequence.cpp | 73 +- qt6/gen_qkeysequence.go | 117 +- qt6/gen_qkeysequence.h | 28 +- qt6/gen_qkeysequenceedit.cpp | 1421 +++- qt6/gen_qkeysequenceedit.go | 1054 ++- qt6/gen_qkeysequenceedit.h | 157 +- qt6/gen_qlabel.cpp | 563 +- qt6/gen_qlabel.go | 460 +- qt6/gen_qlabel.h | 75 +- qt6/gen_qlayout.cpp | 18 +- qt6/gen_qlayout.go | 37 +- qt6/gen_qlayout.h | 10 +- qt6/gen_qlayoutitem.cpp | 1385 +++- qt6/gen_qlayoutitem.go | 1196 ++- qt6/gen_qlayoutitem.h | 104 +- qt6/gen_qlcdnumber.cpp | 221 +- qt6/gen_qlcdnumber.go | 188 +- qt6/gen_qlcdnumber.h | 34 +- qt6/gen_qlibrary.cpp | 303 +- qt6/gen_qlibrary.go | 260 +- qt6/gen_qlibrary.h | 40 +- qt6/gen_qlibraryinfo.cpp | 8 +- qt6/gen_qlibraryinfo.go | 13 +- qt6/gen_qlibraryinfo.h | 2 +- qt6/gen_qline.cpp | 61 +- qt6/gen_qline.go | 98 +- qt6/gen_qline.h | 22 +- qt6/gen_qlineedit.cpp | 1459 +++- qt6/gen_qlineedit.go | 1085 ++- qt6/gen_qlineedit.h | 163 +- qt6/gen_qlistview.cpp | 2054 ++++- qt6/gen_qlistview.go | 1508 +++- qt6/gen_qlistview.h | 200 +- qt6/gen_qlistwidget.cpp | 1787 +++- qt6/gen_qlistwidget.go | 1207 ++- qt6/gen_qlistwidget.h | 150 +- qt6/gen_qlocale.cpp | 43 +- qt6/gen_qlocale.go | 69 +- qt6/gen_qlocale.h | 16 +- qt6/gen_qlockfile.cpp | 13 +- qt6/gen_qlockfile.go | 21 +- qt6/gen_qlockfile.h | 4 +- qt6/gen_qloggingcategory.cpp | 13 +- qt6/gen_qloggingcategory.go | 21 +- qt6/gen_qloggingcategory.h | 4 +- qt6/gen_qmainwindow.cpp | 1408 +++- qt6/gen_qmainwindow.go | 1059 ++- qt6/gen_qmainwindow.h | 144 +- qt6/gen_qmargins.cpp | 51 +- qt6/gen_qmargins.go | 82 +- qt6/gen_qmargins.h | 18 +- qt6/gen_qmatrix4x4.cpp | 43 +- qt6/gen_qmatrix4x4.go | 69 +- qt6/gen_qmatrix4x4.h | 16 +- qt6/gen_qmdiarea.cpp | 819 +- qt6/gen_qmdiarea.go | 628 +- qt6/gen_qmdiarea.h | 100 +- qt6/gen_qmdisubwindow.cpp | 1476 +++- qt6/gen_qmdisubwindow.go | 1102 ++- qt6/gen_qmdisubwindow.h | 174 +- qt6/gen_qmenu.cpp | 1457 +++- qt6/gen_qmenu.go | 1124 ++- qt6/gen_qmenu.h | 167 +- qt6/gen_qmenubar.cpp | 1467 +++- qt6/gen_qmenubar.go | 1106 ++- qt6/gen_qmenubar.h | 165 +- qt6/gen_qmessageauthenticationcode.cpp | 18 +- qt6/gen_qmessageauthenticationcode.go | 29 +- qt6/gen_qmessageauthenticationcode.h | 6 +- qt6/gen_qmessagebox.cpp | 620 +- qt6/gen_qmessagebox.go | 518 +- qt6/gen_qmessagebox.h | 78 +- qt6/gen_qmetacontainer.cpp | 104 +- qt6/gen_qmetacontainer.go | 1458 ++-- qt6/gen_qmetacontainer.h | 32 +- qt6/gen_qmetaobject.cpp | 62 +- qt6/gen_qmetaobject.go | 100 +- qt6/gen_qmetaobject.h | 20 +- qt6/gen_qmetatype.cpp | 57 +- qt6/gen_qmetatype.go | 92 +- qt6/gen_qmetatype.h | 18 +- qt6/gen_qmimedata.cpp | 388 +- qt6/gen_qmimedata.go | 309 +- qt6/gen_qmimedata.h | 37 +- qt6/gen_qmimedatabase.cpp | 13 +- qt6/gen_qmimedatabase.go | 21 +- qt6/gen_qmimedatabase.h | 4 +- qt6/gen_qmimetype.cpp | 18 +- qt6/gen_qmimetype.go | 29 +- qt6/gen_qmimetype.h | 6 +- qt6/gen_qmovie.cpp | 317 +- qt6/gen_qmovie.go | 265 +- qt6/gen_qmovie.h | 40 +- qt6/gen_qmutex.cpp | 40 +- qt6/gen_qmutex.go | 72 +- qt6/gen_qmutex.h | 12 +- qt6/gen_qnamespace.cpp | 69 +- qt6/gen_qnamespace.go | 111 +- qt6/gen_qnamespace.h | 28 +- qt6/gen_qobject.cpp | 287 +- qt6/gen_qobject.go | 239 +- qt6/gen_qobject.h | 37 +- qt6/gen_qobjectcleanuphandler.cpp | 254 +- qt6/gen_qobjectcleanuphandler.go | 197 +- qt6/gen_qobjectcleanuphandler.h | 26 +- qt6/gen_qobjectdefs.cpp | 145 +- qt6/gen_qobjectdefs.go | 239 +- qt6/gen_qobjectdefs.h | 48 +- qt6/gen_qoffscreensurface.cpp | 365 +- qt6/gen_qoffscreensurface.go | 295 +- qt6/gen_qoffscreensurface.h | 38 +- qt6/gen_qoperatingsystemversion.cpp | 66 +- qt6/gen_qoperatingsystemversion.go | 113 +- qt6/gen_qoperatingsystemversion.h | 22 +- qt6/gen_qpagedpaintdevice.cpp | 17 +- qt6/gen_qpagedpaintdevice.go | 29 +- qt6/gen_qpagedpaintdevice.h | 7 +- qt6/gen_qpagelayout.cpp | 33 +- qt6/gen_qpagelayout.go | 53 +- qt6/gen_qpagelayout.h | 12 +- qt6/gen_qpageranges.cpp | 36 +- qt6/gen_qpageranges.go | 58 +- qt6/gen_qpageranges.h | 12 +- qt6/gen_qpagesize.cpp | 53 +- qt6/gen_qpagesize.go | 85 +- qt6/gen_qpagesize.h | 20 +- qt6/gen_qpaintdevice.cpp | 10 +- qt6/gen_qpaintdevice.go | 13 +- qt6/gen_qpaintdevice.h | 10 +- qt6/gen_qpaintdevicewindow.cpp | 15 +- qt6/gen_qpaintdevicewindow.go | 23 +- qt6/gen_qpaintdevicewindow.h | 20 +- qt6/gen_qpaintengine.cpp | 38 +- qt6/gen_qpaintengine.go | 62 +- qt6/gen_qpaintengine.h | 12 +- qt6/gen_qpainter.cpp | 26 +- qt6/gen_qpainter.go | 42 +- qt6/gen_qpainter.h | 8 +- qt6/gen_qpainterpath.cpp | 49 +- qt6/gen_qpainterpath.go | 79 +- qt6/gen_qpainterpath.h | 16 +- qt6/gen_qpalette.cpp | 43 +- qt6/gen_qpalette.go | 69 +- qt6/gen_qpalette.h | 16 +- qt6/gen_qparallelanimationgroup.cpp | 198 +- qt6/gen_qparallelanimationgroup.go | 162 +- qt6/gen_qparallelanimationgroup.h | 26 +- qt6/gen_qpauseanimation.cpp | 211 +- qt6/gen_qpauseanimation.go | 180 +- qt6/gen_qpauseanimation.h | 26 +- qt6/gen_qpdfwriter.cpp | 532 +- qt6/gen_qpdfwriter.go | 404 +- qt6/gen_qpdfwriter.h | 62 +- qt6/gen_qpen.cpp | 48 +- qt6/gen_qpen.go | 77 +- qt6/gen_qpen.h | 18 +- qt6/gen_qpicture.cpp | 258 +- qt6/gen_qpicture.go | 213 +- qt6/gen_qpicture.h | 27 +- qt6/gen_qpixelformat.cpp | 33 +- qt6/gen_qpixelformat.go | 53 +- qt6/gen_qpixelformat.h | 12 +- qt6/gen_qpixmap.cpp | 253 +- qt6/gen_qpixmap.go | 271 +- qt6/gen_qpixmap.h | 35 +- qt6/gen_qpixmapcache.cpp | 26 +- qt6/gen_qpixmapcache.go | 42 +- qt6/gen_qpixmapcache.h | 8 +- qt6/gen_qplaintextedit.cpp | 1809 +++- qt6/gen_qplaintextedit.go | 1384 +++- qt6/gen_qplaintextedit.h | 180 +- qt6/gen_qplugin.cpp | 60 +- qt6/gen_qplugin.go | 97 +- qt6/gen_qplugin.h | 18 +- qt6/gen_qpluginloader.cpp | 275 +- qt6/gen_qpluginloader.go | 224 +- qt6/gen_qpluginloader.h | 32 +- qt6/gen_qpoint.cpp | 51 +- qt6/gen_qpoint.go | 82 +- qt6/gen_qpoint.h | 18 +- qt6/gen_qpointingdevice.cpp | 69 +- qt6/gen_qpointingdevice.go | 116 +- qt6/gen_qpointingdevice.h | 22 +- qt6/gen_qprocess.cpp | 625 +- qt6/gen_qprocess.go | 515 +- qt6/gen_qprocess.h | 63 +- qt6/gen_qprogressbar.cpp | 1438 +++- qt6/gen_qprogressbar.go | 1060 ++- qt6/gen_qprogressbar.h | 151 +- qt6/gen_qprogressdialog.cpp | 558 +- qt6/gen_qprogressdialog.go | 435 +- qt6/gen_qprogressdialog.h | 66 +- qt6/gen_qproperty.cpp | 137 +- qt6/gen_qproperty.go | 235 +- qt6/gen_qproperty.h | 44 +- qt6/gen_qpropertyanimation.cpp | 256 +- qt6/gen_qpropertyanimation.go | 214 +- qt6/gen_qpropertyanimation.h | 33 +- qt6/gen_qpropertyprivate.cpp | 61 +- qt6/gen_qpropertyprivate.go | 99 +- qt6/gen_qpropertyprivate.h | 16 +- qt6/gen_qproxystyle.cpp | 949 ++- qt6/gen_qproxystyle.go | 782 +- qt6/gen_qproxystyle.h | 98 +- qt6/gen_qpushbutton.cpp | 625 +- qt6/gen_qpushbutton.go | 489 +- qt6/gen_qpushbutton.h | 78 +- qt6/gen_qquaternion.cpp | 38 +- qt6/gen_qquaternion.go | 61 +- qt6/gen_qquaternion.h | 14 +- qt6/gen_qradiobutton.cpp | 605 +- qt6/gen_qradiobutton.go | 463 +- qt6/gen_qradiobutton.h | 71 +- qt6/gen_qrandom.cpp | 77 +- qt6/gen_qrandom.go | 134 +- qt6/gen_qrandom.h | 26 +- qt6/gen_qrasterwindow.cpp | 204 +- qt6/gen_qrasterwindow.go | 168 +- qt6/gen_qrasterwindow.h | 34 +- qt6/gen_qrawfont.cpp | 38 +- qt6/gen_qrawfont.go | 67 +- qt6/gen_qrawfont.h | 14 +- qt6/gen_qreadwritelock.cpp | 44 +- qt6/gen_qreadwritelock.go | 71 +- qt6/gen_qreadwritelock.h | 14 +- qt6/gen_qrect.cpp | 71 +- qt6/gen_qrect.go | 114 +- qt6/gen_qrect.h | 26 +- qt6/gen_qrefcount.cpp | 8 +- qt6/gen_qrefcount.go | 13 +- qt6/gen_qrefcount.h | 2 +- qt6/gen_qregion.cpp | 43 +- qt6/gen_qregion.go | 69 +- qt6/gen_qregion.h | 16 +- qt6/gen_qregularexpression.cpp | 95 +- qt6/gen_qregularexpression.go | 153 +- qt6/gen_qregularexpression.h | 32 +- qt6/gen_qresource.cpp | 23 +- qt6/gen_qresource.go | 37 +- qt6/gen_qresource.h | 8 +- qt6/gen_qresultstore.cpp | 49 +- qt6/gen_qresultstore.go | 79 +- qt6/gen_qresultstore.h | 16 +- qt6/gen_qrgba64.cpp | 18 +- qt6/gen_qrgba64.go | 29 +- qt6/gen_qrgba64.h | 6 +- qt6/gen_qrubberband.cpp | 1397 +++- qt6/gen_qrubberband.go | 1033 ++- qt6/gen_qrubberband.h | 151 +- qt6/gen_qrunnable.cpp | 8 +- qt6/gen_qrunnable.go | 13 +- qt6/gen_qrunnable.h | 2 +- qt6/gen_qsavefile.cpp | 480 +- qt6/gen_qsavefile.go | 398 +- qt6/gen_qsavefile.h | 43 +- qt6/gen_qscopedpointer.cpp | 8 +- qt6/gen_qscopedpointer.go | 13 +- qt6/gen_qscopedpointer.h | 2 +- qt6/gen_qscreen.cpp | 9 +- qt6/gen_qscreen.go | 37 +- qt6/gen_qscreen.h | 4 +- qt6/gen_qscrollarea.cpp | 749 +- qt6/gen_qscrollarea.go | 575 +- qt6/gen_qscrollarea.h | 85 +- qt6/gen_qscrollbar.cpp | 513 +- qt6/gen_qscrollbar.go | 396 +- qt6/gen_qscrollbar.h | 69 +- qt6/gen_qscroller.go | 25 +- qt6/gen_qscrollerproperties.cpp | 18 +- qt6/gen_qscrollerproperties.go | 29 +- qt6/gen_qscrollerproperties.h | 6 +- qt6/gen_qsemaphore.cpp | 51 +- qt6/gen_qsemaphore.go | 82 +- qt6/gen_qsemaphore.h | 18 +- qt6/gen_qsequentialanimationgroup.cpp | 199 +- qt6/gen_qsequentialanimationgroup.go | 169 +- qt6/gen_qsequentialanimationgroup.h | 24 +- qt6/gen_qsessionmanager.cpp | 1 + qt6/gen_qsessionmanager.go | 19 +- qt6/gen_qsessionmanager.h | 2 + qt6/gen_qsettings.cpp | 352 +- qt6/gen_qsettings.go | 323 +- qt6/gen_qsettings.h | 55 +- qt6/gen_qshareddata.cpp | 31 +- qt6/gen_qshareddata.go | 50 +- qt6/gen_qshareddata.h | 10 +- qt6/gen_qsharedmemory.cpp | 275 +- qt6/gen_qsharedmemory.go | 224 +- qt6/gen_qsharedmemory.h | 32 +- qt6/gen_qshortcut.cpp | 314 +- qt6/gen_qshortcut.go | 268 +- qt6/gen_qshortcut.h | 43 +- qt6/gen_qsignalmapper.cpp | 267 +- qt6/gen_qsignalmapper.go | 205 +- qt6/gen_qsignalmapper.h | 28 +- qt6/gen_qsize.cpp | 51 +- qt6/gen_qsize.go | 82 +- qt6/gen_qsize.h | 18 +- qt6/gen_qsizegrip.cpp | 1388 +++- qt6/gen_qsizegrip.go | 1025 ++- qt6/gen_qsizegrip.h | 151 +- qt6/gen_qsizepolicy.cpp | 28 +- qt6/gen_qsizepolicy.go | 45 +- qt6/gen_qsizepolicy.h | 10 +- qt6/gen_qslider.cpp | 477 +- qt6/gen_qslider.go | 375 +- qt6/gen_qslider.h | 59 +- qt6/gen_qsocketnotifier.cpp | 303 +- qt6/gen_qsocketnotifier.go | 265 +- qt6/gen_qsocketnotifier.h | 41 +- qt6/gen_qsortfilterproxymodel.cpp | 1564 +++- qt6/gen_qsortfilterproxymodel.go | 1287 ++- qt6/gen_qsortfilterproxymodel.h | 134 +- qt6/gen_qspinbox.cpp | 2218 ++++- qt6/gen_qspinbox.go | 1796 +++- qt6/gen_qspinbox.h | 165 +- qt6/gen_qsplashscreen.cpp | 1436 +++- qt6/gen_qsplashscreen.go | 1078 ++- qt6/gen_qsplashscreen.h | 157 +- qt6/gen_qsplitter.cpp | 1781 +++- qt6/gen_qsplitter.go | 1286 ++- qt6/gen_qsplitter.h | 183 +- qt6/gen_qstackedlayout.cpp | 700 +- qt6/gen_qstackedlayout.go | 547 +- qt6/gen_qstackedlayout.h | 54 +- qt6/gen_qstackedwidget.cpp | 204 +- qt6/gen_qstackedwidget.go | 168 +- qt6/gen_qstackedwidget.h | 31 +- qt6/gen_qstandarditemmodel.cpp | 2171 ++++- qt6/gen_qstandarditemmodel.go | 1567 +++- qt6/gen_qstandarditemmodel.h | 159 +- qt6/gen_qstandardpaths.go | 11 +- qt6/gen_qstatictext.cpp | 23 +- qt6/gen_qstatictext.go | 37 +- qt6/gen_qstatictext.h | 8 +- qt6/gen_qstatusbar.cpp | 1368 +++- qt6/gen_qstatusbar.go | 1009 ++- qt6/gen_qstatusbar.h | 148 +- qt6/gen_qstorageinfo.cpp | 28 +- qt6/gen_qstorageinfo.go | 45 +- qt6/gen_qstorageinfo.h | 10 +- qt6/gen_qstringbuilder.cpp | 8 +- qt6/gen_qstringbuilder.go | 13 +- qt6/gen_qstringbuilder.h | 2 +- qt6/gen_qstringconverter.cpp | 88 +- qt6/gen_qstringconverter.go | 144 +- qt6/gen_qstringconverter.h | 28 +- qt6/gen_qstringconverter_base.cpp | 28 +- qt6/gen_qstringconverter_base.go | 75 +- qt6/gen_qstringconverter_base.h | 10 +- qt6/gen_qstringlistmodel.cpp | 639 +- qt6/gen_qstringlistmodel.go | 559 +- qt6/gen_qstringlistmodel.h | 64 +- qt6/gen_qstringmatcher.cpp | 38 +- qt6/gen_qstringmatcher.go | 61 +- qt6/gen_qstringmatcher.h | 14 +- qt6/gen_qstringtokenizer.cpp | 5 +- qt6/gen_qstringtokenizer.go | 19 +- qt6/gen_qstringtokenizer.h | 2 +- qt6/gen_qstringview.cpp | 13 +- qt6/gen_qstringview.go | 21 +- qt6/gen_qstringview.h | 4 +- qt6/gen_qstyle.cpp | 139 +- qt6/gen_qstyle.go | 180 +- qt6/gen_qstyle.h | 49 +- qt6/gen_qstyleditemdelegate.cpp | 524 +- qt6/gen_qstyleditemdelegate.go | 394 +- qt6/gen_qstyleditemdelegate.h | 43 +- qt6/gen_qstylefactory.cpp | 8 +- qt6/gen_qstylefactory.go | 15 +- qt6/gen_qstylefactory.h | 2 +- qt6/gen_qstylehints.cpp | 9 +- qt6/gen_qstylehints.go | 21 +- qt6/gen_qstylehints.h | 4 +- qt6/gen_qstyleoption.cpp | 604 +- qt6/gen_qstyleoption.go | 1138 ++- qt6/gen_qstyleoption.h | 180 +- qt6/gen_qstylepainter.cpp | 27 +- qt6/gen_qstylepainter.go | 50 +- qt6/gen_qstylepainter.h | 10 +- qt6/gen_qstyleplugin.cpp | 9 +- qt6/gen_qstyleplugin.go | 23 +- qt6/gen_qstyleplugin.h | 4 +- qt6/gen_qsurface.cpp | 8 +- qt6/gen_qsurface.go | 13 +- qt6/gen_qsurface.h | 2 +- qt6/gen_qsurfaceformat.cpp | 23 +- qt6/gen_qsurfaceformat.go | 37 +- qt6/gen_qsurfaceformat.h | 8 +- qt6/gen_qsyntaxhighlighter.cpp | 9 +- qt6/gen_qsyntaxhighlighter.go | 23 +- qt6/gen_qsyntaxhighlighter.h | 5 +- qt6/gen_qsystemsemaphore.cpp | 23 +- qt6/gen_qsystemsemaphore.go | 37 +- qt6/gen_qsystemsemaphore.h | 8 +- qt6/gen_qsystemtrayicon.cpp | 279 +- qt6/gen_qsystemtrayicon.go | 225 +- qt6/gen_qsystemtrayicon.h | 33 +- qt6/gen_qtabbar.cpp | 1597 +++- qt6/gen_qtabbar.go | 1180 ++- qt6/gen_qtabbar.h | 175 +- qt6/gen_qtableview.cpp | 2019 ++++- qt6/gen_qtableview.go | 1490 +++- qt6/gen_qtableview.h | 186 +- qt6/gen_qtablewidget.cpp | 1371 +++- qt6/gen_qtablewidget.go | 1070 ++- qt6/gen_qtablewidget.h | 132 +- qt6/gen_qtabwidget.cpp | 1470 +++- qt6/gen_qtabwidget.go | 1088 ++- qt6/gen_qtabwidget.h | 159 +- qt6/gen_qtemporarydir.cpp | 18 +- qt6/gen_qtemporarydir.go | 29 +- qt6/gen_qtemporarydir.h | 6 +- qt6/gen_qtemporaryfile.cpp | 259 +- qt6/gen_qtemporaryfile.go | 225 +- qt6/gen_qtemporaryfile.h | 29 +- qt6/gen_qtestsupport_gui.cpp | 16 +- qt6/gen_qtestsupport_gui.go | 21 +- qt6/gen_qtestsupport_gui.h | 5 +- qt6/gen_qtestsupport_widgets.cpp | 92 +- qt6/gen_qtestsupport_widgets.go | 230 +- qt6/gen_qtestsupport_widgets.h | 17 +- qt6/gen_qtextboundaryfinder.cpp | 38 +- qt6/gen_qtextboundaryfinder.go | 61 +- qt6/gen_qtextboundaryfinder.h | 14 +- qt6/gen_qtextbrowser.cpp | 1162 ++- qt6/gen_qtextbrowser.go | 838 +- qt6/gen_qtextbrowser.h | 127 +- qt6/gen_qtextcursor.cpp | 33 +- qt6/gen_qtextcursor.go | 81 +- qt6/gen_qtextcursor.h | 12 +- qt6/gen_qtextdocument.cpp | 401 +- qt6/gen_qtextdocument.go | 324 +- qt6/gen_qtextdocument.h | 42 +- qt6/gen_qtextdocumentfragment.cpp | 28 +- qt6/gen_qtextdocumentfragment.go | 45 +- qt6/gen_qtextdocumentfragment.h | 10 +- qt6/gen_qtextdocumentwriter.cpp | 28 +- qt6/gen_qtextdocumentwriter.go | 47 +- qt6/gen_qtextdocumentwriter.h | 10 +- qt6/gen_qtextedit.cpp | 1221 ++- qt6/gen_qtextedit.go | 988 ++- qt6/gen_qtextedit.h | 153 +- qt6/gen_qtextformat.cpp | 171 +- qt6/gen_qtextformat.go | 337 +- qt6/gen_qtextformat.h | 52 +- qt6/gen_qtextlayout.cpp | 72 +- qt6/gen_qtextlayout.go | 116 +- qt6/gen_qtextlayout.h | 24 +- qt6/gen_qtextlist.cpp | 130 +- qt6/gen_qtextlist.go | 104 +- qt6/gen_qtextlist.h | 16 +- qt6/gen_qtextobject.cpp | 104 +- qt6/gen_qtextobject.go | 233 +- qt6/gen_qtextobject.h | 37 +- qt6/gen_qtextoption.cpp | 46 +- qt6/gen_qtextoption.go | 74 +- qt6/gen_qtextoption.h | 16 +- qt6/gen_qtextstream.cpp | 33 +- qt6/gen_qtextstream.go | 121 +- qt6/gen_qtextstream.h | 12 +- qt6/gen_qtexttable.cpp | 37 +- qt6/gen_qtexttable.go | 65 +- qt6/gen_qtexttable.h | 16 +- qt6/gen_qthread.cpp | 291 +- qt6/gen_qthread.go | 230 +- qt6/gen_qthread.h | 29 +- qt6/gen_qthreadpool.cpp | 261 +- qt6/gen_qthreadpool.go | 208 +- qt6/gen_qthreadpool.h | 28 +- qt6/gen_qthreadstorage.cpp | 13 +- qt6/gen_qthreadstorage.go | 21 +- qt6/gen_qthreadstorage.h | 4 +- qt6/gen_qtimeline.cpp | 300 +- qt6/gen_qtimeline.go | 240 +- qt6/gen_qtimeline.h | 33 +- qt6/gen_qtimer.cpp | 261 +- qt6/gen_qtimer.go | 206 +- qt6/gen_qtimer.h | 29 +- qt6/gen_qtimezone.cpp | 56 +- qt6/gen_qtimezone.go | 90 +- qt6/gen_qtimezone.h | 20 +- qt6/gen_qtoolbar.cpp | 1431 +++- qt6/gen_qtoolbar.go | 1072 ++- qt6/gen_qtoolbar.h | 153 +- qt6/gen_qtoolbox.cpp | 309 +- qt6/gen_qtoolbox.go | 249 +- qt6/gen_qtoolbox.h | 45 +- qt6/gen_qtoolbutton.cpp | 685 +- qt6/gen_qtoolbutton.go | 513 +- qt6/gen_qtoolbutton.h | 85 +- qt6/gen_qtooltip.cpp | 8 +- qt6/gen_qtooltip.go | 13 +- qt6/gen_qtooltip.h | 2 +- qt6/gen_qtransform.cpp | 33 +- qt6/gen_qtransform.go | 53 +- qt6/gen_qtransform.h | 12 +- qt6/gen_qtranslator.cpp | 359 +- qt6/gen_qtranslator.go | 306 +- qt6/gen_qtranslator.h | 36 +- qt6/gen_qtransposeproxymodel.cpp | 1434 +++- qt6/gen_qtransposeproxymodel.go | 1191 ++- qt6/gen_qtransposeproxymodel.h | 116 +- qt6/gen_qtreeview.cpp | 2487 +++++- qt6/gen_qtreeview.go | 1568 +++- qt6/gen_qtreeview.h | 207 +- qt6/gen_qtreewidget.cpp | 2254 ++++- qt6/gen_qtreewidget.go | 1441 +++- qt6/gen_qtreewidget.h | 178 +- qt6/gen_qtreewidgetitemiterator.cpp | 33 +- qt6/gen_qtreewidgetitemiterator.go | 53 +- qt6/gen_qtreewidgetitemiterator.h | 12 +- qt6/gen_qundogroup.cpp | 275 +- qt6/gen_qundogroup.go | 219 +- qt6/gen_qundogroup.h | 28 +- qt6/gen_qundostack.cpp | 436 +- qt6/gen_qundostack.go | 345 +- qt6/gen_qundostack.h | 46 +- qt6/gen_qundoview.cpp | 1161 ++- qt6/gen_qundoview.go | 880 +- qt6/gen_qundoview.h | 116 +- qt6/gen_qurl.cpp | 28 +- qt6/gen_qurl.go | 45 +- qt6/gen_qurl.h | 10 +- qt6/gen_qurlquery.cpp | 28 +- qt6/gen_qurlquery.go | 45 +- qt6/gen_qurlquery.h | 10 +- qt6/gen_qutf8stringview.cpp | 16 +- qt6/gen_qutf8stringview.go | 26 +- qt6/gen_qutf8stringview.h | 4 +- qt6/gen_quuid.cpp | 28 +- qt6/gen_quuid.go | 45 +- qt6/gen_quuid.h | 10 +- qt6/gen_qvalidator.cpp | 409 +- qt6/gen_qvalidator.go | 393 +- qt6/gen_qvalidator.h | 44 +- qt6/gen_qvariant.cpp | 244 +- qt6/gen_qvariant.go | 391 +- qt6/gen_qvariant.h | 94 +- qt6/gen_qvariantanimation.cpp | 269 +- qt6/gen_qvariantanimation.go | 212 +- qt6/gen_qvariantanimation.h | 29 +- qt6/gen_qvarlengtharray.go | 11 +- qt6/gen_qvectornd.cpp | 159 +- qt6/gen_qvectornd.go | 255 +- qt6/gen_qvectornd.h | 60 +- qt6/gen_qversionnumber.cpp | 56 +- qt6/gen_qversionnumber.go | 90 +- qt6/gen_qversionnumber.h | 20 +- qt6/gen_qwaitcondition.cpp | 13 +- qt6/gen_qwaitcondition.go | 21 +- qt6/gen_qwaitcondition.h | 4 +- qt6/gen_qwhatsthis.cpp | 8 +- qt6/gen_qwhatsthis.go | 17 +- qt6/gen_qwhatsthis.h | 2 +- qt6/gen_qwidget.cpp | 1585 +++- qt6/gen_qwidget.go | 1239 ++- qt6/gen_qwidget.h | 187 +- qt6/gen_qwidgetaction.cpp | 152 +- qt6/gen_qwidgetaction.go | 134 +- qt6/gen_qwidgetaction.h | 20 +- qt6/gen_qwindow.cpp | 1091 ++- qt6/gen_qwindow.go | 795 +- qt6/gen_qwindow.h | 128 +- qt6/gen_qwizard.cpp | 2339 +++++- qt6/gen_qwizard.go | 1881 ++++- qt6/gen_qwizard.h | 206 +- qt6/gen_qxmlstream.cpp | 149 +- qt6/gen_qxmlstream.go | 244 +- qt6/gen_qxmlstream.h | 50 +- qt6/multimedia/gen_qaudiobuffer.cpp | 38 +- qt6/multimedia/gen_qaudiobuffer.go | 61 +- qt6/multimedia/gen_qaudiobuffer.h | 14 +- qt6/multimedia/gen_qaudiodecoder.cpp | 279 +- qt6/multimedia/gen_qaudiodecoder.go | 207 +- qt6/multimedia/gen_qaudiodecoder.h | 28 +- qt6/multimedia/gen_qaudiodevice.cpp | 18 +- qt6/multimedia/gen_qaudiodevice.go | 29 +- qt6/multimedia/gen_qaudiodevice.h | 6 +- qt6/multimedia/gen_qaudioformat.cpp | 18 +- qt6/multimedia/gen_qaudioformat.go | 29 +- qt6/multimedia/gen_qaudioformat.h | 6 +- qt6/multimedia/gen_qaudioinput.cpp | 281 +- qt6/multimedia/gen_qaudioinput.go | 223 +- qt6/multimedia/gen_qaudioinput.h | 32 +- qt6/multimedia/gen_qaudiooutput.cpp | 281 +- qt6/multimedia/gen_qaudiooutput.go | 223 +- qt6/multimedia/gen_qaudiooutput.h | 32 +- qt6/multimedia/gen_qaudiosink.cpp | 291 +- qt6/multimedia/gen_qaudiosink.go | 243 +- qt6/multimedia/gen_qaudiosink.h | 36 +- qt6/multimedia/gen_qaudiosource.cpp | 291 +- qt6/multimedia/gen_qaudiosource.go | 243 +- qt6/multimedia/gen_qaudiosource.h | 36 +- qt6/multimedia/gen_qcamera.cpp | 345 +- qt6/multimedia/gen_qcamera.go | 243 +- qt6/multimedia/gen_qcamera.h | 36 +- qt6/multimedia/gen_qcameradevice.cpp | 36 +- qt6/multimedia/gen_qcameradevice.go | 58 +- qt6/multimedia/gen_qcameradevice.h | 12 +- qt6/multimedia/gen_qgraphicsvideoitem.cpp | 237 +- qt6/multimedia/gen_qgraphicsvideoitem.go | 199 +- qt6/multimedia/gen_qgraphicsvideoitem.h | 33 +- qt6/multimedia/gen_qimagecapture.cpp | 285 +- qt6/multimedia/gen_qimagecapture.go | 209 +- qt6/multimedia/gen_qimagecapture.h | 28 +- qt6/multimedia/gen_qmediacapturesession.cpp | 273 +- qt6/multimedia/gen_qmediacapturesession.go | 217 +- qt6/multimedia/gen_qmediacapturesession.h | 28 +- qt6/multimedia/gen_qmediadevices.cpp | 267 +- qt6/multimedia/gen_qmediadevices.go | 205 +- qt6/multimedia/gen_qmediadevices.h | 28 +- qt6/multimedia/gen_qmediaformat.cpp | 23 +- qt6/multimedia/gen_qmediaformat.go | 37 +- qt6/multimedia/gen_qmediaformat.h | 8 +- qt6/multimedia/gen_qmediametadata.cpp | 18 +- qt6/multimedia/gen_qmediametadata.go | 29 +- qt6/multimedia/gen_qmediametadata.h | 6 +- qt6/multimedia/gen_qmediaplayer.cpp | 297 +- qt6/multimedia/gen_qmediaplayer.go | 211 +- qt6/multimedia/gen_qmediaplayer.h | 28 +- qt6/multimedia/gen_qmediarecorder.cpp | 293 +- qt6/multimedia/gen_qmediarecorder.go | 207 +- qt6/multimedia/gen_qmediarecorder.h | 28 +- qt6/multimedia/gen_qmediatimerange.cpp | 51 +- qt6/multimedia/gen_qmediatimerange.go | 82 +- qt6/multimedia/gen_qmediatimerange.h | 18 +- qt6/multimedia/gen_qsoundeffect.cpp | 293 +- qt6/multimedia/gen_qsoundeffect.go | 223 +- qt6/multimedia/gen_qsoundeffect.h | 32 +- qt6/multimedia/gen_qvideoframe.cpp | 31 +- qt6/multimedia/gen_qvideoframe.go | 52 +- qt6/multimedia/gen_qvideoframe.h | 10 +- qt6/multimedia/gen_qvideoframeformat.cpp | 23 +- qt6/multimedia/gen_qvideoframeformat.go | 37 +- qt6/multimedia/gen_qvideoframeformat.h | 8 +- qt6/multimedia/gen_qvideosink.cpp | 267 +- qt6/multimedia/gen_qvideosink.go | 205 +- qt6/multimedia/gen_qvideosink.h | 28 +- qt6/multimedia/gen_qvideowidget.cpp | 1369 +++- qt6/multimedia/gen_qvideowidget.go | 1011 ++- qt6/multimedia/gen_qvideowidget.h | 147 +- qt6/multimedia/gen_qwavedecoder.cpp | 525 +- qt6/multimedia/gen_qwavedecoder.go | 418 +- qt6/multimedia/gen_qwavedecoder.h | 42 +- qt6/network/gen_qabstractnetworkcache.cpp | 27 +- qt6/network/gen_qabstractnetworkcache.go | 54 +- qt6/network/gen_qabstractnetworkcache.h | 10 +- qt6/network/gen_qabstractsocket.cpp | 992 ++- qt6/network/gen_qabstractsocket.go | 763 +- qt6/network/gen_qabstractsocket.h | 96 +- qt6/network/gen_qauthenticator.cpp | 18 +- qt6/network/gen_qauthenticator.go | 29 +- qt6/network/gen_qauthenticator.h | 6 +- qt6/network/gen_qdnslookup.cpp | 387 +- qt6/network/gen_qdnslookup.go | 386 +- qt6/network/gen_qdnslookup.h | 66 +- qt6/network/gen_qdtls.cpp | 545 +- qt6/network/gen_qdtls.go | 447 +- qt6/network/gen_qdtls.h | 56 +- qt6/network/gen_qhostaddress.cpp | 51 +- qt6/network/gen_qhostaddress.go | 82 +- qt6/network/gen_qhostaddress.h | 18 +- qt6/network/gen_qhostinfo.cpp | 23 +- qt6/network/gen_qhostinfo.go | 37 +- qt6/network/gen_qhostinfo.h | 8 +- qt6/network/gen_qhstspolicy.cpp | 28 +- qt6/network/gen_qhstspolicy.go | 45 +- qt6/network/gen_qhstspolicy.h | 10 +- qt6/network/gen_qhttp2configuration.cpp | 18 +- qt6/network/gen_qhttp2configuration.go | 29 +- qt6/network/gen_qhttp2configuration.h | 6 +- qt6/network/gen_qhttpmultipart.cpp | 293 +- qt6/network/gen_qhttpmultipart.go | 253 +- qt6/network/gen_qhttpmultipart.h | 38 +- qt6/network/gen_qlocalserver.cpp | 356 +- qt6/network/gen_qlocalserver.go | 273 +- qt6/network/gen_qlocalserver.h | 35 +- qt6/network/gen_qlocalsocket.cpp | 600 +- qt6/network/gen_qlocalsocket.go | 474 +- qt6/network/gen_qlocalsocket.h | 57 +- qt6/network/gen_qnetworkaccessmanager.cpp | 362 +- qt6/network/gen_qnetworkaccessmanager.go | 313 +- qt6/network/gen_qnetworkaccessmanager.h | 33 +- qt6/network/gen_qnetworkcookie.cpp | 28 +- qt6/network/gen_qnetworkcookie.go | 45 +- qt6/network/gen_qnetworkcookie.h | 10 +- qt6/network/gen_qnetworkcookiejar.cpp | 493 +- qt6/network/gen_qnetworkcookiejar.go | 389 +- qt6/network/gen_qnetworkcookiejar.h | 41 +- qt6/network/gen_qnetworkdatagram.cpp | 33 +- qt6/network/gen_qnetworkdatagram.go | 53 +- qt6/network/gen_qnetworkdatagram.h | 12 +- qt6/network/gen_qnetworkdiskcache.cpp | 324 +- qt6/network/gen_qnetworkdiskcache.go | 257 +- qt6/network/gen_qnetworkdiskcache.h | 27 +- qt6/network/gen_qnetworkinformation.cpp | 1 + qt6/network/gen_qnetworkinformation.go | 21 +- qt6/network/gen_qnetworkinformation.h | 2 + qt6/network/gen_qnetworkinterface.cpp | 36 +- qt6/network/gen_qnetworkinterface.go | 58 +- qt6/network/gen_qnetworkinterface.h | 12 +- qt6/network/gen_qnetworkproxy.cpp | 126 +- qt6/network/gen_qnetworkproxy.go | 192 +- qt6/network/gen_qnetworkproxy.h | 43 +- qt6/network/gen_qnetworkreply.cpp | 11 +- qt6/network/gen_qnetworkreply.go | 23 +- qt6/network/gen_qnetworkreply.h | 12 +- qt6/network/gen_qnetworkrequest.cpp | 23 +- qt6/network/gen_qnetworkrequest.go | 37 +- qt6/network/gen_qnetworkrequest.h | 8 +- qt6/network/gen_qocspresponse.cpp | 18 +- qt6/network/gen_qocspresponse.go | 29 +- qt6/network/gen_qocspresponse.h | 6 +- qt6/network/gen_qsctpserver.cpp | 127 +- qt6/network/gen_qsctpserver.go | 110 +- qt6/network/gen_qsctpserver.h | 17 +- qt6/network/gen_qsctpsocket.cpp | 172 +- qt6/network/gen_qsctpsocket.go | 148 +- qt6/network/gen_qsctpsocket.h | 24 +- qt6/network/gen_qsslcertificate.cpp | 38 +- qt6/network/gen_qsslcertificate.go | 61 +- qt6/network/gen_qsslcertificate.h | 14 +- qt6/network/gen_qsslcertificateextension.cpp | 18 +- qt6/network/gen_qsslcertificateextension.go | 29 +- qt6/network/gen_qsslcertificateextension.h | 6 +- qt6/network/gen_qsslcipher.cpp | 28 +- qt6/network/gen_qsslcipher.go | 45 +- qt6/network/gen_qsslcipher.h | 10 +- qt6/network/gen_qsslconfiguration.cpp | 18 +- qt6/network/gen_qsslconfiguration.go | 29 +- qt6/network/gen_qsslconfiguration.h | 6 +- .../gen_qssldiffiehellmanparameters.cpp | 18 +- .../gen_qssldiffiehellmanparameters.go | 29 +- qt6/network/gen_qssldiffiehellmanparameters.h | 6 +- qt6/network/gen_qsslellipticcurve.cpp | 18 +- qt6/network/gen_qsslellipticcurve.go | 29 +- qt6/network/gen_qsslellipticcurve.h | 6 +- qt6/network/gen_qsslerror.cpp | 28 +- qt6/network/gen_qsslerror.go | 45 +- qt6/network/gen_qsslerror.h | 10 +- qt6/network/gen_qsslkey.cpp | 68 +- qt6/network/gen_qsslkey.go | 109 +- qt6/network/gen_qsslkey.h | 26 +- .../gen_qsslpresharedkeyauthenticator.cpp | 18 +- .../gen_qsslpresharedkeyauthenticator.go | 29 +- .../gen_qsslpresharedkeyauthenticator.h | 6 +- qt6/network/gen_qsslserver.cpp | 143 +- qt6/network/gen_qsslserver.go | 123 +- qt6/network/gen_qsslserver.h | 17 +- qt6/network/gen_qsslsocket.cpp | 743 +- qt6/network/gen_qsslsocket.go | 584 +- qt6/network/gen_qsslsocket.h | 75 +- qt6/network/gen_qtcpserver.cpp | 358 +- qt6/network/gen_qtcpserver.go | 273 +- qt6/network/gen_qtcpserver.h | 35 +- qt6/network/gen_qtcpsocket.cpp | 736 +- qt6/network/gen_qtcpsocket.go | 577 +- qt6/network/gen_qtcpsocket.h | 58 +- qt6/network/gen_qudpsocket.cpp | 735 +- qt6/network/gen_qudpsocket.go | 577 +- qt6/network/gen_qudpsocket.h | 56 +- qt6/printsupport/gen_qabstractprintdialog.cpp | 485 +- qt6/printsupport/gen_qabstractprintdialog.go | 367 +- qt6/printsupport/gen_qabstractprintdialog.h | 54 +- qt6/printsupport/gen_qpagesetupdialog.cpp | 505 +- qt6/printsupport/gen_qpagesetupdialog.go | 391 +- qt6/printsupport/gen_qpagesetupdialog.h | 58 +- qt6/printsupport/gen_qprintdialog.cpp | 191 +- qt6/printsupport/gen_qprintdialog.go | 163 +- qt6/printsupport/gen_qprintdialog.h | 26 +- qt6/printsupport/gen_qprintengine.cpp | 8 +- qt6/printsupport/gen_qprintengine.go | 13 +- qt6/printsupport/gen_qprintengine.h | 2 +- qt6/printsupport/gen_qprinter.cpp | 343 +- qt6/printsupport/gen_qprinter.go | 276 +- qt6/printsupport/gen_qprinter.h | 41 +- qt6/printsupport/gen_qprinterinfo.cpp | 23 +- qt6/printsupport/gen_qprinterinfo.go | 37 +- qt6/printsupport/gen_qprinterinfo.h | 8 +- qt6/printsupport/gen_qprintpreviewdialog.cpp | 527 +- qt6/printsupport/gen_qprintpreviewdialog.go | 416 +- qt6/printsupport/gen_qprintpreviewdialog.h | 62 +- qt6/printsupport/gen_qprintpreviewwidget.cpp | 1406 +++- qt6/printsupport/gen_qprintpreviewwidget.go | 1055 ++- qt6/printsupport/gen_qprintpreviewwidget.h | 152 +- qt6/spatialaudio/gen_qambientsound.cpp | 263 +- qt6/spatialaudio/gen_qambientsound.go | 198 +- qt6/spatialaudio/gen_qambientsound.h | 28 +- qt6/spatialaudio/gen_qaudioengine.cpp | 285 +- qt6/spatialaudio/gen_qaudioengine.go | 223 +- qt6/spatialaudio/gen_qaudioengine.h | 32 +- qt6/spatialaudio/gen_qaudiolistener.cpp | 255 +- qt6/spatialaudio/gen_qaudiolistener.go | 199 +- qt6/spatialaudio/gen_qaudiolistener.h | 28 +- qt6/spatialaudio/gen_qaudioroom.cpp | 271 +- qt6/spatialaudio/gen_qaudioroom.go | 196 +- qt6/spatialaudio/gen_qaudioroom.h | 28 +- qt6/spatialaudio/gen_qspatialsound.cpp | 283 +- qt6/spatialaudio/gen_qspatialsound.go | 198 +- qt6/spatialaudio/gen_qspatialsound.h | 28 +- 2984 files changed, 766251 insertions(+), 53184 deletions(-) diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp index af3ec6f1..239285e4 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp @@ -1,14 +1,32 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include +#include +#include +#include #include #define WORKAROUND_INNER_CLASS_DEFINITION_Scintilla__CharacterRange #define WORKAROUND_INNER_CLASS_DEFINITION_Scintilla__CharacterRangeFull @@ -45,20 +63,24 @@ #include "gen_ScintillaEdit.h" #include "_cgo_export.h" -Scintilla__Internal__Point* Scintilla__Internal__Point_new() { - return new Scintilla::Internal::Point(); +void Scintilla__Internal__Point_new(Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { + Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(); + *outptr_Scintilla__Internal__Point = ret; } -Scintilla__Internal__Point* Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1) { - return new Scintilla::Internal::Point(*param1); +void Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { + Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(*param1); + *outptr_Scintilla__Internal__Point = ret; } -Scintilla__Internal__Point* Scintilla__Internal__Point_new3(double x_) { - return new Scintilla::Internal::Point(static_cast(x_)); +void Scintilla__Internal__Point_new3(double x_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { + Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(static_cast(x_)); + *outptr_Scintilla__Internal__Point = ret; } -Scintilla__Internal__Point* Scintilla__Internal__Point_new4(double x_, double y_) { - return new Scintilla::Internal::Point(static_cast(x_), static_cast(y_)); +void Scintilla__Internal__Point_new4(double x_, double y_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { + Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(static_cast(x_), static_cast(y_)); + *outptr_Scintilla__Internal__Point = ret; } Scintilla__Internal__Point* Scintilla__Internal__Point_FromInts(int x_, int y_) { @@ -81,8 +103,12 @@ Scintilla__Internal__Point* Scintilla__Internal__Point_OperatorMinus(const Scint return new Scintilla::Internal::Point(self->operator-(*other)); } -void Scintilla__Internal__Point_Delete(Scintilla__Internal__Point* self) { - delete self; +void Scintilla__Internal__Point_Delete(Scintilla__Internal__Point* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool Scintilla__Internal__Interval_OperatorEqual(const Scintilla__Internal__Interval* self, Scintilla__Internal__Interval* other) { @@ -106,32 +132,42 @@ Scintilla__Internal__Interval* Scintilla__Internal__Interval_Offset(const Scinti return new Scintilla::Internal::Interval(self->Offset(static_cast(offset))); } -void Scintilla__Internal__Interval_Delete(Scintilla__Internal__Interval* self) { - delete self; +void Scintilla__Internal__Interval_Delete(Scintilla__Internal__Interval* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new() { - return new Scintilla::Internal::PRectangle(); +void Scintilla__Internal__PRectangle_new(Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { + Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(); + *outptr_Scintilla__Internal__PRectangle = ret; } -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1) { - return new Scintilla::Internal::PRectangle(*param1); +void Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { + Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(*param1); + *outptr_Scintilla__Internal__PRectangle = ret; } -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new3(double left_) { - return new Scintilla::Internal::PRectangle(static_cast(left_)); +void Scintilla__Internal__PRectangle_new3(double left_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { + Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_)); + *outptr_Scintilla__Internal__PRectangle = ret; } -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new4(double left_, double top_) { - return new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_)); +void Scintilla__Internal__PRectangle_new4(double left_, double top_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { + Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_)); + *outptr_Scintilla__Internal__PRectangle = ret; } -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_) { - return new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_)); +void Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { + Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_)); + *outptr_Scintilla__Internal__PRectangle = ret; } -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_) { - return new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_), static_cast(bottom_)); +void Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { + Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_), static_cast(bottom_)); + *outptr_Scintilla__Internal__PRectangle = ret; } Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_FromInts(int left_, int top_, int right_, int bottom_) { @@ -196,32 +232,42 @@ bool Scintilla__Internal__PRectangle_Empty(const Scintilla__Internal__PRectangle return self->Empty(); } -void Scintilla__Internal__PRectangle_Delete(Scintilla__Internal__PRectangle* self) { - delete self; +void Scintilla__Internal__PRectangle_Delete(Scintilla__Internal__PRectangle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new() { - return new Scintilla::Internal::ColourRGBA(); +void Scintilla__Internal__ColourRGBA_new(Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { + Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(); + *outptr_Scintilla__Internal__ColourRGBA = ret; } -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue) { - return new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue)); +void Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { + Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue)); + *outptr_Scintilla__Internal__ColourRGBA = ret; } -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha) { - return new Scintilla::Internal::ColourRGBA(*cd, static_cast(alpha)); +void Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { + Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(*cd, static_cast(alpha)); + *outptr_Scintilla__Internal__ColourRGBA = ret; } -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1) { - return new Scintilla::Internal::ColourRGBA(*param1); +void Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { + Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(*param1); + *outptr_Scintilla__Internal__ColourRGBA = ret; } -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new5(int co_) { - return new Scintilla::Internal::ColourRGBA(static_cast(co_)); +void Scintilla__Internal__ColourRGBA_new5(int co_, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { + Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(static_cast(co_)); + *outptr_Scintilla__Internal__ColourRGBA = ret; } -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) { - return new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue), static_cast(alpha)); +void Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { + Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue), static_cast(alpha)); + *outptr_Scintilla__Internal__ColourRGBA = ret; } Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_FromRGB(int co_) { @@ -308,160 +354,252 @@ Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_Grey2(unsigned return new Scintilla::Internal::ColourRGBA(Scintilla::Internal::ColourRGBA::Grey(static_cast(grey), static_cast(alpha))); } -void Scintilla__Internal__ColourRGBA_Delete(Scintilla__Internal__ColourRGBA* self) { - delete self; +void Scintilla__Internal__ColourRGBA_Delete(Scintilla__Internal__ColourRGBA* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_) { - return new Scintilla::Internal::Stroke(*colour_); +void Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke) { + Scintilla::Internal::Stroke* ret = new Scintilla::Internal::Stroke(*colour_); + *outptr_Scintilla__Internal__Stroke = ret; } -Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1) { - return new Scintilla::Internal::Stroke(*param1); +void Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke) { + Scintilla::Internal::Stroke* ret = new Scintilla::Internal::Stroke(*param1); + *outptr_Scintilla__Internal__Stroke = ret; } -Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_) { - return new Scintilla::Internal::Stroke(*colour_, static_cast(width_)); +void Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke) { + Scintilla::Internal::Stroke* ret = new Scintilla::Internal::Stroke(*colour_, static_cast(width_)); + *outptr_Scintilla__Internal__Stroke = ret; } float Scintilla__Internal__Stroke_WidthF(const Scintilla__Internal__Stroke* self) { return self->WidthF(); } -void Scintilla__Internal__Stroke_Delete(Scintilla__Internal__Stroke* self) { - delete self; +void Scintilla__Internal__Stroke_Delete(Scintilla__Internal__Stroke* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__Fill* Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_) { - return new Scintilla::Internal::Fill(*colour_); +void Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill) { + Scintilla::Internal::Fill* ret = new Scintilla::Internal::Fill(*colour_); + *outptr_Scintilla__Internal__Fill = ret; } -Scintilla__Internal__Fill* Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1) { - return new Scintilla::Internal::Fill(*param1); +void Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill) { + Scintilla::Internal::Fill* ret = new Scintilla::Internal::Fill(*param1); + *outptr_Scintilla__Internal__Fill = ret; } -void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self) { - delete self; +void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_) { - return new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_); +void Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { + Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_); + *outptr_Scintilla__Internal__FillStroke = ret; } -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth) { - return new Scintilla::Internal::FillStroke(*colourBoth); +void Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { + Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourBoth); + *outptr_Scintilla__Internal__FillStroke = ret; } -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_) { - return new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_, static_cast(widthStroke_)); +void Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { + Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_, static_cast(widthStroke_)); + *outptr_Scintilla__Internal__FillStroke = ret; } -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_) { - return new Scintilla::Internal::FillStroke(*colourBoth, static_cast(widthStroke_)); +void Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { + Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourBoth, static_cast(widthStroke_)); + *outptr_Scintilla__Internal__FillStroke = ret; } -void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* self) { - delete self; +void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__ColourStop* Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_) { - return new Scintilla::Internal::ColourStop(static_cast(position_), *colour_); +void Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__ColourStop** outptr_Scintilla__Internal__ColourStop) { + Scintilla::Internal::ColourStop* ret = new Scintilla::Internal::ColourStop(static_cast(position_), *colour_); + *outptr_Scintilla__Internal__ColourStop = ret; } -void Scintilla__Internal__ColourStop_Delete(Scintilla__Internal__ColourStop* self) { - delete self; +void Scintilla__Internal__ColourStop_Delete(Scintilla__Internal__ColourStop* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__CharacterRange_Delete(Scintilla__CharacterRange* self) { - delete self; +void Scintilla__CharacterRange_Delete(Scintilla__CharacterRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__CharacterRangeFull_Delete(Scintilla__CharacterRangeFull* self) { - delete self; +void Scintilla__CharacterRangeFull_Delete(Scintilla__CharacterRangeFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__TextRange_Delete(Scintilla__TextRange* self) { - delete self; +void Scintilla__TextRange_Delete(Scintilla__TextRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__TextRangeFull_Delete(Scintilla__TextRangeFull* self) { - delete self; +void Scintilla__TextRangeFull_Delete(Scintilla__TextRangeFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__TextToFind_Delete(Scintilla__TextToFind* self) { - delete self; +void Scintilla__TextToFind_Delete(Scintilla__TextToFind* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__TextToFindFull_Delete(Scintilla__TextToFindFull* self) { - delete self; +void Scintilla__TextToFindFull_Delete(Scintilla__TextToFindFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__Rectangle_Delete(Scintilla__Rectangle* self) { - delete self; +void Scintilla__Rectangle_Delete(Scintilla__Rectangle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__RangeToFormat_Delete(Scintilla__RangeToFormat* self) { - delete self; +void Scintilla__RangeToFormat_Delete(Scintilla__RangeToFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__RangeToFormatFull_Delete(Scintilla__RangeToFormatFull* self) { - delete self; +void Scintilla__RangeToFormatFull_Delete(Scintilla__RangeToFormatFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__NotifyHeader_Delete(Scintilla__NotifyHeader* self) { - delete self; +void Scintilla__NotifyHeader_Delete(Scintilla__NotifyHeader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__NotificationData_Delete(Scintilla__NotificationData* self) { - delete self; +void Scintilla__NotificationData_Delete(Scintilla__NotificationData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new(const char* faceName_) { - return new Scintilla::Internal::FontParameters(faceName_); +void Scintilla__Internal__FontParameters_new(const char* faceName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_)); +void Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_)); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_)); +void Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_)); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_); +void Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_)); +void Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_)); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_)); +void Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_)); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_)); +void Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_)); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_); +void Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_); + *outptr_Scintilla__Internal__FontParameters = ret; } -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_) { - return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_, static_cast(stretch_)); +void Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { + Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_, static_cast(stretch_)); + *outptr_Scintilla__Internal__FontParameters = ret; } -void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParameters* self) { - delete self; +void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParameters* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__Font* Scintilla__Internal__Font_new() { - return new Scintilla::Internal::Font(); +void Scintilla__Internal__Font_new(Scintilla__Internal__Font** outptr_Scintilla__Internal__Font) { + Scintilla::Internal::Font* ret = new Scintilla::Internal::Font(); + *outptr_Scintilla__Internal__Font = ret; } -void Scintilla__Internal__Font_Delete(Scintilla__Internal__Font* self) { - delete self; +void Scintilla__Internal__Font_Delete(Scintilla__Internal__Font* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } size_t Scintilla__Internal__IScreenLine_Length(const Scintilla__Internal__IScreenLine* self) { @@ -510,8 +648,12 @@ void Scintilla__Internal__IScreenLine_OperatorAssign(Scintilla__Internal__IScree self->operator=(*param1); } -void Scintilla__Internal__IScreenLine_Delete(Scintilla__Internal__IScreenLine* self) { - delete self; +void Scintilla__Internal__IScreenLine_Delete(Scintilla__Internal__IScreenLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } size_t Scintilla__Internal__IScreenLineLayout_PositionFromX(Scintilla__Internal__IScreenLineLayout* self, double xDistance, bool charPosition) { @@ -527,20 +669,30 @@ void Scintilla__Internal__IScreenLineLayout_OperatorAssign(Scintilla__Internal__ self->operator=(*param1); } -void Scintilla__Internal__IScreenLineLayout_Delete(Scintilla__Internal__IScreenLineLayout* self) { - delete self; +void Scintilla__Internal__IScreenLineLayout_Delete(Scintilla__Internal__IScreenLineLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new() { - return new Scintilla::Internal::SurfaceMode(); +void Scintilla__Internal__SurfaceMode_new(Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode) { + Scintilla::Internal::SurfaceMode* ret = new Scintilla::Internal::SurfaceMode(); + *outptr_Scintilla__Internal__SurfaceMode = ret; } -Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_) { - return new Scintilla::Internal::SurfaceMode(static_cast(codePage_), bidiR2L_); +void Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_, Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode) { + Scintilla::Internal::SurfaceMode* ret = new Scintilla::Internal::SurfaceMode(static_cast(codePage_), bidiR2L_); + *outptr_Scintilla__Internal__SurfaceMode = ret; } -void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* self) { - delete self; +void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid) { @@ -676,12 +828,17 @@ void Scintilla__Internal__Surface_FlushDrawing(Scintilla__Internal__Surface* sel self->FlushDrawing(); } -void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self) { - delete self; +void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__Window* Scintilla__Internal__Window_new() { - return new Scintilla::Internal::Window(); +void Scintilla__Internal__Window_new(Scintilla__Internal__Window** outptr_Scintilla__Internal__Window) { + Scintilla::Internal::Window* ret = new Scintilla::Internal::Window(); + *outptr_Scintilla__Internal__Window = ret; } void Scintilla__Internal__Window_OperatorAssign(Scintilla__Internal__Window* self, void* wid_) { @@ -741,16 +898,25 @@ void Scintilla__Internal__Window_Show1(Scintilla__Internal__Window* self, bool s self->Show(show); } -void Scintilla__Internal__Window_Delete(Scintilla__Internal__Window* self) { - delete self; +void Scintilla__Internal__Window_Delete(Scintilla__Internal__Window* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__ListBoxEvent* Scintilla__Internal__ListBoxEvent_new(int event_) { - return new Scintilla::Internal::ListBoxEvent(static_cast(event_)); +void Scintilla__Internal__ListBoxEvent_new(int event_, Scintilla__Internal__ListBoxEvent** outptr_Scintilla__Internal__ListBoxEvent) { + Scintilla::Internal::ListBoxEvent* ret = new Scintilla::Internal::ListBoxEvent(static_cast(event_)); + *outptr_Scintilla__Internal__ListBoxEvent = ret; } -void Scintilla__Internal__ListBoxEvent_Delete(Scintilla__Internal__ListBoxEvent* self) { - delete self; +void Scintilla__Internal__ListBoxEvent_Delete(Scintilla__Internal__ListBoxEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void Scintilla__Internal__IListBoxDelegate_ListNotify(Scintilla__Internal__IListBoxDelegate* self, Scintilla__Internal__ListBoxEvent* plbe) { @@ -761,12 +927,20 @@ void Scintilla__Internal__IListBoxDelegate_OperatorAssign(Scintilla__Internal__I self->operator=(*param1); } -void Scintilla__Internal__IListBoxDelegate_Delete(Scintilla__Internal__IListBoxDelegate* self) { - delete self; +void Scintilla__Internal__IListBoxDelegate_Delete(Scintilla__Internal__IListBoxDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* self) { - delete self; +void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox* self, Scintilla__Internal__Font* font) { @@ -801,8 +975,8 @@ void Scintilla__Internal__ListBox_Clear(Scintilla__Internal__ListBox* self) { self->Clear(); } -void Scintilla__Internal__ListBox_Append(Scintilla__Internal__ListBox* self, char* s) { - self->Append(s); +void Scintilla__Internal__ListBox_Append(Scintilla__Internal__ListBox* self, char* s, int typeVal) { + self->Append(s, static_cast(typeVal)); } int Scintilla__Internal__ListBox_Length(Scintilla__Internal__ListBox* self) { @@ -845,16 +1019,17 @@ void Scintilla__Internal__ListBox_SetOptions(Scintilla__Internal__ListBox* self, self->SetOptions(*options_); } -void Scintilla__Internal__ListBox_Append2(Scintilla__Internal__ListBox* self, char* s, int typeVal) { - self->Append(s, static_cast(typeVal)); -} - -void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self) { - delete self; +void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -Scintilla__Internal__Menu* Scintilla__Internal__Menu_new() { - return new Scintilla::Internal::Menu(); +void Scintilla__Internal__Menu_new(Scintilla__Internal__Menu** outptr_Scintilla__Internal__Menu) { + Scintilla::Internal::Menu* ret = new Scintilla::Internal::Menu(); + *outptr_Scintilla__Internal__Menu = ret; } void* Scintilla__Internal__Menu_GetID(const Scintilla__Internal__Menu* self) { @@ -874,60 +1049,778 @@ void Scintilla__Internal__Menu_Show(Scintilla__Internal__Menu* self, Scintilla__ self->Show(*pt, *w); } -void Scintilla__Internal__Menu_Delete(Scintilla__Internal__Menu* self) { - delete self; +void Scintilla__Internal__Menu_Delete(Scintilla__Internal__Menu* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_CharacterRange_Delete(Sci_CharacterRange* self) { - delete self; +void Sci_CharacterRange_Delete(Sci_CharacterRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_CharacterRangeFull_Delete(Sci_CharacterRangeFull* self) { - delete self; +void Sci_CharacterRangeFull_Delete(Sci_CharacterRangeFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_TextRange_Delete(Sci_TextRange* self) { - delete self; +void Sci_TextRange_Delete(Sci_TextRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_TextRangeFull_Delete(Sci_TextRangeFull* self) { - delete self; +void Sci_TextRangeFull_Delete(Sci_TextRangeFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_TextToFind_Delete(Sci_TextToFind* self) { - delete self; +void Sci_TextToFind_Delete(Sci_TextToFind* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_TextToFindFull_Delete(Sci_TextToFindFull* self) { - delete self; +void Sci_TextToFindFull_Delete(Sci_TextToFindFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_Rectangle_Delete(Sci_Rectangle* self) { - delete self; +void Sci_Rectangle_Delete(Sci_Rectangle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_RangeToFormat_Delete(Sci_RangeToFormat* self) { - delete self; +void Sci_RangeToFormat_Delete(Sci_RangeToFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_RangeToFormatFull_Delete(Sci_RangeToFormatFull* self) { - delete self; +void Sci_RangeToFormatFull_Delete(Sci_RangeToFormatFull* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void Sci_NotifyHeader_Delete(Sci_NotifyHeader* self) { - delete self; +void Sci_NotifyHeader_Delete(Sci_NotifyHeader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void SCNotification_Delete(SCNotification* self) { - delete self; +void SCNotification_Delete(SCNotification* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -ScintillaEditBase* ScintillaEditBase_new(QWidget* parent) { - return new ScintillaEditBase(parent); +class MiqtVirtualScintillaEditBase : public virtual ScintillaEditBase { +public: + + MiqtVirtualScintillaEditBase(QWidget* parent): ScintillaEditBase(parent) {}; + MiqtVirtualScintillaEditBase(): ScintillaEditBase() {}; + + virtual ~MiqtVirtualScintillaEditBase() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Send = 0; + + // Subclass to allow providing a Go implementation + virtual sptr_t send(unsigned int iMessage, uptr_t wParam, sptr_t lParam) const override { + if (handle__Send == 0) { + return ScintillaEditBase::send(iMessage, wParam, lParam); + } + + unsigned int sigval1 = iMessage; + uptr_t wParam_ret = wParam; + uintptr_t sigval2 = static_cast(wParam_ret); + sptr_t lParam_ret = lParam; + intptr_t sigval3 = static_cast(lParam_ret); + + intptr_t callback_return_value = miqt_exec_callback_ScintillaEditBase_Send(const_cast(this), handle__Send, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_Send(unsigned int iMessage, uintptr_t wParam, intptr_t lParam) const { + + sptr_t _ret = ScintillaEditBase::send(static_cast(iMessage), static_cast(wParam), static_cast(lParam)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sends = 0; + + // Subclass to allow providing a Go implementation + virtual sptr_t sends(unsigned int iMessage, uptr_t wParam, const char* s) const override { + if (handle__Sends == 0) { + return ScintillaEditBase::sends(iMessage, wParam, s); + } + + unsigned int sigval1 = iMessage; + uptr_t wParam_ret = wParam; + uintptr_t sigval2 = static_cast(wParam_ret); + const char* sigval3 = (const char*) s; + + intptr_t callback_return_value = miqt_exec_callback_ScintillaEditBase_Sends(const_cast(this), handle__Sends, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_Sends(unsigned int iMessage, uintptr_t wParam, const char* s) const { + + sptr_t _ret = ScintillaEditBase::sends(static_cast(iMessage), static_cast(wParam), s); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return ScintillaEditBase::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_ScintillaEditBase_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return ScintillaEditBase::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + ScintillaEditBase::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + ScintillaEditBase::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + ScintillaEditBase::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + ScintillaEditBase::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + ScintillaEditBase::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + ScintillaEditBase::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + ScintillaEditBase::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + ScintillaEditBase::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + ScintillaEditBase::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + ScintillaEditBase::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + ScintillaEditBase::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + ScintillaEditBase::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + ScintillaEditBase::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + ScintillaEditBase::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + ScintillaEditBase::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + ScintillaEditBase::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + ScintillaEditBase::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + ScintillaEditBase::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + ScintillaEditBase::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + ScintillaEditBase::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + ScintillaEditBase::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + ScintillaEditBase::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + ScintillaEditBase::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + ScintillaEditBase::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + ScintillaEditBase::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + ScintillaEditBase::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + ScintillaEditBase::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + ScintillaEditBase::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + ScintillaEditBase::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + ScintillaEditBase::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + ScintillaEditBase::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEditBase_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + ScintillaEditBase::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return ScintillaEditBase::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_ScintillaEditBase_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(ScintillaEditBase::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int param1, int param2) override { + if (handle__ScrollContentsBy == 0) { + ScintillaEditBase::scrollContentsBy(param1, param2); + return; + } + + int sigval1 = param1; + int sigval2 = param2; + + miqt_exec_callback_ScintillaEditBase_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int param1, int param2) { + + ScintillaEditBase::scrollContentsBy(static_cast(param1), static_cast(param2)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return ScintillaEditBase::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_ScintillaEditBase_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(ScintillaEditBase::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return ScintillaEditBase::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_ScintillaEditBase_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(ScintillaEditBase::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + ScintillaEditBase::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_ScintillaEditBase_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + ScintillaEditBase::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return ScintillaEditBase::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_ScintillaEditBase_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return ScintillaEditBase::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return ScintillaEditBase::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_ScintillaEditBase_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return ScintillaEditBase::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return ScintillaEditBase::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_ScintillaEditBase_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(ScintillaEditBase::viewportSizeHint()); + + } + +}; + +void ScintillaEditBase_new(QWidget* parent, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualScintillaEditBase* ret = new MiqtVirtualScintillaEditBase(parent); + *outptr_ScintillaEditBase = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -ScintillaEditBase* ScintillaEditBase_new2() { - return new ScintillaEditBase(); +void ScintillaEditBase_new2(ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualScintillaEditBase* ret = new MiqtVirtualScintillaEditBase(); + *outptr_ScintillaEditBase = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* ScintillaEditBase_MetaObject(const ScintillaEditBase* self) { @@ -960,13 +1853,13 @@ struct miqt_string ScintillaEditBase_TrUtf8(const char* s) { return _ms; } -intptr_t ScintillaEditBase_Send(const ScintillaEditBase* self, unsigned int iMessage) { - sptr_t _ret = self->send(static_cast(iMessage)); +intptr_t ScintillaEditBase_Send(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam) { + sptr_t _ret = self->send(static_cast(iMessage), static_cast(wParam), static_cast(lParam)); return static_cast(_ret); } -intptr_t ScintillaEditBase_Sends(const ScintillaEditBase* self, unsigned int iMessage) { - sptr_t _ret = self->sends(static_cast(iMessage)); +intptr_t ScintillaEditBase_Sends(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, const char* s) { + sptr_t _ret = self->sends(static_cast(iMessage), static_cast(wParam), s); return static_cast(_ret); } @@ -991,7 +1884,7 @@ void ScintillaEditBase_HorizontalScrolled(ScintillaEditBase* self, int value) { } void ScintillaEditBase_connect_HorizontalScrolled(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::horizontalScrolled), self, [=](int value) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::horizontalScrolled), self, [=](int value) { int sigval1 = value; miqt_exec_callback_ScintillaEditBase_HorizontalScrolled(slot, sigval1); }); @@ -1002,7 +1895,7 @@ void ScintillaEditBase_VerticalScrolled(ScintillaEditBase* self, int value) { } void ScintillaEditBase_connect_VerticalScrolled(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::verticalScrolled), self, [=](int value) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::verticalScrolled), self, [=](int value) { int sigval1 = value; miqt_exec_callback_ScintillaEditBase_VerticalScrolled(slot, sigval1); }); @@ -1013,7 +1906,7 @@ void ScintillaEditBase_HorizontalRangeChanged(ScintillaEditBase* self, int max, } void ScintillaEditBase_connect_HorizontalRangeChanged(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::horizontalRangeChanged), self, [=](int max, int page) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::horizontalRangeChanged), self, [=](int max, int page) { int sigval1 = max; int sigval2 = page; miqt_exec_callback_ScintillaEditBase_HorizontalRangeChanged(slot, sigval1, sigval2); @@ -1025,7 +1918,7 @@ void ScintillaEditBase_VerticalRangeChanged(ScintillaEditBase* self, int max, in } void ScintillaEditBase_connect_VerticalRangeChanged(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::verticalRangeChanged), self, [=](int max, int page) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::verticalRangeChanged), self, [=](int max, int page) { int sigval1 = max; int sigval2 = page; miqt_exec_callback_ScintillaEditBase_VerticalRangeChanged(slot, sigval1, sigval2); @@ -1037,7 +1930,7 @@ void ScintillaEditBase_NotifyChange(ScintillaEditBase* self) { } void ScintillaEditBase_connect_NotifyChange(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::notifyChange), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::notifyChange), self, [=]() { miqt_exec_callback_ScintillaEditBase_NotifyChange(slot); }); } @@ -1047,7 +1940,7 @@ void ScintillaEditBase_LinesAdded(ScintillaEditBase* self, intptr_t linesAdded) } void ScintillaEditBase_connect_LinesAdded(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::linesAdded), self, [=](Scintilla::Position linesAdded) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::linesAdded), self, [=](Scintilla::Position linesAdded) { Scintilla::Position linesAdded_ret = linesAdded; intptr_t sigval1 = static_cast(linesAdded_ret); miqt_exec_callback_ScintillaEditBase_LinesAdded(slot, sigval1); @@ -1059,7 +1952,7 @@ void ScintillaEditBase_AboutToCopy(ScintillaEditBase* self, QMimeData* data) { } void ScintillaEditBase_connect_AboutToCopy(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::aboutToCopy), self, [=](QMimeData* data) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::aboutToCopy), self, [=](QMimeData* data) { QMimeData* sigval1 = data; miqt_exec_callback_ScintillaEditBase_AboutToCopy(slot, sigval1); }); @@ -1070,7 +1963,7 @@ void ScintillaEditBase_StyleNeeded(ScintillaEditBase* self, intptr_t position) { } void ScintillaEditBase_connect_StyleNeeded(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::styleNeeded), self, [=](Scintilla::Position position) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::styleNeeded), self, [=](Scintilla::Position position) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); miqt_exec_callback_ScintillaEditBase_StyleNeeded(slot, sigval1); @@ -1082,7 +1975,7 @@ void ScintillaEditBase_CharAdded(ScintillaEditBase* self, int ch) { } void ScintillaEditBase_connect_CharAdded(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::charAdded), self, [=](int ch) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::charAdded), self, [=](int ch) { int sigval1 = ch; miqt_exec_callback_ScintillaEditBase_CharAdded(slot, sigval1); }); @@ -1093,7 +1986,7 @@ void ScintillaEditBase_SavePointChanged(ScintillaEditBase* self, bool dirty) { } void ScintillaEditBase_connect_SavePointChanged(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::savePointChanged), self, [=](bool dirty) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::savePointChanged), self, [=](bool dirty) { bool sigval1 = dirty; miqt_exec_callback_ScintillaEditBase_SavePointChanged(slot, sigval1); }); @@ -1104,7 +1997,7 @@ void ScintillaEditBase_ModifyAttemptReadOnly(ScintillaEditBase* self) { } void ScintillaEditBase_connect_ModifyAttemptReadOnly(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::modifyAttemptReadOnly), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::modifyAttemptReadOnly), self, [=]() { miqt_exec_callback_ScintillaEditBase_ModifyAttemptReadOnly(slot); }); } @@ -1114,7 +2007,7 @@ void ScintillaEditBase_Key(ScintillaEditBase* self, int key) { } void ScintillaEditBase_connect_Key(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::key), self, [=](int key) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::key), self, [=](int key) { int sigval1 = key; miqt_exec_callback_ScintillaEditBase_Key(slot, sigval1); }); @@ -1125,7 +2018,7 @@ void ScintillaEditBase_DoubleClick(ScintillaEditBase* self, intptr_t position, i } void ScintillaEditBase_connect_DoubleClick(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::doubleClick), self, [=](Scintilla::Position position, Scintilla::Position line) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::doubleClick), self, [=](Scintilla::Position position, Scintilla::Position line) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); Scintilla::Position line_ret = line; @@ -1139,7 +2032,7 @@ void ScintillaEditBase_UpdateUi(ScintillaEditBase* self, int updated) { } void ScintillaEditBase_connect_UpdateUi(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::updateUi), self, [=](Scintilla::Update updated) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::updateUi), self, [=](Scintilla::Update updated) { Scintilla::Update updated_ret = updated; int sigval1 = static_cast(updated_ret); miqt_exec_callback_ScintillaEditBase_UpdateUi(slot, sigval1); @@ -1152,7 +2045,7 @@ void ScintillaEditBase_Modified(ScintillaEditBase* self, int typeVal, intptr_t p } void ScintillaEditBase_connect_Modified(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::modified), self, [=](Scintilla::ModificationFlags typeVal, Scintilla::Position position, Scintilla::Position length, Scintilla::Position linesAdded, const QByteArray& text, Scintilla::Position line, Scintilla::FoldLevel foldNow, Scintilla::FoldLevel foldPrev) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::modified), self, [=](Scintilla::ModificationFlags typeVal, Scintilla::Position position, Scintilla::Position length, Scintilla::Position linesAdded, const QByteArray& text, Scintilla::Position line, Scintilla::FoldLevel foldNow, Scintilla::FoldLevel foldPrev) { Scintilla::ModificationFlags typeVal_ret = typeVal; int sigval1 = static_cast(typeVal_ret); Scintilla::Position position_ret = position; @@ -1182,7 +2075,7 @@ void ScintillaEditBase_MacroRecord(ScintillaEditBase* self, int message, uintptr } void ScintillaEditBase_connect_MacroRecord(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::macroRecord), self, [=](Scintilla::Message message, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::macroRecord), self, [=](Scintilla::Message message, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) { Scintilla::Message message_ret = message; int sigval1 = static_cast(message_ret); Scintilla::uptr_t wParam_ret = wParam; @@ -1198,7 +2091,7 @@ void ScintillaEditBase_MarginClicked(ScintillaEditBase* self, intptr_t position, } void ScintillaEditBase_connect_MarginClicked(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::marginClicked), self, [=](Scintilla::Position position, Scintilla::KeyMod modifiers, int margin) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::marginClicked), self, [=](Scintilla::Position position, Scintilla::KeyMod modifiers, int margin) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); Scintilla::KeyMod modifiers_ret = modifiers; @@ -1213,7 +2106,7 @@ void ScintillaEditBase_TextAreaClicked(ScintillaEditBase* self, intptr_t line, i } void ScintillaEditBase_connect_TextAreaClicked(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::textAreaClicked), self, [=](Scintilla::Position line, int modifiers) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::textAreaClicked), self, [=](Scintilla::Position line, int modifiers) { Scintilla::Position line_ret = line; intptr_t sigval1 = static_cast(line_ret); int sigval2 = modifiers; @@ -1226,7 +2119,7 @@ void ScintillaEditBase_NeedShown(ScintillaEditBase* self, intptr_t position, int } void ScintillaEditBase_connect_NeedShown(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::needShown), self, [=](Scintilla::Position position, Scintilla::Position length) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::needShown), self, [=](Scintilla::Position position, Scintilla::Position length) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); Scintilla::Position length_ret = length; @@ -1240,7 +2133,7 @@ void ScintillaEditBase_Painted(ScintillaEditBase* self) { } void ScintillaEditBase_connect_Painted(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::painted), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::painted), self, [=]() { miqt_exec_callback_ScintillaEditBase_Painted(slot); }); } @@ -1250,7 +2143,7 @@ void ScintillaEditBase_UserListSelection(ScintillaEditBase* self) { } void ScintillaEditBase_connect_UserListSelection(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::userListSelection), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::userListSelection), self, [=]() { miqt_exec_callback_ScintillaEditBase_UserListSelection(slot); }); } @@ -1261,7 +2154,7 @@ void ScintillaEditBase_UriDropped(ScintillaEditBase* self, struct miqt_string ur } void ScintillaEditBase_connect_UriDropped(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::uriDropped), self, [=](const QString& uri) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::uriDropped), self, [=](const QString& uri) { const QString uri_ret = uri; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray uri_b = uri_ret.toUtf8(); @@ -1279,7 +2172,7 @@ void ScintillaEditBase_DwellStart(ScintillaEditBase* self, int x, int y) { } void ScintillaEditBase_connect_DwellStart(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::dwellStart), self, [=](int x, int y) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::dwellStart), self, [=](int x, int y) { int sigval1 = x; int sigval2 = y; miqt_exec_callback_ScintillaEditBase_DwellStart(slot, sigval1, sigval2); @@ -1291,7 +2184,7 @@ void ScintillaEditBase_DwellEnd(ScintillaEditBase* self, int x, int y) { } void ScintillaEditBase_connect_DwellEnd(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::dwellEnd), self, [=](int x, int y) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::dwellEnd), self, [=](int x, int y) { int sigval1 = x; int sigval2 = y; miqt_exec_callback_ScintillaEditBase_DwellEnd(slot, sigval1, sigval2); @@ -1303,7 +2196,7 @@ void ScintillaEditBase_Zoom(ScintillaEditBase* self, int zoom) { } void ScintillaEditBase_connect_Zoom(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::zoom), self, [=](int zoom) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::zoom), self, [=](int zoom) { int sigval1 = zoom; miqt_exec_callback_ScintillaEditBase_Zoom(slot, sigval1); }); @@ -1314,7 +2207,7 @@ void ScintillaEditBase_HotSpotClick(ScintillaEditBase* self, intptr_t position, } void ScintillaEditBase_connect_HotSpotClick(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::hotSpotClick), self, [=](Scintilla::Position position, Scintilla::KeyMod modifiers) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::hotSpotClick), self, [=](Scintilla::Position position, Scintilla::KeyMod modifiers) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); Scintilla::KeyMod modifiers_ret = modifiers; @@ -1328,7 +2221,7 @@ void ScintillaEditBase_HotSpotDoubleClick(ScintillaEditBase* self, intptr_t posi } void ScintillaEditBase_connect_HotSpotDoubleClick(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::hotSpotDoubleClick), self, [=](Scintilla::Position position, Scintilla::KeyMod modifiers) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::hotSpotDoubleClick), self, [=](Scintilla::Position position, Scintilla::KeyMod modifiers) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); Scintilla::KeyMod modifiers_ret = modifiers; @@ -1342,7 +2235,7 @@ void ScintillaEditBase_CallTipClick(ScintillaEditBase* self) { } void ScintillaEditBase_connect_CallTipClick(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::callTipClick), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::callTipClick), self, [=]() { miqt_exec_callback_ScintillaEditBase_CallTipClick(slot); }); } @@ -1353,7 +2246,7 @@ void ScintillaEditBase_AutoCompleteSelection(ScintillaEditBase* self, intptr_t p } void ScintillaEditBase_connect_AutoCompleteSelection(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::autoCompleteSelection), self, [=](Scintilla::Position position, const QString& text) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::autoCompleteSelection), self, [=](Scintilla::Position position, const QString& text) { Scintilla::Position position_ret = position; intptr_t sigval1 = static_cast(position_ret); const QString text_ret = text; @@ -1373,7 +2266,7 @@ void ScintillaEditBase_AutoCompleteCancelled(ScintillaEditBase* self) { } void ScintillaEditBase_connect_AutoCompleteCancelled(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::autoCompleteCancelled), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::autoCompleteCancelled), self, [=]() { miqt_exec_callback_ScintillaEditBase_AutoCompleteCancelled(slot); }); } @@ -1383,7 +2276,7 @@ void ScintillaEditBase_FocusChanged(ScintillaEditBase* self, bool focused) { } void ScintillaEditBase_connect_FocusChanged(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::focusChanged), self, [=](bool focused) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::focusChanged), self, [=](bool focused) { bool sigval1 = focused; miqt_exec_callback_ScintillaEditBase_FocusChanged(slot, sigval1); }); @@ -1394,7 +2287,7 @@ void ScintillaEditBase_Notify(ScintillaEditBase* self, Scintilla__NotificationDa } void ScintillaEditBase_connect_Notify(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::notify), self, [=](Scintilla::NotificationData* pscn) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::notify), self, [=](Scintilla::NotificationData* pscn) { Scintilla__NotificationData* sigval1 = pscn; miqt_exec_callback_ScintillaEditBase_Notify(slot, sigval1); }); @@ -1405,7 +2298,7 @@ void ScintillaEditBase_Command(ScintillaEditBase* self, uintptr_t wParam, intptr } void ScintillaEditBase_connect_Command(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::command), self, [=](Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::command), self, [=](Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) { Scintilla::uptr_t wParam_ret = wParam; uintptr_t sigval1 = static_cast(wParam_ret); Scintilla::sptr_t lParam_ret = lParam; @@ -1419,7 +2312,7 @@ void ScintillaEditBase_ButtonPressed(ScintillaEditBase* self, QMouseEvent* event } void ScintillaEditBase_connect_ButtonPressed(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::buttonPressed), self, [=](QMouseEvent* event) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::buttonPressed), self, [=](QMouseEvent* event) { QMouseEvent* sigval1 = event; miqt_exec_callback_ScintillaEditBase_ButtonPressed(slot, sigval1); }); @@ -1430,7 +2323,7 @@ void ScintillaEditBase_ButtonReleased(ScintillaEditBase* self, QMouseEvent* even } void ScintillaEditBase_connect_ButtonReleased(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::buttonReleased), self, [=](QMouseEvent* event) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::buttonReleased), self, [=](QMouseEvent* event) { QMouseEvent* sigval1 = event; miqt_exec_callback_ScintillaEditBase_ButtonReleased(slot, sigval1); }); @@ -1441,7 +2334,7 @@ void ScintillaEditBase_KeyPressed(ScintillaEditBase* self, QKeyEvent* event) { } void ScintillaEditBase_connect_KeyPressed(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::keyPressed), self, [=](QKeyEvent* event) { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::keyPressed), self, [=](QKeyEvent* event) { QKeyEvent* sigval1 = event; miqt_exec_callback_ScintillaEditBase_KeyPressed(slot, sigval1); }); @@ -1452,7 +2345,7 @@ void ScintillaEditBase_Resized(ScintillaEditBase* self) { } void ScintillaEditBase_connect_Resized(ScintillaEditBase* self, intptr_t slot) { - ScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::resized), self, [=]() { + MiqtVirtualScintillaEditBase::connect(self, static_cast(&ScintillaEditBase::resized), self, [=]() { miqt_exec_callback_ScintillaEditBase_Resized(slot); }); } @@ -1501,113 +2394,501 @@ struct miqt_string ScintillaEditBase_TrUtf83(const char* s, const char* c, int n return _ms; } -intptr_t ScintillaEditBase_Send2(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam) { - sptr_t _ret = self->send(static_cast(iMessage), static_cast(wParam)); - return static_cast(_ret); +void ScintillaEditBase_override_virtual_Send(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__Send = slot; } -intptr_t ScintillaEditBase_Send3(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam) { - sptr_t _ret = self->send(static_cast(iMessage), static_cast(wParam), static_cast(lParam)); - return static_cast(_ret); +intptr_t ScintillaEditBase_virtualbase_Send(const void* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam) { + return ( (const MiqtVirtualScintillaEditBase*)(self) )->virtualbase_Send(iMessage, wParam, lParam); } -intptr_t ScintillaEditBase_Sends2(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam) { - sptr_t _ret = self->sends(static_cast(iMessage), static_cast(wParam)); - return static_cast(_ret); +void ScintillaEditBase_override_virtual_Sends(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__Sends = slot; } -intptr_t ScintillaEditBase_Sends3(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, const char* s) { - sptr_t _ret = self->sends(static_cast(iMessage), static_cast(wParam), s); - return static_cast(_ret); +intptr_t ScintillaEditBase_virtualbase_Sends(const void* self, unsigned int iMessage, uintptr_t wParam, const char* s) { + return ( (const MiqtVirtualScintillaEditBase*)(self) )->virtualbase_Sends(iMessage, wParam, s); } -void ScintillaEditBase_Delete(ScintillaEditBase* self) { - delete self; +void ScintillaEditBase_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__Event = slot; } -ScintillaDocument* ScintillaDocument_new() { - return new ScintillaDocument(); +bool ScintillaEditBase_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_Event(event); } -ScintillaDocument* ScintillaDocument_new2(QObject* parent) { - return new ScintillaDocument(parent); +void ScintillaEditBase_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__PaintEvent = slot; } -ScintillaDocument* ScintillaDocument_new3(QObject* parent, void* pdoc_) { - return new ScintillaDocument(parent, pdoc_); +void ScintillaEditBase_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_PaintEvent(event); } -QMetaObject* ScintillaDocument_MetaObject(const ScintillaDocument* self) { - return (QMetaObject*) self->metaObject(); +void ScintillaEditBase_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__WheelEvent = slot; } -void* ScintillaDocument_Metacast(ScintillaDocument* self, const char* param1) { - return self->qt_metacast(param1); +void ScintillaEditBase_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_WheelEvent(event); } -struct miqt_string ScintillaDocument_Tr(const char* s) { - QString _ret = ScintillaDocument::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void ScintillaEditBase_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__FocusInEvent = slot; } -struct miqt_string ScintillaDocument_TrUtf8(const char* s) { - QString _ret = ScintillaDocument::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void ScintillaEditBase_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_FocusInEvent(event); } -void* ScintillaDocument_Pointer(ScintillaDocument* self) { - return self->pointer(); +void ScintillaEditBase_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__FocusOutEvent = slot; } -int ScintillaDocument_LineFromPosition(ScintillaDocument* self, int pos) { - return self->line_from_position(static_cast(pos)); +void ScintillaEditBase_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_FocusOutEvent(event); } -bool ScintillaDocument_IsCrLf(ScintillaDocument* self, int pos) { - return self->is_cr_lf(static_cast(pos)); +void ScintillaEditBase_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__ResizeEvent = slot; } -bool ScintillaDocument_DeleteChars(ScintillaDocument* self, int pos, int lenVal) { - return self->delete_chars(static_cast(pos), static_cast(lenVal)); +void ScintillaEditBase_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_ResizeEvent(event); } -int ScintillaDocument_Undo(ScintillaDocument* self) { - return self->undo(); +void ScintillaEditBase_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__KeyPressEvent = slot; } -int ScintillaDocument_Redo(ScintillaDocument* self) { - return self->redo(); +void ScintillaEditBase_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_KeyPressEvent(event); } -bool ScintillaDocument_CanUndo(ScintillaDocument* self) { - return self->can_undo(); +void ScintillaEditBase_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__MousePressEvent = slot; } -bool ScintillaDocument_CanRedo(ScintillaDocument* self) { - return self->can_redo(); +void ScintillaEditBase_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_MousePressEvent(event); } -void ScintillaDocument_DeleteUndoHistory(ScintillaDocument* self) { - self->delete_undo_history(); +void ScintillaEditBase_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__MouseReleaseEvent = slot; } -bool ScintillaDocument_SetUndoCollection(ScintillaDocument* self, bool collect_undo) { - return self->set_undo_collection(collect_undo); +void ScintillaEditBase_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_MouseReleaseEvent(event); } -bool ScintillaDocument_IsCollectingUndo(ScintillaDocument* self) { +void ScintillaEditBase_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void ScintillaEditBase_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void ScintillaEditBase_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__MouseMoveEvent = slot; +} + +void ScintillaEditBase_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void ScintillaEditBase_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__ContextMenuEvent = slot; +} + +void ScintillaEditBase_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void ScintillaEditBase_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__DragEnterEvent = slot; +} + +void ScintillaEditBase_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_DragEnterEvent(event); +} + +void ScintillaEditBase_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__DragLeaveEvent = slot; +} + +void ScintillaEditBase_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void ScintillaEditBase_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__DragMoveEvent = slot; +} + +void ScintillaEditBase_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_DragMoveEvent(event); +} + +void ScintillaEditBase_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__DropEvent = slot; +} + +void ScintillaEditBase_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_DropEvent(event); +} + +void ScintillaEditBase_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__InputMethodEvent = slot; +} + +void ScintillaEditBase_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_InputMethodEvent(event); +} + +void ScintillaEditBase_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* ScintillaEditBase_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualScintillaEditBase*)(self) )->virtualbase_InputMethodQuery(query); +} + +void ScintillaEditBase_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__ScrollContentsBy = slot; +} + +void ScintillaEditBase_virtualbase_ScrollContentsBy(void* self, int param1, int param2) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_ScrollContentsBy(param1, param2); +} + +void ScintillaEditBase_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* ScintillaEditBase_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualScintillaEditBase*)(self) )->virtualbase_MinimumSizeHint(); +} + +void ScintillaEditBase_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__SizeHint = slot; +} + +QSize* ScintillaEditBase_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualScintillaEditBase*)(self) )->virtualbase_SizeHint(); +} + +void ScintillaEditBase_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__SetupViewport = slot; +} + +void ScintillaEditBase_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_SetupViewport(viewport); +} + +void ScintillaEditBase_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__EventFilter = slot; +} + +bool ScintillaEditBase_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void ScintillaEditBase_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__ViewportEvent = slot; +} + +bool ScintillaEditBase_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualScintillaEditBase*)(self) )->virtualbase_ViewportEvent(param1); +} + +void ScintillaEditBase_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEditBase*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* ScintillaEditBase_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualScintillaEditBase*)(self) )->virtualbase_ViewportSizeHint(); +} + +void ScintillaEditBase_Delete(ScintillaEditBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualScintillaDocument : public virtual ScintillaDocument { +public: + + MiqtVirtualScintillaDocument(): ScintillaDocument() {}; + MiqtVirtualScintillaDocument(QObject* parent): ScintillaDocument(parent) {}; + MiqtVirtualScintillaDocument(QObject* parent, void* pdoc_): ScintillaDocument(parent, pdoc_) {}; + + virtual ~MiqtVirtualScintillaDocument() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return ScintillaDocument::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_ScintillaDocument_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return ScintillaDocument::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return ScintillaDocument::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_ScintillaDocument_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return ScintillaDocument::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + ScintillaDocument::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_ScintillaDocument_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + ScintillaDocument::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + ScintillaDocument::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_ScintillaDocument_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + ScintillaDocument::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + ScintillaDocument::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_ScintillaDocument_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + ScintillaDocument::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + ScintillaDocument::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_ScintillaDocument_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + ScintillaDocument::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + ScintillaDocument::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_ScintillaDocument_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + ScintillaDocument::disconnectNotify(*signal); + + } + +}; + +void ScintillaDocument_new(ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject) { + MiqtVirtualScintillaDocument* ret = new MiqtVirtualScintillaDocument(); + *outptr_ScintillaDocument = ret; + *outptr_QObject = static_cast(ret); +} + +void ScintillaDocument_new2(QObject* parent, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject) { + MiqtVirtualScintillaDocument* ret = new MiqtVirtualScintillaDocument(parent); + *outptr_ScintillaDocument = ret; + *outptr_QObject = static_cast(ret); +} + +void ScintillaDocument_new3(QObject* parent, void* pdoc_, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject) { + MiqtVirtualScintillaDocument* ret = new MiqtVirtualScintillaDocument(parent, pdoc_); + *outptr_ScintillaDocument = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* ScintillaDocument_MetaObject(const ScintillaDocument* self) { + return (QMetaObject*) self->metaObject(); +} + +void* ScintillaDocument_Metacast(ScintillaDocument* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string ScintillaDocument_Tr(const char* s) { + QString _ret = ScintillaDocument::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string ScintillaDocument_TrUtf8(const char* s) { + QString _ret = ScintillaDocument::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void* ScintillaDocument_Pointer(ScintillaDocument* self) { + return self->pointer(); +} + +int ScintillaDocument_LineFromPosition(ScintillaDocument* self, int pos) { + return self->line_from_position(static_cast(pos)); +} + +bool ScintillaDocument_IsCrLf(ScintillaDocument* self, int pos) { + return self->is_cr_lf(static_cast(pos)); +} + +bool ScintillaDocument_DeleteChars(ScintillaDocument* self, int pos, int lenVal) { + return self->delete_chars(static_cast(pos), static_cast(lenVal)); +} + +int ScintillaDocument_Undo(ScintillaDocument* self) { + return self->undo(); +} + +int ScintillaDocument_Redo(ScintillaDocument* self) { + return self->redo(); +} + +bool ScintillaDocument_CanUndo(ScintillaDocument* self) { + return self->can_undo(); +} + +bool ScintillaDocument_CanRedo(ScintillaDocument* self) { + return self->can_redo(); +} + +void ScintillaDocument_DeleteUndoHistory(ScintillaDocument* self) { + self->delete_undo_history(); +} + +bool ScintillaDocument_SetUndoCollection(ScintillaDocument* self, bool collect_undo) { + return self->set_undo_collection(collect_undo); +} + +bool ScintillaDocument_IsCollectingUndo(ScintillaDocument* self) { return self->is_collecting_undo(); } @@ -1635,229 +2916,824 @@ bool ScintillaDocument_IsReadOnly(ScintillaDocument* self) { return self->is_read_only(); } -void ScintillaDocument_InsertString(ScintillaDocument* self, int position, struct miqt_string str) { - QByteArray str_QByteArray(str.data, str.len); - self->insert_string(static_cast(position), str_QByteArray); -} +void ScintillaDocument_InsertString(ScintillaDocument* self, int position, struct miqt_string str) { + QByteArray str_QByteArray(str.data, str.len); + self->insert_string(static_cast(position), str_QByteArray); +} + +struct miqt_string ScintillaDocument_GetCharRange(ScintillaDocument* self, int position, int length) { + QByteArray _qb = self->get_char_range(static_cast(position), static_cast(length)); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +char ScintillaDocument_StyleAt(ScintillaDocument* self, int position) { + return self->style_at(static_cast(position)); +} + +int ScintillaDocument_LineStart(ScintillaDocument* self, int lineno) { + return self->line_start(static_cast(lineno)); +} + +int ScintillaDocument_LineEnd(ScintillaDocument* self, int lineno) { + return self->line_end(static_cast(lineno)); +} + +int ScintillaDocument_LineEndPosition(ScintillaDocument* self, int pos) { + return self->line_end_position(static_cast(pos)); +} + +int ScintillaDocument_Length(ScintillaDocument* self) { + return self->length(); +} + +int ScintillaDocument_LinesTotal(ScintillaDocument* self) { + return self->lines_total(); +} + +void ScintillaDocument_StartStyling(ScintillaDocument* self, int position) { + self->start_styling(static_cast(position)); +} + +bool ScintillaDocument_SetStyleFor(ScintillaDocument* self, int length, char style) { + return self->set_style_for(static_cast(length), static_cast(style)); +} + +int ScintillaDocument_GetEndStyled(ScintillaDocument* self) { + return self->get_end_styled(); +} + +void ScintillaDocument_EnsureStyledTo(ScintillaDocument* self, int position) { + self->ensure_styled_to(static_cast(position)); +} + +void ScintillaDocument_SetCurrentIndicator(ScintillaDocument* self, int indic) { + self->set_current_indicator(static_cast(indic)); +} + +void ScintillaDocument_DecorationFillRange(ScintillaDocument* self, int position, int value, int fillLength) { + self->decoration_fill_range(static_cast(position), static_cast(value), static_cast(fillLength)); +} + +int ScintillaDocument_DecorationsValueAt(ScintillaDocument* self, int indic, int position) { + return self->decorations_value_at(static_cast(indic), static_cast(position)); +} + +int ScintillaDocument_DecorationsStart(ScintillaDocument* self, int indic, int position) { + return self->decorations_start(static_cast(indic), static_cast(position)); +} + +int ScintillaDocument_DecorationsEnd(ScintillaDocument* self, int indic, int position) { + return self->decorations_end(static_cast(indic), static_cast(position)); +} + +int ScintillaDocument_GetCodePage(ScintillaDocument* self) { + return self->get_code_page(); +} + +void ScintillaDocument_SetCodePage(ScintillaDocument* self, int code_page) { + self->set_code_page(static_cast(code_page)); +} + +int ScintillaDocument_GetEolMode(ScintillaDocument* self) { + return self->get_eol_mode(); +} + +void ScintillaDocument_SetEolMode(ScintillaDocument* self, int eol_mode) { + self->set_eol_mode(static_cast(eol_mode)); +} + +int ScintillaDocument_MovePositionOutsideChar(ScintillaDocument* self, int pos, int move_dir, bool check_line_end) { + return self->move_position_outside_char(static_cast(pos), static_cast(move_dir), check_line_end); +} + +int ScintillaDocument_GetCharacter(ScintillaDocument* self, int pos) { + return self->get_character(static_cast(pos)); +} + +void ScintillaDocument_ModifyAttempt(ScintillaDocument* self) { + self->modify_attempt(); +} + +void ScintillaDocument_connect_ModifyAttempt(ScintillaDocument* self, intptr_t slot) { + MiqtVirtualScintillaDocument::connect(self, static_cast(&ScintillaDocument::modify_attempt), self, [=]() { + miqt_exec_callback_ScintillaDocument_ModifyAttempt(slot); + }); +} + +void ScintillaDocument_SavePoint(ScintillaDocument* self, bool atSavePoint) { + self->save_point(atSavePoint); +} + +void ScintillaDocument_connect_SavePoint(ScintillaDocument* self, intptr_t slot) { + MiqtVirtualScintillaDocument::connect(self, static_cast(&ScintillaDocument::save_point), self, [=](bool atSavePoint) { + bool sigval1 = atSavePoint; + miqt_exec_callback_ScintillaDocument_SavePoint(slot, sigval1); + }); +} + +void ScintillaDocument_Modified(ScintillaDocument* self, int position, int modification_type, struct miqt_string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) { + QByteArray text_QByteArray(text.data, text.len); + self->modified(static_cast(position), static_cast(modification_type), text_QByteArray, static_cast(length), static_cast(linesAdded), static_cast(line), static_cast(foldLevelNow), static_cast(foldLevelPrev)); +} + +void ScintillaDocument_connect_Modified(ScintillaDocument* self, intptr_t slot) { + MiqtVirtualScintillaDocument::connect(self, static_cast(&ScintillaDocument::modified), self, [=](int position, int modification_type, const QByteArray& text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) { + int sigval1 = position; + int sigval2 = modification_type; + const QByteArray text_qb = text; + struct miqt_string text_ms; + text_ms.len = text_qb.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_qb.data(), text_ms.len); + struct miqt_string sigval3 = text_ms; + int sigval4 = length; + int sigval5 = linesAdded; + int sigval6 = line; + int sigval7 = foldLevelNow; + int sigval8 = foldLevelPrev; + miqt_exec_callback_ScintillaDocument_Modified(slot, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7, sigval8); + }); +} + +void ScintillaDocument_StyleNeeded(ScintillaDocument* self, int pos) { + self->style_needed(static_cast(pos)); +} + +void ScintillaDocument_connect_StyleNeeded(ScintillaDocument* self, intptr_t slot) { + MiqtVirtualScintillaDocument::connect(self, static_cast(&ScintillaDocument::style_needed), self, [=](int pos) { + int sigval1 = pos; + miqt_exec_callback_ScintillaDocument_StyleNeeded(slot, sigval1); + }); +} + +void ScintillaDocument_ErrorOccurred(ScintillaDocument* self, int status) { + self->error_occurred(static_cast(status)); +} + +void ScintillaDocument_connect_ErrorOccurred(ScintillaDocument* self, intptr_t slot) { + MiqtVirtualScintillaDocument::connect(self, static_cast(&ScintillaDocument::error_occurred), self, [=](int status) { + int sigval1 = status; + miqt_exec_callback_ScintillaDocument_ErrorOccurred(slot, sigval1); + }); +} + +struct miqt_string ScintillaDocument_Tr2(const char* s, const char* c) { + QString _ret = ScintillaDocument::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string ScintillaDocument_Tr3(const char* s, const char* c, int n) { + QString _ret = ScintillaDocument::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string ScintillaDocument_TrUtf82(const char* s, const char* c) { + QString _ret = ScintillaDocument::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string ScintillaDocument_TrUtf83(const char* s, const char* c, int n) { + QString _ret = ScintillaDocument::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void ScintillaDocument_BeginUndoAction1(ScintillaDocument* self, bool coalesceWithPrior) { + self->begin_undo_action(coalesceWithPrior); +} + +void ScintillaDocument_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__Event = slot; +} + +bool ScintillaDocument_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_Event(event); +} + +void ScintillaDocument_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__EventFilter = slot; +} + +bool ScintillaDocument_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_EventFilter(watched, event); +} + +void ScintillaDocument_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__TimerEvent = slot; +} + +void ScintillaDocument_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_TimerEvent(event); +} + +void ScintillaDocument_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__ChildEvent = slot; +} + +void ScintillaDocument_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_ChildEvent(event); +} + +void ScintillaDocument_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__CustomEvent = slot; +} + +void ScintillaDocument_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_CustomEvent(event); +} + +void ScintillaDocument_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__ConnectNotify = slot; +} + +void ScintillaDocument_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_ConnectNotify(signal); +} + +void ScintillaDocument_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (ScintillaDocument*)(self) )->handle__DisconnectNotify = slot; +} + +void ScintillaDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualScintillaDocument*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void ScintillaDocument_Delete(ScintillaDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualScintillaEdit : public virtual ScintillaEdit { +public: + + MiqtVirtualScintillaEdit(QWidget* parent): ScintillaEdit(parent) {}; + MiqtVirtualScintillaEdit(): ScintillaEdit() {}; + + virtual ~MiqtVirtualScintillaEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Send = 0; + + // Subclass to allow providing a Go implementation + virtual sptr_t send(unsigned int iMessage, uptr_t wParam, sptr_t lParam) const override { + if (handle__Send == 0) { + return ScintillaEdit::send(iMessage, wParam, lParam); + } + + unsigned int sigval1 = iMessage; + uptr_t wParam_ret = wParam; + uintptr_t sigval2 = static_cast(wParam_ret); + sptr_t lParam_ret = lParam; + intptr_t sigval3 = static_cast(lParam_ret); + + intptr_t callback_return_value = miqt_exec_callback_ScintillaEdit_Send(const_cast(this), handle__Send, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_Send(unsigned int iMessage, uintptr_t wParam, intptr_t lParam) const { + + sptr_t _ret = ScintillaEdit::send(static_cast(iMessage), static_cast(wParam), static_cast(lParam)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sends = 0; + + // Subclass to allow providing a Go implementation + virtual sptr_t sends(unsigned int iMessage, uptr_t wParam, const char* s) const override { + if (handle__Sends == 0) { + return ScintillaEdit::sends(iMessage, wParam, s); + } + + unsigned int sigval1 = iMessage; + uptr_t wParam_ret = wParam; + uintptr_t sigval2 = static_cast(wParam_ret); + const char* sigval3 = (const char*) s; + + intptr_t callback_return_value = miqt_exec_callback_ScintillaEdit_Sends(const_cast(this), handle__Sends, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_Sends(unsigned int iMessage, uintptr_t wParam, const char* s) const { + + sptr_t _ret = ScintillaEdit::sends(static_cast(iMessage), static_cast(wParam), s); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return ScintillaEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_ScintillaEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return ScintillaEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + ScintillaEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + ScintillaEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + ScintillaEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + ScintillaEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + ScintillaEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + ScintillaEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + ScintillaEdit::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + ScintillaEdit::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + ScintillaEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + ScintillaEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + ScintillaEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + ScintillaEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + ScintillaEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + ScintillaEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + ScintillaEdit::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + ScintillaEdit::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + ScintillaEdit::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + ScintillaEdit::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + ScintillaEdit::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + ScintillaEdit::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + ScintillaEdit::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + ScintillaEdit::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + ScintillaEdit::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + ScintillaEdit::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + ScintillaEdit::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_ScintillaEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } -struct miqt_string ScintillaDocument_GetCharRange(ScintillaDocument* self, int position, int length) { - QByteArray _qb = self->get_char_range(static_cast(position), static_cast(length)); - struct miqt_string _ms; - _ms.len = _qb.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _qb.data(), _ms.len); - return _ms; -} + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { -char ScintillaDocument_StyleAt(ScintillaDocument* self, int position) { - return self->style_at(static_cast(position)); -} + ScintillaEdit::dragLeaveEvent(event); -int ScintillaDocument_LineStart(ScintillaDocument* self, int lineno) { - return self->line_start(static_cast(lineno)); -} + } -int ScintillaDocument_LineEnd(ScintillaDocument* self, int lineno) { - return self->line_end(static_cast(lineno)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; -int ScintillaDocument_LineEndPosition(ScintillaDocument* self, int pos) { - return self->line_end_position(static_cast(pos)); -} + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + ScintillaEdit::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; -int ScintillaDocument_Length(ScintillaDocument* self) { - return self->length(); -} + miqt_exec_callback_ScintillaEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); -int ScintillaDocument_LinesTotal(ScintillaDocument* self) { - return self->lines_total(); -} + + } -void ScintillaDocument_StartStyling(ScintillaDocument* self, int position) { - self->start_styling(static_cast(position)); -} + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { -bool ScintillaDocument_SetStyleFor(ScintillaDocument* self, int length, char style) { - return self->set_style_for(static_cast(length), static_cast(style)); -} + ScintillaEdit::dragMoveEvent(event); -int ScintillaDocument_GetEndStyled(ScintillaDocument* self) { - return self->get_end_styled(); -} + } -void ScintillaDocument_EnsureStyledTo(ScintillaDocument* self, int position) { - self->ensure_styled_to(static_cast(position)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; -void ScintillaDocument_SetCurrentIndicator(ScintillaDocument* self, int indic) { - self->set_current_indicator(static_cast(indic)); -} + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + ScintillaEdit::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; -void ScintillaDocument_DecorationFillRange(ScintillaDocument* self, int position, int value, int fillLength) { - self->decoration_fill_range(static_cast(position), static_cast(value), static_cast(fillLength)); -} + miqt_exec_callback_ScintillaEdit_DropEvent(this, handle__DropEvent, sigval1); -int ScintillaDocument_DecorationsValueAt(ScintillaDocument* self, int indic, int position) { - return self->decorations_value_at(static_cast(indic), static_cast(position)); -} + + } -int ScintillaDocument_DecorationsStart(ScintillaDocument* self, int indic, int position) { - return self->decorations_start(static_cast(indic), static_cast(position)); -} + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { -int ScintillaDocument_DecorationsEnd(ScintillaDocument* self, int indic, int position) { - return self->decorations_end(static_cast(indic), static_cast(position)); -} + ScintillaEdit::dropEvent(event); -int ScintillaDocument_GetCodePage(ScintillaDocument* self) { - return self->get_code_page(); -} + } -void ScintillaDocument_SetCodePage(ScintillaDocument* self, int code_page) { - self->set_code_page(static_cast(code_page)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; -int ScintillaDocument_GetEolMode(ScintillaDocument* self) { - return self->get_eol_mode(); -} + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + ScintillaEdit::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; -void ScintillaDocument_SetEolMode(ScintillaDocument* self, int eol_mode) { - self->set_eol_mode(static_cast(eol_mode)); -} + miqt_exec_callback_ScintillaEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); -int ScintillaDocument_MovePositionOutsideChar(ScintillaDocument* self, int pos, int move_dir, bool check_line_end) { - return self->move_position_outside_char(static_cast(pos), static_cast(move_dir), check_line_end); -} + + } -int ScintillaDocument_GetCharacter(ScintillaDocument* self, int pos) { - return self->get_character(static_cast(pos)); -} + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { -void ScintillaDocument_ModifyAttempt(ScintillaDocument* self) { - self->modify_attempt(); -} + ScintillaEdit::inputMethodEvent(event); -void ScintillaDocument_connect_ModifyAttempt(ScintillaDocument* self, intptr_t slot) { - ScintillaDocument::connect(self, static_cast(&ScintillaDocument::modify_attempt), self, [=]() { - miqt_exec_callback_ScintillaDocument_ModifyAttempt(slot); - }); -} + } -void ScintillaDocument_SavePoint(ScintillaDocument* self, bool atSavePoint) { - self->save_point(atSavePoint); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; -void ScintillaDocument_connect_SavePoint(ScintillaDocument* self, intptr_t slot) { - ScintillaDocument::connect(self, static_cast(&ScintillaDocument::save_point), self, [=](bool atSavePoint) { - bool sigval1 = atSavePoint; - miqt_exec_callback_ScintillaDocument_SavePoint(slot, sigval1); - }); -} + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return ScintillaEdit::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); -void ScintillaDocument_Modified(ScintillaDocument* self, int position, int modification_type, struct miqt_string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) { - QByteArray text_QByteArray(text.data, text.len); - self->modified(static_cast(position), static_cast(modification_type), text_QByteArray, static_cast(length), static_cast(linesAdded), static_cast(line), static_cast(foldLevelNow), static_cast(foldLevelPrev)); -} + QVariant* callback_return_value = miqt_exec_callback_ScintillaEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); -void ScintillaDocument_connect_Modified(ScintillaDocument* self, intptr_t slot) { - ScintillaDocument::connect(self, static_cast(&ScintillaDocument::modified), self, [=](int position, int modification_type, const QByteArray& text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) { - int sigval1 = position; - int sigval2 = modification_type; - const QByteArray text_qb = text; - struct miqt_string text_ms; - text_ms.len = text_qb.length(); - text_ms.data = static_cast(malloc(text_ms.len)); - memcpy(text_ms.data, text_qb.data(), text_ms.len); - struct miqt_string sigval3 = text_ms; - int sigval4 = length; - int sigval5 = linesAdded; - int sigval6 = line; - int sigval7 = foldLevelNow; - int sigval8 = foldLevelPrev; - miqt_exec_callback_ScintillaDocument_Modified(slot, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7, sigval8); - }); -} + return *callback_return_value; + } -void ScintillaDocument_StyleNeeded(ScintillaDocument* self, int pos) { - self->style_needed(static_cast(pos)); -} + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { -void ScintillaDocument_connect_StyleNeeded(ScintillaDocument* self, intptr_t slot) { - ScintillaDocument::connect(self, static_cast(&ScintillaDocument::style_needed), self, [=](int pos) { - int sigval1 = pos; - miqt_exec_callback_ScintillaDocument_StyleNeeded(slot, sigval1); - }); -} + return new QVariant(ScintillaEdit::inputMethodQuery(static_cast(query))); -void ScintillaDocument_ErrorOccurred(ScintillaDocument* self, int status) { - self->error_occurred(static_cast(status)); -} + } -void ScintillaDocument_connect_ErrorOccurred(ScintillaDocument* self, intptr_t slot) { - ScintillaDocument::connect(self, static_cast(&ScintillaDocument::error_occurred), self, [=](int status) { - int sigval1 = status; - miqt_exec_callback_ScintillaDocument_ErrorOccurred(slot, sigval1); - }); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; -struct miqt_string ScintillaDocument_Tr2(const char* s, const char* c) { - QString _ret = ScintillaDocument::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int param1, int param2) override { + if (handle__ScrollContentsBy == 0) { + ScintillaEdit::scrollContentsBy(param1, param2); + return; + } + + int sigval1 = param1; + int sigval2 = param2; -struct miqt_string ScintillaDocument_Tr3(const char* s, const char* c, int n) { - QString _ret = ScintillaDocument::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + miqt_exec_callback_ScintillaEdit_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); -struct miqt_string ScintillaDocument_TrUtf82(const char* s, const char* c) { - QString _ret = ScintillaDocument::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + + } -struct miqt_string ScintillaDocument_TrUtf83(const char* s, const char* c, int n) { - QString _ret = ScintillaDocument::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int param1, int param2) { -void ScintillaDocument_BeginUndoAction1(ScintillaDocument* self, bool coalesceWithPrior) { - self->begin_undo_action(coalesceWithPrior); -} + ScintillaEdit::scrollContentsBy(static_cast(param1), static_cast(param2)); -void ScintillaDocument_Delete(ScintillaDocument* self) { - delete self; -} + } + +}; -ScintillaEdit* ScintillaEdit_new(QWidget* parent) { - return new ScintillaEdit(parent); +void ScintillaEdit_new(QWidget* parent, ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualScintillaEdit* ret = new MiqtVirtualScintillaEdit(parent); + *outptr_ScintillaEdit = ret; + *outptr_ScintillaEditBase = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -ScintillaEdit* ScintillaEdit_new2() { - return new ScintillaEdit(); +void ScintillaEdit_new2(ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualScintillaEdit* ret = new MiqtVirtualScintillaEdit(); + *outptr_ScintillaEdit = ret; + *outptr_ScintillaEditBase = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* ScintillaEdit_MetaObject(const ScintillaEdit* self) { @@ -5620,7 +7496,179 @@ struct miqt_string ScintillaEdit_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void ScintillaEdit_Delete(ScintillaEdit* self) { - delete self; +void ScintillaEdit_override_virtual_Send(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__Send = slot; +} + +intptr_t ScintillaEdit_virtualbase_Send(const void* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam) { + return ( (const MiqtVirtualScintillaEdit*)(self) )->virtualbase_Send(iMessage, wParam, lParam); +} + +void ScintillaEdit_override_virtual_Sends(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__Sends = slot; +} + +intptr_t ScintillaEdit_virtualbase_Sends(const void* self, unsigned int iMessage, uintptr_t wParam, const char* s) { + return ( (const MiqtVirtualScintillaEdit*)(self) )->virtualbase_Sends(iMessage, wParam, s); +} + +void ScintillaEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__Event = slot; +} + +bool ScintillaEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_Event(event); +} + +void ScintillaEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__PaintEvent = slot; +} + +void ScintillaEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void ScintillaEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__WheelEvent = slot; +} + +void ScintillaEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void ScintillaEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__FocusInEvent = slot; +} + +void ScintillaEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void ScintillaEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void ScintillaEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_FocusOutEvent(event); +} + +void ScintillaEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__ResizeEvent = slot; +} + +void ScintillaEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void ScintillaEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void ScintillaEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_KeyPressEvent(event); +} + +void ScintillaEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__MousePressEvent = slot; +} + +void ScintillaEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void ScintillaEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void ScintillaEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void ScintillaEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void ScintillaEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void ScintillaEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void ScintillaEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void ScintillaEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void ScintillaEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void ScintillaEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void ScintillaEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_DragEnterEvent(event); +} + +void ScintillaEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void ScintillaEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void ScintillaEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void ScintillaEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_DragMoveEvent(event); +} + +void ScintillaEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__DropEvent = slot; +} + +void ScintillaEdit_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_DropEvent(event); +} + +void ScintillaEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void ScintillaEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_InputMethodEvent(event); +} + +void ScintillaEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* ScintillaEdit_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualScintillaEdit*)(self) )->virtualbase_InputMethodQuery(query); +} + +void ScintillaEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (ScintillaEdit*)(self) )->handle__ScrollContentsBy = slot; +} + +void ScintillaEdit_virtualbase_ScrollContentsBy(void* self, int param1, int param2) { + ( (MiqtVirtualScintillaEdit*)(self) )->virtualbase_ScrollContentsBy(param1, param2); +} + +void ScintillaEdit_Delete(ScintillaEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.go b/qt-extras/scintillaedit/gen_ScintillaEdit.go index 689d07ba..eecb3f9a 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.go +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.go @@ -1707,7 +1707,8 @@ const ( ) type Scintilla__Internal__Point struct { - h *C.Scintilla__Internal__Point + h *C.Scintilla__Internal__Point + isSubclass bool } func (this *Scintilla__Internal__Point) cPointer() *C.Scintilla__Internal__Point { @@ -1724,6 +1725,7 @@ func (this *Scintilla__Internal__Point) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Point constructs the type using only CGO pointers. func newScintilla__Internal__Point(h *C.Scintilla__Internal__Point) *Scintilla__Internal__Point { if h == nil { return nil @@ -1731,32 +1733,53 @@ func newScintilla__Internal__Point(h *C.Scintilla__Internal__Point) *Scintilla__ return &Scintilla__Internal__Point{h: h} } +// UnsafeNewScintilla__Internal__Point constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Point(h unsafe.Pointer) *Scintilla__Internal__Point { - return newScintilla__Internal__Point((*C.Scintilla__Internal__Point)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Point{h: (*C.Scintilla__Internal__Point)(h)} } // NewScintilla__Internal__Point constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point() *Scintilla__Internal__Point { - ret := C.Scintilla__Internal__Point_new() - return newScintilla__Internal__Point(ret) + var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil + + C.Scintilla__Internal__Point_new(&outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret.isSubclass = true + return ret } // NewScintilla__Internal__Point2 constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point2(param1 *Scintilla__Internal__Point) *Scintilla__Internal__Point { - ret := C.Scintilla__Internal__Point_new2(param1.cPointer()) - return newScintilla__Internal__Point(ret) + var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil + + C.Scintilla__Internal__Point_new2(param1.cPointer(), &outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret.isSubclass = true + return ret } // NewScintilla__Internal__Point3 constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point3(x_ float64) *Scintilla__Internal__Point { - ret := C.Scintilla__Internal__Point_new3((C.double)(x_)) - return newScintilla__Internal__Point(ret) + var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil + + C.Scintilla__Internal__Point_new3((C.double)(x_), &outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret.isSubclass = true + return ret } // NewScintilla__Internal__Point4 constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point4(x_ float64, y_ float64) *Scintilla__Internal__Point { - ret := C.Scintilla__Internal__Point_new4((C.double)(x_), (C.double)(y_)) - return newScintilla__Internal__Point(ret) + var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil + + C.Scintilla__Internal__Point_new4((C.double)(x_), (C.double)(y_), &outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret.isSubclass = true + return ret } func Scintilla__Internal__Point_FromInts(x_ int, y_ int) *Scintilla__Internal__Point { @@ -1790,7 +1813,7 @@ func (this *Scintilla__Internal__Point) OperatorMinus(other Scintilla__Internal_ // Delete this object from C++ memory. func (this *Scintilla__Internal__Point) Delete() { - C.Scintilla__Internal__Point_Delete(this.h) + C.Scintilla__Internal__Point_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1803,7 +1826,8 @@ func (this *Scintilla__Internal__Point) GoGC() { } type Scintilla__Internal__Interval struct { - h *C.Scintilla__Internal__Interval + h *C.Scintilla__Internal__Interval + isSubclass bool } func (this *Scintilla__Internal__Interval) cPointer() *C.Scintilla__Internal__Interval { @@ -1820,6 +1844,7 @@ func (this *Scintilla__Internal__Interval) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Interval constructs the type using only CGO pointers. func newScintilla__Internal__Interval(h *C.Scintilla__Internal__Interval) *Scintilla__Internal__Interval { if h == nil { return nil @@ -1827,8 +1852,13 @@ func newScintilla__Internal__Interval(h *C.Scintilla__Internal__Interval) *Scint return &Scintilla__Internal__Interval{h: h} } +// UnsafeNewScintilla__Internal__Interval constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Interval(h unsafe.Pointer) *Scintilla__Internal__Interval { - return newScintilla__Internal__Interval((*C.Scintilla__Internal__Interval)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Interval{h: (*C.Scintilla__Internal__Interval)(h)} } func (this *Scintilla__Internal__Interval) OperatorEqual(other *Scintilla__Internal__Interval) bool { @@ -1856,7 +1886,7 @@ func (this *Scintilla__Internal__Interval) Offset(offset float64) *Scintilla__In // Delete this object from C++ memory. func (this *Scintilla__Internal__Interval) Delete() { - C.Scintilla__Internal__Interval_Delete(this.h) + C.Scintilla__Internal__Interval_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1869,7 +1899,8 @@ func (this *Scintilla__Internal__Interval) GoGC() { } type Scintilla__Internal__PRectangle struct { - h *C.Scintilla__Internal__PRectangle + h *C.Scintilla__Internal__PRectangle + isSubclass bool } func (this *Scintilla__Internal__PRectangle) cPointer() *C.Scintilla__Internal__PRectangle { @@ -1886,6 +1917,7 @@ func (this *Scintilla__Internal__PRectangle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__PRectangle constructs the type using only CGO pointers. func newScintilla__Internal__PRectangle(h *C.Scintilla__Internal__PRectangle) *Scintilla__Internal__PRectangle { if h == nil { return nil @@ -1893,44 +1925,73 @@ func newScintilla__Internal__PRectangle(h *C.Scintilla__Internal__PRectangle) *S return &Scintilla__Internal__PRectangle{h: h} } +// UnsafeNewScintilla__Internal__PRectangle constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__PRectangle(h unsafe.Pointer) *Scintilla__Internal__PRectangle { - return newScintilla__Internal__PRectangle((*C.Scintilla__Internal__PRectangle)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__PRectangle{h: (*C.Scintilla__Internal__PRectangle)(h)} } // NewScintilla__Internal__PRectangle constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle() *Scintilla__Internal__PRectangle { - ret := C.Scintilla__Internal__PRectangle_new() - return newScintilla__Internal__PRectangle(ret) + var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil + + C.Scintilla__Internal__PRectangle_new(&outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret.isSubclass = true + return ret } // NewScintilla__Internal__PRectangle2 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle2(param1 *Scintilla__Internal__PRectangle) *Scintilla__Internal__PRectangle { - ret := C.Scintilla__Internal__PRectangle_new2(param1.cPointer()) - return newScintilla__Internal__PRectangle(ret) + var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil + + C.Scintilla__Internal__PRectangle_new2(param1.cPointer(), &outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret.isSubclass = true + return ret } // NewScintilla__Internal__PRectangle3 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle3(left_ float64) *Scintilla__Internal__PRectangle { - ret := C.Scintilla__Internal__PRectangle_new3((C.double)(left_)) - return newScintilla__Internal__PRectangle(ret) + var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil + + C.Scintilla__Internal__PRectangle_new3((C.double)(left_), &outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret.isSubclass = true + return ret } // NewScintilla__Internal__PRectangle4 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle4(left_ float64, top_ float64) *Scintilla__Internal__PRectangle { - ret := C.Scintilla__Internal__PRectangle_new4((C.double)(left_), (C.double)(top_)) - return newScintilla__Internal__PRectangle(ret) + var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil + + C.Scintilla__Internal__PRectangle_new4((C.double)(left_), (C.double)(top_), &outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret.isSubclass = true + return ret } // NewScintilla__Internal__PRectangle5 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle5(left_ float64, top_ float64, right_ float64) *Scintilla__Internal__PRectangle { - ret := C.Scintilla__Internal__PRectangle_new5((C.double)(left_), (C.double)(top_), (C.double)(right_)) - return newScintilla__Internal__PRectangle(ret) + var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil + + C.Scintilla__Internal__PRectangle_new5((C.double)(left_), (C.double)(top_), (C.double)(right_), &outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret.isSubclass = true + return ret } // NewScintilla__Internal__PRectangle6 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle6(left_ float64, top_ float64, right_ float64, bottom_ float64) *Scintilla__Internal__PRectangle { - ret := C.Scintilla__Internal__PRectangle_new6((C.double)(left_), (C.double)(top_), (C.double)(right_), (C.double)(bottom_)) - return newScintilla__Internal__PRectangle(ret) + var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil + + C.Scintilla__Internal__PRectangle_new6((C.double)(left_), (C.double)(top_), (C.double)(right_), (C.double)(bottom_), &outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret.isSubclass = true + return ret } func Scintilla__Internal__PRectangle_FromInts(left_ int, top_ int, right_ int, bottom_ int) *Scintilla__Internal__PRectangle { @@ -2010,7 +2071,7 @@ func (this *Scintilla__Internal__PRectangle) Empty() bool { // Delete this object from C++ memory. func (this *Scintilla__Internal__PRectangle) Delete() { - C.Scintilla__Internal__PRectangle_Delete(this.h) + C.Scintilla__Internal__PRectangle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2023,7 +2084,8 @@ func (this *Scintilla__Internal__PRectangle) GoGC() { } type Scintilla__Internal__ColourRGBA struct { - h *C.Scintilla__Internal__ColourRGBA + h *C.Scintilla__Internal__ColourRGBA + isSubclass bool } func (this *Scintilla__Internal__ColourRGBA) cPointer() *C.Scintilla__Internal__ColourRGBA { @@ -2040,6 +2102,7 @@ func (this *Scintilla__Internal__ColourRGBA) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__ColourRGBA constructs the type using only CGO pointers. func newScintilla__Internal__ColourRGBA(h *C.Scintilla__Internal__ColourRGBA) *Scintilla__Internal__ColourRGBA { if h == nil { return nil @@ -2047,44 +2110,73 @@ func newScintilla__Internal__ColourRGBA(h *C.Scintilla__Internal__ColourRGBA) *S return &Scintilla__Internal__ColourRGBA{h: h} } +// UnsafeNewScintilla__Internal__ColourRGBA constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ColourRGBA(h unsafe.Pointer) *Scintilla__Internal__ColourRGBA { - return newScintilla__Internal__ColourRGBA((*C.Scintilla__Internal__ColourRGBA)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__ColourRGBA{h: (*C.Scintilla__Internal__ColourRGBA)(h)} } // NewScintilla__Internal__ColourRGBA constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA() *Scintilla__Internal__ColourRGBA { - ret := C.Scintilla__Internal__ColourRGBA_new() - return newScintilla__Internal__ColourRGBA(ret) + var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil + + C.Scintilla__Internal__ColourRGBA_new(&outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret.isSubclass = true + return ret } // NewScintilla__Internal__ColourRGBA2 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA2(red uint, green uint, blue uint) *Scintilla__Internal__ColourRGBA { - ret := C.Scintilla__Internal__ColourRGBA_new2((C.uint)(red), (C.uint)(green), (C.uint)(blue)) - return newScintilla__Internal__ColourRGBA(ret) + var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil + + C.Scintilla__Internal__ColourRGBA_new2((C.uint)(red), (C.uint)(green), (C.uint)(blue), &outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret.isSubclass = true + return ret } // NewScintilla__Internal__ColourRGBA3 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA3(cd Scintilla__Internal__ColourRGBA, alpha uint) *Scintilla__Internal__ColourRGBA { - ret := C.Scintilla__Internal__ColourRGBA_new3(cd.cPointer(), (C.uint)(alpha)) - return newScintilla__Internal__ColourRGBA(ret) + var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil + + C.Scintilla__Internal__ColourRGBA_new3(cd.cPointer(), (C.uint)(alpha), &outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret.isSubclass = true + return ret } // NewScintilla__Internal__ColourRGBA4 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA4(param1 *Scintilla__Internal__ColourRGBA) *Scintilla__Internal__ColourRGBA { - ret := C.Scintilla__Internal__ColourRGBA_new4(param1.cPointer()) - return newScintilla__Internal__ColourRGBA(ret) + var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil + + C.Scintilla__Internal__ColourRGBA_new4(param1.cPointer(), &outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret.isSubclass = true + return ret } // NewScintilla__Internal__ColourRGBA5 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA5(co_ int) *Scintilla__Internal__ColourRGBA { - ret := C.Scintilla__Internal__ColourRGBA_new5((C.int)(co_)) - return newScintilla__Internal__ColourRGBA(ret) + var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil + + C.Scintilla__Internal__ColourRGBA_new5((C.int)(co_), &outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret.isSubclass = true + return ret } // NewScintilla__Internal__ColourRGBA6 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA6(red uint, green uint, blue uint, alpha uint) *Scintilla__Internal__ColourRGBA { - ret := C.Scintilla__Internal__ColourRGBA_new6((C.uint)(red), (C.uint)(green), (C.uint)(blue), (C.uint)(alpha)) - return newScintilla__Internal__ColourRGBA(ret) + var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil + + C.Scintilla__Internal__ColourRGBA_new6((C.uint)(red), (C.uint)(green), (C.uint)(blue), (C.uint)(alpha), &outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret.isSubclass = true + return ret } func Scintilla__Internal__ColourRGBA_FromRGB(co_ int) *Scintilla__Internal__ColourRGBA { @@ -2197,7 +2289,7 @@ func Scintilla__Internal__ColourRGBA_Grey2(grey uint, alpha uint) *Scintilla__In // Delete this object from C++ memory. func (this *Scintilla__Internal__ColourRGBA) Delete() { - C.Scintilla__Internal__ColourRGBA_Delete(this.h) + C.Scintilla__Internal__ColourRGBA_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2210,7 +2302,8 @@ func (this *Scintilla__Internal__ColourRGBA) GoGC() { } type Scintilla__Internal__Stroke struct { - h *C.Scintilla__Internal__Stroke + h *C.Scintilla__Internal__Stroke + isSubclass bool } func (this *Scintilla__Internal__Stroke) cPointer() *C.Scintilla__Internal__Stroke { @@ -2227,6 +2320,7 @@ func (this *Scintilla__Internal__Stroke) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Stroke constructs the type using only CGO pointers. func newScintilla__Internal__Stroke(h *C.Scintilla__Internal__Stroke) *Scintilla__Internal__Stroke { if h == nil { return nil @@ -2234,26 +2328,43 @@ func newScintilla__Internal__Stroke(h *C.Scintilla__Internal__Stroke) *Scintilla return &Scintilla__Internal__Stroke{h: h} } +// UnsafeNewScintilla__Internal__Stroke constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Stroke(h unsafe.Pointer) *Scintilla__Internal__Stroke { - return newScintilla__Internal__Stroke((*C.Scintilla__Internal__Stroke)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Stroke{h: (*C.Scintilla__Internal__Stroke)(h)} } // NewScintilla__Internal__Stroke constructs a new Scintilla::Internal::Stroke object. func NewScintilla__Internal__Stroke(colour_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__Stroke { - ret := C.Scintilla__Internal__Stroke_new(colour_.cPointer()) - return newScintilla__Internal__Stroke(ret) + var outptr_Scintilla__Internal__Stroke *C.Scintilla__Internal__Stroke = nil + + C.Scintilla__Internal__Stroke_new(colour_.cPointer(), &outptr_Scintilla__Internal__Stroke) + ret := newScintilla__Internal__Stroke(outptr_Scintilla__Internal__Stroke) + ret.isSubclass = true + return ret } // NewScintilla__Internal__Stroke2 constructs a new Scintilla::Internal::Stroke object. func NewScintilla__Internal__Stroke2(param1 *Scintilla__Internal__Stroke) *Scintilla__Internal__Stroke { - ret := C.Scintilla__Internal__Stroke_new2(param1.cPointer()) - return newScintilla__Internal__Stroke(ret) + var outptr_Scintilla__Internal__Stroke *C.Scintilla__Internal__Stroke = nil + + C.Scintilla__Internal__Stroke_new2(param1.cPointer(), &outptr_Scintilla__Internal__Stroke) + ret := newScintilla__Internal__Stroke(outptr_Scintilla__Internal__Stroke) + ret.isSubclass = true + return ret } // NewScintilla__Internal__Stroke3 constructs a new Scintilla::Internal::Stroke object. func NewScintilla__Internal__Stroke3(colour_ Scintilla__Internal__ColourRGBA, width_ float64) *Scintilla__Internal__Stroke { - ret := C.Scintilla__Internal__Stroke_new3(colour_.cPointer(), (C.double)(width_)) - return newScintilla__Internal__Stroke(ret) + var outptr_Scintilla__Internal__Stroke *C.Scintilla__Internal__Stroke = nil + + C.Scintilla__Internal__Stroke_new3(colour_.cPointer(), (C.double)(width_), &outptr_Scintilla__Internal__Stroke) + ret := newScintilla__Internal__Stroke(outptr_Scintilla__Internal__Stroke) + ret.isSubclass = true + return ret } func (this *Scintilla__Internal__Stroke) WidthF() float32 { @@ -2262,7 +2373,7 @@ func (this *Scintilla__Internal__Stroke) WidthF() float32 { // Delete this object from C++ memory. func (this *Scintilla__Internal__Stroke) Delete() { - C.Scintilla__Internal__Stroke_Delete(this.h) + C.Scintilla__Internal__Stroke_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2275,7 +2386,8 @@ func (this *Scintilla__Internal__Stroke) GoGC() { } type Scintilla__Internal__Fill struct { - h *C.Scintilla__Internal__Fill + h *C.Scintilla__Internal__Fill + isSubclass bool } func (this *Scintilla__Internal__Fill) cPointer() *C.Scintilla__Internal__Fill { @@ -2292,6 +2404,7 @@ func (this *Scintilla__Internal__Fill) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Fill constructs the type using only CGO pointers. func newScintilla__Internal__Fill(h *C.Scintilla__Internal__Fill) *Scintilla__Internal__Fill { if h == nil { return nil @@ -2299,25 +2412,38 @@ func newScintilla__Internal__Fill(h *C.Scintilla__Internal__Fill) *Scintilla__In return &Scintilla__Internal__Fill{h: h} } +// UnsafeNewScintilla__Internal__Fill constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Fill(h unsafe.Pointer) *Scintilla__Internal__Fill { - return newScintilla__Internal__Fill((*C.Scintilla__Internal__Fill)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Fill{h: (*C.Scintilla__Internal__Fill)(h)} } // NewScintilla__Internal__Fill constructs a new Scintilla::Internal::Fill object. func NewScintilla__Internal__Fill(colour_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__Fill { - ret := C.Scintilla__Internal__Fill_new(colour_.cPointer()) - return newScintilla__Internal__Fill(ret) + var outptr_Scintilla__Internal__Fill *C.Scintilla__Internal__Fill = nil + + C.Scintilla__Internal__Fill_new(colour_.cPointer(), &outptr_Scintilla__Internal__Fill) + ret := newScintilla__Internal__Fill(outptr_Scintilla__Internal__Fill) + ret.isSubclass = true + return ret } // NewScintilla__Internal__Fill2 constructs a new Scintilla::Internal::Fill object. func NewScintilla__Internal__Fill2(param1 *Scintilla__Internal__Fill) *Scintilla__Internal__Fill { - ret := C.Scintilla__Internal__Fill_new2(param1.cPointer()) - return newScintilla__Internal__Fill(ret) + var outptr_Scintilla__Internal__Fill *C.Scintilla__Internal__Fill = nil + + C.Scintilla__Internal__Fill_new2(param1.cPointer(), &outptr_Scintilla__Internal__Fill) + ret := newScintilla__Internal__Fill(outptr_Scintilla__Internal__Fill) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__Fill) Delete() { - C.Scintilla__Internal__Fill_Delete(this.h) + C.Scintilla__Internal__Fill_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2330,7 +2456,8 @@ func (this *Scintilla__Internal__Fill) GoGC() { } type Scintilla__Internal__FillStroke struct { - h *C.Scintilla__Internal__FillStroke + h *C.Scintilla__Internal__FillStroke + isSubclass bool } func (this *Scintilla__Internal__FillStroke) cPointer() *C.Scintilla__Internal__FillStroke { @@ -2347,6 +2474,7 @@ func (this *Scintilla__Internal__FillStroke) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__FillStroke constructs the type using only CGO pointers. func newScintilla__Internal__FillStroke(h *C.Scintilla__Internal__FillStroke) *Scintilla__Internal__FillStroke { if h == nil { return nil @@ -2354,37 +2482,58 @@ func newScintilla__Internal__FillStroke(h *C.Scintilla__Internal__FillStroke) *S return &Scintilla__Internal__FillStroke{h: h} } +// UnsafeNewScintilla__Internal__FillStroke constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__FillStroke(h unsafe.Pointer) *Scintilla__Internal__FillStroke { - return newScintilla__Internal__FillStroke((*C.Scintilla__Internal__FillStroke)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__FillStroke{h: (*C.Scintilla__Internal__FillStroke)(h)} } // NewScintilla__Internal__FillStroke constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke(colourFill_ Scintilla__Internal__ColourRGBA, colourStroke_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__FillStroke { - ret := C.Scintilla__Internal__FillStroke_new(colourFill_.cPointer(), colourStroke_.cPointer()) - return newScintilla__Internal__FillStroke(ret) + var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil + + C.Scintilla__Internal__FillStroke_new(colourFill_.cPointer(), colourStroke_.cPointer(), &outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FillStroke2 constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke2(colourBoth Scintilla__Internal__ColourRGBA) *Scintilla__Internal__FillStroke { - ret := C.Scintilla__Internal__FillStroke_new2(colourBoth.cPointer()) - return newScintilla__Internal__FillStroke(ret) + var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil + + C.Scintilla__Internal__FillStroke_new2(colourBoth.cPointer(), &outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FillStroke3 constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke3(colourFill_ Scintilla__Internal__ColourRGBA, colourStroke_ Scintilla__Internal__ColourRGBA, widthStroke_ float64) *Scintilla__Internal__FillStroke { - ret := C.Scintilla__Internal__FillStroke_new3(colourFill_.cPointer(), colourStroke_.cPointer(), (C.double)(widthStroke_)) - return newScintilla__Internal__FillStroke(ret) + var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil + + C.Scintilla__Internal__FillStroke_new3(colourFill_.cPointer(), colourStroke_.cPointer(), (C.double)(widthStroke_), &outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FillStroke4 constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke4(colourBoth Scintilla__Internal__ColourRGBA, widthStroke_ float64) *Scintilla__Internal__FillStroke { - ret := C.Scintilla__Internal__FillStroke_new4(colourBoth.cPointer(), (C.double)(widthStroke_)) - return newScintilla__Internal__FillStroke(ret) + var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil + + C.Scintilla__Internal__FillStroke_new4(colourBoth.cPointer(), (C.double)(widthStroke_), &outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__FillStroke) Delete() { - C.Scintilla__Internal__FillStroke_Delete(this.h) + C.Scintilla__Internal__FillStroke_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2397,7 +2546,8 @@ func (this *Scintilla__Internal__FillStroke) GoGC() { } type Scintilla__Internal__ColourStop struct { - h *C.Scintilla__Internal__ColourStop + h *C.Scintilla__Internal__ColourStop + isSubclass bool } func (this *Scintilla__Internal__ColourStop) cPointer() *C.Scintilla__Internal__ColourStop { @@ -2414,6 +2564,7 @@ func (this *Scintilla__Internal__ColourStop) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__ColourStop constructs the type using only CGO pointers. func newScintilla__Internal__ColourStop(h *C.Scintilla__Internal__ColourStop) *Scintilla__Internal__ColourStop { if h == nil { return nil @@ -2421,19 +2572,28 @@ func newScintilla__Internal__ColourStop(h *C.Scintilla__Internal__ColourStop) *S return &Scintilla__Internal__ColourStop{h: h} } +// UnsafeNewScintilla__Internal__ColourStop constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ColourStop(h unsafe.Pointer) *Scintilla__Internal__ColourStop { - return newScintilla__Internal__ColourStop((*C.Scintilla__Internal__ColourStop)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__ColourStop{h: (*C.Scintilla__Internal__ColourStop)(h)} } // NewScintilla__Internal__ColourStop constructs a new Scintilla::Internal::ColourStop object. func NewScintilla__Internal__ColourStop(position_ float64, colour_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__ColourStop { - ret := C.Scintilla__Internal__ColourStop_new((C.double)(position_), colour_.cPointer()) - return newScintilla__Internal__ColourStop(ret) + var outptr_Scintilla__Internal__ColourStop *C.Scintilla__Internal__ColourStop = nil + + C.Scintilla__Internal__ColourStop_new((C.double)(position_), colour_.cPointer(), &outptr_Scintilla__Internal__ColourStop) + ret := newScintilla__Internal__ColourStop(outptr_Scintilla__Internal__ColourStop) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__ColourStop) Delete() { - C.Scintilla__Internal__ColourStop_Delete(this.h) + C.Scintilla__Internal__ColourStop_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2446,7 +2606,8 @@ func (this *Scintilla__Internal__ColourStop) GoGC() { } type Scintilla__CharacterRange struct { - h *C.Scintilla__CharacterRange + h *C.Scintilla__CharacterRange + isSubclass bool } func (this *Scintilla__CharacterRange) cPointer() *C.Scintilla__CharacterRange { @@ -2463,6 +2624,7 @@ func (this *Scintilla__CharacterRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__CharacterRange constructs the type using only CGO pointers. func newScintilla__CharacterRange(h *C.Scintilla__CharacterRange) *Scintilla__CharacterRange { if h == nil { return nil @@ -2470,13 +2632,18 @@ func newScintilla__CharacterRange(h *C.Scintilla__CharacterRange) *Scintilla__Ch return &Scintilla__CharacterRange{h: h} } +// UnsafeNewScintilla__CharacterRange constructs the type using only unsafe pointers. func UnsafeNewScintilla__CharacterRange(h unsafe.Pointer) *Scintilla__CharacterRange { - return newScintilla__CharacterRange((*C.Scintilla__CharacterRange)(h)) + if h == nil { + return nil + } + + return &Scintilla__CharacterRange{h: (*C.Scintilla__CharacterRange)(h)} } // Delete this object from C++ memory. func (this *Scintilla__CharacterRange) Delete() { - C.Scintilla__CharacterRange_Delete(this.h) + C.Scintilla__CharacterRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2489,7 +2656,8 @@ func (this *Scintilla__CharacterRange) GoGC() { } type Scintilla__CharacterRangeFull struct { - h *C.Scintilla__CharacterRangeFull + h *C.Scintilla__CharacterRangeFull + isSubclass bool } func (this *Scintilla__CharacterRangeFull) cPointer() *C.Scintilla__CharacterRangeFull { @@ -2506,6 +2674,7 @@ func (this *Scintilla__CharacterRangeFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__CharacterRangeFull constructs the type using only CGO pointers. func newScintilla__CharacterRangeFull(h *C.Scintilla__CharacterRangeFull) *Scintilla__CharacterRangeFull { if h == nil { return nil @@ -2513,13 +2682,18 @@ func newScintilla__CharacterRangeFull(h *C.Scintilla__CharacterRangeFull) *Scint return &Scintilla__CharacterRangeFull{h: h} } +// UnsafeNewScintilla__CharacterRangeFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__CharacterRangeFull(h unsafe.Pointer) *Scintilla__CharacterRangeFull { - return newScintilla__CharacterRangeFull((*C.Scintilla__CharacterRangeFull)(h)) + if h == nil { + return nil + } + + return &Scintilla__CharacterRangeFull{h: (*C.Scintilla__CharacterRangeFull)(h)} } // Delete this object from C++ memory. func (this *Scintilla__CharacterRangeFull) Delete() { - C.Scintilla__CharacterRangeFull_Delete(this.h) + C.Scintilla__CharacterRangeFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2532,7 +2706,8 @@ func (this *Scintilla__CharacterRangeFull) GoGC() { } type Scintilla__TextRange struct { - h *C.Scintilla__TextRange + h *C.Scintilla__TextRange + isSubclass bool } func (this *Scintilla__TextRange) cPointer() *C.Scintilla__TextRange { @@ -2549,6 +2724,7 @@ func (this *Scintilla__TextRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__TextRange constructs the type using only CGO pointers. func newScintilla__TextRange(h *C.Scintilla__TextRange) *Scintilla__TextRange { if h == nil { return nil @@ -2556,13 +2732,18 @@ func newScintilla__TextRange(h *C.Scintilla__TextRange) *Scintilla__TextRange { return &Scintilla__TextRange{h: h} } +// UnsafeNewScintilla__TextRange constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextRange(h unsafe.Pointer) *Scintilla__TextRange { - return newScintilla__TextRange((*C.Scintilla__TextRange)(h)) + if h == nil { + return nil + } + + return &Scintilla__TextRange{h: (*C.Scintilla__TextRange)(h)} } // Delete this object from C++ memory. func (this *Scintilla__TextRange) Delete() { - C.Scintilla__TextRange_Delete(this.h) + C.Scintilla__TextRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2575,7 +2756,8 @@ func (this *Scintilla__TextRange) GoGC() { } type Scintilla__TextRangeFull struct { - h *C.Scintilla__TextRangeFull + h *C.Scintilla__TextRangeFull + isSubclass bool } func (this *Scintilla__TextRangeFull) cPointer() *C.Scintilla__TextRangeFull { @@ -2592,6 +2774,7 @@ func (this *Scintilla__TextRangeFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__TextRangeFull constructs the type using only CGO pointers. func newScintilla__TextRangeFull(h *C.Scintilla__TextRangeFull) *Scintilla__TextRangeFull { if h == nil { return nil @@ -2599,13 +2782,18 @@ func newScintilla__TextRangeFull(h *C.Scintilla__TextRangeFull) *Scintilla__Text return &Scintilla__TextRangeFull{h: h} } +// UnsafeNewScintilla__TextRangeFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextRangeFull(h unsafe.Pointer) *Scintilla__TextRangeFull { - return newScintilla__TextRangeFull((*C.Scintilla__TextRangeFull)(h)) + if h == nil { + return nil + } + + return &Scintilla__TextRangeFull{h: (*C.Scintilla__TextRangeFull)(h)} } // Delete this object from C++ memory. func (this *Scintilla__TextRangeFull) Delete() { - C.Scintilla__TextRangeFull_Delete(this.h) + C.Scintilla__TextRangeFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2618,7 +2806,8 @@ func (this *Scintilla__TextRangeFull) GoGC() { } type Scintilla__TextToFind struct { - h *C.Scintilla__TextToFind + h *C.Scintilla__TextToFind + isSubclass bool } func (this *Scintilla__TextToFind) cPointer() *C.Scintilla__TextToFind { @@ -2635,6 +2824,7 @@ func (this *Scintilla__TextToFind) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__TextToFind constructs the type using only CGO pointers. func newScintilla__TextToFind(h *C.Scintilla__TextToFind) *Scintilla__TextToFind { if h == nil { return nil @@ -2642,13 +2832,18 @@ func newScintilla__TextToFind(h *C.Scintilla__TextToFind) *Scintilla__TextToFind return &Scintilla__TextToFind{h: h} } +// UnsafeNewScintilla__TextToFind constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextToFind(h unsafe.Pointer) *Scintilla__TextToFind { - return newScintilla__TextToFind((*C.Scintilla__TextToFind)(h)) + if h == nil { + return nil + } + + return &Scintilla__TextToFind{h: (*C.Scintilla__TextToFind)(h)} } // Delete this object from C++ memory. func (this *Scintilla__TextToFind) Delete() { - C.Scintilla__TextToFind_Delete(this.h) + C.Scintilla__TextToFind_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2661,7 +2856,8 @@ func (this *Scintilla__TextToFind) GoGC() { } type Scintilla__TextToFindFull struct { - h *C.Scintilla__TextToFindFull + h *C.Scintilla__TextToFindFull + isSubclass bool } func (this *Scintilla__TextToFindFull) cPointer() *C.Scintilla__TextToFindFull { @@ -2678,6 +2874,7 @@ func (this *Scintilla__TextToFindFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__TextToFindFull constructs the type using only CGO pointers. func newScintilla__TextToFindFull(h *C.Scintilla__TextToFindFull) *Scintilla__TextToFindFull { if h == nil { return nil @@ -2685,13 +2882,18 @@ func newScintilla__TextToFindFull(h *C.Scintilla__TextToFindFull) *Scintilla__Te return &Scintilla__TextToFindFull{h: h} } +// UnsafeNewScintilla__TextToFindFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextToFindFull(h unsafe.Pointer) *Scintilla__TextToFindFull { - return newScintilla__TextToFindFull((*C.Scintilla__TextToFindFull)(h)) + if h == nil { + return nil + } + + return &Scintilla__TextToFindFull{h: (*C.Scintilla__TextToFindFull)(h)} } // Delete this object from C++ memory. func (this *Scintilla__TextToFindFull) Delete() { - C.Scintilla__TextToFindFull_Delete(this.h) + C.Scintilla__TextToFindFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2704,7 +2906,8 @@ func (this *Scintilla__TextToFindFull) GoGC() { } type Scintilla__Rectangle struct { - h *C.Scintilla__Rectangle + h *C.Scintilla__Rectangle + isSubclass bool } func (this *Scintilla__Rectangle) cPointer() *C.Scintilla__Rectangle { @@ -2721,6 +2924,7 @@ func (this *Scintilla__Rectangle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Rectangle constructs the type using only CGO pointers. func newScintilla__Rectangle(h *C.Scintilla__Rectangle) *Scintilla__Rectangle { if h == nil { return nil @@ -2728,13 +2932,18 @@ func newScintilla__Rectangle(h *C.Scintilla__Rectangle) *Scintilla__Rectangle { return &Scintilla__Rectangle{h: h} } +// UnsafeNewScintilla__Rectangle constructs the type using only unsafe pointers. func UnsafeNewScintilla__Rectangle(h unsafe.Pointer) *Scintilla__Rectangle { - return newScintilla__Rectangle((*C.Scintilla__Rectangle)(h)) + if h == nil { + return nil + } + + return &Scintilla__Rectangle{h: (*C.Scintilla__Rectangle)(h)} } // Delete this object from C++ memory. func (this *Scintilla__Rectangle) Delete() { - C.Scintilla__Rectangle_Delete(this.h) + C.Scintilla__Rectangle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2747,7 +2956,8 @@ func (this *Scintilla__Rectangle) GoGC() { } type Scintilla__RangeToFormat struct { - h *C.Scintilla__RangeToFormat + h *C.Scintilla__RangeToFormat + isSubclass bool } func (this *Scintilla__RangeToFormat) cPointer() *C.Scintilla__RangeToFormat { @@ -2764,6 +2974,7 @@ func (this *Scintilla__RangeToFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__RangeToFormat constructs the type using only CGO pointers. func newScintilla__RangeToFormat(h *C.Scintilla__RangeToFormat) *Scintilla__RangeToFormat { if h == nil { return nil @@ -2771,13 +2982,18 @@ func newScintilla__RangeToFormat(h *C.Scintilla__RangeToFormat) *Scintilla__Rang return &Scintilla__RangeToFormat{h: h} } +// UnsafeNewScintilla__RangeToFormat constructs the type using only unsafe pointers. func UnsafeNewScintilla__RangeToFormat(h unsafe.Pointer) *Scintilla__RangeToFormat { - return newScintilla__RangeToFormat((*C.Scintilla__RangeToFormat)(h)) + if h == nil { + return nil + } + + return &Scintilla__RangeToFormat{h: (*C.Scintilla__RangeToFormat)(h)} } // Delete this object from C++ memory. func (this *Scintilla__RangeToFormat) Delete() { - C.Scintilla__RangeToFormat_Delete(this.h) + C.Scintilla__RangeToFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2790,7 +3006,8 @@ func (this *Scintilla__RangeToFormat) GoGC() { } type Scintilla__RangeToFormatFull struct { - h *C.Scintilla__RangeToFormatFull + h *C.Scintilla__RangeToFormatFull + isSubclass bool } func (this *Scintilla__RangeToFormatFull) cPointer() *C.Scintilla__RangeToFormatFull { @@ -2807,6 +3024,7 @@ func (this *Scintilla__RangeToFormatFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__RangeToFormatFull constructs the type using only CGO pointers. func newScintilla__RangeToFormatFull(h *C.Scintilla__RangeToFormatFull) *Scintilla__RangeToFormatFull { if h == nil { return nil @@ -2814,13 +3032,18 @@ func newScintilla__RangeToFormatFull(h *C.Scintilla__RangeToFormatFull) *Scintil return &Scintilla__RangeToFormatFull{h: h} } +// UnsafeNewScintilla__RangeToFormatFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__RangeToFormatFull(h unsafe.Pointer) *Scintilla__RangeToFormatFull { - return newScintilla__RangeToFormatFull((*C.Scintilla__RangeToFormatFull)(h)) + if h == nil { + return nil + } + + return &Scintilla__RangeToFormatFull{h: (*C.Scintilla__RangeToFormatFull)(h)} } // Delete this object from C++ memory. func (this *Scintilla__RangeToFormatFull) Delete() { - C.Scintilla__RangeToFormatFull_Delete(this.h) + C.Scintilla__RangeToFormatFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2833,7 +3056,8 @@ func (this *Scintilla__RangeToFormatFull) GoGC() { } type Scintilla__NotifyHeader struct { - h *C.Scintilla__NotifyHeader + h *C.Scintilla__NotifyHeader + isSubclass bool } func (this *Scintilla__NotifyHeader) cPointer() *C.Scintilla__NotifyHeader { @@ -2850,6 +3074,7 @@ func (this *Scintilla__NotifyHeader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__NotifyHeader constructs the type using only CGO pointers. func newScintilla__NotifyHeader(h *C.Scintilla__NotifyHeader) *Scintilla__NotifyHeader { if h == nil { return nil @@ -2857,13 +3082,18 @@ func newScintilla__NotifyHeader(h *C.Scintilla__NotifyHeader) *Scintilla__Notify return &Scintilla__NotifyHeader{h: h} } +// UnsafeNewScintilla__NotifyHeader constructs the type using only unsafe pointers. func UnsafeNewScintilla__NotifyHeader(h unsafe.Pointer) *Scintilla__NotifyHeader { - return newScintilla__NotifyHeader((*C.Scintilla__NotifyHeader)(h)) + if h == nil { + return nil + } + + return &Scintilla__NotifyHeader{h: (*C.Scintilla__NotifyHeader)(h)} } // Delete this object from C++ memory. func (this *Scintilla__NotifyHeader) Delete() { - C.Scintilla__NotifyHeader_Delete(this.h) + C.Scintilla__NotifyHeader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2876,7 +3106,8 @@ func (this *Scintilla__NotifyHeader) GoGC() { } type Scintilla__NotificationData struct { - h *C.Scintilla__NotificationData + h *C.Scintilla__NotificationData + isSubclass bool } func (this *Scintilla__NotificationData) cPointer() *C.Scintilla__NotificationData { @@ -2893,6 +3124,7 @@ func (this *Scintilla__NotificationData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__NotificationData constructs the type using only CGO pointers. func newScintilla__NotificationData(h *C.Scintilla__NotificationData) *Scintilla__NotificationData { if h == nil { return nil @@ -2900,13 +3132,18 @@ func newScintilla__NotificationData(h *C.Scintilla__NotificationData) *Scintilla return &Scintilla__NotificationData{h: h} } +// UnsafeNewScintilla__NotificationData constructs the type using only unsafe pointers. func UnsafeNewScintilla__NotificationData(h unsafe.Pointer) *Scintilla__NotificationData { - return newScintilla__NotificationData((*C.Scintilla__NotificationData)(h)) + if h == nil { + return nil + } + + return &Scintilla__NotificationData{h: (*C.Scintilla__NotificationData)(h)} } // Delete this object from C++ memory. func (this *Scintilla__NotificationData) Delete() { - C.Scintilla__NotificationData_Delete(this.h) + C.Scintilla__NotificationData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2919,7 +3156,8 @@ func (this *Scintilla__NotificationData) GoGC() { } type Scintilla__Internal__FontParameters struct { - h *C.Scintilla__Internal__FontParameters + h *C.Scintilla__Internal__FontParameters + isSubclass bool } func (this *Scintilla__Internal__FontParameters) cPointer() *C.Scintilla__Internal__FontParameters { @@ -2936,6 +3174,7 @@ func (this *Scintilla__Internal__FontParameters) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newScintilla__Internal__FontParameters constructs the type using only CGO pointers. func newScintilla__Internal__FontParameters(h *C.Scintilla__Internal__FontParameters) *Scintilla__Internal__FontParameters { if h == nil { return nil @@ -2943,64 +3182,97 @@ func newScintilla__Internal__FontParameters(h *C.Scintilla__Internal__FontParame return &Scintilla__Internal__FontParameters{h: h} } +// UnsafeNewScintilla__Internal__FontParameters constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__FontParameters(h unsafe.Pointer) *Scintilla__Internal__FontParameters { - return newScintilla__Internal__FontParameters((*C.Scintilla__Internal__FontParameters)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__FontParameters{h: (*C.Scintilla__Internal__FontParameters)(h)} } // NewScintilla__Internal__FontParameters constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters(faceName_ string) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new(faceName__Cstring) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new(faceName__Cstring, &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters2 constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters2(faceName_ string, size_ float64) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new2(faceName__Cstring, (C.double)(size_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new2(faceName__Cstring, (C.double)(size_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters3 constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters3(faceName_ string, size_ float64, weight_ Scintilla__FontWeight) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new3(faceName__Cstring, (C.double)(size_), (C.int)(weight_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new3(faceName__Cstring, (C.double)(size_), (C.int)(weight_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters4 constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters4(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new4(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new4(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters5 constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters5(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool, extraFontFlag_ Scintilla__FontQuality) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new5(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new5(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters6 constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters6(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool, extraFontFlag_ Scintilla__FontQuality, technology_ Scintilla__Technology) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new6(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new6(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters7 constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters7(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool, extraFontFlag_ Scintilla__FontQuality, technology_ Scintilla__Technology, characterSet_ Scintilla__CharacterSet) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new7(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new7(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters8 constructs a new Scintilla::Internal::FontParameters object. @@ -3009,8 +3281,12 @@ func NewScintilla__Internal__FontParameters8(faceName_ string, size_ float64, we defer C.free(unsafe.Pointer(faceName__Cstring)) localeName__Cstring := C.CString(localeName_) defer C.free(unsafe.Pointer(localeName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new8(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new8(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring, &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // NewScintilla__Internal__FontParameters9 constructs a new Scintilla::Internal::FontParameters object. @@ -3019,13 +3295,17 @@ func NewScintilla__Internal__FontParameters9(faceName_ string, size_ float64, we defer C.free(unsafe.Pointer(faceName__Cstring)) localeName__Cstring := C.CString(localeName_) defer C.free(unsafe.Pointer(localeName__Cstring)) - ret := C.Scintilla__Internal__FontParameters_new9(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring, (C.int)(stretch_)) - return newScintilla__Internal__FontParameters(ret) + var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil + + C.Scintilla__Internal__FontParameters_new9(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring, (C.int)(stretch_), &outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__FontParameters) Delete() { - C.Scintilla__Internal__FontParameters_Delete(this.h) + C.Scintilla__Internal__FontParameters_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3038,7 +3318,8 @@ func (this *Scintilla__Internal__FontParameters) GoGC() { } type Scintilla__Internal__Font struct { - h *C.Scintilla__Internal__Font + h *C.Scintilla__Internal__Font + isSubclass bool } func (this *Scintilla__Internal__Font) cPointer() *C.Scintilla__Internal__Font { @@ -3055,6 +3336,7 @@ func (this *Scintilla__Internal__Font) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Font constructs the type using only CGO pointers. func newScintilla__Internal__Font(h *C.Scintilla__Internal__Font) *Scintilla__Internal__Font { if h == nil { return nil @@ -3062,19 +3344,28 @@ func newScintilla__Internal__Font(h *C.Scintilla__Internal__Font) *Scintilla__In return &Scintilla__Internal__Font{h: h} } +// UnsafeNewScintilla__Internal__Font constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Font(h unsafe.Pointer) *Scintilla__Internal__Font { - return newScintilla__Internal__Font((*C.Scintilla__Internal__Font)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Font{h: (*C.Scintilla__Internal__Font)(h)} } // NewScintilla__Internal__Font constructs a new Scintilla::Internal::Font object. func NewScintilla__Internal__Font() *Scintilla__Internal__Font { - ret := C.Scintilla__Internal__Font_new() - return newScintilla__Internal__Font(ret) + var outptr_Scintilla__Internal__Font *C.Scintilla__Internal__Font = nil + + C.Scintilla__Internal__Font_new(&outptr_Scintilla__Internal__Font) + ret := newScintilla__Internal__Font(outptr_Scintilla__Internal__Font) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__Font) Delete() { - C.Scintilla__Internal__Font_Delete(this.h) + C.Scintilla__Internal__Font_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3087,7 +3378,8 @@ func (this *Scintilla__Internal__Font) GoGC() { } type Scintilla__Internal__IScreenLine struct { - h *C.Scintilla__Internal__IScreenLine + h *C.Scintilla__Internal__IScreenLine + isSubclass bool } func (this *Scintilla__Internal__IScreenLine) cPointer() *C.Scintilla__Internal__IScreenLine { @@ -3104,6 +3396,7 @@ func (this *Scintilla__Internal__IScreenLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__IScreenLine constructs the type using only CGO pointers. func newScintilla__Internal__IScreenLine(h *C.Scintilla__Internal__IScreenLine) *Scintilla__Internal__IScreenLine { if h == nil { return nil @@ -3111,8 +3404,13 @@ func newScintilla__Internal__IScreenLine(h *C.Scintilla__Internal__IScreenLine) return &Scintilla__Internal__IScreenLine{h: h} } +// UnsafeNewScintilla__Internal__IScreenLine constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__IScreenLine(h unsafe.Pointer) *Scintilla__Internal__IScreenLine { - return newScintilla__Internal__IScreenLine((*C.Scintilla__Internal__IScreenLine)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__IScreenLine{h: (*C.Scintilla__Internal__IScreenLine)(h)} } func (this *Scintilla__Internal__IScreenLine) Length() uint64 { @@ -3157,7 +3455,7 @@ func (this *Scintilla__Internal__IScreenLine) OperatorAssign(param1 *Scintilla__ // Delete this object from C++ memory. func (this *Scintilla__Internal__IScreenLine) Delete() { - C.Scintilla__Internal__IScreenLine_Delete(this.h) + C.Scintilla__Internal__IScreenLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3170,7 +3468,8 @@ func (this *Scintilla__Internal__IScreenLine) GoGC() { } type Scintilla__Internal__IScreenLineLayout struct { - h *C.Scintilla__Internal__IScreenLineLayout + h *C.Scintilla__Internal__IScreenLineLayout + isSubclass bool } func (this *Scintilla__Internal__IScreenLineLayout) cPointer() *C.Scintilla__Internal__IScreenLineLayout { @@ -3187,6 +3486,7 @@ func (this *Scintilla__Internal__IScreenLineLayout) UnsafePointer() unsafe.Point return unsafe.Pointer(this.h) } +// newScintilla__Internal__IScreenLineLayout constructs the type using only CGO pointers. func newScintilla__Internal__IScreenLineLayout(h *C.Scintilla__Internal__IScreenLineLayout) *Scintilla__Internal__IScreenLineLayout { if h == nil { return nil @@ -3194,8 +3494,13 @@ func newScintilla__Internal__IScreenLineLayout(h *C.Scintilla__Internal__IScreen return &Scintilla__Internal__IScreenLineLayout{h: h} } +// UnsafeNewScintilla__Internal__IScreenLineLayout constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__IScreenLineLayout(h unsafe.Pointer) *Scintilla__Internal__IScreenLineLayout { - return newScintilla__Internal__IScreenLineLayout((*C.Scintilla__Internal__IScreenLineLayout)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__IScreenLineLayout{h: (*C.Scintilla__Internal__IScreenLineLayout)(h)} } func (this *Scintilla__Internal__IScreenLineLayout) PositionFromX(xDistance float64, charPosition bool) uint64 { @@ -3212,7 +3517,7 @@ func (this *Scintilla__Internal__IScreenLineLayout) OperatorAssign(param1 *Scint // Delete this object from C++ memory. func (this *Scintilla__Internal__IScreenLineLayout) Delete() { - C.Scintilla__Internal__IScreenLineLayout_Delete(this.h) + C.Scintilla__Internal__IScreenLineLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3225,7 +3530,8 @@ func (this *Scintilla__Internal__IScreenLineLayout) GoGC() { } type Scintilla__Internal__SurfaceMode struct { - h *C.Scintilla__Internal__SurfaceMode + h *C.Scintilla__Internal__SurfaceMode + isSubclass bool } func (this *Scintilla__Internal__SurfaceMode) cPointer() *C.Scintilla__Internal__SurfaceMode { @@ -3242,6 +3548,7 @@ func (this *Scintilla__Internal__SurfaceMode) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__SurfaceMode constructs the type using only CGO pointers. func newScintilla__Internal__SurfaceMode(h *C.Scintilla__Internal__SurfaceMode) *Scintilla__Internal__SurfaceMode { if h == nil { return nil @@ -3249,25 +3556,38 @@ func newScintilla__Internal__SurfaceMode(h *C.Scintilla__Internal__SurfaceMode) return &Scintilla__Internal__SurfaceMode{h: h} } +// UnsafeNewScintilla__Internal__SurfaceMode constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__SurfaceMode(h unsafe.Pointer) *Scintilla__Internal__SurfaceMode { - return newScintilla__Internal__SurfaceMode((*C.Scintilla__Internal__SurfaceMode)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__SurfaceMode{h: (*C.Scintilla__Internal__SurfaceMode)(h)} } // NewScintilla__Internal__SurfaceMode constructs a new Scintilla::Internal::SurfaceMode object. func NewScintilla__Internal__SurfaceMode() *Scintilla__Internal__SurfaceMode { - ret := C.Scintilla__Internal__SurfaceMode_new() - return newScintilla__Internal__SurfaceMode(ret) + var outptr_Scintilla__Internal__SurfaceMode *C.Scintilla__Internal__SurfaceMode = nil + + C.Scintilla__Internal__SurfaceMode_new(&outptr_Scintilla__Internal__SurfaceMode) + ret := newScintilla__Internal__SurfaceMode(outptr_Scintilla__Internal__SurfaceMode) + ret.isSubclass = true + return ret } // NewScintilla__Internal__SurfaceMode2 constructs a new Scintilla::Internal::SurfaceMode object. func NewScintilla__Internal__SurfaceMode2(codePage_ int, bidiR2L_ bool) *Scintilla__Internal__SurfaceMode { - ret := C.Scintilla__Internal__SurfaceMode_new2((C.int)(codePage_), (C.bool)(bidiR2L_)) - return newScintilla__Internal__SurfaceMode(ret) + var outptr_Scintilla__Internal__SurfaceMode *C.Scintilla__Internal__SurfaceMode = nil + + C.Scintilla__Internal__SurfaceMode_new2((C.int)(codePage_), (C.bool)(bidiR2L_), &outptr_Scintilla__Internal__SurfaceMode) + ret := newScintilla__Internal__SurfaceMode(outptr_Scintilla__Internal__SurfaceMode) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__SurfaceMode) Delete() { - C.Scintilla__Internal__SurfaceMode_Delete(this.h) + C.Scintilla__Internal__SurfaceMode_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3280,7 +3600,8 @@ func (this *Scintilla__Internal__SurfaceMode) GoGC() { } type Scintilla__Internal__Surface struct { - h *C.Scintilla__Internal__Surface + h *C.Scintilla__Internal__Surface + isSubclass bool } func (this *Scintilla__Internal__Surface) cPointer() *C.Scintilla__Internal__Surface { @@ -3297,6 +3618,7 @@ func (this *Scintilla__Internal__Surface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Surface constructs the type using only CGO pointers. func newScintilla__Internal__Surface(h *C.Scintilla__Internal__Surface) *Scintilla__Internal__Surface { if h == nil { return nil @@ -3304,8 +3626,13 @@ func newScintilla__Internal__Surface(h *C.Scintilla__Internal__Surface) *Scintil return &Scintilla__Internal__Surface{h: h} } +// UnsafeNewScintilla__Internal__Surface constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Surface(h unsafe.Pointer) *Scintilla__Internal__Surface { - return newScintilla__Internal__Surface((*C.Scintilla__Internal__Surface)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Surface{h: (*C.Scintilla__Internal__Surface)(h)} } func (this *Scintilla__Internal__Surface) Init(wid unsafe.Pointer) { @@ -3438,7 +3765,7 @@ func (this *Scintilla__Internal__Surface) FlushDrawing() { // Delete this object from C++ memory. func (this *Scintilla__Internal__Surface) Delete() { - C.Scintilla__Internal__Surface_Delete(this.h) + C.Scintilla__Internal__Surface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3451,7 +3778,8 @@ func (this *Scintilla__Internal__Surface) GoGC() { } type Scintilla__Internal__Window struct { - h *C.Scintilla__Internal__Window + h *C.Scintilla__Internal__Window + isSubclass bool } func (this *Scintilla__Internal__Window) cPointer() *C.Scintilla__Internal__Window { @@ -3468,6 +3796,7 @@ func (this *Scintilla__Internal__Window) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Window constructs the type using only CGO pointers. func newScintilla__Internal__Window(h *C.Scintilla__Internal__Window) *Scintilla__Internal__Window { if h == nil { return nil @@ -3475,14 +3804,23 @@ func newScintilla__Internal__Window(h *C.Scintilla__Internal__Window) *Scintilla return &Scintilla__Internal__Window{h: h} } +// UnsafeNewScintilla__Internal__Window constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Window(h unsafe.Pointer) *Scintilla__Internal__Window { - return newScintilla__Internal__Window((*C.Scintilla__Internal__Window)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Window{h: (*C.Scintilla__Internal__Window)(h)} } // NewScintilla__Internal__Window constructs a new Scintilla::Internal::Window object. func NewScintilla__Internal__Window() *Scintilla__Internal__Window { - ret := C.Scintilla__Internal__Window_new() - return newScintilla__Internal__Window(ret) + var outptr_Scintilla__Internal__Window *C.Scintilla__Internal__Window = nil + + C.Scintilla__Internal__Window_new(&outptr_Scintilla__Internal__Window) + ret := newScintilla__Internal__Window(outptr_Scintilla__Internal__Window) + ret.isSubclass = true + return ret } func (this *Scintilla__Internal__Window) OperatorAssign(wid_ unsafe.Pointer) { @@ -3552,7 +3890,7 @@ func (this *Scintilla__Internal__Window) Show1(show bool) { // Delete this object from C++ memory. func (this *Scintilla__Internal__Window) Delete() { - C.Scintilla__Internal__Window_Delete(this.h) + C.Scintilla__Internal__Window_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3565,7 +3903,8 @@ func (this *Scintilla__Internal__Window) GoGC() { } type Scintilla__Internal__ListBoxEvent struct { - h *C.Scintilla__Internal__ListBoxEvent + h *C.Scintilla__Internal__ListBoxEvent + isSubclass bool } func (this *Scintilla__Internal__ListBoxEvent) cPointer() *C.Scintilla__Internal__ListBoxEvent { @@ -3582,6 +3921,7 @@ func (this *Scintilla__Internal__ListBoxEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__ListBoxEvent constructs the type using only CGO pointers. func newScintilla__Internal__ListBoxEvent(h *C.Scintilla__Internal__ListBoxEvent) *Scintilla__Internal__ListBoxEvent { if h == nil { return nil @@ -3589,19 +3929,28 @@ func newScintilla__Internal__ListBoxEvent(h *C.Scintilla__Internal__ListBoxEvent return &Scintilla__Internal__ListBoxEvent{h: h} } +// UnsafeNewScintilla__Internal__ListBoxEvent constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ListBoxEvent(h unsafe.Pointer) *Scintilla__Internal__ListBoxEvent { - return newScintilla__Internal__ListBoxEvent((*C.Scintilla__Internal__ListBoxEvent)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__ListBoxEvent{h: (*C.Scintilla__Internal__ListBoxEvent)(h)} } // NewScintilla__Internal__ListBoxEvent constructs a new Scintilla::Internal::ListBoxEvent object. func NewScintilla__Internal__ListBoxEvent(event_ Scintilla__Internal__ListBoxEvent__EventType) *Scintilla__Internal__ListBoxEvent { - ret := C.Scintilla__Internal__ListBoxEvent_new((C.int)(event_)) - return newScintilla__Internal__ListBoxEvent(ret) + var outptr_Scintilla__Internal__ListBoxEvent *C.Scintilla__Internal__ListBoxEvent = nil + + C.Scintilla__Internal__ListBoxEvent_new((C.int)(event_), &outptr_Scintilla__Internal__ListBoxEvent) + ret := newScintilla__Internal__ListBoxEvent(outptr_Scintilla__Internal__ListBoxEvent) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Scintilla__Internal__ListBoxEvent) Delete() { - C.Scintilla__Internal__ListBoxEvent_Delete(this.h) + C.Scintilla__Internal__ListBoxEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3614,7 +3963,8 @@ func (this *Scintilla__Internal__ListBoxEvent) GoGC() { } type Scintilla__Internal__IListBoxDelegate struct { - h *C.Scintilla__Internal__IListBoxDelegate + h *C.Scintilla__Internal__IListBoxDelegate + isSubclass bool } func (this *Scintilla__Internal__IListBoxDelegate) cPointer() *C.Scintilla__Internal__IListBoxDelegate { @@ -3631,6 +3981,7 @@ func (this *Scintilla__Internal__IListBoxDelegate) UnsafePointer() unsafe.Pointe return unsafe.Pointer(this.h) } +// newScintilla__Internal__IListBoxDelegate constructs the type using only CGO pointers. func newScintilla__Internal__IListBoxDelegate(h *C.Scintilla__Internal__IListBoxDelegate) *Scintilla__Internal__IListBoxDelegate { if h == nil { return nil @@ -3638,8 +3989,13 @@ func newScintilla__Internal__IListBoxDelegate(h *C.Scintilla__Internal__IListBox return &Scintilla__Internal__IListBoxDelegate{h: h} } +// UnsafeNewScintilla__Internal__IListBoxDelegate constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__IListBoxDelegate(h unsafe.Pointer) *Scintilla__Internal__IListBoxDelegate { - return newScintilla__Internal__IListBoxDelegate((*C.Scintilla__Internal__IListBoxDelegate)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__IListBoxDelegate{h: (*C.Scintilla__Internal__IListBoxDelegate)(h)} } func (this *Scintilla__Internal__IListBoxDelegate) ListNotify(plbe *Scintilla__Internal__ListBoxEvent) { @@ -3652,7 +4008,7 @@ func (this *Scintilla__Internal__IListBoxDelegate) OperatorAssign(param1 *Scinti // Delete this object from C++ memory. func (this *Scintilla__Internal__IListBoxDelegate) Delete() { - C.Scintilla__Internal__IListBoxDelegate_Delete(this.h) + C.Scintilla__Internal__IListBoxDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3665,7 +4021,8 @@ func (this *Scintilla__Internal__IListBoxDelegate) GoGC() { } type Scintilla__Internal__ListOptions struct { - h *C.Scintilla__Internal__ListOptions + h *C.Scintilla__Internal__ListOptions + isSubclass bool } func (this *Scintilla__Internal__ListOptions) cPointer() *C.Scintilla__Internal__ListOptions { @@ -3682,6 +4039,7 @@ func (this *Scintilla__Internal__ListOptions) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__ListOptions constructs the type using only CGO pointers. func newScintilla__Internal__ListOptions(h *C.Scintilla__Internal__ListOptions) *Scintilla__Internal__ListOptions { if h == nil { return nil @@ -3689,13 +4047,18 @@ func newScintilla__Internal__ListOptions(h *C.Scintilla__Internal__ListOptions) return &Scintilla__Internal__ListOptions{h: h} } +// UnsafeNewScintilla__Internal__ListOptions constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ListOptions(h unsafe.Pointer) *Scintilla__Internal__ListOptions { - return newScintilla__Internal__ListOptions((*C.Scintilla__Internal__ListOptions)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__ListOptions{h: (*C.Scintilla__Internal__ListOptions)(h)} } // Delete this object from C++ memory. func (this *Scintilla__Internal__ListOptions) Delete() { - C.Scintilla__Internal__ListOptions_Delete(this.h) + C.Scintilla__Internal__ListOptions_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3708,7 +4071,8 @@ func (this *Scintilla__Internal__ListOptions) GoGC() { } type Scintilla__Internal__ListBox struct { - h *C.Scintilla__Internal__ListBox + h *C.Scintilla__Internal__ListBox + isSubclass bool *Scintilla__Internal__Window } @@ -3726,15 +4090,23 @@ func (this *Scintilla__Internal__ListBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newScintilla__Internal__ListBox(h *C.Scintilla__Internal__ListBox) *Scintilla__Internal__ListBox { +// newScintilla__Internal__ListBox constructs the type using only CGO pointers. +func newScintilla__Internal__ListBox(h *C.Scintilla__Internal__ListBox, h_Scintilla__Internal__Window *C.Scintilla__Internal__Window) *Scintilla__Internal__ListBox { if h == nil { return nil } - return &Scintilla__Internal__ListBox{h: h, Scintilla__Internal__Window: UnsafeNewScintilla__Internal__Window(unsafe.Pointer(h))} + return &Scintilla__Internal__ListBox{h: h, + Scintilla__Internal__Window: newScintilla__Internal__Window(h_Scintilla__Internal__Window)} } -func UnsafeNewScintilla__Internal__ListBox(h unsafe.Pointer) *Scintilla__Internal__ListBox { - return newScintilla__Internal__ListBox((*C.Scintilla__Internal__ListBox)(h)) +// UnsafeNewScintilla__Internal__ListBox constructs the type using only unsafe pointers. +func UnsafeNewScintilla__Internal__ListBox(h unsafe.Pointer, h_Scintilla__Internal__Window unsafe.Pointer) *Scintilla__Internal__ListBox { + if h == nil { + return nil + } + + return &Scintilla__Internal__ListBox{h: (*C.Scintilla__Internal__ListBox)(h), + Scintilla__Internal__Window: UnsafeNewScintilla__Internal__Window(h_Scintilla__Internal__Window)} } func (this *Scintilla__Internal__ListBox) SetFont(font *Scintilla__Internal__Font) { @@ -3772,10 +4144,10 @@ func (this *Scintilla__Internal__ListBox) Clear() { C.Scintilla__Internal__ListBox_Clear(this.h) } -func (this *Scintilla__Internal__ListBox) Append(s string) { +func (this *Scintilla__Internal__ListBox) Append(s string, typeVal int) { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - C.Scintilla__Internal__ListBox_Append(this.h, s_Cstring) + C.Scintilla__Internal__ListBox_Append(this.h, s_Cstring, (C.int)(typeVal)) } func (this *Scintilla__Internal__ListBox) Length() int { @@ -3824,15 +4196,9 @@ func (this *Scintilla__Internal__ListBox) SetOptions(options_ Scintilla__Interna C.Scintilla__Internal__ListBox_SetOptions(this.h, options_.cPointer()) } -func (this *Scintilla__Internal__ListBox) Append2(s string, typeVal int) { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - C.Scintilla__Internal__ListBox_Append2(this.h, s_Cstring, (C.int)(typeVal)) -} - // Delete this object from C++ memory. func (this *Scintilla__Internal__ListBox) Delete() { - C.Scintilla__Internal__ListBox_Delete(this.h) + C.Scintilla__Internal__ListBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3845,7 +4211,8 @@ func (this *Scintilla__Internal__ListBox) GoGC() { } type Scintilla__Internal__Menu struct { - h *C.Scintilla__Internal__Menu + h *C.Scintilla__Internal__Menu + isSubclass bool } func (this *Scintilla__Internal__Menu) cPointer() *C.Scintilla__Internal__Menu { @@ -3862,6 +4229,7 @@ func (this *Scintilla__Internal__Menu) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newScintilla__Internal__Menu constructs the type using only CGO pointers. func newScintilla__Internal__Menu(h *C.Scintilla__Internal__Menu) *Scintilla__Internal__Menu { if h == nil { return nil @@ -3869,14 +4237,23 @@ func newScintilla__Internal__Menu(h *C.Scintilla__Internal__Menu) *Scintilla__In return &Scintilla__Internal__Menu{h: h} } +// UnsafeNewScintilla__Internal__Menu constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Menu(h unsafe.Pointer) *Scintilla__Internal__Menu { - return newScintilla__Internal__Menu((*C.Scintilla__Internal__Menu)(h)) + if h == nil { + return nil + } + + return &Scintilla__Internal__Menu{h: (*C.Scintilla__Internal__Menu)(h)} } // NewScintilla__Internal__Menu constructs a new Scintilla::Internal::Menu object. func NewScintilla__Internal__Menu() *Scintilla__Internal__Menu { - ret := C.Scintilla__Internal__Menu_new() - return newScintilla__Internal__Menu(ret) + var outptr_Scintilla__Internal__Menu *C.Scintilla__Internal__Menu = nil + + C.Scintilla__Internal__Menu_new(&outptr_Scintilla__Internal__Menu) + ret := newScintilla__Internal__Menu(outptr_Scintilla__Internal__Menu) + ret.isSubclass = true + return ret } func (this *Scintilla__Internal__Menu) GetID() unsafe.Pointer { @@ -3897,7 +4274,7 @@ func (this *Scintilla__Internal__Menu) Show(pt Scintilla__Internal__Point, w *Sc // Delete this object from C++ memory. func (this *Scintilla__Internal__Menu) Delete() { - C.Scintilla__Internal__Menu_Delete(this.h) + C.Scintilla__Internal__Menu_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3910,7 +4287,8 @@ func (this *Scintilla__Internal__Menu) GoGC() { } type Sci_CharacterRange struct { - h *C.Sci_CharacterRange + h *C.Sci_CharacterRange + isSubclass bool } func (this *Sci_CharacterRange) cPointer() *C.Sci_CharacterRange { @@ -3927,6 +4305,7 @@ func (this *Sci_CharacterRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_CharacterRange constructs the type using only CGO pointers. func newSci_CharacterRange(h *C.Sci_CharacterRange) *Sci_CharacterRange { if h == nil { return nil @@ -3934,13 +4313,18 @@ func newSci_CharacterRange(h *C.Sci_CharacterRange) *Sci_CharacterRange { return &Sci_CharacterRange{h: h} } +// UnsafeNewSci_CharacterRange constructs the type using only unsafe pointers. func UnsafeNewSci_CharacterRange(h unsafe.Pointer) *Sci_CharacterRange { - return newSci_CharacterRange((*C.Sci_CharacterRange)(h)) + if h == nil { + return nil + } + + return &Sci_CharacterRange{h: (*C.Sci_CharacterRange)(h)} } // Delete this object from C++ memory. func (this *Sci_CharacterRange) Delete() { - C.Sci_CharacterRange_Delete(this.h) + C.Sci_CharacterRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3953,7 +4337,8 @@ func (this *Sci_CharacterRange) GoGC() { } type Sci_CharacterRangeFull struct { - h *C.Sci_CharacterRangeFull + h *C.Sci_CharacterRangeFull + isSubclass bool } func (this *Sci_CharacterRangeFull) cPointer() *C.Sci_CharacterRangeFull { @@ -3970,6 +4355,7 @@ func (this *Sci_CharacterRangeFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_CharacterRangeFull constructs the type using only CGO pointers. func newSci_CharacterRangeFull(h *C.Sci_CharacterRangeFull) *Sci_CharacterRangeFull { if h == nil { return nil @@ -3977,13 +4363,18 @@ func newSci_CharacterRangeFull(h *C.Sci_CharacterRangeFull) *Sci_CharacterRangeF return &Sci_CharacterRangeFull{h: h} } +// UnsafeNewSci_CharacterRangeFull constructs the type using only unsafe pointers. func UnsafeNewSci_CharacterRangeFull(h unsafe.Pointer) *Sci_CharacterRangeFull { - return newSci_CharacterRangeFull((*C.Sci_CharacterRangeFull)(h)) + if h == nil { + return nil + } + + return &Sci_CharacterRangeFull{h: (*C.Sci_CharacterRangeFull)(h)} } // Delete this object from C++ memory. func (this *Sci_CharacterRangeFull) Delete() { - C.Sci_CharacterRangeFull_Delete(this.h) + C.Sci_CharacterRangeFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3996,7 +4387,8 @@ func (this *Sci_CharacterRangeFull) GoGC() { } type Sci_TextRange struct { - h *C.Sci_TextRange + h *C.Sci_TextRange + isSubclass bool } func (this *Sci_TextRange) cPointer() *C.Sci_TextRange { @@ -4013,6 +4405,7 @@ func (this *Sci_TextRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_TextRange constructs the type using only CGO pointers. func newSci_TextRange(h *C.Sci_TextRange) *Sci_TextRange { if h == nil { return nil @@ -4020,13 +4413,18 @@ func newSci_TextRange(h *C.Sci_TextRange) *Sci_TextRange { return &Sci_TextRange{h: h} } +// UnsafeNewSci_TextRange constructs the type using only unsafe pointers. func UnsafeNewSci_TextRange(h unsafe.Pointer) *Sci_TextRange { - return newSci_TextRange((*C.Sci_TextRange)(h)) + if h == nil { + return nil + } + + return &Sci_TextRange{h: (*C.Sci_TextRange)(h)} } // Delete this object from C++ memory. func (this *Sci_TextRange) Delete() { - C.Sci_TextRange_Delete(this.h) + C.Sci_TextRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4039,7 +4437,8 @@ func (this *Sci_TextRange) GoGC() { } type Sci_TextRangeFull struct { - h *C.Sci_TextRangeFull + h *C.Sci_TextRangeFull + isSubclass bool } func (this *Sci_TextRangeFull) cPointer() *C.Sci_TextRangeFull { @@ -4056,6 +4455,7 @@ func (this *Sci_TextRangeFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_TextRangeFull constructs the type using only CGO pointers. func newSci_TextRangeFull(h *C.Sci_TextRangeFull) *Sci_TextRangeFull { if h == nil { return nil @@ -4063,13 +4463,18 @@ func newSci_TextRangeFull(h *C.Sci_TextRangeFull) *Sci_TextRangeFull { return &Sci_TextRangeFull{h: h} } +// UnsafeNewSci_TextRangeFull constructs the type using only unsafe pointers. func UnsafeNewSci_TextRangeFull(h unsafe.Pointer) *Sci_TextRangeFull { - return newSci_TextRangeFull((*C.Sci_TextRangeFull)(h)) + if h == nil { + return nil + } + + return &Sci_TextRangeFull{h: (*C.Sci_TextRangeFull)(h)} } // Delete this object from C++ memory. func (this *Sci_TextRangeFull) Delete() { - C.Sci_TextRangeFull_Delete(this.h) + C.Sci_TextRangeFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4082,7 +4487,8 @@ func (this *Sci_TextRangeFull) GoGC() { } type Sci_TextToFind struct { - h *C.Sci_TextToFind + h *C.Sci_TextToFind + isSubclass bool } func (this *Sci_TextToFind) cPointer() *C.Sci_TextToFind { @@ -4099,6 +4505,7 @@ func (this *Sci_TextToFind) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_TextToFind constructs the type using only CGO pointers. func newSci_TextToFind(h *C.Sci_TextToFind) *Sci_TextToFind { if h == nil { return nil @@ -4106,13 +4513,18 @@ func newSci_TextToFind(h *C.Sci_TextToFind) *Sci_TextToFind { return &Sci_TextToFind{h: h} } +// UnsafeNewSci_TextToFind constructs the type using only unsafe pointers. func UnsafeNewSci_TextToFind(h unsafe.Pointer) *Sci_TextToFind { - return newSci_TextToFind((*C.Sci_TextToFind)(h)) + if h == nil { + return nil + } + + return &Sci_TextToFind{h: (*C.Sci_TextToFind)(h)} } // Delete this object from C++ memory. func (this *Sci_TextToFind) Delete() { - C.Sci_TextToFind_Delete(this.h) + C.Sci_TextToFind_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4125,7 +4537,8 @@ func (this *Sci_TextToFind) GoGC() { } type Sci_TextToFindFull struct { - h *C.Sci_TextToFindFull + h *C.Sci_TextToFindFull + isSubclass bool } func (this *Sci_TextToFindFull) cPointer() *C.Sci_TextToFindFull { @@ -4142,6 +4555,7 @@ func (this *Sci_TextToFindFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_TextToFindFull constructs the type using only CGO pointers. func newSci_TextToFindFull(h *C.Sci_TextToFindFull) *Sci_TextToFindFull { if h == nil { return nil @@ -4149,13 +4563,18 @@ func newSci_TextToFindFull(h *C.Sci_TextToFindFull) *Sci_TextToFindFull { return &Sci_TextToFindFull{h: h} } +// UnsafeNewSci_TextToFindFull constructs the type using only unsafe pointers. func UnsafeNewSci_TextToFindFull(h unsafe.Pointer) *Sci_TextToFindFull { - return newSci_TextToFindFull((*C.Sci_TextToFindFull)(h)) + if h == nil { + return nil + } + + return &Sci_TextToFindFull{h: (*C.Sci_TextToFindFull)(h)} } // Delete this object from C++ memory. func (this *Sci_TextToFindFull) Delete() { - C.Sci_TextToFindFull_Delete(this.h) + C.Sci_TextToFindFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4168,7 +4587,8 @@ func (this *Sci_TextToFindFull) GoGC() { } type Sci_Rectangle struct { - h *C.Sci_Rectangle + h *C.Sci_Rectangle + isSubclass bool } func (this *Sci_Rectangle) cPointer() *C.Sci_Rectangle { @@ -4185,6 +4605,7 @@ func (this *Sci_Rectangle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_Rectangle constructs the type using only CGO pointers. func newSci_Rectangle(h *C.Sci_Rectangle) *Sci_Rectangle { if h == nil { return nil @@ -4192,13 +4613,18 @@ func newSci_Rectangle(h *C.Sci_Rectangle) *Sci_Rectangle { return &Sci_Rectangle{h: h} } +// UnsafeNewSci_Rectangle constructs the type using only unsafe pointers. func UnsafeNewSci_Rectangle(h unsafe.Pointer) *Sci_Rectangle { - return newSci_Rectangle((*C.Sci_Rectangle)(h)) + if h == nil { + return nil + } + + return &Sci_Rectangle{h: (*C.Sci_Rectangle)(h)} } // Delete this object from C++ memory. func (this *Sci_Rectangle) Delete() { - C.Sci_Rectangle_Delete(this.h) + C.Sci_Rectangle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4211,7 +4637,8 @@ func (this *Sci_Rectangle) GoGC() { } type Sci_RangeToFormat struct { - h *C.Sci_RangeToFormat + h *C.Sci_RangeToFormat + isSubclass bool } func (this *Sci_RangeToFormat) cPointer() *C.Sci_RangeToFormat { @@ -4228,6 +4655,7 @@ func (this *Sci_RangeToFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_RangeToFormat constructs the type using only CGO pointers. func newSci_RangeToFormat(h *C.Sci_RangeToFormat) *Sci_RangeToFormat { if h == nil { return nil @@ -4235,13 +4663,18 @@ func newSci_RangeToFormat(h *C.Sci_RangeToFormat) *Sci_RangeToFormat { return &Sci_RangeToFormat{h: h} } +// UnsafeNewSci_RangeToFormat constructs the type using only unsafe pointers. func UnsafeNewSci_RangeToFormat(h unsafe.Pointer) *Sci_RangeToFormat { - return newSci_RangeToFormat((*C.Sci_RangeToFormat)(h)) + if h == nil { + return nil + } + + return &Sci_RangeToFormat{h: (*C.Sci_RangeToFormat)(h)} } // Delete this object from C++ memory. func (this *Sci_RangeToFormat) Delete() { - C.Sci_RangeToFormat_Delete(this.h) + C.Sci_RangeToFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4254,7 +4687,8 @@ func (this *Sci_RangeToFormat) GoGC() { } type Sci_RangeToFormatFull struct { - h *C.Sci_RangeToFormatFull + h *C.Sci_RangeToFormatFull + isSubclass bool } func (this *Sci_RangeToFormatFull) cPointer() *C.Sci_RangeToFormatFull { @@ -4271,6 +4705,7 @@ func (this *Sci_RangeToFormatFull) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_RangeToFormatFull constructs the type using only CGO pointers. func newSci_RangeToFormatFull(h *C.Sci_RangeToFormatFull) *Sci_RangeToFormatFull { if h == nil { return nil @@ -4278,13 +4713,18 @@ func newSci_RangeToFormatFull(h *C.Sci_RangeToFormatFull) *Sci_RangeToFormatFull return &Sci_RangeToFormatFull{h: h} } +// UnsafeNewSci_RangeToFormatFull constructs the type using only unsafe pointers. func UnsafeNewSci_RangeToFormatFull(h unsafe.Pointer) *Sci_RangeToFormatFull { - return newSci_RangeToFormatFull((*C.Sci_RangeToFormatFull)(h)) + if h == nil { + return nil + } + + return &Sci_RangeToFormatFull{h: (*C.Sci_RangeToFormatFull)(h)} } // Delete this object from C++ memory. func (this *Sci_RangeToFormatFull) Delete() { - C.Sci_RangeToFormatFull_Delete(this.h) + C.Sci_RangeToFormatFull_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4297,7 +4737,8 @@ func (this *Sci_RangeToFormatFull) GoGC() { } type Sci_NotifyHeader struct { - h *C.Sci_NotifyHeader + h *C.Sci_NotifyHeader + isSubclass bool } func (this *Sci_NotifyHeader) cPointer() *C.Sci_NotifyHeader { @@ -4314,6 +4755,7 @@ func (this *Sci_NotifyHeader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSci_NotifyHeader constructs the type using only CGO pointers. func newSci_NotifyHeader(h *C.Sci_NotifyHeader) *Sci_NotifyHeader { if h == nil { return nil @@ -4321,13 +4763,18 @@ func newSci_NotifyHeader(h *C.Sci_NotifyHeader) *Sci_NotifyHeader { return &Sci_NotifyHeader{h: h} } +// UnsafeNewSci_NotifyHeader constructs the type using only unsafe pointers. func UnsafeNewSci_NotifyHeader(h unsafe.Pointer) *Sci_NotifyHeader { - return newSci_NotifyHeader((*C.Sci_NotifyHeader)(h)) + if h == nil { + return nil + } + + return &Sci_NotifyHeader{h: (*C.Sci_NotifyHeader)(h)} } // Delete this object from C++ memory. func (this *Sci_NotifyHeader) Delete() { - C.Sci_NotifyHeader_Delete(this.h) + C.Sci_NotifyHeader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4340,7 +4787,8 @@ func (this *Sci_NotifyHeader) GoGC() { } type SCNotification struct { - h *C.SCNotification + h *C.SCNotification + isSubclass bool } func (this *SCNotification) cPointer() *C.SCNotification { @@ -4357,6 +4805,7 @@ func (this *SCNotification) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newSCNotification constructs the type using only CGO pointers. func newSCNotification(h *C.SCNotification) *SCNotification { if h == nil { return nil @@ -4364,13 +4813,18 @@ func newSCNotification(h *C.SCNotification) *SCNotification { return &SCNotification{h: h} } +// UnsafeNewSCNotification constructs the type using only unsafe pointers. func UnsafeNewSCNotification(h unsafe.Pointer) *SCNotification { - return newSCNotification((*C.SCNotification)(h)) + if h == nil { + return nil + } + + return &SCNotification{h: (*C.SCNotification)(h)} } // Delete this object from C++ memory. func (this *SCNotification) Delete() { - C.SCNotification_Delete(this.h) + C.SCNotification_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -4383,7 +4837,8 @@ func (this *SCNotification) GoGC() { } type ScintillaEditBase struct { - h *C.ScintillaEditBase + h *C.ScintillaEditBase + isSubclass bool *qt.QAbstractScrollArea } @@ -4401,27 +4856,53 @@ func (this *ScintillaEditBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newScintillaEditBase(h *C.ScintillaEditBase) *ScintillaEditBase { +// newScintillaEditBase constructs the type using only CGO pointers. +func newScintillaEditBase(h *C.ScintillaEditBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *ScintillaEditBase { if h == nil { return nil } - return &ScintillaEditBase{h: h, QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &ScintillaEditBase{h: h, + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h_QAbstractScrollArea), unsafe.Pointer(h_QFrame), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewScintillaEditBase(h unsafe.Pointer) *ScintillaEditBase { - return newScintillaEditBase((*C.ScintillaEditBase)(h)) +// UnsafeNewScintillaEditBase constructs the type using only unsafe pointers. +func UnsafeNewScintillaEditBase(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *ScintillaEditBase { + if h == nil { + return nil + } + + return &ScintillaEditBase{h: (*C.ScintillaEditBase)(h), + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewScintillaEditBase constructs a new ScintillaEditBase object. func NewScintillaEditBase(parent *qt.QWidget) *ScintillaEditBase { - ret := C.ScintillaEditBase_new((*C.QWidget)(parent.UnsafePointer())) - return newScintillaEditBase(ret) + var outptr_ScintillaEditBase *C.ScintillaEditBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.ScintillaEditBase_new((*C.QWidget)(parent.UnsafePointer()), &outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newScintillaEditBase(outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewScintillaEditBase2 constructs a new ScintillaEditBase object. func NewScintillaEditBase2() *ScintillaEditBase { - ret := C.ScintillaEditBase_new2() - return newScintillaEditBase(ret) + var outptr_ScintillaEditBase *C.ScintillaEditBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.ScintillaEditBase_new2(&outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newScintillaEditBase(outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *ScintillaEditBase) MetaObject() *qt.QMetaObject { @@ -4452,12 +4933,14 @@ func ScintillaEditBase_TrUtf8(s string) string { return _ret } -func (this *ScintillaEditBase) Send(iMessage uint) uintptr { - return (uintptr)(C.ScintillaEditBase_Send(this.h, (C.uint)(iMessage))) +func (this *ScintillaEditBase) Send(iMessage uint, wParam uintptr, lParam uintptr) uintptr { + return (uintptr)(C.ScintillaEditBase_Send(this.h, (C.uint)(iMessage), (C.uintptr_t)(wParam), (C.intptr_t)(lParam))) } -func (this *ScintillaEditBase) Sends(iMessage uint) uintptr { - return (uintptr)(C.ScintillaEditBase_Sends(this.h, (C.uint)(iMessage))) +func (this *ScintillaEditBase) Sends(iMessage uint, wParam uintptr, s string) uintptr { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + return (uintptr)(C.ScintillaEditBase_Sends(this.h, (C.uint)(iMessage), (C.uintptr_t)(wParam), s_Cstring)) } func (this *ScintillaEditBase) ScrollHorizontal(value int) { @@ -4612,7 +5095,7 @@ func miqt_exec_callback_ScintillaEditBase_AboutToCopy(cb C.intptr_t, data *C.QMi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data)) + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data), nil) gofunc(slotval1) } @@ -5196,7 +5679,7 @@ func miqt_exec_callback_ScintillaEditBase_ButtonPressed(cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) gofunc(slotval1) } @@ -5216,7 +5699,7 @@ func miqt_exec_callback_ScintillaEditBase_ButtonReleased(cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) gofunc(slotval1) } @@ -5236,7 +5719,7 @@ func miqt_exec_callback_ScintillaEditBase_KeyPressed(cb C.intptr_t, event *C.QKe } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) gofunc(slotval1) } @@ -5302,4072 +5785,5436 @@ func ScintillaEditBase_TrUtf83(s string, c string, n int) string { return _ret } -func (this *ScintillaEditBase) Send2(iMessage uint, wParam uintptr) uintptr { - return (uintptr)(C.ScintillaEditBase_Send2(this.h, (C.uint)(iMessage), (C.uintptr_t)(wParam))) -} +func (this *ScintillaEditBase) callVirtualBase_Send(iMessage uint, wParam uintptr, lParam uintptr) uintptr { -func (this *ScintillaEditBase) Send3(iMessage uint, wParam uintptr, lParam uintptr) uintptr { - return (uintptr)(C.ScintillaEditBase_Send3(this.h, (C.uint)(iMessage), (C.uintptr_t)(wParam), (C.intptr_t)(lParam))) + return (uintptr)(C.ScintillaEditBase_virtualbase_Send(unsafe.Pointer(this.h), (C.uint)(iMessage), (C.uintptr_t)(wParam), (C.intptr_t)(lParam))) + +} +func (this *ScintillaEditBase) OnSend(slot func(super func(iMessage uint, wParam uintptr, lParam uintptr) uintptr, iMessage uint, wParam uintptr, lParam uintptr) uintptr) { + C.ScintillaEditBase_override_virtual_Send(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEditBase) Sends2(iMessage uint, wParam uintptr) uintptr { - return (uintptr)(C.ScintillaEditBase_Sends2(this.h, (C.uint)(iMessage), (C.uintptr_t)(wParam))) +//export miqt_exec_callback_ScintillaEditBase_Send +func miqt_exec_callback_ScintillaEditBase_Send(self *C.ScintillaEditBase, cb C.intptr_t, iMessage C.uint, wParam C.uintptr_t, lParam C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iMessage uint, wParam uintptr, lParam uintptr) uintptr, iMessage uint, wParam uintptr, lParam uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint)(iMessage) + + slotval2 := (uintptr)(wParam) + + slotval3 := (uintptr)(lParam) + + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_Send, slotval1, slotval2, slotval3) + + return (C.intptr_t)(virtualReturn) + } -func (this *ScintillaEditBase) Sends3(iMessage uint, wParam uintptr, s string) uintptr { +func (this *ScintillaEditBase) callVirtualBase_Sends(iMessage uint, wParam uintptr, s string) uintptr { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - return (uintptr)(C.ScintillaEditBase_Sends3(this.h, (C.uint)(iMessage), (C.uintptr_t)(wParam), s_Cstring)) -} -// Delete this object from C++ memory. -func (this *ScintillaEditBase) Delete() { - C.ScintillaEditBase_Delete(this.h) -} + return (uintptr)(C.ScintillaEditBase_virtualbase_Sends(unsafe.Pointer(this.h), (C.uint)(iMessage), (C.uintptr_t)(wParam), s_Cstring)) -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *ScintillaEditBase) GoGC() { - runtime.SetFinalizer(this, func(this *ScintillaEditBase) { - this.Delete() - runtime.KeepAlive(this.h) - }) } - -type ScintillaDocument struct { - h *C.ScintillaDocument - *qt.QObject +func (this *ScintillaEditBase) OnSends(slot func(super func(iMessage uint, wParam uintptr, s string) uintptr, iMessage uint, wParam uintptr, s string) uintptr) { + C.ScintillaEditBase_override_virtual_Sends(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaDocument) cPointer() *C.ScintillaDocument { - if this == nil { - return nil +//export miqt_exec_callback_ScintillaEditBase_Sends +func miqt_exec_callback_ScintillaEditBase_Sends(self *C.ScintillaEditBase, cb C.intptr_t, iMessage C.uint, wParam C.uintptr_t, s *C.const_char) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iMessage uint, wParam uintptr, s string) uintptr, iMessage uint, wParam uintptr, s string) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h -} - -func (this *ScintillaDocument) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} -func newScintillaDocument(h *C.ScintillaDocument) *ScintillaDocument { - if h == nil { - return nil - } - return &ScintillaDocument{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} -} + // Convert all CABI parameters to Go parameters + slotval1 := (uint)(iMessage) -func UnsafeNewScintillaDocument(h unsafe.Pointer) *ScintillaDocument { - return newScintillaDocument((*C.ScintillaDocument)(h)) -} + slotval2 := (uintptr)(wParam) -// NewScintillaDocument constructs a new ScintillaDocument object. -func NewScintillaDocument() *ScintillaDocument { - ret := C.ScintillaDocument_new() - return newScintillaDocument(ret) -} + s_ret := s + slotval3 := C.GoString(s_ret) -// NewScintillaDocument2 constructs a new ScintillaDocument object. -func NewScintillaDocument2(parent *qt.QObject) *ScintillaDocument { - ret := C.ScintillaDocument_new2((*C.QObject)(parent.UnsafePointer())) - return newScintillaDocument(ret) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_Sends, slotval1, slotval2, slotval3) -// NewScintillaDocument3 constructs a new ScintillaDocument object. -func NewScintillaDocument3(parent *qt.QObject, pdoc_ unsafe.Pointer) *ScintillaDocument { - ret := C.ScintillaDocument_new3((*C.QObject)(parent.UnsafePointer()), pdoc_) - return newScintillaDocument(ret) -} + return (C.intptr_t)(virtualReturn) -func (this *ScintillaDocument) MetaObject() *qt.QMetaObject { - return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.ScintillaDocument_MetaObject(this.h))) } -func (this *ScintillaDocument) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.ScintillaDocument_Metacast(this.h, param1_Cstring)) -} +func (this *ScintillaEditBase) callVirtualBase_Event(event *qt.QEvent) bool { -func ScintillaDocument_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaDocument_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + return (bool)(C.ScintillaEditBase_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) -func ScintillaDocument_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaDocument_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } - -func (this *ScintillaDocument) Pointer() unsafe.Pointer { - return (unsafe.Pointer)(C.ScintillaDocument_Pointer(this.h)) +func (this *ScintillaEditBase) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.ScintillaEditBase_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaDocument) LineFromPosition(pos int) int { - return (int)(C.ScintillaDocument_LineFromPosition(this.h, (C.int)(pos))) -} +//export miqt_exec_callback_ScintillaEditBase_Event +func miqt_exec_callback_ScintillaEditBase_Event(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaDocument) IsCrLf(pos int) bool { - return (bool)(C.ScintillaDocument_IsCrLf(this.h, (C.int)(pos))) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) -func (this *ScintillaDocument) DeleteChars(pos int, lenVal int) bool { - return (bool)(C.ScintillaDocument_DeleteChars(this.h, (C.int)(pos), (C.int)(lenVal))) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_Event, slotval1) -func (this *ScintillaDocument) Undo() int { - return (int)(C.ScintillaDocument_Undo(this.h)) -} + return (C.bool)(virtualReturn) -func (this *ScintillaDocument) Redo() int { - return (int)(C.ScintillaDocument_Redo(this.h)) } -func (this *ScintillaDocument) CanUndo() bool { - return (bool)(C.ScintillaDocument_CanUndo(this.h)) -} +func (this *ScintillaEditBase) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { -func (this *ScintillaDocument) CanRedo() bool { - return (bool)(C.ScintillaDocument_CanRedo(this.h)) -} + C.ScintillaEditBase_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) -func (this *ScintillaDocument) DeleteUndoHistory() { - C.ScintillaDocument_DeleteUndoHistory(this.h) } - -func (this *ScintillaDocument) SetUndoCollection(collect_undo bool) bool { - return (bool)(C.ScintillaDocument_SetUndoCollection(this.h, (C.bool)(collect_undo))) +func (this *ScintillaEditBase) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.ScintillaEditBase_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaDocument) IsCollectingUndo() bool { - return (bool)(C.ScintillaDocument_IsCollectingUndo(this.h)) -} +//export miqt_exec_callback_ScintillaEditBase_PaintEvent +func miqt_exec_callback_ScintillaEditBase_PaintEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaDocument) BeginUndoAction() { - C.ScintillaDocument_BeginUndoAction(this.h) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) -func (this *ScintillaDocument) EndUndoAction() { - C.ScintillaDocument_EndUndoAction(this.h) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_PaintEvent, slotval1) -func (this *ScintillaDocument) SetSavePoint() { - C.ScintillaDocument_SetSavePoint(this.h) } -func (this *ScintillaDocument) IsSavePoint() bool { - return (bool)(C.ScintillaDocument_IsSavePoint(this.h)) -} +func (this *ScintillaEditBase) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { -func (this *ScintillaDocument) SetReadOnly(read_only bool) { - C.ScintillaDocument_SetReadOnly(this.h, (C.bool)(read_only)) -} + C.ScintillaEditBase_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) -func (this *ScintillaDocument) IsReadOnly() bool { - return (bool)(C.ScintillaDocument_IsReadOnly(this.h)) } - -func (this *ScintillaDocument) InsertString(position int, str []byte) { - str_alias := C.struct_miqt_string{} - str_alias.data = (*C.char)(unsafe.Pointer(&str[0])) - str_alias.len = C.size_t(len(str)) - C.ScintillaDocument_InsertString(this.h, (C.int)(position), str_alias) +func (this *ScintillaEditBase) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.ScintillaEditBase_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaDocument) GetCharRange(position int, length int) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaDocument_GetCharRange(this.h, (C.int)(position), (C.int)(length)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret -} +//export miqt_exec_callback_ScintillaEditBase_WheelEvent +func miqt_exec_callback_ScintillaEditBase_WheelEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaDocument) StyleAt(position int) int8 { - return (int8)(C.ScintillaDocument_StyleAt(this.h, (C.int)(position))) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) -func (this *ScintillaDocument) LineStart(lineno int) int { - return (int)(C.ScintillaDocument_LineStart(this.h, (C.int)(lineno))) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_WheelEvent, slotval1) -func (this *ScintillaDocument) LineEnd(lineno int) int { - return (int)(C.ScintillaDocument_LineEnd(this.h, (C.int)(lineno))) } -func (this *ScintillaDocument) LineEndPosition(pos int) int { - return (int)(C.ScintillaDocument_LineEndPosition(this.h, (C.int)(pos))) -} +func (this *ScintillaEditBase) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { -func (this *ScintillaDocument) Length() int { - return (int)(C.ScintillaDocument_Length(this.h)) -} + C.ScintillaEditBase_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) -func (this *ScintillaDocument) LinesTotal() int { - return (int)(C.ScintillaDocument_LinesTotal(this.h)) } - -func (this *ScintillaDocument) StartStyling(position int) { - C.ScintillaDocument_StartStyling(this.h, (C.int)(position)) +func (this *ScintillaEditBase) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.ScintillaEditBase_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaDocument) SetStyleFor(length int, style int8) bool { - return (bool)(C.ScintillaDocument_SetStyleFor(this.h, (C.int)(length), (C.char)(style))) -} +//export miqt_exec_callback_ScintillaEditBase_FocusInEvent +func miqt_exec_callback_ScintillaEditBase_FocusInEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaDocument) GetEndStyled() int { - return (int)(C.ScintillaDocument_GetEndStyled(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) -func (this *ScintillaDocument) EnsureStyledTo(position int) { - C.ScintillaDocument_EnsureStyledTo(this.h, (C.int)(position)) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_FocusInEvent, slotval1) -func (this *ScintillaDocument) SetCurrentIndicator(indic int) { - C.ScintillaDocument_SetCurrentIndicator(this.h, (C.int)(indic)) } -func (this *ScintillaDocument) DecorationFillRange(position int, value int, fillLength int) { - C.ScintillaDocument_DecorationFillRange(this.h, (C.int)(position), (C.int)(value), (C.int)(fillLength)) -} +func (this *ScintillaEditBase) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { -func (this *ScintillaDocument) DecorationsValueAt(indic int, position int) int { - return (int)(C.ScintillaDocument_DecorationsValueAt(this.h, (C.int)(indic), (C.int)(position))) -} + C.ScintillaEditBase_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) -func (this *ScintillaDocument) DecorationsStart(indic int, position int) int { - return (int)(C.ScintillaDocument_DecorationsStart(this.h, (C.int)(indic), (C.int)(position))) } - -func (this *ScintillaDocument) DecorationsEnd(indic int, position int) int { - return (int)(C.ScintillaDocument_DecorationsEnd(this.h, (C.int)(indic), (C.int)(position))) +func (this *ScintillaEditBase) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.ScintillaEditBase_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaDocument) GetCodePage() int { - return (int)(C.ScintillaDocument_GetCodePage(this.h)) -} +//export miqt_exec_callback_ScintillaEditBase_FocusOutEvent +func miqt_exec_callback_ScintillaEditBase_FocusOutEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaDocument) SetCodePage(code_page int) { - C.ScintillaDocument_SetCodePage(this.h, (C.int)(code_page)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) -func (this *ScintillaDocument) GetEolMode() int { - return (int)(C.ScintillaDocument_GetEolMode(this.h)) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_FocusOutEvent, slotval1) -func (this *ScintillaDocument) SetEolMode(eol_mode int) { - C.ScintillaDocument_SetEolMode(this.h, (C.int)(eol_mode)) } -func (this *ScintillaDocument) MovePositionOutsideChar(pos int, move_dir int, check_line_end bool) int { - return (int)(C.ScintillaDocument_MovePositionOutsideChar(this.h, (C.int)(pos), (C.int)(move_dir), (C.bool)(check_line_end))) -} +func (this *ScintillaEditBase) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { -func (this *ScintillaDocument) GetCharacter(pos int) int { - return (int)(C.ScintillaDocument_GetCharacter(this.h, (C.int)(pos))) -} + C.ScintillaEditBase_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) -func (this *ScintillaDocument) ModifyAttempt() { - C.ScintillaDocument_ModifyAttempt(this.h) } -func (this *ScintillaDocument) OnModifyAttempt(slot func()) { - C.ScintillaDocument_connect_ModifyAttempt(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *ScintillaEditBase) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.ScintillaEditBase_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_ScintillaDocument_ModifyAttempt -func miqt_exec_callback_ScintillaDocument_ModifyAttempt(cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) +//export miqt_exec_callback_ScintillaEditBase_ResizeEvent +func miqt_exec_callback_ScintillaEditBase_ResizeEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - gofunc() + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ResizeEvent, slotval1) + } -func (this *ScintillaDocument) SavePoint(atSavePoint bool) { - C.ScintillaDocument_SavePoint(this.h, (C.bool)(atSavePoint)) +func (this *ScintillaEditBase) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.ScintillaEditBase_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + } -func (this *ScintillaDocument) OnSavePoint(slot func(atSavePoint bool)) { - C.ScintillaDocument_connect_SavePoint(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *ScintillaEditBase) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.ScintillaEditBase_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_ScintillaDocument_SavePoint -func miqt_exec_callback_ScintillaDocument_SavePoint(cb C.intptr_t, atSavePoint C.bool) { - gofunc, ok := cgo.Handle(cb).Value().(func(atSavePoint bool)) +//export miqt_exec_callback_ScintillaEditBase_KeyPressEvent +func miqt_exec_callback_ScintillaEditBase_KeyPressEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := (bool)(atSavePoint) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_KeyPressEvent, slotval1) - gofunc(slotval1) } -func (this *ScintillaDocument) Modified(position int, modification_type int, text []byte, length int, linesAdded int, line int, foldLevelNow int, foldLevelPrev int) { - text_alias := C.struct_miqt_string{} - text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) - text_alias.len = C.size_t(len(text)) - C.ScintillaDocument_Modified(this.h, (C.int)(position), (C.int)(modification_type), text_alias, (C.int)(length), (C.int)(linesAdded), (C.int)(line), (C.int)(foldLevelNow), (C.int)(foldLevelPrev)) +func (this *ScintillaEditBase) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.ScintillaEditBase_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + } -func (this *ScintillaDocument) OnModified(slot func(position int, modification_type int, text []byte, length int, linesAdded int, line int, foldLevelNow int, foldLevelPrev int)) { - C.ScintillaDocument_connect_Modified(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *ScintillaEditBase) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEditBase_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_ScintillaDocument_Modified -func miqt_exec_callback_ScintillaDocument_Modified(cb C.intptr_t, position C.int, modification_type C.int, text C.struct_miqt_string, length C.int, linesAdded C.int, line C.int, foldLevelNow C.int, foldLevelPrev C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(position int, modification_type int, text []byte, length int, linesAdded int, line int, foldLevelNow int, foldLevelPrev int)) +//export miqt_exec_callback_ScintillaEditBase_MousePressEvent +func miqt_exec_callback_ScintillaEditBase_MousePressEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := (int)(position) - - slotval2 := (int)(modification_type) - - var text_bytearray C.struct_miqt_string = text - text_ret := C.GoBytes(unsafe.Pointer(text_bytearray.data), C.int(int64(text_bytearray.len))) - C.free(unsafe.Pointer(text_bytearray.data)) - slotval3 := text_ret - slotval4 := (int)(length) - - slotval5 := (int)(linesAdded) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) - slotval6 := (int)(line) + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MousePressEvent, slotval1) - slotval7 := (int)(foldLevelNow) +} - slotval8 := (int)(foldLevelPrev) +func (this *ScintillaEditBase) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { - gofunc(slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7, slotval8) -} + C.ScintillaEditBase_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) -func (this *ScintillaDocument) StyleNeeded(pos int) { - C.ScintillaDocument_StyleNeeded(this.h, (C.int)(pos)) } -func (this *ScintillaDocument) OnStyleNeeded(slot func(pos int)) { - C.ScintillaDocument_connect_StyleNeeded(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *ScintillaEditBase) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEditBase_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_ScintillaDocument_StyleNeeded -func miqt_exec_callback_ScintillaDocument_StyleNeeded(cb C.intptr_t, pos C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(pos int)) +//export miqt_exec_callback_ScintillaEditBase_MouseReleaseEvent +func miqt_exec_callback_ScintillaEditBase_MouseReleaseEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := (int)(pos) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) - gofunc(slotval1) } -func (this *ScintillaDocument) ErrorOccurred(status int) { - C.ScintillaDocument_ErrorOccurred(this.h, (C.int)(status)) +func (this *ScintillaEditBase) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.ScintillaEditBase_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + } -func (this *ScintillaDocument) OnErrorOccurred(slot func(status int)) { - C.ScintillaDocument_connect_ErrorOccurred(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *ScintillaEditBase) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEditBase_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_ScintillaDocument_ErrorOccurred -func miqt_exec_callback_ScintillaDocument_ErrorOccurred(cb C.intptr_t, status C.int) { - gofunc, ok := cgo.Handle(cb).Value().(func(status int)) +//export miqt_exec_callback_ScintillaEditBase_MouseDoubleClickEvent +func miqt_exec_callback_ScintillaEditBase_MouseDoubleClickEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := (int)(status) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) - gofunc(slotval1) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) -func ScintillaDocument_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaDocument_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func ScintillaDocument_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaDocument_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} +func (this *ScintillaEditBase) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { -func ScintillaDocument_TrUtf82(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaDocument_TrUtf82(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + C.ScintillaEditBase_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) -func ScintillaDocument_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaDocument_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } - -func (this *ScintillaDocument) BeginUndoAction1(coalesceWithPrior bool) { - C.ScintillaDocument_BeginUndoAction1(this.h, (C.bool)(coalesceWithPrior)) +func (this *ScintillaEditBase) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEditBase_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// Delete this object from C++ memory. -func (this *ScintillaDocument) Delete() { - C.ScintillaDocument_Delete(this.h) -} +//export miqt_exec_callback_ScintillaEditBase_MouseMoveEvent +func miqt_exec_callback_ScintillaEditBase_MouseMoveEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *ScintillaDocument) GoGC() { - runtime.SetFinalizer(this, func(this *ScintillaDocument) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) -type ScintillaEdit struct { - h *C.ScintillaEdit - *ScintillaEditBase -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MouseMoveEvent, slotval1) -func (this *ScintillaEdit) cPointer() *C.ScintillaEdit { - if this == nil { - return nil - } - return this.h } -func (this *ScintillaEdit) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *ScintillaEditBase) callVirtualBase_ContextMenuEvent(event *qt.QContextMenuEvent) { + + C.ScintillaEditBase_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEditBase) OnContextMenuEvent(slot func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) { + C.ScintillaEditBase_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newScintillaEdit(h *C.ScintillaEdit) *ScintillaEdit { - if h == nil { - return nil +//export miqt_exec_callback_ScintillaEditBase_ContextMenuEvent +func miqt_exec_callback_ScintillaEditBase_ContextMenuEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &ScintillaEdit{h: h, ScintillaEditBase: UnsafeNewScintillaEditBase(unsafe.Pointer(h))} -} -func UnsafeNewScintillaEdit(h unsafe.Pointer) *ScintillaEdit { - return newScintillaEdit((*C.ScintillaEdit)(h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) -// NewScintillaEdit constructs a new ScintillaEdit object. -func NewScintillaEdit(parent *qt.QWidget) *ScintillaEdit { - ret := C.ScintillaEdit_new((*C.QWidget)(parent.UnsafePointer())) - return newScintillaEdit(ret) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ContextMenuEvent, slotval1) -// NewScintillaEdit2 constructs a new ScintillaEdit object. -func NewScintillaEdit2() *ScintillaEdit { - ret := C.ScintillaEdit_new2() - return newScintillaEdit(ret) } -func (this *ScintillaEdit) MetaObject() *qt.QMetaObject { - return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.ScintillaEdit_MetaObject(this.h))) -} +func (this *ScintillaEditBase) callVirtualBase_DragEnterEvent(event *qt.QDragEnterEvent) { -func (this *ScintillaEdit) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.ScintillaEdit_Metacast(this.h, param1_Cstring)) -} + C.ScintillaEditBase_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) -func ScintillaEdit_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaEdit_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } - -func ScintillaEdit_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaEdit_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *ScintillaEditBase) OnDragEnterEvent(slot func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) { + C.ScintillaEditBase_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) TextReturner(message int, wParam uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_TextReturner(this.h, (C.int)(message), (C.uintptr_t)(wParam)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret -} +//export miqt_exec_callback_ScintillaEditBase_DragEnterEvent +func miqt_exec_callback_ScintillaEditBase_DragEnterEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) FindText(flags int, text string, cpMin int, cpMax int) struct { - First int - Second int -} { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - var _mm C.struct_miqt_map = C.ScintillaEdit_FindText(this.h, (C.int)(flags), text_Cstring, (C.int)(cpMin), (C.int)(cpMax)) - _First_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) - _Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.values)) - _entry_First := (int)(_First_CArray[0]) + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) - _entry_Second := (int)(_Second_CArray[0]) + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DragEnterEvent, slotval1) - return struct { - First int - Second int - }{First: _entry_First, Second: _entry_Second} } -func (this *ScintillaEdit) GetTextRange(start int, end int) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetTextRange(this.h, (C.int)(start), (C.int)(end)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret -} +func (this *ScintillaEditBase) callVirtualBase_DragLeaveEvent(event *qt.QDragLeaveEvent) { -func (this *ScintillaEdit) GetDoc() *ScintillaDocument { - return UnsafeNewScintillaDocument(unsafe.Pointer(C.ScintillaEdit_GetDoc(this.h))) -} + C.ScintillaEditBase_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) -func (this *ScintillaEdit) SetDoc(pdoc_ *ScintillaDocument) { - C.ScintillaEdit_SetDoc(this.h, pdoc_.cPointer()) +} +func (this *ScintillaEditBase) OnDragLeaveEvent(slot func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) { + C.ScintillaEditBase_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) FindText2(flags int, text string, cpMin int, cpMax int) struct { - First int - Second int -} { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - var _mm C.struct_miqt_map = C.ScintillaEdit_FindText2(this.h, (C.int)(flags), text_Cstring, (C.int)(cpMin), (C.int)(cpMax)) - _First_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) - _Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.values)) - _entry_First := (int)(_First_CArray[0]) +//export miqt_exec_callback_ScintillaEditBase_DragLeaveEvent +func miqt_exec_callback_ScintillaEditBase_DragLeaveEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } - _entry_Second := (int)(_Second_CArray[0]) + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) - return struct { - First int - Second int - }{First: _entry_First, Second: _entry_Second} -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DragLeaveEvent, slotval1) -func (this *ScintillaEdit) TextRange(start int, end int) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_TextRange(this.h, (C.int)(start), (C.int)(end)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret } -func (this *ScintillaEdit) FormatRange(draw bool, target *qt.QPaintDevice, measure *qt.QPaintDevice, print_rect *qt.QRect, page_rect *qt.QRect, range_start int64, range_end int64) int64 { - return (int64)(C.ScintillaEdit_FormatRange(this.h, (C.bool)(draw), (*C.QPaintDevice)(target.UnsafePointer()), (*C.QPaintDevice)(measure.UnsafePointer()), (*C.QRect)(print_rect.UnsafePointer()), (*C.QRect)(page_rect.UnsafePointer()), (C.long)(range_start), (C.long)(range_end))) -} +func (this *ScintillaEditBase) callVirtualBase_DragMoveEvent(event *qt.QDragMoveEvent) { -func (this *ScintillaEdit) FormatRange2(draw bool, target *qt.QPaintDevice, measure *qt.QPaintDevice, print_rect *qt.QRect, page_rect *qt.QRect, range_start int64, range_end int64) int64 { - return (int64)(C.ScintillaEdit_FormatRange2(this.h, (C.bool)(draw), (*C.QPaintDevice)(target.UnsafePointer()), (*C.QPaintDevice)(measure.UnsafePointer()), (*C.QRect)(print_rect.UnsafePointer()), (*C.QRect)(page_rect.UnsafePointer()), (C.long)(range_start), (C.long)(range_end))) -} + C.ScintillaEditBase_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) -func (this *ScintillaEdit) AddText(length uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_AddText(this.h, (C.intptr_t)(length), text_Cstring) } - -func (this *ScintillaEdit) AddStyledText(length uintptr, c string) { - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - C.ScintillaEdit_AddStyledText(this.h, (C.intptr_t)(length), c_Cstring) +func (this *ScintillaEditBase) OnDragMoveEvent(slot func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) { + C.ScintillaEditBase_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) InsertText(pos uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_InsertText(this.h, (C.intptr_t)(pos), text_Cstring) -} +//export miqt_exec_callback_ScintillaEditBase_DragMoveEvent +func miqt_exec_callback_ScintillaEditBase_DragMoveEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) ChangeInsertion(length uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_ChangeInsertion(this.h, (C.intptr_t)(length), text_Cstring) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) -func (this *ScintillaEdit) ClearAll() { - C.ScintillaEdit_ClearAll(this.h) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DragMoveEvent, slotval1) -func (this *ScintillaEdit) DeleteRange(start uintptr, lengthDelete uintptr) { - C.ScintillaEdit_DeleteRange(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthDelete)) } -func (this *ScintillaEdit) ClearDocumentStyle() { - C.ScintillaEdit_ClearDocumentStyle(this.h) -} +func (this *ScintillaEditBase) callVirtualBase_DropEvent(event *qt.QDropEvent) { -func (this *ScintillaEdit) Length() uintptr { - return (uintptr)(C.ScintillaEdit_Length(this.h)) -} + C.ScintillaEditBase_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) -func (this *ScintillaEdit) CharAt(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CharAt(this.h, (C.intptr_t)(pos))) } - -func (this *ScintillaEdit) CurrentPos() uintptr { - return (uintptr)(C.ScintillaEdit_CurrentPos(this.h)) +func (this *ScintillaEditBase) OnDropEvent(slot func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) { + C.ScintillaEditBase_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) Anchor() uintptr { - return (uintptr)(C.ScintillaEdit_Anchor(this.h)) -} +//export miqt_exec_callback_ScintillaEditBase_DropEvent +func miqt_exec_callback_ScintillaEditBase_DropEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) StyleAt(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleAt(this.h, (C.intptr_t)(pos))) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) -func (this *ScintillaEdit) StyleIndexAt(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleIndexAt(this.h, (C.intptr_t)(pos))) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DropEvent, slotval1) -func (this *ScintillaEdit) Redo() { - C.ScintillaEdit_Redo(this.h) } -func (this *ScintillaEdit) SetUndoCollection(collectUndo bool) { - C.ScintillaEdit_SetUndoCollection(this.h, (C.bool)(collectUndo)) -} +func (this *ScintillaEditBase) callVirtualBase_InputMethodEvent(event *qt.QInputMethodEvent) { -func (this *ScintillaEdit) SelectAll() { - C.ScintillaEdit_SelectAll(this.h) -} + C.ScintillaEditBase_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(event.UnsafePointer())) -func (this *ScintillaEdit) SetSavePoint() { - C.ScintillaEdit_SetSavePoint(this.h) } - -func (this *ScintillaEdit) CanRedo() bool { - return (bool)(C.ScintillaEdit_CanRedo(this.h)) +func (this *ScintillaEditBase) OnInputMethodEvent(slot func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) { + C.ScintillaEditBase_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) MarkerLineFromHandle(markerHandle uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerLineFromHandle(this.h, (C.intptr_t)(markerHandle))) -} +//export miqt_exec_callback_ScintillaEditBase_InputMethodEvent +func miqt_exec_callback_ScintillaEditBase_InputMethodEvent(self *C.ScintillaEditBase, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) MarkerDeleteHandle(markerHandle uintptr) { - C.ScintillaEdit_MarkerDeleteHandle(this.h, (C.intptr_t)(markerHandle)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) -func (this *ScintillaEdit) MarkerHandleFromLine(line uintptr, which uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerHandleFromLine(this.h, (C.intptr_t)(line), (C.intptr_t)(which))) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_InputMethodEvent, slotval1) -func (this *ScintillaEdit) MarkerNumberFromLine(line uintptr, which uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerNumberFromLine(this.h, (C.intptr_t)(line), (C.intptr_t)(which))) } -func (this *ScintillaEdit) UndoCollection() bool { - return (bool)(C.ScintillaEdit_UndoCollection(this.h)) -} +func (this *ScintillaEditBase) callVirtualBase_InputMethodQuery(query qt.InputMethodQuery) *qt.QVariant { -func (this *ScintillaEdit) ViewWS() uintptr { - return (uintptr)(C.ScintillaEdit_ViewWS(this.h)) -} + _ret := C.ScintillaEditBase_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -func (this *ScintillaEdit) SetViewWS(viewWS uintptr) { - C.ScintillaEdit_SetViewWS(this.h, (C.intptr_t)(viewWS)) } - -func (this *ScintillaEdit) TabDrawMode() uintptr { - return (uintptr)(C.ScintillaEdit_TabDrawMode(this.h)) +func (this *ScintillaEditBase) OnInputMethodQuery(slot func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) { + C.ScintillaEditBase_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) SetTabDrawMode(tabDrawMode uintptr) { - C.ScintillaEdit_SetTabDrawMode(this.h, (C.intptr_t)(tabDrawMode)) -} +//export miqt_exec_callback_ScintillaEditBase_InputMethodQuery +func miqt_exec_callback_ScintillaEditBase_InputMethodQuery(self *C.ScintillaEditBase, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) PositionFromPoint(x uintptr, y uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionFromPoint(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) -} + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(query) -func (this *ScintillaEdit) PositionFromPointClose(x uintptr, y uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionFromPointClose(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_InputMethodQuery, slotval1) -func (this *ScintillaEdit) GotoLine(line uintptr) { - C.ScintillaEdit_GotoLine(this.h, (C.intptr_t)(line)) -} + return (*C.QVariant)(virtualReturn.UnsafePointer()) -func (this *ScintillaEdit) GotoPos(caret uintptr) { - C.ScintillaEdit_GotoPos(this.h, (C.intptr_t)(caret)) } -func (this *ScintillaEdit) SetAnchor(anchor uintptr) { - C.ScintillaEdit_SetAnchor(this.h, (C.intptr_t)(anchor)) -} +func (this *ScintillaEditBase) callVirtualBase_ScrollContentsBy(param1 int, param2 int) { -func (this *ScintillaEdit) GetCurLine(length uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetCurLine(this.h, (C.intptr_t)(length)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret -} + C.ScintillaEditBase_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(param1), (C.int)(param2)) -func (this *ScintillaEdit) EndStyled() uintptr { - return (uintptr)(C.ScintillaEdit_EndStyled(this.h)) } - -func (this *ScintillaEdit) ConvertEOLs(eolMode uintptr) { - C.ScintillaEdit_ConvertEOLs(this.h, (C.intptr_t)(eolMode)) +func (this *ScintillaEditBase) OnScrollContentsBy(slot func(super func(param1 int, param2 int), param1 int, param2 int)) { + C.ScintillaEditBase_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) EOLMode() uintptr { - return (uintptr)(C.ScintillaEdit_EOLMode(this.h)) -} +//export miqt_exec_callback_ScintillaEditBase_ScrollContentsBy +func miqt_exec_callback_ScintillaEditBase_ScrollContentsBy(self *C.ScintillaEditBase, cb C.intptr_t, param1 C.int, param2 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int, param2 int), param1 int, param2 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) SetEOLMode(eolMode uintptr) { - C.ScintillaEdit_SetEOLMode(this.h, (C.intptr_t)(eolMode)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) -func (this *ScintillaEdit) StartStyling(start uintptr, unused uintptr) { - C.ScintillaEdit_StartStyling(this.h, (C.intptr_t)(start), (C.intptr_t)(unused)) -} + slotval2 := (int)(param2) -func (this *ScintillaEdit) SetStyling(length uintptr, style uintptr) { - C.ScintillaEdit_SetStyling(this.h, (C.intptr_t)(length), (C.intptr_t)(style)) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) -func (this *ScintillaEdit) BufferedDraw() bool { - return (bool)(C.ScintillaEdit_BufferedDraw(this.h)) } -func (this *ScintillaEdit) SetBufferedDraw(buffered bool) { - C.ScintillaEdit_SetBufferedDraw(this.h, (C.bool)(buffered)) -} +func (this *ScintillaEditBase) callVirtualBase_MinimumSizeHint() *qt.QSize { -func (this *ScintillaEdit) SetTabWidth(tabWidth uintptr) { - C.ScintillaEdit_SetTabWidth(this.h, (C.intptr_t)(tabWidth)) -} + _ret := C.ScintillaEditBase_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -func (this *ScintillaEdit) TabWidth() uintptr { - return (uintptr)(C.ScintillaEdit_TabWidth(this.h)) } - -func (this *ScintillaEdit) SetTabMinimumWidth(pixels uintptr) { - C.ScintillaEdit_SetTabMinimumWidth(this.h, (C.intptr_t)(pixels)) +func (this *ScintillaEditBase) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.ScintillaEditBase_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) TabMinimumWidth() uintptr { - return (uintptr)(C.ScintillaEdit_TabMinimumWidth(this.h)) -} +//export miqt_exec_callback_ScintillaEditBase_MinimumSizeHint +func miqt_exec_callback_ScintillaEditBase_MinimumSizeHint(self *C.ScintillaEditBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) ClearTabStops(line uintptr) { - C.ScintillaEdit_ClearTabStops(this.h, (C.intptr_t)(line)) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MinimumSizeHint) -func (this *ScintillaEdit) AddTabStop(line uintptr, x uintptr) { - C.ScintillaEdit_AddTabStop(this.h, (C.intptr_t)(line), (C.intptr_t)(x)) -} + return (*C.QSize)(virtualReturn.UnsafePointer()) -func (this *ScintillaEdit) GetNextTabStop(line uintptr, x uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_GetNextTabStop(this.h, (C.intptr_t)(line), (C.intptr_t)(x))) } -func (this *ScintillaEdit) SetCodePage(codePage uintptr) { - C.ScintillaEdit_SetCodePage(this.h, (C.intptr_t)(codePage)) -} +func (this *ScintillaEditBase) callVirtualBase_SizeHint() *qt.QSize { -func (this *ScintillaEdit) SetFontLocale(localeName string) { - localeName_Cstring := C.CString(localeName) - defer C.free(unsafe.Pointer(localeName_Cstring)) - C.ScintillaEdit_SetFontLocale(this.h, localeName_Cstring) -} + _ret := C.ScintillaEditBase_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -func (this *ScintillaEdit) FontLocale() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_FontLocale(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret } - -func (this *ScintillaEdit) IMEInteraction() uintptr { - return (uintptr)(C.ScintillaEdit_IMEInteraction(this.h)) +func (this *ScintillaEditBase) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.ScintillaEditBase_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) SetIMEInteraction(imeInteraction uintptr) { - C.ScintillaEdit_SetIMEInteraction(this.h, (C.intptr_t)(imeInteraction)) -} +//export miqt_exec_callback_ScintillaEditBase_SizeHint +func miqt_exec_callback_ScintillaEditBase_SizeHint(self *C.ScintillaEditBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) MarkerDefine(markerNumber uintptr, markerSymbol uintptr) { - C.ScintillaEdit_MarkerDefine(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(markerSymbol)) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_SizeHint) -func (this *ScintillaEdit) MarkerSetFore(markerNumber uintptr, fore uintptr) { - C.ScintillaEdit_MarkerSetFore(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(fore)) -} + return (*C.QSize)(virtualReturn.UnsafePointer()) -func (this *ScintillaEdit) MarkerSetBack(markerNumber uintptr, back uintptr) { - C.ScintillaEdit_MarkerSetBack(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) } -func (this *ScintillaEdit) MarkerSetBackSelected(markerNumber uintptr, back uintptr) { - C.ScintillaEdit_MarkerSetBackSelected(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) -} +func (this *ScintillaEditBase) callVirtualBase_SetupViewport(viewport *qt.QWidget) { -func (this *ScintillaEdit) MarkerSetForeTranslucent(markerNumber uintptr, fore uintptr) { - C.ScintillaEdit_MarkerSetForeTranslucent(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(fore)) -} + C.ScintillaEditBase_virtualbase_SetupViewport(unsafe.Pointer(this.h), (*C.QWidget)(viewport.UnsafePointer())) -func (this *ScintillaEdit) MarkerSetBackTranslucent(markerNumber uintptr, back uintptr) { - C.ScintillaEdit_MarkerSetBackTranslucent(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) } - -func (this *ScintillaEdit) MarkerSetBackSelectedTranslucent(markerNumber uintptr, back uintptr) { - C.ScintillaEdit_MarkerSetBackSelectedTranslucent(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) +func (this *ScintillaEditBase) OnSetupViewport(slot func(super func(viewport *qt.QWidget), viewport *qt.QWidget)) { + C.ScintillaEditBase_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) MarkerSetStrokeWidth(markerNumber uintptr, hundredths uintptr) { - C.ScintillaEdit_MarkerSetStrokeWidth(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(hundredths)) -} +//export miqt_exec_callback_ScintillaEditBase_SetupViewport +func miqt_exec_callback_ScintillaEditBase_SetupViewport(self *C.ScintillaEditBase, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *qt.QWidget), viewport *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) MarkerEnableHighlight(enabled bool) { - C.ScintillaEdit_MarkerEnableHighlight(this.h, (C.bool)(enabled)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) -func (this *ScintillaEdit) MarkerAdd(line uintptr, markerNumber uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerAdd(this.h, (C.intptr_t)(line), (C.intptr_t)(markerNumber))) -} + gofunc((&ScintillaEditBase{h: self}).callVirtualBase_SetupViewport, slotval1) -func (this *ScintillaEdit) MarkerDelete(line uintptr, markerNumber uintptr) { - C.ScintillaEdit_MarkerDelete(this.h, (C.intptr_t)(line), (C.intptr_t)(markerNumber)) } -func (this *ScintillaEdit) MarkerDeleteAll(markerNumber uintptr) { - C.ScintillaEdit_MarkerDeleteAll(this.h, (C.intptr_t)(markerNumber)) -} +func (this *ScintillaEditBase) callVirtualBase_EventFilter(param1 *qt.QObject, param2 *qt.QEvent) bool { -func (this *ScintillaEdit) MarkerGet(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerGet(this.h, (C.intptr_t)(line))) -} + return (bool)(C.ScintillaEditBase_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) -func (this *ScintillaEdit) MarkerNext(lineStart uintptr, markerMask uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerNext(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(markerMask))) } - -func (this *ScintillaEdit) MarkerPrevious(lineStart uintptr, markerMask uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerPrevious(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(markerMask))) +func (this *ScintillaEditBase) OnEventFilter(slot func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) { + C.ScintillaEditBase_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) MarkerDefinePixmap(markerNumber uintptr, pixmap string) { - pixmap_Cstring := C.CString(pixmap) - defer C.free(unsafe.Pointer(pixmap_Cstring)) - C.ScintillaEdit_MarkerDefinePixmap(this.h, (C.intptr_t)(markerNumber), pixmap_Cstring) -} +//export miqt_exec_callback_ScintillaEditBase_EventFilter +func miqt_exec_callback_ScintillaEditBase_EventFilter(self *C.ScintillaEditBase, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) MarkerAddSet(line uintptr, markerSet uintptr) { - C.ScintillaEdit_MarkerAddSet(this.h, (C.intptr_t)(line), (C.intptr_t)(markerSet)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(param2)) -func (this *ScintillaEdit) MarkerSetAlpha(markerNumber uintptr, alpha uintptr) { - C.ScintillaEdit_MarkerSetAlpha(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(alpha)) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) -func (this *ScintillaEdit) MarkerLayer(markerNumber uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerLayer(this.h, (C.intptr_t)(markerNumber))) -} + return (C.bool)(virtualReturn) -func (this *ScintillaEdit) MarkerSetLayer(markerNumber uintptr, layer uintptr) { - C.ScintillaEdit_MarkerSetLayer(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(layer)) } -func (this *ScintillaEdit) SetMarginTypeN(margin uintptr, marginType uintptr) { - C.ScintillaEdit_SetMarginTypeN(this.h, (C.intptr_t)(margin), (C.intptr_t)(marginType)) -} +func (this *ScintillaEditBase) callVirtualBase_ViewportEvent(param1 *qt.QEvent) bool { -func (this *ScintillaEdit) MarginTypeN(margin uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarginTypeN(this.h, (C.intptr_t)(margin))) -} + return (bool)(C.ScintillaEditBase_virtualbase_ViewportEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) -func (this *ScintillaEdit) SetMarginWidthN(margin uintptr, pixelWidth uintptr) { - C.ScintillaEdit_SetMarginWidthN(this.h, (C.intptr_t)(margin), (C.intptr_t)(pixelWidth)) } - -func (this *ScintillaEdit) MarginWidthN(margin uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarginWidthN(this.h, (C.intptr_t)(margin))) +func (this *ScintillaEditBase) OnViewportEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.ScintillaEditBase_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) SetMarginMaskN(margin uintptr, mask uintptr) { - C.ScintillaEdit_SetMarginMaskN(this.h, (C.intptr_t)(margin), (C.intptr_t)(mask)) -} +//export miqt_exec_callback_ScintillaEditBase_ViewportEvent +func miqt_exec_callback_ScintillaEditBase_ViewportEvent(self *C.ScintillaEditBase, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) MarginMaskN(margin uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarginMaskN(this.h, (C.intptr_t)(margin))) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) -func (this *ScintillaEdit) SetMarginSensitiveN(margin uintptr, sensitive bool) { - C.ScintillaEdit_SetMarginSensitiveN(this.h, (C.intptr_t)(margin), (C.bool)(sensitive)) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ViewportEvent, slotval1) -func (this *ScintillaEdit) MarginSensitiveN(margin uintptr) bool { - return (bool)(C.ScintillaEdit_MarginSensitiveN(this.h, (C.intptr_t)(margin))) -} + return (C.bool)(virtualReturn) -func (this *ScintillaEdit) SetMarginCursorN(margin uintptr, cursor uintptr) { - C.ScintillaEdit_SetMarginCursorN(this.h, (C.intptr_t)(margin), (C.intptr_t)(cursor)) } -func (this *ScintillaEdit) MarginCursorN(margin uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarginCursorN(this.h, (C.intptr_t)(margin))) -} +func (this *ScintillaEditBase) callVirtualBase_ViewportSizeHint() *qt.QSize { -func (this *ScintillaEdit) SetMarginBackN(margin uintptr, back uintptr) { - C.ScintillaEdit_SetMarginBackN(this.h, (C.intptr_t)(margin), (C.intptr_t)(back)) -} + _ret := C.ScintillaEditBase_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -func (this *ScintillaEdit) MarginBackN(margin uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarginBackN(this.h, (C.intptr_t)(margin))) } - -func (this *ScintillaEdit) SetMargins(margins uintptr) { - C.ScintillaEdit_SetMargins(this.h, (C.intptr_t)(margins)) +func (this *ScintillaEditBase) OnViewportSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.ScintillaEditBase_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) Margins() uintptr { - return (uintptr)(C.ScintillaEdit_Margins(this.h)) -} +//export miqt_exec_callback_ScintillaEditBase_ViewportSizeHint +func miqt_exec_callback_ScintillaEditBase_ViewportSizeHint(self *C.ScintillaEditBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) StyleClearAll() { - C.ScintillaEdit_StyleClearAll(this.h) -} + virtualReturn := gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ViewportSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) -func (this *ScintillaEdit) StyleSetFore(style uintptr, fore uintptr) { - C.ScintillaEdit_StyleSetFore(this.h, (C.intptr_t)(style), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) StyleSetBack(style uintptr, back uintptr) { - C.ScintillaEdit_StyleSetBack(this.h, (C.intptr_t)(style), (C.intptr_t)(back)) +// Delete this object from C++ memory. +func (this *ScintillaEditBase) Delete() { + C.ScintillaEditBase_Delete(this.h, C.bool(this.isSubclass)) } -func (this *ScintillaEdit) StyleSetBold(style uintptr, bold bool) { - C.ScintillaEdit_StyleSetBold(this.h, (C.intptr_t)(style), (C.bool)(bold)) +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *ScintillaEditBase) GoGC() { + runtime.SetFinalizer(this, func(this *ScintillaEditBase) { + this.Delete() + runtime.KeepAlive(this.h) + }) } -func (this *ScintillaEdit) StyleSetItalic(style uintptr, italic bool) { - C.ScintillaEdit_StyleSetItalic(this.h, (C.intptr_t)(style), (C.bool)(italic)) +type ScintillaDocument struct { + h *C.ScintillaDocument + isSubclass bool + *qt.QObject } -func (this *ScintillaEdit) StyleSetSize(style uintptr, sizePoints uintptr) { - C.ScintillaEdit_StyleSetSize(this.h, (C.intptr_t)(style), (C.intptr_t)(sizePoints)) +func (this *ScintillaDocument) cPointer() *C.ScintillaDocument { + if this == nil { + return nil + } + return this.h } -func (this *ScintillaEdit) StyleSetFont(style uintptr, fontName string) { - fontName_Cstring := C.CString(fontName) - defer C.free(unsafe.Pointer(fontName_Cstring)) - C.ScintillaEdit_StyleSetFont(this.h, (C.intptr_t)(style), fontName_Cstring) +func (this *ScintillaDocument) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) } -func (this *ScintillaEdit) StyleSetEOLFilled(style uintptr, eolFilled bool) { - C.ScintillaEdit_StyleSetEOLFilled(this.h, (C.intptr_t)(style), (C.bool)(eolFilled)) +// newScintillaDocument constructs the type using only CGO pointers. +func newScintillaDocument(h *C.ScintillaDocument, h_QObject *C.QObject) *ScintillaDocument { + if h == nil { + return nil + } + return &ScintillaDocument{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func (this *ScintillaEdit) StyleResetDefault() { - C.ScintillaEdit_StyleResetDefault(this.h) -} +// UnsafeNewScintillaDocument constructs the type using only unsafe pointers. +func UnsafeNewScintillaDocument(h unsafe.Pointer, h_QObject unsafe.Pointer) *ScintillaDocument { + if h == nil { + return nil + } -func (this *ScintillaEdit) StyleSetUnderline(style uintptr, underline bool) { - C.ScintillaEdit_StyleSetUnderline(this.h, (C.intptr_t)(style), (C.bool)(underline)) + return &ScintillaDocument{h: (*C.ScintillaDocument)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } -func (this *ScintillaEdit) StyleFore(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleFore(this.h, (C.intptr_t)(style))) +// NewScintillaDocument constructs a new ScintillaDocument object. +func NewScintillaDocument() *ScintillaDocument { + var outptr_ScintillaDocument *C.ScintillaDocument = nil + var outptr_QObject *C.QObject = nil + + C.ScintillaDocument_new(&outptr_ScintillaDocument, &outptr_QObject) + ret := newScintillaDocument(outptr_ScintillaDocument, outptr_QObject) + ret.isSubclass = true + return ret } -func (this *ScintillaEdit) StyleBack(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleBack(this.h, (C.intptr_t)(style))) +// NewScintillaDocument2 constructs a new ScintillaDocument object. +func NewScintillaDocument2(parent *qt.QObject) *ScintillaDocument { + var outptr_ScintillaDocument *C.ScintillaDocument = nil + var outptr_QObject *C.QObject = nil + + C.ScintillaDocument_new2((*C.QObject)(parent.UnsafePointer()), &outptr_ScintillaDocument, &outptr_QObject) + ret := newScintillaDocument(outptr_ScintillaDocument, outptr_QObject) + ret.isSubclass = true + return ret } -func (this *ScintillaEdit) StyleBold(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleBold(this.h, (C.intptr_t)(style))) +// NewScintillaDocument3 constructs a new ScintillaDocument object. +func NewScintillaDocument3(parent *qt.QObject, pdoc_ unsafe.Pointer) *ScintillaDocument { + var outptr_ScintillaDocument *C.ScintillaDocument = nil + var outptr_QObject *C.QObject = nil + + C.ScintillaDocument_new3((*C.QObject)(parent.UnsafePointer()), pdoc_, &outptr_ScintillaDocument, &outptr_QObject) + ret := newScintillaDocument(outptr_ScintillaDocument, outptr_QObject) + ret.isSubclass = true + return ret } -func (this *ScintillaEdit) StyleItalic(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleItalic(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.ScintillaDocument_MetaObject(this.h))) } -func (this *ScintillaEdit) StyleSize(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleSize(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.ScintillaDocument_Metacast(this.h, param1_Cstring)) } -func (this *ScintillaEdit) StyleFont(style uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_StyleFont(this.h, (C.intptr_t)(style)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) +func ScintillaDocument_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaDocument_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) return _ret } -func (this *ScintillaEdit) StyleEOLFilled(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleEOLFilled(this.h, (C.intptr_t)(style))) +func ScintillaDocument_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaDocument_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) StyleUnderline(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleUnderline(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) Pointer() unsafe.Pointer { + return (unsafe.Pointer)(C.ScintillaDocument_Pointer(this.h)) } -func (this *ScintillaEdit) StyleCase(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleCase(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) LineFromPosition(pos int) int { + return (int)(C.ScintillaDocument_LineFromPosition(this.h, (C.int)(pos))) } -func (this *ScintillaEdit) StyleCharacterSet(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleCharacterSet(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) IsCrLf(pos int) bool { + return (bool)(C.ScintillaDocument_IsCrLf(this.h, (C.int)(pos))) } -func (this *ScintillaEdit) StyleVisible(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleVisible(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) DeleteChars(pos int, lenVal int) bool { + return (bool)(C.ScintillaDocument_DeleteChars(this.h, (C.int)(pos), (C.int)(lenVal))) } -func (this *ScintillaEdit) StyleChangeable(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleChangeable(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) Undo() int { + return (int)(C.ScintillaDocument_Undo(this.h)) } -func (this *ScintillaEdit) StyleHotSpot(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleHotSpot(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) Redo() int { + return (int)(C.ScintillaDocument_Redo(this.h)) } -func (this *ScintillaEdit) StyleSetCase(style uintptr, caseVisible uintptr) { - C.ScintillaEdit_StyleSetCase(this.h, (C.intptr_t)(style), (C.intptr_t)(caseVisible)) +func (this *ScintillaDocument) CanUndo() bool { + return (bool)(C.ScintillaDocument_CanUndo(this.h)) } -func (this *ScintillaEdit) StyleSetSizeFractional(style uintptr, sizeHundredthPoints uintptr) { - C.ScintillaEdit_StyleSetSizeFractional(this.h, (C.intptr_t)(style), (C.intptr_t)(sizeHundredthPoints)) +func (this *ScintillaDocument) CanRedo() bool { + return (bool)(C.ScintillaDocument_CanRedo(this.h)) } -func (this *ScintillaEdit) StyleSizeFractional(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleSizeFractional(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) DeleteUndoHistory() { + C.ScintillaDocument_DeleteUndoHistory(this.h) } -func (this *ScintillaEdit) StyleSetWeight(style uintptr, weight uintptr) { - C.ScintillaEdit_StyleSetWeight(this.h, (C.intptr_t)(style), (C.intptr_t)(weight)) +func (this *ScintillaDocument) SetUndoCollection(collect_undo bool) bool { + return (bool)(C.ScintillaDocument_SetUndoCollection(this.h, (C.bool)(collect_undo))) } -func (this *ScintillaEdit) StyleWeight(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleWeight(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) IsCollectingUndo() bool { + return (bool)(C.ScintillaDocument_IsCollectingUndo(this.h)) } -func (this *ScintillaEdit) StyleSetCharacterSet(style uintptr, characterSet uintptr) { - C.ScintillaEdit_StyleSetCharacterSet(this.h, (C.intptr_t)(style), (C.intptr_t)(characterSet)) +func (this *ScintillaDocument) BeginUndoAction() { + C.ScintillaDocument_BeginUndoAction(this.h) } -func (this *ScintillaEdit) StyleSetHotSpot(style uintptr, hotspot bool) { - C.ScintillaEdit_StyleSetHotSpot(this.h, (C.intptr_t)(style), (C.bool)(hotspot)) +func (this *ScintillaDocument) EndUndoAction() { + C.ScintillaDocument_EndUndoAction(this.h) } -func (this *ScintillaEdit) StyleSetCheckMonospaced(style uintptr, checkMonospaced bool) { - C.ScintillaEdit_StyleSetCheckMonospaced(this.h, (C.intptr_t)(style), (C.bool)(checkMonospaced)) +func (this *ScintillaDocument) SetSavePoint() { + C.ScintillaDocument_SetSavePoint(this.h) } -func (this *ScintillaEdit) StyleCheckMonospaced(style uintptr) bool { - return (bool)(C.ScintillaEdit_StyleCheckMonospaced(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) IsSavePoint() bool { + return (bool)(C.ScintillaDocument_IsSavePoint(this.h)) } -func (this *ScintillaEdit) StyleSetStretch(style uintptr, stretch uintptr) { - C.ScintillaEdit_StyleSetStretch(this.h, (C.intptr_t)(style), (C.intptr_t)(stretch)) +func (this *ScintillaDocument) SetReadOnly(read_only bool) { + C.ScintillaDocument_SetReadOnly(this.h, (C.bool)(read_only)) } -func (this *ScintillaEdit) StyleStretch(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleStretch(this.h, (C.intptr_t)(style))) +func (this *ScintillaDocument) IsReadOnly() bool { + return (bool)(C.ScintillaDocument_IsReadOnly(this.h)) } -func (this *ScintillaEdit) StyleSetInvisibleRepresentation(style uintptr, representation string) { - representation_Cstring := C.CString(representation) - defer C.free(unsafe.Pointer(representation_Cstring)) - C.ScintillaEdit_StyleSetInvisibleRepresentation(this.h, (C.intptr_t)(style), representation_Cstring) +func (this *ScintillaDocument) InsertString(position int, str []byte) { + str_alias := C.struct_miqt_string{} + str_alias.data = (*C.char)(unsafe.Pointer(&str[0])) + str_alias.len = C.size_t(len(str)) + C.ScintillaDocument_InsertString(this.h, (C.int)(position), str_alias) } -func (this *ScintillaEdit) StyleInvisibleRepresentation(style uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_StyleInvisibleRepresentation(this.h, (C.intptr_t)(style)) +func (this *ScintillaDocument) GetCharRange(position int, length int) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaDocument_GetCharRange(this.h, (C.int)(position), (C.int)(length)) _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) C.free(unsafe.Pointer(_bytearray.data)) return _ret } -func (this *ScintillaEdit) SetElementColour(element uintptr, colourElement uintptr) { - C.ScintillaEdit_SetElementColour(this.h, (C.intptr_t)(element), (C.intptr_t)(colourElement)) +func (this *ScintillaDocument) StyleAt(position int) int8 { + return (int8)(C.ScintillaDocument_StyleAt(this.h, (C.int)(position))) } -func (this *ScintillaEdit) ElementColour(element uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_ElementColour(this.h, (C.intptr_t)(element))) +func (this *ScintillaDocument) LineStart(lineno int) int { + return (int)(C.ScintillaDocument_LineStart(this.h, (C.int)(lineno))) } -func (this *ScintillaEdit) ResetElementColour(element uintptr) { - C.ScintillaEdit_ResetElementColour(this.h, (C.intptr_t)(element)) +func (this *ScintillaDocument) LineEnd(lineno int) int { + return (int)(C.ScintillaDocument_LineEnd(this.h, (C.int)(lineno))) } -func (this *ScintillaEdit) ElementIsSet(element uintptr) bool { - return (bool)(C.ScintillaEdit_ElementIsSet(this.h, (C.intptr_t)(element))) +func (this *ScintillaDocument) LineEndPosition(pos int) int { + return (int)(C.ScintillaDocument_LineEndPosition(this.h, (C.int)(pos))) } -func (this *ScintillaEdit) ElementAllowsTranslucent(element uintptr) bool { - return (bool)(C.ScintillaEdit_ElementAllowsTranslucent(this.h, (C.intptr_t)(element))) +func (this *ScintillaDocument) Length() int { + return (int)(C.ScintillaDocument_Length(this.h)) } -func (this *ScintillaEdit) ElementBaseColour(element uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_ElementBaseColour(this.h, (C.intptr_t)(element))) +func (this *ScintillaDocument) LinesTotal() int { + return (int)(C.ScintillaDocument_LinesTotal(this.h)) } -func (this *ScintillaEdit) SetSelFore(useSetting bool, fore uintptr) { - C.ScintillaEdit_SetSelFore(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) +func (this *ScintillaDocument) StartStyling(position int) { + C.ScintillaDocument_StartStyling(this.h, (C.int)(position)) } -func (this *ScintillaEdit) SetSelBack(useSetting bool, back uintptr) { - C.ScintillaEdit_SetSelBack(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) +func (this *ScintillaDocument) SetStyleFor(length int, style int8) bool { + return (bool)(C.ScintillaDocument_SetStyleFor(this.h, (C.int)(length), (C.char)(style))) } -func (this *ScintillaEdit) SelAlpha() uintptr { - return (uintptr)(C.ScintillaEdit_SelAlpha(this.h)) +func (this *ScintillaDocument) GetEndStyled() int { + return (int)(C.ScintillaDocument_GetEndStyled(this.h)) } -func (this *ScintillaEdit) SetSelAlpha(alpha uintptr) { - C.ScintillaEdit_SetSelAlpha(this.h, (C.intptr_t)(alpha)) +func (this *ScintillaDocument) EnsureStyledTo(position int) { + C.ScintillaDocument_EnsureStyledTo(this.h, (C.int)(position)) } -func (this *ScintillaEdit) SelEOLFilled() bool { - return (bool)(C.ScintillaEdit_SelEOLFilled(this.h)) +func (this *ScintillaDocument) SetCurrentIndicator(indic int) { + C.ScintillaDocument_SetCurrentIndicator(this.h, (C.int)(indic)) } -func (this *ScintillaEdit) SetSelEOLFilled(filled bool) { - C.ScintillaEdit_SetSelEOLFilled(this.h, (C.bool)(filled)) +func (this *ScintillaDocument) DecorationFillRange(position int, value int, fillLength int) { + C.ScintillaDocument_DecorationFillRange(this.h, (C.int)(position), (C.int)(value), (C.int)(fillLength)) } -func (this *ScintillaEdit) SelectionLayer() uintptr { - return (uintptr)(C.ScintillaEdit_SelectionLayer(this.h)) +func (this *ScintillaDocument) DecorationsValueAt(indic int, position int) int { + return (int)(C.ScintillaDocument_DecorationsValueAt(this.h, (C.int)(indic), (C.int)(position))) } -func (this *ScintillaEdit) SetSelectionLayer(layer uintptr) { - C.ScintillaEdit_SetSelectionLayer(this.h, (C.intptr_t)(layer)) +func (this *ScintillaDocument) DecorationsStart(indic int, position int) int { + return (int)(C.ScintillaDocument_DecorationsStart(this.h, (C.int)(indic), (C.int)(position))) } -func (this *ScintillaEdit) CaretLineLayer() uintptr { - return (uintptr)(C.ScintillaEdit_CaretLineLayer(this.h)) +func (this *ScintillaDocument) DecorationsEnd(indic int, position int) int { + return (int)(C.ScintillaDocument_DecorationsEnd(this.h, (C.int)(indic), (C.int)(position))) } -func (this *ScintillaEdit) SetCaretLineLayer(layer uintptr) { - C.ScintillaEdit_SetCaretLineLayer(this.h, (C.intptr_t)(layer)) +func (this *ScintillaDocument) GetCodePage() int { + return (int)(C.ScintillaDocument_GetCodePage(this.h)) } -func (this *ScintillaEdit) CaretLineHighlightSubLine() bool { - return (bool)(C.ScintillaEdit_CaretLineHighlightSubLine(this.h)) +func (this *ScintillaDocument) SetCodePage(code_page int) { + C.ScintillaDocument_SetCodePage(this.h, (C.int)(code_page)) } -func (this *ScintillaEdit) SetCaretLineHighlightSubLine(subLine bool) { - C.ScintillaEdit_SetCaretLineHighlightSubLine(this.h, (C.bool)(subLine)) +func (this *ScintillaDocument) GetEolMode() int { + return (int)(C.ScintillaDocument_GetEolMode(this.h)) } -func (this *ScintillaEdit) SetCaretFore(fore uintptr) { - C.ScintillaEdit_SetCaretFore(this.h, (C.intptr_t)(fore)) +func (this *ScintillaDocument) SetEolMode(eol_mode int) { + C.ScintillaDocument_SetEolMode(this.h, (C.int)(eol_mode)) } -func (this *ScintillaEdit) AssignCmdKey(keyDefinition uintptr, sciCommand uintptr) { - C.ScintillaEdit_AssignCmdKey(this.h, (C.intptr_t)(keyDefinition), (C.intptr_t)(sciCommand)) +func (this *ScintillaDocument) MovePositionOutsideChar(pos int, move_dir int, check_line_end bool) int { + return (int)(C.ScintillaDocument_MovePositionOutsideChar(this.h, (C.int)(pos), (C.int)(move_dir), (C.bool)(check_line_end))) } -func (this *ScintillaEdit) ClearCmdKey(keyDefinition uintptr) { - C.ScintillaEdit_ClearCmdKey(this.h, (C.intptr_t)(keyDefinition)) +func (this *ScintillaDocument) GetCharacter(pos int) int { + return (int)(C.ScintillaDocument_GetCharacter(this.h, (C.int)(pos))) } -func (this *ScintillaEdit) ClearAllCmdKeys() { - C.ScintillaEdit_ClearAllCmdKeys(this.h) +func (this *ScintillaDocument) ModifyAttempt() { + C.ScintillaDocument_ModifyAttempt(this.h) } - -func (this *ScintillaEdit) SetStylingEx(length uintptr, styles string) { - styles_Cstring := C.CString(styles) - defer C.free(unsafe.Pointer(styles_Cstring)) - C.ScintillaEdit_SetStylingEx(this.h, (C.intptr_t)(length), styles_Cstring) +func (this *ScintillaDocument) OnModifyAttempt(slot func()) { + C.ScintillaDocument_connect_ModifyAttempt(this.h, C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) StyleSetVisible(style uintptr, visible bool) { - C.ScintillaEdit_StyleSetVisible(this.h, (C.intptr_t)(style), (C.bool)(visible)) -} +//export miqt_exec_callback_ScintillaDocument_ModifyAttempt +func miqt_exec_callback_ScintillaDocument_ModifyAttempt(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) CaretPeriod() uintptr { - return (uintptr)(C.ScintillaEdit_CaretPeriod(this.h)) + gofunc() } -func (this *ScintillaEdit) SetCaretPeriod(periodMilliseconds uintptr) { - C.ScintillaEdit_SetCaretPeriod(this.h, (C.intptr_t)(periodMilliseconds)) +func (this *ScintillaDocument) SavePoint(atSavePoint bool) { + C.ScintillaDocument_SavePoint(this.h, (C.bool)(atSavePoint)) } - -func (this *ScintillaEdit) SetWordChars(characters string) { - characters_Cstring := C.CString(characters) - defer C.free(unsafe.Pointer(characters_Cstring)) - C.ScintillaEdit_SetWordChars(this.h, characters_Cstring) +func (this *ScintillaDocument) OnSavePoint(slot func(atSavePoint bool)) { + C.ScintillaDocument_connect_SavePoint(this.h, C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) WordChars() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_WordChars(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret -} +//export miqt_exec_callback_ScintillaDocument_SavePoint +func miqt_exec_callback_ScintillaDocument_SavePoint(cb C.intptr_t, atSavePoint C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(atSavePoint bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) SetCharacterCategoryOptimization(countCharacters uintptr) { - C.ScintillaEdit_SetCharacterCategoryOptimization(this.h, (C.intptr_t)(countCharacters)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(atSavePoint) -func (this *ScintillaEdit) CharacterCategoryOptimization() uintptr { - return (uintptr)(C.ScintillaEdit_CharacterCategoryOptimization(this.h)) + gofunc(slotval1) } -func (this *ScintillaEdit) BeginUndoAction() { - C.ScintillaEdit_BeginUndoAction(this.h) +func (this *ScintillaDocument) Modified(position int, modification_type int, text []byte, length int, linesAdded int, line int, foldLevelNow int, foldLevelPrev int) { + text_alias := C.struct_miqt_string{} + text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) + text_alias.len = C.size_t(len(text)) + C.ScintillaDocument_Modified(this.h, (C.int)(position), (C.int)(modification_type), text_alias, (C.int)(length), (C.int)(linesAdded), (C.int)(line), (C.int)(foldLevelNow), (C.int)(foldLevelPrev)) } - -func (this *ScintillaEdit) EndUndoAction() { - C.ScintillaEdit_EndUndoAction(this.h) +func (this *ScintillaDocument) OnModified(slot func(position int, modification_type int, text []byte, length int, linesAdded int, line int, foldLevelNow int, foldLevelPrev int)) { + C.ScintillaDocument_connect_Modified(this.h, C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) UndoSequence() uintptr { - return (uintptr)(C.ScintillaEdit_UndoSequence(this.h)) -} +//export miqt_exec_callback_ScintillaDocument_Modified +func miqt_exec_callback_ScintillaDocument_Modified(cb C.intptr_t, position C.int, modification_type C.int, text C.struct_miqt_string, length C.int, linesAdded C.int, line C.int, foldLevelNow C.int, foldLevelPrev C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(position int, modification_type int, text []byte, length int, linesAdded int, line int, foldLevelNow int, foldLevelPrev int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) UndoActions() uintptr { - return (uintptr)(C.ScintillaEdit_UndoActions(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(position) -func (this *ScintillaEdit) SetUndoSavePoint(action uintptr) { - C.ScintillaEdit_SetUndoSavePoint(this.h, (C.intptr_t)(action)) -} + slotval2 := (int)(modification_type) -func (this *ScintillaEdit) UndoSavePoint() uintptr { - return (uintptr)(C.ScintillaEdit_UndoSavePoint(this.h)) -} + var text_bytearray C.struct_miqt_string = text + text_ret := C.GoBytes(unsafe.Pointer(text_bytearray.data), C.int(int64(text_bytearray.len))) + C.free(unsafe.Pointer(text_bytearray.data)) + slotval3 := text_ret + slotval4 := (int)(length) -func (this *ScintillaEdit) SetUndoDetach(action uintptr) { - C.ScintillaEdit_SetUndoDetach(this.h, (C.intptr_t)(action)) -} + slotval5 := (int)(linesAdded) -func (this *ScintillaEdit) UndoDetach() uintptr { - return (uintptr)(C.ScintillaEdit_UndoDetach(this.h)) -} + slotval6 := (int)(line) -func (this *ScintillaEdit) SetUndoTentative(action uintptr) { - C.ScintillaEdit_SetUndoTentative(this.h, (C.intptr_t)(action)) -} + slotval7 := (int)(foldLevelNow) -func (this *ScintillaEdit) UndoTentative() uintptr { - return (uintptr)(C.ScintillaEdit_UndoTentative(this.h)) -} + slotval8 := (int)(foldLevelPrev) -func (this *ScintillaEdit) SetUndoCurrent(action uintptr) { - C.ScintillaEdit_SetUndoCurrent(this.h, (C.intptr_t)(action)) + gofunc(slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7, slotval8) } -func (this *ScintillaEdit) UndoCurrent() uintptr { - return (uintptr)(C.ScintillaEdit_UndoCurrent(this.h)) +func (this *ScintillaDocument) StyleNeeded(pos int) { + C.ScintillaDocument_StyleNeeded(this.h, (C.int)(pos)) } - -func (this *ScintillaEdit) PushUndoActionType(typeVal uintptr, pos uintptr) { - C.ScintillaEdit_PushUndoActionType(this.h, (C.intptr_t)(typeVal), (C.intptr_t)(pos)) +func (this *ScintillaDocument) OnStyleNeeded(slot func(pos int)) { + C.ScintillaDocument_connect_StyleNeeded(this.h, C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) ChangeLastUndoActionText(length uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_ChangeLastUndoActionText(this.h, (C.intptr_t)(length), text_Cstring) -} +//export miqt_exec_callback_ScintillaDocument_StyleNeeded +func miqt_exec_callback_ScintillaDocument_StyleNeeded(cb C.intptr_t, pos C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pos int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) UndoActionType(action uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_UndoActionType(this.h, (C.intptr_t)(action))) -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pos) -func (this *ScintillaEdit) UndoActionPosition(action uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_UndoActionPosition(this.h, (C.intptr_t)(action))) + gofunc(slotval1) } -func (this *ScintillaEdit) UndoActionText(action uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_UndoActionText(this.h, (C.intptr_t)(action)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaDocument) ErrorOccurred(status int) { + C.ScintillaDocument_ErrorOccurred(this.h, (C.int)(status)) } - -func (this *ScintillaEdit) IndicSetStyle(indicator uintptr, indicatorStyle uintptr) { - C.ScintillaEdit_IndicSetStyle(this.h, (C.intptr_t)(indicator), (C.intptr_t)(indicatorStyle)) +func (this *ScintillaDocument) OnErrorOccurred(slot func(status int)) { + C.ScintillaDocument_connect_ErrorOccurred(this.h, C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) IndicStyle(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicStyle(this.h, (C.intptr_t)(indicator))) -} +//export miqt_exec_callback_ScintillaDocument_ErrorOccurred +func miqt_exec_callback_ScintillaDocument_ErrorOccurred(cb C.intptr_t, status C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(status int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) IndicSetFore(indicator uintptr, fore uintptr) { - C.ScintillaEdit_IndicSetFore(this.h, (C.intptr_t)(indicator), (C.intptr_t)(fore)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(status) -func (this *ScintillaEdit) IndicFore(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicFore(this.h, (C.intptr_t)(indicator))) + gofunc(slotval1) } -func (this *ScintillaEdit) IndicSetUnder(indicator uintptr, under bool) { - C.ScintillaEdit_IndicSetUnder(this.h, (C.intptr_t)(indicator), (C.bool)(under)) +func ScintillaDocument_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaDocument_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) IndicUnder(indicator uintptr) bool { - return (bool)(C.ScintillaEdit_IndicUnder(this.h, (C.intptr_t)(indicator))) +func ScintillaDocument_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaDocument_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) IndicSetHoverStyle(indicator uintptr, indicatorStyle uintptr) { - C.ScintillaEdit_IndicSetHoverStyle(this.h, (C.intptr_t)(indicator), (C.intptr_t)(indicatorStyle)) +func ScintillaDocument_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaDocument_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) IndicHoverStyle(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicHoverStyle(this.h, (C.intptr_t)(indicator))) +func ScintillaDocument_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaDocument_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) IndicSetHoverFore(indicator uintptr, fore uintptr) { - C.ScintillaEdit_IndicSetHoverFore(this.h, (C.intptr_t)(indicator), (C.intptr_t)(fore)) +func (this *ScintillaDocument) BeginUndoAction1(coalesceWithPrior bool) { + C.ScintillaDocument_BeginUndoAction1(this.h, (C.bool)(coalesceWithPrior)) } -func (this *ScintillaEdit) IndicHoverFore(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicHoverFore(this.h, (C.intptr_t)(indicator))) -} +func (this *ScintillaDocument) callVirtualBase_Event(event *qt.QEvent) bool { -func (this *ScintillaEdit) IndicSetFlags(indicator uintptr, flags uintptr) { - C.ScintillaEdit_IndicSetFlags(this.h, (C.intptr_t)(indicator), (C.intptr_t)(flags)) -} + return (bool)(C.ScintillaDocument_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) -func (this *ScintillaEdit) IndicFlags(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicFlags(this.h, (C.intptr_t)(indicator))) } - -func (this *ScintillaEdit) IndicSetStrokeWidth(indicator uintptr, hundredths uintptr) { - C.ScintillaEdit_IndicSetStrokeWidth(this.h, (C.intptr_t)(indicator), (C.intptr_t)(hundredths)) +func (this *ScintillaDocument) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.ScintillaDocument_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) IndicStrokeWidth(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicStrokeWidth(this.h, (C.intptr_t)(indicator))) -} +//export miqt_exec_callback_ScintillaDocument_Event +func miqt_exec_callback_ScintillaDocument_Event(self *C.ScintillaDocument, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) SetWhitespaceFore(useSetting bool, fore uintptr) { - C.ScintillaEdit_SetWhitespaceFore(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) -func (this *ScintillaEdit) SetWhitespaceBack(useSetting bool, back uintptr) { - C.ScintillaEdit_SetWhitespaceBack(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) -} + virtualReturn := gofunc((&ScintillaDocument{h: self}).callVirtualBase_Event, slotval1) -func (this *ScintillaEdit) SetWhitespaceSize(size uintptr) { - C.ScintillaEdit_SetWhitespaceSize(this.h, (C.intptr_t)(size)) -} + return (C.bool)(virtualReturn) -func (this *ScintillaEdit) WhitespaceSize() uintptr { - return (uintptr)(C.ScintillaEdit_WhitespaceSize(this.h)) } -func (this *ScintillaEdit) SetLineState(line uintptr, state uintptr) { - C.ScintillaEdit_SetLineState(this.h, (C.intptr_t)(line), (C.intptr_t)(state)) -} +func (this *ScintillaDocument) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { -func (this *ScintillaEdit) LineState(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineState(this.h, (C.intptr_t)(line))) -} + return (bool)(C.ScintillaDocument_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) -func (this *ScintillaEdit) MaxLineState() uintptr { - return (uintptr)(C.ScintillaEdit_MaxLineState(this.h)) } - -func (this *ScintillaEdit) CaretLineVisible() bool { - return (bool)(C.ScintillaEdit_CaretLineVisible(this.h)) +func (this *ScintillaDocument) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.ScintillaDocument_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) SetCaretLineVisible(show bool) { - C.ScintillaEdit_SetCaretLineVisible(this.h, (C.bool)(show)) -} +//export miqt_exec_callback_ScintillaDocument_EventFilter +func miqt_exec_callback_ScintillaDocument_EventFilter(self *C.ScintillaDocument, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) CaretLineBack() uintptr { - return (uintptr)(C.ScintillaEdit_CaretLineBack(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) -func (this *ScintillaEdit) SetCaretLineBack(back uintptr) { - C.ScintillaEdit_SetCaretLineBack(this.h, (C.intptr_t)(back)) -} + virtualReturn := gofunc((&ScintillaDocument{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) -func (this *ScintillaEdit) CaretLineFrame() uintptr { - return (uintptr)(C.ScintillaEdit_CaretLineFrame(this.h)) -} + return (C.bool)(virtualReturn) -func (this *ScintillaEdit) SetCaretLineFrame(width uintptr) { - C.ScintillaEdit_SetCaretLineFrame(this.h, (C.intptr_t)(width)) } -func (this *ScintillaEdit) StyleSetChangeable(style uintptr, changeable bool) { - C.ScintillaEdit_StyleSetChangeable(this.h, (C.intptr_t)(style), (C.bool)(changeable)) +func (this *ScintillaDocument) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.ScintillaDocument_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *ScintillaDocument) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.ScintillaDocument_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) AutoCShow(lengthEntered uintptr, itemList string) { - itemList_Cstring := C.CString(itemList) - defer C.free(unsafe.Pointer(itemList_Cstring)) - C.ScintillaEdit_AutoCShow(this.h, (C.intptr_t)(lengthEntered), itemList_Cstring) -} +//export miqt_exec_callback_ScintillaDocument_TimerEvent +func miqt_exec_callback_ScintillaDocument_TimerEvent(self *C.ScintillaDocument, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) AutoCCancel() { - C.ScintillaEdit_AutoCCancel(this.h) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) -func (this *ScintillaEdit) AutoCActive() bool { - return (bool)(C.ScintillaEdit_AutoCActive(this.h)) -} + gofunc((&ScintillaDocument{h: self}).callVirtualBase_TimerEvent, slotval1) -func (this *ScintillaEdit) AutoCPosStart() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCPosStart(this.h)) } -func (this *ScintillaEdit) AutoCComplete() { - C.ScintillaEdit_AutoCComplete(this.h) -} +func (this *ScintillaDocument) callVirtualBase_ChildEvent(event *qt.QChildEvent) { -func (this *ScintillaEdit) AutoCStops(characterSet string) { - characterSet_Cstring := C.CString(characterSet) - defer C.free(unsafe.Pointer(characterSet_Cstring)) - C.ScintillaEdit_AutoCStops(this.h, characterSet_Cstring) -} + C.ScintillaDocument_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) -func (this *ScintillaEdit) AutoCSetSeparator(separatorCharacter uintptr) { - C.ScintillaEdit_AutoCSetSeparator(this.h, (C.intptr_t)(separatorCharacter)) } - -func (this *ScintillaEdit) AutoCSeparator() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCSeparator(this.h)) +func (this *ScintillaDocument) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.ScintillaDocument_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) AutoCSelect(selectVal string) { - selectVal_Cstring := C.CString(selectVal) - defer C.free(unsafe.Pointer(selectVal_Cstring)) - C.ScintillaEdit_AutoCSelect(this.h, selectVal_Cstring) -} +//export miqt_exec_callback_ScintillaDocument_ChildEvent +func miqt_exec_callback_ScintillaDocument_ChildEvent(self *C.ScintillaDocument, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) AutoCSetCancelAtStart(cancel bool) { - C.ScintillaEdit_AutoCSetCancelAtStart(this.h, (C.bool)(cancel)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) -func (this *ScintillaEdit) AutoCCancelAtStart() bool { - return (bool)(C.ScintillaEdit_AutoCCancelAtStart(this.h)) -} + gofunc((&ScintillaDocument{h: self}).callVirtualBase_ChildEvent, slotval1) -func (this *ScintillaEdit) AutoCSetFillUps(characterSet string) { - characterSet_Cstring := C.CString(characterSet) - defer C.free(unsafe.Pointer(characterSet_Cstring)) - C.ScintillaEdit_AutoCSetFillUps(this.h, characterSet_Cstring) } -func (this *ScintillaEdit) AutoCSetChooseSingle(chooseSingle bool) { - C.ScintillaEdit_AutoCSetChooseSingle(this.h, (C.bool)(chooseSingle)) -} +func (this *ScintillaDocument) callVirtualBase_CustomEvent(event *qt.QEvent) { -func (this *ScintillaEdit) AutoCChooseSingle() bool { - return (bool)(C.ScintillaEdit_AutoCChooseSingle(this.h)) -} + C.ScintillaDocument_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) -func (this *ScintillaEdit) AutoCSetIgnoreCase(ignoreCase bool) { - C.ScintillaEdit_AutoCSetIgnoreCase(this.h, (C.bool)(ignoreCase)) } - -func (this *ScintillaEdit) AutoCIgnoreCase() bool { - return (bool)(C.ScintillaEdit_AutoCIgnoreCase(this.h)) +func (this *ScintillaDocument) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.ScintillaDocument_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) UserListShow(listType uintptr, itemList string) { - itemList_Cstring := C.CString(itemList) - defer C.free(unsafe.Pointer(itemList_Cstring)) - C.ScintillaEdit_UserListShow(this.h, (C.intptr_t)(listType), itemList_Cstring) -} +//export miqt_exec_callback_ScintillaDocument_CustomEvent +func miqt_exec_callback_ScintillaDocument_CustomEvent(self *C.ScintillaDocument, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) AutoCSetAutoHide(autoHide bool) { - C.ScintillaEdit_AutoCSetAutoHide(this.h, (C.bool)(autoHide)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) -func (this *ScintillaEdit) AutoCAutoHide() bool { - return (bool)(C.ScintillaEdit_AutoCAutoHide(this.h)) -} + gofunc((&ScintillaDocument{h: self}).callVirtualBase_CustomEvent, slotval1) -func (this *ScintillaEdit) AutoCSetOptions(options uintptr) { - C.ScintillaEdit_AutoCSetOptions(this.h, (C.intptr_t)(options)) } -func (this *ScintillaEdit) AutoCOptions() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCOptions(this.h)) -} +func (this *ScintillaDocument) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { -func (this *ScintillaEdit) AutoCSetDropRestOfWord(dropRestOfWord bool) { - C.ScintillaEdit_AutoCSetDropRestOfWord(this.h, (C.bool)(dropRestOfWord)) -} + C.ScintillaDocument_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) -func (this *ScintillaEdit) AutoCDropRestOfWord() bool { - return (bool)(C.ScintillaEdit_AutoCDropRestOfWord(this.h)) } - -func (this *ScintillaEdit) RegisterImage(typeVal uintptr, xpmData string) { - xpmData_Cstring := C.CString(xpmData) - defer C.free(unsafe.Pointer(xpmData_Cstring)) - C.ScintillaEdit_RegisterImage(this.h, (C.intptr_t)(typeVal), xpmData_Cstring) +func (this *ScintillaDocument) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.ScintillaDocument_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) ClearRegisteredImages() { - C.ScintillaEdit_ClearRegisteredImages(this.h) -} +//export miqt_exec_callback_ScintillaDocument_ConnectNotify +func miqt_exec_callback_ScintillaDocument_ConnectNotify(self *C.ScintillaDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) AutoCTypeSeparator() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCTypeSeparator(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) -func (this *ScintillaEdit) AutoCSetTypeSeparator(separatorCharacter uintptr) { - C.ScintillaEdit_AutoCSetTypeSeparator(this.h, (C.intptr_t)(separatorCharacter)) -} + gofunc((&ScintillaDocument{h: self}).callVirtualBase_ConnectNotify, slotval1) -func (this *ScintillaEdit) AutoCSetMaxWidth(characterCount uintptr) { - C.ScintillaEdit_AutoCSetMaxWidth(this.h, (C.intptr_t)(characterCount)) } -func (this *ScintillaEdit) AutoCMaxWidth() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCMaxWidth(this.h)) -} +func (this *ScintillaDocument) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { -func (this *ScintillaEdit) AutoCSetMaxHeight(rowCount uintptr) { - C.ScintillaEdit_AutoCSetMaxHeight(this.h, (C.intptr_t)(rowCount)) -} + C.ScintillaDocument_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) -func (this *ScintillaEdit) AutoCMaxHeight() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCMaxHeight(this.h)) } - -func (this *ScintillaEdit) AutoCSetStyle(style uintptr) { - C.ScintillaEdit_AutoCSetStyle(this.h, (C.intptr_t)(style)) +func (this *ScintillaDocument) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.ScintillaDocument_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *ScintillaEdit) AutoCStyle() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCStyle(this.h)) -} +//export miqt_exec_callback_ScintillaDocument_DisconnectNotify +func miqt_exec_callback_ScintillaDocument_DisconnectNotify(self *C.ScintillaDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *ScintillaEdit) SetIndent(indentSize uintptr) { - C.ScintillaEdit_SetIndent(this.h, (C.intptr_t)(indentSize)) -} + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) -func (this *ScintillaEdit) Indent() uintptr { - return (uintptr)(C.ScintillaEdit_Indent(this.h)) -} + gofunc((&ScintillaDocument{h: self}).callVirtualBase_DisconnectNotify, slotval1) -func (this *ScintillaEdit) SetUseTabs(useTabs bool) { - C.ScintillaEdit_SetUseTabs(this.h, (C.bool)(useTabs)) } -func (this *ScintillaEdit) UseTabs() bool { - return (bool)(C.ScintillaEdit_UseTabs(this.h)) +// Delete this object from C++ memory. +func (this *ScintillaDocument) Delete() { + C.ScintillaDocument_Delete(this.h, C.bool(this.isSubclass)) } -func (this *ScintillaEdit) SetLineIndentation(line uintptr, indentation uintptr) { - C.ScintillaEdit_SetLineIndentation(this.h, (C.intptr_t)(line), (C.intptr_t)(indentation)) +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *ScintillaDocument) GoGC() { + runtime.SetFinalizer(this, func(this *ScintillaDocument) { + this.Delete() + runtime.KeepAlive(this.h) + }) } -func (this *ScintillaEdit) LineIndentation(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineIndentation(this.h, (C.intptr_t)(line))) +type ScintillaEdit struct { + h *C.ScintillaEdit + isSubclass bool + *ScintillaEditBase } -func (this *ScintillaEdit) LineIndentPosition(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineIndentPosition(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) cPointer() *C.ScintillaEdit { + if this == nil { + return nil + } + return this.h } -func (this *ScintillaEdit) Column(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_Column(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) } -func (this *ScintillaEdit) CountCharacters(start uintptr, end uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CountCharacters(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) +// newScintillaEdit constructs the type using only CGO pointers. +func newScintillaEdit(h *C.ScintillaEdit, h_ScintillaEditBase *C.ScintillaEditBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *ScintillaEdit { + if h == nil { + return nil + } + return &ScintillaEdit{h: h, + ScintillaEditBase: newScintillaEditBase(h_ScintillaEditBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func (this *ScintillaEdit) CountCodeUnits(start uintptr, end uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CountCodeUnits(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) -} +// UnsafeNewScintillaEdit constructs the type using only unsafe pointers. +func UnsafeNewScintillaEdit(h unsafe.Pointer, h_ScintillaEditBase unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *ScintillaEdit { + if h == nil { + return nil + } -func (this *ScintillaEdit) SetHScrollBar(visible bool) { - C.ScintillaEdit_SetHScrollBar(this.h, (C.bool)(visible)) + return &ScintillaEdit{h: (*C.ScintillaEdit)(h), + ScintillaEditBase: UnsafeNewScintillaEditBase(h_ScintillaEditBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func (this *ScintillaEdit) HScrollBar() bool { - return (bool)(C.ScintillaEdit_HScrollBar(this.h)) -} +// NewScintillaEdit constructs a new ScintillaEdit object. +func NewScintillaEdit(parent *qt.QWidget) *ScintillaEdit { + var outptr_ScintillaEdit *C.ScintillaEdit = nil + var outptr_ScintillaEditBase *C.ScintillaEditBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil -func (this *ScintillaEdit) SetIndentationGuides(indentView uintptr) { - C.ScintillaEdit_SetIndentationGuides(this.h, (C.intptr_t)(indentView)) + C.ScintillaEdit_new((*C.QWidget)(parent.UnsafePointer()), &outptr_ScintillaEdit, &outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newScintillaEdit(outptr_ScintillaEdit, outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } -func (this *ScintillaEdit) IndentationGuides() uintptr { - return (uintptr)(C.ScintillaEdit_IndentationGuides(this.h)) -} +// NewScintillaEdit2 constructs a new ScintillaEdit object. +func NewScintillaEdit2() *ScintillaEdit { + var outptr_ScintillaEdit *C.ScintillaEdit = nil + var outptr_ScintillaEditBase *C.ScintillaEditBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil -func (this *ScintillaEdit) SetHighlightGuide(column uintptr) { - C.ScintillaEdit_SetHighlightGuide(this.h, (C.intptr_t)(column)) + C.ScintillaEdit_new2(&outptr_ScintillaEdit, &outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newScintillaEdit(outptr_ScintillaEdit, outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } -func (this *ScintillaEdit) HighlightGuide() uintptr { - return (uintptr)(C.ScintillaEdit_HighlightGuide(this.h)) +func (this *ScintillaEdit) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.ScintillaEdit_MetaObject(this.h))) } -func (this *ScintillaEdit) LineEndPosition(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineEndPosition(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.ScintillaEdit_Metacast(this.h, param1_Cstring)) } -func (this *ScintillaEdit) CodePage() uintptr { - return (uintptr)(C.ScintillaEdit_CodePage(this.h)) +func ScintillaEdit_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaEdit_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) CaretFore() uintptr { - return (uintptr)(C.ScintillaEdit_CaretFore(this.h)) +func ScintillaEdit_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaEdit_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret } -func (this *ScintillaEdit) ReadOnly() bool { - return (bool)(C.ScintillaEdit_ReadOnly(this.h)) +func (this *ScintillaEdit) TextReturner(message int, wParam uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_TextReturner(this.h, (C.int)(message), (C.uintptr_t)(wParam)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) SetCurrentPos(caret uintptr) { - C.ScintillaEdit_SetCurrentPos(this.h, (C.intptr_t)(caret)) -} +func (this *ScintillaEdit) FindText(flags int, text string, cpMin int, cpMax int) struct { + First int + Second int +} { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + var _mm C.struct_miqt_map = C.ScintillaEdit_FindText(this.h, (C.int)(flags), text_Cstring, (C.int)(cpMin), (C.int)(cpMax)) + _First_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.values)) + _entry_First := (int)(_First_CArray[0]) -func (this *ScintillaEdit) SetSelectionStart(anchor uintptr) { - C.ScintillaEdit_SetSelectionStart(this.h, (C.intptr_t)(anchor)) -} + _entry_Second := (int)(_Second_CArray[0]) -func (this *ScintillaEdit) SelectionStart() uintptr { - return (uintptr)(C.ScintillaEdit_SelectionStart(this.h)) + return struct { + First int + Second int + }{First: _entry_First, Second: _entry_Second} } -func (this *ScintillaEdit) SetSelectionEnd(caret uintptr) { - C.ScintillaEdit_SetSelectionEnd(this.h, (C.intptr_t)(caret)) +func (this *ScintillaEdit) GetTextRange(start int, end int) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetTextRange(this.h, (C.int)(start), (C.int)(end)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) SelectionEnd() uintptr { - return (uintptr)(C.ScintillaEdit_SelectionEnd(this.h)) +func (this *ScintillaEdit) GetDoc() *ScintillaDocument { + return UnsafeNewScintillaDocument(unsafe.Pointer(C.ScintillaEdit_GetDoc(this.h)), nil) } -func (this *ScintillaEdit) SetEmptySelection(caret uintptr) { - C.ScintillaEdit_SetEmptySelection(this.h, (C.intptr_t)(caret)) +func (this *ScintillaEdit) SetDoc(pdoc_ *ScintillaDocument) { + C.ScintillaEdit_SetDoc(this.h, pdoc_.cPointer()) } -func (this *ScintillaEdit) SetPrintMagnification(magnification uintptr) { - C.ScintillaEdit_SetPrintMagnification(this.h, (C.intptr_t)(magnification)) -} +func (this *ScintillaEdit) FindText2(flags int, text string, cpMin int, cpMax int) struct { + First int + Second int +} { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + var _mm C.struct_miqt_map = C.ScintillaEdit_FindText2(this.h, (C.int)(flags), text_Cstring, (C.int)(cpMin), (C.int)(cpMax)) + _First_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_mm.values)) + _entry_First := (int)(_First_CArray[0]) -func (this *ScintillaEdit) PrintMagnification() uintptr { - return (uintptr)(C.ScintillaEdit_PrintMagnification(this.h)) -} + _entry_Second := (int)(_Second_CArray[0]) -func (this *ScintillaEdit) SetPrintColourMode(mode uintptr) { - C.ScintillaEdit_SetPrintColourMode(this.h, (C.intptr_t)(mode)) + return struct { + First int + Second int + }{First: _entry_First, Second: _entry_Second} } -func (this *ScintillaEdit) PrintColourMode() uintptr { - return (uintptr)(C.ScintillaEdit_PrintColourMode(this.h)) +func (this *ScintillaEdit) TextRange(start int, end int) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_TextRange(this.h, (C.int)(start), (C.int)(end)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) SetChangeHistory(changeHistory uintptr) { - C.ScintillaEdit_SetChangeHistory(this.h, (C.intptr_t)(changeHistory)) +func (this *ScintillaEdit) FormatRange(draw bool, target *qt.QPaintDevice, measure *qt.QPaintDevice, print_rect *qt.QRect, page_rect *qt.QRect, range_start int64, range_end int64) int64 { + return (int64)(C.ScintillaEdit_FormatRange(this.h, (C.bool)(draw), (*C.QPaintDevice)(target.UnsafePointer()), (*C.QPaintDevice)(measure.UnsafePointer()), (*C.QRect)(print_rect.UnsafePointer()), (*C.QRect)(page_rect.UnsafePointer()), (C.long)(range_start), (C.long)(range_end))) } -func (this *ScintillaEdit) ChangeHistory() uintptr { - return (uintptr)(C.ScintillaEdit_ChangeHistory(this.h)) +func (this *ScintillaEdit) FormatRange2(draw bool, target *qt.QPaintDevice, measure *qt.QPaintDevice, print_rect *qt.QRect, page_rect *qt.QRect, range_start int64, range_end int64) int64 { + return (int64)(C.ScintillaEdit_FormatRange2(this.h, (C.bool)(draw), (*C.QPaintDevice)(target.UnsafePointer()), (*C.QPaintDevice)(measure.UnsafePointer()), (*C.QRect)(print_rect.UnsafePointer()), (*C.QRect)(page_rect.UnsafePointer()), (C.long)(range_start), (C.long)(range_end))) } -func (this *ScintillaEdit) FirstVisibleLine() uintptr { - return (uintptr)(C.ScintillaEdit_FirstVisibleLine(this.h)) +func (this *ScintillaEdit) AddText(length uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_AddText(this.h, (C.intptr_t)(length), text_Cstring) } -func (this *ScintillaEdit) GetLine(line uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetLine(this.h, (C.intptr_t)(line)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) AddStyledText(length uintptr, c string) { + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + C.ScintillaEdit_AddStyledText(this.h, (C.intptr_t)(length), c_Cstring) } -func (this *ScintillaEdit) LineCount() uintptr { - return (uintptr)(C.ScintillaEdit_LineCount(this.h)) +func (this *ScintillaEdit) InsertText(pos uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_InsertText(this.h, (C.intptr_t)(pos), text_Cstring) } -func (this *ScintillaEdit) AllocateLines(lines uintptr) { - C.ScintillaEdit_AllocateLines(this.h, (C.intptr_t)(lines)) +func (this *ScintillaEdit) ChangeInsertion(length uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_ChangeInsertion(this.h, (C.intptr_t)(length), text_Cstring) } -func (this *ScintillaEdit) SetMarginLeft(pixelWidth uintptr) { - C.ScintillaEdit_SetMarginLeft(this.h, (C.intptr_t)(pixelWidth)) +func (this *ScintillaEdit) ClearAll() { + C.ScintillaEdit_ClearAll(this.h) } -func (this *ScintillaEdit) MarginLeft() uintptr { - return (uintptr)(C.ScintillaEdit_MarginLeft(this.h)) +func (this *ScintillaEdit) DeleteRange(start uintptr, lengthDelete uintptr) { + C.ScintillaEdit_DeleteRange(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthDelete)) } -func (this *ScintillaEdit) SetMarginRight(pixelWidth uintptr) { - C.ScintillaEdit_SetMarginRight(this.h, (C.intptr_t)(pixelWidth)) +func (this *ScintillaEdit) ClearDocumentStyle() { + C.ScintillaEdit_ClearDocumentStyle(this.h) } -func (this *ScintillaEdit) MarginRight() uintptr { - return (uintptr)(C.ScintillaEdit_MarginRight(this.h)) +func (this *ScintillaEdit) Length() uintptr { + return (uintptr)(C.ScintillaEdit_Length(this.h)) } -func (this *ScintillaEdit) Modify() bool { - return (bool)(C.ScintillaEdit_Modify(this.h)) +func (this *ScintillaEdit) CharAt(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CharAt(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) SetSel(anchor uintptr, caret uintptr) { - C.ScintillaEdit_SetSel(this.h, (C.intptr_t)(anchor), (C.intptr_t)(caret)) +func (this *ScintillaEdit) CurrentPos() uintptr { + return (uintptr)(C.ScintillaEdit_CurrentPos(this.h)) } -func (this *ScintillaEdit) GetSelText() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetSelText(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) Anchor() uintptr { + return (uintptr)(C.ScintillaEdit_Anchor(this.h)) } -func (this *ScintillaEdit) HideSelection(hide bool) { - C.ScintillaEdit_HideSelection(this.h, (C.bool)(hide)) +func (this *ScintillaEdit) StyleAt(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleAt(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) SelectionHidden() bool { - return (bool)(C.ScintillaEdit_SelectionHidden(this.h)) +func (this *ScintillaEdit) StyleIndexAt(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleIndexAt(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) PointXFromPosition(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PointXFromPosition(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) Redo() { + C.ScintillaEdit_Redo(this.h) } -func (this *ScintillaEdit) PointYFromPosition(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PointYFromPosition(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) SetUndoCollection(collectUndo bool) { + C.ScintillaEdit_SetUndoCollection(this.h, (C.bool)(collectUndo)) } -func (this *ScintillaEdit) LineFromPosition(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineFromPosition(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) SelectAll() { + C.ScintillaEdit_SelectAll(this.h) } -func (this *ScintillaEdit) PositionFromLine(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionFromLine(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) SetSavePoint() { + C.ScintillaEdit_SetSavePoint(this.h) } -func (this *ScintillaEdit) LineScroll(columns uintptr, lines uintptr) { - C.ScintillaEdit_LineScroll(this.h, (C.intptr_t)(columns), (C.intptr_t)(lines)) +func (this *ScintillaEdit) CanRedo() bool { + return (bool)(C.ScintillaEdit_CanRedo(this.h)) } -func (this *ScintillaEdit) ScrollCaret() { - C.ScintillaEdit_ScrollCaret(this.h) +func (this *ScintillaEdit) MarkerLineFromHandle(markerHandle uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerLineFromHandle(this.h, (C.intptr_t)(markerHandle))) } -func (this *ScintillaEdit) ScrollRange(secondary uintptr, primary uintptr) { - C.ScintillaEdit_ScrollRange(this.h, (C.intptr_t)(secondary), (C.intptr_t)(primary)) +func (this *ScintillaEdit) MarkerDeleteHandle(markerHandle uintptr) { + C.ScintillaEdit_MarkerDeleteHandle(this.h, (C.intptr_t)(markerHandle)) } -func (this *ScintillaEdit) ReplaceSel(text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_ReplaceSel(this.h, text_Cstring) +func (this *ScintillaEdit) MarkerHandleFromLine(line uintptr, which uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerHandleFromLine(this.h, (C.intptr_t)(line), (C.intptr_t)(which))) } -func (this *ScintillaEdit) SetReadOnly(readOnly bool) { - C.ScintillaEdit_SetReadOnly(this.h, (C.bool)(readOnly)) +func (this *ScintillaEdit) MarkerNumberFromLine(line uintptr, which uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerNumberFromLine(this.h, (C.intptr_t)(line), (C.intptr_t)(which))) } -func (this *ScintillaEdit) Null() { - C.ScintillaEdit_Null(this.h) +func (this *ScintillaEdit) UndoCollection() bool { + return (bool)(C.ScintillaEdit_UndoCollection(this.h)) } -func (this *ScintillaEdit) CanPaste() bool { - return (bool)(C.ScintillaEdit_CanPaste(this.h)) +func (this *ScintillaEdit) ViewWS() uintptr { + return (uintptr)(C.ScintillaEdit_ViewWS(this.h)) } -func (this *ScintillaEdit) CanUndo() bool { - return (bool)(C.ScintillaEdit_CanUndo(this.h)) +func (this *ScintillaEdit) SetViewWS(viewWS uintptr) { + C.ScintillaEdit_SetViewWS(this.h, (C.intptr_t)(viewWS)) } -func (this *ScintillaEdit) EmptyUndoBuffer() { - C.ScintillaEdit_EmptyUndoBuffer(this.h) +func (this *ScintillaEdit) TabDrawMode() uintptr { + return (uintptr)(C.ScintillaEdit_TabDrawMode(this.h)) } -func (this *ScintillaEdit) Undo() { - C.ScintillaEdit_Undo(this.h) +func (this *ScintillaEdit) SetTabDrawMode(tabDrawMode uintptr) { + C.ScintillaEdit_SetTabDrawMode(this.h, (C.intptr_t)(tabDrawMode)) } -func (this *ScintillaEdit) Cut() { - C.ScintillaEdit_Cut(this.h) +func (this *ScintillaEdit) PositionFromPoint(x uintptr, y uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionFromPoint(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) } -func (this *ScintillaEdit) Copy() { - C.ScintillaEdit_Copy(this.h) +func (this *ScintillaEdit) PositionFromPointClose(x uintptr, y uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionFromPointClose(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) } -func (this *ScintillaEdit) Paste() { - C.ScintillaEdit_Paste(this.h) +func (this *ScintillaEdit) GotoLine(line uintptr) { + C.ScintillaEdit_GotoLine(this.h, (C.intptr_t)(line)) } -func (this *ScintillaEdit) Clear() { - C.ScintillaEdit_Clear(this.h) +func (this *ScintillaEdit) GotoPos(caret uintptr) { + C.ScintillaEdit_GotoPos(this.h, (C.intptr_t)(caret)) } -func (this *ScintillaEdit) SetText(text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_SetText(this.h, text_Cstring) +func (this *ScintillaEdit) SetAnchor(anchor uintptr) { + C.ScintillaEdit_SetAnchor(this.h, (C.intptr_t)(anchor)) } -func (this *ScintillaEdit) GetText(length uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetText(this.h, (C.intptr_t)(length)) +func (this *ScintillaEdit) GetCurLine(length uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetCurLine(this.h, (C.intptr_t)(length)) _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) C.free(unsafe.Pointer(_bytearray.data)) return _ret } -func (this *ScintillaEdit) TextLength() uintptr { - return (uintptr)(C.ScintillaEdit_TextLength(this.h)) +func (this *ScintillaEdit) EndStyled() uintptr { + return (uintptr)(C.ScintillaEdit_EndStyled(this.h)) } -func (this *ScintillaEdit) DirectFunction() uintptr { - return (uintptr)(C.ScintillaEdit_DirectFunction(this.h)) +func (this *ScintillaEdit) ConvertEOLs(eolMode uintptr) { + C.ScintillaEdit_ConvertEOLs(this.h, (C.intptr_t)(eolMode)) } -func (this *ScintillaEdit) DirectStatusFunction() uintptr { - return (uintptr)(C.ScintillaEdit_DirectStatusFunction(this.h)) +func (this *ScintillaEdit) EOLMode() uintptr { + return (uintptr)(C.ScintillaEdit_EOLMode(this.h)) } -func (this *ScintillaEdit) DirectPointer() uintptr { - return (uintptr)(C.ScintillaEdit_DirectPointer(this.h)) +func (this *ScintillaEdit) SetEOLMode(eolMode uintptr) { + C.ScintillaEdit_SetEOLMode(this.h, (C.intptr_t)(eolMode)) } -func (this *ScintillaEdit) SetOvertype(overType bool) { - C.ScintillaEdit_SetOvertype(this.h, (C.bool)(overType)) +func (this *ScintillaEdit) StartStyling(start uintptr, unused uintptr) { + C.ScintillaEdit_StartStyling(this.h, (C.intptr_t)(start), (C.intptr_t)(unused)) } -func (this *ScintillaEdit) Overtype() bool { - return (bool)(C.ScintillaEdit_Overtype(this.h)) +func (this *ScintillaEdit) SetStyling(length uintptr, style uintptr) { + C.ScintillaEdit_SetStyling(this.h, (C.intptr_t)(length), (C.intptr_t)(style)) } -func (this *ScintillaEdit) SetCaretWidth(pixelWidth uintptr) { - C.ScintillaEdit_SetCaretWidth(this.h, (C.intptr_t)(pixelWidth)) +func (this *ScintillaEdit) BufferedDraw() bool { + return (bool)(C.ScintillaEdit_BufferedDraw(this.h)) } -func (this *ScintillaEdit) CaretWidth() uintptr { - return (uintptr)(C.ScintillaEdit_CaretWidth(this.h)) +func (this *ScintillaEdit) SetBufferedDraw(buffered bool) { + C.ScintillaEdit_SetBufferedDraw(this.h, (C.bool)(buffered)) } -func (this *ScintillaEdit) SetTargetStart(start uintptr) { - C.ScintillaEdit_SetTargetStart(this.h, (C.intptr_t)(start)) +func (this *ScintillaEdit) SetTabWidth(tabWidth uintptr) { + C.ScintillaEdit_SetTabWidth(this.h, (C.intptr_t)(tabWidth)) } -func (this *ScintillaEdit) TargetStart() uintptr { - return (uintptr)(C.ScintillaEdit_TargetStart(this.h)) +func (this *ScintillaEdit) TabWidth() uintptr { + return (uintptr)(C.ScintillaEdit_TabWidth(this.h)) } -func (this *ScintillaEdit) SetTargetStartVirtualSpace(space uintptr) { - C.ScintillaEdit_SetTargetStartVirtualSpace(this.h, (C.intptr_t)(space)) +func (this *ScintillaEdit) SetTabMinimumWidth(pixels uintptr) { + C.ScintillaEdit_SetTabMinimumWidth(this.h, (C.intptr_t)(pixels)) } -func (this *ScintillaEdit) TargetStartVirtualSpace() uintptr { - return (uintptr)(C.ScintillaEdit_TargetStartVirtualSpace(this.h)) +func (this *ScintillaEdit) TabMinimumWidth() uintptr { + return (uintptr)(C.ScintillaEdit_TabMinimumWidth(this.h)) } -func (this *ScintillaEdit) SetTargetEnd(end uintptr) { - C.ScintillaEdit_SetTargetEnd(this.h, (C.intptr_t)(end)) +func (this *ScintillaEdit) ClearTabStops(line uintptr) { + C.ScintillaEdit_ClearTabStops(this.h, (C.intptr_t)(line)) } -func (this *ScintillaEdit) TargetEnd() uintptr { - return (uintptr)(C.ScintillaEdit_TargetEnd(this.h)) +func (this *ScintillaEdit) AddTabStop(line uintptr, x uintptr) { + C.ScintillaEdit_AddTabStop(this.h, (C.intptr_t)(line), (C.intptr_t)(x)) } -func (this *ScintillaEdit) SetTargetEndVirtualSpace(space uintptr) { - C.ScintillaEdit_SetTargetEndVirtualSpace(this.h, (C.intptr_t)(space)) +func (this *ScintillaEdit) GetNextTabStop(line uintptr, x uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_GetNextTabStop(this.h, (C.intptr_t)(line), (C.intptr_t)(x))) } -func (this *ScintillaEdit) TargetEndVirtualSpace() uintptr { - return (uintptr)(C.ScintillaEdit_TargetEndVirtualSpace(this.h)) +func (this *ScintillaEdit) SetCodePage(codePage uintptr) { + C.ScintillaEdit_SetCodePage(this.h, (C.intptr_t)(codePage)) } -func (this *ScintillaEdit) SetTargetRange(start uintptr, end uintptr) { - C.ScintillaEdit_SetTargetRange(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +func (this *ScintillaEdit) SetFontLocale(localeName string) { + localeName_Cstring := C.CString(localeName) + defer C.free(unsafe.Pointer(localeName_Cstring)) + C.ScintillaEdit_SetFontLocale(this.h, localeName_Cstring) } -func (this *ScintillaEdit) TargetText() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_TargetText(this.h) +func (this *ScintillaEdit) FontLocale() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_FontLocale(this.h) _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) C.free(unsafe.Pointer(_bytearray.data)) return _ret } -func (this *ScintillaEdit) TargetFromSelection() { - C.ScintillaEdit_TargetFromSelection(this.h) +func (this *ScintillaEdit) IMEInteraction() uintptr { + return (uintptr)(C.ScintillaEdit_IMEInteraction(this.h)) } -func (this *ScintillaEdit) TargetWholeDocument() { - C.ScintillaEdit_TargetWholeDocument(this.h) +func (this *ScintillaEdit) SetIMEInteraction(imeInteraction uintptr) { + C.ScintillaEdit_SetIMEInteraction(this.h, (C.intptr_t)(imeInteraction)) } -func (this *ScintillaEdit) ReplaceTarget(length uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_ReplaceTarget(this.h, (C.intptr_t)(length), text_Cstring)) +func (this *ScintillaEdit) MarkerDefine(markerNumber uintptr, markerSymbol uintptr) { + C.ScintillaEdit_MarkerDefine(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(markerSymbol)) } -func (this *ScintillaEdit) ReplaceTargetRE(length uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_ReplaceTargetRE(this.h, (C.intptr_t)(length), text_Cstring)) +func (this *ScintillaEdit) MarkerSetFore(markerNumber uintptr, fore uintptr) { + C.ScintillaEdit_MarkerSetFore(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) ReplaceTargetMinimal(length uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_ReplaceTargetMinimal(this.h, (C.intptr_t)(length), text_Cstring)) +func (this *ScintillaEdit) MarkerSetBack(markerNumber uintptr, back uintptr) { + C.ScintillaEdit_MarkerSetBack(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) } -func (this *ScintillaEdit) SearchInTarget(length uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_SearchInTarget(this.h, (C.intptr_t)(length), text_Cstring)) +func (this *ScintillaEdit) MarkerSetBackSelected(markerNumber uintptr, back uintptr) { + C.ScintillaEdit_MarkerSetBackSelected(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) } -func (this *ScintillaEdit) SetSearchFlags(searchFlags uintptr) { - C.ScintillaEdit_SetSearchFlags(this.h, (C.intptr_t)(searchFlags)) +func (this *ScintillaEdit) MarkerSetForeTranslucent(markerNumber uintptr, fore uintptr) { + C.ScintillaEdit_MarkerSetForeTranslucent(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) SearchFlags() uintptr { - return (uintptr)(C.ScintillaEdit_SearchFlags(this.h)) +func (this *ScintillaEdit) MarkerSetBackTranslucent(markerNumber uintptr, back uintptr) { + C.ScintillaEdit_MarkerSetBackTranslucent(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) } -func (this *ScintillaEdit) CallTipShow(pos uintptr, definition string) { - definition_Cstring := C.CString(definition) - defer C.free(unsafe.Pointer(definition_Cstring)) - C.ScintillaEdit_CallTipShow(this.h, (C.intptr_t)(pos), definition_Cstring) +func (this *ScintillaEdit) MarkerSetBackSelectedTranslucent(markerNumber uintptr, back uintptr) { + C.ScintillaEdit_MarkerSetBackSelectedTranslucent(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(back)) } -func (this *ScintillaEdit) CallTipCancel() { - C.ScintillaEdit_CallTipCancel(this.h) +func (this *ScintillaEdit) MarkerSetStrokeWidth(markerNumber uintptr, hundredths uintptr) { + C.ScintillaEdit_MarkerSetStrokeWidth(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(hundredths)) } -func (this *ScintillaEdit) CallTipActive() bool { - return (bool)(C.ScintillaEdit_CallTipActive(this.h)) +func (this *ScintillaEdit) MarkerEnableHighlight(enabled bool) { + C.ScintillaEdit_MarkerEnableHighlight(this.h, (C.bool)(enabled)) } -func (this *ScintillaEdit) CallTipPosStart() uintptr { - return (uintptr)(C.ScintillaEdit_CallTipPosStart(this.h)) +func (this *ScintillaEdit) MarkerAdd(line uintptr, markerNumber uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerAdd(this.h, (C.intptr_t)(line), (C.intptr_t)(markerNumber))) } -func (this *ScintillaEdit) CallTipSetPosStart(posStart uintptr) { - C.ScintillaEdit_CallTipSetPosStart(this.h, (C.intptr_t)(posStart)) +func (this *ScintillaEdit) MarkerDelete(line uintptr, markerNumber uintptr) { + C.ScintillaEdit_MarkerDelete(this.h, (C.intptr_t)(line), (C.intptr_t)(markerNumber)) } -func (this *ScintillaEdit) CallTipSetHlt(highlightStart uintptr, highlightEnd uintptr) { - C.ScintillaEdit_CallTipSetHlt(this.h, (C.intptr_t)(highlightStart), (C.intptr_t)(highlightEnd)) +func (this *ScintillaEdit) MarkerDeleteAll(markerNumber uintptr) { + C.ScintillaEdit_MarkerDeleteAll(this.h, (C.intptr_t)(markerNumber)) } -func (this *ScintillaEdit) CallTipSetBack(back uintptr) { - C.ScintillaEdit_CallTipSetBack(this.h, (C.intptr_t)(back)) +func (this *ScintillaEdit) MarkerGet(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerGet(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) CallTipSetFore(fore uintptr) { - C.ScintillaEdit_CallTipSetFore(this.h, (C.intptr_t)(fore)) +func (this *ScintillaEdit) MarkerNext(lineStart uintptr, markerMask uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerNext(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(markerMask))) } -func (this *ScintillaEdit) CallTipSetForeHlt(fore uintptr) { - C.ScintillaEdit_CallTipSetForeHlt(this.h, (C.intptr_t)(fore)) +func (this *ScintillaEdit) MarkerPrevious(lineStart uintptr, markerMask uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerPrevious(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(markerMask))) } -func (this *ScintillaEdit) CallTipUseStyle(tabSize uintptr) { - C.ScintillaEdit_CallTipUseStyle(this.h, (C.intptr_t)(tabSize)) +func (this *ScintillaEdit) MarkerDefinePixmap(markerNumber uintptr, pixmap string) { + pixmap_Cstring := C.CString(pixmap) + defer C.free(unsafe.Pointer(pixmap_Cstring)) + C.ScintillaEdit_MarkerDefinePixmap(this.h, (C.intptr_t)(markerNumber), pixmap_Cstring) } -func (this *ScintillaEdit) CallTipSetPosition(above bool) { - C.ScintillaEdit_CallTipSetPosition(this.h, (C.bool)(above)) +func (this *ScintillaEdit) MarkerAddSet(line uintptr, markerSet uintptr) { + C.ScintillaEdit_MarkerAddSet(this.h, (C.intptr_t)(line), (C.intptr_t)(markerSet)) } -func (this *ScintillaEdit) VisibleFromDocLine(docLine uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_VisibleFromDocLine(this.h, (C.intptr_t)(docLine))) +func (this *ScintillaEdit) MarkerSetAlpha(markerNumber uintptr, alpha uintptr) { + C.ScintillaEdit_MarkerSetAlpha(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(alpha)) } -func (this *ScintillaEdit) DocLineFromVisible(displayLine uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_DocLineFromVisible(this.h, (C.intptr_t)(displayLine))) +func (this *ScintillaEdit) MarkerLayer(markerNumber uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerLayer(this.h, (C.intptr_t)(markerNumber))) } -func (this *ScintillaEdit) WrapCount(docLine uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_WrapCount(this.h, (C.intptr_t)(docLine))) +func (this *ScintillaEdit) MarkerSetLayer(markerNumber uintptr, layer uintptr) { + C.ScintillaEdit_MarkerSetLayer(this.h, (C.intptr_t)(markerNumber), (C.intptr_t)(layer)) } -func (this *ScintillaEdit) SetFoldLevel(line uintptr, level uintptr) { - C.ScintillaEdit_SetFoldLevel(this.h, (C.intptr_t)(line), (C.intptr_t)(level)) +func (this *ScintillaEdit) SetMarginTypeN(margin uintptr, marginType uintptr) { + C.ScintillaEdit_SetMarginTypeN(this.h, (C.intptr_t)(margin), (C.intptr_t)(marginType)) } -func (this *ScintillaEdit) FoldLevel(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_FoldLevel(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) MarginTypeN(margin uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarginTypeN(this.h, (C.intptr_t)(margin))) } -func (this *ScintillaEdit) LastChild(line uintptr, level uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LastChild(this.h, (C.intptr_t)(line), (C.intptr_t)(level))) +func (this *ScintillaEdit) SetMarginWidthN(margin uintptr, pixelWidth uintptr) { + C.ScintillaEdit_SetMarginWidthN(this.h, (C.intptr_t)(margin), (C.intptr_t)(pixelWidth)) } -func (this *ScintillaEdit) FoldParent(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_FoldParent(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) MarginWidthN(margin uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarginWidthN(this.h, (C.intptr_t)(margin))) } -func (this *ScintillaEdit) ShowLines(lineStart uintptr, lineEnd uintptr) { - C.ScintillaEdit_ShowLines(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(lineEnd)) +func (this *ScintillaEdit) SetMarginMaskN(margin uintptr, mask uintptr) { + C.ScintillaEdit_SetMarginMaskN(this.h, (C.intptr_t)(margin), (C.intptr_t)(mask)) } -func (this *ScintillaEdit) HideLines(lineStart uintptr, lineEnd uintptr) { - C.ScintillaEdit_HideLines(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(lineEnd)) +func (this *ScintillaEdit) MarginMaskN(margin uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarginMaskN(this.h, (C.intptr_t)(margin))) } -func (this *ScintillaEdit) LineVisible(line uintptr) bool { - return (bool)(C.ScintillaEdit_LineVisible(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) SetMarginSensitiveN(margin uintptr, sensitive bool) { + C.ScintillaEdit_SetMarginSensitiveN(this.h, (C.intptr_t)(margin), (C.bool)(sensitive)) } -func (this *ScintillaEdit) AllLinesVisible() bool { - return (bool)(C.ScintillaEdit_AllLinesVisible(this.h)) +func (this *ScintillaEdit) MarginSensitiveN(margin uintptr) bool { + return (bool)(C.ScintillaEdit_MarginSensitiveN(this.h, (C.intptr_t)(margin))) } -func (this *ScintillaEdit) SetFoldExpanded(line uintptr, expanded bool) { - C.ScintillaEdit_SetFoldExpanded(this.h, (C.intptr_t)(line), (C.bool)(expanded)) +func (this *ScintillaEdit) SetMarginCursorN(margin uintptr, cursor uintptr) { + C.ScintillaEdit_SetMarginCursorN(this.h, (C.intptr_t)(margin), (C.intptr_t)(cursor)) } -func (this *ScintillaEdit) FoldExpanded(line uintptr) bool { - return (bool)(C.ScintillaEdit_FoldExpanded(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) MarginCursorN(margin uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarginCursorN(this.h, (C.intptr_t)(margin))) } -func (this *ScintillaEdit) ToggleFold(line uintptr) { - C.ScintillaEdit_ToggleFold(this.h, (C.intptr_t)(line)) +func (this *ScintillaEdit) SetMarginBackN(margin uintptr, back uintptr) { + C.ScintillaEdit_SetMarginBackN(this.h, (C.intptr_t)(margin), (C.intptr_t)(back)) } -func (this *ScintillaEdit) ToggleFoldShowText(line uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_ToggleFoldShowText(this.h, (C.intptr_t)(line), text_Cstring) +func (this *ScintillaEdit) MarginBackN(margin uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarginBackN(this.h, (C.intptr_t)(margin))) } -func (this *ScintillaEdit) FoldDisplayTextSetStyle(style uintptr) { - C.ScintillaEdit_FoldDisplayTextSetStyle(this.h, (C.intptr_t)(style)) +func (this *ScintillaEdit) SetMargins(margins uintptr) { + C.ScintillaEdit_SetMargins(this.h, (C.intptr_t)(margins)) } -func (this *ScintillaEdit) FoldDisplayTextStyle() uintptr { - return (uintptr)(C.ScintillaEdit_FoldDisplayTextStyle(this.h)) +func (this *ScintillaEdit) Margins() uintptr { + return (uintptr)(C.ScintillaEdit_Margins(this.h)) } -func (this *ScintillaEdit) SetDefaultFoldDisplayText(text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_SetDefaultFoldDisplayText(this.h, text_Cstring) +func (this *ScintillaEdit) StyleClearAll() { + C.ScintillaEdit_StyleClearAll(this.h) } -func (this *ScintillaEdit) GetDefaultFoldDisplayText() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetDefaultFoldDisplayText(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) StyleSetFore(style uintptr, fore uintptr) { + C.ScintillaEdit_StyleSetFore(this.h, (C.intptr_t)(style), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) FoldLine(line uintptr, action uintptr) { - C.ScintillaEdit_FoldLine(this.h, (C.intptr_t)(line), (C.intptr_t)(action)) +func (this *ScintillaEdit) StyleSetBack(style uintptr, back uintptr) { + C.ScintillaEdit_StyleSetBack(this.h, (C.intptr_t)(style), (C.intptr_t)(back)) } -func (this *ScintillaEdit) FoldChildren(line uintptr, action uintptr) { - C.ScintillaEdit_FoldChildren(this.h, (C.intptr_t)(line), (C.intptr_t)(action)) +func (this *ScintillaEdit) StyleSetBold(style uintptr, bold bool) { + C.ScintillaEdit_StyleSetBold(this.h, (C.intptr_t)(style), (C.bool)(bold)) } -func (this *ScintillaEdit) ExpandChildren(line uintptr, level uintptr) { - C.ScintillaEdit_ExpandChildren(this.h, (C.intptr_t)(line), (C.intptr_t)(level)) +func (this *ScintillaEdit) StyleSetItalic(style uintptr, italic bool) { + C.ScintillaEdit_StyleSetItalic(this.h, (C.intptr_t)(style), (C.bool)(italic)) } -func (this *ScintillaEdit) FoldAll(action uintptr) { - C.ScintillaEdit_FoldAll(this.h, (C.intptr_t)(action)) +func (this *ScintillaEdit) StyleSetSize(style uintptr, sizePoints uintptr) { + C.ScintillaEdit_StyleSetSize(this.h, (C.intptr_t)(style), (C.intptr_t)(sizePoints)) } -func (this *ScintillaEdit) EnsureVisible(line uintptr) { - C.ScintillaEdit_EnsureVisible(this.h, (C.intptr_t)(line)) +func (this *ScintillaEdit) StyleSetFont(style uintptr, fontName string) { + fontName_Cstring := C.CString(fontName) + defer C.free(unsafe.Pointer(fontName_Cstring)) + C.ScintillaEdit_StyleSetFont(this.h, (C.intptr_t)(style), fontName_Cstring) } -func (this *ScintillaEdit) SetAutomaticFold(automaticFold uintptr) { - C.ScintillaEdit_SetAutomaticFold(this.h, (C.intptr_t)(automaticFold)) +func (this *ScintillaEdit) StyleSetEOLFilled(style uintptr, eolFilled bool) { + C.ScintillaEdit_StyleSetEOLFilled(this.h, (C.intptr_t)(style), (C.bool)(eolFilled)) } -func (this *ScintillaEdit) AutomaticFold() uintptr { - return (uintptr)(C.ScintillaEdit_AutomaticFold(this.h)) +func (this *ScintillaEdit) StyleResetDefault() { + C.ScintillaEdit_StyleResetDefault(this.h) } -func (this *ScintillaEdit) SetFoldFlags(flags uintptr) { - C.ScintillaEdit_SetFoldFlags(this.h, (C.intptr_t)(flags)) +func (this *ScintillaEdit) StyleSetUnderline(style uintptr, underline bool) { + C.ScintillaEdit_StyleSetUnderline(this.h, (C.intptr_t)(style), (C.bool)(underline)) } -func (this *ScintillaEdit) EnsureVisibleEnforcePolicy(line uintptr) { - C.ScintillaEdit_EnsureVisibleEnforcePolicy(this.h, (C.intptr_t)(line)) +func (this *ScintillaEdit) StyleFore(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleFore(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) SetTabIndents(tabIndents bool) { - C.ScintillaEdit_SetTabIndents(this.h, (C.bool)(tabIndents)) +func (this *ScintillaEdit) StyleBack(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleBack(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) TabIndents() bool { - return (bool)(C.ScintillaEdit_TabIndents(this.h)) +func (this *ScintillaEdit) StyleBold(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleBold(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) SetBackSpaceUnIndents(bsUnIndents bool) { - C.ScintillaEdit_SetBackSpaceUnIndents(this.h, (C.bool)(bsUnIndents)) +func (this *ScintillaEdit) StyleItalic(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleItalic(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) BackSpaceUnIndents() bool { - return (bool)(C.ScintillaEdit_BackSpaceUnIndents(this.h)) +func (this *ScintillaEdit) StyleSize(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleSize(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) SetMouseDwellTime(periodMilliseconds uintptr) { - C.ScintillaEdit_SetMouseDwellTime(this.h, (C.intptr_t)(periodMilliseconds)) +func (this *ScintillaEdit) StyleFont(style uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_StyleFont(this.h, (C.intptr_t)(style)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) MouseDwellTime() uintptr { - return (uintptr)(C.ScintillaEdit_MouseDwellTime(this.h)) +func (this *ScintillaEdit) StyleEOLFilled(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleEOLFilled(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) WordStartPosition(pos uintptr, onlyWordCharacters bool) uintptr { - return (uintptr)(C.ScintillaEdit_WordStartPosition(this.h, (C.intptr_t)(pos), (C.bool)(onlyWordCharacters))) +func (this *ScintillaEdit) StyleUnderline(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleUnderline(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) WordEndPosition(pos uintptr, onlyWordCharacters bool) uintptr { - return (uintptr)(C.ScintillaEdit_WordEndPosition(this.h, (C.intptr_t)(pos), (C.bool)(onlyWordCharacters))) +func (this *ScintillaEdit) StyleCase(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleCase(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) IsRangeWord(start uintptr, end uintptr) bool { - return (bool)(C.ScintillaEdit_IsRangeWord(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) -} - -func (this *ScintillaEdit) SetIdleStyling(idleStyling uintptr) { - C.ScintillaEdit_SetIdleStyling(this.h, (C.intptr_t)(idleStyling)) +func (this *ScintillaEdit) StyleCharacterSet(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleCharacterSet(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) IdleStyling() uintptr { - return (uintptr)(C.ScintillaEdit_IdleStyling(this.h)) +func (this *ScintillaEdit) StyleVisible(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleVisible(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) SetWrapMode(wrapMode uintptr) { - C.ScintillaEdit_SetWrapMode(this.h, (C.intptr_t)(wrapMode)) +func (this *ScintillaEdit) StyleChangeable(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleChangeable(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) WrapMode() uintptr { - return (uintptr)(C.ScintillaEdit_WrapMode(this.h)) +func (this *ScintillaEdit) StyleHotSpot(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleHotSpot(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) SetWrapVisualFlags(wrapVisualFlags uintptr) { - C.ScintillaEdit_SetWrapVisualFlags(this.h, (C.intptr_t)(wrapVisualFlags)) +func (this *ScintillaEdit) StyleSetCase(style uintptr, caseVisible uintptr) { + C.ScintillaEdit_StyleSetCase(this.h, (C.intptr_t)(style), (C.intptr_t)(caseVisible)) } -func (this *ScintillaEdit) WrapVisualFlags() uintptr { - return (uintptr)(C.ScintillaEdit_WrapVisualFlags(this.h)) +func (this *ScintillaEdit) StyleSetSizeFractional(style uintptr, sizeHundredthPoints uintptr) { + C.ScintillaEdit_StyleSetSizeFractional(this.h, (C.intptr_t)(style), (C.intptr_t)(sizeHundredthPoints)) } -func (this *ScintillaEdit) SetWrapVisualFlagsLocation(wrapVisualFlagsLocation uintptr) { - C.ScintillaEdit_SetWrapVisualFlagsLocation(this.h, (C.intptr_t)(wrapVisualFlagsLocation)) +func (this *ScintillaEdit) StyleSizeFractional(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleSizeFractional(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) WrapVisualFlagsLocation() uintptr { - return (uintptr)(C.ScintillaEdit_WrapVisualFlagsLocation(this.h)) +func (this *ScintillaEdit) StyleSetWeight(style uintptr, weight uintptr) { + C.ScintillaEdit_StyleSetWeight(this.h, (C.intptr_t)(style), (C.intptr_t)(weight)) } -func (this *ScintillaEdit) SetWrapStartIndent(indent uintptr) { - C.ScintillaEdit_SetWrapStartIndent(this.h, (C.intptr_t)(indent)) +func (this *ScintillaEdit) StyleWeight(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleWeight(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) WrapStartIndent() uintptr { - return (uintptr)(C.ScintillaEdit_WrapStartIndent(this.h)) +func (this *ScintillaEdit) StyleSetCharacterSet(style uintptr, characterSet uintptr) { + C.ScintillaEdit_StyleSetCharacterSet(this.h, (C.intptr_t)(style), (C.intptr_t)(characterSet)) } -func (this *ScintillaEdit) SetWrapIndentMode(wrapIndentMode uintptr) { - C.ScintillaEdit_SetWrapIndentMode(this.h, (C.intptr_t)(wrapIndentMode)) +func (this *ScintillaEdit) StyleSetHotSpot(style uintptr, hotspot bool) { + C.ScintillaEdit_StyleSetHotSpot(this.h, (C.intptr_t)(style), (C.bool)(hotspot)) } -func (this *ScintillaEdit) WrapIndentMode() uintptr { - return (uintptr)(C.ScintillaEdit_WrapIndentMode(this.h)) +func (this *ScintillaEdit) StyleSetCheckMonospaced(style uintptr, checkMonospaced bool) { + C.ScintillaEdit_StyleSetCheckMonospaced(this.h, (C.intptr_t)(style), (C.bool)(checkMonospaced)) } -func (this *ScintillaEdit) SetLayoutCache(cacheMode uintptr) { - C.ScintillaEdit_SetLayoutCache(this.h, (C.intptr_t)(cacheMode)) +func (this *ScintillaEdit) StyleCheckMonospaced(style uintptr) bool { + return (bool)(C.ScintillaEdit_StyleCheckMonospaced(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) LayoutCache() uintptr { - return (uintptr)(C.ScintillaEdit_LayoutCache(this.h)) +func (this *ScintillaEdit) StyleSetStretch(style uintptr, stretch uintptr) { + C.ScintillaEdit_StyleSetStretch(this.h, (C.intptr_t)(style), (C.intptr_t)(stretch)) } -func (this *ScintillaEdit) SetScrollWidth(pixelWidth uintptr) { - C.ScintillaEdit_SetScrollWidth(this.h, (C.intptr_t)(pixelWidth)) +func (this *ScintillaEdit) StyleStretch(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleStretch(this.h, (C.intptr_t)(style))) } -func (this *ScintillaEdit) ScrollWidth() uintptr { - return (uintptr)(C.ScintillaEdit_ScrollWidth(this.h)) +func (this *ScintillaEdit) StyleSetInvisibleRepresentation(style uintptr, representation string) { + representation_Cstring := C.CString(representation) + defer C.free(unsafe.Pointer(representation_Cstring)) + C.ScintillaEdit_StyleSetInvisibleRepresentation(this.h, (C.intptr_t)(style), representation_Cstring) } -func (this *ScintillaEdit) SetScrollWidthTracking(tracking bool) { - C.ScintillaEdit_SetScrollWidthTracking(this.h, (C.bool)(tracking)) +func (this *ScintillaEdit) StyleInvisibleRepresentation(style uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_StyleInvisibleRepresentation(this.h, (C.intptr_t)(style)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) ScrollWidthTracking() bool { - return (bool)(C.ScintillaEdit_ScrollWidthTracking(this.h)) +func (this *ScintillaEdit) SetElementColour(element uintptr, colourElement uintptr) { + C.ScintillaEdit_SetElementColour(this.h, (C.intptr_t)(element), (C.intptr_t)(colourElement)) } -func (this *ScintillaEdit) TextWidth(style uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_TextWidth(this.h, (C.intptr_t)(style), text_Cstring)) +func (this *ScintillaEdit) ElementColour(element uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_ElementColour(this.h, (C.intptr_t)(element))) } -func (this *ScintillaEdit) SetEndAtLastLine(endAtLastLine bool) { - C.ScintillaEdit_SetEndAtLastLine(this.h, (C.bool)(endAtLastLine)) +func (this *ScintillaEdit) ResetElementColour(element uintptr) { + C.ScintillaEdit_ResetElementColour(this.h, (C.intptr_t)(element)) } -func (this *ScintillaEdit) EndAtLastLine() bool { - return (bool)(C.ScintillaEdit_EndAtLastLine(this.h)) +func (this *ScintillaEdit) ElementIsSet(element uintptr) bool { + return (bool)(C.ScintillaEdit_ElementIsSet(this.h, (C.intptr_t)(element))) } -func (this *ScintillaEdit) TextHeight(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_TextHeight(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) ElementAllowsTranslucent(element uintptr) bool { + return (bool)(C.ScintillaEdit_ElementAllowsTranslucent(this.h, (C.intptr_t)(element))) } -func (this *ScintillaEdit) SetVScrollBar(visible bool) { - C.ScintillaEdit_SetVScrollBar(this.h, (C.bool)(visible)) +func (this *ScintillaEdit) ElementBaseColour(element uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_ElementBaseColour(this.h, (C.intptr_t)(element))) } -func (this *ScintillaEdit) VScrollBar() bool { - return (bool)(C.ScintillaEdit_VScrollBar(this.h)) +func (this *ScintillaEdit) SetSelFore(useSetting bool, fore uintptr) { + C.ScintillaEdit_SetSelFore(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) AppendText(length uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_AppendText(this.h, (C.intptr_t)(length), text_Cstring) +func (this *ScintillaEdit) SetSelBack(useSetting bool, back uintptr) { + C.ScintillaEdit_SetSelBack(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) } -func (this *ScintillaEdit) PhasesDraw() uintptr { - return (uintptr)(C.ScintillaEdit_PhasesDraw(this.h)) +func (this *ScintillaEdit) SelAlpha() uintptr { + return (uintptr)(C.ScintillaEdit_SelAlpha(this.h)) } -func (this *ScintillaEdit) SetPhasesDraw(phases uintptr) { - C.ScintillaEdit_SetPhasesDraw(this.h, (C.intptr_t)(phases)) +func (this *ScintillaEdit) SetSelAlpha(alpha uintptr) { + C.ScintillaEdit_SetSelAlpha(this.h, (C.intptr_t)(alpha)) } -func (this *ScintillaEdit) SetFontQuality(fontQuality uintptr) { - C.ScintillaEdit_SetFontQuality(this.h, (C.intptr_t)(fontQuality)) +func (this *ScintillaEdit) SelEOLFilled() bool { + return (bool)(C.ScintillaEdit_SelEOLFilled(this.h)) } -func (this *ScintillaEdit) FontQuality() uintptr { - return (uintptr)(C.ScintillaEdit_FontQuality(this.h)) +func (this *ScintillaEdit) SetSelEOLFilled(filled bool) { + C.ScintillaEdit_SetSelEOLFilled(this.h, (C.bool)(filled)) } -func (this *ScintillaEdit) SetFirstVisibleLine(displayLine uintptr) { - C.ScintillaEdit_SetFirstVisibleLine(this.h, (C.intptr_t)(displayLine)) +func (this *ScintillaEdit) SelectionLayer() uintptr { + return (uintptr)(C.ScintillaEdit_SelectionLayer(this.h)) } -func (this *ScintillaEdit) SetMultiPaste(multiPaste uintptr) { - C.ScintillaEdit_SetMultiPaste(this.h, (C.intptr_t)(multiPaste)) +func (this *ScintillaEdit) SetSelectionLayer(layer uintptr) { + C.ScintillaEdit_SetSelectionLayer(this.h, (C.intptr_t)(layer)) } -func (this *ScintillaEdit) MultiPaste() uintptr { - return (uintptr)(C.ScintillaEdit_MultiPaste(this.h)) +func (this *ScintillaEdit) CaretLineLayer() uintptr { + return (uintptr)(C.ScintillaEdit_CaretLineLayer(this.h)) } -func (this *ScintillaEdit) Tag(tagNumber uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_Tag(this.h, (C.intptr_t)(tagNumber)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetCaretLineLayer(layer uintptr) { + C.ScintillaEdit_SetCaretLineLayer(this.h, (C.intptr_t)(layer)) } -func (this *ScintillaEdit) LinesJoin() { - C.ScintillaEdit_LinesJoin(this.h) +func (this *ScintillaEdit) CaretLineHighlightSubLine() bool { + return (bool)(C.ScintillaEdit_CaretLineHighlightSubLine(this.h)) } -func (this *ScintillaEdit) LinesSplit(pixelWidth uintptr) { - C.ScintillaEdit_LinesSplit(this.h, (C.intptr_t)(pixelWidth)) +func (this *ScintillaEdit) SetCaretLineHighlightSubLine(subLine bool) { + C.ScintillaEdit_SetCaretLineHighlightSubLine(this.h, (C.bool)(subLine)) } -func (this *ScintillaEdit) SetFoldMarginColour(useSetting bool, back uintptr) { - C.ScintillaEdit_SetFoldMarginColour(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) +func (this *ScintillaEdit) SetCaretFore(fore uintptr) { + C.ScintillaEdit_SetCaretFore(this.h, (C.intptr_t)(fore)) } -func (this *ScintillaEdit) SetFoldMarginHiColour(useSetting bool, fore uintptr) { - C.ScintillaEdit_SetFoldMarginHiColour(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) +func (this *ScintillaEdit) AssignCmdKey(keyDefinition uintptr, sciCommand uintptr) { + C.ScintillaEdit_AssignCmdKey(this.h, (C.intptr_t)(keyDefinition), (C.intptr_t)(sciCommand)) } -func (this *ScintillaEdit) SetAccessibility(accessibility uintptr) { - C.ScintillaEdit_SetAccessibility(this.h, (C.intptr_t)(accessibility)) +func (this *ScintillaEdit) ClearCmdKey(keyDefinition uintptr) { + C.ScintillaEdit_ClearCmdKey(this.h, (C.intptr_t)(keyDefinition)) } -func (this *ScintillaEdit) Accessibility() uintptr { - return (uintptr)(C.ScintillaEdit_Accessibility(this.h)) +func (this *ScintillaEdit) ClearAllCmdKeys() { + C.ScintillaEdit_ClearAllCmdKeys(this.h) } -func (this *ScintillaEdit) LineDown() { - C.ScintillaEdit_LineDown(this.h) +func (this *ScintillaEdit) SetStylingEx(length uintptr, styles string) { + styles_Cstring := C.CString(styles) + defer C.free(unsafe.Pointer(styles_Cstring)) + C.ScintillaEdit_SetStylingEx(this.h, (C.intptr_t)(length), styles_Cstring) } -func (this *ScintillaEdit) LineDownExtend() { - C.ScintillaEdit_LineDownExtend(this.h) +func (this *ScintillaEdit) StyleSetVisible(style uintptr, visible bool) { + C.ScintillaEdit_StyleSetVisible(this.h, (C.intptr_t)(style), (C.bool)(visible)) } -func (this *ScintillaEdit) LineUp() { - C.ScintillaEdit_LineUp(this.h) +func (this *ScintillaEdit) CaretPeriod() uintptr { + return (uintptr)(C.ScintillaEdit_CaretPeriod(this.h)) } -func (this *ScintillaEdit) LineUpExtend() { - C.ScintillaEdit_LineUpExtend(this.h) +func (this *ScintillaEdit) SetCaretPeriod(periodMilliseconds uintptr) { + C.ScintillaEdit_SetCaretPeriod(this.h, (C.intptr_t)(periodMilliseconds)) } -func (this *ScintillaEdit) CharLeft() { - C.ScintillaEdit_CharLeft(this.h) +func (this *ScintillaEdit) SetWordChars(characters string) { + characters_Cstring := C.CString(characters) + defer C.free(unsafe.Pointer(characters_Cstring)) + C.ScintillaEdit_SetWordChars(this.h, characters_Cstring) } -func (this *ScintillaEdit) CharLeftExtend() { - C.ScintillaEdit_CharLeftExtend(this.h) +func (this *ScintillaEdit) WordChars() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_WordChars(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) CharRight() { - C.ScintillaEdit_CharRight(this.h) +func (this *ScintillaEdit) SetCharacterCategoryOptimization(countCharacters uintptr) { + C.ScintillaEdit_SetCharacterCategoryOptimization(this.h, (C.intptr_t)(countCharacters)) } -func (this *ScintillaEdit) CharRightExtend() { - C.ScintillaEdit_CharRightExtend(this.h) +func (this *ScintillaEdit) CharacterCategoryOptimization() uintptr { + return (uintptr)(C.ScintillaEdit_CharacterCategoryOptimization(this.h)) } -func (this *ScintillaEdit) WordLeft() { - C.ScintillaEdit_WordLeft(this.h) +func (this *ScintillaEdit) BeginUndoAction() { + C.ScintillaEdit_BeginUndoAction(this.h) } -func (this *ScintillaEdit) WordLeftExtend() { - C.ScintillaEdit_WordLeftExtend(this.h) +func (this *ScintillaEdit) EndUndoAction() { + C.ScintillaEdit_EndUndoAction(this.h) } -func (this *ScintillaEdit) WordRight() { - C.ScintillaEdit_WordRight(this.h) +func (this *ScintillaEdit) UndoSequence() uintptr { + return (uintptr)(C.ScintillaEdit_UndoSequence(this.h)) } -func (this *ScintillaEdit) WordRightExtend() { - C.ScintillaEdit_WordRightExtend(this.h) +func (this *ScintillaEdit) UndoActions() uintptr { + return (uintptr)(C.ScintillaEdit_UndoActions(this.h)) } -func (this *ScintillaEdit) Home() { - C.ScintillaEdit_Home(this.h) +func (this *ScintillaEdit) SetUndoSavePoint(action uintptr) { + C.ScintillaEdit_SetUndoSavePoint(this.h, (C.intptr_t)(action)) } -func (this *ScintillaEdit) HomeExtend() { - C.ScintillaEdit_HomeExtend(this.h) +func (this *ScintillaEdit) UndoSavePoint() uintptr { + return (uintptr)(C.ScintillaEdit_UndoSavePoint(this.h)) } -func (this *ScintillaEdit) LineEnd() { - C.ScintillaEdit_LineEnd(this.h) +func (this *ScintillaEdit) SetUndoDetach(action uintptr) { + C.ScintillaEdit_SetUndoDetach(this.h, (C.intptr_t)(action)) } -func (this *ScintillaEdit) LineEndExtend() { - C.ScintillaEdit_LineEndExtend(this.h) +func (this *ScintillaEdit) UndoDetach() uintptr { + return (uintptr)(C.ScintillaEdit_UndoDetach(this.h)) } -func (this *ScintillaEdit) DocumentStart() { - C.ScintillaEdit_DocumentStart(this.h) +func (this *ScintillaEdit) SetUndoTentative(action uintptr) { + C.ScintillaEdit_SetUndoTentative(this.h, (C.intptr_t)(action)) } -func (this *ScintillaEdit) DocumentStartExtend() { - C.ScintillaEdit_DocumentStartExtend(this.h) +func (this *ScintillaEdit) UndoTentative() uintptr { + return (uintptr)(C.ScintillaEdit_UndoTentative(this.h)) } -func (this *ScintillaEdit) DocumentEnd() { - C.ScintillaEdit_DocumentEnd(this.h) +func (this *ScintillaEdit) SetUndoCurrent(action uintptr) { + C.ScintillaEdit_SetUndoCurrent(this.h, (C.intptr_t)(action)) } -func (this *ScintillaEdit) DocumentEndExtend() { - C.ScintillaEdit_DocumentEndExtend(this.h) +func (this *ScintillaEdit) UndoCurrent() uintptr { + return (uintptr)(C.ScintillaEdit_UndoCurrent(this.h)) } -func (this *ScintillaEdit) PageUp() { - C.ScintillaEdit_PageUp(this.h) +func (this *ScintillaEdit) PushUndoActionType(typeVal uintptr, pos uintptr) { + C.ScintillaEdit_PushUndoActionType(this.h, (C.intptr_t)(typeVal), (C.intptr_t)(pos)) } -func (this *ScintillaEdit) PageUpExtend() { - C.ScintillaEdit_PageUpExtend(this.h) +func (this *ScintillaEdit) ChangeLastUndoActionText(length uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_ChangeLastUndoActionText(this.h, (C.intptr_t)(length), text_Cstring) } -func (this *ScintillaEdit) PageDown() { - C.ScintillaEdit_PageDown(this.h) +func (this *ScintillaEdit) UndoActionType(action uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_UndoActionType(this.h, (C.intptr_t)(action))) } -func (this *ScintillaEdit) PageDownExtend() { - C.ScintillaEdit_PageDownExtend(this.h) +func (this *ScintillaEdit) UndoActionPosition(action uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_UndoActionPosition(this.h, (C.intptr_t)(action))) } -func (this *ScintillaEdit) EditToggleOvertype() { - C.ScintillaEdit_EditToggleOvertype(this.h) +func (this *ScintillaEdit) UndoActionText(action uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_UndoActionText(this.h, (C.intptr_t)(action)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) Cancel() { - C.ScintillaEdit_Cancel(this.h) +func (this *ScintillaEdit) IndicSetStyle(indicator uintptr, indicatorStyle uintptr) { + C.ScintillaEdit_IndicSetStyle(this.h, (C.intptr_t)(indicator), (C.intptr_t)(indicatorStyle)) } -func (this *ScintillaEdit) DeleteBack() { - C.ScintillaEdit_DeleteBack(this.h) +func (this *ScintillaEdit) IndicStyle(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicStyle(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) Tab() { - C.ScintillaEdit_Tab(this.h) +func (this *ScintillaEdit) IndicSetFore(indicator uintptr, fore uintptr) { + C.ScintillaEdit_IndicSetFore(this.h, (C.intptr_t)(indicator), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) LineIndent() { - C.ScintillaEdit_LineIndent(this.h) +func (this *ScintillaEdit) IndicFore(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicFore(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) BackTab() { - C.ScintillaEdit_BackTab(this.h) +func (this *ScintillaEdit) IndicSetUnder(indicator uintptr, under bool) { + C.ScintillaEdit_IndicSetUnder(this.h, (C.intptr_t)(indicator), (C.bool)(under)) } -func (this *ScintillaEdit) LineDedent() { - C.ScintillaEdit_LineDedent(this.h) +func (this *ScintillaEdit) IndicUnder(indicator uintptr) bool { + return (bool)(C.ScintillaEdit_IndicUnder(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) NewLine() { - C.ScintillaEdit_NewLine(this.h) +func (this *ScintillaEdit) IndicSetHoverStyle(indicator uintptr, indicatorStyle uintptr) { + C.ScintillaEdit_IndicSetHoverStyle(this.h, (C.intptr_t)(indicator), (C.intptr_t)(indicatorStyle)) } -func (this *ScintillaEdit) FormFeed() { - C.ScintillaEdit_FormFeed(this.h) +func (this *ScintillaEdit) IndicHoverStyle(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicHoverStyle(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) VCHome() { - C.ScintillaEdit_VCHome(this.h) +func (this *ScintillaEdit) IndicSetHoverFore(indicator uintptr, fore uintptr) { + C.ScintillaEdit_IndicSetHoverFore(this.h, (C.intptr_t)(indicator), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) VCHomeExtend() { - C.ScintillaEdit_VCHomeExtend(this.h) +func (this *ScintillaEdit) IndicHoverFore(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicHoverFore(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) ZoomIn() { - C.ScintillaEdit_ZoomIn(this.h) +func (this *ScintillaEdit) IndicSetFlags(indicator uintptr, flags uintptr) { + C.ScintillaEdit_IndicSetFlags(this.h, (C.intptr_t)(indicator), (C.intptr_t)(flags)) } -func (this *ScintillaEdit) ZoomOut() { - C.ScintillaEdit_ZoomOut(this.h) +func (this *ScintillaEdit) IndicFlags(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicFlags(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) DelWordLeft() { - C.ScintillaEdit_DelWordLeft(this.h) +func (this *ScintillaEdit) IndicSetStrokeWidth(indicator uintptr, hundredths uintptr) { + C.ScintillaEdit_IndicSetStrokeWidth(this.h, (C.intptr_t)(indicator), (C.intptr_t)(hundredths)) } -func (this *ScintillaEdit) DelWordRight() { - C.ScintillaEdit_DelWordRight(this.h) +func (this *ScintillaEdit) IndicStrokeWidth(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicStrokeWidth(this.h, (C.intptr_t)(indicator))) } -func (this *ScintillaEdit) DelWordRightEnd() { - C.ScintillaEdit_DelWordRightEnd(this.h) +func (this *ScintillaEdit) SetWhitespaceFore(useSetting bool, fore uintptr) { + C.ScintillaEdit_SetWhitespaceFore(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) LineCut() { - C.ScintillaEdit_LineCut(this.h) +func (this *ScintillaEdit) SetWhitespaceBack(useSetting bool, back uintptr) { + C.ScintillaEdit_SetWhitespaceBack(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) } -func (this *ScintillaEdit) LineDelete() { - C.ScintillaEdit_LineDelete(this.h) +func (this *ScintillaEdit) SetWhitespaceSize(size uintptr) { + C.ScintillaEdit_SetWhitespaceSize(this.h, (C.intptr_t)(size)) } -func (this *ScintillaEdit) LineTranspose() { - C.ScintillaEdit_LineTranspose(this.h) +func (this *ScintillaEdit) WhitespaceSize() uintptr { + return (uintptr)(C.ScintillaEdit_WhitespaceSize(this.h)) } -func (this *ScintillaEdit) LineReverse() { - C.ScintillaEdit_LineReverse(this.h) +func (this *ScintillaEdit) SetLineState(line uintptr, state uintptr) { + C.ScintillaEdit_SetLineState(this.h, (C.intptr_t)(line), (C.intptr_t)(state)) } -func (this *ScintillaEdit) LineDuplicate() { - C.ScintillaEdit_LineDuplicate(this.h) +func (this *ScintillaEdit) LineState(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineState(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) LowerCase() { - C.ScintillaEdit_LowerCase(this.h) +func (this *ScintillaEdit) MaxLineState() uintptr { + return (uintptr)(C.ScintillaEdit_MaxLineState(this.h)) } -func (this *ScintillaEdit) UpperCase() { - C.ScintillaEdit_UpperCase(this.h) +func (this *ScintillaEdit) CaretLineVisible() bool { + return (bool)(C.ScintillaEdit_CaretLineVisible(this.h)) } -func (this *ScintillaEdit) LineScrollDown() { - C.ScintillaEdit_LineScrollDown(this.h) +func (this *ScintillaEdit) SetCaretLineVisible(show bool) { + C.ScintillaEdit_SetCaretLineVisible(this.h, (C.bool)(show)) } -func (this *ScintillaEdit) LineScrollUp() { - C.ScintillaEdit_LineScrollUp(this.h) +func (this *ScintillaEdit) CaretLineBack() uintptr { + return (uintptr)(C.ScintillaEdit_CaretLineBack(this.h)) } -func (this *ScintillaEdit) DeleteBackNotLine() { - C.ScintillaEdit_DeleteBackNotLine(this.h) +func (this *ScintillaEdit) SetCaretLineBack(back uintptr) { + C.ScintillaEdit_SetCaretLineBack(this.h, (C.intptr_t)(back)) } -func (this *ScintillaEdit) HomeDisplay() { - C.ScintillaEdit_HomeDisplay(this.h) +func (this *ScintillaEdit) CaretLineFrame() uintptr { + return (uintptr)(C.ScintillaEdit_CaretLineFrame(this.h)) } -func (this *ScintillaEdit) HomeDisplayExtend() { - C.ScintillaEdit_HomeDisplayExtend(this.h) +func (this *ScintillaEdit) SetCaretLineFrame(width uintptr) { + C.ScintillaEdit_SetCaretLineFrame(this.h, (C.intptr_t)(width)) } -func (this *ScintillaEdit) LineEndDisplay() { - C.ScintillaEdit_LineEndDisplay(this.h) +func (this *ScintillaEdit) StyleSetChangeable(style uintptr, changeable bool) { + C.ScintillaEdit_StyleSetChangeable(this.h, (C.intptr_t)(style), (C.bool)(changeable)) } -func (this *ScintillaEdit) LineEndDisplayExtend() { - C.ScintillaEdit_LineEndDisplayExtend(this.h) +func (this *ScintillaEdit) AutoCShow(lengthEntered uintptr, itemList string) { + itemList_Cstring := C.CString(itemList) + defer C.free(unsafe.Pointer(itemList_Cstring)) + C.ScintillaEdit_AutoCShow(this.h, (C.intptr_t)(lengthEntered), itemList_Cstring) } -func (this *ScintillaEdit) HomeWrap() { - C.ScintillaEdit_HomeWrap(this.h) +func (this *ScintillaEdit) AutoCCancel() { + C.ScintillaEdit_AutoCCancel(this.h) } -func (this *ScintillaEdit) HomeWrapExtend() { - C.ScintillaEdit_HomeWrapExtend(this.h) +func (this *ScintillaEdit) AutoCActive() bool { + return (bool)(C.ScintillaEdit_AutoCActive(this.h)) } -func (this *ScintillaEdit) LineEndWrap() { - C.ScintillaEdit_LineEndWrap(this.h) +func (this *ScintillaEdit) AutoCPosStart() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCPosStart(this.h)) } -func (this *ScintillaEdit) LineEndWrapExtend() { - C.ScintillaEdit_LineEndWrapExtend(this.h) +func (this *ScintillaEdit) AutoCComplete() { + C.ScintillaEdit_AutoCComplete(this.h) } -func (this *ScintillaEdit) VCHomeWrap() { - C.ScintillaEdit_VCHomeWrap(this.h) +func (this *ScintillaEdit) AutoCStops(characterSet string) { + characterSet_Cstring := C.CString(characterSet) + defer C.free(unsafe.Pointer(characterSet_Cstring)) + C.ScintillaEdit_AutoCStops(this.h, characterSet_Cstring) } -func (this *ScintillaEdit) VCHomeWrapExtend() { - C.ScintillaEdit_VCHomeWrapExtend(this.h) +func (this *ScintillaEdit) AutoCSetSeparator(separatorCharacter uintptr) { + C.ScintillaEdit_AutoCSetSeparator(this.h, (C.intptr_t)(separatorCharacter)) } -func (this *ScintillaEdit) LineCopy() { - C.ScintillaEdit_LineCopy(this.h) +func (this *ScintillaEdit) AutoCSeparator() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCSeparator(this.h)) } -func (this *ScintillaEdit) MoveCaretInsideView() { - C.ScintillaEdit_MoveCaretInsideView(this.h) +func (this *ScintillaEdit) AutoCSelect(selectVal string) { + selectVal_Cstring := C.CString(selectVal) + defer C.free(unsafe.Pointer(selectVal_Cstring)) + C.ScintillaEdit_AutoCSelect(this.h, selectVal_Cstring) } -func (this *ScintillaEdit) LineLength(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineLength(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) AutoCSetCancelAtStart(cancel bool) { + C.ScintillaEdit_AutoCSetCancelAtStart(this.h, (C.bool)(cancel)) } -func (this *ScintillaEdit) BraceHighlight(posA uintptr, posB uintptr) { - C.ScintillaEdit_BraceHighlight(this.h, (C.intptr_t)(posA), (C.intptr_t)(posB)) +func (this *ScintillaEdit) AutoCCancelAtStart() bool { + return (bool)(C.ScintillaEdit_AutoCCancelAtStart(this.h)) } -func (this *ScintillaEdit) BraceHighlightIndicator(useSetting bool, indicator uintptr) { - C.ScintillaEdit_BraceHighlightIndicator(this.h, (C.bool)(useSetting), (C.intptr_t)(indicator)) +func (this *ScintillaEdit) AutoCSetFillUps(characterSet string) { + characterSet_Cstring := C.CString(characterSet) + defer C.free(unsafe.Pointer(characterSet_Cstring)) + C.ScintillaEdit_AutoCSetFillUps(this.h, characterSet_Cstring) } -func (this *ScintillaEdit) BraceBadLight(pos uintptr) { - C.ScintillaEdit_BraceBadLight(this.h, (C.intptr_t)(pos)) +func (this *ScintillaEdit) AutoCSetChooseSingle(chooseSingle bool) { + C.ScintillaEdit_AutoCSetChooseSingle(this.h, (C.bool)(chooseSingle)) } -func (this *ScintillaEdit) BraceBadLightIndicator(useSetting bool, indicator uintptr) { - C.ScintillaEdit_BraceBadLightIndicator(this.h, (C.bool)(useSetting), (C.intptr_t)(indicator)) +func (this *ScintillaEdit) AutoCChooseSingle() bool { + return (bool)(C.ScintillaEdit_AutoCChooseSingle(this.h)) } -func (this *ScintillaEdit) BraceMatch(pos uintptr, maxReStyle uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_BraceMatch(this.h, (C.intptr_t)(pos), (C.intptr_t)(maxReStyle))) +func (this *ScintillaEdit) AutoCSetIgnoreCase(ignoreCase bool) { + C.ScintillaEdit_AutoCSetIgnoreCase(this.h, (C.bool)(ignoreCase)) } -func (this *ScintillaEdit) BraceMatchNext(pos uintptr, startPos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_BraceMatchNext(this.h, (C.intptr_t)(pos), (C.intptr_t)(startPos))) +func (this *ScintillaEdit) AutoCIgnoreCase() bool { + return (bool)(C.ScintillaEdit_AutoCIgnoreCase(this.h)) } -func (this *ScintillaEdit) ViewEOL() bool { - return (bool)(C.ScintillaEdit_ViewEOL(this.h)) +func (this *ScintillaEdit) UserListShow(listType uintptr, itemList string) { + itemList_Cstring := C.CString(itemList) + defer C.free(unsafe.Pointer(itemList_Cstring)) + C.ScintillaEdit_UserListShow(this.h, (C.intptr_t)(listType), itemList_Cstring) } -func (this *ScintillaEdit) SetViewEOL(visible bool) { - C.ScintillaEdit_SetViewEOL(this.h, (C.bool)(visible)) +func (this *ScintillaEdit) AutoCSetAutoHide(autoHide bool) { + C.ScintillaEdit_AutoCSetAutoHide(this.h, (C.bool)(autoHide)) } -func (this *ScintillaEdit) DocPointer() uintptr { - return (uintptr)(C.ScintillaEdit_DocPointer(this.h)) +func (this *ScintillaEdit) AutoCAutoHide() bool { + return (bool)(C.ScintillaEdit_AutoCAutoHide(this.h)) } -func (this *ScintillaEdit) SetDocPointer(doc uintptr) { - C.ScintillaEdit_SetDocPointer(this.h, (C.intptr_t)(doc)) +func (this *ScintillaEdit) AutoCSetOptions(options uintptr) { + C.ScintillaEdit_AutoCSetOptions(this.h, (C.intptr_t)(options)) } -func (this *ScintillaEdit) SetModEventMask(eventMask uintptr) { - C.ScintillaEdit_SetModEventMask(this.h, (C.intptr_t)(eventMask)) +func (this *ScintillaEdit) AutoCOptions() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCOptions(this.h)) } -func (this *ScintillaEdit) EdgeColumn() uintptr { - return (uintptr)(C.ScintillaEdit_EdgeColumn(this.h)) +func (this *ScintillaEdit) AutoCSetDropRestOfWord(dropRestOfWord bool) { + C.ScintillaEdit_AutoCSetDropRestOfWord(this.h, (C.bool)(dropRestOfWord)) } -func (this *ScintillaEdit) SetEdgeColumn(column uintptr) { - C.ScintillaEdit_SetEdgeColumn(this.h, (C.intptr_t)(column)) +func (this *ScintillaEdit) AutoCDropRestOfWord() bool { + return (bool)(C.ScintillaEdit_AutoCDropRestOfWord(this.h)) } -func (this *ScintillaEdit) EdgeMode() uintptr { - return (uintptr)(C.ScintillaEdit_EdgeMode(this.h)) +func (this *ScintillaEdit) RegisterImage(typeVal uintptr, xpmData string) { + xpmData_Cstring := C.CString(xpmData) + defer C.free(unsafe.Pointer(xpmData_Cstring)) + C.ScintillaEdit_RegisterImage(this.h, (C.intptr_t)(typeVal), xpmData_Cstring) } -func (this *ScintillaEdit) SetEdgeMode(edgeMode uintptr) { - C.ScintillaEdit_SetEdgeMode(this.h, (C.intptr_t)(edgeMode)) +func (this *ScintillaEdit) ClearRegisteredImages() { + C.ScintillaEdit_ClearRegisteredImages(this.h) } -func (this *ScintillaEdit) EdgeColour() uintptr { - return (uintptr)(C.ScintillaEdit_EdgeColour(this.h)) +func (this *ScintillaEdit) AutoCTypeSeparator() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCTypeSeparator(this.h)) } -func (this *ScintillaEdit) SetEdgeColour(edgeColour uintptr) { - C.ScintillaEdit_SetEdgeColour(this.h, (C.intptr_t)(edgeColour)) -} +func (this *ScintillaEdit) AutoCSetTypeSeparator(separatorCharacter uintptr) { + C.ScintillaEdit_AutoCSetTypeSeparator(this.h, (C.intptr_t)(separatorCharacter)) +} -func (this *ScintillaEdit) MultiEdgeAddLine(column uintptr, edgeColour uintptr) { - C.ScintillaEdit_MultiEdgeAddLine(this.h, (C.intptr_t)(column), (C.intptr_t)(edgeColour)) +func (this *ScintillaEdit) AutoCSetMaxWidth(characterCount uintptr) { + C.ScintillaEdit_AutoCSetMaxWidth(this.h, (C.intptr_t)(characterCount)) } -func (this *ScintillaEdit) MultiEdgeClearAll() { - C.ScintillaEdit_MultiEdgeClearAll(this.h) +func (this *ScintillaEdit) AutoCMaxWidth() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCMaxWidth(this.h)) } -func (this *ScintillaEdit) MultiEdgeColumn(which uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MultiEdgeColumn(this.h, (C.intptr_t)(which))) +func (this *ScintillaEdit) AutoCSetMaxHeight(rowCount uintptr) { + C.ScintillaEdit_AutoCSetMaxHeight(this.h, (C.intptr_t)(rowCount)) } -func (this *ScintillaEdit) SearchAnchor() { - C.ScintillaEdit_SearchAnchor(this.h) +func (this *ScintillaEdit) AutoCMaxHeight() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCMaxHeight(this.h)) } -func (this *ScintillaEdit) SearchNext(searchFlags uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_SearchNext(this.h, (C.intptr_t)(searchFlags), text_Cstring)) +func (this *ScintillaEdit) AutoCSetStyle(style uintptr) { + C.ScintillaEdit_AutoCSetStyle(this.h, (C.intptr_t)(style)) } -func (this *ScintillaEdit) SearchPrev(searchFlags uintptr, text string) uintptr { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - return (uintptr)(C.ScintillaEdit_SearchPrev(this.h, (C.intptr_t)(searchFlags), text_Cstring)) +func (this *ScintillaEdit) AutoCStyle() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCStyle(this.h)) } -func (this *ScintillaEdit) LinesOnScreen() uintptr { - return (uintptr)(C.ScintillaEdit_LinesOnScreen(this.h)) +func (this *ScintillaEdit) SetIndent(indentSize uintptr) { + C.ScintillaEdit_SetIndent(this.h, (C.intptr_t)(indentSize)) } -func (this *ScintillaEdit) UsePopUp(popUpMode uintptr) { - C.ScintillaEdit_UsePopUp(this.h, (C.intptr_t)(popUpMode)) +func (this *ScintillaEdit) Indent() uintptr { + return (uintptr)(C.ScintillaEdit_Indent(this.h)) } -func (this *ScintillaEdit) SelectionIsRectangle() bool { - return (bool)(C.ScintillaEdit_SelectionIsRectangle(this.h)) +func (this *ScintillaEdit) SetUseTabs(useTabs bool) { + C.ScintillaEdit_SetUseTabs(this.h, (C.bool)(useTabs)) } -func (this *ScintillaEdit) SetZoom(zoomInPoints uintptr) { - C.ScintillaEdit_SetZoom(this.h, (C.intptr_t)(zoomInPoints)) +func (this *ScintillaEdit) UseTabs() bool { + return (bool)(C.ScintillaEdit_UseTabs(this.h)) } -func (this *ScintillaEdit) Zoom() uintptr { - return (uintptr)(C.ScintillaEdit_Zoom(this.h)) +func (this *ScintillaEdit) SetLineIndentation(line uintptr, indentation uintptr) { + C.ScintillaEdit_SetLineIndentation(this.h, (C.intptr_t)(line), (C.intptr_t)(indentation)) } -func (this *ScintillaEdit) CreateDocument(bytes uintptr, documentOptions uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CreateDocument(this.h, (C.intptr_t)(bytes), (C.intptr_t)(documentOptions))) +func (this *ScintillaEdit) LineIndentation(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineIndentation(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) AddRefDocument(doc uintptr) { - C.ScintillaEdit_AddRefDocument(this.h, (C.intptr_t)(doc)) +func (this *ScintillaEdit) LineIndentPosition(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineIndentPosition(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) ReleaseDocument(doc uintptr) { - C.ScintillaEdit_ReleaseDocument(this.h, (C.intptr_t)(doc)) +func (this *ScintillaEdit) Column(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_Column(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) DocumentOptions() uintptr { - return (uintptr)(C.ScintillaEdit_DocumentOptions(this.h)) +func (this *ScintillaEdit) CountCharacters(start uintptr, end uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CountCharacters(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) } -func (this *ScintillaEdit) ModEventMask() uintptr { - return (uintptr)(C.ScintillaEdit_ModEventMask(this.h)) +func (this *ScintillaEdit) CountCodeUnits(start uintptr, end uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CountCodeUnits(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) } -func (this *ScintillaEdit) SetCommandEvents(commandEvents bool) { - C.ScintillaEdit_SetCommandEvents(this.h, (C.bool)(commandEvents)) +func (this *ScintillaEdit) SetHScrollBar(visible bool) { + C.ScintillaEdit_SetHScrollBar(this.h, (C.bool)(visible)) } -func (this *ScintillaEdit) CommandEvents() bool { - return (bool)(C.ScintillaEdit_CommandEvents(this.h)) +func (this *ScintillaEdit) HScrollBar() bool { + return (bool)(C.ScintillaEdit_HScrollBar(this.h)) } -func (this *ScintillaEdit) SetFocus(focus bool) { - C.ScintillaEdit_SetFocus(this.h, (C.bool)(focus)) +func (this *ScintillaEdit) SetIndentationGuides(indentView uintptr) { + C.ScintillaEdit_SetIndentationGuides(this.h, (C.intptr_t)(indentView)) } -func (this *ScintillaEdit) Focus() bool { - return (bool)(C.ScintillaEdit_Focus(this.h)) +func (this *ScintillaEdit) IndentationGuides() uintptr { + return (uintptr)(C.ScintillaEdit_IndentationGuides(this.h)) } -func (this *ScintillaEdit) SetStatus(status uintptr) { - C.ScintillaEdit_SetStatus(this.h, (C.intptr_t)(status)) +func (this *ScintillaEdit) SetHighlightGuide(column uintptr) { + C.ScintillaEdit_SetHighlightGuide(this.h, (C.intptr_t)(column)) } -func (this *ScintillaEdit) Status() uintptr { - return (uintptr)(C.ScintillaEdit_Status(this.h)) +func (this *ScintillaEdit) HighlightGuide() uintptr { + return (uintptr)(C.ScintillaEdit_HighlightGuide(this.h)) } -func (this *ScintillaEdit) SetMouseDownCaptures(captures bool) { - C.ScintillaEdit_SetMouseDownCaptures(this.h, (C.bool)(captures)) +func (this *ScintillaEdit) LineEndPosition(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineEndPosition(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) MouseDownCaptures() bool { - return (bool)(C.ScintillaEdit_MouseDownCaptures(this.h)) +func (this *ScintillaEdit) CodePage() uintptr { + return (uintptr)(C.ScintillaEdit_CodePage(this.h)) } -func (this *ScintillaEdit) SetMouseWheelCaptures(captures bool) { - C.ScintillaEdit_SetMouseWheelCaptures(this.h, (C.bool)(captures)) +func (this *ScintillaEdit) CaretFore() uintptr { + return (uintptr)(C.ScintillaEdit_CaretFore(this.h)) } -func (this *ScintillaEdit) MouseWheelCaptures() bool { - return (bool)(C.ScintillaEdit_MouseWheelCaptures(this.h)) +func (this *ScintillaEdit) ReadOnly() bool { + return (bool)(C.ScintillaEdit_ReadOnly(this.h)) } -func (this *ScintillaEdit) SetCursor(cursorType uintptr) { - C.ScintillaEdit_SetCursor(this.h, (C.intptr_t)(cursorType)) +func (this *ScintillaEdit) SetCurrentPos(caret uintptr) { + C.ScintillaEdit_SetCurrentPos(this.h, (C.intptr_t)(caret)) } -func (this *ScintillaEdit) Cursor() uintptr { - return (uintptr)(C.ScintillaEdit_Cursor(this.h)) +func (this *ScintillaEdit) SetSelectionStart(anchor uintptr) { + C.ScintillaEdit_SetSelectionStart(this.h, (C.intptr_t)(anchor)) } -func (this *ScintillaEdit) SetControlCharSymbol(symbol uintptr) { - C.ScintillaEdit_SetControlCharSymbol(this.h, (C.intptr_t)(symbol)) +func (this *ScintillaEdit) SelectionStart() uintptr { + return (uintptr)(C.ScintillaEdit_SelectionStart(this.h)) } -func (this *ScintillaEdit) ControlCharSymbol() uintptr { - return (uintptr)(C.ScintillaEdit_ControlCharSymbol(this.h)) +func (this *ScintillaEdit) SetSelectionEnd(caret uintptr) { + C.ScintillaEdit_SetSelectionEnd(this.h, (C.intptr_t)(caret)) } -func (this *ScintillaEdit) WordPartLeft() { - C.ScintillaEdit_WordPartLeft(this.h) +func (this *ScintillaEdit) SelectionEnd() uintptr { + return (uintptr)(C.ScintillaEdit_SelectionEnd(this.h)) } -func (this *ScintillaEdit) WordPartLeftExtend() { - C.ScintillaEdit_WordPartLeftExtend(this.h) +func (this *ScintillaEdit) SetEmptySelection(caret uintptr) { + C.ScintillaEdit_SetEmptySelection(this.h, (C.intptr_t)(caret)) } -func (this *ScintillaEdit) WordPartRight() { - C.ScintillaEdit_WordPartRight(this.h) +func (this *ScintillaEdit) SetPrintMagnification(magnification uintptr) { + C.ScintillaEdit_SetPrintMagnification(this.h, (C.intptr_t)(magnification)) } -func (this *ScintillaEdit) WordPartRightExtend() { - C.ScintillaEdit_WordPartRightExtend(this.h) +func (this *ScintillaEdit) PrintMagnification() uintptr { + return (uintptr)(C.ScintillaEdit_PrintMagnification(this.h)) } -func (this *ScintillaEdit) SetVisiblePolicy(visiblePolicy uintptr, visibleSlop uintptr) { - C.ScintillaEdit_SetVisiblePolicy(this.h, (C.intptr_t)(visiblePolicy), (C.intptr_t)(visibleSlop)) +func (this *ScintillaEdit) SetPrintColourMode(mode uintptr) { + C.ScintillaEdit_SetPrintColourMode(this.h, (C.intptr_t)(mode)) } -func (this *ScintillaEdit) DelLineLeft() { - C.ScintillaEdit_DelLineLeft(this.h) +func (this *ScintillaEdit) PrintColourMode() uintptr { + return (uintptr)(C.ScintillaEdit_PrintColourMode(this.h)) } -func (this *ScintillaEdit) DelLineRight() { - C.ScintillaEdit_DelLineRight(this.h) +func (this *ScintillaEdit) SetChangeHistory(changeHistory uintptr) { + C.ScintillaEdit_SetChangeHistory(this.h, (C.intptr_t)(changeHistory)) } -func (this *ScintillaEdit) SetXOffset(xOffset uintptr) { - C.ScintillaEdit_SetXOffset(this.h, (C.intptr_t)(xOffset)) +func (this *ScintillaEdit) ChangeHistory() uintptr { + return (uintptr)(C.ScintillaEdit_ChangeHistory(this.h)) } -func (this *ScintillaEdit) XOffset() uintptr { - return (uintptr)(C.ScintillaEdit_XOffset(this.h)) +func (this *ScintillaEdit) FirstVisibleLine() uintptr { + return (uintptr)(C.ScintillaEdit_FirstVisibleLine(this.h)) } -func (this *ScintillaEdit) ChooseCaretX() { - C.ScintillaEdit_ChooseCaretX(this.h) +func (this *ScintillaEdit) GetLine(line uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetLine(this.h, (C.intptr_t)(line)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) GrabFocus() { - C.ScintillaEdit_GrabFocus(this.h) +func (this *ScintillaEdit) LineCount() uintptr { + return (uintptr)(C.ScintillaEdit_LineCount(this.h)) } -func (this *ScintillaEdit) SetXCaretPolicy(caretPolicy uintptr, caretSlop uintptr) { - C.ScintillaEdit_SetXCaretPolicy(this.h, (C.intptr_t)(caretPolicy), (C.intptr_t)(caretSlop)) +func (this *ScintillaEdit) AllocateLines(lines uintptr) { + C.ScintillaEdit_AllocateLines(this.h, (C.intptr_t)(lines)) } -func (this *ScintillaEdit) SetYCaretPolicy(caretPolicy uintptr, caretSlop uintptr) { - C.ScintillaEdit_SetYCaretPolicy(this.h, (C.intptr_t)(caretPolicy), (C.intptr_t)(caretSlop)) +func (this *ScintillaEdit) SetMarginLeft(pixelWidth uintptr) { + C.ScintillaEdit_SetMarginLeft(this.h, (C.intptr_t)(pixelWidth)) } -func (this *ScintillaEdit) SetPrintWrapMode(wrapMode uintptr) { - C.ScintillaEdit_SetPrintWrapMode(this.h, (C.intptr_t)(wrapMode)) +func (this *ScintillaEdit) MarginLeft() uintptr { + return (uintptr)(C.ScintillaEdit_MarginLeft(this.h)) } -func (this *ScintillaEdit) PrintWrapMode() uintptr { - return (uintptr)(C.ScintillaEdit_PrintWrapMode(this.h)) +func (this *ScintillaEdit) SetMarginRight(pixelWidth uintptr) { + C.ScintillaEdit_SetMarginRight(this.h, (C.intptr_t)(pixelWidth)) } -func (this *ScintillaEdit) SetHotspotActiveFore(useSetting bool, fore uintptr) { - C.ScintillaEdit_SetHotspotActiveFore(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) +func (this *ScintillaEdit) MarginRight() uintptr { + return (uintptr)(C.ScintillaEdit_MarginRight(this.h)) } -func (this *ScintillaEdit) HotspotActiveFore() uintptr { - return (uintptr)(C.ScintillaEdit_HotspotActiveFore(this.h)) +func (this *ScintillaEdit) Modify() bool { + return (bool)(C.ScintillaEdit_Modify(this.h)) } -func (this *ScintillaEdit) SetHotspotActiveBack(useSetting bool, back uintptr) { - C.ScintillaEdit_SetHotspotActiveBack(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) +func (this *ScintillaEdit) SetSel(anchor uintptr, caret uintptr) { + C.ScintillaEdit_SetSel(this.h, (C.intptr_t)(anchor), (C.intptr_t)(caret)) } -func (this *ScintillaEdit) HotspotActiveBack() uintptr { - return (uintptr)(C.ScintillaEdit_HotspotActiveBack(this.h)) +func (this *ScintillaEdit) GetSelText() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetSelText(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) SetHotspotActiveUnderline(underline bool) { - C.ScintillaEdit_SetHotspotActiveUnderline(this.h, (C.bool)(underline)) +func (this *ScintillaEdit) HideSelection(hide bool) { + C.ScintillaEdit_HideSelection(this.h, (C.bool)(hide)) } -func (this *ScintillaEdit) HotspotActiveUnderline() bool { - return (bool)(C.ScintillaEdit_HotspotActiveUnderline(this.h)) +func (this *ScintillaEdit) SelectionHidden() bool { + return (bool)(C.ScintillaEdit_SelectionHidden(this.h)) } -func (this *ScintillaEdit) SetHotspotSingleLine(singleLine bool) { - C.ScintillaEdit_SetHotspotSingleLine(this.h, (C.bool)(singleLine)) +func (this *ScintillaEdit) PointXFromPosition(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PointXFromPosition(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) HotspotSingleLine() bool { - return (bool)(C.ScintillaEdit_HotspotSingleLine(this.h)) +func (this *ScintillaEdit) PointYFromPosition(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PointYFromPosition(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) ParaDown() { - C.ScintillaEdit_ParaDown(this.h) +func (this *ScintillaEdit) LineFromPosition(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineFromPosition(this.h, (C.intptr_t)(pos))) } -func (this *ScintillaEdit) ParaDownExtend() { - C.ScintillaEdit_ParaDownExtend(this.h) +func (this *ScintillaEdit) PositionFromLine(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionFromLine(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) ParaUp() { - C.ScintillaEdit_ParaUp(this.h) +func (this *ScintillaEdit) LineScroll(columns uintptr, lines uintptr) { + C.ScintillaEdit_LineScroll(this.h, (C.intptr_t)(columns), (C.intptr_t)(lines)) } -func (this *ScintillaEdit) ParaUpExtend() { - C.ScintillaEdit_ParaUpExtend(this.h) +func (this *ScintillaEdit) ScrollCaret() { + C.ScintillaEdit_ScrollCaret(this.h) } -func (this *ScintillaEdit) PositionBefore(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionBefore(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) ScrollRange(secondary uintptr, primary uintptr) { + C.ScintillaEdit_ScrollRange(this.h, (C.intptr_t)(secondary), (C.intptr_t)(primary)) } -func (this *ScintillaEdit) PositionAfter(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionAfter(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) ReplaceSel(text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_ReplaceSel(this.h, text_Cstring) } -func (this *ScintillaEdit) PositionRelative(pos uintptr, relative uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionRelative(this.h, (C.intptr_t)(pos), (C.intptr_t)(relative))) +func (this *ScintillaEdit) SetReadOnly(readOnly bool) { + C.ScintillaEdit_SetReadOnly(this.h, (C.bool)(readOnly)) } -func (this *ScintillaEdit) PositionRelativeCodeUnits(pos uintptr, relative uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PositionRelativeCodeUnits(this.h, (C.intptr_t)(pos), (C.intptr_t)(relative))) +func (this *ScintillaEdit) Null() { + C.ScintillaEdit_Null(this.h) } -func (this *ScintillaEdit) CopyRange(start uintptr, end uintptr) { - C.ScintillaEdit_CopyRange(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +func (this *ScintillaEdit) CanPaste() bool { + return (bool)(C.ScintillaEdit_CanPaste(this.h)) } -func (this *ScintillaEdit) CopyText(length uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_CopyText(this.h, (C.intptr_t)(length), text_Cstring) +func (this *ScintillaEdit) CanUndo() bool { + return (bool)(C.ScintillaEdit_CanUndo(this.h)) } -func (this *ScintillaEdit) SetSelectionMode(selectionMode uintptr) { - C.ScintillaEdit_SetSelectionMode(this.h, (C.intptr_t)(selectionMode)) +func (this *ScintillaEdit) EmptyUndoBuffer() { + C.ScintillaEdit_EmptyUndoBuffer(this.h) } -func (this *ScintillaEdit) ChangeSelectionMode(selectionMode uintptr) { - C.ScintillaEdit_ChangeSelectionMode(this.h, (C.intptr_t)(selectionMode)) +func (this *ScintillaEdit) Undo() { + C.ScintillaEdit_Undo(this.h) } -func (this *ScintillaEdit) SelectionMode() uintptr { - return (uintptr)(C.ScintillaEdit_SelectionMode(this.h)) +func (this *ScintillaEdit) Cut() { + C.ScintillaEdit_Cut(this.h) } -func (this *ScintillaEdit) SetMoveExtendsSelection(moveExtendsSelection bool) { - C.ScintillaEdit_SetMoveExtendsSelection(this.h, (C.bool)(moveExtendsSelection)) +func (this *ScintillaEdit) Copy() { + C.ScintillaEdit_Copy(this.h) } -func (this *ScintillaEdit) MoveExtendsSelection() bool { - return (bool)(C.ScintillaEdit_MoveExtendsSelection(this.h)) +func (this *ScintillaEdit) Paste() { + C.ScintillaEdit_Paste(this.h) } -func (this *ScintillaEdit) GetLineSelStartPosition(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_GetLineSelStartPosition(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) Clear() { + C.ScintillaEdit_Clear(this.h) } -func (this *ScintillaEdit) GetLineSelEndPosition(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_GetLineSelEndPosition(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) SetText(text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_SetText(this.h, text_Cstring) } -func (this *ScintillaEdit) LineDownRectExtend() { - C.ScintillaEdit_LineDownRectExtend(this.h) +func (this *ScintillaEdit) GetText(length uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetText(this.h, (C.intptr_t)(length)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) LineUpRectExtend() { - C.ScintillaEdit_LineUpRectExtend(this.h) +func (this *ScintillaEdit) TextLength() uintptr { + return (uintptr)(C.ScintillaEdit_TextLength(this.h)) } -func (this *ScintillaEdit) CharLeftRectExtend() { - C.ScintillaEdit_CharLeftRectExtend(this.h) +func (this *ScintillaEdit) DirectFunction() uintptr { + return (uintptr)(C.ScintillaEdit_DirectFunction(this.h)) } -func (this *ScintillaEdit) CharRightRectExtend() { - C.ScintillaEdit_CharRightRectExtend(this.h) +func (this *ScintillaEdit) DirectStatusFunction() uintptr { + return (uintptr)(C.ScintillaEdit_DirectStatusFunction(this.h)) } -func (this *ScintillaEdit) HomeRectExtend() { - C.ScintillaEdit_HomeRectExtend(this.h) +func (this *ScintillaEdit) DirectPointer() uintptr { + return (uintptr)(C.ScintillaEdit_DirectPointer(this.h)) } -func (this *ScintillaEdit) VCHomeRectExtend() { - C.ScintillaEdit_VCHomeRectExtend(this.h) +func (this *ScintillaEdit) SetOvertype(overType bool) { + C.ScintillaEdit_SetOvertype(this.h, (C.bool)(overType)) } -func (this *ScintillaEdit) LineEndRectExtend() { - C.ScintillaEdit_LineEndRectExtend(this.h) +func (this *ScintillaEdit) Overtype() bool { + return (bool)(C.ScintillaEdit_Overtype(this.h)) } -func (this *ScintillaEdit) PageUpRectExtend() { - C.ScintillaEdit_PageUpRectExtend(this.h) +func (this *ScintillaEdit) SetCaretWidth(pixelWidth uintptr) { + C.ScintillaEdit_SetCaretWidth(this.h, (C.intptr_t)(pixelWidth)) } -func (this *ScintillaEdit) PageDownRectExtend() { - C.ScintillaEdit_PageDownRectExtend(this.h) +func (this *ScintillaEdit) CaretWidth() uintptr { + return (uintptr)(C.ScintillaEdit_CaretWidth(this.h)) } -func (this *ScintillaEdit) StutteredPageUp() { - C.ScintillaEdit_StutteredPageUp(this.h) +func (this *ScintillaEdit) SetTargetStart(start uintptr) { + C.ScintillaEdit_SetTargetStart(this.h, (C.intptr_t)(start)) } -func (this *ScintillaEdit) StutteredPageUpExtend() { - C.ScintillaEdit_StutteredPageUpExtend(this.h) +func (this *ScintillaEdit) TargetStart() uintptr { + return (uintptr)(C.ScintillaEdit_TargetStart(this.h)) } -func (this *ScintillaEdit) StutteredPageDown() { - C.ScintillaEdit_StutteredPageDown(this.h) +func (this *ScintillaEdit) SetTargetStartVirtualSpace(space uintptr) { + C.ScintillaEdit_SetTargetStartVirtualSpace(this.h, (C.intptr_t)(space)) } -func (this *ScintillaEdit) StutteredPageDownExtend() { - C.ScintillaEdit_StutteredPageDownExtend(this.h) +func (this *ScintillaEdit) TargetStartVirtualSpace() uintptr { + return (uintptr)(C.ScintillaEdit_TargetStartVirtualSpace(this.h)) } -func (this *ScintillaEdit) WordLeftEnd() { - C.ScintillaEdit_WordLeftEnd(this.h) +func (this *ScintillaEdit) SetTargetEnd(end uintptr) { + C.ScintillaEdit_SetTargetEnd(this.h, (C.intptr_t)(end)) } -func (this *ScintillaEdit) WordLeftEndExtend() { - C.ScintillaEdit_WordLeftEndExtend(this.h) +func (this *ScintillaEdit) TargetEnd() uintptr { + return (uintptr)(C.ScintillaEdit_TargetEnd(this.h)) } -func (this *ScintillaEdit) WordRightEnd() { - C.ScintillaEdit_WordRightEnd(this.h) +func (this *ScintillaEdit) SetTargetEndVirtualSpace(space uintptr) { + C.ScintillaEdit_SetTargetEndVirtualSpace(this.h, (C.intptr_t)(space)) } -func (this *ScintillaEdit) WordRightEndExtend() { - C.ScintillaEdit_WordRightEndExtend(this.h) +func (this *ScintillaEdit) TargetEndVirtualSpace() uintptr { + return (uintptr)(C.ScintillaEdit_TargetEndVirtualSpace(this.h)) } -func (this *ScintillaEdit) SetWhitespaceChars(characters string) { - characters_Cstring := C.CString(characters) - defer C.free(unsafe.Pointer(characters_Cstring)) - C.ScintillaEdit_SetWhitespaceChars(this.h, characters_Cstring) +func (this *ScintillaEdit) SetTargetRange(start uintptr, end uintptr) { + C.ScintillaEdit_SetTargetRange(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) } -func (this *ScintillaEdit) WhitespaceChars() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_WhitespaceChars(this.h) +func (this *ScintillaEdit) TargetText() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_TargetText(this.h) _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) C.free(unsafe.Pointer(_bytearray.data)) return _ret } -func (this *ScintillaEdit) SetPunctuationChars(characters string) { - characters_Cstring := C.CString(characters) - defer C.free(unsafe.Pointer(characters_Cstring)) - C.ScintillaEdit_SetPunctuationChars(this.h, characters_Cstring) +func (this *ScintillaEdit) TargetFromSelection() { + C.ScintillaEdit_TargetFromSelection(this.h) } -func (this *ScintillaEdit) PunctuationChars() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_PunctuationChars(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) TargetWholeDocument() { + C.ScintillaEdit_TargetWholeDocument(this.h) } -func (this *ScintillaEdit) SetCharsDefault() { - C.ScintillaEdit_SetCharsDefault(this.h) +func (this *ScintillaEdit) ReplaceTarget(length uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_ReplaceTarget(this.h, (C.intptr_t)(length), text_Cstring)) } -func (this *ScintillaEdit) AutoCCurrent() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCCurrent(this.h)) +func (this *ScintillaEdit) ReplaceTargetRE(length uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_ReplaceTargetRE(this.h, (C.intptr_t)(length), text_Cstring)) } -func (this *ScintillaEdit) AutoCCurrentText() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_AutoCCurrentText(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) ReplaceTargetMinimal(length uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_ReplaceTargetMinimal(this.h, (C.intptr_t)(length), text_Cstring)) } -func (this *ScintillaEdit) AutoCSetCaseInsensitiveBehaviour(behaviour uintptr) { - C.ScintillaEdit_AutoCSetCaseInsensitiveBehaviour(this.h, (C.intptr_t)(behaviour)) +func (this *ScintillaEdit) SearchInTarget(length uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_SearchInTarget(this.h, (C.intptr_t)(length), text_Cstring)) } -func (this *ScintillaEdit) AutoCCaseInsensitiveBehaviour() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCCaseInsensitiveBehaviour(this.h)) +func (this *ScintillaEdit) SetSearchFlags(searchFlags uintptr) { + C.ScintillaEdit_SetSearchFlags(this.h, (C.intptr_t)(searchFlags)) } -func (this *ScintillaEdit) AutoCSetMulti(multi uintptr) { - C.ScintillaEdit_AutoCSetMulti(this.h, (C.intptr_t)(multi)) +func (this *ScintillaEdit) SearchFlags() uintptr { + return (uintptr)(C.ScintillaEdit_SearchFlags(this.h)) } -func (this *ScintillaEdit) AutoCMulti() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCMulti(this.h)) +func (this *ScintillaEdit) CallTipShow(pos uintptr, definition string) { + definition_Cstring := C.CString(definition) + defer C.free(unsafe.Pointer(definition_Cstring)) + C.ScintillaEdit_CallTipShow(this.h, (C.intptr_t)(pos), definition_Cstring) } -func (this *ScintillaEdit) AutoCSetOrder(order uintptr) { - C.ScintillaEdit_AutoCSetOrder(this.h, (C.intptr_t)(order)) +func (this *ScintillaEdit) CallTipCancel() { + C.ScintillaEdit_CallTipCancel(this.h) } -func (this *ScintillaEdit) AutoCOrder() uintptr { - return (uintptr)(C.ScintillaEdit_AutoCOrder(this.h)) +func (this *ScintillaEdit) CallTipActive() bool { + return (bool)(C.ScintillaEdit_CallTipActive(this.h)) } -func (this *ScintillaEdit) Allocate(bytes uintptr) { - C.ScintillaEdit_Allocate(this.h, (C.intptr_t)(bytes)) +func (this *ScintillaEdit) CallTipPosStart() uintptr { + return (uintptr)(C.ScintillaEdit_CallTipPosStart(this.h)) } -func (this *ScintillaEdit) TargetAsUTF8() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_TargetAsUTF8(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) CallTipSetPosStart(posStart uintptr) { + C.ScintillaEdit_CallTipSetPosStart(this.h, (C.intptr_t)(posStart)) } -func (this *ScintillaEdit) SetLengthForEncode(bytes uintptr) { - C.ScintillaEdit_SetLengthForEncode(this.h, (C.intptr_t)(bytes)) +func (this *ScintillaEdit) CallTipSetHlt(highlightStart uintptr, highlightEnd uintptr) { + C.ScintillaEdit_CallTipSetHlt(this.h, (C.intptr_t)(highlightStart), (C.intptr_t)(highlightEnd)) } -func (this *ScintillaEdit) EncodedFromUTF8(utf8 string) []byte { - utf8_Cstring := C.CString(utf8) - defer C.free(unsafe.Pointer(utf8_Cstring)) - var _bytearray C.struct_miqt_string = C.ScintillaEdit_EncodedFromUTF8(this.h, utf8_Cstring) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) CallTipSetBack(back uintptr) { + C.ScintillaEdit_CallTipSetBack(this.h, (C.intptr_t)(back)) } -func (this *ScintillaEdit) FindColumn(line uintptr, column uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_FindColumn(this.h, (C.intptr_t)(line), (C.intptr_t)(column))) +func (this *ScintillaEdit) CallTipSetFore(fore uintptr) { + C.ScintillaEdit_CallTipSetFore(this.h, (C.intptr_t)(fore)) } -func (this *ScintillaEdit) CaretSticky() uintptr { - return (uintptr)(C.ScintillaEdit_CaretSticky(this.h)) +func (this *ScintillaEdit) CallTipSetForeHlt(fore uintptr) { + C.ScintillaEdit_CallTipSetForeHlt(this.h, (C.intptr_t)(fore)) } -func (this *ScintillaEdit) SetCaretSticky(useCaretStickyBehaviour uintptr) { - C.ScintillaEdit_SetCaretSticky(this.h, (C.intptr_t)(useCaretStickyBehaviour)) +func (this *ScintillaEdit) CallTipUseStyle(tabSize uintptr) { + C.ScintillaEdit_CallTipUseStyle(this.h, (C.intptr_t)(tabSize)) } -func (this *ScintillaEdit) ToggleCaretSticky() { - C.ScintillaEdit_ToggleCaretSticky(this.h) +func (this *ScintillaEdit) CallTipSetPosition(above bool) { + C.ScintillaEdit_CallTipSetPosition(this.h, (C.bool)(above)) } -func (this *ScintillaEdit) SetPasteConvertEndings(convert bool) { - C.ScintillaEdit_SetPasteConvertEndings(this.h, (C.bool)(convert)) +func (this *ScintillaEdit) VisibleFromDocLine(docLine uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_VisibleFromDocLine(this.h, (C.intptr_t)(docLine))) } -func (this *ScintillaEdit) PasteConvertEndings() bool { - return (bool)(C.ScintillaEdit_PasteConvertEndings(this.h)) +func (this *ScintillaEdit) DocLineFromVisible(displayLine uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_DocLineFromVisible(this.h, (C.intptr_t)(displayLine))) } -func (this *ScintillaEdit) ReplaceRectangular(length uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_ReplaceRectangular(this.h, (C.intptr_t)(length), text_Cstring) +func (this *ScintillaEdit) WrapCount(docLine uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_WrapCount(this.h, (C.intptr_t)(docLine))) } -func (this *ScintillaEdit) SelectionDuplicate() { - C.ScintillaEdit_SelectionDuplicate(this.h) +func (this *ScintillaEdit) SetFoldLevel(line uintptr, level uintptr) { + C.ScintillaEdit_SetFoldLevel(this.h, (C.intptr_t)(line), (C.intptr_t)(level)) } -func (this *ScintillaEdit) SetCaretLineBackAlpha(alpha uintptr) { - C.ScintillaEdit_SetCaretLineBackAlpha(this.h, (C.intptr_t)(alpha)) +func (this *ScintillaEdit) FoldLevel(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_FoldLevel(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) CaretLineBackAlpha() uintptr { - return (uintptr)(C.ScintillaEdit_CaretLineBackAlpha(this.h)) +func (this *ScintillaEdit) LastChild(line uintptr, level uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LastChild(this.h, (C.intptr_t)(line), (C.intptr_t)(level))) } -func (this *ScintillaEdit) SetCaretStyle(caretStyle uintptr) { - C.ScintillaEdit_SetCaretStyle(this.h, (C.intptr_t)(caretStyle)) +func (this *ScintillaEdit) FoldParent(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_FoldParent(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) CaretStyle() uintptr { - return (uintptr)(C.ScintillaEdit_CaretStyle(this.h)) +func (this *ScintillaEdit) ShowLines(lineStart uintptr, lineEnd uintptr) { + C.ScintillaEdit_ShowLines(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(lineEnd)) } -func (this *ScintillaEdit) SetIndicatorCurrent(indicator uintptr) { - C.ScintillaEdit_SetIndicatorCurrent(this.h, (C.intptr_t)(indicator)) +func (this *ScintillaEdit) HideLines(lineStart uintptr, lineEnd uintptr) { + C.ScintillaEdit_HideLines(this.h, (C.intptr_t)(lineStart), (C.intptr_t)(lineEnd)) } -func (this *ScintillaEdit) IndicatorCurrent() uintptr { - return (uintptr)(C.ScintillaEdit_IndicatorCurrent(this.h)) +func (this *ScintillaEdit) LineVisible(line uintptr) bool { + return (bool)(C.ScintillaEdit_LineVisible(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) SetIndicatorValue(value uintptr) { - C.ScintillaEdit_SetIndicatorValue(this.h, (C.intptr_t)(value)) +func (this *ScintillaEdit) AllLinesVisible() bool { + return (bool)(C.ScintillaEdit_AllLinesVisible(this.h)) } -func (this *ScintillaEdit) IndicatorValue() uintptr { - return (uintptr)(C.ScintillaEdit_IndicatorValue(this.h)) +func (this *ScintillaEdit) SetFoldExpanded(line uintptr, expanded bool) { + C.ScintillaEdit_SetFoldExpanded(this.h, (C.intptr_t)(line), (C.bool)(expanded)) } -func (this *ScintillaEdit) IndicatorFillRange(start uintptr, lengthFill uintptr) { - C.ScintillaEdit_IndicatorFillRange(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthFill)) +func (this *ScintillaEdit) FoldExpanded(line uintptr) bool { + return (bool)(C.ScintillaEdit_FoldExpanded(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) IndicatorClearRange(start uintptr, lengthClear uintptr) { - C.ScintillaEdit_IndicatorClearRange(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthClear)) +func (this *ScintillaEdit) ToggleFold(line uintptr) { + C.ScintillaEdit_ToggleFold(this.h, (C.intptr_t)(line)) } -func (this *ScintillaEdit) IndicatorAllOnFor(pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicatorAllOnFor(this.h, (C.intptr_t)(pos))) +func (this *ScintillaEdit) ToggleFoldShowText(line uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_ToggleFoldShowText(this.h, (C.intptr_t)(line), text_Cstring) } -func (this *ScintillaEdit) IndicatorValueAt(indicator uintptr, pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicatorValueAt(this.h, (C.intptr_t)(indicator), (C.intptr_t)(pos))) +func (this *ScintillaEdit) FoldDisplayTextSetStyle(style uintptr) { + C.ScintillaEdit_FoldDisplayTextSetStyle(this.h, (C.intptr_t)(style)) } -func (this *ScintillaEdit) IndicatorStart(indicator uintptr, pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicatorStart(this.h, (C.intptr_t)(indicator), (C.intptr_t)(pos))) +func (this *ScintillaEdit) FoldDisplayTextStyle() uintptr { + return (uintptr)(C.ScintillaEdit_FoldDisplayTextStyle(this.h)) } -func (this *ScintillaEdit) IndicatorEnd(indicator uintptr, pos uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicatorEnd(this.h, (C.intptr_t)(indicator), (C.intptr_t)(pos))) +func (this *ScintillaEdit) SetDefaultFoldDisplayText(text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_SetDefaultFoldDisplayText(this.h, text_Cstring) } -func (this *ScintillaEdit) SetPositionCache(size uintptr) { - C.ScintillaEdit_SetPositionCache(this.h, (C.intptr_t)(size)) +func (this *ScintillaEdit) GetDefaultFoldDisplayText() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_GetDefaultFoldDisplayText(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) PositionCache() uintptr { - return (uintptr)(C.ScintillaEdit_PositionCache(this.h)) +func (this *ScintillaEdit) FoldLine(line uintptr, action uintptr) { + C.ScintillaEdit_FoldLine(this.h, (C.intptr_t)(line), (C.intptr_t)(action)) } -func (this *ScintillaEdit) SetLayoutThreads(threads uintptr) { - C.ScintillaEdit_SetLayoutThreads(this.h, (C.intptr_t)(threads)) +func (this *ScintillaEdit) FoldChildren(line uintptr, action uintptr) { + C.ScintillaEdit_FoldChildren(this.h, (C.intptr_t)(line), (C.intptr_t)(action)) } -func (this *ScintillaEdit) LayoutThreads() uintptr { - return (uintptr)(C.ScintillaEdit_LayoutThreads(this.h)) +func (this *ScintillaEdit) ExpandChildren(line uintptr, level uintptr) { + C.ScintillaEdit_ExpandChildren(this.h, (C.intptr_t)(line), (C.intptr_t)(level)) } -func (this *ScintillaEdit) CopyAllowLine() { - C.ScintillaEdit_CopyAllowLine(this.h) +func (this *ScintillaEdit) FoldAll(action uintptr) { + C.ScintillaEdit_FoldAll(this.h, (C.intptr_t)(action)) } -func (this *ScintillaEdit) CutAllowLine() { - C.ScintillaEdit_CutAllowLine(this.h) +func (this *ScintillaEdit) EnsureVisible(line uintptr) { + C.ScintillaEdit_EnsureVisible(this.h, (C.intptr_t)(line)) } -func (this *ScintillaEdit) SetCopySeparator(separator string) { - separator_Cstring := C.CString(separator) - defer C.free(unsafe.Pointer(separator_Cstring)) - C.ScintillaEdit_SetCopySeparator(this.h, separator_Cstring) +func (this *ScintillaEdit) SetAutomaticFold(automaticFold uintptr) { + C.ScintillaEdit_SetAutomaticFold(this.h, (C.intptr_t)(automaticFold)) } -func (this *ScintillaEdit) CopySeparator() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_CopySeparator(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) AutomaticFold() uintptr { + return (uintptr)(C.ScintillaEdit_AutomaticFold(this.h)) } -func (this *ScintillaEdit) CharacterPointer() uintptr { - return (uintptr)(C.ScintillaEdit_CharacterPointer(this.h)) +func (this *ScintillaEdit) SetFoldFlags(flags uintptr) { + C.ScintillaEdit_SetFoldFlags(this.h, (C.intptr_t)(flags)) } -func (this *ScintillaEdit) RangePointer(start uintptr, lengthRange uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_RangePointer(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthRange))) +func (this *ScintillaEdit) EnsureVisibleEnforcePolicy(line uintptr) { + C.ScintillaEdit_EnsureVisibleEnforcePolicy(this.h, (C.intptr_t)(line)) } -func (this *ScintillaEdit) GapPosition() uintptr { - return (uintptr)(C.ScintillaEdit_GapPosition(this.h)) +func (this *ScintillaEdit) SetTabIndents(tabIndents bool) { + C.ScintillaEdit_SetTabIndents(this.h, (C.bool)(tabIndents)) } -func (this *ScintillaEdit) IndicSetAlpha(indicator uintptr, alpha uintptr) { - C.ScintillaEdit_IndicSetAlpha(this.h, (C.intptr_t)(indicator), (C.intptr_t)(alpha)) +func (this *ScintillaEdit) TabIndents() bool { + return (bool)(C.ScintillaEdit_TabIndents(this.h)) } -func (this *ScintillaEdit) IndicAlpha(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicAlpha(this.h, (C.intptr_t)(indicator))) +func (this *ScintillaEdit) SetBackSpaceUnIndents(bsUnIndents bool) { + C.ScintillaEdit_SetBackSpaceUnIndents(this.h, (C.bool)(bsUnIndents)) } -func (this *ScintillaEdit) IndicSetOutlineAlpha(indicator uintptr, alpha uintptr) { - C.ScintillaEdit_IndicSetOutlineAlpha(this.h, (C.intptr_t)(indicator), (C.intptr_t)(alpha)) +func (this *ScintillaEdit) BackSpaceUnIndents() bool { + return (bool)(C.ScintillaEdit_BackSpaceUnIndents(this.h)) } -func (this *ScintillaEdit) IndicOutlineAlpha(indicator uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndicOutlineAlpha(this.h, (C.intptr_t)(indicator))) +func (this *ScintillaEdit) SetMouseDwellTime(periodMilliseconds uintptr) { + C.ScintillaEdit_SetMouseDwellTime(this.h, (C.intptr_t)(periodMilliseconds)) } -func (this *ScintillaEdit) SetExtraAscent(extraAscent uintptr) { - C.ScintillaEdit_SetExtraAscent(this.h, (C.intptr_t)(extraAscent)) +func (this *ScintillaEdit) MouseDwellTime() uintptr { + return (uintptr)(C.ScintillaEdit_MouseDwellTime(this.h)) } -func (this *ScintillaEdit) ExtraAscent() uintptr { - return (uintptr)(C.ScintillaEdit_ExtraAscent(this.h)) +func (this *ScintillaEdit) WordStartPosition(pos uintptr, onlyWordCharacters bool) uintptr { + return (uintptr)(C.ScintillaEdit_WordStartPosition(this.h, (C.intptr_t)(pos), (C.bool)(onlyWordCharacters))) } -func (this *ScintillaEdit) SetExtraDescent(extraDescent uintptr) { - C.ScintillaEdit_SetExtraDescent(this.h, (C.intptr_t)(extraDescent)) +func (this *ScintillaEdit) WordEndPosition(pos uintptr, onlyWordCharacters bool) uintptr { + return (uintptr)(C.ScintillaEdit_WordEndPosition(this.h, (C.intptr_t)(pos), (C.bool)(onlyWordCharacters))) } -func (this *ScintillaEdit) ExtraDescent() uintptr { - return (uintptr)(C.ScintillaEdit_ExtraDescent(this.h)) +func (this *ScintillaEdit) IsRangeWord(start uintptr, end uintptr) bool { + return (bool)(C.ScintillaEdit_IsRangeWord(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) } -func (this *ScintillaEdit) MarkerSymbolDefined(markerNumber uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarkerSymbolDefined(this.h, (C.intptr_t)(markerNumber))) +func (this *ScintillaEdit) SetIdleStyling(idleStyling uintptr) { + C.ScintillaEdit_SetIdleStyling(this.h, (C.intptr_t)(idleStyling)) } -func (this *ScintillaEdit) MarginSetText(line uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_MarginSetText(this.h, (C.intptr_t)(line), text_Cstring) +func (this *ScintillaEdit) IdleStyling() uintptr { + return (uintptr)(C.ScintillaEdit_IdleStyling(this.h)) } -func (this *ScintillaEdit) MarginText(line uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_MarginText(this.h, (C.intptr_t)(line)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetWrapMode(wrapMode uintptr) { + C.ScintillaEdit_SetWrapMode(this.h, (C.intptr_t)(wrapMode)) } -func (this *ScintillaEdit) MarginSetStyle(line uintptr, style uintptr) { - C.ScintillaEdit_MarginSetStyle(this.h, (C.intptr_t)(line), (C.intptr_t)(style)) +func (this *ScintillaEdit) WrapMode() uintptr { + return (uintptr)(C.ScintillaEdit_WrapMode(this.h)) } -func (this *ScintillaEdit) MarginStyle(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_MarginStyle(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) SetWrapVisualFlags(wrapVisualFlags uintptr) { + C.ScintillaEdit_SetWrapVisualFlags(this.h, (C.intptr_t)(wrapVisualFlags)) } -func (this *ScintillaEdit) MarginSetStyles(line uintptr, styles string) { - styles_Cstring := C.CString(styles) - defer C.free(unsafe.Pointer(styles_Cstring)) - C.ScintillaEdit_MarginSetStyles(this.h, (C.intptr_t)(line), styles_Cstring) +func (this *ScintillaEdit) WrapVisualFlags() uintptr { + return (uintptr)(C.ScintillaEdit_WrapVisualFlags(this.h)) } -func (this *ScintillaEdit) MarginStyles(line uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_MarginStyles(this.h, (C.intptr_t)(line)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetWrapVisualFlagsLocation(wrapVisualFlagsLocation uintptr) { + C.ScintillaEdit_SetWrapVisualFlagsLocation(this.h, (C.intptr_t)(wrapVisualFlagsLocation)) } -func (this *ScintillaEdit) MarginTextClearAll() { - C.ScintillaEdit_MarginTextClearAll(this.h) +func (this *ScintillaEdit) WrapVisualFlagsLocation() uintptr { + return (uintptr)(C.ScintillaEdit_WrapVisualFlagsLocation(this.h)) } -func (this *ScintillaEdit) MarginSetStyleOffset(style uintptr) { - C.ScintillaEdit_MarginSetStyleOffset(this.h, (C.intptr_t)(style)) +func (this *ScintillaEdit) SetWrapStartIndent(indent uintptr) { + C.ScintillaEdit_SetWrapStartIndent(this.h, (C.intptr_t)(indent)) } -func (this *ScintillaEdit) MarginStyleOffset() uintptr { - return (uintptr)(C.ScintillaEdit_MarginStyleOffset(this.h)) +func (this *ScintillaEdit) WrapStartIndent() uintptr { + return (uintptr)(C.ScintillaEdit_WrapStartIndent(this.h)) } -func (this *ScintillaEdit) SetMarginOptions(marginOptions uintptr) { - C.ScintillaEdit_SetMarginOptions(this.h, (C.intptr_t)(marginOptions)) +func (this *ScintillaEdit) SetWrapIndentMode(wrapIndentMode uintptr) { + C.ScintillaEdit_SetWrapIndentMode(this.h, (C.intptr_t)(wrapIndentMode)) } -func (this *ScintillaEdit) MarginOptions() uintptr { - return (uintptr)(C.ScintillaEdit_MarginOptions(this.h)) +func (this *ScintillaEdit) WrapIndentMode() uintptr { + return (uintptr)(C.ScintillaEdit_WrapIndentMode(this.h)) } -func (this *ScintillaEdit) AnnotationSetText(line uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_AnnotationSetText(this.h, (C.intptr_t)(line), text_Cstring) +func (this *ScintillaEdit) SetLayoutCache(cacheMode uintptr) { + C.ScintillaEdit_SetLayoutCache(this.h, (C.intptr_t)(cacheMode)) } -func (this *ScintillaEdit) AnnotationText(line uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_AnnotationText(this.h, (C.intptr_t)(line)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) LayoutCache() uintptr { + return (uintptr)(C.ScintillaEdit_LayoutCache(this.h)) } -func (this *ScintillaEdit) AnnotationSetStyle(line uintptr, style uintptr) { - C.ScintillaEdit_AnnotationSetStyle(this.h, (C.intptr_t)(line), (C.intptr_t)(style)) +func (this *ScintillaEdit) SetScrollWidth(pixelWidth uintptr) { + C.ScintillaEdit_SetScrollWidth(this.h, (C.intptr_t)(pixelWidth)) } -func (this *ScintillaEdit) AnnotationStyle(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_AnnotationStyle(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) ScrollWidth() uintptr { + return (uintptr)(C.ScintillaEdit_ScrollWidth(this.h)) } -func (this *ScintillaEdit) AnnotationSetStyles(line uintptr, styles string) { - styles_Cstring := C.CString(styles) - defer C.free(unsafe.Pointer(styles_Cstring)) - C.ScintillaEdit_AnnotationSetStyles(this.h, (C.intptr_t)(line), styles_Cstring) +func (this *ScintillaEdit) SetScrollWidthTracking(tracking bool) { + C.ScintillaEdit_SetScrollWidthTracking(this.h, (C.bool)(tracking)) } -func (this *ScintillaEdit) AnnotationStyles(line uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_AnnotationStyles(this.h, (C.intptr_t)(line)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) ScrollWidthTracking() bool { + return (bool)(C.ScintillaEdit_ScrollWidthTracking(this.h)) } -func (this *ScintillaEdit) AnnotationLines(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_AnnotationLines(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) TextWidth(style uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_TextWidth(this.h, (C.intptr_t)(style), text_Cstring)) } -func (this *ScintillaEdit) AnnotationClearAll() { - C.ScintillaEdit_AnnotationClearAll(this.h) +func (this *ScintillaEdit) SetEndAtLastLine(endAtLastLine bool) { + C.ScintillaEdit_SetEndAtLastLine(this.h, (C.bool)(endAtLastLine)) } -func (this *ScintillaEdit) AnnotationSetVisible(visible uintptr) { - C.ScintillaEdit_AnnotationSetVisible(this.h, (C.intptr_t)(visible)) +func (this *ScintillaEdit) EndAtLastLine() bool { + return (bool)(C.ScintillaEdit_EndAtLastLine(this.h)) } -func (this *ScintillaEdit) AnnotationVisible() uintptr { - return (uintptr)(C.ScintillaEdit_AnnotationVisible(this.h)) +func (this *ScintillaEdit) TextHeight(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_TextHeight(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) AnnotationSetStyleOffset(style uintptr) { - C.ScintillaEdit_AnnotationSetStyleOffset(this.h, (C.intptr_t)(style)) +func (this *ScintillaEdit) SetVScrollBar(visible bool) { + C.ScintillaEdit_SetVScrollBar(this.h, (C.bool)(visible)) } -func (this *ScintillaEdit) AnnotationStyleOffset() uintptr { - return (uintptr)(C.ScintillaEdit_AnnotationStyleOffset(this.h)) +func (this *ScintillaEdit) VScrollBar() bool { + return (bool)(C.ScintillaEdit_VScrollBar(this.h)) } -func (this *ScintillaEdit) ReleaseAllExtendedStyles() { - C.ScintillaEdit_ReleaseAllExtendedStyles(this.h) +func (this *ScintillaEdit) AppendText(length uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_AppendText(this.h, (C.intptr_t)(length), text_Cstring) } -func (this *ScintillaEdit) AllocateExtendedStyles(numberStyles uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_AllocateExtendedStyles(this.h, (C.intptr_t)(numberStyles))) +func (this *ScintillaEdit) PhasesDraw() uintptr { + return (uintptr)(C.ScintillaEdit_PhasesDraw(this.h)) } -func (this *ScintillaEdit) AddUndoAction(token uintptr, flags uintptr) { - C.ScintillaEdit_AddUndoAction(this.h, (C.intptr_t)(token), (C.intptr_t)(flags)) +func (this *ScintillaEdit) SetPhasesDraw(phases uintptr) { + C.ScintillaEdit_SetPhasesDraw(this.h, (C.intptr_t)(phases)) } -func (this *ScintillaEdit) CharPositionFromPoint(x uintptr, y uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CharPositionFromPoint(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) +func (this *ScintillaEdit) SetFontQuality(fontQuality uintptr) { + C.ScintillaEdit_SetFontQuality(this.h, (C.intptr_t)(fontQuality)) } -func (this *ScintillaEdit) CharPositionFromPointClose(x uintptr, y uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CharPositionFromPointClose(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) +func (this *ScintillaEdit) FontQuality() uintptr { + return (uintptr)(C.ScintillaEdit_FontQuality(this.h)) } -func (this *ScintillaEdit) SetMouseSelectionRectangularSwitch(mouseSelectionRectangularSwitch bool) { - C.ScintillaEdit_SetMouseSelectionRectangularSwitch(this.h, (C.bool)(mouseSelectionRectangularSwitch)) +func (this *ScintillaEdit) SetFirstVisibleLine(displayLine uintptr) { + C.ScintillaEdit_SetFirstVisibleLine(this.h, (C.intptr_t)(displayLine)) } -func (this *ScintillaEdit) MouseSelectionRectangularSwitch() bool { - return (bool)(C.ScintillaEdit_MouseSelectionRectangularSwitch(this.h)) +func (this *ScintillaEdit) SetMultiPaste(multiPaste uintptr) { + C.ScintillaEdit_SetMultiPaste(this.h, (C.intptr_t)(multiPaste)) } -func (this *ScintillaEdit) SetMultipleSelection(multipleSelection bool) { - C.ScintillaEdit_SetMultipleSelection(this.h, (C.bool)(multipleSelection)) +func (this *ScintillaEdit) MultiPaste() uintptr { + return (uintptr)(C.ScintillaEdit_MultiPaste(this.h)) } -func (this *ScintillaEdit) MultipleSelection() bool { - return (bool)(C.ScintillaEdit_MultipleSelection(this.h)) +func (this *ScintillaEdit) Tag(tagNumber uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_Tag(this.h, (C.intptr_t)(tagNumber)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret } -func (this *ScintillaEdit) SetAdditionalSelectionTyping(additionalSelectionTyping bool) { - C.ScintillaEdit_SetAdditionalSelectionTyping(this.h, (C.bool)(additionalSelectionTyping)) +func (this *ScintillaEdit) LinesJoin() { + C.ScintillaEdit_LinesJoin(this.h) } -func (this *ScintillaEdit) AdditionalSelectionTyping() bool { - return (bool)(C.ScintillaEdit_AdditionalSelectionTyping(this.h)) +func (this *ScintillaEdit) LinesSplit(pixelWidth uintptr) { + C.ScintillaEdit_LinesSplit(this.h, (C.intptr_t)(pixelWidth)) } -func (this *ScintillaEdit) SetAdditionalCaretsBlink(additionalCaretsBlink bool) { - C.ScintillaEdit_SetAdditionalCaretsBlink(this.h, (C.bool)(additionalCaretsBlink)) +func (this *ScintillaEdit) SetFoldMarginColour(useSetting bool, back uintptr) { + C.ScintillaEdit_SetFoldMarginColour(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) } -func (this *ScintillaEdit) AdditionalCaretsBlink() bool { - return (bool)(C.ScintillaEdit_AdditionalCaretsBlink(this.h)) +func (this *ScintillaEdit) SetFoldMarginHiColour(useSetting bool, fore uintptr) { + C.ScintillaEdit_SetFoldMarginHiColour(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) SetAdditionalCaretsVisible(additionalCaretsVisible bool) { - C.ScintillaEdit_SetAdditionalCaretsVisible(this.h, (C.bool)(additionalCaretsVisible)) +func (this *ScintillaEdit) SetAccessibility(accessibility uintptr) { + C.ScintillaEdit_SetAccessibility(this.h, (C.intptr_t)(accessibility)) } -func (this *ScintillaEdit) AdditionalCaretsVisible() bool { - return (bool)(C.ScintillaEdit_AdditionalCaretsVisible(this.h)) +func (this *ScintillaEdit) Accessibility() uintptr { + return (uintptr)(C.ScintillaEdit_Accessibility(this.h)) } -func (this *ScintillaEdit) Selections() uintptr { - return (uintptr)(C.ScintillaEdit_Selections(this.h)) +func (this *ScintillaEdit) LineDown() { + C.ScintillaEdit_LineDown(this.h) } -func (this *ScintillaEdit) SelectionEmpty() bool { - return (bool)(C.ScintillaEdit_SelectionEmpty(this.h)) +func (this *ScintillaEdit) LineDownExtend() { + C.ScintillaEdit_LineDownExtend(this.h) } -func (this *ScintillaEdit) ClearSelections() { - C.ScintillaEdit_ClearSelections(this.h) +func (this *ScintillaEdit) LineUp() { + C.ScintillaEdit_LineUp(this.h) } -func (this *ScintillaEdit) SetSelection(caret uintptr, anchor uintptr) { - C.ScintillaEdit_SetSelection(this.h, (C.intptr_t)(caret), (C.intptr_t)(anchor)) +func (this *ScintillaEdit) LineUpExtend() { + C.ScintillaEdit_LineUpExtend(this.h) } -func (this *ScintillaEdit) AddSelection(caret uintptr, anchor uintptr) { - C.ScintillaEdit_AddSelection(this.h, (C.intptr_t)(caret), (C.intptr_t)(anchor)) +func (this *ScintillaEdit) CharLeft() { + C.ScintillaEdit_CharLeft(this.h) } -func (this *ScintillaEdit) SelectionFromPoint(x uintptr, y uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionFromPoint(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) +func (this *ScintillaEdit) CharLeftExtend() { + C.ScintillaEdit_CharLeftExtend(this.h) } -func (this *ScintillaEdit) DropSelectionN(selection uintptr) { - C.ScintillaEdit_DropSelectionN(this.h, (C.intptr_t)(selection)) +func (this *ScintillaEdit) CharRight() { + C.ScintillaEdit_CharRight(this.h) } -func (this *ScintillaEdit) SetMainSelection(selection uintptr) { - C.ScintillaEdit_SetMainSelection(this.h, (C.intptr_t)(selection)) +func (this *ScintillaEdit) CharRightExtend() { + C.ScintillaEdit_CharRightExtend(this.h) } -func (this *ScintillaEdit) MainSelection() uintptr { - return (uintptr)(C.ScintillaEdit_MainSelection(this.h)) +func (this *ScintillaEdit) WordLeft() { + C.ScintillaEdit_WordLeft(this.h) } -func (this *ScintillaEdit) SetSelectionNCaret(selection uintptr, caret uintptr) { - C.ScintillaEdit_SetSelectionNCaret(this.h, (C.intptr_t)(selection), (C.intptr_t)(caret)) +func (this *ScintillaEdit) WordLeftExtend() { + C.ScintillaEdit_WordLeftExtend(this.h) } -func (this *ScintillaEdit) SelectionNCaret(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNCaret(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) WordRight() { + C.ScintillaEdit_WordRight(this.h) } -func (this *ScintillaEdit) SetSelectionNAnchor(selection uintptr, anchor uintptr) { - C.ScintillaEdit_SetSelectionNAnchor(this.h, (C.intptr_t)(selection), (C.intptr_t)(anchor)) +func (this *ScintillaEdit) WordRightExtend() { + C.ScintillaEdit_WordRightExtend(this.h) } -func (this *ScintillaEdit) SelectionNAnchor(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNAnchor(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) Home() { + C.ScintillaEdit_Home(this.h) } -func (this *ScintillaEdit) SetSelectionNCaretVirtualSpace(selection uintptr, space uintptr) { - C.ScintillaEdit_SetSelectionNCaretVirtualSpace(this.h, (C.intptr_t)(selection), (C.intptr_t)(space)) +func (this *ScintillaEdit) HomeExtend() { + C.ScintillaEdit_HomeExtend(this.h) } -func (this *ScintillaEdit) SelectionNCaretVirtualSpace(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNCaretVirtualSpace(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) LineEnd() { + C.ScintillaEdit_LineEnd(this.h) } -func (this *ScintillaEdit) SetSelectionNAnchorVirtualSpace(selection uintptr, space uintptr) { - C.ScintillaEdit_SetSelectionNAnchorVirtualSpace(this.h, (C.intptr_t)(selection), (C.intptr_t)(space)) +func (this *ScintillaEdit) LineEndExtend() { + C.ScintillaEdit_LineEndExtend(this.h) } -func (this *ScintillaEdit) SelectionNAnchorVirtualSpace(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNAnchorVirtualSpace(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) DocumentStart() { + C.ScintillaEdit_DocumentStart(this.h) } -func (this *ScintillaEdit) SetSelectionNStart(selection uintptr, anchor uintptr) { - C.ScintillaEdit_SetSelectionNStart(this.h, (C.intptr_t)(selection), (C.intptr_t)(anchor)) +func (this *ScintillaEdit) DocumentStartExtend() { + C.ScintillaEdit_DocumentStartExtend(this.h) } -func (this *ScintillaEdit) SelectionNStart(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNStart(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) DocumentEnd() { + C.ScintillaEdit_DocumentEnd(this.h) } -func (this *ScintillaEdit) SelectionNStartVirtualSpace(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNStartVirtualSpace(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) DocumentEndExtend() { + C.ScintillaEdit_DocumentEndExtend(this.h) } -func (this *ScintillaEdit) SetSelectionNEnd(selection uintptr, caret uintptr) { - C.ScintillaEdit_SetSelectionNEnd(this.h, (C.intptr_t)(selection), (C.intptr_t)(caret)) +func (this *ScintillaEdit) PageUp() { + C.ScintillaEdit_PageUp(this.h) } -func (this *ScintillaEdit) SelectionNEndVirtualSpace(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNEndVirtualSpace(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) PageUpExtend() { + C.ScintillaEdit_PageUpExtend(this.h) } -func (this *ScintillaEdit) SelectionNEnd(selection uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SelectionNEnd(this.h, (C.intptr_t)(selection))) +func (this *ScintillaEdit) PageDown() { + C.ScintillaEdit_PageDown(this.h) } -func (this *ScintillaEdit) SetRectangularSelectionCaret(caret uintptr) { - C.ScintillaEdit_SetRectangularSelectionCaret(this.h, (C.intptr_t)(caret)) +func (this *ScintillaEdit) PageDownExtend() { + C.ScintillaEdit_PageDownExtend(this.h) } -func (this *ScintillaEdit) RectangularSelectionCaret() uintptr { - return (uintptr)(C.ScintillaEdit_RectangularSelectionCaret(this.h)) +func (this *ScintillaEdit) EditToggleOvertype() { + C.ScintillaEdit_EditToggleOvertype(this.h) } -func (this *ScintillaEdit) SetRectangularSelectionAnchor(anchor uintptr) { - C.ScintillaEdit_SetRectangularSelectionAnchor(this.h, (C.intptr_t)(anchor)) +func (this *ScintillaEdit) Cancel() { + C.ScintillaEdit_Cancel(this.h) } -func (this *ScintillaEdit) RectangularSelectionAnchor() uintptr { - return (uintptr)(C.ScintillaEdit_RectangularSelectionAnchor(this.h)) +func (this *ScintillaEdit) DeleteBack() { + C.ScintillaEdit_DeleteBack(this.h) } -func (this *ScintillaEdit) SetRectangularSelectionCaretVirtualSpace(space uintptr) { - C.ScintillaEdit_SetRectangularSelectionCaretVirtualSpace(this.h, (C.intptr_t)(space)) +func (this *ScintillaEdit) Tab() { + C.ScintillaEdit_Tab(this.h) } -func (this *ScintillaEdit) RectangularSelectionCaretVirtualSpace() uintptr { - return (uintptr)(C.ScintillaEdit_RectangularSelectionCaretVirtualSpace(this.h)) +func (this *ScintillaEdit) LineIndent() { + C.ScintillaEdit_LineIndent(this.h) } -func (this *ScintillaEdit) SetRectangularSelectionAnchorVirtualSpace(space uintptr) { - C.ScintillaEdit_SetRectangularSelectionAnchorVirtualSpace(this.h, (C.intptr_t)(space)) +func (this *ScintillaEdit) BackTab() { + C.ScintillaEdit_BackTab(this.h) } -func (this *ScintillaEdit) RectangularSelectionAnchorVirtualSpace() uintptr { - return (uintptr)(C.ScintillaEdit_RectangularSelectionAnchorVirtualSpace(this.h)) +func (this *ScintillaEdit) LineDedent() { + C.ScintillaEdit_LineDedent(this.h) } -func (this *ScintillaEdit) SetVirtualSpaceOptions(virtualSpaceOptions uintptr) { - C.ScintillaEdit_SetVirtualSpaceOptions(this.h, (C.intptr_t)(virtualSpaceOptions)) +func (this *ScintillaEdit) NewLine() { + C.ScintillaEdit_NewLine(this.h) } -func (this *ScintillaEdit) VirtualSpaceOptions() uintptr { - return (uintptr)(C.ScintillaEdit_VirtualSpaceOptions(this.h)) +func (this *ScintillaEdit) FormFeed() { + C.ScintillaEdit_FormFeed(this.h) } -func (this *ScintillaEdit) SetRectangularSelectionModifier(modifier uintptr) { - C.ScintillaEdit_SetRectangularSelectionModifier(this.h, (C.intptr_t)(modifier)) +func (this *ScintillaEdit) VCHome() { + C.ScintillaEdit_VCHome(this.h) } -func (this *ScintillaEdit) RectangularSelectionModifier() uintptr { - return (uintptr)(C.ScintillaEdit_RectangularSelectionModifier(this.h)) +func (this *ScintillaEdit) VCHomeExtend() { + C.ScintillaEdit_VCHomeExtend(this.h) } -func (this *ScintillaEdit) SetAdditionalSelFore(fore uintptr) { - C.ScintillaEdit_SetAdditionalSelFore(this.h, (C.intptr_t)(fore)) +func (this *ScintillaEdit) ZoomIn() { + C.ScintillaEdit_ZoomIn(this.h) } -func (this *ScintillaEdit) SetAdditionalSelBack(back uintptr) { - C.ScintillaEdit_SetAdditionalSelBack(this.h, (C.intptr_t)(back)) +func (this *ScintillaEdit) ZoomOut() { + C.ScintillaEdit_ZoomOut(this.h) } -func (this *ScintillaEdit) SetAdditionalSelAlpha(alpha uintptr) { - C.ScintillaEdit_SetAdditionalSelAlpha(this.h, (C.intptr_t)(alpha)) +func (this *ScintillaEdit) DelWordLeft() { + C.ScintillaEdit_DelWordLeft(this.h) } -func (this *ScintillaEdit) AdditionalSelAlpha() uintptr { - return (uintptr)(C.ScintillaEdit_AdditionalSelAlpha(this.h)) +func (this *ScintillaEdit) DelWordRight() { + C.ScintillaEdit_DelWordRight(this.h) } -func (this *ScintillaEdit) SetAdditionalCaretFore(fore uintptr) { - C.ScintillaEdit_SetAdditionalCaretFore(this.h, (C.intptr_t)(fore)) +func (this *ScintillaEdit) DelWordRightEnd() { + C.ScintillaEdit_DelWordRightEnd(this.h) } -func (this *ScintillaEdit) AdditionalCaretFore() uintptr { - return (uintptr)(C.ScintillaEdit_AdditionalCaretFore(this.h)) +func (this *ScintillaEdit) LineCut() { + C.ScintillaEdit_LineCut(this.h) } -func (this *ScintillaEdit) RotateSelection() { - C.ScintillaEdit_RotateSelection(this.h) +func (this *ScintillaEdit) LineDelete() { + C.ScintillaEdit_LineDelete(this.h) } -func (this *ScintillaEdit) SwapMainAnchorCaret() { - C.ScintillaEdit_SwapMainAnchorCaret(this.h) +func (this *ScintillaEdit) LineTranspose() { + C.ScintillaEdit_LineTranspose(this.h) } -func (this *ScintillaEdit) MultipleSelectAddNext() { - C.ScintillaEdit_MultipleSelectAddNext(this.h) +func (this *ScintillaEdit) LineReverse() { + C.ScintillaEdit_LineReverse(this.h) } -func (this *ScintillaEdit) MultipleSelectAddEach() { - C.ScintillaEdit_MultipleSelectAddEach(this.h) +func (this *ScintillaEdit) LineDuplicate() { + C.ScintillaEdit_LineDuplicate(this.h) } -func (this *ScintillaEdit) ChangeLexerState(start uintptr, end uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_ChangeLexerState(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) +func (this *ScintillaEdit) LowerCase() { + C.ScintillaEdit_LowerCase(this.h) } -func (this *ScintillaEdit) ContractedFoldNext(lineStart uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_ContractedFoldNext(this.h, (C.intptr_t)(lineStart))) +func (this *ScintillaEdit) UpperCase() { + C.ScintillaEdit_UpperCase(this.h) } -func (this *ScintillaEdit) VerticalCentreCaret() { - C.ScintillaEdit_VerticalCentreCaret(this.h) +func (this *ScintillaEdit) LineScrollDown() { + C.ScintillaEdit_LineScrollDown(this.h) } -func (this *ScintillaEdit) MoveSelectedLinesUp() { - C.ScintillaEdit_MoveSelectedLinesUp(this.h) +func (this *ScintillaEdit) LineScrollUp() { + C.ScintillaEdit_LineScrollUp(this.h) } -func (this *ScintillaEdit) MoveSelectedLinesDown() { - C.ScintillaEdit_MoveSelectedLinesDown(this.h) +func (this *ScintillaEdit) DeleteBackNotLine() { + C.ScintillaEdit_DeleteBackNotLine(this.h) } -func (this *ScintillaEdit) SetIdentifier(identifier uintptr) { - C.ScintillaEdit_SetIdentifier(this.h, (C.intptr_t)(identifier)) +func (this *ScintillaEdit) HomeDisplay() { + C.ScintillaEdit_HomeDisplay(this.h) } -func (this *ScintillaEdit) Identifier() uintptr { - return (uintptr)(C.ScintillaEdit_Identifier(this.h)) +func (this *ScintillaEdit) HomeDisplayExtend() { + C.ScintillaEdit_HomeDisplayExtend(this.h) } -func (this *ScintillaEdit) RGBAImageSetWidth(width uintptr) { - C.ScintillaEdit_RGBAImageSetWidth(this.h, (C.intptr_t)(width)) +func (this *ScintillaEdit) LineEndDisplay() { + C.ScintillaEdit_LineEndDisplay(this.h) } -func (this *ScintillaEdit) RGBAImageSetHeight(height uintptr) { - C.ScintillaEdit_RGBAImageSetHeight(this.h, (C.intptr_t)(height)) +func (this *ScintillaEdit) LineEndDisplayExtend() { + C.ScintillaEdit_LineEndDisplayExtend(this.h) } -func (this *ScintillaEdit) RGBAImageSetScale(scalePercent uintptr) { - C.ScintillaEdit_RGBAImageSetScale(this.h, (C.intptr_t)(scalePercent)) +func (this *ScintillaEdit) HomeWrap() { + C.ScintillaEdit_HomeWrap(this.h) } -func (this *ScintillaEdit) MarkerDefineRGBAImage(markerNumber uintptr, pixels string) { - pixels_Cstring := C.CString(pixels) - defer C.free(unsafe.Pointer(pixels_Cstring)) - C.ScintillaEdit_MarkerDefineRGBAImage(this.h, (C.intptr_t)(markerNumber), pixels_Cstring) +func (this *ScintillaEdit) HomeWrapExtend() { + C.ScintillaEdit_HomeWrapExtend(this.h) } -func (this *ScintillaEdit) RegisterRGBAImage(typeVal uintptr, pixels string) { - pixels_Cstring := C.CString(pixels) - defer C.free(unsafe.Pointer(pixels_Cstring)) - C.ScintillaEdit_RegisterRGBAImage(this.h, (C.intptr_t)(typeVal), pixels_Cstring) +func (this *ScintillaEdit) LineEndWrap() { + C.ScintillaEdit_LineEndWrap(this.h) } -func (this *ScintillaEdit) ScrollToStart() { - C.ScintillaEdit_ScrollToStart(this.h) +func (this *ScintillaEdit) LineEndWrapExtend() { + C.ScintillaEdit_LineEndWrapExtend(this.h) } -func (this *ScintillaEdit) ScrollToEnd() { - C.ScintillaEdit_ScrollToEnd(this.h) +func (this *ScintillaEdit) VCHomeWrap() { + C.ScintillaEdit_VCHomeWrap(this.h) } -func (this *ScintillaEdit) SetTechnology(technology uintptr) { - C.ScintillaEdit_SetTechnology(this.h, (C.intptr_t)(technology)) +func (this *ScintillaEdit) VCHomeWrapExtend() { + C.ScintillaEdit_VCHomeWrapExtend(this.h) } -func (this *ScintillaEdit) Technology() uintptr { - return (uintptr)(C.ScintillaEdit_Technology(this.h)) +func (this *ScintillaEdit) LineCopy() { + C.ScintillaEdit_LineCopy(this.h) } -func (this *ScintillaEdit) CreateLoader(bytes uintptr, documentOptions uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_CreateLoader(this.h, (C.intptr_t)(bytes), (C.intptr_t)(documentOptions))) +func (this *ScintillaEdit) MoveCaretInsideView() { + C.ScintillaEdit_MoveCaretInsideView(this.h) } -func (this *ScintillaEdit) FindIndicatorShow(start uintptr, end uintptr) { - C.ScintillaEdit_FindIndicatorShow(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +func (this *ScintillaEdit) LineLength(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineLength(this.h, (C.intptr_t)(line))) } -func (this *ScintillaEdit) FindIndicatorFlash(start uintptr, end uintptr) { - C.ScintillaEdit_FindIndicatorFlash(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +func (this *ScintillaEdit) BraceHighlight(posA uintptr, posB uintptr) { + C.ScintillaEdit_BraceHighlight(this.h, (C.intptr_t)(posA), (C.intptr_t)(posB)) } -func (this *ScintillaEdit) FindIndicatorHide() { - C.ScintillaEdit_FindIndicatorHide(this.h) +func (this *ScintillaEdit) BraceHighlightIndicator(useSetting bool, indicator uintptr) { + C.ScintillaEdit_BraceHighlightIndicator(this.h, (C.bool)(useSetting), (C.intptr_t)(indicator)) } -func (this *ScintillaEdit) VCHomeDisplay() { - C.ScintillaEdit_VCHomeDisplay(this.h) +func (this *ScintillaEdit) BraceBadLight(pos uintptr) { + C.ScintillaEdit_BraceBadLight(this.h, (C.intptr_t)(pos)) } -func (this *ScintillaEdit) VCHomeDisplayExtend() { - C.ScintillaEdit_VCHomeDisplayExtend(this.h) +func (this *ScintillaEdit) BraceBadLightIndicator(useSetting bool, indicator uintptr) { + C.ScintillaEdit_BraceBadLightIndicator(this.h, (C.bool)(useSetting), (C.intptr_t)(indicator)) } -func (this *ScintillaEdit) CaretLineVisibleAlways() bool { - return (bool)(C.ScintillaEdit_CaretLineVisibleAlways(this.h)) +func (this *ScintillaEdit) BraceMatch(pos uintptr, maxReStyle uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_BraceMatch(this.h, (C.intptr_t)(pos), (C.intptr_t)(maxReStyle))) } -func (this *ScintillaEdit) SetCaretLineVisibleAlways(alwaysVisible bool) { - C.ScintillaEdit_SetCaretLineVisibleAlways(this.h, (C.bool)(alwaysVisible)) +func (this *ScintillaEdit) BraceMatchNext(pos uintptr, startPos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_BraceMatchNext(this.h, (C.intptr_t)(pos), (C.intptr_t)(startPos))) } -func (this *ScintillaEdit) SetLineEndTypesAllowed(lineEndBitSet uintptr) { - C.ScintillaEdit_SetLineEndTypesAllowed(this.h, (C.intptr_t)(lineEndBitSet)) +func (this *ScintillaEdit) ViewEOL() bool { + return (bool)(C.ScintillaEdit_ViewEOL(this.h)) } -func (this *ScintillaEdit) LineEndTypesAllowed() uintptr { - return (uintptr)(C.ScintillaEdit_LineEndTypesAllowed(this.h)) +func (this *ScintillaEdit) SetViewEOL(visible bool) { + C.ScintillaEdit_SetViewEOL(this.h, (C.bool)(visible)) } -func (this *ScintillaEdit) LineEndTypesActive() uintptr { - return (uintptr)(C.ScintillaEdit_LineEndTypesActive(this.h)) +func (this *ScintillaEdit) DocPointer() uintptr { + return (uintptr)(C.ScintillaEdit_DocPointer(this.h)) } -func (this *ScintillaEdit) SetRepresentation(encodedCharacter string, representation string) { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - representation_Cstring := C.CString(representation) - defer C.free(unsafe.Pointer(representation_Cstring)) - C.ScintillaEdit_SetRepresentation(this.h, encodedCharacter_Cstring, representation_Cstring) +func (this *ScintillaEdit) SetDocPointer(doc uintptr) { + C.ScintillaEdit_SetDocPointer(this.h, (C.intptr_t)(doc)) } -func (this *ScintillaEdit) Representation(encodedCharacter string) []byte { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - var _bytearray C.struct_miqt_string = C.ScintillaEdit_Representation(this.h, encodedCharacter_Cstring) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetModEventMask(eventMask uintptr) { + C.ScintillaEdit_SetModEventMask(this.h, (C.intptr_t)(eventMask)) } -func (this *ScintillaEdit) ClearRepresentation(encodedCharacter string) { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - C.ScintillaEdit_ClearRepresentation(this.h, encodedCharacter_Cstring) +func (this *ScintillaEdit) EdgeColumn() uintptr { + return (uintptr)(C.ScintillaEdit_EdgeColumn(this.h)) } -func (this *ScintillaEdit) ClearAllRepresentations() { - C.ScintillaEdit_ClearAllRepresentations(this.h) +func (this *ScintillaEdit) SetEdgeColumn(column uintptr) { + C.ScintillaEdit_SetEdgeColumn(this.h, (C.intptr_t)(column)) } -func (this *ScintillaEdit) SetRepresentationAppearance(encodedCharacter string, appearance uintptr) { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - C.ScintillaEdit_SetRepresentationAppearance(this.h, encodedCharacter_Cstring, (C.intptr_t)(appearance)) +func (this *ScintillaEdit) EdgeMode() uintptr { + return (uintptr)(C.ScintillaEdit_EdgeMode(this.h)) } -func (this *ScintillaEdit) RepresentationAppearance(encodedCharacter string) uintptr { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - return (uintptr)(C.ScintillaEdit_RepresentationAppearance(this.h, encodedCharacter_Cstring)) +func (this *ScintillaEdit) SetEdgeMode(edgeMode uintptr) { + C.ScintillaEdit_SetEdgeMode(this.h, (C.intptr_t)(edgeMode)) } -func (this *ScintillaEdit) SetRepresentationColour(encodedCharacter string, colour uintptr) { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - C.ScintillaEdit_SetRepresentationColour(this.h, encodedCharacter_Cstring, (C.intptr_t)(colour)) +func (this *ScintillaEdit) EdgeColour() uintptr { + return (uintptr)(C.ScintillaEdit_EdgeColour(this.h)) } -func (this *ScintillaEdit) RepresentationColour(encodedCharacter string) uintptr { - encodedCharacter_Cstring := C.CString(encodedCharacter) - defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) - return (uintptr)(C.ScintillaEdit_RepresentationColour(this.h, encodedCharacter_Cstring)) +func (this *ScintillaEdit) SetEdgeColour(edgeColour uintptr) { + C.ScintillaEdit_SetEdgeColour(this.h, (C.intptr_t)(edgeColour)) } -func (this *ScintillaEdit) EOLAnnotationSetText(line uintptr, text string) { - text_Cstring := C.CString(text) - defer C.free(unsafe.Pointer(text_Cstring)) - C.ScintillaEdit_EOLAnnotationSetText(this.h, (C.intptr_t)(line), text_Cstring) +func (this *ScintillaEdit) MultiEdgeAddLine(column uintptr, edgeColour uintptr) { + C.ScintillaEdit_MultiEdgeAddLine(this.h, (C.intptr_t)(column), (C.intptr_t)(edgeColour)) } -func (this *ScintillaEdit) EOLAnnotationText(line uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_EOLAnnotationText(this.h, (C.intptr_t)(line)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) MultiEdgeClearAll() { + C.ScintillaEdit_MultiEdgeClearAll(this.h) } -func (this *ScintillaEdit) EOLAnnotationSetStyle(line uintptr, style uintptr) { - C.ScintillaEdit_EOLAnnotationSetStyle(this.h, (C.intptr_t)(line), (C.intptr_t)(style)) +func (this *ScintillaEdit) MultiEdgeColumn(which uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MultiEdgeColumn(this.h, (C.intptr_t)(which))) } -func (this *ScintillaEdit) EOLAnnotationStyle(line uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_EOLAnnotationStyle(this.h, (C.intptr_t)(line))) +func (this *ScintillaEdit) SearchAnchor() { + C.ScintillaEdit_SearchAnchor(this.h) } -func (this *ScintillaEdit) EOLAnnotationClearAll() { - C.ScintillaEdit_EOLAnnotationClearAll(this.h) +func (this *ScintillaEdit) SearchNext(searchFlags uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_SearchNext(this.h, (C.intptr_t)(searchFlags), text_Cstring)) } -func (this *ScintillaEdit) EOLAnnotationSetVisible(visible uintptr) { - C.ScintillaEdit_EOLAnnotationSetVisible(this.h, (C.intptr_t)(visible)) +func (this *ScintillaEdit) SearchPrev(searchFlags uintptr, text string) uintptr { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + return (uintptr)(C.ScintillaEdit_SearchPrev(this.h, (C.intptr_t)(searchFlags), text_Cstring)) } -func (this *ScintillaEdit) EOLAnnotationVisible() uintptr { - return (uintptr)(C.ScintillaEdit_EOLAnnotationVisible(this.h)) +func (this *ScintillaEdit) LinesOnScreen() uintptr { + return (uintptr)(C.ScintillaEdit_LinesOnScreen(this.h)) } -func (this *ScintillaEdit) EOLAnnotationSetStyleOffset(style uintptr) { - C.ScintillaEdit_EOLAnnotationSetStyleOffset(this.h, (C.intptr_t)(style)) +func (this *ScintillaEdit) UsePopUp(popUpMode uintptr) { + C.ScintillaEdit_UsePopUp(this.h, (C.intptr_t)(popUpMode)) } -func (this *ScintillaEdit) EOLAnnotationStyleOffset() uintptr { - return (uintptr)(C.ScintillaEdit_EOLAnnotationStyleOffset(this.h)) +func (this *ScintillaEdit) SelectionIsRectangle() bool { + return (bool)(C.ScintillaEdit_SelectionIsRectangle(this.h)) } -func (this *ScintillaEdit) SupportsFeature(feature uintptr) bool { - return (bool)(C.ScintillaEdit_SupportsFeature(this.h, (C.intptr_t)(feature))) +func (this *ScintillaEdit) SetZoom(zoomInPoints uintptr) { + C.ScintillaEdit_SetZoom(this.h, (C.intptr_t)(zoomInPoints)) } -func (this *ScintillaEdit) LineCharacterIndex() uintptr { - return (uintptr)(C.ScintillaEdit_LineCharacterIndex(this.h)) +func (this *ScintillaEdit) Zoom() uintptr { + return (uintptr)(C.ScintillaEdit_Zoom(this.h)) } -func (this *ScintillaEdit) AllocateLineCharacterIndex(lineCharacterIndex uintptr) { - C.ScintillaEdit_AllocateLineCharacterIndex(this.h, (C.intptr_t)(lineCharacterIndex)) +func (this *ScintillaEdit) CreateDocument(bytes uintptr, documentOptions uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CreateDocument(this.h, (C.intptr_t)(bytes), (C.intptr_t)(documentOptions))) } -func (this *ScintillaEdit) ReleaseLineCharacterIndex(lineCharacterIndex uintptr) { - C.ScintillaEdit_ReleaseLineCharacterIndex(this.h, (C.intptr_t)(lineCharacterIndex)) +func (this *ScintillaEdit) AddRefDocument(doc uintptr) { + C.ScintillaEdit_AddRefDocument(this.h, (C.intptr_t)(doc)) } -func (this *ScintillaEdit) LineFromIndexPosition(pos uintptr, lineCharacterIndex uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_LineFromIndexPosition(this.h, (C.intptr_t)(pos), (C.intptr_t)(lineCharacterIndex))) +func (this *ScintillaEdit) ReleaseDocument(doc uintptr) { + C.ScintillaEdit_ReleaseDocument(this.h, (C.intptr_t)(doc)) } -func (this *ScintillaEdit) IndexPositionFromLine(line uintptr, lineCharacterIndex uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_IndexPositionFromLine(this.h, (C.intptr_t)(line), (C.intptr_t)(lineCharacterIndex))) +func (this *ScintillaEdit) DocumentOptions() uintptr { + return (uintptr)(C.ScintillaEdit_DocumentOptions(this.h)) } -func (this *ScintillaEdit) StartRecord() { - C.ScintillaEdit_StartRecord(this.h) +func (this *ScintillaEdit) ModEventMask() uintptr { + return (uintptr)(C.ScintillaEdit_ModEventMask(this.h)) } -func (this *ScintillaEdit) StopRecord() { - C.ScintillaEdit_StopRecord(this.h) +func (this *ScintillaEdit) SetCommandEvents(commandEvents bool) { + C.ScintillaEdit_SetCommandEvents(this.h, (C.bool)(commandEvents)) } -func (this *ScintillaEdit) Lexer() uintptr { - return (uintptr)(C.ScintillaEdit_Lexer(this.h)) +func (this *ScintillaEdit) CommandEvents() bool { + return (bool)(C.ScintillaEdit_CommandEvents(this.h)) } -func (this *ScintillaEdit) Colourise(start uintptr, end uintptr) { - C.ScintillaEdit_Colourise(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +func (this *ScintillaEdit) SetFocus(focus bool) { + C.ScintillaEdit_SetFocus(this.h, (C.bool)(focus)) } -func (this *ScintillaEdit) SetProperty(key string, value string) { - key_Cstring := C.CString(key) - defer C.free(unsafe.Pointer(key_Cstring)) - value_Cstring := C.CString(value) - defer C.free(unsafe.Pointer(value_Cstring)) - C.ScintillaEdit_SetProperty(this.h, key_Cstring, value_Cstring) +func (this *ScintillaEdit) Focus() bool { + return (bool)(C.ScintillaEdit_Focus(this.h)) } -func (this *ScintillaEdit) SetKeyWords(keyWordSet uintptr, keyWords string) { - keyWords_Cstring := C.CString(keyWords) - defer C.free(unsafe.Pointer(keyWords_Cstring)) - C.ScintillaEdit_SetKeyWords(this.h, (C.intptr_t)(keyWordSet), keyWords_Cstring) +func (this *ScintillaEdit) SetStatus(status uintptr) { + C.ScintillaEdit_SetStatus(this.h, (C.intptr_t)(status)) } -func (this *ScintillaEdit) Property(key string) []byte { - key_Cstring := C.CString(key) - defer C.free(unsafe.Pointer(key_Cstring)) - var _bytearray C.struct_miqt_string = C.ScintillaEdit_Property(this.h, key_Cstring) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) Status() uintptr { + return (uintptr)(C.ScintillaEdit_Status(this.h)) } -func (this *ScintillaEdit) PropertyExpanded(key string) []byte { - key_Cstring := C.CString(key) - defer C.free(unsafe.Pointer(key_Cstring)) - var _bytearray C.struct_miqt_string = C.ScintillaEdit_PropertyExpanded(this.h, key_Cstring) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetMouseDownCaptures(captures bool) { + C.ScintillaEdit_SetMouseDownCaptures(this.h, (C.bool)(captures)) } -func (this *ScintillaEdit) PropertyInt(key string, defaultValue uintptr) uintptr { - key_Cstring := C.CString(key) - defer C.free(unsafe.Pointer(key_Cstring)) - return (uintptr)(C.ScintillaEdit_PropertyInt(this.h, key_Cstring, (C.intptr_t)(defaultValue))) +func (this *ScintillaEdit) MouseDownCaptures() bool { + return (bool)(C.ScintillaEdit_MouseDownCaptures(this.h)) } -func (this *ScintillaEdit) LexerLanguage() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_LexerLanguage(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetMouseWheelCaptures(captures bool) { + C.ScintillaEdit_SetMouseWheelCaptures(this.h, (C.bool)(captures)) } -func (this *ScintillaEdit) PrivateLexerCall(operation uintptr, pointer uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PrivateLexerCall(this.h, (C.intptr_t)(operation), (C.intptr_t)(pointer))) +func (this *ScintillaEdit) MouseWheelCaptures() bool { + return (bool)(C.ScintillaEdit_MouseWheelCaptures(this.h)) } -func (this *ScintillaEdit) PropertyNames() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_PropertyNames(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetCursor(cursorType uintptr) { + C.ScintillaEdit_SetCursor(this.h, (C.intptr_t)(cursorType)) } -func (this *ScintillaEdit) PropertyType(name string) uintptr { - name_Cstring := C.CString(name) - defer C.free(unsafe.Pointer(name_Cstring)) - return (uintptr)(C.ScintillaEdit_PropertyType(this.h, name_Cstring)) +func (this *ScintillaEdit) Cursor() uintptr { + return (uintptr)(C.ScintillaEdit_Cursor(this.h)) } -func (this *ScintillaEdit) DescribeProperty(name string) []byte { - name_Cstring := C.CString(name) - defer C.free(unsafe.Pointer(name_Cstring)) - var _bytearray C.struct_miqt_string = C.ScintillaEdit_DescribeProperty(this.h, name_Cstring) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetControlCharSymbol(symbol uintptr) { + C.ScintillaEdit_SetControlCharSymbol(this.h, (C.intptr_t)(symbol)) } -func (this *ScintillaEdit) DescribeKeyWordSets() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_DescribeKeyWordSets(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) ControlCharSymbol() uintptr { + return (uintptr)(C.ScintillaEdit_ControlCharSymbol(this.h)) } -func (this *ScintillaEdit) LineEndTypesSupported() uintptr { - return (uintptr)(C.ScintillaEdit_LineEndTypesSupported(this.h)) +func (this *ScintillaEdit) WordPartLeft() { + C.ScintillaEdit_WordPartLeft(this.h) } -func (this *ScintillaEdit) AllocateSubStyles(styleBase uintptr, numberStyles uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_AllocateSubStyles(this.h, (C.intptr_t)(styleBase), (C.intptr_t)(numberStyles))) +func (this *ScintillaEdit) WordPartLeftExtend() { + C.ScintillaEdit_WordPartLeftExtend(this.h) } -func (this *ScintillaEdit) SubStylesStart(styleBase uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SubStylesStart(this.h, (C.intptr_t)(styleBase))) +func (this *ScintillaEdit) WordPartRight() { + C.ScintillaEdit_WordPartRight(this.h) } -func (this *ScintillaEdit) SubStylesLength(styleBase uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_SubStylesLength(this.h, (C.intptr_t)(styleBase))) +func (this *ScintillaEdit) WordPartRightExtend() { + C.ScintillaEdit_WordPartRightExtend(this.h) } -func (this *ScintillaEdit) StyleFromSubStyle(subStyle uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_StyleFromSubStyle(this.h, (C.intptr_t)(subStyle))) +func (this *ScintillaEdit) SetVisiblePolicy(visiblePolicy uintptr, visibleSlop uintptr) { + C.ScintillaEdit_SetVisiblePolicy(this.h, (C.intptr_t)(visiblePolicy), (C.intptr_t)(visibleSlop)) } -func (this *ScintillaEdit) PrimaryStyleFromStyle(style uintptr) uintptr { - return (uintptr)(C.ScintillaEdit_PrimaryStyleFromStyle(this.h, (C.intptr_t)(style))) +func (this *ScintillaEdit) DelLineLeft() { + C.ScintillaEdit_DelLineLeft(this.h) } -func (this *ScintillaEdit) FreeSubStyles() { - C.ScintillaEdit_FreeSubStyles(this.h) +func (this *ScintillaEdit) DelLineRight() { + C.ScintillaEdit_DelLineRight(this.h) } -func (this *ScintillaEdit) SetIdentifiers(style uintptr, identifiers string) { - identifiers_Cstring := C.CString(identifiers) - defer C.free(unsafe.Pointer(identifiers_Cstring)) - C.ScintillaEdit_SetIdentifiers(this.h, (C.intptr_t)(style), identifiers_Cstring) +func (this *ScintillaEdit) SetXOffset(xOffset uintptr) { + C.ScintillaEdit_SetXOffset(this.h, (C.intptr_t)(xOffset)) } -func (this *ScintillaEdit) DistanceToSecondaryStyles() uintptr { - return (uintptr)(C.ScintillaEdit_DistanceToSecondaryStyles(this.h)) +func (this *ScintillaEdit) XOffset() uintptr { + return (uintptr)(C.ScintillaEdit_XOffset(this.h)) } -func (this *ScintillaEdit) SubStyleBases() []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_SubStyleBases(this.h) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) ChooseCaretX() { + C.ScintillaEdit_ChooseCaretX(this.h) } -func (this *ScintillaEdit) NamedStyles() uintptr { - return (uintptr)(C.ScintillaEdit_NamedStyles(this.h)) +func (this *ScintillaEdit) GrabFocus() { + C.ScintillaEdit_GrabFocus(this.h) } -func (this *ScintillaEdit) NameOfStyle(style uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_NameOfStyle(this.h, (C.intptr_t)(style)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetXCaretPolicy(caretPolicy uintptr, caretSlop uintptr) { + C.ScintillaEdit_SetXCaretPolicy(this.h, (C.intptr_t)(caretPolicy), (C.intptr_t)(caretSlop)) } -func (this *ScintillaEdit) TagsOfStyle(style uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_TagsOfStyle(this.h, (C.intptr_t)(style)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetYCaretPolicy(caretPolicy uintptr, caretSlop uintptr) { + C.ScintillaEdit_SetYCaretPolicy(this.h, (C.intptr_t)(caretPolicy), (C.intptr_t)(caretSlop)) } -func (this *ScintillaEdit) DescriptionOfStyle(style uintptr) []byte { - var _bytearray C.struct_miqt_string = C.ScintillaEdit_DescriptionOfStyle(this.h, (C.intptr_t)(style)) - _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) - C.free(unsafe.Pointer(_bytearray.data)) - return _ret +func (this *ScintillaEdit) SetPrintWrapMode(wrapMode uintptr) { + C.ScintillaEdit_SetPrintWrapMode(this.h, (C.intptr_t)(wrapMode)) } -func (this *ScintillaEdit) SetILexer(ilexer uintptr) { - C.ScintillaEdit_SetILexer(this.h, (C.intptr_t)(ilexer)) +func (this *ScintillaEdit) PrintWrapMode() uintptr { + return (uintptr)(C.ScintillaEdit_PrintWrapMode(this.h)) } -func (this *ScintillaEdit) Bidirectional() uintptr { - return (uintptr)(C.ScintillaEdit_Bidirectional(this.h)) +func (this *ScintillaEdit) SetHotspotActiveFore(useSetting bool, fore uintptr) { + C.ScintillaEdit_SetHotspotActiveFore(this.h, (C.bool)(useSetting), (C.intptr_t)(fore)) } -func (this *ScintillaEdit) SetBidirectional(bidirectional uintptr) { - C.ScintillaEdit_SetBidirectional(this.h, (C.intptr_t)(bidirectional)) +func (this *ScintillaEdit) HotspotActiveFore() uintptr { + return (uintptr)(C.ScintillaEdit_HotspotActiveFore(this.h)) } -func ScintillaEdit_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaEdit_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *ScintillaEdit) SetHotspotActiveBack(useSetting bool, back uintptr) { + C.ScintillaEdit_SetHotspotActiveBack(this.h, (C.bool)(useSetting), (C.intptr_t)(back)) } -func ScintillaEdit_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *ScintillaEdit) HotspotActiveBack() uintptr { + return (uintptr)(C.ScintillaEdit_HotspotActiveBack(this.h)) } -func ScintillaEdit_TrUtf82(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaEdit_TrUtf82(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *ScintillaEdit) SetHotspotActiveUnderline(underline bool) { + C.ScintillaEdit_SetHotspotActiveUnderline(this.h, (C.bool)(underline)) } -func ScintillaEdit_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.ScintillaEdit_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *ScintillaEdit) HotspotActiveUnderline() bool { + return (bool)(C.ScintillaEdit_HotspotActiveUnderline(this.h)) +} + +func (this *ScintillaEdit) SetHotspotSingleLine(singleLine bool) { + C.ScintillaEdit_SetHotspotSingleLine(this.h, (C.bool)(singleLine)) +} + +func (this *ScintillaEdit) HotspotSingleLine() bool { + return (bool)(C.ScintillaEdit_HotspotSingleLine(this.h)) +} + +func (this *ScintillaEdit) ParaDown() { + C.ScintillaEdit_ParaDown(this.h) +} + +func (this *ScintillaEdit) ParaDownExtend() { + C.ScintillaEdit_ParaDownExtend(this.h) +} + +func (this *ScintillaEdit) ParaUp() { + C.ScintillaEdit_ParaUp(this.h) +} + +func (this *ScintillaEdit) ParaUpExtend() { + C.ScintillaEdit_ParaUpExtend(this.h) +} + +func (this *ScintillaEdit) PositionBefore(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionBefore(this.h, (C.intptr_t)(pos))) +} + +func (this *ScintillaEdit) PositionAfter(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionAfter(this.h, (C.intptr_t)(pos))) +} + +func (this *ScintillaEdit) PositionRelative(pos uintptr, relative uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionRelative(this.h, (C.intptr_t)(pos), (C.intptr_t)(relative))) +} + +func (this *ScintillaEdit) PositionRelativeCodeUnits(pos uintptr, relative uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PositionRelativeCodeUnits(this.h, (C.intptr_t)(pos), (C.intptr_t)(relative))) +} + +func (this *ScintillaEdit) CopyRange(start uintptr, end uintptr) { + C.ScintillaEdit_CopyRange(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +} + +func (this *ScintillaEdit) CopyText(length uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_CopyText(this.h, (C.intptr_t)(length), text_Cstring) +} + +func (this *ScintillaEdit) SetSelectionMode(selectionMode uintptr) { + C.ScintillaEdit_SetSelectionMode(this.h, (C.intptr_t)(selectionMode)) +} + +func (this *ScintillaEdit) ChangeSelectionMode(selectionMode uintptr) { + C.ScintillaEdit_ChangeSelectionMode(this.h, (C.intptr_t)(selectionMode)) +} + +func (this *ScintillaEdit) SelectionMode() uintptr { + return (uintptr)(C.ScintillaEdit_SelectionMode(this.h)) +} + +func (this *ScintillaEdit) SetMoveExtendsSelection(moveExtendsSelection bool) { + C.ScintillaEdit_SetMoveExtendsSelection(this.h, (C.bool)(moveExtendsSelection)) +} + +func (this *ScintillaEdit) MoveExtendsSelection() bool { + return (bool)(C.ScintillaEdit_MoveExtendsSelection(this.h)) +} + +func (this *ScintillaEdit) GetLineSelStartPosition(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_GetLineSelStartPosition(this.h, (C.intptr_t)(line))) +} + +func (this *ScintillaEdit) GetLineSelEndPosition(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_GetLineSelEndPosition(this.h, (C.intptr_t)(line))) +} + +func (this *ScintillaEdit) LineDownRectExtend() { + C.ScintillaEdit_LineDownRectExtend(this.h) +} + +func (this *ScintillaEdit) LineUpRectExtend() { + C.ScintillaEdit_LineUpRectExtend(this.h) +} + +func (this *ScintillaEdit) CharLeftRectExtend() { + C.ScintillaEdit_CharLeftRectExtend(this.h) +} + +func (this *ScintillaEdit) CharRightRectExtend() { + C.ScintillaEdit_CharRightRectExtend(this.h) +} + +func (this *ScintillaEdit) HomeRectExtend() { + C.ScintillaEdit_HomeRectExtend(this.h) +} + +func (this *ScintillaEdit) VCHomeRectExtend() { + C.ScintillaEdit_VCHomeRectExtend(this.h) +} + +func (this *ScintillaEdit) LineEndRectExtend() { + C.ScintillaEdit_LineEndRectExtend(this.h) +} + +func (this *ScintillaEdit) PageUpRectExtend() { + C.ScintillaEdit_PageUpRectExtend(this.h) +} + +func (this *ScintillaEdit) PageDownRectExtend() { + C.ScintillaEdit_PageDownRectExtend(this.h) +} + +func (this *ScintillaEdit) StutteredPageUp() { + C.ScintillaEdit_StutteredPageUp(this.h) +} + +func (this *ScintillaEdit) StutteredPageUpExtend() { + C.ScintillaEdit_StutteredPageUpExtend(this.h) +} + +func (this *ScintillaEdit) StutteredPageDown() { + C.ScintillaEdit_StutteredPageDown(this.h) +} + +func (this *ScintillaEdit) StutteredPageDownExtend() { + C.ScintillaEdit_StutteredPageDownExtend(this.h) +} + +func (this *ScintillaEdit) WordLeftEnd() { + C.ScintillaEdit_WordLeftEnd(this.h) +} + +func (this *ScintillaEdit) WordLeftEndExtend() { + C.ScintillaEdit_WordLeftEndExtend(this.h) +} + +func (this *ScintillaEdit) WordRightEnd() { + C.ScintillaEdit_WordRightEnd(this.h) +} + +func (this *ScintillaEdit) WordRightEndExtend() { + C.ScintillaEdit_WordRightEndExtend(this.h) +} + +func (this *ScintillaEdit) SetWhitespaceChars(characters string) { + characters_Cstring := C.CString(characters) + defer C.free(unsafe.Pointer(characters_Cstring)) + C.ScintillaEdit_SetWhitespaceChars(this.h, characters_Cstring) +} + +func (this *ScintillaEdit) WhitespaceChars() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_WhitespaceChars(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) SetPunctuationChars(characters string) { + characters_Cstring := C.CString(characters) + defer C.free(unsafe.Pointer(characters_Cstring)) + C.ScintillaEdit_SetPunctuationChars(this.h, characters_Cstring) +} + +func (this *ScintillaEdit) PunctuationChars() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_PunctuationChars(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) SetCharsDefault() { + C.ScintillaEdit_SetCharsDefault(this.h) +} + +func (this *ScintillaEdit) AutoCCurrent() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCCurrent(this.h)) +} + +func (this *ScintillaEdit) AutoCCurrentText() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_AutoCCurrentText(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) AutoCSetCaseInsensitiveBehaviour(behaviour uintptr) { + C.ScintillaEdit_AutoCSetCaseInsensitiveBehaviour(this.h, (C.intptr_t)(behaviour)) +} + +func (this *ScintillaEdit) AutoCCaseInsensitiveBehaviour() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCCaseInsensitiveBehaviour(this.h)) +} + +func (this *ScintillaEdit) AutoCSetMulti(multi uintptr) { + C.ScintillaEdit_AutoCSetMulti(this.h, (C.intptr_t)(multi)) +} + +func (this *ScintillaEdit) AutoCMulti() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCMulti(this.h)) +} + +func (this *ScintillaEdit) AutoCSetOrder(order uintptr) { + C.ScintillaEdit_AutoCSetOrder(this.h, (C.intptr_t)(order)) +} + +func (this *ScintillaEdit) AutoCOrder() uintptr { + return (uintptr)(C.ScintillaEdit_AutoCOrder(this.h)) +} + +func (this *ScintillaEdit) Allocate(bytes uintptr) { + C.ScintillaEdit_Allocate(this.h, (C.intptr_t)(bytes)) +} + +func (this *ScintillaEdit) TargetAsUTF8() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_TargetAsUTF8(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) SetLengthForEncode(bytes uintptr) { + C.ScintillaEdit_SetLengthForEncode(this.h, (C.intptr_t)(bytes)) +} + +func (this *ScintillaEdit) EncodedFromUTF8(utf8 string) []byte { + utf8_Cstring := C.CString(utf8) + defer C.free(unsafe.Pointer(utf8_Cstring)) + var _bytearray C.struct_miqt_string = C.ScintillaEdit_EncodedFromUTF8(this.h, utf8_Cstring) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) FindColumn(line uintptr, column uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_FindColumn(this.h, (C.intptr_t)(line), (C.intptr_t)(column))) +} + +func (this *ScintillaEdit) CaretSticky() uintptr { + return (uintptr)(C.ScintillaEdit_CaretSticky(this.h)) +} + +func (this *ScintillaEdit) SetCaretSticky(useCaretStickyBehaviour uintptr) { + C.ScintillaEdit_SetCaretSticky(this.h, (C.intptr_t)(useCaretStickyBehaviour)) +} + +func (this *ScintillaEdit) ToggleCaretSticky() { + C.ScintillaEdit_ToggleCaretSticky(this.h) +} + +func (this *ScintillaEdit) SetPasteConvertEndings(convert bool) { + C.ScintillaEdit_SetPasteConvertEndings(this.h, (C.bool)(convert)) +} + +func (this *ScintillaEdit) PasteConvertEndings() bool { + return (bool)(C.ScintillaEdit_PasteConvertEndings(this.h)) +} + +func (this *ScintillaEdit) ReplaceRectangular(length uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_ReplaceRectangular(this.h, (C.intptr_t)(length), text_Cstring) +} + +func (this *ScintillaEdit) SelectionDuplicate() { + C.ScintillaEdit_SelectionDuplicate(this.h) +} + +func (this *ScintillaEdit) SetCaretLineBackAlpha(alpha uintptr) { + C.ScintillaEdit_SetCaretLineBackAlpha(this.h, (C.intptr_t)(alpha)) +} + +func (this *ScintillaEdit) CaretLineBackAlpha() uintptr { + return (uintptr)(C.ScintillaEdit_CaretLineBackAlpha(this.h)) +} + +func (this *ScintillaEdit) SetCaretStyle(caretStyle uintptr) { + C.ScintillaEdit_SetCaretStyle(this.h, (C.intptr_t)(caretStyle)) +} + +func (this *ScintillaEdit) CaretStyle() uintptr { + return (uintptr)(C.ScintillaEdit_CaretStyle(this.h)) +} + +func (this *ScintillaEdit) SetIndicatorCurrent(indicator uintptr) { + C.ScintillaEdit_SetIndicatorCurrent(this.h, (C.intptr_t)(indicator)) +} + +func (this *ScintillaEdit) IndicatorCurrent() uintptr { + return (uintptr)(C.ScintillaEdit_IndicatorCurrent(this.h)) +} + +func (this *ScintillaEdit) SetIndicatorValue(value uintptr) { + C.ScintillaEdit_SetIndicatorValue(this.h, (C.intptr_t)(value)) +} + +func (this *ScintillaEdit) IndicatorValue() uintptr { + return (uintptr)(C.ScintillaEdit_IndicatorValue(this.h)) +} + +func (this *ScintillaEdit) IndicatorFillRange(start uintptr, lengthFill uintptr) { + C.ScintillaEdit_IndicatorFillRange(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthFill)) +} + +func (this *ScintillaEdit) IndicatorClearRange(start uintptr, lengthClear uintptr) { + C.ScintillaEdit_IndicatorClearRange(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthClear)) +} + +func (this *ScintillaEdit) IndicatorAllOnFor(pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicatorAllOnFor(this.h, (C.intptr_t)(pos))) +} + +func (this *ScintillaEdit) IndicatorValueAt(indicator uintptr, pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicatorValueAt(this.h, (C.intptr_t)(indicator), (C.intptr_t)(pos))) +} + +func (this *ScintillaEdit) IndicatorStart(indicator uintptr, pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicatorStart(this.h, (C.intptr_t)(indicator), (C.intptr_t)(pos))) +} + +func (this *ScintillaEdit) IndicatorEnd(indicator uintptr, pos uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicatorEnd(this.h, (C.intptr_t)(indicator), (C.intptr_t)(pos))) +} + +func (this *ScintillaEdit) SetPositionCache(size uintptr) { + C.ScintillaEdit_SetPositionCache(this.h, (C.intptr_t)(size)) +} + +func (this *ScintillaEdit) PositionCache() uintptr { + return (uintptr)(C.ScintillaEdit_PositionCache(this.h)) +} + +func (this *ScintillaEdit) SetLayoutThreads(threads uintptr) { + C.ScintillaEdit_SetLayoutThreads(this.h, (C.intptr_t)(threads)) +} + +func (this *ScintillaEdit) LayoutThreads() uintptr { + return (uintptr)(C.ScintillaEdit_LayoutThreads(this.h)) +} + +func (this *ScintillaEdit) CopyAllowLine() { + C.ScintillaEdit_CopyAllowLine(this.h) +} + +func (this *ScintillaEdit) CutAllowLine() { + C.ScintillaEdit_CutAllowLine(this.h) +} + +func (this *ScintillaEdit) SetCopySeparator(separator string) { + separator_Cstring := C.CString(separator) + defer C.free(unsafe.Pointer(separator_Cstring)) + C.ScintillaEdit_SetCopySeparator(this.h, separator_Cstring) +} + +func (this *ScintillaEdit) CopySeparator() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_CopySeparator(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) CharacterPointer() uintptr { + return (uintptr)(C.ScintillaEdit_CharacterPointer(this.h)) +} + +func (this *ScintillaEdit) RangePointer(start uintptr, lengthRange uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_RangePointer(this.h, (C.intptr_t)(start), (C.intptr_t)(lengthRange))) +} + +func (this *ScintillaEdit) GapPosition() uintptr { + return (uintptr)(C.ScintillaEdit_GapPosition(this.h)) +} + +func (this *ScintillaEdit) IndicSetAlpha(indicator uintptr, alpha uintptr) { + C.ScintillaEdit_IndicSetAlpha(this.h, (C.intptr_t)(indicator), (C.intptr_t)(alpha)) +} + +func (this *ScintillaEdit) IndicAlpha(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicAlpha(this.h, (C.intptr_t)(indicator))) +} + +func (this *ScintillaEdit) IndicSetOutlineAlpha(indicator uintptr, alpha uintptr) { + C.ScintillaEdit_IndicSetOutlineAlpha(this.h, (C.intptr_t)(indicator), (C.intptr_t)(alpha)) +} + +func (this *ScintillaEdit) IndicOutlineAlpha(indicator uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndicOutlineAlpha(this.h, (C.intptr_t)(indicator))) +} + +func (this *ScintillaEdit) SetExtraAscent(extraAscent uintptr) { + C.ScintillaEdit_SetExtraAscent(this.h, (C.intptr_t)(extraAscent)) +} + +func (this *ScintillaEdit) ExtraAscent() uintptr { + return (uintptr)(C.ScintillaEdit_ExtraAscent(this.h)) +} + +func (this *ScintillaEdit) SetExtraDescent(extraDescent uintptr) { + C.ScintillaEdit_SetExtraDescent(this.h, (C.intptr_t)(extraDescent)) +} + +func (this *ScintillaEdit) ExtraDescent() uintptr { + return (uintptr)(C.ScintillaEdit_ExtraDescent(this.h)) +} + +func (this *ScintillaEdit) MarkerSymbolDefined(markerNumber uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarkerSymbolDefined(this.h, (C.intptr_t)(markerNumber))) +} + +func (this *ScintillaEdit) MarginSetText(line uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_MarginSetText(this.h, (C.intptr_t)(line), text_Cstring) +} + +func (this *ScintillaEdit) MarginText(line uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_MarginText(this.h, (C.intptr_t)(line)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) MarginSetStyle(line uintptr, style uintptr) { + C.ScintillaEdit_MarginSetStyle(this.h, (C.intptr_t)(line), (C.intptr_t)(style)) +} + +func (this *ScintillaEdit) MarginStyle(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_MarginStyle(this.h, (C.intptr_t)(line))) +} + +func (this *ScintillaEdit) MarginSetStyles(line uintptr, styles string) { + styles_Cstring := C.CString(styles) + defer C.free(unsafe.Pointer(styles_Cstring)) + C.ScintillaEdit_MarginSetStyles(this.h, (C.intptr_t)(line), styles_Cstring) +} + +func (this *ScintillaEdit) MarginStyles(line uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_MarginStyles(this.h, (C.intptr_t)(line)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) MarginTextClearAll() { + C.ScintillaEdit_MarginTextClearAll(this.h) +} + +func (this *ScintillaEdit) MarginSetStyleOffset(style uintptr) { + C.ScintillaEdit_MarginSetStyleOffset(this.h, (C.intptr_t)(style)) +} + +func (this *ScintillaEdit) MarginStyleOffset() uintptr { + return (uintptr)(C.ScintillaEdit_MarginStyleOffset(this.h)) +} + +func (this *ScintillaEdit) SetMarginOptions(marginOptions uintptr) { + C.ScintillaEdit_SetMarginOptions(this.h, (C.intptr_t)(marginOptions)) +} + +func (this *ScintillaEdit) MarginOptions() uintptr { + return (uintptr)(C.ScintillaEdit_MarginOptions(this.h)) +} + +func (this *ScintillaEdit) AnnotationSetText(line uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_AnnotationSetText(this.h, (C.intptr_t)(line), text_Cstring) +} + +func (this *ScintillaEdit) AnnotationText(line uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_AnnotationText(this.h, (C.intptr_t)(line)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) AnnotationSetStyle(line uintptr, style uintptr) { + C.ScintillaEdit_AnnotationSetStyle(this.h, (C.intptr_t)(line), (C.intptr_t)(style)) +} + +func (this *ScintillaEdit) AnnotationStyle(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_AnnotationStyle(this.h, (C.intptr_t)(line))) +} + +func (this *ScintillaEdit) AnnotationSetStyles(line uintptr, styles string) { + styles_Cstring := C.CString(styles) + defer C.free(unsafe.Pointer(styles_Cstring)) + C.ScintillaEdit_AnnotationSetStyles(this.h, (C.intptr_t)(line), styles_Cstring) +} + +func (this *ScintillaEdit) AnnotationStyles(line uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_AnnotationStyles(this.h, (C.intptr_t)(line)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) AnnotationLines(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_AnnotationLines(this.h, (C.intptr_t)(line))) +} + +func (this *ScintillaEdit) AnnotationClearAll() { + C.ScintillaEdit_AnnotationClearAll(this.h) +} + +func (this *ScintillaEdit) AnnotationSetVisible(visible uintptr) { + C.ScintillaEdit_AnnotationSetVisible(this.h, (C.intptr_t)(visible)) +} + +func (this *ScintillaEdit) AnnotationVisible() uintptr { + return (uintptr)(C.ScintillaEdit_AnnotationVisible(this.h)) +} + +func (this *ScintillaEdit) AnnotationSetStyleOffset(style uintptr) { + C.ScintillaEdit_AnnotationSetStyleOffset(this.h, (C.intptr_t)(style)) +} + +func (this *ScintillaEdit) AnnotationStyleOffset() uintptr { + return (uintptr)(C.ScintillaEdit_AnnotationStyleOffset(this.h)) +} + +func (this *ScintillaEdit) ReleaseAllExtendedStyles() { + C.ScintillaEdit_ReleaseAllExtendedStyles(this.h) +} + +func (this *ScintillaEdit) AllocateExtendedStyles(numberStyles uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_AllocateExtendedStyles(this.h, (C.intptr_t)(numberStyles))) +} + +func (this *ScintillaEdit) AddUndoAction(token uintptr, flags uintptr) { + C.ScintillaEdit_AddUndoAction(this.h, (C.intptr_t)(token), (C.intptr_t)(flags)) +} + +func (this *ScintillaEdit) CharPositionFromPoint(x uintptr, y uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CharPositionFromPoint(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) +} + +func (this *ScintillaEdit) CharPositionFromPointClose(x uintptr, y uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CharPositionFromPointClose(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) +} + +func (this *ScintillaEdit) SetMouseSelectionRectangularSwitch(mouseSelectionRectangularSwitch bool) { + C.ScintillaEdit_SetMouseSelectionRectangularSwitch(this.h, (C.bool)(mouseSelectionRectangularSwitch)) +} + +func (this *ScintillaEdit) MouseSelectionRectangularSwitch() bool { + return (bool)(C.ScintillaEdit_MouseSelectionRectangularSwitch(this.h)) +} + +func (this *ScintillaEdit) SetMultipleSelection(multipleSelection bool) { + C.ScintillaEdit_SetMultipleSelection(this.h, (C.bool)(multipleSelection)) +} + +func (this *ScintillaEdit) MultipleSelection() bool { + return (bool)(C.ScintillaEdit_MultipleSelection(this.h)) +} + +func (this *ScintillaEdit) SetAdditionalSelectionTyping(additionalSelectionTyping bool) { + C.ScintillaEdit_SetAdditionalSelectionTyping(this.h, (C.bool)(additionalSelectionTyping)) +} + +func (this *ScintillaEdit) AdditionalSelectionTyping() bool { + return (bool)(C.ScintillaEdit_AdditionalSelectionTyping(this.h)) +} + +func (this *ScintillaEdit) SetAdditionalCaretsBlink(additionalCaretsBlink bool) { + C.ScintillaEdit_SetAdditionalCaretsBlink(this.h, (C.bool)(additionalCaretsBlink)) +} + +func (this *ScintillaEdit) AdditionalCaretsBlink() bool { + return (bool)(C.ScintillaEdit_AdditionalCaretsBlink(this.h)) +} + +func (this *ScintillaEdit) SetAdditionalCaretsVisible(additionalCaretsVisible bool) { + C.ScintillaEdit_SetAdditionalCaretsVisible(this.h, (C.bool)(additionalCaretsVisible)) +} + +func (this *ScintillaEdit) AdditionalCaretsVisible() bool { + return (bool)(C.ScintillaEdit_AdditionalCaretsVisible(this.h)) +} + +func (this *ScintillaEdit) Selections() uintptr { + return (uintptr)(C.ScintillaEdit_Selections(this.h)) +} + +func (this *ScintillaEdit) SelectionEmpty() bool { + return (bool)(C.ScintillaEdit_SelectionEmpty(this.h)) +} + +func (this *ScintillaEdit) ClearSelections() { + C.ScintillaEdit_ClearSelections(this.h) +} + +func (this *ScintillaEdit) SetSelection(caret uintptr, anchor uintptr) { + C.ScintillaEdit_SetSelection(this.h, (C.intptr_t)(caret), (C.intptr_t)(anchor)) +} + +func (this *ScintillaEdit) AddSelection(caret uintptr, anchor uintptr) { + C.ScintillaEdit_AddSelection(this.h, (C.intptr_t)(caret), (C.intptr_t)(anchor)) +} + +func (this *ScintillaEdit) SelectionFromPoint(x uintptr, y uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionFromPoint(this.h, (C.intptr_t)(x), (C.intptr_t)(y))) +} + +func (this *ScintillaEdit) DropSelectionN(selection uintptr) { + C.ScintillaEdit_DropSelectionN(this.h, (C.intptr_t)(selection)) +} + +func (this *ScintillaEdit) SetMainSelection(selection uintptr) { + C.ScintillaEdit_SetMainSelection(this.h, (C.intptr_t)(selection)) +} + +func (this *ScintillaEdit) MainSelection() uintptr { + return (uintptr)(C.ScintillaEdit_MainSelection(this.h)) +} + +func (this *ScintillaEdit) SetSelectionNCaret(selection uintptr, caret uintptr) { + C.ScintillaEdit_SetSelectionNCaret(this.h, (C.intptr_t)(selection), (C.intptr_t)(caret)) +} + +func (this *ScintillaEdit) SelectionNCaret(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNCaret(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SetSelectionNAnchor(selection uintptr, anchor uintptr) { + C.ScintillaEdit_SetSelectionNAnchor(this.h, (C.intptr_t)(selection), (C.intptr_t)(anchor)) +} + +func (this *ScintillaEdit) SelectionNAnchor(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNAnchor(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SetSelectionNCaretVirtualSpace(selection uintptr, space uintptr) { + C.ScintillaEdit_SetSelectionNCaretVirtualSpace(this.h, (C.intptr_t)(selection), (C.intptr_t)(space)) +} + +func (this *ScintillaEdit) SelectionNCaretVirtualSpace(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNCaretVirtualSpace(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SetSelectionNAnchorVirtualSpace(selection uintptr, space uintptr) { + C.ScintillaEdit_SetSelectionNAnchorVirtualSpace(this.h, (C.intptr_t)(selection), (C.intptr_t)(space)) +} + +func (this *ScintillaEdit) SelectionNAnchorVirtualSpace(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNAnchorVirtualSpace(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SetSelectionNStart(selection uintptr, anchor uintptr) { + C.ScintillaEdit_SetSelectionNStart(this.h, (C.intptr_t)(selection), (C.intptr_t)(anchor)) +} + +func (this *ScintillaEdit) SelectionNStart(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNStart(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SelectionNStartVirtualSpace(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNStartVirtualSpace(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SetSelectionNEnd(selection uintptr, caret uintptr) { + C.ScintillaEdit_SetSelectionNEnd(this.h, (C.intptr_t)(selection), (C.intptr_t)(caret)) +} + +func (this *ScintillaEdit) SelectionNEndVirtualSpace(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNEndVirtualSpace(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SelectionNEnd(selection uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SelectionNEnd(this.h, (C.intptr_t)(selection))) +} + +func (this *ScintillaEdit) SetRectangularSelectionCaret(caret uintptr) { + C.ScintillaEdit_SetRectangularSelectionCaret(this.h, (C.intptr_t)(caret)) +} + +func (this *ScintillaEdit) RectangularSelectionCaret() uintptr { + return (uintptr)(C.ScintillaEdit_RectangularSelectionCaret(this.h)) +} + +func (this *ScintillaEdit) SetRectangularSelectionAnchor(anchor uintptr) { + C.ScintillaEdit_SetRectangularSelectionAnchor(this.h, (C.intptr_t)(anchor)) +} + +func (this *ScintillaEdit) RectangularSelectionAnchor() uintptr { + return (uintptr)(C.ScintillaEdit_RectangularSelectionAnchor(this.h)) +} + +func (this *ScintillaEdit) SetRectangularSelectionCaretVirtualSpace(space uintptr) { + C.ScintillaEdit_SetRectangularSelectionCaretVirtualSpace(this.h, (C.intptr_t)(space)) +} + +func (this *ScintillaEdit) RectangularSelectionCaretVirtualSpace() uintptr { + return (uintptr)(C.ScintillaEdit_RectangularSelectionCaretVirtualSpace(this.h)) +} + +func (this *ScintillaEdit) SetRectangularSelectionAnchorVirtualSpace(space uintptr) { + C.ScintillaEdit_SetRectangularSelectionAnchorVirtualSpace(this.h, (C.intptr_t)(space)) +} + +func (this *ScintillaEdit) RectangularSelectionAnchorVirtualSpace() uintptr { + return (uintptr)(C.ScintillaEdit_RectangularSelectionAnchorVirtualSpace(this.h)) +} + +func (this *ScintillaEdit) SetVirtualSpaceOptions(virtualSpaceOptions uintptr) { + C.ScintillaEdit_SetVirtualSpaceOptions(this.h, (C.intptr_t)(virtualSpaceOptions)) +} + +func (this *ScintillaEdit) VirtualSpaceOptions() uintptr { + return (uintptr)(C.ScintillaEdit_VirtualSpaceOptions(this.h)) +} + +func (this *ScintillaEdit) SetRectangularSelectionModifier(modifier uintptr) { + C.ScintillaEdit_SetRectangularSelectionModifier(this.h, (C.intptr_t)(modifier)) +} + +func (this *ScintillaEdit) RectangularSelectionModifier() uintptr { + return (uintptr)(C.ScintillaEdit_RectangularSelectionModifier(this.h)) +} + +func (this *ScintillaEdit) SetAdditionalSelFore(fore uintptr) { + C.ScintillaEdit_SetAdditionalSelFore(this.h, (C.intptr_t)(fore)) +} + +func (this *ScintillaEdit) SetAdditionalSelBack(back uintptr) { + C.ScintillaEdit_SetAdditionalSelBack(this.h, (C.intptr_t)(back)) +} + +func (this *ScintillaEdit) SetAdditionalSelAlpha(alpha uintptr) { + C.ScintillaEdit_SetAdditionalSelAlpha(this.h, (C.intptr_t)(alpha)) +} + +func (this *ScintillaEdit) AdditionalSelAlpha() uintptr { + return (uintptr)(C.ScintillaEdit_AdditionalSelAlpha(this.h)) +} + +func (this *ScintillaEdit) SetAdditionalCaretFore(fore uintptr) { + C.ScintillaEdit_SetAdditionalCaretFore(this.h, (C.intptr_t)(fore)) +} + +func (this *ScintillaEdit) AdditionalCaretFore() uintptr { + return (uintptr)(C.ScintillaEdit_AdditionalCaretFore(this.h)) +} + +func (this *ScintillaEdit) RotateSelection() { + C.ScintillaEdit_RotateSelection(this.h) +} + +func (this *ScintillaEdit) SwapMainAnchorCaret() { + C.ScintillaEdit_SwapMainAnchorCaret(this.h) +} + +func (this *ScintillaEdit) MultipleSelectAddNext() { + C.ScintillaEdit_MultipleSelectAddNext(this.h) +} + +func (this *ScintillaEdit) MultipleSelectAddEach() { + C.ScintillaEdit_MultipleSelectAddEach(this.h) +} + +func (this *ScintillaEdit) ChangeLexerState(start uintptr, end uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_ChangeLexerState(this.h, (C.intptr_t)(start), (C.intptr_t)(end))) +} + +func (this *ScintillaEdit) ContractedFoldNext(lineStart uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_ContractedFoldNext(this.h, (C.intptr_t)(lineStart))) +} + +func (this *ScintillaEdit) VerticalCentreCaret() { + C.ScintillaEdit_VerticalCentreCaret(this.h) +} + +func (this *ScintillaEdit) MoveSelectedLinesUp() { + C.ScintillaEdit_MoveSelectedLinesUp(this.h) +} + +func (this *ScintillaEdit) MoveSelectedLinesDown() { + C.ScintillaEdit_MoveSelectedLinesDown(this.h) +} + +func (this *ScintillaEdit) SetIdentifier(identifier uintptr) { + C.ScintillaEdit_SetIdentifier(this.h, (C.intptr_t)(identifier)) +} + +func (this *ScintillaEdit) Identifier() uintptr { + return (uintptr)(C.ScintillaEdit_Identifier(this.h)) +} + +func (this *ScintillaEdit) RGBAImageSetWidth(width uintptr) { + C.ScintillaEdit_RGBAImageSetWidth(this.h, (C.intptr_t)(width)) +} + +func (this *ScintillaEdit) RGBAImageSetHeight(height uintptr) { + C.ScintillaEdit_RGBAImageSetHeight(this.h, (C.intptr_t)(height)) +} + +func (this *ScintillaEdit) RGBAImageSetScale(scalePercent uintptr) { + C.ScintillaEdit_RGBAImageSetScale(this.h, (C.intptr_t)(scalePercent)) +} + +func (this *ScintillaEdit) MarkerDefineRGBAImage(markerNumber uintptr, pixels string) { + pixels_Cstring := C.CString(pixels) + defer C.free(unsafe.Pointer(pixels_Cstring)) + C.ScintillaEdit_MarkerDefineRGBAImage(this.h, (C.intptr_t)(markerNumber), pixels_Cstring) +} + +func (this *ScintillaEdit) RegisterRGBAImage(typeVal uintptr, pixels string) { + pixels_Cstring := C.CString(pixels) + defer C.free(unsafe.Pointer(pixels_Cstring)) + C.ScintillaEdit_RegisterRGBAImage(this.h, (C.intptr_t)(typeVal), pixels_Cstring) +} + +func (this *ScintillaEdit) ScrollToStart() { + C.ScintillaEdit_ScrollToStart(this.h) +} + +func (this *ScintillaEdit) ScrollToEnd() { + C.ScintillaEdit_ScrollToEnd(this.h) +} + +func (this *ScintillaEdit) SetTechnology(technology uintptr) { + C.ScintillaEdit_SetTechnology(this.h, (C.intptr_t)(technology)) +} + +func (this *ScintillaEdit) Technology() uintptr { + return (uintptr)(C.ScintillaEdit_Technology(this.h)) +} + +func (this *ScintillaEdit) CreateLoader(bytes uintptr, documentOptions uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_CreateLoader(this.h, (C.intptr_t)(bytes), (C.intptr_t)(documentOptions))) +} + +func (this *ScintillaEdit) FindIndicatorShow(start uintptr, end uintptr) { + C.ScintillaEdit_FindIndicatorShow(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +} + +func (this *ScintillaEdit) FindIndicatorFlash(start uintptr, end uintptr) { + C.ScintillaEdit_FindIndicatorFlash(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +} + +func (this *ScintillaEdit) FindIndicatorHide() { + C.ScintillaEdit_FindIndicatorHide(this.h) +} + +func (this *ScintillaEdit) VCHomeDisplay() { + C.ScintillaEdit_VCHomeDisplay(this.h) +} + +func (this *ScintillaEdit) VCHomeDisplayExtend() { + C.ScintillaEdit_VCHomeDisplayExtend(this.h) +} + +func (this *ScintillaEdit) CaretLineVisibleAlways() bool { + return (bool)(C.ScintillaEdit_CaretLineVisibleAlways(this.h)) +} + +func (this *ScintillaEdit) SetCaretLineVisibleAlways(alwaysVisible bool) { + C.ScintillaEdit_SetCaretLineVisibleAlways(this.h, (C.bool)(alwaysVisible)) +} + +func (this *ScintillaEdit) SetLineEndTypesAllowed(lineEndBitSet uintptr) { + C.ScintillaEdit_SetLineEndTypesAllowed(this.h, (C.intptr_t)(lineEndBitSet)) +} + +func (this *ScintillaEdit) LineEndTypesAllowed() uintptr { + return (uintptr)(C.ScintillaEdit_LineEndTypesAllowed(this.h)) +} + +func (this *ScintillaEdit) LineEndTypesActive() uintptr { + return (uintptr)(C.ScintillaEdit_LineEndTypesActive(this.h)) +} + +func (this *ScintillaEdit) SetRepresentation(encodedCharacter string, representation string) { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + representation_Cstring := C.CString(representation) + defer C.free(unsafe.Pointer(representation_Cstring)) + C.ScintillaEdit_SetRepresentation(this.h, encodedCharacter_Cstring, representation_Cstring) +} + +func (this *ScintillaEdit) Representation(encodedCharacter string) []byte { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + var _bytearray C.struct_miqt_string = C.ScintillaEdit_Representation(this.h, encodedCharacter_Cstring) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) ClearRepresentation(encodedCharacter string) { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + C.ScintillaEdit_ClearRepresentation(this.h, encodedCharacter_Cstring) +} + +func (this *ScintillaEdit) ClearAllRepresentations() { + C.ScintillaEdit_ClearAllRepresentations(this.h) +} + +func (this *ScintillaEdit) SetRepresentationAppearance(encodedCharacter string, appearance uintptr) { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + C.ScintillaEdit_SetRepresentationAppearance(this.h, encodedCharacter_Cstring, (C.intptr_t)(appearance)) +} + +func (this *ScintillaEdit) RepresentationAppearance(encodedCharacter string) uintptr { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + return (uintptr)(C.ScintillaEdit_RepresentationAppearance(this.h, encodedCharacter_Cstring)) +} + +func (this *ScintillaEdit) SetRepresentationColour(encodedCharacter string, colour uintptr) { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + C.ScintillaEdit_SetRepresentationColour(this.h, encodedCharacter_Cstring, (C.intptr_t)(colour)) +} + +func (this *ScintillaEdit) RepresentationColour(encodedCharacter string) uintptr { + encodedCharacter_Cstring := C.CString(encodedCharacter) + defer C.free(unsafe.Pointer(encodedCharacter_Cstring)) + return (uintptr)(C.ScintillaEdit_RepresentationColour(this.h, encodedCharacter_Cstring)) +} + +func (this *ScintillaEdit) EOLAnnotationSetText(line uintptr, text string) { + text_Cstring := C.CString(text) + defer C.free(unsafe.Pointer(text_Cstring)) + C.ScintillaEdit_EOLAnnotationSetText(this.h, (C.intptr_t)(line), text_Cstring) +} + +func (this *ScintillaEdit) EOLAnnotationText(line uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_EOLAnnotationText(this.h, (C.intptr_t)(line)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) EOLAnnotationSetStyle(line uintptr, style uintptr) { + C.ScintillaEdit_EOLAnnotationSetStyle(this.h, (C.intptr_t)(line), (C.intptr_t)(style)) +} + +func (this *ScintillaEdit) EOLAnnotationStyle(line uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_EOLAnnotationStyle(this.h, (C.intptr_t)(line))) +} + +func (this *ScintillaEdit) EOLAnnotationClearAll() { + C.ScintillaEdit_EOLAnnotationClearAll(this.h) +} + +func (this *ScintillaEdit) EOLAnnotationSetVisible(visible uintptr) { + C.ScintillaEdit_EOLAnnotationSetVisible(this.h, (C.intptr_t)(visible)) +} + +func (this *ScintillaEdit) EOLAnnotationVisible() uintptr { + return (uintptr)(C.ScintillaEdit_EOLAnnotationVisible(this.h)) +} + +func (this *ScintillaEdit) EOLAnnotationSetStyleOffset(style uintptr) { + C.ScintillaEdit_EOLAnnotationSetStyleOffset(this.h, (C.intptr_t)(style)) +} + +func (this *ScintillaEdit) EOLAnnotationStyleOffset() uintptr { + return (uintptr)(C.ScintillaEdit_EOLAnnotationStyleOffset(this.h)) +} + +func (this *ScintillaEdit) SupportsFeature(feature uintptr) bool { + return (bool)(C.ScintillaEdit_SupportsFeature(this.h, (C.intptr_t)(feature))) +} + +func (this *ScintillaEdit) LineCharacterIndex() uintptr { + return (uintptr)(C.ScintillaEdit_LineCharacterIndex(this.h)) +} + +func (this *ScintillaEdit) AllocateLineCharacterIndex(lineCharacterIndex uintptr) { + C.ScintillaEdit_AllocateLineCharacterIndex(this.h, (C.intptr_t)(lineCharacterIndex)) +} + +func (this *ScintillaEdit) ReleaseLineCharacterIndex(lineCharacterIndex uintptr) { + C.ScintillaEdit_ReleaseLineCharacterIndex(this.h, (C.intptr_t)(lineCharacterIndex)) +} + +func (this *ScintillaEdit) LineFromIndexPosition(pos uintptr, lineCharacterIndex uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_LineFromIndexPosition(this.h, (C.intptr_t)(pos), (C.intptr_t)(lineCharacterIndex))) +} + +func (this *ScintillaEdit) IndexPositionFromLine(line uintptr, lineCharacterIndex uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_IndexPositionFromLine(this.h, (C.intptr_t)(line), (C.intptr_t)(lineCharacterIndex))) +} + +func (this *ScintillaEdit) StartRecord() { + C.ScintillaEdit_StartRecord(this.h) +} + +func (this *ScintillaEdit) StopRecord() { + C.ScintillaEdit_StopRecord(this.h) +} + +func (this *ScintillaEdit) Lexer() uintptr { + return (uintptr)(C.ScintillaEdit_Lexer(this.h)) +} + +func (this *ScintillaEdit) Colourise(start uintptr, end uintptr) { + C.ScintillaEdit_Colourise(this.h, (C.intptr_t)(start), (C.intptr_t)(end)) +} + +func (this *ScintillaEdit) SetProperty(key string, value string) { + key_Cstring := C.CString(key) + defer C.free(unsafe.Pointer(key_Cstring)) + value_Cstring := C.CString(value) + defer C.free(unsafe.Pointer(value_Cstring)) + C.ScintillaEdit_SetProperty(this.h, key_Cstring, value_Cstring) +} + +func (this *ScintillaEdit) SetKeyWords(keyWordSet uintptr, keyWords string) { + keyWords_Cstring := C.CString(keyWords) + defer C.free(unsafe.Pointer(keyWords_Cstring)) + C.ScintillaEdit_SetKeyWords(this.h, (C.intptr_t)(keyWordSet), keyWords_Cstring) +} + +func (this *ScintillaEdit) Property(key string) []byte { + key_Cstring := C.CString(key) + defer C.free(unsafe.Pointer(key_Cstring)) + var _bytearray C.struct_miqt_string = C.ScintillaEdit_Property(this.h, key_Cstring) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) PropertyExpanded(key string) []byte { + key_Cstring := C.CString(key) + defer C.free(unsafe.Pointer(key_Cstring)) + var _bytearray C.struct_miqt_string = C.ScintillaEdit_PropertyExpanded(this.h, key_Cstring) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) PropertyInt(key string, defaultValue uintptr) uintptr { + key_Cstring := C.CString(key) + defer C.free(unsafe.Pointer(key_Cstring)) + return (uintptr)(C.ScintillaEdit_PropertyInt(this.h, key_Cstring, (C.intptr_t)(defaultValue))) +} + +func (this *ScintillaEdit) LexerLanguage() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_LexerLanguage(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) PrivateLexerCall(operation uintptr, pointer uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PrivateLexerCall(this.h, (C.intptr_t)(operation), (C.intptr_t)(pointer))) +} + +func (this *ScintillaEdit) PropertyNames() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_PropertyNames(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) PropertyType(name string) uintptr { + name_Cstring := C.CString(name) + defer C.free(unsafe.Pointer(name_Cstring)) + return (uintptr)(C.ScintillaEdit_PropertyType(this.h, name_Cstring)) +} + +func (this *ScintillaEdit) DescribeProperty(name string) []byte { + name_Cstring := C.CString(name) + defer C.free(unsafe.Pointer(name_Cstring)) + var _bytearray C.struct_miqt_string = C.ScintillaEdit_DescribeProperty(this.h, name_Cstring) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) DescribeKeyWordSets() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_DescribeKeyWordSets(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) LineEndTypesSupported() uintptr { + return (uintptr)(C.ScintillaEdit_LineEndTypesSupported(this.h)) +} + +func (this *ScintillaEdit) AllocateSubStyles(styleBase uintptr, numberStyles uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_AllocateSubStyles(this.h, (C.intptr_t)(styleBase), (C.intptr_t)(numberStyles))) +} + +func (this *ScintillaEdit) SubStylesStart(styleBase uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SubStylesStart(this.h, (C.intptr_t)(styleBase))) +} + +func (this *ScintillaEdit) SubStylesLength(styleBase uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_SubStylesLength(this.h, (C.intptr_t)(styleBase))) +} + +func (this *ScintillaEdit) StyleFromSubStyle(subStyle uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_StyleFromSubStyle(this.h, (C.intptr_t)(subStyle))) +} + +func (this *ScintillaEdit) PrimaryStyleFromStyle(style uintptr) uintptr { + return (uintptr)(C.ScintillaEdit_PrimaryStyleFromStyle(this.h, (C.intptr_t)(style))) +} + +func (this *ScintillaEdit) FreeSubStyles() { + C.ScintillaEdit_FreeSubStyles(this.h) +} + +func (this *ScintillaEdit) SetIdentifiers(style uintptr, identifiers string) { + identifiers_Cstring := C.CString(identifiers) + defer C.free(unsafe.Pointer(identifiers_Cstring)) + C.ScintillaEdit_SetIdentifiers(this.h, (C.intptr_t)(style), identifiers_Cstring) +} + +func (this *ScintillaEdit) DistanceToSecondaryStyles() uintptr { + return (uintptr)(C.ScintillaEdit_DistanceToSecondaryStyles(this.h)) +} + +func (this *ScintillaEdit) SubStyleBases() []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_SubStyleBases(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) NamedStyles() uintptr { + return (uintptr)(C.ScintillaEdit_NamedStyles(this.h)) +} + +func (this *ScintillaEdit) NameOfStyle(style uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_NameOfStyle(this.h, (C.intptr_t)(style)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) TagsOfStyle(style uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_TagsOfStyle(this.h, (C.intptr_t)(style)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) DescriptionOfStyle(style uintptr) []byte { + var _bytearray C.struct_miqt_string = C.ScintillaEdit_DescriptionOfStyle(this.h, (C.intptr_t)(style)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *ScintillaEdit) SetILexer(ilexer uintptr) { + C.ScintillaEdit_SetILexer(this.h, (C.intptr_t)(ilexer)) +} + +func (this *ScintillaEdit) Bidirectional() uintptr { + return (uintptr)(C.ScintillaEdit_Bidirectional(this.h)) +} + +func (this *ScintillaEdit) SetBidirectional(bidirectional uintptr) { + C.ScintillaEdit_SetBidirectional(this.h, (C.intptr_t)(bidirectional)) +} + +func ScintillaEdit_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaEdit_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func ScintillaEdit_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func ScintillaEdit_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaEdit_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func ScintillaEdit_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.ScintillaEdit_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *ScintillaEdit) callVirtualBase_Send(iMessage uint, wParam uintptr, lParam uintptr) uintptr { + + return (uintptr)(C.ScintillaEdit_virtualbase_Send(unsafe.Pointer(this.h), (C.uint)(iMessage), (C.uintptr_t)(wParam), (C.intptr_t)(lParam))) + +} +func (this *ScintillaEdit) OnSend(slot func(super func(iMessage uint, wParam uintptr, lParam uintptr) uintptr, iMessage uint, wParam uintptr, lParam uintptr) uintptr) { + C.ScintillaEdit_override_virtual_Send(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_Send +func miqt_exec_callback_ScintillaEdit_Send(self *C.ScintillaEdit, cb C.intptr_t, iMessage C.uint, wParam C.uintptr_t, lParam C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iMessage uint, wParam uintptr, lParam uintptr) uintptr, iMessage uint, wParam uintptr, lParam uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint)(iMessage) + + slotval2 := (uintptr)(wParam) + + slotval3 := (uintptr)(lParam) + + virtualReturn := gofunc((&ScintillaEdit{h: self}).callVirtualBase_Send, slotval1, slotval2, slotval3) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *ScintillaEdit) callVirtualBase_Sends(iMessage uint, wParam uintptr, s string) uintptr { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + + return (uintptr)(C.ScintillaEdit_virtualbase_Sends(unsafe.Pointer(this.h), (C.uint)(iMessage), (C.uintptr_t)(wParam), s_Cstring)) + +} +func (this *ScintillaEdit) OnSends(slot func(super func(iMessage uint, wParam uintptr, s string) uintptr, iMessage uint, wParam uintptr, s string) uintptr) { + C.ScintillaEdit_override_virtual_Sends(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_Sends +func miqt_exec_callback_ScintillaEdit_Sends(self *C.ScintillaEdit, cb C.intptr_t, iMessage C.uint, wParam C.uintptr_t, s *C.const_char) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iMessage uint, wParam uintptr, s string) uintptr, iMessage uint, wParam uintptr, s string) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint)(iMessage) + + slotval2 := (uintptr)(wParam) + + s_ret := s + slotval3 := C.GoString(s_ret) + + virtualReturn := gofunc((&ScintillaEdit{h: self}).callVirtualBase_Sends, slotval1, slotval2, slotval3) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *ScintillaEdit) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.ScintillaEdit_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *ScintillaEdit) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.ScintillaEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_Event +func miqt_exec_callback_ScintillaEdit_Event(self *C.ScintillaEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&ScintillaEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *ScintillaEdit) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.ScintillaEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.ScintillaEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_PaintEvent +func miqt_exec_callback_ScintillaEdit_PaintEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { + + C.ScintillaEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.ScintillaEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_WheelEvent +func miqt_exec_callback_ScintillaEdit_WheelEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.ScintillaEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.ScintillaEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_FocusInEvent +func miqt_exec_callback_ScintillaEdit_FocusInEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.ScintillaEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.ScintillaEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_FocusOutEvent +func miqt_exec_callback_ScintillaEdit_FocusOutEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.ScintillaEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.ScintillaEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_ResizeEvent +func miqt_exec_callback_ScintillaEdit_ResizeEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.ScintillaEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.ScintillaEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_KeyPressEvent +func miqt_exec_callback_ScintillaEdit_KeyPressEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.ScintillaEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_MousePressEvent +func miqt_exec_callback_ScintillaEdit_MousePressEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { + + C.ScintillaEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_MouseReleaseEvent +func miqt_exec_callback_ScintillaEdit_MouseReleaseEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.ScintillaEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_MouseDoubleClickEvent +func miqt_exec_callback_ScintillaEdit_MouseDoubleClickEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { + + C.ScintillaEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.ScintillaEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_MouseMoveEvent +func miqt_exec_callback_ScintillaEdit_MouseMoveEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_ContextMenuEvent(event *qt.QContextMenuEvent) { + + C.ScintillaEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnContextMenuEvent(slot func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) { + C.ScintillaEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_ContextMenuEvent +func miqt_exec_callback_ScintillaEdit_ContextMenuEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_DragEnterEvent(event *qt.QDragEnterEvent) { + + C.ScintillaEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnDragEnterEvent(slot func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) { + C.ScintillaEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_DragEnterEvent +func miqt_exec_callback_ScintillaEdit_DragEnterEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_DragLeaveEvent(event *qt.QDragLeaveEvent) { + + C.ScintillaEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnDragLeaveEvent(slot func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) { + C.ScintillaEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_DragLeaveEvent +func miqt_exec_callback_ScintillaEdit_DragLeaveEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_DragMoveEvent(event *qt.QDragMoveEvent) { + + C.ScintillaEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnDragMoveEvent(slot func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) { + C.ScintillaEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_DragMoveEvent +func miqt_exec_callback_ScintillaEdit_DragMoveEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_DropEvent(event *qt.QDropEvent) { + + C.ScintillaEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnDropEvent(slot func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) { + C.ScintillaEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_DropEvent +func miqt_exec_callback_ScintillaEdit_DropEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_InputMethodEvent(event *qt.QInputMethodEvent) { + + C.ScintillaEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(event.UnsafePointer())) + +} +func (this *ScintillaEdit) OnInputMethodEvent(slot func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) { + C.ScintillaEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_InputMethodEvent +func miqt_exec_callback_ScintillaEdit_InputMethodEvent(self *C.ScintillaEdit, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *ScintillaEdit) callVirtualBase_InputMethodQuery(query qt.InputMethodQuery) *qt.QVariant { + + _ret := C.ScintillaEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *ScintillaEdit) OnInputMethodQuery(slot func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) { + C.ScintillaEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_InputMethodQuery +func miqt_exec_callback_ScintillaEdit_InputMethodQuery(self *C.ScintillaEdit, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(query) + + virtualReturn := gofunc((&ScintillaEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *ScintillaEdit) callVirtualBase_ScrollContentsBy(param1 int, param2 int) { + + C.ScintillaEdit_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(param1), (C.int)(param2)) + +} +func (this *ScintillaEdit) OnScrollContentsBy(slot func(super func(param1 int, param2 int), param1 int, param2 int)) { + C.ScintillaEdit_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_ScintillaEdit_ScrollContentsBy +func miqt_exec_callback_ScintillaEdit_ScrollContentsBy(self *C.ScintillaEdit, cb C.intptr_t, param1 C.int, param2 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int, param2 int), param1 int, param2 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + slotval2 := (int)(param2) + + gofunc((&ScintillaEdit{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + } // Delete this object from C++ memory. func (this *ScintillaEdit) Delete() { - C.ScintillaEdit_Delete(this.h) + C.ScintillaEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.h b/qt-extras/scintillaedit/gen_ScintillaEdit.h index cfc2ee01..eae5a115 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.h +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.h @@ -15,14 +15,32 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QByteArray; +class QChildEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; class QKeyEvent; +class QMetaMethod; class QMetaObject; class QMimeData; class QMouseEvent; class QObject; class QPaintDevice; +class QPaintEvent; class QRect; +class QResizeEvent; +class QSize; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; class SCNotification; class Sci_CharacterRange; @@ -194,14 +212,32 @@ class ScintillaDocument; class ScintillaEdit; class ScintillaEditBase; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QMouseEvent QMouseEvent; typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct SCNotification SCNotification; typedef struct Sci_CharacterRange Sci_CharacterRange; @@ -250,30 +286,30 @@ typedef struct ScintillaEdit ScintillaEdit; typedef struct ScintillaEditBase ScintillaEditBase; #endif -Scintilla__Internal__Point* Scintilla__Internal__Point_new(); -Scintilla__Internal__Point* Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1); -Scintilla__Internal__Point* Scintilla__Internal__Point_new3(double x_); -Scintilla__Internal__Point* Scintilla__Internal__Point_new4(double x_, double y_); +void Scintilla__Internal__Point_new(Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); +void Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); +void Scintilla__Internal__Point_new3(double x_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); +void Scintilla__Internal__Point_new4(double x_, double y_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); Scintilla__Internal__Point* Scintilla__Internal__Point_FromInts(int x_, int y_); bool Scintilla__Internal__Point_OperatorEqual(const Scintilla__Internal__Point* self, Scintilla__Internal__Point* other); bool Scintilla__Internal__Point_OperatorNotEqual(const Scintilla__Internal__Point* self, Scintilla__Internal__Point* other); Scintilla__Internal__Point* Scintilla__Internal__Point_OperatorPlus(const Scintilla__Internal__Point* self, Scintilla__Internal__Point* other); Scintilla__Internal__Point* Scintilla__Internal__Point_OperatorMinus(const Scintilla__Internal__Point* self, Scintilla__Internal__Point* other); -void Scintilla__Internal__Point_Delete(Scintilla__Internal__Point* self); +void Scintilla__Internal__Point_Delete(Scintilla__Internal__Point* self, bool isSubclass); bool Scintilla__Internal__Interval_OperatorEqual(const Scintilla__Internal__Interval* self, Scintilla__Internal__Interval* other); double Scintilla__Internal__Interval_Width(const Scintilla__Internal__Interval* self); bool Scintilla__Internal__Interval_Empty(const Scintilla__Internal__Interval* self); bool Scintilla__Internal__Interval_Intersects(const Scintilla__Internal__Interval* self, Scintilla__Internal__Interval* other); Scintilla__Internal__Interval* Scintilla__Internal__Interval_Offset(const Scintilla__Internal__Interval* self, double offset); -void Scintilla__Internal__Interval_Delete(Scintilla__Internal__Interval* self); +void Scintilla__Internal__Interval_Delete(Scintilla__Internal__Interval* self, bool isSubclass); -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new(); -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1); -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new3(double left_); -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new4(double left_, double top_); -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_); -Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_); +void Scintilla__Internal__PRectangle_new(Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); +void Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); +void Scintilla__Internal__PRectangle_new3(double left_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); +void Scintilla__Internal__PRectangle_new4(double left_, double top_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); +void Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); +void Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_FromInts(int left_, int top_, int right_, int bottom_); bool Scintilla__Internal__PRectangle_OperatorEqual(const Scintilla__Internal__PRectangle* self, Scintilla__Internal__PRectangle* rc); bool Scintilla__Internal__PRectangle_Contains(const Scintilla__Internal__PRectangle* self, Scintilla__Internal__Point* pt); @@ -289,14 +325,14 @@ Scintilla__Internal__Point* Scintilla__Internal__PRectangle_Centre(const Scintil double Scintilla__Internal__PRectangle_Width(const Scintilla__Internal__PRectangle* self); double Scintilla__Internal__PRectangle_Height(const Scintilla__Internal__PRectangle* self); bool Scintilla__Internal__PRectangle_Empty(const Scintilla__Internal__PRectangle* self); -void Scintilla__Internal__PRectangle_Delete(Scintilla__Internal__PRectangle* self); +void Scintilla__Internal__PRectangle_Delete(Scintilla__Internal__PRectangle* self, bool isSubclass); -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new(); -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue); -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha); -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1); -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new5(int co_); -Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha); +void Scintilla__Internal__ColourRGBA_new(Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); +void Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); +void Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); +void Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); +void Scintilla__Internal__ColourRGBA_new5(int co_, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); +void Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_FromRGB(int co_); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_Grey(unsigned int grey); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_FromIpRGB(intptr_t co_); @@ -318,62 +354,62 @@ Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_MixedWith(const Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_MixedWith2(const Scintilla__Internal__ColourRGBA* self, Scintilla__Internal__ColourRGBA* other, double proportion); void Scintilla__Internal__ColourRGBA_OperatorAssign(Scintilla__Internal__ColourRGBA* self, Scintilla__Internal__ColourRGBA* param1); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_Grey2(unsigned int grey, unsigned int alpha); -void Scintilla__Internal__ColourRGBA_Delete(Scintilla__Internal__ColourRGBA* self); +void Scintilla__Internal__ColourRGBA_Delete(Scintilla__Internal__ColourRGBA* self, bool isSubclass); -Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_); -Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1); -Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_); +void Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke); +void Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke); +void Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke); float Scintilla__Internal__Stroke_WidthF(const Scintilla__Internal__Stroke* self); -void Scintilla__Internal__Stroke_Delete(Scintilla__Internal__Stroke* self); +void Scintilla__Internal__Stroke_Delete(Scintilla__Internal__Stroke* self, bool isSubclass); -Scintilla__Internal__Fill* Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_); -Scintilla__Internal__Fill* Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1); -void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self); +void Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill); +void Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill); +void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self, bool isSubclass); -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_); -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth); -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_); -Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_); -void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* self); +void Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); +void Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); +void Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); +void Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); +void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* self, bool isSubclass); -Scintilla__Internal__ColourStop* Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_); -void Scintilla__Internal__ColourStop_Delete(Scintilla__Internal__ColourStop* self); +void Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__ColourStop** outptr_Scintilla__Internal__ColourStop); +void Scintilla__Internal__ColourStop_Delete(Scintilla__Internal__ColourStop* self, bool isSubclass); -void Scintilla__CharacterRange_Delete(Scintilla__CharacterRange* self); +void Scintilla__CharacterRange_Delete(Scintilla__CharacterRange* self, bool isSubclass); -void Scintilla__CharacterRangeFull_Delete(Scintilla__CharacterRangeFull* self); +void Scintilla__CharacterRangeFull_Delete(Scintilla__CharacterRangeFull* self, bool isSubclass); -void Scintilla__TextRange_Delete(Scintilla__TextRange* self); +void Scintilla__TextRange_Delete(Scintilla__TextRange* self, bool isSubclass); -void Scintilla__TextRangeFull_Delete(Scintilla__TextRangeFull* self); +void Scintilla__TextRangeFull_Delete(Scintilla__TextRangeFull* self, bool isSubclass); -void Scintilla__TextToFind_Delete(Scintilla__TextToFind* self); +void Scintilla__TextToFind_Delete(Scintilla__TextToFind* self, bool isSubclass); -void Scintilla__TextToFindFull_Delete(Scintilla__TextToFindFull* self); +void Scintilla__TextToFindFull_Delete(Scintilla__TextToFindFull* self, bool isSubclass); -void Scintilla__Rectangle_Delete(Scintilla__Rectangle* self); +void Scintilla__Rectangle_Delete(Scintilla__Rectangle* self, bool isSubclass); -void Scintilla__RangeToFormat_Delete(Scintilla__RangeToFormat* self); +void Scintilla__RangeToFormat_Delete(Scintilla__RangeToFormat* self, bool isSubclass); -void Scintilla__RangeToFormatFull_Delete(Scintilla__RangeToFormatFull* self); +void Scintilla__RangeToFormatFull_Delete(Scintilla__RangeToFormatFull* self, bool isSubclass); -void Scintilla__NotifyHeader_Delete(Scintilla__NotifyHeader* self); +void Scintilla__NotifyHeader_Delete(Scintilla__NotifyHeader* self, bool isSubclass); -void Scintilla__NotificationData_Delete(Scintilla__NotificationData* self); +void Scintilla__NotificationData_Delete(Scintilla__NotificationData* self, bool isSubclass); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new(const char* faceName_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_); -Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_); -void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParameters* self); +void Scintilla__Internal__FontParameters_new(const char* faceName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParameters* self, bool isSubclass); -Scintilla__Internal__Font* Scintilla__Internal__Font_new(); -void Scintilla__Internal__Font_Delete(Scintilla__Internal__Font* self); +void Scintilla__Internal__Font_new(Scintilla__Internal__Font** outptr_Scintilla__Internal__Font); +void Scintilla__Internal__Font_Delete(Scintilla__Internal__Font* self, bool isSubclass); size_t Scintilla__Internal__IScreenLine_Length(const Scintilla__Internal__IScreenLine* self); size_t Scintilla__Internal__IScreenLine_RepresentationCount(const Scintilla__Internal__IScreenLine* self); @@ -385,16 +421,16 @@ Scintilla__Internal__Font* Scintilla__Internal__IScreenLine_FontOfPosition(const double Scintilla__Internal__IScreenLine_RepresentationWidth(const Scintilla__Internal__IScreenLine* self, size_t position); double Scintilla__Internal__IScreenLine_TabPositionAfter(const Scintilla__Internal__IScreenLine* self, double xPosition); void Scintilla__Internal__IScreenLine_OperatorAssign(Scintilla__Internal__IScreenLine* self, Scintilla__Internal__IScreenLine* param1); -void Scintilla__Internal__IScreenLine_Delete(Scintilla__Internal__IScreenLine* self); +void Scintilla__Internal__IScreenLine_Delete(Scintilla__Internal__IScreenLine* self, bool isSubclass); size_t Scintilla__Internal__IScreenLineLayout_PositionFromX(Scintilla__Internal__IScreenLineLayout* self, double xDistance, bool charPosition); double Scintilla__Internal__IScreenLineLayout_XFromPosition(Scintilla__Internal__IScreenLineLayout* self, size_t caretPosition); void Scintilla__Internal__IScreenLineLayout_OperatorAssign(Scintilla__Internal__IScreenLineLayout* self, Scintilla__Internal__IScreenLineLayout* param1); -void Scintilla__Internal__IScreenLineLayout_Delete(Scintilla__Internal__IScreenLineLayout* self); +void Scintilla__Internal__IScreenLineLayout_Delete(Scintilla__Internal__IScreenLineLayout* self, bool isSubclass); -Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new(); -Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_); -void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* self); +void Scintilla__Internal__SurfaceMode_new(Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode); +void Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_, Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode); +void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* self, bool isSubclass); void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid); void Scintilla__Internal__Surface_Init2(Scintilla__Internal__Surface* self, void* sid, void* wid); @@ -428,9 +464,9 @@ void Scintilla__Internal__Surface_SetClip(Scintilla__Internal__Surface* self, Sc void Scintilla__Internal__Surface_PopClip(Scintilla__Internal__Surface* self); void Scintilla__Internal__Surface_FlushCachedState(Scintilla__Internal__Surface* self); void Scintilla__Internal__Surface_FlushDrawing(Scintilla__Internal__Surface* self); -void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self); +void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self, bool isSubclass); -Scintilla__Internal__Window* Scintilla__Internal__Window_new(); +void Scintilla__Internal__Window_new(Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); void Scintilla__Internal__Window_OperatorAssign(Scintilla__Internal__Window* self, void* wid_); void* Scintilla__Internal__Window_GetID(const Scintilla__Internal__Window* self); bool Scintilla__Internal__Window_Created(const Scintilla__Internal__Window* self); @@ -445,16 +481,16 @@ void Scintilla__Internal__Window_InvalidateRectangle(Scintilla__Internal__Window void Scintilla__Internal__Window_SetCursor(Scintilla__Internal__Window* self, int curs); Scintilla__Internal__PRectangle* Scintilla__Internal__Window_GetMonitorRect(Scintilla__Internal__Window* self, Scintilla__Internal__Point* pt); void Scintilla__Internal__Window_Show1(Scintilla__Internal__Window* self, bool show); -void Scintilla__Internal__Window_Delete(Scintilla__Internal__Window* self); +void Scintilla__Internal__Window_Delete(Scintilla__Internal__Window* self, bool isSubclass); -Scintilla__Internal__ListBoxEvent* Scintilla__Internal__ListBoxEvent_new(int event_); -void Scintilla__Internal__ListBoxEvent_Delete(Scintilla__Internal__ListBoxEvent* self); +void Scintilla__Internal__ListBoxEvent_new(int event_, Scintilla__Internal__ListBoxEvent** outptr_Scintilla__Internal__ListBoxEvent); +void Scintilla__Internal__ListBoxEvent_Delete(Scintilla__Internal__ListBoxEvent* self, bool isSubclass); void Scintilla__Internal__IListBoxDelegate_ListNotify(Scintilla__Internal__IListBoxDelegate* self, Scintilla__Internal__ListBoxEvent* plbe); void Scintilla__Internal__IListBoxDelegate_OperatorAssign(Scintilla__Internal__IListBoxDelegate* self, Scintilla__Internal__IListBoxDelegate* param1); -void Scintilla__Internal__IListBoxDelegate_Delete(Scintilla__Internal__IListBoxDelegate* self); +void Scintilla__Internal__IListBoxDelegate_Delete(Scintilla__Internal__IListBoxDelegate* self, bool isSubclass); -void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* self); +void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* self, bool isSubclass); void Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox* self, Scintilla__Internal__Font* font); void Scintilla__Internal__ListBox_Create(Scintilla__Internal__ListBox* self, Scintilla__Internal__Window* parent, int ctrlID, Scintilla__Internal__Point* location, int lineHeight_, bool unicodeMode_, int technology_); @@ -464,7 +500,7 @@ int Scintilla__Internal__ListBox_GetVisibleRows(const Scintilla__Internal__ListB Scintilla__Internal__PRectangle* Scintilla__Internal__ListBox_GetDesiredRect(Scintilla__Internal__ListBox* self); int Scintilla__Internal__ListBox_CaretFromEdge(Scintilla__Internal__ListBox* self); void Scintilla__Internal__ListBox_Clear(Scintilla__Internal__ListBox* self); -void Scintilla__Internal__ListBox_Append(Scintilla__Internal__ListBox* self, char* s); +void Scintilla__Internal__ListBox_Append(Scintilla__Internal__ListBox* self, char* s, int typeVal); int Scintilla__Internal__ListBox_Length(Scintilla__Internal__ListBox* self); void Scintilla__Internal__ListBox_Select(Scintilla__Internal__ListBox* self, int n); int Scintilla__Internal__ListBox_GetSelection(Scintilla__Internal__ListBox* self); @@ -475,46 +511,45 @@ void Scintilla__Internal__ListBox_ClearRegisteredImages(Scintilla__Internal__Lis void Scintilla__Internal__ListBox_SetDelegate(Scintilla__Internal__ListBox* self, Scintilla__Internal__IListBoxDelegate* lbDelegate); void Scintilla__Internal__ListBox_SetList(Scintilla__Internal__ListBox* self, const char* list, char separator, char typesep); void Scintilla__Internal__ListBox_SetOptions(Scintilla__Internal__ListBox* self, Scintilla__Internal__ListOptions* options_); -void Scintilla__Internal__ListBox_Append2(Scintilla__Internal__ListBox* self, char* s, int typeVal); -void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self); +void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self, bool isSubclass); -Scintilla__Internal__Menu* Scintilla__Internal__Menu_new(); +void Scintilla__Internal__Menu_new(Scintilla__Internal__Menu** outptr_Scintilla__Internal__Menu); void* Scintilla__Internal__Menu_GetID(const Scintilla__Internal__Menu* self); void Scintilla__Internal__Menu_CreatePopUp(Scintilla__Internal__Menu* self); void Scintilla__Internal__Menu_Destroy(Scintilla__Internal__Menu* self); void Scintilla__Internal__Menu_Show(Scintilla__Internal__Menu* self, Scintilla__Internal__Point* pt, Scintilla__Internal__Window* w); -void Scintilla__Internal__Menu_Delete(Scintilla__Internal__Menu* self); +void Scintilla__Internal__Menu_Delete(Scintilla__Internal__Menu* self, bool isSubclass); -void Sci_CharacterRange_Delete(Sci_CharacterRange* self); +void Sci_CharacterRange_Delete(Sci_CharacterRange* self, bool isSubclass); -void Sci_CharacterRangeFull_Delete(Sci_CharacterRangeFull* self); +void Sci_CharacterRangeFull_Delete(Sci_CharacterRangeFull* self, bool isSubclass); -void Sci_TextRange_Delete(Sci_TextRange* self); +void Sci_TextRange_Delete(Sci_TextRange* self, bool isSubclass); -void Sci_TextRangeFull_Delete(Sci_TextRangeFull* self); +void Sci_TextRangeFull_Delete(Sci_TextRangeFull* self, bool isSubclass); -void Sci_TextToFind_Delete(Sci_TextToFind* self); +void Sci_TextToFind_Delete(Sci_TextToFind* self, bool isSubclass); -void Sci_TextToFindFull_Delete(Sci_TextToFindFull* self); +void Sci_TextToFindFull_Delete(Sci_TextToFindFull* self, bool isSubclass); -void Sci_Rectangle_Delete(Sci_Rectangle* self); +void Sci_Rectangle_Delete(Sci_Rectangle* self, bool isSubclass); -void Sci_RangeToFormat_Delete(Sci_RangeToFormat* self); +void Sci_RangeToFormat_Delete(Sci_RangeToFormat* self, bool isSubclass); -void Sci_RangeToFormatFull_Delete(Sci_RangeToFormatFull* self); +void Sci_RangeToFormatFull_Delete(Sci_RangeToFormatFull* self, bool isSubclass); -void Sci_NotifyHeader_Delete(Sci_NotifyHeader* self); +void Sci_NotifyHeader_Delete(Sci_NotifyHeader* self, bool isSubclass); -void SCNotification_Delete(SCNotification* self); +void SCNotification_Delete(SCNotification* self, bool isSubclass); -ScintillaEditBase* ScintillaEditBase_new(QWidget* parent); -ScintillaEditBase* ScintillaEditBase_new2(); +void ScintillaEditBase_new(QWidget* parent, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void ScintillaEditBase_new2(ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* ScintillaEditBase_MetaObject(const ScintillaEditBase* self); void* ScintillaEditBase_Metacast(ScintillaEditBase* self, const char* param1); struct miqt_string ScintillaEditBase_Tr(const char* s); struct miqt_string ScintillaEditBase_TrUtf8(const char* s); -intptr_t ScintillaEditBase_Send(const ScintillaEditBase* self, unsigned int iMessage); -intptr_t ScintillaEditBase_Sends(const ScintillaEditBase* self, unsigned int iMessage); +intptr_t ScintillaEditBase_Send(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam); +intptr_t ScintillaEditBase_Sends(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, const char* s); void ScintillaEditBase_ScrollHorizontal(ScintillaEditBase* self, int value); void ScintillaEditBase_ScrollVertical(ScintillaEditBase* self, int value); void ScintillaEditBase_NotifyParent(ScintillaEditBase* self, Scintilla__NotificationData* scn); @@ -593,19 +628,88 @@ void ScintillaEditBase_KeyPressed(ScintillaEditBase* self, QKeyEvent* event); void ScintillaEditBase_connect_KeyPressed(ScintillaEditBase* self, intptr_t slot); void ScintillaEditBase_Resized(ScintillaEditBase* self); void ScintillaEditBase_connect_Resized(ScintillaEditBase* self, intptr_t slot); +bool ScintillaEditBase_Event(ScintillaEditBase* self, QEvent* event); +void ScintillaEditBase_PaintEvent(ScintillaEditBase* self, QPaintEvent* event); +void ScintillaEditBase_WheelEvent(ScintillaEditBase* self, QWheelEvent* event); +void ScintillaEditBase_FocusInEvent(ScintillaEditBase* self, QFocusEvent* event); +void ScintillaEditBase_FocusOutEvent(ScintillaEditBase* self, QFocusEvent* event); +void ScintillaEditBase_ResizeEvent(ScintillaEditBase* self, QResizeEvent* event); +void ScintillaEditBase_KeyPressEvent(ScintillaEditBase* self, QKeyEvent* event); +void ScintillaEditBase_MousePressEvent(ScintillaEditBase* self, QMouseEvent* event); +void ScintillaEditBase_MouseReleaseEvent(ScintillaEditBase* self, QMouseEvent* event); +void ScintillaEditBase_MouseDoubleClickEvent(ScintillaEditBase* self, QMouseEvent* event); +void ScintillaEditBase_MouseMoveEvent(ScintillaEditBase* self, QMouseEvent* event); +void ScintillaEditBase_ContextMenuEvent(ScintillaEditBase* self, QContextMenuEvent* event); +void ScintillaEditBase_DragEnterEvent(ScintillaEditBase* self, QDragEnterEvent* event); +void ScintillaEditBase_DragLeaveEvent(ScintillaEditBase* self, QDragLeaveEvent* event); +void ScintillaEditBase_DragMoveEvent(ScintillaEditBase* self, QDragMoveEvent* event); +void ScintillaEditBase_DropEvent(ScintillaEditBase* self, QDropEvent* event); +void ScintillaEditBase_InputMethodEvent(ScintillaEditBase* self, QInputMethodEvent* event); +QVariant* ScintillaEditBase_InputMethodQuery(const ScintillaEditBase* self, int query); +void ScintillaEditBase_ScrollContentsBy(ScintillaEditBase* self, int param1, int param2); struct miqt_string ScintillaEditBase_Tr2(const char* s, const char* c); struct miqt_string ScintillaEditBase_Tr3(const char* s, const char* c, int n); struct miqt_string ScintillaEditBase_TrUtf82(const char* s, const char* c); struct miqt_string ScintillaEditBase_TrUtf83(const char* s, const char* c, int n); -intptr_t ScintillaEditBase_Send2(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam); -intptr_t ScintillaEditBase_Send3(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam); -intptr_t ScintillaEditBase_Sends2(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam); -intptr_t ScintillaEditBase_Sends3(const ScintillaEditBase* self, unsigned int iMessage, uintptr_t wParam, const char* s); -void ScintillaEditBase_Delete(ScintillaEditBase* self); +void ScintillaEditBase_override_virtual_Send(void* self, intptr_t slot); +intptr_t ScintillaEditBase_virtualbase_Send(const void* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam); +void ScintillaEditBase_override_virtual_Sends(void* self, intptr_t slot); +intptr_t ScintillaEditBase_virtualbase_Sends(const void* self, unsigned int iMessage, uintptr_t wParam, const char* s); +void ScintillaEditBase_override_virtual_Event(void* self, intptr_t slot); +bool ScintillaEditBase_virtualbase_Event(void* self, QEvent* event); +void ScintillaEditBase_override_virtual_PaintEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void ScintillaEditBase_override_virtual_WheelEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void ScintillaEditBase_override_virtual_FocusInEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void ScintillaEditBase_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void ScintillaEditBase_override_virtual_ResizeEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void ScintillaEditBase_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void ScintillaEditBase_override_virtual_MousePressEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void ScintillaEditBase_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void ScintillaEditBase_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void ScintillaEditBase_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void ScintillaEditBase_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void ScintillaEditBase_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void ScintillaEditBase_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void ScintillaEditBase_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void ScintillaEditBase_override_virtual_DropEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_DropEvent(void* self, QDropEvent* event); +void ScintillaEditBase_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void ScintillaEditBase_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* ScintillaEditBase_virtualbase_InputMethodQuery(const void* self, int query); +void ScintillaEditBase_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_ScrollContentsBy(void* self, int param1, int param2); +void ScintillaEditBase_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* ScintillaEditBase_virtualbase_MinimumSizeHint(const void* self); +void ScintillaEditBase_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* ScintillaEditBase_virtualbase_SizeHint(const void* self); +void ScintillaEditBase_override_virtual_SetupViewport(void* self, intptr_t slot); +void ScintillaEditBase_virtualbase_SetupViewport(void* self, QWidget* viewport); +void ScintillaEditBase_override_virtual_EventFilter(void* self, intptr_t slot); +bool ScintillaEditBase_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void ScintillaEditBase_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool ScintillaEditBase_virtualbase_ViewportEvent(void* self, QEvent* param1); +void ScintillaEditBase_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* ScintillaEditBase_virtualbase_ViewportSizeHint(const void* self); +void ScintillaEditBase_Delete(ScintillaEditBase* self, bool isSubclass); -ScintillaDocument* ScintillaDocument_new(); -ScintillaDocument* ScintillaDocument_new2(QObject* parent); -ScintillaDocument* ScintillaDocument_new3(QObject* parent, void* pdoc_); +void ScintillaDocument_new(ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject); +void ScintillaDocument_new2(QObject* parent, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject); +void ScintillaDocument_new3(QObject* parent, void* pdoc_, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject); QMetaObject* ScintillaDocument_MetaObject(const ScintillaDocument* self); void* ScintillaDocument_Metacast(ScintillaDocument* self, const char* param1); struct miqt_string ScintillaDocument_Tr(const char* s); @@ -665,10 +769,24 @@ struct miqt_string ScintillaDocument_Tr3(const char* s, const char* c, int n); struct miqt_string ScintillaDocument_TrUtf82(const char* s, const char* c); struct miqt_string ScintillaDocument_TrUtf83(const char* s, const char* c, int n); void ScintillaDocument_BeginUndoAction1(ScintillaDocument* self, bool coalesceWithPrior); -void ScintillaDocument_Delete(ScintillaDocument* self); +void ScintillaDocument_override_virtual_Event(void* self, intptr_t slot); +bool ScintillaDocument_virtualbase_Event(void* self, QEvent* event); +void ScintillaDocument_override_virtual_EventFilter(void* self, intptr_t slot); +bool ScintillaDocument_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void ScintillaDocument_override_virtual_TimerEvent(void* self, intptr_t slot); +void ScintillaDocument_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void ScintillaDocument_override_virtual_ChildEvent(void* self, intptr_t slot); +void ScintillaDocument_virtualbase_ChildEvent(void* self, QChildEvent* event); +void ScintillaDocument_override_virtual_CustomEvent(void* self, intptr_t slot); +void ScintillaDocument_virtualbase_CustomEvent(void* self, QEvent* event); +void ScintillaDocument_override_virtual_ConnectNotify(void* self, intptr_t slot); +void ScintillaDocument_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void ScintillaDocument_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void ScintillaDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void ScintillaDocument_Delete(ScintillaDocument* self, bool isSubclass); -ScintillaEdit* ScintillaEdit_new(QWidget* parent); -ScintillaEdit* ScintillaEdit_new2(); +void ScintillaEdit_new(QWidget* parent, ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void ScintillaEdit_new2(ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* ScintillaEdit_MetaObject(const ScintillaEdit* self); void* ScintillaEdit_Metacast(ScintillaEdit* self, const char* param1); struct miqt_string ScintillaEdit_Tr(const char* s); @@ -1486,7 +1604,49 @@ struct miqt_string ScintillaEdit_Tr2(const char* s, const char* c); struct miqt_string ScintillaEdit_Tr3(const char* s, const char* c, int n); struct miqt_string ScintillaEdit_TrUtf82(const char* s, const char* c); struct miqt_string ScintillaEdit_TrUtf83(const char* s, const char* c, int n); -void ScintillaEdit_Delete(ScintillaEdit* self); +void ScintillaEdit_override_virtual_Send(void* self, intptr_t slot); +intptr_t ScintillaEdit_virtualbase_Send(const void* self, unsigned int iMessage, uintptr_t wParam, intptr_t lParam); +void ScintillaEdit_override_virtual_Sends(void* self, intptr_t slot); +intptr_t ScintillaEdit_virtualbase_Sends(const void* self, unsigned int iMessage, uintptr_t wParam, const char* s); +void ScintillaEdit_override_virtual_Event(void* self, intptr_t slot); +bool ScintillaEdit_virtualbase_Event(void* self, QEvent* event); +void ScintillaEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void ScintillaEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void ScintillaEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void ScintillaEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void ScintillaEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void ScintillaEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void ScintillaEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void ScintillaEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void ScintillaEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void ScintillaEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void ScintillaEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void ScintillaEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void ScintillaEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void ScintillaEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void ScintillaEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_DropEvent(void* self, QDropEvent* event); +void ScintillaEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void ScintillaEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* ScintillaEdit_virtualbase_InputMethodQuery(const void* self, int query); +void ScintillaEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void ScintillaEdit_virtualbase_ScrollContentsBy(void* self, int param1, int param2); +void ScintillaEdit_Delete(ScintillaEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp index 0756047e..c3684edc 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -141,7 +142,11 @@ struct miqt_string QsciAbstractAPIs_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self) { - delete self; +void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go index f2ad3e88..7cabe2da 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go @@ -15,7 +15,8 @@ import ( ) type QsciAbstractAPIs struct { - h *C.QsciAbstractAPIs + h *C.QsciAbstractAPIs + isSubclass bool *qt.QObject } @@ -33,15 +34,23 @@ func (this *QsciAbstractAPIs) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciAbstractAPIs(h *C.QsciAbstractAPIs) *QsciAbstractAPIs { +// newQsciAbstractAPIs constructs the type using only CGO pointers. +func newQsciAbstractAPIs(h *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAbstractAPIs { if h == nil { return nil } - return &QsciAbstractAPIs{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QsciAbstractAPIs{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer) *QsciAbstractAPIs { - return newQsciAbstractAPIs((*C.QsciAbstractAPIs)(h)) +// UnsafeNewQsciAbstractAPIs constructs the type using only unsafe pointers. +func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAbstractAPIs { + if h == nil { + return nil + } + + return &QsciAbstractAPIs{h: (*C.QsciAbstractAPIs)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QsciAbstractAPIs) MetaObject() *qt.QMetaObject { @@ -73,7 +82,7 @@ func QsciAbstractAPIs_TrUtf8(s string) string { } func (this *QsciAbstractAPIs) Lexer() *QsciLexer { - return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciAbstractAPIs_Lexer(this.h))) + return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciAbstractAPIs_Lexer(this.h)), nil) } func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []string) { @@ -183,7 +192,7 @@ func QsciAbstractAPIs_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QsciAbstractAPIs) Delete() { - C.QsciAbstractAPIs_Delete(this.h) + C.QsciAbstractAPIs_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h index 10017ae2..f83826a7 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QsciAbstractAPIs; class QsciLexer; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif @@ -36,7 +38,7 @@ struct miqt_string QsciAbstractAPIs_Tr2(const char* s, const char* c); struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n); struct miqt_string QsciAbstractAPIs_TrUtf82(const char* s, const char* c); struct miqt_string QsciAbstractAPIs_TrUtf83(const char* s, const char* c, int n); -void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self); +void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qsciapis.cpp b/qt-restricted-extras/qscintilla/gen_qsciapis.cpp index c990854a..4022f42b 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciapis.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciapis.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -8,8 +9,234 @@ #include "gen_qsciapis.h" #include "_cgo_export.h" -QsciAPIs* QsciAPIs_new(QsciLexer* lexer) { - return new QsciAPIs(lexer); +class MiqtVirtualQsciAPIs : public virtual QsciAPIs { +public: + + MiqtVirtualQsciAPIs(QsciLexer* lexer): QsciAPIs(lexer) {}; + + virtual ~MiqtVirtualQsciAPIs() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateAutoCompletionList = 0; + + // Subclass to allow providing a Go implementation + virtual void updateAutoCompletionList(const QStringList& context, QStringList& list) override { + if (handle__UpdateAutoCompletionList == 0) { + QsciAPIs::updateAutoCompletionList(context, list); + return; + } + + const QStringList& context_ret = context; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* context_arr = static_cast(malloc(sizeof(struct miqt_string) * context_ret.length())); + for (size_t i = 0, e = context_ret.length(); i < e; ++i) { + QString context_lv_ret = context_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray context_lv_b = context_lv_ret.toUtf8(); + struct miqt_string context_lv_ms; + context_lv_ms.len = context_lv_b.length(); + context_lv_ms.data = static_cast(malloc(context_lv_ms.len)); + memcpy(context_lv_ms.data, context_lv_b.data(), context_lv_ms.len); + context_arr[i] = context_lv_ms; + } + struct miqt_array context_out; + context_out.len = context_ret.length(); + context_out.data = static_cast(context_arr); + struct miqt_array /* of struct miqt_string */ sigval1 = context_out; + QStringList& list_ret = list; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* list_arr = static_cast(malloc(sizeof(struct miqt_string) * list_ret.length())); + for (size_t i = 0, e = list_ret.length(); i < e; ++i) { + QString list_lv_ret = list_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray list_lv_b = list_lv_ret.toUtf8(); + struct miqt_string list_lv_ms; + list_lv_ms.len = list_lv_b.length(); + list_lv_ms.data = static_cast(malloc(list_lv_ms.len)); + memcpy(list_lv_ms.data, list_lv_b.data(), list_lv_ms.len); + list_arr[i] = list_lv_ms; + } + struct miqt_array list_out; + list_out.len = list_ret.length(); + list_out.data = static_cast(list_arr); + struct miqt_array /* of struct miqt_string */ sigval2 = list_out; + + miqt_exec_callback_QsciAPIs_UpdateAutoCompletionList(this, handle__UpdateAutoCompletionList, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateAutoCompletionList(struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list) { + QStringList context_QList; + context_QList.reserve(context.len); + struct miqt_string* context_arr = static_cast(context.data); + for(size_t i = 0; i < context.len; ++i) { + QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len); + context_QList.push_back(context_arr_i_QString); + } + QStringList list_QList; + list_QList.reserve(list.len); + struct miqt_string* list_arr = static_cast(list.data); + for(size_t i = 0; i < list.len; ++i) { + QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len); + list_QList.push_back(list_arr_i_QString); + } + + QsciAPIs::updateAutoCompletionList(context_QList, list_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionSelected = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompletionSelected(const QString& sel) override { + if (handle__AutoCompletionSelected == 0) { + QsciAPIs::autoCompletionSelected(sel); + return; + } + + const QString sel_ret = sel; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray sel_b = sel_ret.toUtf8(); + struct miqt_string sel_ms; + sel_ms.len = sel_b.length(); + sel_ms.data = static_cast(malloc(sel_ms.len)); + memcpy(sel_ms.data, sel_b.data(), sel_ms.len); + struct miqt_string sigval1 = sel_ms; + + miqt_exec_callback_QsciAPIs_AutoCompletionSelected(this, handle__AutoCompletionSelected, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompletionSelected(struct miqt_string sel) { + QString sel_QString = QString::fromUtf8(sel.data, sel.len); + + QsciAPIs::autoCompletionSelected(sel_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CallTips = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList callTips(const QStringList& context, int commas, QsciScintilla::CallTipsStyle style, QList& shifts) override { + if (handle__CallTips == 0) { + return QsciAPIs::callTips(context, commas, style, shifts); + } + + const QStringList& context_ret = context; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* context_arr = static_cast(malloc(sizeof(struct miqt_string) * context_ret.length())); + for (size_t i = 0, e = context_ret.length(); i < e; ++i) { + QString context_lv_ret = context_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray context_lv_b = context_lv_ret.toUtf8(); + struct miqt_string context_lv_ms; + context_lv_ms.len = context_lv_b.length(); + context_lv_ms.data = static_cast(malloc(context_lv_ms.len)); + memcpy(context_lv_ms.data, context_lv_b.data(), context_lv_ms.len); + context_arr[i] = context_lv_ms; + } + struct miqt_array context_out; + context_out.len = context_ret.length(); + context_out.data = static_cast(context_arr); + struct miqt_array /* of struct miqt_string */ sigval1 = context_out; + int sigval2 = commas; + QsciScintilla::CallTipsStyle style_ret = style; + int sigval3 = static_cast(style_ret); + QList& shifts_ret = shifts; + // Convert QList<> from C++ memory to manually-managed C memory + int* shifts_arr = static_cast(malloc(sizeof(int) * shifts_ret.length())); + for (size_t i = 0, e = shifts_ret.length(); i < e; ++i) { + shifts_arr[i] = shifts_ret[i]; + } + struct miqt_array shifts_out; + shifts_out.len = shifts_ret.length(); + shifts_out.data = static_cast(shifts_arr); + struct miqt_array /* of int */ sigval4 = shifts_out; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciAPIs_CallTips(this, handle__CallTips, sigval1, sigval2, sigval3, sigval4); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_CallTips(struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts) { + QStringList context_QList; + context_QList.reserve(context.len); + struct miqt_string* context_arr = static_cast(context.data); + for(size_t i = 0; i < context.len; ++i) { + QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len); + context_QList.push_back(context_arr_i_QString); + } + QList shifts_QList; + shifts_QList.reserve(shifts.len); + int* shifts_arr = static_cast(shifts.data); + for(size_t i = 0; i < shifts.len; ++i) { + shifts_QList.push_back(static_cast(shifts_arr[i])); + } + + QStringList _ret = QsciAPIs::callTips(context_QList, static_cast(commas), static_cast(style), shifts_QList); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QsciAPIs::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QsciAPIs_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QsciAPIs::event(e); + + } + +}; + +void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { + MiqtVirtualQsciAPIs* ret = new MiqtVirtualQsciAPIs(lexer); + *outptr_QsciAPIs = ret; + *outptr_QsciAbstractAPIs = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self) { @@ -177,7 +404,7 @@ void QsciAPIs_ApiPreparationCancelled(QsciAPIs* self) { } void QsciAPIs_connect_ApiPreparationCancelled(QsciAPIs* self, intptr_t slot) { - QsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationCancelled), self, [=]() { + MiqtVirtualQsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationCancelled), self, [=]() { miqt_exec_callback_QsciAPIs_ApiPreparationCancelled(slot); }); } @@ -187,7 +414,7 @@ void QsciAPIs_ApiPreparationStarted(QsciAPIs* self) { } void QsciAPIs_connect_ApiPreparationStarted(QsciAPIs* self, intptr_t slot) { - QsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationStarted), self, [=]() { + MiqtVirtualQsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationStarted), self, [=]() { miqt_exec_callback_QsciAPIs_ApiPreparationStarted(slot); }); } @@ -197,7 +424,7 @@ void QsciAPIs_ApiPreparationFinished(QsciAPIs* self) { } void QsciAPIs_connect_ApiPreparationFinished(QsciAPIs* self, intptr_t slot) { - QsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationFinished), self, [=]() { + MiqtVirtualQsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationFinished), self, [=]() { miqt_exec_callback_QsciAPIs_ApiPreparationFinished(slot); }); } @@ -261,7 +488,43 @@ bool QsciAPIs_SavePrepared1(const QsciAPIs* self, struct miqt_string filename) { return self->savePrepared(filename_QString); } -void QsciAPIs_Delete(QsciAPIs* self) { - delete self; +void QsciAPIs_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__UpdateAutoCompletionList = slot; +} + +void QsciAPIs_virtualbase_UpdateAutoCompletionList(void* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list) { + ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_UpdateAutoCompletionList(context, list); +} + +void QsciAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__AutoCompletionSelected = slot; +} + +void QsciAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string sel) { + ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_AutoCompletionSelected(sel); +} + +void QsciAPIs_override_virtual_CallTips(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__CallTips = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciAPIs_virtualbase_CallTips(void* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts) { + return ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_CallTips(context, commas, style, shifts); +} + +void QsciAPIs_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__Event = slot; +} + +bool QsciAPIs_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_Event(e); +} + +void QsciAPIs_Delete(QsciAPIs* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qsciapis.go b/qt-restricted-extras/qscintilla/gen_qsciapis.go index d8c4eb98..533430d2 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciapis.go +++ b/qt-restricted-extras/qscintilla/gen_qsciapis.go @@ -16,7 +16,8 @@ import ( ) type QsciAPIs struct { - h *C.QsciAPIs + h *C.QsciAPIs + isSubclass bool *QsciAbstractAPIs } @@ -34,21 +35,35 @@ func (this *QsciAPIs) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciAPIs(h *C.QsciAPIs) *QsciAPIs { +// newQsciAPIs constructs the type using only CGO pointers. +func newQsciAPIs(h *C.QsciAPIs, h_QsciAbstractAPIs *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAPIs { if h == nil { return nil } - return &QsciAPIs{h: h, QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(unsafe.Pointer(h))} + return &QsciAPIs{h: h, + QsciAbstractAPIs: newQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} } -func UnsafeNewQsciAPIs(h unsafe.Pointer) *QsciAPIs { - return newQsciAPIs((*C.QsciAPIs)(h)) +// UnsafeNewQsciAPIs constructs the type using only unsafe pointers. +func UnsafeNewQsciAPIs(h unsafe.Pointer, h_QsciAbstractAPIs unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAPIs { + if h == nil { + return nil + } + + return &QsciAPIs{h: (*C.QsciAPIs)(h), + QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} } // NewQsciAPIs constructs a new QsciAPIs object. func NewQsciAPIs(lexer *QsciLexer) *QsciAPIs { - ret := C.QsciAPIs_new(lexer.cPointer()) - return newQsciAPIs(ret) + var outptr_QsciAPIs *C.QsciAPIs = nil + var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil + var outptr_QObject *C.QObject = nil + + C.QsciAPIs_new(lexer.cPointer(), &outptr_QsciAPIs, &outptr_QsciAbstractAPIs, &outptr_QObject) + ret := newQsciAPIs(outptr_QsciAPIs, outptr_QsciAbstractAPIs, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciAPIs) MetaObject() *qt.QMetaObject { @@ -331,9 +346,208 @@ func (this *QsciAPIs) SavePrepared1(filename string) bool { return (bool)(C.QsciAPIs_SavePrepared1(this.h, filename_ms)) } +func (this *QsciAPIs) callVirtualBase_UpdateAutoCompletionList(context []string, list []string) { + context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context)))) + defer C.free(unsafe.Pointer(context_CArray)) + for i := range context { + context_i_ms := C.struct_miqt_string{} + context_i_ms.data = C.CString(context[i]) + context_i_ms.len = C.size_t(len(context[i])) + defer C.free(unsafe.Pointer(context_i_ms.data)) + context_CArray[i] = context_i_ms + } + context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)} + list_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(list)))) + defer C.free(unsafe.Pointer(list_CArray)) + for i := range list { + list_i_ms := C.struct_miqt_string{} + list_i_ms.data = C.CString(list[i]) + list_i_ms.len = C.size_t(len(list[i])) + defer C.free(unsafe.Pointer(list_i_ms.data)) + list_CArray[i] = list_i_ms + } + list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)} + + C.QsciAPIs_virtualbase_UpdateAutoCompletionList(unsafe.Pointer(this.h), context_ma, list_ma) + +} +func (this *QsciAPIs) OnUpdateAutoCompletionList(slot func(super func(context []string, list []string), context []string, list []string)) { + C.QsciAPIs_override_virtual_UpdateAutoCompletionList(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_UpdateAutoCompletionList +func miqt_exec_callback_QsciAPIs_UpdateAutoCompletionList(self *C.QsciAPIs, cb C.intptr_t, context C.struct_miqt_array, list C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(context []string, list []string), context []string, list []string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var context_ma C.struct_miqt_array = context + context_ret := make([]string, int(context_ma.len)) + context_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(context_ma.data)) // hey ya + for i := 0; i < int(context_ma.len); i++ { + var context_lv_ms C.struct_miqt_string = context_outCast[i] + context_lv_ret := C.GoStringN(context_lv_ms.data, C.int(int64(context_lv_ms.len))) + C.free(unsafe.Pointer(context_lv_ms.data)) + context_ret[i] = context_lv_ret + } + slotval1 := context_ret + + var list_ma C.struct_miqt_array = list + list_ret := make([]string, int(list_ma.len)) + list_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(list_ma.data)) // hey ya + for i := 0; i < int(list_ma.len); i++ { + var list_lv_ms C.struct_miqt_string = list_outCast[i] + list_lv_ret := C.GoStringN(list_lv_ms.data, C.int(int64(list_lv_ms.len))) + C.free(unsafe.Pointer(list_lv_ms.data)) + list_ret[i] = list_lv_ret + } + slotval2 := list_ret + + gofunc((&QsciAPIs{h: self}).callVirtualBase_UpdateAutoCompletionList, slotval1, slotval2) + +} + +func (this *QsciAPIs) callVirtualBase_AutoCompletionSelected(sel string) { + sel_ms := C.struct_miqt_string{} + sel_ms.data = C.CString(sel) + sel_ms.len = C.size_t(len(sel)) + defer C.free(unsafe.Pointer(sel_ms.data)) + + C.QsciAPIs_virtualbase_AutoCompletionSelected(unsafe.Pointer(this.h), sel_ms) + +} +func (this *QsciAPIs) OnAutoCompletionSelected(slot func(super func(sel string), sel string)) { + C.QsciAPIs_override_virtual_AutoCompletionSelected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_AutoCompletionSelected +func miqt_exec_callback_QsciAPIs_AutoCompletionSelected(self *C.QsciAPIs, cb C.intptr_t, sel C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sel string), sel string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var sel_ms C.struct_miqt_string = sel + sel_ret := C.GoStringN(sel_ms.data, C.int(int64(sel_ms.len))) + C.free(unsafe.Pointer(sel_ms.data)) + slotval1 := sel_ret + + gofunc((&QsciAPIs{h: self}).callVirtualBase_AutoCompletionSelected, slotval1) + +} + +func (this *QsciAPIs) callVirtualBase_CallTips(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string { + context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context)))) + defer C.free(unsafe.Pointer(context_CArray)) + for i := range context { + context_i_ms := C.struct_miqt_string{} + context_i_ms.data = C.CString(context[i]) + context_i_ms.len = C.size_t(len(context[i])) + defer C.free(unsafe.Pointer(context_i_ms.data)) + context_CArray[i] = context_i_ms + } + context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)} + shifts_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(shifts)))) + defer C.free(unsafe.Pointer(shifts_CArray)) + for i := range shifts { + shifts_CArray[i] = (C.int)(shifts[i]) + } + shifts_ma := C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)} + + var _ma C.struct_miqt_array = C.QsciAPIs_virtualbase_CallTips(unsafe.Pointer(this.h), context_ma, (C.int)(commas), (C.int)(style), shifts_ma) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciAPIs) OnCallTips(slot func(super func(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string, context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string) { + C.QsciAPIs_override_virtual_CallTips(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_CallTips +func miqt_exec_callback_QsciAPIs_CallTips(self *C.QsciAPIs, cb C.intptr_t, context C.struct_miqt_array, commas C.int, style C.int, shifts C.struct_miqt_array) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string, context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var context_ma C.struct_miqt_array = context + context_ret := make([]string, int(context_ma.len)) + context_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(context_ma.data)) // hey ya + for i := 0; i < int(context_ma.len); i++ { + var context_lv_ms C.struct_miqt_string = context_outCast[i] + context_lv_ret := C.GoStringN(context_lv_ms.data, C.int(int64(context_lv_ms.len))) + C.free(unsafe.Pointer(context_lv_ms.data)) + context_ret[i] = context_lv_ret + } + slotval1 := context_ret + + slotval2 := (int)(commas) + + slotval3 := (QsciScintilla__CallTipsStyle)(style) + + var shifts_ma C.struct_miqt_array = shifts + shifts_ret := make([]int, int(shifts_ma.len)) + shifts_outCast := (*[0xffff]C.int)(unsafe.Pointer(shifts_ma.data)) // hey ya + for i := 0; i < int(shifts_ma.len); i++ { + shifts_ret[i] = (int)(shifts_outCast[i]) + } + slotval4 := shifts_ret + + virtualReturn := gofunc((&QsciAPIs{h: self}).callVirtualBase_CallTips, slotval1, slotval2, slotval3, slotval4) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciAPIs) callVirtualBase_Event(e *qt.QEvent) bool { + + return (bool)(C.QsciAPIs_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer()))) + +} +func (this *QsciAPIs) OnEvent(slot func(super func(e *qt.QEvent) bool, e *qt.QEvent) bool) { + C.QsciAPIs_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_Event +func miqt_exec_callback_QsciAPIs_Event(self *C.QsciAPIs, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QEvent) bool, e *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QsciAPIs{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciAPIs) Delete() { - C.QsciAPIs_Delete(this.h) + C.QsciAPIs_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qsciapis.h b/qt-restricted-extras/qscintilla/gen_qsciapis.h index ce83eb8f..3b2cbdd5 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciapis.h +++ b/qt-restricted-extras/qscintilla/gen_qsciapis.h @@ -17,16 +17,20 @@ extern "C" { #ifdef __cplusplus class QEvent; class QMetaObject; +class QObject; class QsciAPIs; +class QsciAbstractAPIs; class QsciLexer; #else typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QsciAPIs QsciAPIs; +typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif -QsciAPIs* QsciAPIs_new(QsciLexer* lexer); +void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self); void* QsciAPIs_Metacast(QsciAPIs* self, const char* param1); struct miqt_string QsciAPIs_Tr(const char* s); @@ -59,7 +63,15 @@ struct miqt_string QsciAPIs_TrUtf83(const char* s, const char* c, int n); bool QsciAPIs_IsPrepared1(const QsciAPIs* self, struct miqt_string filename); bool QsciAPIs_LoadPrepared1(QsciAPIs* self, struct miqt_string filename); bool QsciAPIs_SavePrepared1(const QsciAPIs* self, struct miqt_string filename); -void QsciAPIs_Delete(QsciAPIs* self); +void QsciAPIs_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot); +void QsciAPIs_virtualbase_UpdateAutoCompletionList(void* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list); +void QsciAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot); +void QsciAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string sel); +void QsciAPIs_override_virtual_CallTips(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciAPIs_virtualbase_CallTips(void* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts); +void QsciAPIs_override_virtual_Event(void* self, intptr_t slot); +bool QsciAPIs_virtualbase_Event(void* self, QEvent* e); +void QsciAPIs_Delete(QsciAPIs* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscicommand.cpp b/qt-restricted-extras/qscintilla/gen_qscicommand.cpp index b542ece4..7737d26a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscicommand.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscicommand.cpp @@ -45,7 +45,11 @@ struct miqt_string QsciCommand_Description(const QsciCommand* self) { return _ms; } -void QsciCommand_Delete(QsciCommand* self) { - delete self; +void QsciCommand_Delete(QsciCommand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscicommand.go b/qt-restricted-extras/qscintilla/gen_qscicommand.go index d5696556..2da612d0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscicommand.go +++ b/qt-restricted-extras/qscintilla/gen_qscicommand.go @@ -118,7 +118,8 @@ const ( ) type QsciCommand struct { - h *C.QsciCommand + h *C.QsciCommand + isSubclass bool } func (this *QsciCommand) cPointer() *C.QsciCommand { @@ -135,6 +136,7 @@ func (this *QsciCommand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciCommand constructs the type using only CGO pointers. func newQsciCommand(h *C.QsciCommand) *QsciCommand { if h == nil { return nil @@ -142,8 +144,13 @@ func newQsciCommand(h *C.QsciCommand) *QsciCommand { return &QsciCommand{h: h} } +// UnsafeNewQsciCommand constructs the type using only unsafe pointers. func UnsafeNewQsciCommand(h unsafe.Pointer) *QsciCommand { - return newQsciCommand((*C.QsciCommand)(h)) + if h == nil { + return nil + } + + return &QsciCommand{h: (*C.QsciCommand)(h)} } func (this *QsciCommand) Command() QsciCommand__Command { @@ -183,7 +190,7 @@ func (this *QsciCommand) Description() string { // Delete this object from C++ memory. func (this *QsciCommand) Delete() { - C.QsciCommand_Delete(this.h) + C.QsciCommand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscicommand.h b/qt-restricted-extras/qscintilla/gen_qscicommand.h index 96e8a88a..f36ed8e3 100644 --- a/qt-restricted-extras/qscintilla/gen_qscicommand.h +++ b/qt-restricted-extras/qscintilla/gen_qscicommand.h @@ -28,7 +28,7 @@ int QsciCommand_Key(const QsciCommand* self); int QsciCommand_AlternateKey(const QsciCommand* self); bool QsciCommand_ValidKey(int key); struct miqt_string QsciCommand_Description(const QsciCommand* self); -void QsciCommand_Delete(QsciCommand* self); +void QsciCommand_Delete(QsciCommand* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscicommandset.go b/qt-restricted-extras/qscintilla/gen_qscicommandset.go index 3b5d6154..2f0105d1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscicommandset.go +++ b/qt-restricted-extras/qscintilla/gen_qscicommandset.go @@ -14,7 +14,8 @@ import ( ) type QsciCommandSet struct { - h *C.QsciCommandSet + h *C.QsciCommandSet + isSubclass bool } func (this *QsciCommandSet) cPointer() *C.QsciCommandSet { @@ -31,6 +32,7 @@ func (this *QsciCommandSet) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciCommandSet constructs the type using only CGO pointers. func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet { if h == nil { return nil @@ -38,8 +40,13 @@ func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet { return &QsciCommandSet{h: h} } +// UnsafeNewQsciCommandSet constructs the type using only unsafe pointers. func UnsafeNewQsciCommandSet(h unsafe.Pointer) *QsciCommandSet { - return newQsciCommandSet((*C.QsciCommandSet)(h)) + if h == nil { + return nil + } + + return &QsciCommandSet{h: (*C.QsciCommandSet)(h)} } func (this *QsciCommandSet) ReadSettings(qs *qt.QSettings) bool { diff --git a/qt-restricted-extras/qscintilla/gen_qscidocument.cpp b/qt-restricted-extras/qscintilla/gen_qscidocument.cpp index f08bc32e..cd7559c4 100644 --- a/qt-restricted-extras/qscintilla/gen_qscidocument.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscidocument.cpp @@ -2,19 +2,25 @@ #include "gen_qscidocument.h" #include "_cgo_export.h" -QsciDocument* QsciDocument_new() { - return new QsciDocument(); +void QsciDocument_new(QsciDocument** outptr_QsciDocument) { + QsciDocument* ret = new QsciDocument(); + *outptr_QsciDocument = ret; } -QsciDocument* QsciDocument_new2(QsciDocument* param1) { - return new QsciDocument(*param1); +void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument) { + QsciDocument* ret = new QsciDocument(*param1); + *outptr_QsciDocument = ret; } void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1) { self->operator=(*param1); } -void QsciDocument_Delete(QsciDocument* self) { - delete self; +void QsciDocument_Delete(QsciDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscidocument.go b/qt-restricted-extras/qscintilla/gen_qscidocument.go index b3541162..f8487c41 100644 --- a/qt-restricted-extras/qscintilla/gen_qscidocument.go +++ b/qt-restricted-extras/qscintilla/gen_qscidocument.go @@ -14,7 +14,8 @@ import ( ) type QsciDocument struct { - h *C.QsciDocument + h *C.QsciDocument + isSubclass bool } func (this *QsciDocument) cPointer() *C.QsciDocument { @@ -31,6 +32,7 @@ func (this *QsciDocument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciDocument constructs the type using only CGO pointers. func newQsciDocument(h *C.QsciDocument) *QsciDocument { if h == nil { return nil @@ -38,20 +40,33 @@ func newQsciDocument(h *C.QsciDocument) *QsciDocument { return &QsciDocument{h: h} } +// UnsafeNewQsciDocument constructs the type using only unsafe pointers. func UnsafeNewQsciDocument(h unsafe.Pointer) *QsciDocument { - return newQsciDocument((*C.QsciDocument)(h)) + if h == nil { + return nil + } + + return &QsciDocument{h: (*C.QsciDocument)(h)} } // NewQsciDocument constructs a new QsciDocument object. func NewQsciDocument() *QsciDocument { - ret := C.QsciDocument_new() - return newQsciDocument(ret) + var outptr_QsciDocument *C.QsciDocument = nil + + C.QsciDocument_new(&outptr_QsciDocument) + ret := newQsciDocument(outptr_QsciDocument) + ret.isSubclass = true + return ret } // NewQsciDocument2 constructs a new QsciDocument object. func NewQsciDocument2(param1 *QsciDocument) *QsciDocument { - ret := C.QsciDocument_new2(param1.cPointer()) - return newQsciDocument(ret) + var outptr_QsciDocument *C.QsciDocument = nil + + C.QsciDocument_new2(param1.cPointer(), &outptr_QsciDocument) + ret := newQsciDocument(outptr_QsciDocument) + ret.isSubclass = true + return ret } func (this *QsciDocument) OperatorAssign(param1 *QsciDocument) { @@ -60,7 +75,7 @@ func (this *QsciDocument) OperatorAssign(param1 *QsciDocument) { // Delete this object from C++ memory. func (this *QsciDocument) Delete() { - C.QsciDocument_Delete(this.h) + C.QsciDocument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscidocument.h b/qt-restricted-extras/qscintilla/gen_qscidocument.h index 4fc35618..d776cf65 100644 --- a/qt-restricted-extras/qscintilla/gen_qscidocument.h +++ b/qt-restricted-extras/qscintilla/gen_qscidocument.h @@ -20,10 +20,10 @@ class QsciDocument; typedef struct QsciDocument QsciDocument; #endif -QsciDocument* QsciDocument_new(); -QsciDocument* QsciDocument_new2(QsciDocument* param1); +void QsciDocument_new(QsciDocument** outptr_QsciDocument); +void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument); void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1); -void QsciDocument_Delete(QsciDocument* self); +void QsciDocument_Delete(QsciDocument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.cpp b/qt-restricted-extras/qscintilla/gen_qscilexer.cpp index 04664567..250b584f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -84,20 +85,20 @@ int QsciLexer_AutoIndentStyle(QsciLexer* self) { return self->autoIndentStyle(); } -const char* QsciLexer_BlockEnd(const QsciLexer* self) { - return (const char*) self->blockEnd(); +const char* QsciLexer_BlockEnd(const QsciLexer* self, int* style) { + return (const char*) self->blockEnd(static_cast(style)); } int QsciLexer_BlockLookback(const QsciLexer* self) { return self->blockLookback(); } -const char* QsciLexer_BlockStart(const QsciLexer* self) { - return (const char*) self->blockStart(); +const char* QsciLexer_BlockStart(const QsciLexer* self, int* style) { + return (const char*) self->blockStart(static_cast(style)); } -const char* QsciLexer_BlockStartKeyword(const QsciLexer* self) { - return (const char*) self->blockStartKeyword(); +const char* QsciLexer_BlockStartKeyword(const QsciLexer* self, int* style) { + return (const char*) self->blockStartKeyword(static_cast(style)); } int QsciLexer_BraceStyle(const QsciLexer* self) { @@ -223,20 +224,20 @@ void QsciLexer_SetAutoIndentStyle(QsciLexer* self, int autoindentstyle) { self->setAutoIndentStyle(static_cast(autoindentstyle)); } -void QsciLexer_SetColor(QsciLexer* self, QColor* c) { - self->setColor(*c); +void QsciLexer_SetColor(QsciLexer* self, QColor* c, int style) { + self->setColor(*c, static_cast(style)); } -void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill) { - self->setEolFill(eoffill); +void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill, int style) { + self->setEolFill(eoffill, static_cast(style)); } -void QsciLexer_SetFont(QsciLexer* self, QFont* f) { - self->setFont(*f); +void QsciLexer_SetFont(QsciLexer* self, QFont* f, int style) { + self->setFont(*f, static_cast(style)); } -void QsciLexer_SetPaper(QsciLexer* self, QColor* c) { - self->setPaper(*c); +void QsciLexer_SetPaper(QsciLexer* self, QColor* c, int style) { + self->setPaper(*c, static_cast(style)); } void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style) { @@ -349,18 +350,6 @@ struct miqt_string QsciLexer_TrUtf83(const char* s, const char* c, int n) { return _ms; } -const char* QsciLexer_BlockEnd1(const QsciLexer* self, int* style) { - return (const char*) self->blockEnd(static_cast(style)); -} - -const char* QsciLexer_BlockStart1(const QsciLexer* self, int* style) { - return (const char*) self->blockStart(static_cast(style)); -} - -const char* QsciLexer_BlockStartKeyword1(const QsciLexer* self, int* style) { - return (const char*) self->blockStartKeyword(static_cast(style)); -} - bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix) { return self->readSettings(*qs, prefix); } @@ -369,23 +358,11 @@ bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* return self->writeSettings(*qs, prefix); } -void QsciLexer_SetColor2(QsciLexer* self, QColor* c, int style) { - self->setColor(*c, static_cast(style)); -} - -void QsciLexer_SetEolFill2(QsciLexer* self, bool eoffill, int style) { - self->setEolFill(eoffill, static_cast(style)); -} - -void QsciLexer_SetFont2(QsciLexer* self, QFont* f, int style) { - self->setFont(*f, static_cast(style)); -} - -void QsciLexer_SetPaper2(QsciLexer* self, QColor* c, int style) { - self->setPaper(*c, static_cast(style)); -} - -void QsciLexer_Delete(QsciLexer* self) { - delete self; +void QsciLexer_Delete(QsciLexer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.go b/qt-restricted-extras/qscintilla/gen_qscilexer.go index 131d6524..1da4ebec 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.go @@ -16,7 +16,8 @@ import ( ) type QsciLexer struct { - h *C.QsciLexer + h *C.QsciLexer + isSubclass bool *qt.QObject } @@ -34,15 +35,23 @@ func (this *QsciLexer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexer(h *C.QsciLexer) *QsciLexer { +// newQsciLexer constructs the type using only CGO pointers. +func newQsciLexer(h *C.QsciLexer, h_QObject *C.QObject) *QsciLexer { if h == nil { return nil } - return &QsciLexer{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QsciLexer{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQsciLexer(h unsafe.Pointer) *QsciLexer { - return newQsciLexer((*C.QsciLexer)(h)) +// UnsafeNewQsciLexer constructs the type using only unsafe pointers. +func UnsafeNewQsciLexer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexer { + if h == nil { + return nil + } + + return &QsciLexer{h: (*C.QsciLexer)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QsciLexer) MetaObject() *qt.QMetaObject { @@ -88,7 +97,7 @@ func (this *QsciLexer) LexerId() int { } func (this *QsciLexer) Apis() *QsciAbstractAPIs { - return UnsafeNewQsciAbstractAPIs(unsafe.Pointer(C.QsciLexer_Apis(this.h))) + return UnsafeNewQsciAbstractAPIs(unsafe.Pointer(C.QsciLexer_Apis(this.h)), nil) } func (this *QsciLexer) AutoCompletionFillups() string { @@ -113,8 +122,8 @@ func (this *QsciLexer) AutoIndentStyle() int { return (int)(C.QsciLexer_AutoIndentStyle(this.h)) } -func (this *QsciLexer) BlockEnd() string { - _ret := C.QsciLexer_BlockEnd(this.h) +func (this *QsciLexer) BlockEnd(style *int) string { + _ret := C.QsciLexer_BlockEnd(this.h, (*C.int)(unsafe.Pointer(style))) return C.GoString(_ret) } @@ -122,13 +131,13 @@ func (this *QsciLexer) BlockLookback() int { return (int)(C.QsciLexer_BlockLookback(this.h)) } -func (this *QsciLexer) BlockStart() string { - _ret := C.QsciLexer_BlockStart(this.h) +func (this *QsciLexer) BlockStart(style *int) string { + _ret := C.QsciLexer_BlockStart(this.h, (*C.int)(unsafe.Pointer(style))) return C.GoString(_ret) } -func (this *QsciLexer) BlockStartKeyword() string { - _ret := C.QsciLexer_BlockStartKeyword(this.h) +func (this *QsciLexer) BlockStartKeyword(style *int) string { + _ret := C.QsciLexer_BlockStartKeyword(this.h, (*C.int)(unsafe.Pointer(style))) return C.GoString(_ret) } @@ -232,7 +241,7 @@ func (this *QsciLexer) DefaultPaperWithStyle(style int) *qt.QColor { } func (this *QsciLexer) Editor() *QsciScintilla { - return UnsafeNewQsciScintilla(unsafe.Pointer(C.QsciLexer_Editor(this.h))) + return UnsafeNewQsciScintilla(unsafe.Pointer(C.QsciLexer_Editor(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QsciLexer) SetAPIs(apis *QsciAbstractAPIs) { @@ -280,20 +289,20 @@ func (this *QsciLexer) SetAutoIndentStyle(autoindentstyle int) { C.QsciLexer_SetAutoIndentStyle(this.h, (C.int)(autoindentstyle)) } -func (this *QsciLexer) SetColor(c *qt.QColor) { - C.QsciLexer_SetColor(this.h, (*C.QColor)(c.UnsafePointer())) +func (this *QsciLexer) SetColor(c *qt.QColor, style int) { + C.QsciLexer_SetColor(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) } -func (this *QsciLexer) SetEolFill(eoffill bool) { - C.QsciLexer_SetEolFill(this.h, (C.bool)(eoffill)) +func (this *QsciLexer) SetEolFill(eoffill bool, style int) { + C.QsciLexer_SetEolFill(this.h, (C.bool)(eoffill), (C.int)(style)) } -func (this *QsciLexer) SetFont(f *qt.QFont) { - C.QsciLexer_SetFont(this.h, (*C.QFont)(f.UnsafePointer())) +func (this *QsciLexer) SetFont(f *qt.QFont, style int) { + C.QsciLexer_SetFont(this.h, (*C.QFont)(f.UnsafePointer()), (C.int)(style)) } -func (this *QsciLexer) SetPaper(c *qt.QColor) { - C.QsciLexer_SetPaper(this.h, (*C.QColor)(c.UnsafePointer())) +func (this *QsciLexer) SetPaper(c *qt.QColor, style int) { + C.QsciLexer_SetPaper(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) } func (this *QsciLexer) ColorChanged(c *qt.QColor, style int) { @@ -453,21 +462,6 @@ func QsciLexer_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QsciLexer) BlockEnd1(style *int) string { - _ret := C.QsciLexer_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style))) - return C.GoString(_ret) -} - -func (this *QsciLexer) BlockStart1(style *int) string { - _ret := C.QsciLexer_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style))) - return C.GoString(_ret) -} - -func (this *QsciLexer) BlockStartKeyword1(style *int) string { - _ret := C.QsciLexer_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style))) - return C.GoString(_ret) -} - func (this *QsciLexer) ReadSettings2(qs *qt.QSettings, prefix string) bool { prefix_Cstring := C.CString(prefix) defer C.free(unsafe.Pointer(prefix_Cstring)) @@ -480,25 +474,9 @@ func (this *QsciLexer) WriteSettings2(qs *qt.QSettings, prefix string) bool { return (bool)(C.QsciLexer_WriteSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring)) } -func (this *QsciLexer) SetColor2(c *qt.QColor, style int) { - C.QsciLexer_SetColor2(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) -} - -func (this *QsciLexer) SetEolFill2(eoffill bool, style int) { - C.QsciLexer_SetEolFill2(this.h, (C.bool)(eoffill), (C.int)(style)) -} - -func (this *QsciLexer) SetFont2(f *qt.QFont, style int) { - C.QsciLexer_SetFont2(this.h, (*C.QFont)(f.UnsafePointer()), (C.int)(style)) -} - -func (this *QsciLexer) SetPaper2(c *qt.QColor, style int) { - C.QsciLexer_SetPaper2(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) -} - // Delete this object from C++ memory. func (this *QsciLexer) Delete() { - C.QsciLexer_Delete(this.h) + C.QsciLexer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.h b/qt-restricted-extras/qscintilla/gen_qscilexer.h index ec3dfc70..de7e2de2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.h @@ -18,6 +18,7 @@ extern "C" { class QColor; class QFont; class QMetaObject; +class QObject; class QSettings; class QsciAbstractAPIs; class QsciLexer; @@ -26,6 +27,7 @@ class QsciScintilla; typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSettings QSettings; typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; @@ -43,10 +45,10 @@ QsciAbstractAPIs* QsciLexer_Apis(const QsciLexer* self); const char* QsciLexer_AutoCompletionFillups(const QsciLexer* self); struct miqt_array /* of struct miqt_string */ QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self); int QsciLexer_AutoIndentStyle(QsciLexer* self); -const char* QsciLexer_BlockEnd(const QsciLexer* self); +const char* QsciLexer_BlockEnd(const QsciLexer* self, int* style); int QsciLexer_BlockLookback(const QsciLexer* self); -const char* QsciLexer_BlockStart(const QsciLexer* self); -const char* QsciLexer_BlockStartKeyword(const QsciLexer* self); +const char* QsciLexer_BlockStart(const QsciLexer* self, int* style); +const char* QsciLexer_BlockStartKeyword(const QsciLexer* self, int* style); int QsciLexer_BraceStyle(const QsciLexer* self); bool QsciLexer_CaseSensitive(const QsciLexer* self); QColor* QsciLexer_Color(const QsciLexer* self, int style); @@ -76,10 +78,10 @@ int QsciLexer_StyleBitsNeeded(const QsciLexer* self); const char* QsciLexer_WordCharacters(const QsciLexer* self); bool QsciLexer_WriteSettings(const QsciLexer* self, QSettings* qs); void QsciLexer_SetAutoIndentStyle(QsciLexer* self, int autoindentstyle); -void QsciLexer_SetColor(QsciLexer* self, QColor* c); -void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill); -void QsciLexer_SetFont(QsciLexer* self, QFont* f); -void QsciLexer_SetPaper(QsciLexer* self, QColor* c); +void QsciLexer_SetColor(QsciLexer* self, QColor* c, int style); +void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill, int style); +void QsciLexer_SetFont(QsciLexer* self, QFont* f, int style); +void QsciLexer_SetPaper(QsciLexer* self, QColor* c, int style); void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style); void QsciLexer_connect_ColorChanged(QsciLexer* self, intptr_t slot); void QsciLexer_EolFillChanged(QsciLexer* self, bool eolfilled, int style); @@ -90,20 +92,15 @@ void QsciLexer_PaperChanged(QsciLexer* self, QColor* c, int style); void QsciLexer_connect_PaperChanged(QsciLexer* self, intptr_t slot); void QsciLexer_PropertyChanged(QsciLexer* self, const char* prop, const char* val); void QsciLexer_connect_PropertyChanged(QsciLexer* self, intptr_t slot); +bool QsciLexer_ReadProperties(QsciLexer* self, QSettings* qs, struct miqt_string prefix); +bool QsciLexer_WriteProperties(const QsciLexer* self, QSettings* qs, struct miqt_string prefix); struct miqt_string QsciLexer_Tr2(const char* s, const char* c); struct miqt_string QsciLexer_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexer_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexer_TrUtf83(const char* s, const char* c, int n); -const char* QsciLexer_BlockEnd1(const QsciLexer* self, int* style); -const char* QsciLexer_BlockStart1(const QsciLexer* self, int* style); -const char* QsciLexer_BlockStartKeyword1(const QsciLexer* self, int* style); bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix); bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* prefix); -void QsciLexer_SetColor2(QsciLexer* self, QColor* c, int style); -void QsciLexer_SetEolFill2(QsciLexer* self, bool eoffill, int style); -void QsciLexer_SetFont2(QsciLexer* self, QFont* f, int style); -void QsciLexer_SetPaper2(QsciLexer* self, QColor* c, int style); -void QsciLexer_Delete(QsciLexer* self); +void QsciLexer_Delete(QsciLexer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp index 756c0dd0..bfef421f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexeravs.h" #include "_cgo_export.h" -QsciLexerAVS* QsciLexerAVS_new() { - return new QsciLexerAVS(); +class MiqtVirtualQsciLexerAVS : public virtual QsciLexerAVS { +public: + + MiqtVirtualQsciLexerAVS(): QsciLexerAVS() {}; + MiqtVirtualQsciLexerAVS(QObject* parent): QsciLexerAVS(parent) {}; + + virtual ~MiqtVirtualQsciLexerAVS() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerAVS::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerAVS_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerAVS::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerAVS::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerAVS_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerAVS::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerAVS::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerAVS::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerAVS::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerAVS::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerAVS::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerAVS::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerAVS::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerAVS_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerAVS::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerAVS::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerAVS::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerAVS::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerAVS::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerAVS::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerAVS::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerAVS::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerAVS::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerAVS::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerAVS::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerAVS::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerAVS::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerAVS::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerAVS::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerAVS::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerAVS::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerAVS::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerAVS_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerAVS::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerAVS::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerAVS::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerAVS::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerAVS::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerAVS::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerAVS::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerAVS_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerAVS::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerAVS::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerAVS::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerAVS::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerAVS::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerAVS::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerAVS::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerAVS::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerAVS::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerAVS::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerAVS::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerAVS_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerAVS::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerAVS::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerAVS_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerAVS::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerAVS::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerAVS::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerAVS::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerAVS::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerAVS::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerAVS_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerAVS::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerAVS::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerAVS::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerAVS::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerAVS::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerAVS::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerAVS::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerAVS::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerAVS::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerAVS::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerAVS::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerAVS::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerAVS::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(); + *outptr_QsciLexerAVS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerAVS* QsciLexerAVS_new2(QObject* parent) { - return new QsciLexerAVS(parent); +void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(parent); + *outptr_QsciLexerAVS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self) { @@ -150,7 +1034,291 @@ struct miqt_string QsciLexerAVS_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerAVS_Delete(QsciLexerAVS* self) { - delete self; +void QsciLexerAVS_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerAVS_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerAVS_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerAVS_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerAVS_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Language = slot; +} + +void QsciLexerAVS_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerAVS_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerAVS_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__LexerId = slot; +} + +int QsciLexerAVS_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerAVS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerAVS_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerAVS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerAVS_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerAVS_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerAVS_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerAVS_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerAVS_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerAVS_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerAVS_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerAVS_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerAVS_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerAVS_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerAVS_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerAVS_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerAVS_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerAVS_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerAVS_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Color(style); +} + +void QsciLexerAVS_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerAVS_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerAVS_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerAVS_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Font(style); +} + +void QsciLexerAVS_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerAVS_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerAVS_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerAVS_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerAVS_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerAVS_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerAVS_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Description = slot; +} + +void QsciLexerAVS_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerAVS_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerAVS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerAVS_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerAVS_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerAVS_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerAVS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerAVS_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerAVS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerAVS_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerAVS_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerAVS_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerAVS_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerAVS_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerAVS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerAVS_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerAVS_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerAVS_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerAVS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerAVS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerAVS_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetColor = slot; +} + +void QsciLexerAVS_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerAVS_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerAVS_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerAVS_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetFont = slot; +} + +void QsciLexerAVS_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerAVS_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerAVS_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerAVS_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerAVS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerAVS_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerAVS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerAVS_Delete(QsciLexerAVS* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.go b/qt-restricted-extras/qscintilla/gen_qscilexeravs.go index 24985246..537ba877 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerAVS struct { - h *C.QsciLexerAVS + h *C.QsciLexerAVS + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerAVS) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerAVS(h *C.QsciLexerAVS) *QsciLexerAVS { +// newQsciLexerAVS constructs the type using only CGO pointers. +func newQsciLexerAVS(h *C.QsciLexerAVS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerAVS { if h == nil { return nil } - return &QsciLexerAVS{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerAVS{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerAVS(h unsafe.Pointer) *QsciLexerAVS { - return newQsciLexerAVS((*C.QsciLexerAVS)(h)) +// UnsafeNewQsciLexerAVS constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerAVS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerAVS { + if h == nil { + return nil + } + + return &QsciLexerAVS{h: (*C.QsciLexerAVS)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerAVS constructs a new QsciLexerAVS object. func NewQsciLexerAVS() *QsciLexerAVS { - ret := C.QsciLexerAVS_new() - return newQsciLexerAVS(ret) + var outptr_QsciLexerAVS *C.QsciLexerAVS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerAVS_new(&outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerAVS2 constructs a new QsciLexerAVS object. func NewQsciLexerAVS2(parent *qt.QObject) *QsciLexerAVS { - ret := C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerAVS(ret) + var outptr_QsciLexerAVS *C.QsciLexerAVS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerAVS) MetaObject() *qt.QMetaObject { @@ -213,9 +235,940 @@ func QsciLexerAVS_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerAVS) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerAVS_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerAVS) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerAVS_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetFoldComments +func miqt_exec_callback_QsciLexerAVS_SetFoldComments(self *C.QsciLexerAVS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerAVS_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerAVS) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerAVS_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetFoldCompact +func miqt_exec_callback_QsciLexerAVS_SetFoldCompact(self *C.QsciLexerAVS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_Language() string { + + _ret := C.QsciLexerAVS_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnLanguage(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Language +func miqt_exec_callback_QsciLexerAVS_Language(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerAVS_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnLexer(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Lexer +func miqt_exec_callback_QsciLexerAVS_Lexer(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerAVS_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnLexerId(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_LexerId +func miqt_exec_callback_QsciLexerAVS_LexerId(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerAVS_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_AutoCompletionFillups +func miqt_exec_callback_QsciLexerAVS_AutoCompletionFillups(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerAVS_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerAVS) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerAVS_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerAVS_AutoCompletionWordSeparators(self *C.QsciLexerAVS, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerAVS_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerAVS_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockEnd +func miqt_exec_callback_QsciLexerAVS_BlockEnd(self *C.QsciLexerAVS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerAVS_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockLookback +func miqt_exec_callback_QsciLexerAVS_BlockLookback(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerAVS_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerAVS_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockStart +func miqt_exec_callback_QsciLexerAVS_BlockStart(self *C.QsciLexerAVS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerAVS_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerAVS_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockStartKeyword +func miqt_exec_callback_QsciLexerAVS_BlockStartKeyword(self *C.QsciLexerAVS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerAVS_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BraceStyle +func miqt_exec_callback_QsciLexerAVS_BraceStyle(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerAVS_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerAVS_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_CaseSensitive +func miqt_exec_callback_QsciLexerAVS_CaseSensitive(self *C.QsciLexerAVS, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerAVS_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerAVS_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Color +func miqt_exec_callback_QsciLexerAVS_Color(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerAVS_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerAVS) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerAVS_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_EolFill +func miqt_exec_callback_QsciLexerAVS_EolFill(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerAVS_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerAVS_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Font +func miqt_exec_callback_QsciLexerAVS_Font(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerAVS_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_IndentationGuideView +func miqt_exec_callback_QsciLexerAVS_IndentationGuideView(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerAVS_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerAVS_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Keywords +func miqt_exec_callback_QsciLexerAVS_Keywords(self *C.QsciLexerAVS, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerAVS_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultStyle +func miqt_exec_callback_QsciLexerAVS_DefaultStyle(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerAVS_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerAVS) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerAVS_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Description +func miqt_exec_callback_QsciLexerAVS_Description(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerAVS) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerAVS_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerAVS_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Paper +func miqt_exec_callback_QsciLexerAVS_Paper(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerAVS_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerAVS_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerAVS_DefaultColorWithStyle(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerAVS_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerAVS) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerAVS_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultEolFill +func miqt_exec_callback_QsciLexerAVS_DefaultEolFill(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerAVS_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerAVS_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerAVS_DefaultFontWithStyle(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerAVS_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerAVS_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerAVS_DefaultPaperWithStyle(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerAVS_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerAVS) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerAVS_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetEditor +func miqt_exec_callback_QsciLexerAVS_SetEditor(self *C.QsciLexerAVS, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_RefreshProperties() { + + C.QsciLexerAVS_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerAVS) OnRefreshProperties(slot func(super func())) { + C.QsciLexerAVS_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_RefreshProperties +func miqt_exec_callback_QsciLexerAVS_RefreshProperties(self *C.QsciLexerAVS, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerAVS) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerAVS_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_StyleBitsNeeded +func miqt_exec_callback_QsciLexerAVS_StyleBitsNeeded(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerAVS_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_WordCharacters +func miqt_exec_callback_QsciLexerAVS_WordCharacters(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerAVS_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerAVS) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerAVS_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerAVS_SetAutoIndentStyle(self *C.QsciLexerAVS, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerAVS_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerAVS_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetColor +func miqt_exec_callback_QsciLexerAVS_SetColor(self *C.QsciLexerAVS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerAVS_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerAVS_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetEolFill +func miqt_exec_callback_QsciLexerAVS_SetEolFill(self *C.QsciLexerAVS, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerAVS_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerAVS_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetFont +func miqt_exec_callback_QsciLexerAVS_SetFont(self *C.QsciLexerAVS, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerAVS_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerAVS_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetPaper +func miqt_exec_callback_QsciLexerAVS_SetPaper(self *C.QsciLexerAVS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerAVS_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerAVS) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerAVS_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_ReadProperties +func miqt_exec_callback_QsciLexerAVS_ReadProperties(self *C.QsciLexerAVS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerAVS_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerAVS) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerAVS_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_WriteProperties +func miqt_exec_callback_QsciLexerAVS_WriteProperties(self *C.QsciLexerAVS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerAVS) Delete() { - C.QsciLexerAVS_Delete(this.h) + C.QsciLexerAVS_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.h b/qt-restricted-extras/qscintilla/gen_qscilexeravs.h index 1dc7fbe0..f2e8d18c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerAVS; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerAVS QsciLexerAVS; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerAVS* QsciLexerAVS_new(); -QsciLexerAVS* QsciLexerAVS_new2(QObject* parent); +void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self); void* QsciLexerAVS_Metacast(QsciLexerAVS* self, const char* param1); struct miqt_string QsciLexerAVS_Tr(const char* s); @@ -51,7 +57,79 @@ struct miqt_string QsciLexerAVS_Tr2(const char* s, const char* c); struct miqt_string QsciLexerAVS_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerAVS_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerAVS_TrUtf83(const char* s, const char* c, int n); -void QsciLexerAVS_Delete(QsciLexerAVS* self); +void QsciLexerAVS_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerAVS_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerAVS_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_Language(const void* self); +void QsciLexerAVS_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_Lexer(const void* self); +void QsciLexerAVS_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_LexerId(const void* self); +void QsciLexerAVS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerAVS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerAVS_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerAVS_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerAVS_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_BlockLookback(const void* self); +void QsciLexerAVS_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerAVS_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerAVS_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_BraceStyle(const void* self); +void QsciLexerAVS_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_CaseSensitive(const void* self); +void QsciLexerAVS_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_Color(const void* self, int style); +void QsciLexerAVS_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_EolFill(const void* self, int style); +void QsciLexerAVS_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerAVS_virtualbase_Font(const void* self, int style); +void QsciLexerAVS_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_IndentationGuideView(const void* self); +void QsciLexerAVS_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_Keywords(const void* self, int set); +void QsciLexerAVS_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_DefaultStyle(const void* self); +void QsciLexerAVS_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerAVS_virtualbase_Description(const void* self, int style); +void QsciLexerAVS_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_Paper(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerAVS_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerAVS_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerAVS_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_RefreshProperties(void* self); +void QsciLexerAVS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerAVS_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_WordCharacters(const void* self); +void QsciLexerAVS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerAVS_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerAVS_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerAVS_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerAVS_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerAVS_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerAVS_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerAVS_Delete(QsciLexerAVS* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp index 7f514f10..caa647e7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexerbash.h" #include "_cgo_export.h" -QsciLexerBash* QsciLexerBash_new() { - return new QsciLexerBash(); +class MiqtVirtualQsciLexerBash : public virtual QsciLexerBash { +public: + + MiqtVirtualQsciLexerBash(): QsciLexerBash() {}; + MiqtVirtualQsciLexerBash(QObject* parent): QsciLexerBash(parent) {}; + + virtual ~MiqtVirtualQsciLexerBash() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerBash::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerBash_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerBash::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerBash::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerBash_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerBash::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerBash::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerBash::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerBash::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerBash::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerBash::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerBash::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerBash::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerBash_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerBash::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerBash::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerBash::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerBash::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerBash::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerBash::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerBash::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerBash::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerBash::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerBash::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerBash::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerBash::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerBash::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerBash::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerBash::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerBash::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerBash::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerBash::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBash_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerBash::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerBash::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerBash::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerBash::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerBash::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerBash::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerBash::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerBash_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerBash::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerBash::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerBash::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerBash::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerBash::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerBash::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerBash::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerBash::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerBash::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerBash::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerBash::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerBash_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerBash::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerBash::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerBash_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerBash::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerBash::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerBash::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerBash::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerBash::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerBash::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerBash_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerBash::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerBash::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerBash::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerBash::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerBash::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerBash::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerBash::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerBash::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerBash::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerBash::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBash::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerBash::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBash::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(); + *outptr_QsciLexerBash = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerBash* QsciLexerBash_new2(QObject* parent) { - return new QsciLexerBash(parent); +void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(parent); + *outptr_QsciLexerBash = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self) { @@ -158,7 +1042,291 @@ struct miqt_string QsciLexerBash_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerBash_Delete(QsciLexerBash* self) { - delete self; +void QsciLexerBash_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerBash_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerBash_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerBash_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerBash_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Language = slot; +} + +void QsciLexerBash_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerBash_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerBash_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__LexerId = slot; +} + +int QsciLexerBash_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerBash_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerBash_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerBash_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerBash_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerBash_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerBash_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerBash_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerBash_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerBash_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerBash_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerBash_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerBash_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerBash_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerBash_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerBash_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerBash_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerBash_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerBash_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Color(style); +} + +void QsciLexerBash_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerBash_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerBash_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerBash_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Font(style); +} + +void QsciLexerBash_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerBash_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerBash_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerBash_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerBash_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerBash_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerBash_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Description = slot; +} + +void QsciLexerBash_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerBash_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerBash_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerBash_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerBash_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerBash_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerBash_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerBash_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerBash_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerBash_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerBash_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerBash_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerBash_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerBash_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerBash_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerBash_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerBash_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerBash_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerBash_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerBash_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerBash_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetColor = slot; +} + +void QsciLexerBash_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerBash_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerBash_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerBash_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetFont = slot; +} + +void QsciLexerBash_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerBash_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerBash_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerBash_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerBash_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerBash_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerBash_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerBash_Delete(QsciLexerBash* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.go b/qt-restricted-extras/qscintilla/gen_qscilexerbash.go index 8166a961..fd245f2e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -34,7 +35,8 @@ const ( ) type QsciLexerBash struct { - h *C.QsciLexerBash + h *C.QsciLexerBash + isSubclass bool *QsciLexer } @@ -52,27 +54,47 @@ func (this *QsciLexerBash) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerBash(h *C.QsciLexerBash) *QsciLexerBash { +// newQsciLexerBash constructs the type using only CGO pointers. +func newQsciLexerBash(h *C.QsciLexerBash, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBash { if h == nil { return nil } - return &QsciLexerBash{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerBash{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerBash(h unsafe.Pointer) *QsciLexerBash { - return newQsciLexerBash((*C.QsciLexerBash)(h)) +// UnsafeNewQsciLexerBash constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerBash(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBash { + if h == nil { + return nil + } + + return &QsciLexerBash{h: (*C.QsciLexerBash)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerBash constructs a new QsciLexerBash object. func NewQsciLexerBash() *QsciLexerBash { - ret := C.QsciLexerBash_new() - return newQsciLexerBash(ret) + var outptr_QsciLexerBash *C.QsciLexerBash = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBash_new(&outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerBash2 constructs a new QsciLexerBash object. func NewQsciLexerBash2(parent *qt.QObject) *QsciLexerBash { - ret := C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerBash(ret) + var outptr_QsciLexerBash *C.QsciLexerBash = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerBash) MetaObject() *qt.QMetaObject { @@ -223,9 +245,940 @@ func QsciLexerBash_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerBash) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerBash_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerBash) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerBash_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetFoldComments +func miqt_exec_callback_QsciLexerBash_SetFoldComments(self *C.QsciLexerBash, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerBash_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerBash) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerBash_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetFoldCompact +func miqt_exec_callback_QsciLexerBash_SetFoldCompact(self *C.QsciLexerBash, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_Language() string { + + _ret := C.QsciLexerBash_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnLanguage(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Language +func miqt_exec_callback_QsciLexerBash_Language(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerBash_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnLexer(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Lexer +func miqt_exec_callback_QsciLexerBash_Lexer(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerBash_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnLexerId(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_LexerId +func miqt_exec_callback_QsciLexerBash_LexerId(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerBash_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_AutoCompletionFillups +func miqt_exec_callback_QsciLexerBash_AutoCompletionFillups(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerBash_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerBash) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerBash_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerBash_AutoCompletionWordSeparators(self *C.QsciLexerBash, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerBash) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerBash_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBash_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockEnd +func miqt_exec_callback_QsciLexerBash_BlockEnd(self *C.QsciLexerBash, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerBash_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockLookback +func miqt_exec_callback_QsciLexerBash_BlockLookback(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerBash_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBash_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockStart +func miqt_exec_callback_QsciLexerBash_BlockStart(self *C.QsciLexerBash, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerBash_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBash_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockStartKeyword +func miqt_exec_callback_QsciLexerBash_BlockStartKeyword(self *C.QsciLexerBash, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerBash_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BraceStyle +func miqt_exec_callback_QsciLexerBash_BraceStyle(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerBash_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerBash_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_CaseSensitive +func miqt_exec_callback_QsciLexerBash_CaseSensitive(self *C.QsciLexerBash, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerBash_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBash_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Color +func miqt_exec_callback_QsciLexerBash_Color(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerBash_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBash) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBash_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_EolFill +func miqt_exec_callback_QsciLexerBash_EolFill(self *C.QsciLexerBash, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerBash_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerBash_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Font +func miqt_exec_callback_QsciLexerBash_Font(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerBash_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_IndentationGuideView +func miqt_exec_callback_QsciLexerBash_IndentationGuideView(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerBash_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerBash_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Keywords +func miqt_exec_callback_QsciLexerBash_Keywords(self *C.QsciLexerBash, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerBash_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultStyle +func miqt_exec_callback_QsciLexerBash_DefaultStyle(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerBash_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerBash) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerBash_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Description +func miqt_exec_callback_QsciLexerBash_Description(self *C.QsciLexerBash, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerBash) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerBash_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBash_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Paper +func miqt_exec_callback_QsciLexerBash_Paper(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerBash_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBash_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerBash_DefaultColorWithStyle(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerBash_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBash) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBash_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultEolFill +func miqt_exec_callback_QsciLexerBash_DefaultEolFill(self *C.QsciLexerBash, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerBash_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerBash_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerBash_DefaultFontWithStyle(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerBash_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBash_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerBash_DefaultPaperWithStyle(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerBash_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerBash) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerBash_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetEditor +func miqt_exec_callback_QsciLexerBash_SetEditor(self *C.QsciLexerBash, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_RefreshProperties() { + + C.QsciLexerBash_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerBash) OnRefreshProperties(slot func(super func())) { + C.QsciLexerBash_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_RefreshProperties +func miqt_exec_callback_QsciLexerBash_RefreshProperties(self *C.QsciLexerBash, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerBash) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerBash_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_StyleBitsNeeded +func miqt_exec_callback_QsciLexerBash_StyleBitsNeeded(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerBash_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_WordCharacters +func miqt_exec_callback_QsciLexerBash_WordCharacters(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerBash_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerBash) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerBash_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerBash_SetAutoIndentStyle(self *C.QsciLexerBash, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerBash_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerBash_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetColor +func miqt_exec_callback_QsciLexerBash_SetColor(self *C.QsciLexerBash, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerBash_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerBash_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetEolFill +func miqt_exec_callback_QsciLexerBash_SetEolFill(self *C.QsciLexerBash, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerBash_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerBash_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetFont +func miqt_exec_callback_QsciLexerBash_SetFont(self *C.QsciLexerBash, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerBash_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerBash_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetPaper +func miqt_exec_callback_QsciLexerBash_SetPaper(self *C.QsciLexerBash, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBash_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBash) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerBash_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_ReadProperties +func miqt_exec_callback_QsciLexerBash_ReadProperties(self *C.QsciLexerBash, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBash_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBash) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerBash_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_WriteProperties +func miqt_exec_callback_QsciLexerBash_WriteProperties(self *C.QsciLexerBash, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerBash) Delete() { - C.QsciLexerBash_Delete(this.h) + C.QsciLexerBash_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.h b/qt-restricted-extras/qscintilla/gen_qscilexerbash.h index 02ed8341..0fb9f0e4 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerBash; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerBash QsciLexerBash; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerBash* QsciLexerBash_new(); -QsciLexerBash* QsciLexerBash_new2(QObject* parent); +void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self); void* QsciLexerBash_Metacast(QsciLexerBash* self, const char* param1); struct miqt_string QsciLexerBash_Tr(const char* s); @@ -53,7 +59,79 @@ struct miqt_string QsciLexerBash_Tr2(const char* s, const char* c); struct miqt_string QsciLexerBash_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerBash_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerBash_TrUtf83(const char* s, const char* c, int n); -void QsciLexerBash_Delete(QsciLexerBash* self); +void QsciLexerBash_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerBash_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerBash_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_Language(const void* self); +void QsciLexerBash_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_Lexer(const void* self); +void QsciLexerBash_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_LexerId(const void* self); +void QsciLexerBash_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerBash_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerBash_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerBash_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerBash_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_BlockLookback(const void* self); +void QsciLexerBash_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerBash_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerBash_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_BraceStyle(const void* self); +void QsciLexerBash_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_CaseSensitive(const void* self); +void QsciLexerBash_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_Color(const void* self, int style); +void QsciLexerBash_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_EolFill(const void* self, int style); +void QsciLexerBash_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerBash_virtualbase_Font(const void* self, int style); +void QsciLexerBash_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_IndentationGuideView(const void* self); +void QsciLexerBash_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_Keywords(const void* self, int set); +void QsciLexerBash_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_DefaultStyle(const void* self); +void QsciLexerBash_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerBash_virtualbase_Description(const void* self, int style); +void QsciLexerBash_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_Paper(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerBash_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerBash_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerBash_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_RefreshProperties(void* self); +void QsciLexerBash_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerBash_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_WordCharacters(const void* self); +void QsciLexerBash_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerBash_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerBash_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerBash_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerBash_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerBash_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBash_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBash_Delete(QsciLexerBash* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp index 3e30314a..d690666e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerbatch.h" #include "_cgo_export.h" -QsciLexerBatch* QsciLexerBatch_new() { - return new QsciLexerBatch(); +class MiqtVirtualQsciLexerBatch : public virtual QsciLexerBatch { +public: + + MiqtVirtualQsciLexerBatch(): QsciLexerBatch() {}; + MiqtVirtualQsciLexerBatch(QObject* parent): QsciLexerBatch(parent) {}; + + virtual ~MiqtVirtualQsciLexerBatch() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerBatch::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerBatch::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerBatch::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerBatch::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerBatch::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerBatch::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerBatch::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerBatch_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerBatch::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerBatch::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerBatch::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerBatch::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerBatch::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerBatch::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerBatch::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerBatch::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerBatch::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerBatch::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerBatch::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerBatch::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerBatch::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerBatch::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerBatch::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerBatch::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerBatch::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerBatch::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBatch_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerBatch::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerBatch::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerBatch::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerBatch::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerBatch::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerBatch::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerBatch::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerBatch_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerBatch::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerBatch::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerBatch::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerBatch::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerBatch::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerBatch::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerBatch::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerBatch::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerBatch::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerBatch::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerBatch::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerBatch_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerBatch::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerBatch::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerBatch_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerBatch::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerBatch::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerBatch::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerBatch::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerBatch::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerBatch::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerBatch_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerBatch::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerBatch::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerBatch::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerBatch::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerBatch::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerBatch::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerBatch::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerBatch::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerBatch::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerBatch::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBatch::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerBatch::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBatch::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(); + *outptr_QsciLexerBatch = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerBatch* QsciLexerBatch_new2(QObject* parent) { - return new QsciLexerBatch(parent); +void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(parent); + *outptr_QsciLexerBatch = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self) { @@ -138,7 +974,275 @@ struct miqt_string QsciLexerBatch_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerBatch_Delete(QsciLexerBatch* self) { - delete self; +void QsciLexerBatch_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Language = slot; +} + +void QsciLexerBatch_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerBatch_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerBatch_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__LexerId = slot; +} + +int QsciLexerBatch_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerBatch_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerBatch_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerBatch_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerBatch_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerBatch_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerBatch_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerBatch_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerBatch_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerBatch_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerBatch_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerBatch_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerBatch_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerBatch_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerBatch_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerBatch_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerBatch_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerBatch_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerBatch_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Color(style); +} + +void QsciLexerBatch_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerBatch_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerBatch_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerBatch_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Font(style); +} + +void QsciLexerBatch_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerBatch_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerBatch_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerBatch_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerBatch_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerBatch_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerBatch_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Description = slot; +} + +void QsciLexerBatch_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerBatch_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerBatch_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerBatch_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerBatch_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerBatch_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerBatch_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerBatch_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerBatch_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerBatch_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerBatch_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerBatch_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerBatch_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerBatch_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerBatch_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerBatch_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerBatch_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerBatch_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerBatch_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerBatch_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerBatch_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetColor = slot; +} + +void QsciLexerBatch_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerBatch_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerBatch_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerBatch_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetFont = slot; +} + +void QsciLexerBatch_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerBatch_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerBatch_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerBatch_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerBatch_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerBatch_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerBatch_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerBatch_Delete(QsciLexerBatch* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go index be001c11..d1f5be97 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -28,7 +29,8 @@ const ( ) type QsciLexerBatch struct { - h *C.QsciLexerBatch + h *C.QsciLexerBatch + isSubclass bool *QsciLexer } @@ -46,27 +48,47 @@ func (this *QsciLexerBatch) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerBatch(h *C.QsciLexerBatch) *QsciLexerBatch { +// newQsciLexerBatch constructs the type using only CGO pointers. +func newQsciLexerBatch(h *C.QsciLexerBatch, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBatch { if h == nil { return nil } - return &QsciLexerBatch{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerBatch{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerBatch(h unsafe.Pointer) *QsciLexerBatch { - return newQsciLexerBatch((*C.QsciLexerBatch)(h)) +// UnsafeNewQsciLexerBatch constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerBatch(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBatch { + if h == nil { + return nil + } + + return &QsciLexerBatch{h: (*C.QsciLexerBatch)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerBatch constructs a new QsciLexerBatch object. func NewQsciLexerBatch() *QsciLexerBatch { - ret := C.QsciLexerBatch_new() - return newQsciLexerBatch(ret) + var outptr_QsciLexerBatch *C.QsciLexerBatch = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBatch_new(&outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerBatch2 constructs a new QsciLexerBatch object. func NewQsciLexerBatch2(parent *qt.QObject) *QsciLexerBatch { - ret := C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerBatch(ret) + var outptr_QsciLexerBatch *C.QsciLexerBatch = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerBatch) MetaObject() *qt.QMetaObject { @@ -197,9 +219,894 @@ func QsciLexerBatch_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerBatch) callVirtualBase_Language() string { + + _ret := C.QsciLexerBatch_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnLanguage(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Language +func miqt_exec_callback_QsciLexerBatch_Language(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerBatch_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnLexer(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Lexer +func miqt_exec_callback_QsciLexerBatch_Lexer(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerBatch_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnLexerId(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_LexerId +func miqt_exec_callback_QsciLexerBatch_LexerId(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerBatch_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_AutoCompletionFillups +func miqt_exec_callback_QsciLexerBatch_AutoCompletionFillups(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerBatch_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerBatch) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerBatch_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerBatch_AutoCompletionWordSeparators(self *C.QsciLexerBatch, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerBatch_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBatch_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockEnd +func miqt_exec_callback_QsciLexerBatch_BlockEnd(self *C.QsciLexerBatch, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerBatch_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockLookback +func miqt_exec_callback_QsciLexerBatch_BlockLookback(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerBatch_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBatch_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockStart +func miqt_exec_callback_QsciLexerBatch_BlockStart(self *C.QsciLexerBatch, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerBatch_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBatch_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockStartKeyword +func miqt_exec_callback_QsciLexerBatch_BlockStartKeyword(self *C.QsciLexerBatch, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerBatch_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BraceStyle +func miqt_exec_callback_QsciLexerBatch_BraceStyle(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerBatch_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerBatch_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_CaseSensitive +func miqt_exec_callback_QsciLexerBatch_CaseSensitive(self *C.QsciLexerBatch, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerBatch_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBatch_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Color +func miqt_exec_callback_QsciLexerBatch_Color(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerBatch_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBatch) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBatch_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_EolFill +func miqt_exec_callback_QsciLexerBatch_EolFill(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerBatch_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerBatch_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Font +func miqt_exec_callback_QsciLexerBatch_Font(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerBatch_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_IndentationGuideView +func miqt_exec_callback_QsciLexerBatch_IndentationGuideView(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerBatch_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerBatch_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Keywords +func miqt_exec_callback_QsciLexerBatch_Keywords(self *C.QsciLexerBatch, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerBatch_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultStyle +func miqt_exec_callback_QsciLexerBatch_DefaultStyle(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerBatch_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerBatch) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerBatch_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Description +func miqt_exec_callback_QsciLexerBatch_Description(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerBatch) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerBatch_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBatch_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Paper +func miqt_exec_callback_QsciLexerBatch_Paper(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerBatch_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBatch_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerBatch_DefaultColorWithStyle(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerBatch_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBatch) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBatch_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultEolFill +func miqt_exec_callback_QsciLexerBatch_DefaultEolFill(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerBatch_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerBatch_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerBatch_DefaultFontWithStyle(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerBatch_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerBatch_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerBatch_DefaultPaperWithStyle(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerBatch_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerBatch) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerBatch_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetEditor +func miqt_exec_callback_QsciLexerBatch_SetEditor(self *C.QsciLexerBatch, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerBatch) callVirtualBase_RefreshProperties() { + + C.QsciLexerBatch_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerBatch) OnRefreshProperties(slot func(super func())) { + C.QsciLexerBatch_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_RefreshProperties +func miqt_exec_callback_QsciLexerBatch_RefreshProperties(self *C.QsciLexerBatch, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerBatch) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerBatch_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_StyleBitsNeeded +func miqt_exec_callback_QsciLexerBatch_StyleBitsNeeded(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerBatch_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_WordCharacters +func miqt_exec_callback_QsciLexerBatch_WordCharacters(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerBatch_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerBatch) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerBatch_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerBatch_SetAutoIndentStyle(self *C.QsciLexerBatch, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerBatch_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerBatch_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetColor +func miqt_exec_callback_QsciLexerBatch_SetColor(self *C.QsciLexerBatch, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerBatch_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerBatch_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetEolFill +func miqt_exec_callback_QsciLexerBatch_SetEolFill(self *C.QsciLexerBatch, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerBatch_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerBatch_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetFont +func miqt_exec_callback_QsciLexerBatch_SetFont(self *C.QsciLexerBatch, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerBatch_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerBatch_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetPaper +func miqt_exec_callback_QsciLexerBatch_SetPaper(self *C.QsciLexerBatch, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBatch_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBatch) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerBatch_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_ReadProperties +func miqt_exec_callback_QsciLexerBatch_ReadProperties(self *C.QsciLexerBatch, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBatch_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBatch) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerBatch_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_WriteProperties +func miqt_exec_callback_QsciLexerBatch_WriteProperties(self *C.QsciLexerBatch, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerBatch) Delete() { - C.QsciLexerBatch_Delete(this.h) + C.QsciLexerBatch_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h index 592e298f..549de402 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerBatch; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerBatch QsciLexerBatch; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerBatch* QsciLexerBatch_new(); -QsciLexerBatch* QsciLexerBatch_new2(QObject* parent); +void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self); void* QsciLexerBatch_Metacast(QsciLexerBatch* self, const char* param1); struct miqt_string QsciLexerBatch_Tr(const char* s); @@ -48,7 +54,75 @@ struct miqt_string QsciLexerBatch_Tr2(const char* s, const char* c); struct miqt_string QsciLexerBatch_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerBatch_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerBatch_TrUtf83(const char* s, const char* c, int n); -void QsciLexerBatch_Delete(QsciLexerBatch* self); +void QsciLexerBatch_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_Language(const void* self); +void QsciLexerBatch_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_Lexer(const void* self); +void QsciLexerBatch_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_LexerId(const void* self); +void QsciLexerBatch_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerBatch_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerBatch_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerBatch_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerBatch_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_BlockLookback(const void* self); +void QsciLexerBatch_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerBatch_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerBatch_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_BraceStyle(const void* self); +void QsciLexerBatch_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_CaseSensitive(const void* self); +void QsciLexerBatch_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_Color(const void* self, int style); +void QsciLexerBatch_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_EolFill(const void* self, int style); +void QsciLexerBatch_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerBatch_virtualbase_Font(const void* self, int style); +void QsciLexerBatch_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_IndentationGuideView(const void* self); +void QsciLexerBatch_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_Keywords(const void* self, int set); +void QsciLexerBatch_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_DefaultStyle(const void* self); +void QsciLexerBatch_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerBatch_virtualbase_Description(const void* self, int style); +void QsciLexerBatch_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_Paper(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerBatch_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerBatch_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerBatch_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_RefreshProperties(void* self); +void QsciLexerBatch_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerBatch_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_WordCharacters(const void* self); +void QsciLexerBatch_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerBatch_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerBatch_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerBatch_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerBatch_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerBatch_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBatch_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBatch_Delete(QsciLexerBatch* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp index a363987b..62fb29e2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexercmake.h" #include "_cgo_export.h" -QsciLexerCMake* QsciLexerCMake_new() { - return new QsciLexerCMake(); +class MiqtVirtualQsciLexerCMake : public virtual QsciLexerCMake { +public: + + MiqtVirtualQsciLexerCMake(): QsciLexerCMake() {}; + MiqtVirtualQsciLexerCMake(QObject* parent): QsciLexerCMake(parent) {}; + + virtual ~MiqtVirtualQsciLexerCMake() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerCMake::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCMake_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerCMake::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCMake::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCMake::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCMake::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCMake::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCMake::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCMake::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCMake::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCMake_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCMake::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCMake::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCMake::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCMake::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCMake::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCMake::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCMake::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCMake::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCMake::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCMake::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCMake::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCMake::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCMake::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCMake::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCMake::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCMake::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCMake::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCMake::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCMake_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCMake::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCMake::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCMake::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCMake::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCMake::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCMake::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCMake::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCMake_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCMake::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCMake::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCMake::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCMake::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCMake::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCMake::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCMake::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCMake::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCMake::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCMake::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCMake::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCMake_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCMake::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCMake::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCMake_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCMake::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCMake::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCMake::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCMake::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCMake::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCMake::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCMake_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCMake::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCMake::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCMake::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCMake::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCMake::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCMake::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCMake::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCMake::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCMake::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCMake::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCMake::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCMake::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCMake::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(); + *outptr_QsciLexerCMake = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCMake* QsciLexerCMake_new2(QObject* parent) { - return new QsciLexerCMake(parent); +void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(parent); + *outptr_QsciLexerCMake = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self) { @@ -138,7 +998,283 @@ struct miqt_string QsciLexerCMake_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerCMake_Delete(QsciLexerCMake* self) { - delete self; +void QsciLexerCMake_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerCMake_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerCMake_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Language = slot; +} + +void QsciLexerCMake_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCMake_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCMake_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCMake_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCMake_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCMake_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCMake_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCMake_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCMake_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCMake_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCMake_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCMake_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCMake_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCMake_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCMake_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCMake_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCMake_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCMake_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCMake_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCMake_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCMake_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCMake_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCMake_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCMake_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCMake_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCMake_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCMake_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCMake_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCMake_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCMake_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCMake_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCMake_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCMake_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Description = slot; +} + +void QsciLexerCMake_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCMake_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCMake_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCMake_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCMake_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCMake_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCMake_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCMake_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCMake_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCMake_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCMake_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCMake_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCMake_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCMake_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCMake_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCMake_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCMake_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCMake_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCMake_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCMake_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCMake_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCMake_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCMake_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCMake_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCMake_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCMake_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCMake_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCMake_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCMake_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCMake_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCMake_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCMake_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCMake_Delete(QsciLexerCMake* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.go b/qt-restricted-extras/qscintilla/gen_qscilexercmake.go index f02dee76..0afa2516 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerCMake struct { - h *C.QsciLexerCMake + h *C.QsciLexerCMake + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerCMake) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCMake(h *C.QsciLexerCMake) *QsciLexerCMake { +// newQsciLexerCMake constructs the type using only CGO pointers. +func newQsciLexerCMake(h *C.QsciLexerCMake, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCMake { if h == nil { return nil } - return &QsciLexerCMake{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCMake{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCMake(h unsafe.Pointer) *QsciLexerCMake { - return newQsciLexerCMake((*C.QsciLexerCMake)(h)) +// UnsafeNewQsciLexerCMake constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCMake(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCMake { + if h == nil { + return nil + } + + return &QsciLexerCMake{h: (*C.QsciLexerCMake)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCMake constructs a new QsciLexerCMake object. func NewQsciLexerCMake() *QsciLexerCMake { - ret := C.QsciLexerCMake_new() - return newQsciLexerCMake(ret) + var outptr_QsciLexerCMake *C.QsciLexerCMake = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCMake_new(&outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCMake2 constructs a new QsciLexerCMake object. func NewQsciLexerCMake2(parent *qt.QObject) *QsciLexerCMake { - ret := C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCMake(ret) + var outptr_QsciLexerCMake *C.QsciLexerCMake = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCMake) MetaObject() *qt.QMetaObject { @@ -203,9 +225,917 @@ func QsciLexerCMake_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerCMake) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerCMake_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCMake) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCMake_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetFoldAtElse +func miqt_exec_callback_QsciLexerCMake_SetFoldAtElse(self *C.QsciLexerCMake, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerCMake) callVirtualBase_Language() string { + + _ret := C.QsciLexerCMake_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Language +func miqt_exec_callback_QsciLexerCMake_Language(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCMake_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnLexer(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Lexer +func miqt_exec_callback_QsciLexerCMake_Lexer(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCMake_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_LexerId +func miqt_exec_callback_QsciLexerCMake_LexerId(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCMake_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCMake_AutoCompletionFillups(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCMake_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCMake) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCMake_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCMake_AutoCompletionWordSeparators(self *C.QsciLexerCMake, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCMake_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCMake_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockEnd +func miqt_exec_callback_QsciLexerCMake_BlockEnd(self *C.QsciLexerCMake, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCMake_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockLookback +func miqt_exec_callback_QsciLexerCMake_BlockLookback(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCMake_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCMake_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockStart +func miqt_exec_callback_QsciLexerCMake_BlockStart(self *C.QsciLexerCMake, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCMake_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCMake_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockStartKeyword +func miqt_exec_callback_QsciLexerCMake_BlockStartKeyword(self *C.QsciLexerCMake, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCMake_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BraceStyle +func miqt_exec_callback_QsciLexerCMake_BraceStyle(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCMake_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCMake_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_CaseSensitive +func miqt_exec_callback_QsciLexerCMake_CaseSensitive(self *C.QsciLexerCMake, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerCMake_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCMake_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Color +func miqt_exec_callback_QsciLexerCMake_Color(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCMake_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCMake) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCMake_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_EolFill +func miqt_exec_callback_QsciLexerCMake_EolFill(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerCMake_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCMake_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Font +func miqt_exec_callback_QsciLexerCMake_Font(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCMake_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_IndentationGuideView +func miqt_exec_callback_QsciLexerCMake_IndentationGuideView(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCMake_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCMake_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Keywords +func miqt_exec_callback_QsciLexerCMake_Keywords(self *C.QsciLexerCMake, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCMake_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultStyle +func miqt_exec_callback_QsciLexerCMake_DefaultStyle(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCMake_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCMake) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCMake_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Description +func miqt_exec_callback_QsciLexerCMake_Description(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCMake) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerCMake_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCMake_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Paper +func miqt_exec_callback_QsciLexerCMake_Paper(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCMake_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCMake_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCMake_DefaultColorWithStyle(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCMake_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCMake) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCMake_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultEolFill +func miqt_exec_callback_QsciLexerCMake_DefaultEolFill(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerCMake_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCMake_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCMake_DefaultFontWithStyle(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCMake_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCMake_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCMake_DefaultPaperWithStyle(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCMake_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCMake) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCMake_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetEditor +func miqt_exec_callback_QsciLexerCMake_SetEditor(self *C.QsciLexerCMake, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCMake) callVirtualBase_RefreshProperties() { + + C.QsciLexerCMake_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCMake) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCMake_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_RefreshProperties +func miqt_exec_callback_QsciLexerCMake_RefreshProperties(self *C.QsciLexerCMake, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCMake) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCMake_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCMake_StyleBitsNeeded(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCMake_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_WordCharacters +func miqt_exec_callback_QsciLexerCMake_WordCharacters(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCMake_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCMake) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCMake_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCMake_SetAutoIndentStyle(self *C.QsciLexerCMake, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerCMake_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCMake_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetColor +func miqt_exec_callback_QsciLexerCMake_SetColor(self *C.QsciLexerCMake, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCMake_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCMake_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetEolFill +func miqt_exec_callback_QsciLexerCMake_SetEolFill(self *C.QsciLexerCMake, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerCMake_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerCMake_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetFont +func miqt_exec_callback_QsciLexerCMake_SetFont(self *C.QsciLexerCMake, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerCMake_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCMake_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetPaper +func miqt_exec_callback_QsciLexerCMake_SetPaper(self *C.QsciLexerCMake, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCMake_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCMake) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCMake_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_ReadProperties +func miqt_exec_callback_QsciLexerCMake_ReadProperties(self *C.QsciLexerCMake, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCMake_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCMake) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCMake_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_WriteProperties +func miqt_exec_callback_QsciLexerCMake_WriteProperties(self *C.QsciLexerCMake, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCMake) Delete() { - C.QsciLexerCMake_Delete(this.h) + C.QsciLexerCMake_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.h b/qt-restricted-extras/qscintilla/gen_qscilexercmake.h index 945208ca..0816a358 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCMake; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCMake QsciLexerCMake; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCMake* QsciLexerCMake_new(); -QsciLexerCMake* QsciLexerCMake_new2(QObject* parent); +void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self); void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1); struct miqt_string QsciLexerCMake_Tr(const char* s); @@ -48,7 +54,77 @@ struct miqt_string QsciLexerCMake_Tr2(const char* s, const char* c); struct miqt_string QsciLexerCMake_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerCMake_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerCMake_TrUtf83(const char* s, const char* c, int n); -void QsciLexerCMake_Delete(QsciLexerCMake* self); +void QsciLexerCMake_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerCMake_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_Language(const void* self); +void QsciLexerCMake_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_Lexer(const void* self); +void QsciLexerCMake_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_LexerId(const void* self); +void QsciLexerCMake_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCMake_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCMake_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCMake_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCMake_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_BlockLookback(const void* self); +void QsciLexerCMake_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCMake_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCMake_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_BraceStyle(const void* self); +void QsciLexerCMake_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_CaseSensitive(const void* self); +void QsciLexerCMake_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_Color(const void* self, int style); +void QsciLexerCMake_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_EolFill(const void* self, int style); +void QsciLexerCMake_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCMake_virtualbase_Font(const void* self, int style); +void QsciLexerCMake_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCMake_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_Keywords(const void* self, int set); +void QsciLexerCMake_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_DefaultStyle(const void* self); +void QsciLexerCMake_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCMake_virtualbase_Description(const void* self, int style); +void QsciLexerCMake_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_Paper(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCMake_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCMake_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCMake_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_RefreshProperties(void* self); +void QsciLexerCMake_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCMake_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_WordCharacters(const void* self); +void QsciLexerCMake_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCMake_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCMake_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCMake_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCMake_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCMake_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCMake_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCMake_Delete(QsciLexerCMake* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp index 34f37e49..20a5116b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,846 @@ #include "gen_qscilexercoffeescript.h" #include "_cgo_export.h" -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new() { - return new QsciLexerCoffeeScript(); +class MiqtVirtualQsciLexerCoffeeScript : public virtual QsciLexerCoffeeScript { +public: + + MiqtVirtualQsciLexerCoffeeScript(): QsciLexerCoffeeScript() {}; + MiqtVirtualQsciLexerCoffeeScript(QObject* parent): QsciLexerCoffeeScript(parent) {}; + + virtual ~MiqtVirtualQsciLexerCoffeeScript() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCoffeeScript::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCoffeeScript::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCoffeeScript::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCoffeeScript::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCoffeeScript::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCoffeeScript::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCoffeeScript::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCoffeeScript::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCoffeeScript::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCoffeeScript::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCoffeeScript::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCoffeeScript::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCoffeeScript::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCoffeeScript::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCoffeeScript::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCoffeeScript::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCoffeeScript::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCoffeeScript::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCoffeeScript::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCoffeeScript::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCoffeeScript::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCoffeeScript::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCoffeeScript::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCoffeeScript::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCoffeeScript::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCoffeeScript::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCoffeeScript::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCoffeeScript::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCoffeeScript::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCoffeeScript::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCoffeeScript::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCoffeeScript::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCoffeeScript::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCoffeeScript::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCoffeeScript::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCoffeeScript::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCoffeeScript::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCoffeeScript::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCoffeeScript::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCoffeeScript::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCoffeeScript::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCoffeeScript::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCoffeeScript::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCoffeeScript_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCoffeeScript::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCoffeeScript::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCoffeeScript_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCoffeeScript::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCoffeeScript::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCoffeeScript::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCoffeeScript::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCoffeeScript::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCoffeeScript::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCoffeeScript_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCoffeeScript::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCoffeeScript::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCoffeeScript::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCoffeeScript::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCoffeeScript::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCoffeeScript::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCoffeeScript::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCoffeeScript::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCoffeeScript::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCoffeeScript::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCoffeeScript::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCoffeeScript::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCoffeeScript::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(); + *outptr_QsciLexerCoffeeScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent) { - return new QsciLexerCoffeeScript(parent); +void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(parent); + *outptr_QsciLexerCoffeeScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self) { @@ -219,7 +1054,275 @@ const char* QsciLexerCoffeeScript_BlockStartKeyword1(const QsciLexerCoffeeScript return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self) { - delete self; +void QsciLexerCoffeeScript_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Language = slot; +} + +void QsciLexerCoffeeScript_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCoffeeScript_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCoffeeScript_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCoffeeScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCoffeeScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCoffeeScript_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCoffeeScript_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCoffeeScript_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCoffeeScript_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCoffeeScript_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCoffeeScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCoffeeScript_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCoffeeScript_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCoffeeScript_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCoffeeScript_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCoffeeScript_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCoffeeScript_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCoffeeScript_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCoffeeScript_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCoffeeScript_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCoffeeScript_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCoffeeScript_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCoffeeScript_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Description = slot; +} + +void QsciLexerCoffeeScript_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCoffeeScript_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCoffeeScript_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCoffeeScript_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCoffeeScript_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCoffeeScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCoffeeScript_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCoffeeScript_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCoffeeScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCoffeeScript_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCoffeeScript_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCoffeeScript_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCoffeeScript_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCoffeeScript_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCoffeeScript_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go index a9997d06..d352f66c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -44,7 +45,8 @@ const ( ) type QsciLexerCoffeeScript struct { - h *C.QsciLexerCoffeeScript + h *C.QsciLexerCoffeeScript + isSubclass bool *QsciLexer } @@ -62,27 +64,47 @@ func (this *QsciLexerCoffeeScript) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript) *QsciLexerCoffeeScript { +// newQsciLexerCoffeeScript constructs the type using only CGO pointers. +func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCoffeeScript { if h == nil { return nil } - return &QsciLexerCoffeeScript{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCoffeeScript{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer) *QsciLexerCoffeeScript { - return newQsciLexerCoffeeScript((*C.QsciLexerCoffeeScript)(h)) +// UnsafeNewQsciLexerCoffeeScript constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCoffeeScript { + if h == nil { + return nil + } + + return &QsciLexerCoffeeScript{h: (*C.QsciLexerCoffeeScript)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCoffeeScript constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript() *QsciLexerCoffeeScript { - ret := C.QsciLexerCoffeeScript_new() - return newQsciLexerCoffeeScript(ret) + var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCoffeeScript_new(&outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCoffeeScript2 constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript2(parent *qt.QObject) *QsciLexerCoffeeScript { - ret := C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCoffeeScript(ret) + var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCoffeeScript) MetaObject() *qt.QMetaObject { @@ -292,9 +314,894 @@ func (this *QsciLexerCoffeeScript) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerCoffeeScript) callVirtualBase_Language() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Language +func miqt_exec_callback_QsciLexerCoffeeScript_Language(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnLexer(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Lexer +func miqt_exec_callback_QsciLexerCoffeeScript_Lexer(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_LexerId +func miqt_exec_callback_QsciLexerCoffeeScript_LexerId(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionFillups(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCoffeeScript_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCoffeeScript) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCoffeeScript_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionWordSeparators(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCoffeeScript_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockEnd +func miqt_exec_callback_QsciLexerCoffeeScript_BlockEnd(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockLookback +func miqt_exec_callback_QsciLexerCoffeeScript_BlockLookback(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCoffeeScript_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockStart +func miqt_exec_callback_QsciLexerCoffeeScript_BlockStart(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCoffeeScript_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockStartKeyword +func miqt_exec_callback_QsciLexerCoffeeScript_BlockStartKeyword(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BraceStyle +func miqt_exec_callback_QsciLexerCoffeeScript_BraceStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCoffeeScript_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_CaseSensitive +func miqt_exec_callback_QsciLexerCoffeeScript_CaseSensitive(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCoffeeScript_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Color +func miqt_exec_callback_QsciLexerCoffeeScript_Color(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCoffeeScript) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCoffeeScript_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_EolFill +func miqt_exec_callback_QsciLexerCoffeeScript_EolFill(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCoffeeScript_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Font +func miqt_exec_callback_QsciLexerCoffeeScript_Font(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_IndentationGuideView +func miqt_exec_callback_QsciLexerCoffeeScript_IndentationGuideView(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCoffeeScript_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Keywords +func miqt_exec_callback_QsciLexerCoffeeScript_Keywords(self *C.QsciLexerCoffeeScript, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCoffeeScript) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCoffeeScript_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Description +func miqt_exec_callback_QsciLexerCoffeeScript_Description(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCoffeeScript_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Paper +func miqt_exec_callback_QsciLexerCoffeeScript_Paper(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCoffeeScript_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultColorWithStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCoffeeScript) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCoffeeScript_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultEolFill +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultEolFill(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerCoffeeScript_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCoffeeScript_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultFontWithStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCoffeeScript_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultPaperWithStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCoffeeScript_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCoffeeScript) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCoffeeScript_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetEditor +func miqt_exec_callback_QsciLexerCoffeeScript_SetEditor(self *C.QsciLexerCoffeeScript, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_RefreshProperties() { + + C.QsciLexerCoffeeScript_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCoffeeScript) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCoffeeScript_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_RefreshProperties +func miqt_exec_callback_QsciLexerCoffeeScript_RefreshProperties(self *C.QsciLexerCoffeeScript, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCoffeeScript_StyleBitsNeeded(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_WordCharacters +func miqt_exec_callback_QsciLexerCoffeeScript_WordCharacters(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCoffeeScript_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCoffeeScript) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCoffeeScript_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCoffeeScript_SetAutoIndentStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetColor +func miqt_exec_callback_QsciLexerCoffeeScript_SetColor(self *C.QsciLexerCoffeeScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetEolFill +func miqt_exec_callback_QsciLexerCoffeeScript_SetEolFill(self *C.QsciLexerCoffeeScript, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetFont +func miqt_exec_callback_QsciLexerCoffeeScript_SetFont(self *C.QsciLexerCoffeeScript, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetPaper +func miqt_exec_callback_QsciLexerCoffeeScript_SetPaper(self *C.QsciLexerCoffeeScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCoffeeScript) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCoffeeScript_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties +func miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties(self *C.QsciLexerCoffeeScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCoffeeScript) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCoffeeScript_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties +func miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties(self *C.QsciLexerCoffeeScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCoffeeScript) Delete() { - C.QsciLexerCoffeeScript_Delete(this.h) + C.QsciLexerCoffeeScript_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h index 13891933..7eb6d21b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCoffeeScript; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCoffeeScript QsciLexerCoffeeScript; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new(); -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent); +void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self); void* QsciLexerCoffeeScript_Metacast(QsciLexerCoffeeScript* self, const char* param1); struct miqt_string QsciLexerCoffeeScript_Tr(const char* s); @@ -64,7 +70,75 @@ struct miqt_string QsciLexerCoffeeScript_TrUtf83(const char* s, const char* c, i const char* QsciLexerCoffeeScript_BlockEnd1(const QsciLexerCoffeeScript* self, int* style); const char* QsciLexerCoffeeScript_BlockStart1(const QsciLexerCoffeeScript* self, int* style); const char* QsciLexerCoffeeScript_BlockStartKeyword1(const QsciLexerCoffeeScript* self, int* style); -void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self); +void QsciLexerCoffeeScript_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_Language(const void* self); +void QsciLexerCoffeeScript_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_Lexer(const void* self); +void QsciLexerCoffeeScript_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_LexerId(const void* self); +void QsciLexerCoffeeScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCoffeeScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCoffeeScript_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCoffeeScript_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCoffeeScript_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_BlockLookback(const void* self); +void QsciLexerCoffeeScript_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCoffeeScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCoffeeScript_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_BraceStyle(const void* self); +void QsciLexerCoffeeScript_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_CaseSensitive(const void* self); +void QsciLexerCoffeeScript_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_Color(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_EolFill(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCoffeeScript_virtualbase_Font(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCoffeeScript_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_Keywords(const void* self, int set); +void QsciLexerCoffeeScript_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_DefaultStyle(const void* self); +void QsciLexerCoffeeScript_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCoffeeScript_virtualbase_Description(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_Paper(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCoffeeScript_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCoffeeScript_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_RefreshProperties(void* self); +void QsciLexerCoffeeScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCoffeeScript_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_WordCharacters(const void* self); +void QsciLexerCoffeeScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCoffeeScript_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCoffeeScript_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCoffeeScript_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCoffeeScript_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCoffeeScript_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCoffeeScript_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp index f5cce7e0..fb9fa3dc 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,16 +11,974 @@ #include "gen_qscilexercpp.h" #include "_cgo_export.h" -QsciLexerCPP* QsciLexerCPP_new() { - return new QsciLexerCPP(); +class MiqtVirtualQsciLexerCPP : public virtual QsciLexerCPP { +public: + + MiqtVirtualQsciLexerCPP(): QsciLexerCPP() {}; + MiqtVirtualQsciLexerCPP(QObject* parent): QsciLexerCPP(parent) {}; + MiqtVirtualQsciLexerCPP(QObject* parent, bool caseInsensitiveKeywords): QsciLexerCPP(parent, caseInsensitiveKeywords) {}; + + virtual ~MiqtVirtualQsciLexerCPP() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerCPP::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerCPP::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerCPP::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerCPP::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerCPP::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerCPP::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerCPP::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerCPP::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerCPP::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerCPP::setStylePreprocessor(style); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCPP::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCPP::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCPP::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCPP::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCPP::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCPP::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCPP::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCPP_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCPP::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCPP::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCPP::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCPP::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCPP::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCPP::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCPP::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCPP::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCPP::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCPP::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCPP::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCPP::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCPP::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCPP::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCPP::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCPP::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCPP::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCPP::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCPP_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCPP::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCPP::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCPP::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCPP::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCPP::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCPP::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCPP::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCPP_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCPP::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCPP::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCPP::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCPP::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCPP::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCPP::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCPP::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCPP::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCPP::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCPP::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCPP::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCPP_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCPP::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCPP::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCPP_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCPP::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCPP::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCPP::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCPP::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCPP::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCPP::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCPP_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCPP::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCPP::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCPP::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCPP::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCPP::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCPP::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCPP::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCPP::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCPP::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCPP::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCPP::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCPP::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCPP::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(); + *outptr_QsciLexerCPP = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCPP* QsciLexerCPP_new2(QObject* parent) { - return new QsciLexerCPP(parent); +void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent); + *outptr_QsciLexerCPP = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords) { - return new QsciLexerCPP(parent, caseInsensitiveKeywords); +void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent, caseInsensitiveKeywords); + *outptr_QsciLexerCPP = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self) { @@ -279,7 +1238,315 @@ const char* QsciLexerCPP_BlockStartKeyword1(const QsciLexerCPP* self, int* style return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerCPP_Delete(QsciLexerCPP* self) { - delete self; +void QsciLexerCPP_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerCPP_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerCPP_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerCPP_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerCPP_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerCPP_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerCPP_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Language = slot; +} + +void QsciLexerCPP_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCPP_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCPP_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCPP_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCPP_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCPP_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCPP_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCPP_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCPP_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCPP_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCPP_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCPP_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCPP_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCPP_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCPP_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCPP_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCPP_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCPP_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCPP_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCPP_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCPP_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCPP_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCPP_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCPP_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCPP_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCPP_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCPP_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCPP_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCPP_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCPP_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCPP_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCPP_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCPP_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Description = slot; +} + +void QsciLexerCPP_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCPP_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCPP_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCPP_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCPP_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCPP_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCPP_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCPP_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCPP_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCPP_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCPP_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCPP_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCPP_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCPP_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCPP_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCPP_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCPP_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCPP_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCPP_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCPP_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCPP_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCPP_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCPP_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCPP_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCPP_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCPP_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCPP_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCPP_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCPP_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCPP_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCPP_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCPP_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCPP_Delete(QsciLexerCPP* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.go b/qt-restricted-extras/qscintilla/gen_qscilexercpp.go index 52f8c973..7a171170 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -76,7 +77,8 @@ const ( ) type QsciLexerCPP struct { - h *C.QsciLexerCPP + h *C.QsciLexerCPP + isSubclass bool *QsciLexer } @@ -94,33 +96,59 @@ func (this *QsciLexerCPP) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCPP(h *C.QsciLexerCPP) *QsciLexerCPP { +// newQsciLexerCPP constructs the type using only CGO pointers. +func newQsciLexerCPP(h *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCPP { if h == nil { return nil } - return &QsciLexerCPP{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCPP{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCPP(h unsafe.Pointer) *QsciLexerCPP { - return newQsciLexerCPP((*C.QsciLexerCPP)(h)) +// UnsafeNewQsciLexerCPP constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCPP(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCPP { + if h == nil { + return nil + } + + return &QsciLexerCPP{h: (*C.QsciLexerCPP)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCPP constructs a new QsciLexerCPP object. func NewQsciLexerCPP() *QsciLexerCPP { - ret := C.QsciLexerCPP_new() - return newQsciLexerCPP(ret) + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCPP_new(&outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCPP2 constructs a new QsciLexerCPP object. func NewQsciLexerCPP2(parent *qt.QObject) *QsciLexerCPP { - ret := C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCPP(ret) + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCPP3 constructs a new QsciLexerCPP object. func NewQsciLexerCPP3(parent *qt.QObject, caseInsensitiveKeywords bool) *QsciLexerCPP { - ret := C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords)) - return newQsciLexerCPP(ret) + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCPP) MetaObject() *qt.QMetaObject { @@ -386,9 +414,1009 @@ func (this *QsciLexerCPP) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerCPP) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldAtElse +func miqt_exec_callback_QsciLexerCPP_SetFoldAtElse(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldComments +func miqt_exec_callback_QsciLexerCPP_SetFoldComments(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldCompact +func miqt_exec_callback_QsciLexerCPP_SetFoldCompact(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerCPP_SetFoldPreprocessor(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerCPP_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerCPP) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerCPP_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor +func miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor(self *C.QsciLexerCPP, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_Language() string { + + _ret := C.QsciLexerCPP_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Language +func miqt_exec_callback_QsciLexerCPP_Language(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCPP_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnLexer(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Lexer +func miqt_exec_callback_QsciLexerCPP_Lexer(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCPP_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_LexerId +func miqt_exec_callback_QsciLexerCPP_LexerId(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCPP_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCPP_AutoCompletionFillups(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCPP_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCPP) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCPP_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCPP_AutoCompletionWordSeparators(self *C.QsciLexerCPP, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCPP_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCPP_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockEnd +func miqt_exec_callback_QsciLexerCPP_BlockEnd(self *C.QsciLexerCPP, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCPP_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockLookback +func miqt_exec_callback_QsciLexerCPP_BlockLookback(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCPP_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCPP_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockStart +func miqt_exec_callback_QsciLexerCPP_BlockStart(self *C.QsciLexerCPP, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCPP_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCPP_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockStartKeyword +func miqt_exec_callback_QsciLexerCPP_BlockStartKeyword(self *C.QsciLexerCPP, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCPP_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BraceStyle +func miqt_exec_callback_QsciLexerCPP_BraceStyle(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCPP_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCPP_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_CaseSensitive +func miqt_exec_callback_QsciLexerCPP_CaseSensitive(self *C.QsciLexerCPP, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerCPP_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCPP_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Color +func miqt_exec_callback_QsciLexerCPP_Color(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCPP_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCPP) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCPP_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_EolFill +func miqt_exec_callback_QsciLexerCPP_EolFill(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerCPP_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCPP_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Font +func miqt_exec_callback_QsciLexerCPP_Font(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCPP_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_IndentationGuideView +func miqt_exec_callback_QsciLexerCPP_IndentationGuideView(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCPP_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCPP_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Keywords +func miqt_exec_callback_QsciLexerCPP_Keywords(self *C.QsciLexerCPP, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCPP_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultStyle +func miqt_exec_callback_QsciLexerCPP_DefaultStyle(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCPP_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCPP) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCPP_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Description +func miqt_exec_callback_QsciLexerCPP_Description(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCPP) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerCPP_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCPP_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Paper +func miqt_exec_callback_QsciLexerCPP_Paper(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCPP_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCPP_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCPP_DefaultColorWithStyle(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCPP_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCPP) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCPP_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultEolFill +func miqt_exec_callback_QsciLexerCPP_DefaultEolFill(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerCPP_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCPP_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCPP_DefaultFontWithStyle(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCPP_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCPP_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCPP_DefaultPaperWithStyle(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCPP_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCPP) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCPP_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetEditor +func miqt_exec_callback_QsciLexerCPP_SetEditor(self *C.QsciLexerCPP, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_RefreshProperties() { + + C.QsciLexerCPP_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCPP) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCPP_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_RefreshProperties +func miqt_exec_callback_QsciLexerCPP_RefreshProperties(self *C.QsciLexerCPP, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCPP) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCPP_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCPP_StyleBitsNeeded(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCPP_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_WordCharacters +func miqt_exec_callback_QsciLexerCPP_WordCharacters(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCPP_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCPP) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCPP_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCPP_SetAutoIndentStyle(self *C.QsciLexerCPP, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerCPP_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCPP_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetColor +func miqt_exec_callback_QsciLexerCPP_SetColor(self *C.QsciLexerCPP, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCPP_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCPP_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetEolFill +func miqt_exec_callback_QsciLexerCPP_SetEolFill(self *C.QsciLexerCPP, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerCPP_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerCPP_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFont +func miqt_exec_callback_QsciLexerCPP_SetFont(self *C.QsciLexerCPP, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerCPP_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCPP_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetPaper +func miqt_exec_callback_QsciLexerCPP_SetPaper(self *C.QsciLexerCPP, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCPP_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCPP) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCPP_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_ReadProperties +func miqt_exec_callback_QsciLexerCPP_ReadProperties(self *C.QsciLexerCPP, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCPP_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCPP) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCPP_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_WriteProperties +func miqt_exec_callback_QsciLexerCPP_WriteProperties(self *C.QsciLexerCPP, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCPP) Delete() { - C.QsciLexerCPP_Delete(this.h) + C.QsciLexerCPP_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.h b/qt-restricted-extras/qscintilla/gen_qscilexercpp.h index d09db042..c6913bd4 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.h @@ -19,18 +19,24 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCPP; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCPP QsciLexerCPP; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCPP* QsciLexerCPP_new(); -QsciLexerCPP* QsciLexerCPP_new2(QObject* parent); -QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords); +void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self); void* QsciLexerCPP_Metacast(QsciLexerCPP* self, const char* param1); struct miqt_string QsciLexerCPP_Tr(const char* s); @@ -79,7 +85,85 @@ struct miqt_string QsciLexerCPP_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerCPP_BlockEnd1(const QsciLexerCPP* self, int* style); const char* QsciLexerCPP_BlockStart1(const QsciLexerCPP* self, int* style); const char* QsciLexerCPP_BlockStartKeyword1(const QsciLexerCPP* self, int* style); -void QsciLexerCPP_Delete(QsciLexerCPP* self); +void QsciLexerCPP_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerCPP_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_Language(const void* self); +void QsciLexerCPP_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_Lexer(const void* self); +void QsciLexerCPP_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_LexerId(const void* self); +void QsciLexerCPP_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCPP_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCPP_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCPP_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCPP_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_BlockLookback(const void* self); +void QsciLexerCPP_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCPP_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCPP_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_BraceStyle(const void* self); +void QsciLexerCPP_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_CaseSensitive(const void* self); +void QsciLexerCPP_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_Color(const void* self, int style); +void QsciLexerCPP_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_EolFill(const void* self, int style); +void QsciLexerCPP_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCPP_virtualbase_Font(const void* self, int style); +void QsciLexerCPP_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCPP_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_Keywords(const void* self, int set); +void QsciLexerCPP_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_DefaultStyle(const void* self); +void QsciLexerCPP_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCPP_virtualbase_Description(const void* self, int style); +void QsciLexerCPP_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_Paper(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCPP_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCPP_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCPP_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_RefreshProperties(void* self); +void QsciLexerCPP_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCPP_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_WordCharacters(const void* self); +void QsciLexerCPP_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCPP_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCPP_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCPP_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCPP_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCPP_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCPP_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCPP_Delete(QsciLexerCPP* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp index d60b996d..84b250b3 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp @@ -9,12 +9,150 @@ #include "gen_qscilexercsharp.h" #include "_cgo_export.h" -QsciLexerCSharp* QsciLexerCSharp_new() { - return new QsciLexerCSharp(); +class MiqtVirtualQsciLexerCSharp : public virtual QsciLexerCSharp { +public: + + MiqtVirtualQsciLexerCSharp(): QsciLexerCSharp() {}; + MiqtVirtualQsciLexerCSharp(QObject* parent): QsciLexerCSharp(parent) {}; + + virtual ~MiqtVirtualQsciLexerCSharp() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerCSharp::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerCSharp::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerCSharp::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerCSharp::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerCSharp::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerCSharp::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerCSharp::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerCSharp::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerCSharp::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerCSharp_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerCSharp::setStylePreprocessor(style); + + } + +}; + +void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(); + *outptr_QsciLexerCSharp = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent) { - return new QsciLexerCSharp(parent); +void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(parent); + *outptr_QsciLexerCSharp = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self) { @@ -126,7 +264,51 @@ struct miqt_string QsciLexerCSharp_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciLexerCSharp_Delete(QsciLexerCSharp* self) { - delete self; +void QsciLexerCSharp_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerCSharp_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerCSharp_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerCSharp_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerCSharp_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerCSharp_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerCSharp_Delete(QsciLexerCSharp* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go index effed776..51f9b7ef 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerCSharp struct { - h *C.QsciLexerCSharp + h *C.QsciLexerCSharp + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerCSharp) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCSharp(h *C.QsciLexerCSharp) *QsciLexerCSharp { +// newQsciLexerCSharp constructs the type using only CGO pointers. +func newQsciLexerCSharp(h *C.QsciLexerCSharp, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSharp { if h == nil { return nil } - return &QsciLexerCSharp{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerCSharp{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCSharp(h unsafe.Pointer) *QsciLexerCSharp { - return newQsciLexerCSharp((*C.QsciLexerCSharp)(h)) +// UnsafeNewQsciLexerCSharp constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCSharp(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSharp { + if h == nil { + return nil + } + + return &QsciLexerCSharp{h: (*C.QsciLexerCSharp)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerCSharp constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp() *QsciLexerCSharp { - ret := C.QsciLexerCSharp_new() - return newQsciLexerCSharp(ret) + var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSharp_new(&outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCSharp2 constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp2(parent *qt.QObject) *QsciLexerCSharp { - ret := C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCSharp(ret) + var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCSharp) MetaObject() *qt.QMetaObject { @@ -170,9 +194,124 @@ func QsciLexerCSharp_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerCSharp) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldAtElse +func miqt_exec_callback_QsciLexerCSharp_SetFoldAtElse(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldComments +func miqt_exec_callback_QsciLexerCSharp_SetFoldComments(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldCompact +func miqt_exec_callback_QsciLexerCSharp_SetFoldCompact(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerCSharp_SetFoldPreprocessor(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerCSharp_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerCSharp) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerCSharp_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetStylePreprocessor +func miqt_exec_callback_QsciLexerCSharp_SetStylePreprocessor(self *C.QsciLexerCSharp, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerCSharp) Delete() { - C.QsciLexerCSharp_Delete(this.h) + C.QsciLexerCSharp_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h index 20dc0b40..85d0d6c5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h @@ -19,17 +19,21 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerCSharp; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerCSharp QsciLexerCSharp; #endif -QsciLexerCSharp* QsciLexerCSharp_new(); -QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent); +void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self); void* QsciLexerCSharp_Metacast(QsciLexerCSharp* self, const char* param1); struct miqt_string QsciLexerCSharp_Tr(const char* s); @@ -45,7 +49,17 @@ struct miqt_string QsciLexerCSharp_Tr2(const char* s, const char* c); struct miqt_string QsciLexerCSharp_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerCSharp_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerCSharp_TrUtf83(const char* s, const char* c, int n); -void QsciLexerCSharp_Delete(QsciLexerCSharp* self); +void QsciLexerCSharp_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerCSharp_Delete(QsciLexerCSharp* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp index 1f282786..b7138ed0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexercss.h" #include "_cgo_export.h" -QsciLexerCSS* QsciLexerCSS_new() { - return new QsciLexerCSS(); +class MiqtVirtualQsciLexerCSS : public virtual QsciLexerCSS { +public: + + MiqtVirtualQsciLexerCSS(): QsciLexerCSS() {}; + MiqtVirtualQsciLexerCSS(QObject* parent): QsciLexerCSS(parent) {}; + + virtual ~MiqtVirtualQsciLexerCSS() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerCSS::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSS_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerCSS::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerCSS::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSS_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerCSS::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCSS::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCSS::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCSS::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCSS::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCSS::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCSS::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCSS::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCSS_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCSS::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCSS::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCSS::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCSS::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCSS::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCSS::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCSS::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCSS::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCSS::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCSS::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCSS::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCSS::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCSS::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCSS::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCSS::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCSS::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCSS::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCSS::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCSS_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCSS::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCSS::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCSS::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCSS::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCSS::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCSS::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCSS::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCSS_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCSS::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCSS::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCSS::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCSS::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCSS::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCSS::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCSS::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCSS::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCSS::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCSS::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCSS::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCSS_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCSS::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCSS::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCSS_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCSS::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCSS::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCSS::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCSS::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCSS::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCSS::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCSS_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCSS::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCSS::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCSS::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCSS::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCSS::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCSS::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCSS::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCSS::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCSS::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCSS::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCSS::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCSS::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCSS::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(); + *outptr_QsciLexerCSS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCSS* QsciLexerCSS_new2(QObject* parent) { - return new QsciLexerCSS(parent); +void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(parent); + *outptr_QsciLexerCSS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self) { @@ -186,7 +1070,291 @@ const char* QsciLexerCSS_BlockStart1(const QsciLexerCSS* self, int* style) { return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerCSS_Delete(QsciLexerCSS* self) { - delete self; +void QsciLexerCSS_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerCSS_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerCSS_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerCSS_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerCSS_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Language = slot; +} + +void QsciLexerCSS_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCSS_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCSS_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCSS_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCSS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCSS_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCSS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCSS_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCSS_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCSS_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCSS_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCSS_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCSS_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCSS_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCSS_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCSS_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCSS_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCSS_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCSS_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCSS_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCSS_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCSS_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCSS_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCSS_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCSS_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCSS_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCSS_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCSS_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCSS_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCSS_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCSS_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCSS_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCSS_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Description = slot; +} + +void QsciLexerCSS_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCSS_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCSS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCSS_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCSS_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCSS_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCSS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCSS_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCSS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCSS_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCSS_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCSS_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCSS_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCSS_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCSS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCSS_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCSS_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCSS_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCSS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCSS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCSS_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCSS_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCSS_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCSS_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCSS_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCSS_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCSS_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCSS_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCSS_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCSS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCSS_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCSS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCSS_Delete(QsciLexerCSS* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.go b/qt-restricted-extras/qscintilla/gen_qscilexercss.go index d131919b..6b85bd0d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -44,7 +45,8 @@ const ( ) type QsciLexerCSS struct { - h *C.QsciLexerCSS + h *C.QsciLexerCSS + isSubclass bool *QsciLexer } @@ -62,27 +64,47 @@ func (this *QsciLexerCSS) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCSS(h *C.QsciLexerCSS) *QsciLexerCSS { +// newQsciLexerCSS constructs the type using only CGO pointers. +func newQsciLexerCSS(h *C.QsciLexerCSS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSS { if h == nil { return nil } - return &QsciLexerCSS{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCSS{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCSS(h unsafe.Pointer) *QsciLexerCSS { - return newQsciLexerCSS((*C.QsciLexerCSS)(h)) +// UnsafeNewQsciLexerCSS constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCSS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSS { + if h == nil { + return nil + } + + return &QsciLexerCSS{h: (*C.QsciLexerCSS)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCSS constructs a new QsciLexerCSS object. func NewQsciLexerCSS() *QsciLexerCSS { - ret := C.QsciLexerCSS_new() - return newQsciLexerCSS(ret) + var outptr_QsciLexerCSS *C.QsciLexerCSS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSS_new(&outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCSS2 constructs a new QsciLexerCSS object. func NewQsciLexerCSS2(parent *qt.QObject) *QsciLexerCSS { - ret := C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCSS(ret) + var outptr_QsciLexerCSS *C.QsciLexerCSS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCSS) MetaObject() *qt.QMetaObject { @@ -262,9 +284,940 @@ func (this *QsciLexerCSS) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerCSS) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerCSS_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSS) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSS_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetFoldComments +func miqt_exec_callback_QsciLexerCSS_SetFoldComments(self *C.QsciLexerCSS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerCSS_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSS) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSS_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetFoldCompact +func miqt_exec_callback_QsciLexerCSS_SetFoldCompact(self *C.QsciLexerCSS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_Language() string { + + _ret := C.QsciLexerCSS_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Language +func miqt_exec_callback_QsciLexerCSS_Language(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCSS_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnLexer(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Lexer +func miqt_exec_callback_QsciLexerCSS_Lexer(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCSS_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_LexerId +func miqt_exec_callback_QsciLexerCSS_LexerId(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCSS_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCSS_AutoCompletionFillups(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCSS_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCSS) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCSS_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCSS_AutoCompletionWordSeparators(self *C.QsciLexerCSS, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCSS_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCSS_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockEnd +func miqt_exec_callback_QsciLexerCSS_BlockEnd(self *C.QsciLexerCSS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCSS_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockLookback +func miqt_exec_callback_QsciLexerCSS_BlockLookback(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCSS_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCSS_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockStart +func miqt_exec_callback_QsciLexerCSS_BlockStart(self *C.QsciLexerCSS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCSS_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCSS_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockStartKeyword +func miqt_exec_callback_QsciLexerCSS_BlockStartKeyword(self *C.QsciLexerCSS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCSS_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BraceStyle +func miqt_exec_callback_QsciLexerCSS_BraceStyle(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCSS_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCSS_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_CaseSensitive +func miqt_exec_callback_QsciLexerCSS_CaseSensitive(self *C.QsciLexerCSS, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerCSS_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCSS_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Color +func miqt_exec_callback_QsciLexerCSS_Color(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCSS_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCSS) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCSS_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_EolFill +func miqt_exec_callback_QsciLexerCSS_EolFill(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerCSS_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCSS_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Font +func miqt_exec_callback_QsciLexerCSS_Font(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCSS_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_IndentationGuideView +func miqt_exec_callback_QsciLexerCSS_IndentationGuideView(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCSS_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCSS_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Keywords +func miqt_exec_callback_QsciLexerCSS_Keywords(self *C.QsciLexerCSS, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCSS_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultStyle +func miqt_exec_callback_QsciLexerCSS_DefaultStyle(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCSS_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCSS) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCSS_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Description +func miqt_exec_callback_QsciLexerCSS_Description(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCSS) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerCSS_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCSS_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Paper +func miqt_exec_callback_QsciLexerCSS_Paper(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCSS_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCSS_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCSS_DefaultColorWithStyle(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCSS_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCSS) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCSS_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultEolFill +func miqt_exec_callback_QsciLexerCSS_DefaultEolFill(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerCSS_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCSS_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCSS_DefaultFontWithStyle(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCSS_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCSS_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCSS_DefaultPaperWithStyle(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCSS_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCSS) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCSS_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetEditor +func miqt_exec_callback_QsciLexerCSS_SetEditor(self *C.QsciLexerCSS, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_RefreshProperties() { + + C.QsciLexerCSS_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCSS) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCSS_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_RefreshProperties +func miqt_exec_callback_QsciLexerCSS_RefreshProperties(self *C.QsciLexerCSS, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCSS) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCSS_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCSS_StyleBitsNeeded(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCSS_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_WordCharacters +func miqt_exec_callback_QsciLexerCSS_WordCharacters(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCSS_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCSS) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCSS_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCSS_SetAutoIndentStyle(self *C.QsciLexerCSS, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerCSS_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCSS_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetColor +func miqt_exec_callback_QsciLexerCSS_SetColor(self *C.QsciLexerCSS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCSS_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCSS_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetEolFill +func miqt_exec_callback_QsciLexerCSS_SetEolFill(self *C.QsciLexerCSS, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerCSS_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerCSS_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetFont +func miqt_exec_callback_QsciLexerCSS_SetFont(self *C.QsciLexerCSS, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerCSS_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCSS_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetPaper +func miqt_exec_callback_QsciLexerCSS_SetPaper(self *C.QsciLexerCSS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCSS_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCSS) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCSS_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_ReadProperties +func miqt_exec_callback_QsciLexerCSS_ReadProperties(self *C.QsciLexerCSS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCSS_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCSS) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCSS_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_WriteProperties +func miqt_exec_callback_QsciLexerCSS_WriteProperties(self *C.QsciLexerCSS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCSS) Delete() { - C.QsciLexerCSS_Delete(this.h) + C.QsciLexerCSS_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.h b/qt-restricted-extras/qscintilla/gen_qscilexercss.h index a0726859..4e1881b0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCSS; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCSS QsciLexerCSS; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCSS* QsciLexerCSS_new(); -QsciLexerCSS* QsciLexerCSS_new2(QObject* parent); +void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self); void* QsciLexerCSS_Metacast(QsciLexerCSS* self, const char* param1); struct miqt_string QsciLexerCSS_Tr(const char* s); @@ -60,7 +66,79 @@ struct miqt_string QsciLexerCSS_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerCSS_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerCSS_BlockEnd1(const QsciLexerCSS* self, int* style); const char* QsciLexerCSS_BlockStart1(const QsciLexerCSS* self, int* style); -void QsciLexerCSS_Delete(QsciLexerCSS* self); +void QsciLexerCSS_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerCSS_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerCSS_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_Language(const void* self); +void QsciLexerCSS_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_Lexer(const void* self); +void QsciLexerCSS_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_LexerId(const void* self); +void QsciLexerCSS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCSS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCSS_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCSS_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCSS_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_BlockLookback(const void* self); +void QsciLexerCSS_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCSS_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCSS_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_BraceStyle(const void* self); +void QsciLexerCSS_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_CaseSensitive(const void* self); +void QsciLexerCSS_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_Color(const void* self, int style); +void QsciLexerCSS_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_EolFill(const void* self, int style); +void QsciLexerCSS_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCSS_virtualbase_Font(const void* self, int style); +void QsciLexerCSS_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCSS_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_Keywords(const void* self, int set); +void QsciLexerCSS_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_DefaultStyle(const void* self); +void QsciLexerCSS_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCSS_virtualbase_Description(const void* self, int style); +void QsciLexerCSS_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_Paper(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCSS_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCSS_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCSS_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_RefreshProperties(void* self); +void QsciLexerCSS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCSS_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_WordCharacters(const void* self); +void QsciLexerCSS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCSS_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCSS_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCSS_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCSS_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCSS_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCSS_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCSS_Delete(QsciLexerCSS* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp index 96c07e00..1f21684a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -108,7 +109,11 @@ void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits self->startStyling(static_cast(pos), static_cast(styleBits)); } -void QsciLexerCustom_Delete(QsciLexerCustom* self) { - delete self; +void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.go b/qt-restricted-extras/qscintilla/gen_qscilexercustom.go index ea19d86b..0a4a9210 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.go @@ -15,7 +15,8 @@ import ( ) type QsciLexerCustom struct { - h *C.QsciLexerCustom + h *C.QsciLexerCustom + isSubclass bool *QsciLexer } @@ -33,15 +34,23 @@ func (this *QsciLexerCustom) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCustom(h *C.QsciLexerCustom) *QsciLexerCustom { +// newQsciLexerCustom constructs the type using only CGO pointers. +func newQsciLexerCustom(h *C.QsciLexerCustom, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCustom { if h == nil { return nil } - return &QsciLexerCustom{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCustom{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCustom(h unsafe.Pointer) *QsciLexerCustom { - return newQsciLexerCustom((*C.QsciLexerCustom)(h)) +// UnsafeNewQsciLexerCustom constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCustom(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCustom { + if h == nil { + return nil + } + + return &QsciLexerCustom{h: (*C.QsciLexerCustom)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } func (this *QsciLexerCustom) MetaObject() *qt.QMetaObject { @@ -146,7 +155,7 @@ func (this *QsciLexerCustom) StartStyling2(pos int, styleBits int) { // Delete this object from C++ memory. func (this *QsciLexerCustom) Delete() { - C.QsciLexerCustom_Delete(this.h) + C.QsciLexerCustom_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.h b/qt-restricted-extras/qscintilla/gen_qscilexercustom.h index 8712bbdf..ca9924cf 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.h @@ -16,11 +16,15 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; +class QsciLexer; class QsciLexerCustom; class QsciScintilla; class QsciStyle; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCustom QsciLexerCustom; typedef struct QsciScintilla QsciScintilla; typedef struct QsciStyle QsciStyle; @@ -41,7 +45,7 @@ struct miqt_string QsciLexerCustom_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerCustom_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerCustom_TrUtf83(const char* s, const char* c, int n); void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits); -void QsciLexerCustom_Delete(QsciLexerCustom* self); +void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp index af5e2b8c..ad9f6f12 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,918 @@ #include "gen_qscilexerd.h" #include "_cgo_export.h" -QsciLexerD* QsciLexerD_new() { - return new QsciLexerD(); +class MiqtVirtualQsciLexerD : public virtual QsciLexerD { +public: + + MiqtVirtualQsciLexerD(): QsciLexerD() {}; + MiqtVirtualQsciLexerD(QObject* parent): QsciLexerD(parent) {}; + + virtual ~MiqtVirtualQsciLexerD() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerD::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerD_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerD::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerD::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerD_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerD::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerD::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerD_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerD::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerD::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerD::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerD::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerD::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerD::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerD::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerD::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerD_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerD::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerD::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerD::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerD::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerD::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerD::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerD::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerD::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerD::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerD::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerD::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerD::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerD_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerD::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerD::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerD::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerD::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerD::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerD::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerD_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerD::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerD::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerD::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerD::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerD::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerD::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerD::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerD_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerD::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerD::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerD::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerD::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerD::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerD::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerD::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerD_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerD::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerD::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerD::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerD::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerD_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerD::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerD::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerD_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerD::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerD::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerD::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerD::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerD::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerD::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerD_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerD::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerD::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerD::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerD::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerD::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerD::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerD::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerD::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerD::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerD::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerD::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerD::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerD::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(); + *outptr_QsciLexerD = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerD* QsciLexerD_new2(QObject* parent) { - return new QsciLexerD(parent); +void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(parent); + *outptr_QsciLexerD = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self) { @@ -211,7 +1118,299 @@ const char* QsciLexerD_BlockStartKeyword1(const QsciLexerD* self, int* style) { return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerD_Delete(QsciLexerD* self) { - delete self; +void QsciLexerD_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerD_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerD_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerD_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerD_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerD_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerD_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Language = slot; +} + +void QsciLexerD_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerD_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerD_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__LexerId = slot; +} + +int QsciLexerD_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerD_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerD_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerD_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerD_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerD_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerD_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerD_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerD_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerD_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerD_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerD_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerD_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerD_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerD_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerD_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerD_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerD_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerD_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Color(style); +} + +void QsciLexerD_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerD_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerD_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerD_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Font(style); +} + +void QsciLexerD_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerD_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerD_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerD_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerD_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerD_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerD_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Description = slot; +} + +void QsciLexerD_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerD_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerD_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerD_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerD_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerD_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerD_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerD_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerD_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerD_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerD_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerD_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerD_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerD_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerD_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerD_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerD_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerD_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerD_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerD_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerD_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetColor = slot; +} + +void QsciLexerD_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerD_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerD_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerD_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFont = slot; +} + +void QsciLexerD_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerD_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerD_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerD_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerD_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerD_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerD_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerD_Delete(QsciLexerD* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.go b/qt-restricted-extras/qscintilla/gen_qscilexerd.go index 085bfc8d..91de717e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -43,7 +44,8 @@ const ( ) type QsciLexerD struct { - h *C.QsciLexerD + h *C.QsciLexerD + isSubclass bool *QsciLexer } @@ -61,27 +63,47 @@ func (this *QsciLexerD) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerD(h *C.QsciLexerD) *QsciLexerD { +// newQsciLexerD constructs the type using only CGO pointers. +func newQsciLexerD(h *C.QsciLexerD, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerD { if h == nil { return nil } - return &QsciLexerD{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerD{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerD(h unsafe.Pointer) *QsciLexerD { - return newQsciLexerD((*C.QsciLexerD)(h)) +// UnsafeNewQsciLexerD constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerD(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerD { + if h == nil { + return nil + } + + return &QsciLexerD{h: (*C.QsciLexerD)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerD constructs a new QsciLexerD object. func NewQsciLexerD() *QsciLexerD { - ret := C.QsciLexerD_new() - return newQsciLexerD(ret) + var outptr_QsciLexerD *C.QsciLexerD = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerD_new(&outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerD2 constructs a new QsciLexerD object. func NewQsciLexerD2(parent *qt.QObject) *QsciLexerD { - ret := C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerD(ret) + var outptr_QsciLexerD *C.QsciLexerD = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerD) MetaObject() *qt.QMetaObject { @@ -283,9 +305,963 @@ func (this *QsciLexerD) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerD) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerD_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerD) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerD_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFoldAtElse +func miqt_exec_callback_QsciLexerD_SetFoldAtElse(self *C.QsciLexerD, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerD_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerD) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerD_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFoldComments +func miqt_exec_callback_QsciLexerD_SetFoldComments(self *C.QsciLexerD, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerD_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerD) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerD_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFoldCompact +func miqt_exec_callback_QsciLexerD_SetFoldCompact(self *C.QsciLexerD, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_Language() string { + + _ret := C.QsciLexerD_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnLanguage(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Language +func miqt_exec_callback_QsciLexerD_Language(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerD_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnLexer(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Lexer +func miqt_exec_callback_QsciLexerD_Lexer(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerD_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnLexerId(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_LexerId +func miqt_exec_callback_QsciLexerD_LexerId(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerD_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_AutoCompletionFillups +func miqt_exec_callback_QsciLexerD_AutoCompletionFillups(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerD_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerD) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerD_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerD_AutoCompletionWordSeparators(self *C.QsciLexerD, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerD) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerD_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerD_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockEnd +func miqt_exec_callback_QsciLexerD_BlockEnd(self *C.QsciLexerD, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerD_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockLookback +func miqt_exec_callback_QsciLexerD_BlockLookback(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerD_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerD_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockStart +func miqt_exec_callback_QsciLexerD_BlockStart(self *C.QsciLexerD, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerD_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerD_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockStartKeyword +func miqt_exec_callback_QsciLexerD_BlockStartKeyword(self *C.QsciLexerD, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerD_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BraceStyle +func miqt_exec_callback_QsciLexerD_BraceStyle(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerD_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerD_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_CaseSensitive +func miqt_exec_callback_QsciLexerD_CaseSensitive(self *C.QsciLexerD, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerD_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerD_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Color +func miqt_exec_callback_QsciLexerD_Color(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerD_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerD) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerD_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_EolFill +func miqt_exec_callback_QsciLexerD_EolFill(self *C.QsciLexerD, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerD_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerD_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Font +func miqt_exec_callback_QsciLexerD_Font(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerD_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_IndentationGuideView +func miqt_exec_callback_QsciLexerD_IndentationGuideView(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerD_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerD_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Keywords +func miqt_exec_callback_QsciLexerD_Keywords(self *C.QsciLexerD, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerD_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultStyle +func miqt_exec_callback_QsciLexerD_DefaultStyle(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerD_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerD) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerD_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Description +func miqt_exec_callback_QsciLexerD_Description(self *C.QsciLexerD, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerD) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerD_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerD_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Paper +func miqt_exec_callback_QsciLexerD_Paper(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerD_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerD_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerD_DefaultColorWithStyle(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerD_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerD) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerD_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultEolFill +func miqt_exec_callback_QsciLexerD_DefaultEolFill(self *C.QsciLexerD, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerD_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerD_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerD_DefaultFontWithStyle(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerD_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerD_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerD_DefaultPaperWithStyle(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerD_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerD) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerD_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetEditor +func miqt_exec_callback_QsciLexerD_SetEditor(self *C.QsciLexerD, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_RefreshProperties() { + + C.QsciLexerD_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerD) OnRefreshProperties(slot func(super func())) { + C.QsciLexerD_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_RefreshProperties +func miqt_exec_callback_QsciLexerD_RefreshProperties(self *C.QsciLexerD, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerD{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerD) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerD_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_StyleBitsNeeded +func miqt_exec_callback_QsciLexerD_StyleBitsNeeded(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerD_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_WordCharacters +func miqt_exec_callback_QsciLexerD_WordCharacters(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerD_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerD) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerD_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerD_SetAutoIndentStyle(self *C.QsciLexerD, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerD_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerD_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetColor +func miqt_exec_callback_QsciLexerD_SetColor(self *C.QsciLexerD, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerD_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerD_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetEolFill +func miqt_exec_callback_QsciLexerD_SetEolFill(self *C.QsciLexerD, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerD_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerD_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFont +func miqt_exec_callback_QsciLexerD_SetFont(self *C.QsciLexerD, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerD_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerD_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetPaper +func miqt_exec_callback_QsciLexerD_SetPaper(self *C.QsciLexerD, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerD_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerD) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerD_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_ReadProperties +func miqt_exec_callback_QsciLexerD_ReadProperties(self *C.QsciLexerD, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerD_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerD) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerD_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_WriteProperties +func miqt_exec_callback_QsciLexerD_WriteProperties(self *C.QsciLexerD, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerD) Delete() { - C.QsciLexerD_Delete(this.h) + C.QsciLexerD_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.h b/qt-restricted-extras/qscintilla/gen_qscilexerd.h index 52795c07..b05cf2fe 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerD; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerD QsciLexerD; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerD* QsciLexerD_new(); -QsciLexerD* QsciLexerD_new2(QObject* parent); +void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self); void* QsciLexerD_Metacast(QsciLexerD* self, const char* param1); struct miqt_string QsciLexerD_Tr(const char* s); @@ -62,7 +68,81 @@ struct miqt_string QsciLexerD_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerD_BlockEnd1(const QsciLexerD* self, int* style); const char* QsciLexerD_BlockStart1(const QsciLexerD* self, int* style); const char* QsciLexerD_BlockStartKeyword1(const QsciLexerD* self, int* style); -void QsciLexerD_Delete(QsciLexerD* self); +void QsciLexerD_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerD_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerD_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerD_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_Language(const void* self); +void QsciLexerD_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_Lexer(const void* self); +void QsciLexerD_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerD_virtualbase_LexerId(const void* self); +void QsciLexerD_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerD_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerD_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerD_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerD_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerD_virtualbase_BlockLookback(const void* self); +void QsciLexerD_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerD_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerD_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerD_virtualbase_BraceStyle(const void* self); +void QsciLexerD_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_CaseSensitive(const void* self); +void QsciLexerD_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_Color(const void* self, int style); +void QsciLexerD_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_EolFill(const void* self, int style); +void QsciLexerD_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerD_virtualbase_Font(const void* self, int style); +void QsciLexerD_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerD_virtualbase_IndentationGuideView(const void* self); +void QsciLexerD_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_Keywords(const void* self, int set); +void QsciLexerD_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerD_virtualbase_DefaultStyle(const void* self); +void QsciLexerD_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerD_virtualbase_Description(const void* self, int style); +void QsciLexerD_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_Paper(const void* self, int style); +void QsciLexerD_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerD_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerD_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerD_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerD_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerD_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerD_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerD_virtualbase_RefreshProperties(void* self); +void QsciLexerD_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerD_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerD_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_WordCharacters(const void* self); +void QsciLexerD_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerD_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerD_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerD_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerD_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerD_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerD_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerD_Delete(QsciLexerD* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp index 27472fb6..3eae0911 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,846 @@ #include "gen_qscilexerdiff.h" #include "_cgo_export.h" -QsciLexerDiff* QsciLexerDiff_new() { - return new QsciLexerDiff(); +class MiqtVirtualQsciLexerDiff : public virtual QsciLexerDiff { +public: + + MiqtVirtualQsciLexerDiff(): QsciLexerDiff() {}; + MiqtVirtualQsciLexerDiff(QObject* parent): QsciLexerDiff(parent) {}; + + virtual ~MiqtVirtualQsciLexerDiff() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerDiff::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerDiff::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerDiff::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerDiff::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerDiff::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerDiff::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerDiff::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerDiff_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerDiff::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerDiff::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerDiff::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerDiff::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerDiff::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerDiff::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerDiff::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerDiff::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerDiff::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerDiff::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerDiff::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerDiff::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerDiff::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerDiff::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerDiff::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerDiff::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerDiff::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerDiff::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerDiff_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerDiff::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerDiff::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerDiff::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerDiff::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerDiff::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerDiff::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerDiff::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerDiff_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerDiff::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerDiff::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerDiff::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerDiff::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerDiff::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerDiff::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerDiff::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerDiff::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerDiff::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerDiff::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerDiff::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerDiff_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerDiff::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerDiff::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerDiff_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerDiff::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerDiff::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerDiff::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerDiff::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerDiff::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerDiff::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerDiff_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerDiff::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerDiff::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerDiff::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerDiff::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerDiff::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerDiff::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerDiff::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerDiff::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerDiff::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerDiff::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerDiff::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerDiff::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerDiff::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(); + *outptr_QsciLexerDiff = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerDiff* QsciLexerDiff_new2(QObject* parent) { - return new QsciLexerDiff(parent); +void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(parent); + *outptr_QsciLexerDiff = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self) { @@ -117,7 +954,275 @@ struct miqt_string QsciLexerDiff_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerDiff_Delete(QsciLexerDiff* self) { - delete self; +void QsciLexerDiff_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Language = slot; +} + +void QsciLexerDiff_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerDiff_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerDiff_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__LexerId = slot; +} + +int QsciLexerDiff_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerDiff_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerDiff_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerDiff_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerDiff_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerDiff_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerDiff_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerDiff_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerDiff_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerDiff_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerDiff_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerDiff_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerDiff_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerDiff_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerDiff_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerDiff_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerDiff_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerDiff_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerDiff_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Color(style); +} + +void QsciLexerDiff_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerDiff_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerDiff_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerDiff_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Font(style); +} + +void QsciLexerDiff_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerDiff_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerDiff_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerDiff_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerDiff_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerDiff_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerDiff_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Description = slot; +} + +void QsciLexerDiff_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerDiff_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerDiff_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerDiff_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerDiff_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerDiff_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerDiff_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerDiff_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerDiff_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerDiff_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerDiff_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerDiff_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerDiff_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerDiff_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerDiff_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerDiff_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerDiff_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerDiff_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerDiff_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerDiff_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerDiff_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetColor = slot; +} + +void QsciLexerDiff_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerDiff_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerDiff_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerDiff_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetFont = slot; +} + +void QsciLexerDiff_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerDiff_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerDiff_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerDiff_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerDiff_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerDiff_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerDiff_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerDiff_Delete(QsciLexerDiff* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go index 1423f66f..2d393a48 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -32,7 +33,8 @@ const ( ) type QsciLexerDiff struct { - h *C.QsciLexerDiff + h *C.QsciLexerDiff + isSubclass bool *QsciLexer } @@ -50,27 +52,47 @@ func (this *QsciLexerDiff) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerDiff(h *C.QsciLexerDiff) *QsciLexerDiff { +// newQsciLexerDiff constructs the type using only CGO pointers. +func newQsciLexerDiff(h *C.QsciLexerDiff, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerDiff { if h == nil { return nil } - return &QsciLexerDiff{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerDiff{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerDiff(h unsafe.Pointer) *QsciLexerDiff { - return newQsciLexerDiff((*C.QsciLexerDiff)(h)) +// UnsafeNewQsciLexerDiff constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerDiff(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerDiff { + if h == nil { + return nil + } + + return &QsciLexerDiff{h: (*C.QsciLexerDiff)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerDiff constructs a new QsciLexerDiff object. func NewQsciLexerDiff() *QsciLexerDiff { - ret := C.QsciLexerDiff_new() - return newQsciLexerDiff(ret) + var outptr_QsciLexerDiff *C.QsciLexerDiff = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerDiff_new(&outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerDiff2 constructs a new QsciLexerDiff object. func NewQsciLexerDiff2(parent *qt.QObject) *QsciLexerDiff { - ret := C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerDiff(ret) + var outptr_QsciLexerDiff *C.QsciLexerDiff = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerDiff) MetaObject() *qt.QMetaObject { @@ -174,9 +196,894 @@ func QsciLexerDiff_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerDiff) callVirtualBase_Language() string { + + _ret := C.QsciLexerDiff_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnLanguage(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Language +func miqt_exec_callback_QsciLexerDiff_Language(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerDiff_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnLexer(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Lexer +func miqt_exec_callback_QsciLexerDiff_Lexer(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerDiff_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnLexerId(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_LexerId +func miqt_exec_callback_QsciLexerDiff_LexerId(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerDiff_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_AutoCompletionFillups +func miqt_exec_callback_QsciLexerDiff_AutoCompletionFillups(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerDiff_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerDiff) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerDiff_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerDiff_AutoCompletionWordSeparators(self *C.QsciLexerDiff, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerDiff_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerDiff_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockEnd +func miqt_exec_callback_QsciLexerDiff_BlockEnd(self *C.QsciLexerDiff, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerDiff_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockLookback +func miqt_exec_callback_QsciLexerDiff_BlockLookback(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerDiff_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerDiff_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockStart +func miqt_exec_callback_QsciLexerDiff_BlockStart(self *C.QsciLexerDiff, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerDiff_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerDiff_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockStartKeyword +func miqt_exec_callback_QsciLexerDiff_BlockStartKeyword(self *C.QsciLexerDiff, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerDiff_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BraceStyle +func miqt_exec_callback_QsciLexerDiff_BraceStyle(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerDiff_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerDiff_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_CaseSensitive +func miqt_exec_callback_QsciLexerDiff_CaseSensitive(self *C.QsciLexerDiff, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerDiff_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerDiff_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Color +func miqt_exec_callback_QsciLexerDiff_Color(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerDiff_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerDiff) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerDiff_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_EolFill +func miqt_exec_callback_QsciLexerDiff_EolFill(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerDiff_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerDiff_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Font +func miqt_exec_callback_QsciLexerDiff_Font(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerDiff_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_IndentationGuideView +func miqt_exec_callback_QsciLexerDiff_IndentationGuideView(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerDiff_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerDiff_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Keywords +func miqt_exec_callback_QsciLexerDiff_Keywords(self *C.QsciLexerDiff, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerDiff_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultStyle +func miqt_exec_callback_QsciLexerDiff_DefaultStyle(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerDiff_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerDiff) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerDiff_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Description +func miqt_exec_callback_QsciLexerDiff_Description(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerDiff) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerDiff_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerDiff_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Paper +func miqt_exec_callback_QsciLexerDiff_Paper(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerDiff_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerDiff_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerDiff_DefaultColorWithStyle(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerDiff_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerDiff) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerDiff_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultEolFill +func miqt_exec_callback_QsciLexerDiff_DefaultEolFill(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerDiff_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerDiff_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerDiff_DefaultFontWithStyle(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerDiff_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerDiff_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerDiff_DefaultPaperWithStyle(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerDiff_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerDiff) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerDiff_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetEditor +func miqt_exec_callback_QsciLexerDiff_SetEditor(self *C.QsciLexerDiff, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerDiff) callVirtualBase_RefreshProperties() { + + C.QsciLexerDiff_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerDiff) OnRefreshProperties(slot func(super func())) { + C.QsciLexerDiff_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_RefreshProperties +func miqt_exec_callback_QsciLexerDiff_RefreshProperties(self *C.QsciLexerDiff, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerDiff) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerDiff_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_StyleBitsNeeded +func miqt_exec_callback_QsciLexerDiff_StyleBitsNeeded(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerDiff_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_WordCharacters +func miqt_exec_callback_QsciLexerDiff_WordCharacters(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerDiff_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerDiff) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerDiff_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerDiff_SetAutoIndentStyle(self *C.QsciLexerDiff, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerDiff_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerDiff_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetColor +func miqt_exec_callback_QsciLexerDiff_SetColor(self *C.QsciLexerDiff, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerDiff_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerDiff_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetEolFill +func miqt_exec_callback_QsciLexerDiff_SetEolFill(self *C.QsciLexerDiff, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerDiff_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerDiff_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetFont +func miqt_exec_callback_QsciLexerDiff_SetFont(self *C.QsciLexerDiff, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerDiff_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerDiff_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetPaper +func miqt_exec_callback_QsciLexerDiff_SetPaper(self *C.QsciLexerDiff, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerDiff_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerDiff) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerDiff_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_ReadProperties +func miqt_exec_callback_QsciLexerDiff_ReadProperties(self *C.QsciLexerDiff, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerDiff_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerDiff) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerDiff_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_WriteProperties +func miqt_exec_callback_QsciLexerDiff_WriteProperties(self *C.QsciLexerDiff, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerDiff) Delete() { - C.QsciLexerDiff_Delete(this.h) + C.QsciLexerDiff_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h index 768c4b8f..88e0602a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h @@ -16,18 +16,26 @@ extern "C" { #ifdef __cplusplus class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerDiff; +class QsciScintilla; #else typedef struct QColor QColor; +typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerDiff QsciLexerDiff; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerDiff* QsciLexerDiff_new(); -QsciLexerDiff* QsciLexerDiff_new2(QObject* parent); +void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self); void* QsciLexerDiff_Metacast(QsciLexerDiff* self, const char* param1); struct miqt_string QsciLexerDiff_Tr(const char* s); @@ -41,7 +49,75 @@ struct miqt_string QsciLexerDiff_Tr2(const char* s, const char* c); struct miqt_string QsciLexerDiff_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerDiff_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerDiff_TrUtf83(const char* s, const char* c, int n); -void QsciLexerDiff_Delete(QsciLexerDiff* self); +void QsciLexerDiff_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_Language(const void* self); +void QsciLexerDiff_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_Lexer(const void* self); +void QsciLexerDiff_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_LexerId(const void* self); +void QsciLexerDiff_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerDiff_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerDiff_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerDiff_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerDiff_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_BlockLookback(const void* self); +void QsciLexerDiff_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerDiff_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerDiff_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_BraceStyle(const void* self); +void QsciLexerDiff_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_CaseSensitive(const void* self); +void QsciLexerDiff_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_Color(const void* self, int style); +void QsciLexerDiff_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_EolFill(const void* self, int style); +void QsciLexerDiff_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerDiff_virtualbase_Font(const void* self, int style); +void QsciLexerDiff_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_IndentationGuideView(const void* self); +void QsciLexerDiff_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_Keywords(const void* self, int set); +void QsciLexerDiff_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_DefaultStyle(const void* self); +void QsciLexerDiff_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerDiff_virtualbase_Description(const void* self, int style); +void QsciLexerDiff_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_Paper(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerDiff_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerDiff_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerDiff_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_RefreshProperties(void* self); +void QsciLexerDiff_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerDiff_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_WordCharacters(const void* self); +void QsciLexerDiff_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerDiff_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerDiff_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerDiff_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerDiff_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerDiff_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerDiff_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerDiff_Delete(QsciLexerDiff* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp index e323e3d8..8a18497c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,846 @@ #include "gen_qscilexeredifact.h" #include "_cgo_export.h" -QsciLexerEDIFACT* QsciLexerEDIFACT_new() { - return new QsciLexerEDIFACT(); +class MiqtVirtualQsciLexerEDIFACT : public virtual QsciLexerEDIFACT { +public: + + MiqtVirtualQsciLexerEDIFACT(): QsciLexerEDIFACT() {}; + MiqtVirtualQsciLexerEDIFACT(QObject* parent): QsciLexerEDIFACT(parent) {}; + + virtual ~MiqtVirtualQsciLexerEDIFACT() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerEDIFACT::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerEDIFACT::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerEDIFACT::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerEDIFACT::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerEDIFACT::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerEDIFACT::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerEDIFACT::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerEDIFACT::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerEDIFACT::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerEDIFACT::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerEDIFACT::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerEDIFACT::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerEDIFACT::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerEDIFACT::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerEDIFACT::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerEDIFACT::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerEDIFACT::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerEDIFACT::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerEDIFACT::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerEDIFACT::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerEDIFACT::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerEDIFACT::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerEDIFACT::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerEDIFACT::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerEDIFACT::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerEDIFACT::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerEDIFACT::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerEDIFACT::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerEDIFACT::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerEDIFACT::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerEDIFACT::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerEDIFACT::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerEDIFACT::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerEDIFACT::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerEDIFACT::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerEDIFACT::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerEDIFACT::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerEDIFACT::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerEDIFACT::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerEDIFACT::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerEDIFACT::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerEDIFACT::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerEDIFACT::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerEDIFACT_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerEDIFACT::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerEDIFACT::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerEDIFACT_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerEDIFACT::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerEDIFACT::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerEDIFACT::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerEDIFACT::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerEDIFACT::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerEDIFACT::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerEDIFACT_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerEDIFACT::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerEDIFACT::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerEDIFACT::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerEDIFACT::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerEDIFACT::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerEDIFACT::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerEDIFACT::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerEDIFACT::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerEDIFACT::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerEDIFACT::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerEDIFACT::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerEDIFACT::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerEDIFACT::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(); + *outptr_QsciLexerEDIFACT = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent) { - return new QsciLexerEDIFACT(parent); +void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(parent); + *outptr_QsciLexerEDIFACT = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self) { @@ -113,7 +950,275 @@ struct miqt_string QsciLexerEDIFACT_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self) { - delete self; +void QsciLexerEDIFACT_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Language = slot; +} + +void QsciLexerEDIFACT_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerEDIFACT_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__LexerId = slot; +} + +int QsciLexerEDIFACT_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerEDIFACT_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerEDIFACT_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerEDIFACT_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerEDIFACT_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerEDIFACT_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerEDIFACT_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerEDIFACT_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerEDIFACT_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerEDIFACT_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerEDIFACT_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerEDIFACT_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerEDIFACT_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerEDIFACT_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Color(style); +} + +void QsciLexerEDIFACT_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerEDIFACT_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerEDIFACT_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerEDIFACT_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Font(style); +} + +void QsciLexerEDIFACT_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerEDIFACT_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerEDIFACT_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerEDIFACT_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerEDIFACT_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerEDIFACT_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Description = slot; +} + +void QsciLexerEDIFACT_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerEDIFACT_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerEDIFACT_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerEDIFACT_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerEDIFACT_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerEDIFACT_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerEDIFACT_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerEDIFACT_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerEDIFACT_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerEDIFACT_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerEDIFACT_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetColor = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerEDIFACT_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerEDIFACT_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetFont = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerEDIFACT_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerEDIFACT_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerEDIFACT_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerEDIFACT_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerEDIFACT_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go index 98419d91..2abfa980 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QsciLexerEDIFACT struct { - h *C.QsciLexerEDIFACT + h *C.QsciLexerEDIFACT + isSubclass bool *QsciLexer } @@ -47,27 +49,47 @@ func (this *QsciLexerEDIFACT) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT) *QsciLexerEDIFACT { +// newQsciLexerEDIFACT constructs the type using only CGO pointers. +func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerEDIFACT { if h == nil { return nil } - return &QsciLexerEDIFACT{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerEDIFACT{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer) *QsciLexerEDIFACT { - return newQsciLexerEDIFACT((*C.QsciLexerEDIFACT)(h)) +// UnsafeNewQsciLexerEDIFACT constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerEDIFACT { + if h == nil { + return nil + } + + return &QsciLexerEDIFACT{h: (*C.QsciLexerEDIFACT)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerEDIFACT constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT() *QsciLexerEDIFACT { - ret := C.QsciLexerEDIFACT_new() - return newQsciLexerEDIFACT(ret) + var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerEDIFACT_new(&outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerEDIFACT2 constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT2(parent *qt.QObject) *QsciLexerEDIFACT { - ret := C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerEDIFACT(ret) + var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerEDIFACT) MetaObject() *qt.QMetaObject { @@ -166,9 +188,894 @@ func QsciLexerEDIFACT_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerEDIFACT) callVirtualBase_Language() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnLanguage(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Language +func miqt_exec_callback_QsciLexerEDIFACT_Language(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnLexer(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Lexer +func miqt_exec_callback_QsciLexerEDIFACT_Lexer(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnLexerId(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_LexerId +func miqt_exec_callback_QsciLexerEDIFACT_LexerId(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionFillups +func miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionFillups(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerEDIFACT_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerEDIFACT) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerEDIFACT_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionWordSeparators(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerEDIFACT_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockEnd +func miqt_exec_callback_QsciLexerEDIFACT_BlockEnd(self *C.QsciLexerEDIFACT, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockLookback +func miqt_exec_callback_QsciLexerEDIFACT_BlockLookback(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerEDIFACT_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockStart +func miqt_exec_callback_QsciLexerEDIFACT_BlockStart(self *C.QsciLexerEDIFACT, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerEDIFACT_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockStartKeyword +func miqt_exec_callback_QsciLexerEDIFACT_BlockStartKeyword(self *C.QsciLexerEDIFACT, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BraceStyle +func miqt_exec_callback_QsciLexerEDIFACT_BraceStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerEDIFACT_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerEDIFACT_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_CaseSensitive +func miqt_exec_callback_QsciLexerEDIFACT_CaseSensitive(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerEDIFACT_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Color +func miqt_exec_callback_QsciLexerEDIFACT_Color(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerEDIFACT_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerEDIFACT) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerEDIFACT_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_EolFill +func miqt_exec_callback_QsciLexerEDIFACT_EolFill(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerEDIFACT_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerEDIFACT_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Font +func miqt_exec_callback_QsciLexerEDIFACT_Font(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_IndentationGuideView +func miqt_exec_callback_QsciLexerEDIFACT_IndentationGuideView(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerEDIFACT_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Keywords +func miqt_exec_callback_QsciLexerEDIFACT_Keywords(self *C.QsciLexerEDIFACT, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerEDIFACT) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerEDIFACT_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Description +func miqt_exec_callback_QsciLexerEDIFACT_Description(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerEDIFACT_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Paper +func miqt_exec_callback_QsciLexerEDIFACT_Paper(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerEDIFACT_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultColorWithStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerEDIFACT_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerEDIFACT) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerEDIFACT_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultEolFill +func miqt_exec_callback_QsciLexerEDIFACT_DefaultEolFill(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerEDIFACT_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerEDIFACT_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultFontWithStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerEDIFACT_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultPaperWithStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerEDIFACT_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerEDIFACT) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerEDIFACT_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetEditor +func miqt_exec_callback_QsciLexerEDIFACT_SetEditor(self *C.QsciLexerEDIFACT, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_RefreshProperties() { + + C.QsciLexerEDIFACT_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerEDIFACT) OnRefreshProperties(slot func(super func())) { + C.QsciLexerEDIFACT_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_RefreshProperties +func miqt_exec_callback_QsciLexerEDIFACT_RefreshProperties(self *C.QsciLexerEDIFACT, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_StyleBitsNeeded +func miqt_exec_callback_QsciLexerEDIFACT_StyleBitsNeeded(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_WordCharacters +func miqt_exec_callback_QsciLexerEDIFACT_WordCharacters(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerEDIFACT_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerEDIFACT) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerEDIFACT_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerEDIFACT_SetAutoIndentStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetColor +func miqt_exec_callback_QsciLexerEDIFACT_SetColor(self *C.QsciLexerEDIFACT, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetEolFill +func miqt_exec_callback_QsciLexerEDIFACT_SetEolFill(self *C.QsciLexerEDIFACT, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetFont +func miqt_exec_callback_QsciLexerEDIFACT_SetFont(self *C.QsciLexerEDIFACT, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetPaper +func miqt_exec_callback_QsciLexerEDIFACT_SetPaper(self *C.QsciLexerEDIFACT, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerEDIFACT_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerEDIFACT) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerEDIFACT_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_ReadProperties +func miqt_exec_callback_QsciLexerEDIFACT_ReadProperties(self *C.QsciLexerEDIFACT, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerEDIFACT_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerEDIFACT) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerEDIFACT_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_WriteProperties +func miqt_exec_callback_QsciLexerEDIFACT_WriteProperties(self *C.QsciLexerEDIFACT, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerEDIFACT) Delete() { - C.QsciLexerEDIFACT_Delete(this.h) + C.QsciLexerEDIFACT_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h index 9f43cdc2..b4d03e58 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h @@ -16,18 +16,26 @@ extern "C" { #ifdef __cplusplus class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerEDIFACT; +class QsciScintilla; #else typedef struct QColor QColor; +typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerEDIFACT QsciLexerEDIFACT; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerEDIFACT* QsciLexerEDIFACT_new(); -QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent); +void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self); void* QsciLexerEDIFACT_Metacast(QsciLexerEDIFACT* self, const char* param1); struct miqt_string QsciLexerEDIFACT_Tr(const char* s); @@ -40,7 +48,75 @@ struct miqt_string QsciLexerEDIFACT_Tr2(const char* s, const char* c); struct miqt_string QsciLexerEDIFACT_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerEDIFACT_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerEDIFACT_TrUtf83(const char* s, const char* c, int n); -void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self); +void QsciLexerEDIFACT_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_Language(const void* self); +void QsciLexerEDIFACT_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_Lexer(const void* self); +void QsciLexerEDIFACT_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_LexerId(const void* self); +void QsciLexerEDIFACT_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerEDIFACT_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerEDIFACT_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerEDIFACT_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerEDIFACT_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_BlockLookback(const void* self); +void QsciLexerEDIFACT_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerEDIFACT_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerEDIFACT_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_BraceStyle(const void* self); +void QsciLexerEDIFACT_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_CaseSensitive(const void* self); +void QsciLexerEDIFACT_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_Color(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_EolFill(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerEDIFACT_virtualbase_Font(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_IndentationGuideView(const void* self); +void QsciLexerEDIFACT_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_Keywords(const void* self, int set); +void QsciLexerEDIFACT_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_DefaultStyle(const void* self); +void QsciLexerEDIFACT_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerEDIFACT_virtualbase_Description(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_Paper(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerEDIFACT_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerEDIFACT_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_RefreshProperties(void* self); +void QsciLexerEDIFACT_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerEDIFACT_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_WordCharacters(const void* self); +void QsciLexerEDIFACT_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerEDIFACT_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerEDIFACT_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerEDIFACT_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerEDIFACT_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerEDIFACT_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerEDIFACT_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp index c5612eb6..ba37e2e0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp @@ -7,12 +7,54 @@ #include "gen_qscilexerfortran.h" #include "_cgo_export.h" -QsciLexerFortran* QsciLexerFortran_new() { - return new QsciLexerFortran(); +class MiqtVirtualQsciLexerFortran : public virtual QsciLexerFortran { +public: + + MiqtVirtualQsciLexerFortran(): QsciLexerFortran() {}; + MiqtVirtualQsciLexerFortran(QObject* parent): QsciLexerFortran(parent) {}; + + virtual ~MiqtVirtualQsciLexerFortran() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerFortran::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerFortran_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerFortran::setFoldCompact(fold); + + } + +}; + +void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(); + *outptr_QsciLexerFortran = ret; + *outptr_QsciLexerFortran77 = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerFortran* QsciLexerFortran_new2(QObject* parent) { - return new QsciLexerFortran(parent); +void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(parent); + *outptr_QsciLexerFortran = ret; + *outptr_QsciLexerFortran77 = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self) { @@ -101,7 +143,19 @@ struct miqt_string QsciLexerFortran_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciLexerFortran_Delete(QsciLexerFortran* self) { - delete self; +void QsciLexerFortran_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerFortran_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerFortran*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerFortran_Delete(QsciLexerFortran* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go index 42d04a1a..d16fd215 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerFortran struct { - h *C.QsciLexerFortran + h *C.QsciLexerFortran + isSubclass bool *QsciLexerFortran77 } @@ -33,27 +35,49 @@ func (this *QsciLexerFortran) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerFortran(h *C.QsciLexerFortran) *QsciLexerFortran { +// newQsciLexerFortran constructs the type using only CGO pointers. +func newQsciLexerFortran(h *C.QsciLexerFortran, h_QsciLexerFortran77 *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran { if h == nil { return nil } - return &QsciLexerFortran{h: h, QsciLexerFortran77: UnsafeNewQsciLexerFortran77(unsafe.Pointer(h))} + return &QsciLexerFortran{h: h, + QsciLexerFortran77: newQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerFortran(h unsafe.Pointer) *QsciLexerFortran { - return newQsciLexerFortran((*C.QsciLexerFortran)(h)) +// UnsafeNewQsciLexerFortran constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerFortran(h unsafe.Pointer, h_QsciLexerFortran77 unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran { + if h == nil { + return nil + } + + return &QsciLexerFortran{h: (*C.QsciLexerFortran)(h), + QsciLexerFortran77: UnsafeNewQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} } // NewQsciLexerFortran constructs a new QsciLexerFortran object. func NewQsciLexerFortran() *QsciLexerFortran { - ret := C.QsciLexerFortran_new() - return newQsciLexerFortran(ret) + var outptr_QsciLexerFortran *C.QsciLexerFortran = nil + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran_new(&outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerFortran2 constructs a new QsciLexerFortran object. func NewQsciLexerFortran2(parent *qt.QObject) *QsciLexerFortran { - ret := C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerFortran(ret) + var outptr_QsciLexerFortran *C.QsciLexerFortran = nil + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerFortran) MetaObject() *qt.QMetaObject { @@ -143,9 +167,32 @@ func QsciLexerFortran_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerFortran) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerFortran_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerFortran) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerFortran_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran_SetFoldCompact +func miqt_exec_callback_QsciLexerFortran_SetFoldCompact(self *C.QsciLexerFortran, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerFortran{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerFortran) Delete() { - C.QsciLexerFortran_Delete(this.h) + C.QsciLexerFortran_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h index 18ff4e00..5784881e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QObject; +class QsciLexer; class QsciLexerFortran; +class QsciLexerFortran77; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerFortran QsciLexerFortran; +typedef struct QsciLexerFortran77 QsciLexerFortran77; #endif -QsciLexerFortran* QsciLexerFortran_new(); -QsciLexerFortran* QsciLexerFortran_new2(QObject* parent); +void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self); void* QsciLexerFortran_Metacast(QsciLexerFortran* self, const char* param1); struct miqt_string QsciLexerFortran_Tr(const char* s); @@ -37,7 +41,9 @@ struct miqt_string QsciLexerFortran_Tr2(const char* s, const char* c); struct miqt_string QsciLexerFortran_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerFortran_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerFortran_TrUtf83(const char* s, const char* c, int n); -void QsciLexerFortran_Delete(QsciLexerFortran* self); +void QsciLexerFortran_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerFortran_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerFortran_Delete(QsciLexerFortran* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp index 19301d11..c849d4b3 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexerfortran77.h" #include "_cgo_export.h" -QsciLexerFortran77* QsciLexerFortran77_new() { - return new QsciLexerFortran77(); +class MiqtVirtualQsciLexerFortran77 : public virtual QsciLexerFortran77 { +public: + + MiqtVirtualQsciLexerFortran77(): QsciLexerFortran77() {}; + MiqtVirtualQsciLexerFortran77(QObject* parent): QsciLexerFortran77(parent) {}; + + virtual ~MiqtVirtualQsciLexerFortran77() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerFortran77::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerFortran77_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerFortran77::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerFortran77::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerFortran77::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerFortran77::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerFortran77::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerFortran77::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerFortran77::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerFortran77::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerFortran77_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerFortran77::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerFortran77::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerFortran77::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerFortran77::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerFortran77::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerFortran77::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerFortran77::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerFortran77::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerFortran77::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerFortran77::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerFortran77::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerFortran77::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerFortran77::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerFortran77::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerFortran77::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerFortran77::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerFortran77::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerFortran77::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerFortran77::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerFortran77::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerFortran77::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerFortran77::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerFortran77::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerFortran77::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerFortran77::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerFortran77_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerFortran77::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerFortran77::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerFortran77::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerFortran77::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerFortran77::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerFortran77::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerFortran77::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerFortran77::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerFortran77::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerFortran77::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerFortran77::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerFortran77_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerFortran77::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerFortran77::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerFortran77_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerFortran77::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerFortran77::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerFortran77::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerFortran77::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerFortran77::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerFortran77::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerFortran77_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerFortran77::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerFortran77::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerFortran77::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerFortran77::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerFortran77::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerFortran77::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerFortran77::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerFortran77::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerFortran77::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerFortran77::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerFortran77::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerFortran77::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerFortran77::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(); + *outptr_QsciLexerFortran77 = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent) { - return new QsciLexerFortran77(parent); +void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(parent); + *outptr_QsciLexerFortran77 = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self) { @@ -146,7 +1006,283 @@ struct miqt_string QsciLexerFortran77_TrUtf83(const char* s, const char* c, int return _ms; } -void QsciLexerFortran77_Delete(QsciLexerFortran77* self) { - delete self; +void QsciLexerFortran77_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerFortran77_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerFortran77_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Language = slot; +} + +void QsciLexerFortran77_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerFortran77_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerFortran77_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__LexerId = slot; +} + +int QsciLexerFortran77_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerFortran77_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerFortran77_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerFortran77_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerFortran77_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerFortran77_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerFortran77_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerFortran77_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerFortran77_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerFortran77_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerFortran77_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerFortran77_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerFortran77_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerFortran77_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerFortran77_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerFortran77_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerFortran77_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerFortran77_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerFortran77_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Color(style); +} + +void QsciLexerFortran77_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerFortran77_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerFortran77_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerFortran77_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Font(style); +} + +void QsciLexerFortran77_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerFortran77_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerFortran77_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerFortran77_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerFortran77_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerFortran77_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerFortran77_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Description = slot; +} + +void QsciLexerFortran77_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerFortran77_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerFortran77_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerFortran77_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerFortran77_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerFortran77_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerFortran77_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerFortran77_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerFortran77_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerFortran77_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerFortran77_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerFortran77_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerFortran77_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerFortran77_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerFortran77_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerFortran77_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerFortran77_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerFortran77_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerFortran77_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerFortran77_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerFortran77_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetColor = slot; +} + +void QsciLexerFortran77_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerFortran77_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerFortran77_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerFortran77_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetFont = slot; +} + +void QsciLexerFortran77_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerFortran77_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerFortran77_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerFortran77_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerFortran77_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerFortran77_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerFortran77_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerFortran77_Delete(QsciLexerFortran77* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go index 3485009a..48ae43c5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerFortran77 struct { - h *C.QsciLexerFortran77 + h *C.QsciLexerFortran77 + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerFortran77) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerFortran77(h *C.QsciLexerFortran77) *QsciLexerFortran77 { +// newQsciLexerFortran77 constructs the type using only CGO pointers. +func newQsciLexerFortran77(h *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran77 { if h == nil { return nil } - return &QsciLexerFortran77{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerFortran77{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerFortran77(h unsafe.Pointer) *QsciLexerFortran77 { - return newQsciLexerFortran77((*C.QsciLexerFortran77)(h)) +// UnsafeNewQsciLexerFortran77 constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerFortran77(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran77 { + if h == nil { + return nil + } + + return &QsciLexerFortran77{h: (*C.QsciLexerFortran77)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerFortran77 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran77() *QsciLexerFortran77 { - ret := C.QsciLexerFortran77_new() - return newQsciLexerFortran77(ret) + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran77_new(&outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerFortran772 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran772(parent *qt.QObject) *QsciLexerFortran77 { - ret := C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerFortran77(ret) + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerFortran77) MetaObject() *qt.QMetaObject { @@ -211,9 +233,917 @@ func QsciLexerFortran77_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerFortran77) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerFortran77_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerFortran77) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerFortran77_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetFoldCompact +func miqt_exec_callback_QsciLexerFortran77_SetFoldCompact(self *C.QsciLexerFortran77, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Language() string { + + _ret := C.QsciLexerFortran77_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnLanguage(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Language +func miqt_exec_callback_QsciLexerFortran77_Language(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerFortran77_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnLexer(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Lexer +func miqt_exec_callback_QsciLexerFortran77_Lexer(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerFortran77_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnLexerId(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_LexerId +func miqt_exec_callback_QsciLexerFortran77_LexerId(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerFortran77_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_AutoCompletionFillups +func miqt_exec_callback_QsciLexerFortran77_AutoCompletionFillups(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerFortran77_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerFortran77) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerFortran77_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerFortran77_AutoCompletionWordSeparators(self *C.QsciLexerFortran77, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerFortran77_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerFortran77_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockEnd +func miqt_exec_callback_QsciLexerFortran77_BlockEnd(self *C.QsciLexerFortran77, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerFortran77_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockLookback +func miqt_exec_callback_QsciLexerFortran77_BlockLookback(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerFortran77_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerFortran77_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockStart +func miqt_exec_callback_QsciLexerFortran77_BlockStart(self *C.QsciLexerFortran77, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerFortran77_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerFortran77_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockStartKeyword +func miqt_exec_callback_QsciLexerFortran77_BlockStartKeyword(self *C.QsciLexerFortran77, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerFortran77_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BraceStyle +func miqt_exec_callback_QsciLexerFortran77_BraceStyle(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerFortran77_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerFortran77_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_CaseSensitive +func miqt_exec_callback_QsciLexerFortran77_CaseSensitive(self *C.QsciLexerFortran77, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerFortran77_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Color +func miqt_exec_callback_QsciLexerFortran77_Color(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerFortran77_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerFortran77) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerFortran77_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_EolFill +func miqt_exec_callback_QsciLexerFortran77_EolFill(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerFortran77_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerFortran77_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Font +func miqt_exec_callback_QsciLexerFortran77_Font(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerFortran77_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_IndentationGuideView +func miqt_exec_callback_QsciLexerFortran77_IndentationGuideView(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerFortran77_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerFortran77_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Keywords +func miqt_exec_callback_QsciLexerFortran77_Keywords(self *C.QsciLexerFortran77, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerFortran77_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultStyle(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerFortran77_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerFortran77) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerFortran77_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Description +func miqt_exec_callback_QsciLexerFortran77_Description(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerFortran77) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerFortran77_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Paper +func miqt_exec_callback_QsciLexerFortran77_Paper(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerFortran77_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultColorWithStyle(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerFortran77_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerFortran77) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerFortran77_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultEolFill +func miqt_exec_callback_QsciLexerFortran77_DefaultEolFill(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerFortran77_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerFortran77_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultFontWithStyle(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerFortran77_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultPaperWithStyle(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerFortran77_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerFortran77) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerFortran77_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetEditor +func miqt_exec_callback_QsciLexerFortran77_SetEditor(self *C.QsciLexerFortran77, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerFortran77) callVirtualBase_RefreshProperties() { + + C.QsciLexerFortran77_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerFortran77) OnRefreshProperties(slot func(super func())) { + C.QsciLexerFortran77_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_RefreshProperties +func miqt_exec_callback_QsciLexerFortran77_RefreshProperties(self *C.QsciLexerFortran77, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerFortran77) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerFortran77_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_StyleBitsNeeded +func miqt_exec_callback_QsciLexerFortran77_StyleBitsNeeded(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerFortran77_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_WordCharacters +func miqt_exec_callback_QsciLexerFortran77_WordCharacters(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerFortran77_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerFortran77) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerFortran77_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerFortran77_SetAutoIndentStyle(self *C.QsciLexerFortran77, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerFortran77_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerFortran77_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetColor +func miqt_exec_callback_QsciLexerFortran77_SetColor(self *C.QsciLexerFortran77, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerFortran77_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerFortran77_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetEolFill +func miqt_exec_callback_QsciLexerFortran77_SetEolFill(self *C.QsciLexerFortran77, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerFortran77_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerFortran77_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetFont +func miqt_exec_callback_QsciLexerFortran77_SetFont(self *C.QsciLexerFortran77, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerFortran77_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerFortran77_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetPaper +func miqt_exec_callback_QsciLexerFortran77_SetPaper(self *C.QsciLexerFortran77, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerFortran77_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerFortran77) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerFortran77_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_ReadProperties +func miqt_exec_callback_QsciLexerFortran77_ReadProperties(self *C.QsciLexerFortran77, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerFortran77_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerFortran77) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerFortran77_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_WriteProperties +func miqt_exec_callback_QsciLexerFortran77_WriteProperties(self *C.QsciLexerFortran77, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerFortran77) Delete() { - C.QsciLexerFortran77_Delete(this.h) + C.QsciLexerFortran77_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h index aea61394..0963a111 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerFortran77; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerFortran77 QsciLexerFortran77; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerFortran77* QsciLexerFortran77_new(); -QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent); +void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self); void* QsciLexerFortran77_Metacast(QsciLexerFortran77* self, const char* param1); struct miqt_string QsciLexerFortran77_Tr(const char* s); @@ -50,7 +56,77 @@ struct miqt_string QsciLexerFortran77_Tr2(const char* s, const char* c); struct miqt_string QsciLexerFortran77_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerFortran77_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerFortran77_TrUtf83(const char* s, const char* c, int n); -void QsciLexerFortran77_Delete(QsciLexerFortran77* self); +void QsciLexerFortran77_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerFortran77_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_Language(const void* self); +void QsciLexerFortran77_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_Lexer(const void* self); +void QsciLexerFortran77_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_LexerId(const void* self); +void QsciLexerFortran77_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerFortran77_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerFortran77_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerFortran77_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerFortran77_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_BlockLookback(const void* self); +void QsciLexerFortran77_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerFortran77_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerFortran77_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_BraceStyle(const void* self); +void QsciLexerFortran77_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_CaseSensitive(const void* self); +void QsciLexerFortran77_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_Color(const void* self, int style); +void QsciLexerFortran77_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_EolFill(const void* self, int style); +void QsciLexerFortran77_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerFortran77_virtualbase_Font(const void* self, int style); +void QsciLexerFortran77_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_IndentationGuideView(const void* self); +void QsciLexerFortran77_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_Keywords(const void* self, int set); +void QsciLexerFortran77_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_DefaultStyle(const void* self); +void QsciLexerFortran77_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerFortran77_virtualbase_Description(const void* self, int style); +void QsciLexerFortran77_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_Paper(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerFortran77_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerFortran77_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerFortran77_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_RefreshProperties(void* self); +void QsciLexerFortran77_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerFortran77_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_WordCharacters(const void* self); +void QsciLexerFortran77_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerFortran77_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerFortran77_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerFortran77_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerFortran77_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerFortran77_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerFortran77_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerFortran77_Delete(QsciLexerFortran77* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp index e7db2791..2f104dc5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,918 @@ #include "gen_qscilexerhtml.h" #include "_cgo_export.h" -QsciLexerHTML* QsciLexerHTML_new() { - return new QsciLexerHTML(); +class MiqtVirtualQsciLexerHTML : public virtual QsciLexerHTML { +public: + + MiqtVirtualQsciLexerHTML(): QsciLexerHTML() {}; + MiqtVirtualQsciLexerHTML(QObject* parent): QsciLexerHTML(parent) {}; + + virtual ~MiqtVirtualQsciLexerHTML() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerHTML::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerHTML_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerHTML::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerHTML::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerHTML_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerHTML::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaseSensitiveTags = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaseSensitiveTags(bool sens) override { + if (handle__SetCaseSensitiveTags == 0) { + QsciLexerHTML::setCaseSensitiveTags(sens); + return; + } + + bool sigval1 = sens; + + miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags(this, handle__SetCaseSensitiveTags, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaseSensitiveTags(bool sens) { + + QsciLexerHTML::setCaseSensitiveTags(sens); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerHTML::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerHTML::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerHTML::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerHTML::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerHTML::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerHTML::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerHTML::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerHTML_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerHTML::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerHTML::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerHTML::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerHTML::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerHTML::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerHTML::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerHTML::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerHTML::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerHTML::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerHTML::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerHTML::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerHTML::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerHTML::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerHTML::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerHTML::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerHTML::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerHTML::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerHTML::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerHTML_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerHTML::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerHTML::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerHTML::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerHTML::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerHTML::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerHTML::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerHTML::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerHTML_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerHTML::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerHTML::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerHTML::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerHTML::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerHTML::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerHTML::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerHTML::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerHTML::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerHTML::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerHTML::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerHTML::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerHTML_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerHTML::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerHTML::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerHTML_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerHTML::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerHTML::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerHTML::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerHTML::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerHTML::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerHTML::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerHTML_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerHTML::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerHTML::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerHTML::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerHTML::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerHTML::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerHTML::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerHTML::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerHTML::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerHTML::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerHTML::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerHTML::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerHTML::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerHTML::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(); + *outptr_QsciLexerHTML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerHTML* QsciLexerHTML_new2(QObject* parent) { - return new QsciLexerHTML(parent); +void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(parent); + *outptr_QsciLexerHTML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self) { @@ -198,7 +1106,299 @@ struct miqt_string QsciLexerHTML_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerHTML_Delete(QsciLexerHTML* self) { - delete self; +void QsciLexerHTML_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerHTML_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerHTML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerHTML_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerHTML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetCaseSensitiveTags = slot; +} + +void QsciLexerHTML_virtualbase_SetCaseSensitiveTags(void* self, bool sens) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetCaseSensitiveTags(sens); +} + +void QsciLexerHTML_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Language = slot; +} + +void QsciLexerHTML_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerHTML_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerHTML_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__LexerId = slot; +} + +int QsciLexerHTML_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerHTML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerHTML_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerHTML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerHTML_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerHTML_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerHTML_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerHTML_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerHTML_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerHTML_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerHTML_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerHTML_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerHTML_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerHTML_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerHTML_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerHTML_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerHTML_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerHTML_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerHTML_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Color(style); +} + +void QsciLexerHTML_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerHTML_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerHTML_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerHTML_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Font(style); +} + +void QsciLexerHTML_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerHTML_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerHTML_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerHTML_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerHTML_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerHTML_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerHTML_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Description = slot; +} + +void QsciLexerHTML_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerHTML_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerHTML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerHTML_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerHTML_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerHTML_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerHTML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerHTML_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerHTML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerHTML_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerHTML_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerHTML_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerHTML_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerHTML_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerHTML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerHTML_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerHTML_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerHTML_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerHTML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerHTML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerHTML_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetColor = slot; +} + +void QsciLexerHTML_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerHTML_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerHTML_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerHTML_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetFont = slot; +} + +void QsciLexerHTML_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerHTML_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerHTML_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerHTML_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerHTML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerHTML_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerHTML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerHTML_Delete(QsciLexerHTML* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go index 785df5ee..0462568d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -130,7 +131,8 @@ const ( ) type QsciLexerHTML struct { - h *C.QsciLexerHTML + h *C.QsciLexerHTML + isSubclass bool *QsciLexer } @@ -148,27 +150,47 @@ func (this *QsciLexerHTML) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerHTML(h *C.QsciLexerHTML) *QsciLexerHTML { +// newQsciLexerHTML constructs the type using only CGO pointers. +func newQsciLexerHTML(h *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerHTML { if h == nil { return nil } - return &QsciLexerHTML{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerHTML{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerHTML(h unsafe.Pointer) *QsciLexerHTML { - return newQsciLexerHTML((*C.QsciLexerHTML)(h)) +// UnsafeNewQsciLexerHTML constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerHTML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerHTML { + if h == nil { + return nil + } + + return &QsciLexerHTML{h: (*C.QsciLexerHTML)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerHTML constructs a new QsciLexerHTML object. func NewQsciLexerHTML() *QsciLexerHTML { - ret := C.QsciLexerHTML_new() - return newQsciLexerHTML(ret) + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerHTML_new(&outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerHTML2 constructs a new QsciLexerHTML object. func NewQsciLexerHTML2(parent *qt.QObject) *QsciLexerHTML { - ret := C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerHTML(ret) + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerHTML) MetaObject() *qt.QMetaObject { @@ -360,9 +382,963 @@ func QsciLexerHTML_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerHTML) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerHTML_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerHTML) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerHTML_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetFoldCompact +func miqt_exec_callback_QsciLexerHTML_SetFoldCompact(self *C.QsciLexerHTML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerHTML_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerHTML) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerHTML_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerHTML_SetFoldPreprocessor(self *C.QsciLexerHTML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetCaseSensitiveTags(sens bool) { + + C.QsciLexerHTML_virtualbase_SetCaseSensitiveTags(unsafe.Pointer(this.h), (C.bool)(sens)) + +} +func (this *QsciLexerHTML) OnSetCaseSensitiveTags(slot func(super func(sens bool), sens bool)) { + C.QsciLexerHTML_override_virtual_SetCaseSensitiveTags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags +func miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags(self *C.QsciLexerHTML, cb C.intptr_t, sens C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sens bool), sens bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(sens) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetCaseSensitiveTags, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_Language() string { + + _ret := C.QsciLexerHTML_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnLanguage(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Language +func miqt_exec_callback_QsciLexerHTML_Language(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerHTML_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnLexer(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Lexer +func miqt_exec_callback_QsciLexerHTML_Lexer(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerHTML_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnLexerId(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_LexerId +func miqt_exec_callback_QsciLexerHTML_LexerId(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerHTML_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_AutoCompletionFillups +func miqt_exec_callback_QsciLexerHTML_AutoCompletionFillups(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerHTML_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerHTML) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerHTML_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerHTML_AutoCompletionWordSeparators(self *C.QsciLexerHTML, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerHTML_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerHTML_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockEnd +func miqt_exec_callback_QsciLexerHTML_BlockEnd(self *C.QsciLexerHTML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerHTML_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockLookback +func miqt_exec_callback_QsciLexerHTML_BlockLookback(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerHTML_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerHTML_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockStart +func miqt_exec_callback_QsciLexerHTML_BlockStart(self *C.QsciLexerHTML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerHTML_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerHTML_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockStartKeyword +func miqt_exec_callback_QsciLexerHTML_BlockStartKeyword(self *C.QsciLexerHTML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerHTML_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BraceStyle +func miqt_exec_callback_QsciLexerHTML_BraceStyle(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerHTML_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerHTML_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_CaseSensitive +func miqt_exec_callback_QsciLexerHTML_CaseSensitive(self *C.QsciLexerHTML, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerHTML_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerHTML_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Color +func miqt_exec_callback_QsciLexerHTML_Color(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerHTML_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerHTML) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerHTML_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_EolFill +func miqt_exec_callback_QsciLexerHTML_EolFill(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerHTML_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerHTML_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Font +func miqt_exec_callback_QsciLexerHTML_Font(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerHTML_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_IndentationGuideView +func miqt_exec_callback_QsciLexerHTML_IndentationGuideView(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerHTML_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerHTML_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Keywords +func miqt_exec_callback_QsciLexerHTML_Keywords(self *C.QsciLexerHTML, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerHTML_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultStyle +func miqt_exec_callback_QsciLexerHTML_DefaultStyle(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerHTML_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerHTML) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerHTML_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Description +func miqt_exec_callback_QsciLexerHTML_Description(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerHTML) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerHTML_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerHTML_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Paper +func miqt_exec_callback_QsciLexerHTML_Paper(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerHTML_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerHTML_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerHTML_DefaultColorWithStyle(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerHTML_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerHTML) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerHTML_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultEolFill +func miqt_exec_callback_QsciLexerHTML_DefaultEolFill(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerHTML_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerHTML_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerHTML_DefaultFontWithStyle(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerHTML_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerHTML_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerHTML_DefaultPaperWithStyle(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerHTML_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerHTML) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerHTML_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetEditor +func miqt_exec_callback_QsciLexerHTML_SetEditor(self *C.QsciLexerHTML, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_RefreshProperties() { + + C.QsciLexerHTML_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerHTML) OnRefreshProperties(slot func(super func())) { + C.QsciLexerHTML_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_RefreshProperties +func miqt_exec_callback_QsciLexerHTML_RefreshProperties(self *C.QsciLexerHTML, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerHTML) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerHTML_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_StyleBitsNeeded +func miqt_exec_callback_QsciLexerHTML_StyleBitsNeeded(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerHTML_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_WordCharacters +func miqt_exec_callback_QsciLexerHTML_WordCharacters(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerHTML_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerHTML) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerHTML_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerHTML_SetAutoIndentStyle(self *C.QsciLexerHTML, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerHTML_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerHTML_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetColor +func miqt_exec_callback_QsciLexerHTML_SetColor(self *C.QsciLexerHTML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerHTML_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerHTML_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetEolFill +func miqt_exec_callback_QsciLexerHTML_SetEolFill(self *C.QsciLexerHTML, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerHTML_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerHTML_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetFont +func miqt_exec_callback_QsciLexerHTML_SetFont(self *C.QsciLexerHTML, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerHTML_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerHTML_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetPaper +func miqt_exec_callback_QsciLexerHTML_SetPaper(self *C.QsciLexerHTML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerHTML_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerHTML) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerHTML_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_ReadProperties +func miqt_exec_callback_QsciLexerHTML_ReadProperties(self *C.QsciLexerHTML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerHTML_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerHTML) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerHTML_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_WriteProperties +func miqt_exec_callback_QsciLexerHTML_WriteProperties(self *C.QsciLexerHTML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerHTML) Delete() { - C.QsciLexerHTML_Delete(this.h) + C.QsciLexerHTML_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h index 710aad46..9091caf9 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerHTML; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerHTML QsciLexerHTML; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerHTML* QsciLexerHTML_new(); -QsciLexerHTML* QsciLexerHTML_new2(QObject* parent); +void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self); void* QsciLexerHTML_Metacast(QsciLexerHTML* self, const char* param1); struct miqt_string QsciLexerHTML_Tr(const char* s); @@ -63,7 +69,81 @@ struct miqt_string QsciLexerHTML_Tr2(const char* s, const char* c); struct miqt_string QsciLexerHTML_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerHTML_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerHTML_TrUtf83(const char* s, const char* c, int n); -void QsciLexerHTML_Delete(QsciLexerHTML* self); +void QsciLexerHTML_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerHTML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerHTML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetCaseSensitiveTags(void* self, bool sens); +void QsciLexerHTML_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_Language(const void* self); +void QsciLexerHTML_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_Lexer(const void* self); +void QsciLexerHTML_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_LexerId(const void* self); +void QsciLexerHTML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerHTML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerHTML_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerHTML_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerHTML_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_BlockLookback(const void* self); +void QsciLexerHTML_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerHTML_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerHTML_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_BraceStyle(const void* self); +void QsciLexerHTML_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_CaseSensitive(const void* self); +void QsciLexerHTML_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_Color(const void* self, int style); +void QsciLexerHTML_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_EolFill(const void* self, int style); +void QsciLexerHTML_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerHTML_virtualbase_Font(const void* self, int style); +void QsciLexerHTML_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_IndentationGuideView(const void* self); +void QsciLexerHTML_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_Keywords(const void* self, int set); +void QsciLexerHTML_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_DefaultStyle(const void* self); +void QsciLexerHTML_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerHTML_virtualbase_Description(const void* self, int style); +void QsciLexerHTML_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_Paper(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerHTML_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerHTML_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerHTML_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_RefreshProperties(void* self); +void QsciLexerHTML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerHTML_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_WordCharacters(const void* self); +void QsciLexerHTML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerHTML_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerHTML_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerHTML_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerHTML_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerHTML_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerHTML_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerHTML_Delete(QsciLexerHTML* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp index 96767c92..202a5e60 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp @@ -8,12 +8,150 @@ #include "gen_qscilexeridl.h" #include "_cgo_export.h" -QsciLexerIDL* QsciLexerIDL_new() { - return new QsciLexerIDL(); +class MiqtVirtualQsciLexerIDL : public virtual QsciLexerIDL { +public: + + MiqtVirtualQsciLexerIDL(): QsciLexerIDL() {}; + MiqtVirtualQsciLexerIDL(QObject* parent): QsciLexerIDL(parent) {}; + + virtual ~MiqtVirtualQsciLexerIDL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerIDL::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerIDL::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerIDL::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerIDL::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerIDL::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerIDL::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerIDL::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerIDL::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerIDL::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerIDL_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerIDL::setStylePreprocessor(style); + + } + +}; + +void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(); + *outptr_QsciLexerIDL = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerIDL* QsciLexerIDL_new2(QObject* parent) { - return new QsciLexerIDL(parent); +void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(parent); + *outptr_QsciLexerIDL = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self) { @@ -113,7 +251,51 @@ struct miqt_string QsciLexerIDL_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerIDL_Delete(QsciLexerIDL* self) { - delete self; +void QsciLexerIDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerIDL_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerIDL_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerIDL_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerIDL_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerIDL_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerIDL_Delete(QsciLexerIDL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeridl.go b/qt-restricted-extras/qscintilla/gen_qscilexeridl.go index ff5e6529..779ac6f1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeridl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeridl.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerIDL struct { - h *C.QsciLexerIDL + h *C.QsciLexerIDL + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerIDL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerIDL(h *C.QsciLexerIDL) *QsciLexerIDL { +// newQsciLexerIDL constructs the type using only CGO pointers. +func newQsciLexerIDL(h *C.QsciLexerIDL, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerIDL { if h == nil { return nil } - return &QsciLexerIDL{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerIDL{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerIDL(h unsafe.Pointer) *QsciLexerIDL { - return newQsciLexerIDL((*C.QsciLexerIDL)(h)) +// UnsafeNewQsciLexerIDL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerIDL(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerIDL { + if h == nil { + return nil + } + + return &QsciLexerIDL{h: (*C.QsciLexerIDL)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerIDL constructs a new QsciLexerIDL object. func NewQsciLexerIDL() *QsciLexerIDL { - ret := C.QsciLexerIDL_new() - return newQsciLexerIDL(ret) + var outptr_QsciLexerIDL *C.QsciLexerIDL = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerIDL_new(&outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerIDL2 constructs a new QsciLexerIDL object. func NewQsciLexerIDL2(parent *qt.QObject) *QsciLexerIDL { - ret := C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerIDL(ret) + var outptr_QsciLexerIDL *C.QsciLexerIDL = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerIDL) MetaObject() *qt.QMetaObject { @@ -152,9 +176,124 @@ func QsciLexerIDL_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerIDL) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldAtElse +func miqt_exec_callback_QsciLexerIDL_SetFoldAtElse(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldComments +func miqt_exec_callback_QsciLexerIDL_SetFoldComments(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldCompact +func miqt_exec_callback_QsciLexerIDL_SetFoldCompact(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerIDL_SetFoldPreprocessor(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerIDL_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerIDL) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerIDL_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetStylePreprocessor +func miqt_exec_callback_QsciLexerIDL_SetStylePreprocessor(self *C.QsciLexerIDL, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerIDL) Delete() { - C.QsciLexerIDL_Delete(this.h) + C.QsciLexerIDL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeridl.h b/qt-restricted-extras/qscintilla/gen_qscilexeridl.h index f90fa4d5..10aa27fd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeridl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeridl.h @@ -18,16 +18,20 @@ extern "C" { class QColor; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerIDL; #else typedef struct QColor QColor; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerIDL QsciLexerIDL; #endif -QsciLexerIDL* QsciLexerIDL_new(); -QsciLexerIDL* QsciLexerIDL_new2(QObject* parent); +void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self); void* QsciLexerIDL_Metacast(QsciLexerIDL* self, const char* param1); struct miqt_string QsciLexerIDL_Tr(const char* s); @@ -40,7 +44,17 @@ struct miqt_string QsciLexerIDL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerIDL_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerIDL_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerIDL_TrUtf83(const char* s, const char* c, int n); -void QsciLexerIDL_Delete(QsciLexerIDL* self); +void QsciLexerIDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerIDL_Delete(QsciLexerIDL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp index 6e390621..30285825 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp @@ -7,12 +7,150 @@ #include "gen_qscilexerjava.h" #include "_cgo_export.h" -QsciLexerJava* QsciLexerJava_new() { - return new QsciLexerJava(); +class MiqtVirtualQsciLexerJava : public virtual QsciLexerJava { +public: + + MiqtVirtualQsciLexerJava(): QsciLexerJava() {}; + MiqtVirtualQsciLexerJava(QObject* parent): QsciLexerJava(parent) {}; + + virtual ~MiqtVirtualQsciLexerJava() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerJava::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerJava::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerJava::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerJava::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerJava::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerJava::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerJava::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerJava::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerJava::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerJava_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerJava::setStylePreprocessor(style); + + } + +}; + +void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(); + *outptr_QsciLexerJava = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerJava* QsciLexerJava_new2(QObject* parent) { - return new QsciLexerJava(parent); +void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(parent); + *outptr_QsciLexerJava = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self) { @@ -97,7 +235,51 @@ struct miqt_string QsciLexerJava_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerJava_Delete(QsciLexerJava* self) { - delete self; +void QsciLexerJava_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerJava_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerJava_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerJava_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerJava_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerJava_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerJava_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerJava_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerJava_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerJava_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerJava_Delete(QsciLexerJava* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjava.go b/qt-restricted-extras/qscintilla/gen_qscilexerjava.go index 269a2aa5..a3d47689 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjava.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjava.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerJava struct { - h *C.QsciLexerJava + h *C.QsciLexerJava + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerJava) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerJava(h *C.QsciLexerJava) *QsciLexerJava { +// newQsciLexerJava constructs the type using only CGO pointers. +func newQsciLexerJava(h *C.QsciLexerJava, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJava { if h == nil { return nil } - return &QsciLexerJava{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerJava{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerJava(h unsafe.Pointer) *QsciLexerJava { - return newQsciLexerJava((*C.QsciLexerJava)(h)) +// UnsafeNewQsciLexerJava constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerJava(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJava { + if h == nil { + return nil + } + + return &QsciLexerJava{h: (*C.QsciLexerJava)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerJava constructs a new QsciLexerJava object. func NewQsciLexerJava() *QsciLexerJava { - ret := C.QsciLexerJava_new() - return newQsciLexerJava(ret) + var outptr_QsciLexerJava *C.QsciLexerJava = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJava_new(&outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerJava2 constructs a new QsciLexerJava object. func NewQsciLexerJava2(parent *qt.QObject) *QsciLexerJava { - ret := C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerJava(ret) + var outptr_QsciLexerJava *C.QsciLexerJava = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerJava) MetaObject() *qt.QMetaObject { @@ -138,9 +162,124 @@ func QsciLexerJava_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerJava) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldAtElse +func miqt_exec_callback_QsciLexerJava_SetFoldAtElse(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldComments +func miqt_exec_callback_QsciLexerJava_SetFoldComments(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldCompact +func miqt_exec_callback_QsciLexerJava_SetFoldCompact(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerJava_SetFoldPreprocessor(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerJava_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerJava) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerJava_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetStylePreprocessor +func miqt_exec_callback_QsciLexerJava_SetStylePreprocessor(self *C.QsciLexerJava, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerJava) Delete() { - C.QsciLexerJava_Delete(this.h) + C.QsciLexerJava_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjava.h b/qt-restricted-extras/qscintilla/gen_qscilexerjava.h index dad3ccd6..b8a99b40 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjava.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjava.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerJava; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJava QsciLexerJava; #endif -QsciLexerJava* QsciLexerJava_new(); -QsciLexerJava* QsciLexerJava_new2(QObject* parent); +void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self); void* QsciLexerJava_Metacast(QsciLexerJava* self, const char* param1); struct miqt_string QsciLexerJava_Tr(const char* s); @@ -36,7 +40,17 @@ struct miqt_string QsciLexerJava_Tr2(const char* s, const char* c); struct miqt_string QsciLexerJava_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerJava_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerJava_TrUtf83(const char* s, const char* c, int n); -void QsciLexerJava_Delete(QsciLexerJava* self); +void QsciLexerJava_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerJava_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerJava_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerJava_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerJava_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerJava_Delete(QsciLexerJava* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp index b208ff22..3261db29 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp @@ -9,12 +9,150 @@ #include "gen_qscilexerjavascript.h" #include "_cgo_export.h" -QsciLexerJavaScript* QsciLexerJavaScript_new() { - return new QsciLexerJavaScript(); +class MiqtVirtualQsciLexerJavaScript : public virtual QsciLexerJavaScript { +public: + + MiqtVirtualQsciLexerJavaScript(): QsciLexerJavaScript() {}; + MiqtVirtualQsciLexerJavaScript(QObject* parent): QsciLexerJavaScript(parent) {}; + + virtual ~MiqtVirtualQsciLexerJavaScript() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerJavaScript::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerJavaScript::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerJavaScript::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerJavaScript::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerJavaScript::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerJavaScript::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerJavaScript::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerJavaScript::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerJavaScript::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerJavaScript_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerJavaScript::setStylePreprocessor(style); + + } + +}; + +void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(); + *outptr_QsciLexerJavaScript = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent) { - return new QsciLexerJavaScript(parent); +void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(parent); + *outptr_QsciLexerJavaScript = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self) { @@ -126,7 +264,51 @@ struct miqt_string QsciLexerJavaScript_TrUtf83(const char* s, const char* c, int return _ms; } -void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self) { - delete self; +void QsciLexerJavaScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerJavaScript_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerJavaScript_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerJavaScript_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerJavaScript_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerJavaScript_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go index 30df6906..41ac9779 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerJavaScript struct { - h *C.QsciLexerJavaScript + h *C.QsciLexerJavaScript + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerJavaScript) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerJavaScript(h *C.QsciLexerJavaScript) *QsciLexerJavaScript { +// newQsciLexerJavaScript constructs the type using only CGO pointers. +func newQsciLexerJavaScript(h *C.QsciLexerJavaScript, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJavaScript { if h == nil { return nil } - return &QsciLexerJavaScript{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerJavaScript{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer) *QsciLexerJavaScript { - return newQsciLexerJavaScript((*C.QsciLexerJavaScript)(h)) +// UnsafeNewQsciLexerJavaScript constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJavaScript { + if h == nil { + return nil + } + + return &QsciLexerJavaScript{h: (*C.QsciLexerJavaScript)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerJavaScript constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript() *QsciLexerJavaScript { - ret := C.QsciLexerJavaScript_new() - return newQsciLexerJavaScript(ret) + var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJavaScript_new(&outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerJavaScript2 constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript2(parent *qt.QObject) *QsciLexerJavaScript { - ret := C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerJavaScript(ret) + var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerJavaScript) MetaObject() *qt.QMetaObject { @@ -170,9 +194,124 @@ func QsciLexerJavaScript_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldAtElse +func miqt_exec_callback_QsciLexerJavaScript_SetFoldAtElse(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldComments +func miqt_exec_callback_QsciLexerJavaScript_SetFoldComments(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldCompact +func miqt_exec_callback_QsciLexerJavaScript_SetFoldCompact(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerJavaScript_SetFoldPreprocessor(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerJavaScript_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerJavaScript) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerJavaScript_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetStylePreprocessor +func miqt_exec_callback_QsciLexerJavaScript_SetStylePreprocessor(self *C.QsciLexerJavaScript, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerJavaScript) Delete() { - C.QsciLexerJavaScript_Delete(this.h) + C.QsciLexerJavaScript_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h index 4fe89adf..b2fef5c7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h @@ -19,17 +19,21 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerJavaScript; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJavaScript QsciLexerJavaScript; #endif -QsciLexerJavaScript* QsciLexerJavaScript_new(); -QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent); +void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self); void* QsciLexerJavaScript_Metacast(QsciLexerJavaScript* self, const char* param1); struct miqt_string QsciLexerJavaScript_Tr(const char* s); @@ -45,7 +49,17 @@ struct miqt_string QsciLexerJavaScript_Tr2(const char* s, const char* c); struct miqt_string QsciLexerJavaScript_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerJavaScript_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerJavaScript_TrUtf83(const char* s, const char* c, int n); -void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self); +void QsciLexerJavaScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp index d359f695..91a8b20b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerjson.h" #include "_cgo_export.h" -QsciLexerJSON* QsciLexerJSON_new() { - return new QsciLexerJSON(); +class MiqtVirtualQsciLexerJSON : public virtual QsciLexerJSON { +public: + + MiqtVirtualQsciLexerJSON(): QsciLexerJSON() {}; + MiqtVirtualQsciLexerJSON(QObject* parent): QsciLexerJSON(parent) {}; + + virtual ~MiqtVirtualQsciLexerJSON() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerJSON::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerJSON::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerJSON::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerJSON::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerJSON::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerJSON::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerJSON::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerJSON_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerJSON::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerJSON::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerJSON::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerJSON::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerJSON::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerJSON::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerJSON::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerJSON::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerJSON::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerJSON::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerJSON::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerJSON::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerJSON::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerJSON::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerJSON::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerJSON::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerJSON::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerJSON::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerJSON_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerJSON::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerJSON::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerJSON::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerJSON::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerJSON::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerJSON::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerJSON::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerJSON_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerJSON::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerJSON::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerJSON::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerJSON::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerJSON::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerJSON::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerJSON::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerJSON::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerJSON::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerJSON::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerJSON::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerJSON_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerJSON::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerJSON::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerJSON_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerJSON::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerJSON::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerJSON::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerJSON::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerJSON::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerJSON::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerJSON_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerJSON::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerJSON::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerJSON::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerJSON::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerJSON::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerJSON::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerJSON::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerJSON::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerJSON::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerJSON::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerJSON::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerJSON::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerJSON::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(); + *outptr_QsciLexerJSON = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerJSON* QsciLexerJSON_new2(QObject* parent) { - return new QsciLexerJSON(parent); +void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(parent); + *outptr_QsciLexerJSON = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self) { @@ -158,7 +994,275 @@ struct miqt_string QsciLexerJSON_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerJSON_Delete(QsciLexerJSON* self) { - delete self; +void QsciLexerJSON_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Language = slot; +} + +void QsciLexerJSON_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerJSON_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerJSON_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__LexerId = slot; +} + +int QsciLexerJSON_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerJSON_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerJSON_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerJSON_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerJSON_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerJSON_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerJSON_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerJSON_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerJSON_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerJSON_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerJSON_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerJSON_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerJSON_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerJSON_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerJSON_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerJSON_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerJSON_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerJSON_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerJSON_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Color(style); +} + +void QsciLexerJSON_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerJSON_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerJSON_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerJSON_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Font(style); +} + +void QsciLexerJSON_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerJSON_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerJSON_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerJSON_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerJSON_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerJSON_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerJSON_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Description = slot; +} + +void QsciLexerJSON_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerJSON_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerJSON_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerJSON_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerJSON_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerJSON_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerJSON_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerJSON_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerJSON_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerJSON_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerJSON_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerJSON_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerJSON_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerJSON_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerJSON_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerJSON_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerJSON_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerJSON_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerJSON_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerJSON_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerJSON_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetColor = slot; +} + +void QsciLexerJSON_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerJSON_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerJSON_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerJSON_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetFont = slot; +} + +void QsciLexerJSON_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerJSON_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerJSON_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerJSON_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerJSON_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerJSON_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerJSON_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerJSON_Delete(QsciLexerJSON* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.go b/qt-restricted-extras/qscintilla/gen_qscilexerjson.go index dde16489..b51a521d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -34,7 +35,8 @@ const ( ) type QsciLexerJSON struct { - h *C.QsciLexerJSON + h *C.QsciLexerJSON + isSubclass bool *QsciLexer } @@ -52,27 +54,47 @@ func (this *QsciLexerJSON) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerJSON(h *C.QsciLexerJSON) *QsciLexerJSON { +// newQsciLexerJSON constructs the type using only CGO pointers. +func newQsciLexerJSON(h *C.QsciLexerJSON, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJSON { if h == nil { return nil } - return &QsciLexerJSON{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerJSON{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerJSON(h unsafe.Pointer) *QsciLexerJSON { - return newQsciLexerJSON((*C.QsciLexerJSON)(h)) +// UnsafeNewQsciLexerJSON constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerJSON(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJSON { + if h == nil { + return nil + } + + return &QsciLexerJSON{h: (*C.QsciLexerJSON)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerJSON constructs a new QsciLexerJSON object. func NewQsciLexerJSON() *QsciLexerJSON { - ret := C.QsciLexerJSON_new() - return newQsciLexerJSON(ret) + var outptr_QsciLexerJSON *C.QsciLexerJSON = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJSON_new(&outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerJSON2 constructs a new QsciLexerJSON object. func NewQsciLexerJSON2(parent *qt.QObject) *QsciLexerJSON { - ret := C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerJSON(ret) + var outptr_QsciLexerJSON *C.QsciLexerJSON = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerJSON) MetaObject() *qt.QMetaObject { @@ -222,9 +244,894 @@ func QsciLexerJSON_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerJSON) callVirtualBase_Language() string { + + _ret := C.QsciLexerJSON_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnLanguage(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Language +func miqt_exec_callback_QsciLexerJSON_Language(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerJSON_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnLexer(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Lexer +func miqt_exec_callback_QsciLexerJSON_Lexer(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerJSON_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnLexerId(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_LexerId +func miqt_exec_callback_QsciLexerJSON_LexerId(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerJSON_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_AutoCompletionFillups +func miqt_exec_callback_QsciLexerJSON_AutoCompletionFillups(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerJSON_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerJSON) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerJSON_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerJSON_AutoCompletionWordSeparators(self *C.QsciLexerJSON, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerJSON_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerJSON_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockEnd +func miqt_exec_callback_QsciLexerJSON_BlockEnd(self *C.QsciLexerJSON, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerJSON_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockLookback +func miqt_exec_callback_QsciLexerJSON_BlockLookback(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerJSON_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerJSON_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockStart +func miqt_exec_callback_QsciLexerJSON_BlockStart(self *C.QsciLexerJSON, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerJSON_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerJSON_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockStartKeyword +func miqt_exec_callback_QsciLexerJSON_BlockStartKeyword(self *C.QsciLexerJSON, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerJSON_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BraceStyle +func miqt_exec_callback_QsciLexerJSON_BraceStyle(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerJSON_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerJSON_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_CaseSensitive +func miqt_exec_callback_QsciLexerJSON_CaseSensitive(self *C.QsciLexerJSON, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerJSON_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerJSON_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Color +func miqt_exec_callback_QsciLexerJSON_Color(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerJSON_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerJSON) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerJSON_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_EolFill +func miqt_exec_callback_QsciLexerJSON_EolFill(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerJSON_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerJSON_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Font +func miqt_exec_callback_QsciLexerJSON_Font(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerJSON_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_IndentationGuideView +func miqt_exec_callback_QsciLexerJSON_IndentationGuideView(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerJSON_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerJSON_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Keywords +func miqt_exec_callback_QsciLexerJSON_Keywords(self *C.QsciLexerJSON, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerJSON_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultStyle +func miqt_exec_callback_QsciLexerJSON_DefaultStyle(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerJSON_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerJSON) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerJSON_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Description +func miqt_exec_callback_QsciLexerJSON_Description(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerJSON) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerJSON_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerJSON_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Paper +func miqt_exec_callback_QsciLexerJSON_Paper(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerJSON_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerJSON_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerJSON_DefaultColorWithStyle(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerJSON_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerJSON) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerJSON_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultEolFill +func miqt_exec_callback_QsciLexerJSON_DefaultEolFill(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerJSON_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerJSON_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerJSON_DefaultFontWithStyle(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerJSON_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerJSON_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerJSON_DefaultPaperWithStyle(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerJSON_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerJSON) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerJSON_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetEditor +func miqt_exec_callback_QsciLexerJSON_SetEditor(self *C.QsciLexerJSON, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerJSON) callVirtualBase_RefreshProperties() { + + C.QsciLexerJSON_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerJSON) OnRefreshProperties(slot func(super func())) { + C.QsciLexerJSON_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_RefreshProperties +func miqt_exec_callback_QsciLexerJSON_RefreshProperties(self *C.QsciLexerJSON, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerJSON) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerJSON_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_StyleBitsNeeded +func miqt_exec_callback_QsciLexerJSON_StyleBitsNeeded(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerJSON_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_WordCharacters +func miqt_exec_callback_QsciLexerJSON_WordCharacters(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerJSON_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerJSON) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerJSON_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerJSON_SetAutoIndentStyle(self *C.QsciLexerJSON, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerJSON_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerJSON_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetColor +func miqt_exec_callback_QsciLexerJSON_SetColor(self *C.QsciLexerJSON, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerJSON_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerJSON_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetEolFill +func miqt_exec_callback_QsciLexerJSON_SetEolFill(self *C.QsciLexerJSON, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerJSON_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerJSON_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetFont +func miqt_exec_callback_QsciLexerJSON_SetFont(self *C.QsciLexerJSON, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerJSON_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerJSON_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetPaper +func miqt_exec_callback_QsciLexerJSON_SetPaper(self *C.QsciLexerJSON, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerJSON_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerJSON) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerJSON_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_ReadProperties +func miqt_exec_callback_QsciLexerJSON_ReadProperties(self *C.QsciLexerJSON, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerJSON_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerJSON) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerJSON_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_WriteProperties +func miqt_exec_callback_QsciLexerJSON_WriteProperties(self *C.QsciLexerJSON, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerJSON) Delete() { - C.QsciLexerJSON_Delete(this.h) + C.QsciLexerJSON_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.h b/qt-restricted-extras/qscintilla/gen_qscilexerjson.h index 2fc9c10f..0031c355 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerJSON; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerJSON QsciLexerJSON; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerJSON* QsciLexerJSON_new(); -QsciLexerJSON* QsciLexerJSON_new2(QObject* parent); +void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self); void* QsciLexerJSON_Metacast(QsciLexerJSON* self, const char* param1); struct miqt_string QsciLexerJSON_Tr(const char* s); @@ -53,7 +59,75 @@ struct miqt_string QsciLexerJSON_Tr2(const char* s, const char* c); struct miqt_string QsciLexerJSON_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerJSON_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerJSON_TrUtf83(const char* s, const char* c, int n); -void QsciLexerJSON_Delete(QsciLexerJSON* self); +void QsciLexerJSON_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_Language(const void* self); +void QsciLexerJSON_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_Lexer(const void* self); +void QsciLexerJSON_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_LexerId(const void* self); +void QsciLexerJSON_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerJSON_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerJSON_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerJSON_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerJSON_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_BlockLookback(const void* self); +void QsciLexerJSON_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerJSON_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerJSON_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_BraceStyle(const void* self); +void QsciLexerJSON_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_CaseSensitive(const void* self); +void QsciLexerJSON_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_Color(const void* self, int style); +void QsciLexerJSON_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_EolFill(const void* self, int style); +void QsciLexerJSON_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerJSON_virtualbase_Font(const void* self, int style); +void QsciLexerJSON_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_IndentationGuideView(const void* self); +void QsciLexerJSON_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_Keywords(const void* self, int set); +void QsciLexerJSON_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_DefaultStyle(const void* self); +void QsciLexerJSON_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerJSON_virtualbase_Description(const void* self, int style); +void QsciLexerJSON_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_Paper(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerJSON_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerJSON_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerJSON_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_RefreshProperties(void* self); +void QsciLexerJSON_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerJSON_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_WordCharacters(const void* self); +void QsciLexerJSON_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerJSON_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerJSON_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerJSON_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerJSON_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerJSON_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerJSON_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerJSON_Delete(QsciLexerJSON* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp index 182489a3..e7f3efec 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,870 @@ #include "gen_qscilexerlua.h" #include "_cgo_export.h" -QsciLexerLua* QsciLexerLua_new() { - return new QsciLexerLua(); +class MiqtVirtualQsciLexerLua : public virtual QsciLexerLua { +public: + + MiqtVirtualQsciLexerLua(): QsciLexerLua() {}; + MiqtVirtualQsciLexerLua(QObject* parent): QsciLexerLua(parent) {}; + + virtual ~MiqtVirtualQsciLexerLua() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerLua::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerLua_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerLua::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerLua::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerLua::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerLua::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerLua::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerLua::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerLua::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerLua::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerLua_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerLua::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerLua::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerLua::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerLua::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerLua::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerLua::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerLua::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerLua::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerLua::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerLua::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerLua::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerLua::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerLua::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerLua::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerLua::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerLua::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerLua::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerLua::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerLua_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerLua::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerLua::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerLua::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerLua::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerLua::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerLua::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerLua::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerLua_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerLua::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerLua::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerLua::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerLua::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerLua::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerLua::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerLua::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerLua::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerLua::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerLua::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerLua::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerLua_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerLua::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerLua::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerLua_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerLua::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerLua::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerLua::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerLua::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerLua::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerLua::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerLua_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerLua::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerLua::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerLua::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerLua::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerLua::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerLua::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerLua::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerLua::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerLua::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerLua::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerLua::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerLua::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerLua::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(); + *outptr_QsciLexerLua = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerLua* QsciLexerLua_new2(QObject* parent) { - return new QsciLexerLua(parent); +void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(parent); + *outptr_QsciLexerLua = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self) { @@ -175,7 +1034,283 @@ const char* QsciLexerLua_BlockStart1(const QsciLexerLua* self, int* style) { return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerLua_Delete(QsciLexerLua* self) { - delete self; +void QsciLexerLua_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerLua_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerLua_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Language = slot; +} + +void QsciLexerLua_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerLua_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerLua_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__LexerId = slot; +} + +int QsciLexerLua_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerLua_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerLua_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerLua_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerLua_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerLua_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerLua_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerLua_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerLua_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerLua_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerLua_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerLua_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerLua_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerLua_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerLua_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerLua_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerLua_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerLua_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerLua_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Color(style); +} + +void QsciLexerLua_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerLua_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerLua_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerLua_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Font(style); +} + +void QsciLexerLua_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerLua_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerLua_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerLua_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerLua_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerLua_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerLua_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Description = slot; +} + +void QsciLexerLua_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerLua_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerLua_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerLua_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerLua_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerLua_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerLua_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerLua_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerLua_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerLua_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerLua_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerLua_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerLua_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerLua_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerLua_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerLua_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerLua_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerLua_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerLua_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerLua_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerLua_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetColor = slot; +} + +void QsciLexerLua_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerLua_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerLua_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerLua_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetFont = slot; +} + +void QsciLexerLua_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerLua_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerLua_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerLua_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerLua_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerLua_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerLua_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerLua_Delete(QsciLexerLua* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.go b/qt-restricted-extras/qscintilla/gen_qscilexerlua.go index 936eb392..478220f5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -40,7 +41,8 @@ const ( ) type QsciLexerLua struct { - h *C.QsciLexerLua + h *C.QsciLexerLua + isSubclass bool *QsciLexer } @@ -58,27 +60,47 @@ func (this *QsciLexerLua) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerLua(h *C.QsciLexerLua) *QsciLexerLua { +// newQsciLexerLua constructs the type using only CGO pointers. +func newQsciLexerLua(h *C.QsciLexerLua, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerLua { if h == nil { return nil } - return &QsciLexerLua{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerLua{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerLua(h unsafe.Pointer) *QsciLexerLua { - return newQsciLexerLua((*C.QsciLexerLua)(h)) +// UnsafeNewQsciLexerLua constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerLua(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerLua { + if h == nil { + return nil + } + + return &QsciLexerLua{h: (*C.QsciLexerLua)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerLua constructs a new QsciLexerLua object. func NewQsciLexerLua() *QsciLexerLua { - ret := C.QsciLexerLua_new() - return newQsciLexerLua(ret) + var outptr_QsciLexerLua *C.QsciLexerLua = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerLua_new(&outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerLua2 constructs a new QsciLexerLua object. func NewQsciLexerLua2(parent *qt.QObject) *QsciLexerLua { - ret := C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerLua(ret) + var outptr_QsciLexerLua *C.QsciLexerLua = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerLua) MetaObject() *qt.QMetaObject { @@ -239,9 +261,917 @@ func (this *QsciLexerLua) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerLua) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerLua_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerLua) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerLua_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetFoldCompact +func miqt_exec_callback_QsciLexerLua_SetFoldCompact(self *C.QsciLexerLua, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerLua) callVirtualBase_Language() string { + + _ret := C.QsciLexerLua_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnLanguage(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Language +func miqt_exec_callback_QsciLexerLua_Language(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerLua_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnLexer(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Lexer +func miqt_exec_callback_QsciLexerLua_Lexer(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerLua_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnLexerId(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_LexerId +func miqt_exec_callback_QsciLexerLua_LexerId(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerLua_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_AutoCompletionFillups +func miqt_exec_callback_QsciLexerLua_AutoCompletionFillups(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerLua_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerLua) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerLua_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerLua_AutoCompletionWordSeparators(self *C.QsciLexerLua, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerLua) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerLua_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerLua_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockEnd +func miqt_exec_callback_QsciLexerLua_BlockEnd(self *C.QsciLexerLua, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerLua_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockLookback +func miqt_exec_callback_QsciLexerLua_BlockLookback(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerLua_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerLua_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockStart +func miqt_exec_callback_QsciLexerLua_BlockStart(self *C.QsciLexerLua, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerLua_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerLua_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockStartKeyword +func miqt_exec_callback_QsciLexerLua_BlockStartKeyword(self *C.QsciLexerLua, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerLua_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BraceStyle +func miqt_exec_callback_QsciLexerLua_BraceStyle(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerLua_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerLua_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_CaseSensitive +func miqt_exec_callback_QsciLexerLua_CaseSensitive(self *C.QsciLexerLua, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerLua_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerLua_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Color +func miqt_exec_callback_QsciLexerLua_Color(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerLua_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerLua) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerLua_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_EolFill +func miqt_exec_callback_QsciLexerLua_EolFill(self *C.QsciLexerLua, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerLua_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerLua_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Font +func miqt_exec_callback_QsciLexerLua_Font(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerLua_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_IndentationGuideView +func miqt_exec_callback_QsciLexerLua_IndentationGuideView(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerLua_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerLua_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Keywords +func miqt_exec_callback_QsciLexerLua_Keywords(self *C.QsciLexerLua, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerLua_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultStyle +func miqt_exec_callback_QsciLexerLua_DefaultStyle(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerLua_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerLua) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerLua_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Description +func miqt_exec_callback_QsciLexerLua_Description(self *C.QsciLexerLua, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerLua) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerLua_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerLua_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Paper +func miqt_exec_callback_QsciLexerLua_Paper(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerLua_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerLua_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerLua_DefaultColorWithStyle(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerLua_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerLua) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerLua_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultEolFill +func miqt_exec_callback_QsciLexerLua_DefaultEolFill(self *C.QsciLexerLua, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerLua_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerLua_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerLua_DefaultFontWithStyle(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerLua_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerLua_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerLua_DefaultPaperWithStyle(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerLua_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerLua) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerLua_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetEditor +func miqt_exec_callback_QsciLexerLua_SetEditor(self *C.QsciLexerLua, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerLua) callVirtualBase_RefreshProperties() { + + C.QsciLexerLua_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerLua) OnRefreshProperties(slot func(super func())) { + C.QsciLexerLua_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_RefreshProperties +func miqt_exec_callback_QsciLexerLua_RefreshProperties(self *C.QsciLexerLua, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerLua) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerLua_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_StyleBitsNeeded +func miqt_exec_callback_QsciLexerLua_StyleBitsNeeded(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerLua_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_WordCharacters +func miqt_exec_callback_QsciLexerLua_WordCharacters(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerLua_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerLua) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerLua_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerLua_SetAutoIndentStyle(self *C.QsciLexerLua, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerLua) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerLua_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerLua_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetColor +func miqt_exec_callback_QsciLexerLua_SetColor(self *C.QsciLexerLua, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerLua_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerLua_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetEolFill +func miqt_exec_callback_QsciLexerLua_SetEolFill(self *C.QsciLexerLua, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerLua_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerLua_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetFont +func miqt_exec_callback_QsciLexerLua_SetFont(self *C.QsciLexerLua, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerLua_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerLua_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetPaper +func miqt_exec_callback_QsciLexerLua_SetPaper(self *C.QsciLexerLua, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerLua_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerLua) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerLua_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_ReadProperties +func miqt_exec_callback_QsciLexerLua_ReadProperties(self *C.QsciLexerLua, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerLua_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerLua) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerLua_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_WriteProperties +func miqt_exec_callback_QsciLexerLua_WriteProperties(self *C.QsciLexerLua, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerLua) Delete() { - C.QsciLexerLua_Delete(this.h) + C.QsciLexerLua_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.h b/qt-restricted-extras/qscintilla/gen_qscilexerlua.h index ab1e1932..d469e170 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerLua; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerLua QsciLexerLua; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerLua* QsciLexerLua_new(); -QsciLexerLua* QsciLexerLua_new2(QObject* parent); +void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self); void* QsciLexerLua_Metacast(QsciLexerLua* self, const char* param1); struct miqt_string QsciLexerLua_Tr(const char* s); @@ -53,7 +59,77 @@ struct miqt_string QsciLexerLua_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerLua_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerLua_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerLua_BlockStart1(const QsciLexerLua* self, int* style); -void QsciLexerLua_Delete(QsciLexerLua* self); +void QsciLexerLua_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerLua_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_Language(const void* self); +void QsciLexerLua_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_Lexer(const void* self); +void QsciLexerLua_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_LexerId(const void* self); +void QsciLexerLua_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerLua_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerLua_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerLua_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerLua_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_BlockLookback(const void* self); +void QsciLexerLua_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerLua_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerLua_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_BraceStyle(const void* self); +void QsciLexerLua_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_CaseSensitive(const void* self); +void QsciLexerLua_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_Color(const void* self, int style); +void QsciLexerLua_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_EolFill(const void* self, int style); +void QsciLexerLua_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerLua_virtualbase_Font(const void* self, int style); +void QsciLexerLua_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_IndentationGuideView(const void* self); +void QsciLexerLua_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_Keywords(const void* self, int set); +void QsciLexerLua_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_DefaultStyle(const void* self); +void QsciLexerLua_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerLua_virtualbase_Description(const void* self, int style); +void QsciLexerLua_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_Paper(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerLua_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerLua_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerLua_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_RefreshProperties(void* self); +void QsciLexerLua_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerLua_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_WordCharacters(const void* self); +void QsciLexerLua_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerLua_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerLua_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerLua_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerLua_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerLua_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerLua_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerLua_Delete(QsciLexerLua* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp index 49327daf..90164543 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexermakefile.h" #include "_cgo_export.h" -QsciLexerMakefile* QsciLexerMakefile_new() { - return new QsciLexerMakefile(); +class MiqtVirtualQsciLexerMakefile : public virtual QsciLexerMakefile { +public: + + MiqtVirtualQsciLexerMakefile(): QsciLexerMakefile() {}; + MiqtVirtualQsciLexerMakefile(QObject* parent): QsciLexerMakefile(parent) {}; + + virtual ~MiqtVirtualQsciLexerMakefile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerMakefile::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerMakefile::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerMakefile::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerMakefile::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerMakefile::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerMakefile::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerMakefile::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerMakefile_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerMakefile::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerMakefile::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerMakefile::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerMakefile::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerMakefile::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerMakefile::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerMakefile::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerMakefile::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerMakefile::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerMakefile::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerMakefile::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerMakefile::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerMakefile::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerMakefile::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerMakefile::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerMakefile::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerMakefile::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerMakefile::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerMakefile::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerMakefile::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerMakefile::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerMakefile::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerMakefile::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerMakefile::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerMakefile::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerMakefile_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerMakefile::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerMakefile::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerMakefile::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerMakefile::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerMakefile::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerMakefile::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerMakefile::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerMakefile::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerMakefile::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerMakefile::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerMakefile::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerMakefile_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerMakefile::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerMakefile::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerMakefile_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerMakefile::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerMakefile::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerMakefile::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerMakefile::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerMakefile::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerMakefile::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerMakefile_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerMakefile::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerMakefile::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerMakefile::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerMakefile::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerMakefile::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerMakefile::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerMakefile::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerMakefile::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerMakefile::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerMakefile::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMakefile::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerMakefile::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMakefile::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(); + *outptr_QsciLexerMakefile = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent) { - return new QsciLexerMakefile(parent); +void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(parent); + *outptr_QsciLexerMakefile = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self) { @@ -130,7 +966,275 @@ struct miqt_string QsciLexerMakefile_TrUtf83(const char* s, const char* c, int n return _ms; } -void QsciLexerMakefile_Delete(QsciLexerMakefile* self) { - delete self; +void QsciLexerMakefile_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Language = slot; +} + +void QsciLexerMakefile_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerMakefile_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerMakefile_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__LexerId = slot; +} + +int QsciLexerMakefile_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerMakefile_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerMakefile_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerMakefile_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerMakefile_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerMakefile_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerMakefile_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerMakefile_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerMakefile_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerMakefile_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerMakefile_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerMakefile_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerMakefile_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerMakefile_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerMakefile_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerMakefile_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerMakefile_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerMakefile_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerMakefile_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Color(style); +} + +void QsciLexerMakefile_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerMakefile_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerMakefile_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerMakefile_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Font(style); +} + +void QsciLexerMakefile_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerMakefile_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerMakefile_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerMakefile_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerMakefile_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerMakefile_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerMakefile_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Description = slot; +} + +void QsciLexerMakefile_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerMakefile_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerMakefile_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerMakefile_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerMakefile_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerMakefile_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerMakefile_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerMakefile_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerMakefile_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerMakefile_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerMakefile_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerMakefile_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerMakefile_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerMakefile_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerMakefile_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerMakefile_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerMakefile_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerMakefile_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerMakefile_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerMakefile_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerMakefile_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetColor = slot; +} + +void QsciLexerMakefile_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerMakefile_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerMakefile_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerMakefile_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetFont = slot; +} + +void QsciLexerMakefile_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerMakefile_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerMakefile_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerMakefile_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerMakefile_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerMakefile_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerMakefile_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerMakefile_Delete(QsciLexerMakefile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go index 012a7b33..db3c5fff 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -27,7 +28,8 @@ const ( ) type QsciLexerMakefile struct { - h *C.QsciLexerMakefile + h *C.QsciLexerMakefile + isSubclass bool *QsciLexer } @@ -45,27 +47,47 @@ func (this *QsciLexerMakefile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerMakefile(h *C.QsciLexerMakefile) *QsciLexerMakefile { +// newQsciLexerMakefile constructs the type using only CGO pointers. +func newQsciLexerMakefile(h *C.QsciLexerMakefile, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMakefile { if h == nil { return nil } - return &QsciLexerMakefile{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerMakefile{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerMakefile(h unsafe.Pointer) *QsciLexerMakefile { - return newQsciLexerMakefile((*C.QsciLexerMakefile)(h)) +// UnsafeNewQsciLexerMakefile constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerMakefile(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMakefile { + if h == nil { + return nil + } + + return &QsciLexerMakefile{h: (*C.QsciLexerMakefile)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerMakefile constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile() *QsciLexerMakefile { - ret := C.QsciLexerMakefile_new() - return newQsciLexerMakefile(ret) + var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMakefile_new(&outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerMakefile2 constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile2(parent *qt.QObject) *QsciLexerMakefile { - ret := C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerMakefile(ret) + var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerMakefile) MetaObject() *qt.QMetaObject { @@ -187,9 +209,894 @@ func QsciLexerMakefile_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerMakefile) callVirtualBase_Language() string { + + _ret := C.QsciLexerMakefile_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnLanguage(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Language +func miqt_exec_callback_QsciLexerMakefile_Language(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerMakefile_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnLexer(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Lexer +func miqt_exec_callback_QsciLexerMakefile_Lexer(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerMakefile_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnLexerId(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_LexerId +func miqt_exec_callback_QsciLexerMakefile_LexerId(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerMakefile_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_AutoCompletionFillups +func miqt_exec_callback_QsciLexerMakefile_AutoCompletionFillups(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerMakefile_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerMakefile) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerMakefile_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerMakefile_AutoCompletionWordSeparators(self *C.QsciLexerMakefile, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerMakefile_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMakefile_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockEnd +func miqt_exec_callback_QsciLexerMakefile_BlockEnd(self *C.QsciLexerMakefile, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerMakefile_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockLookback +func miqt_exec_callback_QsciLexerMakefile_BlockLookback(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerMakefile_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMakefile_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockStart +func miqt_exec_callback_QsciLexerMakefile_BlockStart(self *C.QsciLexerMakefile, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerMakefile_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMakefile_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockStartKeyword +func miqt_exec_callback_QsciLexerMakefile_BlockStartKeyword(self *C.QsciLexerMakefile, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerMakefile_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BraceStyle +func miqt_exec_callback_QsciLexerMakefile_BraceStyle(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerMakefile_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerMakefile_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_CaseSensitive +func miqt_exec_callback_QsciLexerMakefile_CaseSensitive(self *C.QsciLexerMakefile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMakefile_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Color +func miqt_exec_callback_QsciLexerMakefile_Color(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerMakefile_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMakefile) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMakefile_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_EolFill +func miqt_exec_callback_QsciLexerMakefile_EolFill(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerMakefile_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerMakefile_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Font +func miqt_exec_callback_QsciLexerMakefile_Font(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerMakefile_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_IndentationGuideView +func miqt_exec_callback_QsciLexerMakefile_IndentationGuideView(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerMakefile_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerMakefile_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Keywords +func miqt_exec_callback_QsciLexerMakefile_Keywords(self *C.QsciLexerMakefile, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerMakefile_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultStyle(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerMakefile_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerMakefile) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerMakefile_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Description +func miqt_exec_callback_QsciLexerMakefile_Description(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerMakefile) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMakefile_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Paper +func miqt_exec_callback_QsciLexerMakefile_Paper(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMakefile_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultColorWithStyle(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerMakefile_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMakefile) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMakefile_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultEolFill +func miqt_exec_callback_QsciLexerMakefile_DefaultEolFill(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerMakefile_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerMakefile_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultFontWithStyle(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMakefile_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultPaperWithStyle(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerMakefile_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerMakefile) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerMakefile_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetEditor +func miqt_exec_callback_QsciLexerMakefile_SetEditor(self *C.QsciLexerMakefile, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerMakefile) callVirtualBase_RefreshProperties() { + + C.QsciLexerMakefile_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerMakefile) OnRefreshProperties(slot func(super func())) { + C.QsciLexerMakefile_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_RefreshProperties +func miqt_exec_callback_QsciLexerMakefile_RefreshProperties(self *C.QsciLexerMakefile, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerMakefile) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerMakefile_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_StyleBitsNeeded +func miqt_exec_callback_QsciLexerMakefile_StyleBitsNeeded(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerMakefile_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_WordCharacters +func miqt_exec_callback_QsciLexerMakefile_WordCharacters(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerMakefile_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerMakefile) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerMakefile_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerMakefile_SetAutoIndentStyle(self *C.QsciLexerMakefile, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerMakefile_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerMakefile_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetColor +func miqt_exec_callback_QsciLexerMakefile_SetColor(self *C.QsciLexerMakefile, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerMakefile_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerMakefile_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetEolFill +func miqt_exec_callback_QsciLexerMakefile_SetEolFill(self *C.QsciLexerMakefile, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerMakefile_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerMakefile_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetFont +func miqt_exec_callback_QsciLexerMakefile_SetFont(self *C.QsciLexerMakefile, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerMakefile_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerMakefile_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetPaper +func miqt_exec_callback_QsciLexerMakefile_SetPaper(self *C.QsciLexerMakefile, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMakefile_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMakefile) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerMakefile_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_ReadProperties +func miqt_exec_callback_QsciLexerMakefile_ReadProperties(self *C.QsciLexerMakefile, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMakefile_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMakefile) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerMakefile_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_WriteProperties +func miqt_exec_callback_QsciLexerMakefile_WriteProperties(self *C.QsciLexerMakefile, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerMakefile) Delete() { - C.QsciLexerMakefile_Delete(this.h) + C.QsciLexerMakefile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h index bc2ac880..4baac6fb 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerMakefile; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerMakefile QsciLexerMakefile; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerMakefile* QsciLexerMakefile_new(); -QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent); +void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self); void* QsciLexerMakefile_Metacast(QsciLexerMakefile* self, const char* param1); struct miqt_string QsciLexerMakefile_Tr(const char* s); @@ -46,7 +52,75 @@ struct miqt_string QsciLexerMakefile_Tr2(const char* s, const char* c); struct miqt_string QsciLexerMakefile_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerMakefile_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerMakefile_TrUtf83(const char* s, const char* c, int n); -void QsciLexerMakefile_Delete(QsciLexerMakefile* self); +void QsciLexerMakefile_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_Language(const void* self); +void QsciLexerMakefile_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_Lexer(const void* self); +void QsciLexerMakefile_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_LexerId(const void* self); +void QsciLexerMakefile_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerMakefile_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerMakefile_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerMakefile_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerMakefile_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_BlockLookback(const void* self); +void QsciLexerMakefile_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerMakefile_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerMakefile_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_BraceStyle(const void* self); +void QsciLexerMakefile_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_CaseSensitive(const void* self); +void QsciLexerMakefile_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_Color(const void* self, int style); +void QsciLexerMakefile_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_EolFill(const void* self, int style); +void QsciLexerMakefile_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerMakefile_virtualbase_Font(const void* self, int style); +void QsciLexerMakefile_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_IndentationGuideView(const void* self); +void QsciLexerMakefile_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_Keywords(const void* self, int set); +void QsciLexerMakefile_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_DefaultStyle(const void* self); +void QsciLexerMakefile_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerMakefile_virtualbase_Description(const void* self, int style); +void QsciLexerMakefile_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_Paper(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerMakefile_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerMakefile_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerMakefile_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_RefreshProperties(void* self); +void QsciLexerMakefile_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerMakefile_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_WordCharacters(const void* self); +void QsciLexerMakefile_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerMakefile_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerMakefile_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerMakefile_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerMakefile_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerMakefile_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMakefile_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMakefile_Delete(QsciLexerMakefile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp index a7b5da38..507126d9 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexermarkdown.h" #include "_cgo_export.h" -QsciLexerMarkdown* QsciLexerMarkdown_new() { - return new QsciLexerMarkdown(); +class MiqtVirtualQsciLexerMarkdown : public virtual QsciLexerMarkdown { +public: + + MiqtVirtualQsciLexerMarkdown(): QsciLexerMarkdown() {}; + MiqtVirtualQsciLexerMarkdown(QObject* parent): QsciLexerMarkdown(parent) {}; + + virtual ~MiqtVirtualQsciLexerMarkdown() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerMarkdown::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerMarkdown::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerMarkdown::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerMarkdown::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerMarkdown::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerMarkdown::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerMarkdown::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerMarkdown_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerMarkdown::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerMarkdown::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerMarkdown::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerMarkdown::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerMarkdown::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerMarkdown::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerMarkdown::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerMarkdown::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerMarkdown::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerMarkdown::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerMarkdown::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerMarkdown::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerMarkdown::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerMarkdown::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerMarkdown::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerMarkdown::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerMarkdown::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerMarkdown::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerMarkdown::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerMarkdown::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerMarkdown::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerMarkdown::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerMarkdown::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerMarkdown::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerMarkdown::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerMarkdown::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerMarkdown::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerMarkdown::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerMarkdown::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerMarkdown::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerMarkdown::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerMarkdown::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerMarkdown::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerMarkdown::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerMarkdown::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerMarkdown::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerMarkdown_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerMarkdown::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerMarkdown::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerMarkdown_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerMarkdown::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerMarkdown::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerMarkdown::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerMarkdown::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerMarkdown::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerMarkdown::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerMarkdown_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerMarkdown::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerMarkdown::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerMarkdown::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerMarkdown::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerMarkdown::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerMarkdown::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerMarkdown::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerMarkdown::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerMarkdown::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerMarkdown::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMarkdown::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerMarkdown::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMarkdown::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(); + *outptr_QsciLexerMarkdown = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent) { - return new QsciLexerMarkdown(parent); +void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(parent); + *outptr_QsciLexerMarkdown = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self) { @@ -122,7 +958,275 @@ struct miqt_string QsciLexerMarkdown_TrUtf83(const char* s, const char* c, int n return _ms; } -void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self) { - delete self; +void QsciLexerMarkdown_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Language = slot; +} + +void QsciLexerMarkdown_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerMarkdown_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerMarkdown_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__LexerId = slot; +} + +int QsciLexerMarkdown_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerMarkdown_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerMarkdown_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerMarkdown_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerMarkdown_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerMarkdown_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerMarkdown_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerMarkdown_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerMarkdown_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerMarkdown_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerMarkdown_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerMarkdown_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerMarkdown_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerMarkdown_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerMarkdown_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerMarkdown_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerMarkdown_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerMarkdown_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Color(style); +} + +void QsciLexerMarkdown_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerMarkdown_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerMarkdown_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerMarkdown_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Font(style); +} + +void QsciLexerMarkdown_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerMarkdown_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerMarkdown_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerMarkdown_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerMarkdown_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerMarkdown_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerMarkdown_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Description = slot; +} + +void QsciLexerMarkdown_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerMarkdown_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerMarkdown_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerMarkdown_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerMarkdown_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerMarkdown_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerMarkdown_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerMarkdown_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerMarkdown_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerMarkdown_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerMarkdown_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerMarkdown_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerMarkdown_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerMarkdown_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetColor = slot; +} + +void QsciLexerMarkdown_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerMarkdown_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerMarkdown_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerMarkdown_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetFont = slot; +} + +void QsciLexerMarkdown_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerMarkdown_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerMarkdown_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerMarkdown_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerMarkdown_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerMarkdown_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerMarkdown_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go index b5c496cd..bfab1b1c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -42,7 +43,8 @@ const ( ) type QsciLexerMarkdown struct { - h *C.QsciLexerMarkdown + h *C.QsciLexerMarkdown + isSubclass bool *QsciLexer } @@ -60,27 +62,47 @@ func (this *QsciLexerMarkdown) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerMarkdown(h *C.QsciLexerMarkdown) *QsciLexerMarkdown { +// newQsciLexerMarkdown constructs the type using only CGO pointers. +func newQsciLexerMarkdown(h *C.QsciLexerMarkdown, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMarkdown { if h == nil { return nil } - return &QsciLexerMarkdown{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerMarkdown{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer) *QsciLexerMarkdown { - return newQsciLexerMarkdown((*C.QsciLexerMarkdown)(h)) +// UnsafeNewQsciLexerMarkdown constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMarkdown { + if h == nil { + return nil + } + + return &QsciLexerMarkdown{h: (*C.QsciLexerMarkdown)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerMarkdown constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown() *QsciLexerMarkdown { - ret := C.QsciLexerMarkdown_new() - return newQsciLexerMarkdown(ret) + var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMarkdown_new(&outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerMarkdown2 constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown2(parent *qt.QObject) *QsciLexerMarkdown { - ret := C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerMarkdown(ret) + var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerMarkdown) MetaObject() *qt.QMetaObject { @@ -193,9 +215,894 @@ func QsciLexerMarkdown_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerMarkdown) callVirtualBase_Language() string { + + _ret := C.QsciLexerMarkdown_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnLanguage(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Language +func miqt_exec_callback_QsciLexerMarkdown_Language(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerMarkdown_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnLexer(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Lexer +func miqt_exec_callback_QsciLexerMarkdown_Lexer(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnLexerId(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_LexerId +func miqt_exec_callback_QsciLexerMarkdown_LexerId(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerMarkdown_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_AutoCompletionFillups +func miqt_exec_callback_QsciLexerMarkdown_AutoCompletionFillups(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerMarkdown_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerMarkdown) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerMarkdown_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerMarkdown_AutoCompletionWordSeparators(self *C.QsciLexerMarkdown, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMarkdown_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockEnd +func miqt_exec_callback_QsciLexerMarkdown_BlockEnd(self *C.QsciLexerMarkdown, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockLookback +func miqt_exec_callback_QsciLexerMarkdown_BlockLookback(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMarkdown_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockStart +func miqt_exec_callback_QsciLexerMarkdown_BlockStart(self *C.QsciLexerMarkdown, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMarkdown_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockStartKeyword +func miqt_exec_callback_QsciLexerMarkdown_BlockStartKeyword(self *C.QsciLexerMarkdown, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BraceStyle +func miqt_exec_callback_QsciLexerMarkdown_BraceStyle(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerMarkdown_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerMarkdown_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_CaseSensitive +func miqt_exec_callback_QsciLexerMarkdown_CaseSensitive(self *C.QsciLexerMarkdown, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMarkdown_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Color +func miqt_exec_callback_QsciLexerMarkdown_Color(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerMarkdown_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMarkdown) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMarkdown_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_EolFill +func miqt_exec_callback_QsciLexerMarkdown_EolFill(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerMarkdown_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerMarkdown_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Font +func miqt_exec_callback_QsciLexerMarkdown_Font(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_IndentationGuideView +func miqt_exec_callback_QsciLexerMarkdown_IndentationGuideView(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerMarkdown_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Keywords +func miqt_exec_callback_QsciLexerMarkdown_Keywords(self *C.QsciLexerMarkdown, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultStyle(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerMarkdown_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerMarkdown) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerMarkdown_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Description +func miqt_exec_callback_QsciLexerMarkdown_Description(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMarkdown_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Paper +func miqt_exec_callback_QsciLexerMarkdown_Paper(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMarkdown_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultColorWithStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerMarkdown_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMarkdown) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMarkdown_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultEolFill +func miqt_exec_callback_QsciLexerMarkdown_DefaultEolFill(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerMarkdown_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerMarkdown_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultFontWithStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMarkdown_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultPaperWithStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerMarkdown_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerMarkdown) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerMarkdown_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetEditor +func miqt_exec_callback_QsciLexerMarkdown_SetEditor(self *C.QsciLexerMarkdown, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_RefreshProperties() { + + C.QsciLexerMarkdown_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerMarkdown) OnRefreshProperties(slot func(super func())) { + C.QsciLexerMarkdown_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_RefreshProperties +func miqt_exec_callback_QsciLexerMarkdown_RefreshProperties(self *C.QsciLexerMarkdown, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_StyleBitsNeeded +func miqt_exec_callback_QsciLexerMarkdown_StyleBitsNeeded(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerMarkdown_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_WordCharacters +func miqt_exec_callback_QsciLexerMarkdown_WordCharacters(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerMarkdown_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerMarkdown) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerMarkdown_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerMarkdown_SetAutoIndentStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerMarkdown_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerMarkdown_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetColor +func miqt_exec_callback_QsciLexerMarkdown_SetColor(self *C.QsciLexerMarkdown, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerMarkdown_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerMarkdown_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetEolFill +func miqt_exec_callback_QsciLexerMarkdown_SetEolFill(self *C.QsciLexerMarkdown, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerMarkdown_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerMarkdown_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetFont +func miqt_exec_callback_QsciLexerMarkdown_SetFont(self *C.QsciLexerMarkdown, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerMarkdown_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerMarkdown_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetPaper +func miqt_exec_callback_QsciLexerMarkdown_SetPaper(self *C.QsciLexerMarkdown, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMarkdown_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMarkdown) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerMarkdown_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_ReadProperties +func miqt_exec_callback_QsciLexerMarkdown_ReadProperties(self *C.QsciLexerMarkdown, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMarkdown_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMarkdown) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerMarkdown_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_WriteProperties +func miqt_exec_callback_QsciLexerMarkdown_WriteProperties(self *C.QsciLexerMarkdown, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerMarkdown) Delete() { - C.QsciLexerMarkdown_Delete(this.h) + C.QsciLexerMarkdown_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h index e5fc2495..164911e0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerMarkdown; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerMarkdown QsciLexerMarkdown; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerMarkdown* QsciLexerMarkdown_new(); -QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent); +void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self); void* QsciLexerMarkdown_Metacast(QsciLexerMarkdown* self, const char* param1); struct miqt_string QsciLexerMarkdown_Tr(const char* s); @@ -44,7 +50,75 @@ struct miqt_string QsciLexerMarkdown_Tr2(const char* s, const char* c); struct miqt_string QsciLexerMarkdown_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerMarkdown_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerMarkdown_TrUtf83(const char* s, const char* c, int n); -void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self); +void QsciLexerMarkdown_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_Language(const void* self); +void QsciLexerMarkdown_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_Lexer(const void* self); +void QsciLexerMarkdown_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_LexerId(const void* self); +void QsciLexerMarkdown_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerMarkdown_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerMarkdown_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerMarkdown_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerMarkdown_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_BlockLookback(const void* self); +void QsciLexerMarkdown_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerMarkdown_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerMarkdown_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_BraceStyle(const void* self); +void QsciLexerMarkdown_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_CaseSensitive(const void* self); +void QsciLexerMarkdown_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_Color(const void* self, int style); +void QsciLexerMarkdown_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_EolFill(const void* self, int style); +void QsciLexerMarkdown_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerMarkdown_virtualbase_Font(const void* self, int style); +void QsciLexerMarkdown_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_IndentationGuideView(const void* self); +void QsciLexerMarkdown_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_Keywords(const void* self, int set); +void QsciLexerMarkdown_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_DefaultStyle(const void* self); +void QsciLexerMarkdown_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerMarkdown_virtualbase_Description(const void* self, int style); +void QsciLexerMarkdown_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_Paper(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerMarkdown_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerMarkdown_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerMarkdown_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_RefreshProperties(void* self); +void QsciLexerMarkdown_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerMarkdown_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_WordCharacters(const void* self); +void QsciLexerMarkdown_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerMarkdown_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerMarkdown_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerMarkdown_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerMarkdown_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerMarkdown_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMarkdown_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp index c34ee419..4dcc5d76 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexermatlab.h" #include "_cgo_export.h" -QsciLexerMatlab* QsciLexerMatlab_new() { - return new QsciLexerMatlab(); +class MiqtVirtualQsciLexerMatlab : public virtual QsciLexerMatlab { +public: + + MiqtVirtualQsciLexerMatlab(): QsciLexerMatlab() {}; + MiqtVirtualQsciLexerMatlab(QObject* parent): QsciLexerMatlab(parent) {}; + + virtual ~MiqtVirtualQsciLexerMatlab() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerMatlab::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerMatlab::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerMatlab::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerMatlab::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerMatlab::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerMatlab::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerMatlab::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerMatlab_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerMatlab::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerMatlab::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerMatlab::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerMatlab::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerMatlab::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerMatlab::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerMatlab::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerMatlab::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerMatlab::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerMatlab::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerMatlab::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerMatlab::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerMatlab::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerMatlab::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerMatlab::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerMatlab::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerMatlab::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerMatlab::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerMatlab::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerMatlab::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerMatlab::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerMatlab::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerMatlab::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerMatlab::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerMatlab::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerMatlab_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerMatlab::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerMatlab::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerMatlab::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerMatlab::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerMatlab::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerMatlab::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerMatlab::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerMatlab::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerMatlab::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerMatlab::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerMatlab::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerMatlab_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerMatlab::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerMatlab::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerMatlab_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerMatlab::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerMatlab::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerMatlab::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerMatlab::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerMatlab::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerMatlab::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerMatlab_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerMatlab::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerMatlab::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerMatlab::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerMatlab::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerMatlab::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerMatlab::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerMatlab::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerMatlab::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerMatlab::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerMatlab::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMatlab::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerMatlab::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMatlab::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(); + *outptr_QsciLexerMatlab = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent) { - return new QsciLexerMatlab(parent); +void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(parent); + *outptr_QsciLexerMatlab = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self) { @@ -122,7 +958,275 @@ struct miqt_string QsciLexerMatlab_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciLexerMatlab_Delete(QsciLexerMatlab* self) { - delete self; +void QsciLexerMatlab_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Language = slot; +} + +void QsciLexerMatlab_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerMatlab_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerMatlab_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__LexerId = slot; +} + +int QsciLexerMatlab_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerMatlab_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerMatlab_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerMatlab_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerMatlab_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerMatlab_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerMatlab_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerMatlab_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerMatlab_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerMatlab_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerMatlab_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerMatlab_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerMatlab_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerMatlab_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerMatlab_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerMatlab_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerMatlab_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerMatlab_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerMatlab_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Color(style); +} + +void QsciLexerMatlab_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerMatlab_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerMatlab_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerMatlab_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Font(style); +} + +void QsciLexerMatlab_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerMatlab_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerMatlab_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerMatlab_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerMatlab_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerMatlab_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerMatlab_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Description = slot; +} + +void QsciLexerMatlab_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerMatlab_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerMatlab_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerMatlab_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerMatlab_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerMatlab_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerMatlab_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerMatlab_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerMatlab_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerMatlab_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerMatlab_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerMatlab_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerMatlab_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerMatlab_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerMatlab_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerMatlab_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerMatlab_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerMatlab_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerMatlab_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerMatlab_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerMatlab_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetColor = slot; +} + +void QsciLexerMatlab_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerMatlab_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerMatlab_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerMatlab_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetFont = slot; +} + +void QsciLexerMatlab_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerMatlab_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerMatlab_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerMatlab_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerMatlab_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerMatlab_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerMatlab_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerMatlab_Delete(QsciLexerMatlab* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go index f9e8edb1..8136a336 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QsciLexerMatlab struct { - h *C.QsciLexerMatlab + h *C.QsciLexerMatlab + isSubclass bool *QsciLexer } @@ -47,27 +49,47 @@ func (this *QsciLexerMatlab) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerMatlab(h *C.QsciLexerMatlab) *QsciLexerMatlab { +// newQsciLexerMatlab constructs the type using only CGO pointers. +func newQsciLexerMatlab(h *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMatlab { if h == nil { return nil } - return &QsciLexerMatlab{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerMatlab{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerMatlab(h unsafe.Pointer) *QsciLexerMatlab { - return newQsciLexerMatlab((*C.QsciLexerMatlab)(h)) +// UnsafeNewQsciLexerMatlab constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerMatlab(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMatlab { + if h == nil { + return nil + } + + return &QsciLexerMatlab{h: (*C.QsciLexerMatlab)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerMatlab constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab() *QsciLexerMatlab { - ret := C.QsciLexerMatlab_new() - return newQsciLexerMatlab(ret) + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMatlab_new(&outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerMatlab2 constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab2(parent *qt.QObject) *QsciLexerMatlab { - ret := C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerMatlab(ret) + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerMatlab) MetaObject() *qt.QMetaObject { @@ -178,9 +200,894 @@ func QsciLexerMatlab_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerMatlab) callVirtualBase_Language() string { + + _ret := C.QsciLexerMatlab_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnLanguage(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Language +func miqt_exec_callback_QsciLexerMatlab_Language(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerMatlab_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnLexer(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Lexer +func miqt_exec_callback_QsciLexerMatlab_Lexer(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerMatlab_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnLexerId(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_LexerId +func miqt_exec_callback_QsciLexerMatlab_LexerId(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerMatlab_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_AutoCompletionFillups +func miqt_exec_callback_QsciLexerMatlab_AutoCompletionFillups(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerMatlab_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerMatlab) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerMatlab_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerMatlab_AutoCompletionWordSeparators(self *C.QsciLexerMatlab, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerMatlab_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMatlab_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockEnd +func miqt_exec_callback_QsciLexerMatlab_BlockEnd(self *C.QsciLexerMatlab, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerMatlab_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockLookback +func miqt_exec_callback_QsciLexerMatlab_BlockLookback(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerMatlab_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMatlab_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockStart +func miqt_exec_callback_QsciLexerMatlab_BlockStart(self *C.QsciLexerMatlab, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerMatlab_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMatlab_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockStartKeyword +func miqt_exec_callback_QsciLexerMatlab_BlockStartKeyword(self *C.QsciLexerMatlab, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerMatlab_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BraceStyle +func miqt_exec_callback_QsciLexerMatlab_BraceStyle(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerMatlab_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerMatlab_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_CaseSensitive +func miqt_exec_callback_QsciLexerMatlab_CaseSensitive(self *C.QsciLexerMatlab, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMatlab_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Color +func miqt_exec_callback_QsciLexerMatlab_Color(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerMatlab_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMatlab) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMatlab_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_EolFill +func miqt_exec_callback_QsciLexerMatlab_EolFill(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerMatlab_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerMatlab_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Font +func miqt_exec_callback_QsciLexerMatlab_Font(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerMatlab_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_IndentationGuideView +func miqt_exec_callback_QsciLexerMatlab_IndentationGuideView(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerMatlab_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerMatlab_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Keywords +func miqt_exec_callback_QsciLexerMatlab_Keywords(self *C.QsciLexerMatlab, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerMatlab_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultStyle(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerMatlab_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerMatlab) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerMatlab_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Description +func miqt_exec_callback_QsciLexerMatlab_Description(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerMatlab) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMatlab_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Paper +func miqt_exec_callback_QsciLexerMatlab_Paper(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMatlab_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultColorWithStyle(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerMatlab_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMatlab) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMatlab_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultEolFill +func miqt_exec_callback_QsciLexerMatlab_DefaultEolFill(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerMatlab_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerMatlab_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultFontWithStyle(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerMatlab_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultPaperWithStyle(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerMatlab_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerMatlab) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerMatlab_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetEditor +func miqt_exec_callback_QsciLexerMatlab_SetEditor(self *C.QsciLexerMatlab, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerMatlab) callVirtualBase_RefreshProperties() { + + C.QsciLexerMatlab_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerMatlab) OnRefreshProperties(slot func(super func())) { + C.QsciLexerMatlab_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_RefreshProperties +func miqt_exec_callback_QsciLexerMatlab_RefreshProperties(self *C.QsciLexerMatlab, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerMatlab) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerMatlab_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_StyleBitsNeeded +func miqt_exec_callback_QsciLexerMatlab_StyleBitsNeeded(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerMatlab_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_WordCharacters +func miqt_exec_callback_QsciLexerMatlab_WordCharacters(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerMatlab_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerMatlab) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerMatlab_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerMatlab_SetAutoIndentStyle(self *C.QsciLexerMatlab, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerMatlab_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerMatlab_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetColor +func miqt_exec_callback_QsciLexerMatlab_SetColor(self *C.QsciLexerMatlab, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerMatlab_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerMatlab_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetEolFill +func miqt_exec_callback_QsciLexerMatlab_SetEolFill(self *C.QsciLexerMatlab, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerMatlab_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerMatlab_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetFont +func miqt_exec_callback_QsciLexerMatlab_SetFont(self *C.QsciLexerMatlab, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerMatlab_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerMatlab_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetPaper +func miqt_exec_callback_QsciLexerMatlab_SetPaper(self *C.QsciLexerMatlab, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMatlab_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMatlab) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerMatlab_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_ReadProperties +func miqt_exec_callback_QsciLexerMatlab_ReadProperties(self *C.QsciLexerMatlab, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMatlab_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMatlab) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerMatlab_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_WriteProperties +func miqt_exec_callback_QsciLexerMatlab_WriteProperties(self *C.QsciLexerMatlab, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerMatlab) Delete() { - C.QsciLexerMatlab_Delete(this.h) + C.QsciLexerMatlab_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h index 7ad16e49..f8183438 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerMatlab; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerMatlab QsciLexerMatlab; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerMatlab* QsciLexerMatlab_new(); -QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent); +void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self); void* QsciLexerMatlab_Metacast(QsciLexerMatlab* self, const char* param1); struct miqt_string QsciLexerMatlab_Tr(const char* s); @@ -44,7 +50,75 @@ struct miqt_string QsciLexerMatlab_Tr2(const char* s, const char* c); struct miqt_string QsciLexerMatlab_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerMatlab_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerMatlab_TrUtf83(const char* s, const char* c, int n); -void QsciLexerMatlab_Delete(QsciLexerMatlab* self); +void QsciLexerMatlab_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_Language(const void* self); +void QsciLexerMatlab_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_Lexer(const void* self); +void QsciLexerMatlab_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_LexerId(const void* self); +void QsciLexerMatlab_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerMatlab_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerMatlab_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerMatlab_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerMatlab_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_BlockLookback(const void* self); +void QsciLexerMatlab_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerMatlab_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerMatlab_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_BraceStyle(const void* self); +void QsciLexerMatlab_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_CaseSensitive(const void* self); +void QsciLexerMatlab_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_Color(const void* self, int style); +void QsciLexerMatlab_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_EolFill(const void* self, int style); +void QsciLexerMatlab_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerMatlab_virtualbase_Font(const void* self, int style); +void QsciLexerMatlab_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_IndentationGuideView(const void* self); +void QsciLexerMatlab_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_Keywords(const void* self, int set); +void QsciLexerMatlab_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_DefaultStyle(const void* self); +void QsciLexerMatlab_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerMatlab_virtualbase_Description(const void* self, int style); +void QsciLexerMatlab_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_Paper(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerMatlab_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerMatlab_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerMatlab_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_RefreshProperties(void* self); +void QsciLexerMatlab_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerMatlab_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_WordCharacters(const void* self); +void QsciLexerMatlab_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerMatlab_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerMatlab_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerMatlab_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerMatlab_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerMatlab_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMatlab_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMatlab_Delete(QsciLexerMatlab* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp index 15e60b8a..9b659a77 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp @@ -7,12 +7,20 @@ #include "gen_qscilexeroctave.h" #include "_cgo_export.h" -QsciLexerOctave* QsciLexerOctave_new() { - return new QsciLexerOctave(); +void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + QsciLexerOctave* ret = new QsciLexerOctave(); + *outptr_QsciLexerOctave = ret; + *outptr_QsciLexerMatlab = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerOctave* QsciLexerOctave_new2(QObject* parent) { - return new QsciLexerOctave(parent); +void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + QsciLexerOctave* ret = new QsciLexerOctave(parent); + *outptr_QsciLexerOctave = ret; + *outptr_QsciLexerMatlab = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self) { @@ -101,7 +109,11 @@ struct miqt_string QsciLexerOctave_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciLexerOctave_Delete(QsciLexerOctave* self) { - delete self; +void QsciLexerOctave_Delete(QsciLexerOctave* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go index 4eaa7b38..0df3a0f7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go @@ -15,7 +15,8 @@ import ( ) type QsciLexerOctave struct { - h *C.QsciLexerOctave + h *C.QsciLexerOctave + isSubclass bool *QsciLexerMatlab } @@ -33,27 +34,49 @@ func (this *QsciLexerOctave) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerOctave(h *C.QsciLexerOctave) *QsciLexerOctave { +// newQsciLexerOctave constructs the type using only CGO pointers. +func newQsciLexerOctave(h *C.QsciLexerOctave, h_QsciLexerMatlab *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerOctave { if h == nil { return nil } - return &QsciLexerOctave{h: h, QsciLexerMatlab: UnsafeNewQsciLexerMatlab(unsafe.Pointer(h))} + return &QsciLexerOctave{h: h, + QsciLexerMatlab: newQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerOctave(h unsafe.Pointer) *QsciLexerOctave { - return newQsciLexerOctave((*C.QsciLexerOctave)(h)) +// UnsafeNewQsciLexerOctave constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerOctave(h unsafe.Pointer, h_QsciLexerMatlab unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerOctave { + if h == nil { + return nil + } + + return &QsciLexerOctave{h: (*C.QsciLexerOctave)(h), + QsciLexerMatlab: UnsafeNewQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} } // NewQsciLexerOctave constructs a new QsciLexerOctave object. func NewQsciLexerOctave() *QsciLexerOctave { - ret := C.QsciLexerOctave_new() - return newQsciLexerOctave(ret) + var outptr_QsciLexerOctave *C.QsciLexerOctave = nil + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerOctave_new(&outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerOctave2 constructs a new QsciLexerOctave object. func NewQsciLexerOctave2(parent *qt.QObject) *QsciLexerOctave { - ret := C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerOctave(ret) + var outptr_QsciLexerOctave *C.QsciLexerOctave = nil + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerOctave) MetaObject() *qt.QMetaObject { @@ -145,7 +168,7 @@ func QsciLexerOctave_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QsciLexerOctave) Delete() { - C.QsciLexerOctave_Delete(this.h) + C.QsciLexerOctave_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h index 5bec4c6c..52ad219e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerMatlab; class QsciLexerOctave; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerMatlab QsciLexerMatlab; typedef struct QsciLexerOctave QsciLexerOctave; #endif -QsciLexerOctave* QsciLexerOctave_new(); -QsciLexerOctave* QsciLexerOctave_new2(QObject* parent); +void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self); void* QsciLexerOctave_Metacast(QsciLexerOctave* self, const char* param1); struct miqt_string QsciLexerOctave_Tr(const char* s); @@ -37,7 +41,7 @@ struct miqt_string QsciLexerOctave_Tr2(const char* s, const char* c); struct miqt_string QsciLexerOctave_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerOctave_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerOctave_TrUtf83(const char* s, const char* c, int n); -void QsciLexerOctave_Delete(QsciLexerOctave* self); +void QsciLexerOctave_Delete(QsciLexerOctave* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp index 09b0786c..9879914a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,918 @@ #include "gen_qscilexerpascal.h" #include "_cgo_export.h" -QsciLexerPascal* QsciLexerPascal_new() { - return new QsciLexerPascal(); +class MiqtVirtualQsciLexerPascal : public virtual QsciLexerPascal { +public: + + MiqtVirtualQsciLexerPascal(): QsciLexerPascal() {}; + MiqtVirtualQsciLexerPascal(QObject* parent): QsciLexerPascal(parent) {}; + + virtual ~MiqtVirtualQsciLexerPascal() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPascal::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPascal_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPascal::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPascal::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPascal_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPascal::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerPascal::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerPascal::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPascal::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPascal::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPascal::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPascal::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPascal::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPascal::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPascal::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPascal_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPascal::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPascal::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPascal::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPascal::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPascal::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPascal::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPascal::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPascal::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPascal::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPascal::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPascal::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPascal::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPascal::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPascal::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPascal::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPascal::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPascal::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPascal::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPascal_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPascal::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPascal::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPascal::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPascal::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPascal::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPascal::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPascal::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPascal_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPascal::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPascal::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPascal::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPascal::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPascal::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPascal::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPascal::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPascal::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPascal::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPascal::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPascal::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPascal_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPascal::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPascal::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPascal_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPascal::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPascal::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPascal::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPascal::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPascal::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPascal::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPascal_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPascal::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPascal::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPascal::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPascal::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPascal::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPascal::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPascal::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPascal::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPascal::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPascal::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPascal::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPascal::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPascal::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(); + *outptr_QsciLexerPascal = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPascal* QsciLexerPascal_new2(QObject* parent) { - return new QsciLexerPascal(parent); +void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(parent); + *outptr_QsciLexerPascal = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self) { @@ -215,7 +1122,299 @@ const char* QsciLexerPascal_BlockStartKeyword1(const QsciLexerPascal* self, int* return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerPascal_Delete(QsciLexerPascal* self) { - delete self; +void QsciLexerPascal_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPascal_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPascal_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPascal_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPascal_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerPascal_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerPascal_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Language = slot; +} + +void QsciLexerPascal_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPascal_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPascal_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPascal_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPascal_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPascal_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPascal_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPascal_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPascal_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPascal_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPascal_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPascal_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPascal_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPascal_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPascal_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPascal_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPascal_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPascal_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPascal_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPascal_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPascal_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPascal_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPascal_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPascal_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPascal_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPascal_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPascal_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPascal_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPascal_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPascal_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPascal_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPascal_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPascal_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Description = slot; +} + +void QsciLexerPascal_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPascal_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPascal_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPascal_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPascal_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPascal_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPascal_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPascal_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPascal_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPascal_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPascal_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPascal_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPascal_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPascal_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPascal_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPascal_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPascal_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPascal_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPascal_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPascal_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPascal_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPascal_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPascal_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPascal_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPascal_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPascal_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPascal_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPascal_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPascal_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPascal_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPascal_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPascal_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPascal_Delete(QsciLexerPascal* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go index 9ca72b9e..17650efb 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerPascal struct { - h *C.QsciLexerPascal + h *C.QsciLexerPascal + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerPascal) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPascal(h *C.QsciLexerPascal) *QsciLexerPascal { +// newQsciLexerPascal constructs the type using only CGO pointers. +func newQsciLexerPascal(h *C.QsciLexerPascal, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPascal { if h == nil { return nil } - return &QsciLexerPascal{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPascal{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPascal(h unsafe.Pointer) *QsciLexerPascal { - return newQsciLexerPascal((*C.QsciLexerPascal)(h)) +// UnsafeNewQsciLexerPascal constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPascal(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPascal { + if h == nil { + return nil + } + + return &QsciLexerPascal{h: (*C.QsciLexerPascal)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPascal constructs a new QsciLexerPascal object. func NewQsciLexerPascal() *QsciLexerPascal { - ret := C.QsciLexerPascal_new() - return newQsciLexerPascal(ret) + var outptr_QsciLexerPascal *C.QsciLexerPascal = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPascal_new(&outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPascal2 constructs a new QsciLexerPascal object. func NewQsciLexerPascal2(parent *qt.QObject) *QsciLexerPascal { - ret := C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPascal(ret) + var outptr_QsciLexerPascal *C.QsciLexerPascal = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPascal) MetaObject() *qt.QMetaObject { @@ -278,9 +300,963 @@ func (this *QsciLexerPascal) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerPascal) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPascal_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPascal) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPascal_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFoldComments +func miqt_exec_callback_QsciLexerPascal_SetFoldComments(self *C.QsciLexerPascal, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPascal_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPascal) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPascal_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFoldCompact +func miqt_exec_callback_QsciLexerPascal_SetFoldCompact(self *C.QsciLexerPascal, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerPascal_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPascal) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPascal_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor(self *C.QsciLexerPascal, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_Language() string { + + _ret := C.QsciLexerPascal_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Language +func miqt_exec_callback_QsciLexerPascal_Language(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPascal_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnLexer(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Lexer +func miqt_exec_callback_QsciLexerPascal_Lexer(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPascal_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_LexerId +func miqt_exec_callback_QsciLexerPascal_LexerId(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPascal_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPascal_AutoCompletionFillups(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPascal_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPascal) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPascal_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPascal_AutoCompletionWordSeparators(self *C.QsciLexerPascal, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPascal_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPascal_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockEnd +func miqt_exec_callback_QsciLexerPascal_BlockEnd(self *C.QsciLexerPascal, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPascal_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockLookback +func miqt_exec_callback_QsciLexerPascal_BlockLookback(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPascal_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPascal_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockStart +func miqt_exec_callback_QsciLexerPascal_BlockStart(self *C.QsciLexerPascal, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPascal_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPascal_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockStartKeyword +func miqt_exec_callback_QsciLexerPascal_BlockStartKeyword(self *C.QsciLexerPascal, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPascal_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BraceStyle +func miqt_exec_callback_QsciLexerPascal_BraceStyle(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPascal_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPascal_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_CaseSensitive +func miqt_exec_callback_QsciLexerPascal_CaseSensitive(self *C.QsciLexerPascal, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerPascal_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPascal_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Color +func miqt_exec_callback_QsciLexerPascal_Color(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPascal_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPascal) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPascal_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_EolFill +func miqt_exec_callback_QsciLexerPascal_EolFill(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerPascal_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPascal_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Font +func miqt_exec_callback_QsciLexerPascal_Font(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPascal_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_IndentationGuideView +func miqt_exec_callback_QsciLexerPascal_IndentationGuideView(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPascal_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPascal_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Keywords +func miqt_exec_callback_QsciLexerPascal_Keywords(self *C.QsciLexerPascal, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPascal_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultStyle +func miqt_exec_callback_QsciLexerPascal_DefaultStyle(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPascal_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPascal) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPascal_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Description +func miqt_exec_callback_QsciLexerPascal_Description(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPascal) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerPascal_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPascal_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Paper +func miqt_exec_callback_QsciLexerPascal_Paper(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPascal_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPascal_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPascal_DefaultColorWithStyle(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPascal_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPascal) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPascal_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultEolFill +func miqt_exec_callback_QsciLexerPascal_DefaultEolFill(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerPascal_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPascal_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPascal_DefaultFontWithStyle(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPascal_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPascal_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPascal_DefaultPaperWithStyle(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPascal_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPascal) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPascal_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetEditor +func miqt_exec_callback_QsciLexerPascal_SetEditor(self *C.QsciLexerPascal, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_RefreshProperties() { + + C.QsciLexerPascal_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPascal) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPascal_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_RefreshProperties +func miqt_exec_callback_QsciLexerPascal_RefreshProperties(self *C.QsciLexerPascal, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPascal) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPascal_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPascal_StyleBitsNeeded(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPascal_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_WordCharacters +func miqt_exec_callback_QsciLexerPascal_WordCharacters(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPascal_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPascal) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPascal_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPascal_SetAutoIndentStyle(self *C.QsciLexerPascal, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerPascal_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPascal_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetColor +func miqt_exec_callback_QsciLexerPascal_SetColor(self *C.QsciLexerPascal, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPascal_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPascal_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetEolFill +func miqt_exec_callback_QsciLexerPascal_SetEolFill(self *C.QsciLexerPascal, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerPascal_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerPascal_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFont +func miqt_exec_callback_QsciLexerPascal_SetFont(self *C.QsciLexerPascal, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerPascal_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPascal_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetPaper +func miqt_exec_callback_QsciLexerPascal_SetPaper(self *C.QsciLexerPascal, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPascal_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPascal) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPascal_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_ReadProperties +func miqt_exec_callback_QsciLexerPascal_ReadProperties(self *C.QsciLexerPascal, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPascal_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPascal) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPascal_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_WriteProperties +func miqt_exec_callback_QsciLexerPascal_WriteProperties(self *C.QsciLexerPascal, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPascal) Delete() { - C.QsciLexerPascal_Delete(this.h) + C.QsciLexerPascal_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h index b61cf26f..a0b5d760 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPascal; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPascal QsciLexerPascal; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPascal* QsciLexerPascal_new(); -QsciLexerPascal* QsciLexerPascal_new2(QObject* parent); +void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self); void* QsciLexerPascal_Metacast(QsciLexerPascal* self, const char* param1); struct miqt_string QsciLexerPascal_Tr(const char* s); @@ -63,7 +69,81 @@ struct miqt_string QsciLexerPascal_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerPascal_BlockEnd1(const QsciLexerPascal* self, int* style); const char* QsciLexerPascal_BlockStart1(const QsciLexerPascal* self, int* style); const char* QsciLexerPascal_BlockStartKeyword1(const QsciLexerPascal* self, int* style); -void QsciLexerPascal_Delete(QsciLexerPascal* self); +void QsciLexerPascal_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPascal_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPascal_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerPascal_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_Language(const void* self); +void QsciLexerPascal_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_Lexer(const void* self); +void QsciLexerPascal_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_LexerId(const void* self); +void QsciLexerPascal_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPascal_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPascal_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPascal_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPascal_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_BlockLookback(const void* self); +void QsciLexerPascal_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPascal_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPascal_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_BraceStyle(const void* self); +void QsciLexerPascal_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_CaseSensitive(const void* self); +void QsciLexerPascal_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_Color(const void* self, int style); +void QsciLexerPascal_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_EolFill(const void* self, int style); +void QsciLexerPascal_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPascal_virtualbase_Font(const void* self, int style); +void QsciLexerPascal_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPascal_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_Keywords(const void* self, int set); +void QsciLexerPascal_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_DefaultStyle(const void* self); +void QsciLexerPascal_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPascal_virtualbase_Description(const void* self, int style); +void QsciLexerPascal_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_Paper(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPascal_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPascal_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPascal_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_RefreshProperties(void* self); +void QsciLexerPascal_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPascal_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_WordCharacters(const void* self); +void QsciLexerPascal_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPascal_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPascal_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPascal_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPascal_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPascal_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPascal_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPascal_Delete(QsciLexerPascal* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp index 76497c20..77835ff5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,894 @@ #include "gen_qscilexerperl.h" #include "_cgo_export.h" -QsciLexerPerl* QsciLexerPerl_new() { - return new QsciLexerPerl(); +class MiqtVirtualQsciLexerPerl : public virtual QsciLexerPerl { +public: + + MiqtVirtualQsciLexerPerl(): QsciLexerPerl() {}; + MiqtVirtualQsciLexerPerl(QObject* parent): QsciLexerPerl(parent) {}; + + virtual ~MiqtVirtualQsciLexerPerl() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPerl::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPerl_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPerl::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPerl::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPerl_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPerl::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPerl::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPerl::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPerl::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPerl::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPerl::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPerl::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPerl::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPerl_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPerl::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPerl::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPerl::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPerl::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPerl::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPerl::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPerl::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPerl::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPerl::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPerl::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPerl::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPerl::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPerl::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPerl::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPerl::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPerl::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPerl::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPerl::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPerl_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPerl::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPerl::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPerl::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPerl::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPerl::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPerl::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPerl::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPerl_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPerl::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPerl::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPerl::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPerl::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPerl::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPerl::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPerl::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPerl::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPerl::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPerl::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPerl::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPerl_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPerl::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPerl::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPerl_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPerl::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPerl::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPerl::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPerl::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPerl::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPerl::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPerl_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPerl::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPerl::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPerl::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPerl::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPerl::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPerl::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPerl::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPerl::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPerl::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPerl::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPerl::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPerl::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPerl::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(); + *outptr_QsciLexerPerl = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPerl* QsciLexerPerl_new2(QObject* parent) { - return new QsciLexerPerl(parent); +void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(parent); + *outptr_QsciLexerPerl = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self) { @@ -219,7 +1102,291 @@ const char* QsciLexerPerl_BlockStart1(const QsciLexerPerl* self, int* style) { return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerPerl_Delete(QsciLexerPerl* self) { - delete self; +void QsciLexerPerl_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPerl_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPerl_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPerl_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPerl_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Language = slot; +} + +void QsciLexerPerl_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPerl_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPerl_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPerl_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPerl_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPerl_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPerl_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPerl_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPerl_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPerl_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPerl_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPerl_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPerl_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPerl_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPerl_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPerl_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPerl_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPerl_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPerl_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPerl_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPerl_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPerl_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPerl_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPerl_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPerl_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPerl_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPerl_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPerl_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPerl_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPerl_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPerl_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPerl_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPerl_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Description = slot; +} + +void QsciLexerPerl_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPerl_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPerl_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPerl_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPerl_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPerl_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPerl_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPerl_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPerl_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPerl_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPerl_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPerl_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPerl_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPerl_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPerl_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPerl_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPerl_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPerl_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPerl_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPerl_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPerl_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPerl_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPerl_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPerl_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPerl_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPerl_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPerl_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPerl_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPerl_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPerl_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPerl_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPerl_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPerl_Delete(QsciLexerPerl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.go b/qt-restricted-extras/qscintilla/gen_qscilexerperl.go index ba7f8113..5a709b59 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -61,7 +62,8 @@ const ( ) type QsciLexerPerl struct { - h *C.QsciLexerPerl + h *C.QsciLexerPerl + isSubclass bool *QsciLexer } @@ -79,27 +81,47 @@ func (this *QsciLexerPerl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPerl(h *C.QsciLexerPerl) *QsciLexerPerl { +// newQsciLexerPerl constructs the type using only CGO pointers. +func newQsciLexerPerl(h *C.QsciLexerPerl, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPerl { if h == nil { return nil } - return &QsciLexerPerl{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPerl{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPerl(h unsafe.Pointer) *QsciLexerPerl { - return newQsciLexerPerl((*C.QsciLexerPerl)(h)) +// UnsafeNewQsciLexerPerl constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPerl(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPerl { + if h == nil { + return nil + } + + return &QsciLexerPerl{h: (*C.QsciLexerPerl)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPerl constructs a new QsciLexerPerl object. func NewQsciLexerPerl() *QsciLexerPerl { - ret := C.QsciLexerPerl_new() - return newQsciLexerPerl(ret) + var outptr_QsciLexerPerl *C.QsciLexerPerl = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPerl_new(&outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPerl2 constructs a new QsciLexerPerl object. func NewQsciLexerPerl2(parent *qt.QObject) *QsciLexerPerl { - ret := C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPerl(ret) + var outptr_QsciLexerPerl *C.QsciLexerPerl = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPerl) MetaObject() *qt.QMetaObject { @@ -307,9 +329,940 @@ func (this *QsciLexerPerl) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerPerl) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPerl_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPerl) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPerl_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetFoldComments +func miqt_exec_callback_QsciLexerPerl_SetFoldComments(self *C.QsciLexerPerl, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPerl_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPerl) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPerl_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetFoldCompact +func miqt_exec_callback_QsciLexerPerl_SetFoldCompact(self *C.QsciLexerPerl, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_Language() string { + + _ret := C.QsciLexerPerl_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Language +func miqt_exec_callback_QsciLexerPerl_Language(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPerl_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnLexer(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Lexer +func miqt_exec_callback_QsciLexerPerl_Lexer(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPerl_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_LexerId +func miqt_exec_callback_QsciLexerPerl_LexerId(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPerl_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPerl_AutoCompletionFillups(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPerl_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPerl) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPerl_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPerl_AutoCompletionWordSeparators(self *C.QsciLexerPerl, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPerl_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPerl_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockEnd +func miqt_exec_callback_QsciLexerPerl_BlockEnd(self *C.QsciLexerPerl, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPerl_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockLookback +func miqt_exec_callback_QsciLexerPerl_BlockLookback(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPerl_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPerl_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockStart +func miqt_exec_callback_QsciLexerPerl_BlockStart(self *C.QsciLexerPerl, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPerl_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPerl_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockStartKeyword +func miqt_exec_callback_QsciLexerPerl_BlockStartKeyword(self *C.QsciLexerPerl, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPerl_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BraceStyle +func miqt_exec_callback_QsciLexerPerl_BraceStyle(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPerl_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPerl_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_CaseSensitive +func miqt_exec_callback_QsciLexerPerl_CaseSensitive(self *C.QsciLexerPerl, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerPerl_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPerl_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Color +func miqt_exec_callback_QsciLexerPerl_Color(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPerl_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPerl) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPerl_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_EolFill +func miqt_exec_callback_QsciLexerPerl_EolFill(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerPerl_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPerl_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Font +func miqt_exec_callback_QsciLexerPerl_Font(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPerl_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_IndentationGuideView +func miqt_exec_callback_QsciLexerPerl_IndentationGuideView(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPerl_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPerl_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Keywords +func miqt_exec_callback_QsciLexerPerl_Keywords(self *C.QsciLexerPerl, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPerl_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultStyle +func miqt_exec_callback_QsciLexerPerl_DefaultStyle(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPerl_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPerl) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPerl_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Description +func miqt_exec_callback_QsciLexerPerl_Description(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPerl) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerPerl_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPerl_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Paper +func miqt_exec_callback_QsciLexerPerl_Paper(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPerl_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPerl_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPerl_DefaultColorWithStyle(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPerl_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPerl) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPerl_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultEolFill +func miqt_exec_callback_QsciLexerPerl_DefaultEolFill(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerPerl_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPerl_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPerl_DefaultFontWithStyle(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPerl_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPerl_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPerl_DefaultPaperWithStyle(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPerl_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPerl) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPerl_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetEditor +func miqt_exec_callback_QsciLexerPerl_SetEditor(self *C.QsciLexerPerl, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_RefreshProperties() { + + C.QsciLexerPerl_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPerl) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPerl_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_RefreshProperties +func miqt_exec_callback_QsciLexerPerl_RefreshProperties(self *C.QsciLexerPerl, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPerl) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPerl_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPerl_StyleBitsNeeded(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPerl_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_WordCharacters +func miqt_exec_callback_QsciLexerPerl_WordCharacters(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPerl_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPerl) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPerl_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPerl_SetAutoIndentStyle(self *C.QsciLexerPerl, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerPerl_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPerl_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetColor +func miqt_exec_callback_QsciLexerPerl_SetColor(self *C.QsciLexerPerl, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPerl_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPerl_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetEolFill +func miqt_exec_callback_QsciLexerPerl_SetEolFill(self *C.QsciLexerPerl, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerPerl_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerPerl_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetFont +func miqt_exec_callback_QsciLexerPerl_SetFont(self *C.QsciLexerPerl, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerPerl_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPerl_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetPaper +func miqt_exec_callback_QsciLexerPerl_SetPaper(self *C.QsciLexerPerl, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPerl_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPerl) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPerl_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_ReadProperties +func miqt_exec_callback_QsciLexerPerl_ReadProperties(self *C.QsciLexerPerl, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPerl_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPerl) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPerl_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_WriteProperties +func miqt_exec_callback_QsciLexerPerl_WriteProperties(self *C.QsciLexerPerl, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPerl) Delete() { - C.QsciLexerPerl_Delete(this.h) + C.QsciLexerPerl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.h b/qt-restricted-extras/qscintilla/gen_qscilexerperl.h index 48d17c22..f5e44179 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPerl; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPerl QsciLexerPerl; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPerl* QsciLexerPerl_new(); -QsciLexerPerl* QsciLexerPerl_new2(QObject* parent); +void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self); void* QsciLexerPerl_Metacast(QsciLexerPerl* self, const char* param1); struct miqt_string QsciLexerPerl_Tr(const char* s); @@ -64,7 +70,79 @@ struct miqt_string QsciLexerPerl_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerPerl_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerPerl_BlockEnd1(const QsciLexerPerl* self, int* style); const char* QsciLexerPerl_BlockStart1(const QsciLexerPerl* self, int* style); -void QsciLexerPerl_Delete(QsciLexerPerl* self); +void QsciLexerPerl_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPerl_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPerl_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_Language(const void* self); +void QsciLexerPerl_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_Lexer(const void* self); +void QsciLexerPerl_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_LexerId(const void* self); +void QsciLexerPerl_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPerl_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPerl_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPerl_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPerl_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_BlockLookback(const void* self); +void QsciLexerPerl_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPerl_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPerl_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_BraceStyle(const void* self); +void QsciLexerPerl_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_CaseSensitive(const void* self); +void QsciLexerPerl_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_Color(const void* self, int style); +void QsciLexerPerl_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_EolFill(const void* self, int style); +void QsciLexerPerl_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPerl_virtualbase_Font(const void* self, int style); +void QsciLexerPerl_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPerl_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_Keywords(const void* self, int set); +void QsciLexerPerl_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_DefaultStyle(const void* self); +void QsciLexerPerl_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPerl_virtualbase_Description(const void* self, int style); +void QsciLexerPerl_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_Paper(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPerl_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPerl_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPerl_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_RefreshProperties(void* self); +void QsciLexerPerl_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPerl_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_WordCharacters(const void* self); +void QsciLexerPerl_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPerl_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPerl_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPerl_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPerl_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPerl_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPerl_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPerl_Delete(QsciLexerPerl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp index 4f169421..6eb93e07 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexerpo.h" #include "_cgo_export.h" -QsciLexerPO* QsciLexerPO_new() { - return new QsciLexerPO(); +class MiqtVirtualQsciLexerPO : public virtual QsciLexerPO { +public: + + MiqtVirtualQsciLexerPO(): QsciLexerPO() {}; + MiqtVirtualQsciLexerPO(QObject* parent): QsciLexerPO(parent) {}; + + virtual ~MiqtVirtualQsciLexerPO() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPO::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPO_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPO::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPO::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPO_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPO::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPO::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPO::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPO::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPO::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPO::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPO::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPO::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPO_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPO::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPO::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPO::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPO::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPO::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPO::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPO::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPO::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPO::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPO::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPO::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPO::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPO::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPO::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPO::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPO::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPO::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPO::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPO_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPO::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPO::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPO::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPO::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPO::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPO::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPO::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPO_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPO::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPO::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPO::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPO::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPO::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPO::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPO::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPO::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPO::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPO::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPO::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPO_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPO::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPO::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPO_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPO::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPO::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPO::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPO::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPO::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPO::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPO_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPO::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPO::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPO::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPO::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPO::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPO::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPO::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPO::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPO::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPO::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPO::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPO::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPO::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(); + *outptr_QsciLexerPO = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPO* QsciLexerPO_new2(QObject* parent) { - return new QsciLexerPO(parent); +void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(parent); + *outptr_QsciLexerPO = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self) { @@ -138,7 +1022,291 @@ struct miqt_string QsciLexerPO_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerPO_Delete(QsciLexerPO* self) { - delete self; +void QsciLexerPO_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPO_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPO_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPO_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPO_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Language = slot; +} + +void QsciLexerPO_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPO_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPO_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPO_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPO_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPO_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPO_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPO_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPO_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPO_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPO_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPO_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPO_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPO_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPO_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPO_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPO_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPO_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPO_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPO_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPO_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPO_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPO_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPO_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPO_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPO_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPO_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPO_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPO_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPO_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPO_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPO_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPO_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Description = slot; +} + +void QsciLexerPO_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPO_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPO_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPO_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPO_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPO_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPO_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPO_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPO_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPO_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPO_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPO_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPO_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPO_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPO_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPO_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPO_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPO_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPO_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPO_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPO_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPO_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPO_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPO_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPO_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPO_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPO_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPO_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPO_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPO_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPO_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPO_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPO_Delete(QsciLexerPO* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.go b/qt-restricted-extras/qscintilla/gen_qscilexerpo.go index fd2d3e70..4f3d3f06 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerPO struct { - h *C.QsciLexerPO + h *C.QsciLexerPO + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerPO) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPO(h *C.QsciLexerPO) *QsciLexerPO { +// newQsciLexerPO constructs the type using only CGO pointers. +func newQsciLexerPO(h *C.QsciLexerPO, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPO { if h == nil { return nil } - return &QsciLexerPO{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPO{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPO(h unsafe.Pointer) *QsciLexerPO { - return newQsciLexerPO((*C.QsciLexerPO)(h)) +// UnsafeNewQsciLexerPO constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPO(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPO { + if h == nil { + return nil + } + + return &QsciLexerPO{h: (*C.QsciLexerPO)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPO constructs a new QsciLexerPO object. func NewQsciLexerPO() *QsciLexerPO { - ret := C.QsciLexerPO_new() - return newQsciLexerPO(ret) + var outptr_QsciLexerPO *C.QsciLexerPO = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPO_new(&outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPO2 constructs a new QsciLexerPO object. func NewQsciLexerPO2(parent *qt.QObject) *QsciLexerPO { - ret := C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPO(ret) + var outptr_QsciLexerPO *C.QsciLexerPO = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPO) MetaObject() *qt.QMetaObject { @@ -199,9 +221,940 @@ func QsciLexerPO_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerPO) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPO_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPO) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPO_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetFoldComments +func miqt_exec_callback_QsciLexerPO_SetFoldComments(self *C.QsciLexerPO, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPO_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPO) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPO_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetFoldCompact +func miqt_exec_callback_QsciLexerPO_SetFoldCompact(self *C.QsciLexerPO, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_Language() string { + + _ret := C.QsciLexerPO_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Language +func miqt_exec_callback_QsciLexerPO_Language(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPO_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnLexer(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Lexer +func miqt_exec_callback_QsciLexerPO_Lexer(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPO_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_LexerId +func miqt_exec_callback_QsciLexerPO_LexerId(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPO_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPO_AutoCompletionFillups(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPO_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPO) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPO_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPO_AutoCompletionWordSeparators(self *C.QsciLexerPO, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPO) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPO_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPO_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockEnd +func miqt_exec_callback_QsciLexerPO_BlockEnd(self *C.QsciLexerPO, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPO_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockLookback +func miqt_exec_callback_QsciLexerPO_BlockLookback(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPO_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPO_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockStart +func miqt_exec_callback_QsciLexerPO_BlockStart(self *C.QsciLexerPO, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPO_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPO_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockStartKeyword +func miqt_exec_callback_QsciLexerPO_BlockStartKeyword(self *C.QsciLexerPO, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPO_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BraceStyle +func miqt_exec_callback_QsciLexerPO_BraceStyle(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPO_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPO_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_CaseSensitive +func miqt_exec_callback_QsciLexerPO_CaseSensitive(self *C.QsciLexerPO, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerPO_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPO_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Color +func miqt_exec_callback_QsciLexerPO_Color(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPO_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPO) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPO_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_EolFill +func miqt_exec_callback_QsciLexerPO_EolFill(self *C.QsciLexerPO, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerPO_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPO_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Font +func miqt_exec_callback_QsciLexerPO_Font(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPO_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_IndentationGuideView +func miqt_exec_callback_QsciLexerPO_IndentationGuideView(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPO_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPO_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Keywords +func miqt_exec_callback_QsciLexerPO_Keywords(self *C.QsciLexerPO, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPO_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultStyle +func miqt_exec_callback_QsciLexerPO_DefaultStyle(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPO_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPO) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPO_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Description +func miqt_exec_callback_QsciLexerPO_Description(self *C.QsciLexerPO, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPO) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerPO_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPO_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Paper +func miqt_exec_callback_QsciLexerPO_Paper(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPO_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPO_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPO_DefaultColorWithStyle(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPO_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPO) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPO_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultEolFill +func miqt_exec_callback_QsciLexerPO_DefaultEolFill(self *C.QsciLexerPO, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerPO_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPO_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPO_DefaultFontWithStyle(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPO_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPO_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPO_DefaultPaperWithStyle(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPO_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPO) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPO_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetEditor +func miqt_exec_callback_QsciLexerPO_SetEditor(self *C.QsciLexerPO, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_RefreshProperties() { + + C.QsciLexerPO_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPO) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPO_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_RefreshProperties +func miqt_exec_callback_QsciLexerPO_RefreshProperties(self *C.QsciLexerPO, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPO) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPO_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPO_StyleBitsNeeded(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPO_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_WordCharacters +func miqt_exec_callback_QsciLexerPO_WordCharacters(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPO_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPO) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPO_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPO_SetAutoIndentStyle(self *C.QsciLexerPO, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerPO_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPO_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetColor +func miqt_exec_callback_QsciLexerPO_SetColor(self *C.QsciLexerPO, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPO_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPO_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetEolFill +func miqt_exec_callback_QsciLexerPO_SetEolFill(self *C.QsciLexerPO, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerPO_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerPO_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetFont +func miqt_exec_callback_QsciLexerPO_SetFont(self *C.QsciLexerPO, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerPO_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPO_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetPaper +func miqt_exec_callback_QsciLexerPO_SetPaper(self *C.QsciLexerPO, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPO_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPO) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPO_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_ReadProperties +func miqt_exec_callback_QsciLexerPO_ReadProperties(self *C.QsciLexerPO, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPO_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPO) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPO_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_WriteProperties +func miqt_exec_callback_QsciLexerPO_WriteProperties(self *C.QsciLexerPO, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPO) Delete() { - C.QsciLexerPO_Delete(this.h) + C.QsciLexerPO_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.h b/qt-restricted-extras/qscintilla/gen_qscilexerpo.h index e17c3979..b11894bf 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPO; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPO QsciLexerPO; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPO* QsciLexerPO_new(); -QsciLexerPO* QsciLexerPO_new2(QObject* parent); +void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self); void* QsciLexerPO_Metacast(QsciLexerPO* self, const char* param1); struct miqt_string QsciLexerPO_Tr(const char* s); @@ -48,7 +54,79 @@ struct miqt_string QsciLexerPO_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPO_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerPO_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerPO_TrUtf83(const char* s, const char* c, int n); -void QsciLexerPO_Delete(QsciLexerPO* self); +void QsciLexerPO_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPO_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPO_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_Language(const void* self); +void QsciLexerPO_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_Lexer(const void* self); +void QsciLexerPO_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_LexerId(const void* self); +void QsciLexerPO_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPO_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPO_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPO_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPO_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_BlockLookback(const void* self); +void QsciLexerPO_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPO_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPO_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_BraceStyle(const void* self); +void QsciLexerPO_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_CaseSensitive(const void* self); +void QsciLexerPO_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_Color(const void* self, int style); +void QsciLexerPO_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_EolFill(const void* self, int style); +void QsciLexerPO_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPO_virtualbase_Font(const void* self, int style); +void QsciLexerPO_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPO_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_Keywords(const void* self, int set); +void QsciLexerPO_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_DefaultStyle(const void* self); +void QsciLexerPO_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPO_virtualbase_Description(const void* self, int style); +void QsciLexerPO_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_Paper(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPO_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPO_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPO_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_RefreshProperties(void* self); +void QsciLexerPO_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPO_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_WordCharacters(const void* self); +void QsciLexerPO_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPO_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPO_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPO_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPO_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPO_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPO_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPO_Delete(QsciLexerPO* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp index 7429bd8a..b9d4a3dc 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,942 @@ #include "gen_qscilexerpostscript.h" #include "_cgo_export.h" -QsciLexerPostScript* QsciLexerPostScript_new() { - return new QsciLexerPostScript(); +class MiqtVirtualQsciLexerPostScript : public virtual QsciLexerPostScript { +public: + + MiqtVirtualQsciLexerPostScript(): QsciLexerPostScript() {}; + MiqtVirtualQsciLexerPostScript(QObject* parent): QsciLexerPostScript(parent) {}; + + virtual ~MiqtVirtualQsciLexerPostScript() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTokenize = 0; + + // Subclass to allow providing a Go implementation + virtual void setTokenize(bool tokenize) override { + if (handle__SetTokenize == 0) { + QsciLexerPostScript::setTokenize(tokenize); + return; + } + + bool sigval1 = tokenize; + + miqt_exec_callback_QsciLexerPostScript_SetTokenize(this, handle__SetTokenize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTokenize(bool tokenize) { + + QsciLexerPostScript::setTokenize(tokenize); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetLevel = 0; + + // Subclass to allow providing a Go implementation + virtual void setLevel(int level) override { + if (handle__SetLevel == 0) { + QsciLexerPostScript::setLevel(level); + return; + } + + int sigval1 = level; + + miqt_exec_callback_QsciLexerPostScript_SetLevel(this, handle__SetLevel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetLevel(int level) { + + QsciLexerPostScript::setLevel(static_cast(level)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPostScript::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPostScript_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPostScript::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerPostScript::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerPostScript::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPostScript::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPostScript::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPostScript::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPostScript::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPostScript::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPostScript::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPostScript::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPostScript_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPostScript::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPostScript::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPostScript::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPostScript::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPostScript::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPostScript::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPostScript::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPostScript::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPostScript::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPostScript::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPostScript::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPostScript::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPostScript::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPostScript::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPostScript::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPostScript::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPostScript::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPostScript::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPostScript::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPostScript::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPostScript::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPostScript::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPostScript::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPostScript::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPostScript::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPostScript_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPostScript::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPostScript::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPostScript::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPostScript::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPostScript::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPostScript::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPostScript::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPostScript::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPostScript::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPostScript::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPostScript::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPostScript_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPostScript::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPostScript::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPostScript_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPostScript::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPostScript::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPostScript::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPostScript::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPostScript::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPostScript::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPostScript_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPostScript::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPostScript::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPostScript::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPostScript::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPostScript::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPostScript::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPostScript::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPostScript::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPostScript::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPostScript::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPostScript::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPostScript::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPostScript::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(); + *outptr_QsciLexerPostScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent) { - return new QsciLexerPostScript(parent); +void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(parent); + *outptr_QsciLexerPostScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self) { @@ -166,7 +1098,307 @@ struct miqt_string QsciLexerPostScript_TrUtf83(const char* s, const char* c, int return _ms; } -void QsciLexerPostScript_Delete(QsciLexerPostScript* self) { - delete self; +void QsciLexerPostScript_override_virtual_SetTokenize(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetTokenize = slot; +} + +void QsciLexerPostScript_virtualbase_SetTokenize(void* self, bool tokenize) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetTokenize(tokenize); +} + +void QsciLexerPostScript_override_virtual_SetLevel(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetLevel = slot; +} + +void QsciLexerPostScript_virtualbase_SetLevel(void* self, int level) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetLevel(level); +} + +void QsciLexerPostScript_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPostScript_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPostScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerPostScript_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerPostScript_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Language = slot; +} + +void QsciLexerPostScript_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPostScript_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPostScript_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPostScript_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPostScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPostScript_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPostScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPostScript_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPostScript_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPostScript_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPostScript_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPostScript_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPostScript_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPostScript_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPostScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPostScript_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPostScript_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPostScript_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPostScript_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPostScript_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPostScript_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPostScript_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPostScript_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPostScript_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPostScript_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPostScript_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPostScript_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPostScript_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPostScript_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPostScript_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPostScript_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPostScript_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPostScript_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Description = slot; +} + +void QsciLexerPostScript_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPostScript_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPostScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPostScript_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPostScript_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPostScript_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPostScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPostScript_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPostScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPostScript_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPostScript_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPostScript_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPostScript_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPostScript_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPostScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPostScript_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPostScript_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPostScript_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPostScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPostScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPostScript_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPostScript_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPostScript_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPostScript_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPostScript_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPostScript_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPostScript_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPostScript_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPostScript_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPostScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPostScript_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPostScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPostScript_Delete(QsciLexerPostScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go index def9aced..38bda0a6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -36,7 +37,8 @@ const ( ) type QsciLexerPostScript struct { - h *C.QsciLexerPostScript + h *C.QsciLexerPostScript + isSubclass bool *QsciLexer } @@ -54,27 +56,47 @@ func (this *QsciLexerPostScript) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPostScript(h *C.QsciLexerPostScript) *QsciLexerPostScript { +// newQsciLexerPostScript constructs the type using only CGO pointers. +func newQsciLexerPostScript(h *C.QsciLexerPostScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPostScript { if h == nil { return nil } - return &QsciLexerPostScript{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPostScript{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPostScript(h unsafe.Pointer) *QsciLexerPostScript { - return newQsciLexerPostScript((*C.QsciLexerPostScript)(h)) +// UnsafeNewQsciLexerPostScript constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPostScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPostScript { + if h == nil { + return nil + } + + return &QsciLexerPostScript{h: (*C.QsciLexerPostScript)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPostScript constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript() *QsciLexerPostScript { - ret := C.QsciLexerPostScript_new() - return newQsciLexerPostScript(ret) + var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPostScript_new(&outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPostScript2 constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript2(parent *qt.QObject) *QsciLexerPostScript { - ret := C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPostScript(ret) + var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPostScript) MetaObject() *qt.QMetaObject { @@ -232,9 +254,986 @@ func QsciLexerPostScript_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerPostScript) callVirtualBase_SetTokenize(tokenize bool) { + + C.QsciLexerPostScript_virtualbase_SetTokenize(unsafe.Pointer(this.h), (C.bool)(tokenize)) + +} +func (this *QsciLexerPostScript) OnSetTokenize(slot func(super func(tokenize bool), tokenize bool)) { + C.QsciLexerPostScript_override_virtual_SetTokenize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetTokenize +func miqt_exec_callback_QsciLexerPostScript_SetTokenize(self *C.QsciLexerPostScript, cb C.intptr_t, tokenize C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(tokenize bool), tokenize bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(tokenize) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetTokenize, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetLevel(level int) { + + C.QsciLexerPostScript_virtualbase_SetLevel(unsafe.Pointer(this.h), (C.int)(level)) + +} +func (this *QsciLexerPostScript) OnSetLevel(slot func(super func(level int), level int)) { + C.QsciLexerPostScript_override_virtual_SetLevel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetLevel +func miqt_exec_callback_QsciLexerPostScript_SetLevel(self *C.QsciLexerPostScript, cb C.intptr_t, level C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(level int), level int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(level) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetLevel, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPostScript_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPostScript) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPostScript_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetFoldCompact +func miqt_exec_callback_QsciLexerPostScript_SetFoldCompact(self *C.QsciLexerPostScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerPostScript_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPostScript) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPostScript_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse +func miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse(self *C.QsciLexerPostScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Language() string { + + _ret := C.QsciLexerPostScript_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Language +func miqt_exec_callback_QsciLexerPostScript_Language(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPostScript_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnLexer(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Lexer +func miqt_exec_callback_QsciLexerPostScript_Lexer(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPostScript_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_LexerId +func miqt_exec_callback_QsciLexerPostScript_LexerId(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPostScript_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPostScript_AutoCompletionFillups(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPostScript_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPostScript) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPostScript_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPostScript_AutoCompletionWordSeparators(self *C.QsciLexerPostScript, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPostScript_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPostScript_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockEnd +func miqt_exec_callback_QsciLexerPostScript_BlockEnd(self *C.QsciLexerPostScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPostScript_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockLookback +func miqt_exec_callback_QsciLexerPostScript_BlockLookback(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPostScript_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPostScript_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockStart +func miqt_exec_callback_QsciLexerPostScript_BlockStart(self *C.QsciLexerPostScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPostScript_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPostScript_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockStartKeyword +func miqt_exec_callback_QsciLexerPostScript_BlockStartKeyword(self *C.QsciLexerPostScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPostScript_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BraceStyle +func miqt_exec_callback_QsciLexerPostScript_BraceStyle(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPostScript_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPostScript_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_CaseSensitive +func miqt_exec_callback_QsciLexerPostScript_CaseSensitive(self *C.QsciLexerPostScript, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPostScript_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Color +func miqt_exec_callback_QsciLexerPostScript_Color(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPostScript_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPostScript) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPostScript_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_EolFill +func miqt_exec_callback_QsciLexerPostScript_EolFill(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerPostScript_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPostScript_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Font +func miqt_exec_callback_QsciLexerPostScript_Font(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPostScript_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_IndentationGuideView +func miqt_exec_callback_QsciLexerPostScript_IndentationGuideView(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPostScript_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPostScript_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Keywords +func miqt_exec_callback_QsciLexerPostScript_Keywords(self *C.QsciLexerPostScript, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPostScript_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultStyle(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPostScript_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPostScript) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPostScript_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Description +func miqt_exec_callback_QsciLexerPostScript_Description(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPostScript) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPostScript_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Paper +func miqt_exec_callback_QsciLexerPostScript_Paper(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPostScript_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultColorWithStyle(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPostScript_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPostScript) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPostScript_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultEolFill +func miqt_exec_callback_QsciLexerPostScript_DefaultEolFill(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerPostScript_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPostScript_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultFontWithStyle(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPostScript_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultPaperWithStyle(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPostScript_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPostScript) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPostScript_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetEditor +func miqt_exec_callback_QsciLexerPostScript_SetEditor(self *C.QsciLexerPostScript, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_RefreshProperties() { + + C.QsciLexerPostScript_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPostScript) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPostScript_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_RefreshProperties +func miqt_exec_callback_QsciLexerPostScript_RefreshProperties(self *C.QsciLexerPostScript, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPostScript) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPostScript_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPostScript_StyleBitsNeeded(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPostScript_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_WordCharacters +func miqt_exec_callback_QsciLexerPostScript_WordCharacters(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPostScript_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPostScript) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPostScript_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPostScript_SetAutoIndentStyle(self *C.QsciLexerPostScript, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerPostScript_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPostScript_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetColor +func miqt_exec_callback_QsciLexerPostScript_SetColor(self *C.QsciLexerPostScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPostScript_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPostScript_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetEolFill +func miqt_exec_callback_QsciLexerPostScript_SetEolFill(self *C.QsciLexerPostScript, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerPostScript_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerPostScript_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetFont +func miqt_exec_callback_QsciLexerPostScript_SetFont(self *C.QsciLexerPostScript, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerPostScript_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPostScript_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetPaper +func miqt_exec_callback_QsciLexerPostScript_SetPaper(self *C.QsciLexerPostScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPostScript_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPostScript) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPostScript_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_ReadProperties +func miqt_exec_callback_QsciLexerPostScript_ReadProperties(self *C.QsciLexerPostScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPostScript_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPostScript) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPostScript_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_WriteProperties +func miqt_exec_callback_QsciLexerPostScript_WriteProperties(self *C.QsciLexerPostScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPostScript) Delete() { - C.QsciLexerPostScript_Delete(this.h) + C.QsciLexerPostScript_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h index c1462ddc..22306d79 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPostScript; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPostScript QsciLexerPostScript; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPostScript* QsciLexerPostScript_new(); -QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent); +void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self); void* QsciLexerPostScript_Metacast(QsciLexerPostScript* self, const char* param1); struct miqt_string QsciLexerPostScript_Tr(const char* s); @@ -55,7 +61,83 @@ struct miqt_string QsciLexerPostScript_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPostScript_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerPostScript_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerPostScript_TrUtf83(const char* s, const char* c, int n); -void QsciLexerPostScript_Delete(QsciLexerPostScript* self); +void QsciLexerPostScript_override_virtual_SetTokenize(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetTokenize(void* self, bool tokenize); +void QsciLexerPostScript_override_virtual_SetLevel(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetLevel(void* self, int level); +void QsciLexerPostScript_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPostScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerPostScript_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_Language(const void* self); +void QsciLexerPostScript_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_Lexer(const void* self); +void QsciLexerPostScript_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_LexerId(const void* self); +void QsciLexerPostScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPostScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPostScript_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPostScript_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPostScript_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_BlockLookback(const void* self); +void QsciLexerPostScript_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPostScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPostScript_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_BraceStyle(const void* self); +void QsciLexerPostScript_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_CaseSensitive(const void* self); +void QsciLexerPostScript_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_Color(const void* self, int style); +void QsciLexerPostScript_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_EolFill(const void* self, int style); +void QsciLexerPostScript_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPostScript_virtualbase_Font(const void* self, int style); +void QsciLexerPostScript_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPostScript_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_Keywords(const void* self, int set); +void QsciLexerPostScript_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_DefaultStyle(const void* self); +void QsciLexerPostScript_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPostScript_virtualbase_Description(const void* self, int style); +void QsciLexerPostScript_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_Paper(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPostScript_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPostScript_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPostScript_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_RefreshProperties(void* self); +void QsciLexerPostScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPostScript_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_WordCharacters(const void* self); +void QsciLexerPostScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPostScript_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPostScript_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPostScript_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPostScript_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPostScript_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPostScript_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPostScript_Delete(QsciLexerPostScript* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp index 3bea52dc..04f75d24 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,918 @@ #include "gen_qscilexerpov.h" #include "_cgo_export.h" -QsciLexerPOV* QsciLexerPOV_new() { - return new QsciLexerPOV(); +class MiqtVirtualQsciLexerPOV : public virtual QsciLexerPOV { +public: + + MiqtVirtualQsciLexerPOV(): QsciLexerPOV() {}; + MiqtVirtualQsciLexerPOV(QObject* parent): QsciLexerPOV(parent) {}; + + virtual ~MiqtVirtualQsciLexerPOV() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPOV::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPOV_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPOV::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPOV::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPOV_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPOV::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldDirectives = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldDirectives(bool fold) override { + if (handle__SetFoldDirectives == 0) { + QsciLexerPOV::setFoldDirectives(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPOV_SetFoldDirectives(this, handle__SetFoldDirectives, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldDirectives(bool fold) { + + QsciLexerPOV::setFoldDirectives(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPOV::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPOV::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPOV::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPOV::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPOV::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPOV::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPOV::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPOV_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPOV::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPOV::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPOV::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPOV::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPOV::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPOV::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPOV::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPOV::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPOV::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPOV::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPOV::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPOV::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPOV::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPOV::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPOV::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPOV::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPOV::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPOV::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPOV_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPOV::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPOV::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPOV::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPOV::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPOV::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPOV::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPOV::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPOV_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPOV::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPOV::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPOV::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPOV::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPOV::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPOV::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPOV::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPOV::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPOV::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPOV::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPOV::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPOV_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPOV::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPOV::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPOV_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPOV::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPOV::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPOV::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPOV::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPOV::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPOV::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPOV_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPOV::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPOV::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPOV::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPOV::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPOV::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPOV::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPOV::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPOV::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPOV::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPOV::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPOV::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPOV::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPOV::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(); + *outptr_QsciLexerPOV = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPOV* QsciLexerPOV_new2(QObject* parent) { - return new QsciLexerPOV(parent); +void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(parent); + *outptr_QsciLexerPOV = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self) { @@ -166,7 +1074,299 @@ struct miqt_string QsciLexerPOV_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerPOV_Delete(QsciLexerPOV* self) { - delete self; +void QsciLexerPOV_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPOV_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPOV_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPOV_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPOV_override_virtual_SetFoldDirectives(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFoldDirectives = slot; +} + +void QsciLexerPOV_virtualbase_SetFoldDirectives(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFoldDirectives(fold); +} + +void QsciLexerPOV_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Language = slot; +} + +void QsciLexerPOV_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPOV_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPOV_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPOV_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPOV_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPOV_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPOV_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPOV_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPOV_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPOV_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPOV_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPOV_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPOV_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPOV_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPOV_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPOV_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPOV_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPOV_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPOV_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPOV_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPOV_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPOV_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPOV_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPOV_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPOV_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPOV_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPOV_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPOV_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPOV_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPOV_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPOV_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPOV_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPOV_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Description = slot; +} + +void QsciLexerPOV_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPOV_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPOV_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPOV_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPOV_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPOV_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPOV_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPOV_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPOV_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPOV_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPOV_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPOV_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPOV_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPOV_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPOV_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPOV_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPOV_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPOV_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPOV_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPOV_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPOV_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPOV_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPOV_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPOV_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPOV_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPOV_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPOV_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPOV_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPOV_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPOV_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPOV_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPOV_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPOV_Delete(QsciLexerPOV* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.go b/qt-restricted-extras/qscintilla/gen_qscilexerpov.go index e3f4a5f4..14111617 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -37,7 +38,8 @@ const ( ) type QsciLexerPOV struct { - h *C.QsciLexerPOV + h *C.QsciLexerPOV + isSubclass bool *QsciLexer } @@ -55,27 +57,47 @@ func (this *QsciLexerPOV) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPOV(h *C.QsciLexerPOV) *QsciLexerPOV { +// newQsciLexerPOV constructs the type using only CGO pointers. +func newQsciLexerPOV(h *C.QsciLexerPOV, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPOV { if h == nil { return nil } - return &QsciLexerPOV{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPOV{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPOV(h unsafe.Pointer) *QsciLexerPOV { - return newQsciLexerPOV((*C.QsciLexerPOV)(h)) +// UnsafeNewQsciLexerPOV constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPOV(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPOV { + if h == nil { + return nil + } + + return &QsciLexerPOV{h: (*C.QsciLexerPOV)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPOV constructs a new QsciLexerPOV object. func NewQsciLexerPOV() *QsciLexerPOV { - ret := C.QsciLexerPOV_new() - return newQsciLexerPOV(ret) + var outptr_QsciLexerPOV *C.QsciLexerPOV = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPOV_new(&outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPOV2 constructs a new QsciLexerPOV object. func NewQsciLexerPOV2(parent *qt.QObject) *QsciLexerPOV { - ret := C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPOV(ret) + var outptr_QsciLexerPOV *C.QsciLexerPOV = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPOV) MetaObject() *qt.QMetaObject { @@ -234,9 +256,963 @@ func QsciLexerPOV_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerPOV) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPOV_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPOV) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPOV_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFoldComments +func miqt_exec_callback_QsciLexerPOV_SetFoldComments(self *C.QsciLexerPOV, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPOV_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPOV) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPOV_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFoldCompact +func miqt_exec_callback_QsciLexerPOV_SetFoldCompact(self *C.QsciLexerPOV, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetFoldDirectives(fold bool) { + + C.QsciLexerPOV_virtualbase_SetFoldDirectives(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPOV) OnSetFoldDirectives(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPOV_override_virtual_SetFoldDirectives(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFoldDirectives +func miqt_exec_callback_QsciLexerPOV_SetFoldDirectives(self *C.QsciLexerPOV, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFoldDirectives, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_Language() string { + + _ret := C.QsciLexerPOV_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Language +func miqt_exec_callback_QsciLexerPOV_Language(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPOV_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnLexer(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Lexer +func miqt_exec_callback_QsciLexerPOV_Lexer(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPOV_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_LexerId +func miqt_exec_callback_QsciLexerPOV_LexerId(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPOV_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPOV_AutoCompletionFillups(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPOV_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPOV) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPOV_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPOV_AutoCompletionWordSeparators(self *C.QsciLexerPOV, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPOV_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPOV_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockEnd +func miqt_exec_callback_QsciLexerPOV_BlockEnd(self *C.QsciLexerPOV, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPOV_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockLookback +func miqt_exec_callback_QsciLexerPOV_BlockLookback(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPOV_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPOV_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockStart +func miqt_exec_callback_QsciLexerPOV_BlockStart(self *C.QsciLexerPOV, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPOV_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPOV_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockStartKeyword +func miqt_exec_callback_QsciLexerPOV_BlockStartKeyword(self *C.QsciLexerPOV, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPOV_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BraceStyle +func miqt_exec_callback_QsciLexerPOV_BraceStyle(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPOV_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPOV_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_CaseSensitive +func miqt_exec_callback_QsciLexerPOV_CaseSensitive(self *C.QsciLexerPOV, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerPOV_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPOV_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Color +func miqt_exec_callback_QsciLexerPOV_Color(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPOV_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPOV) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPOV_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_EolFill +func miqt_exec_callback_QsciLexerPOV_EolFill(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerPOV_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPOV_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Font +func miqt_exec_callback_QsciLexerPOV_Font(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPOV_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_IndentationGuideView +func miqt_exec_callback_QsciLexerPOV_IndentationGuideView(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPOV_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPOV_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Keywords +func miqt_exec_callback_QsciLexerPOV_Keywords(self *C.QsciLexerPOV, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPOV_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultStyle +func miqt_exec_callback_QsciLexerPOV_DefaultStyle(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPOV_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPOV) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPOV_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Description +func miqt_exec_callback_QsciLexerPOV_Description(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPOV) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerPOV_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPOV_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Paper +func miqt_exec_callback_QsciLexerPOV_Paper(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPOV_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPOV_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPOV_DefaultColorWithStyle(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPOV_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPOV) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPOV_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultEolFill +func miqt_exec_callback_QsciLexerPOV_DefaultEolFill(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerPOV_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPOV_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPOV_DefaultFontWithStyle(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPOV_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPOV_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPOV_DefaultPaperWithStyle(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPOV_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPOV) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPOV_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetEditor +func miqt_exec_callback_QsciLexerPOV_SetEditor(self *C.QsciLexerPOV, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_RefreshProperties() { + + C.QsciLexerPOV_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPOV) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPOV_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_RefreshProperties +func miqt_exec_callback_QsciLexerPOV_RefreshProperties(self *C.QsciLexerPOV, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPOV) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPOV_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPOV_StyleBitsNeeded(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPOV_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_WordCharacters +func miqt_exec_callback_QsciLexerPOV_WordCharacters(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPOV_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPOV) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPOV_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPOV_SetAutoIndentStyle(self *C.QsciLexerPOV, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerPOV_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPOV_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetColor +func miqt_exec_callback_QsciLexerPOV_SetColor(self *C.QsciLexerPOV, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPOV_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPOV_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetEolFill +func miqt_exec_callback_QsciLexerPOV_SetEolFill(self *C.QsciLexerPOV, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerPOV_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerPOV_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFont +func miqt_exec_callback_QsciLexerPOV_SetFont(self *C.QsciLexerPOV, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerPOV_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPOV_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetPaper +func miqt_exec_callback_QsciLexerPOV_SetPaper(self *C.QsciLexerPOV, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPOV_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPOV) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPOV_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_ReadProperties +func miqt_exec_callback_QsciLexerPOV_ReadProperties(self *C.QsciLexerPOV, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPOV_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPOV) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPOV_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_WriteProperties +func miqt_exec_callback_QsciLexerPOV_WriteProperties(self *C.QsciLexerPOV, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPOV) Delete() { - C.QsciLexerPOV_Delete(this.h) + C.QsciLexerPOV_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.h b/qt-restricted-extras/qscintilla/gen_qscilexerpov.h index 1fb94b35..75835fae 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPOV; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPOV QsciLexerPOV; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPOV* QsciLexerPOV_new(); -QsciLexerPOV* QsciLexerPOV_new2(QObject* parent); +void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self); void* QsciLexerPOV_Metacast(QsciLexerPOV* self, const char* param1); struct miqt_string QsciLexerPOV_Tr(const char* s); @@ -55,7 +61,81 @@ struct miqt_string QsciLexerPOV_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPOV_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerPOV_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerPOV_TrUtf83(const char* s, const char* c, int n); -void QsciLexerPOV_Delete(QsciLexerPOV* self); +void QsciLexerPOV_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPOV_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPOV_override_virtual_SetFoldDirectives(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFoldDirectives(void* self, bool fold); +void QsciLexerPOV_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_Language(const void* self); +void QsciLexerPOV_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_Lexer(const void* self); +void QsciLexerPOV_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_LexerId(const void* self); +void QsciLexerPOV_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPOV_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPOV_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPOV_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPOV_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_BlockLookback(const void* self); +void QsciLexerPOV_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPOV_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPOV_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_BraceStyle(const void* self); +void QsciLexerPOV_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_CaseSensitive(const void* self); +void QsciLexerPOV_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_Color(const void* self, int style); +void QsciLexerPOV_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_EolFill(const void* self, int style); +void QsciLexerPOV_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPOV_virtualbase_Font(const void* self, int style); +void QsciLexerPOV_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPOV_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_Keywords(const void* self, int set); +void QsciLexerPOV_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_DefaultStyle(const void* self); +void QsciLexerPOV_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPOV_virtualbase_Description(const void* self, int style); +void QsciLexerPOV_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_Paper(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPOV_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPOV_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPOV_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_RefreshProperties(void* self); +void QsciLexerPOV_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPOV_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_WordCharacters(const void* self); +void QsciLexerPOV_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPOV_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPOV_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPOV_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPOV_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPOV_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPOV_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPOV_Delete(QsciLexerPOV* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp index 1d21ebdf..88d230c7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexerproperties.h" #include "_cgo_export.h" -QsciLexerProperties* QsciLexerProperties_new() { - return new QsciLexerProperties(); +class MiqtVirtualQsciLexerProperties : public virtual QsciLexerProperties { +public: + + MiqtVirtualQsciLexerProperties(): QsciLexerProperties() {}; + MiqtVirtualQsciLexerProperties(QObject* parent): QsciLexerProperties(parent) {}; + + virtual ~MiqtVirtualQsciLexerProperties() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerProperties::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerProperties_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerProperties::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerProperties::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerProperties::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerProperties::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerProperties::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerProperties::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerProperties::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerProperties::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerProperties_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerProperties::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerProperties::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerProperties::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerProperties::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerProperties::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerProperties::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerProperties::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerProperties::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerProperties::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerProperties::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerProperties::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerProperties::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerProperties::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerProperties::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerProperties::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerProperties::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerProperties::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerProperties::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerProperties_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerProperties::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerProperties::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerProperties::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerProperties::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerProperties::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerProperties::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerProperties::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerProperties_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerProperties::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerProperties::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerProperties::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerProperties::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerProperties::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerProperties::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerProperties::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerProperties::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerProperties::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerProperties::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerProperties::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerProperties_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerProperties::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerProperties::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerProperties_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerProperties::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerProperties::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerProperties::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerProperties::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerProperties::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerProperties::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerProperties_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerProperties::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerProperties::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerProperties::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerProperties::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerProperties::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerProperties::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerProperties::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerProperties::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerProperties::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerProperties::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerProperties::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerProperties::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerProperties::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(); + *outptr_QsciLexerProperties = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerProperties* QsciLexerProperties_new2(QObject* parent) { - return new QsciLexerProperties(parent); +void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(parent); + *outptr_QsciLexerProperties = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self) { @@ -150,7 +1010,283 @@ struct miqt_string QsciLexerProperties_TrUtf83(const char* s, const char* c, int return _ms; } -void QsciLexerProperties_Delete(QsciLexerProperties* self) { - delete self; +void QsciLexerProperties_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerProperties_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerProperties_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Language = slot; +} + +void QsciLexerProperties_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerProperties_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerProperties_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__LexerId = slot; +} + +int QsciLexerProperties_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerProperties_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerProperties_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerProperties_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerProperties_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerProperties_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerProperties_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerProperties_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerProperties_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerProperties_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerProperties_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerProperties_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerProperties_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerProperties_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerProperties_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerProperties_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerProperties_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerProperties_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerProperties_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Color(style); +} + +void QsciLexerProperties_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerProperties_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerProperties_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerProperties_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Font(style); +} + +void QsciLexerProperties_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerProperties_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerProperties_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerProperties_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerProperties_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerProperties_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerProperties_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Description = slot; +} + +void QsciLexerProperties_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerProperties_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerProperties_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerProperties_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerProperties_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerProperties_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerProperties_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerProperties_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerProperties_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerProperties_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerProperties_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerProperties_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerProperties_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerProperties_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerProperties_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerProperties_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerProperties_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerProperties_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerProperties_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerProperties_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerProperties_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetColor = slot; +} + +void QsciLexerProperties_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerProperties_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerProperties_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerProperties_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetFont = slot; +} + +void QsciLexerProperties_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerProperties_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerProperties_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerProperties_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerProperties_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerProperties_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerProperties_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerProperties_Delete(QsciLexerProperties* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go index 3854ff4e..547bec10 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -26,7 +27,8 @@ const ( ) type QsciLexerProperties struct { - h *C.QsciLexerProperties + h *C.QsciLexerProperties + isSubclass bool *QsciLexer } @@ -44,27 +46,47 @@ func (this *QsciLexerProperties) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerProperties(h *C.QsciLexerProperties) *QsciLexerProperties { +// newQsciLexerProperties constructs the type using only CGO pointers. +func newQsciLexerProperties(h *C.QsciLexerProperties, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerProperties { if h == nil { return nil } - return &QsciLexerProperties{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerProperties{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerProperties(h unsafe.Pointer) *QsciLexerProperties { - return newQsciLexerProperties((*C.QsciLexerProperties)(h)) +// UnsafeNewQsciLexerProperties constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerProperties(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerProperties { + if h == nil { + return nil + } + + return &QsciLexerProperties{h: (*C.QsciLexerProperties)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerProperties constructs a new QsciLexerProperties object. func NewQsciLexerProperties() *QsciLexerProperties { - ret := C.QsciLexerProperties_new() - return newQsciLexerProperties(ret) + var outptr_QsciLexerProperties *C.QsciLexerProperties = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerProperties_new(&outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerProperties2 constructs a new QsciLexerProperties object. func NewQsciLexerProperties2(parent *qt.QObject) *QsciLexerProperties { - ret := C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerProperties(ret) + var outptr_QsciLexerProperties *C.QsciLexerProperties = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerProperties) MetaObject() *qt.QMetaObject { @@ -206,9 +228,917 @@ func QsciLexerProperties_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerProperties) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerProperties_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerProperties) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerProperties_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetFoldCompact +func miqt_exec_callback_QsciLexerProperties_SetFoldCompact(self *C.QsciLexerProperties, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerProperties) callVirtualBase_Language() string { + + _ret := C.QsciLexerProperties_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnLanguage(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Language +func miqt_exec_callback_QsciLexerProperties_Language(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerProperties_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnLexer(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Lexer +func miqt_exec_callback_QsciLexerProperties_Lexer(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerProperties_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnLexerId(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_LexerId +func miqt_exec_callback_QsciLexerProperties_LexerId(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerProperties_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_AutoCompletionFillups +func miqt_exec_callback_QsciLexerProperties_AutoCompletionFillups(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerProperties_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerProperties) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerProperties_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerProperties_AutoCompletionWordSeparators(self *C.QsciLexerProperties, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerProperties_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerProperties_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockEnd +func miqt_exec_callback_QsciLexerProperties_BlockEnd(self *C.QsciLexerProperties, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerProperties_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockLookback +func miqt_exec_callback_QsciLexerProperties_BlockLookback(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerProperties_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerProperties_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockStart +func miqt_exec_callback_QsciLexerProperties_BlockStart(self *C.QsciLexerProperties, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerProperties_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerProperties_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockStartKeyword +func miqt_exec_callback_QsciLexerProperties_BlockStartKeyword(self *C.QsciLexerProperties, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerProperties_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BraceStyle +func miqt_exec_callback_QsciLexerProperties_BraceStyle(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerProperties_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerProperties_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_CaseSensitive +func miqt_exec_callback_QsciLexerProperties_CaseSensitive(self *C.QsciLexerProperties, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerProperties_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerProperties_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Color +func miqt_exec_callback_QsciLexerProperties_Color(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerProperties_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerProperties) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerProperties_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_EolFill +func miqt_exec_callback_QsciLexerProperties_EolFill(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerProperties_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerProperties_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Font +func miqt_exec_callback_QsciLexerProperties_Font(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerProperties_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_IndentationGuideView +func miqt_exec_callback_QsciLexerProperties_IndentationGuideView(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerProperties_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerProperties_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Keywords +func miqt_exec_callback_QsciLexerProperties_Keywords(self *C.QsciLexerProperties, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerProperties_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultStyle +func miqt_exec_callback_QsciLexerProperties_DefaultStyle(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerProperties_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerProperties) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerProperties_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Description +func miqt_exec_callback_QsciLexerProperties_Description(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerProperties) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerProperties_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerProperties_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Paper +func miqt_exec_callback_QsciLexerProperties_Paper(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerProperties_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerProperties_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerProperties_DefaultColorWithStyle(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerProperties_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerProperties) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerProperties_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultEolFill +func miqt_exec_callback_QsciLexerProperties_DefaultEolFill(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerProperties_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerProperties_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerProperties_DefaultFontWithStyle(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerProperties_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerProperties_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerProperties_DefaultPaperWithStyle(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerProperties_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerProperties) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerProperties_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetEditor +func miqt_exec_callback_QsciLexerProperties_SetEditor(self *C.QsciLexerProperties, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerProperties) callVirtualBase_RefreshProperties() { + + C.QsciLexerProperties_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerProperties) OnRefreshProperties(slot func(super func())) { + C.QsciLexerProperties_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_RefreshProperties +func miqt_exec_callback_QsciLexerProperties_RefreshProperties(self *C.QsciLexerProperties, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerProperties) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerProperties_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_StyleBitsNeeded +func miqt_exec_callback_QsciLexerProperties_StyleBitsNeeded(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerProperties_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_WordCharacters +func miqt_exec_callback_QsciLexerProperties_WordCharacters(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerProperties_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerProperties) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerProperties_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerProperties_SetAutoIndentStyle(self *C.QsciLexerProperties, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerProperties_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerProperties_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetColor +func miqt_exec_callback_QsciLexerProperties_SetColor(self *C.QsciLexerProperties, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerProperties_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerProperties_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetEolFill +func miqt_exec_callback_QsciLexerProperties_SetEolFill(self *C.QsciLexerProperties, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerProperties_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerProperties_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetFont +func miqt_exec_callback_QsciLexerProperties_SetFont(self *C.QsciLexerProperties, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerProperties_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerProperties_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetPaper +func miqt_exec_callback_QsciLexerProperties_SetPaper(self *C.QsciLexerProperties, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerProperties_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerProperties) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerProperties_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_ReadProperties +func miqt_exec_callback_QsciLexerProperties_ReadProperties(self *C.QsciLexerProperties, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerProperties_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerProperties) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerProperties_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_WriteProperties +func miqt_exec_callback_QsciLexerProperties_WriteProperties(self *C.QsciLexerProperties, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerProperties) Delete() { - C.QsciLexerProperties_Delete(this.h) + C.QsciLexerProperties_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h index 33b1dc01..b5a7068f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerProperties; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerProperties QsciLexerProperties; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerProperties* QsciLexerProperties_new(); -QsciLexerProperties* QsciLexerProperties_new2(QObject* parent); +void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self); void* QsciLexerProperties_Metacast(QsciLexerProperties* self, const char* param1); struct miqt_string QsciLexerProperties_Tr(const char* s); @@ -51,7 +57,77 @@ struct miqt_string QsciLexerProperties_Tr2(const char* s, const char* c); struct miqt_string QsciLexerProperties_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerProperties_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerProperties_TrUtf83(const char* s, const char* c, int n); -void QsciLexerProperties_Delete(QsciLexerProperties* self); +void QsciLexerProperties_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerProperties_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_Language(const void* self); +void QsciLexerProperties_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_Lexer(const void* self); +void QsciLexerProperties_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_LexerId(const void* self); +void QsciLexerProperties_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerProperties_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerProperties_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerProperties_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerProperties_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_BlockLookback(const void* self); +void QsciLexerProperties_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerProperties_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerProperties_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_BraceStyle(const void* self); +void QsciLexerProperties_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_CaseSensitive(const void* self); +void QsciLexerProperties_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_Color(const void* self, int style); +void QsciLexerProperties_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_EolFill(const void* self, int style); +void QsciLexerProperties_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerProperties_virtualbase_Font(const void* self, int style); +void QsciLexerProperties_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_IndentationGuideView(const void* self); +void QsciLexerProperties_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_Keywords(const void* self, int set); +void QsciLexerProperties_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_DefaultStyle(const void* self); +void QsciLexerProperties_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerProperties_virtualbase_Description(const void* self, int style); +void QsciLexerProperties_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_Paper(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerProperties_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerProperties_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerProperties_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_RefreshProperties(void* self); +void QsciLexerProperties_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerProperties_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_WordCharacters(const void* self); +void QsciLexerProperties_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerProperties_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerProperties_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerProperties_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerProperties_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerProperties_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerProperties_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerProperties_Delete(QsciLexerProperties* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp index 8173262c..1ee8230b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,919 @@ #include "gen_qscilexerpython.h" #include "_cgo_export.h" -QsciLexerPython* QsciLexerPython_new() { - return new QsciLexerPython(); +class MiqtVirtualQsciLexerPython : public virtual QsciLexerPython { +public: + + MiqtVirtualQsciLexerPython(): QsciLexerPython() {}; + MiqtVirtualQsciLexerPython(QObject* parent): QsciLexerPython(parent) {}; + + virtual ~MiqtVirtualQsciLexerPython() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPython::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPython::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPython::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPython_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPython::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldQuotes = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldQuotes(bool fold) override { + if (handle__SetFoldQuotes == 0) { + QsciLexerPython::setFoldQuotes(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPython_SetFoldQuotes(this, handle__SetFoldQuotes, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldQuotes(bool fold) { + + QsciLexerPython::setFoldQuotes(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationWarning = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationWarning(QsciLexerPython::IndentationWarning warn) override { + if (handle__SetIndentationWarning == 0) { + QsciLexerPython::setIndentationWarning(warn); + return; + } + + QsciLexerPython::IndentationWarning warn_ret = warn; + int sigval1 = static_cast(warn_ret); + + miqt_exec_callback_QsciLexerPython_SetIndentationWarning(this, handle__SetIndentationWarning, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationWarning(int warn) { + + QsciLexerPython::setIndentationWarning(static_cast(warn)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPython::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPython::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPython::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPython::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPython::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPython::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPython::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPython_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPython::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPython::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPython::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPython::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPython::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPython::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPython::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPython::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPython::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPython::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPython::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPython::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPython::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPython::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPython::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPython::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPython::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPython::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPython_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPython::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPython::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPython::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPython::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPython::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPython_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPython::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPython::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPython::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPython::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPython::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPython::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPython::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPython::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPython::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPython::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPython::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPython_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPython::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPython::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPython_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPython::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPython::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPython::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPython::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPython::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPython::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPython_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPython::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPython::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPython::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPython::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPython::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPython::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPython::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPython::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPython::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPython::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPython::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPython::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPython::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(); + *outptr_QsciLexerPython = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPython* QsciLexerPython_new2(QObject* parent) { - return new QsciLexerPython(parent); +void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(parent); + *outptr_QsciLexerPython = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self) { @@ -248,7 +1156,299 @@ const char* QsciLexerPython_BlockStart1(const QsciLexerPython* self, int* style) return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerPython_Delete(QsciLexerPython* self) { - delete self; +void QsciLexerPython_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPython_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPython_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPython_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPython_override_virtual_SetFoldQuotes(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetFoldQuotes = slot; +} + +void QsciLexerPython_virtualbase_SetFoldQuotes(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetFoldQuotes(fold); +} + +void QsciLexerPython_override_virtual_SetIndentationWarning(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetIndentationWarning = slot; +} + +void QsciLexerPython_virtualbase_SetIndentationWarning(void* self, int warn) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetIndentationWarning(warn); +} + +void QsciLexerPython_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Language = slot; +} + +void QsciLexerPython_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPython_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPython_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPython_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPython_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPython_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPython_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPython_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPython_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPython_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPython_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPython_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPython_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPython_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPython_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPython_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPython_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPython_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPython_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPython_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPython_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPython_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPython_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPython_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPython_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPython_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPython_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPython_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPython_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPython_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPython_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Description = slot; +} + +void QsciLexerPython_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPython_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPython_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPython_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPython_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPython_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPython_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPython_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPython_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPython_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPython_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPython_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPython_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPython_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPython_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPython_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPython_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPython_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPython_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPython_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPython_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPython_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPython_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPython_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPython_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPython_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPython_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPython_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPython_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPython_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPython_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPython_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPython_Delete(QsciLexerPython* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.go b/qt-restricted-extras/qscintilla/gen_qscilexerpython.go index 6c4b88d0..b228a79c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -50,7 +51,8 @@ const ( ) type QsciLexerPython struct { - h *C.QsciLexerPython + h *C.QsciLexerPython + isSubclass bool *QsciLexer } @@ -68,27 +70,47 @@ func (this *QsciLexerPython) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPython(h *C.QsciLexerPython) *QsciLexerPython { +// newQsciLexerPython constructs the type using only CGO pointers. +func newQsciLexerPython(h *C.QsciLexerPython, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPython { if h == nil { return nil } - return &QsciLexerPython{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPython{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPython(h unsafe.Pointer) *QsciLexerPython { - return newQsciLexerPython((*C.QsciLexerPython)(h)) +// UnsafeNewQsciLexerPython constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPython(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPython { + if h == nil { + return nil + } + + return &QsciLexerPython{h: (*C.QsciLexerPython)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPython constructs a new QsciLexerPython object. func NewQsciLexerPython() *QsciLexerPython { - ret := C.QsciLexerPython_new() - return newQsciLexerPython(ret) + var outptr_QsciLexerPython *C.QsciLexerPython = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPython_new(&outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPython2 constructs a new QsciLexerPython object. func NewQsciLexerPython2(parent *qt.QObject) *QsciLexerPython { - ret := C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPython(ret) + var outptr_QsciLexerPython *C.QsciLexerPython = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPython) MetaObject() *qt.QMetaObject { @@ -321,9 +343,963 @@ func (this *QsciLexerPython) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerPython) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPython_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_IndentationGuideView +func miqt_exec_callback_QsciLexerPython_IndentationGuideView(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPython_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPython) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPython_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetFoldComments +func miqt_exec_callback_QsciLexerPython_SetFoldComments(self *C.QsciLexerPython, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_SetFoldQuotes(fold bool) { + + C.QsciLexerPython_virtualbase_SetFoldQuotes(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPython) OnSetFoldQuotes(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPython_override_virtual_SetFoldQuotes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetFoldQuotes +func miqt_exec_callback_QsciLexerPython_SetFoldQuotes(self *C.QsciLexerPython, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetFoldQuotes, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_SetIndentationWarning(warn QsciLexerPython__IndentationWarning) { + + C.QsciLexerPython_virtualbase_SetIndentationWarning(unsafe.Pointer(this.h), (C.int)(warn)) + +} +func (this *QsciLexerPython) OnSetIndentationWarning(slot func(super func(warn QsciLexerPython__IndentationWarning), warn QsciLexerPython__IndentationWarning)) { + C.QsciLexerPython_override_virtual_SetIndentationWarning(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetIndentationWarning +func miqt_exec_callback_QsciLexerPython_SetIndentationWarning(self *C.QsciLexerPython, cb C.intptr_t, warn C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(warn QsciLexerPython__IndentationWarning), warn QsciLexerPython__IndentationWarning)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciLexerPython__IndentationWarning)(warn) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetIndentationWarning, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_Language() string { + + _ret := C.QsciLexerPython_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Language +func miqt_exec_callback_QsciLexerPython_Language(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPython_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnLexer(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Lexer +func miqt_exec_callback_QsciLexerPython_Lexer(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPython_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_LexerId +func miqt_exec_callback_QsciLexerPython_LexerId(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPython_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPython_AutoCompletionFillups(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPython_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPython) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPython_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPython_AutoCompletionWordSeparators(self *C.QsciLexerPython, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPython) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPython_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPython_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockEnd +func miqt_exec_callback_QsciLexerPython_BlockEnd(self *C.QsciLexerPython, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPython_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockLookback +func miqt_exec_callback_QsciLexerPython_BlockLookback(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPython_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPython_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockStart +func miqt_exec_callback_QsciLexerPython_BlockStart(self *C.QsciLexerPython, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPython_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPython_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockStartKeyword +func miqt_exec_callback_QsciLexerPython_BlockStartKeyword(self *C.QsciLexerPython, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPython_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BraceStyle +func miqt_exec_callback_QsciLexerPython_BraceStyle(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPython_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPython_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_CaseSensitive +func miqt_exec_callback_QsciLexerPython_CaseSensitive(self *C.QsciLexerPython, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerPython_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPython_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Color +func miqt_exec_callback_QsciLexerPython_Color(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPython_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPython) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPython_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_EolFill +func miqt_exec_callback_QsciLexerPython_EolFill(self *C.QsciLexerPython, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerPython_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPython_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Font +func miqt_exec_callback_QsciLexerPython_Font(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPython_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPython_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Keywords +func miqt_exec_callback_QsciLexerPython_Keywords(self *C.QsciLexerPython, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPython_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultStyle +func miqt_exec_callback_QsciLexerPython_DefaultStyle(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPython_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPython) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPython_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Description +func miqt_exec_callback_QsciLexerPython_Description(self *C.QsciLexerPython, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPython) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerPython_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPython_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Paper +func miqt_exec_callback_QsciLexerPython_Paper(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPython_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPython_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPython_DefaultColorWithStyle(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPython_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPython) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPython_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultEolFill +func miqt_exec_callback_QsciLexerPython_DefaultEolFill(self *C.QsciLexerPython, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerPython_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerPython_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPython_DefaultFontWithStyle(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerPython_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerPython_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPython_DefaultPaperWithStyle(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPython_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPython) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPython_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetEditor +func miqt_exec_callback_QsciLexerPython_SetEditor(self *C.QsciLexerPython, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_RefreshProperties() { + + C.QsciLexerPython_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPython) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPython_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_RefreshProperties +func miqt_exec_callback_QsciLexerPython_RefreshProperties(self *C.QsciLexerPython, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPython) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPython_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPython_StyleBitsNeeded(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPython_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_WordCharacters +func miqt_exec_callback_QsciLexerPython_WordCharacters(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPython_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPython) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPython_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPython_SetAutoIndentStyle(self *C.QsciLexerPython, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerPython_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPython_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetColor +func miqt_exec_callback_QsciLexerPython_SetColor(self *C.QsciLexerPython, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPython_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPython_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetEolFill +func miqt_exec_callback_QsciLexerPython_SetEolFill(self *C.QsciLexerPython, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerPython_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerPython_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetFont +func miqt_exec_callback_QsciLexerPython_SetFont(self *C.QsciLexerPython, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerPython_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerPython_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetPaper +func miqt_exec_callback_QsciLexerPython_SetPaper(self *C.QsciLexerPython, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPython_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPython) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPython_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_ReadProperties +func miqt_exec_callback_QsciLexerPython_ReadProperties(self *C.QsciLexerPython, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPython_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPython) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerPython_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_WriteProperties +func miqt_exec_callback_QsciLexerPython_WriteProperties(self *C.QsciLexerPython, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPython) Delete() { - C.QsciLexerPython_Delete(this.h) + C.QsciLexerPython_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.h b/qt-restricted-extras/qscintilla/gen_qscilexerpython.h index d9b8d10b..febe4af6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPython; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPython QsciLexerPython; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPython* QsciLexerPython_new(); -QsciLexerPython* QsciLexerPython_new2(QObject* parent); +void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self); void* QsciLexerPython_Metacast(QsciLexerPython* self, const char* param1); struct miqt_string QsciLexerPython_Tr(const char* s); @@ -71,7 +77,81 @@ struct miqt_string QsciLexerPython_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerPython_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerPython_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerPython_BlockStart1(const QsciLexerPython* self, int* style); -void QsciLexerPython_Delete(QsciLexerPython* self); +void QsciLexerPython_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPython_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPython_override_virtual_SetFoldQuotes(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetFoldQuotes(void* self, bool fold); +void QsciLexerPython_override_virtual_SetIndentationWarning(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetIndentationWarning(void* self, int warn); +void QsciLexerPython_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_Language(const void* self); +void QsciLexerPython_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_Lexer(const void* self); +void QsciLexerPython_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_LexerId(const void* self); +void QsciLexerPython_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPython_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPython_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPython_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPython_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_BlockLookback(const void* self); +void QsciLexerPython_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPython_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPython_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_BraceStyle(const void* self); +void QsciLexerPython_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_CaseSensitive(const void* self); +void QsciLexerPython_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_Color(const void* self, int style); +void QsciLexerPython_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_EolFill(const void* self, int style); +void QsciLexerPython_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPython_virtualbase_Font(const void* self, int style); +void QsciLexerPython_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_Keywords(const void* self, int set); +void QsciLexerPython_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_DefaultStyle(const void* self); +void QsciLexerPython_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPython_virtualbase_Description(const void* self, int style); +void QsciLexerPython_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_Paper(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPython_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPython_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPython_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_RefreshProperties(void* self); +void QsciLexerPython_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPython_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_WordCharacters(const void* self); +void QsciLexerPython_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPython_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPython_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPython_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPython_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPython_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPython_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPython_Delete(QsciLexerPython* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp index 809e9c11..2724d402 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerruby.h" #include "_cgo_export.h" -QsciLexerRuby* QsciLexerRuby_new() { - return new QsciLexerRuby(); +class MiqtVirtualQsciLexerRuby : public virtual QsciLexerRuby { +public: + + MiqtVirtualQsciLexerRuby(): QsciLexerRuby() {}; + MiqtVirtualQsciLexerRuby(QObject* parent): QsciLexerRuby(parent) {}; + + virtual ~MiqtVirtualQsciLexerRuby() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerRuby::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerRuby::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerRuby::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerRuby::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerRuby::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerRuby::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerRuby::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerRuby_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerRuby::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerRuby::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerRuby::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerRuby::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerRuby::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerRuby::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerRuby::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerRuby::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerRuby::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerRuby::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerRuby::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerRuby::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerRuby::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerRuby::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerRuby::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerRuby::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerRuby::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerRuby::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerRuby_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerRuby::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerRuby::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerRuby::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerRuby::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerRuby::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerRuby::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerRuby::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerRuby_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerRuby::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerRuby::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerRuby::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerRuby::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerRuby::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerRuby::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerRuby::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerRuby::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerRuby::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerRuby::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerRuby::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerRuby_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerRuby::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerRuby::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerRuby_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerRuby::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerRuby::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerRuby::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerRuby::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerRuby::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerRuby::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerRuby_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerRuby::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerRuby::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerRuby::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerRuby::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerRuby::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerRuby::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerRuby::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerRuby::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerRuby::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerRuby::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerRuby::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerRuby::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerRuby::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(); + *outptr_QsciLexerRuby = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerRuby* QsciLexerRuby_new2(QObject* parent) { - return new QsciLexerRuby(parent); +void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(parent); + *outptr_QsciLexerRuby = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self) { @@ -178,7 +1014,275 @@ const char* QsciLexerRuby_BlockStartKeyword1(const QsciLexerRuby* self, int* sty return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerRuby_Delete(QsciLexerRuby* self) { - delete self; +void QsciLexerRuby_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Language = slot; +} + +void QsciLexerRuby_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerRuby_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerRuby_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__LexerId = slot; +} + +int QsciLexerRuby_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerRuby_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerRuby_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerRuby_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerRuby_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerRuby_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerRuby_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerRuby_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerRuby_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerRuby_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerRuby_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerRuby_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerRuby_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerRuby_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerRuby_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerRuby_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerRuby_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerRuby_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerRuby_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Color(style); +} + +void QsciLexerRuby_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerRuby_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerRuby_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerRuby_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Font(style); +} + +void QsciLexerRuby_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerRuby_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerRuby_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerRuby_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerRuby_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerRuby_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerRuby_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Description = slot; +} + +void QsciLexerRuby_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerRuby_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerRuby_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerRuby_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerRuby_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerRuby_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerRuby_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerRuby_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerRuby_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerRuby_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerRuby_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerRuby_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerRuby_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerRuby_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerRuby_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerRuby_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerRuby_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerRuby_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerRuby_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerRuby_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerRuby_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetColor = slot; +} + +void QsciLexerRuby_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerRuby_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerRuby_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerRuby_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetFont = slot; +} + +void QsciLexerRuby_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerRuby_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerRuby_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerRuby_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerRuby_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerRuby_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerRuby_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerRuby_Delete(QsciLexerRuby* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.go b/qt-restricted-extras/qscintilla/gen_qscilexerruby.go index 743a828f..8f3783ad 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -51,7 +52,8 @@ const ( ) type QsciLexerRuby struct { - h *C.QsciLexerRuby + h *C.QsciLexerRuby + isSubclass bool *QsciLexer } @@ -69,27 +71,47 @@ func (this *QsciLexerRuby) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerRuby(h *C.QsciLexerRuby) *QsciLexerRuby { +// newQsciLexerRuby constructs the type using only CGO pointers. +func newQsciLexerRuby(h *C.QsciLexerRuby, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerRuby { if h == nil { return nil } - return &QsciLexerRuby{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerRuby{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerRuby(h unsafe.Pointer) *QsciLexerRuby { - return newQsciLexerRuby((*C.QsciLexerRuby)(h)) +// UnsafeNewQsciLexerRuby constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerRuby(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerRuby { + if h == nil { + return nil + } + + return &QsciLexerRuby{h: (*C.QsciLexerRuby)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerRuby constructs a new QsciLexerRuby object. func NewQsciLexerRuby() *QsciLexerRuby { - ret := C.QsciLexerRuby_new() - return newQsciLexerRuby(ret) + var outptr_QsciLexerRuby *C.QsciLexerRuby = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerRuby_new(&outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerRuby2 constructs a new QsciLexerRuby object. func NewQsciLexerRuby2(parent *qt.QObject) *QsciLexerRuby { - ret := C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerRuby(ret) + var outptr_QsciLexerRuby *C.QsciLexerRuby = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerRuby) MetaObject() *qt.QMetaObject { @@ -265,9 +287,894 @@ func (this *QsciLexerRuby) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerRuby) callVirtualBase_Language() string { + + _ret := C.QsciLexerRuby_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnLanguage(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Language +func miqt_exec_callback_QsciLexerRuby_Language(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerRuby_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnLexer(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Lexer +func miqt_exec_callback_QsciLexerRuby_Lexer(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerRuby_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnLexerId(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_LexerId +func miqt_exec_callback_QsciLexerRuby_LexerId(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerRuby_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_AutoCompletionFillups +func miqt_exec_callback_QsciLexerRuby_AutoCompletionFillups(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerRuby_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerRuby) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerRuby_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerRuby_AutoCompletionWordSeparators(self *C.QsciLexerRuby, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerRuby_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerRuby_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockEnd +func miqt_exec_callback_QsciLexerRuby_BlockEnd(self *C.QsciLexerRuby, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerRuby_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockLookback +func miqt_exec_callback_QsciLexerRuby_BlockLookback(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerRuby_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerRuby_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockStart +func miqt_exec_callback_QsciLexerRuby_BlockStart(self *C.QsciLexerRuby, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerRuby_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerRuby_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockStartKeyword +func miqt_exec_callback_QsciLexerRuby_BlockStartKeyword(self *C.QsciLexerRuby, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerRuby_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BraceStyle +func miqt_exec_callback_QsciLexerRuby_BraceStyle(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerRuby_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerRuby_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_CaseSensitive +func miqt_exec_callback_QsciLexerRuby_CaseSensitive(self *C.QsciLexerRuby, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerRuby_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerRuby_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Color +func miqt_exec_callback_QsciLexerRuby_Color(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerRuby_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerRuby) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerRuby_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_EolFill +func miqt_exec_callback_QsciLexerRuby_EolFill(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerRuby_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerRuby_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Font +func miqt_exec_callback_QsciLexerRuby_Font(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerRuby_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_IndentationGuideView +func miqt_exec_callback_QsciLexerRuby_IndentationGuideView(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerRuby_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerRuby_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Keywords +func miqt_exec_callback_QsciLexerRuby_Keywords(self *C.QsciLexerRuby, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerRuby_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultStyle +func miqt_exec_callback_QsciLexerRuby_DefaultStyle(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerRuby_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerRuby) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerRuby_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Description +func miqt_exec_callback_QsciLexerRuby_Description(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerRuby) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerRuby_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerRuby_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Paper +func miqt_exec_callback_QsciLexerRuby_Paper(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerRuby_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerRuby_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerRuby_DefaultColorWithStyle(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerRuby_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerRuby) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerRuby_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultEolFill +func miqt_exec_callback_QsciLexerRuby_DefaultEolFill(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerRuby_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerRuby_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerRuby_DefaultFontWithStyle(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerRuby_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerRuby_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerRuby_DefaultPaperWithStyle(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerRuby_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerRuby) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerRuby_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetEditor +func miqt_exec_callback_QsciLexerRuby_SetEditor(self *C.QsciLexerRuby, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerRuby) callVirtualBase_RefreshProperties() { + + C.QsciLexerRuby_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerRuby) OnRefreshProperties(slot func(super func())) { + C.QsciLexerRuby_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_RefreshProperties +func miqt_exec_callback_QsciLexerRuby_RefreshProperties(self *C.QsciLexerRuby, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerRuby) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerRuby_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_StyleBitsNeeded +func miqt_exec_callback_QsciLexerRuby_StyleBitsNeeded(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerRuby_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_WordCharacters +func miqt_exec_callback_QsciLexerRuby_WordCharacters(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerRuby_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerRuby) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerRuby_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerRuby_SetAutoIndentStyle(self *C.QsciLexerRuby, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerRuby_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerRuby_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetColor +func miqt_exec_callback_QsciLexerRuby_SetColor(self *C.QsciLexerRuby, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerRuby_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerRuby_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetEolFill +func miqt_exec_callback_QsciLexerRuby_SetEolFill(self *C.QsciLexerRuby, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerRuby_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerRuby_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetFont +func miqt_exec_callback_QsciLexerRuby_SetFont(self *C.QsciLexerRuby, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerRuby_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerRuby_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetPaper +func miqt_exec_callback_QsciLexerRuby_SetPaper(self *C.QsciLexerRuby, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerRuby_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerRuby) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerRuby_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_ReadProperties +func miqt_exec_callback_QsciLexerRuby_ReadProperties(self *C.QsciLexerRuby, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerRuby_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerRuby) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerRuby_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_WriteProperties +func miqt_exec_callback_QsciLexerRuby_WriteProperties(self *C.QsciLexerRuby, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerRuby) Delete() { - C.QsciLexerRuby_Delete(this.h) + C.QsciLexerRuby_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.h b/qt-restricted-extras/qscintilla/gen_qscilexerruby.h index 5e0096d5..0816e599 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerRuby; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerRuby QsciLexerRuby; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerRuby* QsciLexerRuby_new(); -QsciLexerRuby* QsciLexerRuby_new2(QObject* parent); +void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self); void* QsciLexerRuby_Metacast(QsciLexerRuby* self, const char* param1); struct miqt_string QsciLexerRuby_Tr(const char* s); @@ -58,7 +64,75 @@ struct miqt_string QsciLexerRuby_TrUtf83(const char* s, const char* c, int n); const char* QsciLexerRuby_BlockEnd1(const QsciLexerRuby* self, int* style); const char* QsciLexerRuby_BlockStart1(const QsciLexerRuby* self, int* style); const char* QsciLexerRuby_BlockStartKeyword1(const QsciLexerRuby* self, int* style); -void QsciLexerRuby_Delete(QsciLexerRuby* self); +void QsciLexerRuby_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_Language(const void* self); +void QsciLexerRuby_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_Lexer(const void* self); +void QsciLexerRuby_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_LexerId(const void* self); +void QsciLexerRuby_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerRuby_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerRuby_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerRuby_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerRuby_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_BlockLookback(const void* self); +void QsciLexerRuby_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerRuby_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerRuby_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_BraceStyle(const void* self); +void QsciLexerRuby_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_CaseSensitive(const void* self); +void QsciLexerRuby_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_Color(const void* self, int style); +void QsciLexerRuby_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_EolFill(const void* self, int style); +void QsciLexerRuby_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerRuby_virtualbase_Font(const void* self, int style); +void QsciLexerRuby_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_IndentationGuideView(const void* self); +void QsciLexerRuby_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_Keywords(const void* self, int set); +void QsciLexerRuby_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_DefaultStyle(const void* self); +void QsciLexerRuby_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerRuby_virtualbase_Description(const void* self, int style); +void QsciLexerRuby_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_Paper(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerRuby_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerRuby_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerRuby_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_RefreshProperties(void* self); +void QsciLexerRuby_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerRuby_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_WordCharacters(const void* self); +void QsciLexerRuby_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerRuby_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerRuby_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerRuby_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerRuby_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerRuby_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerRuby_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerRuby_Delete(QsciLexerRuby* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp index 2ba1e83c..a60905ee 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerspice.h" #include "_cgo_export.h" -QsciLexerSpice* QsciLexerSpice_new() { - return new QsciLexerSpice(); +class MiqtVirtualQsciLexerSpice : public virtual QsciLexerSpice { +public: + + MiqtVirtualQsciLexerSpice(): QsciLexerSpice() {}; + MiqtVirtualQsciLexerSpice(QObject* parent): QsciLexerSpice(parent) {}; + + virtual ~MiqtVirtualQsciLexerSpice() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerSpice::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerSpice::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerSpice::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerSpice::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerSpice::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerSpice::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerSpice::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerSpice_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerSpice::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerSpice::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerSpice::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerSpice::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerSpice::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerSpice::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerSpice::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerSpice::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerSpice::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerSpice::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerSpice::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerSpice::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerSpice::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerSpice::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerSpice::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerSpice::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerSpice::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerSpice::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSpice_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerSpice::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerSpice::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerSpice::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerSpice::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerSpice::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerSpice::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerSpice::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerSpice_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerSpice::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerSpice::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerSpice::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerSpice::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerSpice::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerSpice::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerSpice::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerSpice::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerSpice::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerSpice::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerSpice::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerSpice_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerSpice::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerSpice::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerSpice_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerSpice::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerSpice::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerSpice::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerSpice::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerSpice::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerSpice::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerSpice_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerSpice::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerSpice::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerSpice::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerSpice::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerSpice::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerSpice::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerSpice::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerSpice::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerSpice::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerSpice::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSpice::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerSpice::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSpice::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(); + *outptr_QsciLexerSpice = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerSpice* QsciLexerSpice_new2(QObject* parent) { - return new QsciLexerSpice(parent); +void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(parent); + *outptr_QsciLexerSpice = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self) { @@ -126,7 +962,275 @@ struct miqt_string QsciLexerSpice_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerSpice_Delete(QsciLexerSpice* self) { - delete self; +void QsciLexerSpice_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Language = slot; +} + +void QsciLexerSpice_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerSpice_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerSpice_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__LexerId = slot; +} + +int QsciLexerSpice_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerSpice_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerSpice_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerSpice_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerSpice_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerSpice_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerSpice_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerSpice_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerSpice_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerSpice_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerSpice_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerSpice_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerSpice_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerSpice_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerSpice_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerSpice_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerSpice_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerSpice_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerSpice_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Color(style); +} + +void QsciLexerSpice_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerSpice_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerSpice_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerSpice_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Font(style); +} + +void QsciLexerSpice_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerSpice_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerSpice_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerSpice_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerSpice_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerSpice_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerSpice_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Description = slot; +} + +void QsciLexerSpice_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerSpice_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerSpice_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerSpice_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerSpice_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerSpice_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerSpice_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerSpice_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerSpice_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerSpice_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerSpice_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerSpice_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerSpice_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerSpice_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerSpice_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerSpice_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerSpice_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerSpice_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerSpice_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerSpice_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerSpice_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetColor = slot; +} + +void QsciLexerSpice_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerSpice_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerSpice_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerSpice_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetFont = slot; +} + +void QsciLexerSpice_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerSpice_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerSpice_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerSpice_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerSpice_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerSpice_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerSpice_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerSpice_Delete(QsciLexerSpice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.go b/qt-restricted-extras/qscintilla/gen_qscilexerspice.go index d4039c83..3d99f0ae 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QsciLexerSpice struct { - h *C.QsciLexerSpice + h *C.QsciLexerSpice + isSubclass bool *QsciLexer } @@ -47,27 +49,47 @@ func (this *QsciLexerSpice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerSpice(h *C.QsciLexerSpice) *QsciLexerSpice { +// newQsciLexerSpice constructs the type using only CGO pointers. +func newQsciLexerSpice(h *C.QsciLexerSpice, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSpice { if h == nil { return nil } - return &QsciLexerSpice{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerSpice{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerSpice(h unsafe.Pointer) *QsciLexerSpice { - return newQsciLexerSpice((*C.QsciLexerSpice)(h)) +// UnsafeNewQsciLexerSpice constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerSpice(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSpice { + if h == nil { + return nil + } + + return &QsciLexerSpice{h: (*C.QsciLexerSpice)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerSpice constructs a new QsciLexerSpice object. func NewQsciLexerSpice() *QsciLexerSpice { - ret := C.QsciLexerSpice_new() - return newQsciLexerSpice(ret) + var outptr_QsciLexerSpice *C.QsciLexerSpice = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSpice_new(&outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerSpice2 constructs a new QsciLexerSpice object. func NewQsciLexerSpice2(parent *qt.QObject) *QsciLexerSpice { - ret := C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerSpice(ret) + var outptr_QsciLexerSpice *C.QsciLexerSpice = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerSpice) MetaObject() *qt.QMetaObject { @@ -182,9 +204,894 @@ func QsciLexerSpice_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerSpice) callVirtualBase_Language() string { + + _ret := C.QsciLexerSpice_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnLanguage(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Language +func miqt_exec_callback_QsciLexerSpice_Language(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerSpice_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnLexer(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Lexer +func miqt_exec_callback_QsciLexerSpice_Lexer(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerSpice_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnLexerId(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_LexerId +func miqt_exec_callback_QsciLexerSpice_LexerId(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerSpice_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_AutoCompletionFillups +func miqt_exec_callback_QsciLexerSpice_AutoCompletionFillups(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerSpice_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerSpice) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerSpice_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerSpice_AutoCompletionWordSeparators(self *C.QsciLexerSpice, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerSpice_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSpice_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockEnd +func miqt_exec_callback_QsciLexerSpice_BlockEnd(self *C.QsciLexerSpice, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerSpice_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockLookback +func miqt_exec_callback_QsciLexerSpice_BlockLookback(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerSpice_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSpice_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockStart +func miqt_exec_callback_QsciLexerSpice_BlockStart(self *C.QsciLexerSpice, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerSpice_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSpice_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockStartKeyword +func miqt_exec_callback_QsciLexerSpice_BlockStartKeyword(self *C.QsciLexerSpice, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerSpice_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BraceStyle +func miqt_exec_callback_QsciLexerSpice_BraceStyle(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerSpice_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerSpice_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_CaseSensitive +func miqt_exec_callback_QsciLexerSpice_CaseSensitive(self *C.QsciLexerSpice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerSpice_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSpice_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Color +func miqt_exec_callback_QsciLexerSpice_Color(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerSpice_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSpice) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSpice_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_EolFill +func miqt_exec_callback_QsciLexerSpice_EolFill(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerSpice_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerSpice_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Font +func miqt_exec_callback_QsciLexerSpice_Font(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerSpice_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_IndentationGuideView +func miqt_exec_callback_QsciLexerSpice_IndentationGuideView(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerSpice_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerSpice_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Keywords +func miqt_exec_callback_QsciLexerSpice_Keywords(self *C.QsciLexerSpice, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerSpice_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultStyle +func miqt_exec_callback_QsciLexerSpice_DefaultStyle(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerSpice_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerSpice) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerSpice_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Description +func miqt_exec_callback_QsciLexerSpice_Description(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerSpice) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerSpice_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSpice_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Paper +func miqt_exec_callback_QsciLexerSpice_Paper(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerSpice_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSpice_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerSpice_DefaultColorWithStyle(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerSpice_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSpice) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSpice_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultEolFill +func miqt_exec_callback_QsciLexerSpice_DefaultEolFill(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerSpice_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerSpice_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerSpice_DefaultFontWithStyle(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerSpice_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSpice_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerSpice_DefaultPaperWithStyle(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerSpice_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerSpice) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerSpice_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetEditor +func miqt_exec_callback_QsciLexerSpice_SetEditor(self *C.QsciLexerSpice, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerSpice) callVirtualBase_RefreshProperties() { + + C.QsciLexerSpice_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerSpice) OnRefreshProperties(slot func(super func())) { + C.QsciLexerSpice_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_RefreshProperties +func miqt_exec_callback_QsciLexerSpice_RefreshProperties(self *C.QsciLexerSpice, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerSpice) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerSpice_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_StyleBitsNeeded +func miqt_exec_callback_QsciLexerSpice_StyleBitsNeeded(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerSpice_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_WordCharacters +func miqt_exec_callback_QsciLexerSpice_WordCharacters(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerSpice_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerSpice) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerSpice_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerSpice_SetAutoIndentStyle(self *C.QsciLexerSpice, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerSpice_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerSpice_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetColor +func miqt_exec_callback_QsciLexerSpice_SetColor(self *C.QsciLexerSpice, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerSpice_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerSpice_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetEolFill +func miqt_exec_callback_QsciLexerSpice_SetEolFill(self *C.QsciLexerSpice, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerSpice_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerSpice_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetFont +func miqt_exec_callback_QsciLexerSpice_SetFont(self *C.QsciLexerSpice, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerSpice_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerSpice_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetPaper +func miqt_exec_callback_QsciLexerSpice_SetPaper(self *C.QsciLexerSpice, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSpice_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSpice) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerSpice_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_ReadProperties +func miqt_exec_callback_QsciLexerSpice_ReadProperties(self *C.QsciLexerSpice, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSpice_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSpice) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerSpice_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_WriteProperties +func miqt_exec_callback_QsciLexerSpice_WriteProperties(self *C.QsciLexerSpice, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerSpice) Delete() { - C.QsciLexerSpice_Delete(this.h) + C.QsciLexerSpice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.h b/qt-restricted-extras/qscintilla/gen_qscilexerspice.h index 437ee04e..d4d28838 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerSpice; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerSpice QsciLexerSpice; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerSpice* QsciLexerSpice_new(); -QsciLexerSpice* QsciLexerSpice_new2(QObject* parent); +void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self); void* QsciLexerSpice_Metacast(QsciLexerSpice* self, const char* param1); struct miqt_string QsciLexerSpice_Tr(const char* s); @@ -45,7 +51,75 @@ struct miqt_string QsciLexerSpice_Tr2(const char* s, const char* c); struct miqt_string QsciLexerSpice_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerSpice_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerSpice_TrUtf83(const char* s, const char* c, int n); -void QsciLexerSpice_Delete(QsciLexerSpice* self); +void QsciLexerSpice_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_Language(const void* self); +void QsciLexerSpice_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_Lexer(const void* self); +void QsciLexerSpice_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_LexerId(const void* self); +void QsciLexerSpice_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerSpice_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerSpice_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerSpice_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerSpice_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_BlockLookback(const void* self); +void QsciLexerSpice_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerSpice_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerSpice_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_BraceStyle(const void* self); +void QsciLexerSpice_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_CaseSensitive(const void* self); +void QsciLexerSpice_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_Color(const void* self, int style); +void QsciLexerSpice_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_EolFill(const void* self, int style); +void QsciLexerSpice_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerSpice_virtualbase_Font(const void* self, int style); +void QsciLexerSpice_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_IndentationGuideView(const void* self); +void QsciLexerSpice_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_Keywords(const void* self, int set); +void QsciLexerSpice_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_DefaultStyle(const void* self); +void QsciLexerSpice_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerSpice_virtualbase_Description(const void* self, int style); +void QsciLexerSpice_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_Paper(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerSpice_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerSpice_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerSpice_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_RefreshProperties(void* self); +void QsciLexerSpice_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerSpice_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_WordCharacters(const void* self); +void QsciLexerSpice_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerSpice_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerSpice_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerSpice_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerSpice_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerSpice_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSpice_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSpice_Delete(QsciLexerSpice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp b/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp index 77cd0d42..f65d1bdd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,918 @@ #include "gen_qscilexersql.h" #include "_cgo_export.h" -QsciLexerSQL* QsciLexerSQL_new() { - return new QsciLexerSQL(); +class MiqtVirtualQsciLexerSQL : public virtual QsciLexerSQL { +public: + + MiqtVirtualQsciLexerSQL(): QsciLexerSQL() {}; + MiqtVirtualQsciLexerSQL(QObject* parent): QsciLexerSQL(parent) {}; + + virtual ~MiqtVirtualQsciLexerSQL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBackslashEscapes = 0; + + // Subclass to allow providing a Go implementation + virtual void setBackslashEscapes(bool enable) override { + if (handle__SetBackslashEscapes == 0) { + QsciLexerSQL::setBackslashEscapes(enable); + return; + } + + bool sigval1 = enable; + + miqt_exec_callback_QsciLexerSQL_SetBackslashEscapes(this, handle__SetBackslashEscapes, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBackslashEscapes(bool enable) { + + QsciLexerSQL::setBackslashEscapes(enable); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerSQL::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerSQL_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerSQL::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerSQL::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerSQL_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerSQL::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerSQL::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerSQL::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerSQL::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerSQL::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerSQL::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerSQL::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerSQL::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerSQL_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerSQL::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerSQL::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerSQL::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerSQL::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerSQL::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerSQL::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerSQL::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerSQL::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerSQL::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerSQL::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerSQL::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerSQL::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerSQL::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerSQL::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerSQL::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerSQL::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerSQL::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerSQL::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSQL_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerSQL::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerSQL::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerSQL::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerSQL::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerSQL::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerSQL::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerSQL::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerSQL_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerSQL::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerSQL::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerSQL::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerSQL::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerSQL::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerSQL::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerSQL::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerSQL::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerSQL::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerSQL::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerSQL::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerSQL_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerSQL::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerSQL::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerSQL_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerSQL::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerSQL::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerSQL::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerSQL::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerSQL::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerSQL::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerSQL_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerSQL::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerSQL::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerSQL::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerSQL::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerSQL::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerSQL::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerSQL::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerSQL::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerSQL::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerSQL::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSQL::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerSQL::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSQL::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(); + *outptr_QsciLexerSQL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerSQL* QsciLexerSQL_new2(QObject* parent) { - return new QsciLexerSQL(parent); +void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(parent); + *outptr_QsciLexerSQL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self) { @@ -202,7 +1110,299 @@ struct miqt_string QsciLexerSQL_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerSQL_Delete(QsciLexerSQL* self) { - delete self; +void QsciLexerSQL_override_virtual_SetBackslashEscapes(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetBackslashEscapes = slot; +} + +void QsciLexerSQL_virtualbase_SetBackslashEscapes(void* self, bool enable) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetBackslashEscapes(enable); +} + +void QsciLexerSQL_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerSQL_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerSQL_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerSQL_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerSQL_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Language = slot; +} + +void QsciLexerSQL_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerSQL_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerSQL_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__LexerId = slot; +} + +int QsciLexerSQL_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerSQL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerSQL_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerSQL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerSQL_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerSQL_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerSQL_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerSQL_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerSQL_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerSQL_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerSQL_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerSQL_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerSQL_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerSQL_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerSQL_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerSQL_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerSQL_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerSQL_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerSQL_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Color(style); +} + +void QsciLexerSQL_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerSQL_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerSQL_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerSQL_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Font(style); +} + +void QsciLexerSQL_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerSQL_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerSQL_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerSQL_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerSQL_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerSQL_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerSQL_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Description = slot; +} + +void QsciLexerSQL_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerSQL_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerSQL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerSQL_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerSQL_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerSQL_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerSQL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerSQL_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerSQL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerSQL_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerSQL_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerSQL_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerSQL_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerSQL_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerSQL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerSQL_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerSQL_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerSQL_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerSQL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerSQL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerSQL_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetColor = slot; +} + +void QsciLexerSQL_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerSQL_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerSQL_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerSQL_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetFont = slot; +} + +void QsciLexerSQL_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerSQL_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerSQL_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerSQL_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerSQL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerSQL_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerSQL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerSQL_Delete(QsciLexerSQL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.go b/qt-restricted-extras/qscintilla/gen_qscilexersql.go index 150bbf0a..f1e6536d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -42,7 +43,8 @@ const ( ) type QsciLexerSQL struct { - h *C.QsciLexerSQL + h *C.QsciLexerSQL + isSubclass bool *QsciLexer } @@ -60,27 +62,47 @@ func (this *QsciLexerSQL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerSQL(h *C.QsciLexerSQL) *QsciLexerSQL { +// newQsciLexerSQL constructs the type using only CGO pointers. +func newQsciLexerSQL(h *C.QsciLexerSQL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSQL { if h == nil { return nil } - return &QsciLexerSQL{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerSQL{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerSQL(h unsafe.Pointer) *QsciLexerSQL { - return newQsciLexerSQL((*C.QsciLexerSQL)(h)) +// UnsafeNewQsciLexerSQL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerSQL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSQL { + if h == nil { + return nil + } + + return &QsciLexerSQL{h: (*C.QsciLexerSQL)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerSQL constructs a new QsciLexerSQL object. func NewQsciLexerSQL() *QsciLexerSQL { - ret := C.QsciLexerSQL_new() - return newQsciLexerSQL(ret) + var outptr_QsciLexerSQL *C.QsciLexerSQL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSQL_new(&outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerSQL2 constructs a new QsciLexerSQL object. func NewQsciLexerSQL2(parent *qt.QObject) *QsciLexerSQL { - ret := C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerSQL(ret) + var outptr_QsciLexerSQL *C.QsciLexerSQL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerSQL) MetaObject() *qt.QMetaObject { @@ -274,9 +296,963 @@ func QsciLexerSQL_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerSQL) callVirtualBase_SetBackslashEscapes(enable bool) { + + C.QsciLexerSQL_virtualbase_SetBackslashEscapes(unsafe.Pointer(this.h), (C.bool)(enable)) + +} +func (this *QsciLexerSQL) OnSetBackslashEscapes(slot func(super func(enable bool), enable bool)) { + C.QsciLexerSQL_override_virtual_SetBackslashEscapes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetBackslashEscapes +func miqt_exec_callback_QsciLexerSQL_SetBackslashEscapes(self *C.QsciLexerSQL, cb C.intptr_t, enable C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(enable bool), enable bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(enable) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetBackslashEscapes, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerSQL_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerSQL) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerSQL_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetFoldComments +func miqt_exec_callback_QsciLexerSQL_SetFoldComments(self *C.QsciLexerSQL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerSQL_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerSQL) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerSQL_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetFoldCompact +func miqt_exec_callback_QsciLexerSQL_SetFoldCompact(self *C.QsciLexerSQL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_Language() string { + + _ret := C.QsciLexerSQL_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnLanguage(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Language +func miqt_exec_callback_QsciLexerSQL_Language(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerSQL_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnLexer(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Lexer +func miqt_exec_callback_QsciLexerSQL_Lexer(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerSQL_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnLexerId(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_LexerId +func miqt_exec_callback_QsciLexerSQL_LexerId(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerSQL_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_AutoCompletionFillups +func miqt_exec_callback_QsciLexerSQL_AutoCompletionFillups(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerSQL_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerSQL) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerSQL_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerSQL_AutoCompletionWordSeparators(self *C.QsciLexerSQL, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerSQL_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSQL_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockEnd +func miqt_exec_callback_QsciLexerSQL_BlockEnd(self *C.QsciLexerSQL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerSQL_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockLookback +func miqt_exec_callback_QsciLexerSQL_BlockLookback(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerSQL_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSQL_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockStart +func miqt_exec_callback_QsciLexerSQL_BlockStart(self *C.QsciLexerSQL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerSQL_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSQL_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockStartKeyword +func miqt_exec_callback_QsciLexerSQL_BlockStartKeyword(self *C.QsciLexerSQL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerSQL_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BraceStyle +func miqt_exec_callback_QsciLexerSQL_BraceStyle(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerSQL_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerSQL_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_CaseSensitive +func miqt_exec_callback_QsciLexerSQL_CaseSensitive(self *C.QsciLexerSQL, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerSQL_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSQL_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Color +func miqt_exec_callback_QsciLexerSQL_Color(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerSQL_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSQL) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSQL_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_EolFill +func miqt_exec_callback_QsciLexerSQL_EolFill(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerSQL_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerSQL_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Font +func miqt_exec_callback_QsciLexerSQL_Font(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerSQL_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_IndentationGuideView +func miqt_exec_callback_QsciLexerSQL_IndentationGuideView(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerSQL_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerSQL_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Keywords +func miqt_exec_callback_QsciLexerSQL_Keywords(self *C.QsciLexerSQL, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerSQL_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultStyle +func miqt_exec_callback_QsciLexerSQL_DefaultStyle(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerSQL_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerSQL) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerSQL_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Description +func miqt_exec_callback_QsciLexerSQL_Description(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerSQL) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerSQL_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSQL_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Paper +func miqt_exec_callback_QsciLexerSQL_Paper(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerSQL_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSQL_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerSQL_DefaultColorWithStyle(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerSQL_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSQL) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSQL_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultEolFill +func miqt_exec_callback_QsciLexerSQL_DefaultEolFill(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerSQL_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerSQL_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerSQL_DefaultFontWithStyle(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerSQL_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerSQL_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerSQL_DefaultPaperWithStyle(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerSQL_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerSQL) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerSQL_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetEditor +func miqt_exec_callback_QsciLexerSQL_SetEditor(self *C.QsciLexerSQL, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_RefreshProperties() { + + C.QsciLexerSQL_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerSQL) OnRefreshProperties(slot func(super func())) { + C.QsciLexerSQL_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_RefreshProperties +func miqt_exec_callback_QsciLexerSQL_RefreshProperties(self *C.QsciLexerSQL, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerSQL) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerSQL_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_StyleBitsNeeded +func miqt_exec_callback_QsciLexerSQL_StyleBitsNeeded(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerSQL_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_WordCharacters +func miqt_exec_callback_QsciLexerSQL_WordCharacters(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerSQL_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerSQL) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerSQL_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerSQL_SetAutoIndentStyle(self *C.QsciLexerSQL, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerSQL_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerSQL_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetColor +func miqt_exec_callback_QsciLexerSQL_SetColor(self *C.QsciLexerSQL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerSQL_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerSQL_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetEolFill +func miqt_exec_callback_QsciLexerSQL_SetEolFill(self *C.QsciLexerSQL, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerSQL_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerSQL_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetFont +func miqt_exec_callback_QsciLexerSQL_SetFont(self *C.QsciLexerSQL, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerSQL_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerSQL_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetPaper +func miqt_exec_callback_QsciLexerSQL_SetPaper(self *C.QsciLexerSQL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSQL_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSQL) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerSQL_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_ReadProperties +func miqt_exec_callback_QsciLexerSQL_ReadProperties(self *C.QsciLexerSQL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSQL_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSQL) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerSQL_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_WriteProperties +func miqt_exec_callback_QsciLexerSQL_WriteProperties(self *C.QsciLexerSQL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerSQL) Delete() { - C.QsciLexerSQL_Delete(this.h) + C.QsciLexerSQL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.h b/qt-restricted-extras/qscintilla/gen_qscilexersql.h index 64aa8e65..2db98949 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerSQL; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerSQL QsciLexerSQL; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerSQL* QsciLexerSQL_new(); -QsciLexerSQL* QsciLexerSQL_new2(QObject* parent); +void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self); void* QsciLexerSQL_Metacast(QsciLexerSQL* self, const char* param1); struct miqt_string QsciLexerSQL_Tr(const char* s); @@ -64,7 +70,81 @@ struct miqt_string QsciLexerSQL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerSQL_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerSQL_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerSQL_TrUtf83(const char* s, const char* c, int n); -void QsciLexerSQL_Delete(QsciLexerSQL* self); +void QsciLexerSQL_override_virtual_SetBackslashEscapes(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetBackslashEscapes(void* self, bool enable); +void QsciLexerSQL_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerSQL_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerSQL_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_Language(const void* self); +void QsciLexerSQL_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_Lexer(const void* self); +void QsciLexerSQL_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_LexerId(const void* self); +void QsciLexerSQL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerSQL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerSQL_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerSQL_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerSQL_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_BlockLookback(const void* self); +void QsciLexerSQL_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerSQL_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerSQL_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_BraceStyle(const void* self); +void QsciLexerSQL_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_CaseSensitive(const void* self); +void QsciLexerSQL_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_Color(const void* self, int style); +void QsciLexerSQL_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_EolFill(const void* self, int style); +void QsciLexerSQL_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerSQL_virtualbase_Font(const void* self, int style); +void QsciLexerSQL_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_IndentationGuideView(const void* self); +void QsciLexerSQL_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_Keywords(const void* self, int set); +void QsciLexerSQL_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_DefaultStyle(const void* self); +void QsciLexerSQL_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerSQL_virtualbase_Description(const void* self, int style); +void QsciLexerSQL_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_Paper(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerSQL_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerSQL_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerSQL_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_RefreshProperties(void* self); +void QsciLexerSQL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerSQL_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_WordCharacters(const void* self); +void QsciLexerSQL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerSQL_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerSQL_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerSQL_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerSQL_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerSQL_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSQL_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSQL_Delete(QsciLexerSQL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp index 0889feac..5f4921ce 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexertcl.h" #include "_cgo_export.h" -QsciLexerTCL* QsciLexerTCL_new() { - return new QsciLexerTCL(); +class MiqtVirtualQsciLexerTCL : public virtual QsciLexerTCL { +public: + + MiqtVirtualQsciLexerTCL(): QsciLexerTCL() {}; + MiqtVirtualQsciLexerTCL(QObject* parent): QsciLexerTCL(parent) {}; + + virtual ~MiqtVirtualQsciLexerTCL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerTCL::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerTCL::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerTCL::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerTCL::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerTCL::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerTCL::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerTCL::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerTCL_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerTCL::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerTCL::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerTCL::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerTCL::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerTCL::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerTCL::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerTCL::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerTCL::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerTCL::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerTCL::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerTCL::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerTCL::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerTCL::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerTCL::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerTCL::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerTCL::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerTCL::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerTCL::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTCL_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerTCL::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerTCL::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerTCL::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerTCL::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerTCL::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerTCL::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerTCL::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerTCL_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerTCL::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerTCL::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerTCL::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerTCL::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerTCL::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerTCL::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerTCL::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerTCL::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerTCL::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerTCL::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerTCL::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerTCL_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerTCL::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerTCL::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerTCL_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerTCL::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerTCL::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerTCL::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerTCL::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerTCL::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerTCL::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerTCL_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerTCL::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerTCL::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerTCL::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerTCL::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerTCL::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerTCL::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerTCL::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerTCL::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerTCL::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerTCL::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTCL::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerTCL::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTCL::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(); + *outptr_QsciLexerTCL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerTCL* QsciLexerTCL_new2(QObject* parent) { - return new QsciLexerTCL(parent); +void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(parent); + *outptr_QsciLexerTCL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self) { @@ -146,7 +982,275 @@ struct miqt_string QsciLexerTCL_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerTCL_Delete(QsciLexerTCL* self) { - delete self; +void QsciLexerTCL_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Language = slot; +} + +void QsciLexerTCL_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerTCL_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerTCL_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__LexerId = slot; +} + +int QsciLexerTCL_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerTCL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerTCL_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerTCL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerTCL_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerTCL_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerTCL_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerTCL_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerTCL_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerTCL_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerTCL_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerTCL_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerTCL_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerTCL_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerTCL_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerTCL_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerTCL_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerTCL_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerTCL_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Color(style); +} + +void QsciLexerTCL_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerTCL_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerTCL_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerTCL_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Font(style); +} + +void QsciLexerTCL_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerTCL_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerTCL_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerTCL_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerTCL_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerTCL_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerTCL_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Description = slot; +} + +void QsciLexerTCL_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerTCL_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerTCL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerTCL_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerTCL_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerTCL_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerTCL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerTCL_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerTCL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerTCL_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerTCL_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerTCL_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerTCL_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerTCL_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerTCL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerTCL_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerTCL_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerTCL_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerTCL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerTCL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerTCL_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetColor = slot; +} + +void QsciLexerTCL_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerTCL_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerTCL_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerTCL_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetFont = slot; +} + +void QsciLexerTCL_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerTCL_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerTCL_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerTCL_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerTCL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerTCL_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerTCL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerTCL_Delete(QsciLexerTCL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.go b/qt-restricted-extras/qscintilla/gen_qscilexertcl.go index 7f1700a0..031199dd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -42,7 +43,8 @@ const ( ) type QsciLexerTCL struct { - h *C.QsciLexerTCL + h *C.QsciLexerTCL + isSubclass bool *QsciLexer } @@ -60,27 +62,47 @@ func (this *QsciLexerTCL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerTCL(h *C.QsciLexerTCL) *QsciLexerTCL { +// newQsciLexerTCL constructs the type using only CGO pointers. +func newQsciLexerTCL(h *C.QsciLexerTCL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTCL { if h == nil { return nil } - return &QsciLexerTCL{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerTCL{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerTCL(h unsafe.Pointer) *QsciLexerTCL { - return newQsciLexerTCL((*C.QsciLexerTCL)(h)) +// UnsafeNewQsciLexerTCL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerTCL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTCL { + if h == nil { + return nil + } + + return &QsciLexerTCL{h: (*C.QsciLexerTCL)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerTCL constructs a new QsciLexerTCL object. func NewQsciLexerTCL() *QsciLexerTCL { - ret := C.QsciLexerTCL_new() - return newQsciLexerTCL(ret) + var outptr_QsciLexerTCL *C.QsciLexerTCL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTCL_new(&outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerTCL2 constructs a new QsciLexerTCL object. func NewQsciLexerTCL2(parent *qt.QObject) *QsciLexerTCL { - ret := C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerTCL(ret) + var outptr_QsciLexerTCL *C.QsciLexerTCL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerTCL) MetaObject() *qt.QMetaObject { @@ -218,9 +240,894 @@ func QsciLexerTCL_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerTCL) callVirtualBase_Language() string { + + _ret := C.QsciLexerTCL_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnLanguage(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Language +func miqt_exec_callback_QsciLexerTCL_Language(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerTCL_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnLexer(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Lexer +func miqt_exec_callback_QsciLexerTCL_Lexer(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerTCL_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnLexerId(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_LexerId +func miqt_exec_callback_QsciLexerTCL_LexerId(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerTCL_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_AutoCompletionFillups +func miqt_exec_callback_QsciLexerTCL_AutoCompletionFillups(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerTCL_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerTCL) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerTCL_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerTCL_AutoCompletionWordSeparators(self *C.QsciLexerTCL, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerTCL_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTCL_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockEnd +func miqt_exec_callback_QsciLexerTCL_BlockEnd(self *C.QsciLexerTCL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerTCL_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockLookback +func miqt_exec_callback_QsciLexerTCL_BlockLookback(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerTCL_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTCL_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockStart +func miqt_exec_callback_QsciLexerTCL_BlockStart(self *C.QsciLexerTCL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerTCL_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTCL_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockStartKeyword +func miqt_exec_callback_QsciLexerTCL_BlockStartKeyword(self *C.QsciLexerTCL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerTCL_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BraceStyle +func miqt_exec_callback_QsciLexerTCL_BraceStyle(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerTCL_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerTCL_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_CaseSensitive +func miqt_exec_callback_QsciLexerTCL_CaseSensitive(self *C.QsciLexerTCL, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerTCL_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTCL_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Color +func miqt_exec_callback_QsciLexerTCL_Color(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerTCL_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTCL) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTCL_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_EolFill +func miqt_exec_callback_QsciLexerTCL_EolFill(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerTCL_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerTCL_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Font +func miqt_exec_callback_QsciLexerTCL_Font(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerTCL_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_IndentationGuideView +func miqt_exec_callback_QsciLexerTCL_IndentationGuideView(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerTCL_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerTCL_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Keywords +func miqt_exec_callback_QsciLexerTCL_Keywords(self *C.QsciLexerTCL, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerTCL_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultStyle +func miqt_exec_callback_QsciLexerTCL_DefaultStyle(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerTCL_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerTCL) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerTCL_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Description +func miqt_exec_callback_QsciLexerTCL_Description(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerTCL) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerTCL_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTCL_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Paper +func miqt_exec_callback_QsciLexerTCL_Paper(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerTCL_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTCL_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerTCL_DefaultColorWithStyle(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerTCL_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTCL) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTCL_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultEolFill +func miqt_exec_callback_QsciLexerTCL_DefaultEolFill(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerTCL_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerTCL_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerTCL_DefaultFontWithStyle(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerTCL_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTCL_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerTCL_DefaultPaperWithStyle(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerTCL_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerTCL) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerTCL_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetEditor +func miqt_exec_callback_QsciLexerTCL_SetEditor(self *C.QsciLexerTCL, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerTCL) callVirtualBase_RefreshProperties() { + + C.QsciLexerTCL_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerTCL) OnRefreshProperties(slot func(super func())) { + C.QsciLexerTCL_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_RefreshProperties +func miqt_exec_callback_QsciLexerTCL_RefreshProperties(self *C.QsciLexerTCL, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerTCL) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerTCL_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_StyleBitsNeeded +func miqt_exec_callback_QsciLexerTCL_StyleBitsNeeded(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerTCL_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_WordCharacters +func miqt_exec_callback_QsciLexerTCL_WordCharacters(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerTCL_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerTCL) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerTCL_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerTCL_SetAutoIndentStyle(self *C.QsciLexerTCL, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerTCL_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerTCL_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetColor +func miqt_exec_callback_QsciLexerTCL_SetColor(self *C.QsciLexerTCL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerTCL_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerTCL_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetEolFill +func miqt_exec_callback_QsciLexerTCL_SetEolFill(self *C.QsciLexerTCL, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerTCL_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerTCL_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetFont +func miqt_exec_callback_QsciLexerTCL_SetFont(self *C.QsciLexerTCL, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerTCL_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerTCL_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetPaper +func miqt_exec_callback_QsciLexerTCL_SetPaper(self *C.QsciLexerTCL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTCL_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTCL) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerTCL_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_ReadProperties +func miqt_exec_callback_QsciLexerTCL_ReadProperties(self *C.QsciLexerTCL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTCL_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTCL) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerTCL_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_WriteProperties +func miqt_exec_callback_QsciLexerTCL_WriteProperties(self *C.QsciLexerTCL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerTCL) Delete() { - C.QsciLexerTCL_Delete(this.h) + C.QsciLexerTCL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.h b/qt-restricted-extras/qscintilla/gen_qscilexertcl.h index b7c7e5a5..0c21f228 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerTCL; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerTCL QsciLexerTCL; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerTCL* QsciLexerTCL_new(); -QsciLexerTCL* QsciLexerTCL_new2(QObject* parent); +void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self); void* QsciLexerTCL_Metacast(QsciLexerTCL* self, const char* param1); struct miqt_string QsciLexerTCL_Tr(const char* s); @@ -50,7 +56,75 @@ struct miqt_string QsciLexerTCL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerTCL_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerTCL_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerTCL_TrUtf83(const char* s, const char* c, int n); -void QsciLexerTCL_Delete(QsciLexerTCL* self); +void QsciLexerTCL_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_Language(const void* self); +void QsciLexerTCL_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_Lexer(const void* self); +void QsciLexerTCL_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_LexerId(const void* self); +void QsciLexerTCL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerTCL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerTCL_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerTCL_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerTCL_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_BlockLookback(const void* self); +void QsciLexerTCL_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerTCL_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerTCL_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_BraceStyle(const void* self); +void QsciLexerTCL_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_CaseSensitive(const void* self); +void QsciLexerTCL_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_Color(const void* self, int style); +void QsciLexerTCL_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_EolFill(const void* self, int style); +void QsciLexerTCL_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerTCL_virtualbase_Font(const void* self, int style); +void QsciLexerTCL_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_IndentationGuideView(const void* self); +void QsciLexerTCL_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_Keywords(const void* self, int set); +void QsciLexerTCL_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_DefaultStyle(const void* self); +void QsciLexerTCL_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerTCL_virtualbase_Description(const void* self, int style); +void QsciLexerTCL_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_Paper(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerTCL_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerTCL_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerTCL_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_RefreshProperties(void* self); +void QsciLexerTCL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerTCL_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_WordCharacters(const void* self); +void QsciLexerTCL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerTCL_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerTCL_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerTCL_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerTCL_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerTCL_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTCL_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTCL_Delete(QsciLexerTCL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp b/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp index 16fed6d0..7e645b91 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,846 @@ #include "gen_qscilexertex.h" #include "_cgo_export.h" -QsciLexerTeX* QsciLexerTeX_new() { - return new QsciLexerTeX(); +class MiqtVirtualQsciLexerTeX : public virtual QsciLexerTeX { +public: + + MiqtVirtualQsciLexerTeX(): QsciLexerTeX() {}; + MiqtVirtualQsciLexerTeX(QObject* parent): QsciLexerTeX(parent) {}; + + virtual ~MiqtVirtualQsciLexerTeX() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerTeX::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerTeX::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerTeX::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerTeX::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerTeX::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerTeX::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerTeX::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerTeX_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerTeX::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerTeX::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerTeX::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerTeX::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerTeX::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerTeX::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerTeX::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerTeX::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerTeX::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerTeX::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerTeX::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerTeX::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerTeX::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerTeX::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerTeX::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerTeX::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerTeX::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerTeX::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTeX_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerTeX::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerTeX::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerTeX::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerTeX::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerTeX::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerTeX::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerTeX::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerTeX_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerTeX::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerTeX::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerTeX::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerTeX::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerTeX::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerTeX::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerTeX::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerTeX::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerTeX::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerTeX::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerTeX::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerTeX_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerTeX::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerTeX::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerTeX_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerTeX::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerTeX::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerTeX::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerTeX::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerTeX::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerTeX::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerTeX_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerTeX::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerTeX::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerTeX::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerTeX::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerTeX::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerTeX::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerTeX::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerTeX::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerTeX::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerTeX::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTeX::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerTeX::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTeX::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(); + *outptr_QsciLexerTeX = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerTeX* QsciLexerTeX_new2(QObject* parent) { - return new QsciLexerTeX(parent); +void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(parent); + *outptr_QsciLexerTeX = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self) { @@ -157,7 +994,275 @@ struct miqt_string QsciLexerTeX_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerTeX_Delete(QsciLexerTeX* self) { - delete self; +void QsciLexerTeX_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Language = slot; +} + +void QsciLexerTeX_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerTeX_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerTeX_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__LexerId = slot; +} + +int QsciLexerTeX_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerTeX_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerTeX_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerTeX_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerTeX_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerTeX_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerTeX_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerTeX_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerTeX_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerTeX_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerTeX_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerTeX_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerTeX_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerTeX_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerTeX_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerTeX_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerTeX_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerTeX_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerTeX_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Color(style); +} + +void QsciLexerTeX_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerTeX_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerTeX_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerTeX_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Font(style); +} + +void QsciLexerTeX_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerTeX_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerTeX_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerTeX_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerTeX_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerTeX_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerTeX_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Description = slot; +} + +void QsciLexerTeX_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerTeX_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerTeX_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerTeX_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerTeX_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerTeX_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerTeX_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerTeX_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerTeX_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerTeX_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerTeX_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerTeX_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerTeX_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerTeX_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerTeX_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerTeX_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerTeX_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerTeX_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerTeX_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerTeX_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerTeX_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetColor = slot; +} + +void QsciLexerTeX_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerTeX_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerTeX_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerTeX_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetFont = slot; +} + +void QsciLexerTeX_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerTeX_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerTeX_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerTeX_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerTeX_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerTeX_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerTeX_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerTeX_Delete(QsciLexerTeX* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.go b/qt-restricted-extras/qscintilla/gen_qscilexertex.go index 69492f2d..992c06b2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -26,7 +27,8 @@ const ( ) type QsciLexerTeX struct { - h *C.QsciLexerTeX + h *C.QsciLexerTeX + isSubclass bool *QsciLexer } @@ -44,27 +46,47 @@ func (this *QsciLexerTeX) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerTeX(h *C.QsciLexerTeX) *QsciLexerTeX { +// newQsciLexerTeX constructs the type using only CGO pointers. +func newQsciLexerTeX(h *C.QsciLexerTeX, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTeX { if h == nil { return nil } - return &QsciLexerTeX{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerTeX{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerTeX(h unsafe.Pointer) *QsciLexerTeX { - return newQsciLexerTeX((*C.QsciLexerTeX)(h)) +// UnsafeNewQsciLexerTeX constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerTeX(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTeX { + if h == nil { + return nil + } + + return &QsciLexerTeX{h: (*C.QsciLexerTeX)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerTeX constructs a new QsciLexerTeX object. func NewQsciLexerTeX() *QsciLexerTeX { - ret := C.QsciLexerTeX_new() - return newQsciLexerTeX(ret) + var outptr_QsciLexerTeX *C.QsciLexerTeX = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTeX_new(&outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerTeX2 constructs a new QsciLexerTeX object. func NewQsciLexerTeX2(parent *qt.QObject) *QsciLexerTeX { - ret := C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerTeX(ret) + var outptr_QsciLexerTeX *C.QsciLexerTeX = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerTeX) MetaObject() *qt.QMetaObject { @@ -209,9 +231,894 @@ func QsciLexerTeX_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerTeX) callVirtualBase_Language() string { + + _ret := C.QsciLexerTeX_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnLanguage(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Language +func miqt_exec_callback_QsciLexerTeX_Language(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerTeX_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnLexer(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Lexer +func miqt_exec_callback_QsciLexerTeX_Lexer(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerTeX_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnLexerId(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_LexerId +func miqt_exec_callback_QsciLexerTeX_LexerId(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerTeX_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_AutoCompletionFillups +func miqt_exec_callback_QsciLexerTeX_AutoCompletionFillups(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerTeX_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerTeX) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerTeX_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerTeX_AutoCompletionWordSeparators(self *C.QsciLexerTeX, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerTeX_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTeX_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockEnd +func miqt_exec_callback_QsciLexerTeX_BlockEnd(self *C.QsciLexerTeX, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerTeX_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockLookback +func miqt_exec_callback_QsciLexerTeX_BlockLookback(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerTeX_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTeX_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockStart +func miqt_exec_callback_QsciLexerTeX_BlockStart(self *C.QsciLexerTeX, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerTeX_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTeX_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockStartKeyword +func miqt_exec_callback_QsciLexerTeX_BlockStartKeyword(self *C.QsciLexerTeX, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerTeX_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BraceStyle +func miqt_exec_callback_QsciLexerTeX_BraceStyle(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerTeX_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerTeX_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_CaseSensitive +func miqt_exec_callback_QsciLexerTeX_CaseSensitive(self *C.QsciLexerTeX, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerTeX_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTeX_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Color +func miqt_exec_callback_QsciLexerTeX_Color(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerTeX_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTeX) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTeX_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_EolFill +func miqt_exec_callback_QsciLexerTeX_EolFill(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerTeX_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerTeX_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Font +func miqt_exec_callback_QsciLexerTeX_Font(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerTeX_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_IndentationGuideView +func miqt_exec_callback_QsciLexerTeX_IndentationGuideView(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerTeX_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerTeX_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Keywords +func miqt_exec_callback_QsciLexerTeX_Keywords(self *C.QsciLexerTeX, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerTeX_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultStyle +func miqt_exec_callback_QsciLexerTeX_DefaultStyle(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerTeX_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerTeX) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerTeX_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Description +func miqt_exec_callback_QsciLexerTeX_Description(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerTeX) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerTeX_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTeX_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Paper +func miqt_exec_callback_QsciLexerTeX_Paper(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerTeX_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTeX_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerTeX_DefaultColorWithStyle(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerTeX_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTeX) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTeX_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultEolFill +func miqt_exec_callback_QsciLexerTeX_DefaultEolFill(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerTeX_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerTeX_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerTeX_DefaultFontWithStyle(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerTeX_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerTeX_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerTeX_DefaultPaperWithStyle(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerTeX_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerTeX) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerTeX_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetEditor +func miqt_exec_callback_QsciLexerTeX_SetEditor(self *C.QsciLexerTeX, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerTeX) callVirtualBase_RefreshProperties() { + + C.QsciLexerTeX_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerTeX) OnRefreshProperties(slot func(super func())) { + C.QsciLexerTeX_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_RefreshProperties +func miqt_exec_callback_QsciLexerTeX_RefreshProperties(self *C.QsciLexerTeX, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerTeX) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerTeX_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_StyleBitsNeeded +func miqt_exec_callback_QsciLexerTeX_StyleBitsNeeded(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerTeX_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_WordCharacters +func miqt_exec_callback_QsciLexerTeX_WordCharacters(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerTeX_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerTeX) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerTeX_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerTeX_SetAutoIndentStyle(self *C.QsciLexerTeX, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerTeX_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerTeX_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetColor +func miqt_exec_callback_QsciLexerTeX_SetColor(self *C.QsciLexerTeX, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerTeX_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerTeX_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetEolFill +func miqt_exec_callback_QsciLexerTeX_SetEolFill(self *C.QsciLexerTeX, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerTeX_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerTeX_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetFont +func miqt_exec_callback_QsciLexerTeX_SetFont(self *C.QsciLexerTeX, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerTeX_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerTeX_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetPaper +func miqt_exec_callback_QsciLexerTeX_SetPaper(self *C.QsciLexerTeX, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTeX_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTeX) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerTeX_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_ReadProperties +func miqt_exec_callback_QsciLexerTeX_ReadProperties(self *C.QsciLexerTeX, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTeX_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTeX) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerTeX_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_WriteProperties +func miqt_exec_callback_QsciLexerTeX_WriteProperties(self *C.QsciLexerTeX, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerTeX) Delete() { - C.QsciLexerTeX_Delete(this.h) + C.QsciLexerTeX_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.h b/qt-restricted-extras/qscintilla/gen_qscilexertex.h index 0ac547c6..875eb929 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.h @@ -16,18 +16,26 @@ extern "C" { #ifdef __cplusplus class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerTeX; +class QsciScintilla; #else typedef struct QColor QColor; +typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerTeX QsciLexerTeX; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerTeX* QsciLexerTeX_new(); -QsciLexerTeX* QsciLexerTeX_new2(QObject* parent); +void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self); void* QsciLexerTeX_Metacast(QsciLexerTeX* self, const char* param1); struct miqt_string QsciLexerTeX_Tr(const char* s); @@ -51,7 +59,75 @@ struct miqt_string QsciLexerTeX_Tr2(const char* s, const char* c); struct miqt_string QsciLexerTeX_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerTeX_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerTeX_TrUtf83(const char* s, const char* c, int n); -void QsciLexerTeX_Delete(QsciLexerTeX* self); +void QsciLexerTeX_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_Language(const void* self); +void QsciLexerTeX_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_Lexer(const void* self); +void QsciLexerTeX_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_LexerId(const void* self); +void QsciLexerTeX_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerTeX_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerTeX_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerTeX_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerTeX_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_BlockLookback(const void* self); +void QsciLexerTeX_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerTeX_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerTeX_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_BraceStyle(const void* self); +void QsciLexerTeX_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_CaseSensitive(const void* self); +void QsciLexerTeX_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_Color(const void* self, int style); +void QsciLexerTeX_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_EolFill(const void* self, int style); +void QsciLexerTeX_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerTeX_virtualbase_Font(const void* self, int style); +void QsciLexerTeX_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_IndentationGuideView(const void* self); +void QsciLexerTeX_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_Keywords(const void* self, int set); +void QsciLexerTeX_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_DefaultStyle(const void* self); +void QsciLexerTeX_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerTeX_virtualbase_Description(const void* self, int style); +void QsciLexerTeX_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_Paper(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerTeX_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerTeX_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerTeX_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_RefreshProperties(void* self); +void QsciLexerTeX_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerTeX_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_WordCharacters(const void* self); +void QsciLexerTeX_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerTeX_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerTeX_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerTeX_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerTeX_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerTeX_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTeX_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTeX_Delete(QsciLexerTeX* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp index 0a94d636..e9416587 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerverilog.h" #include "_cgo_export.h" -QsciLexerVerilog* QsciLexerVerilog_new() { - return new QsciLexerVerilog(); +class MiqtVirtualQsciLexerVerilog : public virtual QsciLexerVerilog { +public: + + MiqtVirtualQsciLexerVerilog(): QsciLexerVerilog() {}; + MiqtVirtualQsciLexerVerilog(QObject* parent): QsciLexerVerilog(parent) {}; + + virtual ~MiqtVirtualQsciLexerVerilog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerVerilog::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerVerilog::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerVerilog::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerVerilog::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerVerilog::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerVerilog::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerVerilog::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerVerilog_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerVerilog::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerVerilog::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerVerilog::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerVerilog::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerVerilog::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerVerilog::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerVerilog::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerVerilog::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerVerilog::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerVerilog::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerVerilog::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerVerilog::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerVerilog::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerVerilog::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerVerilog::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerVerilog::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerVerilog::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerVerilog::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerVerilog::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerVerilog::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerVerilog::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerVerilog::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerVerilog::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerVerilog::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerVerilog::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerVerilog_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerVerilog::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerVerilog::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerVerilog::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerVerilog::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerVerilog::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerVerilog::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerVerilog::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerVerilog::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerVerilog::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerVerilog::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerVerilog::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerVerilog_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerVerilog::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerVerilog::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerVerilog_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerVerilog::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerVerilog::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerVerilog::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerVerilog::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerVerilog::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerVerilog::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerVerilog_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerVerilog::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerVerilog::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerVerilog::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerVerilog::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerVerilog::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerVerilog::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerVerilog::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerVerilog::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerVerilog::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerVerilog::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVerilog::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerVerilog::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVerilog::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(); + *outptr_QsciLexerVerilog = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent) { - return new QsciLexerVerilog(parent); +void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(parent); + *outptr_QsciLexerVerilog = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self) { @@ -182,7 +1018,275 @@ struct miqt_string QsciLexerVerilog_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QsciLexerVerilog_Delete(QsciLexerVerilog* self) { - delete self; +void QsciLexerVerilog_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Language = slot; +} + +void QsciLexerVerilog_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerVerilog_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerVerilog_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__LexerId = slot; +} + +int QsciLexerVerilog_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerVerilog_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerVerilog_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerVerilog_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerVerilog_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerVerilog_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerVerilog_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerVerilog_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerVerilog_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerVerilog_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerVerilog_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerVerilog_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerVerilog_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerVerilog_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerVerilog_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerVerilog_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerVerilog_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerVerilog_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerVerilog_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Color(style); +} + +void QsciLexerVerilog_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerVerilog_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerVerilog_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerVerilog_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Font(style); +} + +void QsciLexerVerilog_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerVerilog_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerVerilog_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerVerilog_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerVerilog_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerVerilog_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerVerilog_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Description = slot; +} + +void QsciLexerVerilog_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerVerilog_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerVerilog_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerVerilog_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerVerilog_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerVerilog_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerVerilog_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerVerilog_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerVerilog_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerVerilog_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerVerilog_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerVerilog_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerVerilog_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerVerilog_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerVerilog_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerVerilog_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerVerilog_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerVerilog_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerVerilog_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerVerilog_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerVerilog_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetColor = slot; +} + +void QsciLexerVerilog_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerVerilog_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerVerilog_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerVerilog_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetFont = slot; +} + +void QsciLexerVerilog_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerVerilog_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerVerilog_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerVerilog_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerVerilog_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerVerilog_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerVerilog_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerVerilog_Delete(QsciLexerVerilog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go index eea5c1ef..e4b75800 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -58,7 +59,8 @@ const ( ) type QsciLexerVerilog struct { - h *C.QsciLexerVerilog + h *C.QsciLexerVerilog + isSubclass bool *QsciLexer } @@ -76,27 +78,47 @@ func (this *QsciLexerVerilog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerVerilog(h *C.QsciLexerVerilog) *QsciLexerVerilog { +// newQsciLexerVerilog constructs the type using only CGO pointers. +func newQsciLexerVerilog(h *C.QsciLexerVerilog, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVerilog { if h == nil { return nil } - return &QsciLexerVerilog{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerVerilog{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerVerilog(h unsafe.Pointer) *QsciLexerVerilog { - return newQsciLexerVerilog((*C.QsciLexerVerilog)(h)) +// UnsafeNewQsciLexerVerilog constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerVerilog(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVerilog { + if h == nil { + return nil + } + + return &QsciLexerVerilog{h: (*C.QsciLexerVerilog)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerVerilog constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog() *QsciLexerVerilog { - ret := C.QsciLexerVerilog_new() - return newQsciLexerVerilog(ret) + var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVerilog_new(&outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerVerilog2 constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog2(parent *qt.QObject) *QsciLexerVerilog { - ret := C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerVerilog(ret) + var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerVerilog) MetaObject() *qt.QMetaObject { @@ -271,9 +293,894 @@ func QsciLexerVerilog_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerVerilog) callVirtualBase_Language() string { + + _ret := C.QsciLexerVerilog_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnLanguage(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Language +func miqt_exec_callback_QsciLexerVerilog_Language(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerVerilog_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnLexer(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Lexer +func miqt_exec_callback_QsciLexerVerilog_Lexer(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerVerilog_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnLexerId(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_LexerId +func miqt_exec_callback_QsciLexerVerilog_LexerId(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerVerilog_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_AutoCompletionFillups +func miqt_exec_callback_QsciLexerVerilog_AutoCompletionFillups(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerVerilog_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerVerilog) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerVerilog_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerVerilog_AutoCompletionWordSeparators(self *C.QsciLexerVerilog, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerVerilog_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVerilog_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockEnd +func miqt_exec_callback_QsciLexerVerilog_BlockEnd(self *C.QsciLexerVerilog, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerVerilog_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockLookback +func miqt_exec_callback_QsciLexerVerilog_BlockLookback(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerVerilog_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVerilog_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockStart +func miqt_exec_callback_QsciLexerVerilog_BlockStart(self *C.QsciLexerVerilog, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerVerilog_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVerilog_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockStartKeyword +func miqt_exec_callback_QsciLexerVerilog_BlockStartKeyword(self *C.QsciLexerVerilog, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerVerilog_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BraceStyle +func miqt_exec_callback_QsciLexerVerilog_BraceStyle(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerVerilog_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerVerilog_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_CaseSensitive +func miqt_exec_callback_QsciLexerVerilog_CaseSensitive(self *C.QsciLexerVerilog, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVerilog_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Color +func miqt_exec_callback_QsciLexerVerilog_Color(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerVerilog_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVerilog) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVerilog_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_EolFill +func miqt_exec_callback_QsciLexerVerilog_EolFill(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerVerilog_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerVerilog_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Font +func miqt_exec_callback_QsciLexerVerilog_Font(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerVerilog_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_IndentationGuideView +func miqt_exec_callback_QsciLexerVerilog_IndentationGuideView(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerVerilog_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerVerilog_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Keywords +func miqt_exec_callback_QsciLexerVerilog_Keywords(self *C.QsciLexerVerilog, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerVerilog_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultStyle(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerVerilog_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerVerilog) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerVerilog_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Description +func miqt_exec_callback_QsciLexerVerilog_Description(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerVerilog) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVerilog_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Paper +func miqt_exec_callback_QsciLexerVerilog_Paper(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVerilog_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultColorWithStyle(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerVerilog_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVerilog) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVerilog_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultEolFill +func miqt_exec_callback_QsciLexerVerilog_DefaultEolFill(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerVerilog_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerVerilog_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultFontWithStyle(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVerilog_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultPaperWithStyle(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerVerilog_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerVerilog) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerVerilog_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetEditor +func miqt_exec_callback_QsciLexerVerilog_SetEditor(self *C.QsciLexerVerilog, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerVerilog) callVirtualBase_RefreshProperties() { + + C.QsciLexerVerilog_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerVerilog) OnRefreshProperties(slot func(super func())) { + C.QsciLexerVerilog_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_RefreshProperties +func miqt_exec_callback_QsciLexerVerilog_RefreshProperties(self *C.QsciLexerVerilog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerVerilog) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerVerilog_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_StyleBitsNeeded +func miqt_exec_callback_QsciLexerVerilog_StyleBitsNeeded(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerVerilog_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_WordCharacters +func miqt_exec_callback_QsciLexerVerilog_WordCharacters(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerVerilog_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerVerilog) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerVerilog_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerVerilog_SetAutoIndentStyle(self *C.QsciLexerVerilog, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerVerilog_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerVerilog_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetColor +func miqt_exec_callback_QsciLexerVerilog_SetColor(self *C.QsciLexerVerilog, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerVerilog_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerVerilog_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetEolFill +func miqt_exec_callback_QsciLexerVerilog_SetEolFill(self *C.QsciLexerVerilog, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerVerilog_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerVerilog_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetFont +func miqt_exec_callback_QsciLexerVerilog_SetFont(self *C.QsciLexerVerilog, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerVerilog_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerVerilog_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetPaper +func miqt_exec_callback_QsciLexerVerilog_SetPaper(self *C.QsciLexerVerilog, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVerilog_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVerilog) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerVerilog_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_ReadProperties +func miqt_exec_callback_QsciLexerVerilog_ReadProperties(self *C.QsciLexerVerilog, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVerilog_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVerilog) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerVerilog_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_WriteProperties +func miqt_exec_callback_QsciLexerVerilog_WriteProperties(self *C.QsciLexerVerilog, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerVerilog) Delete() { - C.QsciLexerVerilog_Delete(this.h) + C.QsciLexerVerilog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h index abe71b30..b52a0ca0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerVerilog; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerVerilog QsciLexerVerilog; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerVerilog* QsciLexerVerilog_new(); -QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent); +void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self); void* QsciLexerVerilog_Metacast(QsciLexerVerilog* self, const char* param1); struct miqt_string QsciLexerVerilog_Tr(const char* s); @@ -59,7 +65,75 @@ struct miqt_string QsciLexerVerilog_Tr2(const char* s, const char* c); struct miqt_string QsciLexerVerilog_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerVerilog_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerVerilog_TrUtf83(const char* s, const char* c, int n); -void QsciLexerVerilog_Delete(QsciLexerVerilog* self); +void QsciLexerVerilog_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_Language(const void* self); +void QsciLexerVerilog_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_Lexer(const void* self); +void QsciLexerVerilog_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_LexerId(const void* self); +void QsciLexerVerilog_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerVerilog_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerVerilog_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerVerilog_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerVerilog_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_BlockLookback(const void* self); +void QsciLexerVerilog_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerVerilog_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerVerilog_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_BraceStyle(const void* self); +void QsciLexerVerilog_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_CaseSensitive(const void* self); +void QsciLexerVerilog_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_Color(const void* self, int style); +void QsciLexerVerilog_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_EolFill(const void* self, int style); +void QsciLexerVerilog_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerVerilog_virtualbase_Font(const void* self, int style); +void QsciLexerVerilog_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_IndentationGuideView(const void* self); +void QsciLexerVerilog_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_Keywords(const void* self, int set); +void QsciLexerVerilog_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_DefaultStyle(const void* self); +void QsciLexerVerilog_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerVerilog_virtualbase_Description(const void* self, int style); +void QsciLexerVerilog_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_Paper(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerVerilog_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerVerilog_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerVerilog_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_RefreshProperties(void* self); +void QsciLexerVerilog_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerVerilog_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_WordCharacters(const void* self); +void QsciLexerVerilog_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerVerilog_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerVerilog_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerVerilog_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerVerilog_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerVerilog_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVerilog_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVerilog_Delete(QsciLexerVerilog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp index bc11837d..ca8eb589 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,966 @@ #include "gen_qscilexervhdl.h" #include "_cgo_export.h" -QsciLexerVHDL* QsciLexerVHDL_new() { - return new QsciLexerVHDL(); +class MiqtVirtualQsciLexerVHDL : public virtual QsciLexerVHDL { +public: + + MiqtVirtualQsciLexerVHDL(): QsciLexerVHDL() {}; + MiqtVirtualQsciLexerVHDL(QObject* parent): QsciLexerVHDL(parent) {}; + + virtual ~MiqtVirtualQsciLexerVHDL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerVHDL::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerVHDL::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerVHDL::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerVHDL::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerVHDL::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerVHDL::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtBegin = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtBegin(bool fold) override { + if (handle__SetFoldAtBegin == 0) { + QsciLexerVHDL::setFoldAtBegin(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldAtBegin(this, handle__SetFoldAtBegin, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtBegin(bool fold) { + + QsciLexerVHDL::setFoldAtBegin(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtParenthesis = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtParenthesis(bool fold) override { + if (handle__SetFoldAtParenthesis == 0) { + QsciLexerVHDL::setFoldAtParenthesis(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis(this, handle__SetFoldAtParenthesis, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtParenthesis(bool fold) { + + QsciLexerVHDL::setFoldAtParenthesis(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerVHDL::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerVHDL::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerVHDL::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerVHDL::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerVHDL::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerVHDL::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerVHDL::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerVHDL_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerVHDL::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerVHDL::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerVHDL::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerVHDL::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerVHDL::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerVHDL::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerVHDL::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerVHDL::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerVHDL::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerVHDL::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerVHDL::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerVHDL::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerVHDL::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerVHDL::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerVHDL::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerVHDL::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerVHDL::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerVHDL::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerVHDL::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerVHDL::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerVHDL::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerVHDL::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerVHDL::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerVHDL::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerVHDL::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerVHDL_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerVHDL::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerVHDL::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerVHDL::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerVHDL::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerVHDL::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerVHDL::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerVHDL::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerVHDL::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerVHDL::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerVHDL::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerVHDL::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerVHDL_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerVHDL::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerVHDL::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerVHDL_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerVHDL::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerVHDL::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerVHDL::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerVHDL::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerVHDL::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerVHDL::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerVHDL_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerVHDL::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerVHDL::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerVHDL::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerVHDL::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerVHDL::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerVHDL::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerVHDL::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerVHDL::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerVHDL::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerVHDL::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVHDL::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerVHDL::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVHDL::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(); + *outptr_QsciLexerVHDL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent) { - return new QsciLexerVHDL(parent); +void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(parent); + *outptr_QsciLexerVHDL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self) { @@ -178,7 +1134,315 @@ struct miqt_string QsciLexerVHDL_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerVHDL_Delete(QsciLexerVHDL* self) { - delete self; +void QsciLexerVHDL_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldAtBegin(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldAtBegin = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldAtBegin(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldAtBegin(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldAtParenthesis(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldAtParenthesis = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldAtParenthesis(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldAtParenthesis(fold); +} + +void QsciLexerVHDL_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Language = slot; +} + +void QsciLexerVHDL_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerVHDL_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerVHDL_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__LexerId = slot; +} + +int QsciLexerVHDL_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerVHDL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerVHDL_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerVHDL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerVHDL_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerVHDL_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerVHDL_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerVHDL_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerVHDL_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerVHDL_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerVHDL_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerVHDL_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerVHDL_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerVHDL_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerVHDL_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerVHDL_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerVHDL_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerVHDL_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerVHDL_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Color(style); +} + +void QsciLexerVHDL_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerVHDL_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerVHDL_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerVHDL_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Font(style); +} + +void QsciLexerVHDL_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerVHDL_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerVHDL_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerVHDL_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerVHDL_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerVHDL_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerVHDL_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Description = slot; +} + +void QsciLexerVHDL_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerVHDL_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerVHDL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerVHDL_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerVHDL_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerVHDL_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerVHDL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerVHDL_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerVHDL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerVHDL_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerVHDL_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerVHDL_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerVHDL_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerVHDL_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerVHDL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerVHDL_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerVHDL_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerVHDL_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerVHDL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerVHDL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerVHDL_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetColor = slot; +} + +void QsciLexerVHDL_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerVHDL_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerVHDL_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerVHDL_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFont = slot; +} + +void QsciLexerVHDL_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerVHDL_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerVHDL_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerVHDL_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerVHDL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerVHDL_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerVHDL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerVHDL_Delete(QsciLexerVHDL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go index 9ab5fdb6..6b56f73b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -36,7 +37,8 @@ const ( ) type QsciLexerVHDL struct { - h *C.QsciLexerVHDL + h *C.QsciLexerVHDL + isSubclass bool *QsciLexer } @@ -54,27 +56,47 @@ func (this *QsciLexerVHDL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerVHDL(h *C.QsciLexerVHDL) *QsciLexerVHDL { +// newQsciLexerVHDL constructs the type using only CGO pointers. +func newQsciLexerVHDL(h *C.QsciLexerVHDL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVHDL { if h == nil { return nil } - return &QsciLexerVHDL{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerVHDL{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerVHDL(h unsafe.Pointer) *QsciLexerVHDL { - return newQsciLexerVHDL((*C.QsciLexerVHDL)(h)) +// UnsafeNewQsciLexerVHDL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerVHDL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVHDL { + if h == nil { + return nil + } + + return &QsciLexerVHDL{h: (*C.QsciLexerVHDL)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerVHDL constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL() *QsciLexerVHDL { - ret := C.QsciLexerVHDL_new() - return newQsciLexerVHDL(ret) + var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVHDL_new(&outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerVHDL2 constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL2(parent *qt.QObject) *QsciLexerVHDL { - ret := C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerVHDL(ret) + var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerVHDL) MetaObject() *qt.QMetaObject { @@ -244,9 +266,1009 @@ func QsciLexerVHDL_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerVHDL) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldComments +func miqt_exec_callback_QsciLexerVHDL_SetFoldComments(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldCompact +func miqt_exec_callback_QsciLexerVHDL_SetFoldCompact(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldAtElse +func miqt_exec_callback_QsciLexerVHDL_SetFoldAtElse(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldAtBegin(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldAtBegin(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldAtBegin(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldAtBegin(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldAtBegin +func miqt_exec_callback_QsciLexerVHDL_SetFoldAtBegin(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldAtBegin, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldAtParenthesis(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldAtParenthesis(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldAtParenthesis(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldAtParenthesis(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis +func miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldAtParenthesis, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Language() string { + + _ret := C.QsciLexerVHDL_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnLanguage(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Language +func miqt_exec_callback_QsciLexerVHDL_Language(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerVHDL_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnLexer(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Lexer +func miqt_exec_callback_QsciLexerVHDL_Lexer(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerVHDL_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnLexerId(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_LexerId +func miqt_exec_callback_QsciLexerVHDL_LexerId(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerVHDL_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_AutoCompletionFillups +func miqt_exec_callback_QsciLexerVHDL_AutoCompletionFillups(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerVHDL_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerVHDL) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerVHDL_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerVHDL_AutoCompletionWordSeparators(self *C.QsciLexerVHDL, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerVHDL_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVHDL_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockEnd +func miqt_exec_callback_QsciLexerVHDL_BlockEnd(self *C.QsciLexerVHDL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerVHDL_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockLookback +func miqt_exec_callback_QsciLexerVHDL_BlockLookback(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerVHDL_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVHDL_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockStart +func miqt_exec_callback_QsciLexerVHDL_BlockStart(self *C.QsciLexerVHDL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerVHDL_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVHDL_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockStartKeyword +func miqt_exec_callback_QsciLexerVHDL_BlockStartKeyword(self *C.QsciLexerVHDL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerVHDL_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BraceStyle +func miqt_exec_callback_QsciLexerVHDL_BraceStyle(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerVHDL_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerVHDL_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_CaseSensitive +func miqt_exec_callback_QsciLexerVHDL_CaseSensitive(self *C.QsciLexerVHDL, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVHDL_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Color +func miqt_exec_callback_QsciLexerVHDL_Color(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerVHDL_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVHDL) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVHDL_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_EolFill +func miqt_exec_callback_QsciLexerVHDL_EolFill(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerVHDL_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerVHDL_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Font +func miqt_exec_callback_QsciLexerVHDL_Font(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerVHDL_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_IndentationGuideView +func miqt_exec_callback_QsciLexerVHDL_IndentationGuideView(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerVHDL_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerVHDL_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Keywords +func miqt_exec_callback_QsciLexerVHDL_Keywords(self *C.QsciLexerVHDL, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerVHDL_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultStyle(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerVHDL_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerVHDL) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerVHDL_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Description +func miqt_exec_callback_QsciLexerVHDL_Description(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerVHDL) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVHDL_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Paper +func miqt_exec_callback_QsciLexerVHDL_Paper(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVHDL_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultColorWithStyle(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerVHDL_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVHDL) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVHDL_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultEolFill +func miqt_exec_callback_QsciLexerVHDL_DefaultEolFill(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerVHDL_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerVHDL_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultFontWithStyle(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerVHDL_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultPaperWithStyle(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerVHDL_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerVHDL) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerVHDL_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetEditor +func miqt_exec_callback_QsciLexerVHDL_SetEditor(self *C.QsciLexerVHDL, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_RefreshProperties() { + + C.QsciLexerVHDL_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerVHDL) OnRefreshProperties(slot func(super func())) { + C.QsciLexerVHDL_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_RefreshProperties +func miqt_exec_callback_QsciLexerVHDL_RefreshProperties(self *C.QsciLexerVHDL, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerVHDL) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerVHDL_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_StyleBitsNeeded +func miqt_exec_callback_QsciLexerVHDL_StyleBitsNeeded(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerVHDL_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_WordCharacters +func miqt_exec_callback_QsciLexerVHDL_WordCharacters(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerVHDL_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerVHDL) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerVHDL_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerVHDL_SetAutoIndentStyle(self *C.QsciLexerVHDL, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerVHDL_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerVHDL_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetColor +func miqt_exec_callback_QsciLexerVHDL_SetColor(self *C.QsciLexerVHDL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerVHDL_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerVHDL_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetEolFill +func miqt_exec_callback_QsciLexerVHDL_SetEolFill(self *C.QsciLexerVHDL, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerVHDL_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerVHDL_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFont +func miqt_exec_callback_QsciLexerVHDL_SetFont(self *C.QsciLexerVHDL, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerVHDL_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerVHDL_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetPaper +func miqt_exec_callback_QsciLexerVHDL_SetPaper(self *C.QsciLexerVHDL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVHDL_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVHDL) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerVHDL_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_ReadProperties +func miqt_exec_callback_QsciLexerVHDL_ReadProperties(self *C.QsciLexerVHDL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVHDL_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVHDL) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerVHDL_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_WriteProperties +func miqt_exec_callback_QsciLexerVHDL_WriteProperties(self *C.QsciLexerVHDL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerVHDL) Delete() { - C.QsciLexerVHDL_Delete(this.h) + C.QsciLexerVHDL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h index 3859c463..5e178323 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerVHDL; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerVHDL QsciLexerVHDL; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerVHDL* QsciLexerVHDL_new(); -QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent); +void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self); void* QsciLexerVHDL_Metacast(QsciLexerVHDL* self, const char* param1); struct miqt_string QsciLexerVHDL_Tr(const char* s); @@ -58,7 +64,85 @@ struct miqt_string QsciLexerVHDL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerVHDL_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerVHDL_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerVHDL_TrUtf83(const char* s, const char* c, int n); -void QsciLexerVHDL_Delete(QsciLexerVHDL* self); +void QsciLexerVHDL_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldAtBegin(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldAtBegin(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldAtParenthesis(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldAtParenthesis(void* self, bool fold); +void QsciLexerVHDL_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_Language(const void* self); +void QsciLexerVHDL_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_Lexer(const void* self); +void QsciLexerVHDL_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_LexerId(const void* self); +void QsciLexerVHDL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerVHDL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerVHDL_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerVHDL_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerVHDL_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_BlockLookback(const void* self); +void QsciLexerVHDL_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerVHDL_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerVHDL_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_BraceStyle(const void* self); +void QsciLexerVHDL_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_CaseSensitive(const void* self); +void QsciLexerVHDL_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_Color(const void* self, int style); +void QsciLexerVHDL_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_EolFill(const void* self, int style); +void QsciLexerVHDL_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerVHDL_virtualbase_Font(const void* self, int style); +void QsciLexerVHDL_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_IndentationGuideView(const void* self); +void QsciLexerVHDL_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_Keywords(const void* self, int set); +void QsciLexerVHDL_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_DefaultStyle(const void* self); +void QsciLexerVHDL_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerVHDL_virtualbase_Description(const void* self, int style); +void QsciLexerVHDL_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_Paper(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerVHDL_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerVHDL_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerVHDL_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_RefreshProperties(void* self); +void QsciLexerVHDL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerVHDL_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_WordCharacters(const void* self); +void QsciLexerVHDL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerVHDL_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerVHDL_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerVHDL_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerVHDL_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerVHDL_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVHDL_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVHDL_Delete(QsciLexerVHDL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp index 76e92c34..331c0d61 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp @@ -9,12 +9,102 @@ #include "gen_qscilexerxml.h" #include "_cgo_export.h" -QsciLexerXML* QsciLexerXML_new() { - return new QsciLexerXML(); +class MiqtVirtualQsciLexerXML : public virtual QsciLexerXML { +public: + + MiqtVirtualQsciLexerXML(): QsciLexerXML() {}; + MiqtVirtualQsciLexerXML(QObject* parent): QsciLexerXML(parent) {}; + + virtual ~MiqtVirtualQsciLexerXML() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerXML::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerXML_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerXML::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerXML::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerXML_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerXML::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaseSensitiveTags = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaseSensitiveTags(bool sens) override { + if (handle__SetCaseSensitiveTags == 0) { + QsciLexerXML::setCaseSensitiveTags(sens); + return; + } + + bool sigval1 = sens; + + miqt_exec_callback_QsciLexerXML_SetCaseSensitiveTags(this, handle__SetCaseSensitiveTags, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaseSensitiveTags(bool sens) { + + QsciLexerXML::setCaseSensitiveTags(sens); + + } + +}; + +void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(); + *outptr_QsciLexerXML = ret; + *outptr_QsciLexerHTML = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerXML* QsciLexerXML_new2(QObject* parent) { - return new QsciLexerXML(parent); +void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(parent); + *outptr_QsciLexerXML = ret; + *outptr_QsciLexerHTML = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self) { @@ -131,7 +221,35 @@ struct miqt_string QsciLexerXML_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerXML_Delete(QsciLexerXML* self) { - delete self; +void QsciLexerXML_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerXML*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerXML_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerXML*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerXML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerXML*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerXML_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerXML*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerXML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerXML*)(self) )->handle__SetCaseSensitiveTags = slot; +} + +void QsciLexerXML_virtualbase_SetCaseSensitiveTags(void* self, bool sens) { + ( (MiqtVirtualQsciLexerXML*)(self) )->virtualbase_SetCaseSensitiveTags(sens); +} + +void QsciLexerXML_Delete(QsciLexerXML* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerxml.go b/qt-restricted-extras/qscintilla/gen_qscilexerxml.go index 8a59962f..c5d04038 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerxml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerxml.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerXML struct { - h *C.QsciLexerXML + h *C.QsciLexerXML + isSubclass bool *QsciLexerHTML } @@ -33,27 +35,49 @@ func (this *QsciLexerXML) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerXML(h *C.QsciLexerXML) *QsciLexerXML { +// newQsciLexerXML constructs the type using only CGO pointers. +func newQsciLexerXML(h *C.QsciLexerXML, h_QsciLexerHTML *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerXML { if h == nil { return nil } - return &QsciLexerXML{h: h, QsciLexerHTML: UnsafeNewQsciLexerHTML(unsafe.Pointer(h))} + return &QsciLexerXML{h: h, + QsciLexerHTML: newQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerXML(h unsafe.Pointer) *QsciLexerXML { - return newQsciLexerXML((*C.QsciLexerXML)(h)) +// UnsafeNewQsciLexerXML constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerXML(h unsafe.Pointer, h_QsciLexerHTML unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerXML { + if h == nil { + return nil + } + + return &QsciLexerXML{h: (*C.QsciLexerXML)(h), + QsciLexerHTML: UnsafeNewQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} } // NewQsciLexerXML constructs a new QsciLexerXML object. func NewQsciLexerXML() *QsciLexerXML { - ret := C.QsciLexerXML_new() - return newQsciLexerXML(ret) + var outptr_QsciLexerXML *C.QsciLexerXML = nil + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerXML_new(&outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerXML2 constructs a new QsciLexerXML object. func NewQsciLexerXML2(parent *qt.QObject) *QsciLexerXML { - ret := C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerXML(ret) + var outptr_QsciLexerXML *C.QsciLexerXML = nil + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerXML) MetaObject() *qt.QMetaObject { @@ -180,9 +204,78 @@ func QsciLexerXML_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerXML) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerXML_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerXML) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerXML_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerXML_SetFoldCompact +func miqt_exec_callback_QsciLexerXML_SetFoldCompact(self *C.QsciLexerXML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerXML{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerXML) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerXML_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerXML) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerXML_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerXML_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerXML_SetFoldPreprocessor(self *C.QsciLexerXML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerXML{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerXML) callVirtualBase_SetCaseSensitiveTags(sens bool) { + + C.QsciLexerXML_virtualbase_SetCaseSensitiveTags(unsafe.Pointer(this.h), (C.bool)(sens)) + +} +func (this *QsciLexerXML) OnSetCaseSensitiveTags(slot func(super func(sens bool), sens bool)) { + C.QsciLexerXML_override_virtual_SetCaseSensitiveTags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerXML_SetCaseSensitiveTags +func miqt_exec_callback_QsciLexerXML_SetCaseSensitiveTags(self *C.QsciLexerXML, cb C.intptr_t, sens C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sens bool), sens bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(sens) + + gofunc((&QsciLexerXML{h: self}).callVirtualBase_SetCaseSensitiveTags, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerXML) Delete() { - C.QsciLexerXML_Delete(this.h) + C.QsciLexerXML_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerxml.h b/qt-restricted-extras/qscintilla/gen_qscilexerxml.h index 112beb51..7b8c6d04 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerxml.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerxml.h @@ -19,17 +19,21 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerHTML; class QsciLexerXML; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerHTML QsciLexerHTML; typedef struct QsciLexerXML QsciLexerXML; #endif -QsciLexerXML* QsciLexerXML_new(); -QsciLexerXML* QsciLexerXML_new2(QObject* parent); +void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self); void* QsciLexerXML_Metacast(QsciLexerXML* self, const char* param1); struct miqt_string QsciLexerXML_Tr(const char* s); @@ -48,7 +52,13 @@ struct miqt_string QsciLexerXML_Tr2(const char* s, const char* c); struct miqt_string QsciLexerXML_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerXML_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerXML_TrUtf83(const char* s, const char* c, int n); -void QsciLexerXML_Delete(QsciLexerXML* self); +void QsciLexerXML_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerXML_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerXML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerXML_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerXML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot); +void QsciLexerXML_virtualbase_SetCaseSensitiveTags(void* self, bool sens); +void QsciLexerXML_Delete(QsciLexerXML* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp index 5fe8083a..1ee12c67 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexeryaml.h" #include "_cgo_export.h" -QsciLexerYAML* QsciLexerYAML_new() { - return new QsciLexerYAML(); +class MiqtVirtualQsciLexerYAML : public virtual QsciLexerYAML { +public: + + MiqtVirtualQsciLexerYAML(): QsciLexerYAML() {}; + MiqtVirtualQsciLexerYAML(QObject* parent): QsciLexerYAML(parent) {}; + + virtual ~MiqtVirtualQsciLexerYAML() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerYAML::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerYAML_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerYAML::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerYAML::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerYAML::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerYAML::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerYAML::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerYAML::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerYAML::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerYAML::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerYAML_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerYAML::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerYAML::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerYAML::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerYAML::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerYAML::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerYAML::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerYAML::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerYAML::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerYAML::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerYAML::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerYAML::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerYAML::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerYAML::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerYAML::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerYAML::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerYAML::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerYAML::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerYAML::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerYAML_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerYAML::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerYAML::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerYAML::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerYAML::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerYAML::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerYAML::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerYAML::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerYAML_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerYAML::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerYAML::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerYAML::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerYAML::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerYAML::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerYAML::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerYAML::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerYAML::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerYAML::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerYAML::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerYAML::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerYAML_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerYAML::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerYAML::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerYAML_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerYAML::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerYAML::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerYAML::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerYAML::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerYAML::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerYAML::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerYAML_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerYAML::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerYAML::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerYAML::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerYAML::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerYAML::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerYAML::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerYAML::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerYAML::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerYAML::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerYAML::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerYAML::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerYAML::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerYAML::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(); + *outptr_QsciLexerYAML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerYAML* QsciLexerYAML_new2(QObject* parent) { - return new QsciLexerYAML(parent); +void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(parent); + *outptr_QsciLexerYAML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self) { @@ -142,7 +1002,283 @@ struct miqt_string QsciLexerYAML_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciLexerYAML_Delete(QsciLexerYAML* self) { - delete self; +void QsciLexerYAML_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerYAML_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerYAML_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Language = slot; +} + +void QsciLexerYAML_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerYAML_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerYAML_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__LexerId = slot; +} + +int QsciLexerYAML_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerYAML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerYAML_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerYAML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerYAML_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerYAML_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerYAML_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerYAML_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerYAML_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerYAML_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerYAML_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerYAML_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerYAML_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerYAML_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerYAML_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerYAML_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerYAML_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerYAML_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerYAML_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Color(style); +} + +void QsciLexerYAML_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerYAML_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerYAML_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerYAML_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Font(style); +} + +void QsciLexerYAML_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerYAML_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerYAML_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerYAML_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerYAML_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerYAML_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerYAML_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Description = slot; +} + +void QsciLexerYAML_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerYAML_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerYAML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerYAML_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerYAML_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerYAML_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerYAML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerYAML_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerYAML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerYAML_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerYAML_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerYAML_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerYAML_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerYAML_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerYAML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerYAML_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerYAML_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerYAML_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerYAML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerYAML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerYAML_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetColor = slot; +} + +void QsciLexerYAML_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerYAML_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerYAML_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerYAML_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetFont = slot; +} + +void QsciLexerYAML_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerYAML_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerYAML_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerYAML_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerYAML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerYAML_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerYAML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerYAML_Delete(QsciLexerYAML* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go index 9b488cf5..8bd2e49e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -30,7 +31,8 @@ const ( ) type QsciLexerYAML struct { - h *C.QsciLexerYAML + h *C.QsciLexerYAML + isSubclass bool *QsciLexer } @@ -48,27 +50,47 @@ func (this *QsciLexerYAML) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerYAML(h *C.QsciLexerYAML) *QsciLexerYAML { +// newQsciLexerYAML constructs the type using only CGO pointers. +func newQsciLexerYAML(h *C.QsciLexerYAML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerYAML { if h == nil { return nil } - return &QsciLexerYAML{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerYAML{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerYAML(h unsafe.Pointer) *QsciLexerYAML { - return newQsciLexerYAML((*C.QsciLexerYAML)(h)) +// UnsafeNewQsciLexerYAML constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerYAML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerYAML { + if h == nil { + return nil + } + + return &QsciLexerYAML{h: (*C.QsciLexerYAML)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerYAML constructs a new QsciLexerYAML object. func NewQsciLexerYAML() *QsciLexerYAML { - ret := C.QsciLexerYAML_new() - return newQsciLexerYAML(ret) + var outptr_QsciLexerYAML *C.QsciLexerYAML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerYAML_new(&outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerYAML2 constructs a new QsciLexerYAML object. func NewQsciLexerYAML2(parent *qt.QObject) *QsciLexerYAML { - ret := C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerYAML(ret) + var outptr_QsciLexerYAML *C.QsciLexerYAML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerYAML) MetaObject() *qt.QMetaObject { @@ -202,9 +224,917 @@ func QsciLexerYAML_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciLexerYAML) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerYAML_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerYAML) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerYAML_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetFoldComments +func miqt_exec_callback_QsciLexerYAML_SetFoldComments(self *C.QsciLexerYAML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerYAML) callVirtualBase_Language() string { + + _ret := C.QsciLexerYAML_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnLanguage(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Language +func miqt_exec_callback_QsciLexerYAML_Language(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerYAML_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnLexer(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Lexer +func miqt_exec_callback_QsciLexerYAML_Lexer(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerYAML_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnLexerId(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_LexerId +func miqt_exec_callback_QsciLexerYAML_LexerId(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerYAML_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_AutoCompletionFillups +func miqt_exec_callback_QsciLexerYAML_AutoCompletionFillups(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerYAML_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerYAML) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerYAML_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerYAML_AutoCompletionWordSeparators(self *C.QsciLexerYAML, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerYAML_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerYAML_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockEnd +func miqt_exec_callback_QsciLexerYAML_BlockEnd(self *C.QsciLexerYAML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerYAML_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockLookback +func miqt_exec_callback_QsciLexerYAML_BlockLookback(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerYAML_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerYAML_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockStart +func miqt_exec_callback_QsciLexerYAML_BlockStart(self *C.QsciLexerYAML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerYAML_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerYAML_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockStartKeyword +func miqt_exec_callback_QsciLexerYAML_BlockStartKeyword(self *C.QsciLexerYAML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerYAML_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BraceStyle +func miqt_exec_callback_QsciLexerYAML_BraceStyle(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerYAML_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerYAML_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_CaseSensitive +func miqt_exec_callback_QsciLexerYAML_CaseSensitive(self *C.QsciLexerYAML, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerYAML_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerYAML_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Color +func miqt_exec_callback_QsciLexerYAML_Color(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerYAML_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerYAML) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerYAML_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_EolFill +func miqt_exec_callback_QsciLexerYAML_EolFill(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerYAML_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerYAML_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Font +func miqt_exec_callback_QsciLexerYAML_Font(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerYAML_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_IndentationGuideView +func miqt_exec_callback_QsciLexerYAML_IndentationGuideView(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerYAML_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerYAML_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Keywords +func miqt_exec_callback_QsciLexerYAML_Keywords(self *C.QsciLexerYAML, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerYAML_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultStyle +func miqt_exec_callback_QsciLexerYAML_DefaultStyle(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerYAML_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerYAML) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerYAML_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Description +func miqt_exec_callback_QsciLexerYAML_Description(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerYAML) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerYAML_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerYAML_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Paper +func miqt_exec_callback_QsciLexerYAML_Paper(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerYAML_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerYAML_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerYAML_DefaultColorWithStyle(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerYAML_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerYAML) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerYAML_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultEolFill +func miqt_exec_callback_QsciLexerYAML_DefaultEolFill(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerYAML_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerYAML_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerYAML_DefaultFontWithStyle(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QFont, style int) *qt.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerYAML_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerYAML_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerYAML_DefaultPaperWithStyle(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt.QColor, style int) *qt.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerYAML_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerYAML) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerYAML_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetEditor +func miqt_exec_callback_QsciLexerYAML_SetEditor(self *C.QsciLexerYAML, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerYAML) callVirtualBase_RefreshProperties() { + + C.QsciLexerYAML_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerYAML) OnRefreshProperties(slot func(super func())) { + C.QsciLexerYAML_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_RefreshProperties +func miqt_exec_callback_QsciLexerYAML_RefreshProperties(self *C.QsciLexerYAML, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerYAML) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerYAML_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_StyleBitsNeeded +func miqt_exec_callback_QsciLexerYAML_StyleBitsNeeded(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerYAML_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_WordCharacters +func miqt_exec_callback_QsciLexerYAML_WordCharacters(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerYAML_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerYAML) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerYAML_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerYAML_SetAutoIndentStyle(self *C.QsciLexerYAML, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerYAML_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerYAML_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetColor +func miqt_exec_callback_QsciLexerYAML_SetColor(self *C.QsciLexerYAML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerYAML_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerYAML_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetEolFill +func miqt_exec_callback_QsciLexerYAML_SetEolFill(self *C.QsciLexerYAML, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerYAML_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerYAML_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetFont +func miqt_exec_callback_QsciLexerYAML_SetFont(self *C.QsciLexerYAML, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerYAML_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerYAML_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetPaper +func miqt_exec_callback_QsciLexerYAML_SetPaper(self *C.QsciLexerYAML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_ReadProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerYAML_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerYAML) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerYAML_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_ReadProperties +func miqt_exec_callback_QsciLexerYAML_ReadProperties(self *C.QsciLexerYAML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_WriteProperties(qs *qt.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerYAML_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerYAML) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerYAML_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_WriteProperties +func miqt_exec_callback_QsciLexerYAML_WriteProperties(self *C.QsciLexerYAML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerYAML) Delete() { - C.QsciLexerYAML_Delete(this.h) + C.QsciLexerYAML_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h index 3abd9c44..dd5dec7a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerYAML; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerYAML QsciLexerYAML; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerYAML* QsciLexerYAML_new(); -QsciLexerYAML* QsciLexerYAML_new2(QObject* parent); +void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self); void* QsciLexerYAML_Metacast(QsciLexerYAML* self, const char* param1); struct miqt_string QsciLexerYAML_Tr(const char* s); @@ -49,7 +55,77 @@ struct miqt_string QsciLexerYAML_Tr2(const char* s, const char* c); struct miqt_string QsciLexerYAML_Tr3(const char* s, const char* c, int n); struct miqt_string QsciLexerYAML_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexerYAML_TrUtf83(const char* s, const char* c, int n); -void QsciLexerYAML_Delete(QsciLexerYAML* self); +void QsciLexerYAML_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerYAML_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_Language(const void* self); +void QsciLexerYAML_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_Lexer(const void* self); +void QsciLexerYAML_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_LexerId(const void* self); +void QsciLexerYAML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerYAML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerYAML_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerYAML_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerYAML_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_BlockLookback(const void* self); +void QsciLexerYAML_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerYAML_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerYAML_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_BraceStyle(const void* self); +void QsciLexerYAML_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_CaseSensitive(const void* self); +void QsciLexerYAML_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_Color(const void* self, int style); +void QsciLexerYAML_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_EolFill(const void* self, int style); +void QsciLexerYAML_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerYAML_virtualbase_Font(const void* self, int style); +void QsciLexerYAML_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_IndentationGuideView(const void* self); +void QsciLexerYAML_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_Keywords(const void* self, int set); +void QsciLexerYAML_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_DefaultStyle(const void* self); +void QsciLexerYAML_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerYAML_virtualbase_Description(const void* self, int style); +void QsciLexerYAML_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_Paper(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerYAML_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerYAML_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerYAML_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_RefreshProperties(void* self); +void QsciLexerYAML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerYAML_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_WordCharacters(const void* self); +void QsciLexerYAML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerYAML_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerYAML_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerYAML_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerYAML_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerYAML_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerYAML_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerYAML_Delete(QsciLexerYAML* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscimacro.cpp b/qt-restricted-extras/qscintilla/gen_qscimacro.cpp index 4a999027..a6a59752 100644 --- a/qt-restricted-extras/qscintilla/gen_qscimacro.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscimacro.cpp @@ -1,18 +1,277 @@ +#include +#include +#include #include +#include #include #include #include +#include #include #include "gen_qscimacro.h" #include "_cgo_export.h" -QsciMacro* QsciMacro_new(QsciScintilla* parent) { - return new QsciMacro(parent); +class MiqtVirtualQsciMacro : public virtual QsciMacro { +public: + + MiqtVirtualQsciMacro(QsciScintilla* parent): QsciMacro(parent) {}; + MiqtVirtualQsciMacro(const QString& asc, QsciScintilla* parent): QsciMacro(asc, parent) {}; + + virtual ~MiqtVirtualQsciMacro() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Play = 0; + + // Subclass to allow providing a Go implementation + virtual void play() override { + if (handle__Play == 0) { + QsciMacro::play(); + return; + } + + + miqt_exec_callback_QsciMacro_Play(this, handle__Play); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Play() { + + QsciMacro::play(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartRecording = 0; + + // Subclass to allow providing a Go implementation + virtual void startRecording() override { + if (handle__StartRecording == 0) { + QsciMacro::startRecording(); + return; + } + + + miqt_exec_callback_QsciMacro_StartRecording(this, handle__StartRecording); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartRecording() { + + QsciMacro::startRecording(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EndRecording = 0; + + // Subclass to allow providing a Go implementation + virtual void endRecording() override { + if (handle__EndRecording == 0) { + QsciMacro::endRecording(); + return; + } + + + miqt_exec_callback_QsciMacro_EndRecording(this, handle__EndRecording); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EndRecording() { + + QsciMacro::endRecording(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QsciMacro::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QsciMacro_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QsciMacro::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QsciMacro::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QsciMacro_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QsciMacro::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QsciMacro::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QsciMacro_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QsciMacro::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QsciMacro::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QsciMacro_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QsciMacro::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QsciMacro::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QsciMacro_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QsciMacro::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QsciMacro::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciMacro_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QsciMacro::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QsciMacro::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciMacro_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QsciMacro::disconnectNotify(*signal); + + } + +}; + +void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { + MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(parent); + *outptr_QsciMacro = ret; + *outptr_QObject = static_cast(ret); } -QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent) { +void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { QString asc_QString = QString::fromUtf8(asc.data, asc.len); - return new QsciMacro(asc_QString, parent); + MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(asc_QString, parent); + *outptr_QsciMacro = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QsciMacro_MetaObject(const QsciMacro* self) { @@ -121,7 +380,91 @@ struct miqt_string QsciMacro_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QsciMacro_Delete(QsciMacro* self) { - delete self; +void QsciMacro_override_virtual_Play(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__Play = slot; +} + +void QsciMacro_virtualbase_Play(void* self) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_Play(); +} + +void QsciMacro_override_virtual_StartRecording(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__StartRecording = slot; +} + +void QsciMacro_virtualbase_StartRecording(void* self) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_StartRecording(); +} + +void QsciMacro_override_virtual_EndRecording(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__EndRecording = slot; +} + +void QsciMacro_virtualbase_EndRecording(void* self) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_EndRecording(); +} + +void QsciMacro_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__Event = slot; +} + +bool QsciMacro_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_Event(event); +} + +void QsciMacro_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__EventFilter = slot; +} + +bool QsciMacro_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QsciMacro_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__TimerEvent = slot; +} + +void QsciMacro_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_TimerEvent(event); +} + +void QsciMacro_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__ChildEvent = slot; +} + +void QsciMacro_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_ChildEvent(event); +} + +void QsciMacro_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__CustomEvent = slot; +} + +void QsciMacro_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_CustomEvent(event); +} + +void QsciMacro_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__ConnectNotify = slot; +} + +void QsciMacro_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QsciMacro_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__DisconnectNotify = slot; +} + +void QsciMacro_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QsciMacro_Delete(QsciMacro* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscimacro.go b/qt-restricted-extras/qscintilla/gen_qscimacro.go index 4a99ea7a..35638080 100644 --- a/qt-restricted-extras/qscintilla/gen_qscimacro.go +++ b/qt-restricted-extras/qscintilla/gen_qscimacro.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QsciMacro struct { - h *C.QsciMacro + h *C.QsciMacro + isSubclass bool *qt.QObject } @@ -33,21 +35,34 @@ func (this *QsciMacro) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciMacro(h *C.QsciMacro) *QsciMacro { +// newQsciMacro constructs the type using only CGO pointers. +func newQsciMacro(h *C.QsciMacro, h_QObject *C.QObject) *QsciMacro { if h == nil { return nil } - return &QsciMacro{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QsciMacro{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQsciMacro(h unsafe.Pointer) *QsciMacro { - return newQsciMacro((*C.QsciMacro)(h)) +// UnsafeNewQsciMacro constructs the type using only unsafe pointers. +func UnsafeNewQsciMacro(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciMacro { + if h == nil { + return nil + } + + return &QsciMacro{h: (*C.QsciMacro)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQsciMacro constructs a new QsciMacro object. func NewQsciMacro(parent *QsciScintilla) *QsciMacro { - ret := C.QsciMacro_new(parent.cPointer()) - return newQsciMacro(ret) + var outptr_QsciMacro *C.QsciMacro = nil + var outptr_QObject *C.QObject = nil + + C.QsciMacro_new(parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) + ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciMacro2 constructs a new QsciMacro object. @@ -56,8 +71,13 @@ func NewQsciMacro2(asc string, parent *QsciScintilla) *QsciMacro { asc_ms.data = C.CString(asc) asc_ms.len = C.size_t(len(asc)) defer C.free(unsafe.Pointer(asc_ms.data)) - ret := C.QsciMacro_new2(asc_ms, parent.cPointer()) - return newQsciMacro(ret) + var outptr_QsciMacro *C.QsciMacro = nil + var outptr_QObject *C.QObject = nil + + C.QsciMacro_new2(asc_ms, parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) + ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciMacro) MetaObject() *qt.QMetaObject { @@ -163,9 +183,235 @@ func QsciMacro_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QsciMacro) callVirtualBase_Play() { + + C.QsciMacro_virtualbase_Play(unsafe.Pointer(this.h)) + +} +func (this *QsciMacro) OnPlay(slot func(super func())) { + C.QsciMacro_override_virtual_Play(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_Play +func miqt_exec_callback_QsciMacro_Play(self *C.QsciMacro, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciMacro{h: self}).callVirtualBase_Play) + +} + +func (this *QsciMacro) callVirtualBase_StartRecording() { + + C.QsciMacro_virtualbase_StartRecording(unsafe.Pointer(this.h)) + +} +func (this *QsciMacro) OnStartRecording(slot func(super func())) { + C.QsciMacro_override_virtual_StartRecording(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_StartRecording +func miqt_exec_callback_QsciMacro_StartRecording(self *C.QsciMacro, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciMacro{h: self}).callVirtualBase_StartRecording) + +} + +func (this *QsciMacro) callVirtualBase_EndRecording() { + + C.QsciMacro_virtualbase_EndRecording(unsafe.Pointer(this.h)) + +} +func (this *QsciMacro) OnEndRecording(slot func(super func())) { + C.QsciMacro_override_virtual_EndRecording(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_EndRecording +func miqt_exec_callback_QsciMacro_EndRecording(self *C.QsciMacro, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciMacro{h: self}).callVirtualBase_EndRecording) + +} + +func (this *QsciMacro) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QsciMacro_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciMacro) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QsciMacro_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_Event +func miqt_exec_callback_QsciMacro_Event(self *C.QsciMacro, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QsciMacro{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciMacro) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QsciMacro_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciMacro) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QsciMacro_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_EventFilter +func miqt_exec_callback_QsciMacro_EventFilter(self *C.QsciMacro, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QsciMacro{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciMacro) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QsciMacro_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QsciMacro) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QsciMacro_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_TimerEvent +func miqt_exec_callback_QsciMacro_TimerEvent(self *C.QsciMacro, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciMacro{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QsciMacro_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QsciMacro) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QsciMacro_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_ChildEvent +func miqt_exec_callback_QsciMacro_ChildEvent(self *C.QsciMacro, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciMacro{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QsciMacro_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QsciMacro) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QsciMacro_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_CustomEvent +func miqt_exec_callback_QsciMacro_CustomEvent(self *C.QsciMacro, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QsciMacro{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QsciMacro_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciMacro) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QsciMacro_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_ConnectNotify +func miqt_exec_callback_QsciMacro_ConnectNotify(self *C.QsciMacro, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QsciMacro{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QsciMacro_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciMacro) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QsciMacro_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_DisconnectNotify +func miqt_exec_callback_QsciMacro_DisconnectNotify(self *C.QsciMacro, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QsciMacro{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciMacro) Delete() { - C.QsciMacro_Delete(this.h) + C.QsciMacro_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscimacro.h b/qt-restricted-extras/qscintilla/gen_qscimacro.h index de295a3b..4193e937 100644 --- a/qt-restricted-extras/qscintilla/gen_qscimacro.h +++ b/qt-restricted-extras/qscintilla/gen_qscimacro.h @@ -15,17 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; +class QObject; +class QTimerEvent; class QsciMacro; class QsciScintilla; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QsciMacro QsciMacro; typedef struct QsciScintilla QsciScintilla; #endif -QsciMacro* QsciMacro_new(QsciScintilla* parent); -QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent); +void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); +void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); QMetaObject* QsciMacro_MetaObject(const QsciMacro* self); void* QsciMacro_Metacast(QsciMacro* self, const char* param1); struct miqt_string QsciMacro_Tr(const char* s); @@ -40,7 +50,27 @@ struct miqt_string QsciMacro_Tr2(const char* s, const char* c); struct miqt_string QsciMacro_Tr3(const char* s, const char* c, int n); struct miqt_string QsciMacro_TrUtf82(const char* s, const char* c); struct miqt_string QsciMacro_TrUtf83(const char* s, const char* c, int n); -void QsciMacro_Delete(QsciMacro* self); +void QsciMacro_override_virtual_Play(void* self, intptr_t slot); +void QsciMacro_virtualbase_Play(void* self); +void QsciMacro_override_virtual_StartRecording(void* self, intptr_t slot); +void QsciMacro_virtualbase_StartRecording(void* self); +void QsciMacro_override_virtual_EndRecording(void* self, intptr_t slot); +void QsciMacro_virtualbase_EndRecording(void* self); +void QsciMacro_override_virtual_Event(void* self, intptr_t slot); +bool QsciMacro_virtualbase_Event(void* self, QEvent* event); +void QsciMacro_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciMacro_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QsciMacro_override_virtual_TimerEvent(void* self, intptr_t slot); +void QsciMacro_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QsciMacro_override_virtual_ChildEvent(void* self, intptr_t slot); +void QsciMacro_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QsciMacro_override_virtual_CustomEvent(void* self, intptr_t slot); +void QsciMacro_virtualbase_CustomEvent(void* self, QEvent* event); +void QsciMacro_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QsciMacro_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QsciMacro_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QsciMacro_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QsciMacro_Delete(QsciMacro* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp b/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp index 2659aee8..e258bce7 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp @@ -1,15 +1,339 @@ +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins +#include +#include #include +#include #include +#include #include #include "gen_qsciprinter.h" #include "_cgo_export.h" -QsciPrinter* QsciPrinter_new() { - return new QsciPrinter(); +class MiqtVirtualQsciPrinter : public virtual QsciPrinter { +public: + + MiqtVirtualQsciPrinter(): QsciPrinter() {}; + MiqtVirtualQsciPrinter(QPrinter::PrinterMode mode): QsciPrinter(mode) {}; + + virtual ~MiqtVirtualQsciPrinter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FormatPage = 0; + + // Subclass to allow providing a Go implementation + virtual void formatPage(QPainter& painter, bool drawing, QRect& area, int pagenr) override { + if (handle__FormatPage == 0) { + QsciPrinter::formatPage(painter, drawing, area, pagenr); + return; + } + + QPainter& painter_ret = painter; + // Cast returned reference into pointer + QPainter* sigval1 = &painter_ret; + bool sigval2 = drawing; + QRect& area_ret = area; + // Cast returned reference into pointer + QRect* sigval3 = &area_ret; + int sigval4 = pagenr; + + miqt_exec_callback_QsciPrinter_FormatPage(this, handle__FormatPage, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FormatPage(QPainter* painter, bool drawing, QRect* area, int pagenr) { + + QsciPrinter::formatPage(*painter, drawing, *area, static_cast(pagenr)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMagnification = 0; + + // Subclass to allow providing a Go implementation + virtual void setMagnification(int magnification) override { + if (handle__SetMagnification == 0) { + QsciPrinter::setMagnification(magnification); + return; + } + + int sigval1 = magnification; + + miqt_exec_callback_QsciPrinter_SetMagnification(this, handle__SetMagnification, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMagnification(int magnification) { + + QsciPrinter::setMagnification(static_cast(magnification)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PrintRange = 0; + + // Subclass to allow providing a Go implementation + virtual int printRange(QsciScintillaBase* qsb, QPainter& painter, int from, int to) override { + if (handle__PrintRange == 0) { + return QsciPrinter::printRange(qsb, painter, from, to); + } + + QsciScintillaBase* sigval1 = qsb; + QPainter& painter_ret = painter; + // Cast returned reference into pointer + QPainter* sigval2 = &painter_ret; + int sigval3 = from; + int sigval4 = to; + + int callback_return_value = miqt_exec_callback_QsciPrinter_PrintRange(this, handle__PrintRange, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PrintRange(QsciScintillaBase* qsb, QPainter* painter, int from, int to) { + + return QsciPrinter::printRange(qsb, *painter, static_cast(from), static_cast(to)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PrintRange2 = 0; + + // Subclass to allow providing a Go implementation + virtual int printRange(QsciScintillaBase* qsb, int from, int to) override { + if (handle__PrintRange2 == 0) { + return QsciPrinter::printRange(qsb, from, to); + } + + QsciScintillaBase* sigval1 = qsb; + int sigval2 = from; + int sigval3 = to; + + int callback_return_value = miqt_exec_callback_QsciPrinter_PrintRange2(this, handle__PrintRange2, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PrintRange2(QsciScintillaBase* qsb, int from, int to) { + + return QsciPrinter::printRange(qsb, static_cast(from), static_cast(to)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetWrapMode = 0; + + // Subclass to allow providing a Go implementation + virtual void setWrapMode(QsciScintilla::WrapMode wmode) override { + if (handle__SetWrapMode == 0) { + QsciPrinter::setWrapMode(wmode); + return; + } + + QsciScintilla::WrapMode wmode_ret = wmode; + int sigval1 = static_cast(wmode_ret); + + miqt_exec_callback_QsciPrinter_SetWrapMode(this, handle__SetWrapMode, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetWrapMode(int wmode) { + + QsciPrinter::setWrapMode(static_cast(wmode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QsciPrinter::devType(); + } + + + int callback_return_value = miqt_exec_callback_QsciPrinter_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QsciPrinter::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSize(QPagedPaintDevice::PageSize pageSize) override { + if (handle__SetPageSize == 0) { + QsciPrinter::setPageSize(pageSize); + return; + } + + QPagedPaintDevice::PageSize pageSize_ret = pageSize; + int sigval1 = static_cast(pageSize_ret); + + miqt_exec_callback_QsciPrinter_SetPageSize(this, handle__SetPageSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSize(int pageSize) { + + QsciPrinter::setPageSize(static_cast(pageSize)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSizeMM = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSizeMM(const QSizeF& size) override { + if (handle__SetPageSizeMM == 0) { + QsciPrinter::setPageSizeMM(size); + return; + } + + const QSizeF& size_ret = size; + // Cast returned reference into pointer + QSizeF* sigval1 = const_cast(&size_ret); + + miqt_exec_callback_QsciPrinter_SetPageSizeMM(this, handle__SetPageSizeMM, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSizeMM(QSizeF* size) { + + QsciPrinter::setPageSizeMM(*size); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool newPage() override { + if (handle__NewPage == 0) { + return QsciPrinter::newPage(); + } + + + bool callback_return_value = miqt_exec_callback_QsciPrinter_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NewPage() { + + return QsciPrinter::newPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QsciPrinter::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QsciPrinter_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QsciPrinter::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void setMargins(const QPagedPaintDevice::Margins& m) override { + if (handle__SetMargins == 0) { + QsciPrinter::setMargins(m); + return; + } + + const QPagedPaintDevice::Margins& m_ret = m; + // Cast returned reference into pointer + QPagedPaintDevice__Margins* sigval1 = const_cast(&m_ret); + + miqt_exec_callback_QsciPrinter_SetMargins(this, handle__SetMargins, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMargins(QPagedPaintDevice__Margins* m) { + + QsciPrinter::setMargins(*m); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QsciPrinter::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QsciPrinter_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QsciPrinter::metric(static_cast(param1)); + + } + +}; + +void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(); + *outptr_QsciPrinter = ret; + *outptr_QPrinter = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QsciPrinter* QsciPrinter_new2(int mode) { - return new QsciPrinter(static_cast(mode)); +void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(static_cast(mode)); + *outptr_QsciPrinter = ret; + *outptr_QPrinter = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr) { @@ -24,12 +348,12 @@ void QsciPrinter_SetMagnification(QsciPrinter* self, int magnification) { self->setMagnification(static_cast(magnification)); } -int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter) { - return self->printRange(qsb, *painter); +int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to) { + return self->printRange(qsb, *painter, static_cast(from), static_cast(to)); } -int QsciPrinter_PrintRangeWithQsb(QsciPrinter* self, QsciScintillaBase* qsb) { - return self->printRange(qsb); +int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to) { + return self->printRange(qsb, static_cast(from), static_cast(to)); } int QsciPrinter_WrapMode(const QsciPrinter* self) { @@ -41,23 +365,107 @@ void QsciPrinter_SetWrapMode(QsciPrinter* self, int wmode) { self->setWrapMode(static_cast(wmode)); } -int QsciPrinter_PrintRange3(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from) { - return self->printRange(qsb, *painter, static_cast(from)); +void QsciPrinter_override_virtual_FormatPage(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__FormatPage = slot; } -int QsciPrinter_PrintRange4(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to) { - return self->printRange(qsb, *painter, static_cast(from), static_cast(to)); +void QsciPrinter_virtualbase_FormatPage(void* self, QPainter* painter, bool drawing, QRect* area, int pagenr) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_FormatPage(painter, drawing, area, pagenr); } -int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from) { - return self->printRange(qsb, static_cast(from)); +void QsciPrinter_override_virtual_SetMagnification(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetMagnification = slot; } -int QsciPrinter_PrintRange32(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to) { - return self->printRange(qsb, static_cast(from), static_cast(to)); +void QsciPrinter_virtualbase_SetMagnification(void* self, int magnification) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetMagnification(magnification); +} + +void QsciPrinter_override_virtual_PrintRange(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__PrintRange = slot; +} + +int QsciPrinter_virtualbase_PrintRange(void* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to) { + return ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_PrintRange(qsb, painter, from, to); +} + +void QsciPrinter_override_virtual_PrintRange2(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__PrintRange2 = slot; +} + +int QsciPrinter_virtualbase_PrintRange2(void* self, QsciScintillaBase* qsb, int from, int to) { + return ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_PrintRange2(qsb, from, to); +} + +void QsciPrinter_override_virtual_SetWrapMode(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetWrapMode = slot; +} + +void QsciPrinter_virtualbase_SetWrapMode(void* self, int wmode) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetWrapMode(wmode); +} + +void QsciPrinter_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__DevType = slot; +} + +int QsciPrinter_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQsciPrinter*)(self) )->virtualbase_DevType(); +} + +void QsciPrinter_override_virtual_SetPageSize(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetPageSize = slot; +} + +void QsciPrinter_virtualbase_SetPageSize(void* self, int pageSize) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetPageSize(pageSize); +} + +void QsciPrinter_override_virtual_SetPageSizeMM(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetPageSizeMM = slot; +} + +void QsciPrinter_virtualbase_SetPageSizeMM(void* self, QSizeF* size) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetPageSizeMM(size); +} + +void QsciPrinter_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__NewPage = slot; +} + +bool QsciPrinter_virtualbase_NewPage(void* self) { + return ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_NewPage(); +} + +void QsciPrinter_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QsciPrinter_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQsciPrinter*)(self) )->virtualbase_PaintEngine(); +} + +void QsciPrinter_override_virtual_SetMargins(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetMargins = slot; +} + +void QsciPrinter_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* m) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetMargins(m); +} + +void QsciPrinter_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__Metric = slot; +} + +int QsciPrinter_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQsciPrinter*)(self) )->virtualbase_Metric(param1); } -void QsciPrinter_Delete(QsciPrinter* self) { - delete self; +void QsciPrinter_Delete(QsciPrinter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qsciprinter.go b/qt-restricted-extras/qscintilla/gen_qsciprinter.go index 6add49e1..605848df 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciprinter.go +++ b/qt-restricted-extras/qscintilla/gen_qsciprinter.go @@ -12,11 +12,13 @@ import ( "github.com/mappu/miqt/qt" "github.com/mappu/miqt/qt/printsupport" "runtime" + "runtime/cgo" "unsafe" ) type QsciPrinter struct { - h *C.QsciPrinter + h *C.QsciPrinter + isSubclass bool *printsupport.QPrinter } @@ -34,27 +36,49 @@ func (this *QsciPrinter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciPrinter(h *C.QsciPrinter) *QsciPrinter { +// newQsciPrinter constructs the type using only CGO pointers. +func newQsciPrinter(h *C.QsciPrinter, h_QPrinter *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QsciPrinter { if h == nil { return nil } - return &QsciPrinter{h: h, QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(h))} + return &QsciPrinter{h: h, + QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(h_QPrinter), unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQsciPrinter(h unsafe.Pointer) *QsciPrinter { - return newQsciPrinter((*C.QsciPrinter)(h)) +// UnsafeNewQsciPrinter constructs the type using only unsafe pointers. +func UnsafeNewQsciPrinter(h unsafe.Pointer, h_QPrinter unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciPrinter { + if h == nil { + return nil + } + + return &QsciPrinter{h: (*C.QsciPrinter)(h), + QPrinter: printsupport.UnsafeNewQPrinter(h_QPrinter, h_QPagedPaintDevice, h_QPaintDevice)} } // NewQsciPrinter constructs a new QsciPrinter object. func NewQsciPrinter() *QsciPrinter { - ret := C.QsciPrinter_new() - return newQsciPrinter(ret) + var outptr_QsciPrinter *C.QsciPrinter = nil + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciPrinter_new(&outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQsciPrinter2 constructs a new QsciPrinter object. func NewQsciPrinter2(mode printsupport.QPrinter__PrinterMode) *QsciPrinter { - ret := C.QsciPrinter_new2((C.int)(mode)) - return newQsciPrinter(ret) + var outptr_QsciPrinter *C.QsciPrinter = nil + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciPrinter_new2((C.int)(mode), &outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QsciPrinter) FormatPage(painter *qt.QPainter, drawing bool, area *qt.QRect, pagenr int) { @@ -69,12 +93,12 @@ func (this *QsciPrinter) SetMagnification(magnification int) { C.QsciPrinter_SetMagnification(this.h, (C.int)(magnification)) } -func (this *QsciPrinter) PrintRange(qsb *QsciScintillaBase, painter *qt.QPainter) int { - return (int)(C.QsciPrinter_PrintRange(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()))) +func (this *QsciPrinter) PrintRange(qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int { + return (int)(C.QsciPrinter_PrintRange(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from), (C.int)(to))) } -func (this *QsciPrinter) PrintRangeWithQsb(qsb *QsciScintillaBase) int { - return (int)(C.QsciPrinter_PrintRangeWithQsb(this.h, qsb.cPointer())) +func (this *QsciPrinter) PrintRange2(qsb *QsciScintillaBase, from int, to int) int { + return (int)(C.QsciPrinter_PrintRange2(this.h, qsb.cPointer(), (C.int)(from), (C.int)(to))) } func (this *QsciPrinter) WrapMode() QsciScintilla__WrapMode { @@ -85,25 +109,298 @@ func (this *QsciPrinter) SetWrapMode(wmode QsciScintilla__WrapMode) { C.QsciPrinter_SetWrapMode(this.h, (C.int)(wmode)) } -func (this *QsciPrinter) PrintRange3(qsb *QsciScintillaBase, painter *qt.QPainter, from int) int { - return (int)(C.QsciPrinter_PrintRange3(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from))) +func (this *QsciPrinter) callVirtualBase_FormatPage(painter *qt.QPainter, drawing bool, area *qt.QRect, pagenr int) { + + C.QsciPrinter_virtualbase_FormatPage(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (C.bool)(drawing), (*C.QRect)(area.UnsafePointer()), (C.int)(pagenr)) + +} +func (this *QsciPrinter) OnFormatPage(slot func(super func(painter *qt.QPainter, drawing bool, area *qt.QRect, pagenr int), painter *qt.QPainter, drawing bool, area *qt.QRect, pagenr int)) { + C.QsciPrinter_override_virtual_FormatPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_FormatPage +func miqt_exec_callback_QsciPrinter_FormatPage(self *C.QsciPrinter, cb C.intptr_t, painter *C.QPainter, drawing C.bool, area *C.QRect, pagenr C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter, drawing bool, area *qt.QRect, pagenr int), painter *qt.QPainter, drawing bool, area *qt.QRect, pagenr int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := (bool)(drawing) + + slotval3 := qt.UnsafeNewQRect(unsafe.Pointer(area)) + slotval4 := (int)(pagenr) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_FormatPage, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QsciPrinter) callVirtualBase_SetMagnification(magnification int) { + + C.QsciPrinter_virtualbase_SetMagnification(unsafe.Pointer(this.h), (C.int)(magnification)) + +} +func (this *QsciPrinter) OnSetMagnification(slot func(super func(magnification int), magnification int)) { + C.QsciPrinter_override_virtual_SetMagnification(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_SetMagnification +func miqt_exec_callback_QsciPrinter_SetMagnification(self *C.QsciPrinter, cb C.intptr_t, magnification C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(magnification int), magnification int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(magnification) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetMagnification, slotval1) + +} + +func (this *QsciPrinter) callVirtualBase_PrintRange(qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int { + + return (int)(C.QsciPrinter_virtualbase_PrintRange(unsafe.Pointer(this.h), qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from), (C.int)(to))) + +} +func (this *QsciPrinter) OnPrintRange(slot func(super func(qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int, qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int) { + C.QsciPrinter_override_virtual_PrintRange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_PrintRange +func miqt_exec_callback_QsciPrinter_PrintRange(self *C.QsciPrinter, cb C.intptr_t, qsb *C.QsciScintillaBase, painter *C.QPainter, from C.int, to C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int, qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintillaBase(unsafe.Pointer(qsb), nil, nil, nil, nil, nil) + slotval2 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval3 := (int)(from) + + slotval4 := (int)(to) + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_PrintRange, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QsciPrinter) callVirtualBase_PrintRange2(qsb *QsciScintillaBase, from int, to int) int { + + return (int)(C.QsciPrinter_virtualbase_PrintRange2(unsafe.Pointer(this.h), qsb.cPointer(), (C.int)(from), (C.int)(to))) + +} +func (this *QsciPrinter) OnPrintRange2(slot func(super func(qsb *QsciScintillaBase, from int, to int) int, qsb *QsciScintillaBase, from int, to int) int) { + C.QsciPrinter_override_virtual_PrintRange2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_PrintRange2 +func miqt_exec_callback_QsciPrinter_PrintRange2(self *C.QsciPrinter, cb C.intptr_t, qsb *C.QsciScintillaBase, from C.int, to C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qsb *QsciScintillaBase, from int, to int) int, qsb *QsciScintillaBase, from int, to int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintillaBase(unsafe.Pointer(qsb), nil, nil, nil, nil, nil) + slotval2 := (int)(from) + + slotval3 := (int)(to) + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_PrintRange2, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + } -func (this *QsciPrinter) PrintRange4(qsb *QsciScintillaBase, painter *qt.QPainter, from int, to int) int { - return (int)(C.QsciPrinter_PrintRange4(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from), (C.int)(to))) +func (this *QsciPrinter) callVirtualBase_SetWrapMode(wmode QsciScintilla__WrapMode) { + + C.QsciPrinter_virtualbase_SetWrapMode(unsafe.Pointer(this.h), (C.int)(wmode)) + +} +func (this *QsciPrinter) OnSetWrapMode(slot func(super func(wmode QsciScintilla__WrapMode), wmode QsciScintilla__WrapMode)) { + C.QsciPrinter_override_virtual_SetWrapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QsciPrinter) PrintRange2(qsb *QsciScintillaBase, from int) int { - return (int)(C.QsciPrinter_PrintRange2(this.h, qsb.cPointer(), (C.int)(from))) +//export miqt_exec_callback_QsciPrinter_SetWrapMode +func miqt_exec_callback_QsciPrinter_SetWrapMode(self *C.QsciPrinter, cb C.intptr_t, wmode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(wmode QsciScintilla__WrapMode), wmode QsciScintilla__WrapMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__WrapMode)(wmode) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetWrapMode, slotval1) + } -func (this *QsciPrinter) PrintRange32(qsb *QsciScintillaBase, from int, to int) int { - return (int)(C.QsciPrinter_PrintRange32(this.h, qsb.cPointer(), (C.int)(from), (C.int)(to))) +func (this *QsciPrinter) callVirtualBase_DevType() int { + + return (int)(C.QsciPrinter_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QsciPrinter) OnDevType(slot func(super func() int) int) { + C.QsciPrinter_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_DevType +func miqt_exec_callback_QsciPrinter_DevType(self *C.QsciPrinter, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QsciPrinter) callVirtualBase_SetPageSize(pageSize qt.QPagedPaintDevice__PageSize) { + + C.QsciPrinter_virtualbase_SetPageSize(unsafe.Pointer(this.h), (C.int)(pageSize)) + +} +func (this *QsciPrinter) OnSetPageSize(slot func(super func(pageSize qt.QPagedPaintDevice__PageSize), pageSize qt.QPagedPaintDevice__PageSize)) { + C.QsciPrinter_override_virtual_SetPageSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_SetPageSize +func miqt_exec_callback_QsciPrinter_SetPageSize(self *C.QsciPrinter, cb C.intptr_t, pageSize C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pageSize qt.QPagedPaintDevice__PageSize), pageSize qt.QPagedPaintDevice__PageSize)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPagedPaintDevice__PageSize)(pageSize) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetPageSize, slotval1) + +} + +func (this *QsciPrinter) callVirtualBase_SetPageSizeMM(size *qt.QSizeF) { + + C.QsciPrinter_virtualbase_SetPageSizeMM(unsafe.Pointer(this.h), (*C.QSizeF)(size.UnsafePointer())) + +} +func (this *QsciPrinter) OnSetPageSizeMM(slot func(super func(size *qt.QSizeF), size *qt.QSizeF)) { + C.QsciPrinter_override_virtual_SetPageSizeMM(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_SetPageSizeMM +func miqt_exec_callback_QsciPrinter_SetPageSizeMM(self *C.QsciPrinter, cb C.intptr_t, size *C.QSizeF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *qt.QSizeF), size *qt.QSizeF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSizeF(unsafe.Pointer(size)) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetPageSizeMM, slotval1) + +} + +func (this *QsciPrinter) callVirtualBase_NewPage() bool { + + return (bool)(C.QsciPrinter_virtualbase_NewPage(unsafe.Pointer(this.h))) + +} +func (this *QsciPrinter) OnNewPage(slot func(super func() bool) bool) { + C.QsciPrinter_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_NewPage +func miqt_exec_callback_QsciPrinter_NewPage(self *C.QsciPrinter, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_NewPage) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciPrinter) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QsciPrinter_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QsciPrinter) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QsciPrinter_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_PaintEngine +func miqt_exec_callback_QsciPrinter_PaintEngine(self *C.QsciPrinter, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciPrinter) callVirtualBase_SetMargins(m *qt.QPagedPaintDevice__Margins) { + + C.QsciPrinter_virtualbase_SetMargins(unsafe.Pointer(this.h), (*C.QPagedPaintDevice__Margins)(m.UnsafePointer())) + +} +func (this *QsciPrinter) OnSetMargins(slot func(super func(m *qt.QPagedPaintDevice__Margins), m *qt.QPagedPaintDevice__Margins)) { + C.QsciPrinter_override_virtual_SetMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_SetMargins +func miqt_exec_callback_QsciPrinter_SetMargins(self *C.QsciPrinter, cb C.intptr_t, m *C.QPagedPaintDevice__Margins) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m *qt.QPagedPaintDevice__Margins), m *qt.QPagedPaintDevice__Margins)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPagedPaintDevice__Margins(unsafe.Pointer(m)) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetMargins, slotval1) + +} + +func (this *QsciPrinter) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QsciPrinter_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QsciPrinter) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QsciPrinter_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_Metric +func miqt_exec_callback_QsciPrinter_Metric(self *C.QsciPrinter, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + } // Delete this object from C++ memory. func (this *QsciPrinter) Delete() { - C.QsciPrinter_Delete(this.h) + C.QsciPrinter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qsciprinter.h b/qt-restricted-extras/qscintilla/gen_qsciprinter.h index e49ee745..89fa46bd 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciprinter.h +++ b/qt-restricted-extras/qscintilla/gen_qsciprinter.h @@ -15,31 +15,67 @@ extern "C" { #endif #ifdef __cplusplus +class QPagedPaintDevice; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins) +typedef QPagedPaintDevice::Margins QPagedPaintDevice__Margins; +#else +class QPagedPaintDevice__Margins; +#endif +class QPaintDevice; +class QPaintEngine; class QPainter; +class QPrinter; class QRect; +class QSizeF; class QsciPrinter; class QsciScintillaBase; #else +typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPagedPaintDevice__Margins QPagedPaintDevice__Margins; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; typedef struct QPainter QPainter; +typedef struct QPrinter QPrinter; typedef struct QRect QRect; +typedef struct QSizeF QSizeF; typedef struct QsciPrinter QsciPrinter; typedef struct QsciScintillaBase QsciScintillaBase; #endif -QsciPrinter* QsciPrinter_new(); -QsciPrinter* QsciPrinter_new2(int mode); +void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr); int QsciPrinter_Magnification(const QsciPrinter* self); void QsciPrinter_SetMagnification(QsciPrinter* self, int magnification); -int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter); -int QsciPrinter_PrintRangeWithQsb(QsciPrinter* self, QsciScintillaBase* qsb); +int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to); +int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to); int QsciPrinter_WrapMode(const QsciPrinter* self); void QsciPrinter_SetWrapMode(QsciPrinter* self, int wmode); -int QsciPrinter_PrintRange3(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from); -int QsciPrinter_PrintRange4(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to); -int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from); -int QsciPrinter_PrintRange32(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to); -void QsciPrinter_Delete(QsciPrinter* self); +void QsciPrinter_override_virtual_FormatPage(void* self, intptr_t slot); +void QsciPrinter_virtualbase_FormatPage(void* self, QPainter* painter, bool drawing, QRect* area, int pagenr); +void QsciPrinter_override_virtual_SetMagnification(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetMagnification(void* self, int magnification); +void QsciPrinter_override_virtual_PrintRange(void* self, intptr_t slot); +int QsciPrinter_virtualbase_PrintRange(void* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to); +void QsciPrinter_override_virtual_PrintRange2(void* self, intptr_t slot); +int QsciPrinter_virtualbase_PrintRange2(void* self, QsciScintillaBase* qsb, int from, int to); +void QsciPrinter_override_virtual_SetWrapMode(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetWrapMode(void* self, int wmode); +void QsciPrinter_override_virtual_DevType(void* self, intptr_t slot); +int QsciPrinter_virtualbase_DevType(const void* self); +void QsciPrinter_override_virtual_SetPageSize(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetPageSize(void* self, int pageSize); +void QsciPrinter_override_virtual_SetPageSizeMM(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetPageSizeMM(void* self, QSizeF* size); +void QsciPrinter_override_virtual_NewPage(void* self, intptr_t slot); +bool QsciPrinter_virtualbase_NewPage(void* self); +void QsciPrinter_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QsciPrinter_virtualbase_PaintEngine(const void* self); +void QsciPrinter_override_virtual_SetMargins(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* m); +void QsciPrinter_override_virtual_Metric(void* self, intptr_t slot); +int QsciPrinter_virtualbase_Metric(const void* self, int param1); +void QsciPrinter_Delete(QsciPrinter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp b/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp index e68ce060..ecf8cfdb 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp @@ -1,39 +1,3578 @@ +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include #include #include +#include #include #include #include +#include +#include #include #include #include "gen_qsciscintilla.h" #include "_cgo_export.h" -QsciScintilla* QsciScintilla_new(QWidget* parent) { - return new QsciScintilla(parent); +class MiqtVirtualQsciScintilla : public virtual QsciScintilla { +public: + + MiqtVirtualQsciScintilla(QWidget* parent): QsciScintilla(parent) {}; + MiqtVirtualQsciScintilla(): QsciScintilla() {}; + + virtual ~MiqtVirtualQsciScintilla() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ApiContext = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList apiContext(int pos, int& context_start, int& last_word_start) override { + if (handle__ApiContext == 0) { + return QsciScintilla::apiContext(pos, context_start, last_word_start); + } + + int sigval1 = pos; + int* sigval2 = &context_start; + int* sigval3 = &last_word_start; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciScintilla_ApiContext(this, handle__ApiContext, sigval1, sigval2, sigval3); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_ApiContext(int pos, int* context_start, int* last_word_start) { + + QStringList _ret = QsciScintilla::apiContext(static_cast(pos), static_cast(*context_start), static_cast(*last_word_start)); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FindFirst = 0; + + // Subclass to allow providing a Go implementation + virtual bool findFirst(const QString& expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) override { + if (handle__FindFirst == 0) { + return QsciScintilla::findFirst(expr, re, cs, wo, wrap, forward, line, index, show, posix, cxx11); + } + + const QString expr_ret = expr; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray expr_b = expr_ret.toUtf8(); + struct miqt_string expr_ms; + expr_ms.len = expr_b.length(); + expr_ms.data = static_cast(malloc(expr_ms.len)); + memcpy(expr_ms.data, expr_b.data(), expr_ms.len); + struct miqt_string sigval1 = expr_ms; + bool sigval2 = re; + bool sigval3 = cs; + bool sigval4 = wo; + bool sigval5 = wrap; + bool sigval6 = forward; + int sigval7 = line; + int sigval8 = index; + bool sigval9 = show; + bool sigval10 = posix; + bool sigval11 = cxx11; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FindFirst(this, handle__FindFirst, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7, sigval8, sigval9, sigval10, sigval11); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FindFirst(struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + + return QsciScintilla::findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix, cxx11); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FindFirstInSelection = 0; + + // Subclass to allow providing a Go implementation + virtual bool findFirstInSelection(const QString& expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) override { + if (handle__FindFirstInSelection == 0) { + return QsciScintilla::findFirstInSelection(expr, re, cs, wo, forward, show, posix, cxx11); + } + + const QString expr_ret = expr; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray expr_b = expr_ret.toUtf8(); + struct miqt_string expr_ms; + expr_ms.len = expr_b.length(); + expr_ms.data = static_cast(malloc(expr_ms.len)); + memcpy(expr_ms.data, expr_b.data(), expr_ms.len); + struct miqt_string sigval1 = expr_ms; + bool sigval2 = re; + bool sigval3 = cs; + bool sigval4 = wo; + bool sigval5 = forward; + bool sigval6 = show; + bool sigval7 = posix; + bool sigval8 = cxx11; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FindFirstInSelection(this, handle__FindFirstInSelection, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7, sigval8); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FindFirstInSelection(struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + + return QsciScintilla::findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix, cxx11); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FindNext = 0; + + // Subclass to allow providing a Go implementation + virtual bool findNext() override { + if (handle__FindNext == 0) { + return QsciScintilla::findNext(); + } + + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FindNext(this, handle__FindNext); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FindNext() { + + return QsciScintilla::findNext(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Recolor = 0; + + // Subclass to allow providing a Go implementation + virtual void recolor(int start, int end) override { + if (handle__Recolor == 0) { + QsciScintilla::recolor(start, end); + return; + } + + int sigval1 = start; + int sigval2 = end; + + miqt_exec_callback_QsciScintilla_Recolor(this, handle__Recolor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Recolor(int start, int end) { + + QsciScintilla::recolor(static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Replace = 0; + + // Subclass to allow providing a Go implementation + virtual void replace(const QString& replaceStr) override { + if (handle__Replace == 0) { + QsciScintilla::replace(replaceStr); + return; + } + + const QString replaceStr_ret = replaceStr; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray replaceStr_b = replaceStr_ret.toUtf8(); + struct miqt_string replaceStr_ms; + replaceStr_ms.len = replaceStr_b.length(); + replaceStr_ms.data = static_cast(malloc(replaceStr_ms.len)); + memcpy(replaceStr_ms.data, replaceStr_b.data(), replaceStr_ms.len); + struct miqt_string sigval1 = replaceStr_ms; + + miqt_exec_callback_QsciScintilla_Replace(this, handle__Replace, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Replace(struct miqt_string replaceStr) { + QString replaceStr_QString = QString::fromUtf8(replaceStr.data, replaceStr.len); + + QsciScintilla::replace(replaceStr_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Append = 0; + + // Subclass to allow providing a Go implementation + virtual void append(const QString& text) override { + if (handle__Append == 0) { + QsciScintilla::append(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_Append(this, handle__Append, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Append(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::append(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompleteFromAll = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompleteFromAll() override { + if (handle__AutoCompleteFromAll == 0) { + QsciScintilla::autoCompleteFromAll(); + return; + } + + + miqt_exec_callback_QsciScintilla_AutoCompleteFromAll(this, handle__AutoCompleteFromAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompleteFromAll() { + + QsciScintilla::autoCompleteFromAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompleteFromAPIs = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompleteFromAPIs() override { + if (handle__AutoCompleteFromAPIs == 0) { + QsciScintilla::autoCompleteFromAPIs(); + return; + } + + + miqt_exec_callback_QsciScintilla_AutoCompleteFromAPIs(this, handle__AutoCompleteFromAPIs); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompleteFromAPIs() { + + QsciScintilla::autoCompleteFromAPIs(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompleteFromDocument = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompleteFromDocument() override { + if (handle__AutoCompleteFromDocument == 0) { + QsciScintilla::autoCompleteFromDocument(); + return; + } + + + miqt_exec_callback_QsciScintilla_AutoCompleteFromDocument(this, handle__AutoCompleteFromDocument); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompleteFromDocument() { + + QsciScintilla::autoCompleteFromDocument(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CallTip = 0; + + // Subclass to allow providing a Go implementation + virtual void callTip() override { + if (handle__CallTip == 0) { + QsciScintilla::callTip(); + return; + } + + + miqt_exec_callback_QsciScintilla_CallTip(this, handle__CallTip); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CallTip() { + + QsciScintilla::callTip(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QsciScintilla::clear(); + return; + } + + + miqt_exec_callback_QsciScintilla_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QsciScintilla::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Copy = 0; + + // Subclass to allow providing a Go implementation + virtual void copy() override { + if (handle__Copy == 0) { + QsciScintilla::copy(); + return; + } + + + miqt_exec_callback_QsciScintilla_Copy(this, handle__Copy); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Copy() { + + QsciScintilla::copy(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Cut = 0; + + // Subclass to allow providing a Go implementation + virtual void cut() override { + if (handle__Cut == 0) { + QsciScintilla::cut(); + return; + } + + + miqt_exec_callback_QsciScintilla_Cut(this, handle__Cut); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Cut() { + + QsciScintilla::cut(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnsureCursorVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void ensureCursorVisible() override { + if (handle__EnsureCursorVisible == 0) { + QsciScintilla::ensureCursorVisible(); + return; + } + + + miqt_exec_callback_QsciScintilla_EnsureCursorVisible(this, handle__EnsureCursorVisible); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnsureCursorVisible() { + + QsciScintilla::ensureCursorVisible(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnsureLineVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void ensureLineVisible(int line) override { + if (handle__EnsureLineVisible == 0) { + QsciScintilla::ensureLineVisible(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_EnsureLineVisible(this, handle__EnsureLineVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnsureLineVisible(int line) { + + QsciScintilla::ensureLineVisible(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FoldAll = 0; + + // Subclass to allow providing a Go implementation + virtual void foldAll(bool children) override { + if (handle__FoldAll == 0) { + QsciScintilla::foldAll(children); + return; + } + + bool sigval1 = children; + + miqt_exec_callback_QsciScintilla_FoldAll(this, handle__FoldAll, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FoldAll(bool children) { + + QsciScintilla::foldAll(children); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FoldLine = 0; + + // Subclass to allow providing a Go implementation + virtual void foldLine(int line) override { + if (handle__FoldLine == 0) { + QsciScintilla::foldLine(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_FoldLine(this, handle__FoldLine, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FoldLine(int line) { + + QsciScintilla::foldLine(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Indent = 0; + + // Subclass to allow providing a Go implementation + virtual void indent(int line) override { + if (handle__Indent == 0) { + QsciScintilla::indent(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_Indent(this, handle__Indent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Indent(int line) { + + QsciScintilla::indent(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Insert = 0; + + // Subclass to allow providing a Go implementation + virtual void insert(const QString& text) override { + if (handle__Insert == 0) { + QsciScintilla::insert(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_Insert(this, handle__Insert, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Insert(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::insert(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertAt = 0; + + // Subclass to allow providing a Go implementation + virtual void insertAt(const QString& text, int line, int index) override { + if (handle__InsertAt == 0) { + QsciScintilla::insertAt(text, line, index); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + int sigval2 = line; + int sigval3 = index; + + miqt_exec_callback_QsciScintilla_InsertAt(this, handle__InsertAt, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertAt(struct miqt_string text, int line, int index) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::insertAt(text_QString, static_cast(line), static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveToMatchingBrace = 0; + + // Subclass to allow providing a Go implementation + virtual void moveToMatchingBrace() override { + if (handle__MoveToMatchingBrace == 0) { + QsciScintilla::moveToMatchingBrace(); + return; + } + + + miqt_exec_callback_QsciScintilla_MoveToMatchingBrace(this, handle__MoveToMatchingBrace); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveToMatchingBrace() { + + QsciScintilla::moveToMatchingBrace(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paste = 0; + + // Subclass to allow providing a Go implementation + virtual void paste() override { + if (handle__Paste == 0) { + QsciScintilla::paste(); + return; + } + + + miqt_exec_callback_QsciScintilla_Paste(this, handle__Paste); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paste() { + + QsciScintilla::paste(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redo = 0; + + // Subclass to allow providing a Go implementation + virtual void redo() override { + if (handle__Redo == 0) { + QsciScintilla::redo(); + return; + } + + + miqt_exec_callback_QsciScintilla_Redo(this, handle__Redo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Redo() { + + QsciScintilla::redo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveSelectedText = 0; + + // Subclass to allow providing a Go implementation + virtual void removeSelectedText() override { + if (handle__RemoveSelectedText == 0) { + QsciScintilla::removeSelectedText(); + return; + } + + + miqt_exec_callback_QsciScintilla_RemoveSelectedText(this, handle__RemoveSelectedText); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveSelectedText() { + + QsciScintilla::removeSelectedText(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReplaceSelectedText = 0; + + // Subclass to allow providing a Go implementation + virtual void replaceSelectedText(const QString& text) override { + if (handle__ReplaceSelectedText == 0) { + QsciScintilla::replaceSelectedText(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_ReplaceSelectedText(this, handle__ReplaceSelectedText, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ReplaceSelectedText(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::replaceSelectedText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetSelectionBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void resetSelectionBackgroundColor() override { + if (handle__ResetSelectionBackgroundColor == 0) { + QsciScintilla::resetSelectionBackgroundColor(); + return; + } + + + miqt_exec_callback_QsciScintilla_ResetSelectionBackgroundColor(this, handle__ResetSelectionBackgroundColor); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetSelectionBackgroundColor() { + + QsciScintilla::resetSelectionBackgroundColor(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetSelectionForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void resetSelectionForegroundColor() override { + if (handle__ResetSelectionForegroundColor == 0) { + QsciScintilla::resetSelectionForegroundColor(); + return; + } + + + miqt_exec_callback_QsciScintilla_ResetSelectionForegroundColor(this, handle__ResetSelectionForegroundColor); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetSelectionForegroundColor() { + + QsciScintilla::resetSelectionForegroundColor(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll(bool selectVal) override { + if (handle__SelectAll == 0) { + QsciScintilla::selectAll(selectVal); + return; + } + + bool sigval1 = selectVal; + + miqt_exec_callback_QsciScintilla_SelectAll(this, handle__SelectAll, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll(bool selectVal) { + + QsciScintilla::selectAll(selectVal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectToMatchingBrace = 0; + + // Subclass to allow providing a Go implementation + virtual void selectToMatchingBrace() override { + if (handle__SelectToMatchingBrace == 0) { + QsciScintilla::selectToMatchingBrace(); + return; + } + + + miqt_exec_callback_QsciScintilla_SelectToMatchingBrace(this, handle__SelectToMatchingBrace); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectToMatchingBrace() { + + QsciScintilla::selectToMatchingBrace(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionCaseSensitivity = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionCaseSensitivity(bool cs) override { + if (handle__SetAutoCompletionCaseSensitivity == 0) { + QsciScintilla::setAutoCompletionCaseSensitivity(cs); + return; + } + + bool sigval1 = cs; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionCaseSensitivity(this, handle__SetAutoCompletionCaseSensitivity, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionCaseSensitivity(bool cs) { + + QsciScintilla::setAutoCompletionCaseSensitivity(cs); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionReplaceWord = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionReplaceWord(bool replace) override { + if (handle__SetAutoCompletionReplaceWord == 0) { + QsciScintilla::setAutoCompletionReplaceWord(replace); + return; + } + + bool sigval1 = replace; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionReplaceWord(this, handle__SetAutoCompletionReplaceWord, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionReplaceWord(bool replace) { + + QsciScintilla::setAutoCompletionReplaceWord(replace); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionShowSingle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionShowSingle(bool single) override { + if (handle__SetAutoCompletionShowSingle == 0) { + QsciScintilla::setAutoCompletionShowSingle(single); + return; + } + + bool sigval1 = single; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionShowSingle(this, handle__SetAutoCompletionShowSingle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionShowSingle(bool single) { + + QsciScintilla::setAutoCompletionShowSingle(single); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionSource = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionSource(QsciScintilla::AutoCompletionSource source) override { + if (handle__SetAutoCompletionSource == 0) { + QsciScintilla::setAutoCompletionSource(source); + return; + } + + QsciScintilla::AutoCompletionSource source_ret = source; + int sigval1 = static_cast(source_ret); + + miqt_exec_callback_QsciScintilla_SetAutoCompletionSource(this, handle__SetAutoCompletionSource, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionSource(int source) { + + QsciScintilla::setAutoCompletionSource(static_cast(source)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionThreshold = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionThreshold(int thresh) override { + if (handle__SetAutoCompletionThreshold == 0) { + QsciScintilla::setAutoCompletionThreshold(thresh); + return; + } + + int sigval1 = thresh; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionThreshold(this, handle__SetAutoCompletionThreshold, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionThreshold(int thresh) { + + QsciScintilla::setAutoCompletionThreshold(static_cast(thresh)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionUseSingle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionUseSingle(QsciScintilla::AutoCompletionUseSingle single) override { + if (handle__SetAutoCompletionUseSingle == 0) { + QsciScintilla::setAutoCompletionUseSingle(single); + return; + } + + QsciScintilla::AutoCompletionUseSingle single_ret = single; + int sigval1 = static_cast(single_ret); + + miqt_exec_callback_QsciScintilla_SetAutoCompletionUseSingle(this, handle__SetAutoCompletionUseSingle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionUseSingle(int single) { + + QsciScintilla::setAutoCompletionUseSingle(static_cast(single)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndent = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndent(bool autoindent) override { + if (handle__SetAutoIndent == 0) { + QsciScintilla::setAutoIndent(autoindent); + return; + } + + bool sigval1 = autoindent; + + miqt_exec_callback_QsciScintilla_SetAutoIndent(this, handle__SetAutoIndent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndent(bool autoindent) { + + QsciScintilla::setAutoIndent(autoindent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBraceMatching = 0; + + // Subclass to allow providing a Go implementation + virtual void setBraceMatching(QsciScintilla::BraceMatch bm) override { + if (handle__SetBraceMatching == 0) { + QsciScintilla::setBraceMatching(bm); + return; + } + + QsciScintilla::BraceMatch bm_ret = bm; + int sigval1 = static_cast(bm_ret); + + miqt_exec_callback_QsciScintilla_SetBraceMatching(this, handle__SetBraceMatching, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBraceMatching(int bm) { + + QsciScintilla::setBraceMatching(static_cast(bm)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBackspaceUnindents = 0; + + // Subclass to allow providing a Go implementation + virtual void setBackspaceUnindents(bool unindent) override { + if (handle__SetBackspaceUnindents == 0) { + QsciScintilla::setBackspaceUnindents(unindent); + return; + } + + bool sigval1 = unindent; + + miqt_exec_callback_QsciScintilla_SetBackspaceUnindents(this, handle__SetBackspaceUnindents, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBackspaceUnindents(bool unindent) { + + QsciScintilla::setBackspaceUnindents(unindent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretForegroundColor(const QColor& col) override { + if (handle__SetCaretForegroundColor == 0) { + QsciScintilla::setCaretForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetCaretForegroundColor(this, handle__SetCaretForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretForegroundColor(QColor* col) { + + QsciScintilla::setCaretForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretLineBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretLineBackgroundColor(const QColor& col) override { + if (handle__SetCaretLineBackgroundColor == 0) { + QsciScintilla::setCaretLineBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetCaretLineBackgroundColor(this, handle__SetCaretLineBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretLineBackgroundColor(QColor* col) { + + QsciScintilla::setCaretLineBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretLineFrameWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretLineFrameWidth(int width) override { + if (handle__SetCaretLineFrameWidth == 0) { + QsciScintilla::setCaretLineFrameWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetCaretLineFrameWidth(this, handle__SetCaretLineFrameWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretLineFrameWidth(int width) { + + QsciScintilla::setCaretLineFrameWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretLineVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretLineVisible(bool enable) override { + if (handle__SetCaretLineVisible == 0) { + QsciScintilla::setCaretLineVisible(enable); + return; + } + + bool sigval1 = enable; + + miqt_exec_callback_QsciScintilla_SetCaretLineVisible(this, handle__SetCaretLineVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretLineVisible(bool enable) { + + QsciScintilla::setCaretLineVisible(enable); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretWidth(int width) override { + if (handle__SetCaretWidth == 0) { + QsciScintilla::setCaretWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetCaretWidth(this, handle__SetCaretWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretWidth(int width) { + + QsciScintilla::setCaretWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c) override { + if (handle__SetColor == 0) { + QsciScintilla::setColor(c); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + + miqt_exec_callback_QsciScintilla_SetColor(this, handle__SetColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c) { + + QsciScintilla::setColor(*c); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCursorPosition = 0; + + // Subclass to allow providing a Go implementation + virtual void setCursorPosition(int line, int index) override { + if (handle__SetCursorPosition == 0) { + QsciScintilla::setCursorPosition(line, index); + return; + } + + int sigval1 = line; + int sigval2 = index; + + miqt_exec_callback_QsciScintilla_SetCursorPosition(this, handle__SetCursorPosition, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCursorPosition(int line, int index) { + + QsciScintilla::setCursorPosition(static_cast(line), static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolMode = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolMode(QsciScintilla::EolMode mode) override { + if (handle__SetEolMode == 0) { + QsciScintilla::setEolMode(mode); + return; + } + + QsciScintilla::EolMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + miqt_exec_callback_QsciScintilla_SetEolMode(this, handle__SetEolMode, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolMode(int mode) { + + QsciScintilla::setEolMode(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolVisibility = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolVisibility(bool visible) override { + if (handle__SetEolVisibility == 0) { + QsciScintilla::setEolVisibility(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QsciScintilla_SetEolVisibility(this, handle__SetEolVisibility, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolVisibility(bool visible) { + + QsciScintilla::setEolVisibility(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFolding = 0; + + // Subclass to allow providing a Go implementation + virtual void setFolding(QsciScintilla::FoldStyle fold, int margin) override { + if (handle__SetFolding == 0) { + QsciScintilla::setFolding(fold, margin); + return; + } + + QsciScintilla::FoldStyle fold_ret = fold; + int sigval1 = static_cast(fold_ret); + int sigval2 = margin; + + miqt_exec_callback_QsciScintilla_SetFolding(this, handle__SetFolding, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFolding(int fold, int margin) { + + QsciScintilla::setFolding(static_cast(fold), static_cast(margin)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentation = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentation(int line, int indentation) override { + if (handle__SetIndentation == 0) { + QsciScintilla::setIndentation(line, indentation); + return; + } + + int sigval1 = line; + int sigval2 = indentation; + + miqt_exec_callback_QsciScintilla_SetIndentation(this, handle__SetIndentation, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentation(int line, int indentation) { + + QsciScintilla::setIndentation(static_cast(line), static_cast(indentation)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationGuides = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationGuides(bool enable) override { + if (handle__SetIndentationGuides == 0) { + QsciScintilla::setIndentationGuides(enable); + return; + } + + bool sigval1 = enable; + + miqt_exec_callback_QsciScintilla_SetIndentationGuides(this, handle__SetIndentationGuides, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationGuides(bool enable) { + + QsciScintilla::setIndentationGuides(enable); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationGuidesBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationGuidesBackgroundColor(const QColor& col) override { + if (handle__SetIndentationGuidesBackgroundColor == 0) { + QsciScintilla::setIndentationGuidesBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetIndentationGuidesBackgroundColor(this, handle__SetIndentationGuidesBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationGuidesBackgroundColor(QColor* col) { + + QsciScintilla::setIndentationGuidesBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationGuidesForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationGuidesForegroundColor(const QColor& col) override { + if (handle__SetIndentationGuidesForegroundColor == 0) { + QsciScintilla::setIndentationGuidesForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetIndentationGuidesForegroundColor(this, handle__SetIndentationGuidesForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationGuidesForegroundColor(QColor* col) { + + QsciScintilla::setIndentationGuidesForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationsUseTabs = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationsUseTabs(bool tabs) override { + if (handle__SetIndentationsUseTabs == 0) { + QsciScintilla::setIndentationsUseTabs(tabs); + return; + } + + bool sigval1 = tabs; + + miqt_exec_callback_QsciScintilla_SetIndentationsUseTabs(this, handle__SetIndentationsUseTabs, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationsUseTabs(bool tabs) { + + QsciScintilla::setIndentationsUseTabs(tabs); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationWidth(int width) override { + if (handle__SetIndentationWidth == 0) { + QsciScintilla::setIndentationWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetIndentationWidth(this, handle__SetIndentationWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationWidth(int width) { + + QsciScintilla::setIndentationWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetLexer = 0; + + // Subclass to allow providing a Go implementation + virtual void setLexer(QsciLexer* lexer) override { + if (handle__SetLexer == 0) { + QsciScintilla::setLexer(lexer); + return; + } + + QsciLexer* sigval1 = lexer; + + miqt_exec_callback_QsciScintilla_SetLexer(this, handle__SetLexer, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetLexer(QsciLexer* lexer) { + + QsciScintilla::setLexer(lexer); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginsBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginsBackgroundColor(const QColor& col) override { + if (handle__SetMarginsBackgroundColor == 0) { + QsciScintilla::setMarginsBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetMarginsBackgroundColor(this, handle__SetMarginsBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginsBackgroundColor(QColor* col) { + + QsciScintilla::setMarginsBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginsFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginsFont(const QFont& f) override { + if (handle__SetMarginsFont == 0) { + QsciScintilla::setMarginsFont(f); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + + miqt_exec_callback_QsciScintilla_SetMarginsFont(this, handle__SetMarginsFont, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginsFont(QFont* f) { + + QsciScintilla::setMarginsFont(*f); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginsForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginsForegroundColor(const QColor& col) override { + if (handle__SetMarginsForegroundColor == 0) { + QsciScintilla::setMarginsForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetMarginsForegroundColor(this, handle__SetMarginsForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginsForegroundColor(QColor* col) { + + QsciScintilla::setMarginsForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginLineNumbers = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginLineNumbers(int margin, bool lnrs) override { + if (handle__SetMarginLineNumbers == 0) { + QsciScintilla::setMarginLineNumbers(margin, lnrs); + return; + } + + int sigval1 = margin; + bool sigval2 = lnrs; + + miqt_exec_callback_QsciScintilla_SetMarginLineNumbers(this, handle__SetMarginLineNumbers, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginLineNumbers(int margin, bool lnrs) { + + QsciScintilla::setMarginLineNumbers(static_cast(margin), lnrs); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginMarkerMask = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginMarkerMask(int margin, int mask) override { + if (handle__SetMarginMarkerMask == 0) { + QsciScintilla::setMarginMarkerMask(margin, mask); + return; + } + + int sigval1 = margin; + int sigval2 = mask; + + miqt_exec_callback_QsciScintilla_SetMarginMarkerMask(this, handle__SetMarginMarkerMask, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginMarkerMask(int margin, int mask) { + + QsciScintilla::setMarginMarkerMask(static_cast(margin), static_cast(mask)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginSensitivity = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginSensitivity(int margin, bool sens) override { + if (handle__SetMarginSensitivity == 0) { + QsciScintilla::setMarginSensitivity(margin, sens); + return; + } + + int sigval1 = margin; + bool sigval2 = sens; + + miqt_exec_callback_QsciScintilla_SetMarginSensitivity(this, handle__SetMarginSensitivity, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginSensitivity(int margin, bool sens) { + + QsciScintilla::setMarginSensitivity(static_cast(margin), sens); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginWidth(int margin, int width) override { + if (handle__SetMarginWidth == 0) { + QsciScintilla::setMarginWidth(margin, width); + return; + } + + int sigval1 = margin; + int sigval2 = width; + + miqt_exec_callback_QsciScintilla_SetMarginWidth(this, handle__SetMarginWidth, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginWidth(int margin, int width) { + + QsciScintilla::setMarginWidth(static_cast(margin), static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginWidth2 = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginWidth(int margin, const QString& s) override { + if (handle__SetMarginWidth2 == 0) { + QsciScintilla::setMarginWidth(margin, s); + return; + } + + int sigval1 = margin; + const QString s_ret = s; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray s_b = s_ret.toUtf8(); + struct miqt_string s_ms; + s_ms.len = s_b.length(); + s_ms.data = static_cast(malloc(s_ms.len)); + memcpy(s_ms.data, s_b.data(), s_ms.len); + struct miqt_string sigval2 = s_ms; + + miqt_exec_callback_QsciScintilla_SetMarginWidth2(this, handle__SetMarginWidth2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginWidth2(int margin, struct miqt_string s) { + QString s_QString = QString::fromUtf8(s.data, s.len); + + QsciScintilla::setMarginWidth(static_cast(margin), s_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModified = 0; + + // Subclass to allow providing a Go implementation + virtual void setModified(bool m) override { + if (handle__SetModified == 0) { + QsciScintilla::setModified(m); + return; + } + + bool sigval1 = m; + + miqt_exec_callback_QsciScintilla_SetModified(this, handle__SetModified, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModified(bool m) { + + QsciScintilla::setModified(m); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c) override { + if (handle__SetPaper == 0) { + QsciScintilla::setPaper(c); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + + miqt_exec_callback_QsciScintilla_SetPaper(this, handle__SetPaper, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c) { + + QsciScintilla::setPaper(*c); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadOnly = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadOnly(bool ro) override { + if (handle__SetReadOnly == 0) { + QsciScintilla::setReadOnly(ro); + return; + } + + bool sigval1 = ro; + + miqt_exec_callback_QsciScintilla_SetReadOnly(this, handle__SetReadOnly, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadOnly(bool ro) { + + QsciScintilla::setReadOnly(ro); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(int lineFrom, int indexFrom, int lineTo, int indexTo) override { + if (handle__SetSelection == 0) { + QsciScintilla::setSelection(lineFrom, indexFrom, lineTo, indexTo); + return; + } + + int sigval1 = lineFrom; + int sigval2 = indexFrom; + int sigval3 = lineTo; + int sigval4 = indexTo; + + miqt_exec_callback_QsciScintilla_SetSelection(this, handle__SetSelection, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(int lineFrom, int indexFrom, int lineTo, int indexTo) { + + QsciScintilla::setSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionBackgroundColor(const QColor& col) override { + if (handle__SetSelectionBackgroundColor == 0) { + QsciScintilla::setSelectionBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetSelectionBackgroundColor(this, handle__SetSelectionBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionBackgroundColor(QColor* col) { + + QsciScintilla::setSelectionBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionForegroundColor(const QColor& col) override { + if (handle__SetSelectionForegroundColor == 0) { + QsciScintilla::setSelectionForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetSelectionForegroundColor(this, handle__SetSelectionForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionForegroundColor(QColor* col) { + + QsciScintilla::setSelectionForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTabIndents = 0; + + // Subclass to allow providing a Go implementation + virtual void setTabIndents(bool indent) override { + if (handle__SetTabIndents == 0) { + QsciScintilla::setTabIndents(indent); + return; + } + + bool sigval1 = indent; + + miqt_exec_callback_QsciScintilla_SetTabIndents(this, handle__SetTabIndents, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTabIndents(bool indent) { + + QsciScintilla::setTabIndents(indent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTabWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setTabWidth(int width) override { + if (handle__SetTabWidth == 0) { + QsciScintilla::setTabWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetTabWidth(this, handle__SetTabWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTabWidth(int width) { + + QsciScintilla::setTabWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetText = 0; + + // Subclass to allow providing a Go implementation + virtual void setText(const QString& text) override { + if (handle__SetText == 0) { + QsciScintilla::setText(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_SetText(this, handle__SetText, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetText(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::setText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetUtf8 = 0; + + // Subclass to allow providing a Go implementation + virtual void setUtf8(bool cp) override { + if (handle__SetUtf8 == 0) { + QsciScintilla::setUtf8(cp); + return; + } + + bool sigval1 = cp; + + miqt_exec_callback_QsciScintilla_SetUtf8(this, handle__SetUtf8, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetUtf8(bool cp) { + + QsciScintilla::setUtf8(cp); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetWhitespaceVisibility = 0; + + // Subclass to allow providing a Go implementation + virtual void setWhitespaceVisibility(QsciScintilla::WhitespaceVisibility mode) override { + if (handle__SetWhitespaceVisibility == 0) { + QsciScintilla::setWhitespaceVisibility(mode); + return; + } + + QsciScintilla::WhitespaceVisibility mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + miqt_exec_callback_QsciScintilla_SetWhitespaceVisibility(this, handle__SetWhitespaceVisibility, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetWhitespaceVisibility(int mode) { + + QsciScintilla::setWhitespaceVisibility(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetWrapMode = 0; + + // Subclass to allow providing a Go implementation + virtual void setWrapMode(QsciScintilla::WrapMode mode) override { + if (handle__SetWrapMode == 0) { + QsciScintilla::setWrapMode(mode); + return; + } + + QsciScintilla::WrapMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + miqt_exec_callback_QsciScintilla_SetWrapMode(this, handle__SetWrapMode, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetWrapMode(int mode) { + + QsciScintilla::setWrapMode(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Undo = 0; + + // Subclass to allow providing a Go implementation + virtual void undo() override { + if (handle__Undo == 0) { + QsciScintilla::undo(); + return; + } + + + miqt_exec_callback_QsciScintilla_Undo(this, handle__Undo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Undo() { + + QsciScintilla::undo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unindent = 0; + + // Subclass to allow providing a Go implementation + virtual void unindent(int line) override { + if (handle__Unindent == 0) { + QsciScintilla::unindent(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_Unindent(this, handle__Unindent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unindent(int line) { + + QsciScintilla::unindent(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomIn = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomIn(int rangeVal) override { + if (handle__ZoomIn == 0) { + QsciScintilla::zoomIn(rangeVal); + return; + } + + int sigval1 = rangeVal; + + miqt_exec_callback_QsciScintilla_ZoomIn(this, handle__ZoomIn, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomIn(int rangeVal) { + + QsciScintilla::zoomIn(static_cast(rangeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomIn2 = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomIn() override { + if (handle__ZoomIn2 == 0) { + QsciScintilla::zoomIn(); + return; + } + + + miqt_exec_callback_QsciScintilla_ZoomIn2(this, handle__ZoomIn2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomIn2() { + + QsciScintilla::zoomIn(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomOut = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomOut(int rangeVal) override { + if (handle__ZoomOut == 0) { + QsciScintilla::zoomOut(rangeVal); + return; + } + + int sigval1 = rangeVal; + + miqt_exec_callback_QsciScintilla_ZoomOut(this, handle__ZoomOut, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomOut(int rangeVal) { + + QsciScintilla::zoomOut(static_cast(rangeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomOut2 = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomOut() override { + if (handle__ZoomOut2 == 0) { + QsciScintilla::zoomOut(); + return; + } + + + miqt_exec_callback_QsciScintilla_ZoomOut2(this, handle__ZoomOut2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomOut2() { + + QsciScintilla::zoomOut(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomTo = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomTo(int size) override { + if (handle__ZoomTo == 0) { + QsciScintilla::zoomTo(size); + return; + } + + int sigval1 = size; + + miqt_exec_callback_QsciScintilla_ZoomTo(this, handle__ZoomTo, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomTo(int size) { + + QsciScintilla::zoomTo(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QsciScintilla::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QsciScintilla::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QsciScintilla::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QsciScintilla::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QsciScintilla::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QsciScintilla::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QsciScintilla::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QsciScintilla::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QsciScintilla::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QsciScintilla::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray fromMimeData(const QMimeData* source, bool& rectangular) const override { + if (handle__FromMimeData == 0) { + return QsciScintilla::fromMimeData(source, rectangular); + } + + QMimeData* sigval1 = (QMimeData*) source; + bool* sigval2 = &rectangular; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciScintilla_FromMimeData(const_cast(this), handle__FromMimeData, sigval1, sigval2); + QByteArray callback_return_value_QByteArray(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QByteArray; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FromMimeData(QMimeData* source, bool* rectangular) const { + + QByteArray _qb = QsciScintilla::fromMimeData(source, *rectangular); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ToMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* toMimeData(const QByteArray& text, bool rectangular) const override { + if (handle__ToMimeData == 0) { + return QsciScintilla::toMimeData(text, rectangular); + } + + const QByteArray text_qb = text; + struct miqt_string text_ms; + text_ms.len = text_qb.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_qb.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + bool sigval2 = rectangular; + + QMimeData* callback_return_value = miqt_exec_callback_QsciScintilla_ToMimeData(const_cast(this), handle__ToMimeData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_ToMimeData(struct miqt_string text, bool rectangular) const { + QByteArray text_QByteArray(text.data, text.len); + + return QsciScintilla::toMimeData(text_QByteArray, rectangular); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QsciScintilla::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QsciScintilla::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QsciScintilla::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QsciScintilla::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QsciScintilla::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QsciScintilla::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QsciScintilla::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QsciScintilla::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QsciScintilla::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QsciScintilla::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QsciScintilla::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QsciScintilla::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QsciScintilla::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QsciScintilla::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QsciScintilla::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QsciScintilla::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QsciScintilla::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QsciScintilla_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QsciScintilla::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QsciScintilla::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QsciScintilla_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QsciScintilla::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QsciScintilla::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QsciScintilla::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QsciScintilla::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QsciScintilla::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QsciScintilla::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QsciScintilla::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QsciScintilla::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QsciScintilla::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QsciScintilla::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QsciScintilla::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QsciScintilla::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QsciScintilla::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QsciScintilla::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QsciScintilla_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QsciScintilla::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + +}; + +void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(parent); + *outptr_QsciScintilla = ret; + *outptr_QsciScintillaBase = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(); + *outptr_QsciScintilla = ret; + *outptr_QsciScintillaBase = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QsciScintilla_Tr(const char* s) { + QString _ret = QsciScintilla::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QsciScintilla_TrUtf8(const char* s) { + QString _ret = QsciScintilla::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of struct miqt_string */ QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start) { + QStringList _ret = self->apiContext(static_cast(pos), static_cast(*context_start), static_cast(*last_word_start)); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QsciScintilla_Annotate(QsciScintilla* self, int line, struct miqt_string text, int style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->annotate(static_cast(line), text_QString, static_cast(style)); +} + +void QsciScintilla_Annotate2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->annotate(static_cast(line), text_QString, *style); +} + +void QsciScintilla_Annotate3(QsciScintilla* self, int line, QsciStyledText* text) { + self->annotate(static_cast(line), *text); +} + +struct miqt_string QsciScintilla_Annotation(const QsciScintilla* self, int line) { + QString _ret = self->annotation(static_cast(line)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QsciScintilla_AnnotationDisplay(const QsciScintilla* self) { + QsciScintilla::AnnotationDisplay _ret = self->annotationDisplay(); + return static_cast(_ret); +} + +void QsciScintilla_ClearAnnotations(QsciScintilla* self) { + self->clearAnnotations(); +} + +bool QsciScintilla_AutoCompletionCaseSensitivity(const QsciScintilla* self) { + return self->autoCompletionCaseSensitivity(); +} + +bool QsciScintilla_AutoCompletionFillupsEnabled(const QsciScintilla* self) { + return self->autoCompletionFillupsEnabled(); +} + +bool QsciScintilla_AutoCompletionReplaceWord(const QsciScintilla* self) { + return self->autoCompletionReplaceWord(); +} + +bool QsciScintilla_AutoCompletionShowSingle(const QsciScintilla* self) { + return self->autoCompletionShowSingle(); +} + +int QsciScintilla_AutoCompletionSource(const QsciScintilla* self) { + QsciScintilla::AutoCompletionSource _ret = self->autoCompletionSource(); + return static_cast(_ret); +} + +int QsciScintilla_AutoCompletionThreshold(const QsciScintilla* self) { + return self->autoCompletionThreshold(); +} + +int QsciScintilla_AutoCompletionUseSingle(const QsciScintilla* self) { + QsciScintilla::AutoCompletionUseSingle _ret = self->autoCompletionUseSingle(); + return static_cast(_ret); +} + +bool QsciScintilla_AutoIndent(const QsciScintilla* self) { + return self->autoIndent(); +} + +bool QsciScintilla_BackspaceUnindents(const QsciScintilla* self) { + return self->backspaceUnindents(); +} + +void QsciScintilla_BeginUndoAction(QsciScintilla* self) { + self->beginUndoAction(); +} + +int QsciScintilla_BraceMatching(const QsciScintilla* self) { + QsciScintilla::BraceMatch _ret = self->braceMatching(); + return static_cast(_ret); +} + +struct miqt_string QsciScintilla_Bytes(const QsciScintilla* self, int start, int end) { + QByteArray _qb = self->bytes(static_cast(start), static_cast(end)); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +int QsciScintilla_CallTipsPosition(const QsciScintilla* self) { + QsciScintilla::CallTipsPosition _ret = self->callTipsPosition(); + return static_cast(_ret); +} + +int QsciScintilla_CallTipsStyle(const QsciScintilla* self) { + QsciScintilla::CallTipsStyle _ret = self->callTipsStyle(); + return static_cast(_ret); +} + +int QsciScintilla_CallTipsVisible(const QsciScintilla* self) { + return self->callTipsVisible(); +} + +void QsciScintilla_CancelFind(QsciScintilla* self) { + self->cancelFind(); +} + +void QsciScintilla_CancelList(QsciScintilla* self) { + self->cancelList(); +} + +bool QsciScintilla_CaseSensitive(const QsciScintilla* self) { + return self->caseSensitive(); +} + +void QsciScintilla_ClearFolds(QsciScintilla* self) { + self->clearFolds(); +} + +void QsciScintilla_ClearIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { + self->clearIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +} + +void QsciScintilla_ClearRegisteredImages(QsciScintilla* self) { + self->clearRegisteredImages(); +} + +QColor* QsciScintilla_Color(const QsciScintilla* self) { + return new QColor(self->color()); +} + +struct miqt_array /* of int */ QsciScintilla_ContractedFolds(const QsciScintilla* self) { + QList _ret = self->contractedFolds(); + // Convert QList<> from C++ memory to manually-managed C memory + int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QsciScintilla_ConvertEols(QsciScintilla* self, int mode) { + self->convertEols(static_cast(mode)); +} + +QMenu* QsciScintilla_CreateStandardContextMenu(QsciScintilla* self) { + return self->createStandardContextMenu(); +} + +QsciDocument* QsciScintilla_Document(const QsciScintilla* self) { + return new QsciDocument(self->document()); +} + +void QsciScintilla_EndUndoAction(QsciScintilla* self) { + self->endUndoAction(); +} + +QColor* QsciScintilla_EdgeColor(const QsciScintilla* self) { + return new QColor(self->edgeColor()); +} + +int QsciScintilla_EdgeColumn(const QsciScintilla* self) { + return self->edgeColumn(); +} + +int QsciScintilla_EdgeMode(const QsciScintilla* self) { + QsciScintilla::EdgeMode _ret = self->edgeMode(); + return static_cast(_ret); +} + +void QsciScintilla_SetFont(QsciScintilla* self, QFont* f) { + self->setFont(*f); +} + +int QsciScintilla_EolMode(const QsciScintilla* self) { + QsciScintilla::EolMode _ret = self->eolMode(); + return static_cast(_ret); +} + +bool QsciScintilla_EolVisibility(const QsciScintilla* self) { + return self->eolVisibility(); +} + +int QsciScintilla_ExtraAscent(const QsciScintilla* self) { + return self->extraAscent(); +} + +int QsciScintilla_ExtraDescent(const QsciScintilla* self) { + return self->extraDescent(); +} + +void QsciScintilla_FillIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { + self->fillIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +} + +bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix, cxx11); +} + +bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix, cxx11); +} + +bool QsciScintilla_FindNext(QsciScintilla* self) { + return self->findNext(); +} + +bool QsciScintilla_FindMatchingBrace(QsciScintilla* self, long* brace, long* other, int mode) { + return self->findMatchingBrace(static_cast(*brace), static_cast(*other), static_cast(mode)); +} + +int QsciScintilla_FirstVisibleLine(const QsciScintilla* self) { + return self->firstVisibleLine(); +} + +int QsciScintilla_Folding(const QsciScintilla* self) { + QsciScintilla::FoldStyle _ret = self->folding(); + return static_cast(_ret); +} + +void QsciScintilla_GetCursorPosition(const QsciScintilla* self, int* line, int* index) { + self->getCursorPosition(static_cast(line), static_cast(index)); +} + +void QsciScintilla_GetSelection(const QsciScintilla* self, int* lineFrom, int* indexFrom, int* lineTo, int* indexTo) { + self->getSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); +} + +bool QsciScintilla_HasSelectedText(const QsciScintilla* self) { + return self->hasSelectedText(); +} + +int QsciScintilla_Indentation(const QsciScintilla* self, int line) { + return self->indentation(static_cast(line)); +} + +bool QsciScintilla_IndentationGuides(const QsciScintilla* self) { + return self->indentationGuides(); +} + +bool QsciScintilla_IndentationsUseTabs(const QsciScintilla* self) { + return self->indentationsUseTabs(); +} + +int QsciScintilla_IndentationWidth(const QsciScintilla* self) { + return self->indentationWidth(); +} + +int QsciScintilla_IndicatorDefine(QsciScintilla* self, int style) { + return self->indicatorDefine(static_cast(style)); +} + +bool QsciScintilla_IndicatorDrawUnder(const QsciScintilla* self, int indicatorNumber) { + return self->indicatorDrawUnder(static_cast(indicatorNumber)); +} + +bool QsciScintilla_IsCallTipActive(const QsciScintilla* self) { + return self->isCallTipActive(); +} + +bool QsciScintilla_IsListActive(const QsciScintilla* self) { + return self->isListActive(); +} + +bool QsciScintilla_IsModified(const QsciScintilla* self) { + return self->isModified(); +} + +bool QsciScintilla_IsReadOnly(const QsciScintilla* self) { + return self->isReadOnly(); +} + +bool QsciScintilla_IsRedoAvailable(const QsciScintilla* self) { + return self->isRedoAvailable(); +} + +bool QsciScintilla_IsUndoAvailable(const QsciScintilla* self) { + return self->isUndoAvailable(); +} + +bool QsciScintilla_IsUtf8(const QsciScintilla* self) { + return self->isUtf8(); +} + +bool QsciScintilla_IsWordCharacter(const QsciScintilla* self, char ch) { + return self->isWordCharacter(static_cast(ch)); +} + +int QsciScintilla_LineAt(const QsciScintilla* self, QPoint* point) { + return self->lineAt(*point); +} + +void QsciScintilla_LineIndexFromPosition(const QsciScintilla* self, int position, int* line, int* index) { + self->lineIndexFromPosition(static_cast(position), static_cast(line), static_cast(index)); +} + +int QsciScintilla_LineLength(const QsciScintilla* self, int line) { + return self->lineLength(static_cast(line)); +} + +int QsciScintilla_Lines(const QsciScintilla* self) { + return self->lines(); +} + +int QsciScintilla_Length(const QsciScintilla* self) { + return self->length(); +} + +QsciLexer* QsciScintilla_Lexer(const QsciScintilla* self) { + return self->lexer(); +} + +QColor* QsciScintilla_MarginBackgroundColor(const QsciScintilla* self, int margin) { + return new QColor(self->marginBackgroundColor(static_cast(margin))); +} + +bool QsciScintilla_MarginLineNumbers(const QsciScintilla* self, int margin) { + return self->marginLineNumbers(static_cast(margin)); +} + +int QsciScintilla_MarginMarkerMask(const QsciScintilla* self, int margin) { + return self->marginMarkerMask(static_cast(margin)); +} + +int QsciScintilla_MarginOptions(const QsciScintilla* self) { + return self->marginOptions(); +} + +bool QsciScintilla_MarginSensitivity(const QsciScintilla* self, int margin) { + return self->marginSensitivity(static_cast(margin)); +} + +int QsciScintilla_MarginType(const QsciScintilla* self, int margin) { + QsciScintilla::MarginType _ret = self->marginType(static_cast(margin)); + return static_cast(_ret); +} + +int QsciScintilla_MarginWidth(const QsciScintilla* self, int margin) { + return self->marginWidth(static_cast(margin)); +} + +int QsciScintilla_Margins(const QsciScintilla* self) { + return self->margins(); +} + +int QsciScintilla_MarkerDefine(QsciScintilla* self, int sym) { + return self->markerDefine(static_cast(sym)); +} + +int QsciScintilla_MarkerDefineWithCh(QsciScintilla* self, char ch) { + return self->markerDefine(static_cast(ch)); +} + +int QsciScintilla_MarkerDefineWithPm(QsciScintilla* self, QPixmap* pm) { + return self->markerDefine(*pm); +} + +int QsciScintilla_MarkerDefineWithIm(QsciScintilla* self, QImage* im) { + return self->markerDefine(*im); +} + +int QsciScintilla_MarkerAdd(QsciScintilla* self, int linenr, int markerNumber) { + return self->markerAdd(static_cast(linenr), static_cast(markerNumber)); +} + +unsigned int QsciScintilla_MarkersAtLine(const QsciScintilla* self, int linenr) { + return self->markersAtLine(static_cast(linenr)); +} + +void QsciScintilla_MarkerDelete(QsciScintilla* self, int linenr) { + self->markerDelete(static_cast(linenr)); +} + +void QsciScintilla_MarkerDeleteAll(QsciScintilla* self) { + self->markerDeleteAll(); +} + +void QsciScintilla_MarkerDeleteHandle(QsciScintilla* self, int mhandle) { + self->markerDeleteHandle(static_cast(mhandle)); +} + +int QsciScintilla_MarkerLine(const QsciScintilla* self, int mhandle) { + return self->markerLine(static_cast(mhandle)); +} + +int QsciScintilla_MarkerFindNext(const QsciScintilla* self, int linenr, unsigned int mask) { + return self->markerFindNext(static_cast(linenr), static_cast(mask)); +} + +int QsciScintilla_MarkerFindPrevious(const QsciScintilla* self, int linenr, unsigned int mask) { + return self->markerFindPrevious(static_cast(linenr), static_cast(mask)); +} + +bool QsciScintilla_OverwriteMode(const QsciScintilla* self) { + return self->overwriteMode(); +} + +QColor* QsciScintilla_Paper(const QsciScintilla* self) { + return new QColor(self->paper()); +} + +int QsciScintilla_PositionFromLineIndex(const QsciScintilla* self, int line, int index) { + return self->positionFromLineIndex(static_cast(line), static_cast(index)); +} + +bool QsciScintilla_Read(QsciScintilla* self, QIODevice* io) { + return self->read(io); +} + +void QsciScintilla_Recolor(QsciScintilla* self, int start, int end) { + self->recolor(static_cast(start), static_cast(end)); +} + +void QsciScintilla_RegisterImage(QsciScintilla* self, int id, QPixmap* pm) { + self->registerImage(static_cast(id), *pm); +} + +void QsciScintilla_RegisterImage2(QsciScintilla* self, int id, QImage* im) { + self->registerImage(static_cast(id), *im); +} + +void QsciScintilla_Replace(QsciScintilla* self, struct miqt_string replaceStr) { + QString replaceStr_QString = QString::fromUtf8(replaceStr.data, replaceStr.len); + self->replace(replaceStr_QString); +} + +void QsciScintilla_ResetFoldMarginColors(QsciScintilla* self) { + self->resetFoldMarginColors(); +} + +void QsciScintilla_ResetHotspotBackgroundColor(QsciScintilla* self) { + self->resetHotspotBackgroundColor(); +} + +void QsciScintilla_ResetHotspotForegroundColor(QsciScintilla* self) { + self->resetHotspotForegroundColor(); +} + +int QsciScintilla_ScrollWidth(const QsciScintilla* self) { + return self->scrollWidth(); +} + +bool QsciScintilla_ScrollWidthTracking(const QsciScintilla* self) { + return self->scrollWidthTracking(); +} + +void QsciScintilla_SetFoldMarginColors(QsciScintilla* self, QColor* fore, QColor* back) { + self->setFoldMarginColors(*fore, *back); +} + +void QsciScintilla_SetAnnotationDisplay(QsciScintilla* self, int display) { + self->setAnnotationDisplay(static_cast(display)); +} + +void QsciScintilla_SetAutoCompletionFillupsEnabled(QsciScintilla* self, bool enabled) { + self->setAutoCompletionFillupsEnabled(enabled); +} + +void QsciScintilla_SetAutoCompletionFillups(QsciScintilla* self, const char* fillups) { + self->setAutoCompletionFillups(fillups); +} + +void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array /* of struct miqt_string */ separators) { + QStringList separators_QList; + separators_QList.reserve(separators.len); + struct miqt_string* separators_arr = static_cast(separators.data); + for(size_t i = 0; i < separators.len; ++i) { + QString separators_arr_i_QString = QString::fromUtf8(separators_arr[i].data, separators_arr[i].len); + separators_QList.push_back(separators_arr_i_QString); + } + self->setAutoCompletionWordSeparators(separators_QList); +} + +void QsciScintilla_SetCallTipsBackgroundColor(QsciScintilla* self, QColor* col) { + self->setCallTipsBackgroundColor(*col); +} + +void QsciScintilla_SetCallTipsForegroundColor(QsciScintilla* self, QColor* col) { + self->setCallTipsForegroundColor(*col); +} + +void QsciScintilla_SetCallTipsHighlightColor(QsciScintilla* self, QColor* col) { + self->setCallTipsHighlightColor(*col); +} + +void QsciScintilla_SetCallTipsPosition(QsciScintilla* self, int position) { + self->setCallTipsPosition(static_cast(position)); +} + +void QsciScintilla_SetCallTipsStyle(QsciScintilla* self, int style) { + self->setCallTipsStyle(static_cast(style)); +} + +void QsciScintilla_SetCallTipsVisible(QsciScintilla* self, int nr) { + self->setCallTipsVisible(static_cast(nr)); +} + +void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array /* of int */ folds) { + QList folds_QList; + folds_QList.reserve(folds.len); + int* folds_arr = static_cast(folds.data); + for(size_t i = 0; i < folds.len; ++i) { + folds_QList.push_back(static_cast(folds_arr[i])); + } + self->setContractedFolds(folds_QList); +} + +void QsciScintilla_SetDocument(QsciScintilla* self, QsciDocument* document) { + self->setDocument(*document); +} + +void QsciScintilla_AddEdgeColumn(QsciScintilla* self, int colnr, QColor* col) { + self->addEdgeColumn(static_cast(colnr), *col); +} + +void QsciScintilla_ClearEdgeColumns(QsciScintilla* self) { + self->clearEdgeColumns(); +} + +void QsciScintilla_SetEdgeColor(QsciScintilla* self, QColor* col) { + self->setEdgeColor(*col); +} + +void QsciScintilla_SetEdgeColumn(QsciScintilla* self, int colnr) { + self->setEdgeColumn(static_cast(colnr)); +} + +void QsciScintilla_SetEdgeMode(QsciScintilla* self, int mode) { + self->setEdgeMode(static_cast(mode)); +} + +void QsciScintilla_SetFirstVisibleLine(QsciScintilla* self, int linenr) { + self->setFirstVisibleLine(static_cast(linenr)); +} + +void QsciScintilla_SetIndicatorDrawUnder(QsciScintilla* self, bool under) { + self->setIndicatorDrawUnder(under); +} + +void QsciScintilla_SetIndicatorForegroundColor(QsciScintilla* self, QColor* col) { + self->setIndicatorForegroundColor(*col); +} + +void QsciScintilla_SetIndicatorHoverForegroundColor(QsciScintilla* self, QColor* col) { + self->setIndicatorHoverForegroundColor(*col); +} + +void QsciScintilla_SetIndicatorHoverStyle(QsciScintilla* self, int style) { + self->setIndicatorHoverStyle(static_cast(style)); +} + +void QsciScintilla_SetIndicatorOutlineColor(QsciScintilla* self, QColor* col) { + self->setIndicatorOutlineColor(*col); +} + +void QsciScintilla_SetMarginBackgroundColor(QsciScintilla* self, int margin, QColor* col) { + self->setMarginBackgroundColor(static_cast(margin), *col); +} + +void QsciScintilla_SetMarginOptions(QsciScintilla* self, int options) { + self->setMarginOptions(static_cast(options)); +} + +void QsciScintilla_SetMarginText(QsciScintilla* self, int line, struct miqt_string text, int style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setMarginText(static_cast(line), text_QString, static_cast(style)); +} + +void QsciScintilla_SetMarginText2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setMarginText(static_cast(line), text_QString, *style); +} + +void QsciScintilla_SetMarginText3(QsciScintilla* self, int line, QsciStyledText* text) { + self->setMarginText(static_cast(line), *text); +} + +void QsciScintilla_SetMarginType(QsciScintilla* self, int margin, int typeVal) { + self->setMarginType(static_cast(margin), static_cast(typeVal)); +} + +void QsciScintilla_ClearMarginText(QsciScintilla* self) { + self->clearMarginText(); +} + +void QsciScintilla_SetMargins(QsciScintilla* self, int margins) { + self->setMargins(static_cast(margins)); +} + +void QsciScintilla_SetMarkerBackgroundColor(QsciScintilla* self, QColor* col) { + self->setMarkerBackgroundColor(*col); +} + +void QsciScintilla_SetMarkerForegroundColor(QsciScintilla* self, QColor* col) { + self->setMarkerForegroundColor(*col); +} + +void QsciScintilla_SetMatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { + self->setMatchedBraceBackgroundColor(*col); +} + +void QsciScintilla_SetMatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { + self->setMatchedBraceForegroundColor(*col); +} + +void QsciScintilla_SetMatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { + self->setMatchedBraceIndicator(static_cast(indicatorNumber)); +} + +void QsciScintilla_ResetMatchedBraceIndicator(QsciScintilla* self) { + self->resetMatchedBraceIndicator(); +} + +void QsciScintilla_SetScrollWidth(QsciScintilla* self, int pixelWidth) { + self->setScrollWidth(static_cast(pixelWidth)); +} + +void QsciScintilla_SetScrollWidthTracking(QsciScintilla* self, bool enabled) { + self->setScrollWidthTracking(enabled); +} + +void QsciScintilla_SetTabDrawMode(QsciScintilla* self, int mode) { + self->setTabDrawMode(static_cast(mode)); +} + +void QsciScintilla_SetUnmatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { + self->setUnmatchedBraceBackgroundColor(*col); +} + +void QsciScintilla_SetUnmatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { + self->setUnmatchedBraceForegroundColor(*col); +} + +void QsciScintilla_SetUnmatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { + self->setUnmatchedBraceIndicator(static_cast(indicatorNumber)); +} + +void QsciScintilla_ResetUnmatchedBraceIndicator(QsciScintilla* self) { + self->resetUnmatchedBraceIndicator(); +} + +void QsciScintilla_SetWrapVisualFlags(QsciScintilla* self, int endFlag) { + self->setWrapVisualFlags(static_cast(endFlag)); +} + +struct miqt_string QsciScintilla_SelectedText(const QsciScintilla* self) { + QString _ret = self->selectedText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QsciScintilla_SelectionToEol(const QsciScintilla* self) { + return self->selectionToEol(); +} + +void QsciScintilla_SetHotspotBackgroundColor(QsciScintilla* self, QColor* col) { + self->setHotspotBackgroundColor(*col); +} + +void QsciScintilla_SetHotspotForegroundColor(QsciScintilla* self, QColor* col) { + self->setHotspotForegroundColor(*col); +} + +void QsciScintilla_SetHotspotUnderline(QsciScintilla* self, bool enable) { + self->setHotspotUnderline(enable); } -QsciScintilla* QsciScintilla_new2() { - return new QsciScintilla(); +void QsciScintilla_SetHotspotWrap(QsciScintilla* self, bool enable) { + self->setHotspotWrap(enable); } -QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self) { - return (QMetaObject*) self->metaObject(); +void QsciScintilla_SetSelectionToEol(QsciScintilla* self, bool filled) { + self->setSelectionToEol(filled); } -void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1) { - return self->qt_metacast(param1); +void QsciScintilla_SetExtraAscent(QsciScintilla* self, int extra) { + self->setExtraAscent(static_cast(extra)); } -struct miqt_string QsciScintilla_Tr(const char* s) { - QString _ret = QsciScintilla::tr(s); +void QsciScintilla_SetExtraDescent(QsciScintilla* self, int extra) { + self->setExtraDescent(static_cast(extra)); +} + +void QsciScintilla_SetOverwriteMode(QsciScintilla* self, bool overwrite) { + self->setOverwriteMode(overwrite); +} + +void QsciScintilla_SetWhitespaceBackgroundColor(QsciScintilla* self, QColor* col) { + self->setWhitespaceBackgroundColor(*col); +} + +void QsciScintilla_SetWhitespaceForegroundColor(QsciScintilla* self, QColor* col) { + self->setWhitespaceForegroundColor(*col); +} + +void QsciScintilla_SetWhitespaceSize(QsciScintilla* self, int size) { + self->setWhitespaceSize(static_cast(size)); +} + +void QsciScintilla_SetWrapIndentMode(QsciScintilla* self, int mode) { + self->setWrapIndentMode(static_cast(mode)); +} + +void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array /* of struct miqt_string */ list) { + QStringList list_QList; + list_QList.reserve(list.len); + struct miqt_string* list_arr = static_cast(list.data); + for(size_t i = 0; i < list.len; ++i) { + QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len); + list_QList.push_back(list_arr_i_QString); + } + self->showUserList(static_cast(id), list_QList); +} + +QsciCommandSet* QsciScintilla_StandardCommands(const QsciScintilla* self) { + return self->standardCommands(); +} + +int QsciScintilla_TabDrawMode(const QsciScintilla* self) { + QsciScintilla::TabDrawMode _ret = self->tabDrawMode(); + return static_cast(_ret); +} + +bool QsciScintilla_TabIndents(const QsciScintilla* self) { + return self->tabIndents(); +} + +int QsciScintilla_TabWidth(const QsciScintilla* self) { + return self->tabWidth(); +} + +struct miqt_string QsciScintilla_Text(const QsciScintilla* self) { + QString _ret = self->text(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -43,8 +3582,8 @@ struct miqt_string QsciScintilla_Tr(const char* s) { return _ms; } -struct miqt_string QsciScintilla_TrUtf8(const char* s) { - QString _ret = QsciScintilla::trUtf8(s); +struct miqt_string QsciScintilla_TextWithLine(const QsciScintilla* self, int line) { + QString _ret = self->text(static_cast(line)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -54,42 +3593,32 @@ struct miqt_string QsciScintilla_TrUtf8(const char* s) { return _ms; } -struct miqt_array /* of struct miqt_string */ QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start) { - QStringList _ret = self->apiContext(static_cast(pos), static_cast(*context_start), static_cast(*last_word_start)); - // Convert QList<> from C++ memory to manually-managed C memory - struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QString _lv_ret = _ret[i]; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _lv_b = _lv_ret.toUtf8(); - struct miqt_string _lv_ms; - _lv_ms.len = _lv_b.length(); - _lv_ms.data = static_cast(malloc(_lv_ms.len)); - memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); - _arr[i] = _lv_ms; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +struct miqt_string QsciScintilla_Text2(const QsciScintilla* self, int start, int end) { + QString _ret = self->text(static_cast(start), static_cast(end)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_Annotate(QsciScintilla* self, int line, struct miqt_string text, int style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->annotate(static_cast(line), text_QString, static_cast(style)); +int QsciScintilla_TextHeight(const QsciScintilla* self, int linenr) { + return self->textHeight(static_cast(linenr)); } -void QsciScintilla_Annotate2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->annotate(static_cast(line), text_QString, *style); +int QsciScintilla_WhitespaceSize(const QsciScintilla* self) { + return self->whitespaceSize(); } -void QsciScintilla_Annotate3(QsciScintilla* self, int line, QsciStyledText* text) { - self->annotate(static_cast(line), *text); +int QsciScintilla_WhitespaceVisibility(const QsciScintilla* self) { + QsciScintilla::WhitespaceVisibility _ret = self->whitespaceVisibility(); + return static_cast(_ret); } -struct miqt_string QsciScintilla_Annotation(const QsciScintilla* self, int line) { - QString _ret = self->annotation(static_cast(line)); +struct miqt_string QsciScintilla_WordAtLineIndex(const QsciScintilla* self, int line, int index) { + QString _ret = self->wordAtLineIndex(static_cast(line), static_cast(index)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -99,1464 +3628,1476 @@ struct miqt_string QsciScintilla_Annotation(const QsciScintilla* self, int line) return _ms; } -int QsciScintilla_AnnotationDisplay(const QsciScintilla* self) { - QsciScintilla::AnnotationDisplay _ret = self->annotationDisplay(); +struct miqt_string QsciScintilla_WordAtPoint(const QsciScintilla* self, QPoint* point) { + QString _ret = self->wordAtPoint(*point); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +const char* QsciScintilla_WordCharacters(const QsciScintilla* self) { + return (const char*) self->wordCharacters(); +} + +int QsciScintilla_WrapMode(const QsciScintilla* self) { + QsciScintilla::WrapMode _ret = self->wrapMode(); return static_cast(_ret); } -void QsciScintilla_ClearAnnotations(QsciScintilla* self) { - self->clearAnnotations(); +int QsciScintilla_WrapIndentMode(const QsciScintilla* self) { + QsciScintilla::WrapIndentMode _ret = self->wrapIndentMode(); + return static_cast(_ret); } -bool QsciScintilla_AutoCompletionCaseSensitivity(const QsciScintilla* self) { - return self->autoCompletionCaseSensitivity(); +bool QsciScintilla_Write(const QsciScintilla* self, QIODevice* io) { + return self->write(io); } -bool QsciScintilla_AutoCompletionFillupsEnabled(const QsciScintilla* self) { - return self->autoCompletionFillupsEnabled(); +void QsciScintilla_Append(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->append(text_QString); } -bool QsciScintilla_AutoCompletionReplaceWord(const QsciScintilla* self) { - return self->autoCompletionReplaceWord(); +void QsciScintilla_AutoCompleteFromAll(QsciScintilla* self) { + self->autoCompleteFromAll(); } -bool QsciScintilla_AutoCompletionShowSingle(const QsciScintilla* self) { - return self->autoCompletionShowSingle(); +void QsciScintilla_AutoCompleteFromAPIs(QsciScintilla* self) { + self->autoCompleteFromAPIs(); } -int QsciScintilla_AutoCompletionSource(const QsciScintilla* self) { - QsciScintilla::AutoCompletionSource _ret = self->autoCompletionSource(); - return static_cast(_ret); +void QsciScintilla_AutoCompleteFromDocument(QsciScintilla* self) { + self->autoCompleteFromDocument(); +} + +void QsciScintilla_CallTip(QsciScintilla* self) { + self->callTip(); +} + +void QsciScintilla_Clear(QsciScintilla* self) { + self->clear(); +} + +void QsciScintilla_Copy(QsciScintilla* self) { + self->copy(); +} + +void QsciScintilla_Cut(QsciScintilla* self) { + self->cut(); +} + +void QsciScintilla_EnsureCursorVisible(QsciScintilla* self) { + self->ensureCursorVisible(); +} + +void QsciScintilla_EnsureLineVisible(QsciScintilla* self, int line) { + self->ensureLineVisible(static_cast(line)); +} + +void QsciScintilla_FoldAll(QsciScintilla* self, bool children) { + self->foldAll(children); +} + +void QsciScintilla_FoldLine(QsciScintilla* self, int line) { + self->foldLine(static_cast(line)); +} + +void QsciScintilla_Indent(QsciScintilla* self, int line) { + self->indent(static_cast(line)); +} + +void QsciScintilla_Insert(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->insert(text_QString); +} + +void QsciScintilla_InsertAt(QsciScintilla* self, struct miqt_string text, int line, int index) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->insertAt(text_QString, static_cast(line), static_cast(index)); +} + +void QsciScintilla_MoveToMatchingBrace(QsciScintilla* self) { + self->moveToMatchingBrace(); +} + +void QsciScintilla_Paste(QsciScintilla* self) { + self->paste(); +} + +void QsciScintilla_Redo(QsciScintilla* self) { + self->redo(); +} + +void QsciScintilla_RemoveSelectedText(QsciScintilla* self) { + self->removeSelectedText(); +} + +void QsciScintilla_ReplaceSelectedText(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->replaceSelectedText(text_QString); +} + +void QsciScintilla_ResetSelectionBackgroundColor(QsciScintilla* self) { + self->resetSelectionBackgroundColor(); +} + +void QsciScintilla_ResetSelectionForegroundColor(QsciScintilla* self) { + self->resetSelectionForegroundColor(); +} + +void QsciScintilla_SelectAll(QsciScintilla* self, bool selectVal) { + self->selectAll(selectVal); +} + +void QsciScintilla_SelectToMatchingBrace(QsciScintilla* self) { + self->selectToMatchingBrace(); +} + +void QsciScintilla_SetAutoCompletionCaseSensitivity(QsciScintilla* self, bool cs) { + self->setAutoCompletionCaseSensitivity(cs); +} + +void QsciScintilla_SetAutoCompletionReplaceWord(QsciScintilla* self, bool replace) { + self->setAutoCompletionReplaceWord(replace); +} + +void QsciScintilla_SetAutoCompletionShowSingle(QsciScintilla* self, bool single) { + self->setAutoCompletionShowSingle(single); +} + +void QsciScintilla_SetAutoCompletionSource(QsciScintilla* self, int source) { + self->setAutoCompletionSource(static_cast(source)); } -int QsciScintilla_AutoCompletionThreshold(const QsciScintilla* self) { - return self->autoCompletionThreshold(); +void QsciScintilla_SetAutoCompletionThreshold(QsciScintilla* self, int thresh) { + self->setAutoCompletionThreshold(static_cast(thresh)); } -int QsciScintilla_AutoCompletionUseSingle(const QsciScintilla* self) { - QsciScintilla::AutoCompletionUseSingle _ret = self->autoCompletionUseSingle(); - return static_cast(_ret); +void QsciScintilla_SetAutoCompletionUseSingle(QsciScintilla* self, int single) { + self->setAutoCompletionUseSingle(static_cast(single)); } -bool QsciScintilla_AutoIndent(const QsciScintilla* self) { - return self->autoIndent(); +void QsciScintilla_SetAutoIndent(QsciScintilla* self, bool autoindent) { + self->setAutoIndent(autoindent); } -bool QsciScintilla_BackspaceUnindents(const QsciScintilla* self) { - return self->backspaceUnindents(); +void QsciScintilla_SetBraceMatching(QsciScintilla* self, int bm) { + self->setBraceMatching(static_cast(bm)); } -void QsciScintilla_BeginUndoAction(QsciScintilla* self) { - self->beginUndoAction(); +void QsciScintilla_SetBackspaceUnindents(QsciScintilla* self, bool unindent) { + self->setBackspaceUnindents(unindent); } -int QsciScintilla_BraceMatching(const QsciScintilla* self) { - QsciScintilla::BraceMatch _ret = self->braceMatching(); - return static_cast(_ret); +void QsciScintilla_SetCaretForegroundColor(QsciScintilla* self, QColor* col) { + self->setCaretForegroundColor(*col); } -struct miqt_string QsciScintilla_Bytes(const QsciScintilla* self, int start, int end) { - QByteArray _qb = self->bytes(static_cast(start), static_cast(end)); - struct miqt_string _ms; - _ms.len = _qb.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _qb.data(), _ms.len); - return _ms; +void QsciScintilla_SetCaretLineBackgroundColor(QsciScintilla* self, QColor* col) { + self->setCaretLineBackgroundColor(*col); } -int QsciScintilla_CallTipsPosition(const QsciScintilla* self) { - QsciScintilla::CallTipsPosition _ret = self->callTipsPosition(); - return static_cast(_ret); +void QsciScintilla_SetCaretLineFrameWidth(QsciScintilla* self, int width) { + self->setCaretLineFrameWidth(static_cast(width)); } -int QsciScintilla_CallTipsStyle(const QsciScintilla* self) { - QsciScintilla::CallTipsStyle _ret = self->callTipsStyle(); - return static_cast(_ret); +void QsciScintilla_SetCaretLineVisible(QsciScintilla* self, bool enable) { + self->setCaretLineVisible(enable); } -int QsciScintilla_CallTipsVisible(const QsciScintilla* self) { - return self->callTipsVisible(); +void QsciScintilla_SetCaretWidth(QsciScintilla* self, int width) { + self->setCaretWidth(static_cast(width)); } -void QsciScintilla_CancelFind(QsciScintilla* self) { - self->cancelFind(); +void QsciScintilla_SetColor(QsciScintilla* self, QColor* c) { + self->setColor(*c); } -void QsciScintilla_CancelList(QsciScintilla* self) { - self->cancelList(); +void QsciScintilla_SetCursorPosition(QsciScintilla* self, int line, int index) { + self->setCursorPosition(static_cast(line), static_cast(index)); } -bool QsciScintilla_CaseSensitive(const QsciScintilla* self) { - return self->caseSensitive(); +void QsciScintilla_SetEolMode(QsciScintilla* self, int mode) { + self->setEolMode(static_cast(mode)); } -void QsciScintilla_ClearFolds(QsciScintilla* self) { - self->clearFolds(); +void QsciScintilla_SetEolVisibility(QsciScintilla* self, bool visible) { + self->setEolVisibility(visible); } -void QsciScintilla_ClearIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { - self->clearIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +void QsciScintilla_SetFolding(QsciScintilla* self, int fold, int margin) { + self->setFolding(static_cast(fold), static_cast(margin)); } -void QsciScintilla_ClearRegisteredImages(QsciScintilla* self) { - self->clearRegisteredImages(); +void QsciScintilla_SetIndentation(QsciScintilla* self, int line, int indentation) { + self->setIndentation(static_cast(line), static_cast(indentation)); } -QColor* QsciScintilla_Color(const QsciScintilla* self) { - return new QColor(self->color()); +void QsciScintilla_SetIndentationGuides(QsciScintilla* self, bool enable) { + self->setIndentationGuides(enable); } -struct miqt_array /* of int */ QsciScintilla_ContractedFolds(const QsciScintilla* self) { - QList _ret = self->contractedFolds(); - // Convert QList<> from C++ memory to manually-managed C memory - int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +void QsciScintilla_SetIndentationGuidesBackgroundColor(QsciScintilla* self, QColor* col) { + self->setIndentationGuidesBackgroundColor(*col); } -void QsciScintilla_ConvertEols(QsciScintilla* self, int mode) { - self->convertEols(static_cast(mode)); +void QsciScintilla_SetIndentationGuidesForegroundColor(QsciScintilla* self, QColor* col) { + self->setIndentationGuidesForegroundColor(*col); } -QMenu* QsciScintilla_CreateStandardContextMenu(QsciScintilla* self) { - return self->createStandardContextMenu(); +void QsciScintilla_SetIndentationsUseTabs(QsciScintilla* self, bool tabs) { + self->setIndentationsUseTabs(tabs); } -QsciDocument* QsciScintilla_Document(const QsciScintilla* self) { - return new QsciDocument(self->document()); +void QsciScintilla_SetIndentationWidth(QsciScintilla* self, int width) { + self->setIndentationWidth(static_cast(width)); } -void QsciScintilla_EndUndoAction(QsciScintilla* self) { - self->endUndoAction(); +void QsciScintilla_SetLexer(QsciScintilla* self, QsciLexer* lexer) { + self->setLexer(lexer); } -QColor* QsciScintilla_EdgeColor(const QsciScintilla* self) { - return new QColor(self->edgeColor()); +void QsciScintilla_SetMarginsBackgroundColor(QsciScintilla* self, QColor* col) { + self->setMarginsBackgroundColor(*col); } -int QsciScintilla_EdgeColumn(const QsciScintilla* self) { - return self->edgeColumn(); +void QsciScintilla_SetMarginsFont(QsciScintilla* self, QFont* f) { + self->setMarginsFont(*f); } -int QsciScintilla_EdgeMode(const QsciScintilla* self) { - QsciScintilla::EdgeMode _ret = self->edgeMode(); - return static_cast(_ret); +void QsciScintilla_SetMarginsForegroundColor(QsciScintilla* self, QColor* col) { + self->setMarginsForegroundColor(*col); } -void QsciScintilla_SetFont(QsciScintilla* self, QFont* f) { - self->setFont(*f); +void QsciScintilla_SetMarginLineNumbers(QsciScintilla* self, int margin, bool lnrs) { + self->setMarginLineNumbers(static_cast(margin), lnrs); } -int QsciScintilla_EolMode(const QsciScintilla* self) { - QsciScintilla::EolMode _ret = self->eolMode(); - return static_cast(_ret); +void QsciScintilla_SetMarginMarkerMask(QsciScintilla* self, int margin, int mask) { + self->setMarginMarkerMask(static_cast(margin), static_cast(mask)); } -bool QsciScintilla_EolVisibility(const QsciScintilla* self) { - return self->eolVisibility(); +void QsciScintilla_SetMarginSensitivity(QsciScintilla* self, int margin, bool sens) { + self->setMarginSensitivity(static_cast(margin), sens); } -int QsciScintilla_ExtraAscent(const QsciScintilla* self) { - return self->extraAscent(); +void QsciScintilla_SetMarginWidth(QsciScintilla* self, int margin, int width) { + self->setMarginWidth(static_cast(margin), static_cast(width)); } -int QsciScintilla_ExtraDescent(const QsciScintilla* self) { - return self->extraDescent(); +void QsciScintilla_SetMarginWidth2(QsciScintilla* self, int margin, struct miqt_string s) { + QString s_QString = QString::fromUtf8(s.data, s.len); + self->setMarginWidth(static_cast(margin), s_QString); } -void QsciScintilla_FillIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { - self->fillIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +void QsciScintilla_SetModified(QsciScintilla* self, bool m) { + self->setModified(m); } -bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap); +void QsciScintilla_SetPaper(QsciScintilla* self, QColor* c) { + self->setPaper(*c); } -bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo); +void QsciScintilla_SetReadOnly(QsciScintilla* self, bool ro) { + self->setReadOnly(ro); } -bool QsciScintilla_FindNext(QsciScintilla* self) { - return self->findNext(); +void QsciScintilla_SetSelection(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo) { + self->setSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); } -bool QsciScintilla_FindMatchingBrace(QsciScintilla* self, long* brace, long* other, int mode) { - return self->findMatchingBrace(static_cast(*brace), static_cast(*other), static_cast(mode)); +void QsciScintilla_SetSelectionBackgroundColor(QsciScintilla* self, QColor* col) { + self->setSelectionBackgroundColor(*col); } -int QsciScintilla_FirstVisibleLine(const QsciScintilla* self) { - return self->firstVisibleLine(); +void QsciScintilla_SetSelectionForegroundColor(QsciScintilla* self, QColor* col) { + self->setSelectionForegroundColor(*col); } -int QsciScintilla_Folding(const QsciScintilla* self) { - QsciScintilla::FoldStyle _ret = self->folding(); - return static_cast(_ret); +void QsciScintilla_SetTabIndents(QsciScintilla* self, bool indent) { + self->setTabIndents(indent); } -void QsciScintilla_GetCursorPosition(const QsciScintilla* self, int* line, int* index) { - self->getCursorPosition(static_cast(line), static_cast(index)); +void QsciScintilla_SetTabWidth(QsciScintilla* self, int width) { + self->setTabWidth(static_cast(width)); } -void QsciScintilla_GetSelection(const QsciScintilla* self, int* lineFrom, int* indexFrom, int* lineTo, int* indexTo) { - self->getSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); +void QsciScintilla_SetText(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setText(text_QString); } -bool QsciScintilla_HasSelectedText(const QsciScintilla* self) { - return self->hasSelectedText(); +void QsciScintilla_SetUtf8(QsciScintilla* self, bool cp) { + self->setUtf8(cp); } -int QsciScintilla_Indentation(const QsciScintilla* self, int line) { - return self->indentation(static_cast(line)); +void QsciScintilla_SetWhitespaceVisibility(QsciScintilla* self, int mode) { + self->setWhitespaceVisibility(static_cast(mode)); } -bool QsciScintilla_IndentationGuides(const QsciScintilla* self) { - return self->indentationGuides(); +void QsciScintilla_SetWrapMode(QsciScintilla* self, int mode) { + self->setWrapMode(static_cast(mode)); } -bool QsciScintilla_IndentationsUseTabs(const QsciScintilla* self) { - return self->indentationsUseTabs(); +void QsciScintilla_Undo(QsciScintilla* self) { + self->undo(); } -int QsciScintilla_IndentationWidth(const QsciScintilla* self) { - return self->indentationWidth(); +void QsciScintilla_Unindent(QsciScintilla* self, int line) { + self->unindent(static_cast(line)); } -int QsciScintilla_IndicatorDefine(QsciScintilla* self, int style) { - return self->indicatorDefine(static_cast(style)); +void QsciScintilla_ZoomIn(QsciScintilla* self, int rangeVal) { + self->zoomIn(static_cast(rangeVal)); } -bool QsciScintilla_IndicatorDrawUnder(const QsciScintilla* self, int indicatorNumber) { - return self->indicatorDrawUnder(static_cast(indicatorNumber)); +void QsciScintilla_ZoomIn2(QsciScintilla* self) { + self->zoomIn(); } -bool QsciScintilla_IsCallTipActive(const QsciScintilla* self) { - return self->isCallTipActive(); +void QsciScintilla_ZoomOut(QsciScintilla* self, int rangeVal) { + self->zoomOut(static_cast(rangeVal)); } -bool QsciScintilla_IsListActive(const QsciScintilla* self) { - return self->isListActive(); +void QsciScintilla_ZoomOut2(QsciScintilla* self) { + self->zoomOut(); } -bool QsciScintilla_IsModified(const QsciScintilla* self) { - return self->isModified(); +void QsciScintilla_ZoomTo(QsciScintilla* self, int size) { + self->zoomTo(static_cast(size)); } -bool QsciScintilla_IsReadOnly(const QsciScintilla* self) { - return self->isReadOnly(); +void QsciScintilla_CursorPositionChanged(QsciScintilla* self, int line, int index) { + self->cursorPositionChanged(static_cast(line), static_cast(index)); } -bool QsciScintilla_IsRedoAvailable(const QsciScintilla* self) { - return self->isRedoAvailable(); +void QsciScintilla_connect_CursorPositionChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::cursorPositionChanged), self, [=](int line, int index) { + int sigval1 = line; + int sigval2 = index; + miqt_exec_callback_QsciScintilla_CursorPositionChanged(slot, sigval1, sigval2); + }); } -bool QsciScintilla_IsUndoAvailable(const QsciScintilla* self) { - return self->isUndoAvailable(); +void QsciScintilla_CopyAvailable(QsciScintilla* self, bool yes) { + self->copyAvailable(yes); } -bool QsciScintilla_IsUtf8(const QsciScintilla* self) { - return self->isUtf8(); +void QsciScintilla_connect_CopyAvailable(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::copyAvailable), self, [=](bool yes) { + bool sigval1 = yes; + miqt_exec_callback_QsciScintilla_CopyAvailable(slot, sigval1); + }); } -bool QsciScintilla_IsWordCharacter(const QsciScintilla* self, char ch) { - return self->isWordCharacter(static_cast(ch)); +void QsciScintilla_IndicatorClicked(QsciScintilla* self, int line, int index, int state) { + self->indicatorClicked(static_cast(line), static_cast(index), static_cast(state)); } -int QsciScintilla_LineAt(const QsciScintilla* self, QPoint* point) { - return self->lineAt(*point); +void QsciScintilla_connect_IndicatorClicked(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorClicked), self, [=](int line, int index, Qt::KeyboardModifiers state) { + int sigval1 = line; + int sigval2 = index; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_IndicatorClicked(slot, sigval1, sigval2, sigval3); + }); } -void QsciScintilla_LineIndexFromPosition(const QsciScintilla* self, int position, int* line, int* index) { - self->lineIndexFromPosition(static_cast(position), static_cast(line), static_cast(index)); +void QsciScintilla_IndicatorReleased(QsciScintilla* self, int line, int index, int state) { + self->indicatorReleased(static_cast(line), static_cast(index), static_cast(state)); } -int QsciScintilla_LineLength(const QsciScintilla* self, int line) { - return self->lineLength(static_cast(line)); +void QsciScintilla_connect_IndicatorReleased(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorReleased), self, [=](int line, int index, Qt::KeyboardModifiers state) { + int sigval1 = line; + int sigval2 = index; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_IndicatorReleased(slot, sigval1, sigval2, sigval3); + }); } -int QsciScintilla_Lines(const QsciScintilla* self) { - return self->lines(); +void QsciScintilla_LinesChanged(QsciScintilla* self) { + self->linesChanged(); } -int QsciScintilla_Length(const QsciScintilla* self) { - return self->length(); +void QsciScintilla_connect_LinesChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::linesChanged), self, [=]() { + miqt_exec_callback_QsciScintilla_LinesChanged(slot); + }); } -QsciLexer* QsciScintilla_Lexer(const QsciScintilla* self) { - return self->lexer(); +void QsciScintilla_MarginClicked(QsciScintilla* self, int margin, int line, int state) { + self->marginClicked(static_cast(margin), static_cast(line), static_cast(state)); } -QColor* QsciScintilla_MarginBackgroundColor(const QsciScintilla* self, int margin) { - return new QColor(self->marginBackgroundColor(static_cast(margin))); +void QsciScintilla_connect_MarginClicked(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::marginClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { + int sigval1 = margin; + int sigval2 = line; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_MarginClicked(slot, sigval1, sigval2, sigval3); + }); } -bool QsciScintilla_MarginLineNumbers(const QsciScintilla* self, int margin) { - return self->marginLineNumbers(static_cast(margin)); +void QsciScintilla_MarginRightClicked(QsciScintilla* self, int margin, int line, int state) { + self->marginRightClicked(static_cast(margin), static_cast(line), static_cast(state)); } -int QsciScintilla_MarginMarkerMask(const QsciScintilla* self, int margin) { - return self->marginMarkerMask(static_cast(margin)); +void QsciScintilla_connect_MarginRightClicked(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::marginRightClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { + int sigval1 = margin; + int sigval2 = line; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_MarginRightClicked(slot, sigval1, sigval2, sigval3); + }); } -int QsciScintilla_MarginOptions(const QsciScintilla* self) { - return self->marginOptions(); +void QsciScintilla_ModificationAttempted(QsciScintilla* self) { + self->modificationAttempted(); } -bool QsciScintilla_MarginSensitivity(const QsciScintilla* self, int margin) { - return self->marginSensitivity(static_cast(margin)); +void QsciScintilla_connect_ModificationAttempted(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::modificationAttempted), self, [=]() { + miqt_exec_callback_QsciScintilla_ModificationAttempted(slot); + }); } -int QsciScintilla_MarginType(const QsciScintilla* self, int margin) { - QsciScintilla::MarginType _ret = self->marginType(static_cast(margin)); - return static_cast(_ret); +void QsciScintilla_ModificationChanged(QsciScintilla* self, bool m) { + self->modificationChanged(m); } -int QsciScintilla_MarginWidth(const QsciScintilla* self, int margin) { - return self->marginWidth(static_cast(margin)); +void QsciScintilla_connect_ModificationChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::modificationChanged), self, [=](bool m) { + bool sigval1 = m; + miqt_exec_callback_QsciScintilla_ModificationChanged(slot, sigval1); + }); } -int QsciScintilla_Margins(const QsciScintilla* self) { - return self->margins(); +void QsciScintilla_SelectionChanged(QsciScintilla* self) { + self->selectionChanged(); } -int QsciScintilla_MarkerDefine(QsciScintilla* self, int sym) { - return self->markerDefine(static_cast(sym)); +void QsciScintilla_connect_SelectionChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::selectionChanged), self, [=]() { + miqt_exec_callback_QsciScintilla_SelectionChanged(slot); + }); } -int QsciScintilla_MarkerDefineWithCh(QsciScintilla* self, char ch) { - return self->markerDefine(static_cast(ch)); +void QsciScintilla_TextChanged(QsciScintilla* self) { + self->textChanged(); } -int QsciScintilla_MarkerDefineWithPm(QsciScintilla* self, QPixmap* pm) { - return self->markerDefine(*pm); +void QsciScintilla_connect_TextChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::textChanged), self, [=]() { + miqt_exec_callback_QsciScintilla_TextChanged(slot); + }); } -int QsciScintilla_MarkerDefineWithIm(QsciScintilla* self, QImage* im) { - return self->markerDefine(*im); +void QsciScintilla_UserListActivated(QsciScintilla* self, int id, struct miqt_string stringVal) { + QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); + self->userListActivated(static_cast(id), stringVal_QString); } -int QsciScintilla_MarkerAdd(QsciScintilla* self, int linenr, int markerNumber) { - return self->markerAdd(static_cast(linenr), static_cast(markerNumber)); +void QsciScintilla_connect_UserListActivated(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::userListActivated), self, [=](int id, const QString& stringVal) { + int sigval1 = id; + const QString stringVal_ret = stringVal; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray stringVal_b = stringVal_ret.toUtf8(); + struct miqt_string stringVal_ms; + stringVal_ms.len = stringVal_b.length(); + stringVal_ms.data = static_cast(malloc(stringVal_ms.len)); + memcpy(stringVal_ms.data, stringVal_b.data(), stringVal_ms.len); + struct miqt_string sigval2 = stringVal_ms; + miqt_exec_callback_QsciScintilla_UserListActivated(slot, sigval1, sigval2); + }); } -unsigned int QsciScintilla_MarkersAtLine(const QsciScintilla* self, int linenr) { - return self->markersAtLine(static_cast(linenr)); +struct miqt_string QsciScintilla_Tr2(const char* s, const char* c) { + QString _ret = QsciScintilla::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_MarkerDelete(QsciScintilla* self, int linenr) { - self->markerDelete(static_cast(linenr)); +struct miqt_string QsciScintilla_Tr3(const char* s, const char* c, int n) { + QString _ret = QsciScintilla::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_MarkerDeleteAll(QsciScintilla* self) { - self->markerDeleteAll(); +struct miqt_string QsciScintilla_TrUtf82(const char* s, const char* c) { + QString _ret = QsciScintilla::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_MarkerDeleteHandle(QsciScintilla* self, int mhandle) { - self->markerDeleteHandle(static_cast(mhandle)); +struct miqt_string QsciScintilla_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QsciScintilla::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -int QsciScintilla_MarkerLine(const QsciScintilla* self, int mhandle) { - return self->markerLine(static_cast(mhandle)); +void QsciScintilla_ClearAnnotations1(QsciScintilla* self, int line) { + self->clearAnnotations(static_cast(line)); } -int QsciScintilla_MarkerFindNext(const QsciScintilla* self, int linenr, unsigned int mask) { - return self->markerFindNext(static_cast(linenr), static_cast(mask)); +int QsciScintilla_IndicatorDefine2(QsciScintilla* self, int style, int indicatorNumber) { + return self->indicatorDefine(static_cast(style), static_cast(indicatorNumber)); } -int QsciScintilla_MarkerFindPrevious(const QsciScintilla* self, int linenr, unsigned int mask) { - return self->markerFindPrevious(static_cast(linenr), static_cast(mask)); +int QsciScintilla_MarkerDefine2(QsciScintilla* self, int sym, int markerNumber) { + return self->markerDefine(static_cast(sym), static_cast(markerNumber)); } -bool QsciScintilla_OverwriteMode(const QsciScintilla* self) { - return self->overwriteMode(); +int QsciScintilla_MarkerDefine22(QsciScintilla* self, char ch, int markerNumber) { + return self->markerDefine(static_cast(ch), static_cast(markerNumber)); } -QColor* QsciScintilla_Paper(const QsciScintilla* self) { - return new QColor(self->paper()); +int QsciScintilla_MarkerDefine23(QsciScintilla* self, QPixmap* pm, int markerNumber) { + return self->markerDefine(*pm, static_cast(markerNumber)); } -int QsciScintilla_PositionFromLineIndex(const QsciScintilla* self, int line, int index) { - return self->positionFromLineIndex(static_cast(line), static_cast(index)); +int QsciScintilla_MarkerDefine24(QsciScintilla* self, QImage* im, int markerNumber) { + return self->markerDefine(*im, static_cast(markerNumber)); } -bool QsciScintilla_Read(QsciScintilla* self, QIODevice* io) { - return self->read(io); +void QsciScintilla_MarkerDelete2(QsciScintilla* self, int linenr, int markerNumber) { + self->markerDelete(static_cast(linenr), static_cast(markerNumber)); } -void QsciScintilla_Recolor(QsciScintilla* self) { - self->recolor(); +void QsciScintilla_MarkerDeleteAll1(QsciScintilla* self, int markerNumber) { + self->markerDeleteAll(static_cast(markerNumber)); } -void QsciScintilla_RegisterImage(QsciScintilla* self, int id, QPixmap* pm) { - self->registerImage(static_cast(id), *pm); +void QsciScintilla_SetIndicatorDrawUnder2(QsciScintilla* self, bool under, int indicatorNumber) { + self->setIndicatorDrawUnder(under, static_cast(indicatorNumber)); } -void QsciScintilla_RegisterImage2(QsciScintilla* self, int id, QImage* im) { - self->registerImage(static_cast(id), *im); +void QsciScintilla_SetIndicatorForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { + self->setIndicatorForegroundColor(*col, static_cast(indicatorNumber)); } -void QsciScintilla_Replace(QsciScintilla* self, struct miqt_string replaceStr) { - QString replaceStr_QString = QString::fromUtf8(replaceStr.data, replaceStr.len); - self->replace(replaceStr_QString); +void QsciScintilla_SetIndicatorHoverForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { + self->setIndicatorHoverForegroundColor(*col, static_cast(indicatorNumber)); } -void QsciScintilla_ResetFoldMarginColors(QsciScintilla* self) { - self->resetFoldMarginColors(); +void QsciScintilla_SetIndicatorHoverStyle2(QsciScintilla* self, int style, int indicatorNumber) { + self->setIndicatorHoverStyle(static_cast(style), static_cast(indicatorNumber)); } -void QsciScintilla_ResetHotspotBackgroundColor(QsciScintilla* self) { - self->resetHotspotBackgroundColor(); +void QsciScintilla_SetIndicatorOutlineColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { + self->setIndicatorOutlineColor(*col, static_cast(indicatorNumber)); } -void QsciScintilla_ResetHotspotForegroundColor(QsciScintilla* self) { - self->resetHotspotForegroundColor(); +void QsciScintilla_ClearMarginText1(QsciScintilla* self, int line) { + self->clearMarginText(static_cast(line)); } -int QsciScintilla_ScrollWidth(const QsciScintilla* self) { - return self->scrollWidth(); +void QsciScintilla_SetMarkerBackgroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { + self->setMarkerBackgroundColor(*col, static_cast(markerNumber)); } -bool QsciScintilla_ScrollWidthTracking(const QsciScintilla* self) { - return self->scrollWidthTracking(); +void QsciScintilla_SetMarkerForegroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { + self->setMarkerForegroundColor(*col, static_cast(markerNumber)); } -void QsciScintilla_SetFoldMarginColors(QsciScintilla* self, QColor* fore, QColor* back) { - self->setFoldMarginColors(*fore, *back); +void QsciScintilla_SetWrapVisualFlags2(QsciScintilla* self, int endFlag, int startFlag) { + self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag)); } -void QsciScintilla_SetAnnotationDisplay(QsciScintilla* self, int display) { - self->setAnnotationDisplay(static_cast(display)); +void QsciScintilla_SetWrapVisualFlags3(QsciScintilla* self, int endFlag, int startFlag, int indent) { + self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag), static_cast(indent)); } -void QsciScintilla_SetAutoCompletionFillupsEnabled(QsciScintilla* self, bool enabled) { - self->setAutoCompletionFillupsEnabled(enabled); +void QsciScintilla_override_virtual_ApiContext(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ApiContext = slot; } -void QsciScintilla_SetAutoCompletionFillups(QsciScintilla* self, const char* fillups) { - self->setAutoCompletionFillups(fillups); +struct miqt_array /* of struct miqt_string */ QsciScintilla_virtualbase_ApiContext(void* self, int pos, int* context_start, int* last_word_start) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ApiContext(pos, context_start, last_word_start); } -void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array /* of struct miqt_string */ separators) { - QStringList separators_QList; - separators_QList.reserve(separators.len); - struct miqt_string* separators_arr = static_cast(separators.data); - for(size_t i = 0; i < separators.len; ++i) { - QString separators_arr_i_QString = QString::fromUtf8(separators_arr[i].data, separators_arr[i].len); - separators_QList.push_back(separators_arr_i_QString); - } - self->setAutoCompletionWordSeparators(separators_QList); +void QsciScintilla_override_virtual_FindFirst(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FindFirst = slot; } -void QsciScintilla_SetCallTipsBackgroundColor(QsciScintilla* self, QColor* col) { - self->setCallTipsBackgroundColor(*col); +bool QsciScintilla_virtualbase_FindFirst(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FindFirst(expr, re, cs, wo, wrap, forward, line, index, show, posix, cxx11); } -void QsciScintilla_SetCallTipsForegroundColor(QsciScintilla* self, QColor* col) { - self->setCallTipsForegroundColor(*col); +void QsciScintilla_override_virtual_FindFirstInSelection(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FindFirstInSelection = slot; } -void QsciScintilla_SetCallTipsHighlightColor(QsciScintilla* self, QColor* col) { - self->setCallTipsHighlightColor(*col); +bool QsciScintilla_virtualbase_FindFirstInSelection(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FindFirstInSelection(expr, re, cs, wo, forward, show, posix, cxx11); } -void QsciScintilla_SetCallTipsPosition(QsciScintilla* self, int position) { - self->setCallTipsPosition(static_cast(position)); +void QsciScintilla_override_virtual_FindNext(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FindNext = slot; } -void QsciScintilla_SetCallTipsStyle(QsciScintilla* self, int style) { - self->setCallTipsStyle(static_cast(style)); +bool QsciScintilla_virtualbase_FindNext(void* self) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FindNext(); } -void QsciScintilla_SetCallTipsVisible(QsciScintilla* self, int nr) { - self->setCallTipsVisible(static_cast(nr)); +void QsciScintilla_override_virtual_Recolor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Recolor = slot; } -void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array /* of int */ folds) { - QList folds_QList; - folds_QList.reserve(folds.len); - int* folds_arr = static_cast(folds.data); - for(size_t i = 0; i < folds.len; ++i) { - folds_QList.push_back(static_cast(folds_arr[i])); - } - self->setContractedFolds(folds_QList); +void QsciScintilla_virtualbase_Recolor(void* self, int start, int end) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Recolor(start, end); } -void QsciScintilla_SetDocument(QsciScintilla* self, QsciDocument* document) { - self->setDocument(*document); +void QsciScintilla_override_virtual_Replace(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Replace = slot; } -void QsciScintilla_AddEdgeColumn(QsciScintilla* self, int colnr, QColor* col) { - self->addEdgeColumn(static_cast(colnr), *col); +void QsciScintilla_virtualbase_Replace(void* self, struct miqt_string replaceStr) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Replace(replaceStr); } - -void QsciScintilla_ClearEdgeColumns(QsciScintilla* self) { - self->clearEdgeColumns(); + +void QsciScintilla_override_virtual_Append(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Append = slot; } -void QsciScintilla_SetEdgeColor(QsciScintilla* self, QColor* col) { - self->setEdgeColor(*col); +void QsciScintilla_virtualbase_Append(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Append(text); } -void QsciScintilla_SetEdgeColumn(QsciScintilla* self, int colnr) { - self->setEdgeColumn(static_cast(colnr)); +void QsciScintilla_override_virtual_AutoCompleteFromAll(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__AutoCompleteFromAll = slot; } -void QsciScintilla_SetEdgeMode(QsciScintilla* self, int mode) { - self->setEdgeMode(static_cast(mode)); +void QsciScintilla_virtualbase_AutoCompleteFromAll(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_AutoCompleteFromAll(); } -void QsciScintilla_SetFirstVisibleLine(QsciScintilla* self, int linenr) { - self->setFirstVisibleLine(static_cast(linenr)); +void QsciScintilla_override_virtual_AutoCompleteFromAPIs(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__AutoCompleteFromAPIs = slot; } -void QsciScintilla_SetIndicatorDrawUnder(QsciScintilla* self, bool under) { - self->setIndicatorDrawUnder(under); +void QsciScintilla_virtualbase_AutoCompleteFromAPIs(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_AutoCompleteFromAPIs(); } -void QsciScintilla_SetIndicatorForegroundColor(QsciScintilla* self, QColor* col) { - self->setIndicatorForegroundColor(*col); +void QsciScintilla_override_virtual_AutoCompleteFromDocument(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__AutoCompleteFromDocument = slot; } -void QsciScintilla_SetIndicatorHoverForegroundColor(QsciScintilla* self, QColor* col) { - self->setIndicatorHoverForegroundColor(*col); +void QsciScintilla_virtualbase_AutoCompleteFromDocument(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_AutoCompleteFromDocument(); } -void QsciScintilla_SetIndicatorHoverStyle(QsciScintilla* self, int style) { - self->setIndicatorHoverStyle(static_cast(style)); +void QsciScintilla_override_virtual_CallTip(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__CallTip = slot; } -void QsciScintilla_SetIndicatorOutlineColor(QsciScintilla* self, QColor* col) { - self->setIndicatorOutlineColor(*col); +void QsciScintilla_virtualbase_CallTip(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_CallTip(); } -void QsciScintilla_SetMarginBackgroundColor(QsciScintilla* self, int margin, QColor* col) { - self->setMarginBackgroundColor(static_cast(margin), *col); +void QsciScintilla_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Clear = slot; } -void QsciScintilla_SetMarginOptions(QsciScintilla* self, int options) { - self->setMarginOptions(static_cast(options)); +void QsciScintilla_virtualbase_Clear(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Clear(); } -void QsciScintilla_SetMarginText(QsciScintilla* self, int line, struct miqt_string text, int style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setMarginText(static_cast(line), text_QString, static_cast(style)); +void QsciScintilla_override_virtual_Copy(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Copy = slot; } -void QsciScintilla_SetMarginText2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setMarginText(static_cast(line), text_QString, *style); +void QsciScintilla_virtualbase_Copy(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Copy(); } -void QsciScintilla_SetMarginText3(QsciScintilla* self, int line, QsciStyledText* text) { - self->setMarginText(static_cast(line), *text); +void QsciScintilla_override_virtual_Cut(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Cut = slot; } -void QsciScintilla_SetMarginType(QsciScintilla* self, int margin, int typeVal) { - self->setMarginType(static_cast(margin), static_cast(typeVal)); +void QsciScintilla_virtualbase_Cut(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Cut(); } -void QsciScintilla_ClearMarginText(QsciScintilla* self) { - self->clearMarginText(); +void QsciScintilla_override_virtual_EnsureCursorVisible(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__EnsureCursorVisible = slot; } -void QsciScintilla_SetMargins(QsciScintilla* self, int margins) { - self->setMargins(static_cast(margins)); +void QsciScintilla_virtualbase_EnsureCursorVisible(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_EnsureCursorVisible(); } -void QsciScintilla_SetMarkerBackgroundColor(QsciScintilla* self, QColor* col) { - self->setMarkerBackgroundColor(*col); +void QsciScintilla_override_virtual_EnsureLineVisible(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__EnsureLineVisible = slot; } -void QsciScintilla_SetMarkerForegroundColor(QsciScintilla* self, QColor* col) { - self->setMarkerForegroundColor(*col); +void QsciScintilla_virtualbase_EnsureLineVisible(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_EnsureLineVisible(line); } -void QsciScintilla_SetMatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { - self->setMatchedBraceBackgroundColor(*col); +void QsciScintilla_override_virtual_FoldAll(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FoldAll = slot; } -void QsciScintilla_SetMatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { - self->setMatchedBraceForegroundColor(*col); +void QsciScintilla_virtualbase_FoldAll(void* self, bool children) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FoldAll(children); } -void QsciScintilla_SetMatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { - self->setMatchedBraceIndicator(static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_FoldLine(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FoldLine = slot; } -void QsciScintilla_ResetMatchedBraceIndicator(QsciScintilla* self) { - self->resetMatchedBraceIndicator(); +void QsciScintilla_virtualbase_FoldLine(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FoldLine(line); } -void QsciScintilla_SetScrollWidth(QsciScintilla* self, int pixelWidth) { - self->setScrollWidth(static_cast(pixelWidth)); +void QsciScintilla_override_virtual_Indent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Indent = slot; } -void QsciScintilla_SetScrollWidthTracking(QsciScintilla* self, bool enabled) { - self->setScrollWidthTracking(enabled); +void QsciScintilla_virtualbase_Indent(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Indent(line); } -void QsciScintilla_SetTabDrawMode(QsciScintilla* self, int mode) { - self->setTabDrawMode(static_cast(mode)); +void QsciScintilla_override_virtual_Insert(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Insert = slot; } -void QsciScintilla_SetUnmatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { - self->setUnmatchedBraceBackgroundColor(*col); +void QsciScintilla_virtualbase_Insert(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Insert(text); } -void QsciScintilla_SetUnmatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { - self->setUnmatchedBraceForegroundColor(*col); +void QsciScintilla_override_virtual_InsertAt(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__InsertAt = slot; } -void QsciScintilla_SetUnmatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { - self->setUnmatchedBraceIndicator(static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_InsertAt(void* self, struct miqt_string text, int line, int index) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_InsertAt(text, line, index); } -void QsciScintilla_ResetUnmatchedBraceIndicator(QsciScintilla* self) { - self->resetUnmatchedBraceIndicator(); +void QsciScintilla_override_virtual_MoveToMatchingBrace(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MoveToMatchingBrace = slot; } -void QsciScintilla_SetWrapVisualFlags(QsciScintilla* self, int endFlag) { - self->setWrapVisualFlags(static_cast(endFlag)); +void QsciScintilla_virtualbase_MoveToMatchingBrace(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MoveToMatchingBrace(); } -struct miqt_string QsciScintilla_SelectedText(const QsciScintilla* self) { - QString _ret = self->selectedText(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_Paste(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Paste = slot; } -bool QsciScintilla_SelectionToEol(const QsciScintilla* self) { - return self->selectionToEol(); +void QsciScintilla_virtualbase_Paste(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Paste(); } -void QsciScintilla_SetHotspotBackgroundColor(QsciScintilla* self, QColor* col) { - self->setHotspotBackgroundColor(*col); +void QsciScintilla_override_virtual_Redo(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Redo = slot; } -void QsciScintilla_SetHotspotForegroundColor(QsciScintilla* self, QColor* col) { - self->setHotspotForegroundColor(*col); +void QsciScintilla_virtualbase_Redo(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Redo(); } -void QsciScintilla_SetHotspotUnderline(QsciScintilla* self, bool enable) { - self->setHotspotUnderline(enable); +void QsciScintilla_override_virtual_RemoveSelectedText(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__RemoveSelectedText = slot; } -void QsciScintilla_SetHotspotWrap(QsciScintilla* self, bool enable) { - self->setHotspotWrap(enable); +void QsciScintilla_virtualbase_RemoveSelectedText(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_RemoveSelectedText(); } -void QsciScintilla_SetSelectionToEol(QsciScintilla* self, bool filled) { - self->setSelectionToEol(filled); +void QsciScintilla_override_virtual_ReplaceSelectedText(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ReplaceSelectedText = slot; } -void QsciScintilla_SetExtraAscent(QsciScintilla* self, int extra) { - self->setExtraAscent(static_cast(extra)); +void QsciScintilla_virtualbase_ReplaceSelectedText(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ReplaceSelectedText(text); } -void QsciScintilla_SetExtraDescent(QsciScintilla* self, int extra) { - self->setExtraDescent(static_cast(extra)); +void QsciScintilla_override_virtual_ResetSelectionBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ResetSelectionBackgroundColor = slot; } -void QsciScintilla_SetOverwriteMode(QsciScintilla* self, bool overwrite) { - self->setOverwriteMode(overwrite); +void QsciScintilla_virtualbase_ResetSelectionBackgroundColor(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ResetSelectionBackgroundColor(); } -void QsciScintilla_SetWhitespaceBackgroundColor(QsciScintilla* self, QColor* col) { - self->setWhitespaceBackgroundColor(*col); +void QsciScintilla_override_virtual_ResetSelectionForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ResetSelectionForegroundColor = slot; } -void QsciScintilla_SetWhitespaceForegroundColor(QsciScintilla* self, QColor* col) { - self->setWhitespaceForegroundColor(*col); +void QsciScintilla_virtualbase_ResetSelectionForegroundColor(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ResetSelectionForegroundColor(); } -void QsciScintilla_SetWhitespaceSize(QsciScintilla* self, int size) { - self->setWhitespaceSize(static_cast(size)); +void QsciScintilla_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SelectAll = slot; } -void QsciScintilla_SetWrapIndentMode(QsciScintilla* self, int mode) { - self->setWrapIndentMode(static_cast(mode)); +void QsciScintilla_virtualbase_SelectAll(void* self, bool selectVal) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SelectAll(selectVal); } -void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array /* of struct miqt_string */ list) { - QStringList list_QList; - list_QList.reserve(list.len); - struct miqt_string* list_arr = static_cast(list.data); - for(size_t i = 0; i < list.len; ++i) { - QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len); - list_QList.push_back(list_arr_i_QString); - } - self->showUserList(static_cast(id), list_QList); +void QsciScintilla_override_virtual_SelectToMatchingBrace(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SelectToMatchingBrace = slot; } -QsciCommandSet* QsciScintilla_StandardCommands(const QsciScintilla* self) { - return self->standardCommands(); +void QsciScintilla_virtualbase_SelectToMatchingBrace(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SelectToMatchingBrace(); } -int QsciScintilla_TabDrawMode(const QsciScintilla* self) { - QsciScintilla::TabDrawMode _ret = self->tabDrawMode(); - return static_cast(_ret); +void QsciScintilla_override_virtual_SetAutoCompletionCaseSensitivity(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionCaseSensitivity = slot; } -bool QsciScintilla_TabIndents(const QsciScintilla* self) { - return self->tabIndents(); +void QsciScintilla_virtualbase_SetAutoCompletionCaseSensitivity(void* self, bool cs) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionCaseSensitivity(cs); } -int QsciScintilla_TabWidth(const QsciScintilla* self) { - return self->tabWidth(); +void QsciScintilla_override_virtual_SetAutoCompletionReplaceWord(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionReplaceWord = slot; } -struct miqt_string QsciScintilla_Text(const QsciScintilla* self) { - QString _ret = self->text(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_virtualbase_SetAutoCompletionReplaceWord(void* self, bool replace) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionReplaceWord(replace); } -struct miqt_string QsciScintilla_TextWithLine(const QsciScintilla* self, int line) { - QString _ret = self->text(static_cast(line)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_SetAutoCompletionShowSingle(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionShowSingle = slot; } -struct miqt_string QsciScintilla_Text2(const QsciScintilla* self, int start, int end) { - QString _ret = self->text(static_cast(start), static_cast(end)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_virtualbase_SetAutoCompletionShowSingle(void* self, bool single) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionShowSingle(single); } -int QsciScintilla_TextHeight(const QsciScintilla* self, int linenr) { - return self->textHeight(static_cast(linenr)); +void QsciScintilla_override_virtual_SetAutoCompletionSource(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionSource = slot; } -int QsciScintilla_WhitespaceSize(const QsciScintilla* self) { - return self->whitespaceSize(); +void QsciScintilla_virtualbase_SetAutoCompletionSource(void* self, int source) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionSource(source); } -int QsciScintilla_WhitespaceVisibility(const QsciScintilla* self) { - QsciScintilla::WhitespaceVisibility _ret = self->whitespaceVisibility(); - return static_cast(_ret); +void QsciScintilla_override_virtual_SetAutoCompletionThreshold(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionThreshold = slot; } -struct miqt_string QsciScintilla_WordAtLineIndex(const QsciScintilla* self, int line, int index) { - QString _ret = self->wordAtLineIndex(static_cast(line), static_cast(index)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_virtualbase_SetAutoCompletionThreshold(void* self, int thresh) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionThreshold(thresh); } -struct miqt_string QsciScintilla_WordAtPoint(const QsciScintilla* self, QPoint* point) { - QString _ret = self->wordAtPoint(*point); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_SetAutoCompletionUseSingle(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionUseSingle = slot; } -const char* QsciScintilla_WordCharacters(const QsciScintilla* self) { - return (const char*) self->wordCharacters(); +void QsciScintilla_virtualbase_SetAutoCompletionUseSingle(void* self, int single) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionUseSingle(single); } -int QsciScintilla_WrapMode(const QsciScintilla* self) { - QsciScintilla::WrapMode _ret = self->wrapMode(); - return static_cast(_ret); +void QsciScintilla_override_virtual_SetAutoIndent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoIndent = slot; } -int QsciScintilla_WrapIndentMode(const QsciScintilla* self) { - QsciScintilla::WrapIndentMode _ret = self->wrapIndentMode(); - return static_cast(_ret); +void QsciScintilla_virtualbase_SetAutoIndent(void* self, bool autoindent) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoIndent(autoindent); } -bool QsciScintilla_Write(const QsciScintilla* self, QIODevice* io) { - return self->write(io); +void QsciScintilla_override_virtual_SetBraceMatching(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetBraceMatching = slot; } -void QsciScintilla_Append(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->append(text_QString); +void QsciScintilla_virtualbase_SetBraceMatching(void* self, int bm) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetBraceMatching(bm); } -void QsciScintilla_AutoCompleteFromAll(QsciScintilla* self) { - self->autoCompleteFromAll(); +void QsciScintilla_override_virtual_SetBackspaceUnindents(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetBackspaceUnindents = slot; } -void QsciScintilla_AutoCompleteFromAPIs(QsciScintilla* self) { - self->autoCompleteFromAPIs(); +void QsciScintilla_virtualbase_SetBackspaceUnindents(void* self, bool unindent) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetBackspaceUnindents(unindent); } -void QsciScintilla_AutoCompleteFromDocument(QsciScintilla* self) { - self->autoCompleteFromDocument(); +void QsciScintilla_override_virtual_SetCaretForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretForegroundColor = slot; } -void QsciScintilla_CallTip(QsciScintilla* self) { - self->callTip(); +void QsciScintilla_virtualbase_SetCaretForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretForegroundColor(col); } -void QsciScintilla_Clear(QsciScintilla* self) { - self->clear(); +void QsciScintilla_override_virtual_SetCaretLineBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretLineBackgroundColor = slot; } -void QsciScintilla_Copy(QsciScintilla* self) { - self->copy(); +void QsciScintilla_virtualbase_SetCaretLineBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretLineBackgroundColor(col); } -void QsciScintilla_Cut(QsciScintilla* self) { - self->cut(); +void QsciScintilla_override_virtual_SetCaretLineFrameWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretLineFrameWidth = slot; } -void QsciScintilla_EnsureCursorVisible(QsciScintilla* self) { - self->ensureCursorVisible(); +void QsciScintilla_virtualbase_SetCaretLineFrameWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretLineFrameWidth(width); } -void QsciScintilla_EnsureLineVisible(QsciScintilla* self, int line) { - self->ensureLineVisible(static_cast(line)); +void QsciScintilla_override_virtual_SetCaretLineVisible(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretLineVisible = slot; } -void QsciScintilla_FoldAll(QsciScintilla* self) { - self->foldAll(); +void QsciScintilla_virtualbase_SetCaretLineVisible(void* self, bool enable) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretLineVisible(enable); } -void QsciScintilla_FoldLine(QsciScintilla* self, int line) { - self->foldLine(static_cast(line)); +void QsciScintilla_override_virtual_SetCaretWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretWidth = slot; } -void QsciScintilla_Indent(QsciScintilla* self, int line) { - self->indent(static_cast(line)); +void QsciScintilla_virtualbase_SetCaretWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretWidth(width); } -void QsciScintilla_Insert(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->insert(text_QString); +void QsciScintilla_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetColor = slot; } -void QsciScintilla_InsertAt(QsciScintilla* self, struct miqt_string text, int line, int index) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->insertAt(text_QString, static_cast(line), static_cast(index)); +void QsciScintilla_virtualbase_SetColor(void* self, QColor* c) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetColor(c); } -void QsciScintilla_MoveToMatchingBrace(QsciScintilla* self) { - self->moveToMatchingBrace(); +void QsciScintilla_override_virtual_SetCursorPosition(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCursorPosition = slot; } -void QsciScintilla_Paste(QsciScintilla* self) { - self->paste(); +void QsciScintilla_virtualbase_SetCursorPosition(void* self, int line, int index) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCursorPosition(line, index); } -void QsciScintilla_Redo(QsciScintilla* self) { - self->redo(); +void QsciScintilla_override_virtual_SetEolMode(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetEolMode = slot; } -void QsciScintilla_RemoveSelectedText(QsciScintilla* self) { - self->removeSelectedText(); +void QsciScintilla_virtualbase_SetEolMode(void* self, int mode) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetEolMode(mode); } -void QsciScintilla_ReplaceSelectedText(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->replaceSelectedText(text_QString); +void QsciScintilla_override_virtual_SetEolVisibility(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetEolVisibility = slot; } -void QsciScintilla_ResetSelectionBackgroundColor(QsciScintilla* self) { - self->resetSelectionBackgroundColor(); +void QsciScintilla_virtualbase_SetEolVisibility(void* self, bool visible) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetEolVisibility(visible); } -void QsciScintilla_ResetSelectionForegroundColor(QsciScintilla* self) { - self->resetSelectionForegroundColor(); +void QsciScintilla_override_virtual_SetFolding(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetFolding = slot; } -void QsciScintilla_SelectAll(QsciScintilla* self) { - self->selectAll(); +void QsciScintilla_virtualbase_SetFolding(void* self, int fold, int margin) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetFolding(fold, margin); } -void QsciScintilla_SelectToMatchingBrace(QsciScintilla* self) { - self->selectToMatchingBrace(); +void QsciScintilla_override_virtual_SetIndentation(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentation = slot; } -void QsciScintilla_SetAutoCompletionCaseSensitivity(QsciScintilla* self, bool cs) { - self->setAutoCompletionCaseSensitivity(cs); +void QsciScintilla_virtualbase_SetIndentation(void* self, int line, int indentation) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentation(line, indentation); } -void QsciScintilla_SetAutoCompletionReplaceWord(QsciScintilla* self, bool replace) { - self->setAutoCompletionReplaceWord(replace); +void QsciScintilla_override_virtual_SetIndentationGuides(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationGuides = slot; } -void QsciScintilla_SetAutoCompletionShowSingle(QsciScintilla* self, bool single) { - self->setAutoCompletionShowSingle(single); +void QsciScintilla_virtualbase_SetIndentationGuides(void* self, bool enable) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationGuides(enable); } -void QsciScintilla_SetAutoCompletionSource(QsciScintilla* self, int source) { - self->setAutoCompletionSource(static_cast(source)); +void QsciScintilla_override_virtual_SetIndentationGuidesBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationGuidesBackgroundColor = slot; } -void QsciScintilla_SetAutoCompletionThreshold(QsciScintilla* self, int thresh) { - self->setAutoCompletionThreshold(static_cast(thresh)); +void QsciScintilla_virtualbase_SetIndentationGuidesBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationGuidesBackgroundColor(col); } -void QsciScintilla_SetAutoCompletionUseSingle(QsciScintilla* self, int single) { - self->setAutoCompletionUseSingle(static_cast(single)); +void QsciScintilla_override_virtual_SetIndentationGuidesForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationGuidesForegroundColor = slot; } -void QsciScintilla_SetAutoIndent(QsciScintilla* self, bool autoindent) { - self->setAutoIndent(autoindent); +void QsciScintilla_virtualbase_SetIndentationGuidesForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationGuidesForegroundColor(col); } -void QsciScintilla_SetBraceMatching(QsciScintilla* self, int bm) { - self->setBraceMatching(static_cast(bm)); +void QsciScintilla_override_virtual_SetIndentationsUseTabs(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationsUseTabs = slot; } -void QsciScintilla_SetBackspaceUnindents(QsciScintilla* self, bool unindent) { - self->setBackspaceUnindents(unindent); +void QsciScintilla_virtualbase_SetIndentationsUseTabs(void* self, bool tabs) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationsUseTabs(tabs); } -void QsciScintilla_SetCaretForegroundColor(QsciScintilla* self, QColor* col) { - self->setCaretForegroundColor(*col); +void QsciScintilla_override_virtual_SetIndentationWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationWidth = slot; } -void QsciScintilla_SetCaretLineBackgroundColor(QsciScintilla* self, QColor* col) { - self->setCaretLineBackgroundColor(*col); +void QsciScintilla_virtualbase_SetIndentationWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationWidth(width); } -void QsciScintilla_SetCaretLineFrameWidth(QsciScintilla* self, int width) { - self->setCaretLineFrameWidth(static_cast(width)); +void QsciScintilla_override_virtual_SetLexer(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetLexer = slot; } -void QsciScintilla_SetCaretLineVisible(QsciScintilla* self, bool enable) { - self->setCaretLineVisible(enable); +void QsciScintilla_virtualbase_SetLexer(void* self, QsciLexer* lexer) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetLexer(lexer); } -void QsciScintilla_SetCaretWidth(QsciScintilla* self, int width) { - self->setCaretWidth(static_cast(width)); +void QsciScintilla_override_virtual_SetMarginsBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginsBackgroundColor = slot; } -void QsciScintilla_SetColor(QsciScintilla* self, QColor* c) { - self->setColor(*c); +void QsciScintilla_virtualbase_SetMarginsBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginsBackgroundColor(col); } -void QsciScintilla_SetCursorPosition(QsciScintilla* self, int line, int index) { - self->setCursorPosition(static_cast(line), static_cast(index)); +void QsciScintilla_override_virtual_SetMarginsFont(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginsFont = slot; } -void QsciScintilla_SetEolMode(QsciScintilla* self, int mode) { - self->setEolMode(static_cast(mode)); +void QsciScintilla_virtualbase_SetMarginsFont(void* self, QFont* f) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginsFont(f); } -void QsciScintilla_SetEolVisibility(QsciScintilla* self, bool visible) { - self->setEolVisibility(visible); +void QsciScintilla_override_virtual_SetMarginsForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginsForegroundColor = slot; } -void QsciScintilla_SetFolding(QsciScintilla* self, int fold) { - self->setFolding(static_cast(fold)); +void QsciScintilla_virtualbase_SetMarginsForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginsForegroundColor(col); } -void QsciScintilla_SetIndentation(QsciScintilla* self, int line, int indentation) { - self->setIndentation(static_cast(line), static_cast(indentation)); +void QsciScintilla_override_virtual_SetMarginLineNumbers(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginLineNumbers = slot; } -void QsciScintilla_SetIndentationGuides(QsciScintilla* self, bool enable) { - self->setIndentationGuides(enable); +void QsciScintilla_virtualbase_SetMarginLineNumbers(void* self, int margin, bool lnrs) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginLineNumbers(margin, lnrs); } -void QsciScintilla_SetIndentationGuidesBackgroundColor(QsciScintilla* self, QColor* col) { - self->setIndentationGuidesBackgroundColor(*col); +void QsciScintilla_override_virtual_SetMarginMarkerMask(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginMarkerMask = slot; } -void QsciScintilla_SetIndentationGuidesForegroundColor(QsciScintilla* self, QColor* col) { - self->setIndentationGuidesForegroundColor(*col); +void QsciScintilla_virtualbase_SetMarginMarkerMask(void* self, int margin, int mask) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginMarkerMask(margin, mask); } -void QsciScintilla_SetIndentationsUseTabs(QsciScintilla* self, bool tabs) { - self->setIndentationsUseTabs(tabs); +void QsciScintilla_override_virtual_SetMarginSensitivity(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginSensitivity = slot; } -void QsciScintilla_SetIndentationWidth(QsciScintilla* self, int width) { - self->setIndentationWidth(static_cast(width)); +void QsciScintilla_virtualbase_SetMarginSensitivity(void* self, int margin, bool sens) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginSensitivity(margin, sens); } -void QsciScintilla_SetLexer(QsciScintilla* self) { - self->setLexer(); +void QsciScintilla_override_virtual_SetMarginWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginWidth = slot; } -void QsciScintilla_SetMarginsBackgroundColor(QsciScintilla* self, QColor* col) { - self->setMarginsBackgroundColor(*col); +void QsciScintilla_virtualbase_SetMarginWidth(void* self, int margin, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginWidth(margin, width); } -void QsciScintilla_SetMarginsFont(QsciScintilla* self, QFont* f) { - self->setMarginsFont(*f); +void QsciScintilla_override_virtual_SetMarginWidth2(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginWidth2 = slot; } -void QsciScintilla_SetMarginsForegroundColor(QsciScintilla* self, QColor* col) { - self->setMarginsForegroundColor(*col); +void QsciScintilla_virtualbase_SetMarginWidth2(void* self, int margin, struct miqt_string s) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginWidth2(margin, s); } -void QsciScintilla_SetMarginLineNumbers(QsciScintilla* self, int margin, bool lnrs) { - self->setMarginLineNumbers(static_cast(margin), lnrs); +void QsciScintilla_override_virtual_SetModified(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetModified = slot; } -void QsciScintilla_SetMarginMarkerMask(QsciScintilla* self, int margin, int mask) { - self->setMarginMarkerMask(static_cast(margin), static_cast(mask)); +void QsciScintilla_virtualbase_SetModified(void* self, bool m) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetModified(m); } -void QsciScintilla_SetMarginSensitivity(QsciScintilla* self, int margin, bool sens) { - self->setMarginSensitivity(static_cast(margin), sens); +void QsciScintilla_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetPaper = slot; } -void QsciScintilla_SetMarginWidth(QsciScintilla* self, int margin, int width) { - self->setMarginWidth(static_cast(margin), static_cast(width)); +void QsciScintilla_virtualbase_SetPaper(void* self, QColor* c) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetPaper(c); } -void QsciScintilla_SetMarginWidth2(QsciScintilla* self, int margin, struct miqt_string s) { - QString s_QString = QString::fromUtf8(s.data, s.len); - self->setMarginWidth(static_cast(margin), s_QString); +void QsciScintilla_override_virtual_SetReadOnly(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetReadOnly = slot; } -void QsciScintilla_SetModified(QsciScintilla* self, bool m) { - self->setModified(m); +void QsciScintilla_virtualbase_SetReadOnly(void* self, bool ro) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetReadOnly(ro); } -void QsciScintilla_SetPaper(QsciScintilla* self, QColor* c) { - self->setPaper(*c); +void QsciScintilla_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetSelection = slot; } -void QsciScintilla_SetReadOnly(QsciScintilla* self, bool ro) { - self->setReadOnly(ro); +void QsciScintilla_virtualbase_SetSelection(void* self, int lineFrom, int indexFrom, int lineTo, int indexTo) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetSelection(lineFrom, indexFrom, lineTo, indexTo); } -void QsciScintilla_SetSelection(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo) { - self->setSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); +void QsciScintilla_override_virtual_SetSelectionBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetSelectionBackgroundColor = slot; } -void QsciScintilla_SetSelectionBackgroundColor(QsciScintilla* self, QColor* col) { - self->setSelectionBackgroundColor(*col); +void QsciScintilla_virtualbase_SetSelectionBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetSelectionBackgroundColor(col); } -void QsciScintilla_SetSelectionForegroundColor(QsciScintilla* self, QColor* col) { - self->setSelectionForegroundColor(*col); +void QsciScintilla_override_virtual_SetSelectionForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetSelectionForegroundColor = slot; } -void QsciScintilla_SetTabIndents(QsciScintilla* self, bool indent) { - self->setTabIndents(indent); +void QsciScintilla_virtualbase_SetSelectionForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetSelectionForegroundColor(col); } -void QsciScintilla_SetTabWidth(QsciScintilla* self, int width) { - self->setTabWidth(static_cast(width)); +void QsciScintilla_override_virtual_SetTabIndents(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetTabIndents = slot; } -void QsciScintilla_SetText(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setText(text_QString); +void QsciScintilla_virtualbase_SetTabIndents(void* self, bool indent) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetTabIndents(indent); } -void QsciScintilla_SetUtf8(QsciScintilla* self, bool cp) { - self->setUtf8(cp); +void QsciScintilla_override_virtual_SetTabWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetTabWidth = slot; } -void QsciScintilla_SetWhitespaceVisibility(QsciScintilla* self, int mode) { - self->setWhitespaceVisibility(static_cast(mode)); +void QsciScintilla_virtualbase_SetTabWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetTabWidth(width); } -void QsciScintilla_SetWrapMode(QsciScintilla* self, int mode) { - self->setWrapMode(static_cast(mode)); +void QsciScintilla_override_virtual_SetText(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetText = slot; } -void QsciScintilla_Undo(QsciScintilla* self) { - self->undo(); +void QsciScintilla_virtualbase_SetText(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetText(text); } -void QsciScintilla_Unindent(QsciScintilla* self, int line) { - self->unindent(static_cast(line)); +void QsciScintilla_override_virtual_SetUtf8(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetUtf8 = slot; } -void QsciScintilla_ZoomIn(QsciScintilla* self, int rangeVal) { - self->zoomIn(static_cast(rangeVal)); +void QsciScintilla_virtualbase_SetUtf8(void* self, bool cp) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetUtf8(cp); } -void QsciScintilla_ZoomIn2(QsciScintilla* self) { - self->zoomIn(); +void QsciScintilla_override_virtual_SetWhitespaceVisibility(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetWhitespaceVisibility = slot; } -void QsciScintilla_ZoomOut(QsciScintilla* self, int rangeVal) { - self->zoomOut(static_cast(rangeVal)); +void QsciScintilla_virtualbase_SetWhitespaceVisibility(void* self, int mode) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetWhitespaceVisibility(mode); } -void QsciScintilla_ZoomOut2(QsciScintilla* self) { - self->zoomOut(); +void QsciScintilla_override_virtual_SetWrapMode(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetWrapMode = slot; } -void QsciScintilla_ZoomTo(QsciScintilla* self, int size) { - self->zoomTo(static_cast(size)); +void QsciScintilla_virtualbase_SetWrapMode(void* self, int mode) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetWrapMode(mode); } -void QsciScintilla_CursorPositionChanged(QsciScintilla* self, int line, int index) { - self->cursorPositionChanged(static_cast(line), static_cast(index)); +void QsciScintilla_override_virtual_Undo(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Undo = slot; } -void QsciScintilla_connect_CursorPositionChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::cursorPositionChanged), self, [=](int line, int index) { - int sigval1 = line; - int sigval2 = index; - miqt_exec_callback_QsciScintilla_CursorPositionChanged(slot, sigval1, sigval2); - }); +void QsciScintilla_virtualbase_Undo(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Undo(); } -void QsciScintilla_CopyAvailable(QsciScintilla* self, bool yes) { - self->copyAvailable(yes); +void QsciScintilla_override_virtual_Unindent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Unindent = slot; } -void QsciScintilla_connect_CopyAvailable(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::copyAvailable), self, [=](bool yes) { - bool sigval1 = yes; - miqt_exec_callback_QsciScintilla_CopyAvailable(slot, sigval1); - }); +void QsciScintilla_virtualbase_Unindent(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Unindent(line); } -void QsciScintilla_IndicatorClicked(QsciScintilla* self, int line, int index, int state) { - self->indicatorClicked(static_cast(line), static_cast(index), static_cast(state)); +void QsciScintilla_override_virtual_ZoomIn(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomIn = slot; } -void QsciScintilla_connect_IndicatorClicked(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorClicked), self, [=](int line, int index, Qt::KeyboardModifiers state) { - int sigval1 = line; - int sigval2 = index; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_IndicatorClicked(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomIn(void* self, int rangeVal) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomIn(rangeVal); } -void QsciScintilla_IndicatorReleased(QsciScintilla* self, int line, int index, int state) { - self->indicatorReleased(static_cast(line), static_cast(index), static_cast(state)); +void QsciScintilla_override_virtual_ZoomIn2(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomIn2 = slot; } -void QsciScintilla_connect_IndicatorReleased(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorReleased), self, [=](int line, int index, Qt::KeyboardModifiers state) { - int sigval1 = line; - int sigval2 = index; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_IndicatorReleased(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomIn2(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomIn2(); } -void QsciScintilla_LinesChanged(QsciScintilla* self) { - self->linesChanged(); +void QsciScintilla_override_virtual_ZoomOut(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomOut = slot; } -void QsciScintilla_connect_LinesChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::linesChanged), self, [=]() { - miqt_exec_callback_QsciScintilla_LinesChanged(slot); - }); +void QsciScintilla_virtualbase_ZoomOut(void* self, int rangeVal) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomOut(rangeVal); } -void QsciScintilla_MarginClicked(QsciScintilla* self, int margin, int line, int state) { - self->marginClicked(static_cast(margin), static_cast(line), static_cast(state)); +void QsciScintilla_override_virtual_ZoomOut2(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomOut2 = slot; } -void QsciScintilla_connect_MarginClicked(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::marginClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { - int sigval1 = margin; - int sigval2 = line; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_MarginClicked(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomOut2(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomOut2(); } -void QsciScintilla_MarginRightClicked(QsciScintilla* self, int margin, int line, int state) { - self->marginRightClicked(static_cast(margin), static_cast(line), static_cast(state)); +void QsciScintilla_override_virtual_ZoomTo(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomTo = slot; } -void QsciScintilla_connect_MarginRightClicked(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::marginRightClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { - int sigval1 = margin; - int sigval2 = line; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_MarginRightClicked(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomTo(void* self, int size) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomTo(size); } -void QsciScintilla_ModificationAttempted(QsciScintilla* self) { - self->modificationAttempted(); +void QsciScintilla_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Event = slot; } -void QsciScintilla_connect_ModificationAttempted(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::modificationAttempted), self, [=]() { - miqt_exec_callback_QsciScintilla_ModificationAttempted(slot); - }); +bool QsciScintilla_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Event(e); } -void QsciScintilla_ModificationChanged(QsciScintilla* self, bool m) { - self->modificationChanged(m); +void QsciScintilla_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ChangeEvent = slot; } -void QsciScintilla_connect_ModificationChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::modificationChanged), self, [=](bool m) { - bool sigval1 = m; - miqt_exec_callback_QsciScintilla_ModificationChanged(slot, sigval1); - }); +void QsciScintilla_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ChangeEvent(e); } -void QsciScintilla_SelectionChanged(QsciScintilla* self) { - self->selectionChanged(); +void QsciScintilla_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ContextMenuEvent = slot; } -void QsciScintilla_connect_SelectionChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::selectionChanged), self, [=]() { - miqt_exec_callback_QsciScintilla_SelectionChanged(slot); - }); +void QsciScintilla_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ContextMenuEvent(e); } -void QsciScintilla_TextChanged(QsciScintilla* self) { - self->textChanged(); +void QsciScintilla_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__WheelEvent = slot; } -void QsciScintilla_connect_TextChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::textChanged), self, [=]() { - miqt_exec_callback_QsciScintilla_TextChanged(slot); - }); +void QsciScintilla_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_WheelEvent(e); } -void QsciScintilla_UserListActivated(QsciScintilla* self, int id, struct miqt_string stringVal) { - QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - self->userListActivated(static_cast(id), stringVal_QString); +void QsciScintilla_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__CanInsertFromMimeData = slot; } -void QsciScintilla_connect_UserListActivated(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::userListActivated), self, [=](int id, const QString& stringVal) { - int sigval1 = id; - const QString stringVal_ret = stringVal; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray stringVal_b = stringVal_ret.toUtf8(); - struct miqt_string stringVal_ms; - stringVal_ms.len = stringVal_b.length(); - stringVal_ms.data = static_cast(malloc(stringVal_ms.len)); - memcpy(stringVal_ms.data, stringVal_b.data(), stringVal_ms.len); - struct miqt_string sigval2 = stringVal_ms; - miqt_exec_callback_QsciScintilla_UserListActivated(slot, sigval1, sigval2); - }); +bool QsciScintilla_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_CanInsertFromMimeData(source); } -struct miqt_string QsciScintilla_Tr2(const char* s, const char* c) { - QString _ret = QsciScintilla::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_FromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FromMimeData = slot; } -struct miqt_string QsciScintilla_Tr3(const char* s, const char* c, int n) { - QString _ret = QsciScintilla::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +struct miqt_string QsciScintilla_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_FromMimeData(source, rectangular); } -struct miqt_string QsciScintilla_TrUtf82(const char* s, const char* c) { - QString _ret = QsciScintilla::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_ToMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ToMimeData = slot; } -struct miqt_string QsciScintilla_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QsciScintilla::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QMimeData* QsciScintilla_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_ToMimeData(text, rectangular); } -void QsciScintilla_ClearAnnotations1(QsciScintilla* self, int line) { - self->clearAnnotations(static_cast(line)); +void QsciScintilla_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DragEnterEvent = slot; } -bool QsciScintilla_FindFirst6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward); +void QsciScintilla_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DragEnterEvent(e); } -bool QsciScintilla_FindFirst7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line)); +void QsciScintilla_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DragLeaveEvent = slot; } -bool QsciScintilla_FindFirst8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index)); +void QsciScintilla_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DragLeaveEvent(e); } -bool QsciScintilla_FindFirst9(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show); +void QsciScintilla_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DragMoveEvent = slot; } -bool QsciScintilla_FindFirst10(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix); +void QsciScintilla_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DragMoveEvent(e); } -bool QsciScintilla_FindFirst11(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix, cxx11); +void QsciScintilla_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DropEvent = slot; } -bool QsciScintilla_FindFirstInSelection5(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward); +void QsciScintilla_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DropEvent(e); } -bool QsciScintilla_FindFirstInSelection6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show); +void QsciScintilla_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FocusInEvent = slot; } -bool QsciScintilla_FindFirstInSelection7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix); +void QsciScintilla_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FocusInEvent(e); } -bool QsciScintilla_FindFirstInSelection8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix, cxx11); +void QsciScintilla_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FocusOutEvent = slot; } -int QsciScintilla_IndicatorDefine2(QsciScintilla* self, int style, int indicatorNumber) { - return self->indicatorDefine(static_cast(style), static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FocusOutEvent(e); } -int QsciScintilla_MarkerDefine2(QsciScintilla* self, int sym, int markerNumber) { - return self->markerDefine(static_cast(sym), static_cast(markerNumber)); +void QsciScintilla_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FocusNextPrevChild = slot; } -int QsciScintilla_MarkerDefine22(QsciScintilla* self, char ch, int markerNumber) { - return self->markerDefine(static_cast(ch), static_cast(markerNumber)); +bool QsciScintilla_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FocusNextPrevChild(next); } -int QsciScintilla_MarkerDefine23(QsciScintilla* self, QPixmap* pm, int markerNumber) { - return self->markerDefine(*pm, static_cast(markerNumber)); +void QsciScintilla_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__KeyPressEvent = slot; } -int QsciScintilla_MarkerDefine24(QsciScintilla* self, QImage* im, int markerNumber) { - return self->markerDefine(*im, static_cast(markerNumber)); +void QsciScintilla_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_KeyPressEvent(e); } -void QsciScintilla_MarkerDelete2(QsciScintilla* self, int linenr, int markerNumber) { - self->markerDelete(static_cast(linenr), static_cast(markerNumber)); +void QsciScintilla_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__InputMethodEvent = slot; } -void QsciScintilla_MarkerDeleteAll1(QsciScintilla* self, int markerNumber) { - self->markerDeleteAll(static_cast(markerNumber)); +void QsciScintilla_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_InputMethodEvent(event); } -void QsciScintilla_Recolor1(QsciScintilla* self, int start) { - self->recolor(static_cast(start)); +void QsciScintilla_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__InputMethodQuery = slot; } -void QsciScintilla_Recolor2(QsciScintilla* self, int start, int end) { - self->recolor(static_cast(start), static_cast(end)); +QVariant* QsciScintilla_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_InputMethodQuery(query); } -void QsciScintilla_SetIndicatorDrawUnder2(QsciScintilla* self, bool under, int indicatorNumber) { - self->setIndicatorDrawUnder(under, static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MouseDoubleClickEvent = slot; } -void QsciScintilla_SetIndicatorForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { - self->setIndicatorForegroundColor(*col, static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MouseDoubleClickEvent(e); } -void QsciScintilla_SetIndicatorHoverForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { - self->setIndicatorHoverForegroundColor(*col, static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MouseMoveEvent = slot; } -void QsciScintilla_SetIndicatorHoverStyle2(QsciScintilla* self, int style, int indicatorNumber) { - self->setIndicatorHoverStyle(static_cast(style), static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MouseMoveEvent(e); } -void QsciScintilla_SetIndicatorOutlineColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { - self->setIndicatorOutlineColor(*col, static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MousePressEvent = slot; } -void QsciScintilla_ClearMarginText1(QsciScintilla* self, int line) { - self->clearMarginText(static_cast(line)); +void QsciScintilla_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MousePressEvent(e); } -void QsciScintilla_SetMarkerBackgroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { - self->setMarkerBackgroundColor(*col, static_cast(markerNumber)); +void QsciScintilla_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MouseReleaseEvent = slot; } -void QsciScintilla_SetMarkerForegroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { - self->setMarkerForegroundColor(*col, static_cast(markerNumber)); +void QsciScintilla_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MouseReleaseEvent(e); } -void QsciScintilla_SetWrapVisualFlags2(QsciScintilla* self, int endFlag, int startFlag) { - self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag)); +void QsciScintilla_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__PaintEvent = slot; } -void QsciScintilla_SetWrapVisualFlags3(QsciScintilla* self, int endFlag, int startFlag, int indent) { - self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag), static_cast(indent)); +void QsciScintilla_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_PaintEvent(e); } -void QsciScintilla_FoldAll1(QsciScintilla* self, bool children) { - self->foldAll(children); +void QsciScintilla_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ResizeEvent = slot; } -void QsciScintilla_SelectAll1(QsciScintilla* self, bool selectVal) { - self->selectAll(selectVal); +void QsciScintilla_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ResizeEvent(e); } -void QsciScintilla_SetFolding2(QsciScintilla* self, int fold, int margin) { - self->setFolding(static_cast(fold), static_cast(margin)); +void QsciScintilla_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ScrollContentsBy = slot; } -void QsciScintilla_SetLexer1(QsciScintilla* self, QsciLexer* lexer) { - self->setLexer(lexer); +void QsciScintilla_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -void QsciScintilla_Delete(QsciScintilla* self) { - delete self; +void QsciScintilla_Delete(QsciScintilla* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.go b/qt-restricted-extras/qscintilla/gen_qsciscintilla.go index 73c9b3c7..fdf8156e 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.go +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.go @@ -220,7 +220,8 @@ const ( ) type QsciScintilla struct { - h *C.QsciScintilla + h *C.QsciScintilla + isSubclass bool *QsciScintillaBase } @@ -238,27 +239,55 @@ func (this *QsciScintilla) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciScintilla(h *C.QsciScintilla) *QsciScintilla { +// newQsciScintilla constructs the type using only CGO pointers. +func newQsciScintilla(h *C.QsciScintilla, h_QsciScintillaBase *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintilla { if h == nil { return nil } - return &QsciScintilla{h: h, QsciScintillaBase: UnsafeNewQsciScintillaBase(unsafe.Pointer(h))} + return &QsciScintilla{h: h, + QsciScintillaBase: newQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQsciScintilla(h unsafe.Pointer) *QsciScintilla { - return newQsciScintilla((*C.QsciScintilla)(h)) +// UnsafeNewQsciScintilla constructs the type using only unsafe pointers. +func UnsafeNewQsciScintilla(h unsafe.Pointer, h_QsciScintillaBase unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintilla { + if h == nil { + return nil + } + + return &QsciScintilla{h: (*C.QsciScintilla)(h), + QsciScintillaBase: UnsafeNewQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQsciScintilla constructs a new QsciScintilla object. func NewQsciScintilla(parent *qt.QWidget) *QsciScintilla { - ret := C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer())) - return newQsciScintilla(ret) + var outptr_QsciScintilla *C.QsciScintilla = nil + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQsciScintilla2 constructs a new QsciScintilla object. func NewQsciScintilla2() *QsciScintilla { - ret := C.QsciScintilla_new2() - return newQsciScintilla(ret) + var outptr_QsciScintilla *C.QsciScintilla = nil + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintilla_new2(&outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QsciScintilla) MetaObject() *qt.QMetaObject { @@ -446,7 +475,7 @@ func (this *QsciScintilla) ConvertEols(mode QsciScintilla__EolMode) { } func (this *QsciScintilla) CreateStandardContextMenu() *qt.QMenu { - return qt.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h))) + return qt.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QsciScintilla) Document() *QsciDocument { @@ -499,20 +528,20 @@ func (this *QsciScintilla) FillIndicatorRange(lineFrom int, indexFrom int, lineT C.QsciScintilla_FillIndicatorRange(this.h, (C.int)(lineFrom), (C.int)(indexFrom), (C.int)(lineTo), (C.int)(indexTo), (C.int)(indicatorNumber)) } -func (this *QsciScintilla) FindFirst(expr string, re bool, cs bool, wo bool, wrap bool) bool { +func (this *QsciScintilla) FindFirst(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool { expr_ms := C.struct_miqt_string{} expr_ms.data = C.CString(expr) expr_ms.len = C.size_t(len(expr)) defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap))) + return (bool)(C.QsciScintilla_FindFirst(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) } -func (this *QsciScintilla) FindFirstInSelection(expr string, re bool, cs bool, wo bool) bool { +func (this *QsciScintilla) FindFirstInSelection(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool { expr_ms := C.struct_miqt_string{} expr_ms.data = C.CString(expr) expr_ms.len = C.size_t(len(expr)) defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo))) + return (bool)(C.QsciScintilla_FindFirstInSelection(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) } func (this *QsciScintilla) FindNext() bool { @@ -620,7 +649,7 @@ func (this *QsciScintilla) Length() int { } func (this *QsciScintilla) Lexer() *QsciLexer { - return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciScintilla_Lexer(this.h))) + return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciScintilla_Lexer(this.h)), nil) } func (this *QsciScintilla) MarginBackgroundColor(margin int) *qt.QColor { @@ -725,8 +754,8 @@ func (this *QsciScintilla) Read(io *qt.QIODevice) bool { return (bool)(C.QsciScintilla_Read(this.h, (*C.QIODevice)(io.UnsafePointer()))) } -func (this *QsciScintilla) Recolor() { - C.QsciScintilla_Recolor(this.h) +func (this *QsciScintilla) Recolor(start int, end int) { + C.QsciScintilla_Recolor(this.h, (C.int)(start), (C.int)(end)) } func (this *QsciScintilla) RegisterImage(id int, pm *qt.QPixmap) { @@ -1172,8 +1201,8 @@ func (this *QsciScintilla) EnsureLineVisible(line int) { C.QsciScintilla_EnsureLineVisible(this.h, (C.int)(line)) } -func (this *QsciScintilla) FoldAll() { - C.QsciScintilla_FoldAll(this.h) +func (this *QsciScintilla) FoldAll(children bool) { + C.QsciScintilla_FoldAll(this.h, (C.bool)(children)) } func (this *QsciScintilla) FoldLine(line int) { @@ -1232,8 +1261,8 @@ func (this *QsciScintilla) ResetSelectionForegroundColor() { C.QsciScintilla_ResetSelectionForegroundColor(this.h) } -func (this *QsciScintilla) SelectAll() { - C.QsciScintilla_SelectAll(this.h) +func (this *QsciScintilla) SelectAll(selectVal bool) { + C.QsciScintilla_SelectAll(this.h, (C.bool)(selectVal)) } func (this *QsciScintilla) SelectToMatchingBrace() { @@ -1312,8 +1341,8 @@ func (this *QsciScintilla) SetEolVisibility(visible bool) { C.QsciScintilla_SetEolVisibility(this.h, (C.bool)(visible)) } -func (this *QsciScintilla) SetFolding(fold QsciScintilla__FoldStyle) { - C.QsciScintilla_SetFolding(this.h, (C.int)(fold)) +func (this *QsciScintilla) SetFolding(fold QsciScintilla__FoldStyle, margin int) { + C.QsciScintilla_SetFolding(this.h, (C.int)(fold), (C.int)(margin)) } func (this *QsciScintilla) SetIndentation(line int, indentation int) { @@ -1340,8 +1369,8 @@ func (this *QsciScintilla) SetIndentationWidth(width int) { C.QsciScintilla_SetIndentationWidth(this.h, (C.int)(width)) } -func (this *QsciScintilla) SetLexer() { - C.QsciScintilla_SetLexer(this.h) +func (this *QsciScintilla) SetLexer(lexer *QsciLexer) { + C.QsciScintilla_SetLexer(this.h, lexer.cPointer()) } func (this *QsciScintilla) SetMarginsBackgroundColor(col *qt.QColor) { @@ -1763,86 +1792,6 @@ func (this *QsciScintilla) ClearAnnotations1(line int) { C.QsciScintilla_ClearAnnotations1(this.h, (C.int)(line)) } -func (this *QsciScintilla) FindFirst6(expr string, re bool, cs bool, wo bool, wrap bool, forward bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst6(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward))) -} - -func (this *QsciScintilla) FindFirst7(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst7(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line))) -} - -func (this *QsciScintilla) FindFirst8(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst8(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index))) -} - -func (this *QsciScintilla) FindFirst9(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst9(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show))) -} - -func (this *QsciScintilla) FindFirst10(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst10(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix))) -} - -func (this *QsciScintilla) FindFirst11(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst11(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) -} - -func (this *QsciScintilla) FindFirstInSelection5(expr string, re bool, cs bool, wo bool, forward bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection5(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward))) -} - -func (this *QsciScintilla) FindFirstInSelection6(expr string, re bool, cs bool, wo bool, forward bool, show bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection6(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show))) -} - -func (this *QsciScintilla) FindFirstInSelection7(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection7(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix))) -} - -func (this *QsciScintilla) FindFirstInSelection8(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection8(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) -} - func (this *QsciScintilla) IndicatorDefine2(style QsciScintilla__IndicatorStyle, indicatorNumber int) int { return (int)(C.QsciScintilla_IndicatorDefine2(this.h, (C.int)(style), (C.int)(indicatorNumber))) } @@ -1871,14 +1820,6 @@ func (this *QsciScintilla) MarkerDeleteAll1(markerNumber int) { C.QsciScintilla_MarkerDeleteAll1(this.h, (C.int)(markerNumber)) } -func (this *QsciScintilla) Recolor1(start int) { - C.QsciScintilla_Recolor1(this.h, (C.int)(start)) -} - -func (this *QsciScintilla) Recolor2(start int, end int) { - C.QsciScintilla_Recolor2(this.h, (C.int)(start), (C.int)(end)) -} - func (this *QsciScintilla) SetIndicatorDrawUnder2(under bool, indicatorNumber int) { C.QsciScintilla_SetIndicatorDrawUnder2(this.h, (C.bool)(under), (C.int)(indicatorNumber)) } @@ -1919,25 +1860,2595 @@ func (this *QsciScintilla) SetWrapVisualFlags3(endFlag QsciScintilla__WrapVisual C.QsciScintilla_SetWrapVisualFlags3(this.h, (C.int)(endFlag), (C.int)(startFlag), (C.int)(indent)) } -func (this *QsciScintilla) FoldAll1(children bool) { - C.QsciScintilla_FoldAll1(this.h, (C.bool)(children)) +func (this *QsciScintilla) callVirtualBase_ApiContext(pos int, context_start *int, last_word_start *int) []string { + + var _ma C.struct_miqt_array = C.QsciScintilla_virtualbase_ApiContext(unsafe.Pointer(this.h), (C.int)(pos), (*C.int)(unsafe.Pointer(context_start)), (*C.int)(unsafe.Pointer(last_word_start))) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciScintilla) OnApiContext(slot func(super func(pos int, context_start *int, last_word_start *int) []string, pos int, context_start *int, last_word_start *int) []string) { + C.QsciScintilla_override_virtual_ApiContext(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ApiContext +func miqt_exec_callback_QsciScintilla_ApiContext(self *C.QsciScintilla, cb C.intptr_t, pos C.int, context_start *C.int, last_word_start *C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int, context_start *int, last_word_start *int) []string, pos int, context_start *int, last_word_start *int) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pos) + + slotval2 := (*int)(unsafe.Pointer(context_start)) + + slotval3 := (*int)(unsafe.Pointer(last_word_start)) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_ApiContext, slotval1, slotval2, slotval3) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciScintilla) callVirtualBase_FindFirst(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool { + expr_ms := C.struct_miqt_string{} + expr_ms.data = C.CString(expr) + expr_ms.len = C.size_t(len(expr)) + defer C.free(unsafe.Pointer(expr_ms.data)) + + return (bool)(C.QsciScintilla_virtualbase_FindFirst(unsafe.Pointer(this.h), expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) + +} +func (this *QsciScintilla) OnFindFirst(slot func(super func(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool) { + C.QsciScintilla_override_virtual_FindFirst(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FindFirst +func miqt_exec_callback_QsciScintilla_FindFirst(self *C.QsciScintilla, cb C.intptr_t, expr C.struct_miqt_string, re C.bool, cs C.bool, wo C.bool, wrap C.bool, forward C.bool, line C.int, index C.int, show C.bool, posix C.bool, cxx11 C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var expr_ms C.struct_miqt_string = expr + expr_ret := C.GoStringN(expr_ms.data, C.int(int64(expr_ms.len))) + C.free(unsafe.Pointer(expr_ms.data)) + slotval1 := expr_ret + slotval2 := (bool)(re) + + slotval3 := (bool)(cs) + + slotval4 := (bool)(wo) + + slotval5 := (bool)(wrap) + + slotval6 := (bool)(forward) + + slotval7 := (int)(line) + + slotval8 := (int)(index) + + slotval9 := (bool)(show) + + slotval10 := (bool)(posix) + + slotval11 := (bool)(cxx11) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FindFirst, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7, slotval8, slotval9, slotval10, slotval11) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_FindFirstInSelection(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool { + expr_ms := C.struct_miqt_string{} + expr_ms.data = C.CString(expr) + expr_ms.len = C.size_t(len(expr)) + defer C.free(unsafe.Pointer(expr_ms.data)) + + return (bool)(C.QsciScintilla_virtualbase_FindFirstInSelection(unsafe.Pointer(this.h), expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) + +} +func (this *QsciScintilla) OnFindFirstInSelection(slot func(super func(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool) { + C.QsciScintilla_override_virtual_FindFirstInSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FindFirstInSelection +func miqt_exec_callback_QsciScintilla_FindFirstInSelection(self *C.QsciScintilla, cb C.intptr_t, expr C.struct_miqt_string, re C.bool, cs C.bool, wo C.bool, forward C.bool, show C.bool, posix C.bool, cxx11 C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var expr_ms C.struct_miqt_string = expr + expr_ret := C.GoStringN(expr_ms.data, C.int(int64(expr_ms.len))) + C.free(unsafe.Pointer(expr_ms.data)) + slotval1 := expr_ret + slotval2 := (bool)(re) + + slotval3 := (bool)(cs) + + slotval4 := (bool)(wo) + + slotval5 := (bool)(forward) + + slotval6 := (bool)(show) + + slotval7 := (bool)(posix) + + slotval8 := (bool)(cxx11) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FindFirstInSelection, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7, slotval8) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_FindNext() bool { + + return (bool)(C.QsciScintilla_virtualbase_FindNext(unsafe.Pointer(this.h))) + +} +func (this *QsciScintilla) OnFindNext(slot func(super func() bool) bool) { + C.QsciScintilla_override_virtual_FindNext(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FindNext +func miqt_exec_callback_QsciScintilla_FindNext(self *C.QsciScintilla, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FindNext) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_Recolor(start int, end int) { + + C.QsciScintilla_virtualbase_Recolor(unsafe.Pointer(this.h), (C.int)(start), (C.int)(end)) + +} +func (this *QsciScintilla) OnRecolor(slot func(super func(start int, end int), start int, end int)) { + C.QsciScintilla_override_virtual_Recolor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Recolor +func miqt_exec_callback_QsciScintilla_Recolor(self *C.QsciScintilla, cb C.intptr_t, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start int, end int), start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(start) + + slotval2 := (int)(end) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Recolor, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_Replace(replaceStr string) { + replaceStr_ms := C.struct_miqt_string{} + replaceStr_ms.data = C.CString(replaceStr) + replaceStr_ms.len = C.size_t(len(replaceStr)) + defer C.free(unsafe.Pointer(replaceStr_ms.data)) + + C.QsciScintilla_virtualbase_Replace(unsafe.Pointer(this.h), replaceStr_ms) + +} +func (this *QsciScintilla) OnReplace(slot func(super func(replaceStr string), replaceStr string)) { + C.QsciScintilla_override_virtual_Replace(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Replace +func miqt_exec_callback_QsciScintilla_Replace(self *C.QsciScintilla, cb C.intptr_t, replaceStr C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(replaceStr string), replaceStr string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var replaceStr_ms C.struct_miqt_string = replaceStr + replaceStr_ret := C.GoStringN(replaceStr_ms.data, C.int(int64(replaceStr_ms.len))) + C.free(unsafe.Pointer(replaceStr_ms.data)) + slotval1 := replaceStr_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Replace, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Append(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_Append(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnAppend(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_Append(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Append +func miqt_exec_callback_QsciScintilla_Append(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Append, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_AutoCompleteFromAll() { + + C.QsciScintilla_virtualbase_AutoCompleteFromAll(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnAutoCompleteFromAll(slot func(super func())) { + C.QsciScintilla_override_virtual_AutoCompleteFromAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_AutoCompleteFromAll +func miqt_exec_callback_QsciScintilla_AutoCompleteFromAll(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_AutoCompleteFromAll) + +} + +func (this *QsciScintilla) callVirtualBase_AutoCompleteFromAPIs() { + + C.QsciScintilla_virtualbase_AutoCompleteFromAPIs(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnAutoCompleteFromAPIs(slot func(super func())) { + C.QsciScintilla_override_virtual_AutoCompleteFromAPIs(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_AutoCompleteFromAPIs +func miqt_exec_callback_QsciScintilla_AutoCompleteFromAPIs(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_AutoCompleteFromAPIs) + +} + +func (this *QsciScintilla) callVirtualBase_AutoCompleteFromDocument() { + + C.QsciScintilla_virtualbase_AutoCompleteFromDocument(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnAutoCompleteFromDocument(slot func(super func())) { + C.QsciScintilla_override_virtual_AutoCompleteFromDocument(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_AutoCompleteFromDocument +func miqt_exec_callback_QsciScintilla_AutoCompleteFromDocument(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_AutoCompleteFromDocument) + } -func (this *QsciScintilla) SelectAll1(selectVal bool) { - C.QsciScintilla_SelectAll1(this.h, (C.bool)(selectVal)) +func (this *QsciScintilla) callVirtualBase_CallTip() { + + C.QsciScintilla_virtualbase_CallTip(unsafe.Pointer(this.h)) + } +func (this *QsciScintilla) OnCallTip(slot func(super func())) { + C.QsciScintilla_override_virtual_CallTip(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_CallTip +func miqt_exec_callback_QsciScintilla_CallTip(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_CallTip) -func (this *QsciScintilla) SetFolding2(fold QsciScintilla__FoldStyle, margin int) { - C.QsciScintilla_SetFolding2(this.h, (C.int)(fold), (C.int)(margin)) } -func (this *QsciScintilla) SetLexer1(lexer *QsciLexer) { - C.QsciScintilla_SetLexer1(this.h, lexer.cPointer()) +func (this *QsciScintilla) callVirtualBase_Clear() { + + C.QsciScintilla_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnClear(slot func(super func())) { + C.QsciScintilla_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Clear +func miqt_exec_callback_QsciScintilla_Clear(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Clear) + +} + +func (this *QsciScintilla) callVirtualBase_Copy() { + + C.QsciScintilla_virtualbase_Copy(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnCopy(slot func(super func())) { + C.QsciScintilla_override_virtual_Copy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Copy +func miqt_exec_callback_QsciScintilla_Copy(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Copy) + +} + +func (this *QsciScintilla) callVirtualBase_Cut() { + + C.QsciScintilla_virtualbase_Cut(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnCut(slot func(super func())) { + C.QsciScintilla_override_virtual_Cut(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Cut +func miqt_exec_callback_QsciScintilla_Cut(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Cut) + +} + +func (this *QsciScintilla) callVirtualBase_EnsureCursorVisible() { + + C.QsciScintilla_virtualbase_EnsureCursorVisible(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnEnsureCursorVisible(slot func(super func())) { + C.QsciScintilla_override_virtual_EnsureCursorVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_EnsureCursorVisible +func miqt_exec_callback_QsciScintilla_EnsureCursorVisible(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_EnsureCursorVisible) + +} + +func (this *QsciScintilla) callVirtualBase_EnsureLineVisible(line int) { + + C.QsciScintilla_virtualbase_EnsureLineVisible(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnEnsureLineVisible(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_EnsureLineVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_EnsureLineVisible +func miqt_exec_callback_QsciScintilla_EnsureLineVisible(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_EnsureLineVisible, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FoldAll(children bool) { + + C.QsciScintilla_virtualbase_FoldAll(unsafe.Pointer(this.h), (C.bool)(children)) + +} +func (this *QsciScintilla) OnFoldAll(slot func(super func(children bool), children bool)) { + C.QsciScintilla_override_virtual_FoldAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FoldAll +func miqt_exec_callback_QsciScintilla_FoldAll(self *C.QsciScintilla, cb C.intptr_t, children C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(children bool), children bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(children) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FoldAll, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FoldLine(line int) { + + C.QsciScintilla_virtualbase_FoldLine(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnFoldLine(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_FoldLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FoldLine +func miqt_exec_callback_QsciScintilla_FoldLine(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FoldLine, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Indent(line int) { + + C.QsciScintilla_virtualbase_Indent(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnIndent(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_Indent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Indent +func miqt_exec_callback_QsciScintilla_Indent(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Indent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Insert(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_Insert(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnInsert(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_Insert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Insert +func miqt_exec_callback_QsciScintilla_Insert(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Insert, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_InsertAt(text string, line int, index int) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_InsertAt(unsafe.Pointer(this.h), text_ms, (C.int)(line), (C.int)(index)) + +} +func (this *QsciScintilla) OnInsertAt(slot func(super func(text string, line int, index int), text string, line int, index int)) { + C.QsciScintilla_override_virtual_InsertAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_InsertAt +func miqt_exec_callback_QsciScintilla_InsertAt(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string, line C.int, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string, line int, index int), text string, line int, index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + slotval2 := (int)(line) + + slotval3 := (int)(index) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_InsertAt, slotval1, slotval2, slotval3) + +} + +func (this *QsciScintilla) callVirtualBase_MoveToMatchingBrace() { + + C.QsciScintilla_virtualbase_MoveToMatchingBrace(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnMoveToMatchingBrace(slot func(super func())) { + C.QsciScintilla_override_virtual_MoveToMatchingBrace(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MoveToMatchingBrace +func miqt_exec_callback_QsciScintilla_MoveToMatchingBrace(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MoveToMatchingBrace) + +} + +func (this *QsciScintilla) callVirtualBase_Paste() { + + C.QsciScintilla_virtualbase_Paste(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnPaste(slot func(super func())) { + C.QsciScintilla_override_virtual_Paste(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Paste +func miqt_exec_callback_QsciScintilla_Paste(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Paste) + +} + +func (this *QsciScintilla) callVirtualBase_Redo() { + + C.QsciScintilla_virtualbase_Redo(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnRedo(slot func(super func())) { + C.QsciScintilla_override_virtual_Redo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Redo +func miqt_exec_callback_QsciScintilla_Redo(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Redo) + +} + +func (this *QsciScintilla) callVirtualBase_RemoveSelectedText() { + + C.QsciScintilla_virtualbase_RemoveSelectedText(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnRemoveSelectedText(slot func(super func())) { + C.QsciScintilla_override_virtual_RemoveSelectedText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_RemoveSelectedText +func miqt_exec_callback_QsciScintilla_RemoveSelectedText(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_RemoveSelectedText) + +} + +func (this *QsciScintilla) callVirtualBase_ReplaceSelectedText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_ReplaceSelectedText(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnReplaceSelectedText(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_ReplaceSelectedText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ReplaceSelectedText +func miqt_exec_callback_QsciScintilla_ReplaceSelectedText(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ReplaceSelectedText, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ResetSelectionBackgroundColor() { + + C.QsciScintilla_virtualbase_ResetSelectionBackgroundColor(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnResetSelectionBackgroundColor(slot func(super func())) { + C.QsciScintilla_override_virtual_ResetSelectionBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ResetSelectionBackgroundColor +func miqt_exec_callback_QsciScintilla_ResetSelectionBackgroundColor(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ResetSelectionBackgroundColor) + +} + +func (this *QsciScintilla) callVirtualBase_ResetSelectionForegroundColor() { + + C.QsciScintilla_virtualbase_ResetSelectionForegroundColor(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnResetSelectionForegroundColor(slot func(super func())) { + C.QsciScintilla_override_virtual_ResetSelectionForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ResetSelectionForegroundColor +func miqt_exec_callback_QsciScintilla_ResetSelectionForegroundColor(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ResetSelectionForegroundColor) + +} + +func (this *QsciScintilla) callVirtualBase_SelectAll(selectVal bool) { + + C.QsciScintilla_virtualbase_SelectAll(unsafe.Pointer(this.h), (C.bool)(selectVal)) + +} +func (this *QsciScintilla) OnSelectAll(slot func(super func(selectVal bool), selectVal bool)) { + C.QsciScintilla_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SelectAll +func miqt_exec_callback_QsciScintilla_SelectAll(self *C.QsciScintilla, cb C.intptr_t, selectVal C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectVal bool), selectVal bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(selectVal) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SelectAll, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SelectToMatchingBrace() { + + C.QsciScintilla_virtualbase_SelectToMatchingBrace(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnSelectToMatchingBrace(slot func(super func())) { + C.QsciScintilla_override_virtual_SelectToMatchingBrace(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SelectToMatchingBrace +func miqt_exec_callback_QsciScintilla_SelectToMatchingBrace(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SelectToMatchingBrace) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionCaseSensitivity(cs bool) { + + C.QsciScintilla_virtualbase_SetAutoCompletionCaseSensitivity(unsafe.Pointer(this.h), (C.bool)(cs)) + +} +func (this *QsciScintilla) OnSetAutoCompletionCaseSensitivity(slot func(super func(cs bool), cs bool)) { + C.QsciScintilla_override_virtual_SetAutoCompletionCaseSensitivity(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionCaseSensitivity +func miqt_exec_callback_QsciScintilla_SetAutoCompletionCaseSensitivity(self *C.QsciScintilla, cb C.intptr_t, cs C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cs bool), cs bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(cs) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionCaseSensitivity, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionReplaceWord(replace bool) { + + C.QsciScintilla_virtualbase_SetAutoCompletionReplaceWord(unsafe.Pointer(this.h), (C.bool)(replace)) + +} +func (this *QsciScintilla) OnSetAutoCompletionReplaceWord(slot func(super func(replace bool), replace bool)) { + C.QsciScintilla_override_virtual_SetAutoCompletionReplaceWord(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionReplaceWord +func miqt_exec_callback_QsciScintilla_SetAutoCompletionReplaceWord(self *C.QsciScintilla, cb C.intptr_t, replace C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(replace bool), replace bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(replace) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionReplaceWord, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionShowSingle(single bool) { + + C.QsciScintilla_virtualbase_SetAutoCompletionShowSingle(unsafe.Pointer(this.h), (C.bool)(single)) + +} +func (this *QsciScintilla) OnSetAutoCompletionShowSingle(slot func(super func(single bool), single bool)) { + C.QsciScintilla_override_virtual_SetAutoCompletionShowSingle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionShowSingle +func miqt_exec_callback_QsciScintilla_SetAutoCompletionShowSingle(self *C.QsciScintilla, cb C.intptr_t, single C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(single bool), single bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(single) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionShowSingle, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionSource(source QsciScintilla__AutoCompletionSource) { + + C.QsciScintilla_virtualbase_SetAutoCompletionSource(unsafe.Pointer(this.h), (C.int)(source)) + +} +func (this *QsciScintilla) OnSetAutoCompletionSource(slot func(super func(source QsciScintilla__AutoCompletionSource), source QsciScintilla__AutoCompletionSource)) { + C.QsciScintilla_override_virtual_SetAutoCompletionSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionSource +func miqt_exec_callback_QsciScintilla_SetAutoCompletionSource(self *C.QsciScintilla, cb C.intptr_t, source C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source QsciScintilla__AutoCompletionSource), source QsciScintilla__AutoCompletionSource)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__AutoCompletionSource)(source) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionSource, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionThreshold(thresh int) { + + C.QsciScintilla_virtualbase_SetAutoCompletionThreshold(unsafe.Pointer(this.h), (C.int)(thresh)) + +} +func (this *QsciScintilla) OnSetAutoCompletionThreshold(slot func(super func(thresh int), thresh int)) { + C.QsciScintilla_override_virtual_SetAutoCompletionThreshold(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionThreshold +func miqt_exec_callback_QsciScintilla_SetAutoCompletionThreshold(self *C.QsciScintilla, cb C.intptr_t, thresh C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(thresh int), thresh int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(thresh) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionThreshold, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionUseSingle(single QsciScintilla__AutoCompletionUseSingle) { + + C.QsciScintilla_virtualbase_SetAutoCompletionUseSingle(unsafe.Pointer(this.h), (C.int)(single)) + +} +func (this *QsciScintilla) OnSetAutoCompletionUseSingle(slot func(super func(single QsciScintilla__AutoCompletionUseSingle), single QsciScintilla__AutoCompletionUseSingle)) { + C.QsciScintilla_override_virtual_SetAutoCompletionUseSingle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionUseSingle +func miqt_exec_callback_QsciScintilla_SetAutoCompletionUseSingle(self *C.QsciScintilla, cb C.intptr_t, single C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(single QsciScintilla__AutoCompletionUseSingle), single QsciScintilla__AutoCompletionUseSingle)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__AutoCompletionUseSingle)(single) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionUseSingle, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoIndent(autoindent bool) { + + C.QsciScintilla_virtualbase_SetAutoIndent(unsafe.Pointer(this.h), (C.bool)(autoindent)) + +} +func (this *QsciScintilla) OnSetAutoIndent(slot func(super func(autoindent bool), autoindent bool)) { + C.QsciScintilla_override_virtual_SetAutoIndent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoIndent +func miqt_exec_callback_QsciScintilla_SetAutoIndent(self *C.QsciScintilla, cb C.intptr_t, autoindent C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindent bool), autoindent bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(autoindent) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoIndent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetBraceMatching(bm QsciScintilla__BraceMatch) { + + C.QsciScintilla_virtualbase_SetBraceMatching(unsafe.Pointer(this.h), (C.int)(bm)) + +} +func (this *QsciScintilla) OnSetBraceMatching(slot func(super func(bm QsciScintilla__BraceMatch), bm QsciScintilla__BraceMatch)) { + C.QsciScintilla_override_virtual_SetBraceMatching(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetBraceMatching +func miqt_exec_callback_QsciScintilla_SetBraceMatching(self *C.QsciScintilla, cb C.intptr_t, bm C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(bm QsciScintilla__BraceMatch), bm QsciScintilla__BraceMatch)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__BraceMatch)(bm) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetBraceMatching, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetBackspaceUnindents(unindent bool) { + + C.QsciScintilla_virtualbase_SetBackspaceUnindents(unsafe.Pointer(this.h), (C.bool)(unindent)) + +} +func (this *QsciScintilla) OnSetBackspaceUnindents(slot func(super func(unindent bool), unindent bool)) { + C.QsciScintilla_override_virtual_SetBackspaceUnindents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetBackspaceUnindents +func miqt_exec_callback_QsciScintilla_SetBackspaceUnindents(self *C.QsciScintilla, cb C.intptr_t, unindent C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(unindent bool), unindent bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(unindent) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetBackspaceUnindents, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretForegroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetCaretForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetCaretForegroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetCaretForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretForegroundColor +func miqt_exec_callback_QsciScintilla_SetCaretForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretLineBackgroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetCaretLineBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetCaretLineBackgroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetCaretLineBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretLineBackgroundColor +func miqt_exec_callback_QsciScintilla_SetCaretLineBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretLineBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretLineFrameWidth(width int) { + + C.QsciScintilla_virtualbase_SetCaretLineFrameWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetCaretLineFrameWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetCaretLineFrameWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretLineFrameWidth +func miqt_exec_callback_QsciScintilla_SetCaretLineFrameWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretLineFrameWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretLineVisible(enable bool) { + + C.QsciScintilla_virtualbase_SetCaretLineVisible(unsafe.Pointer(this.h), (C.bool)(enable)) + +} +func (this *QsciScintilla) OnSetCaretLineVisible(slot func(super func(enable bool), enable bool)) { + C.QsciScintilla_override_virtual_SetCaretLineVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretLineVisible +func miqt_exec_callback_QsciScintilla_SetCaretLineVisible(self *C.QsciScintilla, cb C.intptr_t, enable C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(enable bool), enable bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(enable) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretLineVisible, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretWidth(width int) { + + C.QsciScintilla_virtualbase_SetCaretWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetCaretWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetCaretWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretWidth +func miqt_exec_callback_QsciScintilla_SetCaretWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetColor(c *qt.QColor) { + + C.QsciScintilla_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetColor(slot func(super func(c *qt.QColor), c *qt.QColor)) { + C.QsciScintilla_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetColor +func miqt_exec_callback_QsciScintilla_SetColor(self *C.QsciScintilla, cb C.intptr_t, c *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor), c *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCursorPosition(line int, index int) { + + C.QsciScintilla_virtualbase_SetCursorPosition(unsafe.Pointer(this.h), (C.int)(line), (C.int)(index)) + +} +func (this *QsciScintilla) OnSetCursorPosition(slot func(super func(line int, index int), line int, index int)) { + C.QsciScintilla_override_virtual_SetCursorPosition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCursorPosition +func miqt_exec_callback_QsciScintilla_SetCursorPosition(self *C.QsciScintilla, cb C.intptr_t, line C.int, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int, index int), line int, index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + slotval2 := (int)(index) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCursorPosition, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetEolMode(mode QsciScintilla__EolMode) { + + C.QsciScintilla_virtualbase_SetEolMode(unsafe.Pointer(this.h), (C.int)(mode)) + +} +func (this *QsciScintilla) OnSetEolMode(slot func(super func(mode QsciScintilla__EolMode), mode QsciScintilla__EolMode)) { + C.QsciScintilla_override_virtual_SetEolMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetEolMode +func miqt_exec_callback_QsciScintilla_SetEolMode(self *C.QsciScintilla, cb C.intptr_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QsciScintilla__EolMode), mode QsciScintilla__EolMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__EolMode)(mode) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetEolMode, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetEolVisibility(visible bool) { + + C.QsciScintilla_virtualbase_SetEolVisibility(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QsciScintilla) OnSetEolVisibility(slot func(super func(visible bool), visible bool)) { + C.QsciScintilla_override_virtual_SetEolVisibility(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetEolVisibility +func miqt_exec_callback_QsciScintilla_SetEolVisibility(self *C.QsciScintilla, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetEolVisibility, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetFolding(fold QsciScintilla__FoldStyle, margin int) { + + C.QsciScintilla_virtualbase_SetFolding(unsafe.Pointer(this.h), (C.int)(fold), (C.int)(margin)) + +} +func (this *QsciScintilla) OnSetFolding(slot func(super func(fold QsciScintilla__FoldStyle, margin int), fold QsciScintilla__FoldStyle, margin int)) { + C.QsciScintilla_override_virtual_SetFolding(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetFolding +func miqt_exec_callback_QsciScintilla_SetFolding(self *C.QsciScintilla, cb C.intptr_t, fold C.int, margin C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold QsciScintilla__FoldStyle, margin int), fold QsciScintilla__FoldStyle, margin int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__FoldStyle)(fold) + + slotval2 := (int)(margin) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetFolding, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentation(line int, indentation int) { + + C.QsciScintilla_virtualbase_SetIndentation(unsafe.Pointer(this.h), (C.int)(line), (C.int)(indentation)) + +} +func (this *QsciScintilla) OnSetIndentation(slot func(super func(line int, indentation int), line int, indentation int)) { + C.QsciScintilla_override_virtual_SetIndentation(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentation +func miqt_exec_callback_QsciScintilla_SetIndentation(self *C.QsciScintilla, cb C.intptr_t, line C.int, indentation C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int, indentation int), line int, indentation int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + slotval2 := (int)(indentation) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentation, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationGuides(enable bool) { + + C.QsciScintilla_virtualbase_SetIndentationGuides(unsafe.Pointer(this.h), (C.bool)(enable)) + +} +func (this *QsciScintilla) OnSetIndentationGuides(slot func(super func(enable bool), enable bool)) { + C.QsciScintilla_override_virtual_SetIndentationGuides(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationGuides +func miqt_exec_callback_QsciScintilla_SetIndentationGuides(self *C.QsciScintilla, cb C.intptr_t, enable C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(enable bool), enable bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(enable) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationGuides, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationGuidesBackgroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetIndentationGuidesBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetIndentationGuidesBackgroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetIndentationGuidesBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationGuidesBackgroundColor +func miqt_exec_callback_QsciScintilla_SetIndentationGuidesBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationGuidesBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationGuidesForegroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetIndentationGuidesForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetIndentationGuidesForegroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetIndentationGuidesForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationGuidesForegroundColor +func miqt_exec_callback_QsciScintilla_SetIndentationGuidesForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationGuidesForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationsUseTabs(tabs bool) { + + C.QsciScintilla_virtualbase_SetIndentationsUseTabs(unsafe.Pointer(this.h), (C.bool)(tabs)) + +} +func (this *QsciScintilla) OnSetIndentationsUseTabs(slot func(super func(tabs bool), tabs bool)) { + C.QsciScintilla_override_virtual_SetIndentationsUseTabs(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationsUseTabs +func miqt_exec_callback_QsciScintilla_SetIndentationsUseTabs(self *C.QsciScintilla, cb C.intptr_t, tabs C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(tabs bool), tabs bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(tabs) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationsUseTabs, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationWidth(width int) { + + C.QsciScintilla_virtualbase_SetIndentationWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetIndentationWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetIndentationWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationWidth +func miqt_exec_callback_QsciScintilla_SetIndentationWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetLexer(lexer *QsciLexer) { + + C.QsciScintilla_virtualbase_SetLexer(unsafe.Pointer(this.h), lexer.cPointer()) + +} +func (this *QsciScintilla) OnSetLexer(slot func(super func(lexer *QsciLexer), lexer *QsciLexer)) { + C.QsciScintilla_override_virtual_SetLexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetLexer +func miqt_exec_callback_QsciScintilla_SetLexer(self *C.QsciScintilla, cb C.intptr_t, lexer *C.QsciLexer) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lexer *QsciLexer), lexer *QsciLexer)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciLexer(unsafe.Pointer(lexer), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetLexer, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginsBackgroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetMarginsBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetMarginsBackgroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetMarginsBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginsBackgroundColor +func miqt_exec_callback_QsciScintilla_SetMarginsBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginsBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginsFont(f *qt.QFont) { + + C.QsciScintilla_virtualbase_SetMarginsFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetMarginsFont(slot func(super func(f *qt.QFont), f *qt.QFont)) { + C.QsciScintilla_override_virtual_SetMarginsFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginsFont +func miqt_exec_callback_QsciScintilla_SetMarginsFont(self *C.QsciScintilla, cb C.intptr_t, f *C.QFont) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt.QFont), f *qt.QFont)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFont(unsafe.Pointer(f)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginsFont, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginsForegroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetMarginsForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetMarginsForegroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetMarginsForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginsForegroundColor +func miqt_exec_callback_QsciScintilla_SetMarginsForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginsForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginLineNumbers(margin int, lnrs bool) { + + C.QsciScintilla_virtualbase_SetMarginLineNumbers(unsafe.Pointer(this.h), (C.int)(margin), (C.bool)(lnrs)) + +} +func (this *QsciScintilla) OnSetMarginLineNumbers(slot func(super func(margin int, lnrs bool), margin int, lnrs bool)) { + C.QsciScintilla_override_virtual_SetMarginLineNumbers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginLineNumbers +func miqt_exec_callback_QsciScintilla_SetMarginLineNumbers(self *C.QsciScintilla, cb C.intptr_t, margin C.int, lnrs C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, lnrs bool), margin int, lnrs bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (bool)(lnrs) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginLineNumbers, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginMarkerMask(margin int, mask int) { + + C.QsciScintilla_virtualbase_SetMarginMarkerMask(unsafe.Pointer(this.h), (C.int)(margin), (C.int)(mask)) + +} +func (this *QsciScintilla) OnSetMarginMarkerMask(slot func(super func(margin int, mask int), margin int, mask int)) { + C.QsciScintilla_override_virtual_SetMarginMarkerMask(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginMarkerMask +func miqt_exec_callback_QsciScintilla_SetMarginMarkerMask(self *C.QsciScintilla, cb C.intptr_t, margin C.int, mask C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, mask int), margin int, mask int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (int)(mask) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginMarkerMask, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginSensitivity(margin int, sens bool) { + + C.QsciScintilla_virtualbase_SetMarginSensitivity(unsafe.Pointer(this.h), (C.int)(margin), (C.bool)(sens)) + +} +func (this *QsciScintilla) OnSetMarginSensitivity(slot func(super func(margin int, sens bool), margin int, sens bool)) { + C.QsciScintilla_override_virtual_SetMarginSensitivity(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginSensitivity +func miqt_exec_callback_QsciScintilla_SetMarginSensitivity(self *C.QsciScintilla, cb C.intptr_t, margin C.int, sens C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, sens bool), margin int, sens bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (bool)(sens) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginSensitivity, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginWidth(margin int, width int) { + + C.QsciScintilla_virtualbase_SetMarginWidth(unsafe.Pointer(this.h), (C.int)(margin), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetMarginWidth(slot func(super func(margin int, width int), margin int, width int)) { + C.QsciScintilla_override_virtual_SetMarginWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginWidth +func miqt_exec_callback_QsciScintilla_SetMarginWidth(self *C.QsciScintilla, cb C.intptr_t, margin C.int, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, width int), margin int, width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginWidth, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginWidth2(margin int, s string) { + s_ms := C.struct_miqt_string{} + s_ms.data = C.CString(s) + s_ms.len = C.size_t(len(s)) + defer C.free(unsafe.Pointer(s_ms.data)) + + C.QsciScintilla_virtualbase_SetMarginWidth2(unsafe.Pointer(this.h), (C.int)(margin), s_ms) + +} +func (this *QsciScintilla) OnSetMarginWidth2(slot func(super func(margin int, s string), margin int, s string)) { + C.QsciScintilla_override_virtual_SetMarginWidth2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginWidth2 +func miqt_exec_callback_QsciScintilla_SetMarginWidth2(self *C.QsciScintilla, cb C.intptr_t, margin C.int, s C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, s string), margin int, s string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + var s_ms C.struct_miqt_string = s + s_ret := C.GoStringN(s_ms.data, C.int(int64(s_ms.len))) + C.free(unsafe.Pointer(s_ms.data)) + slotval2 := s_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginWidth2, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetModified(m bool) { + + C.QsciScintilla_virtualbase_SetModified(unsafe.Pointer(this.h), (C.bool)(m)) + +} +func (this *QsciScintilla) OnSetModified(slot func(super func(m bool), m bool)) { + C.QsciScintilla_override_virtual_SetModified(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetModified +func miqt_exec_callback_QsciScintilla_SetModified(self *C.QsciScintilla, cb C.intptr_t, m C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m bool), m bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(m) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetModified, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetPaper(c *qt.QColor) { + + C.QsciScintilla_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetPaper(slot func(super func(c *qt.QColor), c *qt.QColor)) { + C.QsciScintilla_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetPaper +func miqt_exec_callback_QsciScintilla_SetPaper(self *C.QsciScintilla, cb C.intptr_t, c *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt.QColor), c *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(c)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetPaper, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetReadOnly(ro bool) { + + C.QsciScintilla_virtualbase_SetReadOnly(unsafe.Pointer(this.h), (C.bool)(ro)) + +} +func (this *QsciScintilla) OnSetReadOnly(slot func(super func(ro bool), ro bool)) { + C.QsciScintilla_override_virtual_SetReadOnly(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetReadOnly +func miqt_exec_callback_QsciScintilla_SetReadOnly(self *C.QsciScintilla, cb C.intptr_t, ro C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ro bool), ro bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(ro) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetReadOnly, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetSelection(lineFrom int, indexFrom int, lineTo int, indexTo int) { + + C.QsciScintilla_virtualbase_SetSelection(unsafe.Pointer(this.h), (C.int)(lineFrom), (C.int)(indexFrom), (C.int)(lineTo), (C.int)(indexTo)) + +} +func (this *QsciScintilla) OnSetSelection(slot func(super func(lineFrom int, indexFrom int, lineTo int, indexTo int), lineFrom int, indexFrom int, lineTo int, indexTo int)) { + C.QsciScintilla_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetSelection +func miqt_exec_callback_QsciScintilla_SetSelection(self *C.QsciScintilla, cb C.intptr_t, lineFrom C.int, indexFrom C.int, lineTo C.int, indexTo C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lineFrom int, indexFrom int, lineTo int, indexTo int), lineFrom int, indexFrom int, lineTo int, indexTo int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(lineFrom) + + slotval2 := (int)(indexFrom) + + slotval3 := (int)(lineTo) + + slotval4 := (int)(indexTo) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetSelection, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QsciScintilla) callVirtualBase_SetSelectionBackgroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetSelectionBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetSelectionBackgroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetSelectionBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetSelectionBackgroundColor +func miqt_exec_callback_QsciScintilla_SetSelectionBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetSelectionBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetSelectionForegroundColor(col *qt.QColor) { + + C.QsciScintilla_virtualbase_SetSelectionForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetSelectionForegroundColor(slot func(super func(col *qt.QColor), col *qt.QColor)) { + C.QsciScintilla_override_virtual_SetSelectionForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetSelectionForegroundColor +func miqt_exec_callback_QsciScintilla_SetSelectionForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt.QColor), col *qt.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetSelectionForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetTabIndents(indent bool) { + + C.QsciScintilla_virtualbase_SetTabIndents(unsafe.Pointer(this.h), (C.bool)(indent)) + +} +func (this *QsciScintilla) OnSetTabIndents(slot func(super func(indent bool), indent bool)) { + C.QsciScintilla_override_virtual_SetTabIndents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetTabIndents +func miqt_exec_callback_QsciScintilla_SetTabIndents(self *C.QsciScintilla, cb C.intptr_t, indent C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indent bool), indent bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(indent) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetTabIndents, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetTabWidth(width int) { + + C.QsciScintilla_virtualbase_SetTabWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetTabWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetTabWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetTabWidth +func miqt_exec_callback_QsciScintilla_SetTabWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetTabWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_SetText(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnSetText(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_SetText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetText +func miqt_exec_callback_QsciScintilla_SetText(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetText, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetUtf8(cp bool) { + + C.QsciScintilla_virtualbase_SetUtf8(unsafe.Pointer(this.h), (C.bool)(cp)) + +} +func (this *QsciScintilla) OnSetUtf8(slot func(super func(cp bool), cp bool)) { + C.QsciScintilla_override_virtual_SetUtf8(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetUtf8 +func miqt_exec_callback_QsciScintilla_SetUtf8(self *C.QsciScintilla, cb C.intptr_t, cp C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cp bool), cp bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(cp) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetUtf8, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetWhitespaceVisibility(mode QsciScintilla__WhitespaceVisibility) { + + C.QsciScintilla_virtualbase_SetWhitespaceVisibility(unsafe.Pointer(this.h), (C.int)(mode)) + +} +func (this *QsciScintilla) OnSetWhitespaceVisibility(slot func(super func(mode QsciScintilla__WhitespaceVisibility), mode QsciScintilla__WhitespaceVisibility)) { + C.QsciScintilla_override_virtual_SetWhitespaceVisibility(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetWhitespaceVisibility +func miqt_exec_callback_QsciScintilla_SetWhitespaceVisibility(self *C.QsciScintilla, cb C.intptr_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QsciScintilla__WhitespaceVisibility), mode QsciScintilla__WhitespaceVisibility)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__WhitespaceVisibility)(mode) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetWhitespaceVisibility, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetWrapMode(mode QsciScintilla__WrapMode) { + + C.QsciScintilla_virtualbase_SetWrapMode(unsafe.Pointer(this.h), (C.int)(mode)) + +} +func (this *QsciScintilla) OnSetWrapMode(slot func(super func(mode QsciScintilla__WrapMode), mode QsciScintilla__WrapMode)) { + C.QsciScintilla_override_virtual_SetWrapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetWrapMode +func miqt_exec_callback_QsciScintilla_SetWrapMode(self *C.QsciScintilla, cb C.intptr_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QsciScintilla__WrapMode), mode QsciScintilla__WrapMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__WrapMode)(mode) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetWrapMode, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Undo() { + + C.QsciScintilla_virtualbase_Undo(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnUndo(slot func(super func())) { + C.QsciScintilla_override_virtual_Undo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Undo +func miqt_exec_callback_QsciScintilla_Undo(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Undo) + +} + +func (this *QsciScintilla) callVirtualBase_Unindent(line int) { + + C.QsciScintilla_virtualbase_Unindent(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnUnindent(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_Unindent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Unindent +func miqt_exec_callback_QsciScintilla_Unindent(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Unindent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomIn(rangeVal int) { + + C.QsciScintilla_virtualbase_ZoomIn(unsafe.Pointer(this.h), (C.int)(rangeVal)) + +} +func (this *QsciScintilla) OnZoomIn(slot func(super func(rangeVal int), rangeVal int)) { + C.QsciScintilla_override_virtual_ZoomIn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomIn +func miqt_exec_callback_QsciScintilla_ZoomIn(self *C.QsciScintilla, cb C.intptr_t, rangeVal C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rangeVal int), rangeVal int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(rangeVal) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomIn, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomIn2() { + + C.QsciScintilla_virtualbase_ZoomIn2(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnZoomIn2(slot func(super func())) { + C.QsciScintilla_override_virtual_ZoomIn2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomIn2 +func miqt_exec_callback_QsciScintilla_ZoomIn2(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomIn2) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomOut(rangeVal int) { + + C.QsciScintilla_virtualbase_ZoomOut(unsafe.Pointer(this.h), (C.int)(rangeVal)) + +} +func (this *QsciScintilla) OnZoomOut(slot func(super func(rangeVal int), rangeVal int)) { + C.QsciScintilla_override_virtual_ZoomOut(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomOut +func miqt_exec_callback_QsciScintilla_ZoomOut(self *C.QsciScintilla, cb C.intptr_t, rangeVal C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rangeVal int), rangeVal int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(rangeVal) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomOut, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomOut2() { + + C.QsciScintilla_virtualbase_ZoomOut2(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnZoomOut2(slot func(super func())) { + C.QsciScintilla_override_virtual_ZoomOut2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomOut2 +func miqt_exec_callback_QsciScintilla_ZoomOut2(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomOut2) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomTo(size int) { + + C.QsciScintilla_virtualbase_ZoomTo(unsafe.Pointer(this.h), (C.int)(size)) + +} +func (this *QsciScintilla) OnZoomTo(slot func(super func(size int), size int)) { + C.QsciScintilla_override_virtual_ZoomTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomTo +func miqt_exec_callback_QsciScintilla_ZoomTo(self *C.QsciScintilla, cb C.intptr_t, size C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int), size int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(size) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomTo, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Event(e *qt.QEvent) bool { + + return (bool)(C.QsciScintilla_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer()))) + +} +func (this *QsciScintilla) OnEvent(slot func(super func(e *qt.QEvent) bool, e *qt.QEvent) bool) { + C.QsciScintilla_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Event +func miqt_exec_callback_QsciScintilla_Event(self *C.QsciScintilla, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QEvent) bool, e *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_ChangeEvent(e *qt.QEvent) { + + C.QsciScintilla_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnChangeEvent(slot func(super func(e *qt.QEvent), e *qt.QEvent)) { + C.QsciScintilla_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ChangeEvent +func miqt_exec_callback_QsciScintilla_ChangeEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QEvent), e *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ContextMenuEvent(e *qt.QContextMenuEvent) { + + C.QsciScintilla_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnContextMenuEvent(slot func(super func(e *qt.QContextMenuEvent), e *qt.QContextMenuEvent)) { + C.QsciScintilla_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ContextMenuEvent +func miqt_exec_callback_QsciScintilla_ContextMenuEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QContextMenuEvent), e *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_WheelEvent(e *qt.QWheelEvent) { + + C.QsciScintilla_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnWheelEvent(slot func(super func(e *qt.QWheelEvent), e *qt.QWheelEvent)) { + C.QsciScintilla_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_WheelEvent +func miqt_exec_callback_QsciScintilla_WheelEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QWheelEvent), e *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_CanInsertFromMimeData(source *qt.QMimeData) bool { + + return (bool)(C.QsciScintilla_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()))) + +} +func (this *QsciScintilla) OnCanInsertFromMimeData(slot func(super func(source *qt.QMimeData) bool, source *qt.QMimeData) bool) { + C.QsciScintilla_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_CanInsertFromMimeData +func miqt_exec_callback_QsciScintilla_CanInsertFromMimeData(self *C.QsciScintilla, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt.QMimeData) bool, source *qt.QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_FromMimeData(source *qt.QMimeData, rectangular *bool) []byte { + + var _bytearray C.struct_miqt_string = C.QsciScintilla_virtualbase_FromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()), (*C.bool)(unsafe.Pointer(rectangular))) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QsciScintilla) OnFromMimeData(slot func(super func(source *qt.QMimeData, rectangular *bool) []byte, source *qt.QMimeData, rectangular *bool) []byte) { + C.QsciScintilla_override_virtual_FromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FromMimeData +func miqt_exec_callback_QsciScintilla_FromMimeData(self *C.QsciScintilla, cb C.intptr_t, source *C.QMimeData, rectangular *C.bool) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt.QMimeData, rectangular *bool) []byte, source *qt.QMimeData, rectangular *bool) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval2 := (*bool)(unsafe.Pointer(rectangular)) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FromMimeData, slotval1, slotval2) + virtualReturn_alias := C.struct_miqt_string{} + virtualReturn_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[0])) + virtualReturn_alias.len = C.size_t(len(virtualReturn)) + + return virtualReturn_alias + +} + +func (this *QsciScintilla) callVirtualBase_ToMimeData(text []byte, rectangular bool) *qt.QMimeData { + text_alias := C.struct_miqt_string{} + text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) + text_alias.len = C.size_t(len(text)) + + return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintilla_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) +} +func (this *QsciScintilla) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt.QMimeData, text []byte, rectangular bool) *qt.QMimeData) { + C.QsciScintilla_override_virtual_ToMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ToMimeData +func miqt_exec_callback_QsciScintilla_ToMimeData(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string, rectangular C.bool) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text []byte, rectangular bool) *qt.QMimeData, text []byte, rectangular bool) *qt.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_bytearray C.struct_miqt_string = text + text_ret := C.GoBytes(unsafe.Pointer(text_bytearray.data), C.int(int64(text_bytearray.len))) + C.free(unsafe.Pointer(text_bytearray.data)) + slotval1 := text_ret + slotval2 := (bool)(rectangular) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_ToMimeData, slotval1, slotval2) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintilla) callVirtualBase_DragEnterEvent(e *qt.QDragEnterEvent) { + + C.QsciScintilla_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDragEnterEvent(slot func(super func(e *qt.QDragEnterEvent), e *qt.QDragEnterEvent)) { + C.QsciScintilla_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DragEnterEvent +func miqt_exec_callback_QsciScintilla_DragEnterEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragEnterEvent), e *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_DragLeaveEvent(e *qt.QDragLeaveEvent) { + + C.QsciScintilla_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDragLeaveEvent(slot func(super func(e *qt.QDragLeaveEvent), e *qt.QDragLeaveEvent)) { + C.QsciScintilla_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DragLeaveEvent +func miqt_exec_callback_QsciScintilla_DragLeaveEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragLeaveEvent), e *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_DragMoveEvent(e *qt.QDragMoveEvent) { + + C.QsciScintilla_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDragMoveEvent(slot func(super func(e *qt.QDragMoveEvent), e *qt.QDragMoveEvent)) { + C.QsciScintilla_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DragMoveEvent +func miqt_exec_callback_QsciScintilla_DragMoveEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragMoveEvent), e *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_DropEvent(e *qt.QDropEvent) { + + C.QsciScintilla_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDropEvent(slot func(super func(e *qt.QDropEvent), e *qt.QDropEvent)) { + C.QsciScintilla_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DropEvent +func miqt_exec_callback_QsciScintilla_DropEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDropEvent), e *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FocusInEvent(e *qt.QFocusEvent) { + + C.QsciScintilla_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnFocusInEvent(slot func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) { + C.QsciScintilla_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FocusInEvent +func miqt_exec_callback_QsciScintilla_FocusInEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FocusOutEvent(e *qt.QFocusEvent) { + + C.QsciScintilla_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnFocusOutEvent(slot func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) { + C.QsciScintilla_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FocusOutEvent +func miqt_exec_callback_QsciScintilla_FocusOutEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QsciScintilla_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QsciScintilla) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QsciScintilla_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FocusNextPrevChild +func miqt_exec_callback_QsciScintilla_FocusNextPrevChild(self *C.QsciScintilla, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_KeyPressEvent(e *qt.QKeyEvent) { + + C.QsciScintilla_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnKeyPressEvent(slot func(super func(e *qt.QKeyEvent), e *qt.QKeyEvent)) { + C.QsciScintilla_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_KeyPressEvent +func miqt_exec_callback_QsciScintilla_KeyPressEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QKeyEvent), e *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_InputMethodEvent(event *qt.QInputMethodEvent) { + + C.QsciScintilla_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(event.UnsafePointer())) + +} +func (this *QsciScintilla) OnInputMethodEvent(slot func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) { + C.QsciScintilla_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_InputMethodEvent +func miqt_exec_callback_QsciScintilla_InputMethodEvent(self *C.QsciScintilla, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_InputMethodQuery(query qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QsciScintilla_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintilla) OnInputMethodQuery(slot func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) { + C.QsciScintilla_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_InputMethodQuery +func miqt_exec_callback_QsciScintilla_InputMethodQuery(self *C.QsciScintilla, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(query) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintilla) callVirtualBase_MouseDoubleClickEvent(e *qt.QMouseEvent) { + + C.QsciScintilla_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMouseDoubleClickEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintilla_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent +func miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_MouseMoveEvent(e *qt.QMouseEvent) { + + C.QsciScintilla_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMouseMoveEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintilla_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MouseMoveEvent +func miqt_exec_callback_QsciScintilla_MouseMoveEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_MousePressEvent(e *qt.QMouseEvent) { + + C.QsciScintilla_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMousePressEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintilla_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MousePressEvent +func miqt_exec_callback_QsciScintilla_MousePressEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_MouseReleaseEvent(e *qt.QMouseEvent) { + + C.QsciScintilla_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMouseReleaseEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintilla_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MouseReleaseEvent +func miqt_exec_callback_QsciScintilla_MouseReleaseEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_PaintEvent(e *qt.QPaintEvent) { + + C.QsciScintilla_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnPaintEvent(slot func(super func(e *qt.QPaintEvent), e *qt.QPaintEvent)) { + C.QsciScintilla_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_PaintEvent +func miqt_exec_callback_QsciScintilla_PaintEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QPaintEvent), e *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ResizeEvent(e *qt.QResizeEvent) { + + C.QsciScintilla_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnResizeEvent(slot func(super func(e *qt.QResizeEvent), e *qt.QResizeEvent)) { + C.QsciScintilla_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ResizeEvent +func miqt_exec_callback_QsciScintilla_ResizeEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QResizeEvent), e *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QsciScintilla_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QsciScintilla) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QsciScintilla_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ScrollContentsBy +func miqt_exec_callback_QsciScintilla_ScrollContentsBy(self *C.QsciScintilla, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + } // Delete this object from C++ memory. func (this *QsciScintilla) Delete() { - C.QsciScintilla_Delete(this.h) + C.QsciScintilla_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.h b/qt-restricted-extras/qscintilla/gen_qsciscintilla.h index 37df6c73..b804e025 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.h +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.h @@ -15,43 +15,83 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QByteArray; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFont; +class QFrame; class QIODevice; class QImage; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPixmap; class QPoint; +class QResizeEvent; +class QVariant; +class QWheelEvent; class QWidget; class QsciCommandSet; class QsciDocument; class QsciLexer; class QsciScintilla; +class QsciScintillaBase; class QsciStyle; class QsciStyledText; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QByteArray QByteArray; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIODevice QIODevice; typedef struct QImage QImage; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QsciCommandSet QsciCommandSet; typedef struct QsciDocument QsciDocument; typedef struct QsciLexer QsciLexer; typedef struct QsciScintilla QsciScintilla; +typedef struct QsciScintillaBase QsciScintillaBase; typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -QsciScintilla* QsciScintilla_new(QWidget* parent); -QsciScintilla* QsciScintilla_new2(); +void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self); void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1); struct miqt_string QsciScintilla_Tr(const char* s); @@ -99,8 +139,8 @@ bool QsciScintilla_EolVisibility(const QsciScintilla* self); int QsciScintilla_ExtraAscent(const QsciScintilla* self); int QsciScintilla_ExtraDescent(const QsciScintilla* self); void QsciScintilla_FillIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber); -bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap); -bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo); +bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11); +bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11); bool QsciScintilla_FindNext(QsciScintilla* self); bool QsciScintilla_FindMatchingBrace(QsciScintilla* self, long* brace, long* other, int mode); int QsciScintilla_FirstVisibleLine(const QsciScintilla* self); @@ -152,7 +192,7 @@ bool QsciScintilla_OverwriteMode(const QsciScintilla* self); QColor* QsciScintilla_Paper(const QsciScintilla* self); int QsciScintilla_PositionFromLineIndex(const QsciScintilla* self, int line, int index); bool QsciScintilla_Read(QsciScintilla* self, QIODevice* io); -void QsciScintilla_Recolor(QsciScintilla* self); +void QsciScintilla_Recolor(QsciScintilla* self, int start, int end); void QsciScintilla_RegisterImage(QsciScintilla* self, int id, QPixmap* pm); void QsciScintilla_RegisterImage2(QsciScintilla* self, int id, QImage* im); void QsciScintilla_Replace(QsciScintilla* self, struct miqt_string replaceStr); @@ -248,7 +288,7 @@ void QsciScintilla_Copy(QsciScintilla* self); void QsciScintilla_Cut(QsciScintilla* self); void QsciScintilla_EnsureCursorVisible(QsciScintilla* self); void QsciScintilla_EnsureLineVisible(QsciScintilla* self, int line); -void QsciScintilla_FoldAll(QsciScintilla* self); +void QsciScintilla_FoldAll(QsciScintilla* self, bool children); void QsciScintilla_FoldLine(QsciScintilla* self, int line); void QsciScintilla_Indent(QsciScintilla* self, int line); void QsciScintilla_Insert(QsciScintilla* self, struct miqt_string text); @@ -260,7 +300,7 @@ void QsciScintilla_RemoveSelectedText(QsciScintilla* self); void QsciScintilla_ReplaceSelectedText(QsciScintilla* self, struct miqt_string text); void QsciScintilla_ResetSelectionBackgroundColor(QsciScintilla* self); void QsciScintilla_ResetSelectionForegroundColor(QsciScintilla* self); -void QsciScintilla_SelectAll(QsciScintilla* self); +void QsciScintilla_SelectAll(QsciScintilla* self, bool selectVal); void QsciScintilla_SelectToMatchingBrace(QsciScintilla* self); void QsciScintilla_SetAutoCompletionCaseSensitivity(QsciScintilla* self, bool cs); void QsciScintilla_SetAutoCompletionReplaceWord(QsciScintilla* self, bool replace); @@ -280,14 +320,14 @@ void QsciScintilla_SetColor(QsciScintilla* self, QColor* c); void QsciScintilla_SetCursorPosition(QsciScintilla* self, int line, int index); void QsciScintilla_SetEolMode(QsciScintilla* self, int mode); void QsciScintilla_SetEolVisibility(QsciScintilla* self, bool visible); -void QsciScintilla_SetFolding(QsciScintilla* self, int fold); +void QsciScintilla_SetFolding(QsciScintilla* self, int fold, int margin); void QsciScintilla_SetIndentation(QsciScintilla* self, int line, int indentation); void QsciScintilla_SetIndentationGuides(QsciScintilla* self, bool enable); void QsciScintilla_SetIndentationGuidesBackgroundColor(QsciScintilla* self, QColor* col); void QsciScintilla_SetIndentationGuidesForegroundColor(QsciScintilla* self, QColor* col); void QsciScintilla_SetIndentationsUseTabs(QsciScintilla* self, bool tabs); void QsciScintilla_SetIndentationWidth(QsciScintilla* self, int width); -void QsciScintilla_SetLexer(QsciScintilla* self); +void QsciScintilla_SetLexer(QsciScintilla* self, QsciLexer* lexer); void QsciScintilla_SetMarginsBackgroundColor(QsciScintilla* self, QColor* col); void QsciScintilla_SetMarginsFont(QsciScintilla* self, QFont* f); void QsciScintilla_SetMarginsForegroundColor(QsciScintilla* self, QColor* col); @@ -339,21 +379,15 @@ void QsciScintilla_TextChanged(QsciScintilla* self); void QsciScintilla_connect_TextChanged(QsciScintilla* self, intptr_t slot); void QsciScintilla_UserListActivated(QsciScintilla* self, int id, struct miqt_string stringVal); void QsciScintilla_connect_UserListActivated(QsciScintilla* self, intptr_t slot); +bool QsciScintilla_Event(QsciScintilla* self, QEvent* e); +void QsciScintilla_ChangeEvent(QsciScintilla* self, QEvent* e); +void QsciScintilla_ContextMenuEvent(QsciScintilla* self, QContextMenuEvent* e); +void QsciScintilla_WheelEvent(QsciScintilla* self, QWheelEvent* e); struct miqt_string QsciScintilla_Tr2(const char* s, const char* c); struct miqt_string QsciScintilla_Tr3(const char* s, const char* c, int n); struct miqt_string QsciScintilla_TrUtf82(const char* s, const char* c); struct miqt_string QsciScintilla_TrUtf83(const char* s, const char* c, int n); void QsciScintilla_ClearAnnotations1(QsciScintilla* self, int line); -bool QsciScintilla_FindFirst6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward); -bool QsciScintilla_FindFirst7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line); -bool QsciScintilla_FindFirst8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index); -bool QsciScintilla_FindFirst9(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show); -bool QsciScintilla_FindFirst10(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix); -bool QsciScintilla_FindFirst11(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11); -bool QsciScintilla_FindFirstInSelection5(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward); -bool QsciScintilla_FindFirstInSelection6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show); -bool QsciScintilla_FindFirstInSelection7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix); -bool QsciScintilla_FindFirstInSelection8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11); int QsciScintilla_IndicatorDefine2(QsciScintilla* self, int style, int indicatorNumber); int QsciScintilla_MarkerDefine2(QsciScintilla* self, int sym, int markerNumber); int QsciScintilla_MarkerDefine22(QsciScintilla* self, char ch, int markerNumber); @@ -361,8 +395,6 @@ int QsciScintilla_MarkerDefine23(QsciScintilla* self, QPixmap* pm, int markerNum int QsciScintilla_MarkerDefine24(QsciScintilla* self, QImage* im, int markerNumber); void QsciScintilla_MarkerDelete2(QsciScintilla* self, int linenr, int markerNumber); void QsciScintilla_MarkerDeleteAll1(QsciScintilla* self, int markerNumber); -void QsciScintilla_Recolor1(QsciScintilla* self, int start); -void QsciScintilla_Recolor2(QsciScintilla* self, int start, int end); void QsciScintilla_SetIndicatorDrawUnder2(QsciScintilla* self, bool under, int indicatorNumber); void QsciScintilla_SetIndicatorForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber); void QsciScintilla_SetIndicatorHoverForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber); @@ -373,11 +405,221 @@ void QsciScintilla_SetMarkerBackgroundColor2(QsciScintilla* self, QColor* col, i void QsciScintilla_SetMarkerForegroundColor2(QsciScintilla* self, QColor* col, int markerNumber); void QsciScintilla_SetWrapVisualFlags2(QsciScintilla* self, int endFlag, int startFlag); void QsciScintilla_SetWrapVisualFlags3(QsciScintilla* self, int endFlag, int startFlag, int indent); -void QsciScintilla_FoldAll1(QsciScintilla* self, bool children); -void QsciScintilla_SelectAll1(QsciScintilla* self, bool selectVal); -void QsciScintilla_SetFolding2(QsciScintilla* self, int fold, int margin); -void QsciScintilla_SetLexer1(QsciScintilla* self, QsciLexer* lexer); -void QsciScintilla_Delete(QsciScintilla* self); +void QsciScintilla_override_virtual_ApiContext(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciScintilla_virtualbase_ApiContext(void* self, int pos, int* context_start, int* last_word_start); +void QsciScintilla_override_virtual_FindFirst(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FindFirst(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11); +void QsciScintilla_override_virtual_FindFirstInSelection(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FindFirstInSelection(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11); +void QsciScintilla_override_virtual_FindNext(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FindNext(void* self); +void QsciScintilla_override_virtual_Recolor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Recolor(void* self, int start, int end); +void QsciScintilla_override_virtual_Replace(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Replace(void* self, struct miqt_string replaceStr); +void QsciScintilla_override_virtual_Append(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Append(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_AutoCompleteFromAll(void* self, intptr_t slot); +void QsciScintilla_virtualbase_AutoCompleteFromAll(void* self); +void QsciScintilla_override_virtual_AutoCompleteFromAPIs(void* self, intptr_t slot); +void QsciScintilla_virtualbase_AutoCompleteFromAPIs(void* self); +void QsciScintilla_override_virtual_AutoCompleteFromDocument(void* self, intptr_t slot); +void QsciScintilla_virtualbase_AutoCompleteFromDocument(void* self); +void QsciScintilla_override_virtual_CallTip(void* self, intptr_t slot); +void QsciScintilla_virtualbase_CallTip(void* self); +void QsciScintilla_override_virtual_Clear(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Clear(void* self); +void QsciScintilla_override_virtual_Copy(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Copy(void* self); +void QsciScintilla_override_virtual_Cut(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Cut(void* self); +void QsciScintilla_override_virtual_EnsureCursorVisible(void* self, intptr_t slot); +void QsciScintilla_virtualbase_EnsureCursorVisible(void* self); +void QsciScintilla_override_virtual_EnsureLineVisible(void* self, intptr_t slot); +void QsciScintilla_virtualbase_EnsureLineVisible(void* self, int line); +void QsciScintilla_override_virtual_FoldAll(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FoldAll(void* self, bool children); +void QsciScintilla_override_virtual_FoldLine(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FoldLine(void* self, int line); +void QsciScintilla_override_virtual_Indent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Indent(void* self, int line); +void QsciScintilla_override_virtual_Insert(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Insert(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_InsertAt(void* self, intptr_t slot); +void QsciScintilla_virtualbase_InsertAt(void* self, struct miqt_string text, int line, int index); +void QsciScintilla_override_virtual_MoveToMatchingBrace(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MoveToMatchingBrace(void* self); +void QsciScintilla_override_virtual_Paste(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Paste(void* self); +void QsciScintilla_override_virtual_Redo(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Redo(void* self); +void QsciScintilla_override_virtual_RemoveSelectedText(void* self, intptr_t slot); +void QsciScintilla_virtualbase_RemoveSelectedText(void* self); +void QsciScintilla_override_virtual_ReplaceSelectedText(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ReplaceSelectedText(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_ResetSelectionBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ResetSelectionBackgroundColor(void* self); +void QsciScintilla_override_virtual_ResetSelectionForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ResetSelectionForegroundColor(void* self); +void QsciScintilla_override_virtual_SelectAll(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SelectAll(void* self, bool selectVal); +void QsciScintilla_override_virtual_SelectToMatchingBrace(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SelectToMatchingBrace(void* self); +void QsciScintilla_override_virtual_SetAutoCompletionCaseSensitivity(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionCaseSensitivity(void* self, bool cs); +void QsciScintilla_override_virtual_SetAutoCompletionReplaceWord(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionReplaceWord(void* self, bool replace); +void QsciScintilla_override_virtual_SetAutoCompletionShowSingle(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionShowSingle(void* self, bool single); +void QsciScintilla_override_virtual_SetAutoCompletionSource(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionSource(void* self, int source); +void QsciScintilla_override_virtual_SetAutoCompletionThreshold(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionThreshold(void* self, int thresh); +void QsciScintilla_override_virtual_SetAutoCompletionUseSingle(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionUseSingle(void* self, int single); +void QsciScintilla_override_virtual_SetAutoIndent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoIndent(void* self, bool autoindent); +void QsciScintilla_override_virtual_SetBraceMatching(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetBraceMatching(void* self, int bm); +void QsciScintilla_override_virtual_SetBackspaceUnindents(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetBackspaceUnindents(void* self, bool unindent); +void QsciScintilla_override_virtual_SetCaretForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetCaretLineBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretLineBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetCaretLineFrameWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretLineFrameWidth(void* self, int width); +void QsciScintilla_override_virtual_SetCaretLineVisible(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretLineVisible(void* self, bool enable); +void QsciScintilla_override_virtual_SetCaretWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretWidth(void* self, int width); +void QsciScintilla_override_virtual_SetColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetColor(void* self, QColor* c); +void QsciScintilla_override_virtual_SetCursorPosition(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCursorPosition(void* self, int line, int index); +void QsciScintilla_override_virtual_SetEolMode(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetEolMode(void* self, int mode); +void QsciScintilla_override_virtual_SetEolVisibility(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetEolVisibility(void* self, bool visible); +void QsciScintilla_override_virtual_SetFolding(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetFolding(void* self, int fold, int margin); +void QsciScintilla_override_virtual_SetIndentation(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentation(void* self, int line, int indentation); +void QsciScintilla_override_virtual_SetIndentationGuides(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationGuides(void* self, bool enable); +void QsciScintilla_override_virtual_SetIndentationGuidesBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationGuidesBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetIndentationGuidesForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationGuidesForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetIndentationsUseTabs(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationsUseTabs(void* self, bool tabs); +void QsciScintilla_override_virtual_SetIndentationWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationWidth(void* self, int width); +void QsciScintilla_override_virtual_SetLexer(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetLexer(void* self, QsciLexer* lexer); +void QsciScintilla_override_virtual_SetMarginsBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginsBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetMarginsFont(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginsFont(void* self, QFont* f); +void QsciScintilla_override_virtual_SetMarginsForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginsForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetMarginLineNumbers(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginLineNumbers(void* self, int margin, bool lnrs); +void QsciScintilla_override_virtual_SetMarginMarkerMask(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginMarkerMask(void* self, int margin, int mask); +void QsciScintilla_override_virtual_SetMarginSensitivity(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginSensitivity(void* self, int margin, bool sens); +void QsciScintilla_override_virtual_SetMarginWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginWidth(void* self, int margin, int width); +void QsciScintilla_override_virtual_SetMarginWidth2(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginWidth2(void* self, int margin, struct miqt_string s); +void QsciScintilla_override_virtual_SetModified(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetModified(void* self, bool m); +void QsciScintilla_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetPaper(void* self, QColor* c); +void QsciScintilla_override_virtual_SetReadOnly(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetReadOnly(void* self, bool ro); +void QsciScintilla_override_virtual_SetSelection(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetSelection(void* self, int lineFrom, int indexFrom, int lineTo, int indexTo); +void QsciScintilla_override_virtual_SetSelectionBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetSelectionBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetSelectionForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetSelectionForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetTabIndents(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetTabIndents(void* self, bool indent); +void QsciScintilla_override_virtual_SetTabWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetTabWidth(void* self, int width); +void QsciScintilla_override_virtual_SetText(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetText(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_SetUtf8(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetUtf8(void* self, bool cp); +void QsciScintilla_override_virtual_SetWhitespaceVisibility(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetWhitespaceVisibility(void* self, int mode); +void QsciScintilla_override_virtual_SetWrapMode(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetWrapMode(void* self, int mode); +void QsciScintilla_override_virtual_Undo(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Undo(void* self); +void QsciScintilla_override_virtual_Unindent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Unindent(void* self, int line); +void QsciScintilla_override_virtual_ZoomIn(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomIn(void* self, int rangeVal); +void QsciScintilla_override_virtual_ZoomIn2(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomIn2(void* self); +void QsciScintilla_override_virtual_ZoomOut(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomOut(void* self, int rangeVal); +void QsciScintilla_override_virtual_ZoomOut2(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomOut2(void* self); +void QsciScintilla_override_virtual_ZoomTo(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomTo(void* self, int size); +void QsciScintilla_override_virtual_Event(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_Event(void* self, QEvent* e); +void QsciScintilla_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ChangeEvent(void* self, QEvent* e); +void QsciScintilla_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QsciScintilla_override_virtual_WheelEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QsciScintilla_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QsciScintilla_override_virtual_FromMimeData(void* self, intptr_t slot); +struct miqt_string QsciScintilla_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular); +void QsciScintilla_override_virtual_ToMimeData(void* self, intptr_t slot); +QMimeData* QsciScintilla_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular); +void QsciScintilla_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QsciScintilla_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QsciScintilla_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QsciScintilla_override_virtual_DropEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DropEvent(void* self, QDropEvent* e); +void QsciScintilla_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QsciScintilla_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QsciScintilla_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FocusNextPrevChild(void* self, bool next); +void QsciScintilla_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QsciScintilla_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QsciScintilla_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QsciScintilla_virtualbase_InputMethodQuery(const void* self, int query); +void QsciScintilla_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_PaintEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QsciScintilla_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QsciScintilla_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QsciScintilla_Delete(QsciScintilla* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp index f6f999bb..dee7efe4 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp @@ -1,25 +1,791 @@ +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include +#include #include +#include #include #include #include #include +#include +#include #include #include #include "gen_qsciscintillabase.h" #include "_cgo_export.h" -QsciScintillaBase* QsciScintillaBase_new(QWidget* parent) { - return new QsciScintillaBase(parent); +class MiqtVirtualQsciScintillaBase : public virtual QsciScintillaBase { +public: + + MiqtVirtualQsciScintillaBase(QWidget* parent): QsciScintillaBase(parent) {}; + MiqtVirtualQsciScintillaBase(): QsciScintillaBase() {}; + + virtual ~MiqtVirtualQsciScintillaBase() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QsciScintillaBase::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QsciScintillaBase::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray fromMimeData(const QMimeData* source, bool& rectangular) const override { + if (handle__FromMimeData == 0) { + return QsciScintillaBase::fromMimeData(source, rectangular); + } + + QMimeData* sigval1 = (QMimeData*) source; + bool* sigval2 = &rectangular; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciScintillaBase_FromMimeData(const_cast(this), handle__FromMimeData, sigval1, sigval2); + QByteArray callback_return_value_QByteArray(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QByteArray; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FromMimeData(QMimeData* source, bool* rectangular) const { + + QByteArray _qb = QsciScintillaBase::fromMimeData(source, *rectangular); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ToMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* toMimeData(const QByteArray& text, bool rectangular) const override { + if (handle__ToMimeData == 0) { + return QsciScintillaBase::toMimeData(text, rectangular); + } + + const QByteArray text_qb = text; + struct miqt_string text_ms; + text_ms.len = text_qb.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_qb.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + bool sigval2 = rectangular; + + QMimeData* callback_return_value = miqt_exec_callback_QsciScintillaBase_ToMimeData(const_cast(this), handle__ToMimeData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_ToMimeData(struct miqt_string text, bool rectangular) const { + QByteArray text_QByteArray(text.data, text.len); + + return QsciScintillaBase::toMimeData(text_QByteArray, rectangular); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QsciScintillaBase::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QsciScintillaBase::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QsciScintillaBase::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QsciScintillaBase::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QsciScintillaBase::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QsciScintillaBase::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QsciScintillaBase::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QsciScintillaBase::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QsciScintillaBase::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QsciScintillaBase::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QsciScintillaBase::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QsciScintillaBase::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QsciScintillaBase::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QsciScintillaBase::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QsciScintillaBase::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QsciScintillaBase::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QsciScintillaBase::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QsciScintillaBase::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QsciScintillaBase::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QsciScintillaBase::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QsciScintillaBase::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QsciScintillaBase_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QsciScintillaBase::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QsciScintillaBase::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QsciScintillaBase_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QsciScintillaBase::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QsciScintillaBase::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QsciScintillaBase::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QsciScintillaBase::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QsciScintillaBase::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QsciScintillaBase::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QsciScintillaBase::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QsciScintillaBase::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QsciScintillaBase::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QsciScintillaBase::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QsciScintillaBase::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QsciScintillaBase::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QsciScintillaBase::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QsciScintillaBase::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QsciScintillaBase_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QsciScintillaBase::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QsciScintillaBase::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QsciScintillaBase_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QsciScintillaBase::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QsciScintillaBase::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QsciScintillaBase_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QsciScintillaBase::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QsciScintillaBase::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QsciScintillaBase_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QsciScintillaBase::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QsciScintillaBase::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QsciScintillaBase::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QsciScintillaBase::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QsciScintillaBase::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QsciScintillaBase::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QsciScintillaBase::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QsciScintillaBase::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QsciScintillaBase_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QsciScintillaBase::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QsciScintillaBase::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QsciScintillaBase_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QsciScintillaBase::viewportSizeHint()); + + } + +}; + +void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(parent); + *outptr_QsciScintillaBase = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QsciScintillaBase* QsciScintillaBase_new2() { - return new QsciScintillaBase(); +void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(); + *outptr_QsciScintillaBase = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self) { @@ -129,7 +895,7 @@ void QsciScintillaBase_QSCN_SELCHANGED(QsciScintillaBase* self, bool yes) { } void QsciScintillaBase_connect_QSCN_SELCHANGED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::QSCN_SELCHANGED), self, [=](bool yes) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::QSCN_SELCHANGED), self, [=](bool yes) { bool sigval1 = yes; miqt_exec_callback_QsciScintillaBase_QSCN_SELCHANGED(slot, sigval1); }); @@ -140,7 +906,7 @@ void QsciScintillaBase_SCN_AUTOCCANCELLED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_AUTOCCANCELLED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCANCELLED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCANCELLED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_AUTOCCANCELLED(slot); }); } @@ -150,7 +916,7 @@ void QsciScintillaBase_SCN_AUTOCCHARDELETED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_AUTOCCHARDELETED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCHARDELETED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCHARDELETED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_AUTOCCHARDELETED(slot); }); } @@ -160,7 +926,7 @@ void QsciScintillaBase_SCN_AUTOCCOMPLETED(QsciScintillaBase* self, const char* s } void QsciScintillaBase_connect_SCN_AUTOCCOMPLETED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCOMPLETED), self, [=](const char* selection, int position, int ch, int method) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCOMPLETED), self, [=](const char* selection, int position, int ch, int method) { const char* sigval1 = (const char*) selection; int sigval2 = position; int sigval3 = ch; @@ -174,7 +940,7 @@ void QsciScintillaBase_SCN_AUTOCSELECTION(QsciScintillaBase* self, const char* s } void QsciScintillaBase_connect_SCN_AUTOCSELECTION(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position, int ch, int method) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position, int ch, int method) { const char* sigval1 = (const char*) selection; int sigval2 = position; int sigval3 = ch; @@ -188,7 +954,7 @@ void QsciScintillaBase_SCN_AUTOCSELECTION2(QsciScintillaBase* self, const char* } void QsciScintillaBase_connect_SCN_AUTOCSELECTION2(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position) { const char* sigval1 = (const char*) selection; int sigval2 = position; miqt_exec_callback_QsciScintillaBase_SCN_AUTOCSELECTION2(slot, sigval1, sigval2); @@ -200,7 +966,7 @@ void QsciScintillaBase_SCN_AUTOCSELECTIONCHANGE(QsciScintillaBase* self, const c } void QsciScintillaBase_connect_SCN_AUTOCSELECTIONCHANGE(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTIONCHANGE), self, [=](const char* selection, int id, int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTIONCHANGE), self, [=](const char* selection, int id, int position) { const char* sigval1 = (const char*) selection; int sigval2 = id; int sigval3 = position; @@ -213,7 +979,7 @@ void QsciScintillaBase_SCEN_CHANGE(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCEN_CHANGE(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCEN_CHANGE), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCEN_CHANGE), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCEN_CHANGE(slot); }); } @@ -223,7 +989,7 @@ void QsciScintillaBase_SCN_CALLTIPCLICK(QsciScintillaBase* self, int direction) } void QsciScintillaBase_connect_SCN_CALLTIPCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CALLTIPCLICK), self, [=](int direction) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CALLTIPCLICK), self, [=](int direction) { int sigval1 = direction; miqt_exec_callback_QsciScintillaBase_SCN_CALLTIPCLICK(slot, sigval1); }); @@ -234,7 +1000,7 @@ void QsciScintillaBase_SCN_CHARADDED(QsciScintillaBase* self, int charadded) { } void QsciScintillaBase_connect_SCN_CHARADDED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CHARADDED), self, [=](int charadded) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CHARADDED), self, [=](int charadded) { int sigval1 = charadded; miqt_exec_callback_QsciScintillaBase_SCN_CHARADDED(slot, sigval1); }); @@ -245,7 +1011,7 @@ void QsciScintillaBase_SCN_DOUBLECLICK(QsciScintillaBase* self, int position, in } void QsciScintillaBase_connect_SCN_DOUBLECLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DOUBLECLICK), self, [=](int position, int line, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DOUBLECLICK), self, [=](int position, int line, int modifiers) { int sigval1 = position; int sigval2 = line; int sigval3 = modifiers; @@ -258,7 +1024,7 @@ void QsciScintillaBase_SCN_DWELLEND(QsciScintillaBase* self, int position, int x } void QsciScintillaBase_connect_SCN_DWELLEND(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLEND), self, [=](int position, int x, int y) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLEND), self, [=](int position, int x, int y) { int sigval1 = position; int sigval2 = x; int sigval3 = y; @@ -271,7 +1037,7 @@ void QsciScintillaBase_SCN_DWELLSTART(QsciScintillaBase* self, int position, int } void QsciScintillaBase_connect_SCN_DWELLSTART(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLSTART), self, [=](int position, int x, int y) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLSTART), self, [=](int position, int x, int y) { int sigval1 = position; int sigval2 = x; int sigval3 = y; @@ -284,7 +1050,7 @@ void QsciScintillaBase_SCN_FOCUSIN(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_FOCUSIN(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSIN), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSIN), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_FOCUSIN(slot); }); } @@ -294,7 +1060,7 @@ void QsciScintillaBase_SCN_FOCUSOUT(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_FOCUSOUT(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSOUT), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSOUT), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_FOCUSOUT(slot); }); } @@ -304,7 +1070,7 @@ void QsciScintillaBase_SCN_HOTSPOTCLICK(QsciScintillaBase* self, int position, i } void QsciScintillaBase_connect_SCN_HOTSPOTCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTCLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTCLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_HOTSPOTCLICK(slot, sigval1, sigval2); @@ -316,7 +1082,7 @@ void QsciScintillaBase_SCN_HOTSPOTDOUBLECLICK(QsciScintillaBase* self, int posit } void QsciScintillaBase_connect_SCN_HOTSPOTDOUBLECLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTDOUBLECLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTDOUBLECLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_HOTSPOTDOUBLECLICK(slot, sigval1, sigval2); @@ -328,7 +1094,7 @@ void QsciScintillaBase_SCN_HOTSPOTRELEASECLICK(QsciScintillaBase* self, int posi } void QsciScintillaBase_connect_SCN_HOTSPOTRELEASECLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTRELEASECLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTRELEASECLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_HOTSPOTRELEASECLICK(slot, sigval1, sigval2); @@ -340,7 +1106,7 @@ void QsciScintillaBase_SCN_INDICATORCLICK(QsciScintillaBase* self, int position, } void QsciScintillaBase_connect_SCN_INDICATORCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORCLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORCLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_INDICATORCLICK(slot, sigval1, sigval2); @@ -352,7 +1118,7 @@ void QsciScintillaBase_SCN_INDICATORRELEASE(QsciScintillaBase* self, int positio } void QsciScintillaBase_connect_SCN_INDICATORRELEASE(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORRELEASE), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORRELEASE), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_INDICATORRELEASE(slot, sigval1, sigval2); @@ -364,7 +1130,7 @@ void QsciScintillaBase_SCN_MACRORECORD(QsciScintillaBase* self, unsigned int par } void QsciScintillaBase_connect_SCN_MACRORECORD(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MACRORECORD), self, [=](unsigned int param1, unsigned long param2, void* param3) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MACRORECORD), self, [=](unsigned int param1, unsigned long param2, void* param3) { unsigned int sigval1 = param1; unsigned long sigval2 = param2; void* sigval3 = param3; @@ -377,7 +1143,7 @@ void QsciScintillaBase_SCN_MARGINCLICK(QsciScintillaBase* self, int position, in } void QsciScintillaBase_connect_SCN_MARGINCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINCLICK), self, [=](int position, int modifiers, int margin) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINCLICK), self, [=](int position, int modifiers, int margin) { int sigval1 = position; int sigval2 = modifiers; int sigval3 = margin; @@ -390,7 +1156,7 @@ void QsciScintillaBase_SCN_MARGINRIGHTCLICK(QsciScintillaBase* self, int positio } void QsciScintillaBase_connect_SCN_MARGINRIGHTCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINRIGHTCLICK), self, [=](int position, int modifiers, int margin) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINRIGHTCLICK), self, [=](int position, int modifiers, int margin) { int sigval1 = position; int sigval2 = modifiers; int sigval3 = margin; @@ -403,7 +1169,7 @@ void QsciScintillaBase_SCN_MODIFIED(QsciScintillaBase* self, int param1, int par } void QsciScintillaBase_connect_SCN_MODIFIED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFIED), self, [=](int param1, int param2, const char* param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFIED), self, [=](int param1, int param2, const char* param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10) { int sigval1 = param1; int sigval2 = param2; const char* sigval3 = (const char*) param3; @@ -423,7 +1189,7 @@ void QsciScintillaBase_SCN_MODIFYATTEMPTRO(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_MODIFYATTEMPTRO(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFYATTEMPTRO), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFYATTEMPTRO), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_MODIFYATTEMPTRO(slot); }); } @@ -433,7 +1199,7 @@ void QsciScintillaBase_SCN_NEEDSHOWN(QsciScintillaBase* self, int param1, int pa } void QsciScintillaBase_connect_SCN_NEEDSHOWN(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_NEEDSHOWN), self, [=](int param1, int param2) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_NEEDSHOWN), self, [=](int param1, int param2) { int sigval1 = param1; int sigval2 = param2; miqt_exec_callback_QsciScintillaBase_SCN_NEEDSHOWN(slot, sigval1, sigval2); @@ -445,7 +1211,7 @@ void QsciScintillaBase_SCN_PAINTED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_PAINTED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_PAINTED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_PAINTED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_PAINTED(slot); }); } @@ -455,7 +1221,7 @@ void QsciScintillaBase_SCN_SAVEPOINTLEFT(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_SAVEPOINTLEFT(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTLEFT), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTLEFT), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_SAVEPOINTLEFT(slot); }); } @@ -465,7 +1231,7 @@ void QsciScintillaBase_SCN_SAVEPOINTREACHED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_SAVEPOINTREACHED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTREACHED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTREACHED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_SAVEPOINTREACHED(slot); }); } @@ -475,7 +1241,7 @@ void QsciScintillaBase_SCN_STYLENEEDED(QsciScintillaBase* self, int position) { } void QsciScintillaBase_connect_SCN_STYLENEEDED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_STYLENEEDED), self, [=](int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_STYLENEEDED), self, [=](int position) { int sigval1 = position; miqt_exec_callback_QsciScintillaBase_SCN_STYLENEEDED(slot, sigval1); }); @@ -486,7 +1252,7 @@ void QsciScintillaBase_SCN_URIDROPPED(QsciScintillaBase* self, QUrl* url) { } void QsciScintillaBase_connect_SCN_URIDROPPED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_URIDROPPED), self, [=](const QUrl& url) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_URIDROPPED), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -499,7 +1265,7 @@ void QsciScintillaBase_SCN_UPDATEUI(QsciScintillaBase* self, int updated) { } void QsciScintillaBase_connect_SCN_UPDATEUI(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_UPDATEUI), self, [=](int updated) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_UPDATEUI), self, [=](int updated) { int sigval1 = updated; miqt_exec_callback_QsciScintillaBase_SCN_UPDATEUI(slot, sigval1); }); @@ -510,7 +1276,7 @@ void QsciScintillaBase_SCN_USERLISTSELECTION(QsciScintillaBase* self, const char } void QsciScintillaBase_connect_SCN_USERLISTSELECTION(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method, int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method, int position) { const char* sigval1 = (const char*) selection; int sigval2 = id; int sigval3 = ch; @@ -525,7 +1291,7 @@ void QsciScintillaBase_SCN_USERLISTSELECTION2(QsciScintillaBase* self, const cha } void QsciScintillaBase_connect_SCN_USERLISTSELECTION2(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method) { const char* sigval1 = (const char*) selection; int sigval2 = id; int sigval3 = ch; @@ -539,7 +1305,7 @@ void QsciScintillaBase_SCN_USERLISTSELECTION3(QsciScintillaBase* self, const cha } void QsciScintillaBase_connect_SCN_USERLISTSELECTION3(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id) { const char* sigval1 = (const char*) selection; int sigval2 = id; miqt_exec_callback_QsciScintillaBase_SCN_USERLISTSELECTION3(slot, sigval1, sigval2); @@ -551,7 +1317,7 @@ void QsciScintillaBase_SCN_ZOOM(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_ZOOM(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_ZOOM), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_ZOOM), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_ZOOM(slot); }); } @@ -608,7 +1374,251 @@ long QsciScintillaBase_SendScintilla32(const QsciScintillaBase* self, unsigned i return self->SendScintilla(static_cast(msg), static_cast(wParam), static_cast(lParam)); } -void QsciScintillaBase_Delete(QsciScintillaBase* self) { - delete self; +void QsciScintillaBase_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__CanInsertFromMimeData = slot; +} + +bool QsciScintillaBase_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_CanInsertFromMimeData(source); +} + +void QsciScintillaBase_override_virtual_FromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FromMimeData = slot; +} + +struct miqt_string QsciScintillaBase_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FromMimeData(source, rectangular); +} + +void QsciScintillaBase_override_virtual_ToMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ToMimeData = slot; +} + +QMimeData* QsciScintillaBase_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ToMimeData(text, rectangular); +} + +void QsciScintillaBase_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ChangeEvent = slot; +} + +void QsciScintillaBase_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ChangeEvent(e); +} + +void QsciScintillaBase_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ContextMenuEvent = slot; +} + +void QsciScintillaBase_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QsciScintillaBase_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DragEnterEvent = slot; +} + +void QsciScintillaBase_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QsciScintillaBase_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DragLeaveEvent = slot; +} + +void QsciScintillaBase_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QsciScintillaBase_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DragMoveEvent = slot; +} + +void QsciScintillaBase_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QsciScintillaBase_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DropEvent = slot; +} + +void QsciScintillaBase_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DropEvent(e); +} + +void QsciScintillaBase_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FocusInEvent = slot; +} + +void QsciScintillaBase_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FocusInEvent(e); +} + +void QsciScintillaBase_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FocusOutEvent = slot; +} + +void QsciScintillaBase_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QsciScintillaBase_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QsciScintillaBase_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QsciScintillaBase_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__KeyPressEvent = slot; +} + +void QsciScintillaBase_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QsciScintillaBase_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__InputMethodEvent = slot; +} + +void QsciScintillaBase_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QsciScintillaBase_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QsciScintillaBase_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QsciScintillaBase_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QsciScintillaBase_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QsciScintillaBase_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MouseMoveEvent = slot; +} + +void QsciScintillaBase_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QsciScintillaBase_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MousePressEvent = slot; +} + +void QsciScintillaBase_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MousePressEvent(e); +} + +void QsciScintillaBase_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QsciScintillaBase_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QsciScintillaBase_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__PaintEvent = slot; +} + +void QsciScintillaBase_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_PaintEvent(e); +} + +void QsciScintillaBase_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ResizeEvent = slot; +} + +void QsciScintillaBase_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ResizeEvent(e); +} + +void QsciScintillaBase_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ScrollContentsBy = slot; +} + +void QsciScintillaBase_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QsciScintillaBase_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QsciScintillaBase_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QsciScintillaBase_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__SizeHint = slot; +} + +QSize* QsciScintillaBase_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_SizeHint(); +} + +void QsciScintillaBase_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__SetupViewport = slot; +} + +void QsciScintillaBase_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QsciScintillaBase_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__EventFilter = slot; +} + +bool QsciScintillaBase_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QsciScintillaBase_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__Event = slot; +} + +bool QsciScintillaBase_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_Event(param1); +} + +void QsciScintillaBase_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ViewportEvent = slot; +} + +bool QsciScintillaBase_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QsciScintillaBase_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__WheelEvent = slot; +} + +void QsciScintillaBase_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_WheelEvent(param1); +} + +void QsciScintillaBase_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QsciScintillaBase_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QsciScintillaBase_Delete(QsciScintillaBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go index aa5e8383..5aad995a 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go @@ -1187,7 +1187,8 @@ const ( ) type QsciScintillaBase struct { - h *C.QsciScintillaBase + h *C.QsciScintillaBase + isSubclass bool *qt.QAbstractScrollArea } @@ -1205,27 +1206,53 @@ func (this *QsciScintillaBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciScintillaBase(h *C.QsciScintillaBase) *QsciScintillaBase { +// newQsciScintillaBase constructs the type using only CGO pointers. +func newQsciScintillaBase(h *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintillaBase { if h == nil { return nil } - return &QsciScintillaBase{h: h, QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QsciScintillaBase{h: h, + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h_QAbstractScrollArea), unsafe.Pointer(h_QFrame), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQsciScintillaBase(h unsafe.Pointer) *QsciScintillaBase { - return newQsciScintillaBase((*C.QsciScintillaBase)(h)) +// UnsafeNewQsciScintillaBase constructs the type using only unsafe pointers. +func UnsafeNewQsciScintillaBase(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintillaBase { + if h == nil { + return nil + } + + return &QsciScintillaBase{h: (*C.QsciScintillaBase)(h), + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQsciScintillaBase constructs a new QsciScintillaBase object. func NewQsciScintillaBase(parent *qt.QWidget) *QsciScintillaBase { - ret := C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer())) - return newQsciScintillaBase(ret) + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQsciScintillaBase2 constructs a new QsciScintillaBase object. func NewQsciScintillaBase2() *QsciScintillaBase { - ret := C.QsciScintillaBase_new2() - return newQsciScintillaBase(ret) + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintillaBase_new2(&outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QsciScintillaBase) MetaObject() *qt.QMetaObject { @@ -1257,7 +1284,7 @@ func QsciScintillaBase_TrUtf8(s string) string { } func QsciScintillaBase_Pool() *QsciScintillaBase { - return UnsafeNewQsciScintillaBase(unsafe.Pointer(C.QsciScintillaBase_Pool())) + return UnsafeNewQsciScintillaBase(unsafe.Pointer(C.QsciScintillaBase_Pool()), nil, nil, nil, nil, nil) } func (this *QsciScintillaBase) ReplaceHorizontalScrollBar(scrollBar *qt.QScrollBar) { @@ -2192,9 +2219,739 @@ func (this *QsciScintillaBase) SendScintilla32(msg uint, wParam uint64, lParam i return (int64)(C.QsciScintillaBase_SendScintilla32(this.h, (C.uint)(msg), (C.ulong)(wParam), (C.long)(lParam))) } +func (this *QsciScintillaBase) callVirtualBase_CanInsertFromMimeData(source *qt.QMimeData) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnCanInsertFromMimeData(slot func(super func(source *qt.QMimeData) bool, source *qt.QMimeData) bool) { + C.QsciScintillaBase_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData +func miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData(self *C.QsciScintillaBase, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt.QMimeData) bool, source *qt.QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_FromMimeData(source *qt.QMimeData, rectangular *bool) []byte { + + var _bytearray C.struct_miqt_string = C.QsciScintillaBase_virtualbase_FromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()), (*C.bool)(unsafe.Pointer(rectangular))) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QsciScintillaBase) OnFromMimeData(slot func(super func(source *qt.QMimeData, rectangular *bool) []byte, source *qt.QMimeData, rectangular *bool) []byte) { + C.QsciScintillaBase_override_virtual_FromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FromMimeData +func miqt_exec_callback_QsciScintillaBase_FromMimeData(self *C.QsciScintillaBase, cb C.intptr_t, source *C.QMimeData, rectangular *C.bool) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt.QMimeData, rectangular *bool) []byte, source *qt.QMimeData, rectangular *bool) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval2 := (*bool)(unsafe.Pointer(rectangular)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FromMimeData, slotval1, slotval2) + virtualReturn_alias := C.struct_miqt_string{} + virtualReturn_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[0])) + virtualReturn_alias.len = C.size_t(len(virtualReturn)) + + return virtualReturn_alias + +} + +func (this *QsciScintillaBase) callVirtualBase_ToMimeData(text []byte, rectangular bool) *qt.QMimeData { + text_alias := C.struct_miqt_string{} + text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) + text_alias.len = C.size_t(len(text)) + + return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintillaBase_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) +} +func (this *QsciScintillaBase) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt.QMimeData, text []byte, rectangular bool) *qt.QMimeData) { + C.QsciScintillaBase_override_virtual_ToMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ToMimeData +func miqt_exec_callback_QsciScintillaBase_ToMimeData(self *C.QsciScintillaBase, cb C.intptr_t, text C.struct_miqt_string, rectangular C.bool) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text []byte, rectangular bool) *qt.QMimeData, text []byte, rectangular bool) *qt.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_bytearray C.struct_miqt_string = text + text_ret := C.GoBytes(unsafe.Pointer(text_bytearray.data), C.int(int64(text_bytearray.len))) + C.free(unsafe.Pointer(text_bytearray.data)) + slotval1 := text_ret + slotval2 := (bool)(rectangular) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ToMimeData, slotval1, slotval2) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_ChangeEvent(e *qt.QEvent) { + + C.QsciScintillaBase_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnChangeEvent(slot func(super func(e *qt.QEvent), e *qt.QEvent)) { + C.QsciScintillaBase_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ChangeEvent +func miqt_exec_callback_QsciScintillaBase_ChangeEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QEvent), e *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ContextMenuEvent(e *qt.QContextMenuEvent) { + + C.QsciScintillaBase_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnContextMenuEvent(slot func(super func(e *qt.QContextMenuEvent), e *qt.QContextMenuEvent)) { + C.QsciScintillaBase_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ContextMenuEvent +func miqt_exec_callback_QsciScintillaBase_ContextMenuEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QContextMenuEvent), e *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DragEnterEvent(e *qt.QDragEnterEvent) { + + C.QsciScintillaBase_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDragEnterEvent(slot func(super func(e *qt.QDragEnterEvent), e *qt.QDragEnterEvent)) { + C.QsciScintillaBase_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DragEnterEvent +func miqt_exec_callback_QsciScintillaBase_DragEnterEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragEnterEvent), e *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DragLeaveEvent(e *qt.QDragLeaveEvent) { + + C.QsciScintillaBase_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDragLeaveEvent(slot func(super func(e *qt.QDragLeaveEvent), e *qt.QDragLeaveEvent)) { + C.QsciScintillaBase_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DragLeaveEvent +func miqt_exec_callback_QsciScintillaBase_DragLeaveEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragLeaveEvent), e *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DragMoveEvent(e *qt.QDragMoveEvent) { + + C.QsciScintillaBase_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDragMoveEvent(slot func(super func(e *qt.QDragMoveEvent), e *qt.QDragMoveEvent)) { + C.QsciScintillaBase_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DragMoveEvent +func miqt_exec_callback_QsciScintillaBase_DragMoveEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragMoveEvent), e *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DropEvent(e *qt.QDropEvent) { + + C.QsciScintillaBase_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDropEvent(slot func(super func(e *qt.QDropEvent), e *qt.QDropEvent)) { + C.QsciScintillaBase_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DropEvent +func miqt_exec_callback_QsciScintillaBase_DropEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDropEvent), e *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_FocusInEvent(e *qt.QFocusEvent) { + + C.QsciScintillaBase_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnFocusInEvent(slot func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) { + C.QsciScintillaBase_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FocusInEvent +func miqt_exec_callback_QsciScintillaBase_FocusInEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_FocusOutEvent(e *qt.QFocusEvent) { + + C.QsciScintillaBase_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnFocusOutEvent(slot func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) { + C.QsciScintillaBase_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FocusOutEvent +func miqt_exec_callback_QsciScintillaBase_FocusOutEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QFocusEvent), e *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QsciScintillaBase) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QsciScintillaBase_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FocusNextPrevChild +func miqt_exec_callback_QsciScintillaBase_FocusNextPrevChild(self *C.QsciScintillaBase, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_KeyPressEvent(e *qt.QKeyEvent) { + + C.QsciScintillaBase_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnKeyPressEvent(slot func(super func(e *qt.QKeyEvent), e *qt.QKeyEvent)) { + C.QsciScintillaBase_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_KeyPressEvent +func miqt_exec_callback_QsciScintillaBase_KeyPressEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QKeyEvent), e *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_InputMethodEvent(event *qt.QInputMethodEvent) { + + C.QsciScintillaBase_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(event.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnInputMethodEvent(slot func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) { + C.QsciScintillaBase_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_InputMethodEvent +func miqt_exec_callback_QsciScintillaBase_InputMethodEvent(self *C.QsciScintillaBase, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QInputMethodEvent), event *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_InputMethodQuery(query qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QsciScintillaBase_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnInputMethodQuery(slot func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) { + C.QsciScintillaBase_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_InputMethodQuery +func miqt_exec_callback_QsciScintillaBase_InputMethodQuery(self *C.QsciScintillaBase, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(query) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_MouseDoubleClickEvent(e *qt.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMouseDoubleClickEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent +func miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_MouseMoveEvent(e *qt.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMouseMoveEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MouseMoveEvent +func miqt_exec_callback_QsciScintillaBase_MouseMoveEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_MousePressEvent(e *qt.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMousePressEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MousePressEvent +func miqt_exec_callback_QsciScintillaBase_MousePressEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_MouseReleaseEvent(e *qt.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMouseReleaseEvent(slot func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent +func miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QMouseEvent), e *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_PaintEvent(e *qt.QPaintEvent) { + + C.QsciScintillaBase_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnPaintEvent(slot func(super func(e *qt.QPaintEvent), e *qt.QPaintEvent)) { + C.QsciScintillaBase_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_PaintEvent +func miqt_exec_callback_QsciScintillaBase_PaintEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QPaintEvent), e *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ResizeEvent(e *qt.QResizeEvent) { + + C.QsciScintillaBase_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnResizeEvent(slot func(super func(e *qt.QResizeEvent), e *qt.QResizeEvent)) { + C.QsciScintillaBase_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ResizeEvent +func miqt_exec_callback_QsciScintillaBase_ResizeEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QResizeEvent), e *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QsciScintillaBase_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QsciScintillaBase) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QsciScintillaBase_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ScrollContentsBy +func miqt_exec_callback_QsciScintillaBase_ScrollContentsBy(self *C.QsciScintillaBase, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QsciScintillaBase) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QsciScintillaBase_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QsciScintillaBase_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MinimumSizeHint +func miqt_exec_callback_QsciScintillaBase_MinimumSizeHint(self *C.QsciScintillaBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QsciScintillaBase_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QsciScintillaBase_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_SizeHint +func miqt_exec_callback_QsciScintillaBase_SizeHint(self *C.QsciScintillaBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_SetupViewport(viewport *qt.QWidget) { + + C.QsciScintillaBase_virtualbase_SetupViewport(unsafe.Pointer(this.h), (*C.QWidget)(viewport.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnSetupViewport(slot func(super func(viewport *qt.QWidget), viewport *qt.QWidget)) { + C.QsciScintillaBase_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_SetupViewport +func miqt_exec_callback_QsciScintillaBase_SetupViewport(self *C.QsciScintillaBase, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *qt.QWidget), viewport *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_EventFilter(param1 *qt.QObject, param2 *qt.QEvent) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnEventFilter(slot func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) { + C.QsciScintillaBase_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_EventFilter +func miqt_exec_callback_QsciScintillaBase_EventFilter(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QsciScintillaBase_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_Event +func miqt_exec_callback_QsciScintillaBase_Event(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_ViewportEvent(param1 *qt.QEvent) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_ViewportEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnViewportEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QsciScintillaBase_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ViewportEvent +func miqt_exec_callback_QsciScintillaBase_ViewportEvent(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_WheelEvent(param1 *qt.QWheelEvent) { + + C.QsciScintillaBase_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(param1.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnWheelEvent(slot func(super func(param1 *qt.QWheelEvent), param1 *qt.QWheelEvent)) { + C.QsciScintillaBase_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_WheelEvent +func miqt_exec_callback_QsciScintillaBase_WheelEvent(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QWheelEvent), param1 *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ViewportSizeHint() *qt.QSize { + + _ret := C.QsciScintillaBase_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnViewportSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QsciScintillaBase_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ViewportSizeHint +func miqt_exec_callback_QsciScintillaBase_ViewportSizeHint(self *C.QsciScintillaBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ViewportSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + // Delete this object from C++ memory. func (this *QsciScintillaBase) Delete() { - C.QsciScintillaBase_Delete(this.h) + C.QsciScintillaBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h index aa6e8e6e..8037b01a 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h @@ -15,31 +15,73 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QByteArray; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QImage; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPainter; class QPixmap; class QRect; +class QResizeEvent; class QScrollBar; +class QSize; class QUrl; +class QVariant; +class QWheelEvent; class QWidget; class QsciScintillaBase; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QByteArray QByteArray; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QImage QImage; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QScrollBar QScrollBar; +typedef struct QSize QSize; typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QsciScintillaBase QsciScintillaBase; #endif -QsciScintillaBase* QsciScintillaBase_new(QWidget* parent); -QsciScintillaBase* QsciScintillaBase_new2(); +void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self); void* QsciScintillaBase_Metacast(QsciScintillaBase* self, const char* param1); struct miqt_string QsciScintillaBase_Tr(const char* s); @@ -134,13 +176,95 @@ void QsciScintillaBase_SCN_USERLISTSELECTION3(QsciScintillaBase* self, const cha void QsciScintillaBase_connect_SCN_USERLISTSELECTION3(QsciScintillaBase* self, intptr_t slot); void QsciScintillaBase_SCN_ZOOM(QsciScintillaBase* self); void QsciScintillaBase_connect_SCN_ZOOM(QsciScintillaBase* self, intptr_t slot); +bool QsciScintillaBase_CanInsertFromMimeData(const QsciScintillaBase* self, QMimeData* source); +struct miqt_string QsciScintillaBase_FromMimeData(const QsciScintillaBase* self, QMimeData* source, bool* rectangular); +QMimeData* QsciScintillaBase_ToMimeData(const QsciScintillaBase* self, struct miqt_string text, bool rectangular); +void QsciScintillaBase_ChangeEvent(QsciScintillaBase* self, QEvent* e); +void QsciScintillaBase_ContextMenuEvent(QsciScintillaBase* self, QContextMenuEvent* e); +void QsciScintillaBase_DragEnterEvent(QsciScintillaBase* self, QDragEnterEvent* e); +void QsciScintillaBase_DragLeaveEvent(QsciScintillaBase* self, QDragLeaveEvent* e); +void QsciScintillaBase_DragMoveEvent(QsciScintillaBase* self, QDragMoveEvent* e); +void QsciScintillaBase_DropEvent(QsciScintillaBase* self, QDropEvent* e); +void QsciScintillaBase_FocusInEvent(QsciScintillaBase* self, QFocusEvent* e); +void QsciScintillaBase_FocusOutEvent(QsciScintillaBase* self, QFocusEvent* e); +bool QsciScintillaBase_FocusNextPrevChild(QsciScintillaBase* self, bool next); +void QsciScintillaBase_KeyPressEvent(QsciScintillaBase* self, QKeyEvent* e); +void QsciScintillaBase_InputMethodEvent(QsciScintillaBase* self, QInputMethodEvent* event); +QVariant* QsciScintillaBase_InputMethodQuery(const QsciScintillaBase* self, int query); +void QsciScintillaBase_MouseDoubleClickEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_MouseMoveEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_MousePressEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_MouseReleaseEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_PaintEvent(QsciScintillaBase* self, QPaintEvent* e); +void QsciScintillaBase_ResizeEvent(QsciScintillaBase* self, QResizeEvent* e); +void QsciScintillaBase_ScrollContentsBy(QsciScintillaBase* self, int dx, int dy); struct miqt_string QsciScintillaBase_Tr2(const char* s, const char* c); struct miqt_string QsciScintillaBase_Tr3(const char* s, const char* c, int n); struct miqt_string QsciScintillaBase_TrUtf82(const char* s, const char* c); struct miqt_string QsciScintillaBase_TrUtf83(const char* s, const char* c, int n); long QsciScintillaBase_SendScintilla22(const QsciScintillaBase* self, unsigned int msg, unsigned long wParam); long QsciScintillaBase_SendScintilla32(const QsciScintillaBase* self, unsigned int msg, unsigned long wParam, long lParam); -void QsciScintillaBase_Delete(QsciScintillaBase* self); +void QsciScintillaBase_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QsciScintillaBase_override_virtual_FromMimeData(void* self, intptr_t slot); +struct miqt_string QsciScintillaBase_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular); +void QsciScintillaBase_override_virtual_ToMimeData(void* self, intptr_t slot); +QMimeData* QsciScintillaBase_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular); +void QsciScintillaBase_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ChangeEvent(void* self, QEvent* e); +void QsciScintillaBase_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QsciScintillaBase_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QsciScintillaBase_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QsciScintillaBase_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QsciScintillaBase_override_virtual_DropEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DropEvent(void* self, QDropEvent* e); +void QsciScintillaBase_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QsciScintillaBase_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QsciScintillaBase_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_FocusNextPrevChild(void* self, bool next); +void QsciScintillaBase_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QsciScintillaBase_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QsciScintillaBase_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QsciScintillaBase_virtualbase_InputMethodQuery(const void* self, int query); +void QsciScintillaBase_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_PaintEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QsciScintillaBase_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QsciScintillaBase_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QsciScintillaBase_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QsciScintillaBase_virtualbase_MinimumSizeHint(const void* self); +void QsciScintillaBase_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QsciScintillaBase_virtualbase_SizeHint(const void* self); +void QsciScintillaBase_override_virtual_SetupViewport(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QsciScintillaBase_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QsciScintillaBase_override_virtual_Event(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_Event(void* self, QEvent* param1); +void QsciScintillaBase_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QsciScintillaBase_override_virtual_WheelEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QsciScintillaBase_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QsciScintillaBase_virtualbase_ViewportSizeHint(const void* self); +void QsciScintillaBase_Delete(QsciScintillaBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscistyle.cpp b/qt-restricted-extras/qscintilla/gen_qscistyle.cpp index 54431f91..629e0cf9 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyle.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscistyle.cpp @@ -7,26 +7,31 @@ #include "gen_qscistyle.h" #include "_cgo_export.h" -QsciStyle* QsciStyle_new() { - return new QsciStyle(); +void QsciStyle_new(QsciStyle** outptr_QsciStyle) { + QsciStyle* ret = new QsciStyle(); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font) { +void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle) { QString description_QString = QString::fromUtf8(description.data, description.len); - return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); + QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new3(QsciStyle* param1) { - return new QsciStyle(*param1); +void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle) { + QsciStyle* ret = new QsciStyle(*param1); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new4(int style) { - return new QsciStyle(static_cast(style)); +void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle) { + QsciStyle* ret = new QsciStyle(static_cast(style)); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill) { +void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle) { QString description_QString = QString::fromUtf8(description.data, description.len); - return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); + QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); + *outptr_QsciStyle = ret; } void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci) { @@ -126,7 +131,11 @@ void QsciStyle_Refresh(QsciStyle* self) { self->refresh(); } -void QsciStyle_Delete(QsciStyle* self) { - delete self; +void QsciStyle_Delete(QsciStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscistyle.go b/qt-restricted-extras/qscintilla/gen_qscistyle.go index 1dc40b86..02c3f62b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyle.go +++ b/qt-restricted-extras/qscintilla/gen_qscistyle.go @@ -23,7 +23,8 @@ const ( ) type QsciStyle struct { - h *C.QsciStyle + h *C.QsciStyle + isSubclass bool } func (this *QsciStyle) cPointer() *C.QsciStyle { @@ -40,6 +41,7 @@ func (this *QsciStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciStyle constructs the type using only CGO pointers. func newQsciStyle(h *C.QsciStyle) *QsciStyle { if h == nil { return nil @@ -47,14 +49,23 @@ func newQsciStyle(h *C.QsciStyle) *QsciStyle { return &QsciStyle{h: h} } +// UnsafeNewQsciStyle constructs the type using only unsafe pointers. func UnsafeNewQsciStyle(h unsafe.Pointer) *QsciStyle { - return newQsciStyle((*C.QsciStyle)(h)) + if h == nil { + return nil + } + + return &QsciStyle{h: (*C.QsciStyle)(h)} } // NewQsciStyle constructs a new QsciStyle object. func NewQsciStyle() *QsciStyle { - ret := C.QsciStyle_new() - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new(&outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle2 constructs a new QsciStyle object. @@ -63,20 +74,32 @@ func NewQsciStyle2(style int, description string, color *qt.QColor, paper *qt.QC description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer())) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle3 constructs a new QsciStyle object. func NewQsciStyle3(param1 *QsciStyle) *QsciStyle { - ret := C.QsciStyle_new3(param1.cPointer()) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new3(param1.cPointer(), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle4 constructs a new QsciStyle object. func NewQsciStyle4(style int) *QsciStyle { - ret := C.QsciStyle_new4((C.int)(style)) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new4((C.int)(style), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle5 constructs a new QsciStyle object. @@ -85,8 +108,12 @@ func NewQsciStyle5(style int, description string, color *qt.QColor, paper *qt.QC description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill)) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } func (this *QsciStyle) Apply(sci *QsciScintillaBase) { @@ -195,7 +222,7 @@ func (this *QsciStyle) Refresh() { // Delete this object from C++ memory. func (this *QsciStyle) Delete() { - C.QsciStyle_Delete(this.h) + C.QsciStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscistyle.h b/qt-restricted-extras/qscintilla/gen_qscistyle.h index fa865299..52064603 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyle.h +++ b/qt-restricted-extras/qscintilla/gen_qscistyle.h @@ -26,11 +26,11 @@ typedef struct QsciScintillaBase QsciScintillaBase; typedef struct QsciStyle QsciStyle; #endif -QsciStyle* QsciStyle_new(); -QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font); -QsciStyle* QsciStyle_new3(QsciStyle* param1); -QsciStyle* QsciStyle_new4(int style); -QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill); +void QsciStyle_new(QsciStyle** outptr_QsciStyle); +void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle); +void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle); +void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle); +void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle); void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci); void QsciStyle_SetStyle(QsciStyle* self, int style); int QsciStyle_Style(const QsciStyle* self); @@ -53,7 +53,7 @@ bool QsciStyle_Changeable(const QsciStyle* self); void QsciStyle_SetHotspot(QsciStyle* self, bool hotspot); bool QsciStyle_Hotspot(const QsciStyle* self); void QsciStyle_Refresh(QsciStyle* self); -void QsciStyle_Delete(QsciStyle* self); +void QsciStyle_Delete(QsciStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp b/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp index bedaf71a..ff148966 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp @@ -5,18 +5,21 @@ #include "gen_qscistyledtext.h" #include "_cgo_export.h" -QsciStyledText* QsciStyledText_new(struct miqt_string text, int style) { +void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QsciStyledText(text_QString, static_cast(style)); + QsciStyledText* ret = new QsciStyledText(text_QString, static_cast(style)); + *outptr_QsciStyledText = ret; } -QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style) { +void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QsciStyledText(text_QString, *style); + QsciStyledText* ret = new QsciStyledText(text_QString, *style); + *outptr_QsciStyledText = ret; } -QsciStyledText* QsciStyledText_new3(QsciStyledText* param1) { - return new QsciStyledText(*param1); +void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText) { + QsciStyledText* ret = new QsciStyledText(*param1); + *outptr_QsciStyledText = ret; } void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci) { @@ -38,7 +41,11 @@ int QsciStyledText_Style(const QsciStyledText* self) { return self->style(); } -void QsciStyledText_Delete(QsciStyledText* self) { - delete self; +void QsciStyledText_Delete(QsciStyledText* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla/gen_qscistyledtext.go b/qt-restricted-extras/qscintilla/gen_qscistyledtext.go index 8b3d2cee..d1ca4b9c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyledtext.go +++ b/qt-restricted-extras/qscintilla/gen_qscistyledtext.go @@ -14,7 +14,8 @@ import ( ) type QsciStyledText struct { - h *C.QsciStyledText + h *C.QsciStyledText + isSubclass bool } func (this *QsciStyledText) cPointer() *C.QsciStyledText { @@ -31,6 +32,7 @@ func (this *QsciStyledText) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciStyledText constructs the type using only CGO pointers. func newQsciStyledText(h *C.QsciStyledText) *QsciStyledText { if h == nil { return nil @@ -38,8 +40,13 @@ func newQsciStyledText(h *C.QsciStyledText) *QsciStyledText { return &QsciStyledText{h: h} } +// UnsafeNewQsciStyledText constructs the type using only unsafe pointers. func UnsafeNewQsciStyledText(h unsafe.Pointer) *QsciStyledText { - return newQsciStyledText((*C.QsciStyledText)(h)) + if h == nil { + return nil + } + + return &QsciStyledText{h: (*C.QsciStyledText)(h)} } // NewQsciStyledText constructs a new QsciStyledText object. @@ -48,8 +55,12 @@ func NewQsciStyledText(text string, style int) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QsciStyledText_new(text_ms, (C.int)(style)) - return newQsciStyledText(ret) + var outptr_QsciStyledText *C.QsciStyledText = nil + + C.QsciStyledText_new(text_ms, (C.int)(style), &outptr_QsciStyledText) + ret := newQsciStyledText(outptr_QsciStyledText) + ret.isSubclass = true + return ret } // NewQsciStyledText2 constructs a new QsciStyledText object. @@ -58,14 +69,22 @@ func NewQsciStyledText2(text string, style *QsciStyle) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QsciStyledText_new2(text_ms, style.cPointer()) - return newQsciStyledText(ret) + var outptr_QsciStyledText *C.QsciStyledText = nil + + C.QsciStyledText_new2(text_ms, style.cPointer(), &outptr_QsciStyledText) + ret := newQsciStyledText(outptr_QsciStyledText) + ret.isSubclass = true + return ret } // NewQsciStyledText3 constructs a new QsciStyledText object. func NewQsciStyledText3(param1 *QsciStyledText) *QsciStyledText { - ret := C.QsciStyledText_new3(param1.cPointer()) - return newQsciStyledText(ret) + var outptr_QsciStyledText *C.QsciStyledText = nil + + C.QsciStyledText_new3(param1.cPointer(), &outptr_QsciStyledText) + ret := newQsciStyledText(outptr_QsciStyledText) + ret.isSubclass = true + return ret } func (this *QsciStyledText) Apply(sci *QsciScintillaBase) { @@ -85,7 +104,7 @@ func (this *QsciStyledText) Style() int { // Delete this object from C++ memory. func (this *QsciStyledText) Delete() { - C.QsciStyledText_Delete(this.h) + C.QsciStyledText_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla/gen_qscistyledtext.h b/qt-restricted-extras/qscintilla/gen_qscistyledtext.h index 5b006baf..e534ea0e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyledtext.h +++ b/qt-restricted-extras/qscintilla/gen_qscistyledtext.h @@ -24,13 +24,13 @@ typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -QsciStyledText* QsciStyledText_new(struct miqt_string text, int style); -QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style); -QsciStyledText* QsciStyledText_new3(QsciStyledText* param1); +void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText); +void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText); +void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText); void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci); struct miqt_string QsciStyledText_Text(const QsciStyledText* self); int QsciStyledText_Style(const QsciStyledText* self); -void QsciStyledText_Delete(QsciStyledText* self); +void QsciStyledText_Delete(QsciStyledText* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp index cb8d2876..35f3d2a5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -108,7 +109,11 @@ struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self) { - delete self; +void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go index 8fba6845..9241d7be 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go @@ -15,7 +15,8 @@ import ( ) type QsciAbstractAPIs struct { - h *C.QsciAbstractAPIs + h *C.QsciAbstractAPIs + isSubclass bool *qt6.QObject } @@ -33,15 +34,23 @@ func (this *QsciAbstractAPIs) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciAbstractAPIs(h *C.QsciAbstractAPIs) *QsciAbstractAPIs { +// newQsciAbstractAPIs constructs the type using only CGO pointers. +func newQsciAbstractAPIs(h *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAbstractAPIs { if h == nil { return nil } - return &QsciAbstractAPIs{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QsciAbstractAPIs{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer) *QsciAbstractAPIs { - return newQsciAbstractAPIs((*C.QsciAbstractAPIs)(h)) +// UnsafeNewQsciAbstractAPIs constructs the type using only unsafe pointers. +func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAbstractAPIs { + if h == nil { + return nil + } + + return &QsciAbstractAPIs{h: (*C.QsciAbstractAPIs)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } func (this *QsciAbstractAPIs) MetaObject() *qt6.QMetaObject { @@ -64,7 +73,7 @@ func QsciAbstractAPIs_Tr(s string) string { } func (this *QsciAbstractAPIs) Lexer() *QsciLexer { - return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciAbstractAPIs_Lexer(this.h))) + return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciAbstractAPIs_Lexer(this.h)), nil) } func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []string) { @@ -152,7 +161,7 @@ func QsciAbstractAPIs_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QsciAbstractAPIs) Delete() { - C.QsciAbstractAPIs_Delete(this.h) + C.QsciAbstractAPIs_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h index dcd5f41a..127c4193 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QsciAbstractAPIs; class QsciLexer; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif @@ -33,7 +35,7 @@ void QsciAbstractAPIs_AutoCompletionSelected(QsciAbstractAPIs* self, struct miqt struct miqt_array /* of struct miqt_string */ QsciAbstractAPIs_CallTips(QsciAbstractAPIs* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts); struct miqt_string QsciAbstractAPIs_Tr2(const char* s, const char* c); struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n); -void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self); +void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp b/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp index 8aa82f5d..5737de0a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -8,8 +9,234 @@ #include "gen_qsciapis.h" #include "_cgo_export.h" -QsciAPIs* QsciAPIs_new(QsciLexer* lexer) { - return new QsciAPIs(lexer); +class MiqtVirtualQsciAPIs : public virtual QsciAPIs { +public: + + MiqtVirtualQsciAPIs(QsciLexer* lexer): QsciAPIs(lexer) {}; + + virtual ~MiqtVirtualQsciAPIs() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateAutoCompletionList = 0; + + // Subclass to allow providing a Go implementation + virtual void updateAutoCompletionList(const QStringList& context, QStringList& list) override { + if (handle__UpdateAutoCompletionList == 0) { + QsciAPIs::updateAutoCompletionList(context, list); + return; + } + + const QStringList& context_ret = context; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* context_arr = static_cast(malloc(sizeof(struct miqt_string) * context_ret.length())); + for (size_t i = 0, e = context_ret.length(); i < e; ++i) { + QString context_lv_ret = context_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray context_lv_b = context_lv_ret.toUtf8(); + struct miqt_string context_lv_ms; + context_lv_ms.len = context_lv_b.length(); + context_lv_ms.data = static_cast(malloc(context_lv_ms.len)); + memcpy(context_lv_ms.data, context_lv_b.data(), context_lv_ms.len); + context_arr[i] = context_lv_ms; + } + struct miqt_array context_out; + context_out.len = context_ret.length(); + context_out.data = static_cast(context_arr); + struct miqt_array /* of struct miqt_string */ sigval1 = context_out; + QStringList& list_ret = list; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* list_arr = static_cast(malloc(sizeof(struct miqt_string) * list_ret.length())); + for (size_t i = 0, e = list_ret.length(); i < e; ++i) { + QString list_lv_ret = list_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray list_lv_b = list_lv_ret.toUtf8(); + struct miqt_string list_lv_ms; + list_lv_ms.len = list_lv_b.length(); + list_lv_ms.data = static_cast(malloc(list_lv_ms.len)); + memcpy(list_lv_ms.data, list_lv_b.data(), list_lv_ms.len); + list_arr[i] = list_lv_ms; + } + struct miqt_array list_out; + list_out.len = list_ret.length(); + list_out.data = static_cast(list_arr); + struct miqt_array /* of struct miqt_string */ sigval2 = list_out; + + miqt_exec_callback_QsciAPIs_UpdateAutoCompletionList(this, handle__UpdateAutoCompletionList, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateAutoCompletionList(struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list) { + QStringList context_QList; + context_QList.reserve(context.len); + struct miqt_string* context_arr = static_cast(context.data); + for(size_t i = 0; i < context.len; ++i) { + QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len); + context_QList.push_back(context_arr_i_QString); + } + QStringList list_QList; + list_QList.reserve(list.len); + struct miqt_string* list_arr = static_cast(list.data); + for(size_t i = 0; i < list.len; ++i) { + QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len); + list_QList.push_back(list_arr_i_QString); + } + + QsciAPIs::updateAutoCompletionList(context_QList, list_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionSelected = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompletionSelected(const QString& sel) override { + if (handle__AutoCompletionSelected == 0) { + QsciAPIs::autoCompletionSelected(sel); + return; + } + + const QString sel_ret = sel; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray sel_b = sel_ret.toUtf8(); + struct miqt_string sel_ms; + sel_ms.len = sel_b.length(); + sel_ms.data = static_cast(malloc(sel_ms.len)); + memcpy(sel_ms.data, sel_b.data(), sel_ms.len); + struct miqt_string sigval1 = sel_ms; + + miqt_exec_callback_QsciAPIs_AutoCompletionSelected(this, handle__AutoCompletionSelected, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompletionSelected(struct miqt_string sel) { + QString sel_QString = QString::fromUtf8(sel.data, sel.len); + + QsciAPIs::autoCompletionSelected(sel_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CallTips = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList callTips(const QStringList& context, int commas, QsciScintilla::CallTipsStyle style, QList& shifts) override { + if (handle__CallTips == 0) { + return QsciAPIs::callTips(context, commas, style, shifts); + } + + const QStringList& context_ret = context; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* context_arr = static_cast(malloc(sizeof(struct miqt_string) * context_ret.length())); + for (size_t i = 0, e = context_ret.length(); i < e; ++i) { + QString context_lv_ret = context_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray context_lv_b = context_lv_ret.toUtf8(); + struct miqt_string context_lv_ms; + context_lv_ms.len = context_lv_b.length(); + context_lv_ms.data = static_cast(malloc(context_lv_ms.len)); + memcpy(context_lv_ms.data, context_lv_b.data(), context_lv_ms.len); + context_arr[i] = context_lv_ms; + } + struct miqt_array context_out; + context_out.len = context_ret.length(); + context_out.data = static_cast(context_arr); + struct miqt_array /* of struct miqt_string */ sigval1 = context_out; + int sigval2 = commas; + QsciScintilla::CallTipsStyle style_ret = style; + int sigval3 = static_cast(style_ret); + QList& shifts_ret = shifts; + // Convert QList<> from C++ memory to manually-managed C memory + int* shifts_arr = static_cast(malloc(sizeof(int) * shifts_ret.length())); + for (size_t i = 0, e = shifts_ret.length(); i < e; ++i) { + shifts_arr[i] = shifts_ret[i]; + } + struct miqt_array shifts_out; + shifts_out.len = shifts_ret.length(); + shifts_out.data = static_cast(shifts_arr); + struct miqt_array /* of int */ sigval4 = shifts_out; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciAPIs_CallTips(this, handle__CallTips, sigval1, sigval2, sigval3, sigval4); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_CallTips(struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts) { + QStringList context_QList; + context_QList.reserve(context.len); + struct miqt_string* context_arr = static_cast(context.data); + for(size_t i = 0; i < context.len; ++i) { + QString context_arr_i_QString = QString::fromUtf8(context_arr[i].data, context_arr[i].len); + context_QList.push_back(context_arr_i_QString); + } + QList shifts_QList; + shifts_QList.reserve(shifts.len); + int* shifts_arr = static_cast(shifts.data); + for(size_t i = 0; i < shifts.len; ++i) { + shifts_QList.push_back(static_cast(shifts_arr[i])); + } + + QStringList _ret = QsciAPIs::callTips(context_QList, static_cast(commas), static_cast(style), shifts_QList); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QsciAPIs::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QsciAPIs_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QsciAPIs::event(e); + + } + +}; + +void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { + MiqtVirtualQsciAPIs* ret = new MiqtVirtualQsciAPIs(lexer); + *outptr_QsciAPIs = ret; + *outptr_QsciAbstractAPIs = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self) { @@ -166,7 +393,7 @@ void QsciAPIs_ApiPreparationCancelled(QsciAPIs* self) { } void QsciAPIs_connect_ApiPreparationCancelled(QsciAPIs* self, intptr_t slot) { - QsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationCancelled), self, [=]() { + MiqtVirtualQsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationCancelled), self, [=]() { miqt_exec_callback_QsciAPIs_ApiPreparationCancelled(slot); }); } @@ -176,7 +403,7 @@ void QsciAPIs_ApiPreparationStarted(QsciAPIs* self) { } void QsciAPIs_connect_ApiPreparationStarted(QsciAPIs* self, intptr_t slot) { - QsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationStarted), self, [=]() { + MiqtVirtualQsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationStarted), self, [=]() { miqt_exec_callback_QsciAPIs_ApiPreparationStarted(slot); }); } @@ -186,7 +413,7 @@ void QsciAPIs_ApiPreparationFinished(QsciAPIs* self) { } void QsciAPIs_connect_ApiPreparationFinished(QsciAPIs* self, intptr_t slot) { - QsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationFinished), self, [=]() { + MiqtVirtualQsciAPIs::connect(self, static_cast(&QsciAPIs::apiPreparationFinished), self, [=]() { miqt_exec_callback_QsciAPIs_ApiPreparationFinished(slot); }); } @@ -228,7 +455,43 @@ bool QsciAPIs_SavePrepared1(const QsciAPIs* self, struct miqt_string filename) { return self->savePrepared(filename_QString); } -void QsciAPIs_Delete(QsciAPIs* self) { - delete self; +void QsciAPIs_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__UpdateAutoCompletionList = slot; +} + +void QsciAPIs_virtualbase_UpdateAutoCompletionList(void* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list) { + ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_UpdateAutoCompletionList(context, list); +} + +void QsciAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__AutoCompletionSelected = slot; +} + +void QsciAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string sel) { + ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_AutoCompletionSelected(sel); +} + +void QsciAPIs_override_virtual_CallTips(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__CallTips = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciAPIs_virtualbase_CallTips(void* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts) { + return ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_CallTips(context, commas, style, shifts); +} + +void QsciAPIs_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciAPIs*)(self) )->handle__Event = slot; +} + +bool QsciAPIs_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQsciAPIs*)(self) )->virtualbase_Event(e); +} + +void QsciAPIs_Delete(QsciAPIs* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qsciapis.go b/qt-restricted-extras/qscintilla6/gen_qsciapis.go index bf39a88b..3aadfb22 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciapis.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciapis.go @@ -16,7 +16,8 @@ import ( ) type QsciAPIs struct { - h *C.QsciAPIs + h *C.QsciAPIs + isSubclass bool *QsciAbstractAPIs } @@ -34,21 +35,35 @@ func (this *QsciAPIs) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciAPIs(h *C.QsciAPIs) *QsciAPIs { +// newQsciAPIs constructs the type using only CGO pointers. +func newQsciAPIs(h *C.QsciAPIs, h_QsciAbstractAPIs *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAPIs { if h == nil { return nil } - return &QsciAPIs{h: h, QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(unsafe.Pointer(h))} + return &QsciAPIs{h: h, + QsciAbstractAPIs: newQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} } -func UnsafeNewQsciAPIs(h unsafe.Pointer) *QsciAPIs { - return newQsciAPIs((*C.QsciAPIs)(h)) +// UnsafeNewQsciAPIs constructs the type using only unsafe pointers. +func UnsafeNewQsciAPIs(h unsafe.Pointer, h_QsciAbstractAPIs unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAPIs { + if h == nil { + return nil + } + + return &QsciAPIs{h: (*C.QsciAPIs)(h), + QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} } // NewQsciAPIs constructs a new QsciAPIs object. func NewQsciAPIs(lexer *QsciLexer) *QsciAPIs { - ret := C.QsciAPIs_new(lexer.cPointer()) - return newQsciAPIs(ret) + var outptr_QsciAPIs *C.QsciAPIs = nil + var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil + var outptr_QObject *C.QObject = nil + + C.QsciAPIs_new(lexer.cPointer(), &outptr_QsciAPIs, &outptr_QsciAbstractAPIs, &outptr_QObject) + ret := newQsciAPIs(outptr_QsciAPIs, outptr_QsciAbstractAPIs, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciAPIs) MetaObject() *qt6.QMetaObject { @@ -300,9 +315,208 @@ func (this *QsciAPIs) SavePrepared1(filename string) bool { return (bool)(C.QsciAPIs_SavePrepared1(this.h, filename_ms)) } +func (this *QsciAPIs) callVirtualBase_UpdateAutoCompletionList(context []string, list []string) { + context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context)))) + defer C.free(unsafe.Pointer(context_CArray)) + for i := range context { + context_i_ms := C.struct_miqt_string{} + context_i_ms.data = C.CString(context[i]) + context_i_ms.len = C.size_t(len(context[i])) + defer C.free(unsafe.Pointer(context_i_ms.data)) + context_CArray[i] = context_i_ms + } + context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)} + list_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(list)))) + defer C.free(unsafe.Pointer(list_CArray)) + for i := range list { + list_i_ms := C.struct_miqt_string{} + list_i_ms.data = C.CString(list[i]) + list_i_ms.len = C.size_t(len(list[i])) + defer C.free(unsafe.Pointer(list_i_ms.data)) + list_CArray[i] = list_i_ms + } + list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)} + + C.QsciAPIs_virtualbase_UpdateAutoCompletionList(unsafe.Pointer(this.h), context_ma, list_ma) + +} +func (this *QsciAPIs) OnUpdateAutoCompletionList(slot func(super func(context []string, list []string), context []string, list []string)) { + C.QsciAPIs_override_virtual_UpdateAutoCompletionList(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_UpdateAutoCompletionList +func miqt_exec_callback_QsciAPIs_UpdateAutoCompletionList(self *C.QsciAPIs, cb C.intptr_t, context C.struct_miqt_array, list C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(context []string, list []string), context []string, list []string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var context_ma C.struct_miqt_array = context + context_ret := make([]string, int(context_ma.len)) + context_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(context_ma.data)) // hey ya + for i := 0; i < int(context_ma.len); i++ { + var context_lv_ms C.struct_miqt_string = context_outCast[i] + context_lv_ret := C.GoStringN(context_lv_ms.data, C.int(int64(context_lv_ms.len))) + C.free(unsafe.Pointer(context_lv_ms.data)) + context_ret[i] = context_lv_ret + } + slotval1 := context_ret + + var list_ma C.struct_miqt_array = list + list_ret := make([]string, int(list_ma.len)) + list_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(list_ma.data)) // hey ya + for i := 0; i < int(list_ma.len); i++ { + var list_lv_ms C.struct_miqt_string = list_outCast[i] + list_lv_ret := C.GoStringN(list_lv_ms.data, C.int(int64(list_lv_ms.len))) + C.free(unsafe.Pointer(list_lv_ms.data)) + list_ret[i] = list_lv_ret + } + slotval2 := list_ret + + gofunc((&QsciAPIs{h: self}).callVirtualBase_UpdateAutoCompletionList, slotval1, slotval2) + +} + +func (this *QsciAPIs) callVirtualBase_AutoCompletionSelected(sel string) { + sel_ms := C.struct_miqt_string{} + sel_ms.data = C.CString(sel) + sel_ms.len = C.size_t(len(sel)) + defer C.free(unsafe.Pointer(sel_ms.data)) + + C.QsciAPIs_virtualbase_AutoCompletionSelected(unsafe.Pointer(this.h), sel_ms) + +} +func (this *QsciAPIs) OnAutoCompletionSelected(slot func(super func(sel string), sel string)) { + C.QsciAPIs_override_virtual_AutoCompletionSelected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_AutoCompletionSelected +func miqt_exec_callback_QsciAPIs_AutoCompletionSelected(self *C.QsciAPIs, cb C.intptr_t, sel C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sel string), sel string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var sel_ms C.struct_miqt_string = sel + sel_ret := C.GoStringN(sel_ms.data, C.int(int64(sel_ms.len))) + C.free(unsafe.Pointer(sel_ms.data)) + slotval1 := sel_ret + + gofunc((&QsciAPIs{h: self}).callVirtualBase_AutoCompletionSelected, slotval1) + +} + +func (this *QsciAPIs) callVirtualBase_CallTips(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string { + context_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(context)))) + defer C.free(unsafe.Pointer(context_CArray)) + for i := range context { + context_i_ms := C.struct_miqt_string{} + context_i_ms.data = C.CString(context[i]) + context_i_ms.len = C.size_t(len(context[i])) + defer C.free(unsafe.Pointer(context_i_ms.data)) + context_CArray[i] = context_i_ms + } + context_ma := C.struct_miqt_array{len: C.size_t(len(context)), data: unsafe.Pointer(context_CArray)} + shifts_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(shifts)))) + defer C.free(unsafe.Pointer(shifts_CArray)) + for i := range shifts { + shifts_CArray[i] = (C.int)(shifts[i]) + } + shifts_ma := C.struct_miqt_array{len: C.size_t(len(shifts)), data: unsafe.Pointer(shifts_CArray)} + + var _ma C.struct_miqt_array = C.QsciAPIs_virtualbase_CallTips(unsafe.Pointer(this.h), context_ma, (C.int)(commas), (C.int)(style), shifts_ma) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciAPIs) OnCallTips(slot func(super func(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string, context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string) { + C.QsciAPIs_override_virtual_CallTips(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_CallTips +func miqt_exec_callback_QsciAPIs_CallTips(self *C.QsciAPIs, cb C.intptr_t, context C.struct_miqt_array, commas C.int, style C.int, shifts C.struct_miqt_array) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string, context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var context_ma C.struct_miqt_array = context + context_ret := make([]string, int(context_ma.len)) + context_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(context_ma.data)) // hey ya + for i := 0; i < int(context_ma.len); i++ { + var context_lv_ms C.struct_miqt_string = context_outCast[i] + context_lv_ret := C.GoStringN(context_lv_ms.data, C.int(int64(context_lv_ms.len))) + C.free(unsafe.Pointer(context_lv_ms.data)) + context_ret[i] = context_lv_ret + } + slotval1 := context_ret + + slotval2 := (int)(commas) + + slotval3 := (QsciScintilla__CallTipsStyle)(style) + + var shifts_ma C.struct_miqt_array = shifts + shifts_ret := make([]int, int(shifts_ma.len)) + shifts_outCast := (*[0xffff]C.int)(unsafe.Pointer(shifts_ma.data)) // hey ya + for i := 0; i < int(shifts_ma.len); i++ { + shifts_ret[i] = (int)(shifts_outCast[i]) + } + slotval4 := shifts_ret + + virtualReturn := gofunc((&QsciAPIs{h: self}).callVirtualBase_CallTips, slotval1, slotval2, slotval3, slotval4) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciAPIs) callVirtualBase_Event(e *qt6.QEvent) bool { + + return (bool)(C.QsciAPIs_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer()))) + +} +func (this *QsciAPIs) OnEvent(slot func(super func(e *qt6.QEvent) bool, e *qt6.QEvent) bool) { + C.QsciAPIs_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAPIs_Event +func miqt_exec_callback_QsciAPIs_Event(self *C.QsciAPIs, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QEvent) bool, e *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QsciAPIs{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciAPIs) Delete() { - C.QsciAPIs_Delete(this.h) + C.QsciAPIs_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qsciapis.h b/qt-restricted-extras/qscintilla6/gen_qsciapis.h index a873bda5..0c6639d7 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciapis.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciapis.h @@ -17,16 +17,20 @@ extern "C" { #ifdef __cplusplus class QEvent; class QMetaObject; +class QObject; class QsciAPIs; +class QsciAbstractAPIs; class QsciLexer; #else typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QsciAPIs QsciAPIs; +typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif -QsciAPIs* QsciAPIs_new(QsciLexer* lexer); +void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self); void* QsciAPIs_Metacast(QsciAPIs* self, const char* param1); struct miqt_string QsciAPIs_Tr(const char* s); @@ -56,7 +60,15 @@ struct miqt_string QsciAPIs_Tr3(const char* s, const char* c, int n); bool QsciAPIs_IsPrepared1(const QsciAPIs* self, struct miqt_string filename); bool QsciAPIs_LoadPrepared1(QsciAPIs* self, struct miqt_string filename); bool QsciAPIs_SavePrepared1(const QsciAPIs* self, struct miqt_string filename); -void QsciAPIs_Delete(QsciAPIs* self); +void QsciAPIs_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot); +void QsciAPIs_virtualbase_UpdateAutoCompletionList(void* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list); +void QsciAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot); +void QsciAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string sel); +void QsciAPIs_override_virtual_CallTips(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciAPIs_virtualbase_CallTips(void* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts); +void QsciAPIs_override_virtual_Event(void* self, intptr_t slot); +bool QsciAPIs_virtualbase_Event(void* self, QEvent* e); +void QsciAPIs_Delete(QsciAPIs* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscicommand.cpp b/qt-restricted-extras/qscintilla6/gen_qscicommand.cpp index b542ece4..7737d26a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscicommand.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscicommand.cpp @@ -45,7 +45,11 @@ struct miqt_string QsciCommand_Description(const QsciCommand* self) { return _ms; } -void QsciCommand_Delete(QsciCommand* self) { - delete self; +void QsciCommand_Delete(QsciCommand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscicommand.go b/qt-restricted-extras/qscintilla6/gen_qscicommand.go index 235c7bfb..724f6f01 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscicommand.go +++ b/qt-restricted-extras/qscintilla6/gen_qscicommand.go @@ -118,7 +118,8 @@ const ( ) type QsciCommand struct { - h *C.QsciCommand + h *C.QsciCommand + isSubclass bool } func (this *QsciCommand) cPointer() *C.QsciCommand { @@ -135,6 +136,7 @@ func (this *QsciCommand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciCommand constructs the type using only CGO pointers. func newQsciCommand(h *C.QsciCommand) *QsciCommand { if h == nil { return nil @@ -142,8 +144,13 @@ func newQsciCommand(h *C.QsciCommand) *QsciCommand { return &QsciCommand{h: h} } +// UnsafeNewQsciCommand constructs the type using only unsafe pointers. func UnsafeNewQsciCommand(h unsafe.Pointer) *QsciCommand { - return newQsciCommand((*C.QsciCommand)(h)) + if h == nil { + return nil + } + + return &QsciCommand{h: (*C.QsciCommand)(h)} } func (this *QsciCommand) Command() QsciCommand__Command { @@ -183,7 +190,7 @@ func (this *QsciCommand) Description() string { // Delete this object from C++ memory. func (this *QsciCommand) Delete() { - C.QsciCommand_Delete(this.h) + C.QsciCommand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscicommand.h b/qt-restricted-extras/qscintilla6/gen_qscicommand.h index 0ea3de44..27d350f9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscicommand.h +++ b/qt-restricted-extras/qscintilla6/gen_qscicommand.h @@ -28,7 +28,7 @@ int QsciCommand_Key(const QsciCommand* self); int QsciCommand_AlternateKey(const QsciCommand* self); bool QsciCommand_ValidKey(int key); struct miqt_string QsciCommand_Description(const QsciCommand* self); -void QsciCommand_Delete(QsciCommand* self); +void QsciCommand_Delete(QsciCommand* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscicommandset.go b/qt-restricted-extras/qscintilla6/gen_qscicommandset.go index 567721f5..1a022816 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscicommandset.go +++ b/qt-restricted-extras/qscintilla6/gen_qscicommandset.go @@ -14,7 +14,8 @@ import ( ) type QsciCommandSet struct { - h *C.QsciCommandSet + h *C.QsciCommandSet + isSubclass bool } func (this *QsciCommandSet) cPointer() *C.QsciCommandSet { @@ -31,6 +32,7 @@ func (this *QsciCommandSet) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciCommandSet constructs the type using only CGO pointers. func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet { if h == nil { return nil @@ -38,8 +40,13 @@ func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet { return &QsciCommandSet{h: h} } +// UnsafeNewQsciCommandSet constructs the type using only unsafe pointers. func UnsafeNewQsciCommandSet(h unsafe.Pointer) *QsciCommandSet { - return newQsciCommandSet((*C.QsciCommandSet)(h)) + if h == nil { + return nil + } + + return &QsciCommandSet{h: (*C.QsciCommandSet)(h)} } func (this *QsciCommandSet) ReadSettings(qs *qt6.QSettings) bool { diff --git a/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp b/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp index f08bc32e..cd7559c4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp @@ -2,19 +2,25 @@ #include "gen_qscidocument.h" #include "_cgo_export.h" -QsciDocument* QsciDocument_new() { - return new QsciDocument(); +void QsciDocument_new(QsciDocument** outptr_QsciDocument) { + QsciDocument* ret = new QsciDocument(); + *outptr_QsciDocument = ret; } -QsciDocument* QsciDocument_new2(QsciDocument* param1) { - return new QsciDocument(*param1); +void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument) { + QsciDocument* ret = new QsciDocument(*param1); + *outptr_QsciDocument = ret; } void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1) { self->operator=(*param1); } -void QsciDocument_Delete(QsciDocument* self) { - delete self; +void QsciDocument_Delete(QsciDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscidocument.go b/qt-restricted-extras/qscintilla6/gen_qscidocument.go index 2b4708a7..c40911d0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscidocument.go +++ b/qt-restricted-extras/qscintilla6/gen_qscidocument.go @@ -14,7 +14,8 @@ import ( ) type QsciDocument struct { - h *C.QsciDocument + h *C.QsciDocument + isSubclass bool } func (this *QsciDocument) cPointer() *C.QsciDocument { @@ -31,6 +32,7 @@ func (this *QsciDocument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciDocument constructs the type using only CGO pointers. func newQsciDocument(h *C.QsciDocument) *QsciDocument { if h == nil { return nil @@ -38,20 +40,33 @@ func newQsciDocument(h *C.QsciDocument) *QsciDocument { return &QsciDocument{h: h} } +// UnsafeNewQsciDocument constructs the type using only unsafe pointers. func UnsafeNewQsciDocument(h unsafe.Pointer) *QsciDocument { - return newQsciDocument((*C.QsciDocument)(h)) + if h == nil { + return nil + } + + return &QsciDocument{h: (*C.QsciDocument)(h)} } // NewQsciDocument constructs a new QsciDocument object. func NewQsciDocument() *QsciDocument { - ret := C.QsciDocument_new() - return newQsciDocument(ret) + var outptr_QsciDocument *C.QsciDocument = nil + + C.QsciDocument_new(&outptr_QsciDocument) + ret := newQsciDocument(outptr_QsciDocument) + ret.isSubclass = true + return ret } // NewQsciDocument2 constructs a new QsciDocument object. func NewQsciDocument2(param1 *QsciDocument) *QsciDocument { - ret := C.QsciDocument_new2(param1.cPointer()) - return newQsciDocument(ret) + var outptr_QsciDocument *C.QsciDocument = nil + + C.QsciDocument_new2(param1.cPointer(), &outptr_QsciDocument) + ret := newQsciDocument(outptr_QsciDocument) + ret.isSubclass = true + return ret } func (this *QsciDocument) OperatorAssign(param1 *QsciDocument) { @@ -60,7 +75,7 @@ func (this *QsciDocument) OperatorAssign(param1 *QsciDocument) { // Delete this object from C++ memory. func (this *QsciDocument) Delete() { - C.QsciDocument_Delete(this.h) + C.QsciDocument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscidocument.h b/qt-restricted-extras/qscintilla6/gen_qscidocument.h index afaba289..f26d2e47 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscidocument.h +++ b/qt-restricted-extras/qscintilla6/gen_qscidocument.h @@ -20,10 +20,10 @@ class QsciDocument; typedef struct QsciDocument QsciDocument; #endif -QsciDocument* QsciDocument_new(); -QsciDocument* QsciDocument_new2(QsciDocument* param1); +void QsciDocument_new(QsciDocument** outptr_QsciDocument); +void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument); void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1); -void QsciDocument_Delete(QsciDocument* self); +void QsciDocument_Delete(QsciDocument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp index 68a30992..eef5ce06 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -73,20 +74,20 @@ int QsciLexer_AutoIndentStyle(QsciLexer* self) { return self->autoIndentStyle(); } -const char* QsciLexer_BlockEnd(const QsciLexer* self) { - return (const char*) self->blockEnd(); +const char* QsciLexer_BlockEnd(const QsciLexer* self, int* style) { + return (const char*) self->blockEnd(static_cast(style)); } int QsciLexer_BlockLookback(const QsciLexer* self) { return self->blockLookback(); } -const char* QsciLexer_BlockStart(const QsciLexer* self) { - return (const char*) self->blockStart(); +const char* QsciLexer_BlockStart(const QsciLexer* self, int* style) { + return (const char*) self->blockStart(static_cast(style)); } -const char* QsciLexer_BlockStartKeyword(const QsciLexer* self) { - return (const char*) self->blockStartKeyword(); +const char* QsciLexer_BlockStartKeyword(const QsciLexer* self, int* style) { + return (const char*) self->blockStartKeyword(static_cast(style)); } int QsciLexer_BraceStyle(const QsciLexer* self) { @@ -212,20 +213,20 @@ void QsciLexer_SetAutoIndentStyle(QsciLexer* self, int autoindentstyle) { self->setAutoIndentStyle(static_cast(autoindentstyle)); } -void QsciLexer_SetColor(QsciLexer* self, QColor* c) { - self->setColor(*c); +void QsciLexer_SetColor(QsciLexer* self, QColor* c, int style) { + self->setColor(*c, static_cast(style)); } -void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill) { - self->setEolFill(eoffill); +void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill, int style) { + self->setEolFill(eoffill, static_cast(style)); } -void QsciLexer_SetFont(QsciLexer* self, QFont* f) { - self->setFont(*f); +void QsciLexer_SetFont(QsciLexer* self, QFont* f, int style) { + self->setFont(*f, static_cast(style)); } -void QsciLexer_SetPaper(QsciLexer* self, QColor* c) { - self->setPaper(*c); +void QsciLexer_SetPaper(QsciLexer* self, QColor* c, int style) { + self->setPaper(*c, static_cast(style)); } void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style) { @@ -316,18 +317,6 @@ struct miqt_string QsciLexer_Tr3(const char* s, const char* c, int n) { return _ms; } -const char* QsciLexer_BlockEnd1(const QsciLexer* self, int* style) { - return (const char*) self->blockEnd(static_cast(style)); -} - -const char* QsciLexer_BlockStart1(const QsciLexer* self, int* style) { - return (const char*) self->blockStart(static_cast(style)); -} - -const char* QsciLexer_BlockStartKeyword1(const QsciLexer* self, int* style) { - return (const char*) self->blockStartKeyword(static_cast(style)); -} - bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix) { return self->readSettings(*qs, prefix); } @@ -336,23 +325,11 @@ bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* return self->writeSettings(*qs, prefix); } -void QsciLexer_SetColor2(QsciLexer* self, QColor* c, int style) { - self->setColor(*c, static_cast(style)); -} - -void QsciLexer_SetEolFill2(QsciLexer* self, bool eoffill, int style) { - self->setEolFill(eoffill, static_cast(style)); -} - -void QsciLexer_SetFont2(QsciLexer* self, QFont* f, int style) { - self->setFont(*f, static_cast(style)); -} - -void QsciLexer_SetPaper2(QsciLexer* self, QColor* c, int style) { - self->setPaper(*c, static_cast(style)); -} - -void QsciLexer_Delete(QsciLexer* self) { - delete self; +void QsciLexer_Delete(QsciLexer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.go b/qt-restricted-extras/qscintilla6/gen_qscilexer.go index bee31577..4fdfefb5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.go @@ -16,7 +16,8 @@ import ( ) type QsciLexer struct { - h *C.QsciLexer + h *C.QsciLexer + isSubclass bool *qt6.QObject } @@ -34,15 +35,23 @@ func (this *QsciLexer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexer(h *C.QsciLexer) *QsciLexer { +// newQsciLexer constructs the type using only CGO pointers. +func newQsciLexer(h *C.QsciLexer, h_QObject *C.QObject) *QsciLexer { if h == nil { return nil } - return &QsciLexer{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QsciLexer{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQsciLexer(h unsafe.Pointer) *QsciLexer { - return newQsciLexer((*C.QsciLexer)(h)) +// UnsafeNewQsciLexer constructs the type using only unsafe pointers. +func UnsafeNewQsciLexer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexer { + if h == nil { + return nil + } + + return &QsciLexer{h: (*C.QsciLexer)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } func (this *QsciLexer) MetaObject() *qt6.QMetaObject { @@ -79,7 +88,7 @@ func (this *QsciLexer) LexerId() int { } func (this *QsciLexer) Apis() *QsciAbstractAPIs { - return UnsafeNewQsciAbstractAPIs(unsafe.Pointer(C.QsciLexer_Apis(this.h))) + return UnsafeNewQsciAbstractAPIs(unsafe.Pointer(C.QsciLexer_Apis(this.h)), nil) } func (this *QsciLexer) AutoCompletionFillups() string { @@ -104,8 +113,8 @@ func (this *QsciLexer) AutoIndentStyle() int { return (int)(C.QsciLexer_AutoIndentStyle(this.h)) } -func (this *QsciLexer) BlockEnd() string { - _ret := C.QsciLexer_BlockEnd(this.h) +func (this *QsciLexer) BlockEnd(style *int) string { + _ret := C.QsciLexer_BlockEnd(this.h, (*C.int)(unsafe.Pointer(style))) return C.GoString(_ret) } @@ -113,13 +122,13 @@ func (this *QsciLexer) BlockLookback() int { return (int)(C.QsciLexer_BlockLookback(this.h)) } -func (this *QsciLexer) BlockStart() string { - _ret := C.QsciLexer_BlockStart(this.h) +func (this *QsciLexer) BlockStart(style *int) string { + _ret := C.QsciLexer_BlockStart(this.h, (*C.int)(unsafe.Pointer(style))) return C.GoString(_ret) } -func (this *QsciLexer) BlockStartKeyword() string { - _ret := C.QsciLexer_BlockStartKeyword(this.h) +func (this *QsciLexer) BlockStartKeyword(style *int) string { + _ret := C.QsciLexer_BlockStartKeyword(this.h, (*C.int)(unsafe.Pointer(style))) return C.GoString(_ret) } @@ -223,7 +232,7 @@ func (this *QsciLexer) DefaultPaperWithStyle(style int) *qt6.QColor { } func (this *QsciLexer) Editor() *QsciScintilla { - return UnsafeNewQsciScintilla(unsafe.Pointer(C.QsciLexer_Editor(this.h))) + return UnsafeNewQsciScintilla(unsafe.Pointer(C.QsciLexer_Editor(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QsciLexer) SetAPIs(apis *QsciAbstractAPIs) { @@ -271,20 +280,20 @@ func (this *QsciLexer) SetAutoIndentStyle(autoindentstyle int) { C.QsciLexer_SetAutoIndentStyle(this.h, (C.int)(autoindentstyle)) } -func (this *QsciLexer) SetColor(c *qt6.QColor) { - C.QsciLexer_SetColor(this.h, (*C.QColor)(c.UnsafePointer())) +func (this *QsciLexer) SetColor(c *qt6.QColor, style int) { + C.QsciLexer_SetColor(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) } -func (this *QsciLexer) SetEolFill(eoffill bool) { - C.QsciLexer_SetEolFill(this.h, (C.bool)(eoffill)) +func (this *QsciLexer) SetEolFill(eoffill bool, style int) { + C.QsciLexer_SetEolFill(this.h, (C.bool)(eoffill), (C.int)(style)) } -func (this *QsciLexer) SetFont(f *qt6.QFont) { - C.QsciLexer_SetFont(this.h, (*C.QFont)(f.UnsafePointer())) +func (this *QsciLexer) SetFont(f *qt6.QFont, style int) { + C.QsciLexer_SetFont(this.h, (*C.QFont)(f.UnsafePointer()), (C.int)(style)) } -func (this *QsciLexer) SetPaper(c *qt6.QColor) { - C.QsciLexer_SetPaper(this.h, (*C.QColor)(c.UnsafePointer())) +func (this *QsciLexer) SetPaper(c *qt6.QColor, style int) { + C.QsciLexer_SetPaper(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) } func (this *QsciLexer) ColorChanged(c *qt6.QColor, style int) { @@ -422,21 +431,6 @@ func QsciLexer_Tr3(s string, c string, n int) string { return _ret } -func (this *QsciLexer) BlockEnd1(style *int) string { - _ret := C.QsciLexer_BlockEnd1(this.h, (*C.int)(unsafe.Pointer(style))) - return C.GoString(_ret) -} - -func (this *QsciLexer) BlockStart1(style *int) string { - _ret := C.QsciLexer_BlockStart1(this.h, (*C.int)(unsafe.Pointer(style))) - return C.GoString(_ret) -} - -func (this *QsciLexer) BlockStartKeyword1(style *int) string { - _ret := C.QsciLexer_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style))) - return C.GoString(_ret) -} - func (this *QsciLexer) ReadSettings2(qs *qt6.QSettings, prefix string) bool { prefix_Cstring := C.CString(prefix) defer C.free(unsafe.Pointer(prefix_Cstring)) @@ -449,25 +443,9 @@ func (this *QsciLexer) WriteSettings2(qs *qt6.QSettings, prefix string) bool { return (bool)(C.QsciLexer_WriteSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring)) } -func (this *QsciLexer) SetColor2(c *qt6.QColor, style int) { - C.QsciLexer_SetColor2(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) -} - -func (this *QsciLexer) SetEolFill2(eoffill bool, style int) { - C.QsciLexer_SetEolFill2(this.h, (C.bool)(eoffill), (C.int)(style)) -} - -func (this *QsciLexer) SetFont2(f *qt6.QFont, style int) { - C.QsciLexer_SetFont2(this.h, (*C.QFont)(f.UnsafePointer()), (C.int)(style)) -} - -func (this *QsciLexer) SetPaper2(c *qt6.QColor, style int) { - C.QsciLexer_SetPaper2(this.h, (*C.QColor)(c.UnsafePointer()), (C.int)(style)) -} - // Delete this object from C++ memory. func (this *QsciLexer) Delete() { - C.QsciLexer_Delete(this.h) + C.QsciLexer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.h b/qt-restricted-extras/qscintilla6/gen_qscilexer.h index 490e7bb4..b782844f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.h @@ -18,6 +18,7 @@ extern "C" { class QColor; class QFont; class QMetaObject; +class QObject; class QSettings; class QsciAbstractAPIs; class QsciLexer; @@ -26,6 +27,7 @@ class QsciScintilla; typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSettings QSettings; typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; @@ -42,10 +44,10 @@ QsciAbstractAPIs* QsciLexer_Apis(const QsciLexer* self); const char* QsciLexer_AutoCompletionFillups(const QsciLexer* self); struct miqt_array /* of struct miqt_string */ QsciLexer_AutoCompletionWordSeparators(const QsciLexer* self); int QsciLexer_AutoIndentStyle(QsciLexer* self); -const char* QsciLexer_BlockEnd(const QsciLexer* self); +const char* QsciLexer_BlockEnd(const QsciLexer* self, int* style); int QsciLexer_BlockLookback(const QsciLexer* self); -const char* QsciLexer_BlockStart(const QsciLexer* self); -const char* QsciLexer_BlockStartKeyword(const QsciLexer* self); +const char* QsciLexer_BlockStart(const QsciLexer* self, int* style); +const char* QsciLexer_BlockStartKeyword(const QsciLexer* self, int* style); int QsciLexer_BraceStyle(const QsciLexer* self); bool QsciLexer_CaseSensitive(const QsciLexer* self); QColor* QsciLexer_Color(const QsciLexer* self, int style); @@ -75,10 +77,10 @@ int QsciLexer_StyleBitsNeeded(const QsciLexer* self); const char* QsciLexer_WordCharacters(const QsciLexer* self); bool QsciLexer_WriteSettings(const QsciLexer* self, QSettings* qs); void QsciLexer_SetAutoIndentStyle(QsciLexer* self, int autoindentstyle); -void QsciLexer_SetColor(QsciLexer* self, QColor* c); -void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill); -void QsciLexer_SetFont(QsciLexer* self, QFont* f); -void QsciLexer_SetPaper(QsciLexer* self, QColor* c); +void QsciLexer_SetColor(QsciLexer* self, QColor* c, int style); +void QsciLexer_SetEolFill(QsciLexer* self, bool eoffill, int style); +void QsciLexer_SetFont(QsciLexer* self, QFont* f, int style); +void QsciLexer_SetPaper(QsciLexer* self, QColor* c, int style); void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style); void QsciLexer_connect_ColorChanged(QsciLexer* self, intptr_t slot); void QsciLexer_EolFillChanged(QsciLexer* self, bool eolfilled, int style); @@ -89,18 +91,13 @@ void QsciLexer_PaperChanged(QsciLexer* self, QColor* c, int style); void QsciLexer_connect_PaperChanged(QsciLexer* self, intptr_t slot); void QsciLexer_PropertyChanged(QsciLexer* self, const char* prop, const char* val); void QsciLexer_connect_PropertyChanged(QsciLexer* self, intptr_t slot); +bool QsciLexer_ReadProperties(QsciLexer* self, QSettings* qs, struct miqt_string prefix); +bool QsciLexer_WriteProperties(const QsciLexer* self, QSettings* qs, struct miqt_string prefix); struct miqt_string QsciLexer_Tr2(const char* s, const char* c); struct miqt_string QsciLexer_Tr3(const char* s, const char* c, int n); -const char* QsciLexer_BlockEnd1(const QsciLexer* self, int* style); -const char* QsciLexer_BlockStart1(const QsciLexer* self, int* style); -const char* QsciLexer_BlockStartKeyword1(const QsciLexer* self, int* style); bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix); bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* prefix); -void QsciLexer_SetColor2(QsciLexer* self, QColor* c, int style); -void QsciLexer_SetEolFill2(QsciLexer* self, bool eoffill, int style); -void QsciLexer_SetFont2(QsciLexer* self, QFont* f, int style); -void QsciLexer_SetPaper2(QsciLexer* self, QColor* c, int style); -void QsciLexer_Delete(QsciLexer* self); +void QsciLexer_Delete(QsciLexer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp index 119e1fd8..2bd98500 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexeravs.h" #include "_cgo_export.h" -QsciLexerAVS* QsciLexerAVS_new() { - return new QsciLexerAVS(); +class MiqtVirtualQsciLexerAVS : public virtual QsciLexerAVS { +public: + + MiqtVirtualQsciLexerAVS(): QsciLexerAVS() {}; + MiqtVirtualQsciLexerAVS(QObject* parent): QsciLexerAVS(parent) {}; + + virtual ~MiqtVirtualQsciLexerAVS() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerAVS::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerAVS_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerAVS::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerAVS::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerAVS_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerAVS::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerAVS::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerAVS::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerAVS::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerAVS::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerAVS::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerAVS::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerAVS::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerAVS_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerAVS::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerAVS::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerAVS::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerAVS::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerAVS::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerAVS::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerAVS::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerAVS::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerAVS::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerAVS::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerAVS::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerAVS::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerAVS::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerAVS::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerAVS::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerAVS::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerAVS::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerAVS::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerAVS_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerAVS::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerAVS::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerAVS::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerAVS::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerAVS::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerAVS::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerAVS::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerAVS_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerAVS::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerAVS::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerAVS::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerAVS::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerAVS::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerAVS::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerAVS::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerAVS::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerAVS::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerAVS_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerAVS::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerAVS::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerAVS_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerAVS::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerAVS::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerAVS_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerAVS::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerAVS::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerAVS_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerAVS::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerAVS::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerAVS_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerAVS::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerAVS::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerAVS_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerAVS::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerAVS::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerAVS::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerAVS::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerAVS::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerAVS::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerAVS::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerAVS::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerAVS_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerAVS::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerAVS::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerAVS::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerAVS::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerAVS_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerAVS::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(); + *outptr_QsciLexerAVS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerAVS* QsciLexerAVS_new2(QObject* parent) { - return new QsciLexerAVS(parent); +void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(parent); + *outptr_QsciLexerAVS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self) { @@ -117,7 +1001,291 @@ struct miqt_string QsciLexerAVS_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerAVS_Delete(QsciLexerAVS* self) { - delete self; +void QsciLexerAVS_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerAVS_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerAVS_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerAVS_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerAVS_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Language = slot; +} + +void QsciLexerAVS_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerAVS_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerAVS_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__LexerId = slot; +} + +int QsciLexerAVS_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerAVS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerAVS_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerAVS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerAVS_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerAVS_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerAVS_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerAVS_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerAVS_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerAVS_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerAVS_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerAVS_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerAVS_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerAVS_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerAVS_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerAVS_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerAVS_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerAVS_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerAVS_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Color(style); +} + +void QsciLexerAVS_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerAVS_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerAVS_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerAVS_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Font(style); +} + +void QsciLexerAVS_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerAVS_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerAVS_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerAVS_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerAVS_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerAVS_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerAVS_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Description = slot; +} + +void QsciLexerAVS_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerAVS_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerAVS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerAVS_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerAVS_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerAVS_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerAVS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerAVS_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerAVS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerAVS_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerAVS_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerAVS_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerAVS_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerAVS_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerAVS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerAVS_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerAVS_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerAVS_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerAVS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerAVS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerAVS_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetColor = slot; +} + +void QsciLexerAVS_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerAVS_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerAVS_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerAVS_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetFont = slot; +} + +void QsciLexerAVS_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerAVS_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerAVS_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerAVS_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerAVS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerAVS_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerAVS*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerAVS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerAVS*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerAVS_Delete(QsciLexerAVS* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go index 37ded9dd..5402a301 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerAVS struct { - h *C.QsciLexerAVS + h *C.QsciLexerAVS + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerAVS) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerAVS(h *C.QsciLexerAVS) *QsciLexerAVS { +// newQsciLexerAVS constructs the type using only CGO pointers. +func newQsciLexerAVS(h *C.QsciLexerAVS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerAVS { if h == nil { return nil } - return &QsciLexerAVS{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerAVS{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerAVS(h unsafe.Pointer) *QsciLexerAVS { - return newQsciLexerAVS((*C.QsciLexerAVS)(h)) +// UnsafeNewQsciLexerAVS constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerAVS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerAVS { + if h == nil { + return nil + } + + return &QsciLexerAVS{h: (*C.QsciLexerAVS)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerAVS constructs a new QsciLexerAVS object. func NewQsciLexerAVS() *QsciLexerAVS { - ret := C.QsciLexerAVS_new() - return newQsciLexerAVS(ret) + var outptr_QsciLexerAVS *C.QsciLexerAVS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerAVS_new(&outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerAVS2 constructs a new QsciLexerAVS object. func NewQsciLexerAVS2(parent *qt6.QObject) *QsciLexerAVS { - ret := C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerAVS(ret) + var outptr_QsciLexerAVS *C.QsciLexerAVS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerAVS) MetaObject() *qt6.QMetaObject { @@ -182,9 +204,940 @@ func QsciLexerAVS_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerAVS) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerAVS_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerAVS) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerAVS_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetFoldComments +func miqt_exec_callback_QsciLexerAVS_SetFoldComments(self *C.QsciLexerAVS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerAVS_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerAVS) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerAVS_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetFoldCompact +func miqt_exec_callback_QsciLexerAVS_SetFoldCompact(self *C.QsciLexerAVS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_Language() string { + + _ret := C.QsciLexerAVS_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnLanguage(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Language +func miqt_exec_callback_QsciLexerAVS_Language(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerAVS_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnLexer(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Lexer +func miqt_exec_callback_QsciLexerAVS_Lexer(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerAVS_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnLexerId(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_LexerId +func miqt_exec_callback_QsciLexerAVS_LexerId(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerAVS_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_AutoCompletionFillups +func miqt_exec_callback_QsciLexerAVS_AutoCompletionFillups(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerAVS_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerAVS) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerAVS_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerAVS_AutoCompletionWordSeparators(self *C.QsciLexerAVS, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerAVS_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerAVS_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockEnd +func miqt_exec_callback_QsciLexerAVS_BlockEnd(self *C.QsciLexerAVS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerAVS_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockLookback +func miqt_exec_callback_QsciLexerAVS_BlockLookback(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerAVS_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerAVS_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockStart +func miqt_exec_callback_QsciLexerAVS_BlockStart(self *C.QsciLexerAVS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerAVS_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerAVS_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BlockStartKeyword +func miqt_exec_callback_QsciLexerAVS_BlockStartKeyword(self *C.QsciLexerAVS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerAVS_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_BraceStyle +func miqt_exec_callback_QsciLexerAVS_BraceStyle(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerAVS_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerAVS_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_CaseSensitive +func miqt_exec_callback_QsciLexerAVS_CaseSensitive(self *C.QsciLexerAVS, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerAVS_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerAVS_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Color +func miqt_exec_callback_QsciLexerAVS_Color(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerAVS_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerAVS) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerAVS_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_EolFill +func miqt_exec_callback_QsciLexerAVS_EolFill(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerAVS_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerAVS_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Font +func miqt_exec_callback_QsciLexerAVS_Font(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerAVS_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_IndentationGuideView +func miqt_exec_callback_QsciLexerAVS_IndentationGuideView(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerAVS_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerAVS_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Keywords +func miqt_exec_callback_QsciLexerAVS_Keywords(self *C.QsciLexerAVS, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerAVS_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultStyle +func miqt_exec_callback_QsciLexerAVS_DefaultStyle(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerAVS_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerAVS) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerAVS_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Description +func miqt_exec_callback_QsciLexerAVS_Description(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerAVS) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerAVS_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerAVS_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_Paper +func miqt_exec_callback_QsciLexerAVS_Paper(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerAVS_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerAVS_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerAVS_DefaultColorWithStyle(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerAVS_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerAVS) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerAVS_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultEolFill +func miqt_exec_callback_QsciLexerAVS_DefaultEolFill(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerAVS_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerAVS_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerAVS_DefaultFontWithStyle(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerAVS_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerAVS) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerAVS_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerAVS_DefaultPaperWithStyle(self *C.QsciLexerAVS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerAVS_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerAVS) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerAVS_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetEditor +func miqt_exec_callback_QsciLexerAVS_SetEditor(self *C.QsciLexerAVS, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_RefreshProperties() { + + C.QsciLexerAVS_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerAVS) OnRefreshProperties(slot func(super func())) { + C.QsciLexerAVS_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_RefreshProperties +func miqt_exec_callback_QsciLexerAVS_RefreshProperties(self *C.QsciLexerAVS, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerAVS) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerAVS_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerAVS) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerAVS_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_StyleBitsNeeded +func miqt_exec_callback_QsciLexerAVS_StyleBitsNeeded(self *C.QsciLexerAVS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerAVS_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerAVS) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerAVS_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_WordCharacters +func miqt_exec_callback_QsciLexerAVS_WordCharacters(self *C.QsciLexerAVS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerAVS) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerAVS_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerAVS) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerAVS_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerAVS_SetAutoIndentStyle(self *C.QsciLexerAVS, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerAVS_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerAVS_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetColor +func miqt_exec_callback_QsciLexerAVS_SetColor(self *C.QsciLexerAVS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerAVS_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerAVS_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetEolFill +func miqt_exec_callback_QsciLexerAVS_SetEolFill(self *C.QsciLexerAVS, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerAVS_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerAVS_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetFont +func miqt_exec_callback_QsciLexerAVS_SetFont(self *C.QsciLexerAVS, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerAVS_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerAVS) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerAVS_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_SetPaper +func miqt_exec_callback_QsciLexerAVS_SetPaper(self *C.QsciLexerAVS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerAVS) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerAVS_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerAVS) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerAVS_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_ReadProperties +func miqt_exec_callback_QsciLexerAVS_ReadProperties(self *C.QsciLexerAVS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerAVS) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerAVS_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerAVS) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerAVS_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerAVS_WriteProperties +func miqt_exec_callback_QsciLexerAVS_WriteProperties(self *C.QsciLexerAVS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerAVS) Delete() { - C.QsciLexerAVS_Delete(this.h) + C.QsciLexerAVS_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h index ceff2d83..082bcdcf 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerAVS; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerAVS QsciLexerAVS; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerAVS* QsciLexerAVS_new(); -QsciLexerAVS* QsciLexerAVS_new2(QObject* parent); +void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self); void* QsciLexerAVS_Metacast(QsciLexerAVS* self, const char* param1); struct miqt_string QsciLexerAVS_Tr(const char* s); @@ -48,7 +54,79 @@ void QsciLexerAVS_SetFoldComments(QsciLexerAVS* self, bool fold); void QsciLexerAVS_SetFoldCompact(QsciLexerAVS* self, bool fold); struct miqt_string QsciLexerAVS_Tr2(const char* s, const char* c); struct miqt_string QsciLexerAVS_Tr3(const char* s, const char* c, int n); -void QsciLexerAVS_Delete(QsciLexerAVS* self); +void QsciLexerAVS_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerAVS_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerAVS_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_Language(const void* self); +void QsciLexerAVS_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_Lexer(const void* self); +void QsciLexerAVS_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_LexerId(const void* self); +void QsciLexerAVS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerAVS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerAVS_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerAVS_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerAVS_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_BlockLookback(const void* self); +void QsciLexerAVS_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerAVS_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerAVS_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_BraceStyle(const void* self); +void QsciLexerAVS_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_CaseSensitive(const void* self); +void QsciLexerAVS_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_Color(const void* self, int style); +void QsciLexerAVS_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_EolFill(const void* self, int style); +void QsciLexerAVS_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerAVS_virtualbase_Font(const void* self, int style); +void QsciLexerAVS_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_IndentationGuideView(const void* self); +void QsciLexerAVS_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_Keywords(const void* self, int set); +void QsciLexerAVS_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_DefaultStyle(const void* self); +void QsciLexerAVS_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerAVS_virtualbase_Description(const void* self, int style); +void QsciLexerAVS_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_Paper(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerAVS_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerAVS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerAVS_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerAVS_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerAVS_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_RefreshProperties(void* self); +void QsciLexerAVS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerAVS_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerAVS_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerAVS_virtualbase_WordCharacters(const void* self); +void QsciLexerAVS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerAVS_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerAVS_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerAVS_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerAVS_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerAVS_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerAVS_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerAVS_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerAVS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerAVS_Delete(QsciLexerAVS* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp index 6c47dcd9..9b3e19ff 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexerbash.h" #include "_cgo_export.h" -QsciLexerBash* QsciLexerBash_new() { - return new QsciLexerBash(); +class MiqtVirtualQsciLexerBash : public virtual QsciLexerBash { +public: + + MiqtVirtualQsciLexerBash(): QsciLexerBash() {}; + MiqtVirtualQsciLexerBash(QObject* parent): QsciLexerBash(parent) {}; + + virtual ~MiqtVirtualQsciLexerBash() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerBash::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerBash_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerBash::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerBash::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerBash_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerBash::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerBash::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerBash::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerBash::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerBash::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerBash::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerBash::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerBash::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerBash_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerBash::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerBash::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerBash::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerBash::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerBash::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerBash::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerBash::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerBash::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerBash::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerBash::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerBash::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerBash::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerBash::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerBash::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerBash::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerBash::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerBash::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerBash::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBash_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerBash::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerBash::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerBash::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerBash::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerBash::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerBash::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerBash::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerBash_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerBash::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerBash::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerBash::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerBash::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerBash::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerBash::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerBash::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerBash::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerBash::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBash_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerBash::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerBash::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerBash_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerBash::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerBash::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerBash_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerBash::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerBash::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBash_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerBash::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerBash::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBash_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerBash::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerBash::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerBash_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerBash::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerBash::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerBash::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerBash::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerBash::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerBash::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerBash::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerBash::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBash_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerBash::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerBash::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBash::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerBash::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBash_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBash::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(); + *outptr_QsciLexerBash = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerBash* QsciLexerBash_new2(QObject* parent) { - return new QsciLexerBash(parent); +void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(parent); + *outptr_QsciLexerBash = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self) { @@ -125,7 +1009,291 @@ struct miqt_string QsciLexerBash_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerBash_Delete(QsciLexerBash* self) { - delete self; +void QsciLexerBash_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerBash_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerBash_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerBash_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerBash_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Language = slot; +} + +void QsciLexerBash_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerBash_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerBash_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__LexerId = slot; +} + +int QsciLexerBash_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerBash_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerBash_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerBash_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerBash_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerBash_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerBash_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerBash_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerBash_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerBash_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerBash_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerBash_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerBash_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerBash_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerBash_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerBash_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerBash_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerBash_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerBash_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Color(style); +} + +void QsciLexerBash_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerBash_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerBash_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerBash_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Font(style); +} + +void QsciLexerBash_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerBash_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerBash_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerBash_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerBash_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerBash_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerBash_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Description = slot; +} + +void QsciLexerBash_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerBash_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerBash_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerBash_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerBash_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerBash_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerBash_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerBash_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerBash_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerBash_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerBash_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerBash_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerBash_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerBash_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerBash_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerBash_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerBash_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerBash_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerBash_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerBash_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerBash_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetColor = slot; +} + +void QsciLexerBash_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerBash_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerBash_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerBash_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetFont = slot; +} + +void QsciLexerBash_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerBash_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerBash_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerBash_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerBash_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerBash*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerBash_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBash*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerBash_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerBash*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerBash_Delete(QsciLexerBash* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go index 485dad34..7e8612f8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -34,7 +35,8 @@ const ( ) type QsciLexerBash struct { - h *C.QsciLexerBash + h *C.QsciLexerBash + isSubclass bool *QsciLexer } @@ -52,27 +54,47 @@ func (this *QsciLexerBash) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerBash(h *C.QsciLexerBash) *QsciLexerBash { +// newQsciLexerBash constructs the type using only CGO pointers. +func newQsciLexerBash(h *C.QsciLexerBash, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBash { if h == nil { return nil } - return &QsciLexerBash{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerBash{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerBash(h unsafe.Pointer) *QsciLexerBash { - return newQsciLexerBash((*C.QsciLexerBash)(h)) +// UnsafeNewQsciLexerBash constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerBash(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBash { + if h == nil { + return nil + } + + return &QsciLexerBash{h: (*C.QsciLexerBash)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerBash constructs a new QsciLexerBash object. func NewQsciLexerBash() *QsciLexerBash { - ret := C.QsciLexerBash_new() - return newQsciLexerBash(ret) + var outptr_QsciLexerBash *C.QsciLexerBash = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBash_new(&outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerBash2 constructs a new QsciLexerBash object. func NewQsciLexerBash2(parent *qt6.QObject) *QsciLexerBash { - ret := C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerBash(ret) + var outptr_QsciLexerBash *C.QsciLexerBash = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerBash) MetaObject() *qt6.QMetaObject { @@ -192,9 +214,940 @@ func QsciLexerBash_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerBash) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerBash_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerBash) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerBash_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetFoldComments +func miqt_exec_callback_QsciLexerBash_SetFoldComments(self *C.QsciLexerBash, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerBash_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerBash) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerBash_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetFoldCompact +func miqt_exec_callback_QsciLexerBash_SetFoldCompact(self *C.QsciLexerBash, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_Language() string { + + _ret := C.QsciLexerBash_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnLanguage(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Language +func miqt_exec_callback_QsciLexerBash_Language(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerBash_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnLexer(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Lexer +func miqt_exec_callback_QsciLexerBash_Lexer(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerBash_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnLexerId(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_LexerId +func miqt_exec_callback_QsciLexerBash_LexerId(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerBash_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_AutoCompletionFillups +func miqt_exec_callback_QsciLexerBash_AutoCompletionFillups(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerBash_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerBash) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerBash_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerBash_AutoCompletionWordSeparators(self *C.QsciLexerBash, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerBash) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerBash_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBash_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockEnd +func miqt_exec_callback_QsciLexerBash_BlockEnd(self *C.QsciLexerBash, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerBash_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockLookback +func miqt_exec_callback_QsciLexerBash_BlockLookback(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerBash_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBash_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockStart +func miqt_exec_callback_QsciLexerBash_BlockStart(self *C.QsciLexerBash, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerBash_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBash_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BlockStartKeyword +func miqt_exec_callback_QsciLexerBash_BlockStartKeyword(self *C.QsciLexerBash, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerBash_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_BraceStyle +func miqt_exec_callback_QsciLexerBash_BraceStyle(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerBash_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerBash_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_CaseSensitive +func miqt_exec_callback_QsciLexerBash_CaseSensitive(self *C.QsciLexerBash, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerBash_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBash_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Color +func miqt_exec_callback_QsciLexerBash_Color(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerBash_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBash) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBash_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_EolFill +func miqt_exec_callback_QsciLexerBash_EolFill(self *C.QsciLexerBash, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerBash_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerBash_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Font +func miqt_exec_callback_QsciLexerBash_Font(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerBash_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_IndentationGuideView +func miqt_exec_callback_QsciLexerBash_IndentationGuideView(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerBash_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerBash_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Keywords +func miqt_exec_callback_QsciLexerBash_Keywords(self *C.QsciLexerBash, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerBash_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultStyle +func miqt_exec_callback_QsciLexerBash_DefaultStyle(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerBash_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerBash) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerBash_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Description +func miqt_exec_callback_QsciLexerBash_Description(self *C.QsciLexerBash, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerBash) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerBash_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBash_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_Paper +func miqt_exec_callback_QsciLexerBash_Paper(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerBash_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBash_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerBash_DefaultColorWithStyle(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerBash_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBash) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBash_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultEolFill +func miqt_exec_callback_QsciLexerBash_DefaultEolFill(self *C.QsciLexerBash, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerBash_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerBash_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerBash_DefaultFontWithStyle(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerBash_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBash) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBash_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerBash_DefaultPaperWithStyle(self *C.QsciLexerBash, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBash) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerBash_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerBash) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerBash_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetEditor +func miqt_exec_callback_QsciLexerBash_SetEditor(self *C.QsciLexerBash, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_RefreshProperties() { + + C.QsciLexerBash_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerBash) OnRefreshProperties(slot func(super func())) { + C.QsciLexerBash_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_RefreshProperties +func miqt_exec_callback_QsciLexerBash_RefreshProperties(self *C.QsciLexerBash, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerBash) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerBash_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBash) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerBash_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_StyleBitsNeeded +func miqt_exec_callback_QsciLexerBash_StyleBitsNeeded(self *C.QsciLexerBash, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerBash_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBash) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerBash_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_WordCharacters +func miqt_exec_callback_QsciLexerBash_WordCharacters(self *C.QsciLexerBash, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBash) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerBash_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerBash) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerBash_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerBash_SetAutoIndentStyle(self *C.QsciLexerBash, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerBash) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerBash_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerBash_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetColor +func miqt_exec_callback_QsciLexerBash_SetColor(self *C.QsciLexerBash, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerBash_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerBash_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetEolFill +func miqt_exec_callback_QsciLexerBash_SetEolFill(self *C.QsciLexerBash, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerBash_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerBash_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetFont +func miqt_exec_callback_QsciLexerBash_SetFont(self *C.QsciLexerBash, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerBash_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBash) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerBash_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_SetPaper +func miqt_exec_callback_QsciLexerBash_SetPaper(self *C.QsciLexerBash, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerBash) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBash_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBash) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerBash_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_ReadProperties +func miqt_exec_callback_QsciLexerBash_ReadProperties(self *C.QsciLexerBash, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBash) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBash_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBash) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerBash_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBash_WriteProperties +func miqt_exec_callback_QsciLexerBash_WriteProperties(self *C.QsciLexerBash, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerBash) Delete() { - C.QsciLexerBash_Delete(this.h) + C.QsciLexerBash_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h index 5ae9b07d..50720712 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerBash; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerBash QsciLexerBash; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerBash* QsciLexerBash_new(); -QsciLexerBash* QsciLexerBash_new2(QObject* parent); +void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self); void* QsciLexerBash_Metacast(QsciLexerBash* self, const char* param1); struct miqt_string QsciLexerBash_Tr(const char* s); @@ -50,7 +56,79 @@ void QsciLexerBash_SetFoldComments(QsciLexerBash* self, bool fold); void QsciLexerBash_SetFoldCompact(QsciLexerBash* self, bool fold); struct miqt_string QsciLexerBash_Tr2(const char* s, const char* c); struct miqt_string QsciLexerBash_Tr3(const char* s, const char* c, int n); -void QsciLexerBash_Delete(QsciLexerBash* self); +void QsciLexerBash_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerBash_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerBash_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_Language(const void* self); +void QsciLexerBash_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_Lexer(const void* self); +void QsciLexerBash_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_LexerId(const void* self); +void QsciLexerBash_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerBash_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerBash_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerBash_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerBash_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_BlockLookback(const void* self); +void QsciLexerBash_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerBash_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerBash_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_BraceStyle(const void* self); +void QsciLexerBash_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_CaseSensitive(const void* self); +void QsciLexerBash_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_Color(const void* self, int style); +void QsciLexerBash_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_EolFill(const void* self, int style); +void QsciLexerBash_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerBash_virtualbase_Font(const void* self, int style); +void QsciLexerBash_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_IndentationGuideView(const void* self); +void QsciLexerBash_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_Keywords(const void* self, int set); +void QsciLexerBash_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_DefaultStyle(const void* self); +void QsciLexerBash_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerBash_virtualbase_Description(const void* self, int style); +void QsciLexerBash_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_Paper(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerBash_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerBash_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBash_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerBash_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerBash_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_RefreshProperties(void* self); +void QsciLexerBash_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerBash_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerBash_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerBash_virtualbase_WordCharacters(const void* self); +void QsciLexerBash_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerBash_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerBash_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerBash_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerBash_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerBash_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerBash_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBash_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerBash_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBash_Delete(QsciLexerBash* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp index 34c99c75..9e4d4d2c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerbatch.h" #include "_cgo_export.h" -QsciLexerBatch* QsciLexerBatch_new() { - return new QsciLexerBatch(); +class MiqtVirtualQsciLexerBatch : public virtual QsciLexerBatch { +public: + + MiqtVirtualQsciLexerBatch(): QsciLexerBatch() {}; + MiqtVirtualQsciLexerBatch(QObject* parent): QsciLexerBatch(parent) {}; + + virtual ~MiqtVirtualQsciLexerBatch() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerBatch::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerBatch::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerBatch::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerBatch::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerBatch::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerBatch::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerBatch::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerBatch_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerBatch::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerBatch::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerBatch::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerBatch::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerBatch::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerBatch::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerBatch::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerBatch::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerBatch::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerBatch::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerBatch::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerBatch::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerBatch::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerBatch::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerBatch::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerBatch::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerBatch::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerBatch::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBatch_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerBatch::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerBatch::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerBatch::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerBatch::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerBatch::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerBatch::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerBatch::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerBatch_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerBatch::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerBatch::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerBatch::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerBatch::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerBatch::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerBatch::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerBatch::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerBatch::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerBatch::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerBatch_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerBatch::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerBatch::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerBatch_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerBatch::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerBatch::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerBatch_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerBatch::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerBatch::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerBatch_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerBatch::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerBatch::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerBatch_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerBatch::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerBatch::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerBatch_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerBatch::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerBatch::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerBatch::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerBatch::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerBatch::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerBatch::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerBatch::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerBatch::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerBatch_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerBatch::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerBatch::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBatch::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerBatch::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerBatch_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerBatch::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(); + *outptr_QsciLexerBatch = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerBatch* QsciLexerBatch_new2(QObject* parent) { - return new QsciLexerBatch(parent); +void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(parent); + *outptr_QsciLexerBatch = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self) { @@ -105,7 +941,275 @@ struct miqt_string QsciLexerBatch_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerBatch_Delete(QsciLexerBatch* self) { - delete self; +void QsciLexerBatch_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Language = slot; +} + +void QsciLexerBatch_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerBatch_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerBatch_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__LexerId = slot; +} + +int QsciLexerBatch_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerBatch_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerBatch_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerBatch_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerBatch_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerBatch_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerBatch_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerBatch_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerBatch_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerBatch_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerBatch_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerBatch_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerBatch_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerBatch_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerBatch_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerBatch_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerBatch_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerBatch_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerBatch_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Color(style); +} + +void QsciLexerBatch_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerBatch_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerBatch_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerBatch_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Font(style); +} + +void QsciLexerBatch_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerBatch_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerBatch_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerBatch_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerBatch_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerBatch_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerBatch_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Description = slot; +} + +void QsciLexerBatch_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerBatch_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerBatch_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerBatch_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerBatch_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerBatch_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerBatch_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerBatch_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerBatch_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerBatch_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerBatch_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerBatch_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerBatch_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerBatch_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerBatch_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerBatch_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerBatch_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerBatch_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerBatch_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerBatch_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerBatch_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetColor = slot; +} + +void QsciLexerBatch_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerBatch_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerBatch_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerBatch_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetFont = slot; +} + +void QsciLexerBatch_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerBatch_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerBatch_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerBatch_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerBatch_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerBatch_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerBatch*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerBatch_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerBatch*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerBatch_Delete(QsciLexerBatch* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go index 606c2f52..17668186 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -28,7 +29,8 @@ const ( ) type QsciLexerBatch struct { - h *C.QsciLexerBatch + h *C.QsciLexerBatch + isSubclass bool *QsciLexer } @@ -46,27 +48,47 @@ func (this *QsciLexerBatch) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerBatch(h *C.QsciLexerBatch) *QsciLexerBatch { +// newQsciLexerBatch constructs the type using only CGO pointers. +func newQsciLexerBatch(h *C.QsciLexerBatch, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBatch { if h == nil { return nil } - return &QsciLexerBatch{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerBatch{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerBatch(h unsafe.Pointer) *QsciLexerBatch { - return newQsciLexerBatch((*C.QsciLexerBatch)(h)) +// UnsafeNewQsciLexerBatch constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerBatch(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBatch { + if h == nil { + return nil + } + + return &QsciLexerBatch{h: (*C.QsciLexerBatch)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerBatch constructs a new QsciLexerBatch object. func NewQsciLexerBatch() *QsciLexerBatch { - ret := C.QsciLexerBatch_new() - return newQsciLexerBatch(ret) + var outptr_QsciLexerBatch *C.QsciLexerBatch = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBatch_new(&outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerBatch2 constructs a new QsciLexerBatch object. func NewQsciLexerBatch2(parent *qt6.QObject) *QsciLexerBatch { - ret := C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerBatch(ret) + var outptr_QsciLexerBatch *C.QsciLexerBatch = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerBatch) MetaObject() *qt6.QMetaObject { @@ -166,9 +188,894 @@ func QsciLexerBatch_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerBatch) callVirtualBase_Language() string { + + _ret := C.QsciLexerBatch_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnLanguage(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Language +func miqt_exec_callback_QsciLexerBatch_Language(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerBatch_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnLexer(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Lexer +func miqt_exec_callback_QsciLexerBatch_Lexer(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerBatch_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnLexerId(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_LexerId +func miqt_exec_callback_QsciLexerBatch_LexerId(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerBatch_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_AutoCompletionFillups +func miqt_exec_callback_QsciLexerBatch_AutoCompletionFillups(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerBatch_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerBatch) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerBatch_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerBatch_AutoCompletionWordSeparators(self *C.QsciLexerBatch, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerBatch_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBatch_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockEnd +func miqt_exec_callback_QsciLexerBatch_BlockEnd(self *C.QsciLexerBatch, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerBatch_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockLookback +func miqt_exec_callback_QsciLexerBatch_BlockLookback(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerBatch_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBatch_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockStart +func miqt_exec_callback_QsciLexerBatch_BlockStart(self *C.QsciLexerBatch, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerBatch_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerBatch_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BlockStartKeyword +func miqt_exec_callback_QsciLexerBatch_BlockStartKeyword(self *C.QsciLexerBatch, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerBatch_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_BraceStyle +func miqt_exec_callback_QsciLexerBatch_BraceStyle(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerBatch_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerBatch_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_CaseSensitive +func miqt_exec_callback_QsciLexerBatch_CaseSensitive(self *C.QsciLexerBatch, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerBatch_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBatch_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Color +func miqt_exec_callback_QsciLexerBatch_Color(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerBatch_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBatch) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBatch_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_EolFill +func miqt_exec_callback_QsciLexerBatch_EolFill(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerBatch_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerBatch_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Font +func miqt_exec_callback_QsciLexerBatch_Font(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerBatch_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_IndentationGuideView +func miqt_exec_callback_QsciLexerBatch_IndentationGuideView(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerBatch_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerBatch_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Keywords +func miqt_exec_callback_QsciLexerBatch_Keywords(self *C.QsciLexerBatch, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerBatch_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultStyle +func miqt_exec_callback_QsciLexerBatch_DefaultStyle(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerBatch_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerBatch) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerBatch_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Description +func miqt_exec_callback_QsciLexerBatch_Description(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerBatch) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerBatch_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBatch_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_Paper +func miqt_exec_callback_QsciLexerBatch_Paper(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerBatch_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBatch_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerBatch_DefaultColorWithStyle(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerBatch_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerBatch) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerBatch_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultEolFill +func miqt_exec_callback_QsciLexerBatch_DefaultEolFill(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerBatch_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerBatch_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerBatch_DefaultFontWithStyle(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerBatch_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerBatch) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerBatch_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerBatch_DefaultPaperWithStyle(self *C.QsciLexerBatch, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerBatch_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerBatch) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerBatch_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetEditor +func miqt_exec_callback_QsciLexerBatch_SetEditor(self *C.QsciLexerBatch, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerBatch) callVirtualBase_RefreshProperties() { + + C.QsciLexerBatch_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerBatch) OnRefreshProperties(slot func(super func())) { + C.QsciLexerBatch_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_RefreshProperties +func miqt_exec_callback_QsciLexerBatch_RefreshProperties(self *C.QsciLexerBatch, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerBatch) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerBatch_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerBatch) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerBatch_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_StyleBitsNeeded +func miqt_exec_callback_QsciLexerBatch_StyleBitsNeeded(self *C.QsciLexerBatch, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerBatch_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerBatch) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerBatch_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_WordCharacters +func miqt_exec_callback_QsciLexerBatch_WordCharacters(self *C.QsciLexerBatch, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerBatch) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerBatch_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerBatch) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerBatch_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerBatch_SetAutoIndentStyle(self *C.QsciLexerBatch, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerBatch_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerBatch_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetColor +func miqt_exec_callback_QsciLexerBatch_SetColor(self *C.QsciLexerBatch, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerBatch_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerBatch_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetEolFill +func miqt_exec_callback_QsciLexerBatch_SetEolFill(self *C.QsciLexerBatch, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerBatch_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerBatch_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetFont +func miqt_exec_callback_QsciLexerBatch_SetFont(self *C.QsciLexerBatch, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerBatch_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerBatch) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerBatch_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_SetPaper +func miqt_exec_callback_QsciLexerBatch_SetPaper(self *C.QsciLexerBatch, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerBatch) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBatch_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBatch) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerBatch_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_ReadProperties +func miqt_exec_callback_QsciLexerBatch_ReadProperties(self *C.QsciLexerBatch, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerBatch) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerBatch_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerBatch) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerBatch_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerBatch_WriteProperties +func miqt_exec_callback_QsciLexerBatch_WriteProperties(self *C.QsciLexerBatch, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerBatch) Delete() { - C.QsciLexerBatch_Delete(this.h) + C.QsciLexerBatch_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h index 9e89f715..ecbc070d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerBatch; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerBatch QsciLexerBatch; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerBatch* QsciLexerBatch_new(); -QsciLexerBatch* QsciLexerBatch_new2(QObject* parent); +void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self); void* QsciLexerBatch_Metacast(QsciLexerBatch* self, const char* param1); struct miqt_string QsciLexerBatch_Tr(const char* s); @@ -45,7 +51,75 @@ const char* QsciLexerBatch_Keywords(const QsciLexerBatch* self, int set); struct miqt_string QsciLexerBatch_Description(const QsciLexerBatch* self, int style); struct miqt_string QsciLexerBatch_Tr2(const char* s, const char* c); struct miqt_string QsciLexerBatch_Tr3(const char* s, const char* c, int n); -void QsciLexerBatch_Delete(QsciLexerBatch* self); +void QsciLexerBatch_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_Language(const void* self); +void QsciLexerBatch_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_Lexer(const void* self); +void QsciLexerBatch_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_LexerId(const void* self); +void QsciLexerBatch_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerBatch_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerBatch_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerBatch_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerBatch_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_BlockLookback(const void* self); +void QsciLexerBatch_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerBatch_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerBatch_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_BraceStyle(const void* self); +void QsciLexerBatch_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_CaseSensitive(const void* self); +void QsciLexerBatch_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_Color(const void* self, int style); +void QsciLexerBatch_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_EolFill(const void* self, int style); +void QsciLexerBatch_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerBatch_virtualbase_Font(const void* self, int style); +void QsciLexerBatch_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_IndentationGuideView(const void* self); +void QsciLexerBatch_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_Keywords(const void* self, int set); +void QsciLexerBatch_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_DefaultStyle(const void* self); +void QsciLexerBatch_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerBatch_virtualbase_Description(const void* self, int style); +void QsciLexerBatch_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_Paper(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerBatch_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerBatch_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerBatch_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerBatch_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerBatch_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_RefreshProperties(void* self); +void QsciLexerBatch_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerBatch_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerBatch_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerBatch_virtualbase_WordCharacters(const void* self); +void QsciLexerBatch_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerBatch_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerBatch_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerBatch_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerBatch_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerBatch_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerBatch_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBatch_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerBatch_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerBatch_Delete(QsciLexerBatch* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp index 41dff878..1e52fee9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexercmake.h" #include "_cgo_export.h" -QsciLexerCMake* QsciLexerCMake_new() { - return new QsciLexerCMake(); +class MiqtVirtualQsciLexerCMake : public virtual QsciLexerCMake { +public: + + MiqtVirtualQsciLexerCMake(): QsciLexerCMake() {}; + MiqtVirtualQsciLexerCMake(QObject* parent): QsciLexerCMake(parent) {}; + + virtual ~MiqtVirtualQsciLexerCMake() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerCMake::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCMake_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerCMake::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCMake::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCMake::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCMake::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCMake::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCMake::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCMake::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCMake::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCMake_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCMake::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCMake::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCMake::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCMake::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCMake::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCMake::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCMake::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCMake::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCMake::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCMake::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCMake::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCMake::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCMake::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCMake::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCMake::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCMake::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCMake::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCMake::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCMake_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCMake::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCMake::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCMake::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCMake::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCMake::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCMake::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCMake::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCMake_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCMake::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCMake::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCMake::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCMake::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCMake::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCMake::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCMake::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCMake::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCMake::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCMake_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCMake::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCMake::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCMake_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCMake::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCMake::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCMake_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCMake::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCMake::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCMake_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCMake::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCMake::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCMake_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCMake::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCMake::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCMake_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCMake::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCMake::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCMake::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCMake::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCMake::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCMake::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCMake::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCMake::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCMake_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCMake::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCMake::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCMake::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCMake::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCMake_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCMake::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(); + *outptr_QsciLexerCMake = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCMake* QsciLexerCMake_new2(QObject* parent) { - return new QsciLexerCMake(parent); +void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(parent); + *outptr_QsciLexerCMake = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self) { @@ -105,7 +965,283 @@ struct miqt_string QsciLexerCMake_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerCMake_Delete(QsciLexerCMake* self) { - delete self; +void QsciLexerCMake_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerCMake_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerCMake_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Language = slot; +} + +void QsciLexerCMake_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCMake_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCMake_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCMake_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCMake_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCMake_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCMake_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCMake_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCMake_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCMake_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCMake_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCMake_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCMake_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCMake_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCMake_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCMake_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCMake_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCMake_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCMake_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCMake_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCMake_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCMake_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCMake_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCMake_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCMake_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCMake_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCMake_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCMake_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCMake_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCMake_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCMake_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCMake_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCMake_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Description = slot; +} + +void QsciLexerCMake_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCMake_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCMake_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCMake_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCMake_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCMake_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCMake_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCMake_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCMake_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCMake_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCMake_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCMake_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCMake_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCMake_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCMake_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCMake_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCMake_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCMake_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCMake_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCMake_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCMake_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCMake_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCMake_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCMake_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCMake_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCMake_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCMake_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCMake_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCMake_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCMake_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCMake_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCMake*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCMake_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCMake*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCMake_Delete(QsciLexerCMake* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go index 883d4929..e0c8acb9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerCMake struct { - h *C.QsciLexerCMake + h *C.QsciLexerCMake + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerCMake) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCMake(h *C.QsciLexerCMake) *QsciLexerCMake { +// newQsciLexerCMake constructs the type using only CGO pointers. +func newQsciLexerCMake(h *C.QsciLexerCMake, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCMake { if h == nil { return nil } - return &QsciLexerCMake{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCMake{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCMake(h unsafe.Pointer) *QsciLexerCMake { - return newQsciLexerCMake((*C.QsciLexerCMake)(h)) +// UnsafeNewQsciLexerCMake constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCMake(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCMake { + if h == nil { + return nil + } + + return &QsciLexerCMake{h: (*C.QsciLexerCMake)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCMake constructs a new QsciLexerCMake object. func NewQsciLexerCMake() *QsciLexerCMake { - ret := C.QsciLexerCMake_new() - return newQsciLexerCMake(ret) + var outptr_QsciLexerCMake *C.QsciLexerCMake = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCMake_new(&outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCMake2 constructs a new QsciLexerCMake object. func NewQsciLexerCMake2(parent *qt6.QObject) *QsciLexerCMake { - ret := C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCMake(ret) + var outptr_QsciLexerCMake *C.QsciLexerCMake = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCMake) MetaObject() *qt6.QMetaObject { @@ -172,9 +194,917 @@ func QsciLexerCMake_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerCMake) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerCMake_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCMake) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCMake_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetFoldAtElse +func miqt_exec_callback_QsciLexerCMake_SetFoldAtElse(self *C.QsciLexerCMake, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerCMake) callVirtualBase_Language() string { + + _ret := C.QsciLexerCMake_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Language +func miqt_exec_callback_QsciLexerCMake_Language(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCMake_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnLexer(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Lexer +func miqt_exec_callback_QsciLexerCMake_Lexer(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCMake_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_LexerId +func miqt_exec_callback_QsciLexerCMake_LexerId(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCMake_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCMake_AutoCompletionFillups(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCMake_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCMake) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCMake_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCMake_AutoCompletionWordSeparators(self *C.QsciLexerCMake, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCMake_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCMake_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockEnd +func miqt_exec_callback_QsciLexerCMake_BlockEnd(self *C.QsciLexerCMake, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCMake_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockLookback +func miqt_exec_callback_QsciLexerCMake_BlockLookback(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCMake_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCMake_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockStart +func miqt_exec_callback_QsciLexerCMake_BlockStart(self *C.QsciLexerCMake, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCMake_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCMake_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BlockStartKeyword +func miqt_exec_callback_QsciLexerCMake_BlockStartKeyword(self *C.QsciLexerCMake, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCMake_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_BraceStyle +func miqt_exec_callback_QsciLexerCMake_BraceStyle(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCMake_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCMake_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_CaseSensitive +func miqt_exec_callback_QsciLexerCMake_CaseSensitive(self *C.QsciLexerCMake, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerCMake_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCMake_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Color +func miqt_exec_callback_QsciLexerCMake_Color(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCMake_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCMake) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCMake_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_EolFill +func miqt_exec_callback_QsciLexerCMake_EolFill(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerCMake_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCMake_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Font +func miqt_exec_callback_QsciLexerCMake_Font(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCMake_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_IndentationGuideView +func miqt_exec_callback_QsciLexerCMake_IndentationGuideView(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCMake_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCMake_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Keywords +func miqt_exec_callback_QsciLexerCMake_Keywords(self *C.QsciLexerCMake, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCMake_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultStyle +func miqt_exec_callback_QsciLexerCMake_DefaultStyle(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCMake_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCMake) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCMake_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Description +func miqt_exec_callback_QsciLexerCMake_Description(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCMake) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerCMake_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCMake_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_Paper +func miqt_exec_callback_QsciLexerCMake_Paper(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCMake_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCMake_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCMake_DefaultColorWithStyle(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCMake_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCMake) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCMake_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultEolFill +func miqt_exec_callback_QsciLexerCMake_DefaultEolFill(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerCMake_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCMake_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCMake_DefaultFontWithStyle(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCMake_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCMake) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCMake_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCMake_DefaultPaperWithStyle(self *C.QsciLexerCMake, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCMake_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCMake) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCMake_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetEditor +func miqt_exec_callback_QsciLexerCMake_SetEditor(self *C.QsciLexerCMake, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCMake) callVirtualBase_RefreshProperties() { + + C.QsciLexerCMake_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCMake) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCMake_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_RefreshProperties +func miqt_exec_callback_QsciLexerCMake_RefreshProperties(self *C.QsciLexerCMake, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCMake) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCMake_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCMake) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCMake_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCMake_StyleBitsNeeded(self *C.QsciLexerCMake, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCMake_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCMake) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCMake_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_WordCharacters +func miqt_exec_callback_QsciLexerCMake_WordCharacters(self *C.QsciLexerCMake, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCMake) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCMake_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCMake) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCMake_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCMake_SetAutoIndentStyle(self *C.QsciLexerCMake, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerCMake_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCMake_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetColor +func miqt_exec_callback_QsciLexerCMake_SetColor(self *C.QsciLexerCMake, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCMake_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCMake_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetEolFill +func miqt_exec_callback_QsciLexerCMake_SetEolFill(self *C.QsciLexerCMake, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerCMake_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerCMake_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetFont +func miqt_exec_callback_QsciLexerCMake_SetFont(self *C.QsciLexerCMake, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerCMake_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCMake) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCMake_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_SetPaper +func miqt_exec_callback_QsciLexerCMake_SetPaper(self *C.QsciLexerCMake, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCMake) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCMake_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCMake) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCMake_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_ReadProperties +func miqt_exec_callback_QsciLexerCMake_ReadProperties(self *C.QsciLexerCMake, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCMake) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCMake_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCMake) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCMake_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCMake_WriteProperties +func miqt_exec_callback_QsciLexerCMake_WriteProperties(self *C.QsciLexerCMake, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCMake) Delete() { - C.QsciLexerCMake_Delete(this.h) + C.QsciLexerCMake_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h index 9d30ee9d..c1ecc388 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCMake; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCMake QsciLexerCMake; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCMake* QsciLexerCMake_new(); -QsciLexerCMake* QsciLexerCMake_new2(QObject* parent); +void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self); void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1); struct miqt_string QsciLexerCMake_Tr(const char* s); @@ -45,7 +51,77 @@ bool QsciLexerCMake_FoldAtElse(const QsciLexerCMake* self); void QsciLexerCMake_SetFoldAtElse(QsciLexerCMake* self, bool fold); struct miqt_string QsciLexerCMake_Tr2(const char* s, const char* c); struct miqt_string QsciLexerCMake_Tr3(const char* s, const char* c, int n); -void QsciLexerCMake_Delete(QsciLexerCMake* self); +void QsciLexerCMake_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerCMake_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_Language(const void* self); +void QsciLexerCMake_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_Lexer(const void* self); +void QsciLexerCMake_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_LexerId(const void* self); +void QsciLexerCMake_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCMake_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCMake_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCMake_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCMake_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_BlockLookback(const void* self); +void QsciLexerCMake_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCMake_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCMake_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_BraceStyle(const void* self); +void QsciLexerCMake_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_CaseSensitive(const void* self); +void QsciLexerCMake_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_Color(const void* self, int style); +void QsciLexerCMake_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_EolFill(const void* self, int style); +void QsciLexerCMake_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCMake_virtualbase_Font(const void* self, int style); +void QsciLexerCMake_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCMake_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_Keywords(const void* self, int set); +void QsciLexerCMake_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_DefaultStyle(const void* self); +void QsciLexerCMake_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCMake_virtualbase_Description(const void* self, int style); +void QsciLexerCMake_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_Paper(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCMake_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCMake_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCMake_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCMake_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCMake_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_RefreshProperties(void* self); +void QsciLexerCMake_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCMake_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCMake_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCMake_virtualbase_WordCharacters(const void* self); +void QsciLexerCMake_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCMake_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCMake_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCMake_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCMake_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCMake_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCMake_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCMake_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCMake_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCMake_Delete(QsciLexerCMake* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp index 570d251c..d84c5d23 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,846 @@ #include "gen_qscilexercoffeescript.h" #include "_cgo_export.h" -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new() { - return new QsciLexerCoffeeScript(); +class MiqtVirtualQsciLexerCoffeeScript : public virtual QsciLexerCoffeeScript { +public: + + MiqtVirtualQsciLexerCoffeeScript(): QsciLexerCoffeeScript() {}; + MiqtVirtualQsciLexerCoffeeScript(QObject* parent): QsciLexerCoffeeScript(parent) {}; + + virtual ~MiqtVirtualQsciLexerCoffeeScript() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCoffeeScript::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCoffeeScript::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCoffeeScript::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCoffeeScript::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCoffeeScript::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCoffeeScript::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCoffeeScript::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCoffeeScript::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCoffeeScript::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCoffeeScript::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCoffeeScript::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCoffeeScript::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCoffeeScript::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCoffeeScript::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCoffeeScript::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCoffeeScript::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCoffeeScript::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCoffeeScript::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCoffeeScript::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCoffeeScript::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCoffeeScript::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCoffeeScript::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCoffeeScript::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCoffeeScript::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCoffeeScript::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCoffeeScript::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCoffeeScript::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCoffeeScript::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCoffeeScript::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCoffeeScript::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCoffeeScript::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCoffeeScript::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCoffeeScript::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCoffeeScript::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCoffeeScript::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCoffeeScript::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCoffeeScript::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCoffeeScript::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCoffeeScript::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCoffeeScript::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCoffeeScript::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCoffeeScript::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCoffeeScript::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCoffeeScript_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCoffeeScript::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCoffeeScript::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCoffeeScript_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCoffeeScript::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCoffeeScript::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCoffeeScript::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCoffeeScript::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCoffeeScript::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCoffeeScript::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCoffeeScript_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCoffeeScript::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCoffeeScript::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCoffeeScript::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCoffeeScript::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCoffeeScript::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCoffeeScript::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCoffeeScript::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCoffeeScript::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCoffeeScript_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCoffeeScript::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCoffeeScript::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCoffeeScript::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCoffeeScript::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCoffeeScript::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(); + *outptr_QsciLexerCoffeeScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent) { - return new QsciLexerCoffeeScript(parent); +void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(parent); + *outptr_QsciLexerCoffeeScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self) { @@ -186,7 +1021,275 @@ const char* QsciLexerCoffeeScript_BlockStartKeyword1(const QsciLexerCoffeeScript return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self) { - delete self; +void QsciLexerCoffeeScript_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Language = slot; +} + +void QsciLexerCoffeeScript_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCoffeeScript_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCoffeeScript_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCoffeeScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCoffeeScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCoffeeScript_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCoffeeScript_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCoffeeScript_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCoffeeScript_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCoffeeScript_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCoffeeScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCoffeeScript_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCoffeeScript_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCoffeeScript_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCoffeeScript_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCoffeeScript_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCoffeeScript_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCoffeeScript_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCoffeeScript_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCoffeeScript_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCoffeeScript_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCoffeeScript_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCoffeeScript_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Description = slot; +} + +void QsciLexerCoffeeScript_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCoffeeScript_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCoffeeScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCoffeeScript_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCoffeeScript_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCoffeeScript_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCoffeeScript_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCoffeeScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCoffeeScript_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCoffeeScript_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCoffeeScript_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCoffeeScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCoffeeScript_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCoffeeScript_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCoffeeScript_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCoffeeScript_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCoffeeScript_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCoffeeScript_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCoffeeScript_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCoffeeScript*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCoffeeScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCoffeeScript*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go index f40cbcac..65bb941e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -44,7 +45,8 @@ const ( ) type QsciLexerCoffeeScript struct { - h *C.QsciLexerCoffeeScript + h *C.QsciLexerCoffeeScript + isSubclass bool *QsciLexer } @@ -62,27 +64,47 @@ func (this *QsciLexerCoffeeScript) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript) *QsciLexerCoffeeScript { +// newQsciLexerCoffeeScript constructs the type using only CGO pointers. +func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCoffeeScript { if h == nil { return nil } - return &QsciLexerCoffeeScript{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCoffeeScript{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer) *QsciLexerCoffeeScript { - return newQsciLexerCoffeeScript((*C.QsciLexerCoffeeScript)(h)) +// UnsafeNewQsciLexerCoffeeScript constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCoffeeScript { + if h == nil { + return nil + } + + return &QsciLexerCoffeeScript{h: (*C.QsciLexerCoffeeScript)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCoffeeScript constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript() *QsciLexerCoffeeScript { - ret := C.QsciLexerCoffeeScript_new() - return newQsciLexerCoffeeScript(ret) + var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCoffeeScript_new(&outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCoffeeScript2 constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript2(parent *qt6.QObject) *QsciLexerCoffeeScript { - ret := C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCoffeeScript(ret) + var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCoffeeScript) MetaObject() *qt6.QMetaObject { @@ -261,9 +283,894 @@ func (this *QsciLexerCoffeeScript) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerCoffeeScript) callVirtualBase_Language() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Language +func miqt_exec_callback_QsciLexerCoffeeScript_Language(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnLexer(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Lexer +func miqt_exec_callback_QsciLexerCoffeeScript_Lexer(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_LexerId +func miqt_exec_callback_QsciLexerCoffeeScript_LexerId(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionFillups(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCoffeeScript_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCoffeeScript) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCoffeeScript_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCoffeeScript_AutoCompletionWordSeparators(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCoffeeScript_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockEnd +func miqt_exec_callback_QsciLexerCoffeeScript_BlockEnd(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockLookback +func miqt_exec_callback_QsciLexerCoffeeScript_BlockLookback(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCoffeeScript_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockStart +func miqt_exec_callback_QsciLexerCoffeeScript_BlockStart(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCoffeeScript_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BlockStartKeyword +func miqt_exec_callback_QsciLexerCoffeeScript_BlockStartKeyword(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_BraceStyle +func miqt_exec_callback_QsciLexerCoffeeScript_BraceStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCoffeeScript_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_CaseSensitive +func miqt_exec_callback_QsciLexerCoffeeScript_CaseSensitive(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCoffeeScript_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Color +func miqt_exec_callback_QsciLexerCoffeeScript_Color(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCoffeeScript) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCoffeeScript_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_EolFill +func miqt_exec_callback_QsciLexerCoffeeScript_EolFill(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCoffeeScript_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Font +func miqt_exec_callback_QsciLexerCoffeeScript_Font(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_IndentationGuideView +func miqt_exec_callback_QsciLexerCoffeeScript_IndentationGuideView(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCoffeeScript_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Keywords +func miqt_exec_callback_QsciLexerCoffeeScript_Keywords(self *C.QsciLexerCoffeeScript, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCoffeeScript_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCoffeeScript) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCoffeeScript_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Description +func miqt_exec_callback_QsciLexerCoffeeScript_Description(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCoffeeScript_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_Paper +func miqt_exec_callback_QsciLexerCoffeeScript_Paper(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCoffeeScript_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultColorWithStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCoffeeScript) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCoffeeScript_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultEolFill +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultEolFill(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerCoffeeScript_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCoffeeScript_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultFontWithStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCoffeeScript_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCoffeeScript) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCoffeeScript_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCoffeeScript_DefaultPaperWithStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCoffeeScript_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCoffeeScript) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCoffeeScript_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetEditor +func miqt_exec_callback_QsciLexerCoffeeScript_SetEditor(self *C.QsciLexerCoffeeScript, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_RefreshProperties() { + + C.QsciLexerCoffeeScript_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCoffeeScript) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCoffeeScript_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_RefreshProperties +func miqt_exec_callback_QsciLexerCoffeeScript_RefreshProperties(self *C.QsciLexerCoffeeScript, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCoffeeScript_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCoffeeScript) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCoffeeScript_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCoffeeScript_StyleBitsNeeded(self *C.QsciLexerCoffeeScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCoffeeScript_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCoffeeScript) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCoffeeScript_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_WordCharacters +func miqt_exec_callback_QsciLexerCoffeeScript_WordCharacters(self *C.QsciLexerCoffeeScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCoffeeScript_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCoffeeScript) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCoffeeScript_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCoffeeScript_SetAutoIndentStyle(self *C.QsciLexerCoffeeScript, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetColor +func miqt_exec_callback_QsciLexerCoffeeScript_SetColor(self *C.QsciLexerCoffeeScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetEolFill +func miqt_exec_callback_QsciLexerCoffeeScript_SetEolFill(self *C.QsciLexerCoffeeScript, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetFont +func miqt_exec_callback_QsciLexerCoffeeScript_SetFont(self *C.QsciLexerCoffeeScript, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerCoffeeScript_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCoffeeScript) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCoffeeScript_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_SetPaper +func miqt_exec_callback_QsciLexerCoffeeScript_SetPaper(self *C.QsciLexerCoffeeScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCoffeeScript) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCoffeeScript_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties +func miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties(self *C.QsciLexerCoffeeScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCoffeeScript) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCoffeeScript_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCoffeeScript) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCoffeeScript_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties +func miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties(self *C.QsciLexerCoffeeScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCoffeeScript) Delete() { - C.QsciLexerCoffeeScript_Delete(this.h) + C.QsciLexerCoffeeScript_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h index 82204039..ca4d95c3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCoffeeScript; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCoffeeScript QsciLexerCoffeeScript; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new(); -QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent); +void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self); void* QsciLexerCoffeeScript_Metacast(QsciLexerCoffeeScript* self, const char* param1); struct miqt_string QsciLexerCoffeeScript_Tr(const char* s); @@ -61,7 +67,75 @@ struct miqt_string QsciLexerCoffeeScript_Tr3(const char* s, const char* c, int n const char* QsciLexerCoffeeScript_BlockEnd1(const QsciLexerCoffeeScript* self, int* style); const char* QsciLexerCoffeeScript_BlockStart1(const QsciLexerCoffeeScript* self, int* style); const char* QsciLexerCoffeeScript_BlockStartKeyword1(const QsciLexerCoffeeScript* self, int* style); -void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self); +void QsciLexerCoffeeScript_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_Language(const void* self); +void QsciLexerCoffeeScript_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_Lexer(const void* self); +void QsciLexerCoffeeScript_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_LexerId(const void* self); +void QsciLexerCoffeeScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCoffeeScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCoffeeScript_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCoffeeScript_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCoffeeScript_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_BlockLookback(const void* self); +void QsciLexerCoffeeScript_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCoffeeScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCoffeeScript_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_BraceStyle(const void* self); +void QsciLexerCoffeeScript_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_CaseSensitive(const void* self); +void QsciLexerCoffeeScript_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_Color(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_EolFill(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCoffeeScript_virtualbase_Font(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCoffeeScript_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_Keywords(const void* self, int set); +void QsciLexerCoffeeScript_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_DefaultStyle(const void* self); +void QsciLexerCoffeeScript_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCoffeeScript_virtualbase_Description(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_Paper(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCoffeeScript_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCoffeeScript_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCoffeeScript_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCoffeeScript_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_RefreshProperties(void* self); +void QsciLexerCoffeeScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCoffeeScript_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCoffeeScript_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCoffeeScript_virtualbase_WordCharacters(const void* self); +void QsciLexerCoffeeScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCoffeeScript_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCoffeeScript_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCoffeeScript_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCoffeeScript_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCoffeeScript_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCoffeeScript_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCoffeeScript_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCoffeeScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCoffeeScript_Delete(QsciLexerCoffeeScript* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp index 1f121017..880bdb49 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,16 +11,974 @@ #include "gen_qscilexercpp.h" #include "_cgo_export.h" -QsciLexerCPP* QsciLexerCPP_new() { - return new QsciLexerCPP(); +class MiqtVirtualQsciLexerCPP : public virtual QsciLexerCPP { +public: + + MiqtVirtualQsciLexerCPP(): QsciLexerCPP() {}; + MiqtVirtualQsciLexerCPP(QObject* parent): QsciLexerCPP(parent) {}; + MiqtVirtualQsciLexerCPP(QObject* parent, bool caseInsensitiveKeywords): QsciLexerCPP(parent, caseInsensitiveKeywords) {}; + + virtual ~MiqtVirtualQsciLexerCPP() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerCPP::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerCPP::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerCPP::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerCPP::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerCPP::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerCPP::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerCPP::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCPP_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerCPP::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerCPP::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerCPP::setStylePreprocessor(style); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCPP::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCPP::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCPP::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCPP::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCPP::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCPP::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCPP::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCPP_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCPP::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCPP::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCPP::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCPP::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCPP::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCPP::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCPP::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCPP::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCPP::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCPP::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCPP::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCPP::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCPP::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCPP::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCPP::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCPP::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCPP::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCPP::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCPP_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCPP::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCPP::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCPP::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCPP::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCPP::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCPP::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCPP::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCPP_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCPP::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCPP::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCPP::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCPP::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCPP::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCPP::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCPP::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCPP::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCPP::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCPP_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCPP::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCPP::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCPP_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCPP::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCPP::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCPP_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCPP::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCPP::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCPP_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCPP::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCPP::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCPP_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCPP::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCPP::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCPP_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCPP::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCPP::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCPP::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCPP::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCPP::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCPP::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCPP::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCPP::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCPP_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCPP::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCPP::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCPP::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCPP::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCPP_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCPP::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(); + *outptr_QsciLexerCPP = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCPP* QsciLexerCPP_new2(QObject* parent) { - return new QsciLexerCPP(parent); +void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent); + *outptr_QsciLexerCPP = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords) { - return new QsciLexerCPP(parent, caseInsensitiveKeywords); +void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent, caseInsensitiveKeywords); + *outptr_QsciLexerCPP = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self) { @@ -246,7 +1205,315 @@ const char* QsciLexerCPP_BlockStartKeyword1(const QsciLexerCPP* self, int* style return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerCPP_Delete(QsciLexerCPP* self) { - delete self; +void QsciLexerCPP_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerCPP_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerCPP_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerCPP_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerCPP_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerCPP_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerCPP_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerCPP_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Language = slot; +} + +void QsciLexerCPP_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCPP_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCPP_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCPP_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCPP_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCPP_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCPP_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCPP_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCPP_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCPP_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCPP_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCPP_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCPP_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCPP_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCPP_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCPP_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCPP_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCPP_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCPP_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCPP_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCPP_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCPP_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCPP_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCPP_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCPP_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCPP_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCPP_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCPP_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCPP_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCPP_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCPP_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCPP_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCPP_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Description = slot; +} + +void QsciLexerCPP_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCPP_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCPP_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCPP_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCPP_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCPP_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCPP_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCPP_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCPP_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCPP_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCPP_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCPP_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCPP_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCPP_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCPP_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCPP_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCPP_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCPP_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCPP_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCPP_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCPP_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCPP_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCPP_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCPP_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCPP_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCPP_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCPP_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCPP_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCPP_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCPP_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCPP_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCPP*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCPP_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCPP*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCPP_Delete(QsciLexerCPP* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go index 73fddcc6..9999d644 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -76,7 +77,8 @@ const ( ) type QsciLexerCPP struct { - h *C.QsciLexerCPP + h *C.QsciLexerCPP + isSubclass bool *QsciLexer } @@ -94,33 +96,59 @@ func (this *QsciLexerCPP) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCPP(h *C.QsciLexerCPP) *QsciLexerCPP { +// newQsciLexerCPP constructs the type using only CGO pointers. +func newQsciLexerCPP(h *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCPP { if h == nil { return nil } - return &QsciLexerCPP{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCPP{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCPP(h unsafe.Pointer) *QsciLexerCPP { - return newQsciLexerCPP((*C.QsciLexerCPP)(h)) +// UnsafeNewQsciLexerCPP constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCPP(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCPP { + if h == nil { + return nil + } + + return &QsciLexerCPP{h: (*C.QsciLexerCPP)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCPP constructs a new QsciLexerCPP object. func NewQsciLexerCPP() *QsciLexerCPP { - ret := C.QsciLexerCPP_new() - return newQsciLexerCPP(ret) + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCPP_new(&outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCPP2 constructs a new QsciLexerCPP object. func NewQsciLexerCPP2(parent *qt6.QObject) *QsciLexerCPP { - ret := C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCPP(ret) + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCPP3 constructs a new QsciLexerCPP object. func NewQsciLexerCPP3(parent *qt6.QObject, caseInsensitiveKeywords bool) *QsciLexerCPP { - ret := C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords)) - return newQsciLexerCPP(ret) + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCPP) MetaObject() *qt6.QMetaObject { @@ -355,9 +383,1009 @@ func (this *QsciLexerCPP) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerCPP) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldAtElse +func miqt_exec_callback_QsciLexerCPP_SetFoldAtElse(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldComments +func miqt_exec_callback_QsciLexerCPP_SetFoldComments(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldCompact +func miqt_exec_callback_QsciLexerCPP_SetFoldCompact(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerCPP_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCPP) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCPP_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerCPP_SetFoldPreprocessor(self *C.QsciLexerCPP, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerCPP_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerCPP) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerCPP_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor +func miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor(self *C.QsciLexerCPP, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_Language() string { + + _ret := C.QsciLexerCPP_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Language +func miqt_exec_callback_QsciLexerCPP_Language(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCPP_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnLexer(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Lexer +func miqt_exec_callback_QsciLexerCPP_Lexer(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCPP_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_LexerId +func miqt_exec_callback_QsciLexerCPP_LexerId(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCPP_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCPP_AutoCompletionFillups(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCPP_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCPP) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCPP_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCPP_AutoCompletionWordSeparators(self *C.QsciLexerCPP, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCPP_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCPP_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockEnd +func miqt_exec_callback_QsciLexerCPP_BlockEnd(self *C.QsciLexerCPP, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCPP_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockLookback +func miqt_exec_callback_QsciLexerCPP_BlockLookback(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCPP_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCPP_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockStart +func miqt_exec_callback_QsciLexerCPP_BlockStart(self *C.QsciLexerCPP, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCPP_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCPP_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BlockStartKeyword +func miqt_exec_callback_QsciLexerCPP_BlockStartKeyword(self *C.QsciLexerCPP, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCPP_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_BraceStyle +func miqt_exec_callback_QsciLexerCPP_BraceStyle(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCPP_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCPP_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_CaseSensitive +func miqt_exec_callback_QsciLexerCPP_CaseSensitive(self *C.QsciLexerCPP, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerCPP_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCPP_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Color +func miqt_exec_callback_QsciLexerCPP_Color(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCPP_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCPP) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCPP_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_EolFill +func miqt_exec_callback_QsciLexerCPP_EolFill(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerCPP_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCPP_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Font +func miqt_exec_callback_QsciLexerCPP_Font(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCPP_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_IndentationGuideView +func miqt_exec_callback_QsciLexerCPP_IndentationGuideView(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCPP_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCPP_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Keywords +func miqt_exec_callback_QsciLexerCPP_Keywords(self *C.QsciLexerCPP, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCPP_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultStyle +func miqt_exec_callback_QsciLexerCPP_DefaultStyle(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCPP_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCPP) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCPP_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Description +func miqt_exec_callback_QsciLexerCPP_Description(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCPP) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerCPP_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCPP_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_Paper +func miqt_exec_callback_QsciLexerCPP_Paper(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCPP_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCPP_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCPP_DefaultColorWithStyle(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCPP_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCPP) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCPP_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultEolFill +func miqt_exec_callback_QsciLexerCPP_DefaultEolFill(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerCPP_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCPP_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCPP_DefaultFontWithStyle(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCPP_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCPP) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCPP_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCPP_DefaultPaperWithStyle(self *C.QsciLexerCPP, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCPP_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCPP) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCPP_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetEditor +func miqt_exec_callback_QsciLexerCPP_SetEditor(self *C.QsciLexerCPP, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_RefreshProperties() { + + C.QsciLexerCPP_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCPP) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCPP_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_RefreshProperties +func miqt_exec_callback_QsciLexerCPP_RefreshProperties(self *C.QsciLexerCPP, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCPP) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCPP_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCPP) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCPP_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCPP_StyleBitsNeeded(self *C.QsciLexerCPP, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCPP_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCPP) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCPP_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_WordCharacters +func miqt_exec_callback_QsciLexerCPP_WordCharacters(self *C.QsciLexerCPP, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCPP) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCPP_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCPP) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCPP_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCPP_SetAutoIndentStyle(self *C.QsciLexerCPP, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerCPP_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCPP_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetColor +func miqt_exec_callback_QsciLexerCPP_SetColor(self *C.QsciLexerCPP, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCPP_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCPP_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetEolFill +func miqt_exec_callback_QsciLexerCPP_SetEolFill(self *C.QsciLexerCPP, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerCPP_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerCPP_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetFont +func miqt_exec_callback_QsciLexerCPP_SetFont(self *C.QsciLexerCPP, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerCPP_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCPP) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCPP_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_SetPaper +func miqt_exec_callback_QsciLexerCPP_SetPaper(self *C.QsciLexerCPP, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCPP) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCPP_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCPP) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCPP_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_ReadProperties +func miqt_exec_callback_QsciLexerCPP_ReadProperties(self *C.QsciLexerCPP, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCPP) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCPP_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCPP) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCPP_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCPP_WriteProperties +func miqt_exec_callback_QsciLexerCPP_WriteProperties(self *C.QsciLexerCPP, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCPP) Delete() { - C.QsciLexerCPP_Delete(this.h) + C.QsciLexerCPP_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h index 693b4544..0f2b6256 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h @@ -19,18 +19,24 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCPP; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCPP QsciLexerCPP; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCPP* QsciLexerCPP_new(); -QsciLexerCPP* QsciLexerCPP_new2(QObject* parent); -QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords); +void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self); void* QsciLexerCPP_Metacast(QsciLexerCPP* self, const char* param1); struct miqt_string QsciLexerCPP_Tr(const char* s); @@ -76,7 +82,85 @@ struct miqt_string QsciLexerCPP_Tr3(const char* s, const char* c, int n); const char* QsciLexerCPP_BlockEnd1(const QsciLexerCPP* self, int* style); const char* QsciLexerCPP_BlockStart1(const QsciLexerCPP* self, int* style); const char* QsciLexerCPP_BlockStartKeyword1(const QsciLexerCPP* self, int* style); -void QsciLexerCPP_Delete(QsciLexerCPP* self); +void QsciLexerCPP_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerCPP_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerCPP_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_Language(const void* self); +void QsciLexerCPP_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_Lexer(const void* self); +void QsciLexerCPP_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_LexerId(const void* self); +void QsciLexerCPP_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCPP_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCPP_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCPP_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCPP_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_BlockLookback(const void* self); +void QsciLexerCPP_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCPP_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCPP_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_BraceStyle(const void* self); +void QsciLexerCPP_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_CaseSensitive(const void* self); +void QsciLexerCPP_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_Color(const void* self, int style); +void QsciLexerCPP_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_EolFill(const void* self, int style); +void QsciLexerCPP_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCPP_virtualbase_Font(const void* self, int style); +void QsciLexerCPP_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCPP_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_Keywords(const void* self, int set); +void QsciLexerCPP_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_DefaultStyle(const void* self); +void QsciLexerCPP_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCPP_virtualbase_Description(const void* self, int style); +void QsciLexerCPP_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_Paper(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCPP_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCPP_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCPP_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCPP_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCPP_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_RefreshProperties(void* self); +void QsciLexerCPP_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCPP_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCPP_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCPP_virtualbase_WordCharacters(const void* self); +void QsciLexerCPP_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCPP_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCPP_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCPP_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCPP_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCPP_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCPP_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCPP_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCPP_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCPP_Delete(QsciLexerCPP* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp index d7a9caed..62c1face 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp @@ -9,12 +9,150 @@ #include "gen_qscilexercsharp.h" #include "_cgo_export.h" -QsciLexerCSharp* QsciLexerCSharp_new() { - return new QsciLexerCSharp(); +class MiqtVirtualQsciLexerCSharp : public virtual QsciLexerCSharp { +public: + + MiqtVirtualQsciLexerCSharp(): QsciLexerCSharp() {}; + MiqtVirtualQsciLexerCSharp(QObject* parent): QsciLexerCSharp(parent) {}; + + virtual ~MiqtVirtualQsciLexerCSharp() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerCSharp::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerCSharp::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerCSharp::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerCSharp::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerCSharp::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerCSharp::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerCSharp::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSharp_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerCSharp::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerCSharp::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerCSharp_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerCSharp::setStylePreprocessor(style); + + } + +}; + +void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(); + *outptr_QsciLexerCSharp = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent) { - return new QsciLexerCSharp(parent); +void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(parent); + *outptr_QsciLexerCSharp = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self) { @@ -93,7 +231,51 @@ struct miqt_string QsciLexerCSharp_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerCSharp_Delete(QsciLexerCSharp* self) { - delete self; +void QsciLexerCSharp_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerCSharp_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerCSharp_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerCSharp_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerCSharp_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerCSharp_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSharp*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerCSharp_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerCSharp*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerCSharp_Delete(QsciLexerCSharp* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go index db4f874c..09429fc1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerCSharp struct { - h *C.QsciLexerCSharp + h *C.QsciLexerCSharp + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerCSharp) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCSharp(h *C.QsciLexerCSharp) *QsciLexerCSharp { +// newQsciLexerCSharp constructs the type using only CGO pointers. +func newQsciLexerCSharp(h *C.QsciLexerCSharp, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSharp { if h == nil { return nil } - return &QsciLexerCSharp{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerCSharp{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCSharp(h unsafe.Pointer) *QsciLexerCSharp { - return newQsciLexerCSharp((*C.QsciLexerCSharp)(h)) +// UnsafeNewQsciLexerCSharp constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCSharp(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSharp { + if h == nil { + return nil + } + + return &QsciLexerCSharp{h: (*C.QsciLexerCSharp)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerCSharp constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp() *QsciLexerCSharp { - ret := C.QsciLexerCSharp_new() - return newQsciLexerCSharp(ret) + var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSharp_new(&outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCSharp2 constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp2(parent *qt6.QObject) *QsciLexerCSharp { - ret := C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCSharp(ret) + var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCSharp) MetaObject() *qt6.QMetaObject { @@ -139,9 +163,124 @@ func QsciLexerCSharp_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerCSharp) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldAtElse +func miqt_exec_callback_QsciLexerCSharp_SetFoldAtElse(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldComments +func miqt_exec_callback_QsciLexerCSharp_SetFoldComments(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldCompact +func miqt_exec_callback_QsciLexerCSharp_SetFoldCompact(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerCSharp_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSharp) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSharp_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerCSharp_SetFoldPreprocessor(self *C.QsciLexerCSharp, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerCSharp) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerCSharp_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerCSharp) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerCSharp_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSharp_SetStylePreprocessor +func miqt_exec_callback_QsciLexerCSharp_SetStylePreprocessor(self *C.QsciLexerCSharp, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerCSharp{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerCSharp) Delete() { - C.QsciLexerCSharp_Delete(this.h) + C.QsciLexerCSharp_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h index 758e28e1..2fd95d24 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h @@ -19,17 +19,21 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerCSharp; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerCSharp QsciLexerCSharp; #endif -QsciLexerCSharp* QsciLexerCSharp_new(); -QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent); +void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self); void* QsciLexerCSharp_Metacast(QsciLexerCSharp* self, const char* param1); struct miqt_string QsciLexerCSharp_Tr(const char* s); @@ -42,7 +46,17 @@ const char* QsciLexerCSharp_Keywords(const QsciLexerCSharp* self, int set); struct miqt_string QsciLexerCSharp_Description(const QsciLexerCSharp* self, int style); struct miqt_string QsciLexerCSharp_Tr2(const char* s, const char* c); struct miqt_string QsciLexerCSharp_Tr3(const char* s, const char* c, int n); -void QsciLexerCSharp_Delete(QsciLexerCSharp* self); +void QsciLexerCSharp_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerCSharp_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerCSharp_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerCSharp_Delete(QsciLexerCSharp* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp index 0e6beae6..7b84e82d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexercss.h" #include "_cgo_export.h" -QsciLexerCSS* QsciLexerCSS_new() { - return new QsciLexerCSS(); +class MiqtVirtualQsciLexerCSS : public virtual QsciLexerCSS { +public: + + MiqtVirtualQsciLexerCSS(): QsciLexerCSS() {}; + MiqtVirtualQsciLexerCSS(QObject* parent): QsciLexerCSS(parent) {}; + + virtual ~MiqtVirtualQsciLexerCSS() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerCSS::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSS_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerCSS::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerCSS::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerCSS_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerCSS::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerCSS::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCSS::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerCSS::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCSS::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerCSS::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCSS::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerCSS::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCSS_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerCSS::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerCSS::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerCSS::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerCSS::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCSS::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerCSS::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerCSS::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerCSS::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerCSS::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerCSS::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCSS::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerCSS::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCSS::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerCSS::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerCSS::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerCSS::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCSS::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerCSS::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCSS_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerCSS::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerCSS::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCSS::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerCSS::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerCSS::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerCSS::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCSS::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerCSS_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerCSS::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerCSS::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerCSS::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerCSS::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerCSS::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCSS::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerCSS::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerCSS::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerCSS::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCSS_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerCSS::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerCSS::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCSS_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCSS::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerCSS::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCSS_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCSS::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerCSS::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCSS_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCSS::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerCSS::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCSS_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCSS::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerCSS::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCSS_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCSS::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerCSS::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCSS::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerCSS::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCSS::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerCSS::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCSS::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerCSS::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerCSS_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCSS::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerCSS::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCSS::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerCSS::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerCSS_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerCSS::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(); + *outptr_QsciLexerCSS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerCSS* QsciLexerCSS_new2(QObject* parent) { - return new QsciLexerCSS(parent); +void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(parent); + *outptr_QsciLexerCSS = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self) { @@ -153,7 +1037,291 @@ const char* QsciLexerCSS_BlockStart1(const QsciLexerCSS* self, int* style) { return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerCSS_Delete(QsciLexerCSS* self) { - delete self; +void QsciLexerCSS_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerCSS_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerCSS_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerCSS_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerCSS_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Language = slot; +} + +void QsciLexerCSS_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCSS_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCSS_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCSS_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCSS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCSS_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCSS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCSS_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCSS_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCSS_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCSS_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCSS_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCSS_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCSS_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCSS_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCSS_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCSS_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCSS_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCSS_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCSS_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCSS_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCSS_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCSS_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCSS_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCSS_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCSS_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCSS_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCSS_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCSS_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCSS_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCSS_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCSS_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCSS_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Description = slot; +} + +void QsciLexerCSS_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCSS_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCSS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCSS_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCSS_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCSS_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCSS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCSS_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCSS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCSS_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCSS_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCSS_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCSS_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCSS_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCSS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCSS_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCSS_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCSS_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCSS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCSS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCSS_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCSS_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCSS_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCSS_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCSS_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCSS_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCSS_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCSS_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCSS_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCSS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCSS_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCSS*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCSS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCSS*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerCSS_Delete(QsciLexerCSS* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.go b/qt-restricted-extras/qscintilla6/gen_qscilexercss.go index a65f5158..eab8f506 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -44,7 +45,8 @@ const ( ) type QsciLexerCSS struct { - h *C.QsciLexerCSS + h *C.QsciLexerCSS + isSubclass bool *QsciLexer } @@ -62,27 +64,47 @@ func (this *QsciLexerCSS) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCSS(h *C.QsciLexerCSS) *QsciLexerCSS { +// newQsciLexerCSS constructs the type using only CGO pointers. +func newQsciLexerCSS(h *C.QsciLexerCSS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSS { if h == nil { return nil } - return &QsciLexerCSS{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCSS{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCSS(h unsafe.Pointer) *QsciLexerCSS { - return newQsciLexerCSS((*C.QsciLexerCSS)(h)) +// UnsafeNewQsciLexerCSS constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCSS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSS { + if h == nil { + return nil + } + + return &QsciLexerCSS{h: (*C.QsciLexerCSS)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerCSS constructs a new QsciLexerCSS object. func NewQsciLexerCSS() *QsciLexerCSS { - ret := C.QsciLexerCSS_new() - return newQsciLexerCSS(ret) + var outptr_QsciLexerCSS *C.QsciLexerCSS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSS_new(&outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerCSS2 constructs a new QsciLexerCSS object. func NewQsciLexerCSS2(parent *qt6.QObject) *QsciLexerCSS { - ret := C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerCSS(ret) + var outptr_QsciLexerCSS *C.QsciLexerCSS = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerCSS) MetaObject() *qt6.QMetaObject { @@ -231,9 +253,940 @@ func (this *QsciLexerCSS) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerCSS) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerCSS_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSS) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSS_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetFoldComments +func miqt_exec_callback_QsciLexerCSS_SetFoldComments(self *C.QsciLexerCSS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerCSS_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerCSS) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerCSS_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetFoldCompact +func miqt_exec_callback_QsciLexerCSS_SetFoldCompact(self *C.QsciLexerCSS, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_Language() string { + + _ret := C.QsciLexerCSS_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnLanguage(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Language +func miqt_exec_callback_QsciLexerCSS_Language(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCSS_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnLexer(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Lexer +func miqt_exec_callback_QsciLexerCSS_Lexer(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCSS_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_LexerId +func miqt_exec_callback_QsciLexerCSS_LexerId(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCSS_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCSS_AutoCompletionFillups(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCSS_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerCSS) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCSS_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCSS_AutoCompletionWordSeparators(self *C.QsciLexerCSS, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCSS_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCSS_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockEnd +func miqt_exec_callback_QsciLexerCSS_BlockEnd(self *C.QsciLexerCSS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCSS_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockLookback +func miqt_exec_callback_QsciLexerCSS_BlockLookback(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCSS_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCSS_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockStart +func miqt_exec_callback_QsciLexerCSS_BlockStart(self *C.QsciLexerCSS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCSS_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCSS_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BlockStartKeyword +func miqt_exec_callback_QsciLexerCSS_BlockStartKeyword(self *C.QsciLexerCSS, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCSS_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_BraceStyle +func miqt_exec_callback_QsciLexerCSS_BraceStyle(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCSS_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCSS_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_CaseSensitive +func miqt_exec_callback_QsciLexerCSS_CaseSensitive(self *C.QsciLexerCSS, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerCSS_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCSS_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Color +func miqt_exec_callback_QsciLexerCSS_Color(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCSS_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCSS) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCSS_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_EolFill +func miqt_exec_callback_QsciLexerCSS_EolFill(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerCSS_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCSS_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Font +func miqt_exec_callback_QsciLexerCSS_Font(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCSS_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_IndentationGuideView +func miqt_exec_callback_QsciLexerCSS_IndentationGuideView(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCSS_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCSS_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Keywords +func miqt_exec_callback_QsciLexerCSS_Keywords(self *C.QsciLexerCSS, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCSS_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultStyle +func miqt_exec_callback_QsciLexerCSS_DefaultStyle(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerCSS_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerCSS) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerCSS_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Description +func miqt_exec_callback_QsciLexerCSS_Description(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerCSS) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerCSS_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCSS_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_Paper +func miqt_exec_callback_QsciLexerCSS_Paper(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCSS_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCSS_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCSS_DefaultColorWithStyle(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCSS_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCSS) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCSS_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultEolFill +func miqt_exec_callback_QsciLexerCSS_DefaultEolFill(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerCSS_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCSS_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCSS_DefaultFontWithStyle(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCSS_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerCSS) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCSS_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCSS_DefaultPaperWithStyle(self *C.QsciLexerCSS, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCSS_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCSS) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCSS_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetEditor +func miqt_exec_callback_QsciLexerCSS_SetEditor(self *C.QsciLexerCSS, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_RefreshProperties() { + + C.QsciLexerCSS_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCSS) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCSS_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_RefreshProperties +func miqt_exec_callback_QsciLexerCSS_RefreshProperties(self *C.QsciLexerCSS, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCSS) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCSS_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCSS) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCSS_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCSS_StyleBitsNeeded(self *C.QsciLexerCSS, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCSS_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCSS) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCSS_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_WordCharacters +func miqt_exec_callback_QsciLexerCSS_WordCharacters(self *C.QsciLexerCSS, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCSS) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCSS_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCSS) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCSS_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCSS_SetAutoIndentStyle(self *C.QsciLexerCSS, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerCSS_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCSS_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetColor +func miqt_exec_callback_QsciLexerCSS_SetColor(self *C.QsciLexerCSS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCSS_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCSS_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetEolFill +func miqt_exec_callback_QsciLexerCSS_SetEolFill(self *C.QsciLexerCSS, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerCSS_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerCSS_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetFont +func miqt_exec_callback_QsciLexerCSS_SetFont(self *C.QsciLexerCSS, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerCSS_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCSS) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCSS_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_SetPaper +func miqt_exec_callback_QsciLexerCSS_SetPaper(self *C.QsciLexerCSS, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCSS) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCSS_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCSS) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCSS_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_ReadProperties +func miqt_exec_callback_QsciLexerCSS_ReadProperties(self *C.QsciLexerCSS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCSS) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerCSS_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCSS) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCSS_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCSS_WriteProperties +func miqt_exec_callback_QsciLexerCSS_WriteProperties(self *C.QsciLexerCSS, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerCSS) Delete() { - C.QsciLexerCSS_Delete(this.h) + C.QsciLexerCSS_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.h b/qt-restricted-extras/qscintilla6/gen_qscilexercss.h index 1619130d..9d9c648f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerCSS; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCSS QsciLexerCSS; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerCSS* QsciLexerCSS_new(); -QsciLexerCSS* QsciLexerCSS_new2(QObject* parent); +void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self); void* QsciLexerCSS_Metacast(QsciLexerCSS* self, const char* param1); struct miqt_string QsciLexerCSS_Tr(const char* s); @@ -57,7 +63,79 @@ struct miqt_string QsciLexerCSS_Tr2(const char* s, const char* c); struct miqt_string QsciLexerCSS_Tr3(const char* s, const char* c, int n); const char* QsciLexerCSS_BlockEnd1(const QsciLexerCSS* self, int* style); const char* QsciLexerCSS_BlockStart1(const QsciLexerCSS* self, int* style); -void QsciLexerCSS_Delete(QsciLexerCSS* self); +void QsciLexerCSS_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerCSS_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerCSS_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_Language(const void* self); +void QsciLexerCSS_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_Lexer(const void* self); +void QsciLexerCSS_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_LexerId(const void* self); +void QsciLexerCSS_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCSS_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCSS_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCSS_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCSS_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_BlockLookback(const void* self); +void QsciLexerCSS_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCSS_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCSS_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_BraceStyle(const void* self); +void QsciLexerCSS_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_CaseSensitive(const void* self); +void QsciLexerCSS_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_Color(const void* self, int style); +void QsciLexerCSS_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_EolFill(const void* self, int style); +void QsciLexerCSS_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCSS_virtualbase_Font(const void* self, int style); +void QsciLexerCSS_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCSS_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_Keywords(const void* self, int set); +void QsciLexerCSS_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_DefaultStyle(const void* self); +void QsciLexerCSS_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCSS_virtualbase_Description(const void* self, int style); +void QsciLexerCSS_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_Paper(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCSS_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCSS_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCSS_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCSS_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCSS_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_RefreshProperties(void* self); +void QsciLexerCSS_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCSS_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCSS_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCSS_virtualbase_WordCharacters(const void* self); +void QsciLexerCSS_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCSS_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCSS_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCSS_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCSS_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCSS_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCSS_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCSS_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCSS_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCSS_Delete(QsciLexerCSS* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp index 16ab6b03..e41a9cdc 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -75,7 +76,11 @@ void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits self->startStyling(static_cast(pos), static_cast(styleBits)); } -void QsciLexerCustom_Delete(QsciLexerCustom* self) { - delete self; +void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go index ec5354b8..ab211b62 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go @@ -15,7 +15,8 @@ import ( ) type QsciLexerCustom struct { - h *C.QsciLexerCustom + h *C.QsciLexerCustom + isSubclass bool *QsciLexer } @@ -33,15 +34,23 @@ func (this *QsciLexerCustom) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerCustom(h *C.QsciLexerCustom) *QsciLexerCustom { +// newQsciLexerCustom constructs the type using only CGO pointers. +func newQsciLexerCustom(h *C.QsciLexerCustom, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCustom { if h == nil { return nil } - return &QsciLexerCustom{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerCustom{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerCustom(h unsafe.Pointer) *QsciLexerCustom { - return newQsciLexerCustom((*C.QsciLexerCustom)(h)) +// UnsafeNewQsciLexerCustom constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerCustom(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCustom { + if h == nil { + return nil + } + + return &QsciLexerCustom{h: (*C.QsciLexerCustom)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } func (this *QsciLexerCustom) MetaObject() *qt6.QMetaObject { @@ -115,7 +124,7 @@ func (this *QsciLexerCustom) StartStyling2(pos int, styleBits int) { // Delete this object from C++ memory. func (this *QsciLexerCustom) Delete() { - C.QsciLexerCustom_Delete(this.h) + C.QsciLexerCustom_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h index 12e378d0..aa99c60f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h @@ -16,11 +16,15 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; +class QsciLexer; class QsciLexerCustom; class QsciScintilla; class QsciStyle; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerCustom QsciLexerCustom; typedef struct QsciScintilla QsciScintilla; typedef struct QsciStyle QsciStyle; @@ -38,7 +42,7 @@ int QsciLexerCustom_StyleBitsNeeded(const QsciLexerCustom* self); struct miqt_string QsciLexerCustom_Tr2(const char* s, const char* c); struct miqt_string QsciLexerCustom_Tr3(const char* s, const char* c, int n); void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits); -void QsciLexerCustom_Delete(QsciLexerCustom* self); +void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp index 8f489a89..a237bb7f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,918 @@ #include "gen_qscilexerd.h" #include "_cgo_export.h" -QsciLexerD* QsciLexerD_new() { - return new QsciLexerD(); +class MiqtVirtualQsciLexerD : public virtual QsciLexerD { +public: + + MiqtVirtualQsciLexerD(): QsciLexerD() {}; + MiqtVirtualQsciLexerD(QObject* parent): QsciLexerD(parent) {}; + + virtual ~MiqtVirtualQsciLexerD() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerD::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerD_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerD::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerD::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerD_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerD::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerD::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerD_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerD::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerD::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerD::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerD::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerD::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerD::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerD::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerD::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerD_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerD::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerD::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerD::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerD::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerD::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerD::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerD::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerD::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerD::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerD::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerD::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerD::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerD_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerD::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerD::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerD::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerD::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerD::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerD::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerD_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerD::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerD::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerD::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerD::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerD::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerD::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerD::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerD_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerD::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerD::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerD::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerD::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerD::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerD::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerD::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerD_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerD::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerD::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerD_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerD::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerD::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerD_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerD::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerD::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerD_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerD::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerD::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerD_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerD::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerD::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerD_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerD::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerD::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerD_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerD::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerD::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerD::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerD::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerD::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerD::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerD::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerD::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerD_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerD::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerD::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerD::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerD::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerD_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerD::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(); + *outptr_QsciLexerD = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerD* QsciLexerD_new2(QObject* parent) { - return new QsciLexerD(parent); +void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(parent); + *outptr_QsciLexerD = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self) { @@ -178,7 +1085,299 @@ const char* QsciLexerD_BlockStartKeyword1(const QsciLexerD* self, int* style) { return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerD_Delete(QsciLexerD* self) { - delete self; +void QsciLexerD_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerD_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerD_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerD_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerD_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerD_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerD_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Language = slot; +} + +void QsciLexerD_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerD_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerD_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__LexerId = slot; +} + +int QsciLexerD_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerD_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerD_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerD_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerD_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerD_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerD_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerD_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerD_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerD_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerD_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerD_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerD_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerD_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerD_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerD_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerD_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerD_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerD_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Color(style); +} + +void QsciLexerD_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerD_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerD_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerD_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Font(style); +} + +void QsciLexerD_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerD_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerD_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerD_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerD_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerD_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerD_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Description = slot; +} + +void QsciLexerD_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerD_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerD_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerD_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerD_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerD_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerD_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerD_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerD_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerD_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerD_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerD_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerD_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerD_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerD_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerD_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerD_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerD_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerD_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerD_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerD_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetColor = slot; +} + +void QsciLexerD_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerD_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerD_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerD_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetFont = slot; +} + +void QsciLexerD_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerD_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerD_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerD_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerD_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerD*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerD_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerD*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerD_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerD*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerD_Delete(QsciLexerD* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.go b/qt-restricted-extras/qscintilla6/gen_qscilexerd.go index fcb4b5c9..724652a4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -43,7 +44,8 @@ const ( ) type QsciLexerD struct { - h *C.QsciLexerD + h *C.QsciLexerD + isSubclass bool *QsciLexer } @@ -61,27 +63,47 @@ func (this *QsciLexerD) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerD(h *C.QsciLexerD) *QsciLexerD { +// newQsciLexerD constructs the type using only CGO pointers. +func newQsciLexerD(h *C.QsciLexerD, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerD { if h == nil { return nil } - return &QsciLexerD{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerD{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerD(h unsafe.Pointer) *QsciLexerD { - return newQsciLexerD((*C.QsciLexerD)(h)) +// UnsafeNewQsciLexerD constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerD(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerD { + if h == nil { + return nil + } + + return &QsciLexerD{h: (*C.QsciLexerD)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerD constructs a new QsciLexerD object. func NewQsciLexerD() *QsciLexerD { - ret := C.QsciLexerD_new() - return newQsciLexerD(ret) + var outptr_QsciLexerD *C.QsciLexerD = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerD_new(&outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerD2 constructs a new QsciLexerD object. func NewQsciLexerD2(parent *qt6.QObject) *QsciLexerD { - ret := C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerD(ret) + var outptr_QsciLexerD *C.QsciLexerD = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerD) MetaObject() *qt6.QMetaObject { @@ -252,9 +274,963 @@ func (this *QsciLexerD) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerD) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerD_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerD) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerD_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFoldAtElse +func miqt_exec_callback_QsciLexerD_SetFoldAtElse(self *C.QsciLexerD, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerD_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerD) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerD_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFoldComments +func miqt_exec_callback_QsciLexerD_SetFoldComments(self *C.QsciLexerD, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerD_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerD) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerD_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFoldCompact +func miqt_exec_callback_QsciLexerD_SetFoldCompact(self *C.QsciLexerD, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_Language() string { + + _ret := C.QsciLexerD_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnLanguage(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Language +func miqt_exec_callback_QsciLexerD_Language(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerD_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnLexer(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Lexer +func miqt_exec_callback_QsciLexerD_Lexer(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerD_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnLexerId(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_LexerId +func miqt_exec_callback_QsciLexerD_LexerId(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerD_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_AutoCompletionFillups +func miqt_exec_callback_QsciLexerD_AutoCompletionFillups(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerD_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerD) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerD_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerD_AutoCompletionWordSeparators(self *C.QsciLexerD, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerD) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerD_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerD_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockEnd +func miqt_exec_callback_QsciLexerD_BlockEnd(self *C.QsciLexerD, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerD_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockLookback +func miqt_exec_callback_QsciLexerD_BlockLookback(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerD_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerD_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockStart +func miqt_exec_callback_QsciLexerD_BlockStart(self *C.QsciLexerD, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerD_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerD_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BlockStartKeyword +func miqt_exec_callback_QsciLexerD_BlockStartKeyword(self *C.QsciLexerD, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerD_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_BraceStyle +func miqt_exec_callback_QsciLexerD_BraceStyle(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerD_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerD_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_CaseSensitive +func miqt_exec_callback_QsciLexerD_CaseSensitive(self *C.QsciLexerD, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerD_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerD_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Color +func miqt_exec_callback_QsciLexerD_Color(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerD_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerD) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerD_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_EolFill +func miqt_exec_callback_QsciLexerD_EolFill(self *C.QsciLexerD, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerD_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerD_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Font +func miqt_exec_callback_QsciLexerD_Font(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerD_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_IndentationGuideView +func miqt_exec_callback_QsciLexerD_IndentationGuideView(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerD_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerD_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Keywords +func miqt_exec_callback_QsciLexerD_Keywords(self *C.QsciLexerD, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerD_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultStyle +func miqt_exec_callback_QsciLexerD_DefaultStyle(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerD_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerD) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerD_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Description +func miqt_exec_callback_QsciLexerD_Description(self *C.QsciLexerD, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerD) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerD_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerD_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_Paper +func miqt_exec_callback_QsciLexerD_Paper(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerD_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerD_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerD_DefaultColorWithStyle(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerD_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerD) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerD_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultEolFill +func miqt_exec_callback_QsciLexerD_DefaultEolFill(self *C.QsciLexerD, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerD_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerD_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerD_DefaultFontWithStyle(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerD_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerD) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerD_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerD_DefaultPaperWithStyle(self *C.QsciLexerD, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerD) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerD_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerD) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerD_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetEditor +func miqt_exec_callback_QsciLexerD_SetEditor(self *C.QsciLexerD, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_RefreshProperties() { + + C.QsciLexerD_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerD) OnRefreshProperties(slot func(super func())) { + C.QsciLexerD_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_RefreshProperties +func miqt_exec_callback_QsciLexerD_RefreshProperties(self *C.QsciLexerD, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerD{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerD) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerD_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerD) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerD_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_StyleBitsNeeded +func miqt_exec_callback_QsciLexerD_StyleBitsNeeded(self *C.QsciLexerD, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerD_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerD) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerD_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_WordCharacters +func miqt_exec_callback_QsciLexerD_WordCharacters(self *C.QsciLexerD, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerD) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerD_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerD) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerD_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerD_SetAutoIndentStyle(self *C.QsciLexerD, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerD) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerD_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerD_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetColor +func miqt_exec_callback_QsciLexerD_SetColor(self *C.QsciLexerD, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerD_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerD_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetEolFill +func miqt_exec_callback_QsciLexerD_SetEolFill(self *C.QsciLexerD, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerD_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerD_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetFont +func miqt_exec_callback_QsciLexerD_SetFont(self *C.QsciLexerD, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerD_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerD) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerD_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_SetPaper +func miqt_exec_callback_QsciLexerD_SetPaper(self *C.QsciLexerD, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerD{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerD) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerD_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerD) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerD_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_ReadProperties +func miqt_exec_callback_QsciLexerD_ReadProperties(self *C.QsciLexerD, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerD) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerD_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerD) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerD_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerD_WriteProperties +func miqt_exec_callback_QsciLexerD_WriteProperties(self *C.QsciLexerD, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerD) Delete() { - C.QsciLexerD_Delete(this.h) + C.QsciLexerD_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.h b/qt-restricted-extras/qscintilla6/gen_qscilexerd.h index e553fc69..5e403899 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerD; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerD QsciLexerD; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerD* QsciLexerD_new(); -QsciLexerD* QsciLexerD_new2(QObject* parent); +void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self); void* QsciLexerD_Metacast(QsciLexerD* self, const char* param1); struct miqt_string QsciLexerD_Tr(const char* s); @@ -59,7 +65,81 @@ struct miqt_string QsciLexerD_Tr3(const char* s, const char* c, int n); const char* QsciLexerD_BlockEnd1(const QsciLexerD* self, int* style); const char* QsciLexerD_BlockStart1(const QsciLexerD* self, int* style); const char* QsciLexerD_BlockStartKeyword1(const QsciLexerD* self, int* style); -void QsciLexerD_Delete(QsciLexerD* self); +void QsciLexerD_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerD_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerD_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerD_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_Language(const void* self); +void QsciLexerD_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_Lexer(const void* self); +void QsciLexerD_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerD_virtualbase_LexerId(const void* self); +void QsciLexerD_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerD_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerD_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerD_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerD_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerD_virtualbase_BlockLookback(const void* self); +void QsciLexerD_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerD_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerD_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerD_virtualbase_BraceStyle(const void* self); +void QsciLexerD_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_CaseSensitive(const void* self); +void QsciLexerD_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_Color(const void* self, int style); +void QsciLexerD_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_EolFill(const void* self, int style); +void QsciLexerD_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerD_virtualbase_Font(const void* self, int style); +void QsciLexerD_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerD_virtualbase_IndentationGuideView(const void* self); +void QsciLexerD_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_Keywords(const void* self, int set); +void QsciLexerD_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerD_virtualbase_DefaultStyle(const void* self); +void QsciLexerD_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerD_virtualbase_Description(const void* self, int style); +void QsciLexerD_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_Paper(const void* self, int style); +void QsciLexerD_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerD_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerD_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerD_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerD_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerD_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerD_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerD_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerD_virtualbase_RefreshProperties(void* self); +void QsciLexerD_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerD_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerD_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerD_virtualbase_WordCharacters(const void* self); +void QsciLexerD_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerD_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerD_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerD_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerD_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerD_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerD_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerD_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerD_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerD_Delete(QsciLexerD* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp index 03eb4872..8f7d7b74 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,846 @@ #include "gen_qscilexerdiff.h" #include "_cgo_export.h" -QsciLexerDiff* QsciLexerDiff_new() { - return new QsciLexerDiff(); +class MiqtVirtualQsciLexerDiff : public virtual QsciLexerDiff { +public: + + MiqtVirtualQsciLexerDiff(): QsciLexerDiff() {}; + MiqtVirtualQsciLexerDiff(QObject* parent): QsciLexerDiff(parent) {}; + + virtual ~MiqtVirtualQsciLexerDiff() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerDiff::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerDiff::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerDiff::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerDiff::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerDiff::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerDiff::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerDiff::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerDiff_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerDiff::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerDiff::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerDiff::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerDiff::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerDiff::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerDiff::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerDiff::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerDiff::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerDiff::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerDiff::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerDiff::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerDiff::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerDiff::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerDiff::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerDiff::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerDiff::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerDiff::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerDiff::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerDiff_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerDiff::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerDiff::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerDiff::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerDiff::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerDiff::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerDiff::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerDiff::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerDiff_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerDiff::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerDiff::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerDiff::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerDiff::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerDiff::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerDiff::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerDiff::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerDiff::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerDiff::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerDiff_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerDiff::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerDiff::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerDiff_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerDiff::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerDiff::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerDiff_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerDiff::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerDiff::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerDiff_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerDiff::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerDiff::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerDiff_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerDiff::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerDiff::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerDiff_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerDiff::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerDiff::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerDiff::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerDiff::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerDiff::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerDiff::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerDiff::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerDiff::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerDiff_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerDiff::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerDiff::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerDiff::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerDiff::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerDiff_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerDiff::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(); + *outptr_QsciLexerDiff = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerDiff* QsciLexerDiff_new2(QObject* parent) { - return new QsciLexerDiff(parent); +void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(parent); + *outptr_QsciLexerDiff = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self) { @@ -84,7 +921,275 @@ struct miqt_string QsciLexerDiff_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerDiff_Delete(QsciLexerDiff* self) { - delete self; +void QsciLexerDiff_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Language = slot; +} + +void QsciLexerDiff_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerDiff_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerDiff_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__LexerId = slot; +} + +int QsciLexerDiff_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerDiff_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerDiff_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerDiff_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerDiff_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerDiff_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerDiff_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerDiff_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerDiff_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerDiff_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerDiff_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerDiff_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerDiff_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerDiff_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerDiff_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerDiff_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerDiff_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerDiff_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerDiff_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Color(style); +} + +void QsciLexerDiff_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerDiff_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerDiff_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerDiff_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Font(style); +} + +void QsciLexerDiff_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerDiff_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerDiff_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerDiff_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerDiff_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerDiff_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerDiff_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Description = slot; +} + +void QsciLexerDiff_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerDiff_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerDiff_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerDiff_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerDiff_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerDiff_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerDiff_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerDiff_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerDiff_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerDiff_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerDiff_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerDiff_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerDiff_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerDiff_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerDiff_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerDiff_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerDiff_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerDiff_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerDiff_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerDiff_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerDiff_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetColor = slot; +} + +void QsciLexerDiff_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerDiff_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerDiff_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerDiff_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetFont = slot; +} + +void QsciLexerDiff_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerDiff_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerDiff_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerDiff_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerDiff_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerDiff_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerDiff*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerDiff_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerDiff*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerDiff_Delete(QsciLexerDiff* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go index 0fa097e5..facb746f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -32,7 +33,8 @@ const ( ) type QsciLexerDiff struct { - h *C.QsciLexerDiff + h *C.QsciLexerDiff + isSubclass bool *QsciLexer } @@ -50,27 +52,47 @@ func (this *QsciLexerDiff) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerDiff(h *C.QsciLexerDiff) *QsciLexerDiff { +// newQsciLexerDiff constructs the type using only CGO pointers. +func newQsciLexerDiff(h *C.QsciLexerDiff, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerDiff { if h == nil { return nil } - return &QsciLexerDiff{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerDiff{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerDiff(h unsafe.Pointer) *QsciLexerDiff { - return newQsciLexerDiff((*C.QsciLexerDiff)(h)) +// UnsafeNewQsciLexerDiff constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerDiff(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerDiff { + if h == nil { + return nil + } + + return &QsciLexerDiff{h: (*C.QsciLexerDiff)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerDiff constructs a new QsciLexerDiff object. func NewQsciLexerDiff() *QsciLexerDiff { - ret := C.QsciLexerDiff_new() - return newQsciLexerDiff(ret) + var outptr_QsciLexerDiff *C.QsciLexerDiff = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerDiff_new(&outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerDiff2 constructs a new QsciLexerDiff object. func NewQsciLexerDiff2(parent *qt6.QObject) *QsciLexerDiff { - ret := C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerDiff(ret) + var outptr_QsciLexerDiff *C.QsciLexerDiff = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerDiff) MetaObject() *qt6.QMetaObject { @@ -143,9 +165,894 @@ func QsciLexerDiff_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerDiff) callVirtualBase_Language() string { + + _ret := C.QsciLexerDiff_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnLanguage(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Language +func miqt_exec_callback_QsciLexerDiff_Language(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerDiff_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnLexer(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Lexer +func miqt_exec_callback_QsciLexerDiff_Lexer(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerDiff_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnLexerId(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_LexerId +func miqt_exec_callback_QsciLexerDiff_LexerId(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerDiff_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_AutoCompletionFillups +func miqt_exec_callback_QsciLexerDiff_AutoCompletionFillups(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerDiff_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerDiff) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerDiff_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerDiff_AutoCompletionWordSeparators(self *C.QsciLexerDiff, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerDiff_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerDiff_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockEnd +func miqt_exec_callback_QsciLexerDiff_BlockEnd(self *C.QsciLexerDiff, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerDiff_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockLookback +func miqt_exec_callback_QsciLexerDiff_BlockLookback(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerDiff_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerDiff_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockStart +func miqt_exec_callback_QsciLexerDiff_BlockStart(self *C.QsciLexerDiff, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerDiff_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerDiff_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BlockStartKeyword +func miqt_exec_callback_QsciLexerDiff_BlockStartKeyword(self *C.QsciLexerDiff, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerDiff_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_BraceStyle +func miqt_exec_callback_QsciLexerDiff_BraceStyle(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerDiff_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerDiff_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_CaseSensitive +func miqt_exec_callback_QsciLexerDiff_CaseSensitive(self *C.QsciLexerDiff, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerDiff_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerDiff_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Color +func miqt_exec_callback_QsciLexerDiff_Color(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerDiff_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerDiff) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerDiff_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_EolFill +func miqt_exec_callback_QsciLexerDiff_EolFill(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerDiff_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerDiff_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Font +func miqt_exec_callback_QsciLexerDiff_Font(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerDiff_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_IndentationGuideView +func miqt_exec_callback_QsciLexerDiff_IndentationGuideView(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerDiff_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerDiff_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Keywords +func miqt_exec_callback_QsciLexerDiff_Keywords(self *C.QsciLexerDiff, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerDiff_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultStyle +func miqt_exec_callback_QsciLexerDiff_DefaultStyle(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerDiff_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerDiff) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerDiff_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Description +func miqt_exec_callback_QsciLexerDiff_Description(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerDiff) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerDiff_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerDiff_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_Paper +func miqt_exec_callback_QsciLexerDiff_Paper(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerDiff_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerDiff_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerDiff_DefaultColorWithStyle(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerDiff_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerDiff) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerDiff_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultEolFill +func miqt_exec_callback_QsciLexerDiff_DefaultEolFill(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerDiff_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerDiff_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerDiff_DefaultFontWithStyle(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerDiff_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerDiff) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerDiff_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerDiff_DefaultPaperWithStyle(self *C.QsciLexerDiff, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerDiff_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerDiff) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerDiff_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetEditor +func miqt_exec_callback_QsciLexerDiff_SetEditor(self *C.QsciLexerDiff, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerDiff) callVirtualBase_RefreshProperties() { + + C.QsciLexerDiff_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerDiff) OnRefreshProperties(slot func(super func())) { + C.QsciLexerDiff_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_RefreshProperties +func miqt_exec_callback_QsciLexerDiff_RefreshProperties(self *C.QsciLexerDiff, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerDiff) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerDiff_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerDiff) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerDiff_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_StyleBitsNeeded +func miqt_exec_callback_QsciLexerDiff_StyleBitsNeeded(self *C.QsciLexerDiff, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerDiff_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerDiff) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerDiff_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_WordCharacters +func miqt_exec_callback_QsciLexerDiff_WordCharacters(self *C.QsciLexerDiff, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerDiff) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerDiff_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerDiff) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerDiff_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerDiff_SetAutoIndentStyle(self *C.QsciLexerDiff, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerDiff_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerDiff_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetColor +func miqt_exec_callback_QsciLexerDiff_SetColor(self *C.QsciLexerDiff, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerDiff_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerDiff_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetEolFill +func miqt_exec_callback_QsciLexerDiff_SetEolFill(self *C.QsciLexerDiff, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerDiff_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerDiff_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetFont +func miqt_exec_callback_QsciLexerDiff_SetFont(self *C.QsciLexerDiff, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerDiff_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerDiff) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerDiff_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_SetPaper +func miqt_exec_callback_QsciLexerDiff_SetPaper(self *C.QsciLexerDiff, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerDiff) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerDiff_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerDiff) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerDiff_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_ReadProperties +func miqt_exec_callback_QsciLexerDiff_ReadProperties(self *C.QsciLexerDiff, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerDiff) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerDiff_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerDiff) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerDiff_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerDiff_WriteProperties +func miqt_exec_callback_QsciLexerDiff_WriteProperties(self *C.QsciLexerDiff, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerDiff) Delete() { - C.QsciLexerDiff_Delete(this.h) + C.QsciLexerDiff_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h index 373a8aeb..7727e54c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h @@ -16,18 +16,26 @@ extern "C" { #ifdef __cplusplus class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerDiff; +class QsciScintilla; #else typedef struct QColor QColor; +typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerDiff QsciLexerDiff; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerDiff* QsciLexerDiff_new(); -QsciLexerDiff* QsciLexerDiff_new2(QObject* parent); +void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self); void* QsciLexerDiff_Metacast(QsciLexerDiff* self, const char* param1); struct miqt_string QsciLexerDiff_Tr(const char* s); @@ -38,7 +46,75 @@ QColor* QsciLexerDiff_DefaultColor(const QsciLexerDiff* self, int style); struct miqt_string QsciLexerDiff_Description(const QsciLexerDiff* self, int style); struct miqt_string QsciLexerDiff_Tr2(const char* s, const char* c); struct miqt_string QsciLexerDiff_Tr3(const char* s, const char* c, int n); -void QsciLexerDiff_Delete(QsciLexerDiff* self); +void QsciLexerDiff_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_Language(const void* self); +void QsciLexerDiff_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_Lexer(const void* self); +void QsciLexerDiff_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_LexerId(const void* self); +void QsciLexerDiff_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerDiff_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerDiff_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerDiff_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerDiff_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_BlockLookback(const void* self); +void QsciLexerDiff_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerDiff_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerDiff_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_BraceStyle(const void* self); +void QsciLexerDiff_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_CaseSensitive(const void* self); +void QsciLexerDiff_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_Color(const void* self, int style); +void QsciLexerDiff_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_EolFill(const void* self, int style); +void QsciLexerDiff_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerDiff_virtualbase_Font(const void* self, int style); +void QsciLexerDiff_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_IndentationGuideView(const void* self); +void QsciLexerDiff_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_Keywords(const void* self, int set); +void QsciLexerDiff_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_DefaultStyle(const void* self); +void QsciLexerDiff_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerDiff_virtualbase_Description(const void* self, int style); +void QsciLexerDiff_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_Paper(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerDiff_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerDiff_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerDiff_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerDiff_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerDiff_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_RefreshProperties(void* self); +void QsciLexerDiff_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerDiff_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerDiff_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerDiff_virtualbase_WordCharacters(const void* self); +void QsciLexerDiff_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerDiff_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerDiff_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerDiff_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerDiff_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerDiff_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerDiff_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerDiff_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerDiff_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerDiff_Delete(QsciLexerDiff* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp index 44ae32a1..b6d1ef4e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,846 @@ #include "gen_qscilexeredifact.h" #include "_cgo_export.h" -QsciLexerEDIFACT* QsciLexerEDIFACT_new() { - return new QsciLexerEDIFACT(); +class MiqtVirtualQsciLexerEDIFACT : public virtual QsciLexerEDIFACT { +public: + + MiqtVirtualQsciLexerEDIFACT(): QsciLexerEDIFACT() {}; + MiqtVirtualQsciLexerEDIFACT(QObject* parent): QsciLexerEDIFACT(parent) {}; + + virtual ~MiqtVirtualQsciLexerEDIFACT() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerEDIFACT::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerEDIFACT::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerEDIFACT::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerEDIFACT::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerEDIFACT::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerEDIFACT::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerEDIFACT::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerEDIFACT::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerEDIFACT::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerEDIFACT::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerEDIFACT::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerEDIFACT::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerEDIFACT::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerEDIFACT::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerEDIFACT::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerEDIFACT::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerEDIFACT::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerEDIFACT::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerEDIFACT::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerEDIFACT::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerEDIFACT::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerEDIFACT::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerEDIFACT::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerEDIFACT::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerEDIFACT::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerEDIFACT::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerEDIFACT::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerEDIFACT::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerEDIFACT::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerEDIFACT::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerEDIFACT::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerEDIFACT::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerEDIFACT::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerEDIFACT::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerEDIFACT::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerEDIFACT::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerEDIFACT::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerEDIFACT::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerEDIFACT::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerEDIFACT::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerEDIFACT::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerEDIFACT::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerEDIFACT::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerEDIFACT_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerEDIFACT::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerEDIFACT::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerEDIFACT_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerEDIFACT::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerEDIFACT::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerEDIFACT::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerEDIFACT::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerEDIFACT::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerEDIFACT::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerEDIFACT_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerEDIFACT::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerEDIFACT::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerEDIFACT::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerEDIFACT::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerEDIFACT::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerEDIFACT::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerEDIFACT::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerEDIFACT::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerEDIFACT_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerEDIFACT::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerEDIFACT::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerEDIFACT::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerEDIFACT::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerEDIFACT_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerEDIFACT::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(); + *outptr_QsciLexerEDIFACT = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent) { - return new QsciLexerEDIFACT(parent); +void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(parent); + *outptr_QsciLexerEDIFACT = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self) { @@ -80,7 +917,275 @@ struct miqt_string QsciLexerEDIFACT_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self) { - delete self; +void QsciLexerEDIFACT_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Language = slot; +} + +void QsciLexerEDIFACT_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerEDIFACT_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__LexerId = slot; +} + +int QsciLexerEDIFACT_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerEDIFACT_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerEDIFACT_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerEDIFACT_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerEDIFACT_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerEDIFACT_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerEDIFACT_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerEDIFACT_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerEDIFACT_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerEDIFACT_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerEDIFACT_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerEDIFACT_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerEDIFACT_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerEDIFACT_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Color(style); +} + +void QsciLexerEDIFACT_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerEDIFACT_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerEDIFACT_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerEDIFACT_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Font(style); +} + +void QsciLexerEDIFACT_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerEDIFACT_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerEDIFACT_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerEDIFACT_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerEDIFACT_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerEDIFACT_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Description = slot; +} + +void QsciLexerEDIFACT_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerEDIFACT_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerEDIFACT_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerEDIFACT_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerEDIFACT_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerEDIFACT_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerEDIFACT_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerEDIFACT_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerEDIFACT_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerEDIFACT_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerEDIFACT_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerEDIFACT_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerEDIFACT_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerEDIFACT_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetColor = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerEDIFACT_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerEDIFACT_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetFont = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerEDIFACT_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerEDIFACT_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerEDIFACT_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerEDIFACT_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerEDIFACT_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerEDIFACT*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerEDIFACT_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerEDIFACT*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go index c2f12d65..aa15cb52 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QsciLexerEDIFACT struct { - h *C.QsciLexerEDIFACT + h *C.QsciLexerEDIFACT + isSubclass bool *QsciLexer } @@ -47,27 +49,47 @@ func (this *QsciLexerEDIFACT) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT) *QsciLexerEDIFACT { +// newQsciLexerEDIFACT constructs the type using only CGO pointers. +func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerEDIFACT { if h == nil { return nil } - return &QsciLexerEDIFACT{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerEDIFACT{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer) *QsciLexerEDIFACT { - return newQsciLexerEDIFACT((*C.QsciLexerEDIFACT)(h)) +// UnsafeNewQsciLexerEDIFACT constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerEDIFACT { + if h == nil { + return nil + } + + return &QsciLexerEDIFACT{h: (*C.QsciLexerEDIFACT)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerEDIFACT constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT() *QsciLexerEDIFACT { - ret := C.QsciLexerEDIFACT_new() - return newQsciLexerEDIFACT(ret) + var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerEDIFACT_new(&outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerEDIFACT2 constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT2(parent *qt6.QObject) *QsciLexerEDIFACT { - ret := C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerEDIFACT(ret) + var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerEDIFACT) MetaObject() *qt6.QMetaObject { @@ -135,9 +157,894 @@ func QsciLexerEDIFACT_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerEDIFACT) callVirtualBase_Language() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnLanguage(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Language +func miqt_exec_callback_QsciLexerEDIFACT_Language(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnLexer(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Lexer +func miqt_exec_callback_QsciLexerEDIFACT_Lexer(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnLexerId(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_LexerId +func miqt_exec_callback_QsciLexerEDIFACT_LexerId(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionFillups +func miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionFillups(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerEDIFACT_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerEDIFACT) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerEDIFACT_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerEDIFACT_AutoCompletionWordSeparators(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerEDIFACT_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockEnd +func miqt_exec_callback_QsciLexerEDIFACT_BlockEnd(self *C.QsciLexerEDIFACT, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockLookback +func miqt_exec_callback_QsciLexerEDIFACT_BlockLookback(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerEDIFACT_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockStart +func miqt_exec_callback_QsciLexerEDIFACT_BlockStart(self *C.QsciLexerEDIFACT, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerEDIFACT_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BlockStartKeyword +func miqt_exec_callback_QsciLexerEDIFACT_BlockStartKeyword(self *C.QsciLexerEDIFACT, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_BraceStyle +func miqt_exec_callback_QsciLexerEDIFACT_BraceStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerEDIFACT_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerEDIFACT_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_CaseSensitive +func miqt_exec_callback_QsciLexerEDIFACT_CaseSensitive(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerEDIFACT_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Color +func miqt_exec_callback_QsciLexerEDIFACT_Color(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerEDIFACT_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerEDIFACT) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerEDIFACT_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_EolFill +func miqt_exec_callback_QsciLexerEDIFACT_EolFill(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerEDIFACT_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerEDIFACT_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Font +func miqt_exec_callback_QsciLexerEDIFACT_Font(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_IndentationGuideView +func miqt_exec_callback_QsciLexerEDIFACT_IndentationGuideView(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerEDIFACT_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerEDIFACT_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Keywords +func miqt_exec_callback_QsciLexerEDIFACT_Keywords(self *C.QsciLexerEDIFACT, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerEDIFACT_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerEDIFACT) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerEDIFACT_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Description +func miqt_exec_callback_QsciLexerEDIFACT_Description(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerEDIFACT_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_Paper +func miqt_exec_callback_QsciLexerEDIFACT_Paper(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerEDIFACT_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultColorWithStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerEDIFACT_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerEDIFACT) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerEDIFACT_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultEolFill +func miqt_exec_callback_QsciLexerEDIFACT_DefaultEolFill(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerEDIFACT_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerEDIFACT_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultFontWithStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerEDIFACT_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerEDIFACT) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerEDIFACT_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerEDIFACT_DefaultPaperWithStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerEDIFACT_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerEDIFACT) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerEDIFACT_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetEditor +func miqt_exec_callback_QsciLexerEDIFACT_SetEditor(self *C.QsciLexerEDIFACT, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_RefreshProperties() { + + C.QsciLexerEDIFACT_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerEDIFACT) OnRefreshProperties(slot func(super func())) { + C.QsciLexerEDIFACT_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_RefreshProperties +func miqt_exec_callback_QsciLexerEDIFACT_RefreshProperties(self *C.QsciLexerEDIFACT, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerEDIFACT_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerEDIFACT) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerEDIFACT_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_StyleBitsNeeded +func miqt_exec_callback_QsciLexerEDIFACT_StyleBitsNeeded(self *C.QsciLexerEDIFACT, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerEDIFACT_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerEDIFACT) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerEDIFACT_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_WordCharacters +func miqt_exec_callback_QsciLexerEDIFACT_WordCharacters(self *C.QsciLexerEDIFACT, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerEDIFACT_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerEDIFACT) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerEDIFACT_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerEDIFACT_SetAutoIndentStyle(self *C.QsciLexerEDIFACT, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetColor +func miqt_exec_callback_QsciLexerEDIFACT_SetColor(self *C.QsciLexerEDIFACT, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetEolFill +func miqt_exec_callback_QsciLexerEDIFACT_SetEolFill(self *C.QsciLexerEDIFACT, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetFont +func miqt_exec_callback_QsciLexerEDIFACT_SetFont(self *C.QsciLexerEDIFACT, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerEDIFACT_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerEDIFACT) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerEDIFACT_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_SetPaper +func miqt_exec_callback_QsciLexerEDIFACT_SetPaper(self *C.QsciLexerEDIFACT, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerEDIFACT_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerEDIFACT) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerEDIFACT_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_ReadProperties +func miqt_exec_callback_QsciLexerEDIFACT_ReadProperties(self *C.QsciLexerEDIFACT, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerEDIFACT) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerEDIFACT_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerEDIFACT) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerEDIFACT_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerEDIFACT_WriteProperties +func miqt_exec_callback_QsciLexerEDIFACT_WriteProperties(self *C.QsciLexerEDIFACT, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerEDIFACT) Delete() { - C.QsciLexerEDIFACT_Delete(this.h) + C.QsciLexerEDIFACT_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h index 36749f30..79ac1e60 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h @@ -16,18 +16,26 @@ extern "C" { #ifdef __cplusplus class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerEDIFACT; +class QsciScintilla; #else typedef struct QColor QColor; +typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerEDIFACT QsciLexerEDIFACT; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerEDIFACT* QsciLexerEDIFACT_new(); -QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent); +void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self); void* QsciLexerEDIFACT_Metacast(QsciLexerEDIFACT* self, const char* param1); struct miqt_string QsciLexerEDIFACT_Tr(const char* s); @@ -37,7 +45,75 @@ QColor* QsciLexerEDIFACT_DefaultColor(const QsciLexerEDIFACT* self, int style); struct miqt_string QsciLexerEDIFACT_Description(const QsciLexerEDIFACT* self, int style); struct miqt_string QsciLexerEDIFACT_Tr2(const char* s, const char* c); struct miqt_string QsciLexerEDIFACT_Tr3(const char* s, const char* c, int n); -void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self); +void QsciLexerEDIFACT_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_Language(const void* self); +void QsciLexerEDIFACT_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_Lexer(const void* self); +void QsciLexerEDIFACT_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_LexerId(const void* self); +void QsciLexerEDIFACT_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerEDIFACT_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerEDIFACT_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerEDIFACT_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerEDIFACT_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_BlockLookback(const void* self); +void QsciLexerEDIFACT_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerEDIFACT_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerEDIFACT_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_BraceStyle(const void* self); +void QsciLexerEDIFACT_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_CaseSensitive(const void* self); +void QsciLexerEDIFACT_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_Color(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_EolFill(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerEDIFACT_virtualbase_Font(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_IndentationGuideView(const void* self); +void QsciLexerEDIFACT_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_Keywords(const void* self, int set); +void QsciLexerEDIFACT_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_DefaultStyle(const void* self); +void QsciLexerEDIFACT_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerEDIFACT_virtualbase_Description(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_Paper(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerEDIFACT_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerEDIFACT_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerEDIFACT_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerEDIFACT_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_RefreshProperties(void* self); +void QsciLexerEDIFACT_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerEDIFACT_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerEDIFACT_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerEDIFACT_virtualbase_WordCharacters(const void* self); +void QsciLexerEDIFACT_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerEDIFACT_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerEDIFACT_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerEDIFACT_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerEDIFACT_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerEDIFACT_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerEDIFACT_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerEDIFACT_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerEDIFACT_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerEDIFACT_Delete(QsciLexerEDIFACT* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp index 300c9ae0..0f0e06d9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp @@ -7,12 +7,54 @@ #include "gen_qscilexerfortran.h" #include "_cgo_export.h" -QsciLexerFortran* QsciLexerFortran_new() { - return new QsciLexerFortran(); +class MiqtVirtualQsciLexerFortran : public virtual QsciLexerFortran { +public: + + MiqtVirtualQsciLexerFortran(): QsciLexerFortran() {}; + MiqtVirtualQsciLexerFortran(QObject* parent): QsciLexerFortran(parent) {}; + + virtual ~MiqtVirtualQsciLexerFortran() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerFortran::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerFortran_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerFortran::setFoldCompact(fold); + + } + +}; + +void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(); + *outptr_QsciLexerFortran = ret; + *outptr_QsciLexerFortran77 = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerFortran* QsciLexerFortran_new2(QObject* parent) { - return new QsciLexerFortran(parent); +void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(parent); + *outptr_QsciLexerFortran = ret; + *outptr_QsciLexerFortran77 = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self) { @@ -68,7 +110,19 @@ struct miqt_string QsciLexerFortran_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerFortran_Delete(QsciLexerFortran* self) { - delete self; +void QsciLexerFortran_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerFortran_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerFortran*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerFortran_Delete(QsciLexerFortran* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go index 4437f3d5..358ff415 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerFortran struct { - h *C.QsciLexerFortran + h *C.QsciLexerFortran + isSubclass bool *QsciLexerFortran77 } @@ -33,27 +35,49 @@ func (this *QsciLexerFortran) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerFortran(h *C.QsciLexerFortran) *QsciLexerFortran { +// newQsciLexerFortran constructs the type using only CGO pointers. +func newQsciLexerFortran(h *C.QsciLexerFortran, h_QsciLexerFortran77 *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran { if h == nil { return nil } - return &QsciLexerFortran{h: h, QsciLexerFortran77: UnsafeNewQsciLexerFortran77(unsafe.Pointer(h))} + return &QsciLexerFortran{h: h, + QsciLexerFortran77: newQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerFortran(h unsafe.Pointer) *QsciLexerFortran { - return newQsciLexerFortran((*C.QsciLexerFortran)(h)) +// UnsafeNewQsciLexerFortran constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerFortran(h unsafe.Pointer, h_QsciLexerFortran77 unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran { + if h == nil { + return nil + } + + return &QsciLexerFortran{h: (*C.QsciLexerFortran)(h), + QsciLexerFortran77: UnsafeNewQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} } // NewQsciLexerFortran constructs a new QsciLexerFortran object. func NewQsciLexerFortran() *QsciLexerFortran { - ret := C.QsciLexerFortran_new() - return newQsciLexerFortran(ret) + var outptr_QsciLexerFortran *C.QsciLexerFortran = nil + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran_new(&outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerFortran2 constructs a new QsciLexerFortran object. func NewQsciLexerFortran2(parent *qt6.QObject) *QsciLexerFortran { - ret := C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerFortran(ret) + var outptr_QsciLexerFortran *C.QsciLexerFortran = nil + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerFortran) MetaObject() *qt6.QMetaObject { @@ -112,9 +136,32 @@ func QsciLexerFortran_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerFortran) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerFortran_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerFortran) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerFortran_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran_SetFoldCompact +func miqt_exec_callback_QsciLexerFortran_SetFoldCompact(self *C.QsciLexerFortran, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerFortran{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerFortran) Delete() { - C.QsciLexerFortran_Delete(this.h) + C.QsciLexerFortran_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h index 69ba35b5..350b1710 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QObject; +class QsciLexer; class QsciLexerFortran; +class QsciLexerFortran77; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerFortran QsciLexerFortran; +typedef struct QsciLexerFortran77 QsciLexerFortran77; #endif -QsciLexerFortran* QsciLexerFortran_new(); -QsciLexerFortran* QsciLexerFortran_new2(QObject* parent); +void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self); void* QsciLexerFortran_Metacast(QsciLexerFortran* self, const char* param1); struct miqt_string QsciLexerFortran_Tr(const char* s); @@ -34,7 +38,9 @@ const char* QsciLexerFortran_Lexer(const QsciLexerFortran* self); const char* QsciLexerFortran_Keywords(const QsciLexerFortran* self, int set); struct miqt_string QsciLexerFortran_Tr2(const char* s, const char* c); struct miqt_string QsciLexerFortran_Tr3(const char* s, const char* c, int n); -void QsciLexerFortran_Delete(QsciLexerFortran* self); +void QsciLexerFortran_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerFortran_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerFortran_Delete(QsciLexerFortran* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp index 8c980717..44805b6a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexerfortran77.h" #include "_cgo_export.h" -QsciLexerFortran77* QsciLexerFortran77_new() { - return new QsciLexerFortran77(); +class MiqtVirtualQsciLexerFortran77 : public virtual QsciLexerFortran77 { +public: + + MiqtVirtualQsciLexerFortran77(): QsciLexerFortran77() {}; + MiqtVirtualQsciLexerFortran77(QObject* parent): QsciLexerFortran77(parent) {}; + + virtual ~MiqtVirtualQsciLexerFortran77() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerFortran77::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerFortran77_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerFortran77::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerFortran77::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerFortran77::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerFortran77::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerFortran77::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerFortran77::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerFortran77::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerFortran77::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerFortran77_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerFortran77::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerFortran77::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerFortran77::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerFortran77::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerFortran77::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerFortran77::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerFortran77::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerFortran77::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerFortran77::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerFortran77::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerFortran77::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerFortran77::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerFortran77::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerFortran77::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerFortran77::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerFortran77::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerFortran77::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerFortran77::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerFortran77::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerFortran77::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerFortran77::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerFortran77::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerFortran77::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerFortran77::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerFortran77::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerFortran77_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerFortran77::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerFortran77::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerFortran77::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerFortran77::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerFortran77::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerFortran77::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerFortran77::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerFortran77::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerFortran77::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerFortran77_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerFortran77::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerFortran77::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerFortran77_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerFortran77::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerFortran77::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerFortran77_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerFortran77::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerFortran77::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerFortran77_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerFortran77::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerFortran77::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerFortran77_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerFortran77::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerFortran77::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerFortran77_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerFortran77::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerFortran77::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerFortran77::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerFortran77::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerFortran77::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerFortran77::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerFortran77::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerFortran77::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerFortran77_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerFortran77::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerFortran77::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerFortran77::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerFortran77::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerFortran77_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerFortran77::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(); + *outptr_QsciLexerFortran77 = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent) { - return new QsciLexerFortran77(parent); +void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(parent); + *outptr_QsciLexerFortran77 = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self) { @@ -113,7 +973,283 @@ struct miqt_string QsciLexerFortran77_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerFortran77_Delete(QsciLexerFortran77* self) { - delete self; +void QsciLexerFortran77_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerFortran77_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerFortran77_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Language = slot; +} + +void QsciLexerFortran77_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerFortran77_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerFortran77_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__LexerId = slot; +} + +int QsciLexerFortran77_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerFortran77_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerFortran77_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerFortran77_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerFortran77_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerFortran77_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerFortran77_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerFortran77_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerFortran77_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerFortran77_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerFortran77_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerFortran77_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerFortran77_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerFortran77_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerFortran77_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerFortran77_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerFortran77_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerFortran77_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerFortran77_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Color(style); +} + +void QsciLexerFortran77_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerFortran77_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerFortran77_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerFortran77_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Font(style); +} + +void QsciLexerFortran77_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerFortran77_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerFortran77_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerFortran77_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerFortran77_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerFortran77_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerFortran77_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Description = slot; +} + +void QsciLexerFortran77_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerFortran77_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerFortran77_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerFortran77_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerFortran77_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerFortran77_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerFortran77_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerFortran77_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerFortran77_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerFortran77_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerFortran77_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerFortran77_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerFortran77_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerFortran77_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerFortran77_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerFortran77_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerFortran77_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerFortran77_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerFortran77_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerFortran77_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerFortran77_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetColor = slot; +} + +void QsciLexerFortran77_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerFortran77_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerFortran77_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerFortran77_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetFont = slot; +} + +void QsciLexerFortran77_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerFortran77_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerFortran77_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerFortran77_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerFortran77_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerFortran77_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerFortran77*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerFortran77_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerFortran77*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerFortran77_Delete(QsciLexerFortran77* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go index 25a7055b..2212cdff 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerFortran77 struct { - h *C.QsciLexerFortran77 + h *C.QsciLexerFortran77 + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerFortran77) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerFortran77(h *C.QsciLexerFortran77) *QsciLexerFortran77 { +// newQsciLexerFortran77 constructs the type using only CGO pointers. +func newQsciLexerFortran77(h *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran77 { if h == nil { return nil } - return &QsciLexerFortran77{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerFortran77{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerFortran77(h unsafe.Pointer) *QsciLexerFortran77 { - return newQsciLexerFortran77((*C.QsciLexerFortran77)(h)) +// UnsafeNewQsciLexerFortran77 constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerFortran77(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran77 { + if h == nil { + return nil + } + + return &QsciLexerFortran77{h: (*C.QsciLexerFortran77)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerFortran77 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran77() *QsciLexerFortran77 { - ret := C.QsciLexerFortran77_new() - return newQsciLexerFortran77(ret) + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran77_new(&outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerFortran772 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran772(parent *qt6.QObject) *QsciLexerFortran77 { - ret := C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerFortran77(ret) + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerFortran77) MetaObject() *qt6.QMetaObject { @@ -180,9 +202,917 @@ func QsciLexerFortran77_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerFortran77) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerFortran77_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerFortran77) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerFortran77_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetFoldCompact +func miqt_exec_callback_QsciLexerFortran77_SetFoldCompact(self *C.QsciLexerFortran77, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Language() string { + + _ret := C.QsciLexerFortran77_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnLanguage(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Language +func miqt_exec_callback_QsciLexerFortran77_Language(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerFortran77_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnLexer(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Lexer +func miqt_exec_callback_QsciLexerFortran77_Lexer(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerFortran77_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnLexerId(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_LexerId +func miqt_exec_callback_QsciLexerFortran77_LexerId(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerFortran77_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_AutoCompletionFillups +func miqt_exec_callback_QsciLexerFortran77_AutoCompletionFillups(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerFortran77_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerFortran77) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerFortran77_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerFortran77_AutoCompletionWordSeparators(self *C.QsciLexerFortran77, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerFortran77_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerFortran77_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockEnd +func miqt_exec_callback_QsciLexerFortran77_BlockEnd(self *C.QsciLexerFortran77, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerFortran77_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockLookback +func miqt_exec_callback_QsciLexerFortran77_BlockLookback(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerFortran77_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerFortran77_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockStart +func miqt_exec_callback_QsciLexerFortran77_BlockStart(self *C.QsciLexerFortran77, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerFortran77_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerFortran77_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BlockStartKeyword +func miqt_exec_callback_QsciLexerFortran77_BlockStartKeyword(self *C.QsciLexerFortran77, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerFortran77_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_BraceStyle +func miqt_exec_callback_QsciLexerFortran77_BraceStyle(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerFortran77_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerFortran77_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_CaseSensitive +func miqt_exec_callback_QsciLexerFortran77_CaseSensitive(self *C.QsciLexerFortran77, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerFortran77_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Color +func miqt_exec_callback_QsciLexerFortran77_Color(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerFortran77_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerFortran77) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerFortran77_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_EolFill +func miqt_exec_callback_QsciLexerFortran77_EolFill(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerFortran77_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerFortran77_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Font +func miqt_exec_callback_QsciLexerFortran77_Font(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerFortran77_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_IndentationGuideView +func miqt_exec_callback_QsciLexerFortran77_IndentationGuideView(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerFortran77_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerFortran77_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Keywords +func miqt_exec_callback_QsciLexerFortran77_Keywords(self *C.QsciLexerFortran77, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerFortran77_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultStyle(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerFortran77_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerFortran77) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerFortran77_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Description +func miqt_exec_callback_QsciLexerFortran77_Description(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerFortran77) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerFortran77_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_Paper +func miqt_exec_callback_QsciLexerFortran77_Paper(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerFortran77_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultColorWithStyle(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerFortran77_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerFortran77) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerFortran77_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultEolFill +func miqt_exec_callback_QsciLexerFortran77_DefaultEolFill(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerFortran77_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerFortran77_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultFontWithStyle(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerFortran77_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerFortran77) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerFortran77_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerFortran77_DefaultPaperWithStyle(self *C.QsciLexerFortran77, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerFortran77_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerFortran77) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerFortran77_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetEditor +func miqt_exec_callback_QsciLexerFortran77_SetEditor(self *C.QsciLexerFortran77, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerFortran77) callVirtualBase_RefreshProperties() { + + C.QsciLexerFortran77_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerFortran77) OnRefreshProperties(slot func(super func())) { + C.QsciLexerFortran77_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_RefreshProperties +func miqt_exec_callback_QsciLexerFortran77_RefreshProperties(self *C.QsciLexerFortran77, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerFortran77) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerFortran77_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerFortran77) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerFortran77_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_StyleBitsNeeded +func miqt_exec_callback_QsciLexerFortran77_StyleBitsNeeded(self *C.QsciLexerFortran77, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerFortran77_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerFortran77) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerFortran77_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_WordCharacters +func miqt_exec_callback_QsciLexerFortran77_WordCharacters(self *C.QsciLexerFortran77, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerFortran77_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerFortran77) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerFortran77_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerFortran77_SetAutoIndentStyle(self *C.QsciLexerFortran77, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerFortran77_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerFortran77_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetColor +func miqt_exec_callback_QsciLexerFortran77_SetColor(self *C.QsciLexerFortran77, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerFortran77_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerFortran77_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetEolFill +func miqt_exec_callback_QsciLexerFortran77_SetEolFill(self *C.QsciLexerFortran77, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerFortran77_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerFortran77_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetFont +func miqt_exec_callback_QsciLexerFortran77_SetFont(self *C.QsciLexerFortran77, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerFortran77_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerFortran77) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerFortran77_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_SetPaper +func miqt_exec_callback_QsciLexerFortran77_SetPaper(self *C.QsciLexerFortran77, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerFortran77) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerFortran77_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerFortran77) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerFortran77_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_ReadProperties +func miqt_exec_callback_QsciLexerFortran77_ReadProperties(self *C.QsciLexerFortran77, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerFortran77) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerFortran77_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerFortran77) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerFortran77_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerFortran77_WriteProperties +func miqt_exec_callback_QsciLexerFortran77_WriteProperties(self *C.QsciLexerFortran77, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerFortran77) Delete() { - C.QsciLexerFortran77_Delete(this.h) + C.QsciLexerFortran77_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h index 497359c9..79491f75 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerFortran77; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerFortran77 QsciLexerFortran77; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerFortran77* QsciLexerFortran77_new(); -QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent); +void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self); void* QsciLexerFortran77_Metacast(QsciLexerFortran77* self, const char* param1); struct miqt_string QsciLexerFortran77_Tr(const char* s); @@ -47,7 +53,77 @@ bool QsciLexerFortran77_FoldCompact(const QsciLexerFortran77* self); void QsciLexerFortran77_SetFoldCompact(QsciLexerFortran77* self, bool fold); struct miqt_string QsciLexerFortran77_Tr2(const char* s, const char* c); struct miqt_string QsciLexerFortran77_Tr3(const char* s, const char* c, int n); -void QsciLexerFortran77_Delete(QsciLexerFortran77* self); +void QsciLexerFortran77_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerFortran77_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_Language(const void* self); +void QsciLexerFortran77_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_Lexer(const void* self); +void QsciLexerFortran77_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_LexerId(const void* self); +void QsciLexerFortran77_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerFortran77_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerFortran77_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerFortran77_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerFortran77_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_BlockLookback(const void* self); +void QsciLexerFortran77_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerFortran77_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerFortran77_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_BraceStyle(const void* self); +void QsciLexerFortran77_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_CaseSensitive(const void* self); +void QsciLexerFortran77_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_Color(const void* self, int style); +void QsciLexerFortran77_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_EolFill(const void* self, int style); +void QsciLexerFortran77_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerFortran77_virtualbase_Font(const void* self, int style); +void QsciLexerFortran77_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_IndentationGuideView(const void* self); +void QsciLexerFortran77_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_Keywords(const void* self, int set); +void QsciLexerFortran77_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_DefaultStyle(const void* self); +void QsciLexerFortran77_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerFortran77_virtualbase_Description(const void* self, int style); +void QsciLexerFortran77_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_Paper(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerFortran77_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerFortran77_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerFortran77_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerFortran77_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerFortran77_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_RefreshProperties(void* self); +void QsciLexerFortran77_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerFortran77_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerFortran77_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerFortran77_virtualbase_WordCharacters(const void* self); +void QsciLexerFortran77_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerFortran77_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerFortran77_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerFortran77_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerFortran77_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerFortran77_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerFortran77_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerFortran77_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerFortran77_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerFortran77_Delete(QsciLexerFortran77* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp index cf331b28..b9d7eaa1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,918 @@ #include "gen_qscilexerhtml.h" #include "_cgo_export.h" -QsciLexerHTML* QsciLexerHTML_new() { - return new QsciLexerHTML(); +class MiqtVirtualQsciLexerHTML : public virtual QsciLexerHTML { +public: + + MiqtVirtualQsciLexerHTML(): QsciLexerHTML() {}; + MiqtVirtualQsciLexerHTML(QObject* parent): QsciLexerHTML(parent) {}; + + virtual ~MiqtVirtualQsciLexerHTML() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerHTML::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerHTML_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerHTML::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerHTML::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerHTML_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerHTML::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaseSensitiveTags = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaseSensitiveTags(bool sens) override { + if (handle__SetCaseSensitiveTags == 0) { + QsciLexerHTML::setCaseSensitiveTags(sens); + return; + } + + bool sigval1 = sens; + + miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags(this, handle__SetCaseSensitiveTags, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaseSensitiveTags(bool sens) { + + QsciLexerHTML::setCaseSensitiveTags(sens); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerHTML::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerHTML::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerHTML::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerHTML::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerHTML::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerHTML::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerHTML::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerHTML_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerHTML::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerHTML::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerHTML::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerHTML::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerHTML::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerHTML::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerHTML::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerHTML::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerHTML::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerHTML::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerHTML::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerHTML::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerHTML::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerHTML::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerHTML::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerHTML::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerHTML::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerHTML::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerHTML_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerHTML::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerHTML::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerHTML::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerHTML::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerHTML::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerHTML::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerHTML::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerHTML_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerHTML::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerHTML::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerHTML::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerHTML::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerHTML::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerHTML::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerHTML::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerHTML::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerHTML::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerHTML_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerHTML::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerHTML::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerHTML_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerHTML::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerHTML::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerHTML_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerHTML::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerHTML::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerHTML_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerHTML::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerHTML::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerHTML_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerHTML::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerHTML::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerHTML_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerHTML::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerHTML::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerHTML::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerHTML::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerHTML::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerHTML::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerHTML::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerHTML::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerHTML_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerHTML::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerHTML::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerHTML::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerHTML::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerHTML_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerHTML::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(); + *outptr_QsciLexerHTML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerHTML* QsciLexerHTML_new2(QObject* parent) { - return new QsciLexerHTML(parent); +void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(parent); + *outptr_QsciLexerHTML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self) { @@ -165,7 +1073,299 @@ struct miqt_string QsciLexerHTML_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerHTML_Delete(QsciLexerHTML* self) { - delete self; +void QsciLexerHTML_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerHTML_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerHTML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerHTML_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerHTML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetCaseSensitiveTags = slot; +} + +void QsciLexerHTML_virtualbase_SetCaseSensitiveTags(void* self, bool sens) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetCaseSensitiveTags(sens); +} + +void QsciLexerHTML_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Language = slot; +} + +void QsciLexerHTML_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerHTML_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerHTML_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__LexerId = slot; +} + +int QsciLexerHTML_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerHTML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerHTML_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerHTML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerHTML_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerHTML_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerHTML_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerHTML_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerHTML_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerHTML_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerHTML_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerHTML_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerHTML_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerHTML_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerHTML_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerHTML_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerHTML_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerHTML_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerHTML_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Color(style); +} + +void QsciLexerHTML_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerHTML_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerHTML_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerHTML_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Font(style); +} + +void QsciLexerHTML_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerHTML_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerHTML_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerHTML_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerHTML_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerHTML_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerHTML_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Description = slot; +} + +void QsciLexerHTML_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerHTML_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerHTML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerHTML_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerHTML_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerHTML_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerHTML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerHTML_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerHTML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerHTML_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerHTML_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerHTML_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerHTML_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerHTML_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerHTML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerHTML_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerHTML_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerHTML_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerHTML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerHTML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerHTML_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetColor = slot; +} + +void QsciLexerHTML_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerHTML_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerHTML_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerHTML_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetFont = slot; +} + +void QsciLexerHTML_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerHTML_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerHTML_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerHTML_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerHTML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerHTML_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerHTML*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerHTML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerHTML*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerHTML_Delete(QsciLexerHTML* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go index 5236acbc..daed8f6b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -130,7 +131,8 @@ const ( ) type QsciLexerHTML struct { - h *C.QsciLexerHTML + h *C.QsciLexerHTML + isSubclass bool *QsciLexer } @@ -148,27 +150,47 @@ func (this *QsciLexerHTML) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerHTML(h *C.QsciLexerHTML) *QsciLexerHTML { +// newQsciLexerHTML constructs the type using only CGO pointers. +func newQsciLexerHTML(h *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerHTML { if h == nil { return nil } - return &QsciLexerHTML{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerHTML{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerHTML(h unsafe.Pointer) *QsciLexerHTML { - return newQsciLexerHTML((*C.QsciLexerHTML)(h)) +// UnsafeNewQsciLexerHTML constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerHTML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerHTML { + if h == nil { + return nil + } + + return &QsciLexerHTML{h: (*C.QsciLexerHTML)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerHTML constructs a new QsciLexerHTML object. func NewQsciLexerHTML() *QsciLexerHTML { - ret := C.QsciLexerHTML_new() - return newQsciLexerHTML(ret) + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerHTML_new(&outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerHTML2 constructs a new QsciLexerHTML object. func NewQsciLexerHTML2(parent *qt6.QObject) *QsciLexerHTML { - ret := C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerHTML(ret) + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerHTML) MetaObject() *qt6.QMetaObject { @@ -329,9 +351,963 @@ func QsciLexerHTML_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerHTML) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerHTML_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerHTML) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerHTML_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetFoldCompact +func miqt_exec_callback_QsciLexerHTML_SetFoldCompact(self *C.QsciLexerHTML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerHTML_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerHTML) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerHTML_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerHTML_SetFoldPreprocessor(self *C.QsciLexerHTML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetCaseSensitiveTags(sens bool) { + + C.QsciLexerHTML_virtualbase_SetCaseSensitiveTags(unsafe.Pointer(this.h), (C.bool)(sens)) + +} +func (this *QsciLexerHTML) OnSetCaseSensitiveTags(slot func(super func(sens bool), sens bool)) { + C.QsciLexerHTML_override_virtual_SetCaseSensitiveTags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags +func miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags(self *C.QsciLexerHTML, cb C.intptr_t, sens C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sens bool), sens bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(sens) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetCaseSensitiveTags, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_Language() string { + + _ret := C.QsciLexerHTML_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnLanguage(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Language +func miqt_exec_callback_QsciLexerHTML_Language(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerHTML_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnLexer(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Lexer +func miqt_exec_callback_QsciLexerHTML_Lexer(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerHTML_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnLexerId(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_LexerId +func miqt_exec_callback_QsciLexerHTML_LexerId(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerHTML_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_AutoCompletionFillups +func miqt_exec_callback_QsciLexerHTML_AutoCompletionFillups(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerHTML_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerHTML) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerHTML_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerHTML_AutoCompletionWordSeparators(self *C.QsciLexerHTML, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerHTML_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerHTML_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockEnd +func miqt_exec_callback_QsciLexerHTML_BlockEnd(self *C.QsciLexerHTML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerHTML_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockLookback +func miqt_exec_callback_QsciLexerHTML_BlockLookback(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerHTML_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerHTML_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockStart +func miqt_exec_callback_QsciLexerHTML_BlockStart(self *C.QsciLexerHTML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerHTML_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerHTML_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BlockStartKeyword +func miqt_exec_callback_QsciLexerHTML_BlockStartKeyword(self *C.QsciLexerHTML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerHTML_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_BraceStyle +func miqt_exec_callback_QsciLexerHTML_BraceStyle(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerHTML_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerHTML_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_CaseSensitive +func miqt_exec_callback_QsciLexerHTML_CaseSensitive(self *C.QsciLexerHTML, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerHTML_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerHTML_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Color +func miqt_exec_callback_QsciLexerHTML_Color(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerHTML_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerHTML) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerHTML_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_EolFill +func miqt_exec_callback_QsciLexerHTML_EolFill(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerHTML_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerHTML_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Font +func miqt_exec_callback_QsciLexerHTML_Font(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerHTML_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_IndentationGuideView +func miqt_exec_callback_QsciLexerHTML_IndentationGuideView(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerHTML_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerHTML_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Keywords +func miqt_exec_callback_QsciLexerHTML_Keywords(self *C.QsciLexerHTML, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerHTML_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultStyle +func miqt_exec_callback_QsciLexerHTML_DefaultStyle(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerHTML_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerHTML) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerHTML_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Description +func miqt_exec_callback_QsciLexerHTML_Description(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerHTML) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerHTML_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerHTML_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_Paper +func miqt_exec_callback_QsciLexerHTML_Paper(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerHTML_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerHTML_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerHTML_DefaultColorWithStyle(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerHTML_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerHTML) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerHTML_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultEolFill +func miqt_exec_callback_QsciLexerHTML_DefaultEolFill(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerHTML_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerHTML_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerHTML_DefaultFontWithStyle(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerHTML_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerHTML) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerHTML_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerHTML_DefaultPaperWithStyle(self *C.QsciLexerHTML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerHTML_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerHTML) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerHTML_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetEditor +func miqt_exec_callback_QsciLexerHTML_SetEditor(self *C.QsciLexerHTML, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_RefreshProperties() { + + C.QsciLexerHTML_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerHTML) OnRefreshProperties(slot func(super func())) { + C.QsciLexerHTML_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_RefreshProperties +func miqt_exec_callback_QsciLexerHTML_RefreshProperties(self *C.QsciLexerHTML, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerHTML) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerHTML_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerHTML) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerHTML_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_StyleBitsNeeded +func miqt_exec_callback_QsciLexerHTML_StyleBitsNeeded(self *C.QsciLexerHTML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerHTML_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerHTML) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerHTML_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_WordCharacters +func miqt_exec_callback_QsciLexerHTML_WordCharacters(self *C.QsciLexerHTML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerHTML) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerHTML_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerHTML) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerHTML_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerHTML_SetAutoIndentStyle(self *C.QsciLexerHTML, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerHTML_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerHTML_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetColor +func miqt_exec_callback_QsciLexerHTML_SetColor(self *C.QsciLexerHTML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerHTML_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerHTML_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetEolFill +func miqt_exec_callback_QsciLexerHTML_SetEolFill(self *C.QsciLexerHTML, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerHTML_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerHTML_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetFont +func miqt_exec_callback_QsciLexerHTML_SetFont(self *C.QsciLexerHTML, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerHTML_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerHTML) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerHTML_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_SetPaper +func miqt_exec_callback_QsciLexerHTML_SetPaper(self *C.QsciLexerHTML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerHTML) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerHTML_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerHTML) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerHTML_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_ReadProperties +func miqt_exec_callback_QsciLexerHTML_ReadProperties(self *C.QsciLexerHTML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerHTML) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerHTML_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerHTML) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerHTML_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerHTML_WriteProperties +func miqt_exec_callback_QsciLexerHTML_WriteProperties(self *C.QsciLexerHTML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerHTML) Delete() { - C.QsciLexerHTML_Delete(this.h) + C.QsciLexerHTML_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h index b72de69f..6f6d2fd1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerHTML; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerHTML QsciLexerHTML; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerHTML* QsciLexerHTML_new(); -QsciLexerHTML* QsciLexerHTML_new2(QObject* parent); +void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self); void* QsciLexerHTML_Metacast(QsciLexerHTML* self, const char* param1); struct miqt_string QsciLexerHTML_Tr(const char* s); @@ -60,7 +66,81 @@ void QsciLexerHTML_SetFoldPreprocessor(QsciLexerHTML* self, bool fold); void QsciLexerHTML_SetCaseSensitiveTags(QsciLexerHTML* self, bool sens); struct miqt_string QsciLexerHTML_Tr2(const char* s, const char* c); struct miqt_string QsciLexerHTML_Tr3(const char* s, const char* c, int n); -void QsciLexerHTML_Delete(QsciLexerHTML* self); +void QsciLexerHTML_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerHTML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerHTML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetCaseSensitiveTags(void* self, bool sens); +void QsciLexerHTML_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_Language(const void* self); +void QsciLexerHTML_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_Lexer(const void* self); +void QsciLexerHTML_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_LexerId(const void* self); +void QsciLexerHTML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerHTML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerHTML_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerHTML_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerHTML_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_BlockLookback(const void* self); +void QsciLexerHTML_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerHTML_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerHTML_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_BraceStyle(const void* self); +void QsciLexerHTML_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_CaseSensitive(const void* self); +void QsciLexerHTML_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_Color(const void* self, int style); +void QsciLexerHTML_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_EolFill(const void* self, int style); +void QsciLexerHTML_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerHTML_virtualbase_Font(const void* self, int style); +void QsciLexerHTML_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_IndentationGuideView(const void* self); +void QsciLexerHTML_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_Keywords(const void* self, int set); +void QsciLexerHTML_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_DefaultStyle(const void* self); +void QsciLexerHTML_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerHTML_virtualbase_Description(const void* self, int style); +void QsciLexerHTML_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_Paper(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerHTML_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerHTML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerHTML_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerHTML_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerHTML_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_RefreshProperties(void* self); +void QsciLexerHTML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerHTML_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerHTML_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerHTML_virtualbase_WordCharacters(const void* self); +void QsciLexerHTML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerHTML_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerHTML_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerHTML_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerHTML_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerHTML_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerHTML_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerHTML_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerHTML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerHTML_Delete(QsciLexerHTML* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp index a43b2704..519b35d1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp @@ -8,12 +8,150 @@ #include "gen_qscilexeridl.h" #include "_cgo_export.h" -QsciLexerIDL* QsciLexerIDL_new() { - return new QsciLexerIDL(); +class MiqtVirtualQsciLexerIDL : public virtual QsciLexerIDL { +public: + + MiqtVirtualQsciLexerIDL(): QsciLexerIDL() {}; + MiqtVirtualQsciLexerIDL(QObject* parent): QsciLexerIDL(parent) {}; + + virtual ~MiqtVirtualQsciLexerIDL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerIDL::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerIDL::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerIDL::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerIDL::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerIDL::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerIDL::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerIDL::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerIDL_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerIDL::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerIDL::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerIDL_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerIDL::setStylePreprocessor(style); + + } + +}; + +void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(); + *outptr_QsciLexerIDL = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerIDL* QsciLexerIDL_new2(QObject* parent) { - return new QsciLexerIDL(parent); +void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(parent); + *outptr_QsciLexerIDL = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self) { @@ -80,7 +218,51 @@ struct miqt_string QsciLexerIDL_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerIDL_Delete(QsciLexerIDL* self) { - delete self; +void QsciLexerIDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerIDL_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerIDL_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerIDL_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerIDL_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerIDL_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerIDL*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerIDL_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerIDL*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerIDL_Delete(QsciLexerIDL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go index 75e10917..37f6d064 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerIDL struct { - h *C.QsciLexerIDL + h *C.QsciLexerIDL + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerIDL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerIDL(h *C.QsciLexerIDL) *QsciLexerIDL { +// newQsciLexerIDL constructs the type using only CGO pointers. +func newQsciLexerIDL(h *C.QsciLexerIDL, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerIDL { if h == nil { return nil } - return &QsciLexerIDL{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerIDL{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerIDL(h unsafe.Pointer) *QsciLexerIDL { - return newQsciLexerIDL((*C.QsciLexerIDL)(h)) +// UnsafeNewQsciLexerIDL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerIDL(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerIDL { + if h == nil { + return nil + } + + return &QsciLexerIDL{h: (*C.QsciLexerIDL)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerIDL constructs a new QsciLexerIDL object. func NewQsciLexerIDL() *QsciLexerIDL { - ret := C.QsciLexerIDL_new() - return newQsciLexerIDL(ret) + var outptr_QsciLexerIDL *C.QsciLexerIDL = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerIDL_new(&outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerIDL2 constructs a new QsciLexerIDL object. func NewQsciLexerIDL2(parent *qt6.QObject) *QsciLexerIDL { - ret := C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerIDL(ret) + var outptr_QsciLexerIDL *C.QsciLexerIDL = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerIDL) MetaObject() *qt6.QMetaObject { @@ -121,9 +145,124 @@ func QsciLexerIDL_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerIDL) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldAtElse +func miqt_exec_callback_QsciLexerIDL_SetFoldAtElse(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldComments +func miqt_exec_callback_QsciLexerIDL_SetFoldComments(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldCompact +func miqt_exec_callback_QsciLexerIDL_SetFoldCompact(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerIDL_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerIDL) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerIDL_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerIDL_SetFoldPreprocessor(self *C.QsciLexerIDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerIDL) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerIDL_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerIDL) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerIDL_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerIDL_SetStylePreprocessor +func miqt_exec_callback_QsciLexerIDL_SetStylePreprocessor(self *C.QsciLexerIDL, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerIDL{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerIDL) Delete() { - C.QsciLexerIDL_Delete(this.h) + C.QsciLexerIDL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h index cc33d5fb..eff22ff4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h @@ -18,16 +18,20 @@ extern "C" { class QColor; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerIDL; #else typedef struct QColor QColor; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerIDL QsciLexerIDL; #endif -QsciLexerIDL* QsciLexerIDL_new(); -QsciLexerIDL* QsciLexerIDL_new2(QObject* parent); +void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self); void* QsciLexerIDL_Metacast(QsciLexerIDL* self, const char* param1); struct miqt_string QsciLexerIDL_Tr(const char* s); @@ -37,7 +41,17 @@ const char* QsciLexerIDL_Keywords(const QsciLexerIDL* self, int set); struct miqt_string QsciLexerIDL_Description(const QsciLexerIDL* self, int style); struct miqt_string QsciLexerIDL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerIDL_Tr3(const char* s, const char* c, int n); -void QsciLexerIDL_Delete(QsciLexerIDL* self); +void QsciLexerIDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerIDL_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerIDL_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerIDL_Delete(QsciLexerIDL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp index 77a75695..9cb02bf0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp @@ -7,12 +7,150 @@ #include "gen_qscilexerjava.h" #include "_cgo_export.h" -QsciLexerJava* QsciLexerJava_new() { - return new QsciLexerJava(); +class MiqtVirtualQsciLexerJava : public virtual QsciLexerJava { +public: + + MiqtVirtualQsciLexerJava(): QsciLexerJava() {}; + MiqtVirtualQsciLexerJava(QObject* parent): QsciLexerJava(parent) {}; + + virtual ~MiqtVirtualQsciLexerJava() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerJava::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerJava::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerJava::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerJava::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerJava::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerJava::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerJava::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJava_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerJava::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerJava::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerJava_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerJava::setStylePreprocessor(style); + + } + +}; + +void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(); + *outptr_QsciLexerJava = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerJava* QsciLexerJava_new2(QObject* parent) { - return new QsciLexerJava(parent); +void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(parent); + *outptr_QsciLexerJava = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self) { @@ -64,7 +202,51 @@ struct miqt_string QsciLexerJava_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerJava_Delete(QsciLexerJava* self) { - delete self; +void QsciLexerJava_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerJava_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerJava_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerJava_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerJava_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerJava_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerJava_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerJava_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerJava_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJava*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerJava_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerJava*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerJava_Delete(QsciLexerJava* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go index fe753e4d..d324163d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerJava struct { - h *C.QsciLexerJava + h *C.QsciLexerJava + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerJava) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerJava(h *C.QsciLexerJava) *QsciLexerJava { +// newQsciLexerJava constructs the type using only CGO pointers. +func newQsciLexerJava(h *C.QsciLexerJava, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJava { if h == nil { return nil } - return &QsciLexerJava{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerJava{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerJava(h unsafe.Pointer) *QsciLexerJava { - return newQsciLexerJava((*C.QsciLexerJava)(h)) +// UnsafeNewQsciLexerJava constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerJava(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJava { + if h == nil { + return nil + } + + return &QsciLexerJava{h: (*C.QsciLexerJava)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerJava constructs a new QsciLexerJava object. func NewQsciLexerJava() *QsciLexerJava { - ret := C.QsciLexerJava_new() - return newQsciLexerJava(ret) + var outptr_QsciLexerJava *C.QsciLexerJava = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJava_new(&outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerJava2 constructs a new QsciLexerJava object. func NewQsciLexerJava2(parent *qt6.QObject) *QsciLexerJava { - ret := C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerJava(ret) + var outptr_QsciLexerJava *C.QsciLexerJava = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerJava) MetaObject() *qt6.QMetaObject { @@ -107,9 +131,124 @@ func QsciLexerJava_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerJava) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldAtElse +func miqt_exec_callback_QsciLexerJava_SetFoldAtElse(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldComments +func miqt_exec_callback_QsciLexerJava_SetFoldComments(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldCompact +func miqt_exec_callback_QsciLexerJava_SetFoldCompact(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerJava_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJava) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJava_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerJava_SetFoldPreprocessor(self *C.QsciLexerJava, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerJava) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerJava_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerJava) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerJava_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJava_SetStylePreprocessor +func miqt_exec_callback_QsciLexerJava_SetStylePreprocessor(self *C.QsciLexerJava, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerJava{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerJava) Delete() { - C.QsciLexerJava_Delete(this.h) + C.QsciLexerJava_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h index ff31788e..9ab458e2 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerJava; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJava QsciLexerJava; #endif -QsciLexerJava* QsciLexerJava_new(); -QsciLexerJava* QsciLexerJava_new2(QObject* parent); +void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self); void* QsciLexerJava_Metacast(QsciLexerJava* self, const char* param1); struct miqt_string QsciLexerJava_Tr(const char* s); @@ -33,7 +37,17 @@ const char* QsciLexerJava_Language(const QsciLexerJava* self); const char* QsciLexerJava_Keywords(const QsciLexerJava* self, int set); struct miqt_string QsciLexerJava_Tr2(const char* s, const char* c); struct miqt_string QsciLexerJava_Tr3(const char* s, const char* c, int n); -void QsciLexerJava_Delete(QsciLexerJava* self); +void QsciLexerJava_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerJava_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerJava_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerJava_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerJava_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerJava_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerJava_Delete(QsciLexerJava* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp index 0d838ae3..4c6f39a3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp @@ -9,12 +9,150 @@ #include "gen_qscilexerjavascript.h" #include "_cgo_export.h" -QsciLexerJavaScript* QsciLexerJavaScript_new() { - return new QsciLexerJavaScript(); +class MiqtVirtualQsciLexerJavaScript : public virtual QsciLexerJavaScript { +public: + + MiqtVirtualQsciLexerJavaScript(): QsciLexerJavaScript() {}; + MiqtVirtualQsciLexerJavaScript(QObject* parent): QsciLexerJavaScript(parent) {}; + + virtual ~MiqtVirtualQsciLexerJavaScript() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerJavaScript::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerJavaScript::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerJavaScript::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerJavaScript::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerJavaScript::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerJavaScript::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerJavaScript::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerJavaScript_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerJavaScript::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetStylePreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setStylePreprocessor(bool style) override { + if (handle__SetStylePreprocessor == 0) { + QsciLexerJavaScript::setStylePreprocessor(style); + return; + } + + bool sigval1 = style; + + miqt_exec_callback_QsciLexerJavaScript_SetStylePreprocessor(this, handle__SetStylePreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetStylePreprocessor(bool style) { + + QsciLexerJavaScript::setStylePreprocessor(style); + + } + +}; + +void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(); + *outptr_QsciLexerJavaScript = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent) { - return new QsciLexerJavaScript(parent); +void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(parent); + *outptr_QsciLexerJavaScript = ret; + *outptr_QsciLexerCPP = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self) { @@ -93,7 +231,51 @@ struct miqt_string QsciLexerJavaScript_Tr3(const char* s, const char* c, int n) return _ms; } -void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self) { - delete self; +void QsciLexerJavaScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerJavaScript_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerJavaScript_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerJavaScript_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerJavaScript_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerJavaScript_override_virtual_SetStylePreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJavaScript*)(self) )->handle__SetStylePreprocessor = slot; +} + +void QsciLexerJavaScript_virtualbase_SetStylePreprocessor(void* self, bool style) { + ( (MiqtVirtualQsciLexerJavaScript*)(self) )->virtualbase_SetStylePreprocessor(style); +} + +void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go index d6d1fe89..ccd495d8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerJavaScript struct { - h *C.QsciLexerJavaScript + h *C.QsciLexerJavaScript + isSubclass bool *QsciLexerCPP } @@ -33,27 +35,49 @@ func (this *QsciLexerJavaScript) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerJavaScript(h *C.QsciLexerJavaScript) *QsciLexerJavaScript { +// newQsciLexerJavaScript constructs the type using only CGO pointers. +func newQsciLexerJavaScript(h *C.QsciLexerJavaScript, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJavaScript { if h == nil { return nil } - return &QsciLexerJavaScript{h: h, QsciLexerCPP: UnsafeNewQsciLexerCPP(unsafe.Pointer(h))} + return &QsciLexerJavaScript{h: h, + QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer) *QsciLexerJavaScript { - return newQsciLexerJavaScript((*C.QsciLexerJavaScript)(h)) +// UnsafeNewQsciLexerJavaScript constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJavaScript { + if h == nil { + return nil + } + + return &QsciLexerJavaScript{h: (*C.QsciLexerJavaScript)(h), + QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} } // NewQsciLexerJavaScript constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript() *QsciLexerJavaScript { - ret := C.QsciLexerJavaScript_new() - return newQsciLexerJavaScript(ret) + var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJavaScript_new(&outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerJavaScript2 constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript2(parent *qt6.QObject) *QsciLexerJavaScript { - ret := C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerJavaScript(ret) + var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerJavaScript) MetaObject() *qt6.QMetaObject { @@ -139,9 +163,124 @@ func QsciLexerJavaScript_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldAtElse +func miqt_exec_callback_QsciLexerJavaScript_SetFoldAtElse(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldComments +func miqt_exec_callback_QsciLexerJavaScript_SetFoldComments(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldCompact +func miqt_exec_callback_QsciLexerJavaScript_SetFoldCompact(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerJavaScript_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerJavaScript) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerJavaScript_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerJavaScript_SetFoldPreprocessor(self *C.QsciLexerJavaScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerJavaScript) callVirtualBase_SetStylePreprocessor(style bool) { + + C.QsciLexerJavaScript_virtualbase_SetStylePreprocessor(unsafe.Pointer(this.h), (C.bool)(style)) + +} +func (this *QsciLexerJavaScript) OnSetStylePreprocessor(slot func(super func(style bool), style bool)) { + C.QsciLexerJavaScript_override_virtual_SetStylePreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJavaScript_SetStylePreprocessor +func miqt_exec_callback_QsciLexerJavaScript_SetStylePreprocessor(self *C.QsciLexerJavaScript, cb C.intptr_t, style C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style bool), style bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(style) + + gofunc((&QsciLexerJavaScript{h: self}).callVirtualBase_SetStylePreprocessor, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerJavaScript) Delete() { - C.QsciLexerJavaScript_Delete(this.h) + C.QsciLexerJavaScript_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h index 2a78b735..28637ca7 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h @@ -19,17 +19,21 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerCPP; class QsciLexerJavaScript; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJavaScript QsciLexerJavaScript; #endif -QsciLexerJavaScript* QsciLexerJavaScript_new(); -QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent); +void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self); void* QsciLexerJavaScript_Metacast(QsciLexerJavaScript* self, const char* param1); struct miqt_string QsciLexerJavaScript_Tr(const char* s); @@ -42,7 +46,17 @@ const char* QsciLexerJavaScript_Keywords(const QsciLexerJavaScript* self, int se struct miqt_string QsciLexerJavaScript_Description(const QsciLexerJavaScript* self, int style); struct miqt_string QsciLexerJavaScript_Tr2(const char* s, const char* c); struct miqt_string QsciLexerJavaScript_Tr3(const char* s, const char* c, int n); -void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self); +void QsciLexerJavaScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerJavaScript_override_virtual_SetStylePreprocessor(void* self, intptr_t slot); +void QsciLexerJavaScript_virtualbase_SetStylePreprocessor(void* self, bool style); +void QsciLexerJavaScript_Delete(QsciLexerJavaScript* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp index 3992ae57..80c2cadf 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerjson.h" #include "_cgo_export.h" -QsciLexerJSON* QsciLexerJSON_new() { - return new QsciLexerJSON(); +class MiqtVirtualQsciLexerJSON : public virtual QsciLexerJSON { +public: + + MiqtVirtualQsciLexerJSON(): QsciLexerJSON() {}; + MiqtVirtualQsciLexerJSON(QObject* parent): QsciLexerJSON(parent) {}; + + virtual ~MiqtVirtualQsciLexerJSON() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerJSON::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerJSON::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerJSON::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerJSON::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerJSON::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerJSON::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerJSON::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerJSON_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerJSON::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerJSON::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerJSON::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerJSON::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerJSON::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerJSON::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerJSON::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerJSON::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerJSON::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerJSON::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerJSON::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerJSON::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerJSON::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerJSON::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerJSON::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerJSON::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerJSON::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerJSON::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerJSON_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerJSON::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerJSON::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerJSON::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerJSON::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerJSON::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerJSON::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerJSON::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerJSON_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerJSON::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerJSON::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerJSON::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerJSON::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerJSON::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerJSON::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerJSON::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerJSON::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerJSON::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerJSON_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerJSON::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerJSON::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerJSON_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerJSON::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerJSON::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerJSON_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerJSON::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerJSON::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerJSON_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerJSON::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerJSON::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerJSON_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerJSON::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerJSON::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerJSON_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerJSON::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerJSON::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerJSON::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerJSON::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerJSON::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerJSON::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerJSON::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerJSON::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerJSON_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerJSON::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerJSON::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerJSON::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerJSON::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerJSON_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerJSON::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(); + *outptr_QsciLexerJSON = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerJSON* QsciLexerJSON_new2(QObject* parent) { - return new QsciLexerJSON(parent); +void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(parent); + *outptr_QsciLexerJSON = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self) { @@ -125,7 +961,275 @@ struct miqt_string QsciLexerJSON_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerJSON_Delete(QsciLexerJSON* self) { - delete self; +void QsciLexerJSON_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Language = slot; +} + +void QsciLexerJSON_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerJSON_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerJSON_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__LexerId = slot; +} + +int QsciLexerJSON_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerJSON_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerJSON_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerJSON_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerJSON_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerJSON_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerJSON_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerJSON_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerJSON_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerJSON_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerJSON_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerJSON_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerJSON_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerJSON_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerJSON_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerJSON_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerJSON_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerJSON_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerJSON_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Color(style); +} + +void QsciLexerJSON_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerJSON_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerJSON_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerJSON_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Font(style); +} + +void QsciLexerJSON_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerJSON_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerJSON_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerJSON_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerJSON_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerJSON_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerJSON_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Description = slot; +} + +void QsciLexerJSON_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerJSON_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerJSON_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerJSON_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerJSON_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerJSON_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerJSON_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerJSON_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerJSON_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerJSON_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerJSON_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerJSON_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerJSON_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerJSON_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerJSON_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerJSON_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerJSON_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerJSON_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerJSON_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerJSON_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerJSON_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetColor = slot; +} + +void QsciLexerJSON_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerJSON_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerJSON_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerJSON_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetFont = slot; +} + +void QsciLexerJSON_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerJSON_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerJSON_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerJSON_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerJSON_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerJSON_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerJSON*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerJSON_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerJSON*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerJSON_Delete(QsciLexerJSON* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go index 7815d13e..81f7dfd7 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -34,7 +35,8 @@ const ( ) type QsciLexerJSON struct { - h *C.QsciLexerJSON + h *C.QsciLexerJSON + isSubclass bool *QsciLexer } @@ -52,27 +54,47 @@ func (this *QsciLexerJSON) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerJSON(h *C.QsciLexerJSON) *QsciLexerJSON { +// newQsciLexerJSON constructs the type using only CGO pointers. +func newQsciLexerJSON(h *C.QsciLexerJSON, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJSON { if h == nil { return nil } - return &QsciLexerJSON{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerJSON{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerJSON(h unsafe.Pointer) *QsciLexerJSON { - return newQsciLexerJSON((*C.QsciLexerJSON)(h)) +// UnsafeNewQsciLexerJSON constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerJSON(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJSON { + if h == nil { + return nil + } + + return &QsciLexerJSON{h: (*C.QsciLexerJSON)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerJSON constructs a new QsciLexerJSON object. func NewQsciLexerJSON() *QsciLexerJSON { - ret := C.QsciLexerJSON_new() - return newQsciLexerJSON(ret) + var outptr_QsciLexerJSON *C.QsciLexerJSON = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJSON_new(&outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerJSON2 constructs a new QsciLexerJSON object. func NewQsciLexerJSON2(parent *qt6.QObject) *QsciLexerJSON { - ret := C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerJSON(ret) + var outptr_QsciLexerJSON *C.QsciLexerJSON = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerJSON) MetaObject() *qt6.QMetaObject { @@ -191,9 +213,894 @@ func QsciLexerJSON_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerJSON) callVirtualBase_Language() string { + + _ret := C.QsciLexerJSON_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnLanguage(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Language +func miqt_exec_callback_QsciLexerJSON_Language(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerJSON_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnLexer(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Lexer +func miqt_exec_callback_QsciLexerJSON_Lexer(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerJSON_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnLexerId(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_LexerId +func miqt_exec_callback_QsciLexerJSON_LexerId(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerJSON_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_AutoCompletionFillups +func miqt_exec_callback_QsciLexerJSON_AutoCompletionFillups(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerJSON_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerJSON) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerJSON_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerJSON_AutoCompletionWordSeparators(self *C.QsciLexerJSON, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerJSON_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerJSON_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockEnd +func miqt_exec_callback_QsciLexerJSON_BlockEnd(self *C.QsciLexerJSON, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerJSON_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockLookback +func miqt_exec_callback_QsciLexerJSON_BlockLookback(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerJSON_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerJSON_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockStart +func miqt_exec_callback_QsciLexerJSON_BlockStart(self *C.QsciLexerJSON, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerJSON_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerJSON_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BlockStartKeyword +func miqt_exec_callback_QsciLexerJSON_BlockStartKeyword(self *C.QsciLexerJSON, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerJSON_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_BraceStyle +func miqt_exec_callback_QsciLexerJSON_BraceStyle(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerJSON_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerJSON_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_CaseSensitive +func miqt_exec_callback_QsciLexerJSON_CaseSensitive(self *C.QsciLexerJSON, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerJSON_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerJSON_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Color +func miqt_exec_callback_QsciLexerJSON_Color(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerJSON_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerJSON) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerJSON_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_EolFill +func miqt_exec_callback_QsciLexerJSON_EolFill(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerJSON_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerJSON_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Font +func miqt_exec_callback_QsciLexerJSON_Font(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerJSON_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_IndentationGuideView +func miqt_exec_callback_QsciLexerJSON_IndentationGuideView(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerJSON_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerJSON_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Keywords +func miqt_exec_callback_QsciLexerJSON_Keywords(self *C.QsciLexerJSON, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerJSON_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultStyle +func miqt_exec_callback_QsciLexerJSON_DefaultStyle(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerJSON_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerJSON) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerJSON_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Description +func miqt_exec_callback_QsciLexerJSON_Description(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerJSON) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerJSON_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerJSON_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_Paper +func miqt_exec_callback_QsciLexerJSON_Paper(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerJSON_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerJSON_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerJSON_DefaultColorWithStyle(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerJSON_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerJSON) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerJSON_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultEolFill +func miqt_exec_callback_QsciLexerJSON_DefaultEolFill(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerJSON_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerJSON_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerJSON_DefaultFontWithStyle(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerJSON_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerJSON) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerJSON_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerJSON_DefaultPaperWithStyle(self *C.QsciLexerJSON, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerJSON_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerJSON) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerJSON_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetEditor +func miqt_exec_callback_QsciLexerJSON_SetEditor(self *C.QsciLexerJSON, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerJSON) callVirtualBase_RefreshProperties() { + + C.QsciLexerJSON_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerJSON) OnRefreshProperties(slot func(super func())) { + C.QsciLexerJSON_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_RefreshProperties +func miqt_exec_callback_QsciLexerJSON_RefreshProperties(self *C.QsciLexerJSON, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerJSON) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerJSON_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerJSON) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerJSON_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_StyleBitsNeeded +func miqt_exec_callback_QsciLexerJSON_StyleBitsNeeded(self *C.QsciLexerJSON, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerJSON_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerJSON) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerJSON_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_WordCharacters +func miqt_exec_callback_QsciLexerJSON_WordCharacters(self *C.QsciLexerJSON, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerJSON) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerJSON_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerJSON) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerJSON_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerJSON_SetAutoIndentStyle(self *C.QsciLexerJSON, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerJSON_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerJSON_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetColor +func miqt_exec_callback_QsciLexerJSON_SetColor(self *C.QsciLexerJSON, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerJSON_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerJSON_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetEolFill +func miqt_exec_callback_QsciLexerJSON_SetEolFill(self *C.QsciLexerJSON, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerJSON_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerJSON_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetFont +func miqt_exec_callback_QsciLexerJSON_SetFont(self *C.QsciLexerJSON, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerJSON_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerJSON) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerJSON_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_SetPaper +func miqt_exec_callback_QsciLexerJSON_SetPaper(self *C.QsciLexerJSON, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerJSON) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerJSON_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerJSON) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerJSON_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_ReadProperties +func miqt_exec_callback_QsciLexerJSON_ReadProperties(self *C.QsciLexerJSON, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerJSON) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerJSON_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerJSON) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerJSON_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerJSON_WriteProperties +func miqt_exec_callback_QsciLexerJSON_WriteProperties(self *C.QsciLexerJSON, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerJSON) Delete() { - C.QsciLexerJSON_Delete(this.h) + C.QsciLexerJSON_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h index d6967f32..29b3641e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerJSON; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerJSON QsciLexerJSON; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerJSON* QsciLexerJSON_new(); -QsciLexerJSON* QsciLexerJSON_new2(QObject* parent); +void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self); void* QsciLexerJSON_Metacast(QsciLexerJSON* self, const char* param1); struct miqt_string QsciLexerJSON_Tr(const char* s); @@ -50,7 +56,75 @@ void QsciLexerJSON_SetFoldCompact(QsciLexerJSON* self, bool fold); bool QsciLexerJSON_FoldCompact(const QsciLexerJSON* self); struct miqt_string QsciLexerJSON_Tr2(const char* s, const char* c); struct miqt_string QsciLexerJSON_Tr3(const char* s, const char* c, int n); -void QsciLexerJSON_Delete(QsciLexerJSON* self); +void QsciLexerJSON_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_Language(const void* self); +void QsciLexerJSON_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_Lexer(const void* self); +void QsciLexerJSON_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_LexerId(const void* self); +void QsciLexerJSON_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerJSON_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerJSON_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerJSON_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerJSON_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_BlockLookback(const void* self); +void QsciLexerJSON_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerJSON_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerJSON_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_BraceStyle(const void* self); +void QsciLexerJSON_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_CaseSensitive(const void* self); +void QsciLexerJSON_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_Color(const void* self, int style); +void QsciLexerJSON_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_EolFill(const void* self, int style); +void QsciLexerJSON_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerJSON_virtualbase_Font(const void* self, int style); +void QsciLexerJSON_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_IndentationGuideView(const void* self); +void QsciLexerJSON_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_Keywords(const void* self, int set); +void QsciLexerJSON_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_DefaultStyle(const void* self); +void QsciLexerJSON_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerJSON_virtualbase_Description(const void* self, int style); +void QsciLexerJSON_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_Paper(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerJSON_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerJSON_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerJSON_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerJSON_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerJSON_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_RefreshProperties(void* self); +void QsciLexerJSON_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerJSON_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerJSON_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerJSON_virtualbase_WordCharacters(const void* self); +void QsciLexerJSON_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerJSON_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerJSON_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerJSON_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerJSON_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerJSON_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerJSON_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerJSON_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerJSON_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerJSON_Delete(QsciLexerJSON* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp index 1efdb04f..44fa2616 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,870 @@ #include "gen_qscilexerlua.h" #include "_cgo_export.h" -QsciLexerLua* QsciLexerLua_new() { - return new QsciLexerLua(); +class MiqtVirtualQsciLexerLua : public virtual QsciLexerLua { +public: + + MiqtVirtualQsciLexerLua(): QsciLexerLua() {}; + MiqtVirtualQsciLexerLua(QObject* parent): QsciLexerLua(parent) {}; + + virtual ~MiqtVirtualQsciLexerLua() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerLua::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerLua_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerLua::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerLua::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerLua::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerLua::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerLua::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerLua::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerLua::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerLua::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerLua_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerLua::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerLua::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerLua::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerLua::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerLua::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerLua::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerLua::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerLua::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerLua::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerLua::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerLua::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerLua::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerLua::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerLua::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerLua::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerLua::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerLua::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerLua::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerLua_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerLua::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerLua::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerLua::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerLua::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerLua::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerLua::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerLua::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerLua_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerLua::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerLua::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerLua::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerLua::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerLua::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerLua::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerLua::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerLua::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerLua::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerLua_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerLua::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerLua::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerLua_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerLua::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerLua::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerLua_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerLua::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerLua::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerLua_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerLua::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerLua::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerLua_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerLua::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerLua::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerLua_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerLua::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerLua::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerLua::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerLua::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerLua::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerLua::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerLua::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerLua::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerLua_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerLua::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerLua::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerLua::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerLua::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerLua_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerLua::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(); + *outptr_QsciLexerLua = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerLua* QsciLexerLua_new2(QObject* parent) { - return new QsciLexerLua(parent); +void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(parent); + *outptr_QsciLexerLua = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self) { @@ -142,7 +1001,283 @@ const char* QsciLexerLua_BlockStart1(const QsciLexerLua* self, int* style) { return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerLua_Delete(QsciLexerLua* self) { - delete self; +void QsciLexerLua_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerLua_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerLua_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Language = slot; +} + +void QsciLexerLua_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerLua_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerLua_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__LexerId = slot; +} + +int QsciLexerLua_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerLua_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerLua_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerLua_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerLua_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerLua_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerLua_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerLua_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerLua_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerLua_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerLua_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerLua_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerLua_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerLua_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerLua_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerLua_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerLua_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerLua_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerLua_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Color(style); +} + +void QsciLexerLua_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerLua_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerLua_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerLua_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Font(style); +} + +void QsciLexerLua_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerLua_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerLua_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerLua_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerLua_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerLua_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerLua_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Description = slot; +} + +void QsciLexerLua_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerLua_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerLua_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerLua_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerLua_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerLua_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerLua_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerLua_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerLua_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerLua_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerLua_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerLua_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerLua_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerLua_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerLua_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerLua_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerLua_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerLua_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerLua_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerLua_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerLua_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetColor = slot; +} + +void QsciLexerLua_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerLua_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerLua_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerLua_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetFont = slot; +} + +void QsciLexerLua_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerLua_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerLua_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerLua_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerLua_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerLua*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerLua_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerLua*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerLua_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerLua*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerLua_Delete(QsciLexerLua* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go index 9735c2d8..2a72d89e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -40,7 +41,8 @@ const ( ) type QsciLexerLua struct { - h *C.QsciLexerLua + h *C.QsciLexerLua + isSubclass bool *QsciLexer } @@ -58,27 +60,47 @@ func (this *QsciLexerLua) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerLua(h *C.QsciLexerLua) *QsciLexerLua { +// newQsciLexerLua constructs the type using only CGO pointers. +func newQsciLexerLua(h *C.QsciLexerLua, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerLua { if h == nil { return nil } - return &QsciLexerLua{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerLua{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerLua(h unsafe.Pointer) *QsciLexerLua { - return newQsciLexerLua((*C.QsciLexerLua)(h)) +// UnsafeNewQsciLexerLua constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerLua(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerLua { + if h == nil { + return nil + } + + return &QsciLexerLua{h: (*C.QsciLexerLua)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerLua constructs a new QsciLexerLua object. func NewQsciLexerLua() *QsciLexerLua { - ret := C.QsciLexerLua_new() - return newQsciLexerLua(ret) + var outptr_QsciLexerLua *C.QsciLexerLua = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerLua_new(&outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerLua2 constructs a new QsciLexerLua object. func NewQsciLexerLua2(parent *qt6.QObject) *QsciLexerLua { - ret := C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerLua(ret) + var outptr_QsciLexerLua *C.QsciLexerLua = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerLua) MetaObject() *qt6.QMetaObject { @@ -208,9 +230,917 @@ func (this *QsciLexerLua) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerLua) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerLua_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerLua) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerLua_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetFoldCompact +func miqt_exec_callback_QsciLexerLua_SetFoldCompact(self *C.QsciLexerLua, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerLua) callVirtualBase_Language() string { + + _ret := C.QsciLexerLua_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnLanguage(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Language +func miqt_exec_callback_QsciLexerLua_Language(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerLua_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnLexer(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Lexer +func miqt_exec_callback_QsciLexerLua_Lexer(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerLua_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnLexerId(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_LexerId +func miqt_exec_callback_QsciLexerLua_LexerId(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerLua_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_AutoCompletionFillups +func miqt_exec_callback_QsciLexerLua_AutoCompletionFillups(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerLua_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerLua) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerLua_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerLua_AutoCompletionWordSeparators(self *C.QsciLexerLua, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerLua) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerLua_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerLua_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockEnd +func miqt_exec_callback_QsciLexerLua_BlockEnd(self *C.QsciLexerLua, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerLua_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockLookback +func miqt_exec_callback_QsciLexerLua_BlockLookback(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerLua_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerLua_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockStart +func miqt_exec_callback_QsciLexerLua_BlockStart(self *C.QsciLexerLua, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerLua_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerLua_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BlockStartKeyword +func miqt_exec_callback_QsciLexerLua_BlockStartKeyword(self *C.QsciLexerLua, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerLua_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_BraceStyle +func miqt_exec_callback_QsciLexerLua_BraceStyle(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerLua_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerLua_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_CaseSensitive +func miqt_exec_callback_QsciLexerLua_CaseSensitive(self *C.QsciLexerLua, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerLua_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerLua_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Color +func miqt_exec_callback_QsciLexerLua_Color(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerLua_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerLua) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerLua_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_EolFill +func miqt_exec_callback_QsciLexerLua_EolFill(self *C.QsciLexerLua, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerLua_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerLua_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Font +func miqt_exec_callback_QsciLexerLua_Font(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerLua_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_IndentationGuideView +func miqt_exec_callback_QsciLexerLua_IndentationGuideView(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerLua_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerLua_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Keywords +func miqt_exec_callback_QsciLexerLua_Keywords(self *C.QsciLexerLua, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerLua_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultStyle +func miqt_exec_callback_QsciLexerLua_DefaultStyle(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerLua_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerLua) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerLua_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Description +func miqt_exec_callback_QsciLexerLua_Description(self *C.QsciLexerLua, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerLua) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerLua_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerLua_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_Paper +func miqt_exec_callback_QsciLexerLua_Paper(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerLua_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerLua_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerLua_DefaultColorWithStyle(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerLua_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerLua) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerLua_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultEolFill +func miqt_exec_callback_QsciLexerLua_DefaultEolFill(self *C.QsciLexerLua, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerLua_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerLua_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerLua_DefaultFontWithStyle(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerLua_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerLua) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerLua_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerLua_DefaultPaperWithStyle(self *C.QsciLexerLua, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerLua) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerLua_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerLua) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerLua_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetEditor +func miqt_exec_callback_QsciLexerLua_SetEditor(self *C.QsciLexerLua, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerLua) callVirtualBase_RefreshProperties() { + + C.QsciLexerLua_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerLua) OnRefreshProperties(slot func(super func())) { + C.QsciLexerLua_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_RefreshProperties +func miqt_exec_callback_QsciLexerLua_RefreshProperties(self *C.QsciLexerLua, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerLua) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerLua_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerLua) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerLua_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_StyleBitsNeeded +func miqt_exec_callback_QsciLexerLua_StyleBitsNeeded(self *C.QsciLexerLua, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerLua_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerLua) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerLua_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_WordCharacters +func miqt_exec_callback_QsciLexerLua_WordCharacters(self *C.QsciLexerLua, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerLua) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerLua_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerLua) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerLua_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerLua_SetAutoIndentStyle(self *C.QsciLexerLua, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerLua) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerLua_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerLua_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetColor +func miqt_exec_callback_QsciLexerLua_SetColor(self *C.QsciLexerLua, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerLua_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerLua_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetEolFill +func miqt_exec_callback_QsciLexerLua_SetEolFill(self *C.QsciLexerLua, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerLua_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerLua_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetFont +func miqt_exec_callback_QsciLexerLua_SetFont(self *C.QsciLexerLua, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerLua_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerLua) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerLua_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_SetPaper +func miqt_exec_callback_QsciLexerLua_SetPaper(self *C.QsciLexerLua, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerLua) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerLua_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerLua) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerLua_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_ReadProperties +func miqt_exec_callback_QsciLexerLua_ReadProperties(self *C.QsciLexerLua, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerLua) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerLua_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerLua) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerLua_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerLua_WriteProperties +func miqt_exec_callback_QsciLexerLua_WriteProperties(self *C.QsciLexerLua, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerLua) Delete() { - C.QsciLexerLua_Delete(this.h) + C.QsciLexerLua_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h index 4249494a..08bf6f81 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerLua; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerLua QsciLexerLua; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerLua* QsciLexerLua_new(); -QsciLexerLua* QsciLexerLua_new2(QObject* parent); +void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self); void* QsciLexerLua_Metacast(QsciLexerLua* self, const char* param1); struct miqt_string QsciLexerLua_Tr(const char* s); @@ -50,7 +56,77 @@ void QsciLexerLua_SetFoldCompact(QsciLexerLua* self, bool fold); struct miqt_string QsciLexerLua_Tr2(const char* s, const char* c); struct miqt_string QsciLexerLua_Tr3(const char* s, const char* c, int n); const char* QsciLexerLua_BlockStart1(const QsciLexerLua* self, int* style); -void QsciLexerLua_Delete(QsciLexerLua* self); +void QsciLexerLua_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerLua_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_Language(const void* self); +void QsciLexerLua_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_Lexer(const void* self); +void QsciLexerLua_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_LexerId(const void* self); +void QsciLexerLua_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerLua_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerLua_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerLua_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerLua_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_BlockLookback(const void* self); +void QsciLexerLua_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerLua_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerLua_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_BraceStyle(const void* self); +void QsciLexerLua_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_CaseSensitive(const void* self); +void QsciLexerLua_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_Color(const void* self, int style); +void QsciLexerLua_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_EolFill(const void* self, int style); +void QsciLexerLua_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerLua_virtualbase_Font(const void* self, int style); +void QsciLexerLua_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_IndentationGuideView(const void* self); +void QsciLexerLua_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_Keywords(const void* self, int set); +void QsciLexerLua_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_DefaultStyle(const void* self); +void QsciLexerLua_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerLua_virtualbase_Description(const void* self, int style); +void QsciLexerLua_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_Paper(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerLua_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerLua_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerLua_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerLua_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerLua_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_RefreshProperties(void* self); +void QsciLexerLua_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerLua_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerLua_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerLua_virtualbase_WordCharacters(const void* self); +void QsciLexerLua_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerLua_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerLua_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerLua_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerLua_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerLua_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerLua_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerLua_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerLua_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerLua_Delete(QsciLexerLua* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp index 348bcb38..b39fac79 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexermakefile.h" #include "_cgo_export.h" -QsciLexerMakefile* QsciLexerMakefile_new() { - return new QsciLexerMakefile(); +class MiqtVirtualQsciLexerMakefile : public virtual QsciLexerMakefile { +public: + + MiqtVirtualQsciLexerMakefile(): QsciLexerMakefile() {}; + MiqtVirtualQsciLexerMakefile(QObject* parent): QsciLexerMakefile(parent) {}; + + virtual ~MiqtVirtualQsciLexerMakefile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerMakefile::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerMakefile::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerMakefile::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerMakefile::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerMakefile::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerMakefile::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerMakefile::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerMakefile_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerMakefile::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerMakefile::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerMakefile::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerMakefile::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerMakefile::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerMakefile::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerMakefile::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerMakefile::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerMakefile::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerMakefile::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerMakefile::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerMakefile::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerMakefile::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerMakefile::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerMakefile::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerMakefile::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerMakefile::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerMakefile::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerMakefile::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerMakefile::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerMakefile::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerMakefile::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerMakefile::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerMakefile::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerMakefile::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerMakefile_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerMakefile::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerMakefile::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerMakefile::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerMakefile::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerMakefile::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerMakefile::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerMakefile::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerMakefile::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerMakefile::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMakefile_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerMakefile::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerMakefile::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerMakefile_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerMakefile::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerMakefile::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerMakefile_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerMakefile::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerMakefile::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMakefile_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerMakefile::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerMakefile::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMakefile_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerMakefile::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerMakefile::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerMakefile_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerMakefile::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerMakefile::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerMakefile::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerMakefile::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerMakefile::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerMakefile::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerMakefile::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerMakefile::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMakefile_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerMakefile::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerMakefile::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMakefile::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerMakefile::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMakefile_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMakefile::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(); + *outptr_QsciLexerMakefile = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent) { - return new QsciLexerMakefile(parent); +void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(parent); + *outptr_QsciLexerMakefile = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self) { @@ -97,7 +933,275 @@ struct miqt_string QsciLexerMakefile_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerMakefile_Delete(QsciLexerMakefile* self) { - delete self; +void QsciLexerMakefile_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Language = slot; +} + +void QsciLexerMakefile_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerMakefile_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerMakefile_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__LexerId = slot; +} + +int QsciLexerMakefile_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerMakefile_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerMakefile_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerMakefile_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerMakefile_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerMakefile_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerMakefile_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerMakefile_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerMakefile_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerMakefile_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerMakefile_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerMakefile_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerMakefile_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerMakefile_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerMakefile_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerMakefile_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerMakefile_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerMakefile_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerMakefile_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Color(style); +} + +void QsciLexerMakefile_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerMakefile_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerMakefile_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerMakefile_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Font(style); +} + +void QsciLexerMakefile_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerMakefile_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerMakefile_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerMakefile_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerMakefile_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerMakefile_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerMakefile_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Description = slot; +} + +void QsciLexerMakefile_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerMakefile_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerMakefile_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerMakefile_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerMakefile_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerMakefile_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerMakefile_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerMakefile_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerMakefile_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerMakefile_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerMakefile_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerMakefile_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerMakefile_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerMakefile_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerMakefile_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerMakefile_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerMakefile_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerMakefile_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerMakefile_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerMakefile_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerMakefile_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetColor = slot; +} + +void QsciLexerMakefile_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerMakefile_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerMakefile_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerMakefile_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetFont = slot; +} + +void QsciLexerMakefile_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerMakefile_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerMakefile_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerMakefile_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerMakefile_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerMakefile_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMakefile*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerMakefile_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerMakefile*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerMakefile_Delete(QsciLexerMakefile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go index 8864248e..9e68005b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -27,7 +28,8 @@ const ( ) type QsciLexerMakefile struct { - h *C.QsciLexerMakefile + h *C.QsciLexerMakefile + isSubclass bool *QsciLexer } @@ -45,27 +47,47 @@ func (this *QsciLexerMakefile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerMakefile(h *C.QsciLexerMakefile) *QsciLexerMakefile { +// newQsciLexerMakefile constructs the type using only CGO pointers. +func newQsciLexerMakefile(h *C.QsciLexerMakefile, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMakefile { if h == nil { return nil } - return &QsciLexerMakefile{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerMakefile{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerMakefile(h unsafe.Pointer) *QsciLexerMakefile { - return newQsciLexerMakefile((*C.QsciLexerMakefile)(h)) +// UnsafeNewQsciLexerMakefile constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerMakefile(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMakefile { + if h == nil { + return nil + } + + return &QsciLexerMakefile{h: (*C.QsciLexerMakefile)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerMakefile constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile() *QsciLexerMakefile { - ret := C.QsciLexerMakefile_new() - return newQsciLexerMakefile(ret) + var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMakefile_new(&outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerMakefile2 constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile2(parent *qt6.QObject) *QsciLexerMakefile { - ret := C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerMakefile(ret) + var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerMakefile) MetaObject() *qt6.QMetaObject { @@ -156,9 +178,894 @@ func QsciLexerMakefile_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerMakefile) callVirtualBase_Language() string { + + _ret := C.QsciLexerMakefile_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnLanguage(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Language +func miqt_exec_callback_QsciLexerMakefile_Language(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerMakefile_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnLexer(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Lexer +func miqt_exec_callback_QsciLexerMakefile_Lexer(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerMakefile_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnLexerId(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_LexerId +func miqt_exec_callback_QsciLexerMakefile_LexerId(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerMakefile_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_AutoCompletionFillups +func miqt_exec_callback_QsciLexerMakefile_AutoCompletionFillups(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerMakefile_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerMakefile) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerMakefile_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerMakefile_AutoCompletionWordSeparators(self *C.QsciLexerMakefile, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerMakefile_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMakefile_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockEnd +func miqt_exec_callback_QsciLexerMakefile_BlockEnd(self *C.QsciLexerMakefile, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerMakefile_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockLookback +func miqt_exec_callback_QsciLexerMakefile_BlockLookback(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerMakefile_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMakefile_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockStart +func miqt_exec_callback_QsciLexerMakefile_BlockStart(self *C.QsciLexerMakefile, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerMakefile_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMakefile_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BlockStartKeyword +func miqt_exec_callback_QsciLexerMakefile_BlockStartKeyword(self *C.QsciLexerMakefile, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerMakefile_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_BraceStyle +func miqt_exec_callback_QsciLexerMakefile_BraceStyle(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerMakefile_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerMakefile_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_CaseSensitive +func miqt_exec_callback_QsciLexerMakefile_CaseSensitive(self *C.QsciLexerMakefile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMakefile_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Color +func miqt_exec_callback_QsciLexerMakefile_Color(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerMakefile_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMakefile) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMakefile_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_EolFill +func miqt_exec_callback_QsciLexerMakefile_EolFill(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerMakefile_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerMakefile_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Font +func miqt_exec_callback_QsciLexerMakefile_Font(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerMakefile_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_IndentationGuideView +func miqt_exec_callback_QsciLexerMakefile_IndentationGuideView(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerMakefile_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerMakefile_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Keywords +func miqt_exec_callback_QsciLexerMakefile_Keywords(self *C.QsciLexerMakefile, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerMakefile_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultStyle(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerMakefile_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerMakefile) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerMakefile_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Description +func miqt_exec_callback_QsciLexerMakefile_Description(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerMakefile) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMakefile_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_Paper +func miqt_exec_callback_QsciLexerMakefile_Paper(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMakefile_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultColorWithStyle(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerMakefile_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMakefile) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMakefile_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultEolFill +func miqt_exec_callback_QsciLexerMakefile_DefaultEolFill(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerMakefile_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerMakefile_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultFontWithStyle(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerMakefile_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMakefile) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMakefile_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerMakefile_DefaultPaperWithStyle(self *C.QsciLexerMakefile, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerMakefile_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerMakefile) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerMakefile_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetEditor +func miqt_exec_callback_QsciLexerMakefile_SetEditor(self *C.QsciLexerMakefile, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerMakefile) callVirtualBase_RefreshProperties() { + + C.QsciLexerMakefile_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerMakefile) OnRefreshProperties(slot func(super func())) { + C.QsciLexerMakefile_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_RefreshProperties +func miqt_exec_callback_QsciLexerMakefile_RefreshProperties(self *C.QsciLexerMakefile, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerMakefile) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerMakefile_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMakefile) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerMakefile_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_StyleBitsNeeded +func miqt_exec_callback_QsciLexerMakefile_StyleBitsNeeded(self *C.QsciLexerMakefile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerMakefile_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMakefile) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerMakefile_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_WordCharacters +func miqt_exec_callback_QsciLexerMakefile_WordCharacters(self *C.QsciLexerMakefile, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerMakefile_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerMakefile) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerMakefile_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerMakefile_SetAutoIndentStyle(self *C.QsciLexerMakefile, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerMakefile_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerMakefile_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetColor +func miqt_exec_callback_QsciLexerMakefile_SetColor(self *C.QsciLexerMakefile, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerMakefile_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerMakefile_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetEolFill +func miqt_exec_callback_QsciLexerMakefile_SetEolFill(self *C.QsciLexerMakefile, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerMakefile_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerMakefile_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetFont +func miqt_exec_callback_QsciLexerMakefile_SetFont(self *C.QsciLexerMakefile, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerMakefile_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMakefile) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerMakefile_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_SetPaper +func miqt_exec_callback_QsciLexerMakefile_SetPaper(self *C.QsciLexerMakefile, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerMakefile) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMakefile_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMakefile) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerMakefile_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_ReadProperties +func miqt_exec_callback_QsciLexerMakefile_ReadProperties(self *C.QsciLexerMakefile, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMakefile) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMakefile_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMakefile) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerMakefile_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMakefile_WriteProperties +func miqt_exec_callback_QsciLexerMakefile_WriteProperties(self *C.QsciLexerMakefile, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerMakefile) Delete() { - C.QsciLexerMakefile_Delete(this.h) + C.QsciLexerMakefile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h index e4acc33c..4cc54047 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerMakefile; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerMakefile QsciLexerMakefile; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerMakefile* QsciLexerMakefile_new(); -QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent); +void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self); void* QsciLexerMakefile_Metacast(QsciLexerMakefile* self, const char* param1); struct miqt_string QsciLexerMakefile_Tr(const char* s); @@ -43,7 +49,75 @@ QColor* QsciLexerMakefile_DefaultPaper(const QsciLexerMakefile* self, int style) struct miqt_string QsciLexerMakefile_Description(const QsciLexerMakefile* self, int style); struct miqt_string QsciLexerMakefile_Tr2(const char* s, const char* c); struct miqt_string QsciLexerMakefile_Tr3(const char* s, const char* c, int n); -void QsciLexerMakefile_Delete(QsciLexerMakefile* self); +void QsciLexerMakefile_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_Language(const void* self); +void QsciLexerMakefile_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_Lexer(const void* self); +void QsciLexerMakefile_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_LexerId(const void* self); +void QsciLexerMakefile_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerMakefile_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerMakefile_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerMakefile_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerMakefile_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_BlockLookback(const void* self); +void QsciLexerMakefile_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerMakefile_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerMakefile_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_BraceStyle(const void* self); +void QsciLexerMakefile_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_CaseSensitive(const void* self); +void QsciLexerMakefile_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_Color(const void* self, int style); +void QsciLexerMakefile_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_EolFill(const void* self, int style); +void QsciLexerMakefile_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerMakefile_virtualbase_Font(const void* self, int style); +void QsciLexerMakefile_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_IndentationGuideView(const void* self); +void QsciLexerMakefile_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_Keywords(const void* self, int set); +void QsciLexerMakefile_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_DefaultStyle(const void* self); +void QsciLexerMakefile_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerMakefile_virtualbase_Description(const void* self, int style); +void QsciLexerMakefile_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_Paper(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerMakefile_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerMakefile_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMakefile_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerMakefile_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerMakefile_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_RefreshProperties(void* self); +void QsciLexerMakefile_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerMakefile_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerMakefile_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerMakefile_virtualbase_WordCharacters(const void* self); +void QsciLexerMakefile_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerMakefile_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerMakefile_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerMakefile_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerMakefile_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerMakefile_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerMakefile_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMakefile_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerMakefile_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMakefile_Delete(QsciLexerMakefile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp index 24019442..4b797839 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexermarkdown.h" #include "_cgo_export.h" -QsciLexerMarkdown* QsciLexerMarkdown_new() { - return new QsciLexerMarkdown(); +class MiqtVirtualQsciLexerMarkdown : public virtual QsciLexerMarkdown { +public: + + MiqtVirtualQsciLexerMarkdown(): QsciLexerMarkdown() {}; + MiqtVirtualQsciLexerMarkdown(QObject* parent): QsciLexerMarkdown(parent) {}; + + virtual ~MiqtVirtualQsciLexerMarkdown() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerMarkdown::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerMarkdown::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerMarkdown::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerMarkdown::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerMarkdown::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerMarkdown::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerMarkdown::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerMarkdown_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerMarkdown::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerMarkdown::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerMarkdown::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerMarkdown::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerMarkdown::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerMarkdown::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerMarkdown::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerMarkdown::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerMarkdown::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerMarkdown::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerMarkdown::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerMarkdown::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerMarkdown::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerMarkdown::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerMarkdown::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerMarkdown::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerMarkdown::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerMarkdown::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerMarkdown::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerMarkdown::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerMarkdown::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerMarkdown::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerMarkdown::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerMarkdown::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerMarkdown::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerMarkdown::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerMarkdown::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerMarkdown::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerMarkdown::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerMarkdown::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerMarkdown::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerMarkdown::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerMarkdown::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerMarkdown::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerMarkdown::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerMarkdown::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerMarkdown_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerMarkdown::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerMarkdown::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerMarkdown_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerMarkdown::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerMarkdown::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMarkdown_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerMarkdown::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerMarkdown::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMarkdown_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerMarkdown::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerMarkdown::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerMarkdown_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerMarkdown::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerMarkdown::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerMarkdown::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerMarkdown::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerMarkdown::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerMarkdown::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerMarkdown::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerMarkdown::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMarkdown_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerMarkdown::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerMarkdown::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMarkdown::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerMarkdown::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMarkdown_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMarkdown::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(); + *outptr_QsciLexerMarkdown = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent) { - return new QsciLexerMarkdown(parent); +void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(parent); + *outptr_QsciLexerMarkdown = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self) { @@ -89,7 +925,275 @@ struct miqt_string QsciLexerMarkdown_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self) { - delete self; +void QsciLexerMarkdown_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Language = slot; +} + +void QsciLexerMarkdown_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerMarkdown_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerMarkdown_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__LexerId = slot; +} + +int QsciLexerMarkdown_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerMarkdown_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerMarkdown_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerMarkdown_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerMarkdown_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerMarkdown_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerMarkdown_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerMarkdown_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerMarkdown_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerMarkdown_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerMarkdown_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerMarkdown_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerMarkdown_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerMarkdown_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerMarkdown_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerMarkdown_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerMarkdown_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerMarkdown_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Color(style); +} + +void QsciLexerMarkdown_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerMarkdown_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerMarkdown_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerMarkdown_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Font(style); +} + +void QsciLexerMarkdown_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerMarkdown_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerMarkdown_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerMarkdown_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerMarkdown_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerMarkdown_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerMarkdown_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Description = slot; +} + +void QsciLexerMarkdown_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerMarkdown_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerMarkdown_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerMarkdown_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerMarkdown_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerMarkdown_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerMarkdown_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerMarkdown_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerMarkdown_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerMarkdown_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerMarkdown_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerMarkdown_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerMarkdown_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerMarkdown_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerMarkdown_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerMarkdown_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetColor = slot; +} + +void QsciLexerMarkdown_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerMarkdown_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerMarkdown_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerMarkdown_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetFont = slot; +} + +void QsciLexerMarkdown_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerMarkdown_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerMarkdown_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerMarkdown_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerMarkdown_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerMarkdown_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMarkdown*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerMarkdown_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerMarkdown*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go index 8324b0a2..41bfb4b5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -42,7 +43,8 @@ const ( ) type QsciLexerMarkdown struct { - h *C.QsciLexerMarkdown + h *C.QsciLexerMarkdown + isSubclass bool *QsciLexer } @@ -60,27 +62,47 @@ func (this *QsciLexerMarkdown) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerMarkdown(h *C.QsciLexerMarkdown) *QsciLexerMarkdown { +// newQsciLexerMarkdown constructs the type using only CGO pointers. +func newQsciLexerMarkdown(h *C.QsciLexerMarkdown, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMarkdown { if h == nil { return nil } - return &QsciLexerMarkdown{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerMarkdown{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer) *QsciLexerMarkdown { - return newQsciLexerMarkdown((*C.QsciLexerMarkdown)(h)) +// UnsafeNewQsciLexerMarkdown constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMarkdown { + if h == nil { + return nil + } + + return &QsciLexerMarkdown{h: (*C.QsciLexerMarkdown)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerMarkdown constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown() *QsciLexerMarkdown { - ret := C.QsciLexerMarkdown_new() - return newQsciLexerMarkdown(ret) + var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMarkdown_new(&outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerMarkdown2 constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown2(parent *qt6.QObject) *QsciLexerMarkdown { - ret := C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerMarkdown(ret) + var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerMarkdown) MetaObject() *qt6.QMetaObject { @@ -162,9 +184,894 @@ func QsciLexerMarkdown_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerMarkdown) callVirtualBase_Language() string { + + _ret := C.QsciLexerMarkdown_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnLanguage(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Language +func miqt_exec_callback_QsciLexerMarkdown_Language(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerMarkdown_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnLexer(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Lexer +func miqt_exec_callback_QsciLexerMarkdown_Lexer(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnLexerId(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_LexerId +func miqt_exec_callback_QsciLexerMarkdown_LexerId(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerMarkdown_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_AutoCompletionFillups +func miqt_exec_callback_QsciLexerMarkdown_AutoCompletionFillups(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerMarkdown_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerMarkdown) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerMarkdown_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerMarkdown_AutoCompletionWordSeparators(self *C.QsciLexerMarkdown, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMarkdown_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockEnd +func miqt_exec_callback_QsciLexerMarkdown_BlockEnd(self *C.QsciLexerMarkdown, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockLookback +func miqt_exec_callback_QsciLexerMarkdown_BlockLookback(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMarkdown_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockStart +func miqt_exec_callback_QsciLexerMarkdown_BlockStart(self *C.QsciLexerMarkdown, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMarkdown_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BlockStartKeyword +func miqt_exec_callback_QsciLexerMarkdown_BlockStartKeyword(self *C.QsciLexerMarkdown, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_BraceStyle +func miqt_exec_callback_QsciLexerMarkdown_BraceStyle(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerMarkdown_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerMarkdown_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_CaseSensitive +func miqt_exec_callback_QsciLexerMarkdown_CaseSensitive(self *C.QsciLexerMarkdown, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMarkdown_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Color +func miqt_exec_callback_QsciLexerMarkdown_Color(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerMarkdown_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMarkdown) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMarkdown_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_EolFill +func miqt_exec_callback_QsciLexerMarkdown_EolFill(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerMarkdown_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerMarkdown_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Font +func miqt_exec_callback_QsciLexerMarkdown_Font(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_IndentationGuideView +func miqt_exec_callback_QsciLexerMarkdown_IndentationGuideView(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerMarkdown_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerMarkdown_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Keywords +func miqt_exec_callback_QsciLexerMarkdown_Keywords(self *C.QsciLexerMarkdown, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultStyle(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerMarkdown_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerMarkdown) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerMarkdown_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Description +func miqt_exec_callback_QsciLexerMarkdown_Description(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerMarkdown) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMarkdown_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_Paper +func miqt_exec_callback_QsciLexerMarkdown_Paper(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMarkdown_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultColorWithStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerMarkdown_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMarkdown) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMarkdown_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultEolFill +func miqt_exec_callback_QsciLexerMarkdown_DefaultEolFill(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerMarkdown_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerMarkdown_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultFontWithStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerMarkdown_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMarkdown) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMarkdown_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerMarkdown_DefaultPaperWithStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerMarkdown_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerMarkdown) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerMarkdown_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetEditor +func miqt_exec_callback_QsciLexerMarkdown_SetEditor(self *C.QsciLexerMarkdown, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_RefreshProperties() { + + C.QsciLexerMarkdown_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerMarkdown) OnRefreshProperties(slot func(super func())) { + C.QsciLexerMarkdown_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_RefreshProperties +func miqt_exec_callback_QsciLexerMarkdown_RefreshProperties(self *C.QsciLexerMarkdown, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerMarkdown_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMarkdown) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerMarkdown_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_StyleBitsNeeded +func miqt_exec_callback_QsciLexerMarkdown_StyleBitsNeeded(self *C.QsciLexerMarkdown, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerMarkdown_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMarkdown) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerMarkdown_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_WordCharacters +func miqt_exec_callback_QsciLexerMarkdown_WordCharacters(self *C.QsciLexerMarkdown, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerMarkdown_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerMarkdown) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerMarkdown_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerMarkdown_SetAutoIndentStyle(self *C.QsciLexerMarkdown, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerMarkdown_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerMarkdown_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetColor +func miqt_exec_callback_QsciLexerMarkdown_SetColor(self *C.QsciLexerMarkdown, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerMarkdown_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerMarkdown_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetEolFill +func miqt_exec_callback_QsciLexerMarkdown_SetEolFill(self *C.QsciLexerMarkdown, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerMarkdown_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerMarkdown_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetFont +func miqt_exec_callback_QsciLexerMarkdown_SetFont(self *C.QsciLexerMarkdown, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerMarkdown_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMarkdown) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerMarkdown_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_SetPaper +func miqt_exec_callback_QsciLexerMarkdown_SetPaper(self *C.QsciLexerMarkdown, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMarkdown_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMarkdown) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerMarkdown_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_ReadProperties +func miqt_exec_callback_QsciLexerMarkdown_ReadProperties(self *C.QsciLexerMarkdown, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMarkdown) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMarkdown_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMarkdown) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerMarkdown_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMarkdown_WriteProperties +func miqt_exec_callback_QsciLexerMarkdown_WriteProperties(self *C.QsciLexerMarkdown, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerMarkdown) Delete() { - C.QsciLexerMarkdown_Delete(this.h) + C.QsciLexerMarkdown_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h index b3e2aedd..a554c29b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerMarkdown; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerMarkdown QsciLexerMarkdown; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerMarkdown* QsciLexerMarkdown_new(); -QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent); +void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self); void* QsciLexerMarkdown_Metacast(QsciLexerMarkdown* self, const char* param1); struct miqt_string QsciLexerMarkdown_Tr(const char* s); @@ -41,7 +47,75 @@ QColor* QsciLexerMarkdown_DefaultPaper(const QsciLexerMarkdown* self, int style) struct miqt_string QsciLexerMarkdown_Description(const QsciLexerMarkdown* self, int style); struct miqt_string QsciLexerMarkdown_Tr2(const char* s, const char* c); struct miqt_string QsciLexerMarkdown_Tr3(const char* s, const char* c, int n); -void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self); +void QsciLexerMarkdown_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_Language(const void* self); +void QsciLexerMarkdown_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_Lexer(const void* self); +void QsciLexerMarkdown_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_LexerId(const void* self); +void QsciLexerMarkdown_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerMarkdown_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerMarkdown_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerMarkdown_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerMarkdown_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_BlockLookback(const void* self); +void QsciLexerMarkdown_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerMarkdown_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerMarkdown_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_BraceStyle(const void* self); +void QsciLexerMarkdown_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_CaseSensitive(const void* self); +void QsciLexerMarkdown_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_Color(const void* self, int style); +void QsciLexerMarkdown_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_EolFill(const void* self, int style); +void QsciLexerMarkdown_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerMarkdown_virtualbase_Font(const void* self, int style); +void QsciLexerMarkdown_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_IndentationGuideView(const void* self); +void QsciLexerMarkdown_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_Keywords(const void* self, int set); +void QsciLexerMarkdown_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_DefaultStyle(const void* self); +void QsciLexerMarkdown_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerMarkdown_virtualbase_Description(const void* self, int style); +void QsciLexerMarkdown_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_Paper(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerMarkdown_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerMarkdown_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMarkdown_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerMarkdown_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerMarkdown_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_RefreshProperties(void* self); +void QsciLexerMarkdown_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerMarkdown_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerMarkdown_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerMarkdown_virtualbase_WordCharacters(const void* self); +void QsciLexerMarkdown_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerMarkdown_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerMarkdown_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerMarkdown_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerMarkdown_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerMarkdown_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerMarkdown_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMarkdown_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerMarkdown_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMarkdown_Delete(QsciLexerMarkdown* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp index 2d0a96f4..92479e25 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexermatlab.h" #include "_cgo_export.h" -QsciLexerMatlab* QsciLexerMatlab_new() { - return new QsciLexerMatlab(); +class MiqtVirtualQsciLexerMatlab : public virtual QsciLexerMatlab { +public: + + MiqtVirtualQsciLexerMatlab(): QsciLexerMatlab() {}; + MiqtVirtualQsciLexerMatlab(QObject* parent): QsciLexerMatlab(parent) {}; + + virtual ~MiqtVirtualQsciLexerMatlab() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerMatlab::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerMatlab::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerMatlab::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerMatlab::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerMatlab::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerMatlab::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerMatlab::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerMatlab_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerMatlab::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerMatlab::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerMatlab::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerMatlab::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerMatlab::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerMatlab::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerMatlab::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerMatlab::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerMatlab::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerMatlab::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerMatlab::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerMatlab::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerMatlab::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerMatlab::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerMatlab::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerMatlab::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerMatlab::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerMatlab::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerMatlab::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerMatlab::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerMatlab::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerMatlab::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerMatlab::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerMatlab::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerMatlab::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerMatlab_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerMatlab::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerMatlab::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerMatlab::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerMatlab::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerMatlab::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerMatlab::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerMatlab::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerMatlab::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerMatlab::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerMatlab_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerMatlab::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerMatlab::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerMatlab_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerMatlab::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerMatlab::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerMatlab_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerMatlab::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerMatlab::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerMatlab_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerMatlab::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerMatlab::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerMatlab_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerMatlab::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerMatlab::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerMatlab_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerMatlab::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerMatlab::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerMatlab::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerMatlab::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerMatlab::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerMatlab::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerMatlab::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerMatlab::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerMatlab_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerMatlab::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerMatlab::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMatlab::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerMatlab::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerMatlab_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerMatlab::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(); + *outptr_QsciLexerMatlab = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent) { - return new QsciLexerMatlab(parent); +void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(parent); + *outptr_QsciLexerMatlab = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self) { @@ -89,7 +925,275 @@ struct miqt_string QsciLexerMatlab_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerMatlab_Delete(QsciLexerMatlab* self) { - delete self; +void QsciLexerMatlab_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Language = slot; +} + +void QsciLexerMatlab_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerMatlab_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerMatlab_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__LexerId = slot; +} + +int QsciLexerMatlab_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerMatlab_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerMatlab_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerMatlab_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerMatlab_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerMatlab_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerMatlab_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerMatlab_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerMatlab_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerMatlab_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerMatlab_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerMatlab_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerMatlab_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerMatlab_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerMatlab_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerMatlab_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerMatlab_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerMatlab_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerMatlab_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Color(style); +} + +void QsciLexerMatlab_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerMatlab_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerMatlab_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerMatlab_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Font(style); +} + +void QsciLexerMatlab_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerMatlab_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerMatlab_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerMatlab_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerMatlab_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerMatlab_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerMatlab_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Description = slot; +} + +void QsciLexerMatlab_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerMatlab_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerMatlab_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerMatlab_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerMatlab_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerMatlab_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerMatlab_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerMatlab_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerMatlab_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerMatlab_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerMatlab_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerMatlab_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerMatlab_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerMatlab_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerMatlab_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerMatlab_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerMatlab_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerMatlab_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerMatlab_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerMatlab_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerMatlab_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetColor = slot; +} + +void QsciLexerMatlab_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerMatlab_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerMatlab_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerMatlab_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetFont = slot; +} + +void QsciLexerMatlab_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerMatlab_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerMatlab_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerMatlab_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerMatlab_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerMatlab_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerMatlab*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerMatlab_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerMatlab*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerMatlab_Delete(QsciLexerMatlab* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go index 2de2acb9..58f2f05f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QsciLexerMatlab struct { - h *C.QsciLexerMatlab + h *C.QsciLexerMatlab + isSubclass bool *QsciLexer } @@ -47,27 +49,47 @@ func (this *QsciLexerMatlab) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerMatlab(h *C.QsciLexerMatlab) *QsciLexerMatlab { +// newQsciLexerMatlab constructs the type using only CGO pointers. +func newQsciLexerMatlab(h *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMatlab { if h == nil { return nil } - return &QsciLexerMatlab{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerMatlab{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerMatlab(h unsafe.Pointer) *QsciLexerMatlab { - return newQsciLexerMatlab((*C.QsciLexerMatlab)(h)) +// UnsafeNewQsciLexerMatlab constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerMatlab(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMatlab { + if h == nil { + return nil + } + + return &QsciLexerMatlab{h: (*C.QsciLexerMatlab)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerMatlab constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab() *QsciLexerMatlab { - ret := C.QsciLexerMatlab_new() - return newQsciLexerMatlab(ret) + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMatlab_new(&outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerMatlab2 constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab2(parent *qt6.QObject) *QsciLexerMatlab { - ret := C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerMatlab(ret) + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerMatlab) MetaObject() *qt6.QMetaObject { @@ -147,9 +169,894 @@ func QsciLexerMatlab_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerMatlab) callVirtualBase_Language() string { + + _ret := C.QsciLexerMatlab_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnLanguage(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Language +func miqt_exec_callback_QsciLexerMatlab_Language(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerMatlab_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnLexer(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Lexer +func miqt_exec_callback_QsciLexerMatlab_Lexer(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerMatlab_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnLexerId(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_LexerId +func miqt_exec_callback_QsciLexerMatlab_LexerId(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerMatlab_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_AutoCompletionFillups +func miqt_exec_callback_QsciLexerMatlab_AutoCompletionFillups(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerMatlab_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerMatlab) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerMatlab_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerMatlab_AutoCompletionWordSeparators(self *C.QsciLexerMatlab, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerMatlab_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMatlab_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockEnd +func miqt_exec_callback_QsciLexerMatlab_BlockEnd(self *C.QsciLexerMatlab, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerMatlab_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockLookback +func miqt_exec_callback_QsciLexerMatlab_BlockLookback(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerMatlab_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMatlab_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockStart +func miqt_exec_callback_QsciLexerMatlab_BlockStart(self *C.QsciLexerMatlab, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerMatlab_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerMatlab_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BlockStartKeyword +func miqt_exec_callback_QsciLexerMatlab_BlockStartKeyword(self *C.QsciLexerMatlab, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerMatlab_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_BraceStyle +func miqt_exec_callback_QsciLexerMatlab_BraceStyle(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerMatlab_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerMatlab_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_CaseSensitive +func miqt_exec_callback_QsciLexerMatlab_CaseSensitive(self *C.QsciLexerMatlab, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMatlab_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Color +func miqt_exec_callback_QsciLexerMatlab_Color(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerMatlab_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMatlab) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMatlab_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_EolFill +func miqt_exec_callback_QsciLexerMatlab_EolFill(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerMatlab_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerMatlab_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Font +func miqt_exec_callback_QsciLexerMatlab_Font(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerMatlab_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_IndentationGuideView +func miqt_exec_callback_QsciLexerMatlab_IndentationGuideView(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerMatlab_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerMatlab_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Keywords +func miqt_exec_callback_QsciLexerMatlab_Keywords(self *C.QsciLexerMatlab, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerMatlab_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultStyle(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerMatlab_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerMatlab) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerMatlab_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Description +func miqt_exec_callback_QsciLexerMatlab_Description(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerMatlab) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMatlab_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_Paper +func miqt_exec_callback_QsciLexerMatlab_Paper(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMatlab_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultColorWithStyle(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerMatlab_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerMatlab) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerMatlab_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultEolFill +func miqt_exec_callback_QsciLexerMatlab_DefaultEolFill(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerMatlab_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerMatlab_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultFontWithStyle(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerMatlab_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerMatlab) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerMatlab_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerMatlab_DefaultPaperWithStyle(self *C.QsciLexerMatlab, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerMatlab_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerMatlab) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerMatlab_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetEditor +func miqt_exec_callback_QsciLexerMatlab_SetEditor(self *C.QsciLexerMatlab, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerMatlab) callVirtualBase_RefreshProperties() { + + C.QsciLexerMatlab_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerMatlab) OnRefreshProperties(slot func(super func())) { + C.QsciLexerMatlab_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_RefreshProperties +func miqt_exec_callback_QsciLexerMatlab_RefreshProperties(self *C.QsciLexerMatlab, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerMatlab) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerMatlab_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerMatlab) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerMatlab_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_StyleBitsNeeded +func miqt_exec_callback_QsciLexerMatlab_StyleBitsNeeded(self *C.QsciLexerMatlab, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerMatlab_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerMatlab) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerMatlab_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_WordCharacters +func miqt_exec_callback_QsciLexerMatlab_WordCharacters(self *C.QsciLexerMatlab, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerMatlab_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerMatlab) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerMatlab_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerMatlab_SetAutoIndentStyle(self *C.QsciLexerMatlab, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerMatlab_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerMatlab_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetColor +func miqt_exec_callback_QsciLexerMatlab_SetColor(self *C.QsciLexerMatlab, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerMatlab_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerMatlab_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetEolFill +func miqt_exec_callback_QsciLexerMatlab_SetEolFill(self *C.QsciLexerMatlab, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerMatlab_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerMatlab_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetFont +func miqt_exec_callback_QsciLexerMatlab_SetFont(self *C.QsciLexerMatlab, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerMatlab_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerMatlab) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerMatlab_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_SetPaper +func miqt_exec_callback_QsciLexerMatlab_SetPaper(self *C.QsciLexerMatlab, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerMatlab) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMatlab_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMatlab) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerMatlab_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_ReadProperties +func miqt_exec_callback_QsciLexerMatlab_ReadProperties(self *C.QsciLexerMatlab, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerMatlab) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerMatlab_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerMatlab) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerMatlab_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerMatlab_WriteProperties +func miqt_exec_callback_QsciLexerMatlab_WriteProperties(self *C.QsciLexerMatlab, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerMatlab) Delete() { - C.QsciLexerMatlab_Delete(this.h) + C.QsciLexerMatlab_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h index 402d1fd0..88d74903 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerMatlab; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerMatlab QsciLexerMatlab; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerMatlab* QsciLexerMatlab_new(); -QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent); +void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self); void* QsciLexerMatlab_Metacast(QsciLexerMatlab* self, const char* param1); struct miqt_string QsciLexerMatlab_Tr(const char* s); @@ -41,7 +47,75 @@ const char* QsciLexerMatlab_Keywords(const QsciLexerMatlab* self, int set); struct miqt_string QsciLexerMatlab_Description(const QsciLexerMatlab* self, int style); struct miqt_string QsciLexerMatlab_Tr2(const char* s, const char* c); struct miqt_string QsciLexerMatlab_Tr3(const char* s, const char* c, int n); -void QsciLexerMatlab_Delete(QsciLexerMatlab* self); +void QsciLexerMatlab_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_Language(const void* self); +void QsciLexerMatlab_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_Lexer(const void* self); +void QsciLexerMatlab_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_LexerId(const void* self); +void QsciLexerMatlab_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerMatlab_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerMatlab_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerMatlab_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerMatlab_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_BlockLookback(const void* self); +void QsciLexerMatlab_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerMatlab_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerMatlab_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_BraceStyle(const void* self); +void QsciLexerMatlab_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_CaseSensitive(const void* self); +void QsciLexerMatlab_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_Color(const void* self, int style); +void QsciLexerMatlab_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_EolFill(const void* self, int style); +void QsciLexerMatlab_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerMatlab_virtualbase_Font(const void* self, int style); +void QsciLexerMatlab_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_IndentationGuideView(const void* self); +void QsciLexerMatlab_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_Keywords(const void* self, int set); +void QsciLexerMatlab_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_DefaultStyle(const void* self); +void QsciLexerMatlab_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerMatlab_virtualbase_Description(const void* self, int style); +void QsciLexerMatlab_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_Paper(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerMatlab_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerMatlab_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerMatlab_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerMatlab_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerMatlab_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_RefreshProperties(void* self); +void QsciLexerMatlab_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerMatlab_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerMatlab_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerMatlab_virtualbase_WordCharacters(const void* self); +void QsciLexerMatlab_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerMatlab_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerMatlab_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerMatlab_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerMatlab_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerMatlab_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerMatlab_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMatlab_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerMatlab_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerMatlab_Delete(QsciLexerMatlab* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp index 79a2190e..eeb9fc02 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp @@ -7,12 +7,20 @@ #include "gen_qscilexeroctave.h" #include "_cgo_export.h" -QsciLexerOctave* QsciLexerOctave_new() { - return new QsciLexerOctave(); +void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + QsciLexerOctave* ret = new QsciLexerOctave(); + *outptr_QsciLexerOctave = ret; + *outptr_QsciLexerMatlab = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerOctave* QsciLexerOctave_new2(QObject* parent) { - return new QsciLexerOctave(parent); +void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + QsciLexerOctave* ret = new QsciLexerOctave(parent); + *outptr_QsciLexerOctave = ret; + *outptr_QsciLexerMatlab = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self) { @@ -68,7 +76,11 @@ struct miqt_string QsciLexerOctave_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerOctave_Delete(QsciLexerOctave* self) { - delete self; +void QsciLexerOctave_Delete(QsciLexerOctave* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go index 4803f74d..8bbfc751 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go @@ -15,7 +15,8 @@ import ( ) type QsciLexerOctave struct { - h *C.QsciLexerOctave + h *C.QsciLexerOctave + isSubclass bool *QsciLexerMatlab } @@ -33,27 +34,49 @@ func (this *QsciLexerOctave) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerOctave(h *C.QsciLexerOctave) *QsciLexerOctave { +// newQsciLexerOctave constructs the type using only CGO pointers. +func newQsciLexerOctave(h *C.QsciLexerOctave, h_QsciLexerMatlab *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerOctave { if h == nil { return nil } - return &QsciLexerOctave{h: h, QsciLexerMatlab: UnsafeNewQsciLexerMatlab(unsafe.Pointer(h))} + return &QsciLexerOctave{h: h, + QsciLexerMatlab: newQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerOctave(h unsafe.Pointer) *QsciLexerOctave { - return newQsciLexerOctave((*C.QsciLexerOctave)(h)) +// UnsafeNewQsciLexerOctave constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerOctave(h unsafe.Pointer, h_QsciLexerMatlab unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerOctave { + if h == nil { + return nil + } + + return &QsciLexerOctave{h: (*C.QsciLexerOctave)(h), + QsciLexerMatlab: UnsafeNewQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} } // NewQsciLexerOctave constructs a new QsciLexerOctave object. func NewQsciLexerOctave() *QsciLexerOctave { - ret := C.QsciLexerOctave_new() - return newQsciLexerOctave(ret) + var outptr_QsciLexerOctave *C.QsciLexerOctave = nil + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerOctave_new(&outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerOctave2 constructs a new QsciLexerOctave object. func NewQsciLexerOctave2(parent *qt6.QObject) *QsciLexerOctave { - ret := C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerOctave(ret) + var outptr_QsciLexerOctave *C.QsciLexerOctave = nil + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerOctave) MetaObject() *qt6.QMetaObject { @@ -114,7 +137,7 @@ func QsciLexerOctave_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QsciLexerOctave) Delete() { - C.QsciLexerOctave_Delete(this.h) + C.QsciLexerOctave_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h index 9136a045..f09975e8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerMatlab; class QsciLexerOctave; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerMatlab QsciLexerMatlab; typedef struct QsciLexerOctave QsciLexerOctave; #endif -QsciLexerOctave* QsciLexerOctave_new(); -QsciLexerOctave* QsciLexerOctave_new2(QObject* parent); +void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self); void* QsciLexerOctave_Metacast(QsciLexerOctave* self, const char* param1); struct miqt_string QsciLexerOctave_Tr(const char* s); @@ -34,7 +38,7 @@ const char* QsciLexerOctave_Lexer(const QsciLexerOctave* self); const char* QsciLexerOctave_Keywords(const QsciLexerOctave* self, int set); struct miqt_string QsciLexerOctave_Tr2(const char* s, const char* c); struct miqt_string QsciLexerOctave_Tr3(const char* s, const char* c, int n); -void QsciLexerOctave_Delete(QsciLexerOctave* self); +void QsciLexerOctave_Delete(QsciLexerOctave* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp index 5f5c6424..de0cc922 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,918 @@ #include "gen_qscilexerpascal.h" #include "_cgo_export.h" -QsciLexerPascal* QsciLexerPascal_new() { - return new QsciLexerPascal(); +class MiqtVirtualQsciLexerPascal : public virtual QsciLexerPascal { +public: + + MiqtVirtualQsciLexerPascal(): QsciLexerPascal() {}; + MiqtVirtualQsciLexerPascal(QObject* parent): QsciLexerPascal(parent) {}; + + virtual ~MiqtVirtualQsciLexerPascal() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPascal::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPascal_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPascal::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPascal::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPascal_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPascal::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerPascal::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerPascal::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPascal::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPascal::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPascal::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPascal::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPascal::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPascal::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPascal::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPascal_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPascal::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPascal::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPascal::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPascal::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPascal::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPascal::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPascal::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPascal::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPascal::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPascal::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPascal::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPascal::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPascal::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPascal::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPascal::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPascal::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPascal::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPascal::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPascal_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPascal::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPascal::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPascal::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPascal::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPascal::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPascal::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPascal::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPascal_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPascal::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPascal::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPascal::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPascal::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPascal::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPascal::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPascal::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPascal::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPascal::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPascal_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPascal::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPascal::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPascal_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPascal::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPascal::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPascal_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPascal::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPascal::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPascal_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPascal::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPascal::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPascal_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPascal::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPascal::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPascal_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPascal::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPascal::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPascal::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPascal::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPascal::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPascal::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPascal::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPascal::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPascal_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPascal::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPascal::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPascal::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPascal::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPascal_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPascal::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(); + *outptr_QsciLexerPascal = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPascal* QsciLexerPascal_new2(QObject* parent) { - return new QsciLexerPascal(parent); +void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(parent); + *outptr_QsciLexerPascal = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self) { @@ -182,7 +1089,299 @@ const char* QsciLexerPascal_BlockStartKeyword1(const QsciLexerPascal* self, int* return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerPascal_Delete(QsciLexerPascal* self) { - delete self; +void QsciLexerPascal_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPascal_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPascal_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPascal_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPascal_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerPascal_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerPascal_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Language = slot; +} + +void QsciLexerPascal_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPascal_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPascal_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPascal_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPascal_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPascal_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPascal_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPascal_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPascal_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPascal_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPascal_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPascal_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPascal_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPascal_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPascal_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPascal_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPascal_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPascal_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPascal_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPascal_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPascal_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPascal_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPascal_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPascal_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPascal_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPascal_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPascal_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPascal_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPascal_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPascal_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPascal_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPascal_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPascal_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Description = slot; +} + +void QsciLexerPascal_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPascal_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPascal_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPascal_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPascal_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPascal_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPascal_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPascal_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPascal_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPascal_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPascal_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPascal_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPascal_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPascal_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPascal_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPascal_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPascal_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPascal_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPascal_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPascal_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPascal_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPascal_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPascal_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPascal_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPascal_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPascal_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPascal_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPascal_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPascal_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPascal_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPascal_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPascal*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPascal_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPascal*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPascal_Delete(QsciLexerPascal* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go index 753c7de3..70aef7c4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerPascal struct { - h *C.QsciLexerPascal + h *C.QsciLexerPascal + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerPascal) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPascal(h *C.QsciLexerPascal) *QsciLexerPascal { +// newQsciLexerPascal constructs the type using only CGO pointers. +func newQsciLexerPascal(h *C.QsciLexerPascal, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPascal { if h == nil { return nil } - return &QsciLexerPascal{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPascal{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPascal(h unsafe.Pointer) *QsciLexerPascal { - return newQsciLexerPascal((*C.QsciLexerPascal)(h)) +// UnsafeNewQsciLexerPascal constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPascal(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPascal { + if h == nil { + return nil + } + + return &QsciLexerPascal{h: (*C.QsciLexerPascal)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPascal constructs a new QsciLexerPascal object. func NewQsciLexerPascal() *QsciLexerPascal { - ret := C.QsciLexerPascal_new() - return newQsciLexerPascal(ret) + var outptr_QsciLexerPascal *C.QsciLexerPascal = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPascal_new(&outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPascal2 constructs a new QsciLexerPascal object. func NewQsciLexerPascal2(parent *qt6.QObject) *QsciLexerPascal { - ret := C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPascal(ret) + var outptr_QsciLexerPascal *C.QsciLexerPascal = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPascal) MetaObject() *qt6.QMetaObject { @@ -247,9 +269,963 @@ func (this *QsciLexerPascal) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerPascal) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPascal_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPascal) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPascal_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFoldComments +func miqt_exec_callback_QsciLexerPascal_SetFoldComments(self *C.QsciLexerPascal, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPascal_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPascal) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPascal_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFoldCompact +func miqt_exec_callback_QsciLexerPascal_SetFoldCompact(self *C.QsciLexerPascal, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerPascal_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPascal) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPascal_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor(self *C.QsciLexerPascal, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_Language() string { + + _ret := C.QsciLexerPascal_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Language +func miqt_exec_callback_QsciLexerPascal_Language(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPascal_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnLexer(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Lexer +func miqt_exec_callback_QsciLexerPascal_Lexer(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPascal_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_LexerId +func miqt_exec_callback_QsciLexerPascal_LexerId(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPascal_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPascal_AutoCompletionFillups(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPascal_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPascal) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPascal_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPascal_AutoCompletionWordSeparators(self *C.QsciLexerPascal, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPascal_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPascal_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockEnd +func miqt_exec_callback_QsciLexerPascal_BlockEnd(self *C.QsciLexerPascal, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPascal_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockLookback +func miqt_exec_callback_QsciLexerPascal_BlockLookback(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPascal_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPascal_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockStart +func miqt_exec_callback_QsciLexerPascal_BlockStart(self *C.QsciLexerPascal, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPascal_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPascal_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BlockStartKeyword +func miqt_exec_callback_QsciLexerPascal_BlockStartKeyword(self *C.QsciLexerPascal, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPascal_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_BraceStyle +func miqt_exec_callback_QsciLexerPascal_BraceStyle(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPascal_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPascal_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_CaseSensitive +func miqt_exec_callback_QsciLexerPascal_CaseSensitive(self *C.QsciLexerPascal, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerPascal_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPascal_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Color +func miqt_exec_callback_QsciLexerPascal_Color(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPascal_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPascal) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPascal_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_EolFill +func miqt_exec_callback_QsciLexerPascal_EolFill(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerPascal_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPascal_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Font +func miqt_exec_callback_QsciLexerPascal_Font(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPascal_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_IndentationGuideView +func miqt_exec_callback_QsciLexerPascal_IndentationGuideView(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPascal_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPascal_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Keywords +func miqt_exec_callback_QsciLexerPascal_Keywords(self *C.QsciLexerPascal, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPascal_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultStyle +func miqt_exec_callback_QsciLexerPascal_DefaultStyle(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPascal_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPascal) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPascal_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Description +func miqt_exec_callback_QsciLexerPascal_Description(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPascal) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerPascal_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPascal_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_Paper +func miqt_exec_callback_QsciLexerPascal_Paper(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPascal_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPascal_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPascal_DefaultColorWithStyle(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPascal_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPascal) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPascal_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultEolFill +func miqt_exec_callback_QsciLexerPascal_DefaultEolFill(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerPascal_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPascal_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPascal_DefaultFontWithStyle(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPascal_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPascal) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPascal_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPascal_DefaultPaperWithStyle(self *C.QsciLexerPascal, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPascal_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPascal) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPascal_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetEditor +func miqt_exec_callback_QsciLexerPascal_SetEditor(self *C.QsciLexerPascal, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_RefreshProperties() { + + C.QsciLexerPascal_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPascal) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPascal_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_RefreshProperties +func miqt_exec_callback_QsciLexerPascal_RefreshProperties(self *C.QsciLexerPascal, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPascal) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPascal_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPascal) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPascal_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPascal_StyleBitsNeeded(self *C.QsciLexerPascal, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPascal_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPascal) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPascal_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_WordCharacters +func miqt_exec_callback_QsciLexerPascal_WordCharacters(self *C.QsciLexerPascal, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPascal) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPascal_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPascal) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPascal_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPascal_SetAutoIndentStyle(self *C.QsciLexerPascal, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerPascal_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPascal_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetColor +func miqt_exec_callback_QsciLexerPascal_SetColor(self *C.QsciLexerPascal, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPascal_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPascal_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetEolFill +func miqt_exec_callback_QsciLexerPascal_SetEolFill(self *C.QsciLexerPascal, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerPascal_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerPascal_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetFont +func miqt_exec_callback_QsciLexerPascal_SetFont(self *C.QsciLexerPascal, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerPascal_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPascal) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPascal_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_SetPaper +func miqt_exec_callback_QsciLexerPascal_SetPaper(self *C.QsciLexerPascal, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPascal) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPascal_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPascal) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPascal_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_ReadProperties +func miqt_exec_callback_QsciLexerPascal_ReadProperties(self *C.QsciLexerPascal, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPascal) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPascal_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPascal) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPascal_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPascal_WriteProperties +func miqt_exec_callback_QsciLexerPascal_WriteProperties(self *C.QsciLexerPascal, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPascal) Delete() { - C.QsciLexerPascal_Delete(this.h) + C.QsciLexerPascal_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h index 650bbd7c..8a3137c0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPascal; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPascal QsciLexerPascal; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPascal* QsciLexerPascal_new(); -QsciLexerPascal* QsciLexerPascal_new2(QObject* parent); +void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self); void* QsciLexerPascal_Metacast(QsciLexerPascal* self, const char* param1); struct miqt_string QsciLexerPascal_Tr(const char* s); @@ -60,7 +66,81 @@ struct miqt_string QsciLexerPascal_Tr3(const char* s, const char* c, int n); const char* QsciLexerPascal_BlockEnd1(const QsciLexerPascal* self, int* style); const char* QsciLexerPascal_BlockStart1(const QsciLexerPascal* self, int* style); const char* QsciLexerPascal_BlockStartKeyword1(const QsciLexerPascal* self, int* style); -void QsciLexerPascal_Delete(QsciLexerPascal* self); +void QsciLexerPascal_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPascal_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPascal_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerPascal_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_Language(const void* self); +void QsciLexerPascal_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_Lexer(const void* self); +void QsciLexerPascal_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_LexerId(const void* self); +void QsciLexerPascal_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPascal_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPascal_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPascal_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPascal_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_BlockLookback(const void* self); +void QsciLexerPascal_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPascal_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPascal_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_BraceStyle(const void* self); +void QsciLexerPascal_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_CaseSensitive(const void* self); +void QsciLexerPascal_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_Color(const void* self, int style); +void QsciLexerPascal_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_EolFill(const void* self, int style); +void QsciLexerPascal_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPascal_virtualbase_Font(const void* self, int style); +void QsciLexerPascal_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPascal_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_Keywords(const void* self, int set); +void QsciLexerPascal_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_DefaultStyle(const void* self); +void QsciLexerPascal_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPascal_virtualbase_Description(const void* self, int style); +void QsciLexerPascal_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_Paper(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPascal_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPascal_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPascal_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPascal_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPascal_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_RefreshProperties(void* self); +void QsciLexerPascal_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPascal_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPascal_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPascal_virtualbase_WordCharacters(const void* self); +void QsciLexerPascal_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPascal_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPascal_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPascal_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPascal_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPascal_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPascal_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPascal_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPascal_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPascal_Delete(QsciLexerPascal* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp index 74bdbd1a..a0ea58e8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,894 @@ #include "gen_qscilexerperl.h" #include "_cgo_export.h" -QsciLexerPerl* QsciLexerPerl_new() { - return new QsciLexerPerl(); +class MiqtVirtualQsciLexerPerl : public virtual QsciLexerPerl { +public: + + MiqtVirtualQsciLexerPerl(): QsciLexerPerl() {}; + MiqtVirtualQsciLexerPerl(QObject* parent): QsciLexerPerl(parent) {}; + + virtual ~MiqtVirtualQsciLexerPerl() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPerl::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPerl_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPerl::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPerl::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPerl_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPerl::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPerl::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPerl::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPerl::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPerl::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPerl::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPerl::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPerl::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPerl_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPerl::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPerl::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPerl::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPerl::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPerl::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPerl::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPerl::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPerl::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPerl::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPerl::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPerl::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPerl::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPerl::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPerl::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPerl::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPerl::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPerl::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPerl::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPerl_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPerl::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPerl::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPerl::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPerl::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPerl::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPerl::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPerl::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPerl_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPerl::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPerl::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPerl::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPerl::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPerl::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPerl::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPerl::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPerl::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPerl::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPerl_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPerl::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPerl::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPerl_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPerl::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPerl::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPerl_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPerl::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPerl::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPerl_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPerl::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPerl::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPerl_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPerl::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPerl::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPerl_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPerl::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPerl::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPerl::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPerl::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPerl::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPerl::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPerl::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPerl::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPerl_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPerl::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPerl::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPerl::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPerl::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPerl_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPerl::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(); + *outptr_QsciLexerPerl = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPerl* QsciLexerPerl_new2(QObject* parent) { - return new QsciLexerPerl(parent); +void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(parent); + *outptr_QsciLexerPerl = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self) { @@ -186,7 +1069,291 @@ const char* QsciLexerPerl_BlockStart1(const QsciLexerPerl* self, int* style) { return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerPerl_Delete(QsciLexerPerl* self) { - delete self; +void QsciLexerPerl_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPerl_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPerl_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPerl_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPerl_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Language = slot; +} + +void QsciLexerPerl_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPerl_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPerl_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPerl_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPerl_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPerl_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPerl_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPerl_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPerl_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPerl_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPerl_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPerl_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPerl_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPerl_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPerl_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPerl_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPerl_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPerl_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPerl_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPerl_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPerl_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPerl_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPerl_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPerl_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPerl_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPerl_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPerl_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPerl_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPerl_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPerl_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPerl_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPerl_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPerl_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Description = slot; +} + +void QsciLexerPerl_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPerl_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPerl_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPerl_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPerl_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPerl_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPerl_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPerl_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPerl_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPerl_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPerl_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPerl_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPerl_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPerl_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPerl_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPerl_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPerl_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPerl_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPerl_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPerl_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPerl_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPerl_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPerl_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPerl_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPerl_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPerl_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPerl_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPerl_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPerl_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPerl_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPerl_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPerl*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPerl_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPerl*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPerl_Delete(QsciLexerPerl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go index 2c81fb34..68faaf30 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -61,7 +62,8 @@ const ( ) type QsciLexerPerl struct { - h *C.QsciLexerPerl + h *C.QsciLexerPerl + isSubclass bool *QsciLexer } @@ -79,27 +81,47 @@ func (this *QsciLexerPerl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPerl(h *C.QsciLexerPerl) *QsciLexerPerl { +// newQsciLexerPerl constructs the type using only CGO pointers. +func newQsciLexerPerl(h *C.QsciLexerPerl, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPerl { if h == nil { return nil } - return &QsciLexerPerl{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPerl{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPerl(h unsafe.Pointer) *QsciLexerPerl { - return newQsciLexerPerl((*C.QsciLexerPerl)(h)) +// UnsafeNewQsciLexerPerl constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPerl(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPerl { + if h == nil { + return nil + } + + return &QsciLexerPerl{h: (*C.QsciLexerPerl)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPerl constructs a new QsciLexerPerl object. func NewQsciLexerPerl() *QsciLexerPerl { - ret := C.QsciLexerPerl_new() - return newQsciLexerPerl(ret) + var outptr_QsciLexerPerl *C.QsciLexerPerl = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPerl_new(&outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPerl2 constructs a new QsciLexerPerl object. func NewQsciLexerPerl2(parent *qt6.QObject) *QsciLexerPerl { - ret := C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPerl(ret) + var outptr_QsciLexerPerl *C.QsciLexerPerl = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPerl) MetaObject() *qt6.QMetaObject { @@ -276,9 +298,940 @@ func (this *QsciLexerPerl) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerPerl) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPerl_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPerl) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPerl_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetFoldComments +func miqt_exec_callback_QsciLexerPerl_SetFoldComments(self *C.QsciLexerPerl, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPerl_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPerl) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPerl_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetFoldCompact +func miqt_exec_callback_QsciLexerPerl_SetFoldCompact(self *C.QsciLexerPerl, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_Language() string { + + _ret := C.QsciLexerPerl_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Language +func miqt_exec_callback_QsciLexerPerl_Language(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPerl_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnLexer(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Lexer +func miqt_exec_callback_QsciLexerPerl_Lexer(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPerl_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_LexerId +func miqt_exec_callback_QsciLexerPerl_LexerId(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPerl_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPerl_AutoCompletionFillups(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPerl_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPerl) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPerl_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPerl_AutoCompletionWordSeparators(self *C.QsciLexerPerl, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPerl_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPerl_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockEnd +func miqt_exec_callback_QsciLexerPerl_BlockEnd(self *C.QsciLexerPerl, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPerl_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockLookback +func miqt_exec_callback_QsciLexerPerl_BlockLookback(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPerl_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPerl_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockStart +func miqt_exec_callback_QsciLexerPerl_BlockStart(self *C.QsciLexerPerl, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPerl_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPerl_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BlockStartKeyword +func miqt_exec_callback_QsciLexerPerl_BlockStartKeyword(self *C.QsciLexerPerl, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPerl_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_BraceStyle +func miqt_exec_callback_QsciLexerPerl_BraceStyle(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPerl_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPerl_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_CaseSensitive +func miqt_exec_callback_QsciLexerPerl_CaseSensitive(self *C.QsciLexerPerl, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerPerl_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPerl_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Color +func miqt_exec_callback_QsciLexerPerl_Color(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPerl_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPerl) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPerl_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_EolFill +func miqt_exec_callback_QsciLexerPerl_EolFill(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerPerl_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPerl_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Font +func miqt_exec_callback_QsciLexerPerl_Font(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPerl_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_IndentationGuideView +func miqt_exec_callback_QsciLexerPerl_IndentationGuideView(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPerl_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPerl_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Keywords +func miqt_exec_callback_QsciLexerPerl_Keywords(self *C.QsciLexerPerl, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPerl_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultStyle +func miqt_exec_callback_QsciLexerPerl_DefaultStyle(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPerl_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPerl) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPerl_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Description +func miqt_exec_callback_QsciLexerPerl_Description(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPerl) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerPerl_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPerl_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_Paper +func miqt_exec_callback_QsciLexerPerl_Paper(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPerl_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPerl_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPerl_DefaultColorWithStyle(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPerl_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPerl) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPerl_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultEolFill +func miqt_exec_callback_QsciLexerPerl_DefaultEolFill(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerPerl_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPerl_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPerl_DefaultFontWithStyle(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPerl_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPerl) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPerl_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPerl_DefaultPaperWithStyle(self *C.QsciLexerPerl, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPerl_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPerl) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPerl_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetEditor +func miqt_exec_callback_QsciLexerPerl_SetEditor(self *C.QsciLexerPerl, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_RefreshProperties() { + + C.QsciLexerPerl_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPerl) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPerl_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_RefreshProperties +func miqt_exec_callback_QsciLexerPerl_RefreshProperties(self *C.QsciLexerPerl, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPerl) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPerl_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPerl) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPerl_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPerl_StyleBitsNeeded(self *C.QsciLexerPerl, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPerl_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPerl) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPerl_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_WordCharacters +func miqt_exec_callback_QsciLexerPerl_WordCharacters(self *C.QsciLexerPerl, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPerl) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPerl_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPerl) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPerl_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPerl_SetAutoIndentStyle(self *C.QsciLexerPerl, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerPerl_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPerl_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetColor +func miqt_exec_callback_QsciLexerPerl_SetColor(self *C.QsciLexerPerl, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPerl_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPerl_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetEolFill +func miqt_exec_callback_QsciLexerPerl_SetEolFill(self *C.QsciLexerPerl, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerPerl_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerPerl_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetFont +func miqt_exec_callback_QsciLexerPerl_SetFont(self *C.QsciLexerPerl, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerPerl_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPerl) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPerl_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_SetPaper +func miqt_exec_callback_QsciLexerPerl_SetPaper(self *C.QsciLexerPerl, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPerl) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPerl_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPerl) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPerl_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_ReadProperties +func miqt_exec_callback_QsciLexerPerl_ReadProperties(self *C.QsciLexerPerl, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPerl) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPerl_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPerl) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPerl_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPerl_WriteProperties +func miqt_exec_callback_QsciLexerPerl_WriteProperties(self *C.QsciLexerPerl, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPerl) Delete() { - C.QsciLexerPerl_Delete(this.h) + C.QsciLexerPerl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h index 4001eafd..d3a563ac 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPerl; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPerl QsciLexerPerl; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPerl* QsciLexerPerl_new(); -QsciLexerPerl* QsciLexerPerl_new2(QObject* parent); +void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self); void* QsciLexerPerl_Metacast(QsciLexerPerl* self, const char* param1); struct miqt_string QsciLexerPerl_Tr(const char* s); @@ -61,7 +67,79 @@ struct miqt_string QsciLexerPerl_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPerl_Tr3(const char* s, const char* c, int n); const char* QsciLexerPerl_BlockEnd1(const QsciLexerPerl* self, int* style); const char* QsciLexerPerl_BlockStart1(const QsciLexerPerl* self, int* style); -void QsciLexerPerl_Delete(QsciLexerPerl* self); +void QsciLexerPerl_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPerl_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPerl_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_Language(const void* self); +void QsciLexerPerl_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_Lexer(const void* self); +void QsciLexerPerl_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_LexerId(const void* self); +void QsciLexerPerl_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPerl_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPerl_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPerl_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPerl_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_BlockLookback(const void* self); +void QsciLexerPerl_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPerl_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPerl_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_BraceStyle(const void* self); +void QsciLexerPerl_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_CaseSensitive(const void* self); +void QsciLexerPerl_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_Color(const void* self, int style); +void QsciLexerPerl_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_EolFill(const void* self, int style); +void QsciLexerPerl_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPerl_virtualbase_Font(const void* self, int style); +void QsciLexerPerl_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPerl_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_Keywords(const void* self, int set); +void QsciLexerPerl_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_DefaultStyle(const void* self); +void QsciLexerPerl_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPerl_virtualbase_Description(const void* self, int style); +void QsciLexerPerl_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_Paper(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPerl_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPerl_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPerl_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPerl_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPerl_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_RefreshProperties(void* self); +void QsciLexerPerl_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPerl_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPerl_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPerl_virtualbase_WordCharacters(const void* self); +void QsciLexerPerl_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPerl_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPerl_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPerl_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPerl_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPerl_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPerl_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPerl_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPerl_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPerl_Delete(QsciLexerPerl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp index a3f3ecac..7099faa8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,894 @@ #include "gen_qscilexerpo.h" #include "_cgo_export.h" -QsciLexerPO* QsciLexerPO_new() { - return new QsciLexerPO(); +class MiqtVirtualQsciLexerPO : public virtual QsciLexerPO { +public: + + MiqtVirtualQsciLexerPO(): QsciLexerPO() {}; + MiqtVirtualQsciLexerPO(QObject* parent): QsciLexerPO(parent) {}; + + virtual ~MiqtVirtualQsciLexerPO() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPO::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPO_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPO::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPO::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPO_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPO::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPO::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPO::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPO::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPO::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPO::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPO::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPO::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPO_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPO::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPO::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPO::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPO::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPO::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPO::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPO::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPO::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPO::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPO::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPO::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPO::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPO::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPO::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPO::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPO::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPO::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPO::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPO_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPO::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPO::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPO::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPO::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPO::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPO::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPO::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPO_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPO::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPO::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPO::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPO::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPO::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPO::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPO::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPO::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPO::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPO_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPO::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPO::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPO_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPO::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPO::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPO_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPO::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPO::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPO_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPO::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPO::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPO_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPO::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPO::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPO_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPO::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPO::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPO::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPO::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPO::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPO::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPO::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPO::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPO_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPO::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPO::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPO::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPO::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPO_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPO::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(); + *outptr_QsciLexerPO = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPO* QsciLexerPO_new2(QObject* parent) { - return new QsciLexerPO(parent); +void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(parent); + *outptr_QsciLexerPO = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self) { @@ -105,7 +989,291 @@ struct miqt_string QsciLexerPO_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerPO_Delete(QsciLexerPO* self) { - delete self; +void QsciLexerPO_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPO_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPO_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPO_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPO_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Language = slot; +} + +void QsciLexerPO_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPO_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPO_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPO_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPO_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPO_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPO_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPO_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPO_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPO_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPO_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPO_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPO_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPO_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPO_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPO_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPO_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPO_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPO_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPO_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPO_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPO_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPO_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPO_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPO_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPO_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPO_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPO_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPO_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPO_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPO_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPO_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPO_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Description = slot; +} + +void QsciLexerPO_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPO_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPO_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPO_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPO_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPO_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPO_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPO_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPO_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPO_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPO_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPO_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPO_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPO_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPO_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPO_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPO_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPO_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPO_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPO_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPO_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPO_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPO_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPO_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPO_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPO_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPO_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPO_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPO_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPO_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPO*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPO_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPO*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPO_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPO*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPO_Delete(QsciLexerPO* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go index 4f9fb364..4b6eb0a6 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QsciLexerPO struct { - h *C.QsciLexerPO + h *C.QsciLexerPO + isSubclass bool *QsciLexer } @@ -53,27 +55,47 @@ func (this *QsciLexerPO) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPO(h *C.QsciLexerPO) *QsciLexerPO { +// newQsciLexerPO constructs the type using only CGO pointers. +func newQsciLexerPO(h *C.QsciLexerPO, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPO { if h == nil { return nil } - return &QsciLexerPO{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPO{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPO(h unsafe.Pointer) *QsciLexerPO { - return newQsciLexerPO((*C.QsciLexerPO)(h)) +// UnsafeNewQsciLexerPO constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPO(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPO { + if h == nil { + return nil + } + + return &QsciLexerPO{h: (*C.QsciLexerPO)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPO constructs a new QsciLexerPO object. func NewQsciLexerPO() *QsciLexerPO { - ret := C.QsciLexerPO_new() - return newQsciLexerPO(ret) + var outptr_QsciLexerPO *C.QsciLexerPO = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPO_new(&outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPO2 constructs a new QsciLexerPO object. func NewQsciLexerPO2(parent *qt6.QObject) *QsciLexerPO { - ret := C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPO(ret) + var outptr_QsciLexerPO *C.QsciLexerPO = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPO) MetaObject() *qt6.QMetaObject { @@ -168,9 +190,940 @@ func QsciLexerPO_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerPO) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPO_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPO) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPO_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetFoldComments +func miqt_exec_callback_QsciLexerPO_SetFoldComments(self *C.QsciLexerPO, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPO_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPO) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPO_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetFoldCompact +func miqt_exec_callback_QsciLexerPO_SetFoldCompact(self *C.QsciLexerPO, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_Language() string { + + _ret := C.QsciLexerPO_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Language +func miqt_exec_callback_QsciLexerPO_Language(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPO_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnLexer(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Lexer +func miqt_exec_callback_QsciLexerPO_Lexer(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPO_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_LexerId +func miqt_exec_callback_QsciLexerPO_LexerId(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPO_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPO_AutoCompletionFillups(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPO_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPO) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPO_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPO_AutoCompletionWordSeparators(self *C.QsciLexerPO, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPO) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPO_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPO_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockEnd +func miqt_exec_callback_QsciLexerPO_BlockEnd(self *C.QsciLexerPO, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPO_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockLookback +func miqt_exec_callback_QsciLexerPO_BlockLookback(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPO_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPO_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockStart +func miqt_exec_callback_QsciLexerPO_BlockStart(self *C.QsciLexerPO, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPO_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPO_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BlockStartKeyword +func miqt_exec_callback_QsciLexerPO_BlockStartKeyword(self *C.QsciLexerPO, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPO_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_BraceStyle +func miqt_exec_callback_QsciLexerPO_BraceStyle(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPO_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPO_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_CaseSensitive +func miqt_exec_callback_QsciLexerPO_CaseSensitive(self *C.QsciLexerPO, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerPO_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPO_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Color +func miqt_exec_callback_QsciLexerPO_Color(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPO_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPO) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPO_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_EolFill +func miqt_exec_callback_QsciLexerPO_EolFill(self *C.QsciLexerPO, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerPO_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPO_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Font +func miqt_exec_callback_QsciLexerPO_Font(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPO_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_IndentationGuideView +func miqt_exec_callback_QsciLexerPO_IndentationGuideView(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPO_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPO_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Keywords +func miqt_exec_callback_QsciLexerPO_Keywords(self *C.QsciLexerPO, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPO_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultStyle +func miqt_exec_callback_QsciLexerPO_DefaultStyle(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPO_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPO) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPO_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Description +func miqt_exec_callback_QsciLexerPO_Description(self *C.QsciLexerPO, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPO) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerPO_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPO_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_Paper +func miqt_exec_callback_QsciLexerPO_Paper(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPO_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPO_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPO_DefaultColorWithStyle(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPO_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPO) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPO_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultEolFill +func miqt_exec_callback_QsciLexerPO_DefaultEolFill(self *C.QsciLexerPO, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerPO_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPO_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPO_DefaultFontWithStyle(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPO_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPO) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPO_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPO_DefaultPaperWithStyle(self *C.QsciLexerPO, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPO) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPO_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPO) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPO_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetEditor +func miqt_exec_callback_QsciLexerPO_SetEditor(self *C.QsciLexerPO, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_RefreshProperties() { + + C.QsciLexerPO_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPO) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPO_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_RefreshProperties +func miqt_exec_callback_QsciLexerPO_RefreshProperties(self *C.QsciLexerPO, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPO) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPO_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPO) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPO_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPO_StyleBitsNeeded(self *C.QsciLexerPO, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPO_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPO) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPO_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_WordCharacters +func miqt_exec_callback_QsciLexerPO_WordCharacters(self *C.QsciLexerPO, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPO) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPO_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPO) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPO_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPO_SetAutoIndentStyle(self *C.QsciLexerPO, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPO) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerPO_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPO_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetColor +func miqt_exec_callback_QsciLexerPO_SetColor(self *C.QsciLexerPO, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPO_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPO_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetEolFill +func miqt_exec_callback_QsciLexerPO_SetEolFill(self *C.QsciLexerPO, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerPO_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerPO_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetFont +func miqt_exec_callback_QsciLexerPO_SetFont(self *C.QsciLexerPO, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerPO_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPO) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPO_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_SetPaper +func miqt_exec_callback_QsciLexerPO_SetPaper(self *C.QsciLexerPO, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPO) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPO_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPO) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPO_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_ReadProperties +func miqt_exec_callback_QsciLexerPO_ReadProperties(self *C.QsciLexerPO, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPO) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPO_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPO) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPO_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPO_WriteProperties +func miqt_exec_callback_QsciLexerPO_WriteProperties(self *C.QsciLexerPO, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPO) Delete() { - C.QsciLexerPO_Delete(this.h) + C.QsciLexerPO_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h index fad40232..217c5088 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPO; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPO QsciLexerPO; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPO* QsciLexerPO_new(); -QsciLexerPO* QsciLexerPO_new2(QObject* parent); +void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self); void* QsciLexerPO_Metacast(QsciLexerPO* self, const char* param1); struct miqt_string QsciLexerPO_Tr(const char* s); @@ -45,7 +51,79 @@ void QsciLexerPO_SetFoldComments(QsciLexerPO* self, bool fold); void QsciLexerPO_SetFoldCompact(QsciLexerPO* self, bool fold); struct miqt_string QsciLexerPO_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPO_Tr3(const char* s, const char* c, int n); -void QsciLexerPO_Delete(QsciLexerPO* self); +void QsciLexerPO_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPO_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPO_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_Language(const void* self); +void QsciLexerPO_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_Lexer(const void* self); +void QsciLexerPO_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_LexerId(const void* self); +void QsciLexerPO_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPO_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPO_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPO_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPO_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_BlockLookback(const void* self); +void QsciLexerPO_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPO_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPO_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_BraceStyle(const void* self); +void QsciLexerPO_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_CaseSensitive(const void* self); +void QsciLexerPO_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_Color(const void* self, int style); +void QsciLexerPO_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_EolFill(const void* self, int style); +void QsciLexerPO_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPO_virtualbase_Font(const void* self, int style); +void QsciLexerPO_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPO_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_Keywords(const void* self, int set); +void QsciLexerPO_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_DefaultStyle(const void* self); +void QsciLexerPO_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPO_virtualbase_Description(const void* self, int style); +void QsciLexerPO_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_Paper(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPO_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPO_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPO_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPO_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPO_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_RefreshProperties(void* self); +void QsciLexerPO_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPO_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPO_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPO_virtualbase_WordCharacters(const void* self); +void QsciLexerPO_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPO_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPO_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPO_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPO_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPO_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPO_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPO_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPO_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPO_Delete(QsciLexerPO* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp index 8dd9cbd2..d0220663 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,942 @@ #include "gen_qscilexerpostscript.h" #include "_cgo_export.h" -QsciLexerPostScript* QsciLexerPostScript_new() { - return new QsciLexerPostScript(); +class MiqtVirtualQsciLexerPostScript : public virtual QsciLexerPostScript { +public: + + MiqtVirtualQsciLexerPostScript(): QsciLexerPostScript() {}; + MiqtVirtualQsciLexerPostScript(QObject* parent): QsciLexerPostScript(parent) {}; + + virtual ~MiqtVirtualQsciLexerPostScript() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTokenize = 0; + + // Subclass to allow providing a Go implementation + virtual void setTokenize(bool tokenize) override { + if (handle__SetTokenize == 0) { + QsciLexerPostScript::setTokenize(tokenize); + return; + } + + bool sigval1 = tokenize; + + miqt_exec_callback_QsciLexerPostScript_SetTokenize(this, handle__SetTokenize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTokenize(bool tokenize) { + + QsciLexerPostScript::setTokenize(tokenize); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetLevel = 0; + + // Subclass to allow providing a Go implementation + virtual void setLevel(int level) override { + if (handle__SetLevel == 0) { + QsciLexerPostScript::setLevel(level); + return; + } + + int sigval1 = level; + + miqt_exec_callback_QsciLexerPostScript_SetLevel(this, handle__SetLevel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetLevel(int level) { + + QsciLexerPostScript::setLevel(static_cast(level)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPostScript::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPostScript_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPostScript::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerPostScript::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerPostScript::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPostScript::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPostScript::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPostScript::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPostScript::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPostScript::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPostScript::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPostScript::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPostScript_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPostScript::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPostScript::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPostScript::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPostScript::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPostScript::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPostScript::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPostScript::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPostScript::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPostScript::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPostScript::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPostScript::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPostScript::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPostScript::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPostScript::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPostScript::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPostScript::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPostScript::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPostScript::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPostScript::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPostScript::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPostScript::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPostScript::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPostScript::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPostScript::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPostScript::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPostScript_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPostScript::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPostScript::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPostScript::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPostScript::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPostScript::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPostScript::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPostScript::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPostScript::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPostScript::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPostScript_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPostScript::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPostScript::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPostScript_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPostScript::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPostScript::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPostScript_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPostScript::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPostScript::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPostScript_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPostScript::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPostScript::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPostScript_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPostScript::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPostScript::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPostScript_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPostScript::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPostScript::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPostScript::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPostScript::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPostScript::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPostScript::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPostScript::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPostScript::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPostScript_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPostScript::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPostScript::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPostScript::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPostScript::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPostScript_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPostScript::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(); + *outptr_QsciLexerPostScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent) { - return new QsciLexerPostScript(parent); +void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(parent); + *outptr_QsciLexerPostScript = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self) { @@ -133,7 +1065,307 @@ struct miqt_string QsciLexerPostScript_Tr3(const char* s, const char* c, int n) return _ms; } -void QsciLexerPostScript_Delete(QsciLexerPostScript* self) { - delete self; +void QsciLexerPostScript_override_virtual_SetTokenize(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetTokenize = slot; +} + +void QsciLexerPostScript_virtualbase_SetTokenize(void* self, bool tokenize) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetTokenize(tokenize); +} + +void QsciLexerPostScript_override_virtual_SetLevel(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetLevel = slot; +} + +void QsciLexerPostScript_virtualbase_SetLevel(void* self, int level) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetLevel(level); +} + +void QsciLexerPostScript_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPostScript_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPostScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerPostScript_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerPostScript_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Language = slot; +} + +void QsciLexerPostScript_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPostScript_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPostScript_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPostScript_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPostScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPostScript_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPostScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPostScript_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPostScript_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPostScript_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPostScript_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPostScript_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPostScript_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPostScript_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPostScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPostScript_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPostScript_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPostScript_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPostScript_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPostScript_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPostScript_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPostScript_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPostScript_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPostScript_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPostScript_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPostScript_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPostScript_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPostScript_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPostScript_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPostScript_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPostScript_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPostScript_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPostScript_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Description = slot; +} + +void QsciLexerPostScript_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPostScript_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPostScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPostScript_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPostScript_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPostScript_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPostScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPostScript_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPostScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPostScript_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPostScript_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPostScript_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPostScript_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPostScript_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPostScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPostScript_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPostScript_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPostScript_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPostScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPostScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPostScript_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPostScript_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPostScript_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPostScript_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPostScript_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPostScript_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPostScript_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPostScript_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPostScript_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPostScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPostScript_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPostScript*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPostScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPostScript*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPostScript_Delete(QsciLexerPostScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go index 3216e866..e5ae638e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -36,7 +37,8 @@ const ( ) type QsciLexerPostScript struct { - h *C.QsciLexerPostScript + h *C.QsciLexerPostScript + isSubclass bool *QsciLexer } @@ -54,27 +56,47 @@ func (this *QsciLexerPostScript) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPostScript(h *C.QsciLexerPostScript) *QsciLexerPostScript { +// newQsciLexerPostScript constructs the type using only CGO pointers. +func newQsciLexerPostScript(h *C.QsciLexerPostScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPostScript { if h == nil { return nil } - return &QsciLexerPostScript{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPostScript{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPostScript(h unsafe.Pointer) *QsciLexerPostScript { - return newQsciLexerPostScript((*C.QsciLexerPostScript)(h)) +// UnsafeNewQsciLexerPostScript constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPostScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPostScript { + if h == nil { + return nil + } + + return &QsciLexerPostScript{h: (*C.QsciLexerPostScript)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPostScript constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript() *QsciLexerPostScript { - ret := C.QsciLexerPostScript_new() - return newQsciLexerPostScript(ret) + var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPostScript_new(&outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPostScript2 constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript2(parent *qt6.QObject) *QsciLexerPostScript { - ret := C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPostScript(ret) + var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPostScript) MetaObject() *qt6.QMetaObject { @@ -201,9 +223,986 @@ func QsciLexerPostScript_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerPostScript) callVirtualBase_SetTokenize(tokenize bool) { + + C.QsciLexerPostScript_virtualbase_SetTokenize(unsafe.Pointer(this.h), (C.bool)(tokenize)) + +} +func (this *QsciLexerPostScript) OnSetTokenize(slot func(super func(tokenize bool), tokenize bool)) { + C.QsciLexerPostScript_override_virtual_SetTokenize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetTokenize +func miqt_exec_callback_QsciLexerPostScript_SetTokenize(self *C.QsciLexerPostScript, cb C.intptr_t, tokenize C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(tokenize bool), tokenize bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(tokenize) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetTokenize, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetLevel(level int) { + + C.QsciLexerPostScript_virtualbase_SetLevel(unsafe.Pointer(this.h), (C.int)(level)) + +} +func (this *QsciLexerPostScript) OnSetLevel(slot func(super func(level int), level int)) { + C.QsciLexerPostScript_override_virtual_SetLevel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetLevel +func miqt_exec_callback_QsciLexerPostScript_SetLevel(self *C.QsciLexerPostScript, cb C.intptr_t, level C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(level int), level int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(level) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetLevel, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPostScript_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPostScript) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPostScript_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetFoldCompact +func miqt_exec_callback_QsciLexerPostScript_SetFoldCompact(self *C.QsciLexerPostScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerPostScript_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPostScript) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPostScript_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse +func miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse(self *C.QsciLexerPostScript, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Language() string { + + _ret := C.QsciLexerPostScript_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Language +func miqt_exec_callback_QsciLexerPostScript_Language(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPostScript_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnLexer(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Lexer +func miqt_exec_callback_QsciLexerPostScript_Lexer(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPostScript_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_LexerId +func miqt_exec_callback_QsciLexerPostScript_LexerId(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPostScript_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPostScript_AutoCompletionFillups(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPostScript_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPostScript) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPostScript_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPostScript_AutoCompletionWordSeparators(self *C.QsciLexerPostScript, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPostScript_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPostScript_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockEnd +func miqt_exec_callback_QsciLexerPostScript_BlockEnd(self *C.QsciLexerPostScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPostScript_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockLookback +func miqt_exec_callback_QsciLexerPostScript_BlockLookback(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPostScript_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPostScript_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockStart +func miqt_exec_callback_QsciLexerPostScript_BlockStart(self *C.QsciLexerPostScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPostScript_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPostScript_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BlockStartKeyword +func miqt_exec_callback_QsciLexerPostScript_BlockStartKeyword(self *C.QsciLexerPostScript, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPostScript_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_BraceStyle +func miqt_exec_callback_QsciLexerPostScript_BraceStyle(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPostScript_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPostScript_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_CaseSensitive +func miqt_exec_callback_QsciLexerPostScript_CaseSensitive(self *C.QsciLexerPostScript, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPostScript_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Color +func miqt_exec_callback_QsciLexerPostScript_Color(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPostScript_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPostScript) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPostScript_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_EolFill +func miqt_exec_callback_QsciLexerPostScript_EolFill(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerPostScript_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPostScript_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Font +func miqt_exec_callback_QsciLexerPostScript_Font(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPostScript_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_IndentationGuideView +func miqt_exec_callback_QsciLexerPostScript_IndentationGuideView(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPostScript_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPostScript_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Keywords +func miqt_exec_callback_QsciLexerPostScript_Keywords(self *C.QsciLexerPostScript, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPostScript_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultStyle(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPostScript_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPostScript) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPostScript_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Description +func miqt_exec_callback_QsciLexerPostScript_Description(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPostScript) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPostScript_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_Paper +func miqt_exec_callback_QsciLexerPostScript_Paper(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPostScript_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultColorWithStyle(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPostScript_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPostScript) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPostScript_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultEolFill +func miqt_exec_callback_QsciLexerPostScript_DefaultEolFill(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerPostScript_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPostScript_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultFontWithStyle(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPostScript_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPostScript) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPostScript_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPostScript_DefaultPaperWithStyle(self *C.QsciLexerPostScript, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPostScript_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPostScript) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPostScript_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetEditor +func miqt_exec_callback_QsciLexerPostScript_SetEditor(self *C.QsciLexerPostScript, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_RefreshProperties() { + + C.QsciLexerPostScript_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPostScript) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPostScript_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_RefreshProperties +func miqt_exec_callback_QsciLexerPostScript_RefreshProperties(self *C.QsciLexerPostScript, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPostScript) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPostScript_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPostScript) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPostScript_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPostScript_StyleBitsNeeded(self *C.QsciLexerPostScript, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPostScript_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPostScript) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPostScript_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_WordCharacters +func miqt_exec_callback_QsciLexerPostScript_WordCharacters(self *C.QsciLexerPostScript, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPostScript_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPostScript) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPostScript_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPostScript_SetAutoIndentStyle(self *C.QsciLexerPostScript, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerPostScript_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPostScript_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetColor +func miqt_exec_callback_QsciLexerPostScript_SetColor(self *C.QsciLexerPostScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPostScript_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPostScript_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetEolFill +func miqt_exec_callback_QsciLexerPostScript_SetEolFill(self *C.QsciLexerPostScript, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerPostScript_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerPostScript_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetFont +func miqt_exec_callback_QsciLexerPostScript_SetFont(self *C.QsciLexerPostScript, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerPostScript_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPostScript) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPostScript_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_SetPaper +func miqt_exec_callback_QsciLexerPostScript_SetPaper(self *C.QsciLexerPostScript, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPostScript) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPostScript_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPostScript) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPostScript_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_ReadProperties +func miqt_exec_callback_QsciLexerPostScript_ReadProperties(self *C.QsciLexerPostScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPostScript) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPostScript_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPostScript) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPostScript_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPostScript_WriteProperties +func miqt_exec_callback_QsciLexerPostScript_WriteProperties(self *C.QsciLexerPostScript, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPostScript) Delete() { - C.QsciLexerPostScript_Delete(this.h) + C.QsciLexerPostScript_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h index 83d900f6..56a937ba 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPostScript; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPostScript QsciLexerPostScript; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPostScript* QsciLexerPostScript_new(); -QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent); +void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self); void* QsciLexerPostScript_Metacast(QsciLexerPostScript* self, const char* param1); struct miqt_string QsciLexerPostScript_Tr(const char* s); @@ -52,7 +58,83 @@ void QsciLexerPostScript_SetFoldCompact(QsciLexerPostScript* self, bool fold); void QsciLexerPostScript_SetFoldAtElse(QsciLexerPostScript* self, bool fold); struct miqt_string QsciLexerPostScript_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPostScript_Tr3(const char* s, const char* c, int n); -void QsciLexerPostScript_Delete(QsciLexerPostScript* self); +void QsciLexerPostScript_override_virtual_SetTokenize(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetTokenize(void* self, bool tokenize); +void QsciLexerPostScript_override_virtual_SetLevel(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetLevel(void* self, int level); +void QsciLexerPostScript_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPostScript_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerPostScript_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_Language(const void* self); +void QsciLexerPostScript_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_Lexer(const void* self); +void QsciLexerPostScript_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_LexerId(const void* self); +void QsciLexerPostScript_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPostScript_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPostScript_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPostScript_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPostScript_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_BlockLookback(const void* self); +void QsciLexerPostScript_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPostScript_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPostScript_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_BraceStyle(const void* self); +void QsciLexerPostScript_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_CaseSensitive(const void* self); +void QsciLexerPostScript_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_Color(const void* self, int style); +void QsciLexerPostScript_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_EolFill(const void* self, int style); +void QsciLexerPostScript_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPostScript_virtualbase_Font(const void* self, int style); +void QsciLexerPostScript_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPostScript_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_Keywords(const void* self, int set); +void QsciLexerPostScript_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_DefaultStyle(const void* self); +void QsciLexerPostScript_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPostScript_virtualbase_Description(const void* self, int style); +void QsciLexerPostScript_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_Paper(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPostScript_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPostScript_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPostScript_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPostScript_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPostScript_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_RefreshProperties(void* self); +void QsciLexerPostScript_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPostScript_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPostScript_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPostScript_virtualbase_WordCharacters(const void* self); +void QsciLexerPostScript_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPostScript_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPostScript_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPostScript_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPostScript_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPostScript_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPostScript_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPostScript_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPostScript_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPostScript_Delete(QsciLexerPostScript* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp index 1fbb757b..dcd12509 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,918 @@ #include "gen_qscilexerpov.h" #include "_cgo_export.h" -QsciLexerPOV* QsciLexerPOV_new() { - return new QsciLexerPOV(); +class MiqtVirtualQsciLexerPOV : public virtual QsciLexerPOV { +public: + + MiqtVirtualQsciLexerPOV(): QsciLexerPOV() {}; + MiqtVirtualQsciLexerPOV(QObject* parent): QsciLexerPOV(parent) {}; + + virtual ~MiqtVirtualQsciLexerPOV() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPOV::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPOV_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPOV::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerPOV::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPOV_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerPOV::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldDirectives = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldDirectives(bool fold) override { + if (handle__SetFoldDirectives == 0) { + QsciLexerPOV::setFoldDirectives(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPOV_SetFoldDirectives(this, handle__SetFoldDirectives, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldDirectives(bool fold) { + + QsciLexerPOV::setFoldDirectives(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPOV::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPOV::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPOV::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPOV::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPOV::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPOV::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPOV::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPOV_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPOV::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPOV::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPOV::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPOV::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPOV::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPOV::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPOV::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPOV::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPOV::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPOV::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPOV::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPOV::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPOV::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPOV::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPOV::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPOV::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPOV::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPOV::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPOV_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPOV::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPOV::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPOV::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPOV::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPOV::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPOV::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPOV::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPOV_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPOV::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPOV::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPOV::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPOV::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPOV::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPOV::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPOV::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPOV::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPOV::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPOV_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPOV::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPOV::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPOV_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPOV::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPOV::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPOV_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPOV::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPOV::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPOV_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPOV::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPOV::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPOV_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPOV::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPOV::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPOV_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPOV::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPOV::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPOV::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPOV::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPOV::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPOV::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPOV::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPOV::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPOV_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPOV::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPOV::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPOV::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPOV::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPOV_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPOV::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(); + *outptr_QsciLexerPOV = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPOV* QsciLexerPOV_new2(QObject* parent) { - return new QsciLexerPOV(parent); +void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(parent); + *outptr_QsciLexerPOV = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self) { @@ -133,7 +1041,299 @@ struct miqt_string QsciLexerPOV_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerPOV_Delete(QsciLexerPOV* self) { - delete self; +void QsciLexerPOV_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPOV_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPOV_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerPOV_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerPOV_override_virtual_SetFoldDirectives(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFoldDirectives = slot; +} + +void QsciLexerPOV_virtualbase_SetFoldDirectives(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFoldDirectives(fold); +} + +void QsciLexerPOV_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Language = slot; +} + +void QsciLexerPOV_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPOV_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPOV_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPOV_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPOV_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPOV_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPOV_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPOV_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPOV_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPOV_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPOV_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPOV_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPOV_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPOV_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPOV_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPOV_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPOV_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPOV_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPOV_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPOV_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPOV_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPOV_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPOV_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPOV_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPOV_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPOV_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPOV_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPOV_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPOV_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPOV_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPOV_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPOV_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPOV_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Description = slot; +} + +void QsciLexerPOV_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPOV_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPOV_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPOV_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPOV_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPOV_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPOV_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPOV_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPOV_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPOV_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPOV_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPOV_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPOV_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPOV_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPOV_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPOV_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPOV_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPOV_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPOV_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPOV_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPOV_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPOV_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPOV_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPOV_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPOV_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPOV_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPOV_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPOV_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPOV_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPOV_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPOV_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPOV*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPOV_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPOV*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPOV_Delete(QsciLexerPOV* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go index 20e689c2..2b1ca658 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -37,7 +38,8 @@ const ( ) type QsciLexerPOV struct { - h *C.QsciLexerPOV + h *C.QsciLexerPOV + isSubclass bool *QsciLexer } @@ -55,27 +57,47 @@ func (this *QsciLexerPOV) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPOV(h *C.QsciLexerPOV) *QsciLexerPOV { +// newQsciLexerPOV constructs the type using only CGO pointers. +func newQsciLexerPOV(h *C.QsciLexerPOV, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPOV { if h == nil { return nil } - return &QsciLexerPOV{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPOV{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPOV(h unsafe.Pointer) *QsciLexerPOV { - return newQsciLexerPOV((*C.QsciLexerPOV)(h)) +// UnsafeNewQsciLexerPOV constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPOV(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPOV { + if h == nil { + return nil + } + + return &QsciLexerPOV{h: (*C.QsciLexerPOV)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPOV constructs a new QsciLexerPOV object. func NewQsciLexerPOV() *QsciLexerPOV { - ret := C.QsciLexerPOV_new() - return newQsciLexerPOV(ret) + var outptr_QsciLexerPOV *C.QsciLexerPOV = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPOV_new(&outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPOV2 constructs a new QsciLexerPOV object. func NewQsciLexerPOV2(parent *qt6.QObject) *QsciLexerPOV { - ret := C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPOV(ret) + var outptr_QsciLexerPOV *C.QsciLexerPOV = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPOV) MetaObject() *qt6.QMetaObject { @@ -203,9 +225,963 @@ func QsciLexerPOV_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerPOV) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPOV_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPOV) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPOV_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFoldComments +func miqt_exec_callback_QsciLexerPOV_SetFoldComments(self *C.QsciLexerPOV, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerPOV_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPOV) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPOV_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFoldCompact +func miqt_exec_callback_QsciLexerPOV_SetFoldCompact(self *C.QsciLexerPOV, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetFoldDirectives(fold bool) { + + C.QsciLexerPOV_virtualbase_SetFoldDirectives(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPOV) OnSetFoldDirectives(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPOV_override_virtual_SetFoldDirectives(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFoldDirectives +func miqt_exec_callback_QsciLexerPOV_SetFoldDirectives(self *C.QsciLexerPOV, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFoldDirectives, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_Language() string { + + _ret := C.QsciLexerPOV_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Language +func miqt_exec_callback_QsciLexerPOV_Language(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPOV_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnLexer(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Lexer +func miqt_exec_callback_QsciLexerPOV_Lexer(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPOV_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_LexerId +func miqt_exec_callback_QsciLexerPOV_LexerId(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPOV_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPOV_AutoCompletionFillups(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPOV_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPOV) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPOV_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPOV_AutoCompletionWordSeparators(self *C.QsciLexerPOV, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPOV_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPOV_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockEnd +func miqt_exec_callback_QsciLexerPOV_BlockEnd(self *C.QsciLexerPOV, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPOV_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockLookback +func miqt_exec_callback_QsciLexerPOV_BlockLookback(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPOV_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPOV_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockStart +func miqt_exec_callback_QsciLexerPOV_BlockStart(self *C.QsciLexerPOV, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPOV_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPOV_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BlockStartKeyword +func miqt_exec_callback_QsciLexerPOV_BlockStartKeyword(self *C.QsciLexerPOV, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPOV_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_BraceStyle +func miqt_exec_callback_QsciLexerPOV_BraceStyle(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPOV_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPOV_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_CaseSensitive +func miqt_exec_callback_QsciLexerPOV_CaseSensitive(self *C.QsciLexerPOV, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerPOV_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPOV_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Color +func miqt_exec_callback_QsciLexerPOV_Color(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPOV_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPOV) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPOV_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_EolFill +func miqt_exec_callback_QsciLexerPOV_EolFill(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerPOV_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPOV_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Font +func miqt_exec_callback_QsciLexerPOV_Font(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPOV_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_IndentationGuideView +func miqt_exec_callback_QsciLexerPOV_IndentationGuideView(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPOV_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPOV_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Keywords +func miqt_exec_callback_QsciLexerPOV_Keywords(self *C.QsciLexerPOV, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPOV_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultStyle +func miqt_exec_callback_QsciLexerPOV_DefaultStyle(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPOV_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPOV) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPOV_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Description +func miqt_exec_callback_QsciLexerPOV_Description(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPOV) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerPOV_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPOV_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_Paper +func miqt_exec_callback_QsciLexerPOV_Paper(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPOV_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPOV_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPOV_DefaultColorWithStyle(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPOV_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPOV) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPOV_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultEolFill +func miqt_exec_callback_QsciLexerPOV_DefaultEolFill(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerPOV_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPOV_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPOV_DefaultFontWithStyle(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPOV_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPOV) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPOV_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPOV_DefaultPaperWithStyle(self *C.QsciLexerPOV, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPOV_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPOV) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPOV_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetEditor +func miqt_exec_callback_QsciLexerPOV_SetEditor(self *C.QsciLexerPOV, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_RefreshProperties() { + + C.QsciLexerPOV_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPOV) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPOV_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_RefreshProperties +func miqt_exec_callback_QsciLexerPOV_RefreshProperties(self *C.QsciLexerPOV, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPOV) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPOV_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPOV) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPOV_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPOV_StyleBitsNeeded(self *C.QsciLexerPOV, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPOV_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPOV) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPOV_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_WordCharacters +func miqt_exec_callback_QsciLexerPOV_WordCharacters(self *C.QsciLexerPOV, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPOV) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPOV_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPOV) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPOV_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPOV_SetAutoIndentStyle(self *C.QsciLexerPOV, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerPOV_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPOV_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetColor +func miqt_exec_callback_QsciLexerPOV_SetColor(self *C.QsciLexerPOV, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPOV_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPOV_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetEolFill +func miqt_exec_callback_QsciLexerPOV_SetEolFill(self *C.QsciLexerPOV, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerPOV_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerPOV_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetFont +func miqt_exec_callback_QsciLexerPOV_SetFont(self *C.QsciLexerPOV, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerPOV_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPOV) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPOV_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_SetPaper +func miqt_exec_callback_QsciLexerPOV_SetPaper(self *C.QsciLexerPOV, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPOV) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPOV_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPOV) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPOV_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_ReadProperties +func miqt_exec_callback_QsciLexerPOV_ReadProperties(self *C.QsciLexerPOV, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPOV) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPOV_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPOV) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPOV_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPOV_WriteProperties +func miqt_exec_callback_QsciLexerPOV_WriteProperties(self *C.QsciLexerPOV, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPOV) Delete() { - C.QsciLexerPOV_Delete(this.h) + C.QsciLexerPOV_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h index 774bc05c..517359e4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPOV; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPOV QsciLexerPOV; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPOV* QsciLexerPOV_new(); -QsciLexerPOV* QsciLexerPOV_new2(QObject* parent); +void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self); void* QsciLexerPOV_Metacast(QsciLexerPOV* self, const char* param1); struct miqt_string QsciLexerPOV_Tr(const char* s); @@ -52,7 +58,81 @@ void QsciLexerPOV_SetFoldCompact(QsciLexerPOV* self, bool fold); void QsciLexerPOV_SetFoldDirectives(QsciLexerPOV* self, bool fold); struct miqt_string QsciLexerPOV_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPOV_Tr3(const char* s, const char* c, int n); -void QsciLexerPOV_Delete(QsciLexerPOV* self); +void QsciLexerPOV_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPOV_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerPOV_override_virtual_SetFoldDirectives(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFoldDirectives(void* self, bool fold); +void QsciLexerPOV_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_Language(const void* self); +void QsciLexerPOV_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_Lexer(const void* self); +void QsciLexerPOV_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_LexerId(const void* self); +void QsciLexerPOV_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPOV_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPOV_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPOV_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPOV_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_BlockLookback(const void* self); +void QsciLexerPOV_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPOV_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPOV_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_BraceStyle(const void* self); +void QsciLexerPOV_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_CaseSensitive(const void* self); +void QsciLexerPOV_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_Color(const void* self, int style); +void QsciLexerPOV_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_EolFill(const void* self, int style); +void QsciLexerPOV_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPOV_virtualbase_Font(const void* self, int style); +void QsciLexerPOV_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPOV_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_Keywords(const void* self, int set); +void QsciLexerPOV_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_DefaultStyle(const void* self); +void QsciLexerPOV_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPOV_virtualbase_Description(const void* self, int style); +void QsciLexerPOV_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_Paper(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPOV_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPOV_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPOV_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPOV_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPOV_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_RefreshProperties(void* self); +void QsciLexerPOV_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPOV_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPOV_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPOV_virtualbase_WordCharacters(const void* self); +void QsciLexerPOV_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPOV_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPOV_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPOV_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPOV_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPOV_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPOV_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPOV_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPOV_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPOV_Delete(QsciLexerPOV* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp index a5f0a479..e1f28f1c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexerproperties.h" #include "_cgo_export.h" -QsciLexerProperties* QsciLexerProperties_new() { - return new QsciLexerProperties(); +class MiqtVirtualQsciLexerProperties : public virtual QsciLexerProperties { +public: + + MiqtVirtualQsciLexerProperties(): QsciLexerProperties() {}; + MiqtVirtualQsciLexerProperties(QObject* parent): QsciLexerProperties(parent) {}; + + virtual ~MiqtVirtualQsciLexerProperties() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerProperties::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerProperties_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerProperties::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerProperties::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerProperties::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerProperties::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerProperties::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerProperties::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerProperties::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerProperties::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerProperties_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerProperties::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerProperties::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerProperties::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerProperties::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerProperties::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerProperties::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerProperties::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerProperties::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerProperties::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerProperties::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerProperties::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerProperties::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerProperties::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerProperties::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerProperties::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerProperties::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerProperties::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerProperties::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerProperties_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerProperties::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerProperties::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerProperties::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerProperties::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerProperties::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerProperties::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerProperties::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerProperties_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerProperties::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerProperties::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerProperties::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerProperties::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerProperties::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerProperties::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerProperties::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerProperties::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerProperties::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerProperties_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerProperties::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerProperties::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerProperties_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerProperties::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerProperties::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerProperties_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerProperties::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerProperties::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerProperties_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerProperties::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerProperties::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerProperties_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerProperties::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerProperties::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerProperties_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerProperties::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerProperties::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerProperties::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerProperties::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerProperties::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerProperties::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerProperties::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerProperties::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerProperties_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerProperties::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerProperties::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerProperties::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerProperties::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerProperties_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerProperties::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(); + *outptr_QsciLexerProperties = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerProperties* QsciLexerProperties_new2(QObject* parent) { - return new QsciLexerProperties(parent); +void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(parent); + *outptr_QsciLexerProperties = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self) { @@ -117,7 +977,283 @@ struct miqt_string QsciLexerProperties_Tr3(const char* s, const char* c, int n) return _ms; } -void QsciLexerProperties_Delete(QsciLexerProperties* self) { - delete self; +void QsciLexerProperties_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerProperties_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerProperties_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Language = slot; +} + +void QsciLexerProperties_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerProperties_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerProperties_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__LexerId = slot; +} + +int QsciLexerProperties_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerProperties_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerProperties_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerProperties_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerProperties_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerProperties_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerProperties_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerProperties_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerProperties_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerProperties_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerProperties_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerProperties_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerProperties_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerProperties_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerProperties_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerProperties_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerProperties_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerProperties_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerProperties_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Color(style); +} + +void QsciLexerProperties_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerProperties_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerProperties_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerProperties_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Font(style); +} + +void QsciLexerProperties_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerProperties_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerProperties_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerProperties_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerProperties_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerProperties_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerProperties_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Description = slot; +} + +void QsciLexerProperties_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerProperties_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerProperties_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerProperties_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerProperties_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerProperties_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerProperties_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerProperties_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerProperties_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerProperties_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerProperties_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerProperties_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerProperties_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerProperties_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerProperties_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerProperties_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerProperties_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerProperties_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerProperties_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerProperties_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerProperties_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetColor = slot; +} + +void QsciLexerProperties_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerProperties_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerProperties_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerProperties_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetFont = slot; +} + +void QsciLexerProperties_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerProperties_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerProperties_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerProperties_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerProperties_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerProperties_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerProperties*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerProperties_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerProperties*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerProperties_Delete(QsciLexerProperties* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go index dffe7b4e..c4a6a330 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -26,7 +27,8 @@ const ( ) type QsciLexerProperties struct { - h *C.QsciLexerProperties + h *C.QsciLexerProperties + isSubclass bool *QsciLexer } @@ -44,27 +46,47 @@ func (this *QsciLexerProperties) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerProperties(h *C.QsciLexerProperties) *QsciLexerProperties { +// newQsciLexerProperties constructs the type using only CGO pointers. +func newQsciLexerProperties(h *C.QsciLexerProperties, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerProperties { if h == nil { return nil } - return &QsciLexerProperties{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerProperties{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerProperties(h unsafe.Pointer) *QsciLexerProperties { - return newQsciLexerProperties((*C.QsciLexerProperties)(h)) +// UnsafeNewQsciLexerProperties constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerProperties(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerProperties { + if h == nil { + return nil + } + + return &QsciLexerProperties{h: (*C.QsciLexerProperties)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerProperties constructs a new QsciLexerProperties object. func NewQsciLexerProperties() *QsciLexerProperties { - ret := C.QsciLexerProperties_new() - return newQsciLexerProperties(ret) + var outptr_QsciLexerProperties *C.QsciLexerProperties = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerProperties_new(&outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerProperties2 constructs a new QsciLexerProperties object. func NewQsciLexerProperties2(parent *qt6.QObject) *QsciLexerProperties { - ret := C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerProperties(ret) + var outptr_QsciLexerProperties *C.QsciLexerProperties = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerProperties) MetaObject() *qt6.QMetaObject { @@ -175,9 +197,917 @@ func QsciLexerProperties_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerProperties) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerProperties_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerProperties) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerProperties_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetFoldCompact +func miqt_exec_callback_QsciLexerProperties_SetFoldCompact(self *C.QsciLexerProperties, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerProperties) callVirtualBase_Language() string { + + _ret := C.QsciLexerProperties_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnLanguage(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Language +func miqt_exec_callback_QsciLexerProperties_Language(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerProperties_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnLexer(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Lexer +func miqt_exec_callback_QsciLexerProperties_Lexer(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerProperties_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnLexerId(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_LexerId +func miqt_exec_callback_QsciLexerProperties_LexerId(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerProperties_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_AutoCompletionFillups +func miqt_exec_callback_QsciLexerProperties_AutoCompletionFillups(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerProperties_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerProperties) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerProperties_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerProperties_AutoCompletionWordSeparators(self *C.QsciLexerProperties, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerProperties_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerProperties_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockEnd +func miqt_exec_callback_QsciLexerProperties_BlockEnd(self *C.QsciLexerProperties, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerProperties_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockLookback +func miqt_exec_callback_QsciLexerProperties_BlockLookback(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerProperties_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerProperties_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockStart +func miqt_exec_callback_QsciLexerProperties_BlockStart(self *C.QsciLexerProperties, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerProperties_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerProperties_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BlockStartKeyword +func miqt_exec_callback_QsciLexerProperties_BlockStartKeyword(self *C.QsciLexerProperties, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerProperties_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_BraceStyle +func miqt_exec_callback_QsciLexerProperties_BraceStyle(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerProperties_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerProperties_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_CaseSensitive +func miqt_exec_callback_QsciLexerProperties_CaseSensitive(self *C.QsciLexerProperties, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerProperties_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerProperties_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Color +func miqt_exec_callback_QsciLexerProperties_Color(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerProperties_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerProperties) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerProperties_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_EolFill +func miqt_exec_callback_QsciLexerProperties_EolFill(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerProperties_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerProperties_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Font +func miqt_exec_callback_QsciLexerProperties_Font(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerProperties_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_IndentationGuideView +func miqt_exec_callback_QsciLexerProperties_IndentationGuideView(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerProperties_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerProperties_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Keywords +func miqt_exec_callback_QsciLexerProperties_Keywords(self *C.QsciLexerProperties, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerProperties_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultStyle +func miqt_exec_callback_QsciLexerProperties_DefaultStyle(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerProperties_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerProperties) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerProperties_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Description +func miqt_exec_callback_QsciLexerProperties_Description(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerProperties) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerProperties_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerProperties_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_Paper +func miqt_exec_callback_QsciLexerProperties_Paper(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerProperties_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerProperties_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerProperties_DefaultColorWithStyle(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerProperties_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerProperties) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerProperties_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultEolFill +func miqt_exec_callback_QsciLexerProperties_DefaultEolFill(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerProperties_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerProperties_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerProperties_DefaultFontWithStyle(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerProperties_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerProperties) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerProperties_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerProperties_DefaultPaperWithStyle(self *C.QsciLexerProperties, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerProperties_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerProperties) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerProperties_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetEditor +func miqt_exec_callback_QsciLexerProperties_SetEditor(self *C.QsciLexerProperties, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerProperties) callVirtualBase_RefreshProperties() { + + C.QsciLexerProperties_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerProperties) OnRefreshProperties(slot func(super func())) { + C.QsciLexerProperties_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_RefreshProperties +func miqt_exec_callback_QsciLexerProperties_RefreshProperties(self *C.QsciLexerProperties, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerProperties) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerProperties_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerProperties) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerProperties_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_StyleBitsNeeded +func miqt_exec_callback_QsciLexerProperties_StyleBitsNeeded(self *C.QsciLexerProperties, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerProperties_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerProperties) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerProperties_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_WordCharacters +func miqt_exec_callback_QsciLexerProperties_WordCharacters(self *C.QsciLexerProperties, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerProperties) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerProperties_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerProperties) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerProperties_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerProperties_SetAutoIndentStyle(self *C.QsciLexerProperties, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerProperties_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerProperties_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetColor +func miqt_exec_callback_QsciLexerProperties_SetColor(self *C.QsciLexerProperties, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerProperties_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerProperties_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetEolFill +func miqt_exec_callback_QsciLexerProperties_SetEolFill(self *C.QsciLexerProperties, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerProperties_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerProperties_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetFont +func miqt_exec_callback_QsciLexerProperties_SetFont(self *C.QsciLexerProperties, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerProperties_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerProperties) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerProperties_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_SetPaper +func miqt_exec_callback_QsciLexerProperties_SetPaper(self *C.QsciLexerProperties, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerProperties) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerProperties_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerProperties) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerProperties_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_ReadProperties +func miqt_exec_callback_QsciLexerProperties_ReadProperties(self *C.QsciLexerProperties, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerProperties) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerProperties_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerProperties) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerProperties_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerProperties_WriteProperties +func miqt_exec_callback_QsciLexerProperties_WriteProperties(self *C.QsciLexerProperties, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerProperties) Delete() { - C.QsciLexerProperties_Delete(this.h) + C.QsciLexerProperties_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h index c9832cf7..75c0ca6c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerProperties; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerProperties QsciLexerProperties; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerProperties* QsciLexerProperties_new(); -QsciLexerProperties* QsciLexerProperties_new2(QObject* parent); +void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self); void* QsciLexerProperties_Metacast(QsciLexerProperties* self, const char* param1); struct miqt_string QsciLexerProperties_Tr(const char* s); @@ -48,7 +54,77 @@ bool QsciLexerProperties_InitialSpaces(const QsciLexerProperties* self); void QsciLexerProperties_SetFoldCompact(QsciLexerProperties* self, bool fold); struct miqt_string QsciLexerProperties_Tr2(const char* s, const char* c); struct miqt_string QsciLexerProperties_Tr3(const char* s, const char* c, int n); -void QsciLexerProperties_Delete(QsciLexerProperties* self); +void QsciLexerProperties_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerProperties_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_Language(const void* self); +void QsciLexerProperties_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_Lexer(const void* self); +void QsciLexerProperties_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_LexerId(const void* self); +void QsciLexerProperties_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerProperties_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerProperties_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerProperties_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerProperties_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_BlockLookback(const void* self); +void QsciLexerProperties_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerProperties_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerProperties_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_BraceStyle(const void* self); +void QsciLexerProperties_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_CaseSensitive(const void* self); +void QsciLexerProperties_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_Color(const void* self, int style); +void QsciLexerProperties_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_EolFill(const void* self, int style); +void QsciLexerProperties_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerProperties_virtualbase_Font(const void* self, int style); +void QsciLexerProperties_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_IndentationGuideView(const void* self); +void QsciLexerProperties_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_Keywords(const void* self, int set); +void QsciLexerProperties_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_DefaultStyle(const void* self); +void QsciLexerProperties_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerProperties_virtualbase_Description(const void* self, int style); +void QsciLexerProperties_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_Paper(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerProperties_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerProperties_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerProperties_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerProperties_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerProperties_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_RefreshProperties(void* self); +void QsciLexerProperties_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerProperties_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerProperties_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerProperties_virtualbase_WordCharacters(const void* self); +void QsciLexerProperties_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerProperties_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerProperties_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerProperties_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerProperties_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerProperties_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerProperties_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerProperties_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerProperties_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerProperties_Delete(QsciLexerProperties* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp index c5174b5e..ab7c36e9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -10,12 +11,919 @@ #include "gen_qscilexerpython.h" #include "_cgo_export.h" -QsciLexerPython* QsciLexerPython_new() { - return new QsciLexerPython(); +class MiqtVirtualQsciLexerPython : public virtual QsciLexerPython { +public: + + MiqtVirtualQsciLexerPython(): QsciLexerPython() {}; + MiqtVirtualQsciLexerPython(QObject* parent): QsciLexerPython(parent) {}; + + virtual ~MiqtVirtualQsciLexerPython() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerPython::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerPython::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerPython::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPython_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerPython::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldQuotes = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldQuotes(bool fold) override { + if (handle__SetFoldQuotes == 0) { + QsciLexerPython::setFoldQuotes(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerPython_SetFoldQuotes(this, handle__SetFoldQuotes, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldQuotes(bool fold) { + + QsciLexerPython::setFoldQuotes(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationWarning = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationWarning(QsciLexerPython::IndentationWarning warn) override { + if (handle__SetIndentationWarning == 0) { + QsciLexerPython::setIndentationWarning(warn); + return; + } + + QsciLexerPython::IndentationWarning warn_ret = warn; + int sigval1 = static_cast(warn_ret); + + miqt_exec_callback_QsciLexerPython_SetIndentationWarning(this, handle__SetIndentationWarning, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationWarning(int warn) { + + QsciLexerPython::setIndentationWarning(static_cast(warn)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerPython::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerPython::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerPython::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerPython::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerPython::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerPython::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerPython::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerPython_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerPython::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerPython::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerPython::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerPython::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerPython::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerPython::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerPython::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerPython::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerPython::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerPython::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerPython::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerPython::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerPython::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerPython::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerPython::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerPython::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerPython::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerPython::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPython_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerPython::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerPython::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerPython::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerPython::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerPython::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerPython_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerPython::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerPython::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerPython::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerPython::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerPython::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerPython::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerPython::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerPython::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerPython::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerPython_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerPython::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerPython::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerPython_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerPython::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerPython::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerPython_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerPython::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerPython::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerPython_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerPython::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerPython::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerPython_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerPython::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerPython::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerPython_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerPython::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerPython::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerPython::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerPython::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerPython::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerPython::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerPython::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerPython::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerPython_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerPython::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerPython::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPython::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerPython::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerPython_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerPython::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(); + *outptr_QsciLexerPython = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerPython* QsciLexerPython_new2(QObject* parent) { - return new QsciLexerPython(parent); +void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(parent); + *outptr_QsciLexerPython = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self) { @@ -215,7 +1123,299 @@ const char* QsciLexerPython_BlockStart1(const QsciLexerPython* self, int* style) return (const char*) self->blockStart(static_cast(style)); } -void QsciLexerPython_Delete(QsciLexerPython* self) { - delete self; +void QsciLexerPython_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerPython_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerPython_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerPython_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerPython_override_virtual_SetFoldQuotes(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetFoldQuotes = slot; +} + +void QsciLexerPython_virtualbase_SetFoldQuotes(void* self, bool fold) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetFoldQuotes(fold); +} + +void QsciLexerPython_override_virtual_SetIndentationWarning(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetIndentationWarning = slot; +} + +void QsciLexerPython_virtualbase_SetIndentationWarning(void* self, int warn) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetIndentationWarning(warn); +} + +void QsciLexerPython_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Language = slot; +} + +void QsciLexerPython_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerPython_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerPython_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__LexerId = slot; +} + +int QsciLexerPython_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerPython_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerPython_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerPython_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerPython_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerPython_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerPython_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerPython_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerPython_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerPython_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerPython_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerPython_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerPython_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerPython_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerPython_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerPython_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerPython_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerPython_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerPython_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Color(style); +} + +void QsciLexerPython_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerPython_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerPython_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerPython_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Font(style); +} + +void QsciLexerPython_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerPython_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerPython_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerPython_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerPython_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Description = slot; +} + +void QsciLexerPython_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerPython_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerPython_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerPython_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerPython_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerPython_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerPython_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerPython_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerPython_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerPython_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerPython_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerPython_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerPython_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerPython_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerPython_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerPython_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerPython_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerPython_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerPython_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerPython_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerPython_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetColor = slot; +} + +void QsciLexerPython_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerPython_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerPython_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerPython_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetFont = slot; +} + +void QsciLexerPython_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerPython_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerPython_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerPython_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerPython_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerPython*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerPython_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerPython*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerPython_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerPython*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerPython_Delete(QsciLexerPython* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go index 84bea165..48404ff3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -50,7 +51,8 @@ const ( ) type QsciLexerPython struct { - h *C.QsciLexerPython + h *C.QsciLexerPython + isSubclass bool *QsciLexer } @@ -68,27 +70,47 @@ func (this *QsciLexerPython) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerPython(h *C.QsciLexerPython) *QsciLexerPython { +// newQsciLexerPython constructs the type using only CGO pointers. +func newQsciLexerPython(h *C.QsciLexerPython, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPython { if h == nil { return nil } - return &QsciLexerPython{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerPython{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerPython(h unsafe.Pointer) *QsciLexerPython { - return newQsciLexerPython((*C.QsciLexerPython)(h)) +// UnsafeNewQsciLexerPython constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerPython(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPython { + if h == nil { + return nil + } + + return &QsciLexerPython{h: (*C.QsciLexerPython)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerPython constructs a new QsciLexerPython object. func NewQsciLexerPython() *QsciLexerPython { - ret := C.QsciLexerPython_new() - return newQsciLexerPython(ret) + var outptr_QsciLexerPython *C.QsciLexerPython = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPython_new(&outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerPython2 constructs a new QsciLexerPython object. func NewQsciLexerPython2(parent *qt6.QObject) *QsciLexerPython { - ret := C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerPython(ret) + var outptr_QsciLexerPython *C.QsciLexerPython = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerPython) MetaObject() *qt6.QMetaObject { @@ -290,9 +312,963 @@ func (this *QsciLexerPython) BlockStart1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerPython) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerPython_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_IndentationGuideView +func miqt_exec_callback_QsciLexerPython_IndentationGuideView(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerPython_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPython) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPython_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetFoldComments +func miqt_exec_callback_QsciLexerPython_SetFoldComments(self *C.QsciLexerPython, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_SetFoldQuotes(fold bool) { + + C.QsciLexerPython_virtualbase_SetFoldQuotes(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerPython) OnSetFoldQuotes(slot func(super func(fold bool), fold bool)) { + C.QsciLexerPython_override_virtual_SetFoldQuotes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetFoldQuotes +func miqt_exec_callback_QsciLexerPython_SetFoldQuotes(self *C.QsciLexerPython, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetFoldQuotes, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_SetIndentationWarning(warn QsciLexerPython__IndentationWarning) { + + C.QsciLexerPython_virtualbase_SetIndentationWarning(unsafe.Pointer(this.h), (C.int)(warn)) + +} +func (this *QsciLexerPython) OnSetIndentationWarning(slot func(super func(warn QsciLexerPython__IndentationWarning), warn QsciLexerPython__IndentationWarning)) { + C.QsciLexerPython_override_virtual_SetIndentationWarning(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetIndentationWarning +func miqt_exec_callback_QsciLexerPython_SetIndentationWarning(self *C.QsciLexerPython, cb C.intptr_t, warn C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(warn QsciLexerPython__IndentationWarning), warn QsciLexerPython__IndentationWarning)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciLexerPython__IndentationWarning)(warn) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetIndentationWarning, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_Language() string { + + _ret := C.QsciLexerPython_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnLanguage(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Language +func miqt_exec_callback_QsciLexerPython_Language(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerPython_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnLexer(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Lexer +func miqt_exec_callback_QsciLexerPython_Lexer(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerPython_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnLexerId(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_LexerId +func miqt_exec_callback_QsciLexerPython_LexerId(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerPython_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_AutoCompletionFillups +func miqt_exec_callback_QsciLexerPython_AutoCompletionFillups(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerPython_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerPython) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerPython_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerPython_AutoCompletionWordSeparators(self *C.QsciLexerPython, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerPython) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerPython_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPython_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockEnd +func miqt_exec_callback_QsciLexerPython_BlockEnd(self *C.QsciLexerPython, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerPython_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockLookback +func miqt_exec_callback_QsciLexerPython_BlockLookback(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerPython_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPython_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockStart +func miqt_exec_callback_QsciLexerPython_BlockStart(self *C.QsciLexerPython, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerPython_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerPython_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BlockStartKeyword +func miqt_exec_callback_QsciLexerPython_BlockStartKeyword(self *C.QsciLexerPython, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerPython_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_BraceStyle +func miqt_exec_callback_QsciLexerPython_BraceStyle(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerPython_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerPython_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_CaseSensitive +func miqt_exec_callback_QsciLexerPython_CaseSensitive(self *C.QsciLexerPython, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerPython_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPython_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Color +func miqt_exec_callback_QsciLexerPython_Color(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerPython_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPython) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPython_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_EolFill +func miqt_exec_callback_QsciLexerPython_EolFill(self *C.QsciLexerPython, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerPython_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPython_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Font +func miqt_exec_callback_QsciLexerPython_Font(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerPython_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerPython_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Keywords +func miqt_exec_callback_QsciLexerPython_Keywords(self *C.QsciLexerPython, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerPython_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultStyle +func miqt_exec_callback_QsciLexerPython_DefaultStyle(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerPython_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerPython) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerPython_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Description +func miqt_exec_callback_QsciLexerPython_Description(self *C.QsciLexerPython, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerPython) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerPython_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPython_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_Paper +func miqt_exec_callback_QsciLexerPython_Paper(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPython_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPython_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerPython_DefaultColorWithStyle(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerPython_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerPython) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerPython_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultEolFill +func miqt_exec_callback_QsciLexerPython_DefaultEolFill(self *C.QsciLexerPython, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerPython_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerPython_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerPython_DefaultFontWithStyle(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerPython_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerPython) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerPython_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerPython_DefaultPaperWithStyle(self *C.QsciLexerPython, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerPython) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerPython_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerPython) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerPython_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetEditor +func miqt_exec_callback_QsciLexerPython_SetEditor(self *C.QsciLexerPython, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_RefreshProperties() { + + C.QsciLexerPython_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerPython) OnRefreshProperties(slot func(super func())) { + C.QsciLexerPython_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_RefreshProperties +func miqt_exec_callback_QsciLexerPython_RefreshProperties(self *C.QsciLexerPython, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerPython) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerPython_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerPython) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerPython_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_StyleBitsNeeded +func miqt_exec_callback_QsciLexerPython_StyleBitsNeeded(self *C.QsciLexerPython, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerPython_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerPython) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerPython_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_WordCharacters +func miqt_exec_callback_QsciLexerPython_WordCharacters(self *C.QsciLexerPython, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerPython) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerPython_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerPython) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerPython_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerPython_SetAutoIndentStyle(self *C.QsciLexerPython, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerPython) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerPython_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPython_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetColor +func miqt_exec_callback_QsciLexerPython_SetColor(self *C.QsciLexerPython, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerPython_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerPython_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetEolFill +func miqt_exec_callback_QsciLexerPython_SetEolFill(self *C.QsciLexerPython, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerPython_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerPython_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetFont +func miqt_exec_callback_QsciLexerPython_SetFont(self *C.QsciLexerPython, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerPython_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerPython) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerPython_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_SetPaper +func miqt_exec_callback_QsciLexerPython_SetPaper(self *C.QsciLexerPython, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerPython) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPython_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPython) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPython_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_ReadProperties +func miqt_exec_callback_QsciLexerPython_ReadProperties(self *C.QsciLexerPython, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerPython) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerPython_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerPython) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerPython_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerPython_WriteProperties +func miqt_exec_callback_QsciLexerPython_WriteProperties(self *C.QsciLexerPython, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerPython) Delete() { - C.QsciLexerPython_Delete(this.h) + C.QsciLexerPython_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h index d8d7ba9f..99af75b5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerPython; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerPython QsciLexerPython; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerPython* QsciLexerPython_new(); -QsciLexerPython* QsciLexerPython_new2(QObject* parent); +void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self); void* QsciLexerPython_Metacast(QsciLexerPython* self, const char* param1); struct miqt_string QsciLexerPython_Tr(const char* s); @@ -68,7 +74,81 @@ void QsciLexerPython_SetIndentationWarning(QsciLexerPython* self, int warn); struct miqt_string QsciLexerPython_Tr2(const char* s, const char* c); struct miqt_string QsciLexerPython_Tr3(const char* s, const char* c, int n); const char* QsciLexerPython_BlockStart1(const QsciLexerPython* self, int* style); -void QsciLexerPython_Delete(QsciLexerPython* self); +void QsciLexerPython_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_IndentationGuideView(const void* self); +void QsciLexerPython_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerPython_override_virtual_SetFoldQuotes(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetFoldQuotes(void* self, bool fold); +void QsciLexerPython_override_virtual_SetIndentationWarning(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetIndentationWarning(void* self, int warn); +void QsciLexerPython_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_Language(const void* self); +void QsciLexerPython_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_Lexer(const void* self); +void QsciLexerPython_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_LexerId(const void* self); +void QsciLexerPython_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerPython_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerPython_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerPython_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerPython_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_BlockLookback(const void* self); +void QsciLexerPython_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerPython_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerPython_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_BraceStyle(const void* self); +void QsciLexerPython_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_CaseSensitive(const void* self); +void QsciLexerPython_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_Color(const void* self, int style); +void QsciLexerPython_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_EolFill(const void* self, int style); +void QsciLexerPython_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerPython_virtualbase_Font(const void* self, int style); +void QsciLexerPython_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_Keywords(const void* self, int set); +void QsciLexerPython_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_DefaultStyle(const void* self); +void QsciLexerPython_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerPython_virtualbase_Description(const void* self, int style); +void QsciLexerPython_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_Paper(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerPython_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerPython_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerPython_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerPython_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerPython_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_RefreshProperties(void* self); +void QsciLexerPython_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerPython_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerPython_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerPython_virtualbase_WordCharacters(const void* self); +void QsciLexerPython_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerPython_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerPython_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerPython_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerPython_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerPython_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerPython_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPython_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerPython_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerPython_Delete(QsciLexerPython* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp index 3510c656..51de4305 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerruby.h" #include "_cgo_export.h" -QsciLexerRuby* QsciLexerRuby_new() { - return new QsciLexerRuby(); +class MiqtVirtualQsciLexerRuby : public virtual QsciLexerRuby { +public: + + MiqtVirtualQsciLexerRuby(): QsciLexerRuby() {}; + MiqtVirtualQsciLexerRuby(QObject* parent): QsciLexerRuby(parent) {}; + + virtual ~MiqtVirtualQsciLexerRuby() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerRuby::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerRuby::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerRuby::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerRuby::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerRuby::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerRuby::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerRuby::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerRuby_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerRuby::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerRuby::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerRuby::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerRuby::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerRuby::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerRuby::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerRuby::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerRuby::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerRuby::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerRuby::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerRuby::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerRuby::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerRuby::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerRuby::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerRuby::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerRuby::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerRuby::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerRuby::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerRuby_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerRuby::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerRuby::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerRuby::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerRuby::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerRuby::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerRuby::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerRuby::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerRuby_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerRuby::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerRuby::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerRuby::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerRuby::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerRuby::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerRuby::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerRuby::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerRuby::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerRuby::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerRuby_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerRuby::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerRuby::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerRuby_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerRuby::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerRuby::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerRuby_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerRuby::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerRuby::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerRuby_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerRuby::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerRuby::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerRuby_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerRuby::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerRuby::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerRuby_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerRuby::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerRuby::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerRuby::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerRuby::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerRuby::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerRuby::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerRuby::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerRuby::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerRuby_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerRuby::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerRuby::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerRuby::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerRuby::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerRuby_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerRuby::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(); + *outptr_QsciLexerRuby = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerRuby* QsciLexerRuby_new2(QObject* parent) { - return new QsciLexerRuby(parent); +void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(parent); + *outptr_QsciLexerRuby = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self) { @@ -145,7 +981,275 @@ const char* QsciLexerRuby_BlockStartKeyword1(const QsciLexerRuby* self, int* sty return (const char*) self->blockStartKeyword(static_cast(style)); } -void QsciLexerRuby_Delete(QsciLexerRuby* self) { - delete self; +void QsciLexerRuby_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Language = slot; +} + +void QsciLexerRuby_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerRuby_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerRuby_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__LexerId = slot; +} + +int QsciLexerRuby_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerRuby_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerRuby_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerRuby_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerRuby_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerRuby_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerRuby_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerRuby_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerRuby_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerRuby_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerRuby_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerRuby_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerRuby_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerRuby_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerRuby_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerRuby_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerRuby_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerRuby_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerRuby_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Color(style); +} + +void QsciLexerRuby_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerRuby_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerRuby_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerRuby_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Font(style); +} + +void QsciLexerRuby_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerRuby_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerRuby_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerRuby_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerRuby_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerRuby_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerRuby_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Description = slot; +} + +void QsciLexerRuby_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerRuby_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerRuby_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerRuby_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerRuby_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerRuby_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerRuby_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerRuby_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerRuby_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerRuby_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerRuby_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerRuby_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerRuby_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerRuby_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerRuby_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerRuby_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerRuby_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerRuby_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerRuby_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerRuby_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerRuby_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetColor = slot; +} + +void QsciLexerRuby_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerRuby_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerRuby_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerRuby_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetFont = slot; +} + +void QsciLexerRuby_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerRuby_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerRuby_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerRuby_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerRuby_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerRuby_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerRuby*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerRuby_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerRuby*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerRuby_Delete(QsciLexerRuby* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go index 42a473c4..27772223 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -51,7 +52,8 @@ const ( ) type QsciLexerRuby struct { - h *C.QsciLexerRuby + h *C.QsciLexerRuby + isSubclass bool *QsciLexer } @@ -69,27 +71,47 @@ func (this *QsciLexerRuby) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerRuby(h *C.QsciLexerRuby) *QsciLexerRuby { +// newQsciLexerRuby constructs the type using only CGO pointers. +func newQsciLexerRuby(h *C.QsciLexerRuby, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerRuby { if h == nil { return nil } - return &QsciLexerRuby{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerRuby{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerRuby(h unsafe.Pointer) *QsciLexerRuby { - return newQsciLexerRuby((*C.QsciLexerRuby)(h)) +// UnsafeNewQsciLexerRuby constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerRuby(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerRuby { + if h == nil { + return nil + } + + return &QsciLexerRuby{h: (*C.QsciLexerRuby)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerRuby constructs a new QsciLexerRuby object. func NewQsciLexerRuby() *QsciLexerRuby { - ret := C.QsciLexerRuby_new() - return newQsciLexerRuby(ret) + var outptr_QsciLexerRuby *C.QsciLexerRuby = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerRuby_new(&outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerRuby2 constructs a new QsciLexerRuby object. func NewQsciLexerRuby2(parent *qt6.QObject) *QsciLexerRuby { - ret := C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerRuby(ret) + var outptr_QsciLexerRuby *C.QsciLexerRuby = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerRuby) MetaObject() *qt6.QMetaObject { @@ -234,9 +256,894 @@ func (this *QsciLexerRuby) BlockStartKeyword1(style *int) string { return C.GoString(_ret) } +func (this *QsciLexerRuby) callVirtualBase_Language() string { + + _ret := C.QsciLexerRuby_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnLanguage(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Language +func miqt_exec_callback_QsciLexerRuby_Language(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerRuby_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnLexer(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Lexer +func miqt_exec_callback_QsciLexerRuby_Lexer(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerRuby_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnLexerId(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_LexerId +func miqt_exec_callback_QsciLexerRuby_LexerId(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerRuby_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_AutoCompletionFillups +func miqt_exec_callback_QsciLexerRuby_AutoCompletionFillups(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerRuby_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerRuby) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerRuby_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerRuby_AutoCompletionWordSeparators(self *C.QsciLexerRuby, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerRuby_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerRuby_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockEnd +func miqt_exec_callback_QsciLexerRuby_BlockEnd(self *C.QsciLexerRuby, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerRuby_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockLookback +func miqt_exec_callback_QsciLexerRuby_BlockLookback(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerRuby_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerRuby_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockStart +func miqt_exec_callback_QsciLexerRuby_BlockStart(self *C.QsciLexerRuby, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerRuby_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerRuby_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BlockStartKeyword +func miqt_exec_callback_QsciLexerRuby_BlockStartKeyword(self *C.QsciLexerRuby, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerRuby_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_BraceStyle +func miqt_exec_callback_QsciLexerRuby_BraceStyle(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerRuby_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerRuby_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_CaseSensitive +func miqt_exec_callback_QsciLexerRuby_CaseSensitive(self *C.QsciLexerRuby, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerRuby_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerRuby_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Color +func miqt_exec_callback_QsciLexerRuby_Color(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerRuby_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerRuby) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerRuby_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_EolFill +func miqt_exec_callback_QsciLexerRuby_EolFill(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerRuby_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerRuby_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Font +func miqt_exec_callback_QsciLexerRuby_Font(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerRuby_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_IndentationGuideView +func miqt_exec_callback_QsciLexerRuby_IndentationGuideView(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerRuby_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerRuby_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Keywords +func miqt_exec_callback_QsciLexerRuby_Keywords(self *C.QsciLexerRuby, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerRuby_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultStyle +func miqt_exec_callback_QsciLexerRuby_DefaultStyle(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerRuby_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerRuby) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerRuby_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Description +func miqt_exec_callback_QsciLexerRuby_Description(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerRuby) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerRuby_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerRuby_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_Paper +func miqt_exec_callback_QsciLexerRuby_Paper(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerRuby_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerRuby_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerRuby_DefaultColorWithStyle(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerRuby_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerRuby) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerRuby_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultEolFill +func miqt_exec_callback_QsciLexerRuby_DefaultEolFill(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerRuby_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerRuby_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerRuby_DefaultFontWithStyle(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerRuby_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerRuby) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerRuby_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerRuby_DefaultPaperWithStyle(self *C.QsciLexerRuby, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerRuby_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerRuby) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerRuby_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetEditor +func miqt_exec_callback_QsciLexerRuby_SetEditor(self *C.QsciLexerRuby, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerRuby) callVirtualBase_RefreshProperties() { + + C.QsciLexerRuby_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerRuby) OnRefreshProperties(slot func(super func())) { + C.QsciLexerRuby_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_RefreshProperties +func miqt_exec_callback_QsciLexerRuby_RefreshProperties(self *C.QsciLexerRuby, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerRuby) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerRuby_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerRuby) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerRuby_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_StyleBitsNeeded +func miqt_exec_callback_QsciLexerRuby_StyleBitsNeeded(self *C.QsciLexerRuby, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerRuby_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerRuby) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerRuby_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_WordCharacters +func miqt_exec_callback_QsciLexerRuby_WordCharacters(self *C.QsciLexerRuby, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerRuby) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerRuby_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerRuby) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerRuby_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerRuby_SetAutoIndentStyle(self *C.QsciLexerRuby, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerRuby_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerRuby_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetColor +func miqt_exec_callback_QsciLexerRuby_SetColor(self *C.QsciLexerRuby, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerRuby_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerRuby_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetEolFill +func miqt_exec_callback_QsciLexerRuby_SetEolFill(self *C.QsciLexerRuby, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerRuby_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerRuby_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetFont +func miqt_exec_callback_QsciLexerRuby_SetFont(self *C.QsciLexerRuby, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerRuby_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerRuby) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerRuby_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_SetPaper +func miqt_exec_callback_QsciLexerRuby_SetPaper(self *C.QsciLexerRuby, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerRuby) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerRuby_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerRuby) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerRuby_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_ReadProperties +func miqt_exec_callback_QsciLexerRuby_ReadProperties(self *C.QsciLexerRuby, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerRuby) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerRuby_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerRuby) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerRuby_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerRuby_WriteProperties +func miqt_exec_callback_QsciLexerRuby_WriteProperties(self *C.QsciLexerRuby, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerRuby) Delete() { - C.QsciLexerRuby_Delete(this.h) + C.QsciLexerRuby_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h index 1e3d3ab6..e23cb618 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerRuby; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerRuby QsciLexerRuby; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerRuby* QsciLexerRuby_new(); -QsciLexerRuby* QsciLexerRuby_new2(QObject* parent); +void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self); void* QsciLexerRuby_Metacast(QsciLexerRuby* self, const char* param1); struct miqt_string QsciLexerRuby_Tr(const char* s); @@ -55,7 +61,75 @@ struct miqt_string QsciLexerRuby_Tr3(const char* s, const char* c, int n); const char* QsciLexerRuby_BlockEnd1(const QsciLexerRuby* self, int* style); const char* QsciLexerRuby_BlockStart1(const QsciLexerRuby* self, int* style); const char* QsciLexerRuby_BlockStartKeyword1(const QsciLexerRuby* self, int* style); -void QsciLexerRuby_Delete(QsciLexerRuby* self); +void QsciLexerRuby_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_Language(const void* self); +void QsciLexerRuby_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_Lexer(const void* self); +void QsciLexerRuby_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_LexerId(const void* self); +void QsciLexerRuby_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerRuby_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerRuby_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerRuby_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerRuby_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_BlockLookback(const void* self); +void QsciLexerRuby_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerRuby_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerRuby_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_BraceStyle(const void* self); +void QsciLexerRuby_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_CaseSensitive(const void* self); +void QsciLexerRuby_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_Color(const void* self, int style); +void QsciLexerRuby_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_EolFill(const void* self, int style); +void QsciLexerRuby_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerRuby_virtualbase_Font(const void* self, int style); +void QsciLexerRuby_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_IndentationGuideView(const void* self); +void QsciLexerRuby_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_Keywords(const void* self, int set); +void QsciLexerRuby_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_DefaultStyle(const void* self); +void QsciLexerRuby_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerRuby_virtualbase_Description(const void* self, int style); +void QsciLexerRuby_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_Paper(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerRuby_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerRuby_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerRuby_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerRuby_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerRuby_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_RefreshProperties(void* self); +void QsciLexerRuby_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerRuby_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerRuby_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerRuby_virtualbase_WordCharacters(const void* self); +void QsciLexerRuby_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerRuby_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerRuby_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerRuby_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerRuby_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerRuby_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerRuby_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerRuby_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerRuby_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerRuby_Delete(QsciLexerRuby* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp index 1ddb2147..3b4d5004 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerspice.h" #include "_cgo_export.h" -QsciLexerSpice* QsciLexerSpice_new() { - return new QsciLexerSpice(); +class MiqtVirtualQsciLexerSpice : public virtual QsciLexerSpice { +public: + + MiqtVirtualQsciLexerSpice(): QsciLexerSpice() {}; + MiqtVirtualQsciLexerSpice(QObject* parent): QsciLexerSpice(parent) {}; + + virtual ~MiqtVirtualQsciLexerSpice() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerSpice::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerSpice::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerSpice::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerSpice::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerSpice::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerSpice::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerSpice::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerSpice_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerSpice::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerSpice::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerSpice::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerSpice::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerSpice::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerSpice::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerSpice::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerSpice::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerSpice::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerSpice::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerSpice::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerSpice::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerSpice::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerSpice::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerSpice::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerSpice::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerSpice::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerSpice::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSpice_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerSpice::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerSpice::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerSpice::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerSpice::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerSpice::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerSpice::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerSpice::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerSpice_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerSpice::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerSpice::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerSpice::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerSpice::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerSpice::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerSpice::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerSpice::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerSpice::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerSpice::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSpice_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerSpice::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerSpice::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerSpice_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerSpice::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerSpice::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerSpice_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerSpice::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerSpice::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSpice_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerSpice::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerSpice::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSpice_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerSpice::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerSpice::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerSpice_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerSpice::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerSpice::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerSpice::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerSpice::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerSpice::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerSpice::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerSpice::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerSpice::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSpice_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerSpice::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerSpice::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSpice::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerSpice::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSpice_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSpice::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(); + *outptr_QsciLexerSpice = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerSpice* QsciLexerSpice_new2(QObject* parent) { - return new QsciLexerSpice(parent); +void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(parent); + *outptr_QsciLexerSpice = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self) { @@ -93,7 +929,275 @@ struct miqt_string QsciLexerSpice_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerSpice_Delete(QsciLexerSpice* self) { - delete self; +void QsciLexerSpice_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Language = slot; +} + +void QsciLexerSpice_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerSpice_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerSpice_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__LexerId = slot; +} + +int QsciLexerSpice_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerSpice_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerSpice_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerSpice_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerSpice_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerSpice_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerSpice_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerSpice_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerSpice_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerSpice_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerSpice_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerSpice_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerSpice_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerSpice_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerSpice_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerSpice_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerSpice_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerSpice_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerSpice_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Color(style); +} + +void QsciLexerSpice_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerSpice_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerSpice_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerSpice_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Font(style); +} + +void QsciLexerSpice_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerSpice_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerSpice_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerSpice_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerSpice_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerSpice_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerSpice_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Description = slot; +} + +void QsciLexerSpice_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerSpice_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerSpice_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerSpice_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerSpice_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerSpice_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerSpice_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerSpice_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerSpice_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerSpice_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerSpice_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerSpice_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerSpice_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerSpice_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerSpice_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerSpice_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerSpice_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerSpice_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerSpice_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerSpice_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerSpice_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetColor = slot; +} + +void QsciLexerSpice_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerSpice_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerSpice_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerSpice_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetFont = slot; +} + +void QsciLexerSpice_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerSpice_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerSpice_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerSpice_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerSpice_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerSpice_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSpice*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerSpice_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerSpice*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerSpice_Delete(QsciLexerSpice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go index 47030cee..3bd46823 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QsciLexerSpice struct { - h *C.QsciLexerSpice + h *C.QsciLexerSpice + isSubclass bool *QsciLexer } @@ -47,27 +49,47 @@ func (this *QsciLexerSpice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerSpice(h *C.QsciLexerSpice) *QsciLexerSpice { +// newQsciLexerSpice constructs the type using only CGO pointers. +func newQsciLexerSpice(h *C.QsciLexerSpice, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSpice { if h == nil { return nil } - return &QsciLexerSpice{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerSpice{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerSpice(h unsafe.Pointer) *QsciLexerSpice { - return newQsciLexerSpice((*C.QsciLexerSpice)(h)) +// UnsafeNewQsciLexerSpice constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerSpice(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSpice { + if h == nil { + return nil + } + + return &QsciLexerSpice{h: (*C.QsciLexerSpice)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerSpice constructs a new QsciLexerSpice object. func NewQsciLexerSpice() *QsciLexerSpice { - ret := C.QsciLexerSpice_new() - return newQsciLexerSpice(ret) + var outptr_QsciLexerSpice *C.QsciLexerSpice = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSpice_new(&outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerSpice2 constructs a new QsciLexerSpice object. func NewQsciLexerSpice2(parent *qt6.QObject) *QsciLexerSpice { - ret := C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerSpice(ret) + var outptr_QsciLexerSpice *C.QsciLexerSpice = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerSpice) MetaObject() *qt6.QMetaObject { @@ -151,9 +173,894 @@ func QsciLexerSpice_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerSpice) callVirtualBase_Language() string { + + _ret := C.QsciLexerSpice_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnLanguage(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Language +func miqt_exec_callback_QsciLexerSpice_Language(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerSpice_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnLexer(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Lexer +func miqt_exec_callback_QsciLexerSpice_Lexer(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerSpice_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnLexerId(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_LexerId +func miqt_exec_callback_QsciLexerSpice_LexerId(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerSpice_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_AutoCompletionFillups +func miqt_exec_callback_QsciLexerSpice_AutoCompletionFillups(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerSpice_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerSpice) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerSpice_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerSpice_AutoCompletionWordSeparators(self *C.QsciLexerSpice, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerSpice_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSpice_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockEnd +func miqt_exec_callback_QsciLexerSpice_BlockEnd(self *C.QsciLexerSpice, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerSpice_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockLookback +func miqt_exec_callback_QsciLexerSpice_BlockLookback(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerSpice_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSpice_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockStart +func miqt_exec_callback_QsciLexerSpice_BlockStart(self *C.QsciLexerSpice, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerSpice_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSpice_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BlockStartKeyword +func miqt_exec_callback_QsciLexerSpice_BlockStartKeyword(self *C.QsciLexerSpice, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerSpice_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_BraceStyle +func miqt_exec_callback_QsciLexerSpice_BraceStyle(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerSpice_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerSpice_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_CaseSensitive +func miqt_exec_callback_QsciLexerSpice_CaseSensitive(self *C.QsciLexerSpice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerSpice_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSpice_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Color +func miqt_exec_callback_QsciLexerSpice_Color(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerSpice_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSpice) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSpice_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_EolFill +func miqt_exec_callback_QsciLexerSpice_EolFill(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerSpice_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerSpice_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Font +func miqt_exec_callback_QsciLexerSpice_Font(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerSpice_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_IndentationGuideView +func miqt_exec_callback_QsciLexerSpice_IndentationGuideView(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerSpice_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerSpice_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Keywords +func miqt_exec_callback_QsciLexerSpice_Keywords(self *C.QsciLexerSpice, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerSpice_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultStyle +func miqt_exec_callback_QsciLexerSpice_DefaultStyle(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerSpice_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerSpice) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerSpice_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Description +func miqt_exec_callback_QsciLexerSpice_Description(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerSpice) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerSpice_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSpice_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_Paper +func miqt_exec_callback_QsciLexerSpice_Paper(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerSpice_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSpice_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerSpice_DefaultColorWithStyle(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerSpice_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSpice) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSpice_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultEolFill +func miqt_exec_callback_QsciLexerSpice_DefaultEolFill(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerSpice_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerSpice_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerSpice_DefaultFontWithStyle(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerSpice_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSpice) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSpice_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerSpice_DefaultPaperWithStyle(self *C.QsciLexerSpice, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerSpice_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerSpice) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerSpice_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetEditor +func miqt_exec_callback_QsciLexerSpice_SetEditor(self *C.QsciLexerSpice, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerSpice) callVirtualBase_RefreshProperties() { + + C.QsciLexerSpice_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerSpice) OnRefreshProperties(slot func(super func())) { + C.QsciLexerSpice_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_RefreshProperties +func miqt_exec_callback_QsciLexerSpice_RefreshProperties(self *C.QsciLexerSpice, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerSpice) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerSpice_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSpice) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerSpice_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_StyleBitsNeeded +func miqt_exec_callback_QsciLexerSpice_StyleBitsNeeded(self *C.QsciLexerSpice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerSpice_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSpice) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerSpice_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_WordCharacters +func miqt_exec_callback_QsciLexerSpice_WordCharacters(self *C.QsciLexerSpice, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSpice) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerSpice_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerSpice) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerSpice_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerSpice_SetAutoIndentStyle(self *C.QsciLexerSpice, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerSpice_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerSpice_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetColor +func miqt_exec_callback_QsciLexerSpice_SetColor(self *C.QsciLexerSpice, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerSpice_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerSpice_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetEolFill +func miqt_exec_callback_QsciLexerSpice_SetEolFill(self *C.QsciLexerSpice, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerSpice_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerSpice_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetFont +func miqt_exec_callback_QsciLexerSpice_SetFont(self *C.QsciLexerSpice, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerSpice_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSpice) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerSpice_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_SetPaper +func miqt_exec_callback_QsciLexerSpice_SetPaper(self *C.QsciLexerSpice, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerSpice) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSpice_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSpice) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerSpice_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_ReadProperties +func miqt_exec_callback_QsciLexerSpice_ReadProperties(self *C.QsciLexerSpice, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSpice) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSpice_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSpice) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerSpice_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSpice_WriteProperties +func miqt_exec_callback_QsciLexerSpice_WriteProperties(self *C.QsciLexerSpice, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerSpice) Delete() { - C.QsciLexerSpice_Delete(this.h) + C.QsciLexerSpice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h index 04c26dfa..a94ae16b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerSpice; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerSpice QsciLexerSpice; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerSpice* QsciLexerSpice_new(); -QsciLexerSpice* QsciLexerSpice_new2(QObject* parent); +void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self); void* QsciLexerSpice_Metacast(QsciLexerSpice* self, const char* param1); struct miqt_string QsciLexerSpice_Tr(const char* s); @@ -42,7 +48,75 @@ QFont* QsciLexerSpice_DefaultFont(const QsciLexerSpice* self, int style); struct miqt_string QsciLexerSpice_Description(const QsciLexerSpice* self, int style); struct miqt_string QsciLexerSpice_Tr2(const char* s, const char* c); struct miqt_string QsciLexerSpice_Tr3(const char* s, const char* c, int n); -void QsciLexerSpice_Delete(QsciLexerSpice* self); +void QsciLexerSpice_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_Language(const void* self); +void QsciLexerSpice_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_Lexer(const void* self); +void QsciLexerSpice_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_LexerId(const void* self); +void QsciLexerSpice_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerSpice_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerSpice_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerSpice_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerSpice_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_BlockLookback(const void* self); +void QsciLexerSpice_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerSpice_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerSpice_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_BraceStyle(const void* self); +void QsciLexerSpice_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_CaseSensitive(const void* self); +void QsciLexerSpice_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_Color(const void* self, int style); +void QsciLexerSpice_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_EolFill(const void* self, int style); +void QsciLexerSpice_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerSpice_virtualbase_Font(const void* self, int style); +void QsciLexerSpice_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_IndentationGuideView(const void* self); +void QsciLexerSpice_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_Keywords(const void* self, int set); +void QsciLexerSpice_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_DefaultStyle(const void* self); +void QsciLexerSpice_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerSpice_virtualbase_Description(const void* self, int style); +void QsciLexerSpice_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_Paper(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerSpice_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerSpice_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSpice_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerSpice_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerSpice_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_RefreshProperties(void* self); +void QsciLexerSpice_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerSpice_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerSpice_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerSpice_virtualbase_WordCharacters(const void* self); +void QsciLexerSpice_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerSpice_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerSpice_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerSpice_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerSpice_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerSpice_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerSpice_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSpice_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerSpice_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSpice_Delete(QsciLexerSpice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp index 687405ad..49c52cb0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,918 @@ #include "gen_qscilexersql.h" #include "_cgo_export.h" -QsciLexerSQL* QsciLexerSQL_new() { - return new QsciLexerSQL(); +class MiqtVirtualQsciLexerSQL : public virtual QsciLexerSQL { +public: + + MiqtVirtualQsciLexerSQL(): QsciLexerSQL() {}; + MiqtVirtualQsciLexerSQL(QObject* parent): QsciLexerSQL(parent) {}; + + virtual ~MiqtVirtualQsciLexerSQL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBackslashEscapes = 0; + + // Subclass to allow providing a Go implementation + virtual void setBackslashEscapes(bool enable) override { + if (handle__SetBackslashEscapes == 0) { + QsciLexerSQL::setBackslashEscapes(enable); + return; + } + + bool sigval1 = enable; + + miqt_exec_callback_QsciLexerSQL_SetBackslashEscapes(this, handle__SetBackslashEscapes, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBackslashEscapes(bool enable) { + + QsciLexerSQL::setBackslashEscapes(enable); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerSQL::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerSQL_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerSQL::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerSQL::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerSQL_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerSQL::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerSQL::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerSQL::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerSQL::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerSQL::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerSQL::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerSQL::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerSQL::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerSQL_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerSQL::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerSQL::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerSQL::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerSQL::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerSQL::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerSQL::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerSQL::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerSQL::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerSQL::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerSQL::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerSQL::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerSQL::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerSQL::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerSQL::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerSQL::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerSQL::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerSQL::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerSQL::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSQL_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerSQL::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerSQL::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerSQL::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerSQL::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerSQL::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerSQL::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerSQL::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerSQL_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerSQL::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerSQL::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerSQL::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerSQL::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerSQL::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerSQL::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerSQL::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerSQL::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerSQL::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerSQL_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerSQL::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerSQL::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerSQL_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerSQL::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerSQL::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerSQL_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerSQL::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerSQL::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerSQL_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerSQL::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerSQL::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerSQL_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerSQL::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerSQL::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerSQL_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerSQL::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerSQL::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerSQL::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerSQL::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerSQL::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerSQL::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerSQL::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerSQL::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerSQL_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerSQL::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerSQL::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSQL::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerSQL::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerSQL_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerSQL::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(); + *outptr_QsciLexerSQL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerSQL* QsciLexerSQL_new2(QObject* parent) { - return new QsciLexerSQL(parent); +void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(parent); + *outptr_QsciLexerSQL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self) { @@ -169,7 +1077,299 @@ struct miqt_string QsciLexerSQL_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerSQL_Delete(QsciLexerSQL* self) { - delete self; +void QsciLexerSQL_override_virtual_SetBackslashEscapes(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetBackslashEscapes = slot; +} + +void QsciLexerSQL_virtualbase_SetBackslashEscapes(void* self, bool enable) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetBackslashEscapes(enable); +} + +void QsciLexerSQL_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerSQL_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerSQL_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerSQL_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerSQL_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Language = slot; +} + +void QsciLexerSQL_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerSQL_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerSQL_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__LexerId = slot; +} + +int QsciLexerSQL_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerSQL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerSQL_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerSQL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerSQL_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerSQL_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerSQL_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerSQL_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerSQL_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerSQL_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerSQL_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerSQL_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerSQL_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerSQL_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerSQL_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerSQL_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerSQL_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerSQL_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerSQL_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Color(style); +} + +void QsciLexerSQL_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerSQL_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerSQL_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerSQL_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Font(style); +} + +void QsciLexerSQL_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerSQL_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerSQL_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerSQL_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerSQL_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerSQL_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerSQL_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Description = slot; +} + +void QsciLexerSQL_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerSQL_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerSQL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerSQL_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerSQL_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerSQL_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerSQL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerSQL_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerSQL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerSQL_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerSQL_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerSQL_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerSQL_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerSQL_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerSQL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerSQL_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerSQL_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerSQL_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerSQL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerSQL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerSQL_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetColor = slot; +} + +void QsciLexerSQL_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerSQL_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerSQL_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerSQL_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetFont = slot; +} + +void QsciLexerSQL_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerSQL_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerSQL_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerSQL_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerSQL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerSQL_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerSQL*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerSQL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerSQL*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerSQL_Delete(QsciLexerSQL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.go b/qt-restricted-extras/qscintilla6/gen_qscilexersql.go index 0d955dbf..53c4429a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -42,7 +43,8 @@ const ( ) type QsciLexerSQL struct { - h *C.QsciLexerSQL + h *C.QsciLexerSQL + isSubclass bool *QsciLexer } @@ -60,27 +62,47 @@ func (this *QsciLexerSQL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerSQL(h *C.QsciLexerSQL) *QsciLexerSQL { +// newQsciLexerSQL constructs the type using only CGO pointers. +func newQsciLexerSQL(h *C.QsciLexerSQL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSQL { if h == nil { return nil } - return &QsciLexerSQL{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerSQL{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerSQL(h unsafe.Pointer) *QsciLexerSQL { - return newQsciLexerSQL((*C.QsciLexerSQL)(h)) +// UnsafeNewQsciLexerSQL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerSQL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSQL { + if h == nil { + return nil + } + + return &QsciLexerSQL{h: (*C.QsciLexerSQL)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerSQL constructs a new QsciLexerSQL object. func NewQsciLexerSQL() *QsciLexerSQL { - ret := C.QsciLexerSQL_new() - return newQsciLexerSQL(ret) + var outptr_QsciLexerSQL *C.QsciLexerSQL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSQL_new(&outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerSQL2 constructs a new QsciLexerSQL object. func NewQsciLexerSQL2(parent *qt6.QObject) *QsciLexerSQL { - ret := C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerSQL(ret) + var outptr_QsciLexerSQL *C.QsciLexerSQL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerSQL) MetaObject() *qt6.QMetaObject { @@ -243,9 +265,963 @@ func QsciLexerSQL_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerSQL) callVirtualBase_SetBackslashEscapes(enable bool) { + + C.QsciLexerSQL_virtualbase_SetBackslashEscapes(unsafe.Pointer(this.h), (C.bool)(enable)) + +} +func (this *QsciLexerSQL) OnSetBackslashEscapes(slot func(super func(enable bool), enable bool)) { + C.QsciLexerSQL_override_virtual_SetBackslashEscapes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetBackslashEscapes +func miqt_exec_callback_QsciLexerSQL_SetBackslashEscapes(self *C.QsciLexerSQL, cb C.intptr_t, enable C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(enable bool), enable bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(enable) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetBackslashEscapes, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerSQL_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerSQL) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerSQL_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetFoldComments +func miqt_exec_callback_QsciLexerSQL_SetFoldComments(self *C.QsciLexerSQL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerSQL_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerSQL) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerSQL_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetFoldCompact +func miqt_exec_callback_QsciLexerSQL_SetFoldCompact(self *C.QsciLexerSQL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_Language() string { + + _ret := C.QsciLexerSQL_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnLanguage(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Language +func miqt_exec_callback_QsciLexerSQL_Language(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerSQL_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnLexer(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Lexer +func miqt_exec_callback_QsciLexerSQL_Lexer(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerSQL_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnLexerId(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_LexerId +func miqt_exec_callback_QsciLexerSQL_LexerId(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerSQL_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_AutoCompletionFillups +func miqt_exec_callback_QsciLexerSQL_AutoCompletionFillups(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerSQL_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerSQL) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerSQL_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerSQL_AutoCompletionWordSeparators(self *C.QsciLexerSQL, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerSQL_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSQL_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockEnd +func miqt_exec_callback_QsciLexerSQL_BlockEnd(self *C.QsciLexerSQL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerSQL_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockLookback +func miqt_exec_callback_QsciLexerSQL_BlockLookback(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerSQL_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSQL_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockStart +func miqt_exec_callback_QsciLexerSQL_BlockStart(self *C.QsciLexerSQL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerSQL_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerSQL_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BlockStartKeyword +func miqt_exec_callback_QsciLexerSQL_BlockStartKeyword(self *C.QsciLexerSQL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerSQL_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_BraceStyle +func miqt_exec_callback_QsciLexerSQL_BraceStyle(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerSQL_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerSQL_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_CaseSensitive +func miqt_exec_callback_QsciLexerSQL_CaseSensitive(self *C.QsciLexerSQL, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerSQL_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSQL_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Color +func miqt_exec_callback_QsciLexerSQL_Color(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerSQL_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSQL) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSQL_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_EolFill +func miqt_exec_callback_QsciLexerSQL_EolFill(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerSQL_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerSQL_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Font +func miqt_exec_callback_QsciLexerSQL_Font(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerSQL_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_IndentationGuideView +func miqt_exec_callback_QsciLexerSQL_IndentationGuideView(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerSQL_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerSQL_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Keywords +func miqt_exec_callback_QsciLexerSQL_Keywords(self *C.QsciLexerSQL, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerSQL_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultStyle +func miqt_exec_callback_QsciLexerSQL_DefaultStyle(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerSQL_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerSQL) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerSQL_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Description +func miqt_exec_callback_QsciLexerSQL_Description(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerSQL) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerSQL_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSQL_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_Paper +func miqt_exec_callback_QsciLexerSQL_Paper(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerSQL_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSQL_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerSQL_DefaultColorWithStyle(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerSQL_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerSQL) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerSQL_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultEolFill +func miqt_exec_callback_QsciLexerSQL_DefaultEolFill(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerSQL_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerSQL_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerSQL_DefaultFontWithStyle(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerSQL_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerSQL) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerSQL_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerSQL_DefaultPaperWithStyle(self *C.QsciLexerSQL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerSQL_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerSQL) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerSQL_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetEditor +func miqt_exec_callback_QsciLexerSQL_SetEditor(self *C.QsciLexerSQL, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_RefreshProperties() { + + C.QsciLexerSQL_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerSQL) OnRefreshProperties(slot func(super func())) { + C.QsciLexerSQL_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_RefreshProperties +func miqt_exec_callback_QsciLexerSQL_RefreshProperties(self *C.QsciLexerSQL, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerSQL) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerSQL_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerSQL) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerSQL_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_StyleBitsNeeded +func miqt_exec_callback_QsciLexerSQL_StyleBitsNeeded(self *C.QsciLexerSQL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerSQL_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerSQL) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerSQL_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_WordCharacters +func miqt_exec_callback_QsciLexerSQL_WordCharacters(self *C.QsciLexerSQL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerSQL) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerSQL_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerSQL) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerSQL_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerSQL_SetAutoIndentStyle(self *C.QsciLexerSQL, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerSQL_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerSQL_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetColor +func miqt_exec_callback_QsciLexerSQL_SetColor(self *C.QsciLexerSQL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerSQL_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerSQL_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetEolFill +func miqt_exec_callback_QsciLexerSQL_SetEolFill(self *C.QsciLexerSQL, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerSQL_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerSQL_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetFont +func miqt_exec_callback_QsciLexerSQL_SetFont(self *C.QsciLexerSQL, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerSQL_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerSQL) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerSQL_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_SetPaper +func miqt_exec_callback_QsciLexerSQL_SetPaper(self *C.QsciLexerSQL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerSQL) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSQL_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSQL) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerSQL_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_ReadProperties +func miqt_exec_callback_QsciLexerSQL_ReadProperties(self *C.QsciLexerSQL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerSQL) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerSQL_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerSQL) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerSQL_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerSQL_WriteProperties +func miqt_exec_callback_QsciLexerSQL_WriteProperties(self *C.QsciLexerSQL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerSQL) Delete() { - C.QsciLexerSQL_Delete(this.h) + C.QsciLexerSQL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.h b/qt-restricted-extras/qscintilla6/gen_qscilexersql.h index 5a5721c1..590abc03 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerSQL; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerSQL QsciLexerSQL; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerSQL* QsciLexerSQL_new(); -QsciLexerSQL* QsciLexerSQL_new2(QObject* parent); +void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self); void* QsciLexerSQL_Metacast(QsciLexerSQL* self, const char* param1); struct miqt_string QsciLexerSQL_Tr(const char* s); @@ -61,7 +67,81 @@ void QsciLexerSQL_SetFoldComments(QsciLexerSQL* self, bool fold); void QsciLexerSQL_SetFoldCompact(QsciLexerSQL* self, bool fold); struct miqt_string QsciLexerSQL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerSQL_Tr3(const char* s, const char* c, int n); -void QsciLexerSQL_Delete(QsciLexerSQL* self); +void QsciLexerSQL_override_virtual_SetBackslashEscapes(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetBackslashEscapes(void* self, bool enable); +void QsciLexerSQL_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerSQL_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerSQL_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_Language(const void* self); +void QsciLexerSQL_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_Lexer(const void* self); +void QsciLexerSQL_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_LexerId(const void* self); +void QsciLexerSQL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerSQL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerSQL_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerSQL_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerSQL_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_BlockLookback(const void* self); +void QsciLexerSQL_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerSQL_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerSQL_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_BraceStyle(const void* self); +void QsciLexerSQL_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_CaseSensitive(const void* self); +void QsciLexerSQL_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_Color(const void* self, int style); +void QsciLexerSQL_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_EolFill(const void* self, int style); +void QsciLexerSQL_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerSQL_virtualbase_Font(const void* self, int style); +void QsciLexerSQL_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_IndentationGuideView(const void* self); +void QsciLexerSQL_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_Keywords(const void* self, int set); +void QsciLexerSQL_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_DefaultStyle(const void* self); +void QsciLexerSQL_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerSQL_virtualbase_Description(const void* self, int style); +void QsciLexerSQL_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_Paper(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerSQL_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerSQL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerSQL_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerSQL_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerSQL_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_RefreshProperties(void* self); +void QsciLexerSQL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerSQL_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerSQL_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerSQL_virtualbase_WordCharacters(const void* self); +void QsciLexerSQL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerSQL_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerSQL_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerSQL_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerSQL_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerSQL_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerSQL_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSQL_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerSQL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerSQL_Delete(QsciLexerSQL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp index ef1a124b..20cee6aa 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexertcl.h" #include "_cgo_export.h" -QsciLexerTCL* QsciLexerTCL_new() { - return new QsciLexerTCL(); +class MiqtVirtualQsciLexerTCL : public virtual QsciLexerTCL { +public: + + MiqtVirtualQsciLexerTCL(): QsciLexerTCL() {}; + MiqtVirtualQsciLexerTCL(QObject* parent): QsciLexerTCL(parent) {}; + + virtual ~MiqtVirtualQsciLexerTCL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerTCL::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerTCL::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerTCL::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerTCL::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerTCL::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerTCL::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerTCL::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerTCL_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerTCL::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerTCL::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerTCL::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerTCL::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerTCL::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerTCL::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerTCL::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerTCL::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerTCL::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerTCL::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerTCL::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerTCL::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerTCL::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerTCL::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerTCL::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerTCL::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerTCL::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerTCL::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTCL_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerTCL::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerTCL::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerTCL::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerTCL::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerTCL::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerTCL::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerTCL::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerTCL_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerTCL::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerTCL::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerTCL::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerTCL::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerTCL::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerTCL::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerTCL::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerTCL::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerTCL::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTCL_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerTCL::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerTCL::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerTCL_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerTCL::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerTCL::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerTCL_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerTCL::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerTCL::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTCL_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerTCL::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerTCL::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTCL_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerTCL::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerTCL::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerTCL_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerTCL::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerTCL::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerTCL::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerTCL::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerTCL::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerTCL::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerTCL::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerTCL::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTCL_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerTCL::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerTCL::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTCL::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerTCL::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTCL_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTCL::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(); + *outptr_QsciLexerTCL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerTCL* QsciLexerTCL_new2(QObject* parent) { - return new QsciLexerTCL(parent); +void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(parent); + *outptr_QsciLexerTCL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self) { @@ -113,7 +949,275 @@ struct miqt_string QsciLexerTCL_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerTCL_Delete(QsciLexerTCL* self) { - delete self; +void QsciLexerTCL_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Language = slot; +} + +void QsciLexerTCL_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerTCL_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerTCL_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__LexerId = slot; +} + +int QsciLexerTCL_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerTCL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerTCL_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerTCL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerTCL_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerTCL_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerTCL_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerTCL_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerTCL_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerTCL_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerTCL_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerTCL_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerTCL_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerTCL_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerTCL_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerTCL_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerTCL_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerTCL_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerTCL_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Color(style); +} + +void QsciLexerTCL_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerTCL_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerTCL_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerTCL_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Font(style); +} + +void QsciLexerTCL_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerTCL_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerTCL_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerTCL_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerTCL_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerTCL_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerTCL_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Description = slot; +} + +void QsciLexerTCL_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerTCL_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerTCL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerTCL_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerTCL_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerTCL_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerTCL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerTCL_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerTCL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerTCL_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerTCL_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerTCL_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerTCL_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerTCL_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerTCL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerTCL_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerTCL_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerTCL_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerTCL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerTCL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerTCL_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetColor = slot; +} + +void QsciLexerTCL_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerTCL_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerTCL_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerTCL_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetFont = slot; +} + +void QsciLexerTCL_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerTCL_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerTCL_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerTCL_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerTCL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerTCL_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTCL*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerTCL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerTCL*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerTCL_Delete(QsciLexerTCL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go index f94cec1a..d1e4d08b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -42,7 +43,8 @@ const ( ) type QsciLexerTCL struct { - h *C.QsciLexerTCL + h *C.QsciLexerTCL + isSubclass bool *QsciLexer } @@ -60,27 +62,47 @@ func (this *QsciLexerTCL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerTCL(h *C.QsciLexerTCL) *QsciLexerTCL { +// newQsciLexerTCL constructs the type using only CGO pointers. +func newQsciLexerTCL(h *C.QsciLexerTCL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTCL { if h == nil { return nil } - return &QsciLexerTCL{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerTCL{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerTCL(h unsafe.Pointer) *QsciLexerTCL { - return newQsciLexerTCL((*C.QsciLexerTCL)(h)) +// UnsafeNewQsciLexerTCL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerTCL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTCL { + if h == nil { + return nil + } + + return &QsciLexerTCL{h: (*C.QsciLexerTCL)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerTCL constructs a new QsciLexerTCL object. func NewQsciLexerTCL() *QsciLexerTCL { - ret := C.QsciLexerTCL_new() - return newQsciLexerTCL(ret) + var outptr_QsciLexerTCL *C.QsciLexerTCL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTCL_new(&outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerTCL2 constructs a new QsciLexerTCL object. func NewQsciLexerTCL2(parent *qt6.QObject) *QsciLexerTCL { - ret := C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerTCL(ret) + var outptr_QsciLexerTCL *C.QsciLexerTCL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerTCL) MetaObject() *qt6.QMetaObject { @@ -187,9 +209,894 @@ func QsciLexerTCL_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerTCL) callVirtualBase_Language() string { + + _ret := C.QsciLexerTCL_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnLanguage(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Language +func miqt_exec_callback_QsciLexerTCL_Language(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerTCL_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnLexer(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Lexer +func miqt_exec_callback_QsciLexerTCL_Lexer(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerTCL_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnLexerId(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_LexerId +func miqt_exec_callback_QsciLexerTCL_LexerId(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerTCL_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_AutoCompletionFillups +func miqt_exec_callback_QsciLexerTCL_AutoCompletionFillups(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerTCL_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerTCL) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerTCL_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerTCL_AutoCompletionWordSeparators(self *C.QsciLexerTCL, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerTCL_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTCL_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockEnd +func miqt_exec_callback_QsciLexerTCL_BlockEnd(self *C.QsciLexerTCL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerTCL_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockLookback +func miqt_exec_callback_QsciLexerTCL_BlockLookback(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerTCL_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTCL_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockStart +func miqt_exec_callback_QsciLexerTCL_BlockStart(self *C.QsciLexerTCL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerTCL_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTCL_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BlockStartKeyword +func miqt_exec_callback_QsciLexerTCL_BlockStartKeyword(self *C.QsciLexerTCL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerTCL_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_BraceStyle +func miqt_exec_callback_QsciLexerTCL_BraceStyle(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerTCL_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerTCL_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_CaseSensitive +func miqt_exec_callback_QsciLexerTCL_CaseSensitive(self *C.QsciLexerTCL, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerTCL_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTCL_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Color +func miqt_exec_callback_QsciLexerTCL_Color(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerTCL_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTCL) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTCL_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_EolFill +func miqt_exec_callback_QsciLexerTCL_EolFill(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerTCL_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerTCL_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Font +func miqt_exec_callback_QsciLexerTCL_Font(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerTCL_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_IndentationGuideView +func miqt_exec_callback_QsciLexerTCL_IndentationGuideView(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerTCL_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerTCL_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Keywords +func miqt_exec_callback_QsciLexerTCL_Keywords(self *C.QsciLexerTCL, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerTCL_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultStyle +func miqt_exec_callback_QsciLexerTCL_DefaultStyle(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerTCL_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerTCL) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerTCL_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Description +func miqt_exec_callback_QsciLexerTCL_Description(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerTCL) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerTCL_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTCL_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_Paper +func miqt_exec_callback_QsciLexerTCL_Paper(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerTCL_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTCL_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerTCL_DefaultColorWithStyle(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerTCL_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTCL) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTCL_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultEolFill +func miqt_exec_callback_QsciLexerTCL_DefaultEolFill(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerTCL_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerTCL_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerTCL_DefaultFontWithStyle(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerTCL_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTCL) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTCL_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerTCL_DefaultPaperWithStyle(self *C.QsciLexerTCL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerTCL_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerTCL) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerTCL_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetEditor +func miqt_exec_callback_QsciLexerTCL_SetEditor(self *C.QsciLexerTCL, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerTCL) callVirtualBase_RefreshProperties() { + + C.QsciLexerTCL_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerTCL) OnRefreshProperties(slot func(super func())) { + C.QsciLexerTCL_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_RefreshProperties +func miqt_exec_callback_QsciLexerTCL_RefreshProperties(self *C.QsciLexerTCL, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerTCL) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerTCL_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTCL) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerTCL_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_StyleBitsNeeded +func miqt_exec_callback_QsciLexerTCL_StyleBitsNeeded(self *C.QsciLexerTCL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerTCL_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTCL) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerTCL_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_WordCharacters +func miqt_exec_callback_QsciLexerTCL_WordCharacters(self *C.QsciLexerTCL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTCL) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerTCL_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerTCL) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerTCL_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerTCL_SetAutoIndentStyle(self *C.QsciLexerTCL, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerTCL_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerTCL_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetColor +func miqt_exec_callback_QsciLexerTCL_SetColor(self *C.QsciLexerTCL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerTCL_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerTCL_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetEolFill +func miqt_exec_callback_QsciLexerTCL_SetEolFill(self *C.QsciLexerTCL, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerTCL_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerTCL_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetFont +func miqt_exec_callback_QsciLexerTCL_SetFont(self *C.QsciLexerTCL, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerTCL_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTCL) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerTCL_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_SetPaper +func miqt_exec_callback_QsciLexerTCL_SetPaper(self *C.QsciLexerTCL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerTCL) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTCL_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTCL) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerTCL_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_ReadProperties +func miqt_exec_callback_QsciLexerTCL_ReadProperties(self *C.QsciLexerTCL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTCL) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTCL_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTCL) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerTCL_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTCL_WriteProperties +func miqt_exec_callback_QsciLexerTCL_WriteProperties(self *C.QsciLexerTCL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerTCL) Delete() { - C.QsciLexerTCL_Delete(this.h) + C.QsciLexerTCL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h index 2f583f99..c2f28945 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerTCL; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerTCL QsciLexerTCL; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerTCL* QsciLexerTCL_new(); -QsciLexerTCL* QsciLexerTCL_new2(QObject* parent); +void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self); void* QsciLexerTCL_Metacast(QsciLexerTCL* self, const char* param1); struct miqt_string QsciLexerTCL_Tr(const char* s); @@ -47,7 +53,75 @@ void QsciLexerTCL_SetFoldComments(QsciLexerTCL* self, bool fold); bool QsciLexerTCL_FoldComments(const QsciLexerTCL* self); struct miqt_string QsciLexerTCL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerTCL_Tr3(const char* s, const char* c, int n); -void QsciLexerTCL_Delete(QsciLexerTCL* self); +void QsciLexerTCL_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_Language(const void* self); +void QsciLexerTCL_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_Lexer(const void* self); +void QsciLexerTCL_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_LexerId(const void* self); +void QsciLexerTCL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerTCL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerTCL_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerTCL_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerTCL_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_BlockLookback(const void* self); +void QsciLexerTCL_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerTCL_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerTCL_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_BraceStyle(const void* self); +void QsciLexerTCL_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_CaseSensitive(const void* self); +void QsciLexerTCL_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_Color(const void* self, int style); +void QsciLexerTCL_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_EolFill(const void* self, int style); +void QsciLexerTCL_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerTCL_virtualbase_Font(const void* self, int style); +void QsciLexerTCL_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_IndentationGuideView(const void* self); +void QsciLexerTCL_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_Keywords(const void* self, int set); +void QsciLexerTCL_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_DefaultStyle(const void* self); +void QsciLexerTCL_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerTCL_virtualbase_Description(const void* self, int style); +void QsciLexerTCL_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_Paper(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerTCL_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerTCL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTCL_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerTCL_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerTCL_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_RefreshProperties(void* self); +void QsciLexerTCL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerTCL_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerTCL_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerTCL_virtualbase_WordCharacters(const void* self); +void QsciLexerTCL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerTCL_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerTCL_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerTCL_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerTCL_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerTCL_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerTCL_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTCL_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerTCL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTCL_Delete(QsciLexerTCL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp index d1a26a9a..29cd27f0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,846 @@ #include "gen_qscilexertex.h" #include "_cgo_export.h" -QsciLexerTeX* QsciLexerTeX_new() { - return new QsciLexerTeX(); +class MiqtVirtualQsciLexerTeX : public virtual QsciLexerTeX { +public: + + MiqtVirtualQsciLexerTeX(): QsciLexerTeX() {}; + MiqtVirtualQsciLexerTeX(QObject* parent): QsciLexerTeX(parent) {}; + + virtual ~MiqtVirtualQsciLexerTeX() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerTeX::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerTeX::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerTeX::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerTeX::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerTeX::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerTeX::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerTeX::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerTeX_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerTeX::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerTeX::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerTeX::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerTeX::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerTeX::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerTeX::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerTeX::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerTeX::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerTeX::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerTeX::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerTeX::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerTeX::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerTeX::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerTeX::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerTeX::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerTeX::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerTeX::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerTeX::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTeX_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerTeX::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerTeX::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerTeX::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerTeX::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerTeX::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerTeX::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerTeX::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerTeX_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerTeX::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerTeX::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerTeX::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerTeX::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerTeX::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerTeX::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerTeX::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerTeX::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerTeX::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerTeX_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerTeX::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerTeX::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerTeX_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerTeX::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerTeX::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerTeX_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerTeX::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerTeX::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerTeX_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerTeX::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerTeX::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerTeX_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerTeX::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerTeX::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerTeX_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerTeX::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerTeX::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerTeX::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerTeX::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerTeX::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerTeX::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerTeX::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerTeX::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerTeX_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerTeX::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerTeX::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTeX::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerTeX::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerTeX_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerTeX::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(); + *outptr_QsciLexerTeX = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerTeX* QsciLexerTeX_new2(QObject* parent) { - return new QsciLexerTeX(parent); +void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(parent); + *outptr_QsciLexerTeX = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self) { @@ -124,7 +961,275 @@ struct miqt_string QsciLexerTeX_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerTeX_Delete(QsciLexerTeX* self) { - delete self; +void QsciLexerTeX_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Language = slot; +} + +void QsciLexerTeX_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerTeX_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerTeX_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__LexerId = slot; +} + +int QsciLexerTeX_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerTeX_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerTeX_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerTeX_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerTeX_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerTeX_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerTeX_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerTeX_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerTeX_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerTeX_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerTeX_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerTeX_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerTeX_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerTeX_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerTeX_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerTeX_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerTeX_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerTeX_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerTeX_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Color(style); +} + +void QsciLexerTeX_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerTeX_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerTeX_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerTeX_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Font(style); +} + +void QsciLexerTeX_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerTeX_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerTeX_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerTeX_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerTeX_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerTeX_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerTeX_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Description = slot; +} + +void QsciLexerTeX_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerTeX_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerTeX_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerTeX_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerTeX_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerTeX_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerTeX_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerTeX_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerTeX_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerTeX_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerTeX_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerTeX_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerTeX_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerTeX_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerTeX_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerTeX_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerTeX_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerTeX_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerTeX_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerTeX_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerTeX_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetColor = slot; +} + +void QsciLexerTeX_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerTeX_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerTeX_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerTeX_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetFont = slot; +} + +void QsciLexerTeX_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerTeX_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerTeX_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerTeX_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerTeX_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerTeX_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerTeX*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerTeX_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerTeX*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerTeX_Delete(QsciLexerTeX* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.go b/qt-restricted-extras/qscintilla6/gen_qscilexertex.go index 1cc8884f..09479030 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -26,7 +27,8 @@ const ( ) type QsciLexerTeX struct { - h *C.QsciLexerTeX + h *C.QsciLexerTeX + isSubclass bool *QsciLexer } @@ -44,27 +46,47 @@ func (this *QsciLexerTeX) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerTeX(h *C.QsciLexerTeX) *QsciLexerTeX { +// newQsciLexerTeX constructs the type using only CGO pointers. +func newQsciLexerTeX(h *C.QsciLexerTeX, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTeX { if h == nil { return nil } - return &QsciLexerTeX{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerTeX{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerTeX(h unsafe.Pointer) *QsciLexerTeX { - return newQsciLexerTeX((*C.QsciLexerTeX)(h)) +// UnsafeNewQsciLexerTeX constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerTeX(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTeX { + if h == nil { + return nil + } + + return &QsciLexerTeX{h: (*C.QsciLexerTeX)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerTeX constructs a new QsciLexerTeX object. func NewQsciLexerTeX() *QsciLexerTeX { - ret := C.QsciLexerTeX_new() - return newQsciLexerTeX(ret) + var outptr_QsciLexerTeX *C.QsciLexerTeX = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTeX_new(&outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerTeX2 constructs a new QsciLexerTeX object. func NewQsciLexerTeX2(parent *qt6.QObject) *QsciLexerTeX { - ret := C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerTeX(ret) + var outptr_QsciLexerTeX *C.QsciLexerTeX = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerTeX) MetaObject() *qt6.QMetaObject { @@ -178,9 +200,894 @@ func QsciLexerTeX_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerTeX) callVirtualBase_Language() string { + + _ret := C.QsciLexerTeX_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnLanguage(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Language +func miqt_exec_callback_QsciLexerTeX_Language(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerTeX_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnLexer(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Lexer +func miqt_exec_callback_QsciLexerTeX_Lexer(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerTeX_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnLexerId(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_LexerId +func miqt_exec_callback_QsciLexerTeX_LexerId(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerTeX_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_AutoCompletionFillups +func miqt_exec_callback_QsciLexerTeX_AutoCompletionFillups(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerTeX_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerTeX) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerTeX_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerTeX_AutoCompletionWordSeparators(self *C.QsciLexerTeX, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerTeX_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTeX_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockEnd +func miqt_exec_callback_QsciLexerTeX_BlockEnd(self *C.QsciLexerTeX, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerTeX_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockLookback +func miqt_exec_callback_QsciLexerTeX_BlockLookback(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerTeX_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTeX_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockStart +func miqt_exec_callback_QsciLexerTeX_BlockStart(self *C.QsciLexerTeX, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerTeX_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerTeX_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BlockStartKeyword +func miqt_exec_callback_QsciLexerTeX_BlockStartKeyword(self *C.QsciLexerTeX, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerTeX_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_BraceStyle +func miqt_exec_callback_QsciLexerTeX_BraceStyle(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerTeX_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerTeX_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_CaseSensitive +func miqt_exec_callback_QsciLexerTeX_CaseSensitive(self *C.QsciLexerTeX, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerTeX_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTeX_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Color +func miqt_exec_callback_QsciLexerTeX_Color(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerTeX_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTeX) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTeX_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_EolFill +func miqt_exec_callback_QsciLexerTeX_EolFill(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerTeX_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerTeX_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Font +func miqt_exec_callback_QsciLexerTeX_Font(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerTeX_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_IndentationGuideView +func miqt_exec_callback_QsciLexerTeX_IndentationGuideView(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerTeX_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerTeX_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Keywords +func miqt_exec_callback_QsciLexerTeX_Keywords(self *C.QsciLexerTeX, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerTeX_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultStyle +func miqt_exec_callback_QsciLexerTeX_DefaultStyle(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerTeX_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerTeX) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerTeX_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Description +func miqt_exec_callback_QsciLexerTeX_Description(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerTeX) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerTeX_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTeX_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_Paper +func miqt_exec_callback_QsciLexerTeX_Paper(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerTeX_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTeX_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerTeX_DefaultColorWithStyle(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerTeX_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerTeX) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerTeX_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultEolFill +func miqt_exec_callback_QsciLexerTeX_DefaultEolFill(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerTeX_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerTeX_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerTeX_DefaultFontWithStyle(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerTeX_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerTeX) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerTeX_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerTeX_DefaultPaperWithStyle(self *C.QsciLexerTeX, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerTeX_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerTeX) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerTeX_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetEditor +func miqt_exec_callback_QsciLexerTeX_SetEditor(self *C.QsciLexerTeX, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerTeX) callVirtualBase_RefreshProperties() { + + C.QsciLexerTeX_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerTeX) OnRefreshProperties(slot func(super func())) { + C.QsciLexerTeX_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_RefreshProperties +func miqt_exec_callback_QsciLexerTeX_RefreshProperties(self *C.QsciLexerTeX, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerTeX) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerTeX_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerTeX) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerTeX_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_StyleBitsNeeded +func miqt_exec_callback_QsciLexerTeX_StyleBitsNeeded(self *C.QsciLexerTeX, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerTeX_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerTeX) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerTeX_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_WordCharacters +func miqt_exec_callback_QsciLexerTeX_WordCharacters(self *C.QsciLexerTeX, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerTeX) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerTeX_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerTeX) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerTeX_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerTeX_SetAutoIndentStyle(self *C.QsciLexerTeX, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerTeX_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerTeX_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetColor +func miqt_exec_callback_QsciLexerTeX_SetColor(self *C.QsciLexerTeX, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerTeX_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerTeX_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetEolFill +func miqt_exec_callback_QsciLexerTeX_SetEolFill(self *C.QsciLexerTeX, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerTeX_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerTeX_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetFont +func miqt_exec_callback_QsciLexerTeX_SetFont(self *C.QsciLexerTeX, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerTeX_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerTeX) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerTeX_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_SetPaper +func miqt_exec_callback_QsciLexerTeX_SetPaper(self *C.QsciLexerTeX, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerTeX) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTeX_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTeX) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerTeX_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_ReadProperties +func miqt_exec_callback_QsciLexerTeX_ReadProperties(self *C.QsciLexerTeX, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerTeX) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerTeX_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerTeX) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerTeX_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerTeX_WriteProperties +func miqt_exec_callback_QsciLexerTeX_WriteProperties(self *C.QsciLexerTeX, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerTeX) Delete() { - C.QsciLexerTeX_Delete(this.h) + C.QsciLexerTeX_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.h b/qt-restricted-extras/qscintilla6/gen_qscilexertex.h index 2d6e47ab..f797fdbc 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.h @@ -16,18 +16,26 @@ extern "C" { #ifdef __cplusplus class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerTeX; +class QsciScintilla; #else typedef struct QColor QColor; +typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerTeX QsciLexerTeX; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerTeX* QsciLexerTeX_new(); -QsciLexerTeX* QsciLexerTeX_new2(QObject* parent); +void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self); void* QsciLexerTeX_Metacast(QsciLexerTeX* self, const char* param1); struct miqt_string QsciLexerTeX_Tr(const char* s); @@ -48,7 +56,75 @@ void QsciLexerTeX_SetProcessIf(QsciLexerTeX* self, bool enable); bool QsciLexerTeX_ProcessIf(const QsciLexerTeX* self); struct miqt_string QsciLexerTeX_Tr2(const char* s, const char* c); struct miqt_string QsciLexerTeX_Tr3(const char* s, const char* c, int n); -void QsciLexerTeX_Delete(QsciLexerTeX* self); +void QsciLexerTeX_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_Language(const void* self); +void QsciLexerTeX_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_Lexer(const void* self); +void QsciLexerTeX_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_LexerId(const void* self); +void QsciLexerTeX_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerTeX_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerTeX_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerTeX_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerTeX_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_BlockLookback(const void* self); +void QsciLexerTeX_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerTeX_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerTeX_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_BraceStyle(const void* self); +void QsciLexerTeX_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_CaseSensitive(const void* self); +void QsciLexerTeX_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_Color(const void* self, int style); +void QsciLexerTeX_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_EolFill(const void* self, int style); +void QsciLexerTeX_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerTeX_virtualbase_Font(const void* self, int style); +void QsciLexerTeX_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_IndentationGuideView(const void* self); +void QsciLexerTeX_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_Keywords(const void* self, int set); +void QsciLexerTeX_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_DefaultStyle(const void* self); +void QsciLexerTeX_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerTeX_virtualbase_Description(const void* self, int style); +void QsciLexerTeX_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_Paper(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerTeX_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerTeX_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerTeX_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerTeX_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerTeX_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_RefreshProperties(void* self); +void QsciLexerTeX_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerTeX_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerTeX_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerTeX_virtualbase_WordCharacters(const void* self); +void QsciLexerTeX_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerTeX_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerTeX_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerTeX_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerTeX_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerTeX_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerTeX_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTeX_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerTeX_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerTeX_Delete(QsciLexerTeX* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp index 6a7c4af5..2d0f2876 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,846 @@ #include "gen_qscilexerverilog.h" #include "_cgo_export.h" -QsciLexerVerilog* QsciLexerVerilog_new() { - return new QsciLexerVerilog(); +class MiqtVirtualQsciLexerVerilog : public virtual QsciLexerVerilog { +public: + + MiqtVirtualQsciLexerVerilog(): QsciLexerVerilog() {}; + MiqtVirtualQsciLexerVerilog(QObject* parent): QsciLexerVerilog(parent) {}; + + virtual ~MiqtVirtualQsciLexerVerilog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerVerilog::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerVerilog::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerVerilog::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerVerilog::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerVerilog::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerVerilog::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerVerilog::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerVerilog_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerVerilog::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerVerilog::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerVerilog::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerVerilog::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerVerilog::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerVerilog::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerVerilog::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerVerilog::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerVerilog::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerVerilog::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerVerilog::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerVerilog::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerVerilog::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerVerilog::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerVerilog::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerVerilog::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerVerilog::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerVerilog::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerVerilog::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerVerilog::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerVerilog::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerVerilog::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerVerilog::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerVerilog::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerVerilog::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerVerilog_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerVerilog::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerVerilog::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerVerilog::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerVerilog::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerVerilog::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerVerilog::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerVerilog::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerVerilog::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerVerilog::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVerilog_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerVerilog::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerVerilog::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerVerilog_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerVerilog::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerVerilog::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerVerilog_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerVerilog::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerVerilog::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVerilog_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerVerilog::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerVerilog::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVerilog_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerVerilog::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerVerilog::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerVerilog_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerVerilog::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerVerilog::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerVerilog::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerVerilog::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerVerilog::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerVerilog::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerVerilog::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerVerilog::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVerilog_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerVerilog::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerVerilog::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVerilog::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerVerilog::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVerilog_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVerilog::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(); + *outptr_QsciLexerVerilog = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent) { - return new QsciLexerVerilog(parent); +void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(parent); + *outptr_QsciLexerVerilog = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self) { @@ -149,7 +985,275 @@ struct miqt_string QsciLexerVerilog_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerVerilog_Delete(QsciLexerVerilog* self) { - delete self; +void QsciLexerVerilog_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Language = slot; +} + +void QsciLexerVerilog_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerVerilog_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerVerilog_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__LexerId = slot; +} + +int QsciLexerVerilog_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerVerilog_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerVerilog_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerVerilog_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerVerilog_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerVerilog_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerVerilog_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerVerilog_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerVerilog_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerVerilog_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerVerilog_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerVerilog_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerVerilog_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerVerilog_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerVerilog_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerVerilog_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerVerilog_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerVerilog_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerVerilog_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Color(style); +} + +void QsciLexerVerilog_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerVerilog_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerVerilog_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerVerilog_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Font(style); +} + +void QsciLexerVerilog_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerVerilog_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerVerilog_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerVerilog_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerVerilog_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerVerilog_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerVerilog_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Description = slot; +} + +void QsciLexerVerilog_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerVerilog_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerVerilog_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerVerilog_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerVerilog_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerVerilog_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerVerilog_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerVerilog_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerVerilog_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerVerilog_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerVerilog_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerVerilog_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerVerilog_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerVerilog_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerVerilog_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerVerilog_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerVerilog_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerVerilog_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerVerilog_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerVerilog_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerVerilog_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetColor = slot; +} + +void QsciLexerVerilog_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerVerilog_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerVerilog_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerVerilog_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetFont = slot; +} + +void QsciLexerVerilog_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerVerilog_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerVerilog_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerVerilog_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerVerilog_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerVerilog_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVerilog*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerVerilog_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerVerilog*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerVerilog_Delete(QsciLexerVerilog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go index 9c8b3319..ccebb9d9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -58,7 +59,8 @@ const ( ) type QsciLexerVerilog struct { - h *C.QsciLexerVerilog + h *C.QsciLexerVerilog + isSubclass bool *QsciLexer } @@ -76,27 +78,47 @@ func (this *QsciLexerVerilog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerVerilog(h *C.QsciLexerVerilog) *QsciLexerVerilog { +// newQsciLexerVerilog constructs the type using only CGO pointers. +func newQsciLexerVerilog(h *C.QsciLexerVerilog, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVerilog { if h == nil { return nil } - return &QsciLexerVerilog{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerVerilog{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerVerilog(h unsafe.Pointer) *QsciLexerVerilog { - return newQsciLexerVerilog((*C.QsciLexerVerilog)(h)) +// UnsafeNewQsciLexerVerilog constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerVerilog(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVerilog { + if h == nil { + return nil + } + + return &QsciLexerVerilog{h: (*C.QsciLexerVerilog)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerVerilog constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog() *QsciLexerVerilog { - ret := C.QsciLexerVerilog_new() - return newQsciLexerVerilog(ret) + var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVerilog_new(&outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerVerilog2 constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog2(parent *qt6.QObject) *QsciLexerVerilog { - ret := C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerVerilog(ret) + var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerVerilog) MetaObject() *qt6.QMetaObject { @@ -240,9 +262,894 @@ func QsciLexerVerilog_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerVerilog) callVirtualBase_Language() string { + + _ret := C.QsciLexerVerilog_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnLanguage(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Language +func miqt_exec_callback_QsciLexerVerilog_Language(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerVerilog_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnLexer(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Lexer +func miqt_exec_callback_QsciLexerVerilog_Lexer(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerVerilog_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnLexerId(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_LexerId +func miqt_exec_callback_QsciLexerVerilog_LexerId(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerVerilog_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_AutoCompletionFillups +func miqt_exec_callback_QsciLexerVerilog_AutoCompletionFillups(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerVerilog_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerVerilog) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerVerilog_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerVerilog_AutoCompletionWordSeparators(self *C.QsciLexerVerilog, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerVerilog_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVerilog_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockEnd +func miqt_exec_callback_QsciLexerVerilog_BlockEnd(self *C.QsciLexerVerilog, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerVerilog_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockLookback +func miqt_exec_callback_QsciLexerVerilog_BlockLookback(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerVerilog_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVerilog_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockStart +func miqt_exec_callback_QsciLexerVerilog_BlockStart(self *C.QsciLexerVerilog, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerVerilog_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVerilog_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BlockStartKeyword +func miqt_exec_callback_QsciLexerVerilog_BlockStartKeyword(self *C.QsciLexerVerilog, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerVerilog_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_BraceStyle +func miqt_exec_callback_QsciLexerVerilog_BraceStyle(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerVerilog_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerVerilog_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_CaseSensitive +func miqt_exec_callback_QsciLexerVerilog_CaseSensitive(self *C.QsciLexerVerilog, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVerilog_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Color +func miqt_exec_callback_QsciLexerVerilog_Color(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerVerilog_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVerilog) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVerilog_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_EolFill +func miqt_exec_callback_QsciLexerVerilog_EolFill(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerVerilog_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerVerilog_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Font +func miqt_exec_callback_QsciLexerVerilog_Font(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerVerilog_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_IndentationGuideView +func miqt_exec_callback_QsciLexerVerilog_IndentationGuideView(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerVerilog_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerVerilog_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Keywords +func miqt_exec_callback_QsciLexerVerilog_Keywords(self *C.QsciLexerVerilog, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerVerilog_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultStyle(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerVerilog_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerVerilog) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerVerilog_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Description +func miqt_exec_callback_QsciLexerVerilog_Description(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerVerilog) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVerilog_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_Paper +func miqt_exec_callback_QsciLexerVerilog_Paper(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVerilog_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultColorWithStyle(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerVerilog_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVerilog) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVerilog_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultEolFill +func miqt_exec_callback_QsciLexerVerilog_DefaultEolFill(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerVerilog_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerVerilog_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultFontWithStyle(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerVerilog_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVerilog) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVerilog_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerVerilog_DefaultPaperWithStyle(self *C.QsciLexerVerilog, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerVerilog_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerVerilog) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerVerilog_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetEditor +func miqt_exec_callback_QsciLexerVerilog_SetEditor(self *C.QsciLexerVerilog, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerVerilog) callVirtualBase_RefreshProperties() { + + C.QsciLexerVerilog_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerVerilog) OnRefreshProperties(slot func(super func())) { + C.QsciLexerVerilog_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_RefreshProperties +func miqt_exec_callback_QsciLexerVerilog_RefreshProperties(self *C.QsciLexerVerilog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerVerilog) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerVerilog_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVerilog) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerVerilog_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_StyleBitsNeeded +func miqt_exec_callback_QsciLexerVerilog_StyleBitsNeeded(self *C.QsciLexerVerilog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerVerilog_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVerilog) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerVerilog_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_WordCharacters +func miqt_exec_callback_QsciLexerVerilog_WordCharacters(self *C.QsciLexerVerilog, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerVerilog_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerVerilog) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerVerilog_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerVerilog_SetAutoIndentStyle(self *C.QsciLexerVerilog, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerVerilog_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerVerilog_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetColor +func miqt_exec_callback_QsciLexerVerilog_SetColor(self *C.QsciLexerVerilog, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerVerilog_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerVerilog_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetEolFill +func miqt_exec_callback_QsciLexerVerilog_SetEolFill(self *C.QsciLexerVerilog, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerVerilog_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerVerilog_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetFont +func miqt_exec_callback_QsciLexerVerilog_SetFont(self *C.QsciLexerVerilog, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerVerilog_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVerilog) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerVerilog_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_SetPaper +func miqt_exec_callback_QsciLexerVerilog_SetPaper(self *C.QsciLexerVerilog, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerVerilog) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVerilog_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVerilog) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerVerilog_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_ReadProperties +func miqt_exec_callback_QsciLexerVerilog_ReadProperties(self *C.QsciLexerVerilog, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVerilog) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVerilog_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVerilog) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerVerilog_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVerilog_WriteProperties +func miqt_exec_callback_QsciLexerVerilog_WriteProperties(self *C.QsciLexerVerilog, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerVerilog) Delete() { - C.QsciLexerVerilog_Delete(this.h) + C.QsciLexerVerilog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h index 9abfcf26..8f51b53b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerVerilog; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerVerilog QsciLexerVerilog; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerVerilog* QsciLexerVerilog_new(); -QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent); +void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self); void* QsciLexerVerilog_Metacast(QsciLexerVerilog* self, const char* param1); struct miqt_string QsciLexerVerilog_Tr(const char* s); @@ -56,7 +62,75 @@ void QsciLexerVerilog_SetFoldAtModule(QsciLexerVerilog* self, bool fold); bool QsciLexerVerilog_FoldAtModule(const QsciLexerVerilog* self); struct miqt_string QsciLexerVerilog_Tr2(const char* s, const char* c); struct miqt_string QsciLexerVerilog_Tr3(const char* s, const char* c, int n); -void QsciLexerVerilog_Delete(QsciLexerVerilog* self); +void QsciLexerVerilog_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_Language(const void* self); +void QsciLexerVerilog_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_Lexer(const void* self); +void QsciLexerVerilog_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_LexerId(const void* self); +void QsciLexerVerilog_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerVerilog_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerVerilog_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerVerilog_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerVerilog_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_BlockLookback(const void* self); +void QsciLexerVerilog_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerVerilog_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerVerilog_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_BraceStyle(const void* self); +void QsciLexerVerilog_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_CaseSensitive(const void* self); +void QsciLexerVerilog_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_Color(const void* self, int style); +void QsciLexerVerilog_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_EolFill(const void* self, int style); +void QsciLexerVerilog_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerVerilog_virtualbase_Font(const void* self, int style); +void QsciLexerVerilog_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_IndentationGuideView(const void* self); +void QsciLexerVerilog_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_Keywords(const void* self, int set); +void QsciLexerVerilog_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_DefaultStyle(const void* self); +void QsciLexerVerilog_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerVerilog_virtualbase_Description(const void* self, int style); +void QsciLexerVerilog_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_Paper(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerVerilog_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerVerilog_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVerilog_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerVerilog_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerVerilog_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_RefreshProperties(void* self); +void QsciLexerVerilog_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerVerilog_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerVerilog_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerVerilog_virtualbase_WordCharacters(const void* self); +void QsciLexerVerilog_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerVerilog_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerVerilog_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerVerilog_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerVerilog_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerVerilog_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerVerilog_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVerilog_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerVerilog_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVerilog_Delete(QsciLexerVerilog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp index a3a376ee..7c383531 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,966 @@ #include "gen_qscilexervhdl.h" #include "_cgo_export.h" -QsciLexerVHDL* QsciLexerVHDL_new() { - return new QsciLexerVHDL(); +class MiqtVirtualQsciLexerVHDL : public virtual QsciLexerVHDL { +public: + + MiqtVirtualQsciLexerVHDL(): QsciLexerVHDL() {}; + MiqtVirtualQsciLexerVHDL(QObject* parent): QsciLexerVHDL(parent) {}; + + virtual ~MiqtVirtualQsciLexerVHDL() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerVHDL::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerVHDL::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerVHDL::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerVHDL::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtElse = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtElse(bool fold) override { + if (handle__SetFoldAtElse == 0) { + QsciLexerVHDL::setFoldAtElse(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldAtElse(this, handle__SetFoldAtElse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtElse(bool fold) { + + QsciLexerVHDL::setFoldAtElse(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtBegin = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtBegin(bool fold) override { + if (handle__SetFoldAtBegin == 0) { + QsciLexerVHDL::setFoldAtBegin(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldAtBegin(this, handle__SetFoldAtBegin, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtBegin(bool fold) { + + QsciLexerVHDL::setFoldAtBegin(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldAtParenthesis = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldAtParenthesis(bool fold) override { + if (handle__SetFoldAtParenthesis == 0) { + QsciLexerVHDL::setFoldAtParenthesis(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis(this, handle__SetFoldAtParenthesis, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldAtParenthesis(bool fold) { + + QsciLexerVHDL::setFoldAtParenthesis(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerVHDL::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerVHDL::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerVHDL::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerVHDL::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerVHDL::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerVHDL::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerVHDL::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerVHDL_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerVHDL::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerVHDL::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerVHDL::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerVHDL::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerVHDL::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerVHDL::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerVHDL::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerVHDL::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerVHDL::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerVHDL::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerVHDL::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerVHDL::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerVHDL::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerVHDL::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerVHDL::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerVHDL::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerVHDL::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerVHDL::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerVHDL::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerVHDL::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerVHDL::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerVHDL::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerVHDL::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerVHDL::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerVHDL::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerVHDL_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerVHDL::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerVHDL::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerVHDL::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerVHDL::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerVHDL::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerVHDL::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerVHDL::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerVHDL::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerVHDL::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerVHDL_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerVHDL::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerVHDL::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerVHDL_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerVHDL::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerVHDL::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerVHDL_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerVHDL::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerVHDL::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerVHDL_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerVHDL::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerVHDL::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerVHDL_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerVHDL::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerVHDL::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerVHDL_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerVHDL::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerVHDL::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerVHDL::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerVHDL::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerVHDL::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerVHDL::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerVHDL::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerVHDL::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerVHDL_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerVHDL::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerVHDL::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVHDL::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerVHDL::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerVHDL_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerVHDL::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(); + *outptr_QsciLexerVHDL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent) { - return new QsciLexerVHDL(parent); +void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(parent); + *outptr_QsciLexerVHDL = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self) { @@ -145,7 +1101,315 @@ struct miqt_string QsciLexerVHDL_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerVHDL_Delete(QsciLexerVHDL* self) { - delete self; +void QsciLexerVHDL_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldAtElse = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldAtElse(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldAtElse(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldAtBegin(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldAtBegin = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldAtBegin(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldAtBegin(fold); +} + +void QsciLexerVHDL_override_virtual_SetFoldAtParenthesis(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFoldAtParenthesis = slot; +} + +void QsciLexerVHDL_virtualbase_SetFoldAtParenthesis(void* self, bool fold) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFoldAtParenthesis(fold); +} + +void QsciLexerVHDL_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Language = slot; +} + +void QsciLexerVHDL_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerVHDL_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerVHDL_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__LexerId = slot; +} + +int QsciLexerVHDL_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerVHDL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerVHDL_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerVHDL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerVHDL_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerVHDL_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerVHDL_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerVHDL_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerVHDL_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerVHDL_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerVHDL_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerVHDL_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerVHDL_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerVHDL_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerVHDL_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerVHDL_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerVHDL_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerVHDL_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerVHDL_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Color(style); +} + +void QsciLexerVHDL_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerVHDL_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerVHDL_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerVHDL_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Font(style); +} + +void QsciLexerVHDL_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerVHDL_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerVHDL_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerVHDL_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerVHDL_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerVHDL_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerVHDL_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Description = slot; +} + +void QsciLexerVHDL_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerVHDL_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerVHDL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerVHDL_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerVHDL_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerVHDL_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerVHDL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerVHDL_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerVHDL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerVHDL_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerVHDL_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerVHDL_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerVHDL_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerVHDL_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerVHDL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerVHDL_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerVHDL_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerVHDL_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerVHDL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerVHDL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerVHDL_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetColor = slot; +} + +void QsciLexerVHDL_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerVHDL_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerVHDL_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerVHDL_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetFont = slot; +} + +void QsciLexerVHDL_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerVHDL_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerVHDL_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerVHDL_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerVHDL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerVHDL_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerVHDL*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerVHDL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerVHDL*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerVHDL_Delete(QsciLexerVHDL* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go index 1b9b886e..03bf13a0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -36,7 +37,8 @@ const ( ) type QsciLexerVHDL struct { - h *C.QsciLexerVHDL + h *C.QsciLexerVHDL + isSubclass bool *QsciLexer } @@ -54,27 +56,47 @@ func (this *QsciLexerVHDL) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerVHDL(h *C.QsciLexerVHDL) *QsciLexerVHDL { +// newQsciLexerVHDL constructs the type using only CGO pointers. +func newQsciLexerVHDL(h *C.QsciLexerVHDL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVHDL { if h == nil { return nil } - return &QsciLexerVHDL{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerVHDL{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerVHDL(h unsafe.Pointer) *QsciLexerVHDL { - return newQsciLexerVHDL((*C.QsciLexerVHDL)(h)) +// UnsafeNewQsciLexerVHDL constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerVHDL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVHDL { + if h == nil { + return nil + } + + return &QsciLexerVHDL{h: (*C.QsciLexerVHDL)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerVHDL constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL() *QsciLexerVHDL { - ret := C.QsciLexerVHDL_new() - return newQsciLexerVHDL(ret) + var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVHDL_new(&outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerVHDL2 constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL2(parent *qt6.QObject) *QsciLexerVHDL { - ret := C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerVHDL(ret) + var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerVHDL) MetaObject() *qt6.QMetaObject { @@ -213,9 +235,1009 @@ func QsciLexerVHDL_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerVHDL) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldComments +func miqt_exec_callback_QsciLexerVHDL_SetFoldComments(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldCompact +func miqt_exec_callback_QsciLexerVHDL_SetFoldCompact(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldAtElse(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldAtElse(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldAtElse(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldAtElse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldAtElse +func miqt_exec_callback_QsciLexerVHDL_SetFoldAtElse(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldAtElse, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldAtBegin(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldAtBegin(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldAtBegin(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldAtBegin(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldAtBegin +func miqt_exec_callback_QsciLexerVHDL_SetFoldAtBegin(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldAtBegin, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFoldAtParenthesis(fold bool) { + + C.QsciLexerVHDL_virtualbase_SetFoldAtParenthesis(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerVHDL) OnSetFoldAtParenthesis(slot func(super func(fold bool), fold bool)) { + C.QsciLexerVHDL_override_virtual_SetFoldAtParenthesis(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis +func miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis(self *C.QsciLexerVHDL, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFoldAtParenthesis, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Language() string { + + _ret := C.QsciLexerVHDL_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnLanguage(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Language +func miqt_exec_callback_QsciLexerVHDL_Language(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerVHDL_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnLexer(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Lexer +func miqt_exec_callback_QsciLexerVHDL_Lexer(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerVHDL_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnLexerId(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_LexerId +func miqt_exec_callback_QsciLexerVHDL_LexerId(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerVHDL_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_AutoCompletionFillups +func miqt_exec_callback_QsciLexerVHDL_AutoCompletionFillups(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerVHDL_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerVHDL) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerVHDL_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerVHDL_AutoCompletionWordSeparators(self *C.QsciLexerVHDL, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerVHDL_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVHDL_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockEnd +func miqt_exec_callback_QsciLexerVHDL_BlockEnd(self *C.QsciLexerVHDL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerVHDL_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockLookback +func miqt_exec_callback_QsciLexerVHDL_BlockLookback(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerVHDL_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVHDL_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockStart +func miqt_exec_callback_QsciLexerVHDL_BlockStart(self *C.QsciLexerVHDL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerVHDL_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerVHDL_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BlockStartKeyword +func miqt_exec_callback_QsciLexerVHDL_BlockStartKeyword(self *C.QsciLexerVHDL, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerVHDL_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_BraceStyle +func miqt_exec_callback_QsciLexerVHDL_BraceStyle(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerVHDL_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerVHDL_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_CaseSensitive +func miqt_exec_callback_QsciLexerVHDL_CaseSensitive(self *C.QsciLexerVHDL, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVHDL_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Color +func miqt_exec_callback_QsciLexerVHDL_Color(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerVHDL_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVHDL) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVHDL_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_EolFill +func miqt_exec_callback_QsciLexerVHDL_EolFill(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerVHDL_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerVHDL_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Font +func miqt_exec_callback_QsciLexerVHDL_Font(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerVHDL_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_IndentationGuideView +func miqt_exec_callback_QsciLexerVHDL_IndentationGuideView(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerVHDL_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerVHDL_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Keywords +func miqt_exec_callback_QsciLexerVHDL_Keywords(self *C.QsciLexerVHDL, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerVHDL_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultStyle(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerVHDL_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerVHDL) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerVHDL_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Description +func miqt_exec_callback_QsciLexerVHDL_Description(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerVHDL) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVHDL_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_Paper +func miqt_exec_callback_QsciLexerVHDL_Paper(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVHDL_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultColorWithStyle(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerVHDL_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerVHDL) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerVHDL_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultEolFill +func miqt_exec_callback_QsciLexerVHDL_DefaultEolFill(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerVHDL_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerVHDL_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultFontWithStyle(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerVHDL_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerVHDL) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerVHDL_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerVHDL_DefaultPaperWithStyle(self *C.QsciLexerVHDL, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerVHDL_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerVHDL) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerVHDL_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetEditor +func miqt_exec_callback_QsciLexerVHDL_SetEditor(self *C.QsciLexerVHDL, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_RefreshProperties() { + + C.QsciLexerVHDL_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerVHDL) OnRefreshProperties(slot func(super func())) { + C.QsciLexerVHDL_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_RefreshProperties +func miqt_exec_callback_QsciLexerVHDL_RefreshProperties(self *C.QsciLexerVHDL, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerVHDL) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerVHDL_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerVHDL) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerVHDL_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_StyleBitsNeeded +func miqt_exec_callback_QsciLexerVHDL_StyleBitsNeeded(self *C.QsciLexerVHDL, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerVHDL_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerVHDL) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerVHDL_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_WordCharacters +func miqt_exec_callback_QsciLexerVHDL_WordCharacters(self *C.QsciLexerVHDL, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerVHDL_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerVHDL) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerVHDL_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerVHDL_SetAutoIndentStyle(self *C.QsciLexerVHDL, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerVHDL_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerVHDL_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetColor +func miqt_exec_callback_QsciLexerVHDL_SetColor(self *C.QsciLexerVHDL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerVHDL_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerVHDL_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetEolFill +func miqt_exec_callback_QsciLexerVHDL_SetEolFill(self *C.QsciLexerVHDL, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerVHDL_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerVHDL_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetFont +func miqt_exec_callback_QsciLexerVHDL_SetFont(self *C.QsciLexerVHDL, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerVHDL_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerVHDL) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerVHDL_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_SetPaper +func miqt_exec_callback_QsciLexerVHDL_SetPaper(self *C.QsciLexerVHDL, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerVHDL) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVHDL_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVHDL) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerVHDL_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_ReadProperties +func miqt_exec_callback_QsciLexerVHDL_ReadProperties(self *C.QsciLexerVHDL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerVHDL) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerVHDL_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerVHDL) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerVHDL_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerVHDL_WriteProperties +func miqt_exec_callback_QsciLexerVHDL_WriteProperties(self *C.QsciLexerVHDL, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerVHDL) Delete() { - C.QsciLexerVHDL_Delete(this.h) + C.QsciLexerVHDL_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h index 5b29fdee..22670105 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerVHDL; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerVHDL QsciLexerVHDL; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerVHDL* QsciLexerVHDL_new(); -QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent); +void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self); void* QsciLexerVHDL_Metacast(QsciLexerVHDL* self, const char* param1); struct miqt_string QsciLexerVHDL_Tr(const char* s); @@ -55,7 +61,85 @@ void QsciLexerVHDL_SetFoldAtBegin(QsciLexerVHDL* self, bool fold); void QsciLexerVHDL_SetFoldAtParenthesis(QsciLexerVHDL* self, bool fold); struct miqt_string QsciLexerVHDL_Tr2(const char* s, const char* c); struct miqt_string QsciLexerVHDL_Tr3(const char* s, const char* c, int n); -void QsciLexerVHDL_Delete(QsciLexerVHDL* self); +void QsciLexerVHDL_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldAtElse(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldAtElse(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldAtBegin(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldAtBegin(void* self, bool fold); +void QsciLexerVHDL_override_virtual_SetFoldAtParenthesis(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFoldAtParenthesis(void* self, bool fold); +void QsciLexerVHDL_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_Language(const void* self); +void QsciLexerVHDL_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_Lexer(const void* self); +void QsciLexerVHDL_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_LexerId(const void* self); +void QsciLexerVHDL_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerVHDL_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerVHDL_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerVHDL_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerVHDL_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_BlockLookback(const void* self); +void QsciLexerVHDL_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerVHDL_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerVHDL_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_BraceStyle(const void* self); +void QsciLexerVHDL_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_CaseSensitive(const void* self); +void QsciLexerVHDL_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_Color(const void* self, int style); +void QsciLexerVHDL_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_EolFill(const void* self, int style); +void QsciLexerVHDL_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerVHDL_virtualbase_Font(const void* self, int style); +void QsciLexerVHDL_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_IndentationGuideView(const void* self); +void QsciLexerVHDL_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_Keywords(const void* self, int set); +void QsciLexerVHDL_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_DefaultStyle(const void* self); +void QsciLexerVHDL_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerVHDL_virtualbase_Description(const void* self, int style); +void QsciLexerVHDL_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_Paper(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerVHDL_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerVHDL_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerVHDL_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerVHDL_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerVHDL_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_RefreshProperties(void* self); +void QsciLexerVHDL_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerVHDL_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerVHDL_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerVHDL_virtualbase_WordCharacters(const void* self); +void QsciLexerVHDL_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerVHDL_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerVHDL_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerVHDL_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerVHDL_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerVHDL_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerVHDL_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVHDL_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerVHDL_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerVHDL_Delete(QsciLexerVHDL* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp index 2c22ce94..113b0028 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp @@ -9,12 +9,102 @@ #include "gen_qscilexerxml.h" #include "_cgo_export.h" -QsciLexerXML* QsciLexerXML_new() { - return new QsciLexerXML(); +class MiqtVirtualQsciLexerXML : public virtual QsciLexerXML { +public: + + MiqtVirtualQsciLexerXML(): QsciLexerXML() {}; + MiqtVirtualQsciLexerXML(QObject* parent): QsciLexerXML(parent) {}; + + virtual ~MiqtVirtualQsciLexerXML() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldCompact = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldCompact(bool fold) override { + if (handle__SetFoldCompact == 0) { + QsciLexerXML::setFoldCompact(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerXML_SetFoldCompact(this, handle__SetFoldCompact, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldCompact(bool fold) { + + QsciLexerXML::setFoldCompact(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldPreprocessor = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldPreprocessor(bool fold) override { + if (handle__SetFoldPreprocessor == 0) { + QsciLexerXML::setFoldPreprocessor(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerXML_SetFoldPreprocessor(this, handle__SetFoldPreprocessor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldPreprocessor(bool fold) { + + QsciLexerXML::setFoldPreprocessor(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaseSensitiveTags = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaseSensitiveTags(bool sens) override { + if (handle__SetCaseSensitiveTags == 0) { + QsciLexerXML::setCaseSensitiveTags(sens); + return; + } + + bool sigval1 = sens; + + miqt_exec_callback_QsciLexerXML_SetCaseSensitiveTags(this, handle__SetCaseSensitiveTags, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaseSensitiveTags(bool sens) { + + QsciLexerXML::setCaseSensitiveTags(sens); + + } + +}; + +void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(); + *outptr_QsciLexerXML = ret; + *outptr_QsciLexerHTML = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerXML* QsciLexerXML_new2(QObject* parent) { - return new QsciLexerXML(parent); +void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(parent); + *outptr_QsciLexerXML = ret; + *outptr_QsciLexerHTML = static_cast(ret); + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self) { @@ -98,7 +188,35 @@ struct miqt_string QsciLexerXML_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerXML_Delete(QsciLexerXML* self) { - delete self; +void QsciLexerXML_override_virtual_SetFoldCompact(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerXML*)(self) )->handle__SetFoldCompact = slot; +} + +void QsciLexerXML_virtualbase_SetFoldCompact(void* self, bool fold) { + ( (MiqtVirtualQsciLexerXML*)(self) )->virtualbase_SetFoldCompact(fold); +} + +void QsciLexerXML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerXML*)(self) )->handle__SetFoldPreprocessor = slot; +} + +void QsciLexerXML_virtualbase_SetFoldPreprocessor(void* self, bool fold) { + ( (MiqtVirtualQsciLexerXML*)(self) )->virtualbase_SetFoldPreprocessor(fold); +} + +void QsciLexerXML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerXML*)(self) )->handle__SetCaseSensitiveTags = slot; +} + +void QsciLexerXML_virtualbase_SetCaseSensitiveTags(void* self, bool sens) { + ( (MiqtVirtualQsciLexerXML*)(self) )->virtualbase_SetCaseSensitiveTags(sens); +} + +void QsciLexerXML_Delete(QsciLexerXML* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go index b4e697b5..6051eb91 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciLexerXML struct { - h *C.QsciLexerXML + h *C.QsciLexerXML + isSubclass bool *QsciLexerHTML } @@ -33,27 +35,49 @@ func (this *QsciLexerXML) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerXML(h *C.QsciLexerXML) *QsciLexerXML { +// newQsciLexerXML constructs the type using only CGO pointers. +func newQsciLexerXML(h *C.QsciLexerXML, h_QsciLexerHTML *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerXML { if h == nil { return nil } - return &QsciLexerXML{h: h, QsciLexerHTML: UnsafeNewQsciLexerHTML(unsafe.Pointer(h))} + return &QsciLexerXML{h: h, + QsciLexerHTML: newQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerXML(h unsafe.Pointer) *QsciLexerXML { - return newQsciLexerXML((*C.QsciLexerXML)(h)) +// UnsafeNewQsciLexerXML constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerXML(h unsafe.Pointer, h_QsciLexerHTML unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerXML { + if h == nil { + return nil + } + + return &QsciLexerXML{h: (*C.QsciLexerXML)(h), + QsciLexerHTML: UnsafeNewQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} } // NewQsciLexerXML constructs a new QsciLexerXML object. func NewQsciLexerXML() *QsciLexerXML { - ret := C.QsciLexerXML_new() - return newQsciLexerXML(ret) + var outptr_QsciLexerXML *C.QsciLexerXML = nil + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerXML_new(&outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerXML2 constructs a new QsciLexerXML object. func NewQsciLexerXML2(parent *qt6.QObject) *QsciLexerXML { - ret := C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerXML(ret) + var outptr_QsciLexerXML *C.QsciLexerXML = nil + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerXML) MetaObject() *qt6.QMetaObject { @@ -149,9 +173,78 @@ func QsciLexerXML_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerXML) callVirtualBase_SetFoldCompact(fold bool) { + + C.QsciLexerXML_virtualbase_SetFoldCompact(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerXML) OnSetFoldCompact(slot func(super func(fold bool), fold bool)) { + C.QsciLexerXML_override_virtual_SetFoldCompact(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerXML_SetFoldCompact +func miqt_exec_callback_QsciLexerXML_SetFoldCompact(self *C.QsciLexerXML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerXML{h: self}).callVirtualBase_SetFoldCompact, slotval1) + +} + +func (this *QsciLexerXML) callVirtualBase_SetFoldPreprocessor(fold bool) { + + C.QsciLexerXML_virtualbase_SetFoldPreprocessor(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerXML) OnSetFoldPreprocessor(slot func(super func(fold bool), fold bool)) { + C.QsciLexerXML_override_virtual_SetFoldPreprocessor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerXML_SetFoldPreprocessor +func miqt_exec_callback_QsciLexerXML_SetFoldPreprocessor(self *C.QsciLexerXML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerXML{h: self}).callVirtualBase_SetFoldPreprocessor, slotval1) + +} + +func (this *QsciLexerXML) callVirtualBase_SetCaseSensitiveTags(sens bool) { + + C.QsciLexerXML_virtualbase_SetCaseSensitiveTags(unsafe.Pointer(this.h), (C.bool)(sens)) + +} +func (this *QsciLexerXML) OnSetCaseSensitiveTags(slot func(super func(sens bool), sens bool)) { + C.QsciLexerXML_override_virtual_SetCaseSensitiveTags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerXML_SetCaseSensitiveTags +func miqt_exec_callback_QsciLexerXML_SetCaseSensitiveTags(self *C.QsciLexerXML, cb C.intptr_t, sens C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sens bool), sens bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(sens) + + gofunc((&QsciLexerXML{h: self}).callVirtualBase_SetCaseSensitiveTags, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciLexerXML) Delete() { - C.QsciLexerXML_Delete(this.h) + C.QsciLexerXML_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h index b1a72b41..c8f7ae3c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h @@ -19,17 +19,21 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QsciLexer; +class QsciLexerHTML; class QsciLexerXML; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QsciLexer QsciLexer; +typedef struct QsciLexerHTML QsciLexerHTML; typedef struct QsciLexerXML QsciLexerXML; #endif -QsciLexerXML* QsciLexerXML_new(); -QsciLexerXML* QsciLexerXML_new2(QObject* parent); +void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self); void* QsciLexerXML_Metacast(QsciLexerXML* self, const char* param1); struct miqt_string QsciLexerXML_Tr(const char* s); @@ -45,7 +49,13 @@ void QsciLexerXML_SetScriptsStyled(QsciLexerXML* self, bool styled); bool QsciLexerXML_ScriptsStyled(const QsciLexerXML* self); struct miqt_string QsciLexerXML_Tr2(const char* s, const char* c); struct miqt_string QsciLexerXML_Tr3(const char* s, const char* c, int n); -void QsciLexerXML_Delete(QsciLexerXML* self); +void QsciLexerXML_override_virtual_SetFoldCompact(void* self, intptr_t slot); +void QsciLexerXML_virtualbase_SetFoldCompact(void* self, bool fold); +void QsciLexerXML_override_virtual_SetFoldPreprocessor(void* self, intptr_t slot); +void QsciLexerXML_virtualbase_SetFoldPreprocessor(void* self, bool fold); +void QsciLexerXML_override_virtual_SetCaseSensitiveTags(void* self, intptr_t slot); +void QsciLexerXML_virtualbase_SetCaseSensitiveTags(void* self, bool sens); +void QsciLexerXML_Delete(QsciLexerXML* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp index b64490fb..7e23ef21 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -9,12 +11,870 @@ #include "gen_qscilexeryaml.h" #include "_cgo_export.h" -QsciLexerYAML* QsciLexerYAML_new() { - return new QsciLexerYAML(); +class MiqtVirtualQsciLexerYAML : public virtual QsciLexerYAML { +public: + + MiqtVirtualQsciLexerYAML(): QsciLexerYAML() {}; + MiqtVirtualQsciLexerYAML(QObject* parent): QsciLexerYAML(parent) {}; + + virtual ~MiqtVirtualQsciLexerYAML() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFoldComments = 0; + + // Subclass to allow providing a Go implementation + virtual void setFoldComments(bool fold) override { + if (handle__SetFoldComments == 0) { + QsciLexerYAML::setFoldComments(fold); + return; + } + + bool sigval1 = fold; + + miqt_exec_callback_QsciLexerYAML_SetFoldComments(this, handle__SetFoldComments, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFoldComments(bool fold) { + + QsciLexerYAML::setFoldComments(fold); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Language = 0; + + // Subclass to allow providing a Go implementation + virtual const char* language() const override { + if (handle__Language == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_Language(const_cast(this), handle__Language); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Lexer = 0; + + // Subclass to allow providing a Go implementation + virtual const char* lexer() const override { + if (handle__Lexer == 0) { + return QsciLexerYAML::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerYAML::lexer(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LexerId = 0; + + // Subclass to allow providing a Go implementation + virtual int lexerId() const override { + if (handle__LexerId == 0) { + return QsciLexerYAML::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerYAML::lexerId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionFillups = 0; + + // Subclass to allow providing a Go implementation + virtual const char* autoCompletionFillups() const override { + if (handle__AutoCompletionFillups == 0) { + return QsciLexerYAML::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerYAML::autoCompletionFillups(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionWordSeparators = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList autoCompletionWordSeparators() const override { + if (handle__AutoCompletionWordSeparators == 0) { + return QsciLexerYAML::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerYAML_AutoCompletionWordSeparators(const_cast(this), handle__AutoCompletionWordSeparators); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_AutoCompletionWordSeparators() const { + + QStringList _ret = QsciLexerYAML::autoCompletionWordSeparators(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockEnd = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockEnd(int* style) const override { + if (handle__BlockEnd == 0) { + return QsciLexerYAML::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockEnd(const_cast(this), handle__BlockEnd, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockEnd(int* style) const { + + return (const char*) QsciLexerYAML::blockEnd(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockLookback = 0; + + // Subclass to allow providing a Go implementation + virtual int blockLookback() const override { + if (handle__BlockLookback == 0) { + return QsciLexerYAML::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerYAML::blockLookback(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStart = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStart(int* style) const override { + if (handle__BlockStart == 0) { + return QsciLexerYAML::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockStart(const_cast(this), handle__BlockStart, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStart(int* style) const { + + return (const char*) QsciLexerYAML::blockStart(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockStartKeyword = 0; + + // Subclass to allow providing a Go implementation + virtual const char* blockStartKeyword(int* style) const override { + if (handle__BlockStartKeyword == 0) { + return QsciLexerYAML::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_BlockStartKeyword(const_cast(this), handle__BlockStartKeyword, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_BlockStartKeyword(int* style) const { + + return (const char*) QsciLexerYAML::blockStartKeyword(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BraceStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int braceStyle() const override { + if (handle__BraceStyle == 0) { + return QsciLexerYAML::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerYAML::braceStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaseSensitive = 0; + + // Subclass to allow providing a Go implementation + virtual bool caseSensitive() const override { + if (handle__CaseSensitive == 0) { + return QsciLexerYAML::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerYAML::caseSensitive(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Color = 0; + + // Subclass to allow providing a Go implementation + virtual QColor color(int style) const override { + if (handle__Color == 0) { + return QsciLexerYAML::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_Color(const_cast(this), handle__Color, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Color(int style) const { + + return new QColor(QsciLexerYAML::color(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool eolFill(int style) const override { + if (handle__EolFill == 0) { + return QsciLexerYAML::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerYAML::eolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Font = 0; + + // Subclass to allow providing a Go implementation + virtual QFont font(int style) const override { + if (handle__Font == 0) { + return QsciLexerYAML::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerYAML_Font(const_cast(this), handle__Font, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_Font(int style) const { + + return new QFont(QsciLexerYAML::font(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndentationGuideView = 0; + + // Subclass to allow providing a Go implementation + virtual int indentationGuideView() const override { + if (handle__IndentationGuideView == 0) { + return QsciLexerYAML::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerYAML::indentationGuideView(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keywords = 0; + + // Subclass to allow providing a Go implementation + virtual const char* keywords(int set) const override { + if (handle__Keywords == 0) { + return QsciLexerYAML::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_Keywords(const_cast(this), handle__Keywords, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Keywords(int set) const { + + return (const char*) QsciLexerYAML::keywords(static_cast(set)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultStyle = 0; + + // Subclass to allow providing a Go implementation + virtual int defaultStyle() const override { + if (handle__DefaultStyle == 0) { + return QsciLexerYAML::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerYAML::defaultStyle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Description = 0; + + // Subclass to allow providing a Go implementation + virtual QString description(int style) const override { + if (handle__Description == 0) { + return QString(); // Pure virtual, there is no base we can call + } + + int sigval1 = style; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciLexerYAML_Description(const_cast(this), handle__Description, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paper = 0; + + // Subclass to allow providing a Go implementation + virtual QColor paper(int style) const override { + if (handle__Paper == 0) { + return QsciLexerYAML::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_Paper(const_cast(this), handle__Paper, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_Paper(int style) const { + + return new QColor(QsciLexerYAML::paper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultColorWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultColor(int style) const override { + if (handle__DefaultColorWithStyle == 0) { + return QsciLexerYAML::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultColorWithStyle(const_cast(this), handle__DefaultColorWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultColorWithStyle(int style) const { + + return new QColor(QsciLexerYAML::defaultColor(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual bool defaultEolFill(int style) const override { + if (handle__DefaultEolFill == 0) { + return QsciLexerYAML::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerYAML::defaultEolFill(static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultFontWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QFont defaultFont(int style) const override { + if (handle__DefaultFontWithStyle == 0) { + return QsciLexerYAML::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultFontWithStyle(const_cast(this), handle__DefaultFontWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QFont* virtualbase_DefaultFontWithStyle(int style) const { + + return new QFont(QsciLexerYAML::defaultFont(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DefaultPaperWithStyle = 0; + + // Subclass to allow providing a Go implementation + virtual QColor defaultPaper(int style) const override { + if (handle__DefaultPaperWithStyle == 0) { + return QsciLexerYAML::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerYAML_DefaultPaperWithStyle(const_cast(this), handle__DefaultPaperWithStyle, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QColor* virtualbase_DefaultPaperWithStyle(int style) const { + + return new QColor(QsciLexerYAML::defaultPaper(static_cast(style))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditor(QsciScintilla* editor) override { + if (handle__SetEditor == 0) { + QsciLexerYAML::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerYAML_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerYAML::setEditor(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RefreshProperties = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshProperties() override { + if (handle__RefreshProperties == 0) { + QsciLexerYAML::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerYAML_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerYAML::refreshProperties(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleBitsNeeded = 0; + + // Subclass to allow providing a Go implementation + virtual int styleBitsNeeded() const override { + if (handle__StyleBitsNeeded == 0) { + return QsciLexerYAML::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerYAML_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerYAML::styleBitsNeeded(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WordCharacters = 0; + + // Subclass to allow providing a Go implementation + virtual const char* wordCharacters() const override { + if (handle__WordCharacters == 0) { + return QsciLexerYAML::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerYAML_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerYAML::wordCharacters(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndentStyle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndentStyle(int autoindentstyle) override { + if (handle__SetAutoIndentStyle == 0) { + QsciLexerYAML::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerYAML_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerYAML::setAutoIndentStyle(static_cast(autoindentstyle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c, int style) override { + if (handle__SetColor == 0) { + QsciLexerYAML::setColor(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerYAML::setColor(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolFill = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolFill(bool eoffill, int style) override { + if (handle__SetEolFill == 0) { + QsciLexerYAML::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerYAML::setEolFill(eoffill, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setFont(const QFont& f, int style) override { + if (handle__SetFont == 0) { + QsciLexerYAML::setFont(f, style); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerYAML::setFont(*f, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c, int style) override { + if (handle__SetPaper == 0) { + QsciLexerYAML::setPaper(c, style); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + int sigval2 = style; + + miqt_exec_callback_QsciLexerYAML_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerYAML::setPaper(*c, static_cast(style)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool readProperties(QSettings& qs, const QString& prefix) override { + if (handle__ReadProperties == 0) { + return QsciLexerYAML::readProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_ReadProperties(this, handle__ReadProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ReadProperties(QSettings* qs, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerYAML::readProperties(*qs, prefix_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteProperties = 0; + + // Subclass to allow providing a Go implementation + virtual bool writeProperties(QSettings& qs, const QString& prefix) const override { + if (handle__WriteProperties == 0) { + return QsciLexerYAML::writeProperties(qs, prefix); + } + + QSettings& qs_ret = qs; + // Cast returned reference into pointer + QSettings* sigval1 = &qs_ret; + const QString prefix_ret = prefix; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray prefix_b = prefix_ret.toUtf8(); + struct miqt_string prefix_ms; + prefix_ms.len = prefix_b.length(); + prefix_ms.data = static_cast(malloc(prefix_ms.len)); + memcpy(prefix_ms.data, prefix_b.data(), prefix_ms.len); + struct miqt_string sigval2 = prefix_ms; + + bool callback_return_value = miqt_exec_callback_QsciLexerYAML_WriteProperties(const_cast(this), handle__WriteProperties, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WriteProperties(QSettings* qs, struct miqt_string prefix) const { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + + return QsciLexerYAML::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(); + *outptr_QsciLexerYAML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QsciLexerYAML* QsciLexerYAML_new2(QObject* parent) { - return new QsciLexerYAML(parent); +void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(parent); + *outptr_QsciLexerYAML = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self) { @@ -109,7 +969,283 @@ struct miqt_string QsciLexerYAML_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciLexerYAML_Delete(QsciLexerYAML* self) { - delete self; +void QsciLexerYAML_override_virtual_SetFoldComments(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetFoldComments = slot; +} + +void QsciLexerYAML_virtualbase_SetFoldComments(void* self, bool fold) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetFoldComments(fold); +} + +void QsciLexerYAML_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Language = slot; +} + +void QsciLexerYAML_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerYAML_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerYAML_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__LexerId = slot; +} + +int QsciLexerYAML_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerYAML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerYAML_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerYAML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerYAML_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerYAML_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerYAML_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerYAML_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerYAML_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerYAML_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerYAML_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerYAML_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerYAML_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerYAML_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerYAML_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerYAML_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerYAML_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerYAML_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerYAML_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Color(style); +} + +void QsciLexerYAML_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerYAML_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerYAML_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerYAML_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Font(style); +} + +void QsciLexerYAML_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerYAML_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerYAML_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerYAML_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerYAML_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerYAML_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerYAML_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Description = slot; +} + +void QsciLexerYAML_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerYAML_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerYAML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerYAML_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerYAML_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerYAML_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerYAML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerYAML_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerYAML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerYAML_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerYAML_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerYAML_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerYAML_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerYAML_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerYAML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerYAML_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerYAML_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerYAML_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerYAML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerYAML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerYAML_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetColor = slot; +} + +void QsciLexerYAML_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerYAML_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerYAML_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerYAML_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetFont = slot; +} + +void QsciLexerYAML_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerYAML_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerYAML_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerYAML_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerYAML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerYAML_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerYAML*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerYAML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerYAML*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexerYAML_Delete(QsciLexerYAML* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go index f4b06eff..1e19fb7b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -30,7 +31,8 @@ const ( ) type QsciLexerYAML struct { - h *C.QsciLexerYAML + h *C.QsciLexerYAML + isSubclass bool *QsciLexer } @@ -48,27 +50,47 @@ func (this *QsciLexerYAML) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciLexerYAML(h *C.QsciLexerYAML) *QsciLexerYAML { +// newQsciLexerYAML constructs the type using only CGO pointers. +func newQsciLexerYAML(h *C.QsciLexerYAML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerYAML { if h == nil { return nil } - return &QsciLexerYAML{h: h, QsciLexer: UnsafeNewQsciLexer(unsafe.Pointer(h))} + return &QsciLexerYAML{h: h, + QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} } -func UnsafeNewQsciLexerYAML(h unsafe.Pointer) *QsciLexerYAML { - return newQsciLexerYAML((*C.QsciLexerYAML)(h)) +// UnsafeNewQsciLexerYAML constructs the type using only unsafe pointers. +func UnsafeNewQsciLexerYAML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerYAML { + if h == nil { + return nil + } + + return &QsciLexerYAML{h: (*C.QsciLexerYAML)(h), + QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } // NewQsciLexerYAML constructs a new QsciLexerYAML object. func NewQsciLexerYAML() *QsciLexerYAML { - ret := C.QsciLexerYAML_new() - return newQsciLexerYAML(ret) + var outptr_QsciLexerYAML *C.QsciLexerYAML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerYAML_new(&outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciLexerYAML2 constructs a new QsciLexerYAML object. func NewQsciLexerYAML2(parent *qt6.QObject) *QsciLexerYAML { - ret := C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer())) - return newQsciLexerYAML(ret) + var outptr_QsciLexerYAML *C.QsciLexerYAML = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciLexerYAML) MetaObject() *qt6.QMetaObject { @@ -171,9 +193,917 @@ func QsciLexerYAML_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciLexerYAML) callVirtualBase_SetFoldComments(fold bool) { + + C.QsciLexerYAML_virtualbase_SetFoldComments(unsafe.Pointer(this.h), (C.bool)(fold)) + +} +func (this *QsciLexerYAML) OnSetFoldComments(slot func(super func(fold bool), fold bool)) { + C.QsciLexerYAML_override_virtual_SetFoldComments(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetFoldComments +func miqt_exec_callback_QsciLexerYAML_SetFoldComments(self *C.QsciLexerYAML, cb C.intptr_t, fold C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold bool), fold bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(fold) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetFoldComments, slotval1) + +} + +func (this *QsciLexerYAML) callVirtualBase_Language() string { + + _ret := C.QsciLexerYAML_virtualbase_Language(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnLanguage(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Language +func miqt_exec_callback_QsciLexerYAML_Language(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Language) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerYAML_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnLexer(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Lexer +func miqt_exec_callback_QsciLexerYAML_Lexer(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerYAML_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnLexerId(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_LexerId +func miqt_exec_callback_QsciLexerYAML_LexerId(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerYAML_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_AutoCompletionFillups +func miqt_exec_callback_QsciLexerYAML_AutoCompletionFillups(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerYAML_virtualbase_AutoCompletionWordSeparators(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciLexerYAML) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerYAML_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerYAML_AutoCompletionWordSeparators(self *C.QsciLexerYAML, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_AutoCompletionWordSeparators) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerYAML_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerYAML_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockEnd +func miqt_exec_callback_QsciLexerYAML_BlockEnd(self *C.QsciLexerYAML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerYAML_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockLookback +func miqt_exec_callback_QsciLexerYAML_BlockLookback(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerYAML_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerYAML_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockStart +func miqt_exec_callback_QsciLexerYAML_BlockStart(self *C.QsciLexerYAML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerYAML_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerYAML_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BlockStartKeyword +func miqt_exec_callback_QsciLexerYAML_BlockStartKeyword(self *C.QsciLexerYAML, cb C.intptr_t, style *C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style *int) string, style *int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*int)(unsafe.Pointer(style)) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerYAML_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_BraceStyle +func miqt_exec_callback_QsciLexerYAML_BraceStyle(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerYAML_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerYAML_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_CaseSensitive +func miqt_exec_callback_QsciLexerYAML_CaseSensitive(self *C.QsciLexerYAML, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerYAML_virtualbase_Color(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerYAML_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Color +func miqt_exec_callback_QsciLexerYAML_Color(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerYAML_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerYAML) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerYAML_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_EolFill +func miqt_exec_callback_QsciLexerYAML_EolFill(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerYAML_virtualbase_Font(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerYAML_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Font +func miqt_exec_callback_QsciLexerYAML_Font(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerYAML_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_IndentationGuideView +func miqt_exec_callback_QsciLexerYAML_IndentationGuideView(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerYAML_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerYAML_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Keywords +func miqt_exec_callback_QsciLexerYAML_Keywords(self *C.QsciLexerYAML, cb C.intptr_t, set C.int) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(set int) string, set int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(set) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerYAML_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultStyle +func miqt_exec_callback_QsciLexerYAML_DefaultStyle(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_Description(style int) string { + + var _ms C.struct_miqt_string = C.QsciLexerYAML_virtualbase_Description(unsafe.Pointer(this.h), (C.int)(style)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QsciLexerYAML) OnDescription(slot func(super func(style int) string, style int) string) { + C.QsciLexerYAML_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Description +func miqt_exec_callback_QsciLexerYAML_Description(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) string, style int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QsciLexerYAML) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerYAML_virtualbase_Paper(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerYAML_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_Paper +func miqt_exec_callback_QsciLexerYAML_Paper(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerYAML_virtualbase_DefaultColorWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerYAML_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerYAML_DefaultColorWithStyle(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerYAML_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerYAML) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerYAML_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultEolFill +func miqt_exec_callback_QsciLexerYAML_DefaultEolFill(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) bool, style int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerYAML_virtualbase_DefaultFontWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQFont(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerYAML_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerYAML_DefaultFontWithStyle(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QFont { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QFont, style int) *qt6.QFont) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerYAML_virtualbase_DefaultPaperWithStyle(unsafe.Pointer(this.h), (C.int)(style)) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciLexerYAML) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerYAML_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerYAML_DefaultPaperWithStyle(self *C.QsciLexerYAML, cb C.intptr_t, style C.int) *C.QColor { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(style int) *qt6.QColor, style int) *qt6.QColor) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(style) + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerYAML_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerYAML) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerYAML_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetEditor +func miqt_exec_callback_QsciLexerYAML_SetEditor(self *C.QsciLexerYAML, cb C.intptr_t, editor *C.QsciScintilla) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QsciScintilla), editor *QsciScintilla)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintilla(unsafe.Pointer(editor), nil, nil, nil, nil, nil, nil) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerYAML) callVirtualBase_RefreshProperties() { + + C.QsciLexerYAML_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerYAML) OnRefreshProperties(slot func(super func())) { + C.QsciLexerYAML_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_RefreshProperties +func miqt_exec_callback_QsciLexerYAML_RefreshProperties(self *C.QsciLexerYAML, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerYAML) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerYAML_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerYAML) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerYAML_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_StyleBitsNeeded +func miqt_exec_callback_QsciLexerYAML_StyleBitsNeeded(self *C.QsciLexerYAML, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerYAML_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerYAML) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerYAML_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_WordCharacters +func miqt_exec_callback_QsciLexerYAML_WordCharacters(self *C.QsciLexerYAML, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerYAML) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerYAML_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerYAML) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerYAML_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerYAML_SetAutoIndentStyle(self *C.QsciLexerYAML, cb C.intptr_t, autoindentstyle C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindentstyle int), autoindentstyle int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(autoindentstyle) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerYAML_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerYAML_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetColor +func miqt_exec_callback_QsciLexerYAML_SetColor(self *C.QsciLexerYAML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerYAML_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerYAML_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetEolFill +func miqt_exec_callback_QsciLexerYAML_SetEolFill(self *C.QsciLexerYAML, cb C.intptr_t, eoffill C.bool, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eoffill bool, style int), eoffill bool, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(eoffill) + + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerYAML_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerYAML_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetFont +func miqt_exec_callback_QsciLexerYAML_SetFont(self *C.QsciLexerYAML, cb C.intptr_t, f *C.QFont, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerYAML_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerYAML) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerYAML_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_SetPaper +func miqt_exec_callback_QsciLexerYAML_SetPaper(self *C.QsciLexerYAML, cb C.intptr_t, c *C.QColor, style C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + slotval2 := (int)(style) + + gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerYAML) callVirtualBase_ReadProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerYAML_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerYAML) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerYAML_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_ReadProperties +func miqt_exec_callback_QsciLexerYAML_ReadProperties(self *C.QsciLexerYAML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerYAML) callVirtualBase_WriteProperties(qs *qt6.QSettings, prefix string) bool { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + + return (bool)(C.QsciLexerYAML_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerYAML) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerYAML_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerYAML_WriteProperties +func miqt_exec_callback_QsciLexerYAML_WriteProperties(self *C.QsciLexerYAML, cb C.intptr_t, qs *C.QSettings, prefix C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + var prefix_ms C.struct_miqt_string = prefix + prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) + C.free(unsafe.Pointer(prefix_ms.data)) + slotval2 := prefix_ret + + virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QsciLexerYAML) Delete() { - C.QsciLexerYAML_Delete(this.h) + C.QsciLexerYAML_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h index c8760172..0ca8d25c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h @@ -19,17 +19,23 @@ class QColor; class QFont; class QMetaObject; class QObject; +class QSettings; +class QsciLexer; class QsciLexerYAML; +class QsciScintilla; #else typedef struct QColor QColor; typedef struct QFont QFont; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QSettings QSettings; +typedef struct QsciLexer QsciLexer; typedef struct QsciLexerYAML QsciLexerYAML; +typedef struct QsciScintilla QsciScintilla; #endif -QsciLexerYAML* QsciLexerYAML_new(); -QsciLexerYAML* QsciLexerYAML_new2(QObject* parent); +void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self); void* QsciLexerYAML_Metacast(QsciLexerYAML* self, const char* param1); struct miqt_string QsciLexerYAML_Tr(const char* s); @@ -46,7 +52,77 @@ bool QsciLexerYAML_FoldComments(const QsciLexerYAML* self); void QsciLexerYAML_SetFoldComments(QsciLexerYAML* self, bool fold); struct miqt_string QsciLexerYAML_Tr2(const char* s, const char* c); struct miqt_string QsciLexerYAML_Tr3(const char* s, const char* c, int n); -void QsciLexerYAML_Delete(QsciLexerYAML* self); +void QsciLexerYAML_override_virtual_SetFoldComments(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetFoldComments(void* self, bool fold); +void QsciLexerYAML_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_Language(const void* self); +void QsciLexerYAML_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_Lexer(const void* self); +void QsciLexerYAML_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_LexerId(const void* self); +void QsciLexerYAML_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerYAML_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerYAML_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerYAML_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerYAML_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_BlockLookback(const void* self); +void QsciLexerYAML_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerYAML_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerYAML_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_BraceStyle(const void* self); +void QsciLexerYAML_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_CaseSensitive(const void* self); +void QsciLexerYAML_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_Color(const void* self, int style); +void QsciLexerYAML_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_EolFill(const void* self, int style); +void QsciLexerYAML_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerYAML_virtualbase_Font(const void* self, int style); +void QsciLexerYAML_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_IndentationGuideView(const void* self); +void QsciLexerYAML_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_Keywords(const void* self, int set); +void QsciLexerYAML_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_DefaultStyle(const void* self); +void QsciLexerYAML_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerYAML_virtualbase_Description(const void* self, int style); +void QsciLexerYAML_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_Paper(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerYAML_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerYAML_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerYAML_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerYAML_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerYAML_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_RefreshProperties(void* self); +void QsciLexerYAML_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerYAML_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerYAML_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerYAML_virtualbase_WordCharacters(const void* self); +void QsciLexerYAML_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerYAML_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerYAML_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerYAML_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerYAML_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerYAML_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerYAML_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerYAML_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerYAML_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerYAML_Delete(QsciLexerYAML* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp b/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp index 57cca406..feef8139 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp @@ -1,18 +1,277 @@ +#include +#include +#include #include +#include #include #include #include +#include #include #include "gen_qscimacro.h" #include "_cgo_export.h" -QsciMacro* QsciMacro_new(QsciScintilla* parent) { - return new QsciMacro(parent); +class MiqtVirtualQsciMacro : public virtual QsciMacro { +public: + + MiqtVirtualQsciMacro(QsciScintilla* parent): QsciMacro(parent) {}; + MiqtVirtualQsciMacro(const QString& asc, QsciScintilla* parent): QsciMacro(asc, parent) {}; + + virtual ~MiqtVirtualQsciMacro() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Play = 0; + + // Subclass to allow providing a Go implementation + virtual void play() override { + if (handle__Play == 0) { + QsciMacro::play(); + return; + } + + + miqt_exec_callback_QsciMacro_Play(this, handle__Play); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Play() { + + QsciMacro::play(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartRecording = 0; + + // Subclass to allow providing a Go implementation + virtual void startRecording() override { + if (handle__StartRecording == 0) { + QsciMacro::startRecording(); + return; + } + + + miqt_exec_callback_QsciMacro_StartRecording(this, handle__StartRecording); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartRecording() { + + QsciMacro::startRecording(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EndRecording = 0; + + // Subclass to allow providing a Go implementation + virtual void endRecording() override { + if (handle__EndRecording == 0) { + QsciMacro::endRecording(); + return; + } + + + miqt_exec_callback_QsciMacro_EndRecording(this, handle__EndRecording); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EndRecording() { + + QsciMacro::endRecording(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QsciMacro::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QsciMacro_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QsciMacro::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QsciMacro::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QsciMacro_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QsciMacro::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QsciMacro::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QsciMacro_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QsciMacro::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QsciMacro::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QsciMacro_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QsciMacro::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QsciMacro::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QsciMacro_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QsciMacro::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QsciMacro::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciMacro_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QsciMacro::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QsciMacro::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciMacro_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QsciMacro::disconnectNotify(*signal); + + } + +}; + +void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { + MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(parent); + *outptr_QsciMacro = ret; + *outptr_QObject = static_cast(ret); } -QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent) { +void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { QString asc_QString = QString::fromUtf8(asc.data, asc.len); - return new QsciMacro(asc_QString, parent); + MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(asc_QString, parent); + *outptr_QsciMacro = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QsciMacro_MetaObject(const QsciMacro* self) { @@ -88,7 +347,91 @@ struct miqt_string QsciMacro_Tr3(const char* s, const char* c, int n) { return _ms; } -void QsciMacro_Delete(QsciMacro* self) { - delete self; +void QsciMacro_override_virtual_Play(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__Play = slot; +} + +void QsciMacro_virtualbase_Play(void* self) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_Play(); +} + +void QsciMacro_override_virtual_StartRecording(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__StartRecording = slot; +} + +void QsciMacro_virtualbase_StartRecording(void* self) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_StartRecording(); +} + +void QsciMacro_override_virtual_EndRecording(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__EndRecording = slot; +} + +void QsciMacro_virtualbase_EndRecording(void* self) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_EndRecording(); +} + +void QsciMacro_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__Event = slot; +} + +bool QsciMacro_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_Event(event); +} + +void QsciMacro_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__EventFilter = slot; +} + +bool QsciMacro_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QsciMacro_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__TimerEvent = slot; +} + +void QsciMacro_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_TimerEvent(event); +} + +void QsciMacro_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__ChildEvent = slot; +} + +void QsciMacro_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_ChildEvent(event); +} + +void QsciMacro_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__CustomEvent = slot; +} + +void QsciMacro_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_CustomEvent(event); +} + +void QsciMacro_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__ConnectNotify = slot; +} + +void QsciMacro_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QsciMacro_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciMacro*)(self) )->handle__DisconnectNotify = slot; +} + +void QsciMacro_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciMacro*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QsciMacro_Delete(QsciMacro* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscimacro.go b/qt-restricted-extras/qscintilla6/gen_qscimacro.go index 9d12fde8..7b5064b4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscimacro.go +++ b/qt-restricted-extras/qscintilla6/gen_qscimacro.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QsciMacro struct { - h *C.QsciMacro + h *C.QsciMacro + isSubclass bool *qt6.QObject } @@ -33,21 +35,34 @@ func (this *QsciMacro) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciMacro(h *C.QsciMacro) *QsciMacro { +// newQsciMacro constructs the type using only CGO pointers. +func newQsciMacro(h *C.QsciMacro, h_QObject *C.QObject) *QsciMacro { if h == nil { return nil } - return &QsciMacro{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QsciMacro{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQsciMacro(h unsafe.Pointer) *QsciMacro { - return newQsciMacro((*C.QsciMacro)(h)) +// UnsafeNewQsciMacro constructs the type using only unsafe pointers. +func UnsafeNewQsciMacro(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciMacro { + if h == nil { + return nil + } + + return &QsciMacro{h: (*C.QsciMacro)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQsciMacro constructs a new QsciMacro object. func NewQsciMacro(parent *QsciScintilla) *QsciMacro { - ret := C.QsciMacro_new(parent.cPointer()) - return newQsciMacro(ret) + var outptr_QsciMacro *C.QsciMacro = nil + var outptr_QObject *C.QObject = nil + + C.QsciMacro_new(parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) + ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret.isSubclass = true + return ret } // NewQsciMacro2 constructs a new QsciMacro object. @@ -56,8 +71,13 @@ func NewQsciMacro2(asc string, parent *QsciScintilla) *QsciMacro { asc_ms.data = C.CString(asc) asc_ms.len = C.size_t(len(asc)) defer C.free(unsafe.Pointer(asc_ms.data)) - ret := C.QsciMacro_new2(asc_ms, parent.cPointer()) - return newQsciMacro(ret) + var outptr_QsciMacro *C.QsciMacro = nil + var outptr_QObject *C.QObject = nil + + C.QsciMacro_new2(asc_ms, parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) + ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QsciMacro) MetaObject() *qt6.QMetaObject { @@ -132,9 +152,235 @@ func QsciMacro_Tr3(s string, c string, n int) string { return _ret } +func (this *QsciMacro) callVirtualBase_Play() { + + C.QsciMacro_virtualbase_Play(unsafe.Pointer(this.h)) + +} +func (this *QsciMacro) OnPlay(slot func(super func())) { + C.QsciMacro_override_virtual_Play(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_Play +func miqt_exec_callback_QsciMacro_Play(self *C.QsciMacro, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciMacro{h: self}).callVirtualBase_Play) + +} + +func (this *QsciMacro) callVirtualBase_StartRecording() { + + C.QsciMacro_virtualbase_StartRecording(unsafe.Pointer(this.h)) + +} +func (this *QsciMacro) OnStartRecording(slot func(super func())) { + C.QsciMacro_override_virtual_StartRecording(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_StartRecording +func miqt_exec_callback_QsciMacro_StartRecording(self *C.QsciMacro, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciMacro{h: self}).callVirtualBase_StartRecording) + +} + +func (this *QsciMacro) callVirtualBase_EndRecording() { + + C.QsciMacro_virtualbase_EndRecording(unsafe.Pointer(this.h)) + +} +func (this *QsciMacro) OnEndRecording(slot func(super func())) { + C.QsciMacro_override_virtual_EndRecording(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_EndRecording +func miqt_exec_callback_QsciMacro_EndRecording(self *C.QsciMacro, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciMacro{h: self}).callVirtualBase_EndRecording) + +} + +func (this *QsciMacro) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QsciMacro_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciMacro) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QsciMacro_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_Event +func miqt_exec_callback_QsciMacro_Event(self *C.QsciMacro, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QsciMacro{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciMacro) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QsciMacro_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciMacro) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QsciMacro_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_EventFilter +func miqt_exec_callback_QsciMacro_EventFilter(self *C.QsciMacro, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QsciMacro{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciMacro) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QsciMacro_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QsciMacro) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QsciMacro_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_TimerEvent +func miqt_exec_callback_QsciMacro_TimerEvent(self *C.QsciMacro, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciMacro{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QsciMacro_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QsciMacro) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QsciMacro_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_ChildEvent +func miqt_exec_callback_QsciMacro_ChildEvent(self *C.QsciMacro, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciMacro{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QsciMacro_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QsciMacro) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QsciMacro_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_CustomEvent +func miqt_exec_callback_QsciMacro_CustomEvent(self *C.QsciMacro, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QsciMacro{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QsciMacro_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciMacro) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QsciMacro_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_ConnectNotify +func miqt_exec_callback_QsciMacro_ConnectNotify(self *C.QsciMacro, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QsciMacro{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QsciMacro) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QsciMacro_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciMacro) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QsciMacro_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciMacro_DisconnectNotify +func miqt_exec_callback_QsciMacro_DisconnectNotify(self *C.QsciMacro, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QsciMacro{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QsciMacro) Delete() { - C.QsciMacro_Delete(this.h) + C.QsciMacro_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscimacro.h b/qt-restricted-extras/qscintilla6/gen_qscimacro.h index 3040f8e5..991a9b15 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscimacro.h +++ b/qt-restricted-extras/qscintilla6/gen_qscimacro.h @@ -15,17 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; +class QObject; +class QTimerEvent; class QsciMacro; class QsciScintilla; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QsciMacro QsciMacro; typedef struct QsciScintilla QsciScintilla; #endif -QsciMacro* QsciMacro_new(QsciScintilla* parent); -QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent); +void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); +void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); QMetaObject* QsciMacro_MetaObject(const QsciMacro* self); void* QsciMacro_Metacast(QsciMacro* self, const char* param1); struct miqt_string QsciMacro_Tr(const char* s); @@ -37,7 +47,27 @@ void QsciMacro_StartRecording(QsciMacro* self); void QsciMacro_EndRecording(QsciMacro* self); struct miqt_string QsciMacro_Tr2(const char* s, const char* c); struct miqt_string QsciMacro_Tr3(const char* s, const char* c, int n); -void QsciMacro_Delete(QsciMacro* self); +void QsciMacro_override_virtual_Play(void* self, intptr_t slot); +void QsciMacro_virtualbase_Play(void* self); +void QsciMacro_override_virtual_StartRecording(void* self, intptr_t slot); +void QsciMacro_virtualbase_StartRecording(void* self); +void QsciMacro_override_virtual_EndRecording(void* self, intptr_t slot); +void QsciMacro_virtualbase_EndRecording(void* self); +void QsciMacro_override_virtual_Event(void* self, intptr_t slot); +bool QsciMacro_virtualbase_Event(void* self, QEvent* event); +void QsciMacro_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciMacro_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QsciMacro_override_virtual_TimerEvent(void* self, intptr_t slot); +void QsciMacro_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QsciMacro_override_virtual_ChildEvent(void* self, intptr_t slot); +void QsciMacro_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QsciMacro_override_virtual_CustomEvent(void* self, intptr_t slot); +void QsciMacro_virtualbase_CustomEvent(void* self, QEvent* event); +void QsciMacro_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QsciMacro_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QsciMacro_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QsciMacro_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QsciMacro_Delete(QsciMacro* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp b/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp index 2659aee8..d3403b26 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp @@ -1,15 +1,260 @@ +#include +#include +#include #include +#include #include #include #include "gen_qsciprinter.h" #include "_cgo_export.h" -QsciPrinter* QsciPrinter_new() { - return new QsciPrinter(); +class MiqtVirtualQsciPrinter : public virtual QsciPrinter { +public: + + MiqtVirtualQsciPrinter(): QsciPrinter() {}; + MiqtVirtualQsciPrinter(QPrinter::PrinterMode mode): QsciPrinter(mode) {}; + + virtual ~MiqtVirtualQsciPrinter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FormatPage = 0; + + // Subclass to allow providing a Go implementation + virtual void formatPage(QPainter& painter, bool drawing, QRect& area, int pagenr) override { + if (handle__FormatPage == 0) { + QsciPrinter::formatPage(painter, drawing, area, pagenr); + return; + } + + QPainter& painter_ret = painter; + // Cast returned reference into pointer + QPainter* sigval1 = &painter_ret; + bool sigval2 = drawing; + QRect& area_ret = area; + // Cast returned reference into pointer + QRect* sigval3 = &area_ret; + int sigval4 = pagenr; + + miqt_exec_callback_QsciPrinter_FormatPage(this, handle__FormatPage, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FormatPage(QPainter* painter, bool drawing, QRect* area, int pagenr) { + + QsciPrinter::formatPage(*painter, drawing, *area, static_cast(pagenr)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMagnification = 0; + + // Subclass to allow providing a Go implementation + virtual void setMagnification(int magnification) override { + if (handle__SetMagnification == 0) { + QsciPrinter::setMagnification(magnification); + return; + } + + int sigval1 = magnification; + + miqt_exec_callback_QsciPrinter_SetMagnification(this, handle__SetMagnification, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMagnification(int magnification) { + + QsciPrinter::setMagnification(static_cast(magnification)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PrintRange = 0; + + // Subclass to allow providing a Go implementation + virtual int printRange(QsciScintillaBase* qsb, QPainter& painter, int from, int to) override { + if (handle__PrintRange == 0) { + return QsciPrinter::printRange(qsb, painter, from, to); + } + + QsciScintillaBase* sigval1 = qsb; + QPainter& painter_ret = painter; + // Cast returned reference into pointer + QPainter* sigval2 = &painter_ret; + int sigval3 = from; + int sigval4 = to; + + int callback_return_value = miqt_exec_callback_QsciPrinter_PrintRange(this, handle__PrintRange, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PrintRange(QsciScintillaBase* qsb, QPainter* painter, int from, int to) { + + return QsciPrinter::printRange(qsb, *painter, static_cast(from), static_cast(to)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PrintRange2 = 0; + + // Subclass to allow providing a Go implementation + virtual int printRange(QsciScintillaBase* qsb, int from, int to) override { + if (handle__PrintRange2 == 0) { + return QsciPrinter::printRange(qsb, from, to); + } + + QsciScintillaBase* sigval1 = qsb; + int sigval2 = from; + int sigval3 = to; + + int callback_return_value = miqt_exec_callback_QsciPrinter_PrintRange2(this, handle__PrintRange2, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PrintRange2(QsciScintillaBase* qsb, int from, int to) { + + return QsciPrinter::printRange(qsb, static_cast(from), static_cast(to)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetWrapMode = 0; + + // Subclass to allow providing a Go implementation + virtual void setWrapMode(QsciScintilla::WrapMode wmode) override { + if (handle__SetWrapMode == 0) { + QsciPrinter::setWrapMode(wmode); + return; + } + + QsciScintilla::WrapMode wmode_ret = wmode; + int sigval1 = static_cast(wmode_ret); + + miqt_exec_callback_QsciPrinter_SetWrapMode(this, handle__SetWrapMode, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetWrapMode(int wmode) { + + QsciPrinter::setWrapMode(static_cast(wmode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QsciPrinter::devType(); + } + + + int callback_return_value = miqt_exec_callback_QsciPrinter_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QsciPrinter::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool newPage() override { + if (handle__NewPage == 0) { + return QsciPrinter::newPage(); + } + + + bool callback_return_value = miqt_exec_callback_QsciPrinter_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NewPage() { + + return QsciPrinter::newPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QsciPrinter::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QsciPrinter_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QsciPrinter::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QsciPrinter::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QsciPrinter_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QsciPrinter::metric(static_cast(param1)); + + } + +}; + +void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(); + *outptr_QsciPrinter = ret; + *outptr_QPrinter = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QsciPrinter* QsciPrinter_new2(int mode) { - return new QsciPrinter(static_cast(mode)); +void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(static_cast(mode)); + *outptr_QsciPrinter = ret; + *outptr_QPrinter = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr) { @@ -24,12 +269,12 @@ void QsciPrinter_SetMagnification(QsciPrinter* self, int magnification) { self->setMagnification(static_cast(magnification)); } -int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter) { - return self->printRange(qsb, *painter); +int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to) { + return self->printRange(qsb, *painter, static_cast(from), static_cast(to)); } -int QsciPrinter_PrintRangeWithQsb(QsciPrinter* self, QsciScintillaBase* qsb) { - return self->printRange(qsb); +int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to) { + return self->printRange(qsb, static_cast(from), static_cast(to)); } int QsciPrinter_WrapMode(const QsciPrinter* self) { @@ -41,23 +286,83 @@ void QsciPrinter_SetWrapMode(QsciPrinter* self, int wmode) { self->setWrapMode(static_cast(wmode)); } -int QsciPrinter_PrintRange3(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from) { - return self->printRange(qsb, *painter, static_cast(from)); +void QsciPrinter_override_virtual_FormatPage(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__FormatPage = slot; } -int QsciPrinter_PrintRange4(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to) { - return self->printRange(qsb, *painter, static_cast(from), static_cast(to)); +void QsciPrinter_virtualbase_FormatPage(void* self, QPainter* painter, bool drawing, QRect* area, int pagenr) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_FormatPage(painter, drawing, area, pagenr); } -int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from) { - return self->printRange(qsb, static_cast(from)); +void QsciPrinter_override_virtual_SetMagnification(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetMagnification = slot; } -int QsciPrinter_PrintRange32(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to) { - return self->printRange(qsb, static_cast(from), static_cast(to)); +void QsciPrinter_virtualbase_SetMagnification(void* self, int magnification) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetMagnification(magnification); +} + +void QsciPrinter_override_virtual_PrintRange(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__PrintRange = slot; +} + +int QsciPrinter_virtualbase_PrintRange(void* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to) { + return ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_PrintRange(qsb, painter, from, to); +} + +void QsciPrinter_override_virtual_PrintRange2(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__PrintRange2 = slot; +} + +int QsciPrinter_virtualbase_PrintRange2(void* self, QsciScintillaBase* qsb, int from, int to) { + return ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_PrintRange2(qsb, from, to); +} + +void QsciPrinter_override_virtual_SetWrapMode(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__SetWrapMode = slot; +} + +void QsciPrinter_virtualbase_SetWrapMode(void* self, int wmode) { + ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_SetWrapMode(wmode); +} + +void QsciPrinter_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__DevType = slot; +} + +int QsciPrinter_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQsciPrinter*)(self) )->virtualbase_DevType(); +} + +void QsciPrinter_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__NewPage = slot; +} + +bool QsciPrinter_virtualbase_NewPage(void* self) { + return ( (MiqtVirtualQsciPrinter*)(self) )->virtualbase_NewPage(); +} + +void QsciPrinter_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QsciPrinter_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQsciPrinter*)(self) )->virtualbase_PaintEngine(); +} + +void QsciPrinter_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QsciPrinter*)(self) )->handle__Metric = slot; +} + +int QsciPrinter_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQsciPrinter*)(self) )->virtualbase_Metric(param1); } -void QsciPrinter_Delete(QsciPrinter* self) { - delete self; +void QsciPrinter_Delete(QsciPrinter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qsciprinter.go b/qt-restricted-extras/qscintilla6/gen_qsciprinter.go index 626e8b97..c4cb1543 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciprinter.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciprinter.go @@ -12,11 +12,13 @@ import ( "github.com/mappu/miqt/qt6" "github.com/mappu/miqt/qt6/printsupport" "runtime" + "runtime/cgo" "unsafe" ) type QsciPrinter struct { - h *C.QsciPrinter + h *C.QsciPrinter + isSubclass bool *printsupport.QPrinter } @@ -34,27 +36,49 @@ func (this *QsciPrinter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciPrinter(h *C.QsciPrinter) *QsciPrinter { +// newQsciPrinter constructs the type using only CGO pointers. +func newQsciPrinter(h *C.QsciPrinter, h_QPrinter *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QsciPrinter { if h == nil { return nil } - return &QsciPrinter{h: h, QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(h))} + return &QsciPrinter{h: h, + QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(h_QPrinter), unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQsciPrinter(h unsafe.Pointer) *QsciPrinter { - return newQsciPrinter((*C.QsciPrinter)(h)) +// UnsafeNewQsciPrinter constructs the type using only unsafe pointers. +func UnsafeNewQsciPrinter(h unsafe.Pointer, h_QPrinter unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciPrinter { + if h == nil { + return nil + } + + return &QsciPrinter{h: (*C.QsciPrinter)(h), + QPrinter: printsupport.UnsafeNewQPrinter(h_QPrinter, h_QPagedPaintDevice, h_QPaintDevice)} } // NewQsciPrinter constructs a new QsciPrinter object. func NewQsciPrinter() *QsciPrinter { - ret := C.QsciPrinter_new() - return newQsciPrinter(ret) + var outptr_QsciPrinter *C.QsciPrinter = nil + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciPrinter_new(&outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQsciPrinter2 constructs a new QsciPrinter object. func NewQsciPrinter2(mode printsupport.QPrinter__PrinterMode) *QsciPrinter { - ret := C.QsciPrinter_new2((C.int)(mode)) - return newQsciPrinter(ret) + var outptr_QsciPrinter *C.QsciPrinter = nil + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciPrinter_new2((C.int)(mode), &outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QsciPrinter) FormatPage(painter *qt6.QPainter, drawing bool, area *qt6.QRect, pagenr int) { @@ -69,12 +93,12 @@ func (this *QsciPrinter) SetMagnification(magnification int) { C.QsciPrinter_SetMagnification(this.h, (C.int)(magnification)) } -func (this *QsciPrinter) PrintRange(qsb *QsciScintillaBase, painter *qt6.QPainter) int { - return (int)(C.QsciPrinter_PrintRange(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()))) +func (this *QsciPrinter) PrintRange(qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int { + return (int)(C.QsciPrinter_PrintRange(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from), (C.int)(to))) } -func (this *QsciPrinter) PrintRangeWithQsb(qsb *QsciScintillaBase) int { - return (int)(C.QsciPrinter_PrintRangeWithQsb(this.h, qsb.cPointer())) +func (this *QsciPrinter) PrintRange2(qsb *QsciScintillaBase, from int, to int) int { + return (int)(C.QsciPrinter_PrintRange2(this.h, qsb.cPointer(), (C.int)(from), (C.int)(to))) } func (this *QsciPrinter) WrapMode() QsciScintilla__WrapMode { @@ -85,25 +109,229 @@ func (this *QsciPrinter) SetWrapMode(wmode QsciScintilla__WrapMode) { C.QsciPrinter_SetWrapMode(this.h, (C.int)(wmode)) } -func (this *QsciPrinter) PrintRange3(qsb *QsciScintillaBase, painter *qt6.QPainter, from int) int { - return (int)(C.QsciPrinter_PrintRange3(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from))) +func (this *QsciPrinter) callVirtualBase_FormatPage(painter *qt6.QPainter, drawing bool, area *qt6.QRect, pagenr int) { + + C.QsciPrinter_virtualbase_FormatPage(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (C.bool)(drawing), (*C.QRect)(area.UnsafePointer()), (C.int)(pagenr)) + +} +func (this *QsciPrinter) OnFormatPage(slot func(super func(painter *qt6.QPainter, drawing bool, area *qt6.QRect, pagenr int), painter *qt6.QPainter, drawing bool, area *qt6.QRect, pagenr int)) { + C.QsciPrinter_override_virtual_FormatPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_FormatPage +func miqt_exec_callback_QsciPrinter_FormatPage(self *C.QsciPrinter, cb C.intptr_t, painter *C.QPainter, drawing C.bool, area *C.QRect, pagenr C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter, drawing bool, area *qt6.QRect, pagenr int), painter *qt6.QPainter, drawing bool, area *qt6.QRect, pagenr int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := (bool)(drawing) + + slotval3 := qt6.UnsafeNewQRect(unsafe.Pointer(area)) + slotval4 := (int)(pagenr) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_FormatPage, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QsciPrinter) callVirtualBase_SetMagnification(magnification int) { + + C.QsciPrinter_virtualbase_SetMagnification(unsafe.Pointer(this.h), (C.int)(magnification)) + +} +func (this *QsciPrinter) OnSetMagnification(slot func(super func(magnification int), magnification int)) { + C.QsciPrinter_override_virtual_SetMagnification(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_SetMagnification +func miqt_exec_callback_QsciPrinter_SetMagnification(self *C.QsciPrinter, cb C.intptr_t, magnification C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(magnification int), magnification int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(magnification) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetMagnification, slotval1) + +} + +func (this *QsciPrinter) callVirtualBase_PrintRange(qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int { + + return (int)(C.QsciPrinter_virtualbase_PrintRange(unsafe.Pointer(this.h), qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from), (C.int)(to))) + +} +func (this *QsciPrinter) OnPrintRange(slot func(super func(qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int, qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int) { + C.QsciPrinter_override_virtual_PrintRange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_PrintRange +func miqt_exec_callback_QsciPrinter_PrintRange(self *C.QsciPrinter, cb C.intptr_t, qsb *C.QsciScintillaBase, painter *C.QPainter, from C.int, to C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int, qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintillaBase(unsafe.Pointer(qsb), nil, nil, nil, nil, nil) + slotval2 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval3 := (int)(from) + + slotval4 := (int)(to) + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_PrintRange, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QsciPrinter) callVirtualBase_PrintRange2(qsb *QsciScintillaBase, from int, to int) int { + + return (int)(C.QsciPrinter_virtualbase_PrintRange2(unsafe.Pointer(this.h), qsb.cPointer(), (C.int)(from), (C.int)(to))) + +} +func (this *QsciPrinter) OnPrintRange2(slot func(super func(qsb *QsciScintillaBase, from int, to int) int, qsb *QsciScintillaBase, from int, to int) int) { + C.QsciPrinter_override_virtual_PrintRange2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_PrintRange2 +func miqt_exec_callback_QsciPrinter_PrintRange2(self *C.QsciPrinter, cb C.intptr_t, qsb *C.QsciScintillaBase, from C.int, to C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(qsb *QsciScintillaBase, from int, to int) int, qsb *QsciScintillaBase, from int, to int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciScintillaBase(unsafe.Pointer(qsb), nil, nil, nil, nil, nil) + slotval2 := (int)(from) + + slotval3 := (int)(to) + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_PrintRange2, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} + +func (this *QsciPrinter) callVirtualBase_SetWrapMode(wmode QsciScintilla__WrapMode) { + + C.QsciPrinter_virtualbase_SetWrapMode(unsafe.Pointer(this.h), (C.int)(wmode)) + +} +func (this *QsciPrinter) OnSetWrapMode(slot func(super func(wmode QsciScintilla__WrapMode), wmode QsciScintilla__WrapMode)) { + C.QsciPrinter_override_virtual_SetWrapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_SetWrapMode +func miqt_exec_callback_QsciPrinter_SetWrapMode(self *C.QsciPrinter, cb C.intptr_t, wmode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(wmode QsciScintilla__WrapMode), wmode QsciScintilla__WrapMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__WrapMode)(wmode) + + gofunc((&QsciPrinter{h: self}).callVirtualBase_SetWrapMode, slotval1) + +} + +func (this *QsciPrinter) callVirtualBase_DevType() int { + + return (int)(C.QsciPrinter_virtualbase_DevType(unsafe.Pointer(this.h))) + } +func (this *QsciPrinter) OnDevType(slot func(super func() int) int) { + C.QsciPrinter_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_DevType +func miqt_exec_callback_QsciPrinter_DevType(self *C.QsciPrinter, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) -func (this *QsciPrinter) PrintRange4(qsb *QsciScintillaBase, painter *qt6.QPainter, from int, to int) int { - return (int)(C.QsciPrinter_PrintRange4(this.h, qsb.cPointer(), (*C.QPainter)(painter.UnsafePointer()), (C.int)(from), (C.int)(to))) } -func (this *QsciPrinter) PrintRange2(qsb *QsciScintillaBase, from int) int { - return (int)(C.QsciPrinter_PrintRange2(this.h, qsb.cPointer(), (C.int)(from))) +func (this *QsciPrinter) callVirtualBase_NewPage() bool { + + return (bool)(C.QsciPrinter_virtualbase_NewPage(unsafe.Pointer(this.h))) + +} +func (this *QsciPrinter) OnNewPage(slot func(super func() bool) bool) { + C.QsciPrinter_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QsciPrinter) PrintRange32(qsb *QsciScintillaBase, from int, to int) int { - return (int)(C.QsciPrinter_PrintRange32(this.h, qsb.cPointer(), (C.int)(from), (C.int)(to))) +//export miqt_exec_callback_QsciPrinter_NewPage +func miqt_exec_callback_QsciPrinter_NewPage(self *C.QsciPrinter, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_NewPage) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciPrinter) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QsciPrinter_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QsciPrinter) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QsciPrinter_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_PaintEngine +func miqt_exec_callback_QsciPrinter_PaintEngine(self *C.QsciPrinter, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciPrinter) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QsciPrinter_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QsciPrinter) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QsciPrinter_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciPrinter_Metric +func miqt_exec_callback_QsciPrinter_Metric(self *C.QsciPrinter, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QsciPrinter{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + } // Delete this object from C++ memory. func (this *QsciPrinter) Delete() { - C.QsciPrinter_Delete(this.h) + C.QsciPrinter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qsciprinter.h b/qt-restricted-extras/qscintilla6/gen_qsciprinter.h index 222a273f..3ec6b0c0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciprinter.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciprinter.h @@ -15,31 +15,53 @@ extern "C" { #endif #ifdef __cplusplus +class QPagedPaintDevice; +class QPaintDevice; +class QPaintEngine; class QPainter; +class QPrinter; class QRect; class QsciPrinter; class QsciScintillaBase; #else +typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; typedef struct QPainter QPainter; +typedef struct QPrinter QPrinter; typedef struct QRect QRect; typedef struct QsciPrinter QsciPrinter; typedef struct QsciScintillaBase QsciScintillaBase; #endif -QsciPrinter* QsciPrinter_new(); -QsciPrinter* QsciPrinter_new2(int mode); +void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr); int QsciPrinter_Magnification(const QsciPrinter* self); void QsciPrinter_SetMagnification(QsciPrinter* self, int magnification); -int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter); -int QsciPrinter_PrintRangeWithQsb(QsciPrinter* self, QsciScintillaBase* qsb); +int QsciPrinter_PrintRange(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to); +int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to); int QsciPrinter_WrapMode(const QsciPrinter* self); void QsciPrinter_SetWrapMode(QsciPrinter* self, int wmode); -int QsciPrinter_PrintRange3(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from); -int QsciPrinter_PrintRange4(QsciPrinter* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to); -int QsciPrinter_PrintRange2(QsciPrinter* self, QsciScintillaBase* qsb, int from); -int QsciPrinter_PrintRange32(QsciPrinter* self, QsciScintillaBase* qsb, int from, int to); -void QsciPrinter_Delete(QsciPrinter* self); +void QsciPrinter_override_virtual_FormatPage(void* self, intptr_t slot); +void QsciPrinter_virtualbase_FormatPage(void* self, QPainter* painter, bool drawing, QRect* area, int pagenr); +void QsciPrinter_override_virtual_SetMagnification(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetMagnification(void* self, int magnification); +void QsciPrinter_override_virtual_PrintRange(void* self, intptr_t slot); +int QsciPrinter_virtualbase_PrintRange(void* self, QsciScintillaBase* qsb, QPainter* painter, int from, int to); +void QsciPrinter_override_virtual_PrintRange2(void* self, intptr_t slot); +int QsciPrinter_virtualbase_PrintRange2(void* self, QsciScintillaBase* qsb, int from, int to); +void QsciPrinter_override_virtual_SetWrapMode(void* self, intptr_t slot); +void QsciPrinter_virtualbase_SetWrapMode(void* self, int wmode); +void QsciPrinter_override_virtual_DevType(void* self, intptr_t slot); +int QsciPrinter_virtualbase_DevType(const void* self); +void QsciPrinter_override_virtual_NewPage(void* self, intptr_t slot); +bool QsciPrinter_virtualbase_NewPage(void* self); +void QsciPrinter_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QsciPrinter_virtualbase_PaintEngine(const void* self); +void QsciPrinter_override_virtual_Metric(void* self, intptr_t slot); +int QsciPrinter_virtualbase_Metric(const void* self, int param1); +void QsciPrinter_Delete(QsciPrinter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp index 8e98c98c..b77928ff 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp @@ -1,39 +1,3567 @@ +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include #include #include +#include #include #include #include +#include +#include #include #include #include "gen_qsciscintilla.h" #include "_cgo_export.h" -QsciScintilla* QsciScintilla_new(QWidget* parent) { - return new QsciScintilla(parent); +class MiqtVirtualQsciScintilla : public virtual QsciScintilla { +public: + + MiqtVirtualQsciScintilla(QWidget* parent): QsciScintilla(parent) {}; + MiqtVirtualQsciScintilla(): QsciScintilla() {}; + + virtual ~MiqtVirtualQsciScintilla() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ApiContext = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList apiContext(int pos, int& context_start, int& last_word_start) override { + if (handle__ApiContext == 0) { + return QsciScintilla::apiContext(pos, context_start, last_word_start); + } + + int sigval1 = pos; + int* sigval2 = &context_start; + int* sigval3 = &last_word_start; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciScintilla_ApiContext(this, handle__ApiContext, sigval1, sigval2, sigval3); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_ApiContext(int pos, int* context_start, int* last_word_start) { + + QStringList _ret = QsciScintilla::apiContext(static_cast(pos), static_cast(*context_start), static_cast(*last_word_start)); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FindFirst = 0; + + // Subclass to allow providing a Go implementation + virtual bool findFirst(const QString& expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) override { + if (handle__FindFirst == 0) { + return QsciScintilla::findFirst(expr, re, cs, wo, wrap, forward, line, index, show, posix, cxx11); + } + + const QString expr_ret = expr; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray expr_b = expr_ret.toUtf8(); + struct miqt_string expr_ms; + expr_ms.len = expr_b.length(); + expr_ms.data = static_cast(malloc(expr_ms.len)); + memcpy(expr_ms.data, expr_b.data(), expr_ms.len); + struct miqt_string sigval1 = expr_ms; + bool sigval2 = re; + bool sigval3 = cs; + bool sigval4 = wo; + bool sigval5 = wrap; + bool sigval6 = forward; + int sigval7 = line; + int sigval8 = index; + bool sigval9 = show; + bool sigval10 = posix; + bool sigval11 = cxx11; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FindFirst(this, handle__FindFirst, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7, sigval8, sigval9, sigval10, sigval11); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FindFirst(struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + + return QsciScintilla::findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix, cxx11); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FindFirstInSelection = 0; + + // Subclass to allow providing a Go implementation + virtual bool findFirstInSelection(const QString& expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) override { + if (handle__FindFirstInSelection == 0) { + return QsciScintilla::findFirstInSelection(expr, re, cs, wo, forward, show, posix, cxx11); + } + + const QString expr_ret = expr; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray expr_b = expr_ret.toUtf8(); + struct miqt_string expr_ms; + expr_ms.len = expr_b.length(); + expr_ms.data = static_cast(malloc(expr_ms.len)); + memcpy(expr_ms.data, expr_b.data(), expr_ms.len); + struct miqt_string sigval1 = expr_ms; + bool sigval2 = re; + bool sigval3 = cs; + bool sigval4 = wo; + bool sigval5 = forward; + bool sigval6 = show; + bool sigval7 = posix; + bool sigval8 = cxx11; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FindFirstInSelection(this, handle__FindFirstInSelection, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7, sigval8); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FindFirstInSelection(struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + + return QsciScintilla::findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix, cxx11); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FindNext = 0; + + // Subclass to allow providing a Go implementation + virtual bool findNext() override { + if (handle__FindNext == 0) { + return QsciScintilla::findNext(); + } + + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FindNext(this, handle__FindNext); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FindNext() { + + return QsciScintilla::findNext(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Recolor = 0; + + // Subclass to allow providing a Go implementation + virtual void recolor(int start, int end) override { + if (handle__Recolor == 0) { + QsciScintilla::recolor(start, end); + return; + } + + int sigval1 = start; + int sigval2 = end; + + miqt_exec_callback_QsciScintilla_Recolor(this, handle__Recolor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Recolor(int start, int end) { + + QsciScintilla::recolor(static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Replace = 0; + + // Subclass to allow providing a Go implementation + virtual void replace(const QString& replaceStr) override { + if (handle__Replace == 0) { + QsciScintilla::replace(replaceStr); + return; + } + + const QString replaceStr_ret = replaceStr; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray replaceStr_b = replaceStr_ret.toUtf8(); + struct miqt_string replaceStr_ms; + replaceStr_ms.len = replaceStr_b.length(); + replaceStr_ms.data = static_cast(malloc(replaceStr_ms.len)); + memcpy(replaceStr_ms.data, replaceStr_b.data(), replaceStr_ms.len); + struct miqt_string sigval1 = replaceStr_ms; + + miqt_exec_callback_QsciScintilla_Replace(this, handle__Replace, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Replace(struct miqt_string replaceStr) { + QString replaceStr_QString = QString::fromUtf8(replaceStr.data, replaceStr.len); + + QsciScintilla::replace(replaceStr_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Append = 0; + + // Subclass to allow providing a Go implementation + virtual void append(const QString& text) override { + if (handle__Append == 0) { + QsciScintilla::append(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_Append(this, handle__Append, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Append(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::append(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompleteFromAll = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompleteFromAll() override { + if (handle__AutoCompleteFromAll == 0) { + QsciScintilla::autoCompleteFromAll(); + return; + } + + + miqt_exec_callback_QsciScintilla_AutoCompleteFromAll(this, handle__AutoCompleteFromAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompleteFromAll() { + + QsciScintilla::autoCompleteFromAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompleteFromAPIs = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompleteFromAPIs() override { + if (handle__AutoCompleteFromAPIs == 0) { + QsciScintilla::autoCompleteFromAPIs(); + return; + } + + + miqt_exec_callback_QsciScintilla_AutoCompleteFromAPIs(this, handle__AutoCompleteFromAPIs); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompleteFromAPIs() { + + QsciScintilla::autoCompleteFromAPIs(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompleteFromDocument = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompleteFromDocument() override { + if (handle__AutoCompleteFromDocument == 0) { + QsciScintilla::autoCompleteFromDocument(); + return; + } + + + miqt_exec_callback_QsciScintilla_AutoCompleteFromDocument(this, handle__AutoCompleteFromDocument); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompleteFromDocument() { + + QsciScintilla::autoCompleteFromDocument(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CallTip = 0; + + // Subclass to allow providing a Go implementation + virtual void callTip() override { + if (handle__CallTip == 0) { + QsciScintilla::callTip(); + return; + } + + + miqt_exec_callback_QsciScintilla_CallTip(this, handle__CallTip); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CallTip() { + + QsciScintilla::callTip(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QsciScintilla::clear(); + return; + } + + + miqt_exec_callback_QsciScintilla_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QsciScintilla::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Copy = 0; + + // Subclass to allow providing a Go implementation + virtual void copy() override { + if (handle__Copy == 0) { + QsciScintilla::copy(); + return; + } + + + miqt_exec_callback_QsciScintilla_Copy(this, handle__Copy); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Copy() { + + QsciScintilla::copy(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Cut = 0; + + // Subclass to allow providing a Go implementation + virtual void cut() override { + if (handle__Cut == 0) { + QsciScintilla::cut(); + return; + } + + + miqt_exec_callback_QsciScintilla_Cut(this, handle__Cut); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Cut() { + + QsciScintilla::cut(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnsureCursorVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void ensureCursorVisible() override { + if (handle__EnsureCursorVisible == 0) { + QsciScintilla::ensureCursorVisible(); + return; + } + + + miqt_exec_callback_QsciScintilla_EnsureCursorVisible(this, handle__EnsureCursorVisible); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnsureCursorVisible() { + + QsciScintilla::ensureCursorVisible(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnsureLineVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void ensureLineVisible(int line) override { + if (handle__EnsureLineVisible == 0) { + QsciScintilla::ensureLineVisible(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_EnsureLineVisible(this, handle__EnsureLineVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnsureLineVisible(int line) { + + QsciScintilla::ensureLineVisible(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FoldAll = 0; + + // Subclass to allow providing a Go implementation + virtual void foldAll(bool children) override { + if (handle__FoldAll == 0) { + QsciScintilla::foldAll(children); + return; + } + + bool sigval1 = children; + + miqt_exec_callback_QsciScintilla_FoldAll(this, handle__FoldAll, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FoldAll(bool children) { + + QsciScintilla::foldAll(children); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FoldLine = 0; + + // Subclass to allow providing a Go implementation + virtual void foldLine(int line) override { + if (handle__FoldLine == 0) { + QsciScintilla::foldLine(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_FoldLine(this, handle__FoldLine, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FoldLine(int line) { + + QsciScintilla::foldLine(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Indent = 0; + + // Subclass to allow providing a Go implementation + virtual void indent(int line) override { + if (handle__Indent == 0) { + QsciScintilla::indent(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_Indent(this, handle__Indent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Indent(int line) { + + QsciScintilla::indent(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Insert = 0; + + // Subclass to allow providing a Go implementation + virtual void insert(const QString& text) override { + if (handle__Insert == 0) { + QsciScintilla::insert(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_Insert(this, handle__Insert, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Insert(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::insert(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertAt = 0; + + // Subclass to allow providing a Go implementation + virtual void insertAt(const QString& text, int line, int index) override { + if (handle__InsertAt == 0) { + QsciScintilla::insertAt(text, line, index); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + int sigval2 = line; + int sigval3 = index; + + miqt_exec_callback_QsciScintilla_InsertAt(this, handle__InsertAt, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertAt(struct miqt_string text, int line, int index) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::insertAt(text_QString, static_cast(line), static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveToMatchingBrace = 0; + + // Subclass to allow providing a Go implementation + virtual void moveToMatchingBrace() override { + if (handle__MoveToMatchingBrace == 0) { + QsciScintilla::moveToMatchingBrace(); + return; + } + + + miqt_exec_callback_QsciScintilla_MoveToMatchingBrace(this, handle__MoveToMatchingBrace); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveToMatchingBrace() { + + QsciScintilla::moveToMatchingBrace(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paste = 0; + + // Subclass to allow providing a Go implementation + virtual void paste() override { + if (handle__Paste == 0) { + QsciScintilla::paste(); + return; + } + + + miqt_exec_callback_QsciScintilla_Paste(this, handle__Paste); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paste() { + + QsciScintilla::paste(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redo = 0; + + // Subclass to allow providing a Go implementation + virtual void redo() override { + if (handle__Redo == 0) { + QsciScintilla::redo(); + return; + } + + + miqt_exec_callback_QsciScintilla_Redo(this, handle__Redo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Redo() { + + QsciScintilla::redo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveSelectedText = 0; + + // Subclass to allow providing a Go implementation + virtual void removeSelectedText() override { + if (handle__RemoveSelectedText == 0) { + QsciScintilla::removeSelectedText(); + return; + } + + + miqt_exec_callback_QsciScintilla_RemoveSelectedText(this, handle__RemoveSelectedText); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveSelectedText() { + + QsciScintilla::removeSelectedText(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReplaceSelectedText = 0; + + // Subclass to allow providing a Go implementation + virtual void replaceSelectedText(const QString& text) override { + if (handle__ReplaceSelectedText == 0) { + QsciScintilla::replaceSelectedText(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_ReplaceSelectedText(this, handle__ReplaceSelectedText, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ReplaceSelectedText(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::replaceSelectedText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetSelectionBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void resetSelectionBackgroundColor() override { + if (handle__ResetSelectionBackgroundColor == 0) { + QsciScintilla::resetSelectionBackgroundColor(); + return; + } + + + miqt_exec_callback_QsciScintilla_ResetSelectionBackgroundColor(this, handle__ResetSelectionBackgroundColor); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetSelectionBackgroundColor() { + + QsciScintilla::resetSelectionBackgroundColor(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetSelectionForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void resetSelectionForegroundColor() override { + if (handle__ResetSelectionForegroundColor == 0) { + QsciScintilla::resetSelectionForegroundColor(); + return; + } + + + miqt_exec_callback_QsciScintilla_ResetSelectionForegroundColor(this, handle__ResetSelectionForegroundColor); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetSelectionForegroundColor() { + + QsciScintilla::resetSelectionForegroundColor(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll(bool selectVal) override { + if (handle__SelectAll == 0) { + QsciScintilla::selectAll(selectVal); + return; + } + + bool sigval1 = selectVal; + + miqt_exec_callback_QsciScintilla_SelectAll(this, handle__SelectAll, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll(bool selectVal) { + + QsciScintilla::selectAll(selectVal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectToMatchingBrace = 0; + + // Subclass to allow providing a Go implementation + virtual void selectToMatchingBrace() override { + if (handle__SelectToMatchingBrace == 0) { + QsciScintilla::selectToMatchingBrace(); + return; + } + + + miqt_exec_callback_QsciScintilla_SelectToMatchingBrace(this, handle__SelectToMatchingBrace); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectToMatchingBrace() { + + QsciScintilla::selectToMatchingBrace(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionCaseSensitivity = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionCaseSensitivity(bool cs) override { + if (handle__SetAutoCompletionCaseSensitivity == 0) { + QsciScintilla::setAutoCompletionCaseSensitivity(cs); + return; + } + + bool sigval1 = cs; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionCaseSensitivity(this, handle__SetAutoCompletionCaseSensitivity, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionCaseSensitivity(bool cs) { + + QsciScintilla::setAutoCompletionCaseSensitivity(cs); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionReplaceWord = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionReplaceWord(bool replace) override { + if (handle__SetAutoCompletionReplaceWord == 0) { + QsciScintilla::setAutoCompletionReplaceWord(replace); + return; + } + + bool sigval1 = replace; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionReplaceWord(this, handle__SetAutoCompletionReplaceWord, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionReplaceWord(bool replace) { + + QsciScintilla::setAutoCompletionReplaceWord(replace); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionShowSingle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionShowSingle(bool single) override { + if (handle__SetAutoCompletionShowSingle == 0) { + QsciScintilla::setAutoCompletionShowSingle(single); + return; + } + + bool sigval1 = single; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionShowSingle(this, handle__SetAutoCompletionShowSingle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionShowSingle(bool single) { + + QsciScintilla::setAutoCompletionShowSingle(single); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionSource = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionSource(QsciScintilla::AutoCompletionSource source) override { + if (handle__SetAutoCompletionSource == 0) { + QsciScintilla::setAutoCompletionSource(source); + return; + } + + QsciScintilla::AutoCompletionSource source_ret = source; + int sigval1 = static_cast(source_ret); + + miqt_exec_callback_QsciScintilla_SetAutoCompletionSource(this, handle__SetAutoCompletionSource, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionSource(int source) { + + QsciScintilla::setAutoCompletionSource(static_cast(source)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionThreshold = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionThreshold(int thresh) override { + if (handle__SetAutoCompletionThreshold == 0) { + QsciScintilla::setAutoCompletionThreshold(thresh); + return; + } + + int sigval1 = thresh; + + miqt_exec_callback_QsciScintilla_SetAutoCompletionThreshold(this, handle__SetAutoCompletionThreshold, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionThreshold(int thresh) { + + QsciScintilla::setAutoCompletionThreshold(static_cast(thresh)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoCompletionUseSingle = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoCompletionUseSingle(QsciScintilla::AutoCompletionUseSingle single) override { + if (handle__SetAutoCompletionUseSingle == 0) { + QsciScintilla::setAutoCompletionUseSingle(single); + return; + } + + QsciScintilla::AutoCompletionUseSingle single_ret = single; + int sigval1 = static_cast(single_ret); + + miqt_exec_callback_QsciScintilla_SetAutoCompletionUseSingle(this, handle__SetAutoCompletionUseSingle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoCompletionUseSingle(int single) { + + QsciScintilla::setAutoCompletionUseSingle(static_cast(single)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAutoIndent = 0; + + // Subclass to allow providing a Go implementation + virtual void setAutoIndent(bool autoindent) override { + if (handle__SetAutoIndent == 0) { + QsciScintilla::setAutoIndent(autoindent); + return; + } + + bool sigval1 = autoindent; + + miqt_exec_callback_QsciScintilla_SetAutoIndent(this, handle__SetAutoIndent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndent(bool autoindent) { + + QsciScintilla::setAutoIndent(autoindent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBraceMatching = 0; + + // Subclass to allow providing a Go implementation + virtual void setBraceMatching(QsciScintilla::BraceMatch bm) override { + if (handle__SetBraceMatching == 0) { + QsciScintilla::setBraceMatching(bm); + return; + } + + QsciScintilla::BraceMatch bm_ret = bm; + int sigval1 = static_cast(bm_ret); + + miqt_exec_callback_QsciScintilla_SetBraceMatching(this, handle__SetBraceMatching, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBraceMatching(int bm) { + + QsciScintilla::setBraceMatching(static_cast(bm)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBackspaceUnindents = 0; + + // Subclass to allow providing a Go implementation + virtual void setBackspaceUnindents(bool unindent) override { + if (handle__SetBackspaceUnindents == 0) { + QsciScintilla::setBackspaceUnindents(unindent); + return; + } + + bool sigval1 = unindent; + + miqt_exec_callback_QsciScintilla_SetBackspaceUnindents(this, handle__SetBackspaceUnindents, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBackspaceUnindents(bool unindent) { + + QsciScintilla::setBackspaceUnindents(unindent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretForegroundColor(const QColor& col) override { + if (handle__SetCaretForegroundColor == 0) { + QsciScintilla::setCaretForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetCaretForegroundColor(this, handle__SetCaretForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretForegroundColor(QColor* col) { + + QsciScintilla::setCaretForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretLineBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretLineBackgroundColor(const QColor& col) override { + if (handle__SetCaretLineBackgroundColor == 0) { + QsciScintilla::setCaretLineBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetCaretLineBackgroundColor(this, handle__SetCaretLineBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretLineBackgroundColor(QColor* col) { + + QsciScintilla::setCaretLineBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretLineFrameWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretLineFrameWidth(int width) override { + if (handle__SetCaretLineFrameWidth == 0) { + QsciScintilla::setCaretLineFrameWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetCaretLineFrameWidth(this, handle__SetCaretLineFrameWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretLineFrameWidth(int width) { + + QsciScintilla::setCaretLineFrameWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretLineVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretLineVisible(bool enable) override { + if (handle__SetCaretLineVisible == 0) { + QsciScintilla::setCaretLineVisible(enable); + return; + } + + bool sigval1 = enable; + + miqt_exec_callback_QsciScintilla_SetCaretLineVisible(this, handle__SetCaretLineVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretLineVisible(bool enable) { + + QsciScintilla::setCaretLineVisible(enable); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCaretWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setCaretWidth(int width) override { + if (handle__SetCaretWidth == 0) { + QsciScintilla::setCaretWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetCaretWidth(this, handle__SetCaretWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCaretWidth(int width) { + + QsciScintilla::setCaretWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setColor(const QColor& c) override { + if (handle__SetColor == 0) { + QsciScintilla::setColor(c); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + + miqt_exec_callback_QsciScintilla_SetColor(this, handle__SetColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c) { + + QsciScintilla::setColor(*c); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCursorPosition = 0; + + // Subclass to allow providing a Go implementation + virtual void setCursorPosition(int line, int index) override { + if (handle__SetCursorPosition == 0) { + QsciScintilla::setCursorPosition(line, index); + return; + } + + int sigval1 = line; + int sigval2 = index; + + miqt_exec_callback_QsciScintilla_SetCursorPosition(this, handle__SetCursorPosition, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCursorPosition(int line, int index) { + + QsciScintilla::setCursorPosition(static_cast(line), static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolMode = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolMode(QsciScintilla::EolMode mode) override { + if (handle__SetEolMode == 0) { + QsciScintilla::setEolMode(mode); + return; + } + + QsciScintilla::EolMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + miqt_exec_callback_QsciScintilla_SetEolMode(this, handle__SetEolMode, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolMode(int mode) { + + QsciScintilla::setEolMode(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEolVisibility = 0; + + // Subclass to allow providing a Go implementation + virtual void setEolVisibility(bool visible) override { + if (handle__SetEolVisibility == 0) { + QsciScintilla::setEolVisibility(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QsciScintilla_SetEolVisibility(this, handle__SetEolVisibility, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolVisibility(bool visible) { + + QsciScintilla::setEolVisibility(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFolding = 0; + + // Subclass to allow providing a Go implementation + virtual void setFolding(QsciScintilla::FoldStyle fold, int margin) override { + if (handle__SetFolding == 0) { + QsciScintilla::setFolding(fold, margin); + return; + } + + QsciScintilla::FoldStyle fold_ret = fold; + int sigval1 = static_cast(fold_ret); + int sigval2 = margin; + + miqt_exec_callback_QsciScintilla_SetFolding(this, handle__SetFolding, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFolding(int fold, int margin) { + + QsciScintilla::setFolding(static_cast(fold), static_cast(margin)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentation = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentation(int line, int indentation) override { + if (handle__SetIndentation == 0) { + QsciScintilla::setIndentation(line, indentation); + return; + } + + int sigval1 = line; + int sigval2 = indentation; + + miqt_exec_callback_QsciScintilla_SetIndentation(this, handle__SetIndentation, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentation(int line, int indentation) { + + QsciScintilla::setIndentation(static_cast(line), static_cast(indentation)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationGuides = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationGuides(bool enable) override { + if (handle__SetIndentationGuides == 0) { + QsciScintilla::setIndentationGuides(enable); + return; + } + + bool sigval1 = enable; + + miqt_exec_callback_QsciScintilla_SetIndentationGuides(this, handle__SetIndentationGuides, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationGuides(bool enable) { + + QsciScintilla::setIndentationGuides(enable); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationGuidesBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationGuidesBackgroundColor(const QColor& col) override { + if (handle__SetIndentationGuidesBackgroundColor == 0) { + QsciScintilla::setIndentationGuidesBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetIndentationGuidesBackgroundColor(this, handle__SetIndentationGuidesBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationGuidesBackgroundColor(QColor* col) { + + QsciScintilla::setIndentationGuidesBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationGuidesForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationGuidesForegroundColor(const QColor& col) override { + if (handle__SetIndentationGuidesForegroundColor == 0) { + QsciScintilla::setIndentationGuidesForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetIndentationGuidesForegroundColor(this, handle__SetIndentationGuidesForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationGuidesForegroundColor(QColor* col) { + + QsciScintilla::setIndentationGuidesForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationsUseTabs = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationsUseTabs(bool tabs) override { + if (handle__SetIndentationsUseTabs == 0) { + QsciScintilla::setIndentationsUseTabs(tabs); + return; + } + + bool sigval1 = tabs; + + miqt_exec_callback_QsciScintilla_SetIndentationsUseTabs(this, handle__SetIndentationsUseTabs, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationsUseTabs(bool tabs) { + + QsciScintilla::setIndentationsUseTabs(tabs); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetIndentationWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setIndentationWidth(int width) override { + if (handle__SetIndentationWidth == 0) { + QsciScintilla::setIndentationWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetIndentationWidth(this, handle__SetIndentationWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetIndentationWidth(int width) { + + QsciScintilla::setIndentationWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetLexer = 0; + + // Subclass to allow providing a Go implementation + virtual void setLexer(QsciLexer* lexer) override { + if (handle__SetLexer == 0) { + QsciScintilla::setLexer(lexer); + return; + } + + QsciLexer* sigval1 = lexer; + + miqt_exec_callback_QsciScintilla_SetLexer(this, handle__SetLexer, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetLexer(QsciLexer* lexer) { + + QsciScintilla::setLexer(lexer); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginsBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginsBackgroundColor(const QColor& col) override { + if (handle__SetMarginsBackgroundColor == 0) { + QsciScintilla::setMarginsBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetMarginsBackgroundColor(this, handle__SetMarginsBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginsBackgroundColor(QColor* col) { + + QsciScintilla::setMarginsBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginsFont = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginsFont(const QFont& f) override { + if (handle__SetMarginsFont == 0) { + QsciScintilla::setMarginsFont(f); + return; + } + + const QFont& f_ret = f; + // Cast returned reference into pointer + QFont* sigval1 = const_cast(&f_ret); + + miqt_exec_callback_QsciScintilla_SetMarginsFont(this, handle__SetMarginsFont, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginsFont(QFont* f) { + + QsciScintilla::setMarginsFont(*f); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginsForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginsForegroundColor(const QColor& col) override { + if (handle__SetMarginsForegroundColor == 0) { + QsciScintilla::setMarginsForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetMarginsForegroundColor(this, handle__SetMarginsForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginsForegroundColor(QColor* col) { + + QsciScintilla::setMarginsForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginLineNumbers = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginLineNumbers(int margin, bool lnrs) override { + if (handle__SetMarginLineNumbers == 0) { + QsciScintilla::setMarginLineNumbers(margin, lnrs); + return; + } + + int sigval1 = margin; + bool sigval2 = lnrs; + + miqt_exec_callback_QsciScintilla_SetMarginLineNumbers(this, handle__SetMarginLineNumbers, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginLineNumbers(int margin, bool lnrs) { + + QsciScintilla::setMarginLineNumbers(static_cast(margin), lnrs); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginMarkerMask = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginMarkerMask(int margin, int mask) override { + if (handle__SetMarginMarkerMask == 0) { + QsciScintilla::setMarginMarkerMask(margin, mask); + return; + } + + int sigval1 = margin; + int sigval2 = mask; + + miqt_exec_callback_QsciScintilla_SetMarginMarkerMask(this, handle__SetMarginMarkerMask, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginMarkerMask(int margin, int mask) { + + QsciScintilla::setMarginMarkerMask(static_cast(margin), static_cast(mask)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginSensitivity = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginSensitivity(int margin, bool sens) override { + if (handle__SetMarginSensitivity == 0) { + QsciScintilla::setMarginSensitivity(margin, sens); + return; + } + + int sigval1 = margin; + bool sigval2 = sens; + + miqt_exec_callback_QsciScintilla_SetMarginSensitivity(this, handle__SetMarginSensitivity, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginSensitivity(int margin, bool sens) { + + QsciScintilla::setMarginSensitivity(static_cast(margin), sens); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginWidth(int margin, int width) override { + if (handle__SetMarginWidth == 0) { + QsciScintilla::setMarginWidth(margin, width); + return; + } + + int sigval1 = margin; + int sigval2 = width; + + miqt_exec_callback_QsciScintilla_SetMarginWidth(this, handle__SetMarginWidth, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginWidth(int margin, int width) { + + QsciScintilla::setMarginWidth(static_cast(margin), static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMarginWidth2 = 0; + + // Subclass to allow providing a Go implementation + virtual void setMarginWidth(int margin, const QString& s) override { + if (handle__SetMarginWidth2 == 0) { + QsciScintilla::setMarginWidth(margin, s); + return; + } + + int sigval1 = margin; + const QString s_ret = s; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray s_b = s_ret.toUtf8(); + struct miqt_string s_ms; + s_ms.len = s_b.length(); + s_ms.data = static_cast(malloc(s_ms.len)); + memcpy(s_ms.data, s_b.data(), s_ms.len); + struct miqt_string sigval2 = s_ms; + + miqt_exec_callback_QsciScintilla_SetMarginWidth2(this, handle__SetMarginWidth2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMarginWidth2(int margin, struct miqt_string s) { + QString s_QString = QString::fromUtf8(s.data, s.len); + + QsciScintilla::setMarginWidth(static_cast(margin), s_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModified = 0; + + // Subclass to allow providing a Go implementation + virtual void setModified(bool m) override { + if (handle__SetModified == 0) { + QsciScintilla::setModified(m); + return; + } + + bool sigval1 = m; + + miqt_exec_callback_QsciScintilla_SetModified(this, handle__SetModified, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModified(bool m) { + + QsciScintilla::setModified(m); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPaper = 0; + + // Subclass to allow providing a Go implementation + virtual void setPaper(const QColor& c) override { + if (handle__SetPaper == 0) { + QsciScintilla::setPaper(c); + return; + } + + const QColor& c_ret = c; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&c_ret); + + miqt_exec_callback_QsciScintilla_SetPaper(this, handle__SetPaper, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c) { + + QsciScintilla::setPaper(*c); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadOnly = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadOnly(bool ro) override { + if (handle__SetReadOnly == 0) { + QsciScintilla::setReadOnly(ro); + return; + } + + bool sigval1 = ro; + + miqt_exec_callback_QsciScintilla_SetReadOnly(this, handle__SetReadOnly, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadOnly(bool ro) { + + QsciScintilla::setReadOnly(ro); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(int lineFrom, int indexFrom, int lineTo, int indexTo) override { + if (handle__SetSelection == 0) { + QsciScintilla::setSelection(lineFrom, indexFrom, lineTo, indexTo); + return; + } + + int sigval1 = lineFrom; + int sigval2 = indexFrom; + int sigval3 = lineTo; + int sigval4 = indexTo; + + miqt_exec_callback_QsciScintilla_SetSelection(this, handle__SetSelection, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(int lineFrom, int indexFrom, int lineTo, int indexTo) { + + QsciScintilla::setSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionBackgroundColor(const QColor& col) override { + if (handle__SetSelectionBackgroundColor == 0) { + QsciScintilla::setSelectionBackgroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetSelectionBackgroundColor(this, handle__SetSelectionBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionBackgroundColor(QColor* col) { + + QsciScintilla::setSelectionBackgroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionForegroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionForegroundColor(const QColor& col) override { + if (handle__SetSelectionForegroundColor == 0) { + QsciScintilla::setSelectionForegroundColor(col); + return; + } + + const QColor& col_ret = col; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&col_ret); + + miqt_exec_callback_QsciScintilla_SetSelectionForegroundColor(this, handle__SetSelectionForegroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionForegroundColor(QColor* col) { + + QsciScintilla::setSelectionForegroundColor(*col); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTabIndents = 0; + + // Subclass to allow providing a Go implementation + virtual void setTabIndents(bool indent) override { + if (handle__SetTabIndents == 0) { + QsciScintilla::setTabIndents(indent); + return; + } + + bool sigval1 = indent; + + miqt_exec_callback_QsciScintilla_SetTabIndents(this, handle__SetTabIndents, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTabIndents(bool indent) { + + QsciScintilla::setTabIndents(indent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTabWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void setTabWidth(int width) override { + if (handle__SetTabWidth == 0) { + QsciScintilla::setTabWidth(width); + return; + } + + int sigval1 = width; + + miqt_exec_callback_QsciScintilla_SetTabWidth(this, handle__SetTabWidth, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTabWidth(int width) { + + QsciScintilla::setTabWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetText = 0; + + // Subclass to allow providing a Go implementation + virtual void setText(const QString& text) override { + if (handle__SetText == 0) { + QsciScintilla::setText(text); + return; + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + miqt_exec_callback_QsciScintilla_SetText(this, handle__SetText, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetText(struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QsciScintilla::setText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetUtf8 = 0; + + // Subclass to allow providing a Go implementation + virtual void setUtf8(bool cp) override { + if (handle__SetUtf8 == 0) { + QsciScintilla::setUtf8(cp); + return; + } + + bool sigval1 = cp; + + miqt_exec_callback_QsciScintilla_SetUtf8(this, handle__SetUtf8, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetUtf8(bool cp) { + + QsciScintilla::setUtf8(cp); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetWhitespaceVisibility = 0; + + // Subclass to allow providing a Go implementation + virtual void setWhitespaceVisibility(QsciScintilla::WhitespaceVisibility mode) override { + if (handle__SetWhitespaceVisibility == 0) { + QsciScintilla::setWhitespaceVisibility(mode); + return; + } + + QsciScintilla::WhitespaceVisibility mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + miqt_exec_callback_QsciScintilla_SetWhitespaceVisibility(this, handle__SetWhitespaceVisibility, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetWhitespaceVisibility(int mode) { + + QsciScintilla::setWhitespaceVisibility(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetWrapMode = 0; + + // Subclass to allow providing a Go implementation + virtual void setWrapMode(QsciScintilla::WrapMode mode) override { + if (handle__SetWrapMode == 0) { + QsciScintilla::setWrapMode(mode); + return; + } + + QsciScintilla::WrapMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + miqt_exec_callback_QsciScintilla_SetWrapMode(this, handle__SetWrapMode, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetWrapMode(int mode) { + + QsciScintilla::setWrapMode(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Undo = 0; + + // Subclass to allow providing a Go implementation + virtual void undo() override { + if (handle__Undo == 0) { + QsciScintilla::undo(); + return; + } + + + miqt_exec_callback_QsciScintilla_Undo(this, handle__Undo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Undo() { + + QsciScintilla::undo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unindent = 0; + + // Subclass to allow providing a Go implementation + virtual void unindent(int line) override { + if (handle__Unindent == 0) { + QsciScintilla::unindent(line); + return; + } + + int sigval1 = line; + + miqt_exec_callback_QsciScintilla_Unindent(this, handle__Unindent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unindent(int line) { + + QsciScintilla::unindent(static_cast(line)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomIn = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomIn(int rangeVal) override { + if (handle__ZoomIn == 0) { + QsciScintilla::zoomIn(rangeVal); + return; + } + + int sigval1 = rangeVal; + + miqt_exec_callback_QsciScintilla_ZoomIn(this, handle__ZoomIn, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomIn(int rangeVal) { + + QsciScintilla::zoomIn(static_cast(rangeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomIn2 = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomIn() override { + if (handle__ZoomIn2 == 0) { + QsciScintilla::zoomIn(); + return; + } + + + miqt_exec_callback_QsciScintilla_ZoomIn2(this, handle__ZoomIn2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomIn2() { + + QsciScintilla::zoomIn(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomOut = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomOut(int rangeVal) override { + if (handle__ZoomOut == 0) { + QsciScintilla::zoomOut(rangeVal); + return; + } + + int sigval1 = rangeVal; + + miqt_exec_callback_QsciScintilla_ZoomOut(this, handle__ZoomOut, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomOut(int rangeVal) { + + QsciScintilla::zoomOut(static_cast(rangeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomOut2 = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomOut() override { + if (handle__ZoomOut2 == 0) { + QsciScintilla::zoomOut(); + return; + } + + + miqt_exec_callback_QsciScintilla_ZoomOut2(this, handle__ZoomOut2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomOut2() { + + QsciScintilla::zoomOut(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ZoomTo = 0; + + // Subclass to allow providing a Go implementation + virtual void zoomTo(int size) override { + if (handle__ZoomTo == 0) { + QsciScintilla::zoomTo(size); + return; + } + + int sigval1 = size; + + miqt_exec_callback_QsciScintilla_ZoomTo(this, handle__ZoomTo, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ZoomTo(int size) { + + QsciScintilla::zoomTo(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QsciScintilla::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QsciScintilla::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QsciScintilla::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QsciScintilla::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QsciScintilla::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QsciScintilla::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QsciScintilla::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QsciScintilla::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QsciScintilla::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QsciScintilla::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray fromMimeData(const QMimeData* source, bool& rectangular) const override { + if (handle__FromMimeData == 0) { + return QsciScintilla::fromMimeData(source, rectangular); + } + + QMimeData* sigval1 = (QMimeData*) source; + bool* sigval2 = &rectangular; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciScintilla_FromMimeData(const_cast(this), handle__FromMimeData, sigval1, sigval2); + QByteArray callback_return_value_QByteArray(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QByteArray; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FromMimeData(QMimeData* source, bool* rectangular) const { + + QByteArray _qb = QsciScintilla::fromMimeData(source, *rectangular); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ToMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* toMimeData(const QByteArray& text, bool rectangular) const override { + if (handle__ToMimeData == 0) { + return QsciScintilla::toMimeData(text, rectangular); + } + + const QByteArray text_qb = text; + struct miqt_string text_ms; + text_ms.len = text_qb.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_qb.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + bool sigval2 = rectangular; + + QMimeData* callback_return_value = miqt_exec_callback_QsciScintilla_ToMimeData(const_cast(this), handle__ToMimeData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_ToMimeData(struct miqt_string text, bool rectangular) const { + QByteArray text_QByteArray(text.data, text.len); + + return QsciScintilla::toMimeData(text_QByteArray, rectangular); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QsciScintilla::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QsciScintilla::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QsciScintilla::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QsciScintilla::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QsciScintilla::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QsciScintilla::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QsciScintilla::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QsciScintilla::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QsciScintilla::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QsciScintilla::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QsciScintilla::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QsciScintilla::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QsciScintilla::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QsciScintilla_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QsciScintilla::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QsciScintilla::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QsciScintilla::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QsciScintilla::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QsciScintilla_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QsciScintilla::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QsciScintilla::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QsciScintilla_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QsciScintilla::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QsciScintilla::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QsciScintilla::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QsciScintilla::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QsciScintilla::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QsciScintilla::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QsciScintilla::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QsciScintilla::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QsciScintilla::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QsciScintilla::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QsciScintilla::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QsciScintilla::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QsciScintilla_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QsciScintilla::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QsciScintilla::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QsciScintilla_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QsciScintilla::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + +}; + +void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(parent); + *outptr_QsciScintilla = ret; + *outptr_QsciScintillaBase = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(); + *outptr_QsciScintilla = ret; + *outptr_QsciScintillaBase = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QsciScintilla_Tr(const char* s) { + QString _ret = QsciScintilla::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of struct miqt_string */ QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start) { + QStringList _ret = self->apiContext(static_cast(pos), static_cast(*context_start), static_cast(*last_word_start)); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QsciScintilla_Annotate(QsciScintilla* self, int line, struct miqt_string text, int style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->annotate(static_cast(line), text_QString, static_cast(style)); +} + +void QsciScintilla_Annotate2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->annotate(static_cast(line), text_QString, *style); +} + +void QsciScintilla_Annotate3(QsciScintilla* self, int line, QsciStyledText* text) { + self->annotate(static_cast(line), *text); +} + +struct miqt_string QsciScintilla_Annotation(const QsciScintilla* self, int line) { + QString _ret = self->annotation(static_cast(line)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QsciScintilla_AnnotationDisplay(const QsciScintilla* self) { + QsciScintilla::AnnotationDisplay _ret = self->annotationDisplay(); + return static_cast(_ret); +} + +void QsciScintilla_ClearAnnotations(QsciScintilla* self) { + self->clearAnnotations(); +} + +bool QsciScintilla_AutoCompletionCaseSensitivity(const QsciScintilla* self) { + return self->autoCompletionCaseSensitivity(); +} + +bool QsciScintilla_AutoCompletionFillupsEnabled(const QsciScintilla* self) { + return self->autoCompletionFillupsEnabled(); +} + +bool QsciScintilla_AutoCompletionReplaceWord(const QsciScintilla* self) { + return self->autoCompletionReplaceWord(); +} + +bool QsciScintilla_AutoCompletionShowSingle(const QsciScintilla* self) { + return self->autoCompletionShowSingle(); +} + +int QsciScintilla_AutoCompletionSource(const QsciScintilla* self) { + QsciScintilla::AutoCompletionSource _ret = self->autoCompletionSource(); + return static_cast(_ret); +} + +int QsciScintilla_AutoCompletionThreshold(const QsciScintilla* self) { + return self->autoCompletionThreshold(); +} + +int QsciScintilla_AutoCompletionUseSingle(const QsciScintilla* self) { + QsciScintilla::AutoCompletionUseSingle _ret = self->autoCompletionUseSingle(); + return static_cast(_ret); +} + +bool QsciScintilla_AutoIndent(const QsciScintilla* self) { + return self->autoIndent(); +} + +bool QsciScintilla_BackspaceUnindents(const QsciScintilla* self) { + return self->backspaceUnindents(); +} + +void QsciScintilla_BeginUndoAction(QsciScintilla* self) { + self->beginUndoAction(); +} + +int QsciScintilla_BraceMatching(const QsciScintilla* self) { + QsciScintilla::BraceMatch _ret = self->braceMatching(); + return static_cast(_ret); +} + +struct miqt_string QsciScintilla_Bytes(const QsciScintilla* self, int start, int end) { + QByteArray _qb = self->bytes(static_cast(start), static_cast(end)); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +int QsciScintilla_CallTipsPosition(const QsciScintilla* self) { + QsciScintilla::CallTipsPosition _ret = self->callTipsPosition(); + return static_cast(_ret); +} + +int QsciScintilla_CallTipsStyle(const QsciScintilla* self) { + QsciScintilla::CallTipsStyle _ret = self->callTipsStyle(); + return static_cast(_ret); +} + +int QsciScintilla_CallTipsVisible(const QsciScintilla* self) { + return self->callTipsVisible(); +} + +void QsciScintilla_CancelFind(QsciScintilla* self) { + self->cancelFind(); +} + +void QsciScintilla_CancelList(QsciScintilla* self) { + self->cancelList(); +} + +bool QsciScintilla_CaseSensitive(const QsciScintilla* self) { + return self->caseSensitive(); +} + +void QsciScintilla_ClearFolds(QsciScintilla* self) { + self->clearFolds(); +} + +void QsciScintilla_ClearIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { + self->clearIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +} + +void QsciScintilla_ClearRegisteredImages(QsciScintilla* self) { + self->clearRegisteredImages(); +} + +QColor* QsciScintilla_Color(const QsciScintilla* self) { + return new QColor(self->color()); +} + +struct miqt_array /* of int */ QsciScintilla_ContractedFolds(const QsciScintilla* self) { + QList _ret = self->contractedFolds(); + // Convert QList<> from C++ memory to manually-managed C memory + int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QsciScintilla_ConvertEols(QsciScintilla* self, int mode) { + self->convertEols(static_cast(mode)); +} + +QMenu* QsciScintilla_CreateStandardContextMenu(QsciScintilla* self) { + return self->createStandardContextMenu(); +} + +QsciDocument* QsciScintilla_Document(const QsciScintilla* self) { + return new QsciDocument(self->document()); +} + +void QsciScintilla_EndUndoAction(QsciScintilla* self) { + self->endUndoAction(); +} + +QColor* QsciScintilla_EdgeColor(const QsciScintilla* self) { + return new QColor(self->edgeColor()); +} + +int QsciScintilla_EdgeColumn(const QsciScintilla* self) { + return self->edgeColumn(); +} + +int QsciScintilla_EdgeMode(const QsciScintilla* self) { + QsciScintilla::EdgeMode _ret = self->edgeMode(); + return static_cast(_ret); +} + +void QsciScintilla_SetFont(QsciScintilla* self, QFont* f) { + self->setFont(*f); +} + +int QsciScintilla_EolMode(const QsciScintilla* self) { + QsciScintilla::EolMode _ret = self->eolMode(); + return static_cast(_ret); +} + +bool QsciScintilla_EolVisibility(const QsciScintilla* self) { + return self->eolVisibility(); +} + +int QsciScintilla_ExtraAscent(const QsciScintilla* self) { + return self->extraAscent(); +} + +int QsciScintilla_ExtraDescent(const QsciScintilla* self) { + return self->extraDescent(); +} + +void QsciScintilla_FillIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { + self->fillIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +} + +bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix, cxx11); +} + +bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { + QString expr_QString = QString::fromUtf8(expr.data, expr.len); + return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix, cxx11); +} + +bool QsciScintilla_FindNext(QsciScintilla* self) { + return self->findNext(); +} + +bool QsciScintilla_FindMatchingBrace(QsciScintilla* self, long* brace, long* other, int mode) { + return self->findMatchingBrace(static_cast(*brace), static_cast(*other), static_cast(mode)); +} + +int QsciScintilla_FirstVisibleLine(const QsciScintilla* self) { + return self->firstVisibleLine(); +} + +int QsciScintilla_Folding(const QsciScintilla* self) { + QsciScintilla::FoldStyle _ret = self->folding(); + return static_cast(_ret); +} + +void QsciScintilla_GetCursorPosition(const QsciScintilla* self, int* line, int* index) { + self->getCursorPosition(static_cast(line), static_cast(index)); +} + +void QsciScintilla_GetSelection(const QsciScintilla* self, int* lineFrom, int* indexFrom, int* lineTo, int* indexTo) { + self->getSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); +} + +bool QsciScintilla_HasSelectedText(const QsciScintilla* self) { + return self->hasSelectedText(); +} + +int QsciScintilla_Indentation(const QsciScintilla* self, int line) { + return self->indentation(static_cast(line)); +} + +bool QsciScintilla_IndentationGuides(const QsciScintilla* self) { + return self->indentationGuides(); +} + +bool QsciScintilla_IndentationsUseTabs(const QsciScintilla* self) { + return self->indentationsUseTabs(); +} + +int QsciScintilla_IndentationWidth(const QsciScintilla* self) { + return self->indentationWidth(); +} + +int QsciScintilla_IndicatorDefine(QsciScintilla* self, int style) { + return self->indicatorDefine(static_cast(style)); +} + +bool QsciScintilla_IndicatorDrawUnder(const QsciScintilla* self, int indicatorNumber) { + return self->indicatorDrawUnder(static_cast(indicatorNumber)); +} + +bool QsciScintilla_IsCallTipActive(const QsciScintilla* self) { + return self->isCallTipActive(); +} + +bool QsciScintilla_IsListActive(const QsciScintilla* self) { + return self->isListActive(); +} + +bool QsciScintilla_IsModified(const QsciScintilla* self) { + return self->isModified(); +} + +bool QsciScintilla_IsReadOnly(const QsciScintilla* self) { + return self->isReadOnly(); +} + +bool QsciScintilla_IsRedoAvailable(const QsciScintilla* self) { + return self->isRedoAvailable(); +} + +bool QsciScintilla_IsUndoAvailable(const QsciScintilla* self) { + return self->isUndoAvailable(); +} + +bool QsciScintilla_IsUtf8(const QsciScintilla* self) { + return self->isUtf8(); +} + +bool QsciScintilla_IsWordCharacter(const QsciScintilla* self, char ch) { + return self->isWordCharacter(static_cast(ch)); +} + +int QsciScintilla_LineAt(const QsciScintilla* self, QPoint* point) { + return self->lineAt(*point); +} + +void QsciScintilla_LineIndexFromPosition(const QsciScintilla* self, int position, int* line, int* index) { + self->lineIndexFromPosition(static_cast(position), static_cast(line), static_cast(index)); +} + +int QsciScintilla_LineLength(const QsciScintilla* self, int line) { + return self->lineLength(static_cast(line)); +} + +int QsciScintilla_Lines(const QsciScintilla* self) { + return self->lines(); +} + +int QsciScintilla_Length(const QsciScintilla* self) { + return self->length(); +} + +QsciLexer* QsciScintilla_Lexer(const QsciScintilla* self) { + return self->lexer(); +} + +QColor* QsciScintilla_MarginBackgroundColor(const QsciScintilla* self, int margin) { + return new QColor(self->marginBackgroundColor(static_cast(margin))); +} + +bool QsciScintilla_MarginLineNumbers(const QsciScintilla* self, int margin) { + return self->marginLineNumbers(static_cast(margin)); +} + +int QsciScintilla_MarginMarkerMask(const QsciScintilla* self, int margin) { + return self->marginMarkerMask(static_cast(margin)); +} + +int QsciScintilla_MarginOptions(const QsciScintilla* self) { + return self->marginOptions(); +} + +bool QsciScintilla_MarginSensitivity(const QsciScintilla* self, int margin) { + return self->marginSensitivity(static_cast(margin)); +} + +int QsciScintilla_MarginType(const QsciScintilla* self, int margin) { + QsciScintilla::MarginType _ret = self->marginType(static_cast(margin)); + return static_cast(_ret); +} + +int QsciScintilla_MarginWidth(const QsciScintilla* self, int margin) { + return self->marginWidth(static_cast(margin)); +} + +int QsciScintilla_Margins(const QsciScintilla* self) { + return self->margins(); +} + +int QsciScintilla_MarkerDefine(QsciScintilla* self, int sym) { + return self->markerDefine(static_cast(sym)); +} + +int QsciScintilla_MarkerDefineWithCh(QsciScintilla* self, char ch) { + return self->markerDefine(static_cast(ch)); +} + +int QsciScintilla_MarkerDefineWithPm(QsciScintilla* self, QPixmap* pm) { + return self->markerDefine(*pm); +} + +int QsciScintilla_MarkerDefineWithIm(QsciScintilla* self, QImage* im) { + return self->markerDefine(*im); +} + +int QsciScintilla_MarkerAdd(QsciScintilla* self, int linenr, int markerNumber) { + return self->markerAdd(static_cast(linenr), static_cast(markerNumber)); +} + +unsigned int QsciScintilla_MarkersAtLine(const QsciScintilla* self, int linenr) { + return self->markersAtLine(static_cast(linenr)); +} + +void QsciScintilla_MarkerDelete(QsciScintilla* self, int linenr) { + self->markerDelete(static_cast(linenr)); +} + +void QsciScintilla_MarkerDeleteAll(QsciScintilla* self) { + self->markerDeleteAll(); +} + +void QsciScintilla_MarkerDeleteHandle(QsciScintilla* self, int mhandle) { + self->markerDeleteHandle(static_cast(mhandle)); +} + +int QsciScintilla_MarkerLine(const QsciScintilla* self, int mhandle) { + return self->markerLine(static_cast(mhandle)); +} + +int QsciScintilla_MarkerFindNext(const QsciScintilla* self, int linenr, unsigned int mask) { + return self->markerFindNext(static_cast(linenr), static_cast(mask)); +} + +int QsciScintilla_MarkerFindPrevious(const QsciScintilla* self, int linenr, unsigned int mask) { + return self->markerFindPrevious(static_cast(linenr), static_cast(mask)); +} + +bool QsciScintilla_OverwriteMode(const QsciScintilla* self) { + return self->overwriteMode(); +} + +QColor* QsciScintilla_Paper(const QsciScintilla* self) { + return new QColor(self->paper()); +} + +int QsciScintilla_PositionFromLineIndex(const QsciScintilla* self, int line, int index) { + return self->positionFromLineIndex(static_cast(line), static_cast(index)); +} + +bool QsciScintilla_Read(QsciScintilla* self, QIODevice* io) { + return self->read(io); +} + +void QsciScintilla_Recolor(QsciScintilla* self, int start, int end) { + self->recolor(static_cast(start), static_cast(end)); +} + +void QsciScintilla_RegisterImage(QsciScintilla* self, int id, QPixmap* pm) { + self->registerImage(static_cast(id), *pm); +} + +void QsciScintilla_RegisterImage2(QsciScintilla* self, int id, QImage* im) { + self->registerImage(static_cast(id), *im); +} + +void QsciScintilla_Replace(QsciScintilla* self, struct miqt_string replaceStr) { + QString replaceStr_QString = QString::fromUtf8(replaceStr.data, replaceStr.len); + self->replace(replaceStr_QString); +} + +void QsciScintilla_ResetFoldMarginColors(QsciScintilla* self) { + self->resetFoldMarginColors(); +} + +void QsciScintilla_ResetHotspotBackgroundColor(QsciScintilla* self) { + self->resetHotspotBackgroundColor(); +} + +void QsciScintilla_ResetHotspotForegroundColor(QsciScintilla* self) { + self->resetHotspotForegroundColor(); +} + +int QsciScintilla_ScrollWidth(const QsciScintilla* self) { + return self->scrollWidth(); +} + +bool QsciScintilla_ScrollWidthTracking(const QsciScintilla* self) { + return self->scrollWidthTracking(); +} + +void QsciScintilla_SetFoldMarginColors(QsciScintilla* self, QColor* fore, QColor* back) { + self->setFoldMarginColors(*fore, *back); +} + +void QsciScintilla_SetAnnotationDisplay(QsciScintilla* self, int display) { + self->setAnnotationDisplay(static_cast(display)); +} + +void QsciScintilla_SetAutoCompletionFillupsEnabled(QsciScintilla* self, bool enabled) { + self->setAutoCompletionFillupsEnabled(enabled); +} + +void QsciScintilla_SetAutoCompletionFillups(QsciScintilla* self, const char* fillups) { + self->setAutoCompletionFillups(fillups); +} + +void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array /* of struct miqt_string */ separators) { + QStringList separators_QList; + separators_QList.reserve(separators.len); + struct miqt_string* separators_arr = static_cast(separators.data); + for(size_t i = 0; i < separators.len; ++i) { + QString separators_arr_i_QString = QString::fromUtf8(separators_arr[i].data, separators_arr[i].len); + separators_QList.push_back(separators_arr_i_QString); + } + self->setAutoCompletionWordSeparators(separators_QList); +} + +void QsciScintilla_SetCallTipsBackgroundColor(QsciScintilla* self, QColor* col) { + self->setCallTipsBackgroundColor(*col); +} + +void QsciScintilla_SetCallTipsForegroundColor(QsciScintilla* self, QColor* col) { + self->setCallTipsForegroundColor(*col); +} + +void QsciScintilla_SetCallTipsHighlightColor(QsciScintilla* self, QColor* col) { + self->setCallTipsHighlightColor(*col); +} + +void QsciScintilla_SetCallTipsPosition(QsciScintilla* self, int position) { + self->setCallTipsPosition(static_cast(position)); +} + +void QsciScintilla_SetCallTipsStyle(QsciScintilla* self, int style) { + self->setCallTipsStyle(static_cast(style)); +} + +void QsciScintilla_SetCallTipsVisible(QsciScintilla* self, int nr) { + self->setCallTipsVisible(static_cast(nr)); +} + +void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array /* of int */ folds) { + QList folds_QList; + folds_QList.reserve(folds.len); + int* folds_arr = static_cast(folds.data); + for(size_t i = 0; i < folds.len; ++i) { + folds_QList.push_back(static_cast(folds_arr[i])); + } + self->setContractedFolds(folds_QList); +} + +void QsciScintilla_SetDocument(QsciScintilla* self, QsciDocument* document) { + self->setDocument(*document); +} + +void QsciScintilla_AddEdgeColumn(QsciScintilla* self, int colnr, QColor* col) { + self->addEdgeColumn(static_cast(colnr), *col); +} + +void QsciScintilla_ClearEdgeColumns(QsciScintilla* self) { + self->clearEdgeColumns(); +} + +void QsciScintilla_SetEdgeColor(QsciScintilla* self, QColor* col) { + self->setEdgeColor(*col); +} + +void QsciScintilla_SetEdgeColumn(QsciScintilla* self, int colnr) { + self->setEdgeColumn(static_cast(colnr)); +} + +void QsciScintilla_SetEdgeMode(QsciScintilla* self, int mode) { + self->setEdgeMode(static_cast(mode)); +} + +void QsciScintilla_SetFirstVisibleLine(QsciScintilla* self, int linenr) { + self->setFirstVisibleLine(static_cast(linenr)); +} + +void QsciScintilla_SetIndicatorDrawUnder(QsciScintilla* self, bool under) { + self->setIndicatorDrawUnder(under); +} + +void QsciScintilla_SetIndicatorForegroundColor(QsciScintilla* self, QColor* col) { + self->setIndicatorForegroundColor(*col); +} + +void QsciScintilla_SetIndicatorHoverForegroundColor(QsciScintilla* self, QColor* col) { + self->setIndicatorHoverForegroundColor(*col); +} + +void QsciScintilla_SetIndicatorHoverStyle(QsciScintilla* self, int style) { + self->setIndicatorHoverStyle(static_cast(style)); +} + +void QsciScintilla_SetIndicatorOutlineColor(QsciScintilla* self, QColor* col) { + self->setIndicatorOutlineColor(*col); +} + +void QsciScintilla_SetMarginBackgroundColor(QsciScintilla* self, int margin, QColor* col) { + self->setMarginBackgroundColor(static_cast(margin), *col); +} + +void QsciScintilla_SetMarginOptions(QsciScintilla* self, int options) { + self->setMarginOptions(static_cast(options)); +} + +void QsciScintilla_SetMarginText(QsciScintilla* self, int line, struct miqt_string text, int style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setMarginText(static_cast(line), text_QString, static_cast(style)); +} + +void QsciScintilla_SetMarginText2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setMarginText(static_cast(line), text_QString, *style); +} + +void QsciScintilla_SetMarginText3(QsciScintilla* self, int line, QsciStyledText* text) { + self->setMarginText(static_cast(line), *text); +} + +void QsciScintilla_SetMarginType(QsciScintilla* self, int margin, int typeVal) { + self->setMarginType(static_cast(margin), static_cast(typeVal)); +} + +void QsciScintilla_ClearMarginText(QsciScintilla* self) { + self->clearMarginText(); +} + +void QsciScintilla_SetMargins(QsciScintilla* self, int margins) { + self->setMargins(static_cast(margins)); +} + +void QsciScintilla_SetMarkerBackgroundColor(QsciScintilla* self, QColor* col) { + self->setMarkerBackgroundColor(*col); +} + +void QsciScintilla_SetMarkerForegroundColor(QsciScintilla* self, QColor* col) { + self->setMarkerForegroundColor(*col); +} + +void QsciScintilla_SetMatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { + self->setMatchedBraceBackgroundColor(*col); +} + +void QsciScintilla_SetMatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { + self->setMatchedBraceForegroundColor(*col); +} + +void QsciScintilla_SetMatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { + self->setMatchedBraceIndicator(static_cast(indicatorNumber)); +} + +void QsciScintilla_ResetMatchedBraceIndicator(QsciScintilla* self) { + self->resetMatchedBraceIndicator(); +} + +void QsciScintilla_SetScrollWidth(QsciScintilla* self, int pixelWidth) { + self->setScrollWidth(static_cast(pixelWidth)); +} + +void QsciScintilla_SetScrollWidthTracking(QsciScintilla* self, bool enabled) { + self->setScrollWidthTracking(enabled); +} + +void QsciScintilla_SetTabDrawMode(QsciScintilla* self, int mode) { + self->setTabDrawMode(static_cast(mode)); +} + +void QsciScintilla_SetUnmatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { + self->setUnmatchedBraceBackgroundColor(*col); +} + +void QsciScintilla_SetUnmatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { + self->setUnmatchedBraceForegroundColor(*col); +} + +void QsciScintilla_SetUnmatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { + self->setUnmatchedBraceIndicator(static_cast(indicatorNumber)); +} + +void QsciScintilla_ResetUnmatchedBraceIndicator(QsciScintilla* self) { + self->resetUnmatchedBraceIndicator(); +} + +void QsciScintilla_SetWrapVisualFlags(QsciScintilla* self, int endFlag) { + self->setWrapVisualFlags(static_cast(endFlag)); } -QsciScintilla* QsciScintilla_new2() { - return new QsciScintilla(); +struct miqt_string QsciScintilla_SelectedText(const QsciScintilla* self) { + QString _ret = self->selectedText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self) { - return (QMetaObject*) self->metaObject(); +bool QsciScintilla_SelectionToEol(const QsciScintilla* self) { + return self->selectionToEol(); } -void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1) { - return self->qt_metacast(param1); +void QsciScintilla_SetHotspotBackgroundColor(QsciScintilla* self, QColor* col) { + self->setHotspotBackgroundColor(*col); } -struct miqt_string QsciScintilla_Tr(const char* s) { - QString _ret = QsciScintilla::tr(s); +void QsciScintilla_SetHotspotForegroundColor(QsciScintilla* self, QColor* col) { + self->setHotspotForegroundColor(*col); +} + +void QsciScintilla_SetHotspotUnderline(QsciScintilla* self, bool enable) { + self->setHotspotUnderline(enable); +} + +void QsciScintilla_SetHotspotWrap(QsciScintilla* self, bool enable) { + self->setHotspotWrap(enable); +} + +void QsciScintilla_SetSelectionToEol(QsciScintilla* self, bool filled) { + self->setSelectionToEol(filled); +} + +void QsciScintilla_SetExtraAscent(QsciScintilla* self, int extra) { + self->setExtraAscent(static_cast(extra)); +} + +void QsciScintilla_SetExtraDescent(QsciScintilla* self, int extra) { + self->setExtraDescent(static_cast(extra)); +} + +void QsciScintilla_SetOverwriteMode(QsciScintilla* self, bool overwrite) { + self->setOverwriteMode(overwrite); +} + +void QsciScintilla_SetWhitespaceBackgroundColor(QsciScintilla* self, QColor* col) { + self->setWhitespaceBackgroundColor(*col); +} + +void QsciScintilla_SetWhitespaceForegroundColor(QsciScintilla* self, QColor* col) { + self->setWhitespaceForegroundColor(*col); +} + +void QsciScintilla_SetWhitespaceSize(QsciScintilla* self, int size) { + self->setWhitespaceSize(static_cast(size)); +} + +void QsciScintilla_SetWrapIndentMode(QsciScintilla* self, int mode) { + self->setWrapIndentMode(static_cast(mode)); +} + +void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array /* of struct miqt_string */ list) { + QStringList list_QList; + list_QList.reserve(list.len); + struct miqt_string* list_arr = static_cast(list.data); + for(size_t i = 0; i < list.len; ++i) { + QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len); + list_QList.push_back(list_arr_i_QString); + } + self->showUserList(static_cast(id), list_QList); +} + +QsciCommandSet* QsciScintilla_StandardCommands(const QsciScintilla* self) { + return self->standardCommands(); +} + +int QsciScintilla_TabDrawMode(const QsciScintilla* self) { + QsciScintilla::TabDrawMode _ret = self->tabDrawMode(); + return static_cast(_ret); +} + +bool QsciScintilla_TabIndents(const QsciScintilla* self) { + return self->tabIndents(); +} + +int QsciScintilla_TabWidth(const QsciScintilla* self) { + return self->tabWidth(); +} + +struct miqt_string QsciScintilla_Text(const QsciScintilla* self) { + QString _ret = self->text(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -43,42 +3571,54 @@ struct miqt_string QsciScintilla_Tr(const char* s) { return _ms; } -struct miqt_array /* of struct miqt_string */ QsciScintilla_ApiContext(QsciScintilla* self, int pos, int* context_start, int* last_word_start) { - QStringList _ret = self->apiContext(static_cast(pos), static_cast(*context_start), static_cast(*last_word_start)); - // Convert QList<> from C++ memory to manually-managed C memory - struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QString _lv_ret = _ret[i]; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _lv_b = _lv_ret.toUtf8(); - struct miqt_string _lv_ms; - _lv_ms.len = _lv_b.length(); - _lv_ms.data = static_cast(malloc(_lv_ms.len)); - memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); - _arr[i] = _lv_ms; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +struct miqt_string QsciScintilla_TextWithLine(const QsciScintilla* self, int line) { + QString _ret = self->text(static_cast(line)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_Annotate(QsciScintilla* self, int line, struct miqt_string text, int style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->annotate(static_cast(line), text_QString, static_cast(style)); +struct miqt_string QsciScintilla_Text2(const QsciScintilla* self, int start, int end) { + QString _ret = self->text(static_cast(start), static_cast(end)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_Annotate2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->annotate(static_cast(line), text_QString, *style); +int QsciScintilla_TextHeight(const QsciScintilla* self, int linenr) { + return self->textHeight(static_cast(linenr)); } -void QsciScintilla_Annotate3(QsciScintilla* self, int line, QsciStyledText* text) { - self->annotate(static_cast(line), *text); +int QsciScintilla_WhitespaceSize(const QsciScintilla* self) { + return self->whitespaceSize(); } -struct miqt_string QsciScintilla_Annotation(const QsciScintilla* self, int line) { - QString _ret = self->annotation(static_cast(line)); +int QsciScintilla_WhitespaceVisibility(const QsciScintilla* self) { + QsciScintilla::WhitespaceVisibility _ret = self->whitespaceVisibility(); + return static_cast(_ret); +} + +struct miqt_string QsciScintilla_WordAtLineIndex(const QsciScintilla* self, int line, int index) { + QString _ret = self->wordAtLineIndex(static_cast(line), static_cast(index)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QsciScintilla_WordAtPoint(const QsciScintilla* self, QPoint* point) { + QString _ret = self->wordAtPoint(*point); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -88,1442 +3628,1443 @@ struct miqt_string QsciScintilla_Annotation(const QsciScintilla* self, int line) return _ms; } -int QsciScintilla_AnnotationDisplay(const QsciScintilla* self) { - QsciScintilla::AnnotationDisplay _ret = self->annotationDisplay(); - return static_cast(_ret); +const char* QsciScintilla_WordCharacters(const QsciScintilla* self) { + return (const char*) self->wordCharacters(); +} + +int QsciScintilla_WrapMode(const QsciScintilla* self) { + QsciScintilla::WrapMode _ret = self->wrapMode(); + return static_cast(_ret); +} + +int QsciScintilla_WrapIndentMode(const QsciScintilla* self) { + QsciScintilla::WrapIndentMode _ret = self->wrapIndentMode(); + return static_cast(_ret); +} + +bool QsciScintilla_Write(const QsciScintilla* self, QIODevice* io) { + return self->write(io); +} + +void QsciScintilla_Append(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->append(text_QString); +} + +void QsciScintilla_AutoCompleteFromAll(QsciScintilla* self) { + self->autoCompleteFromAll(); +} + +void QsciScintilla_AutoCompleteFromAPIs(QsciScintilla* self) { + self->autoCompleteFromAPIs(); +} + +void QsciScintilla_AutoCompleteFromDocument(QsciScintilla* self) { + self->autoCompleteFromDocument(); +} + +void QsciScintilla_CallTip(QsciScintilla* self) { + self->callTip(); +} + +void QsciScintilla_Clear(QsciScintilla* self) { + self->clear(); +} + +void QsciScintilla_Copy(QsciScintilla* self) { + self->copy(); +} + +void QsciScintilla_Cut(QsciScintilla* self) { + self->cut(); +} + +void QsciScintilla_EnsureCursorVisible(QsciScintilla* self) { + self->ensureCursorVisible(); +} + +void QsciScintilla_EnsureLineVisible(QsciScintilla* self, int line) { + self->ensureLineVisible(static_cast(line)); +} + +void QsciScintilla_FoldAll(QsciScintilla* self, bool children) { + self->foldAll(children); +} + +void QsciScintilla_FoldLine(QsciScintilla* self, int line) { + self->foldLine(static_cast(line)); +} + +void QsciScintilla_Indent(QsciScintilla* self, int line) { + self->indent(static_cast(line)); +} + +void QsciScintilla_Insert(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->insert(text_QString); +} + +void QsciScintilla_InsertAt(QsciScintilla* self, struct miqt_string text, int line, int index) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->insertAt(text_QString, static_cast(line), static_cast(index)); +} + +void QsciScintilla_MoveToMatchingBrace(QsciScintilla* self) { + self->moveToMatchingBrace(); +} + +void QsciScintilla_Paste(QsciScintilla* self) { + self->paste(); +} + +void QsciScintilla_Redo(QsciScintilla* self) { + self->redo(); +} + +void QsciScintilla_RemoveSelectedText(QsciScintilla* self) { + self->removeSelectedText(); +} + +void QsciScintilla_ReplaceSelectedText(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->replaceSelectedText(text_QString); } -void QsciScintilla_ClearAnnotations(QsciScintilla* self) { - self->clearAnnotations(); +void QsciScintilla_ResetSelectionBackgroundColor(QsciScintilla* self) { + self->resetSelectionBackgroundColor(); } -bool QsciScintilla_AutoCompletionCaseSensitivity(const QsciScintilla* self) { - return self->autoCompletionCaseSensitivity(); +void QsciScintilla_ResetSelectionForegroundColor(QsciScintilla* self) { + self->resetSelectionForegroundColor(); } -bool QsciScintilla_AutoCompletionFillupsEnabled(const QsciScintilla* self) { - return self->autoCompletionFillupsEnabled(); +void QsciScintilla_SelectAll(QsciScintilla* self, bool selectVal) { + self->selectAll(selectVal); } -bool QsciScintilla_AutoCompletionReplaceWord(const QsciScintilla* self) { - return self->autoCompletionReplaceWord(); +void QsciScintilla_SelectToMatchingBrace(QsciScintilla* self) { + self->selectToMatchingBrace(); } -bool QsciScintilla_AutoCompletionShowSingle(const QsciScintilla* self) { - return self->autoCompletionShowSingle(); +void QsciScintilla_SetAutoCompletionCaseSensitivity(QsciScintilla* self, bool cs) { + self->setAutoCompletionCaseSensitivity(cs); } -int QsciScintilla_AutoCompletionSource(const QsciScintilla* self) { - QsciScintilla::AutoCompletionSource _ret = self->autoCompletionSource(); - return static_cast(_ret); +void QsciScintilla_SetAutoCompletionReplaceWord(QsciScintilla* self, bool replace) { + self->setAutoCompletionReplaceWord(replace); } -int QsciScintilla_AutoCompletionThreshold(const QsciScintilla* self) { - return self->autoCompletionThreshold(); +void QsciScintilla_SetAutoCompletionShowSingle(QsciScintilla* self, bool single) { + self->setAutoCompletionShowSingle(single); } -int QsciScintilla_AutoCompletionUseSingle(const QsciScintilla* self) { - QsciScintilla::AutoCompletionUseSingle _ret = self->autoCompletionUseSingle(); - return static_cast(_ret); +void QsciScintilla_SetAutoCompletionSource(QsciScintilla* self, int source) { + self->setAutoCompletionSource(static_cast(source)); } -bool QsciScintilla_AutoIndent(const QsciScintilla* self) { - return self->autoIndent(); +void QsciScintilla_SetAutoCompletionThreshold(QsciScintilla* self, int thresh) { + self->setAutoCompletionThreshold(static_cast(thresh)); } -bool QsciScintilla_BackspaceUnindents(const QsciScintilla* self) { - return self->backspaceUnindents(); +void QsciScintilla_SetAutoCompletionUseSingle(QsciScintilla* self, int single) { + self->setAutoCompletionUseSingle(static_cast(single)); } -void QsciScintilla_BeginUndoAction(QsciScintilla* self) { - self->beginUndoAction(); +void QsciScintilla_SetAutoIndent(QsciScintilla* self, bool autoindent) { + self->setAutoIndent(autoindent); } -int QsciScintilla_BraceMatching(const QsciScintilla* self) { - QsciScintilla::BraceMatch _ret = self->braceMatching(); - return static_cast(_ret); +void QsciScintilla_SetBraceMatching(QsciScintilla* self, int bm) { + self->setBraceMatching(static_cast(bm)); } -struct miqt_string QsciScintilla_Bytes(const QsciScintilla* self, int start, int end) { - QByteArray _qb = self->bytes(static_cast(start), static_cast(end)); - struct miqt_string _ms; - _ms.len = _qb.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _qb.data(), _ms.len); - return _ms; +void QsciScintilla_SetBackspaceUnindents(QsciScintilla* self, bool unindent) { + self->setBackspaceUnindents(unindent); } -int QsciScintilla_CallTipsPosition(const QsciScintilla* self) { - QsciScintilla::CallTipsPosition _ret = self->callTipsPosition(); - return static_cast(_ret); +void QsciScintilla_SetCaretForegroundColor(QsciScintilla* self, QColor* col) { + self->setCaretForegroundColor(*col); } -int QsciScintilla_CallTipsStyle(const QsciScintilla* self) { - QsciScintilla::CallTipsStyle _ret = self->callTipsStyle(); - return static_cast(_ret); +void QsciScintilla_SetCaretLineBackgroundColor(QsciScintilla* self, QColor* col) { + self->setCaretLineBackgroundColor(*col); } -int QsciScintilla_CallTipsVisible(const QsciScintilla* self) { - return self->callTipsVisible(); +void QsciScintilla_SetCaretLineFrameWidth(QsciScintilla* self, int width) { + self->setCaretLineFrameWidth(static_cast(width)); } -void QsciScintilla_CancelFind(QsciScintilla* self) { - self->cancelFind(); +void QsciScintilla_SetCaretLineVisible(QsciScintilla* self, bool enable) { + self->setCaretLineVisible(enable); } -void QsciScintilla_CancelList(QsciScintilla* self) { - self->cancelList(); +void QsciScintilla_SetCaretWidth(QsciScintilla* self, int width) { + self->setCaretWidth(static_cast(width)); } -bool QsciScintilla_CaseSensitive(const QsciScintilla* self) { - return self->caseSensitive(); +void QsciScintilla_SetColor(QsciScintilla* self, QColor* c) { + self->setColor(*c); } -void QsciScintilla_ClearFolds(QsciScintilla* self) { - self->clearFolds(); +void QsciScintilla_SetCursorPosition(QsciScintilla* self, int line, int index) { + self->setCursorPosition(static_cast(line), static_cast(index)); } -void QsciScintilla_ClearIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { - self->clearIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +void QsciScintilla_SetEolMode(QsciScintilla* self, int mode) { + self->setEolMode(static_cast(mode)); } -void QsciScintilla_ClearRegisteredImages(QsciScintilla* self) { - self->clearRegisteredImages(); +void QsciScintilla_SetEolVisibility(QsciScintilla* self, bool visible) { + self->setEolVisibility(visible); } -QColor* QsciScintilla_Color(const QsciScintilla* self) { - return new QColor(self->color()); +void QsciScintilla_SetFolding(QsciScintilla* self, int fold, int margin) { + self->setFolding(static_cast(fold), static_cast(margin)); } -struct miqt_array /* of int */ QsciScintilla_ContractedFolds(const QsciScintilla* self) { - QList _ret = self->contractedFolds(); - // Convert QList<> from C++ memory to manually-managed C memory - int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +void QsciScintilla_SetIndentation(QsciScintilla* self, int line, int indentation) { + self->setIndentation(static_cast(line), static_cast(indentation)); } -void QsciScintilla_ConvertEols(QsciScintilla* self, int mode) { - self->convertEols(static_cast(mode)); +void QsciScintilla_SetIndentationGuides(QsciScintilla* self, bool enable) { + self->setIndentationGuides(enable); } -QMenu* QsciScintilla_CreateStandardContextMenu(QsciScintilla* self) { - return self->createStandardContextMenu(); +void QsciScintilla_SetIndentationGuidesBackgroundColor(QsciScintilla* self, QColor* col) { + self->setIndentationGuidesBackgroundColor(*col); } -QsciDocument* QsciScintilla_Document(const QsciScintilla* self) { - return new QsciDocument(self->document()); +void QsciScintilla_SetIndentationGuidesForegroundColor(QsciScintilla* self, QColor* col) { + self->setIndentationGuidesForegroundColor(*col); } -void QsciScintilla_EndUndoAction(QsciScintilla* self) { - self->endUndoAction(); +void QsciScintilla_SetIndentationsUseTabs(QsciScintilla* self, bool tabs) { + self->setIndentationsUseTabs(tabs); } -QColor* QsciScintilla_EdgeColor(const QsciScintilla* self) { - return new QColor(self->edgeColor()); +void QsciScintilla_SetIndentationWidth(QsciScintilla* self, int width) { + self->setIndentationWidth(static_cast(width)); } -int QsciScintilla_EdgeColumn(const QsciScintilla* self) { - return self->edgeColumn(); +void QsciScintilla_SetLexer(QsciScintilla* self, QsciLexer* lexer) { + self->setLexer(lexer); } -int QsciScintilla_EdgeMode(const QsciScintilla* self) { - QsciScintilla::EdgeMode _ret = self->edgeMode(); - return static_cast(_ret); +void QsciScintilla_SetMarginsBackgroundColor(QsciScintilla* self, QColor* col) { + self->setMarginsBackgroundColor(*col); } -void QsciScintilla_SetFont(QsciScintilla* self, QFont* f) { - self->setFont(*f); +void QsciScintilla_SetMarginsFont(QsciScintilla* self, QFont* f) { + self->setMarginsFont(*f); } -int QsciScintilla_EolMode(const QsciScintilla* self) { - QsciScintilla::EolMode _ret = self->eolMode(); - return static_cast(_ret); +void QsciScintilla_SetMarginsForegroundColor(QsciScintilla* self, QColor* col) { + self->setMarginsForegroundColor(*col); } -bool QsciScintilla_EolVisibility(const QsciScintilla* self) { - return self->eolVisibility(); +void QsciScintilla_SetMarginLineNumbers(QsciScintilla* self, int margin, bool lnrs) { + self->setMarginLineNumbers(static_cast(margin), lnrs); } -int QsciScintilla_ExtraAscent(const QsciScintilla* self) { - return self->extraAscent(); +void QsciScintilla_SetMarginMarkerMask(QsciScintilla* self, int margin, int mask) { + self->setMarginMarkerMask(static_cast(margin), static_cast(mask)); } -int QsciScintilla_ExtraDescent(const QsciScintilla* self) { - return self->extraDescent(); +void QsciScintilla_SetMarginSensitivity(QsciScintilla* self, int margin, bool sens) { + self->setMarginSensitivity(static_cast(margin), sens); } -void QsciScintilla_FillIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { - self->fillIndicatorRange(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo), static_cast(indicatorNumber)); +void QsciScintilla_SetMarginWidth(QsciScintilla* self, int margin, int width) { + self->setMarginWidth(static_cast(margin), static_cast(width)); } -bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap); +void QsciScintilla_SetMarginWidth2(QsciScintilla* self, int margin, struct miqt_string s) { + QString s_QString = QString::fromUtf8(s.data, s.len); + self->setMarginWidth(static_cast(margin), s_QString); } -bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo); +void QsciScintilla_SetModified(QsciScintilla* self, bool m) { + self->setModified(m); } -bool QsciScintilla_FindNext(QsciScintilla* self) { - return self->findNext(); +void QsciScintilla_SetPaper(QsciScintilla* self, QColor* c) { + self->setPaper(*c); } -bool QsciScintilla_FindMatchingBrace(QsciScintilla* self, long* brace, long* other, int mode) { - return self->findMatchingBrace(static_cast(*brace), static_cast(*other), static_cast(mode)); +void QsciScintilla_SetReadOnly(QsciScintilla* self, bool ro) { + self->setReadOnly(ro); } -int QsciScintilla_FirstVisibleLine(const QsciScintilla* self) { - return self->firstVisibleLine(); +void QsciScintilla_SetSelection(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo) { + self->setSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); } -int QsciScintilla_Folding(const QsciScintilla* self) { - QsciScintilla::FoldStyle _ret = self->folding(); - return static_cast(_ret); +void QsciScintilla_SetSelectionBackgroundColor(QsciScintilla* self, QColor* col) { + self->setSelectionBackgroundColor(*col); } -void QsciScintilla_GetCursorPosition(const QsciScintilla* self, int* line, int* index) { - self->getCursorPosition(static_cast(line), static_cast(index)); +void QsciScintilla_SetSelectionForegroundColor(QsciScintilla* self, QColor* col) { + self->setSelectionForegroundColor(*col); } -void QsciScintilla_GetSelection(const QsciScintilla* self, int* lineFrom, int* indexFrom, int* lineTo, int* indexTo) { - self->getSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); +void QsciScintilla_SetTabIndents(QsciScintilla* self, bool indent) { + self->setTabIndents(indent); } -bool QsciScintilla_HasSelectedText(const QsciScintilla* self) { - return self->hasSelectedText(); +void QsciScintilla_SetTabWidth(QsciScintilla* self, int width) { + self->setTabWidth(static_cast(width)); } -int QsciScintilla_Indentation(const QsciScintilla* self, int line) { - return self->indentation(static_cast(line)); +void QsciScintilla_SetText(QsciScintilla* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setText(text_QString); } -bool QsciScintilla_IndentationGuides(const QsciScintilla* self) { - return self->indentationGuides(); +void QsciScintilla_SetUtf8(QsciScintilla* self, bool cp) { + self->setUtf8(cp); } -bool QsciScintilla_IndentationsUseTabs(const QsciScintilla* self) { - return self->indentationsUseTabs(); +void QsciScintilla_SetWhitespaceVisibility(QsciScintilla* self, int mode) { + self->setWhitespaceVisibility(static_cast(mode)); } -int QsciScintilla_IndentationWidth(const QsciScintilla* self) { - return self->indentationWidth(); +void QsciScintilla_SetWrapMode(QsciScintilla* self, int mode) { + self->setWrapMode(static_cast(mode)); } -int QsciScintilla_IndicatorDefine(QsciScintilla* self, int style) { - return self->indicatorDefine(static_cast(style)); +void QsciScintilla_Undo(QsciScintilla* self) { + self->undo(); } -bool QsciScintilla_IndicatorDrawUnder(const QsciScintilla* self, int indicatorNumber) { - return self->indicatorDrawUnder(static_cast(indicatorNumber)); +void QsciScintilla_Unindent(QsciScintilla* self, int line) { + self->unindent(static_cast(line)); } -bool QsciScintilla_IsCallTipActive(const QsciScintilla* self) { - return self->isCallTipActive(); +void QsciScintilla_ZoomIn(QsciScintilla* self, int rangeVal) { + self->zoomIn(static_cast(rangeVal)); } -bool QsciScintilla_IsListActive(const QsciScintilla* self) { - return self->isListActive(); +void QsciScintilla_ZoomIn2(QsciScintilla* self) { + self->zoomIn(); } -bool QsciScintilla_IsModified(const QsciScintilla* self) { - return self->isModified(); +void QsciScintilla_ZoomOut(QsciScintilla* self, int rangeVal) { + self->zoomOut(static_cast(rangeVal)); } -bool QsciScintilla_IsReadOnly(const QsciScintilla* self) { - return self->isReadOnly(); +void QsciScintilla_ZoomOut2(QsciScintilla* self) { + self->zoomOut(); +} + +void QsciScintilla_ZoomTo(QsciScintilla* self, int size) { + self->zoomTo(static_cast(size)); } -bool QsciScintilla_IsRedoAvailable(const QsciScintilla* self) { - return self->isRedoAvailable(); +void QsciScintilla_CursorPositionChanged(QsciScintilla* self, int line, int index) { + self->cursorPositionChanged(static_cast(line), static_cast(index)); } -bool QsciScintilla_IsUndoAvailable(const QsciScintilla* self) { - return self->isUndoAvailable(); +void QsciScintilla_connect_CursorPositionChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::cursorPositionChanged), self, [=](int line, int index) { + int sigval1 = line; + int sigval2 = index; + miqt_exec_callback_QsciScintilla_CursorPositionChanged(slot, sigval1, sigval2); + }); } -bool QsciScintilla_IsUtf8(const QsciScintilla* self) { - return self->isUtf8(); +void QsciScintilla_CopyAvailable(QsciScintilla* self, bool yes) { + self->copyAvailable(yes); } -bool QsciScintilla_IsWordCharacter(const QsciScintilla* self, char ch) { - return self->isWordCharacter(static_cast(ch)); +void QsciScintilla_connect_CopyAvailable(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::copyAvailable), self, [=](bool yes) { + bool sigval1 = yes; + miqt_exec_callback_QsciScintilla_CopyAvailable(slot, sigval1); + }); } -int QsciScintilla_LineAt(const QsciScintilla* self, QPoint* point) { - return self->lineAt(*point); +void QsciScintilla_IndicatorClicked(QsciScintilla* self, int line, int index, int state) { + self->indicatorClicked(static_cast(line), static_cast(index), static_cast(state)); } -void QsciScintilla_LineIndexFromPosition(const QsciScintilla* self, int position, int* line, int* index) { - self->lineIndexFromPosition(static_cast(position), static_cast(line), static_cast(index)); +void QsciScintilla_connect_IndicatorClicked(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorClicked), self, [=](int line, int index, Qt::KeyboardModifiers state) { + int sigval1 = line; + int sigval2 = index; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_IndicatorClicked(slot, sigval1, sigval2, sigval3); + }); } -int QsciScintilla_LineLength(const QsciScintilla* self, int line) { - return self->lineLength(static_cast(line)); +void QsciScintilla_IndicatorReleased(QsciScintilla* self, int line, int index, int state) { + self->indicatorReleased(static_cast(line), static_cast(index), static_cast(state)); } -int QsciScintilla_Lines(const QsciScintilla* self) { - return self->lines(); +void QsciScintilla_connect_IndicatorReleased(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorReleased), self, [=](int line, int index, Qt::KeyboardModifiers state) { + int sigval1 = line; + int sigval2 = index; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_IndicatorReleased(slot, sigval1, sigval2, sigval3); + }); } -int QsciScintilla_Length(const QsciScintilla* self) { - return self->length(); +void QsciScintilla_LinesChanged(QsciScintilla* self) { + self->linesChanged(); } -QsciLexer* QsciScintilla_Lexer(const QsciScintilla* self) { - return self->lexer(); +void QsciScintilla_connect_LinesChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::linesChanged), self, [=]() { + miqt_exec_callback_QsciScintilla_LinesChanged(slot); + }); } -QColor* QsciScintilla_MarginBackgroundColor(const QsciScintilla* self, int margin) { - return new QColor(self->marginBackgroundColor(static_cast(margin))); +void QsciScintilla_MarginClicked(QsciScintilla* self, int margin, int line, int state) { + self->marginClicked(static_cast(margin), static_cast(line), static_cast(state)); } -bool QsciScintilla_MarginLineNumbers(const QsciScintilla* self, int margin) { - return self->marginLineNumbers(static_cast(margin)); +void QsciScintilla_connect_MarginClicked(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::marginClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { + int sigval1 = margin; + int sigval2 = line; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_MarginClicked(slot, sigval1, sigval2, sigval3); + }); } -int QsciScintilla_MarginMarkerMask(const QsciScintilla* self, int margin) { - return self->marginMarkerMask(static_cast(margin)); +void QsciScintilla_MarginRightClicked(QsciScintilla* self, int margin, int line, int state) { + self->marginRightClicked(static_cast(margin), static_cast(line), static_cast(state)); } -int QsciScintilla_MarginOptions(const QsciScintilla* self) { - return self->marginOptions(); +void QsciScintilla_connect_MarginRightClicked(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::marginRightClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { + int sigval1 = margin; + int sigval2 = line; + Qt::KeyboardModifiers state_ret = state; + int sigval3 = static_cast(state_ret); + miqt_exec_callback_QsciScintilla_MarginRightClicked(slot, sigval1, sigval2, sigval3); + }); } -bool QsciScintilla_MarginSensitivity(const QsciScintilla* self, int margin) { - return self->marginSensitivity(static_cast(margin)); +void QsciScintilla_ModificationAttempted(QsciScintilla* self) { + self->modificationAttempted(); } -int QsciScintilla_MarginType(const QsciScintilla* self, int margin) { - QsciScintilla::MarginType _ret = self->marginType(static_cast(margin)); - return static_cast(_ret); +void QsciScintilla_connect_ModificationAttempted(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::modificationAttempted), self, [=]() { + miqt_exec_callback_QsciScintilla_ModificationAttempted(slot); + }); } -int QsciScintilla_MarginWidth(const QsciScintilla* self, int margin) { - return self->marginWidth(static_cast(margin)); +void QsciScintilla_ModificationChanged(QsciScintilla* self, bool m) { + self->modificationChanged(m); } -int QsciScintilla_Margins(const QsciScintilla* self) { - return self->margins(); +void QsciScintilla_connect_ModificationChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::modificationChanged), self, [=](bool m) { + bool sigval1 = m; + miqt_exec_callback_QsciScintilla_ModificationChanged(slot, sigval1); + }); } -int QsciScintilla_MarkerDefine(QsciScintilla* self, int sym) { - return self->markerDefine(static_cast(sym)); +void QsciScintilla_SelectionChanged(QsciScintilla* self) { + self->selectionChanged(); } -int QsciScintilla_MarkerDefineWithCh(QsciScintilla* self, char ch) { - return self->markerDefine(static_cast(ch)); +void QsciScintilla_connect_SelectionChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::selectionChanged), self, [=]() { + miqt_exec_callback_QsciScintilla_SelectionChanged(slot); + }); } -int QsciScintilla_MarkerDefineWithPm(QsciScintilla* self, QPixmap* pm) { - return self->markerDefine(*pm); +void QsciScintilla_TextChanged(QsciScintilla* self) { + self->textChanged(); } -int QsciScintilla_MarkerDefineWithIm(QsciScintilla* self, QImage* im) { - return self->markerDefine(*im); +void QsciScintilla_connect_TextChanged(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::textChanged), self, [=]() { + miqt_exec_callback_QsciScintilla_TextChanged(slot); + }); } -int QsciScintilla_MarkerAdd(QsciScintilla* self, int linenr, int markerNumber) { - return self->markerAdd(static_cast(linenr), static_cast(markerNumber)); +void QsciScintilla_UserListActivated(QsciScintilla* self, int id, struct miqt_string stringVal) { + QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); + self->userListActivated(static_cast(id), stringVal_QString); } -unsigned int QsciScintilla_MarkersAtLine(const QsciScintilla* self, int linenr) { - return self->markersAtLine(static_cast(linenr)); +void QsciScintilla_connect_UserListActivated(QsciScintilla* self, intptr_t slot) { + MiqtVirtualQsciScintilla::connect(self, static_cast(&QsciScintilla::userListActivated), self, [=](int id, const QString& stringVal) { + int sigval1 = id; + const QString stringVal_ret = stringVal; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray stringVal_b = stringVal_ret.toUtf8(); + struct miqt_string stringVal_ms; + stringVal_ms.len = stringVal_b.length(); + stringVal_ms.data = static_cast(malloc(stringVal_ms.len)); + memcpy(stringVal_ms.data, stringVal_b.data(), stringVal_ms.len); + struct miqt_string sigval2 = stringVal_ms; + miqt_exec_callback_QsciScintilla_UserListActivated(slot, sigval1, sigval2); + }); } -void QsciScintilla_MarkerDelete(QsciScintilla* self, int linenr) { - self->markerDelete(static_cast(linenr)); +struct miqt_string QsciScintilla_Tr2(const char* s, const char* c) { + QString _ret = QsciScintilla::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_MarkerDeleteAll(QsciScintilla* self) { - self->markerDeleteAll(); +struct miqt_string QsciScintilla_Tr3(const char* s, const char* c, int n) { + QString _ret = QsciScintilla::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; } -void QsciScintilla_MarkerDeleteHandle(QsciScintilla* self, int mhandle) { - self->markerDeleteHandle(static_cast(mhandle)); +void QsciScintilla_ClearAnnotations1(QsciScintilla* self, int line) { + self->clearAnnotations(static_cast(line)); } -int QsciScintilla_MarkerLine(const QsciScintilla* self, int mhandle) { - return self->markerLine(static_cast(mhandle)); +int QsciScintilla_IndicatorDefine2(QsciScintilla* self, int style, int indicatorNumber) { + return self->indicatorDefine(static_cast(style), static_cast(indicatorNumber)); } -int QsciScintilla_MarkerFindNext(const QsciScintilla* self, int linenr, unsigned int mask) { - return self->markerFindNext(static_cast(linenr), static_cast(mask)); +int QsciScintilla_MarkerDefine2(QsciScintilla* self, int sym, int markerNumber) { + return self->markerDefine(static_cast(sym), static_cast(markerNumber)); } -int QsciScintilla_MarkerFindPrevious(const QsciScintilla* self, int linenr, unsigned int mask) { - return self->markerFindPrevious(static_cast(linenr), static_cast(mask)); +int QsciScintilla_MarkerDefine22(QsciScintilla* self, char ch, int markerNumber) { + return self->markerDefine(static_cast(ch), static_cast(markerNumber)); } -bool QsciScintilla_OverwriteMode(const QsciScintilla* self) { - return self->overwriteMode(); +int QsciScintilla_MarkerDefine23(QsciScintilla* self, QPixmap* pm, int markerNumber) { + return self->markerDefine(*pm, static_cast(markerNumber)); } -QColor* QsciScintilla_Paper(const QsciScintilla* self) { - return new QColor(self->paper()); +int QsciScintilla_MarkerDefine24(QsciScintilla* self, QImage* im, int markerNumber) { + return self->markerDefine(*im, static_cast(markerNumber)); } -int QsciScintilla_PositionFromLineIndex(const QsciScintilla* self, int line, int index) { - return self->positionFromLineIndex(static_cast(line), static_cast(index)); +void QsciScintilla_MarkerDelete2(QsciScintilla* self, int linenr, int markerNumber) { + self->markerDelete(static_cast(linenr), static_cast(markerNumber)); } -bool QsciScintilla_Read(QsciScintilla* self, QIODevice* io) { - return self->read(io); +void QsciScintilla_MarkerDeleteAll1(QsciScintilla* self, int markerNumber) { + self->markerDeleteAll(static_cast(markerNumber)); } -void QsciScintilla_Recolor(QsciScintilla* self) { - self->recolor(); +void QsciScintilla_SetIndicatorDrawUnder2(QsciScintilla* self, bool under, int indicatorNumber) { + self->setIndicatorDrawUnder(under, static_cast(indicatorNumber)); } -void QsciScintilla_RegisterImage(QsciScintilla* self, int id, QPixmap* pm) { - self->registerImage(static_cast(id), *pm); +void QsciScintilla_SetIndicatorForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { + self->setIndicatorForegroundColor(*col, static_cast(indicatorNumber)); } -void QsciScintilla_RegisterImage2(QsciScintilla* self, int id, QImage* im) { - self->registerImage(static_cast(id), *im); +void QsciScintilla_SetIndicatorHoverForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { + self->setIndicatorHoverForegroundColor(*col, static_cast(indicatorNumber)); } -void QsciScintilla_Replace(QsciScintilla* self, struct miqt_string replaceStr) { - QString replaceStr_QString = QString::fromUtf8(replaceStr.data, replaceStr.len); - self->replace(replaceStr_QString); +void QsciScintilla_SetIndicatorHoverStyle2(QsciScintilla* self, int style, int indicatorNumber) { + self->setIndicatorHoverStyle(static_cast(style), static_cast(indicatorNumber)); } -void QsciScintilla_ResetFoldMarginColors(QsciScintilla* self) { - self->resetFoldMarginColors(); +void QsciScintilla_SetIndicatorOutlineColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { + self->setIndicatorOutlineColor(*col, static_cast(indicatorNumber)); } -void QsciScintilla_ResetHotspotBackgroundColor(QsciScintilla* self) { - self->resetHotspotBackgroundColor(); +void QsciScintilla_ClearMarginText1(QsciScintilla* self, int line) { + self->clearMarginText(static_cast(line)); } -void QsciScintilla_ResetHotspotForegroundColor(QsciScintilla* self) { - self->resetHotspotForegroundColor(); +void QsciScintilla_SetMarkerBackgroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { + self->setMarkerBackgroundColor(*col, static_cast(markerNumber)); } -int QsciScintilla_ScrollWidth(const QsciScintilla* self) { - return self->scrollWidth(); +void QsciScintilla_SetMarkerForegroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { + self->setMarkerForegroundColor(*col, static_cast(markerNumber)); } -bool QsciScintilla_ScrollWidthTracking(const QsciScintilla* self) { - return self->scrollWidthTracking(); +void QsciScintilla_SetWrapVisualFlags2(QsciScintilla* self, int endFlag, int startFlag) { + self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag)); } -void QsciScintilla_SetFoldMarginColors(QsciScintilla* self, QColor* fore, QColor* back) { - self->setFoldMarginColors(*fore, *back); +void QsciScintilla_SetWrapVisualFlags3(QsciScintilla* self, int endFlag, int startFlag, int indent) { + self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag), static_cast(indent)); } -void QsciScintilla_SetAnnotationDisplay(QsciScintilla* self, int display) { - self->setAnnotationDisplay(static_cast(display)); +void QsciScintilla_override_virtual_ApiContext(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ApiContext = slot; } -void QsciScintilla_SetAutoCompletionFillupsEnabled(QsciScintilla* self, bool enabled) { - self->setAutoCompletionFillupsEnabled(enabled); +struct miqt_array /* of struct miqt_string */ QsciScintilla_virtualbase_ApiContext(void* self, int pos, int* context_start, int* last_word_start) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ApiContext(pos, context_start, last_word_start); } -void QsciScintilla_SetAutoCompletionFillups(QsciScintilla* self, const char* fillups) { - self->setAutoCompletionFillups(fillups); +void QsciScintilla_override_virtual_FindFirst(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FindFirst = slot; } -void QsciScintilla_SetAutoCompletionWordSeparators(QsciScintilla* self, struct miqt_array /* of struct miqt_string */ separators) { - QStringList separators_QList; - separators_QList.reserve(separators.len); - struct miqt_string* separators_arr = static_cast(separators.data); - for(size_t i = 0; i < separators.len; ++i) { - QString separators_arr_i_QString = QString::fromUtf8(separators_arr[i].data, separators_arr[i].len); - separators_QList.push_back(separators_arr_i_QString); - } - self->setAutoCompletionWordSeparators(separators_QList); +bool QsciScintilla_virtualbase_FindFirst(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FindFirst(expr, re, cs, wo, wrap, forward, line, index, show, posix, cxx11); } -void QsciScintilla_SetCallTipsBackgroundColor(QsciScintilla* self, QColor* col) { - self->setCallTipsBackgroundColor(*col); +void QsciScintilla_override_virtual_FindFirstInSelection(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FindFirstInSelection = slot; } -void QsciScintilla_SetCallTipsForegroundColor(QsciScintilla* self, QColor* col) { - self->setCallTipsForegroundColor(*col); +bool QsciScintilla_virtualbase_FindFirstInSelection(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FindFirstInSelection(expr, re, cs, wo, forward, show, posix, cxx11); } -void QsciScintilla_SetCallTipsHighlightColor(QsciScintilla* self, QColor* col) { - self->setCallTipsHighlightColor(*col); +void QsciScintilla_override_virtual_FindNext(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FindNext = slot; } -void QsciScintilla_SetCallTipsPosition(QsciScintilla* self, int position) { - self->setCallTipsPosition(static_cast(position)); +bool QsciScintilla_virtualbase_FindNext(void* self) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FindNext(); +} + +void QsciScintilla_override_virtual_Recolor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Recolor = slot; } -void QsciScintilla_SetCallTipsStyle(QsciScintilla* self, int style) { - self->setCallTipsStyle(static_cast(style)); +void QsciScintilla_virtualbase_Recolor(void* self, int start, int end) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Recolor(start, end); } -void QsciScintilla_SetCallTipsVisible(QsciScintilla* self, int nr) { - self->setCallTipsVisible(static_cast(nr)); +void QsciScintilla_override_virtual_Replace(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Replace = slot; } -void QsciScintilla_SetContractedFolds(QsciScintilla* self, struct miqt_array /* of int */ folds) { - QList folds_QList; - folds_QList.reserve(folds.len); - int* folds_arr = static_cast(folds.data); - for(size_t i = 0; i < folds.len; ++i) { - folds_QList.push_back(static_cast(folds_arr[i])); - } - self->setContractedFolds(folds_QList); +void QsciScintilla_virtualbase_Replace(void* self, struct miqt_string replaceStr) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Replace(replaceStr); } -void QsciScintilla_SetDocument(QsciScintilla* self, QsciDocument* document) { - self->setDocument(*document); +void QsciScintilla_override_virtual_Append(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Append = slot; } -void QsciScintilla_AddEdgeColumn(QsciScintilla* self, int colnr, QColor* col) { - self->addEdgeColumn(static_cast(colnr), *col); +void QsciScintilla_virtualbase_Append(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Append(text); } -void QsciScintilla_ClearEdgeColumns(QsciScintilla* self) { - self->clearEdgeColumns(); +void QsciScintilla_override_virtual_AutoCompleteFromAll(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__AutoCompleteFromAll = slot; } -void QsciScintilla_SetEdgeColor(QsciScintilla* self, QColor* col) { - self->setEdgeColor(*col); +void QsciScintilla_virtualbase_AutoCompleteFromAll(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_AutoCompleteFromAll(); } -void QsciScintilla_SetEdgeColumn(QsciScintilla* self, int colnr) { - self->setEdgeColumn(static_cast(colnr)); +void QsciScintilla_override_virtual_AutoCompleteFromAPIs(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__AutoCompleteFromAPIs = slot; } -void QsciScintilla_SetEdgeMode(QsciScintilla* self, int mode) { - self->setEdgeMode(static_cast(mode)); +void QsciScintilla_virtualbase_AutoCompleteFromAPIs(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_AutoCompleteFromAPIs(); } -void QsciScintilla_SetFirstVisibleLine(QsciScintilla* self, int linenr) { - self->setFirstVisibleLine(static_cast(linenr)); +void QsciScintilla_override_virtual_AutoCompleteFromDocument(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__AutoCompleteFromDocument = slot; } -void QsciScintilla_SetIndicatorDrawUnder(QsciScintilla* self, bool under) { - self->setIndicatorDrawUnder(under); +void QsciScintilla_virtualbase_AutoCompleteFromDocument(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_AutoCompleteFromDocument(); } -void QsciScintilla_SetIndicatorForegroundColor(QsciScintilla* self, QColor* col) { - self->setIndicatorForegroundColor(*col); +void QsciScintilla_override_virtual_CallTip(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__CallTip = slot; } -void QsciScintilla_SetIndicatorHoverForegroundColor(QsciScintilla* self, QColor* col) { - self->setIndicatorHoverForegroundColor(*col); +void QsciScintilla_virtualbase_CallTip(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_CallTip(); } -void QsciScintilla_SetIndicatorHoverStyle(QsciScintilla* self, int style) { - self->setIndicatorHoverStyle(static_cast(style)); +void QsciScintilla_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Clear = slot; } -void QsciScintilla_SetIndicatorOutlineColor(QsciScintilla* self, QColor* col) { - self->setIndicatorOutlineColor(*col); +void QsciScintilla_virtualbase_Clear(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Clear(); } -void QsciScintilla_SetMarginBackgroundColor(QsciScintilla* self, int margin, QColor* col) { - self->setMarginBackgroundColor(static_cast(margin), *col); +void QsciScintilla_override_virtual_Copy(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Copy = slot; } -void QsciScintilla_SetMarginOptions(QsciScintilla* self, int options) { - self->setMarginOptions(static_cast(options)); +void QsciScintilla_virtualbase_Copy(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Copy(); } -void QsciScintilla_SetMarginText(QsciScintilla* self, int line, struct miqt_string text, int style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setMarginText(static_cast(line), text_QString, static_cast(style)); +void QsciScintilla_override_virtual_Cut(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Cut = slot; } -void QsciScintilla_SetMarginText2(QsciScintilla* self, int line, struct miqt_string text, QsciStyle* style) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setMarginText(static_cast(line), text_QString, *style); +void QsciScintilla_virtualbase_Cut(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Cut(); } -void QsciScintilla_SetMarginText3(QsciScintilla* self, int line, QsciStyledText* text) { - self->setMarginText(static_cast(line), *text); +void QsciScintilla_override_virtual_EnsureCursorVisible(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__EnsureCursorVisible = slot; } -void QsciScintilla_SetMarginType(QsciScintilla* self, int margin, int typeVal) { - self->setMarginType(static_cast(margin), static_cast(typeVal)); +void QsciScintilla_virtualbase_EnsureCursorVisible(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_EnsureCursorVisible(); } -void QsciScintilla_ClearMarginText(QsciScintilla* self) { - self->clearMarginText(); +void QsciScintilla_override_virtual_EnsureLineVisible(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__EnsureLineVisible = slot; } -void QsciScintilla_SetMargins(QsciScintilla* self, int margins) { - self->setMargins(static_cast(margins)); +void QsciScintilla_virtualbase_EnsureLineVisible(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_EnsureLineVisible(line); } -void QsciScintilla_SetMarkerBackgroundColor(QsciScintilla* self, QColor* col) { - self->setMarkerBackgroundColor(*col); +void QsciScintilla_override_virtual_FoldAll(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FoldAll = slot; } -void QsciScintilla_SetMarkerForegroundColor(QsciScintilla* self, QColor* col) { - self->setMarkerForegroundColor(*col); +void QsciScintilla_virtualbase_FoldAll(void* self, bool children) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FoldAll(children); } -void QsciScintilla_SetMatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { - self->setMatchedBraceBackgroundColor(*col); +void QsciScintilla_override_virtual_FoldLine(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FoldLine = slot; } -void QsciScintilla_SetMatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { - self->setMatchedBraceForegroundColor(*col); +void QsciScintilla_virtualbase_FoldLine(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FoldLine(line); } -void QsciScintilla_SetMatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { - self->setMatchedBraceIndicator(static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_Indent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Indent = slot; } -void QsciScintilla_ResetMatchedBraceIndicator(QsciScintilla* self) { - self->resetMatchedBraceIndicator(); +void QsciScintilla_virtualbase_Indent(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Indent(line); } -void QsciScintilla_SetScrollWidth(QsciScintilla* self, int pixelWidth) { - self->setScrollWidth(static_cast(pixelWidth)); +void QsciScintilla_override_virtual_Insert(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Insert = slot; } -void QsciScintilla_SetScrollWidthTracking(QsciScintilla* self, bool enabled) { - self->setScrollWidthTracking(enabled); +void QsciScintilla_virtualbase_Insert(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Insert(text); } -void QsciScintilla_SetTabDrawMode(QsciScintilla* self, int mode) { - self->setTabDrawMode(static_cast(mode)); +void QsciScintilla_override_virtual_InsertAt(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__InsertAt = slot; } -void QsciScintilla_SetUnmatchedBraceBackgroundColor(QsciScintilla* self, QColor* col) { - self->setUnmatchedBraceBackgroundColor(*col); +void QsciScintilla_virtualbase_InsertAt(void* self, struct miqt_string text, int line, int index) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_InsertAt(text, line, index); } -void QsciScintilla_SetUnmatchedBraceForegroundColor(QsciScintilla* self, QColor* col) { - self->setUnmatchedBraceForegroundColor(*col); +void QsciScintilla_override_virtual_MoveToMatchingBrace(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MoveToMatchingBrace = slot; } -void QsciScintilla_SetUnmatchedBraceIndicator(QsciScintilla* self, int indicatorNumber) { - self->setUnmatchedBraceIndicator(static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_MoveToMatchingBrace(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MoveToMatchingBrace(); } -void QsciScintilla_ResetUnmatchedBraceIndicator(QsciScintilla* self) { - self->resetUnmatchedBraceIndicator(); +void QsciScintilla_override_virtual_Paste(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Paste = slot; } -void QsciScintilla_SetWrapVisualFlags(QsciScintilla* self, int endFlag) { - self->setWrapVisualFlags(static_cast(endFlag)); +void QsciScintilla_virtualbase_Paste(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Paste(); } -struct miqt_string QsciScintilla_SelectedText(const QsciScintilla* self) { - QString _ret = self->selectedText(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_Redo(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Redo = slot; } -bool QsciScintilla_SelectionToEol(const QsciScintilla* self) { - return self->selectionToEol(); +void QsciScintilla_virtualbase_Redo(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Redo(); } -void QsciScintilla_SetHotspotBackgroundColor(QsciScintilla* self, QColor* col) { - self->setHotspotBackgroundColor(*col); +void QsciScintilla_override_virtual_RemoveSelectedText(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__RemoveSelectedText = slot; } -void QsciScintilla_SetHotspotForegroundColor(QsciScintilla* self, QColor* col) { - self->setHotspotForegroundColor(*col); +void QsciScintilla_virtualbase_RemoveSelectedText(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_RemoveSelectedText(); } -void QsciScintilla_SetHotspotUnderline(QsciScintilla* self, bool enable) { - self->setHotspotUnderline(enable); +void QsciScintilla_override_virtual_ReplaceSelectedText(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ReplaceSelectedText = slot; } -void QsciScintilla_SetHotspotWrap(QsciScintilla* self, bool enable) { - self->setHotspotWrap(enable); +void QsciScintilla_virtualbase_ReplaceSelectedText(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ReplaceSelectedText(text); } -void QsciScintilla_SetSelectionToEol(QsciScintilla* self, bool filled) { - self->setSelectionToEol(filled); +void QsciScintilla_override_virtual_ResetSelectionBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ResetSelectionBackgroundColor = slot; } -void QsciScintilla_SetExtraAscent(QsciScintilla* self, int extra) { - self->setExtraAscent(static_cast(extra)); +void QsciScintilla_virtualbase_ResetSelectionBackgroundColor(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ResetSelectionBackgroundColor(); } -void QsciScintilla_SetExtraDescent(QsciScintilla* self, int extra) { - self->setExtraDescent(static_cast(extra)); +void QsciScintilla_override_virtual_ResetSelectionForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ResetSelectionForegroundColor = slot; } -void QsciScintilla_SetOverwriteMode(QsciScintilla* self, bool overwrite) { - self->setOverwriteMode(overwrite); +void QsciScintilla_virtualbase_ResetSelectionForegroundColor(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ResetSelectionForegroundColor(); } -void QsciScintilla_SetWhitespaceBackgroundColor(QsciScintilla* self, QColor* col) { - self->setWhitespaceBackgroundColor(*col); +void QsciScintilla_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SelectAll = slot; } -void QsciScintilla_SetWhitespaceForegroundColor(QsciScintilla* self, QColor* col) { - self->setWhitespaceForegroundColor(*col); +void QsciScintilla_virtualbase_SelectAll(void* self, bool selectVal) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SelectAll(selectVal); } -void QsciScintilla_SetWhitespaceSize(QsciScintilla* self, int size) { - self->setWhitespaceSize(static_cast(size)); +void QsciScintilla_override_virtual_SelectToMatchingBrace(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SelectToMatchingBrace = slot; } -void QsciScintilla_SetWrapIndentMode(QsciScintilla* self, int mode) { - self->setWrapIndentMode(static_cast(mode)); +void QsciScintilla_virtualbase_SelectToMatchingBrace(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SelectToMatchingBrace(); } -void QsciScintilla_ShowUserList(QsciScintilla* self, int id, struct miqt_array /* of struct miqt_string */ list) { - QStringList list_QList; - list_QList.reserve(list.len); - struct miqt_string* list_arr = static_cast(list.data); - for(size_t i = 0; i < list.len; ++i) { - QString list_arr_i_QString = QString::fromUtf8(list_arr[i].data, list_arr[i].len); - list_QList.push_back(list_arr_i_QString); - } - self->showUserList(static_cast(id), list_QList); +void QsciScintilla_override_virtual_SetAutoCompletionCaseSensitivity(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionCaseSensitivity = slot; } -QsciCommandSet* QsciScintilla_StandardCommands(const QsciScintilla* self) { - return self->standardCommands(); +void QsciScintilla_virtualbase_SetAutoCompletionCaseSensitivity(void* self, bool cs) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionCaseSensitivity(cs); } -int QsciScintilla_TabDrawMode(const QsciScintilla* self) { - QsciScintilla::TabDrawMode _ret = self->tabDrawMode(); - return static_cast(_ret); +void QsciScintilla_override_virtual_SetAutoCompletionReplaceWord(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionReplaceWord = slot; } -bool QsciScintilla_TabIndents(const QsciScintilla* self) { - return self->tabIndents(); +void QsciScintilla_virtualbase_SetAutoCompletionReplaceWord(void* self, bool replace) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionReplaceWord(replace); } -int QsciScintilla_TabWidth(const QsciScintilla* self) { - return self->tabWidth(); +void QsciScintilla_override_virtual_SetAutoCompletionShowSingle(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionShowSingle = slot; } -struct miqt_string QsciScintilla_Text(const QsciScintilla* self) { - QString _ret = self->text(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_virtualbase_SetAutoCompletionShowSingle(void* self, bool single) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionShowSingle(single); } -struct miqt_string QsciScintilla_TextWithLine(const QsciScintilla* self, int line) { - QString _ret = self->text(static_cast(line)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_SetAutoCompletionSource(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionSource = slot; } -struct miqt_string QsciScintilla_Text2(const QsciScintilla* self, int start, int end) { - QString _ret = self->text(static_cast(start), static_cast(end)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_virtualbase_SetAutoCompletionSource(void* self, int source) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionSource(source); } -int QsciScintilla_TextHeight(const QsciScintilla* self, int linenr) { - return self->textHeight(static_cast(linenr)); +void QsciScintilla_override_virtual_SetAutoCompletionThreshold(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionThreshold = slot; } -int QsciScintilla_WhitespaceSize(const QsciScintilla* self) { - return self->whitespaceSize(); +void QsciScintilla_virtualbase_SetAutoCompletionThreshold(void* self, int thresh) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionThreshold(thresh); } -int QsciScintilla_WhitespaceVisibility(const QsciScintilla* self) { - QsciScintilla::WhitespaceVisibility _ret = self->whitespaceVisibility(); - return static_cast(_ret); +void QsciScintilla_override_virtual_SetAutoCompletionUseSingle(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoCompletionUseSingle = slot; } -struct miqt_string QsciScintilla_WordAtLineIndex(const QsciScintilla* self, int line, int index) { - QString _ret = self->wordAtLineIndex(static_cast(line), static_cast(index)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_virtualbase_SetAutoCompletionUseSingle(void* self, int single) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoCompletionUseSingle(single); } -struct miqt_string QsciScintilla_WordAtPoint(const QsciScintilla* self, QPoint* point) { - QString _ret = self->wordAtPoint(*point); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_SetAutoIndent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetAutoIndent = slot; } -const char* QsciScintilla_WordCharacters(const QsciScintilla* self) { - return (const char*) self->wordCharacters(); +void QsciScintilla_virtualbase_SetAutoIndent(void* self, bool autoindent) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetAutoIndent(autoindent); } -int QsciScintilla_WrapMode(const QsciScintilla* self) { - QsciScintilla::WrapMode _ret = self->wrapMode(); - return static_cast(_ret); +void QsciScintilla_override_virtual_SetBraceMatching(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetBraceMatching = slot; } -int QsciScintilla_WrapIndentMode(const QsciScintilla* self) { - QsciScintilla::WrapIndentMode _ret = self->wrapIndentMode(); - return static_cast(_ret); +void QsciScintilla_virtualbase_SetBraceMatching(void* self, int bm) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetBraceMatching(bm); } -bool QsciScintilla_Write(const QsciScintilla* self, QIODevice* io) { - return self->write(io); +void QsciScintilla_override_virtual_SetBackspaceUnindents(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetBackspaceUnindents = slot; } -void QsciScintilla_Append(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->append(text_QString); +void QsciScintilla_virtualbase_SetBackspaceUnindents(void* self, bool unindent) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetBackspaceUnindents(unindent); } -void QsciScintilla_AutoCompleteFromAll(QsciScintilla* self) { - self->autoCompleteFromAll(); +void QsciScintilla_override_virtual_SetCaretForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretForegroundColor = slot; } -void QsciScintilla_AutoCompleteFromAPIs(QsciScintilla* self) { - self->autoCompleteFromAPIs(); +void QsciScintilla_virtualbase_SetCaretForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretForegroundColor(col); } -void QsciScintilla_AutoCompleteFromDocument(QsciScintilla* self) { - self->autoCompleteFromDocument(); +void QsciScintilla_override_virtual_SetCaretLineBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretLineBackgroundColor = slot; } -void QsciScintilla_CallTip(QsciScintilla* self) { - self->callTip(); +void QsciScintilla_virtualbase_SetCaretLineBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretLineBackgroundColor(col); } -void QsciScintilla_Clear(QsciScintilla* self) { - self->clear(); +void QsciScintilla_override_virtual_SetCaretLineFrameWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretLineFrameWidth = slot; } -void QsciScintilla_Copy(QsciScintilla* self) { - self->copy(); +void QsciScintilla_virtualbase_SetCaretLineFrameWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretLineFrameWidth(width); } -void QsciScintilla_Cut(QsciScintilla* self) { - self->cut(); +void QsciScintilla_override_virtual_SetCaretLineVisible(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretLineVisible = slot; } -void QsciScintilla_EnsureCursorVisible(QsciScintilla* self) { - self->ensureCursorVisible(); +void QsciScintilla_virtualbase_SetCaretLineVisible(void* self, bool enable) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretLineVisible(enable); } -void QsciScintilla_EnsureLineVisible(QsciScintilla* self, int line) { - self->ensureLineVisible(static_cast(line)); +void QsciScintilla_override_virtual_SetCaretWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCaretWidth = slot; } -void QsciScintilla_FoldAll(QsciScintilla* self) { - self->foldAll(); +void QsciScintilla_virtualbase_SetCaretWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCaretWidth(width); } -void QsciScintilla_FoldLine(QsciScintilla* self, int line) { - self->foldLine(static_cast(line)); +void QsciScintilla_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetColor = slot; } -void QsciScintilla_Indent(QsciScintilla* self, int line) { - self->indent(static_cast(line)); +void QsciScintilla_virtualbase_SetColor(void* self, QColor* c) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetColor(c); } -void QsciScintilla_Insert(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->insert(text_QString); +void QsciScintilla_override_virtual_SetCursorPosition(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetCursorPosition = slot; } -void QsciScintilla_InsertAt(QsciScintilla* self, struct miqt_string text, int line, int index) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->insertAt(text_QString, static_cast(line), static_cast(index)); +void QsciScintilla_virtualbase_SetCursorPosition(void* self, int line, int index) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetCursorPosition(line, index); } -void QsciScintilla_MoveToMatchingBrace(QsciScintilla* self) { - self->moveToMatchingBrace(); +void QsciScintilla_override_virtual_SetEolMode(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetEolMode = slot; } -void QsciScintilla_Paste(QsciScintilla* self) { - self->paste(); +void QsciScintilla_virtualbase_SetEolMode(void* self, int mode) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetEolMode(mode); } -void QsciScintilla_Redo(QsciScintilla* self) { - self->redo(); +void QsciScintilla_override_virtual_SetEolVisibility(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetEolVisibility = slot; } -void QsciScintilla_RemoveSelectedText(QsciScintilla* self) { - self->removeSelectedText(); +void QsciScintilla_virtualbase_SetEolVisibility(void* self, bool visible) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetEolVisibility(visible); } -void QsciScintilla_ReplaceSelectedText(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->replaceSelectedText(text_QString); +void QsciScintilla_override_virtual_SetFolding(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetFolding = slot; } -void QsciScintilla_ResetSelectionBackgroundColor(QsciScintilla* self) { - self->resetSelectionBackgroundColor(); +void QsciScintilla_virtualbase_SetFolding(void* self, int fold, int margin) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetFolding(fold, margin); } -void QsciScintilla_ResetSelectionForegroundColor(QsciScintilla* self) { - self->resetSelectionForegroundColor(); +void QsciScintilla_override_virtual_SetIndentation(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentation = slot; } -void QsciScintilla_SelectAll(QsciScintilla* self) { - self->selectAll(); +void QsciScintilla_virtualbase_SetIndentation(void* self, int line, int indentation) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentation(line, indentation); } -void QsciScintilla_SelectToMatchingBrace(QsciScintilla* self) { - self->selectToMatchingBrace(); +void QsciScintilla_override_virtual_SetIndentationGuides(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationGuides = slot; } -void QsciScintilla_SetAutoCompletionCaseSensitivity(QsciScintilla* self, bool cs) { - self->setAutoCompletionCaseSensitivity(cs); +void QsciScintilla_virtualbase_SetIndentationGuides(void* self, bool enable) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationGuides(enable); } -void QsciScintilla_SetAutoCompletionReplaceWord(QsciScintilla* self, bool replace) { - self->setAutoCompletionReplaceWord(replace); +void QsciScintilla_override_virtual_SetIndentationGuidesBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationGuidesBackgroundColor = slot; } -void QsciScintilla_SetAutoCompletionShowSingle(QsciScintilla* self, bool single) { - self->setAutoCompletionShowSingle(single); +void QsciScintilla_virtualbase_SetIndentationGuidesBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationGuidesBackgroundColor(col); } -void QsciScintilla_SetAutoCompletionSource(QsciScintilla* self, int source) { - self->setAutoCompletionSource(static_cast(source)); +void QsciScintilla_override_virtual_SetIndentationGuidesForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationGuidesForegroundColor = slot; } -void QsciScintilla_SetAutoCompletionThreshold(QsciScintilla* self, int thresh) { - self->setAutoCompletionThreshold(static_cast(thresh)); +void QsciScintilla_virtualbase_SetIndentationGuidesForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationGuidesForegroundColor(col); } -void QsciScintilla_SetAutoCompletionUseSingle(QsciScintilla* self, int single) { - self->setAutoCompletionUseSingle(static_cast(single)); +void QsciScintilla_override_virtual_SetIndentationsUseTabs(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationsUseTabs = slot; } -void QsciScintilla_SetAutoIndent(QsciScintilla* self, bool autoindent) { - self->setAutoIndent(autoindent); +void QsciScintilla_virtualbase_SetIndentationsUseTabs(void* self, bool tabs) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationsUseTabs(tabs); } -void QsciScintilla_SetBraceMatching(QsciScintilla* self, int bm) { - self->setBraceMatching(static_cast(bm)); +void QsciScintilla_override_virtual_SetIndentationWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetIndentationWidth = slot; } -void QsciScintilla_SetBackspaceUnindents(QsciScintilla* self, bool unindent) { - self->setBackspaceUnindents(unindent); +void QsciScintilla_virtualbase_SetIndentationWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetIndentationWidth(width); } -void QsciScintilla_SetCaretForegroundColor(QsciScintilla* self, QColor* col) { - self->setCaretForegroundColor(*col); +void QsciScintilla_override_virtual_SetLexer(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetLexer = slot; } -void QsciScintilla_SetCaretLineBackgroundColor(QsciScintilla* self, QColor* col) { - self->setCaretLineBackgroundColor(*col); +void QsciScintilla_virtualbase_SetLexer(void* self, QsciLexer* lexer) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetLexer(lexer); } -void QsciScintilla_SetCaretLineFrameWidth(QsciScintilla* self, int width) { - self->setCaretLineFrameWidth(static_cast(width)); +void QsciScintilla_override_virtual_SetMarginsBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginsBackgroundColor = slot; } -void QsciScintilla_SetCaretLineVisible(QsciScintilla* self, bool enable) { - self->setCaretLineVisible(enable); +void QsciScintilla_virtualbase_SetMarginsBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginsBackgroundColor(col); } -void QsciScintilla_SetCaretWidth(QsciScintilla* self, int width) { - self->setCaretWidth(static_cast(width)); +void QsciScintilla_override_virtual_SetMarginsFont(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginsFont = slot; } -void QsciScintilla_SetColor(QsciScintilla* self, QColor* c) { - self->setColor(*c); +void QsciScintilla_virtualbase_SetMarginsFont(void* self, QFont* f) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginsFont(f); } -void QsciScintilla_SetCursorPosition(QsciScintilla* self, int line, int index) { - self->setCursorPosition(static_cast(line), static_cast(index)); +void QsciScintilla_override_virtual_SetMarginsForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginsForegroundColor = slot; } -void QsciScintilla_SetEolMode(QsciScintilla* self, int mode) { - self->setEolMode(static_cast(mode)); +void QsciScintilla_virtualbase_SetMarginsForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginsForegroundColor(col); } -void QsciScintilla_SetEolVisibility(QsciScintilla* self, bool visible) { - self->setEolVisibility(visible); +void QsciScintilla_override_virtual_SetMarginLineNumbers(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginLineNumbers = slot; } -void QsciScintilla_SetFolding(QsciScintilla* self, int fold) { - self->setFolding(static_cast(fold)); +void QsciScintilla_virtualbase_SetMarginLineNumbers(void* self, int margin, bool lnrs) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginLineNumbers(margin, lnrs); } -void QsciScintilla_SetIndentation(QsciScintilla* self, int line, int indentation) { - self->setIndentation(static_cast(line), static_cast(indentation)); +void QsciScintilla_override_virtual_SetMarginMarkerMask(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginMarkerMask = slot; } -void QsciScintilla_SetIndentationGuides(QsciScintilla* self, bool enable) { - self->setIndentationGuides(enable); +void QsciScintilla_virtualbase_SetMarginMarkerMask(void* self, int margin, int mask) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginMarkerMask(margin, mask); } -void QsciScintilla_SetIndentationGuidesBackgroundColor(QsciScintilla* self, QColor* col) { - self->setIndentationGuidesBackgroundColor(*col); +void QsciScintilla_override_virtual_SetMarginSensitivity(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginSensitivity = slot; } -void QsciScintilla_SetIndentationGuidesForegroundColor(QsciScintilla* self, QColor* col) { - self->setIndentationGuidesForegroundColor(*col); +void QsciScintilla_virtualbase_SetMarginSensitivity(void* self, int margin, bool sens) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginSensitivity(margin, sens); } -void QsciScintilla_SetIndentationsUseTabs(QsciScintilla* self, bool tabs) { - self->setIndentationsUseTabs(tabs); +void QsciScintilla_override_virtual_SetMarginWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginWidth = slot; } -void QsciScintilla_SetIndentationWidth(QsciScintilla* self, int width) { - self->setIndentationWidth(static_cast(width)); +void QsciScintilla_virtualbase_SetMarginWidth(void* self, int margin, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginWidth(margin, width); } -void QsciScintilla_SetLexer(QsciScintilla* self) { - self->setLexer(); +void QsciScintilla_override_virtual_SetMarginWidth2(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetMarginWidth2 = slot; } -void QsciScintilla_SetMarginsBackgroundColor(QsciScintilla* self, QColor* col) { - self->setMarginsBackgroundColor(*col); +void QsciScintilla_virtualbase_SetMarginWidth2(void* self, int margin, struct miqt_string s) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetMarginWidth2(margin, s); } -void QsciScintilla_SetMarginsFont(QsciScintilla* self, QFont* f) { - self->setMarginsFont(*f); +void QsciScintilla_override_virtual_SetModified(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetModified = slot; } -void QsciScintilla_SetMarginsForegroundColor(QsciScintilla* self, QColor* col) { - self->setMarginsForegroundColor(*col); +void QsciScintilla_virtualbase_SetModified(void* self, bool m) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetModified(m); } -void QsciScintilla_SetMarginLineNumbers(QsciScintilla* self, int margin, bool lnrs) { - self->setMarginLineNumbers(static_cast(margin), lnrs); +void QsciScintilla_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetPaper = slot; } -void QsciScintilla_SetMarginMarkerMask(QsciScintilla* self, int margin, int mask) { - self->setMarginMarkerMask(static_cast(margin), static_cast(mask)); +void QsciScintilla_virtualbase_SetPaper(void* self, QColor* c) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetPaper(c); } -void QsciScintilla_SetMarginSensitivity(QsciScintilla* self, int margin, bool sens) { - self->setMarginSensitivity(static_cast(margin), sens); +void QsciScintilla_override_virtual_SetReadOnly(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetReadOnly = slot; } -void QsciScintilla_SetMarginWidth(QsciScintilla* self, int margin, int width) { - self->setMarginWidth(static_cast(margin), static_cast(width)); +void QsciScintilla_virtualbase_SetReadOnly(void* self, bool ro) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetReadOnly(ro); } -void QsciScintilla_SetMarginWidth2(QsciScintilla* self, int margin, struct miqt_string s) { - QString s_QString = QString::fromUtf8(s.data, s.len); - self->setMarginWidth(static_cast(margin), s_QString); +void QsciScintilla_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetSelection = slot; } -void QsciScintilla_SetModified(QsciScintilla* self, bool m) { - self->setModified(m); +void QsciScintilla_virtualbase_SetSelection(void* self, int lineFrom, int indexFrom, int lineTo, int indexTo) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetSelection(lineFrom, indexFrom, lineTo, indexTo); } -void QsciScintilla_SetPaper(QsciScintilla* self, QColor* c) { - self->setPaper(*c); +void QsciScintilla_override_virtual_SetSelectionBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetSelectionBackgroundColor = slot; } -void QsciScintilla_SetReadOnly(QsciScintilla* self, bool ro) { - self->setReadOnly(ro); +void QsciScintilla_virtualbase_SetSelectionBackgroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetSelectionBackgroundColor(col); } -void QsciScintilla_SetSelection(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo) { - self->setSelection(static_cast(lineFrom), static_cast(indexFrom), static_cast(lineTo), static_cast(indexTo)); +void QsciScintilla_override_virtual_SetSelectionForegroundColor(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetSelectionForegroundColor = slot; } -void QsciScintilla_SetSelectionBackgroundColor(QsciScintilla* self, QColor* col) { - self->setSelectionBackgroundColor(*col); +void QsciScintilla_virtualbase_SetSelectionForegroundColor(void* self, QColor* col) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetSelectionForegroundColor(col); } -void QsciScintilla_SetSelectionForegroundColor(QsciScintilla* self, QColor* col) { - self->setSelectionForegroundColor(*col); +void QsciScintilla_override_virtual_SetTabIndents(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetTabIndents = slot; } -void QsciScintilla_SetTabIndents(QsciScintilla* self, bool indent) { - self->setTabIndents(indent); +void QsciScintilla_virtualbase_SetTabIndents(void* self, bool indent) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetTabIndents(indent); } -void QsciScintilla_SetTabWidth(QsciScintilla* self, int width) { - self->setTabWidth(static_cast(width)); +void QsciScintilla_override_virtual_SetTabWidth(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetTabWidth = slot; } -void QsciScintilla_SetText(QsciScintilla* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setText(text_QString); +void QsciScintilla_virtualbase_SetTabWidth(void* self, int width) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetTabWidth(width); } -void QsciScintilla_SetUtf8(QsciScintilla* self, bool cp) { - self->setUtf8(cp); +void QsciScintilla_override_virtual_SetText(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetText = slot; } -void QsciScintilla_SetWhitespaceVisibility(QsciScintilla* self, int mode) { - self->setWhitespaceVisibility(static_cast(mode)); +void QsciScintilla_virtualbase_SetText(void* self, struct miqt_string text) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetText(text); } -void QsciScintilla_SetWrapMode(QsciScintilla* self, int mode) { - self->setWrapMode(static_cast(mode)); +void QsciScintilla_override_virtual_SetUtf8(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetUtf8 = slot; } -void QsciScintilla_Undo(QsciScintilla* self) { - self->undo(); +void QsciScintilla_virtualbase_SetUtf8(void* self, bool cp) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetUtf8(cp); } -void QsciScintilla_Unindent(QsciScintilla* self, int line) { - self->unindent(static_cast(line)); +void QsciScintilla_override_virtual_SetWhitespaceVisibility(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetWhitespaceVisibility = slot; } -void QsciScintilla_ZoomIn(QsciScintilla* self, int rangeVal) { - self->zoomIn(static_cast(rangeVal)); +void QsciScintilla_virtualbase_SetWhitespaceVisibility(void* self, int mode) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetWhitespaceVisibility(mode); } -void QsciScintilla_ZoomIn2(QsciScintilla* self) { - self->zoomIn(); +void QsciScintilla_override_virtual_SetWrapMode(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__SetWrapMode = slot; } -void QsciScintilla_ZoomOut(QsciScintilla* self, int rangeVal) { - self->zoomOut(static_cast(rangeVal)); +void QsciScintilla_virtualbase_SetWrapMode(void* self, int mode) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_SetWrapMode(mode); } -void QsciScintilla_ZoomOut2(QsciScintilla* self) { - self->zoomOut(); +void QsciScintilla_override_virtual_Undo(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Undo = slot; } -void QsciScintilla_ZoomTo(QsciScintilla* self, int size) { - self->zoomTo(static_cast(size)); +void QsciScintilla_virtualbase_Undo(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Undo(); } -void QsciScintilla_CursorPositionChanged(QsciScintilla* self, int line, int index) { - self->cursorPositionChanged(static_cast(line), static_cast(index)); +void QsciScintilla_override_virtual_Unindent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Unindent = slot; } -void QsciScintilla_connect_CursorPositionChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::cursorPositionChanged), self, [=](int line, int index) { - int sigval1 = line; - int sigval2 = index; - miqt_exec_callback_QsciScintilla_CursorPositionChanged(slot, sigval1, sigval2); - }); +void QsciScintilla_virtualbase_Unindent(void* self, int line) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Unindent(line); } -void QsciScintilla_CopyAvailable(QsciScintilla* self, bool yes) { - self->copyAvailable(yes); +void QsciScintilla_override_virtual_ZoomIn(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomIn = slot; } -void QsciScintilla_connect_CopyAvailable(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::copyAvailable), self, [=](bool yes) { - bool sigval1 = yes; - miqt_exec_callback_QsciScintilla_CopyAvailable(slot, sigval1); - }); +void QsciScintilla_virtualbase_ZoomIn(void* self, int rangeVal) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomIn(rangeVal); } -void QsciScintilla_IndicatorClicked(QsciScintilla* self, int line, int index, int state) { - self->indicatorClicked(static_cast(line), static_cast(index), static_cast(state)); +void QsciScintilla_override_virtual_ZoomIn2(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomIn2 = slot; } -void QsciScintilla_connect_IndicatorClicked(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorClicked), self, [=](int line, int index, Qt::KeyboardModifiers state) { - int sigval1 = line; - int sigval2 = index; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_IndicatorClicked(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomIn2(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomIn2(); } -void QsciScintilla_IndicatorReleased(QsciScintilla* self, int line, int index, int state) { - self->indicatorReleased(static_cast(line), static_cast(index), static_cast(state)); +void QsciScintilla_override_virtual_ZoomOut(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomOut = slot; } -void QsciScintilla_connect_IndicatorReleased(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::indicatorReleased), self, [=](int line, int index, Qt::KeyboardModifiers state) { - int sigval1 = line; - int sigval2 = index; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_IndicatorReleased(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomOut(void* self, int rangeVal) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomOut(rangeVal); } -void QsciScintilla_LinesChanged(QsciScintilla* self) { - self->linesChanged(); +void QsciScintilla_override_virtual_ZoomOut2(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomOut2 = slot; } -void QsciScintilla_connect_LinesChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::linesChanged), self, [=]() { - miqt_exec_callback_QsciScintilla_LinesChanged(slot); - }); +void QsciScintilla_virtualbase_ZoomOut2(void* self) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomOut2(); } -void QsciScintilla_MarginClicked(QsciScintilla* self, int margin, int line, int state) { - self->marginClicked(static_cast(margin), static_cast(line), static_cast(state)); +void QsciScintilla_override_virtual_ZoomTo(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ZoomTo = slot; } -void QsciScintilla_connect_MarginClicked(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::marginClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { - int sigval1 = margin; - int sigval2 = line; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_MarginClicked(slot, sigval1, sigval2, sigval3); - }); +void QsciScintilla_virtualbase_ZoomTo(void* self, int size) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ZoomTo(size); } -void QsciScintilla_MarginRightClicked(QsciScintilla* self, int margin, int line, int state) { - self->marginRightClicked(static_cast(margin), static_cast(line), static_cast(state)); +void QsciScintilla_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__Event = slot; } -void QsciScintilla_connect_MarginRightClicked(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::marginRightClicked), self, [=](int margin, int line, Qt::KeyboardModifiers state) { - int sigval1 = margin; - int sigval2 = line; - Qt::KeyboardModifiers state_ret = state; - int sigval3 = static_cast(state_ret); - miqt_exec_callback_QsciScintilla_MarginRightClicked(slot, sigval1, sigval2, sigval3); - }); +bool QsciScintilla_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_Event(e); } -void QsciScintilla_ModificationAttempted(QsciScintilla* self) { - self->modificationAttempted(); +void QsciScintilla_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ChangeEvent = slot; } -void QsciScintilla_connect_ModificationAttempted(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::modificationAttempted), self, [=]() { - miqt_exec_callback_QsciScintilla_ModificationAttempted(slot); - }); +void QsciScintilla_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ChangeEvent(e); } -void QsciScintilla_ModificationChanged(QsciScintilla* self, bool m) { - self->modificationChanged(m); +void QsciScintilla_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ContextMenuEvent = slot; } -void QsciScintilla_connect_ModificationChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::modificationChanged), self, [=](bool m) { - bool sigval1 = m; - miqt_exec_callback_QsciScintilla_ModificationChanged(slot, sigval1); - }); +void QsciScintilla_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ContextMenuEvent(e); } -void QsciScintilla_SelectionChanged(QsciScintilla* self) { - self->selectionChanged(); +void QsciScintilla_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__WheelEvent = slot; } -void QsciScintilla_connect_SelectionChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::selectionChanged), self, [=]() { - miqt_exec_callback_QsciScintilla_SelectionChanged(slot); - }); +void QsciScintilla_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_WheelEvent(e); } -void QsciScintilla_TextChanged(QsciScintilla* self) { - self->textChanged(); +void QsciScintilla_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__CanInsertFromMimeData = slot; } -void QsciScintilla_connect_TextChanged(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::textChanged), self, [=]() { - miqt_exec_callback_QsciScintilla_TextChanged(slot); - }); +bool QsciScintilla_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_CanInsertFromMimeData(source); } -void QsciScintilla_UserListActivated(QsciScintilla* self, int id, struct miqt_string stringVal) { - QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - self->userListActivated(static_cast(id), stringVal_QString); +void QsciScintilla_override_virtual_FromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FromMimeData = slot; } -void QsciScintilla_connect_UserListActivated(QsciScintilla* self, intptr_t slot) { - QsciScintilla::connect(self, static_cast(&QsciScintilla::userListActivated), self, [=](int id, const QString& stringVal) { - int sigval1 = id; - const QString stringVal_ret = stringVal; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray stringVal_b = stringVal_ret.toUtf8(); - struct miqt_string stringVal_ms; - stringVal_ms.len = stringVal_b.length(); - stringVal_ms.data = static_cast(malloc(stringVal_ms.len)); - memcpy(stringVal_ms.data, stringVal_b.data(), stringVal_ms.len); - struct miqt_string sigval2 = stringVal_ms; - miqt_exec_callback_QsciScintilla_UserListActivated(slot, sigval1, sigval2); - }); +struct miqt_string QsciScintilla_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_FromMimeData(source, rectangular); } -struct miqt_string QsciScintilla_Tr2(const char* s, const char* c) { - QString _ret = QsciScintilla::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QsciScintilla_override_virtual_ToMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ToMimeData = slot; } -struct miqt_string QsciScintilla_Tr3(const char* s, const char* c, int n) { - QString _ret = QsciScintilla::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QMimeData* QsciScintilla_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_ToMimeData(text, rectangular); } -void QsciScintilla_ClearAnnotations1(QsciScintilla* self, int line) { - self->clearAnnotations(static_cast(line)); +void QsciScintilla_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DragEnterEvent = slot; } -bool QsciScintilla_FindFirst6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward); +void QsciScintilla_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DragEnterEvent(e); } -bool QsciScintilla_FindFirst7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line)); +void QsciScintilla_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DragLeaveEvent = slot; } -bool QsciScintilla_FindFirst8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index)); +void QsciScintilla_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DragLeaveEvent(e); } -bool QsciScintilla_FindFirst9(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show); +void QsciScintilla_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DragMoveEvent = slot; } -bool QsciScintilla_FindFirst10(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix); +void QsciScintilla_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DragMoveEvent(e); } -bool QsciScintilla_FindFirst11(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirst(expr_QString, re, cs, wo, wrap, forward, static_cast(line), static_cast(index), show, posix, cxx11); +void QsciScintilla_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__DropEvent = slot; } -bool QsciScintilla_FindFirstInSelection5(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward); +void QsciScintilla_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_DropEvent(e); } -bool QsciScintilla_FindFirstInSelection6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show); +void QsciScintilla_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FocusInEvent = slot; } -bool QsciScintilla_FindFirstInSelection7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix); +void QsciScintilla_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FocusInEvent(e); } -bool QsciScintilla_FindFirstInSelection8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11) { - QString expr_QString = QString::fromUtf8(expr.data, expr.len); - return self->findFirstInSelection(expr_QString, re, cs, wo, forward, show, posix, cxx11); +void QsciScintilla_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FocusOutEvent = slot; } -int QsciScintilla_IndicatorDefine2(QsciScintilla* self, int style, int indicatorNumber) { - return self->indicatorDefine(static_cast(style), static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FocusOutEvent(e); } -int QsciScintilla_MarkerDefine2(QsciScintilla* self, int sym, int markerNumber) { - return self->markerDefine(static_cast(sym), static_cast(markerNumber)); +void QsciScintilla_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__FocusNextPrevChild = slot; } -int QsciScintilla_MarkerDefine22(QsciScintilla* self, char ch, int markerNumber) { - return self->markerDefine(static_cast(ch), static_cast(markerNumber)); +bool QsciScintilla_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_FocusNextPrevChild(next); } -int QsciScintilla_MarkerDefine23(QsciScintilla* self, QPixmap* pm, int markerNumber) { - return self->markerDefine(*pm, static_cast(markerNumber)); +void QsciScintilla_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__KeyPressEvent = slot; } -int QsciScintilla_MarkerDefine24(QsciScintilla* self, QImage* im, int markerNumber) { - return self->markerDefine(*im, static_cast(markerNumber)); +void QsciScintilla_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_KeyPressEvent(e); } -void QsciScintilla_MarkerDelete2(QsciScintilla* self, int linenr, int markerNumber) { - self->markerDelete(static_cast(linenr), static_cast(markerNumber)); +void QsciScintilla_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__InputMethodEvent = slot; } -void QsciScintilla_MarkerDeleteAll1(QsciScintilla* self, int markerNumber) { - self->markerDeleteAll(static_cast(markerNumber)); +void QsciScintilla_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_InputMethodEvent(event); } -void QsciScintilla_Recolor1(QsciScintilla* self, int start) { - self->recolor(static_cast(start)); +void QsciScintilla_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__InputMethodQuery = slot; } -void QsciScintilla_Recolor2(QsciScintilla* self, int start, int end) { - self->recolor(static_cast(start), static_cast(end)); +QVariant* QsciScintilla_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQsciScintilla*)(self) )->virtualbase_InputMethodQuery(query); } -void QsciScintilla_SetIndicatorDrawUnder2(QsciScintilla* self, bool under, int indicatorNumber) { - self->setIndicatorDrawUnder(under, static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MouseDoubleClickEvent = slot; } -void QsciScintilla_SetIndicatorForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { - self->setIndicatorForegroundColor(*col, static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MouseDoubleClickEvent(e); } -void QsciScintilla_SetIndicatorHoverForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { - self->setIndicatorHoverForegroundColor(*col, static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MouseMoveEvent = slot; } -void QsciScintilla_SetIndicatorHoverStyle2(QsciScintilla* self, int style, int indicatorNumber) { - self->setIndicatorHoverStyle(static_cast(style), static_cast(indicatorNumber)); +void QsciScintilla_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MouseMoveEvent(e); } -void QsciScintilla_SetIndicatorOutlineColor2(QsciScintilla* self, QColor* col, int indicatorNumber) { - self->setIndicatorOutlineColor(*col, static_cast(indicatorNumber)); +void QsciScintilla_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MousePressEvent = slot; } -void QsciScintilla_ClearMarginText1(QsciScintilla* self, int line) { - self->clearMarginText(static_cast(line)); +void QsciScintilla_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MousePressEvent(e); } -void QsciScintilla_SetMarkerBackgroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { - self->setMarkerBackgroundColor(*col, static_cast(markerNumber)); +void QsciScintilla_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__MouseReleaseEvent = slot; } -void QsciScintilla_SetMarkerForegroundColor2(QsciScintilla* self, QColor* col, int markerNumber) { - self->setMarkerForegroundColor(*col, static_cast(markerNumber)); +void QsciScintilla_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_MouseReleaseEvent(e); } -void QsciScintilla_SetWrapVisualFlags2(QsciScintilla* self, int endFlag, int startFlag) { - self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag)); +void QsciScintilla_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__PaintEvent = slot; } -void QsciScintilla_SetWrapVisualFlags3(QsciScintilla* self, int endFlag, int startFlag, int indent) { - self->setWrapVisualFlags(static_cast(endFlag), static_cast(startFlag), static_cast(indent)); +void QsciScintilla_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_PaintEvent(e); } -void QsciScintilla_FoldAll1(QsciScintilla* self, bool children) { - self->foldAll(children); +void QsciScintilla_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ResizeEvent = slot; } -void QsciScintilla_SelectAll1(QsciScintilla* self, bool selectVal) { - self->selectAll(selectVal); +void QsciScintilla_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ResizeEvent(e); } -void QsciScintilla_SetFolding2(QsciScintilla* self, int fold, int margin) { - self->setFolding(static_cast(fold), static_cast(margin)); +void QsciScintilla_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QsciScintilla*)(self) )->handle__ScrollContentsBy = slot; } -void QsciScintilla_SetLexer1(QsciScintilla* self, QsciLexer* lexer) { - self->setLexer(lexer); +void QsciScintilla_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQsciScintilla*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -void QsciScintilla_Delete(QsciScintilla* self) { - delete self; +void QsciScintilla_Delete(QsciScintilla* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go index 09b2406e..d597602d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go @@ -220,7 +220,8 @@ const ( ) type QsciScintilla struct { - h *C.QsciScintilla + h *C.QsciScintilla + isSubclass bool *QsciScintillaBase } @@ -238,27 +239,55 @@ func (this *QsciScintilla) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciScintilla(h *C.QsciScintilla) *QsciScintilla { +// newQsciScintilla constructs the type using only CGO pointers. +func newQsciScintilla(h *C.QsciScintilla, h_QsciScintillaBase *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintilla { if h == nil { return nil } - return &QsciScintilla{h: h, QsciScintillaBase: UnsafeNewQsciScintillaBase(unsafe.Pointer(h))} + return &QsciScintilla{h: h, + QsciScintillaBase: newQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQsciScintilla(h unsafe.Pointer) *QsciScintilla { - return newQsciScintilla((*C.QsciScintilla)(h)) +// UnsafeNewQsciScintilla constructs the type using only unsafe pointers. +func UnsafeNewQsciScintilla(h unsafe.Pointer, h_QsciScintillaBase unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintilla { + if h == nil { + return nil + } + + return &QsciScintilla{h: (*C.QsciScintilla)(h), + QsciScintillaBase: UnsafeNewQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQsciScintilla constructs a new QsciScintilla object. func NewQsciScintilla(parent *qt6.QWidget) *QsciScintilla { - ret := C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer())) - return newQsciScintilla(ret) + var outptr_QsciScintilla *C.QsciScintilla = nil + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQsciScintilla2 constructs a new QsciScintilla object. func NewQsciScintilla2() *QsciScintilla { - ret := C.QsciScintilla_new2() - return newQsciScintilla(ret) + var outptr_QsciScintilla *C.QsciScintilla = nil + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintilla_new2(&outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QsciScintilla) MetaObject() *qt6.QMetaObject { @@ -437,7 +466,7 @@ func (this *QsciScintilla) ConvertEols(mode QsciScintilla__EolMode) { } func (this *QsciScintilla) CreateStandardContextMenu() *qt6.QMenu { - return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h))) + return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QsciScintilla) Document() *QsciDocument { @@ -490,20 +519,20 @@ func (this *QsciScintilla) FillIndicatorRange(lineFrom int, indexFrom int, lineT C.QsciScintilla_FillIndicatorRange(this.h, (C.int)(lineFrom), (C.int)(indexFrom), (C.int)(lineTo), (C.int)(indexTo), (C.int)(indicatorNumber)) } -func (this *QsciScintilla) FindFirst(expr string, re bool, cs bool, wo bool, wrap bool) bool { +func (this *QsciScintilla) FindFirst(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool { expr_ms := C.struct_miqt_string{} expr_ms.data = C.CString(expr) expr_ms.len = C.size_t(len(expr)) defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap))) + return (bool)(C.QsciScintilla_FindFirst(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) } -func (this *QsciScintilla) FindFirstInSelection(expr string, re bool, cs bool, wo bool) bool { +func (this *QsciScintilla) FindFirstInSelection(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool { expr_ms := C.struct_miqt_string{} expr_ms.data = C.CString(expr) expr_ms.len = C.size_t(len(expr)) defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo))) + return (bool)(C.QsciScintilla_FindFirstInSelection(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) } func (this *QsciScintilla) FindNext() bool { @@ -611,7 +640,7 @@ func (this *QsciScintilla) Length() int { } func (this *QsciScintilla) Lexer() *QsciLexer { - return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciScintilla_Lexer(this.h))) + return UnsafeNewQsciLexer(unsafe.Pointer(C.QsciScintilla_Lexer(this.h)), nil) } func (this *QsciScintilla) MarginBackgroundColor(margin int) *qt6.QColor { @@ -716,8 +745,8 @@ func (this *QsciScintilla) Read(io *qt6.QIODevice) bool { return (bool)(C.QsciScintilla_Read(this.h, (*C.QIODevice)(io.UnsafePointer()))) } -func (this *QsciScintilla) Recolor() { - C.QsciScintilla_Recolor(this.h) +func (this *QsciScintilla) Recolor(start int, end int) { + C.QsciScintilla_Recolor(this.h, (C.int)(start), (C.int)(end)) } func (this *QsciScintilla) RegisterImage(id int, pm *qt6.QPixmap) { @@ -1163,8 +1192,8 @@ func (this *QsciScintilla) EnsureLineVisible(line int) { C.QsciScintilla_EnsureLineVisible(this.h, (C.int)(line)) } -func (this *QsciScintilla) FoldAll() { - C.QsciScintilla_FoldAll(this.h) +func (this *QsciScintilla) FoldAll(children bool) { + C.QsciScintilla_FoldAll(this.h, (C.bool)(children)) } func (this *QsciScintilla) FoldLine(line int) { @@ -1223,8 +1252,8 @@ func (this *QsciScintilla) ResetSelectionForegroundColor() { C.QsciScintilla_ResetSelectionForegroundColor(this.h) } -func (this *QsciScintilla) SelectAll() { - C.QsciScintilla_SelectAll(this.h) +func (this *QsciScintilla) SelectAll(selectVal bool) { + C.QsciScintilla_SelectAll(this.h, (C.bool)(selectVal)) } func (this *QsciScintilla) SelectToMatchingBrace() { @@ -1303,8 +1332,8 @@ func (this *QsciScintilla) SetEolVisibility(visible bool) { C.QsciScintilla_SetEolVisibility(this.h, (C.bool)(visible)) } -func (this *QsciScintilla) SetFolding(fold QsciScintilla__FoldStyle) { - C.QsciScintilla_SetFolding(this.h, (C.int)(fold)) +func (this *QsciScintilla) SetFolding(fold QsciScintilla__FoldStyle, margin int) { + C.QsciScintilla_SetFolding(this.h, (C.int)(fold), (C.int)(margin)) } func (this *QsciScintilla) SetIndentation(line int, indentation int) { @@ -1331,8 +1360,8 @@ func (this *QsciScintilla) SetIndentationWidth(width int) { C.QsciScintilla_SetIndentationWidth(this.h, (C.int)(width)) } -func (this *QsciScintilla) SetLexer() { - C.QsciScintilla_SetLexer(this.h) +func (this *QsciScintilla) SetLexer(lexer *QsciLexer) { + C.QsciScintilla_SetLexer(this.h, lexer.cPointer()) } func (this *QsciScintilla) SetMarginsBackgroundColor(col *qt6.QColor) { @@ -1732,86 +1761,6 @@ func (this *QsciScintilla) ClearAnnotations1(line int) { C.QsciScintilla_ClearAnnotations1(this.h, (C.int)(line)) } -func (this *QsciScintilla) FindFirst6(expr string, re bool, cs bool, wo bool, wrap bool, forward bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst6(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward))) -} - -func (this *QsciScintilla) FindFirst7(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst7(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line))) -} - -func (this *QsciScintilla) FindFirst8(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst8(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index))) -} - -func (this *QsciScintilla) FindFirst9(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst9(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show))) -} - -func (this *QsciScintilla) FindFirst10(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst10(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix))) -} - -func (this *QsciScintilla) FindFirst11(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirst11(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) -} - -func (this *QsciScintilla) FindFirstInSelection5(expr string, re bool, cs bool, wo bool, forward bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection5(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward))) -} - -func (this *QsciScintilla) FindFirstInSelection6(expr string, re bool, cs bool, wo bool, forward bool, show bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection6(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show))) -} - -func (this *QsciScintilla) FindFirstInSelection7(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection7(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix))) -} - -func (this *QsciScintilla) FindFirstInSelection8(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool { - expr_ms := C.struct_miqt_string{} - expr_ms.data = C.CString(expr) - expr_ms.len = C.size_t(len(expr)) - defer C.free(unsafe.Pointer(expr_ms.data)) - return (bool)(C.QsciScintilla_FindFirstInSelection8(this.h, expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) -} - func (this *QsciScintilla) IndicatorDefine2(style QsciScintilla__IndicatorStyle, indicatorNumber int) int { return (int)(C.QsciScintilla_IndicatorDefine2(this.h, (C.int)(style), (C.int)(indicatorNumber))) } @@ -1840,14 +1789,6 @@ func (this *QsciScintilla) MarkerDeleteAll1(markerNumber int) { C.QsciScintilla_MarkerDeleteAll1(this.h, (C.int)(markerNumber)) } -func (this *QsciScintilla) Recolor1(start int) { - C.QsciScintilla_Recolor1(this.h, (C.int)(start)) -} - -func (this *QsciScintilla) Recolor2(start int, end int) { - C.QsciScintilla_Recolor2(this.h, (C.int)(start), (C.int)(end)) -} - func (this *QsciScintilla) SetIndicatorDrawUnder2(under bool, indicatorNumber int) { C.QsciScintilla_SetIndicatorDrawUnder2(this.h, (C.bool)(under), (C.int)(indicatorNumber)) } @@ -1888,25 +1829,2595 @@ func (this *QsciScintilla) SetWrapVisualFlags3(endFlag QsciScintilla__WrapVisual C.QsciScintilla_SetWrapVisualFlags3(this.h, (C.int)(endFlag), (C.int)(startFlag), (C.int)(indent)) } -func (this *QsciScintilla) FoldAll1(children bool) { - C.QsciScintilla_FoldAll1(this.h, (C.bool)(children)) +func (this *QsciScintilla) callVirtualBase_ApiContext(pos int, context_start *int, last_word_start *int) []string { + + var _ma C.struct_miqt_array = C.QsciScintilla_virtualbase_ApiContext(unsafe.Pointer(this.h), (C.int)(pos), (*C.int)(unsafe.Pointer(context_start)), (*C.int)(unsafe.Pointer(last_word_start))) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QsciScintilla) OnApiContext(slot func(super func(pos int, context_start *int, last_word_start *int) []string, pos int, context_start *int, last_word_start *int) []string) { + C.QsciScintilla_override_virtual_ApiContext(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ApiContext +func miqt_exec_callback_QsciScintilla_ApiContext(self *C.QsciScintilla, cb C.intptr_t, pos C.int, context_start *C.int, last_word_start *C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int, context_start *int, last_word_start *int) []string, pos int, context_start *int, last_word_start *int) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pos) + + slotval2 := (*int)(unsafe.Pointer(context_start)) + + slotval3 := (*int)(unsafe.Pointer(last_word_start)) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_ApiContext, slotval1, slotval2, slotval3) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QsciScintilla) callVirtualBase_FindFirst(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool { + expr_ms := C.struct_miqt_string{} + expr_ms.data = C.CString(expr) + expr_ms.len = C.size_t(len(expr)) + defer C.free(unsafe.Pointer(expr_ms.data)) + + return (bool)(C.QsciScintilla_virtualbase_FindFirst(unsafe.Pointer(this.h), expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(wrap), (C.bool)(forward), (C.int)(line), (C.int)(index), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) + +} +func (this *QsciScintilla) OnFindFirst(slot func(super func(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool) { + C.QsciScintilla_override_virtual_FindFirst(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FindFirst +func miqt_exec_callback_QsciScintilla_FindFirst(self *C.QsciScintilla, cb C.intptr_t, expr C.struct_miqt_string, re C.bool, cs C.bool, wo C.bool, wrap C.bool, forward C.bool, line C.int, index C.int, show C.bool, posix C.bool, cxx11 C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, wrap bool, forward bool, line int, index int, show bool, posix bool, cxx11 bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var expr_ms C.struct_miqt_string = expr + expr_ret := C.GoStringN(expr_ms.data, C.int(int64(expr_ms.len))) + C.free(unsafe.Pointer(expr_ms.data)) + slotval1 := expr_ret + slotval2 := (bool)(re) + + slotval3 := (bool)(cs) + + slotval4 := (bool)(wo) + + slotval5 := (bool)(wrap) + + slotval6 := (bool)(forward) + + slotval7 := (int)(line) + + slotval8 := (int)(index) + + slotval9 := (bool)(show) + + slotval10 := (bool)(posix) + + slotval11 := (bool)(cxx11) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FindFirst, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7, slotval8, slotval9, slotval10, slotval11) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_FindFirstInSelection(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool { + expr_ms := C.struct_miqt_string{} + expr_ms.data = C.CString(expr) + expr_ms.len = C.size_t(len(expr)) + defer C.free(unsafe.Pointer(expr_ms.data)) + + return (bool)(C.QsciScintilla_virtualbase_FindFirstInSelection(unsafe.Pointer(this.h), expr_ms, (C.bool)(re), (C.bool)(cs), (C.bool)(wo), (C.bool)(forward), (C.bool)(show), (C.bool)(posix), (C.bool)(cxx11))) + +} +func (this *QsciScintilla) OnFindFirstInSelection(slot func(super func(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool) { + C.QsciScintilla_override_virtual_FindFirstInSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FindFirstInSelection +func miqt_exec_callback_QsciScintilla_FindFirstInSelection(self *C.QsciScintilla, cb C.intptr_t, expr C.struct_miqt_string, re C.bool, cs C.bool, wo C.bool, forward C.bool, show C.bool, posix C.bool, cxx11 C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool, expr string, re bool, cs bool, wo bool, forward bool, show bool, posix bool, cxx11 bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var expr_ms C.struct_miqt_string = expr + expr_ret := C.GoStringN(expr_ms.data, C.int(int64(expr_ms.len))) + C.free(unsafe.Pointer(expr_ms.data)) + slotval1 := expr_ret + slotval2 := (bool)(re) + + slotval3 := (bool)(cs) + + slotval4 := (bool)(wo) + + slotval5 := (bool)(forward) + + slotval6 := (bool)(show) + + slotval7 := (bool)(posix) + + slotval8 := (bool)(cxx11) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FindFirstInSelection, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7, slotval8) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_FindNext() bool { + + return (bool)(C.QsciScintilla_virtualbase_FindNext(unsafe.Pointer(this.h))) + +} +func (this *QsciScintilla) OnFindNext(slot func(super func() bool) bool) { + C.QsciScintilla_override_virtual_FindNext(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FindNext +func miqt_exec_callback_QsciScintilla_FindNext(self *C.QsciScintilla, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FindNext) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_Recolor(start int, end int) { + + C.QsciScintilla_virtualbase_Recolor(unsafe.Pointer(this.h), (C.int)(start), (C.int)(end)) + +} +func (this *QsciScintilla) OnRecolor(slot func(super func(start int, end int), start int, end int)) { + C.QsciScintilla_override_virtual_Recolor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Recolor +func miqt_exec_callback_QsciScintilla_Recolor(self *C.QsciScintilla, cb C.intptr_t, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start int, end int), start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(start) + + slotval2 := (int)(end) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Recolor, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_Replace(replaceStr string) { + replaceStr_ms := C.struct_miqt_string{} + replaceStr_ms.data = C.CString(replaceStr) + replaceStr_ms.len = C.size_t(len(replaceStr)) + defer C.free(unsafe.Pointer(replaceStr_ms.data)) + + C.QsciScintilla_virtualbase_Replace(unsafe.Pointer(this.h), replaceStr_ms) + +} +func (this *QsciScintilla) OnReplace(slot func(super func(replaceStr string), replaceStr string)) { + C.QsciScintilla_override_virtual_Replace(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Replace +func miqt_exec_callback_QsciScintilla_Replace(self *C.QsciScintilla, cb C.intptr_t, replaceStr C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(replaceStr string), replaceStr string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var replaceStr_ms C.struct_miqt_string = replaceStr + replaceStr_ret := C.GoStringN(replaceStr_ms.data, C.int(int64(replaceStr_ms.len))) + C.free(unsafe.Pointer(replaceStr_ms.data)) + slotval1 := replaceStr_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Replace, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Append(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_Append(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnAppend(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_Append(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Append +func miqt_exec_callback_QsciScintilla_Append(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Append, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_AutoCompleteFromAll() { + + C.QsciScintilla_virtualbase_AutoCompleteFromAll(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnAutoCompleteFromAll(slot func(super func())) { + C.QsciScintilla_override_virtual_AutoCompleteFromAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_AutoCompleteFromAll +func miqt_exec_callback_QsciScintilla_AutoCompleteFromAll(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_AutoCompleteFromAll) + +} + +func (this *QsciScintilla) callVirtualBase_AutoCompleteFromAPIs() { + + C.QsciScintilla_virtualbase_AutoCompleteFromAPIs(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnAutoCompleteFromAPIs(slot func(super func())) { + C.QsciScintilla_override_virtual_AutoCompleteFromAPIs(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_AutoCompleteFromAPIs +func miqt_exec_callback_QsciScintilla_AutoCompleteFromAPIs(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_AutoCompleteFromAPIs) + +} + +func (this *QsciScintilla) callVirtualBase_AutoCompleteFromDocument() { + + C.QsciScintilla_virtualbase_AutoCompleteFromDocument(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnAutoCompleteFromDocument(slot func(super func())) { + C.QsciScintilla_override_virtual_AutoCompleteFromDocument(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_AutoCompleteFromDocument +func miqt_exec_callback_QsciScintilla_AutoCompleteFromDocument(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_AutoCompleteFromDocument) + } -func (this *QsciScintilla) SelectAll1(selectVal bool) { - C.QsciScintilla_SelectAll1(this.h, (C.bool)(selectVal)) +func (this *QsciScintilla) callVirtualBase_CallTip() { + + C.QsciScintilla_virtualbase_CallTip(unsafe.Pointer(this.h)) + } +func (this *QsciScintilla) OnCallTip(slot func(super func())) { + C.QsciScintilla_override_virtual_CallTip(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_CallTip +func miqt_exec_callback_QsciScintilla_CallTip(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_CallTip) -func (this *QsciScintilla) SetFolding2(fold QsciScintilla__FoldStyle, margin int) { - C.QsciScintilla_SetFolding2(this.h, (C.int)(fold), (C.int)(margin)) } -func (this *QsciScintilla) SetLexer1(lexer *QsciLexer) { - C.QsciScintilla_SetLexer1(this.h, lexer.cPointer()) +func (this *QsciScintilla) callVirtualBase_Clear() { + + C.QsciScintilla_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnClear(slot func(super func())) { + C.QsciScintilla_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Clear +func miqt_exec_callback_QsciScintilla_Clear(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Clear) + +} + +func (this *QsciScintilla) callVirtualBase_Copy() { + + C.QsciScintilla_virtualbase_Copy(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnCopy(slot func(super func())) { + C.QsciScintilla_override_virtual_Copy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Copy +func miqt_exec_callback_QsciScintilla_Copy(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Copy) + +} + +func (this *QsciScintilla) callVirtualBase_Cut() { + + C.QsciScintilla_virtualbase_Cut(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnCut(slot func(super func())) { + C.QsciScintilla_override_virtual_Cut(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Cut +func miqt_exec_callback_QsciScintilla_Cut(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Cut) + +} + +func (this *QsciScintilla) callVirtualBase_EnsureCursorVisible() { + + C.QsciScintilla_virtualbase_EnsureCursorVisible(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnEnsureCursorVisible(slot func(super func())) { + C.QsciScintilla_override_virtual_EnsureCursorVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_EnsureCursorVisible +func miqt_exec_callback_QsciScintilla_EnsureCursorVisible(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_EnsureCursorVisible) + +} + +func (this *QsciScintilla) callVirtualBase_EnsureLineVisible(line int) { + + C.QsciScintilla_virtualbase_EnsureLineVisible(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnEnsureLineVisible(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_EnsureLineVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_EnsureLineVisible +func miqt_exec_callback_QsciScintilla_EnsureLineVisible(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_EnsureLineVisible, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FoldAll(children bool) { + + C.QsciScintilla_virtualbase_FoldAll(unsafe.Pointer(this.h), (C.bool)(children)) + +} +func (this *QsciScintilla) OnFoldAll(slot func(super func(children bool), children bool)) { + C.QsciScintilla_override_virtual_FoldAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FoldAll +func miqt_exec_callback_QsciScintilla_FoldAll(self *C.QsciScintilla, cb C.intptr_t, children C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(children bool), children bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(children) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FoldAll, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FoldLine(line int) { + + C.QsciScintilla_virtualbase_FoldLine(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnFoldLine(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_FoldLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FoldLine +func miqt_exec_callback_QsciScintilla_FoldLine(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FoldLine, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Indent(line int) { + + C.QsciScintilla_virtualbase_Indent(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnIndent(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_Indent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Indent +func miqt_exec_callback_QsciScintilla_Indent(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Indent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Insert(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_Insert(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnInsert(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_Insert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Insert +func miqt_exec_callback_QsciScintilla_Insert(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Insert, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_InsertAt(text string, line int, index int) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_InsertAt(unsafe.Pointer(this.h), text_ms, (C.int)(line), (C.int)(index)) + +} +func (this *QsciScintilla) OnInsertAt(slot func(super func(text string, line int, index int), text string, line int, index int)) { + C.QsciScintilla_override_virtual_InsertAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_InsertAt +func miqt_exec_callback_QsciScintilla_InsertAt(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string, line C.int, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string, line int, index int), text string, line int, index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + slotval2 := (int)(line) + + slotval3 := (int)(index) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_InsertAt, slotval1, slotval2, slotval3) + +} + +func (this *QsciScintilla) callVirtualBase_MoveToMatchingBrace() { + + C.QsciScintilla_virtualbase_MoveToMatchingBrace(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnMoveToMatchingBrace(slot func(super func())) { + C.QsciScintilla_override_virtual_MoveToMatchingBrace(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MoveToMatchingBrace +func miqt_exec_callback_QsciScintilla_MoveToMatchingBrace(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MoveToMatchingBrace) + +} + +func (this *QsciScintilla) callVirtualBase_Paste() { + + C.QsciScintilla_virtualbase_Paste(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnPaste(slot func(super func())) { + C.QsciScintilla_override_virtual_Paste(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Paste +func miqt_exec_callback_QsciScintilla_Paste(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Paste) + +} + +func (this *QsciScintilla) callVirtualBase_Redo() { + + C.QsciScintilla_virtualbase_Redo(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnRedo(slot func(super func())) { + C.QsciScintilla_override_virtual_Redo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Redo +func miqt_exec_callback_QsciScintilla_Redo(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Redo) + +} + +func (this *QsciScintilla) callVirtualBase_RemoveSelectedText() { + + C.QsciScintilla_virtualbase_RemoveSelectedText(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnRemoveSelectedText(slot func(super func())) { + C.QsciScintilla_override_virtual_RemoveSelectedText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_RemoveSelectedText +func miqt_exec_callback_QsciScintilla_RemoveSelectedText(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_RemoveSelectedText) + +} + +func (this *QsciScintilla) callVirtualBase_ReplaceSelectedText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_ReplaceSelectedText(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnReplaceSelectedText(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_ReplaceSelectedText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ReplaceSelectedText +func miqt_exec_callback_QsciScintilla_ReplaceSelectedText(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ReplaceSelectedText, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ResetSelectionBackgroundColor() { + + C.QsciScintilla_virtualbase_ResetSelectionBackgroundColor(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnResetSelectionBackgroundColor(slot func(super func())) { + C.QsciScintilla_override_virtual_ResetSelectionBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ResetSelectionBackgroundColor +func miqt_exec_callback_QsciScintilla_ResetSelectionBackgroundColor(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ResetSelectionBackgroundColor) + +} + +func (this *QsciScintilla) callVirtualBase_ResetSelectionForegroundColor() { + + C.QsciScintilla_virtualbase_ResetSelectionForegroundColor(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnResetSelectionForegroundColor(slot func(super func())) { + C.QsciScintilla_override_virtual_ResetSelectionForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ResetSelectionForegroundColor +func miqt_exec_callback_QsciScintilla_ResetSelectionForegroundColor(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ResetSelectionForegroundColor) + +} + +func (this *QsciScintilla) callVirtualBase_SelectAll(selectVal bool) { + + C.QsciScintilla_virtualbase_SelectAll(unsafe.Pointer(this.h), (C.bool)(selectVal)) + +} +func (this *QsciScintilla) OnSelectAll(slot func(super func(selectVal bool), selectVal bool)) { + C.QsciScintilla_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SelectAll +func miqt_exec_callback_QsciScintilla_SelectAll(self *C.QsciScintilla, cb C.intptr_t, selectVal C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectVal bool), selectVal bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(selectVal) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SelectAll, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SelectToMatchingBrace() { + + C.QsciScintilla_virtualbase_SelectToMatchingBrace(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnSelectToMatchingBrace(slot func(super func())) { + C.QsciScintilla_override_virtual_SelectToMatchingBrace(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SelectToMatchingBrace +func miqt_exec_callback_QsciScintilla_SelectToMatchingBrace(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SelectToMatchingBrace) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionCaseSensitivity(cs bool) { + + C.QsciScintilla_virtualbase_SetAutoCompletionCaseSensitivity(unsafe.Pointer(this.h), (C.bool)(cs)) + +} +func (this *QsciScintilla) OnSetAutoCompletionCaseSensitivity(slot func(super func(cs bool), cs bool)) { + C.QsciScintilla_override_virtual_SetAutoCompletionCaseSensitivity(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionCaseSensitivity +func miqt_exec_callback_QsciScintilla_SetAutoCompletionCaseSensitivity(self *C.QsciScintilla, cb C.intptr_t, cs C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cs bool), cs bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(cs) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionCaseSensitivity, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionReplaceWord(replace bool) { + + C.QsciScintilla_virtualbase_SetAutoCompletionReplaceWord(unsafe.Pointer(this.h), (C.bool)(replace)) + +} +func (this *QsciScintilla) OnSetAutoCompletionReplaceWord(slot func(super func(replace bool), replace bool)) { + C.QsciScintilla_override_virtual_SetAutoCompletionReplaceWord(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionReplaceWord +func miqt_exec_callback_QsciScintilla_SetAutoCompletionReplaceWord(self *C.QsciScintilla, cb C.intptr_t, replace C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(replace bool), replace bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(replace) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionReplaceWord, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionShowSingle(single bool) { + + C.QsciScintilla_virtualbase_SetAutoCompletionShowSingle(unsafe.Pointer(this.h), (C.bool)(single)) + +} +func (this *QsciScintilla) OnSetAutoCompletionShowSingle(slot func(super func(single bool), single bool)) { + C.QsciScintilla_override_virtual_SetAutoCompletionShowSingle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionShowSingle +func miqt_exec_callback_QsciScintilla_SetAutoCompletionShowSingle(self *C.QsciScintilla, cb C.intptr_t, single C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(single bool), single bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(single) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionShowSingle, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionSource(source QsciScintilla__AutoCompletionSource) { + + C.QsciScintilla_virtualbase_SetAutoCompletionSource(unsafe.Pointer(this.h), (C.int)(source)) + +} +func (this *QsciScintilla) OnSetAutoCompletionSource(slot func(super func(source QsciScintilla__AutoCompletionSource), source QsciScintilla__AutoCompletionSource)) { + C.QsciScintilla_override_virtual_SetAutoCompletionSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionSource +func miqt_exec_callback_QsciScintilla_SetAutoCompletionSource(self *C.QsciScintilla, cb C.intptr_t, source C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source QsciScintilla__AutoCompletionSource), source QsciScintilla__AutoCompletionSource)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__AutoCompletionSource)(source) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionSource, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionThreshold(thresh int) { + + C.QsciScintilla_virtualbase_SetAutoCompletionThreshold(unsafe.Pointer(this.h), (C.int)(thresh)) + +} +func (this *QsciScintilla) OnSetAutoCompletionThreshold(slot func(super func(thresh int), thresh int)) { + C.QsciScintilla_override_virtual_SetAutoCompletionThreshold(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionThreshold +func miqt_exec_callback_QsciScintilla_SetAutoCompletionThreshold(self *C.QsciScintilla, cb C.intptr_t, thresh C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(thresh int), thresh int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(thresh) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionThreshold, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoCompletionUseSingle(single QsciScintilla__AutoCompletionUseSingle) { + + C.QsciScintilla_virtualbase_SetAutoCompletionUseSingle(unsafe.Pointer(this.h), (C.int)(single)) + +} +func (this *QsciScintilla) OnSetAutoCompletionUseSingle(slot func(super func(single QsciScintilla__AutoCompletionUseSingle), single QsciScintilla__AutoCompletionUseSingle)) { + C.QsciScintilla_override_virtual_SetAutoCompletionUseSingle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoCompletionUseSingle +func miqt_exec_callback_QsciScintilla_SetAutoCompletionUseSingle(self *C.QsciScintilla, cb C.intptr_t, single C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(single QsciScintilla__AutoCompletionUseSingle), single QsciScintilla__AutoCompletionUseSingle)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__AutoCompletionUseSingle)(single) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoCompletionUseSingle, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetAutoIndent(autoindent bool) { + + C.QsciScintilla_virtualbase_SetAutoIndent(unsafe.Pointer(this.h), (C.bool)(autoindent)) + +} +func (this *QsciScintilla) OnSetAutoIndent(slot func(super func(autoindent bool), autoindent bool)) { + C.QsciScintilla_override_virtual_SetAutoIndent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetAutoIndent +func miqt_exec_callback_QsciScintilla_SetAutoIndent(self *C.QsciScintilla, cb C.intptr_t, autoindent C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(autoindent bool), autoindent bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(autoindent) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetAutoIndent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetBraceMatching(bm QsciScintilla__BraceMatch) { + + C.QsciScintilla_virtualbase_SetBraceMatching(unsafe.Pointer(this.h), (C.int)(bm)) + +} +func (this *QsciScintilla) OnSetBraceMatching(slot func(super func(bm QsciScintilla__BraceMatch), bm QsciScintilla__BraceMatch)) { + C.QsciScintilla_override_virtual_SetBraceMatching(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetBraceMatching +func miqt_exec_callback_QsciScintilla_SetBraceMatching(self *C.QsciScintilla, cb C.intptr_t, bm C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(bm QsciScintilla__BraceMatch), bm QsciScintilla__BraceMatch)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__BraceMatch)(bm) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetBraceMatching, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetBackspaceUnindents(unindent bool) { + + C.QsciScintilla_virtualbase_SetBackspaceUnindents(unsafe.Pointer(this.h), (C.bool)(unindent)) + +} +func (this *QsciScintilla) OnSetBackspaceUnindents(slot func(super func(unindent bool), unindent bool)) { + C.QsciScintilla_override_virtual_SetBackspaceUnindents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetBackspaceUnindents +func miqt_exec_callback_QsciScintilla_SetBackspaceUnindents(self *C.QsciScintilla, cb C.intptr_t, unindent C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(unindent bool), unindent bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(unindent) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetBackspaceUnindents, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretForegroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetCaretForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetCaretForegroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetCaretForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretForegroundColor +func miqt_exec_callback_QsciScintilla_SetCaretForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretLineBackgroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetCaretLineBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetCaretLineBackgroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetCaretLineBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretLineBackgroundColor +func miqt_exec_callback_QsciScintilla_SetCaretLineBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretLineBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretLineFrameWidth(width int) { + + C.QsciScintilla_virtualbase_SetCaretLineFrameWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetCaretLineFrameWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetCaretLineFrameWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretLineFrameWidth +func miqt_exec_callback_QsciScintilla_SetCaretLineFrameWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretLineFrameWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretLineVisible(enable bool) { + + C.QsciScintilla_virtualbase_SetCaretLineVisible(unsafe.Pointer(this.h), (C.bool)(enable)) + +} +func (this *QsciScintilla) OnSetCaretLineVisible(slot func(super func(enable bool), enable bool)) { + C.QsciScintilla_override_virtual_SetCaretLineVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretLineVisible +func miqt_exec_callback_QsciScintilla_SetCaretLineVisible(self *C.QsciScintilla, cb C.intptr_t, enable C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(enable bool), enable bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(enable) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretLineVisible, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCaretWidth(width int) { + + C.QsciScintilla_virtualbase_SetCaretWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetCaretWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetCaretWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCaretWidth +func miqt_exec_callback_QsciScintilla_SetCaretWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCaretWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetColor(c *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetColor(slot func(super func(c *qt6.QColor), c *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetColor +func miqt_exec_callback_QsciScintilla_SetColor(self *C.QsciScintilla, cb C.intptr_t, c *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor), c *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetCursorPosition(line int, index int) { + + C.QsciScintilla_virtualbase_SetCursorPosition(unsafe.Pointer(this.h), (C.int)(line), (C.int)(index)) + +} +func (this *QsciScintilla) OnSetCursorPosition(slot func(super func(line int, index int), line int, index int)) { + C.QsciScintilla_override_virtual_SetCursorPosition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetCursorPosition +func miqt_exec_callback_QsciScintilla_SetCursorPosition(self *C.QsciScintilla, cb C.intptr_t, line C.int, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int, index int), line int, index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + slotval2 := (int)(index) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetCursorPosition, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetEolMode(mode QsciScintilla__EolMode) { + + C.QsciScintilla_virtualbase_SetEolMode(unsafe.Pointer(this.h), (C.int)(mode)) + +} +func (this *QsciScintilla) OnSetEolMode(slot func(super func(mode QsciScintilla__EolMode), mode QsciScintilla__EolMode)) { + C.QsciScintilla_override_virtual_SetEolMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetEolMode +func miqt_exec_callback_QsciScintilla_SetEolMode(self *C.QsciScintilla, cb C.intptr_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QsciScintilla__EolMode), mode QsciScintilla__EolMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__EolMode)(mode) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetEolMode, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetEolVisibility(visible bool) { + + C.QsciScintilla_virtualbase_SetEolVisibility(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QsciScintilla) OnSetEolVisibility(slot func(super func(visible bool), visible bool)) { + C.QsciScintilla_override_virtual_SetEolVisibility(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetEolVisibility +func miqt_exec_callback_QsciScintilla_SetEolVisibility(self *C.QsciScintilla, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetEolVisibility, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetFolding(fold QsciScintilla__FoldStyle, margin int) { + + C.QsciScintilla_virtualbase_SetFolding(unsafe.Pointer(this.h), (C.int)(fold), (C.int)(margin)) + +} +func (this *QsciScintilla) OnSetFolding(slot func(super func(fold QsciScintilla__FoldStyle, margin int), fold QsciScintilla__FoldStyle, margin int)) { + C.QsciScintilla_override_virtual_SetFolding(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetFolding +func miqt_exec_callback_QsciScintilla_SetFolding(self *C.QsciScintilla, cb C.intptr_t, fold C.int, margin C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fold QsciScintilla__FoldStyle, margin int), fold QsciScintilla__FoldStyle, margin int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__FoldStyle)(fold) + + slotval2 := (int)(margin) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetFolding, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentation(line int, indentation int) { + + C.QsciScintilla_virtualbase_SetIndentation(unsafe.Pointer(this.h), (C.int)(line), (C.int)(indentation)) + +} +func (this *QsciScintilla) OnSetIndentation(slot func(super func(line int, indentation int), line int, indentation int)) { + C.QsciScintilla_override_virtual_SetIndentation(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentation +func miqt_exec_callback_QsciScintilla_SetIndentation(self *C.QsciScintilla, cb C.intptr_t, line C.int, indentation C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int, indentation int), line int, indentation int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + slotval2 := (int)(indentation) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentation, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationGuides(enable bool) { + + C.QsciScintilla_virtualbase_SetIndentationGuides(unsafe.Pointer(this.h), (C.bool)(enable)) + +} +func (this *QsciScintilla) OnSetIndentationGuides(slot func(super func(enable bool), enable bool)) { + C.QsciScintilla_override_virtual_SetIndentationGuides(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationGuides +func miqt_exec_callback_QsciScintilla_SetIndentationGuides(self *C.QsciScintilla, cb C.intptr_t, enable C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(enable bool), enable bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(enable) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationGuides, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationGuidesBackgroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetIndentationGuidesBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetIndentationGuidesBackgroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetIndentationGuidesBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationGuidesBackgroundColor +func miqt_exec_callback_QsciScintilla_SetIndentationGuidesBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationGuidesBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationGuidesForegroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetIndentationGuidesForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetIndentationGuidesForegroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetIndentationGuidesForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationGuidesForegroundColor +func miqt_exec_callback_QsciScintilla_SetIndentationGuidesForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationGuidesForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationsUseTabs(tabs bool) { + + C.QsciScintilla_virtualbase_SetIndentationsUseTabs(unsafe.Pointer(this.h), (C.bool)(tabs)) + +} +func (this *QsciScintilla) OnSetIndentationsUseTabs(slot func(super func(tabs bool), tabs bool)) { + C.QsciScintilla_override_virtual_SetIndentationsUseTabs(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationsUseTabs +func miqt_exec_callback_QsciScintilla_SetIndentationsUseTabs(self *C.QsciScintilla, cb C.intptr_t, tabs C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(tabs bool), tabs bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(tabs) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationsUseTabs, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetIndentationWidth(width int) { + + C.QsciScintilla_virtualbase_SetIndentationWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetIndentationWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetIndentationWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetIndentationWidth +func miqt_exec_callback_QsciScintilla_SetIndentationWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetIndentationWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetLexer(lexer *QsciLexer) { + + C.QsciScintilla_virtualbase_SetLexer(unsafe.Pointer(this.h), lexer.cPointer()) + +} +func (this *QsciScintilla) OnSetLexer(slot func(super func(lexer *QsciLexer), lexer *QsciLexer)) { + C.QsciScintilla_override_virtual_SetLexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetLexer +func miqt_exec_callback_QsciScintilla_SetLexer(self *C.QsciScintilla, cb C.intptr_t, lexer *C.QsciLexer) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lexer *QsciLexer), lexer *QsciLexer)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQsciLexer(unsafe.Pointer(lexer), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetLexer, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginsBackgroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetMarginsBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetMarginsBackgroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetMarginsBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginsBackgroundColor +func miqt_exec_callback_QsciScintilla_SetMarginsBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginsBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginsFont(f *qt6.QFont) { + + C.QsciScintilla_virtualbase_SetMarginsFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetMarginsFont(slot func(super func(f *qt6.QFont), f *qt6.QFont)) { + C.QsciScintilla_override_virtual_SetMarginsFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginsFont +func miqt_exec_callback_QsciScintilla_SetMarginsFont(self *C.QsciScintilla, cb C.intptr_t, f *C.QFont) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *qt6.QFont), f *qt6.QFont)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFont(unsafe.Pointer(f)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginsFont, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginsForegroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetMarginsForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetMarginsForegroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetMarginsForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginsForegroundColor +func miqt_exec_callback_QsciScintilla_SetMarginsForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginsForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginLineNumbers(margin int, lnrs bool) { + + C.QsciScintilla_virtualbase_SetMarginLineNumbers(unsafe.Pointer(this.h), (C.int)(margin), (C.bool)(lnrs)) + +} +func (this *QsciScintilla) OnSetMarginLineNumbers(slot func(super func(margin int, lnrs bool), margin int, lnrs bool)) { + C.QsciScintilla_override_virtual_SetMarginLineNumbers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginLineNumbers +func miqt_exec_callback_QsciScintilla_SetMarginLineNumbers(self *C.QsciScintilla, cb C.intptr_t, margin C.int, lnrs C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, lnrs bool), margin int, lnrs bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (bool)(lnrs) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginLineNumbers, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginMarkerMask(margin int, mask int) { + + C.QsciScintilla_virtualbase_SetMarginMarkerMask(unsafe.Pointer(this.h), (C.int)(margin), (C.int)(mask)) + +} +func (this *QsciScintilla) OnSetMarginMarkerMask(slot func(super func(margin int, mask int), margin int, mask int)) { + C.QsciScintilla_override_virtual_SetMarginMarkerMask(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginMarkerMask +func miqt_exec_callback_QsciScintilla_SetMarginMarkerMask(self *C.QsciScintilla, cb C.intptr_t, margin C.int, mask C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, mask int), margin int, mask int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (int)(mask) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginMarkerMask, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginSensitivity(margin int, sens bool) { + + C.QsciScintilla_virtualbase_SetMarginSensitivity(unsafe.Pointer(this.h), (C.int)(margin), (C.bool)(sens)) + +} +func (this *QsciScintilla) OnSetMarginSensitivity(slot func(super func(margin int, sens bool), margin int, sens bool)) { + C.QsciScintilla_override_virtual_SetMarginSensitivity(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginSensitivity +func miqt_exec_callback_QsciScintilla_SetMarginSensitivity(self *C.QsciScintilla, cb C.intptr_t, margin C.int, sens C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, sens bool), margin int, sens bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (bool)(sens) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginSensitivity, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginWidth(margin int, width int) { + + C.QsciScintilla_virtualbase_SetMarginWidth(unsafe.Pointer(this.h), (C.int)(margin), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetMarginWidth(slot func(super func(margin int, width int), margin int, width int)) { + C.QsciScintilla_override_virtual_SetMarginWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginWidth +func miqt_exec_callback_QsciScintilla_SetMarginWidth(self *C.QsciScintilla, cb C.intptr_t, margin C.int, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, width int), margin int, width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + slotval2 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginWidth, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetMarginWidth2(margin int, s string) { + s_ms := C.struct_miqt_string{} + s_ms.data = C.CString(s) + s_ms.len = C.size_t(len(s)) + defer C.free(unsafe.Pointer(s_ms.data)) + + C.QsciScintilla_virtualbase_SetMarginWidth2(unsafe.Pointer(this.h), (C.int)(margin), s_ms) + +} +func (this *QsciScintilla) OnSetMarginWidth2(slot func(super func(margin int, s string), margin int, s string)) { + C.QsciScintilla_override_virtual_SetMarginWidth2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetMarginWidth2 +func miqt_exec_callback_QsciScintilla_SetMarginWidth2(self *C.QsciScintilla, cb C.intptr_t, margin C.int, s C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margin int, s string), margin int, s string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(margin) + + var s_ms C.struct_miqt_string = s + s_ret := C.GoStringN(s_ms.data, C.int(int64(s_ms.len))) + C.free(unsafe.Pointer(s_ms.data)) + slotval2 := s_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetMarginWidth2, slotval1, slotval2) + +} + +func (this *QsciScintilla) callVirtualBase_SetModified(m bool) { + + C.QsciScintilla_virtualbase_SetModified(unsafe.Pointer(this.h), (C.bool)(m)) + +} +func (this *QsciScintilla) OnSetModified(slot func(super func(m bool), m bool)) { + C.QsciScintilla_override_virtual_SetModified(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetModified +func miqt_exec_callback_QsciScintilla_SetModified(self *C.QsciScintilla, cb C.intptr_t, m C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m bool), m bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(m) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetModified, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetPaper(c *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetPaper(slot func(super func(c *qt6.QColor), c *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetPaper +func miqt_exec_callback_QsciScintilla_SetPaper(self *C.QsciScintilla, cb C.intptr_t, c *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(c *qt6.QColor), c *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(c)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetPaper, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetReadOnly(ro bool) { + + C.QsciScintilla_virtualbase_SetReadOnly(unsafe.Pointer(this.h), (C.bool)(ro)) + +} +func (this *QsciScintilla) OnSetReadOnly(slot func(super func(ro bool), ro bool)) { + C.QsciScintilla_override_virtual_SetReadOnly(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetReadOnly +func miqt_exec_callback_QsciScintilla_SetReadOnly(self *C.QsciScintilla, cb C.intptr_t, ro C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ro bool), ro bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(ro) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetReadOnly, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetSelection(lineFrom int, indexFrom int, lineTo int, indexTo int) { + + C.QsciScintilla_virtualbase_SetSelection(unsafe.Pointer(this.h), (C.int)(lineFrom), (C.int)(indexFrom), (C.int)(lineTo), (C.int)(indexTo)) + +} +func (this *QsciScintilla) OnSetSelection(slot func(super func(lineFrom int, indexFrom int, lineTo int, indexTo int), lineFrom int, indexFrom int, lineTo int, indexTo int)) { + C.QsciScintilla_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetSelection +func miqt_exec_callback_QsciScintilla_SetSelection(self *C.QsciScintilla, cb C.intptr_t, lineFrom C.int, indexFrom C.int, lineTo C.int, indexTo C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lineFrom int, indexFrom int, lineTo int, indexTo int), lineFrom int, indexFrom int, lineTo int, indexTo int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(lineFrom) + + slotval2 := (int)(indexFrom) + + slotval3 := (int)(lineTo) + + slotval4 := (int)(indexTo) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetSelection, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QsciScintilla) callVirtualBase_SetSelectionBackgroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetSelectionBackgroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetSelectionBackgroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetSelectionBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetSelectionBackgroundColor +func miqt_exec_callback_QsciScintilla_SetSelectionBackgroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetSelectionBackgroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetSelectionForegroundColor(col *qt6.QColor) { + + C.QsciScintilla_virtualbase_SetSelectionForegroundColor(unsafe.Pointer(this.h), (*C.QColor)(col.UnsafePointer())) + +} +func (this *QsciScintilla) OnSetSelectionForegroundColor(slot func(super func(col *qt6.QColor), col *qt6.QColor)) { + C.QsciScintilla_override_virtual_SetSelectionForegroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetSelectionForegroundColor +func miqt_exec_callback_QsciScintilla_SetSelectionForegroundColor(self *C.QsciScintilla, cb C.intptr_t, col *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(col *qt6.QColor), col *qt6.QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQColor(unsafe.Pointer(col)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetSelectionForegroundColor, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetTabIndents(indent bool) { + + C.QsciScintilla_virtualbase_SetTabIndents(unsafe.Pointer(this.h), (C.bool)(indent)) + +} +func (this *QsciScintilla) OnSetTabIndents(slot func(super func(indent bool), indent bool)) { + C.QsciScintilla_override_virtual_SetTabIndents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetTabIndents +func miqt_exec_callback_QsciScintilla_SetTabIndents(self *C.QsciScintilla, cb C.intptr_t, indent C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indent bool), indent bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(indent) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetTabIndents, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetTabWidth(width int) { + + C.QsciScintilla_virtualbase_SetTabWidth(unsafe.Pointer(this.h), (C.int)(width)) + +} +func (this *QsciScintilla) OnSetTabWidth(slot func(super func(width int), width int)) { + C.QsciScintilla_override_virtual_SetTabWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetTabWidth +func miqt_exec_callback_QsciScintilla_SetTabWidth(self *C.QsciScintilla, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int), width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetTabWidth, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QsciScintilla_virtualbase_SetText(unsafe.Pointer(this.h), text_ms) + +} +func (this *QsciScintilla) OnSetText(slot func(super func(text string), text string)) { + C.QsciScintilla_override_virtual_SetText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetText +func miqt_exec_callback_QsciScintilla_SetText(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string), text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetText, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetUtf8(cp bool) { + + C.QsciScintilla_virtualbase_SetUtf8(unsafe.Pointer(this.h), (C.bool)(cp)) + +} +func (this *QsciScintilla) OnSetUtf8(slot func(super func(cp bool), cp bool)) { + C.QsciScintilla_override_virtual_SetUtf8(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetUtf8 +func miqt_exec_callback_QsciScintilla_SetUtf8(self *C.QsciScintilla, cb C.intptr_t, cp C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cp bool), cp bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(cp) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetUtf8, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetWhitespaceVisibility(mode QsciScintilla__WhitespaceVisibility) { + + C.QsciScintilla_virtualbase_SetWhitespaceVisibility(unsafe.Pointer(this.h), (C.int)(mode)) + +} +func (this *QsciScintilla) OnSetWhitespaceVisibility(slot func(super func(mode QsciScintilla__WhitespaceVisibility), mode QsciScintilla__WhitespaceVisibility)) { + C.QsciScintilla_override_virtual_SetWhitespaceVisibility(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetWhitespaceVisibility +func miqt_exec_callback_QsciScintilla_SetWhitespaceVisibility(self *C.QsciScintilla, cb C.intptr_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QsciScintilla__WhitespaceVisibility), mode QsciScintilla__WhitespaceVisibility)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__WhitespaceVisibility)(mode) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetWhitespaceVisibility, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_SetWrapMode(mode QsciScintilla__WrapMode) { + + C.QsciScintilla_virtualbase_SetWrapMode(unsafe.Pointer(this.h), (C.int)(mode)) + +} +func (this *QsciScintilla) OnSetWrapMode(slot func(super func(mode QsciScintilla__WrapMode), mode QsciScintilla__WrapMode)) { + C.QsciScintilla_override_virtual_SetWrapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_SetWrapMode +func miqt_exec_callback_QsciScintilla_SetWrapMode(self *C.QsciScintilla, cb C.intptr_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QsciScintilla__WrapMode), mode QsciScintilla__WrapMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QsciScintilla__WrapMode)(mode) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_SetWrapMode, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Undo() { + + C.QsciScintilla_virtualbase_Undo(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnUndo(slot func(super func())) { + C.QsciScintilla_override_virtual_Undo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Undo +func miqt_exec_callback_QsciScintilla_Undo(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Undo) + +} + +func (this *QsciScintilla) callVirtualBase_Unindent(line int) { + + C.QsciScintilla_virtualbase_Unindent(unsafe.Pointer(this.h), (C.int)(line)) + +} +func (this *QsciScintilla) OnUnindent(slot func(super func(line int), line int)) { + C.QsciScintilla_override_virtual_Unindent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Unindent +func miqt_exec_callback_QsciScintilla_Unindent(self *C.QsciScintilla, cb C.intptr_t, line C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(line int), line int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(line) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_Unindent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomIn(rangeVal int) { + + C.QsciScintilla_virtualbase_ZoomIn(unsafe.Pointer(this.h), (C.int)(rangeVal)) + +} +func (this *QsciScintilla) OnZoomIn(slot func(super func(rangeVal int), rangeVal int)) { + C.QsciScintilla_override_virtual_ZoomIn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomIn +func miqt_exec_callback_QsciScintilla_ZoomIn(self *C.QsciScintilla, cb C.intptr_t, rangeVal C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rangeVal int), rangeVal int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(rangeVal) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomIn, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomIn2() { + + C.QsciScintilla_virtualbase_ZoomIn2(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnZoomIn2(slot func(super func())) { + C.QsciScintilla_override_virtual_ZoomIn2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomIn2 +func miqt_exec_callback_QsciScintilla_ZoomIn2(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomIn2) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomOut(rangeVal int) { + + C.QsciScintilla_virtualbase_ZoomOut(unsafe.Pointer(this.h), (C.int)(rangeVal)) + +} +func (this *QsciScintilla) OnZoomOut(slot func(super func(rangeVal int), rangeVal int)) { + C.QsciScintilla_override_virtual_ZoomOut(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomOut +func miqt_exec_callback_QsciScintilla_ZoomOut(self *C.QsciScintilla, cb C.intptr_t, rangeVal C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rangeVal int), rangeVal int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(rangeVal) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomOut, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomOut2() { + + C.QsciScintilla_virtualbase_ZoomOut2(unsafe.Pointer(this.h)) + +} +func (this *QsciScintilla) OnZoomOut2(slot func(super func())) { + C.QsciScintilla_override_virtual_ZoomOut2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomOut2 +func miqt_exec_callback_QsciScintilla_ZoomOut2(self *C.QsciScintilla, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomOut2) + +} + +func (this *QsciScintilla) callVirtualBase_ZoomTo(size int) { + + C.QsciScintilla_virtualbase_ZoomTo(unsafe.Pointer(this.h), (C.int)(size)) + +} +func (this *QsciScintilla) OnZoomTo(slot func(super func(size int), size int)) { + C.QsciScintilla_override_virtual_ZoomTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ZoomTo +func miqt_exec_callback_QsciScintilla_ZoomTo(self *C.QsciScintilla, cb C.intptr_t, size C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int), size int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(size) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ZoomTo, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_Event(e *qt6.QEvent) bool { + + return (bool)(C.QsciScintilla_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer()))) + +} +func (this *QsciScintilla) OnEvent(slot func(super func(e *qt6.QEvent) bool, e *qt6.QEvent) bool) { + C.QsciScintilla_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_Event +func miqt_exec_callback_QsciScintilla_Event(self *C.QsciScintilla, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QEvent) bool, e *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_ChangeEvent(e *qt6.QEvent) { + + C.QsciScintilla_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnChangeEvent(slot func(super func(e *qt6.QEvent), e *qt6.QEvent)) { + C.QsciScintilla_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ChangeEvent +func miqt_exec_callback_QsciScintilla_ChangeEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QEvent), e *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ContextMenuEvent(e *qt6.QContextMenuEvent) { + + C.QsciScintilla_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnContextMenuEvent(slot func(super func(e *qt6.QContextMenuEvent), e *qt6.QContextMenuEvent)) { + C.QsciScintilla_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ContextMenuEvent +func miqt_exec_callback_QsciScintilla_ContextMenuEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QContextMenuEvent), e *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_WheelEvent(e *qt6.QWheelEvent) { + + C.QsciScintilla_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnWheelEvent(slot func(super func(e *qt6.QWheelEvent), e *qt6.QWheelEvent)) { + C.QsciScintilla_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_WheelEvent +func miqt_exec_callback_QsciScintilla_WheelEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QWheelEvent), e *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_CanInsertFromMimeData(source *qt6.QMimeData) bool { + + return (bool)(C.QsciScintilla_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()))) + +} +func (this *QsciScintilla) OnCanInsertFromMimeData(slot func(super func(source *qt6.QMimeData) bool, source *qt6.QMimeData) bool) { + C.QsciScintilla_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_CanInsertFromMimeData +func miqt_exec_callback_QsciScintilla_CanInsertFromMimeData(self *C.QsciScintilla, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt6.QMimeData) bool, source *qt6.QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_FromMimeData(source *qt6.QMimeData, rectangular *bool) []byte { + + var _bytearray C.struct_miqt_string = C.QsciScintilla_virtualbase_FromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()), (*C.bool)(unsafe.Pointer(rectangular))) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QsciScintilla) OnFromMimeData(slot func(super func(source *qt6.QMimeData, rectangular *bool) []byte, source *qt6.QMimeData, rectangular *bool) []byte) { + C.QsciScintilla_override_virtual_FromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FromMimeData +func miqt_exec_callback_QsciScintilla_FromMimeData(self *C.QsciScintilla, cb C.intptr_t, source *C.QMimeData, rectangular *C.bool) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt6.QMimeData, rectangular *bool) []byte, source *qt6.QMimeData, rectangular *bool) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval2 := (*bool)(unsafe.Pointer(rectangular)) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FromMimeData, slotval1, slotval2) + virtualReturn_alias := C.struct_miqt_string{} + virtualReturn_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[0])) + virtualReturn_alias.len = C.size_t(len(virtualReturn)) + + return virtualReturn_alias + +} + +func (this *QsciScintilla) callVirtualBase_ToMimeData(text []byte, rectangular bool) *qt6.QMimeData { + text_alias := C.struct_miqt_string{} + text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) + text_alias.len = C.size_t(len(text)) + + return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintilla_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) +} +func (this *QsciScintilla) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt6.QMimeData, text []byte, rectangular bool) *qt6.QMimeData) { + C.QsciScintilla_override_virtual_ToMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ToMimeData +func miqt_exec_callback_QsciScintilla_ToMimeData(self *C.QsciScintilla, cb C.intptr_t, text C.struct_miqt_string, rectangular C.bool) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text []byte, rectangular bool) *qt6.QMimeData, text []byte, rectangular bool) *qt6.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_bytearray C.struct_miqt_string = text + text_ret := C.GoBytes(unsafe.Pointer(text_bytearray.data), C.int(int64(text_bytearray.len))) + C.free(unsafe.Pointer(text_bytearray.data)) + slotval1 := text_ret + slotval2 := (bool)(rectangular) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_ToMimeData, slotval1, slotval2) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintilla) callVirtualBase_DragEnterEvent(e *qt6.QDragEnterEvent) { + + C.QsciScintilla_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDragEnterEvent(slot func(super func(e *qt6.QDragEnterEvent), e *qt6.QDragEnterEvent)) { + C.QsciScintilla_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DragEnterEvent +func miqt_exec_callback_QsciScintilla_DragEnterEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragEnterEvent), e *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_DragLeaveEvent(e *qt6.QDragLeaveEvent) { + + C.QsciScintilla_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDragLeaveEvent(slot func(super func(e *qt6.QDragLeaveEvent), e *qt6.QDragLeaveEvent)) { + C.QsciScintilla_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DragLeaveEvent +func miqt_exec_callback_QsciScintilla_DragLeaveEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragLeaveEvent), e *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_DragMoveEvent(e *qt6.QDragMoveEvent) { + + C.QsciScintilla_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDragMoveEvent(slot func(super func(e *qt6.QDragMoveEvent), e *qt6.QDragMoveEvent)) { + C.QsciScintilla_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DragMoveEvent +func miqt_exec_callback_QsciScintilla_DragMoveEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragMoveEvent), e *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_DropEvent(e *qt6.QDropEvent) { + + C.QsciScintilla_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnDropEvent(slot func(super func(e *qt6.QDropEvent), e *qt6.QDropEvent)) { + C.QsciScintilla_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_DropEvent +func miqt_exec_callback_QsciScintilla_DropEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDropEvent), e *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FocusInEvent(e *qt6.QFocusEvent) { + + C.QsciScintilla_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnFocusInEvent(slot func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) { + C.QsciScintilla_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FocusInEvent +func miqt_exec_callback_QsciScintilla_FocusInEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FocusOutEvent(e *qt6.QFocusEvent) { + + C.QsciScintilla_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnFocusOutEvent(slot func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) { + C.QsciScintilla_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FocusOutEvent +func miqt_exec_callback_QsciScintilla_FocusOutEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QsciScintilla_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QsciScintilla) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QsciScintilla_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_FocusNextPrevChild +func miqt_exec_callback_QsciScintilla_FocusNextPrevChild(self *C.QsciScintilla, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintilla) callVirtualBase_KeyPressEvent(e *qt6.QKeyEvent) { + + C.QsciScintilla_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnKeyPressEvent(slot func(super func(e *qt6.QKeyEvent), e *qt6.QKeyEvent)) { + C.QsciScintilla_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_KeyPressEvent +func miqt_exec_callback_QsciScintilla_KeyPressEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QKeyEvent), e *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_InputMethodEvent(event *qt6.QInputMethodEvent) { + + C.QsciScintilla_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(event.UnsafePointer())) + +} +func (this *QsciScintilla) OnInputMethodEvent(slot func(super func(event *qt6.QInputMethodEvent), event *qt6.QInputMethodEvent)) { + C.QsciScintilla_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_InputMethodEvent +func miqt_exec_callback_QsciScintilla_InputMethodEvent(self *C.QsciScintilla, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QInputMethodEvent), event *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_InputMethodQuery(query qt6.InputMethodQuery) *qt6.QVariant { + + _ret := C.QsciScintilla_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintilla) OnInputMethodQuery(slot func(super func(query qt6.InputMethodQuery) *qt6.QVariant, query qt6.InputMethodQuery) *qt6.QVariant) { + C.QsciScintilla_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_InputMethodQuery +func miqt_exec_callback_QsciScintilla_InputMethodQuery(self *C.QsciScintilla, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt6.InputMethodQuery) *qt6.QVariant, query qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(query) + + virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintilla) callVirtualBase_MouseDoubleClickEvent(e *qt6.QMouseEvent) { + + C.QsciScintilla_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMouseDoubleClickEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintilla_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent +func miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_MouseMoveEvent(e *qt6.QMouseEvent) { + + C.QsciScintilla_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMouseMoveEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintilla_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MouseMoveEvent +func miqt_exec_callback_QsciScintilla_MouseMoveEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_MousePressEvent(e *qt6.QMouseEvent) { + + C.QsciScintilla_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMousePressEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintilla_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MousePressEvent +func miqt_exec_callback_QsciScintilla_MousePressEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_MouseReleaseEvent(e *qt6.QMouseEvent) { + + C.QsciScintilla_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnMouseReleaseEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintilla_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_MouseReleaseEvent +func miqt_exec_callback_QsciScintilla_MouseReleaseEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_PaintEvent(e *qt6.QPaintEvent) { + + C.QsciScintilla_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnPaintEvent(slot func(super func(e *qt6.QPaintEvent), e *qt6.QPaintEvent)) { + C.QsciScintilla_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_PaintEvent +func miqt_exec_callback_QsciScintilla_PaintEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QPaintEvent), e *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ResizeEvent(e *qt6.QResizeEvent) { + + C.QsciScintilla_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(e.UnsafePointer())) + +} +func (this *QsciScintilla) OnResizeEvent(slot func(super func(e *qt6.QResizeEvent), e *qt6.QResizeEvent)) { + C.QsciScintilla_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ResizeEvent +func miqt_exec_callback_QsciScintilla_ResizeEvent(self *C.QsciScintilla, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QResizeEvent), e *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QsciScintilla) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QsciScintilla_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QsciScintilla) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QsciScintilla_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintilla_ScrollContentsBy +func miqt_exec_callback_QsciScintilla_ScrollContentsBy(self *C.QsciScintilla, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QsciScintilla{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + } // Delete this object from C++ memory. func (this *QsciScintilla) Delete() { - C.QsciScintilla_Delete(this.h) + C.QsciScintilla_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h index dba6cf16..ce505bea 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h @@ -15,43 +15,83 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QByteArray; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFont; +class QFrame; class QIODevice; class QImage; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPixmap; class QPoint; +class QResizeEvent; +class QVariant; +class QWheelEvent; class QWidget; class QsciCommandSet; class QsciDocument; class QsciLexer; class QsciScintilla; +class QsciScintillaBase; class QsciStyle; class QsciStyledText; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QByteArray QByteArray; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIODevice QIODevice; typedef struct QImage QImage; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QsciCommandSet QsciCommandSet; typedef struct QsciDocument QsciDocument; typedef struct QsciLexer QsciLexer; typedef struct QsciScintilla QsciScintilla; +typedef struct QsciScintillaBase QsciScintillaBase; typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -QsciScintilla* QsciScintilla_new(QWidget* parent); -QsciScintilla* QsciScintilla_new2(); +void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self); void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1); struct miqt_string QsciScintilla_Tr(const char* s); @@ -98,8 +138,8 @@ bool QsciScintilla_EolVisibility(const QsciScintilla* self); int QsciScintilla_ExtraAscent(const QsciScintilla* self); int QsciScintilla_ExtraDescent(const QsciScintilla* self); void QsciScintilla_FillIndicatorRange(QsciScintilla* self, int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber); -bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap); -bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo); +bool QsciScintilla_FindFirst(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11); +bool QsciScintilla_FindFirstInSelection(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11); bool QsciScintilla_FindNext(QsciScintilla* self); bool QsciScintilla_FindMatchingBrace(QsciScintilla* self, long* brace, long* other, int mode); int QsciScintilla_FirstVisibleLine(const QsciScintilla* self); @@ -151,7 +191,7 @@ bool QsciScintilla_OverwriteMode(const QsciScintilla* self); QColor* QsciScintilla_Paper(const QsciScintilla* self); int QsciScintilla_PositionFromLineIndex(const QsciScintilla* self, int line, int index); bool QsciScintilla_Read(QsciScintilla* self, QIODevice* io); -void QsciScintilla_Recolor(QsciScintilla* self); +void QsciScintilla_Recolor(QsciScintilla* self, int start, int end); void QsciScintilla_RegisterImage(QsciScintilla* self, int id, QPixmap* pm); void QsciScintilla_RegisterImage2(QsciScintilla* self, int id, QImage* im); void QsciScintilla_Replace(QsciScintilla* self, struct miqt_string replaceStr); @@ -247,7 +287,7 @@ void QsciScintilla_Copy(QsciScintilla* self); void QsciScintilla_Cut(QsciScintilla* self); void QsciScintilla_EnsureCursorVisible(QsciScintilla* self); void QsciScintilla_EnsureLineVisible(QsciScintilla* self, int line); -void QsciScintilla_FoldAll(QsciScintilla* self); +void QsciScintilla_FoldAll(QsciScintilla* self, bool children); void QsciScintilla_FoldLine(QsciScintilla* self, int line); void QsciScintilla_Indent(QsciScintilla* self, int line); void QsciScintilla_Insert(QsciScintilla* self, struct miqt_string text); @@ -259,7 +299,7 @@ void QsciScintilla_RemoveSelectedText(QsciScintilla* self); void QsciScintilla_ReplaceSelectedText(QsciScintilla* self, struct miqt_string text); void QsciScintilla_ResetSelectionBackgroundColor(QsciScintilla* self); void QsciScintilla_ResetSelectionForegroundColor(QsciScintilla* self); -void QsciScintilla_SelectAll(QsciScintilla* self); +void QsciScintilla_SelectAll(QsciScintilla* self, bool selectVal); void QsciScintilla_SelectToMatchingBrace(QsciScintilla* self); void QsciScintilla_SetAutoCompletionCaseSensitivity(QsciScintilla* self, bool cs); void QsciScintilla_SetAutoCompletionReplaceWord(QsciScintilla* self, bool replace); @@ -279,14 +319,14 @@ void QsciScintilla_SetColor(QsciScintilla* self, QColor* c); void QsciScintilla_SetCursorPosition(QsciScintilla* self, int line, int index); void QsciScintilla_SetEolMode(QsciScintilla* self, int mode); void QsciScintilla_SetEolVisibility(QsciScintilla* self, bool visible); -void QsciScintilla_SetFolding(QsciScintilla* self, int fold); +void QsciScintilla_SetFolding(QsciScintilla* self, int fold, int margin); void QsciScintilla_SetIndentation(QsciScintilla* self, int line, int indentation); void QsciScintilla_SetIndentationGuides(QsciScintilla* self, bool enable); void QsciScintilla_SetIndentationGuidesBackgroundColor(QsciScintilla* self, QColor* col); void QsciScintilla_SetIndentationGuidesForegroundColor(QsciScintilla* self, QColor* col); void QsciScintilla_SetIndentationsUseTabs(QsciScintilla* self, bool tabs); void QsciScintilla_SetIndentationWidth(QsciScintilla* self, int width); -void QsciScintilla_SetLexer(QsciScintilla* self); +void QsciScintilla_SetLexer(QsciScintilla* self, QsciLexer* lexer); void QsciScintilla_SetMarginsBackgroundColor(QsciScintilla* self, QColor* col); void QsciScintilla_SetMarginsFont(QsciScintilla* self, QFont* f); void QsciScintilla_SetMarginsForegroundColor(QsciScintilla* self, QColor* col); @@ -338,19 +378,13 @@ void QsciScintilla_TextChanged(QsciScintilla* self); void QsciScintilla_connect_TextChanged(QsciScintilla* self, intptr_t slot); void QsciScintilla_UserListActivated(QsciScintilla* self, int id, struct miqt_string stringVal); void QsciScintilla_connect_UserListActivated(QsciScintilla* self, intptr_t slot); +bool QsciScintilla_Event(QsciScintilla* self, QEvent* e); +void QsciScintilla_ChangeEvent(QsciScintilla* self, QEvent* e); +void QsciScintilla_ContextMenuEvent(QsciScintilla* self, QContextMenuEvent* e); +void QsciScintilla_WheelEvent(QsciScintilla* self, QWheelEvent* e); struct miqt_string QsciScintilla_Tr2(const char* s, const char* c); struct miqt_string QsciScintilla_Tr3(const char* s, const char* c, int n); void QsciScintilla_ClearAnnotations1(QsciScintilla* self, int line); -bool QsciScintilla_FindFirst6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward); -bool QsciScintilla_FindFirst7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line); -bool QsciScintilla_FindFirst8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index); -bool QsciScintilla_FindFirst9(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show); -bool QsciScintilla_FindFirst10(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix); -bool QsciScintilla_FindFirst11(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11); -bool QsciScintilla_FindFirstInSelection5(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward); -bool QsciScintilla_FindFirstInSelection6(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show); -bool QsciScintilla_FindFirstInSelection7(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix); -bool QsciScintilla_FindFirstInSelection8(QsciScintilla* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11); int QsciScintilla_IndicatorDefine2(QsciScintilla* self, int style, int indicatorNumber); int QsciScintilla_MarkerDefine2(QsciScintilla* self, int sym, int markerNumber); int QsciScintilla_MarkerDefine22(QsciScintilla* self, char ch, int markerNumber); @@ -358,8 +392,6 @@ int QsciScintilla_MarkerDefine23(QsciScintilla* self, QPixmap* pm, int markerNum int QsciScintilla_MarkerDefine24(QsciScintilla* self, QImage* im, int markerNumber); void QsciScintilla_MarkerDelete2(QsciScintilla* self, int linenr, int markerNumber); void QsciScintilla_MarkerDeleteAll1(QsciScintilla* self, int markerNumber); -void QsciScintilla_Recolor1(QsciScintilla* self, int start); -void QsciScintilla_Recolor2(QsciScintilla* self, int start, int end); void QsciScintilla_SetIndicatorDrawUnder2(QsciScintilla* self, bool under, int indicatorNumber); void QsciScintilla_SetIndicatorForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber); void QsciScintilla_SetIndicatorHoverForegroundColor2(QsciScintilla* self, QColor* col, int indicatorNumber); @@ -370,11 +402,221 @@ void QsciScintilla_SetMarkerBackgroundColor2(QsciScintilla* self, QColor* col, i void QsciScintilla_SetMarkerForegroundColor2(QsciScintilla* self, QColor* col, int markerNumber); void QsciScintilla_SetWrapVisualFlags2(QsciScintilla* self, int endFlag, int startFlag); void QsciScintilla_SetWrapVisualFlags3(QsciScintilla* self, int endFlag, int startFlag, int indent); -void QsciScintilla_FoldAll1(QsciScintilla* self, bool children); -void QsciScintilla_SelectAll1(QsciScintilla* self, bool selectVal); -void QsciScintilla_SetFolding2(QsciScintilla* self, int fold, int margin); -void QsciScintilla_SetLexer1(QsciScintilla* self, QsciLexer* lexer); -void QsciScintilla_Delete(QsciScintilla* self); +void QsciScintilla_override_virtual_ApiContext(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciScintilla_virtualbase_ApiContext(void* self, int pos, int* context_start, int* last_word_start); +void QsciScintilla_override_virtual_FindFirst(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FindFirst(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix, bool cxx11); +void QsciScintilla_override_virtual_FindFirstInSelection(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FindFirstInSelection(void* self, struct miqt_string expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix, bool cxx11); +void QsciScintilla_override_virtual_FindNext(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FindNext(void* self); +void QsciScintilla_override_virtual_Recolor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Recolor(void* self, int start, int end); +void QsciScintilla_override_virtual_Replace(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Replace(void* self, struct miqt_string replaceStr); +void QsciScintilla_override_virtual_Append(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Append(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_AutoCompleteFromAll(void* self, intptr_t slot); +void QsciScintilla_virtualbase_AutoCompleteFromAll(void* self); +void QsciScintilla_override_virtual_AutoCompleteFromAPIs(void* self, intptr_t slot); +void QsciScintilla_virtualbase_AutoCompleteFromAPIs(void* self); +void QsciScintilla_override_virtual_AutoCompleteFromDocument(void* self, intptr_t slot); +void QsciScintilla_virtualbase_AutoCompleteFromDocument(void* self); +void QsciScintilla_override_virtual_CallTip(void* self, intptr_t slot); +void QsciScintilla_virtualbase_CallTip(void* self); +void QsciScintilla_override_virtual_Clear(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Clear(void* self); +void QsciScintilla_override_virtual_Copy(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Copy(void* self); +void QsciScintilla_override_virtual_Cut(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Cut(void* self); +void QsciScintilla_override_virtual_EnsureCursorVisible(void* self, intptr_t slot); +void QsciScintilla_virtualbase_EnsureCursorVisible(void* self); +void QsciScintilla_override_virtual_EnsureLineVisible(void* self, intptr_t slot); +void QsciScintilla_virtualbase_EnsureLineVisible(void* self, int line); +void QsciScintilla_override_virtual_FoldAll(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FoldAll(void* self, bool children); +void QsciScintilla_override_virtual_FoldLine(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FoldLine(void* self, int line); +void QsciScintilla_override_virtual_Indent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Indent(void* self, int line); +void QsciScintilla_override_virtual_Insert(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Insert(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_InsertAt(void* self, intptr_t slot); +void QsciScintilla_virtualbase_InsertAt(void* self, struct miqt_string text, int line, int index); +void QsciScintilla_override_virtual_MoveToMatchingBrace(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MoveToMatchingBrace(void* self); +void QsciScintilla_override_virtual_Paste(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Paste(void* self); +void QsciScintilla_override_virtual_Redo(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Redo(void* self); +void QsciScintilla_override_virtual_RemoveSelectedText(void* self, intptr_t slot); +void QsciScintilla_virtualbase_RemoveSelectedText(void* self); +void QsciScintilla_override_virtual_ReplaceSelectedText(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ReplaceSelectedText(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_ResetSelectionBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ResetSelectionBackgroundColor(void* self); +void QsciScintilla_override_virtual_ResetSelectionForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ResetSelectionForegroundColor(void* self); +void QsciScintilla_override_virtual_SelectAll(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SelectAll(void* self, bool selectVal); +void QsciScintilla_override_virtual_SelectToMatchingBrace(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SelectToMatchingBrace(void* self); +void QsciScintilla_override_virtual_SetAutoCompletionCaseSensitivity(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionCaseSensitivity(void* self, bool cs); +void QsciScintilla_override_virtual_SetAutoCompletionReplaceWord(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionReplaceWord(void* self, bool replace); +void QsciScintilla_override_virtual_SetAutoCompletionShowSingle(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionShowSingle(void* self, bool single); +void QsciScintilla_override_virtual_SetAutoCompletionSource(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionSource(void* self, int source); +void QsciScintilla_override_virtual_SetAutoCompletionThreshold(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionThreshold(void* self, int thresh); +void QsciScintilla_override_virtual_SetAutoCompletionUseSingle(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoCompletionUseSingle(void* self, int single); +void QsciScintilla_override_virtual_SetAutoIndent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetAutoIndent(void* self, bool autoindent); +void QsciScintilla_override_virtual_SetBraceMatching(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetBraceMatching(void* self, int bm); +void QsciScintilla_override_virtual_SetBackspaceUnindents(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetBackspaceUnindents(void* self, bool unindent); +void QsciScintilla_override_virtual_SetCaretForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetCaretLineBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretLineBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetCaretLineFrameWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretLineFrameWidth(void* self, int width); +void QsciScintilla_override_virtual_SetCaretLineVisible(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretLineVisible(void* self, bool enable); +void QsciScintilla_override_virtual_SetCaretWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCaretWidth(void* self, int width); +void QsciScintilla_override_virtual_SetColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetColor(void* self, QColor* c); +void QsciScintilla_override_virtual_SetCursorPosition(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetCursorPosition(void* self, int line, int index); +void QsciScintilla_override_virtual_SetEolMode(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetEolMode(void* self, int mode); +void QsciScintilla_override_virtual_SetEolVisibility(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetEolVisibility(void* self, bool visible); +void QsciScintilla_override_virtual_SetFolding(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetFolding(void* self, int fold, int margin); +void QsciScintilla_override_virtual_SetIndentation(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentation(void* self, int line, int indentation); +void QsciScintilla_override_virtual_SetIndentationGuides(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationGuides(void* self, bool enable); +void QsciScintilla_override_virtual_SetIndentationGuidesBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationGuidesBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetIndentationGuidesForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationGuidesForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetIndentationsUseTabs(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationsUseTabs(void* self, bool tabs); +void QsciScintilla_override_virtual_SetIndentationWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetIndentationWidth(void* self, int width); +void QsciScintilla_override_virtual_SetLexer(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetLexer(void* self, QsciLexer* lexer); +void QsciScintilla_override_virtual_SetMarginsBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginsBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetMarginsFont(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginsFont(void* self, QFont* f); +void QsciScintilla_override_virtual_SetMarginsForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginsForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetMarginLineNumbers(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginLineNumbers(void* self, int margin, bool lnrs); +void QsciScintilla_override_virtual_SetMarginMarkerMask(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginMarkerMask(void* self, int margin, int mask); +void QsciScintilla_override_virtual_SetMarginSensitivity(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginSensitivity(void* self, int margin, bool sens); +void QsciScintilla_override_virtual_SetMarginWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginWidth(void* self, int margin, int width); +void QsciScintilla_override_virtual_SetMarginWidth2(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetMarginWidth2(void* self, int margin, struct miqt_string s); +void QsciScintilla_override_virtual_SetModified(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetModified(void* self, bool m); +void QsciScintilla_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetPaper(void* self, QColor* c); +void QsciScintilla_override_virtual_SetReadOnly(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetReadOnly(void* self, bool ro); +void QsciScintilla_override_virtual_SetSelection(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetSelection(void* self, int lineFrom, int indexFrom, int lineTo, int indexTo); +void QsciScintilla_override_virtual_SetSelectionBackgroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetSelectionBackgroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetSelectionForegroundColor(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetSelectionForegroundColor(void* self, QColor* col); +void QsciScintilla_override_virtual_SetTabIndents(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetTabIndents(void* self, bool indent); +void QsciScintilla_override_virtual_SetTabWidth(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetTabWidth(void* self, int width); +void QsciScintilla_override_virtual_SetText(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetText(void* self, struct miqt_string text); +void QsciScintilla_override_virtual_SetUtf8(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetUtf8(void* self, bool cp); +void QsciScintilla_override_virtual_SetWhitespaceVisibility(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetWhitespaceVisibility(void* self, int mode); +void QsciScintilla_override_virtual_SetWrapMode(void* self, intptr_t slot); +void QsciScintilla_virtualbase_SetWrapMode(void* self, int mode); +void QsciScintilla_override_virtual_Undo(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Undo(void* self); +void QsciScintilla_override_virtual_Unindent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_Unindent(void* self, int line); +void QsciScintilla_override_virtual_ZoomIn(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomIn(void* self, int rangeVal); +void QsciScintilla_override_virtual_ZoomIn2(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomIn2(void* self); +void QsciScintilla_override_virtual_ZoomOut(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomOut(void* self, int rangeVal); +void QsciScintilla_override_virtual_ZoomOut2(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomOut2(void* self); +void QsciScintilla_override_virtual_ZoomTo(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ZoomTo(void* self, int size); +void QsciScintilla_override_virtual_Event(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_Event(void* self, QEvent* e); +void QsciScintilla_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ChangeEvent(void* self, QEvent* e); +void QsciScintilla_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QsciScintilla_override_virtual_WheelEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QsciScintilla_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QsciScintilla_override_virtual_FromMimeData(void* self, intptr_t slot); +struct miqt_string QsciScintilla_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular); +void QsciScintilla_override_virtual_ToMimeData(void* self, intptr_t slot); +QMimeData* QsciScintilla_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular); +void QsciScintilla_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QsciScintilla_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QsciScintilla_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QsciScintilla_override_virtual_DropEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_DropEvent(void* self, QDropEvent* e); +void QsciScintilla_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QsciScintilla_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QsciScintilla_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QsciScintilla_virtualbase_FocusNextPrevChild(void* self, bool next); +void QsciScintilla_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QsciScintilla_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QsciScintilla_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QsciScintilla_virtualbase_InputMethodQuery(const void* self, int query); +void QsciScintilla_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QsciScintilla_override_virtual_PaintEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QsciScintilla_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QsciScintilla_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QsciScintilla_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QsciScintilla_Delete(QsciScintilla* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp index 759f63de..0fdb376e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp @@ -1,25 +1,791 @@ +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include +#include #include +#include #include #include #include #include +#include +#include #include #include #include "gen_qsciscintillabase.h" #include "_cgo_export.h" -QsciScintillaBase* QsciScintillaBase_new(QWidget* parent) { - return new QsciScintillaBase(parent); +class MiqtVirtualQsciScintillaBase : public virtual QsciScintillaBase { +public: + + MiqtVirtualQsciScintillaBase(QWidget* parent): QsciScintillaBase(parent) {}; + MiqtVirtualQsciScintillaBase(): QsciScintillaBase() {}; + + virtual ~MiqtVirtualQsciScintillaBase() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QsciScintillaBase::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QsciScintillaBase::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray fromMimeData(const QMimeData* source, bool& rectangular) const override { + if (handle__FromMimeData == 0) { + return QsciScintillaBase::fromMimeData(source, rectangular); + } + + QMimeData* sigval1 = (QMimeData*) source; + bool* sigval2 = &rectangular; + + struct miqt_string callback_return_value = miqt_exec_callback_QsciScintillaBase_FromMimeData(const_cast(this), handle__FromMimeData, sigval1, sigval2); + QByteArray callback_return_value_QByteArray(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QByteArray; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FromMimeData(QMimeData* source, bool* rectangular) const { + + QByteArray _qb = QsciScintillaBase::fromMimeData(source, *rectangular); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ToMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* toMimeData(const QByteArray& text, bool rectangular) const override { + if (handle__ToMimeData == 0) { + return QsciScintillaBase::toMimeData(text, rectangular); + } + + const QByteArray text_qb = text; + struct miqt_string text_ms; + text_ms.len = text_qb.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_qb.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + bool sigval2 = rectangular; + + QMimeData* callback_return_value = miqt_exec_callback_QsciScintillaBase_ToMimeData(const_cast(this), handle__ToMimeData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_ToMimeData(struct miqt_string text, bool rectangular) const { + QByteArray text_QByteArray(text.data, text.len); + + return QsciScintillaBase::toMimeData(text_QByteArray, rectangular); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QsciScintillaBase::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QsciScintillaBase::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QsciScintillaBase::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QsciScintillaBase::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QsciScintillaBase::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QsciScintillaBase::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QsciScintillaBase::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QsciScintillaBase::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QsciScintillaBase::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QsciScintillaBase::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QsciScintillaBase::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QsciScintillaBase::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QsciScintillaBase::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QsciScintillaBase::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QsciScintillaBase::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QsciScintillaBase::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QsciScintillaBase::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QsciScintillaBase::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QsciScintillaBase::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QsciScintillaBase::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QsciScintillaBase::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QsciScintillaBase_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QsciScintillaBase::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QsciScintillaBase::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QsciScintillaBase_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QsciScintillaBase::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QsciScintillaBase::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QsciScintillaBase::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QsciScintillaBase::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QsciScintillaBase::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QsciScintillaBase::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QsciScintillaBase::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QsciScintillaBase::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QsciScintillaBase::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QsciScintillaBase::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QsciScintillaBase::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QsciScintillaBase::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QsciScintillaBase_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QsciScintillaBase::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QsciScintillaBase::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QsciScintillaBase_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QsciScintillaBase::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QsciScintillaBase::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QsciScintillaBase_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QsciScintillaBase::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QsciScintillaBase::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QsciScintillaBase_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QsciScintillaBase::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QsciScintillaBase::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QsciScintillaBase_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QsciScintillaBase::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QsciScintillaBase::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QsciScintillaBase::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QsciScintillaBase::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QsciScintillaBase::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QsciScintillaBase::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QsciScintillaBase_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QsciScintillaBase::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QsciScintillaBase::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QsciScintillaBase_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QsciScintillaBase::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QsciScintillaBase::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QsciScintillaBase_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QsciScintillaBase::viewportSizeHint()); + + } + +}; + +void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(parent); + *outptr_QsciScintillaBase = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QsciScintillaBase* QsciScintillaBase_new2() { - return new QsciScintillaBase(); +void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(); + *outptr_QsciScintillaBase = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self) { @@ -118,7 +884,7 @@ void QsciScintillaBase_QSCN_SELCHANGED(QsciScintillaBase* self, bool yes) { } void QsciScintillaBase_connect_QSCN_SELCHANGED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::QSCN_SELCHANGED), self, [=](bool yes) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::QSCN_SELCHANGED), self, [=](bool yes) { bool sigval1 = yes; miqt_exec_callback_QsciScintillaBase_QSCN_SELCHANGED(slot, sigval1); }); @@ -129,7 +895,7 @@ void QsciScintillaBase_SCN_AUTOCCANCELLED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_AUTOCCANCELLED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCANCELLED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCANCELLED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_AUTOCCANCELLED(slot); }); } @@ -139,7 +905,7 @@ void QsciScintillaBase_SCN_AUTOCCHARDELETED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_AUTOCCHARDELETED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCHARDELETED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCHARDELETED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_AUTOCCHARDELETED(slot); }); } @@ -149,7 +915,7 @@ void QsciScintillaBase_SCN_AUTOCCOMPLETED(QsciScintillaBase* self, const char* s } void QsciScintillaBase_connect_SCN_AUTOCCOMPLETED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCOMPLETED), self, [=](const char* selection, int position, int ch, int method) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCCOMPLETED), self, [=](const char* selection, int position, int ch, int method) { const char* sigval1 = (const char*) selection; int sigval2 = position; int sigval3 = ch; @@ -163,7 +929,7 @@ void QsciScintillaBase_SCN_AUTOCSELECTION(QsciScintillaBase* self, const char* s } void QsciScintillaBase_connect_SCN_AUTOCSELECTION(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position, int ch, int method) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position, int ch, int method) { const char* sigval1 = (const char*) selection; int sigval2 = position; int sigval3 = ch; @@ -177,7 +943,7 @@ void QsciScintillaBase_SCN_AUTOCSELECTION2(QsciScintillaBase* self, const char* } void QsciScintillaBase_connect_SCN_AUTOCSELECTION2(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTION), self, [=](const char* selection, int position) { const char* sigval1 = (const char*) selection; int sigval2 = position; miqt_exec_callback_QsciScintillaBase_SCN_AUTOCSELECTION2(slot, sigval1, sigval2); @@ -189,7 +955,7 @@ void QsciScintillaBase_SCN_AUTOCSELECTIONCHANGE(QsciScintillaBase* self, const c } void QsciScintillaBase_connect_SCN_AUTOCSELECTIONCHANGE(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTIONCHANGE), self, [=](const char* selection, int id, int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_AUTOCSELECTIONCHANGE), self, [=](const char* selection, int id, int position) { const char* sigval1 = (const char*) selection; int sigval2 = id; int sigval3 = position; @@ -202,7 +968,7 @@ void QsciScintillaBase_SCEN_CHANGE(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCEN_CHANGE(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCEN_CHANGE), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCEN_CHANGE), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCEN_CHANGE(slot); }); } @@ -212,7 +978,7 @@ void QsciScintillaBase_SCN_CALLTIPCLICK(QsciScintillaBase* self, int direction) } void QsciScintillaBase_connect_SCN_CALLTIPCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CALLTIPCLICK), self, [=](int direction) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CALLTIPCLICK), self, [=](int direction) { int sigval1 = direction; miqt_exec_callback_QsciScintillaBase_SCN_CALLTIPCLICK(slot, sigval1); }); @@ -223,7 +989,7 @@ void QsciScintillaBase_SCN_CHARADDED(QsciScintillaBase* self, int charadded) { } void QsciScintillaBase_connect_SCN_CHARADDED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CHARADDED), self, [=](int charadded) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_CHARADDED), self, [=](int charadded) { int sigval1 = charadded; miqt_exec_callback_QsciScintillaBase_SCN_CHARADDED(slot, sigval1); }); @@ -234,7 +1000,7 @@ void QsciScintillaBase_SCN_DOUBLECLICK(QsciScintillaBase* self, int position, in } void QsciScintillaBase_connect_SCN_DOUBLECLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DOUBLECLICK), self, [=](int position, int line, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DOUBLECLICK), self, [=](int position, int line, int modifiers) { int sigval1 = position; int sigval2 = line; int sigval3 = modifiers; @@ -247,7 +1013,7 @@ void QsciScintillaBase_SCN_DWELLEND(QsciScintillaBase* self, int position, int x } void QsciScintillaBase_connect_SCN_DWELLEND(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLEND), self, [=](int position, int x, int y) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLEND), self, [=](int position, int x, int y) { int sigval1 = position; int sigval2 = x; int sigval3 = y; @@ -260,7 +1026,7 @@ void QsciScintillaBase_SCN_DWELLSTART(QsciScintillaBase* self, int position, int } void QsciScintillaBase_connect_SCN_DWELLSTART(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLSTART), self, [=](int position, int x, int y) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_DWELLSTART), self, [=](int position, int x, int y) { int sigval1 = position; int sigval2 = x; int sigval3 = y; @@ -273,7 +1039,7 @@ void QsciScintillaBase_SCN_FOCUSIN(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_FOCUSIN(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSIN), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSIN), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_FOCUSIN(slot); }); } @@ -283,7 +1049,7 @@ void QsciScintillaBase_SCN_FOCUSOUT(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_FOCUSOUT(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSOUT), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_FOCUSOUT), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_FOCUSOUT(slot); }); } @@ -293,7 +1059,7 @@ void QsciScintillaBase_SCN_HOTSPOTCLICK(QsciScintillaBase* self, int position, i } void QsciScintillaBase_connect_SCN_HOTSPOTCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTCLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTCLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_HOTSPOTCLICK(slot, sigval1, sigval2); @@ -305,7 +1071,7 @@ void QsciScintillaBase_SCN_HOTSPOTDOUBLECLICK(QsciScintillaBase* self, int posit } void QsciScintillaBase_connect_SCN_HOTSPOTDOUBLECLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTDOUBLECLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTDOUBLECLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_HOTSPOTDOUBLECLICK(slot, sigval1, sigval2); @@ -317,7 +1083,7 @@ void QsciScintillaBase_SCN_HOTSPOTRELEASECLICK(QsciScintillaBase* self, int posi } void QsciScintillaBase_connect_SCN_HOTSPOTRELEASECLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTRELEASECLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_HOTSPOTRELEASECLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_HOTSPOTRELEASECLICK(slot, sigval1, sigval2); @@ -329,7 +1095,7 @@ void QsciScintillaBase_SCN_INDICATORCLICK(QsciScintillaBase* self, int position, } void QsciScintillaBase_connect_SCN_INDICATORCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORCLICK), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORCLICK), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_INDICATORCLICK(slot, sigval1, sigval2); @@ -341,7 +1107,7 @@ void QsciScintillaBase_SCN_INDICATORRELEASE(QsciScintillaBase* self, int positio } void QsciScintillaBase_connect_SCN_INDICATORRELEASE(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORRELEASE), self, [=](int position, int modifiers) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_INDICATORRELEASE), self, [=](int position, int modifiers) { int sigval1 = position; int sigval2 = modifiers; miqt_exec_callback_QsciScintillaBase_SCN_INDICATORRELEASE(slot, sigval1, sigval2); @@ -353,7 +1119,7 @@ void QsciScintillaBase_SCN_MACRORECORD(QsciScintillaBase* self, unsigned int par } void QsciScintillaBase_connect_SCN_MACRORECORD(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MACRORECORD), self, [=](unsigned int param1, unsigned long param2, void* param3) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MACRORECORD), self, [=](unsigned int param1, unsigned long param2, void* param3) { unsigned int sigval1 = param1; unsigned long sigval2 = param2; void* sigval3 = param3; @@ -366,7 +1132,7 @@ void QsciScintillaBase_SCN_MARGINCLICK(QsciScintillaBase* self, int position, in } void QsciScintillaBase_connect_SCN_MARGINCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINCLICK), self, [=](int position, int modifiers, int margin) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINCLICK), self, [=](int position, int modifiers, int margin) { int sigval1 = position; int sigval2 = modifiers; int sigval3 = margin; @@ -379,7 +1145,7 @@ void QsciScintillaBase_SCN_MARGINRIGHTCLICK(QsciScintillaBase* self, int positio } void QsciScintillaBase_connect_SCN_MARGINRIGHTCLICK(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINRIGHTCLICK), self, [=](int position, int modifiers, int margin) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MARGINRIGHTCLICK), self, [=](int position, int modifiers, int margin) { int sigval1 = position; int sigval2 = modifiers; int sigval3 = margin; @@ -392,7 +1158,7 @@ void QsciScintillaBase_SCN_MODIFIED(QsciScintillaBase* self, int param1, int par } void QsciScintillaBase_connect_SCN_MODIFIED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFIED), self, [=](int param1, int param2, const char* param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFIED), self, [=](int param1, int param2, const char* param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10) { int sigval1 = param1; int sigval2 = param2; const char* sigval3 = (const char*) param3; @@ -412,7 +1178,7 @@ void QsciScintillaBase_SCN_MODIFYATTEMPTRO(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_MODIFYATTEMPTRO(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFYATTEMPTRO), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_MODIFYATTEMPTRO), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_MODIFYATTEMPTRO(slot); }); } @@ -422,7 +1188,7 @@ void QsciScintillaBase_SCN_NEEDSHOWN(QsciScintillaBase* self, int param1, int pa } void QsciScintillaBase_connect_SCN_NEEDSHOWN(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_NEEDSHOWN), self, [=](int param1, int param2) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_NEEDSHOWN), self, [=](int param1, int param2) { int sigval1 = param1; int sigval2 = param2; miqt_exec_callback_QsciScintillaBase_SCN_NEEDSHOWN(slot, sigval1, sigval2); @@ -434,7 +1200,7 @@ void QsciScintillaBase_SCN_PAINTED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_PAINTED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_PAINTED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_PAINTED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_PAINTED(slot); }); } @@ -444,7 +1210,7 @@ void QsciScintillaBase_SCN_SAVEPOINTLEFT(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_SAVEPOINTLEFT(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTLEFT), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTLEFT), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_SAVEPOINTLEFT(slot); }); } @@ -454,7 +1220,7 @@ void QsciScintillaBase_SCN_SAVEPOINTREACHED(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_SAVEPOINTREACHED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTREACHED), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_SAVEPOINTREACHED), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_SAVEPOINTREACHED(slot); }); } @@ -464,7 +1230,7 @@ void QsciScintillaBase_SCN_STYLENEEDED(QsciScintillaBase* self, int position) { } void QsciScintillaBase_connect_SCN_STYLENEEDED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_STYLENEEDED), self, [=](int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_STYLENEEDED), self, [=](int position) { int sigval1 = position; miqt_exec_callback_QsciScintillaBase_SCN_STYLENEEDED(slot, sigval1); }); @@ -475,7 +1241,7 @@ void QsciScintillaBase_SCN_URIDROPPED(QsciScintillaBase* self, QUrl* url) { } void QsciScintillaBase_connect_SCN_URIDROPPED(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_URIDROPPED), self, [=](const QUrl& url) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_URIDROPPED), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -488,7 +1254,7 @@ void QsciScintillaBase_SCN_UPDATEUI(QsciScintillaBase* self, int updated) { } void QsciScintillaBase_connect_SCN_UPDATEUI(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_UPDATEUI), self, [=](int updated) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_UPDATEUI), self, [=](int updated) { int sigval1 = updated; miqt_exec_callback_QsciScintillaBase_SCN_UPDATEUI(slot, sigval1); }); @@ -499,7 +1265,7 @@ void QsciScintillaBase_SCN_USERLISTSELECTION(QsciScintillaBase* self, const char } void QsciScintillaBase_connect_SCN_USERLISTSELECTION(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method, int position) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method, int position) { const char* sigval1 = (const char*) selection; int sigval2 = id; int sigval3 = ch; @@ -514,7 +1280,7 @@ void QsciScintillaBase_SCN_USERLISTSELECTION2(QsciScintillaBase* self, const cha } void QsciScintillaBase_connect_SCN_USERLISTSELECTION2(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id, int ch, int method) { const char* sigval1 = (const char*) selection; int sigval2 = id; int sigval3 = ch; @@ -528,7 +1294,7 @@ void QsciScintillaBase_SCN_USERLISTSELECTION3(QsciScintillaBase* self, const cha } void QsciScintillaBase_connect_SCN_USERLISTSELECTION3(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id) { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_USERLISTSELECTION), self, [=](const char* selection, int id) { const char* sigval1 = (const char*) selection; int sigval2 = id; miqt_exec_callback_QsciScintillaBase_SCN_USERLISTSELECTION3(slot, sigval1, sigval2); @@ -540,7 +1306,7 @@ void QsciScintillaBase_SCN_ZOOM(QsciScintillaBase* self) { } void QsciScintillaBase_connect_SCN_ZOOM(QsciScintillaBase* self, intptr_t slot) { - QsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_ZOOM), self, [=]() { + MiqtVirtualQsciScintillaBase::connect(self, static_cast(&QsciScintillaBase::SCN_ZOOM), self, [=]() { miqt_exec_callback_QsciScintillaBase_SCN_ZOOM(slot); }); } @@ -575,7 +1341,251 @@ long QsciScintillaBase_SendScintilla32(const QsciScintillaBase* self, unsigned i return self->SendScintilla(static_cast(msg), static_cast(wParam), static_cast(lParam)); } -void QsciScintillaBase_Delete(QsciScintillaBase* self) { - delete self; +void QsciScintillaBase_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__CanInsertFromMimeData = slot; +} + +bool QsciScintillaBase_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_CanInsertFromMimeData(source); +} + +void QsciScintillaBase_override_virtual_FromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FromMimeData = slot; +} + +struct miqt_string QsciScintillaBase_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FromMimeData(source, rectangular); +} + +void QsciScintillaBase_override_virtual_ToMimeData(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ToMimeData = slot; +} + +QMimeData* QsciScintillaBase_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ToMimeData(text, rectangular); +} + +void QsciScintillaBase_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ChangeEvent = slot; +} + +void QsciScintillaBase_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ChangeEvent(e); +} + +void QsciScintillaBase_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ContextMenuEvent = slot; +} + +void QsciScintillaBase_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QsciScintillaBase_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DragEnterEvent = slot; +} + +void QsciScintillaBase_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QsciScintillaBase_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DragLeaveEvent = slot; +} + +void QsciScintillaBase_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QsciScintillaBase_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DragMoveEvent = slot; +} + +void QsciScintillaBase_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QsciScintillaBase_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__DropEvent = slot; +} + +void QsciScintillaBase_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_DropEvent(e); +} + +void QsciScintillaBase_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FocusInEvent = slot; +} + +void QsciScintillaBase_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FocusInEvent(e); +} + +void QsciScintillaBase_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FocusOutEvent = slot; +} + +void QsciScintillaBase_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QsciScintillaBase_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QsciScintillaBase_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QsciScintillaBase_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__KeyPressEvent = slot; +} + +void QsciScintillaBase_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QsciScintillaBase_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__InputMethodEvent = slot; +} + +void QsciScintillaBase_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QsciScintillaBase_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QsciScintillaBase_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QsciScintillaBase_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QsciScintillaBase_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QsciScintillaBase_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MouseMoveEvent = slot; +} + +void QsciScintillaBase_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QsciScintillaBase_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MousePressEvent = slot; +} + +void QsciScintillaBase_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MousePressEvent(e); +} + +void QsciScintillaBase_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QsciScintillaBase_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QsciScintillaBase_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__PaintEvent = slot; +} + +void QsciScintillaBase_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_PaintEvent(e); +} + +void QsciScintillaBase_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ResizeEvent = slot; +} + +void QsciScintillaBase_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ResizeEvent(e); +} + +void QsciScintillaBase_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ScrollContentsBy = slot; +} + +void QsciScintillaBase_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QsciScintillaBase_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QsciScintillaBase_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QsciScintillaBase_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__SizeHint = slot; +} + +QSize* QsciScintillaBase_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_SizeHint(); +} + +void QsciScintillaBase_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__SetupViewport = slot; +} + +void QsciScintillaBase_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QsciScintillaBase_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__EventFilter = slot; +} + +bool QsciScintillaBase_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QsciScintillaBase_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__Event = slot; +} + +bool QsciScintillaBase_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_Event(param1); +} + +void QsciScintillaBase_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ViewportEvent = slot; +} + +bool QsciScintillaBase_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QsciScintillaBase_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__WheelEvent = slot; +} + +void QsciScintillaBase_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_WheelEvent(param1); +} + +void QsciScintillaBase_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QsciScintillaBase*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QsciScintillaBase_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQsciScintillaBase*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QsciScintillaBase_Delete(QsciScintillaBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go index 0833abc1..79aed547 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go @@ -1187,7 +1187,8 @@ const ( ) type QsciScintillaBase struct { - h *C.QsciScintillaBase + h *C.QsciScintillaBase + isSubclass bool *qt6.QAbstractScrollArea } @@ -1205,27 +1206,53 @@ func (this *QsciScintillaBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQsciScintillaBase(h *C.QsciScintillaBase) *QsciScintillaBase { +// newQsciScintillaBase constructs the type using only CGO pointers. +func newQsciScintillaBase(h *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintillaBase { if h == nil { return nil } - return &QsciScintillaBase{h: h, QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QsciScintillaBase{h: h, + QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h_QAbstractScrollArea), unsafe.Pointer(h_QFrame), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQsciScintillaBase(h unsafe.Pointer) *QsciScintillaBase { - return newQsciScintillaBase((*C.QsciScintillaBase)(h)) +// UnsafeNewQsciScintillaBase constructs the type using only unsafe pointers. +func UnsafeNewQsciScintillaBase(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintillaBase { + if h == nil { + return nil + } + + return &QsciScintillaBase{h: (*C.QsciScintillaBase)(h), + QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQsciScintillaBase constructs a new QsciScintillaBase object. func NewQsciScintillaBase(parent *qt6.QWidget) *QsciScintillaBase { - ret := C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer())) - return newQsciScintillaBase(ret) + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQsciScintillaBase2 constructs a new QsciScintillaBase object. func NewQsciScintillaBase2() *QsciScintillaBase { - ret := C.QsciScintillaBase_new2() - return newQsciScintillaBase(ret) + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QsciScintillaBase_new2(&outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QsciScintillaBase) MetaObject() *qt6.QMetaObject { @@ -1248,7 +1275,7 @@ func QsciScintillaBase_Tr(s string) string { } func QsciScintillaBase_Pool() *QsciScintillaBase { - return UnsafeNewQsciScintillaBase(unsafe.Pointer(C.QsciScintillaBase_Pool())) + return UnsafeNewQsciScintillaBase(unsafe.Pointer(C.QsciScintillaBase_Pool()), nil, nil, nil, nil, nil) } func (this *QsciScintillaBase) ReplaceHorizontalScrollBar(scrollBar *qt6.QScrollBar) { @@ -2161,9 +2188,739 @@ func (this *QsciScintillaBase) SendScintilla32(msg uint, wParam uint64, lParam i return (int64)(C.QsciScintillaBase_SendScintilla32(this.h, (C.uint)(msg), (C.ulong)(wParam), (C.long)(lParam))) } +func (this *QsciScintillaBase) callVirtualBase_CanInsertFromMimeData(source *qt6.QMimeData) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnCanInsertFromMimeData(slot func(super func(source *qt6.QMimeData) bool, source *qt6.QMimeData) bool) { + C.QsciScintillaBase_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData +func miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData(self *C.QsciScintillaBase, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt6.QMimeData) bool, source *qt6.QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_FromMimeData(source *qt6.QMimeData, rectangular *bool) []byte { + + var _bytearray C.struct_miqt_string = C.QsciScintillaBase_virtualbase_FromMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(source.UnsafePointer()), (*C.bool)(unsafe.Pointer(rectangular))) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QsciScintillaBase) OnFromMimeData(slot func(super func(source *qt6.QMimeData, rectangular *bool) []byte, source *qt6.QMimeData, rectangular *bool) []byte) { + C.QsciScintillaBase_override_virtual_FromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FromMimeData +func miqt_exec_callback_QsciScintillaBase_FromMimeData(self *C.QsciScintillaBase, cb C.intptr_t, source *C.QMimeData, rectangular *C.bool) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *qt6.QMimeData, rectangular *bool) []byte, source *qt6.QMimeData, rectangular *bool) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval2 := (*bool)(unsafe.Pointer(rectangular)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FromMimeData, slotval1, slotval2) + virtualReturn_alias := C.struct_miqt_string{} + virtualReturn_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[0])) + virtualReturn_alias.len = C.size_t(len(virtualReturn)) + + return virtualReturn_alias + +} + +func (this *QsciScintillaBase) callVirtualBase_ToMimeData(text []byte, rectangular bool) *qt6.QMimeData { + text_alias := C.struct_miqt_string{} + text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) + text_alias.len = C.size_t(len(text)) + + return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintillaBase_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) +} +func (this *QsciScintillaBase) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt6.QMimeData, text []byte, rectangular bool) *qt6.QMimeData) { + C.QsciScintillaBase_override_virtual_ToMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ToMimeData +func miqt_exec_callback_QsciScintillaBase_ToMimeData(self *C.QsciScintillaBase, cb C.intptr_t, text C.struct_miqt_string, rectangular C.bool) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text []byte, rectangular bool) *qt6.QMimeData, text []byte, rectangular bool) *qt6.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_bytearray C.struct_miqt_string = text + text_ret := C.GoBytes(unsafe.Pointer(text_bytearray.data), C.int(int64(text_bytearray.len))) + C.free(unsafe.Pointer(text_bytearray.data)) + slotval1 := text_ret + slotval2 := (bool)(rectangular) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ToMimeData, slotval1, slotval2) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_ChangeEvent(e *qt6.QEvent) { + + C.QsciScintillaBase_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnChangeEvent(slot func(super func(e *qt6.QEvent), e *qt6.QEvent)) { + C.QsciScintillaBase_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ChangeEvent +func miqt_exec_callback_QsciScintillaBase_ChangeEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QEvent), e *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ContextMenuEvent(e *qt6.QContextMenuEvent) { + + C.QsciScintillaBase_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnContextMenuEvent(slot func(super func(e *qt6.QContextMenuEvent), e *qt6.QContextMenuEvent)) { + C.QsciScintillaBase_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ContextMenuEvent +func miqt_exec_callback_QsciScintillaBase_ContextMenuEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QContextMenuEvent), e *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DragEnterEvent(e *qt6.QDragEnterEvent) { + + C.QsciScintillaBase_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDragEnterEvent(slot func(super func(e *qt6.QDragEnterEvent), e *qt6.QDragEnterEvent)) { + C.QsciScintillaBase_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DragEnterEvent +func miqt_exec_callback_QsciScintillaBase_DragEnterEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragEnterEvent), e *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DragLeaveEvent(e *qt6.QDragLeaveEvent) { + + C.QsciScintillaBase_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDragLeaveEvent(slot func(super func(e *qt6.QDragLeaveEvent), e *qt6.QDragLeaveEvent)) { + C.QsciScintillaBase_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DragLeaveEvent +func miqt_exec_callback_QsciScintillaBase_DragLeaveEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragLeaveEvent), e *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DragMoveEvent(e *qt6.QDragMoveEvent) { + + C.QsciScintillaBase_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDragMoveEvent(slot func(super func(e *qt6.QDragMoveEvent), e *qt6.QDragMoveEvent)) { + C.QsciScintillaBase_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DragMoveEvent +func miqt_exec_callback_QsciScintillaBase_DragMoveEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragMoveEvent), e *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_DropEvent(e *qt6.QDropEvent) { + + C.QsciScintillaBase_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnDropEvent(slot func(super func(e *qt6.QDropEvent), e *qt6.QDropEvent)) { + C.QsciScintillaBase_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_DropEvent +func miqt_exec_callback_QsciScintillaBase_DropEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDropEvent), e *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_FocusInEvent(e *qt6.QFocusEvent) { + + C.QsciScintillaBase_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnFocusInEvent(slot func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) { + C.QsciScintillaBase_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FocusInEvent +func miqt_exec_callback_QsciScintillaBase_FocusInEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_FocusOutEvent(e *qt6.QFocusEvent) { + + C.QsciScintillaBase_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnFocusOutEvent(slot func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) { + C.QsciScintillaBase_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FocusOutEvent +func miqt_exec_callback_QsciScintillaBase_FocusOutEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QFocusEvent), e *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QsciScintillaBase) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QsciScintillaBase_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_FocusNextPrevChild +func miqt_exec_callback_QsciScintillaBase_FocusNextPrevChild(self *C.QsciScintillaBase, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_KeyPressEvent(e *qt6.QKeyEvent) { + + C.QsciScintillaBase_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnKeyPressEvent(slot func(super func(e *qt6.QKeyEvent), e *qt6.QKeyEvent)) { + C.QsciScintillaBase_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_KeyPressEvent +func miqt_exec_callback_QsciScintillaBase_KeyPressEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QKeyEvent), e *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_InputMethodEvent(event *qt6.QInputMethodEvent) { + + C.QsciScintillaBase_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(event.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnInputMethodEvent(slot func(super func(event *qt6.QInputMethodEvent), event *qt6.QInputMethodEvent)) { + C.QsciScintillaBase_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_InputMethodEvent +func miqt_exec_callback_QsciScintillaBase_InputMethodEvent(self *C.QsciScintillaBase, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QInputMethodEvent), event *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_InputMethodQuery(query qt6.InputMethodQuery) *qt6.QVariant { + + _ret := C.QsciScintillaBase_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnInputMethodQuery(slot func(super func(query qt6.InputMethodQuery) *qt6.QVariant, query qt6.InputMethodQuery) *qt6.QVariant) { + C.QsciScintillaBase_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_InputMethodQuery +func miqt_exec_callback_QsciScintillaBase_InputMethodQuery(self *C.QsciScintillaBase, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt6.InputMethodQuery) *qt6.QVariant, query qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(query) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_MouseDoubleClickEvent(e *qt6.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMouseDoubleClickEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent +func miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_MouseMoveEvent(e *qt6.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMouseMoveEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MouseMoveEvent +func miqt_exec_callback_QsciScintillaBase_MouseMoveEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_MousePressEvent(e *qt6.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMousePressEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MousePressEvent +func miqt_exec_callback_QsciScintillaBase_MousePressEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_MouseReleaseEvent(e *qt6.QMouseEvent) { + + C.QsciScintillaBase_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnMouseReleaseEvent(slot func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) { + C.QsciScintillaBase_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent +func miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QMouseEvent), e *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_PaintEvent(e *qt6.QPaintEvent) { + + C.QsciScintillaBase_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnPaintEvent(slot func(super func(e *qt6.QPaintEvent), e *qt6.QPaintEvent)) { + C.QsciScintillaBase_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_PaintEvent +func miqt_exec_callback_QsciScintillaBase_PaintEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QPaintEvent), e *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ResizeEvent(e *qt6.QResizeEvent) { + + C.QsciScintillaBase_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(e.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnResizeEvent(slot func(super func(e *qt6.QResizeEvent), e *qt6.QResizeEvent)) { + C.QsciScintillaBase_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ResizeEvent +func miqt_exec_callback_QsciScintillaBase_ResizeEvent(self *C.QsciScintillaBase, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QResizeEvent), e *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QsciScintillaBase_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QsciScintillaBase) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QsciScintillaBase_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ScrollContentsBy +func miqt_exec_callback_QsciScintillaBase_ScrollContentsBy(self *C.QsciScintillaBase, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QsciScintillaBase) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QsciScintillaBase_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QsciScintillaBase_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_MinimumSizeHint +func miqt_exec_callback_QsciScintillaBase_MinimumSizeHint(self *C.QsciScintillaBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QsciScintillaBase_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QsciScintillaBase_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_SizeHint +func miqt_exec_callback_QsciScintillaBase_SizeHint(self *C.QsciScintillaBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciScintillaBase) callVirtualBase_SetupViewport(viewport *qt6.QWidget) { + + C.QsciScintillaBase_virtualbase_SetupViewport(unsafe.Pointer(this.h), (*C.QWidget)(viewport.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnSetupViewport(slot func(super func(viewport *qt6.QWidget), viewport *qt6.QWidget)) { + C.QsciScintillaBase_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_SetupViewport +func miqt_exec_callback_QsciScintillaBase_SetupViewport(self *C.QsciScintillaBase, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *qt6.QWidget), viewport *qt6.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_EventFilter(param1 *qt6.QObject, param2 *qt6.QEvent) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnEventFilter(slot func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) { + C.QsciScintillaBase_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_EventFilter +func miqt_exec_callback_QsciScintillaBase_EventFilter(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_Event(param1 *qt6.QEvent) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnEvent(slot func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) { + C.QsciScintillaBase_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_Event +func miqt_exec_callback_QsciScintillaBase_Event(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_ViewportEvent(param1 *qt6.QEvent) bool { + + return (bool)(C.QsciScintillaBase_virtualbase_ViewportEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QsciScintillaBase) OnViewportEvent(slot func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) { + C.QsciScintillaBase_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ViewportEvent +func miqt_exec_callback_QsciScintillaBase_ViewportEvent(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciScintillaBase) callVirtualBase_WheelEvent(param1 *qt6.QWheelEvent) { + + C.QsciScintillaBase_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(param1.UnsafePointer())) + +} +func (this *QsciScintillaBase) OnWheelEvent(slot func(super func(param1 *qt6.QWheelEvent), param1 *qt6.QWheelEvent)) { + C.QsciScintillaBase_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_WheelEvent +func miqt_exec_callback_QsciScintillaBase_WheelEvent(self *C.QsciScintillaBase, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QWheelEvent), param1 *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QsciScintillaBase{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QsciScintillaBase) callVirtualBase_ViewportSizeHint() *qt6.QSize { + + _ret := C.QsciScintillaBase_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QsciScintillaBase) OnViewportSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QsciScintillaBase_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciScintillaBase_ViewportSizeHint +func miqt_exec_callback_QsciScintillaBase_ViewportSizeHint(self *C.QsciScintillaBase, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ViewportSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + // Delete this object from C++ memory. func (this *QsciScintillaBase) Delete() { - C.QsciScintillaBase_Delete(this.h) + C.QsciScintillaBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h index 315af59e..8fb805b9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h @@ -15,31 +15,73 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QByteArray; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QImage; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPainter; class QPixmap; class QRect; +class QResizeEvent; class QScrollBar; +class QSize; class QUrl; +class QVariant; +class QWheelEvent; class QWidget; class QsciScintillaBase; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QByteArray QByteArray; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QImage QImage; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QScrollBar QScrollBar; +typedef struct QSize QSize; typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QsciScintillaBase QsciScintillaBase; #endif -QsciScintillaBase* QsciScintillaBase_new(QWidget* parent); -QsciScintillaBase* QsciScintillaBase_new2(); +void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self); void* QsciScintillaBase_Metacast(QsciScintillaBase* self, const char* param1); struct miqt_string QsciScintillaBase_Tr(const char* s); @@ -133,11 +175,93 @@ void QsciScintillaBase_SCN_USERLISTSELECTION3(QsciScintillaBase* self, const cha void QsciScintillaBase_connect_SCN_USERLISTSELECTION3(QsciScintillaBase* self, intptr_t slot); void QsciScintillaBase_SCN_ZOOM(QsciScintillaBase* self); void QsciScintillaBase_connect_SCN_ZOOM(QsciScintillaBase* self, intptr_t slot); +bool QsciScintillaBase_CanInsertFromMimeData(const QsciScintillaBase* self, QMimeData* source); +struct miqt_string QsciScintillaBase_FromMimeData(const QsciScintillaBase* self, QMimeData* source, bool* rectangular); +QMimeData* QsciScintillaBase_ToMimeData(const QsciScintillaBase* self, struct miqt_string text, bool rectangular); +void QsciScintillaBase_ChangeEvent(QsciScintillaBase* self, QEvent* e); +void QsciScintillaBase_ContextMenuEvent(QsciScintillaBase* self, QContextMenuEvent* e); +void QsciScintillaBase_DragEnterEvent(QsciScintillaBase* self, QDragEnterEvent* e); +void QsciScintillaBase_DragLeaveEvent(QsciScintillaBase* self, QDragLeaveEvent* e); +void QsciScintillaBase_DragMoveEvent(QsciScintillaBase* self, QDragMoveEvent* e); +void QsciScintillaBase_DropEvent(QsciScintillaBase* self, QDropEvent* e); +void QsciScintillaBase_FocusInEvent(QsciScintillaBase* self, QFocusEvent* e); +void QsciScintillaBase_FocusOutEvent(QsciScintillaBase* self, QFocusEvent* e); +bool QsciScintillaBase_FocusNextPrevChild(QsciScintillaBase* self, bool next); +void QsciScintillaBase_KeyPressEvent(QsciScintillaBase* self, QKeyEvent* e); +void QsciScintillaBase_InputMethodEvent(QsciScintillaBase* self, QInputMethodEvent* event); +QVariant* QsciScintillaBase_InputMethodQuery(const QsciScintillaBase* self, int query); +void QsciScintillaBase_MouseDoubleClickEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_MouseMoveEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_MousePressEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_MouseReleaseEvent(QsciScintillaBase* self, QMouseEvent* e); +void QsciScintillaBase_PaintEvent(QsciScintillaBase* self, QPaintEvent* e); +void QsciScintillaBase_ResizeEvent(QsciScintillaBase* self, QResizeEvent* e); +void QsciScintillaBase_ScrollContentsBy(QsciScintillaBase* self, int dx, int dy); struct miqt_string QsciScintillaBase_Tr2(const char* s, const char* c); struct miqt_string QsciScintillaBase_Tr3(const char* s, const char* c, int n); long QsciScintillaBase_SendScintilla22(const QsciScintillaBase* self, unsigned int msg, unsigned long wParam); long QsciScintillaBase_SendScintilla32(const QsciScintillaBase* self, unsigned int msg, unsigned long wParam, long lParam); -void QsciScintillaBase_Delete(QsciScintillaBase* self); +void QsciScintillaBase_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QsciScintillaBase_override_virtual_FromMimeData(void* self, intptr_t slot); +struct miqt_string QsciScintillaBase_virtualbase_FromMimeData(const void* self, QMimeData* source, bool* rectangular); +void QsciScintillaBase_override_virtual_ToMimeData(void* self, intptr_t slot); +QMimeData* QsciScintillaBase_virtualbase_ToMimeData(const void* self, struct miqt_string text, bool rectangular); +void QsciScintillaBase_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ChangeEvent(void* self, QEvent* e); +void QsciScintillaBase_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QsciScintillaBase_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QsciScintillaBase_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QsciScintillaBase_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QsciScintillaBase_override_virtual_DropEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_DropEvent(void* self, QDropEvent* e); +void QsciScintillaBase_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QsciScintillaBase_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QsciScintillaBase_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_FocusNextPrevChild(void* self, bool next); +void QsciScintillaBase_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QsciScintillaBase_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QsciScintillaBase_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QsciScintillaBase_virtualbase_InputMethodQuery(const void* self, int query); +void QsciScintillaBase_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QsciScintillaBase_override_virtual_PaintEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QsciScintillaBase_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QsciScintillaBase_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QsciScintillaBase_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QsciScintillaBase_virtualbase_MinimumSizeHint(const void* self); +void QsciScintillaBase_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QsciScintillaBase_virtualbase_SizeHint(const void* self); +void QsciScintillaBase_override_virtual_SetupViewport(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QsciScintillaBase_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QsciScintillaBase_override_virtual_Event(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_Event(void* self, QEvent* param1); +void QsciScintillaBase_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QsciScintillaBase_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QsciScintillaBase_override_virtual_WheelEvent(void* self, intptr_t slot); +void QsciScintillaBase_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QsciScintillaBase_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QsciScintillaBase_virtualbase_ViewportSizeHint(const void* self); +void QsciScintillaBase_Delete(QsciScintillaBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp b/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp index 54431f91..629e0cf9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp @@ -7,26 +7,31 @@ #include "gen_qscistyle.h" #include "_cgo_export.h" -QsciStyle* QsciStyle_new() { - return new QsciStyle(); +void QsciStyle_new(QsciStyle** outptr_QsciStyle) { + QsciStyle* ret = new QsciStyle(); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font) { +void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle) { QString description_QString = QString::fromUtf8(description.data, description.len); - return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); + QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new3(QsciStyle* param1) { - return new QsciStyle(*param1); +void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle) { + QsciStyle* ret = new QsciStyle(*param1); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new4(int style) { - return new QsciStyle(static_cast(style)); +void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle) { + QsciStyle* ret = new QsciStyle(static_cast(style)); + *outptr_QsciStyle = ret; } -QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill) { +void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle) { QString description_QString = QString::fromUtf8(description.data, description.len); - return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); + QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); + *outptr_QsciStyle = ret; } void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci) { @@ -126,7 +131,11 @@ void QsciStyle_Refresh(QsciStyle* self) { self->refresh(); } -void QsciStyle_Delete(QsciStyle* self) { - delete self; +void QsciStyle_Delete(QsciStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyle.go b/qt-restricted-extras/qscintilla6/gen_qscistyle.go index face64cf..0e94c677 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyle.go +++ b/qt-restricted-extras/qscintilla6/gen_qscistyle.go @@ -23,7 +23,8 @@ const ( ) type QsciStyle struct { - h *C.QsciStyle + h *C.QsciStyle + isSubclass bool } func (this *QsciStyle) cPointer() *C.QsciStyle { @@ -40,6 +41,7 @@ func (this *QsciStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciStyle constructs the type using only CGO pointers. func newQsciStyle(h *C.QsciStyle) *QsciStyle { if h == nil { return nil @@ -47,14 +49,23 @@ func newQsciStyle(h *C.QsciStyle) *QsciStyle { return &QsciStyle{h: h} } +// UnsafeNewQsciStyle constructs the type using only unsafe pointers. func UnsafeNewQsciStyle(h unsafe.Pointer) *QsciStyle { - return newQsciStyle((*C.QsciStyle)(h)) + if h == nil { + return nil + } + + return &QsciStyle{h: (*C.QsciStyle)(h)} } // NewQsciStyle constructs a new QsciStyle object. func NewQsciStyle() *QsciStyle { - ret := C.QsciStyle_new() - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new(&outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle2 constructs a new QsciStyle object. @@ -63,20 +74,32 @@ func NewQsciStyle2(style int, description string, color *qt6.QColor, paper *qt6. description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer())) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle3 constructs a new QsciStyle object. func NewQsciStyle3(param1 *QsciStyle) *QsciStyle { - ret := C.QsciStyle_new3(param1.cPointer()) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new3(param1.cPointer(), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle4 constructs a new QsciStyle object. func NewQsciStyle4(style int) *QsciStyle { - ret := C.QsciStyle_new4((C.int)(style)) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new4((C.int)(style), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } // NewQsciStyle5 constructs a new QsciStyle object. @@ -85,8 +108,12 @@ func NewQsciStyle5(style int, description string, color *qt6.QColor, paper *qt6. description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill)) - return newQsciStyle(ret) + var outptr_QsciStyle *C.QsciStyle = nil + + C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill), &outptr_QsciStyle) + ret := newQsciStyle(outptr_QsciStyle) + ret.isSubclass = true + return ret } func (this *QsciStyle) Apply(sci *QsciScintillaBase) { @@ -195,7 +222,7 @@ func (this *QsciStyle) Refresh() { // Delete this object from C++ memory. func (this *QsciStyle) Delete() { - C.QsciStyle_Delete(this.h) + C.QsciStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyle.h b/qt-restricted-extras/qscintilla6/gen_qscistyle.h index 36188b0d..2d658afa 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyle.h +++ b/qt-restricted-extras/qscintilla6/gen_qscistyle.h @@ -26,11 +26,11 @@ typedef struct QsciScintillaBase QsciScintillaBase; typedef struct QsciStyle QsciStyle; #endif -QsciStyle* QsciStyle_new(); -QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font); -QsciStyle* QsciStyle_new3(QsciStyle* param1); -QsciStyle* QsciStyle_new4(int style); -QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill); +void QsciStyle_new(QsciStyle** outptr_QsciStyle); +void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle); +void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle); +void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle); +void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle); void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci); void QsciStyle_SetStyle(QsciStyle* self, int style); int QsciStyle_Style(const QsciStyle* self); @@ -53,7 +53,7 @@ bool QsciStyle_Changeable(const QsciStyle* self); void QsciStyle_SetHotspot(QsciStyle* self, bool hotspot); bool QsciStyle_Hotspot(const QsciStyle* self); void QsciStyle_Refresh(QsciStyle* self); -void QsciStyle_Delete(QsciStyle* self); +void QsciStyle_Delete(QsciStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp index bedaf71a..ff148966 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp @@ -5,18 +5,21 @@ #include "gen_qscistyledtext.h" #include "_cgo_export.h" -QsciStyledText* QsciStyledText_new(struct miqt_string text, int style) { +void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QsciStyledText(text_QString, static_cast(style)); + QsciStyledText* ret = new QsciStyledText(text_QString, static_cast(style)); + *outptr_QsciStyledText = ret; } -QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style) { +void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QsciStyledText(text_QString, *style); + QsciStyledText* ret = new QsciStyledText(text_QString, *style); + *outptr_QsciStyledText = ret; } -QsciStyledText* QsciStyledText_new3(QsciStyledText* param1) { - return new QsciStyledText(*param1); +void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText) { + QsciStyledText* ret = new QsciStyledText(*param1); + *outptr_QsciStyledText = ret; } void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci) { @@ -38,7 +41,11 @@ int QsciStyledText_Style(const QsciStyledText* self) { return self->style(); } -void QsciStyledText_Delete(QsciStyledText* self) { - delete self; +void QsciStyledText_Delete(QsciStyledText* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go index d96245d2..14f27cc1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go +++ b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go @@ -14,7 +14,8 @@ import ( ) type QsciStyledText struct { - h *C.QsciStyledText + h *C.QsciStyledText + isSubclass bool } func (this *QsciStyledText) cPointer() *C.QsciStyledText { @@ -31,6 +32,7 @@ func (this *QsciStyledText) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQsciStyledText constructs the type using only CGO pointers. func newQsciStyledText(h *C.QsciStyledText) *QsciStyledText { if h == nil { return nil @@ -38,8 +40,13 @@ func newQsciStyledText(h *C.QsciStyledText) *QsciStyledText { return &QsciStyledText{h: h} } +// UnsafeNewQsciStyledText constructs the type using only unsafe pointers. func UnsafeNewQsciStyledText(h unsafe.Pointer) *QsciStyledText { - return newQsciStyledText((*C.QsciStyledText)(h)) + if h == nil { + return nil + } + + return &QsciStyledText{h: (*C.QsciStyledText)(h)} } // NewQsciStyledText constructs a new QsciStyledText object. @@ -48,8 +55,12 @@ func NewQsciStyledText(text string, style int) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QsciStyledText_new(text_ms, (C.int)(style)) - return newQsciStyledText(ret) + var outptr_QsciStyledText *C.QsciStyledText = nil + + C.QsciStyledText_new(text_ms, (C.int)(style), &outptr_QsciStyledText) + ret := newQsciStyledText(outptr_QsciStyledText) + ret.isSubclass = true + return ret } // NewQsciStyledText2 constructs a new QsciStyledText object. @@ -58,14 +69,22 @@ func NewQsciStyledText2(text string, style *QsciStyle) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QsciStyledText_new2(text_ms, style.cPointer()) - return newQsciStyledText(ret) + var outptr_QsciStyledText *C.QsciStyledText = nil + + C.QsciStyledText_new2(text_ms, style.cPointer(), &outptr_QsciStyledText) + ret := newQsciStyledText(outptr_QsciStyledText) + ret.isSubclass = true + return ret } // NewQsciStyledText3 constructs a new QsciStyledText object. func NewQsciStyledText3(param1 *QsciStyledText) *QsciStyledText { - ret := C.QsciStyledText_new3(param1.cPointer()) - return newQsciStyledText(ret) + var outptr_QsciStyledText *C.QsciStyledText = nil + + C.QsciStyledText_new3(param1.cPointer(), &outptr_QsciStyledText) + ret := newQsciStyledText(outptr_QsciStyledText) + ret.isSubclass = true + return ret } func (this *QsciStyledText) Apply(sci *QsciScintillaBase) { @@ -85,7 +104,7 @@ func (this *QsciStyledText) Style() int { // Delete this object from C++ memory. func (this *QsciStyledText) Delete() { - C.QsciStyledText_Delete(this.h) + C.QsciStyledText_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h index 1751f3eb..401c4840 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h +++ b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h @@ -24,13 +24,13 @@ typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -QsciStyledText* QsciStyledText_new(struct miqt_string text, int style); -QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style); -QsciStyledText* QsciStyledText_new3(QsciStyledText* param1); +void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText); +void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText); +void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText); void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci); struct miqt_string QsciStyledText_Text(const QsciStyledText* self); int QsciStyledText_Style(const QsciStyledText* self); -void QsciStyledText_Delete(QsciStyledText* self); +void QsciStyledText_Delete(QsciStyledText* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/cbor/gen_qcborarray.cpp b/qt/cbor/gen_qcborarray.cpp index 6fdc4350..42938fbd 100644 --- a/qt/cbor/gen_qcborarray.cpp +++ b/qt/cbor/gen_qcborarray.cpp @@ -12,12 +12,14 @@ #include "gen_qcborarray.h" #include "_cgo_export.h" -QCborArray* QCborArray_new() { - return new QCborArray(); +void QCborArray_new(QCborArray** outptr_QCborArray) { + QCborArray* ret = new QCborArray(); + *outptr_QCborArray = ret; } -QCborArray* QCborArray_new2(QCborArray* other) { - return new QCborArray(*other); +void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray) { + QCborArray* ret = new QCborArray(*other); + *outptr_QCborArray = ret; } void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other) { @@ -240,16 +242,22 @@ QJsonArray* QCborArray_ToJsonArray(const QCborArray* self) { return new QJsonArray(self->toJsonArray()); } -void QCborArray_Delete(QCborArray* self) { - delete self; +void QCborArray_Delete(QCborArray* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborArray__Iterator* QCborArray__Iterator_new() { - return new QCborArray::Iterator(); +void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator) { + QCborArray::Iterator* ret = new QCborArray::Iterator(); + *outptr_QCborArray__Iterator = ret; } -QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1) { - return new QCborArray::Iterator(*param1); +void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator) { + QCborArray::Iterator* ret = new QCborArray::Iterator(*param1); + *outptr_QCborArray__Iterator = ret; } void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other) { @@ -361,16 +369,22 @@ ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborAr return static_cast(_ret); } -void QCborArray__Iterator_Delete(QCborArray__Iterator* self) { - delete self; +void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborArray__ConstIterator* QCborArray__ConstIterator_new() { - return new QCborArray::ConstIterator(); +void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { + QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(); + *outptr_QCborArray__ConstIterator = ret; } -QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1) { - return new QCborArray::ConstIterator(*param1); +void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { + QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(*param1); + *outptr_QCborArray__ConstIterator = ret; } void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other) { @@ -482,7 +496,11 @@ ptrdiff_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(con return static_cast(_ret); } -void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self) { - delete self; +void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/cbor/gen_qcborarray.go b/qt/cbor/gen_qcborarray.go index 7a523bd6..0ddde419 100644 --- a/qt/cbor/gen_qcborarray.go +++ b/qt/cbor/gen_qcborarray.go @@ -15,7 +15,8 @@ import ( ) type QCborArray struct { - h *C.QCborArray + h *C.QCborArray + isSubclass bool } func (this *QCborArray) cPointer() *C.QCborArray { @@ -32,6 +33,7 @@ func (this *QCborArray) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborArray constructs the type using only CGO pointers. func newQCborArray(h *C.QCborArray) *QCborArray { if h == nil { return nil @@ -39,20 +41,33 @@ func newQCborArray(h *C.QCborArray) *QCborArray { return &QCborArray{h: h} } +// UnsafeNewQCborArray constructs the type using only unsafe pointers. func UnsafeNewQCborArray(h unsafe.Pointer) *QCborArray { - return newQCborArray((*C.QCborArray)(h)) + if h == nil { + return nil + } + + return &QCborArray{h: (*C.QCborArray)(h)} } // NewQCborArray constructs a new QCborArray object. func NewQCborArray() *QCborArray { - ret := C.QCborArray_new() - return newQCborArray(ret) + var outptr_QCborArray *C.QCborArray = nil + + C.QCborArray_new(&outptr_QCborArray) + ret := newQCborArray(outptr_QCborArray) + ret.isSubclass = true + return ret } // NewQCborArray2 constructs a new QCborArray object. func NewQCborArray2(other *QCborArray) *QCborArray { - ret := C.QCborArray_new2(other.cPointer()) - return newQCborArray(ret) + var outptr_QCborArray *C.QCborArray = nil + + C.QCborArray_new2(other.cPointer(), &outptr_QCborArray) + ret := newQCborArray(outptr_QCborArray) + ret.isSubclass = true + return ret } func (this *QCborArray) OperatorAssign(other *QCborArray) { @@ -362,7 +377,7 @@ func (this *QCborArray) ToJsonArray() *qt.QJsonArray { // Delete this object from C++ memory. func (this *QCborArray) Delete() { - C.QCborArray_Delete(this.h) + C.QCborArray_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -375,7 +390,8 @@ func (this *QCborArray) GoGC() { } type QCborArray__Iterator struct { - h *C.QCborArray__Iterator + h *C.QCborArray__Iterator + isSubclass bool } func (this *QCborArray__Iterator) cPointer() *C.QCborArray__Iterator { @@ -392,6 +408,7 @@ func (this *QCborArray__Iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborArray__Iterator constructs the type using only CGO pointers. func newQCborArray__Iterator(h *C.QCborArray__Iterator) *QCborArray__Iterator { if h == nil { return nil @@ -399,20 +416,33 @@ func newQCborArray__Iterator(h *C.QCborArray__Iterator) *QCborArray__Iterator { return &QCborArray__Iterator{h: h} } +// UnsafeNewQCborArray__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__Iterator(h unsafe.Pointer) *QCborArray__Iterator { - return newQCborArray__Iterator((*C.QCborArray__Iterator)(h)) + if h == nil { + return nil + } + + return &QCborArray__Iterator{h: (*C.QCborArray__Iterator)(h)} } // NewQCborArray__Iterator constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator() *QCborArray__Iterator { - ret := C.QCborArray__Iterator_new() - return newQCborArray__Iterator(ret) + var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil + + C.QCborArray__Iterator_new(&outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret.isSubclass = true + return ret } // NewQCborArray__Iterator2 constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator2(param1 *QCborArray__Iterator) *QCborArray__Iterator { - ret := C.QCborArray__Iterator_new2(param1.cPointer()) - return newQCborArray__Iterator(ret) + var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil + + C.QCborArray__Iterator_new2(param1.cPointer(), &outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret.isSubclass = true + return ret } func (this *QCborArray__Iterator) OperatorAssign(other *QCborArray__Iterator) { @@ -535,7 +565,7 @@ func (this *QCborArray__Iterator) OperatorMinusWithQCborArrayIterator(j QCborArr // Delete this object from C++ memory. func (this *QCborArray__Iterator) Delete() { - C.QCborArray__Iterator_Delete(this.h) + C.QCborArray__Iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -548,7 +578,8 @@ func (this *QCborArray__Iterator) GoGC() { } type QCborArray__ConstIterator struct { - h *C.QCborArray__ConstIterator + h *C.QCborArray__ConstIterator + isSubclass bool } func (this *QCborArray__ConstIterator) cPointer() *C.QCborArray__ConstIterator { @@ -565,6 +596,7 @@ func (this *QCborArray__ConstIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborArray__ConstIterator constructs the type using only CGO pointers. func newQCborArray__ConstIterator(h *C.QCborArray__ConstIterator) *QCborArray__ConstIterator { if h == nil { return nil @@ -572,20 +604,33 @@ func newQCborArray__ConstIterator(h *C.QCborArray__ConstIterator) *QCborArray__C return &QCborArray__ConstIterator{h: h} } +// UnsafeNewQCborArray__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__ConstIterator(h unsafe.Pointer) *QCborArray__ConstIterator { - return newQCborArray__ConstIterator((*C.QCborArray__ConstIterator)(h)) + if h == nil { + return nil + } + + return &QCborArray__ConstIterator{h: (*C.QCborArray__ConstIterator)(h)} } // NewQCborArray__ConstIterator constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator() *QCborArray__ConstIterator { - ret := C.QCborArray__ConstIterator_new() - return newQCborArray__ConstIterator(ret) + var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil + + C.QCborArray__ConstIterator_new(&outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret.isSubclass = true + return ret } // NewQCborArray__ConstIterator2 constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator2(param1 *QCborArray__ConstIterator) *QCborArray__ConstIterator { - ret := C.QCborArray__ConstIterator_new2(param1.cPointer()) - return newQCborArray__ConstIterator(ret) + var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil + + C.QCborArray__ConstIterator_new2(param1.cPointer(), &outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret.isSubclass = true + return ret } func (this *QCborArray__ConstIterator) OperatorAssign(other *QCborArray__ConstIterator) { @@ -708,7 +753,7 @@ func (this *QCborArray__ConstIterator) OperatorMinusWithQCborArrayConstIterator( // Delete this object from C++ memory. func (this *QCborArray__ConstIterator) Delete() { - C.QCborArray__ConstIterator_Delete(this.h) + C.QCborArray__ConstIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/cbor/gen_qcborarray.h b/qt/cbor/gen_qcborarray.h index cb6bb750..cefe413e 100644 --- a/qt/cbor/gen_qcborarray.h +++ b/qt/cbor/gen_qcborarray.h @@ -38,8 +38,8 @@ typedef struct QCborValueRef QCborValueRef; typedef struct QJsonArray QJsonArray; #endif -QCborArray* QCborArray_new(); -QCborArray* QCborArray_new2(QCborArray* other); +void QCborArray_new(QCborArray** outptr_QCborArray); +void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray); void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other); void QCborArray_Swap(QCborArray* self, QCborArray* other); QCborValue* QCborArray_ToCborValue(const QCborArray* self); @@ -92,10 +92,10 @@ QCborArray* QCborArray_OperatorShiftLeft(QCborArray* self, QCborValue* v); QCborArray* QCborArray_FromStringList(struct miqt_array /* of struct miqt_string */ list); QCborArray* QCborArray_FromJsonArray(QJsonArray* array); QJsonArray* QCborArray_ToJsonArray(const QCborArray* self); -void QCborArray_Delete(QCborArray* self); +void QCborArray_Delete(QCborArray* self, bool isSubclass); -QCborArray__Iterator* QCborArray__Iterator_new(); -QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1); +void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator); +void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator); void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other); QCborValueRef* QCborArray__Iterator_OperatorMultiply(const QCborArray__Iterator* self); QCborValueRef* QCborArray__Iterator_OperatorMinusGreater(const QCborArray__Iterator* self); @@ -121,10 +121,10 @@ QCborArray__Iterator* QCborArray__Iterator_OperatorMinusAssign(QCborArray__Itera QCborArray__Iterator* QCborArray__Iterator_OperatorPlus(const QCborArray__Iterator* self, ptrdiff_t j); QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Iterator* self, ptrdiff_t j); ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j); -void QCborArray__Iterator_Delete(QCborArray__Iterator* self); +void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass); -QCborArray__ConstIterator* QCborArray__ConstIterator_new(); -QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1); +void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); +void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other); QCborValueRef* QCborArray__ConstIterator_OperatorMultiply(const QCborArray__ConstIterator* self); QCborValueRef* QCborArray__ConstIterator_OperatorMinusGreater(const QCborArray__ConstIterator* self); @@ -150,7 +150,7 @@ QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusAssign(QCborAr QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlus(const QCborArray__ConstIterator* self, ptrdiff_t j); QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinus(const QCborArray__ConstIterator* self, ptrdiff_t j); ptrdiff_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(const QCborArray__ConstIterator* self, QCborArray__ConstIterator* j); -void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self); +void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/cbor/gen_qcborcommon.cpp b/qt/cbor/gen_qcborcommon.cpp index 8224dc8e..354b359d 100644 --- a/qt/cbor/gen_qcborcommon.cpp +++ b/qt/cbor/gen_qcborcommon.cpp @@ -17,7 +17,11 @@ struct miqt_string QCborError_ToString(const QCborError* self) { return _ms; } -void QCborError_Delete(QCborError* self) { - delete self; +void QCborError_Delete(QCborError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/cbor/gen_qcborcommon.go b/qt/cbor/gen_qcborcommon.go index e1e52613..0d415e35 100644 --- a/qt/cbor/gen_qcborcommon.go +++ b/qt/cbor/gen_qcborcommon.go @@ -75,7 +75,8 @@ const ( ) type QCborError struct { - h *C.QCborError + h *C.QCborError + isSubclass bool } func (this *QCborError) cPointer() *C.QCborError { @@ -92,6 +93,7 @@ func (this *QCborError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborError constructs the type using only CGO pointers. func newQCborError(h *C.QCborError) *QCborError { if h == nil { return nil @@ -99,8 +101,13 @@ func newQCborError(h *C.QCborError) *QCborError { return &QCborError{h: h} } +// UnsafeNewQCborError constructs the type using only unsafe pointers. func UnsafeNewQCborError(h unsafe.Pointer) *QCborError { - return newQCborError((*C.QCborError)(h)) + if h == nil { + return nil + } + + return &QCborError{h: (*C.QCborError)(h)} } func (this *QCborError) ToString() string { @@ -112,7 +119,7 @@ func (this *QCborError) ToString() string { // Delete this object from C++ memory. func (this *QCborError) Delete() { - C.QCborError_Delete(this.h) + C.QCborError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/cbor/gen_qcborcommon.h b/qt/cbor/gen_qcborcommon.h index ebec2e6a..fe046c62 100644 --- a/qt/cbor/gen_qcborcommon.h +++ b/qt/cbor/gen_qcborcommon.h @@ -21,7 +21,7 @@ typedef struct QCborError QCborError; #endif struct miqt_string QCborError_ToString(const QCborError* self); -void QCborError_Delete(QCborError* self); +void QCborError_Delete(QCborError* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/cbor/gen_qcbormap.cpp b/qt/cbor/gen_qcbormap.cpp index 7ce888bf..f8fb9399 100644 --- a/qt/cbor/gen_qcbormap.cpp +++ b/qt/cbor/gen_qcbormap.cpp @@ -14,12 +14,14 @@ #include "gen_qcbormap.h" #include "_cgo_export.h" -QCborMap* QCborMap_new() { - return new QCborMap(); +void QCborMap_new(QCborMap** outptr_QCborMap) { + QCborMap* ret = new QCborMap(); + *outptr_QCborMap = ret; } -QCborMap* QCborMap_new2(QCborMap* other) { - return new QCborMap(*other); +void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap) { + QCborMap* ret = new QCborMap(*other); + *outptr_QCborMap = ret; } void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other) { @@ -348,16 +350,22 @@ QJsonObject* QCborMap_ToJsonObject(const QCborMap* self) { return new QJsonObject(self->toJsonObject()); } -void QCborMap_Delete(QCborMap* self) { - delete self; +void QCborMap_Delete(QCborMap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborMap__Iterator* QCborMap__Iterator_new() { - return new QCborMap::Iterator(); +void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator) { + QCborMap::Iterator* ret = new QCborMap::Iterator(); + *outptr_QCborMap__Iterator = ret; } -QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1) { - return new QCborMap::Iterator(*param1); +void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator) { + QCborMap::Iterator* ret = new QCborMap::Iterator(*param1); + *outptr_QCborMap__Iterator = ret; } void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other) { @@ -483,16 +491,22 @@ ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__I return static_cast(_ret); } -void QCborMap__Iterator_Delete(QCborMap__Iterator* self) { - delete self; +void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborMap__ConstIterator* QCborMap__ConstIterator_new() { - return new QCborMap::ConstIterator(); +void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { + QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(); + *outptr_QCborMap__ConstIterator = ret; } -QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1) { - return new QCborMap::ConstIterator(*param1); +void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { + QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(*param1); + *outptr_QCborMap__ConstIterator = ret; } void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other) { @@ -618,7 +632,11 @@ ptrdiff_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const Q return static_cast(_ret); } -void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self) { - delete self; +void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/cbor/gen_qcbormap.go b/qt/cbor/gen_qcbormap.go index 5590095d..eb3dbcce 100644 --- a/qt/cbor/gen_qcbormap.go +++ b/qt/cbor/gen_qcbormap.go @@ -15,7 +15,8 @@ import ( ) type QCborMap struct { - h *C.QCborMap + h *C.QCborMap + isSubclass bool } func (this *QCborMap) cPointer() *C.QCborMap { @@ -32,6 +33,7 @@ func (this *QCborMap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborMap constructs the type using only CGO pointers. func newQCborMap(h *C.QCborMap) *QCborMap { if h == nil { return nil @@ -39,20 +41,33 @@ func newQCborMap(h *C.QCborMap) *QCborMap { return &QCborMap{h: h} } +// UnsafeNewQCborMap constructs the type using only unsafe pointers. func UnsafeNewQCborMap(h unsafe.Pointer) *QCborMap { - return newQCborMap((*C.QCborMap)(h)) + if h == nil { + return nil + } + + return &QCborMap{h: (*C.QCborMap)(h)} } // NewQCborMap constructs a new QCborMap object. func NewQCborMap() *QCborMap { - ret := C.QCborMap_new() - return newQCborMap(ret) + var outptr_QCborMap *C.QCborMap = nil + + C.QCborMap_new(&outptr_QCborMap) + ret := newQCborMap(outptr_QCborMap) + ret.isSubclass = true + return ret } // NewQCborMap2 constructs a new QCborMap object. func NewQCborMap2(other *QCborMap) *QCborMap { - ret := C.QCborMap_new2(other.cPointer()) - return newQCborMap(ret) + var outptr_QCborMap *C.QCborMap = nil + + C.QCborMap_new2(other.cPointer(), &outptr_QCborMap) + ret := newQCborMap(outptr_QCborMap) + ret.isSubclass = true + return ret } func (this *QCborMap) OperatorAssign(other *QCborMap) { @@ -560,7 +575,7 @@ func (this *QCborMap) ToJsonObject() *qt.QJsonObject { // Delete this object from C++ memory. func (this *QCborMap) Delete() { - C.QCborMap_Delete(this.h) + C.QCborMap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -573,7 +588,8 @@ func (this *QCborMap) GoGC() { } type QCborMap__Iterator struct { - h *C.QCborMap__Iterator + h *C.QCborMap__Iterator + isSubclass bool } func (this *QCborMap__Iterator) cPointer() *C.QCborMap__Iterator { @@ -590,6 +606,7 @@ func (this *QCborMap__Iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborMap__Iterator constructs the type using only CGO pointers. func newQCborMap__Iterator(h *C.QCborMap__Iterator) *QCborMap__Iterator { if h == nil { return nil @@ -597,20 +614,33 @@ func newQCborMap__Iterator(h *C.QCborMap__Iterator) *QCborMap__Iterator { return &QCborMap__Iterator{h: h} } +// UnsafeNewQCborMap__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__Iterator(h unsafe.Pointer) *QCborMap__Iterator { - return newQCborMap__Iterator((*C.QCborMap__Iterator)(h)) + if h == nil { + return nil + } + + return &QCborMap__Iterator{h: (*C.QCborMap__Iterator)(h)} } // NewQCborMap__Iterator constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator() *QCborMap__Iterator { - ret := C.QCborMap__Iterator_new() - return newQCborMap__Iterator(ret) + var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil + + C.QCborMap__Iterator_new(&outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret.isSubclass = true + return ret } // NewQCborMap__Iterator2 constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator2(param1 *QCborMap__Iterator) *QCborMap__Iterator { - ret := C.QCborMap__Iterator_new2(param1.cPointer()) - return newQCborMap__Iterator(ret) + var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil + + C.QCborMap__Iterator_new2(param1.cPointer(), &outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret.isSubclass = true + return ret } func (this *QCborMap__Iterator) OperatorAssign(other *QCborMap__Iterator) { @@ -756,7 +786,7 @@ func (this *QCborMap__Iterator) OperatorMinusWithQCborMapIterator(j QCborMap__It // Delete this object from C++ memory. func (this *QCborMap__Iterator) Delete() { - C.QCborMap__Iterator_Delete(this.h) + C.QCborMap__Iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -769,7 +799,8 @@ func (this *QCborMap__Iterator) GoGC() { } type QCborMap__ConstIterator struct { - h *C.QCborMap__ConstIterator + h *C.QCborMap__ConstIterator + isSubclass bool } func (this *QCborMap__ConstIterator) cPointer() *C.QCborMap__ConstIterator { @@ -786,6 +817,7 @@ func (this *QCborMap__ConstIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborMap__ConstIterator constructs the type using only CGO pointers. func newQCborMap__ConstIterator(h *C.QCborMap__ConstIterator) *QCborMap__ConstIterator { if h == nil { return nil @@ -793,20 +825,33 @@ func newQCborMap__ConstIterator(h *C.QCborMap__ConstIterator) *QCborMap__ConstIt return &QCborMap__ConstIterator{h: h} } +// UnsafeNewQCborMap__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__ConstIterator(h unsafe.Pointer) *QCborMap__ConstIterator { - return newQCborMap__ConstIterator((*C.QCborMap__ConstIterator)(h)) + if h == nil { + return nil + } + + return &QCborMap__ConstIterator{h: (*C.QCborMap__ConstIterator)(h)} } // NewQCborMap__ConstIterator constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator() *QCborMap__ConstIterator { - ret := C.QCborMap__ConstIterator_new() - return newQCborMap__ConstIterator(ret) + var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil + + C.QCborMap__ConstIterator_new(&outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret.isSubclass = true + return ret } // NewQCborMap__ConstIterator2 constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator2(param1 *QCborMap__ConstIterator) *QCborMap__ConstIterator { - ret := C.QCborMap__ConstIterator_new2(param1.cPointer()) - return newQCborMap__ConstIterator(ret) + var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil + + C.QCborMap__ConstIterator_new2(param1.cPointer(), &outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret.isSubclass = true + return ret } func (this *QCborMap__ConstIterator) OperatorAssign(other *QCborMap__ConstIterator) { @@ -952,7 +997,7 @@ func (this *QCborMap__ConstIterator) OperatorMinusWithQCborMapConstIterator(j QC // Delete this object from C++ memory. func (this *QCborMap__ConstIterator) Delete() { - C.QCborMap__ConstIterator_Delete(this.h) + C.QCborMap__ConstIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/cbor/gen_qcbormap.h b/qt/cbor/gen_qcbormap.h index 971a809b..15da0222 100644 --- a/qt/cbor/gen_qcbormap.h +++ b/qt/cbor/gen_qcbormap.h @@ -40,8 +40,8 @@ typedef struct QJsonObject QJsonObject; typedef struct QVariant QVariant; #endif -QCborMap* QCborMap_new(); -QCborMap* QCborMap_new2(QCborMap* other); +void QCborMap_new(QCborMap** outptr_QCborMap); +void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap); void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other); void QCborMap_Swap(QCborMap* self, QCborMap* other); QCborValue* QCborMap_ToCborValue(const QCborMap* self); @@ -103,10 +103,10 @@ QCborMap* QCborMap_FromJsonObject(QJsonObject* o); struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_ToVariantMap(const QCborMap* self); struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_ToVariantHash(const QCborMap* self); QJsonObject* QCborMap_ToJsonObject(const QCborMap* self); -void QCborMap_Delete(QCborMap* self); +void QCborMap_Delete(QCborMap* self, bool isSubclass); -QCborMap__Iterator* QCborMap__Iterator_new(); -QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1); +void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator); +void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator); void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other); struct miqt_map /* tuple of QCborValueRef* and QCborValueRef* */ QCborMap__Iterator_OperatorMultiply(const QCborMap__Iterator* self); QCborValueRef* QCborMap__Iterator_OperatorMinusGreater(const QCborMap__Iterator* self); @@ -133,10 +133,10 @@ QCborMap__Iterator* QCborMap__Iterator_OperatorMinusAssign(QCborMap__Iterator* s QCborMap__Iterator* QCborMap__Iterator_OperatorPlus(const QCborMap__Iterator* self, ptrdiff_t j); QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* self, ptrdiff_t j); ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j); -void QCborMap__Iterator_Delete(QCborMap__Iterator* self); +void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass); -QCborMap__ConstIterator* QCborMap__ConstIterator_new(); -QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1); +void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); +void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other); struct miqt_map /* tuple of QCborValueRef* and QCborValueRef* */ QCborMap__ConstIterator_OperatorMultiply(const QCborMap__ConstIterator* self); QCborValueRef* QCborMap__ConstIterator_OperatorMinusGreater(const QCborMap__ConstIterator* self); @@ -163,7 +163,7 @@ QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusAssign(QCborMap__C QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlus(const QCborMap__ConstIterator* self, ptrdiff_t j); QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinus(const QCborMap__ConstIterator* self, ptrdiff_t j); ptrdiff_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const QCborMap__ConstIterator* self, QCborMap__ConstIterator* j); -void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self); +void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/cbor/gen_qcborstreamreader.cpp b/qt/cbor/gen_qcborstreamreader.cpp index c42bf290..d60e7de0 100644 --- a/qt/cbor/gen_qcborstreamreader.cpp +++ b/qt/cbor/gen_qcborstreamreader.cpp @@ -6,25 +6,30 @@ #include "gen_qcborstreamreader.h" #include "_cgo_export.h" -QCborStreamReader* QCborStreamReader_new() { - return new QCborStreamReader(); +void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal) { - return new QCborStreamReader(data, (qsizetype)(lenVal)); +void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(data, (qsizetype)(lenVal)); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal) { - return new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); +void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new4(struct miqt_string data) { +void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader) { QByteArray data_QByteArray(data.data, data.len); - return new QCborStreamReader(data_QByteArray); + QCborStreamReader* ret = new QCborStreamReader(data_QByteArray); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new5(QIODevice* device) { - return new QCborStreamReader(device); +void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(device); + *outptr_QCborStreamReader = ret; } void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device) { @@ -238,7 +243,11 @@ bool QCborStreamReader_Next1(QCborStreamReader* self, int maxRecursion) { return self->next(static_cast(maxRecursion)); } -void QCborStreamReader_Delete(QCborStreamReader* self) { - delete self; +void QCborStreamReader_Delete(QCborStreamReader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/cbor/gen_qcborstreamreader.go b/qt/cbor/gen_qcborstreamreader.go index 57a5e1df..3280ab8c 100644 --- a/qt/cbor/gen_qcborstreamreader.go +++ b/qt/cbor/gen_qcborstreamreader.go @@ -43,7 +43,8 @@ const ( ) type QCborStreamReader struct { - h *C.QCborStreamReader + h *C.QCborStreamReader + isSubclass bool } func (this *QCborStreamReader) cPointer() *C.QCborStreamReader { @@ -60,6 +61,7 @@ func (this *QCborStreamReader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborStreamReader constructs the type using only CGO pointers. func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { if h == nil { return nil @@ -67,28 +69,45 @@ func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { return &QCborStreamReader{h: h} } +// UnsafeNewQCborStreamReader constructs the type using only unsafe pointers. func UnsafeNewQCborStreamReader(h unsafe.Pointer) *QCborStreamReader { - return newQCborStreamReader((*C.QCborStreamReader)(h)) + if h == nil { + return nil + } + + return &QCborStreamReader{h: (*C.QCborStreamReader)(h)} } // NewQCborStreamReader constructs a new QCborStreamReader object. func NewQCborStreamReader() *QCborStreamReader { - ret := C.QCborStreamReader_new() - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new(&outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader2 constructs a new QCborStreamReader object. func NewQCborStreamReader2(data string, lenVal int64) *QCborStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - ret := C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal)) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader3 constructs a new QCborStreamReader object. func NewQCborStreamReader3(data *byte, lenVal int64) *QCborStreamReader { - ret := C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal)) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader4 constructs a new QCborStreamReader object. @@ -96,14 +115,22 @@ func NewQCborStreamReader4(data []byte) *QCborStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QCborStreamReader_new4(data_alias) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new4(data_alias, &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader5 constructs a new QCborStreamReader object. func NewQCborStreamReader5(device *qt.QIODevice) *QCborStreamReader { - ret := C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer())) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } func (this *QCborStreamReader) SetDevice(device *qt.QIODevice) { @@ -111,7 +138,7 @@ func (this *QCborStreamReader) SetDevice(device *qt.QIODevice) { } func (this *QCborStreamReader) Device() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h)), nil) } func (this *QCborStreamReader) AddData(data []byte) { @@ -316,7 +343,7 @@ func (this *QCborStreamReader) Next1(maxRecursion int) bool { // Delete this object from C++ memory. func (this *QCborStreamReader) Delete() { - C.QCborStreamReader_Delete(this.h) + C.QCborStreamReader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/cbor/gen_qcborstreamreader.h b/qt/cbor/gen_qcborstreamreader.h index 428fc14e..6cc19cc2 100644 --- a/qt/cbor/gen_qcborstreamreader.h +++ b/qt/cbor/gen_qcborstreamreader.h @@ -26,11 +26,11 @@ typedef struct QCborStreamReader QCborStreamReader; typedef struct QIODevice QIODevice; #endif -QCborStreamReader* QCborStreamReader_new(); -QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal); -QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal); -QCborStreamReader* QCborStreamReader_new4(struct miqt_string data); -QCborStreamReader* QCborStreamReader_new5(QIODevice* device); +void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader); void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device); QIODevice* QCborStreamReader_Device(const QCborStreamReader* self); void QCborStreamReader_AddData(QCborStreamReader* self, struct miqt_string data); @@ -81,7 +81,7 @@ float QCborStreamReader_ToFloat(const QCborStreamReader* self); double QCborStreamReader_ToDouble(const QCborStreamReader* self); long long QCborStreamReader_ToInteger(const QCborStreamReader* self); bool QCborStreamReader_Next1(QCborStreamReader* self, int maxRecursion); -void QCborStreamReader_Delete(QCborStreamReader* self); +void QCborStreamReader_Delete(QCborStreamReader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/cbor/gen_qcborstreamwriter.cpp b/qt/cbor/gen_qcborstreamwriter.cpp index cabb533b..a629cd9c 100644 --- a/qt/cbor/gen_qcborstreamwriter.cpp +++ b/qt/cbor/gen_qcborstreamwriter.cpp @@ -5,8 +5,9 @@ #include "gen_qcborstreamwriter.h" #include "_cgo_export.h" -QCborStreamWriter* QCborStreamWriter_new(QIODevice* device) { - return new QCborStreamWriter(device); +void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter) { + QCborStreamWriter* ret = new QCborStreamWriter(device); + *outptr_QCborStreamWriter = ret; } void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device) { @@ -114,7 +115,11 @@ void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, ptrdif self->append(str, (qsizetype)(size)); } -void QCborStreamWriter_Delete(QCborStreamWriter* self) { - delete self; +void QCborStreamWriter_Delete(QCborStreamWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/cbor/gen_qcborstreamwriter.go b/qt/cbor/gen_qcborstreamwriter.go index 2a869139..df4a57d2 100644 --- a/qt/cbor/gen_qcborstreamwriter.go +++ b/qt/cbor/gen_qcborstreamwriter.go @@ -15,7 +15,8 @@ import ( ) type QCborStreamWriter struct { - h *C.QCborStreamWriter + h *C.QCborStreamWriter + isSubclass bool } func (this *QCborStreamWriter) cPointer() *C.QCborStreamWriter { @@ -32,6 +33,7 @@ func (this *QCborStreamWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborStreamWriter constructs the type using only CGO pointers. func newQCborStreamWriter(h *C.QCborStreamWriter) *QCborStreamWriter { if h == nil { return nil @@ -39,14 +41,23 @@ func newQCborStreamWriter(h *C.QCborStreamWriter) *QCborStreamWriter { return &QCborStreamWriter{h: h} } +// UnsafeNewQCborStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQCborStreamWriter(h unsafe.Pointer) *QCborStreamWriter { - return newQCborStreamWriter((*C.QCborStreamWriter)(h)) + if h == nil { + return nil + } + + return &QCborStreamWriter{h: (*C.QCborStreamWriter)(h)} } // NewQCborStreamWriter constructs a new QCborStreamWriter object. func NewQCborStreamWriter(device *qt.QIODevice) *QCborStreamWriter { - ret := C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer())) - return newQCborStreamWriter(ret) + var outptr_QCborStreamWriter *C.QCborStreamWriter = nil + + C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamWriter) + ret := newQCborStreamWriter(outptr_QCborStreamWriter) + ret.isSubclass = true + return ret } func (this *QCborStreamWriter) SetDevice(device *qt.QIODevice) { @@ -54,7 +65,7 @@ func (this *QCborStreamWriter) SetDevice(device *qt.QIODevice) { } func (this *QCborStreamWriter) Device() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h)), nil) } func (this *QCborStreamWriter) Append(u uint64) { @@ -166,7 +177,7 @@ func (this *QCborStreamWriter) Append22(str string, size int64) { // Delete this object from C++ memory. func (this *QCborStreamWriter) Delete() { - C.QCborStreamWriter_Delete(this.h) + C.QCborStreamWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/cbor/gen_qcborstreamwriter.h b/qt/cbor/gen_qcborstreamwriter.h index 56079a59..df9ac2e0 100644 --- a/qt/cbor/gen_qcborstreamwriter.h +++ b/qt/cbor/gen_qcborstreamwriter.h @@ -24,7 +24,7 @@ typedef struct QCborStreamWriter QCborStreamWriter; typedef struct QIODevice QIODevice; #endif -QCborStreamWriter* QCborStreamWriter_new(QIODevice* device); +void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter); void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device); QIODevice* QCborStreamWriter_Device(const QCborStreamWriter* self); void QCborStreamWriter_Append(QCborStreamWriter* self, unsigned long long u); @@ -51,7 +51,7 @@ void QCborStreamWriter_StartMap(QCborStreamWriter* self); void QCborStreamWriter_StartMapWithCount(QCborStreamWriter* self, unsigned long long count); bool QCborStreamWriter_EndMap(QCborStreamWriter* self); void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, ptrdiff_t size); -void QCborStreamWriter_Delete(QCborStreamWriter* self); +void QCborStreamWriter_Delete(QCborStreamWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/cbor/gen_qcborvalue.cpp b/qt/cbor/gen_qcborvalue.cpp index bf20637b..38e7ee02 100644 --- a/qt/cbor/gen_qcborvalue.cpp +++ b/qt/cbor/gen_qcborvalue.cpp @@ -30,98 +30,124 @@ struct miqt_string QCborParserError_ErrorString(const QCborParserError* self) { return _ms; } -void QCborParserError_Delete(QCborParserError* self) { - delete self; +void QCborParserError_Delete(QCborParserError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborValue* QCborValue_new() { - return new QCborValue(); +void QCborValue_new(QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new2(int t_) { - return new QCborValue(static_cast(t_)); +void QCborValue_new2(int t_, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(t_)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new3(bool b_) { - return new QCborValue(b_); +void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(b_); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new4(int i) { - return new QCborValue(static_cast(i)); +void QCborValue_new4(int i, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(i)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new5(unsigned int u) { - return new QCborValue(static_cast(u)); +void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(u)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new6(long long i) { - return new QCborValue(static_cast(i)); +void QCborValue_new6(long long i, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(i)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new7(double v) { - return new QCborValue(static_cast(v)); +void QCborValue_new7(double v, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(v)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new8(uint8_t st) { - return new QCborValue(static_cast(st)); +void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(st)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new9(struct miqt_string ba) { +void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue) { QByteArray ba_QByteArray(ba.data, ba.len); - return new QCborValue(ba_QByteArray); + QCborValue* ret = new QCborValue(ba_QByteArray); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new10(struct miqt_string s) { +void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue) { QString s_QString = QString::fromUtf8(s.data, s.len); - return new QCborValue(s_QString); + QCborValue* ret = new QCborValue(s_QString); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new11(const char* s) { - return new QCborValue(s); +void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(s); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new12(QCborArray* a) { - return new QCborValue(*a); +void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*a); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new13(QCborMap* m) { - return new QCborValue(*m); +void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*m); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new14(uint64_t tag) { - return new QCborValue(static_cast(tag)); +void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(tag)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new15(int t_) { - return new QCborValue(static_cast(t_)); +void QCborValue_new15(int t_, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(t_)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new16(QDateTime* dt) { - return new QCborValue(*dt); +void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*dt); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new17(QUrl* url) { - return new QCborValue(*url); +void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*url); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new18(QRegularExpression* rx) { - return new QCborValue(*rx); +void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*rx); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new19(QUuid* uuid) { - return new QCborValue(*uuid); +void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*uuid); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new20(QCborValue* other) { - return new QCborValue(*other); +void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*other); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue) { - return new QCborValue(static_cast(tag), *taggedValue); +void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(tag), *taggedValue); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new22(int t_, QCborValue* tv) { - return new QCborValue(static_cast(t_), *tv); +void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(t_), *tv); + *outptr_QCborValue = ret; } void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other) { @@ -489,12 +515,17 @@ struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int return _ms; } -void QCborValue_Delete(QCborValue* self) { - delete self; +void QCborValue_Delete(QCborValue* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborValueRef* QCborValueRef_new(QCborValueRef* param1) { - return new QCborValueRef(*param1); +void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef) { + QCborValueRef* ret = new QCborValueRef(*param1); + *outptr_QCborValueRef = ret; } void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other) { @@ -814,7 +845,11 @@ struct miqt_string QCborValueRef_ToDiagnosticNotation1(QCborValueRef* self, int return _ms; } -void QCborValueRef_Delete(QCborValueRef* self) { - delete self; +void QCborValueRef_Delete(QCborValueRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/cbor/gen_qcborvalue.go b/qt/cbor/gen_qcborvalue.go index bf585163..7ddbc7a0 100644 --- a/qt/cbor/gen_qcborvalue.go +++ b/qt/cbor/gen_qcborvalue.go @@ -55,7 +55,8 @@ const ( ) type QCborParserError struct { - h *C.QCborParserError + h *C.QCborParserError + isSubclass bool } func (this *QCborParserError) cPointer() *C.QCborParserError { @@ -72,6 +73,7 @@ func (this *QCborParserError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborParserError constructs the type using only CGO pointers. func newQCborParserError(h *C.QCborParserError) *QCborParserError { if h == nil { return nil @@ -79,8 +81,13 @@ func newQCborParserError(h *C.QCborParserError) *QCborParserError { return &QCborParserError{h: h} } +// UnsafeNewQCborParserError constructs the type using only unsafe pointers. func UnsafeNewQCborParserError(h unsafe.Pointer) *QCborParserError { - return newQCborParserError((*C.QCborParserError)(h)) + if h == nil { + return nil + } + + return &QCborParserError{h: (*C.QCborParserError)(h)} } func (this *QCborParserError) ErrorString() string { @@ -92,7 +99,7 @@ func (this *QCborParserError) ErrorString() string { // Delete this object from C++ memory. func (this *QCborParserError) Delete() { - C.QCborParserError_Delete(this.h) + C.QCborParserError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -105,7 +112,8 @@ func (this *QCborParserError) GoGC() { } type QCborValue struct { - h *C.QCborValue + h *C.QCborValue + isSubclass bool } func (this *QCborValue) cPointer() *C.QCborValue { @@ -122,6 +130,7 @@ func (this *QCborValue) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborValue constructs the type using only CGO pointers. func newQCborValue(h *C.QCborValue) *QCborValue { if h == nil { return nil @@ -129,56 +138,93 @@ func newQCborValue(h *C.QCborValue) *QCborValue { return &QCborValue{h: h} } +// UnsafeNewQCborValue constructs the type using only unsafe pointers. func UnsafeNewQCborValue(h unsafe.Pointer) *QCborValue { - return newQCborValue((*C.QCborValue)(h)) + if h == nil { + return nil + } + + return &QCborValue{h: (*C.QCborValue)(h)} } // NewQCborValue constructs a new QCborValue object. func NewQCborValue() *QCborValue { - ret := C.QCborValue_new() - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new(&outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue2 constructs a new QCborValue object. func NewQCborValue2(t_ QCborValue__Type) *QCborValue { - ret := C.QCborValue_new2((C.int)(t_)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new2((C.int)(t_), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue3 constructs a new QCborValue object. func NewQCborValue3(b_ bool) *QCborValue { - ret := C.QCborValue_new3((C.bool)(b_)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new3((C.bool)(b_), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue4 constructs a new QCborValue object. func NewQCborValue4(i int) *QCborValue { - ret := C.QCborValue_new4((C.int)(i)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new4((C.int)(i), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue5 constructs a new QCborValue object. func NewQCborValue5(u uint) *QCborValue { - ret := C.QCborValue_new5((C.uint)(u)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new5((C.uint)(u), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue6 constructs a new QCborValue object. func NewQCborValue6(i int64) *QCborValue { - ret := C.QCborValue_new6((C.longlong)(i)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new6((C.longlong)(i), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue7 constructs a new QCborValue object. func NewQCborValue7(v float64) *QCborValue { - ret := C.QCborValue_new7((C.double)(v)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new7((C.double)(v), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue8 constructs a new QCborValue object. func NewQCborValue8(st QCborSimpleType) *QCborValue { - ret := C.QCborValue_new8((C.uint8_t)(st)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new8((C.uint8_t)(st), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue9 constructs a new QCborValue object. @@ -186,8 +232,12 @@ func NewQCborValue9(ba []byte) *QCborValue { ba_alias := C.struct_miqt_string{} ba_alias.data = (*C.char)(unsafe.Pointer(&ba[0])) ba_alias.len = C.size_t(len(ba)) - ret := C.QCborValue_new9(ba_alias) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new9(ba_alias, &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue10 constructs a new QCborValue object. @@ -196,82 +246,134 @@ func NewQCborValue10(s string) *QCborValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - ret := C.QCborValue_new10(s_ms) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new10(s_ms, &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue11 constructs a new QCborValue object. func NewQCborValue11(s string) *QCborValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - ret := C.QCborValue_new11(s_Cstring) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new11(s_Cstring, &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue12 constructs a new QCborValue object. func NewQCborValue12(a *QCborArray) *QCborValue { - ret := C.QCborValue_new12(a.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new12(a.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue13 constructs a new QCborValue object. func NewQCborValue13(m *QCborMap) *QCborValue { - ret := C.QCborValue_new13(m.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new13(m.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue14 constructs a new QCborValue object. func NewQCborValue14(tag QCborTag) *QCborValue { - ret := C.QCborValue_new14((C.uint64_t)(tag)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new14((C.uint64_t)(tag), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue15 constructs a new QCborValue object. func NewQCborValue15(t_ QCborKnownTags) *QCborValue { - ret := C.QCborValue_new15((C.int)(t_)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new15((C.int)(t_), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue16 constructs a new QCborValue object. func NewQCborValue16(dt *qt.QDateTime) *QCborValue { - ret := C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue17 constructs a new QCborValue object. func NewQCborValue17(url *qt.QUrl) *QCborValue { - ret := C.QCborValue_new17((*C.QUrl)(url.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new17((*C.QUrl)(url.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue18 constructs a new QCborValue object. func NewQCborValue18(rx *qt.QRegularExpression) *QCborValue { - ret := C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue19 constructs a new QCborValue object. func NewQCborValue19(uuid *qt.QUuid) *QCborValue { - ret := C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue20 constructs a new QCborValue object. func NewQCborValue20(other *QCborValue) *QCborValue { - ret := C.QCborValue_new20(other.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new20(other.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue21 constructs a new QCborValue object. func NewQCborValue21(tag QCborTag, taggedValue *QCborValue) *QCborValue { - ret := C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue22 constructs a new QCborValue object. func NewQCborValue22(t_ QCborKnownTags, tv *QCborValue) *QCborValue { - ret := C.QCborValue_new22((C.int)(t_), tv.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new22((C.int)(t_), tv.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } func (this *QCborValue) OperatorAssign(other *QCborValue) { @@ -716,7 +818,7 @@ func (this *QCborValue) ToDiagnosticNotation1(opts QCborValue__DiagnosticNotatio // Delete this object from C++ memory. func (this *QCborValue) Delete() { - C.QCborValue_Delete(this.h) + C.QCborValue_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -729,7 +831,8 @@ func (this *QCborValue) GoGC() { } type QCborValueRef struct { - h *C.QCborValueRef + h *C.QCborValueRef + isSubclass bool } func (this *QCborValueRef) cPointer() *C.QCborValueRef { @@ -746,6 +849,7 @@ func (this *QCborValueRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborValueRef constructs the type using only CGO pointers. func newQCborValueRef(h *C.QCborValueRef) *QCborValueRef { if h == nil { return nil @@ -753,14 +857,23 @@ func newQCborValueRef(h *C.QCborValueRef) *QCborValueRef { return &QCborValueRef{h: h} } +// UnsafeNewQCborValueRef constructs the type using only unsafe pointers. func UnsafeNewQCborValueRef(h unsafe.Pointer) *QCborValueRef { - return newQCborValueRef((*C.QCborValueRef)(h)) + if h == nil { + return nil + } + + return &QCborValueRef{h: (*C.QCborValueRef)(h)} } // NewQCborValueRef constructs a new QCborValueRef object. func NewQCborValueRef(param1 *QCborValueRef) *QCborValueRef { - ret := C.QCborValueRef_new(param1.cPointer()) - return newQCborValueRef(ret) + var outptr_QCborValueRef *C.QCborValueRef = nil + + C.QCborValueRef_new(param1.cPointer(), &outptr_QCborValueRef) + ret := newQCborValueRef(outptr_QCborValueRef) + ret.isSubclass = true + return ret } func (this *QCborValueRef) OperatorAssign(other *QCborValue) { @@ -1124,7 +1237,7 @@ func (this *QCborValueRef) ToDiagnosticNotation1(opt QCborValue__DiagnosticNotat // Delete this object from C++ memory. func (this *QCborValueRef) Delete() { - C.QCborValueRef_Delete(this.h) + C.QCborValueRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/cbor/gen_qcborvalue.h b/qt/cbor/gen_qcborvalue.h index 3311213d..99cf36f7 100644 --- a/qt/cbor/gen_qcborvalue.h +++ b/qt/cbor/gen_qcborvalue.h @@ -47,30 +47,30 @@ typedef struct QVariant QVariant; #endif struct miqt_string QCborParserError_ErrorString(const QCborParserError* self); -void QCborParserError_Delete(QCborParserError* self); +void QCborParserError_Delete(QCborParserError* self, bool isSubclass); -QCborValue* QCborValue_new(); -QCborValue* QCborValue_new2(int t_); -QCborValue* QCborValue_new3(bool b_); -QCborValue* QCborValue_new4(int i); -QCborValue* QCborValue_new5(unsigned int u); -QCborValue* QCborValue_new6(long long i); -QCborValue* QCborValue_new7(double v); -QCborValue* QCborValue_new8(uint8_t st); -QCborValue* QCborValue_new9(struct miqt_string ba); -QCborValue* QCborValue_new10(struct miqt_string s); -QCborValue* QCborValue_new11(const char* s); -QCborValue* QCborValue_new12(QCborArray* a); -QCborValue* QCborValue_new13(QCborMap* m); -QCborValue* QCborValue_new14(uint64_t tag); -QCborValue* QCborValue_new15(int t_); -QCborValue* QCborValue_new16(QDateTime* dt); -QCborValue* QCborValue_new17(QUrl* url); -QCborValue* QCborValue_new18(QRegularExpression* rx); -QCborValue* QCborValue_new19(QUuid* uuid); -QCborValue* QCborValue_new20(QCborValue* other); -QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue); -QCborValue* QCborValue_new22(int t_, QCborValue* tv); +void QCborValue_new(QCborValue** outptr_QCborValue); +void QCborValue_new2(int t_, QCborValue** outptr_QCborValue); +void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue); +void QCborValue_new4(int i, QCborValue** outptr_QCborValue); +void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue); +void QCborValue_new6(long long i, QCborValue** outptr_QCborValue); +void QCborValue_new7(double v, QCborValue** outptr_QCborValue); +void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue); +void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue); +void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue); +void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue); +void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue); +void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue); +void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue); +void QCborValue_new15(int t_, QCborValue** outptr_QCborValue); +void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue); +void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue); +void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue); +void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue); +void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue); +void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue); +void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue); void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other); void QCborValue_Swap(QCborValue* self, QCborValue* other); int QCborValue_Type(const QCborValue* self); @@ -147,9 +147,9 @@ QCborValue* QCborValue_FromCbor33(const unsigned char* data, ptrdiff_t lenVal, Q struct miqt_string QCborValue_ToCbor1(QCborValue* self, int opt); void QCborValue_ToCbor2(QCborValue* self, QCborStreamWriter* writer, int opt); struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int opts); -void QCborValue_Delete(QCborValue* self); +void QCborValue_Delete(QCborValue* self, bool isSubclass); -QCborValueRef* QCborValueRef_new(QCborValueRef* param1); +void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef); void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other); void QCborValueRef_OperatorAssignWithOther(QCborValueRef* self, QCborValueRef* other); int QCborValueRef_Type(const QCborValueRef* self); @@ -215,7 +215,7 @@ QUuid* QCborValueRef_ToUuid1(const QCborValueRef* self, QUuid* defaultValue); struct miqt_string QCborValueRef_ToCbor1(QCborValueRef* self, int opt); void QCborValueRef_ToCbor2(QCborValueRef* self, QCborStreamWriter* writer, int opt); struct miqt_string QCborValueRef_ToDiagnosticNotation1(QCborValueRef* self, int opt); -void QCborValueRef_Delete(QCborValueRef* self); +void QCborValueRef_Delete(QCborValueRef* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractanimation.cpp b/qt/gen_qabstractanimation.cpp index a28aff2d..7a9b3ae7 100644 --- a/qt/gen_qabstractanimation.cpp +++ b/qt/gen_qabstractanimation.cpp @@ -1,11 +1,15 @@ #include #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qabstractanimation.h" #include "_cgo_export.h" @@ -205,16 +209,297 @@ void QAbstractAnimation_Start1(QAbstractAnimation* self, int policy) { self->start(static_cast(policy)); } -void QAbstractAnimation_Delete(QAbstractAnimation* self) { - delete self; +void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAnimationDriver* QAnimationDriver_new() { - return new QAnimationDriver(); +class MiqtVirtualQAnimationDriver : public virtual QAnimationDriver { +public: + + MiqtVirtualQAnimationDriver(): QAnimationDriver() {}; + MiqtVirtualQAnimationDriver(QObject* parent): QAnimationDriver(parent) {}; + + virtual ~MiqtVirtualQAnimationDriver() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance() override { + if (handle__Advance == 0) { + QAnimationDriver::advance(); + return; + } + + + miqt_exec_callback_QAnimationDriver_Advance(this, handle__Advance); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance() { + + QAnimationDriver::advance(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Elapsed = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 elapsed() const override { + if (handle__Elapsed == 0) { + return QAnimationDriver::elapsed(); + } + + + long long callback_return_value = miqt_exec_callback_QAnimationDriver_Elapsed(const_cast(this), handle__Elapsed); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Elapsed() const { + + qint64 _ret = QAnimationDriver::elapsed(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Start = 0; + + // Subclass to allow providing a Go implementation + virtual void start() override { + if (handle__Start == 0) { + QAnimationDriver::start(); + return; + } + + + miqt_exec_callback_QAnimationDriver_Start(this, handle__Start); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Start() { + + QAnimationDriver::start(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Stop = 0; + + // Subclass to allow providing a Go implementation + virtual void stop() override { + if (handle__Stop == 0) { + QAnimationDriver::stop(); + return; + } + + + miqt_exec_callback_QAnimationDriver_Stop(this, handle__Stop); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Stop() { + + QAnimationDriver::stop(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAnimationDriver::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAnimationDriver_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAnimationDriver::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAnimationDriver::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAnimationDriver_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAnimationDriver::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAnimationDriver::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAnimationDriver_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAnimationDriver::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAnimationDriver::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAnimationDriver_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAnimationDriver::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAnimationDriver::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAnimationDriver_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAnimationDriver::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAnimationDriver::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAnimationDriver_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAnimationDriver::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAnimationDriver::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAnimationDriver_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAnimationDriver::disconnectNotify(*signal); + + } + +}; + +void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { + MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(); + *outptr_QAnimationDriver = ret; + *outptr_QObject = static_cast(ret); } -QAnimationDriver* QAnimationDriver_new2(QObject* parent) { - return new QAnimationDriver(parent); +void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { + MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(parent); + *outptr_QAnimationDriver = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self) { @@ -282,7 +567,7 @@ void QAnimationDriver_Started(QAnimationDriver* self) { } void QAnimationDriver_connect_Started(QAnimationDriver* self, intptr_t slot) { - QAnimationDriver::connect(self, static_cast(&QAnimationDriver::started), self, [=]() { + MiqtVirtualQAnimationDriver::connect(self, static_cast(&QAnimationDriver::started), self, [=]() { miqt_exec_callback_QAnimationDriver_Started(slot); }); } @@ -292,7 +577,7 @@ void QAnimationDriver_Stopped(QAnimationDriver* self) { } void QAnimationDriver_connect_Stopped(QAnimationDriver* self, intptr_t slot) { - QAnimationDriver::connect(self, static_cast(&QAnimationDriver::stopped), self, [=]() { + MiqtVirtualQAnimationDriver::connect(self, static_cast(&QAnimationDriver::stopped), self, [=]() { miqt_exec_callback_QAnimationDriver_Stopped(slot); }); } @@ -341,7 +626,99 @@ struct miqt_string QAnimationDriver_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QAnimationDriver_Delete(QAnimationDriver* self) { - delete self; +void QAnimationDriver_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Advance = slot; +} + +void QAnimationDriver_virtualbase_Advance(void* self) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Advance(); +} + +void QAnimationDriver_override_virtual_Elapsed(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Elapsed = slot; +} + +long long QAnimationDriver_virtualbase_Elapsed(const void* self) { + return ( (const MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Elapsed(); +} + +void QAnimationDriver_override_virtual_Start(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Start = slot; +} + +void QAnimationDriver_virtualbase_Start(void* self) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Start(); +} + +void QAnimationDriver_override_virtual_Stop(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Stop = slot; +} + +void QAnimationDriver_virtualbase_Stop(void* self) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Stop(); +} + +void QAnimationDriver_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Event = slot; +} + +bool QAnimationDriver_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Event(event); +} + +void QAnimationDriver_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__EventFilter = slot; +} + +bool QAnimationDriver_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAnimationDriver_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__TimerEvent = slot; +} + +void QAnimationDriver_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_TimerEvent(event); +} + +void QAnimationDriver_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__ChildEvent = slot; +} + +void QAnimationDriver_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_ChildEvent(event); +} + +void QAnimationDriver_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__CustomEvent = slot; +} + +void QAnimationDriver_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_CustomEvent(event); +} + +void QAnimationDriver_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__ConnectNotify = slot; +} + +void QAnimationDriver_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAnimationDriver_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__DisconnectNotify = slot; +} + +void QAnimationDriver_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAnimationDriver_Delete(QAnimationDriver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractanimation.go b/qt/gen_qabstractanimation.go index f18fe0ad..7b269b8a 100644 --- a/qt/gen_qabstractanimation.go +++ b/qt/gen_qabstractanimation.go @@ -37,7 +37,8 @@ const ( ) type QAbstractAnimation struct { - h *C.QAbstractAnimation + h *C.QAbstractAnimation + isSubclass bool *QObject } @@ -55,15 +56,23 @@ func (this *QAbstractAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractAnimation(h *C.QAbstractAnimation) *QAbstractAnimation { +// newQAbstractAnimation constructs the type using only CGO pointers. +func newQAbstractAnimation(h *C.QAbstractAnimation, h_QObject *C.QObject) *QAbstractAnimation { if h == nil { return nil } - return &QAbstractAnimation{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractAnimation{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractAnimation(h unsafe.Pointer) *QAbstractAnimation { - return newQAbstractAnimation((*C.QAbstractAnimation)(h)) +// UnsafeNewQAbstractAnimation constructs the type using only unsafe pointers. +func UnsafeNewQAbstractAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAnimation { + if h == nil { + return nil + } + + return &QAbstractAnimation{h: (*C.QAbstractAnimation)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractAnimation) MetaObject() *QMetaObject { @@ -99,7 +108,7 @@ func (this *QAbstractAnimation) State() QAbstractAnimation__State { } func (this *QAbstractAnimation) Group() *QAnimationGroup { - return UnsafeNewQAnimationGroup(unsafe.Pointer(C.QAbstractAnimation_Group(this.h))) + return UnsafeNewQAnimationGroup(unsafe.Pointer(C.QAbstractAnimation_Group(this.h)), nil, nil) } func (this *QAbstractAnimation) Direction() QAbstractAnimation__Direction { @@ -291,7 +300,7 @@ func (this *QAbstractAnimation) Start1(policy QAbstractAnimation__DeletionPolicy // Delete this object from C++ memory. func (this *QAbstractAnimation) Delete() { - C.QAbstractAnimation_Delete(this.h) + C.QAbstractAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -304,7 +313,8 @@ func (this *QAbstractAnimation) GoGC() { } type QAnimationDriver struct { - h *C.QAnimationDriver + h *C.QAnimationDriver + isSubclass bool *QObject } @@ -322,27 +332,45 @@ func (this *QAnimationDriver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAnimationDriver(h *C.QAnimationDriver) *QAnimationDriver { +// newQAnimationDriver constructs the type using only CGO pointers. +func newQAnimationDriver(h *C.QAnimationDriver, h_QObject *C.QObject) *QAnimationDriver { if h == nil { return nil } - return &QAnimationDriver{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAnimationDriver{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAnimationDriver(h unsafe.Pointer) *QAnimationDriver { - return newQAnimationDriver((*C.QAnimationDriver)(h)) +// UnsafeNewQAnimationDriver constructs the type using only unsafe pointers. +func UnsafeNewQAnimationDriver(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationDriver { + if h == nil { + return nil + } + + return &QAnimationDriver{h: (*C.QAnimationDriver)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQAnimationDriver constructs a new QAnimationDriver object. func NewQAnimationDriver() *QAnimationDriver { - ret := C.QAnimationDriver_new() - return newQAnimationDriver(ret) + var outptr_QAnimationDriver *C.QAnimationDriver = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationDriver_new(&outptr_QAnimationDriver, &outptr_QObject) + ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAnimationDriver2 constructs a new QAnimationDriver object. func NewQAnimationDriver2(parent *QObject) *QAnimationDriver { - ret := C.QAnimationDriver_new2(parent.cPointer()) - return newQAnimationDriver(ret) + var outptr_QAnimationDriver *C.QAnimationDriver = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationDriver_new2(parent.cPointer(), &outptr_QAnimationDriver, &outptr_QObject) + ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAnimationDriver) MetaObject() *QMetaObject { @@ -479,9 +507,257 @@ func QAnimationDriver_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAnimationDriver) callVirtualBase_Advance() { + + C.QAnimationDriver_virtualbase_Advance(unsafe.Pointer(this.h)) + +} +func (this *QAnimationDriver) OnAdvance(slot func(super func())) { + C.QAnimationDriver_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Advance +func miqt_exec_callback_QAnimationDriver_Advance(self *C.QAnimationDriver, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_Advance) + +} + +func (this *QAnimationDriver) callVirtualBase_Elapsed() int64 { + + return (int64)(C.QAnimationDriver_virtualbase_Elapsed(unsafe.Pointer(this.h))) + +} +func (this *QAnimationDriver) OnElapsed(slot func(super func() int64) int64) { + C.QAnimationDriver_override_virtual_Elapsed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Elapsed +func miqt_exec_callback_QAnimationDriver_Elapsed(self *C.QAnimationDriver, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAnimationDriver{h: self}).callVirtualBase_Elapsed) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAnimationDriver) callVirtualBase_Start() { + + C.QAnimationDriver_virtualbase_Start(unsafe.Pointer(this.h)) + +} +func (this *QAnimationDriver) OnStart(slot func(super func())) { + C.QAnimationDriver_override_virtual_Start(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Start +func miqt_exec_callback_QAnimationDriver_Start(self *C.QAnimationDriver, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_Start) + +} + +func (this *QAnimationDriver) callVirtualBase_Stop() { + + C.QAnimationDriver_virtualbase_Stop(unsafe.Pointer(this.h)) + +} +func (this *QAnimationDriver) OnStop(slot func(super func())) { + C.QAnimationDriver_override_virtual_Stop(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Stop +func miqt_exec_callback_QAnimationDriver_Stop(self *C.QAnimationDriver, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_Stop) + +} + +func (this *QAnimationDriver) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAnimationDriver_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAnimationDriver) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAnimationDriver_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Event +func miqt_exec_callback_QAnimationDriver_Event(self *C.QAnimationDriver, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAnimationDriver{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAnimationDriver) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAnimationDriver_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAnimationDriver) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAnimationDriver_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_EventFilter +func miqt_exec_callback_QAnimationDriver_EventFilter(self *C.QAnimationDriver, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAnimationDriver{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAnimationDriver) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAnimationDriver_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAnimationDriver) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAnimationDriver_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_TimerEvent +func miqt_exec_callback_QAnimationDriver_TimerEvent(self *C.QAnimationDriver, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAnimationDriver_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAnimationDriver) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAnimationDriver_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_ChildEvent +func miqt_exec_callback_QAnimationDriver_ChildEvent(self *C.QAnimationDriver, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAnimationDriver_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAnimationDriver) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAnimationDriver_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_CustomEvent +func miqt_exec_callback_QAnimationDriver_CustomEvent(self *C.QAnimationDriver, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAnimationDriver_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAnimationDriver) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAnimationDriver_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_ConnectNotify +func miqt_exec_callback_QAnimationDriver_ConnectNotify(self *C.QAnimationDriver, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAnimationDriver_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAnimationDriver) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAnimationDriver_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_DisconnectNotify +func miqt_exec_callback_QAnimationDriver_DisconnectNotify(self *C.QAnimationDriver, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAnimationDriver) Delete() { - C.QAnimationDriver_Delete(this.h) + C.QAnimationDriver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractanimation.h b/qt/gen_qabstractanimation.h index 367fd673..3b7db252 100644 --- a/qt/gen_qabstractanimation.h +++ b/qt/gen_qabstractanimation.h @@ -18,14 +18,22 @@ extern "C" { class QAbstractAnimation; class QAnimationDriver; class QAnimationGroup; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QAnimationDriver QAnimationDriver; typedef struct QAnimationGroup QAnimationGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self); @@ -57,15 +65,19 @@ void QAbstractAnimation_Resume(QAbstractAnimation* self); void QAbstractAnimation_SetPaused(QAbstractAnimation* self, bool paused); void QAbstractAnimation_Stop(QAbstractAnimation* self); void QAbstractAnimation_SetCurrentTime(QAbstractAnimation* self, int msecs); +bool QAbstractAnimation_Event(QAbstractAnimation* self, QEvent* event); +void QAbstractAnimation_UpdateCurrentTime(QAbstractAnimation* self, int currentTime); +void QAbstractAnimation_UpdateState(QAbstractAnimation* self, int newState, int oldState); +void QAbstractAnimation_UpdateDirection(QAbstractAnimation* self, int direction); struct miqt_string QAbstractAnimation_Tr2(const char* s, const char* c); struct miqt_string QAbstractAnimation_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractAnimation_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractAnimation_TrUtf83(const char* s, const char* c, int n); void QAbstractAnimation_Start1(QAbstractAnimation* self, int policy); -void QAbstractAnimation_Delete(QAbstractAnimation* self); +void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass); -QAnimationDriver* QAnimationDriver_new(); -QAnimationDriver* QAnimationDriver_new2(QObject* parent); +void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); +void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self); void* QAnimationDriver_Metacast(QAnimationDriver* self, const char* param1); struct miqt_string QAnimationDriver_Tr(const char* s); @@ -81,11 +93,35 @@ void QAnimationDriver_Started(QAnimationDriver* self); void QAnimationDriver_connect_Started(QAnimationDriver* self, intptr_t slot); void QAnimationDriver_Stopped(QAnimationDriver* self); void QAnimationDriver_connect_Stopped(QAnimationDriver* self, intptr_t slot); +void QAnimationDriver_Start(QAnimationDriver* self); +void QAnimationDriver_Stop(QAnimationDriver* self); struct miqt_string QAnimationDriver_Tr2(const char* s, const char* c); struct miqt_string QAnimationDriver_Tr3(const char* s, const char* c, int n); struct miqt_string QAnimationDriver_TrUtf82(const char* s, const char* c); struct miqt_string QAnimationDriver_TrUtf83(const char* s, const char* c, int n); -void QAnimationDriver_Delete(QAnimationDriver* self); +void QAnimationDriver_override_virtual_Advance(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_Advance(void* self); +void QAnimationDriver_override_virtual_Elapsed(void* self, intptr_t slot); +long long QAnimationDriver_virtualbase_Elapsed(const void* self); +void QAnimationDriver_override_virtual_Start(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_Start(void* self); +void QAnimationDriver_override_virtual_Stop(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_Stop(void* self); +void QAnimationDriver_override_virtual_Event(void* self, intptr_t slot); +bool QAnimationDriver_virtualbase_Event(void* self, QEvent* event); +void QAnimationDriver_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAnimationDriver_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAnimationDriver_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAnimationDriver_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAnimationDriver_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_CustomEvent(void* self, QEvent* event); +void QAnimationDriver_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAnimationDriver_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAnimationDriver_Delete(QAnimationDriver* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractbutton.cpp b/qt/gen_qabstractbutton.cpp index 053c538c..dc6b4c24 100644 --- a/qt/gen_qabstractbutton.cpp +++ b/qt/gen_qabstractbutton.cpp @@ -1,12 +1,22 @@ #include #include +#include +#include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include "gen_qabstractbutton.h" #include "_cgo_export.h" @@ -253,7 +263,11 @@ void QAbstractButton_connect_Clicked1(QAbstractButton* self, intptr_t slot) { }); } -void QAbstractButton_Delete(QAbstractButton* self) { - delete self; +void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractbutton.go b/qt/gen_qabstractbutton.go index 2e1494da..1b02ab77 100644 --- a/qt/gen_qabstractbutton.go +++ b/qt/gen_qabstractbutton.go @@ -15,7 +15,8 @@ import ( ) type QAbstractButton struct { - h *C.QAbstractButton + h *C.QAbstractButton + isSubclass bool *QWidget } @@ -33,15 +34,23 @@ func (this *QAbstractButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractButton(h *C.QAbstractButton) *QAbstractButton { +// newQAbstractButton constructs the type using only CGO pointers. +func newQAbstractButton(h *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractButton { if h == nil { return nil } - return &QAbstractButton{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QAbstractButton{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractButton(h unsafe.Pointer) *QAbstractButton { - return newQAbstractButton((*C.QAbstractButton)(h)) +// UnsafeNewQAbstractButton constructs the type using only unsafe pointers. +func UnsafeNewQAbstractButton(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractButton { + if h == nil { + return nil + } + + return &QAbstractButton{h: (*C.QAbstractButton)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } func (this *QAbstractButton) MetaObject() *QMetaObject { @@ -169,7 +178,7 @@ func (this *QAbstractButton) AutoExclusive() bool { } func (this *QAbstractButton) Group() *QButtonGroup { - return UnsafeNewQButtonGroup(unsafe.Pointer(C.QAbstractButton_Group(this.h))) + return UnsafeNewQButtonGroup(unsafe.Pointer(C.QAbstractButton_Group(this.h)), nil) } func (this *QAbstractButton) SetIconSize(size *QSize) { @@ -333,7 +342,7 @@ func miqt_exec_callback_QAbstractButton_Clicked1(cb C.intptr_t, checked C.bool) // Delete this object from C++ memory. func (this *QAbstractButton) Delete() { - C.QAbstractButton_Delete(this.h) + C.QAbstractButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractbutton.h b/qt/gen_qabstractbutton.h index b6673fb5..78c6d8d4 100644 --- a/qt/gen_qabstractbutton.h +++ b/qt/gen_qabstractbutton.h @@ -17,17 +17,37 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QButtonGroup; +class QEvent; +class QFocusEvent; class QIcon; +class QKeyEvent; class QKeySequence; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QSize; +class QTimerEvent; +class QWidget; #else typedef struct QAbstractButton QAbstractButton; typedef struct QButtonGroup QButtonGroup; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QIcon QIcon; +typedef struct QKeyEvent QKeyEvent; typedef struct QKeySequence QKeySequence; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWidget QWidget; #endif QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self); @@ -68,6 +88,20 @@ void QAbstractButton_Clicked(QAbstractButton* self); void QAbstractButton_connect_Clicked(QAbstractButton* self, intptr_t slot); void QAbstractButton_Toggled(QAbstractButton* self, bool checked); void QAbstractButton_connect_Toggled(QAbstractButton* self, intptr_t slot); +void QAbstractButton_PaintEvent(QAbstractButton* self, QPaintEvent* e); +bool QAbstractButton_HitButton(const QAbstractButton* self, QPoint* pos); +void QAbstractButton_CheckStateSet(QAbstractButton* self); +void QAbstractButton_NextCheckState(QAbstractButton* self); +bool QAbstractButton_Event(QAbstractButton* self, QEvent* e); +void QAbstractButton_KeyPressEvent(QAbstractButton* self, QKeyEvent* e); +void QAbstractButton_KeyReleaseEvent(QAbstractButton* self, QKeyEvent* e); +void QAbstractButton_MousePressEvent(QAbstractButton* self, QMouseEvent* e); +void QAbstractButton_MouseReleaseEvent(QAbstractButton* self, QMouseEvent* e); +void QAbstractButton_MouseMoveEvent(QAbstractButton* self, QMouseEvent* e); +void QAbstractButton_FocusInEvent(QAbstractButton* self, QFocusEvent* e); +void QAbstractButton_FocusOutEvent(QAbstractButton* self, QFocusEvent* e); +void QAbstractButton_ChangeEvent(QAbstractButton* self, QEvent* e); +void QAbstractButton_TimerEvent(QAbstractButton* self, QTimerEvent* e); struct miqt_string QAbstractButton_Tr2(const char* s, const char* c); struct miqt_string QAbstractButton_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractButton_TrUtf82(const char* s, const char* c); @@ -75,7 +109,7 @@ struct miqt_string QAbstractButton_TrUtf83(const char* s, const char* c, int n); void QAbstractButton_AnimateClick1(QAbstractButton* self, int msec); void QAbstractButton_Clicked1(QAbstractButton* self, bool checked); void QAbstractButton_connect_Clicked1(QAbstractButton* self, intptr_t slot); -void QAbstractButton_Delete(QAbstractButton* self); +void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstracteventdispatcher.cpp b/qt/gen_qabstracteventdispatcher.cpp index 927bc6c7..631137dc 100644 --- a/qt/gen_qabstracteventdispatcher.cpp +++ b/qt/gen_qabstracteventdispatcher.cpp @@ -198,15 +198,24 @@ QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } -void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self) { - delete self; +void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t) { - return new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); +void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo) { + QAbstractEventDispatcher::TimerInfo* ret = new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); + *outptr_QAbstractEventDispatcher__TimerInfo = ret; } -void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self) { - delete self; +void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstracteventdispatcher.go b/qt/gen_qabstracteventdispatcher.go index 86e7c983..2ec38550 100644 --- a/qt/gen_qabstracteventdispatcher.go +++ b/qt/gen_qabstracteventdispatcher.go @@ -15,7 +15,8 @@ import ( ) type QAbstractEventDispatcher struct { - h *C.QAbstractEventDispatcher + h *C.QAbstractEventDispatcher + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QAbstractEventDispatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher) *QAbstractEventDispatcher { +// newQAbstractEventDispatcher constructs the type using only CGO pointers. +func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher, h_QObject *C.QObject) *QAbstractEventDispatcher { if h == nil { return nil } - return &QAbstractEventDispatcher{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractEventDispatcher{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer) *QAbstractEventDispatcher { - return newQAbstractEventDispatcher((*C.QAbstractEventDispatcher)(h)) +// UnsafeNewQAbstractEventDispatcher constructs the type using only unsafe pointers. +func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractEventDispatcher { + if h == nil { + return nil + } + + return &QAbstractEventDispatcher{h: (*C.QAbstractEventDispatcher)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { @@ -73,7 +82,7 @@ func QAbstractEventDispatcher_TrUtf8(s string) string { } func QAbstractEventDispatcher_Instance() *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance())) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance()), nil) } func (this *QAbstractEventDispatcher) ProcessEvents(flags QEventLoop__ProcessEventsFlag) bool { @@ -239,12 +248,12 @@ func QAbstractEventDispatcher_TrUtf83(s string, c string, n int) string { } func QAbstractEventDispatcher_Instance1(thread *QThread) *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance1(thread.cPointer()))) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance1(thread.cPointer())), nil) } // Delete this object from C++ memory. func (this *QAbstractEventDispatcher) Delete() { - C.QAbstractEventDispatcher_Delete(this.h) + C.QAbstractEventDispatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -257,7 +266,8 @@ func (this *QAbstractEventDispatcher) GoGC() { } type QAbstractEventDispatcher__TimerInfo struct { - h *C.QAbstractEventDispatcher__TimerInfo + h *C.QAbstractEventDispatcher__TimerInfo + isSubclass bool } func (this *QAbstractEventDispatcher__TimerInfo) cPointer() *C.QAbstractEventDispatcher__TimerInfo { @@ -274,6 +284,7 @@ func (this *QAbstractEventDispatcher__TimerInfo) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQAbstractEventDispatcher__TimerInfo constructs the type using only CGO pointers. func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__TimerInfo) *QAbstractEventDispatcher__TimerInfo { if h == nil { return nil @@ -281,19 +292,28 @@ func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__Timer return &QAbstractEventDispatcher__TimerInfo{h: h} } +// UnsafeNewQAbstractEventDispatcher__TimerInfo constructs the type using only unsafe pointers. func UnsafeNewQAbstractEventDispatcher__TimerInfo(h unsafe.Pointer) *QAbstractEventDispatcher__TimerInfo { - return newQAbstractEventDispatcher__TimerInfo((*C.QAbstractEventDispatcher__TimerInfo)(h)) + if h == nil { + return nil + } + + return &QAbstractEventDispatcher__TimerInfo{h: (*C.QAbstractEventDispatcher__TimerInfo)(h)} } // NewQAbstractEventDispatcher__TimerInfo constructs a new QAbstractEventDispatcher::TimerInfo object. func NewQAbstractEventDispatcher__TimerInfo(id int, i int, t TimerType) *QAbstractEventDispatcher__TimerInfo { - ret := C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t)) - return newQAbstractEventDispatcher__TimerInfo(ret) + var outptr_QAbstractEventDispatcher__TimerInfo *C.QAbstractEventDispatcher__TimerInfo = nil + + C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t), &outptr_QAbstractEventDispatcher__TimerInfo) + ret := newQAbstractEventDispatcher__TimerInfo(outptr_QAbstractEventDispatcher__TimerInfo) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QAbstractEventDispatcher__TimerInfo) Delete() { - C.QAbstractEventDispatcher__TimerInfo_Delete(this.h) + C.QAbstractEventDispatcher__TimerInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstracteventdispatcher.h b/qt/gen_qabstracteventdispatcher.h index 2fb90cc6..04339830 100644 --- a/qt/gen_qabstracteventdispatcher.h +++ b/qt/gen_qabstracteventdispatcher.h @@ -70,10 +70,10 @@ struct miqt_string QAbstractEventDispatcher_Tr3(const char* s, const char* c, in struct miqt_string QAbstractEventDispatcher_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractEventDispatcher_TrUtf83(const char* s, const char* c, int n); QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread); -void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self); +void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); -QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t); -void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self); +void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); +void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractitemdelegate.cpp b/qt/gen_qabstractitemdelegate.cpp index cfeda7be..b655bc1f 100644 --- a/qt/gen_qabstractitemdelegate.cpp +++ b/qt/gen_qabstractitemdelegate.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -201,7 +202,11 @@ void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, int }); } -void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self) { - delete self; +void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractitemdelegate.go b/qt/gen_qabstractitemdelegate.go index e2249f80..ce55fac5 100644 --- a/qt/gen_qabstractitemdelegate.go +++ b/qt/gen_qabstractitemdelegate.go @@ -25,7 +25,8 @@ const ( ) type QAbstractItemDelegate struct { - h *C.QAbstractItemDelegate + h *C.QAbstractItemDelegate + isSubclass bool *QObject } @@ -43,15 +44,23 @@ func (this *QAbstractItemDelegate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractItemDelegate(h *C.QAbstractItemDelegate) *QAbstractItemDelegate { +// newQAbstractItemDelegate constructs the type using only CGO pointers. +func newQAbstractItemDelegate(h *C.QAbstractItemDelegate, h_QObject *C.QObject) *QAbstractItemDelegate { if h == nil { return nil } - return &QAbstractItemDelegate{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractItemDelegate{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer) *QAbstractItemDelegate { - return newQAbstractItemDelegate((*C.QAbstractItemDelegate)(h)) +// UnsafeNewQAbstractItemDelegate constructs the type using only unsafe pointers. +func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemDelegate { + if h == nil { + return nil + } + + return &QAbstractItemDelegate{h: (*C.QAbstractItemDelegate)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractItemDelegate) MetaObject() *QMetaObject { @@ -94,7 +103,7 @@ func (this *QAbstractItemDelegate) SizeHint(option *QStyleOptionViewItem, index } func (this *QAbstractItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) } func (this *QAbstractItemDelegate) DestroyEditor(editor *QWidget, index *QModelIndex) { @@ -157,7 +166,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CommitData(cb C.intptr_t, editor * } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) gofunc(slotval1) } @@ -177,7 +186,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) gofunc(slotval1) } @@ -261,7 +270,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) gofunc(slotval1, slotval2) @@ -269,7 +278,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor // Delete this object from C++ memory. func (this *QAbstractItemDelegate) Delete() { - C.QAbstractItemDelegate_Delete(this.h) + C.QAbstractItemDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractitemdelegate.h b/qt/gen_qabstractitemdelegate.h index 609cd724..57cce1c1 100644 --- a/qt/gen_qabstractitemdelegate.h +++ b/qt/gen_qabstractitemdelegate.h @@ -23,6 +23,7 @@ class QFontMetrics; class QHelpEvent; class QMetaObject; class QModelIndex; +class QObject; class QPainter; class QSize; class QStyleOptionViewItem; @@ -36,6 +37,7 @@ typedef struct QFontMetrics QFontMetrics; typedef struct QHelpEvent QHelpEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -69,7 +71,7 @@ struct miqt_string QAbstractItemDelegate_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractItemDelegate_TrUtf83(const char* s, const char* c, int n); void QAbstractItemDelegate_CloseEditor2(QAbstractItemDelegate* self, QWidget* editor, int hint); void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, intptr_t slot); -void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self); +void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractitemmodel.cpp b/qt/gen_qabstractitemmodel.cpp index ff651ccb..d21356bf 100644 --- a/qt/gen_qabstractitemmodel.cpp +++ b/qt/gen_qabstractitemmodel.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -17,12 +18,14 @@ #include "gen_qabstractitemmodel.h" #include "_cgo_export.h" -QModelIndex* QModelIndex_new() { - return new QModelIndex(); +void QModelIndex_new(QModelIndex** outptr_QModelIndex) { + QModelIndex* ret = new QModelIndex(); + *outptr_QModelIndex = ret; } -QModelIndex* QModelIndex_new2(QModelIndex* param1) { - return new QModelIndex(*param1); +void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex) { + QModelIndex* ret = new QModelIndex(*param1); + *outptr_QModelIndex = ret; } int QModelIndex_Row(const QModelIndex* self) { @@ -95,20 +98,27 @@ QVariant* QModelIndex_Data1(const QModelIndex* self, int role) { return new QVariant(self->data(static_cast(role))); } -void QModelIndex_Delete(QModelIndex* self) { - delete self; +void QModelIndex_Delete(QModelIndex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPersistentModelIndex* QPersistentModelIndex_new() { - return new QPersistentModelIndex(); +void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex) { + QPersistentModelIndex* ret = new QPersistentModelIndex(); + *outptr_QPersistentModelIndex = ret; } -QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index) { - return new QPersistentModelIndex(*index); +void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex) { + QPersistentModelIndex* ret = new QPersistentModelIndex(*index); + *outptr_QPersistentModelIndex = ret; } -QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other) { - return new QPersistentModelIndex(*other); +void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex) { + QPersistentModelIndex* ret = new QPersistentModelIndex(*other); + *outptr_QPersistentModelIndex = ret; } bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other) { @@ -193,8 +203,12 @@ QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int rol return new QVariant(self->data(static_cast(role))); } -void QPersistentModelIndex_Delete(QPersistentModelIndex* self) { - delete self; +void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { @@ -231,8 +245,8 @@ bool QAbstractItemModel_HasIndex(const QAbstractItemModel* self, int row, int co return self->hasIndex(static_cast(row), static_cast(column)); } -QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractItemModel_Parent(const QAbstractItemModel* self, QModelIndex* child) { @@ -243,32 +257,32 @@ QModelIndex* QAbstractItemModel_Sibling(const QAbstractItemModel* self, int row, return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -int QAbstractItemModel_RowCount(const QAbstractItemModel* self) { - return self->rowCount(); +int QAbstractItemModel_RowCount(const QAbstractItemModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self) { - return self->columnCount(); +int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self) { - return self->hasChildren(); +bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } -QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } struct miqt_map /* of int to QVariant* */ QAbstractItemModel_ItemData(const QAbstractItemModel* self, QModelIndex* index) { @@ -347,20 +361,20 @@ int QAbstractItemModel_SupportedDragActions(const QAbstractItemModel* self) { return static_cast(_ret); } -bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } -bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } bool QAbstractItemModel_MoveRows(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { @@ -408,16 +422,16 @@ int QAbstractItemModel_Flags(const QAbstractItemModel* self, QModelIndex* index) return static_cast(_ret); } -void QAbstractItemModel_Sort(QAbstractItemModel* self, int column) { - self->sort(static_cast(column)); +void QAbstractItemModel_Sort(QAbstractItemModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelIndex* index) { return new QModelIndex(self->buddy(*index)); } -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value); +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -566,54 +580,6 @@ bool QAbstractItemModel_HasIndex3(const QAbstractItemModel* self, int row, int c return self->hasIndex(static_cast(row), static_cast(column), *parent); } -QModelIndex* QAbstractItemModel_Index3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -int QAbstractItemModel_RowCount1(const QAbstractItemModel* self, QModelIndex* parent) { - return self->rowCount(*parent); -} - -int QAbstractItemModel_ColumnCount1(const QAbstractItemModel* self, QModelIndex* parent) { - return self->columnCount(*parent); -} - -bool QAbstractItemModel_HasChildren1(const QAbstractItemModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); -} - -QVariant* QAbstractItemModel_Data2(const QAbstractItemModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); -} - -bool QAbstractItemModel_SetData3(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); -} - -QVariant* QAbstractItemModel_HeaderData3(const QAbstractItemModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); -} - -bool QAbstractItemModel_SetHeaderData4(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); -} - -bool QAbstractItemModel_InsertRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); -} - -bool QAbstractItemModel_InsertColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); -} - -bool QAbstractItemModel_RemoveRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); -} - -bool QAbstractItemModel_RemoveColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); -} - bool QAbstractItemModel_InsertRow2(QAbstractItemModel* self, int row, QModelIndex* parent) { return self->insertRow(static_cast(row), *parent); } @@ -630,36 +596,6 @@ bool QAbstractItemModel_RemoveColumn2(QAbstractItemModel* self, int column, QMod return self->removeColumn(static_cast(column), *parent); } -void QAbstractItemModel_Sort2(QAbstractItemModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); -} - -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex* index, int options) { return self->checkIndex(*index, static_cast(options)); } @@ -804,8 +740,12 @@ void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self }); } -void QAbstractItemModel_Delete(QAbstractItemModel* self) { - delete self; +void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { @@ -838,8 +778,8 @@ struct miqt_string QAbstractTableModel_TrUtf8(const char* s) { return _ms; } -QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractTableModel_Sibling(const QAbstractTableModel* self, int row, int column, QModelIndex* idx) { @@ -899,12 +839,12 @@ struct miqt_string QAbstractTableModel_TrUtf83(const char* s, const char* c, int return _ms; } -QModelIndex* QAbstractTableModel_Index3(const QAbstractTableModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -void QAbstractTableModel_Delete(QAbstractTableModel* self) { - delete self; +void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { @@ -937,8 +877,8 @@ struct miqt_string QAbstractListModel_TrUtf8(const char* s) { return _ms; } -QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row) { - return new QModelIndex(self->index(static_cast(row))); +QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractListModel_Sibling(const QAbstractListModel* self, int row, int column, QModelIndex* idx) { @@ -998,15 +938,11 @@ struct miqt_string QAbstractListModel_TrUtf83(const char* s, const char* c, int return _ms; } -QModelIndex* QAbstractListModel_Index2(const QAbstractListModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); -} - -QModelIndex* QAbstractListModel_Index3(const QAbstractListModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -void QAbstractListModel_Delete(QAbstractListModel* self) { - delete self; +void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractitemmodel.go b/qt/gen_qabstractitemmodel.go index ccb60824..d9b29675 100644 --- a/qt/gen_qabstractitemmodel.go +++ b/qt/gen_qabstractitemmodel.go @@ -32,7 +32,8 @@ const ( ) type QModelIndex struct { - h *C.QModelIndex + h *C.QModelIndex + isSubclass bool } func (this *QModelIndex) cPointer() *C.QModelIndex { @@ -49,6 +50,7 @@ func (this *QModelIndex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQModelIndex constructs the type using only CGO pointers. func newQModelIndex(h *C.QModelIndex) *QModelIndex { if h == nil { return nil @@ -56,20 +58,33 @@ func newQModelIndex(h *C.QModelIndex) *QModelIndex { return &QModelIndex{h: h} } +// UnsafeNewQModelIndex constructs the type using only unsafe pointers. func UnsafeNewQModelIndex(h unsafe.Pointer) *QModelIndex { - return newQModelIndex((*C.QModelIndex)(h)) + if h == nil { + return nil + } + + return &QModelIndex{h: (*C.QModelIndex)(h)} } // NewQModelIndex constructs a new QModelIndex object. func NewQModelIndex() *QModelIndex { - ret := C.QModelIndex_new() - return newQModelIndex(ret) + var outptr_QModelIndex *C.QModelIndex = nil + + C.QModelIndex_new(&outptr_QModelIndex) + ret := newQModelIndex(outptr_QModelIndex) + ret.isSubclass = true + return ret } // NewQModelIndex2 constructs a new QModelIndex object. func NewQModelIndex2(param1 *QModelIndex) *QModelIndex { - ret := C.QModelIndex_new2(param1.cPointer()) - return newQModelIndex(ret) + var outptr_QModelIndex *C.QModelIndex = nil + + C.QModelIndex_new2(param1.cPointer(), &outptr_QModelIndex) + ret := newQModelIndex(outptr_QModelIndex) + ret.isSubclass = true + return ret } func (this *QModelIndex) Row() int { @@ -135,7 +150,7 @@ func (this *QModelIndex) Flags() ItemFlag { } func (this *QModelIndex) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QModelIndex_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QModelIndex_Model(this.h)), nil) } func (this *QModelIndex) IsValid() bool { @@ -163,7 +178,7 @@ func (this *QModelIndex) Data1(role int) *QVariant { // Delete this object from C++ memory. func (this *QModelIndex) Delete() { - C.QModelIndex_Delete(this.h) + C.QModelIndex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -176,7 +191,8 @@ func (this *QModelIndex) GoGC() { } type QPersistentModelIndex struct { - h *C.QPersistentModelIndex + h *C.QPersistentModelIndex + isSubclass bool } func (this *QPersistentModelIndex) cPointer() *C.QPersistentModelIndex { @@ -193,6 +209,7 @@ func (this *QPersistentModelIndex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPersistentModelIndex constructs the type using only CGO pointers. func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex { if h == nil { return nil @@ -200,26 +217,43 @@ func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex return &QPersistentModelIndex{h: h} } +// UnsafeNewQPersistentModelIndex constructs the type using only unsafe pointers. func UnsafeNewQPersistentModelIndex(h unsafe.Pointer) *QPersistentModelIndex { - return newQPersistentModelIndex((*C.QPersistentModelIndex)(h)) + if h == nil { + return nil + } + + return &QPersistentModelIndex{h: (*C.QPersistentModelIndex)(h)} } // NewQPersistentModelIndex constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex() *QPersistentModelIndex { - ret := C.QPersistentModelIndex_new() - return newQPersistentModelIndex(ret) + var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil + + C.QPersistentModelIndex_new(&outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret.isSubclass = true + return ret } // NewQPersistentModelIndex2 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex2(index *QModelIndex) *QPersistentModelIndex { - ret := C.QPersistentModelIndex_new2(index.cPointer()) - return newQPersistentModelIndex(ret) + var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil + + C.QPersistentModelIndex_new2(index.cPointer(), &outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret.isSubclass = true + return ret } // NewQPersistentModelIndex3 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex3(other *QPersistentModelIndex) *QPersistentModelIndex { - ret := C.QPersistentModelIndex_new3(other.cPointer()) - return newQPersistentModelIndex(ret) + var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil + + C.QPersistentModelIndex_new3(other.cPointer(), &outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret.isSubclass = true + return ret } func (this *QPersistentModelIndex) OperatorLesser(other *QPersistentModelIndex) bool { @@ -303,7 +337,7 @@ func (this *QPersistentModelIndex) Flags() ItemFlag { } func (this *QPersistentModelIndex) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QPersistentModelIndex_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QPersistentModelIndex_Model(this.h)), nil) } func (this *QPersistentModelIndex) IsValid() bool { @@ -319,7 +353,7 @@ func (this *QPersistentModelIndex) Data1(role int) *QVariant { // Delete this object from C++ memory. func (this *QPersistentModelIndex) Delete() { - C.QPersistentModelIndex_Delete(this.h) + C.QPersistentModelIndex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -332,7 +366,8 @@ func (this *QPersistentModelIndex) GoGC() { } type QAbstractItemModel struct { - h *C.QAbstractItemModel + h *C.QAbstractItemModel + isSubclass bool *QObject } @@ -350,15 +385,23 @@ func (this *QAbstractItemModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractItemModel(h *C.QAbstractItemModel) *QAbstractItemModel { +// newQAbstractItemModel constructs the type using only CGO pointers. +func newQAbstractItemModel(h *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractItemModel { if h == nil { return nil } - return &QAbstractItemModel{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractItemModel{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractItemModel(h unsafe.Pointer) *QAbstractItemModel { - return newQAbstractItemModel((*C.QAbstractItemModel)(h)) +// UnsafeNewQAbstractItemModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractItemModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemModel { + if h == nil { + return nil + } + + return &QAbstractItemModel{h: (*C.QAbstractItemModel)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractItemModel) MetaObject() *QMetaObject { @@ -393,8 +436,8 @@ func (this *QAbstractItemModel) HasIndex(row int, column int) bool { return (bool)(C.QAbstractItemModel_HasIndex(this.h, (C.int)(row), (C.int)(column))) } -func (this *QAbstractItemModel) Index(row int, column int) *QModelIndex { - _ret := C.QAbstractItemModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QAbstractItemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QAbstractItemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -414,38 +457,38 @@ func (this *QAbstractItemModel) Sibling(row int, column int, idx *QModelIndex) * return _goptr } -func (this *QAbstractItemModel) RowCount() int { - return (int)(C.QAbstractItemModel_RowCount(this.h)) +func (this *QAbstractItemModel) RowCount(parent *QModelIndex) int { + return (int)(C.QAbstractItemModel_RowCount(this.h, parent.cPointer())) } -func (this *QAbstractItemModel) ColumnCount() int { - return (int)(C.QAbstractItemModel_ColumnCount(this.h)) +func (this *QAbstractItemModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QAbstractItemModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QAbstractItemModel) HasChildren() bool { - return (bool)(C.QAbstractItemModel_HasChildren(this.h)) +func (this *QAbstractItemModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_HasChildren(this.h, parent.cPointer())) } -func (this *QAbstractItemModel) Data(index *QModelIndex) *QVariant { - _ret := C.QAbstractItemModel_Data(this.h, index.cPointer()) +func (this *QAbstractItemModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QAbstractItemModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QAbstractItemModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QAbstractItemModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QAbstractItemModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QAbstractItemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QAbstractItemModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QAbstractItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QAbstractItemModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QAbstractItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QAbstractItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QAbstractItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QAbstractItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QAbstractItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QAbstractItemModel) ItemData(index *QModelIndex) map[int]QVariant { @@ -505,7 +548,7 @@ func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma)), nil) } func (this *QAbstractItemModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -524,20 +567,20 @@ func (this *QAbstractItemModel) SupportedDragActions() DropAction { return (DropAction)(C.QAbstractItemModel_SupportedDragActions(this.h)) } -func (this *QAbstractItemModel) InsertRows(row int, count int) bool { - return (bool)(C.QAbstractItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QAbstractItemModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QAbstractItemModel) InsertColumns(column int, count int) bool { - return (bool)(C.QAbstractItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QAbstractItemModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QAbstractItemModel) RemoveRows(row int, count int) bool { - return (bool)(C.QAbstractItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QAbstractItemModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QAbstractItemModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QAbstractItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QAbstractItemModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QAbstractItemModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { @@ -584,8 +627,8 @@ func (this *QAbstractItemModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QAbstractItemModel_Flags(this.h, index.cPointer())) } -func (this *QAbstractItemModel) Sort(column int) { - C.QAbstractItemModel_Sort(this.h, (C.int)(column)) +func (this *QAbstractItemModel) Sort(column int, order SortOrder) { + C.QAbstractItemModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QAbstractItemModel) Buddy(index *QModelIndex) *QModelIndex { @@ -595,8 +638,8 @@ func (this *QAbstractItemModel) Buddy(index *QModelIndex) *QModelIndex { return _goptr } -func (this *QAbstractItemModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex { - var _ma C.struct_miqt_array = C.QAbstractItemModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer()) +func (this *QAbstractItemModel) Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + var _ma C.struct_miqt_array = C.QAbstractItemModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -771,63 +814,6 @@ func (this *QAbstractItemModel) HasIndex3(row int, column int, parent *QModelInd return (bool)(C.QAbstractItemModel_HasIndex3(this.h, (C.int)(row), (C.int)(column), parent.cPointer())) } -func (this *QAbstractItemModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QAbstractItemModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractItemModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QAbstractItemModel_RowCount1(this.h, parent.cPointer())) -} - -func (this *QAbstractItemModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QAbstractItemModel_ColumnCount1(this.h, parent.cPointer())) -} - -func (this *QAbstractItemModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_HasChildren1(this.h, parent.cPointer())) -} - -func (this *QAbstractItemModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QAbstractItemModel_Data2(this.h, index.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractItemModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QAbstractItemModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractItemModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QAbstractItemModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractItemModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QAbstractItemModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractItemModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QAbstractItemModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - -func (this *QAbstractItemModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QAbstractItemModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - func (this *QAbstractItemModel) InsertRow2(row int, parent *QModelIndex) bool { return (bool)(C.QAbstractItemModel_InsertRow2(this.h, (C.int)(row), parent.cPointer())) } @@ -844,36 +830,6 @@ func (this *QAbstractItemModel) RemoveColumn2(column int, parent *QModelIndex) b return (bool)(C.QAbstractItemModel_RemoveColumn2(this.h, (C.int)(column), parent.cPointer())) } -func (this *QAbstractItemModel) Sort2(column int, order SortOrder) { - C.QAbstractItemModel_Sort2(this.h, (C.int)(column), (C.int)(order)) -} - -func (this *QAbstractItemModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex { - var _ma C.struct_miqt_array = C.QAbstractItemModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - -func (this *QAbstractItemModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { - var _ma C.struct_miqt_array = C.QAbstractItemModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - func (this *QAbstractItemModel) CheckIndex2(index *QModelIndex, options QAbstractItemModel__CheckIndexOption) bool { return (bool)(C.QAbstractItemModel_CheckIndex2(this.h, index.cPointer(), (C.int)(options))) } @@ -1058,7 +1014,7 @@ func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t // Delete this object from C++ memory. func (this *QAbstractItemModel) Delete() { - C.QAbstractItemModel_Delete(this.h) + C.QAbstractItemModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1071,7 +1027,8 @@ func (this *QAbstractItemModel) GoGC() { } type QAbstractTableModel struct { - h *C.QAbstractTableModel + h *C.QAbstractTableModel + isSubclass bool *QAbstractItemModel } @@ -1089,15 +1046,23 @@ func (this *QAbstractTableModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractTableModel(h *C.QAbstractTableModel) *QAbstractTableModel { +// newQAbstractTableModel constructs the type using only CGO pointers. +func newQAbstractTableModel(h *C.QAbstractTableModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractTableModel { if h == nil { return nil } - return &QAbstractTableModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QAbstractTableModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQAbstractTableModel(h unsafe.Pointer) *QAbstractTableModel { - return newQAbstractTableModel((*C.QAbstractTableModel)(h)) +// UnsafeNewQAbstractTableModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractTableModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTableModel { + if h == nil { + return nil + } + + return &QAbstractTableModel{h: (*C.QAbstractTableModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } func (this *QAbstractTableModel) MetaObject() *QMetaObject { @@ -1128,8 +1093,8 @@ func QAbstractTableModel_TrUtf8(s string) string { return _ret } -func (this *QAbstractTableModel) Index(row int, column int) *QModelIndex { - _ret := C.QAbstractTableModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QAbstractTableModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QAbstractTableModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1194,16 +1159,9 @@ func QAbstractTableModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QAbstractTableModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QAbstractTableModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - // Delete this object from C++ memory. func (this *QAbstractTableModel) Delete() { - C.QAbstractTableModel_Delete(this.h) + C.QAbstractTableModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1216,7 +1174,8 @@ func (this *QAbstractTableModel) GoGC() { } type QAbstractListModel struct { - h *C.QAbstractListModel + h *C.QAbstractListModel + isSubclass bool *QAbstractItemModel } @@ -1234,15 +1193,23 @@ func (this *QAbstractListModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractListModel(h *C.QAbstractListModel) *QAbstractListModel { +// newQAbstractListModel constructs the type using only CGO pointers. +func newQAbstractListModel(h *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractListModel { if h == nil { return nil } - return &QAbstractListModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QAbstractListModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQAbstractListModel(h unsafe.Pointer) *QAbstractListModel { - return newQAbstractListModel((*C.QAbstractListModel)(h)) +// UnsafeNewQAbstractListModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractListModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractListModel { + if h == nil { + return nil + } + + return &QAbstractListModel{h: (*C.QAbstractListModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } func (this *QAbstractListModel) MetaObject() *QMetaObject { @@ -1273,8 +1240,8 @@ func QAbstractListModel_TrUtf8(s string) string { return _ret } -func (this *QAbstractListModel) Index(row int) *QModelIndex { - _ret := C.QAbstractListModel_Index(this.h, (C.int)(row)) +func (this *QAbstractListModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QAbstractListModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1339,23 +1306,9 @@ func QAbstractListModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QAbstractListModel) Index2(row int, column int) *QModelIndex { - _ret := C.QAbstractListModel_Index2(this.h, (C.int)(row), (C.int)(column)) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractListModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QAbstractListModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - // Delete this object from C++ memory. func (this *QAbstractListModel) Delete() { - C.QAbstractListModel_Delete(this.h) + C.QAbstractListModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractitemmodel.h b/qt/gen_qabstractitemmodel.h index a0f1324a..5a778a7a 100644 --- a/qt/gen_qabstractitemmodel.h +++ b/qt/gen_qabstractitemmodel.h @@ -22,6 +22,7 @@ class QByteArray; class QMetaObject; class QMimeData; class QModelIndex; +class QObject; class QPersistentModelIndex; class QSize; class QVariant; @@ -33,13 +34,14 @@ typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; typedef struct QPersistentModelIndex QPersistentModelIndex; typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QModelIndex* QModelIndex_new(); -QModelIndex* QModelIndex_new2(QModelIndex* param1); +void QModelIndex_new(QModelIndex** outptr_QModelIndex); +void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex); int QModelIndex_Row(const QModelIndex* self); int QModelIndex_Column(const QModelIndex* self); uintptr_t QModelIndex_InternalId(const QModelIndex* self); @@ -57,11 +59,11 @@ bool QModelIndex_OperatorEqual(const QModelIndex* self, QModelIndex* other); bool QModelIndex_OperatorNotEqual(const QModelIndex* self, QModelIndex* other); bool QModelIndex_OperatorLesser(const QModelIndex* self, QModelIndex* other); QVariant* QModelIndex_Data1(const QModelIndex* self, int role); -void QModelIndex_Delete(QModelIndex* self); +void QModelIndex_Delete(QModelIndex* self, bool isSubclass); -QPersistentModelIndex* QPersistentModelIndex_new(); -QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index); -QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other); +void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex); +void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex); +void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex); bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorNotEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); @@ -82,23 +84,23 @@ int QPersistentModelIndex_Flags(const QPersistentModelIndex* self); QAbstractItemModel* QPersistentModelIndex_Model(const QPersistentModelIndex* self); bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self); QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role); -void QPersistentModelIndex_Delete(QPersistentModelIndex* self); +void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass); QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self); void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1); struct miqt_string QAbstractItemModel_Tr(const char* s); struct miqt_string QAbstractItemModel_TrUtf8(const char* s); bool QAbstractItemModel_HasIndex(const QAbstractItemModel* self, int row, int column); -QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column); +QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QAbstractItemModel_Parent(const QAbstractItemModel* self, QModelIndex* child); QModelIndex* QAbstractItemModel_Sibling(const QAbstractItemModel* self, int row, int column, QModelIndex* idx); -int QAbstractItemModel_RowCount(const QAbstractItemModel* self); -int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self); -bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self); -QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index); -bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value); -QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation); -bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value); +int QAbstractItemModel_RowCount(const QAbstractItemModel* self, QModelIndex* parent); +int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self, QModelIndex* parent); +bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self, QModelIndex* parent); +QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index, int role); +bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation, int role); +bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role); struct miqt_map /* of int to QVariant* */ QAbstractItemModel_ItemData(const QAbstractItemModel* self, QModelIndex* index); bool QAbstractItemModel_SetItemData(QAbstractItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); struct miqt_array /* of struct miqt_string */ QAbstractItemModel_MimeTypes(const QAbstractItemModel* self); @@ -107,10 +109,10 @@ bool QAbstractItemModel_CanDropMimeData(const QAbstractItemModel* self, QMimeDat bool QAbstractItemModel_DropMimeData(QAbstractItemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); int QAbstractItemModel_SupportedDropActions(const QAbstractItemModel* self); int QAbstractItemModel_SupportedDragActions(const QAbstractItemModel* self); -bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count); -bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count); -bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count); -bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count); +bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent); +bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent); +bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent); +bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent); bool QAbstractItemModel_MoveRows(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); bool QAbstractItemModel_MoveColumns(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); bool QAbstractItemModel_InsertRow(QAbstractItemModel* self, int row); @@ -122,9 +124,9 @@ bool QAbstractItemModel_MoveColumn(QAbstractItemModel* self, QModelIndex* source void QAbstractItemModel_FetchMore(QAbstractItemModel* self, QModelIndex* parent); bool QAbstractItemModel_CanFetchMore(const QAbstractItemModel* self, QModelIndex* parent); int QAbstractItemModel_Flags(const QAbstractItemModel* self, QModelIndex* index); -void QAbstractItemModel_Sort(QAbstractItemModel* self, int column); +void QAbstractItemModel_Sort(QAbstractItemModel* self, int column, int order); QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelIndex* index); -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value); +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); QSize* QAbstractItemModel_Span(const QAbstractItemModel* self, QModelIndex* index); struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_RoleNames(const QAbstractItemModel* self); bool QAbstractItemModel_CheckIndex(const QAbstractItemModel* self, QModelIndex* index); @@ -143,25 +145,10 @@ struct miqt_string QAbstractItemModel_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractItemModel_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractItemModel_TrUtf83(const char* s, const char* c, int n); bool QAbstractItemModel_HasIndex3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent); -QModelIndex* QAbstractItemModel_Index3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent); -int QAbstractItemModel_RowCount1(const QAbstractItemModel* self, QModelIndex* parent); -int QAbstractItemModel_ColumnCount1(const QAbstractItemModel* self, QModelIndex* parent); -bool QAbstractItemModel_HasChildren1(const QAbstractItemModel* self, QModelIndex* parent); -QVariant* QAbstractItemModel_Data2(const QAbstractItemModel* self, QModelIndex* index, int role); -bool QAbstractItemModel_SetData3(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QAbstractItemModel_HeaderData3(const QAbstractItemModel* self, int section, int orientation, int role); -bool QAbstractItemModel_SetHeaderData4(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role); -bool QAbstractItemModel_InsertRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent); -bool QAbstractItemModel_InsertColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent); -bool QAbstractItemModel_RemoveRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent); -bool QAbstractItemModel_RemoveColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent); bool QAbstractItemModel_InsertRow2(QAbstractItemModel* self, int row, QModelIndex* parent); bool QAbstractItemModel_InsertColumn2(QAbstractItemModel* self, int column, QModelIndex* parent); bool QAbstractItemModel_RemoveRow2(QAbstractItemModel* self, int row, QModelIndex* parent); bool QAbstractItemModel_RemoveColumn2(QAbstractItemModel* self, int column, QModelIndex* parent); -void QAbstractItemModel_Sort2(QAbstractItemModel* self, int column, int order); -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits); -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex* index, int options); void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t slot); @@ -173,13 +160,13 @@ void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self, intptr_t slot); void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint); void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self, intptr_t slot); -void QAbstractItemModel_Delete(QAbstractItemModel* self); +void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass); QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self); void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1); struct miqt_string QAbstractTableModel_Tr(const char* s); struct miqt_string QAbstractTableModel_TrUtf8(const char* s); -QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column); +QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column, QModelIndex* parent); QModelIndex* QAbstractTableModel_Sibling(const QAbstractTableModel* self, int row, int column, QModelIndex* idx); bool QAbstractTableModel_DropMimeData(QAbstractTableModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); int QAbstractTableModel_Flags(const QAbstractTableModel* self, QModelIndex* index); @@ -187,14 +174,13 @@ struct miqt_string QAbstractTableModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractTableModel_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractTableModel_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractTableModel_TrUtf83(const char* s, const char* c, int n); -QModelIndex* QAbstractTableModel_Index3(const QAbstractTableModel* self, int row, int column, QModelIndex* parent); -void QAbstractTableModel_Delete(QAbstractTableModel* self); +void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass); QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self); void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1); struct miqt_string QAbstractListModel_Tr(const char* s); struct miqt_string QAbstractListModel_TrUtf8(const char* s); -QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row); +QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row, int column, QModelIndex* parent); QModelIndex* QAbstractListModel_Sibling(const QAbstractListModel* self, int row, int column, QModelIndex* idx); bool QAbstractListModel_DropMimeData(QAbstractListModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); int QAbstractListModel_Flags(const QAbstractListModel* self, QModelIndex* index); @@ -202,9 +188,7 @@ struct miqt_string QAbstractListModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractListModel_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractListModel_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractListModel_TrUtf83(const char* s, const char* c, int n); -QModelIndex* QAbstractListModel_Index2(const QAbstractListModel* self, int row, int column); -QModelIndex* QAbstractListModel_Index3(const QAbstractListModel* self, int row, int column, QModelIndex* parent); -void QAbstractListModel_Delete(QAbstractListModel* self); +void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractitemview.cpp b/qt/gen_qabstractitemview.cpp index cfec26e0..12aebb58 100644 --- a/qt/gen_qabstractitemview.cpp +++ b/qt/gen_qabstractitemview.cpp @@ -1,15 +1,32 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -231,8 +248,8 @@ QRect* QAbstractItemView_VisualRect(const QAbstractItemView* self, QModelIndex* return new QRect(self->visualRect(*index)); } -void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index) { - self->scrollTo(*index); +void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QModelIndex* QAbstractItemView_IndexAt(const QAbstractItemView* self, QPoint* point) { @@ -467,11 +484,11 @@ struct miqt_string QAbstractItemView_TrUtf83(const char* s, const char* c, int n return _ms; } -void QAbstractItemView_ScrollTo2(QAbstractItemView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); -} - -void QAbstractItemView_Delete(QAbstractItemView* self) { - delete self; +void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractitemview.go b/qt/gen_qabstractitemview.go index f556f4da..a7df8822 100644 --- a/qt/gen_qabstractitemview.go +++ b/qt/gen_qabstractitemview.go @@ -70,8 +70,45 @@ const ( QAbstractItemView__InternalMove QAbstractItemView__DragDropMode = 4 ) +type QAbstractItemView__CursorAction int + +const ( + QAbstractItemView__MoveUp QAbstractItemView__CursorAction = 0 + QAbstractItemView__MoveDown QAbstractItemView__CursorAction = 1 + QAbstractItemView__MoveLeft QAbstractItemView__CursorAction = 2 + QAbstractItemView__MoveRight QAbstractItemView__CursorAction = 3 + QAbstractItemView__MoveHome QAbstractItemView__CursorAction = 4 + QAbstractItemView__MoveEnd QAbstractItemView__CursorAction = 5 + QAbstractItemView__MovePageUp QAbstractItemView__CursorAction = 6 + QAbstractItemView__MovePageDown QAbstractItemView__CursorAction = 7 + QAbstractItemView__MoveNext QAbstractItemView__CursorAction = 8 + QAbstractItemView__MovePrevious QAbstractItemView__CursorAction = 9 +) + +type QAbstractItemView__State int + +const ( + QAbstractItemView__NoState QAbstractItemView__State = 0 + QAbstractItemView__DraggingState QAbstractItemView__State = 1 + QAbstractItemView__DragSelectingState QAbstractItemView__State = 2 + QAbstractItemView__EditingState QAbstractItemView__State = 3 + QAbstractItemView__ExpandingState QAbstractItemView__State = 4 + QAbstractItemView__CollapsingState QAbstractItemView__State = 5 + QAbstractItemView__AnimatingState QAbstractItemView__State = 6 +) + +type QAbstractItemView__DropIndicatorPosition int + +const ( + QAbstractItemView__OnItem QAbstractItemView__DropIndicatorPosition = 0 + QAbstractItemView__AboveItem QAbstractItemView__DropIndicatorPosition = 1 + QAbstractItemView__BelowItem QAbstractItemView__DropIndicatorPosition = 2 + QAbstractItemView__OnViewport QAbstractItemView__DropIndicatorPosition = 3 +) + type QAbstractItemView struct { - h *C.QAbstractItemView + h *C.QAbstractItemView + isSubclass bool *QAbstractScrollArea } @@ -89,15 +126,23 @@ func (this *QAbstractItemView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractItemView(h *C.QAbstractItemView) *QAbstractItemView { +// newQAbstractItemView constructs the type using only CGO pointers. +func newQAbstractItemView(h *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractItemView { if h == nil { return nil } - return &QAbstractItemView{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QAbstractItemView{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractItemView(h unsafe.Pointer) *QAbstractItemView { - return newQAbstractItemView((*C.QAbstractItemView)(h)) +// UnsafeNewQAbstractItemView constructs the type using only unsafe pointers. +func UnsafeNewQAbstractItemView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractItemView { + if h == nil { + return nil + } + + return &QAbstractItemView{h: (*C.QAbstractItemView)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } func (this *QAbstractItemView) MetaObject() *QMetaObject { @@ -133,7 +178,7 @@ func (this *QAbstractItemView) SetModel(model *QAbstractItemModel) { } func (this *QAbstractItemView) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractItemView_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractItemView_Model(this.h)), nil) } func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionModel) { @@ -141,7 +186,7 @@ func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionM } func (this *QAbstractItemView) SelectionModel() *QItemSelectionModel { - return UnsafeNewQItemSelectionModel(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h))) + return UnsafeNewQItemSelectionModel(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h)), nil) } func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -149,7 +194,7 @@ func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QAbstractItemView) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h)), nil) } func (this *QAbstractItemView) SetSelectionMode(mode QAbstractItemView__SelectionMode) { @@ -320,8 +365,8 @@ func (this *QAbstractItemView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QAbstractItemView) ScrollTo(index *QModelIndex) { - C.QAbstractItemView_ScrollTo(this.h, index.cPointer()) +func (this *QAbstractItemView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QAbstractItemView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QAbstractItemView) IndexAt(point *QPoint) *QModelIndex { @@ -363,7 +408,7 @@ func (this *QAbstractItemView) SetIndexWidget(index *QModelIndex, widget *QWidge } func (this *QAbstractItemView) IndexWidget(index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())), nil, nil) } func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstractItemDelegate) { @@ -371,7 +416,7 @@ func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstrac } func (this *QAbstractItemView) ItemDelegateForRow(row int) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row)))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))), nil) } func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QAbstractItemDelegate) { @@ -379,11 +424,11 @@ func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QA } func (this *QAbstractItemView) ItemDelegateForColumn(column int) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column)))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))), nil) } func (this *QAbstractItemView) ItemDelegateWithIndex(index *QModelIndex) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer()))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())), nil) } func (this *QAbstractItemView) InputMethodQuery(query InputMethodQuery) *QVariant { @@ -614,13 +659,9 @@ func QAbstractItemView_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QAbstractItemView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QAbstractItemView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) -} - // Delete this object from C++ memory. func (this *QAbstractItemView) Delete() { - C.QAbstractItemView_Delete(this.h) + C.QAbstractItemView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractitemview.h b/qt/gen_qabstractitemview.h index df43423d..53aad1e8 100644 --- a/qt/gen_qabstractitemview.h +++ b/qt/gen_qabstractitemview.h @@ -18,24 +18,56 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QVariant; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif @@ -88,7 +120,7 @@ void QAbstractItemView_SetTextElideMode(QAbstractItemView* self, int mode); int QAbstractItemView_TextElideMode(const QAbstractItemView* self); void QAbstractItemView_KeyboardSearch(QAbstractItemView* self, struct miqt_string search); QRect* QAbstractItemView_VisualRect(const QAbstractItemView* self, QModelIndex* index); -void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index); +void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index, int hint); QModelIndex* QAbstractItemView_IndexAt(const QAbstractItemView* self, QPoint* point); QSize* QAbstractItemView_SizeHintForIndex(const QAbstractItemView* self, QModelIndex* index); int QAbstractItemView_SizeHintForRow(const QAbstractItemView* self, int row); @@ -114,6 +146,20 @@ void QAbstractItemView_SetCurrentIndex(QAbstractItemView* self, QModelIndex* ind void QAbstractItemView_ScrollToTop(QAbstractItemView* self); void QAbstractItemView_ScrollToBottom(QAbstractItemView* self); void QAbstractItemView_Update(QAbstractItemView* self, QModelIndex* index); +void QAbstractItemView_DataChanged(QAbstractItemView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QAbstractItemView_RowsInserted(QAbstractItemView* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_RowsAboutToBeRemoved(QAbstractItemView* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_CurrentChanged(QAbstractItemView* self, QModelIndex* current, QModelIndex* previous); +void QAbstractItemView_UpdateEditorData(QAbstractItemView* self); +void QAbstractItemView_UpdateEditorGeometries(QAbstractItemView* self); +void QAbstractItemView_UpdateGeometries(QAbstractItemView* self); +void QAbstractItemView_VerticalScrollbarAction(QAbstractItemView* self, int action); +void QAbstractItemView_HorizontalScrollbarAction(QAbstractItemView* self, int action); +void QAbstractItemView_VerticalScrollbarValueChanged(QAbstractItemView* self, int value); +void QAbstractItemView_HorizontalScrollbarValueChanged(QAbstractItemView* self, int value); +void QAbstractItemView_CloseEditor(QAbstractItemView* self, QWidget* editor, int hint); +void QAbstractItemView_CommitData(QAbstractItemView* self, QWidget* editor); +void QAbstractItemView_EditorDestroyed(QAbstractItemView* self, QObject* editor); void QAbstractItemView_Pressed(QAbstractItemView* self, QModelIndex* index); void QAbstractItemView_connect_Pressed(QAbstractItemView* self, intptr_t slot); void QAbstractItemView_Clicked(QAbstractItemView* self, QModelIndex* index); @@ -128,12 +174,40 @@ void QAbstractItemView_ViewportEntered(QAbstractItemView* self); void QAbstractItemView_connect_ViewportEntered(QAbstractItemView* self, intptr_t slot); void QAbstractItemView_IconSizeChanged(QAbstractItemView* self, QSize* size); void QAbstractItemView_connect_IconSizeChanged(QAbstractItemView* self, intptr_t slot); +QModelIndex* QAbstractItemView_MoveCursor(QAbstractItemView* self, int cursorAction, int modifiers); +int QAbstractItemView_HorizontalOffset(const QAbstractItemView* self); +int QAbstractItemView_VerticalOffset(const QAbstractItemView* self); +bool QAbstractItemView_IsIndexHidden(const QAbstractItemView* self, QModelIndex* index); +void QAbstractItemView_SetSelection(QAbstractItemView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QAbstractItemView_SelectedIndexes(const QAbstractItemView* self); +bool QAbstractItemView_Edit2(QAbstractItemView* self, QModelIndex* index, int trigger, QEvent* event); +int QAbstractItemView_SelectionCommand(const QAbstractItemView* self, QModelIndex* index, QEvent* event); +void QAbstractItemView_StartDrag(QAbstractItemView* self, int supportedActions); +QStyleOptionViewItem* QAbstractItemView_ViewOptions(const QAbstractItemView* self); +bool QAbstractItemView_FocusNextPrevChild(QAbstractItemView* self, bool next); +bool QAbstractItemView_Event(QAbstractItemView* self, QEvent* event); +bool QAbstractItemView_ViewportEvent(QAbstractItemView* self, QEvent* event); +void QAbstractItemView_MousePressEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_MouseMoveEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_MouseReleaseEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_MouseDoubleClickEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_DragEnterEvent(QAbstractItemView* self, QDragEnterEvent* event); +void QAbstractItemView_DragMoveEvent(QAbstractItemView* self, QDragMoveEvent* event); +void QAbstractItemView_DragLeaveEvent(QAbstractItemView* self, QDragLeaveEvent* event); +void QAbstractItemView_DropEvent(QAbstractItemView* self, QDropEvent* event); +void QAbstractItemView_FocusInEvent(QAbstractItemView* self, QFocusEvent* event); +void QAbstractItemView_FocusOutEvent(QAbstractItemView* self, QFocusEvent* event); +void QAbstractItemView_KeyPressEvent(QAbstractItemView* self, QKeyEvent* event); +void QAbstractItemView_ResizeEvent(QAbstractItemView* self, QResizeEvent* event); +void QAbstractItemView_TimerEvent(QAbstractItemView* self, QTimerEvent* event); +void QAbstractItemView_InputMethodEvent(QAbstractItemView* self, QInputMethodEvent* event); +bool QAbstractItemView_EventFilter(QAbstractItemView* self, QObject* object, QEvent* event); +QSize* QAbstractItemView_ViewportSizeHint(const QAbstractItemView* self); struct miqt_string QAbstractItemView_Tr2(const char* s, const char* c); struct miqt_string QAbstractItemView_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractItemView_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractItemView_TrUtf83(const char* s, const char* c, int n); -void QAbstractItemView_ScrollTo2(QAbstractItemView* self, QModelIndex* index, int hint); -void QAbstractItemView_Delete(QAbstractItemView* self); +void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractnativeeventfilter.cpp b/qt/gen_qabstractnativeeventfilter.cpp index 53166bf8..0fe7809a 100644 --- a/qt/gen_qabstractnativeeventfilter.cpp +++ b/qt/gen_qabstractnativeeventfilter.cpp @@ -9,7 +9,11 @@ bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* se return self->nativeEventFilter(eventType_QByteArray, message, static_cast(result)); } -void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self) { - delete self; +void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractnativeeventfilter.go b/qt/gen_qabstractnativeeventfilter.go index f4a6fb00..114b960d 100644 --- a/qt/gen_qabstractnativeeventfilter.go +++ b/qt/gen_qabstractnativeeventfilter.go @@ -14,7 +14,8 @@ import ( ) type QAbstractNativeEventFilter struct { - h *C.QAbstractNativeEventFilter + h *C.QAbstractNativeEventFilter + isSubclass bool } func (this *QAbstractNativeEventFilter) cPointer() *C.QAbstractNativeEventFilter { @@ -31,6 +32,7 @@ func (this *QAbstractNativeEventFilter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractNativeEventFilter constructs the type using only CGO pointers. func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNativeEventFilter { if h == nil { return nil @@ -38,8 +40,13 @@ func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNa return &QAbstractNativeEventFilter{h: h} } +// UnsafeNewQAbstractNativeEventFilter constructs the type using only unsafe pointers. func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEventFilter { - return newQAbstractNativeEventFilter((*C.QAbstractNativeEventFilter)(h)) + if h == nil { + return nil + } + + return &QAbstractNativeEventFilter{h: (*C.QAbstractNativeEventFilter)(h)} } func (this *QAbstractNativeEventFilter) NativeEventFilter(eventType []byte, message unsafe.Pointer, result *int64) bool { @@ -51,7 +58,7 @@ func (this *QAbstractNativeEventFilter) NativeEventFilter(eventType []byte, mess // Delete this object from C++ memory. func (this *QAbstractNativeEventFilter) Delete() { - C.QAbstractNativeEventFilter_Delete(this.h) + C.QAbstractNativeEventFilter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractnativeeventfilter.h b/qt/gen_qabstractnativeeventfilter.h index 32141bb9..0274c984 100644 --- a/qt/gen_qabstractnativeeventfilter.h +++ b/qt/gen_qabstractnativeeventfilter.h @@ -23,7 +23,7 @@ typedef struct QByteArray QByteArray; #endif bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, long* result); -void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self); +void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractproxymodel.cpp b/qt/gen_qabstractproxymodel.cpp index e6d5a1d2..6fa7214d 100644 --- a/qt/gen_qabstractproxymodel.cpp +++ b/qt/gen_qabstractproxymodel.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -68,12 +69,12 @@ void QAbstractProxyModel_Revert(QAbstractProxyModel* self) { self->revert(); } -QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex) { - return new QVariant(self->data(*proxyIndex)); +QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role) { + return new QVariant(self->data(*proxyIndex, static_cast(role))); } -QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_ItemData(const QAbstractProxyModel* self, QModelIndex* index) { @@ -99,8 +100,8 @@ int QAbstractProxyModel_Flags(const QAbstractProxyModel* self, QModelIndex* inde return static_cast(_ret); } -bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } bool QAbstractProxyModel_SetItemData(QAbstractProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { @@ -113,8 +114,8 @@ bool QAbstractProxyModel_SetItemData(QAbstractProxyModel* self, QModelIndex* ind return self->setItemData(*index, roles_QMap); } -bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } QModelIndex* QAbstractProxyModel_Buddy(const QAbstractProxyModel* self, QModelIndex* index) { @@ -129,16 +130,16 @@ void QAbstractProxyModel_FetchMore(QAbstractProxyModel* self, QModelIndex* paren self->fetchMore(*parent); } -void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column) { - self->sort(static_cast(column)); +void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } QSize* QAbstractProxyModel_Span(const QAbstractProxyModel* self, QModelIndex* index) { return new QSize(self->span(*index)); } -bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self) { - return self->hasChildren(); +bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int row, int column, QModelIndex* idx) { @@ -237,31 +238,11 @@ struct miqt_string QAbstractProxyModel_TrUtf83(const char* s, const char* c, int return _ms; } -QVariant* QAbstractProxyModel_Data2(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role) { - return new QVariant(self->data(*proxyIndex, static_cast(role))); -} - -QVariant* QAbstractProxyModel_HeaderData3(const QAbstractProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); -} - -bool QAbstractProxyModel_SetData3(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); -} - -bool QAbstractProxyModel_SetHeaderData4(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); -} - -void QAbstractProxyModel_Sort2(QAbstractProxyModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); -} - -bool QAbstractProxyModel_HasChildren1(const QAbstractProxyModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); -} - -void QAbstractProxyModel_Delete(QAbstractProxyModel* self) { - delete self; +void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractproxymodel.go b/qt/gen_qabstractproxymodel.go index e0821bb5..f7a51461 100644 --- a/qt/gen_qabstractproxymodel.go +++ b/qt/gen_qabstractproxymodel.go @@ -14,7 +14,8 @@ import ( ) type QAbstractProxyModel struct { - h *C.QAbstractProxyModel + h *C.QAbstractProxyModel + isSubclass bool *QAbstractItemModel } @@ -32,15 +33,23 @@ func (this *QAbstractProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractProxyModel(h *C.QAbstractProxyModel) *QAbstractProxyModel { +// newQAbstractProxyModel constructs the type using only CGO pointers. +func newQAbstractProxyModel(h *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractProxyModel { if h == nil { return nil } - return &QAbstractProxyModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QAbstractProxyModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQAbstractProxyModel(h unsafe.Pointer) *QAbstractProxyModel { - return newQAbstractProxyModel((*C.QAbstractProxyModel)(h)) +// UnsafeNewQAbstractProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractProxyModel { + if h == nil { + return nil + } + + return &QAbstractProxyModel{h: (*C.QAbstractProxyModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } func (this *QAbstractProxyModel) MetaObject() *QMetaObject { @@ -76,7 +85,7 @@ func (this *QAbstractProxyModel) SetSourceModel(sourceModel *QAbstractItemModel) } func (this *QAbstractProxyModel) SourceModel() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractProxyModel_SourceModel(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractProxyModel_SourceModel(this.h)), nil) } func (this *QAbstractProxyModel) MapToSource(proxyIndex *QModelIndex) *QModelIndex { @@ -101,15 +110,15 @@ func (this *QAbstractProxyModel) Revert() { C.QAbstractProxyModel_Revert(this.h) } -func (this *QAbstractProxyModel) Data(proxyIndex *QModelIndex) *QVariant { - _ret := C.QAbstractProxyModel_Data(this.h, proxyIndex.cPointer()) +func (this *QAbstractProxyModel) Data(proxyIndex *QModelIndex, role int) *QVariant { + _ret := C.QAbstractProxyModel_Data(this.h, proxyIndex.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QAbstractProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QAbstractProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QAbstractProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QAbstractProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -137,8 +146,8 @@ func (this *QAbstractProxyModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QAbstractProxyModel_Flags(this.h, index.cPointer())) } -func (this *QAbstractProxyModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QAbstractProxyModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QAbstractProxyModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QAbstractProxyModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QAbstractProxyModel) SetItemData(index *QModelIndex, roles map[int]QVariant) bool { @@ -160,8 +169,8 @@ func (this *QAbstractProxyModel) SetItemData(index *QModelIndex, roles map[int]Q return (bool)(C.QAbstractProxyModel_SetItemData(this.h, index.cPointer(), roles_mm)) } -func (this *QAbstractProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QAbstractProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QAbstractProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QAbstractProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QAbstractProxyModel) Buddy(index *QModelIndex) *QModelIndex { @@ -179,8 +188,8 @@ func (this *QAbstractProxyModel) FetchMore(parent *QModelIndex) { C.QAbstractProxyModel_FetchMore(this.h, parent.cPointer()) } -func (this *QAbstractProxyModel) Sort(column int) { - C.QAbstractProxyModel_Sort(this.h, (C.int)(column)) +func (this *QAbstractProxyModel) Sort(column int, order SortOrder) { + C.QAbstractProxyModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QAbstractProxyModel) Span(index *QModelIndex) *QSize { @@ -190,8 +199,8 @@ func (this *QAbstractProxyModel) Span(index *QModelIndex) *QSize { return _goptr } -func (this *QAbstractProxyModel) HasChildren() bool { - return (bool)(C.QAbstractProxyModel_HasChildren(this.h)) +func (this *QAbstractProxyModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QAbstractProxyModel_HasChildren(this.h, parent.cPointer())) } func (this *QAbstractProxyModel) Sibling(row int, column int, idx *QModelIndex) *QModelIndex { @@ -208,7 +217,7 @@ func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)), nil) } func (this *QAbstractProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -284,39 +293,9 @@ func QAbstractProxyModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QAbstractProxyModel) Data2(proxyIndex *QModelIndex, role int) *QVariant { - _ret := C.QAbstractProxyModel_Data2(this.h, proxyIndex.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QAbstractProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractProxyModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QAbstractProxyModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QAbstractProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractProxyModel) Sort2(column int, order SortOrder) { - C.QAbstractProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order)) -} - -func (this *QAbstractProxyModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QAbstractProxyModel_HasChildren1(this.h, parent.cPointer())) -} - // Delete this object from C++ memory. func (this *QAbstractProxyModel) Delete() { - C.QAbstractProxyModel_Delete(this.h) + C.QAbstractProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractproxymodel.h b/qt/gen_qabstractproxymodel.h index ebbcf22d..99e897fa 100644 --- a/qt/gen_qabstractproxymodel.h +++ b/qt/gen_qabstractproxymodel.h @@ -20,6 +20,7 @@ class QAbstractProxyModel; class QMetaObject; class QMimeData; class QModelIndex; +class QObject; class QSize; class QVariant; #else @@ -28,6 +29,7 @@ typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; typedef struct QSize QSize; typedef struct QVariant QVariant; #endif @@ -42,19 +44,19 @@ QModelIndex* QAbstractProxyModel_MapToSource(const QAbstractProxyModel* self, QM QModelIndex* QAbstractProxyModel_MapFromSource(const QAbstractProxyModel* self, QModelIndex* sourceIndex); bool QAbstractProxyModel_Submit(QAbstractProxyModel* self); void QAbstractProxyModel_Revert(QAbstractProxyModel* self); -QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex); -QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation); +QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role); +QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation, int role); struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_ItemData(const QAbstractProxyModel* self, QModelIndex* index); int QAbstractProxyModel_Flags(const QAbstractProxyModel* self, QModelIndex* index); -bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value); +bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role); bool QAbstractProxyModel_SetItemData(QAbstractProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); -bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value); +bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role); QModelIndex* QAbstractProxyModel_Buddy(const QAbstractProxyModel* self, QModelIndex* index); bool QAbstractProxyModel_CanFetchMore(const QAbstractProxyModel* self, QModelIndex* parent); void QAbstractProxyModel_FetchMore(QAbstractProxyModel* self, QModelIndex* parent); -void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column); +void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column, int order); QSize* QAbstractProxyModel_Span(const QAbstractProxyModel* self, QModelIndex* index); -bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self); +bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self, QModelIndex* parent); QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int row, int column, QModelIndex* idx); QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QAbstractProxyModel_CanDropMimeData(const QAbstractProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -66,13 +68,7 @@ struct miqt_string QAbstractProxyModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractProxyModel_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractProxyModel_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractProxyModel_TrUtf83(const char* s, const char* c, int n); -QVariant* QAbstractProxyModel_Data2(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role); -QVariant* QAbstractProxyModel_HeaderData3(const QAbstractProxyModel* self, int section, int orientation, int role); -bool QAbstractProxyModel_SetData3(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role); -bool QAbstractProxyModel_SetHeaderData4(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role); -void QAbstractProxyModel_Sort2(QAbstractProxyModel* self, int column, int order); -bool QAbstractProxyModel_HasChildren1(const QAbstractProxyModel* self, QModelIndex* parent); -void QAbstractProxyModel_Delete(QAbstractProxyModel* self); +void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractscrollarea.cpp b/qt/gen_qabstractscrollarea.cpp index 6d4821e0..ed1f808b 100644 --- a/qt/gen_qabstractscrollarea.cpp +++ b/qt/gen_qabstractscrollarea.cpp @@ -1,22 +1,577 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include "gen_qabstractscrollarea.h" #include "_cgo_export.h" -QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent) { - return new QAbstractScrollArea(parent); +class MiqtVirtualQAbstractScrollArea : public virtual QAbstractScrollArea { +public: + + MiqtVirtualQAbstractScrollArea(QWidget* parent): QAbstractScrollArea(parent) {}; + MiqtVirtualQAbstractScrollArea(): QAbstractScrollArea() {}; + + virtual ~MiqtVirtualQAbstractScrollArea() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractScrollArea::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractScrollArea_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractScrollArea::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractScrollArea::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractScrollArea_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractScrollArea::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QAbstractScrollArea::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QAbstractScrollArea_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QAbstractScrollArea::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QAbstractScrollArea::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QAbstractScrollArea_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QAbstractScrollArea::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QAbstractScrollArea::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAbstractScrollArea_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QAbstractScrollArea::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QAbstractScrollArea::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAbstractScrollArea_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QAbstractScrollArea::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QAbstractScrollArea::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QAbstractScrollArea::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QAbstractScrollArea::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QAbstractScrollArea::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QAbstractScrollArea::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QAbstractScrollArea::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QAbstractScrollArea::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QAbstractScrollArea::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QAbstractScrollArea::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QAbstractScrollArea::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QAbstractScrollArea::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QAbstractScrollArea::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QAbstractScrollArea::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QAbstractScrollArea::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QAbstractScrollArea::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QAbstractScrollArea::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QAbstractScrollArea::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QAbstractScrollArea::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QAbstractScrollArea::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QAbstractScrollArea::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QAbstractScrollArea::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QAbstractScrollArea::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QAbstractScrollArea::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QAbstractScrollArea_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QAbstractScrollArea::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QAbstractScrollArea::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractScrollArea_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QAbstractScrollArea::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QAbstractScrollArea::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QAbstractScrollArea::changeEvent(param1); + + } + +}; + +void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(parent); + *outptr_QAbstractScrollArea = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractScrollArea* QAbstractScrollArea_new2() { - return new QAbstractScrollArea(); +void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(); + *outptr_QAbstractScrollArea = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self) { @@ -185,7 +740,187 @@ struct miqt_string QAbstractScrollArea_TrUtf83(const char* s, const char* c, int return _ms; } -void QAbstractScrollArea_Delete(QAbstractScrollArea* self) { - delete self; +void QAbstractScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractScrollArea_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractScrollArea_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractScrollArea_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__SetupViewport = slot; +} + +void QAbstractScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QAbstractScrollArea_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QAbstractScrollArea_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__Event = slot; +} + +bool QAbstractScrollArea_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_Event(param1); +} + +void QAbstractScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ViewportEvent = slot; +} + +bool QAbstractScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QAbstractScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QAbstractScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_PaintEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QAbstractScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_WheelEvent(param1); +} + +void QAbstractScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DropEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DropEvent(param1); +} + +void QAbstractScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QAbstractScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ScrollContentsBy = slot; +} + +void QAbstractScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QAbstractScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QAbstractScrollArea_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QAbstractScrollArea_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractScrollArea_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QAbstractScrollArea_Delete(QAbstractScrollArea* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractscrollarea.go b/qt/gen_qabstractscrollarea.go index ce3af480..c31a380e 100644 --- a/qt/gen_qabstractscrollarea.go +++ b/qt/gen_qabstractscrollarea.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -22,7 +23,8 @@ const ( ) type QAbstractScrollArea struct { - h *C.QAbstractScrollArea + h *C.QAbstractScrollArea + isSubclass bool *QFrame } @@ -40,27 +42,51 @@ func (this *QAbstractScrollArea) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractScrollArea(h *C.QAbstractScrollArea) *QAbstractScrollArea { +// newQAbstractScrollArea constructs the type using only CGO pointers. +func newQAbstractScrollArea(h *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractScrollArea { if h == nil { return nil } - return &QAbstractScrollArea{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QAbstractScrollArea{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractScrollArea(h unsafe.Pointer) *QAbstractScrollArea { - return newQAbstractScrollArea((*C.QAbstractScrollArea)(h)) +// UnsafeNewQAbstractScrollArea constructs the type using only unsafe pointers. +func UnsafeNewQAbstractScrollArea(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractScrollArea { + if h == nil { + return nil + } + + return &QAbstractScrollArea{h: (*C.QAbstractScrollArea)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractScrollArea constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea(parent *QWidget) *QAbstractScrollArea { - ret := C.QAbstractScrollArea_new(parent.cPointer()) - return newQAbstractScrollArea(ret) + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractScrollArea_new(parent.cPointer(), &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractScrollArea2 constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea2() *QAbstractScrollArea { - ret := C.QAbstractScrollArea_new2() - return newQAbstractScrollArea(ret) + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractScrollArea_new2(&outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractScrollArea) MetaObject() *QMetaObject { @@ -100,7 +126,7 @@ func (this *QAbstractScrollArea) SetVerticalScrollBarPolicy(verticalScrollBarPol } func (this *QAbstractScrollArea) VerticalScrollBar() *QScrollBar { - return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h))) + return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h)), nil, nil, nil, nil) } func (this *QAbstractScrollArea) SetVerticalScrollBar(scrollbar *QScrollBar) { @@ -116,7 +142,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBarPolicy(horizontalScrollBa } func (this *QAbstractScrollArea) HorizontalScrollBar() *QScrollBar { - return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h))) + return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h)), nil, nil, nil, nil) } func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { @@ -124,7 +150,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { } func (this *QAbstractScrollArea) CornerWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h)), nil, nil) } func (this *QAbstractScrollArea) SetCornerWidget(widget *QWidget) { @@ -140,13 +166,13 @@ func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QW _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func (this *QAbstractScrollArea) Viewport() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h)), nil, nil) } func (this *QAbstractScrollArea) SetViewport(widget *QWidget) { @@ -230,9 +256,530 @@ func QAbstractScrollArea_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractScrollArea) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractScrollArea_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractScrollArea) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractScrollArea_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MinimumSizeHint +func miqt_exec_callback_QAbstractScrollArea_MinimumSizeHint(self *C.QAbstractScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractScrollArea) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractScrollArea_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractScrollArea) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractScrollArea_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_SizeHint +func miqt_exec_callback_QAbstractScrollArea_SizeHint(self *C.QAbstractScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractScrollArea) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QAbstractScrollArea_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QAbstractScrollArea) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QAbstractScrollArea_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_SetupViewport +func miqt_exec_callback_QAbstractScrollArea_SetupViewport(self *C.QAbstractScrollArea, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QAbstractScrollArea_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QAbstractScrollArea) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QAbstractScrollArea_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_EventFilter +func miqt_exec_callback_QAbstractScrollArea_EventFilter(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractScrollArea) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QAbstractScrollArea_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAbstractScrollArea) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QAbstractScrollArea_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_Event +func miqt_exec_callback_QAbstractScrollArea_Event(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QAbstractScrollArea_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAbstractScrollArea) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QAbstractScrollArea_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ViewportEvent +func miqt_exec_callback_QAbstractScrollArea_ViewportEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QAbstractScrollArea_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QAbstractScrollArea_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ResizeEvent +func miqt_exec_callback_QAbstractScrollArea_ResizeEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QAbstractScrollArea_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QAbstractScrollArea_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_PaintEvent +func miqt_exec_callback_QAbstractScrollArea_PaintEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MousePressEvent +func miqt_exec_callback_QAbstractScrollArea_MousePressEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent +func miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent +func miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QAbstractScrollArea_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QAbstractScrollArea_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_WheelEvent +func miqt_exec_callback_QAbstractScrollArea_WheelEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QAbstractScrollArea_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QAbstractScrollArea_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent +func miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QAbstractScrollArea_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QAbstractScrollArea_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DragEnterEvent +func miqt_exec_callback_QAbstractScrollArea_DragEnterEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DragMoveEvent(param1 *QDragMoveEvent) { + + C.QAbstractScrollArea_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDragMoveEvent(slot func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) { + C.QAbstractScrollArea_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DragMoveEvent +func miqt_exec_callback_QAbstractScrollArea_DragMoveEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DragLeaveEvent(param1 *QDragLeaveEvent) { + + C.QAbstractScrollArea_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDragLeaveEvent(slot func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) { + C.QAbstractScrollArea_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent +func miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QAbstractScrollArea_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QAbstractScrollArea_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DropEvent +func miqt_exec_callback_QAbstractScrollArea_DropEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QAbstractScrollArea_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QAbstractScrollArea_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_KeyPressEvent +func miqt_exec_callback_QAbstractScrollArea_KeyPressEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QAbstractScrollArea_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QAbstractScrollArea) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QAbstractScrollArea_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ScrollContentsBy +func miqt_exec_callback_QAbstractScrollArea_ScrollContentsBy(self *C.QAbstractScrollArea, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QAbstractScrollArea_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractScrollArea) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractScrollArea_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ViewportSizeHint +func miqt_exec_callback_QAbstractScrollArea_ViewportSizeHint(self *C.QAbstractScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractScrollArea) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QAbstractScrollArea_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QAbstractScrollArea_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ChangeEvent +func miqt_exec_callback_QAbstractScrollArea_ChangeEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractScrollArea) Delete() { - C.QAbstractScrollArea_Delete(this.h) + C.QAbstractScrollArea_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractscrollarea.h b/qt/gen_qabstractscrollarea.h index 269efcc1..66dfd8a6 100644 --- a/qt/gen_qabstractscrollarea.h +++ b/qt/gen_qabstractscrollarea.h @@ -16,20 +16,48 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; class QScrollBar; class QSize; +class QWheelEvent; class QWidget; #else typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; typedef struct QScrollBar QScrollBar; typedef struct QSize QSize; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent); -QAbstractScrollArea* QAbstractScrollArea_new2(); +void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self); void* QAbstractScrollArea_Metacast(QAbstractScrollArea* self, const char* param1); struct miqt_string QAbstractScrollArea_Tr(const char* s); @@ -54,11 +82,73 @@ QSize* QAbstractScrollArea_SizeHint(const QAbstractScrollArea* self); void QAbstractScrollArea_SetupViewport(QAbstractScrollArea* self, QWidget* viewport); int QAbstractScrollArea_SizeAdjustPolicy(const QAbstractScrollArea* self); void QAbstractScrollArea_SetSizeAdjustPolicy(QAbstractScrollArea* self, int policy); +bool QAbstractScrollArea_EventFilter(QAbstractScrollArea* self, QObject* param1, QEvent* param2); +bool QAbstractScrollArea_Event(QAbstractScrollArea* self, QEvent* param1); +bool QAbstractScrollArea_ViewportEvent(QAbstractScrollArea* self, QEvent* param1); +void QAbstractScrollArea_ResizeEvent(QAbstractScrollArea* self, QResizeEvent* param1); +void QAbstractScrollArea_PaintEvent(QAbstractScrollArea* self, QPaintEvent* param1); +void QAbstractScrollArea_MousePressEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_MouseReleaseEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_MouseDoubleClickEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_MouseMoveEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_WheelEvent(QAbstractScrollArea* self, QWheelEvent* param1); +void QAbstractScrollArea_ContextMenuEvent(QAbstractScrollArea* self, QContextMenuEvent* param1); +void QAbstractScrollArea_DragEnterEvent(QAbstractScrollArea* self, QDragEnterEvent* param1); +void QAbstractScrollArea_DragMoveEvent(QAbstractScrollArea* self, QDragMoveEvent* param1); +void QAbstractScrollArea_DragLeaveEvent(QAbstractScrollArea* self, QDragLeaveEvent* param1); +void QAbstractScrollArea_DropEvent(QAbstractScrollArea* self, QDropEvent* param1); +void QAbstractScrollArea_KeyPressEvent(QAbstractScrollArea* self, QKeyEvent* param1); +void QAbstractScrollArea_ScrollContentsBy(QAbstractScrollArea* self, int dx, int dy); +QSize* QAbstractScrollArea_ViewportSizeHint(const QAbstractScrollArea* self); struct miqt_string QAbstractScrollArea_Tr2(const char* s, const char* c); struct miqt_string QAbstractScrollArea_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractScrollArea_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractScrollArea_TrUtf83(const char* s, const char* c, int n); -void QAbstractScrollArea_Delete(QAbstractScrollArea* self); +void QAbstractScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractScrollArea_virtualbase_MinimumSizeHint(const void* self); +void QAbstractScrollArea_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractScrollArea_virtualbase_SizeHint(const void* self); +void QAbstractScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QAbstractScrollArea_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QAbstractScrollArea_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractScrollArea_virtualbase_Event(void* self, QEvent* param1); +void QAbstractScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QAbstractScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QAbstractScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QAbstractScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QAbstractScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QAbstractScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QAbstractScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QAbstractScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QAbstractScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QAbstractScrollArea_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QAbstractScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QAbstractScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QAbstractScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QAbstractScrollArea_virtualbase_ViewportSizeHint(const void* self); +void QAbstractScrollArea_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QAbstractScrollArea_Delete(QAbstractScrollArea* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractslider.cpp b/qt/gen_qabstractslider.cpp index c3c07b89..d583f6f2 100644 --- a/qt/gen_qabstractslider.cpp +++ b/qt/gen_qabstractslider.cpp @@ -1,19 +1,1089 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qabstractslider.h" #include "_cgo_export.h" -QAbstractSlider* QAbstractSlider_new(QWidget* parent) { - return new QAbstractSlider(parent); +class MiqtVirtualQAbstractSlider : public virtual QAbstractSlider { +public: + + MiqtVirtualQAbstractSlider(QWidget* parent): QAbstractSlider(parent) {}; + MiqtVirtualQAbstractSlider(): QAbstractSlider() {}; + + virtual ~MiqtVirtualQAbstractSlider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QAbstractSlider::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QAbstractSlider::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QAbstractSlider::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QAbstractSlider_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QAbstractSlider::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QAbstractSlider::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QAbstractSlider_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QAbstractSlider::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QAbstractSlider::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractSlider_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QAbstractSlider::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QAbstractSlider::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QAbstractSlider_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QAbstractSlider::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QAbstractSlider::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QAbstractSlider_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QAbstractSlider::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QAbstractSlider::devType(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractSlider_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QAbstractSlider::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QAbstractSlider::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractSlider_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractSlider::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractSlider::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSlider_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractSlider::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractSlider::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSlider_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractSlider::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QAbstractSlider::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QAbstractSlider_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QAbstractSlider::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QAbstractSlider::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QAbstractSlider::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QAbstractSlider::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QAbstractSlider_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QAbstractSlider::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QAbstractSlider::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QAbstractSlider::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QAbstractSlider::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QAbstractSlider::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QAbstractSlider::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractSlider::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QAbstractSlider::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QAbstractSlider::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QAbstractSlider::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QAbstractSlider::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QAbstractSlider::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractSlider::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QAbstractSlider::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractSlider::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QAbstractSlider::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QAbstractSlider::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QAbstractSlider::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QAbstractSlider::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QAbstractSlider::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QAbstractSlider::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QAbstractSlider::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QAbstractSlider::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QAbstractSlider::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractSlider::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QAbstractSlider::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QAbstractSlider::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QAbstractSlider::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QAbstractSlider::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QAbstractSlider::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QAbstractSlider::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QAbstractSlider::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QAbstractSlider::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QAbstractSlider::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractSlider::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QAbstractSlider::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractSlider::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QAbstractSlider::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractSlider::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QAbstractSlider::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractSlider::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QAbstractSlider::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QAbstractSlider::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QAbstractSlider::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QAbstractSlider::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QAbstractSlider::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QAbstractSlider::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QAbstractSlider::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QAbstractSlider_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QAbstractSlider::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QAbstractSlider::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QAbstractSlider_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QAbstractSlider::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QAbstractSlider::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QAbstractSlider_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QAbstractSlider::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QAbstractSlider::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QAbstractSlider_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QAbstractSlider::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QAbstractSlider::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractSlider_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QAbstractSlider::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QAbstractSlider::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractSlider_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QAbstractSlider::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QAbstractSlider::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractSlider::focusNextPrevChild(next); + + } + +}; + +void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(parent); + *outptr_QAbstractSlider = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractSlider* QAbstractSlider_new2() { - return new QAbstractSlider(); +void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(); + *outptr_QAbstractSlider = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self) { @@ -148,7 +1218,7 @@ void QAbstractSlider_ValueChanged(QAbstractSlider* self, int value) { } void QAbstractSlider_connect_ValueChanged(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::valueChanged), self, [=](int value) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::valueChanged), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QAbstractSlider_ValueChanged(slot, sigval1); }); @@ -159,7 +1229,7 @@ void QAbstractSlider_SliderPressed(QAbstractSlider* self) { } void QAbstractSlider_connect_SliderPressed(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderPressed), self, [=]() { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderPressed), self, [=]() { miqt_exec_callback_QAbstractSlider_SliderPressed(slot); }); } @@ -169,7 +1239,7 @@ void QAbstractSlider_SliderMoved(QAbstractSlider* self, int position) { } void QAbstractSlider_connect_SliderMoved(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderMoved), self, [=](int position) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderMoved), self, [=](int position) { int sigval1 = position; miqt_exec_callback_QAbstractSlider_SliderMoved(slot, sigval1); }); @@ -180,7 +1250,7 @@ void QAbstractSlider_SliderReleased(QAbstractSlider* self) { } void QAbstractSlider_connect_SliderReleased(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderReleased), self, [=]() { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderReleased), self, [=]() { miqt_exec_callback_QAbstractSlider_SliderReleased(slot); }); } @@ -190,7 +1260,7 @@ void QAbstractSlider_RangeChanged(QAbstractSlider* self, int min, int max) { } void QAbstractSlider_connect_RangeChanged(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::rangeChanged), self, [=](int min, int max) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::rangeChanged), self, [=](int min, int max) { int sigval1 = min; int sigval2 = max; miqt_exec_callback_QAbstractSlider_RangeChanged(slot, sigval1, sigval2); @@ -202,7 +1272,7 @@ void QAbstractSlider_ActionTriggered(QAbstractSlider* self, int action) { } void QAbstractSlider_connect_ActionTriggered(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::actionTriggered), self, [=](int action) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::actionTriggered), self, [=](int action) { int sigval1 = action; miqt_exec_callback_QAbstractSlider_ActionTriggered(slot, sigval1); }); @@ -252,7 +1322,355 @@ struct miqt_string QAbstractSlider_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QAbstractSlider_Delete(QAbstractSlider* self) { - delete self; +void QAbstractSlider_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__Event = slot; +} + +bool QAbstractSlider_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_Event(e); +} + +void QAbstractSlider_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SliderChange = slot; +} + +void QAbstractSlider_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SliderChange(change); +} + +void QAbstractSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QAbstractSlider_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_TimerEvent(param1); +} + +void QAbstractSlider_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_WheelEvent(e); +} + +void QAbstractSlider_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractSlider_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ChangeEvent(e); +} + +void QAbstractSlider_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DevType = slot; +} + +int QAbstractSlider_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DevType(); +} + +void QAbstractSlider_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SetVisible = slot; +} + +void QAbstractSlider_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractSlider_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractSlider_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractSlider_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractSlider_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__HeightForWidth = slot; +} + +int QAbstractSlider_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QAbstractSlider_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QAbstractSlider_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QAbstractSlider_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QAbstractSlider_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_PaintEngine(); +} + +void QAbstractSlider_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractSlider_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractSlider_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractSlider_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractSlider_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QAbstractSlider_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractSlider_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractSlider_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractSlider_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractSlider_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__EnterEvent = slot; +} + +void QAbstractSlider_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_EnterEvent(event); +} + +void QAbstractSlider_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__LeaveEvent = slot; +} + +void QAbstractSlider_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_LeaveEvent(event); +} + +void QAbstractSlider_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractSlider_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_PaintEvent(event); +} + +void QAbstractSlider_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MoveEvent = slot; +} + +void QAbstractSlider_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MoveEvent(event); +} + +void QAbstractSlider_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractSlider_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractSlider_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractSlider_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_CloseEvent(event); +} + +void QAbstractSlider_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractSlider_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractSlider_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__TabletEvent = slot; +} + +void QAbstractSlider_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_TabletEvent(event); +} + +void QAbstractSlider_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ActionEvent = slot; +} + +void QAbstractSlider_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ActionEvent(event); +} + +void QAbstractSlider_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractSlider_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractSlider_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractSlider_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractSlider_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractSlider_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractSlider_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DropEvent = slot; +} + +void QAbstractSlider_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractSlider_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractSlider_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ShowEvent(event); +} + +void QAbstractSlider_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__HideEvent = slot; +} + +void QAbstractSlider_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_HideEvent(event); +} + +void QAbstractSlider_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__NativeEvent = slot; +} + +bool QAbstractSlider_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QAbstractSlider_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__Metric = slot; +} + +int QAbstractSlider_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_Metric(param1); +} + +void QAbstractSlider_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__InitPainter = slot; +} + +void QAbstractSlider_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_InitPainter(painter); +} + +void QAbstractSlider_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QAbstractSlider_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_Redirected(offset); +} + +void QAbstractSlider_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QAbstractSlider_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SharedPainter(); +} + +void QAbstractSlider_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractSlider_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QAbstractSlider_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractSlider_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QAbstractSlider_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractSlider_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QAbstractSlider_Delete(QAbstractSlider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractslider.go b/qt/gen_qabstractslider.go index 9a25499a..cb2fd69f 100644 --- a/qt/gen_qabstractslider.go +++ b/qt/gen_qabstractslider.go @@ -27,8 +27,18 @@ const ( QAbstractSlider__SliderMove QAbstractSlider__SliderAction = 7 ) +type QAbstractSlider__SliderChange int + +const ( + QAbstractSlider__SliderRangeChange QAbstractSlider__SliderChange = 0 + QAbstractSlider__SliderOrientationChange QAbstractSlider__SliderChange = 1 + QAbstractSlider__SliderStepsChange QAbstractSlider__SliderChange = 2 + QAbstractSlider__SliderValueChange QAbstractSlider__SliderChange = 3 +) + type QAbstractSlider struct { - h *C.QAbstractSlider + h *C.QAbstractSlider + isSubclass bool *QWidget } @@ -46,27 +56,49 @@ func (this *QAbstractSlider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractSlider(h *C.QAbstractSlider) *QAbstractSlider { +// newQAbstractSlider constructs the type using only CGO pointers. +func newQAbstractSlider(h *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSlider { if h == nil { return nil } - return &QAbstractSlider{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QAbstractSlider{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractSlider(h unsafe.Pointer) *QAbstractSlider { - return newQAbstractSlider((*C.QAbstractSlider)(h)) +// UnsafeNewQAbstractSlider constructs the type using only unsafe pointers. +func UnsafeNewQAbstractSlider(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSlider { + if h == nil { + return nil + } + + return &QAbstractSlider{h: (*C.QAbstractSlider)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractSlider constructs a new QAbstractSlider object. func NewQAbstractSlider(parent *QWidget) *QAbstractSlider { - ret := C.QAbstractSlider_new(parent.cPointer()) - return newQAbstractSlider(ret) + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSlider_new(parent.cPointer(), &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractSlider2 constructs a new QAbstractSlider object. func NewQAbstractSlider2() *QAbstractSlider { - ret := C.QAbstractSlider_new2() - return newQAbstractSlider(ret) + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSlider_new2(&outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractSlider) MetaObject() *QMetaObject { @@ -353,9 +385,1021 @@ func QAbstractSlider_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractSlider) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QAbstractSlider_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QAbstractSlider) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QAbstractSlider_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_Event +func miqt_exec_callback_QAbstractSlider_Event(self *C.QAbstractSlider, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QAbstractSlider_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QAbstractSlider) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QAbstractSlider_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SliderChange +func miqt_exec_callback_QAbstractSlider_SliderChange(self *C.QAbstractSlider, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QAbstractSlider_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QAbstractSlider) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QAbstractSlider_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_KeyPressEvent +func miqt_exec_callback_QAbstractSlider_KeyPressEvent(self *C.QAbstractSlider, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QAbstractSlider_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractSlider) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QAbstractSlider_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_TimerEvent +func miqt_exec_callback_QAbstractSlider_TimerEvent(self *C.QAbstractSlider, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QAbstractSlider_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractSlider) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QAbstractSlider_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_WheelEvent +func miqt_exec_callback_QAbstractSlider_WheelEvent(self *C.QAbstractSlider, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QAbstractSlider_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractSlider) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QAbstractSlider_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ChangeEvent +func miqt_exec_callback_QAbstractSlider_ChangeEvent(self *C.QAbstractSlider, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DevType() int { + + return (int)(C.QAbstractSlider_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSlider) OnDevType(slot func(super func() int) int) { + C.QAbstractSlider_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DevType +func miqt_exec_callback_QAbstractSlider_DevType(self *C.QAbstractSlider, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractSlider_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractSlider) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractSlider_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SetVisible +func miqt_exec_callback_QAbstractSlider_SetVisible(self *C.QAbstractSlider, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractSlider_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSlider) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSlider_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SizeHint +func miqt_exec_callback_QAbstractSlider_SizeHint(self *C.QAbstractSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractSlider_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSlider) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSlider_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MinimumSizeHint +func miqt_exec_callback_QAbstractSlider_MinimumSizeHint(self *C.QAbstractSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QAbstractSlider_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSlider) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QAbstractSlider_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_HeightForWidth +func miqt_exec_callback_QAbstractSlider_HeightForWidth(self *C.QAbstractSlider, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QAbstractSlider_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSlider) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QAbstractSlider_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_HasHeightForWidth +func miqt_exec_callback_QAbstractSlider_HasHeightForWidth(self *C.QAbstractSlider, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QAbstractSlider_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSlider) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QAbstractSlider_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_PaintEngine +func miqt_exec_callback_QAbstractSlider_PaintEngine(self *C.QAbstractSlider, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MousePressEvent +func miqt_exec_callback_QAbstractSlider_MousePressEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MouseReleaseEvent +func miqt_exec_callback_QAbstractSlider_MouseReleaseEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MouseMoveEvent +func miqt_exec_callback_QAbstractSlider_MouseMoveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QAbstractSlider_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractSlider_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_KeyReleaseEvent +func miqt_exec_callback_QAbstractSlider_KeyReleaseEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractSlider_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSlider_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_FocusInEvent +func miqt_exec_callback_QAbstractSlider_FocusInEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractSlider_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSlider_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_FocusOutEvent +func miqt_exec_callback_QAbstractSlider_FocusOutEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_EnterEvent(event *QEvent) { + + C.QAbstractSlider_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSlider_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_EnterEvent +func miqt_exec_callback_QAbstractSlider_EnterEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QAbstractSlider_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSlider_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_LeaveEvent +func miqt_exec_callback_QAbstractSlider_LeaveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QAbstractSlider_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QAbstractSlider_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_PaintEvent +func miqt_exec_callback_QAbstractSlider_PaintEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QAbstractSlider_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QAbstractSlider_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MoveEvent +func miqt_exec_callback_QAbstractSlider_MoveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractSlider_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractSlider_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ResizeEvent +func miqt_exec_callback_QAbstractSlider_ResizeEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QAbstractSlider_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QAbstractSlider_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_CloseEvent +func miqt_exec_callback_QAbstractSlider_CloseEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QAbstractSlider_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QAbstractSlider_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ContextMenuEvent +func miqt_exec_callback_QAbstractSlider_ContextMenuEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QAbstractSlider_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QAbstractSlider_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_TabletEvent +func miqt_exec_callback_QAbstractSlider_TabletEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QAbstractSlider_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QAbstractSlider_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ActionEvent +func miqt_exec_callback_QAbstractSlider_ActionEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractSlider_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractSlider_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DragEnterEvent +func miqt_exec_callback_QAbstractSlider_DragEnterEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractSlider_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractSlider_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DragMoveEvent +func miqt_exec_callback_QAbstractSlider_DragMoveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractSlider_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractSlider_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DragLeaveEvent +func miqt_exec_callback_QAbstractSlider_DragLeaveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractSlider_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractSlider_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DropEvent +func miqt_exec_callback_QAbstractSlider_DropEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QAbstractSlider_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QAbstractSlider_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ShowEvent +func miqt_exec_callback_QAbstractSlider_ShowEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QAbstractSlider_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QAbstractSlider_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_HideEvent +func miqt_exec_callback_QAbstractSlider_HideEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QAbstractSlider_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QAbstractSlider) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QAbstractSlider_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_NativeEvent +func miqt_exec_callback_QAbstractSlider_NativeEvent(self *C.QAbstractSlider, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QAbstractSlider_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSlider) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QAbstractSlider_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_Metric +func miqt_exec_callback_QAbstractSlider_Metric(self *C.QAbstractSlider, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_InitPainter(painter *QPainter) { + + C.QAbstractSlider_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QAbstractSlider) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QAbstractSlider_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_InitPainter +func miqt_exec_callback_QAbstractSlider_InitPainter(self *C.QAbstractSlider, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractSlider_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QAbstractSlider) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QAbstractSlider_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_Redirected +func miqt_exec_callback_QAbstractSlider_Redirected(self *C.QAbstractSlider, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QAbstractSlider_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSlider) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QAbstractSlider_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SharedPainter +func miqt_exec_callback_QAbstractSlider_SharedPainter(self *C.QAbstractSlider, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QAbstractSlider_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractSlider) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QAbstractSlider_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_InputMethodEvent +func miqt_exec_callback_QAbstractSlider_InputMethodEvent(self *C.QAbstractSlider, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QAbstractSlider_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSlider) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QAbstractSlider_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_InputMethodQuery +func miqt_exec_callback_QAbstractSlider_InputMethodQuery(self *C.QAbstractSlider, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractSlider_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractSlider) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractSlider_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_FocusNextPrevChild +func miqt_exec_callback_QAbstractSlider_FocusNextPrevChild(self *C.QAbstractSlider, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractSlider) Delete() { - C.QAbstractSlider_Delete(this.h) + C.QAbstractSlider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractslider.h b/qt/gen_qabstractslider.h index eda2ca38..6b272cec 100644 --- a/qt/gen_qabstractslider.h +++ b/qt/gen_qabstractslider.h @@ -16,16 +16,72 @@ extern "C" { #ifdef __cplusplus class QAbstractSlider; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractSlider QAbstractSlider; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QAbstractSlider* QAbstractSlider_new(QWidget* parent); -QAbstractSlider* QAbstractSlider_new2(); +void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self); void* QAbstractSlider_Metacast(QAbstractSlider* self, const char* param1); struct miqt_string QAbstractSlider_Tr(const char* s); @@ -66,11 +122,103 @@ void QAbstractSlider_RangeChanged(QAbstractSlider* self, int min, int max); void QAbstractSlider_connect_RangeChanged(QAbstractSlider* self, intptr_t slot); void QAbstractSlider_ActionTriggered(QAbstractSlider* self, int action); void QAbstractSlider_connect_ActionTriggered(QAbstractSlider* self, intptr_t slot); +bool QAbstractSlider_Event(QAbstractSlider* self, QEvent* e); +void QAbstractSlider_SliderChange(QAbstractSlider* self, int change); +void QAbstractSlider_KeyPressEvent(QAbstractSlider* self, QKeyEvent* ev); +void QAbstractSlider_TimerEvent(QAbstractSlider* self, QTimerEvent* param1); +void QAbstractSlider_WheelEvent(QAbstractSlider* self, QWheelEvent* e); +void QAbstractSlider_ChangeEvent(QAbstractSlider* self, QEvent* e); struct miqt_string QAbstractSlider_Tr2(const char* s, const char* c); struct miqt_string QAbstractSlider_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractSlider_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractSlider_TrUtf83(const char* s, const char* c, int n); -void QAbstractSlider_Delete(QAbstractSlider* self); +void QAbstractSlider_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_Event(void* self, QEvent* e); +void QAbstractSlider_override_virtual_SliderChange(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_SliderChange(void* self, int change); +void QAbstractSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QAbstractSlider_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QAbstractSlider_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QAbstractSlider_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ChangeEvent(void* self, QEvent* e); +void QAbstractSlider_override_virtual_DevType(void* self, intptr_t slot); +int QAbstractSlider_virtualbase_DevType(const void* self); +void QAbstractSlider_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_SetVisible(void* self, bool visible); +void QAbstractSlider_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractSlider_virtualbase_SizeHint(const void* self); +void QAbstractSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractSlider_virtualbase_MinimumSizeHint(const void* self); +void QAbstractSlider_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QAbstractSlider_virtualbase_HeightForWidth(const void* self, int param1); +void QAbstractSlider_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_HasHeightForWidth(const void* self); +void QAbstractSlider_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QAbstractSlider_virtualbase_PaintEngine(const void* self); +void QAbstractSlider_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QAbstractSlider_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractSlider_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractSlider_override_virtual_EnterEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_EnterEvent(void* self, QEvent* event); +void QAbstractSlider_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_LeaveEvent(void* self, QEvent* event); +void QAbstractSlider_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QAbstractSlider_override_virtual_MoveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QAbstractSlider_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractSlider_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QAbstractSlider_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QAbstractSlider_override_virtual_TabletEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QAbstractSlider_override_virtual_ActionEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QAbstractSlider_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractSlider_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractSlider_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractSlider_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractSlider_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QAbstractSlider_override_virtual_HideEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_HideEvent(void* self, QHideEvent* event); +void QAbstractSlider_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QAbstractSlider_override_virtual_Metric(void* self, intptr_t slot); +int QAbstractSlider_virtualbase_Metric(const void* self, int param1); +void QAbstractSlider_override_virtual_InitPainter(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_InitPainter(const void* self, QPainter* painter); +void QAbstractSlider_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QAbstractSlider_virtualbase_Redirected(const void* self, QPoint* offset); +void QAbstractSlider_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QAbstractSlider_virtualbase_SharedPainter(const void* self); +void QAbstractSlider_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QAbstractSlider_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractSlider_virtualbase_InputMethodQuery(const void* self, int param1); +void QAbstractSlider_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_FocusNextPrevChild(void* self, bool next); +void QAbstractSlider_Delete(QAbstractSlider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractspinbox.cpp b/qt/gen_qabstractspinbox.cpp index ad043fd5..9060d4c4 100644 --- a/qt/gen_qabstractspinbox.cpp +++ b/qt/gen_qabstractspinbox.cpp @@ -1,22 +1,1199 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include +#include #include #include #include "gen_qabstractspinbox.h" #include "_cgo_export.h" -QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent) { - return new QAbstractSpinBox(parent); +class MiqtVirtualQAbstractSpinBox : public virtual QAbstractSpinBox { +public: + + MiqtVirtualQAbstractSpinBox(QWidget* parent): QAbstractSpinBox(parent) {}; + MiqtVirtualQAbstractSpinBox(): QAbstractSpinBox() {}; + + virtual ~MiqtVirtualQAbstractSpinBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractSpinBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSpinBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractSpinBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractSpinBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSpinBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractSpinBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAbstractSpinBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractSpinBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QAbstractSpinBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractSpinBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QAbstractSpinBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QAbstractSpinBox::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QAbstractSpinBox::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QAbstractSpinBox::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QAbstractSpinBox_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QAbstractSpinBox::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QAbstractSpinBox::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QAbstractSpinBox_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QAbstractSpinBox::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QAbstractSpinBox::clear(); + return; + } + + + miqt_exec_callback_QAbstractSpinBox_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QAbstractSpinBox::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QAbstractSpinBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractSpinBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QAbstractSpinBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QAbstractSpinBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QAbstractSpinBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QAbstractSpinBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QAbstractSpinBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QAbstractSpinBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QAbstractSpinBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractSpinBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QAbstractSpinBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractSpinBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QAbstractSpinBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QAbstractSpinBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QAbstractSpinBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QAbstractSpinBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QAbstractSpinBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QAbstractSpinBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QAbstractSpinBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QAbstractSpinBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QAbstractSpinBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QAbstractSpinBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QAbstractSpinBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QAbstractSpinBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QAbstractSpinBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QAbstractSpinBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAbstractSpinBox::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractSpinBox::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QAbstractSpinBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QAbstractSpinBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QAbstractSpinBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QAbstractSpinBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QAbstractSpinBox::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QAbstractSpinBox::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QAbstractSpinBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QAbstractSpinBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QAbstractSpinBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractSpinBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractSpinBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QAbstractSpinBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QAbstractSpinBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QAbstractSpinBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QAbstractSpinBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QAbstractSpinBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QAbstractSpinBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QAbstractSpinBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QAbstractSpinBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractSpinBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QAbstractSpinBox::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QAbstractSpinBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QAbstractSpinBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QAbstractSpinBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QAbstractSpinBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QAbstractSpinBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QAbstractSpinBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QAbstractSpinBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QAbstractSpinBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QAbstractSpinBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QAbstractSpinBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractSpinBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QAbstractSpinBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractSpinBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QAbstractSpinBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractSpinBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QAbstractSpinBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractSpinBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QAbstractSpinBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QAbstractSpinBox::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QAbstractSpinBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QAbstractSpinBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QAbstractSpinBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QAbstractSpinBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QAbstractSpinBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QAbstractSpinBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QAbstractSpinBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QAbstractSpinBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QAbstractSpinBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QAbstractSpinBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QAbstractSpinBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QAbstractSpinBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractSpinBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QAbstractSpinBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QAbstractSpinBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractSpinBox::focusNextPrevChild(next); + + } + +}; + +void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(parent); + *outptr_QAbstractSpinBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractSpinBox* QAbstractSpinBox_new2() { - return new QAbstractSpinBox(); +void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(); + *outptr_QAbstractSpinBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self) { @@ -211,7 +1388,7 @@ void QAbstractSpinBox_EditingFinished(QAbstractSpinBox* self) { } void QAbstractSpinBox_connect_EditingFinished(QAbstractSpinBox* self, intptr_t slot) { - QAbstractSpinBox::connect(self, static_cast(&QAbstractSpinBox::editingFinished), self, [=]() { + MiqtVirtualQAbstractSpinBox::connect(self, static_cast(&QAbstractSpinBox::editingFinished), self, [=]() { miqt_exec_callback_QAbstractSpinBox_EditingFinished(slot); }); } @@ -260,7 +1437,387 @@ struct miqt_string QAbstractSpinBox_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QAbstractSpinBox_Delete(QAbstractSpinBox* self) { - delete self; +void QAbstractSpinBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractSpinBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractSpinBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractSpinBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Event = slot; +} + +bool QAbstractSpinBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Event(event); +} + +void QAbstractSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractSpinBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QAbstractSpinBox_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Validate = slot; +} + +int QAbstractSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Validate(input, pos); +} + +void QAbstractSpinBox_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Fixup = slot; +} + +void QAbstractSpinBox_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Fixup(input); +} + +void QAbstractSpinBox_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__StepBy = slot; +} + +void QAbstractSpinBox_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_StepBy(steps); +} + +void QAbstractSpinBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Clear = slot; +} + +void QAbstractSpinBox_virtualbase_Clear(void* self) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Clear(); +} + +void QAbstractSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QAbstractSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QAbstractSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QAbstractSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QAbstractSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QAbstractSpinBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__HideEvent = slot; +} + +void QAbstractSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_HideEvent(event); +} + +void QAbstractSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QAbstractSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QAbstractSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__StepEnabled = slot; +} + +int QAbstractSpinBox_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_StepEnabled(); +} + +void QAbstractSpinBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DevType = slot; +} + +int QAbstractSpinBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DevType(); +} + +void QAbstractSpinBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__SetVisible = slot; +} + +void QAbstractSpinBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractSpinBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__HeightForWidth = slot; +} + +int QAbstractSpinBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QAbstractSpinBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QAbstractSpinBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QAbstractSpinBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QAbstractSpinBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_PaintEngine(); +} + +void QAbstractSpinBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractSpinBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__EnterEvent = slot; +} + +void QAbstractSpinBox_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QAbstractSpinBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__LeaveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QAbstractSpinBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MoveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QAbstractSpinBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__TabletEvent = slot; +} + +void QAbstractSpinBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QAbstractSpinBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ActionEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QAbstractSpinBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractSpinBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractSpinBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractSpinBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DropEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractSpinBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__NativeEvent = slot; +} + +bool QAbstractSpinBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QAbstractSpinBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Metric = slot; +} + +int QAbstractSpinBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Metric(param1); +} + +void QAbstractSpinBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InitPainter = slot; +} + +void QAbstractSpinBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QAbstractSpinBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QAbstractSpinBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Redirected(offset); +} + +void QAbstractSpinBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QAbstractSpinBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_SharedPainter(); +} + +void QAbstractSpinBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractSpinBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QAbstractSpinBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractSpinBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QAbstractSpinBox_Delete(QAbstractSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractspinbox.go b/qt/gen_qabstractspinbox.go index 82a28cd4..6eb4e6ab 100644 --- a/qt/gen_qabstractspinbox.go +++ b/qt/gen_qabstractspinbox.go @@ -45,7 +45,8 @@ const ( ) type QAbstractSpinBox struct { - h *C.QAbstractSpinBox + h *C.QAbstractSpinBox + isSubclass bool *QWidget } @@ -63,27 +64,49 @@ func (this *QAbstractSpinBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractSpinBox(h *C.QAbstractSpinBox) *QAbstractSpinBox { +// newQAbstractSpinBox constructs the type using only CGO pointers. +func newQAbstractSpinBox(h *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSpinBox { if h == nil { return nil } - return &QAbstractSpinBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QAbstractSpinBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractSpinBox(h unsafe.Pointer) *QAbstractSpinBox { - return newQAbstractSpinBox((*C.QAbstractSpinBox)(h)) +// UnsafeNewQAbstractSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQAbstractSpinBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSpinBox { + if h == nil { + return nil + } + + return &QAbstractSpinBox{h: (*C.QAbstractSpinBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractSpinBox constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox(parent *QWidget) *QAbstractSpinBox { - ret := C.QAbstractSpinBox_new(parent.cPointer()) - return newQAbstractSpinBox(ret) + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSpinBox_new(parent.cPointer(), &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractSpinBox2 constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox2() *QAbstractSpinBox { - ret := C.QAbstractSpinBox_new2() - return newQAbstractSpinBox(ret) + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSpinBox_new2(&outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractSpinBox) MetaObject() *QMetaObject { @@ -338,9 +361,1126 @@ func QAbstractSpinBox_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractSpinBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractSpinBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSpinBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSpinBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_SizeHint +func miqt_exec_callback_QAbstractSpinBox_SizeHint(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractSpinBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSpinBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSpinBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MinimumSizeHint +func miqt_exec_callback_QAbstractSpinBox_MinimumSizeHint(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractSpinBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractSpinBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractSpinBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Event +func miqt_exec_callback_QAbstractSpinBox_Event(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QAbstractSpinBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSpinBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QAbstractSpinBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InputMethodQuery +func miqt_exec_callback_QAbstractSpinBox_InputMethodQuery(self *C.QAbstractSpinBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QAbstractSpinBox_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QAbstractSpinBox) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QAbstractSpinBox_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Validate +func miqt_exec_callback_QAbstractSpinBox_Validate(self *C.QAbstractSpinBox, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QAbstractSpinBox_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QAbstractSpinBox) OnFixup(slot func(super func(input string), input string)) { + C.QAbstractSpinBox_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Fixup +func miqt_exec_callback_QAbstractSpinBox_Fixup(self *C.QAbstractSpinBox, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_StepBy(steps int) { + + C.QAbstractSpinBox_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QAbstractSpinBox) OnStepBy(slot func(super func(steps int), steps int)) { + C.QAbstractSpinBox_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_StepBy +func miqt_exec_callback_QAbstractSpinBox_StepBy(self *C.QAbstractSpinBox, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Clear() { + + C.QAbstractSpinBox_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSpinBox) OnClear(slot func(super func())) { + C.QAbstractSpinBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Clear +func miqt_exec_callback_QAbstractSpinBox_Clear(self *C.QAbstractSpinBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Clear) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractSpinBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractSpinBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ResizeEvent +func miqt_exec_callback_QAbstractSpinBox_ResizeEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QAbstractSpinBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractSpinBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_KeyPressEvent +func miqt_exec_callback_QAbstractSpinBox_KeyPressEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QAbstractSpinBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractSpinBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent +func miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QAbstractSpinBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QAbstractSpinBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_WheelEvent +func miqt_exec_callback_QAbstractSpinBox_WheelEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractSpinBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSpinBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_FocusInEvent +func miqt_exec_callback_QAbstractSpinBox_FocusInEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractSpinBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSpinBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_FocusOutEvent +func miqt_exec_callback_QAbstractSpinBox_FocusOutEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QAbstractSpinBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QAbstractSpinBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent +func miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QAbstractSpinBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSpinBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ChangeEvent +func miqt_exec_callback_QAbstractSpinBox_ChangeEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QAbstractSpinBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QAbstractSpinBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_CloseEvent +func miqt_exec_callback_QAbstractSpinBox_CloseEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QAbstractSpinBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QAbstractSpinBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_HideEvent +func miqt_exec_callback_QAbstractSpinBox_HideEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MousePressEvent +func miqt_exec_callback_QAbstractSpinBox_MousePressEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent +func miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent +func miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractSpinBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractSpinBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_TimerEvent +func miqt_exec_callback_QAbstractSpinBox_TimerEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QAbstractSpinBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QAbstractSpinBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_PaintEvent +func miqt_exec_callback_QAbstractSpinBox_PaintEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QAbstractSpinBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QAbstractSpinBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ShowEvent +func miqt_exec_callback_QAbstractSpinBox_ShowEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QAbstractSpinBox_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSpinBox) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QAbstractSpinBox_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_StepEnabled +func miqt_exec_callback_QAbstractSpinBox_StepEnabled(self *C.QAbstractSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DevType() int { + + return (int)(C.QAbstractSpinBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSpinBox) OnDevType(slot func(super func() int) int) { + C.QAbstractSpinBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DevType +func miqt_exec_callback_QAbstractSpinBox_DevType(self *C.QAbstractSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractSpinBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractSpinBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractSpinBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_SetVisible +func miqt_exec_callback_QAbstractSpinBox_SetVisible(self *C.QAbstractSpinBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QAbstractSpinBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSpinBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QAbstractSpinBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_HeightForWidth +func miqt_exec_callback_QAbstractSpinBox_HeightForWidth(self *C.QAbstractSpinBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QAbstractSpinBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSpinBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QAbstractSpinBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_HasHeightForWidth +func miqt_exec_callback_QAbstractSpinBox_HasHeightForWidth(self *C.QAbstractSpinBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QAbstractSpinBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSpinBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QAbstractSpinBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_PaintEngine +func miqt_exec_callback_QAbstractSpinBox_PaintEngine(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_EnterEvent(event *QEvent) { + + C.QAbstractSpinBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSpinBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_EnterEvent +func miqt_exec_callback_QAbstractSpinBox_EnterEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QAbstractSpinBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSpinBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_LeaveEvent +func miqt_exec_callback_QAbstractSpinBox_LeaveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QAbstractSpinBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QAbstractSpinBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MoveEvent +func miqt_exec_callback_QAbstractSpinBox_MoveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QAbstractSpinBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QAbstractSpinBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_TabletEvent +func miqt_exec_callback_QAbstractSpinBox_TabletEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QAbstractSpinBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QAbstractSpinBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ActionEvent +func miqt_exec_callback_QAbstractSpinBox_ActionEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractSpinBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractSpinBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DragEnterEvent +func miqt_exec_callback_QAbstractSpinBox_DragEnterEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractSpinBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractSpinBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DragMoveEvent +func miqt_exec_callback_QAbstractSpinBox_DragMoveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractSpinBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractSpinBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent +func miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractSpinBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractSpinBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DropEvent +func miqt_exec_callback_QAbstractSpinBox_DropEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QAbstractSpinBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QAbstractSpinBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QAbstractSpinBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_NativeEvent +func miqt_exec_callback_QAbstractSpinBox_NativeEvent(self *C.QAbstractSpinBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QAbstractSpinBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSpinBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QAbstractSpinBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Metric +func miqt_exec_callback_QAbstractSpinBox_Metric(self *C.QAbstractSpinBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QAbstractSpinBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QAbstractSpinBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QAbstractSpinBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InitPainter +func miqt_exec_callback_QAbstractSpinBox_InitPainter(self *C.QAbstractSpinBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractSpinBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QAbstractSpinBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QAbstractSpinBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Redirected +func miqt_exec_callback_QAbstractSpinBox_Redirected(self *C.QAbstractSpinBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QAbstractSpinBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSpinBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QAbstractSpinBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_SharedPainter +func miqt_exec_callback_QAbstractSpinBox_SharedPainter(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QAbstractSpinBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractSpinBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QAbstractSpinBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InputMethodEvent +func miqt_exec_callback_QAbstractSpinBox_InputMethodEvent(self *C.QAbstractSpinBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractSpinBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractSpinBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractSpinBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_FocusNextPrevChild +func miqt_exec_callback_QAbstractSpinBox_FocusNextPrevChild(self *C.QAbstractSpinBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractSpinBox) Delete() { - C.QAbstractSpinBox_Delete(this.h) + C.QAbstractSpinBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractspinbox.h b/qt/gen_qabstractspinbox.h index 839dc6c3..7e8af850 100644 --- a/qt/gen_qabstractspinbox.h +++ b/qt/gen_qabstractspinbox.h @@ -16,22 +16,72 @@ extern "C" { #ifdef __cplusplus class QAbstractSpinBox; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractSpinBox QAbstractSpinBox; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent); -QAbstractSpinBox* QAbstractSpinBox_new2(); +void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self); void* QAbstractSpinBox_Metacast(QAbstractSpinBox* self, const char* param1); struct miqt_string QAbstractSpinBox_Tr(const char* s); @@ -70,13 +120,124 @@ void QAbstractSpinBox_StepUp(QAbstractSpinBox* self); void QAbstractSpinBox_StepDown(QAbstractSpinBox* self); void QAbstractSpinBox_SelectAll(QAbstractSpinBox* self); void QAbstractSpinBox_Clear(QAbstractSpinBox* self); +void QAbstractSpinBox_ResizeEvent(QAbstractSpinBox* self, QResizeEvent* event); +void QAbstractSpinBox_KeyPressEvent(QAbstractSpinBox* self, QKeyEvent* event); +void QAbstractSpinBox_KeyReleaseEvent(QAbstractSpinBox* self, QKeyEvent* event); +void QAbstractSpinBox_WheelEvent(QAbstractSpinBox* self, QWheelEvent* event); +void QAbstractSpinBox_FocusInEvent(QAbstractSpinBox* self, QFocusEvent* event); +void QAbstractSpinBox_FocusOutEvent(QAbstractSpinBox* self, QFocusEvent* event); +void QAbstractSpinBox_ContextMenuEvent(QAbstractSpinBox* self, QContextMenuEvent* event); +void QAbstractSpinBox_ChangeEvent(QAbstractSpinBox* self, QEvent* event); +void QAbstractSpinBox_CloseEvent(QAbstractSpinBox* self, QCloseEvent* event); +void QAbstractSpinBox_HideEvent(QAbstractSpinBox* self, QHideEvent* event); +void QAbstractSpinBox_MousePressEvent(QAbstractSpinBox* self, QMouseEvent* event); +void QAbstractSpinBox_MouseReleaseEvent(QAbstractSpinBox* self, QMouseEvent* event); +void QAbstractSpinBox_MouseMoveEvent(QAbstractSpinBox* self, QMouseEvent* event); +void QAbstractSpinBox_TimerEvent(QAbstractSpinBox* self, QTimerEvent* event); +void QAbstractSpinBox_PaintEvent(QAbstractSpinBox* self, QPaintEvent* event); +void QAbstractSpinBox_ShowEvent(QAbstractSpinBox* self, QShowEvent* event); +int QAbstractSpinBox_StepEnabled(const QAbstractSpinBox* self); void QAbstractSpinBox_EditingFinished(QAbstractSpinBox* self); void QAbstractSpinBox_connect_EditingFinished(QAbstractSpinBox* self, intptr_t slot); struct miqt_string QAbstractSpinBox_Tr2(const char* s, const char* c); struct miqt_string QAbstractSpinBox_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractSpinBox_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractSpinBox_TrUtf83(const char* s, const char* c, int n); -void QAbstractSpinBox_Delete(QAbstractSpinBox* self); +void QAbstractSpinBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractSpinBox_virtualbase_SizeHint(const void* self); +void QAbstractSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractSpinBox_virtualbase_MinimumSizeHint(const void* self); +void QAbstractSpinBox_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_Event(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractSpinBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QAbstractSpinBox_override_virtual_Validate(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QAbstractSpinBox_override_virtual_Fixup(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_Fixup(const void* self, struct miqt_string input); +void QAbstractSpinBox_override_virtual_StepBy(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_StepBy(void* self, int steps); +void QAbstractSpinBox_override_virtual_Clear(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_Clear(void* self); +void QAbstractSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QAbstractSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QAbstractSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QAbstractSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QAbstractSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QAbstractSpinBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QAbstractSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QAbstractSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QAbstractSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_StepEnabled(const void* self); +void QAbstractSpinBox_override_virtual_DevType(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_DevType(const void* self); +void QAbstractSpinBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_SetVisible(void* self, bool visible); +void QAbstractSpinBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_HeightForWidth(const void* self, int param1); +void QAbstractSpinBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_HasHeightForWidth(const void* self); +void QAbstractSpinBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QAbstractSpinBox_virtualbase_PaintEngine(const void* self); +void QAbstractSpinBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_EnterEvent(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QAbstractSpinBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QAbstractSpinBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QAbstractSpinBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractSpinBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractSpinBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractSpinBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractSpinBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QAbstractSpinBox_override_virtual_Metric(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_Metric(const void* self, int param1); +void QAbstractSpinBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QAbstractSpinBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QAbstractSpinBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QAbstractSpinBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QAbstractSpinBox_virtualbase_SharedPainter(const void* self); +void QAbstractSpinBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QAbstractSpinBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QAbstractSpinBox_Delete(QAbstractSpinBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstractstate.cpp b/qt/gen_qabstractstate.cpp index 770a41f8..754c1275 100644 --- a/qt/gen_qabstractstate.cpp +++ b/qt/gen_qabstractstate.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -106,7 +108,11 @@ struct miqt_string QAbstractState_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QAbstractState_Delete(QAbstractState* self) { - delete self; +void QAbstractState_Delete(QAbstractState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstractstate.go b/qt/gen_qabstractstate.go index 55da541a..71694e1e 100644 --- a/qt/gen_qabstractstate.go +++ b/qt/gen_qabstractstate.go @@ -15,7 +15,8 @@ import ( ) type QAbstractState struct { - h *C.QAbstractState + h *C.QAbstractState + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QAbstractState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractState(h *C.QAbstractState) *QAbstractState { +// newQAbstractState constructs the type using only CGO pointers. +func newQAbstractState(h *C.QAbstractState, h_QObject *C.QObject) *QAbstractState { if h == nil { return nil } - return &QAbstractState{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractState{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractState(h unsafe.Pointer) *QAbstractState { - return newQAbstractState((*C.QAbstractState)(h)) +// UnsafeNewQAbstractState constructs the type using only unsafe pointers. +func UnsafeNewQAbstractState(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractState { + if h == nil { + return nil + } + + return &QAbstractState{h: (*C.QAbstractState)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractState) MetaObject() *QMetaObject { @@ -73,11 +82,11 @@ func QAbstractState_TrUtf8(s string) string { } func (this *QAbstractState) ParentState() *QState { - return UnsafeNewQState(unsafe.Pointer(C.QAbstractState_ParentState(this.h))) + return UnsafeNewQState(unsafe.Pointer(C.QAbstractState_ParentState(this.h)), nil, nil) } func (this *QAbstractState) Machine() *QStateMachine { - return UnsafeNewQStateMachine(unsafe.Pointer(C.QAbstractState_Machine(this.h))) + return UnsafeNewQStateMachine(unsafe.Pointer(C.QAbstractState_Machine(this.h)), nil, nil, nil) } func (this *QAbstractState) Active() bool { @@ -150,7 +159,7 @@ func QAbstractState_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractState) Delete() { - C.QAbstractState_Delete(this.h) + C.QAbstractState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstractstate.h b/qt/gen_qabstractstate.h index 2baf2067..dfa8b8e3 100644 --- a/qt/gen_qabstractstate.h +++ b/qt/gen_qabstractstate.h @@ -16,12 +16,16 @@ extern "C" { #ifdef __cplusplus class QAbstractState; +class QEvent; class QMetaObject; +class QObject; class QState; class QStateMachine; #else typedef struct QAbstractState QAbstractState; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QState QState; typedef struct QStateMachine QStateMachine; #endif @@ -35,11 +39,14 @@ QStateMachine* QAbstractState_Machine(const QAbstractState* self); bool QAbstractState_Active(const QAbstractState* self); void QAbstractState_ActiveChanged(QAbstractState* self, bool active); void QAbstractState_connect_ActiveChanged(QAbstractState* self, intptr_t slot); +void QAbstractState_OnEntry(QAbstractState* self, QEvent* event); +void QAbstractState_OnExit(QAbstractState* self, QEvent* event); +bool QAbstractState_Event(QAbstractState* self, QEvent* e); struct miqt_string QAbstractState_Tr2(const char* s, const char* c); struct miqt_string QAbstractState_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractState_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractState_TrUtf83(const char* s, const char* c, int n); -void QAbstractState_Delete(QAbstractState* self); +void QAbstractState_Delete(QAbstractState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstracttextdocumentlayout.cpp b/qt/gen_qabstracttextdocumentlayout.cpp index 959b39a4..300ec37d 100644 --- a/qt/gen_qabstracttextdocumentlayout.cpp +++ b/qt/gen_qabstracttextdocumentlayout.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include "gen_qabstracttextdocumentlayout.h" @@ -236,8 +237,12 @@ void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* se }); } -void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self) { - delete self; +void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format) { @@ -252,35 +257,50 @@ void QTextObjectInterface_OperatorAssign(QTextObjectInterface* self, QTextObject self->operator=(*param1); } -void QTextObjectInterface_Delete(QTextObjectInterface* self) { - delete self; +void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1) { - return new QAbstractTextDocumentLayout::Selection(*param1); +void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection) { + QAbstractTextDocumentLayout::Selection* ret = new QAbstractTextDocumentLayout::Selection(*param1); + *outptr_QAbstractTextDocumentLayout__Selection = ret; } void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1) { self->operator=(*param1); } -void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self) { - delete self; +void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new() { - return new QAbstractTextDocumentLayout::PaintContext(); +void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { + QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(); + *outptr_QAbstractTextDocumentLayout__PaintContext = ret; } -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1) { - return new QAbstractTextDocumentLayout::PaintContext(*param1); +void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { + QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(*param1); + *outptr_QAbstractTextDocumentLayout__PaintContext = ret; } void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1) { self->operator=(*param1); } -void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self) { - delete self; +void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstracttextdocumentlayout.go b/qt/gen_qabstracttextdocumentlayout.go index 7cdbff67..11584312 100644 --- a/qt/gen_qabstracttextdocumentlayout.go +++ b/qt/gen_qabstracttextdocumentlayout.go @@ -15,7 +15,8 @@ import ( ) type QAbstractTextDocumentLayout struct { - h *C.QAbstractTextDocumentLayout + h *C.QAbstractTextDocumentLayout + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QAbstractTextDocumentLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout) *QAbstractTextDocumentLayout { +// newQAbstractTextDocumentLayout constructs the type using only CGO pointers. +func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QAbstractTextDocumentLayout { if h == nil { return nil } - return &QAbstractTextDocumentLayout{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractTextDocumentLayout{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer) *QAbstractTextDocumentLayout { - return newQAbstractTextDocumentLayout((*C.QAbstractTextDocumentLayout)(h)) +// UnsafeNewQAbstractTextDocumentLayout constructs the type using only unsafe pointers. +func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTextDocumentLayout { + if h == nil { + return nil + } + + return &QAbstractTextDocumentLayout{h: (*C.QAbstractTextDocumentLayout)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractTextDocumentLayout) MetaObject() *QMetaObject { @@ -142,7 +151,7 @@ func (this *QAbstractTextDocumentLayout) PaintDevice() *QPaintDevice { } func (this *QAbstractTextDocumentLayout) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QAbstractTextDocumentLayout_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QAbstractTextDocumentLayout_Document(this.h)), nil) } func (this *QAbstractTextDocumentLayout) RegisterHandler(objectType int, component *QObject) { @@ -304,7 +313,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_Update1(cb C.intptr_t, param // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout) Delete() { - C.QAbstractTextDocumentLayout_Delete(this.h) + C.QAbstractTextDocumentLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -317,7 +326,8 @@ func (this *QAbstractTextDocumentLayout) GoGC() { } type QTextObjectInterface struct { - h *C.QTextObjectInterface + h *C.QTextObjectInterface + isSubclass bool } func (this *QTextObjectInterface) cPointer() *C.QTextObjectInterface { @@ -334,6 +344,7 @@ func (this *QTextObjectInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextObjectInterface constructs the type using only CGO pointers. func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface { if h == nil { return nil @@ -341,8 +352,13 @@ func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface { return &QTextObjectInterface{h: h} } +// UnsafeNewQTextObjectInterface constructs the type using only unsafe pointers. func UnsafeNewQTextObjectInterface(h unsafe.Pointer) *QTextObjectInterface { - return newQTextObjectInterface((*C.QTextObjectInterface)(h)) + if h == nil { + return nil + } + + return &QTextObjectInterface{h: (*C.QTextObjectInterface)(h)} } func (this *QTextObjectInterface) IntrinsicSize(doc *QTextDocument, posInDocument int, format *QTextFormat) *QSizeF { @@ -362,7 +378,7 @@ func (this *QTextObjectInterface) OperatorAssign(param1 *QTextObjectInterface) { // Delete this object from C++ memory. func (this *QTextObjectInterface) Delete() { - C.QTextObjectInterface_Delete(this.h) + C.QTextObjectInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -375,7 +391,8 @@ func (this *QTextObjectInterface) GoGC() { } type QAbstractTextDocumentLayout__Selection struct { - h *C.QAbstractTextDocumentLayout__Selection + h *C.QAbstractTextDocumentLayout__Selection + isSubclass bool } func (this *QAbstractTextDocumentLayout__Selection) cPointer() *C.QAbstractTextDocumentLayout__Selection { @@ -392,6 +409,7 @@ func (this *QAbstractTextDocumentLayout__Selection) UnsafePointer() unsafe.Point return unsafe.Pointer(this.h) } +// newQAbstractTextDocumentLayout__Selection constructs the type using only CGO pointers. func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection { if h == nil { return nil @@ -399,14 +417,23 @@ func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout_ return &QAbstractTextDocumentLayout__Selection{h: h} } +// UnsafeNewQAbstractTextDocumentLayout__Selection constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__Selection(h unsafe.Pointer) *QAbstractTextDocumentLayout__Selection { - return newQAbstractTextDocumentLayout__Selection((*C.QAbstractTextDocumentLayout__Selection)(h)) + if h == nil { + return nil + } + + return &QAbstractTextDocumentLayout__Selection{h: (*C.QAbstractTextDocumentLayout__Selection)(h)} } // NewQAbstractTextDocumentLayout__Selection constructs a new QAbstractTextDocumentLayout::Selection object. func NewQAbstractTextDocumentLayout__Selection(param1 *QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection { - ret := C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer()) - return newQAbstractTextDocumentLayout__Selection(ret) + var outptr_QAbstractTextDocumentLayout__Selection *C.QAbstractTextDocumentLayout__Selection = nil + + C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__Selection) + ret := newQAbstractTextDocumentLayout__Selection(outptr_QAbstractTextDocumentLayout__Selection) + ret.isSubclass = true + return ret } func (this *QAbstractTextDocumentLayout__Selection) OperatorAssign(param1 *QAbstractTextDocumentLayout__Selection) { @@ -415,7 +442,7 @@ func (this *QAbstractTextDocumentLayout__Selection) OperatorAssign(param1 *QAbst // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout__Selection) Delete() { - C.QAbstractTextDocumentLayout__Selection_Delete(this.h) + C.QAbstractTextDocumentLayout__Selection_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -428,7 +455,8 @@ func (this *QAbstractTextDocumentLayout__Selection) GoGC() { } type QAbstractTextDocumentLayout__PaintContext struct { - h *C.QAbstractTextDocumentLayout__PaintContext + h *C.QAbstractTextDocumentLayout__PaintContext + isSubclass bool } func (this *QAbstractTextDocumentLayout__PaintContext) cPointer() *C.QAbstractTextDocumentLayout__PaintContext { @@ -445,6 +473,7 @@ func (this *QAbstractTextDocumentLayout__PaintContext) UnsafePointer() unsafe.Po return unsafe.Pointer(this.h) } +// newQAbstractTextDocumentLayout__PaintContext constructs the type using only CGO pointers. func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext { if h == nil { return nil @@ -452,20 +481,33 @@ func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayo return &QAbstractTextDocumentLayout__PaintContext{h: h} } +// UnsafeNewQAbstractTextDocumentLayout__PaintContext constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__PaintContext(h unsafe.Pointer) *QAbstractTextDocumentLayout__PaintContext { - return newQAbstractTextDocumentLayout__PaintContext((*C.QAbstractTextDocumentLayout__PaintContext)(h)) + if h == nil { + return nil + } + + return &QAbstractTextDocumentLayout__PaintContext{h: (*C.QAbstractTextDocumentLayout__PaintContext)(h)} } // NewQAbstractTextDocumentLayout__PaintContext constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext() *QAbstractTextDocumentLayout__PaintContext { - ret := C.QAbstractTextDocumentLayout__PaintContext_new() - return newQAbstractTextDocumentLayout__PaintContext(ret) + var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil + + C.QAbstractTextDocumentLayout__PaintContext_new(&outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret.isSubclass = true + return ret } // NewQAbstractTextDocumentLayout__PaintContext2 constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext2(param1 *QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext { - ret := C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer()) - return newQAbstractTextDocumentLayout__PaintContext(ret) + var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil + + C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret.isSubclass = true + return ret } func (this *QAbstractTextDocumentLayout__PaintContext) OperatorAssign(param1 *QAbstractTextDocumentLayout__PaintContext) { @@ -474,7 +516,7 @@ func (this *QAbstractTextDocumentLayout__PaintContext) OperatorAssign(param1 *QA // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout__PaintContext) Delete() { - C.QAbstractTextDocumentLayout__PaintContext_Delete(this.h) + C.QAbstractTextDocumentLayout__PaintContext_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstracttextdocumentlayout.h b/qt/gen_qabstracttextdocumentlayout.h index ef27ef5a..93163410 100644 --- a/qt/gen_qabstracttextdocumentlayout.h +++ b/qt/gen_qabstracttextdocumentlayout.h @@ -37,6 +37,7 @@ class QTextBlock; class QTextDocument; class QTextFormat; class QTextFrame; +class QTextInlineObject; class QTextObjectInterface; #else typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; @@ -53,6 +54,7 @@ typedef struct QTextBlock QTextBlock; typedef struct QTextDocument QTextDocument; typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; +typedef struct QTextInlineObject QTextInlineObject; typedef struct QTextObjectInterface QTextObjectInterface; #endif @@ -84,6 +86,10 @@ void QAbstractTextDocumentLayout_DocumentSizeChanged(QAbstractTextDocumentLayout void QAbstractTextDocumentLayout_connect_DocumentSizeChanged(QAbstractTextDocumentLayout* self, intptr_t slot); void QAbstractTextDocumentLayout_PageCountChanged(QAbstractTextDocumentLayout* self, int newPages); void QAbstractTextDocumentLayout_connect_PageCountChanged(QAbstractTextDocumentLayout* self, intptr_t slot); +void QAbstractTextDocumentLayout_DocumentChanged(QAbstractTextDocumentLayout* self, int from, int charsRemoved, int charsAdded); +void QAbstractTextDocumentLayout_ResizeInlineObject(QAbstractTextDocumentLayout* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_PositionInlineObject(QAbstractTextDocumentLayout* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_DrawInlineObject(QAbstractTextDocumentLayout* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format); struct miqt_string QAbstractTextDocumentLayout_Tr2(const char* s, const char* c); struct miqt_string QAbstractTextDocumentLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractTextDocumentLayout_TrUtf82(const char* s, const char* c); @@ -91,21 +97,21 @@ struct miqt_string QAbstractTextDocumentLayout_TrUtf83(const char* s, const char void QAbstractTextDocumentLayout_UnregisterHandler2(QAbstractTextDocumentLayout* self, int objectType, QObject* component); void QAbstractTextDocumentLayout_Update1(QAbstractTextDocumentLayout* self, QRectF* param1); void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* self, intptr_t slot); -void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self); +void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass); QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format); void QTextObjectInterface_DrawObject(QTextObjectInterface* self, QPainter* painter, QRectF* rect, QTextDocument* doc, int posInDocument, QTextFormat* format); void QTextObjectInterface_OperatorAssign(QTextObjectInterface* self, QTextObjectInterface* param1); -void QTextObjectInterface_Delete(QTextObjectInterface* self); +void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass); -QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1); +void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection); void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1); -void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self); +void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self, bool isSubclass); -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new(); -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1); +void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); +void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1); -void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self); +void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qabstracttransition.cpp b/qt/gen_qabstracttransition.cpp index 8a27451b..e7ea1874 100644 --- a/qt/gen_qabstracttransition.cpp +++ b/qt/gen_qabstracttransition.cpp @@ -1,8 +1,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -155,7 +157,11 @@ struct miqt_string QAbstractTransition_TrUtf83(const char* s, const char* c, int return _ms; } -void QAbstractTransition_Delete(QAbstractTransition* self) { - delete self; +void QAbstractTransition_Delete(QAbstractTransition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qabstracttransition.go b/qt/gen_qabstracttransition.go index 823a70a3..4e460de2 100644 --- a/qt/gen_qabstracttransition.go +++ b/qt/gen_qabstracttransition.go @@ -21,7 +21,8 @@ const ( ) type QAbstractTransition struct { - h *C.QAbstractTransition + h *C.QAbstractTransition + isSubclass bool *QObject } @@ -39,15 +40,23 @@ func (this *QAbstractTransition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractTransition(h *C.QAbstractTransition) *QAbstractTransition { +// newQAbstractTransition constructs the type using only CGO pointers. +func newQAbstractTransition(h *C.QAbstractTransition, h_QObject *C.QObject) *QAbstractTransition { if h == nil { return nil } - return &QAbstractTransition{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractTransition{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractTransition(h unsafe.Pointer) *QAbstractTransition { - return newQAbstractTransition((*C.QAbstractTransition)(h)) +// UnsafeNewQAbstractTransition constructs the type using only unsafe pointers. +func UnsafeNewQAbstractTransition(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTransition { + if h == nil { + return nil + } + + return &QAbstractTransition{h: (*C.QAbstractTransition)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractTransition) MetaObject() *QMetaObject { @@ -79,11 +88,11 @@ func QAbstractTransition_TrUtf8(s string) string { } func (this *QAbstractTransition) SourceState() *QState { - return UnsafeNewQState(unsafe.Pointer(C.QAbstractTransition_SourceState(this.h))) + return UnsafeNewQState(unsafe.Pointer(C.QAbstractTransition_SourceState(this.h)), nil, nil) } func (this *QAbstractTransition) TargetState() *QAbstractState { - return UnsafeNewQAbstractState(unsafe.Pointer(C.QAbstractTransition_TargetState(this.h))) + return UnsafeNewQAbstractState(unsafe.Pointer(C.QAbstractTransition_TargetState(this.h)), nil) } func (this *QAbstractTransition) SetTargetState(target *QAbstractState) { @@ -95,7 +104,7 @@ func (this *QAbstractTransition) TargetStates() []*QAbstractState { _ret := make([]*QAbstractState, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractState(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractState(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -119,7 +128,7 @@ func (this *QAbstractTransition) SetTransitionType(typeVal QAbstractTransition__ } func (this *QAbstractTransition) Machine() *QStateMachine { - return UnsafeNewQStateMachine(unsafe.Pointer(C.QAbstractTransition_Machine(this.h))) + return UnsafeNewQStateMachine(unsafe.Pointer(C.QAbstractTransition_Machine(this.h)), nil, nil, nil) } func (this *QAbstractTransition) AddAnimation(animation *QAbstractAnimation) { @@ -135,7 +144,7 @@ func (this *QAbstractTransition) Animations() []*QAbstractAnimation { _ret := make([]*QAbstractAnimation, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractAnimation(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractAnimation(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -186,7 +195,7 @@ func QAbstractTransition_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractTransition) Delete() { - C.QAbstractTransition_Delete(this.h) + C.QAbstractTransition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qabstracttransition.h b/qt/gen_qabstracttransition.h index 44a6278e..e76befaf 100644 --- a/qt/gen_qabstracttransition.h +++ b/qt/gen_qabstracttransition.h @@ -18,14 +18,18 @@ extern "C" { class QAbstractAnimation; class QAbstractState; class QAbstractTransition; +class QEvent; class QMetaObject; +class QObject; class QState; class QStateMachine; #else typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QAbstractState QAbstractState; typedef struct QAbstractTransition QAbstractTransition; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QState QState; typedef struct QStateMachine QStateMachine; #endif @@ -45,11 +49,14 @@ QStateMachine* QAbstractTransition_Machine(const QAbstractTransition* self); void QAbstractTransition_AddAnimation(QAbstractTransition* self, QAbstractAnimation* animation); void QAbstractTransition_RemoveAnimation(QAbstractTransition* self, QAbstractAnimation* animation); struct miqt_array /* of QAbstractAnimation* */ QAbstractTransition_Animations(const QAbstractTransition* self); +bool QAbstractTransition_EventTest(QAbstractTransition* self, QEvent* event); +void QAbstractTransition_OnTransition(QAbstractTransition* self, QEvent* event); +bool QAbstractTransition_Event(QAbstractTransition* self, QEvent* e); struct miqt_string QAbstractTransition_Tr2(const char* s, const char* c); struct miqt_string QAbstractTransition_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractTransition_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractTransition_TrUtf83(const char* s, const char* c, int n); -void QAbstractTransition_Delete(QAbstractTransition* self); +void QAbstractTransition_Delete(QAbstractTransition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qaccessible.cpp b/qt/gen_qaccessible.cpp index b3db8f86..ea6c4716 100644 --- a/qt/gen_qaccessible.cpp +++ b/qt/gen_qaccessible.cpp @@ -98,8 +98,12 @@ struct miqt_map /* tuple of int and int */ QAccessible_QAccessibleTextBoundaryH return _out; } -void QAccessible_Delete(QAccessible* self) { - delete self; +void QAccessible_Delete(QAccessible* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QAccessibleInterface_IsValid(const QAccessibleInterface* self) { @@ -114,8 +118,8 @@ QWindow* QAccessibleInterface_Window(const QAccessibleInterface* self) { return self->window(); } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self) { - QVector> _ret = self->relations(); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self, int match) { + QVector> _ret = self->relations(static_cast(match)); // Convert QList<> from C++ memory to manually-managed C memory struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -235,30 +239,6 @@ void* QAccessibleInterface_InterfaceCast(QAccessibleInterface* self, int param1) return self->interface_cast(static_cast(param1)); } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations1(const QAccessibleInterface* self, int match) { - QVector> _ret = self->relations(static_cast(match)); - // Convert QList<> from C++ memory to manually-managed C memory - struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QPair> _vv_ret = _ret[i]; - // Convert QPair<> from C++ memory to manually-managed C memory - QAccessibleInterface** _vv_first_arr = static_cast(malloc(sizeof(QAccessibleInterface*))); - int* _vv_second_arr = static_cast(malloc(sizeof(int))); - _vv_first_arr[0] = _vv_ret.first; - QFlags _vv_second_ret = _vv_ret.second; - _vv_second_arr[0] = static_cast(_vv_second_ret); - struct miqt_map _vv_out; - _vv_out.len = 1; - _vv_out.keys = static_cast(_vv_first_arr); - _vv_out.values = static_cast(_vv_second_arr); - _arr[i] = _vv_out; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - void QAccessibleTextInterface_Selection(const QAccessibleTextInterface* self, int selectionIndex, int* startOffset, int* endOffset) { self->selection(static_cast(selectionIndex), static_cast(startOffset), static_cast(endOffset)); } @@ -362,8 +342,12 @@ void QAccessibleTextInterface_OperatorAssign(QAccessibleTextInterface* self, QAc self->operator=(*param1); } -void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self) { - delete self; +void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void QAccessibleEditableTextInterface_DeleteText(QAccessibleEditableTextInterface* self, int startOffset, int endOffset) { @@ -384,8 +368,12 @@ void QAccessibleEditableTextInterface_OperatorAssign(QAccessibleEditableTextInte self->operator=(*param1); } -void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self) { - delete self; +void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QVariant* QAccessibleValueInterface_CurrentValue(const QAccessibleValueInterface* self) { @@ -412,8 +400,12 @@ void QAccessibleValueInterface_OperatorAssign(QAccessibleValueInterface* self, Q self->operator=(*param1); } -void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self) { - delete self; +void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QAccessibleTableCellInterface_IsSelected(const QAccessibleTableCellInterface* self) { @@ -470,8 +462,12 @@ void QAccessibleTableCellInterface_OperatorAssign(QAccessibleTableCellInterface* self->operator=(*param1); } -void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self) { - delete self; +void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QAccessibleInterface* QAccessibleTableInterface_Caption(const QAccessibleTableInterface* self) { @@ -595,8 +591,12 @@ void QAccessibleTableInterface_ModelChange(QAccessibleTableInterface* self, QAcc self->modelChange(event); } -void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self) { - delete self; +void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QAccessibleActionInterface_Tr(const char* sourceText) { @@ -871,8 +871,12 @@ struct miqt_string QAccessibleActionInterface_TrUtf83(const char* sourceText, co return _ms; } -void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self) { - delete self; +void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QAccessibleImageInterface_ImageDescription(const QAccessibleImageInterface* self) { @@ -898,16 +902,54 @@ void QAccessibleImageInterface_OperatorAssign(QAccessibleImageInterface* self, Q self->operator=(*param1); } -void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self) { - delete self; +void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ) { - return new QAccessibleEvent(obj, static_cast(typ)); +class MiqtVirtualQAccessibleEvent : public virtual QAccessibleEvent { +public: + + MiqtVirtualQAccessibleEvent(QObject* obj, QAccessible::Event typ): QAccessibleEvent(obj, typ) {}; + MiqtVirtualQAccessibleEvent(QAccessibleInterface* iface, QAccessible::Event typ): QAccessibleEvent(iface, typ) {}; + + virtual ~MiqtVirtualQAccessibleEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleEvent::accessibleInterface(); + + } + +}; + +void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(obj, static_cast(typ)); + *outptr_QAccessibleEvent = ret; } -QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ) { - return new QAccessibleEvent(iface, static_cast(typ)); +void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(iface, static_cast(typ)); + *outptr_QAccessibleEvent = ret; } int QAccessibleEvent_Type(const QAccessibleEvent* self) { @@ -936,32 +978,128 @@ QAccessibleInterface* QAccessibleEvent_AccessibleInterface(const QAccessibleEven return self->accessibleInterface(); } -void QAccessibleEvent_Delete(QAccessibleEvent* self) { - delete self; +void QAccessibleEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleEvent*)(self) )->virtualbase_AccessibleInterface(); +} + +void QAccessibleEvent_Delete(QAccessibleEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state) { - return new QAccessibleStateChangeEvent(obj, *state); +class MiqtVirtualQAccessibleStateChangeEvent : public virtual QAccessibleStateChangeEvent { +public: + + MiqtVirtualQAccessibleStateChangeEvent(QObject* obj, QAccessible::State state): QAccessibleStateChangeEvent(obj, state) {}; + MiqtVirtualQAccessibleStateChangeEvent(QAccessibleInterface* iface, QAccessible::State state): QAccessibleStateChangeEvent(iface, state) {}; + + virtual ~MiqtVirtualQAccessibleStateChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleStateChangeEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleStateChangeEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleStateChangeEvent::accessibleInterface(); + + } + +}; + +void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(obj, *state); + *outptr_QAccessibleStateChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state) { - return new QAccessibleStateChangeEvent(iface, *state); +void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(iface, *state); + *outptr_QAccessibleStateChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self) { return new QAccessible::State(self->changedStates()); } -void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self) { - delete self; +void QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleStateChangeEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleStateChangeEvent*)(self) )->virtualbase_AccessibleInterface(); +} + +void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos) { - return new QAccessibleTextCursorEvent(obj, static_cast(cursorPos)); +class MiqtVirtualQAccessibleTextCursorEvent : public virtual QAccessibleTextCursorEvent { +public: + + MiqtVirtualQAccessibleTextCursorEvent(QObject* obj, int cursorPos): QAccessibleTextCursorEvent(obj, cursorPos) {}; + MiqtVirtualQAccessibleTextCursorEvent(QAccessibleInterface* iface, int cursorPos): QAccessibleTextCursorEvent(iface, cursorPos) {}; + + virtual ~MiqtVirtualQAccessibleTextCursorEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleTextCursorEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleTextCursorEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleTextCursorEvent::accessibleInterface(); + + } + +}; + +void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(obj, static_cast(cursorPos)); + *outptr_QAccessibleTextCursorEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos) { - return new QAccessibleTextCursorEvent(iface, static_cast(cursorPos)); +void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(iface, static_cast(cursorPos)); + *outptr_QAccessibleTextCursorEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position) { @@ -972,16 +1110,34 @@ int QAccessibleTextCursorEvent_CursorPosition(const QAccessibleTextCursorEvent* return self->cursorPosition(); } -void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self) { - delete self; +void QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleTextCursorEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleTextCursorEvent*)(self) )->virtualbase_AccessibleInterface(); +} + +void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end) { - return new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); +void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); + *outptr_QAccessibleTextSelectionEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end) { - return new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); +void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); + *outptr_QAccessibleTextSelectionEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end) { @@ -996,18 +1152,28 @@ int QAccessibleTextSelectionEvent_SelectionEnd(const QAccessibleTextSelectionEve return self->selectionEnd(); } -void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self) { - delete self; +void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text) { +void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); + QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); + *outptr_QAccessibleTextInsertEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { +void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); + QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); + *outptr_QAccessibleTextInsertEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self) { @@ -1025,18 +1191,28 @@ int QAccessibleTextInsertEvent_ChangePosition(const QAccessibleTextInsertEvent* return self->changePosition(); } -void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self) { - delete self; +void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text) { +void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); + QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); + *outptr_QAccessibleTextRemoveEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { +void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); + QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); + *outptr_QAccessibleTextRemoveEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self) { @@ -1054,20 +1230,30 @@ int QAccessibleTextRemoveEvent_ChangePosition(const QAccessibleTextRemoveEvent* return self->changePosition(); } -void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self) { - delete self; +void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text) { +void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); + QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); + *outptr_QAccessibleTextUpdateEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text) { +void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); + QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); + *outptr_QAccessibleTextUpdateEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self) { @@ -1096,16 +1282,56 @@ int QAccessibleTextUpdateEvent_ChangePosition(const QAccessibleTextUpdateEvent* return self->changePosition(); } -void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self) { - delete self; +void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val) { - return new QAccessibleValueChangeEvent(obj, *val); +class MiqtVirtualQAccessibleValueChangeEvent : public virtual QAccessibleValueChangeEvent { +public: + + MiqtVirtualQAccessibleValueChangeEvent(QObject* obj, const QVariant& val): QAccessibleValueChangeEvent(obj, val) {}; + MiqtVirtualQAccessibleValueChangeEvent(QAccessibleInterface* iface, const QVariant& val): QAccessibleValueChangeEvent(iface, val) {}; + + virtual ~MiqtVirtualQAccessibleValueChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleValueChangeEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleValueChangeEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleValueChangeEvent::accessibleInterface(); + + } + +}; + +void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(obj, *val); + *outptr_QAccessibleValueChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val) { - return new QAccessibleValueChangeEvent(iface, *val); +void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(iface, *val); + *outptr_QAccessibleValueChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val) { @@ -1116,16 +1342,64 @@ QVariant* QAccessibleValueChangeEvent_Value(const QAccessibleValueChangeEvent* s return new QVariant(self->value()); } -void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self) { - delete self; +void QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleValueChangeEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleValueChangeEvent*)(self) )->virtualbase_AccessibleInterface(); +} + +void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType) { - return new QAccessibleTableModelChangeEvent(obj, static_cast(changeType)); +class MiqtVirtualQAccessibleTableModelChangeEvent : public virtual QAccessibleTableModelChangeEvent { +public: + + MiqtVirtualQAccessibleTableModelChangeEvent(QObject* obj, QAccessibleTableModelChangeEvent::ModelChangeType changeType): QAccessibleTableModelChangeEvent(obj, changeType) {}; + MiqtVirtualQAccessibleTableModelChangeEvent(QAccessibleInterface* iface, QAccessibleTableModelChangeEvent::ModelChangeType changeType): QAccessibleTableModelChangeEvent(iface, changeType) {}; + + virtual ~MiqtVirtualQAccessibleTableModelChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleTableModelChangeEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleTableModelChangeEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleTableModelChangeEvent::accessibleInterface(); + + } + +}; + +void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(obj, static_cast(changeType)); + *outptr_QAccessibleTableModelChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType) { - return new QAccessibleTableModelChangeEvent(iface, static_cast(changeType)); +void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(iface, static_cast(changeType)); + *outptr_QAccessibleTableModelChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType) { @@ -1169,20 +1443,38 @@ int QAccessibleTableModelChangeEvent_LastColumn(const QAccessibleTableModelChang return self->lastColumn(); } -void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self) { - delete self; +void QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleTableModelChangeEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleTableModelChangeEvent*)(self) )->virtualbase_AccessibleInterface(); +} + +void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessible__State* QAccessible__State_new() { - return new QAccessible::State(); +void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State) { + QAccessible::State* ret = new QAccessible::State(); + *outptr_QAccessible__State = ret; } -QAccessible__State* QAccessible__State_new2(QAccessible__State* param1) { - return new QAccessible::State(*param1); +void QAccessible__State_new2(QAccessible__State* param1, QAccessible__State** outptr_QAccessible__State) { + QAccessible::State* ret = new QAccessible::State(*param1); + *outptr_QAccessible__State = ret; } -void QAccessible__State_Delete(QAccessible__State* self) { - delete self; +void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void QAccessible__ActivationObserver_AccessibilityActiveChanged(QAccessible__ActivationObserver* self, bool active) { @@ -1193,7 +1485,11 @@ void QAccessible__ActivationObserver_OperatorAssign(QAccessible__ActivationObser self->operator=(*param1); } -void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self) { - delete self; +void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qaccessible.go b/qt/gen_qaccessible.go index 40308706..7bd4f5af 100644 --- a/qt/gen_qaccessible.go +++ b/qt/gen_qaccessible.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -226,7 +227,8 @@ const ( ) type QAccessible struct { - h *C.QAccessible + h *C.QAccessible + isSubclass bool } func (this *QAccessible) cPointer() *C.QAccessible { @@ -243,6 +245,7 @@ func (this *QAccessible) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessible constructs the type using only CGO pointers. func newQAccessible(h *C.QAccessible) *QAccessible { if h == nil { return nil @@ -250,8 +253,13 @@ func newQAccessible(h *C.QAccessible) *QAccessible { return &QAccessible{h: h} } +// UnsafeNewQAccessible constructs the type using only unsafe pointers. func UnsafeNewQAccessible(h unsafe.Pointer) *QAccessible { - return newQAccessible((*C.QAccessible)(h)) + if h == nil { + return nil + } + + return &QAccessible{h: (*C.QAccessible)(h)} } func QAccessible_InstallActivationObserver(param1 *QAccessible__ActivationObserver) { @@ -321,7 +329,7 @@ func QAccessible_QAccessibleTextBoundaryHelper(cursor *QTextCursor, boundaryType // Delete this object from C++ memory. func (this *QAccessible) Delete() { - C.QAccessible_Delete(this.h) + C.QAccessible_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -334,7 +342,8 @@ func (this *QAccessible) GoGC() { } type QAccessibleInterface struct { - h *C.QAccessibleInterface + h *C.QAccessibleInterface + isSubclass bool } func (this *QAccessibleInterface) cPointer() *C.QAccessibleInterface { @@ -351,6 +360,7 @@ func (this *QAccessibleInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleInterface constructs the type using only CGO pointers. func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface { if h == nil { return nil @@ -358,8 +368,13 @@ func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface { return &QAccessibleInterface{h: h} } +// UnsafeNewQAccessibleInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleInterface(h unsafe.Pointer) *QAccessibleInterface { - return newQAccessibleInterface((*C.QAccessibleInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleInterface{h: (*C.QAccessibleInterface)(h)} } func (this *QAccessibleInterface) IsValid() bool { @@ -371,14 +386,14 @@ func (this *QAccessibleInterface) Object() *QObject { } func (this *QAccessibleInterface) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleInterface_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleInterface_Window(this.h)), nil, nil) } -func (this *QAccessibleInterface) Relations() []struct { +func (this *QAccessibleInterface) Relations(match QAccessible__RelationFlag) []struct { First *QAccessibleInterface Second QAccessible__RelationFlag } { - var _ma C.struct_miqt_array = C.QAccessibleInterface_Relations(this.h) + var _ma C.struct_miqt_array = C.QAccessibleInterface_Relations(this.h, (C.int)(match)) _ret := make([]struct { First *QAccessibleInterface Second QAccessible__RelationFlag @@ -506,33 +521,9 @@ func (this *QAccessibleInterface) InterfaceCast(param1 QAccessible__InterfaceTyp return (unsafe.Pointer)(C.QAccessibleInterface_InterfaceCast(this.h, (C.int)(param1))) } -func (this *QAccessibleInterface) Relations1(match QAccessible__RelationFlag) []struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag -} { - var _ma C.struct_miqt_array = C.QAccessibleInterface_Relations1(this.h, (C.int)(match)) - _ret := make([]struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }, int(_ma.len)) - _outCast := (*[0xffff]C.struct_miqt_map)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - var _vv_mm C.struct_miqt_map = _outCast[i] - _vv_First_CArray := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_vv_mm.keys)) - _vv_Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_vv_mm.values)) - _vv_entry_First := UnsafeNewQAccessibleInterface(unsafe.Pointer(_vv_First_CArray[0])) - _vv_entry_Second := (QAccessible__RelationFlag)(_vv_Second_CArray[0]) - - _ret[i] = struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }{First: _vv_entry_First, Second: _vv_entry_Second} - } - return _ret -} - type QAccessibleTextInterface struct { - h *C.QAccessibleTextInterface + h *C.QAccessibleTextInterface + isSubclass bool } func (this *QAccessibleTextInterface) cPointer() *C.QAccessibleTextInterface { @@ -549,6 +540,7 @@ func (this *QAccessibleTextInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleTextInterface constructs the type using only CGO pointers. func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleTextInterface { if h == nil { return nil @@ -556,8 +548,13 @@ func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleText return &QAccessibleTextInterface{h: h} } +// UnsafeNewQAccessibleTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTextInterface(h unsafe.Pointer) *QAccessibleTextInterface { - return newQAccessibleTextInterface((*C.QAccessibleTextInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleTextInterface{h: (*C.QAccessibleTextInterface)(h)} } func (this *QAccessibleTextInterface) Selection(selectionIndex int, startOffset *int, endOffset *int) { @@ -648,7 +645,7 @@ func (this *QAccessibleTextInterface) OperatorAssign(param1 *QAccessibleTextInte // Delete this object from C++ memory. func (this *QAccessibleTextInterface) Delete() { - C.QAccessibleTextInterface_Delete(this.h) + C.QAccessibleTextInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -661,7 +658,8 @@ func (this *QAccessibleTextInterface) GoGC() { } type QAccessibleEditableTextInterface struct { - h *C.QAccessibleEditableTextInterface + h *C.QAccessibleEditableTextInterface + isSubclass bool } func (this *QAccessibleEditableTextInterface) cPointer() *C.QAccessibleEditableTextInterface { @@ -678,6 +676,7 @@ func (this *QAccessibleEditableTextInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleEditableTextInterface constructs the type using only CGO pointers. func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) *QAccessibleEditableTextInterface { if h == nil { return nil @@ -685,8 +684,13 @@ func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) return &QAccessibleEditableTextInterface{h: h} } +// UnsafeNewQAccessibleEditableTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEditableTextInterface(h unsafe.Pointer) *QAccessibleEditableTextInterface { - return newQAccessibleEditableTextInterface((*C.QAccessibleEditableTextInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleEditableTextInterface{h: (*C.QAccessibleEditableTextInterface)(h)} } func (this *QAccessibleEditableTextInterface) DeleteText(startOffset int, endOffset int) { @@ -715,7 +719,7 @@ func (this *QAccessibleEditableTextInterface) OperatorAssign(param1 *QAccessible // Delete this object from C++ memory. func (this *QAccessibleEditableTextInterface) Delete() { - C.QAccessibleEditableTextInterface_Delete(this.h) + C.QAccessibleEditableTextInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -728,7 +732,8 @@ func (this *QAccessibleEditableTextInterface) GoGC() { } type QAccessibleValueInterface struct { - h *C.QAccessibleValueInterface + h *C.QAccessibleValueInterface + isSubclass bool } func (this *QAccessibleValueInterface) cPointer() *C.QAccessibleValueInterface { @@ -745,6 +750,7 @@ func (this *QAccessibleValueInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleValueInterface constructs the type using only CGO pointers. func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleValueInterface { if h == nil { return nil @@ -752,8 +758,13 @@ func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleVa return &QAccessibleValueInterface{h: h} } +// UnsafeNewQAccessibleValueInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleValueInterface(h unsafe.Pointer) *QAccessibleValueInterface { - return newQAccessibleValueInterface((*C.QAccessibleValueInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleValueInterface{h: (*C.QAccessibleValueInterface)(h)} } func (this *QAccessibleValueInterface) CurrentValue() *QVariant { @@ -794,7 +805,7 @@ func (this *QAccessibleValueInterface) OperatorAssign(param1 *QAccessibleValueIn // Delete this object from C++ memory. func (this *QAccessibleValueInterface) Delete() { - C.QAccessibleValueInterface_Delete(this.h) + C.QAccessibleValueInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -807,7 +818,8 @@ func (this *QAccessibleValueInterface) GoGC() { } type QAccessibleTableCellInterface struct { - h *C.QAccessibleTableCellInterface + h *C.QAccessibleTableCellInterface + isSubclass bool } func (this *QAccessibleTableCellInterface) cPointer() *C.QAccessibleTableCellInterface { @@ -824,6 +836,7 @@ func (this *QAccessibleTableCellInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleTableCellInterface constructs the type using only CGO pointers. func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAccessibleTableCellInterface { if h == nil { return nil @@ -831,8 +844,13 @@ func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAcce return &QAccessibleTableCellInterface{h: h} } +// UnsafeNewQAccessibleTableCellInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableCellInterface(h unsafe.Pointer) *QAccessibleTableCellInterface { - return newQAccessibleTableCellInterface((*C.QAccessibleTableCellInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleTableCellInterface{h: (*C.QAccessibleTableCellInterface)(h)} } func (this *QAccessibleTableCellInterface) IsSelected() bool { @@ -885,7 +903,7 @@ func (this *QAccessibleTableCellInterface) OperatorAssign(param1 *QAccessibleTab // Delete this object from C++ memory. func (this *QAccessibleTableCellInterface) Delete() { - C.QAccessibleTableCellInterface_Delete(this.h) + C.QAccessibleTableCellInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -898,7 +916,8 @@ func (this *QAccessibleTableCellInterface) GoGC() { } type QAccessibleTableInterface struct { - h *C.QAccessibleTableInterface + h *C.QAccessibleTableInterface + isSubclass bool } func (this *QAccessibleTableInterface) cPointer() *C.QAccessibleTableInterface { @@ -915,6 +934,7 @@ func (this *QAccessibleTableInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleTableInterface constructs the type using only CGO pointers. func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTableInterface { if h == nil { return nil @@ -922,8 +942,13 @@ func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTa return &QAccessibleTableInterface{h: h} } +// UnsafeNewQAccessibleTableInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableInterface(h unsafe.Pointer) *QAccessibleTableInterface { - return newQAccessibleTableInterface((*C.QAccessibleTableInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleTableInterface{h: (*C.QAccessibleTableInterface)(h)} } func (this *QAccessibleTableInterface) Caption() *QAccessibleInterface { @@ -1032,7 +1057,7 @@ func (this *QAccessibleTableInterface) ModelChange(event *QAccessibleTableModelC // Delete this object from C++ memory. func (this *QAccessibleTableInterface) Delete() { - C.QAccessibleTableInterface_Delete(this.h) + C.QAccessibleTableInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1045,7 +1070,8 @@ func (this *QAccessibleTableInterface) GoGC() { } type QAccessibleActionInterface struct { - h *C.QAccessibleActionInterface + h *C.QAccessibleActionInterface + isSubclass bool } func (this *QAccessibleActionInterface) cPointer() *C.QAccessibleActionInterface { @@ -1062,6 +1088,7 @@ func (this *QAccessibleActionInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleActionInterface constructs the type using only CGO pointers. func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessibleActionInterface { if h == nil { return nil @@ -1069,8 +1096,13 @@ func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessible return &QAccessibleActionInterface{h: h} } +// UnsafeNewQAccessibleActionInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleActionInterface(h unsafe.Pointer) *QAccessibleActionInterface { - return newQAccessibleActionInterface((*C.QAccessibleActionInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleActionInterface{h: (*C.QAccessibleActionInterface)(h)} } func QAccessibleActionInterface_Tr(sourceText string) string { @@ -1285,7 +1317,7 @@ func QAccessibleActionInterface_TrUtf83(sourceText string, disambiguation string // Delete this object from C++ memory. func (this *QAccessibleActionInterface) Delete() { - C.QAccessibleActionInterface_Delete(this.h) + C.QAccessibleActionInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1298,7 +1330,8 @@ func (this *QAccessibleActionInterface) GoGC() { } type QAccessibleImageInterface struct { - h *C.QAccessibleImageInterface + h *C.QAccessibleImageInterface + isSubclass bool } func (this *QAccessibleImageInterface) cPointer() *C.QAccessibleImageInterface { @@ -1315,6 +1348,7 @@ func (this *QAccessibleImageInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleImageInterface constructs the type using only CGO pointers. func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleImageInterface { if h == nil { return nil @@ -1322,8 +1356,13 @@ func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleIm return &QAccessibleImageInterface{h: h} } +// UnsafeNewQAccessibleImageInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleImageInterface(h unsafe.Pointer) *QAccessibleImageInterface { - return newQAccessibleImageInterface((*C.QAccessibleImageInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleImageInterface{h: (*C.QAccessibleImageInterface)(h)} } func (this *QAccessibleImageInterface) ImageDescription() string { @@ -1353,7 +1392,7 @@ func (this *QAccessibleImageInterface) OperatorAssign(param1 *QAccessibleImageIn // Delete this object from C++ memory. func (this *QAccessibleImageInterface) Delete() { - C.QAccessibleImageInterface_Delete(this.h) + C.QAccessibleImageInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1366,7 +1405,8 @@ func (this *QAccessibleImageInterface) GoGC() { } type QAccessibleEvent struct { - h *C.QAccessibleEvent + h *C.QAccessibleEvent + isSubclass bool } func (this *QAccessibleEvent) cPointer() *C.QAccessibleEvent { @@ -1383,6 +1423,7 @@ func (this *QAccessibleEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleEvent constructs the type using only CGO pointers. func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent { if h == nil { return nil @@ -1390,20 +1431,33 @@ func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent { return &QAccessibleEvent{h: h} } +// UnsafeNewQAccessibleEvent constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEvent(h unsafe.Pointer) *QAccessibleEvent { - return newQAccessibleEvent((*C.QAccessibleEvent)(h)) + if h == nil { + return nil + } + + return &QAccessibleEvent{h: (*C.QAccessibleEvent)(h)} } // NewQAccessibleEvent constructs a new QAccessibleEvent object. func NewQAccessibleEvent(obj *QObject, typ QAccessible__Event) *QAccessibleEvent { - ret := C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ)) - return newQAccessibleEvent(ret) + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) + ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleEvent2 constructs a new QAccessibleEvent object. func NewQAccessibleEvent2(iface *QAccessibleInterface, typ QAccessible__Event) *QAccessibleEvent { - ret := C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ)) - return newQAccessibleEvent(ret) + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) + ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleEvent) Type() QAccessible__Event { @@ -1430,9 +1484,30 @@ func (this *QAccessibleEvent) AccessibleInterface() *QAccessibleInterface { return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleEvent_AccessibleInterface(this.h))) } +func (this *QAccessibleEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleEvent_AccessibleInterface(self *C.QAccessibleEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleEvent) Delete() { - C.QAccessibleEvent_Delete(this.h) + C.QAccessibleEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1445,7 +1520,8 @@ func (this *QAccessibleEvent) GoGC() { } type QAccessibleStateChangeEvent struct { - h *C.QAccessibleStateChangeEvent + h *C.QAccessibleStateChangeEvent + isSubclass bool *QAccessibleEvent } @@ -1463,27 +1539,45 @@ func (this *QAccessibleStateChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent) *QAccessibleStateChangeEvent { +// newQAccessibleStateChangeEvent constructs the type using only CGO pointers. +func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleStateChangeEvent { if h == nil { return nil } - return &QAccessibleStateChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleStateChangeEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer) *QAccessibleStateChangeEvent { - return newQAccessibleStateChangeEvent((*C.QAccessibleStateChangeEvent)(h)) +// UnsafeNewQAccessibleStateChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleStateChangeEvent { + if h == nil { + return nil + } + + return &QAccessibleStateChangeEvent{h: (*C.QAccessibleStateChangeEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleStateChangeEvent constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent(obj *QObject, state QAccessible__State) *QAccessibleStateChangeEvent { - ret := C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer()) - return newQAccessibleStateChangeEvent(ret) + var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleStateChangeEvent2 constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent2(iface *QAccessibleInterface, state QAccessible__State) *QAccessibleStateChangeEvent { - ret := C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer()) - return newQAccessibleStateChangeEvent(ret) + var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleStateChangeEvent) ChangedStates() *QAccessible__State { @@ -1493,9 +1587,30 @@ func (this *QAccessibleStateChangeEvent) ChangedStates() *QAccessible__State { return _goptr } +func (this *QAccessibleStateChangeEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleStateChangeEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleStateChangeEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleStateChangeEvent_AccessibleInterface(self *C.QAccessibleStateChangeEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleStateChangeEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleStateChangeEvent) Delete() { - C.QAccessibleStateChangeEvent_Delete(this.h) + C.QAccessibleStateChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1508,7 +1623,8 @@ func (this *QAccessibleStateChangeEvent) GoGC() { } type QAccessibleTextCursorEvent struct { - h *C.QAccessibleTextCursorEvent + h *C.QAccessibleTextCursorEvent + isSubclass bool *QAccessibleEvent } @@ -1526,27 +1642,45 @@ func (this *QAccessibleTextCursorEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent) *QAccessibleTextCursorEvent { +// newQAccessibleTextCursorEvent constructs the type using only CGO pointers. +func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextCursorEvent { if h == nil { return nil } - return &QAccessibleTextCursorEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleTextCursorEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer) *QAccessibleTextCursorEvent { - return newQAccessibleTextCursorEvent((*C.QAccessibleTextCursorEvent)(h)) +// UnsafeNewQAccessibleTextCursorEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextCursorEvent { + if h == nil { + return nil + } + + return &QAccessibleTextCursorEvent{h: (*C.QAccessibleTextCursorEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleTextCursorEvent constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent(obj *QObject, cursorPos int) *QAccessibleTextCursorEvent { - ret := C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos)) - return newQAccessibleTextCursorEvent(ret) + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextCursorEvent2 constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent2(iface *QAccessibleInterface, cursorPos int) *QAccessibleTextCursorEvent { - ret := C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos)) - return newQAccessibleTextCursorEvent(ret) + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextCursorEvent) SetCursorPosition(position int) { @@ -1557,9 +1691,30 @@ func (this *QAccessibleTextCursorEvent) CursorPosition() int { return (int)(C.QAccessibleTextCursorEvent_CursorPosition(this.h)) } +func (this *QAccessibleTextCursorEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleTextCursorEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleTextCursorEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleTextCursorEvent_AccessibleInterface(self *C.QAccessibleTextCursorEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleTextCursorEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleTextCursorEvent) Delete() { - C.QAccessibleTextCursorEvent_Delete(this.h) + C.QAccessibleTextCursorEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1572,7 +1727,8 @@ func (this *QAccessibleTextCursorEvent) GoGC() { } type QAccessibleTextSelectionEvent struct { - h *C.QAccessibleTextSelectionEvent + h *C.QAccessibleTextSelectionEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1590,27 +1746,47 @@ func (this *QAccessibleTextSelectionEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent) *QAccessibleTextSelectionEvent { +// newQAccessibleTextSelectionEvent constructs the type using only CGO pointers. +func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextSelectionEvent { if h == nil { return nil } - return &QAccessibleTextSelectionEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextSelectionEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer) *QAccessibleTextSelectionEvent { - return newQAccessibleTextSelectionEvent((*C.QAccessibleTextSelectionEvent)(h)) +// UnsafeNewQAccessibleTextSelectionEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextSelectionEvent { + if h == nil { + return nil + } + + return &QAccessibleTextSelectionEvent{h: (*C.QAccessibleTextSelectionEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextSelectionEvent constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent(obj *QObject, start int, end int) *QAccessibleTextSelectionEvent { - ret := C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end)) - return newQAccessibleTextSelectionEvent(ret) + var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextSelectionEvent2 constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent2(iface *QAccessibleInterface, start int, end int) *QAccessibleTextSelectionEvent { - ret := C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end)) - return newQAccessibleTextSelectionEvent(ret) + var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextSelectionEvent) SetSelection(start int, end int) { @@ -1627,7 +1803,7 @@ func (this *QAccessibleTextSelectionEvent) SelectionEnd() int { // Delete this object from C++ memory. func (this *QAccessibleTextSelectionEvent) Delete() { - C.QAccessibleTextSelectionEvent_Delete(this.h) + C.QAccessibleTextSelectionEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1640,7 +1816,8 @@ func (this *QAccessibleTextSelectionEvent) GoGC() { } type QAccessibleTextInsertEvent struct { - h *C.QAccessibleTextInsertEvent + h *C.QAccessibleTextInsertEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1658,15 +1835,23 @@ func (this *QAccessibleTextInsertEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent) *QAccessibleTextInsertEvent { +// newQAccessibleTextInsertEvent constructs the type using only CGO pointers. +func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextInsertEvent { if h == nil { return nil } - return &QAccessibleTextInsertEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextInsertEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer) *QAccessibleTextInsertEvent { - return newQAccessibleTextInsertEvent((*C.QAccessibleTextInsertEvent)(h)) +// UnsafeNewQAccessibleTextInsertEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextInsertEvent { + if h == nil { + return nil + } + + return &QAccessibleTextInsertEvent{h: (*C.QAccessibleTextInsertEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextInsertEvent constructs a new QAccessibleTextInsertEvent object. @@ -1675,8 +1860,14 @@ func NewQAccessibleTextInsertEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextInsertEvent(ret) + var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextInsertEvent2 constructs a new QAccessibleTextInsertEvent object. @@ -1685,8 +1876,14 @@ func NewQAccessibleTextInsertEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextInsertEvent(ret) + var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextInsertEvent) TextInserted() string { @@ -1702,7 +1899,7 @@ func (this *QAccessibleTextInsertEvent) ChangePosition() int { // Delete this object from C++ memory. func (this *QAccessibleTextInsertEvent) Delete() { - C.QAccessibleTextInsertEvent_Delete(this.h) + C.QAccessibleTextInsertEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1715,7 +1912,8 @@ func (this *QAccessibleTextInsertEvent) GoGC() { } type QAccessibleTextRemoveEvent struct { - h *C.QAccessibleTextRemoveEvent + h *C.QAccessibleTextRemoveEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1733,15 +1931,23 @@ func (this *QAccessibleTextRemoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent) *QAccessibleTextRemoveEvent { +// newQAccessibleTextRemoveEvent constructs the type using only CGO pointers. +func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextRemoveEvent { if h == nil { return nil } - return &QAccessibleTextRemoveEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextRemoveEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer) *QAccessibleTextRemoveEvent { - return newQAccessibleTextRemoveEvent((*C.QAccessibleTextRemoveEvent)(h)) +// UnsafeNewQAccessibleTextRemoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextRemoveEvent { + if h == nil { + return nil + } + + return &QAccessibleTextRemoveEvent{h: (*C.QAccessibleTextRemoveEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextRemoveEvent constructs a new QAccessibleTextRemoveEvent object. @@ -1750,8 +1956,14 @@ func NewQAccessibleTextRemoveEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextRemoveEvent(ret) + var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextRemoveEvent2 constructs a new QAccessibleTextRemoveEvent object. @@ -1760,8 +1972,14 @@ func NewQAccessibleTextRemoveEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextRemoveEvent(ret) + var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextRemoveEvent) TextRemoved() string { @@ -1777,7 +1995,7 @@ func (this *QAccessibleTextRemoveEvent) ChangePosition() int { // Delete this object from C++ memory. func (this *QAccessibleTextRemoveEvent) Delete() { - C.QAccessibleTextRemoveEvent_Delete(this.h) + C.QAccessibleTextRemoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1790,7 +2008,8 @@ func (this *QAccessibleTextRemoveEvent) GoGC() { } type QAccessibleTextUpdateEvent struct { - h *C.QAccessibleTextUpdateEvent + h *C.QAccessibleTextUpdateEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1808,15 +2027,23 @@ func (this *QAccessibleTextUpdateEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent) *QAccessibleTextUpdateEvent { +// newQAccessibleTextUpdateEvent constructs the type using only CGO pointers. +func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextUpdateEvent { if h == nil { return nil } - return &QAccessibleTextUpdateEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextUpdateEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer) *QAccessibleTextUpdateEvent { - return newQAccessibleTextUpdateEvent((*C.QAccessibleTextUpdateEvent)(h)) +// UnsafeNewQAccessibleTextUpdateEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextUpdateEvent { + if h == nil { + return nil + } + + return &QAccessibleTextUpdateEvent{h: (*C.QAccessibleTextUpdateEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextUpdateEvent constructs a new QAccessibleTextUpdateEvent object. @@ -1829,8 +2056,14 @@ func NewQAccessibleTextUpdateEvent(obj *QObject, position int, oldText string, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms) - return newQAccessibleTextUpdateEvent(ret) + var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextUpdateEvent2 constructs a new QAccessibleTextUpdateEvent object. @@ -1843,8 +2076,14 @@ func NewQAccessibleTextUpdateEvent2(iface *QAccessibleInterface, position int, o text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms) - return newQAccessibleTextUpdateEvent(ret) + var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextUpdateEvent) TextRemoved() string { @@ -1867,7 +2106,7 @@ func (this *QAccessibleTextUpdateEvent) ChangePosition() int { // Delete this object from C++ memory. func (this *QAccessibleTextUpdateEvent) Delete() { - C.QAccessibleTextUpdateEvent_Delete(this.h) + C.QAccessibleTextUpdateEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1880,7 +2119,8 @@ func (this *QAccessibleTextUpdateEvent) GoGC() { } type QAccessibleValueChangeEvent struct { - h *C.QAccessibleValueChangeEvent + h *C.QAccessibleValueChangeEvent + isSubclass bool *QAccessibleEvent } @@ -1898,27 +2138,45 @@ func (this *QAccessibleValueChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent) *QAccessibleValueChangeEvent { +// newQAccessibleValueChangeEvent constructs the type using only CGO pointers. +func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleValueChangeEvent { if h == nil { return nil } - return &QAccessibleValueChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleValueChangeEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer) *QAccessibleValueChangeEvent { - return newQAccessibleValueChangeEvent((*C.QAccessibleValueChangeEvent)(h)) +// UnsafeNewQAccessibleValueChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleValueChangeEvent { + if h == nil { + return nil + } + + return &QAccessibleValueChangeEvent{h: (*C.QAccessibleValueChangeEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleValueChangeEvent constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent(obj *QObject, val *QVariant) *QAccessibleValueChangeEvent { - ret := C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer()) - return newQAccessibleValueChangeEvent(ret) + var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleValueChangeEvent2 constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent2(iface *QAccessibleInterface, val *QVariant) *QAccessibleValueChangeEvent { - ret := C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer()) - return newQAccessibleValueChangeEvent(ret) + var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleValueChangeEvent) SetValue(val *QVariant) { @@ -1932,9 +2190,30 @@ func (this *QAccessibleValueChangeEvent) Value() *QVariant { return _goptr } +func (this *QAccessibleValueChangeEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleValueChangeEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleValueChangeEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleValueChangeEvent_AccessibleInterface(self *C.QAccessibleValueChangeEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleValueChangeEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleValueChangeEvent) Delete() { - C.QAccessibleValueChangeEvent_Delete(this.h) + C.QAccessibleValueChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1947,7 +2226,8 @@ func (this *QAccessibleValueChangeEvent) GoGC() { } type QAccessibleTableModelChangeEvent struct { - h *C.QAccessibleTableModelChangeEvent + h *C.QAccessibleTableModelChangeEvent + isSubclass bool *QAccessibleEvent } @@ -1965,27 +2245,45 @@ func (this *QAccessibleTableModelChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent) *QAccessibleTableModelChangeEvent { +// newQAccessibleTableModelChangeEvent constructs the type using only CGO pointers. +func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTableModelChangeEvent { if h == nil { return nil } - return &QAccessibleTableModelChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleTableModelChangeEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer) *QAccessibleTableModelChangeEvent { - return newQAccessibleTableModelChangeEvent((*C.QAccessibleTableModelChangeEvent)(h)) +// UnsafeNewQAccessibleTableModelChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTableModelChangeEvent { + if h == nil { + return nil + } + + return &QAccessibleTableModelChangeEvent{h: (*C.QAccessibleTableModelChangeEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleTableModelChangeEvent constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent(obj *QObject, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - ret := C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType)) - return newQAccessibleTableModelChangeEvent(ret) + var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTableModelChangeEvent2 constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent2(iface *QAccessibleInterface, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - ret := C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType)) - return newQAccessibleTableModelChangeEvent(ret) + var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTableModelChangeEvent) SetModelChangeType(changeType QAccessibleTableModelChangeEvent__ModelChangeType) { @@ -2028,9 +2326,30 @@ func (this *QAccessibleTableModelChangeEvent) LastColumn() int { return (int)(C.QAccessibleTableModelChangeEvent_LastColumn(this.h)) } +func (this *QAccessibleTableModelChangeEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleTableModelChangeEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleTableModelChangeEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleTableModelChangeEvent_AccessibleInterface(self *C.QAccessibleTableModelChangeEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleTableModelChangeEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleTableModelChangeEvent) Delete() { - C.QAccessibleTableModelChangeEvent_Delete(this.h) + C.QAccessibleTableModelChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2043,7 +2362,8 @@ func (this *QAccessibleTableModelChangeEvent) GoGC() { } type QAccessible__State struct { - h *C.QAccessible__State + h *C.QAccessible__State + isSubclass bool } func (this *QAccessible__State) cPointer() *C.QAccessible__State { @@ -2060,6 +2380,7 @@ func (this *QAccessible__State) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessible__State constructs the type using only CGO pointers. func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State { if h == nil { return nil @@ -2067,25 +2388,38 @@ func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State { return &QAccessible__State{h: h} } +// UnsafeNewQAccessible__State constructs the type using only unsafe pointers. func UnsafeNewQAccessible__State(h unsafe.Pointer) *QAccessible__State { - return newQAccessible__State((*C.QAccessible__State)(h)) + if h == nil { + return nil + } + + return &QAccessible__State{h: (*C.QAccessible__State)(h)} } // NewQAccessible__State constructs a new QAccessible::State object. func NewQAccessible__State() *QAccessible__State { - ret := C.QAccessible__State_new() - return newQAccessible__State(ret) + var outptr_QAccessible__State *C.QAccessible__State = nil + + C.QAccessible__State_new(&outptr_QAccessible__State) + ret := newQAccessible__State(outptr_QAccessible__State) + ret.isSubclass = true + return ret } // NewQAccessible__State2 constructs a new QAccessible::State object. func NewQAccessible__State2(param1 *QAccessible__State) *QAccessible__State { - ret := C.QAccessible__State_new2(param1.cPointer()) - return newQAccessible__State(ret) + var outptr_QAccessible__State *C.QAccessible__State = nil + + C.QAccessible__State_new2(param1.cPointer(), &outptr_QAccessible__State) + ret := newQAccessible__State(outptr_QAccessible__State) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QAccessible__State) Delete() { - C.QAccessible__State_Delete(this.h) + C.QAccessible__State_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2098,7 +2432,8 @@ func (this *QAccessible__State) GoGC() { } type QAccessible__ActivationObserver struct { - h *C.QAccessible__ActivationObserver + h *C.QAccessible__ActivationObserver + isSubclass bool } func (this *QAccessible__ActivationObserver) cPointer() *C.QAccessible__ActivationObserver { @@ -2115,6 +2450,7 @@ func (this *QAccessible__ActivationObserver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessible__ActivationObserver constructs the type using only CGO pointers. func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *QAccessible__ActivationObserver { if h == nil { return nil @@ -2122,8 +2458,13 @@ func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *Q return &QAccessible__ActivationObserver{h: h} } +// UnsafeNewQAccessible__ActivationObserver constructs the type using only unsafe pointers. func UnsafeNewQAccessible__ActivationObserver(h unsafe.Pointer) *QAccessible__ActivationObserver { - return newQAccessible__ActivationObserver((*C.QAccessible__ActivationObserver)(h)) + if h == nil { + return nil + } + + return &QAccessible__ActivationObserver{h: (*C.QAccessible__ActivationObserver)(h)} } func (this *QAccessible__ActivationObserver) AccessibilityActiveChanged(active bool) { @@ -2136,7 +2477,7 @@ func (this *QAccessible__ActivationObserver) OperatorAssign(param1 *QAccessible_ // Delete this object from C++ memory. func (this *QAccessible__ActivationObserver) Delete() { - C.QAccessible__ActivationObserver_Delete(this.h) + C.QAccessible__ActivationObserver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qaccessible.h b/qt/gen_qaccessible.h index 52828843..0ade77a1 100644 --- a/qt/gen_qaccessible.h +++ b/qt/gen_qaccessible.h @@ -95,12 +95,12 @@ void QAccessible_SetActive(bool active); void QAccessible_SetRootObject(QObject* object); void QAccessible_Cleanup(); struct miqt_map /* tuple of int and int */ QAccessible_QAccessibleTextBoundaryHelper(QTextCursor* cursor, int boundaryType); -void QAccessible_Delete(QAccessible* self); +void QAccessible_Delete(QAccessible* self, bool isSubclass); bool QAccessibleInterface_IsValid(const QAccessibleInterface* self); QObject* QAccessibleInterface_Object(const QAccessibleInterface* self); QWindow* QAccessibleInterface_Window(const QAccessibleInterface* self); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self, int match); QAccessibleInterface* QAccessibleInterface_FocusChild(const QAccessibleInterface* self); QAccessibleInterface* QAccessibleInterface_ChildAt(const QAccessibleInterface* self, int x, int y); QAccessibleInterface* QAccessibleInterface_Parent(const QAccessibleInterface* self); @@ -123,7 +123,6 @@ QAccessibleTableInterface* QAccessibleInterface_TableInterface(QAccessibleInterf QAccessibleTableCellInterface* QAccessibleInterface_TableCellInterface(QAccessibleInterface* self); void QAccessibleInterface_VirtualHook(QAccessibleInterface* self, int id, void* data); void* QAccessibleInterface_InterfaceCast(QAccessibleInterface* self, int param1); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations1(const QAccessibleInterface* self, int match); void QAccessibleTextInterface_Selection(const QAccessibleTextInterface* self, int selectionIndex, int* startOffset, int* endOffset); int QAccessibleTextInterface_SelectionCount(const QAccessibleTextInterface* self); @@ -142,13 +141,13 @@ int QAccessibleTextInterface_OffsetAtPoint(const QAccessibleTextInterface* self, void QAccessibleTextInterface_ScrollToSubstring(QAccessibleTextInterface* self, int startIndex, int endIndex); struct miqt_string QAccessibleTextInterface_Attributes(const QAccessibleTextInterface* self, int offset, int* startOffset, int* endOffset); void QAccessibleTextInterface_OperatorAssign(QAccessibleTextInterface* self, QAccessibleTextInterface* param1); -void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self); +void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self, bool isSubclass); void QAccessibleEditableTextInterface_DeleteText(QAccessibleEditableTextInterface* self, int startOffset, int endOffset); void QAccessibleEditableTextInterface_InsertText(QAccessibleEditableTextInterface* self, int offset, struct miqt_string text); void QAccessibleEditableTextInterface_ReplaceText(QAccessibleEditableTextInterface* self, int startOffset, int endOffset, struct miqt_string text); void QAccessibleEditableTextInterface_OperatorAssign(QAccessibleEditableTextInterface* self, QAccessibleEditableTextInterface* param1); -void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self); +void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self, bool isSubclass); QVariant* QAccessibleValueInterface_CurrentValue(const QAccessibleValueInterface* self); void QAccessibleValueInterface_SetCurrentValue(QAccessibleValueInterface* self, QVariant* value); @@ -156,7 +155,7 @@ QVariant* QAccessibleValueInterface_MaximumValue(const QAccessibleValueInterface QVariant* QAccessibleValueInterface_MinimumValue(const QAccessibleValueInterface* self); QVariant* QAccessibleValueInterface_MinimumStepSize(const QAccessibleValueInterface* self); void QAccessibleValueInterface_OperatorAssign(QAccessibleValueInterface* self, QAccessibleValueInterface* param1); -void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self); +void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self, bool isSubclass); bool QAccessibleTableCellInterface_IsSelected(const QAccessibleTableCellInterface* self); struct miqt_array /* of QAccessibleInterface* */ QAccessibleTableCellInterface_ColumnHeaderCells(const QAccessibleTableCellInterface* self); @@ -167,7 +166,7 @@ int QAccessibleTableCellInterface_ColumnExtent(const QAccessibleTableCellInterfa int QAccessibleTableCellInterface_RowExtent(const QAccessibleTableCellInterface* self); QAccessibleInterface* QAccessibleTableCellInterface_Table(const QAccessibleTableCellInterface* self); void QAccessibleTableCellInterface_OperatorAssign(QAccessibleTableCellInterface* self, QAccessibleTableCellInterface* param1); -void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self); +void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self, bool isSubclass); QAccessibleInterface* QAccessibleTableInterface_Caption(const QAccessibleTableInterface* self); QAccessibleInterface* QAccessibleTableInterface_Summary(const QAccessibleTableInterface* self); @@ -189,7 +188,7 @@ bool QAccessibleTableInterface_SelectColumn(QAccessibleTableInterface* self, int bool QAccessibleTableInterface_UnselectRow(QAccessibleTableInterface* self, int row); bool QAccessibleTableInterface_UnselectColumn(QAccessibleTableInterface* self, int column); void QAccessibleTableInterface_ModelChange(QAccessibleTableInterface* self, QAccessibleTableModelChangeEvent* event); -void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self); +void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self, bool isSubclass); struct miqt_string QAccessibleActionInterface_Tr(const char* sourceText); struct miqt_string QAccessibleActionInterface_TrUtf8(const char* sourceText); @@ -215,69 +214,77 @@ struct miqt_string QAccessibleActionInterface_Tr2(const char* sourceText, const struct miqt_string QAccessibleActionInterface_Tr3(const char* sourceText, const char* disambiguation, int n); struct miqt_string QAccessibleActionInterface_TrUtf82(const char* sourceText, const char* disambiguation); struct miqt_string QAccessibleActionInterface_TrUtf83(const char* sourceText, const char* disambiguation, int n); -void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self); +void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self, bool isSubclass); struct miqt_string QAccessibleImageInterface_ImageDescription(const QAccessibleImageInterface* self); QSize* QAccessibleImageInterface_ImageSize(const QAccessibleImageInterface* self); QPoint* QAccessibleImageInterface_ImagePosition(const QAccessibleImageInterface* self); void QAccessibleImageInterface_OperatorAssign(QAccessibleImageInterface* self, QAccessibleImageInterface* param1); -void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self); +void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self, bool isSubclass); -QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ); -QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ); +void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent); int QAccessibleEvent_Type(const QAccessibleEvent* self); QObject* QAccessibleEvent_Object(const QAccessibleEvent* self); unsigned int QAccessibleEvent_UniqueId(const QAccessibleEvent* self); void QAccessibleEvent_SetChild(QAccessibleEvent* self, int chld); int QAccessibleEvent_Child(const QAccessibleEvent* self); QAccessibleInterface* QAccessibleEvent_AccessibleInterface(const QAccessibleEvent* self); -void QAccessibleEvent_Delete(QAccessibleEvent* self); +void QAccessibleEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleEvent_Delete(QAccessibleEvent* self, bool isSubclass); -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state); -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state); +void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self); -void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self); +void QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self, bool isSubclass); -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos); -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos); +void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position); int QAccessibleTextCursorEvent_CursorPosition(const QAccessibleTextCursorEvent* self); -void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self); +void QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool isSubclass); -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end); -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end); +void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end); int QAccessibleTextSelectionEvent_SelectionStart(const QAccessibleTextSelectionEvent* self); int QAccessibleTextSelectionEvent_SelectionEnd(const QAccessibleTextSelectionEvent* self); -void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self); +void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, bool isSubclass); -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text); -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self); int QAccessibleTextInsertEvent_ChangePosition(const QAccessibleTextInsertEvent* self); -void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self); +void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool isSubclass); -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text); -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self); int QAccessibleTextRemoveEvent_ChangePosition(const QAccessibleTextRemoveEvent* self); -void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self); +void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool isSubclass); -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text); -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text); +void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self); struct miqt_string QAccessibleTextUpdateEvent_TextInserted(const QAccessibleTextUpdateEvent* self); int QAccessibleTextUpdateEvent_ChangePosition(const QAccessibleTextUpdateEvent* self); -void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self); +void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self, bool isSubclass); -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val); -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val); +void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val); QVariant* QAccessibleValueChangeEvent_Value(const QAccessibleValueChangeEvent* self); -void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self); +void QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self, bool isSubclass); -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType); -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType); +void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType); int QAccessibleTableModelChangeEvent_ModelChangeType(const QAccessibleTableModelChangeEvent* self); void QAccessibleTableModelChangeEvent_SetFirstRow(QAccessibleTableModelChangeEvent* self, int row); @@ -288,15 +295,17 @@ int QAccessibleTableModelChangeEvent_FirstRow(const QAccessibleTableModelChangeE int QAccessibleTableModelChangeEvent_FirstColumn(const QAccessibleTableModelChangeEvent* self); int QAccessibleTableModelChangeEvent_LastRow(const QAccessibleTableModelChangeEvent* self); int QAccessibleTableModelChangeEvent_LastColumn(const QAccessibleTableModelChangeEvent* self); -void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self); +void QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self, bool isSubclass); -QAccessible__State* QAccessible__State_new(); -QAccessible__State* QAccessible__State_new2(QAccessible__State* param1); -void QAccessible__State_Delete(QAccessible__State* self); +void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State); +void QAccessible__State_new2(QAccessible__State* param1, QAccessible__State** outptr_QAccessible__State); +void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass); void QAccessible__ActivationObserver_AccessibilityActiveChanged(QAccessible__ActivationObserver* self, bool active); void QAccessible__ActivationObserver_OperatorAssign(QAccessible__ActivationObserver* self, QAccessible__ActivationObserver* param1); -void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self); +void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qaccessiblebridge.cpp b/qt/gen_qaccessiblebridge.cpp index 8804af7e..7357f479 100644 --- a/qt/gen_qaccessiblebridge.cpp +++ b/qt/gen_qaccessiblebridge.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -22,8 +23,12 @@ void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge self->operator=(*param1); } -void QAccessibleBridge_Delete(QAccessibleBridge* self) { - delete self; +void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self) { @@ -105,7 +110,11 @@ struct miqt_string QAccessibleBridgePlugin_TrUtf83(const char* s, const char* c, return _ms; } -void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self) { - delete self; +void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qaccessiblebridge.go b/qt/gen_qaccessiblebridge.go index 6ad36b62..9d00e060 100644 --- a/qt/gen_qaccessiblebridge.go +++ b/qt/gen_qaccessiblebridge.go @@ -14,7 +14,8 @@ import ( ) type QAccessibleBridge struct { - h *C.QAccessibleBridge + h *C.QAccessibleBridge + isSubclass bool } func (this *QAccessibleBridge) cPointer() *C.QAccessibleBridge { @@ -31,6 +32,7 @@ func (this *QAccessibleBridge) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleBridge constructs the type using only CGO pointers. func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge { if h == nil { return nil @@ -38,8 +40,13 @@ func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge { return &QAccessibleBridge{h: h} } +// UnsafeNewQAccessibleBridge constructs the type using only unsafe pointers. func UnsafeNewQAccessibleBridge(h unsafe.Pointer) *QAccessibleBridge { - return newQAccessibleBridge((*C.QAccessibleBridge)(h)) + if h == nil { + return nil + } + + return &QAccessibleBridge{h: (*C.QAccessibleBridge)(h)} } func (this *QAccessibleBridge) SetRootObject(rootObject *QAccessibleInterface) { @@ -56,7 +63,7 @@ func (this *QAccessibleBridge) OperatorAssign(param1 *QAccessibleBridge) { // Delete this object from C++ memory. func (this *QAccessibleBridge) Delete() { - C.QAccessibleBridge_Delete(this.h) + C.QAccessibleBridge_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -69,7 +76,8 @@ func (this *QAccessibleBridge) GoGC() { } type QAccessibleBridgePlugin struct { - h *C.QAccessibleBridgePlugin + h *C.QAccessibleBridgePlugin + isSubclass bool *QObject } @@ -87,15 +95,23 @@ func (this *QAccessibleBridgePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin) *QAccessibleBridgePlugin { +// newQAccessibleBridgePlugin constructs the type using only CGO pointers. +func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin, h_QObject *C.QObject) *QAccessibleBridgePlugin { if h == nil { return nil } - return &QAccessibleBridgePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAccessibleBridgePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer) *QAccessibleBridgePlugin { - return newQAccessibleBridgePlugin((*C.QAccessibleBridgePlugin)(h)) +// UnsafeNewQAccessibleBridgePlugin constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessibleBridgePlugin { + if h == nil { + return nil + } + + return &QAccessibleBridgePlugin{h: (*C.QAccessibleBridgePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAccessibleBridgePlugin) MetaObject() *QMetaObject { @@ -180,7 +196,7 @@ func QAccessibleBridgePlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAccessibleBridgePlugin) Delete() { - C.QAccessibleBridgePlugin_Delete(this.h) + C.QAccessibleBridgePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qaccessiblebridge.h b/qt/gen_qaccessiblebridge.h index 599582c6..8e9d9d08 100644 --- a/qt/gen_qaccessiblebridge.h +++ b/qt/gen_qaccessiblebridge.h @@ -20,18 +20,20 @@ class QAccessibleBridgePlugin; class QAccessibleEvent; class QAccessibleInterface; class QMetaObject; +class QObject; #else typedef struct QAccessibleBridge QAccessibleBridge; typedef struct QAccessibleBridgePlugin QAccessibleBridgePlugin; typedef struct QAccessibleEvent QAccessibleEvent; typedef struct QAccessibleInterface QAccessibleInterface; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif void QAccessibleBridge_SetRootObject(QAccessibleBridge* self, QAccessibleInterface* rootObject); void QAccessibleBridge_NotifyAccessibilityUpdate(QAccessibleBridge* self, QAccessibleEvent* event); void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge* param1); -void QAccessibleBridge_Delete(QAccessibleBridge* self); +void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass); QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self); void* QAccessibleBridgePlugin_Metacast(QAccessibleBridgePlugin* self, const char* param1); @@ -42,7 +44,7 @@ struct miqt_string QAccessibleBridgePlugin_Tr2(const char* s, const char* c); struct miqt_string QAccessibleBridgePlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QAccessibleBridgePlugin_TrUtf82(const char* s, const char* c); struct miqt_string QAccessibleBridgePlugin_TrUtf83(const char* s, const char* c, int n); -void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self); +void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qaccessibleobject.cpp b/qt/gen_qaccessibleobject.cpp index 4b2abecf..b948ed6d 100644 --- a/qt/gen_qaccessibleobject.cpp +++ b/qt/gen_qaccessibleobject.cpp @@ -33,8 +33,355 @@ QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, i return self->childAt(static_cast(x), static_cast(y)); } -QAccessibleApplication* QAccessibleApplication_new() { - return new QAccessibleApplication(); +class MiqtVirtualQAccessibleApplication : public virtual QAccessibleApplication { +public: + + MiqtVirtualQAccessibleApplication(): QAccessibleApplication() {}; + + virtual ~MiqtVirtualQAccessibleApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Window = 0; + + // Subclass to allow providing a Go implementation + virtual QWindow* window() const override { + if (handle__Window == 0) { + return QAccessibleApplication::window(); + } + + + QWindow* callback_return_value = miqt_exec_callback_QAccessibleApplication_Window(const_cast(this), handle__Window); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWindow* virtualbase_Window() const { + + return QAccessibleApplication::window(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildCount = 0; + + // Subclass to allow providing a Go implementation + virtual int childCount() const override { + if (handle__ChildCount == 0) { + return QAccessibleApplication::childCount(); + } + + + int callback_return_value = miqt_exec_callback_QAccessibleApplication_ChildCount(const_cast(this), handle__ChildCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ChildCount() const { + + return QAccessibleApplication::childCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOfChild = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOfChild(const QAccessibleInterface* param1) const override { + if (handle__IndexOfChild == 0) { + return QAccessibleApplication::indexOfChild(param1); + } + + QAccessibleInterface* sigval1 = (QAccessibleInterface*) param1; + + int callback_return_value = miqt_exec_callback_QAccessibleApplication_IndexOfChild(const_cast(this), handle__IndexOfChild, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOfChild(QAccessibleInterface* param1) const { + + return QAccessibleApplication::indexOfChild(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusChild = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* focusChild() const override { + if (handle__FocusChild == 0) { + return QAccessibleApplication::focusChild(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_FocusChild(const_cast(this), handle__FocusChild); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_FocusChild() const { + + return QAccessibleApplication::focusChild(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* parent() const override { + if (handle__Parent == 0) { + return QAccessibleApplication::parent(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_Parent(const_cast(this), handle__Parent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_Parent() const { + + return QAccessibleApplication::parent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Child = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* child(int index) const override { + if (handle__Child == 0) { + return QAccessibleApplication::child(index); + } + + int sigval1 = index; + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_Child(const_cast(this), handle__Child, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_Child(int index) const { + + return QAccessibleApplication::child(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Text = 0; + + // Subclass to allow providing a Go implementation + virtual QString text(QAccessible::Text t) const override { + if (handle__Text == 0) { + return QAccessibleApplication::text(t); + } + + QAccessible::Text t_ret = t; + int sigval1 = static_cast(t_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QAccessibleApplication_Text(const_cast(this), handle__Text, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Text(int t) const { + + QString _ret = QAccessibleApplication::text(static_cast(t)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Role = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessible::Role role() const override { + if (handle__Role == 0) { + return QAccessibleApplication::role(); + } + + + int callback_return_value = miqt_exec_callback_QAccessibleApplication_Role(const_cast(this), handle__Role); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Role() const { + + QAccessible::Role _ret = QAccessibleApplication::role(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__State = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessible::State state() const override { + if (handle__State == 0) { + return QAccessibleApplication::state(); + } + + + QAccessible__State* callback_return_value = miqt_exec_callback_QAccessibleApplication_State(const_cast(this), handle__State); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessible__State* virtualbase_State() const { + + return new QAccessible::State(QAccessibleApplication::state()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsValid = 0; + + // Subclass to allow providing a Go implementation + virtual bool isValid() const override { + if (handle__IsValid == 0) { + return QAccessibleApplication::isValid(); + } + + + bool callback_return_value = miqt_exec_callback_QAccessibleApplication_IsValid(const_cast(this), handle__IsValid); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsValid() const { + + return QAccessibleApplication::isValid(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Object = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* object() const override { + if (handle__Object == 0) { + return QAccessibleApplication::object(); + } + + + QObject* callback_return_value = miqt_exec_callback_QAccessibleApplication_Object(const_cast(this), handle__Object); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QObject* virtualbase_Object() const { + + return QAccessibleApplication::object(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Rect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect rect() const override { + if (handle__Rect == 0) { + return QAccessibleApplication::rect(); + } + + + QRect* callback_return_value = miqt_exec_callback_QAccessibleApplication_Rect(const_cast(this), handle__Rect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Rect() const { + + return new QRect(QAccessibleApplication::rect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetText = 0; + + // Subclass to allow providing a Go implementation + virtual void setText(QAccessible::Text t, const QString& text) override { + if (handle__SetText == 0) { + QAccessibleApplication::setText(t, text); + return; + } + + QAccessible::Text t_ret = t; + int sigval1 = static_cast(t_ret); + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval2 = text_ms; + + miqt_exec_callback_QAccessibleApplication_SetText(this, handle__SetText, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetText(int t, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QAccessibleApplication::setText(static_cast(t), text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildAt = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* childAt(int x, int y) const override { + if (handle__ChildAt == 0) { + return QAccessibleApplication::childAt(x, y); + } + + int sigval1 = x; + int sigval2 = y; + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_ChildAt(const_cast(this), handle__ChildAt, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_ChildAt(int x, int y) const { + + return QAccessibleApplication::childAt(static_cast(x), static_cast(y)); + + } + +}; + +void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface) { + MiqtVirtualQAccessibleApplication* ret = new MiqtVirtualQAccessibleApplication(); + *outptr_QAccessibleApplication = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); } QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self) { @@ -81,7 +428,123 @@ QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* s return new QAccessible::State(self->state()); } -void QAccessibleApplication_Delete(QAccessibleApplication* self) { - delete self; +void QAccessibleApplication_override_virtual_Window(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Window = slot; +} + +QWindow* QAccessibleApplication_virtualbase_Window(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Window(); +} + +void QAccessibleApplication_override_virtual_ChildCount(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__ChildCount = slot; +} + +int QAccessibleApplication_virtualbase_ChildCount(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_ChildCount(); +} + +void QAccessibleApplication_override_virtual_IndexOfChild(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__IndexOfChild = slot; +} + +int QAccessibleApplication_virtualbase_IndexOfChild(const void* self, QAccessibleInterface* param1) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_IndexOfChild(param1); +} + +void QAccessibleApplication_override_virtual_FocusChild(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__FocusChild = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_FocusChild(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_FocusChild(); +} + +void QAccessibleApplication_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Parent = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_Parent(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Parent(); +} + +void QAccessibleApplication_override_virtual_Child(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Child = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_Child(const void* self, int index) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Child(index); +} + +void QAccessibleApplication_override_virtual_Text(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Text = slot; +} + +struct miqt_string QAccessibleApplication_virtualbase_Text(const void* self, int t) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Text(t); +} + +void QAccessibleApplication_override_virtual_Role(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Role = slot; +} + +int QAccessibleApplication_virtualbase_Role(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Role(); +} + +void QAccessibleApplication_override_virtual_State(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__State = slot; +} + +QAccessible__State* QAccessibleApplication_virtualbase_State(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_State(); +} + +void QAccessibleApplication_override_virtual_IsValid(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__IsValid = slot; +} + +bool QAccessibleApplication_virtualbase_IsValid(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_IsValid(); +} + +void QAccessibleApplication_override_virtual_Object(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Object = slot; +} + +QObject* QAccessibleApplication_virtualbase_Object(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Object(); +} + +void QAccessibleApplication_override_virtual_Rect(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Rect = slot; +} + +QRect* QAccessibleApplication_virtualbase_Rect(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Rect(); +} + +void QAccessibleApplication_override_virtual_SetText(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__SetText = slot; +} + +void QAccessibleApplication_virtualbase_SetText(void* self, int t, struct miqt_string text) { + ( (MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_SetText(t, text); +} + +void QAccessibleApplication_override_virtual_ChildAt(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__ChildAt = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_ChildAt(const void* self, int x, int y) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_ChildAt(x, y); +} + +void QAccessibleApplication_Delete(QAccessibleApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qaccessibleobject.go b/qt/gen_qaccessibleobject.go index 7ade45a8..927daecb 100644 --- a/qt/gen_qaccessibleobject.go +++ b/qt/gen_qaccessibleobject.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QAccessibleObject struct { - h *C.QAccessibleObject + h *C.QAccessibleObject + isSubclass bool *QAccessibleInterface } @@ -32,15 +34,23 @@ func (this *QAccessibleObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleObject(h *C.QAccessibleObject) *QAccessibleObject { +// newQAccessibleObject constructs the type using only CGO pointers. +func newQAccessibleObject(h *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleObject { if h == nil { return nil } - return &QAccessibleObject{h: h, QAccessibleInterface: UnsafeNewQAccessibleInterface(unsafe.Pointer(h))} + return &QAccessibleObject{h: h, + QAccessibleInterface: newQAccessibleInterface(h_QAccessibleInterface)} } -func UnsafeNewQAccessibleObject(h unsafe.Pointer) *QAccessibleObject { - return newQAccessibleObject((*C.QAccessibleObject)(h)) +// UnsafeNewQAccessibleObject constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleObject(h unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleObject { + if h == nil { + return nil + } + + return &QAccessibleObject{h: (*C.QAccessibleObject)(h), + QAccessibleInterface: UnsafeNewQAccessibleInterface(h_QAccessibleInterface)} } func (this *QAccessibleObject) IsValid() bool { @@ -71,7 +81,8 @@ func (this *QAccessibleObject) ChildAt(x int, y int) *QAccessibleInterface { } type QAccessibleApplication struct { - h *C.QAccessibleApplication + h *C.QAccessibleApplication + isSubclass bool *QAccessibleObject } @@ -89,25 +100,39 @@ func (this *QAccessibleApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleApplication(h *C.QAccessibleApplication) *QAccessibleApplication { +// newQAccessibleApplication constructs the type using only CGO pointers. +func newQAccessibleApplication(h *C.QAccessibleApplication, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleApplication { if h == nil { return nil } - return &QAccessibleApplication{h: h, QAccessibleObject: UnsafeNewQAccessibleObject(unsafe.Pointer(h))} + return &QAccessibleApplication{h: h, + QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} } -func UnsafeNewQAccessibleApplication(h unsafe.Pointer) *QAccessibleApplication { - return newQAccessibleApplication((*C.QAccessibleApplication)(h)) +// UnsafeNewQAccessibleApplication constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleApplication(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleApplication { + if h == nil { + return nil + } + + return &QAccessibleApplication{h: (*C.QAccessibleApplication)(h), + QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} } // NewQAccessibleApplication constructs a new QAccessibleApplication object. func NewQAccessibleApplication() *QAccessibleApplication { - ret := C.QAccessibleApplication_new() - return newQAccessibleApplication(ret) + var outptr_QAccessibleApplication *C.QAccessibleApplication = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + + C.QAccessibleApplication_new(&outptr_QAccessibleApplication, &outptr_QAccessibleObject, &outptr_QAccessibleInterface) + ret := newQAccessibleApplication(outptr_QAccessibleApplication, outptr_QAccessibleObject, outptr_QAccessibleInterface) + ret.isSubclass = true + return ret } func (this *QAccessibleApplication) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_Window(this.h)), nil, nil) } func (this *QAccessibleApplication) ChildCount() int { @@ -148,9 +173,347 @@ func (this *QAccessibleApplication) State() *QAccessible__State { return _goptr } +func (this *QAccessibleApplication) callVirtualBase_Window() *QWindow { + + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Window(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QAccessibleApplication) OnWindow(slot func(super func() *QWindow) *QWindow) { + C.QAccessibleApplication_override_virtual_Window(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Window +func miqt_exec_callback_QAccessibleApplication_Window(self *C.QAccessibleApplication, cb C.intptr_t) *C.QWindow { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWindow) *QWindow) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Window) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_ChildCount() int { + + return (int)(C.QAccessibleApplication_virtualbase_ChildCount(unsafe.Pointer(this.h))) + +} +func (this *QAccessibleApplication) OnChildCount(slot func(super func() int) int) { + C.QAccessibleApplication_override_virtual_ChildCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_ChildCount +func miqt_exec_callback_QAccessibleApplication_ChildCount(self *C.QAccessibleApplication, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_ChildCount) + + return (C.int)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_IndexOfChild(param1 *QAccessibleInterface) int { + + return (int)(C.QAccessibleApplication_virtualbase_IndexOfChild(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAccessibleApplication) OnIndexOfChild(slot func(super func(param1 *QAccessibleInterface) int, param1 *QAccessibleInterface) int) { + C.QAccessibleApplication_override_virtual_IndexOfChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_IndexOfChild +func miqt_exec_callback_QAccessibleApplication_IndexOfChild(self *C.QAccessibleApplication, cb C.intptr_t, param1 *C.QAccessibleInterface) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QAccessibleInterface) int, param1 *QAccessibleInterface) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAccessibleInterface(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_IndexOfChild, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_FocusChild() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_FocusChild(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleApplication) OnFocusChild(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_FocusChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_FocusChild +func miqt_exec_callback_QAccessibleApplication_FocusChild(self *C.QAccessibleApplication, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_FocusChild) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Parent() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Parent(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleApplication) OnParent(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Parent +func miqt_exec_callback_QAccessibleApplication_Parent(self *C.QAccessibleApplication, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Parent) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Child(index int) *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Child(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QAccessibleApplication) OnChild(slot func(super func(index int) *QAccessibleInterface, index int) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_Child(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Child +func miqt_exec_callback_QAccessibleApplication_Child(self *C.QAccessibleApplication, cb C.intptr_t, index C.int) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QAccessibleInterface, index int) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Child, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Text(t QAccessible__Text) string { + + var _ms C.struct_miqt_string = C.QAccessibleApplication_virtualbase_Text(unsafe.Pointer(this.h), (C.int)(t)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QAccessibleApplication) OnText(slot func(super func(t QAccessible__Text) string, t QAccessible__Text) string) { + C.QAccessibleApplication_override_virtual_Text(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Text +func miqt_exec_callback_QAccessibleApplication_Text(self *C.QAccessibleApplication, cb C.intptr_t, t C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(t QAccessible__Text) string, t QAccessible__Text) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAccessible__Text)(t) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Text, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QAccessibleApplication) callVirtualBase_Role() QAccessible__Role { + + return (QAccessible__Role)(C.QAccessibleApplication_virtualbase_Role(unsafe.Pointer(this.h))) + +} +func (this *QAccessibleApplication) OnRole(slot func(super func() QAccessible__Role) QAccessible__Role) { + C.QAccessibleApplication_override_virtual_Role(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Role +func miqt_exec_callback_QAccessibleApplication_Role(self *C.QAccessibleApplication, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAccessible__Role) QAccessible__Role) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Role) + + return (C.int)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_State() *QAccessible__State { + + _ret := C.QAccessibleApplication_virtualbase_State(unsafe.Pointer(this.h)) + _goptr := newQAccessible__State(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAccessibleApplication) OnState(slot func(super func() *QAccessible__State) *QAccessible__State) { + C.QAccessibleApplication_override_virtual_State(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_State +func miqt_exec_callback_QAccessibleApplication_State(self *C.QAccessibleApplication, cb C.intptr_t) *C.QAccessible__State { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessible__State) *QAccessible__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_State) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_IsValid() bool { + + return (bool)(C.QAccessibleApplication_virtualbase_IsValid(unsafe.Pointer(this.h))) + +} +func (this *QAccessibleApplication) OnIsValid(slot func(super func() bool) bool) { + C.QAccessibleApplication_override_virtual_IsValid(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_IsValid +func miqt_exec_callback_QAccessibleApplication_IsValid(self *C.QAccessibleApplication, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_IsValid) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_Object() *QObject { + + return UnsafeNewQObject(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Object(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleApplication) OnObject(slot func(super func() *QObject) *QObject) { + C.QAccessibleApplication_override_virtual_Object(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Object +func miqt_exec_callback_QAccessibleApplication_Object(self *C.QAccessibleApplication, cb C.intptr_t) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QObject) *QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Object) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Rect() *QRect { + + _ret := C.QAccessibleApplication_virtualbase_Rect(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAccessibleApplication) OnRect(slot func(super func() *QRect) *QRect) { + C.QAccessibleApplication_override_virtual_Rect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Rect +func miqt_exec_callback_QAccessibleApplication_Rect(self *C.QAccessibleApplication, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Rect) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_SetText(t QAccessible__Text, text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QAccessibleApplication_virtualbase_SetText(unsafe.Pointer(this.h), (C.int)(t), text_ms) + +} +func (this *QAccessibleApplication) OnSetText(slot func(super func(t QAccessible__Text, text string), t QAccessible__Text, text string)) { + C.QAccessibleApplication_override_virtual_SetText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_SetText +func miqt_exec_callback_QAccessibleApplication_SetText(self *C.QAccessibleApplication, cb C.intptr_t, t C.int, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(t QAccessible__Text, text string), t QAccessible__Text, text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAccessible__Text)(t) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval2 := text_ret + + gofunc((&QAccessibleApplication{h: self}).callVirtualBase_SetText, slotval1, slotval2) + +} + +func (this *QAccessibleApplication) callVirtualBase_ChildAt(x int, y int) *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_ChildAt(unsafe.Pointer(this.h), (C.int)(x), (C.int)(y)))) +} +func (this *QAccessibleApplication) OnChildAt(slot func(super func(x int, y int) *QAccessibleInterface, x int, y int) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_ChildAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_ChildAt +func miqt_exec_callback_QAccessibleApplication_ChildAt(self *C.QAccessibleApplication, cb C.intptr_t, x C.int, y C.int) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(x int, y int) *QAccessibleInterface, x int, y int) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(x) + + slotval2 := (int)(y) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_ChildAt, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleApplication) Delete() { - C.QAccessibleApplication_Delete(this.h) + C.QAccessibleApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qaccessibleobject.h b/qt/gen_qaccessibleobject.h index 37da67f8..889ae333 100644 --- a/qt/gen_qaccessibleobject.h +++ b/qt/gen_qaccessibleobject.h @@ -42,7 +42,7 @@ QRect* QAccessibleObject_Rect(const QAccessibleObject* self); void QAccessibleObject_SetText(QAccessibleObject* self, int t, struct miqt_string text); QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, int x, int y); -QAccessibleApplication* QAccessibleApplication_new(); +void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface); QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self); int QAccessibleApplication_ChildCount(const QAccessibleApplication* self); int QAccessibleApplication_IndexOfChild(const QAccessibleApplication* self, QAccessibleInterface* param1); @@ -52,7 +52,35 @@ QAccessibleInterface* QAccessibleApplication_Child(const QAccessibleApplication* struct miqt_string QAccessibleApplication_Text(const QAccessibleApplication* self, int t); int QAccessibleApplication_Role(const QAccessibleApplication* self); QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* self); -void QAccessibleApplication_Delete(QAccessibleApplication* self); +void QAccessibleApplication_override_virtual_Window(void* self, intptr_t slot); +QWindow* QAccessibleApplication_virtualbase_Window(const void* self); +void QAccessibleApplication_override_virtual_ChildCount(void* self, intptr_t slot); +int QAccessibleApplication_virtualbase_ChildCount(const void* self); +void QAccessibleApplication_override_virtual_IndexOfChild(void* self, intptr_t slot); +int QAccessibleApplication_virtualbase_IndexOfChild(const void* self, QAccessibleInterface* param1); +void QAccessibleApplication_override_virtual_FocusChild(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_FocusChild(const void* self); +void QAccessibleApplication_override_virtual_Parent(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_Parent(const void* self); +void QAccessibleApplication_override_virtual_Child(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_Child(const void* self, int index); +void QAccessibleApplication_override_virtual_Text(void* self, intptr_t slot); +struct miqt_string QAccessibleApplication_virtualbase_Text(const void* self, int t); +void QAccessibleApplication_override_virtual_Role(void* self, intptr_t slot); +int QAccessibleApplication_virtualbase_Role(const void* self); +void QAccessibleApplication_override_virtual_State(void* self, intptr_t slot); +QAccessible__State* QAccessibleApplication_virtualbase_State(const void* self); +void QAccessibleApplication_override_virtual_IsValid(void* self, intptr_t slot); +bool QAccessibleApplication_virtualbase_IsValid(const void* self); +void QAccessibleApplication_override_virtual_Object(void* self, intptr_t slot); +QObject* QAccessibleApplication_virtualbase_Object(const void* self); +void QAccessibleApplication_override_virtual_Rect(void* self, intptr_t slot); +QRect* QAccessibleApplication_virtualbase_Rect(const void* self); +void QAccessibleApplication_override_virtual_SetText(void* self, intptr_t slot); +void QAccessibleApplication_virtualbase_SetText(void* self, int t, struct miqt_string text); +void QAccessibleApplication_override_virtual_ChildAt(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_ChildAt(const void* self, int x, int y); +void QAccessibleApplication_Delete(QAccessibleApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qaccessibleplugin.cpp b/qt/gen_qaccessibleplugin.cpp index 88a8005e..e05efcc8 100644 --- a/qt/gen_qaccessibleplugin.cpp +++ b/qt/gen_qaccessibleplugin.cpp @@ -88,7 +88,11 @@ struct miqt_string QAccessiblePlugin_TrUtf83(const char* s, const char* c, int n return _ms; } -void QAccessiblePlugin_Delete(QAccessiblePlugin* self) { - delete self; +void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qaccessibleplugin.go b/qt/gen_qaccessibleplugin.go index 6868efa1..df203e76 100644 --- a/qt/gen_qaccessibleplugin.go +++ b/qt/gen_qaccessibleplugin.go @@ -14,7 +14,8 @@ import ( ) type QAccessiblePlugin struct { - h *C.QAccessiblePlugin + h *C.QAccessiblePlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QAccessiblePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessiblePlugin(h *C.QAccessiblePlugin) *QAccessiblePlugin { +// newQAccessiblePlugin constructs the type using only CGO pointers. +func newQAccessiblePlugin(h *C.QAccessiblePlugin, h_QObject *C.QObject) *QAccessiblePlugin { if h == nil { return nil } - return &QAccessiblePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAccessiblePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAccessiblePlugin(h unsafe.Pointer) *QAccessiblePlugin { - return newQAccessiblePlugin((*C.QAccessiblePlugin)(h)) +// UnsafeNewQAccessiblePlugin constructs the type using only unsafe pointers. +func UnsafeNewQAccessiblePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessiblePlugin { + if h == nil { + return nil + } + + return &QAccessiblePlugin{h: (*C.QAccessiblePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAccessiblePlugin) MetaObject() *QMetaObject { @@ -125,7 +134,7 @@ func QAccessiblePlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAccessiblePlugin) Delete() { - C.QAccessiblePlugin_Delete(this.h) + C.QAccessiblePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qaccessibleplugin.h b/qt/gen_qaccessibleplugin.h index d189dfc2..e628353a 100644 --- a/qt/gen_qaccessibleplugin.h +++ b/qt/gen_qaccessibleplugin.h @@ -35,7 +35,7 @@ struct miqt_string QAccessiblePlugin_Tr2(const char* s, const char* c); struct miqt_string QAccessiblePlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QAccessiblePlugin_TrUtf82(const char* s, const char* c); struct miqt_string QAccessiblePlugin_TrUtf83(const char* s, const char* c, int n); -void QAccessiblePlugin_Delete(QAccessiblePlugin* self); +void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qaccessiblewidget.cpp b/qt/gen_qaccessiblewidget.cpp index 6a630903..6b3d9061 100644 --- a/qt/gen_qaccessiblewidget.cpp +++ b/qt/gen_qaccessiblewidget.cpp @@ -1,5 +1,7 @@ #define WORKAROUND_INNER_CLASS_DEFINITION_QAccessible__State +#include #include +#include #include #include #include @@ -13,17 +15,29 @@ #include "gen_qaccessiblewidget.h" #include "_cgo_export.h" -QAccessibleWidget* QAccessibleWidget_new(QWidget* o) { - return new QAccessibleWidget(o); +void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { + QAccessibleWidget* ret = new QAccessibleWidget(o); + *outptr_QAccessibleWidget = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); + *outptr_QAccessibleActionInterface = static_cast(ret); } -QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r) { - return new QAccessibleWidget(o, static_cast(r)); +void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { + QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r)); + *outptr_QAccessibleWidget = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); + *outptr_QAccessibleActionInterface = static_cast(ret); } -QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name) { +void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QAccessibleWidget(o, static_cast(r), name_QString); + QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r), name_QString); + *outptr_QAccessibleWidget = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); + *outptr_QAccessibleActionInterface = static_cast(ret); } bool QAccessibleWidget_IsValid(const QAccessibleWidget* self) { @@ -42,8 +56,8 @@ int QAccessibleWidget_IndexOfChild(const QAccessibleWidget* self, QAccessibleInt return self->indexOfChild(child); } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self) { - QVector> _ret = self->relations(); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self, int match) { + QVector> _ret = self->relations(static_cast(match)); // Convert QList<> from C++ memory to manually-managed C memory struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -160,27 +174,3 @@ struct miqt_array /* of struct miqt_string */ QAccessibleWidget_KeyBindingsForA return _out; } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations1(const QAccessibleWidget* self, int match) { - QVector> _ret = self->relations(static_cast(match)); - // Convert QList<> from C++ memory to manually-managed C memory - struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QPair> _vv_ret = _ret[i]; - // Convert QPair<> from C++ memory to manually-managed C memory - QAccessibleInterface** _vv_first_arr = static_cast(malloc(sizeof(QAccessibleInterface*))); - int* _vv_second_arr = static_cast(malloc(sizeof(int))); - _vv_first_arr[0] = _vv_ret.first; - QFlags _vv_second_ret = _vv_ret.second; - _vv_second_arr[0] = static_cast(_vv_second_ret); - struct miqt_map _vv_out; - _vv_out.len = 1; - _vv_out.keys = static_cast(_vv_first_arr); - _vv_out.values = static_cast(_vv_second_arr); - _arr[i] = _vv_out; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - diff --git a/qt/gen_qaccessiblewidget.go b/qt/gen_qaccessiblewidget.go index fb84cd65..10dd35b8 100644 --- a/qt/gen_qaccessiblewidget.go +++ b/qt/gen_qaccessiblewidget.go @@ -13,7 +13,8 @@ import ( ) type QAccessibleWidget struct { - h *C.QAccessibleWidget + h *C.QAccessibleWidget + isSubclass bool *QAccessibleObject *QAccessibleActionInterface } @@ -32,27 +33,51 @@ func (this *QAccessibleWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget { +// newQAccessibleWidget constructs the type using only CGO pointers. +func newQAccessibleWidget(h *C.QAccessibleWidget, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface, h_QAccessibleActionInterface *C.QAccessibleActionInterface) *QAccessibleWidget { if h == nil { return nil } - return &QAccessibleWidget{h: h, QAccessibleObject: UnsafeNewQAccessibleObject(unsafe.Pointer(h)), QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(unsafe.Pointer(h))} + return &QAccessibleWidget{h: h, + QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), + QAccessibleActionInterface: newQAccessibleActionInterface(h_QAccessibleActionInterface)} } -func UnsafeNewQAccessibleWidget(h unsafe.Pointer) *QAccessibleWidget { - return newQAccessibleWidget((*C.QAccessibleWidget)(h)) +// UnsafeNewQAccessibleWidget constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleWidget(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer, h_QAccessibleActionInterface unsafe.Pointer) *QAccessibleWidget { + if h == nil { + return nil + } + + return &QAccessibleWidget{h: (*C.QAccessibleWidget)(h), + QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), + QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(h_QAccessibleActionInterface)} } // NewQAccessibleWidget constructs a new QAccessibleWidget object. func NewQAccessibleWidget(o *QWidget) *QAccessibleWidget { - ret := C.QAccessibleWidget_new(o.cPointer()) - return newQAccessibleWidget(ret) + var outptr_QAccessibleWidget *C.QAccessibleWidget = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + + C.QAccessibleWidget_new(o.cPointer(), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret.isSubclass = true + return ret } // NewQAccessibleWidget2 constructs a new QAccessibleWidget object. func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget { - ret := C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r)) - return newQAccessibleWidget(ret) + var outptr_QAccessibleWidget *C.QAccessibleWidget = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + + C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret.isSubclass = true + return ret } // NewQAccessibleWidget3 constructs a new QAccessibleWidget object. @@ -61,8 +86,15 @@ func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAcces name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms) - return newQAccessibleWidget(ret) + var outptr_QAccessibleWidget *C.QAccessibleWidget = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + + C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms, &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret.isSubclass = true + return ret } func (this *QAccessibleWidget) IsValid() bool { @@ -70,7 +102,7 @@ func (this *QAccessibleWidget) IsValid() bool { } func (this *QAccessibleWidget) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleWidget_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleWidget_Window(this.h)), nil, nil) } func (this *QAccessibleWidget) ChildCount() int { @@ -81,11 +113,11 @@ func (this *QAccessibleWidget) IndexOfChild(child *QAccessibleInterface) int { return (int)(C.QAccessibleWidget_IndexOfChild(this.h, child.cPointer())) } -func (this *QAccessibleWidget) Relations() []struct { +func (this *QAccessibleWidget) Relations(match QAccessible__RelationFlag) []struct { First *QAccessibleInterface Second QAccessible__RelationFlag } { - var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations(this.h) + var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations(this.h, (C.int)(match)) _ret := make([]struct { First *QAccessibleInterface Second QAccessible__RelationFlag @@ -198,28 +230,3 @@ func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string } return _ret } - -func (this *QAccessibleWidget) Relations1(match QAccessible__RelationFlag) []struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag -} { - var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations1(this.h, (C.int)(match)) - _ret := make([]struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }, int(_ma.len)) - _outCast := (*[0xffff]C.struct_miqt_map)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - var _vv_mm C.struct_miqt_map = _outCast[i] - _vv_First_CArray := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_vv_mm.keys)) - _vv_Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_vv_mm.values)) - _vv_entry_First := UnsafeNewQAccessibleInterface(unsafe.Pointer(_vv_First_CArray[0])) - _vv_entry_Second := (QAccessible__RelationFlag)(_vv_Second_CArray[0]) - - _ret[i] = struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }{First: _vv_entry_First, Second: _vv_entry_Second} - } - return _ret -} diff --git a/qt/gen_qaccessiblewidget.h b/qt/gen_qaccessiblewidget.h index acb35fe9..ae0ccaed 100644 --- a/qt/gen_qaccessiblewidget.h +++ b/qt/gen_qaccessiblewidget.h @@ -20,7 +20,9 @@ typedef QAccessible::State QAccessible__State; #else class QAccessible__State; #endif +class QAccessibleActionInterface; class QAccessibleInterface; +class QAccessibleObject; class QAccessibleWidget; class QColor; class QRect; @@ -28,7 +30,9 @@ class QWidget; class QWindow; #else typedef struct QAccessible__State QAccessible__State; +typedef struct QAccessibleActionInterface QAccessibleActionInterface; typedef struct QAccessibleInterface QAccessibleInterface; +typedef struct QAccessibleObject QAccessibleObject; typedef struct QAccessibleWidget QAccessibleWidget; typedef struct QColor QColor; typedef struct QRect QRect; @@ -36,14 +40,14 @@ typedef struct QWidget QWidget; typedef struct QWindow QWindow; #endif -QAccessibleWidget* QAccessibleWidget_new(QWidget* o); -QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r); -QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name); +void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); +void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); +void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); bool QAccessibleWidget_IsValid(const QAccessibleWidget* self); QWindow* QAccessibleWidget_Window(const QAccessibleWidget* self); int QAccessibleWidget_ChildCount(const QAccessibleWidget* self); int QAccessibleWidget_IndexOfChild(const QAccessibleWidget* self, QAccessibleInterface* child); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self, int match); QAccessibleInterface* QAccessibleWidget_FocusChild(const QAccessibleWidget* self); QRect* QAccessibleWidget_Rect(const QAccessibleWidget* self); QAccessibleInterface* QAccessibleWidget_Parent(const QAccessibleWidget* self); @@ -57,7 +61,6 @@ void* QAccessibleWidget_InterfaceCast(QAccessibleWidget* self, int t); struct miqt_array /* of struct miqt_string */ QAccessibleWidget_ActionNames(const QAccessibleWidget* self); void QAccessibleWidget_DoAction(QAccessibleWidget* self, struct miqt_string actionName); struct miqt_array /* of struct miqt_string */ QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidget* self, struct miqt_string actionName); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations1(const QAccessibleWidget* self, int match); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qaction.cpp b/qt/gen_qaction.cpp index 1a20247f..fddddab6 100644 --- a/qt/gen_qaction.cpp +++ b/qt/gen_qaction.cpp @@ -1,48 +1,249 @@ #include #include +#include +#include #include #include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qaction.h" #include "_cgo_export.h" -QAction* QAction_new() { - return new QAction(); +class MiqtVirtualQAction : public virtual QAction { +public: + + MiqtVirtualQAction(): QAction() {}; + MiqtVirtualQAction(const QString& text): QAction(text) {}; + MiqtVirtualQAction(const QIcon& icon, const QString& text): QAction(icon, text) {}; + MiqtVirtualQAction(QObject* parent): QAction(parent) {}; + MiqtVirtualQAction(const QString& text, QObject* parent): QAction(text, parent) {}; + MiqtVirtualQAction(const QIcon& icon, const QString& text, QObject* parent): QAction(icon, text, parent) {}; + + virtual ~MiqtVirtualQAction() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QAction::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAction_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QAction::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAction::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAction_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAction::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAction::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAction_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAction::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAction::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAction_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAction::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAction::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAction_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAction::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAction::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAction_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAction::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAction::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAction_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAction::disconnectNotify(*signal); + + } + +}; + +void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject) { + MiqtVirtualQAction* ret = new MiqtVirtualQAction(); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new2(struct miqt_string text) { +void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(text_QString); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new3(QIcon* icon, struct miqt_string text) { +void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(*icon, text_QString); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new4(QObject* parent) { - return new QAction(parent); +void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { + MiqtVirtualQAction* ret = new MiqtVirtualQAction(parent); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new5(struct miqt_string text, QObject* parent) { +void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(text_QString, parent); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString, parent); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent) { +void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(*icon, text_QString, parent); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString, parent); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAction_MetaObject(const QAction* self) { @@ -380,7 +581,7 @@ void QAction_Changed(QAction* self) { } void QAction_connect_Changed(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::changed), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::changed), self, [=]() { miqt_exec_callback_QAction_Changed(slot); }); } @@ -390,7 +591,7 @@ void QAction_Triggered(QAction* self) { } void QAction_connect_Triggered(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::triggered), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::triggered), self, [=]() { miqt_exec_callback_QAction_Triggered(slot); }); } @@ -400,7 +601,7 @@ void QAction_Hovered(QAction* self) { } void QAction_connect_Hovered(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::hovered), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::hovered), self, [=]() { miqt_exec_callback_QAction_Hovered(slot); }); } @@ -410,7 +611,7 @@ void QAction_Toggled(QAction* self, bool param1) { } void QAction_connect_Toggled(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::toggled), self, [=](bool param1) { + MiqtVirtualQAction::connect(self, static_cast(&QAction::toggled), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QAction_Toggled(slot, sigval1); }); @@ -469,13 +670,73 @@ void QAction_Triggered1(QAction* self, bool checked) { } void QAction_connect_Triggered1(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::triggered), self, [=](bool checked) { + MiqtVirtualQAction::connect(self, static_cast(&QAction::triggered), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QAction_Triggered1(slot, sigval1); }); } -void QAction_Delete(QAction* self) { - delete self; +void QAction_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__Event = slot; +} + +bool QAction_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQAction*)(self) )->virtualbase_Event(param1); +} + +void QAction_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__EventFilter = slot; +} + +bool QAction_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAction*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAction_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__TimerEvent = slot; +} + +void QAction_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_TimerEvent(event); +} + +void QAction_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__ChildEvent = slot; +} + +void QAction_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_ChildEvent(event); +} + +void QAction_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__CustomEvent = slot; +} + +void QAction_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_CustomEvent(event); +} + +void QAction_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__ConnectNotify = slot; +} + +void QAction_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAction_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__DisconnectNotify = slot; +} + +void QAction_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAction_Delete(QAction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qaction.go b/qt/gen_qaction.go index 57dcad41..f4695bfb 100644 --- a/qt/gen_qaction.go +++ b/qt/gen_qaction.go @@ -42,7 +42,8 @@ const ( ) type QAction struct { - h *C.QAction + h *C.QAction + isSubclass bool *QObject } @@ -60,21 +61,34 @@ func (this *QAction) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAction(h *C.QAction) *QAction { +// newQAction constructs the type using only CGO pointers. +func newQAction(h *C.QAction, h_QObject *C.QObject) *QAction { if h == nil { return nil } - return &QAction{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAction{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAction(h unsafe.Pointer) *QAction { - return newQAction((*C.QAction)(h)) +// UnsafeNewQAction constructs the type using only unsafe pointers. +func UnsafeNewQAction(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAction { + if h == nil { + return nil + } + + return &QAction{h: (*C.QAction)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQAction constructs a new QAction object. func NewQAction() *QAction { - ret := C.QAction_new() - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new(&outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction2 constructs a new QAction object. @@ -83,8 +97,13 @@ func NewQAction2(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new2(text_ms) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new2(text_ms, &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction3 constructs a new QAction object. @@ -93,14 +112,24 @@ func NewQAction3(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new3(icon.cPointer(), text_ms) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new3(icon.cPointer(), text_ms, &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction4 constructs a new QAction object. func NewQAction4(parent *QObject) *QAction { - ret := C.QAction_new4(parent.cPointer()) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new4(parent.cPointer(), &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction5 constructs a new QAction object. @@ -109,8 +138,13 @@ func NewQAction5(text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new5(text_ms, parent.cPointer()) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new5(text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction6 constructs a new QAction object. @@ -119,8 +153,13 @@ func NewQAction6(icon *QIcon, text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer()) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAction) MetaObject() *QMetaObject { @@ -156,7 +195,7 @@ func (this *QAction) SetActionGroup(group *QActionGroup) { } func (this *QAction) ActionGroup() *QActionGroup { - return UnsafeNewQActionGroup(unsafe.Pointer(C.QAction_ActionGroup(this.h))) + return UnsafeNewQActionGroup(unsafe.Pointer(C.QAction_ActionGroup(this.h)), nil) } func (this *QAction) SetIcon(icon *QIcon) { @@ -254,7 +293,7 @@ func (this *QAction) Priority() QAction__Priority { } func (this *QAction) Menu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QAction_Menu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QAction_Menu(this.h)), nil, nil, nil) } func (this *QAction) SetMenu(menu *QMenu) { @@ -398,7 +437,7 @@ func (this *QAction) IsShortcutVisibleInContextMenu() bool { } func (this *QAction) ParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAction_ParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAction_ParentWidget(this.h)), nil, nil) } func (this *QAction) AssociatedWidgets() []*QWidget { @@ -406,7 +445,7 @@ func (this *QAction) AssociatedWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } @@ -416,7 +455,7 @@ func (this *QAction) AssociatedGraphicsWidgets() []*QGraphicsWidget { _ret := make([]*QGraphicsWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGraphicsWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGraphicsWidget(unsafe.Pointer(_outCast[i]), nil, nil, nil, nil) } return _ret } @@ -588,9 +627,175 @@ func miqt_exec_callback_QAction_Triggered1(cb C.intptr_t, checked C.bool) { gofunc(slotval1) } +func (this *QAction) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QAction_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAction) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QAction_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_Event +func miqt_exec_callback_QAction_Event(self *C.QAction, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAction{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAction) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAction_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAction) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAction_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_EventFilter +func miqt_exec_callback_QAction_EventFilter(self *C.QAction, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAction{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAction) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAction_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAction) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAction_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_TimerEvent +func miqt_exec_callback_QAction_TimerEvent(self *C.QAction, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAction{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAction) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAction_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAction) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAction_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_ChildEvent +func miqt_exec_callback_QAction_ChildEvent(self *C.QAction, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAction{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAction) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAction_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAction) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAction_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_CustomEvent +func miqt_exec_callback_QAction_CustomEvent(self *C.QAction, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAction{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAction) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAction_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAction) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAction_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_ConnectNotify +func miqt_exec_callback_QAction_ConnectNotify(self *C.QAction, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAction{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAction) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAction_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAction) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAction_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_DisconnectNotify +func miqt_exec_callback_QAction_DisconnectNotify(self *C.QAction, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAction{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAction) Delete() { - C.QAction_Delete(this.h) + C.QAction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qaction.h b/qt/gen_qaction.h index 7c8690bd..f9ce1001 100644 --- a/qt/gen_qaction.h +++ b/qt/gen_qaction.h @@ -17,35 +17,43 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionGroup; +class QChildEvent; +class QEvent; class QFont; class QGraphicsWidget; class QIcon; class QKeySequence; class QMenu; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVariant; class QWidget; #else typedef struct QAction QAction; typedef struct QActionGroup QActionGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QGraphicsWidget QGraphicsWidget; typedef struct QIcon QIcon; typedef struct QKeySequence QKeySequence; typedef struct QMenu QMenu; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QAction* QAction_new(); -QAction* QAction_new2(struct miqt_string text); -QAction* QAction_new3(QIcon* icon, struct miqt_string text); -QAction* QAction_new4(QObject* parent); -QAction* QAction_new5(struct miqt_string text, QObject* parent); -QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent); +void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); QMetaObject* QAction_MetaObject(const QAction* self); void* QAction_Metacast(QAction* self, const char* param1); struct miqt_string QAction_Tr(const char* s); @@ -99,6 +107,7 @@ bool QAction_IsShortcutVisibleInContextMenu(const QAction* self); QWidget* QAction_ParentWidget(const QAction* self); struct miqt_array /* of QWidget* */ QAction_AssociatedWidgets(const QAction* self); struct miqt_array /* of QGraphicsWidget* */ QAction_AssociatedGraphicsWidgets(const QAction* self); +bool QAction_Event(QAction* self, QEvent* param1); void QAction_Trigger(QAction* self); void QAction_Hover(QAction* self); void QAction_SetChecked(QAction* self, bool checked); @@ -121,7 +130,21 @@ struct miqt_string QAction_TrUtf83(const char* s, const char* c, int n); bool QAction_ShowStatusText1(QAction* self, QWidget* widget); void QAction_Triggered1(QAction* self, bool checked); void QAction_connect_Triggered1(QAction* self, intptr_t slot); -void QAction_Delete(QAction* self); +void QAction_override_virtual_Event(void* self, intptr_t slot); +bool QAction_virtualbase_Event(void* self, QEvent* param1); +void QAction_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAction_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAction_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAction_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAction_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAction_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAction_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAction_virtualbase_CustomEvent(void* self, QEvent* event); +void QAction_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAction_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAction_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAction_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAction_Delete(QAction* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qactiongroup.cpp b/qt/gen_qactiongroup.cpp index 4d1d31f2..53ad9eec 100644 --- a/qt/gen_qactiongroup.cpp +++ b/qt/gen_qactiongroup.cpp @@ -1,18 +1,204 @@ #include #include +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qactiongroup.h" #include "_cgo_export.h" -QActionGroup* QActionGroup_new(QObject* parent) { - return new QActionGroup(parent); +class MiqtVirtualQActionGroup : public virtual QActionGroup { +public: + + MiqtVirtualQActionGroup(QObject* parent): QActionGroup(parent) {}; + + virtual ~MiqtVirtualQActionGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QActionGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QActionGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QActionGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QActionGroup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QActionGroup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QActionGroup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QActionGroup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QActionGroup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QActionGroup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QActionGroup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QActionGroup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QActionGroup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QActionGroup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QActionGroup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QActionGroup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QActionGroup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QActionGroup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QActionGroup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QActionGroup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QActionGroup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QActionGroup::disconnectNotify(*signal); + + } + +}; + +void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject) { + MiqtVirtualQActionGroup* ret = new MiqtVirtualQActionGroup(parent); + *outptr_QActionGroup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QActionGroup_MetaObject(const QActionGroup* self) { @@ -122,7 +308,7 @@ void QActionGroup_Triggered(QActionGroup* self, QAction* param1) { } void QActionGroup_connect_Triggered(QActionGroup* self, intptr_t slot) { - QActionGroup::connect(self, static_cast(&QActionGroup::triggered), self, [=](QAction* param1) { + MiqtVirtualQActionGroup::connect(self, static_cast(&QActionGroup::triggered), self, [=](QAction* param1) { QAction* sigval1 = param1; miqt_exec_callback_QActionGroup_Triggered(slot, sigval1); }); @@ -133,7 +319,7 @@ void QActionGroup_Hovered(QActionGroup* self, QAction* param1) { } void QActionGroup_connect_Hovered(QActionGroup* self, intptr_t slot) { - QActionGroup::connect(self, static_cast(&QActionGroup::hovered), self, [=](QAction* param1) { + MiqtVirtualQActionGroup::connect(self, static_cast(&QActionGroup::hovered), self, [=](QAction* param1) { QAction* sigval1 = param1; miqt_exec_callback_QActionGroup_Hovered(slot, sigval1); }); @@ -183,7 +369,67 @@ struct miqt_string QActionGroup_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QActionGroup_Delete(QActionGroup* self) { - delete self; +void QActionGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__Event = slot; +} + +bool QActionGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_Event(event); +} + +void QActionGroup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__EventFilter = slot; +} + +bool QActionGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QActionGroup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__TimerEvent = slot; +} + +void QActionGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_TimerEvent(event); +} + +void QActionGroup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__ChildEvent = slot; +} + +void QActionGroup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_ChildEvent(event); +} + +void QActionGroup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__CustomEvent = slot; +} + +void QActionGroup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_CustomEvent(event); +} + +void QActionGroup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__ConnectNotify = slot; +} + +void QActionGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QActionGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__DisconnectNotify = slot; +} + +void QActionGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QActionGroup_Delete(QActionGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qactiongroup.go b/qt/gen_qactiongroup.go index 96f28d22..76ef4b1f 100644 --- a/qt/gen_qactiongroup.go +++ b/qt/gen_qactiongroup.go @@ -23,7 +23,8 @@ const ( ) type QActionGroup struct { - h *C.QActionGroup + h *C.QActionGroup + isSubclass bool *QObject } @@ -41,21 +42,34 @@ func (this *QActionGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQActionGroup(h *C.QActionGroup) *QActionGroup { +// newQActionGroup constructs the type using only CGO pointers. +func newQActionGroup(h *C.QActionGroup, h_QObject *C.QObject) *QActionGroup { if h == nil { return nil } - return &QActionGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QActionGroup{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQActionGroup(h unsafe.Pointer) *QActionGroup { - return newQActionGroup((*C.QActionGroup)(h)) +// UnsafeNewQActionGroup constructs the type using only unsafe pointers. +func UnsafeNewQActionGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QActionGroup { + if h == nil { + return nil + } + + return &QActionGroup{h: (*C.QActionGroup)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQActionGroup constructs a new QActionGroup object. func NewQActionGroup(parent *QObject) *QActionGroup { - ret := C.QActionGroup_new(parent.cPointer()) - return newQActionGroup(ret) + var outptr_QActionGroup *C.QActionGroup = nil + var outptr_QObject *C.QObject = nil + + C.QActionGroup_new(parent.cPointer(), &outptr_QActionGroup, &outptr_QObject) + ret := newQActionGroup(outptr_QActionGroup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QActionGroup) MetaObject() *QMetaObject { @@ -87,7 +101,7 @@ func QActionGroup_TrUtf8(s string) string { } func (this *QActionGroup) AddAction(a *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction(this.h, a.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction(this.h, a.cPointer())), nil) } func (this *QActionGroup) AddActionWithText(text string) *QAction { @@ -95,7 +109,7 @@ func (this *QActionGroup) AddActionWithText(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddActionWithText(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddActionWithText(this.h, text_ms)), nil) } func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { @@ -103,7 +117,7 @@ func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QActionGroup) RemoveAction(a *QAction) { @@ -115,13 +129,13 @@ func (this *QActionGroup) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QActionGroup) CheckedAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_CheckedAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_CheckedAction(this.h)), nil) } func (this *QActionGroup) IsExclusive() bool { @@ -175,7 +189,7 @@ func miqt_exec_callback_QActionGroup_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(param1), nil) gofunc(slotval1) } @@ -195,7 +209,7 @@ func miqt_exec_callback_QActionGroup_Hovered(cb C.intptr_t, param1 *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(param1), nil) gofunc(slotval1) } @@ -244,9 +258,175 @@ func QActionGroup_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QActionGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QActionGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QActionGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QActionGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_Event +func miqt_exec_callback_QActionGroup_Event(self *C.QActionGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QActionGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QActionGroup) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QActionGroup_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QActionGroup) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QActionGroup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_EventFilter +func miqt_exec_callback_QActionGroup_EventFilter(self *C.QActionGroup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QActionGroup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QActionGroup) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QActionGroup_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QActionGroup) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QActionGroup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_TimerEvent +func miqt_exec_callback_QActionGroup_TimerEvent(self *C.QActionGroup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QActionGroup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QActionGroup_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QActionGroup) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QActionGroup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_ChildEvent +func miqt_exec_callback_QActionGroup_ChildEvent(self *C.QActionGroup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QActionGroup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_CustomEvent(event *QEvent) { + + C.QActionGroup_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QActionGroup) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QActionGroup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_CustomEvent +func miqt_exec_callback_QActionGroup_CustomEvent(self *C.QActionGroup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QActionGroup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QActionGroup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QActionGroup) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QActionGroup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_ConnectNotify +func miqt_exec_callback_QActionGroup_ConnectNotify(self *C.QActionGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QActionGroup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QActionGroup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QActionGroup) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QActionGroup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_DisconnectNotify +func miqt_exec_callback_QActionGroup_DisconnectNotify(self *C.QActionGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QActionGroup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QActionGroup) Delete() { - C.QActionGroup_Delete(this.h) + C.QActionGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qactiongroup.h b/qt/gen_qactiongroup.h index 7627bc38..9e7a3e06 100644 --- a/qt/gen_qactiongroup.h +++ b/qt/gen_qactiongroup.h @@ -17,18 +17,26 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionGroup; +class QChildEvent; +class QEvent; class QIcon; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAction QAction; typedef struct QActionGroup QActionGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIcon QIcon; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QActionGroup* QActionGroup_new(QObject* parent); +void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject); QMetaObject* QActionGroup_MetaObject(const QActionGroup* self); void* QActionGroup_Metacast(QActionGroup* self, const char* param1); struct miqt_string QActionGroup_Tr(const char* s); @@ -56,7 +64,21 @@ struct miqt_string QActionGroup_Tr2(const char* s, const char* c); struct miqt_string QActionGroup_Tr3(const char* s, const char* c, int n); struct miqt_string QActionGroup_TrUtf82(const char* s, const char* c); struct miqt_string QActionGroup_TrUtf83(const char* s, const char* c, int n); -void QActionGroup_Delete(QActionGroup* self); +void QActionGroup_override_virtual_Event(void* self, intptr_t slot); +bool QActionGroup_virtualbase_Event(void* self, QEvent* event); +void QActionGroup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QActionGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QActionGroup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QActionGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QActionGroup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QActionGroup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QActionGroup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QActionGroup_virtualbase_CustomEvent(void* self, QEvent* event); +void QActionGroup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QActionGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QActionGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QActionGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QActionGroup_Delete(QActionGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qanimationgroup.cpp b/qt/gen_qanimationgroup.cpp index 521ea12b..e11769b2 100644 --- a/qt/gen_qanimationgroup.cpp +++ b/qt/gen_qanimationgroup.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -114,7 +116,11 @@ struct miqt_string QAnimationGroup_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QAnimationGroup_Delete(QAnimationGroup* self) { - delete self; +void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qanimationgroup.go b/qt/gen_qanimationgroup.go index 5dce7580..10c14f49 100644 --- a/qt/gen_qanimationgroup.go +++ b/qt/gen_qanimationgroup.go @@ -14,7 +14,8 @@ import ( ) type QAnimationGroup struct { - h *C.QAnimationGroup + h *C.QAnimationGroup + isSubclass bool *QAbstractAnimation } @@ -32,15 +33,23 @@ func (this *QAnimationGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAnimationGroup(h *C.QAnimationGroup) *QAnimationGroup { +// newQAnimationGroup constructs the type using only CGO pointers. +func newQAnimationGroup(h *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QAnimationGroup { if h == nil { return nil } - return &QAnimationGroup{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))} + return &QAnimationGroup{h: h, + QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQAnimationGroup(h unsafe.Pointer) *QAnimationGroup { - return newQAnimationGroup((*C.QAnimationGroup)(h)) +// UnsafeNewQAnimationGroup constructs the type using only unsafe pointers. +func UnsafeNewQAnimationGroup(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationGroup { + if h == nil { + return nil + } + + return &QAnimationGroup{h: (*C.QAnimationGroup)(h), + QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } func (this *QAnimationGroup) MetaObject() *QMetaObject { @@ -72,7 +81,7 @@ func QAnimationGroup_TrUtf8(s string) string { } func (this *QAnimationGroup) AnimationAt(index int) *QAbstractAnimation { - return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index)))) + return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index))), nil) } func (this *QAnimationGroup) AnimationCount() int { @@ -96,7 +105,7 @@ func (this *QAnimationGroup) RemoveAnimation(animation *QAbstractAnimation) { } func (this *QAnimationGroup) TakeAnimation(index int) *QAbstractAnimation { - return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index)))) + return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index))), nil) } func (this *QAnimationGroup) Clear() { @@ -149,7 +158,7 @@ func QAnimationGroup_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAnimationGroup) Delete() { - C.QAnimationGroup_Delete(this.h) + C.QAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qanimationgroup.h b/qt/gen_qanimationgroup.h index a8a7cbac..a9fd01cd 100644 --- a/qt/gen_qanimationgroup.h +++ b/qt/gen_qanimationgroup.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QAbstractAnimation; class QAnimationGroup; +class QEvent; class QMetaObject; +class QObject; #else typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QAnimationGroup QAnimationGroup; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self); @@ -36,11 +40,12 @@ void QAnimationGroup_InsertAnimation(QAnimationGroup* self, int index, QAbstract void QAnimationGroup_RemoveAnimation(QAnimationGroup* self, QAbstractAnimation* animation); QAbstractAnimation* QAnimationGroup_TakeAnimation(QAnimationGroup* self, int index); void QAnimationGroup_Clear(QAnimationGroup* self); +bool QAnimationGroup_Event(QAnimationGroup* self, QEvent* event); struct miqt_string QAnimationGroup_Tr2(const char* s, const char* c); struct miqt_string QAnimationGroup_Tr3(const char* s, const char* c, int n); struct miqt_string QAnimationGroup_TrUtf82(const char* s, const char* c); struct miqt_string QAnimationGroup_TrUtf83(const char* s, const char* c, int n); -void QAnimationGroup_Delete(QAnimationGroup* self); +void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qapplication.cpp b/qt/gen_qapplication.cpp index 619bb727..a4164624 100644 --- a/qt/gen_qapplication.cpp +++ b/qt/gen_qapplication.cpp @@ -1,8 +1,10 @@ #include +#include #include #include #include #include +#include #include #include #include @@ -19,12 +21,77 @@ #include "gen_qapplication.h" #include "_cgo_export.h" -QApplication* QApplication_new(int* argc, char** argv) { - return new QApplication(static_cast(*argc), argv); +class MiqtVirtualQApplication : public virtual QApplication { +public: + + MiqtVirtualQApplication(int& argc, char** argv): QApplication(argc, argv) {}; + MiqtVirtualQApplication(int& argc, char** argv, int param3): QApplication(argc, argv, param3) {}; + + virtual ~MiqtVirtualQApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Notify = 0; + + // Subclass to allow providing a Go implementation + virtual bool notify(QObject* param1, QEvent* param2) override { + if (handle__Notify == 0) { + return QApplication::notify(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QApplication_Notify(this, handle__Notify, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Notify(QObject* param1, QEvent* param2) { + + return QApplication::notify(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QApplication::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QApplication_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QApplication::event(param1); + + } + +}; + +void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv); + *outptr_QApplication = ret; + *outptr_QGuiApplication = static_cast(ret); + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QApplication* QApplication_new2(int* argc, char** argv, int param3) { - return new QApplication(static_cast(*argc), argv, static_cast(param3)); +void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv, static_cast(param3)); + *outptr_QApplication = ret; + *outptr_QGuiApplication = static_cast(ret); + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QApplication_MetaObject(const QApplication* self) { @@ -269,7 +336,7 @@ void QApplication_FocusChanged(QApplication* self, QWidget* old, QWidget* now) { } void QApplication_connect_FocusChanged(QApplication* self, intptr_t slot) { - QApplication::connect(self, static_cast(&QApplication::focusChanged), self, [=](QWidget* old, QWidget* now) { + MiqtVirtualQApplication::connect(self, static_cast(&QApplication::focusChanged), self, [=](QWidget* old, QWidget* now) { QWidget* sigval1 = old; QWidget* sigval2 = now; miqt_exec_callback_QApplication_FocusChanged(slot, sigval1, sigval2); @@ -368,7 +435,27 @@ void QApplication_SetEffectEnabled2(int param1, bool enable) { QApplication::setEffectEnabled(static_cast(param1), enable); } -void QApplication_Delete(QApplication* self) { - delete self; +void QApplication_override_virtual_Notify(void* self, intptr_t slot) { + dynamic_cast( (QApplication*)(self) )->handle__Notify = slot; +} + +bool QApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQApplication*)(self) )->virtualbase_Notify(param1, param2); +} + +void QApplication_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QApplication*)(self) )->handle__Event = slot; +} + +bool QApplication_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQApplication*)(self) )->virtualbase_Event(param1); +} + +void QApplication_Delete(QApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qapplication.go b/qt/gen_qapplication.go index 8f7b95ee..6ba7765b 100644 --- a/qt/gen_qapplication.go +++ b/qt/gen_qapplication.go @@ -23,7 +23,8 @@ const ( ) type QApplication struct { - h *C.QApplication + h *C.QApplication + isSubclass bool *QGuiApplication } @@ -41,15 +42,23 @@ func (this *QApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQApplication(h *C.QApplication) *QApplication { +// newQApplication constructs the type using only CGO pointers. +func newQApplication(h *C.QApplication, h_QGuiApplication *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QApplication { if h == nil { return nil } - return &QApplication{h: h, QGuiApplication: UnsafeNewQGuiApplication(unsafe.Pointer(h))} + return &QApplication{h: h, + QGuiApplication: newQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} } -func UnsafeNewQApplication(h unsafe.Pointer) *QApplication { - return newQApplication((*C.QApplication)(h)) +// UnsafeNewQApplication constructs the type using only unsafe pointers. +func UnsafeNewQApplication(h unsafe.Pointer, h_QGuiApplication unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QApplication { + if h == nil { + return nil + } + + return &QApplication{h: (*C.QApplication)(h), + QGuiApplication: UnsafeNewQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} } // NewQApplication constructs a new QApplication object. @@ -64,8 +73,15 @@ func NewQApplication(args []string) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QApplication_new(argc, &argv[0]) - return newQApplication(ret) + var outptr_QApplication *C.QApplication = nil + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QApplication_new(argc, &argv[0], &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } // NewQApplication2 constructs a new QApplication object. @@ -80,8 +96,15 @@ func NewQApplication2(args []string, param3 int) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QApplication_new2(argc, &argv[0], (C.int)(param3)) - return newQApplication(ret) + var outptr_QApplication *C.QApplication = nil + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QApplication) MetaObject() *QMetaObject { @@ -113,7 +136,7 @@ func QApplication_TrUtf8(s string) string { } func QApplication_Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_Style())) + return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_Style()), nil) } func QApplication_SetStyle(style *QStyle) { @@ -125,7 +148,7 @@ func QApplication_SetStyleWithStyle(style string) *QStyle { style_ms.data = C.CString(style) style_ms.len = C.size_t(len(style)) defer C.free(unsafe.Pointer(style_ms.data)) - return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_SetStyleWithStyle(style_ms))) + return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_SetStyleWithStyle(style_ms)), nil) } func QApplication_ColorSpec() int { @@ -206,7 +229,7 @@ func QApplication_AllWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } @@ -216,29 +239,29 @@ func QApplication_TopLevelWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func QApplication_Desktop() *QDesktopWidget { - return UnsafeNewQDesktopWidget(unsafe.Pointer(C.QApplication_Desktop())) + return UnsafeNewQDesktopWidget(unsafe.Pointer(C.QApplication_Desktop()), nil, nil, nil) } func QApplication_ActivePopupWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActivePopupWidget())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActivePopupWidget()), nil, nil) } func QApplication_ActiveModalWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveModalWidget())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveModalWidget()), nil, nil) } func QApplication_FocusWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_FocusWidget())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_FocusWidget()), nil, nil) } func QApplication_ActiveWindow() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveWindow())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveWindow()), nil, nil) } func QApplication_SetActiveWindow(act *QWidget) { @@ -246,19 +269,19 @@ func QApplication_SetActiveWindow(act *QWidget) { } func QApplication_WidgetAt(p *QPoint) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt(p.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt(p.cPointer())), nil, nil) } func QApplication_WidgetAt2(x int, y int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y))), nil, nil) } func QApplication_TopLevelAt(p *QPoint) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt(p.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt(p.cPointer())), nil, nil) } func QApplication_TopLevelAt2(x int, y int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y))), nil, nil) } func QApplication_Beep() { @@ -359,8 +382,8 @@ func miqt_exec_callback_QApplication_FocusChanged(cb C.intptr_t, old *C.QWidget, } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(old)) - slotval2 := UnsafeNewQWidget(unsafe.Pointer(now)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(old), nil, nil) + slotval2 := UnsafeNewQWidget(unsafe.Pointer(now), nil, nil) gofunc(slotval1, slotval2) } @@ -460,9 +483,60 @@ func QApplication_SetEffectEnabled2(param1 UIEffect, enable bool) { C.QApplication_SetEffectEnabled2((C.int)(param1), (C.bool)(enable)) } +func (this *QApplication) callVirtualBase_Notify(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QApplication_virtualbase_Notify(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QApplication) OnNotify(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QApplication_override_virtual_Notify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QApplication_Notify +func miqt_exec_callback_QApplication_Notify(self *C.QApplication, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QApplication{h: self}).callVirtualBase_Notify, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QApplication) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QApplication_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QApplication) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QApplication_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QApplication_Event +func miqt_exec_callback_QApplication_Event(self *C.QApplication, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QApplication{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QApplication) Delete() { - C.QApplication_Delete(this.h) + C.QApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qapplication.h b/qt/gen_qapplication.h index b0b628bf..1d2749ef 100644 --- a/qt/gen_qapplication.h +++ b/qt/gen_qapplication.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QApplication; +class QCoreApplication; class QDesktopWidget; class QEvent; class QFont; class QFontMetrics; +class QGuiApplication; class QIcon; class QMetaObject; class QObject; @@ -30,10 +32,12 @@ class QStyle; class QWidget; #else typedef struct QApplication QApplication; +typedef struct QCoreApplication QCoreApplication; typedef struct QDesktopWidget QDesktopWidget; typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFontMetrics QFontMetrics; +typedef struct QGuiApplication QGuiApplication; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; @@ -44,8 +48,8 @@ typedef struct QStyle QStyle; typedef struct QWidget QWidget; #endif -QApplication* QApplication_new(int* argc, char** argv); -QApplication* QApplication_new2(int* argc, char** argv, int param3); +void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); QMetaObject* QApplication_MetaObject(const QApplication* self); void* QApplication_Metacast(QApplication* self, const char* param1); struct miqt_string QApplication_Tr(const char* s); @@ -105,6 +109,7 @@ void QApplication_SetAutoSipEnabled(QApplication* self, const bool enabled); bool QApplication_AutoSipEnabled(const QApplication* self); void QApplication_CloseAllWindows(); void QApplication_AboutQt(); +bool QApplication_Event(QApplication* self, QEvent* param1); struct miqt_string QApplication_Tr2(const char* s, const char* c); struct miqt_string QApplication_Tr3(const char* s, const char* c, int n); struct miqt_string QApplication_TrUtf82(const char* s, const char* c); @@ -113,7 +118,11 @@ void QApplication_SetPalette2(QPalette* param1, const char* className); void QApplication_SetFont2(QFont* param1, const char* className); void QApplication_Alert2(QWidget* widget, int duration); void QApplication_SetEffectEnabled2(int param1, bool enable); -void QApplication_Delete(QApplication* self); +void QApplication_override_virtual_Notify(void* self, intptr_t slot); +bool QApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2); +void QApplication_override_virtual_Event(void* self, intptr_t slot); +bool QApplication_virtualbase_Event(void* self, QEvent* param1); +void QApplication_Delete(QApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qarraydata.cpp b/qt/gen_qarraydata.cpp index 258a10c9..36521c11 100644 --- a/qt/gen_qarraydata.cpp +++ b/qt/gen_qarraydata.cpp @@ -54,11 +54,19 @@ QArrayData* QArrayData_ReallocateUnaligned4(QArrayData* data, size_t objectSize, return QArrayData::reallocateUnaligned(data, static_cast(objectSize), static_cast(newCapacity), static_cast(newOptions)); } -void QArrayData_Delete(QArrayData* self) { - delete self; +void QArrayData_Delete(QArrayData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self) { - delete self; +void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qarraydata.go b/qt/gen_qarraydata.go index df6520a1..625a11dc 100644 --- a/qt/gen_qarraydata.go +++ b/qt/gen_qarraydata.go @@ -33,7 +33,8 @@ const ( ) type QArrayData struct { - h *C.QArrayData + h *C.QArrayData + isSubclass bool } func (this *QArrayData) cPointer() *C.QArrayData { @@ -50,6 +51,7 @@ func (this *QArrayData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQArrayData constructs the type using only CGO pointers. func newQArrayData(h *C.QArrayData) *QArrayData { if h == nil { return nil @@ -57,8 +59,13 @@ func newQArrayData(h *C.QArrayData) *QArrayData { return &QArrayData{h: h} } +// UnsafeNewQArrayData constructs the type using only unsafe pointers. func UnsafeNewQArrayData(h unsafe.Pointer) *QArrayData { - return newQArrayData((*C.QArrayData)(h)) + if h == nil { + return nil + } + + return &QArrayData{h: (*C.QArrayData)(h)} } func (this *QArrayData) Data() unsafe.Pointer { @@ -111,7 +118,7 @@ func QArrayData_ReallocateUnaligned4(data *QArrayData, objectSize uint64, newCap // Delete this object from C++ memory. func (this *QArrayData) Delete() { - C.QArrayData_Delete(this.h) + C.QArrayData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -124,7 +131,8 @@ func (this *QArrayData) GoGC() { } type QtPrivate__QContainerImplHelper struct { - h *C.QtPrivate__QContainerImplHelper + h *C.QtPrivate__QContainerImplHelper + isSubclass bool } func (this *QtPrivate__QContainerImplHelper) cPointer() *C.QtPrivate__QContainerImplHelper { @@ -141,6 +149,7 @@ func (this *QtPrivate__QContainerImplHelper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QContainerImplHelper constructs the type using only CGO pointers. func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *QtPrivate__QContainerImplHelper { if h == nil { return nil @@ -148,13 +157,18 @@ func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *Q return &QtPrivate__QContainerImplHelper{h: h} } +// UnsafeNewQtPrivate__QContainerImplHelper constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QContainerImplHelper(h unsafe.Pointer) *QtPrivate__QContainerImplHelper { - return newQtPrivate__QContainerImplHelper((*C.QtPrivate__QContainerImplHelper)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QContainerImplHelper{h: (*C.QtPrivate__QContainerImplHelper)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__QContainerImplHelper) Delete() { - C.QtPrivate__QContainerImplHelper_Delete(this.h) + C.QtPrivate__QContainerImplHelper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qarraydata.h b/qt/gen_qarraydata.h index 27b27173..b8006d34 100644 --- a/qt/gen_qarraydata.h +++ b/qt/gen_qarraydata.h @@ -38,9 +38,9 @@ void QArrayData_Deallocate(QArrayData* data, size_t objectSize, size_t alignment QArrayData* QArrayData_SharedNull(); QArrayData* QArrayData_Allocate4(size_t objectSize, size_t alignment, size_t capacity, int options); QArrayData* QArrayData_ReallocateUnaligned4(QArrayData* data, size_t objectSize, size_t newCapacity, int newOptions); -void QArrayData_Delete(QArrayData* self); +void QArrayData_Delete(QArrayData* self, bool isSubclass); -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self); +void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbackingstore.cpp b/qt/gen_qbackingstore.cpp index 8aff21b2..6383eba6 100644 --- a/qt/gen_qbackingstore.cpp +++ b/qt/gen_qbackingstore.cpp @@ -8,8 +8,9 @@ #include "gen_qbackingstore.h" #include "_cgo_export.h" -QBackingStore* QBackingStore_new(QWindow* window) { - return new QBackingStore(window); +void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore) { + QBackingStore* ret = new QBackingStore(window); + *outptr_QBackingStore = ret; } QWindow* QBackingStore_Window(const QBackingStore* self) { @@ -64,7 +65,11 @@ void QBackingStore_Flush3(QBackingStore* self, QRegion* region, QWindow* window, self->flush(*region, window, *offset); } -void QBackingStore_Delete(QBackingStore* self) { - delete self; +void QBackingStore_Delete(QBackingStore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbackingstore.go b/qt/gen_qbackingstore.go index cd1dc04a..feddabff 100644 --- a/qt/gen_qbackingstore.go +++ b/qt/gen_qbackingstore.go @@ -14,7 +14,8 @@ import ( ) type QBackingStore struct { - h *C.QBackingStore + h *C.QBackingStore + isSubclass bool } func (this *QBackingStore) cPointer() *C.QBackingStore { @@ -31,6 +32,7 @@ func (this *QBackingStore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBackingStore constructs the type using only CGO pointers. func newQBackingStore(h *C.QBackingStore) *QBackingStore { if h == nil { return nil @@ -38,18 +40,27 @@ func newQBackingStore(h *C.QBackingStore) *QBackingStore { return &QBackingStore{h: h} } +// UnsafeNewQBackingStore constructs the type using only unsafe pointers. func UnsafeNewQBackingStore(h unsafe.Pointer) *QBackingStore { - return newQBackingStore((*C.QBackingStore)(h)) + if h == nil { + return nil + } + + return &QBackingStore{h: (*C.QBackingStore)(h)} } // NewQBackingStore constructs a new QBackingStore object. func NewQBackingStore(window *QWindow) *QBackingStore { - ret := C.QBackingStore_new(window.cPointer()) - return newQBackingStore(ret) + var outptr_QBackingStore *C.QBackingStore = nil + + C.QBackingStore_new(window.cPointer(), &outptr_QBackingStore) + ret := newQBackingStore(outptr_QBackingStore) + ret.isSubclass = true + return ret } func (this *QBackingStore) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QBackingStore_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QBackingStore_Window(this.h)), nil, nil) } func (this *QBackingStore) PaintDevice() *QPaintDevice { @@ -108,7 +119,7 @@ func (this *QBackingStore) Flush3(region *QRegion, window *QWindow, offset *QPoi // Delete this object from C++ memory. func (this *QBackingStore) Delete() { - C.QBackingStore_Delete(this.h) + C.QBackingStore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbackingstore.h b/qt/gen_qbackingstore.h index d64c54af..6b7554b0 100644 --- a/qt/gen_qbackingstore.h +++ b/qt/gen_qbackingstore.h @@ -30,7 +30,7 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -QBackingStore* QBackingStore_new(QWindow* window); +void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore); QWindow* QBackingStore_Window(const QBackingStore* self); QPaintDevice* QBackingStore_PaintDevice(QBackingStore* self); void QBackingStore_Flush(QBackingStore* self, QRegion* region); @@ -44,7 +44,7 @@ QRegion* QBackingStore_StaticContents(const QBackingStore* self); bool QBackingStore_HasStaticContents(const QBackingStore* self); void QBackingStore_Flush2(QBackingStore* self, QRegion* region, QWindow* window); void QBackingStore_Flush3(QBackingStore* self, QRegion* region, QWindow* window, QPoint* offset); -void QBackingStore_Delete(QBackingStore* self); +void QBackingStore_Delete(QBackingStore* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbasictimer.cpp b/qt/gen_qbasictimer.cpp index e59fce36..8263eeb1 100644 --- a/qt/gen_qbasictimer.cpp +++ b/qt/gen_qbasictimer.cpp @@ -4,12 +4,14 @@ #include "gen_qbasictimer.h" #include "_cgo_export.h" -QBasicTimer* QBasicTimer_new(QBasicTimer* param1) { - return new QBasicTimer(*param1); +void QBasicTimer_new(QBasicTimer* param1, QBasicTimer** outptr_QBasicTimer) { + QBasicTimer* ret = new QBasicTimer(*param1); + *outptr_QBasicTimer = ret; } -QBasicTimer* QBasicTimer_new2() { - return new QBasicTimer(); +void QBasicTimer_new2(QBasicTimer** outptr_QBasicTimer) { + QBasicTimer* ret = new QBasicTimer(); + *outptr_QBasicTimer = ret; } void QBasicTimer_OperatorAssign(QBasicTimer* self, QBasicTimer* param1) { @@ -40,7 +42,11 @@ void QBasicTimer_Stop(QBasicTimer* self) { self->stop(); } -void QBasicTimer_Delete(QBasicTimer* self) { - delete self; +void QBasicTimer_Delete(QBasicTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbasictimer.go b/qt/gen_qbasictimer.go index 0ddf8108..b33d2b1a 100644 --- a/qt/gen_qbasictimer.go +++ b/qt/gen_qbasictimer.go @@ -14,7 +14,8 @@ import ( ) type QBasicTimer struct { - h *C.QBasicTimer + h *C.QBasicTimer + isSubclass bool } func (this *QBasicTimer) cPointer() *C.QBasicTimer { @@ -31,6 +32,7 @@ func (this *QBasicTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBasicTimer constructs the type using only CGO pointers. func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer { if h == nil { return nil @@ -38,20 +40,33 @@ func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer { return &QBasicTimer{h: h} } +// UnsafeNewQBasicTimer constructs the type using only unsafe pointers. func UnsafeNewQBasicTimer(h unsafe.Pointer) *QBasicTimer { - return newQBasicTimer((*C.QBasicTimer)(h)) + if h == nil { + return nil + } + + return &QBasicTimer{h: (*C.QBasicTimer)(h)} } // NewQBasicTimer constructs a new QBasicTimer object. func NewQBasicTimer(param1 *QBasicTimer) *QBasicTimer { - ret := C.QBasicTimer_new(param1.cPointer()) - return newQBasicTimer(ret) + var outptr_QBasicTimer *C.QBasicTimer = nil + + C.QBasicTimer_new(param1.cPointer(), &outptr_QBasicTimer) + ret := newQBasicTimer(outptr_QBasicTimer) + ret.isSubclass = true + return ret } // NewQBasicTimer2 constructs a new QBasicTimer object. func NewQBasicTimer2() *QBasicTimer { - ret := C.QBasicTimer_new2() - return newQBasicTimer(ret) + var outptr_QBasicTimer *C.QBasicTimer = nil + + C.QBasicTimer_new2(&outptr_QBasicTimer) + ret := newQBasicTimer(outptr_QBasicTimer) + ret.isSubclass = true + return ret } func (this *QBasicTimer) OperatorAssign(param1 *QBasicTimer) { @@ -84,7 +99,7 @@ func (this *QBasicTimer) Stop() { // Delete this object from C++ memory. func (this *QBasicTimer) Delete() { - C.QBasicTimer_Delete(this.h) + C.QBasicTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbasictimer.h b/qt/gen_qbasictimer.h index aae4d065..070dd7cf 100644 --- a/qt/gen_qbasictimer.h +++ b/qt/gen_qbasictimer.h @@ -22,8 +22,8 @@ typedef struct QBasicTimer QBasicTimer; typedef struct QObject QObject; #endif -QBasicTimer* QBasicTimer_new(QBasicTimer* param1); -QBasicTimer* QBasicTimer_new2(); +void QBasicTimer_new(QBasicTimer* param1, QBasicTimer** outptr_QBasicTimer); +void QBasicTimer_new2(QBasicTimer** outptr_QBasicTimer); void QBasicTimer_OperatorAssign(QBasicTimer* self, QBasicTimer* param1); void QBasicTimer_Swap(QBasicTimer* self, QBasicTimer* other); bool QBasicTimer_IsActive(const QBasicTimer* self); @@ -31,7 +31,7 @@ int QBasicTimer_TimerId(const QBasicTimer* self); void QBasicTimer_Start(QBasicTimer* self, int msec, QObject* obj); void QBasicTimer_Start2(QBasicTimer* self, int msec, int timerType, QObject* obj); void QBasicTimer_Stop(QBasicTimer* self); -void QBasicTimer_Delete(QBasicTimer* self); +void QBasicTimer_Delete(QBasicTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbitarray.cpp b/qt/gen_qbitarray.cpp index cf6c943f..42d628fb 100644 --- a/qt/gen_qbitarray.cpp +++ b/qt/gen_qbitarray.cpp @@ -4,20 +4,24 @@ #include "gen_qbitarray.h" #include "_cgo_export.h" -QBitArray* QBitArray_new() { - return new QBitArray(); +void QBitArray_new(QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray(); + *outptr_QBitArray = ret; } -QBitArray* QBitArray_new2(int size) { - return new QBitArray(static_cast(size)); +void QBitArray_new2(int size, QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray(static_cast(size)); + *outptr_QBitArray = ret; } -QBitArray* QBitArray_new3(QBitArray* other) { - return new QBitArray(*other); +void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray(*other); + *outptr_QBitArray = ret; } -QBitArray* QBitArray_new4(int size, bool val) { - return new QBitArray(static_cast(size), val); +void QBitArray_new4(int size, bool val, QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray(static_cast(size), val); + *outptr_QBitArray = ret; } void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other) { @@ -148,12 +152,17 @@ bool QBitArray_Fill22(QBitArray* self, bool val, int size) { return self->fill(val, static_cast(size)); } -void QBitArray_Delete(QBitArray* self) { - delete self; +void QBitArray_Delete(QBitArray* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QBitRef* QBitRef_new(QBitRef* param1) { - return new QBitRef(*param1); +void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef) { + QBitRef* ret = new QBitRef(*param1); + *outptr_QBitRef = ret; } bool QBitRef_OperatorNot(const QBitRef* self) { @@ -168,7 +177,11 @@ void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val) { self->operator=(val); } -void QBitRef_Delete(QBitRef* self) { - delete self; +void QBitRef_Delete(QBitRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbitarray.go b/qt/gen_qbitarray.go index 4319e1de..98c0e03e 100644 --- a/qt/gen_qbitarray.go +++ b/qt/gen_qbitarray.go @@ -14,7 +14,8 @@ import ( ) type QBitArray struct { - h *C.QBitArray + h *C.QBitArray + isSubclass bool } func (this *QBitArray) cPointer() *C.QBitArray { @@ -31,6 +32,7 @@ func (this *QBitArray) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBitArray constructs the type using only CGO pointers. func newQBitArray(h *C.QBitArray) *QBitArray { if h == nil { return nil @@ -38,32 +40,53 @@ func newQBitArray(h *C.QBitArray) *QBitArray { return &QBitArray{h: h} } +// UnsafeNewQBitArray constructs the type using only unsafe pointers. func UnsafeNewQBitArray(h unsafe.Pointer) *QBitArray { - return newQBitArray((*C.QBitArray)(h)) + if h == nil { + return nil + } + + return &QBitArray{h: (*C.QBitArray)(h)} } // NewQBitArray constructs a new QBitArray object. func NewQBitArray() *QBitArray { - ret := C.QBitArray_new() - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new(&outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } // NewQBitArray2 constructs a new QBitArray object. func NewQBitArray2(size int) *QBitArray { - ret := C.QBitArray_new2((C.int)(size)) - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new2((C.int)(size), &outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } // NewQBitArray3 constructs a new QBitArray object. func NewQBitArray3(other *QBitArray) *QBitArray { - ret := C.QBitArray_new3(other.cPointer()) - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new3(other.cPointer(), &outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } // NewQBitArray4 constructs a new QBitArray object. func NewQBitArray4(size int, val bool) *QBitArray { - ret := C.QBitArray_new4((C.int)(size), (C.bool)(val)) - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new4((C.int)(size), (C.bool)(val), &outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } func (this *QBitArray) OperatorAssign(other *QBitArray) { @@ -208,7 +231,7 @@ func (this *QBitArray) Fill22(val bool, size int) bool { // Delete this object from C++ memory. func (this *QBitArray) Delete() { - C.QBitArray_Delete(this.h) + C.QBitArray_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -221,7 +244,8 @@ func (this *QBitArray) GoGC() { } type QBitRef struct { - h *C.QBitRef + h *C.QBitRef + isSubclass bool } func (this *QBitRef) cPointer() *C.QBitRef { @@ -238,6 +262,7 @@ func (this *QBitRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBitRef constructs the type using only CGO pointers. func newQBitRef(h *C.QBitRef) *QBitRef { if h == nil { return nil @@ -245,14 +270,23 @@ func newQBitRef(h *C.QBitRef) *QBitRef { return &QBitRef{h: h} } +// UnsafeNewQBitRef constructs the type using only unsafe pointers. func UnsafeNewQBitRef(h unsafe.Pointer) *QBitRef { - return newQBitRef((*C.QBitRef)(h)) + if h == nil { + return nil + } + + return &QBitRef{h: (*C.QBitRef)(h)} } // NewQBitRef constructs a new QBitRef object. func NewQBitRef(param1 *QBitRef) *QBitRef { - ret := C.QBitRef_new(param1.cPointer()) - return newQBitRef(ret) + var outptr_QBitRef *C.QBitRef = nil + + C.QBitRef_new(param1.cPointer(), &outptr_QBitRef) + ret := newQBitRef(outptr_QBitRef) + ret.isSubclass = true + return ret } func (this *QBitRef) OperatorNot() bool { @@ -269,7 +303,7 @@ func (this *QBitRef) OperatorAssignWithVal(val bool) { // Delete this object from C++ memory. func (this *QBitRef) Delete() { - C.QBitRef_Delete(this.h) + C.QBitRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbitarray.h b/qt/gen_qbitarray.h index 1c614b76..1235d6b5 100644 --- a/qt/gen_qbitarray.h +++ b/qt/gen_qbitarray.h @@ -22,10 +22,10 @@ typedef struct QBitArray QBitArray; typedef struct QBitRef QBitRef; #endif -QBitArray* QBitArray_new(); -QBitArray* QBitArray_new2(int size); -QBitArray* QBitArray_new3(QBitArray* other); -QBitArray* QBitArray_new4(int size, bool val); +void QBitArray_new(QBitArray** outptr_QBitArray); +void QBitArray_new2(int size, QBitArray** outptr_QBitArray); +void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray); +void QBitArray_new4(int size, bool val, QBitArray** outptr_QBitArray); void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other); void QBitArray_Swap(QBitArray* self, QBitArray* other); int QBitArray_Size(const QBitArray* self); @@ -58,13 +58,13 @@ void QBitArray_Truncate(QBitArray* self, int pos); const char* QBitArray_Bits(const QBitArray* self); QBitArray* QBitArray_FromBits(const char* data, ptrdiff_t lenVal); bool QBitArray_Fill22(QBitArray* self, bool val, int size); -void QBitArray_Delete(QBitArray* self); +void QBitArray_Delete(QBitArray* self, bool isSubclass); -QBitRef* QBitRef_new(QBitRef* param1); +void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef); bool QBitRef_OperatorNot(const QBitRef* self); void QBitRef_OperatorAssign(QBitRef* self, QBitRef* val); void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val); -void QBitRef_Delete(QBitRef* self); +void QBitRef_Delete(QBitRef* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbitmap.cpp b/qt/gen_qbitmap.cpp index b5581800..efe51492 100644 --- a/qt/gen_qbitmap.cpp +++ b/qt/gen_qbitmap.cpp @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include #include @@ -11,34 +13,138 @@ #include "gen_qbitmap.h" #include "_cgo_export.h" -QBitmap* QBitmap_new() { - return new QBitmap(); +class MiqtVirtualQBitmap : public virtual QBitmap { +public: + + MiqtVirtualQBitmap(): QBitmap() {}; + MiqtVirtualQBitmap(const QPixmap& param1): QBitmap(param1) {}; + MiqtVirtualQBitmap(int w, int h): QBitmap(w, h) {}; + MiqtVirtualQBitmap(const QSize& param1): QBitmap(param1) {}; + MiqtVirtualQBitmap(const QString& fileName): QBitmap(fileName) {}; + MiqtVirtualQBitmap(const QBitmap& other): QBitmap(other) {}; + MiqtVirtualQBitmap(const QString& fileName, const char* format): QBitmap(fileName, format) {}; + + virtual ~MiqtVirtualQBitmap() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QBitmap::devType(); + } + + + int callback_return_value = miqt_exec_callback_QBitmap_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QBitmap::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QBitmap::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QBitmap_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QBitmap::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QBitmap::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QBitmap_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QBitmap::metric(static_cast(param1)); + + } + +}; + +void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new2(QPixmap* param1) { - return new QBitmap(*param1); +void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new3(int w, int h) { - return new QBitmap(static_cast(w), static_cast(h)); +void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(static_cast(w), static_cast(h)); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new4(QSize* param1) { - return new QBitmap(*param1); +void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new5(struct miqt_string fileName) { +void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QBitmap(fileName_QString); + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new6(QBitmap* other) { - return new QBitmap(*other); +void QBitmap_new6(QBitmap* other, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*other); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format) { +void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QBitmap(fileName_QString, format); + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString, format); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } void QBitmap_OperatorAssign(QBitmap* self, QBitmap* other) { @@ -81,7 +187,35 @@ QBitmap* QBitmap_FromData3(QSize* size, const unsigned char* bits, int monoForma return new QBitmap(QBitmap::fromData(*size, static_cast(bits), static_cast(monoFormat))); } -void QBitmap_Delete(QBitmap* self) { - delete self; +void QBitmap_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QBitmap*)(self) )->handle__DevType = slot; +} + +int QBitmap_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_DevType(); +} + +void QBitmap_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QBitmap*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QBitmap_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_PaintEngine(); +} + +void QBitmap_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QBitmap*)(self) )->handle__Metric = slot; +} + +int QBitmap_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_Metric(param1); +} + +void QBitmap_Delete(QBitmap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbitmap.go b/qt/gen_qbitmap.go index bae6dfad..56f0a28c 100644 --- a/qt/gen_qbitmap.go +++ b/qt/gen_qbitmap.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QBitmap struct { - h *C.QBitmap + h *C.QBitmap + isSubclass bool *QPixmap } @@ -32,39 +34,71 @@ func (this *QBitmap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQBitmap(h *C.QBitmap) *QBitmap { +// newQBitmap constructs the type using only CGO pointers. +func newQBitmap(h *C.QBitmap, h_QPixmap *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QBitmap { if h == nil { return nil } - return &QBitmap{h: h, QPixmap: UnsafeNewQPixmap(unsafe.Pointer(h))} + return &QBitmap{h: h, + QPixmap: newQPixmap(h_QPixmap, h_QPaintDevice)} } -func UnsafeNewQBitmap(h unsafe.Pointer) *QBitmap { - return newQBitmap((*C.QBitmap)(h)) +// UnsafeNewQBitmap constructs the type using only unsafe pointers. +func UnsafeNewQBitmap(h unsafe.Pointer, h_QPixmap unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QBitmap { + if h == nil { + return nil + } + + return &QBitmap{h: (*C.QBitmap)(h), + QPixmap: UnsafeNewQPixmap(h_QPixmap, h_QPaintDevice)} } // NewQBitmap constructs a new QBitmap object. func NewQBitmap() *QBitmap { - ret := C.QBitmap_new() - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new(&outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap2 constructs a new QBitmap object. func NewQBitmap2(param1 *QPixmap) *QBitmap { - ret := C.QBitmap_new2(param1.cPointer()) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new2(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap3 constructs a new QBitmap object. func NewQBitmap3(w int, h int) *QBitmap { - ret := C.QBitmap_new3((C.int)(w), (C.int)(h)) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new3((C.int)(w), (C.int)(h), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap4 constructs a new QBitmap object. func NewQBitmap4(param1 *QSize) *QBitmap { - ret := C.QBitmap_new4(param1.cPointer()) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new4(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap5 constructs a new QBitmap object. @@ -73,14 +107,26 @@ func NewQBitmap5(fileName string) *QBitmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QBitmap_new5(fileName_ms) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new5(fileName_ms, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap6 constructs a new QBitmap object. func NewQBitmap6(other *QBitmap) *QBitmap { - ret := C.QBitmap_new6(other.cPointer()) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new6(other.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap7 constructs a new QBitmap object. @@ -91,8 +137,14 @@ func NewQBitmap7(fileName string, format string) *QBitmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QBitmap_new7(fileName_ms, format_Cstring) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new7(fileName_ms, format_Cstring, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QBitmap) OperatorAssign(other *QBitmap) { @@ -113,49 +165,117 @@ func (this *QBitmap) Clear() { func QBitmap_FromImage(image *QImage) *QBitmap { _ret := C.QBitmap_FromImage(image.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData(size *QSize, bits *byte) *QBitmap { _ret := C.QBitmap_FromData(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits))) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QBitmap) Transformed(param1 *QMatrix) *QBitmap { _ret := C.QBitmap_Transformed(this.h, param1.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QBitmap) TransformedWithMatrix(matrix *QTransform) *QBitmap { _ret := C.QBitmap_TransformedWithMatrix(this.h, matrix.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromImage2(image *QImage, flags ImageConversionFlag) *QBitmap { _ret := C.QBitmap_FromImage2(image.cPointer(), (C.int)(flags)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData3(size *QSize, bits *byte, monoFormat QImage__Format) *QBitmap { _ret := C.QBitmap_FromData3(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)), (C.int)(monoFormat)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } +func (this *QBitmap) callVirtualBase_DevType() int { + + return (int)(C.QBitmap_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QBitmap) OnDevType(slot func(super func() int) int) { + C.QBitmap_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBitmap_DevType +func miqt_exec_callback_QBitmap_DevType(self *C.QBitmap, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBitmap{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QBitmap) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QBitmap_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QBitmap) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QBitmap_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBitmap_PaintEngine +func miqt_exec_callback_QBitmap_PaintEngine(self *C.QBitmap, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBitmap{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QBitmap) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QBitmap_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QBitmap) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QBitmap_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBitmap_Metric +func miqt_exec_callback_QBitmap_Metric(self *C.QBitmap, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QBitmap{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QBitmap) Delete() { - C.QBitmap_Delete(this.h) + C.QBitmap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbitmap.h b/qt/gen_qbitmap.h index 522bc822..dc9876f9 100644 --- a/qt/gen_qbitmap.h +++ b/qt/gen_qbitmap.h @@ -18,6 +18,8 @@ extern "C" { class QBitmap; class QImage; class QMatrix; +class QPaintDevice; +class QPaintEngine; class QPixmap; class QSize; class QTransform; @@ -25,18 +27,20 @@ class QTransform; typedef struct QBitmap QBitmap; typedef struct QImage QImage; typedef struct QMatrix QMatrix; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; typedef struct QPixmap QPixmap; typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -QBitmap* QBitmap_new(); -QBitmap* QBitmap_new2(QPixmap* param1); -QBitmap* QBitmap_new3(int w, int h); -QBitmap* QBitmap_new4(QSize* param1); -QBitmap* QBitmap_new5(struct miqt_string fileName); -QBitmap* QBitmap_new6(QBitmap* other); -QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format); +void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new6(QBitmap* other, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); void QBitmap_OperatorAssign(QBitmap* self, QBitmap* other); void QBitmap_OperatorAssignWithQPixmap(QBitmap* self, QPixmap* param1); void QBitmap_Swap(QBitmap* self, QBitmap* other); @@ -47,7 +51,13 @@ QBitmap* QBitmap_Transformed(const QBitmap* self, QMatrix* param1); QBitmap* QBitmap_TransformedWithMatrix(const QBitmap* self, QTransform* matrix); QBitmap* QBitmap_FromImage2(QImage* image, int flags); QBitmap* QBitmap_FromData3(QSize* size, const unsigned char* bits, int monoFormat); -void QBitmap_Delete(QBitmap* self); +void QBitmap_override_virtual_DevType(void* self, intptr_t slot); +int QBitmap_virtualbase_DevType(const void* self); +void QBitmap_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QBitmap_virtualbase_PaintEngine(const void* self); +void QBitmap_override_virtual_Metric(void* self, intptr_t slot); +int QBitmap_virtualbase_Metric(const void* self, int param1); +void QBitmap_Delete(QBitmap* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qboxlayout.cpp b/qt/gen_qboxlayout.cpp index 9bfdcb15..accd8b56 100644 --- a/qt/gen_qboxlayout.cpp +++ b/qt/gen_qboxlayout.cpp @@ -1,8 +1,10 @@ #include +#include #include #include #include #include +#include #include #include #include @@ -15,12 +17,464 @@ #include "gen_qboxlayout.h" #include "_cgo_export.h" -QBoxLayout* QBoxLayout_new(int param1) { - return new QBoxLayout(static_cast(param1)); +class MiqtVirtualQBoxLayout : public virtual QBoxLayout { +public: + + MiqtVirtualQBoxLayout(QBoxLayout::Direction param1): QBoxLayout(param1) {}; + MiqtVirtualQBoxLayout(QBoxLayout::Direction param1, QWidget* parent): QBoxLayout(param1, parent) {}; + + virtual ~MiqtVirtualQBoxLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItem == 0) { + QBoxLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QBoxLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* param1) { + + QBoxLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QBoxLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QBoxLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QBoxLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QBoxLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QBoxLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QBoxLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QBoxLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QBoxLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QBoxLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QBoxLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QBoxLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QBoxLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QBoxLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QBoxLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QBoxLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QBoxLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QBoxLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QBoxLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QBoxLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QBoxLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QBoxLayout::invalidate(); + return; + } + + + miqt_exec_callback_QBoxLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QBoxLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QBoxLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QBoxLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QBoxLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QBoxLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QBoxLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QBoxLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QBoxLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QBoxLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QBoxLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QBoxLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QBoxLayout::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QBoxLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QBoxLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QBoxLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QBoxLayout::indexOf(param1); + } + + QWidget* sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QBoxLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QBoxLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QBoxLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QBoxLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QBoxLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QBoxLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QBoxLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QBoxLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QBoxLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QBoxLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QBoxLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QBoxLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QBoxLayout::childEvent(e); + + } + +}; + +void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1)); + *outptr_QBoxLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent) { - return new QBoxLayout(static_cast(param1), parent); +void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1), parent); + *outptr_QBoxLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self) { @@ -263,16 +717,490 @@ void QBoxLayout_InsertLayout3(QBoxLayout* self, int index, QLayout* layout, int self->insertLayout(static_cast(index), layout, static_cast(stretch)); } -void QBoxLayout_Delete(QBoxLayout* self) { - delete self; +void QBoxLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__AddItem = slot; +} + +void QBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_AddItem(param1); +} + +void QBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QBoxLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_SizeHint(); +} + +void QBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QBoxLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QBoxLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QBoxLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QBoxLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QBoxLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Invalidate = slot; +} + +void QBoxLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_Invalidate(); +} + +void QBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QBoxLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QBoxLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QBoxLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Count = slot; +} + +int QBoxLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_Count(); +} + +void QBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__SetGeometry = slot; +} + +void QBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QBoxLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QBoxLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_Geometry(); } -QHBoxLayout* QHBoxLayout_new(QWidget* parent) { - return new QHBoxLayout(parent); +void QBoxLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__IndexOf = slot; } -QHBoxLayout* QHBoxLayout_new2() { - return new QHBoxLayout(); +int QBoxLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QBoxLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QBoxLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QBoxLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ControlTypes = slot; +} + +int QBoxLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QBoxLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QBoxLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_Layout(); +} + +void QBoxLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ChildEvent = slot; +} + +void QBoxLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QBoxLayout_Delete(QBoxLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQHBoxLayout : public virtual QHBoxLayout { +public: + + MiqtVirtualQHBoxLayout(QWidget* parent): QHBoxLayout(parent) {}; + MiqtVirtualQHBoxLayout(): QHBoxLayout() {}; + + virtual ~MiqtVirtualQHBoxLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItem == 0) { + QHBoxLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QHBoxLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* param1) { + + QHBoxLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QHBoxLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHBoxLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QHBoxLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QHBoxLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHBoxLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QHBoxLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QHBoxLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHBoxLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QHBoxLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QHBoxLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QHBoxLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QHBoxLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QHBoxLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QHBoxLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QHBoxLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QHBoxLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QHBoxLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QHBoxLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QHBoxLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QHBoxLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QHBoxLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QHBoxLayout::invalidate(); + return; + } + + + miqt_exec_callback_QHBoxLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QHBoxLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QHBoxLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QHBoxLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QHBoxLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QHBoxLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QHBoxLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QHBoxLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QHBoxLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QHBoxLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QHBoxLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QHBoxLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QHBoxLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QHBoxLayout::setGeometry(*geometry); + + } + +}; + +void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(parent); + *outptr_QHBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(); + *outptr_QHBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self) { @@ -349,16 +1277,442 @@ struct miqt_string QHBoxLayout_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QHBoxLayout_Delete(QHBoxLayout* self) { - delete self; +void QHBoxLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__AddItem = slot; +} + +void QHBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_AddItem(param1); +} + +void QHBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QHBoxLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_SizeHint(); +} + +void QHBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QHBoxLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_MinimumSize(); } -QVBoxLayout* QVBoxLayout_new(QWidget* parent) { - return new QVBoxLayout(parent); +void QHBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__MaximumSize = slot; } -QVBoxLayout* QVBoxLayout_new2() { - return new QVBoxLayout(); +QSize* QHBoxLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QHBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QHBoxLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QHBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QHBoxLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QHBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QHBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QHBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QHBoxLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QHBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__Invalidate = slot; +} + +void QHBoxLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_Invalidate(); +} + +void QHBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QHBoxLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QHBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QHBoxLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QHBoxLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__Count = slot; +} + +int QHBoxLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_Count(); +} + +void QHBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__SetGeometry = slot; +} + +void QHBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QHBoxLayout_Delete(QHBoxLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQVBoxLayout : public virtual QVBoxLayout { +public: + + MiqtVirtualQVBoxLayout(QWidget* parent): QVBoxLayout(parent) {}; + MiqtVirtualQVBoxLayout(): QVBoxLayout() {}; + + virtual ~MiqtVirtualQVBoxLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItem == 0) { + QVBoxLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QVBoxLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* param1) { + + QVBoxLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QVBoxLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVBoxLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QVBoxLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QVBoxLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVBoxLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QVBoxLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QVBoxLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVBoxLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QVBoxLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QVBoxLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QVBoxLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QVBoxLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QVBoxLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QVBoxLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QVBoxLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QVBoxLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QVBoxLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QVBoxLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QVBoxLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QVBoxLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QVBoxLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QVBoxLayout::invalidate(); + return; + } + + + miqt_exec_callback_QVBoxLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QVBoxLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QVBoxLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QVBoxLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QVBoxLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QVBoxLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QVBoxLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QVBoxLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QVBoxLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QVBoxLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QVBoxLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QVBoxLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QVBoxLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QVBoxLayout::setGeometry(*geometry); + + } + +}; + +void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(parent); + *outptr_QVBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(); + *outptr_QVBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self) { @@ -435,7 +1789,115 @@ struct miqt_string QVBoxLayout_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QVBoxLayout_Delete(QVBoxLayout* self) { - delete self; +void QVBoxLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__AddItem = slot; +} + +void QVBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_AddItem(param1); +} + +void QVBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QVBoxLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_SizeHint(); +} + +void QVBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QVBoxLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QVBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QVBoxLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QVBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QVBoxLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QVBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QVBoxLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QVBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QVBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QVBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QVBoxLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QVBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__Invalidate = slot; +} + +void QVBoxLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_Invalidate(); +} + +void QVBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QVBoxLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QVBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QVBoxLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QVBoxLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__Count = slot; +} + +int QVBoxLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_Count(); +} + +void QVBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__SetGeometry = slot; +} + +void QVBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QVBoxLayout_Delete(QVBoxLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qboxlayout.go b/qt/gen_qboxlayout.go index 5897dcc6..3e989fb4 100644 --- a/qt/gen_qboxlayout.go +++ b/qt/gen_qboxlayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -25,7 +26,8 @@ const ( ) type QBoxLayout struct { - h *C.QBoxLayout + h *C.QBoxLayout + isSubclass bool *QLayout } @@ -43,27 +45,49 @@ func (this *QBoxLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQBoxLayout(h *C.QBoxLayout) *QBoxLayout { +// newQBoxLayout constructs the type using only CGO pointers. +func newQBoxLayout(h *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QBoxLayout { if h == nil { return nil } - return &QBoxLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QBoxLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQBoxLayout(h unsafe.Pointer) *QBoxLayout { - return newQBoxLayout((*C.QBoxLayout)(h)) +// UnsafeNewQBoxLayout constructs the type using only unsafe pointers. +func UnsafeNewQBoxLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QBoxLayout { + if h == nil { + return nil + } + + return &QBoxLayout{h: (*C.QBoxLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQBoxLayout constructs a new QBoxLayout object. func NewQBoxLayout(param1 QBoxLayout__Direction) *QBoxLayout { - ret := C.QBoxLayout_new((C.int)(param1)) - return newQBoxLayout(ret) + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QBoxLayout_new((C.int)(param1), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQBoxLayout2 constructs a new QBoxLayout object. func NewQBoxLayout2(param1 QBoxLayout__Direction, parent *QWidget) *QBoxLayout { - ret := C.QBoxLayout_new2((C.int)(param1), parent.cPointer()) - return newQBoxLayout(ret) + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QBoxLayout_new2((C.int)(param1), parent.cPointer(), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QBoxLayout) MetaObject() *QMetaObject { @@ -311,9 +335,452 @@ func (this *QBoxLayout) InsertLayout3(index int, layout *QLayout, stretch int) { C.QBoxLayout_InsertLayout3(this.h, (C.int)(index), layout.cPointer(), (C.int)(stretch)) } +func (this *QBoxLayout) callVirtualBase_AddItem(param1 *QLayoutItem) { + + C.QBoxLayout_virtualbase_AddItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QBoxLayout) OnAddItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QBoxLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_AddItem +func miqt_exec_callback_QBoxLayout_AddItem(self *C.QBoxLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QBoxLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QBoxLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QBoxLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_SizeHint +func miqt_exec_callback_QBoxLayout_SizeHint(self *C.QBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QBoxLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QBoxLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_MinimumSize +func miqt_exec_callback_QBoxLayout_MinimumSize(self *C.QBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QBoxLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QBoxLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_MaximumSize +func miqt_exec_callback_QBoxLayout_MaximumSize(self *C.QBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QBoxLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QBoxLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_HasHeightForWidth +func miqt_exec_callback_QBoxLayout_HasHeightForWidth(self *C.QBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QBoxLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QBoxLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QBoxLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_HeightForWidth +func miqt_exec_callback_QBoxLayout_HeightForWidth(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QBoxLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QBoxLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QBoxLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_MinimumHeightForWidth +func miqt_exec_callback_QBoxLayout_MinimumHeightForWidth(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QBoxLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QBoxLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ExpandingDirections +func miqt_exec_callback_QBoxLayout_ExpandingDirections(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_Invalidate() { + + C.QBoxLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QBoxLayout) OnInvalidate(slot func(super func())) { + C.QBoxLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_Invalidate +func miqt_exec_callback_QBoxLayout_Invalidate(self *C.QBoxLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QBoxLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QBoxLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QBoxLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QBoxLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ItemAt +func miqt_exec_callback_QBoxLayout_ItemAt(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QBoxLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QBoxLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_TakeAt +func miqt_exec_callback_QBoxLayout_TakeAt(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_Count() int { + + return (int)(C.QBoxLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnCount(slot func(super func() int) int) { + C.QBoxLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_Count +func miqt_exec_callback_QBoxLayout_Count(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QBoxLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QBoxLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QBoxLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_SetGeometry +func miqt_exec_callback_QBoxLayout_SetGeometry(self *C.QBoxLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QBoxLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QBoxLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QBoxLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_Geometry +func miqt_exec_callback_QBoxLayout_Geometry(self *C.QBoxLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QBoxLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QBoxLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QBoxLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_IndexOf +func miqt_exec_callback_QBoxLayout_IndexOf(self *C.QBoxLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QBoxLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QBoxLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_IsEmpty +func miqt_exec_callback_QBoxLayout_IsEmpty(self *C.QBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QBoxLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QBoxLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ControlTypes +func miqt_exec_callback_QBoxLayout_ControlTypes(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QBoxLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QBoxLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QBoxLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_Layout +func miqt_exec_callback_QBoxLayout_Layout(self *C.QBoxLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QBoxLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QBoxLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QBoxLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ChildEvent +func miqt_exec_callback_QBoxLayout_ChildEvent(self *C.QBoxLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QBoxLayout) Delete() { - C.QBoxLayout_Delete(this.h) + C.QBoxLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -326,7 +793,8 @@ func (this *QBoxLayout) GoGC() { } type QHBoxLayout struct { - h *C.QHBoxLayout + h *C.QHBoxLayout + isSubclass bool *QBoxLayout } @@ -344,27 +812,51 @@ func (this *QHBoxLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHBoxLayout(h *C.QHBoxLayout) *QHBoxLayout { +// newQHBoxLayout constructs the type using only CGO pointers. +func newQHBoxLayout(h *C.QHBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QHBoxLayout { if h == nil { return nil } - return &QHBoxLayout{h: h, QBoxLayout: UnsafeNewQBoxLayout(unsafe.Pointer(h))} + return &QHBoxLayout{h: h, + QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQHBoxLayout(h unsafe.Pointer) *QHBoxLayout { - return newQHBoxLayout((*C.QHBoxLayout)(h)) +// UnsafeNewQHBoxLayout constructs the type using only unsafe pointers. +func UnsafeNewQHBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QHBoxLayout { + if h == nil { + return nil + } + + return &QHBoxLayout{h: (*C.QHBoxLayout)(h), + QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} } // NewQHBoxLayout constructs a new QHBoxLayout object. func NewQHBoxLayout(parent *QWidget) *QHBoxLayout { - ret := C.QHBoxLayout_new(parent.cPointer()) - return newQHBoxLayout(ret) + var outptr_QHBoxLayout *C.QHBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QHBoxLayout_new(parent.cPointer(), &outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQHBoxLayout2 constructs a new QHBoxLayout object. func NewQHBoxLayout2() *QHBoxLayout { - ret := C.QHBoxLayout_new2() - return newQHBoxLayout(ret) + var outptr_QHBoxLayout *C.QHBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QHBoxLayout_new2(&outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QHBoxLayout) MetaObject() *QMetaObject { @@ -439,60 +931,390 @@ func QHBoxLayout_TrUtf83(s string, c string, n int) string { return _ret } -// Delete this object from C++ memory. -func (this *QHBoxLayout) Delete() { - C.QHBoxLayout_Delete(this.h) -} +func (this *QHBoxLayout) callVirtualBase_AddItem(param1 *QLayoutItem) { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QHBoxLayout) GoGC() { - runtime.SetFinalizer(this, func(this *QHBoxLayout) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + C.QHBoxLayout_virtualbase_AddItem(unsafe.Pointer(this.h), param1.cPointer()) -type QVBoxLayout struct { - h *C.QVBoxLayout - *QBoxLayout +} +func (this *QHBoxLayout) OnAddItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QHBoxLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QVBoxLayout) cPointer() *C.QVBoxLayout { - if this == nil { - return nil +//export miqt_exec_callback_QHBoxLayout_AddItem +func miqt_exec_callback_QHBoxLayout_AddItem(self *C.QHBoxLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_AddItem, slotval1) + } -func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer { - if this == nil { +func (this *QHBoxLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QHBoxLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHBoxLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QHBoxLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_SizeHint +func miqt_exec_callback_QHBoxLayout_SizeHint(self *C.QHBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QHBoxLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHBoxLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QHBoxLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_MinimumSize +func miqt_exec_callback_QHBoxLayout_MinimumSize(self *C.QHBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QHBoxLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHBoxLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QHBoxLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_MaximumSize +func miqt_exec_callback_QHBoxLayout_MaximumSize(self *C.QHBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QHBoxLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QHBoxLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_HasHeightForWidth +func miqt_exec_callback_QHBoxLayout_HasHeightForWidth(self *C.QHBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QHBoxLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QHBoxLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QHBoxLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_HeightForWidth +func miqt_exec_callback_QHBoxLayout_HeightForWidth(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QHBoxLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QHBoxLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QHBoxLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_MinimumHeightForWidth +func miqt_exec_callback_QHBoxLayout_MinimumHeightForWidth(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QHBoxLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QHBoxLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_ExpandingDirections +func miqt_exec_callback_QHBoxLayout_ExpandingDirections(self *C.QHBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_Invalidate() { + + C.QHBoxLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QHBoxLayout) OnInvalidate(slot func(super func())) { + C.QHBoxLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_Invalidate +func miqt_exec_callback_QHBoxLayout_Invalidate(self *C.QHBoxLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QHBoxLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QHBoxLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QHBoxLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QHBoxLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_ItemAt +func miqt_exec_callback_QHBoxLayout_ItemAt(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QHBoxLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QHBoxLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QHBoxLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_TakeAt +func miqt_exec_callback_QHBoxLayout_TakeAt(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_Count() int { + + return (int)(C.QHBoxLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnCount(slot func(super func() int) int) { + C.QHBoxLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_Count +func miqt_exec_callback_QHBoxLayout_Count(self *C.QHBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QHBoxLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QHBoxLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QHBoxLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_SetGeometry +func miqt_exec_callback_QHBoxLayout_SetGeometry(self *C.QHBoxLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QHBoxLayout) Delete() { + C.QHBoxLayout_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QHBoxLayout) GoGC() { + runtime.SetFinalizer(this, func(this *QHBoxLayout) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QVBoxLayout struct { + h *C.QVBoxLayout + isSubclass bool + *QBoxLayout +} + +func (this *QVBoxLayout) cPointer() *C.QVBoxLayout { + if this == nil { + return nil + } + return this.h +} + +func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer { + if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQVBoxLayout(h *C.QVBoxLayout) *QVBoxLayout { +// newQVBoxLayout constructs the type using only CGO pointers. +func newQVBoxLayout(h *C.QVBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QVBoxLayout { if h == nil { return nil } - return &QVBoxLayout{h: h, QBoxLayout: UnsafeNewQBoxLayout(unsafe.Pointer(h))} + return &QVBoxLayout{h: h, + QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQVBoxLayout(h unsafe.Pointer) *QVBoxLayout { - return newQVBoxLayout((*C.QVBoxLayout)(h)) +// UnsafeNewQVBoxLayout constructs the type using only unsafe pointers. +func UnsafeNewQVBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QVBoxLayout { + if h == nil { + return nil + } + + return &QVBoxLayout{h: (*C.QVBoxLayout)(h), + QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} } // NewQVBoxLayout constructs a new QVBoxLayout object. func NewQVBoxLayout(parent *QWidget) *QVBoxLayout { - ret := C.QVBoxLayout_new(parent.cPointer()) - return newQVBoxLayout(ret) + var outptr_QVBoxLayout *C.QVBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QVBoxLayout_new(parent.cPointer(), &outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQVBoxLayout2 constructs a new QVBoxLayout object. func NewQVBoxLayout2() *QVBoxLayout { - ret := C.QVBoxLayout_new2() - return newQVBoxLayout(ret) + var outptr_QVBoxLayout *C.QVBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QVBoxLayout_new2(&outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QVBoxLayout) MetaObject() *QMetaObject { @@ -567,9 +1389,314 @@ func QVBoxLayout_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QVBoxLayout) callVirtualBase_AddItem(param1 *QLayoutItem) { + + C.QVBoxLayout_virtualbase_AddItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QVBoxLayout) OnAddItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QVBoxLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_AddItem +func miqt_exec_callback_QVBoxLayout_AddItem(self *C.QVBoxLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QVBoxLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QVBoxLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVBoxLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QVBoxLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_SizeHint +func miqt_exec_callback_QVBoxLayout_SizeHint(self *C.QVBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QVBoxLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVBoxLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QVBoxLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_MinimumSize +func miqt_exec_callback_QVBoxLayout_MinimumSize(self *C.QVBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QVBoxLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVBoxLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QVBoxLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_MaximumSize +func miqt_exec_callback_QVBoxLayout_MaximumSize(self *C.QVBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QVBoxLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QVBoxLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_HasHeightForWidth +func miqt_exec_callback_QVBoxLayout_HasHeightForWidth(self *C.QVBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QVBoxLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVBoxLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QVBoxLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_HeightForWidth +func miqt_exec_callback_QVBoxLayout_HeightForWidth(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QVBoxLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVBoxLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QVBoxLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_MinimumHeightForWidth +func miqt_exec_callback_QVBoxLayout_MinimumHeightForWidth(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QVBoxLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QVBoxLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_ExpandingDirections +func miqt_exec_callback_QVBoxLayout_ExpandingDirections(self *C.QVBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_Invalidate() { + + C.QVBoxLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QVBoxLayout) OnInvalidate(slot func(super func())) { + C.QVBoxLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_Invalidate +func miqt_exec_callback_QVBoxLayout_Invalidate(self *C.QVBoxLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QVBoxLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QVBoxLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QVBoxLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QVBoxLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_ItemAt +func miqt_exec_callback_QVBoxLayout_ItemAt(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QVBoxLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QVBoxLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QVBoxLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_TakeAt +func miqt_exec_callback_QVBoxLayout_TakeAt(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_Count() int { + + return (int)(C.QVBoxLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnCount(slot func(super func() int) int) { + C.QVBoxLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_Count +func miqt_exec_callback_QVBoxLayout_Count(self *C.QVBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QVBoxLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QVBoxLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QVBoxLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_SetGeometry +func miqt_exec_callback_QVBoxLayout_SetGeometry(self *C.QVBoxLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + // Delete this object from C++ memory. func (this *QVBoxLayout) Delete() { - C.QVBoxLayout_Delete(this.h) + C.QVBoxLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qboxlayout.h b/qt/gen_qboxlayout.h index 23c74efa..b79265f6 100644 --- a/qt/gen_qboxlayout.h +++ b/qt/gen_qboxlayout.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QBoxLayout; +class QChildEvent; class QHBoxLayout; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QSpacerItem; @@ -27,10 +29,12 @@ class QVBoxLayout; class QWidget; #else typedef struct QBoxLayout QBoxLayout; +typedef struct QChildEvent QChildEvent; typedef struct QHBoxLayout QHBoxLayout; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QSpacerItem QSpacerItem; @@ -38,8 +42,8 @@ typedef struct QVBoxLayout QVBoxLayout; typedef struct QWidget QWidget; #endif -QBoxLayout* QBoxLayout_new(int param1); -QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent); +void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self); void* QBoxLayout_Metacast(QBoxLayout* self, const char* param1); struct miqt_string QBoxLayout_Tr(const char* s); @@ -89,10 +93,48 @@ void QBoxLayout_InsertStretch2(QBoxLayout* self, int index, int stretch); void QBoxLayout_InsertWidget3(QBoxLayout* self, int index, QWidget* widget, int stretch); void QBoxLayout_InsertWidget4(QBoxLayout* self, int index, QWidget* widget, int stretch, int alignment); void QBoxLayout_InsertLayout3(QBoxLayout* self, int index, QLayout* layout, int stretch); -void QBoxLayout_Delete(QBoxLayout* self); +void QBoxLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QBoxLayout_virtualbase_SizeHint(const void* self); +void QBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QBoxLayout_virtualbase_MinimumSize(const void* self); +void QBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QBoxLayout_virtualbase_MaximumSize(const void* self); +void QBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QBoxLayout_virtualbase_HasHeightForWidth(const void* self); +void QBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QBoxLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QBoxLayout_virtualbase_ExpandingDirections(const void* self); +void QBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QBoxLayout_virtualbase_Invalidate(void* self); +void QBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QBoxLayout_virtualbase_ItemAt(const void* self, int param1); +void QBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QBoxLayout_virtualbase_TakeAt(void* self, int param1); +void QBoxLayout_override_virtual_Count(void* self, intptr_t slot); +int QBoxLayout_virtualbase_Count(const void* self); +void QBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QBoxLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QBoxLayout_virtualbase_Geometry(const void* self); +void QBoxLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QBoxLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QBoxLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QBoxLayout_virtualbase_IsEmpty(const void* self); +void QBoxLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QBoxLayout_virtualbase_ControlTypes(const void* self); +void QBoxLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QBoxLayout_virtualbase_Layout(void* self); +void QBoxLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QBoxLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QBoxLayout_Delete(QBoxLayout* self, bool isSubclass); -QHBoxLayout* QHBoxLayout_new(QWidget* parent); -QHBoxLayout* QHBoxLayout_new2(); +void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self); void* QHBoxLayout_Metacast(QHBoxLayout* self, const char* param1); struct miqt_string QHBoxLayout_Tr(const char* s); @@ -101,10 +143,36 @@ struct miqt_string QHBoxLayout_Tr2(const char* s, const char* c); struct miqt_string QHBoxLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QHBoxLayout_TrUtf82(const char* s, const char* c); struct miqt_string QHBoxLayout_TrUtf83(const char* s, const char* c, int n); -void QHBoxLayout_Delete(QHBoxLayout* self); +void QHBoxLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QHBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QHBoxLayout_virtualbase_SizeHint(const void* self); +void QHBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QHBoxLayout_virtualbase_MinimumSize(const void* self); +void QHBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QHBoxLayout_virtualbase_MaximumSize(const void* self); +void QHBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QHBoxLayout_virtualbase_HasHeightForWidth(const void* self); +void QHBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QHBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QHBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_ExpandingDirections(const void* self); +void QHBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_Invalidate(void* self); +void QHBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QHBoxLayout_virtualbase_ItemAt(const void* self, int param1); +void QHBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QHBoxLayout_virtualbase_TakeAt(void* self, int param1); +void QHBoxLayout_override_virtual_Count(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_Count(const void* self); +void QHBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QHBoxLayout_Delete(QHBoxLayout* self, bool isSubclass); -QVBoxLayout* QVBoxLayout_new(QWidget* parent); -QVBoxLayout* QVBoxLayout_new2(); +void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self); void* QVBoxLayout_Metacast(QVBoxLayout* self, const char* param1); struct miqt_string QVBoxLayout_Tr(const char* s); @@ -113,7 +181,33 @@ struct miqt_string QVBoxLayout_Tr2(const char* s, const char* c); struct miqt_string QVBoxLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QVBoxLayout_TrUtf82(const char* s, const char* c); struct miqt_string QVBoxLayout_TrUtf83(const char* s, const char* c, int n); -void QVBoxLayout_Delete(QVBoxLayout* self); +void QVBoxLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QVBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QVBoxLayout_virtualbase_SizeHint(const void* self); +void QVBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QVBoxLayout_virtualbase_MinimumSize(const void* self); +void QVBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QVBoxLayout_virtualbase_MaximumSize(const void* self); +void QVBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QVBoxLayout_virtualbase_HasHeightForWidth(const void* self); +void QVBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QVBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QVBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_ExpandingDirections(const void* self); +void QVBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_Invalidate(void* self); +void QVBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QVBoxLayout_virtualbase_ItemAt(const void* self, int param1); +void QVBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QVBoxLayout_virtualbase_TakeAt(void* self, int param1); +void QVBoxLayout_override_virtual_Count(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_Count(const void* self); +void QVBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QVBoxLayout_Delete(QVBoxLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbrush.cpp b/qt/gen_qbrush.cpp index 5cb7ff4c..a0f38d9f 100644 --- a/qt/gen_qbrush.cpp +++ b/qt/gen_qbrush.cpp @@ -16,52 +16,64 @@ #include "gen_qbrush.h" #include "_cgo_export.h" -QBrush* QBrush_new() { - return new QBrush(); +void QBrush_new(QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(); + *outptr_QBrush = ret; } -QBrush* QBrush_new2(int bs) { - return new QBrush(static_cast(bs)); +void QBrush_new2(int bs, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(bs)); + *outptr_QBrush = ret; } -QBrush* QBrush_new3(QColor* color) { - return new QBrush(*color); +void QBrush_new3(QColor* color, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*color); + *outptr_QBrush = ret; } -QBrush* QBrush_new4(int color) { - return new QBrush(static_cast(color)); +void QBrush_new4(int color, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(color)); + *outptr_QBrush = ret; } -QBrush* QBrush_new5(QColor* color, QPixmap* pixmap) { - return new QBrush(*color, *pixmap); +void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*color, *pixmap); + *outptr_QBrush = ret; } -QBrush* QBrush_new6(int color, QPixmap* pixmap) { - return new QBrush(static_cast(color), *pixmap); +void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(color), *pixmap); + *outptr_QBrush = ret; } -QBrush* QBrush_new7(QPixmap* pixmap) { - return new QBrush(*pixmap); +void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*pixmap); + *outptr_QBrush = ret; } -QBrush* QBrush_new8(QImage* image) { - return new QBrush(*image); +void QBrush_new8(QImage* image, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*image); + *outptr_QBrush = ret; } -QBrush* QBrush_new9(QBrush* brush) { - return new QBrush(*brush); +void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*brush); + *outptr_QBrush = ret; } -QBrush* QBrush_new10(QGradient* gradient) { - return new QBrush(*gradient); +void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*gradient); + *outptr_QBrush = ret; } -QBrush* QBrush_new11(QColor* color, int bs) { - return new QBrush(*color, static_cast(bs)); +void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*color, static_cast(bs)); + *outptr_QBrush = ret; } -QBrush* QBrush_new12(int color, int bs) { - return new QBrush(static_cast(color), static_cast(bs)); +void QBrush_new12(int color, int bs, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(color), static_cast(bs)); + *outptr_QBrush = ret; } void QBrush_OperatorAssign(QBrush* self, QBrush* brush) { @@ -149,32 +161,44 @@ bool QBrush_IsDetached(const QBrush* self) { return self->isDetached(); } -void QBrush_Delete(QBrush* self) { - delete self; +void QBrush_Delete(QBrush* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QBrushData* QBrushData_new(QBrushData* param1) { - return new QBrushData(*param1); +void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData) { + QBrushData* ret = new QBrushData(*param1); + *outptr_QBrushData = ret; } void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1) { self->operator=(*param1); } -void QBrushData_Delete(QBrushData* self) { - delete self; +void QBrushData_Delete(QBrushData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGradient* QGradient_new() { - return new QGradient(); +void QGradient_new(QGradient** outptr_QGradient) { + QGradient* ret = new QGradient(); + *outptr_QGradient = ret; } -QGradient* QGradient_new2(int param1) { - return new QGradient(static_cast(param1)); +void QGradient_new2(int param1, QGradient** outptr_QGradient) { + QGradient* ret = new QGradient(static_cast(param1)); + *outptr_QGradient = ret; } -QGradient* QGradient_new3(QGradient* param1) { - return new QGradient(*param1); +void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient) { + QGradient* ret = new QGradient(*param1); + *outptr_QGradient = ret; } int QGradient_Type(const QGradient* self) { @@ -259,24 +283,36 @@ bool QGradient_OperatorNotEqual(const QGradient* self, QGradient* other) { return self->operator!=(*other); } -void QGradient_Delete(QGradient* self) { - delete self; +void QGradient_Delete(QGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QLinearGradient* QLinearGradient_new() { - return new QLinearGradient(); +void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } -QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop) { - return new QLinearGradient(*start, *finalStop); +void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(*start, *finalStop); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } -QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop) { - return new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); +void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } -QLinearGradient* QLinearGradient_new4(QLinearGradient* param1) { - return new QLinearGradient(*param1); +void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(*param1); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } QPointF* QLinearGradient_Start(const QLinearGradient* self) { @@ -303,40 +339,60 @@ void QLinearGradient_SetFinalStop2(QLinearGradient* self, double x, double y) { self->setFinalStop(static_cast(x), static_cast(y)); } -void QLinearGradient_Delete(QLinearGradient* self) { - delete self; +void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRadialGradient* QRadialGradient_new() { - return new QRadialGradient(); +void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint) { - return new QRadialGradient(*center, static_cast(radius), *focalPoint); +void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius), *focalPoint); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy) { - return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); +void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new4(QPointF* center, double radius) { - return new QRadialGradient(*center, static_cast(radius)); +void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius) { - return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); +void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius) { - return new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); +void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius) { - return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); +void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new8(QRadialGradient* param1) { - return new QRadialGradient(*param1); +void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*param1); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } QPointF* QRadialGradient_Center(const QRadialGradient* self) { @@ -390,24 +446,36 @@ void QRadialGradient_SetFocalRadius(QRadialGradient* self, double radius) { self->setFocalRadius(static_cast(radius)); } -void QRadialGradient_Delete(QRadialGradient* self) { - delete self; +void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QConicalGradient* QConicalGradient_new() { - return new QConicalGradient(); +void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } -QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle) { - return new QConicalGradient(*center, static_cast(startAngle)); +void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(*center, static_cast(startAngle)); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } -QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle) { - return new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); +void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } -QConicalGradient* QConicalGradient_new4(QConicalGradient* param1) { - return new QConicalGradient(*param1); +void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(*param1); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } QPointF* QConicalGradient_Center(const QConicalGradient* self) { @@ -431,19 +499,28 @@ void QConicalGradient_SetAngle(QConicalGradient* self, double angle) { self->setAngle(static_cast(angle)); } -void QConicalGradient_Delete(QConicalGradient* self) { - delete self; +void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1) { - return new QGradient::QGradientData(*param1); +void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData) { + QGradient::QGradientData* ret = new QGradient::QGradientData(*param1); + *outptr_QGradient__QGradientData = ret; } void QGradient__QGradientData_OperatorAssign(QGradient__QGradientData* self, QGradient__QGradientData* param1) { self->operator=(*param1); } -void QGradient__QGradientData_Delete(QGradient__QGradientData* self) { - delete self; +void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbrush.go b/qt/gen_qbrush.go index a8279336..7e07aa3e 100644 --- a/qt/gen_qbrush.go +++ b/qt/gen_qbrush.go @@ -221,7 +221,8 @@ const ( ) type QBrush struct { - h *C.QBrush + h *C.QBrush + isSubclass bool } func (this *QBrush) cPointer() *C.QBrush { @@ -238,6 +239,7 @@ func (this *QBrush) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBrush constructs the type using only CGO pointers. func newQBrush(h *C.QBrush) *QBrush { if h == nil { return nil @@ -245,80 +247,133 @@ func newQBrush(h *C.QBrush) *QBrush { return &QBrush{h: h} } +// UnsafeNewQBrush constructs the type using only unsafe pointers. func UnsafeNewQBrush(h unsafe.Pointer) *QBrush { - return newQBrush((*C.QBrush)(h)) + if h == nil { + return nil + } + + return &QBrush{h: (*C.QBrush)(h)} } // NewQBrush constructs a new QBrush object. func NewQBrush() *QBrush { - ret := C.QBrush_new() - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new(&outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush2 constructs a new QBrush object. func NewQBrush2(bs BrushStyle) *QBrush { - ret := C.QBrush_new2((C.int)(bs)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new2((C.int)(bs), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush3 constructs a new QBrush object. func NewQBrush3(color *QColor) *QBrush { - ret := C.QBrush_new3(color.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new3(color.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush4 constructs a new QBrush object. func NewQBrush4(color GlobalColor) *QBrush { - ret := C.QBrush_new4((C.int)(color)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new4((C.int)(color), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush5 constructs a new QBrush object. func NewQBrush5(color *QColor, pixmap *QPixmap) *QBrush { - ret := C.QBrush_new5(color.cPointer(), pixmap.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new5(color.cPointer(), pixmap.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush6 constructs a new QBrush object. func NewQBrush6(color GlobalColor, pixmap *QPixmap) *QBrush { - ret := C.QBrush_new6((C.int)(color), pixmap.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new6((C.int)(color), pixmap.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush7 constructs a new QBrush object. func NewQBrush7(pixmap *QPixmap) *QBrush { - ret := C.QBrush_new7(pixmap.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new7(pixmap.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush8 constructs a new QBrush object. func NewQBrush8(image *QImage) *QBrush { - ret := C.QBrush_new8(image.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new8(image.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush9 constructs a new QBrush object. func NewQBrush9(brush *QBrush) *QBrush { - ret := C.QBrush_new9(brush.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new9(brush.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush10 constructs a new QBrush object. func NewQBrush10(gradient *QGradient) *QBrush { - ret := C.QBrush_new10(gradient.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new10(gradient.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush11 constructs a new QBrush object. func NewQBrush11(color *QColor, bs BrushStyle) *QBrush { - ret := C.QBrush_new11(color.cPointer(), (C.int)(bs)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new11(color.cPointer(), (C.int)(bs), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush12 constructs a new QBrush object. func NewQBrush12(color GlobalColor, bs BrushStyle) *QBrush { - ret := C.QBrush_new12((C.int)(color), (C.int)(bs)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new12((C.int)(color), (C.int)(bs), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } func (this *QBrush) OperatorAssign(brush *QBrush) { @@ -358,7 +413,7 @@ func (this *QBrush) SetTransform(transform *QTransform) { func (this *QBrush) Texture() *QPixmap { _ret := C.QBrush_Texture(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -369,7 +424,7 @@ func (this *QBrush) SetTexture(pixmap *QPixmap) { func (this *QBrush) TextureImage() *QImage { _ret := C.QBrush_TextureImage(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -412,7 +467,7 @@ func (this *QBrush) IsDetached() bool { // Delete this object from C++ memory. func (this *QBrush) Delete() { - C.QBrush_Delete(this.h) + C.QBrush_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -425,7 +480,8 @@ func (this *QBrush) GoGC() { } type QBrushData struct { - h *C.QBrushData + h *C.QBrushData + isSubclass bool } func (this *QBrushData) cPointer() *C.QBrushData { @@ -442,6 +498,7 @@ func (this *QBrushData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBrushData constructs the type using only CGO pointers. func newQBrushData(h *C.QBrushData) *QBrushData { if h == nil { return nil @@ -449,14 +506,23 @@ func newQBrushData(h *C.QBrushData) *QBrushData { return &QBrushData{h: h} } +// UnsafeNewQBrushData constructs the type using only unsafe pointers. func UnsafeNewQBrushData(h unsafe.Pointer) *QBrushData { - return newQBrushData((*C.QBrushData)(h)) + if h == nil { + return nil + } + + return &QBrushData{h: (*C.QBrushData)(h)} } // NewQBrushData constructs a new QBrushData object. func NewQBrushData(param1 *QBrushData) *QBrushData { - ret := C.QBrushData_new(param1.cPointer()) - return newQBrushData(ret) + var outptr_QBrushData *C.QBrushData = nil + + C.QBrushData_new(param1.cPointer(), &outptr_QBrushData) + ret := newQBrushData(outptr_QBrushData) + ret.isSubclass = true + return ret } func (this *QBrushData) OperatorAssign(param1 *QBrushData) { @@ -465,7 +531,7 @@ func (this *QBrushData) OperatorAssign(param1 *QBrushData) { // Delete this object from C++ memory. func (this *QBrushData) Delete() { - C.QBrushData_Delete(this.h) + C.QBrushData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -478,7 +544,8 @@ func (this *QBrushData) GoGC() { } type QGradient struct { - h *C.QGradient + h *C.QGradient + isSubclass bool } func (this *QGradient) cPointer() *C.QGradient { @@ -495,6 +562,7 @@ func (this *QGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGradient constructs the type using only CGO pointers. func newQGradient(h *C.QGradient) *QGradient { if h == nil { return nil @@ -502,26 +570,43 @@ func newQGradient(h *C.QGradient) *QGradient { return &QGradient{h: h} } +// UnsafeNewQGradient constructs the type using only unsafe pointers. func UnsafeNewQGradient(h unsafe.Pointer) *QGradient { - return newQGradient((*C.QGradient)(h)) + if h == nil { + return nil + } + + return &QGradient{h: (*C.QGradient)(h)} } // NewQGradient constructs a new QGradient object. func NewQGradient() *QGradient { - ret := C.QGradient_new() - return newQGradient(ret) + var outptr_QGradient *C.QGradient = nil + + C.QGradient_new(&outptr_QGradient) + ret := newQGradient(outptr_QGradient) + ret.isSubclass = true + return ret } // NewQGradient2 constructs a new QGradient object. func NewQGradient2(param1 QGradient__Preset) *QGradient { - ret := C.QGradient_new2((C.int)(param1)) - return newQGradient(ret) + var outptr_QGradient *C.QGradient = nil + + C.QGradient_new2((C.int)(param1), &outptr_QGradient) + ret := newQGradient(outptr_QGradient) + ret.isSubclass = true + return ret } // NewQGradient3 constructs a new QGradient object. func NewQGradient3(param1 *QGradient) *QGradient { - ret := C.QGradient_new3(param1.cPointer()) - return newQGradient(ret) + var outptr_QGradient *C.QGradient = nil + + C.QGradient_new3(param1.cPointer(), &outptr_QGradient) + ret := newQGradient(outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QGradient) Type() QGradient__Type { @@ -619,7 +704,7 @@ func (this *QGradient) OperatorNotEqual(other *QGradient) bool { // Delete this object from C++ memory. func (this *QGradient) Delete() { - C.QGradient_Delete(this.h) + C.QGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -632,7 +717,8 @@ func (this *QGradient) GoGC() { } type QLinearGradient struct { - h *C.QLinearGradient + h *C.QLinearGradient + isSubclass bool *QGradient } @@ -650,39 +736,67 @@ func (this *QLinearGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLinearGradient(h *C.QLinearGradient) *QLinearGradient { +// newQLinearGradient constructs the type using only CGO pointers. +func newQLinearGradient(h *C.QLinearGradient, h_QGradient *C.QGradient) *QLinearGradient { if h == nil { return nil } - return &QLinearGradient{h: h, QGradient: UnsafeNewQGradient(unsafe.Pointer(h))} + return &QLinearGradient{h: h, + QGradient: newQGradient(h_QGradient)} } -func UnsafeNewQLinearGradient(h unsafe.Pointer) *QLinearGradient { - return newQLinearGradient((*C.QLinearGradient)(h)) +// UnsafeNewQLinearGradient constructs the type using only unsafe pointers. +func UnsafeNewQLinearGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QLinearGradient { + if h == nil { + return nil + } + + return &QLinearGradient{h: (*C.QLinearGradient)(h), + QGradient: UnsafeNewQGradient(h_QGradient)} } // NewQLinearGradient constructs a new QLinearGradient object. func NewQLinearGradient() *QLinearGradient { - ret := C.QLinearGradient_new() - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new(&outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQLinearGradient2 constructs a new QLinearGradient object. func NewQLinearGradient2(start *QPointF, finalStop *QPointF) *QLinearGradient { - ret := C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer()) - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQLinearGradient3 constructs a new QLinearGradient object. func NewQLinearGradient3(xStart float64, yStart float64, xFinalStop float64, yFinalStop float64) *QLinearGradient { - ret := C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop)) - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop), &outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQLinearGradient4 constructs a new QLinearGradient object. func NewQLinearGradient4(param1 *QLinearGradient) *QLinearGradient { - ret := C.QLinearGradient_new4(param1.cPointer()) - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new4(param1.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QLinearGradient) Start() *QPointF { @@ -717,7 +831,7 @@ func (this *QLinearGradient) SetFinalStop2(x float64, y float64) { // Delete this object from C++ memory. func (this *QLinearGradient) Delete() { - C.QLinearGradient_Delete(this.h) + C.QLinearGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -730,7 +844,8 @@ func (this *QLinearGradient) GoGC() { } type QRadialGradient struct { - h *C.QRadialGradient + h *C.QRadialGradient + isSubclass bool *QGradient } @@ -748,63 +863,111 @@ func (this *QRadialGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadialGradient(h *C.QRadialGradient) *QRadialGradient { +// newQRadialGradient constructs the type using only CGO pointers. +func newQRadialGradient(h *C.QRadialGradient, h_QGradient *C.QGradient) *QRadialGradient { if h == nil { return nil } - return &QRadialGradient{h: h, QGradient: UnsafeNewQGradient(unsafe.Pointer(h))} + return &QRadialGradient{h: h, + QGradient: newQGradient(h_QGradient)} } -func UnsafeNewQRadialGradient(h unsafe.Pointer) *QRadialGradient { - return newQRadialGradient((*C.QRadialGradient)(h)) +// UnsafeNewQRadialGradient constructs the type using only unsafe pointers. +func UnsafeNewQRadialGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QRadialGradient { + if h == nil { + return nil + } + + return &QRadialGradient{h: (*C.QRadialGradient)(h), + QGradient: UnsafeNewQGradient(h_QGradient)} } // NewQRadialGradient constructs a new QRadialGradient object. func NewQRadialGradient() *QRadialGradient { - ret := C.QRadialGradient_new() - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new(&outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient2 constructs a new QRadialGradient object. func NewQRadialGradient2(center *QPointF, radius float64, focalPoint *QPointF) *QRadialGradient { - ret := C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer()) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient3 constructs a new QRadialGradient object. func NewQRadialGradient3(cx float64, cy float64, radius float64, fx float64, fy float64) *QRadialGradient { - ret := C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient4 constructs a new QRadialGradient object. func NewQRadialGradient4(center *QPointF, radius float64) *QRadialGradient { - ret := C.QRadialGradient_new4(center.cPointer(), (C.double)(radius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new4(center.cPointer(), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient5 constructs a new QRadialGradient object. func NewQRadialGradient5(cx float64, cy float64, radius float64) *QRadialGradient { - ret := C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient6 constructs a new QRadialGradient object. func NewQRadialGradient6(center *QPointF, centerRadius float64, focalPoint *QPointF, focalRadius float64) *QRadialGradient { - ret := C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient7 constructs a new QRadialGradient object. func NewQRadialGradient7(cx float64, cy float64, centerRadius float64, fx float64, fy float64, focalRadius float64) *QRadialGradient { - ret := C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient8 constructs a new QRadialGradient object. func NewQRadialGradient8(param1 *QRadialGradient) *QRadialGradient { - ret := C.QRadialGradient_new8(param1.cPointer()) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new8(param1.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QRadialGradient) Center() *QPointF { @@ -863,7 +1026,7 @@ func (this *QRadialGradient) SetFocalRadius(radius float64) { // Delete this object from C++ memory. func (this *QRadialGradient) Delete() { - C.QRadialGradient_Delete(this.h) + C.QRadialGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -876,7 +1039,8 @@ func (this *QRadialGradient) GoGC() { } type QConicalGradient struct { - h *C.QConicalGradient + h *C.QConicalGradient + isSubclass bool *QGradient } @@ -894,39 +1058,67 @@ func (this *QConicalGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQConicalGradient(h *C.QConicalGradient) *QConicalGradient { +// newQConicalGradient constructs the type using only CGO pointers. +func newQConicalGradient(h *C.QConicalGradient, h_QGradient *C.QGradient) *QConicalGradient { if h == nil { return nil } - return &QConicalGradient{h: h, QGradient: UnsafeNewQGradient(unsafe.Pointer(h))} + return &QConicalGradient{h: h, + QGradient: newQGradient(h_QGradient)} } -func UnsafeNewQConicalGradient(h unsafe.Pointer) *QConicalGradient { - return newQConicalGradient((*C.QConicalGradient)(h)) +// UnsafeNewQConicalGradient constructs the type using only unsafe pointers. +func UnsafeNewQConicalGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QConicalGradient { + if h == nil { + return nil + } + + return &QConicalGradient{h: (*C.QConicalGradient)(h), + QGradient: UnsafeNewQGradient(h_QGradient)} } // NewQConicalGradient constructs a new QConicalGradient object. func NewQConicalGradient() *QConicalGradient { - ret := C.QConicalGradient_new() - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new(&outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQConicalGradient2 constructs a new QConicalGradient object. func NewQConicalGradient2(center *QPointF, startAngle float64) *QConicalGradient { - ret := C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle)) - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQConicalGradient3 constructs a new QConicalGradient object. func NewQConicalGradient3(cx float64, cy float64, startAngle float64) *QConicalGradient { - ret := C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle)) - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQConicalGradient4 constructs a new QConicalGradient object. func NewQConicalGradient4(param1 *QConicalGradient) *QConicalGradient { - ret := C.QConicalGradient_new4(param1.cPointer()) - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new4(param1.cPointer(), &outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QConicalGradient) Center() *QPointF { @@ -954,7 +1146,7 @@ func (this *QConicalGradient) SetAngle(angle float64) { // Delete this object from C++ memory. func (this *QConicalGradient) Delete() { - C.QConicalGradient_Delete(this.h) + C.QConicalGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -967,7 +1159,8 @@ func (this *QConicalGradient) GoGC() { } type QGradient__QGradientData struct { - h *C.QGradient__QGradientData + h *C.QGradient__QGradientData + isSubclass bool } func (this *QGradient__QGradientData) cPointer() *C.QGradient__QGradientData { @@ -984,6 +1177,7 @@ func (this *QGradient__QGradientData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGradient__QGradientData constructs the type using only CGO pointers. func newQGradient__QGradientData(h *C.QGradient__QGradientData) *QGradient__QGradientData { if h == nil { return nil @@ -991,14 +1185,23 @@ func newQGradient__QGradientData(h *C.QGradient__QGradientData) *QGradient__QGra return &QGradient__QGradientData{h: h} } +// UnsafeNewQGradient__QGradientData constructs the type using only unsafe pointers. func UnsafeNewQGradient__QGradientData(h unsafe.Pointer) *QGradient__QGradientData { - return newQGradient__QGradientData((*C.QGradient__QGradientData)(h)) + if h == nil { + return nil + } + + return &QGradient__QGradientData{h: (*C.QGradient__QGradientData)(h)} } // NewQGradient__QGradientData constructs a new QGradient::QGradientData object. func NewQGradient__QGradientData(param1 *QGradient__QGradientData) *QGradient__QGradientData { - ret := C.QGradient__QGradientData_new(param1.cPointer()) - return newQGradient__QGradientData(ret) + var outptr_QGradient__QGradientData *C.QGradient__QGradientData = nil + + C.QGradient__QGradientData_new(param1.cPointer(), &outptr_QGradient__QGradientData) + ret := newQGradient__QGradientData(outptr_QGradient__QGradientData) + ret.isSubclass = true + return ret } func (this *QGradient__QGradientData) OperatorAssign(param1 *QGradient__QGradientData) { @@ -1007,7 +1210,7 @@ func (this *QGradient__QGradientData) OperatorAssign(param1 *QGradient__QGradien // Delete this object from C++ memory. func (this *QGradient__QGradientData) Delete() { - C.QGradient__QGradientData_Delete(this.h) + C.QGradient__QGradientData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbrush.h b/qt/gen_qbrush.h index 8a39597f..75d2f179 100644 --- a/qt/gen_qbrush.h +++ b/qt/gen_qbrush.h @@ -48,18 +48,18 @@ typedef struct QRadialGradient QRadialGradient; typedef struct QTransform QTransform; #endif -QBrush* QBrush_new(); -QBrush* QBrush_new2(int bs); -QBrush* QBrush_new3(QColor* color); -QBrush* QBrush_new4(int color); -QBrush* QBrush_new5(QColor* color, QPixmap* pixmap); -QBrush* QBrush_new6(int color, QPixmap* pixmap); -QBrush* QBrush_new7(QPixmap* pixmap); -QBrush* QBrush_new8(QImage* image); -QBrush* QBrush_new9(QBrush* brush); -QBrush* QBrush_new10(QGradient* gradient); -QBrush* QBrush_new11(QColor* color, int bs); -QBrush* QBrush_new12(int color, int bs); +void QBrush_new(QBrush** outptr_QBrush); +void QBrush_new2(int bs, QBrush** outptr_QBrush); +void QBrush_new3(QColor* color, QBrush** outptr_QBrush); +void QBrush_new4(int color, QBrush** outptr_QBrush); +void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush); +void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush); +void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush); +void QBrush_new8(QImage* image, QBrush** outptr_QBrush); +void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush); +void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush); +void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush); +void QBrush_new12(int color, int bs, QBrush** outptr_QBrush); void QBrush_OperatorAssign(QBrush* self, QBrush* brush); void QBrush_Swap(QBrush* self, QBrush* other); int QBrush_Style(const QBrush* self); @@ -80,15 +80,15 @@ bool QBrush_IsOpaque(const QBrush* self); bool QBrush_OperatorEqual(const QBrush* self, QBrush* b); bool QBrush_OperatorNotEqual(const QBrush* self, QBrush* b); bool QBrush_IsDetached(const QBrush* self); -void QBrush_Delete(QBrush* self); +void QBrush_Delete(QBrush* self, bool isSubclass); -QBrushData* QBrushData_new(QBrushData* param1); +void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData); void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1); -void QBrushData_Delete(QBrushData* self); +void QBrushData_Delete(QBrushData* self, bool isSubclass); -QGradient* QGradient_new(); -QGradient* QGradient_new2(int param1); -QGradient* QGradient_new3(QGradient* param1); +void QGradient_new(QGradient** outptr_QGradient); +void QGradient_new2(int param1, QGradient** outptr_QGradient); +void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient); int QGradient_Type(const QGradient* self); void QGradient_SetSpread(QGradient* self, int spread); int QGradient_Spread(const QGradient* self); @@ -101,28 +101,28 @@ int QGradient_InterpolationMode(const QGradient* self); void QGradient_SetInterpolationMode(QGradient* self, int mode); bool QGradient_OperatorEqual(const QGradient* self, QGradient* gradient); bool QGradient_OperatorNotEqual(const QGradient* self, QGradient* other); -void QGradient_Delete(QGradient* self); +void QGradient_Delete(QGradient* self, bool isSubclass); -QLinearGradient* QLinearGradient_new(); -QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop); -QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop); -QLinearGradient* QLinearGradient_new4(QLinearGradient* param1); +void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); QPointF* QLinearGradient_Start(const QLinearGradient* self); void QLinearGradient_SetStart(QLinearGradient* self, QPointF* start); void QLinearGradient_SetStart2(QLinearGradient* self, double x, double y); QPointF* QLinearGradient_FinalStop(const QLinearGradient* self); void QLinearGradient_SetFinalStop(QLinearGradient* self, QPointF* stop); void QLinearGradient_SetFinalStop2(QLinearGradient* self, double x, double y); -void QLinearGradient_Delete(QLinearGradient* self); +void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass); -QRadialGradient* QRadialGradient_new(); -QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint); -QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy); -QRadialGradient* QRadialGradient_new4(QPointF* center, double radius); -QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius); -QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius); -QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius); -QRadialGradient* QRadialGradient_new8(QRadialGradient* param1); +void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); QPointF* QRadialGradient_Center(const QRadialGradient* self); void QRadialGradient_SetCenter(QRadialGradient* self, QPointF* center); void QRadialGradient_SetCenter2(QRadialGradient* self, double x, double y); @@ -135,22 +135,22 @@ double QRadialGradient_CenterRadius(const QRadialGradient* self); void QRadialGradient_SetCenterRadius(QRadialGradient* self, double radius); double QRadialGradient_FocalRadius(const QRadialGradient* self); void QRadialGradient_SetFocalRadius(QRadialGradient* self, double radius); -void QRadialGradient_Delete(QRadialGradient* self); +void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass); -QConicalGradient* QConicalGradient_new(); -QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle); -QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle); -QConicalGradient* QConicalGradient_new4(QConicalGradient* param1); +void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); QPointF* QConicalGradient_Center(const QConicalGradient* self); void QConicalGradient_SetCenter(QConicalGradient* self, QPointF* center); void QConicalGradient_SetCenter2(QConicalGradient* self, double x, double y); double QConicalGradient_Angle(const QConicalGradient* self); void QConicalGradient_SetAngle(QConicalGradient* self, double angle); -void QConicalGradient_Delete(QConicalGradient* self); +void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass); -QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1); +void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData); void QGradient__QGradientData_OperatorAssign(QGradient__QGradientData* self, QGradient__QGradientData* param1); -void QGradient__QGradientData_Delete(QGradient__QGradientData* self); +void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbuffer.cpp b/qt/gen_qbuffer.cpp index ff304707..d8ee7187 100644 --- a/qt/gen_qbuffer.cpp +++ b/qt/gen_qbuffer.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include @@ -9,12 +11,455 @@ #include "gen_qbuffer.h" #include "_cgo_export.h" -QBuffer* QBuffer_new() { - return new QBuffer(); +class MiqtVirtualQBuffer : public virtual QBuffer { +public: + + MiqtVirtualQBuffer(): QBuffer() {}; + MiqtVirtualQBuffer(QObject* parent): QBuffer(parent) {}; + + virtual ~MiqtVirtualQBuffer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode openMode) override { + if (handle__Open == 0) { + return QBuffer::open(openMode); + } + + QIODevice::OpenMode openMode_ret = openMode; + int sigval1 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QBuffer_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int openMode) { + + return QBuffer::open(static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QBuffer::close(); + return; + } + + + miqt_exec_callback_QBuffer_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QBuffer::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QBuffer::size(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QBuffer::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QBuffer::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QBuffer::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 off) override { + if (handle__Seek == 0) { + return QBuffer::seek(off); + } + + qint64 off_ret = off; + long long sigval1 = static_cast(off_ret); + + bool callback_return_value = miqt_exec_callback_QBuffer_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long off) { + + return QBuffer::seek(static_cast(off)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QBuffer::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QBuffer::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QBuffer::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QBuffer::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& param1) override { + if (handle__ConnectNotify == 0) { + QBuffer::connectNotify(param1); + return; + } + + const QMetaMethod& param1_ret = param1; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(¶m1_ret); + + miqt_exec_callback_QBuffer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* param1) { + + QBuffer::connectNotify(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& param1) override { + if (handle__DisconnectNotify == 0) { + QBuffer::disconnectNotify(param1); + return; + } + + const QMetaMethod& param1_ret = param1; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(¶m1_ret); + + miqt_exec_callback_QBuffer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* param1) { + + QBuffer::disconnectNotify(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QBuffer::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QBuffer::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QBuffer::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QBuffer::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QBuffer::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QBuffer::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QBuffer::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QBuffer::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QBuffer::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QBuffer::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QBuffer::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QBuffer::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QBuffer::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QBuffer_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QBuffer::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QBuffer::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QBuffer_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QBuffer::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QBuffer::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QBuffer::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(); + *outptr_QBuffer = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QBuffer* QBuffer_new2(QObject* parent) { - return new QBuffer(parent); +void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(parent); + *outptr_QBuffer = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QBuffer_MetaObject(const QBuffer* self) { @@ -157,7 +602,155 @@ struct miqt_string QBuffer_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QBuffer_Delete(QBuffer* self) { - delete self; +void QBuffer_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Open = slot; +} + +bool QBuffer_virtualbase_Open(void* self, int openMode) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Open(openMode); +} + +void QBuffer_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Close = slot; +} + +void QBuffer_virtualbase_Close(void* self) { + ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Close(); +} + +void QBuffer_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Size = slot; +} + +long long QBuffer_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_Size(); +} + +void QBuffer_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Pos = slot; +} + +long long QBuffer_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_Pos(); +} + +void QBuffer_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Seek = slot; +} + +bool QBuffer_virtualbase_Seek(void* self, long long off) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Seek(off); +} + +void QBuffer_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__AtEnd = slot; +} + +bool QBuffer_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_AtEnd(); +} + +void QBuffer_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__CanReadLine = slot; +} + +bool QBuffer_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_CanReadLine(); +} + +void QBuffer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__ConnectNotify = slot; +} + +void QBuffer_virtualbase_ConnectNotify(void* self, QMetaMethod* param1) { + ( (MiqtVirtualQBuffer*)(self) )->virtualbase_ConnectNotify(param1); +} + +void QBuffer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__DisconnectNotify = slot; +} + +void QBuffer_virtualbase_DisconnectNotify(void* self, QMetaMethod* param1) { + ( (MiqtVirtualQBuffer*)(self) )->virtualbase_DisconnectNotify(param1); +} + +void QBuffer_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__ReadData = slot; +} + +long long QBuffer_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QBuffer_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__WriteData = slot; +} + +long long QBuffer_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QBuffer_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__IsSequential = slot; +} + +bool QBuffer_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_IsSequential(); +} + +void QBuffer_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Reset = slot; +} + +bool QBuffer_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Reset(); +} + +void QBuffer_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__BytesAvailable = slot; +} + +long long QBuffer_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_BytesAvailable(); +} + +void QBuffer_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__BytesToWrite = slot; +} + +long long QBuffer_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_BytesToWrite(); +} + +void QBuffer_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QBuffer_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QBuffer_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QBuffer_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QBuffer_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__ReadLineData = slot; +} + +long long QBuffer_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QBuffer_Delete(QBuffer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbuffer.go b/qt/gen_qbuffer.go index 979e8639..a3412d08 100644 --- a/qt/gen_qbuffer.go +++ b/qt/gen_qbuffer.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QBuffer struct { - h *C.QBuffer + h *C.QBuffer + isSubclass bool *QIODevice } @@ -32,27 +34,47 @@ func (this *QBuffer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQBuffer(h *C.QBuffer) *QBuffer { +// newQBuffer constructs the type using only CGO pointers. +func newQBuffer(h *C.QBuffer, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QBuffer { if h == nil { return nil } - return &QBuffer{h: h, QIODevice: UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QBuffer{h: h, + QIODevice: newQIODevice(h_QIODevice, h_QObject)} } -func UnsafeNewQBuffer(h unsafe.Pointer) *QBuffer { - return newQBuffer((*C.QBuffer)(h)) +// UnsafeNewQBuffer constructs the type using only unsafe pointers. +func UnsafeNewQBuffer(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QBuffer { + if h == nil { + return nil + } + + return &QBuffer{h: (*C.QBuffer)(h), + QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject)} } // NewQBuffer constructs a new QBuffer object. func NewQBuffer() *QBuffer { - ret := C.QBuffer_new() - return newQBuffer(ret) + var outptr_QBuffer *C.QBuffer = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QBuffer_new(&outptr_QBuffer, &outptr_QIODevice, &outptr_QObject) + ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQBuffer2 constructs a new QBuffer object. func NewQBuffer2(parent *QObject) *QBuffer { - ret := C.QBuffer_new2(parent.cPointer()) - return newQBuffer(ret) + var outptr_QBuffer *C.QBuffer = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QBuffer_new2(parent.cPointer(), &outptr_QBuffer, &outptr_QIODevice, &outptr_QObject) + ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QBuffer) MetaObject() *QMetaObject { @@ -189,9 +211,441 @@ func QBuffer_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QBuffer) callVirtualBase_Open(openMode QIODevice__OpenModeFlag) bool { + + return (bool)(C.QBuffer_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(openMode))) + +} +func (this *QBuffer) OnOpen(slot func(super func(openMode QIODevice__OpenModeFlag) bool, openMode QIODevice__OpenModeFlag) bool) { + C.QBuffer_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Open +func miqt_exec_callback_QBuffer_Open(self *C.QBuffer, cb C.intptr_t, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(openMode QIODevice__OpenModeFlag) bool, openMode QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODevice__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Close() { + + C.QBuffer_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QBuffer) OnClose(slot func(super func())) { + C.QBuffer_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Close +func miqt_exec_callback_QBuffer_Close(self *C.QBuffer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QBuffer{h: self}).callVirtualBase_Close) + +} + +func (this *QBuffer) callVirtualBase_Size() int64 { + + return (int64)(C.QBuffer_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnSize(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Size +func miqt_exec_callback_QBuffer_Size(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Pos() int64 { + + return (int64)(C.QBuffer_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnPos(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Pos +func miqt_exec_callback_QBuffer_Pos(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Seek(off int64) bool { + + return (bool)(C.QBuffer_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(off))) + +} +func (this *QBuffer) OnSeek(slot func(super func(off int64) bool, off int64) bool) { + C.QBuffer_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Seek +func miqt_exec_callback_QBuffer_Seek(self *C.QBuffer, cb C.intptr_t, off C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(off int64) bool, off int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(off) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_AtEnd() bool { + + return (bool)(C.QBuffer_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnAtEnd(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_AtEnd +func miqt_exec_callback_QBuffer_AtEnd(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QBuffer_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnCanReadLine(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_CanReadLine +func miqt_exec_callback_QBuffer_CanReadLine(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_ConnectNotify(param1 *QMetaMethod) { + + C.QBuffer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QBuffer) OnConnectNotify(slot func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) { + C.QBuffer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_ConnectNotify +func miqt_exec_callback_QBuffer_ConnectNotify(self *C.QBuffer, cb C.intptr_t, param1 *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(param1)) + + gofunc((&QBuffer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QBuffer) callVirtualBase_DisconnectNotify(param1 *QMetaMethod) { + + C.QBuffer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QBuffer) OnDisconnectNotify(slot func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) { + C.QBuffer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_DisconnectNotify +func miqt_exec_callback_QBuffer_DisconnectNotify(self *C.QBuffer, cb C.intptr_t, param1 *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(param1)) + + gofunc((&QBuffer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +func (this *QBuffer) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QBuffer_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QBuffer) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QBuffer_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_ReadData +func miqt_exec_callback_QBuffer_ReadData(self *C.QBuffer, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QBuffer_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QBuffer) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QBuffer_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_WriteData +func miqt_exec_callback_QBuffer_WriteData(self *C.QBuffer, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_IsSequential() bool { + + return (bool)(C.QBuffer_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnIsSequential(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_IsSequential +func miqt_exec_callback_QBuffer_IsSequential(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Reset() bool { + + return (bool)(C.QBuffer_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnReset(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Reset +func miqt_exec_callback_QBuffer_Reset(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QBuffer_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnBytesAvailable(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_BytesAvailable +func miqt_exec_callback_QBuffer_BytesAvailable(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QBuffer_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnBytesToWrite(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_BytesToWrite +func miqt_exec_callback_QBuffer_BytesToWrite(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QBuffer_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QBuffer) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QBuffer_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_WaitForReadyRead +func miqt_exec_callback_QBuffer_WaitForReadyRead(self *C.QBuffer, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QBuffer_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QBuffer) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QBuffer_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_WaitForBytesWritten +func miqt_exec_callback_QBuffer_WaitForBytesWritten(self *C.QBuffer, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QBuffer_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QBuffer) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QBuffer_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_ReadLineData +func miqt_exec_callback_QBuffer_ReadLineData(self *C.QBuffer, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QBuffer) Delete() { - C.QBuffer_Delete(this.h) + C.QBuffer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbuffer.h b/qt/gen_qbuffer.h index 2ddfe6ab..6416e492 100644 --- a/qt/gen_qbuffer.h +++ b/qt/gen_qbuffer.h @@ -17,17 +17,21 @@ extern "C" { #ifdef __cplusplus class QBuffer; class QByteArray; +class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; #else typedef struct QBuffer QBuffer; typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QBuffer* QBuffer_new(); -QBuffer* QBuffer_new2(QObject* parent); +void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QBuffer_MetaObject(const QBuffer* self); void* QBuffer_Metacast(QBuffer* self, const char* param1); struct miqt_string QBuffer_Tr(const char* s); @@ -44,11 +48,51 @@ long long QBuffer_Pos(const QBuffer* self); bool QBuffer_Seek(QBuffer* self, long long off); bool QBuffer_AtEnd(const QBuffer* self); bool QBuffer_CanReadLine(const QBuffer* self); +void QBuffer_ConnectNotify(QBuffer* self, QMetaMethod* param1); +void QBuffer_DisconnectNotify(QBuffer* self, QMetaMethod* param1); +long long QBuffer_ReadData(QBuffer* self, char* data, long long maxlen); +long long QBuffer_WriteData(QBuffer* self, const char* data, long long lenVal); struct miqt_string QBuffer_Tr2(const char* s, const char* c); struct miqt_string QBuffer_Tr3(const char* s, const char* c, int n); struct miqt_string QBuffer_TrUtf82(const char* s, const char* c); struct miqt_string QBuffer_TrUtf83(const char* s, const char* c, int n); -void QBuffer_Delete(QBuffer* self); +void QBuffer_override_virtual_Open(void* self, intptr_t slot); +bool QBuffer_virtualbase_Open(void* self, int openMode); +void QBuffer_override_virtual_Close(void* self, intptr_t slot); +void QBuffer_virtualbase_Close(void* self); +void QBuffer_override_virtual_Size(void* self, intptr_t slot); +long long QBuffer_virtualbase_Size(const void* self); +void QBuffer_override_virtual_Pos(void* self, intptr_t slot); +long long QBuffer_virtualbase_Pos(const void* self); +void QBuffer_override_virtual_Seek(void* self, intptr_t slot); +bool QBuffer_virtualbase_Seek(void* self, long long off); +void QBuffer_override_virtual_AtEnd(void* self, intptr_t slot); +bool QBuffer_virtualbase_AtEnd(const void* self); +void QBuffer_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QBuffer_virtualbase_CanReadLine(const void* self); +void QBuffer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QBuffer_virtualbase_ConnectNotify(void* self, QMetaMethod* param1); +void QBuffer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QBuffer_virtualbase_DisconnectNotify(void* self, QMetaMethod* param1); +void QBuffer_override_virtual_ReadData(void* self, intptr_t slot); +long long QBuffer_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QBuffer_override_virtual_WriteData(void* self, intptr_t slot); +long long QBuffer_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QBuffer_override_virtual_IsSequential(void* self, intptr_t slot); +bool QBuffer_virtualbase_IsSequential(const void* self); +void QBuffer_override_virtual_Reset(void* self, intptr_t slot); +bool QBuffer_virtualbase_Reset(void* self); +void QBuffer_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QBuffer_virtualbase_BytesAvailable(const void* self); +void QBuffer_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QBuffer_virtualbase_BytesToWrite(const void* self); +void QBuffer_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QBuffer_virtualbase_WaitForReadyRead(void* self, int msecs); +void QBuffer_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QBuffer_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QBuffer_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QBuffer_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QBuffer_Delete(QBuffer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbuttongroup.cpp b/qt/gen_qbuttongroup.cpp index 3ec2f8bd..2c2b97b4 100644 --- a/qt/gen_qbuttongroup.cpp +++ b/qt/gen_qbuttongroup.cpp @@ -1,21 +1,210 @@ #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qbuttongroup.h" #include "_cgo_export.h" -QButtonGroup* QButtonGroup_new() { - return new QButtonGroup(); +class MiqtVirtualQButtonGroup : public virtual QButtonGroup { +public: + + MiqtVirtualQButtonGroup(): QButtonGroup() {}; + MiqtVirtualQButtonGroup(QObject* parent): QButtonGroup(parent) {}; + + virtual ~MiqtVirtualQButtonGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QButtonGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QButtonGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QButtonGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QButtonGroup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QButtonGroup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QButtonGroup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QButtonGroup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QButtonGroup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QButtonGroup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QButtonGroup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QButtonGroup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QButtonGroup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QButtonGroup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QButtonGroup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QButtonGroup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QButtonGroup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QButtonGroup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QButtonGroup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QButtonGroup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QButtonGroup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QButtonGroup::disconnectNotify(*signal); + + } + +}; + +void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { + MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(); + *outptr_QButtonGroup = ret; + *outptr_QObject = static_cast(ret); } -QButtonGroup* QButtonGroup_new2(QObject* parent) { - return new QButtonGroup(parent); +void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { + MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(parent); + *outptr_QButtonGroup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self) { @@ -102,7 +291,7 @@ void QButtonGroup_ButtonClicked(QButtonGroup* self, QAbstractButton* param1) { } void QButtonGroup_connect_ButtonClicked(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonClicked), self, [=](QAbstractButton* param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonClicked), self, [=](QAbstractButton* param1) { QAbstractButton* sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonClicked(slot, sigval1); }); @@ -113,7 +302,7 @@ void QButtonGroup_ButtonPressed(QButtonGroup* self, QAbstractButton* param1) { } void QButtonGroup_connect_ButtonPressed(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonPressed), self, [=](QAbstractButton* param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonPressed), self, [=](QAbstractButton* param1) { QAbstractButton* sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonPressed(slot, sigval1); }); @@ -124,7 +313,7 @@ void QButtonGroup_ButtonReleased(QButtonGroup* self, QAbstractButton* param1) { } void QButtonGroup_connect_ButtonReleased(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonReleased), self, [=](QAbstractButton* param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonReleased), self, [=](QAbstractButton* param1) { QAbstractButton* sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonReleased(slot, sigval1); }); @@ -135,7 +324,7 @@ void QButtonGroup_ButtonToggled(QButtonGroup* self, QAbstractButton* param1, boo } void QButtonGroup_connect_ButtonToggled(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonToggled), self, [=](QAbstractButton* param1, bool param2) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonToggled), self, [=](QAbstractButton* param1, bool param2) { QAbstractButton* sigval1 = param1; bool sigval2 = param2; miqt_exec_callback_QButtonGroup_ButtonToggled(slot, sigval1, sigval2); @@ -147,7 +336,7 @@ void QButtonGroup_IdClicked(QButtonGroup* self, int param1) { } void QButtonGroup_connect_IdClicked(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idClicked), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idClicked), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_IdClicked(slot, sigval1); }); @@ -158,7 +347,7 @@ void QButtonGroup_IdPressed(QButtonGroup* self, int param1) { } void QButtonGroup_connect_IdPressed(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idPressed), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idPressed), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_IdPressed(slot, sigval1); }); @@ -169,7 +358,7 @@ void QButtonGroup_IdReleased(QButtonGroup* self, int param1) { } void QButtonGroup_connect_IdReleased(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idReleased), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idReleased), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_IdReleased(slot, sigval1); }); @@ -180,7 +369,7 @@ void QButtonGroup_IdToggled(QButtonGroup* self, int param1, bool param2) { } void QButtonGroup_connect_IdToggled(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idToggled), self, [=](int param1, bool param2) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idToggled), self, [=](int param1, bool param2) { int sigval1 = param1; bool sigval2 = param2; miqt_exec_callback_QButtonGroup_IdToggled(slot, sigval1, sigval2); @@ -192,7 +381,7 @@ void QButtonGroup_ButtonClickedWithInt(QButtonGroup* self, int param1) { } void QButtonGroup_connect_ButtonClickedWithInt(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonClicked), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonClicked), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonClickedWithInt(slot, sigval1); }); @@ -203,7 +392,7 @@ void QButtonGroup_ButtonPressedWithInt(QButtonGroup* self, int param1) { } void QButtonGroup_connect_ButtonPressedWithInt(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonPressed), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonPressed), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonPressedWithInt(slot, sigval1); }); @@ -214,7 +403,7 @@ void QButtonGroup_ButtonReleasedWithInt(QButtonGroup* self, int param1) { } void QButtonGroup_connect_ButtonReleasedWithInt(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonReleased), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonReleased), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonReleasedWithInt(slot, sigval1); }); @@ -225,7 +414,7 @@ void QButtonGroup_ButtonToggled2(QButtonGroup* self, int param1, bool param2) { } void QButtonGroup_connect_ButtonToggled2(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonToggled), self, [=](int param1, bool param2) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonToggled), self, [=](int param1, bool param2) { int sigval1 = param1; bool sigval2 = param2; miqt_exec_callback_QButtonGroup_ButtonToggled2(slot, sigval1, sigval2); @@ -280,7 +469,67 @@ void QButtonGroup_AddButton2(QButtonGroup* self, QAbstractButton* param1, int id self->addButton(param1, static_cast(id)); } -void QButtonGroup_Delete(QButtonGroup* self) { - delete self; +void QButtonGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__Event = slot; +} + +bool QButtonGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_Event(event); +} + +void QButtonGroup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__EventFilter = slot; +} + +bool QButtonGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QButtonGroup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__TimerEvent = slot; +} + +void QButtonGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_TimerEvent(event); +} + +void QButtonGroup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__ChildEvent = slot; +} + +void QButtonGroup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_ChildEvent(event); +} + +void QButtonGroup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__CustomEvent = slot; +} + +void QButtonGroup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_CustomEvent(event); +} + +void QButtonGroup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__ConnectNotify = slot; +} + +void QButtonGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QButtonGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__DisconnectNotify = slot; +} + +void QButtonGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QButtonGroup_Delete(QButtonGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbuttongroup.go b/qt/gen_qbuttongroup.go index ed175119..ea0bab59 100644 --- a/qt/gen_qbuttongroup.go +++ b/qt/gen_qbuttongroup.go @@ -15,7 +15,8 @@ import ( ) type QButtonGroup struct { - h *C.QButtonGroup + h *C.QButtonGroup + isSubclass bool *QObject } @@ -33,27 +34,45 @@ func (this *QButtonGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQButtonGroup(h *C.QButtonGroup) *QButtonGroup { +// newQButtonGroup constructs the type using only CGO pointers. +func newQButtonGroup(h *C.QButtonGroup, h_QObject *C.QObject) *QButtonGroup { if h == nil { return nil } - return &QButtonGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QButtonGroup{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQButtonGroup(h unsafe.Pointer) *QButtonGroup { - return newQButtonGroup((*C.QButtonGroup)(h)) +// UnsafeNewQButtonGroup constructs the type using only unsafe pointers. +func UnsafeNewQButtonGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QButtonGroup { + if h == nil { + return nil + } + + return &QButtonGroup{h: (*C.QButtonGroup)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQButtonGroup constructs a new QButtonGroup object. func NewQButtonGroup() *QButtonGroup { - ret := C.QButtonGroup_new() - return newQButtonGroup(ret) + var outptr_QButtonGroup *C.QButtonGroup = nil + var outptr_QObject *C.QObject = nil + + C.QButtonGroup_new(&outptr_QButtonGroup, &outptr_QObject) + ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQButtonGroup2 constructs a new QButtonGroup object. func NewQButtonGroup2(parent *QObject) *QButtonGroup { - ret := C.QButtonGroup_new2(parent.cPointer()) - return newQButtonGroup(ret) + var outptr_QButtonGroup *C.QButtonGroup = nil + var outptr_QObject *C.QObject = nil + + C.QButtonGroup_new2(parent.cPointer(), &outptr_QButtonGroup, &outptr_QObject) + ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QButtonGroup) MetaObject() *QMetaObject { @@ -105,17 +124,17 @@ func (this *QButtonGroup) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } func (this *QButtonGroup) CheckedButton() *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_CheckedButton(this.h))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_CheckedButton(this.h)), nil, nil, nil) } func (this *QButtonGroup) Button(id int) *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_Button(this.h, (C.int)(id)))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_Button(this.h, (C.int)(id))), nil, nil, nil) } func (this *QButtonGroup) SetId(button *QAbstractButton, id int) { @@ -145,7 +164,7 @@ func miqt_exec_callback_QButtonGroup_ButtonClicked(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -165,7 +184,7 @@ func miqt_exec_callback_QButtonGroup_ButtonPressed(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -185,7 +204,7 @@ func miqt_exec_callback_QButtonGroup_ButtonReleased(cb C.intptr_t, param1 *C.QAb } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -205,7 +224,7 @@ func miqt_exec_callback_QButtonGroup_ButtonToggled(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) slotval2 := (bool)(param2) gofunc(slotval1, slotval2) @@ -423,9 +442,175 @@ func (this *QButtonGroup) AddButton2(param1 *QAbstractButton, id int) { C.QButtonGroup_AddButton2(this.h, param1.cPointer(), (C.int)(id)) } +func (this *QButtonGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QButtonGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QButtonGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QButtonGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_Event +func miqt_exec_callback_QButtonGroup_Event(self *C.QButtonGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QButtonGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QButtonGroup) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QButtonGroup_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QButtonGroup) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QButtonGroup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_EventFilter +func miqt_exec_callback_QButtonGroup_EventFilter(self *C.QButtonGroup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QButtonGroup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QButtonGroup) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QButtonGroup_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QButtonGroup) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QButtonGroup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_TimerEvent +func miqt_exec_callback_QButtonGroup_TimerEvent(self *C.QButtonGroup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QButtonGroup_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QButtonGroup) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QButtonGroup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_ChildEvent +func miqt_exec_callback_QButtonGroup_ChildEvent(self *C.QButtonGroup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_CustomEvent(event *QEvent) { + + C.QButtonGroup_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QButtonGroup) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QButtonGroup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_CustomEvent +func miqt_exec_callback_QButtonGroup_CustomEvent(self *C.QButtonGroup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QButtonGroup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QButtonGroup) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QButtonGroup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_ConnectNotify +func miqt_exec_callback_QButtonGroup_ConnectNotify(self *C.QButtonGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QButtonGroup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QButtonGroup) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QButtonGroup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_DisconnectNotify +func miqt_exec_callback_QButtonGroup_DisconnectNotify(self *C.QButtonGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QButtonGroup) Delete() { - C.QButtonGroup_Delete(this.h) + C.QButtonGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbuttongroup.h b/qt/gen_qbuttongroup.h index 3c720624..e68fe82f 100644 --- a/qt/gen_qbuttongroup.h +++ b/qt/gen_qbuttongroup.h @@ -17,17 +17,25 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QButtonGroup; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAbstractButton QAbstractButton; typedef struct QButtonGroup QButtonGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QButtonGroup* QButtonGroup_new(); -QButtonGroup* QButtonGroup_new2(QObject* parent); +void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); +void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self); void* QButtonGroup_Metacast(QButtonGroup* self, const char* param1); struct miqt_string QButtonGroup_Tr(const char* s); @@ -71,7 +79,21 @@ struct miqt_string QButtonGroup_Tr3(const char* s, const char* c, int n); struct miqt_string QButtonGroup_TrUtf82(const char* s, const char* c); struct miqt_string QButtonGroup_TrUtf83(const char* s, const char* c, int n); void QButtonGroup_AddButton2(QButtonGroup* self, QAbstractButton* param1, int id); -void QButtonGroup_Delete(QButtonGroup* self); +void QButtonGroup_override_virtual_Event(void* self, intptr_t slot); +bool QButtonGroup_virtualbase_Event(void* self, QEvent* event); +void QButtonGroup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QButtonGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QButtonGroup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QButtonGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QButtonGroup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QButtonGroup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QButtonGroup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QButtonGroup_virtualbase_CustomEvent(void* self, QEvent* event); +void QButtonGroup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QButtonGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QButtonGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QButtonGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QButtonGroup_Delete(QButtonGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qbytearraymatcher.cpp b/qt/gen_qbytearraymatcher.cpp index a7b99110..900b9622 100644 --- a/qt/gen_qbytearraymatcher.cpp +++ b/qt/gen_qbytearraymatcher.cpp @@ -5,21 +5,25 @@ #include "gen_qbytearraymatcher.h" #include "_cgo_export.h" -QByteArrayMatcher* QByteArrayMatcher_new() { - return new QByteArrayMatcher(); +void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern) { +void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { QByteArray pattern_QByteArray(pattern.data, pattern.len); - return new QByteArrayMatcher(pattern_QByteArray); + QByteArrayMatcher* ret = new QByteArrayMatcher(pattern_QByteArray); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new3(const char* pattern, int length) { - return new QByteArrayMatcher(pattern, static_cast(length)); +void QByteArrayMatcher_new3(const char* pattern, int length, QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(pattern, static_cast(length)); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new4(QByteArrayMatcher* other) { - return new QByteArrayMatcher(*other); +void QByteArrayMatcher_new4(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(*other); + *outptr_QByteArrayMatcher = ret; } void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other) { @@ -58,11 +62,19 @@ int QByteArrayMatcher_IndexIn3(const QByteArrayMatcher* self, const char* str, i return self->indexIn(str, static_cast(lenVal), static_cast(from)); } -void QByteArrayMatcher_Delete(QByteArrayMatcher* self) { - delete self; +void QByteArrayMatcher_Delete(QByteArrayMatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QStaticByteArrayMatcherBase_Delete(QStaticByteArrayMatcherBase* self) { - delete self; +void QStaticByteArrayMatcherBase_Delete(QStaticByteArrayMatcherBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qbytearraymatcher.go b/qt/gen_qbytearraymatcher.go index 572b5ece..c8cf05aa 100644 --- a/qt/gen_qbytearraymatcher.go +++ b/qt/gen_qbytearraymatcher.go @@ -14,7 +14,8 @@ import ( ) type QByteArrayMatcher struct { - h *C.QByteArrayMatcher + h *C.QByteArrayMatcher + isSubclass bool } func (this *QByteArrayMatcher) cPointer() *C.QByteArrayMatcher { @@ -31,6 +32,7 @@ func (this *QByteArrayMatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQByteArrayMatcher constructs the type using only CGO pointers. func newQByteArrayMatcher(h *C.QByteArrayMatcher) *QByteArrayMatcher { if h == nil { return nil @@ -38,14 +40,23 @@ func newQByteArrayMatcher(h *C.QByteArrayMatcher) *QByteArrayMatcher { return &QByteArrayMatcher{h: h} } +// UnsafeNewQByteArrayMatcher constructs the type using only unsafe pointers. func UnsafeNewQByteArrayMatcher(h unsafe.Pointer) *QByteArrayMatcher { - return newQByteArrayMatcher((*C.QByteArrayMatcher)(h)) + if h == nil { + return nil + } + + return &QByteArrayMatcher{h: (*C.QByteArrayMatcher)(h)} } // NewQByteArrayMatcher constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher() *QByteArrayMatcher { - ret := C.QByteArrayMatcher_new() - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new(&outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher2 constructs a new QByteArrayMatcher object. @@ -53,22 +64,34 @@ func NewQByteArrayMatcher2(pattern []byte) *QByteArrayMatcher { pattern_alias := C.struct_miqt_string{} pattern_alias.data = (*C.char)(unsafe.Pointer(&pattern[0])) pattern_alias.len = C.size_t(len(pattern)) - ret := C.QByteArrayMatcher_new2(pattern_alias) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new2(pattern_alias, &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher3 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher3(pattern string, length int) *QByteArrayMatcher { pattern_Cstring := C.CString(pattern) defer C.free(unsafe.Pointer(pattern_Cstring)) - ret := C.QByteArrayMatcher_new3(pattern_Cstring, (C.int)(length)) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new3(pattern_Cstring, (C.int)(length), &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher4 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher4(other *QByteArrayMatcher) *QByteArrayMatcher { - ret := C.QByteArrayMatcher_new4(other.cPointer()) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new4(other.cPointer(), &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } func (this *QByteArrayMatcher) OperatorAssign(other *QByteArrayMatcher) { @@ -117,7 +140,7 @@ func (this *QByteArrayMatcher) IndexIn3(str string, lenVal int, from int) int { // Delete this object from C++ memory. func (this *QByteArrayMatcher) Delete() { - C.QByteArrayMatcher_Delete(this.h) + C.QByteArrayMatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -130,7 +153,8 @@ func (this *QByteArrayMatcher) GoGC() { } type QStaticByteArrayMatcherBase struct { - h *C.QStaticByteArrayMatcherBase + h *C.QStaticByteArrayMatcherBase + isSubclass bool } func (this *QStaticByteArrayMatcherBase) cPointer() *C.QStaticByteArrayMatcherBase { @@ -147,6 +171,7 @@ func (this *QStaticByteArrayMatcherBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStaticByteArrayMatcherBase constructs the type using only CGO pointers. func newQStaticByteArrayMatcherBase(h *C.QStaticByteArrayMatcherBase) *QStaticByteArrayMatcherBase { if h == nil { return nil @@ -154,13 +179,18 @@ func newQStaticByteArrayMatcherBase(h *C.QStaticByteArrayMatcherBase) *QStaticBy return &QStaticByteArrayMatcherBase{h: h} } +// UnsafeNewQStaticByteArrayMatcherBase constructs the type using only unsafe pointers. func UnsafeNewQStaticByteArrayMatcherBase(h unsafe.Pointer) *QStaticByteArrayMatcherBase { - return newQStaticByteArrayMatcherBase((*C.QStaticByteArrayMatcherBase)(h)) + if h == nil { + return nil + } + + return &QStaticByteArrayMatcherBase{h: (*C.QStaticByteArrayMatcherBase)(h)} } // Delete this object from C++ memory. func (this *QStaticByteArrayMatcherBase) Delete() { - C.QStaticByteArrayMatcherBase_Delete(this.h) + C.QStaticByteArrayMatcherBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qbytearraymatcher.h b/qt/gen_qbytearraymatcher.h index 68928f33..1eb6bedb 100644 --- a/qt/gen_qbytearraymatcher.h +++ b/qt/gen_qbytearraymatcher.h @@ -24,10 +24,10 @@ typedef struct QByteArrayMatcher QByteArrayMatcher; typedef struct QStaticByteArrayMatcherBase QStaticByteArrayMatcherBase; #endif -QByteArrayMatcher* QByteArrayMatcher_new(); -QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern); -QByteArrayMatcher* QByteArrayMatcher_new3(const char* pattern, int length); -QByteArrayMatcher* QByteArrayMatcher_new4(QByteArrayMatcher* other); +void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new3(const char* pattern, int length, QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new4(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher); void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other); void QByteArrayMatcher_SetPattern(QByteArrayMatcher* self, struct miqt_string pattern); int QByteArrayMatcher_IndexIn(const QByteArrayMatcher* self, struct miqt_string ba); @@ -35,9 +35,9 @@ int QByteArrayMatcher_IndexIn2(const QByteArrayMatcher* self, const char* str, i struct miqt_string QByteArrayMatcher_Pattern(const QByteArrayMatcher* self); int QByteArrayMatcher_IndexIn22(const QByteArrayMatcher* self, struct miqt_string ba, int from); int QByteArrayMatcher_IndexIn3(const QByteArrayMatcher* self, const char* str, int lenVal, int from); -void QByteArrayMatcher_Delete(QByteArrayMatcher* self); +void QByteArrayMatcher_Delete(QByteArrayMatcher* self, bool isSubclass); -void QStaticByteArrayMatcherBase_Delete(QStaticByteArrayMatcherBase* self); +void QStaticByteArrayMatcherBase_Delete(QStaticByteArrayMatcherBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcalendar.cpp b/qt/gen_qcalendar.cpp index fff3bb48..02092ed8 100644 --- a/qt/gen_qcalendar.cpp +++ b/qt/gen_qcalendar.cpp @@ -10,12 +10,14 @@ #include "gen_qcalendar.h" #include "_cgo_export.h" -QCalendar* QCalendar_new() { - return new QCalendar(); +void QCalendar_new(QCalendar** outptr_QCalendar) { + QCalendar* ret = new QCalendar(); + *outptr_QCalendar = ret; } -QCalendar* QCalendar_new2(int system) { - return new QCalendar(static_cast(system)); +void QCalendar_new2(int system, QCalendar** outptr_QCalendar) { + QCalendar* ret = new QCalendar(static_cast(system)); + *outptr_QCalendar = ret; } bool QCalendar_IsValid(const QCalendar* self) { @@ -239,31 +241,43 @@ struct miqt_string QCalendar_StandaloneWeekDayName3(const QCalendar* self, QLoca return _ms; } -void QCalendar_Delete(QCalendar* self) { - delete self; +void QCalendar_Delete(QCalendar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new() { - return new QCalendar::YearMonthDay(); +void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(); + *outptr_QCalendar__YearMonthDay = ret; } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y) { - return new QCalendar::YearMonthDay(static_cast(y)); +void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y)); + *outptr_QCalendar__YearMonthDay = ret; } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m) { - return new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); +void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); + *outptr_QCalendar__YearMonthDay = ret; } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d) { - return new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); +void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); + *outptr_QCalendar__YearMonthDay = ret; } bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self) { return self->isValid(); } -void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self) { - delete self; +void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcalendar.go b/qt/gen_qcalendar.go index 6f06c112..44c48898 100644 --- a/qt/gen_qcalendar.go +++ b/qt/gen_qcalendar.go @@ -32,7 +32,8 @@ const ( ) type QCalendar struct { - h *C.QCalendar + h *C.QCalendar + isSubclass bool } func (this *QCalendar) cPointer() *C.QCalendar { @@ -49,6 +50,7 @@ func (this *QCalendar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCalendar constructs the type using only CGO pointers. func newQCalendar(h *C.QCalendar) *QCalendar { if h == nil { return nil @@ -56,20 +58,33 @@ func newQCalendar(h *C.QCalendar) *QCalendar { return &QCalendar{h: h} } +// UnsafeNewQCalendar constructs the type using only unsafe pointers. func UnsafeNewQCalendar(h unsafe.Pointer) *QCalendar { - return newQCalendar((*C.QCalendar)(h)) + if h == nil { + return nil + } + + return &QCalendar{h: (*C.QCalendar)(h)} } // NewQCalendar constructs a new QCalendar object. func NewQCalendar() *QCalendar { - ret := C.QCalendar_new() - return newQCalendar(ret) + var outptr_QCalendar *C.QCalendar = nil + + C.QCalendar_new(&outptr_QCalendar) + ret := newQCalendar(outptr_QCalendar) + ret.isSubclass = true + return ret } // NewQCalendar2 constructs a new QCalendar object. func NewQCalendar2(system QCalendar__System) *QCalendar { - ret := C.QCalendar_new2((C.int)(system)) - return newQCalendar(ret) + var outptr_QCalendar *C.QCalendar = nil + + C.QCalendar_new2((C.int)(system), &outptr_QCalendar) + ret := newQCalendar(outptr_QCalendar) + ret.isSubclass = true + return ret } func (this *QCalendar) IsValid() bool { @@ -253,7 +268,7 @@ func (this *QCalendar) StandaloneWeekDayName3(locale *QLocale, day int, format Q // Delete this object from C++ memory. func (this *QCalendar) Delete() { - C.QCalendar_Delete(this.h) + C.QCalendar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -266,7 +281,8 @@ func (this *QCalendar) GoGC() { } type QCalendar__YearMonthDay struct { - h *C.QCalendar__YearMonthDay + h *C.QCalendar__YearMonthDay + isSubclass bool } func (this *QCalendar__YearMonthDay) cPointer() *C.QCalendar__YearMonthDay { @@ -283,6 +299,7 @@ func (this *QCalendar__YearMonthDay) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCalendar__YearMonthDay constructs the type using only CGO pointers. func newQCalendar__YearMonthDay(h *C.QCalendar__YearMonthDay) *QCalendar__YearMonthDay { if h == nil { return nil @@ -290,32 +307,53 @@ func newQCalendar__YearMonthDay(h *C.QCalendar__YearMonthDay) *QCalendar__YearMo return &QCalendar__YearMonthDay{h: h} } +// UnsafeNewQCalendar__YearMonthDay constructs the type using only unsafe pointers. func UnsafeNewQCalendar__YearMonthDay(h unsafe.Pointer) *QCalendar__YearMonthDay { - return newQCalendar__YearMonthDay((*C.QCalendar__YearMonthDay)(h)) + if h == nil { + return nil + } + + return &QCalendar__YearMonthDay{h: (*C.QCalendar__YearMonthDay)(h)} } // NewQCalendar__YearMonthDay constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay() *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new() - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new(&outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } // NewQCalendar__YearMonthDay2 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay2(y int) *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new2((C.int)(y)) - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new2((C.int)(y), &outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } // NewQCalendar__YearMonthDay3 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay3(y int, m int) *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m)) - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m), &outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } // NewQCalendar__YearMonthDay4 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay4(y int, m int, d int) *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d)) - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } func (this *QCalendar__YearMonthDay) IsValid() bool { @@ -324,7 +362,7 @@ func (this *QCalendar__YearMonthDay) IsValid() bool { // Delete this object from C++ memory. func (this *QCalendar__YearMonthDay) Delete() { - C.QCalendar__YearMonthDay_Delete(this.h) + C.QCalendar__YearMonthDay_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcalendar.h b/qt/gen_qcalendar.h index 83c4e86d..88153c6a 100644 --- a/qt/gen_qcalendar.h +++ b/qt/gen_qcalendar.h @@ -30,8 +30,8 @@ typedef struct QDate QDate; typedef struct QLocale QLocale; #endif -QCalendar* QCalendar_new(); -QCalendar* QCalendar_new2(int system); +void QCalendar_new(QCalendar** outptr_QCalendar); +void QCalendar_new2(int system, QCalendar** outptr_QCalendar); bool QCalendar_IsValid(const QCalendar* self); int QCalendar_DaysInMonth(const QCalendar* self, int month); int QCalendar_DaysInYear(const QCalendar* self, int year); @@ -64,14 +64,14 @@ struct miqt_string QCalendar_StandaloneMonthName3(const QCalendar* self, QLocale struct miqt_string QCalendar_StandaloneMonthName4(const QCalendar* self, QLocale* locale, int month, int year, int format); struct miqt_string QCalendar_WeekDayName3(const QCalendar* self, QLocale* locale, int day, int format); struct miqt_string QCalendar_StandaloneWeekDayName3(const QCalendar* self, QLocale* locale, int day, int format); -void QCalendar_Delete(QCalendar* self); +void QCalendar_Delete(QCalendar* self, bool isSubclass); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new(); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d); +void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self); -void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self); +void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcalendarwidget.cpp b/qt/gen_qcalendarwidget.cpp index 3a91e67e..557e818f 100644 --- a/qt/gen_qcalendarwidget.cpp +++ b/qt/gen_qcalendarwidget.cpp @@ -1,24 +1,1098 @@ +#include +#include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include #include +#include +#include #include #include #include "gen_qcalendarwidget.h" #include "_cgo_export.h" -QCalendarWidget* QCalendarWidget_new(QWidget* parent) { - return new QCalendarWidget(parent); +class MiqtVirtualQCalendarWidget : public virtual QCalendarWidget { +public: + + MiqtVirtualQCalendarWidget(QWidget* parent): QCalendarWidget(parent) {}; + MiqtVirtualQCalendarWidget(): QCalendarWidget() {}; + + virtual ~MiqtVirtualQCalendarWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCalendarWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCalendarWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCalendarWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QCalendarWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCalendarWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QCalendarWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QCalendarWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QCalendarWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QCalendarWidget::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QCalendarWidget::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QCalendarWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QCalendarWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QCalendarWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QCalendarWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QCalendarWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QCalendarWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintCell = 0; + + // Subclass to allow providing a Go implementation + virtual void paintCell(QPainter* painter, const QRect& rect, const QDate& date) const override { + if (handle__PaintCell == 0) { + QCalendarWidget::paintCell(painter, rect, date); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + const QDate& date_ret = date; + // Cast returned reference into pointer + QDate* sigval3 = const_cast(&date_ret); + + miqt_exec_callback_QCalendarWidget_PaintCell(const_cast(this), handle__PaintCell, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintCell(QPainter* painter, QRect* rect, QDate* date) const { + + QCalendarWidget::paintCell(painter, *rect, *date); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QCalendarWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QCalendarWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QCalendarWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QCalendarWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QCalendarWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QCalendarWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QCalendarWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QCalendarWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QCalendarWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QCalendarWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QCalendarWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QCalendarWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QCalendarWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QCalendarWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QCalendarWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QCalendarWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QCalendarWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QCalendarWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QCalendarWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QCalendarWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QCalendarWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QCalendarWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QCalendarWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QCalendarWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QCalendarWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QCalendarWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QCalendarWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QCalendarWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QCalendarWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QCalendarWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QCalendarWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QCalendarWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QCalendarWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QCalendarWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QCalendarWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QCalendarWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QCalendarWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QCalendarWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QCalendarWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QCalendarWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QCalendarWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QCalendarWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QCalendarWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QCalendarWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QCalendarWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QCalendarWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QCalendarWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QCalendarWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QCalendarWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QCalendarWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QCalendarWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QCalendarWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QCalendarWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QCalendarWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QCalendarWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QCalendarWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QCalendarWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QCalendarWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QCalendarWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QCalendarWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QCalendarWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QCalendarWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QCalendarWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QCalendarWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QCalendarWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QCalendarWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QCalendarWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QCalendarWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QCalendarWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QCalendarWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QCalendarWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QCalendarWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QCalendarWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QCalendarWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QCalendarWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QCalendarWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QCalendarWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QCalendarWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QCalendarWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QCalendarWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QCalendarWidget::focusNextPrevChild(next); + + } + +}; + +void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(parent); + *outptr_QCalendarWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCalendarWidget* QCalendarWidget_new2() { - return new QCalendarWidget(); +void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(); + *outptr_QCalendarWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self) { @@ -246,7 +1320,7 @@ void QCalendarWidget_SelectionChanged(QCalendarWidget* self) { } void QCalendarWidget_connect_SelectionChanged(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::selectionChanged), self, [=]() { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::selectionChanged), self, [=]() { miqt_exec_callback_QCalendarWidget_SelectionChanged(slot); }); } @@ -256,7 +1330,7 @@ void QCalendarWidget_Clicked(QCalendarWidget* self, QDate* date) { } void QCalendarWidget_connect_Clicked(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::clicked), self, [=](const QDate& date) { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::clicked), self, [=](const QDate& date) { const QDate& date_ret = date; // Cast returned reference into pointer QDate* sigval1 = const_cast(&date_ret); @@ -269,7 +1343,7 @@ void QCalendarWidget_Activated(QCalendarWidget* self, QDate* date) { } void QCalendarWidget_connect_Activated(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::activated), self, [=](const QDate& date) { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::activated), self, [=](const QDate& date) { const QDate& date_ret = date; // Cast returned reference into pointer QDate* sigval1 = const_cast(&date_ret); @@ -282,7 +1356,7 @@ void QCalendarWidget_CurrentPageChanged(QCalendarWidget* self, int year, int mon } void QCalendarWidget_connect_CurrentPageChanged(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::currentPageChanged), self, [=](int year, int month) { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::currentPageChanged), self, [=](int year, int month) { int sigval1 = year; int sigval2 = month; miqt_exec_callback_QCalendarWidget_CurrentPageChanged(slot, sigval1, sigval2); @@ -333,7 +1407,355 @@ struct miqt_string QCalendarWidget_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QCalendarWidget_Delete(QCalendarWidget* self) { - delete self; +void QCalendarWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QCalendarWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_SizeHint(); +} + +void QCalendarWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QCalendarWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QCalendarWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__Event = slot; +} + +bool QCalendarWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_Event(event); +} + +void QCalendarWidget_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__EventFilter = slot; +} + +bool QCalendarWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QCalendarWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QCalendarWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QCalendarWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QCalendarWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QCalendarWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QCalendarWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QCalendarWidget_override_virtual_PaintCell(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__PaintCell = slot; +} + +void QCalendarWidget_virtualbase_PaintCell(const void* self, QPainter* painter, QRect* rect, QDate* date) { + ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_PaintCell(painter, rect, date); +} + +void QCalendarWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DevType = slot; +} + +int QCalendarWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DevType(); +} + +void QCalendarWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__SetVisible = slot; +} + +void QCalendarWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QCalendarWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QCalendarWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QCalendarWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QCalendarWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QCalendarWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QCalendarWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QCalendarWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QCalendarWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QCalendarWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QCalendarWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QCalendarWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QCalendarWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QCalendarWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__WheelEvent = slot; +} + +void QCalendarWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QCalendarWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QCalendarWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QCalendarWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QCalendarWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QCalendarWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QCalendarWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QCalendarWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__EnterEvent = slot; +} + +void QCalendarWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QCalendarWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QCalendarWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QCalendarWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__PaintEvent = slot; +} + +void QCalendarWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QCalendarWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MoveEvent = slot; +} + +void QCalendarWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QCalendarWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__CloseEvent = slot; +} + +void QCalendarWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QCalendarWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QCalendarWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QCalendarWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__TabletEvent = slot; +} + +void QCalendarWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QCalendarWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ActionEvent = slot; +} + +void QCalendarWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QCalendarWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QCalendarWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QCalendarWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QCalendarWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QCalendarWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QCalendarWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QCalendarWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DropEvent = slot; +} + +void QCalendarWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QCalendarWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ShowEvent = slot; +} + +void QCalendarWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QCalendarWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__HideEvent = slot; +} + +void QCalendarWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QCalendarWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QCalendarWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QCalendarWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QCalendarWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QCalendarWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__Metric = slot; +} + +int QCalendarWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_Metric(param1); +} + +void QCalendarWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__InitPainter = slot; +} + +void QCalendarWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QCalendarWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QCalendarWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QCalendarWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QCalendarWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QCalendarWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QCalendarWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QCalendarWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QCalendarWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QCalendarWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QCalendarWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QCalendarWidget_Delete(QCalendarWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcalendarwidget.go b/qt/gen_qcalendarwidget.go index e359da01..d2a0e987 100644 --- a/qt/gen_qcalendarwidget.go +++ b/qt/gen_qcalendarwidget.go @@ -38,7 +38,8 @@ const ( ) type QCalendarWidget struct { - h *C.QCalendarWidget + h *C.QCalendarWidget + isSubclass bool *QWidget } @@ -56,27 +57,49 @@ func (this *QCalendarWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCalendarWidget(h *C.QCalendarWidget) *QCalendarWidget { +// newQCalendarWidget constructs the type using only CGO pointers. +func newQCalendarWidget(h *C.QCalendarWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCalendarWidget { if h == nil { return nil } - return &QCalendarWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QCalendarWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQCalendarWidget(h unsafe.Pointer) *QCalendarWidget { - return newQCalendarWidget((*C.QCalendarWidget)(h)) +// UnsafeNewQCalendarWidget constructs the type using only unsafe pointers. +func UnsafeNewQCalendarWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCalendarWidget { + if h == nil { + return nil + } + + return &QCalendarWidget{h: (*C.QCalendarWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQCalendarWidget constructs a new QCalendarWidget object. func NewQCalendarWidget(parent *QWidget) *QCalendarWidget { - ret := C.QCalendarWidget_new(parent.cPointer()) - return newQCalendarWidget(ret) + var outptr_QCalendarWidget *C.QCalendarWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCalendarWidget_new(parent.cPointer(), &outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCalendarWidget2 constructs a new QCalendarWidget object. func NewQCalendarWidget2() *QCalendarWidget { - ret := C.QCalendarWidget_new2() - return newQCalendarWidget(ret) + var outptr_QCalendarWidget *C.QCalendarWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCalendarWidget_new2(&outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QCalendarWidget) MetaObject() *QMetaObject { @@ -211,7 +234,7 @@ func (this *QCalendarWidget) SetVerticalHeaderFormat(format QCalendarWidget__Ver func (this *QCalendarWidget) HeaderTextFormat() *QTextCharFormat { _ret := C.QCalendarWidget_HeaderTextFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -222,7 +245,7 @@ func (this *QCalendarWidget) SetHeaderTextFormat(format *QTextCharFormat) { func (this *QCalendarWidget) WeekdayTextFormat(dayOfWeek DayOfWeek) *QTextCharFormat { _ret := C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek)) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -243,7 +266,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { _entry_Key := *_mapkey_goptr _mapval_ret := _Values[i] - _mapval_goptr := newQTextCharFormat(_mapval_ret) + _mapval_goptr := newQTextCharFormat(_mapval_ret, nil) _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Value := *_mapval_goptr @@ -254,7 +277,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { func (this *QCalendarWidget) DateTextFormatWithDate(date *QDate) *QTextCharFormat { _ret := C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer()) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -446,9 +469,1026 @@ func QCalendarWidget_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QCalendarWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QCalendarWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCalendarWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QCalendarWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_SizeHint +func miqt_exec_callback_QCalendarWidget_SizeHint(self *C.QCalendarWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QCalendarWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCalendarWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QCalendarWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MinimumSizeHint +func miqt_exec_callback_QCalendarWidget_MinimumSizeHint(self *C.QCalendarWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QCalendarWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QCalendarWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QCalendarWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_Event +func miqt_exec_callback_QCalendarWidget_Event(self *C.QCalendarWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QCalendarWidget_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QCalendarWidget) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QCalendarWidget_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_EventFilter +func miqt_exec_callback_QCalendarWidget_EventFilter(self *C.QCalendarWidget, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MousePressEvent +func miqt_exec_callback_QCalendarWidget_MousePressEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QCalendarWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QCalendarWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ResizeEvent +func miqt_exec_callback_QCalendarWidget_ResizeEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QCalendarWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QCalendarWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_KeyPressEvent +func miqt_exec_callback_QCalendarWidget_KeyPressEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_PaintCell(painter *QPainter, rect *QRect, date *QDate) { + + C.QCalendarWidget_virtualbase_PaintCell(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), date.cPointer()) + +} +func (this *QCalendarWidget) OnPaintCell(slot func(super func(painter *QPainter, rect *QRect, date *QDate), painter *QPainter, rect *QRect, date *QDate)) { + C.QCalendarWidget_override_virtual_PaintCell(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_PaintCell +func miqt_exec_callback_QCalendarWidget_PaintCell(self *C.QCalendarWidget, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, date *C.QDate) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, date *QDate), painter *QPainter, rect *QRect, date *QDate)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := UnsafeNewQDate(unsafe.Pointer(date)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintCell, slotval1, slotval2, slotval3) + +} + +func (this *QCalendarWidget) callVirtualBase_DevType() int { + + return (int)(C.QCalendarWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QCalendarWidget) OnDevType(slot func(super func() int) int) { + C.QCalendarWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DevType +func miqt_exec_callback_QCalendarWidget_DevType(self *C.QCalendarWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_SetVisible(visible bool) { + + C.QCalendarWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QCalendarWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QCalendarWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_SetVisible +func miqt_exec_callback_QCalendarWidget_SetVisible(self *C.QCalendarWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QCalendarWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QCalendarWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QCalendarWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_HeightForWidth +func miqt_exec_callback_QCalendarWidget_HeightForWidth(self *C.QCalendarWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QCalendarWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QCalendarWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QCalendarWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_HasHeightForWidth +func miqt_exec_callback_QCalendarWidget_HasHeightForWidth(self *C.QCalendarWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QCalendarWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QCalendarWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QCalendarWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_PaintEngine +func miqt_exec_callback_QCalendarWidget_PaintEngine(self *C.QCalendarWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MouseReleaseEvent +func miqt_exec_callback_QCalendarWidget_MouseReleaseEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent +func miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MouseMoveEvent +func miqt_exec_callback_QCalendarWidget_MouseMoveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QCalendarWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QCalendarWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_WheelEvent +func miqt_exec_callback_QCalendarWidget_WheelEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QCalendarWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QCalendarWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_KeyReleaseEvent +func miqt_exec_callback_QCalendarWidget_KeyReleaseEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QCalendarWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QCalendarWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_FocusInEvent +func miqt_exec_callback_QCalendarWidget_FocusInEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QCalendarWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QCalendarWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_FocusOutEvent +func miqt_exec_callback_QCalendarWidget_FocusOutEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_EnterEvent(event *QEvent) { + + C.QCalendarWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCalendarWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_EnterEvent +func miqt_exec_callback_QCalendarWidget_EnterEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QCalendarWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCalendarWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_LeaveEvent +func miqt_exec_callback_QCalendarWidget_LeaveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QCalendarWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QCalendarWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_PaintEvent +func miqt_exec_callback_QCalendarWidget_PaintEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QCalendarWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QCalendarWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MoveEvent +func miqt_exec_callback_QCalendarWidget_MoveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QCalendarWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QCalendarWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_CloseEvent +func miqt_exec_callback_QCalendarWidget_CloseEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QCalendarWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QCalendarWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ContextMenuEvent +func miqt_exec_callback_QCalendarWidget_ContextMenuEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QCalendarWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QCalendarWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_TabletEvent +func miqt_exec_callback_QCalendarWidget_TabletEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QCalendarWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QCalendarWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ActionEvent +func miqt_exec_callback_QCalendarWidget_ActionEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QCalendarWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QCalendarWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DragEnterEvent +func miqt_exec_callback_QCalendarWidget_DragEnterEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QCalendarWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QCalendarWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DragMoveEvent +func miqt_exec_callback_QCalendarWidget_DragMoveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QCalendarWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QCalendarWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DragLeaveEvent +func miqt_exec_callback_QCalendarWidget_DragLeaveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QCalendarWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QCalendarWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DropEvent +func miqt_exec_callback_QCalendarWidget_DropEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QCalendarWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QCalendarWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ShowEvent +func miqt_exec_callback_QCalendarWidget_ShowEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QCalendarWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QCalendarWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_HideEvent +func miqt_exec_callback_QCalendarWidget_HideEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QCalendarWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QCalendarWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QCalendarWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_NativeEvent +func miqt_exec_callback_QCalendarWidget_NativeEvent(self *C.QCalendarWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QCalendarWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCalendarWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QCalendarWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ChangeEvent +func miqt_exec_callback_QCalendarWidget_ChangeEvent(self *C.QCalendarWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QCalendarWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QCalendarWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QCalendarWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_Metric +func miqt_exec_callback_QCalendarWidget_Metric(self *C.QCalendarWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QCalendarWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QCalendarWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QCalendarWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_InitPainter +func miqt_exec_callback_QCalendarWidget_InitPainter(self *C.QCalendarWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QCalendarWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QCalendarWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QCalendarWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_Redirected +func miqt_exec_callback_QCalendarWidget_Redirected(self *C.QCalendarWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QCalendarWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QCalendarWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QCalendarWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_SharedPainter +func miqt_exec_callback_QCalendarWidget_SharedPainter(self *C.QCalendarWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QCalendarWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCalendarWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QCalendarWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_InputMethodEvent +func miqt_exec_callback_QCalendarWidget_InputMethodEvent(self *C.QCalendarWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QCalendarWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCalendarWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QCalendarWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_InputMethodQuery +func miqt_exec_callback_QCalendarWidget_InputMethodQuery(self *C.QCalendarWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QCalendarWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QCalendarWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QCalendarWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_FocusNextPrevChild +func miqt_exec_callback_QCalendarWidget_FocusNextPrevChild(self *C.QCalendarWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QCalendarWidget) Delete() { - C.QCalendarWidget_Delete(this.h) + C.QCalendarWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcalendarwidget.h b/qt/gen_qcalendarwidget.h index c5d8126b..0e74040e 100644 --- a/qt/gen_qcalendarwidget.h +++ b/qt/gen_qcalendarwidget.h @@ -15,25 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; class QCalendar; class QCalendarWidget; +class QCloseEvent; +class QContextMenuEvent; class QDate; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QTextCharFormat; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; typedef struct QCalendar QCalendar; typedef struct QCalendarWidget QCalendarWidget; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDate QDate; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QTextCharFormat QTextCharFormat; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QCalendarWidget* QCalendarWidget_new(QWidget* parent); -QCalendarWidget* QCalendarWidget_new2(); +void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self); void* QCalendarWidget_Metacast(QCalendarWidget* self, const char* param1); struct miqt_string QCalendarWidget_Tr(const char* s); @@ -70,6 +124,12 @@ bool QCalendarWidget_IsDateEditEnabled(const QCalendarWidget* self); void QCalendarWidget_SetDateEditEnabled(QCalendarWidget* self, bool enable); int QCalendarWidget_DateEditAcceptDelay(const QCalendarWidget* self); void QCalendarWidget_SetDateEditAcceptDelay(QCalendarWidget* self, int delay); +bool QCalendarWidget_Event(QCalendarWidget* self, QEvent* event); +bool QCalendarWidget_EventFilter(QCalendarWidget* self, QObject* watched, QEvent* event); +void QCalendarWidget_MousePressEvent(QCalendarWidget* self, QMouseEvent* event); +void QCalendarWidget_ResizeEvent(QCalendarWidget* self, QResizeEvent* event); +void QCalendarWidget_KeyPressEvent(QCalendarWidget* self, QKeyEvent* event); +void QCalendarWidget_PaintCell(const QCalendarWidget* self, QPainter* painter, QRect* rect, QDate* date); void QCalendarWidget_SetSelectedDate(QCalendarWidget* self, QDate* date); void QCalendarWidget_SetDateRange(QCalendarWidget* self, QDate* min, QDate* max); void QCalendarWidget_SetCurrentPage(QCalendarWidget* self, int year, int month); @@ -93,7 +153,93 @@ struct miqt_string QCalendarWidget_Tr2(const char* s, const char* c); struct miqt_string QCalendarWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QCalendarWidget_TrUtf82(const char* s, const char* c); struct miqt_string QCalendarWidget_TrUtf83(const char* s, const char* c, int n); -void QCalendarWidget_Delete(QCalendarWidget* self); +void QCalendarWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCalendarWidget_virtualbase_SizeHint(const void* self); +void QCalendarWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QCalendarWidget_virtualbase_MinimumSizeHint(const void* self); +void QCalendarWidget_override_virtual_Event(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_Event(void* self, QEvent* event); +void QCalendarWidget_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QCalendarWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QCalendarWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QCalendarWidget_override_virtual_PaintCell(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_PaintCell(const void* self, QPainter* painter, QRect* rect, QDate* date); +void QCalendarWidget_override_virtual_DevType(void* self, intptr_t slot); +int QCalendarWidget_virtualbase_DevType(const void* self); +void QCalendarWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_SetVisible(void* self, bool visible); +void QCalendarWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QCalendarWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QCalendarWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_HasHeightForWidth(const void* self); +void QCalendarWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QCalendarWidget_virtualbase_PaintEngine(const void* self); +void QCalendarWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QCalendarWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QCalendarWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QCalendarWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QCalendarWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QCalendarWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QCalendarWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QCalendarWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QCalendarWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QCalendarWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QCalendarWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QCalendarWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QCalendarWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QCalendarWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QCalendarWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QCalendarWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QCalendarWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QCalendarWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QCalendarWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QCalendarWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QCalendarWidget_override_virtual_Metric(void* self, intptr_t slot); +int QCalendarWidget_virtualbase_Metric(const void* self, int param1); +void QCalendarWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QCalendarWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QCalendarWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QCalendarWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QCalendarWidget_virtualbase_SharedPainter(const void* self); +void QCalendarWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QCalendarWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QCalendarWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QCalendarWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QCalendarWidget_Delete(QCalendarWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qchar.cpp b/qt/gen_qchar.cpp index b4140ff8..7074ed7b 100644 --- a/qt/gen_qchar.cpp +++ b/qt/gen_qchar.cpp @@ -7,12 +7,14 @@ #include "gen_qchar.h" #include "_cgo_export.h" -QLatin1Char* QLatin1Char_new(char c) { - return new QLatin1Char(static_cast(c)); +void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char) { + QLatin1Char* ret = new QLatin1Char(static_cast(c)); + *outptr_QLatin1Char = ret; } -QLatin1Char* QLatin1Char_new2(QLatin1Char* param1) { - return new QLatin1Char(*param1); +void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char) { + QLatin1Char* ret = new QLatin1Char(*param1); + *outptr_QLatin1Char = ret; } char QLatin1Char_ToLatin1(const QLatin1Char* self) { @@ -24,52 +26,67 @@ uint16_t QLatin1Char_Unicode(const QLatin1Char* self) { return static_cast(_ret); } -void QLatin1Char_Delete(QLatin1Char* self) { - delete self; +void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QChar* QChar_new() { - return new QChar(); +void QChar_new(QChar** outptr_QChar) { + QChar* ret = new QChar(); + *outptr_QChar = ret; } -QChar* QChar_new2(uint16_t rc) { - return new QChar(static_cast(rc)); +void QChar_new2(uint16_t rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new3(unsigned char c, unsigned char r) { - return new QChar(static_cast(c), static_cast(r)); +void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(c), static_cast(r)); + *outptr_QChar = ret; } -QChar* QChar_new4(int16_t rc) { - return new QChar(static_cast(rc)); +void QChar_new4(int16_t rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new5(unsigned int rc) { - return new QChar(static_cast(rc)); +void QChar_new5(unsigned int rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new6(int rc) { - return new QChar(static_cast(rc)); +void QChar_new6(int rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new7(int s) { - return new QChar(static_cast(s)); +void QChar_new7(int s, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(s)); + *outptr_QChar = ret; } -QChar* QChar_new8(QLatin1Char* ch) { - return new QChar(*ch); +void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar) { + QChar* ret = new QChar(*ch); + *outptr_QChar = ret; } -QChar* QChar_new9(char c) { - return new QChar(static_cast(c)); +void QChar_new9(char c, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(c)); + *outptr_QChar = ret; } -QChar* QChar_new10(unsigned char c) { - return new QChar(static_cast(c)); +void QChar_new10(unsigned char c, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(c)); + *outptr_QChar = ret; } -QChar* QChar_new11(QChar* param1) { - return new QChar(*param1); +void QChar_new11(QChar* param1, QChar** outptr_QChar) { + QChar* ret = new QChar(*param1); + *outptr_QChar = ret; } int QChar_Category(const QChar* self) { @@ -425,7 +442,11 @@ bool QChar_IsTitleCaseWithUcs4(unsigned int ucs4) { return QChar::isTitleCase(static_cast(ucs4)); } -void QChar_Delete(QChar* self) { - delete self; +void QChar_Delete(QChar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qchar.go b/qt/gen_qchar.go index 82806bd0..2c609cf3 100644 --- a/qt/gen_qchar.go +++ b/qt/gen_qchar.go @@ -356,7 +356,8 @@ const ( ) type QLatin1Char struct { - h *C.QLatin1Char + h *C.QLatin1Char + isSubclass bool } func (this *QLatin1Char) cPointer() *C.QLatin1Char { @@ -373,6 +374,7 @@ func (this *QLatin1Char) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLatin1Char constructs the type using only CGO pointers. func newQLatin1Char(h *C.QLatin1Char) *QLatin1Char { if h == nil { return nil @@ -380,20 +382,33 @@ func newQLatin1Char(h *C.QLatin1Char) *QLatin1Char { return &QLatin1Char{h: h} } +// UnsafeNewQLatin1Char constructs the type using only unsafe pointers. func UnsafeNewQLatin1Char(h unsafe.Pointer) *QLatin1Char { - return newQLatin1Char((*C.QLatin1Char)(h)) + if h == nil { + return nil + } + + return &QLatin1Char{h: (*C.QLatin1Char)(h)} } // NewQLatin1Char constructs a new QLatin1Char object. func NewQLatin1Char(c int8) *QLatin1Char { - ret := C.QLatin1Char_new((C.char)(c)) - return newQLatin1Char(ret) + var outptr_QLatin1Char *C.QLatin1Char = nil + + C.QLatin1Char_new((C.char)(c), &outptr_QLatin1Char) + ret := newQLatin1Char(outptr_QLatin1Char) + ret.isSubclass = true + return ret } // NewQLatin1Char2 constructs a new QLatin1Char object. func NewQLatin1Char2(param1 *QLatin1Char) *QLatin1Char { - ret := C.QLatin1Char_new2(param1.cPointer()) - return newQLatin1Char(ret) + var outptr_QLatin1Char *C.QLatin1Char = nil + + C.QLatin1Char_new2(param1.cPointer(), &outptr_QLatin1Char) + ret := newQLatin1Char(outptr_QLatin1Char) + ret.isSubclass = true + return ret } func (this *QLatin1Char) ToLatin1() int8 { @@ -406,7 +421,7 @@ func (this *QLatin1Char) Unicode() uint16 { // Delete this object from C++ memory. func (this *QLatin1Char) Delete() { - C.QLatin1Char_Delete(this.h) + C.QLatin1Char_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -419,7 +434,8 @@ func (this *QLatin1Char) GoGC() { } type QChar struct { - h *C.QChar + h *C.QChar + isSubclass bool } func (this *QChar) cPointer() *C.QChar { @@ -436,6 +452,7 @@ func (this *QChar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQChar constructs the type using only CGO pointers. func newQChar(h *C.QChar) *QChar { if h == nil { return nil @@ -443,74 +460,123 @@ func newQChar(h *C.QChar) *QChar { return &QChar{h: h} } +// UnsafeNewQChar constructs the type using only unsafe pointers. func UnsafeNewQChar(h unsafe.Pointer) *QChar { - return newQChar((*C.QChar)(h)) + if h == nil { + return nil + } + + return &QChar{h: (*C.QChar)(h)} } // NewQChar constructs a new QChar object. func NewQChar() *QChar { - ret := C.QChar_new() - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new(&outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar2 constructs a new QChar object. func NewQChar2(rc uint16) *QChar { - ret := C.QChar_new2((C.uint16_t)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new2((C.uint16_t)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar3 constructs a new QChar object. func NewQChar3(c byte, r byte) *QChar { - ret := C.QChar_new3((C.uchar)(c), (C.uchar)(r)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new3((C.uchar)(c), (C.uchar)(r), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar4 constructs a new QChar object. func NewQChar4(rc int16) *QChar { - ret := C.QChar_new4((C.int16_t)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new4((C.int16_t)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar5 constructs a new QChar object. func NewQChar5(rc uint) *QChar { - ret := C.QChar_new5((C.uint)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new5((C.uint)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar6 constructs a new QChar object. func NewQChar6(rc int) *QChar { - ret := C.QChar_new6((C.int)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new6((C.int)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar7 constructs a new QChar object. func NewQChar7(s QChar__SpecialCharacter) *QChar { - ret := C.QChar_new7((C.int)(s)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new7((C.int)(s), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar8 constructs a new QChar object. func NewQChar8(ch QLatin1Char) *QChar { - ret := C.QChar_new8(ch.cPointer()) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new8(ch.cPointer(), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar9 constructs a new QChar object. func NewQChar9(c int8) *QChar { - ret := C.QChar_new9((C.char)(c)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new9((C.char)(c), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar10 constructs a new QChar object. func NewQChar10(c byte) *QChar { - ret := C.QChar_new10((C.uchar)(c)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new10((C.uchar)(c), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar11 constructs a new QChar object. func NewQChar11(param1 *QChar) *QChar { - ret := C.QChar_new11(param1.cPointer()) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new11(param1.cPointer(), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } func (this *QChar) Category() QChar__Category { @@ -851,7 +917,7 @@ func QChar_IsTitleCaseWithUcs4(ucs4 uint) bool { // Delete this object from C++ memory. func (this *QChar) Delete() { - C.QChar_Delete(this.h) + C.QChar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qchar.h b/qt/gen_qchar.h index 89fde30f..4d9f250d 100644 --- a/qt/gen_qchar.h +++ b/qt/gen_qchar.h @@ -22,23 +22,23 @@ typedef struct QChar QChar; typedef struct QLatin1Char QLatin1Char; #endif -QLatin1Char* QLatin1Char_new(char c); -QLatin1Char* QLatin1Char_new2(QLatin1Char* param1); +void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char); +void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char); char QLatin1Char_ToLatin1(const QLatin1Char* self); uint16_t QLatin1Char_Unicode(const QLatin1Char* self); -void QLatin1Char_Delete(QLatin1Char* self); +void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass); -QChar* QChar_new(); -QChar* QChar_new2(uint16_t rc); -QChar* QChar_new3(unsigned char c, unsigned char r); -QChar* QChar_new4(int16_t rc); -QChar* QChar_new5(unsigned int rc); -QChar* QChar_new6(int rc); -QChar* QChar_new7(int s); -QChar* QChar_new8(QLatin1Char* ch); -QChar* QChar_new9(char c); -QChar* QChar_new10(unsigned char c); -QChar* QChar_new11(QChar* param1); +void QChar_new(QChar** outptr_QChar); +void QChar_new2(uint16_t rc, QChar** outptr_QChar); +void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar); +void QChar_new4(int16_t rc, QChar** outptr_QChar); +void QChar_new5(unsigned int rc, QChar** outptr_QChar); +void QChar_new6(int rc, QChar** outptr_QChar); +void QChar_new7(int s, QChar** outptr_QChar); +void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar); +void QChar_new9(char c, QChar** outptr_QChar); +void QChar_new10(unsigned char c, QChar** outptr_QChar); +void QChar_new11(QChar* param1, QChar** outptr_QChar); int QChar_Category(const QChar* self); int QChar_Direction(const QChar* self); int QChar_JoiningType(const QChar* self); @@ -117,7 +117,7 @@ bool QChar_IsDigitWithUcs4(unsigned int ucs4); bool QChar_IsLowerWithUcs4(unsigned int ucs4); bool QChar_IsUpperWithUcs4(unsigned int ucs4); bool QChar_IsTitleCaseWithUcs4(unsigned int ucs4); -void QChar_Delete(QChar* self); +void QChar_Delete(QChar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcheckbox.cpp b/qt/gen_qcheckbox.cpp index 7b00a43f..ef2ce095 100644 --- a/qt/gen_qcheckbox.cpp +++ b/qt/gen_qcheckbox.cpp @@ -1,30 +1,450 @@ +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include "gen_qcheckbox.h" #include "_cgo_export.h" -QCheckBox* QCheckBox_new(QWidget* parent) { - return new QCheckBox(parent); +class MiqtVirtualQCheckBox : public virtual QCheckBox { +public: + + MiqtVirtualQCheckBox(QWidget* parent): QCheckBox(parent) {}; + MiqtVirtualQCheckBox(): QCheckBox() {}; + MiqtVirtualQCheckBox(const QString& text): QCheckBox(text) {}; + MiqtVirtualQCheckBox(const QString& text, QWidget* parent): QCheckBox(text, parent) {}; + + virtual ~MiqtVirtualQCheckBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCheckBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCheckBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCheckBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QCheckBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCheckBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QCheckBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QCheckBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QCheckBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QCheckBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QCheckBox::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QCheckBox_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QCheckBox::hitButton(*pos); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QCheckBox::checkStateSet(); + return; + } + + + miqt_exec_callback_QCheckBox_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QCheckBox::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QCheckBox::nextCheckState(); + return; + } + + + miqt_exec_callback_QCheckBox_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QCheckBox::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QCheckBox::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QCheckBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QCheckBox::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QCheckBox::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QCheckBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QCheckBox::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QCheckBox::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QCheckBox::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QCheckBox::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QCheckBox::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QCheckBox::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QCheckBox::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QCheckBox::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QCheckBox::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QCheckBox::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QCheckBox::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QCheckBox::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QCheckBox::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QCheckBox::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QCheckBox::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QCheckBox::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QCheckBox::timerEvent(e); + + } + +}; + +void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(parent); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCheckBox* QCheckBox_new2() { - return new QCheckBox(); +void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCheckBox* QCheckBox_new3(struct miqt_string text) { +void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCheckBox(text_QString); + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent) { +void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCheckBox(text_QString, parent); + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString, parent); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QCheckBox_MetaObject(const QCheckBox* self) { @@ -87,7 +507,7 @@ void QCheckBox_StateChanged(QCheckBox* self, int param1) { } void QCheckBox_connect_StateChanged(QCheckBox* self, intptr_t slot) { - QCheckBox::connect(self, static_cast(&QCheckBox::stateChanged), self, [=](int param1) { + MiqtVirtualQCheckBox::connect(self, static_cast(&QCheckBox::stateChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QCheckBox_StateChanged(slot, sigval1); }); @@ -141,7 +561,139 @@ void QCheckBox_SetTristate1(QCheckBox* self, bool y) { self->setTristate(y); } -void QCheckBox_Delete(QCheckBox* self) { - delete self; +void QCheckBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QCheckBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_SizeHint(); +} + +void QCheckBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QCheckBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QCheckBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__Event = slot; +} + +bool QCheckBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_Event(e); +} + +void QCheckBox_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__HitButton = slot; +} + +bool QCheckBox_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_HitButton(pos); +} + +void QCheckBox_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__CheckStateSet = slot; +} + +void QCheckBox_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_CheckStateSet(); +} + +void QCheckBox_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__NextCheckState = slot; +} + +void QCheckBox_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_NextCheckState(); +} + +void QCheckBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__PaintEvent = slot; +} + +void QCheckBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_PaintEvent(param1); +} + +void QCheckBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QCheckBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QCheckBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QCheckBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QCheckBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QCheckBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QCheckBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MousePressEvent = slot; +} + +void QCheckBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_MousePressEvent(e); +} + +void QCheckBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QCheckBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QCheckBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__FocusInEvent = slot; +} + +void QCheckBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_FocusInEvent(e); +} + +void QCheckBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QCheckBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QCheckBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__ChangeEvent = slot; +} + +void QCheckBox_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_ChangeEvent(e); +} + +void QCheckBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__TimerEvent = slot; +} + +void QCheckBox_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_TimerEvent(e); +} + +void QCheckBox_Delete(QCheckBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcheckbox.go b/qt/gen_qcheckbox.go index f02c1d0b..47d16223 100644 --- a/qt/gen_qcheckbox.go +++ b/qt/gen_qcheckbox.go @@ -15,7 +15,8 @@ import ( ) type QCheckBox struct { - h *C.QCheckBox + h *C.QCheckBox + isSubclass bool *QAbstractButton } @@ -33,27 +34,51 @@ func (this *QCheckBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCheckBox(h *C.QCheckBox) *QCheckBox { +// newQCheckBox constructs the type using only CGO pointers. +func newQCheckBox(h *C.QCheckBox, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCheckBox { if h == nil { return nil } - return &QCheckBox{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QCheckBox{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQCheckBox(h unsafe.Pointer) *QCheckBox { - return newQCheckBox((*C.QCheckBox)(h)) +// UnsafeNewQCheckBox constructs the type using only unsafe pointers. +func UnsafeNewQCheckBox(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCheckBox { + if h == nil { + return nil + } + + return &QCheckBox{h: (*C.QCheckBox)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQCheckBox constructs a new QCheckBox object. func NewQCheckBox(parent *QWidget) *QCheckBox { - ret := C.QCheckBox_new(parent.cPointer()) - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new(parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCheckBox2 constructs a new QCheckBox object. func NewQCheckBox2() *QCheckBox { - ret := C.QCheckBox_new2() - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new2(&outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCheckBox3 constructs a new QCheckBox object. @@ -62,8 +87,16 @@ func NewQCheckBox3(text string) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCheckBox_new3(text_ms) - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new3(text_ms, &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCheckBox4 constructs a new QCheckBox object. @@ -72,8 +105,16 @@ func NewQCheckBox4(text string, parent *QWidget) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCheckBox_new4(text_ms, parent.cPointer()) - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new4(text_ms, parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QCheckBox) MetaObject() *QMetaObject { @@ -202,9 +243,379 @@ func (this *QCheckBox) SetTristate1(y bool) { C.QCheckBox_SetTristate1(this.h, (C.bool)(y)) } +func (this *QCheckBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QCheckBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCheckBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QCheckBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_SizeHint +func miqt_exec_callback_QCheckBox_SizeHint(self *C.QCheckBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCheckBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QCheckBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCheckBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QCheckBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MinimumSizeHint +func miqt_exec_callback_QCheckBox_MinimumSizeHint(self *C.QCheckBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCheckBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QCheckBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QCheckBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QCheckBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_Event +func miqt_exec_callback_QCheckBox_Event(self *C.QCheckBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCheckBox) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QCheckBox_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QCheckBox) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QCheckBox_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_HitButton +func miqt_exec_callback_QCheckBox_HitButton(self *C.QCheckBox, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCheckBox) callVirtualBase_CheckStateSet() { + + C.QCheckBox_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QCheckBox) OnCheckStateSet(slot func(super func())) { + C.QCheckBox_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_CheckStateSet +func miqt_exec_callback_QCheckBox_CheckStateSet(self *C.QCheckBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QCheckBox{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QCheckBox) callVirtualBase_NextCheckState() { + + C.QCheckBox_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QCheckBox) OnNextCheckState(slot func(super func())) { + C.QCheckBox_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_NextCheckState +func miqt_exec_callback_QCheckBox_NextCheckState(self *C.QCheckBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QCheckBox{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QCheckBox) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QCheckBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCheckBox) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QCheckBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_PaintEvent +func miqt_exec_callback_QCheckBox_PaintEvent(self *C.QCheckBox, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QCheckBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCheckBox) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QCheckBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MouseMoveEvent +func miqt_exec_callback_QCheckBox_MouseMoveEvent(self *C.QCheckBox, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QCheckBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QCheckBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_KeyPressEvent +func miqt_exec_callback_QCheckBox_KeyPressEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QCheckBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QCheckBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_KeyReleaseEvent +func miqt_exec_callback_QCheckBox_KeyReleaseEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QCheckBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QCheckBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MousePressEvent +func miqt_exec_callback_QCheckBox_MousePressEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QCheckBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QCheckBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MouseReleaseEvent +func miqt_exec_callback_QCheckBox_MouseReleaseEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QCheckBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QCheckBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_FocusInEvent +func miqt_exec_callback_QCheckBox_FocusInEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QCheckBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QCheckBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_FocusOutEvent +func miqt_exec_callback_QCheckBox_FocusOutEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QCheckBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QCheckBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_ChangeEvent +func miqt_exec_callback_QCheckBox_ChangeEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QCheckBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QCheckBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QCheckBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_TimerEvent +func miqt_exec_callback_QCheckBox_TimerEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QCheckBox) Delete() { - C.QCheckBox_Delete(this.h) + C.QCheckBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcheckbox.h b/qt/gen_qcheckbox.h index e497622d..cf7e2937 100644 --- a/qt/gen_qcheckbox.h +++ b/qt/gen_qcheckbox.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; class QCheckBox; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QSize; +class QTimerEvent; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; typedef struct QCheckBox QCheckBox; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QCheckBox* QCheckBox_new(QWidget* parent); -QCheckBox* QCheckBox_new2(); -QCheckBox* QCheckBox_new3(struct miqt_string text); -QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent); +void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QCheckBox_MetaObject(const QCheckBox* self); void* QCheckBox_Metacast(QCheckBox* self, const char* param1); struct miqt_string QCheckBox_Tr(const char* s); @@ -42,12 +62,50 @@ int QCheckBox_CheckState(const QCheckBox* self); void QCheckBox_SetCheckState(QCheckBox* self, int state); void QCheckBox_StateChanged(QCheckBox* self, int param1); void QCheckBox_connect_StateChanged(QCheckBox* self, intptr_t slot); +bool QCheckBox_Event(QCheckBox* self, QEvent* e); +bool QCheckBox_HitButton(const QCheckBox* self, QPoint* pos); +void QCheckBox_CheckStateSet(QCheckBox* self); +void QCheckBox_NextCheckState(QCheckBox* self); +void QCheckBox_PaintEvent(QCheckBox* self, QPaintEvent* param1); +void QCheckBox_MouseMoveEvent(QCheckBox* self, QMouseEvent* param1); struct miqt_string QCheckBox_Tr2(const char* s, const char* c); struct miqt_string QCheckBox_Tr3(const char* s, const char* c, int n); struct miqt_string QCheckBox_TrUtf82(const char* s, const char* c); struct miqt_string QCheckBox_TrUtf83(const char* s, const char* c, int n); void QCheckBox_SetTristate1(QCheckBox* self, bool y); -void QCheckBox_Delete(QCheckBox* self); +void QCheckBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCheckBox_virtualbase_SizeHint(const void* self); +void QCheckBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QCheckBox_virtualbase_MinimumSizeHint(const void* self); +void QCheckBox_override_virtual_Event(void* self, intptr_t slot); +bool QCheckBox_virtualbase_Event(void* self, QEvent* e); +void QCheckBox_override_virtual_HitButton(void* self, intptr_t slot); +bool QCheckBox_virtualbase_HitButton(const void* self, QPoint* pos); +void QCheckBox_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QCheckBox_virtualbase_CheckStateSet(void* self); +void QCheckBox_override_virtual_NextCheckState(void* self, intptr_t slot); +void QCheckBox_virtualbase_NextCheckState(void* self); +void QCheckBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QCheckBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QCheckBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QCheckBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QCheckBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QCheckBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QCheckBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QCheckBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QCheckBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_ChangeEvent(void* self, QEvent* e); +void QCheckBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QCheckBox_Delete(QCheckBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qclipboard.cpp b/qt/gen_qclipboard.cpp index cfe28043..48f8c752 100644 --- a/qt/gen_qclipboard.cpp +++ b/qt/gen_qclipboard.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qclipboard.go b/qt/gen_qclipboard.go index 62b21cb3..d0bc6eeb 100644 --- a/qt/gen_qclipboard.go +++ b/qt/gen_qclipboard.go @@ -23,7 +23,8 @@ const ( ) type QClipboard struct { - h *C.QClipboard + h *C.QClipboard + isSubclass bool *QObject } @@ -41,15 +42,23 @@ func (this *QClipboard) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQClipboard(h *C.QClipboard) *QClipboard { +// newQClipboard constructs the type using only CGO pointers. +func newQClipboard(h *C.QClipboard, h_QObject *C.QObject) *QClipboard { if h == nil { return nil } - return &QClipboard{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QClipboard{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQClipboard(h unsafe.Pointer) *QClipboard { - return newQClipboard((*C.QClipboard)(h)) +// UnsafeNewQClipboard constructs the type using only unsafe pointers. +func UnsafeNewQClipboard(h unsafe.Pointer, h_QObject unsafe.Pointer) *QClipboard { + if h == nil { + return nil + } + + return &QClipboard{h: (*C.QClipboard)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QClipboard) MetaObject() *QMetaObject { @@ -131,7 +140,7 @@ func (this *QClipboard) SetText(param1 string) { } func (this *QClipboard) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData(this.h)), nil) } func (this *QClipboard) SetMimeData(data *QMimeData) { @@ -140,14 +149,14 @@ func (this *QClipboard) SetMimeData(data *QMimeData) { func (this *QClipboard) Image() *QImage { _ret := C.QClipboard_Image(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap() *QPixmap { _ret := C.QClipboard_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -306,7 +315,7 @@ func (this *QClipboard) SetText2(param1 string, mode QClipboard__Mode) { } func (this *QClipboard) MimeData1(mode QClipboard__Mode) *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData1(this.h, (C.int)(mode)))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData1(this.h, (C.int)(mode))), nil) } func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { @@ -315,14 +324,14 @@ func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { func (this *QClipboard) Image1(mode QClipboard__Mode) *QImage { _ret := C.QClipboard_Image1(this.h, (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap1(mode QClipboard__Mode) *QPixmap { _ret := C.QClipboard_Pixmap1(this.h, (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qclipboard.h b/qt/gen_qclipboard.h index 28e0b49f..8ac6e82d 100644 --- a/qt/gen_qclipboard.h +++ b/qt/gen_qclipboard.h @@ -19,12 +19,14 @@ class QClipboard; class QImage; class QMetaObject; class QMimeData; +class QObject; class QPixmap; #else typedef struct QClipboard QClipboard; typedef struct QImage QImage; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; +typedef struct QObject QObject; typedef struct QPixmap QPixmap; #endif diff --git a/qt/gen_qcollator.cpp b/qt/gen_qcollator.cpp index 1956100c..99726f5d 100644 --- a/qt/gen_qcollator.cpp +++ b/qt/gen_qcollator.cpp @@ -9,8 +9,9 @@ #include "gen_qcollator.h" #include "_cgo_export.h" -QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other) { - return new QCollatorSortKey(*other); +void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey) { + QCollatorSortKey* ret = new QCollatorSortKey(*other); + *outptr_QCollatorSortKey = ret; } void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other) { @@ -25,20 +26,27 @@ int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key return self->compare(*key); } -void QCollatorSortKey_Delete(QCollatorSortKey* self) { - delete self; +void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCollator* QCollator_new() { - return new QCollator(); +void QCollator_new(QCollator** outptr_QCollator) { + QCollator* ret = new QCollator(); + *outptr_QCollator = ret; } -QCollator* QCollator_new2(QLocale* locale) { - return new QCollator(*locale); +void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator) { + QCollator* ret = new QCollator(*locale); + *outptr_QCollator = ret; } -QCollator* QCollator_new3(QCollator* param1) { - return new QCollator(*param1); +void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator) { + QCollator* ret = new QCollator(*param1); + *outptr_QCollator = ret; } void QCollator_OperatorAssign(QCollator* self, QCollator* param1) { @@ -103,7 +111,11 @@ QCollatorSortKey* QCollator_SortKey(const QCollator* self, struct miqt_string st return new QCollatorSortKey(self->sortKey(stringVal_QString)); } -void QCollator_Delete(QCollator* self) { - delete self; +void QCollator_Delete(QCollator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcollator.go b/qt/gen_qcollator.go index 91deb824..c230d061 100644 --- a/qt/gen_qcollator.go +++ b/qt/gen_qcollator.go @@ -14,7 +14,8 @@ import ( ) type QCollatorSortKey struct { - h *C.QCollatorSortKey + h *C.QCollatorSortKey + isSubclass bool } func (this *QCollatorSortKey) cPointer() *C.QCollatorSortKey { @@ -31,6 +32,7 @@ func (this *QCollatorSortKey) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCollatorSortKey constructs the type using only CGO pointers. func newQCollatorSortKey(h *C.QCollatorSortKey) *QCollatorSortKey { if h == nil { return nil @@ -38,14 +40,23 @@ func newQCollatorSortKey(h *C.QCollatorSortKey) *QCollatorSortKey { return &QCollatorSortKey{h: h} } +// UnsafeNewQCollatorSortKey constructs the type using only unsafe pointers. func UnsafeNewQCollatorSortKey(h unsafe.Pointer) *QCollatorSortKey { - return newQCollatorSortKey((*C.QCollatorSortKey)(h)) + if h == nil { + return nil + } + + return &QCollatorSortKey{h: (*C.QCollatorSortKey)(h)} } // NewQCollatorSortKey constructs a new QCollatorSortKey object. func NewQCollatorSortKey(other *QCollatorSortKey) *QCollatorSortKey { - ret := C.QCollatorSortKey_new(other.cPointer()) - return newQCollatorSortKey(ret) + var outptr_QCollatorSortKey *C.QCollatorSortKey = nil + + C.QCollatorSortKey_new(other.cPointer(), &outptr_QCollatorSortKey) + ret := newQCollatorSortKey(outptr_QCollatorSortKey) + ret.isSubclass = true + return ret } func (this *QCollatorSortKey) OperatorAssign(other *QCollatorSortKey) { @@ -62,7 +73,7 @@ func (this *QCollatorSortKey) Compare(key *QCollatorSortKey) int { // Delete this object from C++ memory. func (this *QCollatorSortKey) Delete() { - C.QCollatorSortKey_Delete(this.h) + C.QCollatorSortKey_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -75,7 +86,8 @@ func (this *QCollatorSortKey) GoGC() { } type QCollator struct { - h *C.QCollator + h *C.QCollator + isSubclass bool } func (this *QCollator) cPointer() *C.QCollator { @@ -92,6 +104,7 @@ func (this *QCollator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCollator constructs the type using only CGO pointers. func newQCollator(h *C.QCollator) *QCollator { if h == nil { return nil @@ -99,26 +112,43 @@ func newQCollator(h *C.QCollator) *QCollator { return &QCollator{h: h} } +// UnsafeNewQCollator constructs the type using only unsafe pointers. func UnsafeNewQCollator(h unsafe.Pointer) *QCollator { - return newQCollator((*C.QCollator)(h)) + if h == nil { + return nil + } + + return &QCollator{h: (*C.QCollator)(h)} } // NewQCollator constructs a new QCollator object. func NewQCollator() *QCollator { - ret := C.QCollator_new() - return newQCollator(ret) + var outptr_QCollator *C.QCollator = nil + + C.QCollator_new(&outptr_QCollator) + ret := newQCollator(outptr_QCollator) + ret.isSubclass = true + return ret } // NewQCollator2 constructs a new QCollator object. func NewQCollator2(locale *QLocale) *QCollator { - ret := C.QCollator_new2(locale.cPointer()) - return newQCollator(ret) + var outptr_QCollator *C.QCollator = nil + + C.QCollator_new2(locale.cPointer(), &outptr_QCollator) + ret := newQCollator(outptr_QCollator) + ret.isSubclass = true + return ret } // NewQCollator3 constructs a new QCollator object. func NewQCollator3(param1 *QCollator) *QCollator { - ret := C.QCollator_new3(param1.cPointer()) - return newQCollator(ret) + var outptr_QCollator *C.QCollator = nil + + C.QCollator_new3(param1.cPointer(), &outptr_QCollator) + ret := newQCollator(outptr_QCollator) + ret.isSubclass = true + return ret } func (this *QCollator) OperatorAssign(param1 *QCollator) { @@ -205,7 +235,7 @@ func (this *QCollator) SortKey(stringVal string) *QCollatorSortKey { // Delete this object from C++ memory. func (this *QCollator) Delete() { - C.QCollator_Delete(this.h) + C.QCollator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcollator.h b/qt/gen_qcollator.h index a5401369..ccde0d91 100644 --- a/qt/gen_qcollator.h +++ b/qt/gen_qcollator.h @@ -26,15 +26,15 @@ typedef struct QCollatorSortKey QCollatorSortKey; typedef struct QLocale QLocale; #endif -QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other); +void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey); void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other); void QCollatorSortKey_Swap(QCollatorSortKey* self, QCollatorSortKey* other); int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key); -void QCollatorSortKey_Delete(QCollatorSortKey* self); +void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass); -QCollator* QCollator_new(); -QCollator* QCollator_new2(QLocale* locale); -QCollator* QCollator_new3(QCollator* param1); +void QCollator_new(QCollator** outptr_QCollator); +void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator); +void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator); void QCollator_OperatorAssign(QCollator* self, QCollator* param1); void QCollator_Swap(QCollator* self, QCollator* other); void QCollator_SetLocale(QCollator* self, QLocale* locale); @@ -49,7 +49,7 @@ int QCollator_Compare(const QCollator* self, struct miqt_string s1, struct miqt_ int QCollator_Compare3(const QCollator* self, QChar* s1, int len1, QChar* s2, int len2); bool QCollator_OperatorCall(const QCollator* self, struct miqt_string s1, struct miqt_string s2); QCollatorSortKey* QCollator_SortKey(const QCollator* self, struct miqt_string stringVal); -void QCollator_Delete(QCollator* self); +void QCollator_Delete(QCollator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcolor.cpp b/qt/gen_qcolor.cpp index 6cbdf442..c25196f7 100644 --- a/qt/gen_qcolor.cpp +++ b/qt/gen_qcolor.cpp @@ -8,53 +8,65 @@ #include "gen_qcolor.h" #include "_cgo_export.h" -QColor* QColor_new() { - return new QColor(); +void QColor_new(QColor** outptr_QColor) { + QColor* ret = new QColor(); + *outptr_QColor = ret; } -QColor* QColor_new2(int color) { - return new QColor(static_cast(color)); +void QColor_new2(int color, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(color)); + *outptr_QColor = ret; } -QColor* QColor_new3(int r, int g, int b) { - return new QColor(static_cast(r), static_cast(g), static_cast(b)); +void QColor_new3(int r, int g, int b, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b)); + *outptr_QColor = ret; } -QColor* QColor_new4(unsigned int rgb) { - return new QColor(static_cast(rgb)); +void QColor_new4(unsigned int rgb, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(rgb)); + *outptr_QColor = ret; } -QColor* QColor_new5(QRgba64* rgba64) { - return new QColor(*rgba64); +void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor) { + QColor* ret = new QColor(*rgba64); + *outptr_QColor = ret; } -QColor* QColor_new6(struct miqt_string name) { +void QColor_new6(struct miqt_string name, QColor** outptr_QColor) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QColor(name_QString); + QColor* ret = new QColor(name_QString); + *outptr_QColor = ret; } -QColor* QColor_new7(const char* aname) { - return new QColor(aname); +void QColor_new7(const char* aname, QColor** outptr_QColor) { + QColor* ret = new QColor(aname); + *outptr_QColor = ret; } -QColor* QColor_new8(int spec) { - return new QColor(static_cast(spec)); +void QColor_new8(int spec, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(spec)); + *outptr_QColor = ret; } -QColor* QColor_new9(QColor* color) { - return new QColor(*color); +void QColor_new9(QColor* color, QColor** outptr_QColor) { + QColor* ret = new QColor(*color); + *outptr_QColor = ret; } -QColor* QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4) { - return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); +void QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); + *outptr_QColor = ret; } -QColor* QColor_new11(int r, int g, int b, int a) { - return new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); +void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); + *outptr_QColor = ret; } -QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5) { - return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); +void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); + *outptr_QColor = ret; } void QColor_OperatorAssign(QColor* self, QColor* param1) { @@ -620,7 +632,11 @@ QColor* QColor_Darker1(const QColor* self, int f) { return new QColor(self->darker(static_cast(f))); } -void QColor_Delete(QColor* self) { - delete self; +void QColor_Delete(QColor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcolor.go b/qt/gen_qcolor.go index c1df8b33..efd5bc4b 100644 --- a/qt/gen_qcolor.go +++ b/qt/gen_qcolor.go @@ -32,7 +32,8 @@ const ( ) type QColor struct { - h *C.QColor + h *C.QColor + isSubclass bool } func (this *QColor) cPointer() *C.QColor { @@ -49,6 +50,7 @@ func (this *QColor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColor constructs the type using only CGO pointers. func newQColor(h *C.QColor) *QColor { if h == nil { return nil @@ -56,38 +58,63 @@ func newQColor(h *C.QColor) *QColor { return &QColor{h: h} } +// UnsafeNewQColor constructs the type using only unsafe pointers. func UnsafeNewQColor(h unsafe.Pointer) *QColor { - return newQColor((*C.QColor)(h)) + if h == nil { + return nil + } + + return &QColor{h: (*C.QColor)(h)} } // NewQColor constructs a new QColor object. func NewQColor() *QColor { - ret := C.QColor_new() - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new(&outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor2 constructs a new QColor object. func NewQColor2(color GlobalColor) *QColor { - ret := C.QColor_new2((C.int)(color)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new2((C.int)(color), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor3 constructs a new QColor object. func NewQColor3(r int, g int, b int) *QColor { - ret := C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor4 constructs a new QColor object. func NewQColor4(rgb uint) *QColor { - ret := C.QColor_new4((C.uint)(rgb)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new4((C.uint)(rgb), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor5 constructs a new QColor object. func NewQColor5(rgba64 QRgba64) *QColor { - ret := C.QColor_new5(rgba64.cPointer()) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new5(rgba64.cPointer(), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor6 constructs a new QColor object. @@ -96,46 +123,74 @@ func NewQColor6(name string) *QColor { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QColor_new6(name_ms) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new6(name_ms, &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor7 constructs a new QColor object. func NewQColor7(aname string) *QColor { aname_Cstring := C.CString(aname) defer C.free(unsafe.Pointer(aname_Cstring)) - ret := C.QColor_new7(aname_Cstring) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new7(aname_Cstring, &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor8 constructs a new QColor object. func NewQColor8(spec QColor__Spec) *QColor { - ret := C.QColor_new8((C.int)(spec)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new8((C.int)(spec), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor9 constructs a new QColor object. func NewQColor9(color *QColor) *QColor { - ret := C.QColor_new9(color.cPointer()) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new9(color.cPointer(), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor10 constructs a new QColor object. func NewQColor10(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16) *QColor { - ret := C.QColor_new10((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new10((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor11 constructs a new QColor object. func NewQColor11(r int, g int, b int, a int) *QColor { - ret := C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor12 constructs a new QColor object. func NewQColor12(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16, a5 uint16) *QColor { - ret := C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } func (this *QColor) OperatorAssign(param1 *QColor) { @@ -783,7 +838,7 @@ func (this *QColor) Darker1(f int) *QColor { // Delete this object from C++ memory. func (this *QColor) Delete() { - C.QColor_Delete(this.h) + C.QColor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcolor.h b/qt/gen_qcolor.h index 630f3b71..ff55197f 100644 --- a/qt/gen_qcolor.h +++ b/qt/gen_qcolor.h @@ -22,18 +22,18 @@ typedef struct QColor QColor; typedef struct QRgba64 QRgba64; #endif -QColor* QColor_new(); -QColor* QColor_new2(int color); -QColor* QColor_new3(int r, int g, int b); -QColor* QColor_new4(unsigned int rgb); -QColor* QColor_new5(QRgba64* rgba64); -QColor* QColor_new6(struct miqt_string name); -QColor* QColor_new7(const char* aname); -QColor* QColor_new8(int spec); -QColor* QColor_new9(QColor* color); -QColor* QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4); -QColor* QColor_new11(int r, int g, int b, int a); -QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5); +void QColor_new(QColor** outptr_QColor); +void QColor_new2(int color, QColor** outptr_QColor); +void QColor_new3(int r, int g, int b, QColor** outptr_QColor); +void QColor_new4(unsigned int rgb, QColor** outptr_QColor); +void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor); +void QColor_new6(struct miqt_string name, QColor** outptr_QColor); +void QColor_new7(const char* aname, QColor** outptr_QColor); +void QColor_new8(int spec, QColor** outptr_QColor); +void QColor_new9(QColor* color, QColor** outptr_QColor); +void QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor); +void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor); +void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor); void QColor_OperatorAssign(QColor* self, QColor* param1); void QColor_OperatorAssignWithColor(QColor* self, int color); bool QColor_IsValid(const QColor* self); @@ -162,7 +162,7 @@ QColor* QColor_Light1(const QColor* self, int f); QColor* QColor_Dark1(const QColor* self, int f); QColor* QColor_Lighter1(const QColor* self, int f); QColor* QColor_Darker1(const QColor* self, int f); -void QColor_Delete(QColor* self); +void QColor_Delete(QColor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcolordialog.cpp b/qt/gen_qcolordialog.cpp index fcf52d77..a098747b 100644 --- a/qt/gen_qcolordialog.cpp +++ b/qt/gen_qcolordialog.cpp @@ -1,6 +1,16 @@ +#include #include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -9,20 +19,403 @@ #include "gen_qcolordialog.h" #include "_cgo_export.h" -QColorDialog* QColorDialog_new(QWidget* parent) { - return new QColorDialog(parent); +class MiqtVirtualQColorDialog : public virtual QColorDialog { +public: + + MiqtVirtualQColorDialog(QWidget* parent): QColorDialog(parent) {}; + MiqtVirtualQColorDialog(): QColorDialog() {}; + MiqtVirtualQColorDialog(const QColor& initial): QColorDialog(initial) {}; + MiqtVirtualQColorDialog(const QColor& initial, QWidget* parent): QColorDialog(initial, parent) {}; + + virtual ~MiqtVirtualQColorDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QColorDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QColorDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QColorDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QColorDialog::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QColorDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QColorDialog::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QColorDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QColorDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QColorDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QColorDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColorDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QColorDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QColorDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColorDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QColorDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QColorDialog::open(); + return; + } + + + miqt_exec_callback_QColorDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QColorDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QColorDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QColorDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QColorDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QColorDialog::accept(); + return; + } + + + miqt_exec_callback_QColorDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QColorDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QColorDialog::reject(); + return; + } + + + miqt_exec_callback_QColorDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QColorDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QColorDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QColorDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QColorDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QColorDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QColorDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QColorDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QColorDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QColorDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QColorDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QColorDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QColorDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QColorDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QColorDialog::eventFilter(param1, param2); + + } + +}; + +void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(parent); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColorDialog* QColorDialog_new2() { - return new QColorDialog(); +void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColorDialog* QColorDialog_new3(QColor* initial) { - return new QColorDialog(*initial); +void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent) { - return new QColorDialog(*initial, parent); +void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial, parent); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QColorDialog_MetaObject(const QColorDialog* self) { @@ -122,7 +515,7 @@ void QColorDialog_CurrentColorChanged(QColorDialog* self, QColor* color) { } void QColorDialog_connect_CurrentColorChanged(QColorDialog* self, intptr_t slot) { - QColorDialog::connect(self, static_cast(&QColorDialog::currentColorChanged), self, [=](const QColor& color) { + MiqtVirtualQColorDialog::connect(self, static_cast(&QColorDialog::currentColorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -135,7 +528,7 @@ void QColorDialog_ColorSelected(QColorDialog* self, QColor* color) { } void QColorDialog_connect_ColorSelected(QColorDialog* self, intptr_t slot) { - QColorDialog::connect(self, static_cast(&QColorDialog::colorSelected), self, [=](const QColor& color) { + MiqtVirtualQColorDialog::connect(self, static_cast(&QColorDialog::colorSelected), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -224,7 +617,131 @@ unsigned int QColorDialog_GetRgba3(unsigned int rgba, bool* ok, QWidget* parent) return static_cast(_ret); } -void QColorDialog_Delete(QColorDialog* self) { - delete self; +void QColorDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__SetVisible = slot; +} + +void QColorDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QColorDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QColorDialog_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ChangeEvent(event); +} + +void QColorDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Done = slot; +} + +void QColorDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Done(result); +} + +void QColorDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QColorDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQColorDialog*)(self) )->virtualbase_SizeHint(); +} + +void QColorDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QColorDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQColorDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QColorDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Open = slot; +} + +void QColorDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Open(); +} + +void QColorDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Exec = slot; +} + +int QColorDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Exec(); +} + +void QColorDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Accept = slot; +} + +void QColorDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Accept(); +} + +void QColorDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Reject = slot; +} + +void QColorDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Reject(); +} + +void QColorDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QColorDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QColorDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__CloseEvent = slot; +} + +void QColorDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QColorDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ShowEvent = slot; +} + +void QColorDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QColorDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QColorDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QColorDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QColorDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QColorDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__EventFilter = slot; +} + +bool QColorDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QColorDialog_Delete(QColorDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcolordialog.go b/qt/gen_qcolordialog.go index c49d7e81..4355338c 100644 --- a/qt/gen_qcolordialog.go +++ b/qt/gen_qcolordialog.go @@ -23,7 +23,8 @@ const ( ) type QColorDialog struct { - h *C.QColorDialog + h *C.QColorDialog + isSubclass bool *QDialog } @@ -41,39 +42,79 @@ func (this *QColorDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQColorDialog(h *C.QColorDialog) *QColorDialog { +// newQColorDialog constructs the type using only CGO pointers. +func newQColorDialog(h *C.QColorDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColorDialog { if h == nil { return nil } - return &QColorDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QColorDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQColorDialog(h unsafe.Pointer) *QColorDialog { - return newQColorDialog((*C.QColorDialog)(h)) +// UnsafeNewQColorDialog constructs the type using only unsafe pointers. +func UnsafeNewQColorDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColorDialog { + if h == nil { + return nil + } + + return &QColorDialog{h: (*C.QColorDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQColorDialog constructs a new QColorDialog object. func NewQColorDialog(parent *QWidget) *QColorDialog { - ret := C.QColorDialog_new(parent.cPointer()) - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new(parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColorDialog2 constructs a new QColorDialog object. func NewQColorDialog2() *QColorDialog { - ret := C.QColorDialog_new2() - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new2(&outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColorDialog3 constructs a new QColorDialog object. func NewQColorDialog3(initial *QColor) *QColorDialog { - ret := C.QColorDialog_new3(initial.cPointer()) - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new3(initial.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColorDialog4 constructs a new QColorDialog object. func NewQColorDialog4(initial *QColor, parent *QWidget) *QColorDialog { - ret := C.QColorDialog_new4(initial.cPointer(), parent.cPointer()) - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QColorDialog) MetaObject() *QMetaObject { @@ -315,9 +356,351 @@ func QColorDialog_GetRgba3(rgba uint, ok *bool, parent *QWidget) uint { return (uint)(C.QColorDialog_GetRgba3((C.uint)(rgba), (*C.bool)(unsafe.Pointer(ok)), parent.cPointer())) } +func (this *QColorDialog) callVirtualBase_SetVisible(visible bool) { + + C.QColorDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QColorDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QColorDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_SetVisible +func miqt_exec_callback_QColorDialog_SetVisible(self *C.QColorDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QColorDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QColorDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColorDialog) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QColorDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ChangeEvent +func miqt_exec_callback_QColorDialog_ChangeEvent(self *C.QColorDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_Done(result int) { + + C.QColorDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QColorDialog) OnDone(slot func(super func(result int), result int)) { + C.QColorDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Done +func miqt_exec_callback_QColorDialog_Done(self *C.QColorDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QColorDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QColorDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColorDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QColorDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_SizeHint +func miqt_exec_callback_QColorDialog_SizeHint(self *C.QColorDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QColorDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QColorDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColorDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QColorDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_MinimumSizeHint +func miqt_exec_callback_QColorDialog_MinimumSizeHint(self *C.QColorDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QColorDialog) callVirtualBase_Open() { + + C.QColorDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QColorDialog) OnOpen(slot func(super func())) { + C.QColorDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Open +func miqt_exec_callback_QColorDialog_Open(self *C.QColorDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColorDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QColorDialog) callVirtualBase_Exec() int { + + return (int)(C.QColorDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QColorDialog) OnExec(slot func(super func() int) int) { + C.QColorDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Exec +func miqt_exec_callback_QColorDialog_Exec(self *C.QColorDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QColorDialog) callVirtualBase_Accept() { + + C.QColorDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QColorDialog) OnAccept(slot func(super func())) { + C.QColorDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Accept +func miqt_exec_callback_QColorDialog_Accept(self *C.QColorDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColorDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QColorDialog) callVirtualBase_Reject() { + + C.QColorDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QColorDialog) OnReject(slot func(super func())) { + C.QColorDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Reject +func miqt_exec_callback_QColorDialog_Reject(self *C.QColorDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColorDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QColorDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QColorDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QColorDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_KeyPressEvent +func miqt_exec_callback_QColorDialog_KeyPressEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QColorDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QColorDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_CloseEvent +func miqt_exec_callback_QColorDialog_CloseEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QColorDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QColorDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ShowEvent +func miqt_exec_callback_QColorDialog_ShowEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QColorDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QColorDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ResizeEvent +func miqt_exec_callback_QColorDialog_ResizeEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QColorDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QColorDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ContextMenuEvent +func miqt_exec_callback_QColorDialog_ContextMenuEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QColorDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QColorDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QColorDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_EventFilter +func miqt_exec_callback_QColorDialog_EventFilter(self *C.QColorDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QColorDialog) Delete() { - C.QColorDialog_Delete(this.h) + C.QColorDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcolordialog.h b/qt/gen_qcolordialog.h index 349105d4..d1202206 100644 --- a/qt/gen_qcolordialog.h +++ b/qt/gen_qcolordialog.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; class QColor; class QColorDialog; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; typedef struct QColorDialog QColorDialog; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QColorDialog* QColorDialog_new(QWidget* parent); -QColorDialog* QColorDialog_new2(); -QColorDialog* QColorDialog_new3(QColor* initial); -QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent); +void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QColorDialog_MetaObject(const QColorDialog* self); void* QColorDialog_Metacast(QColorDialog* self, const char* param1); struct miqt_string QColorDialog_Tr(const char* s); @@ -53,6 +73,8 @@ void QColorDialog_CurrentColorChanged(QColorDialog* self, QColor* color); void QColorDialog_connect_CurrentColorChanged(QColorDialog* self, intptr_t slot); void QColorDialog_ColorSelected(QColorDialog* self, QColor* color); void QColorDialog_connect_ColorSelected(QColorDialog* self, intptr_t slot); +void QColorDialog_ChangeEvent(QColorDialog* self, QEvent* event); +void QColorDialog_Done(QColorDialog* self, int result); struct miqt_string QColorDialog_Tr2(const char* s, const char* c); struct miqt_string QColorDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QColorDialog_TrUtf82(const char* s, const char* c); @@ -65,7 +87,37 @@ QColor* QColorDialog_GetColor4(QColor* initial, QWidget* parent, struct miqt_str unsigned int QColorDialog_GetRgba1(unsigned int rgba); unsigned int QColorDialog_GetRgba2(unsigned int rgba, bool* ok); unsigned int QColorDialog_GetRgba3(unsigned int rgba, bool* ok, QWidget* parent); -void QColorDialog_Delete(QColorDialog* self); +void QColorDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QColorDialog_virtualbase_SetVisible(void* self, bool visible); +void QColorDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ChangeEvent(void* self, QEvent* event); +void QColorDialog_override_virtual_Done(void* self, intptr_t slot); +void QColorDialog_virtualbase_Done(void* self, int result); +void QColorDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QColorDialog_virtualbase_SizeHint(const void* self); +void QColorDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QColorDialog_virtualbase_MinimumSizeHint(const void* self); +void QColorDialog_override_virtual_Open(void* self, intptr_t slot); +void QColorDialog_virtualbase_Open(void* self); +void QColorDialog_override_virtual_Exec(void* self, intptr_t slot); +int QColorDialog_virtualbase_Exec(void* self); +void QColorDialog_override_virtual_Accept(void* self, intptr_t slot); +void QColorDialog_virtualbase_Accept(void* self); +void QColorDialog_override_virtual_Reject(void* self, intptr_t slot); +void QColorDialog_virtualbase_Reject(void* self); +void QColorDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QColorDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QColorDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QColorDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QColorDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QColorDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QColorDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QColorDialog_Delete(QColorDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcolormap.cpp b/qt/gen_qcolormap.cpp index 02268eb8..3c667025 100644 --- a/qt/gen_qcolormap.cpp +++ b/qt/gen_qcolormap.cpp @@ -5,8 +5,9 @@ #include "gen_qcolormap.h" #include "_cgo_export.h" -QColormap* QColormap_new(QColormap* colormap) { - return new QColormap(*colormap); +void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap) { + QColormap* ret = new QColormap(*colormap); + *outptr_QColormap = ret; } void QColormap_Initialize() { @@ -64,7 +65,11 @@ QColormap* QColormap_Instance1(int screen) { return new QColormap(QColormap::instance(static_cast(screen))); } -void QColormap_Delete(QColormap* self) { - delete self; +void QColormap_Delete(QColormap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcolormap.go b/qt/gen_qcolormap.go index 2e77525a..e4e678f6 100644 --- a/qt/gen_qcolormap.go +++ b/qt/gen_qcolormap.go @@ -22,7 +22,8 @@ const ( ) type QColormap struct { - h *C.QColormap + h *C.QColormap + isSubclass bool } func (this *QColormap) cPointer() *C.QColormap { @@ -39,6 +40,7 @@ func (this *QColormap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColormap constructs the type using only CGO pointers. func newQColormap(h *C.QColormap) *QColormap { if h == nil { return nil @@ -46,14 +48,23 @@ func newQColormap(h *C.QColormap) *QColormap { return &QColormap{h: h} } +// UnsafeNewQColormap constructs the type using only unsafe pointers. func UnsafeNewQColormap(h unsafe.Pointer) *QColormap { - return newQColormap((*C.QColormap)(h)) + if h == nil { + return nil + } + + return &QColormap{h: (*C.QColormap)(h)} } // NewQColormap constructs a new QColormap object. func NewQColormap(colormap *QColormap) *QColormap { - ret := C.QColormap_new(colormap.cPointer()) - return newQColormap(ret) + var outptr_QColormap *C.QColormap = nil + + C.QColormap_new(colormap.cPointer(), &outptr_QColormap) + ret := newQColormap(outptr_QColormap) + ret.isSubclass = true + return ret } func QColormap_Initialize() { @@ -120,7 +131,7 @@ func QColormap_Instance1(screen int) *QColormap { // Delete this object from C++ memory. func (this *QColormap) Delete() { - C.QColormap_Delete(this.h) + C.QColormap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcolormap.h b/qt/gen_qcolormap.h index 6ac28e03..e9c41ca9 100644 --- a/qt/gen_qcolormap.h +++ b/qt/gen_qcolormap.h @@ -22,7 +22,7 @@ typedef struct QColor QColor; typedef struct QColormap QColormap; #endif -QColormap* QColormap_new(QColormap* colormap); +void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap); void QColormap_Initialize(); void QColormap_Cleanup(); QColormap* QColormap_Instance(); @@ -34,7 +34,7 @@ unsigned int QColormap_Pixel(const QColormap* self, QColor* color); QColor* QColormap_ColorAt(const QColormap* self, unsigned int pixel); struct miqt_array /* of QColor* */ QColormap_Colormap(const QColormap* self); QColormap* QColormap_Instance1(int screen); -void QColormap_Delete(QColormap* self); +void QColormap_Delete(QColormap* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcolorspace.cpp b/qt/gen_qcolorspace.cpp index 7d38c837..ba1caa92 100644 --- a/qt/gen_qcolorspace.cpp +++ b/qt/gen_qcolorspace.cpp @@ -6,36 +6,44 @@ #include "gen_qcolorspace.h" #include "_cgo_export.h" -QColorSpace* QColorSpace_new() { - return new QColorSpace(); +void QColorSpace_new(QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new2(int namedColorSpace) { - return new QColorSpace(static_cast(namedColorSpace)); +void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(namedColorSpace)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new3(int primaries, int transferFunction) { - return new QColorSpace(static_cast(primaries), static_cast(transferFunction)); +void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new4(int primaries, float gamma) { - return new QColorSpace(static_cast(primaries), static_cast(gamma)); +void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(gamma)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction) { - return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); +void QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new6(QColorSpace* colorSpace) { - return new QColorSpace(*colorSpace); +void QColorSpace_new6(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(*colorSpace); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new7(int primaries, int transferFunction, float gamma) { - return new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); +void QColorSpace_new7(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma) { - return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); +void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); + *outptr_QColorSpace = ret; } void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace) { @@ -106,7 +114,11 @@ QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int tran return new QColorSpace(self->withTransferFunction(static_cast(transferFunction), static_cast(gamma))); } -void QColorSpace_Delete(QColorSpace* self) { - delete self; +void QColorSpace_Delete(QColorSpace* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcolorspace.go b/qt/gen_qcolorspace.go index 35168c77..1899e337 100644 --- a/qt/gen_qcolorspace.go +++ b/qt/gen_qcolorspace.go @@ -44,7 +44,8 @@ const ( ) type QColorSpace struct { - h *C.QColorSpace + h *C.QColorSpace + isSubclass bool } func (this *QColorSpace) cPointer() *C.QColorSpace { @@ -61,6 +62,7 @@ func (this *QColorSpace) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColorSpace constructs the type using only CGO pointers. func newQColorSpace(h *C.QColorSpace) *QColorSpace { if h == nil { return nil @@ -68,56 +70,93 @@ func newQColorSpace(h *C.QColorSpace) *QColorSpace { return &QColorSpace{h: h} } +// UnsafeNewQColorSpace constructs the type using only unsafe pointers. func UnsafeNewQColorSpace(h unsafe.Pointer) *QColorSpace { - return newQColorSpace((*C.QColorSpace)(h)) + if h == nil { + return nil + } + + return &QColorSpace{h: (*C.QColorSpace)(h)} } // NewQColorSpace constructs a new QColorSpace object. func NewQColorSpace() *QColorSpace { - ret := C.QColorSpace_new() - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new(&outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace2 constructs a new QColorSpace object. func NewQColorSpace2(namedColorSpace QColorSpace__NamedColorSpace) *QColorSpace { - ret := C.QColorSpace_new2((C.int)(namedColorSpace)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new2((C.int)(namedColorSpace), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace3 constructs a new QColorSpace object. func NewQColorSpace3(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction) *QColorSpace { - ret := C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace4 constructs a new QColorSpace object. func NewQColorSpace4(primaries QColorSpace__Primaries, gamma float32) *QColorSpace { - ret := C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace5 constructs a new QColorSpace object. func NewQColorSpace5(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction) *QColorSpace { - ret := C.QColorSpace_new5(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new5(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace6 constructs a new QColorSpace object. func NewQColorSpace6(colorSpace *QColorSpace) *QColorSpace { - ret := C.QColorSpace_new6(colorSpace.cPointer()) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new6(colorSpace.cPointer(), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace7 constructs a new QColorSpace object. func NewQColorSpace7(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - ret := C.QColorSpace_new7((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new7((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace8 constructs a new QColorSpace object. func NewQColorSpace8(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - ret := C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } func (this *QColorSpace) OperatorAssign(colorSpace *QColorSpace) { @@ -200,7 +239,7 @@ func (this *QColorSpace) WithTransferFunction2(transferFunction QColorSpace__Tra // Delete this object from C++ memory. func (this *QColorSpace) Delete() { - C.QColorSpace_Delete(this.h) + C.QColorSpace_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcolorspace.h b/qt/gen_qcolorspace.h index 073e02f6..84e0d333 100644 --- a/qt/gen_qcolorspace.h +++ b/qt/gen_qcolorspace.h @@ -26,14 +26,14 @@ typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; #endif -QColorSpace* QColorSpace_new(); -QColorSpace* QColorSpace_new2(int namedColorSpace); -QColorSpace* QColorSpace_new3(int primaries, int transferFunction); -QColorSpace* QColorSpace_new4(int primaries, float gamma); -QColorSpace* QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction); -QColorSpace* QColorSpace_new6(QColorSpace* colorSpace); -QColorSpace* QColorSpace_new7(int primaries, int transferFunction, float gamma); -QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma); +void QColorSpace_new(QColorSpace** outptr_QColorSpace); +void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace); +void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace); +void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace); +void QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace); +void QColorSpace_new6(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace); +void QColorSpace_new7(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); +void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace); void QColorSpace_Swap(QColorSpace* self, QColorSpace* colorSpace); int QColorSpace_Primaries(const QColorSpace* self); @@ -49,7 +49,7 @@ struct miqt_string QColorSpace_IccProfile(const QColorSpace* self); QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, QColorSpace* colorspace); void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma); QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int transferFunction, float gamma); -void QColorSpace_Delete(QColorSpace* self); +void QColorSpace_Delete(QColorSpace* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcolortransform.cpp b/qt/gen_qcolortransform.cpp index c05a8f3b..8001ac67 100644 --- a/qt/gen_qcolortransform.cpp +++ b/qt/gen_qcolortransform.cpp @@ -5,12 +5,14 @@ #include "gen_qcolortransform.h" #include "_cgo_export.h" -QColorTransform* QColorTransform_new() { - return new QColorTransform(); +void QColorTransform_new(QColorTransform** outptr_QColorTransform) { + QColorTransform* ret = new QColorTransform(); + *outptr_QColorTransform = ret; } -QColorTransform* QColorTransform_new2(QColorTransform* colorTransform) { - return new QColorTransform(*colorTransform); +void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform) { + QColorTransform* ret = new QColorTransform(*colorTransform); + *outptr_QColorTransform = ret; } void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other) { @@ -34,7 +36,11 @@ QColor* QColorTransform_MapWithColor(const QColorTransform* self, QColor* color) return new QColor(self->map(*color)); } -void QColorTransform_Delete(QColorTransform* self) { - delete self; +void QColorTransform_Delete(QColorTransform* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcolortransform.go b/qt/gen_qcolortransform.go index f85ffdb6..f4142236 100644 --- a/qt/gen_qcolortransform.go +++ b/qt/gen_qcolortransform.go @@ -14,7 +14,8 @@ import ( ) type QColorTransform struct { - h *C.QColorTransform + h *C.QColorTransform + isSubclass bool } func (this *QColorTransform) cPointer() *C.QColorTransform { @@ -31,6 +32,7 @@ func (this *QColorTransform) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColorTransform constructs the type using only CGO pointers. func newQColorTransform(h *C.QColorTransform) *QColorTransform { if h == nil { return nil @@ -38,20 +40,33 @@ func newQColorTransform(h *C.QColorTransform) *QColorTransform { return &QColorTransform{h: h} } +// UnsafeNewQColorTransform constructs the type using only unsafe pointers. func UnsafeNewQColorTransform(h unsafe.Pointer) *QColorTransform { - return newQColorTransform((*C.QColorTransform)(h)) + if h == nil { + return nil + } + + return &QColorTransform{h: (*C.QColorTransform)(h)} } // NewQColorTransform constructs a new QColorTransform object. func NewQColorTransform() *QColorTransform { - ret := C.QColorTransform_new() - return newQColorTransform(ret) + var outptr_QColorTransform *C.QColorTransform = nil + + C.QColorTransform_new(&outptr_QColorTransform) + ret := newQColorTransform(outptr_QColorTransform) + ret.isSubclass = true + return ret } // NewQColorTransform2 constructs a new QColorTransform object. func NewQColorTransform2(colorTransform *QColorTransform) *QColorTransform { - ret := C.QColorTransform_new2(colorTransform.cPointer()) - return newQColorTransform(ret) + var outptr_QColorTransform *C.QColorTransform = nil + + C.QColorTransform_new2(colorTransform.cPointer(), &outptr_QColorTransform) + ret := newQColorTransform(outptr_QColorTransform) + ret.isSubclass = true + return ret } func (this *QColorTransform) OperatorAssign(other *QColorTransform) { @@ -82,7 +97,7 @@ func (this *QColorTransform) MapWithColor(color *QColor) *QColor { // Delete this object from C++ memory. func (this *QColorTransform) Delete() { - C.QColorTransform_Delete(this.h) + C.QColorTransform_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcolortransform.h b/qt/gen_qcolortransform.h index 8c609332..08e42404 100644 --- a/qt/gen_qcolortransform.h +++ b/qt/gen_qcolortransform.h @@ -24,14 +24,14 @@ typedef struct QColorTransform QColorTransform; typedef struct QRgba64 QRgba64; #endif -QColorTransform* QColorTransform_new(); -QColorTransform* QColorTransform_new2(QColorTransform* colorTransform); +void QColorTransform_new(QColorTransform** outptr_QColorTransform); +void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform); void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other); void QColorTransform_Swap(QColorTransform* self, QColorTransform* other); unsigned int QColorTransform_Map(const QColorTransform* self, unsigned int argb); QRgba64* QColorTransform_MapWithRgba64(const QColorTransform* self, QRgba64* rgba64); QColor* QColorTransform_MapWithColor(const QColorTransform* self, QColor* color); -void QColorTransform_Delete(QColorTransform* self); +void QColorTransform_Delete(QColorTransform* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcolumnview.cpp b/qt/gen_qcolumnview.cpp index f93ba2f4..952bbfed 100644 --- a/qt/gen_qcolumnview.cpp +++ b/qt/gen_qcolumnview.cpp @@ -1,26 +1,1545 @@ #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qcolumnview.h" #include "_cgo_export.h" -QColumnView* QColumnView_new(QWidget* parent) { - return new QColumnView(parent); +class MiqtVirtualQColumnView : public virtual QColumnView { +public: + + MiqtVirtualQColumnView(QWidget* parent): QColumnView(parent) {}; + MiqtVirtualQColumnView(): QColumnView() {}; + + virtual ~MiqtVirtualQColumnView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& point) const override { + if (handle__IndexAt == 0) { + return QColumnView::indexAt(point); + } + + const QPoint& point_ret = point; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&point_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QColumnView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* point) const { + + return new QModelIndex(QColumnView::indexAt(*point)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QColumnView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QColumnView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QColumnView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QColumnView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColumnView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QColumnView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QColumnView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QColumnView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QColumnView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QColumnView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QColumnView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QColumnView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QColumnView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QColumnView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QColumnView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QColumnView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QColumnView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QColumnView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QColumnView::selectAll(); + return; + } + + + miqt_exec_callback_QColumnView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QColumnView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QColumnView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QColumnView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QColumnView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QColumnView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QColumnView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QColumnView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QColumnView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QColumnView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QColumnView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QColumnView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QColumnView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QColumnView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QColumnView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QColumnView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QColumnView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QColumnView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QColumnView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QColumnView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QColumnView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QColumnView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QColumnView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QColumnView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QColumnView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QColumnView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QColumnView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QColumnView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateColumn = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemView* createColumn(const QModelIndex& rootIndex) override { + if (handle__CreateColumn == 0) { + return QColumnView::createColumn(rootIndex); + } + + const QModelIndex& rootIndex_ret = rootIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&rootIndex_ret); + + QAbstractItemView* callback_return_value = miqt_exec_callback_QColumnView_CreateColumn(this, handle__CreateColumn, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemView* virtualbase_CreateColumn(QModelIndex* rootIndex) { + + return QColumnView::createColumn(*rootIndex); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QColumnView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QColumnView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QColumnView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QColumnView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QColumnView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QColumnView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QColumnView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QColumnView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QColumnView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QColumnView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QColumnView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QColumnView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QColumnView::reset(); + return; + } + + + miqt_exec_callback_QColumnView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QColumnView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QColumnView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QColumnView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QColumnView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QColumnView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QColumnView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QColumnView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QColumnView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QColumnView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QColumnView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QColumnView::updateEditorData(); + return; + } + + + miqt_exec_callback_QColumnView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QColumnView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QColumnView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QColumnView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QColumnView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QColumnView::updateGeometries(); + return; + } + + + miqt_exec_callback_QColumnView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QColumnView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QColumnView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QColumnView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QColumnView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QColumnView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QColumnView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QColumnView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QColumnView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QColumnView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QColumnView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QColumnView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QColumnView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QColumnView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QColumnView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QColumnView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QColumnView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QColumnView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QColumnView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QColumnView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QColumnView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QColumnView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QColumnView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QColumnView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QColumnView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QColumnView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QColumnView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QColumnView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QColumnView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QColumnView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QColumnView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QColumnView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QColumnView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QColumnView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QColumnView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QColumnView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QColumnView::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QColumnView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QColumnView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QColumnView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QColumnView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QColumnView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QColumnView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QColumnView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QColumnView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QColumnView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QColumnView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QColumnView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QColumnView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QColumnView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QColumnView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QColumnView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QColumnView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QColumnView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QColumnView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QColumnView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QColumnView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QColumnView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QColumnView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QColumnView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QColumnView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QColumnView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QColumnView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QColumnView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QColumnView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QColumnView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QColumnView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QColumnView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QColumnView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QColumnView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QColumnView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QColumnView::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QColumnView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColumnView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QColumnView::viewportSizeHint()); + + } + +}; + +void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(parent); + *outptr_QColumnView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColumnView* QColumnView_new2() { - return new QColumnView(); +void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(); + *outptr_QColumnView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QColumnView_MetaObject(const QColumnView* self) { @@ -58,7 +1577,7 @@ void QColumnView_UpdatePreviewWidget(QColumnView* self, QModelIndex* index) { } void QColumnView_connect_UpdatePreviewWidget(QColumnView* self, intptr_t slot) { - QColumnView::connect(self, static_cast(&QColumnView::updatePreviewWidget), self, [=](const QModelIndex& index) { + MiqtVirtualQColumnView::connect(self, static_cast(&QColumnView::updatePreviewWidget), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -70,8 +1589,8 @@ QModelIndex* QColumnView_IndexAt(const QColumnView* self, QPoint* point) { return new QModelIndex(self->indexAt(*point)); } -void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index) { - self->scrollTo(*index); +void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QSize* QColumnView_SizeHint(const QColumnView* self) { @@ -181,11 +1700,483 @@ struct miqt_string QColumnView_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QColumnView_ScrollTo2(QColumnView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QColumnView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QColumnView_virtualbase_IndexAt(const void* self, QPoint* point) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_IndexAt(point); +} + +void QColumnView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ScrollTo = slot; +} + +void QColumnView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QColumnView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SizeHint = slot; +} + +QSize* QColumnView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SizeHint(); +} + +void QColumnView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VisualRect = slot; +} + +QRect* QColumnView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_VisualRect(index); +} + +void QColumnView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetModel = slot; +} + +void QColumnView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetModel(model); +} + +void QColumnView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetSelectionModel = slot; +} + +void QColumnView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QColumnView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetRootIndex = slot; +} + +void QColumnView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QColumnView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectAll = slot; +} + +void QColumnView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SelectAll(); +} + +void QColumnView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QColumnView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QColumnView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QColumnView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QColumnView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ResizeEvent = slot; +} + +void QColumnView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QColumnView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetSelection = slot; +} + +void QColumnView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QColumnView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__HorizontalOffset = slot; +} + +int QColumnView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QColumnView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VerticalOffset = slot; +} + +int QColumnView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_VerticalOffset(); +} + +void QColumnView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__RowsInserted = slot; +} + +void QColumnView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QColumnView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CurrentChanged = slot; +} + +void QColumnView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QColumnView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QColumnView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QColumnView_override_virtual_CreateColumn(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CreateColumn = slot; +} + +QAbstractItemView* QColumnView_virtualbase_CreateColumn(void* self, QModelIndex* rootIndex) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CreateColumn(rootIndex); +} + +void QColumnView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__KeyboardSearch = slot; +} + +void QColumnView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QColumnView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SizeHintForRow = slot; +} + +int QColumnView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QColumnView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QColumnView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QColumnView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QColumnView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QColumnView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__Reset = slot; +} + +void QColumnView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_Reset(); +} + +void QColumnView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DoItemsLayout = slot; +} + +void QColumnView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QColumnView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DataChanged = slot; +} + +void QColumnView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QColumnView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QColumnView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QColumnView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__UpdateEditorData = slot; +} + +void QColumnView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QColumnView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QColumnView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QColumnView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__UpdateGeometries = slot; +} + +void QColumnView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QColumnView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QColumnView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QColumnView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QColumnView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QColumnView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QColumnView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QColumnView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QColumnView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QColumnView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CloseEditor = slot; +} + +void QColumnView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QColumnView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CommitData = slot; +} + +void QColumnView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CommitData(editor); +} + +void QColumnView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__EditorDestroyed = slot; +} + +void QColumnView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QColumnView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QColumnView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QColumnView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__Edit2 = slot; +} + +bool QColumnView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QColumnView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectionCommand = slot; +} + +int QColumnView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QColumnView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__StartDrag = slot; +} + +void QColumnView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QColumnView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QColumnView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_ViewOptions(); +} + +void QColumnView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QColumnView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QColumnView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__Event = slot; +} + +bool QColumnView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_Event(event); +} + +void QColumnView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ViewportEvent = slot; +} + +bool QColumnView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QColumnView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MousePressEvent = slot; +} + +void QColumnView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QColumnView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QColumnView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QColumnView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QColumnView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QColumnView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QColumnView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QColumnView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DragEnterEvent = slot; +} + +void QColumnView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QColumnView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DragMoveEvent = slot; +} + +void QColumnView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QColumnView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QColumnView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QColumnView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DropEvent = slot; +} + +void QColumnView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DropEvent(event); +} + +void QColumnView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__FocusInEvent = slot; +} + +void QColumnView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QColumnView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__FocusOutEvent = slot; +} + +void QColumnView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QColumnView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__KeyPressEvent = slot; +} + +void QColumnView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QColumnView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__TimerEvent = slot; +} + +void QColumnView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_TimerEvent(event); +} + +void QColumnView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__InputMethodEvent = slot; +} + +void QColumnView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QColumnView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__EventFilter = slot; +} + +bool QColumnView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_EventFilter(object, event); +} + +void QColumnView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QColumnView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_ViewportSizeHint(); } -void QColumnView_Delete(QColumnView* self) { - delete self; +void QColumnView_Delete(QColumnView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcolumnview.go b/qt/gen_qcolumnview.go index 10555647..bbd52f62 100644 --- a/qt/gen_qcolumnview.go +++ b/qt/gen_qcolumnview.go @@ -15,7 +15,8 @@ import ( ) type QColumnView struct { - h *C.QColumnView + h *C.QColumnView + isSubclass bool *QAbstractItemView } @@ -33,27 +34,55 @@ func (this *QColumnView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQColumnView(h *C.QColumnView) *QColumnView { +// newQColumnView constructs the type using only CGO pointers. +func newQColumnView(h *C.QColumnView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColumnView { if h == nil { return nil } - return &QColumnView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QColumnView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQColumnView(h unsafe.Pointer) *QColumnView { - return newQColumnView((*C.QColumnView)(h)) +// UnsafeNewQColumnView constructs the type using only unsafe pointers. +func UnsafeNewQColumnView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColumnView { + if h == nil { + return nil + } + + return &QColumnView{h: (*C.QColumnView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQColumnView constructs a new QColumnView object. func NewQColumnView(parent *QWidget) *QColumnView { - ret := C.QColumnView_new(parent.cPointer()) - return newQColumnView(ret) + var outptr_QColumnView *C.QColumnView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColumnView_new(parent.cPointer(), &outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColumnView2 constructs a new QColumnView object. func NewQColumnView2() *QColumnView { - ret := C.QColumnView_new2() - return newQColumnView(ret) + var outptr_QColumnView *C.QColumnView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColumnView_new2(&outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QColumnView) MetaObject() *QMetaObject { @@ -111,8 +140,8 @@ func (this *QColumnView) IndexAt(point *QPoint) *QModelIndex { return _goptr } -func (this *QColumnView) ScrollTo(index *QModelIndex) { - C.QColumnView_ScrollTo(this.h, index.cPointer()) +func (this *QColumnView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QColumnView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QColumnView) SizeHint() *QSize { @@ -154,7 +183,7 @@ func (this *QColumnView) ResizeGripsVisible() bool { } func (this *QColumnView) PreviewWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QColumnView_PreviewWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QColumnView_PreviewWidget(this.h)), nil, nil) } func (this *QColumnView) SetPreviewWidget(widget *QWidget) { @@ -225,13 +254,1445 @@ func QColumnView_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QColumnView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QColumnView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QColumnView) callVirtualBase_IndexAt(point *QPoint) *QModelIndex { + + _ret := C.QColumnView_virtualbase_IndexAt(unsafe.Pointer(this.h), point.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnIndexAt(slot func(super func(point *QPoint) *QModelIndex, point *QPoint) *QModelIndex) { + C.QColumnView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_IndexAt +func miqt_exec_callback_QColumnView_IndexAt(self *C.QColumnView, cb C.intptr_t, point *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPoint) *QModelIndex, point *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QColumnView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QColumnView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QColumnView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ScrollTo +func miqt_exec_callback_QColumnView_ScrollTo(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QColumnView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QColumnView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QColumnView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SizeHint +func miqt_exec_callback_QColumnView_SizeHint(self *C.QColumnView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QColumnView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QColumnView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VisualRect +func miqt_exec_callback_QColumnView_VisualRect(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QColumnView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QColumnView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QColumnView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetModel +func miqt_exec_callback_QColumnView_SetModel(self *C.QColumnView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QColumnView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QColumnView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QColumnView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetSelectionModel +func miqt_exec_callback_QColumnView_SetSelectionModel(self *C.QColumnView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QColumnView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QColumnView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QColumnView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetRootIndex +func miqt_exec_callback_QColumnView_SetRootIndex(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SelectAll() { + + C.QColumnView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnSelectAll(slot func(super func())) { + C.QColumnView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectAll +func miqt_exec_callback_QColumnView_SelectAll(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QColumnView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QColumnView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QColumnView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QColumnView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_IsIndexHidden +func miqt_exec_callback_QColumnView_IsIndexHidden(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QColumnView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QColumnView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MoveCursor +func miqt_exec_callback_QColumnView_MoveCursor(self *C.QColumnView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QColumnView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QColumnView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ResizeEvent +func miqt_exec_callback_QColumnView_ResizeEvent(self *C.QColumnView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QColumnView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QColumnView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QColumnView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetSelection +func miqt_exec_callback_QColumnView_SetSelection(self *C.QColumnView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QColumnView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QColumnView) OnHorizontalOffset(slot func(super func() int) int) { + C.QColumnView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_HorizontalOffset +func miqt_exec_callback_QColumnView_HorizontalOffset(self *C.QColumnView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QColumnView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QColumnView) OnVerticalOffset(slot func(super func() int) int) { + C.QColumnView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VerticalOffset +func miqt_exec_callback_QColumnView_VerticalOffset(self *C.QColumnView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QColumnView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QColumnView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QColumnView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_RowsInserted +func miqt_exec_callback_QColumnView_RowsInserted(self *C.QColumnView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QColumnView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QColumnView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QColumnView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QColumnView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QColumnView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CurrentChanged +func miqt_exec_callback_QColumnView_CurrentChanged(self *C.QColumnView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QColumnView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QColumnView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QColumnView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QColumnView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ScrollContentsBy +func miqt_exec_callback_QColumnView_ScrollContentsBy(self *C.QColumnView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QColumnView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_CreateColumn(rootIndex *QModelIndex) *QAbstractItemView { + + return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QColumnView_virtualbase_CreateColumn(unsafe.Pointer(this.h), rootIndex.cPointer())), nil, nil, nil, nil, nil) +} +func (this *QColumnView) OnCreateColumn(slot func(super func(rootIndex *QModelIndex) *QAbstractItemView, rootIndex *QModelIndex) *QAbstractItemView) { + C.QColumnView_override_virtual_CreateColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CreateColumn +func miqt_exec_callback_QColumnView_CreateColumn(self *C.QColumnView, cb C.intptr_t, rootIndex *C.QModelIndex) *C.QAbstractItemView { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rootIndex *QModelIndex) *QAbstractItemView, rootIndex *QModelIndex) *QAbstractItemView) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(rootIndex)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_CreateColumn, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QColumnView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QColumnView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QColumnView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_KeyboardSearch +func miqt_exec_callback_QColumnView_KeyboardSearch(self *C.QColumnView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QColumnView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QColumnView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QColumnView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QColumnView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SizeHintForRow +func miqt_exec_callback_QColumnView_SizeHintForRow(self *C.QColumnView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QColumnView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QColumnView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QColumnView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SizeHintForColumn +func miqt_exec_callback_QColumnView_SizeHintForColumn(self *C.QColumnView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QColumnView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QColumnView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_InputMethodQuery +func miqt_exec_callback_QColumnView_InputMethodQuery(self *C.QColumnView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_Reset() { + + C.QColumnView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnReset(slot func(super func())) { + C.QColumnView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_Reset +func miqt_exec_callback_QColumnView_Reset(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_Reset) + +} + +func (this *QColumnView) callVirtualBase_DoItemsLayout() { + + C.QColumnView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnDoItemsLayout(slot func(super func())) { + C.QColumnView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DoItemsLayout +func miqt_exec_callback_QColumnView_DoItemsLayout(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QColumnView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QColumnView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QColumnView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QColumnView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DataChanged +func miqt_exec_callback_QColumnView_DataChanged(self *C.QColumnView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QColumnView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QColumnView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QColumnView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QColumnView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QColumnView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_RowsAboutToBeRemoved +func miqt_exec_callback_QColumnView_RowsAboutToBeRemoved(self *C.QColumnView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QColumnView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QColumnView) callVirtualBase_UpdateEditorData() { + + C.QColumnView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnUpdateEditorData(slot func(super func())) { + C.QColumnView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_UpdateEditorData +func miqt_exec_callback_QColumnView_UpdateEditorData(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QColumnView) callVirtualBase_UpdateEditorGeometries() { + + C.QColumnView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnUpdateEditorGeometries(slot func(super func())) { + C.QColumnView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_UpdateEditorGeometries +func miqt_exec_callback_QColumnView_UpdateEditorGeometries(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QColumnView) callVirtualBase_UpdateGeometries() { + + C.QColumnView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnUpdateGeometries(slot func(super func())) { + C.QColumnView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_UpdateGeometries +func miqt_exec_callback_QColumnView_UpdateGeometries(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QColumnView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QColumnView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QColumnView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QColumnView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VerticalScrollbarAction +func miqt_exec_callback_QColumnView_VerticalScrollbarAction(self *C.QColumnView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QColumnView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QColumnView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QColumnView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QColumnView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QColumnView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_HorizontalScrollbarAction +func miqt_exec_callback_QColumnView_HorizontalScrollbarAction(self *C.QColumnView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QColumnView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QColumnView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QColumnView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QColumnView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QColumnView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VerticalScrollbarValueChanged +func miqt_exec_callback_QColumnView_VerticalScrollbarValueChanged(self *C.QColumnView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QColumnView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QColumnView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QColumnView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QColumnView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QColumnView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QColumnView_HorizontalScrollbarValueChanged(self *C.QColumnView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QColumnView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QColumnView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QColumnView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QColumnView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QColumnView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CloseEditor +func miqt_exec_callback_QColumnView_CloseEditor(self *C.QColumnView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QColumnView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_CommitData(editor *QWidget) { + + C.QColumnView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QColumnView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QColumnView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CommitData +func miqt_exec_callback_QColumnView_CommitData(self *C.QColumnView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QColumnView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QColumnView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QColumnView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QColumnView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_EditorDestroyed +func miqt_exec_callback_QColumnView_EditorDestroyed(self *C.QColumnView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QColumnView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QColumnView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QColumnView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QColumnView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectedIndexes +func miqt_exec_callback_QColumnView_SelectedIndexes(self *C.QColumnView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QColumnView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QColumnView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QColumnView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_Edit2 +func miqt_exec_callback_QColumnView_Edit2(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QColumnView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QColumnView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QColumnView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectionCommand +func miqt_exec_callback_QColumnView_SelectionCommand(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QColumnView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QColumnView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QColumnView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_StartDrag +func miqt_exec_callback_QColumnView_StartDrag(self *C.QColumnView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QColumnView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QColumnView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QColumnView_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QColumnView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ViewOptions +func miqt_exec_callback_QColumnView_ViewOptions(self *C.QColumnView, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QColumnView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QColumnView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QColumnView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_FocusNextPrevChild +func miqt_exec_callback_QColumnView_FocusNextPrevChild(self *C.QColumnView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QColumnView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QColumnView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_Event +func miqt_exec_callback_QColumnView_Event(self *C.QColumnView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QColumnView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QColumnView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ViewportEvent +func miqt_exec_callback_QColumnView_ViewportEvent(self *C.QColumnView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MousePressEvent +func miqt_exec_callback_QColumnView_MousePressEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MouseMoveEvent +func miqt_exec_callback_QColumnView_MouseMoveEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MouseReleaseEvent +func miqt_exec_callback_QColumnView_MouseReleaseEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MouseDoubleClickEvent +func miqt_exec_callback_QColumnView_MouseDoubleClickEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QColumnView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QColumnView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DragEnterEvent +func miqt_exec_callback_QColumnView_DragEnterEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QColumnView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QColumnView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DragMoveEvent +func miqt_exec_callback_QColumnView_DragMoveEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QColumnView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QColumnView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DragLeaveEvent +func miqt_exec_callback_QColumnView_DragLeaveEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QColumnView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QColumnView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DropEvent +func miqt_exec_callback_QColumnView_DropEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QColumnView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QColumnView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_FocusInEvent +func miqt_exec_callback_QColumnView_FocusInEvent(self *C.QColumnView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QColumnView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QColumnView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_FocusOutEvent +func miqt_exec_callback_QColumnView_FocusOutEvent(self *C.QColumnView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QColumnView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QColumnView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_KeyPressEvent +func miqt_exec_callback_QColumnView_KeyPressEvent(self *C.QColumnView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QColumnView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QColumnView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_TimerEvent +func miqt_exec_callback_QColumnView_TimerEvent(self *C.QColumnView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QColumnView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QColumnView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_InputMethodEvent +func miqt_exec_callback_QColumnView_InputMethodEvent(self *C.QColumnView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QColumnView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QColumnView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_EventFilter +func miqt_exec_callback_QColumnView_EventFilter(self *C.QColumnView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QColumnView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QColumnView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ViewportSizeHint +func miqt_exec_callback_QColumnView_ViewportSizeHint(self *C.QColumnView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QColumnView) Delete() { - C.QColumnView_Delete(this.h) + C.QColumnView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcolumnview.h b/qt/gen_qcolumnview.h index 4ddea4f3..1dd80ac9 100644 --- a/qt/gen_qcolumnview.h +++ b/qt/gen_qcolumnview.h @@ -16,28 +16,64 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; class QColumnView; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QVariant; class QWidget; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QColumnView QColumnView; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QColumnView* QColumnView_new(QWidget* parent); -QColumnView* QColumnView_new2(); +void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QColumnView_MetaObject(const QColumnView* self); void* QColumnView_Metacast(QColumnView* self, const char* param1); struct miqt_string QColumnView_Tr(const char* s); @@ -45,7 +81,7 @@ struct miqt_string QColumnView_TrUtf8(const char* s); void QColumnView_UpdatePreviewWidget(QColumnView* self, QModelIndex* index); void QColumnView_connect_UpdatePreviewWidget(QColumnView* self, intptr_t slot); QModelIndex* QColumnView_IndexAt(const QColumnView* self, QPoint* point); -void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index); +void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index, int hint); QSize* QColumnView_SizeHint(const QColumnView* self); QRect* QColumnView_VisualRect(const QColumnView* self, QModelIndex* index); void QColumnView_SetModel(QColumnView* self, QAbstractItemModel* model); @@ -58,12 +94,139 @@ QWidget* QColumnView_PreviewWidget(const QColumnView* self); void QColumnView_SetPreviewWidget(QColumnView* self, QWidget* widget); void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array /* of int */ list); struct miqt_array /* of int */ QColumnView_ColumnWidths(const QColumnView* self); +bool QColumnView_IsIndexHidden(const QColumnView* self, QModelIndex* index); +QModelIndex* QColumnView_MoveCursor(QColumnView* self, int cursorAction, int modifiers); +void QColumnView_ResizeEvent(QColumnView* self, QResizeEvent* event); +void QColumnView_SetSelection(QColumnView* self, QRect* rect, int command); +int QColumnView_HorizontalOffset(const QColumnView* self); +int QColumnView_VerticalOffset(const QColumnView* self); +void QColumnView_RowsInserted(QColumnView* self, QModelIndex* parent, int start, int end); +void QColumnView_CurrentChanged(QColumnView* self, QModelIndex* current, QModelIndex* previous); +void QColumnView_ScrollContentsBy(QColumnView* self, int dx, int dy); +QAbstractItemView* QColumnView_CreateColumn(QColumnView* self, QModelIndex* rootIndex); struct miqt_string QColumnView_Tr2(const char* s, const char* c); struct miqt_string QColumnView_Tr3(const char* s, const char* c, int n); struct miqt_string QColumnView_TrUtf82(const char* s, const char* c); struct miqt_string QColumnView_TrUtf83(const char* s, const char* c, int n); -void QColumnView_ScrollTo2(QColumnView* self, QModelIndex* index, int hint); -void QColumnView_Delete(QColumnView* self); +void QColumnView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QColumnView_virtualbase_IndexAt(const void* self, QPoint* point); +void QColumnView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QColumnView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QColumnView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QColumnView_virtualbase_SizeHint(const void* self); +void QColumnView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QColumnView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QColumnView_override_virtual_SetModel(void* self, intptr_t slot); +void QColumnView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QColumnView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QColumnView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QColumnView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QColumnView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QColumnView_override_virtual_SelectAll(void* self, intptr_t slot); +void QColumnView_virtualbase_SelectAll(void* self); +void QColumnView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QColumnView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QColumnView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QColumnView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QColumnView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QColumnView_override_virtual_SetSelection(void* self, intptr_t slot); +void QColumnView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QColumnView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QColumnView_virtualbase_HorizontalOffset(const void* self); +void QColumnView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QColumnView_virtualbase_VerticalOffset(const void* self); +void QColumnView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QColumnView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QColumnView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QColumnView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QColumnView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QColumnView_override_virtual_CreateColumn(void* self, intptr_t slot); +QAbstractItemView* QColumnView_virtualbase_CreateColumn(void* self, QModelIndex* rootIndex); +void QColumnView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QColumnView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QColumnView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QColumnView_virtualbase_SizeHintForRow(const void* self, int row); +void QColumnView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QColumnView_virtualbase_SizeHintForColumn(const void* self, int column); +void QColumnView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QColumnView_virtualbase_InputMethodQuery(const void* self, int query); +void QColumnView_override_virtual_Reset(void* self, intptr_t slot); +void QColumnView_virtualbase_Reset(void* self); +void QColumnView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QColumnView_virtualbase_DoItemsLayout(void* self); +void QColumnView_override_virtual_DataChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QColumnView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QColumnView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QColumnView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QColumnView_virtualbase_UpdateEditorData(void* self); +void QColumnView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QColumnView_virtualbase_UpdateEditorGeometries(void* self); +void QColumnView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QColumnView_virtualbase_UpdateGeometries(void* self); +void QColumnView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QColumnView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QColumnView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QColumnView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QColumnView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QColumnView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QColumnView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QColumnView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QColumnView_override_virtual_CommitData(void* self, intptr_t slot); +void QColumnView_virtualbase_CommitData(void* self, QWidget* editor); +void QColumnView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QColumnView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QColumnView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QColumnView_virtualbase_SelectedIndexes(const void* self); +void QColumnView_override_virtual_Edit2(void* self, intptr_t slot); +bool QColumnView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QColumnView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QColumnView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QColumnView_override_virtual_StartDrag(void* self, intptr_t slot); +void QColumnView_virtualbase_StartDrag(void* self, int supportedActions); +void QColumnView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QColumnView_virtualbase_ViewOptions(const void* self); +void QColumnView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QColumnView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QColumnView_override_virtual_Event(void* self, intptr_t slot); +bool QColumnView_virtualbase_Event(void* self, QEvent* event); +void QColumnView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QColumnView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QColumnView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QColumnView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QColumnView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QColumnView_override_virtual_DropEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QColumnView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QColumnView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QColumnView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QColumnView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QColumnView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QColumnView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QColumnView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QColumnView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QColumnView_virtualbase_ViewportSizeHint(const void* self); +void QColumnView_Delete(QColumnView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcombobox.cpp b/qt/gen_qcombobox.cpp index 8772dece..9b2fa5b6 100644 --- a/qt/gen_qcombobox.cpp +++ b/qt/gen_qcombobox.cpp @@ -1,31 +1,1094 @@ #include #include #include +#include +#include +#include #include #include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include +#include #include #include #include "gen_qcombobox.h" #include "_cgo_export.h" -QComboBox* QComboBox_new(QWidget* parent) { - return new QComboBox(parent); +class MiqtVirtualQComboBox : public virtual QComboBox { +public: + + MiqtVirtualQComboBox(QWidget* parent): QComboBox(parent) {}; + MiqtVirtualQComboBox(): QComboBox() {}; + + virtual ~MiqtVirtualQComboBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QComboBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QComboBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QComboBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QComboBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QComboBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QComboBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowPopup = 0; + + // Subclass to allow providing a Go implementation + virtual void showPopup() override { + if (handle__ShowPopup == 0) { + QComboBox::showPopup(); + return; + } + + + miqt_exec_callback_QComboBox_ShowPopup(this, handle__ShowPopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowPopup() { + + QComboBox::showPopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HidePopup = 0; + + // Subclass to allow providing a Go implementation + virtual void hidePopup() override { + if (handle__HidePopup == 0) { + QComboBox::hidePopup(); + return; + } + + + miqt_exec_callback_QComboBox_HidePopup(this, handle__HidePopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HidePopup() { + + QComboBox::hidePopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QComboBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QComboBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QComboBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QComboBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QComboBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QComboBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QComboBox::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QComboBox::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QComboBox::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QComboBox::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QComboBox::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QComboBox::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QComboBox::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QComboBox::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QComboBox::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QComboBox::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* e) override { + if (handle__ShowEvent == 0) { + QComboBox::showEvent(e); + return; + } + + QShowEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* e) { + + QComboBox::showEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* e) override { + if (handle__HideEvent == 0) { + QComboBox::hideEvent(e); + return; + } + + QHideEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* e) { + + QComboBox::hideEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QComboBox::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QComboBox::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QComboBox::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QComboBox::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QComboBox::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QComboBox::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QComboBox::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QComboBox::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QComboBox::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QComboBox::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QComboBox::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QComboBox::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QComboBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QComboBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QComboBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QComboBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QComboBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QComboBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QComboBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QComboBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QComboBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QComboBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QComboBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QComboBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QComboBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QComboBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QComboBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QComboBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QComboBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QComboBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QComboBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QComboBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QComboBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QComboBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QComboBox::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QComboBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QComboBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QComboBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QComboBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QComboBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QComboBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QComboBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QComboBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QComboBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QComboBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QComboBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QComboBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QComboBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QComboBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QComboBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QComboBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QComboBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QComboBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QComboBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QComboBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QComboBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QComboBox::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QComboBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QComboBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QComboBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QComboBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QComboBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QComboBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QComboBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QComboBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QComboBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QComboBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QComboBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QComboBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QComboBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QComboBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QComboBox::focusNextPrevChild(next); + + } + +}; + +void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(parent); + *outptr_QComboBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QComboBox* QComboBox_new2() { - return new QComboBox(); +void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(); + *outptr_QComboBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QComboBox_MetaObject(const QComboBox* self) { @@ -399,7 +1462,7 @@ void QComboBox_EditTextChanged(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_EditTextChanged(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::editTextChanged), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::editTextChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -417,7 +1480,7 @@ void QComboBox_Activated(QComboBox* self, int index) { } void QComboBox_connect_Activated(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](int index) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QComboBox_Activated(slot, sigval1); }); @@ -429,7 +1492,7 @@ void QComboBox_TextActivated(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_TextActivated(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::textActivated), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::textActivated), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -447,7 +1510,7 @@ void QComboBox_Highlighted(QComboBox* self, int index) { } void QComboBox_connect_Highlighted(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](int index) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QComboBox_Highlighted(slot, sigval1); }); @@ -459,7 +1522,7 @@ void QComboBox_TextHighlighted(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_TextHighlighted(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::textHighlighted), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::textHighlighted), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -477,7 +1540,7 @@ void QComboBox_CurrentIndexChanged(QComboBox* self, int index) { } void QComboBox_connect_CurrentIndexChanged(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](int index) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QComboBox_CurrentIndexChanged(slot, sigval1); }); @@ -489,7 +1552,7 @@ void QComboBox_CurrentIndexChangedWithQString(QComboBox* self, struct miqt_strin } void QComboBox_connect_CurrentIndexChangedWithQString(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -508,7 +1571,7 @@ void QComboBox_CurrentTextChanged(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_CurrentTextChanged(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::currentTextChanged), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::currentTextChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -527,7 +1590,7 @@ void QComboBox_ActivatedWithQString(QComboBox* self, struct miqt_string param1) } void QComboBox_connect_ActivatedWithQString(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -546,7 +1609,7 @@ void QComboBox_HighlightedWithQString(QComboBox* self, struct miqt_string param1 } void QComboBox_connect_HighlightedWithQString(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -648,7 +1711,355 @@ void QComboBox_SetItemData3(QComboBox* self, int index, QVariant* value, int rol self->setItemData(static_cast(index), *value, static_cast(role)); } -void QComboBox_Delete(QComboBox* self) { - delete self; +void QComboBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QComboBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_SizeHint(); +} + +void QComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QComboBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QComboBox_override_virtual_ShowPopup(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ShowPopup = slot; +} + +void QComboBox_virtualbase_ShowPopup(void* self) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ShowPopup(); +} + +void QComboBox_override_virtual_HidePopup(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HidePopup = slot; +} + +void QComboBox_virtualbase_HidePopup(void* self) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_HidePopup(); +} + +void QComboBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__Event = slot; +} + +bool QComboBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQComboBox*)(self) )->virtualbase_Event(event); +} + +void QComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QComboBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__FocusInEvent = slot; +} + +void QComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_FocusInEvent(e); +} + +void QComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ChangeEvent = slot; +} + +void QComboBox_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ChangeEvent(e); +} + +void QComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ResizeEvent = slot; +} + +void QComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ResizeEvent(e); +} + +void QComboBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__PaintEvent = slot; +} + +void QComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_PaintEvent(e); +} + +void QComboBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ShowEvent = slot; +} + +void QComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ShowEvent(e); +} + +void QComboBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HideEvent = slot; +} + +void QComboBox_virtualbase_HideEvent(void* self, QHideEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_HideEvent(e); +} + +void QComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MousePressEvent = slot; +} + +void QComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MousePressEvent(e); +} + +void QComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QComboBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__WheelEvent = slot; +} + +void QComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_WheelEvent(e); +} + +void QComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QComboBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DevType = slot; +} + +int QComboBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_DevType(); +} + +void QComboBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SetVisible = slot; +} + +void QComboBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QComboBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HeightForWidth = slot; +} + +int QComboBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QComboBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QComboBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QComboBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QComboBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_PaintEngine(); +} + +void QComboBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QComboBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QComboBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QComboBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QComboBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__EnterEvent = slot; +} + +void QComboBox_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QComboBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__LeaveEvent = slot; +} + +void QComboBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QComboBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MoveEvent = slot; +} + +void QComboBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QComboBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__CloseEvent = slot; +} + +void QComboBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QComboBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__TabletEvent = slot; +} + +void QComboBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QComboBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ActionEvent = slot; +} + +void QComboBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QComboBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QComboBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QComboBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QComboBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QComboBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QComboBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QComboBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DropEvent = slot; +} + +void QComboBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DropEvent(event); +} + +void QComboBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__NativeEvent = slot; +} + +bool QComboBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQComboBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QComboBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__Metric = slot; +} + +int QComboBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_Metric(param1); +} + +void QComboBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InitPainter = slot; +} + +void QComboBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QComboBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QComboBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_Redirected(offset); +} + +void QComboBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QComboBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_SharedPainter(); +} + +void QComboBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QComboBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQComboBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QComboBox_Delete(QComboBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcombobox.go b/qt/gen_qcombobox.go index 0a449079..d568b4e3 100644 --- a/qt/gen_qcombobox.go +++ b/qt/gen_qcombobox.go @@ -36,7 +36,8 @@ const ( ) type QComboBox struct { - h *C.QComboBox + h *C.QComboBox + isSubclass bool *QWidget } @@ -54,27 +55,49 @@ func (this *QComboBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQComboBox(h *C.QComboBox) *QComboBox { +// newQComboBox constructs the type using only CGO pointers. +func newQComboBox(h *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QComboBox { if h == nil { return nil } - return &QComboBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QComboBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQComboBox(h unsafe.Pointer) *QComboBox { - return newQComboBox((*C.QComboBox)(h)) +// UnsafeNewQComboBox constructs the type using only unsafe pointers. +func UnsafeNewQComboBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QComboBox { + if h == nil { + return nil + } + + return &QComboBox{h: (*C.QComboBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQComboBox constructs a new QComboBox object. func NewQComboBox(parent *QWidget) *QComboBox { - ret := C.QComboBox_new(parent.cPointer()) - return newQComboBox(ret) + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QComboBox_new(parent.cPointer(), &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQComboBox2 constructs a new QComboBox object. func NewQComboBox2() *QComboBox { - ret := C.QComboBox_new2() - return newQComboBox(ret) + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QComboBox_new2(&outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QComboBox) MetaObject() *QMetaObject { @@ -232,7 +255,7 @@ func (this *QComboBox) SetLineEdit(edit *QLineEdit) { } func (this *QComboBox) LineEdit() *QLineEdit { - return UnsafeNewQLineEdit(unsafe.Pointer(C.QComboBox_LineEdit(this.h))) + return UnsafeNewQLineEdit(unsafe.Pointer(C.QComboBox_LineEdit(this.h)), nil, nil, nil) } func (this *QComboBox) SetValidator(v *QValidator) { @@ -240,7 +263,7 @@ func (this *QComboBox) SetValidator(v *QValidator) { } func (this *QComboBox) Validator() *QValidator { - return UnsafeNewQValidator(unsafe.Pointer(C.QComboBox_Validator(this.h))) + return UnsafeNewQValidator(unsafe.Pointer(C.QComboBox_Validator(this.h)), nil) } func (this *QComboBox) SetCompleter(c *QCompleter) { @@ -248,11 +271,11 @@ func (this *QComboBox) SetCompleter(c *QCompleter) { } func (this *QComboBox) Completer() *QCompleter { - return UnsafeNewQCompleter(unsafe.Pointer(C.QComboBox_Completer(this.h))) + return UnsafeNewQCompleter(unsafe.Pointer(C.QComboBox_Completer(this.h)), nil) } func (this *QComboBox) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QComboBox_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QComboBox_ItemDelegate(this.h)), nil) } func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -260,7 +283,7 @@ func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QComboBox) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QComboBox_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QComboBox_Model(this.h)), nil) } func (this *QComboBox) SetModel(model *QAbstractItemModel) { @@ -410,7 +433,7 @@ func (this *QComboBox) SetItemData(index int, value *QVariant) { } func (this *QComboBox) View() *QAbstractItemView { - return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QComboBox_View(this.h))) + return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QComboBox_View(this.h)), nil, nil, nil, nil, nil) } func (this *QComboBox) SetView(itemView *QAbstractItemView) { @@ -844,9 +867,1015 @@ func (this *QComboBox) SetItemData3(index int, value *QVariant, role int) { C.QComboBox_SetItemData3(this.h, (C.int)(index), value.cPointer(), (C.int)(role)) } +func (this *QComboBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QComboBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QComboBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QComboBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SizeHint +func miqt_exec_callback_QComboBox_SizeHint(self *C.QComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QComboBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QComboBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QComboBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MinimumSizeHint +func miqt_exec_callback_QComboBox_MinimumSizeHint(self *C.QComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_ShowPopup() { + + C.QComboBox_virtualbase_ShowPopup(unsafe.Pointer(this.h)) + +} +func (this *QComboBox) OnShowPopup(slot func(super func())) { + C.QComboBox_override_virtual_ShowPopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ShowPopup +func miqt_exec_callback_QComboBox_ShowPopup(self *C.QComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QComboBox{h: self}).callVirtualBase_ShowPopup) + +} + +func (this *QComboBox) callVirtualBase_HidePopup() { + + C.QComboBox_virtualbase_HidePopup(unsafe.Pointer(this.h)) + +} +func (this *QComboBox) OnHidePopup(slot func(super func())) { + C.QComboBox_override_virtual_HidePopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HidePopup +func miqt_exec_callback_QComboBox_HidePopup(self *C.QComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QComboBox{h: self}).callVirtualBase_HidePopup) + +} + +func (this *QComboBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QComboBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QComboBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QComboBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_Event +func miqt_exec_callback_QComboBox_Event(self *C.QComboBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QComboBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QComboBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QComboBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InputMethodQuery +func miqt_exec_callback_QComboBox_InputMethodQuery(self *C.QComboBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QComboBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QComboBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_FocusInEvent +func miqt_exec_callback_QComboBox_FocusInEvent(self *C.QComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QComboBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QComboBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_FocusOutEvent +func miqt_exec_callback_QComboBox_FocusOutEvent(self *C.QComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QComboBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QComboBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ChangeEvent +func miqt_exec_callback_QComboBox_ChangeEvent(self *C.QComboBox, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QComboBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QComboBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QComboBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ResizeEvent +func miqt_exec_callback_QComboBox_ResizeEvent(self *C.QComboBox, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QComboBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QComboBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_PaintEvent +func miqt_exec_callback_QComboBox_PaintEvent(self *C.QComboBox, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ShowEvent(e *QShowEvent) { + + C.QComboBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnShowEvent(slot func(super func(e *QShowEvent), e *QShowEvent)) { + C.QComboBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ShowEvent +func miqt_exec_callback_QComboBox_ShowEvent(self *C.QComboBox, cb C.intptr_t, e *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QShowEvent), e *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_HideEvent(e *QHideEvent) { + + C.QComboBox_virtualbase_HideEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnHideEvent(slot func(super func(e *QHideEvent), e *QHideEvent)) { + C.QComboBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HideEvent +func miqt_exec_callback_QComboBox_HideEvent(self *C.QComboBox, cb C.intptr_t, e *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QHideEvent), e *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QComboBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QComboBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MousePressEvent +func miqt_exec_callback_QComboBox_MousePressEvent(self *C.QComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QComboBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QComboBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MouseReleaseEvent +func miqt_exec_callback_QComboBox_MouseReleaseEvent(self *C.QComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QComboBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QComboBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_KeyPressEvent +func miqt_exec_callback_QComboBox_KeyPressEvent(self *C.QComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QComboBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QComboBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_KeyReleaseEvent +func miqt_exec_callback_QComboBox_KeyReleaseEvent(self *C.QComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QComboBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QComboBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_WheelEvent +func miqt_exec_callback_QComboBox_WheelEvent(self *C.QComboBox, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QComboBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QComboBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ContextMenuEvent +func miqt_exec_callback_QComboBox_ContextMenuEvent(self *C.QComboBox, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QComboBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QComboBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QComboBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InputMethodEvent +func miqt_exec_callback_QComboBox_InputMethodEvent(self *C.QComboBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DevType() int { + + return (int)(C.QComboBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QComboBox) OnDevType(slot func(super func() int) int) { + C.QComboBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DevType +func miqt_exec_callback_QComboBox_DevType(self *C.QComboBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_SetVisible(visible bool) { + + C.QComboBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QComboBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QComboBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SetVisible +func miqt_exec_callback_QComboBox_SetVisible(self *C.QComboBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QComboBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QComboBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QComboBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QComboBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QComboBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HeightForWidth +func miqt_exec_callback_QComboBox_HeightForWidth(self *C.QComboBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QComboBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QComboBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QComboBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HasHeightForWidth +func miqt_exec_callback_QComboBox_HasHeightForWidth(self *C.QComboBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QComboBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QComboBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QComboBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_PaintEngine +func miqt_exec_callback_QComboBox_PaintEngine(self *C.QComboBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QComboBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QComboBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MouseDoubleClickEvent +func miqt_exec_callback_QComboBox_MouseDoubleClickEvent(self *C.QComboBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QComboBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QComboBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MouseMoveEvent +func miqt_exec_callback_QComboBox_MouseMoveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_EnterEvent(event *QEvent) { + + C.QComboBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QComboBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_EnterEvent +func miqt_exec_callback_QComboBox_EnterEvent(self *C.QComboBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QComboBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QComboBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QComboBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_LeaveEvent +func miqt_exec_callback_QComboBox_LeaveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QComboBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QComboBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QComboBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MoveEvent +func miqt_exec_callback_QComboBox_MoveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QComboBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QComboBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_CloseEvent +func miqt_exec_callback_QComboBox_CloseEvent(self *C.QComboBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QComboBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QComboBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_TabletEvent +func miqt_exec_callback_QComboBox_TabletEvent(self *C.QComboBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QComboBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QComboBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ActionEvent +func miqt_exec_callback_QComboBox_ActionEvent(self *C.QComboBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QComboBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QComboBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DragEnterEvent +func miqt_exec_callback_QComboBox_DragEnterEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QComboBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QComboBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DragMoveEvent +func miqt_exec_callback_QComboBox_DragMoveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QComboBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QComboBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DragLeaveEvent +func miqt_exec_callback_QComboBox_DragLeaveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QComboBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QComboBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DropEvent +func miqt_exec_callback_QComboBox_DropEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QComboBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QComboBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QComboBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_NativeEvent +func miqt_exec_callback_QComboBox_NativeEvent(self *C.QComboBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QComboBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QComboBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QComboBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_Metric +func miqt_exec_callback_QComboBox_Metric(self *C.QComboBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QComboBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QComboBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QComboBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InitPainter +func miqt_exec_callback_QComboBox_InitPainter(self *C.QComboBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QComboBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QComboBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QComboBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QComboBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QComboBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_Redirected +func miqt_exec_callback_QComboBox_Redirected(self *C.QComboBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QComboBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QComboBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QComboBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SharedPainter +func miqt_exec_callback_QComboBox_SharedPainter(self *C.QComboBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QComboBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QComboBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QComboBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_FocusNextPrevChild +func miqt_exec_callback_QComboBox_FocusNextPrevChild(self *C.QComboBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QComboBox) Delete() { - C.QComboBox_Delete(this.h) + C.QComboBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcombobox.h b/qt/gen_qcombobox.h index 6fd4e6ad..4d2c4929 100644 --- a/qt/gen_qcombobox.h +++ b/qt/gen_qcombobox.h @@ -18,36 +18,84 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; +class QActionEvent; +class QByteArray; +class QCloseEvent; class QComboBox; class QCompleter; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QLineEdit; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QValidator; class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QComboBox QComboBox; typedef struct QCompleter QCompleter; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineEdit QLineEdit; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QValidator QValidator; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QComboBox* QComboBox_new(QWidget* parent); -QComboBox* QComboBox_new2(); +void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QComboBox_MetaObject(const QComboBox* self); void* QComboBox_Metacast(QComboBox* self, const char* param1); struct miqt_string QComboBox_Tr(const char* s); @@ -144,6 +192,20 @@ void QComboBox_ActivatedWithQString(QComboBox* self, struct miqt_string param1); void QComboBox_connect_ActivatedWithQString(QComboBox* self, intptr_t slot); void QComboBox_HighlightedWithQString(QComboBox* self, struct miqt_string param1); void QComboBox_connect_HighlightedWithQString(QComboBox* self, intptr_t slot); +void QComboBox_FocusInEvent(QComboBox* self, QFocusEvent* e); +void QComboBox_FocusOutEvent(QComboBox* self, QFocusEvent* e); +void QComboBox_ChangeEvent(QComboBox* self, QEvent* e); +void QComboBox_ResizeEvent(QComboBox* self, QResizeEvent* e); +void QComboBox_PaintEvent(QComboBox* self, QPaintEvent* e); +void QComboBox_ShowEvent(QComboBox* self, QShowEvent* e); +void QComboBox_HideEvent(QComboBox* self, QHideEvent* e); +void QComboBox_MousePressEvent(QComboBox* self, QMouseEvent* e); +void QComboBox_MouseReleaseEvent(QComboBox* self, QMouseEvent* e); +void QComboBox_KeyPressEvent(QComboBox* self, QKeyEvent* e); +void QComboBox_KeyReleaseEvent(QComboBox* self, QKeyEvent* e); +void QComboBox_WheelEvent(QComboBox* self, QWheelEvent* e); +void QComboBox_ContextMenuEvent(QComboBox* self, QContextMenuEvent* e); +void QComboBox_InputMethodEvent(QComboBox* self, QInputMethodEvent* param1); struct miqt_string QComboBox_Tr2(const char* s, const char* c); struct miqt_string QComboBox_Tr3(const char* s, const char* c, int n); struct miqt_string QComboBox_TrUtf82(const char* s, const char* c); @@ -158,7 +220,93 @@ void QComboBox_AddItem3(QComboBox* self, QIcon* icon, struct miqt_string text, Q void QComboBox_InsertItem3(QComboBox* self, int index, struct miqt_string text, QVariant* userData); void QComboBox_InsertItem4(QComboBox* self, int index, QIcon* icon, struct miqt_string text, QVariant* userData); void QComboBox_SetItemData3(QComboBox* self, int index, QVariant* value, int role); -void QComboBox_Delete(QComboBox* self); +void QComboBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QComboBox_virtualbase_SizeHint(const void* self); +void QComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QComboBox_virtualbase_MinimumSizeHint(const void* self); +void QComboBox_override_virtual_ShowPopup(void* self, intptr_t slot); +void QComboBox_virtualbase_ShowPopup(void* self); +void QComboBox_override_virtual_HidePopup(void* self, intptr_t slot); +void QComboBox_virtualbase_HidePopup(void* self); +void QComboBox_override_virtual_Event(void* self, intptr_t slot); +bool QComboBox_virtualbase_Event(void* self, QEvent* event); +void QComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QComboBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ChangeEvent(void* self, QEvent* e); +void QComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QComboBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QComboBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e); +void QComboBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_HideEvent(void* self, QHideEvent* e); +void QComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QComboBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QComboBox_override_virtual_DevType(void* self, intptr_t slot); +int QComboBox_virtualbase_DevType(const void* self); +void QComboBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QComboBox_virtualbase_SetVisible(void* self, bool visible); +void QComboBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QComboBox_virtualbase_HeightForWidth(const void* self, int param1); +void QComboBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QComboBox_virtualbase_HasHeightForWidth(const void* self); +void QComboBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QComboBox_virtualbase_PaintEngine(const void* self); +void QComboBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QComboBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QComboBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_EnterEvent(void* self, QEvent* event); +void QComboBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QComboBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QComboBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QComboBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QComboBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QComboBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QComboBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QComboBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QComboBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QComboBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QComboBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QComboBox_override_virtual_Metric(void* self, intptr_t slot); +int QComboBox_virtualbase_Metric(const void* self, int param1); +void QComboBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QComboBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QComboBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QComboBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QComboBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QComboBox_virtualbase_SharedPainter(const void* self); +void QComboBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QComboBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QComboBox_Delete(QComboBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcommandlineoption.cpp b/qt/gen_qcommandlineoption.cpp index fd4e2fcf..a6d90c4f 100644 --- a/qt/gen_qcommandlineoption.cpp +++ b/qt/gen_qcommandlineoption.cpp @@ -7,12 +7,13 @@ #include "gen_qcommandlineoption.h" #include "_cgo_export.h" -QCommandLineOption* QCommandLineOption_new(struct miqt_string name) { +void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QCommandLineOption(name_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names) { +void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -20,16 +21,18 @@ QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_ QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len); names_QList.push_back(names_arr_i_QString); } - return new QCommandLineOption(names_QList); + QCommandLineOption* ret = new QCommandLineOption(names_QList); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description) { +void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLineOption(name_QString, description_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description) { +void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -38,29 +41,33 @@ QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_ names_QList.push_back(names_arr_i_QString); } QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLineOption(names_QList, description_QString); + QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other) { - return new QCommandLineOption(*other); +void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption) { + QCommandLineOption* ret = new QCommandLineOption(*other); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName) { +void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - return new QCommandLineOption(name_QString, description_QString, valueName_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { +void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - return new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName) { +void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -70,10 +77,11 @@ QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_ } QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - return new QCommandLineOption(names_QList, description_QString, valueName_QString); + QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { +void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -84,7 +92,8 @@ QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_ QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - return new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); + QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); + *outptr_QCommandLineOption = ret; } void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other) { @@ -200,7 +209,11 @@ bool QCommandLineOption_IsHidden(const QCommandLineOption* self) { return self->isHidden(); } -void QCommandLineOption_Delete(QCommandLineOption* self) { - delete self; +void QCommandLineOption_Delete(QCommandLineOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcommandlineoption.go b/qt/gen_qcommandlineoption.go index 58bc4783..d039ec2b 100644 --- a/qt/gen_qcommandlineoption.go +++ b/qt/gen_qcommandlineoption.go @@ -21,7 +21,8 @@ const ( ) type QCommandLineOption struct { - h *C.QCommandLineOption + h *C.QCommandLineOption + isSubclass bool } func (this *QCommandLineOption) cPointer() *C.QCommandLineOption { @@ -38,6 +39,7 @@ func (this *QCommandLineOption) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCommandLineOption constructs the type using only CGO pointers. func newQCommandLineOption(h *C.QCommandLineOption) *QCommandLineOption { if h == nil { return nil @@ -45,8 +47,13 @@ func newQCommandLineOption(h *C.QCommandLineOption) *QCommandLineOption { return &QCommandLineOption{h: h} } +// UnsafeNewQCommandLineOption constructs the type using only unsafe pointers. func UnsafeNewQCommandLineOption(h unsafe.Pointer) *QCommandLineOption { - return newQCommandLineOption((*C.QCommandLineOption)(h)) + if h == nil { + return nil + } + + return &QCommandLineOption{h: (*C.QCommandLineOption)(h)} } // NewQCommandLineOption constructs a new QCommandLineOption object. @@ -55,8 +62,12 @@ func NewQCommandLineOption(name string) *QCommandLineOption { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QCommandLineOption_new(name_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new(name_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption2 constructs a new QCommandLineOption object. @@ -71,8 +82,12 @@ func NewQCommandLineOption2(names []string) *QCommandLineOption { names_CArray[i] = names_i_ms } names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)} - ret := C.QCommandLineOption_new2(names_ma) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new2(names_ma, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption3 constructs a new QCommandLineOption object. @@ -85,8 +100,12 @@ func NewQCommandLineOption3(name string, description string) *QCommandLineOption description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLineOption_new3(name_ms, description_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new3(name_ms, description_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption4 constructs a new QCommandLineOption object. @@ -105,14 +124,22 @@ func NewQCommandLineOption4(names []string, description string) *QCommandLineOpt description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLineOption_new4(names_ma, description_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new4(names_ma, description_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption5 constructs a new QCommandLineOption object. func NewQCommandLineOption5(other *QCommandLineOption) *QCommandLineOption { - ret := C.QCommandLineOption_new5(other.cPointer()) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new5(other.cPointer(), &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption6 constructs a new QCommandLineOption object. @@ -129,8 +156,12 @@ func NewQCommandLineOption6(name string, description string, valueName string) * valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - ret := C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption7 constructs a new QCommandLineOption object. @@ -151,8 +182,12 @@ func NewQCommandLineOption7(name string, description string, valueName string, d defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - ret := C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption8 constructs a new QCommandLineOption object. @@ -175,8 +210,12 @@ func NewQCommandLineOption8(names []string, description string, valueName string valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - ret := C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption9 constructs a new QCommandLineOption object. @@ -203,8 +242,12 @@ func NewQCommandLineOption9(names []string, description string, valueName string defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - ret := C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } func (this *QCommandLineOption) OperatorAssign(other *QCommandLineOption) { @@ -311,7 +354,7 @@ func (this *QCommandLineOption) IsHidden() bool { // Delete this object from C++ memory. func (this *QCommandLineOption) Delete() { - C.QCommandLineOption_Delete(this.h) + C.QCommandLineOption_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcommandlineoption.h b/qt/gen_qcommandlineoption.h index 9ac919d7..d2d9aa7c 100644 --- a/qt/gen_qcommandlineoption.h +++ b/qt/gen_qcommandlineoption.h @@ -20,15 +20,15 @@ class QCommandLineOption; typedef struct QCommandLineOption QCommandLineOption; #endif -QCommandLineOption* QCommandLineOption_new(struct miqt_string name); -QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names); -QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description); -QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description); -QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other); -QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName); -QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); -QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName); -QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); +void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other); void QCommandLineOption_Swap(QCommandLineOption* self, QCommandLineOption* other); struct miqt_array /* of struct miqt_string */ QCommandLineOption_Names(const QCommandLineOption* self); @@ -43,7 +43,7 @@ int QCommandLineOption_Flags(const QCommandLineOption* self); void QCommandLineOption_SetFlags(QCommandLineOption* self, int aflags); void QCommandLineOption_SetHidden(QCommandLineOption* self, bool hidden); bool QCommandLineOption_IsHidden(const QCommandLineOption* self); -void QCommandLineOption_Delete(QCommandLineOption* self); +void QCommandLineOption_Delete(QCommandLineOption* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcommandlineparser.cpp b/qt/gen_qcommandlineparser.cpp index 1c8a6968..3aca0860 100644 --- a/qt/gen_qcommandlineparser.cpp +++ b/qt/gen_qcommandlineparser.cpp @@ -9,8 +9,9 @@ #include "gen_qcommandlineparser.h" #include "_cgo_export.h" -QCommandLineParser* QCommandLineParser_new() { - return new QCommandLineParser(); +void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser) { + QCommandLineParser* ret = new QCommandLineParser(); + *outptr_QCommandLineParser = ret; } struct miqt_string QCommandLineParser_Tr(const char* sourceText) { @@ -323,7 +324,11 @@ void QCommandLineParser_AddPositionalArgument3(QCommandLineParser* self, struct self->addPositionalArgument(name_QString, description_QString, syntax_QString); } -void QCommandLineParser_Delete(QCommandLineParser* self) { - delete self; +void QCommandLineParser_Delete(QCommandLineParser* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcommandlineparser.go b/qt/gen_qcommandlineparser.go index 49d4a02b..7eabfaad 100644 --- a/qt/gen_qcommandlineparser.go +++ b/qt/gen_qcommandlineparser.go @@ -28,7 +28,8 @@ const ( ) type QCommandLineParser struct { - h *C.QCommandLineParser + h *C.QCommandLineParser + isSubclass bool } func (this *QCommandLineParser) cPointer() *C.QCommandLineParser { @@ -45,6 +46,7 @@ func (this *QCommandLineParser) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCommandLineParser constructs the type using only CGO pointers. func newQCommandLineParser(h *C.QCommandLineParser) *QCommandLineParser { if h == nil { return nil @@ -52,14 +54,23 @@ func newQCommandLineParser(h *C.QCommandLineParser) *QCommandLineParser { return &QCommandLineParser{h: h} } +// UnsafeNewQCommandLineParser constructs the type using only unsafe pointers. func UnsafeNewQCommandLineParser(h unsafe.Pointer) *QCommandLineParser { - return newQCommandLineParser((*C.QCommandLineParser)(h)) + if h == nil { + return nil + } + + return &QCommandLineParser{h: (*C.QCommandLineParser)(h)} } // NewQCommandLineParser constructs a new QCommandLineParser object. func NewQCommandLineParser() *QCommandLineParser { - ret := C.QCommandLineParser_new() - return newQCommandLineParser(ret) + var outptr_QCommandLineParser *C.QCommandLineParser = nil + + C.QCommandLineParser_new(&outptr_QCommandLineParser) + ret := newQCommandLineParser(outptr_QCommandLineParser) + ret.isSubclass = true + return ret } func QCommandLineParser_Tr(sourceText string) string { @@ -354,7 +365,7 @@ func (this *QCommandLineParser) AddPositionalArgument3(name string, description // Delete this object from C++ memory. func (this *QCommandLineParser) Delete() { - C.QCommandLineParser_Delete(this.h) + C.QCommandLineParser_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcommandlineparser.h b/qt/gen_qcommandlineparser.h index 67c8b4ae..081514d1 100644 --- a/qt/gen_qcommandlineparser.h +++ b/qt/gen_qcommandlineparser.h @@ -24,7 +24,7 @@ typedef struct QCommandLineParser QCommandLineParser; typedef struct QCoreApplication QCoreApplication; #endif -QCommandLineParser* QCommandLineParser_new(); +void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser); struct miqt_string QCommandLineParser_Tr(const char* sourceText); struct miqt_string QCommandLineParser_TrUtf8(const char* sourceText); void QCommandLineParser_SetSingleDashWordOptionMode(QCommandLineParser* self, int parsingMode); @@ -56,7 +56,7 @@ struct miqt_string QCommandLineParser_Tr3(const char* sourceText, const char* di struct miqt_string QCommandLineParser_TrUtf82(const char* sourceText, const char* disambiguation); struct miqt_string QCommandLineParser_TrUtf83(const char* sourceText, const char* disambiguation, int n); void QCommandLineParser_AddPositionalArgument3(QCommandLineParser* self, struct miqt_string name, struct miqt_string description, struct miqt_string syntax); -void QCommandLineParser_Delete(QCommandLineParser* self); +void QCommandLineParser_Delete(QCommandLineParser* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcommandlinkbutton.cpp b/qt/gen_qcommandlinkbutton.cpp index 47705b2c..541e088c 100644 --- a/qt/gen_qcommandlinkbutton.cpp +++ b/qt/gen_qcommandlinkbutton.cpp @@ -1,5 +1,15 @@ +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -8,34 +18,295 @@ #include "gen_qcommandlinkbutton.h" #include "_cgo_export.h" -QCommandLinkButton* QCommandLinkButton_new(QWidget* parent) { - return new QCommandLinkButton(parent); +class MiqtVirtualQCommandLinkButton : public virtual QCommandLinkButton { +public: + + MiqtVirtualQCommandLinkButton(QWidget* parent): QCommandLinkButton(parent) {}; + MiqtVirtualQCommandLinkButton(): QCommandLinkButton() {}; + MiqtVirtualQCommandLinkButton(const QString& text): QCommandLinkButton(text) {}; + MiqtVirtualQCommandLinkButton(const QString& text, const QString& description): QCommandLinkButton(text, description) {}; + MiqtVirtualQCommandLinkButton(const QString& text, QWidget* parent): QCommandLinkButton(text, parent) {}; + MiqtVirtualQCommandLinkButton(const QString& text, const QString& description, QWidget* parent): QCommandLinkButton(text, description, parent) {}; + + virtual ~MiqtVirtualQCommandLinkButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCommandLinkButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCommandLinkButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCommandLinkButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QCommandLinkButton::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QCommandLinkButton_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QCommandLinkButton::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QCommandLinkButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCommandLinkButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QCommandLinkButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QCommandLinkButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QCommandLinkButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QCommandLinkButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QCommandLinkButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QCommandLinkButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QCommandLinkButton::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QCommandLinkButton::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QCommandLinkButton::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QCommandLinkButton::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QCommandLinkButton::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QCommandLinkButton::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QCommandLinkButton::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QCommandLinkButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QCommandLinkButton::hitButton(*pos); + + } + +}; + +void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(parent); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new2() { - return new QCommandLinkButton(); +void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text) { +void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCommandLinkButton(text_QString); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description) { +void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLinkButton(text_QString, description_QString); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent) { +void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCommandLinkButton(text_QString, parent); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, parent); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent) { +void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLinkButton(text_QString, description_QString, parent); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString, parent); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self) { @@ -128,7 +399,83 @@ struct miqt_string QCommandLinkButton_TrUtf83(const char* s, const char* c, int return _ms; } -void QCommandLinkButton_Delete(QCommandLinkButton* self) { - delete self; +void QCommandLinkButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QCommandLinkButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_SizeHint(); +} + +void QCommandLinkButton_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__HeightForWidth = slot; +} + +int QCommandLinkButton_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QCommandLinkButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QCommandLinkButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QCommandLinkButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__Event = slot; +} + +bool QCommandLinkButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_Event(e); +} + +void QCommandLinkButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__PaintEvent = slot; +} + +void QCommandLinkButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QCommandLinkButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QCommandLinkButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QCommandLinkButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__FocusInEvent = slot; +} + +void QCommandLinkButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QCommandLinkButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QCommandLinkButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QCommandLinkButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__HitButton = slot; +} + +bool QCommandLinkButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_HitButton(pos); +} + +void QCommandLinkButton_Delete(QCommandLinkButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcommandlinkbutton.go b/qt/gen_qcommandlinkbutton.go index 5b8445c8..ee5c7e90 100644 --- a/qt/gen_qcommandlinkbutton.go +++ b/qt/gen_qcommandlinkbutton.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QCommandLinkButton struct { - h *C.QCommandLinkButton + h *C.QCommandLinkButton + isSubclass bool *QPushButton } @@ -32,27 +34,53 @@ func (this *QCommandLinkButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCommandLinkButton(h *C.QCommandLinkButton) *QCommandLinkButton { +// newQCommandLinkButton constructs the type using only CGO pointers. +func newQCommandLinkButton(h *C.QCommandLinkButton, h_QPushButton *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCommandLinkButton { if h == nil { return nil } - return &QCommandLinkButton{h: h, QPushButton: UnsafeNewQPushButton(unsafe.Pointer(h))} + return &QCommandLinkButton{h: h, + QPushButton: newQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQCommandLinkButton(h unsafe.Pointer) *QCommandLinkButton { - return newQCommandLinkButton((*C.QCommandLinkButton)(h)) +// UnsafeNewQCommandLinkButton constructs the type using only unsafe pointers. +func UnsafeNewQCommandLinkButton(h unsafe.Pointer, h_QPushButton unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCommandLinkButton { + if h == nil { + return nil + } + + return &QCommandLinkButton{h: (*C.QCommandLinkButton)(h), + QPushButton: UnsafeNewQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQCommandLinkButton constructs a new QCommandLinkButton object. func NewQCommandLinkButton(parent *QWidget) *QCommandLinkButton { - ret := C.QCommandLinkButton_new(parent.cPointer()) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new(parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton2 constructs a new QCommandLinkButton object. func NewQCommandLinkButton2() *QCommandLinkButton { - ret := C.QCommandLinkButton_new2() - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new2(&outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton3 constructs a new QCommandLinkButton object. @@ -61,8 +89,17 @@ func NewQCommandLinkButton3(text string) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCommandLinkButton_new3(text_ms) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new3(text_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton4 constructs a new QCommandLinkButton object. @@ -75,8 +112,17 @@ func NewQCommandLinkButton4(text string, description string) *QCommandLinkButton description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLinkButton_new4(text_ms, description_ms) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new4(text_ms, description_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton5 constructs a new QCommandLinkButton object. @@ -85,8 +131,17 @@ func NewQCommandLinkButton5(text string, parent *QWidget) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCommandLinkButton_new5(text_ms, parent.cPointer()) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new5(text_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton6 constructs a new QCommandLinkButton object. @@ -99,8 +154,17 @@ func NewQCommandLinkButton6(text string, description string, parent *QWidget) *Q description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer()) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QCommandLinkButton) MetaObject() *QMetaObject { @@ -190,9 +254,226 @@ func QCommandLinkButton_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QCommandLinkButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QCommandLinkButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommandLinkButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QCommandLinkButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_SizeHint +func miqt_exec_callback_QCommandLinkButton_SizeHint(self *C.QCommandLinkButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCommandLinkButton) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QCommandLinkButton_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QCommandLinkButton) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QCommandLinkButton_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_HeightForWidth +func miqt_exec_callback_QCommandLinkButton_HeightForWidth(self *C.QCommandLinkButton, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QCommandLinkButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QCommandLinkButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommandLinkButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QCommandLinkButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_MinimumSizeHint +func miqt_exec_callback_QCommandLinkButton_MinimumSizeHint(self *C.QCommandLinkButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCommandLinkButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QCommandLinkButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QCommandLinkButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QCommandLinkButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_Event +func miqt_exec_callback_QCommandLinkButton_Event(self *C.QCommandLinkButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCommandLinkButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QCommandLinkButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QCommandLinkButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_PaintEvent +func miqt_exec_callback_QCommandLinkButton_PaintEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QCommandLinkButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QCommandLinkButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_KeyPressEvent +func miqt_exec_callback_QCommandLinkButton_KeyPressEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QCommandLinkButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QCommandLinkButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_FocusInEvent +func miqt_exec_callback_QCommandLinkButton_FocusInEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QCommandLinkButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QCommandLinkButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_FocusOutEvent +func miqt_exec_callback_QCommandLinkButton_FocusOutEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QCommandLinkButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QCommandLinkButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QCommandLinkButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_HitButton +func miqt_exec_callback_QCommandLinkButton_HitButton(self *C.QCommandLinkButton, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QCommandLinkButton) Delete() { - C.QCommandLinkButton_Delete(this.h) + C.QCommandLinkButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcommandlinkbutton.h b/qt/gen_qcommandlinkbutton.h index 6406cd3c..8802acdf 100644 --- a/qt/gen_qcommandlinkbutton.h +++ b/qt/gen_qcommandlinkbutton.h @@ -15,32 +15,75 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; class QCommandLinkButton; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; +class QPushButton; +class QSize; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; typedef struct QCommandLinkButton QCommandLinkButton; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; +typedef struct QPushButton QPushButton; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QCommandLinkButton* QCommandLinkButton_new(QWidget* parent); -QCommandLinkButton* QCommandLinkButton_new2(); -QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text); -QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description); -QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent); -QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent); +void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self); void* QCommandLinkButton_Metacast(QCommandLinkButton* self, const char* param1); struct miqt_string QCommandLinkButton_Tr(const char* s); struct miqt_string QCommandLinkButton_TrUtf8(const char* s); struct miqt_string QCommandLinkButton_Description(const QCommandLinkButton* self); void QCommandLinkButton_SetDescription(QCommandLinkButton* self, struct miqt_string description); +QSize* QCommandLinkButton_SizeHint(const QCommandLinkButton* self); +int QCommandLinkButton_HeightForWidth(const QCommandLinkButton* self, int param1); +QSize* QCommandLinkButton_MinimumSizeHint(const QCommandLinkButton* self); +bool QCommandLinkButton_Event(QCommandLinkButton* self, QEvent* e); +void QCommandLinkButton_PaintEvent(QCommandLinkButton* self, QPaintEvent* param1); struct miqt_string QCommandLinkButton_Tr2(const char* s, const char* c); struct miqt_string QCommandLinkButton_Tr3(const char* s, const char* c, int n); struct miqt_string QCommandLinkButton_TrUtf82(const char* s, const char* c); struct miqt_string QCommandLinkButton_TrUtf83(const char* s, const char* c, int n); -void QCommandLinkButton_Delete(QCommandLinkButton* self); +void QCommandLinkButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCommandLinkButton_virtualbase_SizeHint(const void* self); +void QCommandLinkButton_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QCommandLinkButton_virtualbase_HeightForWidth(const void* self, int param1); +void QCommandLinkButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QCommandLinkButton_virtualbase_MinimumSizeHint(const void* self); +void QCommandLinkButton_override_virtual_Event(void* self, intptr_t slot); +bool QCommandLinkButton_virtualbase_Event(void* self, QEvent* e); +void QCommandLinkButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QCommandLinkButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QCommandLinkButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QCommandLinkButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QCommandLinkButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QCommandLinkButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QCommandLinkButton_Delete(QCommandLinkButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcommonstyle.cpp b/qt/gen_qcommonstyle.cpp index e4f62fd0..925f128f 100644 --- a/qt/gen_qcommonstyle.cpp +++ b/qt/gen_qcommonstyle.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -11,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -19,8 +22,666 @@ #include "gen_qcommonstyle.h" #include "_cgo_export.h" -QCommonStyle* QCommonStyle_new() { - return new QCommonStyle(); +class MiqtVirtualQCommonStyle : public virtual QCommonStyle { +public: + + MiqtVirtualQCommonStyle(): QCommonStyle() {}; + + virtual ~MiqtVirtualQCommonStyle() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPrimitive = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w) const override { + if (handle__DrawPrimitive == 0) { + QCommonStyle::drawPrimitive(pe, opt, p, w); + return; + } + + QStyle::PrimitiveElement pe_ret = pe; + int sigval1 = static_cast(pe_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) w; + + miqt_exec_callback_QCommonStyle_DrawPrimitive(const_cast(this), handle__DrawPrimitive, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPrimitive(int pe, QStyleOption* opt, QPainter* p, QWidget* w) const { + + QCommonStyle::drawPrimitive(static_cast(pe), opt, p, w); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w) const override { + if (handle__DrawControl == 0) { + QCommonStyle::drawControl(element, opt, p, w); + return; + } + + QStyle::ControlElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) w; + + miqt_exec_callback_QCommonStyle_DrawControl(const_cast(this), handle__DrawControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawControl(int element, QStyleOption* opt, QPainter* p, QWidget* w) const { + + QCommonStyle::drawControl(static_cast(element), opt, p, w); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubElementRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subElementRect(QStyle::SubElement r, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__SubElementRect == 0) { + return QCommonStyle::subElementRect(r, opt, widget); + } + + QStyle::SubElement r_ret = r; + int sigval1 = static_cast(r_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_SubElementRect(const_cast(this), handle__SubElementRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubElementRect(int r, QStyleOption* opt, QWidget* widget) const { + + return new QRect(QCommonStyle::subElementRect(static_cast(r), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* w) const override { + if (handle__DrawComplexControl == 0) { + QCommonStyle::drawComplexControl(cc, opt, p, w); + return; + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) w; + + miqt_exec_callback_QCommonStyle_DrawComplexControl(const_cast(this), handle__DrawComplexControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawComplexControl(int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) const { + + QCommonStyle::drawComplexControl(static_cast(cc), opt, p, w); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTestComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* w) const override { + if (handle__HitTestComplexControl == 0) { + return QCommonStyle::hitTestComplexControl(cc, opt, pt, w); + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + const QPoint& pt_ret = pt; + // Cast returned reference into pointer + QPoint* sigval3 = const_cast(&pt_ret); + QWidget* sigval4 = (QWidget*) w; + + int callback_return_value = miqt_exec_callback_QCommonStyle_HitTestComplexControl(const_cast(this), handle__HitTestComplexControl, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HitTestComplexControl(int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) const { + + QStyle::SubControl _ret = QCommonStyle::hitTestComplexControl(static_cast(cc), opt, *pt, w); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubControlRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* w) const override { + if (handle__SubControlRect == 0) { + return QCommonStyle::subControlRect(cc, opt, sc, w); + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QStyle::SubControl sc_ret = sc; + int sigval3 = static_cast(sc_ret); + QWidget* sigval4 = (QWidget*) w; + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_SubControlRect(const_cast(this), handle__SubControlRect, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubControlRect(int cc, QStyleOptionComplex* opt, int sc, QWidget* w) const { + + return new QRect(QCommonStyle::subControlRect(static_cast(cc), opt, static_cast(sc), w)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeFromContents = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* widget) const override { + if (handle__SizeFromContents == 0) { + return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); + } + + QStyle::ContentsType ct_ret = ct; + int sigval1 = static_cast(ct_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + const QSize& contentsSize_ret = contentsSize; + // Cast returned reference into pointer + QSize* sigval3 = const_cast(&contentsSize_ret); + QWidget* sigval4 = (QWidget*) widget; + + QSize* callback_return_value = miqt_exec_callback_QCommonStyle_SizeFromContents(const_cast(this), handle__SizeFromContents, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeFromContents(int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) const { + + return new QSize(QCommonStyle::sizeFromContents(static_cast(ct), opt, *contentsSize, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PixelMetric = 0; + + // Subclass to allow providing a Go implementation + virtual int pixelMetric(QStyle::PixelMetric m, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__PixelMetric == 0) { + return QCommonStyle::pixelMetric(m, opt, widget); + } + + QStyle::PixelMetric m_ret = m; + int sigval1 = static_cast(m_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QCommonStyle_PixelMetric(const_cast(this), handle__PixelMetric, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PixelMetric(int m, QStyleOption* opt, QWidget* widget) const { + + return QCommonStyle::pixelMetric(static_cast(m), opt, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleHint = 0; + + // Subclass to allow providing a Go implementation + virtual int styleHint(QStyle::StyleHint sh, const QStyleOption* opt, const QWidget* w, QStyleHintReturn* shret) const override { + if (handle__StyleHint == 0) { + return QCommonStyle::styleHint(sh, opt, w, shret); + } + + QStyle::StyleHint sh_ret = sh; + int sigval1 = static_cast(sh_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) w; + QStyleHintReturn* sigval4 = shret; + + int callback_return_value = miqt_exec_callback_QCommonStyle_StyleHint(const_cast(this), handle__StyleHint, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleHint(int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) const { + + return QCommonStyle::styleHint(static_cast(sh), opt, w, shret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardIcon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__StandardIcon == 0) { + return QCommonStyle::standardIcon(standardIcon, opt, widget); + } + + QStyle::StandardPixmap standardIcon_ret = standardIcon; + int sigval1 = static_cast(standardIcon_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QIcon* callback_return_value = miqt_exec_callback_QCommonStyle_StandardIcon(const_cast(this), handle__StandardIcon, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_StandardIcon(int standardIcon, QStyleOption* opt, QWidget* widget) const { + + return new QIcon(QCommonStyle::standardIcon(static_cast(standardIcon), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap standardPixmap(QStyle::StandardPixmap sp, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__StandardPixmap == 0) { + return QCommonStyle::standardPixmap(sp, opt, widget); + } + + QStyle::StandardPixmap sp_ret = sp; + int sigval1 = static_cast(sp_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QPixmap* callback_return_value = miqt_exec_callback_QCommonStyle_StandardPixmap(const_cast(this), handle__StandardPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_StandardPixmap(int sp, QStyleOption* opt, QWidget* widget) const { + + return new QPixmap(QCommonStyle::standardPixmap(static_cast(sp), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GeneratedIconPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const override { + if (handle__GeneratedIconPixmap == 0) { + return QCommonStyle::generatedIconPixmap(iconMode, pixmap, opt); + } + + QIcon::Mode iconMode_ret = iconMode; + int sigval1 = static_cast(iconMode_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pixmap_ret); + QStyleOption* sigval3 = (QStyleOption*) opt; + + QPixmap* callback_return_value = miqt_exec_callback_QCommonStyle_GeneratedIconPixmap(const_cast(this), handle__GeneratedIconPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_GeneratedIconPixmap(int iconMode, QPixmap* pixmap, QStyleOption* opt) const { + + return new QPixmap(QCommonStyle::generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LayoutSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const override { + if (handle__LayoutSpacing == 0) { + return QCommonStyle::layoutSpacing(control1, control2, orientation, option, widget); + } + + QSizePolicy::ControlType control1_ret = control1; + int sigval1 = static_cast(control1_ret); + QSizePolicy::ControlType control2_ret = control2; + int sigval2 = static_cast(control2_ret); + Qt::Orientation orientation_ret = orientation; + int sigval3 = static_cast(orientation_ret); + QStyleOption* sigval4 = (QStyleOption*) option; + QWidget* sigval5 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QCommonStyle_LayoutSpacing(const_cast(this), handle__LayoutSpacing, sigval1, sigval2, sigval3, sigval4, sigval5); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LayoutSpacing(int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) const { + + return QCommonStyle::layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Polish = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QPalette& param1) override { + if (handle__Polish == 0) { + QCommonStyle::polish(param1); + return; + } + + QPalette& param1_ret = param1; + // Cast returned reference into pointer + QPalette* sigval1 = ¶m1_ret; + + miqt_exec_callback_QCommonStyle_Polish(this, handle__Polish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Polish(QPalette* param1) { + + QCommonStyle::polish(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithApp = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QApplication* app) override { + if (handle__PolishWithApp == 0) { + QCommonStyle::polish(app); + return; + } + + QApplication* sigval1 = app; + + miqt_exec_callback_QCommonStyle_PolishWithApp(this, handle__PolishWithApp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithApp(QApplication* app) { + + QCommonStyle::polish(app); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithWidget = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QWidget* widget) override { + if (handle__PolishWithWidget == 0) { + QCommonStyle::polish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QCommonStyle_PolishWithWidget(this, handle__PolishWithWidget, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithWidget(QWidget* widget) { + + QCommonStyle::polish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unpolish = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QWidget* widget) override { + if (handle__Unpolish == 0) { + QCommonStyle::unpolish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QCommonStyle_Unpolish(this, handle__Unpolish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unpolish(QWidget* widget) { + + QCommonStyle::unpolish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnpolishWithApplication = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QApplication* application) override { + if (handle__UnpolishWithApplication == 0) { + QCommonStyle::unpolish(application); + return; + } + + QApplication* sigval1 = application; + + miqt_exec_callback_QCommonStyle_UnpolishWithApplication(this, handle__UnpolishWithApplication, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UnpolishWithApplication(QApplication* application) { + + QCommonStyle::unpolish(application); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemTextRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemTextRect(const QFontMetrics& fm, const QRect& r, int flags, bool enabled, const QString& text) const override { + if (handle__ItemTextRect == 0) { + return QCommonStyle::itemTextRect(fm, r, flags, enabled, text); + } + + const QFontMetrics& fm_ret = fm; + // Cast returned reference into pointer + QFontMetrics* sigval1 = const_cast(&fm_ret); + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&r_ret); + int sigval3 = flags; + bool sigval4 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval5 = text_ms; + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_ItemTextRect(const_cast(this), handle__ItemTextRect, sigval1, sigval2, sigval3, sigval4, sigval5); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemTextRect(QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QRect(QCommonStyle::itemTextRect(*fm, *r, static_cast(flags), enabled, text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemPixmapRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const override { + if (handle__ItemPixmapRect == 0) { + return QCommonStyle::itemPixmapRect(r, flags, pixmap); + } + + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&r_ret); + int sigval2 = flags; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval3 = const_cast(&pixmap_ret); + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_ItemPixmapRect(const_cast(this), handle__ItemPixmapRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemPixmapRect(QRect* r, int flags, QPixmap* pixmap) const { + + return new QRect(QCommonStyle::itemPixmapRect(*r, static_cast(flags), *pixmap)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemText = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const override { + if (handle__DrawItemText == 0) { + QCommonStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = flags; + const QPalette& pal_ret = pal; + // Cast returned reference into pointer + QPalette* sigval4 = const_cast(&pal_ret); + bool sigval5 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval6 = text_ms; + QPalette::ColorRole textRole_ret = textRole; + int sigval7 = static_cast(textRole_ret); + + miqt_exec_callback_QCommonStyle_DrawItemText(const_cast(this), handle__DrawItemText, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemText(QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QCommonStyle::drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const override { + if (handle__DrawItemPixmap == 0) { + QCommonStyle::drawItemPixmap(painter, rect, alignment, pixmap); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = alignment; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval4 = const_cast(&pixmap_ret); + + miqt_exec_callback_QCommonStyle_DrawItemPixmap(const_cast(this), handle__DrawItemPixmap, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemPixmap(QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) const { + + QCommonStyle::drawItemPixmap(painter, *rect, static_cast(alignment), *pixmap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPalette = 0; + + // Subclass to allow providing a Go implementation + virtual QPalette standardPalette() const override { + if (handle__StandardPalette == 0) { + return QCommonStyle::standardPalette(); + } + + + QPalette* callback_return_value = miqt_exec_callback_QCommonStyle_StandardPalette(const_cast(this), handle__StandardPalette); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPalette* virtualbase_StandardPalette() const { + + return new QPalette(QCommonStyle::standardPalette()); + + } + +}; + +void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQCommonStyle* ret = new MiqtVirtualQCommonStyle(); + *outptr_QCommonStyle = ret; + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self) { @@ -53,57 +714,57 @@ struct miqt_string QCommonStyle_TrUtf8(const char* s) { return _ms; } -void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p) { - self->drawPrimitive(static_cast(pe), opt, p); +void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawPrimitive(static_cast(pe), opt, p, w); } -void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p) { - self->drawControl(static_cast(element), opt, p); +void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawControl(static_cast(element), opt, p, w); } -QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt) { - return new QRect(self->subElementRect(static_cast(r), opt)); +QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget) { + return new QRect(self->subElementRect(static_cast(r), opt, widget)); } -void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p) { - self->drawComplexControl(static_cast(cc), opt, p); +void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) { + self->drawComplexControl(static_cast(cc), opt, p, w); } -int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt); +int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) { + QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, w); return static_cast(_ret); } -QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc))); +QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w) { + return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), w)); } -QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize)); +QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) { + return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, widget)); } -int QCommonStyle_PixelMetric(const QCommonStyle* self, int m) { - return self->pixelMetric(static_cast(m)); +int QCommonStyle_PixelMetric(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget) { + return self->pixelMetric(static_cast(m), opt, widget); } -int QCommonStyle_StyleHint(const QCommonStyle* self, int sh) { - return self->styleHint(static_cast(sh)); +int QCommonStyle_StyleHint(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) { + return self->styleHint(static_cast(sh), opt, w, shret); } -QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon) { - return new QIcon(self->standardIcon(static_cast(standardIcon))); +QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget) { + return new QIcon(self->standardIcon(static_cast(standardIcon), opt, widget)); } -QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp) { - return new QPixmap(self->standardPixmap(static_cast(sp))); +QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget) { + return new QPixmap(self->standardPixmap(static_cast(sp), opt, widget)); } QPixmap* QCommonStyle_GeneratedIconPixmap(const QCommonStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { return new QPixmap(self->generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); } -int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); +int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } void QCommonStyle_Polish(QCommonStyle* self, QPalette* param1) { @@ -170,80 +831,195 @@ struct miqt_string QCommonStyle_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QCommonStyle_DrawPrimitive4(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawPrimitive(static_cast(pe), opt, p, w); +void QCommonStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawPrimitive = slot; } -void QCommonStyle_DrawControl4(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawControl(static_cast(element), opt, p, w); +void QCommonStyle_virtualbase_DrawPrimitive(const void* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawPrimitive(pe, opt, p, w); } -QRect* QCommonStyle_SubElementRect3(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget) { - return new QRect(self->subElementRect(static_cast(r), opt, widget)); +void QCommonStyle_override_virtual_DrawControl(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawControl = slot; } -void QCommonStyle_DrawComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) { - self->drawComplexControl(static_cast(cc), opt, p, w); +void QCommonStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawControl(element, opt, p, w); } -int QCommonStyle_HitTestComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, w); - return static_cast(_ret); +void QCommonStyle_override_virtual_SubElementRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__SubElementRect = slot; } -QRect* QCommonStyle_SubControlRect4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), w)); +QRect* QCommonStyle_virtualbase_SubElementRect(const void* self, int r, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_SubElementRect(r, opt, widget); } -QSize* QCommonStyle_SizeFromContents4(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, widget)); +void QCommonStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawComplexControl = slot; } -int QCommonStyle_PixelMetric2(const QCommonStyle* self, int m, QStyleOption* opt) { - return self->pixelMetric(static_cast(m), opt); +void QCommonStyle_virtualbase_DrawComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawComplexControl(cc, opt, p, w); } -int QCommonStyle_PixelMetric3(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget) { - return self->pixelMetric(static_cast(m), opt, widget); +void QCommonStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__HitTestComplexControl = slot; } -int QCommonStyle_StyleHint2(const QCommonStyle* self, int sh, QStyleOption* opt) { - return self->styleHint(static_cast(sh), opt); +int QCommonStyle_virtualbase_HitTestComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_HitTestComplexControl(cc, opt, pt, w); } -int QCommonStyle_StyleHint3(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w) { - return self->styleHint(static_cast(sh), opt, w); +void QCommonStyle_override_virtual_SubControlRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__SubControlRect = slot; } -int QCommonStyle_StyleHint4(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) { - return self->styleHint(static_cast(sh), opt, w, shret); +QRect* QCommonStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_SubControlRect(cc, opt, sc, w); } -QIcon* QCommonStyle_StandardIcon2(const QCommonStyle* self, int standardIcon, QStyleOption* opt) { - return new QIcon(self->standardIcon(static_cast(standardIcon), opt)); +void QCommonStyle_override_virtual_SizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__SizeFromContents = slot; } -QIcon* QCommonStyle_StandardIcon3(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget) { - return new QIcon(self->standardIcon(static_cast(standardIcon), opt, widget)); +QSize* QCommonStyle_virtualbase_SizeFromContents(const void* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_SizeFromContents(ct, opt, contentsSize, widget); } -QPixmap* QCommonStyle_StandardPixmap2(const QCommonStyle* self, int sp, QStyleOption* opt) { - return new QPixmap(self->standardPixmap(static_cast(sp), opt)); +void QCommonStyle_override_virtual_PixelMetric(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__PixelMetric = slot; } -QPixmap* QCommonStyle_StandardPixmap3(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget) { - return new QPixmap(self->standardPixmap(static_cast(sp), opt, widget)); +int QCommonStyle_virtualbase_PixelMetric(const void* self, int m, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_PixelMetric(m, opt, widget); } -int QCommonStyle_LayoutSpacing4(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); +void QCommonStyle_override_virtual_StyleHint(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StyleHint = slot; } -int QCommonStyle_LayoutSpacing5(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); +int QCommonStyle_virtualbase_StyleHint(const void* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StyleHint(sh, opt, w, shret); +} + +void QCommonStyle_override_virtual_StandardIcon(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StandardIcon = slot; +} + +QIcon* QCommonStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StandardIcon(standardIcon, opt, widget); +} + +void QCommonStyle_override_virtual_StandardPixmap(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StandardPixmap = slot; +} + +QPixmap* QCommonStyle_virtualbase_StandardPixmap(const void* self, int sp, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StandardPixmap(sp, opt, widget); +} + +void QCommonStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__GeneratedIconPixmap = slot; +} + +QPixmap* QCommonStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_GeneratedIconPixmap(iconMode, pixmap, opt); +} + +void QCommonStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__LayoutSpacing = slot; +} + +int QCommonStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_LayoutSpacing(control1, control2, orientation, option, widget); +} + +void QCommonStyle_override_virtual_Polish(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__Polish = slot; +} + +void QCommonStyle_virtualbase_Polish(void* self, QPalette* param1) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_Polish(param1); +} + +void QCommonStyle_override_virtual_PolishWithApp(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__PolishWithApp = slot; +} + +void QCommonStyle_virtualbase_PolishWithApp(void* self, QApplication* app) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_PolishWithApp(app); +} + +void QCommonStyle_override_virtual_PolishWithWidget(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__PolishWithWidget = slot; +} + +void QCommonStyle_virtualbase_PolishWithWidget(void* self, QWidget* widget) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_PolishWithWidget(widget); +} + +void QCommonStyle_override_virtual_Unpolish(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__Unpolish = slot; +} + +void QCommonStyle_virtualbase_Unpolish(void* self, QWidget* widget) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_Unpolish(widget); +} + +void QCommonStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__UnpolishWithApplication = slot; +} + +void QCommonStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_UnpolishWithApplication(application); +} + +void QCommonStyle_override_virtual_ItemTextRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__ItemTextRect = slot; +} + +QRect* QCommonStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_ItemTextRect(fm, r, flags, enabled, text); +} + +void QCommonStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__ItemPixmapRect = slot; +} + +QRect* QCommonStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_ItemPixmapRect(r, flags, pixmap); +} + +void QCommonStyle_override_virtual_DrawItemText(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawItemText = slot; +} + +void QCommonStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawItemText(painter, rect, flags, pal, enabled, text, textRole); +} + +void QCommonStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawItemPixmap = slot; +} + +void QCommonStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawItemPixmap(painter, rect, alignment, pixmap); +} + +void QCommonStyle_override_virtual_StandardPalette(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StandardPalette = slot; +} + +QPalette* QCommonStyle_virtualbase_StandardPalette(const void* self) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StandardPalette(); } -void QCommonStyle_Delete(QCommonStyle* self) { - delete self; +void QCommonStyle_Delete(QCommonStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcommonstyle.go b/qt/gen_qcommonstyle.go index e76ebc29..c7daa0ab 100644 --- a/qt/gen_qcommonstyle.go +++ b/qt/gen_qcommonstyle.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QCommonStyle struct { - h *C.QCommonStyle + h *C.QCommonStyle + isSubclass bool *QStyle } @@ -32,21 +34,35 @@ func (this *QCommonStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCommonStyle(h *C.QCommonStyle) *QCommonStyle { +// newQCommonStyle constructs the type using only CGO pointers. +func newQCommonStyle(h *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QCommonStyle { if h == nil { return nil } - return &QCommonStyle{h: h, QStyle: UnsafeNewQStyle(unsafe.Pointer(h))} + return &QCommonStyle{h: h, + QStyle: newQStyle(h_QStyle, h_QObject)} } -func UnsafeNewQCommonStyle(h unsafe.Pointer) *QCommonStyle { - return newQCommonStyle((*C.QCommonStyle)(h)) +// UnsafeNewQCommonStyle constructs the type using only unsafe pointers. +func UnsafeNewQCommonStyle(h unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QCommonStyle { + if h == nil { + return nil + } + + return &QCommonStyle{h: (*C.QCommonStyle)(h), + QStyle: UnsafeNewQStyle(h_QStyle, h_QObject)} } // NewQCommonStyle constructs a new QCommonStyle object. func NewQCommonStyle() *QCommonStyle { - ret := C.QCommonStyle_new() - return newQCommonStyle(ret) + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QCommonStyle_new(&outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQCommonStyle(outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCommonStyle) MetaObject() *QMetaObject { @@ -77,74 +93,74 @@ func QCommonStyle_TrUtf8(s string) string { return _ret } -func (this *QCommonStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter) { - C.QCommonStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer()) +func (this *QCommonStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QCommonStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QCommonStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter) { - C.QCommonStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer()) +func (this *QCommonStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QCommonStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QCommonStyle) SubElementRect(r QStyle__SubElement, opt *QStyleOption) *QRect { - _ret := C.QCommonStyle_SubElementRect(this.h, (C.int)(r), opt.cPointer()) +func (this *QCommonStyle) SubElementRect(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect { + _ret := C.QCommonStyle_SubElementRect(this.h, (C.int)(r), opt.cPointer(), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter) { - C.QCommonStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer()) +func (this *QCommonStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget) { + C.QCommonStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QCommonStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint) QStyle__SubControl { - return (QStyle__SubControl)(C.QCommonStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer())) +func (this *QCommonStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl { + return (QStyle__SubControl)(C.QCommonStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), w.cPointer())) } -func (this *QCommonStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl) *QRect { - _ret := C.QCommonStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc)) +func (this *QCommonStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect { + _ret := C.QCommonStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), w.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize) *QSize { - _ret := C.QCommonStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer()) +func (this *QCommonStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize { + _ret := C.QCommonStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), widget.cPointer()) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) PixelMetric(m QStyle__PixelMetric) int { - return (int)(C.QCommonStyle_PixelMetric(this.h, (C.int)(m))) +func (this *QCommonStyle) PixelMetric(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int { + return (int)(C.QCommonStyle_PixelMetric(this.h, (C.int)(m), opt.cPointer(), widget.cPointer())) } -func (this *QCommonStyle) StyleHint(sh QStyle__StyleHint) int { - return (int)(C.QCommonStyle_StyleHint(this.h, (C.int)(sh))) +func (this *QCommonStyle) StyleHint(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int { + return (int)(C.QCommonStyle_StyleHint(this.h, (C.int)(sh), opt.cPointer(), w.cPointer(), shret.cPointer())) } -func (this *QCommonStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { - _ret := C.QCommonStyle_StandardIcon(this.h, (C.int)(standardIcon)) +func (this *QCommonStyle) StandardIcon(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon { + _ret := C.QCommonStyle_StandardIcon(this.h, (C.int)(standardIcon), opt.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) StandardPixmap(sp QStyle__StandardPixmap) *QPixmap { - _ret := C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp)) - _goptr := newQPixmap(_ret) +func (this *QCommonStyle) StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + _ret := C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCommonStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { _ret := C.QCommonStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int { - return (int)(C.QCommonStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation))) +func (this *QCommonStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + return (int)(C.QCommonStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } func (this *QCommonStyle) Polish(param1 *QPalette) { @@ -211,102 +227,674 @@ func QCommonStyle_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QCommonStyle) DrawPrimitive4(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QCommonStyle_DrawPrimitive4(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) +func (this *QCommonStyle) callVirtualBase_DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { + + C.QCommonStyle_virtualbase_DrawPrimitive(unsafe.Pointer(this.h), (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) + +} +func (this *QCommonStyle) OnDrawPrimitive(slot func(super func(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget), pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QCommonStyle_override_virtual_DrawPrimitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) DrawControl4(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QCommonStyle_DrawControl4(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) +//export miqt_exec_callback_QCommonStyle_DrawPrimitive +func miqt_exec_callback_QCommonStyle_DrawPrimitive(self *C.QCommonStyle, cb C.intptr_t, pe C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget), pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PrimitiveElement)(pe) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(p)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) + } -func (this *QCommonStyle) SubElementRect3(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect { - _ret := C.QCommonStyle_SubElementRect3(this.h, (C.int)(r), opt.cPointer(), widget.cPointer()) +func (this *QCommonStyle) callVirtualBase_DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { + + C.QCommonStyle_virtualbase_DrawControl(unsafe.Pointer(this.h), (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) + +} +func (this *QCommonStyle) OnDrawControl(slot func(super func(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget), element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QCommonStyle_override_virtual_DrawControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawControl +func miqt_exec_callback_QCommonStyle_DrawControl(self *C.QCommonStyle, cb C.intptr_t, element C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget), element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ControlElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(p)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QCommonStyle) callVirtualBase_SubElementRect(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect { + + _ret := C.QCommonStyle_virtualbase_SubElementRect(unsafe.Pointer(this.h), (C.int)(r), opt.cPointer(), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnSubElementRect(slot func(super func(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect, r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect) { + C.QCommonStyle_override_virtual_SubElementRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_SubElementRect +func miqt_exec_callback_QCommonStyle_SubElementRect(self *C.QCommonStyle, cb C.intptr_t, r C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect, r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__SubElement)(r) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QCommonStyle) DrawComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget) { - C.QCommonStyle_DrawComplexControl4(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), w.cPointer()) +func (this *QCommonStyle) callVirtualBase_DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget) { + + C.QCommonStyle_virtualbase_DrawComplexControl(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), p.cPointer(), w.cPointer()) + } +func (this *QCommonStyle) OnDrawComplexControl(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget), cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget)) { + C.QCommonStyle_override_virtual_DrawComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawComplexControl +func miqt_exec_callback_QCommonStyle_DrawComplexControl(self *C.QCommonStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget), cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(p)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QCommonStyle) callVirtualBase_HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl { + + return (QStyle__SubControl)(C.QCommonStyle_virtualbase_HitTestComplexControl(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), pt.cPointer(), w.cPointer())) -func (this *QCommonStyle) HitTestComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl { - return (QStyle__SubControl)(C.QCommonStyle_HitTestComplexControl4(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), w.cPointer())) +} +func (this *QCommonStyle) OnHitTestComplexControl(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl, cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl) { + C.QCommonStyle_override_virtual_HitTestComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) SubControlRect4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect { - _ret := C.QCommonStyle_SubControlRect4(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), w.cPointer()) +//export miqt_exec_callback_QCommonStyle_HitTestComplexControl +func miqt_exec_callback_QCommonStyle_HitTestComplexControl(self *C.QCommonStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, pt *C.QPoint, w *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl, cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := UnsafeNewQPoint(unsafe.Pointer(pt)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QCommonStyle) callVirtualBase_SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect { + + _ret := C.QCommonStyle_virtualbase_SubControlRect(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), (C.int)(sc), w.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnSubControlRect(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect) { + C.QCommonStyle_override_virtual_SubControlRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_SubControlRect +func miqt_exec_callback_QCommonStyle_SubControlRect(self *C.QCommonStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, sc C.int, w *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := (QStyle__SubControl)(sc) + + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + } -func (this *QCommonStyle) SizeFromContents4(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize { - _ret := C.QCommonStyle_SizeFromContents4(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), widget.cPointer()) +func (this *QCommonStyle) callVirtualBase_SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize { + + _ret := C.QCommonStyle_virtualbase_SizeFromContents(unsafe.Pointer(this.h), (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), widget.cPointer()) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QCommonStyle) OnSizeFromContents(slot func(super func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize, ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize) { + C.QCommonStyle_override_virtual_SizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_SizeFromContents +func miqt_exec_callback_QCommonStyle_SizeFromContents(self *C.QCommonStyle, cb C.intptr_t, ct C.int, opt *C.QStyleOption, contentsSize *C.QSize, widget *C.QWidget) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize, ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ContentsType)(ct) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQSize(unsafe.Pointer(contentsSize)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() -func (this *QCommonStyle) PixelMetric2(m QStyle__PixelMetric, opt *QStyleOption) int { - return (int)(C.QCommonStyle_PixelMetric2(this.h, (C.int)(m), opt.cPointer())) } -func (this *QCommonStyle) PixelMetric3(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int { - return (int)(C.QCommonStyle_PixelMetric3(this.h, (C.int)(m), opt.cPointer(), widget.cPointer())) +func (this *QCommonStyle) callVirtualBase_PixelMetric(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int { + + return (int)(C.QCommonStyle_virtualbase_PixelMetric(unsafe.Pointer(this.h), (C.int)(m), opt.cPointer(), widget.cPointer())) + +} +func (this *QCommonStyle) OnPixelMetric(slot func(super func(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int, m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int) { + C.QCommonStyle_override_virtual_PixelMetric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) StyleHint2(sh QStyle__StyleHint, opt *QStyleOption) int { - return (int)(C.QCommonStyle_StyleHint2(this.h, (C.int)(sh), opt.cPointer())) +//export miqt_exec_callback_QCommonStyle_PixelMetric +func miqt_exec_callback_QCommonStyle_PixelMetric(self *C.QCommonStyle, cb C.intptr_t, m C.int, opt *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int, m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PixelMetric)(m) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + } -func (this *QCommonStyle) StyleHint3(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget) int { - return (int)(C.QCommonStyle_StyleHint3(this.h, (C.int)(sh), opt.cPointer(), w.cPointer())) +func (this *QCommonStyle) callVirtualBase_StyleHint(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int { + + return (int)(C.QCommonStyle_virtualbase_StyleHint(unsafe.Pointer(this.h), (C.int)(sh), opt.cPointer(), w.cPointer(), shret.cPointer())) + } +func (this *QCommonStyle) OnStyleHint(slot func(super func(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int, sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int) { + C.QCommonStyle_override_virtual_StyleHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_StyleHint +func miqt_exec_callback_QCommonStyle_StyleHint(self *C.QCommonStyle, cb C.intptr_t, sh C.int, opt *C.QStyleOption, w *C.QWidget, shret *C.QStyleHintReturn) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int, sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StyleHint)(sh) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + slotval4 := UnsafeNewQStyleHintReturn(unsafe.Pointer(shret)) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StyleHint, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) -func (this *QCommonStyle) StyleHint4(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int { - return (int)(C.QCommonStyle_StyleHint4(this.h, (C.int)(sh), opt.cPointer(), w.cPointer(), shret.cPointer())) } -func (this *QCommonStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, opt *QStyleOption) *QIcon { - _ret := C.QCommonStyle_StandardIcon2(this.h, (C.int)(standardIcon), opt.cPointer()) +func (this *QCommonStyle) callVirtualBase_StandardIcon(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon { + + _ret := C.QCommonStyle_virtualbase_StandardIcon(unsafe.Pointer(this.h), (C.int)(standardIcon), opt.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnStandardIcon(slot func(super func(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon) { + C.QCommonStyle_override_virtual_StandardIcon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon { - _ret := C.QCommonStyle_StandardIcon3(this.h, (C.int)(standardIcon), opt.cPointer(), widget.cPointer()) - _goptr := newQIcon(_ret) +//export miqt_exec_callback_QCommonStyle_StandardIcon +func miqt_exec_callback_QCommonStyle_StandardIcon(self *C.QCommonStyle, cb C.intptr_t, standardIcon C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(standardIcon) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + + _ret := C.QCommonStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(sp), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QCommonStyle) OnStandardPixmap(slot func(super func(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) { + C.QCommonStyle_override_virtual_StandardPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_StandardPixmap +func miqt_exec_callback_QCommonStyle_StandardPixmap(self *C.QCommonStyle, cb C.intptr_t, sp C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(sp) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) -func (this *QCommonStyle) StandardPixmap2(sp QStyle__StandardPixmap, opt *QStyleOption) *QPixmap { - _ret := C.QCommonStyle_StandardPixmap2(this.h, (C.int)(sp), opt.cPointer()) - _goptr := newQPixmap(_ret) + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { + + _ret := C.QCommonStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnGeneratedIconPixmap(slot func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) { + C.QCommonStyle_override_virtual_GeneratedIconPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_GeneratedIconPixmap +func miqt_exec_callback_QCommonStyle_GeneratedIconPixmap(self *C.QCommonStyle, cb C.intptr_t, iconMode C.int, pixmap *C.QPixmap, opt *C.QStyleOption) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIcon__Mode)(iconMode) + + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval3 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_GeneratedIconPixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QCommonStyle) StandardPixmap3(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _ret := C.QCommonStyle_StandardPixmap3(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer()) - _goptr := newQPixmap(_ret) +func (this *QCommonStyle) callVirtualBase_LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + + return (int)(C.QCommonStyle_virtualbase_LayoutSpacing(unsafe.Pointer(this.h), (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) + +} +func (this *QCommonStyle) OnLayoutSpacing(slot func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) { + C.QCommonStyle_override_virtual_LayoutSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_LayoutSpacing +func miqt_exec_callback_QCommonStyle_LayoutSpacing(self *C.QCommonStyle, cb C.intptr_t, control1 C.int, control2 C.int, orientation C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QSizePolicy__ControlType)(control1) + + slotval2 := (QSizePolicy__ControlType)(control2) + + slotval3 := (Orientation)(orientation) + + slotval4 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval5 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.int)(virtualReturn) + +} + +func (this *QCommonStyle) callVirtualBase_Polish(param1 *QPalette) { + + C.QCommonStyle_virtualbase_Polish(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommonStyle) OnPolish(slot func(super func(param1 *QPalette), param1 *QPalette)) { + C.QCommonStyle_override_virtual_Polish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_Polish +func miqt_exec_callback_QCommonStyle_Polish(self *C.QCommonStyle, cb C.intptr_t, param1 *C.QPalette) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPalette), param1 *QPalette)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPalette(unsafe.Pointer(param1)) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_Polish, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_PolishWithApp(app *QApplication) { + + C.QCommonStyle_virtualbase_PolishWithApp(unsafe.Pointer(this.h), app.cPointer()) + +} +func (this *QCommonStyle) OnPolishWithApp(slot func(super func(app *QApplication), app *QApplication)) { + C.QCommonStyle_override_virtual_PolishWithApp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_PolishWithApp +func miqt_exec_callback_QCommonStyle_PolishWithApp(self *C.QCommonStyle, cb C.intptr_t, app *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(app *QApplication), app *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(app), nil, nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_PolishWithWidget(widget *QWidget) { + + C.QCommonStyle_virtualbase_PolishWithWidget(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QCommonStyle) OnPolishWithWidget(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QCommonStyle_override_virtual_PolishWithWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_PolishWithWidget +func miqt_exec_callback_QCommonStyle_PolishWithWidget(self *C.QCommonStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithWidget, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_Unpolish(widget *QWidget) { + + C.QCommonStyle_virtualbase_Unpolish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QCommonStyle) OnUnpolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QCommonStyle_override_virtual_Unpolish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_Unpolish +func miqt_exec_callback_QCommonStyle_Unpolish(self *C.QCommonStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_Unpolish, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_UnpolishWithApplication(application *QApplication) { + + C.QCommonStyle_virtualbase_UnpolishWithApplication(unsafe.Pointer(this.h), application.cPointer()) + +} +func (this *QCommonStyle) OnUnpolishWithApplication(slot func(super func(application *QApplication), application *QApplication)) { + C.QCommonStyle_override_virtual_UnpolishWithApplication(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_UnpolishWithApplication +func miqt_exec_callback_QCommonStyle_UnpolishWithApplication(self *C.QCommonStyle, cb C.intptr_t, application *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(application *QApplication), application *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(application), nil, nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_ItemTextRect(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QCommonStyle_virtualbase_ItemTextRect(unsafe.Pointer(this.h), fm.cPointer(), r.cPointer(), (C.int)(flags), (C.bool)(enabled), text_ms) + _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QCommonStyle) OnItemTextRect(slot func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) { + C.QCommonStyle_override_virtual_ItemTextRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_ItemTextRect +func miqt_exec_callback_QCommonStyle_ItemTextRect(self *C.QCommonStyle, cb C.intptr_t, fm *C.QFontMetrics, r *C.QRect, flags C.int, enabled C.bool, text C.struct_miqt_string) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFontMetrics(unsafe.Pointer(fm)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval3 := (int)(flags) + + slotval4 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval5 := text_ret + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_ItemTextRect, slotval1, slotval2, slotval3, slotval4, slotval5) + + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect { + + _ret := C.QCommonStyle_virtualbase_ItemPixmapRect(unsafe.Pointer(this.h), r.cPointer(), (C.int)(flags), pixmap.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommonStyle) OnItemPixmapRect(slot func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) { + C.QCommonStyle_override_virtual_ItemPixmapRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_ItemPixmapRect +func miqt_exec_callback_QCommonStyle_ItemPixmapRect(self *C.QCommonStyle, cb C.intptr_t, r *C.QRect, flags C.int, pixmap *C.QPixmap) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval2 := (int)(flags) + + slotval3 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QCommonStyle_virtualbase_DrawItemText(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) -func (this *QCommonStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { - return (int)(C.QCommonStyle_LayoutSpacing4(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer())) } +func (this *QCommonStyle) OnDrawItemText(slot func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) { + C.QCommonStyle_override_virtual_DrawItemText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawItemText +func miqt_exec_callback_QCommonStyle_DrawItemText(self *C.QCommonStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, flags C.int, pal *C.QPalette, enabled C.bool, text C.struct_miqt_string, textRole C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(flags) + + slotval4 := UnsafeNewQPalette(unsafe.Pointer(pal)) + slotval5 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval6 := text_ret + slotval7 := (QPalette__ColorRole)(textRole) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawItemText, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7) + +} + +func (this *QCommonStyle) callVirtualBase_DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { + + C.QCommonStyle_virtualbase_DrawItemPixmap(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer()) + +} +func (this *QCommonStyle) OnDrawItemPixmap(slot func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) { + C.QCommonStyle_override_virtual_DrawItemPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawItemPixmap +func miqt_exec_callback_QCommonStyle_DrawItemPixmap(self *C.QCommonStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, alignment C.int, pixmap *C.QPixmap) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(alignment) + + slotval4 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QCommonStyle) callVirtualBase_StandardPalette() *QPalette { + + _ret := C.QCommonStyle_virtualbase_StandardPalette(unsafe.Pointer(this.h)) + _goptr := newQPalette(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommonStyle) OnStandardPalette(slot func(super func() *QPalette) *QPalette) { + C.QCommonStyle_override_virtual_StandardPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_StandardPalette +func miqt_exec_callback_QCommonStyle_StandardPalette(self *C.QCommonStyle, cb C.intptr_t) *C.QPalette { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPalette) *QPalette) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardPalette) + + return virtualReturn.cPointer() -func (this *QCommonStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { - return (int)(C.QCommonStyle_LayoutSpacing5(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } // Delete this object from C++ memory. func (this *QCommonStyle) Delete() { - C.QCommonStyle_Delete(this.h) + C.QCommonStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcommonstyle.h b/qt/gen_qcommonstyle.h index ff89babc..3938cd9b 100644 --- a/qt/gen_qcommonstyle.h +++ b/qt/gen_qcommonstyle.h @@ -17,14 +17,17 @@ extern "C" { #ifdef __cplusplus class QApplication; class QCommonStyle; +class QFontMetrics; class QIcon; class QMetaObject; +class QObject; class QPainter; class QPalette; class QPixmap; class QPoint; class QRect; class QSize; +class QStyle; class QStyleHintReturn; class QStyleOption; class QStyleOptionComplex; @@ -32,38 +35,41 @@ class QWidget; #else typedef struct QApplication QApplication; typedef struct QCommonStyle QCommonStyle; +typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QStyle QStyle; typedef struct QStyleHintReturn QStyleHintReturn; typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -QCommonStyle* QCommonStyle_new(); +void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self); void* QCommonStyle_Metacast(QCommonStyle* self, const char* param1); struct miqt_string QCommonStyle_Tr(const char* s); struct miqt_string QCommonStyle_TrUtf8(const char* s); -void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p); -void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p); -QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt); -void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p); -int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt); -QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc); -QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize); -int QCommonStyle_PixelMetric(const QCommonStyle* self, int m); -int QCommonStyle_StyleHint(const QCommonStyle* self, int sh); -QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon); -QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp); +void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget); +void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w); +int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w); +QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w); +QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget); +int QCommonStyle_PixelMetric(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget); +int QCommonStyle_StyleHint(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret); +QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget); +QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget); QPixmap* QCommonStyle_GeneratedIconPixmap(const QCommonStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); -int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation); +int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); void QCommonStyle_Polish(QCommonStyle* self, QPalette* param1); void QCommonStyle_PolishWithApp(QCommonStyle* self, QApplication* app); void QCommonStyle_PolishWithWidget(QCommonStyle* self, QWidget* widget); @@ -73,25 +79,53 @@ struct miqt_string QCommonStyle_Tr2(const char* s, const char* c); struct miqt_string QCommonStyle_Tr3(const char* s, const char* c, int n); struct miqt_string QCommonStyle_TrUtf82(const char* s, const char* c); struct miqt_string QCommonStyle_TrUtf83(const char* s, const char* c, int n); -void QCommonStyle_DrawPrimitive4(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); -void QCommonStyle_DrawControl4(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); -QRect* QCommonStyle_SubElementRect3(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget); -void QCommonStyle_DrawComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w); -int QCommonStyle_HitTestComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w); -QRect* QCommonStyle_SubControlRect4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w); -QSize* QCommonStyle_SizeFromContents4(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget); -int QCommonStyle_PixelMetric2(const QCommonStyle* self, int m, QStyleOption* opt); -int QCommonStyle_PixelMetric3(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget); -int QCommonStyle_StyleHint2(const QCommonStyle* self, int sh, QStyleOption* opt); -int QCommonStyle_StyleHint3(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w); -int QCommonStyle_StyleHint4(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret); -QIcon* QCommonStyle_StandardIcon2(const QCommonStyle* self, int standardIcon, QStyleOption* opt); -QIcon* QCommonStyle_StandardIcon3(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget); -QPixmap* QCommonStyle_StandardPixmap2(const QCommonStyle* self, int sp, QStyleOption* opt); -QPixmap* QCommonStyle_StandardPixmap3(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget); -int QCommonStyle_LayoutSpacing4(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option); -int QCommonStyle_LayoutSpacing5(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); -void QCommonStyle_Delete(QCommonStyle* self); +void QCommonStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawPrimitive(const void* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QCommonStyle_override_virtual_DrawControl(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +void QCommonStyle_override_virtual_SubElementRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_SubElementRect(const void* self, int r, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w); +void QCommonStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot); +int QCommonStyle_virtualbase_HitTestComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w); +void QCommonStyle_override_virtual_SubControlRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w); +void QCommonStyle_override_virtual_SizeFromContents(void* self, intptr_t slot); +QSize* QCommonStyle_virtualbase_SizeFromContents(const void* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget); +void QCommonStyle_override_virtual_PixelMetric(void* self, intptr_t slot); +int QCommonStyle_virtualbase_PixelMetric(const void* self, int m, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_StyleHint(void* self, intptr_t slot); +int QCommonStyle_virtualbase_StyleHint(const void* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret); +void QCommonStyle_override_virtual_StandardIcon(void* self, intptr_t slot); +QIcon* QCommonStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_StandardPixmap(void* self, intptr_t slot); +QPixmap* QCommonStyle_virtualbase_StandardPixmap(const void* self, int sp, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot); +QPixmap* QCommonStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); +void QCommonStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot); +int QCommonStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +void QCommonStyle_override_virtual_Polish(void* self, intptr_t slot); +void QCommonStyle_virtualbase_Polish(void* self, QPalette* param1); +void QCommonStyle_override_virtual_PolishWithApp(void* self, intptr_t slot); +void QCommonStyle_virtualbase_PolishWithApp(void* self, QApplication* app); +void QCommonStyle_override_virtual_PolishWithWidget(void* self, intptr_t slot); +void QCommonStyle_virtualbase_PolishWithWidget(void* self, QWidget* widget); +void QCommonStyle_override_virtual_Unpolish(void* self, intptr_t slot); +void QCommonStyle_virtualbase_Unpolish(void* self, QWidget* widget); +void QCommonStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot); +void QCommonStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application); +void QCommonStyle_override_virtual_ItemTextRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); +void QCommonStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap); +void QCommonStyle_override_virtual_DrawItemText(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); +void QCommonStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); +void QCommonStyle_override_virtual_StandardPalette(void* self, intptr_t slot); +QPalette* QCommonStyle_virtualbase_StandardPalette(const void* self); +void QCommonStyle_Delete(QCommonStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcompleter.cpp b/qt/gen_qcompleter.cpp index 07226253..30ac9c5c 100644 --- a/qt/gen_qcompleter.cpp +++ b/qt/gen_qcompleter.cpp @@ -1,7 +1,10 @@ #include #include +#include #include +#include #include +#include #include #include #include @@ -9,20 +12,297 @@ #include #include #include +#include #include #include #include "gen_qcompleter.h" #include "_cgo_export.h" -QCompleter* QCompleter_new() { - return new QCompleter(); +class MiqtVirtualQCompleter : public virtual QCompleter { +public: + + MiqtVirtualQCompleter(): QCompleter() {}; + MiqtVirtualQCompleter(QAbstractItemModel* model): QCompleter(model) {}; + MiqtVirtualQCompleter(const QStringList& completions): QCompleter(completions) {}; + MiqtVirtualQCompleter(QObject* parent): QCompleter(parent) {}; + MiqtVirtualQCompleter(QAbstractItemModel* model, QObject* parent): QCompleter(model, parent) {}; + MiqtVirtualQCompleter(const QStringList& completions, QObject* parent): QCompleter(completions, parent) {}; + + virtual ~MiqtVirtualQCompleter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__PathFromIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QString pathFromIndex(const QModelIndex& index) const override { + if (handle__PathFromIndex == 0) { + return QCompleter::pathFromIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QCompleter_PathFromIndex(const_cast(this), handle__PathFromIndex, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_PathFromIndex(QModelIndex* index) const { + + QString _ret = QCompleter::pathFromIndex(*index); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SplitPath = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList splitPath(const QString& path) const override { + if (handle__SplitPath == 0) { + return QCompleter::splitPath(path); + } + + const QString path_ret = path; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray path_b = path_ret.toUtf8(); + struct miqt_string path_ms; + path_ms.len = path_b.length(); + path_ms.data = static_cast(malloc(path_ms.len)); + memcpy(path_ms.data, path_b.data(), path_ms.len); + struct miqt_string sigval1 = path_ms; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QCompleter_SplitPath(const_cast(this), handle__SplitPath, sigval1); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_SplitPath(struct miqt_string path) const { + QString path_QString = QString::fromUtf8(path.data, path.len); + + QStringList _ret = QCompleter::splitPath(path_QString); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* o, QEvent* e) override { + if (handle__EventFilter == 0) { + return QCompleter::eventFilter(o, e); + } + + QObject* sigval1 = o; + QEvent* sigval2 = e; + + bool callback_return_value = miqt_exec_callback_QCompleter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* o, QEvent* e) { + + return QCompleter::eventFilter(o, e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QCompleter::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QCompleter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QCompleter::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QCompleter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QCompleter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QCompleter::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QCompleter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QCompleter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QCompleter::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QCompleter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCompleter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QCompleter::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QCompleter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCompleter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QCompleter::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QCompleter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCompleter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QCompleter::disconnectNotify(*signal); + + } + +}; + +void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new2(QAbstractItemModel* model) { - return new QCompleter(model); +void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions) { +void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -30,18 +310,24 @@ QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ compl QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - return new QCompleter(completions_QList); + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new4(QObject* parent) { - return new QCompleter(parent); +void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(parent); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent) { - return new QCompleter(model, parent); +void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model, parent); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent) { +void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -49,7 +335,9 @@ QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ compl QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - return new QCompleter(completions_QList, parent); + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList, parent); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QCompleter_MetaObject(const QCompleter* self) { @@ -263,7 +551,7 @@ void QCompleter_Activated(QCompleter* self, struct miqt_string text) { } void QCompleter_connect_Activated(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QString& text) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -281,7 +569,7 @@ void QCompleter_ActivatedWithIndex(QCompleter* self, QModelIndex* index) { } void QCompleter_connect_ActivatedWithIndex(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QModelIndex& index) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -295,7 +583,7 @@ void QCompleter_Highlighted(QCompleter* self, struct miqt_string text) { } void QCompleter_connect_Highlighted(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QString& text) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -313,7 +601,7 @@ void QCompleter_HighlightedWithIndex(QCompleter* self, QModelIndex* index) { } void QCompleter_connect_HighlightedWithIndex(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QModelIndex& index) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -369,7 +657,83 @@ void QCompleter_Complete1(QCompleter* self, QRect* rect) { self->complete(*rect); } -void QCompleter_Delete(QCompleter* self) { - delete self; +void QCompleter_override_virtual_PathFromIndex(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__PathFromIndex = slot; +} + +struct miqt_string QCompleter_virtualbase_PathFromIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQCompleter*)(self) )->virtualbase_PathFromIndex(index); +} + +void QCompleter_override_virtual_SplitPath(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__SplitPath = slot; +} + +struct miqt_array /* of struct miqt_string */ QCompleter_virtualbase_SplitPath(const void* self, struct miqt_string path) { + return ( (const MiqtVirtualQCompleter*)(self) )->virtualbase_SplitPath(path); +} + +void QCompleter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__EventFilter = slot; +} + +bool QCompleter_virtualbase_EventFilter(void* self, QObject* o, QEvent* e) { + return ( (MiqtVirtualQCompleter*)(self) )->virtualbase_EventFilter(o, e); +} + +void QCompleter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__Event = slot; +} + +bool QCompleter_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQCompleter*)(self) )->virtualbase_Event(param1); +} + +void QCompleter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__TimerEvent = slot; +} + +void QCompleter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_TimerEvent(event); +} + +void QCompleter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__ChildEvent = slot; +} + +void QCompleter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_ChildEvent(event); +} + +void QCompleter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__CustomEvent = slot; +} + +void QCompleter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_CustomEvent(event); +} + +void QCompleter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__ConnectNotify = slot; +} + +void QCompleter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QCompleter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__DisconnectNotify = slot; +} + +void QCompleter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QCompleter_Delete(QCompleter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcompleter.go b/qt/gen_qcompleter.go index 46bb2641..3d7246ab 100644 --- a/qt/gen_qcompleter.go +++ b/qt/gen_qcompleter.go @@ -31,7 +31,8 @@ const ( ) type QCompleter struct { - h *C.QCompleter + h *C.QCompleter + isSubclass bool *QObject } @@ -49,27 +50,45 @@ func (this *QCompleter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCompleter(h *C.QCompleter) *QCompleter { +// newQCompleter constructs the type using only CGO pointers. +func newQCompleter(h *C.QCompleter, h_QObject *C.QObject) *QCompleter { if h == nil { return nil } - return &QCompleter{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QCompleter{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQCompleter(h unsafe.Pointer) *QCompleter { - return newQCompleter((*C.QCompleter)(h)) +// UnsafeNewQCompleter constructs the type using only unsafe pointers. +func UnsafeNewQCompleter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCompleter { + if h == nil { + return nil + } + + return &QCompleter{h: (*C.QCompleter)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQCompleter constructs a new QCompleter object. func NewQCompleter() *QCompleter { - ret := C.QCompleter_new() - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new(&outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter2 constructs a new QCompleter object. func NewQCompleter2(model *QAbstractItemModel) *QCompleter { - ret := C.QCompleter_new2(model.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new2(model.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter3 constructs a new QCompleter object. @@ -84,20 +103,35 @@ func NewQCompleter3(completions []string) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - ret := C.QCompleter_new3(completions_ma) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new3(completions_ma, &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter4 constructs a new QCompleter object. func NewQCompleter4(parent *QObject) *QCompleter { - ret := C.QCompleter_new4(parent.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new4(parent.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter5 constructs a new QCompleter object. func NewQCompleter5(model *QAbstractItemModel, parent *QObject) *QCompleter { - ret := C.QCompleter_new5(model.cPointer(), parent.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new5(model.cPointer(), parent.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter6 constructs a new QCompleter object. @@ -112,8 +146,13 @@ func NewQCompleter6(completions []string, parent *QObject) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - ret := C.QCompleter_new6(completions_ma, parent.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new6(completions_ma, parent.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCompleter) MetaObject() *QMetaObject { @@ -149,7 +188,7 @@ func (this *QCompleter) SetWidget(widget *QWidget) { } func (this *QCompleter) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QCompleter_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QCompleter_Widget(this.h)), nil, nil) } func (this *QCompleter) SetModel(c *QAbstractItemModel) { @@ -157,7 +196,7 @@ func (this *QCompleter) SetModel(c *QAbstractItemModel) { } func (this *QCompleter) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_Model(this.h)), nil) } func (this *QCompleter) SetCompletionMode(mode QCompleter__CompletionMode) { @@ -177,7 +216,7 @@ func (this *QCompleter) FilterMode() MatchFlag { } func (this *QCompleter) Popup() *QAbstractItemView { - return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QCompleter_Popup(this.h))) + return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QCompleter_Popup(this.h)), nil, nil, nil, nil, nil) } func (this *QCompleter) SetPopup(popup *QAbstractItemView) { @@ -255,7 +294,7 @@ func (this *QCompleter) CurrentCompletion() string { } func (this *QCompleter) CompletionModel() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_CompletionModel(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_CompletionModel(this.h)), nil) } func (this *QCompleter) CompletionPrefix() string { @@ -447,9 +486,257 @@ func (this *QCompleter) Complete1(rect *QRect) { C.QCompleter_Complete1(this.h, rect.cPointer()) } +func (this *QCompleter) callVirtualBase_PathFromIndex(index *QModelIndex) string { + + var _ms C.struct_miqt_string = C.QCompleter_virtualbase_PathFromIndex(unsafe.Pointer(this.h), index.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QCompleter) OnPathFromIndex(slot func(super func(index *QModelIndex) string, index *QModelIndex) string) { + C.QCompleter_override_virtual_PathFromIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_PathFromIndex +func miqt_exec_callback_QCompleter_PathFromIndex(self *C.QCompleter, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) string, index *QModelIndex) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_PathFromIndex, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QCompleter) callVirtualBase_SplitPath(path string) []string { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + + var _ma C.struct_miqt_array = C.QCompleter_virtualbase_SplitPath(unsafe.Pointer(this.h), path_ms) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QCompleter) OnSplitPath(slot func(super func(path string) []string, path string) []string) { + C.QCompleter_override_virtual_SplitPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_SplitPath +func miqt_exec_callback_QCompleter_SplitPath(self *C.QCompleter, cb C.intptr_t, path C.struct_miqt_string) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path string) []string, path string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var path_ms C.struct_miqt_string = path + path_ret := C.GoStringN(path_ms.data, C.int(int64(path_ms.len))) + C.free(unsafe.Pointer(path_ms.data)) + slotval1 := path_ret + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_SplitPath, slotval1) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QCompleter) callVirtualBase_EventFilter(o *QObject, e *QEvent) bool { + + return (bool)(C.QCompleter_virtualbase_EventFilter(unsafe.Pointer(this.h), o.cPointer(), e.cPointer())) + +} +func (this *QCompleter) OnEventFilter(slot func(super func(o *QObject, e *QEvent) bool, o *QObject, e *QEvent) bool) { + C.QCompleter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_EventFilter +func miqt_exec_callback_QCompleter_EventFilter(self *C.QCompleter, cb C.intptr_t, o *C.QObject, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(o *QObject, e *QEvent) bool, o *QObject, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(o)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCompleter) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QCompleter_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QCompleter) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QCompleter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_Event +func miqt_exec_callback_QCompleter_Event(self *C.QCompleter, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCompleter) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QCompleter_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCompleter) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QCompleter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_TimerEvent +func miqt_exec_callback_QCompleter_TimerEvent(self *C.QCompleter, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QCompleter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QCompleter) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QCompleter_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCompleter) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QCompleter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_ChildEvent +func miqt_exec_callback_QCompleter_ChildEvent(self *C.QCompleter, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QCompleter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QCompleter) callVirtualBase_CustomEvent(event *QEvent) { + + C.QCompleter_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCompleter) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCompleter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_CustomEvent +func miqt_exec_callback_QCompleter_CustomEvent(self *C.QCompleter, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCompleter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QCompleter) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QCompleter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCompleter) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCompleter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_ConnectNotify +func miqt_exec_callback_QCompleter_ConnectNotify(self *C.QCompleter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCompleter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QCompleter) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QCompleter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCompleter) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCompleter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_DisconnectNotify +func miqt_exec_callback_QCompleter_DisconnectNotify(self *C.QCompleter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCompleter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QCompleter) Delete() { - C.QCompleter_Delete(this.h) + C.QCompleter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcompleter.h b/qt/gen_qcompleter.h index ed9992b3..af8a7cd5 100644 --- a/qt/gen_qcompleter.h +++ b/qt/gen_qcompleter.h @@ -17,29 +17,37 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractItemView; +class QChildEvent; class QCompleter; +class QEvent; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; class QRect; +class QTimerEvent; class QWidget; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QChildEvent QChildEvent; typedef struct QCompleter QCompleter; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QRect QRect; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QCompleter* QCompleter_new(); -QCompleter* QCompleter_new2(QAbstractItemModel* model); -QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions); -QCompleter* QCompleter_new4(QObject* parent); -QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent); -QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent); +void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); QMetaObject* QCompleter_MetaObject(const QCompleter* self); void* QCompleter_Metacast(QCompleter* self, const char* param1); struct miqt_string QCompleter_Tr(const char* s); @@ -77,6 +85,8 @@ void QCompleter_Complete(QCompleter* self); void QCompleter_SetWrapAround(QCompleter* self, bool wrap); struct miqt_string QCompleter_PathFromIndex(const QCompleter* self, QModelIndex* index); struct miqt_array /* of struct miqt_string */ QCompleter_SplitPath(const QCompleter* self, struct miqt_string path); +bool QCompleter_EventFilter(QCompleter* self, QObject* o, QEvent* e); +bool QCompleter_Event(QCompleter* self, QEvent* param1); void QCompleter_Activated(QCompleter* self, struct miqt_string text); void QCompleter_connect_Activated(QCompleter* self, intptr_t slot); void QCompleter_ActivatedWithIndex(QCompleter* self, QModelIndex* index); @@ -90,7 +100,25 @@ struct miqt_string QCompleter_Tr3(const char* s, const char* c, int n); struct miqt_string QCompleter_TrUtf82(const char* s, const char* c); struct miqt_string QCompleter_TrUtf83(const char* s, const char* c, int n); void QCompleter_Complete1(QCompleter* self, QRect* rect); -void QCompleter_Delete(QCompleter* self); +void QCompleter_override_virtual_PathFromIndex(void* self, intptr_t slot); +struct miqt_string QCompleter_virtualbase_PathFromIndex(const void* self, QModelIndex* index); +void QCompleter_override_virtual_SplitPath(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QCompleter_virtualbase_SplitPath(const void* self, struct miqt_string path); +void QCompleter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCompleter_virtualbase_EventFilter(void* self, QObject* o, QEvent* e); +void QCompleter_override_virtual_Event(void* self, intptr_t slot); +bool QCompleter_virtualbase_Event(void* self, QEvent* param1); +void QCompleter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCompleter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QCompleter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QCompleter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QCompleter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QCompleter_virtualbase_CustomEvent(void* self, QEvent* event); +void QCompleter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QCompleter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QCompleter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QCompleter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QCompleter_Delete(QCompleter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qconcatenatetablesproxymodel.cpp b/qt/gen_qconcatenatetablesproxymodel.cpp index 50bfcc70..38e7cab1 100644 --- a/qt/gen_qconcatenatetablesproxymodel.cpp +++ b/qt/gen_qconcatenatetablesproxymodel.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -15,12 +16,1036 @@ #include "gen_qconcatenatetablesproxymodel.h" #include "_cgo_export.h" -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new() { - return new QConcatenateTablesProxyModel(); +class MiqtVirtualQConcatenateTablesProxyModel : public virtual QConcatenateTablesProxyModel { +public: + + MiqtVirtualQConcatenateTablesProxyModel(): QConcatenateTablesProxyModel() {}; + MiqtVirtualQConcatenateTablesProxyModel(QObject* parent): QConcatenateTablesProxyModel(parent) {}; + + virtual ~MiqtVirtualQConcatenateTablesProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QConcatenateTablesProxyModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QConcatenateTablesProxyModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QConcatenateTablesProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QConcatenateTablesProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& proxyIndex) const override { + if (handle__ItemData == 0) { + return QConcatenateTablesProxyModel::itemData(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* proxyIndex) const { + + QMap _ret = QConcatenateTablesProxyModel::itemData(*proxyIndex); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QConcatenateTablesProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QConcatenateTablesProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QConcatenateTablesProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QConcatenateTablesProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QConcatenateTablesProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QConcatenateTablesProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& index) const override { + if (handle__Parent == 0) { + return QConcatenateTablesProxyModel::parent(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* index) const { + + return new QModelIndex(QConcatenateTablesProxyModel::parent(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QConcatenateTablesProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QConcatenateTablesProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QConcatenateTablesProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QConcatenateTablesProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QConcatenateTablesProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QConcatenateTablesProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QConcatenateTablesProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QConcatenateTablesProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QConcatenateTablesProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QConcatenateTablesProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QConcatenateTablesProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QConcatenateTablesProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QConcatenateTablesProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QConcatenateTablesProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QConcatenateTablesProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QConcatenateTablesProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QConcatenateTablesProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QConcatenateTablesProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QConcatenateTablesProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QConcatenateTablesProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QConcatenateTablesProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QConcatenateTablesProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QConcatenateTablesProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QConcatenateTablesProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QConcatenateTablesProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QConcatenateTablesProxyModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QConcatenateTablesProxyModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QConcatenateTablesProxyModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QConcatenateTablesProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QConcatenateTablesProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QConcatenateTablesProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QConcatenateTablesProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QConcatenateTablesProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QConcatenateTablesProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QConcatenateTablesProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QConcatenateTablesProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QConcatenateTablesProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QConcatenateTablesProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QConcatenateTablesProxyModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QConcatenateTablesProxyModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QConcatenateTablesProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QConcatenateTablesProxyModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QConcatenateTablesProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QConcatenateTablesProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QConcatenateTablesProxyModel::revert(); + return; + } + + + miqt_exec_callback_QConcatenateTablesProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QConcatenateTablesProxyModel::revert(); + + } + +}; + +void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(); + *outptr_QConcatenateTablesProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent) { - return new QConcatenateTablesProxyModel(parent); +void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(parent); + *outptr_QConcatenateTablesProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self) { @@ -82,12 +1107,12 @@ QModelIndex* QConcatenateTablesProxyModel_MapToSource(const QConcatenateTablesPr return new QModelIndex(self->mapToSource(*proxyIndex)); } -QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_ItemData(const QConcatenateTablesProxyModel* self, QModelIndex* proxyIndex) { @@ -123,24 +1148,24 @@ int QConcatenateTablesProxyModel_Flags(const QConcatenateTablesProxyModel* self, return static_cast(_ret); } -QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QConcatenateTablesProxyModel_Parent(const QConcatenateTablesProxyModel* self, QModelIndex* index) { return new QModelIndex(self->parent(*index)); } -int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self) { - return self->rowCount(); +int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self) { - return self->columnCount(); +int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_MimeTypes(const QConcatenateTablesProxyModel* self) { @@ -229,31 +1254,283 @@ struct miqt_string QConcatenateTablesProxyModel_TrUtf83(const char* s, const cha return _ms; } -QVariant* QConcatenateTablesProxyModel_Data2(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +void QConcatenateTablesProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Data = slot; } -bool QConcatenateTablesProxyModel_SetData3(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +QVariant* QConcatenateTablesProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Data(index, role); } -QModelIndex* QConcatenateTablesProxyModel_Index3(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +void QConcatenateTablesProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SetData = slot; } -int QConcatenateTablesProxyModel_RowCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +bool QConcatenateTablesProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SetData(index, value, role); } -QVariant* QConcatenateTablesProxyModel_HeaderData3(const QConcatenateTablesProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QConcatenateTablesProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__ItemData = slot; } -int QConcatenateTablesProxyModel_ColumnCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_virtualbase_ItemData(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_ItemData(proxyIndex); +} + +void QConcatenateTablesProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QConcatenateTablesProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Flags = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QConcatenateTablesProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Parent(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Parent(index); +} + +void QConcatenateTablesProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RowCount = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RowCount(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QConcatenateTablesProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QConcatenateTablesProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__ColumnCount = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QConcatenateTablesProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QConcatenateTablesProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QConcatenateTablesProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QConcatenateTablesProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Span(index); +} + +void QConcatenateTablesProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QConcatenateTablesProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QConcatenateTablesProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QConcatenateTablesProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QConcatenateTablesProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QConcatenateTablesProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QConcatenateTablesProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Sort = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QConcatenateTablesProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QConcatenateTablesProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QConcatenateTablesProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QConcatenateTablesProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RoleNames(); +} + +void QConcatenateTablesProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Submit = slot; } -void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self) { - delete self; +bool QConcatenateTablesProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Submit(); +} + +void QConcatenateTablesProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Revert = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Revert(); +} + +void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qconcatenatetablesproxymodel.go b/qt/gen_qconcatenatetablesproxymodel.go index b7afd500..b2454a91 100644 --- a/qt/gen_qconcatenatetablesproxymodel.go +++ b/qt/gen_qconcatenatetablesproxymodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QConcatenateTablesProxyModel struct { - h *C.QConcatenateTablesProxyModel + h *C.QConcatenateTablesProxyModel + isSubclass bool *QAbstractItemModel } @@ -32,27 +34,47 @@ func (this *QConcatenateTablesProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel) *QConcatenateTablesProxyModel { +// newQConcatenateTablesProxyModel constructs the type using only CGO pointers. +func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QConcatenateTablesProxyModel { if h == nil { return nil } - return &QConcatenateTablesProxyModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QConcatenateTablesProxyModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer) *QConcatenateTablesProxyModel { - return newQConcatenateTablesProxyModel((*C.QConcatenateTablesProxyModel)(h)) +// UnsafeNewQConcatenateTablesProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QConcatenateTablesProxyModel { + if h == nil { + return nil + } + + return &QConcatenateTablesProxyModel{h: (*C.QConcatenateTablesProxyModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQConcatenateTablesProxyModel constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel() *QConcatenateTablesProxyModel { - ret := C.QConcatenateTablesProxyModel_new() - return newQConcatenateTablesProxyModel(ret) + var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QConcatenateTablesProxyModel_new(&outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQConcatenateTablesProxyModel2 constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel2(parent *QObject) *QConcatenateTablesProxyModel { - ret := C.QConcatenateTablesProxyModel_new2(parent.cPointer()) - return newQConcatenateTablesProxyModel(ret) + var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QConcatenateTablesProxyModel_new2(parent.cPointer(), &outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QConcatenateTablesProxyModel) MetaObject() *QMetaObject { @@ -88,7 +110,7 @@ func (this *QConcatenateTablesProxyModel) SourceModels() []*QAbstractItemModel { _ret := make([]*QAbstractItemModel, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractItemModel)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractItemModel(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractItemModel(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -115,15 +137,15 @@ func (this *QConcatenateTablesProxyModel) MapToSource(proxyIndex *QModelIndex) * return _goptr } -func (this *QConcatenateTablesProxyModel) Data(index *QModelIndex) *QVariant { - _ret := C.QConcatenateTablesProxyModel_Data(this.h, index.cPointer()) +func (this *QConcatenateTablesProxyModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QConcatenateTablesProxyModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QConcatenateTablesProxyModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QConcatenateTablesProxyModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QConcatenateTablesProxyModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QConcatenateTablesProxyModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QConcatenateTablesProxyModel) ItemData(proxyIndex *QModelIndex) map[int]QVariant { @@ -167,8 +189,8 @@ func (this *QConcatenateTablesProxyModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QConcatenateTablesProxyModel_Flags(this.h, index.cPointer())) } -func (this *QConcatenateTablesProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QConcatenateTablesProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QConcatenateTablesProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QConcatenateTablesProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -181,19 +203,19 @@ func (this *QConcatenateTablesProxyModel) Parent(index *QModelIndex) *QModelInde return _goptr } -func (this *QConcatenateTablesProxyModel) RowCount() int { - return (int)(C.QConcatenateTablesProxyModel_RowCount(this.h)) +func (this *QConcatenateTablesProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QConcatenateTablesProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QConcatenateTablesProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QConcatenateTablesProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QConcatenateTablesProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QConcatenateTablesProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QConcatenateTablesProxyModel) ColumnCount() int { - return (int)(C.QConcatenateTablesProxyModel_ColumnCount(this.h)) +func (this *QConcatenateTablesProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QConcatenateTablesProxyModel_ColumnCount(this.h, parent.cPointer())) } func (this *QConcatenateTablesProxyModel) MimeTypes() []string { @@ -216,7 +238,7 @@ func (this *QConcatenateTablesProxyModel) MimeData(indexes []QModelIndex) *QMime indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma)), nil) } func (this *QConcatenateTablesProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -278,42 +300,1064 @@ func QConcatenateTablesProxyModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QConcatenateTablesProxyModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QConcatenateTablesProxyModel_Data2(this.h, index.cPointer(), (C.int)(role)) +func (this *QConcatenateTablesProxyModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QConcatenateTablesProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Data +func miqt_exec_callback_QConcatenateTablesProxyModel_Data(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QConcatenateTablesProxyModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QConcatenateTablesProxyModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +func (this *QConcatenateTablesProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QConcatenateTablesProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SetData +func miqt_exec_callback_QConcatenateTablesProxyModel_SetData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QConcatenateTablesProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QConcatenateTablesProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QConcatenateTablesProxyModel) callVirtualBase_ItemData(proxyIndex *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QConcatenateTablesProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), proxyIndex.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnItemData(slot func(super func(proxyIndex *QModelIndex) map[int]QVariant, proxyIndex *QModelIndex) map[int]QVariant) { + C.QConcatenateTablesProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_ItemData +func miqt_exec_callback_QConcatenateTablesProxyModel_ItemData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) map[int]QVariant, proxyIndex *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QConcatenateTablesProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QConcatenateTablesProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SetItemData +func miqt_exec_callback_QConcatenateTablesProxyModel_SetItemData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QConcatenateTablesProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QConcatenateTablesProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Flags +func miqt_exec_callback_QConcatenateTablesProxyModel_Flags(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QConcatenateTablesProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Index +func miqt_exec_callback_QConcatenateTablesProxyModel_Index(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() -func (this *QConcatenateTablesProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QConcatenateTablesProxyModel_RowCount1(this.h, parent.cPointer())) } -func (this *QConcatenateTablesProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QConcatenateTablesProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QConcatenateTablesProxyModel) callVirtualBase_Parent(index *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnParent(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Parent +func miqt_exec_callback_QConcatenateTablesProxyModel_Parent(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QConcatenateTablesProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QConcatenateTablesProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RowCount +func miqt_exec_callback_QConcatenateTablesProxyModel_RowCount(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QConcatenateTablesProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_HeaderData +func miqt_exec_callback_QConcatenateTablesProxyModel_HeaderData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QConcatenateTablesProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QConcatenateTablesProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_ColumnCount +func miqt_exec_callback_QConcatenateTablesProxyModel_ColumnCount(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QConcatenateTablesProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QConcatenateTablesProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MimeTypes +func miqt_exec_callback_QConcatenateTablesProxyModel_MimeTypes(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QConcatenateTablesProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QConcatenateTablesProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QConcatenateTablesProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MimeData +func miqt_exec_callback_QConcatenateTablesProxyModel_MimeData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData +func miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData +func miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QConcatenateTablesProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Span +func miqt_exec_callback_QConcatenateTablesProxyModel_Span(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QConcatenateTablesProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QConcatenateTablesProxyModel_ColumnCount1(this.h, parent.cPointer())) +//export miqt_exec_callback_QConcatenateTablesProxyModel_Sibling +func miqt_exec_callback_QConcatenateTablesProxyModel_Sibling(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_HasChildren +func miqt_exec_callback_QConcatenateTablesProxyModel_HasChildren(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QConcatenateTablesProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SetHeaderData +func miqt_exec_callback_QConcatenateTablesProxyModel_SetHeaderData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QConcatenateTablesProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QConcatenateTablesProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QConcatenateTablesProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDropActions +func miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDropActions(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QConcatenateTablesProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QConcatenateTablesProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QConcatenateTablesProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDragActions +func miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDragActions(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_InsertRows +func miqt_exec_callback_QConcatenateTablesProxyModel_InsertRows(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_InsertColumns +func miqt_exec_callback_QConcatenateTablesProxyModel_InsertColumns(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RemoveRows +func miqt_exec_callback_QConcatenateTablesProxyModel_RemoveRows(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RemoveColumns +func miqt_exec_callback_QConcatenateTablesProxyModel_RemoveColumns(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QConcatenateTablesProxyModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MoveRows +func miqt_exec_callback_QConcatenateTablesProxyModel_MoveRows(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QConcatenateTablesProxyModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MoveColumns +func miqt_exec_callback_QConcatenateTablesProxyModel_MoveColumns(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QConcatenateTablesProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QConcatenateTablesProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QConcatenateTablesProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_FetchMore +func miqt_exec_callback_QConcatenateTablesProxyModel_FetchMore(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_CanFetchMore +func miqt_exec_callback_QConcatenateTablesProxyModel_CanFetchMore(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QConcatenateTablesProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QConcatenateTablesProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QConcatenateTablesProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Sort +func miqt_exec_callback_QConcatenateTablesProxyModel_Sort(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Buddy +func miqt_exec_callback_QConcatenateTablesProxyModel_Buddy(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QConcatenateTablesProxyModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Match +func miqt_exec_callback_QConcatenateTablesProxyModel_Match(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QConcatenateTablesProxyModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QConcatenateTablesProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RoleNames +func miqt_exec_callback_QConcatenateTablesProxyModel_RoleNames(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QConcatenateTablesProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QConcatenateTablesProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Submit +func miqt_exec_callback_QConcatenateTablesProxyModel_Submit(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Revert() { + + C.QConcatenateTablesProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QConcatenateTablesProxyModel) OnRevert(slot func(super func())) { + C.QConcatenateTablesProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Revert +func miqt_exec_callback_QConcatenateTablesProxyModel_Revert(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Revert) + } // Delete this object from C++ memory. func (this *QConcatenateTablesProxyModel) Delete() { - C.QConcatenateTablesProxyModel_Delete(this.h) + C.QConcatenateTablesProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qconcatenatetablesproxymodel.h b/qt/gen_qconcatenatetablesproxymodel.h index cfb6ad16..ee333f9a 100644 --- a/qt/gen_qconcatenatetablesproxymodel.h +++ b/qt/gen_qconcatenatetablesproxymodel.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QByteArray; class QConcatenateTablesProxyModel; class QMetaObject; class QMimeData; @@ -25,6 +26,7 @@ class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QByteArray QByteArray; typedef struct QConcatenateTablesProxyModel QConcatenateTablesProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; @@ -34,8 +36,8 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new(); -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent); +void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self); void* QConcatenateTablesProxyModel_Metacast(QConcatenateTablesProxyModel* self, const char* param1); struct miqt_string QConcatenateTablesProxyModel_Tr(const char* s); @@ -45,16 +47,16 @@ void QConcatenateTablesProxyModel_AddSourceModel(QConcatenateTablesProxyModel* s void QConcatenateTablesProxyModel_RemoveSourceModel(QConcatenateTablesProxyModel* self, QAbstractItemModel* sourceModel); QModelIndex* QConcatenateTablesProxyModel_MapFromSource(const QConcatenateTablesProxyModel* self, QModelIndex* sourceIndex); QModelIndex* QConcatenateTablesProxyModel_MapToSource(const QConcatenateTablesProxyModel* self, QModelIndex* proxyIndex); -QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index); -bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value); +QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role); +bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role); struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_ItemData(const QConcatenateTablesProxyModel* self, QModelIndex* proxyIndex); bool QConcatenateTablesProxyModel_SetItemData(QConcatenateTablesProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); int QConcatenateTablesProxyModel_Flags(const QConcatenateTablesProxyModel* self, QModelIndex* index); -QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column); +QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent); QModelIndex* QConcatenateTablesProxyModel_Parent(const QConcatenateTablesProxyModel* self, QModelIndex* index); -int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self); -QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation); -int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self); +int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent); +QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation, int role); +int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent); struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_MimeTypes(const QConcatenateTablesProxyModel* self); QMimeData* QConcatenateTablesProxyModel_MimeData(const QConcatenateTablesProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QConcatenateTablesProxyModel_CanDropMimeData(const QConcatenateTablesProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -64,13 +66,75 @@ struct miqt_string QConcatenateTablesProxyModel_Tr2(const char* s, const char* c struct miqt_string QConcatenateTablesProxyModel_Tr3(const char* s, const char* c, int n); struct miqt_string QConcatenateTablesProxyModel_TrUtf82(const char* s, const char* c); struct miqt_string QConcatenateTablesProxyModel_TrUtf83(const char* s, const char* c, int n); -QVariant* QConcatenateTablesProxyModel_Data2(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role); -bool QConcatenateTablesProxyModel_SetData3(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role); -QModelIndex* QConcatenateTablesProxyModel_Index3(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent); -int QConcatenateTablesProxyModel_RowCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent); -QVariant* QConcatenateTablesProxyModel_HeaderData3(const QConcatenateTablesProxyModel* self, int section, int orientation, int role); -int QConcatenateTablesProxyModel_ColumnCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent); -void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self); +void QConcatenateTablesProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QConcatenateTablesProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QConcatenateTablesProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QConcatenateTablesProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_virtualbase_ItemData(const void* self, QModelIndex* proxyIndex); +void QConcatenateTablesProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QConcatenateTablesProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Parent(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QConcatenateTablesProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QConcatenateTablesProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_MimeTypes(const void* self); +void QConcatenateTablesProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QConcatenateTablesProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QConcatenateTablesProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QConcatenateTablesProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QConcatenateTablesProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QConcatenateTablesProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_SupportedDropActions(const void* self); +void QConcatenateTablesProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_SupportedDragActions(const void* self); +void QConcatenateTablesProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QConcatenateTablesProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QConcatenateTablesProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_Sort(void* self, int column, int order); +void QConcatenateTablesProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QConcatenateTablesProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QConcatenateTablesProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_RoleNames(const void* self); +void QConcatenateTablesProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_Submit(void* self); +void QConcatenateTablesProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_Revert(void* self); +void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcontiguouscache.cpp b/qt/gen_qcontiguouscache.cpp index 5f2fc363..0d59c468 100644 --- a/qt/gen_qcontiguouscache.cpp +++ b/qt/gen_qcontiguouscache.cpp @@ -11,7 +11,11 @@ void QContiguousCacheData_FreeData(QContiguousCacheData* data) { QContiguousCacheData::freeData(data); } -void QContiguousCacheData_Delete(QContiguousCacheData* self) { - delete self; +void QContiguousCacheData_Delete(QContiguousCacheData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcontiguouscache.go b/qt/gen_qcontiguouscache.go index cba2d6d4..e02dcaf7 100644 --- a/qt/gen_qcontiguouscache.go +++ b/qt/gen_qcontiguouscache.go @@ -14,7 +14,8 @@ import ( ) type QContiguousCacheData struct { - h *C.QContiguousCacheData + h *C.QContiguousCacheData + isSubclass bool } func (this *QContiguousCacheData) cPointer() *C.QContiguousCacheData { @@ -31,6 +32,7 @@ func (this *QContiguousCacheData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQContiguousCacheData constructs the type using only CGO pointers. func newQContiguousCacheData(h *C.QContiguousCacheData) *QContiguousCacheData { if h == nil { return nil @@ -38,8 +40,13 @@ func newQContiguousCacheData(h *C.QContiguousCacheData) *QContiguousCacheData { return &QContiguousCacheData{h: h} } +// UnsafeNewQContiguousCacheData constructs the type using only unsafe pointers. func UnsafeNewQContiguousCacheData(h unsafe.Pointer) *QContiguousCacheData { - return newQContiguousCacheData((*C.QContiguousCacheData)(h)) + if h == nil { + return nil + } + + return &QContiguousCacheData{h: (*C.QContiguousCacheData)(h)} } func QContiguousCacheData_AllocateData(size int, alignment int) *QContiguousCacheData { @@ -52,7 +59,7 @@ func QContiguousCacheData_FreeData(data *QContiguousCacheData) { // Delete this object from C++ memory. func (this *QContiguousCacheData) Delete() { - C.QContiguousCacheData_Delete(this.h) + C.QContiguousCacheData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcontiguouscache.h b/qt/gen_qcontiguouscache.h index 39b612d4..caac4f41 100644 --- a/qt/gen_qcontiguouscache.h +++ b/qt/gen_qcontiguouscache.h @@ -22,7 +22,7 @@ typedef struct QContiguousCacheData QContiguousCacheData; QContiguousCacheData* QContiguousCacheData_AllocateData(int size, int alignment); void QContiguousCacheData_FreeData(QContiguousCacheData* data); -void QContiguousCacheData_Delete(QContiguousCacheData* self); +void QContiguousCacheData_Delete(QContiguousCacheData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcoreapplication.cpp b/qt/gen_qcoreapplication.cpp index fdd67150..8e852abc 100644 --- a/qt/gen_qcoreapplication.cpp +++ b/qt/gen_qcoreapplication.cpp @@ -1,24 +1,236 @@ #include #include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qcoreapplication.h" #include "_cgo_export.h" -QCoreApplication* QCoreApplication_new(int* argc, char** argv) { - return new QCoreApplication(static_cast(*argc), argv); +class MiqtVirtualQCoreApplication : public virtual QCoreApplication { +public: + + MiqtVirtualQCoreApplication(int& argc, char** argv): QCoreApplication(argc, argv) {}; + MiqtVirtualQCoreApplication(int& argc, char** argv, int param3): QCoreApplication(argc, argv, param3) {}; + + virtual ~MiqtVirtualQCoreApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Notify = 0; + + // Subclass to allow providing a Go implementation + virtual bool notify(QObject* param1, QEvent* param2) override { + if (handle__Notify == 0) { + return QCoreApplication::notify(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QCoreApplication_Notify(this, handle__Notify, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Notify(QObject* param1, QEvent* param2) { + + return QCoreApplication::notify(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QCoreApplication::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QCoreApplication_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QCoreApplication::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QCoreApplication::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QCoreApplication_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QCoreApplication::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QCoreApplication::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QCoreApplication_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QCoreApplication::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QCoreApplication::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QCoreApplication_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QCoreApplication::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QCoreApplication::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCoreApplication_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QCoreApplication::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QCoreApplication::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCoreApplication_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QCoreApplication::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QCoreApplication::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCoreApplication_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QCoreApplication::disconnectNotify(*signal); + + } + +}; + +void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv); + *outptr_QCoreApplication = ret; + *outptr_QObject = static_cast(ret); } -QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3) { - return new QCoreApplication(static_cast(*argc), argv, static_cast(param3)); +void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv, static_cast(param3)); + *outptr_QCoreApplication = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self) { @@ -327,7 +539,7 @@ void QCoreApplication_OrganizationNameChanged(QCoreApplication* self) { } void QCoreApplication_connect_OrganizationNameChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::organizationNameChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::organizationNameChanged), self, [=]() { miqt_exec_callback_QCoreApplication_OrganizationNameChanged(slot); }); } @@ -337,7 +549,7 @@ void QCoreApplication_OrganizationDomainChanged(QCoreApplication* self) { } void QCoreApplication_connect_OrganizationDomainChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::organizationDomainChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::organizationDomainChanged), self, [=]() { miqt_exec_callback_QCoreApplication_OrganizationDomainChanged(slot); }); } @@ -347,7 +559,7 @@ void QCoreApplication_ApplicationNameChanged(QCoreApplication* self) { } void QCoreApplication_connect_ApplicationNameChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::applicationNameChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::applicationNameChanged), self, [=]() { miqt_exec_callback_QCoreApplication_ApplicationNameChanged(slot); }); } @@ -357,7 +569,7 @@ void QCoreApplication_ApplicationVersionChanged(QCoreApplication* self) { } void QCoreApplication_connect_ApplicationVersionChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::applicationVersionChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::applicationVersionChanged), self, [=]() { miqt_exec_callback_QCoreApplication_ApplicationVersionChanged(slot); }); } @@ -456,7 +668,75 @@ struct miqt_string QCoreApplication_Translate4(const char* context, const char* return _ms; } -void QCoreApplication_Delete(QCoreApplication* self) { - delete self; +void QCoreApplication_override_virtual_Notify(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__Notify = slot; +} + +bool QCoreApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_Notify(param1, param2); +} + +void QCoreApplication_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__Event = slot; +} + +bool QCoreApplication_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_Event(param1); +} + +void QCoreApplication_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__EventFilter = slot; +} + +bool QCoreApplication_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QCoreApplication_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__TimerEvent = slot; +} + +void QCoreApplication_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_TimerEvent(event); +} + +void QCoreApplication_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__ChildEvent = slot; +} + +void QCoreApplication_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_ChildEvent(event); +} + +void QCoreApplication_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__CustomEvent = slot; +} + +void QCoreApplication_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_CustomEvent(event); +} + +void QCoreApplication_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__ConnectNotify = slot; +} + +void QCoreApplication_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QCoreApplication_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__DisconnectNotify = slot; +} + +void QCoreApplication_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QCoreApplication_Delete(QCoreApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcoreapplication.go b/qt/gen_qcoreapplication.go index f9957ee0..bc7e8d6f 100644 --- a/qt/gen_qcoreapplication.go +++ b/qt/gen_qcoreapplication.go @@ -21,7 +21,8 @@ const ( ) type QCoreApplication struct { - h *C.QCoreApplication + h *C.QCoreApplication + isSubclass bool *QObject } @@ -39,15 +40,23 @@ func (this *QCoreApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCoreApplication(h *C.QCoreApplication) *QCoreApplication { +// newQCoreApplication constructs the type using only CGO pointers. +func newQCoreApplication(h *C.QCoreApplication, h_QObject *C.QObject) *QCoreApplication { if h == nil { return nil } - return &QCoreApplication{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QCoreApplication{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQCoreApplication(h unsafe.Pointer) *QCoreApplication { - return newQCoreApplication((*C.QCoreApplication)(h)) +// UnsafeNewQCoreApplication constructs the type using only unsafe pointers. +func UnsafeNewQCoreApplication(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCoreApplication { + if h == nil { + return nil + } + + return &QCoreApplication{h: (*C.QCoreApplication)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQCoreApplication constructs a new QCoreApplication object. @@ -62,8 +71,13 @@ func NewQCoreApplication(args []string) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QCoreApplication_new(argc, &argv[0]) - return newQCoreApplication(ret) + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QCoreApplication_new(argc, &argv[0], &outptr_QCoreApplication, &outptr_QObject) + ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCoreApplication2 constructs a new QCoreApplication object. @@ -78,8 +92,13 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3)) - return newQCoreApplication(ret) + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QCoreApplication, &outptr_QObject) + ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCoreApplication) MetaObject() *QMetaObject { @@ -200,7 +219,7 @@ func QCoreApplication_IsSetuidAllowed() bool { } func QCoreApplication_Instance() *QCoreApplication { - return UnsafeNewQCoreApplication(unsafe.Pointer(C.QCoreApplication_Instance())) + return UnsafeNewQCoreApplication(unsafe.Pointer(C.QCoreApplication_Instance()), nil) } func QCoreApplication_Exec() int { @@ -240,7 +259,7 @@ func QCoreApplication_HasPendingEvents() bool { } func QCoreApplication_EventDispatcher() *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QCoreApplication_EventDispatcher())) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QCoreApplication_EventDispatcher()), nil) } func QCoreApplication_SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -529,9 +548,201 @@ func QCoreApplication_Translate4(context string, key string, disambiguation stri return _ret } +func (this *QCoreApplication) callVirtualBase_Notify(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QCoreApplication_virtualbase_Notify(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QCoreApplication) OnNotify(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QCoreApplication_override_virtual_Notify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_Notify +func miqt_exec_callback_QCoreApplication_Notify(self *C.QCoreApplication, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QCoreApplication{h: self}).callVirtualBase_Notify, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCoreApplication) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QCoreApplication_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QCoreApplication) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QCoreApplication_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_Event +func miqt_exec_callback_QCoreApplication_Event(self *C.QCoreApplication, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QCoreApplication{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCoreApplication) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QCoreApplication_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QCoreApplication) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QCoreApplication_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_EventFilter +func miqt_exec_callback_QCoreApplication_EventFilter(self *C.QCoreApplication, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCoreApplication{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCoreApplication) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QCoreApplication_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCoreApplication) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QCoreApplication_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_TimerEvent +func miqt_exec_callback_QCoreApplication_TimerEvent(self *C.QCoreApplication, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QCoreApplication_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCoreApplication) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QCoreApplication_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_ChildEvent +func miqt_exec_callback_QCoreApplication_ChildEvent(self *C.QCoreApplication, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_CustomEvent(event *QEvent) { + + C.QCoreApplication_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCoreApplication) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCoreApplication_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_CustomEvent +func miqt_exec_callback_QCoreApplication_CustomEvent(self *C.QCoreApplication, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QCoreApplication_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCoreApplication) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCoreApplication_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_ConnectNotify +func miqt_exec_callback_QCoreApplication_ConnectNotify(self *C.QCoreApplication, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QCoreApplication_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCoreApplication) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCoreApplication_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_DisconnectNotify +func miqt_exec_callback_QCoreApplication_DisconnectNotify(self *C.QCoreApplication, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QCoreApplication) Delete() { - C.QCoreApplication_Delete(this.h) + C.QCoreApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcoreapplication.h b/qt/gen_qcoreapplication.h index e20f6733..cbc3c096 100644 --- a/qt/gen_qcoreapplication.h +++ b/qt/gen_qcoreapplication.h @@ -17,23 +17,29 @@ extern "C" { #ifdef __cplusplus class QAbstractEventDispatcher; class QAbstractNativeEventFilter; +class QChildEvent; class QCoreApplication; class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QTranslator; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; +typedef struct QChildEvent QChildEvent; typedef struct QCoreApplication QCoreApplication; typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -QCoreApplication* QCoreApplication_new(int* argc, char** argv); -QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3); +void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self); void* QCoreApplication_Metacast(QCoreApplication* self, const char* param1); struct miqt_string QCoreApplication_Tr(const char* s); @@ -90,6 +96,7 @@ void QCoreApplication_ApplicationNameChanged(QCoreApplication* self); void QCoreApplication_connect_ApplicationNameChanged(QCoreApplication* self, intptr_t slot); void QCoreApplication_ApplicationVersionChanged(QCoreApplication* self); void QCoreApplication_connect_ApplicationVersionChanged(QCoreApplication* self, intptr_t slot); +bool QCoreApplication_Event(QCoreApplication* self, QEvent* param1); struct miqt_string QCoreApplication_Tr2(const char* s, const char* c); struct miqt_string QCoreApplication_Tr3(const char* s, const char* c, int n); struct miqt_string QCoreApplication_TrUtf82(const char* s, const char* c); @@ -103,7 +110,23 @@ void QCoreApplication_SendPostedEvents2(QObject* receiver, int event_type); void QCoreApplication_RemovePostedEvents2(QObject* receiver, int eventType); struct miqt_string QCoreApplication_Translate3(const char* context, const char* key, const char* disambiguation); struct miqt_string QCoreApplication_Translate4(const char* context, const char* key, const char* disambiguation, int n); -void QCoreApplication_Delete(QCoreApplication* self); +void QCoreApplication_override_virtual_Notify(void* self, intptr_t slot); +bool QCoreApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2); +void QCoreApplication_override_virtual_Event(void* self, intptr_t slot); +bool QCoreApplication_virtualbase_Event(void* self, QEvent* param1); +void QCoreApplication_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCoreApplication_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QCoreApplication_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCoreApplication_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QCoreApplication_override_virtual_ChildEvent(void* self, intptr_t slot); +void QCoreApplication_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QCoreApplication_override_virtual_CustomEvent(void* self, intptr_t slot); +void QCoreApplication_virtualbase_CustomEvent(void* self, QEvent* event); +void QCoreApplication_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QCoreApplication_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QCoreApplication_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QCoreApplication_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QCoreApplication_Delete(QCoreApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcoreevent.cpp b/qt/gen_qcoreevent.cpp index c940beb1..fcdf4843 100644 --- a/qt/gen_qcoreevent.cpp +++ b/qt/gen_qcoreevent.cpp @@ -8,12 +8,14 @@ #include "gen_qcoreevent.h" #include "_cgo_export.h" -QEvent* QEvent_new(int typeVal) { - return new QEvent(static_cast(typeVal)); +void QEvent_new(int typeVal, QEvent** outptr_QEvent) { + QEvent* ret = new QEvent(static_cast(typeVal)); + *outptr_QEvent = ret; } -QEvent* QEvent_new2(QEvent* other) { - return new QEvent(*other); +void QEvent_new2(QEvent* other, QEvent** outptr_QEvent) { + QEvent* ret = new QEvent(*other); + *outptr_QEvent = ret; } void QEvent_OperatorAssign(QEvent* self, QEvent* other) { @@ -53,32 +55,48 @@ int QEvent_RegisterEventType1(int hint) { return QEvent::registerEventType(static_cast(hint)); } -void QEvent_Delete(QEvent* self) { - delete self; +void QEvent_Delete(QEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTimerEvent* QTimerEvent_new(int timerId) { - return new QTimerEvent(static_cast(timerId)); +void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent) { + QTimerEvent* ret = new QTimerEvent(static_cast(timerId)); + *outptr_QTimerEvent = ret; + *outptr_QEvent = static_cast(ret); } -QTimerEvent* QTimerEvent_new2(QTimerEvent* param1) { - return new QTimerEvent(*param1); +void QTimerEvent_new2(QTimerEvent* param1, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent) { + QTimerEvent* ret = new QTimerEvent(*param1); + *outptr_QTimerEvent = ret; + *outptr_QEvent = static_cast(ret); } int QTimerEvent_TimerId(const QTimerEvent* self) { return self->timerId(); } -void QTimerEvent_Delete(QTimerEvent* self) { - delete self; +void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QChildEvent* QChildEvent_new(int typeVal, QObject* child) { - return new QChildEvent(static_cast(typeVal), child); +void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent) { + QChildEvent* ret = new QChildEvent(static_cast(typeVal), child); + *outptr_QChildEvent = ret; + *outptr_QEvent = static_cast(ret); } -QChildEvent* QChildEvent_new2(QChildEvent* param1) { - return new QChildEvent(*param1); +void QChildEvent_new2(QChildEvent* param1, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent) { + QChildEvent* ret = new QChildEvent(*param1); + *outptr_QChildEvent = ret; + *outptr_QEvent = static_cast(ret); } QObject* QChildEvent_Child(const QChildEvent* self) { @@ -97,17 +115,25 @@ bool QChildEvent_Removed(const QChildEvent* self) { return self->removed(); } -void QChildEvent_Delete(QChildEvent* self) { - delete self; +void QChildEvent_Delete(QChildEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name) { +void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent) { QByteArray name_QByteArray(name.data, name.len); - return new QDynamicPropertyChangeEvent(name_QByteArray); + QDynamicPropertyChangeEvent* ret = new QDynamicPropertyChangeEvent(name_QByteArray); + *outptr_QDynamicPropertyChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1) { - return new QDynamicPropertyChangeEvent(*param1); +void QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent) { + QDynamicPropertyChangeEvent* ret = new QDynamicPropertyChangeEvent(*param1); + *outptr_QDynamicPropertyChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self) { @@ -119,7 +145,11 @@ struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicProper return _ms; } -void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self) { - delete self; +void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcoreevent.go b/qt/gen_qcoreevent.go index 9d6deb74..f7b650cb 100644 --- a/qt/gen_qcoreevent.go +++ b/qt/gen_qcoreevent.go @@ -191,7 +191,8 @@ const ( ) type QEvent struct { - h *C.QEvent + h *C.QEvent + isSubclass bool } func (this *QEvent) cPointer() *C.QEvent { @@ -208,6 +209,7 @@ func (this *QEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEvent constructs the type using only CGO pointers. func newQEvent(h *C.QEvent) *QEvent { if h == nil { return nil @@ -215,20 +217,33 @@ func newQEvent(h *C.QEvent) *QEvent { return &QEvent{h: h} } +// UnsafeNewQEvent constructs the type using only unsafe pointers. func UnsafeNewQEvent(h unsafe.Pointer) *QEvent { - return newQEvent((*C.QEvent)(h)) + if h == nil { + return nil + } + + return &QEvent{h: (*C.QEvent)(h)} } // NewQEvent constructs a new QEvent object. func NewQEvent(typeVal QEvent__Type) *QEvent { - ret := C.QEvent_new((C.int)(typeVal)) - return newQEvent(ret) + var outptr_QEvent *C.QEvent = nil + + C.QEvent_new((C.int)(typeVal), &outptr_QEvent) + ret := newQEvent(outptr_QEvent) + ret.isSubclass = true + return ret } // NewQEvent2 constructs a new QEvent object. func NewQEvent2(other *QEvent) *QEvent { - ret := C.QEvent_new2(other.cPointer()) - return newQEvent(ret) + var outptr_QEvent *C.QEvent = nil + + C.QEvent_new2(other.cPointer(), &outptr_QEvent) + ret := newQEvent(outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QEvent) OperatorAssign(other *QEvent) { @@ -269,7 +284,7 @@ func QEvent_RegisterEventType1(hint int) int { // Delete this object from C++ memory. func (this *QEvent) Delete() { - C.QEvent_Delete(this.h) + C.QEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -282,7 +297,8 @@ func (this *QEvent) GoGC() { } type QTimerEvent struct { - h *C.QTimerEvent + h *C.QTimerEvent + isSubclass bool *QEvent } @@ -300,27 +316,45 @@ func (this *QTimerEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTimerEvent(h *C.QTimerEvent) *QTimerEvent { +// newQTimerEvent constructs the type using only CGO pointers. +func newQTimerEvent(h *C.QTimerEvent, h_QEvent *C.QEvent) *QTimerEvent { if h == nil { return nil } - return &QTimerEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QTimerEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQTimerEvent(h unsafe.Pointer) *QTimerEvent { - return newQTimerEvent((*C.QTimerEvent)(h)) +// UnsafeNewQTimerEvent constructs the type using only unsafe pointers. +func UnsafeNewQTimerEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QTimerEvent { + if h == nil { + return nil + } + + return &QTimerEvent{h: (*C.QTimerEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQTimerEvent constructs a new QTimerEvent object. func NewQTimerEvent(timerId int) *QTimerEvent { - ret := C.QTimerEvent_new((C.int)(timerId)) - return newQTimerEvent(ret) + var outptr_QTimerEvent *C.QTimerEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTimerEvent_new((C.int)(timerId), &outptr_QTimerEvent, &outptr_QEvent) + ret := newQTimerEvent(outptr_QTimerEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTimerEvent2 constructs a new QTimerEvent object. func NewQTimerEvent2(param1 *QTimerEvent) *QTimerEvent { - ret := C.QTimerEvent_new2(param1.cPointer()) - return newQTimerEvent(ret) + var outptr_QTimerEvent *C.QTimerEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTimerEvent_new2(param1.cPointer(), &outptr_QTimerEvent, &outptr_QEvent) + ret := newQTimerEvent(outptr_QTimerEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QTimerEvent) TimerId() int { @@ -329,7 +363,7 @@ func (this *QTimerEvent) TimerId() int { // Delete this object from C++ memory. func (this *QTimerEvent) Delete() { - C.QTimerEvent_Delete(this.h) + C.QTimerEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -342,7 +376,8 @@ func (this *QTimerEvent) GoGC() { } type QChildEvent struct { - h *C.QChildEvent + h *C.QChildEvent + isSubclass bool *QEvent } @@ -360,27 +395,45 @@ func (this *QChildEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQChildEvent(h *C.QChildEvent) *QChildEvent { +// newQChildEvent constructs the type using only CGO pointers. +func newQChildEvent(h *C.QChildEvent, h_QEvent *C.QEvent) *QChildEvent { if h == nil { return nil } - return &QChildEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QChildEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQChildEvent(h unsafe.Pointer) *QChildEvent { - return newQChildEvent((*C.QChildEvent)(h)) +// UnsafeNewQChildEvent constructs the type using only unsafe pointers. +func UnsafeNewQChildEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QChildEvent { + if h == nil { + return nil + } + + return &QChildEvent{h: (*C.QChildEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQChildEvent constructs a new QChildEvent object. func NewQChildEvent(typeVal QEvent__Type, child *QObject) *QChildEvent { - ret := C.QChildEvent_new((C.int)(typeVal), child.cPointer()) - return newQChildEvent(ret) + var outptr_QChildEvent *C.QChildEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QChildEvent_new((C.int)(typeVal), child.cPointer(), &outptr_QChildEvent, &outptr_QEvent) + ret := newQChildEvent(outptr_QChildEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQChildEvent2 constructs a new QChildEvent object. func NewQChildEvent2(param1 *QChildEvent) *QChildEvent { - ret := C.QChildEvent_new2(param1.cPointer()) - return newQChildEvent(ret) + var outptr_QChildEvent *C.QChildEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QChildEvent_new2(param1.cPointer(), &outptr_QChildEvent, &outptr_QEvent) + ret := newQChildEvent(outptr_QChildEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QChildEvent) Child() *QObject { @@ -401,7 +454,7 @@ func (this *QChildEvent) Removed() bool { // Delete this object from C++ memory. func (this *QChildEvent) Delete() { - C.QChildEvent_Delete(this.h) + C.QChildEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -414,7 +467,8 @@ func (this *QChildEvent) GoGC() { } type QDynamicPropertyChangeEvent struct { - h *C.QDynamicPropertyChangeEvent + h *C.QDynamicPropertyChangeEvent + isSubclass bool *QEvent } @@ -432,15 +486,23 @@ func (this *QDynamicPropertyChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent { +// newQDynamicPropertyChangeEvent constructs the type using only CGO pointers. +func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent, h_QEvent *C.QEvent) *QDynamicPropertyChangeEvent { if h == nil { return nil } - return &QDynamicPropertyChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QDynamicPropertyChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer) *QDynamicPropertyChangeEvent { - return newQDynamicPropertyChangeEvent((*C.QDynamicPropertyChangeEvent)(h)) +// UnsafeNewQDynamicPropertyChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDynamicPropertyChangeEvent { + if h == nil { + return nil + } + + return &QDynamicPropertyChangeEvent{h: (*C.QDynamicPropertyChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQDynamicPropertyChangeEvent constructs a new QDynamicPropertyChangeEvent object. @@ -448,14 +510,24 @@ func NewQDynamicPropertyChangeEvent(name []byte) *QDynamicPropertyChangeEvent { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - ret := C.QDynamicPropertyChangeEvent_new(name_alias) - return newQDynamicPropertyChangeEvent(ret) + var outptr_QDynamicPropertyChangeEvent *C.QDynamicPropertyChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDynamicPropertyChangeEvent_new(name_alias, &outptr_QDynamicPropertyChangeEvent, &outptr_QEvent) + ret := newQDynamicPropertyChangeEvent(outptr_QDynamicPropertyChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDynamicPropertyChangeEvent2 constructs a new QDynamicPropertyChangeEvent object. func NewQDynamicPropertyChangeEvent2(param1 *QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent { - ret := C.QDynamicPropertyChangeEvent_new2(param1.cPointer()) - return newQDynamicPropertyChangeEvent(ret) + var outptr_QDynamicPropertyChangeEvent *C.QDynamicPropertyChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDynamicPropertyChangeEvent_new2(param1.cPointer(), &outptr_QDynamicPropertyChangeEvent, &outptr_QEvent) + ret := newQDynamicPropertyChangeEvent(outptr_QDynamicPropertyChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDynamicPropertyChangeEvent) PropertyName() []byte { @@ -467,7 +539,7 @@ func (this *QDynamicPropertyChangeEvent) PropertyName() []byte { // Delete this object from C++ memory. func (this *QDynamicPropertyChangeEvent) Delete() { - C.QDynamicPropertyChangeEvent_Delete(this.h) + C.QDynamicPropertyChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcoreevent.h b/qt/gen_qcoreevent.h index c6fdd80f..6793d115 100644 --- a/qt/gen_qcoreevent.h +++ b/qt/gen_qcoreevent.h @@ -30,8 +30,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -QEvent* QEvent_new(int typeVal); -QEvent* QEvent_new2(QEvent* other); +void QEvent_new(int typeVal, QEvent** outptr_QEvent); +void QEvent_new2(QEvent* other, QEvent** outptr_QEvent); void QEvent_OperatorAssign(QEvent* self, QEvent* other); int QEvent_Type(const QEvent* self); bool QEvent_Spontaneous(const QEvent* self); @@ -41,25 +41,25 @@ void QEvent_Accept(QEvent* self); void QEvent_Ignore(QEvent* self); int QEvent_RegisterEventType(); int QEvent_RegisterEventType1(int hint); -void QEvent_Delete(QEvent* self); +void QEvent_Delete(QEvent* self, bool isSubclass); -QTimerEvent* QTimerEvent_new(int timerId); -QTimerEvent* QTimerEvent_new2(QTimerEvent* param1); +void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent); +void QTimerEvent_new2(QTimerEvent* param1, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent); int QTimerEvent_TimerId(const QTimerEvent* self); -void QTimerEvent_Delete(QTimerEvent* self); +void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass); -QChildEvent* QChildEvent_new(int typeVal, QObject* child); -QChildEvent* QChildEvent_new2(QChildEvent* param1); +void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent); +void QChildEvent_new2(QChildEvent* param1, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent); QObject* QChildEvent_Child(const QChildEvent* self); bool QChildEvent_Added(const QChildEvent* self); bool QChildEvent_Polished(const QChildEvent* self); bool QChildEvent_Removed(const QChildEvent* self); -void QChildEvent_Delete(QChildEvent* self); +void QChildEvent_Delete(QChildEvent* self, bool isSubclass); -QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name); -QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1); +void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent); +void QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent); struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self); -void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self); +void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcryptographichash.cpp b/qt/gen_qcryptographichash.cpp index b2e5bb6b..4b4e65e1 100644 --- a/qt/gen_qcryptographichash.cpp +++ b/qt/gen_qcryptographichash.cpp @@ -5,8 +5,9 @@ #include "gen_qcryptographichash.h" #include "_cgo_export.h" -QCryptographicHash* QCryptographicHash_new(int method) { - return new QCryptographicHash(static_cast(method)); +void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash) { + QCryptographicHash* ret = new QCryptographicHash(static_cast(method)); + *outptr_QCryptographicHash = ret; } void QCryptographicHash_Reset(QCryptographicHash* self) { @@ -49,7 +50,11 @@ int QCryptographicHash_HashLength(int method) { return QCryptographicHash::hashLength(static_cast(method)); } -void QCryptographicHash_Delete(QCryptographicHash* self) { - delete self; +void QCryptographicHash_Delete(QCryptographicHash* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcryptographichash.go b/qt/gen_qcryptographichash.go index 9d1d0248..a171fb1f 100644 --- a/qt/gen_qcryptographichash.go +++ b/qt/gen_qcryptographichash.go @@ -38,7 +38,8 @@ const ( ) type QCryptographicHash struct { - h *C.QCryptographicHash + h *C.QCryptographicHash + isSubclass bool } func (this *QCryptographicHash) cPointer() *C.QCryptographicHash { @@ -55,6 +56,7 @@ func (this *QCryptographicHash) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCryptographicHash constructs the type using only CGO pointers. func newQCryptographicHash(h *C.QCryptographicHash) *QCryptographicHash { if h == nil { return nil @@ -62,14 +64,23 @@ func newQCryptographicHash(h *C.QCryptographicHash) *QCryptographicHash { return &QCryptographicHash{h: h} } +// UnsafeNewQCryptographicHash constructs the type using only unsafe pointers. func UnsafeNewQCryptographicHash(h unsafe.Pointer) *QCryptographicHash { - return newQCryptographicHash((*C.QCryptographicHash)(h)) + if h == nil { + return nil + } + + return &QCryptographicHash{h: (*C.QCryptographicHash)(h)} } // NewQCryptographicHash constructs a new QCryptographicHash object. func NewQCryptographicHash(method QCryptographicHash__Algorithm) *QCryptographicHash { - ret := C.QCryptographicHash_new((C.int)(method)) - return newQCryptographicHash(ret) + var outptr_QCryptographicHash *C.QCryptographicHash = nil + + C.QCryptographicHash_new((C.int)(method), &outptr_QCryptographicHash) + ret := newQCryptographicHash(outptr_QCryptographicHash) + ret.isSubclass = true + return ret } func (this *QCryptographicHash) Reset() { @@ -116,7 +127,7 @@ func QCryptographicHash_HashLength(method QCryptographicHash__Algorithm) int { // Delete this object from C++ memory. func (this *QCryptographicHash) Delete() { - C.QCryptographicHash_Delete(this.h) + C.QCryptographicHash_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcryptographichash.h b/qt/gen_qcryptographichash.h index 62b9ab21..44fa4f23 100644 --- a/qt/gen_qcryptographichash.h +++ b/qt/gen_qcryptographichash.h @@ -24,7 +24,7 @@ typedef struct QCryptographicHash QCryptographicHash; typedef struct QIODevice QIODevice; #endif -QCryptographicHash* QCryptographicHash_new(int method); +void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash); void QCryptographicHash_Reset(QCryptographicHash* self); void QCryptographicHash_AddData(QCryptographicHash* self, const char* data, int length); void QCryptographicHash_AddDataWithData(QCryptographicHash* self, struct miqt_string data); @@ -32,7 +32,7 @@ bool QCryptographicHash_AddDataWithDevice(QCryptographicHash* self, QIODevice* d struct miqt_string QCryptographicHash_Result(const QCryptographicHash* self); struct miqt_string QCryptographicHash_Hash(struct miqt_string data, int method); int QCryptographicHash_HashLength(int method); -void QCryptographicHash_Delete(QCryptographicHash* self); +void QCryptographicHash_Delete(QCryptographicHash* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qcursor.cpp b/qt/gen_qcursor.cpp index d3569665..47331c94 100644 --- a/qt/gen_qcursor.cpp +++ b/qt/gen_qcursor.cpp @@ -7,40 +7,49 @@ #include "gen_qcursor.h" #include "_cgo_export.h" -QCursor* QCursor_new() { - return new QCursor(); +void QCursor_new(QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(); + *outptr_QCursor = ret; } -QCursor* QCursor_new2(int shape) { - return new QCursor(static_cast(shape)); +void QCursor_new2(int shape, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(static_cast(shape)); + *outptr_QCursor = ret; } -QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask) { - return new QCursor(*bitmap, *mask); +void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*bitmap, *mask); + *outptr_QCursor = ret; } -QCursor* QCursor_new4(QPixmap* pixmap) { - return new QCursor(*pixmap); +void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*pixmap); + *outptr_QCursor = ret; } -QCursor* QCursor_new5(QCursor* cursor) { - return new QCursor(*cursor); +void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*cursor); + *outptr_QCursor = ret; } -QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX) { - return new QCursor(*bitmap, *mask, static_cast(hotX)); +void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX)); + *outptr_QCursor = ret; } -QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY) { - return new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); +void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); + *outptr_QCursor = ret; } -QCursor* QCursor_new8(QPixmap* pixmap, int hotX) { - return new QCursor(*pixmap, static_cast(hotX)); +void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*pixmap, static_cast(hotX)); + *outptr_QCursor = ret; } -QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY) { - return new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); +void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); + *outptr_QCursor = ret; } void QCursor_OperatorAssign(QCursor* self, QCursor* cursor) { @@ -108,7 +117,11 @@ void QCursor_SetPos3(QScreen* screen, QPoint* p) { QCursor::setPos(screen, *p); } -void QCursor_Delete(QCursor* self) { - delete self; +void QCursor_Delete(QCursor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qcursor.go b/qt/gen_qcursor.go index e53bcde6..61195044 100644 --- a/qt/gen_qcursor.go +++ b/qt/gen_qcursor.go @@ -14,7 +14,8 @@ import ( ) type QCursor struct { - h *C.QCursor + h *C.QCursor + isSubclass bool } func (this *QCursor) cPointer() *C.QCursor { @@ -31,6 +32,7 @@ func (this *QCursor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCursor constructs the type using only CGO pointers. func newQCursor(h *C.QCursor) *QCursor { if h == nil { return nil @@ -38,62 +40,103 @@ func newQCursor(h *C.QCursor) *QCursor { return &QCursor{h: h} } +// UnsafeNewQCursor constructs the type using only unsafe pointers. func UnsafeNewQCursor(h unsafe.Pointer) *QCursor { - return newQCursor((*C.QCursor)(h)) + if h == nil { + return nil + } + + return &QCursor{h: (*C.QCursor)(h)} } // NewQCursor constructs a new QCursor object. func NewQCursor() *QCursor { - ret := C.QCursor_new() - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new(&outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor2 constructs a new QCursor object. func NewQCursor2(shape CursorShape) *QCursor { - ret := C.QCursor_new2((C.int)(shape)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new2((C.int)(shape), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor3 constructs a new QCursor object. func NewQCursor3(bitmap *QBitmap, mask *QBitmap) *QCursor { - ret := C.QCursor_new3(bitmap.cPointer(), mask.cPointer()) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new3(bitmap.cPointer(), mask.cPointer(), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor4 constructs a new QCursor object. func NewQCursor4(pixmap *QPixmap) *QCursor { - ret := C.QCursor_new4(pixmap.cPointer()) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new4(pixmap.cPointer(), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor5 constructs a new QCursor object. func NewQCursor5(cursor *QCursor) *QCursor { - ret := C.QCursor_new5(cursor.cPointer()) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new5(cursor.cPointer(), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor6 constructs a new QCursor object. func NewQCursor6(bitmap *QBitmap, mask *QBitmap, hotX int) *QCursor { - ret := C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor7 constructs a new QCursor object. func NewQCursor7(bitmap *QBitmap, mask *QBitmap, hotX int, hotY int) *QCursor { - ret := C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor8 constructs a new QCursor object. func NewQCursor8(pixmap *QPixmap, hotX int) *QCursor { - ret := C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor9 constructs a new QCursor object. func NewQCursor9(pixmap *QPixmap, hotX int, hotY int) *QCursor { - ret := C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } func (this *QCursor) OperatorAssign(cursor *QCursor) { @@ -113,30 +156,30 @@ func (this *QCursor) SetShape(newShape CursorShape) { } func (this *QCursor) Bitmap() *QBitmap { - return UnsafeNewQBitmap(unsafe.Pointer(C.QCursor_Bitmap(this.h))) + return UnsafeNewQBitmap(unsafe.Pointer(C.QCursor_Bitmap(this.h)), nil, nil) } func (this *QCursor) Mask() *QBitmap { - return UnsafeNewQBitmap(unsafe.Pointer(C.QCursor_Mask(this.h))) + return UnsafeNewQBitmap(unsafe.Pointer(C.QCursor_Mask(this.h)), nil, nil) } func (this *QCursor) BitmapWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QBitmap { _ret := C.QCursor_BitmapWithQtReturnByValueConstant(this.h, (C.int)(param1)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) MaskWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QBitmap { _ret := C.QCursor_MaskWithQtReturnByValueConstant(this.h, (C.int)(param1)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Pixmap() *QPixmap { _ret := C.QCursor_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -180,7 +223,7 @@ func QCursor_SetPos3(screen *QScreen, p *QPoint) { // Delete this object from C++ memory. func (this *QCursor) Delete() { - C.QCursor_Delete(this.h) + C.QCursor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qcursor.h b/qt/gen_qcursor.h index c6f728fa..e08abd93 100644 --- a/qt/gen_qcursor.h +++ b/qt/gen_qcursor.h @@ -28,15 +28,15 @@ typedef struct QPoint QPoint; typedef struct QScreen QScreen; #endif -QCursor* QCursor_new(); -QCursor* QCursor_new2(int shape); -QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask); -QCursor* QCursor_new4(QPixmap* pixmap); -QCursor* QCursor_new5(QCursor* cursor); -QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX); -QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY); -QCursor* QCursor_new8(QPixmap* pixmap, int hotX); -QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY); +void QCursor_new(QCursor** outptr_QCursor); +void QCursor_new2(int shape, QCursor** outptr_QCursor); +void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor); +void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor); +void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor); +void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor); +void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor); +void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor); +void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor); void QCursor_OperatorAssign(QCursor* self, QCursor* cursor); void QCursor_Swap(QCursor* self, QCursor* other); int QCursor_Shape(const QCursor* self); @@ -53,7 +53,7 @@ void QCursor_SetPos(int x, int y); void QCursor_SetPos2(QScreen* screen, int x, int y); void QCursor_SetPosWithQPoint(QPoint* p); void QCursor_SetPos3(QScreen* screen, QPoint* p); -void QCursor_Delete(QCursor* self); +void QCursor_Delete(QCursor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdatastream.cpp b/qt/gen_qdatastream.cpp index d6b198c7..e4cb1318 100644 --- a/qt/gen_qdatastream.cpp +++ b/qt/gen_qdatastream.cpp @@ -6,17 +6,20 @@ #include "gen_qdatastream.h" #include "_cgo_export.h" -QDataStream* QDataStream_new() { - return new QDataStream(); +void QDataStream_new(QDataStream** outptr_QDataStream) { + QDataStream* ret = new QDataStream(); + *outptr_QDataStream = ret; } -QDataStream* QDataStream_new2(QIODevice* param1) { - return new QDataStream(param1); +void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream) { + QDataStream* ret = new QDataStream(param1); + *outptr_QDataStream = ret; } -QDataStream* QDataStream_new3(struct miqt_string param1) { +void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream) { QByteArray param1_QByteArray(param1.data, param1.len); - return new QDataStream(param1_QByteArray); + QDataStream* ret = new QDataStream(param1_QByteArray); + *outptr_QDataStream = ret; } QIODevice* QDataStream_Device(const QDataStream* self) { @@ -208,15 +211,24 @@ void QDataStream_AbortTransaction(QDataStream* self) { self->abortTransaction(); } -void QDataStream_Delete(QDataStream* self) { - delete self; +void QDataStream_Delete(QDataStream* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__StreamStateSaver* QtPrivate__StreamStateSaver_new(QDataStream* s) { - return new QtPrivate::StreamStateSaver(s); +void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver) { + QtPrivate::StreamStateSaver* ret = new QtPrivate::StreamStateSaver(s); + *outptr_QtPrivate__StreamStateSaver = ret; } -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self) { - delete self; +void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdatastream.go b/qt/gen_qdatastream.go index f0305278..43ca9efe 100644 --- a/qt/gen_qdatastream.go +++ b/qt/gen_qdatastream.go @@ -75,7 +75,8 @@ const ( ) type QDataStream struct { - h *C.QDataStream + h *C.QDataStream + isSubclass bool } func (this *QDataStream) cPointer() *C.QDataStream { @@ -92,6 +93,7 @@ func (this *QDataStream) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDataStream constructs the type using only CGO pointers. func newQDataStream(h *C.QDataStream) *QDataStream { if h == nil { return nil @@ -99,20 +101,33 @@ func newQDataStream(h *C.QDataStream) *QDataStream { return &QDataStream{h: h} } +// UnsafeNewQDataStream constructs the type using only unsafe pointers. func UnsafeNewQDataStream(h unsafe.Pointer) *QDataStream { - return newQDataStream((*C.QDataStream)(h)) + if h == nil { + return nil + } + + return &QDataStream{h: (*C.QDataStream)(h)} } // NewQDataStream constructs a new QDataStream object. func NewQDataStream() *QDataStream { - ret := C.QDataStream_new() - return newQDataStream(ret) + var outptr_QDataStream *C.QDataStream = nil + + C.QDataStream_new(&outptr_QDataStream) + ret := newQDataStream(outptr_QDataStream) + ret.isSubclass = true + return ret } // NewQDataStream2 constructs a new QDataStream object. func NewQDataStream2(param1 *QIODevice) *QDataStream { - ret := C.QDataStream_new2(param1.cPointer()) - return newQDataStream(ret) + var outptr_QDataStream *C.QDataStream = nil + + C.QDataStream_new2(param1.cPointer(), &outptr_QDataStream) + ret := newQDataStream(outptr_QDataStream) + ret.isSubclass = true + return ret } // NewQDataStream3 constructs a new QDataStream object. @@ -120,12 +135,16 @@ func NewQDataStream3(param1 []byte) *QDataStream { param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - ret := C.QDataStream_new3(param1_alias) - return newQDataStream(ret) + var outptr_QDataStream *C.QDataStream = nil + + C.QDataStream_new3(param1_alias, &outptr_QDataStream) + ret := newQDataStream(outptr_QDataStream) + ret.isSubclass = true + return ret } func (this *QDataStream) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QDataStream_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QDataStream_Device(this.h)), nil) } func (this *QDataStream) SetDevice(device *QIODevice) { @@ -322,7 +341,7 @@ func (this *QDataStream) AbortTransaction() { // Delete this object from C++ memory. func (this *QDataStream) Delete() { - C.QDataStream_Delete(this.h) + C.QDataStream_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -335,7 +354,8 @@ func (this *QDataStream) GoGC() { } type QtPrivate__StreamStateSaver struct { - h *C.QtPrivate__StreamStateSaver + h *C.QtPrivate__StreamStateSaver + isSubclass bool } func (this *QtPrivate__StreamStateSaver) cPointer() *C.QtPrivate__StreamStateSaver { @@ -352,6 +372,7 @@ func (this *QtPrivate__StreamStateSaver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__StreamStateSaver constructs the type using only CGO pointers. func newQtPrivate__StreamStateSaver(h *C.QtPrivate__StreamStateSaver) *QtPrivate__StreamStateSaver { if h == nil { return nil @@ -359,19 +380,28 @@ func newQtPrivate__StreamStateSaver(h *C.QtPrivate__StreamStateSaver) *QtPrivate return &QtPrivate__StreamStateSaver{h: h} } +// UnsafeNewQtPrivate__StreamStateSaver constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__StreamStateSaver(h unsafe.Pointer) *QtPrivate__StreamStateSaver { - return newQtPrivate__StreamStateSaver((*C.QtPrivate__StreamStateSaver)(h)) + if h == nil { + return nil + } + + return &QtPrivate__StreamStateSaver{h: (*C.QtPrivate__StreamStateSaver)(h)} } // NewQtPrivate__StreamStateSaver constructs a new QtPrivate::StreamStateSaver object. func NewQtPrivate__StreamStateSaver(s *QDataStream) *QtPrivate__StreamStateSaver { - ret := C.QtPrivate__StreamStateSaver_new(s.cPointer()) - return newQtPrivate__StreamStateSaver(ret) + var outptr_QtPrivate__StreamStateSaver *C.QtPrivate__StreamStateSaver = nil + + C.QtPrivate__StreamStateSaver_new(s.cPointer(), &outptr_QtPrivate__StreamStateSaver) + ret := newQtPrivate__StreamStateSaver(outptr_QtPrivate__StreamStateSaver) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__StreamStateSaver) Delete() { - C.QtPrivate__StreamStateSaver_Delete(this.h) + C.QtPrivate__StreamStateSaver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdatastream.h b/qt/gen_qdatastream.h index 8ecf1ed4..36f4aef9 100644 --- a/qt/gen_qdatastream.h +++ b/qt/gen_qdatastream.h @@ -30,9 +30,9 @@ typedef struct QIODevice QIODevice; typedef struct QtPrivate__StreamStateSaver QtPrivate__StreamStateSaver; #endif -QDataStream* QDataStream_new(); -QDataStream* QDataStream_new2(QIODevice* param1); -QDataStream* QDataStream_new3(struct miqt_string param1); +void QDataStream_new(QDataStream** outptr_QDataStream); +void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream); +void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream); QIODevice* QDataStream_Device(const QDataStream* self); void QDataStream_SetDevice(QDataStream* self, QIODevice* device); void QDataStream_UnsetDevice(QDataStream* self); @@ -79,10 +79,10 @@ void QDataStream_StartTransaction(QDataStream* self); bool QDataStream_CommitTransaction(QDataStream* self); void QDataStream_RollbackTransaction(QDataStream* self); void QDataStream_AbortTransaction(QDataStream* self); -void QDataStream_Delete(QDataStream* self); +void QDataStream_Delete(QDataStream* self, bool isSubclass); -QtPrivate__StreamStateSaver* QtPrivate__StreamStateSaver_new(QDataStream* s); -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self); +void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver); +void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdatawidgetmapper.cpp b/qt/gen_qdatawidgetmapper.cpp index 107c3cba..fc57ca00 100644 --- a/qt/gen_qdatawidgetmapper.cpp +++ b/qt/gen_qdatawidgetmapper.cpp @@ -1,24 +1,237 @@ #include #include #include +#include #include +#include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qdatawidgetmapper.h" #include "_cgo_export.h" -QDataWidgetMapper* QDataWidgetMapper_new() { - return new QDataWidgetMapper(); +class MiqtVirtualQDataWidgetMapper : public virtual QDataWidgetMapper { +public: + + MiqtVirtualQDataWidgetMapper(): QDataWidgetMapper() {}; + MiqtVirtualQDataWidgetMapper(QObject* parent): QDataWidgetMapper(parent) {}; + + virtual ~MiqtVirtualQDataWidgetMapper() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCurrentIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setCurrentIndex(int index) override { + if (handle__SetCurrentIndex == 0) { + QDataWidgetMapper::setCurrentIndex(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QDataWidgetMapper_SetCurrentIndex(this, handle__SetCurrentIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCurrentIndex(int index) { + + QDataWidgetMapper::setCurrentIndex(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDataWidgetMapper::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDataWidgetMapper_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDataWidgetMapper::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDataWidgetMapper::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDataWidgetMapper_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDataWidgetMapper::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDataWidgetMapper::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDataWidgetMapper_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDataWidgetMapper::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDataWidgetMapper::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDataWidgetMapper_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDataWidgetMapper::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDataWidgetMapper::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDataWidgetMapper_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDataWidgetMapper::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDataWidgetMapper::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDataWidgetMapper_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDataWidgetMapper::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDataWidgetMapper::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDataWidgetMapper_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDataWidgetMapper::disconnectNotify(*signal); + + } + +}; + +void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { + MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(); + *outptr_QDataWidgetMapper = ret; + *outptr_QObject = static_cast(ret); } -QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent) { - return new QDataWidgetMapper(parent); +void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { + MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(parent); + *outptr_QDataWidgetMapper = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self) { @@ -168,7 +381,7 @@ void QDataWidgetMapper_CurrentIndexChanged(QDataWidgetMapper* self, int index) { } void QDataWidgetMapper_connect_CurrentIndexChanged(QDataWidgetMapper* self, intptr_t slot) { - QDataWidgetMapper::connect(self, static_cast(&QDataWidgetMapper::currentIndexChanged), self, [=](int index) { + MiqtVirtualQDataWidgetMapper::connect(self, static_cast(&QDataWidgetMapper::currentIndexChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QDataWidgetMapper_CurrentIndexChanged(slot, sigval1); }); @@ -218,7 +431,75 @@ struct miqt_string QDataWidgetMapper_TrUtf83(const char* s, const char* c, int n return _ms; } -void QDataWidgetMapper_Delete(QDataWidgetMapper* self) { - delete self; +void QDataWidgetMapper_override_virtual_SetCurrentIndex(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__SetCurrentIndex = slot; +} + +void QDataWidgetMapper_virtualbase_SetCurrentIndex(void* self, int index) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_SetCurrentIndex(index); +} + +void QDataWidgetMapper_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__Event = slot; +} + +bool QDataWidgetMapper_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_Event(event); +} + +void QDataWidgetMapper_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__EventFilter = slot; +} + +bool QDataWidgetMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QDataWidgetMapper_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__TimerEvent = slot; +} + +void QDataWidgetMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_TimerEvent(event); +} + +void QDataWidgetMapper_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__ChildEvent = slot; +} + +void QDataWidgetMapper_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_ChildEvent(event); +} + +void QDataWidgetMapper_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__CustomEvent = slot; +} + +void QDataWidgetMapper_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_CustomEvent(event); +} + +void QDataWidgetMapper_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__ConnectNotify = slot; +} + +void QDataWidgetMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDataWidgetMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__DisconnectNotify = slot; +} + +void QDataWidgetMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDataWidgetMapper_Delete(QDataWidgetMapper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdatawidgetmapper.go b/qt/gen_qdatawidgetmapper.go index 58453e4f..ab66ec34 100644 --- a/qt/gen_qdatawidgetmapper.go +++ b/qt/gen_qdatawidgetmapper.go @@ -22,7 +22,8 @@ const ( ) type QDataWidgetMapper struct { - h *C.QDataWidgetMapper + h *C.QDataWidgetMapper + isSubclass bool *QObject } @@ -40,27 +41,45 @@ func (this *QDataWidgetMapper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDataWidgetMapper(h *C.QDataWidgetMapper) *QDataWidgetMapper { +// newQDataWidgetMapper constructs the type using only CGO pointers. +func newQDataWidgetMapper(h *C.QDataWidgetMapper, h_QObject *C.QObject) *QDataWidgetMapper { if h == nil { return nil } - return &QDataWidgetMapper{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QDataWidgetMapper{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQDataWidgetMapper(h unsafe.Pointer) *QDataWidgetMapper { - return newQDataWidgetMapper((*C.QDataWidgetMapper)(h)) +// UnsafeNewQDataWidgetMapper constructs the type using only unsafe pointers. +func UnsafeNewQDataWidgetMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDataWidgetMapper { + if h == nil { + return nil + } + + return &QDataWidgetMapper{h: (*C.QDataWidgetMapper)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQDataWidgetMapper constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper() *QDataWidgetMapper { - ret := C.QDataWidgetMapper_new() - return newQDataWidgetMapper(ret) + var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil + var outptr_QObject *C.QObject = nil + + C.QDataWidgetMapper_new(&outptr_QDataWidgetMapper, &outptr_QObject) + ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDataWidgetMapper2 constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper2(parent *QObject) *QDataWidgetMapper { - ret := C.QDataWidgetMapper_new2(parent.cPointer()) - return newQDataWidgetMapper(ret) + var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil + var outptr_QObject *C.QObject = nil + + C.QDataWidgetMapper_new2(parent.cPointer(), &outptr_QDataWidgetMapper, &outptr_QObject) + ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDataWidgetMapper) MetaObject() *QMetaObject { @@ -96,7 +115,7 @@ func (this *QDataWidgetMapper) SetModel(model *QAbstractItemModel) { } func (this *QDataWidgetMapper) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QDataWidgetMapper_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QDataWidgetMapper_Model(this.h)), nil) } func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -104,7 +123,7 @@ func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QDataWidgetMapper) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QDataWidgetMapper_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QDataWidgetMapper_ItemDelegate(this.h)), nil) } func (this *QDataWidgetMapper) SetRootIndex(index *QModelIndex) { @@ -161,7 +180,7 @@ func (this *QDataWidgetMapper) MappedPropertyName(widget *QWidget) []byte { } func (this *QDataWidgetMapper) MappedWidgetAt(section int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section))), nil, nil) } func (this *QDataWidgetMapper) ClearMapping() { @@ -268,9 +287,198 @@ func QDataWidgetMapper_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDataWidgetMapper) callVirtualBase_SetCurrentIndex(index int) { + + C.QDataWidgetMapper_virtualbase_SetCurrentIndex(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QDataWidgetMapper) OnSetCurrentIndex(slot func(super func(index int), index int)) { + C.QDataWidgetMapper_override_virtual_SetCurrentIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_SetCurrentIndex +func miqt_exec_callback_QDataWidgetMapper_SetCurrentIndex(self *C.QDataWidgetMapper, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_SetCurrentIndex, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDataWidgetMapper_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDataWidgetMapper) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDataWidgetMapper_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_Event +func miqt_exec_callback_QDataWidgetMapper_Event(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDataWidgetMapper) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QDataWidgetMapper_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QDataWidgetMapper) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QDataWidgetMapper_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_EventFilter +func miqt_exec_callback_QDataWidgetMapper_EventFilter(self *C.QDataWidgetMapper, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDataWidgetMapper) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDataWidgetMapper_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDataWidgetMapper) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDataWidgetMapper_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_TimerEvent +func miqt_exec_callback_QDataWidgetMapper_TimerEvent(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QDataWidgetMapper_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDataWidgetMapper) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QDataWidgetMapper_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_ChildEvent +func miqt_exec_callback_QDataWidgetMapper_ChildEvent(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_CustomEvent(event *QEvent) { + + C.QDataWidgetMapper_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDataWidgetMapper) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDataWidgetMapper_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_CustomEvent +func miqt_exec_callback_QDataWidgetMapper_CustomEvent(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QDataWidgetMapper_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDataWidgetMapper) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDataWidgetMapper_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_ConnectNotify +func miqt_exec_callback_QDataWidgetMapper_ConnectNotify(self *C.QDataWidgetMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QDataWidgetMapper_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDataWidgetMapper) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDataWidgetMapper_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_DisconnectNotify +func miqt_exec_callback_QDataWidgetMapper_DisconnectNotify(self *C.QDataWidgetMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDataWidgetMapper) Delete() { - C.QDataWidgetMapper_Delete(this.h) + C.QDataWidgetMapper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdatawidgetmapper.h b/qt/gen_qdatawidgetmapper.h index b27a9c5e..40175971 100644 --- a/qt/gen_qdatawidgetmapper.h +++ b/qt/gen_qdatawidgetmapper.h @@ -18,24 +18,32 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QByteArray; +class QChildEvent; class QDataWidgetMapper; +class QEvent; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; +class QTimerEvent; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QDataWidgetMapper QDataWidgetMapper; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QDataWidgetMapper* QDataWidgetMapper_new(); -QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent); +void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); +void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self); void* QDataWidgetMapper_Metacast(QDataWidgetMapper* self, const char* param1); struct miqt_string QDataWidgetMapper_Tr(const char* s); @@ -72,7 +80,23 @@ struct miqt_string QDataWidgetMapper_Tr2(const char* s, const char* c); struct miqt_string QDataWidgetMapper_Tr3(const char* s, const char* c, int n); struct miqt_string QDataWidgetMapper_TrUtf82(const char* s, const char* c); struct miqt_string QDataWidgetMapper_TrUtf83(const char* s, const char* c, int n); -void QDataWidgetMapper_Delete(QDataWidgetMapper* self); +void QDataWidgetMapper_override_virtual_SetCurrentIndex(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_SetCurrentIndex(void* self, int index); +void QDataWidgetMapper_override_virtual_Event(void* self, intptr_t slot); +bool QDataWidgetMapper_virtualbase_Event(void* self, QEvent* event); +void QDataWidgetMapper_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDataWidgetMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDataWidgetMapper_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDataWidgetMapper_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDataWidgetMapper_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_CustomEvent(void* self, QEvent* event); +void QDataWidgetMapper_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDataWidgetMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDataWidgetMapper_Delete(QDataWidgetMapper* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdatetime.cpp b/qt/gen_qdatetime.cpp index b96999df..fdc0048d 100644 --- a/qt/gen_qdatetime.cpp +++ b/qt/gen_qdatetime.cpp @@ -10,20 +10,24 @@ #include "gen_qdatetime.h" #include "_cgo_export.h" -QDate* QDate_new() { - return new QDate(); +void QDate_new(QDate** outptr_QDate) { + QDate* ret = new QDate(); + *outptr_QDate = ret; } -QDate* QDate_new2(int y, int m, int d) { - return new QDate(static_cast(y), static_cast(m), static_cast(d)); +void QDate_new2(int y, int m, int d, QDate** outptr_QDate) { + QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d)); + *outptr_QDate = ret; } -QDate* QDate_new3(int y, int m, int d, QCalendar* cal) { - return new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); +void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate) { + QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); + *outptr_QDate = ret; } -QDate* QDate_new4(QDate* param1) { - return new QDate(*param1); +void QDate_new4(QDate* param1, QDate** outptr_QDate) { + QDate* ret = new QDate(*param1); + *outptr_QDate = ret; } bool QDate_IsNull(const QDate* self) { @@ -383,28 +387,37 @@ QDate* QDate_FromString22(struct miqt_string s, int f) { return new QDate(QDate::fromString(s_QString, static_cast(f))); } -void QDate_Delete(QDate* self) { - delete self; +void QDate_Delete(QDate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTime* QTime_new() { - return new QTime(); +void QTime_new(QTime** outptr_QTime) { + QTime* ret = new QTime(); + *outptr_QTime = ret; } -QTime* QTime_new2(int h, int m) { - return new QTime(static_cast(h), static_cast(m)); +void QTime_new2(int h, int m, QTime** outptr_QTime) { + QTime* ret = new QTime(static_cast(h), static_cast(m)); + *outptr_QTime = ret; } -QTime* QTime_new3(QTime* param1) { - return new QTime(*param1); +void QTime_new3(QTime* param1, QTime** outptr_QTime) { + QTime* ret = new QTime(*param1); + *outptr_QTime = ret; } -QTime* QTime_new4(int h, int m, int s) { - return new QTime(static_cast(h), static_cast(m), static_cast(s)); +void QTime_new4(int h, int m, int s, QTime** outptr_QTime) { + QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s)); + *outptr_QTime = ret; } -QTime* QTime_new5(int h, int m, int s, int ms) { - return new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); +void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime) { + QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); + *outptr_QTime = ret; } bool QTime_IsNull(const QTime* self) { @@ -561,32 +574,42 @@ bool QTime_IsValid4(int h, int m, int s, int ms) { return QTime::isValid(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); } -void QTime_Delete(QTime* self) { - delete self; +void QTime_Delete(QTime* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDateTime* QDateTime_new(QDate* param1) { - return new QDateTime(*param1); +void QDateTime_new(QDate* param1, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*param1); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new2(QDate* param1, QTime* param2) { - return new QDateTime(*param1, *param2); +void QDateTime_new2(QDate* param1, QTime* param2, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*param1, *param2); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds) { - return new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); +void QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone) { - return new QDateTime(*date, *time, *timeZone); +void QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*date, *time, *timeZone); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new5(QDateTime* other) { - return new QDateTime(*other); +void QDateTime_new5(QDateTime* other, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*other); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new6(QDate* param1, QTime* param2, int spec) { - return new QDateTime(*param1, *param2, static_cast(spec)); +void QDateTime_new6(QDate* param1, QTime* param2, int spec, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*param1, *param2, static_cast(spec)); + *outptr_QDateTime = ret; } void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other) { @@ -909,7 +932,11 @@ QDateTime* QDateTime_FromSecsSinceEpoch3(long long secs, int spe, int offsetFrom return new QDateTime(QDateTime::fromSecsSinceEpoch(static_cast(secs), static_cast(spe), static_cast(offsetFromUtc))); } -void QDateTime_Delete(QDateTime* self) { - delete self; +void QDateTime_Delete(QDateTime* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdatetime.go b/qt/gen_qdatetime.go index 93e0acf4..75d303a8 100644 --- a/qt/gen_qdatetime.go +++ b/qt/gen_qdatetime.go @@ -28,7 +28,8 @@ const ( ) type QDate struct { - h *C.QDate + h *C.QDate + isSubclass bool } func (this *QDate) cPointer() *C.QDate { @@ -45,6 +46,7 @@ func (this *QDate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDate constructs the type using only CGO pointers. func newQDate(h *C.QDate) *QDate { if h == nil { return nil @@ -52,32 +54,53 @@ func newQDate(h *C.QDate) *QDate { return &QDate{h: h} } +// UnsafeNewQDate constructs the type using only unsafe pointers. func UnsafeNewQDate(h unsafe.Pointer) *QDate { - return newQDate((*C.QDate)(h)) + if h == nil { + return nil + } + + return &QDate{h: (*C.QDate)(h)} } // NewQDate constructs a new QDate object. func NewQDate() *QDate { - ret := C.QDate_new() - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new(&outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } // NewQDate2 constructs a new QDate object. func NewQDate2(y int, m int, d int) *QDate { - ret := C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d)) - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } // NewQDate3 constructs a new QDate object. func NewQDate3(y int, m int, d int, cal QCalendar) *QDate { - ret := C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer()) - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer(), &outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } // NewQDate4 constructs a new QDate object. func NewQDate4(param1 *QDate) *QDate { - ret := C.QDate_new4(param1.cPointer()) - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new4(param1.cPointer(), &outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } func (this *QDate) IsNull() bool { @@ -466,7 +489,7 @@ func QDate_FromString22(s string, f DateFormat) *QDate { // Delete this object from C++ memory. func (this *QDate) Delete() { - C.QDate_Delete(this.h) + C.QDate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -479,7 +502,8 @@ func (this *QDate) GoGC() { } type QTime struct { - h *C.QTime + h *C.QTime + isSubclass bool } func (this *QTime) cPointer() *C.QTime { @@ -496,6 +520,7 @@ func (this *QTime) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTime constructs the type using only CGO pointers. func newQTime(h *C.QTime) *QTime { if h == nil { return nil @@ -503,38 +528,63 @@ func newQTime(h *C.QTime) *QTime { return &QTime{h: h} } +// UnsafeNewQTime constructs the type using only unsafe pointers. func UnsafeNewQTime(h unsafe.Pointer) *QTime { - return newQTime((*C.QTime)(h)) + if h == nil { + return nil + } + + return &QTime{h: (*C.QTime)(h)} } // NewQTime constructs a new QTime object. func NewQTime() *QTime { - ret := C.QTime_new() - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new(&outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime2 constructs a new QTime object. func NewQTime2(h int, m int) *QTime { - ret := C.QTime_new2((C.int)(h), (C.int)(m)) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new2((C.int)(h), (C.int)(m), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime3 constructs a new QTime object. func NewQTime3(param1 *QTime) *QTime { - ret := C.QTime_new3(param1.cPointer()) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new3(param1.cPointer(), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime4 constructs a new QTime object. func NewQTime4(h int, m int, s int) *QTime { - ret := C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s)) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime5 constructs a new QTime object. func NewQTime5(h int, m int, s int, ms int) *QTime { - ret := C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms)) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } func (this *QTime) IsNull() bool { @@ -717,7 +767,7 @@ func QTime_IsValid4(h int, m int, s int, ms int) bool { // Delete this object from C++ memory. func (this *QTime) Delete() { - C.QTime_Delete(this.h) + C.QTime_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -730,7 +780,8 @@ func (this *QTime) GoGC() { } type QDateTime struct { - h *C.QDateTime + h *C.QDateTime + isSubclass bool } func (this *QDateTime) cPointer() *C.QDateTime { @@ -747,6 +798,7 @@ func (this *QDateTime) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDateTime constructs the type using only CGO pointers. func newQDateTime(h *C.QDateTime) *QDateTime { if h == nil { return nil @@ -754,44 +806,73 @@ func newQDateTime(h *C.QDateTime) *QDateTime { return &QDateTime{h: h} } +// UnsafeNewQDateTime constructs the type using only unsafe pointers. func UnsafeNewQDateTime(h unsafe.Pointer) *QDateTime { - return newQDateTime((*C.QDateTime)(h)) + if h == nil { + return nil + } + + return &QDateTime{h: (*C.QDateTime)(h)} } // NewQDateTime constructs a new QDateTime object. func NewQDateTime(param1 *QDate) *QDateTime { - ret := C.QDateTime_new(param1.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new(param1.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime2 constructs a new QDateTime object. func NewQDateTime2(param1 *QDate, param2 *QTime) *QDateTime { - ret := C.QDateTime_new2(param1.cPointer(), param2.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new2(param1.cPointer(), param2.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime3 constructs a new QDateTime object. func NewQDateTime3(date *QDate, time *QTime, spec TimeSpec, offsetSeconds int) *QDateTime { - ret := C.QDateTime_new3(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds)) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new3(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime4 constructs a new QDateTime object. func NewQDateTime4(date *QDate, time *QTime, timeZone *QTimeZone) *QDateTime { - ret := C.QDateTime_new4(date.cPointer(), time.cPointer(), timeZone.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new4(date.cPointer(), time.cPointer(), timeZone.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime5 constructs a new QDateTime object. func NewQDateTime5(other *QDateTime) *QDateTime { - ret := C.QDateTime_new5(other.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new5(other.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime6 constructs a new QDateTime object. func NewQDateTime6(param1 *QDate, param2 *QTime, spec TimeSpec) *QDateTime { - ret := C.QDateTime_new6(param1.cPointer(), param2.cPointer(), (C.int)(spec)) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new6(param1.cPointer(), param2.cPointer(), (C.int)(spec), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } func (this *QDateTime) OperatorAssign(other *QDateTime) { @@ -1204,7 +1285,7 @@ func QDateTime_FromSecsSinceEpoch3(secs int64, spe TimeSpec, offsetFromUtc int) // Delete this object from C++ memory. func (this *QDateTime) Delete() { - C.QDateTime_Delete(this.h) + C.QDateTime_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdatetime.h b/qt/gen_qdatetime.h index da918af6..9b7022cf 100644 --- a/qt/gen_qdatetime.h +++ b/qt/gen_qdatetime.h @@ -28,10 +28,10 @@ typedef struct QTime QTime; typedef struct QTimeZone QTimeZone; #endif -QDate* QDate_new(); -QDate* QDate_new2(int y, int m, int d); -QDate* QDate_new3(int y, int m, int d, QCalendar* cal); -QDate* QDate_new4(QDate* param1); +void QDate_new(QDate** outptr_QDate); +void QDate_new2(int y, int m, int d, QDate** outptr_QDate); +void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate); +void QDate_new4(QDate* param1, QDate** outptr_QDate); bool QDate_IsNull(const QDate* self); bool QDate_IsValid(const QDate* self); int QDate_Year(const QDate* self); @@ -96,13 +96,13 @@ struct miqt_string QDate_LongMonthName2(int month, int typeVal); struct miqt_string QDate_LongDayName2(int weekday, int typeVal); struct miqt_string QDate_ToString1(const QDate* self, int format); QDate* QDate_FromString22(struct miqt_string s, int f); -void QDate_Delete(QDate* self); +void QDate_Delete(QDate* self, bool isSubclass); -QTime* QTime_new(); -QTime* QTime_new2(int h, int m); -QTime* QTime_new3(QTime* param1); -QTime* QTime_new4(int h, int m, int s); -QTime* QTime_new5(int h, int m, int s, int ms); +void QTime_new(QTime** outptr_QTime); +void QTime_new2(int h, int m, QTime** outptr_QTime); +void QTime_new3(QTime* param1, QTime** outptr_QTime); +void QTime_new4(int h, int m, int s, QTime** outptr_QTime); +void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime); bool QTime_IsNull(const QTime* self); bool QTime_IsValid(const QTime* self); int QTime_Hour(const QTime* self); @@ -135,14 +135,14 @@ struct miqt_string QTime_ToString1(const QTime* self, int f); bool QTime_SetHMS4(QTime* self, int h, int m, int s, int ms); QTime* QTime_FromString22(struct miqt_string s, int f); bool QTime_IsValid4(int h, int m, int s, int ms); -void QTime_Delete(QTime* self); +void QTime_Delete(QTime* self, bool isSubclass); -QDateTime* QDateTime_new(QDate* param1); -QDateTime* QDateTime_new2(QDate* param1, QTime* param2); -QDateTime* QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds); -QDateTime* QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone); -QDateTime* QDateTime_new5(QDateTime* other); -QDateTime* QDateTime_new6(QDate* param1, QTime* param2, int spec); +void QDateTime_new(QDate* param1, QDateTime** outptr_QDateTime); +void QDateTime_new2(QDate* param1, QTime* param2, QDateTime** outptr_QDateTime); +void QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime); +void QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime); +void QDateTime_new5(QDateTime* other, QDateTime** outptr_QDateTime); +void QDateTime_new6(QDate* param1, QTime* param2, int spec, QDateTime** outptr_QDateTime); void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other); void QDateTime_Swap(QDateTime* self, QDateTime* other); bool QDateTime_IsNull(const QDateTime* self); @@ -210,7 +210,7 @@ QDateTime* QDateTime_FromTimeT32(unsigned int secsSince1Jan1970UTC, int spec, in QDateTime* QDateTime_FromMSecsSinceEpoch32(long long msecs, int spec, int offsetFromUtc); QDateTime* QDateTime_FromSecsSinceEpoch22(long long secs, int spe); QDateTime* QDateTime_FromSecsSinceEpoch3(long long secs, int spe, int offsetFromUtc); -void QDateTime_Delete(QDateTime* self); +void QDateTime_Delete(QDateTime* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdatetimeedit.cpp b/qt/gen_qdatetimeedit.cpp index 5f75c7d5..07dc8b28 100644 --- a/qt/gen_qdatetimeedit.cpp +++ b/qt/gen_qdatetimeedit.cpp @@ -1,52 +1,820 @@ +#include #include #include +#include +#include #include #include #include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qdatetimeedit.h" #include "_cgo_export.h" -QDateTimeEdit* QDateTimeEdit_new(QWidget* parent) { - return new QDateTimeEdit(parent); +class MiqtVirtualQDateTimeEdit : public virtual QDateTimeEdit { +public: + + MiqtVirtualQDateTimeEdit(QWidget* parent): QDateTimeEdit(parent) {}; + MiqtVirtualQDateTimeEdit(): QDateTimeEdit() {}; + MiqtVirtualQDateTimeEdit(const QDateTime& dt): QDateTimeEdit(dt) {}; + MiqtVirtualQDateTimeEdit(const QDate& d): QDateTimeEdit(d) {}; + MiqtVirtualQDateTimeEdit(const QTime& t): QDateTimeEdit(t) {}; + MiqtVirtualQDateTimeEdit(const QDateTime& dt, QWidget* parent): QDateTimeEdit(dt, parent) {}; + MiqtVirtualQDateTimeEdit(const QDate& d, QWidget* parent): QDateTimeEdit(d, parent) {}; + MiqtVirtualQDateTimeEdit(const QTime& t, QWidget* parent): QDateTimeEdit(t, parent) {}; + + virtual ~MiqtVirtualQDateTimeEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDateTimeEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDateTimeEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDateTimeEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QDateTimeEdit::clear(); + return; + } + + + miqt_exec_callback_QDateTimeEdit_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QDateTimeEdit::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QDateTimeEdit::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QDateTimeEdit_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QDateTimeEdit::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDateTimeEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDateTimeEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDateTimeEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDateTimeEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDateTimeEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDateTimeEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDateTimeEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDateTimeEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDateTimeEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDateTimeEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDateTimeEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDateTimeEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QDateTimeEdit::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QDateTimeEdit_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QDateTimeEdit::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QDateTimeEdit::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QDateTimeEdit_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QDateTimeEdit::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DateTimeFromText = 0; + + // Subclass to allow providing a Go implementation + virtual QDateTime dateTimeFromText(const QString& text) const override { + if (handle__DateTimeFromText == 0) { + return QDateTimeEdit::dateTimeFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + QDateTime* callback_return_value = miqt_exec_callback_QDateTimeEdit_DateTimeFromText(const_cast(this), handle__DateTimeFromText, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QDateTime* virtualbase_DateTimeFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QDateTime(QDateTimeEdit::dateTimeFromText(text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromDateTime = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromDateTime(const QDateTime& dt) const override { + if (handle__TextFromDateTime == 0) { + return QDateTimeEdit::textFromDateTime(dt); + } + + const QDateTime& dt_ret = dt; + // Cast returned reference into pointer + QDateTime* sigval1 = const_cast(&dt_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QDateTimeEdit_TextFromDateTime(const_cast(this), handle__TextFromDateTime, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromDateTime(QDateTime* dt) const { + + QString _ret = QDateTimeEdit::textFromDateTime(*dt); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QDateTimeEdit::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QDateTimeEdit_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QDateTimeEdit::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDateTimeEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDateTimeEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDateTimeEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDateTimeEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDateTimeEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDateTimeEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDateTimeEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDateTimeEdit::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDateTimeEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDateTimeEdit::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDateTimeEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDateTimeEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDateTimeEdit::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDateTimeEdit::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDateTimeEdit::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDateTimeEdit::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDateTimeEdit::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDateTimeEdit::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDateTimeEdit::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDateTimeEdit::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDateTimeEdit::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDateTimeEdit::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDateTimeEdit::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDateTimeEdit::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDateTimeEdit::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDateTimeEdit::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDateTimeEdit::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDateTimeEdit::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDateTimeEdit::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDateTimeEdit::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDateTimeEdit::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDateTimeEdit::showEvent(event); + + } + +}; + +void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new2() { - return new QDateTimeEdit(); +void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt) { - return new QDateTimeEdit(*dt); +void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new4(QDate* d) { - return new QDateTimeEdit(*d); +void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new5(QTime* t) { - return new QDateTimeEdit(*t); +void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent) { - return new QDateTimeEdit(*dt, parent); +void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt, parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent) { - return new QDateTimeEdit(*d, parent); +void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d, parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent) { - return new QDateTimeEdit(*t, parent); +void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t, parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self) { @@ -291,7 +1059,7 @@ void QDateTimeEdit_DateTimeChanged(QDateTimeEdit* self, QDateTime* dateTime) { } void QDateTimeEdit_connect_DateTimeChanged(QDateTimeEdit* self, intptr_t slot) { - QDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateTimeChanged), self, [=](const QDateTime& dateTime) { + MiqtVirtualQDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateTimeChanged), self, [=](const QDateTime& dateTime) { const QDateTime& dateTime_ret = dateTime; // Cast returned reference into pointer QDateTime* sigval1 = const_cast(&dateTime_ret); @@ -304,7 +1072,7 @@ void QDateTimeEdit_TimeChanged(QDateTimeEdit* self, QTime* time) { } void QDateTimeEdit_connect_TimeChanged(QDateTimeEdit* self, intptr_t slot) { - QDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::timeChanged), self, [=](const QTime& time) { + MiqtVirtualQDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::timeChanged), self, [=](const QTime& time) { const QTime& time_ret = time; // Cast returned reference into pointer QTime* sigval1 = const_cast(&time_ret); @@ -317,7 +1085,7 @@ void QDateTimeEdit_DateChanged(QDateTimeEdit* self, QDate* date) { } void QDateTimeEdit_connect_DateChanged(QDateTimeEdit* self, intptr_t slot) { - QDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateChanged), self, [=](const QDate& date) { + MiqtVirtualQDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateChanged), self, [=](const QDate& date) { const QDate& date_ret = date; // Cast returned reference into pointer QDate* sigval1 = const_cast(&date_ret); @@ -381,139 +1149,1337 @@ struct miqt_string QDateTimeEdit_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDateTimeEdit_Delete(QDateTimeEdit* self) { - delete self; +void QDateTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__SizeHint = slot; } -QTimeEdit* QTimeEdit_new(QWidget* parent) { - return new QTimeEdit(parent); +QSize* QDateTimeEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_SizeHint(); } -QTimeEdit* QTimeEdit_new2() { - return new QTimeEdit(); +void QDateTimeEdit_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Clear = slot; } -QTimeEdit* QTimeEdit_new3(QTime* time) { - return new QTimeEdit(*time); +void QDateTimeEdit_virtualbase_Clear(void* self) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Clear(); } -QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent) { - return new QTimeEdit(*time, parent); +void QDateTimeEdit_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__StepBy = slot; } -QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self) { - return (QMetaObject*) self->metaObject(); +void QDateTimeEdit_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_StepBy(steps); } -void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1) { - return self->qt_metacast(param1); +void QDateTimeEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Event = slot; } -struct miqt_string QTimeEdit_Tr(const char* s) { - QString _ret = QTimeEdit::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QDateTimeEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Event(event); } -struct miqt_string QTimeEdit_TrUtf8(const char* s) { - QString _ret = QTimeEdit::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__KeyPressEvent = slot; } -void QTimeEdit_UserTimeChanged(QTimeEdit* self, QTime* time) { - self->userTimeChanged(*time); +void QDateTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_KeyPressEvent(event); } -void QTimeEdit_connect_UserTimeChanged(QTimeEdit* self, intptr_t slot) { - QTimeEdit::connect(self, static_cast(&QTimeEdit::userTimeChanged), self, [=](const QTime& time) { - const QTime& time_ret = time; - // Cast returned reference into pointer - QTime* sigval1 = const_cast(&time_ret); - miqt_exec_callback_QTimeEdit_UserTimeChanged(slot, sigval1); - }); +void QDateTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__WheelEvent = slot; } -struct miqt_string QTimeEdit_Tr2(const char* s, const char* c) { - QString _ret = QTimeEdit::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_WheelEvent(event); } -struct miqt_string QTimeEdit_Tr3(const char* s, const char* c, int n) { - QString _ret = QTimeEdit::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__FocusInEvent = slot; } -struct miqt_string QTimeEdit_TrUtf82(const char* s, const char* c) { - QString _ret = QTimeEdit::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_FocusInEvent(event); } -struct miqt_string QTimeEdit_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QTimeEdit::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__FocusNextPrevChild = slot; } -void QTimeEdit_Delete(QTimeEdit* self) { - delete self; +bool QDateTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_FocusNextPrevChild(next); } -QDateEdit* QDateEdit_new(QWidget* parent) { - return new QDateEdit(parent); +void QDateTimeEdit_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Validate = slot; } -QDateEdit* QDateEdit_new2() { - return new QDateEdit(); +int QDateTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Validate(input, pos); } -QDateEdit* QDateEdit_new3(QDate* date) { - return new QDateEdit(*date); +void QDateTimeEdit_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Fixup = slot; } -QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent) { - return new QDateEdit(*date, parent); +void QDateTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Fixup(input); } -QMetaObject* QDateEdit_MetaObject(const QDateEdit* self) { - return (QMetaObject*) self->metaObject(); +void QDateTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__DateTimeFromText = slot; } -void* QDateEdit_Metacast(QDateEdit* self, const char* param1) { - return self->qt_metacast(param1); +QDateTime* QDateTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_DateTimeFromText(text); +} + +void QDateTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__TextFromDateTime = slot; +} + +struct miqt_string QDateTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_TextFromDateTime(dt); +} + +void QDateTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__StepEnabled = slot; +} + +int QDateTimeEdit_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_StepEnabled(); +} + +void QDateTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QDateTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDateTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__PaintEvent = slot; +} + +void QDateTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QDateTimeEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDateTimeEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDateTimeEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDateTimeEdit_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDateTimeEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QDateTimeEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDateTimeEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDateTimeEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDateTimeEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QDateTimeEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDateTimeEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDateTimeEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDateTimeEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QDateTimeEdit_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDateTimeEdit_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__CloseEvent = slot; +} + +void QDateTimeEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_CloseEvent(event); +} + +void QDateTimeEdit_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__HideEvent = slot; +} + +void QDateTimeEdit_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_HideEvent(event); +} + +void QDateTimeEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDateTimeEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDateTimeEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDateTimeEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDateTimeEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__TimerEvent = slot; +} + +void QDateTimeEdit_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_TimerEvent(event); +} + +void QDateTimeEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ShowEvent = slot; +} + +void QDateTimeEdit_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ShowEvent(event); +} + +void QDateTimeEdit_Delete(QDateTimeEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQTimeEdit : public virtual QTimeEdit { +public: + + MiqtVirtualQTimeEdit(QWidget* parent): QTimeEdit(parent) {}; + MiqtVirtualQTimeEdit(): QTimeEdit() {}; + MiqtVirtualQTimeEdit(const QTime& time): QTimeEdit(time) {}; + MiqtVirtualQTimeEdit(const QTime& time, QWidget* parent): QTimeEdit(time, parent) {}; + + virtual ~MiqtVirtualQTimeEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTimeEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTimeEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTimeEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QTimeEdit::clear(); + return; + } + + + miqt_exec_callback_QTimeEdit_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QTimeEdit::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QTimeEdit::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QTimeEdit_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QTimeEdit::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTimeEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTimeEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTimeEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTimeEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTimeEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QTimeEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QTimeEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTimeEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTimeEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTimeEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTimeEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTimeEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QTimeEdit::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QTimeEdit_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QTimeEdit::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QTimeEdit::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QTimeEdit_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QTimeEdit::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DateTimeFromText = 0; + + // Subclass to allow providing a Go implementation + virtual QDateTime dateTimeFromText(const QString& text) const override { + if (handle__DateTimeFromText == 0) { + return QTimeEdit::dateTimeFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + QDateTime* callback_return_value = miqt_exec_callback_QTimeEdit_DateTimeFromText(const_cast(this), handle__DateTimeFromText, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QDateTime* virtualbase_DateTimeFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QDateTime(QTimeEdit::dateTimeFromText(text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromDateTime = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromDateTime(const QDateTime& dt) const override { + if (handle__TextFromDateTime == 0) { + return QTimeEdit::textFromDateTime(dt); + } + + const QDateTime& dt_ret = dt; + // Cast returned reference into pointer + QDateTime* sigval1 = const_cast(&dt_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QTimeEdit_TextFromDateTime(const_cast(this), handle__TextFromDateTime, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromDateTime(QDateTime* dt) const { + + QString _ret = QTimeEdit::textFromDateTime(*dt); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QTimeEdit::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QTimeEdit_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QTimeEdit::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTimeEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTimeEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QTimeEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QTimeEdit::paintEvent(event); + + } + +}; + +void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(parent); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time, parent); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QTimeEdit_Tr(const char* s) { + QString _ret = QTimeEdit::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTimeEdit_TrUtf8(const char* s) { + QString _ret = QTimeEdit::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTimeEdit_UserTimeChanged(QTimeEdit* self, QTime* time) { + self->userTimeChanged(*time); +} + +void QTimeEdit_connect_UserTimeChanged(QTimeEdit* self, intptr_t slot) { + MiqtVirtualQTimeEdit::connect(self, static_cast(&QTimeEdit::userTimeChanged), self, [=](const QTime& time) { + const QTime& time_ret = time; + // Cast returned reference into pointer + QTime* sigval1 = const_cast(&time_ret); + miqt_exec_callback_QTimeEdit_UserTimeChanged(slot, sigval1); + }); +} + +struct miqt_string QTimeEdit_Tr2(const char* s, const char* c) { + QString _ret = QTimeEdit::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTimeEdit_Tr3(const char* s, const char* c, int n) { + QString _ret = QTimeEdit::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTimeEdit_TrUtf82(const char* s, const char* c) { + QString _ret = QTimeEdit::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTimeEdit_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QTimeEdit::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QTimeEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_SizeHint(); +} + +void QTimeEdit_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Clear = slot; +} + +void QTimeEdit_virtualbase_Clear(void* self) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_Clear(); +} + +void QTimeEdit_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__StepBy = slot; +} + +void QTimeEdit_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_StepBy(steps); +} + +void QTimeEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Event = slot; +} + +bool QTimeEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_Event(event); +} + +void QTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__WheelEvent = slot; +} + +void QTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTimeEdit_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Validate = slot; +} + +int QTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_Validate(input, pos); +} + +void QTimeEdit_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Fixup = slot; +} + +void QTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_Fixup(input); +} + +void QTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__DateTimeFromText = slot; +} + +QDateTime* QTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_DateTimeFromText(text); +} + +void QTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__TextFromDateTime = slot; +} + +struct miqt_string QTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_TextFromDateTime(dt); +} + +void QTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__StepEnabled = slot; +} + +int QTimeEdit_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_StepEnabled(); +} + +void QTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__PaintEvent = slot; +} + +void QTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QTimeEdit_Delete(QTimeEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDateEdit : public virtual QDateEdit { +public: + + MiqtVirtualQDateEdit(QWidget* parent): QDateEdit(parent) {}; + MiqtVirtualQDateEdit(): QDateEdit() {}; + MiqtVirtualQDateEdit(const QDate& date): QDateEdit(date) {}; + MiqtVirtualQDateEdit(const QDate& date, QWidget* parent): QDateEdit(date, parent) {}; + + virtual ~MiqtVirtualQDateEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDateEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDateEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDateEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QDateEdit::clear(); + return; + } + + + miqt_exec_callback_QDateEdit_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QDateEdit::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QDateEdit::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QDateEdit_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QDateEdit::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDateEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDateEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDateEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDateEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDateEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDateEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDateEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDateEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDateEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDateEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDateEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDateEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QDateEdit::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QDateEdit_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QDateEdit::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QDateEdit::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QDateEdit_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QDateEdit::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DateTimeFromText = 0; + + // Subclass to allow providing a Go implementation + virtual QDateTime dateTimeFromText(const QString& text) const override { + if (handle__DateTimeFromText == 0) { + return QDateEdit::dateTimeFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + QDateTime* callback_return_value = miqt_exec_callback_QDateEdit_DateTimeFromText(const_cast(this), handle__DateTimeFromText, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QDateTime* virtualbase_DateTimeFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QDateTime(QDateEdit::dateTimeFromText(text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromDateTime = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromDateTime(const QDateTime& dt) const override { + if (handle__TextFromDateTime == 0) { + return QDateEdit::textFromDateTime(dt); + } + + const QDateTime& dt_ret = dt; + // Cast returned reference into pointer + QDateTime* sigval1 = const_cast(&dt_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QDateEdit_TextFromDateTime(const_cast(this), handle__TextFromDateTime, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromDateTime(QDateTime* dt) const { + + QString _ret = QDateEdit::textFromDateTime(*dt); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QDateEdit::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QDateEdit_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QDateEdit::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDateEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDateEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDateEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDateEdit::paintEvent(event); + + } + +}; + +void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(parent); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date, parent); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QDateEdit_MetaObject(const QDateEdit* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QDateEdit_Metacast(QDateEdit* self, const char* param1) { + return self->qt_metacast(param1); } struct miqt_string QDateEdit_Tr(const char* s) { @@ -543,7 +2509,7 @@ void QDateEdit_UserDateChanged(QDateEdit* self, QDate* date) { } void QDateEdit_connect_UserDateChanged(QDateEdit* self, intptr_t slot) { - QDateEdit::connect(self, static_cast(&QDateEdit::userDateChanged), self, [=](const QDate& date) { + MiqtVirtualQDateEdit::connect(self, static_cast(&QDateEdit::userDateChanged), self, [=](const QDate& date) { const QDate& date_ret = date; // Cast returned reference into pointer QDate* sigval1 = const_cast(&date_ret); @@ -595,7 +2561,131 @@ struct miqt_string QDateEdit_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDateEdit_Delete(QDateEdit* self) { - delete self; +void QDateEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QDateEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_SizeHint(); +} + +void QDateEdit_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Clear = slot; +} + +void QDateEdit_virtualbase_Clear(void* self) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_Clear(); +} + +void QDateEdit_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__StepBy = slot; +} + +void QDateEdit_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_StepBy(steps); +} + +void QDateEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Event = slot; +} + +bool QDateEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_Event(event); +} + +void QDateEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QDateEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDateEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__WheelEvent = slot; +} + +void QDateEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QDateEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QDateEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDateEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDateEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDateEdit_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Validate = slot; +} + +int QDateEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_Validate(input, pos); +} + +void QDateEdit_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Fixup = slot; +} + +void QDateEdit_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_Fixup(input); +} + +void QDateEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__DateTimeFromText = slot; +} + +QDateTime* QDateEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_DateTimeFromText(text); +} + +void QDateEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__TextFromDateTime = slot; +} + +struct miqt_string QDateEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_TextFromDateTime(dt); +} + +void QDateEdit_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__StepEnabled = slot; +} + +int QDateEdit_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_StepEnabled(); +} + +void QDateEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QDateEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDateEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__PaintEvent = slot; +} + +void QDateEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QDateEdit_Delete(QDateEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdatetimeedit.go b/qt/gen_qdatetimeedit.go index b27abd88..0f4266d1 100644 --- a/qt/gen_qdatetimeedit.go +++ b/qt/gen_qdatetimeedit.go @@ -31,7 +31,8 @@ const ( ) type QDateTimeEdit struct { - h *C.QDateTimeEdit + h *C.QDateTimeEdit + isSubclass bool *QAbstractSpinBox } @@ -49,63 +50,135 @@ func (this *QDateTimeEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDateTimeEdit(h *C.QDateTimeEdit) *QDateTimeEdit { +// newQDateTimeEdit constructs the type using only CGO pointers. +func newQDateTimeEdit(h *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateTimeEdit { if h == nil { return nil } - return &QDateTimeEdit{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))} + return &QDateTimeEdit{h: h, + QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDateTimeEdit(h unsafe.Pointer) *QDateTimeEdit { - return newQDateTimeEdit((*C.QDateTimeEdit)(h)) +// UnsafeNewQDateTimeEdit constructs the type using only unsafe pointers. +func UnsafeNewQDateTimeEdit(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateTimeEdit { + if h == nil { + return nil + } + + return &QDateTimeEdit{h: (*C.QDateTimeEdit)(h), + QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDateTimeEdit constructs a new QDateTimeEdit object. func NewQDateTimeEdit(parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new(parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new(parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit2 constructs a new QDateTimeEdit object. func NewQDateTimeEdit2() *QDateTimeEdit { - ret := C.QDateTimeEdit_new2() - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new2(&outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit3 constructs a new QDateTimeEdit object. func NewQDateTimeEdit3(dt *QDateTime) *QDateTimeEdit { - ret := C.QDateTimeEdit_new3(dt.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new3(dt.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit4 constructs a new QDateTimeEdit object. func NewQDateTimeEdit4(d *QDate) *QDateTimeEdit { - ret := C.QDateTimeEdit_new4(d.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new4(d.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit5 constructs a new QDateTimeEdit object. func NewQDateTimeEdit5(t *QTime) *QDateTimeEdit { - ret := C.QDateTimeEdit_new5(t.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new5(t.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit6 constructs a new QDateTimeEdit object. func NewQDateTimeEdit6(dt *QDateTime, parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit7 constructs a new QDateTimeEdit object. func NewQDateTimeEdit7(d *QDate, parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit8 constructs a new QDateTimeEdit object. func NewQDateTimeEdit8(t *QTime, parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDateTimeEdit) MetaObject() *QMetaObject { @@ -295,7 +368,7 @@ func (this *QDateTimeEdit) SetCurrentSectionIndex(index int) { } func (this *QDateTimeEdit) CalendarWidget() *QCalendarWidget { - return UnsafeNewQCalendarWidget(unsafe.Pointer(C.QDateTimeEdit_CalendarWidget(this.h))) + return UnsafeNewQCalendarWidget(unsafe.Pointer(C.QDateTimeEdit_CalendarWidget(this.h)), nil, nil, nil) } func (this *QDateTimeEdit) SetCalendarWidget(calendarWidget *QCalendarWidget) { @@ -483,296 +556,1460 @@ func QDateTimeEdit_TrUtf83(s string, c string, n int) string { return _ret } -// Delete this object from C++ memory. -func (this *QDateTimeEdit) Delete() { - C.QDateTimeEdit_Delete(this.h) -} +func (this *QDateTimeEdit) callVirtualBase_SizeHint() *QSize { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QDateTimeEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QDateTimeEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + _ret := C.QDateTimeEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -type QTimeEdit struct { - h *C.QTimeEdit - *QDateTimeEdit +} +func (this *QDateTimeEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDateTimeEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTimeEdit) cPointer() *C.QTimeEdit { - if this == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_SizeHint +func miqt_exec_callback_QDateTimeEdit_SizeHint(self *C.QDateTimeEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func (this *QTimeEdit) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QDateTimeEdit) callVirtualBase_Clear() { + + C.QDateTimeEdit_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QDateTimeEdit) OnClear(slot func(super func())) { + C.QDateTimeEdit_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQTimeEdit(h *C.QTimeEdit) *QTimeEdit { - if h == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_Clear +func miqt_exec_callback_QDateTimeEdit_Clear(self *C.QDateTimeEdit, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QTimeEdit{h: h, QDateTimeEdit: UnsafeNewQDateTimeEdit(unsafe.Pointer(h))} -} -func UnsafeNewQTimeEdit(h unsafe.Pointer) *QTimeEdit { - return newQTimeEdit((*C.QTimeEdit)(h)) -} + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Clear) -// NewQTimeEdit constructs a new QTimeEdit object. -func NewQTimeEdit(parent *QWidget) *QTimeEdit { - ret := C.QTimeEdit_new(parent.cPointer()) - return newQTimeEdit(ret) } -// NewQTimeEdit2 constructs a new QTimeEdit object. -func NewQTimeEdit2() *QTimeEdit { - ret := C.QTimeEdit_new2() - return newQTimeEdit(ret) -} +func (this *QDateTimeEdit) callVirtualBase_StepBy(steps int) { -// NewQTimeEdit3 constructs a new QTimeEdit object. -func NewQTimeEdit3(time *QTime) *QTimeEdit { - ret := C.QTimeEdit_new3(time.cPointer()) - return newQTimeEdit(ret) -} + C.QDateTimeEdit_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) -// NewQTimeEdit4 constructs a new QTimeEdit object. -func NewQTimeEdit4(time *QTime, parent *QWidget) *QTimeEdit { - ret := C.QTimeEdit_new4(time.cPointer(), parent.cPointer()) - return newQTimeEdit(ret) } - -func (this *QTimeEdit) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QTimeEdit_MetaObject(this.h))) +func (this *QDateTimeEdit) OnStepBy(slot func(super func(steps int), steps int)) { + C.QDateTimeEdit_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTimeEdit) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QTimeEdit_Metacast(this.h, param1_Cstring)) -} +//export miqt_exec_callback_QDateTimeEdit_StepBy +func miqt_exec_callback_QDateTimeEdit_StepBy(self *C.QDateTimeEdit, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func QTimeEdit_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_StepBy, slotval1) -func QTimeEdit_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func (this *QTimeEdit) UserTimeChanged(time *QTime) { - C.QTimeEdit_UserTimeChanged(this.h, time.cPointer()) +func (this *QDateTimeEdit) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDateTimeEdit_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + } -func (this *QTimeEdit) OnUserTimeChanged(slot func(time *QTime)) { - C.QTimeEdit_connect_UserTimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QDateTimeEdit) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDateTimeEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QTimeEdit_UserTimeChanged -func miqt_exec_callback_QTimeEdit_UserTimeChanged(cb C.intptr_t, time *C.QTime) { - gofunc, ok := cgo.Handle(cb).Value().(func(time *QTime)) +//export miqt_exec_callback_QDateTimeEdit_Event +func miqt_exec_callback_QDateTimeEdit_Event(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQTime(unsafe.Pointer(time)) + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) - gofunc(slotval1) -} + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Event, slotval1) -func QTimeEdit_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + return (C.bool)(virtualReturn) -func QTimeEdit_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func QTimeEdit_TrUtf82(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_TrUtf82(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} +func (this *QDateTimeEdit) callVirtualBase_KeyPressEvent(event *QKeyEvent) { -func QTimeEdit_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + C.QDateTimeEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) -// Delete this object from C++ memory. -func (this *QTimeEdit) Delete() { - C.QTimeEdit_Delete(this.h) +} +func (this *QDateTimeEdit) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDateTimeEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QTimeEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QTimeEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QDateTimeEdit_KeyPressEvent +func miqt_exec_callback_QDateTimeEdit_KeyPressEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + } -type QDateEdit struct { - h *C.QDateEdit - *QDateTimeEdit +func (this *QDateTimeEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDateTimeEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDateTimeEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDateEdit) cPointer() *C.QDateEdit { - if this == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_WheelEvent +func miqt_exec_callback_QDateTimeEdit_WheelEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + } -func (this *QDateEdit) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QDateTimeEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDateTimeEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDateTimeEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQDateEdit(h *C.QDateEdit) *QDateEdit { - if h == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_FocusInEvent +func miqt_exec_callback_QDateTimeEdit_FocusInEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QDateEdit{h: h, QDateTimeEdit: UnsafeNewQDateTimeEdit(unsafe.Pointer(h))} -} -func UnsafeNewQDateEdit(h unsafe.Pointer) *QDateEdit { - return newQDateEdit((*C.QDateEdit)(h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) -// NewQDateEdit constructs a new QDateEdit object. -func NewQDateEdit(parent *QWidget) *QDateEdit { - ret := C.QDateEdit_new(parent.cPointer()) - return newQDateEdit(ret) -} + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) -// NewQDateEdit2 constructs a new QDateEdit object. -func NewQDateEdit2() *QDateEdit { - ret := C.QDateEdit_new2() - return newQDateEdit(ret) } -// NewQDateEdit3 constructs a new QDateEdit object. -func NewQDateEdit3(date *QDate) *QDateEdit { - ret := C.QDateEdit_new3(date.cPointer()) - return newQDateEdit(ret) -} +func (this *QDateTimeEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { -// NewQDateEdit4 constructs a new QDateEdit object. -func NewQDateEdit4(date *QDate, parent *QWidget) *QDateEdit { - ret := C.QDateEdit_new4(date.cPointer(), parent.cPointer()) - return newQDateEdit(ret) -} + return (bool)(C.QDateTimeEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) -func (this *QDateEdit) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QDateEdit_MetaObject(this.h))) } - -func (this *QDateEdit) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QDateEdit_Metacast(this.h, param1_Cstring)) +func (this *QDateTimeEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDateTimeEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QDateEdit_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QDateEdit_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} +//export miqt_exec_callback_QDateTimeEdit_FocusNextPrevChild +func miqt_exec_callback_QDateTimeEdit_FocusNextPrevChild(self *C.QDateTimeEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) -func QDateEdit_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QDateEdit_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func (this *QDateEdit) UserDateChanged(date *QDate) { - C.QDateEdit_UserDateChanged(this.h, date.cPointer()) +func (this *QDateTimeEdit) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QDateTimeEdit_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + } -func (this *QDateEdit) OnUserDateChanged(slot func(date *QDate)) { - C.QDateEdit_connect_UserDateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QDateTimeEdit) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QDateTimeEdit_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDateEdit_UserDateChanged -func miqt_exec_callback_QDateEdit_UserDateChanged(cb C.intptr_t, date *C.QDate) { - gofunc, ok := cgo.Handle(cb).Value().(func(date *QDate)) +//export miqt_exec_callback_QDateTimeEdit_Validate +func miqt_exec_callback_QDateTimeEdit_Validate(self *C.QDateTimeEdit, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQDate(unsafe.Pointer(date)) + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) - gofunc(slotval1) } -func QDateEdit_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDateEdit_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QDateTimeEdit) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QDateTimeEdit_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QDateTimeEdit) OnFixup(slot func(super func(input string), input string)) { + C.QDateTimeEdit_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QDateEdit_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) +//export miqt_exec_callback_QDateTimeEdit_Fixup +func miqt_exec_callback_QDateTimeEdit_Fixup(self *C.QDateTimeEdit, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_DateTimeFromText(text string) *QDateTime { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QDateTimeEdit_virtualbase_DateTimeFromText(unsafe.Pointer(this.h), text_ms) + _goptr := newQDateTime(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateTimeEdit) OnDateTimeFromText(slot func(super func(text string) *QDateTime, text string) *QDateTime) { + C.QDateTimeEdit_override_virtual_DateTimeFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_DateTimeFromText +func miqt_exec_callback_QDateTimeEdit_DateTimeFromText(self *C.QDateTimeEdit, cb C.intptr_t, text C.struct_miqt_string) *C.QDateTime { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) *QDateTime, text string) *QDateTime) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_DateTimeFromText, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDateTimeEdit) callVirtualBase_TextFromDateTime(dt *QDateTime) string { + + var _ms C.struct_miqt_string = C.QDateTimeEdit_virtualbase_TextFromDateTime(unsafe.Pointer(this.h), dt.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QDateTimeEdit) OnTextFromDateTime(slot func(super func(dt *QDateTime) string, dt *QDateTime) string) { + C.QDateTimeEdit_override_virtual_TextFromDateTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_TextFromDateTime +func miqt_exec_callback_QDateTimeEdit_TextFromDateTime(self *C.QDateTimeEdit, cb C.intptr_t, dt *C.QDateTime) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dt *QDateTime) string, dt *QDateTime) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dt)) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_TextFromDateTime, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QDateTimeEdit) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QDateTimeEdit_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QDateTimeEdit) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QDateTimeEdit_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_StepEnabled +func miqt_exec_callback_QDateTimeEdit_StepEnabled(self *C.QDateTimeEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QDateTimeEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDateTimeEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateTimeEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MousePressEvent +func miqt_exec_callback_QDateTimeEdit_MousePressEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDateTimeEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDateTimeEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_PaintEvent +func miqt_exec_callback_QDateTimeEdit_PaintEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDateTimeEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateTimeEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDateTimeEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MinimumSizeHint +func miqt_exec_callback_QDateTimeEdit_MinimumSizeHint(self *C.QDateTimeEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDateTimeEdit) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDateTimeEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateTimeEdit) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDateTimeEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_InputMethodQuery +func miqt_exec_callback_QDateTimeEdit_InputMethodQuery(self *C.QDateTimeEdit, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDateTimeEdit) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDateTimeEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDateTimeEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ResizeEvent +func miqt_exec_callback_QDateTimeEdit_ResizeEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDateTimeEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDateTimeEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent +func miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDateTimeEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDateTimeEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_FocusOutEvent +func miqt_exec_callback_QDateTimeEdit_FocusOutEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDateTimeEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDateTimeEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ContextMenuEvent +func miqt_exec_callback_QDateTimeEdit_ContextMenuEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDateTimeEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDateTimeEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ChangeEvent +func miqt_exec_callback_QDateTimeEdit_ChangeEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDateTimeEdit_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDateTimeEdit_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_CloseEvent +func miqt_exec_callback_QDateTimeEdit_CloseEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDateTimeEdit_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDateTimeEdit_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_HideEvent +func miqt_exec_callback_QDateTimeEdit_HideEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDateTimeEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateTimeEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent +func miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDateTimeEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateTimeEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MouseMoveEvent +func miqt_exec_callback_QDateTimeEdit_MouseMoveEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDateTimeEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDateTimeEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_TimerEvent +func miqt_exec_callback_QDateTimeEdit_TimerEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDateTimeEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDateTimeEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ShowEvent +func miqt_exec_callback_QDateTimeEdit_ShowEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QDateTimeEdit) Delete() { + C.QDateTimeEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QDateTimeEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QDateTimeEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QTimeEdit struct { + h *C.QTimeEdit + isSubclass bool + *QDateTimeEdit +} + +func (this *QTimeEdit) cPointer() *C.QTimeEdit { + if this == nil { + return nil + } + return this.h +} + +func (this *QTimeEdit) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQTimeEdit constructs the type using only CGO pointers. +func newQTimeEdit(h *C.QTimeEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTimeEdit { + if h == nil { + return nil + } + return &QTimeEdit{h: h, + QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQTimeEdit constructs the type using only unsafe pointers. +func UnsafeNewQTimeEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTimeEdit { + if h == nil { + return nil + } + + return &QTimeEdit{h: (*C.QTimeEdit)(h), + QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQTimeEdit constructs a new QTimeEdit object. +func NewQTimeEdit(parent *QWidget) *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new(parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQTimeEdit2 constructs a new QTimeEdit object. +func NewQTimeEdit2() *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new2(&outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQTimeEdit3 constructs a new QTimeEdit object. +func NewQTimeEdit3(time *QTime) *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new3(time.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQTimeEdit4 constructs a new QTimeEdit object. +func NewQTimeEdit4(time *QTime, parent *QWidget) *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new4(time.cPointer(), parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QTimeEdit) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QTimeEdit_MetaObject(this.h))) +} + +func (this *QTimeEdit) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QTimeEdit_Metacast(this.h, param1_Cstring)) +} + +func QTimeEdit_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QTimeEdit_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QTimeEdit) UserTimeChanged(time *QTime) { + C.QTimeEdit_UserTimeChanged(this.h, time.cPointer()) +} +func (this *QTimeEdit) OnUserTimeChanged(slot func(time *QTime)) { + C.QTimeEdit_connect_UserTimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_UserTimeChanged +func miqt_exec_callback_QTimeEdit_UserTimeChanged(cb C.intptr_t, time *C.QTime) { + gofunc, ok := cgo.Handle(cb).Value().(func(time *QTime)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTime(unsafe.Pointer(time)) + + gofunc(slotval1) +} + +func QTimeEdit_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QTimeEdit_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QTimeEdit_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QTimeEdit_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QTimeEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTimeEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTimeEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTimeEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_SizeHint +func miqt_exec_callback_QTimeEdit_SizeHint(self *C.QTimeEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTimeEdit) callVirtualBase_Clear() { + + C.QTimeEdit_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QTimeEdit) OnClear(slot func(super func())) { + C.QTimeEdit_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Clear +func miqt_exec_callback_QTimeEdit_Clear(self *C.QTimeEdit, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTimeEdit{h: self}).callVirtualBase_Clear) + +} + +func (this *QTimeEdit) callVirtualBase_StepBy(steps int) { + + C.QTimeEdit_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QTimeEdit) OnStepBy(slot func(super func(steps int), steps int)) { + C.QTimeEdit_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_StepBy +func miqt_exec_callback_QTimeEdit_StepBy(self *C.QTimeEdit, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTimeEdit_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTimeEdit) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTimeEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Event +func miqt_exec_callback_QTimeEdit_Event(self *C.QTimeEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTimeEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTimeEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_KeyPressEvent +func miqt_exec_callback_QTimeEdit_KeyPressEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QTimeEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QTimeEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_WheelEvent +func miqt_exec_callback_QTimeEdit_WheelEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTimeEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTimeEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_FocusInEvent +func miqt_exec_callback_QTimeEdit_FocusInEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTimeEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTimeEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTimeEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_FocusNextPrevChild +func miqt_exec_callback_QTimeEdit_FocusNextPrevChild(self *C.QTimeEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QTimeEdit_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QTimeEdit) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QTimeEdit_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Validate +func miqt_exec_callback_QTimeEdit_Validate(self *C.QTimeEdit, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QTimeEdit_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QTimeEdit) OnFixup(slot func(super func(input string), input string)) { + C.QTimeEdit_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Fixup +func miqt_exec_callback_QTimeEdit_Fixup(self *C.QTimeEdit, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QTimeEdit{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_DateTimeFromText(text string) *QDateTime { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QTimeEdit_virtualbase_DateTimeFromText(unsafe.Pointer(this.h), text_ms) + _goptr := newQDateTime(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTimeEdit) OnDateTimeFromText(slot func(super func(text string) *QDateTime, text string) *QDateTime) { + C.QTimeEdit_override_virtual_DateTimeFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_DateTimeFromText +func miqt_exec_callback_QTimeEdit_DateTimeFromText(self *C.QTimeEdit, cb C.intptr_t, text C.struct_miqt_string) *C.QDateTime { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) *QDateTime, text string) *QDateTime) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_DateTimeFromText, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTimeEdit) callVirtualBase_TextFromDateTime(dt *QDateTime) string { + + var _ms C.struct_miqt_string = C.QTimeEdit_virtualbase_TextFromDateTime(unsafe.Pointer(this.h), dt.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QTimeEdit) OnTextFromDateTime(slot func(super func(dt *QDateTime) string, dt *QDateTime) string) { + C.QTimeEdit_override_virtual_TextFromDateTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_TextFromDateTime +func miqt_exec_callback_QTimeEdit_TextFromDateTime(self *C.QTimeEdit, cb C.intptr_t, dt *C.QDateTime) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dt *QDateTime) string, dt *QDateTime) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dt)) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_TextFromDateTime, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QTimeEdit) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QTimeEdit_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QTimeEdit) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QTimeEdit_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_StepEnabled +func miqt_exec_callback_QTimeEdit_StepEnabled(self *C.QTimeEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTimeEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTimeEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_MousePressEvent +func miqt_exec_callback_QTimeEdit_MousePressEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QTimeEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QTimeEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_PaintEvent +func miqt_exec_callback_QTimeEdit_PaintEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QTimeEdit) Delete() { + C.QTimeEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QTimeEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QTimeEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QDateEdit struct { + h *C.QDateEdit + isSubclass bool + *QDateTimeEdit +} + +func (this *QDateEdit) cPointer() *C.QDateEdit { + if this == nil { + return nil + } + return this.h +} + +func (this *QDateEdit) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQDateEdit constructs the type using only CGO pointers. +func newQDateEdit(h *C.QDateEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateEdit { + if h == nil { + return nil + } + return &QDateEdit{h: h, + QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQDateEdit constructs the type using only unsafe pointers. +func UnsafeNewQDateEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateEdit { + if h == nil { + return nil + } + + return &QDateEdit{h: (*C.QDateEdit)(h), + QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQDateEdit constructs a new QDateEdit object. +func NewQDateEdit(parent *QWidget) *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new(parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDateEdit2 constructs a new QDateEdit object. +func NewQDateEdit2() *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new2(&outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDateEdit3 constructs a new QDateEdit object. +func NewQDateEdit3(date *QDate) *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new3(date.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDateEdit4 constructs a new QDateEdit object. +func NewQDateEdit4(date *QDate, parent *QWidget) *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new4(date.cPointer(), parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QDateEdit) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QDateEdit_MetaObject(this.h))) +} + +func (this *QDateEdit) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QDateEdit_Metacast(this.h, param1_Cstring)) +} + +func QDateEdit_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QDateEdit_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDateEdit_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QDateEdit_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDateEdit) UserDateChanged(date *QDate) { + C.QDateEdit_UserDateChanged(this.h, date.cPointer()) +} +func (this *QDateEdit) OnUserDateChanged(slot func(date *QDate)) { + C.QDateEdit_connect_UserDateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_UserDateChanged +func miqt_exec_callback_QDateEdit_UserDateChanged(cb C.intptr_t, date *C.QDate) { + gofunc, ok := cgo.Handle(cb).Value().(func(date *QDate)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDate(unsafe.Pointer(date)) + + gofunc(slotval1) +} + +func QDateEdit_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDateEdit_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDateEdit_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms C.struct_miqt_string = C.QDateEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) @@ -803,9 +2040,393 @@ func QDateEdit_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDateEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDateEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDateEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_SizeHint +func miqt_exec_callback_QDateEdit_SizeHint(self *C.QDateEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDateEdit) callVirtualBase_Clear() { + + C.QDateEdit_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QDateEdit) OnClear(slot func(super func())) { + C.QDateEdit_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Clear +func miqt_exec_callback_QDateEdit_Clear(self *C.QDateEdit, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDateEdit{h: self}).callVirtualBase_Clear) + +} + +func (this *QDateEdit) callVirtualBase_StepBy(steps int) { + + C.QDateEdit_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QDateEdit) OnStepBy(slot func(super func(steps int), steps int)) { + C.QDateEdit_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_StepBy +func miqt_exec_callback_QDateEdit_StepBy(self *C.QDateEdit, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QDateEdit{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDateEdit_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDateEdit) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDateEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Event +func miqt_exec_callback_QDateEdit_Event(self *C.QDateEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDateEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDateEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_KeyPressEvent +func miqt_exec_callback_QDateEdit_KeyPressEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDateEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDateEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_WheelEvent +func miqt_exec_callback_QDateEdit_WheelEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDateEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDateEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_FocusInEvent +func miqt_exec_callback_QDateEdit_FocusInEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDateEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDateEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDateEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_FocusNextPrevChild +func miqt_exec_callback_QDateEdit_FocusNextPrevChild(self *C.QDateEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QDateEdit_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QDateEdit) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QDateEdit_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Validate +func miqt_exec_callback_QDateEdit_Validate(self *C.QDateEdit, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QDateEdit_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QDateEdit) OnFixup(slot func(super func(input string), input string)) { + C.QDateEdit_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Fixup +func miqt_exec_callback_QDateEdit_Fixup(self *C.QDateEdit, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QDateEdit{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_DateTimeFromText(text string) *QDateTime { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QDateEdit_virtualbase_DateTimeFromText(unsafe.Pointer(this.h), text_ms) + _goptr := newQDateTime(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateEdit) OnDateTimeFromText(slot func(super func(text string) *QDateTime, text string) *QDateTime) { + C.QDateEdit_override_virtual_DateTimeFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_DateTimeFromText +func miqt_exec_callback_QDateEdit_DateTimeFromText(self *C.QDateEdit, cb C.intptr_t, text C.struct_miqt_string) *C.QDateTime { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) *QDateTime, text string) *QDateTime) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_DateTimeFromText, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDateEdit) callVirtualBase_TextFromDateTime(dt *QDateTime) string { + + var _ms C.struct_miqt_string = C.QDateEdit_virtualbase_TextFromDateTime(unsafe.Pointer(this.h), dt.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QDateEdit) OnTextFromDateTime(slot func(super func(dt *QDateTime) string, dt *QDateTime) string) { + C.QDateEdit_override_virtual_TextFromDateTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_TextFromDateTime +func miqt_exec_callback_QDateEdit_TextFromDateTime(self *C.QDateEdit, cb C.intptr_t, dt *C.QDateTime) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dt *QDateTime) string, dt *QDateTime) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dt)) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_TextFromDateTime, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QDateEdit) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QDateEdit_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QDateEdit) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QDateEdit_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_StepEnabled +func miqt_exec_callback_QDateEdit_StepEnabled(self *C.QDateEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDateEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_MousePressEvent +func miqt_exec_callback_QDateEdit_MousePressEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDateEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDateEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_PaintEvent +func miqt_exec_callback_QDateEdit_PaintEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QDateEdit) Delete() { - C.QDateEdit_Delete(this.h) + C.QDateEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdatetimeedit.h b/qt/gen_qdatetimeedit.h index ea32d929..fe477abc 100644 --- a/qt/gen_qdatetimeedit.h +++ b/qt/gen_qdatetimeedit.h @@ -15,41 +15,71 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSpinBox; class QCalendar; class QCalendarWidget; +class QCloseEvent; +class QContextMenuEvent; class QDate; class QDateEdit; class QDateTime; class QDateTimeEdit; class QEvent; +class QFocusEvent; +class QHideEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QSize; class QTime; class QTimeEdit; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSpinBox QAbstractSpinBox; typedef struct QCalendar QCalendar; typedef struct QCalendarWidget QCalendarWidget; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDate QDate; typedef struct QDateEdit QDateEdit; typedef struct QDateTime QDateTime; typedef struct QDateTimeEdit QDateTimeEdit; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QTime QTime; typedef struct QTimeEdit QTimeEdit; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDateTimeEdit* QDateTimeEdit_new(QWidget* parent); -QDateTimeEdit* QDateTimeEdit_new2(); -QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt); -QDateTimeEdit* QDateTimeEdit_new4(QDate* d); -QDateTimeEdit* QDateTimeEdit_new5(QTime* t); -QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent); -QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent); -QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent); +void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self); void* QDateTimeEdit_Metacast(QDateTimeEdit* self, const char* param1); struct miqt_string QDateTimeEdit_Tr(const char* s); @@ -110,16 +140,83 @@ void QDateTimeEdit_connect_DateChanged(QDateTimeEdit* self, intptr_t slot); void QDateTimeEdit_SetDateTime(QDateTimeEdit* self, QDateTime* dateTime); void QDateTimeEdit_SetDate(QDateTimeEdit* self, QDate* date); void QDateTimeEdit_SetTime(QDateTimeEdit* self, QTime* time); +void QDateTimeEdit_KeyPressEvent(QDateTimeEdit* self, QKeyEvent* event); +void QDateTimeEdit_WheelEvent(QDateTimeEdit* self, QWheelEvent* event); +void QDateTimeEdit_FocusInEvent(QDateTimeEdit* self, QFocusEvent* event); +bool QDateTimeEdit_FocusNextPrevChild(QDateTimeEdit* self, bool next); +int QDateTimeEdit_Validate(const QDateTimeEdit* self, struct miqt_string input, int* pos); +void QDateTimeEdit_Fixup(const QDateTimeEdit* self, struct miqt_string input); +QDateTime* QDateTimeEdit_DateTimeFromText(const QDateTimeEdit* self, struct miqt_string text); +struct miqt_string QDateTimeEdit_TextFromDateTime(const QDateTimeEdit* self, QDateTime* dt); +int QDateTimeEdit_StepEnabled(const QDateTimeEdit* self); +void QDateTimeEdit_MousePressEvent(QDateTimeEdit* self, QMouseEvent* event); +void QDateTimeEdit_PaintEvent(QDateTimeEdit* self, QPaintEvent* event); struct miqt_string QDateTimeEdit_Tr2(const char* s, const char* c); struct miqt_string QDateTimeEdit_Tr3(const char* s, const char* c, int n); struct miqt_string QDateTimeEdit_TrUtf82(const char* s, const char* c); struct miqt_string QDateTimeEdit_TrUtf83(const char* s, const char* c, int n); -void QDateTimeEdit_Delete(QDateTimeEdit* self); +void QDateTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDateTimeEdit_virtualbase_SizeHint(const void* self); +void QDateTimeEdit_override_virtual_Clear(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_Clear(void* self); +void QDateTimeEdit_override_virtual_StepBy(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_StepBy(void* self, int steps); +void QDateTimeEdit_override_virtual_Event(void* self, intptr_t slot); +bool QDateTimeEdit_virtualbase_Event(void* self, QEvent* event); +void QDateTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDateTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDateTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDateTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDateTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDateTimeEdit_override_virtual_Validate(void* self, intptr_t slot); +int QDateTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QDateTimeEdit_override_virtual_Fixup(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input); +void QDateTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot); +QDateTime* QDateTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text); +void QDateTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot); +struct miqt_string QDateTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt); +void QDateTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot); +int QDateTimeEdit_virtualbase_StepEnabled(const void* self); +void QDateTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDateTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDateTimeEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDateTimeEdit_virtualbase_MinimumSizeHint(const void* self); +void QDateTimeEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDateTimeEdit_virtualbase_InputMethodQuery(const void* self, int param1); +void QDateTimeEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDateTimeEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDateTimeEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDateTimeEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDateTimeEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDateTimeEdit_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDateTimeEdit_override_virtual_HideEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDateTimeEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDateTimeEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDateTimeEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDateTimeEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDateTimeEdit_Delete(QDateTimeEdit* self, bool isSubclass); -QTimeEdit* QTimeEdit_new(QWidget* parent); -QTimeEdit* QTimeEdit_new2(); -QTimeEdit* QTimeEdit_new3(QTime* time); -QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent); +void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self); void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1); struct miqt_string QTimeEdit_Tr(const char* s); @@ -130,12 +227,42 @@ struct miqt_string QTimeEdit_Tr2(const char* s, const char* c); struct miqt_string QTimeEdit_Tr3(const char* s, const char* c, int n); struct miqt_string QTimeEdit_TrUtf82(const char* s, const char* c); struct miqt_string QTimeEdit_TrUtf83(const char* s, const char* c, int n); -void QTimeEdit_Delete(QTimeEdit* self); +void QTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTimeEdit_virtualbase_SizeHint(const void* self); +void QTimeEdit_override_virtual_Clear(void* self, intptr_t slot); +void QTimeEdit_virtualbase_Clear(void* self); +void QTimeEdit_override_virtual_StepBy(void* self, intptr_t slot); +void QTimeEdit_virtualbase_StepBy(void* self, int steps); +void QTimeEdit_override_virtual_Event(void* self, intptr_t slot); +bool QTimeEdit_virtualbase_Event(void* self, QEvent* event); +void QTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTimeEdit_override_virtual_Validate(void* self, intptr_t slot); +int QTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QTimeEdit_override_virtual_Fixup(void* self, intptr_t slot); +void QTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input); +void QTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot); +QDateTime* QTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text); +void QTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot); +struct miqt_string QTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt); +void QTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot); +int QTimeEdit_virtualbase_StepEnabled(const void* self); +void QTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QTimeEdit_Delete(QTimeEdit* self, bool isSubclass); -QDateEdit* QDateEdit_new(QWidget* parent); -QDateEdit* QDateEdit_new2(); -QDateEdit* QDateEdit_new3(QDate* date); -QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent); +void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDateEdit_MetaObject(const QDateEdit* self); void* QDateEdit_Metacast(QDateEdit* self, const char* param1); struct miqt_string QDateEdit_Tr(const char* s); @@ -146,7 +273,37 @@ struct miqt_string QDateEdit_Tr2(const char* s, const char* c); struct miqt_string QDateEdit_Tr3(const char* s, const char* c, int n); struct miqt_string QDateEdit_TrUtf82(const char* s, const char* c); struct miqt_string QDateEdit_TrUtf83(const char* s, const char* c, int n); -void QDateEdit_Delete(QDateEdit* self); +void QDateEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDateEdit_virtualbase_SizeHint(const void* self); +void QDateEdit_override_virtual_Clear(void* self, intptr_t slot); +void QDateEdit_virtualbase_Clear(void* self); +void QDateEdit_override_virtual_StepBy(void* self, intptr_t slot); +void QDateEdit_virtualbase_StepBy(void* self, int steps); +void QDateEdit_override_virtual_Event(void* self, intptr_t slot); +bool QDateEdit_virtualbase_Event(void* self, QEvent* event); +void QDateEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDateEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDateEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDateEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDateEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDateEdit_override_virtual_Validate(void* self, intptr_t slot); +int QDateEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QDateEdit_override_virtual_Fixup(void* self, intptr_t slot); +void QDateEdit_virtualbase_Fixup(const void* self, struct miqt_string input); +void QDateEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot); +QDateTime* QDateEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text); +void QDateEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot); +struct miqt_string QDateEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt); +void QDateEdit_override_virtual_StepEnabled(void* self, intptr_t slot); +int QDateEdit_virtualbase_StepEnabled(const void* self); +void QDateEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDateEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDateEdit_Delete(QDateEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdeadlinetimer.cpp b/qt/gen_qdeadlinetimer.cpp index 2a93ec7b..ada9e2fe 100644 --- a/qt/gen_qdeadlinetimer.cpp +++ b/qt/gen_qdeadlinetimer.cpp @@ -3,32 +3,39 @@ #include "gen_qdeadlinetimer.h" #include "_cgo_export.h" -QDeadlineTimer* QDeadlineTimer_new() { - return new QDeadlineTimer(); +void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new2(int param1) { - return new QDeadlineTimer(static_cast(param1)); +void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new3(long long msecs) { - return new QDeadlineTimer(static_cast(msecs)); +void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1) { - return new QDeadlineTimer(*param1); +void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(*param1); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new5(int type_) { - return new QDeadlineTimer(static_cast(type_)); +void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(type_)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_) { - return new QDeadlineTimer(static_cast(param1), static_cast(type_)); +void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1), static_cast(type_)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal) { - return new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); +void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); + *outptr_QDeadlineTimer = ret; } void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other) { @@ -140,7 +147,11 @@ QDeadlineTimer* QDeadlineTimer_Current1(int timerType) { return new QDeadlineTimer(QDeadlineTimer::current(static_cast(timerType))); } -void QDeadlineTimer_Delete(QDeadlineTimer* self) { - delete self; +void QDeadlineTimer_Delete(QDeadlineTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdeadlinetimer.go b/qt/gen_qdeadlinetimer.go index 04b53016..f1ee2684 100644 --- a/qt/gen_qdeadlinetimer.go +++ b/qt/gen_qdeadlinetimer.go @@ -20,7 +20,8 @@ const ( ) type QDeadlineTimer struct { - h *C.QDeadlineTimer + h *C.QDeadlineTimer + isSubclass bool } func (this *QDeadlineTimer) cPointer() *C.QDeadlineTimer { @@ -37,6 +38,7 @@ func (this *QDeadlineTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDeadlineTimer constructs the type using only CGO pointers. func newQDeadlineTimer(h *C.QDeadlineTimer) *QDeadlineTimer { if h == nil { return nil @@ -44,50 +46,83 @@ func newQDeadlineTimer(h *C.QDeadlineTimer) *QDeadlineTimer { return &QDeadlineTimer{h: h} } +// UnsafeNewQDeadlineTimer constructs the type using only unsafe pointers. func UnsafeNewQDeadlineTimer(h unsafe.Pointer) *QDeadlineTimer { - return newQDeadlineTimer((*C.QDeadlineTimer)(h)) + if h == nil { + return nil + } + + return &QDeadlineTimer{h: (*C.QDeadlineTimer)(h)} } // NewQDeadlineTimer constructs a new QDeadlineTimer object. func NewQDeadlineTimer() *QDeadlineTimer { - ret := C.QDeadlineTimer_new() - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new(&outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer2 constructs a new QDeadlineTimer object. func NewQDeadlineTimer2(param1 QDeadlineTimer__ForeverConstant) *QDeadlineTimer { - ret := C.QDeadlineTimer_new2((C.int)(param1)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new2((C.int)(param1), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer3 constructs a new QDeadlineTimer object. func NewQDeadlineTimer3(msecs int64) *QDeadlineTimer { - ret := C.QDeadlineTimer_new3((C.longlong)(msecs)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new3((C.longlong)(msecs), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer4 constructs a new QDeadlineTimer object. func NewQDeadlineTimer4(param1 *QDeadlineTimer) *QDeadlineTimer { - ret := C.QDeadlineTimer_new4(param1.cPointer()) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new4(param1.cPointer(), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer5 constructs a new QDeadlineTimer object. func NewQDeadlineTimer5(type_ TimerType) *QDeadlineTimer { - ret := C.QDeadlineTimer_new5((C.int)(type_)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new5((C.int)(type_), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer6 constructs a new QDeadlineTimer object. func NewQDeadlineTimer6(param1 QDeadlineTimer__ForeverConstant, type_ TimerType) *QDeadlineTimer { - ret := C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer7 constructs a new QDeadlineTimer object. func NewQDeadlineTimer7(msecs int64, typeVal TimerType) *QDeadlineTimer { - ret := C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } func (this *QDeadlineTimer) Swap(other *QDeadlineTimer) { @@ -201,7 +236,7 @@ func QDeadlineTimer_Current1(timerType TimerType) *QDeadlineTimer { // Delete this object from C++ memory. func (this *QDeadlineTimer) Delete() { - C.QDeadlineTimer_Delete(this.h) + C.QDeadlineTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdeadlinetimer.h b/qt/gen_qdeadlinetimer.h index 306258fd..cfabdd71 100644 --- a/qt/gen_qdeadlinetimer.h +++ b/qt/gen_qdeadlinetimer.h @@ -20,13 +20,13 @@ class QDeadlineTimer; typedef struct QDeadlineTimer QDeadlineTimer; #endif -QDeadlineTimer* QDeadlineTimer_new(); -QDeadlineTimer* QDeadlineTimer_new2(int param1); -QDeadlineTimer* QDeadlineTimer_new3(long long msecs); -QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1); -QDeadlineTimer* QDeadlineTimer_new5(int type_); -QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_); -QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal); +void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer); void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other); bool QDeadlineTimer_IsForever(const QDeadlineTimer* self); bool QDeadlineTimer_HasExpired(const QDeadlineTimer* self); @@ -52,7 +52,7 @@ void QDeadlineTimer_SetDeadline2(QDeadlineTimer* self, long long msecs, int time void QDeadlineTimer_SetPreciseDeadline2(QDeadlineTimer* self, long long secs, long long nsecs); void QDeadlineTimer_SetPreciseDeadline3(QDeadlineTimer* self, long long secs, long long nsecs, int typeVal); QDeadlineTimer* QDeadlineTimer_Current1(int timerType); -void QDeadlineTimer_Delete(QDeadlineTimer* self); +void QDeadlineTimer_Delete(QDeadlineTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdebug.cpp b/qt/gen_qdebug.cpp index 68fb8c39..4532e78f 100644 --- a/qt/gen_qdebug.cpp +++ b/qt/gen_qdebug.cpp @@ -11,12 +11,14 @@ #include "gen_qdebug.h" #include "_cgo_export.h" -QDebug* QDebug_new(QIODevice* device) { - return new QDebug(device); +void QDebug_new(QIODevice* device, QDebug** outptr_QDebug) { + QDebug* ret = new QDebug(device); + *outptr_QDebug = ret; } -QDebug* QDebug_new2(QDebug* o) { - return new QDebug(*o); +void QDebug_new2(QDebug* o, QDebug** outptr_QDebug) { + QDebug* ret = new QDebug(*o); + *outptr_QDebug = ret; } void QDebug_OperatorAssign(QDebug* self, QDebug* other) { @@ -201,16 +203,25 @@ QDebug* QDebug_MaybeQuote1(QDebug* self, char c) { return &_ret; } -void QDebug_Delete(QDebug* self) { - delete self; +void QDebug_Delete(QDebug* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg) { - return new QDebugStateSaver(*dbg); +void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver) { + QDebugStateSaver* ret = new QDebugStateSaver(*dbg); + *outptr_QDebugStateSaver = ret; } -void QDebugStateSaver_Delete(QDebugStateSaver* self) { - delete self; +void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QNoDebug* QNoDebug_Space(QNoDebug* self) { @@ -261,7 +272,11 @@ QNoDebug* QNoDebug_MaybeQuote1(QNoDebug* self, const char param1) { return &_ret; } -void QNoDebug_Delete(QNoDebug* self) { - delete self; +void QNoDebug_Delete(QNoDebug* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdebug.go b/qt/gen_qdebug.go index 3c059124..d7692f1e 100644 --- a/qt/gen_qdebug.go +++ b/qt/gen_qdebug.go @@ -22,7 +22,8 @@ const ( ) type QDebug struct { - h *C.QDebug + h *C.QDebug + isSubclass bool } func (this *QDebug) cPointer() *C.QDebug { @@ -39,6 +40,7 @@ func (this *QDebug) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDebug constructs the type using only CGO pointers. func newQDebug(h *C.QDebug) *QDebug { if h == nil { return nil @@ -46,20 +48,33 @@ func newQDebug(h *C.QDebug) *QDebug { return &QDebug{h: h} } +// UnsafeNewQDebug constructs the type using only unsafe pointers. func UnsafeNewQDebug(h unsafe.Pointer) *QDebug { - return newQDebug((*C.QDebug)(h)) + if h == nil { + return nil + } + + return &QDebug{h: (*C.QDebug)(h)} } // NewQDebug constructs a new QDebug object. func NewQDebug(device *QIODevice) *QDebug { - ret := C.QDebug_new(device.cPointer()) - return newQDebug(ret) + var outptr_QDebug *C.QDebug = nil + + C.QDebug_new(device.cPointer(), &outptr_QDebug) + ret := newQDebug(outptr_QDebug) + ret.isSubclass = true + return ret } // NewQDebug2 constructs a new QDebug object. func NewQDebug2(o *QDebug) *QDebug { - ret := C.QDebug_new2(o.cPointer()) - return newQDebug(ret) + var outptr_QDebug *C.QDebug = nil + + C.QDebug_new2(o.cPointer(), &outptr_QDebug) + ret := newQDebug(outptr_QDebug) + ret.isSubclass = true + return ret } func (this *QDebug) OperatorAssign(other *QDebug) { @@ -201,7 +216,7 @@ func (this *QDebug) MaybeQuote1(c int8) *QDebug { // Delete this object from C++ memory. func (this *QDebug) Delete() { - C.QDebug_Delete(this.h) + C.QDebug_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -214,7 +229,8 @@ func (this *QDebug) GoGC() { } type QDebugStateSaver struct { - h *C.QDebugStateSaver + h *C.QDebugStateSaver + isSubclass bool } func (this *QDebugStateSaver) cPointer() *C.QDebugStateSaver { @@ -231,6 +247,7 @@ func (this *QDebugStateSaver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDebugStateSaver constructs the type using only CGO pointers. func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver { if h == nil { return nil @@ -238,19 +255,28 @@ func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver { return &QDebugStateSaver{h: h} } +// UnsafeNewQDebugStateSaver constructs the type using only unsafe pointers. func UnsafeNewQDebugStateSaver(h unsafe.Pointer) *QDebugStateSaver { - return newQDebugStateSaver((*C.QDebugStateSaver)(h)) + if h == nil { + return nil + } + + return &QDebugStateSaver{h: (*C.QDebugStateSaver)(h)} } // NewQDebugStateSaver constructs a new QDebugStateSaver object. func NewQDebugStateSaver(dbg *QDebug) *QDebugStateSaver { - ret := C.QDebugStateSaver_new(dbg.cPointer()) - return newQDebugStateSaver(ret) + var outptr_QDebugStateSaver *C.QDebugStateSaver = nil + + C.QDebugStateSaver_new(dbg.cPointer(), &outptr_QDebugStateSaver) + ret := newQDebugStateSaver(outptr_QDebugStateSaver) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QDebugStateSaver) Delete() { - C.QDebugStateSaver_Delete(this.h) + C.QDebugStateSaver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -263,7 +289,8 @@ func (this *QDebugStateSaver) GoGC() { } type QNoDebug struct { - h *C.QNoDebug + h *C.QNoDebug + isSubclass bool } func (this *QNoDebug) cPointer() *C.QNoDebug { @@ -280,6 +307,7 @@ func (this *QNoDebug) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNoDebug constructs the type using only CGO pointers. func newQNoDebug(h *C.QNoDebug) *QNoDebug { if h == nil { return nil @@ -287,8 +315,13 @@ func newQNoDebug(h *C.QNoDebug) *QNoDebug { return &QNoDebug{h: h} } +// UnsafeNewQNoDebug constructs the type using only unsafe pointers. func UnsafeNewQNoDebug(h unsafe.Pointer) *QNoDebug { - return newQNoDebug((*C.QNoDebug)(h)) + if h == nil { + return nil + } + + return &QNoDebug{h: (*C.QNoDebug)(h)} } func (this *QNoDebug) Space() *QNoDebug { @@ -325,7 +358,7 @@ func (this *QNoDebug) MaybeQuote1(param1 int8) *QNoDebug { // Delete this object from C++ memory. func (this *QNoDebug) Delete() { - C.QNoDebug_Delete(this.h) + C.QNoDebug_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdebug.h b/qt/gen_qdebug.h index 2f391906..dbc25299 100644 --- a/qt/gen_qdebug.h +++ b/qt/gen_qdebug.h @@ -30,8 +30,8 @@ typedef struct QIODevice QIODevice; typedef struct QNoDebug QNoDebug; #endif -QDebug* QDebug_new(QIODevice* device); -QDebug* QDebug_new2(QDebug* o); +void QDebug_new(QIODevice* device, QDebug** outptr_QDebug); +void QDebug_new2(QDebug* o, QDebug** outptr_QDebug); void QDebug_OperatorAssign(QDebug* self, QDebug* other); void QDebug_Swap(QDebug* self, QDebug* other); QDebug* QDebug_ResetFormat(QDebug* self); @@ -64,10 +64,10 @@ QDebug* QDebug_OperatorShiftLeftWithQString(QDebug* self, struct miqt_string t); QDebug* QDebug_OperatorShiftLeftWithQByteArray(QDebug* self, struct miqt_string t); QDebug* QDebug_OperatorShiftLeftWithVoid(QDebug* self, const void* t); QDebug* QDebug_MaybeQuote1(QDebug* self, char c); -void QDebug_Delete(QDebug* self); +void QDebug_Delete(QDebug* self, bool isSubclass); -QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg); -void QDebugStateSaver_Delete(QDebugStateSaver* self); +void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver); +void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass); QNoDebug* QNoDebug_Space(QNoDebug* self); QNoDebug* QNoDebug_Nospace(QNoDebug* self); @@ -77,7 +77,7 @@ QNoDebug* QNoDebug_Noquote(QNoDebug* self); QNoDebug* QNoDebug_MaybeQuote(QNoDebug* self); QNoDebug* QNoDebug_Verbosity(QNoDebug* self, int param1); QNoDebug* QNoDebug_MaybeQuote1(QNoDebug* self, const char param1); -void QNoDebug_Delete(QNoDebug* self); +void QNoDebug_Delete(QNoDebug* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdesktopservices.cpp b/qt/gen_qdesktopservices.cpp index 770279bb..760da276 100644 --- a/qt/gen_qdesktopservices.cpp +++ b/qt/gen_qdesktopservices.cpp @@ -22,7 +22,11 @@ void QDesktopServices_UnsetUrlHandler(struct miqt_string scheme) { QDesktopServices::unsetUrlHandler(scheme_QString); } -void QDesktopServices_Delete(QDesktopServices* self) { - delete self; +void QDesktopServices_Delete(QDesktopServices* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdesktopservices.go b/qt/gen_qdesktopservices.go index cdafe70d..6ff94801 100644 --- a/qt/gen_qdesktopservices.go +++ b/qt/gen_qdesktopservices.go @@ -14,7 +14,8 @@ import ( ) type QDesktopServices struct { - h *C.QDesktopServices + h *C.QDesktopServices + isSubclass bool } func (this *QDesktopServices) cPointer() *C.QDesktopServices { @@ -31,6 +32,7 @@ func (this *QDesktopServices) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDesktopServices constructs the type using only CGO pointers. func newQDesktopServices(h *C.QDesktopServices) *QDesktopServices { if h == nil { return nil @@ -38,8 +40,13 @@ func newQDesktopServices(h *C.QDesktopServices) *QDesktopServices { return &QDesktopServices{h: h} } +// UnsafeNewQDesktopServices constructs the type using only unsafe pointers. func UnsafeNewQDesktopServices(h unsafe.Pointer) *QDesktopServices { - return newQDesktopServices((*C.QDesktopServices)(h)) + if h == nil { + return nil + } + + return &QDesktopServices{h: (*C.QDesktopServices)(h)} } func QDesktopServices_OpenUrl(url *QUrl) bool { @@ -66,7 +73,7 @@ func QDesktopServices_UnsetUrlHandler(scheme string) { // Delete this object from C++ memory. func (this *QDesktopServices) Delete() { - C.QDesktopServices_Delete(this.h) + C.QDesktopServices_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdesktopservices.h b/qt/gen_qdesktopservices.h index b77ac49b..7f049343 100644 --- a/qt/gen_qdesktopservices.h +++ b/qt/gen_qdesktopservices.h @@ -27,7 +27,7 @@ typedef struct QUrl QUrl; bool QDesktopServices_OpenUrl(QUrl* url); void QDesktopServices_SetUrlHandler(struct miqt_string scheme, QObject* receiver, const char* method); void QDesktopServices_UnsetUrlHandler(struct miqt_string scheme); -void QDesktopServices_Delete(QDesktopServices* self); +void QDesktopServices_Delete(QDesktopServices* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdesktopwidget.cpp b/qt/gen_qdesktopwidget.cpp index 20fee169..0852be02 100644 --- a/qt/gen_qdesktopwidget.cpp +++ b/qt/gen_qdesktopwidget.cpp @@ -1,17 +1,1031 @@ +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qdesktopwidget.h" #include "_cgo_export.h" -QDesktopWidget* QDesktopWidget_new() { - return new QDesktopWidget(); +class MiqtVirtualQDesktopWidget : public virtual QDesktopWidget { +public: + + MiqtVirtualQDesktopWidget(): QDesktopWidget() {}; + + virtual ~MiqtVirtualQDesktopWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QDesktopWidget::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QDesktopWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QDesktopWidget::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDesktopWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDesktopWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDesktopWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDesktopWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDesktopWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDesktopWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDesktopWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDesktopWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDesktopWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDesktopWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDesktopWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDesktopWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDesktopWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDesktopWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDesktopWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDesktopWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDesktopWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDesktopWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDesktopWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDesktopWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDesktopWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDesktopWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDesktopWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDesktopWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDesktopWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDesktopWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDesktopWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDesktopWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDesktopWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDesktopWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDesktopWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDesktopWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDesktopWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDesktopWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDesktopWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDesktopWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDesktopWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDesktopWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDesktopWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDesktopWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDesktopWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDesktopWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QDesktopWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QDesktopWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDesktopWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDesktopWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDesktopWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDesktopWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDesktopWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDesktopWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDesktopWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDesktopWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDesktopWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDesktopWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDesktopWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDesktopWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDesktopWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDesktopWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDesktopWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDesktopWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDesktopWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDesktopWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDesktopWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDesktopWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDesktopWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDesktopWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDesktopWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDesktopWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDesktopWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDesktopWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDesktopWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QDesktopWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QDesktopWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDesktopWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QDesktopWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QDesktopWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QDesktopWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDesktopWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDesktopWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDesktopWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDesktopWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDesktopWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDesktopWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDesktopWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDesktopWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDesktopWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDesktopWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDesktopWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDesktopWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDesktopWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDesktopWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDesktopWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDesktopWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDesktopWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDesktopWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDesktopWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDesktopWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDesktopWidget::focusNextPrevChild(next); + + } + +}; + +void QDesktopWidget_new(QDesktopWidget** outptr_QDesktopWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDesktopWidget* ret = new MiqtVirtualQDesktopWidget(); + *outptr_QDesktopWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDesktopWidget_MetaObject(const QDesktopWidget* self) { @@ -101,7 +1115,7 @@ void QDesktopWidget_Resized(QDesktopWidget* self, int param1) { } void QDesktopWidget_connect_Resized(QDesktopWidget* self, intptr_t slot) { - QDesktopWidget::connect(self, static_cast(&QDesktopWidget::resized), self, [=](int param1) { + MiqtVirtualQDesktopWidget::connect(self, static_cast(&QDesktopWidget::resized), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QDesktopWidget_Resized(slot, sigval1); }); @@ -112,7 +1126,7 @@ void QDesktopWidget_WorkAreaResized(QDesktopWidget* self, int param1) { } void QDesktopWidget_connect_WorkAreaResized(QDesktopWidget* self, intptr_t slot) { - QDesktopWidget::connect(self, static_cast(&QDesktopWidget::workAreaResized), self, [=](int param1) { + MiqtVirtualQDesktopWidget::connect(self, static_cast(&QDesktopWidget::workAreaResized), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QDesktopWidget_WorkAreaResized(slot, sigval1); }); @@ -123,7 +1137,7 @@ void QDesktopWidget_ScreenCountChanged(QDesktopWidget* self, int param1) { } void QDesktopWidget_connect_ScreenCountChanged(QDesktopWidget* self, intptr_t slot) { - QDesktopWidget::connect(self, static_cast(&QDesktopWidget::screenCountChanged), self, [=](int param1) { + MiqtVirtualQDesktopWidget::connect(self, static_cast(&QDesktopWidget::screenCountChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QDesktopWidget_ScreenCountChanged(slot, sigval1); }); @@ -134,7 +1148,7 @@ void QDesktopWidget_PrimaryScreenChanged(QDesktopWidget* self) { } void QDesktopWidget_connect_PrimaryScreenChanged(QDesktopWidget* self, intptr_t slot) { - QDesktopWidget::connect(self, static_cast(&QDesktopWidget::primaryScreenChanged), self, [=]() { + MiqtVirtualQDesktopWidget::connect(self, static_cast(&QDesktopWidget::primaryScreenChanged), self, [=]() { miqt_exec_callback_QDesktopWidget_PrimaryScreenChanged(slot); }); } @@ -199,7 +1213,339 @@ QRect* QDesktopWidget_AvailableGeometry1(const QDesktopWidget* self, int screen) return new QRect(self->availableGeometry(static_cast(screen))); } -void QDesktopWidget_Delete(QDesktopWidget* self) { - delete self; +void QDesktopWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QDesktopWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_ResizeEvent(e); +} + +void QDesktopWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__DevType = slot; +} + +int QDesktopWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_DevType(); +} + +void QDesktopWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__SetVisible = slot; +} + +void QDesktopWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QDesktopWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QDesktopWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_SizeHint(); +} + +void QDesktopWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDesktopWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDesktopWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QDesktopWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDesktopWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDesktopWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDesktopWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDesktopWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QDesktopWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__Event = slot; +} + +bool QDesktopWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_Event(event); +} + +void QDesktopWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QDesktopWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDesktopWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDesktopWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDesktopWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDesktopWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDesktopWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDesktopWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDesktopWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__WheelEvent = slot; +} + +void QDesktopWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QDesktopWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QDesktopWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDesktopWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDesktopWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDesktopWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QDesktopWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDesktopWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QDesktopWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDesktopWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__EnterEvent = slot; +} + +void QDesktopWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QDesktopWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QDesktopWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDesktopWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__PaintEvent = slot; +} + +void QDesktopWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QDesktopWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__MoveEvent = slot; +} + +void QDesktopWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QDesktopWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__CloseEvent = slot; +} + +void QDesktopWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QDesktopWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDesktopWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDesktopWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__TabletEvent = slot; +} + +void QDesktopWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QDesktopWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__ActionEvent = slot; +} + +void QDesktopWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QDesktopWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QDesktopWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDesktopWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QDesktopWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDesktopWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDesktopWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDesktopWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__DropEvent = slot; +} + +void QDesktopWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QDesktopWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__ShowEvent = slot; +} + +void QDesktopWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QDesktopWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__HideEvent = slot; +} + +void QDesktopWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QDesktopWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QDesktopWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDesktopWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QDesktopWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QDesktopWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__Metric = slot; +} + +int QDesktopWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_Metric(param1); +} + +void QDesktopWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__InitPainter = slot; +} + +void QDesktopWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QDesktopWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDesktopWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QDesktopWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDesktopWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QDesktopWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QDesktopWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDesktopWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDesktopWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDesktopWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDesktopWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDesktopWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDesktopWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDesktopWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDesktopWidget_Delete(QDesktopWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdesktopwidget.go b/qt/gen_qdesktopwidget.go index 0514aec4..5aa6bb1e 100644 --- a/qt/gen_qdesktopwidget.go +++ b/qt/gen_qdesktopwidget.go @@ -15,7 +15,8 @@ import ( ) type QDesktopWidget struct { - h *C.QDesktopWidget + h *C.QDesktopWidget + isSubclass bool *QWidget } @@ -33,21 +34,36 @@ func (this *QDesktopWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDesktopWidget(h *C.QDesktopWidget) *QDesktopWidget { +// newQDesktopWidget constructs the type using only CGO pointers. +func newQDesktopWidget(h *C.QDesktopWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDesktopWidget { if h == nil { return nil } - return &QDesktopWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDesktopWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDesktopWidget(h unsafe.Pointer) *QDesktopWidget { - return newQDesktopWidget((*C.QDesktopWidget)(h)) +// UnsafeNewQDesktopWidget constructs the type using only unsafe pointers. +func UnsafeNewQDesktopWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDesktopWidget { + if h == nil { + return nil + } + + return &QDesktopWidget{h: (*C.QDesktopWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDesktopWidget constructs a new QDesktopWidget object. func NewQDesktopWidget() *QDesktopWidget { - ret := C.QDesktopWidget_new() - return newQDesktopWidget(ret) + var outptr_QDesktopWidget *C.QDesktopWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDesktopWidget_new(&outptr_QDesktopWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDesktopWidget(outptr_QDesktopWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDesktopWidget) MetaObject() *QMetaObject { @@ -117,7 +133,7 @@ func (this *QDesktopWidget) ScreenNumberWithQPoint(param1 *QPoint) int { } func (this *QDesktopWidget) Screen() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDesktopWidget_Screen(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDesktopWidget_Screen(this.h)), nil, nil) } func (this *QDesktopWidget) ScreenGeometry2() *QRect { @@ -274,7 +290,7 @@ func (this *QDesktopWidget) ScreenNumber1(widget *QWidget) int { } func (this *QDesktopWidget) Screen1(screen int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDesktopWidget_Screen1(this.h, (C.int)(screen)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDesktopWidget_Screen1(this.h, (C.int)(screen))), nil, nil) } func (this *QDesktopWidget) ScreenGeometry1(screen int) *QRect { @@ -291,9 +307,975 @@ func (this *QDesktopWidget) AvailableGeometry1(screen int) *QRect { return _goptr } +func (this *QDesktopWidget) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QDesktopWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QDesktopWidget) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QDesktopWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_ResizeEvent +func miqt_exec_callback_QDesktopWidget_ResizeEvent(self *C.QDesktopWidget, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_DevType() int { + + return (int)(C.QDesktopWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDesktopWidget) OnDevType(slot func(super func() int) int) { + C.QDesktopWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_DevType +func miqt_exec_callback_QDesktopWidget_DevType(self *C.QDesktopWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDesktopWidget) callVirtualBase_SetVisible(visible bool) { + + C.QDesktopWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDesktopWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDesktopWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_SetVisible +func miqt_exec_callback_QDesktopWidget_SetVisible(self *C.QDesktopWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDesktopWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDesktopWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDesktopWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_SizeHint +func miqt_exec_callback_QDesktopWidget_SizeHint(self *C.QDesktopWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDesktopWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDesktopWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDesktopWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDesktopWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_MinimumSizeHint +func miqt_exec_callback_QDesktopWidget_MinimumSizeHint(self *C.QDesktopWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDesktopWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDesktopWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDesktopWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDesktopWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_HeightForWidth +func miqt_exec_callback_QDesktopWidget_HeightForWidth(self *C.QDesktopWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDesktopWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDesktopWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDesktopWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDesktopWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_HasHeightForWidth +func miqt_exec_callback_QDesktopWidget_HasHeightForWidth(self *C.QDesktopWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDesktopWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDesktopWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDesktopWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDesktopWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_PaintEngine +func miqt_exec_callback_QDesktopWidget_PaintEngine(self *C.QDesktopWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDesktopWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDesktopWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDesktopWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDesktopWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_Event +func miqt_exec_callback_QDesktopWidget_Event(self *C.QDesktopWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDesktopWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDesktopWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDesktopWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_MousePressEvent +func miqt_exec_callback_QDesktopWidget_MousePressEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDesktopWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDesktopWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_MouseReleaseEvent +func miqt_exec_callback_QDesktopWidget_MouseReleaseEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDesktopWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDesktopWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_MouseDoubleClickEvent +func miqt_exec_callback_QDesktopWidget_MouseDoubleClickEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDesktopWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDesktopWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_MouseMoveEvent +func miqt_exec_callback_QDesktopWidget_MouseMoveEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDesktopWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDesktopWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_WheelEvent +func miqt_exec_callback_QDesktopWidget_WheelEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDesktopWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDesktopWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_KeyPressEvent +func miqt_exec_callback_QDesktopWidget_KeyPressEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDesktopWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDesktopWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_KeyReleaseEvent +func miqt_exec_callback_QDesktopWidget_KeyReleaseEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDesktopWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDesktopWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_FocusInEvent +func miqt_exec_callback_QDesktopWidget_FocusInEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDesktopWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDesktopWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_FocusOutEvent +func miqt_exec_callback_QDesktopWidget_FocusOutEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_EnterEvent(event *QEvent) { + + C.QDesktopWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDesktopWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_EnterEvent +func miqt_exec_callback_QDesktopWidget_EnterEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDesktopWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDesktopWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_LeaveEvent +func miqt_exec_callback_QDesktopWidget_LeaveEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDesktopWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDesktopWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_PaintEvent +func miqt_exec_callback_QDesktopWidget_PaintEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDesktopWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDesktopWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_MoveEvent +func miqt_exec_callback_QDesktopWidget_MoveEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDesktopWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDesktopWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_CloseEvent +func miqt_exec_callback_QDesktopWidget_CloseEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDesktopWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDesktopWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_ContextMenuEvent +func miqt_exec_callback_QDesktopWidget_ContextMenuEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDesktopWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDesktopWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_TabletEvent +func miqt_exec_callback_QDesktopWidget_TabletEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDesktopWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDesktopWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_ActionEvent +func miqt_exec_callback_QDesktopWidget_ActionEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDesktopWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDesktopWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_DragEnterEvent +func miqt_exec_callback_QDesktopWidget_DragEnterEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDesktopWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDesktopWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_DragMoveEvent +func miqt_exec_callback_QDesktopWidget_DragMoveEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDesktopWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDesktopWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_DragLeaveEvent +func miqt_exec_callback_QDesktopWidget_DragLeaveEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDesktopWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDesktopWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_DropEvent +func miqt_exec_callback_QDesktopWidget_DropEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDesktopWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDesktopWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_ShowEvent +func miqt_exec_callback_QDesktopWidget_ShowEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDesktopWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDesktopWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDesktopWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_HideEvent +func miqt_exec_callback_QDesktopWidget_HideEvent(self *C.QDesktopWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDesktopWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QDesktopWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QDesktopWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_NativeEvent +func miqt_exec_callback_QDesktopWidget_NativeEvent(self *C.QDesktopWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDesktopWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QDesktopWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDesktopWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QDesktopWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_ChangeEvent +func miqt_exec_callback_QDesktopWidget_ChangeEvent(self *C.QDesktopWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDesktopWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDesktopWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDesktopWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_Metric +func miqt_exec_callback_QDesktopWidget_Metric(self *C.QDesktopWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDesktopWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDesktopWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDesktopWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDesktopWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_InitPainter +func miqt_exec_callback_QDesktopWidget_InitPainter(self *C.QDesktopWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDesktopWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDesktopWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDesktopWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_Redirected +func miqt_exec_callback_QDesktopWidget_Redirected(self *C.QDesktopWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDesktopWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDesktopWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDesktopWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDesktopWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_SharedPainter +func miqt_exec_callback_QDesktopWidget_SharedPainter(self *C.QDesktopWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDesktopWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDesktopWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDesktopWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDesktopWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_InputMethodEvent +func miqt_exec_callback_QDesktopWidget_InputMethodEvent(self *C.QDesktopWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDesktopWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDesktopWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDesktopWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDesktopWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDesktopWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_InputMethodQuery +func miqt_exec_callback_QDesktopWidget_InputMethodQuery(self *C.QDesktopWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDesktopWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDesktopWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDesktopWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDesktopWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDesktopWidget_FocusNextPrevChild +func miqt_exec_callback_QDesktopWidget_FocusNextPrevChild(self *C.QDesktopWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDesktopWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDesktopWidget) Delete() { - C.QDesktopWidget_Delete(this.h) + C.QDesktopWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdesktopwidget.h b/qt/gen_qdesktopwidget.h index 048ab1da..4e26f111 100644 --- a/qt/gen_qdesktopwidget.h +++ b/qt/gen_qdesktopwidget.h @@ -15,20 +15,72 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDesktopWidget; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDesktopWidget QDesktopWidget; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDesktopWidget* QDesktopWidget_new(); +void QDesktopWidget_new(QDesktopWidget** outptr_QDesktopWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDesktopWidget_MetaObject(const QDesktopWidget* self); void* QDesktopWidget_Metacast(QDesktopWidget* self, const char* param1); struct miqt_string QDesktopWidget_Tr(const char* s); @@ -54,6 +106,7 @@ void QDesktopWidget_ScreenCountChanged(QDesktopWidget* self, int param1); void QDesktopWidget_connect_ScreenCountChanged(QDesktopWidget* self, intptr_t slot); void QDesktopWidget_PrimaryScreenChanged(QDesktopWidget* self); void QDesktopWidget_connect_PrimaryScreenChanged(QDesktopWidget* self, intptr_t slot); +void QDesktopWidget_ResizeEvent(QDesktopWidget* self, QResizeEvent* e); struct miqt_string QDesktopWidget_Tr2(const char* s, const char* c); struct miqt_string QDesktopWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QDesktopWidget_TrUtf82(const char* s, const char* c); @@ -62,7 +115,89 @@ int QDesktopWidget_ScreenNumber1(const QDesktopWidget* self, QWidget* widget); QWidget* QDesktopWidget_Screen1(QDesktopWidget* self, int screen); QRect* QDesktopWidget_ScreenGeometry1(const QDesktopWidget* self, int screen); QRect* QDesktopWidget_AvailableGeometry1(const QDesktopWidget* self, int screen); -void QDesktopWidget_Delete(QDesktopWidget* self); +void QDesktopWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QDesktopWidget_override_virtual_DevType(void* self, intptr_t slot); +int QDesktopWidget_virtualbase_DevType(const void* self); +void QDesktopWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_SetVisible(void* self, bool visible); +void QDesktopWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDesktopWidget_virtualbase_SizeHint(const void* self); +void QDesktopWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDesktopWidget_virtualbase_MinimumSizeHint(const void* self); +void QDesktopWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDesktopWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QDesktopWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDesktopWidget_virtualbase_HasHeightForWidth(const void* self); +void QDesktopWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDesktopWidget_virtualbase_PaintEngine(const void* self); +void QDesktopWidget_override_virtual_Event(void* self, intptr_t slot); +bool QDesktopWidget_virtualbase_Event(void* self, QEvent* event); +void QDesktopWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDesktopWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDesktopWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDesktopWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDesktopWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDesktopWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDesktopWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDesktopWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDesktopWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDesktopWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QDesktopWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDesktopWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDesktopWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDesktopWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDesktopWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDesktopWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDesktopWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDesktopWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDesktopWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDesktopWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDesktopWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDesktopWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDesktopWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDesktopWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDesktopWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QDesktopWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QDesktopWidget_override_virtual_Metric(void* self, intptr_t slot); +int QDesktopWidget_virtualbase_Metric(const void* self, int param1); +void QDesktopWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDesktopWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDesktopWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QDesktopWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDesktopWidget_virtualbase_SharedPainter(const void* self); +void QDesktopWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDesktopWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDesktopWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDesktopWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QDesktopWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDesktopWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDesktopWidget_Delete(QDesktopWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdial.cpp b/qt/gen_qdial.cpp index 1accbdb4..79abe914 100644 --- a/qt/gen_qdial.cpp +++ b/qt/gen_qdial.cpp @@ -1,20 +1,358 @@ +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include "gen_qdial.h" #include "_cgo_export.h" -QDial* QDial_new(QWidget* parent) { - return new QDial(parent); +class MiqtVirtualQDial : public virtual QDial { +public: + + MiqtVirtualQDial(QWidget* parent): QDial(parent) {}; + MiqtVirtualQDial(): QDial() {}; + + virtual ~MiqtVirtualQDial() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDial::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDial_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDial::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDial::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDial_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDial::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QDial::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QDial_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QDial::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* re) override { + if (handle__ResizeEvent == 0) { + QDial::resizeEvent(re); + return; + } + + QResizeEvent* sigval1 = re; + + miqt_exec_callback_QDial_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* re) { + + QDial::resizeEvent(re); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* pe) override { + if (handle__PaintEvent == 0) { + QDial::paintEvent(pe); + return; + } + + QPaintEvent* sigval1 = pe; + + miqt_exec_callback_QDial_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* pe) { + + QDial::paintEvent(pe); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* me) override { + if (handle__MousePressEvent == 0) { + QDial::mousePressEvent(me); + return; + } + + QMouseEvent* sigval1 = me; + + miqt_exec_callback_QDial_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* me) { + + QDial::mousePressEvent(me); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* me) override { + if (handle__MouseReleaseEvent == 0) { + QDial::mouseReleaseEvent(me); + return; + } + + QMouseEvent* sigval1 = me; + + miqt_exec_callback_QDial_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* me) { + + QDial::mouseReleaseEvent(me); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* me) override { + if (handle__MouseMoveEvent == 0) { + QDial::mouseMoveEvent(me); + return; + } + + QMouseEvent* sigval1 = me; + + miqt_exec_callback_QDial_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* me) { + + QDial::mouseMoveEvent(me); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QDial::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QDial_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QDial::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QDial::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QDial_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QDial::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QDial::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QDial_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QDial::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QDial::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QDial_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QDial::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QDial::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QDial_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QDial::changeEvent(e); + + } + +}; + +void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDial* ret = new MiqtVirtualQDial(parent); + *outptr_QDial = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDial* QDial_new2() { - return new QDial(); +void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDial* ret = new MiqtVirtualQDial(); + *outptr_QDial = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDial_MetaObject(const QDial* self) { @@ -128,7 +466,115 @@ struct miqt_string QDial_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDial_Delete(QDial* self) { - delete self; +void QDial_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__SizeHint = slot; +} + +QSize* QDial_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDial*)(self) )->virtualbase_SizeHint(); +} + +void QDial_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDial_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDial*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDial_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__Event = slot; +} + +bool QDial_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQDial*)(self) )->virtualbase_Event(e); +} + +void QDial_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__ResizeEvent = slot; +} + +void QDial_virtualbase_ResizeEvent(void* self, QResizeEvent* re) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_ResizeEvent(re); +} + +void QDial_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__PaintEvent = slot; +} + +void QDial_virtualbase_PaintEvent(void* self, QPaintEvent* pe) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_PaintEvent(pe); +} + +void QDial_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MousePressEvent = slot; +} + +void QDial_virtualbase_MousePressEvent(void* self, QMouseEvent* me) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_MousePressEvent(me); +} + +void QDial_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDial_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* me) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_MouseReleaseEvent(me); +} + +void QDial_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDial_virtualbase_MouseMoveEvent(void* self, QMouseEvent* me) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_MouseMoveEvent(me); +} + +void QDial_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__SliderChange = slot; +} + +void QDial_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_SliderChange(change); +} + +void QDial_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__KeyPressEvent = slot; +} + +void QDial_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QDial_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__TimerEvent = slot; +} + +void QDial_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_TimerEvent(param1); +} + +void QDial_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__WheelEvent = slot; +} + +void QDial_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_WheelEvent(e); +} + +void QDial_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__ChangeEvent = slot; +} + +void QDial_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_ChangeEvent(e); +} + +void QDial_Delete(QDial* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdial.go b/qt/gen_qdial.go index ae532c7e..3a740e3f 100644 --- a/qt/gen_qdial.go +++ b/qt/gen_qdial.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QDial struct { - h *C.QDial + h *C.QDial + isSubclass bool *QAbstractSlider } @@ -32,27 +34,51 @@ func (this *QDial) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDial(h *C.QDial) *QDial { +// newQDial constructs the type using only CGO pointers. +func newQDial(h *C.QDial, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDial { if h == nil { return nil } - return &QDial{h: h, QAbstractSlider: UnsafeNewQAbstractSlider(unsafe.Pointer(h))} + return &QDial{h: h, + QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDial(h unsafe.Pointer) *QDial { - return newQDial((*C.QDial)(h)) +// UnsafeNewQDial constructs the type using only unsafe pointers. +func UnsafeNewQDial(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDial { + if h == nil { + return nil + } + + return &QDial{h: (*C.QDial)(h), + QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDial constructs a new QDial object. func NewQDial(parent *QWidget) *QDial { - ret := C.QDial_new(parent.cPointer()) - return newQDial(ret) + var outptr_QDial *C.QDial = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDial_new(parent.cPointer(), &outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDial2 constructs a new QDial object. func NewQDial2() *QDial { - ret := C.QDial_new2() - return newQDial(ret) + var outptr_QDial *C.QDial = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDial_new2(&outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDial) MetaObject() *QMetaObject { @@ -169,9 +195,314 @@ func QDial_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDial) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDial_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDial) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDial_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_SizeHint +func miqt_exec_callback_QDial_SizeHint(self *C.QDial, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDial{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDial) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDial_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDial) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDial_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MinimumSizeHint +func miqt_exec_callback_QDial_MinimumSizeHint(self *C.QDial, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDial{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDial) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QDial_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QDial) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QDial_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_Event +func miqt_exec_callback_QDial_Event(self *C.QDial, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QDial{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDial) callVirtualBase_ResizeEvent(re *QResizeEvent) { + + C.QDial_virtualbase_ResizeEvent(unsafe.Pointer(this.h), re.cPointer()) + +} +func (this *QDial) OnResizeEvent(slot func(super func(re *QResizeEvent), re *QResizeEvent)) { + C.QDial_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_ResizeEvent +func miqt_exec_callback_QDial_ResizeEvent(self *C.QDial, cb C.intptr_t, re *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(re *QResizeEvent), re *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(re), nil) + + gofunc((&QDial{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_PaintEvent(pe *QPaintEvent) { + + C.QDial_virtualbase_PaintEvent(unsafe.Pointer(this.h), pe.cPointer()) + +} +func (this *QDial) OnPaintEvent(slot func(super func(pe *QPaintEvent), pe *QPaintEvent)) { + C.QDial_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_PaintEvent +func miqt_exec_callback_QDial_PaintEvent(self *C.QDial, cb C.intptr_t, pe *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pe *QPaintEvent), pe *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(pe), nil) + + gofunc((&QDial{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_MousePressEvent(me *QMouseEvent) { + + C.QDial_virtualbase_MousePressEvent(unsafe.Pointer(this.h), me.cPointer()) + +} +func (this *QDial) OnMousePressEvent(slot func(super func(me *QMouseEvent), me *QMouseEvent)) { + C.QDial_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MousePressEvent +func miqt_exec_callback_QDial_MousePressEvent(self *C.QDial, cb C.intptr_t, me *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(me *QMouseEvent), me *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(me), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_MouseReleaseEvent(me *QMouseEvent) { + + C.QDial_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), me.cPointer()) + +} +func (this *QDial) OnMouseReleaseEvent(slot func(super func(me *QMouseEvent), me *QMouseEvent)) { + C.QDial_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MouseReleaseEvent +func miqt_exec_callback_QDial_MouseReleaseEvent(self *C.QDial, cb C.intptr_t, me *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(me *QMouseEvent), me *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(me), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_MouseMoveEvent(me *QMouseEvent) { + + C.QDial_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), me.cPointer()) + +} +func (this *QDial) OnMouseMoveEvent(slot func(super func(me *QMouseEvent), me *QMouseEvent)) { + C.QDial_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MouseMoveEvent +func miqt_exec_callback_QDial_MouseMoveEvent(self *C.QDial, cb C.intptr_t, me *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(me *QMouseEvent), me *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(me), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QDial_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QDial) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QDial_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_SliderChange +func miqt_exec_callback_QDial_SliderChange(self *C.QDial, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QDial{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QDial) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QDial_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QDial) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QDial_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_KeyPressEvent +func miqt_exec_callback_QDial_KeyPressEvent(self *C.QDial, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QDial_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDial) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QDial_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_TimerEvent +func miqt_exec_callback_QDial_TimerEvent(self *C.QDial, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDial{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QDial_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QDial) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QDial_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_WheelEvent +func miqt_exec_callback_QDial_WheelEvent(self *C.QDial, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QDial_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QDial) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QDial_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_ChangeEvent +func miqt_exec_callback_QDial_ChangeEvent(self *C.QDial, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QDial{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QDial) Delete() { - C.QDial_Delete(this.h) + C.QDial_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdial.h b/qt/gen_qdial.h index 12e663f5..002fa8f7 100644 --- a/qt/gen_qdial.h +++ b/qt/gen_qdial.h @@ -15,19 +15,39 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSlider; class QDial; +class QEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; class QSize; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSlider QAbstractSlider; typedef struct QDial QDial; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDial* QDial_new(QWidget* parent); -QDial* QDial_new2(); +void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDial_MetaObject(const QDial* self); void* QDial_Metacast(QDial* self, const char* param1); struct miqt_string QDial_Tr(const char* s); @@ -41,11 +61,44 @@ QSize* QDial_SizeHint(const QDial* self); QSize* QDial_MinimumSizeHint(const QDial* self); void QDial_SetNotchesVisible(QDial* self, bool visible); void QDial_SetWrapping(QDial* self, bool on); +bool QDial_Event(QDial* self, QEvent* e); +void QDial_ResizeEvent(QDial* self, QResizeEvent* re); +void QDial_PaintEvent(QDial* self, QPaintEvent* pe); +void QDial_MousePressEvent(QDial* self, QMouseEvent* me); +void QDial_MouseReleaseEvent(QDial* self, QMouseEvent* me); +void QDial_MouseMoveEvent(QDial* self, QMouseEvent* me); +void QDial_SliderChange(QDial* self, int change); struct miqt_string QDial_Tr2(const char* s, const char* c); struct miqt_string QDial_Tr3(const char* s, const char* c, int n); struct miqt_string QDial_TrUtf82(const char* s, const char* c); struct miqt_string QDial_TrUtf83(const char* s, const char* c, int n); -void QDial_Delete(QDial* self); +void QDial_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDial_virtualbase_SizeHint(const void* self); +void QDial_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDial_virtualbase_MinimumSizeHint(const void* self); +void QDial_override_virtual_Event(void* self, intptr_t slot); +bool QDial_virtualbase_Event(void* self, QEvent* e); +void QDial_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDial_virtualbase_ResizeEvent(void* self, QResizeEvent* re); +void QDial_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDial_virtualbase_PaintEvent(void* self, QPaintEvent* pe); +void QDial_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDial_virtualbase_MousePressEvent(void* self, QMouseEvent* me); +void QDial_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDial_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* me); +void QDial_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDial_virtualbase_MouseMoveEvent(void* self, QMouseEvent* me); +void QDial_override_virtual_SliderChange(void* self, intptr_t slot); +void QDial_virtualbase_SliderChange(void* self, int change); +void QDial_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDial_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QDial_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDial_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QDial_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDial_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QDial_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDial_virtualbase_ChangeEvent(void* self, QEvent* e); +void QDial_Delete(QDial* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdialog.cpp b/qt/gen_qdialog.cpp index 9b0b675b..1101dabc 100644 --- a/qt/gen_qdialog.cpp +++ b/qt/gen_qdialog.cpp @@ -1,24 +1,1187 @@ +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qdialog.h" #include "_cgo_export.h" -QDialog* QDialog_new(QWidget* parent) { - return new QDialog(parent); +class MiqtVirtualQDialog : public virtual QDialog { +public: + + MiqtVirtualQDialog(QWidget* parent): QDialog(parent) {}; + MiqtVirtualQDialog(): QDialog() {}; + MiqtVirtualQDialog(QWidget* parent, Qt::WindowFlags f): QDialog(parent, f) {}; + + virtual ~MiqtVirtualQDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QDialog::open(); + return; + } + + + miqt_exec_callback_QDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QDialog::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QDialog::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QDialog::accept(); + return; + } + + + miqt_exec_callback_QDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QDialog::reject(); + return; + } + + + miqt_exec_callback_QDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QDialog::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDialog::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDialog_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDialog::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDialog::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDialog_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDialog::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDialog::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDialog_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDialog::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDialog::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDialog_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDialog::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDialog::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDialog_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDialog::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDialog::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDialog::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDialog::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDialog::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDialog::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDialog::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDialog::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDialog::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDialog::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDialog_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDialog::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDialog::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDialog_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDialog::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDialog::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialog_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDialog::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDialog::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialog_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDialog::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QDialog::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialog_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QDialog::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDialog::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialog_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDialog::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDialog::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDialog_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDialog::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDialog::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDialog::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDialog::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDialog_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDialog::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDialog::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDialog_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDialog::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDialog::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDialog::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDialog::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDialog::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDialog::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDialog::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDialog::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDialog::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDialog::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDialog_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDialog::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QDialog::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QDialog_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDialog::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QDialog::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QDialog::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDialog::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDialog_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDialog::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDialog::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDialog_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDialog::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDialog::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDialog_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDialog::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDialog::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDialog_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDialog::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDialog::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDialog::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDialog::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDialog_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDialog::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDialog::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDialog_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDialog::focusNextPrevChild(next); + + } + +}; + +void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent); + *outptr_QDialog = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialog* QDialog_new2() { - return new QDialog(); +void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(); + *outptr_QDialog = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialog* QDialog_new3(QWidget* parent, int f) { - return new QDialog(parent, static_cast(f)); +void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent, static_cast(f)); + *outptr_QDialog = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDialog_MetaObject(const QDialog* self) { @@ -105,7 +1268,7 @@ void QDialog_Finished(QDialog* self, int result) { } void QDialog_connect_Finished(QDialog* self, intptr_t slot) { - QDialog::connect(self, static_cast(&QDialog::finished), self, [=](int result) { + MiqtVirtualQDialog::connect(self, static_cast(&QDialog::finished), self, [=](int result) { int sigval1 = result; miqt_exec_callback_QDialog_Finished(slot, sigval1); }); @@ -116,7 +1279,7 @@ void QDialog_Accepted(QDialog* self) { } void QDialog_connect_Accepted(QDialog* self, intptr_t slot) { - QDialog::connect(self, static_cast(&QDialog::accepted), self, [=]() { + MiqtVirtualQDialog::connect(self, static_cast(&QDialog::accepted), self, [=]() { miqt_exec_callback_QDialog_Accepted(slot); }); } @@ -126,7 +1289,7 @@ void QDialog_Rejected(QDialog* self) { } void QDialog_connect_Rejected(QDialog* self, intptr_t slot) { - QDialog::connect(self, static_cast(&QDialog::rejected), self, [=]() { + MiqtVirtualQDialog::connect(self, static_cast(&QDialog::rejected), self, [=]() { miqt_exec_callback_QDialog_Rejected(slot); }); } @@ -199,7 +1362,387 @@ struct miqt_string QDialog_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDialog_Delete(QDialog* self) { - delete self; +void QDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__SetVisible = slot; +} + +void QDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_SizeHint(); +} + +void QDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Open = slot; +} + +void QDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Open(); +} + +void QDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Exec = slot; +} + +int QDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_Exec(); +} + +void QDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Done = slot; +} + +void QDialog_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Done(param1); +} + +void QDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Accept = slot; +} + +void QDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Accept(); +} + +void QDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Reject = slot; +} + +void QDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Reject(); +} + +void QDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__CloseEvent = slot; +} + +void QDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ShowEvent = slot; +} + +void QDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__EventFilter = slot; +} + +bool QDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QDialog_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DevType = slot; +} + +int QDialog_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_DevType(); +} + +void QDialog_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__HeightForWidth = slot; +} + +int QDialog_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDialog_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDialog_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDialog_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDialog_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_PaintEngine(); +} + +void QDialog_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Event = slot; +} + +bool QDialog_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_Event(event); +} + +void QDialog_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MousePressEvent = slot; +} + +void QDialog_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDialog_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDialog_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDialog_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDialog_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDialog_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDialog_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDialog_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__WheelEvent = slot; +} + +void QDialog_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_WheelEvent(event); +} + +void QDialog_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDialog_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDialog_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__FocusInEvent = slot; +} + +void QDialog_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDialog_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__FocusOutEvent = slot; +} + +void QDialog_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDialog_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__EnterEvent = slot; +} + +void QDialog_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_EnterEvent(event); +} + +void QDialog_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__LeaveEvent = slot; +} + +void QDialog_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDialog_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__PaintEvent = slot; +} + +void QDialog_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_PaintEvent(event); +} + +void QDialog_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MoveEvent = slot; +} + +void QDialog_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MoveEvent(event); +} + +void QDialog_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__TabletEvent = slot; +} + +void QDialog_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_TabletEvent(event); +} + +void QDialog_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ActionEvent = slot; +} + +void QDialog_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ActionEvent(event); +} + +void QDialog_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DragEnterEvent = slot; +} + +void QDialog_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDialog_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DragMoveEvent = slot; +} + +void QDialog_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDialog_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDialog_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDialog_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DropEvent = slot; +} + +void QDialog_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DropEvent(event); +} + +void QDialog_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__HideEvent = slot; +} + +void QDialog_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_HideEvent(event); +} + +void QDialog_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__NativeEvent = slot; +} + +bool QDialog_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QDialog_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QDialog_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Metric = slot; +} + +int QDialog_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_Metric(param1); +} + +void QDialog_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__InitPainter = slot; +} + +void QDialog_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDialog*)(self) )->virtualbase_InitPainter(painter); +} + +void QDialog_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDialog_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_Redirected(offset); +} + +void QDialog_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDialog_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_SharedPainter(); +} + +void QDialog_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__InputMethodEvent = slot; +} + +void QDialog_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDialog_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDialog_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDialog_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDialog_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDialog_Delete(QDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdialog.go b/qt/gen_qdialog.go index e4b2e5d8..66dc6957 100644 --- a/qt/gen_qdialog.go +++ b/qt/gen_qdialog.go @@ -22,7 +22,8 @@ const ( ) type QDialog struct { - h *C.QDialog + h *C.QDialog + isSubclass bool *QWidget } @@ -40,33 +41,62 @@ func (this *QDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDialog(h *C.QDialog) *QDialog { +// newQDialog constructs the type using only CGO pointers. +func newQDialog(h *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialog { if h == nil { return nil } - return &QDialog{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDialog{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDialog(h unsafe.Pointer) *QDialog { - return newQDialog((*C.QDialog)(h)) +// UnsafeNewQDialog constructs the type using only unsafe pointers. +func UnsafeNewQDialog(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialog { + if h == nil { + return nil + } + + return &QDialog{h: (*C.QDialog)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDialog constructs a new QDialog object. func NewQDialog(parent *QWidget) *QDialog { - ret := C.QDialog_new(parent.cPointer()) - return newQDialog(ret) + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialog_new(parent.cPointer(), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialog2 constructs a new QDialog object. func NewQDialog2() *QDialog { - ret := C.QDialog_new2() - return newQDialog(ret) + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialog_new2(&outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialog3 constructs a new QDialog object. func NewQDialog3(parent *QWidget, f WindowType) *QDialog { - ret := C.QDialog_new3(parent.cPointer(), (C.int)(f)) - return newQDialog(ret) + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialog_new3(parent.cPointer(), (C.int)(f), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDialog) MetaObject() *QMetaObject { @@ -118,7 +148,7 @@ func (this *QDialog) SetExtension(extension *QWidget) { } func (this *QDialog) Extension() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDialog_Extension(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDialog_Extension(this.h)), nil, nil) } func (this *QDialog) SizeHint() *QSize { @@ -273,9 +303,1106 @@ func QDialog_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDialog) callVirtualBase_SetVisible(visible bool) { + + C.QDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_SetVisible +func miqt_exec_callback_QDialog_SetVisible(self *C.QDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_SizeHint +func miqt_exec_callback_QDialog_SizeHint(self *C.QDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MinimumSizeHint +func miqt_exec_callback_QDialog_MinimumSizeHint(self *C.QDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_Open() { + + C.QDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QDialog) OnOpen(slot func(super func())) { + C.QDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Open +func miqt_exec_callback_QDialog_Open(self *C.QDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QDialog) callVirtualBase_Exec() int { + + return (int)(C.QDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QDialog) OnExec(slot func(super func() int) int) { + C.QDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Exec +func miqt_exec_callback_QDialog_Exec(self *C.QDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_Done(param1 int) { + + C.QDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QDialog) OnDone(slot func(super func(param1 int), param1 int)) { + C.QDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Done +func miqt_exec_callback_QDialog_Done(self *C.QDialog, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QDialog) callVirtualBase_Accept() { + + C.QDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QDialog) OnAccept(slot func(super func())) { + C.QDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Accept +func miqt_exec_callback_QDialog_Accept(self *C.QDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QDialog) callVirtualBase_Reject() { + + C.QDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QDialog) OnReject(slot func(super func())) { + C.QDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Reject +func miqt_exec_callback_QDialog_Reject(self *C.QDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_KeyPressEvent +func miqt_exec_callback_QDialog_KeyPressEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_CloseEvent +func miqt_exec_callback_QDialog_CloseEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ShowEvent +func miqt_exec_callback_QDialog_ShowEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ResizeEvent +func miqt_exec_callback_QDialog_ResizeEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ContextMenuEvent +func miqt_exec_callback_QDialog_ContextMenuEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_EventFilter +func miqt_exec_callback_QDialog_EventFilter(self *C.QDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_DevType() int { + + return (int)(C.QDialog_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDialog) OnDevType(slot func(super func() int) int) { + C.QDialog_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DevType +func miqt_exec_callback_QDialog_DevType(self *C.QDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDialog_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialog) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDialog_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_HeightForWidth +func miqt_exec_callback_QDialog_HeightForWidth(self *C.QDialog, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDialog_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDialog) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDialog_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_HasHeightForWidth +func miqt_exec_callback_QDialog_HasHeightForWidth(self *C.QDialog, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDialog_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDialog) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDialog_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_PaintEngine +func miqt_exec_callback_QDialog_PaintEngine(self *C.QDialog, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDialog_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDialog) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDialog_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Event +func miqt_exec_callback_QDialog_Event(self *C.QDialog, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MousePressEvent +func miqt_exec_callback_QDialog_MousePressEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MouseReleaseEvent +func miqt_exec_callback_QDialog_MouseReleaseEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MouseDoubleClickEvent +func miqt_exec_callback_QDialog_MouseDoubleClickEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MouseMoveEvent +func miqt_exec_callback_QDialog_MouseMoveEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDialog_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDialog_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_WheelEvent +func miqt_exec_callback_QDialog_WheelEvent(self *C.QDialog, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDialog_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDialog_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_KeyReleaseEvent +func miqt_exec_callback_QDialog_KeyReleaseEvent(self *C.QDialog, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDialog_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialog_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_FocusInEvent +func miqt_exec_callback_QDialog_FocusInEvent(self *C.QDialog, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDialog_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialog_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_FocusOutEvent +func miqt_exec_callback_QDialog_FocusOutEvent(self *C.QDialog, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_EnterEvent(event *QEvent) { + + C.QDialog_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialog_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_EnterEvent +func miqt_exec_callback_QDialog_EnterEvent(self *C.QDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialog{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDialog_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialog_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_LeaveEvent +func miqt_exec_callback_QDialog_LeaveEvent(self *C.QDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialog{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDialog_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDialog_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_PaintEvent +func miqt_exec_callback_QDialog_PaintEvent(self *C.QDialog, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDialog_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDialog_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MoveEvent +func miqt_exec_callback_QDialog_MoveEvent(self *C.QDialog, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDialog_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDialog_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_TabletEvent +func miqt_exec_callback_QDialog_TabletEvent(self *C.QDialog, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDialog_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDialog_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ActionEvent +func miqt_exec_callback_QDialog_ActionEvent(self *C.QDialog, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDialog_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDialog_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DragEnterEvent +func miqt_exec_callback_QDialog_DragEnterEvent(self *C.QDialog, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDialog_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDialog_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DragMoveEvent +func miqt_exec_callback_QDialog_DragMoveEvent(self *C.QDialog, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDialog_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDialog_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DragLeaveEvent +func miqt_exec_callback_QDialog_DragLeaveEvent(self *C.QDialog, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDialog_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDialog_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DropEvent +func miqt_exec_callback_QDialog_DropEvent(self *C.QDialog, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDialog_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDialog_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_HideEvent +func miqt_exec_callback_QDialog_HideEvent(self *C.QDialog, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDialog_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QDialog) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QDialog_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_NativeEvent +func miqt_exec_callback_QDialog_NativeEvent(self *C.QDialog, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ChangeEvent +func miqt_exec_callback_QDialog_ChangeEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDialog_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialog) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDialog_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Metric +func miqt_exec_callback_QDialog_Metric(self *C.QDialog, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDialog_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDialog) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDialog_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_InitPainter +func miqt_exec_callback_QDialog_InitPainter(self *C.QDialog, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDialog{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDialog) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDialog_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDialog) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDialog_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Redirected +func miqt_exec_callback_QDialog_Redirected(self *C.QDialog, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDialog_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDialog) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDialog_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_SharedPainter +func miqt_exec_callback_QDialog_SharedPainter(self *C.QDialog, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDialog_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDialog_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_InputMethodEvent +func miqt_exec_callback_QDialog_InputMethodEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDialog_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialog) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDialog_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_InputMethodQuery +func miqt_exec_callback_QDialog_InputMethodQuery(self *C.QDialog, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDialog_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDialog) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDialog_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_FocusNextPrevChild +func miqt_exec_callback_QDialog_FocusNextPrevChild(self *C.QDialog, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDialog) Delete() { - C.QDialog_Delete(this.h) + C.QDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdialog.h b/qt/gen_qdialog.h index c368df75..2c2a6eb8 100644 --- a/qt/gen_qdialog.h +++ b/qt/gen_qdialog.h @@ -15,20 +15,72 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDialog; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDialog* QDialog_new(QWidget* parent); -QDialog* QDialog_new2(); -QDialog* QDialog_new3(QWidget* parent, int f); +void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDialog_MetaObject(const QDialog* self); void* QDialog_Metacast(QDialog* self, const char* param1); struct miqt_string QDialog_Tr(const char* s); @@ -57,11 +109,111 @@ void QDialog_Done(QDialog* self, int param1); void QDialog_Accept(QDialog* self); void QDialog_Reject(QDialog* self); void QDialog_ShowExtension(QDialog* self, bool param1); +void QDialog_KeyPressEvent(QDialog* self, QKeyEvent* param1); +void QDialog_CloseEvent(QDialog* self, QCloseEvent* param1); +void QDialog_ShowEvent(QDialog* self, QShowEvent* param1); +void QDialog_ResizeEvent(QDialog* self, QResizeEvent* param1); +void QDialog_ContextMenuEvent(QDialog* self, QContextMenuEvent* param1); +bool QDialog_EventFilter(QDialog* self, QObject* param1, QEvent* param2); struct miqt_string QDialog_Tr2(const char* s, const char* c); struct miqt_string QDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QDialog_TrUtf82(const char* s, const char* c); struct miqt_string QDialog_TrUtf83(const char* s, const char* c, int n); -void QDialog_Delete(QDialog* self); +void QDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QDialog_virtualbase_SetVisible(void* self, bool visible); +void QDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDialog_virtualbase_SizeHint(const void* self); +void QDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDialog_virtualbase_MinimumSizeHint(const void* self); +void QDialog_override_virtual_Open(void* self, intptr_t slot); +void QDialog_virtualbase_Open(void* self); +void QDialog_override_virtual_Exec(void* self, intptr_t slot); +int QDialog_virtualbase_Exec(void* self); +void QDialog_override_virtual_Done(void* self, intptr_t slot); +void QDialog_virtualbase_Done(void* self, int param1); +void QDialog_override_virtual_Accept(void* self, intptr_t slot); +void QDialog_virtualbase_Accept(void* self); +void QDialog_override_virtual_Reject(void* self, intptr_t slot); +void QDialog_virtualbase_Reject(void* self); +void QDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QDialog_override_virtual_DevType(void* self, intptr_t slot); +int QDialog_virtualbase_DevType(const void* self); +void QDialog_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDialog_virtualbase_HeightForWidth(const void* self, int param1); +void QDialog_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDialog_virtualbase_HasHeightForWidth(const void* self); +void QDialog_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDialog_virtualbase_PaintEngine(const void* self); +void QDialog_override_virtual_Event(void* self, intptr_t slot); +bool QDialog_virtualbase_Event(void* self, QEvent* event); +void QDialog_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDialog_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDialog_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDialog_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDialog_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDialog_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDialog_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDialog_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDialog_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDialog_virtualbase_EnterEvent(void* self, QEvent* event); +void QDialog_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDialog_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDialog_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDialog_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDialog_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDialog_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDialog_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDialog_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDialog_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDialog_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDialog_override_virtual_DropEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDialog_override_virtual_HideEvent(void* self, intptr_t slot); +void QDialog_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDialog_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDialog_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QDialog_override_virtual_Metric(void* self, intptr_t slot); +int QDialog_virtualbase_Metric(const void* self, int param1); +void QDialog_override_virtual_InitPainter(void* self, intptr_t slot); +void QDialog_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDialog_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDialog_virtualbase_Redirected(const void* self, QPoint* offset); +void QDialog_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDialog_virtualbase_SharedPainter(const void* self); +void QDialog_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDialog_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDialog_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDialog_virtualbase_InputMethodQuery(const void* self, int param1); +void QDialog_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDialog_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDialog_Delete(QDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdialogbuttonbox.cpp b/qt/gen_qdialogbuttonbox.cpp index 038f420a..8205ea81 100644 --- a/qt/gen_qdialogbuttonbox.cpp +++ b/qt/gen_qdialogbuttonbox.cpp @@ -1,46 +1,1096 @@ #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qdialogbuttonbox.h" #include "_cgo_export.h" -QDialogButtonBox* QDialogButtonBox_new(QWidget* parent) { - return new QDialogButtonBox(parent); +class MiqtVirtualQDialogButtonBox : public virtual QDialogButtonBox { +public: + + MiqtVirtualQDialogButtonBox(QWidget* parent): QDialogButtonBox(parent) {}; + MiqtVirtualQDialogButtonBox(): QDialogButtonBox() {}; + MiqtVirtualQDialogButtonBox(Qt::Orientation orientation): QDialogButtonBox(orientation) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons): QDialogButtonBox(buttons) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation): QDialogButtonBox(buttons, orientation) {}; + MiqtVirtualQDialogButtonBox(Qt::Orientation orientation, QWidget* parent): QDialogButtonBox(orientation, parent) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons, QWidget* parent): QDialogButtonBox(buttons, parent) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation, QWidget* parent): QDialogButtonBox(buttons, orientation, parent) {}; + + virtual ~MiqtVirtualQDialogButtonBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDialogButtonBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDialogButtonBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDialogButtonBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDialogButtonBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDialogButtonBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDialogButtonBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDialogButtonBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDialogButtonBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDialogButtonBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDialogButtonBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDialogButtonBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialogButtonBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDialogButtonBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDialogButtonBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialogButtonBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDialogButtonBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDialogButtonBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDialogButtonBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDialogButtonBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDialogButtonBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDialogButtonBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDialogButtonBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDialogButtonBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDialogButtonBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDialogButtonBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDialogButtonBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDialogButtonBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDialogButtonBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDialogButtonBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDialogButtonBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDialogButtonBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDialogButtonBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDialogButtonBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDialogButtonBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDialogButtonBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDialogButtonBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDialogButtonBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDialogButtonBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDialogButtonBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDialogButtonBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDialogButtonBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDialogButtonBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QDialogButtonBox::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QDialogButtonBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDialogButtonBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDialogButtonBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDialogButtonBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDialogButtonBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDialogButtonBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDialogButtonBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDialogButtonBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDialogButtonBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDialogButtonBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDialogButtonBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDialogButtonBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDialogButtonBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDialogButtonBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDialogButtonBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDialogButtonBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDialogButtonBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDialogButtonBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDialogButtonBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDialogButtonBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDialogButtonBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDialogButtonBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDialogButtonBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDialogButtonBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDialogButtonBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDialogButtonBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDialogButtonBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDialogButtonBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDialogButtonBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QDialogButtonBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDialogButtonBox::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDialogButtonBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDialogButtonBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDialogButtonBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDialogButtonBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDialogButtonBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDialogButtonBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDialogButtonBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDialogButtonBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDialogButtonBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDialogButtonBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDialogButtonBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDialogButtonBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDialogButtonBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDialogButtonBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDialogButtonBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDialogButtonBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDialogButtonBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDialogButtonBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDialogButtonBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDialogButtonBox::focusNextPrevChild(next); + + } + +}; + +void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new2() { - return new QDialogButtonBox(); +void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new3(int orientation) { - return new QDialogButtonBox(static_cast(orientation)); +void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation)); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new4(int buttons) { - return new QDialogButtonBox(static_cast(buttons)); +void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons)); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation) { - return new QDialogButtonBox(static_cast(buttons), static_cast(orientation)); +void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation)); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent) { - return new QDialogButtonBox(static_cast(orientation), parent); +void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation), parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent) { - return new QDialogButtonBox(static_cast(buttons), parent); +void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent) { - return new QDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); +void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self) { @@ -152,7 +1202,7 @@ void QDialogButtonBox_Clicked(QDialogButtonBox* self, QAbstractButton* button) { } void QDialogButtonBox_connect_Clicked(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::clicked), self, [=](QAbstractButton* button) { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::clicked), self, [=](QAbstractButton* button) { QAbstractButton* sigval1 = button; miqt_exec_callback_QDialogButtonBox_Clicked(slot, sigval1); }); @@ -163,7 +1213,7 @@ void QDialogButtonBox_Accepted(QDialogButtonBox* self) { } void QDialogButtonBox_connect_Accepted(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::accepted), self, [=]() { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::accepted), self, [=]() { miqt_exec_callback_QDialogButtonBox_Accepted(slot); }); } @@ -173,7 +1223,7 @@ void QDialogButtonBox_HelpRequested(QDialogButtonBox* self) { } void QDialogButtonBox_connect_HelpRequested(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::helpRequested), self, [=]() { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::helpRequested), self, [=]() { miqt_exec_callback_QDialogButtonBox_HelpRequested(slot); }); } @@ -183,7 +1233,7 @@ void QDialogButtonBox_Rejected(QDialogButtonBox* self) { } void QDialogButtonBox_connect_Rejected(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::rejected), self, [=]() { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::rejected), self, [=]() { miqt_exec_callback_QDialogButtonBox_Rejected(slot); }); } @@ -232,7 +1282,339 @@ struct miqt_string QDialogButtonBox_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QDialogButtonBox_Delete(QDialogButtonBox* self) { - delete self; +void QDialogButtonBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ChangeEvent = slot; +} + +void QDialogButtonBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDialogButtonBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__Event = slot; +} + +bool QDialogButtonBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_Event(event); +} + +void QDialogButtonBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DevType = slot; +} + +int QDialogButtonBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DevType(); +} + +void QDialogButtonBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__SetVisible = slot; +} + +void QDialogButtonBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QDialogButtonBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QDialogButtonBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_SizeHint(); +} + +void QDialogButtonBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDialogButtonBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDialogButtonBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__HeightForWidth = slot; +} + +int QDialogButtonBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDialogButtonBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDialogButtonBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDialogButtonBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDialogButtonBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_PaintEngine(); +} + +void QDialogButtonBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MousePressEvent = slot; +} + +void QDialogButtonBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDialogButtonBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDialogButtonBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDialogButtonBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDialogButtonBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDialogButtonBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDialogButtonBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDialogButtonBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__WheelEvent = slot; +} + +void QDialogButtonBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QDialogButtonBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QDialogButtonBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDialogButtonBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDialogButtonBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDialogButtonBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__FocusInEvent = slot; +} + +void QDialogButtonBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDialogButtonBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QDialogButtonBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDialogButtonBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__EnterEvent = slot; +} + +void QDialogButtonBox_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QDialogButtonBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__LeaveEvent = slot; +} + +void QDialogButtonBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDialogButtonBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__PaintEvent = slot; +} + +void QDialogButtonBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QDialogButtonBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MoveEvent = slot; +} + +void QDialogButtonBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QDialogButtonBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ResizeEvent = slot; +} + +void QDialogButtonBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDialogButtonBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__CloseEvent = slot; +} + +void QDialogButtonBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QDialogButtonBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDialogButtonBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDialogButtonBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__TabletEvent = slot; +} + +void QDialogButtonBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QDialogButtonBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ActionEvent = slot; +} + +void QDialogButtonBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QDialogButtonBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QDialogButtonBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDialogButtonBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QDialogButtonBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDialogButtonBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDialogButtonBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDialogButtonBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DropEvent = slot; +} + +void QDialogButtonBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DropEvent(event); +} + +void QDialogButtonBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ShowEvent = slot; +} + +void QDialogButtonBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QDialogButtonBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__HideEvent = slot; +} + +void QDialogButtonBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_HideEvent(event); +} + +void QDialogButtonBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__NativeEvent = slot; +} + +bool QDialogButtonBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDialogButtonBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__Metric = slot; +} + +int QDialogButtonBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_Metric(param1); +} + +void QDialogButtonBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__InitPainter = slot; +} + +void QDialogButtonBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QDialogButtonBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDialogButtonBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_Redirected(offset); +} + +void QDialogButtonBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDialogButtonBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_SharedPainter(); +} + +void QDialogButtonBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QDialogButtonBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDialogButtonBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDialogButtonBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDialogButtonBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDialogButtonBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDialogButtonBox_Delete(QDialogButtonBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdialogbuttonbox.go b/qt/gen_qdialogbuttonbox.go index fa55e1fa..f2c3aaa6 100644 --- a/qt/gen_qdialogbuttonbox.go +++ b/qt/gen_qdialogbuttonbox.go @@ -67,7 +67,8 @@ const ( ) type QDialogButtonBox struct { - h *C.QDialogButtonBox + h *C.QDialogButtonBox + isSubclass bool *QWidget } @@ -85,63 +86,127 @@ func (this *QDialogButtonBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDialogButtonBox(h *C.QDialogButtonBox) *QDialogButtonBox { +// newQDialogButtonBox constructs the type using only CGO pointers. +func newQDialogButtonBox(h *C.QDialogButtonBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialogButtonBox { if h == nil { return nil } - return &QDialogButtonBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDialogButtonBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDialogButtonBox(h unsafe.Pointer) *QDialogButtonBox { - return newQDialogButtonBox((*C.QDialogButtonBox)(h)) +// UnsafeNewQDialogButtonBox constructs the type using only unsafe pointers. +func UnsafeNewQDialogButtonBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialogButtonBox { + if h == nil { + return nil + } + + return &QDialogButtonBox{h: (*C.QDialogButtonBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDialogButtonBox constructs a new QDialogButtonBox object. func NewQDialogButtonBox(parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new(parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new(parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox2 constructs a new QDialogButtonBox object. func NewQDialogButtonBox2() *QDialogButtonBox { - ret := C.QDialogButtonBox_new2() - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new2(&outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox3 constructs a new QDialogButtonBox object. func NewQDialogButtonBox3(orientation Orientation) *QDialogButtonBox { - ret := C.QDialogButtonBox_new3((C.int)(orientation)) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new3((C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox4 constructs a new QDialogButtonBox object. func NewQDialogButtonBox4(buttons QDialogButtonBox__StandardButton) *QDialogButtonBox { - ret := C.QDialogButtonBox_new4((C.int)(buttons)) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new4((C.int)(buttons), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox5 constructs a new QDialogButtonBox object. func NewQDialogButtonBox5(buttons QDialogButtonBox__StandardButton, orientation Orientation) *QDialogButtonBox { - ret := C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation)) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox6 constructs a new QDialogButtonBox object. func NewQDialogButtonBox6(orientation Orientation, parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox7 constructs a new QDialogButtonBox object. func NewQDialogButtonBox7(buttons QDialogButtonBox__StandardButton, parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox8 constructs a new QDialogButtonBox object. func NewQDialogButtonBox8(buttons QDialogButtonBox__StandardButton, orientation Orientation, parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDialogButtonBox) MetaObject() *QMetaObject { @@ -189,11 +254,11 @@ func (this *QDialogButtonBox) AddButton2(text string, role QDialogButtonBox__But text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role))), nil, nil, nil, nil) } func (this *QDialogButtonBox) AddButtonWithButton(button QDialogButtonBox__StandardButton) *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button))), nil, nil, nil, nil) } func (this *QDialogButtonBox) RemoveButton(button *QAbstractButton) { @@ -209,7 +274,7 @@ func (this *QDialogButtonBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } @@ -231,7 +296,7 @@ func (this *QDialogButtonBox) StandardButton(button *QAbstractButton) QDialogBut } func (this *QDialogButtonBox) Button(which QDialogButtonBox__StandardButton) *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_Button(this.h, (C.int)(which)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_Button(this.h, (C.int)(which))), nil, nil, nil, nil) } func (this *QDialogButtonBox) SetCenterButtons(center bool) { @@ -257,7 +322,7 @@ func miqt_exec_callback_QDialogButtonBox_Clicked(cb C.intptr_t, button *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button), nil, nil, nil) gofunc(slotval1) } @@ -357,9 +422,975 @@ func QDialogButtonBox_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDialogButtonBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDialogButtonBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialogButtonBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ChangeEvent +func miqt_exec_callback_QDialogButtonBox_ChangeEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDialogButtonBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDialogButtonBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDialogButtonBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_Event +func miqt_exec_callback_QDialogButtonBox_Event(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_DevType() int { + + return (int)(C.QDialogButtonBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDialogButtonBox) OnDevType(slot func(super func() int) int) { + C.QDialogButtonBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DevType +func miqt_exec_callback_QDialogButtonBox_DevType(self *C.QDialogButtonBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_SetVisible(visible bool) { + + C.QDialogButtonBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDialogButtonBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDialogButtonBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_SetVisible +func miqt_exec_callback_QDialogButtonBox_SetVisible(self *C.QDialogButtonBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDialogButtonBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialogButtonBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialogButtonBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_SizeHint +func miqt_exec_callback_QDialogButtonBox_SizeHint(self *C.QDialogButtonBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDialogButtonBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialogButtonBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialogButtonBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MinimumSizeHint +func miqt_exec_callback_QDialogButtonBox_MinimumSizeHint(self *C.QDialogButtonBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDialogButtonBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialogButtonBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDialogButtonBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_HeightForWidth +func miqt_exec_callback_QDialogButtonBox_HeightForWidth(self *C.QDialogButtonBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDialogButtonBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDialogButtonBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDialogButtonBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_HasHeightForWidth +func miqt_exec_callback_QDialogButtonBox_HasHeightForWidth(self *C.QDialogButtonBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDialogButtonBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDialogButtonBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDialogButtonBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_PaintEngine +func miqt_exec_callback_QDialogButtonBox_PaintEngine(self *C.QDialogButtonBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MousePressEvent +func miqt_exec_callback_QDialogButtonBox_MousePressEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent +func miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent +func miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MouseMoveEvent +func miqt_exec_callback_QDialogButtonBox_MouseMoveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDialogButtonBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDialogButtonBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_WheelEvent +func miqt_exec_callback_QDialogButtonBox_WheelEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDialogButtonBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDialogButtonBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_KeyPressEvent +func miqt_exec_callback_QDialogButtonBox_KeyPressEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDialogButtonBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDialogButtonBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent +func miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDialogButtonBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialogButtonBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_FocusInEvent +func miqt_exec_callback_QDialogButtonBox_FocusInEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDialogButtonBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialogButtonBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_FocusOutEvent +func miqt_exec_callback_QDialogButtonBox_FocusOutEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_EnterEvent(event *QEvent) { + + C.QDialogButtonBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialogButtonBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_EnterEvent +func miqt_exec_callback_QDialogButtonBox_EnterEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDialogButtonBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialogButtonBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_LeaveEvent +func miqt_exec_callback_QDialogButtonBox_LeaveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDialogButtonBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDialogButtonBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_PaintEvent +func miqt_exec_callback_QDialogButtonBox_PaintEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDialogButtonBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDialogButtonBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MoveEvent +func miqt_exec_callback_QDialogButtonBox_MoveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDialogButtonBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDialogButtonBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ResizeEvent +func miqt_exec_callback_QDialogButtonBox_ResizeEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDialogButtonBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDialogButtonBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_CloseEvent +func miqt_exec_callback_QDialogButtonBox_CloseEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDialogButtonBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDialogButtonBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ContextMenuEvent +func miqt_exec_callback_QDialogButtonBox_ContextMenuEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDialogButtonBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDialogButtonBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_TabletEvent +func miqt_exec_callback_QDialogButtonBox_TabletEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDialogButtonBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDialogButtonBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ActionEvent +func miqt_exec_callback_QDialogButtonBox_ActionEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDialogButtonBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDialogButtonBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DragEnterEvent +func miqt_exec_callback_QDialogButtonBox_DragEnterEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDialogButtonBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDialogButtonBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DragMoveEvent +func miqt_exec_callback_QDialogButtonBox_DragMoveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDialogButtonBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDialogButtonBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DragLeaveEvent +func miqt_exec_callback_QDialogButtonBox_DragLeaveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDialogButtonBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDialogButtonBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DropEvent +func miqt_exec_callback_QDialogButtonBox_DropEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDialogButtonBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDialogButtonBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ShowEvent +func miqt_exec_callback_QDialogButtonBox_ShowEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDialogButtonBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDialogButtonBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_HideEvent +func miqt_exec_callback_QDialogButtonBox_HideEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDialogButtonBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QDialogButtonBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QDialogButtonBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_NativeEvent +func miqt_exec_callback_QDialogButtonBox_NativeEvent(self *C.QDialogButtonBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDialogButtonBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialogButtonBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDialogButtonBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_Metric +func miqt_exec_callback_QDialogButtonBox_Metric(self *C.QDialogButtonBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDialogButtonBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDialogButtonBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDialogButtonBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_InitPainter +func miqt_exec_callback_QDialogButtonBox_InitPainter(self *C.QDialogButtonBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDialogButtonBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDialogButtonBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDialogButtonBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_Redirected +func miqt_exec_callback_QDialogButtonBox_Redirected(self *C.QDialogButtonBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDialogButtonBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDialogButtonBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDialogButtonBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_SharedPainter +func miqt_exec_callback_QDialogButtonBox_SharedPainter(self *C.QDialogButtonBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDialogButtonBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialogButtonBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDialogButtonBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_InputMethodEvent +func miqt_exec_callback_QDialogButtonBox_InputMethodEvent(self *C.QDialogButtonBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDialogButtonBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialogButtonBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDialogButtonBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_InputMethodQuery +func miqt_exec_callback_QDialogButtonBox_InputMethodQuery(self *C.QDialogButtonBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDialogButtonBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDialogButtonBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDialogButtonBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_FocusNextPrevChild +func miqt_exec_callback_QDialogButtonBox_FocusNextPrevChild(self *C.QDialogButtonBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDialogButtonBox) Delete() { - C.QDialogButtonBox_Delete(this.h) + C.QDialogButtonBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdialogbuttonbox.h b/qt/gen_qdialogbuttonbox.h index cf3b5dfd..17927c82 100644 --- a/qt/gen_qdialogbuttonbox.h +++ b/qt/gen_qdialogbuttonbox.h @@ -16,26 +16,80 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDialogButtonBox; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QPushButton; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractButton QAbstractButton; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialogButtonBox QDialogButtonBox; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QPushButton QPushButton; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDialogButtonBox* QDialogButtonBox_new(QWidget* parent); -QDialogButtonBox* QDialogButtonBox_new2(); -QDialogButtonBox* QDialogButtonBox_new3(int orientation); -QDialogButtonBox* QDialogButtonBox_new4(int buttons); -QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation); -QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent); -QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent); -QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent); +void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self); void* QDialogButtonBox_Metacast(QDialogButtonBox* self, const char* param1); struct miqt_string QDialogButtonBox_Tr(const char* s); @@ -63,11 +117,95 @@ void QDialogButtonBox_HelpRequested(QDialogButtonBox* self); void QDialogButtonBox_connect_HelpRequested(QDialogButtonBox* self, intptr_t slot); void QDialogButtonBox_Rejected(QDialogButtonBox* self); void QDialogButtonBox_connect_Rejected(QDialogButtonBox* self, intptr_t slot); +void QDialogButtonBox_ChangeEvent(QDialogButtonBox* self, QEvent* event); +bool QDialogButtonBox_Event(QDialogButtonBox* self, QEvent* event); struct miqt_string QDialogButtonBox_Tr2(const char* s, const char* c); struct miqt_string QDialogButtonBox_Tr3(const char* s, const char* c, int n); struct miqt_string QDialogButtonBox_TrUtf82(const char* s, const char* c); struct miqt_string QDialogButtonBox_TrUtf83(const char* s, const char* c, int n); -void QDialogButtonBox_Delete(QDialogButtonBox* self); +void QDialogButtonBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_Event(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_Event(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_DevType(void* self, intptr_t slot); +int QDialogButtonBox_virtualbase_DevType(const void* self); +void QDialogButtonBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_SetVisible(void* self, bool visible); +void QDialogButtonBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDialogButtonBox_virtualbase_SizeHint(const void* self); +void QDialogButtonBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDialogButtonBox_virtualbase_MinimumSizeHint(const void* self); +void QDialogButtonBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDialogButtonBox_virtualbase_HeightForWidth(const void* self, int param1); +void QDialogButtonBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_HasHeightForWidth(const void* self); +void QDialogButtonBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDialogButtonBox_virtualbase_PaintEngine(const void* self); +void QDialogButtonBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDialogButtonBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDialogButtonBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDialogButtonBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDialogButtonBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDialogButtonBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_EnterEvent(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDialogButtonBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDialogButtonBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDialogButtonBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDialogButtonBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDialogButtonBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDialogButtonBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDialogButtonBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDialogButtonBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDialogButtonBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDialogButtonBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDialogButtonBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDialogButtonBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDialogButtonBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QDialogButtonBox_override_virtual_Metric(void* self, intptr_t slot); +int QDialogButtonBox_virtualbase_Metric(const void* self, int param1); +void QDialogButtonBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDialogButtonBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDialogButtonBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QDialogButtonBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDialogButtonBox_virtualbase_SharedPainter(const void* self); +void QDialogButtonBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDialogButtonBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDialogButtonBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QDialogButtonBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDialogButtonBox_Delete(QDialogButtonBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdir.cpp b/qt/gen_qdir.cpp index c1a3f4d8..ced4d6a5 100644 --- a/qt/gen_qdir.cpp +++ b/qt/gen_qdir.cpp @@ -9,35 +9,41 @@ #include "gen_qdir.h" #include "_cgo_export.h" -QDir* QDir_new(QDir* param1) { - return new QDir(*param1); +void QDir_new(QDir* param1, QDir** outptr_QDir) { + QDir* ret = new QDir(*param1); + *outptr_QDir = ret; } -QDir* QDir_new2() { - return new QDir(); +void QDir_new2(QDir** outptr_QDir) { + QDir* ret = new QDir(); + *outptr_QDir = ret; } -QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter) { +void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - return new QDir(path_QString, nameFilter_QString); + QDir* ret = new QDir(path_QString, nameFilter_QString); + *outptr_QDir = ret; } -QDir* QDir_new4(struct miqt_string path) { +void QDir_new4(struct miqt_string path, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDir(path_QString); + QDir* ret = new QDir(path_QString); + *outptr_QDir = ret; } -QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort) { +void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - return new QDir(path_QString, nameFilter_QString, static_cast(sort)); + QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort)); + *outptr_QDir = ret; } -QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter) { +void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - return new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); + QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); + *outptr_QDir = ret; } void QDir_OperatorAssign(QDir* self, QDir* param1) { @@ -751,7 +757,11 @@ struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList3(const QDir* self, str return _out; } -void QDir_Delete(QDir* self) { - delete self; +void QDir_Delete(QDir* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdir.go b/qt/gen_qdir.go index f7aeb237..cef490bf 100644 --- a/qt/gen_qdir.go +++ b/qt/gen_qdir.go @@ -56,7 +56,8 @@ const ( ) type QDir struct { - h *C.QDir + h *C.QDir + isSubclass bool } func (this *QDir) cPointer() *C.QDir { @@ -73,6 +74,7 @@ func (this *QDir) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDir constructs the type using only CGO pointers. func newQDir(h *C.QDir) *QDir { if h == nil { return nil @@ -80,20 +82,33 @@ func newQDir(h *C.QDir) *QDir { return &QDir{h: h} } +// UnsafeNewQDir constructs the type using only unsafe pointers. func UnsafeNewQDir(h unsafe.Pointer) *QDir { - return newQDir((*C.QDir)(h)) + if h == nil { + return nil + } + + return &QDir{h: (*C.QDir)(h)} } // NewQDir constructs a new QDir object. func NewQDir(param1 *QDir) *QDir { - ret := C.QDir_new(param1.cPointer()) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new(param1.cPointer(), &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir2 constructs a new QDir object. func NewQDir2() *QDir { - ret := C.QDir_new2() - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new2(&outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir3 constructs a new QDir object. @@ -106,8 +121,12 @@ func NewQDir3(path string, nameFilter string) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - ret := C.QDir_new3(path_ms, nameFilter_ms) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new3(path_ms, nameFilter_ms, &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir4 constructs a new QDir object. @@ -116,8 +135,12 @@ func NewQDir4(path string) *QDir { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDir_new4(path_ms) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new4(path_ms, &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir5 constructs a new QDir object. @@ -130,8 +153,12 @@ func NewQDir5(path string, nameFilter string, sort QDir__SortFlag) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - ret := C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort)) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort), &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir6 constructs a new QDir object. @@ -144,8 +171,12 @@ func NewQDir6(path string, nameFilter string, sort QDir__SortFlag, filter QDir__ nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - ret := C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter)) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter), &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } func (this *QDir) OperatorAssign(param1 *QDir) { @@ -867,7 +898,7 @@ func (this *QDir) EntryInfoList3(nameFilters []string, filters QDir__Filter, sor // Delete this object from C++ memory. func (this *QDir) Delete() { - C.QDir_Delete(this.h) + C.QDir_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdir.h b/qt/gen_qdir.h index a50789eb..eecf311e 100644 --- a/qt/gen_qdir.h +++ b/qt/gen_qdir.h @@ -24,12 +24,12 @@ typedef struct QDir QDir; typedef struct QFileInfo QFileInfo; #endif -QDir* QDir_new(QDir* param1); -QDir* QDir_new2(); -QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter); -QDir* QDir_new4(struct miqt_string path); -QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort); -QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter); +void QDir_new(QDir* param1, QDir** outptr_QDir); +void QDir_new2(QDir** outptr_QDir); +void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir); +void QDir_new4(struct miqt_string path, QDir** outptr_QDir); +void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir); +void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir); void QDir_OperatorAssign(QDir* self, QDir* param1); void QDir_OperatorAssignWithPath(QDir* self, struct miqt_string path); void QDir_Swap(QDir* self, QDir* other); @@ -106,7 +106,7 @@ struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList1(const QDir* self, int struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList2(const QDir* self, int filters, int sort); struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList22(const QDir* self, struct miqt_array /* of struct miqt_string */ nameFilters, int filters); struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList3(const QDir* self, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort); -void QDir_Delete(QDir* self); +void QDir_Delete(QDir* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdiriterator.cpp b/qt/gen_qdiriterator.cpp index ba9bcbd5..d9fd33b4 100644 --- a/qt/gen_qdiriterator.cpp +++ b/qt/gen_qdiriterator.cpp @@ -9,21 +9,24 @@ #include "gen_qdiriterator.h" #include "_cgo_export.h" -QDirIterator* QDirIterator_new(QDir* dir) { - return new QDirIterator(*dir); +void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator) { + QDirIterator* ret = new QDirIterator(*dir); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new2(struct miqt_string path) { +void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString); + QDirIterator* ret = new QDirIterator(path_QString); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new3(struct miqt_string path, int filter) { +void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString, static_cast(filter)); + QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters) { +void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -32,24 +35,28 @@ QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirIterator(path_QString, nameFilters_QList); + QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new5(QDir* dir, int flags) { - return new QDirIterator(*dir, static_cast(flags)); +void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator) { + QDirIterator* ret = new QDirIterator(*dir, static_cast(flags)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new6(struct miqt_string path, int flags) { +void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString, static_cast(flags)); + QDirIterator* ret = new QDirIterator(path_QString, static_cast(flags)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags) { +void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); + QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters) { +void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -58,10 +65,11 @@ QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); + QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags) { +void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -70,7 +78,8 @@ QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); + QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); + *outptr_QDirIterator = ret; } struct miqt_string QDirIterator_Next(QDirIterator* self) { @@ -125,7 +134,11 @@ struct miqt_string QDirIterator_Path(const QDirIterator* self) { return _ms; } -void QDirIterator_Delete(QDirIterator* self) { - delete self; +void QDirIterator_Delete(QDirIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdiriterator.go b/qt/gen_qdiriterator.go index 5499fba5..9da5fd41 100644 --- a/qt/gen_qdiriterator.go +++ b/qt/gen_qdiriterator.go @@ -22,7 +22,8 @@ const ( ) type QDirIterator struct { - h *C.QDirIterator + h *C.QDirIterator + isSubclass bool } func (this *QDirIterator) cPointer() *C.QDirIterator { @@ -39,6 +40,7 @@ func (this *QDirIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDirIterator constructs the type using only CGO pointers. func newQDirIterator(h *C.QDirIterator) *QDirIterator { if h == nil { return nil @@ -46,14 +48,23 @@ func newQDirIterator(h *C.QDirIterator) *QDirIterator { return &QDirIterator{h: h} } +// UnsafeNewQDirIterator constructs the type using only unsafe pointers. func UnsafeNewQDirIterator(h unsafe.Pointer) *QDirIterator { - return newQDirIterator((*C.QDirIterator)(h)) + if h == nil { + return nil + } + + return &QDirIterator{h: (*C.QDirIterator)(h)} } // NewQDirIterator constructs a new QDirIterator object. func NewQDirIterator(dir *QDir) *QDirIterator { - ret := C.QDirIterator_new(dir.cPointer()) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new(dir.cPointer(), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator2 constructs a new QDirIterator object. @@ -62,8 +73,12 @@ func NewQDirIterator2(path string) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new2(path_ms) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new2(path_ms, &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator3 constructs a new QDirIterator object. @@ -72,8 +87,12 @@ func NewQDirIterator3(path string, filter QDir__Filter) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new3(path_ms, (C.int)(filter)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new3(path_ms, (C.int)(filter), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator4 constructs a new QDirIterator object. @@ -92,14 +111,22 @@ func NewQDirIterator4(path string, nameFilters []string) *QDirIterator { nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirIterator_new4(path_ms, nameFilters_ma) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new4(path_ms, nameFilters_ma, &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator5 constructs a new QDirIterator object. func NewQDirIterator5(dir *QDir, flags QDirIterator__IteratorFlag) *QDirIterator { - ret := C.QDirIterator_new5(dir.cPointer(), (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new5(dir.cPointer(), (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator6 constructs a new QDirIterator object. @@ -108,8 +135,12 @@ func NewQDirIterator6(path string, flags QDirIterator__IteratorFlag) *QDirIterat path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new6(path_ms, (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new6(path_ms, (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator7 constructs a new QDirIterator object. @@ -118,8 +149,12 @@ func NewQDirIterator7(path string, filter QDir__Filter, flags QDirIterator__Iter path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator8 constructs a new QDirIterator object. @@ -138,8 +173,12 @@ func NewQDirIterator8(path string, nameFilters []string, filters QDir__Filter) * nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator9 constructs a new QDirIterator object. @@ -158,8 +197,12 @@ func NewQDirIterator9(path string, nameFilters []string, filters QDir__Filter, f nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } func (this *QDirIterator) Next() string { @@ -203,7 +246,7 @@ func (this *QDirIterator) Path() string { // Delete this object from C++ memory. func (this *QDirIterator) Delete() { - C.QDirIterator_Delete(this.h) + C.QDirIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdiriterator.h b/qt/gen_qdiriterator.h index c85400c1..3680d52a 100644 --- a/qt/gen_qdiriterator.h +++ b/qt/gen_qdiriterator.h @@ -24,22 +24,22 @@ typedef struct QDirIterator QDirIterator; typedef struct QFileInfo QFileInfo; #endif -QDirIterator* QDirIterator_new(QDir* dir); -QDirIterator* QDirIterator_new2(struct miqt_string path); -QDirIterator* QDirIterator_new3(struct miqt_string path, int filter); -QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters); -QDirIterator* QDirIterator_new5(QDir* dir, int flags); -QDirIterator* QDirIterator_new6(struct miqt_string path, int flags); -QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags); -QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters); -QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags); +void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator); +void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator); +void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator); +void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator); +void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator); +void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator); +void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator); +void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator); +void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator); struct miqt_string QDirIterator_Next(QDirIterator* self); bool QDirIterator_HasNext(const QDirIterator* self); struct miqt_string QDirIterator_FileName(const QDirIterator* self); struct miqt_string QDirIterator_FilePath(const QDirIterator* self); QFileInfo* QDirIterator_FileInfo(const QDirIterator* self); struct miqt_string QDirIterator_Path(const QDirIterator* self); -void QDirIterator_Delete(QDirIterator* self); +void QDirIterator_Delete(QDirIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdirmodel.cpp b/qt/gen_qdirmodel.cpp index a6e1c3f5..4d32c6c4 100644 --- a/qt/gen_qdirmodel.cpp +++ b/qt/gen_qdirmodel.cpp @@ -1,12 +1,16 @@ +#include +#include #include #include #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -15,7 +19,1027 @@ #include "gen_qdirmodel.h" #include "_cgo_export.h" -QDirModel* QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort) { +class MiqtVirtualQDirModel : public virtual QDirModel { +public: + + MiqtVirtualQDirModel(const QStringList& nameFilters, QDir::Filters filters, QDir::SortFlags sort): QDirModel(nameFilters, filters, sort) {}; + MiqtVirtualQDirModel(): QDirModel() {}; + MiqtVirtualQDirModel(const QStringList& nameFilters, QDir::Filters filters, QDir::SortFlags sort, QObject* parent): QDirModel(nameFilters, filters, sort, parent) {}; + MiqtVirtualQDirModel(QObject* parent): QDirModel(parent) {}; + + virtual ~MiqtVirtualQDirModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QDirModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QDirModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QDirModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QDirModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QDirModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QDirModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QDirModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QDirModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QDirModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QDirModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QDirModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QDirModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QDirModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QDirModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QDirModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QDirModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QDirModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QDirModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QDirModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QDirModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QDirModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& index) const override { + if (handle__HasChildren == 0) { + return QDirModel::hasChildren(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* index) const { + + return QDirModel::hasChildren(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QDirModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QDirModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QDirModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QDirModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QDirModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QDirModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QDirModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QDirModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QDirModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QDirModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QDirModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QDirModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QDirModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QDirModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QDirModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QDirModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QDirModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QDirModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QDirModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QDirModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QDirModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QDirModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QDirModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QDirModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QDirModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QDirModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QDirModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QDirModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QDirModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QDirModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QDirModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QDirModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QDirModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QDirModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QDirModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QDirModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QDirModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QDirModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QDirModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QDirModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QDirModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QDirModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QDirModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QDirModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QDirModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QDirModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QDirModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QDirModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QDirModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QDirModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QDirModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QDirModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QDirModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QDirModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QDirModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QDirModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QDirModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QDirModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QDirModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QDirModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QDirModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QDirModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QDirModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QDirModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QDirModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QDirModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QDirModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QDirModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QDirModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QDirModel::revert(); + return; + } + + + miqt_exec_callback_QDirModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QDirModel::revert(); + + } + +}; + +void QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); struct miqt_string* nameFilters_arr = static_cast(nameFilters.data); @@ -23,14 +1047,20 @@ QDirModel* QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilt QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirModel(nameFilters_QList, static_cast(filters), static_cast(sort)); + MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(nameFilters_QList, static_cast(filters), static_cast(sort)); + *outptr_QDirModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QDirModel* QDirModel_new2() { - return new QDirModel(); +void QDirModel_new2(QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(); + *outptr_QDirModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QDirModel* QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent) { +void QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); struct miqt_string* nameFilters_arr = static_cast(nameFilters.data); @@ -38,11 +1068,17 @@ QDirModel* QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFil QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirModel(nameFilters_QList, static_cast(filters), static_cast(sort), parent); + MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(nameFilters_QList, static_cast(filters), static_cast(sort), parent); + *outptr_QDirModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QDirModel* QDirModel_new4(QObject* parent) { - return new QDirModel(parent); +void QDirModel_new4(QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(parent); + *outptr_QDirModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QDirModel_MetaObject(const QDirModel* self) { @@ -75,36 +1111,36 @@ struct miqt_string QDirModel_TrUtf8(const char* s) { return _ms; } -QModelIndex* QDirModel_Index(const QDirModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QDirModel_Index(const QDirModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QDirModel_Parent(const QDirModel* self, QModelIndex* child) { return new QModelIndex(self->parent(*child)); } -int QDirModel_RowCount(const QDirModel* self) { - return self->rowCount(); +int QDirModel_RowCount(const QDirModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QDirModel_ColumnCount(const QDirModel* self) { - return self->columnCount(); +int QDirModel_ColumnCount(const QDirModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -QVariant* QDirModel_Data(const QDirModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QDirModel_Data(const QDirModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QDirModel_SetData(QDirModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QDirModel_SetData(QDirModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QDirModel_HeaderData(const QDirModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QDirModel_HeaderData(const QDirModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QDirModel_HasChildren(const QDirModel* self) { - return self->hasChildren(); +bool QDirModel_HasChildren(const QDirModel* self, QModelIndex* index) { + return self->hasChildren(*index); } int QDirModel_Flags(const QDirModel* self, QModelIndex* index) { @@ -112,8 +1148,8 @@ int QDirModel_Flags(const QDirModel* self, QModelIndex* index) { return static_cast(_ret); } -void QDirModel_Sort(QDirModel* self, int column) { - self->sort(static_cast(column)); +void QDirModel_Sort(QDirModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QDirModel_MimeTypes(const QDirModel* self) { @@ -336,48 +1372,292 @@ struct miqt_string QDirModel_TrUtf83(const char* s, const char* c, int n) { return _ms; } -QModelIndex* QDirModel_Index3(const QDirModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +QModelIndex* QDirModel_Index2(const QDirModel* self, struct miqt_string path, int column) { + QString path_QString = QString::fromUtf8(path.data, path.len); + return new QModelIndex(self->index(path_QString, static_cast(column))); } -int QDirModel_RowCount1(const QDirModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QDirModel_Refresh1(QDirModel* self, QModelIndex* parent) { + self->refresh(*parent); } -int QDirModel_ColumnCount1(const QDirModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QDirModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Index = slot; } -QVariant* QDirModel_Data2(const QDirModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +QModelIndex* QDirModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Index(row, column, parent); } -bool QDirModel_SetData3(QDirModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +void QDirModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Parent = slot; } -QVariant* QDirModel_HeaderData3(const QDirModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +QModelIndex* QDirModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Parent(child); } -bool QDirModel_HasChildren1(const QDirModel* self, QModelIndex* index) { - return self->hasChildren(*index); +void QDirModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__RowCount = slot; } -void QDirModel_Sort2(QDirModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +int QDirModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_RowCount(parent); } -QModelIndex* QDirModel_Index2(const QDirModel* self, struct miqt_string path, int column) { - QString path_QString = QString::fromUtf8(path.data, path.len); - return new QModelIndex(self->index(path_QString, static_cast(column))); +void QDirModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__ColumnCount = slot; } -void QDirModel_Refresh1(QDirModel* self, QModelIndex* parent) { - self->refresh(*parent); +int QDirModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_ColumnCount(parent); } -void QDirModel_Delete(QDirModel* self) { - delete self; +void QDirModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Data = slot; +} + +QVariant* QDirModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Data(index, role); +} + +void QDirModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__SetData = slot; +} + +bool QDirModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QDirModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QDirModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QDirModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__HasChildren = slot; +} + +bool QDirModel_virtualbase_HasChildren(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_HasChildren(index); +} + +void QDirModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Flags = slot; +} + +int QDirModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Flags(index); +} + +void QDirModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Sort = slot; +} + +void QDirModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQDirModel*)(self) )->virtualbase_Sort(column, order); +} + +void QDirModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QDirModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_MimeTypes(); +} + +void QDirModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QDirModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QDirModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__DropMimeData = slot; +} + +bool QDirModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QDirModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QDirModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QDirModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QDirModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QDirModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QDirModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QDirModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QDirModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_ItemData(index); +} + +void QDirModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__SetItemData = slot; +} + +bool QDirModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QDirModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QDirModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QDirModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QDirModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QDirModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__InsertRows = slot; +} + +bool QDirModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QDirModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__InsertColumns = slot; +} + +bool QDirModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QDirModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__RemoveRows = slot; +} + +bool QDirModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QDirModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QDirModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QDirModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__MoveRows = slot; +} + +bool QDirModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QDirModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__MoveColumns = slot; +} + +bool QDirModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QDirModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__FetchMore = slot; +} + +void QDirModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQDirModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QDirModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QDirModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QDirModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QDirModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Buddy(index); +} + +void QDirModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QDirModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QDirModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Span = slot; +} + +QSize* QDirModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_Span(index); +} + +void QDirModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QDirModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQDirModel*)(self) )->virtualbase_RoleNames(); +} + +void QDirModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Submit = slot; +} + +bool QDirModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQDirModel*)(self) )->virtualbase_Submit(); +} + +void QDirModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QDirModel*)(self) )->handle__Revert = slot; +} + +void QDirModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQDirModel*)(self) )->virtualbase_Revert(); +} + +void QDirModel_Delete(QDirModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdirmodel.go b/qt/gen_qdirmodel.go index 824ac9b2..0ea586a2 100644 --- a/qt/gen_qdirmodel.go +++ b/qt/gen_qdirmodel.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -22,7 +23,8 @@ const ( ) type QDirModel struct { - h *C.QDirModel + h *C.QDirModel + isSubclass bool *QAbstractItemModel } @@ -40,15 +42,23 @@ func (this *QDirModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDirModel(h *C.QDirModel) *QDirModel { +// newQDirModel constructs the type using only CGO pointers. +func newQDirModel(h *C.QDirModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QDirModel { if h == nil { return nil } - return &QDirModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QDirModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQDirModel(h unsafe.Pointer) *QDirModel { - return newQDirModel((*C.QDirModel)(h)) +// UnsafeNewQDirModel constructs the type using only unsafe pointers. +func UnsafeNewQDirModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QDirModel { + if h == nil { + return nil + } + + return &QDirModel{h: (*C.QDirModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQDirModel constructs a new QDirModel object. @@ -63,14 +73,26 @@ func NewQDirModel(nameFilters []string, filters QDir__Filter, sort QDir__SortFla nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirModel_new(nameFilters_ma, (C.int)(filters), (C.int)(sort)) - return newQDirModel(ret) + var outptr_QDirModel *C.QDirModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QDirModel_new(nameFilters_ma, (C.int)(filters), (C.int)(sort), &outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDirModel2 constructs a new QDirModel object. func NewQDirModel2() *QDirModel { - ret := C.QDirModel_new2() - return newQDirModel(ret) + var outptr_QDirModel *C.QDirModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QDirModel_new2(&outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDirModel3 constructs a new QDirModel object. @@ -85,14 +107,26 @@ func NewQDirModel3(nameFilters []string, filters QDir__Filter, sort QDir__SortFl nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirModel_new3(nameFilters_ma, (C.int)(filters), (C.int)(sort), parent.cPointer()) - return newQDirModel(ret) + var outptr_QDirModel *C.QDirModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QDirModel_new3(nameFilters_ma, (C.int)(filters), (C.int)(sort), parent.cPointer(), &outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDirModel4 constructs a new QDirModel object. func NewQDirModel4(parent *QObject) *QDirModel { - ret := C.QDirModel_new4(parent.cPointer()) - return newQDirModel(ret) + var outptr_QDirModel *C.QDirModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QDirModel_new4(parent.cPointer(), &outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDirModel) MetaObject() *QMetaObject { @@ -123,8 +157,8 @@ func QDirModel_TrUtf8(s string) string { return _ret } -func (this *QDirModel) Index(row int, column int) *QModelIndex { - _ret := C.QDirModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QDirModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QDirModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -137,42 +171,42 @@ func (this *QDirModel) Parent(child *QModelIndex) *QModelIndex { return _goptr } -func (this *QDirModel) RowCount() int { - return (int)(C.QDirModel_RowCount(this.h)) +func (this *QDirModel) RowCount(parent *QModelIndex) int { + return (int)(C.QDirModel_RowCount(this.h, parent.cPointer())) } -func (this *QDirModel) ColumnCount() int { - return (int)(C.QDirModel_ColumnCount(this.h)) +func (this *QDirModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QDirModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QDirModel) Data(index *QModelIndex) *QVariant { - _ret := C.QDirModel_Data(this.h, index.cPointer()) +func (this *QDirModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QDirModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QDirModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QDirModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QDirModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QDirModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QDirModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QDirModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QDirModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QDirModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QDirModel) HasChildren() bool { - return (bool)(C.QDirModel_HasChildren(this.h)) +func (this *QDirModel) HasChildren(index *QModelIndex) bool { + return (bool)(C.QDirModel_HasChildren(this.h, index.cPointer())) } func (this *QDirModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QDirModel_Flags(this.h, index.cPointer())) } -func (this *QDirModel) Sort(column int) { - C.QDirModel_Sort(this.h, (C.int)(column)) +func (this *QDirModel) Sort(column int, order SortOrder) { + C.QDirModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QDirModel) MimeTypes() []string { @@ -195,7 +229,7 @@ func (this *QDirModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QDirModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QDirModel_MimeData(this.h, indexes_ma)), nil) } func (this *QDirModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -391,65 +425,1079 @@ func QDirModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QDirModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QDirModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QDirModel) Index2(path string, column int) *QModelIndex { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + _ret := C.QDirModel_Index2(this.h, path_ms, (C.int)(column)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QDirModel) Refresh1(parent *QModelIndex) { + C.QDirModel_Refresh1(this.h, parent.cPointer()) +} + +func (this *QDirModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QDirModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDirModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QDirModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Index +func miqt_exec_callback_QDirModel_Index(self *C.QDirModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QDirModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QDirModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QDirModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QDirModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Parent +func miqt_exec_callback_QDirModel_Parent(self *C.QDirModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDirModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QDirModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QDirModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QDirModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_RowCount +func miqt_exec_callback_QDirModel_RowCount(self *C.QDirModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QDirModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QDirModel_RowCount1(this.h, parent.cPointer())) +func (this *QDirModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QDirModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + } +func (this *QDirModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QDirModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_ColumnCount +func miqt_exec_callback_QDirModel_ColumnCount(self *C.QDirModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) -func (this *QDirModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QDirModel_ColumnCount1(this.h, parent.cPointer())) } -func (this *QDirModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QDirModel_Data2(this.h, index.cPointer(), (C.int)(role)) +func (this *QDirModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QDirModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QDirModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QDirModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Data +func miqt_exec_callback_QDirModel_Data(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QDirModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QDirModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +func (this *QDirModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QDirModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QDirModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QDirModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_SetData +func miqt_exec_callback_QDirModel_SetData(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QDirModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QDirModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QDirModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QDirModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QDirModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QDirModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_HeaderData +func miqt_exec_callback_QDirModel_HeaderData(self *C.QDirModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() -func (this *QDirModel) HasChildren1(index *QModelIndex) bool { - return (bool)(C.QDirModel_HasChildren1(this.h, index.cPointer())) } -func (this *QDirModel) Sort2(column int, order SortOrder) { - C.QDirModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +func (this *QDirModel) callVirtualBase_HasChildren(index *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_HasChildren(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QDirModel) OnHasChildren(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QDirModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDirModel) Index2(path string, column int) *QModelIndex { - path_ms := C.struct_miqt_string{} - path_ms.data = C.CString(path) - path_ms.len = C.size_t(len(path)) - defer C.free(unsafe.Pointer(path_ms.data)) - _ret := C.QDirModel_Index2(this.h, path_ms, (C.int)(column)) +//export miqt_exec_callback_QDirModel_HasChildren +func miqt_exec_callback_QDirModel_HasChildren(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QDirModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QDirModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QDirModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Flags +func miqt_exec_callback_QDirModel_Flags(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QDirModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QDirModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QDirModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Sort +func miqt_exec_callback_QDirModel_Sort(self *C.QDirModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QDirModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QDirModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QDirModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QDirModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QDirModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_MimeTypes +func miqt_exec_callback_QDirModel_MimeTypes(self *C.QDirModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QDirModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QDirModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QDirModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QDirModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_MimeData +func miqt_exec_callback_QDirModel_MimeData(self *C.QDirModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDirModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QDirModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_DropMimeData +func miqt_exec_callback_QDirModel_DropMimeData(self *C.QDirModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QDirModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QDirModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QDirModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_SupportedDropActions +func miqt_exec_callback_QDirModel_SupportedDropActions(self *C.QDirModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QDirModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QDirModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QDirModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDirModel) Refresh1(parent *QModelIndex) { - C.QDirModel_Refresh1(this.h, parent.cPointer()) +//export miqt_exec_callback_QDirModel_Sibling +func miqt_exec_callback_QDirModel_Sibling(self *C.QDirModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QDirModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QDirModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QDirModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QDirModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_SetHeaderData +func miqt_exec_callback_QDirModel_SetHeaderData(self *C.QDirModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QDirModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QDirModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QDirModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_ItemData +func miqt_exec_callback_QDirModel_ItemData(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QDirModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QDirModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QDirModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QDirModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_SetItemData +func miqt_exec_callback_QDirModel_SetItemData(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QDirModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_CanDropMimeData +func miqt_exec_callback_QDirModel_CanDropMimeData(self *C.QDirModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QDirModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QDirModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QDirModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_SupportedDragActions +func miqt_exec_callback_QDirModel_SupportedDragActions(self *C.QDirModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QDirModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_InsertRows +func miqt_exec_callback_QDirModel_InsertRows(self *C.QDirModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QDirModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_InsertColumns +func miqt_exec_callback_QDirModel_InsertColumns(self *C.QDirModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QDirModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_RemoveRows +func miqt_exec_callback_QDirModel_RemoveRows(self *C.QDirModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QDirModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_RemoveColumns +func miqt_exec_callback_QDirModel_RemoveColumns(self *C.QDirModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QDirModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QDirModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QDirModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_MoveRows +func miqt_exec_callback_QDirModel_MoveRows(self *C.QDirModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QDirModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QDirModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QDirModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_MoveColumns +func miqt_exec_callback_QDirModel_MoveColumns(self *C.QDirModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QDirModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QDirModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QDirModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_FetchMore +func miqt_exec_callback_QDirModel_FetchMore(self *C.QDirModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QDirModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QDirModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QDirModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QDirModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QDirModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_CanFetchMore +func miqt_exec_callback_QDirModel_CanFetchMore(self *C.QDirModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QDirModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDirModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QDirModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Buddy +func miqt_exec_callback_QDirModel_Buddy(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDirModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QDirModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QDirModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QDirModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Match +func miqt_exec_callback_QDirModel_Match(self *C.QDirModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QDirModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QDirModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDirModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QDirModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Span +func miqt_exec_callback_QDirModel_Span(self *C.QDirModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDirModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QDirModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QDirModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QDirModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_RoleNames +func miqt_exec_callback_QDirModel_RoleNames(self *C.QDirModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QDirModel) callVirtualBase_Submit() bool { + + return (bool)(C.QDirModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QDirModel) OnSubmit(slot func(super func() bool) bool) { + C.QDirModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Submit +func miqt_exec_callback_QDirModel_Submit(self *C.QDirModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDirModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QDirModel) callVirtualBase_Revert() { + + C.QDirModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QDirModel) OnRevert(slot func(super func())) { + C.QDirModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDirModel_Revert +func miqt_exec_callback_QDirModel_Revert(self *C.QDirModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDirModel{h: self}).callVirtualBase_Revert) + } // Delete this object from C++ memory. func (this *QDirModel) Delete() { - C.QDirModel_Delete(this.h) + C.QDirModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdirmodel.h b/qt/gen_qdirmodel.h index 376b40d2..1abda51b 100644 --- a/qt/gen_qdirmodel.h +++ b/qt/gen_qdirmodel.h @@ -15,6 +15,8 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; +class QByteArray; class QDirModel; class QFileIconProvider; class QFileInfo; @@ -23,8 +25,11 @@ class QMetaObject; class QMimeData; class QModelIndex; class QObject; +class QSize; class QVariant; #else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QByteArray QByteArray; typedef struct QDirModel QDirModel; typedef struct QFileIconProvider QFileIconProvider; typedef struct QFileInfo QFileInfo; @@ -33,27 +38,28 @@ typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; +typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QDirModel* QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort); -QDirModel* QDirModel_new2(); -QDirModel* QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent); -QDirModel* QDirModel_new4(QObject* parent); +void QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QDirModel_new2(QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QDirModel_new4(QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QDirModel_MetaObject(const QDirModel* self); void* QDirModel_Metacast(QDirModel* self, const char* param1); struct miqt_string QDirModel_Tr(const char* s); struct miqt_string QDirModel_TrUtf8(const char* s); -QModelIndex* QDirModel_Index(const QDirModel* self, int row, int column); +QModelIndex* QDirModel_Index(const QDirModel* self, int row, int column, QModelIndex* parent); QModelIndex* QDirModel_Parent(const QDirModel* self, QModelIndex* child); -int QDirModel_RowCount(const QDirModel* self); -int QDirModel_ColumnCount(const QDirModel* self); -QVariant* QDirModel_Data(const QDirModel* self, QModelIndex* index); -bool QDirModel_SetData(QDirModel* self, QModelIndex* index, QVariant* value); -QVariant* QDirModel_HeaderData(const QDirModel* self, int section, int orientation); -bool QDirModel_HasChildren(const QDirModel* self); +int QDirModel_RowCount(const QDirModel* self, QModelIndex* parent); +int QDirModel_ColumnCount(const QDirModel* self, QModelIndex* parent); +QVariant* QDirModel_Data(const QDirModel* self, QModelIndex* index, int role); +bool QDirModel_SetData(QDirModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QDirModel_HeaderData(const QDirModel* self, int section, int orientation, int role); +bool QDirModel_HasChildren(const QDirModel* self, QModelIndex* index); int QDirModel_Flags(const QDirModel* self, QModelIndex* index); -void QDirModel_Sort(QDirModel* self, int column); +void QDirModel_Sort(QDirModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QDirModel_MimeTypes(const QDirModel* self); QMimeData* QDirModel_MimeData(const QDirModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QDirModel_DropMimeData(QDirModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -86,17 +92,77 @@ struct miqt_string QDirModel_Tr2(const char* s, const char* c); struct miqt_string QDirModel_Tr3(const char* s, const char* c, int n); struct miqt_string QDirModel_TrUtf82(const char* s, const char* c); struct miqt_string QDirModel_TrUtf83(const char* s, const char* c, int n); -QModelIndex* QDirModel_Index3(const QDirModel* self, int row, int column, QModelIndex* parent); -int QDirModel_RowCount1(const QDirModel* self, QModelIndex* parent); -int QDirModel_ColumnCount1(const QDirModel* self, QModelIndex* parent); -QVariant* QDirModel_Data2(const QDirModel* self, QModelIndex* index, int role); -bool QDirModel_SetData3(QDirModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QDirModel_HeaderData3(const QDirModel* self, int section, int orientation, int role); -bool QDirModel_HasChildren1(const QDirModel* self, QModelIndex* index); -void QDirModel_Sort2(QDirModel* self, int column, int order); QModelIndex* QDirModel_Index2(const QDirModel* self, struct miqt_string path, int column); void QDirModel_Refresh1(QDirModel* self, QModelIndex* parent); -void QDirModel_Delete(QDirModel* self); +void QDirModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QDirModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QDirModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QDirModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QDirModel_override_virtual_RowCount(void* self, intptr_t slot); +int QDirModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QDirModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QDirModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QDirModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QDirModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QDirModel_override_virtual_SetData(void* self, intptr_t slot); +bool QDirModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QDirModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QDirModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QDirModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QDirModel_virtualbase_HasChildren(const void* self, QModelIndex* index); +void QDirModel_override_virtual_Flags(void* self, intptr_t slot); +int QDirModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QDirModel_override_virtual_Sort(void* self, intptr_t slot); +void QDirModel_virtualbase_Sort(void* self, int column, int order); +void QDirModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QDirModel_virtualbase_MimeTypes(const void* self); +void QDirModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QDirModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QDirModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QDirModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QDirModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QDirModel_virtualbase_SupportedDropActions(const void* self); +void QDirModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QDirModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QDirModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QDirModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QDirModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QDirModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QDirModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QDirModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QDirModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QDirModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QDirModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QDirModel_virtualbase_SupportedDragActions(const void* self); +void QDirModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QDirModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QDirModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QDirModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QDirModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QDirModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QDirModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QDirModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QDirModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QDirModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QDirModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QDirModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QDirModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QDirModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QDirModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QDirModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QDirModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QDirModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QDirModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QDirModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QDirModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QDirModel_virtualbase_Span(const void* self, QModelIndex* index); +void QDirModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QDirModel_virtualbase_RoleNames(const void* self); +void QDirModel_override_virtual_Submit(void* self, intptr_t slot); +bool QDirModel_virtualbase_Submit(void* self); +void QDirModel_override_virtual_Revert(void* self, intptr_t slot); +void QDirModel_virtualbase_Revert(void* self); +void QDirModel_Delete(QDirModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdockwidget.cpp b/qt/gen_qdockwidget.cpp index 07bd031f..2445602d 100644 --- a/qt/gen_qdockwidget.cpp +++ b/qt/gen_qdockwidget.cpp @@ -1,39 +1,1079 @@ #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qdockwidget.h" #include "_cgo_export.h" -QDockWidget* QDockWidget_new(QWidget* parent) { - return new QDockWidget(parent); +class MiqtVirtualQDockWidget : public virtual QDockWidget { +public: + + MiqtVirtualQDockWidget(QWidget* parent): QDockWidget(parent) {}; + MiqtVirtualQDockWidget(const QString& title): QDockWidget(title) {}; + MiqtVirtualQDockWidget(): QDockWidget() {}; + MiqtVirtualQDockWidget(const QString& title, QWidget* parent): QDockWidget(title, parent) {}; + MiqtVirtualQDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags): QDockWidget(title, parent, flags) {}; + MiqtVirtualQDockWidget(QWidget* parent, Qt::WindowFlags flags): QDockWidget(parent, flags) {}; + + virtual ~MiqtVirtualQDockWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDockWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDockWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDockWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDockWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDockWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDockWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDockWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDockWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDockWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDockWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDockWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDockWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDockWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDockWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDockWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDockWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDockWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDockWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDockWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDockWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDockWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDockWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDockWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDockWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDockWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDockWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDockWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDockWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDockWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDockWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDockWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDockWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDockWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDockWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDockWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDockWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDockWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDockWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDockWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDockWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDockWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDockWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDockWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDockWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDockWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDockWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDockWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDockWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QDockWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QDockWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDockWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDockWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDockWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDockWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDockWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDockWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDockWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDockWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDockWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDockWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDockWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDockWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDockWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDockWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDockWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDockWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDockWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDockWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDockWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDockWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDockWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDockWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDockWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDockWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QDockWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QDockWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDockWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDockWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDockWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDockWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDockWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDockWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDockWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDockWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDockWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDockWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDockWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDockWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDockWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDockWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDockWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDockWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDockWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDockWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDockWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDockWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDockWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDockWidget::focusNextPrevChild(next); + + } + +}; + +void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new2(struct miqt_string title) { +void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QDockWidget(title_QString); + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new3() { - return new QDockWidget(); +void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent) { +void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QDockWidget(title_QString, parent); + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags) { +void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QDockWidget(title_QString, parent, static_cast(flags)); + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent, static_cast(flags)); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new6(QWidget* parent, int flags) { - return new QDockWidget(parent, static_cast(flags)); +void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent, static_cast(flags)); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDockWidget_MetaObject(const QDockWidget* self) { @@ -121,7 +1161,7 @@ void QDockWidget_FeaturesChanged(QDockWidget* self, int features) { } void QDockWidget_connect_FeaturesChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::featuresChanged), self, [=](QDockWidget::DockWidgetFeatures features) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::featuresChanged), self, [=](QDockWidget::DockWidgetFeatures features) { QDockWidget::DockWidgetFeatures features_ret = features; int sigval1 = static_cast(features_ret); miqt_exec_callback_QDockWidget_FeaturesChanged(slot, sigval1); @@ -133,7 +1173,7 @@ void QDockWidget_TopLevelChanged(QDockWidget* self, bool topLevel) { } void QDockWidget_connect_TopLevelChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::topLevelChanged), self, [=](bool topLevel) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::topLevelChanged), self, [=](bool topLevel) { bool sigval1 = topLevel; miqt_exec_callback_QDockWidget_TopLevelChanged(slot, sigval1); }); @@ -144,7 +1184,7 @@ void QDockWidget_AllowedAreasChanged(QDockWidget* self, int allowedAreas) { } void QDockWidget_connect_AllowedAreasChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::allowedAreasChanged), self, [=](Qt::DockWidgetAreas allowedAreas) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::allowedAreasChanged), self, [=](Qt::DockWidgetAreas allowedAreas) { Qt::DockWidgetAreas allowedAreas_ret = allowedAreas; int sigval1 = static_cast(allowedAreas_ret); miqt_exec_callback_QDockWidget_AllowedAreasChanged(slot, sigval1); @@ -156,7 +1196,7 @@ void QDockWidget_VisibilityChanged(QDockWidget* self, bool visible) { } void QDockWidget_connect_VisibilityChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::visibilityChanged), self, [=](bool visible) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::visibilityChanged), self, [=](bool visible) { bool sigval1 = visible; miqt_exec_callback_QDockWidget_VisibilityChanged(slot, sigval1); }); @@ -167,7 +1207,7 @@ void QDockWidget_DockLocationChanged(QDockWidget* self, int area) { } void QDockWidget_connect_DockLocationChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::dockLocationChanged), self, [=](Qt::DockWidgetArea area) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::dockLocationChanged), self, [=](Qt::DockWidgetArea area) { Qt::DockWidgetArea area_ret = area; int sigval1 = static_cast(area_ret); miqt_exec_callback_QDockWidget_DockLocationChanged(slot, sigval1); @@ -218,7 +1258,339 @@ struct miqt_string QDockWidget_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDockWidget_Delete(QDockWidget* self) { - delete self; +void QDockWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QDockWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDockWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__CloseEvent = slot; +} + +void QDockWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QDockWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__PaintEvent = slot; +} + +void QDockWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QDockWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__Event = slot; +} + +bool QDockWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_Event(event); +} + +void QDockWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DevType = slot; +} + +int QDockWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_DevType(); +} + +void QDockWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__SetVisible = slot; +} + +void QDockWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QDockWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QDockWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_SizeHint(); +} + +void QDockWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDockWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDockWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QDockWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDockWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDockWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDockWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDockWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QDockWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QDockWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDockWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDockWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDockWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDockWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDockWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDockWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDockWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__WheelEvent = slot; +} + +void QDockWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QDockWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QDockWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDockWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDockWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDockWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QDockWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDockWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QDockWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDockWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__EnterEvent = slot; +} + +void QDockWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QDockWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QDockWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDockWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MoveEvent = slot; +} + +void QDockWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QDockWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QDockWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDockWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDockWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDockWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__TabletEvent = slot; +} + +void QDockWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QDockWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ActionEvent = slot; +} + +void QDockWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QDockWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QDockWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDockWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QDockWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDockWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDockWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDockWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DropEvent = slot; +} + +void QDockWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QDockWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ShowEvent = slot; +} + +void QDockWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QDockWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__HideEvent = slot; +} + +void QDockWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QDockWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QDockWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDockWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__Metric = slot; +} + +int QDockWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_Metric(param1); +} + +void QDockWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InitPainter = slot; +} + +void QDockWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QDockWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDockWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QDockWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDockWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QDockWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QDockWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDockWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDockWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDockWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDockWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDockWidget_Delete(QDockWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdockwidget.go b/qt/gen_qdockwidget.go index fd3f3aca..46ac4439 100644 --- a/qt/gen_qdockwidget.go +++ b/qt/gen_qdockwidget.go @@ -28,7 +28,8 @@ const ( ) type QDockWidget struct { - h *C.QDockWidget + h *C.QDockWidget + isSubclass bool *QWidget } @@ -46,21 +47,36 @@ func (this *QDockWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDockWidget(h *C.QDockWidget) *QDockWidget { +// newQDockWidget constructs the type using only CGO pointers. +func newQDockWidget(h *C.QDockWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDockWidget { if h == nil { return nil } - return &QDockWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDockWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDockWidget(h unsafe.Pointer) *QDockWidget { - return newQDockWidget((*C.QDockWidget)(h)) +// UnsafeNewQDockWidget constructs the type using only unsafe pointers. +func UnsafeNewQDockWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDockWidget { + if h == nil { + return nil + } + + return &QDockWidget{h: (*C.QDockWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDockWidget constructs a new QDockWidget object. func NewQDockWidget(parent *QWidget) *QDockWidget { - ret := C.QDockWidget_new(parent.cPointer()) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new(parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget2 constructs a new QDockWidget object. @@ -69,14 +85,28 @@ func NewQDockWidget2(title string) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QDockWidget_new2(title_ms) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new2(title_ms, &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget3 constructs a new QDockWidget object. func NewQDockWidget3() *QDockWidget { - ret := C.QDockWidget_new3() - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new3(&outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget4 constructs a new QDockWidget object. @@ -85,8 +115,15 @@ func NewQDockWidget4(title string, parent *QWidget) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QDockWidget_new4(title_ms, parent.cPointer()) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new4(title_ms, parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget5 constructs a new QDockWidget object. @@ -95,14 +132,28 @@ func NewQDockWidget5(title string, parent *QWidget, flags WindowType) *QDockWidg title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags)) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget6 constructs a new QDockWidget object. func NewQDockWidget6(parent *QWidget, flags WindowType) *QDockWidget { - ret := C.QDockWidget_new6(parent.cPointer(), (C.int)(flags)) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new6(parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDockWidget) MetaObject() *QMetaObject { @@ -134,7 +185,7 @@ func QDockWidget_TrUtf8(s string) string { } func (this *QDockWidget) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_Widget(this.h)), nil, nil) } func (this *QDockWidget) SetWidget(widget *QWidget) { @@ -170,7 +221,7 @@ func (this *QDockWidget) SetTitleBarWidget(widget *QWidget) { } func (this *QDockWidget) TitleBarWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_TitleBarWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_TitleBarWidget(this.h)), nil, nil) } func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { @@ -178,7 +229,7 @@ func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { } func (this *QDockWidget) ToggleViewAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QDockWidget_ToggleViewAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QDockWidget_ToggleViewAction(this.h)), nil) } func (this *QDockWidget) FeaturesChanged(features QDockWidget__DockWidgetFeature) { @@ -325,9 +376,975 @@ func QDockWidget_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDockWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDockWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDockWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ChangeEvent +func miqt_exec_callback_QDockWidget_ChangeEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDockWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDockWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_CloseEvent +func miqt_exec_callback_QDockWidget_CloseEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDockWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDockWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_PaintEvent +func miqt_exec_callback_QDockWidget_PaintEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDockWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDockWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDockWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_Event +func miqt_exec_callback_QDockWidget_Event(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_DevType() int { + + return (int)(C.QDockWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDockWidget) OnDevType(slot func(super func() int) int) { + C.QDockWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DevType +func miqt_exec_callback_QDockWidget_DevType(self *C.QDockWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_SetVisible(visible bool) { + + C.QDockWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDockWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDockWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_SetVisible +func miqt_exec_callback_QDockWidget_SetVisible(self *C.QDockWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDockWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDockWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDockWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDockWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_SizeHint +func miqt_exec_callback_QDockWidget_SizeHint(self *C.QDockWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDockWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDockWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDockWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MinimumSizeHint +func miqt_exec_callback_QDockWidget_MinimumSizeHint(self *C.QDockWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDockWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDockWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDockWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_HeightForWidth +func miqt_exec_callback_QDockWidget_HeightForWidth(self *C.QDockWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDockWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDockWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDockWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_HasHeightForWidth +func miqt_exec_callback_QDockWidget_HasHeightForWidth(self *C.QDockWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDockWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDockWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDockWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_PaintEngine +func miqt_exec_callback_QDockWidget_PaintEngine(self *C.QDockWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MousePressEvent +func miqt_exec_callback_QDockWidget_MousePressEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MouseReleaseEvent +func miqt_exec_callback_QDockWidget_MouseReleaseEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MouseDoubleClickEvent +func miqt_exec_callback_QDockWidget_MouseDoubleClickEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MouseMoveEvent +func miqt_exec_callback_QDockWidget_MouseMoveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDockWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDockWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_WheelEvent +func miqt_exec_callback_QDockWidget_WheelEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDockWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDockWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_KeyPressEvent +func miqt_exec_callback_QDockWidget_KeyPressEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDockWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDockWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_KeyReleaseEvent +func miqt_exec_callback_QDockWidget_KeyReleaseEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDockWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDockWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_FocusInEvent +func miqt_exec_callback_QDockWidget_FocusInEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDockWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDockWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_FocusOutEvent +func miqt_exec_callback_QDockWidget_FocusOutEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_EnterEvent(event *QEvent) { + + C.QDockWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDockWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_EnterEvent +func miqt_exec_callback_QDockWidget_EnterEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDockWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDockWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_LeaveEvent +func miqt_exec_callback_QDockWidget_LeaveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDockWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDockWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MoveEvent +func miqt_exec_callback_QDockWidget_MoveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDockWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDockWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ResizeEvent +func miqt_exec_callback_QDockWidget_ResizeEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDockWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDockWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ContextMenuEvent +func miqt_exec_callback_QDockWidget_ContextMenuEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDockWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDockWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_TabletEvent +func miqt_exec_callback_QDockWidget_TabletEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDockWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDockWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ActionEvent +func miqt_exec_callback_QDockWidget_ActionEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDockWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDockWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DragEnterEvent +func miqt_exec_callback_QDockWidget_DragEnterEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDockWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDockWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DragMoveEvent +func miqt_exec_callback_QDockWidget_DragMoveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDockWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDockWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DragLeaveEvent +func miqt_exec_callback_QDockWidget_DragLeaveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDockWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDockWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DropEvent +func miqt_exec_callback_QDockWidget_DropEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDockWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDockWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ShowEvent +func miqt_exec_callback_QDockWidget_ShowEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDockWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDockWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_HideEvent +func miqt_exec_callback_QDockWidget_HideEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDockWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QDockWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QDockWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_NativeEvent +func miqt_exec_callback_QDockWidget_NativeEvent(self *C.QDockWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDockWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDockWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDockWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_Metric +func miqt_exec_callback_QDockWidget_Metric(self *C.QDockWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDockWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDockWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDockWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InitPainter +func miqt_exec_callback_QDockWidget_InitPainter(self *C.QDockWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDockWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDockWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDockWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_Redirected +func miqt_exec_callback_QDockWidget_Redirected(self *C.QDockWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDockWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDockWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDockWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_SharedPainter +func miqt_exec_callback_QDockWidget_SharedPainter(self *C.QDockWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDockWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDockWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDockWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InputMethodEvent +func miqt_exec_callback_QDockWidget_InputMethodEvent(self *C.QDockWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDockWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDockWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDockWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InputMethodQuery +func miqt_exec_callback_QDockWidget_InputMethodQuery(self *C.QDockWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDockWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDockWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDockWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_FocusNextPrevChild +func miqt_exec_callback_QDockWidget_FocusNextPrevChild(self *C.QDockWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDockWidget) Delete() { - C.QDockWidget_Delete(this.h) + C.QDockWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdockwidget.h b/qt/gen_qdockwidget.h index 0b3a3327..4468e634 100644 --- a/qt/gen_qdockwidget.h +++ b/qt/gen_qdockwidget.h @@ -16,22 +16,76 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDockWidget; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDockWidget* QDockWidget_new(QWidget* parent); -QDockWidget* QDockWidget_new2(struct miqt_string title); -QDockWidget* QDockWidget_new3(); -QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent); -QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags); -QDockWidget* QDockWidget_new6(QWidget* parent, int flags); +void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDockWidget_MetaObject(const QDockWidget* self); void* QDockWidget_Metacast(QDockWidget* self, const char* param1); struct miqt_string QDockWidget_Tr(const char* s); @@ -58,11 +112,97 @@ void QDockWidget_VisibilityChanged(QDockWidget* self, bool visible); void QDockWidget_connect_VisibilityChanged(QDockWidget* self, intptr_t slot); void QDockWidget_DockLocationChanged(QDockWidget* self, int area); void QDockWidget_connect_DockLocationChanged(QDockWidget* self, intptr_t slot); +void QDockWidget_ChangeEvent(QDockWidget* self, QEvent* event); +void QDockWidget_CloseEvent(QDockWidget* self, QCloseEvent* event); +void QDockWidget_PaintEvent(QDockWidget* self, QPaintEvent* event); +bool QDockWidget_Event(QDockWidget* self, QEvent* event); struct miqt_string QDockWidget_Tr2(const char* s, const char* c); struct miqt_string QDockWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QDockWidget_TrUtf82(const char* s, const char* c); struct miqt_string QDockWidget_TrUtf83(const char* s, const char* c, int n); -void QDockWidget_Delete(QDockWidget* self); +void QDockWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDockWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDockWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDockWidget_override_virtual_Event(void* self, intptr_t slot); +bool QDockWidget_virtualbase_Event(void* self, QEvent* event); +void QDockWidget_override_virtual_DevType(void* self, intptr_t slot); +int QDockWidget_virtualbase_DevType(const void* self); +void QDockWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QDockWidget_virtualbase_SetVisible(void* self, bool visible); +void QDockWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDockWidget_virtualbase_SizeHint(const void* self); +void QDockWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDockWidget_virtualbase_MinimumSizeHint(const void* self); +void QDockWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDockWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QDockWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDockWidget_virtualbase_HasHeightForWidth(const void* self); +void QDockWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDockWidget_virtualbase_PaintEngine(const void* self); +void QDockWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDockWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDockWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDockWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDockWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDockWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QDockWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDockWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDockWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDockWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDockWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDockWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDockWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDockWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDockWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDockWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDockWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDockWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDockWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDockWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QDockWidget_override_virtual_Metric(void* self, intptr_t slot); +int QDockWidget_virtualbase_Metric(const void* self, int param1); +void QDockWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QDockWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDockWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDockWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QDockWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDockWidget_virtualbase_SharedPainter(const void* self); +void QDockWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDockWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDockWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QDockWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDockWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDockWidget_Delete(QDockWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdrag.cpp b/qt/gen_qdrag.cpp index 88c529c8..e669b376 100644 --- a/qt/gen_qdrag.cpp +++ b/qt/gen_qdrag.cpp @@ -1,4 +1,7 @@ +#include #include +#include +#include #include #include #include @@ -7,12 +10,195 @@ #include #include #include +#include #include #include "gen_qdrag.h" #include "_cgo_export.h" -QDrag* QDrag_new(QObject* dragSource) { - return new QDrag(dragSource); +class MiqtVirtualQDrag : public virtual QDrag { +public: + + MiqtVirtualQDrag(QObject* dragSource): QDrag(dragSource) {}; + + virtual ~MiqtVirtualQDrag() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDrag::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDrag_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDrag::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDrag::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDrag_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDrag::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDrag::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDrag_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDrag::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDrag::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDrag_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDrag::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDrag::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDrag_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDrag::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDrag::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDrag_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDrag::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDrag::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDrag_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDrag::disconnectNotify(*signal); + + } + +}; + +void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject) { + MiqtVirtualQDrag* ret = new MiqtVirtualQDrag(dragSource); + *outptr_QDrag = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDrag_MetaObject(const QDrag* self) { @@ -119,7 +305,7 @@ void QDrag_ActionChanged(QDrag* self, int action) { } void QDrag_connect_ActionChanged(QDrag* self, intptr_t slot) { - QDrag::connect(self, static_cast(&QDrag::actionChanged), self, [=](Qt::DropAction action) { + MiqtVirtualQDrag::connect(self, static_cast(&QDrag::actionChanged), self, [=](Qt::DropAction action) { Qt::DropAction action_ret = action; int sigval1 = static_cast(action_ret); miqt_exec_callback_QDrag_ActionChanged(slot, sigval1); @@ -131,7 +317,7 @@ void QDrag_TargetChanged(QDrag* self, QObject* newTarget) { } void QDrag_connect_TargetChanged(QDrag* self, intptr_t slot) { - QDrag::connect(self, static_cast(&QDrag::targetChanged), self, [=](QObject* newTarget) { + MiqtVirtualQDrag::connect(self, static_cast(&QDrag::targetChanged), self, [=](QObject* newTarget) { QObject* sigval1 = newTarget; miqt_exec_callback_QDrag_TargetChanged(slot, sigval1); }); @@ -191,7 +377,67 @@ int QDrag_Exec1(QDrag* self, int supportedActions) { return static_cast(_ret); } -void QDrag_Delete(QDrag* self) { - delete self; +void QDrag_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__Event = slot; +} + +bool QDrag_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDrag*)(self) )->virtualbase_Event(event); +} + +void QDrag_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__EventFilter = slot; +} + +bool QDrag_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDrag*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QDrag_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__TimerEvent = slot; +} + +void QDrag_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_TimerEvent(event); +} + +void QDrag_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__ChildEvent = slot; +} + +void QDrag_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_ChildEvent(event); +} + +void QDrag_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__CustomEvent = slot; +} + +void QDrag_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_CustomEvent(event); +} + +void QDrag_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__ConnectNotify = slot; +} + +void QDrag_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDrag_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__DisconnectNotify = slot; +} + +void QDrag_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDrag_Delete(QDrag* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdrag.go b/qt/gen_qdrag.go index 5425ac1c..819fd1d2 100644 --- a/qt/gen_qdrag.go +++ b/qt/gen_qdrag.go @@ -15,7 +15,8 @@ import ( ) type QDrag struct { - h *C.QDrag + h *C.QDrag + isSubclass bool *QObject } @@ -33,21 +34,34 @@ func (this *QDrag) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDrag(h *C.QDrag) *QDrag { +// newQDrag constructs the type using only CGO pointers. +func newQDrag(h *C.QDrag, h_QObject *C.QObject) *QDrag { if h == nil { return nil } - return &QDrag{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QDrag{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQDrag(h unsafe.Pointer) *QDrag { - return newQDrag((*C.QDrag)(h)) +// UnsafeNewQDrag constructs the type using only unsafe pointers. +func UnsafeNewQDrag(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDrag { + if h == nil { + return nil + } + + return &QDrag{h: (*C.QDrag)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQDrag constructs a new QDrag object. func NewQDrag(dragSource *QObject) *QDrag { - ret := C.QDrag_new(dragSource.cPointer()) - return newQDrag(ret) + var outptr_QDrag *C.QDrag = nil + var outptr_QObject *C.QObject = nil + + C.QDrag_new(dragSource.cPointer(), &outptr_QDrag, &outptr_QObject) + ret := newQDrag(outptr_QDrag, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDrag) MetaObject() *QMetaObject { @@ -83,7 +97,7 @@ func (this *QDrag) SetMimeData(data *QMimeData) { } func (this *QDrag) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QDrag_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QDrag_MimeData(this.h)), nil) } func (this *QDrag) SetPixmap(pixmap *QPixmap) { @@ -92,7 +106,7 @@ func (this *QDrag) SetPixmap(pixmap *QPixmap) { func (this *QDrag) Pixmap() *QPixmap { _ret := C.QDrag_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -134,7 +148,7 @@ func (this *QDrag) SetDragCursor(cursor *QPixmap, action DropAction) { func (this *QDrag) DragCursor(action DropAction) *QPixmap { _ret := C.QDrag_DragCursor(this.h, (C.int)(action)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -243,9 +257,175 @@ func (this *QDrag) Exec1(supportedActions DropAction) DropAction { return (DropAction)(C.QDrag_Exec1(this.h, (C.int)(supportedActions))) } +func (this *QDrag) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDrag_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDrag) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDrag_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_Event +func miqt_exec_callback_QDrag_Event(self *C.QDrag, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDrag{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDrag) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QDrag_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QDrag) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QDrag_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_EventFilter +func miqt_exec_callback_QDrag_EventFilter(self *C.QDrag, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDrag{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDrag) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDrag_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDrag) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDrag_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_TimerEvent +func miqt_exec_callback_QDrag_TimerEvent(self *C.QDrag, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDrag{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDrag) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QDrag_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDrag) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QDrag_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_ChildEvent +func miqt_exec_callback_QDrag_ChildEvent(self *C.QDrag, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDrag{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDrag) callVirtualBase_CustomEvent(event *QEvent) { + + C.QDrag_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDrag) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDrag_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_CustomEvent +func miqt_exec_callback_QDrag_CustomEvent(self *C.QDrag, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDrag{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDrag) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QDrag_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDrag) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDrag_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_ConnectNotify +func miqt_exec_callback_QDrag_ConnectNotify(self *C.QDrag, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDrag{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDrag) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QDrag_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDrag) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDrag_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_DisconnectNotify +func miqt_exec_callback_QDrag_DisconnectNotify(self *C.QDrag, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDrag{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDrag) Delete() { - C.QDrag_Delete(this.h) + C.QDrag_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdrag.h b/qt/gen_qdrag.h index ab610745..b9890f3d 100644 --- a/qt/gen_qdrag.h +++ b/qt/gen_qdrag.h @@ -15,22 +15,30 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QDrag; +class QEvent; +class QMetaMethod; class QMetaObject; class QMimeData; class QObject; class QPixmap; class QPoint; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; typedef struct QDrag QDrag; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QObject QObject; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; +typedef struct QTimerEvent QTimerEvent; #endif -QDrag* QDrag_new(QObject* dragSource); +void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject); QMetaObject* QDrag_MetaObject(const QDrag* self); void* QDrag_Metacast(QDrag* self, const char* param1); struct miqt_string QDrag_Tr(const char* s); @@ -61,7 +69,21 @@ struct miqt_string QDrag_TrUtf82(const char* s, const char* c); struct miqt_string QDrag_TrUtf83(const char* s, const char* c, int n); int QDrag_Start1(QDrag* self, int supportedActions); int QDrag_Exec1(QDrag* self, int supportedActions); -void QDrag_Delete(QDrag* self); +void QDrag_override_virtual_Event(void* self, intptr_t slot); +bool QDrag_virtualbase_Event(void* self, QEvent* event); +void QDrag_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDrag_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDrag_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDrag_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDrag_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDrag_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDrag_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDrag_virtualbase_CustomEvent(void* self, QEvent* event); +void QDrag_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDrag_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDrag_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDrag_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDrag_Delete(QDrag* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qdrawutil.cpp b/qt/gen_qdrawutil.cpp index f279b759..c07d5fb8 100644 --- a/qt/gen_qdrawutil.cpp +++ b/qt/gen_qdrawutil.cpp @@ -3,23 +3,31 @@ #include "gen_qdrawutil.h" #include "_cgo_export.h" -QTileRules* QTileRules_new(int horizontalRule, int verticalRule) { - return new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); +void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); + *outptr_QTileRules = ret; } -QTileRules* QTileRules_new2() { - return new QTileRules(); +void QTileRules_new2(QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(); + *outptr_QTileRules = ret; } -QTileRules* QTileRules_new3(QTileRules* param1) { - return new QTileRules(*param1); +void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(*param1); + *outptr_QTileRules = ret; } -QTileRules* QTileRules_new4(int rule) { - return new QTileRules(static_cast(rule)); +void QTileRules_new4(int rule, QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(static_cast(rule)); + *outptr_QTileRules = ret; } -void QTileRules_Delete(QTileRules* self) { - delete self; +void QTileRules_Delete(QTileRules* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qdrawutil.go b/qt/gen_qdrawutil.go index d159167a..1e7c8c57 100644 --- a/qt/gen_qdrawutil.go +++ b/qt/gen_qdrawutil.go @@ -32,7 +32,8 @@ const ( ) type QTileRules struct { - h *C.QTileRules + h *C.QTileRules + isSubclass bool } func (this *QTileRules) cPointer() *C.QTileRules { @@ -49,6 +50,7 @@ func (this *QTileRules) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTileRules constructs the type using only CGO pointers. func newQTileRules(h *C.QTileRules) *QTileRules { if h == nil { return nil @@ -56,37 +58,58 @@ func newQTileRules(h *C.QTileRules) *QTileRules { return &QTileRules{h: h} } +// UnsafeNewQTileRules constructs the type using only unsafe pointers. func UnsafeNewQTileRules(h unsafe.Pointer) *QTileRules { - return newQTileRules((*C.QTileRules)(h)) + if h == nil { + return nil + } + + return &QTileRules{h: (*C.QTileRules)(h)} } // NewQTileRules constructs a new QTileRules object. func NewQTileRules(horizontalRule TileRule, verticalRule TileRule) *QTileRules { - ret := C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule)) - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule), &outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // NewQTileRules2 constructs a new QTileRules object. func NewQTileRules2() *QTileRules { - ret := C.QTileRules_new2() - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new2(&outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // NewQTileRules3 constructs a new QTileRules object. func NewQTileRules3(param1 *QTileRules) *QTileRules { - ret := C.QTileRules_new3(param1.cPointer()) - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new3(param1.cPointer(), &outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // NewQTileRules4 constructs a new QTileRules object. func NewQTileRules4(rule TileRule) *QTileRules { - ret := C.QTileRules_new4((C.int)(rule)) - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new4((C.int)(rule), &outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QTileRules) Delete() { - C.QTileRules_Delete(this.h) + C.QTileRules_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qdrawutil.h b/qt/gen_qdrawutil.h index 837c264c..7c4931e6 100644 --- a/qt/gen_qdrawutil.h +++ b/qt/gen_qdrawutil.h @@ -20,11 +20,11 @@ class QTileRules; typedef struct QTileRules QTileRules; #endif -QTileRules* QTileRules_new(int horizontalRule, int verticalRule); -QTileRules* QTileRules_new2(); -QTileRules* QTileRules_new3(QTileRules* param1); -QTileRules* QTileRules_new4(int rule); -void QTileRules_Delete(QTileRules* self); +void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules); +void QTileRules_new2(QTileRules** outptr_QTileRules); +void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules); +void QTileRules_new4(int rule, QTileRules** outptr_QTileRules); +void QTileRules_Delete(QTileRules* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qeasingcurve.cpp b/qt/gen_qeasingcurve.cpp index 98edb0bc..1e90c1f3 100644 --- a/qt/gen_qeasingcurve.cpp +++ b/qt/gen_qeasingcurve.cpp @@ -5,16 +5,19 @@ #include "gen_qeasingcurve.h" #include "_cgo_export.h" -QEasingCurve* QEasingCurve_new() { - return new QEasingCurve(); +void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve) { + QEasingCurve* ret = new QEasingCurve(); + *outptr_QEasingCurve = ret; } -QEasingCurve* QEasingCurve_new2(QEasingCurve* other) { - return new QEasingCurve(*other); +void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve) { + QEasingCurve* ret = new QEasingCurve(*other); + *outptr_QEasingCurve = ret; } -QEasingCurve* QEasingCurve_new3(int typeVal) { - return new QEasingCurve(static_cast(typeVal)); +void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve) { + QEasingCurve* ret = new QEasingCurve(static_cast(typeVal)); + *outptr_QEasingCurve = ret; } void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other) { @@ -95,7 +98,11 @@ double QEasingCurve_ValueForProgress(const QEasingCurve* self, double progress) return static_cast(_ret); } -void QEasingCurve_Delete(QEasingCurve* self) { - delete self; +void QEasingCurve_Delete(QEasingCurve* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qeasingcurve.go b/qt/gen_qeasingcurve.go index 253a4000..4264e203 100644 --- a/qt/gen_qeasingcurve.go +++ b/qt/gen_qeasingcurve.go @@ -68,7 +68,8 @@ const ( ) type QEasingCurve struct { - h *C.QEasingCurve + h *C.QEasingCurve + isSubclass bool } func (this *QEasingCurve) cPointer() *C.QEasingCurve { @@ -85,6 +86,7 @@ func (this *QEasingCurve) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEasingCurve constructs the type using only CGO pointers. func newQEasingCurve(h *C.QEasingCurve) *QEasingCurve { if h == nil { return nil @@ -92,26 +94,43 @@ func newQEasingCurve(h *C.QEasingCurve) *QEasingCurve { return &QEasingCurve{h: h} } +// UnsafeNewQEasingCurve constructs the type using only unsafe pointers. func UnsafeNewQEasingCurve(h unsafe.Pointer) *QEasingCurve { - return newQEasingCurve((*C.QEasingCurve)(h)) + if h == nil { + return nil + } + + return &QEasingCurve{h: (*C.QEasingCurve)(h)} } // NewQEasingCurve constructs a new QEasingCurve object. func NewQEasingCurve() *QEasingCurve { - ret := C.QEasingCurve_new() - return newQEasingCurve(ret) + var outptr_QEasingCurve *C.QEasingCurve = nil + + C.QEasingCurve_new(&outptr_QEasingCurve) + ret := newQEasingCurve(outptr_QEasingCurve) + ret.isSubclass = true + return ret } // NewQEasingCurve2 constructs a new QEasingCurve object. func NewQEasingCurve2(other *QEasingCurve) *QEasingCurve { - ret := C.QEasingCurve_new2(other.cPointer()) - return newQEasingCurve(ret) + var outptr_QEasingCurve *C.QEasingCurve = nil + + C.QEasingCurve_new2(other.cPointer(), &outptr_QEasingCurve) + ret := newQEasingCurve(outptr_QEasingCurve) + ret.isSubclass = true + return ret } // NewQEasingCurve3 constructs a new QEasingCurve object. func NewQEasingCurve3(typeVal QEasingCurve__Type) *QEasingCurve { - ret := C.QEasingCurve_new3((C.int)(typeVal)) - return newQEasingCurve(ret) + var outptr_QEasingCurve *C.QEasingCurve = nil + + C.QEasingCurve_new3((C.int)(typeVal), &outptr_QEasingCurve) + ret := newQEasingCurve(outptr_QEasingCurve) + ret.isSubclass = true + return ret } func (this *QEasingCurve) OperatorAssign(other *QEasingCurve) { @@ -189,7 +208,7 @@ func (this *QEasingCurve) ValueForProgress(progress float64) float64 { // Delete this object from C++ memory. func (this *QEasingCurve) Delete() { - C.QEasingCurve_Delete(this.h) + C.QEasingCurve_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qeasingcurve.h b/qt/gen_qeasingcurve.h index 5eb672e5..590176c3 100644 --- a/qt/gen_qeasingcurve.h +++ b/qt/gen_qeasingcurve.h @@ -22,9 +22,9 @@ typedef struct QEasingCurve QEasingCurve; typedef struct QPointF QPointF; #endif -QEasingCurve* QEasingCurve_new(); -QEasingCurve* QEasingCurve_new2(QEasingCurve* other); -QEasingCurve* QEasingCurve_new3(int typeVal); +void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve); +void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve); +void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve); void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other); void QEasingCurve_Swap(QEasingCurve* self, QEasingCurve* other); bool QEasingCurve_OperatorEqual(const QEasingCurve* self, QEasingCurve* other); @@ -41,7 +41,7 @@ struct miqt_array /* of QPointF* */ QEasingCurve_ToCubicSpline(const QEasingCur int QEasingCurve_Type(const QEasingCurve* self); void QEasingCurve_SetType(QEasingCurve* self, int typeVal); double QEasingCurve_ValueForProgress(const QEasingCurve* self, double progress); -void QEasingCurve_Delete(QEasingCurve* self); +void QEasingCurve_Delete(QEasingCurve* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qelapsedtimer.cpp b/qt/gen_qelapsedtimer.cpp index fff70637..471d2693 100644 --- a/qt/gen_qelapsedtimer.cpp +++ b/qt/gen_qelapsedtimer.cpp @@ -3,8 +3,9 @@ #include "gen_qelapsedtimer.h" #include "_cgo_export.h" -QElapsedTimer* QElapsedTimer_new() { - return new QElapsedTimer(); +void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer) { + QElapsedTimer* ret = new QElapsedTimer(); + *outptr_QElapsedTimer = ret; } int QElapsedTimer_ClockType() { @@ -70,7 +71,11 @@ bool QElapsedTimer_OperatorNotEqual(const QElapsedTimer* self, QElapsedTimer* ot return self->operator!=(*other); } -void QElapsedTimer_Delete(QElapsedTimer* self) { - delete self; +void QElapsedTimer_Delete(QElapsedTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qelapsedtimer.go b/qt/gen_qelapsedtimer.go index b117631d..ceb5cddd 100644 --- a/qt/gen_qelapsedtimer.go +++ b/qt/gen_qelapsedtimer.go @@ -24,7 +24,8 @@ const ( ) type QElapsedTimer struct { - h *C.QElapsedTimer + h *C.QElapsedTimer + isSubclass bool } func (this *QElapsedTimer) cPointer() *C.QElapsedTimer { @@ -41,6 +42,7 @@ func (this *QElapsedTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQElapsedTimer constructs the type using only CGO pointers. func newQElapsedTimer(h *C.QElapsedTimer) *QElapsedTimer { if h == nil { return nil @@ -48,14 +50,23 @@ func newQElapsedTimer(h *C.QElapsedTimer) *QElapsedTimer { return &QElapsedTimer{h: h} } +// UnsafeNewQElapsedTimer constructs the type using only unsafe pointers. func UnsafeNewQElapsedTimer(h unsafe.Pointer) *QElapsedTimer { - return newQElapsedTimer((*C.QElapsedTimer)(h)) + if h == nil { + return nil + } + + return &QElapsedTimer{h: (*C.QElapsedTimer)(h)} } // NewQElapsedTimer constructs a new QElapsedTimer object. func NewQElapsedTimer() *QElapsedTimer { - ret := C.QElapsedTimer_new() - return newQElapsedTimer(ret) + var outptr_QElapsedTimer *C.QElapsedTimer = nil + + C.QElapsedTimer_new(&outptr_QElapsedTimer) + ret := newQElapsedTimer(outptr_QElapsedTimer) + ret.isSubclass = true + return ret } func QElapsedTimer_ClockType() QElapsedTimer__ClockType { @@ -116,7 +127,7 @@ func (this *QElapsedTimer) OperatorNotEqual(other *QElapsedTimer) bool { // Delete this object from C++ memory. func (this *QElapsedTimer) Delete() { - C.QElapsedTimer_Delete(this.h) + C.QElapsedTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qelapsedtimer.h b/qt/gen_qelapsedtimer.h index 84623da3..57cd98a1 100644 --- a/qt/gen_qelapsedtimer.h +++ b/qt/gen_qelapsedtimer.h @@ -20,7 +20,7 @@ class QElapsedTimer; typedef struct QElapsedTimer QElapsedTimer; #endif -QElapsedTimer* QElapsedTimer_new(); +void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer); int QElapsedTimer_ClockType(); bool QElapsedTimer_IsMonotonic(); void QElapsedTimer_Start(QElapsedTimer* self); @@ -35,7 +35,7 @@ long long QElapsedTimer_MsecsTo(const QElapsedTimer* self, QElapsedTimer* other) long long QElapsedTimer_SecsTo(const QElapsedTimer* self, QElapsedTimer* other); bool QElapsedTimer_OperatorEqual(const QElapsedTimer* self, QElapsedTimer* other); bool QElapsedTimer_OperatorNotEqual(const QElapsedTimer* self, QElapsedTimer* other); -void QElapsedTimer_Delete(QElapsedTimer* self); +void QElapsedTimer_Delete(QElapsedTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qerrormessage.cpp b/qt/gen_qerrormessage.cpp index b0e21a52..9003b6de 100644 --- a/qt/gen_qerrormessage.cpp +++ b/qt/gen_qerrormessage.cpp @@ -1,5 +1,15 @@ +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -8,12 +18,383 @@ #include "gen_qerrormessage.h" #include "_cgo_export.h" -QErrorMessage* QErrorMessage_new(QWidget* parent) { - return new QErrorMessage(parent); +class MiqtVirtualQErrorMessage : public virtual QErrorMessage { +public: + + MiqtVirtualQErrorMessage(QWidget* parent): QErrorMessage(parent) {}; + MiqtVirtualQErrorMessage(): QErrorMessage() {}; + + virtual ~MiqtVirtualQErrorMessage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QErrorMessage::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QErrorMessage_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QErrorMessage::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QErrorMessage::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QErrorMessage_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QErrorMessage::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QErrorMessage::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QErrorMessage_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QErrorMessage::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QErrorMessage::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QErrorMessage_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QErrorMessage::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QErrorMessage::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QErrorMessage_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QErrorMessage::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QErrorMessage::open(); + return; + } + + + miqt_exec_callback_QErrorMessage_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QErrorMessage::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QErrorMessage::exec(); + } + + + int callback_return_value = miqt_exec_callback_QErrorMessage_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QErrorMessage::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QErrorMessage::accept(); + return; + } + + + miqt_exec_callback_QErrorMessage_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QErrorMessage::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QErrorMessage::reject(); + return; + } + + + miqt_exec_callback_QErrorMessage_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QErrorMessage::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QErrorMessage::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QErrorMessage::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QErrorMessage::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QErrorMessage::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QErrorMessage::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QErrorMessage::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QErrorMessage::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QErrorMessage::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QErrorMessage::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QErrorMessage::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QErrorMessage::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QErrorMessage_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QErrorMessage::eventFilter(param1, param2); + + } + +}; + +void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(parent); + *outptr_QErrorMessage = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QErrorMessage* QErrorMessage_new2() { - return new QErrorMessage(); +void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(); + *outptr_QErrorMessage = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self) { @@ -105,7 +486,131 @@ struct miqt_string QErrorMessage_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QErrorMessage_Delete(QErrorMessage* self) { - delete self; +void QErrorMessage_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Done = slot; +} + +void QErrorMessage_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Done(param1); +} + +void QErrorMessage_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ChangeEvent = slot; +} + +void QErrorMessage_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ChangeEvent(e); +} + +void QErrorMessage_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__SetVisible = slot; +} + +void QErrorMessage_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_SetVisible(visible); +} + +void QErrorMessage_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__SizeHint = slot; +} + +QSize* QErrorMessage_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQErrorMessage*)(self) )->virtualbase_SizeHint(); +} + +void QErrorMessage_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QErrorMessage_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQErrorMessage*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QErrorMessage_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Open = slot; +} + +void QErrorMessage_virtualbase_Open(void* self) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Open(); +} + +void QErrorMessage_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Exec = slot; +} + +int QErrorMessage_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Exec(); +} + +void QErrorMessage_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Accept = slot; +} + +void QErrorMessage_virtualbase_Accept(void* self) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Accept(); +} + +void QErrorMessage_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Reject = slot; +} + +void QErrorMessage_virtualbase_Reject(void* self) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Reject(); +} + +void QErrorMessage_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__KeyPressEvent = slot; +} + +void QErrorMessage_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QErrorMessage_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__CloseEvent = slot; +} + +void QErrorMessage_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_CloseEvent(param1); +} + +void QErrorMessage_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ShowEvent = slot; +} + +void QErrorMessage_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ShowEvent(param1); +} + +void QErrorMessage_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ResizeEvent = slot; +} + +void QErrorMessage_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QErrorMessage_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ContextMenuEvent = slot; +} + +void QErrorMessage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QErrorMessage_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__EventFilter = slot; +} + +bool QErrorMessage_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QErrorMessage_Delete(QErrorMessage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qerrormessage.go b/qt/gen_qerrormessage.go index 8f1efd0d..6688771d 100644 --- a/qt/gen_qerrormessage.go +++ b/qt/gen_qerrormessage.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QErrorMessage struct { - h *C.QErrorMessage + h *C.QErrorMessage + isSubclass bool *QDialog } @@ -32,27 +34,51 @@ func (this *QErrorMessage) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQErrorMessage(h *C.QErrorMessage) *QErrorMessage { +// newQErrorMessage constructs the type using only CGO pointers. +func newQErrorMessage(h *C.QErrorMessage, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QErrorMessage { if h == nil { return nil } - return &QErrorMessage{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QErrorMessage{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQErrorMessage(h unsafe.Pointer) *QErrorMessage { - return newQErrorMessage((*C.QErrorMessage)(h)) +// UnsafeNewQErrorMessage constructs the type using only unsafe pointers. +func UnsafeNewQErrorMessage(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QErrorMessage { + if h == nil { + return nil + } + + return &QErrorMessage{h: (*C.QErrorMessage)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQErrorMessage constructs a new QErrorMessage object. func NewQErrorMessage(parent *QWidget) *QErrorMessage { - ret := C.QErrorMessage_new(parent.cPointer()) - return newQErrorMessage(ret) + var outptr_QErrorMessage *C.QErrorMessage = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QErrorMessage_new(parent.cPointer(), &outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQErrorMessage2 constructs a new QErrorMessage object. func NewQErrorMessage2() *QErrorMessage { - ret := C.QErrorMessage_new2() - return newQErrorMessage(ret) + var outptr_QErrorMessage *C.QErrorMessage = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QErrorMessage_new2(&outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QErrorMessage) MetaObject() *QMetaObject { @@ -84,7 +110,7 @@ func QErrorMessage_TrUtf8(s string) string { } func QErrorMessage_QtHandler() *QErrorMessage { - return UnsafeNewQErrorMessage(unsafe.Pointer(C.QErrorMessage_QtHandler())) + return UnsafeNewQErrorMessage(unsafe.Pointer(C.QErrorMessage_QtHandler()), nil, nil, nil, nil) } func (this *QErrorMessage) ShowMessage(message string) { @@ -151,9 +177,351 @@ func QErrorMessage_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QErrorMessage) callVirtualBase_Done(param1 int) { + + C.QErrorMessage_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QErrorMessage) OnDone(slot func(super func(param1 int), param1 int)) { + C.QErrorMessage_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Done +func miqt_exec_callback_QErrorMessage_Done(self *C.QErrorMessage, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QErrorMessage_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QErrorMessage) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QErrorMessage_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ChangeEvent +func miqt_exec_callback_QErrorMessage_ChangeEvent(self *C.QErrorMessage, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_SetVisible(visible bool) { + + C.QErrorMessage_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QErrorMessage) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QErrorMessage_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_SetVisible +func miqt_exec_callback_QErrorMessage_SetVisible(self *C.QErrorMessage, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_SizeHint() *QSize { + + _ret := C.QErrorMessage_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QErrorMessage) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QErrorMessage_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_SizeHint +func miqt_exec_callback_QErrorMessage_SizeHint(self *C.QErrorMessage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QErrorMessage) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QErrorMessage_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QErrorMessage) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QErrorMessage_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_MinimumSizeHint +func miqt_exec_callback_QErrorMessage_MinimumSizeHint(self *C.QErrorMessage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QErrorMessage) callVirtualBase_Open() { + + C.QErrorMessage_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QErrorMessage) OnOpen(slot func(super func())) { + C.QErrorMessage_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Open +func miqt_exec_callback_QErrorMessage_Open(self *C.QErrorMessage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Open) + +} + +func (this *QErrorMessage) callVirtualBase_Exec() int { + + return (int)(C.QErrorMessage_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QErrorMessage) OnExec(slot func(super func() int) int) { + C.QErrorMessage_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Exec +func miqt_exec_callback_QErrorMessage_Exec(self *C.QErrorMessage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QErrorMessage) callVirtualBase_Accept() { + + C.QErrorMessage_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QErrorMessage) OnAccept(slot func(super func())) { + C.QErrorMessage_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Accept +func miqt_exec_callback_QErrorMessage_Accept(self *C.QErrorMessage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Accept) + +} + +func (this *QErrorMessage) callVirtualBase_Reject() { + + C.QErrorMessage_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QErrorMessage) OnReject(slot func(super func())) { + C.QErrorMessage_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Reject +func miqt_exec_callback_QErrorMessage_Reject(self *C.QErrorMessage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Reject) + +} + +func (this *QErrorMessage) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QErrorMessage_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QErrorMessage_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_KeyPressEvent +func miqt_exec_callback_QErrorMessage_KeyPressEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QErrorMessage_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QErrorMessage_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_CloseEvent +func miqt_exec_callback_QErrorMessage_CloseEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QErrorMessage_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QErrorMessage_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ShowEvent +func miqt_exec_callback_QErrorMessage_ShowEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QErrorMessage_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QErrorMessage_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ResizeEvent +func miqt_exec_callback_QErrorMessage_ResizeEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QErrorMessage_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QErrorMessage_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ContextMenuEvent +func miqt_exec_callback_QErrorMessage_ContextMenuEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QErrorMessage_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QErrorMessage) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QErrorMessage_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_EventFilter +func miqt_exec_callback_QErrorMessage_EventFilter(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QErrorMessage) Delete() { - C.QErrorMessage_Delete(this.h) + C.QErrorMessage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qerrormessage.h b/qt/gen_qerrormessage.h index 854dc91f..dec76dc7 100644 --- a/qt/gen_qerrormessage.h +++ b/qt/gen_qerrormessage.h @@ -15,17 +15,37 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; class QErrorMessage; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; typedef struct QErrorMessage QErrorMessage; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QErrorMessage* QErrorMessage_new(QWidget* parent); -QErrorMessage* QErrorMessage_new2(); +void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self); void* QErrorMessage_Metacast(QErrorMessage* self, const char* param1); struct miqt_string QErrorMessage_Tr(const char* s); @@ -33,11 +53,43 @@ struct miqt_string QErrorMessage_TrUtf8(const char* s); QErrorMessage* QErrorMessage_QtHandler(); void QErrorMessage_ShowMessage(QErrorMessage* self, struct miqt_string message); void QErrorMessage_ShowMessage2(QErrorMessage* self, struct miqt_string message, struct miqt_string typeVal); +void QErrorMessage_Done(QErrorMessage* self, int param1); +void QErrorMessage_ChangeEvent(QErrorMessage* self, QEvent* e); struct miqt_string QErrorMessage_Tr2(const char* s, const char* c); struct miqt_string QErrorMessage_Tr3(const char* s, const char* c, int n); struct miqt_string QErrorMessage_TrUtf82(const char* s, const char* c); struct miqt_string QErrorMessage_TrUtf83(const char* s, const char* c, int n); -void QErrorMessage_Delete(QErrorMessage* self); +void QErrorMessage_override_virtual_Done(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Done(void* self, int param1); +void QErrorMessage_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ChangeEvent(void* self, QEvent* e); +void QErrorMessage_override_virtual_SetVisible(void* self, intptr_t slot); +void QErrorMessage_virtualbase_SetVisible(void* self, bool visible); +void QErrorMessage_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QErrorMessage_virtualbase_SizeHint(const void* self); +void QErrorMessage_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QErrorMessage_virtualbase_MinimumSizeHint(const void* self); +void QErrorMessage_override_virtual_Open(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Open(void* self); +void QErrorMessage_override_virtual_Exec(void* self, intptr_t slot); +int QErrorMessage_virtualbase_Exec(void* self); +void QErrorMessage_override_virtual_Accept(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Accept(void* self); +void QErrorMessage_override_virtual_Reject(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Reject(void* self); +void QErrorMessage_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QErrorMessage_override_virtual_CloseEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QErrorMessage_override_virtual_ShowEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QErrorMessage_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QErrorMessage_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QErrorMessage_override_virtual_EventFilter(void* self, intptr_t slot); +bool QErrorMessage_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QErrorMessage_Delete(QErrorMessage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qevent.cpp b/qt/gen_qevent.cpp index 00ea6dec..65b4aeb1 100644 --- a/qt/gen_qevent.cpp +++ b/qt/gen_qevent.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -64,16 +65,22 @@ #include "gen_qevent.h" #include "_cgo_export.h" -QInputEvent* QInputEvent_new(int typeVal) { - return new QInputEvent(static_cast(typeVal)); +void QInputEvent_new(int typeVal, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QInputEvent* ret = new QInputEvent(static_cast(typeVal)); + *outptr_QInputEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputEvent* QInputEvent_new2(QInputEvent* param1) { - return new QInputEvent(*param1); +void QInputEvent_new2(QInputEvent* param1, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QInputEvent* ret = new QInputEvent(*param1); + *outptr_QInputEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputEvent* QInputEvent_new3(int typeVal, int modifiers) { - return new QInputEvent(static_cast(typeVal), static_cast(modifiers)); +void QInputEvent_new3(int typeVal, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QInputEvent* ret = new QInputEvent(static_cast(typeVal), static_cast(modifiers)); + *outptr_QInputEvent = ret; + *outptr_QEvent = static_cast(ret); } int QInputEvent_Modifiers(const QInputEvent* self) { @@ -94,16 +101,24 @@ void QInputEvent_SetTimestamp(QInputEvent* self, unsigned long atimestamp) { self->setTimestamp(static_cast(atimestamp)); } -void QInputEvent_Delete(QInputEvent* self) { - delete self; +void QInputEvent_Delete(QInputEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos) { - return new QEnterEvent(*localPos, *windowPos, *screenPos); +void QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent) { + QEnterEvent* ret = new QEnterEvent(*localPos, *windowPos, *screenPos); + *outptr_QEnterEvent = ret; + *outptr_QEvent = static_cast(ret); } -QEnterEvent* QEnterEvent_new2(QEnterEvent* param1) { - return new QEnterEvent(*param1); +void QEnterEvent_new2(QEnterEvent* param1, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent) { + QEnterEvent* ret = new QEnterEvent(*param1); + *outptr_QEnterEvent = ret; + *outptr_QEvent = static_cast(ret); } QPoint* QEnterEvent_Pos(const QEnterEvent* self) { @@ -148,28 +163,47 @@ QPointF* QEnterEvent_ScreenPos(const QEnterEvent* self) { return const_cast(&_ret); } -void QEnterEvent_Delete(QEnterEvent* self) { - delete self; +void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers) { - return new QMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); +void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); + *outptr_QMouseEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers) { - return new QMouseEvent(static_cast(typeVal), *localPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); +void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); + *outptr_QMouseEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers) { - return new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); +void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); + *outptr_QMouseEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source) { - return new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); +void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); + *outptr_QMouseEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new5(QMouseEvent* param1) { - return new QMouseEvent(*param1); +void QMouseEvent_new5(QMouseEvent* param1, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QMouseEvent* ret = new QMouseEvent(*param1); + *outptr_QMouseEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPoint* QMouseEvent_Pos(const QMouseEvent* self) { @@ -238,20 +272,33 @@ int QMouseEvent_Flags(const QMouseEvent* self) { return static_cast(_ret); } -void QMouseEvent_Delete(QMouseEvent* self) { - delete self; +void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHoverEvent* QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos) { - return new QHoverEvent(static_cast(typeVal), *pos, *oldPos); +void QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QHoverEvent* ret = new QHoverEvent(static_cast(typeVal), *pos, *oldPos); + *outptr_QHoverEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QHoverEvent* QHoverEvent_new2(QHoverEvent* param1) { - return new QHoverEvent(*param1); +void QHoverEvent_new2(QHoverEvent* param1, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QHoverEvent* ret = new QHoverEvent(*param1); + *outptr_QHoverEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers) { - return new QHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); +void QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QHoverEvent* ret = new QHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); + *outptr_QHoverEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPoint* QHoverEvent_Pos(const QHoverEvent* self) { @@ -274,52 +321,89 @@ QPointF* QHoverEvent_OldPosF(const QHoverEvent* self) { return const_cast(&_ret); } -void QHoverEvent_Delete(QHoverEvent* self) { - delete self; +void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWheelEvent* QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers) { - return new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); +void QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers) { - return new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); +void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers)); +void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase)); +void QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source)); +void QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source), inverted); +void QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source), inverted); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); +void QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new8(QWheelEvent* param1) { - return new QWheelEvent(*param1); +void QWheelEvent_new8(QWheelEvent* param1, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*param1); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient) { - return new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); +void QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient) { - return new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); +void QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QWheelEvent* QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); +void QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); + *outptr_QWheelEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self) { @@ -402,20 +486,33 @@ int QWheelEvent_Source(const QWheelEvent* self) { return static_cast(_ret); } -void QWheelEvent_Delete(QWheelEvent* self) { - delete self; +void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTabletEvent* QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID) { - return new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID)); +void QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTabletEvent* ret = new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID)); + *outptr_QTabletEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTabletEvent* QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons) { - return new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID), static_cast(button), static_cast(buttons)); +void QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTabletEvent* ret = new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID), static_cast(button), static_cast(buttons)); + *outptr_QTabletEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTabletEvent* QTabletEvent_new3(QTabletEvent* param1) { - return new QTabletEvent(*param1); +void QTabletEvent_new3(QTabletEvent* param1, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTabletEvent* ret = new QTabletEvent(*param1); + *outptr_QTabletEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPoint* QTabletEvent_Pos(const QTabletEvent* self) { @@ -521,20 +618,33 @@ int QTabletEvent_Buttons(const QTabletEvent* self) { return static_cast(_ret); } -void QTabletEvent_Delete(QTabletEvent* self) { - delete self; +void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument) { - return new QNativeGestureEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); +void QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QNativeGestureEvent* ret = new QNativeGestureEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); + *outptr_QNativeGestureEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument) { - return new QNativeGestureEvent(static_cast(typeVal), dev, *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); +void QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QNativeGestureEvent* ret = new QNativeGestureEvent(static_cast(typeVal), dev, *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); + *outptr_QNativeGestureEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QNativeGestureEvent* QNativeGestureEvent_new3(QNativeGestureEvent* param1) { - return new QNativeGestureEvent(*param1); +void QNativeGestureEvent_new3(QNativeGestureEvent* param1, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QNativeGestureEvent* ret = new QNativeGestureEvent(*param1); + *outptr_QNativeGestureEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } int QNativeGestureEvent_GestureType(const QNativeGestureEvent* self) { @@ -577,50 +687,81 @@ QTouchDevice* QNativeGestureEvent_Device(const QNativeGestureEvent* self) { return (QTouchDevice*) self->device(); } -void QNativeGestureEvent_Delete(QNativeGestureEvent* self) { - delete self; +void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers) { - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); +void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers) { - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); +void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new3(QKeyEvent* param1) { - return new QKeyEvent(*param1); +void QKeyEvent_new3(QKeyEvent* param1, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QKeyEvent* ret = new QKeyEvent(*param1); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text) { +void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep) { +void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count) { +void QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text) { +void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep) { +void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count) { +void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); + QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } int QKeyEvent_Key(const QKeyEvent* self) { @@ -670,20 +811,30 @@ unsigned int QKeyEvent_NativeModifiers(const QKeyEvent* self) { return static_cast(_ret); } -void QKeyEvent_Delete(QKeyEvent* self) { - delete self; +void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QFocusEvent* QFocusEvent_new(int typeVal) { - return new QFocusEvent(static_cast(typeVal)); +void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { + QFocusEvent* ret = new QFocusEvent(static_cast(typeVal)); + *outptr_QFocusEvent = ret; + *outptr_QEvent = static_cast(ret); } -QFocusEvent* QFocusEvent_new2(QFocusEvent* param1) { - return new QFocusEvent(*param1); +void QFocusEvent_new2(QFocusEvent* param1, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { + QFocusEvent* ret = new QFocusEvent(*param1); + *outptr_QFocusEvent = ret; + *outptr_QEvent = static_cast(ret); } -QFocusEvent* QFocusEvent_new3(int typeVal, int reason) { - return new QFocusEvent(static_cast(typeVal), static_cast(reason)); +void QFocusEvent_new3(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { + QFocusEvent* ret = new QFocusEvent(static_cast(typeVal), static_cast(reason)); + *outptr_QFocusEvent = ret; + *outptr_QEvent = static_cast(ret); } bool QFocusEvent_GotFocus(const QFocusEvent* self) { @@ -699,20 +850,30 @@ int QFocusEvent_Reason(const QFocusEvent* self) { return static_cast(_ret); } -void QFocusEvent_Delete(QFocusEvent* self) { - delete self; +void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPaintEvent* QPaintEvent_new(QRegion* paintRegion) { - return new QPaintEvent(*paintRegion); +void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { + QPaintEvent* ret = new QPaintEvent(*paintRegion); + *outptr_QPaintEvent = ret; + *outptr_QEvent = static_cast(ret); } -QPaintEvent* QPaintEvent_new2(QRect* paintRect) { - return new QPaintEvent(*paintRect); +void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { + QPaintEvent* ret = new QPaintEvent(*paintRect); + *outptr_QPaintEvent = ret; + *outptr_QEvent = static_cast(ret); } -QPaintEvent* QPaintEvent_new3(QPaintEvent* param1) { - return new QPaintEvent(*param1); +void QPaintEvent_new3(QPaintEvent* param1, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { + QPaintEvent* ret = new QPaintEvent(*param1); + *outptr_QPaintEvent = ret; + *outptr_QEvent = static_cast(ret); } QRect* QPaintEvent_Rect(const QPaintEvent* self) { @@ -727,16 +888,24 @@ QRegion* QPaintEvent_Region(const QPaintEvent* self) { return const_cast(&_ret); } -void QPaintEvent_Delete(QPaintEvent* self) { - delete self; +void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos) { - return new QMoveEvent(*pos, *oldPos); +void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent) { + QMoveEvent* ret = new QMoveEvent(*pos, *oldPos); + *outptr_QMoveEvent = ret; + *outptr_QEvent = static_cast(ret); } -QMoveEvent* QMoveEvent_new2(QMoveEvent* param1) { - return new QMoveEvent(*param1); +void QMoveEvent_new2(QMoveEvent* param1, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent) { + QMoveEvent* ret = new QMoveEvent(*param1); + *outptr_QMoveEvent = ret; + *outptr_QEvent = static_cast(ret); } QPoint* QMoveEvent_Pos(const QMoveEvent* self) { @@ -751,16 +920,24 @@ QPoint* QMoveEvent_OldPos(const QMoveEvent* self) { return const_cast(&_ret); } -void QMoveEvent_Delete(QMoveEvent* self) { - delete self; +void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QExposeEvent* QExposeEvent_new(QRegion* rgn) { - return new QExposeEvent(*rgn); +void QExposeEvent_new(QRegion* rgn, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent) { + QExposeEvent* ret = new QExposeEvent(*rgn); + *outptr_QExposeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QExposeEvent* QExposeEvent_new2(QExposeEvent* param1) { - return new QExposeEvent(*param1); +void QExposeEvent_new2(QExposeEvent* param1, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent) { + QExposeEvent* ret = new QExposeEvent(*param1); + *outptr_QExposeEvent = ret; + *outptr_QEvent = static_cast(ret); } QRegion* QExposeEvent_Region(const QExposeEvent* self) { @@ -769,16 +946,24 @@ QRegion* QExposeEvent_Region(const QExposeEvent* self) { return const_cast(&_ret); } -void QExposeEvent_Delete(QExposeEvent* self) { - delete self; +void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType) { - return new QPlatformSurfaceEvent(static_cast(surfaceEventType)); +void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent) { + QPlatformSurfaceEvent* ret = new QPlatformSurfaceEvent(static_cast(surfaceEventType)); + *outptr_QPlatformSurfaceEvent = ret; + *outptr_QEvent = static_cast(ret); } -QPlatformSurfaceEvent* QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1) { - return new QPlatformSurfaceEvent(*param1); +void QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent) { + QPlatformSurfaceEvent* ret = new QPlatformSurfaceEvent(*param1); + *outptr_QPlatformSurfaceEvent = ret; + *outptr_QEvent = static_cast(ret); } int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self) { @@ -786,16 +971,24 @@ int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self) { return static_cast(_ret); } -void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self) { - delete self; +void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize) { - return new QResizeEvent(*size, *oldSize); +void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent) { + QResizeEvent* ret = new QResizeEvent(*size, *oldSize); + *outptr_QResizeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QResizeEvent* QResizeEvent_new2(QResizeEvent* param1) { - return new QResizeEvent(*param1); +void QResizeEvent_new2(QResizeEvent* param1, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent) { + QResizeEvent* ret = new QResizeEvent(*param1); + *outptr_QResizeEvent = ret; + *outptr_QEvent = static_cast(ret); } QSize* QResizeEvent_Size(const QResizeEvent* self) { @@ -810,88 +1003,136 @@ QSize* QResizeEvent_OldSize(const QResizeEvent* self) { return const_cast(&_ret); } -void QResizeEvent_Delete(QResizeEvent* self) { - delete self; +void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCloseEvent* QCloseEvent_new() { - return new QCloseEvent(); +void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent) { + QCloseEvent* ret = new QCloseEvent(); + *outptr_QCloseEvent = ret; + *outptr_QEvent = static_cast(ret); } -QCloseEvent* QCloseEvent_new2(QCloseEvent* param1) { - return new QCloseEvent(*param1); +void QCloseEvent_new2(QCloseEvent* param1, QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent) { + QCloseEvent* ret = new QCloseEvent(*param1); + *outptr_QCloseEvent = ret; + *outptr_QEvent = static_cast(ret); } void QCloseEvent_OperatorAssign(QCloseEvent* self, QCloseEvent* param1) { self->operator=(*param1); } -void QCloseEvent_Delete(QCloseEvent* self) { - delete self; +void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QIconDragEvent* QIconDragEvent_new() { - return new QIconDragEvent(); +void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent) { + QIconDragEvent* ret = new QIconDragEvent(); + *outptr_QIconDragEvent = ret; + *outptr_QEvent = static_cast(ret); } -QIconDragEvent* QIconDragEvent_new2(QIconDragEvent* param1) { - return new QIconDragEvent(*param1); +void QIconDragEvent_new2(QIconDragEvent* param1, QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent) { + QIconDragEvent* ret = new QIconDragEvent(*param1); + *outptr_QIconDragEvent = ret; + *outptr_QEvent = static_cast(ret); } void QIconDragEvent_OperatorAssign(QIconDragEvent* self, QIconDragEvent* param1) { self->operator=(*param1); } -void QIconDragEvent_Delete(QIconDragEvent* self) { - delete self; +void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QShowEvent* QShowEvent_new() { - return new QShowEvent(); +void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent) { + QShowEvent* ret = new QShowEvent(); + *outptr_QShowEvent = ret; + *outptr_QEvent = static_cast(ret); } -QShowEvent* QShowEvent_new2(QShowEvent* param1) { - return new QShowEvent(*param1); +void QShowEvent_new2(QShowEvent* param1, QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent) { + QShowEvent* ret = new QShowEvent(*param1); + *outptr_QShowEvent = ret; + *outptr_QEvent = static_cast(ret); } void QShowEvent_OperatorAssign(QShowEvent* self, QShowEvent* param1) { self->operator=(*param1); } -void QShowEvent_Delete(QShowEvent* self) { - delete self; +void QShowEvent_Delete(QShowEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHideEvent* QHideEvent_new() { - return new QHideEvent(); +void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent) { + QHideEvent* ret = new QHideEvent(); + *outptr_QHideEvent = ret; + *outptr_QEvent = static_cast(ret); } -QHideEvent* QHideEvent_new2(QHideEvent* param1) { - return new QHideEvent(*param1); +void QHideEvent_new2(QHideEvent* param1, QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent) { + QHideEvent* ret = new QHideEvent(*param1); + *outptr_QHideEvent = ret; + *outptr_QEvent = static_cast(ret); } void QHideEvent_OperatorAssign(QHideEvent* self, QHideEvent* param1) { self->operator=(*param1); } -void QHideEvent_Delete(QHideEvent* self) { - delete self; +void QHideEvent_Delete(QHideEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers) { - return new QContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); +void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QContextMenuEvent* ret = new QContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos) { - return new QContextMenuEvent(static_cast(reason), *pos, *globalPos); +void QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QContextMenuEvent* ret = new QContextMenuEvent(static_cast(reason), *pos, *globalPos); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos) { - return new QContextMenuEvent(static_cast(reason), *pos); +void QContextMenuEvent_new3(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QContextMenuEvent* ret = new QContextMenuEvent(static_cast(reason), *pos); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QContextMenuEvent* QContextMenuEvent_new4(QContextMenuEvent* param1) { - return new QContextMenuEvent(*param1); +void QContextMenuEvent_new4(QContextMenuEvent* param1, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QContextMenuEvent* ret = new QContextMenuEvent(*param1); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } int QContextMenuEvent_X(const QContextMenuEvent* self) { @@ -927,15 +1168,21 @@ int QContextMenuEvent_Reason(const QContextMenuEvent* self) { return static_cast(_ret); } -void QContextMenuEvent_Delete(QContextMenuEvent* self) { - delete self; +void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QInputMethodEvent* QInputMethodEvent_new() { - return new QInputMethodEvent(); +void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { + QInputMethodEvent* ret = new QInputMethodEvent(); + *outptr_QInputMethodEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes) { +void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { QString preeditText_QString = QString::fromUtf8(preeditText.data, preeditText.len); QList attributes_QList; attributes_QList.reserve(attributes.len); @@ -943,11 +1190,15 @@ QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct for(size_t i = 0; i < attributes.len; ++i) { attributes_QList.push_back(*(attributes_arr[i])); } - return new QInputMethodEvent(preeditText_QString, attributes_QList); + QInputMethodEvent* ret = new QInputMethodEvent(preeditText_QString, attributes_QList); + *outptr_QInputMethodEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputMethodEvent* QInputMethodEvent_new3(QInputMethodEvent* other) { - return new QInputMethodEvent(*other); +void QInputMethodEvent_new3(QInputMethodEvent* other, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { + QInputMethodEvent* ret = new QInputMethodEvent(*other); + *outptr_QInputMethodEvent = ret; + *outptr_QEvent = static_cast(ret); } void QInputMethodEvent_SetCommitString(QInputMethodEvent* self, struct miqt_string commitString) { @@ -1008,16 +1259,24 @@ void QInputMethodEvent_SetCommitString3(QInputMethodEvent* self, struct miqt_str self->setCommitString(commitString_QString, static_cast(replaceFrom), static_cast(replaceLength)); } -void QInputMethodEvent_Delete(QInputMethodEvent* self) { - delete self; +void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries) { - return new QInputMethodQueryEvent(static_cast(queries)); +void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent) { + QInputMethodQueryEvent* ret = new QInputMethodQueryEvent(static_cast(queries)); + *outptr_QInputMethodQueryEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputMethodQueryEvent* QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1) { - return new QInputMethodQueryEvent(*param1); +void QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent) { + QInputMethodQueryEvent* ret = new QInputMethodQueryEvent(*param1); + *outptr_QInputMethodQueryEvent = ret; + *outptr_QEvent = static_cast(ret); } int QInputMethodQueryEvent_Queries(const QInputMethodQueryEvent* self) { @@ -1033,20 +1292,30 @@ QVariant* QInputMethodQueryEvent_Value(const QInputMethodQueryEvent* self, int q return new QVariant(self->value(static_cast(query))); } -void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self) { - delete self; +void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers) { - return new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); +void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDropEvent* ret = new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); + *outptr_QDropEvent = ret; + *outptr_QEvent = static_cast(ret); } -QDropEvent* QDropEvent_new2(QDropEvent* param1) { - return new QDropEvent(*param1); +void QDropEvent_new2(QDropEvent* param1, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDropEvent* ret = new QDropEvent(*param1); + *outptr_QDropEvent = ret; + *outptr_QEvent = static_cast(ret); } -QDropEvent* QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { - return new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +void QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDropEvent* ret = new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); + *outptr_QDropEvent = ret; + *outptr_QEvent = static_cast(ret); } QPoint* QDropEvent_Pos(const QDropEvent* self) { @@ -1100,20 +1369,33 @@ QMimeData* QDropEvent_MimeData(const QDropEvent* self) { return (QMimeData*) self->mimeData(); } -void QDropEvent_Delete(QDropEvent* self) { - delete self; +void QDropEvent_Delete(QDropEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { - return new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); +void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDragMoveEvent* ret = new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); + *outptr_QDragMoveEvent = ret; + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QDragMoveEvent* QDragMoveEvent_new2(QDragMoveEvent* param1) { - return new QDragMoveEvent(*param1); +void QDragMoveEvent_new2(QDragMoveEvent* param1, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDragMoveEvent* ret = new QDragMoveEvent(*param1); + *outptr_QDragMoveEvent = ret; + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QDragMoveEvent* QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { - return new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +void QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDragMoveEvent* ret = new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); + *outptr_QDragMoveEvent = ret; + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self) { @@ -1136,48 +1418,76 @@ void QDragMoveEvent_IgnoreWithQRect(QDragMoveEvent* self, QRect* r) { self->ignore(*r); } -void QDragMoveEvent_Delete(QDragMoveEvent* self) { - delete self; +void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { - return new QDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); +void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDragEnterEvent* ret = new QDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); + *outptr_QDragEnterEvent = ret; + *outptr_QDragMoveEvent = static_cast(ret); + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QDragEnterEvent* QDragEnterEvent_new2(QDragEnterEvent* param1) { - return new QDragEnterEvent(*param1); +void QDragEnterEvent_new2(QDragEnterEvent* param1, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + QDragEnterEvent* ret = new QDragEnterEvent(*param1); + *outptr_QDragEnterEvent = ret; + *outptr_QDragMoveEvent = static_cast(ret); + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } void QDragEnterEvent_OperatorAssign(QDragEnterEvent* self, QDragEnterEvent* param1) { self->operator=(*param1); } -void QDragEnterEvent_Delete(QDragEnterEvent* self) { - delete self; +void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDragLeaveEvent* QDragLeaveEvent_new() { - return new QDragLeaveEvent(); +void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent) { + QDragLeaveEvent* ret = new QDragLeaveEvent(); + *outptr_QDragLeaveEvent = ret; + *outptr_QEvent = static_cast(ret); } -QDragLeaveEvent* QDragLeaveEvent_new2(QDragLeaveEvent* param1) { - return new QDragLeaveEvent(*param1); +void QDragLeaveEvent_new2(QDragLeaveEvent* param1, QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent) { + QDragLeaveEvent* ret = new QDragLeaveEvent(*param1); + *outptr_QDragLeaveEvent = ret; + *outptr_QEvent = static_cast(ret); } void QDragLeaveEvent_OperatorAssign(QDragLeaveEvent* self, QDragLeaveEvent* param1) { self->operator=(*param1); } -void QDragLeaveEvent_Delete(QDragLeaveEvent* self) { - delete self; +void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos) { - return new QHelpEvent(static_cast(typeVal), *pos, *globalPos); +void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent) { + QHelpEvent* ret = new QHelpEvent(static_cast(typeVal), *pos, *globalPos); + *outptr_QHelpEvent = ret; + *outptr_QEvent = static_cast(ret); } -QHelpEvent* QHelpEvent_new2(QHelpEvent* param1) { - return new QHelpEvent(*param1); +void QHelpEvent_new2(QHelpEvent* param1, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent) { + QHelpEvent* ret = new QHelpEvent(*param1); + *outptr_QHelpEvent = ret; + *outptr_QEvent = static_cast(ret); } int QHelpEvent_X(const QHelpEvent* self) { @@ -1208,17 +1518,25 @@ QPoint* QHelpEvent_GlobalPos(const QHelpEvent* self) { return const_cast(&_ret); } -void QHelpEvent_Delete(QHelpEvent* self) { - delete self; +void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip) { +void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent) { QString tip_QString = QString::fromUtf8(tip.data, tip.len); - return new QStatusTipEvent(tip_QString); + QStatusTipEvent* ret = new QStatusTipEvent(tip_QString); + *outptr_QStatusTipEvent = ret; + *outptr_QEvent = static_cast(ret); } -QStatusTipEvent* QStatusTipEvent_new2(QStatusTipEvent* param1) { - return new QStatusTipEvent(*param1); +void QStatusTipEvent_new2(QStatusTipEvent* param1, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent) { + QStatusTipEvent* ret = new QStatusTipEvent(*param1); + *outptr_QStatusTipEvent = ret; + *outptr_QEvent = static_cast(ret); } struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self) { @@ -1232,17 +1550,25 @@ struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self) { return _ms; } -void QStatusTipEvent_Delete(QStatusTipEvent* self) { - delete self; +void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href) { +void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent) { QString href_QString = QString::fromUtf8(href.data, href.len); - return new QWhatsThisClickedEvent(href_QString); + QWhatsThisClickedEvent* ret = new QWhatsThisClickedEvent(href_QString); + *outptr_QWhatsThisClickedEvent = ret; + *outptr_QEvent = static_cast(ret); } -QWhatsThisClickedEvent* QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1) { - return new QWhatsThisClickedEvent(*param1); +void QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent) { + QWhatsThisClickedEvent* ret = new QWhatsThisClickedEvent(*param1); + *outptr_QWhatsThisClickedEvent = ret; + *outptr_QEvent = static_cast(ret); } struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* self) { @@ -1256,20 +1582,30 @@ struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* sel return _ms; } -void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self) { - delete self; +void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QActionEvent* QActionEvent_new(int typeVal, QAction* action) { - return new QActionEvent(static_cast(typeVal), action); +void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { + QActionEvent* ret = new QActionEvent(static_cast(typeVal), action); + *outptr_QActionEvent = ret; + *outptr_QEvent = static_cast(ret); } -QActionEvent* QActionEvent_new2(QActionEvent* param1) { - return new QActionEvent(*param1); +void QActionEvent_new2(QActionEvent* param1, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { + QActionEvent* ret = new QActionEvent(*param1); + *outptr_QActionEvent = ret; + *outptr_QEvent = static_cast(ret); } -QActionEvent* QActionEvent_new3(int typeVal, QAction* action, QAction* before) { - return new QActionEvent(static_cast(typeVal), action, before); +void QActionEvent_new3(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { + QActionEvent* ret = new QActionEvent(static_cast(typeVal), action, before); + *outptr_QActionEvent = ret; + *outptr_QEvent = static_cast(ret); } QAction* QActionEvent_Action(const QActionEvent* self) { @@ -1284,21 +1620,31 @@ void QActionEvent_OperatorAssign(QActionEvent* self, QActionEvent* param1) { self->operator=(*param1); } -void QActionEvent_Delete(QActionEvent* self) { - delete self; +void QActionEvent_Delete(QActionEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file) { +void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QFileOpenEvent(file_QString); + QFileOpenEvent* ret = new QFileOpenEvent(file_QString); + *outptr_QFileOpenEvent = ret; + *outptr_QEvent = static_cast(ret); } -QFileOpenEvent* QFileOpenEvent_new2(QUrl* url) { - return new QFileOpenEvent(*url); +void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { + QFileOpenEvent* ret = new QFileOpenEvent(*url); + *outptr_QFileOpenEvent = ret; + *outptr_QEvent = static_cast(ret); } -QFileOpenEvent* QFileOpenEvent_new3(QFileOpenEvent* param1) { - return new QFileOpenEvent(*param1); +void QFileOpenEvent_new3(QFileOpenEvent* param1, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { + QFileOpenEvent* ret = new QFileOpenEvent(*param1); + *outptr_QFileOpenEvent = ret; + *outptr_QEvent = static_cast(ret); } struct miqt_string QFileOpenEvent_File(const QFileOpenEvent* self) { @@ -1320,36 +1666,54 @@ bool QFileOpenEvent_OpenFile(const QFileOpenEvent* self, QFile* file, int flags) return self->openFile(*file, static_cast(flags)); } -void QFileOpenEvent_Delete(QFileOpenEvent* self) { - delete self; +void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QToolBarChangeEvent* QToolBarChangeEvent_new(bool t) { - return new QToolBarChangeEvent(t); +void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent) { + QToolBarChangeEvent* ret = new QToolBarChangeEvent(t); + *outptr_QToolBarChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QToolBarChangeEvent* QToolBarChangeEvent_new2(QToolBarChangeEvent* param1) { - return new QToolBarChangeEvent(*param1); +void QToolBarChangeEvent_new2(QToolBarChangeEvent* param1, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent) { + QToolBarChangeEvent* ret = new QToolBarChangeEvent(*param1); + *outptr_QToolBarChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self) { return self->toggle(); } -void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self) { - delete self; +void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id) { - return new QShortcutEvent(*key, static_cast(id)); +void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { + QShortcutEvent* ret = new QShortcutEvent(*key, static_cast(id)); + *outptr_QShortcutEvent = ret; + *outptr_QEvent = static_cast(ret); } -QShortcutEvent* QShortcutEvent_new2(QShortcutEvent* param1) { - return new QShortcutEvent(*param1); +void QShortcutEvent_new2(QShortcutEvent* param1, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { + QShortcutEvent* ret = new QShortcutEvent(*param1); + *outptr_QShortcutEvent = ret; + *outptr_QEvent = static_cast(ret); } -QShortcutEvent* QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous) { - return new QShortcutEvent(*key, static_cast(id), ambiguous); +void QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { + QShortcutEvent* ret = new QShortcutEvent(*key, static_cast(id), ambiguous); + *outptr_QShortcutEvent = ret; + *outptr_QEvent = static_cast(ret); } QKeySequence* QShortcutEvent_Key(const QShortcutEvent* self) { @@ -1366,20 +1730,30 @@ bool QShortcutEvent_IsAmbiguous(const QShortcutEvent* self) { return self->isAmbiguous(); } -void QShortcutEvent_Delete(QShortcutEvent* self) { - delete self; +void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWindowStateChangeEvent* QWindowStateChangeEvent_new(int aOldState) { - return new QWindowStateChangeEvent(static_cast(aOldState)); +void QWindowStateChangeEvent_new(int aOldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { + QWindowStateChangeEvent* ret = new QWindowStateChangeEvent(static_cast(aOldState)); + *outptr_QWindowStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QWindowStateChangeEvent* QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1) { - return new QWindowStateChangeEvent(*param1); +void QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { + QWindowStateChangeEvent* ret = new QWindowStateChangeEvent(*param1); + *outptr_QWindowStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QWindowStateChangeEvent* QWindowStateChangeEvent_new3(int aOldState, bool isOverride) { - return new QWindowStateChangeEvent(static_cast(aOldState), isOverride); +void QWindowStateChangeEvent_new3(int aOldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { + QWindowStateChangeEvent* ret = new QWindowStateChangeEvent(static_cast(aOldState), isOverride); + *outptr_QWindowStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } int QWindowStateChangeEvent_OldState(const QWindowStateChangeEvent* self) { @@ -1391,16 +1765,22 @@ bool QWindowStateChangeEvent_IsOverride(const QWindowStateChangeEvent* self) { return self->isOverride(); } -void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self) { - delete self; +void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new() { - return new QPointingDeviceUniqueId(); +void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { + QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(); + *outptr_QPointingDeviceUniqueId = ret; } -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1) { - return new QPointingDeviceUniqueId(*param1); +void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { + QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(*param1); + *outptr_QPointingDeviceUniqueId = ret; } QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id) { @@ -1416,38 +1796,60 @@ long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self) return static_cast(_ret); } -void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self) { - delete self; +void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTouchEvent* QTouchEvent_new(int eventType) { - return new QTouchEvent(static_cast(eventType)); +void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTouchEvent* ret = new QTouchEvent(static_cast(eventType)); + *outptr_QTouchEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new2(QTouchEvent* param1) { - return new QTouchEvent(*param1); +void QTouchEvent_new2(QTouchEvent* param1, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTouchEvent* ret = new QTouchEvent(*param1); + *outptr_QTouchEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new3(int eventType, QTouchDevice* device) { - return new QTouchEvent(static_cast(eventType), device); +void QTouchEvent_new3(int eventType, QTouchDevice* device, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device); + *outptr_QTouchEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers) { - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers)); +void QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device, static_cast(modifiers)); + *outptr_QTouchEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates) { - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); +void QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); + *outptr_QTouchEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints) { +void QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QList touchPoints_QList; touchPoints_QList.reserve(touchPoints.len); QTouchEvent__TouchPoint** touchPoints_arr = static_cast(touchPoints.data); for(size_t i = 0; i < touchPoints.len; ++i) { touchPoints_QList.push_back(*(touchPoints_arr[i])); } - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); + QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); + *outptr_QTouchEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QWindow* QTouchEvent_Window(const QTouchEvent* self) { @@ -1506,16 +1908,24 @@ void QTouchEvent_SetDevice(QTouchEvent* self, QTouchDevice* adevice) { self->setDevice(adevice); } -void QTouchEvent_Delete(QTouchEvent* self) { - delete self; +void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos) { - return new QScrollPrepareEvent(*startPos); +void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent) { + QScrollPrepareEvent* ret = new QScrollPrepareEvent(*startPos); + *outptr_QScrollPrepareEvent = ret; + *outptr_QEvent = static_cast(ret); } -QScrollPrepareEvent* QScrollPrepareEvent_new2(QScrollPrepareEvent* param1) { - return new QScrollPrepareEvent(*param1); +void QScrollPrepareEvent_new2(QScrollPrepareEvent* param1, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent) { + QScrollPrepareEvent* ret = new QScrollPrepareEvent(*param1); + *outptr_QScrollPrepareEvent = ret; + *outptr_QEvent = static_cast(ret); } QPointF* QScrollPrepareEvent_StartPos(const QScrollPrepareEvent* self) { @@ -1546,16 +1956,24 @@ void QScrollPrepareEvent_SetContentPos(QScrollPrepareEvent* self, QPointF* pos) self->setContentPos(*pos); } -void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self) { - delete self; +void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState) { - return new QScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); +void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent) { + QScrollEvent* ret = new QScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); + *outptr_QScrollEvent = ret; + *outptr_QEvent = static_cast(ret); } -QScrollEvent* QScrollEvent_new2(QScrollEvent* param1) { - return new QScrollEvent(*param1); +void QScrollEvent_new2(QScrollEvent* param1, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent) { + QScrollEvent* ret = new QScrollEvent(*param1); + *outptr_QScrollEvent = ret; + *outptr_QEvent = static_cast(ret); } QPointF* QScrollEvent_ContentPos(const QScrollEvent* self) { @@ -1571,16 +1989,24 @@ int QScrollEvent_ScrollState(const QScrollEvent* self) { return static_cast(_ret); } -void QScrollEvent_Delete(QScrollEvent* self) { - delete self; +void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation) { - return new QScreenOrientationChangeEvent(screen, static_cast(orientation)); +void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent) { + QScreenOrientationChangeEvent* ret = new QScreenOrientationChangeEvent(screen, static_cast(orientation)); + *outptr_QScreenOrientationChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1) { - return new QScreenOrientationChangeEvent(*param1); +void QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent) { + QScreenOrientationChangeEvent* ret = new QScreenOrientationChangeEvent(*param1); + *outptr_QScreenOrientationChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } QScreen* QScreenOrientationChangeEvent_Screen(const QScreenOrientationChangeEvent* self) { @@ -1592,16 +2018,24 @@ int QScreenOrientationChangeEvent_Orientation(const QScreenOrientationChangeEven return static_cast(_ret); } -void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self) { - delete self; +void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state) { - return new QApplicationStateChangeEvent(static_cast(state)); +void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent) { + QApplicationStateChangeEvent* ret = new QApplicationStateChangeEvent(static_cast(state)); + *outptr_QApplicationStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QApplicationStateChangeEvent* QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1) { - return new QApplicationStateChangeEvent(*param1); +void QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent) { + QApplicationStateChangeEvent* ret = new QApplicationStateChangeEvent(*param1); + *outptr_QApplicationStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeEvent* self) { @@ -1609,40 +2043,54 @@ int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeE return static_cast(_ret); } -void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self) { - delete self; +void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val) { - return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); +void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { + QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); + *outptr_QInputMethodEvent__Attribute = ret; } -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l) { - return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); +void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { + QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); + *outptr_QInputMethodEvent__Attribute = ret; } -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1) { - return new QInputMethodEvent::Attribute(*param1); +void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { + QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(*param1); + *outptr_QInputMethodEvent__Attribute = ret; } void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1) { self->operator=(*param1); } -void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self) { - delete self; +void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new() { - return new QTouchEvent::TouchPoint(); +void QTouchEvent__TouchPoint_new(QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint) { + QTouchEvent::TouchPoint* ret = new QTouchEvent::TouchPoint(); + *outptr_QTouchEvent__TouchPoint = ret; } -QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other) { - return new QTouchEvent::TouchPoint(*other); +void QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint) { + QTouchEvent::TouchPoint* ret = new QTouchEvent::TouchPoint(*other); + *outptr_QTouchEvent__TouchPoint = ret; } -QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new3(int id) { - return new QTouchEvent::TouchPoint(static_cast(id)); +void QTouchEvent__TouchPoint_new3(int id, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint) { + QTouchEvent::TouchPoint* ret = new QTouchEvent::TouchPoint(static_cast(id)); + *outptr_QTouchEvent__TouchPoint = ret; } void QTouchEvent__TouchPoint_OperatorAssign(QTouchEvent__TouchPoint* self, QTouchEvent__TouchPoint* other) { @@ -1864,7 +2312,11 @@ void QTouchEvent__TouchPoint_SetRawScreenPositions(QTouchEvent__TouchPoint* self self->setRawScreenPositions(positions_QList); } -void QTouchEvent__TouchPoint_Delete(QTouchEvent__TouchPoint* self) { - delete self; +void QTouchEvent__TouchPoint_Delete(QTouchEvent__TouchPoint* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qevent.go b/qt/gen_qevent.go index 5b866364..26b9549d 100644 --- a/qt/gen_qevent.go +++ b/qt/gen_qevent.go @@ -81,7 +81,8 @@ const ( ) type QInputEvent struct { - h *C.QInputEvent + h *C.QInputEvent + isSubclass bool *QEvent } @@ -99,33 +100,56 @@ func (this *QInputEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputEvent(h *C.QInputEvent) *QInputEvent { +// newQInputEvent constructs the type using only CGO pointers. +func newQInputEvent(h *C.QInputEvent, h_QEvent *C.QEvent) *QInputEvent { if h == nil { return nil } - return &QInputEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QInputEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQInputEvent(h unsafe.Pointer) *QInputEvent { - return newQInputEvent((*C.QInputEvent)(h)) +// UnsafeNewQInputEvent constructs the type using only unsafe pointers. +func UnsafeNewQInputEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputEvent { + if h == nil { + return nil + } + + return &QInputEvent{h: (*C.QInputEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQInputEvent constructs a new QInputEvent object. func NewQInputEvent(typeVal QEvent__Type) *QInputEvent { - ret := C.QInputEvent_new((C.int)(typeVal)) - return newQInputEvent(ret) + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputEvent_new((C.int)(typeVal), &outptr_QInputEvent, &outptr_QEvent) + ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputEvent2 constructs a new QInputEvent object. func NewQInputEvent2(param1 *QInputEvent) *QInputEvent { - ret := C.QInputEvent_new2(param1.cPointer()) - return newQInputEvent(ret) + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputEvent_new2(param1.cPointer(), &outptr_QInputEvent, &outptr_QEvent) + ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputEvent3 constructs a new QInputEvent object. func NewQInputEvent3(typeVal QEvent__Type, modifiers KeyboardModifier) *QInputEvent { - ret := C.QInputEvent_new3((C.int)(typeVal), (C.int)(modifiers)) - return newQInputEvent(ret) + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputEvent_new3((C.int)(typeVal), (C.int)(modifiers), &outptr_QInputEvent, &outptr_QEvent) + ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QInputEvent) Modifiers() KeyboardModifier { @@ -146,7 +170,7 @@ func (this *QInputEvent) SetTimestamp(atimestamp uint64) { // Delete this object from C++ memory. func (this *QInputEvent) Delete() { - C.QInputEvent_Delete(this.h) + C.QInputEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -159,7 +183,8 @@ func (this *QInputEvent) GoGC() { } type QEnterEvent struct { - h *C.QEnterEvent + h *C.QEnterEvent + isSubclass bool *QEvent } @@ -177,27 +202,45 @@ func (this *QEnterEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQEnterEvent(h *C.QEnterEvent) *QEnterEvent { +// newQEnterEvent constructs the type using only CGO pointers. +func newQEnterEvent(h *C.QEnterEvent, h_QEvent *C.QEvent) *QEnterEvent { if h == nil { return nil } - return &QEnterEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QEnterEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQEnterEvent(h unsafe.Pointer) *QEnterEvent { - return newQEnterEvent((*C.QEnterEvent)(h)) +// UnsafeNewQEnterEvent constructs the type using only unsafe pointers. +func UnsafeNewQEnterEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QEnterEvent { + if h == nil { + return nil + } + + return &QEnterEvent{h: (*C.QEnterEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQEnterEvent constructs a new QEnterEvent object. func NewQEnterEvent(localPos *QPointF, windowPos *QPointF, screenPos *QPointF) *QEnterEvent { - ret := C.QEnterEvent_new(localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer()) - return newQEnterEvent(ret) + var outptr_QEnterEvent *C.QEnterEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QEnterEvent_new(localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), &outptr_QEnterEvent, &outptr_QEvent) + ret := newQEnterEvent(outptr_QEnterEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQEnterEvent2 constructs a new QEnterEvent object. func NewQEnterEvent2(param1 *QEnterEvent) *QEnterEvent { - ret := C.QEnterEvent_new2(param1.cPointer()) - return newQEnterEvent(ret) + var outptr_QEnterEvent *C.QEnterEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QEnterEvent_new2(param1.cPointer(), &outptr_QEnterEvent, &outptr_QEvent) + ret := newQEnterEvent(outptr_QEnterEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QEnterEvent) Pos() *QPoint { @@ -244,7 +287,7 @@ func (this *QEnterEvent) ScreenPos() *QPointF { // Delete this object from C++ memory. func (this *QEnterEvent) Delete() { - C.QEnterEvent_Delete(this.h) + C.QEnterEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -257,7 +300,8 @@ func (this *QEnterEvent) GoGC() { } type QMouseEvent struct { - h *C.QMouseEvent + h *C.QMouseEvent + isSubclass bool *QInputEvent } @@ -275,45 +319,83 @@ func (this *QMouseEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMouseEvent(h *C.QMouseEvent) *QMouseEvent { +// newQMouseEvent constructs the type using only CGO pointers. +func newQMouseEvent(h *C.QMouseEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QMouseEvent { if h == nil { return nil } - return &QMouseEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QMouseEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQMouseEvent(h unsafe.Pointer) *QMouseEvent { - return newQMouseEvent((*C.QMouseEvent)(h)) +// UnsafeNewQMouseEvent constructs the type using only unsafe pointers. +func UnsafeNewQMouseEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QMouseEvent { + if h == nil { + return nil + } + + return &QMouseEvent{h: (*C.QMouseEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQMouseEvent constructs a new QMouseEvent object. func NewQMouseEvent(typeVal QEvent__Type, localPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - ret := C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent2 constructs a new QMouseEvent object. func NewQMouseEvent2(typeVal QEvent__Type, localPos *QPointF, screenPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - ret := C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent3 constructs a new QMouseEvent object. func NewQMouseEvent3(typeVal QEvent__Type, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - ret := C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent4 constructs a new QMouseEvent object. func NewQMouseEvent4(typeVal QEvent__Type, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, source MouseEventSource) *QMouseEvent { - ret := C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent5 constructs a new QMouseEvent object. func NewQMouseEvent5(param1 *QMouseEvent) *QMouseEvent { - ret := C.QMouseEvent_new5(param1.cPointer()) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new5(param1.cPointer(), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QMouseEvent) Pos() *QPoint { @@ -380,7 +462,7 @@ func (this *QMouseEvent) Flags() MouseEventFlag { // Delete this object from C++ memory. func (this *QMouseEvent) Delete() { - C.QMouseEvent_Delete(this.h) + C.QMouseEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -393,7 +475,8 @@ func (this *QMouseEvent) GoGC() { } type QHoverEvent struct { - h *C.QHoverEvent + h *C.QHoverEvent + isSubclass bool *QInputEvent } @@ -411,33 +494,59 @@ func (this *QHoverEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHoverEvent(h *C.QHoverEvent) *QHoverEvent { +// newQHoverEvent constructs the type using only CGO pointers. +func newQHoverEvent(h *C.QHoverEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QHoverEvent { if h == nil { return nil } - return &QHoverEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QHoverEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQHoverEvent(h unsafe.Pointer) *QHoverEvent { - return newQHoverEvent((*C.QHoverEvent)(h)) +// UnsafeNewQHoverEvent constructs the type using only unsafe pointers. +func UnsafeNewQHoverEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QHoverEvent { + if h == nil { + return nil + } + + return &QHoverEvent{h: (*C.QHoverEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQHoverEvent constructs a new QHoverEvent object. func NewQHoverEvent(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF) *QHoverEvent { - ret := C.QHoverEvent_new((C.int)(typeVal), pos.cPointer(), oldPos.cPointer()) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), &outptr_QHoverEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent2 constructs a new QHoverEvent object. func NewQHoverEvent2(param1 *QHoverEvent) *QHoverEvent { - ret := C.QHoverEvent_new2(param1.cPointer()) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new2(param1.cPointer(), &outptr_QHoverEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent3 constructs a new QHoverEvent object. func NewQHoverEvent3(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF, modifiers KeyboardModifier) *QHoverEvent { - ret := C.QHoverEvent_new3((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers)) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new3((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), &outptr_QHoverEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QHoverEvent) Pos() *QPoint { @@ -464,7 +573,7 @@ func (this *QHoverEvent) OldPosF() *QPointF { // Delete this object from C++ memory. func (this *QHoverEvent) Delete() { - C.QHoverEvent_Delete(this.h) + C.QHoverEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -477,7 +586,8 @@ func (this *QHoverEvent) GoGC() { } type QWheelEvent struct { - h *C.QWheelEvent + h *C.QWheelEvent + isSubclass bool *QInputEvent } @@ -495,81 +605,155 @@ func (this *QWheelEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWheelEvent(h *C.QWheelEvent) *QWheelEvent { +// newQWheelEvent constructs the type using only CGO pointers. +func newQWheelEvent(h *C.QWheelEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QWheelEvent { if h == nil { return nil } - return &QWheelEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QWheelEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQWheelEvent(h unsafe.Pointer) *QWheelEvent { - return newQWheelEvent((*C.QWheelEvent)(h)) +// UnsafeNewQWheelEvent constructs the type using only unsafe pointers. +func UnsafeNewQWheelEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QWheelEvent { + if h == nil { + return nil + } + + return &QWheelEvent{h: (*C.QWheelEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQWheelEvent constructs a new QWheelEvent object. func NewQWheelEvent(pos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier) *QWheelEvent { - ret := C.QWheelEvent_new(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent2 constructs a new QWheelEvent object. func NewQWheelEvent2(pos *QPointF, globalPos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier) *QWheelEvent { - ret := C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent3 constructs a new QWheelEvent object. func NewQWheelEvent3(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier) *QWheelEvent { - ret := C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent4 constructs a new QWheelEvent object. func NewQWheelEvent4(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase) *QWheelEvent { - ret := C.QWheelEvent_new4(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new4(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent5 constructs a new QWheelEvent object. func NewQWheelEvent5(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, source MouseEventSource) *QWheelEvent { - ret := C.QWheelEvent_new5(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new5(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent6 constructs a new QWheelEvent object. func NewQWheelEvent6(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, source MouseEventSource, inverted bool) *QWheelEvent { - ret := C.QWheelEvent_new6(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source), (C.bool)(inverted)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new6(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source), (C.bool)(inverted), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent7 constructs a new QWheelEvent object. func NewQWheelEvent7(pos QPointF, globalPos QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool) *QWheelEvent { - ret := C.QWheelEvent_new7(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new7(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent8 constructs a new QWheelEvent object. func NewQWheelEvent8(param1 *QWheelEvent) *QWheelEvent { - ret := C.QWheelEvent_new8(param1.cPointer()) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new8(param1.cPointer(), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent9 constructs a new QWheelEvent object. func NewQWheelEvent9(pos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier, orient Orientation) *QWheelEvent { - ret := C.QWheelEvent_new9(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new9(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent10 constructs a new QWheelEvent object. func NewQWheelEvent10(pos *QPointF, globalPos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier, orient Orientation) *QWheelEvent { - ret := C.QWheelEvent_new10(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new10(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent11 constructs a new QWheelEvent object. func NewQWheelEvent11(pos QPointF, globalPos QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool, source MouseEventSource) *QWheelEvent { - ret := C.QWheelEvent_new11(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new11(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QWheelEvent) PixelDelta() *QPoint { @@ -664,7 +848,7 @@ func (this *QWheelEvent) Source() MouseEventSource { // Delete this object from C++ memory. func (this *QWheelEvent) Delete() { - C.QWheelEvent_Delete(this.h) + C.QWheelEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -677,7 +861,8 @@ func (this *QWheelEvent) GoGC() { } type QTabletEvent struct { - h *C.QTabletEvent + h *C.QTabletEvent + isSubclass bool *QInputEvent } @@ -695,33 +880,59 @@ func (this *QTabletEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTabletEvent(h *C.QTabletEvent) *QTabletEvent { +// newQTabletEvent constructs the type using only CGO pointers. +func newQTabletEvent(h *C.QTabletEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTabletEvent { if h == nil { return nil } - return &QTabletEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QTabletEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQTabletEvent(h unsafe.Pointer) *QTabletEvent { - return newQTabletEvent((*C.QTabletEvent)(h)) +// UnsafeNewQTabletEvent constructs the type using only unsafe pointers. +func UnsafeNewQTabletEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTabletEvent { + if h == nil { + return nil + } + + return &QTabletEvent{h: (*C.QTabletEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQTabletEvent constructs a new QTabletEvent object. func NewQTabletEvent(t QEvent__Type, pos *QPointF, globalPos *QPointF, device int, pointerType int, pressure float64, xTilt int, yTilt int, tangentialPressure float64, rotation float64, z int, keyState KeyboardModifier, uniqueID int64) *QTabletEvent { - ret := C.QTabletEvent_new((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID)) - return newQTabletEvent(ret) + var outptr_QTabletEvent *C.QTabletEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTabletEvent_new((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID), &outptr_QTabletEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTabletEvent(outptr_QTabletEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTabletEvent2 constructs a new QTabletEvent object. func NewQTabletEvent2(t QEvent__Type, pos *QPointF, globalPos *QPointF, device int, pointerType int, pressure float64, xTilt int, yTilt int, tangentialPressure float64, rotation float64, z int, keyState KeyboardModifier, uniqueID int64, button MouseButton, buttons MouseButton) *QTabletEvent { - ret := C.QTabletEvent_new2((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID), (C.int)(button), (C.int)(buttons)) - return newQTabletEvent(ret) + var outptr_QTabletEvent *C.QTabletEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTabletEvent_new2((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID), (C.int)(button), (C.int)(buttons), &outptr_QTabletEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTabletEvent(outptr_QTabletEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTabletEvent3 constructs a new QTabletEvent object. func NewQTabletEvent3(param1 *QTabletEvent) *QTabletEvent { - ret := C.QTabletEvent_new3(param1.cPointer()) - return newQTabletEvent(ret) + var outptr_QTabletEvent *C.QTabletEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTabletEvent_new3(param1.cPointer(), &outptr_QTabletEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTabletEvent(outptr_QTabletEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QTabletEvent) Pos() *QPoint { @@ -820,7 +1031,7 @@ func (this *QTabletEvent) Buttons() MouseButton { // Delete this object from C++ memory. func (this *QTabletEvent) Delete() { - C.QTabletEvent_Delete(this.h) + C.QTabletEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -833,7 +1044,8 @@ func (this *QTabletEvent) GoGC() { } type QNativeGestureEvent struct { - h *C.QNativeGestureEvent + h *C.QNativeGestureEvent + isSubclass bool *QInputEvent } @@ -851,33 +1063,59 @@ func (this *QNativeGestureEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNativeGestureEvent(h *C.QNativeGestureEvent) *QNativeGestureEvent { +// newQNativeGestureEvent constructs the type using only CGO pointers. +func newQNativeGestureEvent(h *C.QNativeGestureEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QNativeGestureEvent { if h == nil { return nil } - return &QNativeGestureEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QNativeGestureEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQNativeGestureEvent(h unsafe.Pointer) *QNativeGestureEvent { - return newQNativeGestureEvent((*C.QNativeGestureEvent)(h)) +// UnsafeNewQNativeGestureEvent constructs the type using only unsafe pointers. +func UnsafeNewQNativeGestureEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QNativeGestureEvent { + if h == nil { + return nil + } + + return &QNativeGestureEvent{h: (*C.QNativeGestureEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQNativeGestureEvent constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent(typeVal NativeGestureType, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, value float64, sequenceId uint64, intArgument uint64) *QNativeGestureEvent { - ret := C.QNativeGestureEvent_new((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument)) - return newQNativeGestureEvent(ret) + var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QNativeGestureEvent_new((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument), &outptr_QNativeGestureEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQNativeGestureEvent2 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent2(typeVal NativeGestureType, dev *QTouchDevice, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, value float64, sequenceId uint64, intArgument uint64) *QNativeGestureEvent { - ret := C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument)) - return newQNativeGestureEvent(ret) + var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument), &outptr_QNativeGestureEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQNativeGestureEvent3 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent3(param1 *QNativeGestureEvent) *QNativeGestureEvent { - ret := C.QNativeGestureEvent_new3(param1.cPointer()) - return newQNativeGestureEvent(ret) + var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QNativeGestureEvent_new3(param1.cPointer(), &outptr_QNativeGestureEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QNativeGestureEvent) GestureType() NativeGestureType { @@ -920,7 +1158,7 @@ func (this *QNativeGestureEvent) Device() *QTouchDevice { // Delete this object from C++ memory. func (this *QNativeGestureEvent) Delete() { - C.QNativeGestureEvent_Delete(this.h) + C.QNativeGestureEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -933,7 +1171,8 @@ func (this *QNativeGestureEvent) GoGC() { } type QKeyEvent struct { - h *C.QKeyEvent + h *C.QKeyEvent + isSubclass bool *QInputEvent } @@ -951,33 +1190,59 @@ func (this *QKeyEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQKeyEvent(h *C.QKeyEvent) *QKeyEvent { +// newQKeyEvent constructs the type using only CGO pointers. +func newQKeyEvent(h *C.QKeyEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QKeyEvent { if h == nil { return nil } - return &QKeyEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QKeyEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQKeyEvent(h unsafe.Pointer) *QKeyEvent { - return newQKeyEvent((*C.QKeyEvent)(h)) +// UnsafeNewQKeyEvent constructs the type using only unsafe pointers. +func UnsafeNewQKeyEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QKeyEvent { + if h == nil { + return nil + } + + return &QKeyEvent{h: (*C.QKeyEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQKeyEvent constructs a new QKeyEvent object. func NewQKeyEvent(typeVal QEvent__Type, key int, modifiers KeyboardModifier) *QKeyEvent { - ret := C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent2 constructs a new QKeyEvent object. func NewQKeyEvent2(typeVal QEvent__Type, key int, modifiers KeyboardModifier, nativeScanCode uint, nativeVirtualKey uint, nativeModifiers uint) *QKeyEvent { - ret := C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent3 constructs a new QKeyEvent object. func NewQKeyEvent3(param1 *QKeyEvent) *QKeyEvent { - ret := C.QKeyEvent_new3(param1.cPointer()) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new3(param1.cPointer(), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent4 constructs a new QKeyEvent object. @@ -986,8 +1251,14 @@ func NewQKeyEvent4(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent5 constructs a new QKeyEvent object. @@ -996,8 +1267,14 @@ func NewQKeyEvent5(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent6 constructs a new QKeyEvent object. @@ -1006,8 +1283,14 @@ func NewQKeyEvent6(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent7 constructs a new QKeyEvent object. @@ -1016,8 +1299,14 @@ func NewQKeyEvent7(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent8 constructs a new QKeyEvent object. @@ -1026,8 +1315,14 @@ func NewQKeyEvent8(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent9 constructs a new QKeyEvent object. @@ -1036,8 +1331,14 @@ func NewQKeyEvent9(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QKeyEvent) Key() int { @@ -1081,7 +1382,7 @@ func (this *QKeyEvent) NativeModifiers() uint { // Delete this object from C++ memory. func (this *QKeyEvent) Delete() { - C.QKeyEvent_Delete(this.h) + C.QKeyEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1094,7 +1395,8 @@ func (this *QKeyEvent) GoGC() { } type QFocusEvent struct { - h *C.QFocusEvent + h *C.QFocusEvent + isSubclass bool *QEvent } @@ -1112,33 +1414,56 @@ func (this *QFocusEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFocusEvent(h *C.QFocusEvent) *QFocusEvent { +// newQFocusEvent constructs the type using only CGO pointers. +func newQFocusEvent(h *C.QFocusEvent, h_QEvent *C.QEvent) *QFocusEvent { if h == nil { return nil } - return &QFocusEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QFocusEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQFocusEvent(h unsafe.Pointer) *QFocusEvent { - return newQFocusEvent((*C.QFocusEvent)(h)) +// UnsafeNewQFocusEvent constructs the type using only unsafe pointers. +func UnsafeNewQFocusEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFocusEvent { + if h == nil { + return nil + } + + return &QFocusEvent{h: (*C.QFocusEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQFocusEvent constructs a new QFocusEvent object. func NewQFocusEvent(typeVal QEvent__Type) *QFocusEvent { - ret := C.QFocusEvent_new((C.int)(typeVal)) - return newQFocusEvent(ret) + var outptr_QFocusEvent *C.QFocusEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFocusEvent_new((C.int)(typeVal), &outptr_QFocusEvent, &outptr_QEvent) + ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQFocusEvent2 constructs a new QFocusEvent object. func NewQFocusEvent2(param1 *QFocusEvent) *QFocusEvent { - ret := C.QFocusEvent_new2(param1.cPointer()) - return newQFocusEvent(ret) + var outptr_QFocusEvent *C.QFocusEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFocusEvent_new2(param1.cPointer(), &outptr_QFocusEvent, &outptr_QEvent) + ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQFocusEvent3 constructs a new QFocusEvent object. func NewQFocusEvent3(typeVal QEvent__Type, reason FocusReason) *QFocusEvent { - ret := C.QFocusEvent_new3((C.int)(typeVal), (C.int)(reason)) - return newQFocusEvent(ret) + var outptr_QFocusEvent *C.QFocusEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFocusEvent_new3((C.int)(typeVal), (C.int)(reason), &outptr_QFocusEvent, &outptr_QEvent) + ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QFocusEvent) GotFocus() bool { @@ -1155,7 +1480,7 @@ func (this *QFocusEvent) Reason() FocusReason { // Delete this object from C++ memory. func (this *QFocusEvent) Delete() { - C.QFocusEvent_Delete(this.h) + C.QFocusEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1168,7 +1493,8 @@ func (this *QFocusEvent) GoGC() { } type QPaintEvent struct { - h *C.QPaintEvent + h *C.QPaintEvent + isSubclass bool *QEvent } @@ -1186,33 +1512,56 @@ func (this *QPaintEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPaintEvent(h *C.QPaintEvent) *QPaintEvent { +// newQPaintEvent constructs the type using only CGO pointers. +func newQPaintEvent(h *C.QPaintEvent, h_QEvent *C.QEvent) *QPaintEvent { if h == nil { return nil } - return &QPaintEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QPaintEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQPaintEvent(h unsafe.Pointer) *QPaintEvent { - return newQPaintEvent((*C.QPaintEvent)(h)) +// UnsafeNewQPaintEvent constructs the type using only unsafe pointers. +func UnsafeNewQPaintEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPaintEvent { + if h == nil { + return nil + } + + return &QPaintEvent{h: (*C.QPaintEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQPaintEvent constructs a new QPaintEvent object. func NewQPaintEvent(paintRegion *QRegion) *QPaintEvent { - ret := C.QPaintEvent_new(paintRegion.cPointer()) - return newQPaintEvent(ret) + var outptr_QPaintEvent *C.QPaintEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPaintEvent_new(paintRegion.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) + ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQPaintEvent2 constructs a new QPaintEvent object. func NewQPaintEvent2(paintRect *QRect) *QPaintEvent { - ret := C.QPaintEvent_new2(paintRect.cPointer()) - return newQPaintEvent(ret) + var outptr_QPaintEvent *C.QPaintEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPaintEvent_new2(paintRect.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) + ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQPaintEvent3 constructs a new QPaintEvent object. func NewQPaintEvent3(param1 *QPaintEvent) *QPaintEvent { - ret := C.QPaintEvent_new3(param1.cPointer()) - return newQPaintEvent(ret) + var outptr_QPaintEvent *C.QPaintEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPaintEvent_new3(param1.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) + ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QPaintEvent) Rect() *QRect { @@ -1225,7 +1574,7 @@ func (this *QPaintEvent) Region() *QRegion { // Delete this object from C++ memory. func (this *QPaintEvent) Delete() { - C.QPaintEvent_Delete(this.h) + C.QPaintEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1238,7 +1587,8 @@ func (this *QPaintEvent) GoGC() { } type QMoveEvent struct { - h *C.QMoveEvent + h *C.QMoveEvent + isSubclass bool *QEvent } @@ -1256,27 +1606,45 @@ func (this *QMoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMoveEvent(h *C.QMoveEvent) *QMoveEvent { +// newQMoveEvent constructs the type using only CGO pointers. +func newQMoveEvent(h *C.QMoveEvent, h_QEvent *C.QEvent) *QMoveEvent { if h == nil { return nil } - return &QMoveEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QMoveEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQMoveEvent(h unsafe.Pointer) *QMoveEvent { - return newQMoveEvent((*C.QMoveEvent)(h)) +// UnsafeNewQMoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQMoveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QMoveEvent { + if h == nil { + return nil + } + + return &QMoveEvent{h: (*C.QMoveEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQMoveEvent constructs a new QMoveEvent object. func NewQMoveEvent(pos *QPoint, oldPos *QPoint) *QMoveEvent { - ret := C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer()) - return newQMoveEvent(ret) + var outptr_QMoveEvent *C.QMoveEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer(), &outptr_QMoveEvent, &outptr_QEvent) + ret := newQMoveEvent(outptr_QMoveEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMoveEvent2 constructs a new QMoveEvent object. func NewQMoveEvent2(param1 *QMoveEvent) *QMoveEvent { - ret := C.QMoveEvent_new2(param1.cPointer()) - return newQMoveEvent(ret) + var outptr_QMoveEvent *C.QMoveEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMoveEvent_new2(param1.cPointer(), &outptr_QMoveEvent, &outptr_QEvent) + ret := newQMoveEvent(outptr_QMoveEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QMoveEvent) Pos() *QPoint { @@ -1289,7 +1657,7 @@ func (this *QMoveEvent) OldPos() *QPoint { // Delete this object from C++ memory. func (this *QMoveEvent) Delete() { - C.QMoveEvent_Delete(this.h) + C.QMoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1302,7 +1670,8 @@ func (this *QMoveEvent) GoGC() { } type QExposeEvent struct { - h *C.QExposeEvent + h *C.QExposeEvent + isSubclass bool *QEvent } @@ -1320,27 +1689,45 @@ func (this *QExposeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQExposeEvent(h *C.QExposeEvent) *QExposeEvent { +// newQExposeEvent constructs the type using only CGO pointers. +func newQExposeEvent(h *C.QExposeEvent, h_QEvent *C.QEvent) *QExposeEvent { if h == nil { return nil } - return &QExposeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QExposeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQExposeEvent(h unsafe.Pointer) *QExposeEvent { - return newQExposeEvent((*C.QExposeEvent)(h)) +// UnsafeNewQExposeEvent constructs the type using only unsafe pointers. +func UnsafeNewQExposeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QExposeEvent { + if h == nil { + return nil + } + + return &QExposeEvent{h: (*C.QExposeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQExposeEvent constructs a new QExposeEvent object. func NewQExposeEvent(rgn *QRegion) *QExposeEvent { - ret := C.QExposeEvent_new(rgn.cPointer()) - return newQExposeEvent(ret) + var outptr_QExposeEvent *C.QExposeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QExposeEvent_new(rgn.cPointer(), &outptr_QExposeEvent, &outptr_QEvent) + ret := newQExposeEvent(outptr_QExposeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQExposeEvent2 constructs a new QExposeEvent object. func NewQExposeEvent2(param1 *QExposeEvent) *QExposeEvent { - ret := C.QExposeEvent_new2(param1.cPointer()) - return newQExposeEvent(ret) + var outptr_QExposeEvent *C.QExposeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QExposeEvent_new2(param1.cPointer(), &outptr_QExposeEvent, &outptr_QEvent) + ret := newQExposeEvent(outptr_QExposeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QExposeEvent) Region() *QRegion { @@ -1349,7 +1736,7 @@ func (this *QExposeEvent) Region() *QRegion { // Delete this object from C++ memory. func (this *QExposeEvent) Delete() { - C.QExposeEvent_Delete(this.h) + C.QExposeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1362,7 +1749,8 @@ func (this *QExposeEvent) GoGC() { } type QPlatformSurfaceEvent struct { - h *C.QPlatformSurfaceEvent + h *C.QPlatformSurfaceEvent + isSubclass bool *QEvent } @@ -1380,27 +1768,45 @@ func (this *QPlatformSurfaceEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent) *QPlatformSurfaceEvent { +// newQPlatformSurfaceEvent constructs the type using only CGO pointers. +func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent, h_QEvent *C.QEvent) *QPlatformSurfaceEvent { if h == nil { return nil } - return &QPlatformSurfaceEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QPlatformSurfaceEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer) *QPlatformSurfaceEvent { - return newQPlatformSurfaceEvent((*C.QPlatformSurfaceEvent)(h)) +// UnsafeNewQPlatformSurfaceEvent constructs the type using only unsafe pointers. +func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPlatformSurfaceEvent { + if h == nil { + return nil + } + + return &QPlatformSurfaceEvent{h: (*C.QPlatformSurfaceEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQPlatformSurfaceEvent constructs a new QPlatformSurfaceEvent object. func NewQPlatformSurfaceEvent(surfaceEventType QPlatformSurfaceEvent__SurfaceEventType) *QPlatformSurfaceEvent { - ret := C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType)) - return newQPlatformSurfaceEvent(ret) + var outptr_QPlatformSurfaceEvent *C.QPlatformSurfaceEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType), &outptr_QPlatformSurfaceEvent, &outptr_QEvent) + ret := newQPlatformSurfaceEvent(outptr_QPlatformSurfaceEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQPlatformSurfaceEvent2 constructs a new QPlatformSurfaceEvent object. func NewQPlatformSurfaceEvent2(param1 *QPlatformSurfaceEvent) *QPlatformSurfaceEvent { - ret := C.QPlatformSurfaceEvent_new2(param1.cPointer()) - return newQPlatformSurfaceEvent(ret) + var outptr_QPlatformSurfaceEvent *C.QPlatformSurfaceEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPlatformSurfaceEvent_new2(param1.cPointer(), &outptr_QPlatformSurfaceEvent, &outptr_QEvent) + ret := newQPlatformSurfaceEvent(outptr_QPlatformSurfaceEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QPlatformSurfaceEvent) SurfaceEventType() QPlatformSurfaceEvent__SurfaceEventType { @@ -1409,7 +1815,7 @@ func (this *QPlatformSurfaceEvent) SurfaceEventType() QPlatformSurfaceEvent__Sur // Delete this object from C++ memory. func (this *QPlatformSurfaceEvent) Delete() { - C.QPlatformSurfaceEvent_Delete(this.h) + C.QPlatformSurfaceEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1422,7 +1828,8 @@ func (this *QPlatformSurfaceEvent) GoGC() { } type QResizeEvent struct { - h *C.QResizeEvent + h *C.QResizeEvent + isSubclass bool *QEvent } @@ -1440,27 +1847,45 @@ func (this *QResizeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQResizeEvent(h *C.QResizeEvent) *QResizeEvent { +// newQResizeEvent constructs the type using only CGO pointers. +func newQResizeEvent(h *C.QResizeEvent, h_QEvent *C.QEvent) *QResizeEvent { if h == nil { return nil } - return &QResizeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QResizeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQResizeEvent(h unsafe.Pointer) *QResizeEvent { - return newQResizeEvent((*C.QResizeEvent)(h)) +// UnsafeNewQResizeEvent constructs the type using only unsafe pointers. +func UnsafeNewQResizeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QResizeEvent { + if h == nil { + return nil + } + + return &QResizeEvent{h: (*C.QResizeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQResizeEvent constructs a new QResizeEvent object. func NewQResizeEvent(size *QSize, oldSize *QSize) *QResizeEvent { - ret := C.QResizeEvent_new(size.cPointer(), oldSize.cPointer()) - return newQResizeEvent(ret) + var outptr_QResizeEvent *C.QResizeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QResizeEvent_new(size.cPointer(), oldSize.cPointer(), &outptr_QResizeEvent, &outptr_QEvent) + ret := newQResizeEvent(outptr_QResizeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQResizeEvent2 constructs a new QResizeEvent object. func NewQResizeEvent2(param1 *QResizeEvent) *QResizeEvent { - ret := C.QResizeEvent_new2(param1.cPointer()) - return newQResizeEvent(ret) + var outptr_QResizeEvent *C.QResizeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QResizeEvent_new2(param1.cPointer(), &outptr_QResizeEvent, &outptr_QEvent) + ret := newQResizeEvent(outptr_QResizeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QResizeEvent) Size() *QSize { @@ -1473,7 +1898,7 @@ func (this *QResizeEvent) OldSize() *QSize { // Delete this object from C++ memory. func (this *QResizeEvent) Delete() { - C.QResizeEvent_Delete(this.h) + C.QResizeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1486,7 +1911,8 @@ func (this *QResizeEvent) GoGC() { } type QCloseEvent struct { - h *C.QCloseEvent + h *C.QCloseEvent + isSubclass bool *QEvent } @@ -1504,27 +1930,45 @@ func (this *QCloseEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCloseEvent(h *C.QCloseEvent) *QCloseEvent { +// newQCloseEvent constructs the type using only CGO pointers. +func newQCloseEvent(h *C.QCloseEvent, h_QEvent *C.QEvent) *QCloseEvent { if h == nil { return nil } - return &QCloseEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QCloseEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQCloseEvent(h unsafe.Pointer) *QCloseEvent { - return newQCloseEvent((*C.QCloseEvent)(h)) +// UnsafeNewQCloseEvent constructs the type using only unsafe pointers. +func UnsafeNewQCloseEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QCloseEvent { + if h == nil { + return nil + } + + return &QCloseEvent{h: (*C.QCloseEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQCloseEvent constructs a new QCloseEvent object. func NewQCloseEvent() *QCloseEvent { - ret := C.QCloseEvent_new() - return newQCloseEvent(ret) + var outptr_QCloseEvent *C.QCloseEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QCloseEvent_new(&outptr_QCloseEvent, &outptr_QEvent) + ret := newQCloseEvent(outptr_QCloseEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQCloseEvent2 constructs a new QCloseEvent object. func NewQCloseEvent2(param1 *QCloseEvent) *QCloseEvent { - ret := C.QCloseEvent_new2(param1.cPointer()) - return newQCloseEvent(ret) + var outptr_QCloseEvent *C.QCloseEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QCloseEvent_new2(param1.cPointer(), &outptr_QCloseEvent, &outptr_QEvent) + ret := newQCloseEvent(outptr_QCloseEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QCloseEvent) OperatorAssign(param1 *QCloseEvent) { @@ -1533,7 +1977,7 @@ func (this *QCloseEvent) OperatorAssign(param1 *QCloseEvent) { // Delete this object from C++ memory. func (this *QCloseEvent) Delete() { - C.QCloseEvent_Delete(this.h) + C.QCloseEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1546,7 +1990,8 @@ func (this *QCloseEvent) GoGC() { } type QIconDragEvent struct { - h *C.QIconDragEvent + h *C.QIconDragEvent + isSubclass bool *QEvent } @@ -1564,27 +2009,45 @@ func (this *QIconDragEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIconDragEvent(h *C.QIconDragEvent) *QIconDragEvent { +// newQIconDragEvent constructs the type using only CGO pointers. +func newQIconDragEvent(h *C.QIconDragEvent, h_QEvent *C.QEvent) *QIconDragEvent { if h == nil { return nil } - return &QIconDragEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QIconDragEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQIconDragEvent(h unsafe.Pointer) *QIconDragEvent { - return newQIconDragEvent((*C.QIconDragEvent)(h)) +// UnsafeNewQIconDragEvent constructs the type using only unsafe pointers. +func UnsafeNewQIconDragEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QIconDragEvent { + if h == nil { + return nil + } + + return &QIconDragEvent{h: (*C.QIconDragEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQIconDragEvent constructs a new QIconDragEvent object. func NewQIconDragEvent() *QIconDragEvent { - ret := C.QIconDragEvent_new() - return newQIconDragEvent(ret) + var outptr_QIconDragEvent *C.QIconDragEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QIconDragEvent_new(&outptr_QIconDragEvent, &outptr_QEvent) + ret := newQIconDragEvent(outptr_QIconDragEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQIconDragEvent2 constructs a new QIconDragEvent object. func NewQIconDragEvent2(param1 *QIconDragEvent) *QIconDragEvent { - ret := C.QIconDragEvent_new2(param1.cPointer()) - return newQIconDragEvent(ret) + var outptr_QIconDragEvent *C.QIconDragEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QIconDragEvent_new2(param1.cPointer(), &outptr_QIconDragEvent, &outptr_QEvent) + ret := newQIconDragEvent(outptr_QIconDragEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QIconDragEvent) OperatorAssign(param1 *QIconDragEvent) { @@ -1593,7 +2056,7 @@ func (this *QIconDragEvent) OperatorAssign(param1 *QIconDragEvent) { // Delete this object from C++ memory. func (this *QIconDragEvent) Delete() { - C.QIconDragEvent_Delete(this.h) + C.QIconDragEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1606,7 +2069,8 @@ func (this *QIconDragEvent) GoGC() { } type QShowEvent struct { - h *C.QShowEvent + h *C.QShowEvent + isSubclass bool *QEvent } @@ -1624,27 +2088,45 @@ func (this *QShowEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQShowEvent(h *C.QShowEvent) *QShowEvent { +// newQShowEvent constructs the type using only CGO pointers. +func newQShowEvent(h *C.QShowEvent, h_QEvent *C.QEvent) *QShowEvent { if h == nil { return nil } - return &QShowEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QShowEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQShowEvent(h unsafe.Pointer) *QShowEvent { - return newQShowEvent((*C.QShowEvent)(h)) +// UnsafeNewQShowEvent constructs the type using only unsafe pointers. +func UnsafeNewQShowEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShowEvent { + if h == nil { + return nil + } + + return &QShowEvent{h: (*C.QShowEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQShowEvent constructs a new QShowEvent object. func NewQShowEvent() *QShowEvent { - ret := C.QShowEvent_new() - return newQShowEvent(ret) + var outptr_QShowEvent *C.QShowEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShowEvent_new(&outptr_QShowEvent, &outptr_QEvent) + ret := newQShowEvent(outptr_QShowEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQShowEvent2 constructs a new QShowEvent object. func NewQShowEvent2(param1 *QShowEvent) *QShowEvent { - ret := C.QShowEvent_new2(param1.cPointer()) - return newQShowEvent(ret) + var outptr_QShowEvent *C.QShowEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShowEvent_new2(param1.cPointer(), &outptr_QShowEvent, &outptr_QEvent) + ret := newQShowEvent(outptr_QShowEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QShowEvent) OperatorAssign(param1 *QShowEvent) { @@ -1653,7 +2135,7 @@ func (this *QShowEvent) OperatorAssign(param1 *QShowEvent) { // Delete this object from C++ memory. func (this *QShowEvent) Delete() { - C.QShowEvent_Delete(this.h) + C.QShowEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1666,7 +2148,8 @@ func (this *QShowEvent) GoGC() { } type QHideEvent struct { - h *C.QHideEvent + h *C.QHideEvent + isSubclass bool *QEvent } @@ -1684,27 +2167,45 @@ func (this *QHideEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHideEvent(h *C.QHideEvent) *QHideEvent { +// newQHideEvent constructs the type using only CGO pointers. +func newQHideEvent(h *C.QHideEvent, h_QEvent *C.QEvent) *QHideEvent { if h == nil { return nil } - return &QHideEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QHideEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQHideEvent(h unsafe.Pointer) *QHideEvent { - return newQHideEvent((*C.QHideEvent)(h)) +// UnsafeNewQHideEvent constructs the type using only unsafe pointers. +func UnsafeNewQHideEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHideEvent { + if h == nil { + return nil + } + + return &QHideEvent{h: (*C.QHideEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQHideEvent constructs a new QHideEvent object. func NewQHideEvent() *QHideEvent { - ret := C.QHideEvent_new() - return newQHideEvent(ret) + var outptr_QHideEvent *C.QHideEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHideEvent_new(&outptr_QHideEvent, &outptr_QEvent) + ret := newQHideEvent(outptr_QHideEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHideEvent2 constructs a new QHideEvent object. func NewQHideEvent2(param1 *QHideEvent) *QHideEvent { - ret := C.QHideEvent_new2(param1.cPointer()) - return newQHideEvent(ret) + var outptr_QHideEvent *C.QHideEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHideEvent_new2(param1.cPointer(), &outptr_QHideEvent, &outptr_QEvent) + ret := newQHideEvent(outptr_QHideEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QHideEvent) OperatorAssign(param1 *QHideEvent) { @@ -1713,7 +2214,7 @@ func (this *QHideEvent) OperatorAssign(param1 *QHideEvent) { // Delete this object from C++ memory. func (this *QHideEvent) Delete() { - C.QHideEvent_Delete(this.h) + C.QHideEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1726,7 +2227,8 @@ func (this *QHideEvent) GoGC() { } type QContextMenuEvent struct { - h *C.QContextMenuEvent + h *C.QContextMenuEvent + isSubclass bool *QInputEvent } @@ -1744,39 +2246,71 @@ func (this *QContextMenuEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQContextMenuEvent(h *C.QContextMenuEvent) *QContextMenuEvent { +// newQContextMenuEvent constructs the type using only CGO pointers. +func newQContextMenuEvent(h *C.QContextMenuEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QContextMenuEvent { if h == nil { return nil } - return &QContextMenuEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QContextMenuEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQContextMenuEvent(h unsafe.Pointer) *QContextMenuEvent { - return newQContextMenuEvent((*C.QContextMenuEvent)(h)) +// UnsafeNewQContextMenuEvent constructs the type using only unsafe pointers. +func UnsafeNewQContextMenuEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QContextMenuEvent { + if h == nil { + return nil + } + + return &QContextMenuEvent{h: (*C.QContextMenuEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQContextMenuEvent constructs a new QContextMenuEvent object. func NewQContextMenuEvent(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint, modifiers KeyboardModifier) *QContextMenuEvent { - ret := C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers)) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQContextMenuEvent2 constructs a new QContextMenuEvent object. func NewQContextMenuEvent2(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint) *QContextMenuEvent { - ret := C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer(), globalPos.cPointer()) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer(), globalPos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQContextMenuEvent3 constructs a new QContextMenuEvent object. func NewQContextMenuEvent3(reason QContextMenuEvent__Reason, pos *QPoint) *QContextMenuEvent { - ret := C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer()) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQContextMenuEvent4 constructs a new QContextMenuEvent object. func NewQContextMenuEvent4(param1 *QContextMenuEvent) *QContextMenuEvent { - ret := C.QContextMenuEvent_new4(param1.cPointer()) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new4(param1.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QContextMenuEvent) X() int { @@ -1809,7 +2343,7 @@ func (this *QContextMenuEvent) Reason() QContextMenuEvent__Reason { // Delete this object from C++ memory. func (this *QContextMenuEvent) Delete() { - C.QContextMenuEvent_Delete(this.h) + C.QContextMenuEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1822,7 +2356,8 @@ func (this *QContextMenuEvent) GoGC() { } type QInputMethodEvent struct { - h *C.QInputMethodEvent + h *C.QInputMethodEvent + isSubclass bool *QEvent } @@ -1840,21 +2375,34 @@ func (this *QInputMethodEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputMethodEvent(h *C.QInputMethodEvent) *QInputMethodEvent { +// newQInputMethodEvent constructs the type using only CGO pointers. +func newQInputMethodEvent(h *C.QInputMethodEvent, h_QEvent *C.QEvent) *QInputMethodEvent { if h == nil { return nil } - return &QInputMethodEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QInputMethodEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQInputMethodEvent(h unsafe.Pointer) *QInputMethodEvent { - return newQInputMethodEvent((*C.QInputMethodEvent)(h)) +// UnsafeNewQInputMethodEvent constructs the type using only unsafe pointers. +func UnsafeNewQInputMethodEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodEvent { + if h == nil { + return nil + } + + return &QInputMethodEvent{h: (*C.QInputMethodEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQInputMethodEvent constructs a new QInputMethodEvent object. func NewQInputMethodEvent() *QInputMethodEvent { - ret := C.QInputMethodEvent_new() - return newQInputMethodEvent(ret) + var outptr_QInputMethodEvent *C.QInputMethodEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodEvent_new(&outptr_QInputMethodEvent, &outptr_QEvent) + ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputMethodEvent2 constructs a new QInputMethodEvent object. @@ -1869,14 +2417,24 @@ func NewQInputMethodEvent2(preeditText string, attributes []QInputMethodEvent__A attributes_CArray[i] = attributes[i].cPointer() } attributes_ma := C.struct_miqt_array{len: C.size_t(len(attributes)), data: unsafe.Pointer(attributes_CArray)} - ret := C.QInputMethodEvent_new2(preeditText_ms, attributes_ma) - return newQInputMethodEvent(ret) + var outptr_QInputMethodEvent *C.QInputMethodEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodEvent_new2(preeditText_ms, attributes_ma, &outptr_QInputMethodEvent, &outptr_QEvent) + ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputMethodEvent3 constructs a new QInputMethodEvent object. func NewQInputMethodEvent3(other *QInputMethodEvent) *QInputMethodEvent { - ret := C.QInputMethodEvent_new3(other.cPointer()) - return newQInputMethodEvent(ret) + var outptr_QInputMethodEvent *C.QInputMethodEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodEvent_new3(other.cPointer(), &outptr_QInputMethodEvent, &outptr_QEvent) + ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QInputMethodEvent) SetCommitString(commitString string) { @@ -1940,7 +2498,7 @@ func (this *QInputMethodEvent) SetCommitString3(commitString string, replaceFrom // Delete this object from C++ memory. func (this *QInputMethodEvent) Delete() { - C.QInputMethodEvent_Delete(this.h) + C.QInputMethodEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1953,7 +2511,8 @@ func (this *QInputMethodEvent) GoGC() { } type QInputMethodQueryEvent struct { - h *C.QInputMethodQueryEvent + h *C.QInputMethodQueryEvent + isSubclass bool *QEvent } @@ -1971,27 +2530,45 @@ func (this *QInputMethodQueryEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent) *QInputMethodQueryEvent { +// newQInputMethodQueryEvent constructs the type using only CGO pointers. +func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent, h_QEvent *C.QEvent) *QInputMethodQueryEvent { if h == nil { return nil } - return &QInputMethodQueryEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QInputMethodQueryEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer) *QInputMethodQueryEvent { - return newQInputMethodQueryEvent((*C.QInputMethodQueryEvent)(h)) +// UnsafeNewQInputMethodQueryEvent constructs the type using only unsafe pointers. +func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodQueryEvent { + if h == nil { + return nil + } + + return &QInputMethodQueryEvent{h: (*C.QInputMethodQueryEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQInputMethodQueryEvent constructs a new QInputMethodQueryEvent object. func NewQInputMethodQueryEvent(queries InputMethodQuery) *QInputMethodQueryEvent { - ret := C.QInputMethodQueryEvent_new((C.int)(queries)) - return newQInputMethodQueryEvent(ret) + var outptr_QInputMethodQueryEvent *C.QInputMethodQueryEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodQueryEvent_new((C.int)(queries), &outptr_QInputMethodQueryEvent, &outptr_QEvent) + ret := newQInputMethodQueryEvent(outptr_QInputMethodQueryEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputMethodQueryEvent2 constructs a new QInputMethodQueryEvent object. func NewQInputMethodQueryEvent2(param1 *QInputMethodQueryEvent) *QInputMethodQueryEvent { - ret := C.QInputMethodQueryEvent_new2(param1.cPointer()) - return newQInputMethodQueryEvent(ret) + var outptr_QInputMethodQueryEvent *C.QInputMethodQueryEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodQueryEvent_new2(param1.cPointer(), &outptr_QInputMethodQueryEvent, &outptr_QEvent) + ret := newQInputMethodQueryEvent(outptr_QInputMethodQueryEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QInputMethodQueryEvent) Queries() InputMethodQuery { @@ -2011,7 +2588,7 @@ func (this *QInputMethodQueryEvent) Value(query InputMethodQuery) *QVariant { // Delete this object from C++ memory. func (this *QInputMethodQueryEvent) Delete() { - C.QInputMethodQueryEvent_Delete(this.h) + C.QInputMethodQueryEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2024,7 +2601,8 @@ func (this *QInputMethodQueryEvent) GoGC() { } type QDropEvent struct { - h *C.QDropEvent + h *C.QDropEvent + isSubclass bool *QEvent } @@ -2042,33 +2620,56 @@ func (this *QDropEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDropEvent(h *C.QDropEvent) *QDropEvent { +// newQDropEvent constructs the type using only CGO pointers. +func newQDropEvent(h *C.QDropEvent, h_QEvent *C.QEvent) *QDropEvent { if h == nil { return nil } - return &QDropEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QDropEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQDropEvent(h unsafe.Pointer) *QDropEvent { - return newQDropEvent((*C.QDropEvent)(h)) +// UnsafeNewQDropEvent constructs the type using only unsafe pointers. +func UnsafeNewQDropEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDropEvent { + if h == nil { + return nil + } + + return &QDropEvent{h: (*C.QDropEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQDropEvent constructs a new QDropEvent object. func NewQDropEvent(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDropEvent { - ret := C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers)) - return newQDropEvent(ret) + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDropEvent, &outptr_QEvent) + ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDropEvent2 constructs a new QDropEvent object. func NewQDropEvent2(param1 *QDropEvent) *QDropEvent { - ret := C.QDropEvent_new2(param1.cPointer()) - return newQDropEvent(ret) + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDropEvent_new2(param1.cPointer(), &outptr_QDropEvent, &outptr_QEvent) + ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDropEvent3 constructs a new QDropEvent object. func NewQDropEvent3(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDropEvent { - ret := C.QDropEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal)) - return newQDropEvent(ret) + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDropEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDropEvent, &outptr_QEvent) + ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDropEvent) Pos() *QPoint { @@ -2115,12 +2716,12 @@ func (this *QDropEvent) Source() *QObject { } func (this *QDropEvent) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QDropEvent_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QDropEvent_MimeData(this.h)), nil) } // Delete this object from C++ memory. func (this *QDropEvent) Delete() { - C.QDropEvent_Delete(this.h) + C.QDropEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2133,7 +2734,8 @@ func (this *QDropEvent) GoGC() { } type QDragMoveEvent struct { - h *C.QDragMoveEvent + h *C.QDragMoveEvent + isSubclass bool *QDropEvent } @@ -2151,33 +2753,59 @@ func (this *QDragMoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDragMoveEvent(h *C.QDragMoveEvent) *QDragMoveEvent { +// newQDragMoveEvent constructs the type using only CGO pointers. +func newQDragMoveEvent(h *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragMoveEvent { if h == nil { return nil } - return &QDragMoveEvent{h: h, QDropEvent: UnsafeNewQDropEvent(unsafe.Pointer(h))} + return &QDragMoveEvent{h: h, + QDropEvent: newQDropEvent(h_QDropEvent, h_QEvent)} } -func UnsafeNewQDragMoveEvent(h unsafe.Pointer) *QDragMoveEvent { - return newQDragMoveEvent((*C.QDragMoveEvent)(h)) +// UnsafeNewQDragMoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQDragMoveEvent(h unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragMoveEvent { + if h == nil { + return nil + } + + return &QDragMoveEvent{h: (*C.QDragMoveEvent)(h), + QDropEvent: UnsafeNewQDropEvent(h_QDropEvent, h_QEvent)} } // NewQDragMoveEvent constructs a new QDragMoveEvent object. func NewQDragMoveEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragMoveEvent { - ret := C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers)) - return newQDragMoveEvent(ret) + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDragMoveEvent2 constructs a new QDragMoveEvent object. func NewQDragMoveEvent2(param1 *QDragMoveEvent) *QDragMoveEvent { - ret := C.QDragMoveEvent_new2(param1.cPointer()) - return newQDragMoveEvent(ret) + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragMoveEvent_new2(param1.cPointer(), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDragMoveEvent3 constructs a new QDragMoveEvent object. func NewQDragMoveEvent3(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDragMoveEvent { - ret := C.QDragMoveEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal)) - return newQDragMoveEvent(ret) + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragMoveEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDragMoveEvent) AnswerRect() *QRect { @@ -2205,7 +2833,7 @@ func (this *QDragMoveEvent) IgnoreWithQRect(r *QRect) { // Delete this object from C++ memory. func (this *QDragMoveEvent) Delete() { - C.QDragMoveEvent_Delete(this.h) + C.QDragMoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2218,7 +2846,8 @@ func (this *QDragMoveEvent) GoGC() { } type QDragEnterEvent struct { - h *C.QDragEnterEvent + h *C.QDragEnterEvent + isSubclass bool *QDragMoveEvent } @@ -2236,27 +2865,49 @@ func (this *QDragEnterEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDragEnterEvent(h *C.QDragEnterEvent) *QDragEnterEvent { +// newQDragEnterEvent constructs the type using only CGO pointers. +func newQDragEnterEvent(h *C.QDragEnterEvent, h_QDragMoveEvent *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragEnterEvent { if h == nil { return nil } - return &QDragEnterEvent{h: h, QDragMoveEvent: UnsafeNewQDragMoveEvent(unsafe.Pointer(h))} + return &QDragEnterEvent{h: h, + QDragMoveEvent: newQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} } -func UnsafeNewQDragEnterEvent(h unsafe.Pointer) *QDragEnterEvent { - return newQDragEnterEvent((*C.QDragEnterEvent)(h)) +// UnsafeNewQDragEnterEvent constructs the type using only unsafe pointers. +func UnsafeNewQDragEnterEvent(h unsafe.Pointer, h_QDragMoveEvent unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragEnterEvent { + if h == nil { + return nil + } + + return &QDragEnterEvent{h: (*C.QDragEnterEvent)(h), + QDragMoveEvent: UnsafeNewQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} } // NewQDragEnterEvent constructs a new QDragEnterEvent object. func NewQDragEnterEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragEnterEvent { - ret := C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers)) - return newQDragEnterEvent(ret) + var outptr_QDragEnterEvent *C.QDragEnterEvent = nil + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragEnterEvent, &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragEnterEvent(outptr_QDragEnterEvent, outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDragEnterEvent2 constructs a new QDragEnterEvent object. func NewQDragEnterEvent2(param1 *QDragEnterEvent) *QDragEnterEvent { - ret := C.QDragEnterEvent_new2(param1.cPointer()) - return newQDragEnterEvent(ret) + var outptr_QDragEnterEvent *C.QDragEnterEvent = nil + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragEnterEvent_new2(param1.cPointer(), &outptr_QDragEnterEvent, &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragEnterEvent(outptr_QDragEnterEvent, outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDragEnterEvent) OperatorAssign(param1 *QDragEnterEvent) { @@ -2265,7 +2916,7 @@ func (this *QDragEnterEvent) OperatorAssign(param1 *QDragEnterEvent) { // Delete this object from C++ memory. func (this *QDragEnterEvent) Delete() { - C.QDragEnterEvent_Delete(this.h) + C.QDragEnterEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2278,7 +2929,8 @@ func (this *QDragEnterEvent) GoGC() { } type QDragLeaveEvent struct { - h *C.QDragLeaveEvent + h *C.QDragLeaveEvent + isSubclass bool *QEvent } @@ -2296,27 +2948,45 @@ func (this *QDragLeaveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDragLeaveEvent(h *C.QDragLeaveEvent) *QDragLeaveEvent { +// newQDragLeaveEvent constructs the type using only CGO pointers. +func newQDragLeaveEvent(h *C.QDragLeaveEvent, h_QEvent *C.QEvent) *QDragLeaveEvent { if h == nil { return nil } - return &QDragLeaveEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QDragLeaveEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQDragLeaveEvent(h unsafe.Pointer) *QDragLeaveEvent { - return newQDragLeaveEvent((*C.QDragLeaveEvent)(h)) +// UnsafeNewQDragLeaveEvent constructs the type using only unsafe pointers. +func UnsafeNewQDragLeaveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragLeaveEvent { + if h == nil { + return nil + } + + return &QDragLeaveEvent{h: (*C.QDragLeaveEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQDragLeaveEvent constructs a new QDragLeaveEvent object. func NewQDragLeaveEvent() *QDragLeaveEvent { - ret := C.QDragLeaveEvent_new() - return newQDragLeaveEvent(ret) + var outptr_QDragLeaveEvent *C.QDragLeaveEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragLeaveEvent_new(&outptr_QDragLeaveEvent, &outptr_QEvent) + ret := newQDragLeaveEvent(outptr_QDragLeaveEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDragLeaveEvent2 constructs a new QDragLeaveEvent object. func NewQDragLeaveEvent2(param1 *QDragLeaveEvent) *QDragLeaveEvent { - ret := C.QDragLeaveEvent_new2(param1.cPointer()) - return newQDragLeaveEvent(ret) + var outptr_QDragLeaveEvent *C.QDragLeaveEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragLeaveEvent_new2(param1.cPointer(), &outptr_QDragLeaveEvent, &outptr_QEvent) + ret := newQDragLeaveEvent(outptr_QDragLeaveEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDragLeaveEvent) OperatorAssign(param1 *QDragLeaveEvent) { @@ -2325,7 +2995,7 @@ func (this *QDragLeaveEvent) OperatorAssign(param1 *QDragLeaveEvent) { // Delete this object from C++ memory. func (this *QDragLeaveEvent) Delete() { - C.QDragLeaveEvent_Delete(this.h) + C.QDragLeaveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2338,7 +3008,8 @@ func (this *QDragLeaveEvent) GoGC() { } type QHelpEvent struct { - h *C.QHelpEvent + h *C.QHelpEvent + isSubclass bool *QEvent } @@ -2356,27 +3027,45 @@ func (this *QHelpEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHelpEvent(h *C.QHelpEvent) *QHelpEvent { +// newQHelpEvent constructs the type using only CGO pointers. +func newQHelpEvent(h *C.QHelpEvent, h_QEvent *C.QEvent) *QHelpEvent { if h == nil { return nil } - return &QHelpEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QHelpEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQHelpEvent(h unsafe.Pointer) *QHelpEvent { - return newQHelpEvent((*C.QHelpEvent)(h)) +// UnsafeNewQHelpEvent constructs the type using only unsafe pointers. +func UnsafeNewQHelpEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHelpEvent { + if h == nil { + return nil + } + + return &QHelpEvent{h: (*C.QHelpEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQHelpEvent constructs a new QHelpEvent object. func NewQHelpEvent(typeVal QEvent__Type, pos *QPoint, globalPos *QPoint) *QHelpEvent { - ret := C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer()) - return newQHelpEvent(ret) + var outptr_QHelpEvent *C.QHelpEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer(), &outptr_QHelpEvent, &outptr_QEvent) + ret := newQHelpEvent(outptr_QHelpEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHelpEvent2 constructs a new QHelpEvent object. func NewQHelpEvent2(param1 *QHelpEvent) *QHelpEvent { - ret := C.QHelpEvent_new2(param1.cPointer()) - return newQHelpEvent(ret) + var outptr_QHelpEvent *C.QHelpEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHelpEvent_new2(param1.cPointer(), &outptr_QHelpEvent, &outptr_QEvent) + ret := newQHelpEvent(outptr_QHelpEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QHelpEvent) X() int { @@ -2405,7 +3094,7 @@ func (this *QHelpEvent) GlobalPos() *QPoint { // Delete this object from C++ memory. func (this *QHelpEvent) Delete() { - C.QHelpEvent_Delete(this.h) + C.QHelpEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2418,7 +3107,8 @@ func (this *QHelpEvent) GoGC() { } type QStatusTipEvent struct { - h *C.QStatusTipEvent + h *C.QStatusTipEvent + isSubclass bool *QEvent } @@ -2436,15 +3126,23 @@ func (this *QStatusTipEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStatusTipEvent(h *C.QStatusTipEvent) *QStatusTipEvent { +// newQStatusTipEvent constructs the type using only CGO pointers. +func newQStatusTipEvent(h *C.QStatusTipEvent, h_QEvent *C.QEvent) *QStatusTipEvent { if h == nil { return nil } - return &QStatusTipEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QStatusTipEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQStatusTipEvent(h unsafe.Pointer) *QStatusTipEvent { - return newQStatusTipEvent((*C.QStatusTipEvent)(h)) +// UnsafeNewQStatusTipEvent constructs the type using only unsafe pointers. +func UnsafeNewQStatusTipEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStatusTipEvent { + if h == nil { + return nil + } + + return &QStatusTipEvent{h: (*C.QStatusTipEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQStatusTipEvent constructs a new QStatusTipEvent object. @@ -2453,14 +3151,24 @@ func NewQStatusTipEvent(tip string) *QStatusTipEvent { tip_ms.data = C.CString(tip) tip_ms.len = C.size_t(len(tip)) defer C.free(unsafe.Pointer(tip_ms.data)) - ret := C.QStatusTipEvent_new(tip_ms) - return newQStatusTipEvent(ret) + var outptr_QStatusTipEvent *C.QStatusTipEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QStatusTipEvent_new(tip_ms, &outptr_QStatusTipEvent, &outptr_QEvent) + ret := newQStatusTipEvent(outptr_QStatusTipEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQStatusTipEvent2 constructs a new QStatusTipEvent object. func NewQStatusTipEvent2(param1 *QStatusTipEvent) *QStatusTipEvent { - ret := C.QStatusTipEvent_new2(param1.cPointer()) - return newQStatusTipEvent(ret) + var outptr_QStatusTipEvent *C.QStatusTipEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QStatusTipEvent_new2(param1.cPointer(), &outptr_QStatusTipEvent, &outptr_QEvent) + ret := newQStatusTipEvent(outptr_QStatusTipEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QStatusTipEvent) Tip() string { @@ -2472,7 +3180,7 @@ func (this *QStatusTipEvent) Tip() string { // Delete this object from C++ memory. func (this *QStatusTipEvent) Delete() { - C.QStatusTipEvent_Delete(this.h) + C.QStatusTipEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2485,7 +3193,8 @@ func (this *QStatusTipEvent) GoGC() { } type QWhatsThisClickedEvent struct { - h *C.QWhatsThisClickedEvent + h *C.QWhatsThisClickedEvent + isSubclass bool *QEvent } @@ -2503,15 +3212,23 @@ func (this *QWhatsThisClickedEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent) *QWhatsThisClickedEvent { +// newQWhatsThisClickedEvent constructs the type using only CGO pointers. +func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent, h_QEvent *C.QEvent) *QWhatsThisClickedEvent { if h == nil { return nil } - return &QWhatsThisClickedEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QWhatsThisClickedEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer) *QWhatsThisClickedEvent { - return newQWhatsThisClickedEvent((*C.QWhatsThisClickedEvent)(h)) +// UnsafeNewQWhatsThisClickedEvent constructs the type using only unsafe pointers. +func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWhatsThisClickedEvent { + if h == nil { + return nil + } + + return &QWhatsThisClickedEvent{h: (*C.QWhatsThisClickedEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQWhatsThisClickedEvent constructs a new QWhatsThisClickedEvent object. @@ -2520,14 +3237,24 @@ func NewQWhatsThisClickedEvent(href string) *QWhatsThisClickedEvent { href_ms.data = C.CString(href) href_ms.len = C.size_t(len(href)) defer C.free(unsafe.Pointer(href_ms.data)) - ret := C.QWhatsThisClickedEvent_new(href_ms) - return newQWhatsThisClickedEvent(ret) + var outptr_QWhatsThisClickedEvent *C.QWhatsThisClickedEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWhatsThisClickedEvent_new(href_ms, &outptr_QWhatsThisClickedEvent, &outptr_QEvent) + ret := newQWhatsThisClickedEvent(outptr_QWhatsThisClickedEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWhatsThisClickedEvent2 constructs a new QWhatsThisClickedEvent object. func NewQWhatsThisClickedEvent2(param1 *QWhatsThisClickedEvent) *QWhatsThisClickedEvent { - ret := C.QWhatsThisClickedEvent_new2(param1.cPointer()) - return newQWhatsThisClickedEvent(ret) + var outptr_QWhatsThisClickedEvent *C.QWhatsThisClickedEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWhatsThisClickedEvent_new2(param1.cPointer(), &outptr_QWhatsThisClickedEvent, &outptr_QEvent) + ret := newQWhatsThisClickedEvent(outptr_QWhatsThisClickedEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QWhatsThisClickedEvent) Href() string { @@ -2539,7 +3266,7 @@ func (this *QWhatsThisClickedEvent) Href() string { // Delete this object from C++ memory. func (this *QWhatsThisClickedEvent) Delete() { - C.QWhatsThisClickedEvent_Delete(this.h) + C.QWhatsThisClickedEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2552,7 +3279,8 @@ func (this *QWhatsThisClickedEvent) GoGC() { } type QActionEvent struct { - h *C.QActionEvent + h *C.QActionEvent + isSubclass bool *QEvent } @@ -2570,41 +3298,64 @@ func (this *QActionEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQActionEvent(h *C.QActionEvent) *QActionEvent { +// newQActionEvent constructs the type using only CGO pointers. +func newQActionEvent(h *C.QActionEvent, h_QEvent *C.QEvent) *QActionEvent { if h == nil { return nil } - return &QActionEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QActionEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQActionEvent(h unsafe.Pointer) *QActionEvent { - return newQActionEvent((*C.QActionEvent)(h)) +// UnsafeNewQActionEvent constructs the type using only unsafe pointers. +func UnsafeNewQActionEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QActionEvent { + if h == nil { + return nil + } + + return &QActionEvent{h: (*C.QActionEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQActionEvent constructs a new QActionEvent object. func NewQActionEvent(typeVal int, action *QAction) *QActionEvent { - ret := C.QActionEvent_new((C.int)(typeVal), action.cPointer()) - return newQActionEvent(ret) + var outptr_QActionEvent *C.QActionEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QActionEvent_new((C.int)(typeVal), action.cPointer(), &outptr_QActionEvent, &outptr_QEvent) + ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQActionEvent2 constructs a new QActionEvent object. func NewQActionEvent2(param1 *QActionEvent) *QActionEvent { - ret := C.QActionEvent_new2(param1.cPointer()) - return newQActionEvent(ret) + var outptr_QActionEvent *C.QActionEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QActionEvent_new2(param1.cPointer(), &outptr_QActionEvent, &outptr_QEvent) + ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQActionEvent3 constructs a new QActionEvent object. func NewQActionEvent3(typeVal int, action *QAction, before *QAction) *QActionEvent { - ret := C.QActionEvent_new3((C.int)(typeVal), action.cPointer(), before.cPointer()) - return newQActionEvent(ret) + var outptr_QActionEvent *C.QActionEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QActionEvent_new3((C.int)(typeVal), action.cPointer(), before.cPointer(), &outptr_QActionEvent, &outptr_QEvent) + ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QActionEvent) Action() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Action(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Action(this.h)), nil) } func (this *QActionEvent) Before() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Before(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Before(this.h)), nil) } func (this *QActionEvent) OperatorAssign(param1 *QActionEvent) { @@ -2613,7 +3364,7 @@ func (this *QActionEvent) OperatorAssign(param1 *QActionEvent) { // Delete this object from C++ memory. func (this *QActionEvent) Delete() { - C.QActionEvent_Delete(this.h) + C.QActionEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2626,7 +3377,8 @@ func (this *QActionEvent) GoGC() { } type QFileOpenEvent struct { - h *C.QFileOpenEvent + h *C.QFileOpenEvent + isSubclass bool *QEvent } @@ -2644,15 +3396,23 @@ func (this *QFileOpenEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileOpenEvent(h *C.QFileOpenEvent) *QFileOpenEvent { +// newQFileOpenEvent constructs the type using only CGO pointers. +func newQFileOpenEvent(h *C.QFileOpenEvent, h_QEvent *C.QEvent) *QFileOpenEvent { if h == nil { return nil } - return &QFileOpenEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QFileOpenEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQFileOpenEvent(h unsafe.Pointer) *QFileOpenEvent { - return newQFileOpenEvent((*C.QFileOpenEvent)(h)) +// UnsafeNewQFileOpenEvent constructs the type using only unsafe pointers. +func UnsafeNewQFileOpenEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFileOpenEvent { + if h == nil { + return nil + } + + return &QFileOpenEvent{h: (*C.QFileOpenEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQFileOpenEvent constructs a new QFileOpenEvent object. @@ -2661,20 +3421,35 @@ func NewQFileOpenEvent(file string) *QFileOpenEvent { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QFileOpenEvent_new(file_ms) - return newQFileOpenEvent(ret) + var outptr_QFileOpenEvent *C.QFileOpenEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFileOpenEvent_new(file_ms, &outptr_QFileOpenEvent, &outptr_QEvent) + ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQFileOpenEvent2 constructs a new QFileOpenEvent object. func NewQFileOpenEvent2(url *QUrl) *QFileOpenEvent { - ret := C.QFileOpenEvent_new2(url.cPointer()) - return newQFileOpenEvent(ret) + var outptr_QFileOpenEvent *C.QFileOpenEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFileOpenEvent_new2(url.cPointer(), &outptr_QFileOpenEvent, &outptr_QEvent) + ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQFileOpenEvent3 constructs a new QFileOpenEvent object. func NewQFileOpenEvent3(param1 *QFileOpenEvent) *QFileOpenEvent { - ret := C.QFileOpenEvent_new3(param1.cPointer()) - return newQFileOpenEvent(ret) + var outptr_QFileOpenEvent *C.QFileOpenEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFileOpenEvent_new3(param1.cPointer(), &outptr_QFileOpenEvent, &outptr_QEvent) + ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QFileOpenEvent) File() string { @@ -2697,7 +3472,7 @@ func (this *QFileOpenEvent) OpenFile(file *QFile, flags QIODevice__OpenModeFlag) // Delete this object from C++ memory. func (this *QFileOpenEvent) Delete() { - C.QFileOpenEvent_Delete(this.h) + C.QFileOpenEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2710,7 +3485,8 @@ func (this *QFileOpenEvent) GoGC() { } type QToolBarChangeEvent struct { - h *C.QToolBarChangeEvent + h *C.QToolBarChangeEvent + isSubclass bool *QEvent } @@ -2728,27 +3504,45 @@ func (this *QToolBarChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolBarChangeEvent(h *C.QToolBarChangeEvent) *QToolBarChangeEvent { +// newQToolBarChangeEvent constructs the type using only CGO pointers. +func newQToolBarChangeEvent(h *C.QToolBarChangeEvent, h_QEvent *C.QEvent) *QToolBarChangeEvent { if h == nil { return nil } - return &QToolBarChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QToolBarChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer) *QToolBarChangeEvent { - return newQToolBarChangeEvent((*C.QToolBarChangeEvent)(h)) +// UnsafeNewQToolBarChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QToolBarChangeEvent { + if h == nil { + return nil + } + + return &QToolBarChangeEvent{h: (*C.QToolBarChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQToolBarChangeEvent constructs a new QToolBarChangeEvent object. func NewQToolBarChangeEvent(t bool) *QToolBarChangeEvent { - ret := C.QToolBarChangeEvent_new((C.bool)(t)) - return newQToolBarChangeEvent(ret) + var outptr_QToolBarChangeEvent *C.QToolBarChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QToolBarChangeEvent_new((C.bool)(t), &outptr_QToolBarChangeEvent, &outptr_QEvent) + ret := newQToolBarChangeEvent(outptr_QToolBarChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQToolBarChangeEvent2 constructs a new QToolBarChangeEvent object. func NewQToolBarChangeEvent2(param1 *QToolBarChangeEvent) *QToolBarChangeEvent { - ret := C.QToolBarChangeEvent_new2(param1.cPointer()) - return newQToolBarChangeEvent(ret) + var outptr_QToolBarChangeEvent *C.QToolBarChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QToolBarChangeEvent_new2(param1.cPointer(), &outptr_QToolBarChangeEvent, &outptr_QEvent) + ret := newQToolBarChangeEvent(outptr_QToolBarChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QToolBarChangeEvent) Toggle() bool { @@ -2757,7 +3551,7 @@ func (this *QToolBarChangeEvent) Toggle() bool { // Delete this object from C++ memory. func (this *QToolBarChangeEvent) Delete() { - C.QToolBarChangeEvent_Delete(this.h) + C.QToolBarChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2770,7 +3564,8 @@ func (this *QToolBarChangeEvent) GoGC() { } type QShortcutEvent struct { - h *C.QShortcutEvent + h *C.QShortcutEvent + isSubclass bool *QEvent } @@ -2788,33 +3583,56 @@ func (this *QShortcutEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQShortcutEvent(h *C.QShortcutEvent) *QShortcutEvent { +// newQShortcutEvent constructs the type using only CGO pointers. +func newQShortcutEvent(h *C.QShortcutEvent, h_QEvent *C.QEvent) *QShortcutEvent { if h == nil { return nil } - return &QShortcutEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QShortcutEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQShortcutEvent(h unsafe.Pointer) *QShortcutEvent { - return newQShortcutEvent((*C.QShortcutEvent)(h)) +// UnsafeNewQShortcutEvent constructs the type using only unsafe pointers. +func UnsafeNewQShortcutEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShortcutEvent { + if h == nil { + return nil + } + + return &QShortcutEvent{h: (*C.QShortcutEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQShortcutEvent constructs a new QShortcutEvent object. func NewQShortcutEvent(key *QKeySequence, id int) *QShortcutEvent { - ret := C.QShortcutEvent_new(key.cPointer(), (C.int)(id)) - return newQShortcutEvent(ret) + var outptr_QShortcutEvent *C.QShortcutEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShortcutEvent_new(key.cPointer(), (C.int)(id), &outptr_QShortcutEvent, &outptr_QEvent) + ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQShortcutEvent2 constructs a new QShortcutEvent object. func NewQShortcutEvent2(param1 *QShortcutEvent) *QShortcutEvent { - ret := C.QShortcutEvent_new2(param1.cPointer()) - return newQShortcutEvent(ret) + var outptr_QShortcutEvent *C.QShortcutEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShortcutEvent_new2(param1.cPointer(), &outptr_QShortcutEvent, &outptr_QEvent) + ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQShortcutEvent3 constructs a new QShortcutEvent object. func NewQShortcutEvent3(key *QKeySequence, id int, ambiguous bool) *QShortcutEvent { - ret := C.QShortcutEvent_new3(key.cPointer(), (C.int)(id), (C.bool)(ambiguous)) - return newQShortcutEvent(ret) + var outptr_QShortcutEvent *C.QShortcutEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShortcutEvent_new3(key.cPointer(), (C.int)(id), (C.bool)(ambiguous), &outptr_QShortcutEvent, &outptr_QEvent) + ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QShortcutEvent) Key() *QKeySequence { @@ -2831,7 +3649,7 @@ func (this *QShortcutEvent) IsAmbiguous() bool { // Delete this object from C++ memory. func (this *QShortcutEvent) Delete() { - C.QShortcutEvent_Delete(this.h) + C.QShortcutEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2844,7 +3662,8 @@ func (this *QShortcutEvent) GoGC() { } type QWindowStateChangeEvent struct { - h *C.QWindowStateChangeEvent + h *C.QWindowStateChangeEvent + isSubclass bool *QEvent } @@ -2862,33 +3681,56 @@ func (this *QWindowStateChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent) *QWindowStateChangeEvent { +// newQWindowStateChangeEvent constructs the type using only CGO pointers. +func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent, h_QEvent *C.QEvent) *QWindowStateChangeEvent { if h == nil { return nil } - return &QWindowStateChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QWindowStateChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer) *QWindowStateChangeEvent { - return newQWindowStateChangeEvent((*C.QWindowStateChangeEvent)(h)) +// UnsafeNewQWindowStateChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWindowStateChangeEvent { + if h == nil { + return nil + } + + return &QWindowStateChangeEvent{h: (*C.QWindowStateChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQWindowStateChangeEvent constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent(aOldState WindowState) *QWindowStateChangeEvent { - ret := C.QWindowStateChangeEvent_new((C.int)(aOldState)) - return newQWindowStateChangeEvent(ret) + var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWindowStateChangeEvent_new((C.int)(aOldState), &outptr_QWindowStateChangeEvent, &outptr_QEvent) + ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWindowStateChangeEvent2 constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent2(param1 *QWindowStateChangeEvent) *QWindowStateChangeEvent { - ret := C.QWindowStateChangeEvent_new2(param1.cPointer()) - return newQWindowStateChangeEvent(ret) + var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWindowStateChangeEvent_new2(param1.cPointer(), &outptr_QWindowStateChangeEvent, &outptr_QEvent) + ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWindowStateChangeEvent3 constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent3(aOldState WindowState, isOverride bool) *QWindowStateChangeEvent { - ret := C.QWindowStateChangeEvent_new3((C.int)(aOldState), (C.bool)(isOverride)) - return newQWindowStateChangeEvent(ret) + var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWindowStateChangeEvent_new3((C.int)(aOldState), (C.bool)(isOverride), &outptr_QWindowStateChangeEvent, &outptr_QEvent) + ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QWindowStateChangeEvent) OldState() WindowState { @@ -2901,7 +3743,7 @@ func (this *QWindowStateChangeEvent) IsOverride() bool { // Delete this object from C++ memory. func (this *QWindowStateChangeEvent) Delete() { - C.QWindowStateChangeEvent_Delete(this.h) + C.QWindowStateChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2914,7 +3756,8 @@ func (this *QWindowStateChangeEvent) GoGC() { } type QPointingDeviceUniqueId struct { - h *C.QPointingDeviceUniqueId + h *C.QPointingDeviceUniqueId + isSubclass bool } func (this *QPointingDeviceUniqueId) cPointer() *C.QPointingDeviceUniqueId { @@ -2931,6 +3774,7 @@ func (this *QPointingDeviceUniqueId) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPointingDeviceUniqueId constructs the type using only CGO pointers. func newQPointingDeviceUniqueId(h *C.QPointingDeviceUniqueId) *QPointingDeviceUniqueId { if h == nil { return nil @@ -2938,20 +3782,33 @@ func newQPointingDeviceUniqueId(h *C.QPointingDeviceUniqueId) *QPointingDeviceUn return &QPointingDeviceUniqueId{h: h} } +// UnsafeNewQPointingDeviceUniqueId constructs the type using only unsafe pointers. func UnsafeNewQPointingDeviceUniqueId(h unsafe.Pointer) *QPointingDeviceUniqueId { - return newQPointingDeviceUniqueId((*C.QPointingDeviceUniqueId)(h)) + if h == nil { + return nil + } + + return &QPointingDeviceUniqueId{h: (*C.QPointingDeviceUniqueId)(h)} } // NewQPointingDeviceUniqueId constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId() *QPointingDeviceUniqueId { - ret := C.QPointingDeviceUniqueId_new() - return newQPointingDeviceUniqueId(ret) + var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil + + C.QPointingDeviceUniqueId_new(&outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret.isSubclass = true + return ret } // NewQPointingDeviceUniqueId2 constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId2(param1 *QPointingDeviceUniqueId) *QPointingDeviceUniqueId { - ret := C.QPointingDeviceUniqueId_new2(param1.cPointer()) - return newQPointingDeviceUniqueId(ret) + var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil + + C.QPointingDeviceUniqueId_new2(param1.cPointer(), &outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret.isSubclass = true + return ret } func QPointingDeviceUniqueId_FromNumericId(id int64) *QPointingDeviceUniqueId { @@ -2971,7 +3828,7 @@ func (this *QPointingDeviceUniqueId) NumericId() int64 { // Delete this object from C++ memory. func (this *QPointingDeviceUniqueId) Delete() { - C.QPointingDeviceUniqueId_Delete(this.h) + C.QPointingDeviceUniqueId_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2984,7 +3841,8 @@ func (this *QPointingDeviceUniqueId) GoGC() { } type QTouchEvent struct { - h *C.QTouchEvent + h *C.QTouchEvent + isSubclass bool *QInputEvent } @@ -3002,45 +3860,83 @@ func (this *QTouchEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTouchEvent(h *C.QTouchEvent) *QTouchEvent { +// newQTouchEvent constructs the type using only CGO pointers. +func newQTouchEvent(h *C.QTouchEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTouchEvent { if h == nil { return nil } - return &QTouchEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QTouchEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQTouchEvent(h unsafe.Pointer) *QTouchEvent { - return newQTouchEvent((*C.QTouchEvent)(h)) +// UnsafeNewQTouchEvent constructs the type using only unsafe pointers. +func UnsafeNewQTouchEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTouchEvent { + if h == nil { + return nil + } + + return &QTouchEvent{h: (*C.QTouchEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQTouchEvent constructs a new QTouchEvent object. func NewQTouchEvent(eventType QEvent__Type) *QTouchEvent { - ret := C.QTouchEvent_new((C.int)(eventType)) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new((C.int)(eventType), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent2 constructs a new QTouchEvent object. func NewQTouchEvent2(param1 *QTouchEvent) *QTouchEvent { - ret := C.QTouchEvent_new2(param1.cPointer()) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new2(param1.cPointer(), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent3 constructs a new QTouchEvent object. func NewQTouchEvent3(eventType QEvent__Type, device *QTouchDevice) *QTouchEvent { - ret := C.QTouchEvent_new3((C.int)(eventType), device.cPointer()) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new3((C.int)(eventType), device.cPointer(), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent4 constructs a new QTouchEvent object. func NewQTouchEvent4(eventType QEvent__Type, device *QTouchDevice, modifiers KeyboardModifier) *QTouchEvent { - ret := C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers)) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent5 constructs a new QTouchEvent object. func NewQTouchEvent5(eventType QEvent__Type, device *QTouchDevice, modifiers KeyboardModifier, touchPointStates TouchPointState) *QTouchEvent { - ret := C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates)) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent6 constructs a new QTouchEvent object. @@ -3051,12 +3947,18 @@ func NewQTouchEvent6(eventType QEvent__Type, device *QTouchDevice, modifiers Key touchPoints_CArray[i] = touchPoints[i].cPointer() } touchPoints_ma := C.struct_miqt_array{len: C.size_t(len(touchPoints)), data: unsafe.Pointer(touchPoints_CArray)} - ret := C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates), touchPoints_ma) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates), touchPoints_ma, &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QTouchEvent) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QTouchEvent_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QTouchEvent_Window(this.h)), nil, nil) } func (this *QTouchEvent) Target() *QObject { @@ -3112,7 +4014,7 @@ func (this *QTouchEvent) SetDevice(adevice *QTouchDevice) { // Delete this object from C++ memory. func (this *QTouchEvent) Delete() { - C.QTouchEvent_Delete(this.h) + C.QTouchEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3125,7 +4027,8 @@ func (this *QTouchEvent) GoGC() { } type QScrollPrepareEvent struct { - h *C.QScrollPrepareEvent + h *C.QScrollPrepareEvent + isSubclass bool *QEvent } @@ -3143,27 +4046,45 @@ func (this *QScrollPrepareEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollPrepareEvent(h *C.QScrollPrepareEvent) *QScrollPrepareEvent { +// newQScrollPrepareEvent constructs the type using only CGO pointers. +func newQScrollPrepareEvent(h *C.QScrollPrepareEvent, h_QEvent *C.QEvent) *QScrollPrepareEvent { if h == nil { return nil } - return &QScrollPrepareEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QScrollPrepareEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer) *QScrollPrepareEvent { - return newQScrollPrepareEvent((*C.QScrollPrepareEvent)(h)) +// UnsafeNewQScrollPrepareEvent constructs the type using only unsafe pointers. +func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollPrepareEvent { + if h == nil { + return nil + } + + return &QScrollPrepareEvent{h: (*C.QScrollPrepareEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQScrollPrepareEvent constructs a new QScrollPrepareEvent object. func NewQScrollPrepareEvent(startPos *QPointF) *QScrollPrepareEvent { - ret := C.QScrollPrepareEvent_new(startPos.cPointer()) - return newQScrollPrepareEvent(ret) + var outptr_QScrollPrepareEvent *C.QScrollPrepareEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScrollPrepareEvent_new(startPos.cPointer(), &outptr_QScrollPrepareEvent, &outptr_QEvent) + ret := newQScrollPrepareEvent(outptr_QScrollPrepareEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQScrollPrepareEvent2 constructs a new QScrollPrepareEvent object. func NewQScrollPrepareEvent2(param1 *QScrollPrepareEvent) *QScrollPrepareEvent { - ret := C.QScrollPrepareEvent_new2(param1.cPointer()) - return newQScrollPrepareEvent(ret) + var outptr_QScrollPrepareEvent *C.QScrollPrepareEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScrollPrepareEvent_new2(param1.cPointer(), &outptr_QScrollPrepareEvent, &outptr_QEvent) + ret := newQScrollPrepareEvent(outptr_QScrollPrepareEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QScrollPrepareEvent) StartPos() *QPointF { @@ -3208,7 +4129,7 @@ func (this *QScrollPrepareEvent) SetContentPos(pos *QPointF) { // Delete this object from C++ memory. func (this *QScrollPrepareEvent) Delete() { - C.QScrollPrepareEvent_Delete(this.h) + C.QScrollPrepareEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3221,7 +4142,8 @@ func (this *QScrollPrepareEvent) GoGC() { } type QScrollEvent struct { - h *C.QScrollEvent + h *C.QScrollEvent + isSubclass bool *QEvent } @@ -3239,27 +4161,45 @@ func (this *QScrollEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollEvent(h *C.QScrollEvent) *QScrollEvent { +// newQScrollEvent constructs the type using only CGO pointers. +func newQScrollEvent(h *C.QScrollEvent, h_QEvent *C.QEvent) *QScrollEvent { if h == nil { return nil } - return &QScrollEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QScrollEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQScrollEvent(h unsafe.Pointer) *QScrollEvent { - return newQScrollEvent((*C.QScrollEvent)(h)) +// UnsafeNewQScrollEvent constructs the type using only unsafe pointers. +func UnsafeNewQScrollEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollEvent { + if h == nil { + return nil + } + + return &QScrollEvent{h: (*C.QScrollEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQScrollEvent constructs a new QScrollEvent object. func NewQScrollEvent(contentPos *QPointF, overshoot *QPointF, scrollState QScrollEvent__ScrollState) *QScrollEvent { - ret := C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState)) - return newQScrollEvent(ret) + var outptr_QScrollEvent *C.QScrollEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState), &outptr_QScrollEvent, &outptr_QEvent) + ret := newQScrollEvent(outptr_QScrollEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQScrollEvent2 constructs a new QScrollEvent object. func NewQScrollEvent2(param1 *QScrollEvent) *QScrollEvent { - ret := C.QScrollEvent_new2(param1.cPointer()) - return newQScrollEvent(ret) + var outptr_QScrollEvent *C.QScrollEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScrollEvent_new2(param1.cPointer(), &outptr_QScrollEvent, &outptr_QEvent) + ret := newQScrollEvent(outptr_QScrollEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QScrollEvent) ContentPos() *QPointF { @@ -3282,7 +4222,7 @@ func (this *QScrollEvent) ScrollState() QScrollEvent__ScrollState { // Delete this object from C++ memory. func (this *QScrollEvent) Delete() { - C.QScrollEvent_Delete(this.h) + C.QScrollEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3295,7 +4235,8 @@ func (this *QScrollEvent) GoGC() { } type QScreenOrientationChangeEvent struct { - h *C.QScreenOrientationChangeEvent + h *C.QScreenOrientationChangeEvent + isSubclass bool *QEvent } @@ -3313,31 +4254,49 @@ func (this *QScreenOrientationChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent { +// newQScreenOrientationChangeEvent constructs the type using only CGO pointers. +func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent, h_QEvent *C.QEvent) *QScreenOrientationChangeEvent { if h == nil { return nil } - return &QScreenOrientationChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QScreenOrientationChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer) *QScreenOrientationChangeEvent { - return newQScreenOrientationChangeEvent((*C.QScreenOrientationChangeEvent)(h)) +// UnsafeNewQScreenOrientationChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScreenOrientationChangeEvent { + if h == nil { + return nil + } + + return &QScreenOrientationChangeEvent{h: (*C.QScreenOrientationChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQScreenOrientationChangeEvent constructs a new QScreenOrientationChangeEvent object. func NewQScreenOrientationChangeEvent(screen *QScreen, orientation ScreenOrientation) *QScreenOrientationChangeEvent { - ret := C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation)) - return newQScreenOrientationChangeEvent(ret) + var outptr_QScreenOrientationChangeEvent *C.QScreenOrientationChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation), &outptr_QScreenOrientationChangeEvent, &outptr_QEvent) + ret := newQScreenOrientationChangeEvent(outptr_QScreenOrientationChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQScreenOrientationChangeEvent2 constructs a new QScreenOrientationChangeEvent object. func NewQScreenOrientationChangeEvent2(param1 *QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent { - ret := C.QScreenOrientationChangeEvent_new2(param1.cPointer()) - return newQScreenOrientationChangeEvent(ret) + var outptr_QScreenOrientationChangeEvent *C.QScreenOrientationChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScreenOrientationChangeEvent_new2(param1.cPointer(), &outptr_QScreenOrientationChangeEvent, &outptr_QEvent) + ret := newQScreenOrientationChangeEvent(outptr_QScreenOrientationChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QScreenOrientationChangeEvent) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QScreenOrientationChangeEvent_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QScreenOrientationChangeEvent_Screen(this.h)), nil) } func (this *QScreenOrientationChangeEvent) Orientation() ScreenOrientation { @@ -3346,7 +4305,7 @@ func (this *QScreenOrientationChangeEvent) Orientation() ScreenOrientation { // Delete this object from C++ memory. func (this *QScreenOrientationChangeEvent) Delete() { - C.QScreenOrientationChangeEvent_Delete(this.h) + C.QScreenOrientationChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3359,7 +4318,8 @@ func (this *QScreenOrientationChangeEvent) GoGC() { } type QApplicationStateChangeEvent struct { - h *C.QApplicationStateChangeEvent + h *C.QApplicationStateChangeEvent + isSubclass bool *QEvent } @@ -3377,27 +4337,45 @@ func (this *QApplicationStateChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent) *QApplicationStateChangeEvent { +// newQApplicationStateChangeEvent constructs the type using only CGO pointers. +func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent, h_QEvent *C.QEvent) *QApplicationStateChangeEvent { if h == nil { return nil } - return &QApplicationStateChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QApplicationStateChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer) *QApplicationStateChangeEvent { - return newQApplicationStateChangeEvent((*C.QApplicationStateChangeEvent)(h)) +// UnsafeNewQApplicationStateChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QApplicationStateChangeEvent { + if h == nil { + return nil + } + + return &QApplicationStateChangeEvent{h: (*C.QApplicationStateChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQApplicationStateChangeEvent constructs a new QApplicationStateChangeEvent object. func NewQApplicationStateChangeEvent(state ApplicationState) *QApplicationStateChangeEvent { - ret := C.QApplicationStateChangeEvent_new((C.int)(state)) - return newQApplicationStateChangeEvent(ret) + var outptr_QApplicationStateChangeEvent *C.QApplicationStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QApplicationStateChangeEvent_new((C.int)(state), &outptr_QApplicationStateChangeEvent, &outptr_QEvent) + ret := newQApplicationStateChangeEvent(outptr_QApplicationStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQApplicationStateChangeEvent2 constructs a new QApplicationStateChangeEvent object. func NewQApplicationStateChangeEvent2(param1 *QApplicationStateChangeEvent) *QApplicationStateChangeEvent { - ret := C.QApplicationStateChangeEvent_new2(param1.cPointer()) - return newQApplicationStateChangeEvent(ret) + var outptr_QApplicationStateChangeEvent *C.QApplicationStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QApplicationStateChangeEvent_new2(param1.cPointer(), &outptr_QApplicationStateChangeEvent, &outptr_QEvent) + ret := newQApplicationStateChangeEvent(outptr_QApplicationStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QApplicationStateChangeEvent) ApplicationState() ApplicationState { @@ -3406,7 +4384,7 @@ func (this *QApplicationStateChangeEvent) ApplicationState() ApplicationState { // Delete this object from C++ memory. func (this *QApplicationStateChangeEvent) Delete() { - C.QApplicationStateChangeEvent_Delete(this.h) + C.QApplicationStateChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3419,7 +4397,8 @@ func (this *QApplicationStateChangeEvent) GoGC() { } type QInputMethodEvent__Attribute struct { - h *C.QInputMethodEvent__Attribute + h *C.QInputMethodEvent__Attribute + isSubclass bool } func (this *QInputMethodEvent__Attribute) cPointer() *C.QInputMethodEvent__Attribute { @@ -3436,6 +4415,7 @@ func (this *QInputMethodEvent__Attribute) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQInputMethodEvent__Attribute constructs the type using only CGO pointers. func newQInputMethodEvent__Attribute(h *C.QInputMethodEvent__Attribute) *QInputMethodEvent__Attribute { if h == nil { return nil @@ -3443,26 +4423,43 @@ func newQInputMethodEvent__Attribute(h *C.QInputMethodEvent__Attribute) *QInputM return &QInputMethodEvent__Attribute{h: h} } +// UnsafeNewQInputMethodEvent__Attribute constructs the type using only unsafe pointers. func UnsafeNewQInputMethodEvent__Attribute(h unsafe.Pointer) *QInputMethodEvent__Attribute { - return newQInputMethodEvent__Attribute((*C.QInputMethodEvent__Attribute)(h)) + if h == nil { + return nil + } + + return &QInputMethodEvent__Attribute{h: (*C.QInputMethodEvent__Attribute)(h)} } // NewQInputMethodEvent__Attribute constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute(typ QInputMethodEvent__AttributeType, s int, l int, val QVariant) *QInputMethodEvent__Attribute { - ret := C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer()) - return newQInputMethodEvent__Attribute(ret) + var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil + + C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer(), &outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret.isSubclass = true + return ret } // NewQInputMethodEvent__Attribute2 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute2(typ QInputMethodEvent__AttributeType, s int, l int) *QInputMethodEvent__Attribute { - ret := C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l)) - return newQInputMethodEvent__Attribute(ret) + var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil + + C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l), &outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret.isSubclass = true + return ret } // NewQInputMethodEvent__Attribute3 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute3(param1 *QInputMethodEvent__Attribute) *QInputMethodEvent__Attribute { - ret := C.QInputMethodEvent__Attribute_new3(param1.cPointer()) - return newQInputMethodEvent__Attribute(ret) + var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil + + C.QInputMethodEvent__Attribute_new3(param1.cPointer(), &outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret.isSubclass = true + return ret } func (this *QInputMethodEvent__Attribute) OperatorAssign(param1 *QInputMethodEvent__Attribute) { @@ -3471,7 +4468,7 @@ func (this *QInputMethodEvent__Attribute) OperatorAssign(param1 *QInputMethodEve // Delete this object from C++ memory. func (this *QInputMethodEvent__Attribute) Delete() { - C.QInputMethodEvent__Attribute_Delete(this.h) + C.QInputMethodEvent__Attribute_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3484,7 +4481,8 @@ func (this *QInputMethodEvent__Attribute) GoGC() { } type QTouchEvent__TouchPoint struct { - h *C.QTouchEvent__TouchPoint + h *C.QTouchEvent__TouchPoint + isSubclass bool } func (this *QTouchEvent__TouchPoint) cPointer() *C.QTouchEvent__TouchPoint { @@ -3501,6 +4499,7 @@ func (this *QTouchEvent__TouchPoint) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTouchEvent__TouchPoint constructs the type using only CGO pointers. func newQTouchEvent__TouchPoint(h *C.QTouchEvent__TouchPoint) *QTouchEvent__TouchPoint { if h == nil { return nil @@ -3508,26 +4507,43 @@ func newQTouchEvent__TouchPoint(h *C.QTouchEvent__TouchPoint) *QTouchEvent__Touc return &QTouchEvent__TouchPoint{h: h} } +// UnsafeNewQTouchEvent__TouchPoint constructs the type using only unsafe pointers. func UnsafeNewQTouchEvent__TouchPoint(h unsafe.Pointer) *QTouchEvent__TouchPoint { - return newQTouchEvent__TouchPoint((*C.QTouchEvent__TouchPoint)(h)) + if h == nil { + return nil + } + + return &QTouchEvent__TouchPoint{h: (*C.QTouchEvent__TouchPoint)(h)} } // NewQTouchEvent__TouchPoint constructs a new QTouchEvent::TouchPoint object. func NewQTouchEvent__TouchPoint() *QTouchEvent__TouchPoint { - ret := C.QTouchEvent__TouchPoint_new() - return newQTouchEvent__TouchPoint(ret) + var outptr_QTouchEvent__TouchPoint *C.QTouchEvent__TouchPoint = nil + + C.QTouchEvent__TouchPoint_new(&outptr_QTouchEvent__TouchPoint) + ret := newQTouchEvent__TouchPoint(outptr_QTouchEvent__TouchPoint) + ret.isSubclass = true + return ret } // NewQTouchEvent__TouchPoint2 constructs a new QTouchEvent::TouchPoint object. func NewQTouchEvent__TouchPoint2(other *QTouchEvent__TouchPoint) *QTouchEvent__TouchPoint { - ret := C.QTouchEvent__TouchPoint_new2(other.cPointer()) - return newQTouchEvent__TouchPoint(ret) + var outptr_QTouchEvent__TouchPoint *C.QTouchEvent__TouchPoint = nil + + C.QTouchEvent__TouchPoint_new2(other.cPointer(), &outptr_QTouchEvent__TouchPoint) + ret := newQTouchEvent__TouchPoint(outptr_QTouchEvent__TouchPoint) + ret.isSubclass = true + return ret } // NewQTouchEvent__TouchPoint3 constructs a new QTouchEvent::TouchPoint object. func NewQTouchEvent__TouchPoint3(id int) *QTouchEvent__TouchPoint { - ret := C.QTouchEvent__TouchPoint_new3((C.int)(id)) - return newQTouchEvent__TouchPoint(ret) + var outptr_QTouchEvent__TouchPoint *C.QTouchEvent__TouchPoint = nil + + C.QTouchEvent__TouchPoint_new3((C.int)(id), &outptr_QTouchEvent__TouchPoint) + ret := newQTouchEvent__TouchPoint(outptr_QTouchEvent__TouchPoint) + ret.isSubclass = true + return ret } func (this *QTouchEvent__TouchPoint) OperatorAssign(other *QTouchEvent__TouchPoint) { @@ -3801,7 +4817,7 @@ func (this *QTouchEvent__TouchPoint) SetRawScreenPositions(positions []QPointF) // Delete this object from C++ memory. func (this *QTouchEvent__TouchPoint) Delete() { - C.QTouchEvent__TouchPoint_Delete(this.h) + C.QTouchEvent__TouchPoint_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qevent.h b/qt/gen_qevent.h index 14a30649..35a9d246 100644 --- a/qt/gen_qevent.h +++ b/qt/gen_qevent.h @@ -25,6 +25,7 @@ class QDragLeaveEvent; class QDragMoveEvent; class QDropEvent; class QEnterEvent; +class QEvent; class QExposeEvent; class QFile; class QFileOpenEvent; @@ -93,6 +94,7 @@ typedef struct QDragLeaveEvent QDragLeaveEvent; typedef struct QDragMoveEvent QDragMoveEvent; typedef struct QDropEvent QDropEvent; typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; typedef struct QExposeEvent QExposeEvent; typedef struct QFile QFile; typedef struct QFileOpenEvent QFileOpenEvent; @@ -144,17 +146,17 @@ typedef struct QWindow QWindow; typedef struct QWindowStateChangeEvent QWindowStateChangeEvent; #endif -QInputEvent* QInputEvent_new(int typeVal); -QInputEvent* QInputEvent_new2(QInputEvent* param1); -QInputEvent* QInputEvent_new3(int typeVal, int modifiers); +void QInputEvent_new(int typeVal, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QInputEvent_new2(QInputEvent* param1, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QInputEvent_new3(int typeVal, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); int QInputEvent_Modifiers(const QInputEvent* self); void QInputEvent_SetModifiers(QInputEvent* self, int amodifiers); unsigned long QInputEvent_Timestamp(const QInputEvent* self); void QInputEvent_SetTimestamp(QInputEvent* self, unsigned long atimestamp); -void QInputEvent_Delete(QInputEvent* self); +void QInputEvent_Delete(QInputEvent* self, bool isSubclass); -QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos); -QEnterEvent* QEnterEvent_new2(QEnterEvent* param1); +void QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent); +void QEnterEvent_new2(QEnterEvent* param1, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent); QPoint* QEnterEvent_Pos(const QEnterEvent* self); QPoint* QEnterEvent_GlobalPos(const QEnterEvent* self); int QEnterEvent_X(const QEnterEvent* self); @@ -164,13 +166,13 @@ int QEnterEvent_GlobalY(const QEnterEvent* self); QPointF* QEnterEvent_LocalPos(const QEnterEvent* self); QPointF* QEnterEvent_WindowPos(const QEnterEvent* self); QPointF* QEnterEvent_ScreenPos(const QEnterEvent* self); -void QEnterEvent_Delete(QEnterEvent* self); +void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass); -QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers); -QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers); -QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers); -QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source); -QMouseEvent* QMouseEvent_new5(QMouseEvent* param1); +void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new5(QMouseEvent* param1, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QPoint* QMouseEvent_Pos(const QMouseEvent* self); QPoint* QMouseEvent_GlobalPos(const QMouseEvent* self); int QMouseEvent_X(const QMouseEvent* self); @@ -185,28 +187,28 @@ int QMouseEvent_Buttons(const QMouseEvent* self); void QMouseEvent_SetLocalPos(QMouseEvent* self, QPointF* localPosition); int QMouseEvent_Source(const QMouseEvent* self); int QMouseEvent_Flags(const QMouseEvent* self); -void QMouseEvent_Delete(QMouseEvent* self); +void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass); -QHoverEvent* QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos); -QHoverEvent* QHoverEvent_new2(QHoverEvent* param1); -QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers); +void QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new2(QHoverEvent* param1, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QPoint* QHoverEvent_Pos(const QHoverEvent* self); QPoint* QHoverEvent_OldPos(const QHoverEvent* self); QPointF* QHoverEvent_PosF(const QHoverEvent* self); QPointF* QHoverEvent_OldPosF(const QHoverEvent* self); -void QHoverEvent_Delete(QHoverEvent* self); - -QWheelEvent* QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers); -QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers); -QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers); -QWheelEvent* QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase); -QWheelEvent* QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source); -QWheelEvent* QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted); -QWheelEvent* QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted); -QWheelEvent* QWheelEvent_new8(QWheelEvent* param1); -QWheelEvent* QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient); -QWheelEvent* QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient); -QWheelEvent* QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source); +void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass); + +void QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new8(QWheelEvent* param1, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self); QPoint* QWheelEvent_AngleDelta(const QWheelEvent* self); int QWheelEvent_Delta(const QWheelEvent* self); @@ -225,11 +227,11 @@ int QWheelEvent_Buttons(const QWheelEvent* self); int QWheelEvent_Phase(const QWheelEvent* self); bool QWheelEvent_Inverted(const QWheelEvent* self); int QWheelEvent_Source(const QWheelEvent* self); -void QWheelEvent_Delete(QWheelEvent* self); +void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass); -QTabletEvent* QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID); -QTabletEvent* QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons); -QTabletEvent* QTabletEvent_new3(QTabletEvent* param1); +void QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTabletEvent_new3(QTabletEvent* param1, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QPoint* QTabletEvent_Pos(const QTabletEvent* self); QPoint* QTabletEvent_GlobalPos(const QTabletEvent* self); QPointF* QTabletEvent_PosF(const QTabletEvent* self); @@ -252,11 +254,11 @@ int QTabletEvent_XTilt(const QTabletEvent* self); int QTabletEvent_YTilt(const QTabletEvent* self); int QTabletEvent_Button(const QTabletEvent* self); int QTabletEvent_Buttons(const QTabletEvent* self); -void QTabletEvent_Delete(QTabletEvent* self); +void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass); -QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument); -QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument); -QNativeGestureEvent* QNativeGestureEvent_new3(QNativeGestureEvent* param1); +void QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QNativeGestureEvent_new3(QNativeGestureEvent* param1, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); int QNativeGestureEvent_GestureType(const QNativeGestureEvent* self); double QNativeGestureEvent_Value(const QNativeGestureEvent* self); QPoint* QNativeGestureEvent_Pos(const QNativeGestureEvent* self); @@ -265,17 +267,17 @@ QPointF* QNativeGestureEvent_LocalPos(const QNativeGestureEvent* self); QPointF* QNativeGestureEvent_WindowPos(const QNativeGestureEvent* self); QPointF* QNativeGestureEvent_ScreenPos(const QNativeGestureEvent* self); QTouchDevice* QNativeGestureEvent_Device(const QNativeGestureEvent* self); -void QNativeGestureEvent_Delete(QNativeGestureEvent* self); - -QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers); -QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers); -QKeyEvent* QKeyEvent_new3(QKeyEvent* param1); -QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text); -QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep); -QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count); -QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text); -QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep); -QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count); +void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass); + +void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new3(QKeyEvent* param1, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); int QKeyEvent_Key(const QKeyEvent* self); bool QKeyEvent_Matches(const QKeyEvent* self, int key); int QKeyEvent_Modifiers(const QKeyEvent* self); @@ -285,69 +287,69 @@ int QKeyEvent_Count(const QKeyEvent* self); unsigned int QKeyEvent_NativeScanCode(const QKeyEvent* self); unsigned int QKeyEvent_NativeVirtualKey(const QKeyEvent* self); unsigned int QKeyEvent_NativeModifiers(const QKeyEvent* self); -void QKeyEvent_Delete(QKeyEvent* self); +void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass); -QFocusEvent* QFocusEvent_new(int typeVal); -QFocusEvent* QFocusEvent_new2(QFocusEvent* param1); -QFocusEvent* QFocusEvent_new3(int typeVal, int reason); +void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); +void QFocusEvent_new2(QFocusEvent* param1, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); +void QFocusEvent_new3(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); bool QFocusEvent_GotFocus(const QFocusEvent* self); bool QFocusEvent_LostFocus(const QFocusEvent* self); int QFocusEvent_Reason(const QFocusEvent* self); -void QFocusEvent_Delete(QFocusEvent* self); +void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass); -QPaintEvent* QPaintEvent_new(QRegion* paintRegion); -QPaintEvent* QPaintEvent_new2(QRect* paintRect); -QPaintEvent* QPaintEvent_new3(QPaintEvent* param1); +void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); +void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); +void QPaintEvent_new3(QPaintEvent* param1, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); QRect* QPaintEvent_Rect(const QPaintEvent* self); QRegion* QPaintEvent_Region(const QPaintEvent* self); -void QPaintEvent_Delete(QPaintEvent* self); +void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass); -QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos); -QMoveEvent* QMoveEvent_new2(QMoveEvent* param1); +void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent); +void QMoveEvent_new2(QMoveEvent* param1, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent); QPoint* QMoveEvent_Pos(const QMoveEvent* self); QPoint* QMoveEvent_OldPos(const QMoveEvent* self); -void QMoveEvent_Delete(QMoveEvent* self); +void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass); -QExposeEvent* QExposeEvent_new(QRegion* rgn); -QExposeEvent* QExposeEvent_new2(QExposeEvent* param1); +void QExposeEvent_new(QRegion* rgn, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent); +void QExposeEvent_new2(QExposeEvent* param1, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent); QRegion* QExposeEvent_Region(const QExposeEvent* self); -void QExposeEvent_Delete(QExposeEvent* self); +void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass); -QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType); -QPlatformSurfaceEvent* QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1); +void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent); +void QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent); int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self); -void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self); +void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass); -QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize); -QResizeEvent* QResizeEvent_new2(QResizeEvent* param1); +void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent); +void QResizeEvent_new2(QResizeEvent* param1, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent); QSize* QResizeEvent_Size(const QResizeEvent* self); QSize* QResizeEvent_OldSize(const QResizeEvent* self); -void QResizeEvent_Delete(QResizeEvent* self); +void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass); -QCloseEvent* QCloseEvent_new(); -QCloseEvent* QCloseEvent_new2(QCloseEvent* param1); +void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent); +void QCloseEvent_new2(QCloseEvent* param1, QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent); void QCloseEvent_OperatorAssign(QCloseEvent* self, QCloseEvent* param1); -void QCloseEvent_Delete(QCloseEvent* self); +void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass); -QIconDragEvent* QIconDragEvent_new(); -QIconDragEvent* QIconDragEvent_new2(QIconDragEvent* param1); +void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent); +void QIconDragEvent_new2(QIconDragEvent* param1, QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent); void QIconDragEvent_OperatorAssign(QIconDragEvent* self, QIconDragEvent* param1); -void QIconDragEvent_Delete(QIconDragEvent* self); +void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass); -QShowEvent* QShowEvent_new(); -QShowEvent* QShowEvent_new2(QShowEvent* param1); +void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent); +void QShowEvent_new2(QShowEvent* param1, QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent); void QShowEvent_OperatorAssign(QShowEvent* self, QShowEvent* param1); -void QShowEvent_Delete(QShowEvent* self); +void QShowEvent_Delete(QShowEvent* self, bool isSubclass); -QHideEvent* QHideEvent_new(); -QHideEvent* QHideEvent_new2(QHideEvent* param1); +void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent); +void QHideEvent_new2(QHideEvent* param1, QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent); void QHideEvent_OperatorAssign(QHideEvent* self, QHideEvent* param1); -void QHideEvent_Delete(QHideEvent* self); +void QHideEvent_Delete(QHideEvent* self, bool isSubclass); -QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers); -QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos); -QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos); -QContextMenuEvent* QContextMenuEvent_new4(QContextMenuEvent* param1); +void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QContextMenuEvent_new3(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QContextMenuEvent_new4(QContextMenuEvent* param1, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); int QContextMenuEvent_X(const QContextMenuEvent* self); int QContextMenuEvent_Y(const QContextMenuEvent* self); int QContextMenuEvent_GlobalX(const QContextMenuEvent* self); @@ -355,11 +357,11 @@ int QContextMenuEvent_GlobalY(const QContextMenuEvent* self); QPoint* QContextMenuEvent_Pos(const QContextMenuEvent* self); QPoint* QContextMenuEvent_GlobalPos(const QContextMenuEvent* self); int QContextMenuEvent_Reason(const QContextMenuEvent* self); -void QContextMenuEvent_Delete(QContextMenuEvent* self); +void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass); -QInputMethodEvent* QInputMethodEvent_new(); -QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes); -QInputMethodEvent* QInputMethodEvent_new3(QInputMethodEvent* other); +void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); +void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); +void QInputMethodEvent_new3(QInputMethodEvent* other, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); void QInputMethodEvent_SetCommitString(QInputMethodEvent* self, struct miqt_string commitString); struct miqt_array /* of QInputMethodEvent__Attribute* */ QInputMethodEvent_Attributes(const QInputMethodEvent* self); struct miqt_string QInputMethodEvent_PreeditString(const QInputMethodEvent* self); @@ -368,18 +370,18 @@ int QInputMethodEvent_ReplacementStart(const QInputMethodEvent* self); int QInputMethodEvent_ReplacementLength(const QInputMethodEvent* self); void QInputMethodEvent_SetCommitString2(QInputMethodEvent* self, struct miqt_string commitString, int replaceFrom); void QInputMethodEvent_SetCommitString3(QInputMethodEvent* self, struct miqt_string commitString, int replaceFrom, int replaceLength); -void QInputMethodEvent_Delete(QInputMethodEvent* self); +void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass); -QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries); -QInputMethodQueryEvent* QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1); +void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent); +void QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent); int QInputMethodQueryEvent_Queries(const QInputMethodQueryEvent* self); void QInputMethodQueryEvent_SetValue(QInputMethodQueryEvent* self, int query, QVariant* value); QVariant* QInputMethodQueryEvent_Value(const QInputMethodQueryEvent* self, int query); -void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self); +void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass); -QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers); -QDropEvent* QDropEvent_new2(QDropEvent* param1); -QDropEvent* QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDropEvent_new2(QDropEvent* param1, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); QPoint* QDropEvent_Pos(const QDropEvent* self); QPointF* QDropEvent_PosF(const QDropEvent* self); int QDropEvent_MouseButtons(const QDropEvent* self); @@ -391,97 +393,97 @@ int QDropEvent_DropAction(const QDropEvent* self); void QDropEvent_SetDropAction(QDropEvent* self, int action); QObject* QDropEvent_Source(const QDropEvent* self); QMimeData* QDropEvent_MimeData(const QDropEvent* self); -void QDropEvent_Delete(QDropEvent* self); +void QDropEvent_Delete(QDropEvent* self, bool isSubclass); -QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); -QDragMoveEvent* QDragMoveEvent_new2(QDragMoveEvent* param1); -QDragMoveEvent* QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDragMoveEvent_new2(QDragMoveEvent* param1, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self); void QDragMoveEvent_Accept(QDragMoveEvent* self); void QDragMoveEvent_Ignore(QDragMoveEvent* self); void QDragMoveEvent_AcceptWithQRect(QDragMoveEvent* self, QRect* r); void QDragMoveEvent_IgnoreWithQRect(QDragMoveEvent* self, QRect* r); -void QDragMoveEvent_Delete(QDragMoveEvent* self); +void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass); -QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); -QDragEnterEvent* QDragEnterEvent_new2(QDragEnterEvent* param1); +void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDragEnterEvent_new2(QDragEnterEvent* param1, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); void QDragEnterEvent_OperatorAssign(QDragEnterEvent* self, QDragEnterEvent* param1); -void QDragEnterEvent_Delete(QDragEnterEvent* self); +void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass); -QDragLeaveEvent* QDragLeaveEvent_new(); -QDragLeaveEvent* QDragLeaveEvent_new2(QDragLeaveEvent* param1); +void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent); +void QDragLeaveEvent_new2(QDragLeaveEvent* param1, QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent); void QDragLeaveEvent_OperatorAssign(QDragLeaveEvent* self, QDragLeaveEvent* param1); -void QDragLeaveEvent_Delete(QDragLeaveEvent* self); +void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass); -QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos); -QHelpEvent* QHelpEvent_new2(QHelpEvent* param1); +void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent); +void QHelpEvent_new2(QHelpEvent* param1, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent); int QHelpEvent_X(const QHelpEvent* self); int QHelpEvent_Y(const QHelpEvent* self); int QHelpEvent_GlobalX(const QHelpEvent* self); int QHelpEvent_GlobalY(const QHelpEvent* self); QPoint* QHelpEvent_Pos(const QHelpEvent* self); QPoint* QHelpEvent_GlobalPos(const QHelpEvent* self); -void QHelpEvent_Delete(QHelpEvent* self); +void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass); -QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip); -QStatusTipEvent* QStatusTipEvent_new2(QStatusTipEvent* param1); +void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent); +void QStatusTipEvent_new2(QStatusTipEvent* param1, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent); struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self); -void QStatusTipEvent_Delete(QStatusTipEvent* self); +void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass); -QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href); -QWhatsThisClickedEvent* QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1); +void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent); +void QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent); struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* self); -void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self); +void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass); -QActionEvent* QActionEvent_new(int typeVal, QAction* action); -QActionEvent* QActionEvent_new2(QActionEvent* param1); -QActionEvent* QActionEvent_new3(int typeVal, QAction* action, QAction* before); +void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); +void QActionEvent_new2(QActionEvent* param1, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); +void QActionEvent_new3(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); QAction* QActionEvent_Action(const QActionEvent* self); QAction* QActionEvent_Before(const QActionEvent* self); void QActionEvent_OperatorAssign(QActionEvent* self, QActionEvent* param1); -void QActionEvent_Delete(QActionEvent* self); +void QActionEvent_Delete(QActionEvent* self, bool isSubclass); -QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file); -QFileOpenEvent* QFileOpenEvent_new2(QUrl* url); -QFileOpenEvent* QFileOpenEvent_new3(QFileOpenEvent* param1); +void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); +void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); +void QFileOpenEvent_new3(QFileOpenEvent* param1, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); struct miqt_string QFileOpenEvent_File(const QFileOpenEvent* self); QUrl* QFileOpenEvent_Url(const QFileOpenEvent* self); bool QFileOpenEvent_OpenFile(const QFileOpenEvent* self, QFile* file, int flags); -void QFileOpenEvent_Delete(QFileOpenEvent* self); +void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass); -QToolBarChangeEvent* QToolBarChangeEvent_new(bool t); -QToolBarChangeEvent* QToolBarChangeEvent_new2(QToolBarChangeEvent* param1); +void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent); +void QToolBarChangeEvent_new2(QToolBarChangeEvent* param1, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent); bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self); -void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self); +void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass); -QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id); -QShortcutEvent* QShortcutEvent_new2(QShortcutEvent* param1); -QShortcutEvent* QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous); +void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); +void QShortcutEvent_new2(QShortcutEvent* param1, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); +void QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); QKeySequence* QShortcutEvent_Key(const QShortcutEvent* self); int QShortcutEvent_ShortcutId(const QShortcutEvent* self); bool QShortcutEvent_IsAmbiguous(const QShortcutEvent* self); -void QShortcutEvent_Delete(QShortcutEvent* self); +void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass); -QWindowStateChangeEvent* QWindowStateChangeEvent_new(int aOldState); -QWindowStateChangeEvent* QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1); -QWindowStateChangeEvent* QWindowStateChangeEvent_new3(int aOldState, bool isOverride); +void QWindowStateChangeEvent_new(int aOldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); +void QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); +void QWindowStateChangeEvent_new3(int aOldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); int QWindowStateChangeEvent_OldState(const QWindowStateChangeEvent* self); bool QWindowStateChangeEvent_IsOverride(const QWindowStateChangeEvent* self); -void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self); +void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubclass); -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new(); -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1); +void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); +void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id); bool QPointingDeviceUniqueId_IsValid(const QPointingDeviceUniqueId* self); long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self); -void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self); - -QTouchEvent* QTouchEvent_new(int eventType); -QTouchEvent* QTouchEvent_new2(QTouchEvent* param1); -QTouchEvent* QTouchEvent_new3(int eventType, QTouchDevice* device); -QTouchEvent* QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers); -QTouchEvent* QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates); -QTouchEvent* QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints); +void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubclass); + +void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new2(QTouchEvent* param1, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new3(int eventType, QTouchDevice* device, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QWindow* QTouchEvent_Window(const QTouchEvent* self); QObject* QTouchEvent_Target(const QTouchEvent* self); int QTouchEvent_TouchPointStates(const QTouchEvent* self); @@ -492,10 +494,10 @@ void QTouchEvent_SetTarget(QTouchEvent* self, QObject* atarget); void QTouchEvent_SetTouchPointStates(QTouchEvent* self, int aTouchPointStates); void QTouchEvent_SetTouchPoints(QTouchEvent* self, struct miqt_array /* of QTouchEvent__TouchPoint* */ atouchPoints); void QTouchEvent_SetDevice(QTouchEvent* self, QTouchDevice* adevice); -void QTouchEvent_Delete(QTouchEvent* self); +void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass); -QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos); -QScrollPrepareEvent* QScrollPrepareEvent_new2(QScrollPrepareEvent* param1); +void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent); +void QScrollPrepareEvent_new2(QScrollPrepareEvent* param1, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent); QPointF* QScrollPrepareEvent_StartPos(const QScrollPrepareEvent* self); QSizeF* QScrollPrepareEvent_ViewportSize(const QScrollPrepareEvent* self); QRectF* QScrollPrepareEvent_ContentPosRange(const QScrollPrepareEvent* self); @@ -503,35 +505,35 @@ QPointF* QScrollPrepareEvent_ContentPos(const QScrollPrepareEvent* self); void QScrollPrepareEvent_SetViewportSize(QScrollPrepareEvent* self, QSizeF* size); void QScrollPrepareEvent_SetContentPosRange(QScrollPrepareEvent* self, QRectF* rect); void QScrollPrepareEvent_SetContentPos(QScrollPrepareEvent* self, QPointF* pos); -void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self); +void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass); -QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState); -QScrollEvent* QScrollEvent_new2(QScrollEvent* param1); +void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent); +void QScrollEvent_new2(QScrollEvent* param1, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent); QPointF* QScrollEvent_ContentPos(const QScrollEvent* self); QPointF* QScrollEvent_OvershootDistance(const QScrollEvent* self); int QScrollEvent_ScrollState(const QScrollEvent* self); -void QScrollEvent_Delete(QScrollEvent* self); +void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass); -QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation); -QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1); +void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent); +void QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent); QScreen* QScreenOrientationChangeEvent_Screen(const QScreenOrientationChangeEvent* self); int QScreenOrientationChangeEvent_Orientation(const QScreenOrientationChangeEvent* self); -void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self); +void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, bool isSubclass); -QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state); -QApplicationStateChangeEvent* QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1); +void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent); +void QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent); int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeEvent* self); -void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self); +void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, bool isSubclass); -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val); -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l); -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1); +void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); +void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); +void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1); -void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self); +void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, bool isSubclass); -QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new(); -QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other); -QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new3(int id); +void QTouchEvent__TouchPoint_new(QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint); +void QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint); +void QTouchEvent__TouchPoint_new3(int id, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint); void QTouchEvent__TouchPoint_OperatorAssign(QTouchEvent__TouchPoint* self, QTouchEvent__TouchPoint* other); void QTouchEvent__TouchPoint_Swap(QTouchEvent__TouchPoint* self, QTouchEvent__TouchPoint* other); int QTouchEvent__TouchPoint_Id(const QTouchEvent__TouchPoint* self); @@ -582,7 +584,7 @@ void QTouchEvent__TouchPoint_SetEllipseDiameters(QTouchEvent__TouchPoint* self, void QTouchEvent__TouchPoint_SetVelocity(QTouchEvent__TouchPoint* self, QVector2D* v); void QTouchEvent__TouchPoint_SetFlags(QTouchEvent__TouchPoint* self, int flags); void QTouchEvent__TouchPoint_SetRawScreenPositions(QTouchEvent__TouchPoint* self, struct miqt_array /* of QPointF* */ positions); -void QTouchEvent__TouchPoint_Delete(QTouchEvent__TouchPoint* self); +void QTouchEvent__TouchPoint_Delete(QTouchEvent__TouchPoint* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qeventloop.cpp b/qt/gen_qeventloop.cpp index e7624007..94fac1ea 100644 --- a/qt/gen_qeventloop.cpp +++ b/qt/gen_qeventloop.cpp @@ -1,22 +1,210 @@ +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qeventloop.h" #include "_cgo_export.h" -QEventLoop* QEventLoop_new() { - return new QEventLoop(); +class MiqtVirtualQEventLoop : public virtual QEventLoop { +public: + + MiqtVirtualQEventLoop(): QEventLoop() {}; + MiqtVirtualQEventLoop(QObject* parent): QEventLoop(parent) {}; + + virtual ~MiqtVirtualQEventLoop() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QEventLoop::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QEventLoop_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QEventLoop::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QEventLoop::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QEventLoop_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QEventLoop::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QEventLoop::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QEventLoop_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QEventLoop::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QEventLoop::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QEventLoop_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QEventLoop::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QEventLoop::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QEventLoop_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QEventLoop::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QEventLoop::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QEventLoop_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QEventLoop::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QEventLoop::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QEventLoop_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QEventLoop::disconnectNotify(*signal); + + } + +}; + +void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { + MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(); + *outptr_QEventLoop = ret; + *outptr_QObject = static_cast(ret); } -QEventLoop* QEventLoop_new2(QObject* parent) { - return new QEventLoop(parent); +void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { + MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(parent); + *outptr_QEventLoop = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QEventLoop_MetaObject(const QEventLoop* self) { @@ -137,23 +325,90 @@ void QEventLoop_Exit1(QEventLoop* self, int returnCode) { self->exit(static_cast(returnCode)); } -void QEventLoop_Delete(QEventLoop* self) { - delete self; +void QEventLoop_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__Event = slot; +} + +bool QEventLoop_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_Event(event); +} + +void QEventLoop_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__EventFilter = slot; +} + +bool QEventLoop_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QEventLoop_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__TimerEvent = slot; +} + +void QEventLoop_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_TimerEvent(event); +} + +void QEventLoop_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__ChildEvent = slot; +} + +void QEventLoop_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_ChildEvent(event); +} + +void QEventLoop_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__CustomEvent = slot; +} + +void QEventLoop_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_CustomEvent(event); +} + +void QEventLoop_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__ConnectNotify = slot; +} + +void QEventLoop_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QEventLoop_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__DisconnectNotify = slot; +} + +void QEventLoop_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QEventLoop_Delete(QEventLoop* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QEventLoopLocker* QEventLoopLocker_new() { - return new QEventLoopLocker(); +void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker) { + QEventLoopLocker* ret = new QEventLoopLocker(); + *outptr_QEventLoopLocker = ret; } -QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop) { - return new QEventLoopLocker(loop); +void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker) { + QEventLoopLocker* ret = new QEventLoopLocker(loop); + *outptr_QEventLoopLocker = ret; } -QEventLoopLocker* QEventLoopLocker_new3(QThread* thread) { - return new QEventLoopLocker(thread); +void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker) { + QEventLoopLocker* ret = new QEventLoopLocker(thread); + *outptr_QEventLoopLocker = ret; } -void QEventLoopLocker_Delete(QEventLoopLocker* self) { - delete self; +void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qeventloop.go b/qt/gen_qeventloop.go index 7004fe47..b086dee4 100644 --- a/qt/gen_qeventloop.go +++ b/qt/gen_qeventloop.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -26,7 +27,8 @@ const ( ) type QEventLoop struct { - h *C.QEventLoop + h *C.QEventLoop + isSubclass bool *QObject } @@ -44,27 +46,45 @@ func (this *QEventLoop) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQEventLoop(h *C.QEventLoop) *QEventLoop { +// newQEventLoop constructs the type using only CGO pointers. +func newQEventLoop(h *C.QEventLoop, h_QObject *C.QObject) *QEventLoop { if h == nil { return nil } - return &QEventLoop{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QEventLoop{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQEventLoop(h unsafe.Pointer) *QEventLoop { - return newQEventLoop((*C.QEventLoop)(h)) +// UnsafeNewQEventLoop constructs the type using only unsafe pointers. +func UnsafeNewQEventLoop(h unsafe.Pointer, h_QObject unsafe.Pointer) *QEventLoop { + if h == nil { + return nil + } + + return &QEventLoop{h: (*C.QEventLoop)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQEventLoop constructs a new QEventLoop object. func NewQEventLoop() *QEventLoop { - ret := C.QEventLoop_new() - return newQEventLoop(ret) + var outptr_QEventLoop *C.QEventLoop = nil + var outptr_QObject *C.QObject = nil + + C.QEventLoop_new(&outptr_QEventLoop, &outptr_QObject) + ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret.isSubclass = true + return ret } // NewQEventLoop2 constructs a new QEventLoop object. func NewQEventLoop2(parent *QObject) *QEventLoop { - ret := C.QEventLoop_new2(parent.cPointer()) - return newQEventLoop(ret) + var outptr_QEventLoop *C.QEventLoop = nil + var outptr_QObject *C.QObject = nil + + C.QEventLoop_new2(parent.cPointer(), &outptr_QEventLoop, &outptr_QObject) + ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QEventLoop) MetaObject() *QMetaObject { @@ -183,9 +203,175 @@ func (this *QEventLoop) Exit1(returnCode int) { C.QEventLoop_Exit1(this.h, (C.int)(returnCode)) } +func (this *QEventLoop) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QEventLoop_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QEventLoop) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QEventLoop_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_Event +func miqt_exec_callback_QEventLoop_Event(self *C.QEventLoop, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QEventLoop{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QEventLoop) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QEventLoop_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QEventLoop) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QEventLoop_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_EventFilter +func miqt_exec_callback_QEventLoop_EventFilter(self *C.QEventLoop, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QEventLoop{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QEventLoop) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QEventLoop_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventLoop) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QEventLoop_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_TimerEvent +func miqt_exec_callback_QEventLoop_TimerEvent(self *C.QEventLoop, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QEventLoop{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QEventLoop_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventLoop) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QEventLoop_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_ChildEvent +func miqt_exec_callback_QEventLoop_ChildEvent(self *C.QEventLoop, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QEventLoop{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_CustomEvent(event *QEvent) { + + C.QEventLoop_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventLoop) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QEventLoop_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_CustomEvent +func miqt_exec_callback_QEventLoop_CustomEvent(self *C.QEventLoop, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QEventLoop{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QEventLoop_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QEventLoop) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QEventLoop_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_ConnectNotify +func miqt_exec_callback_QEventLoop_ConnectNotify(self *C.QEventLoop, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QEventLoop{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QEventLoop_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QEventLoop) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QEventLoop_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_DisconnectNotify +func miqt_exec_callback_QEventLoop_DisconnectNotify(self *C.QEventLoop, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QEventLoop{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QEventLoop) Delete() { - C.QEventLoop_Delete(this.h) + C.QEventLoop_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -198,7 +384,8 @@ func (this *QEventLoop) GoGC() { } type QEventLoopLocker struct { - h *C.QEventLoopLocker + h *C.QEventLoopLocker + isSubclass bool } func (this *QEventLoopLocker) cPointer() *C.QEventLoopLocker { @@ -215,6 +402,7 @@ func (this *QEventLoopLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEventLoopLocker constructs the type using only CGO pointers. func newQEventLoopLocker(h *C.QEventLoopLocker) *QEventLoopLocker { if h == nil { return nil @@ -222,31 +410,48 @@ func newQEventLoopLocker(h *C.QEventLoopLocker) *QEventLoopLocker { return &QEventLoopLocker{h: h} } +// UnsafeNewQEventLoopLocker constructs the type using only unsafe pointers. func UnsafeNewQEventLoopLocker(h unsafe.Pointer) *QEventLoopLocker { - return newQEventLoopLocker((*C.QEventLoopLocker)(h)) + if h == nil { + return nil + } + + return &QEventLoopLocker{h: (*C.QEventLoopLocker)(h)} } // NewQEventLoopLocker constructs a new QEventLoopLocker object. func NewQEventLoopLocker() *QEventLoopLocker { - ret := C.QEventLoopLocker_new() - return newQEventLoopLocker(ret) + var outptr_QEventLoopLocker *C.QEventLoopLocker = nil + + C.QEventLoopLocker_new(&outptr_QEventLoopLocker) + ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret.isSubclass = true + return ret } // NewQEventLoopLocker2 constructs a new QEventLoopLocker object. func NewQEventLoopLocker2(loop *QEventLoop) *QEventLoopLocker { - ret := C.QEventLoopLocker_new2(loop.cPointer()) - return newQEventLoopLocker(ret) + var outptr_QEventLoopLocker *C.QEventLoopLocker = nil + + C.QEventLoopLocker_new2(loop.cPointer(), &outptr_QEventLoopLocker) + ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret.isSubclass = true + return ret } // NewQEventLoopLocker3 constructs a new QEventLoopLocker object. func NewQEventLoopLocker3(thread *QThread) *QEventLoopLocker { - ret := C.QEventLoopLocker_new3(thread.cPointer()) - return newQEventLoopLocker(ret) + var outptr_QEventLoopLocker *C.QEventLoopLocker = nil + + C.QEventLoopLocker_new3(thread.cPointer(), &outptr_QEventLoopLocker) + ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QEventLoopLocker) Delete() { - C.QEventLoopLocker_Delete(this.h) + C.QEventLoopLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qeventloop.h b/qt/gen_qeventloop.h index f868c008..8ec7ea5b 100644 --- a/qt/gen_qeventloop.h +++ b/qt/gen_qeventloop.h @@ -15,23 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QEvent; class QEventLoop; class QEventLoopLocker; +class QMetaMethod; class QMetaObject; class QObject; class QThread; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QEventLoop QEventLoop; typedef struct QEventLoopLocker QEventLoopLocker; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; #endif -QEventLoop* QEventLoop_new(); -QEventLoop* QEventLoop_new2(QObject* parent); +void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); +void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); QMetaObject* QEventLoop_MetaObject(const QEventLoop* self); void* QEventLoop_Metacast(QEventLoop* self, const char* param1); struct miqt_string QEventLoop_Tr(const char* s); @@ -51,12 +57,26 @@ struct miqt_string QEventLoop_TrUtf83(const char* s, const char* c, int n); bool QEventLoop_ProcessEvents1(QEventLoop* self, int flags); int QEventLoop_Exec1(QEventLoop* self, int flags); void QEventLoop_Exit1(QEventLoop* self, int returnCode); -void QEventLoop_Delete(QEventLoop* self); +void QEventLoop_override_virtual_Event(void* self, intptr_t slot); +bool QEventLoop_virtualbase_Event(void* self, QEvent* event); +void QEventLoop_override_virtual_EventFilter(void* self, intptr_t slot); +bool QEventLoop_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QEventLoop_override_virtual_TimerEvent(void* self, intptr_t slot); +void QEventLoop_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QEventLoop_override_virtual_ChildEvent(void* self, intptr_t slot); +void QEventLoop_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QEventLoop_override_virtual_CustomEvent(void* self, intptr_t slot); +void QEventLoop_virtualbase_CustomEvent(void* self, QEvent* event); +void QEventLoop_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QEventLoop_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QEventLoop_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QEventLoop_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QEventLoop_Delete(QEventLoop* self, bool isSubclass); -QEventLoopLocker* QEventLoopLocker_new(); -QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop); -QEventLoopLocker* QEventLoopLocker_new3(QThread* thread); -void QEventLoopLocker_Delete(QEventLoopLocker* self); +void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker); +void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker); +void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker); +void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qeventtransition.cpp b/qt/gen_qeventtransition.cpp index ccb987b7..e345c726 100644 --- a/qt/gen_qeventtransition.cpp +++ b/qt/gen_qeventtransition.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -9,20 +11,114 @@ #include "gen_qeventtransition.h" #include "_cgo_export.h" -QEventTransition* QEventTransition_new() { - return new QEventTransition(); +class MiqtVirtualQEventTransition : public virtual QEventTransition { +public: + + MiqtVirtualQEventTransition(): QEventTransition() {}; + MiqtVirtualQEventTransition(QObject* object, QEvent::Type typeVal): QEventTransition(object, typeVal) {}; + MiqtVirtualQEventTransition(QState* sourceState): QEventTransition(sourceState) {}; + MiqtVirtualQEventTransition(QObject* object, QEvent::Type typeVal, QState* sourceState): QEventTransition(object, typeVal, sourceState) {}; + + virtual ~MiqtVirtualQEventTransition() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventTest = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventTest(QEvent* event) override { + if (handle__EventTest == 0) { + return QEventTransition::eventTest(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QEventTransition_EventTest(this, handle__EventTest, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventTest(QEvent* event) { + + return QEventTransition::eventTest(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnTransition = 0; + + // Subclass to allow providing a Go implementation + virtual void onTransition(QEvent* event) override { + if (handle__OnTransition == 0) { + QEventTransition::onTransition(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QEventTransition_OnTransition(this, handle__OnTransition, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnTransition(QEvent* event) { + + QEventTransition::onTransition(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QEventTransition::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QEventTransition_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QEventTransition::event(e); + + } + +}; + +void QEventTransition_new(QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(); + *outptr_QEventTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QEventTransition* QEventTransition_new2(QObject* object, int typeVal) { - return new QEventTransition(object, static_cast(typeVal)); +void QEventTransition_new2(QObject* object, int typeVal, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(object, static_cast(typeVal)); + *outptr_QEventTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QEventTransition* QEventTransition_new3(QState* sourceState) { - return new QEventTransition(sourceState); +void QEventTransition_new3(QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(sourceState); + *outptr_QEventTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QEventTransition* QEventTransition_new4(QObject* object, int typeVal, QState* sourceState) { - return new QEventTransition(object, static_cast(typeVal), sourceState); +void QEventTransition_new4(QObject* object, int typeVal, QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(object, static_cast(typeVal), sourceState); + *outptr_QEventTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QEventTransition_MetaObject(const QEventTransition* self) { @@ -116,7 +212,35 @@ struct miqt_string QEventTransition_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QEventTransition_Delete(QEventTransition* self) { - delete self; +void QEventTransition_override_virtual_EventTest(void* self, intptr_t slot) { + dynamic_cast( (QEventTransition*)(self) )->handle__EventTest = slot; +} + +bool QEventTransition_virtualbase_EventTest(void* self, QEvent* event) { + return ( (MiqtVirtualQEventTransition*)(self) )->virtualbase_EventTest(event); +} + +void QEventTransition_override_virtual_OnTransition(void* self, intptr_t slot) { + dynamic_cast( (QEventTransition*)(self) )->handle__OnTransition = slot; +} + +void QEventTransition_virtualbase_OnTransition(void* self, QEvent* event) { + ( (MiqtVirtualQEventTransition*)(self) )->virtualbase_OnTransition(event); +} + +void QEventTransition_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QEventTransition*)(self) )->handle__Event = slot; +} + +bool QEventTransition_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQEventTransition*)(self) )->virtualbase_Event(e); +} + +void QEventTransition_Delete(QEventTransition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qeventtransition.go b/qt/gen_qeventtransition.go index 165a2832..1567697b 100644 --- a/qt/gen_qeventtransition.go +++ b/qt/gen_qeventtransition.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QEventTransition struct { - h *C.QEventTransition + h *C.QEventTransition + isSubclass bool *QAbstractTransition } @@ -32,39 +34,71 @@ func (this *QEventTransition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQEventTransition(h *C.QEventTransition) *QEventTransition { +// newQEventTransition constructs the type using only CGO pointers. +func newQEventTransition(h *C.QEventTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QEventTransition { if h == nil { return nil } - return &QEventTransition{h: h, QAbstractTransition: UnsafeNewQAbstractTransition(unsafe.Pointer(h))} + return &QEventTransition{h: h, + QAbstractTransition: newQAbstractTransition(h_QAbstractTransition, h_QObject)} } -func UnsafeNewQEventTransition(h unsafe.Pointer) *QEventTransition { - return newQEventTransition((*C.QEventTransition)(h)) +// UnsafeNewQEventTransition constructs the type using only unsafe pointers. +func UnsafeNewQEventTransition(h unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QEventTransition { + if h == nil { + return nil + } + + return &QEventTransition{h: (*C.QEventTransition)(h), + QAbstractTransition: UnsafeNewQAbstractTransition(h_QAbstractTransition, h_QObject)} } // NewQEventTransition constructs a new QEventTransition object. func NewQEventTransition() *QEventTransition { - ret := C.QEventTransition_new() - return newQEventTransition(ret) + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QEventTransition_new(&outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQEventTransition2 constructs a new QEventTransition object. func NewQEventTransition2(object *QObject, typeVal QEvent__Type) *QEventTransition { - ret := C.QEventTransition_new2(object.cPointer(), (C.int)(typeVal)) - return newQEventTransition(ret) + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QEventTransition_new2(object.cPointer(), (C.int)(typeVal), &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQEventTransition3 constructs a new QEventTransition object. func NewQEventTransition3(sourceState *QState) *QEventTransition { - ret := C.QEventTransition_new3(sourceState.cPointer()) - return newQEventTransition(ret) + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QEventTransition_new3(sourceState.cPointer(), &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQEventTransition4 constructs a new QEventTransition object. func NewQEventTransition4(object *QObject, typeVal QEvent__Type, sourceState *QState) *QEventTransition { - ret := C.QEventTransition_new4(object.cPointer(), (C.int)(typeVal), sourceState.cPointer()) - return newQEventTransition(ret) + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QEventTransition_new4(object.cPointer(), (C.int)(typeVal), sourceState.cPointer(), &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QEventTransition) MetaObject() *QMetaObject { @@ -155,9 +189,82 @@ func QEventTransition_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QEventTransition) callVirtualBase_EventTest(event *QEvent) bool { + + return (bool)(C.QEventTransition_virtualbase_EventTest(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QEventTransition) OnEventTest(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QEventTransition_override_virtual_EventTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventTransition_EventTest +func miqt_exec_callback_QEventTransition_EventTest(self *C.QEventTransition, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QEventTransition{h: self}).callVirtualBase_EventTest, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QEventTransition) callVirtualBase_OnTransition(event *QEvent) { + + C.QEventTransition_virtualbase_OnTransition(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventTransition) OnOnTransition(slot func(super func(event *QEvent), event *QEvent)) { + C.QEventTransition_override_virtual_OnTransition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventTransition_OnTransition +func miqt_exec_callback_QEventTransition_OnTransition(self *C.QEventTransition, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QEventTransition{h: self}).callVirtualBase_OnTransition, slotval1) + +} + +func (this *QEventTransition) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QEventTransition_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QEventTransition) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QEventTransition_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventTransition_Event +func miqt_exec_callback_QEventTransition_Event(self *C.QEventTransition, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QEventTransition{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QEventTransition) Delete() { - C.QEventTransition_Delete(this.h) + C.QEventTransition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qeventtransition.h b/qt/gen_qeventtransition.h index c6e4a027..88443e4f 100644 --- a/qt/gen_qeventtransition.h +++ b/qt/gen_qeventtransition.h @@ -15,21 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractTransition; +class QEvent; class QEventTransition; class QMetaObject; class QObject; class QState; #else +typedef struct QAbstractTransition QAbstractTransition; +typedef struct QEvent QEvent; typedef struct QEventTransition QEventTransition; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QState QState; #endif -QEventTransition* QEventTransition_new(); -QEventTransition* QEventTransition_new2(QObject* object, int typeVal); -QEventTransition* QEventTransition_new3(QState* sourceState); -QEventTransition* QEventTransition_new4(QObject* object, int typeVal, QState* sourceState); +void QEventTransition_new(QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QEventTransition_new2(QObject* object, int typeVal, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QEventTransition_new3(QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QEventTransition_new4(QObject* object, int typeVal, QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); QMetaObject* QEventTransition_MetaObject(const QEventTransition* self); void* QEventTransition_Metacast(QEventTransition* self, const char* param1); struct miqt_string QEventTransition_Tr(const char* s); @@ -38,11 +42,20 @@ QObject* QEventTransition_EventSource(const QEventTransition* self); void QEventTransition_SetEventSource(QEventTransition* self, QObject* object); int QEventTransition_EventType(const QEventTransition* self); void QEventTransition_SetEventType(QEventTransition* self, int typeVal); +bool QEventTransition_EventTest(QEventTransition* self, QEvent* event); +void QEventTransition_OnTransition(QEventTransition* self, QEvent* event); +bool QEventTransition_Event(QEventTransition* self, QEvent* e); struct miqt_string QEventTransition_Tr2(const char* s, const char* c); struct miqt_string QEventTransition_Tr3(const char* s, const char* c, int n); struct miqt_string QEventTransition_TrUtf82(const char* s, const char* c); struct miqt_string QEventTransition_TrUtf83(const char* s, const char* c, int n); -void QEventTransition_Delete(QEventTransition* self); +void QEventTransition_override_virtual_EventTest(void* self, intptr_t slot); +bool QEventTransition_virtualbase_EventTest(void* self, QEvent* event); +void QEventTransition_override_virtual_OnTransition(void* self, intptr_t slot); +void QEventTransition_virtualbase_OnTransition(void* self, QEvent* event); +void QEventTransition_override_virtual_Event(void* self, intptr_t slot); +bool QEventTransition_virtualbase_Event(void* self, QEvent* e); +void QEventTransition_Delete(QEventTransition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qexception.cpp b/qt/gen_qexception.cpp index 4b94ccd5..e073f4a2 100644 --- a/qt/gen_qexception.cpp +++ b/qt/gen_qexception.cpp @@ -4,12 +4,17 @@ #include "gen_qexception.h" #include "_cgo_export.h" -QtPrivate__ExceptionHolder* QtPrivate__ExceptionHolder_new() { - return new QtPrivate::ExceptionHolder(); +void QtPrivate__ExceptionHolder_new(QtPrivate__ExceptionHolder** outptr_QtPrivate__ExceptionHolder) { + QtPrivate::ExceptionHolder* ret = new QtPrivate::ExceptionHolder(); + *outptr_QtPrivate__ExceptionHolder = ret; } -void QtPrivate__ExceptionHolder_Delete(QtPrivate__ExceptionHolder* self) { - delete self; +void QtPrivate__ExceptionHolder_Delete(QtPrivate__ExceptionHolder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self) { @@ -24,7 +29,11 @@ bool QtPrivate__ExceptionStore_HasThrown(const QtPrivate__ExceptionStore* self) return self->hasThrown(); } -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self) { - delete self; +void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qexception.go b/qt/gen_qexception.go index 934eb7b2..4779bbfa 100644 --- a/qt/gen_qexception.go +++ b/qt/gen_qexception.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__ExceptionHolder struct { - h *C.QtPrivate__ExceptionHolder + h *C.QtPrivate__ExceptionHolder + isSubclass bool } func (this *QtPrivate__ExceptionHolder) cPointer() *C.QtPrivate__ExceptionHolder { @@ -31,6 +32,7 @@ func (this *QtPrivate__ExceptionHolder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ExceptionHolder constructs the type using only CGO pointers. func newQtPrivate__ExceptionHolder(h *C.QtPrivate__ExceptionHolder) *QtPrivate__ExceptionHolder { if h == nil { return nil @@ -38,19 +40,28 @@ func newQtPrivate__ExceptionHolder(h *C.QtPrivate__ExceptionHolder) *QtPrivate__ return &QtPrivate__ExceptionHolder{h: h} } +// UnsafeNewQtPrivate__ExceptionHolder constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ExceptionHolder(h unsafe.Pointer) *QtPrivate__ExceptionHolder { - return newQtPrivate__ExceptionHolder((*C.QtPrivate__ExceptionHolder)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ExceptionHolder{h: (*C.QtPrivate__ExceptionHolder)(h)} } // NewQtPrivate__ExceptionHolder constructs a new QtPrivate::ExceptionHolder object. func NewQtPrivate__ExceptionHolder() *QtPrivate__ExceptionHolder { - ret := C.QtPrivate__ExceptionHolder_new() - return newQtPrivate__ExceptionHolder(ret) + var outptr_QtPrivate__ExceptionHolder *C.QtPrivate__ExceptionHolder = nil + + C.QtPrivate__ExceptionHolder_new(&outptr_QtPrivate__ExceptionHolder) + ret := newQtPrivate__ExceptionHolder(outptr_QtPrivate__ExceptionHolder) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__ExceptionHolder) Delete() { - C.QtPrivate__ExceptionHolder_Delete(this.h) + C.QtPrivate__ExceptionHolder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -63,7 +74,8 @@ func (this *QtPrivate__ExceptionHolder) GoGC() { } type QtPrivate__ExceptionStore struct { - h *C.QtPrivate__ExceptionStore + h *C.QtPrivate__ExceptionStore + isSubclass bool } func (this *QtPrivate__ExceptionStore) cPointer() *C.QtPrivate__ExceptionStore { @@ -80,6 +92,7 @@ func (this *QtPrivate__ExceptionStore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ExceptionStore constructs the type using only CGO pointers. func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__ExceptionStore { if h == nil { return nil @@ -87,8 +100,13 @@ func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__Ex return &QtPrivate__ExceptionStore{h: h} } +// UnsafeNewQtPrivate__ExceptionStore constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ExceptionStore(h unsafe.Pointer) *QtPrivate__ExceptionStore { - return newQtPrivate__ExceptionStore((*C.QtPrivate__ExceptionStore)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ExceptionStore{h: (*C.QtPrivate__ExceptionStore)(h)} } func (this *QtPrivate__ExceptionStore) HasException() bool { @@ -105,7 +123,7 @@ func (this *QtPrivate__ExceptionStore) HasThrown() bool { // Delete this object from C++ memory. func (this *QtPrivate__ExceptionStore) Delete() { - C.QtPrivate__ExceptionStore_Delete(this.h) + C.QtPrivate__ExceptionStore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qexception.h b/qt/gen_qexception.h index 919582dd..9a3584aa 100644 --- a/qt/gen_qexception.h +++ b/qt/gen_qexception.h @@ -30,13 +30,13 @@ typedef struct QtPrivate__ExceptionHolder QtPrivate__ExceptionHolder; typedef struct QtPrivate__ExceptionStore QtPrivate__ExceptionStore; #endif -QtPrivate__ExceptionHolder* QtPrivate__ExceptionHolder_new(); -void QtPrivate__ExceptionHolder_Delete(QtPrivate__ExceptionHolder* self); +void QtPrivate__ExceptionHolder_new(QtPrivate__ExceptionHolder** outptr_QtPrivate__ExceptionHolder); +void QtPrivate__ExceptionHolder_Delete(QtPrivate__ExceptionHolder* self, bool isSubclass); bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self); void QtPrivate__ExceptionStore_ThrowPossibleException(QtPrivate__ExceptionStore* self); bool QtPrivate__ExceptionStore_HasThrown(const QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self); +void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfactoryinterface.cpp b/qt/gen_qfactoryinterface.cpp index 668f3c85..a8356a18 100644 --- a/qt/gen_qfactoryinterface.cpp +++ b/qt/gen_qfactoryinterface.cpp @@ -27,7 +27,11 @@ struct miqt_array /* of struct miqt_string */ QFactoryInterface_Keys(const QFac return _out; } -void QFactoryInterface_Delete(QFactoryInterface* self) { - delete self; +void QFactoryInterface_Delete(QFactoryInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfactoryinterface.go b/qt/gen_qfactoryinterface.go index 60ca7ac9..5ee68e6d 100644 --- a/qt/gen_qfactoryinterface.go +++ b/qt/gen_qfactoryinterface.go @@ -14,7 +14,8 @@ import ( ) type QFactoryInterface struct { - h *C.QFactoryInterface + h *C.QFactoryInterface + isSubclass bool } func (this *QFactoryInterface) cPointer() *C.QFactoryInterface { @@ -31,6 +32,7 @@ func (this *QFactoryInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFactoryInterface constructs the type using only CGO pointers. func newQFactoryInterface(h *C.QFactoryInterface) *QFactoryInterface { if h == nil { return nil @@ -38,8 +40,13 @@ func newQFactoryInterface(h *C.QFactoryInterface) *QFactoryInterface { return &QFactoryInterface{h: h} } +// UnsafeNewQFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQFactoryInterface(h unsafe.Pointer) *QFactoryInterface { - return newQFactoryInterface((*C.QFactoryInterface)(h)) + if h == nil { + return nil + } + + return &QFactoryInterface{h: (*C.QFactoryInterface)(h)} } func (this *QFactoryInterface) Keys() []string { @@ -57,7 +64,7 @@ func (this *QFactoryInterface) Keys() []string { // Delete this object from C++ memory. func (this *QFactoryInterface) Delete() { - C.QFactoryInterface_Delete(this.h) + C.QFactoryInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfactoryinterface.h b/qt/gen_qfactoryinterface.h index ea1b1736..ab466c91 100644 --- a/qt/gen_qfactoryinterface.h +++ b/qt/gen_qfactoryinterface.h @@ -21,7 +21,7 @@ typedef struct QFactoryInterface QFactoryInterface; #endif struct miqt_array /* of struct miqt_string */ QFactoryInterface_Keys(const QFactoryInterface* self); -void QFactoryInterface_Delete(QFactoryInterface* self); +void QFactoryInterface_Delete(QFactoryInterface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfile.cpp b/qt/gen_qfile.cpp index 52c21274..b90a6204 100644 --- a/qt/gen_qfile.cpp +++ b/qt/gen_qfile.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include @@ -9,22 +11,390 @@ #include "gen_qfile.h" #include "_cgo_export.h" -QFile* QFile_new() { - return new QFile(); +class MiqtVirtualQFile : public virtual QFile { +public: + + MiqtVirtualQFile(): QFile() {}; + MiqtVirtualQFile(const QString& name): QFile(name) {}; + MiqtVirtualQFile(QObject* parent): QFile(parent) {}; + MiqtVirtualQFile(const QString& name, QObject* parent): QFile(name, parent) {}; + + virtual ~MiqtVirtualQFile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FileName = 0; + + // Subclass to allow providing a Go implementation + virtual QString fileName() const override { + if (handle__FileName == 0) { + return QFile::fileName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QFile_FileName(const_cast(this), handle__FileName); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FileName() const { + + QString _ret = QFile::fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode flags) override { + if (handle__Open == 0) { + return QFile::open(flags); + } + + QIODevice::OpenMode flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QFile_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int flags) { + + return QFile::open(static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QFile::size(); + } + + + long long callback_return_value = miqt_exec_callback_QFile_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QFile::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resize = 0; + + // Subclass to allow providing a Go implementation + virtual bool resize(qint64 sz) override { + if (handle__Resize == 0) { + return QFile::resize(sz); + } + + qint64 sz_ret = sz; + long long sigval1 = static_cast(sz_ret); + + bool callback_return_value = miqt_exec_callback_QFile_Resize(this, handle__Resize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Resize(long long sz) { + + return QFile::resize(static_cast(sz)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Permissions = 0; + + // Subclass to allow providing a Go implementation + virtual QFileDevice::Permissions permissions() const override { + if (handle__Permissions == 0) { + return QFile::permissions(); + } + + + int callback_return_value = miqt_exec_callback_QFile_Permissions(const_cast(this), handle__Permissions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Permissions() const { + + QFileDevice::Permissions _ret = QFile::permissions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPermissions = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPermissions(QFileDevice::Permissions permissionSpec) override { + if (handle__SetPermissions == 0) { + return QFile::setPermissions(permissionSpec); + } + + QFileDevice::Permissions permissionSpec_ret = permissionSpec; + int sigval1 = static_cast(permissionSpec_ret); + + bool callback_return_value = miqt_exec_callback_QFile_SetPermissions(this, handle__SetPermissions, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPermissions(int permissionSpec) { + + return QFile::setPermissions(static_cast(permissionSpec)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QFile::close(); + return; + } + + + miqt_exec_callback_QFile_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QFile::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QFile::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QFile_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QFile::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QFile::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QFile_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QFile::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 offset) override { + if (handle__Seek == 0) { + return QFile::seek(offset); + } + + qint64 offset_ret = offset; + long long sigval1 = static_cast(offset_ret); + + bool callback_return_value = miqt_exec_callback_QFile_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long offset) { + + return QFile::seek(static_cast(offset)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QFile::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QFile_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QFile::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QFile::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QFile_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QFile::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QFile::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QFile_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QFile::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QFile::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QFile_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QFile::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQFile* ret = new MiqtVirtualQFile(); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QFile* QFile_new2(struct miqt_string name) { +void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QFile(name_QString); + MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QFile* QFile_new3(QObject* parent) { - return new QFile(parent); +void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQFile* ret = new MiqtVirtualQFile(parent); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QFile* QFile_new4(struct miqt_string name, QObject* parent) { +void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QFile(name_QString, parent); + MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString, parent); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QFile_MetaObject(const QFile* self) { @@ -302,7 +672,123 @@ bool QFile_Open33(QFile* self, int fd, int ioFlags, int handleFlags) { return self->open(static_cast(fd), static_cast(ioFlags), static_cast(handleFlags)); } -void QFile_Delete(QFile* self) { - delete self; +void QFile_override_virtual_FileName(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__FileName = slot; +} + +struct miqt_string QFile_virtualbase_FileName(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_FileName(); +} + +void QFile_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Open = slot; +} + +bool QFile_virtualbase_Open(void* self, int flags) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_Open(flags); +} + +void QFile_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Size = slot; +} + +long long QFile_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_Size(); +} + +void QFile_override_virtual_Resize(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Resize = slot; +} + +bool QFile_virtualbase_Resize(void* self, long long sz) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_Resize(sz); +} + +void QFile_override_virtual_Permissions(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Permissions = slot; +} + +int QFile_virtualbase_Permissions(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_Permissions(); +} + +void QFile_override_virtual_SetPermissions(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__SetPermissions = slot; +} + +bool QFile_virtualbase_SetPermissions(void* self, int permissionSpec) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_SetPermissions(permissionSpec); +} + +void QFile_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Close = slot; +} + +void QFile_virtualbase_Close(void* self) { + ( (MiqtVirtualQFile*)(self) )->virtualbase_Close(); +} + +void QFile_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__IsSequential = slot; +} + +bool QFile_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_IsSequential(); +} + +void QFile_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Pos = slot; +} + +long long QFile_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_Pos(); +} + +void QFile_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Seek = slot; +} + +bool QFile_virtualbase_Seek(void* self, long long offset) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_Seek(offset); +} + +void QFile_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__AtEnd = slot; +} + +bool QFile_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_AtEnd(); +} + +void QFile_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__ReadData = slot; +} + +long long QFile_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QFile_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__WriteData = slot; +} + +long long QFile_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QFile_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__ReadLineData = slot; +} + +long long QFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QFile_Delete(QFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfile.go b/qt/gen_qfile.go index e6362a6d..b47037b4 100644 --- a/qt/gen_qfile.go +++ b/qt/gen_qfile.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFile struct { - h *C.QFile + h *C.QFile + isSubclass bool *QFileDevice } @@ -32,21 +34,36 @@ func (this *QFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFile(h *C.QFile) *QFile { +// newQFile constructs the type using only CGO pointers. +func newQFile(h *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QFile { if h == nil { return nil } - return &QFile{h: h, QFileDevice: UnsafeNewQFileDevice(unsafe.Pointer(h))} + return &QFile{h: h, + QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} } -func UnsafeNewQFile(h unsafe.Pointer) *QFile { - return newQFile((*C.QFile)(h)) +// UnsafeNewQFile constructs the type using only unsafe pointers. +func UnsafeNewQFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QFile { + if h == nil { + return nil + } + + return &QFile{h: (*C.QFile)(h), + QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} } // NewQFile constructs a new QFile object. func NewQFile() *QFile { - ret := C.QFile_new() - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QFile_new(&outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFile2 constructs a new QFile object. @@ -55,14 +72,28 @@ func NewQFile2(name string) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QFile_new2(name_ms) - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QFile_new2(name_ms, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFile3 constructs a new QFile object. func NewQFile3(parent *QObject) *QFile { - ret := C.QFile_new3(parent.cPointer()) - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QFile_new3(parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFile4 constructs a new QFile object. @@ -71,8 +102,15 @@ func NewQFile4(name string, parent *QObject) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QFile_new4(name_ms, parent.cPointer()) - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QFile_new4(name_ms, parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFile) MetaObject() *QMetaObject { @@ -376,9 +414,357 @@ func (this *QFile) Open33(fd int, ioFlags QIODevice__OpenModeFlag, handleFlags Q return (bool)(C.QFile_Open33(this.h, (C.int)(fd), (C.int)(ioFlags), (C.int)(handleFlags))) } +func (this *QFile) callVirtualBase_FileName() string { + + var _ms C.struct_miqt_string = C.QFile_virtualbase_FileName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QFile) OnFileName(slot func(super func() string) string) { + C.QFile_override_virtual_FileName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_FileName +func miqt_exec_callback_QFile_FileName(self *C.QFile, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_FileName) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QFile) callVirtualBase_Open(flags QIODevice__OpenModeFlag) bool { + + return (bool)(C.QFile_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(flags))) + +} +func (this *QFile) OnOpen(slot func(super func(flags QIODevice__OpenModeFlag) bool, flags QIODevice__OpenModeFlag) bool) { + C.QFile_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Open +func miqt_exec_callback_QFile_Open(self *C.QFile, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QIODevice__OpenModeFlag) bool, flags QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODevice__OpenModeFlag)(flags) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Size() int64 { + + return (int64)(C.QFile_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnSize(slot func(super func() int64) int64) { + C.QFile_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Size +func miqt_exec_callback_QFile_Size(self *C.QFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Resize(sz int64) bool { + + return (bool)(C.QFile_virtualbase_Resize(unsafe.Pointer(this.h), (C.longlong)(sz))) + +} +func (this *QFile) OnResize(slot func(super func(sz int64) bool, sz int64) bool) { + C.QFile_override_virtual_Resize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Resize +func miqt_exec_callback_QFile_Resize(self *C.QFile, cb C.intptr_t, sz C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sz int64) bool, sz int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(sz) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Resize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Permissions() QFileDevice__Permission { + + return (QFileDevice__Permission)(C.QFile_virtualbase_Permissions(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnPermissions(slot func(super func() QFileDevice__Permission) QFileDevice__Permission) { + C.QFile_override_virtual_Permissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Permissions +func miqt_exec_callback_QFile_Permissions(self *C.QFile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QFileDevice__Permission) QFileDevice__Permission) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Permissions) + + return (C.int)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_SetPermissions(permissionSpec QFileDevice__Permission) bool { + + return (bool)(C.QFile_virtualbase_SetPermissions(unsafe.Pointer(this.h), (C.int)(permissionSpec))) + +} +func (this *QFile) OnSetPermissions(slot func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) { + C.QFile_override_virtual_SetPermissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_SetPermissions +func miqt_exec_callback_QFile_SetPermissions(self *C.QFile, cb C.intptr_t, permissionSpec C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileDevice__Permission)(permissionSpec) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_SetPermissions, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Close() { + + C.QFile_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QFile) OnClose(slot func(super func())) { + C.QFile_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Close +func miqt_exec_callback_QFile_Close(self *C.QFile, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFile{h: self}).callVirtualBase_Close) + +} + +func (this *QFile) callVirtualBase_IsSequential() bool { + + return (bool)(C.QFile_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnIsSequential(slot func(super func() bool) bool) { + C.QFile_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_IsSequential +func miqt_exec_callback_QFile_IsSequential(self *C.QFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Pos() int64 { + + return (int64)(C.QFile_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnPos(slot func(super func() int64) int64) { + C.QFile_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Pos +func miqt_exec_callback_QFile_Pos(self *C.QFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Seek(offset int64) bool { + + return (bool)(C.QFile_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(offset))) + +} +func (this *QFile) OnSeek(slot func(super func(offset int64) bool, offset int64) bool) { + C.QFile_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Seek +func miqt_exec_callback_QFile_Seek(self *C.QFile, cb C.intptr_t, offset C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset int64) bool, offset int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(offset) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_AtEnd() bool { + + return (bool)(C.QFile_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnAtEnd(slot func(super func() bool) bool) { + C.QFile_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_AtEnd +func miqt_exec_callback_QFile_AtEnd(self *C.QFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QFile_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QFile) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QFile_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_ReadData +func miqt_exec_callback_QFile_ReadData(self *C.QFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QFile_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QFile) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QFile_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_WriteData +func miqt_exec_callback_QFile_WriteData(self *C.QFile, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QFile_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QFile) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QFile_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_ReadLineData +func miqt_exec_callback_QFile_ReadLineData(self *C.QFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFile) Delete() { - C.QFile_Delete(this.h) + C.QFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfile.h b/qt/gen_qfile.h index f82ce90a..6c68eb0e 100644 --- a/qt/gen_qfile.h +++ b/qt/gen_qfile.h @@ -17,19 +17,23 @@ extern "C" { #ifdef __cplusplus class QByteArray; class QFile; +class QFileDevice; +class QIODevice; class QMetaObject; class QObject; #else typedef struct QByteArray QByteArray; typedef struct QFile QFile; +typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QFile* QFile_new(); -QFile* QFile_new2(struct miqt_string name); -QFile* QFile_new3(QObject* parent); -QFile* QFile_new4(struct miqt_string name, QObject* parent); +void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QFile_MetaObject(const QFile* self); void* QFile_Metacast(QFile* self, const char* param1); struct miqt_string QFile_Tr(const char* s); @@ -69,7 +73,35 @@ struct miqt_string QFile_Tr3(const char* s, const char* c, int n); struct miqt_string QFile_TrUtf82(const char* s, const char* c); struct miqt_string QFile_TrUtf83(const char* s, const char* c, int n); bool QFile_Open33(QFile* self, int fd, int ioFlags, int handleFlags); -void QFile_Delete(QFile* self); +void QFile_override_virtual_FileName(void* self, intptr_t slot); +struct miqt_string QFile_virtualbase_FileName(const void* self); +void QFile_override_virtual_Open(void* self, intptr_t slot); +bool QFile_virtualbase_Open(void* self, int flags); +void QFile_override_virtual_Size(void* self, intptr_t slot); +long long QFile_virtualbase_Size(const void* self); +void QFile_override_virtual_Resize(void* self, intptr_t slot); +bool QFile_virtualbase_Resize(void* self, long long sz); +void QFile_override_virtual_Permissions(void* self, intptr_t slot); +int QFile_virtualbase_Permissions(const void* self); +void QFile_override_virtual_SetPermissions(void* self, intptr_t slot); +bool QFile_virtualbase_SetPermissions(void* self, int permissionSpec); +void QFile_override_virtual_Close(void* self, intptr_t slot); +void QFile_virtualbase_Close(void* self); +void QFile_override_virtual_IsSequential(void* self, intptr_t slot); +bool QFile_virtualbase_IsSequential(const void* self); +void QFile_override_virtual_Pos(void* self, intptr_t slot); +long long QFile_virtualbase_Pos(const void* self); +void QFile_override_virtual_Seek(void* self, intptr_t slot); +bool QFile_virtualbase_Seek(void* self, long long offset); +void QFile_override_virtual_AtEnd(void* self, intptr_t slot); +bool QFile_virtualbase_AtEnd(const void* self); +void QFile_override_virtual_ReadData(void* self, intptr_t slot); +long long QFile_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QFile_override_virtual_WriteData(void* self, intptr_t slot); +long long QFile_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QFile_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QFile_Delete(QFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfiledevice.cpp b/qt/gen_qfiledevice.cpp index 5cc2e174..b64b9d8b 100644 --- a/qt/gen_qfiledevice.cpp +++ b/qt/gen_qfiledevice.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -171,7 +173,11 @@ unsigned char* QFileDevice_Map3(QFileDevice* self, long long offset, long long s return static_cast(_ret); } -void QFileDevice_Delete(QFileDevice* self) { - delete self; +void QFileDevice_Delete(QFileDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfiledevice.go b/qt/gen_qfiledevice.go index cae435e5..73e1406a 100644 --- a/qt/gen_qfiledevice.go +++ b/qt/gen_qfiledevice.go @@ -74,7 +74,8 @@ const ( ) type QFileDevice struct { - h *C.QFileDevice + h *C.QFileDevice + isSubclass bool *QIODevice } @@ -92,15 +93,23 @@ func (this *QFileDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileDevice(h *C.QFileDevice) *QFileDevice { +// newQFileDevice constructs the type using only CGO pointers. +func newQFileDevice(h *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QFileDevice { if h == nil { return nil } - return &QFileDevice{h: h, QIODevice: UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QFileDevice{h: h, + QIODevice: newQIODevice(h_QIODevice, h_QObject)} } -func UnsafeNewQFileDevice(h unsafe.Pointer) *QFileDevice { - return newQFileDevice((*C.QFileDevice)(h)) +// UnsafeNewQFileDevice constructs the type using only unsafe pointers. +func UnsafeNewQFileDevice(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QFileDevice { + if h == nil { + return nil + } + + return &QFileDevice{h: (*C.QFileDevice)(h), + QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject)} } func (this *QFileDevice) MetaObject() *QMetaObject { @@ -259,7 +268,7 @@ func (this *QFileDevice) Map3(offset int64, size int64, flags QFileDevice__Memor // Delete this object from C++ memory. func (this *QFileDevice) Delete() { - C.QFileDevice_Delete(this.h) + C.QFileDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfiledevice.h b/qt/gen_qfiledevice.h index b03245c4..99ff155b 100644 --- a/qt/gen_qfiledevice.h +++ b/qt/gen_qfiledevice.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QDateTime; class QFileDevice; +class QIODevice; class QMetaObject; +class QObject; #else typedef struct QDateTime QDateTime; typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QFileDevice_MetaObject(const QFileDevice* self); @@ -46,12 +50,15 @@ unsigned char* QFileDevice_Map(QFileDevice* self, long long offset, long long si bool QFileDevice_Unmap(QFileDevice* self, unsigned char* address); QDateTime* QFileDevice_FileTime(const QFileDevice* self, int time); bool QFileDevice_SetFileTime(QFileDevice* self, QDateTime* newDate, int fileTime); +long long QFileDevice_ReadData(QFileDevice* self, char* data, long long maxlen); +long long QFileDevice_WriteData(QFileDevice* self, const char* data, long long lenVal); +long long QFileDevice_ReadLineData(QFileDevice* self, char* data, long long maxlen); struct miqt_string QFileDevice_Tr2(const char* s, const char* c); struct miqt_string QFileDevice_Tr3(const char* s, const char* c, int n); struct miqt_string QFileDevice_TrUtf82(const char* s, const char* c); struct miqt_string QFileDevice_TrUtf83(const char* s, const char* c, int n); unsigned char* QFileDevice_Map3(QFileDevice* self, long long offset, long long size, int flags); -void QFileDevice_Delete(QFileDevice* self); +void QFileDevice_Delete(QFileDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfiledialog.cpp b/qt/gen_qfiledialog.cpp index 2de7ec53..22409f79 100644 --- a/qt/gen_qfiledialog.cpp +++ b/qt/gen_qfiledialog.cpp @@ -1,11 +1,21 @@ #include #include #include +#include +#include +#include #include +#include #include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -15,34 +25,429 @@ #include "gen_qfiledialog.h" #include "_cgo_export.h" -QFileDialog* QFileDialog_new(QWidget* parent) { - return new QFileDialog(parent); +class MiqtVirtualQFileDialog : public virtual QFileDialog { +public: + + MiqtVirtualQFileDialog(QWidget* parent): QFileDialog(parent) {}; + MiqtVirtualQFileDialog(QWidget* parent, Qt::WindowFlags f): QFileDialog(parent, f) {}; + MiqtVirtualQFileDialog(): QFileDialog() {}; + MiqtVirtualQFileDialog(QWidget* parent, const QString& caption): QFileDialog(parent, caption) {}; + MiqtVirtualQFileDialog(QWidget* parent, const QString& caption, const QString& directory): QFileDialog(parent, caption, directory) {}; + MiqtVirtualQFileDialog(QWidget* parent, const QString& caption, const QString& directory, const QString& filter): QFileDialog(parent, caption, directory, filter) {}; + + virtual ~MiqtVirtualQFileDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFileDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFileDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFileDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QFileDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QFileDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QFileDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QFileDialog::accept(); + return; + } + + + miqt_exec_callback_QFileDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QFileDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QFileDialog::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QFileDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QFileDialog::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFileDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFileDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFileDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFileDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFileDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFileDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QFileDialog::open(); + return; + } + + + miqt_exec_callback_QFileDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QFileDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QFileDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QFileDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QFileDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QFileDialog::reject(); + return; + } + + + miqt_exec_callback_QFileDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QFileDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QFileDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QFileDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QFileDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QFileDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QFileDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QFileDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QFileDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QFileDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QFileDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QFileDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QFileDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QFileDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QFileDialog::eventFilter(param1, param2); + + } + +}; + +void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new2(QWidget* parent, int f) { - return new QFileDialog(parent, static_cast(f)); +void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, static_cast(f)); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new3() { - return new QFileDialog(); +void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption) { +void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); - return new QFileDialog(parent, caption_QString); + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory) { +void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); - return new QFileDialog(parent, caption_QString, directory_QString); + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter) { +void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); QString filter_QString = QString::fromUtf8(filter.data, filter.len); - return new QFileDialog(parent, caption_QString, directory_QString, filter_QString); + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString, filter_QString); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFileDialog_MetaObject(const QFileDialog* self) { @@ -487,7 +892,7 @@ void QFileDialog_FileSelected(QFileDialog* self, struct miqt_string file) { } void QFileDialog_connect_FileSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::fileSelected), self, [=](const QString& file) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::fileSelected), self, [=](const QString& file) { const QString file_ret = file; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray file_b = file_ret.toUtf8(); @@ -512,7 +917,7 @@ void QFileDialog_FilesSelected(QFileDialog* self, struct miqt_array /* of struct } void QFileDialog_connect_FilesSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::filesSelected), self, [=](const QStringList& files) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::filesSelected), self, [=](const QStringList& files) { const QStringList& files_ret = files; // Convert QList<> from C++ memory to manually-managed C memory struct miqt_string* files_arr = static_cast(malloc(sizeof(struct miqt_string) * files_ret.length())); @@ -540,7 +945,7 @@ void QFileDialog_CurrentChanged(QFileDialog* self, struct miqt_string path) { } void QFileDialog_connect_CurrentChanged(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::currentChanged), self, [=](const QString& path) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::currentChanged), self, [=](const QString& path) { const QString path_ret = path; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray path_b = path_ret.toUtf8(); @@ -559,7 +964,7 @@ void QFileDialog_DirectoryEntered(QFileDialog* self, struct miqt_string director } void QFileDialog_connect_DirectoryEntered(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::directoryEntered), self, [=](const QString& directory) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::directoryEntered), self, [=](const QString& directory) { const QString directory_ret = directory; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray directory_b = directory_ret.toUtf8(); @@ -577,7 +982,7 @@ void QFileDialog_UrlSelected(QFileDialog* self, QUrl* url) { } void QFileDialog_connect_UrlSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::urlSelected), self, [=](const QUrl& url) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::urlSelected), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -596,7 +1001,7 @@ void QFileDialog_UrlsSelected(QFileDialog* self, struct miqt_array /* of QUrl* * } void QFileDialog_connect_UrlsSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast&)>(&QFileDialog::urlsSelected), self, [=](const QList& urls) { + MiqtVirtualQFileDialog::connect(self, static_cast&)>(&QFileDialog::urlsSelected), self, [=](const QList& urls) { const QList& urls_ret = urls; // Convert QList<> from C++ memory to manually-managed C memory QUrl** urls_arr = static_cast(malloc(sizeof(QUrl*) * urls_ret.length())); @@ -616,7 +1021,7 @@ void QFileDialog_CurrentUrlChanged(QFileDialog* self, QUrl* url) { } void QFileDialog_connect_CurrentUrlChanged(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::currentUrlChanged), self, [=](const QUrl& url) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::currentUrlChanged), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -629,7 +1034,7 @@ void QFileDialog_DirectoryUrlEntered(QFileDialog* self, QUrl* directory) { } void QFileDialog_connect_DirectoryUrlEntered(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::directoryUrlEntered), self, [=](const QUrl& directory) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::directoryUrlEntered), self, [=](const QUrl& directory) { const QUrl& directory_ret = directory; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&directory_ret); @@ -643,7 +1048,7 @@ void QFileDialog_FilterSelected(QFileDialog* self, struct miqt_string filter) { } void QFileDialog_connect_FilterSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::filterSelected), self, [=](const QString& filter) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::filterSelected), self, [=](const QString& filter) { const QString filter_ret = filter; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray filter_b = filter_ret.toUtf8(); @@ -1150,7 +1555,131 @@ struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls4(QWidget* parent, return _out; } -void QFileDialog_Delete(QFileDialog* self) { - delete self; +void QFileDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__SetVisible = slot; +} + +void QFileDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QFileDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Done = slot; +} + +void QFileDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Done(result); +} + +void QFileDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Accept = slot; +} + +void QFileDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Accept(); +} + +void QFileDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QFileDialog_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ChangeEvent(e); +} + +void QFileDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QFileDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFileDialog*)(self) )->virtualbase_SizeHint(); +} + +void QFileDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFileDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFileDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFileDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Open = slot; +} + +void QFileDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Open(); +} + +void QFileDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Exec = slot; +} + +int QFileDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Exec(); +} + +void QFileDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Reject = slot; +} + +void QFileDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Reject(); +} + +void QFileDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QFileDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QFileDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__CloseEvent = slot; +} + +void QFileDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QFileDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ShowEvent = slot; +} + +void QFileDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QFileDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QFileDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QFileDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFileDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QFileDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__EventFilter = slot; +} + +bool QFileDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QFileDialog_Delete(QFileDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfiledialog.go b/qt/gen_qfiledialog.go index e145a595..a1a3bf3c 100644 --- a/qt/gen_qfiledialog.go +++ b/qt/gen_qfiledialog.go @@ -62,7 +62,8 @@ const ( ) type QFileDialog struct { - h *C.QFileDialog + h *C.QFileDialog + isSubclass bool *QDialog } @@ -80,33 +81,65 @@ func (this *QFileDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileDialog(h *C.QFileDialog) *QFileDialog { +// newQFileDialog constructs the type using only CGO pointers. +func newQFileDialog(h *C.QFileDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFileDialog { if h == nil { return nil } - return &QFileDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QFileDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFileDialog(h unsafe.Pointer) *QFileDialog { - return newQFileDialog((*C.QFileDialog)(h)) +// UnsafeNewQFileDialog constructs the type using only unsafe pointers. +func UnsafeNewQFileDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFileDialog { + if h == nil { + return nil + } + + return &QFileDialog{h: (*C.QFileDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFileDialog constructs a new QFileDialog object. func NewQFileDialog(parent *QWidget) *QFileDialog { - ret := C.QFileDialog_new(parent.cPointer()) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new(parent.cPointer(), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog2 constructs a new QFileDialog object. func NewQFileDialog2(parent *QWidget, f WindowType) *QFileDialog { - ret := C.QFileDialog_new2(parent.cPointer(), (C.int)(f)) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new2(parent.cPointer(), (C.int)(f), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog3 constructs a new QFileDialog object. func NewQFileDialog3() *QFileDialog { - ret := C.QFileDialog_new3() - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new3(&outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog4 constructs a new QFileDialog object. @@ -115,8 +148,16 @@ func NewQFileDialog4(parent *QWidget, caption string) *QFileDialog { caption_ms.data = C.CString(caption) caption_ms.len = C.size_t(len(caption)) defer C.free(unsafe.Pointer(caption_ms.data)) - ret := C.QFileDialog_new4(parent.cPointer(), caption_ms) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new4(parent.cPointer(), caption_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog5 constructs a new QFileDialog object. @@ -129,8 +170,16 @@ func NewQFileDialog5(parent *QWidget, caption string, directory string) *QFileDi directory_ms.data = C.CString(directory) directory_ms.len = C.size_t(len(directory)) defer C.free(unsafe.Pointer(directory_ms.data)) - ret := C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog6 constructs a new QFileDialog object. @@ -147,8 +196,16 @@ func NewQFileDialog6(parent *QWidget, caption string, directory string, filter s filter_ms.data = C.CString(filter) filter_ms.len = C.size_t(len(filter)) defer C.free(unsafe.Pointer(filter_ms.data)) - ret := C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFileDialog) MetaObject() *QMetaObject { @@ -487,7 +544,7 @@ func (this *QFileDialog) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QFileDialog) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QFileDialog_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QFileDialog_ItemDelegate(this.h)), nil) } func (this *QFileDialog) SetIconProvider(provider *QFileIconProvider) { @@ -545,7 +602,7 @@ func (this *QFileDialog) SetProxyModel(model *QAbstractProxyModel) { } func (this *QFileDialog) ProxyModel() *QAbstractProxyModel { - return UnsafeNewQAbstractProxyModel(unsafe.Pointer(C.QFileDialog_ProxyModel(this.h))) + return UnsafeNewQAbstractProxyModel(unsafe.Pointer(C.QFileDialog_ProxyModel(this.h)), nil, nil) } func (this *QFileDialog) SetOption(option QFileDialog__Option) { @@ -1382,9 +1439,351 @@ func QFileDialog_GetOpenFileUrls4(parent *QWidget, caption string, dir *QUrl, fi return _ret } +func (this *QFileDialog) callVirtualBase_SetVisible(visible bool) { + + C.QFileDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFileDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFileDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_SetVisible +func miqt_exec_callback_QFileDialog_SetVisible(self *C.QFileDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFileDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_Done(result int) { + + C.QFileDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QFileDialog) OnDone(slot func(super func(result int), result int)) { + C.QFileDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Done +func miqt_exec_callback_QFileDialog_Done(self *C.QFileDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QFileDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_Accept() { + + C.QFileDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QFileDialog) OnAccept(slot func(super func())) { + C.QFileDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Accept +func miqt_exec_callback_QFileDialog_Accept(self *C.QFileDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QFileDialog) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QFileDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFileDialog) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QFileDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ChangeEvent +func miqt_exec_callback_QFileDialog_ChangeEvent(self *C.QFileDialog, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFileDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFileDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_SizeHint +func miqt_exec_callback_QFileDialog_SizeHint(self *C.QFileDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFileDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFileDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFileDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_MinimumSizeHint +func miqt_exec_callback_QFileDialog_MinimumSizeHint(self *C.QFileDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFileDialog) callVirtualBase_Open() { + + C.QFileDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QFileDialog) OnOpen(slot func(super func())) { + C.QFileDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Open +func miqt_exec_callback_QFileDialog_Open(self *C.QFileDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QFileDialog) callVirtualBase_Exec() int { + + return (int)(C.QFileDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QFileDialog) OnExec(slot func(super func() int) int) { + C.QFileDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Exec +func miqt_exec_callback_QFileDialog_Exec(self *C.QFileDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QFileDialog) callVirtualBase_Reject() { + + C.QFileDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QFileDialog) OnReject(slot func(super func())) { + C.QFileDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Reject +func miqt_exec_callback_QFileDialog_Reject(self *C.QFileDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QFileDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QFileDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QFileDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_KeyPressEvent +func miqt_exec_callback_QFileDialog_KeyPressEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QFileDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QFileDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_CloseEvent +func miqt_exec_callback_QFileDialog_CloseEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QFileDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QFileDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ShowEvent +func miqt_exec_callback_QFileDialog_ShowEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QFileDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QFileDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ResizeEvent +func miqt_exec_callback_QFileDialog_ResizeEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QFileDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QFileDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ContextMenuEvent +func miqt_exec_callback_QFileDialog_ContextMenuEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QFileDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QFileDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QFileDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_EventFilter +func miqt_exec_callback_QFileDialog_EventFilter(self *C.QFileDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFileDialog) Delete() { - C.QFileDialog_Delete(this.h) + C.QFileDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfiledialog.h b/qt/gen_qfiledialog.h index c237e6c2..3fbe5496 100644 --- a/qt/gen_qfiledialog.h +++ b/qt/gen_qfiledialog.h @@ -18,30 +18,50 @@ extern "C" { class QAbstractItemDelegate; class QAbstractProxyModel; class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; class QDir; +class QEvent; class QFileDialog; class QFileIconProvider; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QUrl; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; typedef struct QDir QDir; +typedef struct QEvent QEvent; typedef struct QFileDialog QFileDialog; typedef struct QFileIconProvider QFileIconProvider; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QUrl QUrl; typedef struct QWidget QWidget; #endif -QFileDialog* QFileDialog_new(QWidget* parent); -QFileDialog* QFileDialog_new2(QWidget* parent, int f); -QFileDialog* QFileDialog_new3(); -QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption); -QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory); -QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter); +void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFileDialog_MetaObject(const QFileDialog* self); void* QFileDialog_Metacast(QFileDialog* self, const char* param1); struct miqt_string QFileDialog_Tr(const char* s); @@ -130,6 +150,9 @@ QUrl* QFileDialog_GetExistingDirectoryUrl(); struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames(); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls(); void QFileDialog_SaveFileContent(struct miqt_string fileContent, struct miqt_string fileNameHint); +void QFileDialog_Done(QFileDialog* self, int result); +void QFileDialog_Accept(QFileDialog* self); +void QFileDialog_ChangeEvent(QFileDialog* self, QEvent* e); struct miqt_string QFileDialog_Tr2(const char* s, const char* c); struct miqt_string QFileDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QFileDialog_TrUtf82(const char* s, const char* c); @@ -168,7 +191,37 @@ struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls1(QWidget* parent); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls2(QWidget* parent, struct miqt_string caption); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls3(QWidget* parent, struct miqt_string caption, QUrl* dir); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls4(QWidget* parent, struct miqt_string caption, QUrl* dir, struct miqt_string filter); -void QFileDialog_Delete(QFileDialog* self); +void QFileDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QFileDialog_virtualbase_SetVisible(void* self, bool visible); +void QFileDialog_override_virtual_Done(void* self, intptr_t slot); +void QFileDialog_virtualbase_Done(void* self, int result); +void QFileDialog_override_virtual_Accept(void* self, intptr_t slot); +void QFileDialog_virtualbase_Accept(void* self); +void QFileDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ChangeEvent(void* self, QEvent* e); +void QFileDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFileDialog_virtualbase_SizeHint(const void* self); +void QFileDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFileDialog_virtualbase_MinimumSizeHint(const void* self); +void QFileDialog_override_virtual_Open(void* self, intptr_t slot); +void QFileDialog_virtualbase_Open(void* self); +void QFileDialog_override_virtual_Exec(void* self, intptr_t slot); +int QFileDialog_virtualbase_Exec(void* self); +void QFileDialog_override_virtual_Reject(void* self, intptr_t slot); +void QFileDialog_virtualbase_Reject(void* self); +void QFileDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QFileDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QFileDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QFileDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QFileDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QFileDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFileDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QFileDialog_Delete(QFileDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfileiconprovider.cpp b/qt/gen_qfileiconprovider.cpp index 3231b805..0f610127 100644 --- a/qt/gen_qfileiconprovider.cpp +++ b/qt/gen_qfileiconprovider.cpp @@ -8,8 +8,100 @@ #include "gen_qfileiconprovider.h" #include "_cgo_export.h" -QFileIconProvider* QFileIconProvider_new() { - return new QFileIconProvider(); +class MiqtVirtualQFileIconProvider : public virtual QFileIconProvider { +public: + + MiqtVirtualQFileIconProvider(): QFileIconProvider() {}; + + virtual ~MiqtVirtualQFileIconProvider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Icon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon icon(QFileIconProvider::IconType typeVal) const override { + if (handle__Icon == 0) { + return QFileIconProvider::icon(typeVal); + } + + QFileIconProvider::IconType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QIcon* callback_return_value = miqt_exec_callback_QFileIconProvider_Icon(const_cast(this), handle__Icon, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_Icon(int typeVal) const { + + return new QIcon(QFileIconProvider::icon(static_cast(typeVal))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IconWithInfo = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon icon(const QFileInfo& info) const override { + if (handle__IconWithInfo == 0) { + return QFileIconProvider::icon(info); + } + + const QFileInfo& info_ret = info; + // Cast returned reference into pointer + QFileInfo* sigval1 = const_cast(&info_ret); + + QIcon* callback_return_value = miqt_exec_callback_QFileIconProvider_IconWithInfo(const_cast(this), handle__IconWithInfo, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_IconWithInfo(QFileInfo* info) const { + + return new QIcon(QFileIconProvider::icon(*info)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual QString type(const QFileInfo& info) const override { + if (handle__Type == 0) { + return QFileIconProvider::type(info); + } + + const QFileInfo& info_ret = info; + // Cast returned reference into pointer + QFileInfo* sigval1 = const_cast(&info_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QFileIconProvider_Type(const_cast(this), handle__Type, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Type(QFileInfo* info) const { + + QString _ret = QFileIconProvider::type(*info); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + +}; + +void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider) { + MiqtVirtualQFileIconProvider* ret = new MiqtVirtualQFileIconProvider(); + *outptr_QFileIconProvider = ret; } QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal) { @@ -40,7 +132,35 @@ int QFileIconProvider_Options(const QFileIconProvider* self) { return static_cast(_ret); } -void QFileIconProvider_Delete(QFileIconProvider* self) { - delete self; +void QFileIconProvider_override_virtual_Icon(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__Icon = slot; +} + +QIcon* QFileIconProvider_virtualbase_Icon(const void* self, int typeVal) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_Icon(typeVal); +} + +void QFileIconProvider_override_virtual_IconWithInfo(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__IconWithInfo = slot; +} + +QIcon* QFileIconProvider_virtualbase_IconWithInfo(const void* self, QFileInfo* info) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_IconWithInfo(info); +} + +void QFileIconProvider_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__Type = slot; +} + +struct miqt_string QFileIconProvider_virtualbase_Type(const void* self, QFileInfo* info) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_Type(info); +} + +void QFileIconProvider_Delete(QFileIconProvider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfileiconprovider.go b/qt/gen_qfileiconprovider.go index a8456485..473759fc 100644 --- a/qt/gen_qfileiconprovider.go +++ b/qt/gen_qfileiconprovider.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -32,7 +33,8 @@ const ( ) type QFileIconProvider struct { - h *C.QFileIconProvider + h *C.QFileIconProvider + isSubclass bool } func (this *QFileIconProvider) cPointer() *C.QFileIconProvider { @@ -49,6 +51,7 @@ func (this *QFileIconProvider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFileIconProvider constructs the type using only CGO pointers. func newQFileIconProvider(h *C.QFileIconProvider) *QFileIconProvider { if h == nil { return nil @@ -56,14 +59,23 @@ func newQFileIconProvider(h *C.QFileIconProvider) *QFileIconProvider { return &QFileIconProvider{h: h} } +// UnsafeNewQFileIconProvider constructs the type using only unsafe pointers. func UnsafeNewQFileIconProvider(h unsafe.Pointer) *QFileIconProvider { - return newQFileIconProvider((*C.QFileIconProvider)(h)) + if h == nil { + return nil + } + + return &QFileIconProvider{h: (*C.QFileIconProvider)(h)} } // NewQFileIconProvider constructs a new QFileIconProvider object. func NewQFileIconProvider() *QFileIconProvider { - ret := C.QFileIconProvider_new() - return newQFileIconProvider(ret) + var outptr_QFileIconProvider *C.QFileIconProvider = nil + + C.QFileIconProvider_new(&outptr_QFileIconProvider) + ret := newQFileIconProvider(outptr_QFileIconProvider) + ret.isSubclass = true + return ret } func (this *QFileIconProvider) Icon(typeVal QFileIconProvider__IconType) *QIcon { @@ -95,9 +107,96 @@ func (this *QFileIconProvider) Options() QFileIconProvider__Option { return (QFileIconProvider__Option)(C.QFileIconProvider_Options(this.h)) } +func (this *QFileIconProvider) callVirtualBase_Icon(typeVal QFileIconProvider__IconType) *QIcon { + + _ret := C.QFileIconProvider_virtualbase_Icon(unsafe.Pointer(this.h), (C.int)(typeVal)) + _goptr := newQIcon(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileIconProvider) OnIcon(slot func(super func(typeVal QFileIconProvider__IconType) *QIcon, typeVal QFileIconProvider__IconType) *QIcon) { + C.QFileIconProvider_override_virtual_Icon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_Icon +func miqt_exec_callback_QFileIconProvider_Icon(self *C.QFileIconProvider, cb C.intptr_t, typeVal C.int) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QFileIconProvider__IconType) *QIcon, typeVal QFileIconProvider__IconType) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileIconProvider__IconType)(typeVal) + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_Icon, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileIconProvider) callVirtualBase_IconWithInfo(info *QFileInfo) *QIcon { + + _ret := C.QFileIconProvider_virtualbase_IconWithInfo(unsafe.Pointer(this.h), info.cPointer()) + _goptr := newQIcon(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileIconProvider) OnIconWithInfo(slot func(super func(info *QFileInfo) *QIcon, info *QFileInfo) *QIcon) { + C.QFileIconProvider_override_virtual_IconWithInfo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_IconWithInfo +func miqt_exec_callback_QFileIconProvider_IconWithInfo(self *C.QFileIconProvider, cb C.intptr_t, info *C.QFileInfo) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(info *QFileInfo) *QIcon, info *QFileInfo) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFileInfo(unsafe.Pointer(info)) + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_IconWithInfo, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileIconProvider) callVirtualBase_Type(info *QFileInfo) string { + + var _ms C.struct_miqt_string = C.QFileIconProvider_virtualbase_Type(unsafe.Pointer(this.h), info.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QFileIconProvider) OnType(slot func(super func(info *QFileInfo) string, info *QFileInfo) string) { + C.QFileIconProvider_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_Type +func miqt_exec_callback_QFileIconProvider_Type(self *C.QFileIconProvider, cb C.intptr_t, info *C.QFileInfo) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(info *QFileInfo) string, info *QFileInfo) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFileInfo(unsafe.Pointer(info)) + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_Type, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + // Delete this object from C++ memory. func (this *QFileIconProvider) Delete() { - C.QFileIconProvider_Delete(this.h) + C.QFileIconProvider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfileiconprovider.h b/qt/gen_qfileiconprovider.h index 53fcc208..e964f96b 100644 --- a/qt/gen_qfileiconprovider.h +++ b/qt/gen_qfileiconprovider.h @@ -24,13 +24,19 @@ typedef struct QFileInfo QFileInfo; typedef struct QIcon QIcon; #endif -QFileIconProvider* QFileIconProvider_new(); +void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider); QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal); QIcon* QFileIconProvider_IconWithInfo(const QFileIconProvider* self, QFileInfo* info); struct miqt_string QFileIconProvider_Type(const QFileIconProvider* self, QFileInfo* info); void QFileIconProvider_SetOptions(QFileIconProvider* self, int options); int QFileIconProvider_Options(const QFileIconProvider* self); -void QFileIconProvider_Delete(QFileIconProvider* self); +void QFileIconProvider_override_virtual_Icon(void* self, intptr_t slot); +QIcon* QFileIconProvider_virtualbase_Icon(const void* self, int typeVal); +void QFileIconProvider_override_virtual_IconWithInfo(void* self, intptr_t slot); +QIcon* QFileIconProvider_virtualbase_IconWithInfo(const void* self, QFileInfo* info); +void QFileIconProvider_override_virtual_Type(void* self, intptr_t slot); +struct miqt_string QFileIconProvider_virtualbase_Type(const void* self, QFileInfo* info); +void QFileIconProvider_Delete(QFileIconProvider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfileinfo.cpp b/qt/gen_qfileinfo.cpp index 34aebd59..ac3f99f7 100644 --- a/qt/gen_qfileinfo.cpp +++ b/qt/gen_qfileinfo.cpp @@ -9,26 +9,31 @@ #include "gen_qfileinfo.h" #include "_cgo_export.h" -QFileInfo* QFileInfo_new() { - return new QFileInfo(); +void QFileInfo_new(QFileInfo** outptr_QFileInfo) { + QFileInfo* ret = new QFileInfo(); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new2(struct miqt_string file) { +void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QFileInfo(file_QString); + QFileInfo* ret = new QFileInfo(file_QString); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new3(QFile* file) { - return new QFileInfo(*file); +void QFileInfo_new3(QFile* file, QFileInfo** outptr_QFileInfo) { + QFileInfo* ret = new QFileInfo(*file); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file) { +void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QFileInfo(*dir, file_QString); + QFileInfo* ret = new QFileInfo(*dir, file_QString); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new5(QFileInfo* fileinfo) { - return new QFileInfo(*fileinfo); +void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo) { + QFileInfo* ret = new QFileInfo(*fileinfo); + *outptr_QFileInfo = ret; } void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo) { @@ -378,7 +383,11 @@ void QFileInfo_SetCaching(QFileInfo* self, bool on) { self->setCaching(on); } -void QFileInfo_Delete(QFileInfo* self) { - delete self; +void QFileInfo_Delete(QFileInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfileinfo.go b/qt/gen_qfileinfo.go index a6642ea7..abf50440 100644 --- a/qt/gen_qfileinfo.go +++ b/qt/gen_qfileinfo.go @@ -14,7 +14,8 @@ import ( ) type QFileInfo struct { - h *C.QFileInfo + h *C.QFileInfo + isSubclass bool } func (this *QFileInfo) cPointer() *C.QFileInfo { @@ -31,6 +32,7 @@ func (this *QFileInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFileInfo constructs the type using only CGO pointers. func newQFileInfo(h *C.QFileInfo) *QFileInfo { if h == nil { return nil @@ -38,14 +40,23 @@ func newQFileInfo(h *C.QFileInfo) *QFileInfo { return &QFileInfo{h: h} } +// UnsafeNewQFileInfo constructs the type using only unsafe pointers. func UnsafeNewQFileInfo(h unsafe.Pointer) *QFileInfo { - return newQFileInfo((*C.QFileInfo)(h)) + if h == nil { + return nil + } + + return &QFileInfo{h: (*C.QFileInfo)(h)} } // NewQFileInfo constructs a new QFileInfo object. func NewQFileInfo() *QFileInfo { - ret := C.QFileInfo_new() - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new(&outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo2 constructs a new QFileInfo object. @@ -54,14 +65,22 @@ func NewQFileInfo2(file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QFileInfo_new2(file_ms) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new2(file_ms, &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo3 constructs a new QFileInfo object. func NewQFileInfo3(file *QFile) *QFileInfo { - ret := C.QFileInfo_new3(file.cPointer()) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new3(file.cPointer(), &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo4 constructs a new QFileInfo object. @@ -70,14 +89,22 @@ func NewQFileInfo4(dir *QDir, file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QFileInfo_new4(dir.cPointer(), file_ms) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new4(dir.cPointer(), file_ms, &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo5 constructs a new QFileInfo object. func NewQFileInfo5(fileinfo *QFileInfo) *QFileInfo { - ret := C.QFileInfo_new5(fileinfo.cPointer()) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new5(fileinfo.cPointer(), &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } func (this *QFileInfo) OperatorAssign(fileinfo *QFileInfo) { @@ -394,7 +421,7 @@ func (this *QFileInfo) SetCaching(on bool) { // Delete this object from C++ memory. func (this *QFileInfo) Delete() { - C.QFileInfo_Delete(this.h) + C.QFileInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfileinfo.h b/qt/gen_qfileinfo.h index b0de5e36..ba3494f0 100644 --- a/qt/gen_qfileinfo.h +++ b/qt/gen_qfileinfo.h @@ -26,11 +26,11 @@ typedef struct QFile QFile; typedef struct QFileInfo QFileInfo; #endif -QFileInfo* QFileInfo_new(); -QFileInfo* QFileInfo_new2(struct miqt_string file); -QFileInfo* QFileInfo_new3(QFile* file); -QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file); -QFileInfo* QFileInfo_new5(QFileInfo* fileinfo); +void QFileInfo_new(QFileInfo** outptr_QFileInfo); +void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo); +void QFileInfo_new3(QFile* file, QFileInfo** outptr_QFileInfo); +void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo); +void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo); void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo); void QFileInfo_Swap(QFileInfo* self, QFileInfo* other); bool QFileInfo_OperatorEqual(const QFileInfo* self, QFileInfo* fileinfo); @@ -88,7 +88,7 @@ QDateTime* QFileInfo_LastRead(const QFileInfo* self); QDateTime* QFileInfo_FileTime(const QFileInfo* self, int time); bool QFileInfo_Caching(const QFileInfo* self); void QFileInfo_SetCaching(QFileInfo* self, bool on); -void QFileInfo_Delete(QFileInfo* self); +void QFileInfo_Delete(QFileInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfileselector.cpp b/qt/gen_qfileselector.cpp index 34218f54..ac437cbe 100644 --- a/qt/gen_qfileselector.cpp +++ b/qt/gen_qfileselector.cpp @@ -1,21 +1,210 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qfileselector.h" #include "_cgo_export.h" -QFileSelector* QFileSelector_new() { - return new QFileSelector(); +class MiqtVirtualQFileSelector : public virtual QFileSelector { +public: + + MiqtVirtualQFileSelector(): QFileSelector() {}; + MiqtVirtualQFileSelector(QObject* parent): QFileSelector(parent) {}; + + virtual ~MiqtVirtualQFileSelector() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QFileSelector::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QFileSelector_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QFileSelector::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QFileSelector::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QFileSelector_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QFileSelector::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QFileSelector::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QFileSelector_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QFileSelector::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QFileSelector::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QFileSelector_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QFileSelector::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QFileSelector::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFileSelector_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QFileSelector::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QFileSelector::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSelector_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QFileSelector::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QFileSelector::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSelector_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QFileSelector::disconnectNotify(*signal); + + } + +}; + +void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { + MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(); + *outptr_QFileSelector = ret; + *outptr_QObject = static_cast(ret); } -QFileSelector* QFileSelector_new2(QObject* parent) { - return new QFileSelector(parent); +void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { + MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(parent); + *outptr_QFileSelector = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QFileSelector_MetaObject(const QFileSelector* self) { @@ -159,7 +348,67 @@ struct miqt_string QFileSelector_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QFileSelector_Delete(QFileSelector* self) { - delete self; +void QFileSelector_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__Event = slot; +} + +bool QFileSelector_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_Event(event); +} + +void QFileSelector_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__EventFilter = slot; +} + +bool QFileSelector_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QFileSelector_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__TimerEvent = slot; +} + +void QFileSelector_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_TimerEvent(event); +} + +void QFileSelector_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__ChildEvent = slot; +} + +void QFileSelector_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_ChildEvent(event); +} + +void QFileSelector_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__CustomEvent = slot; +} + +void QFileSelector_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_CustomEvent(event); +} + +void QFileSelector_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__ConnectNotify = slot; +} + +void QFileSelector_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QFileSelector_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__DisconnectNotify = slot; +} + +void QFileSelector_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QFileSelector_Delete(QFileSelector* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfileselector.go b/qt/gen_qfileselector.go index 17ce8a98..031b523c 100644 --- a/qt/gen_qfileselector.go +++ b/qt/gen_qfileselector.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFileSelector struct { - h *C.QFileSelector + h *C.QFileSelector + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QFileSelector) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileSelector(h *C.QFileSelector) *QFileSelector { +// newQFileSelector constructs the type using only CGO pointers. +func newQFileSelector(h *C.QFileSelector, h_QObject *C.QObject) *QFileSelector { if h == nil { return nil } - return &QFileSelector{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QFileSelector{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQFileSelector(h unsafe.Pointer) *QFileSelector { - return newQFileSelector((*C.QFileSelector)(h)) +// UnsafeNewQFileSelector constructs the type using only unsafe pointers. +func UnsafeNewQFileSelector(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSelector { + if h == nil { + return nil + } + + return &QFileSelector{h: (*C.QFileSelector)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQFileSelector constructs a new QFileSelector object. func NewQFileSelector() *QFileSelector { - ret := C.QFileSelector_new() - return newQFileSelector(ret) + var outptr_QFileSelector *C.QFileSelector = nil + var outptr_QObject *C.QObject = nil + + C.QFileSelector_new(&outptr_QFileSelector, &outptr_QObject) + ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSelector2 constructs a new QFileSelector object. func NewQFileSelector2(parent *QObject) *QFileSelector { - ret := C.QFileSelector_new2(parent.cPointer()) - return newQFileSelector(ret) + var outptr_QFileSelector *C.QFileSelector = nil + var outptr_QObject *C.QObject = nil + + C.QFileSelector_new2(parent.cPointer(), &outptr_QFileSelector, &outptr_QObject) + ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFileSelector) MetaObject() *QMetaObject { @@ -185,9 +205,175 @@ func QFileSelector_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFileSelector) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QFileSelector_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QFileSelector) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QFileSelector_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_Event +func miqt_exec_callback_QFileSelector_Event(self *C.QFileSelector, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSelector{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSelector) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QFileSelector_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QFileSelector) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QFileSelector_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_EventFilter +func miqt_exec_callback_QFileSelector_EventFilter(self *C.QFileSelector, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSelector{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSelector) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QFileSelector_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSelector) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QFileSelector_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_TimerEvent +func miqt_exec_callback_QFileSelector_TimerEvent(self *C.QFileSelector, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSelector{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QFileSelector_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSelector) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QFileSelector_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_ChildEvent +func miqt_exec_callback_QFileSelector_ChildEvent(self *C.QFileSelector, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSelector{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_CustomEvent(event *QEvent) { + + C.QFileSelector_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSelector) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFileSelector_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_CustomEvent +func miqt_exec_callback_QFileSelector_CustomEvent(self *C.QFileSelector, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFileSelector{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QFileSelector_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSelector) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSelector_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_ConnectNotify +func miqt_exec_callback_QFileSelector_ConnectNotify(self *C.QFileSelector, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSelector{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QFileSelector_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSelector) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSelector_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_DisconnectNotify +func miqt_exec_callback_QFileSelector_DisconnectNotify(self *C.QFileSelector, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSelector{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QFileSelector) Delete() { - C.QFileSelector_Delete(this.h) + C.QFileSelector_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfileselector.h b/qt/gen_qfileselector.h index b19fbb92..1bfde067 100644 --- a/qt/gen_qfileselector.h +++ b/qt/gen_qfileselector.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QFileSelector; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUrl; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFileSelector QFileSelector; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QFileSelector* QFileSelector_new(); -QFileSelector* QFileSelector_new2(QObject* parent); +void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); +void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); QMetaObject* QFileSelector_MetaObject(const QFileSelector* self); void* QFileSelector_Metacast(QFileSelector* self, const char* param1); struct miqt_string QFileSelector_Tr(const char* s); @@ -41,7 +49,21 @@ struct miqt_string QFileSelector_Tr2(const char* s, const char* c); struct miqt_string QFileSelector_Tr3(const char* s, const char* c, int n); struct miqt_string QFileSelector_TrUtf82(const char* s, const char* c); struct miqt_string QFileSelector_TrUtf83(const char* s, const char* c, int n); -void QFileSelector_Delete(QFileSelector* self); +void QFileSelector_override_virtual_Event(void* self, intptr_t slot); +bool QFileSelector_virtualbase_Event(void* self, QEvent* event); +void QFileSelector_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFileSelector_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QFileSelector_override_virtual_TimerEvent(void* self, intptr_t slot); +void QFileSelector_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QFileSelector_override_virtual_ChildEvent(void* self, intptr_t slot); +void QFileSelector_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QFileSelector_override_virtual_CustomEvent(void* self, intptr_t slot); +void QFileSelector_virtualbase_CustomEvent(void* self, QEvent* event); +void QFileSelector_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QFileSelector_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QFileSelector_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QFileSelector_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QFileSelector_Delete(QFileSelector* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfilesystemmodel.cpp b/qt/gen_qfilesystemmodel.cpp index 7c53dd46..7f2452e3 100644 --- a/qt/gen_qfilesystemmodel.cpp +++ b/qt/gen_qfilesystemmodel.cpp @@ -1,28 +1,1105 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include #include #include +#include #include #include #include +#include #include #include #include "gen_qfilesystemmodel.h" #include "_cgo_export.h" -QFileSystemModel* QFileSystemModel_new() { - return new QFileSystemModel(); +class MiqtVirtualQFileSystemModel : public virtual QFileSystemModel { +public: + + MiqtVirtualQFileSystemModel(): QFileSystemModel() {}; + MiqtVirtualQFileSystemModel(QObject* parent): QFileSystemModel(parent) {}; + + virtual ~MiqtVirtualQFileSystemModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QFileSystemModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QFileSystemModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QFileSystemModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QFileSystemModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QFileSystemModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QFileSystemModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QFileSystemModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QFileSystemModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QFileSystemModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QFileSystemModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QFileSystemModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QFileSystemModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QFileSystemModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QFileSystemModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QFileSystemModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QFileSystemModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QFileSystemModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QFileSystemModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QFileSystemModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QFileSystemModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QFileSystemModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QFileSystemModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QFileSystemModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QFileSystemModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QFileSystemModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QFileSystemModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QFileSystemModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QFileSystemModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QFileSystemModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QFileSystemModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QFileSystemModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QFileSystemModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QFileSystemModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QFileSystemModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QFileSystemModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QFileSystemModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QFileSystemModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QFileSystemModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QFileSystemModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QFileSystemModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QFileSystemModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QFileSystemModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QFileSystemModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QFileSystemModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QFileSystemModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemModel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QFileSystemModel::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QFileSystemModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QFileSystemModel::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QFileSystemModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QFileSystemModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QFileSystemModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QFileSystemModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QFileSystemModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QFileSystemModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QFileSystemModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QFileSystemModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QFileSystemModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QFileSystemModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QFileSystemModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QFileSystemModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QFileSystemModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QFileSystemModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QFileSystemModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QFileSystemModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QFileSystemModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QFileSystemModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QFileSystemModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QFileSystemModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QFileSystemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QFileSystemModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QFileSystemModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QFileSystemModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QFileSystemModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QFileSystemModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QFileSystemModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QFileSystemModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QFileSystemModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QFileSystemModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QFileSystemModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QFileSystemModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QFileSystemModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QFileSystemModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QFileSystemModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QFileSystemModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QFileSystemModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QFileSystemModel::revert(); + return; + } + + + miqt_exec_callback_QFileSystemModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QFileSystemModel::revert(); + + } + +}; + +void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(); + *outptr_QFileSystemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QFileSystemModel* QFileSystemModel_new2(QObject* parent) { - return new QFileSystemModel(parent); +void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(parent); + *outptr_QFileSystemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self) { @@ -61,7 +1138,7 @@ void QFileSystemModel_RootPathChanged(QFileSystemModel* self, struct miqt_string } void QFileSystemModel_connect_RootPathChanged(QFileSystemModel* self, intptr_t slot) { - QFileSystemModel::connect(self, static_cast(&QFileSystemModel::rootPathChanged), self, [=](const QString& newPath) { + MiqtVirtualQFileSystemModel::connect(self, static_cast(&QFileSystemModel::rootPathChanged), self, [=](const QString& newPath) { const QString newPath_ret = newPath; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray newPath_b = newPath_ret.toUtf8(); @@ -82,7 +1159,7 @@ void QFileSystemModel_FileRenamed(QFileSystemModel* self, struct miqt_string pat } void QFileSystemModel_connect_FileRenamed(QFileSystemModel* self, intptr_t slot) { - QFileSystemModel::connect(self, static_cast(&QFileSystemModel::fileRenamed), self, [=](const QString& path, const QString& oldName, const QString& newName) { + MiqtVirtualQFileSystemModel::connect(self, static_cast(&QFileSystemModel::fileRenamed), self, [=](const QString& path, const QString& oldName, const QString& newName) { const QString path_ret = path; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray path_b = path_ret.toUtf8(); @@ -117,7 +1194,7 @@ void QFileSystemModel_DirectoryLoaded(QFileSystemModel* self, struct miqt_string } void QFileSystemModel_connect_DirectoryLoaded(QFileSystemModel* self, intptr_t slot) { - QFileSystemModel::connect(self, static_cast(&QFileSystemModel::directoryLoaded), self, [=](const QString& path) { + MiqtVirtualQFileSystemModel::connect(self, static_cast(&QFileSystemModel::directoryLoaded), self, [=](const QString& path) { const QString path_ret = path; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray path_b = path_ret.toUtf8(); @@ -130,8 +1207,8 @@ void QFileSystemModel_connect_DirectoryLoaded(QFileSystemModel* self, intptr_t s }); } -QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QFileSystemModel_IndexWithPath(const QFileSystemModel* self, struct miqt_string path) { @@ -147,8 +1224,8 @@ QModelIndex* QFileSystemModel_Sibling(const QFileSystemModel* self, int row, int return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -bool QFileSystemModel_HasChildren(const QFileSystemModel* self) { - return self->hasChildren(); +bool QFileSystemModel_HasChildren(const QFileSystemModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } bool QFileSystemModel_CanFetchMore(const QFileSystemModel* self, QModelIndex* parent) { @@ -159,28 +1236,28 @@ void QFileSystemModel_FetchMore(QFileSystemModel* self, QModelIndex* parent) { self->fetchMore(*parent); } -int QFileSystemModel_RowCount(const QFileSystemModel* self) { - return self->rowCount(); +int QFileSystemModel_RowCount(const QFileSystemModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QFileSystemModel_ColumnCount(const QFileSystemModel* self) { - return self->columnCount(); +int QFileSystemModel_ColumnCount(const QFileSystemModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } QVariant* QFileSystemModel_MyComputer(const QFileSystemModel* self) { return new QVariant(self->myComputer()); } -QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } int QFileSystemModel_Flags(const QFileSystemModel* self, QModelIndex* index) { @@ -188,8 +1265,8 @@ int QFileSystemModel_Flags(const QFileSystemModel* self, QModelIndex* index) { return static_cast(_ret); } -void QFileSystemModel_Sort(QFileSystemModel* self, int column) { - self->sort(static_cast(column)); +void QFileSystemModel_Sort(QFileSystemModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QFileSystemModel_MimeTypes(const QFileSystemModel* self) { @@ -456,52 +1533,312 @@ struct miqt_string QFileSystemModel_TrUtf83(const char* s, const char* c, int n) return _ms; } -QModelIndex* QFileSystemModel_Index3(const QFileSystemModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - QModelIndex* QFileSystemModel_Index2(const QFileSystemModel* self, struct miqt_string path, int column) { QString path_QString = QString::fromUtf8(path.data, path.len); return new QModelIndex(self->index(path_QString, static_cast(column))); } -bool QFileSystemModel_HasChildren1(const QFileSystemModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); +QVariant* QFileSystemModel_MyComputer1(const QFileSystemModel* self, int role) { + return new QVariant(self->myComputer(static_cast(role))); } -int QFileSystemModel_RowCount1(const QFileSystemModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QFileSystemModel_SetOption2(QFileSystemModel* self, int option, bool on) { + self->setOption(static_cast(option), on); } -int QFileSystemModel_ColumnCount1(const QFileSystemModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QFileSystemModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Index = slot; } -QVariant* QFileSystemModel_MyComputer1(const QFileSystemModel* self, int role) { - return new QVariant(self->myComputer(static_cast(role))); +QModelIndex* QFileSystemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Index(row, column, parent); } -QVariant* QFileSystemModel_Data2(const QFileSystemModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +void QFileSystemModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Parent = slot; } -bool QFileSystemModel_SetData3(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +QModelIndex* QFileSystemModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Parent(child); } -QVariant* QFileSystemModel_HeaderData3(const QFileSystemModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QFileSystemModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Sibling = slot; } -void QFileSystemModel_Sort2(QFileSystemModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +QModelIndex* QFileSystemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Sibling(row, column, idx); } -void QFileSystemModel_SetOption2(QFileSystemModel* self, int option, bool on) { - self->setOption(static_cast(option), on); +void QFileSystemModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__HasChildren = slot; +} + +bool QFileSystemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QFileSystemModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QFileSystemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QFileSystemModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__FetchMore = slot; +} + +void QFileSystemModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QFileSystemModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RowCount = slot; +} + +int QFileSystemModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RowCount(parent); +} + +void QFileSystemModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__ColumnCount = slot; +} + +int QFileSystemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QFileSystemModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Data = slot; } -void QFileSystemModel_Delete(QFileSystemModel* self) { - delete self; +QVariant* QFileSystemModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Data(index, role); +} + +void QFileSystemModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SetData = slot; +} + +bool QFileSystemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QFileSystemModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QFileSystemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QFileSystemModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Flags = slot; +} + +int QFileSystemModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Flags(index); +} + +void QFileSystemModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Sort = slot; +} + +void QFileSystemModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Sort(column, order); +} + +void QFileSystemModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QFileSystemModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MimeTypes(); +} + +void QFileSystemModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QFileSystemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QFileSystemModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__DropMimeData = slot; +} + +bool QFileSystemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QFileSystemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QFileSystemModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QFileSystemModel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__TimerEvent = slot; +} + +void QFileSystemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_TimerEvent(event); +} + +void QFileSystemModel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Event = slot; +} + +bool QFileSystemModel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Event(event); +} + +void QFileSystemModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QFileSystemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QFileSystemModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QFileSystemModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_ItemData(index); +} + +void QFileSystemModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SetItemData = slot; +} + +bool QFileSystemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QFileSystemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QFileSystemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QFileSystemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QFileSystemModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QFileSystemModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__InsertRows = slot; +} + +bool QFileSystemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QFileSystemModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__InsertColumns = slot; +} + +bool QFileSystemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QFileSystemModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RemoveRows = slot; +} + +bool QFileSystemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QFileSystemModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QFileSystemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QFileSystemModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MoveRows = slot; +} + +bool QFileSystemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QFileSystemModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MoveColumns = slot; +} + +bool QFileSystemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QFileSystemModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QFileSystemModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Buddy(index); +} + +void QFileSystemModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QFileSystemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QFileSystemModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Span = slot; +} + +QSize* QFileSystemModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Span(index); +} + +void QFileSystemModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QFileSystemModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RoleNames(); +} + +void QFileSystemModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Submit = slot; +} + +bool QFileSystemModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Submit(); +} + +void QFileSystemModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Revert = slot; +} + +void QFileSystemModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Revert(); +} + +void QFileSystemModel_Delete(QFileSystemModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfilesystemmodel.go b/qt/gen_qfilesystemmodel.go index f26b4ffe..a8527c37 100644 --- a/qt/gen_qfilesystemmodel.go +++ b/qt/gen_qfilesystemmodel.go @@ -32,7 +32,8 @@ const ( ) type QFileSystemModel struct { - h *C.QFileSystemModel + h *C.QFileSystemModel + isSubclass bool *QAbstractItemModel } @@ -50,27 +51,47 @@ func (this *QFileSystemModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileSystemModel(h *C.QFileSystemModel) *QFileSystemModel { +// newQFileSystemModel constructs the type using only CGO pointers. +func newQFileSystemModel(h *C.QFileSystemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QFileSystemModel { if h == nil { return nil } - return &QFileSystemModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QFileSystemModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQFileSystemModel(h unsafe.Pointer) *QFileSystemModel { - return newQFileSystemModel((*C.QFileSystemModel)(h)) +// UnsafeNewQFileSystemModel constructs the type using only unsafe pointers. +func UnsafeNewQFileSystemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemModel { + if h == nil { + return nil + } + + return &QFileSystemModel{h: (*C.QFileSystemModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQFileSystemModel constructs a new QFileSystemModel object. func NewQFileSystemModel() *QFileSystemModel { - ret := C.QFileSystemModel_new() - return newQFileSystemModel(ret) + var outptr_QFileSystemModel *C.QFileSystemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemModel_new(&outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemModel2 constructs a new QFileSystemModel object. func NewQFileSystemModel2(parent *QObject) *QFileSystemModel { - ret := C.QFileSystemModel_new2(parent.cPointer()) - return newQFileSystemModel(ret) + var outptr_QFileSystemModel *C.QFileSystemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemModel_new2(parent.cPointer(), &outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFileSystemModel) MetaObject() *QMetaObject { @@ -198,8 +219,8 @@ func miqt_exec_callback_QFileSystemModel_DirectoryLoaded(cb C.intptr_t, path C.s gofunc(slotval1) } -func (this *QFileSystemModel) Index(row int, column int) *QModelIndex { - _ret := C.QFileSystemModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QFileSystemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QFileSystemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -230,8 +251,8 @@ func (this *QFileSystemModel) Sibling(row int, column int, idx *QModelIndex) *QM return _goptr } -func (this *QFileSystemModel) HasChildren() bool { - return (bool)(C.QFileSystemModel_HasChildren(this.h)) +func (this *QFileSystemModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QFileSystemModel_HasChildren(this.h, parent.cPointer())) } func (this *QFileSystemModel) CanFetchMore(parent *QModelIndex) bool { @@ -242,12 +263,12 @@ func (this *QFileSystemModel) FetchMore(parent *QModelIndex) { C.QFileSystemModel_FetchMore(this.h, parent.cPointer()) } -func (this *QFileSystemModel) RowCount() int { - return (int)(C.QFileSystemModel_RowCount(this.h)) +func (this *QFileSystemModel) RowCount(parent *QModelIndex) int { + return (int)(C.QFileSystemModel_RowCount(this.h, parent.cPointer())) } -func (this *QFileSystemModel) ColumnCount() int { - return (int)(C.QFileSystemModel_ColumnCount(this.h)) +func (this *QFileSystemModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QFileSystemModel_ColumnCount(this.h, parent.cPointer())) } func (this *QFileSystemModel) MyComputer() *QVariant { @@ -257,19 +278,19 @@ func (this *QFileSystemModel) MyComputer() *QVariant { return _goptr } -func (this *QFileSystemModel) Data(index *QModelIndex) *QVariant { - _ret := C.QFileSystemModel_Data(this.h, index.cPointer()) +func (this *QFileSystemModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QFileSystemModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QFileSystemModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QFileSystemModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QFileSystemModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QFileSystemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QFileSystemModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QFileSystemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QFileSystemModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QFileSystemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -279,8 +300,8 @@ func (this *QFileSystemModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QFileSystemModel_Flags(this.h, index.cPointer())) } -func (this *QFileSystemModel) Sort(column int) { - C.QFileSystemModel_Sort(this.h, (C.int)(column)) +func (this *QFileSystemModel) Sort(column int, order SortOrder) { + C.QFileSystemModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QFileSystemModel) MimeTypes() []string { @@ -303,7 +324,7 @@ func (this *QFileSystemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QFileSystemModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QFileSystemModel_MimeData(this.h, indexes_ma)), nil) } func (this *QFileSystemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -539,13 +560,6 @@ func QFileSystemModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QFileSystemModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QFileSystemModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - func (this *QFileSystemModel) Index2(path string, column int) *QModelIndex { path_ms := C.struct_miqt_string{} path_ms.data = C.CString(path) @@ -557,54 +571,1123 @@ func (this *QFileSystemModel) Index2(path string, column int) *QModelIndex { return _goptr } -func (this *QFileSystemModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QFileSystemModel_HasChildren1(this.h, parent.cPointer())) +func (this *QFileSystemModel) MyComputer1(role int) *QVariant { + _ret := C.QFileSystemModel_MyComputer1(this.h, (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr } -func (this *QFileSystemModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QFileSystemModel_RowCount1(this.h, parent.cPointer())) +func (this *QFileSystemModel) SetOption2(option QFileSystemModel__Option, on bool) { + C.QFileSystemModel_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } -func (this *QFileSystemModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QFileSystemModel_ColumnCount1(this.h, parent.cPointer())) +func (this *QFileSystemModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QFileSystemModel) MyComputer1(role int) *QVariant { - _ret := C.QFileSystemModel_MyComputer1(this.h, (C.int)(role)) - _goptr := newQVariant(_ret) +//export miqt_exec_callback_QFileSystemModel_Index +func miqt_exec_callback_QFileSystemModel_Index(self *C.QFileSystemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Parent +func miqt_exec_callback_QFileSystemModel_Parent(self *C.QFileSystemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QFileSystemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Sibling +func miqt_exec_callback_QFileSystemModel_Sibling(self *C.QFileSystemModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_HasChildren +func miqt_exec_callback_QFileSystemModel_HasChildren(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_CanFetchMore +func miqt_exec_callback_QFileSystemModel_CanFetchMore(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QFileSystemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QFileSystemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QFileSystemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_FetchMore +func miqt_exec_callback_QFileSystemModel_FetchMore(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QFileSystemModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QFileSystemModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QFileSystemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RowCount +func miqt_exec_callback_QFileSystemModel_RowCount(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QFileSystemModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QFileSystemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_ColumnCount +func miqt_exec_callback_QFileSystemModel_ColumnCount(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QFileSystemModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QFileSystemModel_Data2(this.h, index.cPointer(), (C.int)(role)) +func (this *QFileSystemModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QFileSystemModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QFileSystemModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QFileSystemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Data +func miqt_exec_callback_QFileSystemModel_Data(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QFileSystemModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QFileSystemModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +func (this *QFileSystemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QFileSystemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QFileSystemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SetData +func miqt_exec_callback_QFileSystemModel_SetData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QFileSystemModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QFileSystemModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QFileSystemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QFileSystemModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QFileSystemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QFileSystemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QFileSystemModel) Sort2(column int, order SortOrder) { - C.QFileSystemModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +//export miqt_exec_callback_QFileSystemModel_HeaderData +func miqt_exec_callback_QFileSystemModel_HeaderData(self *C.QFileSystemModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QFileSystemModel) SetOption2(option QFileSystemModel__Option, on bool) { - C.QFileSystemModel_SetOption2(this.h, (C.int)(option), (C.bool)(on)) +func (this *QFileSystemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QFileSystemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QFileSystemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QFileSystemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Flags +func miqt_exec_callback_QFileSystemModel_Flags(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QFileSystemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QFileSystemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QFileSystemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Sort +func miqt_exec_callback_QFileSystemModel_Sort(self *C.QFileSystemModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QFileSystemModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QFileSystemModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QFileSystemModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QFileSystemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MimeTypes +func miqt_exec_callback_QFileSystemModel_MimeTypes(self *C.QFileSystemModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QFileSystemModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QFileSystemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QFileSystemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QFileSystemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MimeData +func miqt_exec_callback_QFileSystemModel_MimeData(self *C.QFileSystemModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QFileSystemModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_DropMimeData +func miqt_exec_callback_QFileSystemModel_DropMimeData(self *C.QFileSystemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QFileSystemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QFileSystemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QFileSystemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SupportedDropActions +func miqt_exec_callback_QFileSystemModel_SupportedDropActions(self *C.QFileSystemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QFileSystemModel_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemModel) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QFileSystemModel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_TimerEvent +func miqt_exec_callback_QFileSystemModel_TimerEvent(self *C.QFileSystemModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QFileSystemModel) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QFileSystemModel_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QFileSystemModel) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QFileSystemModel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Event +func miqt_exec_callback_QFileSystemModel_Event(self *C.QFileSystemModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QFileSystemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QFileSystemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SetHeaderData +func miqt_exec_callback_QFileSystemModel_SetHeaderData(self *C.QFileSystemModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QFileSystemModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QFileSystemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QFileSystemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_ItemData +func miqt_exec_callback_QFileSystemModel_ItemData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QFileSystemModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QFileSystemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QFileSystemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QFileSystemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SetItemData +func miqt_exec_callback_QFileSystemModel_SetItemData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QFileSystemModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_CanDropMimeData +func miqt_exec_callback_QFileSystemModel_CanDropMimeData(self *C.QFileSystemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QFileSystemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QFileSystemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QFileSystemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SupportedDragActions +func miqt_exec_callback_QFileSystemModel_SupportedDragActions(self *C.QFileSystemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_InsertRows +func miqt_exec_callback_QFileSystemModel_InsertRows(self *C.QFileSystemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_InsertColumns +func miqt_exec_callback_QFileSystemModel_InsertColumns(self *C.QFileSystemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RemoveRows +func miqt_exec_callback_QFileSystemModel_RemoveRows(self *C.QFileSystemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RemoveColumns +func miqt_exec_callback_QFileSystemModel_RemoveColumns(self *C.QFileSystemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QFileSystemModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QFileSystemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MoveRows +func miqt_exec_callback_QFileSystemModel_MoveRows(self *C.QFileSystemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QFileSystemModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QFileSystemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MoveColumns +func miqt_exec_callback_QFileSystemModel_MoveColumns(self *C.QFileSystemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Buddy +func miqt_exec_callback_QFileSystemModel_Buddy(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QFileSystemModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QFileSystemModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QFileSystemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Match +func miqt_exec_callback_QFileSystemModel_Match(self *C.QFileSystemModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QFileSystemModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QFileSystemModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QFileSystemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Span +func miqt_exec_callback_QFileSystemModel_Span(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QFileSystemModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QFileSystemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QFileSystemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RoleNames +func miqt_exec_callback_QFileSystemModel_RoleNames(self *C.QFileSystemModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QFileSystemModel) callVirtualBase_Submit() bool { + + return (bool)(C.QFileSystemModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QFileSystemModel) OnSubmit(slot func(super func() bool) bool) { + C.QFileSystemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Submit +func miqt_exec_callback_QFileSystemModel_Submit(self *C.QFileSystemModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_Revert() { + + C.QFileSystemModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QFileSystemModel) OnRevert(slot func(super func())) { + C.QFileSystemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Revert +func miqt_exec_callback_QFileSystemModel_Revert(self *C.QFileSystemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_Revert) + } // Delete this object from C++ memory. func (this *QFileSystemModel) Delete() { - C.QFileSystemModel_Delete(this.h) + C.QFileSystemModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfilesystemmodel.h b/qt/gen_qfilesystemmodel.h index 8c749ff9..f3b79f0a 100644 --- a/qt/gen_qfilesystemmodel.h +++ b/qt/gen_qfilesystemmodel.h @@ -15,8 +15,11 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; +class QByteArray; class QDateTime; class QDir; +class QEvent; class QFileIconProvider; class QFileInfo; class QFileSystemModel; @@ -25,10 +28,15 @@ class QMetaObject; class QMimeData; class QModelIndex; class QObject; +class QSize; +class QTimerEvent; class QVariant; #else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QDir QDir; +typedef struct QEvent QEvent; typedef struct QFileIconProvider QFileIconProvider; typedef struct QFileInfo QFileInfo; typedef struct QFileSystemModel QFileSystemModel; @@ -37,11 +45,13 @@ typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QFileSystemModel* QFileSystemModel_new(); -QFileSystemModel* QFileSystemModel_new2(QObject* parent); +void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self); void* QFileSystemModel_Metacast(QFileSystemModel* self, const char* param1); struct miqt_string QFileSystemModel_Tr(const char* s); @@ -52,21 +62,21 @@ void QFileSystemModel_FileRenamed(QFileSystemModel* self, struct miqt_string pat void QFileSystemModel_connect_FileRenamed(QFileSystemModel* self, intptr_t slot); void QFileSystemModel_DirectoryLoaded(QFileSystemModel* self, struct miqt_string path); void QFileSystemModel_connect_DirectoryLoaded(QFileSystemModel* self, intptr_t slot); -QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column); +QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QFileSystemModel_IndexWithPath(const QFileSystemModel* self, struct miqt_string path); QModelIndex* QFileSystemModel_Parent(const QFileSystemModel* self, QModelIndex* child); QModelIndex* QFileSystemModel_Sibling(const QFileSystemModel* self, int row, int column, QModelIndex* idx); -bool QFileSystemModel_HasChildren(const QFileSystemModel* self); +bool QFileSystemModel_HasChildren(const QFileSystemModel* self, QModelIndex* parent); bool QFileSystemModel_CanFetchMore(const QFileSystemModel* self, QModelIndex* parent); void QFileSystemModel_FetchMore(QFileSystemModel* self, QModelIndex* parent); -int QFileSystemModel_RowCount(const QFileSystemModel* self); -int QFileSystemModel_ColumnCount(const QFileSystemModel* self); +int QFileSystemModel_RowCount(const QFileSystemModel* self, QModelIndex* parent); +int QFileSystemModel_ColumnCount(const QFileSystemModel* self, QModelIndex* parent); QVariant* QFileSystemModel_MyComputer(const QFileSystemModel* self); -QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index); -bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value); -QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation); +QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index, int role); +bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation, int role); int QFileSystemModel_Flags(const QFileSystemModel* self, QModelIndex* index); -void QFileSystemModel_Sort(QFileSystemModel* self, int column); +void QFileSystemModel_Sort(QFileSystemModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QFileSystemModel_MimeTypes(const QFileSystemModel* self); QMimeData* QFileSystemModel_MimeData(const QFileSystemModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QFileSystemModel_DropMimeData(QFileSystemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -102,22 +112,88 @@ QIcon* QFileSystemModel_FileIcon(const QFileSystemModel* self, QModelIndex* inde int QFileSystemModel_Permissions(const QFileSystemModel* self, QModelIndex* index); QFileInfo* QFileSystemModel_FileInfo(const QFileSystemModel* self, QModelIndex* index); bool QFileSystemModel_Remove(QFileSystemModel* self, QModelIndex* index); +void QFileSystemModel_TimerEvent(QFileSystemModel* self, QTimerEvent* event); +bool QFileSystemModel_Event(QFileSystemModel* self, QEvent* event); struct miqt_string QFileSystemModel_Tr2(const char* s, const char* c); struct miqt_string QFileSystemModel_Tr3(const char* s, const char* c, int n); struct miqt_string QFileSystemModel_TrUtf82(const char* s, const char* c); struct miqt_string QFileSystemModel_TrUtf83(const char* s, const char* c, int n); -QModelIndex* QFileSystemModel_Index3(const QFileSystemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QFileSystemModel_Index2(const QFileSystemModel* self, struct miqt_string path, int column); -bool QFileSystemModel_HasChildren1(const QFileSystemModel* self, QModelIndex* parent); -int QFileSystemModel_RowCount1(const QFileSystemModel* self, QModelIndex* parent); -int QFileSystemModel_ColumnCount1(const QFileSystemModel* self, QModelIndex* parent); QVariant* QFileSystemModel_MyComputer1(const QFileSystemModel* self, int role); -QVariant* QFileSystemModel_Data2(const QFileSystemModel* self, QModelIndex* index, int role); -bool QFileSystemModel_SetData3(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QFileSystemModel_HeaderData3(const QFileSystemModel* self, int section, int orientation, int role); -void QFileSystemModel_Sort2(QFileSystemModel* self, int column, int order); void QFileSystemModel_SetOption2(QFileSystemModel* self, int option, bool on); -void QFileSystemModel_Delete(QFileSystemModel* self); +void QFileSystemModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QFileSystemModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QFileSystemModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QFileSystemModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_RowCount(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QFileSystemModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QFileSystemModel_override_virtual_SetData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QFileSystemModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QFileSystemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QFileSystemModel_override_virtual_Flags(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_Sort(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_Sort(void* self, int column, int order); +void QFileSystemModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QFileSystemModel_virtualbase_MimeTypes(const void* self); +void QFileSystemModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QFileSystemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QFileSystemModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QFileSystemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_SupportedDropActions(const void* self); +void QFileSystemModel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QFileSystemModel_override_virtual_Event(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_Event(void* self, QEvent* event); +void QFileSystemModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QFileSystemModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QFileSystemModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QFileSystemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QFileSystemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_SupportedDragActions(const void* self); +void QFileSystemModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QFileSystemModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QFileSystemModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QFileSystemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QFileSystemModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QFileSystemModel_virtualbase_Span(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QFileSystemModel_virtualbase_RoleNames(const void* self); +void QFileSystemModel_override_virtual_Submit(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_Submit(void* self); +void QFileSystemModel_override_virtual_Revert(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_Revert(void* self); +void QFileSystemModel_Delete(QFileSystemModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfilesystemwatcher.cpp b/qt/gen_qfilesystemwatcher.cpp index 8f778d14..2ec27c1a 100644 --- a/qt/gen_qfilesystemwatcher.cpp +++ b/qt/gen_qfilesystemwatcher.cpp @@ -1,19 +1,208 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qfilesystemwatcher.h" #include "_cgo_export.h" -QFileSystemWatcher* QFileSystemWatcher_new() { - return new QFileSystemWatcher(); +class MiqtVirtualQFileSystemWatcher : public virtual QFileSystemWatcher { +public: + + MiqtVirtualQFileSystemWatcher(): QFileSystemWatcher() {}; + MiqtVirtualQFileSystemWatcher(const QStringList& paths): QFileSystemWatcher(paths) {}; + MiqtVirtualQFileSystemWatcher(QObject* parent): QFileSystemWatcher(parent) {}; + MiqtVirtualQFileSystemWatcher(const QStringList& paths, QObject* parent): QFileSystemWatcher(paths, parent) {}; + + virtual ~MiqtVirtualQFileSystemWatcher() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QFileSystemWatcher::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QFileSystemWatcher_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QFileSystemWatcher::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QFileSystemWatcher::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QFileSystemWatcher_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QFileSystemWatcher::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QFileSystemWatcher::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemWatcher_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QFileSystemWatcher::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QFileSystemWatcher::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemWatcher_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QFileSystemWatcher::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QFileSystemWatcher::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemWatcher_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QFileSystemWatcher::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QFileSystemWatcher::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSystemWatcher_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QFileSystemWatcher::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QFileSystemWatcher::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSystemWatcher_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QFileSystemWatcher::disconnectNotify(*signal); + + } + +}; + +void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } -QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths) { +void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -21,14 +210,18 @@ QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_ QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - return new QFileSystemWatcher(paths_QList); + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } -QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent) { - return new QFileSystemWatcher(parent); +void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(parent); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } -QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent) { +void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -36,7 +229,9 @@ QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_ QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - return new QFileSystemWatcher(paths_QList, parent); + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList, parent); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self) { @@ -217,7 +412,67 @@ struct miqt_string QFileSystemWatcher_TrUtf83(const char* s, const char* c, int return _ms; } -void QFileSystemWatcher_Delete(QFileSystemWatcher* self) { - delete self; +void QFileSystemWatcher_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__Event = slot; +} + +bool QFileSystemWatcher_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_Event(event); +} + +void QFileSystemWatcher_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__EventFilter = slot; +} + +bool QFileSystemWatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QFileSystemWatcher_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__TimerEvent = slot; +} + +void QFileSystemWatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_TimerEvent(event); +} + +void QFileSystemWatcher_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__ChildEvent = slot; +} + +void QFileSystemWatcher_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_ChildEvent(event); +} + +void QFileSystemWatcher_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__CustomEvent = slot; +} + +void QFileSystemWatcher_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_CustomEvent(event); +} + +void QFileSystemWatcher_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__ConnectNotify = slot; +} + +void QFileSystemWatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QFileSystemWatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__DisconnectNotify = slot; +} + +void QFileSystemWatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QFileSystemWatcher_Delete(QFileSystemWatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfilesystemwatcher.go b/qt/gen_qfilesystemwatcher.go index 303b98e5..0a6e762a 100644 --- a/qt/gen_qfilesystemwatcher.go +++ b/qt/gen_qfilesystemwatcher.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFileSystemWatcher struct { - h *C.QFileSystemWatcher + h *C.QFileSystemWatcher + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QFileSystemWatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileSystemWatcher(h *C.QFileSystemWatcher) *QFileSystemWatcher { +// newQFileSystemWatcher constructs the type using only CGO pointers. +func newQFileSystemWatcher(h *C.QFileSystemWatcher, h_QObject *C.QObject) *QFileSystemWatcher { if h == nil { return nil } - return &QFileSystemWatcher{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QFileSystemWatcher{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQFileSystemWatcher(h unsafe.Pointer) *QFileSystemWatcher { - return newQFileSystemWatcher((*C.QFileSystemWatcher)(h)) +// UnsafeNewQFileSystemWatcher constructs the type using only unsafe pointers. +func UnsafeNewQFileSystemWatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemWatcher { + if h == nil { + return nil + } + + return &QFileSystemWatcher{h: (*C.QFileSystemWatcher)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQFileSystemWatcher constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher() *QFileSystemWatcher { - ret := C.QFileSystemWatcher_new() - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new(&outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemWatcher2 constructs a new QFileSystemWatcher object. @@ -61,14 +76,24 @@ func NewQFileSystemWatcher2(paths []string) *QFileSystemWatcher { paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - ret := C.QFileSystemWatcher_new2(paths_ma) - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new2(paths_ma, &outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemWatcher3 constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher3(parent *QObject) *QFileSystemWatcher { - ret := C.QFileSystemWatcher_new3(parent.cPointer()) - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new3(parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemWatcher4 constructs a new QFileSystemWatcher object. @@ -83,8 +108,13 @@ func NewQFileSystemWatcher4(paths []string, parent *QObject) *QFileSystemWatcher paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - ret := C.QFileSystemWatcher_new4(paths_ma, parent.cPointer()) - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new4(paths_ma, parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFileSystemWatcher) MetaObject() *QMetaObject { @@ -247,9 +277,175 @@ func QFileSystemWatcher_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFileSystemWatcher) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QFileSystemWatcher_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QFileSystemWatcher) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QFileSystemWatcher_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_Event +func miqt_exec_callback_QFileSystemWatcher_Event(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemWatcher) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QFileSystemWatcher_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QFileSystemWatcher) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QFileSystemWatcher_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_EventFilter +func miqt_exec_callback_QFileSystemWatcher_EventFilter(self *C.QFileSystemWatcher, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemWatcher) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QFileSystemWatcher_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemWatcher) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QFileSystemWatcher_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_TimerEvent +func miqt_exec_callback_QFileSystemWatcher_TimerEvent(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QFileSystemWatcher_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemWatcher) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QFileSystemWatcher_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_ChildEvent +func miqt_exec_callback_QFileSystemWatcher_ChildEvent(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_CustomEvent(event *QEvent) { + + C.QFileSystemWatcher_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemWatcher) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFileSystemWatcher_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_CustomEvent +func miqt_exec_callback_QFileSystemWatcher_CustomEvent(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QFileSystemWatcher_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSystemWatcher) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSystemWatcher_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_ConnectNotify +func miqt_exec_callback_QFileSystemWatcher_ConnectNotify(self *C.QFileSystemWatcher, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QFileSystemWatcher_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSystemWatcher) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSystemWatcher_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_DisconnectNotify +func miqt_exec_callback_QFileSystemWatcher_DisconnectNotify(self *C.QFileSystemWatcher, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QFileSystemWatcher) Delete() { - C.QFileSystemWatcher_Delete(this.h) + C.QFileSystemWatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfilesystemwatcher.h b/qt/gen_qfilesystemwatcher.h index 0643691f..e62f9aa3 100644 --- a/qt/gen_qfilesystemwatcher.h +++ b/qt/gen_qfilesystemwatcher.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QFileSystemWatcher; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFileSystemWatcher QFileSystemWatcher; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QFileSystemWatcher* QFileSystemWatcher_new(); -QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths); -QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent); -QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent); +void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self); void* QFileSystemWatcher_Metacast(QFileSystemWatcher* self, const char* param1); struct miqt_string QFileSystemWatcher_Tr(const char* s); @@ -42,7 +50,21 @@ struct miqt_string QFileSystemWatcher_Tr2(const char* s, const char* c); struct miqt_string QFileSystemWatcher_Tr3(const char* s, const char* c, int n); struct miqt_string QFileSystemWatcher_TrUtf82(const char* s, const char* c); struct miqt_string QFileSystemWatcher_TrUtf83(const char* s, const char* c, int n); -void QFileSystemWatcher_Delete(QFileSystemWatcher* self); +void QFileSystemWatcher_override_virtual_Event(void* self, intptr_t slot); +bool QFileSystemWatcher_virtualbase_Event(void* self, QEvent* event); +void QFileSystemWatcher_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFileSystemWatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QFileSystemWatcher_override_virtual_TimerEvent(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QFileSystemWatcher_override_virtual_ChildEvent(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QFileSystemWatcher_override_virtual_CustomEvent(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_CustomEvent(void* self, QEvent* event); +void QFileSystemWatcher_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QFileSystemWatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QFileSystemWatcher_Delete(QFileSystemWatcher* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfinalstate.cpp b/qt/gen_qfinalstate.cpp index d56a778b..4bef099d 100644 --- a/qt/gen_qfinalstate.cpp +++ b/qt/gen_qfinalstate.cpp @@ -1,5 +1,8 @@ +#include +#include #include #include +#include #include #include #include @@ -8,12 +11,99 @@ #include "gen_qfinalstate.h" #include "_cgo_export.h" -QFinalState* QFinalState_new() { - return new QFinalState(); +class MiqtVirtualQFinalState : public virtual QFinalState { +public: + + MiqtVirtualQFinalState(): QFinalState() {}; + MiqtVirtualQFinalState(QState* parent): QFinalState(parent) {}; + + virtual ~MiqtVirtualQFinalState() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnEntry = 0; + + // Subclass to allow providing a Go implementation + virtual void onEntry(QEvent* event) override { + if (handle__OnEntry == 0) { + QFinalState::onEntry(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFinalState_OnEntry(this, handle__OnEntry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnEntry(QEvent* event) { + + QFinalState::onEntry(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnExit = 0; + + // Subclass to allow providing a Go implementation + virtual void onExit(QEvent* event) override { + if (handle__OnExit == 0) { + QFinalState::onExit(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFinalState_OnExit(this, handle__OnExit, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnExit(QEvent* event) { + + QFinalState::onExit(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFinalState::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFinalState_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFinalState::event(e); + + } + +}; + +void QFinalState_new(QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQFinalState* ret = new MiqtVirtualQFinalState(); + *outptr_QFinalState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QFinalState* QFinalState_new2(QState* parent) { - return new QFinalState(parent); +void QFinalState_new2(QState* parent, QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQFinalState* ret = new MiqtVirtualQFinalState(parent); + *outptr_QFinalState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QFinalState_MetaObject(const QFinalState* self) { @@ -90,7 +180,35 @@ struct miqt_string QFinalState_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QFinalState_Delete(QFinalState* self) { - delete self; +void QFinalState_override_virtual_OnEntry(void* self, intptr_t slot) { + dynamic_cast( (QFinalState*)(self) )->handle__OnEntry = slot; +} + +void QFinalState_virtualbase_OnEntry(void* self, QEvent* event) { + ( (MiqtVirtualQFinalState*)(self) )->virtualbase_OnEntry(event); +} + +void QFinalState_override_virtual_OnExit(void* self, intptr_t slot) { + dynamic_cast( (QFinalState*)(self) )->handle__OnExit = slot; +} + +void QFinalState_virtualbase_OnExit(void* self, QEvent* event) { + ( (MiqtVirtualQFinalState*)(self) )->virtualbase_OnExit(event); +} + +void QFinalState_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFinalState*)(self) )->handle__Event = slot; +} + +bool QFinalState_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFinalState*)(self) )->virtualbase_Event(e); +} + +void QFinalState_Delete(QFinalState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfinalstate.go b/qt/gen_qfinalstate.go index 61eef25b..5aca26ad 100644 --- a/qt/gen_qfinalstate.go +++ b/qt/gen_qfinalstate.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFinalState struct { - h *C.QFinalState + h *C.QFinalState + isSubclass bool *QAbstractState } @@ -32,27 +34,47 @@ func (this *QFinalState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFinalState(h *C.QFinalState) *QFinalState { +// newQFinalState constructs the type using only CGO pointers. +func newQFinalState(h *C.QFinalState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QFinalState { if h == nil { return nil } - return &QFinalState{h: h, QAbstractState: UnsafeNewQAbstractState(unsafe.Pointer(h))} + return &QFinalState{h: h, + QAbstractState: newQAbstractState(h_QAbstractState, h_QObject)} } -func UnsafeNewQFinalState(h unsafe.Pointer) *QFinalState { - return newQFinalState((*C.QFinalState)(h)) +// UnsafeNewQFinalState constructs the type using only unsafe pointers. +func UnsafeNewQFinalState(h unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QFinalState { + if h == nil { + return nil + } + + return &QFinalState{h: (*C.QFinalState)(h), + QAbstractState: UnsafeNewQAbstractState(h_QAbstractState, h_QObject)} } // NewQFinalState constructs a new QFinalState object. func NewQFinalState() *QFinalState { - ret := C.QFinalState_new() - return newQFinalState(ret) + var outptr_QFinalState *C.QFinalState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QFinalState_new(&outptr_QFinalState, &outptr_QAbstractState, &outptr_QObject) + ret := newQFinalState(outptr_QFinalState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFinalState2 constructs a new QFinalState object. func NewQFinalState2(parent *QState) *QFinalState { - ret := C.QFinalState_new2(parent.cPointer()) - return newQFinalState(ret) + var outptr_QFinalState *C.QFinalState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QFinalState_new2(parent.cPointer(), &outptr_QFinalState, &outptr_QAbstractState, &outptr_QObject) + ret := newQFinalState(outptr_QFinalState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFinalState) MetaObject() *QMetaObject { @@ -127,9 +149,80 @@ func QFinalState_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFinalState) callVirtualBase_OnEntry(event *QEvent) { + + C.QFinalState_virtualbase_OnEntry(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFinalState) OnOnEntry(slot func(super func(event *QEvent), event *QEvent)) { + C.QFinalState_override_virtual_OnEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFinalState_OnEntry +func miqt_exec_callback_QFinalState_OnEntry(self *C.QFinalState, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFinalState{h: self}).callVirtualBase_OnEntry, slotval1) + +} + +func (this *QFinalState) callVirtualBase_OnExit(event *QEvent) { + + C.QFinalState_virtualbase_OnExit(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFinalState) OnOnExit(slot func(super func(event *QEvent), event *QEvent)) { + C.QFinalState_override_virtual_OnExit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFinalState_OnExit +func miqt_exec_callback_QFinalState_OnExit(self *C.QFinalState, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFinalState{h: self}).callVirtualBase_OnExit, slotval1) + +} + +func (this *QFinalState) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFinalState_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFinalState) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFinalState_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFinalState_Event +func miqt_exec_callback_QFinalState_Event(self *C.QFinalState, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFinalState{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFinalState) Delete() { - C.QFinalState_Delete(this.h) + C.QFinalState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfinalstate.h b/qt/gen_qfinalstate.h index dd42b40a..bf08bc4e 100644 --- a/qt/gen_qfinalstate.h +++ b/qt/gen_qfinalstate.h @@ -15,26 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractState; +class QEvent; class QFinalState; class QMetaObject; +class QObject; class QState; #else +typedef struct QAbstractState QAbstractState; +typedef struct QEvent QEvent; typedef struct QFinalState QFinalState; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QState QState; #endif -QFinalState* QFinalState_new(); -QFinalState* QFinalState_new2(QState* parent); +void QFinalState_new(QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QFinalState_new2(QState* parent, QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); QMetaObject* QFinalState_MetaObject(const QFinalState* self); void* QFinalState_Metacast(QFinalState* self, const char* param1); struct miqt_string QFinalState_Tr(const char* s); struct miqt_string QFinalState_TrUtf8(const char* s); +void QFinalState_OnEntry(QFinalState* self, QEvent* event); +void QFinalState_OnExit(QFinalState* self, QEvent* event); +bool QFinalState_Event(QFinalState* self, QEvent* e); struct miqt_string QFinalState_Tr2(const char* s, const char* c); struct miqt_string QFinalState_Tr3(const char* s, const char* c, int n); struct miqt_string QFinalState_TrUtf82(const char* s, const char* c); struct miqt_string QFinalState_TrUtf83(const char* s, const char* c, int n); -void QFinalState_Delete(QFinalState* self); +void QFinalState_override_virtual_OnEntry(void* self, intptr_t slot); +void QFinalState_virtualbase_OnEntry(void* self, QEvent* event); +void QFinalState_override_virtual_OnExit(void* self, intptr_t slot); +void QFinalState_virtualbase_OnExit(void* self, QEvent* event); +void QFinalState_override_virtual_Event(void* self, intptr_t slot); +bool QFinalState_virtualbase_Event(void* self, QEvent* e); +void QFinalState_Delete(QFinalState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfloat16.cpp b/qt/gen_qfloat16.cpp index f27d6cc6..6439a90c 100644 --- a/qt/gen_qfloat16.cpp +++ b/qt/gen_qfloat16.cpp @@ -2,12 +2,14 @@ #include "gen_qfloat16.h" #include "_cgo_export.h" -qfloat16* qfloat16_new() { - return new qfloat16(); +void qfloat16_new(qfloat16** outptr_qfloat16) { + qfloat16* ret = new qfloat16(); + *outptr_qfloat16 = ret; } -qfloat16* qfloat16_new2(float f) { - return new qfloat16(static_cast(f)); +void qfloat16_new2(float f, qfloat16** outptr_qfloat16) { + qfloat16* ret = new qfloat16(static_cast(f)); + *outptr_qfloat16 = ret; } bool qfloat16_IsInf(const qfloat16* self) { @@ -30,7 +32,11 @@ bool qfloat16_IsNormal(const qfloat16* self) { return self->isNormal(); } -void qfloat16_Delete(qfloat16* self) { - delete self; +void qfloat16_Delete(qfloat16* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfloat16.go b/qt/gen_qfloat16.go index 73315953..f0e51871 100644 --- a/qt/gen_qfloat16.go +++ b/qt/gen_qfloat16.go @@ -14,7 +14,8 @@ import ( ) type qfloat16 struct { - h *C.qfloat16 + h *C.qfloat16 + isSubclass bool } func (this *qfloat16) cPointer() *C.qfloat16 { @@ -31,6 +32,7 @@ func (this *qfloat16) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newqfloat16 constructs the type using only CGO pointers. func newqfloat16(h *C.qfloat16) *qfloat16 { if h == nil { return nil @@ -38,20 +40,33 @@ func newqfloat16(h *C.qfloat16) *qfloat16 { return &qfloat16{h: h} } +// UnsafeNewqfloat16 constructs the type using only unsafe pointers. func UnsafeNewqfloat16(h unsafe.Pointer) *qfloat16 { - return newqfloat16((*C.qfloat16)(h)) + if h == nil { + return nil + } + + return &qfloat16{h: (*C.qfloat16)(h)} } // Newqfloat16 constructs a new qfloat16 object. func Newqfloat16() *qfloat16 { - ret := C.qfloat16_new() - return newqfloat16(ret) + var outptr_qfloat16 *C.qfloat16 = nil + + C.qfloat16_new(&outptr_qfloat16) + ret := newqfloat16(outptr_qfloat16) + ret.isSubclass = true + return ret } // Newqfloat162 constructs a new qfloat16 object. func Newqfloat162(f float32) *qfloat16 { - ret := C.qfloat16_new2((C.float)(f)) - return newqfloat16(ret) + var outptr_qfloat16 *C.qfloat16 = nil + + C.qfloat16_new2((C.float)(f), &outptr_qfloat16) + ret := newqfloat16(outptr_qfloat16) + ret.isSubclass = true + return ret } func (this *qfloat16) IsInf() bool { @@ -76,7 +91,7 @@ func (this *qfloat16) IsNormal() bool { // Delete this object from C++ memory. func (this *qfloat16) Delete() { - C.qfloat16_Delete(this.h) + C.qfloat16_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfloat16.h b/qt/gen_qfloat16.h index 4905b54d..9b60bcda 100644 --- a/qt/gen_qfloat16.h +++ b/qt/gen_qfloat16.h @@ -20,14 +20,14 @@ class qfloat16; typedef struct qfloat16 qfloat16; #endif -qfloat16* qfloat16_new(); -qfloat16* qfloat16_new2(float f); +void qfloat16_new(qfloat16** outptr_qfloat16); +void qfloat16_new2(float f, qfloat16** outptr_qfloat16); bool qfloat16_IsInf(const qfloat16* self); bool qfloat16_IsNaN(const qfloat16* self); bool qfloat16_IsFinite(const qfloat16* self); int qfloat16_FpClassify(const qfloat16* self); bool qfloat16_IsNormal(const qfloat16* self); -void qfloat16_Delete(qfloat16* self); +void qfloat16_Delete(qfloat16* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfocusframe.cpp b/qt/gen_qfocusframe.cpp index f8b511e8..240df60f 100644 --- a/qt/gen_qfocusframe.cpp +++ b/qt/gen_qfocusframe.cpp @@ -1,19 +1,1063 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qfocusframe.h" #include "_cgo_export.h" -QFocusFrame* QFocusFrame_new(QWidget* parent) { - return new QFocusFrame(parent); +class MiqtVirtualQFocusFrame : public virtual QFocusFrame { +public: + + MiqtVirtualQFocusFrame(QWidget* parent): QFocusFrame(parent) {}; + MiqtVirtualQFocusFrame(): QFocusFrame() {}; + + virtual ~MiqtVirtualQFocusFrame() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFocusFrame::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFocusFrame::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QFocusFrame::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QFocusFrame::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QFocusFrame::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QFocusFrame_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QFocusFrame::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QFocusFrame::devType(); + } + + + int callback_return_value = miqt_exec_callback_QFocusFrame_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QFocusFrame::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFocusFrame::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFocusFrame_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFocusFrame::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFocusFrame::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFocusFrame_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFocusFrame::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFocusFrame::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFocusFrame_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFocusFrame::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QFocusFrame::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QFocusFrame_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QFocusFrame::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QFocusFrame::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QFocusFrame_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QFocusFrame::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QFocusFrame::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QFocusFrame_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QFocusFrame::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QFocusFrame::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QFocusFrame::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QFocusFrame::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QFocusFrame::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QFocusFrame::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QFocusFrame::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QFocusFrame::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QFocusFrame::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QFocusFrame::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QFocusFrame::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QFocusFrame::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QFocusFrame::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QFocusFrame::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QFocusFrame::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QFocusFrame::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QFocusFrame::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QFocusFrame::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QFocusFrame::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QFocusFrame::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QFocusFrame::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QFocusFrame::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QFocusFrame::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QFocusFrame::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QFocusFrame::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QFocusFrame::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QFocusFrame::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QFocusFrame::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QFocusFrame::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QFocusFrame::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QFocusFrame::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QFocusFrame::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QFocusFrame::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QFocusFrame::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QFocusFrame::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QFocusFrame::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QFocusFrame::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QFocusFrame::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QFocusFrame::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QFocusFrame::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QFocusFrame::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QFocusFrame::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QFocusFrame::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QFocusFrame::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QFocusFrame::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QFocusFrame::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QFocusFrame::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QFocusFrame::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QFocusFrame::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QFocusFrame::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QFocusFrame_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QFocusFrame::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QFocusFrame::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QFocusFrame_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QFocusFrame::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QFocusFrame::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QFocusFrame_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QFocusFrame::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QFocusFrame::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QFocusFrame_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QFocusFrame::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QFocusFrame::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QFocusFrame_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QFocusFrame::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QFocusFrame::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QFocusFrame_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QFocusFrame::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QFocusFrame::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QFocusFrame_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QFocusFrame::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QFocusFrame::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QFocusFrame::focusNextPrevChild(next); + + } + +}; + +void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(parent); + *outptr_QFocusFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFocusFrame* QFocusFrame_new2() { - return new QFocusFrame(); +void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(); + *outptr_QFocusFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self) { @@ -98,7 +1142,347 @@ struct miqt_string QFocusFrame_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QFocusFrame_Delete(QFocusFrame* self) { - delete self; +void QFocusFrame_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__Event = slot; +} + +bool QFocusFrame_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_Event(e); +} + +void QFocusFrame_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__EventFilter = slot; +} + +bool QFocusFrame_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QFocusFrame_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__PaintEvent = slot; +} + +void QFocusFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_PaintEvent(param1); +} + +void QFocusFrame_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DevType = slot; +} + +int QFocusFrame_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_DevType(); +} + +void QFocusFrame_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__SetVisible = slot; +} + +void QFocusFrame_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_SetVisible(visible); +} + +void QFocusFrame_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__SizeHint = slot; +} + +QSize* QFocusFrame_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_SizeHint(); +} + +void QFocusFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFocusFrame_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFocusFrame_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__HeightForWidth = slot; +} + +int QFocusFrame_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QFocusFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QFocusFrame_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QFocusFrame_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QFocusFrame_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_PaintEngine(); +} + +void QFocusFrame_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MousePressEvent = slot; +} + +void QFocusFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MousePressEvent(event); +} + +void QFocusFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QFocusFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QFocusFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QFocusFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QFocusFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MouseMoveEvent = slot; +} + +void QFocusFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QFocusFrame_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__WheelEvent = slot; +} + +void QFocusFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_WheelEvent(event); +} + +void QFocusFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__KeyPressEvent = slot; +} + +void QFocusFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QFocusFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QFocusFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QFocusFrame_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__FocusInEvent = slot; +} + +void QFocusFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_FocusInEvent(event); +} + +void QFocusFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__FocusOutEvent = slot; +} + +void QFocusFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QFocusFrame_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__EnterEvent = slot; +} + +void QFocusFrame_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_EnterEvent(event); +} + +void QFocusFrame_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__LeaveEvent = slot; +} + +void QFocusFrame_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_LeaveEvent(event); +} + +void QFocusFrame_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MoveEvent = slot; +} + +void QFocusFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MoveEvent(event); +} + +void QFocusFrame_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ResizeEvent = slot; +} + +void QFocusFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ResizeEvent(event); +} + +void QFocusFrame_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__CloseEvent = slot; +} + +void QFocusFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_CloseEvent(event); +} + +void QFocusFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFocusFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QFocusFrame_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__TabletEvent = slot; +} + +void QFocusFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_TabletEvent(event); +} + +void QFocusFrame_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ActionEvent = slot; +} + +void QFocusFrame_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ActionEvent(event); +} + +void QFocusFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DragEnterEvent = slot; +} + +void QFocusFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QFocusFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DragMoveEvent = slot; +} + +void QFocusFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QFocusFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DragLeaveEvent = slot; +} + +void QFocusFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QFocusFrame_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DropEvent = slot; +} + +void QFocusFrame_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DropEvent(event); +} + +void QFocusFrame_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ShowEvent = slot; +} + +void QFocusFrame_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ShowEvent(event); +} + +void QFocusFrame_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__HideEvent = slot; +} + +void QFocusFrame_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_HideEvent(event); +} + +void QFocusFrame_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__NativeEvent = slot; +} + +bool QFocusFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QFocusFrame_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ChangeEvent = slot; +} + +void QFocusFrame_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QFocusFrame_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__Metric = slot; +} + +int QFocusFrame_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_Metric(param1); +} + +void QFocusFrame_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InitPainter = slot; +} + +void QFocusFrame_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_InitPainter(painter); +} + +void QFocusFrame_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QFocusFrame_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_Redirected(offset); +} + +void QFocusFrame_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QFocusFrame_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_SharedPainter(); +} + +void QFocusFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InputMethodEvent = slot; +} + +void QFocusFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QFocusFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QFocusFrame_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QFocusFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QFocusFrame_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QFocusFrame_Delete(QFocusFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfocusframe.go b/qt/gen_qfocusframe.go index 572de804..414c06ee 100644 --- a/qt/gen_qfocusframe.go +++ b/qt/gen_qfocusframe.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFocusFrame struct { - h *C.QFocusFrame + h *C.QFocusFrame + isSubclass bool *QWidget } @@ -32,27 +34,49 @@ func (this *QFocusFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFocusFrame(h *C.QFocusFrame) *QFocusFrame { +// newQFocusFrame constructs the type using only CGO pointers. +func newQFocusFrame(h *C.QFocusFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFocusFrame { if h == nil { return nil } - return &QFocusFrame{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QFocusFrame{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFocusFrame(h unsafe.Pointer) *QFocusFrame { - return newQFocusFrame((*C.QFocusFrame)(h)) +// UnsafeNewQFocusFrame constructs the type using only unsafe pointers. +func UnsafeNewQFocusFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFocusFrame { + if h == nil { + return nil + } + + return &QFocusFrame{h: (*C.QFocusFrame)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFocusFrame constructs a new QFocusFrame object. func NewQFocusFrame(parent *QWidget) *QFocusFrame { - ret := C.QFocusFrame_new(parent.cPointer()) - return newQFocusFrame(ret) + var outptr_QFocusFrame *C.QFocusFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFocusFrame_new(parent.cPointer(), &outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFocusFrame2 constructs a new QFocusFrame object. func NewQFocusFrame2() *QFocusFrame { - ret := C.QFocusFrame_new2() - return newQFocusFrame(ret) + var outptr_QFocusFrame *C.QFocusFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFocusFrame_new2(&outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFocusFrame) MetaObject() *QMetaObject { @@ -88,7 +112,7 @@ func (this *QFocusFrame) SetWidget(widget *QWidget) { } func (this *QFocusFrame) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QFocusFrame_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QFocusFrame_Widget(this.h)), nil, nil) } func QFocusFrame_Tr2(s string, c string) string { @@ -135,9 +159,1001 @@ func QFocusFrame_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFocusFrame) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFocusFrame_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFocusFrame) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFocusFrame_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_Event +func miqt_exec_callback_QFocusFrame_Event(self *C.QFocusFrame, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QFocusFrame_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QFocusFrame) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QFocusFrame_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_EventFilter +func miqt_exec_callback_QFocusFrame_EventFilter(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QFocusFrame_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFocusFrame) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QFocusFrame_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_PaintEvent +func miqt_exec_callback_QFocusFrame_PaintEvent(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DevType() int { + + return (int)(C.QFocusFrame_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QFocusFrame) OnDevType(slot func(super func() int) int) { + C.QFocusFrame_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DevType +func miqt_exec_callback_QFocusFrame_DevType(self *C.QFocusFrame, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_SetVisible(visible bool) { + + C.QFocusFrame_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFocusFrame) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFocusFrame_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_SetVisible +func miqt_exec_callback_QFocusFrame_SetVisible(self *C.QFocusFrame, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFocusFrame_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFocusFrame) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFocusFrame_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_SizeHint +func miqt_exec_callback_QFocusFrame_SizeHint(self *C.QFocusFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFocusFrame_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFocusFrame) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFocusFrame_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MinimumSizeHint +func miqt_exec_callback_QFocusFrame_MinimumSizeHint(self *C.QFocusFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QFocusFrame_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFocusFrame) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QFocusFrame_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_HeightForWidth +func miqt_exec_callback_QFocusFrame_HeightForWidth(self *C.QFocusFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QFocusFrame_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QFocusFrame) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QFocusFrame_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_HasHeightForWidth +func miqt_exec_callback_QFocusFrame_HasHeightForWidth(self *C.QFocusFrame, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QFocusFrame_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QFocusFrame) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QFocusFrame_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_PaintEngine +func miqt_exec_callback_QFocusFrame_PaintEngine(self *C.QFocusFrame, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MousePressEvent +func miqt_exec_callback_QFocusFrame_MousePressEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MouseReleaseEvent +func miqt_exec_callback_QFocusFrame_MouseReleaseEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent +func miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MouseMoveEvent +func miqt_exec_callback_QFocusFrame_MouseMoveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QFocusFrame_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QFocusFrame_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_WheelEvent +func miqt_exec_callback_QFocusFrame_WheelEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QFocusFrame_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFocusFrame_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_KeyPressEvent +func miqt_exec_callback_QFocusFrame_KeyPressEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QFocusFrame_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFocusFrame_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_KeyReleaseEvent +func miqt_exec_callback_QFocusFrame_KeyReleaseEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QFocusFrame_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFocusFrame_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_FocusInEvent +func miqt_exec_callback_QFocusFrame_FocusInEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QFocusFrame_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFocusFrame_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_FocusOutEvent +func miqt_exec_callback_QFocusFrame_FocusOutEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_EnterEvent(event *QEvent) { + + C.QFocusFrame_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFocusFrame_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_EnterEvent +func miqt_exec_callback_QFocusFrame_EnterEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QFocusFrame_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFocusFrame_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_LeaveEvent +func miqt_exec_callback_QFocusFrame_LeaveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QFocusFrame_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QFocusFrame_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MoveEvent +func miqt_exec_callback_QFocusFrame_MoveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QFocusFrame_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QFocusFrame_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ResizeEvent +func miqt_exec_callback_QFocusFrame_ResizeEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QFocusFrame_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QFocusFrame_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_CloseEvent +func miqt_exec_callback_QFocusFrame_CloseEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QFocusFrame_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QFocusFrame_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ContextMenuEvent +func miqt_exec_callback_QFocusFrame_ContextMenuEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QFocusFrame_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QFocusFrame_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_TabletEvent +func miqt_exec_callback_QFocusFrame_TabletEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QFocusFrame_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QFocusFrame_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ActionEvent +func miqt_exec_callback_QFocusFrame_ActionEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QFocusFrame_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QFocusFrame_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DragEnterEvent +func miqt_exec_callback_QFocusFrame_DragEnterEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QFocusFrame_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QFocusFrame_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DragMoveEvent +func miqt_exec_callback_QFocusFrame_DragMoveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QFocusFrame_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QFocusFrame_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DragLeaveEvent +func miqt_exec_callback_QFocusFrame_DragLeaveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QFocusFrame_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QFocusFrame_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DropEvent +func miqt_exec_callback_QFocusFrame_DropEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QFocusFrame_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QFocusFrame_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ShowEvent +func miqt_exec_callback_QFocusFrame_ShowEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QFocusFrame_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QFocusFrame_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_HideEvent +func miqt_exec_callback_QFocusFrame_HideEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QFocusFrame_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QFocusFrame) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QFocusFrame_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_NativeEvent +func miqt_exec_callback_QFocusFrame_NativeEvent(self *C.QFocusFrame, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QFocusFrame_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFocusFrame) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QFocusFrame_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ChangeEvent +func miqt_exec_callback_QFocusFrame_ChangeEvent(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QFocusFrame_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFocusFrame) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QFocusFrame_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_Metric +func miqt_exec_callback_QFocusFrame_Metric(self *C.QFocusFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_InitPainter(painter *QPainter) { + + C.QFocusFrame_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QFocusFrame) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QFocusFrame_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InitPainter +func miqt_exec_callback_QFocusFrame_InitPainter(self *C.QFocusFrame, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QFocusFrame_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QFocusFrame) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QFocusFrame_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_Redirected +func miqt_exec_callback_QFocusFrame_Redirected(self *C.QFocusFrame, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QFocusFrame_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QFocusFrame) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QFocusFrame_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_SharedPainter +func miqt_exec_callback_QFocusFrame_SharedPainter(self *C.QFocusFrame, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QFocusFrame_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFocusFrame) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QFocusFrame_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InputMethodEvent +func miqt_exec_callback_QFocusFrame_InputMethodEvent(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QFocusFrame_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFocusFrame) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QFocusFrame_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InputMethodQuery +func miqt_exec_callback_QFocusFrame_InputMethodQuery(self *C.QFocusFrame, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QFocusFrame_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QFocusFrame) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QFocusFrame_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_FocusNextPrevChild +func miqt_exec_callback_QFocusFrame_FocusNextPrevChild(self *C.QFocusFrame, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFocusFrame) Delete() { - C.QFocusFrame_Delete(this.h) + C.QFocusFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfocusframe.h b/qt/gen_qfocusframe.h index f9c14e07..cef264df 100644 --- a/qt/gen_qfocusframe.h +++ b/qt/gen_qfocusframe.h @@ -15,28 +15,169 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFocusFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFocusFrame QFocusFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QFocusFrame* QFocusFrame_new(QWidget* parent); -QFocusFrame* QFocusFrame_new2(); +void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self); void* QFocusFrame_Metacast(QFocusFrame* self, const char* param1); struct miqt_string QFocusFrame_Tr(const char* s); struct miqt_string QFocusFrame_TrUtf8(const char* s); void QFocusFrame_SetWidget(QFocusFrame* self, QWidget* widget); QWidget* QFocusFrame_Widget(const QFocusFrame* self); +bool QFocusFrame_Event(QFocusFrame* self, QEvent* e); +bool QFocusFrame_EventFilter(QFocusFrame* self, QObject* param1, QEvent* param2); +void QFocusFrame_PaintEvent(QFocusFrame* self, QPaintEvent* param1); struct miqt_string QFocusFrame_Tr2(const char* s, const char* c); struct miqt_string QFocusFrame_Tr3(const char* s, const char* c, int n); struct miqt_string QFocusFrame_TrUtf82(const char* s, const char* c); struct miqt_string QFocusFrame_TrUtf83(const char* s, const char* c, int n); -void QFocusFrame_Delete(QFocusFrame* self); +void QFocusFrame_override_virtual_Event(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_Event(void* self, QEvent* e); +void QFocusFrame_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QFocusFrame_override_virtual_PaintEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QFocusFrame_override_virtual_DevType(void* self, intptr_t slot); +int QFocusFrame_virtualbase_DevType(const void* self); +void QFocusFrame_override_virtual_SetVisible(void* self, intptr_t slot); +void QFocusFrame_virtualbase_SetVisible(void* self, bool visible); +void QFocusFrame_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFocusFrame_virtualbase_SizeHint(const void* self); +void QFocusFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFocusFrame_virtualbase_MinimumSizeHint(const void* self); +void QFocusFrame_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QFocusFrame_virtualbase_HeightForWidth(const void* self, int param1); +void QFocusFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_HasHeightForWidth(const void* self); +void QFocusFrame_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QFocusFrame_virtualbase_PaintEngine(const void* self); +void QFocusFrame_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_WheelEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QFocusFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QFocusFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QFocusFrame_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QFocusFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QFocusFrame_override_virtual_EnterEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_EnterEvent(void* self, QEvent* event); +void QFocusFrame_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_LeaveEvent(void* self, QEvent* event); +void QFocusFrame_override_virtual_MoveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QFocusFrame_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QFocusFrame_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QFocusFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QFocusFrame_override_virtual_TabletEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QFocusFrame_override_virtual_ActionEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QFocusFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QFocusFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QFocusFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QFocusFrame_override_virtual_DropEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DropEvent(void* self, QDropEvent* event); +void QFocusFrame_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QFocusFrame_override_virtual_HideEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_HideEvent(void* self, QHideEvent* event); +void QFocusFrame_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QFocusFrame_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QFocusFrame_override_virtual_Metric(void* self, intptr_t slot); +int QFocusFrame_virtualbase_Metric(const void* self, int param1); +void QFocusFrame_override_virtual_InitPainter(void* self, intptr_t slot); +void QFocusFrame_virtualbase_InitPainter(const void* self, QPainter* painter); +void QFocusFrame_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QFocusFrame_virtualbase_Redirected(const void* self, QPoint* offset); +void QFocusFrame_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QFocusFrame_virtualbase_SharedPainter(const void* self); +void QFocusFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QFocusFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QFocusFrame_virtualbase_InputMethodQuery(const void* self, int param1); +void QFocusFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_FocusNextPrevChild(void* self, bool next); +void QFocusFrame_Delete(QFocusFrame* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfont.cpp b/qt/gen_qfont.cpp index 7b24626a..368cfd8e 100644 --- a/qt/gen_qfont.cpp +++ b/qt/gen_qfont.cpp @@ -8,40 +8,48 @@ #include "gen_qfont.h" #include "_cgo_export.h" -QFont* QFont_new() { - return new QFont(); +void QFont_new(QFont** outptr_QFont) { + QFont* ret = new QFont(); + *outptr_QFont = ret; } -QFont* QFont_new2(struct miqt_string family) { +void QFont_new2(struct miqt_string family, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString); + QFont* ret = new QFont(family_QString); + *outptr_QFont = ret; } -QFont* QFont_new3(QFont* font, QPaintDevice* pd) { - return new QFont(*font, pd); +void QFont_new3(QFont* font, QPaintDevice* pd, QFont** outptr_QFont) { + QFont* ret = new QFont(*font, pd); + *outptr_QFont = ret; } -QFont* QFont_new4(QFont* font, QPaintDevice* pd) { - return new QFont(*font, pd); +void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont) { + QFont* ret = new QFont(*font, pd); + *outptr_QFont = ret; } -QFont* QFont_new5(QFont* font) { - return new QFont(*font); +void QFont_new5(QFont* font, QFont** outptr_QFont) { + QFont* ret = new QFont(*font); + *outptr_QFont = ret; } -QFont* QFont_new6(struct miqt_string family, int pointSize) { +void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString, static_cast(pointSize)); + QFont* ret = new QFont(family_QString, static_cast(pointSize)); + *outptr_QFont = ret; } -QFont* QFont_new7(struct miqt_string family, int pointSize, int weight) { +void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString, static_cast(pointSize), static_cast(weight)); + QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight)); + *outptr_QFont = ret; } -QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic) { +void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); + QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); + *outptr_QFont = ret; } void QFont_Swap(QFont* self, QFont* other) { @@ -489,7 +497,11 @@ void QFont_SetStyleHint2(QFont* self, int param1, int param2) { self->setStyleHint(static_cast(param1), static_cast(param2)); } -void QFont_Delete(QFont* self) { - delete self; +void QFont_Delete(QFont* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfont.go b/qt/gen_qfont.go index ce585a4e..6835744a 100644 --- a/qt/gen_qfont.go +++ b/qt/gen_qfont.go @@ -139,7 +139,8 @@ const ( ) type QFont struct { - h *C.QFont + h *C.QFont + isSubclass bool } func (this *QFont) cPointer() *C.QFont { @@ -156,6 +157,7 @@ func (this *QFont) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFont constructs the type using only CGO pointers. func newQFont(h *C.QFont) *QFont { if h == nil { return nil @@ -163,14 +165,23 @@ func newQFont(h *C.QFont) *QFont { return &QFont{h: h} } +// UnsafeNewQFont constructs the type using only unsafe pointers. func UnsafeNewQFont(h unsafe.Pointer) *QFont { - return newQFont((*C.QFont)(h)) + if h == nil { + return nil + } + + return &QFont{h: (*C.QFont)(h)} } // NewQFont constructs a new QFont object. func NewQFont() *QFont { - ret := C.QFont_new() - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new(&outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont2 constructs a new QFont object. @@ -179,26 +190,42 @@ func NewQFont2(family string) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new2(family_ms) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new2(family_ms, &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont3 constructs a new QFont object. func NewQFont3(font *QFont, pd *QPaintDevice) *QFont { - ret := C.QFont_new3(font.cPointer(), pd.cPointer()) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new3(font.cPointer(), pd.cPointer(), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont4 constructs a new QFont object. func NewQFont4(font *QFont, pd *QPaintDevice) *QFont { - ret := C.QFont_new4(font.cPointer(), pd.cPointer()) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new4(font.cPointer(), pd.cPointer(), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont5 constructs a new QFont object. func NewQFont5(font *QFont) *QFont { - ret := C.QFont_new5(font.cPointer()) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new5(font.cPointer(), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont6 constructs a new QFont object. @@ -207,8 +234,12 @@ func NewQFont6(family string, pointSize int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new6(family_ms, (C.int)(pointSize)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new6(family_ms, (C.int)(pointSize), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont7 constructs a new QFont object. @@ -217,8 +248,12 @@ func NewQFont7(family string, pointSize int, weight int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont8 constructs a new QFont object. @@ -227,8 +262,12 @@ func NewQFont8(family string, pointSize int, weight int, italic bool) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } func (this *QFont) Swap(other *QFont) { @@ -650,7 +689,7 @@ func (this *QFont) SetStyleHint2(param1 QFont__StyleHint, param2 QFont__StyleStr // Delete this object from C++ memory. func (this *QFont) Delete() { - C.QFont_Delete(this.h) + C.QFont_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfont.h b/qt/gen_qfont.h index b7f238e6..c91a6681 100644 --- a/qt/gen_qfont.h +++ b/qt/gen_qfont.h @@ -22,14 +22,14 @@ typedef struct QFont QFont; typedef struct QPaintDevice QPaintDevice; #endif -QFont* QFont_new(); -QFont* QFont_new2(struct miqt_string family); -QFont* QFont_new3(QFont* font, QPaintDevice* pd); -QFont* QFont_new4(QFont* font, QPaintDevice* pd); -QFont* QFont_new5(QFont* font); -QFont* QFont_new6(struct miqt_string family, int pointSize); -QFont* QFont_new7(struct miqt_string family, int pointSize, int weight); -QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic); +void QFont_new(QFont** outptr_QFont); +void QFont_new2(struct miqt_string family, QFont** outptr_QFont); +void QFont_new3(QFont* font, QPaintDevice* pd, QFont** outptr_QFont); +void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont); +void QFont_new5(QFont* font, QFont** outptr_QFont); +void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont); +void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont); +void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont); void QFont_Swap(QFont* self, QFont* other); struct miqt_string QFont_Family(const QFont* self); void QFont_SetFamily(QFont* self, struct miqt_string family); @@ -105,7 +105,7 @@ QFont* QFont_Resolve(const QFont* self, QFont* param1); unsigned int QFont_Resolve2(const QFont* self); void QFont_ResolveWithMask(QFont* self, unsigned int mask); void QFont_SetStyleHint2(QFont* self, int param1, int param2); -void QFont_Delete(QFont* self); +void QFont_Delete(QFont* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfontcombobox.cpp b/qt/gen_qfontcombobox.cpp index 3f984045..b20838ea 100644 --- a/qt/gen_qfontcombobox.cpp +++ b/qt/gen_qfontcombobox.cpp @@ -1,21 +1,529 @@ +#include +#include +#include +#include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include "gen_qfontcombobox.h" #include "_cgo_export.h" -QFontComboBox* QFontComboBox_new(QWidget* parent) { - return new QFontComboBox(parent); +class MiqtVirtualQFontComboBox : public virtual QFontComboBox { +public: + + MiqtVirtualQFontComboBox(QWidget* parent): QFontComboBox(parent) {}; + MiqtVirtualQFontComboBox(): QFontComboBox() {}; + + virtual ~MiqtVirtualQFontComboBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFontComboBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontComboBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFontComboBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFontComboBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFontComboBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFontComboBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFontComboBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontComboBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFontComboBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowPopup = 0; + + // Subclass to allow providing a Go implementation + virtual void showPopup() override { + if (handle__ShowPopup == 0) { + QFontComboBox::showPopup(); + return; + } + + + miqt_exec_callback_QFontComboBox_ShowPopup(this, handle__ShowPopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowPopup() { + + QFontComboBox::showPopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HidePopup = 0; + + // Subclass to allow providing a Go implementation + virtual void hidePopup() override { + if (handle__HidePopup == 0) { + QFontComboBox::hidePopup(); + return; + } + + + miqt_exec_callback_QFontComboBox_HidePopup(this, handle__HidePopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HidePopup() { + + QFontComboBox::hidePopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QFontComboBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QFontComboBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QFontComboBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QFontComboBox::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QFontComboBox::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QFontComboBox::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QFontComboBox::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QFontComboBox::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QFontComboBox::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QFontComboBox::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QFontComboBox::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QFontComboBox::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QFontComboBox::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* e) override { + if (handle__ShowEvent == 0) { + QFontComboBox::showEvent(e); + return; + } + + QShowEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* e) { + + QFontComboBox::showEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* e) override { + if (handle__HideEvent == 0) { + QFontComboBox::hideEvent(e); + return; + } + + QHideEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* e) { + + QFontComboBox::hideEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QFontComboBox::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QFontComboBox::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QFontComboBox::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QFontComboBox::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QFontComboBox::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QFontComboBox::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QFontComboBox::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QFontComboBox::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QFontComboBox::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QFontComboBox::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QFontComboBox::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QFontComboBox::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QFontComboBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QFontComboBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QFontComboBox::inputMethodEvent(param1); + + } + +}; + +void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(parent); + *outptr_QFontComboBox = ret; + *outptr_QComboBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontComboBox* QFontComboBox_new2() { - return new QFontComboBox(); +void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(); + *outptr_QFontComboBox = ret; + *outptr_QComboBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self) { @@ -83,7 +591,7 @@ void QFontComboBox_CurrentFontChanged(QFontComboBox* self, QFont* f) { } void QFontComboBox_connect_CurrentFontChanged(QFontComboBox* self, intptr_t slot) { - QFontComboBox::connect(self, static_cast(&QFontComboBox::currentFontChanged), self, [=](const QFont& f) { + MiqtVirtualQFontComboBox::connect(self, static_cast(&QFontComboBox::currentFontChanged), self, [=](const QFont& f) { const QFont& f_ret = f; // Cast returned reference into pointer QFont* sigval1 = const_cast(&f_ret); @@ -135,7 +643,171 @@ struct miqt_string QFontComboBox_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QFontComboBox_Delete(QFontComboBox* self) { - delete self; +void QFontComboBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QFontComboBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_SizeHint(); +} + +void QFontComboBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__Event = slot; +} + +bool QFontComboBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_Event(e); +} + +void QFontComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFontComboBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFontComboBox_override_virtual_ShowPopup(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ShowPopup = slot; +} + +void QFontComboBox_virtualbase_ShowPopup(void* self) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ShowPopup(); +} + +void QFontComboBox_override_virtual_HidePopup(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__HidePopup = slot; +} + +void QFontComboBox_virtualbase_HidePopup(void* self) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_HidePopup(); +} + +void QFontComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QFontComboBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QFontComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__FocusInEvent = slot; +} + +void QFontComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_FocusInEvent(e); +} + +void QFontComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QFontComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QFontComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ChangeEvent = slot; +} + +void QFontComboBox_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ChangeEvent(e); +} + +void QFontComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ResizeEvent = slot; +} + +void QFontComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ResizeEvent(e); +} + +void QFontComboBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__PaintEvent = slot; +} + +void QFontComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_PaintEvent(e); +} + +void QFontComboBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ShowEvent = slot; +} + +void QFontComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ShowEvent(e); +} + +void QFontComboBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__HideEvent = slot; +} + +void QFontComboBox_virtualbase_HideEvent(void* self, QHideEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_HideEvent(e); +} + +void QFontComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__MousePressEvent = slot; +} + +void QFontComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_MousePressEvent(e); +} + +void QFontComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QFontComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QFontComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QFontComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QFontComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QFontComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QFontComboBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__WheelEvent = slot; +} + +void QFontComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_WheelEvent(e); +} + +void QFontComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFontComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QFontComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QFontComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QFontComboBox_Delete(QFontComboBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfontcombobox.go b/qt/gen_qfontcombobox.go index dc7ba15c..1efa6441 100644 --- a/qt/gen_qfontcombobox.go +++ b/qt/gen_qfontcombobox.go @@ -25,7 +25,8 @@ const ( ) type QFontComboBox struct { - h *C.QFontComboBox + h *C.QFontComboBox + isSubclass bool *QComboBox } @@ -43,27 +44,51 @@ func (this *QFontComboBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFontComboBox(h *C.QFontComboBox) *QFontComboBox { +// newQFontComboBox constructs the type using only CGO pointers. +func newQFontComboBox(h *C.QFontComboBox, h_QComboBox *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontComboBox { if h == nil { return nil } - return &QFontComboBox{h: h, QComboBox: UnsafeNewQComboBox(unsafe.Pointer(h))} + return &QFontComboBox{h: h, + QComboBox: newQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFontComboBox(h unsafe.Pointer) *QFontComboBox { - return newQFontComboBox((*C.QFontComboBox)(h)) +// UnsafeNewQFontComboBox constructs the type using only unsafe pointers. +func UnsafeNewQFontComboBox(h unsafe.Pointer, h_QComboBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontComboBox { + if h == nil { + return nil + } + + return &QFontComboBox{h: (*C.QFontComboBox)(h), + QComboBox: UnsafeNewQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFontComboBox constructs a new QFontComboBox object. func NewQFontComboBox(parent *QWidget) *QFontComboBox { - ret := C.QFontComboBox_new(parent.cPointer()) - return newQFontComboBox(ret) + var outptr_QFontComboBox *C.QFontComboBox = nil + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontComboBox_new(parent.cPointer(), &outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontComboBox2 constructs a new QFontComboBox object. func NewQFontComboBox2() *QFontComboBox { - ret := C.QFontComboBox_new2() - return newQFontComboBox(ret) + var outptr_QFontComboBox *C.QFontComboBox = nil + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontComboBox_new2(&outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFontComboBox) MetaObject() *QMetaObject { @@ -192,9 +217,474 @@ func QFontComboBox_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFontComboBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFontComboBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontComboBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontComboBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_SizeHint +func miqt_exec_callback_QFontComboBox_SizeHint(self *C.QFontComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontComboBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFontComboBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFontComboBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFontComboBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_Event +func miqt_exec_callback_QFontComboBox_Event(self *C.QFontComboBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFontComboBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFontComboBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontComboBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontComboBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_MinimumSizeHint +func miqt_exec_callback_QFontComboBox_MinimumSizeHint(self *C.QFontComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontComboBox) callVirtualBase_ShowPopup() { + + C.QFontComboBox_virtualbase_ShowPopup(unsafe.Pointer(this.h)) + +} +func (this *QFontComboBox) OnShowPopup(slot func(super func())) { + C.QFontComboBox_override_virtual_ShowPopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ShowPopup +func miqt_exec_callback_QFontComboBox_ShowPopup(self *C.QFontComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ShowPopup) + +} + +func (this *QFontComboBox) callVirtualBase_HidePopup() { + + C.QFontComboBox_virtualbase_HidePopup(unsafe.Pointer(this.h)) + +} +func (this *QFontComboBox) OnHidePopup(slot func(super func())) { + C.QFontComboBox_override_virtual_HidePopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_HidePopup +func miqt_exec_callback_QFontComboBox_HidePopup(self *C.QFontComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontComboBox{h: self}).callVirtualBase_HidePopup) + +} + +func (this *QFontComboBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QFontComboBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontComboBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QFontComboBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_InputMethodQuery +func miqt_exec_callback_QFontComboBox_InputMethodQuery(self *C.QFontComboBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFontComboBox) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QFontComboBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QFontComboBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_FocusInEvent +func miqt_exec_callback_QFontComboBox_FocusInEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QFontComboBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QFontComboBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_FocusOutEvent +func miqt_exec_callback_QFontComboBox_FocusOutEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QFontComboBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QFontComboBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ChangeEvent +func miqt_exec_callback_QFontComboBox_ChangeEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QFontComboBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QFontComboBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ResizeEvent +func miqt_exec_callback_QFontComboBox_ResizeEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QFontComboBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QFontComboBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_PaintEvent +func miqt_exec_callback_QFontComboBox_PaintEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ShowEvent(e *QShowEvent) { + + C.QFontComboBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnShowEvent(slot func(super func(e *QShowEvent), e *QShowEvent)) { + C.QFontComboBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ShowEvent +func miqt_exec_callback_QFontComboBox_ShowEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QShowEvent), e *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_HideEvent(e *QHideEvent) { + + C.QFontComboBox_virtualbase_HideEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnHideEvent(slot func(super func(e *QHideEvent), e *QHideEvent)) { + C.QFontComboBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_HideEvent +func miqt_exec_callback_QFontComboBox_HideEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QHideEvent), e *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QFontComboBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QFontComboBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_MousePressEvent +func miqt_exec_callback_QFontComboBox_MousePressEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QFontComboBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QFontComboBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_MouseReleaseEvent +func miqt_exec_callback_QFontComboBox_MouseReleaseEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QFontComboBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QFontComboBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_KeyPressEvent +func miqt_exec_callback_QFontComboBox_KeyPressEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QFontComboBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QFontComboBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_KeyReleaseEvent +func miqt_exec_callback_QFontComboBox_KeyReleaseEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QFontComboBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QFontComboBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_WheelEvent +func miqt_exec_callback_QFontComboBox_WheelEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QFontComboBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QFontComboBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ContextMenuEvent +func miqt_exec_callback_QFontComboBox_ContextMenuEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QFontComboBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontComboBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QFontComboBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_InputMethodEvent +func miqt_exec_callback_QFontComboBox_InputMethodEvent(self *C.QFontComboBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QFontComboBox) Delete() { - C.QFontComboBox_Delete(this.h) + C.QFontComboBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfontcombobox.h b/qt/gen_qfontcombobox.h index f449b9fa..b4b8b036 100644 --- a/qt/gen_qfontcombobox.h +++ b/qt/gen_qfontcombobox.h @@ -15,21 +15,51 @@ extern "C" { #endif #ifdef __cplusplus +class QComboBox; +class QContextMenuEvent; +class QEvent; +class QFocusEvent; class QFont; class QFontComboBox; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QSize; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QComboBox QComboBox; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QFontComboBox QFontComboBox; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QFontComboBox* QFontComboBox_new(QWidget* parent); -QFontComboBox* QFontComboBox_new2(); +void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self); void* QFontComboBox_Metacast(QFontComboBox* self, const char* param1); struct miqt_string QFontComboBox_Tr(const char* s); @@ -43,11 +73,52 @@ QSize* QFontComboBox_SizeHint(const QFontComboBox* self); void QFontComboBox_SetCurrentFont(QFontComboBox* self, QFont* f); void QFontComboBox_CurrentFontChanged(QFontComboBox* self, QFont* f); void QFontComboBox_connect_CurrentFontChanged(QFontComboBox* self, intptr_t slot); +bool QFontComboBox_Event(QFontComboBox* self, QEvent* e); struct miqt_string QFontComboBox_Tr2(const char* s, const char* c); struct miqt_string QFontComboBox_Tr3(const char* s, const char* c, int n); struct miqt_string QFontComboBox_TrUtf82(const char* s, const char* c); struct miqt_string QFontComboBox_TrUtf83(const char* s, const char* c, int n); -void QFontComboBox_Delete(QFontComboBox* self); +void QFontComboBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFontComboBox_virtualbase_SizeHint(const void* self); +void QFontComboBox_override_virtual_Event(void* self, intptr_t slot); +bool QFontComboBox_virtualbase_Event(void* self, QEvent* e); +void QFontComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFontComboBox_virtualbase_MinimumSizeHint(const void* self); +void QFontComboBox_override_virtual_ShowPopup(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ShowPopup(void* self); +void QFontComboBox_override_virtual_HidePopup(void* self, intptr_t slot); +void QFontComboBox_virtualbase_HidePopup(void* self); +void QFontComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QFontComboBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QFontComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QFontComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QFontComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ChangeEvent(void* self, QEvent* e); +void QFontComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QFontComboBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QFontComboBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e); +void QFontComboBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_HideEvent(void* self, QHideEvent* e); +void QFontComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QFontComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QFontComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QFontComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QFontComboBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QFontComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QFontComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QFontComboBox_Delete(QFontComboBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfontdatabase.cpp b/qt/gen_qfontdatabase.cpp index 0acaf2d2..7d05825b 100644 --- a/qt/gen_qfontdatabase.cpp +++ b/qt/gen_qfontdatabase.cpp @@ -10,8 +10,9 @@ #include "gen_qfontdatabase.h" #include "_cgo_export.h" -QFontDatabase* QFontDatabase_new() { - return new QFontDatabase(); +void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase) { + QFontDatabase* ret = new QFontDatabase(); + *outptr_QFontDatabase = ret; } struct miqt_array /* of int */ QFontDatabase_StandardSizes() { @@ -329,7 +330,11 @@ bool QFontDatabase_IsFixedPitch2(const QFontDatabase* self, struct miqt_string f return self->isFixedPitch(family_QString, style_QString); } -void QFontDatabase_Delete(QFontDatabase* self) { - delete self; +void QFontDatabase_Delete(QFontDatabase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfontdatabase.go b/qt/gen_qfontdatabase.go index eb00e162..0b4e2e45 100644 --- a/qt/gen_qfontdatabase.go +++ b/qt/gen_qfontdatabase.go @@ -64,7 +64,8 @@ const ( ) type QFontDatabase struct { - h *C.QFontDatabase + h *C.QFontDatabase + isSubclass bool } func (this *QFontDatabase) cPointer() *C.QFontDatabase { @@ -81,6 +82,7 @@ func (this *QFontDatabase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontDatabase constructs the type using only CGO pointers. func newQFontDatabase(h *C.QFontDatabase) *QFontDatabase { if h == nil { return nil @@ -88,14 +90,23 @@ func newQFontDatabase(h *C.QFontDatabase) *QFontDatabase { return &QFontDatabase{h: h} } +// UnsafeNewQFontDatabase constructs the type using only unsafe pointers. func UnsafeNewQFontDatabase(h unsafe.Pointer) *QFontDatabase { - return newQFontDatabase((*C.QFontDatabase)(h)) + if h == nil { + return nil + } + + return &QFontDatabase{h: (*C.QFontDatabase)(h)} } // NewQFontDatabase constructs a new QFontDatabase object. func NewQFontDatabase() *QFontDatabase { - ret := C.QFontDatabase_new() - return newQFontDatabase(ret) + var outptr_QFontDatabase *C.QFontDatabase = nil + + C.QFontDatabase_new(&outptr_QFontDatabase) + ret := newQFontDatabase(outptr_QFontDatabase) + ret.isSubclass = true + return ret } func QFontDatabase_StandardSizes() []int { @@ -449,7 +460,7 @@ func (this *QFontDatabase) IsFixedPitch2(family string, style string) bool { // Delete this object from C++ memory. func (this *QFontDatabase) Delete() { - C.QFontDatabase_Delete(this.h) + C.QFontDatabase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfontdatabase.h b/qt/gen_qfontdatabase.h index 874786a2..4b7fe55f 100644 --- a/qt/gen_qfontdatabase.h +++ b/qt/gen_qfontdatabase.h @@ -26,7 +26,7 @@ typedef struct QFontDatabase QFontDatabase; typedef struct QFontInfo QFontInfo; #endif -QFontDatabase* QFontDatabase_new(); +void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase); struct miqt_array /* of int */ QFontDatabase_StandardSizes(); struct miqt_array /* of int */ QFontDatabase_WritingSystems(const QFontDatabase* self); struct miqt_array /* of int */ QFontDatabase_WritingSystemsWithFamily(const QFontDatabase* self, struct miqt_string family); @@ -61,7 +61,7 @@ bool QFontDatabase_IsBitmapScalable2(const QFontDatabase* self, struct miqt_stri bool QFontDatabase_IsSmoothlyScalable2(const QFontDatabase* self, struct miqt_string family, struct miqt_string style); bool QFontDatabase_IsScalable2(const QFontDatabase* self, struct miqt_string family, struct miqt_string style); bool QFontDatabase_IsFixedPitch2(const QFontDatabase* self, struct miqt_string family, struct miqt_string style); -void QFontDatabase_Delete(QFontDatabase* self); +void QFontDatabase_Delete(QFontDatabase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfontdialog.cpp b/qt/gen_qfontdialog.cpp index 99a86f16..77f4375f 100644 --- a/qt/gen_qfontdialog.cpp +++ b/qt/gen_qfontdialog.cpp @@ -1,6 +1,16 @@ +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -9,20 +19,403 @@ #include "gen_qfontdialog.h" #include "_cgo_export.h" -QFontDialog* QFontDialog_new(QWidget* parent) { - return new QFontDialog(parent); +class MiqtVirtualQFontDialog : public virtual QFontDialog { +public: + + MiqtVirtualQFontDialog(QWidget* parent): QFontDialog(parent) {}; + MiqtVirtualQFontDialog(): QFontDialog() {}; + MiqtVirtualQFontDialog(const QFont& initial): QFontDialog(initial) {}; + MiqtVirtualQFontDialog(const QFont& initial, QWidget* parent): QFontDialog(initial, parent) {}; + + virtual ~MiqtVirtualQFontDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFontDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFontDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFontDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QFontDialog::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFontDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QFontDialog::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QFontDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QFontDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QFontDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QFontDialog::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QFontDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QFontDialog::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFontDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFontDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFontDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFontDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QFontDialog::open(); + return; + } + + + miqt_exec_callback_QFontDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QFontDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QFontDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QFontDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QFontDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QFontDialog::accept(); + return; + } + + + miqt_exec_callback_QFontDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QFontDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QFontDialog::reject(); + return; + } + + + miqt_exec_callback_QFontDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QFontDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QFontDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QFontDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QFontDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QFontDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QFontDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QFontDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QFontDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QFontDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QFontDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QFontDialog::contextMenuEvent(param1); + + } + +}; + +void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(parent); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontDialog* QFontDialog_new2() { - return new QFontDialog(); +void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontDialog* QFontDialog_new3(QFont* initial) { - return new QFontDialog(*initial); +void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent) { - return new QFontDialog(*initial, parent); +void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial, parent); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFontDialog_MetaObject(const QFontDialog* self) { @@ -101,7 +494,7 @@ void QFontDialog_CurrentFontChanged(QFontDialog* self, QFont* font) { } void QFontDialog_connect_CurrentFontChanged(QFontDialog* self, intptr_t slot) { - QFontDialog::connect(self, static_cast(&QFontDialog::currentFontChanged), self, [=](const QFont& font) { + MiqtVirtualQFontDialog::connect(self, static_cast(&QFontDialog::currentFontChanged), self, [=](const QFont& font) { const QFont& font_ret = font; // Cast returned reference into pointer QFont* sigval1 = const_cast(&font_ret); @@ -114,7 +507,7 @@ void QFontDialog_FontSelected(QFontDialog* self, QFont* font) { } void QFontDialog_connect_FontSelected(QFontDialog* self, intptr_t slot) { - QFontDialog::connect(self, static_cast(&QFontDialog::fontSelected), self, [=](const QFont& font) { + MiqtVirtualQFontDialog::connect(self, static_cast(&QFontDialog::fontSelected), self, [=](const QFont& font) { const QFont& font_ret = font; // Cast returned reference into pointer QFont* sigval1 = const_cast(&font_ret); @@ -188,7 +581,131 @@ QFont* QFontDialog_GetFont5(bool* ok, QFont* initial, QWidget* parent, struct mi return new QFont(QFontDialog::getFont(ok, *initial, parent, title_QString, static_cast(options))); } -void QFontDialog_Delete(QFontDialog* self) { - delete self; +void QFontDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__SetVisible = slot; +} + +void QFontDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QFontDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QFontDialog_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ChangeEvent(event); +} + +void QFontDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Done = slot; +} + +void QFontDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Done(result); +} + +void QFontDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__EventFilter = slot; +} + +bool QFontDialog_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_EventFilter(object, event); +} + +void QFontDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QFontDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFontDialog*)(self) )->virtualbase_SizeHint(); +} + +void QFontDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFontDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFontDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFontDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Open = slot; +} + +void QFontDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Open(); +} + +void QFontDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Exec = slot; +} + +int QFontDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Exec(); +} + +void QFontDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Accept = slot; +} + +void QFontDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Accept(); +} + +void QFontDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Reject = slot; +} + +void QFontDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Reject(); +} + +void QFontDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QFontDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QFontDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__CloseEvent = slot; +} + +void QFontDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QFontDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ShowEvent = slot; +} + +void QFontDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QFontDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QFontDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QFontDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFontDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QFontDialog_Delete(QFontDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfontdialog.go b/qt/gen_qfontdialog.go index c12e5c91..e12f6c71 100644 --- a/qt/gen_qfontdialog.go +++ b/qt/gen_qfontdialog.go @@ -26,7 +26,8 @@ const ( ) type QFontDialog struct { - h *C.QFontDialog + h *C.QFontDialog + isSubclass bool *QDialog } @@ -44,39 +45,79 @@ func (this *QFontDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFontDialog(h *C.QFontDialog) *QFontDialog { +// newQFontDialog constructs the type using only CGO pointers. +func newQFontDialog(h *C.QFontDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontDialog { if h == nil { return nil } - return &QFontDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QFontDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFontDialog(h unsafe.Pointer) *QFontDialog { - return newQFontDialog((*C.QFontDialog)(h)) +// UnsafeNewQFontDialog constructs the type using only unsafe pointers. +func UnsafeNewQFontDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontDialog { + if h == nil { + return nil + } + + return &QFontDialog{h: (*C.QFontDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFontDialog constructs a new QFontDialog object. func NewQFontDialog(parent *QWidget) *QFontDialog { - ret := C.QFontDialog_new(parent.cPointer()) - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new(parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontDialog2 constructs a new QFontDialog object. func NewQFontDialog2() *QFontDialog { - ret := C.QFontDialog_new2() - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new2(&outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontDialog3 constructs a new QFontDialog object. func NewQFontDialog3(initial *QFont) *QFontDialog { - ret := C.QFontDialog_new3(initial.cPointer()) - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new3(initial.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontDialog4 constructs a new QFontDialog object. func NewQFontDialog4(initial *QFont, parent *QWidget) *QFontDialog { - ret := C.QFontDialog_new4(initial.cPointer(), parent.cPointer()) - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFontDialog) MetaObject() *QMetaObject { @@ -283,9 +324,351 @@ func QFontDialog_GetFont5(ok *bool, initial *QFont, parent *QWidget, title strin return _goptr } +func (this *QFontDialog) callVirtualBase_SetVisible(visible bool) { + + C.QFontDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFontDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFontDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_SetVisible +func miqt_exec_callback_QFontDialog_SetVisible(self *C.QFontDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFontDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QFontDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFontDialog) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFontDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ChangeEvent +func miqt_exec_callback_QFontDialog_ChangeEvent(self *C.QFontDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_Done(result int) { + + C.QFontDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QFontDialog) OnDone(slot func(super func(result int), result int)) { + C.QFontDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Done +func miqt_exec_callback_QFontDialog_Done(self *C.QFontDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QFontDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QFontDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QFontDialog) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QFontDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_EventFilter +func miqt_exec_callback_QFontDialog_EventFilter(self *C.QFontDialog, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFontDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFontDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_SizeHint +func miqt_exec_callback_QFontDialog_SizeHint(self *C.QFontDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFontDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_MinimumSizeHint +func miqt_exec_callback_QFontDialog_MinimumSizeHint(self *C.QFontDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontDialog) callVirtualBase_Open() { + + C.QFontDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QFontDialog) OnOpen(slot func(super func())) { + C.QFontDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Open +func miqt_exec_callback_QFontDialog_Open(self *C.QFontDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QFontDialog) callVirtualBase_Exec() int { + + return (int)(C.QFontDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QFontDialog) OnExec(slot func(super func() int) int) { + C.QFontDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Exec +func miqt_exec_callback_QFontDialog_Exec(self *C.QFontDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QFontDialog) callVirtualBase_Accept() { + + C.QFontDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QFontDialog) OnAccept(slot func(super func())) { + C.QFontDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Accept +func miqt_exec_callback_QFontDialog_Accept(self *C.QFontDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QFontDialog) callVirtualBase_Reject() { + + C.QFontDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QFontDialog) OnReject(slot func(super func())) { + C.QFontDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Reject +func miqt_exec_callback_QFontDialog_Reject(self *C.QFontDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QFontDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QFontDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QFontDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_KeyPressEvent +func miqt_exec_callback_QFontDialog_KeyPressEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QFontDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QFontDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_CloseEvent +func miqt_exec_callback_QFontDialog_CloseEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QFontDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QFontDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ShowEvent +func miqt_exec_callback_QFontDialog_ShowEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QFontDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QFontDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ResizeEvent +func miqt_exec_callback_QFontDialog_ResizeEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QFontDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QFontDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ContextMenuEvent +func miqt_exec_callback_QFontDialog_ContextMenuEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QFontDialog) Delete() { - C.QFontDialog_Delete(this.h) + C.QFontDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfontdialog.h b/qt/gen_qfontdialog.h index 2f968d5f..da08ca8b 100644 --- a/qt/gen_qfontdialog.h +++ b/qt/gen_qfontdialog.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; class QFont; class QFontDialog; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFontDialog QFontDialog; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QFontDialog* QFontDialog_new(QWidget* parent); -QFontDialog* QFontDialog_new2(); -QFontDialog* QFontDialog_new3(QFont* initial); -QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent); +void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFontDialog_MetaObject(const QFontDialog* self); void* QFontDialog_Metacast(QFontDialog* self, const char* param1); struct miqt_string QFontDialog_Tr(const char* s); @@ -48,6 +68,9 @@ void QFontDialog_CurrentFontChanged(QFontDialog* self, QFont* font); void QFontDialog_connect_CurrentFontChanged(QFontDialog* self, intptr_t slot); void QFontDialog_FontSelected(QFontDialog* self, QFont* font); void QFontDialog_connect_FontSelected(QFontDialog* self, intptr_t slot); +void QFontDialog_ChangeEvent(QFontDialog* self, QEvent* event); +void QFontDialog_Done(QFontDialog* self, int result); +bool QFontDialog_EventFilter(QFontDialog* self, QObject* object, QEvent* event); struct miqt_string QFontDialog_Tr2(const char* s, const char* c); struct miqt_string QFontDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QFontDialog_TrUtf82(const char* s, const char* c); @@ -57,7 +80,37 @@ QFont* QFontDialog_GetFont22(bool* ok, QWidget* parent); QFont* QFontDialog_GetFont3(bool* ok, QFont* initial, QWidget* parent); QFont* QFontDialog_GetFont4(bool* ok, QFont* initial, QWidget* parent, struct miqt_string title); QFont* QFontDialog_GetFont5(bool* ok, QFont* initial, QWidget* parent, struct miqt_string title, int options); -void QFontDialog_Delete(QFontDialog* self); +void QFontDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QFontDialog_virtualbase_SetVisible(void* self, bool visible); +void QFontDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ChangeEvent(void* self, QEvent* event); +void QFontDialog_override_virtual_Done(void* self, intptr_t slot); +void QFontDialog_virtualbase_Done(void* self, int result); +void QFontDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFontDialog_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QFontDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFontDialog_virtualbase_SizeHint(const void* self); +void QFontDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFontDialog_virtualbase_MinimumSizeHint(const void* self); +void QFontDialog_override_virtual_Open(void* self, intptr_t slot); +void QFontDialog_virtualbase_Open(void* self); +void QFontDialog_override_virtual_Exec(void* self, intptr_t slot); +int QFontDialog_virtualbase_Exec(void* self); +void QFontDialog_override_virtual_Accept(void* self, intptr_t slot); +void QFontDialog_virtualbase_Accept(void* self); +void QFontDialog_override_virtual_Reject(void* self, intptr_t slot); +void QFontDialog_virtualbase_Reject(void* self); +void QFontDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QFontDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QFontDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QFontDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QFontDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QFontDialog_Delete(QFontDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfontinfo.cpp b/qt/gen_qfontinfo.cpp index 37fcac2f..90fa5e65 100644 --- a/qt/gen_qfontinfo.cpp +++ b/qt/gen_qfontinfo.cpp @@ -7,12 +7,14 @@ #include "gen_qfontinfo.h" #include "_cgo_export.h" -QFontInfo* QFontInfo_new(QFont* param1) { - return new QFontInfo(*param1); +void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo) { + QFontInfo* ret = new QFontInfo(*param1); + *outptr_QFontInfo = ret; } -QFontInfo* QFontInfo_new2(QFontInfo* param1) { - return new QFontInfo(*param1); +void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo) { + QFontInfo* ret = new QFontInfo(*param1); + *outptr_QFontInfo = ret; } void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1) { @@ -104,7 +106,11 @@ bool QFontInfo_ExactMatch(const QFontInfo* self) { return self->exactMatch(); } -void QFontInfo_Delete(QFontInfo* self) { - delete self; +void QFontInfo_Delete(QFontInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfontinfo.go b/qt/gen_qfontinfo.go index a5bbc69f..6fe585be 100644 --- a/qt/gen_qfontinfo.go +++ b/qt/gen_qfontinfo.go @@ -14,7 +14,8 @@ import ( ) type QFontInfo struct { - h *C.QFontInfo + h *C.QFontInfo + isSubclass bool } func (this *QFontInfo) cPointer() *C.QFontInfo { @@ -31,6 +32,7 @@ func (this *QFontInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontInfo constructs the type using only CGO pointers. func newQFontInfo(h *C.QFontInfo) *QFontInfo { if h == nil { return nil @@ -38,20 +40,33 @@ func newQFontInfo(h *C.QFontInfo) *QFontInfo { return &QFontInfo{h: h} } +// UnsafeNewQFontInfo constructs the type using only unsafe pointers. func UnsafeNewQFontInfo(h unsafe.Pointer) *QFontInfo { - return newQFontInfo((*C.QFontInfo)(h)) + if h == nil { + return nil + } + + return &QFontInfo{h: (*C.QFontInfo)(h)} } // NewQFontInfo constructs a new QFontInfo object. func NewQFontInfo(param1 *QFont) *QFontInfo { - ret := C.QFontInfo_new(param1.cPointer()) - return newQFontInfo(ret) + var outptr_QFontInfo *C.QFontInfo = nil + + C.QFontInfo_new(param1.cPointer(), &outptr_QFontInfo) + ret := newQFontInfo(outptr_QFontInfo) + ret.isSubclass = true + return ret } // NewQFontInfo2 constructs a new QFontInfo object. func NewQFontInfo2(param1 *QFontInfo) *QFontInfo { - ret := C.QFontInfo_new2(param1.cPointer()) - return newQFontInfo(ret) + var outptr_QFontInfo *C.QFontInfo = nil + + C.QFontInfo_new2(param1.cPointer(), &outptr_QFontInfo) + ret := newQFontInfo(outptr_QFontInfo) + ret.isSubclass = true + return ret } func (this *QFontInfo) OperatorAssign(param1 *QFontInfo) { @@ -134,7 +149,7 @@ func (this *QFontInfo) ExactMatch() bool { // Delete this object from C++ memory. func (this *QFontInfo) Delete() { - C.QFontInfo_Delete(this.h) + C.QFontInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfontinfo.h b/qt/gen_qfontinfo.h index fac66c28..21c7a492 100644 --- a/qt/gen_qfontinfo.h +++ b/qt/gen_qfontinfo.h @@ -22,8 +22,8 @@ typedef struct QFont QFont; typedef struct QFontInfo QFontInfo; #endif -QFontInfo* QFontInfo_new(QFont* param1); -QFontInfo* QFontInfo_new2(QFontInfo* param1); +void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo); +void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo); void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1); void QFontInfo_Swap(QFontInfo* self, QFontInfo* other); struct miqt_string QFontInfo_Family(const QFontInfo* self); @@ -42,7 +42,7 @@ bool QFontInfo_FixedPitch(const QFontInfo* self); int QFontInfo_StyleHint(const QFontInfo* self); bool QFontInfo_RawMode(const QFontInfo* self); bool QFontInfo_ExactMatch(const QFontInfo* self); -void QFontInfo_Delete(QFontInfo* self); +void QFontInfo_Delete(QFontInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfontmetrics.cpp b/qt/gen_qfontmetrics.cpp index 37955539..351160df 100644 --- a/qt/gen_qfontmetrics.cpp +++ b/qt/gen_qfontmetrics.cpp @@ -14,16 +14,19 @@ #include "gen_qfontmetrics.h" #include "_cgo_export.h" -QFontMetrics* QFontMetrics_new(QFont* param1) { - return new QFontMetrics(*param1); +void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics) { + QFontMetrics* ret = new QFontMetrics(*param1); + *outptr_QFontMetrics = ret; } -QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd) { - return new QFontMetrics(*font, pd); +void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics) { + QFontMetrics* ret = new QFontMetrics(*font, pd); + *outptr_QFontMetrics = ret; } -QFontMetrics* QFontMetrics_new3(QFontMetrics* param1) { - return new QFontMetrics(*param1); +void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics) { + QFontMetrics* ret = new QFontMetrics(*param1); + *outptr_QFontMetrics = ret; } void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1) { @@ -244,24 +247,32 @@ struct miqt_string QFontMetrics_ElidedText4(const QFontMetrics* self, struct miq return _ms; } -void QFontMetrics_Delete(QFontMetrics* self) { - delete self; +void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QFontMetricsF* QFontMetricsF_new(QFont* font) { - return new QFontMetricsF(*font); +void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*font); + *outptr_QFontMetricsF = ret; } -QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd) { - return new QFontMetricsF(*font, pd); +void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*font, pd); + *outptr_QFontMetricsF = ret; } -QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1) { - return new QFontMetricsF(*param1); +void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*param1); + *outptr_QFontMetricsF = ret; } -QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1) { - return new QFontMetricsF(*param1); +void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*param1); + *outptr_QFontMetricsF = ret; } void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1) { @@ -478,7 +489,11 @@ struct miqt_string QFontMetricsF_ElidedText4(const QFontMetricsF* self, struct m return _ms; } -void QFontMetricsF_Delete(QFontMetricsF* self) { - delete self; +void QFontMetricsF_Delete(QFontMetricsF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfontmetrics.go b/qt/gen_qfontmetrics.go index 0050c6b8..cd880e8a 100644 --- a/qt/gen_qfontmetrics.go +++ b/qt/gen_qfontmetrics.go @@ -14,7 +14,8 @@ import ( ) type QFontMetrics struct { - h *C.QFontMetrics + h *C.QFontMetrics + isSubclass bool } func (this *QFontMetrics) cPointer() *C.QFontMetrics { @@ -31,6 +32,7 @@ func (this *QFontMetrics) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontMetrics constructs the type using only CGO pointers. func newQFontMetrics(h *C.QFontMetrics) *QFontMetrics { if h == nil { return nil @@ -38,26 +40,43 @@ func newQFontMetrics(h *C.QFontMetrics) *QFontMetrics { return &QFontMetrics{h: h} } +// UnsafeNewQFontMetrics constructs the type using only unsafe pointers. func UnsafeNewQFontMetrics(h unsafe.Pointer) *QFontMetrics { - return newQFontMetrics((*C.QFontMetrics)(h)) + if h == nil { + return nil + } + + return &QFontMetrics{h: (*C.QFontMetrics)(h)} } // NewQFontMetrics constructs a new QFontMetrics object. func NewQFontMetrics(param1 *QFont) *QFontMetrics { - ret := C.QFontMetrics_new(param1.cPointer()) - return newQFontMetrics(ret) + var outptr_QFontMetrics *C.QFontMetrics = nil + + C.QFontMetrics_new(param1.cPointer(), &outptr_QFontMetrics) + ret := newQFontMetrics(outptr_QFontMetrics) + ret.isSubclass = true + return ret } // NewQFontMetrics2 constructs a new QFontMetrics object. func NewQFontMetrics2(font *QFont, pd *QPaintDevice) *QFontMetrics { - ret := C.QFontMetrics_new2(font.cPointer(), pd.cPointer()) - return newQFontMetrics(ret) + var outptr_QFontMetrics *C.QFontMetrics = nil + + C.QFontMetrics_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetrics) + ret := newQFontMetrics(outptr_QFontMetrics) + ret.isSubclass = true + return ret } // NewQFontMetrics3 constructs a new QFontMetrics object. func NewQFontMetrics3(param1 *QFontMetrics) *QFontMetrics { - ret := C.QFontMetrics_new3(param1.cPointer()) - return newQFontMetrics(ret) + var outptr_QFontMetrics *C.QFontMetrics = nil + + C.QFontMetrics_new3(param1.cPointer(), &outptr_QFontMetrics) + ret := newQFontMetrics(outptr_QFontMetrics) + ret.isSubclass = true + return ret } func (this *QFontMetrics) OperatorAssign(param1 *QFontMetrics) { @@ -364,7 +383,7 @@ func (this *QFontMetrics) ElidedText4(text string, mode TextElideMode, width int // Delete this object from C++ memory. func (this *QFontMetrics) Delete() { - C.QFontMetrics_Delete(this.h) + C.QFontMetrics_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -377,7 +396,8 @@ func (this *QFontMetrics) GoGC() { } type QFontMetricsF struct { - h *C.QFontMetricsF + h *C.QFontMetricsF + isSubclass bool } func (this *QFontMetricsF) cPointer() *C.QFontMetricsF { @@ -394,6 +414,7 @@ func (this *QFontMetricsF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontMetricsF constructs the type using only CGO pointers. func newQFontMetricsF(h *C.QFontMetricsF) *QFontMetricsF { if h == nil { return nil @@ -401,32 +422,53 @@ func newQFontMetricsF(h *C.QFontMetricsF) *QFontMetricsF { return &QFontMetricsF{h: h} } +// UnsafeNewQFontMetricsF constructs the type using only unsafe pointers. func UnsafeNewQFontMetricsF(h unsafe.Pointer) *QFontMetricsF { - return newQFontMetricsF((*C.QFontMetricsF)(h)) + if h == nil { + return nil + } + + return &QFontMetricsF{h: (*C.QFontMetricsF)(h)} } // NewQFontMetricsF constructs a new QFontMetricsF object. func NewQFontMetricsF(font *QFont) *QFontMetricsF { - ret := C.QFontMetricsF_new(font.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new(font.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } // NewQFontMetricsF2 constructs a new QFontMetricsF object. func NewQFontMetricsF2(font *QFont, pd *QPaintDevice) *QFontMetricsF { - ret := C.QFontMetricsF_new2(font.cPointer(), pd.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } // NewQFontMetricsF3 constructs a new QFontMetricsF object. func NewQFontMetricsF3(param1 *QFontMetrics) *QFontMetricsF { - ret := C.QFontMetricsF_new3(param1.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new3(param1.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } // NewQFontMetricsF4 constructs a new QFontMetricsF object. func NewQFontMetricsF4(param1 *QFontMetricsF) *QFontMetricsF { - ret := C.QFontMetricsF_new4(param1.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new4(param1.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } func (this *QFontMetricsF) OperatorAssign(param1 *QFontMetricsF) { @@ -680,7 +722,7 @@ func (this *QFontMetricsF) ElidedText4(text string, mode TextElideMode, width fl // Delete this object from C++ memory. func (this *QFontMetricsF) Delete() { - C.QFontMetricsF_Delete(this.h) + C.QFontMetricsF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfontmetrics.h b/qt/gen_qfontmetrics.h index ab7c1b03..131c4938 100644 --- a/qt/gen_qfontmetrics.h +++ b/qt/gen_qfontmetrics.h @@ -36,9 +36,9 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QFontMetrics* QFontMetrics_new(QFont* param1); -QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd); -QFontMetrics* QFontMetrics_new3(QFontMetrics* param1); +void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics); +void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics); +void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics); void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1); void QFontMetrics_Swap(QFontMetrics* self, QFontMetrics* other); int QFontMetrics_Ascent(const QFontMetrics* self); @@ -85,12 +85,12 @@ QRect* QFontMetrics_BoundingRect8(const QFontMetrics* self, int x, int y, int w, QSize* QFontMetrics_Size3(const QFontMetrics* self, int flags, struct miqt_string str, int tabstops); QSize* QFontMetrics_Size4(const QFontMetrics* self, int flags, struct miqt_string str, int tabstops, int* tabarray); struct miqt_string QFontMetrics_ElidedText4(const QFontMetrics* self, struct miqt_string text, int mode, int width, int flags); -void QFontMetrics_Delete(QFontMetrics* self); +void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass); -QFontMetricsF* QFontMetricsF_new(QFont* font); -QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd); -QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1); -QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1); +void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF); +void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF); +void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF); +void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF); void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1); void QFontMetricsF_OperatorAssignWithQFontMetrics(QFontMetricsF* self, QFontMetrics* param1); void QFontMetricsF_Swap(QFontMetricsF* self, QFontMetricsF* other); @@ -132,7 +132,7 @@ QRectF* QFontMetricsF_BoundingRect5(const QFontMetricsF* self, QRectF* r, int fl QSizeF* QFontMetricsF_Size3(const QFontMetricsF* self, int flags, struct miqt_string str, int tabstops); QSizeF* QFontMetricsF_Size4(const QFontMetricsF* self, int flags, struct miqt_string str, int tabstops, int* tabarray); struct miqt_string QFontMetricsF_ElidedText4(const QFontMetricsF* self, struct miqt_string text, int mode, double width, int flags); -void QFontMetricsF_Delete(QFontMetricsF* self); +void QFontMetricsF_Delete(QFontMetricsF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qformlayout.cpp b/qt/gen_qformlayout.cpp index 40ad3022..3822e05d 100644 --- a/qt/gen_qformlayout.cpp +++ b/qt/gen_qformlayout.cpp @@ -1,8 +1,10 @@ +#include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QFormLayout__TakeRowResult #include #include #include +#include #include #include #include @@ -13,12 +15,441 @@ #include "gen_qformlayout.h" #include "_cgo_export.h" -QFormLayout* QFormLayout_new(QWidget* parent) { - return new QFormLayout(parent); +class MiqtVirtualQFormLayout : public virtual QFormLayout { +public: + + MiqtVirtualQFormLayout(QWidget* parent): QFormLayout(parent) {}; + MiqtVirtualQFormLayout(): QFormLayout() {}; + + virtual ~MiqtVirtualQFormLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* item) override { + if (handle__AddItem == 0) { + QFormLayout::addItem(item); + return; + } + + QLayoutItem* sigval1 = item; + + miqt_exec_callback_QFormLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* item) { + + QFormLayout::addItem(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAtWithIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int index) const override { + if (handle__ItemAtWithIndex == 0) { + return QFormLayout::itemAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QFormLayout_ItemAtWithIndex(const_cast(this), handle__ItemAtWithIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAtWithIndex(int index) const { + + return QFormLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int index) override { + if (handle__TakeAt == 0) { + return QFormLayout::takeAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QFormLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int index) { + + return QFormLayout::takeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& rect) override { + if (handle__SetGeometry == 0) { + QFormLayout::setGeometry(rect); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QFormLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* rect) { + + QFormLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QFormLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFormLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QFormLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFormLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFormLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFormLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QFormLayout::invalidate(); + return; + } + + + miqt_exec_callback_QFormLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QFormLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QFormLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QFormLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QFormLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QFormLayout::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QFormLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QFormLayout::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QFormLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QFormLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QFormLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QFormLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QFormLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QFormLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QFormLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QFormLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFormLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QFormLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QFormLayout::indexOf(param1); + } + + QWidget* sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QFormLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QFormLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QFormLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QFormLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QFormLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QFormLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QFormLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QFormLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QFormLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QFormLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QFormLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QFormLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QFormLayout::childEvent(e); + + } + +}; + +void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(parent); + *outptr_QFormLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QFormLayout* QFormLayout_new2() { - return new QFormLayout(); +void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(); + *outptr_QFormLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QFormLayout_MetaObject(const QFormLayout* self) { @@ -304,11 +735,163 @@ struct miqt_string QFormLayout_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QFormLayout_Delete(QFormLayout* self) { - delete self; +void QFormLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__AddItem = slot; +} + +void QFormLayout_virtualbase_AddItem(void* self, QLayoutItem* item) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_AddItem(item); +} + +void QFormLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ItemAtWithIndex = slot; +} + +QLayoutItem* QFormLayout_virtualbase_ItemAtWithIndex(const void* self, int index) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_ItemAtWithIndex(index); +} + +void QFormLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QFormLayout_virtualbase_TakeAt(void* self, int index) { + return ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_TakeAt(index); +} + +void QFormLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__SetGeometry = slot; +} + +void QFormLayout_virtualbase_SetGeometry(void* self, QRect* rect) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QFormLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QFormLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QFormLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QFormLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_SizeHint(); +} + +void QFormLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Invalidate = slot; +} + +void QFormLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_Invalidate(); +} + +void QFormLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QFormLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QFormLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QFormLayout_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_HeightForWidth(width); +} + +void QFormLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QFormLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QFormLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Count = slot; +} + +int QFormLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_Count(); +} + +void QFormLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QFormLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_Geometry(); +} + +void QFormLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QFormLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QFormLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__IndexOf = slot; +} + +int QFormLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QFormLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QFormLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QFormLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ControlTypes = slot; +} + +int QFormLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QFormLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QFormLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_Layout(); +} + +void QFormLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ChildEvent = slot; +} + +void QFormLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QFormLayout_Delete(QFormLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self) { - delete self; +void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qformlayout.go b/qt/gen_qformlayout.go index ff6cf7e5..346a6698 100644 --- a/qt/gen_qformlayout.go +++ b/qt/gen_qformlayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -38,7 +39,8 @@ const ( ) type QFormLayout struct { - h *C.QFormLayout + h *C.QFormLayout + isSubclass bool *QLayout } @@ -56,27 +58,49 @@ func (this *QFormLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFormLayout(h *C.QFormLayout) *QFormLayout { +// newQFormLayout constructs the type using only CGO pointers. +func newQFormLayout(h *C.QFormLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QFormLayout { if h == nil { return nil } - return &QFormLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QFormLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQFormLayout(h unsafe.Pointer) *QFormLayout { - return newQFormLayout((*C.QFormLayout)(h)) +// UnsafeNewQFormLayout constructs the type using only unsafe pointers. +func UnsafeNewQFormLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QFormLayout { + if h == nil { + return nil + } + + return &QFormLayout{h: (*C.QFormLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQFormLayout constructs a new QFormLayout object. func NewQFormLayout(parent *QWidget) *QFormLayout { - ret := C.QFormLayout_new(parent.cPointer()) - return newQFormLayout(ret) + var outptr_QFormLayout *C.QFormLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QFormLayout_new(parent.cPointer(), &outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQFormLayout2 constructs a new QFormLayout object. func NewQFormLayout2() *QFormLayout { - ret := C.QFormLayout_new2() - return newQFormLayout(ret) + var outptr_QFormLayout *C.QFormLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QFormLayout_new2(&outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QFormLayout) MetaObject() *QMetaObject { @@ -277,11 +301,11 @@ func (this *QFormLayout) ItemAt(row int, role QFormLayout__ItemRole) *QLayoutIte } func (this *QFormLayout) LabelForField(field *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForField(this.h, field.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForField(this.h, field.cPointer())), nil, nil) } func (this *QFormLayout) LabelForFieldWithField(field *QLayout) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer())), nil, nil) } func (this *QFormLayout) AddItem(item *QLayoutItem) { @@ -382,9 +406,427 @@ func QFormLayout_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFormLayout) callVirtualBase_AddItem(item *QLayoutItem) { + + C.QFormLayout_virtualbase_AddItem(unsafe.Pointer(this.h), item.cPointer()) + +} +func (this *QFormLayout) OnAddItem(slot func(super func(item *QLayoutItem), item *QLayoutItem)) { + C.QFormLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_AddItem +func miqt_exec_callback_QFormLayout_AddItem(self *C.QFormLayout, cb C.intptr_t, item *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QLayoutItem), item *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(item)) + + gofunc((&QFormLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QFormLayout) callVirtualBase_ItemAtWithIndex(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QFormLayout_virtualbase_ItemAtWithIndex(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QFormLayout) OnItemAtWithIndex(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QFormLayout_override_virtual_ItemAtWithIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ItemAtWithIndex +func miqt_exec_callback_QFormLayout_ItemAtWithIndex(self *C.QFormLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ItemAtWithIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_TakeAt(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QFormLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QFormLayout) OnTakeAt(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QFormLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_TakeAt +func miqt_exec_callback_QFormLayout_TakeAt(self *C.QFormLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_SetGeometry(rect *QRect) { + + C.QFormLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QFormLayout) OnSetGeometry(slot func(super func(rect *QRect), rect *QRect)) { + C.QFormLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_SetGeometry +func miqt_exec_callback_QFormLayout_SetGeometry(self *C.QFormLayout, cb C.intptr_t, rect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect), rect *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + + gofunc((&QFormLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QFormLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QFormLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QFormLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_MinimumSize +func miqt_exec_callback_QFormLayout_MinimumSize(self *C.QFormLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFormLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFormLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_SizeHint +func miqt_exec_callback_QFormLayout_SizeHint(self *C.QFormLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_Invalidate() { + + C.QFormLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QFormLayout) OnInvalidate(slot func(super func())) { + C.QFormLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Invalidate +func miqt_exec_callback_QFormLayout_Invalidate(self *C.QFormLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFormLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QFormLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QFormLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QFormLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_HasHeightForWidth +func miqt_exec_callback_QFormLayout_HasHeightForWidth(self *C.QFormLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QFormLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QFormLayout) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QFormLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_HeightForWidth +func miqt_exec_callback_QFormLayout_HeightForWidth(self *C.QFormLayout, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QFormLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QFormLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ExpandingDirections +func miqt_exec_callback_QFormLayout_ExpandingDirections(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_Count() int { + + return (int)(C.QFormLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnCount(slot func(super func() int) int) { + C.QFormLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Count +func miqt_exec_callback_QFormLayout_Count(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QFormLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QFormLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Geometry +func miqt_exec_callback_QFormLayout_Geometry(self *C.QFormLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QFormLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QFormLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_MaximumSize +func miqt_exec_callback_QFormLayout_MaximumSize(self *C.QFormLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QFormLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QFormLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QFormLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_IndexOf +func miqt_exec_callback_QFormLayout_IndexOf(self *C.QFormLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QFormLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QFormLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_IsEmpty +func miqt_exec_callback_QFormLayout_IsEmpty(self *C.QFormLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QFormLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QFormLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ControlTypes +func miqt_exec_callback_QFormLayout_ControlTypes(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QFormLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QFormLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QFormLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Layout +func miqt_exec_callback_QFormLayout_Layout(self *C.QFormLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QFormLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFormLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QFormLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ChildEvent +func miqt_exec_callback_QFormLayout_ChildEvent(self *C.QFormLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QFormLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QFormLayout) Delete() { - C.QFormLayout_Delete(this.h) + C.QFormLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -397,7 +839,8 @@ func (this *QFormLayout) GoGC() { } type QFormLayout__TakeRowResult struct { - h *C.QFormLayout__TakeRowResult + h *C.QFormLayout__TakeRowResult + isSubclass bool } func (this *QFormLayout__TakeRowResult) cPointer() *C.QFormLayout__TakeRowResult { @@ -414,6 +857,7 @@ func (this *QFormLayout__TakeRowResult) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFormLayout__TakeRowResult constructs the type using only CGO pointers. func newQFormLayout__TakeRowResult(h *C.QFormLayout__TakeRowResult) *QFormLayout__TakeRowResult { if h == nil { return nil @@ -421,13 +865,18 @@ func newQFormLayout__TakeRowResult(h *C.QFormLayout__TakeRowResult) *QFormLayout return &QFormLayout__TakeRowResult{h: h} } +// UnsafeNewQFormLayout__TakeRowResult constructs the type using only unsafe pointers. func UnsafeNewQFormLayout__TakeRowResult(h unsafe.Pointer) *QFormLayout__TakeRowResult { - return newQFormLayout__TakeRowResult((*C.QFormLayout__TakeRowResult)(h)) + if h == nil { + return nil + } + + return &QFormLayout__TakeRowResult{h: (*C.QFormLayout__TakeRowResult)(h)} } // Delete this object from C++ memory. func (this *QFormLayout__TakeRowResult) Delete() { - C.QFormLayout__TakeRowResult_Delete(this.h) + C.QFormLayout__TakeRowResult_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qformlayout.h b/qt/gen_qformlayout.h index 269f5dcd..d855af7d 100644 --- a/qt/gen_qformlayout.h +++ b/qt/gen_qformlayout.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QFormLayout; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QFormLayout__TakeRowResult) typedef QFormLayout::TakeRowResult QFormLayout__TakeRowResult; @@ -24,22 +25,25 @@ class QFormLayout__TakeRowResult; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QFormLayout QFormLayout; typedef struct QFormLayout__TakeRowResult QFormLayout__TakeRowResult; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QFormLayout* QFormLayout_new(QWidget* parent); -QFormLayout* QFormLayout_new2(); +void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QFormLayout_MetaObject(const QFormLayout* self); void* QFormLayout_Metacast(QFormLayout* self, const char* param1); struct miqt_string QFormLayout_Tr(const char* s); @@ -98,9 +102,45 @@ struct miqt_string QFormLayout_Tr2(const char* s, const char* c); struct miqt_string QFormLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QFormLayout_TrUtf82(const char* s, const char* c); struct miqt_string QFormLayout_TrUtf83(const char* s, const char* c, int n); -void QFormLayout_Delete(QFormLayout* self); +void QFormLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QFormLayout_virtualbase_AddItem(void* self, QLayoutItem* item); +void QFormLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot); +QLayoutItem* QFormLayout_virtualbase_ItemAtWithIndex(const void* self, int index); +void QFormLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QFormLayout_virtualbase_TakeAt(void* self, int index); +void QFormLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QFormLayout_virtualbase_SetGeometry(void* self, QRect* rect); +void QFormLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QFormLayout_virtualbase_MinimumSize(const void* self); +void QFormLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFormLayout_virtualbase_SizeHint(const void* self); +void QFormLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QFormLayout_virtualbase_Invalidate(void* self); +void QFormLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QFormLayout_virtualbase_HasHeightForWidth(const void* self); +void QFormLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QFormLayout_virtualbase_HeightForWidth(const void* self, int width); +void QFormLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QFormLayout_virtualbase_ExpandingDirections(const void* self); +void QFormLayout_override_virtual_Count(void* self, intptr_t slot); +int QFormLayout_virtualbase_Count(const void* self); +void QFormLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QFormLayout_virtualbase_Geometry(const void* self); +void QFormLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QFormLayout_virtualbase_MaximumSize(const void* self); +void QFormLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QFormLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QFormLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QFormLayout_virtualbase_IsEmpty(const void* self); +void QFormLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QFormLayout_virtualbase_ControlTypes(const void* self); +void QFormLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QFormLayout_virtualbase_Layout(void* self); +void QFormLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QFormLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QFormLayout_Delete(QFormLayout* self, bool isSubclass); -void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self); +void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qframe.cpp b/qt/gen_qframe.cpp index 405a849f..53672b51 100644 --- a/qt/gen_qframe.cpp +++ b/qt/gen_qframe.cpp @@ -1,25 +1,1049 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qframe.h" #include "_cgo_export.h" -QFrame* QFrame_new(QWidget* parent) { - return new QFrame(parent); +class MiqtVirtualQFrame : public virtual QFrame { +public: + + MiqtVirtualQFrame(QWidget* parent): QFrame(parent) {}; + MiqtVirtualQFrame(): QFrame() {}; + MiqtVirtualQFrame(QWidget* parent, Qt::WindowFlags f): QFrame(parent, f) {}; + + virtual ~MiqtVirtualQFrame() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFrame::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFrame_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFrame::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFrame::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFrame_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFrame::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QFrame::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QFrame_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QFrame::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QFrame::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QFrame_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QFrame::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QFrame::devType(); + } + + + int callback_return_value = miqt_exec_callback_QFrame_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QFrame::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFrame::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFrame_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFrame::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFrame::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFrame_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFrame::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QFrame::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QFrame_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QFrame::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QFrame::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QFrame_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QFrame::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QFrame::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QFrame_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QFrame::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QFrame::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QFrame::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QFrame::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QFrame::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QFrame::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QFrame::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QFrame::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QFrame::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QFrame::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QFrame_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QFrame::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QFrame::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFrame_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QFrame::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QFrame::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFrame_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QFrame::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QFrame::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFrame_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QFrame::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QFrame::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFrame_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QFrame::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QFrame::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFrame_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QFrame::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QFrame::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFrame_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QFrame::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QFrame::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QFrame::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QFrame::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QFrame::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QFrame::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QFrame::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QFrame::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QFrame::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QFrame::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QFrame_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QFrame::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QFrame::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QFrame::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QFrame::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QFrame::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QFrame::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QFrame::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QFrame::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QFrame::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QFrame::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QFrame::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QFrame::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QFrame::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QFrame::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QFrame_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QFrame::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QFrame::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QFrame_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QFrame::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QFrame::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QFrame_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QFrame::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QFrame::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QFrame_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QFrame::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QFrame::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QFrame_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QFrame::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QFrame::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QFrame_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QFrame::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QFrame::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QFrame_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QFrame::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QFrame::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QFrame_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QFrame::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QFrame::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QFrame_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QFrame::focusNextPrevChild(next); + + } + +}; + +void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent); + *outptr_QFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFrame* QFrame_new2() { - return new QFrame(); +void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(); + *outptr_QFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFrame* QFrame_new3(QWidget* parent, int f) { - return new QFrame(parent, static_cast(f)); +void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent, static_cast(f)); + *outptr_QFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFrame_MetaObject(const QFrame* self) { @@ -154,7 +1178,339 @@ struct miqt_string QFrame_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QFrame_Delete(QFrame* self) { - delete self; +void QFrame_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__SizeHint = slot; +} + +QSize* QFrame_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_SizeHint(); +} + +void QFrame_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__Event = slot; +} + +bool QFrame_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFrame*)(self) )->virtualbase_Event(e); +} + +void QFrame_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__PaintEvent = slot; +} + +void QFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_PaintEvent(param1); +} + +void QFrame_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ChangeEvent = slot; +} + +void QFrame_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QFrame_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DevType = slot; +} + +int QFrame_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_DevType(); +} + +void QFrame_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__SetVisible = slot; +} + +void QFrame_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_SetVisible(visible); +} + +void QFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFrame_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFrame_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__HeightForWidth = slot; +} + +int QFrame_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QFrame_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QFrame_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QFrame_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_PaintEngine(); +} + +void QFrame_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MousePressEvent = slot; +} + +void QFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MousePressEvent(event); +} + +void QFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MouseMoveEvent = slot; +} + +void QFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QFrame_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__WheelEvent = slot; +} + +void QFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_WheelEvent(event); +} + +void QFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__KeyPressEvent = slot; +} + +void QFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QFrame_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__FocusInEvent = slot; +} + +void QFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_FocusInEvent(event); +} + +void QFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__FocusOutEvent = slot; +} + +void QFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QFrame_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__EnterEvent = slot; +} + +void QFrame_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_EnterEvent(event); +} + +void QFrame_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__LeaveEvent = slot; +} + +void QFrame_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_LeaveEvent(event); +} + +void QFrame_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MoveEvent = slot; +} + +void QFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MoveEvent(event); +} + +void QFrame_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ResizeEvent = slot; +} + +void QFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ResizeEvent(event); +} + +void QFrame_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__CloseEvent = slot; +} + +void QFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_CloseEvent(event); +} + +void QFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QFrame_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__TabletEvent = slot; +} + +void QFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_TabletEvent(event); +} + +void QFrame_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ActionEvent = slot; +} + +void QFrame_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ActionEvent(event); +} + +void QFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DragEnterEvent = slot; +} + +void QFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DragMoveEvent = slot; +} + +void QFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DragLeaveEvent = slot; +} + +void QFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QFrame_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DropEvent = slot; +} + +void QFrame_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DropEvent(event); +} + +void QFrame_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ShowEvent = slot; +} + +void QFrame_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ShowEvent(event); +} + +void QFrame_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__HideEvent = slot; +} + +void QFrame_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_HideEvent(event); +} + +void QFrame_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__NativeEvent = slot; +} + +bool QFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQFrame*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QFrame_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__Metric = slot; +} + +int QFrame_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_Metric(param1); +} + +void QFrame_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InitPainter = slot; +} + +void QFrame_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQFrame*)(self) )->virtualbase_InitPainter(painter); +} + +void QFrame_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QFrame_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_Redirected(offset); +} + +void QFrame_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QFrame_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_SharedPainter(); +} + +void QFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InputMethodEvent = slot; +} + +void QFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QFrame_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QFrame_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQFrame*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QFrame_Delete(QFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qframe.go b/qt/gen_qframe.go index dabc71ce..a109cc92 100644 --- a/qt/gen_qframe.go +++ b/qt/gen_qframe.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -41,7 +42,8 @@ const ( ) type QFrame struct { - h *C.QFrame + h *C.QFrame + isSubclass bool *QWidget } @@ -59,33 +61,62 @@ func (this *QFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFrame(h *C.QFrame) *QFrame { +// newQFrame constructs the type using only CGO pointers. +func newQFrame(h *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFrame { if h == nil { return nil } - return &QFrame{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QFrame{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFrame(h unsafe.Pointer) *QFrame { - return newQFrame((*C.QFrame)(h)) +// UnsafeNewQFrame constructs the type using only unsafe pointers. +func UnsafeNewQFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFrame { + if h == nil { + return nil + } + + return &QFrame{h: (*C.QFrame)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFrame constructs a new QFrame object. func NewQFrame(parent *QWidget) *QFrame { - ret := C.QFrame_new(parent.cPointer()) - return newQFrame(ret) + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFrame_new(parent.cPointer(), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFrame2 constructs a new QFrame object. func NewQFrame2() *QFrame { - ret := C.QFrame_new2() - return newQFrame(ret) + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFrame_new2(&outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFrame3 constructs a new QFrame object. func NewQFrame3(parent *QWidget, f WindowType) *QFrame { - ret := C.QFrame_new3(parent.cPointer(), (C.int)(f)) - return newQFrame(ret) + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFrame_new3(parent.cPointer(), (C.int)(f), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFrame) MetaObject() *QMetaObject { @@ -222,9 +253,975 @@ func QFrame_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QFrame) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFrame_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFrame) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFrame_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_SizeHint +func miqt_exec_callback_QFrame_SizeHint(self *C.QFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFrame_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFrame) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFrame_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_Event +func miqt_exec_callback_QFrame_Event(self *C.QFrame, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QFrame_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFrame) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QFrame_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_PaintEvent +func miqt_exec_callback_QFrame_PaintEvent(self *C.QFrame, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QFrame_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFrame) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QFrame_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ChangeEvent +func miqt_exec_callback_QFrame_ChangeEvent(self *C.QFrame, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QFrame{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DevType() int { + + return (int)(C.QFrame_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QFrame) OnDevType(slot func(super func() int) int) { + C.QFrame_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DevType +func miqt_exec_callback_QFrame_DevType(self *C.QFrame, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_SetVisible(visible bool) { + + C.QFrame_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFrame) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFrame_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_SetVisible +func miqt_exec_callback_QFrame_SetVisible(self *C.QFrame, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFrame{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFrame) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFrame_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFrame) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFrame_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MinimumSizeHint +func miqt_exec_callback_QFrame_MinimumSizeHint(self *C.QFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QFrame_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFrame) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QFrame_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_HeightForWidth +func miqt_exec_callback_QFrame_HeightForWidth(self *C.QFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QFrame_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QFrame) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QFrame_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_HasHeightForWidth +func miqt_exec_callback_QFrame_HasHeightForWidth(self *C.QFrame, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QFrame_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QFrame) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QFrame_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_PaintEngine +func miqt_exec_callback_QFrame_PaintEngine(self *C.QFrame, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MousePressEvent +func miqt_exec_callback_QFrame_MousePressEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MouseReleaseEvent +func miqt_exec_callback_QFrame_MouseReleaseEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MouseDoubleClickEvent +func miqt_exec_callback_QFrame_MouseDoubleClickEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MouseMoveEvent +func miqt_exec_callback_QFrame_MouseMoveEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QFrame_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QFrame_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_WheelEvent +func miqt_exec_callback_QFrame_WheelEvent(self *C.QFrame, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QFrame_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFrame_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_KeyPressEvent +func miqt_exec_callback_QFrame_KeyPressEvent(self *C.QFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QFrame_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFrame_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_KeyReleaseEvent +func miqt_exec_callback_QFrame_KeyReleaseEvent(self *C.QFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QFrame_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFrame_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_FocusInEvent +func miqt_exec_callback_QFrame_FocusInEvent(self *C.QFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QFrame_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFrame_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_FocusOutEvent +func miqt_exec_callback_QFrame_FocusOutEvent(self *C.QFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_EnterEvent(event *QEvent) { + + C.QFrame_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFrame_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_EnterEvent +func miqt_exec_callback_QFrame_EnterEvent(self *C.QFrame, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFrame{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QFrame_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFrame_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_LeaveEvent +func miqt_exec_callback_QFrame_LeaveEvent(self *C.QFrame, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFrame{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QFrame_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QFrame_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MoveEvent +func miqt_exec_callback_QFrame_MoveEvent(self *C.QFrame, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QFrame_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QFrame_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ResizeEvent +func miqt_exec_callback_QFrame_ResizeEvent(self *C.QFrame, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QFrame_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QFrame_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_CloseEvent +func miqt_exec_callback_QFrame_CloseEvent(self *C.QFrame, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QFrame_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QFrame_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ContextMenuEvent +func miqt_exec_callback_QFrame_ContextMenuEvent(self *C.QFrame, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QFrame_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QFrame_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_TabletEvent +func miqt_exec_callback_QFrame_TabletEvent(self *C.QFrame, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QFrame_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QFrame_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ActionEvent +func miqt_exec_callback_QFrame_ActionEvent(self *C.QFrame, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QFrame_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QFrame_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DragEnterEvent +func miqt_exec_callback_QFrame_DragEnterEvent(self *C.QFrame, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QFrame_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QFrame_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DragMoveEvent +func miqt_exec_callback_QFrame_DragMoveEvent(self *C.QFrame, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QFrame_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QFrame_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DragLeaveEvent +func miqt_exec_callback_QFrame_DragLeaveEvent(self *C.QFrame, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QFrame_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QFrame_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DropEvent +func miqt_exec_callback_QFrame_DropEvent(self *C.QFrame, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QFrame_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QFrame_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ShowEvent +func miqt_exec_callback_QFrame_ShowEvent(self *C.QFrame, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QFrame_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QFrame_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_HideEvent +func miqt_exec_callback_QFrame_HideEvent(self *C.QFrame, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QFrame_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QFrame) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QFrame_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_NativeEvent +func miqt_exec_callback_QFrame_NativeEvent(self *C.QFrame, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QFrame_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFrame) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QFrame_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_Metric +func miqt_exec_callback_QFrame_Metric(self *C.QFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_InitPainter(painter *QPainter) { + + C.QFrame_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QFrame) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QFrame_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InitPainter +func miqt_exec_callback_QFrame_InitPainter(self *C.QFrame, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QFrame{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QFrame) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QFrame_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QFrame) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QFrame_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_Redirected +func miqt_exec_callback_QFrame_Redirected(self *C.QFrame, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QFrame_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QFrame) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QFrame_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_SharedPainter +func miqt_exec_callback_QFrame_SharedPainter(self *C.QFrame, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QFrame_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFrame) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QFrame_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InputMethodEvent +func miqt_exec_callback_QFrame_InputMethodEvent(self *C.QFrame, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QFrame_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFrame) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QFrame_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InputMethodQuery +func miqt_exec_callback_QFrame_InputMethodQuery(self *C.QFrame, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QFrame_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QFrame) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QFrame_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_FocusNextPrevChild +func miqt_exec_callback_QFrame_FocusNextPrevChild(self *C.QFrame, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFrame) Delete() { - C.QFrame_Delete(this.h) + C.QFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qframe.h b/qt/gen_qframe.h index e3fcd219..adfb3d6f 100644 --- a/qt/gen_qframe.h +++ b/qt/gen_qframe.h @@ -15,22 +15,74 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QFrame* QFrame_new(QWidget* parent); -QFrame* QFrame_new2(); -QFrame* QFrame_new3(QWidget* parent, int f); +void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFrame_MetaObject(const QFrame* self); void* QFrame_Metacast(QFrame* self, const char* param1); struct miqt_string QFrame_Tr(const char* s); @@ -49,11 +101,96 @@ int QFrame_MidLineWidth(const QFrame* self); void QFrame_SetMidLineWidth(QFrame* self, int midLineWidth); QRect* QFrame_FrameRect(const QFrame* self); void QFrame_SetFrameRect(QFrame* self, QRect* frameRect); +bool QFrame_Event(QFrame* self, QEvent* e); +void QFrame_PaintEvent(QFrame* self, QPaintEvent* param1); +void QFrame_ChangeEvent(QFrame* self, QEvent* param1); struct miqt_string QFrame_Tr2(const char* s, const char* c); struct miqt_string QFrame_Tr3(const char* s, const char* c, int n); struct miqt_string QFrame_TrUtf82(const char* s, const char* c); struct miqt_string QFrame_TrUtf83(const char* s, const char* c, int n); -void QFrame_Delete(QFrame* self); +void QFrame_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFrame_virtualbase_SizeHint(const void* self); +void QFrame_override_virtual_Event(void* self, intptr_t slot); +bool QFrame_virtualbase_Event(void* self, QEvent* e); +void QFrame_override_virtual_PaintEvent(void* self, intptr_t slot); +void QFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QFrame_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QFrame_override_virtual_DevType(void* self, intptr_t slot); +int QFrame_virtualbase_DevType(const void* self); +void QFrame_override_virtual_SetVisible(void* self, intptr_t slot); +void QFrame_virtualbase_SetVisible(void* self, bool visible); +void QFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFrame_virtualbase_MinimumSizeHint(const void* self); +void QFrame_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QFrame_virtualbase_HeightForWidth(const void* self, int param1); +void QFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QFrame_virtualbase_HasHeightForWidth(const void* self); +void QFrame_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QFrame_virtualbase_PaintEngine(const void* self); +void QFrame_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_WheelEvent(void* self, intptr_t slot); +void QFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QFrame_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QFrame_override_virtual_EnterEvent(void* self, intptr_t slot); +void QFrame_virtualbase_EnterEvent(void* self, QEvent* event); +void QFrame_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_LeaveEvent(void* self, QEvent* event); +void QFrame_override_virtual_MoveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QFrame_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QFrame_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QFrame_override_virtual_TabletEvent(void* self, intptr_t slot); +void QFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QFrame_override_virtual_ActionEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QFrame_override_virtual_DropEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DropEvent(void* self, QDropEvent* event); +void QFrame_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QFrame_override_virtual_HideEvent(void* self, intptr_t slot); +void QFrame_virtualbase_HideEvent(void* self, QHideEvent* event); +void QFrame_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QFrame_override_virtual_Metric(void* self, intptr_t slot); +int QFrame_virtualbase_Metric(const void* self, int param1); +void QFrame_override_virtual_InitPainter(void* self, intptr_t slot); +void QFrame_virtualbase_InitPainter(const void* self, QPainter* painter); +void QFrame_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QFrame_virtualbase_Redirected(const void* self, QPoint* offset); +void QFrame_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QFrame_virtualbase_SharedPainter(const void* self); +void QFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QFrame_virtualbase_InputMethodQuery(const void* self, int param1); +void QFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QFrame_virtualbase_FocusNextPrevChild(void* self, bool next); +void QFrame_Delete(QFrame* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfutureinterface.cpp b/qt/gen_qfutureinterface.cpp index 7bafd7ef..9a56313e 100644 --- a/qt/gen_qfutureinterface.cpp +++ b/qt/gen_qfutureinterface.cpp @@ -9,16 +9,19 @@ #include "gen_qfutureinterface.h" #include "_cgo_export.h" -QFutureInterfaceBase* QFutureInterfaceBase_new() { - return new QFutureInterfaceBase(); +void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase) { + QFutureInterfaceBase* ret = new QFutureInterfaceBase(); + *outptr_QFutureInterfaceBase = ret; } -QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other) { - return new QFutureInterfaceBase(*other); +void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { + QFutureInterfaceBase* ret = new QFutureInterfaceBase(*other); + *outptr_QFutureInterfaceBase = ret; } -QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState) { - return new QFutureInterfaceBase(static_cast(initialState)); +void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { + QFutureInterfaceBase* ret = new QFutureInterfaceBase(static_cast(initialState)); + *outptr_QFutureInterfaceBase = ret; } void QFutureInterfaceBase_ReportStarted(QFutureInterfaceBase* self) { @@ -187,7 +190,11 @@ void QFutureInterfaceBase_OperatorAssign(QFutureInterfaceBase* self, QFutureInte self->operator=(*other); } -void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self) { - delete self; +void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfutureinterface.go b/qt/gen_qfutureinterface.go index 80bdd30c..ebad3f8b 100644 --- a/qt/gen_qfutureinterface.go +++ b/qt/gen_qfutureinterface.go @@ -26,7 +26,8 @@ const ( ) type QFutureInterfaceBase struct { - h *C.QFutureInterfaceBase + h *C.QFutureInterfaceBase + isSubclass bool } func (this *QFutureInterfaceBase) cPointer() *C.QFutureInterfaceBase { @@ -43,6 +44,7 @@ func (this *QFutureInterfaceBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFutureInterfaceBase constructs the type using only CGO pointers. func newQFutureInterfaceBase(h *C.QFutureInterfaceBase) *QFutureInterfaceBase { if h == nil { return nil @@ -50,26 +52,43 @@ func newQFutureInterfaceBase(h *C.QFutureInterfaceBase) *QFutureInterfaceBase { return &QFutureInterfaceBase{h: h} } +// UnsafeNewQFutureInterfaceBase constructs the type using only unsafe pointers. func UnsafeNewQFutureInterfaceBase(h unsafe.Pointer) *QFutureInterfaceBase { - return newQFutureInterfaceBase((*C.QFutureInterfaceBase)(h)) + if h == nil { + return nil + } + + return &QFutureInterfaceBase{h: (*C.QFutureInterfaceBase)(h)} } // NewQFutureInterfaceBase constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase() *QFutureInterfaceBase { - ret := C.QFutureInterfaceBase_new() - return newQFutureInterfaceBase(ret) + var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil + + C.QFutureInterfaceBase_new(&outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret.isSubclass = true + return ret } // NewQFutureInterfaceBase2 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase2(other *QFutureInterfaceBase) *QFutureInterfaceBase { - ret := C.QFutureInterfaceBase_new2(other.cPointer()) - return newQFutureInterfaceBase(ret) + var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil + + C.QFutureInterfaceBase_new2(other.cPointer(), &outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret.isSubclass = true + return ret } // NewQFutureInterfaceBase3 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase3(initialState QFutureInterfaceBase__State) *QFutureInterfaceBase { - ret := C.QFutureInterfaceBase_new3((C.int)(initialState)) - return newQFutureInterfaceBase(ret) + var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil + + C.QFutureInterfaceBase_new3((C.int)(initialState), &outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret.isSubclass = true + return ret } func (this *QFutureInterfaceBase) ReportStarted() { @@ -216,11 +235,11 @@ func (this *QFutureInterfaceBase) WaitForResume() { } func (this *QFutureInterfaceBase) Mutex() *QMutex { - return UnsafeNewQMutex(unsafe.Pointer(C.QFutureInterfaceBase_Mutex(this.h))) + return UnsafeNewQMutex(unsafe.Pointer(C.QFutureInterfaceBase_Mutex(this.h)), nil) } func (this *QFutureInterfaceBase) MutexWithInt(param1 int) *QMutex { - return UnsafeNewQMutex(unsafe.Pointer(C.QFutureInterfaceBase_MutexWithInt(this.h, (C.int)(param1)))) + return UnsafeNewQMutex(unsafe.Pointer(C.QFutureInterfaceBase_MutexWithInt(this.h, (C.int)(param1))), nil) } func (this *QFutureInterfaceBase) OperatorEqual(other *QFutureInterfaceBase) bool { @@ -237,7 +256,7 @@ func (this *QFutureInterfaceBase) OperatorAssign(other *QFutureInterfaceBase) { // Delete this object from C++ memory. func (this *QFutureInterfaceBase) Delete() { - C.QFutureInterfaceBase_Delete(this.h) + C.QFutureInterfaceBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfutureinterface.h b/qt/gen_qfutureinterface.h index f8cf4fb2..4df9844d 100644 --- a/qt/gen_qfutureinterface.h +++ b/qt/gen_qfutureinterface.h @@ -26,9 +26,9 @@ typedef struct QRunnable QRunnable; typedef struct QThreadPool QThreadPool; #endif -QFutureInterfaceBase* QFutureInterfaceBase_new(); -QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other); -QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState); +void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase); +void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase); +void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase); void QFutureInterfaceBase_ReportStarted(QFutureInterfaceBase* self); void QFutureInterfaceBase_ReportFinished(QFutureInterfaceBase* self); void QFutureInterfaceBase_ReportCanceled(QFutureInterfaceBase* self); @@ -68,7 +68,7 @@ QMutex* QFutureInterfaceBase_MutexWithInt(const QFutureInterfaceBase* self, int bool QFutureInterfaceBase_OperatorEqual(const QFutureInterfaceBase* self, QFutureInterfaceBase* other); bool QFutureInterfaceBase_OperatorNotEqual(const QFutureInterfaceBase* self, QFutureInterfaceBase* other); void QFutureInterfaceBase_OperatorAssign(QFutureInterfaceBase* self, QFutureInterfaceBase* other); -void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self); +void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qfuturewatcher.cpp b/qt/gen_qfuturewatcher.cpp index 2e5704c2..8f00a1f6 100644 --- a/qt/gen_qfuturewatcher.cpp +++ b/qt/gen_qfuturewatcher.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -272,7 +274,11 @@ struct miqt_string QFutureWatcherBase_TrUtf83(const char* s, const char* c, int return _ms; } -void QFutureWatcherBase_Delete(QFutureWatcherBase* self) { - delete self; +void QFutureWatcherBase_Delete(QFutureWatcherBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qfuturewatcher.go b/qt/gen_qfuturewatcher.go index 2255b945..05797ef9 100644 --- a/qt/gen_qfuturewatcher.go +++ b/qt/gen_qfuturewatcher.go @@ -15,7 +15,8 @@ import ( ) type QFutureWatcherBase struct { - h *C.QFutureWatcherBase + h *C.QFutureWatcherBase + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QFutureWatcherBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFutureWatcherBase(h *C.QFutureWatcherBase) *QFutureWatcherBase { +// newQFutureWatcherBase constructs the type using only CGO pointers. +func newQFutureWatcherBase(h *C.QFutureWatcherBase, h_QObject *C.QObject) *QFutureWatcherBase { if h == nil { return nil } - return &QFutureWatcherBase{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QFutureWatcherBase{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQFutureWatcherBase(h unsafe.Pointer) *QFutureWatcherBase { - return newQFutureWatcherBase((*C.QFutureWatcherBase)(h)) +// UnsafeNewQFutureWatcherBase constructs the type using only unsafe pointers. +func UnsafeNewQFutureWatcherBase(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFutureWatcherBase { + if h == nil { + return nil + } + + return &QFutureWatcherBase{h: (*C.QFutureWatcherBase)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QFutureWatcherBase) MetaObject() *QMetaObject { @@ -385,7 +394,7 @@ func QFutureWatcherBase_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QFutureWatcherBase) Delete() { - C.QFutureWatcherBase_Delete(this.h) + C.QFutureWatcherBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qfuturewatcher.h b/qt/gen_qfuturewatcher.h index 60fcbd6a..baa931ca 100644 --- a/qt/gen_qfuturewatcher.h +++ b/qt/gen_qfuturewatcher.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QEvent; class QFutureWatcherBase; +class QMetaMethod; class QMetaObject; +class QObject; #else typedef struct QEvent QEvent; typedef struct QFutureWatcherBase QFutureWatcherBase; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self); @@ -65,11 +69,13 @@ void QFutureWatcherBase_SetPaused(QFutureWatcherBase* self, bool paused); void QFutureWatcherBase_Pause(QFutureWatcherBase* self); void QFutureWatcherBase_Resume(QFutureWatcherBase* self); void QFutureWatcherBase_TogglePaused(QFutureWatcherBase* self); +void QFutureWatcherBase_ConnectNotify(QFutureWatcherBase* self, QMetaMethod* signal); +void QFutureWatcherBase_DisconnectNotify(QFutureWatcherBase* self, QMetaMethod* signal); struct miqt_string QFutureWatcherBase_Tr2(const char* s, const char* c); struct miqt_string QFutureWatcherBase_Tr3(const char* s, const char* c, int n); struct miqt_string QFutureWatcherBase_TrUtf82(const char* s, const char* c); struct miqt_string QFutureWatcherBase_TrUtf83(const char* s, const char* c, int n); -void QFutureWatcherBase_Delete(QFutureWatcherBase* self); +void QFutureWatcherBase_Delete(QFutureWatcherBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgenericplugin.cpp b/qt/gen_qgenericplugin.cpp index a29d0cc7..27f68d4a 100644 --- a/qt/gen_qgenericplugin.cpp +++ b/qt/gen_qgenericplugin.cpp @@ -88,7 +88,11 @@ struct miqt_string QGenericPlugin_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QGenericPlugin_Delete(QGenericPlugin* self) { - delete self; +void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgenericplugin.go b/qt/gen_qgenericplugin.go index 411175a2..67f329aa 100644 --- a/qt/gen_qgenericplugin.go +++ b/qt/gen_qgenericplugin.go @@ -14,7 +14,8 @@ import ( ) type QGenericPlugin struct { - h *C.QGenericPlugin + h *C.QGenericPlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QGenericPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGenericPlugin(h *C.QGenericPlugin) *QGenericPlugin { +// newQGenericPlugin constructs the type using only CGO pointers. +func newQGenericPlugin(h *C.QGenericPlugin, h_QObject *C.QObject) *QGenericPlugin { if h == nil { return nil } - return &QGenericPlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGenericPlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGenericPlugin(h unsafe.Pointer) *QGenericPlugin { - return newQGenericPlugin((*C.QGenericPlugin)(h)) +// UnsafeNewQGenericPlugin constructs the type using only unsafe pointers. +func UnsafeNewQGenericPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGenericPlugin { + if h == nil { + return nil + } + + return &QGenericPlugin{h: (*C.QGenericPlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGenericPlugin) MetaObject() *QMetaObject { @@ -129,7 +138,7 @@ func QGenericPlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGenericPlugin) Delete() { - C.QGenericPlugin_Delete(this.h) + C.QGenericPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgenericplugin.h b/qt/gen_qgenericplugin.h index b27abfa5..f8f6e776 100644 --- a/qt/gen_qgenericplugin.h +++ b/qt/gen_qgenericplugin.h @@ -33,7 +33,7 @@ struct miqt_string QGenericPlugin_Tr2(const char* s, const char* c); struct miqt_string QGenericPlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QGenericPlugin_TrUtf82(const char* s, const char* c); struct miqt_string QGenericPlugin_TrUtf83(const char* s, const char* c, int n); -void QGenericPlugin_Delete(QGenericPlugin* self); +void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgenericpluginfactory.cpp b/qt/gen_qgenericpluginfactory.cpp index 2aa5ac9b..abe6c5a4 100644 --- a/qt/gen_qgenericpluginfactory.cpp +++ b/qt/gen_qgenericpluginfactory.cpp @@ -34,7 +34,11 @@ QObject* QGenericPluginFactory_Create(struct miqt_string param1, struct miqt_str return QGenericPluginFactory::create(param1_QString, param2_QString); } -void QGenericPluginFactory_Delete(QGenericPluginFactory* self) { - delete self; +void QGenericPluginFactory_Delete(QGenericPluginFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgenericpluginfactory.go b/qt/gen_qgenericpluginfactory.go index 35589494..0a244a54 100644 --- a/qt/gen_qgenericpluginfactory.go +++ b/qt/gen_qgenericpluginfactory.go @@ -14,7 +14,8 @@ import ( ) type QGenericPluginFactory struct { - h *C.QGenericPluginFactory + h *C.QGenericPluginFactory + isSubclass bool } func (this *QGenericPluginFactory) cPointer() *C.QGenericPluginFactory { @@ -31,6 +32,7 @@ func (this *QGenericPluginFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGenericPluginFactory constructs the type using only CGO pointers. func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory { if h == nil { return nil @@ -38,8 +40,13 @@ func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory return &QGenericPluginFactory{h: h} } +// UnsafeNewQGenericPluginFactory constructs the type using only unsafe pointers. func UnsafeNewQGenericPluginFactory(h unsafe.Pointer) *QGenericPluginFactory { - return newQGenericPluginFactory((*C.QGenericPluginFactory)(h)) + if h == nil { + return nil + } + + return &QGenericPluginFactory{h: (*C.QGenericPluginFactory)(h)} } func QGenericPluginFactory_Keys() []string { @@ -69,7 +76,7 @@ func QGenericPluginFactory_Create(param1 string, param2 string) *QObject { // Delete this object from C++ memory. func (this *QGenericPluginFactory) Delete() { - C.QGenericPluginFactory_Delete(this.h) + C.QGenericPluginFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgenericpluginfactory.h b/qt/gen_qgenericpluginfactory.h index 2c0298c9..f8efe2a5 100644 --- a/qt/gen_qgenericpluginfactory.h +++ b/qt/gen_qgenericpluginfactory.h @@ -24,7 +24,7 @@ typedef struct QObject QObject; struct miqt_array /* of struct miqt_string */ QGenericPluginFactory_Keys(); QObject* QGenericPluginFactory_Create(struct miqt_string param1, struct miqt_string param2); -void QGenericPluginFactory_Delete(QGenericPluginFactory* self); +void QGenericPluginFactory_Delete(QGenericPluginFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgesture.cpp b/qt/gen_qgesture.cpp index 38e26957..7e56e4e3 100644 --- a/qt/gen_qgesture.cpp +++ b/qt/gen_qgesture.cpp @@ -1,6 +1,9 @@ +#include +#include #include #include #include +#include #include #include #include @@ -12,17 +15,203 @@ #include #include #include +#include #include #include #include "gen_qgesture.h" #include "_cgo_export.h" -QGesture* QGesture_new() { - return new QGesture(); +class MiqtVirtualQGesture : public virtual QGesture { +public: + + MiqtVirtualQGesture(): QGesture() {}; + MiqtVirtualQGesture(QObject* parent): QGesture(parent) {}; + + virtual ~MiqtVirtualQGesture() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGesture::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGesture_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGesture::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGesture::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGesture_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGesture::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGesture::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGesture_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGesture::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGesture::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGesture_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGesture::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QGesture::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGesture_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGesture::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QGesture::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGesture_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGesture::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QGesture::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGesture_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGesture::disconnectNotify(*signal); + + } + +}; + +void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject) { + MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(); + *outptr_QGesture = ret; + *outptr_QObject = static_cast(ret); } -QGesture* QGesture_new2(QObject* parent) { - return new QGesture(parent); +void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject) { + MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(parent); + *outptr_QGesture = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QGesture_MetaObject(const QGesture* self) { @@ -134,16 +323,82 @@ struct miqt_string QGesture_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QGesture_Delete(QGesture* self) { - delete self; +void QGesture_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__Event = slot; +} + +bool QGesture_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGesture*)(self) )->virtualbase_Event(event); +} + +void QGesture_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__EventFilter = slot; +} + +bool QGesture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGesture*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGesture_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__TimerEvent = slot; +} + +void QGesture_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_TimerEvent(event); } -QPanGesture* QPanGesture_new() { - return new QPanGesture(); +void QGesture_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__ChildEvent = slot; } -QPanGesture* QPanGesture_new2(QObject* parent) { - return new QPanGesture(parent); +void QGesture_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_ChildEvent(event); +} + +void QGesture_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__CustomEvent = slot; +} + +void QGesture_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_CustomEvent(event); +} + +void QGesture_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__ConnectNotify = slot; +} + +void QGesture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGesture_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__DisconnectNotify = slot; +} + +void QGesture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGesture_Delete(QGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPanGesture* ret = new QPanGesture(); + *outptr_QPanGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPanGesture* ret = new QPanGesture(parent); + *outptr_QPanGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPanGesture_MetaObject(const QPanGesture* self) { @@ -249,16 +504,26 @@ struct miqt_string QPanGesture_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QPanGesture_Delete(QPanGesture* self) { - delete self; +void QPanGesture_Delete(QPanGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPinchGesture* QPinchGesture_new() { - return new QPinchGesture(); +void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPinchGesture* ret = new QPinchGesture(); + *outptr_QPinchGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPinchGesture* QPinchGesture_new2(QObject* parent) { - return new QPinchGesture(parent); +void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPinchGesture* ret = new QPinchGesture(parent); + *outptr_QPinchGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self) { @@ -431,16 +696,26 @@ struct miqt_string QPinchGesture_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QPinchGesture_Delete(QPinchGesture* self) { - delete self; +void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSwipeGesture* QSwipeGesture_new() { - return new QSwipeGesture(); +void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QSwipeGesture* ret = new QSwipeGesture(); + *outptr_QSwipeGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSwipeGesture* QSwipeGesture_new2(QObject* parent) { - return new QSwipeGesture(parent); +void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QSwipeGesture* ret = new QSwipeGesture(parent); + *outptr_QSwipeGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self) { @@ -536,16 +811,26 @@ struct miqt_string QSwipeGesture_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSwipeGesture_Delete(QSwipeGesture* self) { - delete self; +void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTapGesture* QTapGesture_new() { - return new QTapGesture(); +void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapGesture* ret = new QTapGesture(); + *outptr_QTapGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTapGesture* QTapGesture_new2(QObject* parent) { - return new QTapGesture(parent); +void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapGesture* ret = new QTapGesture(parent); + *outptr_QTapGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTapGesture_MetaObject(const QTapGesture* self) { @@ -630,16 +915,26 @@ struct miqt_string QTapGesture_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTapGesture_Delete(QTapGesture* self) { - delete self; +void QTapGesture_Delete(QTapGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTapAndHoldGesture* QTapAndHoldGesture_new() { - return new QTapAndHoldGesture(); +void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapAndHoldGesture* ret = new QTapAndHoldGesture(); + *outptr_QTapAndHoldGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent) { - return new QTapAndHoldGesture(parent); +void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapAndHoldGesture* ret = new QTapAndHoldGesture(parent); + *outptr_QTapAndHoldGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self) { @@ -732,22 +1027,30 @@ struct miqt_string QTapAndHoldGesture_TrUtf83(const char* s, const char* c, int return _ms; } -void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self) { - delete self; +void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures) { +void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { QList gestures_QList; gestures_QList.reserve(gestures.len); QGesture** gestures_arr = static_cast(gestures.data); for(size_t i = 0; i < gestures.len; ++i) { gestures_QList.push_back(gestures_arr[i]); } - return new QGestureEvent(gestures_QList); + QGestureEvent* ret = new QGestureEvent(gestures_QList); + *outptr_QGestureEvent = ret; + *outptr_QEvent = static_cast(ret); } -QGestureEvent* QGestureEvent_new2(QGestureEvent* param1) { - return new QGestureEvent(*param1); +void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { + QGestureEvent* ret = new QGestureEvent(*param1); + *outptr_QGestureEvent = ret; + *outptr_QEvent = static_cast(ret); } struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self) { @@ -837,7 +1140,11 @@ QPointF* QGestureEvent_MapToGraphicsScene(const QGestureEvent* self, QPointF* ge return new QPointF(self->mapToGraphicsScene(*gesturePoint)); } -void QGestureEvent_Delete(QGestureEvent* self) { - delete self; +void QGestureEvent_Delete(QGestureEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgesture.go b/qt/gen_qgesture.go index 058cd72d..de4348cc 100644 --- a/qt/gen_qgesture.go +++ b/qt/gen_qgesture.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -39,7 +40,8 @@ const ( ) type QGesture struct { - h *C.QGesture + h *C.QGesture + isSubclass bool *QObject } @@ -57,27 +59,45 @@ func (this *QGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGesture(h *C.QGesture) *QGesture { +// newQGesture constructs the type using only CGO pointers. +func newQGesture(h *C.QGesture, h_QObject *C.QObject) *QGesture { if h == nil { return nil } - return &QGesture{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGesture{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGesture(h unsafe.Pointer) *QGesture { - return newQGesture((*C.QGesture)(h)) +// UnsafeNewQGesture constructs the type using only unsafe pointers. +func UnsafeNewQGesture(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGesture { + if h == nil { + return nil + } + + return &QGesture{h: (*C.QGesture)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQGesture constructs a new QGesture object. func NewQGesture() *QGesture { - ret := C.QGesture_new() - return newQGesture(ret) + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QGesture_new(&outptr_QGesture, &outptr_QObject) + ret := newQGesture(outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGesture2 constructs a new QGesture object. func NewQGesture2(parent *QObject) *QGesture { - ret := C.QGesture_new2(parent.cPointer()) - return newQGesture(ret) + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QGesture_new2(parent.cPointer(), &outptr_QGesture, &outptr_QObject) + ret := newQGesture(outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGesture) MetaObject() *QMetaObject { @@ -187,9 +207,175 @@ func QGesture_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGesture) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGesture_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGesture) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGesture_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_Event +func miqt_exec_callback_QGesture_Event(self *C.QGesture, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGesture{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGesture) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGesture_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGesture) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGesture_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_EventFilter +func miqt_exec_callback_QGesture_EventFilter(self *C.QGesture, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGesture{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGesture) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGesture_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGesture) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGesture_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_TimerEvent +func miqt_exec_callback_QGesture_TimerEvent(self *C.QGesture, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGesture{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGesture) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGesture_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGesture) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGesture_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_ChildEvent +func miqt_exec_callback_QGesture_ChildEvent(self *C.QGesture, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGesture{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGesture) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGesture_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGesture) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGesture_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_CustomEvent +func miqt_exec_callback_QGesture_CustomEvent(self *C.QGesture, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGesture{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGesture) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGesture_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGesture) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGesture_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_ConnectNotify +func miqt_exec_callback_QGesture_ConnectNotify(self *C.QGesture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGesture{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGesture) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGesture_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGesture) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGesture_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_DisconnectNotify +func miqt_exec_callback_QGesture_DisconnectNotify(self *C.QGesture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGesture{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGesture) Delete() { - C.QGesture_Delete(this.h) + C.QGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -202,7 +388,8 @@ func (this *QGesture) GoGC() { } type QPanGesture struct { - h *C.QPanGesture + h *C.QPanGesture + isSubclass bool *QGesture } @@ -220,27 +407,47 @@ func (this *QPanGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPanGesture(h *C.QPanGesture) *QPanGesture { +// newQPanGesture constructs the type using only CGO pointers. +func newQPanGesture(h *C.QPanGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPanGesture { if h == nil { return nil } - return &QPanGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QPanGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQPanGesture(h unsafe.Pointer) *QPanGesture { - return newQPanGesture((*C.QPanGesture)(h)) +// UnsafeNewQPanGesture constructs the type using only unsafe pointers. +func UnsafeNewQPanGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPanGesture { + if h == nil { + return nil + } + + return &QPanGesture{h: (*C.QPanGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQPanGesture constructs a new QPanGesture object. func NewQPanGesture() *QPanGesture { - ret := C.QPanGesture_new() - return newQPanGesture(ret) + var outptr_QPanGesture *C.QPanGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPanGesture_new(&outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPanGesture2 constructs a new QPanGesture object. func NewQPanGesture2(parent *QObject) *QPanGesture { - ret := C.QPanGesture_new2(parent.cPointer()) - return newQPanGesture(ret) + var outptr_QPanGesture *C.QPanGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPanGesture_new2(parent.cPointer(), &outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPanGesture) MetaObject() *QMetaObject { @@ -354,7 +561,7 @@ func QPanGesture_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPanGesture) Delete() { - C.QPanGesture_Delete(this.h) + C.QPanGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -367,7 +574,8 @@ func (this *QPanGesture) GoGC() { } type QPinchGesture struct { - h *C.QPinchGesture + h *C.QPinchGesture + isSubclass bool *QGesture } @@ -385,27 +593,47 @@ func (this *QPinchGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPinchGesture(h *C.QPinchGesture) *QPinchGesture { +// newQPinchGesture constructs the type using only CGO pointers. +func newQPinchGesture(h *C.QPinchGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPinchGesture { if h == nil { return nil } - return &QPinchGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QPinchGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQPinchGesture(h unsafe.Pointer) *QPinchGesture { - return newQPinchGesture((*C.QPinchGesture)(h)) +// UnsafeNewQPinchGesture constructs the type using only unsafe pointers. +func UnsafeNewQPinchGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPinchGesture { + if h == nil { + return nil + } + + return &QPinchGesture{h: (*C.QPinchGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQPinchGesture constructs a new QPinchGesture object. func NewQPinchGesture() *QPinchGesture { - ret := C.QPinchGesture_new() - return newQPinchGesture(ret) + var outptr_QPinchGesture *C.QPinchGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPinchGesture_new(&outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPinchGesture2 constructs a new QPinchGesture object. func NewQPinchGesture2(parent *QObject) *QPinchGesture { - ret := C.QPinchGesture_new2(parent.cPointer()) - return newQPinchGesture(ret) + var outptr_QPinchGesture *C.QPinchGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPinchGesture_new2(parent.cPointer(), &outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPinchGesture) MetaObject() *QMetaObject { @@ -579,7 +807,7 @@ func QPinchGesture_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPinchGesture) Delete() { - C.QPinchGesture_Delete(this.h) + C.QPinchGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -592,7 +820,8 @@ func (this *QPinchGesture) GoGC() { } type QSwipeGesture struct { - h *C.QSwipeGesture + h *C.QSwipeGesture + isSubclass bool *QGesture } @@ -610,27 +839,47 @@ func (this *QSwipeGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSwipeGesture(h *C.QSwipeGesture) *QSwipeGesture { +// newQSwipeGesture constructs the type using only CGO pointers. +func newQSwipeGesture(h *C.QSwipeGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QSwipeGesture { if h == nil { return nil } - return &QSwipeGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QSwipeGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQSwipeGesture(h unsafe.Pointer) *QSwipeGesture { - return newQSwipeGesture((*C.QSwipeGesture)(h)) +// UnsafeNewQSwipeGesture constructs the type using only unsafe pointers. +func UnsafeNewQSwipeGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QSwipeGesture { + if h == nil { + return nil + } + + return &QSwipeGesture{h: (*C.QSwipeGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQSwipeGesture constructs a new QSwipeGesture object. func NewQSwipeGesture() *QSwipeGesture { - ret := C.QSwipeGesture_new() - return newQSwipeGesture(ret) + var outptr_QSwipeGesture *C.QSwipeGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QSwipeGesture_new(&outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) + ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSwipeGesture2 constructs a new QSwipeGesture object. func NewQSwipeGesture2(parent *QObject) *QSwipeGesture { - ret := C.QSwipeGesture_new2(parent.cPointer()) - return newQSwipeGesture(ret) + var outptr_QSwipeGesture *C.QSwipeGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QSwipeGesture_new2(parent.cPointer(), &outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) + ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSwipeGesture) MetaObject() *QMetaObject { @@ -723,7 +972,7 @@ func QSwipeGesture_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QSwipeGesture) Delete() { - C.QSwipeGesture_Delete(this.h) + C.QSwipeGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -736,7 +985,8 @@ func (this *QSwipeGesture) GoGC() { } type QTapGesture struct { - h *C.QTapGesture + h *C.QTapGesture + isSubclass bool *QGesture } @@ -754,27 +1004,47 @@ func (this *QTapGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTapGesture(h *C.QTapGesture) *QTapGesture { +// newQTapGesture constructs the type using only CGO pointers. +func newQTapGesture(h *C.QTapGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapGesture { if h == nil { return nil } - return &QTapGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QTapGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQTapGesture(h unsafe.Pointer) *QTapGesture { - return newQTapGesture((*C.QTapGesture)(h)) +// UnsafeNewQTapGesture constructs the type using only unsafe pointers. +func UnsafeNewQTapGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapGesture { + if h == nil { + return nil + } + + return &QTapGesture{h: (*C.QTapGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQTapGesture constructs a new QTapGesture object. func NewQTapGesture() *QTapGesture { - ret := C.QTapGesture_new() - return newQTapGesture(ret) + var outptr_QTapGesture *C.QTapGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapGesture_new(&outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTapGesture2 constructs a new QTapGesture object. func NewQTapGesture2(parent *QObject) *QTapGesture { - ret := C.QTapGesture_new2(parent.cPointer()) - return newQTapGesture(ret) + var outptr_QTapGesture *C.QTapGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapGesture_new2(parent.cPointer(), &outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTapGesture) MetaObject() *QMetaObject { @@ -862,7 +1132,7 @@ func QTapGesture_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTapGesture) Delete() { - C.QTapGesture_Delete(this.h) + C.QTapGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -875,7 +1145,8 @@ func (this *QTapGesture) GoGC() { } type QTapAndHoldGesture struct { - h *C.QTapAndHoldGesture + h *C.QTapAndHoldGesture + isSubclass bool *QGesture } @@ -893,27 +1164,47 @@ func (this *QTapAndHoldGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTapAndHoldGesture(h *C.QTapAndHoldGesture) *QTapAndHoldGesture { +// newQTapAndHoldGesture constructs the type using only CGO pointers. +func newQTapAndHoldGesture(h *C.QTapAndHoldGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapAndHoldGesture { if h == nil { return nil } - return &QTapAndHoldGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QTapAndHoldGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer) *QTapAndHoldGesture { - return newQTapAndHoldGesture((*C.QTapAndHoldGesture)(h)) +// UnsafeNewQTapAndHoldGesture constructs the type using only unsafe pointers. +func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapAndHoldGesture { + if h == nil { + return nil + } + + return &QTapAndHoldGesture{h: (*C.QTapAndHoldGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQTapAndHoldGesture constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture() *QTapAndHoldGesture { - ret := C.QTapAndHoldGesture_new() - return newQTapAndHoldGesture(ret) + var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapAndHoldGesture_new(&outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTapAndHoldGesture2 constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture2(parent *QObject) *QTapAndHoldGesture { - ret := C.QTapAndHoldGesture_new2(parent.cPointer()) - return newQTapAndHoldGesture(ret) + var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapAndHoldGesture_new2(parent.cPointer(), &outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTapAndHoldGesture) MetaObject() *QMetaObject { @@ -1009,7 +1300,7 @@ func QTapAndHoldGesture_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTapAndHoldGesture) Delete() { - C.QTapAndHoldGesture_Delete(this.h) + C.QTapAndHoldGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1022,7 +1313,8 @@ func (this *QTapAndHoldGesture) GoGC() { } type QGestureEvent struct { - h *C.QGestureEvent + h *C.QGestureEvent + isSubclass bool *QEvent } @@ -1040,15 +1332,23 @@ func (this *QGestureEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGestureEvent(h *C.QGestureEvent) *QGestureEvent { +// newQGestureEvent constructs the type using only CGO pointers. +func newQGestureEvent(h *C.QGestureEvent, h_QEvent *C.QEvent) *QGestureEvent { if h == nil { return nil } - return &QGestureEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QGestureEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQGestureEvent(h unsafe.Pointer) *QGestureEvent { - return newQGestureEvent((*C.QGestureEvent)(h)) +// UnsafeNewQGestureEvent constructs the type using only unsafe pointers. +func UnsafeNewQGestureEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGestureEvent { + if h == nil { + return nil + } + + return &QGestureEvent{h: (*C.QGestureEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQGestureEvent constructs a new QGestureEvent object. @@ -1059,14 +1359,24 @@ func NewQGestureEvent(gestures []*QGesture) *QGestureEvent { gestures_CArray[i] = gestures[i].cPointer() } gestures_ma := C.struct_miqt_array{len: C.size_t(len(gestures)), data: unsafe.Pointer(gestures_CArray)} - ret := C.QGestureEvent_new(gestures_ma) - return newQGestureEvent(ret) + var outptr_QGestureEvent *C.QGestureEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGestureEvent_new(gestures_ma, &outptr_QGestureEvent, &outptr_QEvent) + ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGestureEvent2 constructs a new QGestureEvent object. func NewQGestureEvent2(param1 *QGestureEvent) *QGestureEvent { - ret := C.QGestureEvent_new2(param1.cPointer()) - return newQGestureEvent(ret) + var outptr_QGestureEvent *C.QGestureEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGestureEvent_new2(param1.cPointer(), &outptr_QGestureEvent, &outptr_QEvent) + ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGestureEvent) Gestures() []*QGesture { @@ -1074,13 +1384,13 @@ func (this *QGestureEvent) Gestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QGestureEvent) Gesture(typeVal GestureType) *QGesture { - return UnsafeNewQGesture(unsafe.Pointer(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal)))) + return UnsafeNewQGesture(unsafe.Pointer(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal))), nil) } func (this *QGestureEvent) ActiveGestures() []*QGesture { @@ -1088,7 +1398,7 @@ func (this *QGestureEvent) ActiveGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -1098,7 +1408,7 @@ func (this *QGestureEvent) CanceledGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -1140,7 +1450,7 @@ func (this *QGestureEvent) SetWidget(widget *QWidget) { } func (this *QGestureEvent) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGestureEvent_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGestureEvent_Widget(this.h)), nil, nil) } func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF { @@ -1152,7 +1462,7 @@ func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF { // Delete this object from C++ memory. func (this *QGestureEvent) Delete() { - C.QGestureEvent_Delete(this.h) + C.QGestureEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgesture.h b/qt/gen_qgesture.h index 7d53e6cd..664d62e9 100644 --- a/qt/gen_qgesture.h +++ b/qt/gen_qgesture.h @@ -15,8 +15,11 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGesture; class QGestureEvent; +class QMetaMethod; class QMetaObject; class QObject; class QPanGesture; @@ -25,10 +28,14 @@ class QPointF; class QSwipeGesture; class QTapAndHoldGesture; class QTapGesture; +class QTimerEvent; class QWidget; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGesture QGesture; typedef struct QGestureEvent QGestureEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPanGesture QPanGesture; @@ -37,11 +44,12 @@ typedef struct QPointF QPointF; typedef struct QSwipeGesture QSwipeGesture; typedef struct QTapAndHoldGesture QTapAndHoldGesture; typedef struct QTapGesture QTapGesture; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QGesture* QGesture_new(); -QGesture* QGesture_new2(QObject* parent); +void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject); +void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QGesture_MetaObject(const QGesture* self); void* QGesture_Metacast(QGesture* self, const char* param1); struct miqt_string QGesture_Tr(const char* s); @@ -58,10 +66,24 @@ struct miqt_string QGesture_Tr2(const char* s, const char* c); struct miqt_string QGesture_Tr3(const char* s, const char* c, int n); struct miqt_string QGesture_TrUtf82(const char* s, const char* c); struct miqt_string QGesture_TrUtf83(const char* s, const char* c, int n); -void QGesture_Delete(QGesture* self); +void QGesture_override_virtual_Event(void* self, intptr_t slot); +bool QGesture_virtualbase_Event(void* self, QEvent* event); +void QGesture_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGesture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGesture_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGesture_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGesture_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGesture_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGesture_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGesture_virtualbase_CustomEvent(void* self, QEvent* event); +void QGesture_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGesture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGesture_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGesture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGesture_Delete(QGesture* self, bool isSubclass); -QPanGesture* QPanGesture_new(); -QPanGesture* QPanGesture_new2(QObject* parent); +void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QPanGesture_MetaObject(const QPanGesture* self); void* QPanGesture_Metacast(QPanGesture* self, const char* param1); struct miqt_string QPanGesture_Tr(const char* s); @@ -77,10 +99,10 @@ struct miqt_string QPanGesture_Tr2(const char* s, const char* c); struct miqt_string QPanGesture_Tr3(const char* s, const char* c, int n); struct miqt_string QPanGesture_TrUtf82(const char* s, const char* c); struct miqt_string QPanGesture_TrUtf83(const char* s, const char* c, int n); -void QPanGesture_Delete(QPanGesture* self); +void QPanGesture_Delete(QPanGesture* self, bool isSubclass); -QPinchGesture* QPinchGesture_new(); -QPinchGesture* QPinchGesture_new2(QObject* parent); +void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self); void* QPinchGesture_Metacast(QPinchGesture* self, const char* param1); struct miqt_string QPinchGesture_Tr(const char* s); @@ -111,10 +133,10 @@ struct miqt_string QPinchGesture_Tr2(const char* s, const char* c); struct miqt_string QPinchGesture_Tr3(const char* s, const char* c, int n); struct miqt_string QPinchGesture_TrUtf82(const char* s, const char* c); struct miqt_string QPinchGesture_TrUtf83(const char* s, const char* c, int n); -void QPinchGesture_Delete(QPinchGesture* self); +void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass); -QSwipeGesture* QSwipeGesture_new(); -QSwipeGesture* QSwipeGesture_new2(QObject* parent); +void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self); void* QSwipeGesture_Metacast(QSwipeGesture* self, const char* param1); struct miqt_string QSwipeGesture_Tr(const char* s); @@ -127,10 +149,10 @@ struct miqt_string QSwipeGesture_Tr2(const char* s, const char* c); struct miqt_string QSwipeGesture_Tr3(const char* s, const char* c, int n); struct miqt_string QSwipeGesture_TrUtf82(const char* s, const char* c); struct miqt_string QSwipeGesture_TrUtf83(const char* s, const char* c, int n); -void QSwipeGesture_Delete(QSwipeGesture* self); +void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass); -QTapGesture* QTapGesture_new(); -QTapGesture* QTapGesture_new2(QObject* parent); +void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QTapGesture_MetaObject(const QTapGesture* self); void* QTapGesture_Metacast(QTapGesture* self, const char* param1); struct miqt_string QTapGesture_Tr(const char* s); @@ -141,10 +163,10 @@ struct miqt_string QTapGesture_Tr2(const char* s, const char* c); struct miqt_string QTapGesture_Tr3(const char* s, const char* c, int n); struct miqt_string QTapGesture_TrUtf82(const char* s, const char* c); struct miqt_string QTapGesture_TrUtf83(const char* s, const char* c, int n); -void QTapGesture_Delete(QTapGesture* self); +void QTapGesture_Delete(QTapGesture* self, bool isSubclass); -QTapAndHoldGesture* QTapAndHoldGesture_new(); -QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent); +void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self); void* QTapAndHoldGesture_Metacast(QTapAndHoldGesture* self, const char* param1); struct miqt_string QTapAndHoldGesture_Tr(const char* s); @@ -157,10 +179,10 @@ struct miqt_string QTapAndHoldGesture_Tr2(const char* s, const char* c); struct miqt_string QTapAndHoldGesture_Tr3(const char* s, const char* c, int n); struct miqt_string QTapAndHoldGesture_TrUtf82(const char* s, const char* c); struct miqt_string QTapAndHoldGesture_TrUtf83(const char* s, const char* c, int n); -void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self); +void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass); -QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures); -QGestureEvent* QGestureEvent_new2(QGestureEvent* param1); +void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); +void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self); QGesture* QGestureEvent_Gesture(const QGestureEvent* self, int typeVal); struct miqt_array /* of QGesture* */ QGestureEvent_ActiveGestures(const QGestureEvent* self); @@ -176,7 +198,7 @@ bool QGestureEvent_IsAcceptedWithQtGestureType(const QGestureEvent* self, int pa void QGestureEvent_SetWidget(QGestureEvent* self, QWidget* widget); QWidget* QGestureEvent_Widget(const QGestureEvent* self); QPointF* QGestureEvent_MapToGraphicsScene(const QGestureEvent* self, QPointF* gesturePoint); -void QGestureEvent_Delete(QGestureEvent* self); +void QGestureEvent_Delete(QGestureEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgesturerecognizer.cpp b/qt/gen_qgesturerecognizer.cpp index 09b14c52..2e305523 100644 --- a/qt/gen_qgesturerecognizer.cpp +++ b/qt/gen_qgesturerecognizer.cpp @@ -32,7 +32,11 @@ void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecogni self->operator=(*param1); } -void QGestureRecognizer_Delete(QGestureRecognizer* self) { - delete self; +void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgesturerecognizer.go b/qt/gen_qgesturerecognizer.go index eab661e9..ad023e0a 100644 --- a/qt/gen_qgesturerecognizer.go +++ b/qt/gen_qgesturerecognizer.go @@ -27,7 +27,8 @@ const ( ) type QGestureRecognizer struct { - h *C.QGestureRecognizer + h *C.QGestureRecognizer + isSubclass bool } func (this *QGestureRecognizer) cPointer() *C.QGestureRecognizer { @@ -44,6 +45,7 @@ func (this *QGestureRecognizer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGestureRecognizer constructs the type using only CGO pointers. func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer { if h == nil { return nil @@ -51,12 +53,17 @@ func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer { return &QGestureRecognizer{h: h} } +// UnsafeNewQGestureRecognizer constructs the type using only unsafe pointers. func UnsafeNewQGestureRecognizer(h unsafe.Pointer) *QGestureRecognizer { - return newQGestureRecognizer((*C.QGestureRecognizer)(h)) + if h == nil { + return nil + } + + return &QGestureRecognizer{h: (*C.QGestureRecognizer)(h)} } func (this *QGestureRecognizer) Create(target *QObject) *QGesture { - return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_Create(this.h, target.cPointer()))) + return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_Create(this.h, target.cPointer())), nil) } func (this *QGestureRecognizer) Recognize(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag { @@ -81,7 +88,7 @@ func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) { // Delete this object from C++ memory. func (this *QGestureRecognizer) Delete() { - C.QGestureRecognizer_Delete(this.h) + C.QGestureRecognizer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgesturerecognizer.h b/qt/gen_qgesturerecognizer.h index e561ac80..063d5c1d 100644 --- a/qt/gen_qgesturerecognizer.h +++ b/qt/gen_qgesturerecognizer.h @@ -32,7 +32,7 @@ void QGestureRecognizer_Reset(QGestureRecognizer* self, QGesture* state); int QGestureRecognizer_RegisterRecognizer(QGestureRecognizer* recognizer); void QGestureRecognizer_UnregisterRecognizer(int typeVal); void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecognizer* param1); -void QGestureRecognizer_Delete(QGestureRecognizer* self); +void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qglyphrun.cpp b/qt/gen_qglyphrun.cpp index 76791218..7cf3d01d 100644 --- a/qt/gen_qglyphrun.cpp +++ b/qt/gen_qglyphrun.cpp @@ -7,12 +7,14 @@ #include "gen_qglyphrun.h" #include "_cgo_export.h" -QGlyphRun* QGlyphRun_new() { - return new QGlyphRun(); +void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun) { + QGlyphRun* ret = new QGlyphRun(); + *outptr_QGlyphRun = ret; } -QGlyphRun* QGlyphRun_new2(QGlyphRun* other) { - return new QGlyphRun(*other); +void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun) { + QGlyphRun* ret = new QGlyphRun(*other); + *outptr_QGlyphRun = ret; } void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other) { @@ -154,7 +156,11 @@ void QGlyphRun_SetFlag2(QGlyphRun* self, int flag, bool enabled) { self->setFlag(static_cast(flag), enabled); } -void QGlyphRun_Delete(QGlyphRun* self) { - delete self; +void QGlyphRun_Delete(QGlyphRun* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qglyphrun.go b/qt/gen_qglyphrun.go index 476bd54f..8968fd65 100644 --- a/qt/gen_qglyphrun.go +++ b/qt/gen_qglyphrun.go @@ -24,7 +24,8 @@ const ( ) type QGlyphRun struct { - h *C.QGlyphRun + h *C.QGlyphRun + isSubclass bool } func (this *QGlyphRun) cPointer() *C.QGlyphRun { @@ -41,6 +42,7 @@ func (this *QGlyphRun) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGlyphRun constructs the type using only CGO pointers. func newQGlyphRun(h *C.QGlyphRun) *QGlyphRun { if h == nil { return nil @@ -48,20 +50,33 @@ func newQGlyphRun(h *C.QGlyphRun) *QGlyphRun { return &QGlyphRun{h: h} } +// UnsafeNewQGlyphRun constructs the type using only unsafe pointers. func UnsafeNewQGlyphRun(h unsafe.Pointer) *QGlyphRun { - return newQGlyphRun((*C.QGlyphRun)(h)) + if h == nil { + return nil + } + + return &QGlyphRun{h: (*C.QGlyphRun)(h)} } // NewQGlyphRun constructs a new QGlyphRun object. func NewQGlyphRun() *QGlyphRun { - ret := C.QGlyphRun_new() - return newQGlyphRun(ret) + var outptr_QGlyphRun *C.QGlyphRun = nil + + C.QGlyphRun_new(&outptr_QGlyphRun) + ret := newQGlyphRun(outptr_QGlyphRun) + ret.isSubclass = true + return ret } // NewQGlyphRun2 constructs a new QGlyphRun object. func NewQGlyphRun2(other *QGlyphRun) *QGlyphRun { - ret := C.QGlyphRun_new2(other.cPointer()) - return newQGlyphRun(ret) + var outptr_QGlyphRun *C.QGlyphRun = nil + + C.QGlyphRun_new2(other.cPointer(), &outptr_QGlyphRun) + ret := newQGlyphRun(outptr_QGlyphRun) + ret.isSubclass = true + return ret } func (this *QGlyphRun) OperatorAssign(other *QGlyphRun) { @@ -207,7 +222,7 @@ func (this *QGlyphRun) SetFlag2(flag QGlyphRun__GlyphRunFlag, enabled bool) { // Delete this object from C++ memory. func (this *QGlyphRun) Delete() { - C.QGlyphRun_Delete(this.h) + C.QGlyphRun_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qglyphrun.h b/qt/gen_qglyphrun.h index 7c723b62..ff743035 100644 --- a/qt/gen_qglyphrun.h +++ b/qt/gen_qglyphrun.h @@ -26,8 +26,8 @@ typedef struct QRawFont QRawFont; typedef struct QRectF QRectF; #endif -QGlyphRun* QGlyphRun_new(); -QGlyphRun* QGlyphRun_new2(QGlyphRun* other); +void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun); +void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun); void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other); void QGlyphRun_Swap(QGlyphRun* self, QGlyphRun* other); QRawFont* QGlyphRun_RawFont(const QGlyphRun* self); @@ -55,7 +55,7 @@ void QGlyphRun_SetBoundingRect(QGlyphRun* self, QRectF* boundingRect); QRectF* QGlyphRun_BoundingRect(const QGlyphRun* self); bool QGlyphRun_IsEmpty(const QGlyphRun* self); void QGlyphRun_SetFlag2(QGlyphRun* self, int flag, bool enabled); -void QGlyphRun_Delete(QGlyphRun* self); +void QGlyphRun_Delete(QGlyphRun* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsanchorlayout.cpp b/qt/gen_qgraphicsanchorlayout.cpp index 84a8283b..1129fa3d 100644 --- a/qt/gen_qgraphicsanchorlayout.cpp +++ b/qt/gen_qgraphicsanchorlayout.cpp @@ -1,8 +1,12 @@ +#include #include #include +#include #include #include +#include #include +#include #include #include #include @@ -106,16 +110,259 @@ struct miqt_string QGraphicsAnchor_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QGraphicsAnchor_Delete(QGraphicsAnchor* self) { - delete self; +void QGraphicsAnchor_Delete(QGraphicsAnchor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new() { - return new QGraphicsAnchorLayout(); +class MiqtVirtualQGraphicsAnchorLayout : public virtual QGraphicsAnchorLayout { +public: + + MiqtVirtualQGraphicsAnchorLayout(): QGraphicsAnchorLayout() {}; + MiqtVirtualQGraphicsAnchorLayout(QGraphicsLayoutItem* parent): QGraphicsAnchorLayout(parent) {}; + + virtual ~MiqtVirtualQGraphicsAnchorLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveAt = 0; + + // Subclass to allow providing a Go implementation + virtual void removeAt(int index) override { + if (handle__RemoveAt == 0) { + QGraphicsAnchorLayout::removeAt(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsAnchorLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveAt(int index) { + + QGraphicsAnchorLayout::removeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsAnchorLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsAnchorLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsAnchorLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGraphicsAnchorLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsAnchorLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGraphicsAnchorLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int index) const override { + if (handle__ItemAt == 0) { + return QGraphicsAnchorLayout::itemAt(index); + } + + int sigval1 = index; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsAnchorLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGraphicsLayoutItem* virtualbase_ItemAt(int index) const { + + return QGraphicsAnchorLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGraphicsAnchorLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsAnchorLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsAnchorLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsAnchorLayout::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsAnchorLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsAnchorLayout::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsAnchorLayout::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsAnchorLayout_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsAnchorLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsAnchorLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsAnchorLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsAnchorLayout::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WidgetEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void widgetEvent(QEvent* e) override { + if (handle__WidgetEvent == 0) { + QGraphicsAnchorLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsAnchorLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsAnchorLayout::widgetEvent(e); + + } + +}; + +void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(); + *outptr_QGraphicsAnchorLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent) { - return new QGraphicsAnchorLayout(parent); +void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(parent); + *outptr_QGraphicsAnchorLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge) { @@ -180,7 +427,83 @@ void QGraphicsAnchorLayout_AddAnchors3(QGraphicsAnchorLayout* self, QGraphicsLay self->addAnchors(firstItem, secondItem, static_cast(orientations)); } -void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self) { - delete self; +void QGraphicsAnchorLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsAnchorLayout_virtualbase_RemoveAt(void* self, int index) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_RemoveAt(index); +} + +void QGraphicsAnchorLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsAnchorLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsAnchorLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__Count = slot; +} + +int QGraphicsAnchorLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_Count(); +} + +void QGraphicsAnchorLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__ItemAt = slot; +} + +QGraphicsLayoutItem* QGraphicsAnchorLayout_virtualbase_ItemAt(const void* self, int index) { + return ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_ItemAt(index); +} + +void QGraphicsAnchorLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsAnchorLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsAnchorLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsAnchorLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsAnchorLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsAnchorLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsAnchorLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsAnchorLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsAnchorLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsAnchorLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_WidgetEvent(e); +} + +void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsanchorlayout.go b/qt/gen_qgraphicsanchorlayout.go index cd2754a0..1acd5e30 100644 --- a/qt/gen_qgraphicsanchorlayout.go +++ b/qt/gen_qgraphicsanchorlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsAnchor struct { - h *C.QGraphicsAnchor + h *C.QGraphicsAnchor + isSubclass bool *QObject } @@ -32,15 +34,23 @@ func (this *QGraphicsAnchor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsAnchor(h *C.QGraphicsAnchor) *QGraphicsAnchor { +// newQGraphicsAnchor constructs the type using only CGO pointers. +func newQGraphicsAnchor(h *C.QGraphicsAnchor, h_QObject *C.QObject) *QGraphicsAnchor { if h == nil { return nil } - return &QGraphicsAnchor{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsAnchor{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsAnchor(h unsafe.Pointer) *QGraphicsAnchor { - return newQGraphicsAnchor((*C.QGraphicsAnchor)(h)) +// UnsafeNewQGraphicsAnchor constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsAnchor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsAnchor { + if h == nil { + return nil + } + + return &QGraphicsAnchor{h: (*C.QGraphicsAnchor)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGraphicsAnchor) MetaObject() *QMetaObject { @@ -137,7 +147,7 @@ func QGraphicsAnchor_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGraphicsAnchor) Delete() { - C.QGraphicsAnchor_Delete(this.h) + C.QGraphicsAnchor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -150,7 +160,8 @@ func (this *QGraphicsAnchor) GoGC() { } type QGraphicsAnchorLayout struct { - h *C.QGraphicsAnchorLayout + h *C.QGraphicsAnchorLayout + isSubclass bool *QGraphicsLayout } @@ -168,35 +179,55 @@ func (this *QGraphicsAnchorLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout) *QGraphicsAnchorLayout { +// newQGraphicsAnchorLayout constructs the type using only CGO pointers. +func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsAnchorLayout { if h == nil { return nil } - return &QGraphicsAnchorLayout{h: h, QGraphicsLayout: UnsafeNewQGraphicsLayout(unsafe.Pointer(h))} + return &QGraphicsAnchorLayout{h: h, + QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer) *QGraphicsAnchorLayout { - return newQGraphicsAnchorLayout((*C.QGraphicsAnchorLayout)(h)) +// UnsafeNewQGraphicsAnchorLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsAnchorLayout { + if h == nil { + return nil + } + + return &QGraphicsAnchorLayout{h: (*C.QGraphicsAnchorLayout)(h), + QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } // NewQGraphicsAnchorLayout constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout() *QGraphicsAnchorLayout { - ret := C.QGraphicsAnchorLayout_new() - return newQGraphicsAnchorLayout(ret) + var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsAnchorLayout_new(&outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsAnchorLayout2 constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout2(parent *QGraphicsLayoutItem) *QGraphicsAnchorLayout { - ret := C.QGraphicsAnchorLayout_new2(parent.cPointer()) - return newQGraphicsAnchorLayout(ret) + var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsAnchorLayout_new2(parent.cPointer(), &outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsAnchorLayout) AddAnchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)))) + return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))), nil) } func (this *QGraphicsAnchorLayout) Anchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)))) + return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))), nil) } func (this *QGraphicsAnchorLayout) AddCornerAnchors(firstItem *QGraphicsLayoutItem, firstCorner Corner, secondItem *QGraphicsLayoutItem, secondCorner Corner) { @@ -251,9 +282,223 @@ func (this *QGraphicsAnchorLayout) AddAnchors3(firstItem *QGraphicsLayoutItem, s C.QGraphicsAnchorLayout_AddAnchors3(this.h, firstItem.cPointer(), secondItem.cPointer(), (C.int)(orientations)) } +func (this *QGraphicsAnchorLayout) callVirtualBase_RemoveAt(index int) { + + C.QGraphicsAnchorLayout_virtualbase_RemoveAt(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QGraphicsAnchorLayout) OnRemoveAt(slot func(super func(index int), index int)) { + C.QGraphicsAnchorLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_RemoveAt +func miqt_exec_callback_QGraphicsAnchorLayout_RemoveAt(self *C.QGraphicsAnchorLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_RemoveAt, slotval1) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsAnchorLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsAnchorLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsAnchorLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_SetGeometry +func miqt_exec_callback_QGraphicsAnchorLayout_SetGeometry(self *C.QGraphicsAnchorLayout, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_Count() int { + + return (int)(C.QGraphicsAnchorLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsAnchorLayout) OnCount(slot func(super func() int) int) { + C.QGraphicsAnchorLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_Count +func miqt_exec_callback_QGraphicsAnchorLayout_Count(self *C.QGraphicsAnchorLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_ItemAt(index int) *QGraphicsLayoutItem { + + return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsAnchorLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGraphicsAnchorLayout) OnItemAt(slot func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) { + C.QGraphicsAnchorLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_ItemAt +func miqt_exec_callback_QGraphicsAnchorLayout_ItemAt(self *C.QGraphicsAnchorLayout, cb C.intptr_t, index C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_Invalidate() { + + C.QGraphicsAnchorLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsAnchorLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsAnchorLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_Invalidate +func miqt_exec_callback_QGraphicsAnchorLayout_Invalidate(self *C.QGraphicsAnchorLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsAnchorLayout_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsAnchorLayout) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsAnchorLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_SizeHint +func miqt_exec_callback_QGraphicsAnchorLayout_SizeHint(self *C.QGraphicsAnchorLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsAnchorLayout_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsAnchorLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsAnchorLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsAnchorLayout_GetContentsMargins(self *C.QGraphicsAnchorLayout, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsAnchorLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsAnchorLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsAnchorLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsAnchorLayout_UpdateGeometry(self *C.QGraphicsAnchorLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsAnchorLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsAnchorLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsAnchorLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_WidgetEvent +func miqt_exec_callback_QGraphicsAnchorLayout_WidgetEvent(self *C.QGraphicsAnchorLayout, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsAnchorLayout) Delete() { - C.QGraphicsAnchorLayout_Delete(this.h) + C.QGraphicsAnchorLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsanchorlayout.h b/qt/gen_qgraphicsanchorlayout.h index 6d2d02fe..93219e2a 100644 --- a/qt/gen_qgraphicsanchorlayout.h +++ b/qt/gen_qgraphicsanchorlayout.h @@ -15,17 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsAnchor; class QGraphicsAnchorLayout; +class QGraphicsLayout; class QGraphicsLayoutItem; class QMetaObject; +class QObject; class QRectF; +class QSizeF; #else +typedef struct QEvent QEvent; typedef struct QGraphicsAnchor QGraphicsAnchor; typedef struct QGraphicsAnchorLayout QGraphicsAnchorLayout; +typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRectF QRectF; +typedef struct QSizeF QSizeF; #endif QMetaObject* QGraphicsAnchor_MetaObject(const QGraphicsAnchor* self); @@ -41,10 +49,10 @@ struct miqt_string QGraphicsAnchor_Tr2(const char* s, const char* c); struct miqt_string QGraphicsAnchor_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsAnchor_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsAnchor_TrUtf83(const char* s, const char* c, int n); -void QGraphicsAnchor_Delete(QGraphicsAnchor* self); +void QGraphicsAnchor_Delete(QGraphicsAnchor* self, bool isSubclass); -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new(); -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); QGraphicsAnchor* QGraphicsAnchorLayout_Anchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); void QGraphicsAnchorLayout_AddCornerAnchors(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstCorner, QGraphicsLayoutItem* secondItem, int secondCorner); @@ -59,8 +67,27 @@ void QGraphicsAnchorLayout_SetGeometry(QGraphicsAnchorLayout* self, QRectF* rect int QGraphicsAnchorLayout_Count(const QGraphicsAnchorLayout* self); QGraphicsLayoutItem* QGraphicsAnchorLayout_ItemAt(const QGraphicsAnchorLayout* self, int index); void QGraphicsAnchorLayout_Invalidate(QGraphicsAnchorLayout* self); +QSizeF* QGraphicsAnchorLayout_SizeHint(const QGraphicsAnchorLayout* self, int which, QSizeF* constraint); void QGraphicsAnchorLayout_AddAnchors3(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, QGraphicsLayoutItem* secondItem, int orientations); -void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self); +void QGraphicsAnchorLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsAnchorLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsAnchorLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsAnchorLayout_virtualbase_Count(const void* self); +void QGraphicsAnchorLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsAnchorLayout_virtualbase_ItemAt(const void* self, int index); +void QGraphicsAnchorLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_Invalidate(void* self); +void QGraphicsAnchorLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsAnchorLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsAnchorLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsAnchorLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsAnchorLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicseffect.cpp b/qt/gen_qgraphicseffect.cpp index 5a87b0e6..394207cd 100644 --- a/qt/gen_qgraphicseffect.cpp +++ b/qt/gen_qgraphicseffect.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -121,16 +122,110 @@ struct miqt_string QGraphicsEffect_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QGraphicsEffect_Delete(QGraphicsEffect* self) { - delete self; +void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new() { - return new QGraphicsColorizeEffect(); +class MiqtVirtualQGraphicsColorizeEffect : public virtual QGraphicsColorizeEffect { +public: + + MiqtVirtualQGraphicsColorizeEffect(): QGraphicsColorizeEffect() {}; + MiqtVirtualQGraphicsColorizeEffect(QObject* parent): QGraphicsColorizeEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsColorizeEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsColorizeEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsColorizeEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsColorizeEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& sourceRect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsColorizeEffect::boundingRectFor(sourceRect); + } + + const QRectF& sourceRect_ret = sourceRect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&sourceRect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsColorizeEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* sourceRect) const { + + return new QRectF(QGraphicsColorizeEffect::boundingRectFor(*sourceRect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsColorizeEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsColorizeEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsColorizeEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(); + *outptr_QGraphicsColorizeEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent) { - return new QGraphicsColorizeEffect(parent); +void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(parent); + *outptr_QGraphicsColorizeEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self) { @@ -185,7 +280,7 @@ void QGraphicsColorizeEffect_ColorChanged(QGraphicsColorizeEffect* self, QColor* } void QGraphicsColorizeEffect_connect_ColorChanged(QGraphicsColorizeEffect* self, intptr_t slot) { - QGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::colorChanged), self, [=](const QColor& color) { + MiqtVirtualQGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::colorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -198,7 +293,7 @@ void QGraphicsColorizeEffect_StrengthChanged(QGraphicsColorizeEffect* self, doub } void QGraphicsColorizeEffect_connect_StrengthChanged(QGraphicsColorizeEffect* self, intptr_t slot) { - QGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::strengthChanged), self, [=](qreal strength) { + MiqtVirtualQGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::strengthChanged), self, [=](qreal strength) { qreal strength_ret = strength; double sigval1 = static_cast(strength_ret); miqt_exec_callback_QGraphicsColorizeEffect_StrengthChanged(slot, sigval1); @@ -249,16 +344,134 @@ struct miqt_string QGraphicsColorizeEffect_TrUtf83(const char* s, const char* c, return _ms; } -void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self) { - delete self; +void QGraphicsColorizeEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsColorizeEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsColorizeEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsColorizeEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsColorizeEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsColorizeEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsColorizeEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect) { + return ( (const MiqtVirtualQGraphicsColorizeEffect*)(self) )->virtualbase_BoundingRectFor(sourceRect); +} + +void QGraphicsColorizeEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsColorizeEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsColorizeEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsColorizeEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsBlurEffect* QGraphicsBlurEffect_new() { - return new QGraphicsBlurEffect(); +class MiqtVirtualQGraphicsBlurEffect : public virtual QGraphicsBlurEffect { +public: + + MiqtVirtualQGraphicsBlurEffect(): QGraphicsBlurEffect() {}; + MiqtVirtualQGraphicsBlurEffect(QObject* parent): QGraphicsBlurEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsBlurEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& rect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsBlurEffect::boundingRectFor(rect); + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsBlurEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* rect) const { + + return new QRectF(QGraphicsBlurEffect::boundingRectFor(*rect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsBlurEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsBlurEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsBlurEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsBlurEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsBlurEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsBlurEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(); + *outptr_QGraphicsBlurEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent) { - return new QGraphicsBlurEffect(parent); +void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(parent); + *outptr_QGraphicsBlurEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self) { @@ -318,7 +531,7 @@ void QGraphicsBlurEffect_BlurRadiusChanged(QGraphicsBlurEffect* self, double blu } void QGraphicsBlurEffect_connect_BlurRadiusChanged(QGraphicsBlurEffect* self, intptr_t slot) { - QGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurRadiusChanged), self, [=](qreal blurRadius) { + MiqtVirtualQGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurRadiusChanged), self, [=](qreal blurRadius) { qreal blurRadius_ret = blurRadius; double sigval1 = static_cast(blurRadius_ret); miqt_exec_callback_QGraphicsBlurEffect_BlurRadiusChanged(slot, sigval1); @@ -330,7 +543,7 @@ void QGraphicsBlurEffect_BlurHintsChanged(QGraphicsBlurEffect* self, int hints) } void QGraphicsBlurEffect_connect_BlurHintsChanged(QGraphicsBlurEffect* self, intptr_t slot) { - QGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurHintsChanged), self, [=](QGraphicsBlurEffect::BlurHints hints) { + MiqtVirtualQGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurHintsChanged), self, [=](QGraphicsBlurEffect::BlurHints hints) { QGraphicsBlurEffect::BlurHints hints_ret = hints; int sigval1 = static_cast(hints_ret); miqt_exec_callback_QGraphicsBlurEffect_BlurHintsChanged(slot, sigval1); @@ -381,16 +594,134 @@ struct miqt_string QGraphicsBlurEffect_TrUtf83(const char* s, const char* c, int return _ms; } -void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self) { - delete self; +void QGraphicsBlurEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsBlurEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsBlurEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect) { + return ( (const MiqtVirtualQGraphicsBlurEffect*)(self) )->virtualbase_BoundingRectFor(rect); +} + +void QGraphicsBlurEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsBlurEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsBlurEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsBlurEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsBlurEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsBlurEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsBlurEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsBlurEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new() { - return new QGraphicsDropShadowEffect(); +class MiqtVirtualQGraphicsDropShadowEffect : public virtual QGraphicsDropShadowEffect { +public: + + MiqtVirtualQGraphicsDropShadowEffect(): QGraphicsDropShadowEffect() {}; + MiqtVirtualQGraphicsDropShadowEffect(QObject* parent): QGraphicsDropShadowEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsDropShadowEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& rect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsDropShadowEffect::boundingRectFor(rect); + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsDropShadowEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* rect) const { + + return new QRectF(QGraphicsDropShadowEffect::boundingRectFor(*rect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsDropShadowEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsDropShadowEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsDropShadowEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsDropShadowEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsDropShadowEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsDropShadowEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(); + *outptr_QGraphicsDropShadowEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent) { - return new QGraphicsDropShadowEffect(parent); +void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(parent); + *outptr_QGraphicsDropShadowEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self) { @@ -483,7 +814,7 @@ void QGraphicsDropShadowEffect_OffsetChanged(QGraphicsDropShadowEffect* self, QP } void QGraphicsDropShadowEffect_connect_OffsetChanged(QGraphicsDropShadowEffect* self, intptr_t slot) { - QGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::offsetChanged), self, [=](const QPointF& offset) { + MiqtVirtualQGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::offsetChanged), self, [=](const QPointF& offset) { const QPointF& offset_ret = offset; // Cast returned reference into pointer QPointF* sigval1 = const_cast(&offset_ret); @@ -496,7 +827,7 @@ void QGraphicsDropShadowEffect_BlurRadiusChanged(QGraphicsDropShadowEffect* self } void QGraphicsDropShadowEffect_connect_BlurRadiusChanged(QGraphicsDropShadowEffect* self, intptr_t slot) { - QGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::blurRadiusChanged), self, [=](qreal blurRadius) { + MiqtVirtualQGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::blurRadiusChanged), self, [=](qreal blurRadius) { qreal blurRadius_ret = blurRadius; double sigval1 = static_cast(blurRadius_ret); miqt_exec_callback_QGraphicsDropShadowEffect_BlurRadiusChanged(slot, sigval1); @@ -508,7 +839,7 @@ void QGraphicsDropShadowEffect_ColorChanged(QGraphicsDropShadowEffect* self, QCo } void QGraphicsDropShadowEffect_connect_ColorChanged(QGraphicsDropShadowEffect* self, intptr_t slot) { - QGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::colorChanged), self, [=](const QColor& color) { + MiqtVirtualQGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::colorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -560,16 +891,134 @@ struct miqt_string QGraphicsDropShadowEffect_TrUtf83(const char* s, const char* return _ms; } -void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self) { - delete self; +void QGraphicsDropShadowEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsDropShadowEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsDropShadowEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect) { + return ( (const MiqtVirtualQGraphicsDropShadowEffect*)(self) )->virtualbase_BoundingRectFor(rect); +} + +void QGraphicsDropShadowEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsDropShadowEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsDropShadowEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsDropShadowEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsDropShadowEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsDropShadowEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsDropShadowEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsDropShadowEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new() { - return new QGraphicsOpacityEffect(); +class MiqtVirtualQGraphicsOpacityEffect : public virtual QGraphicsOpacityEffect { +public: + + MiqtVirtualQGraphicsOpacityEffect(): QGraphicsOpacityEffect() {}; + MiqtVirtualQGraphicsOpacityEffect(QObject* parent): QGraphicsOpacityEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsOpacityEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsOpacityEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsOpacityEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsOpacityEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& sourceRect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsOpacityEffect::boundingRectFor(sourceRect); + } + + const QRectF& sourceRect_ret = sourceRect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&sourceRect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsOpacityEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* sourceRect) const { + + return new QRectF(QGraphicsOpacityEffect::boundingRectFor(*sourceRect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsOpacityEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsOpacityEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsOpacityEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(); + *outptr_QGraphicsOpacityEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent) { - return new QGraphicsOpacityEffect(parent); +void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(parent); + *outptr_QGraphicsOpacityEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self) { @@ -624,7 +1073,7 @@ void QGraphicsOpacityEffect_OpacityChanged(QGraphicsOpacityEffect* self, double } void QGraphicsOpacityEffect_connect_OpacityChanged(QGraphicsOpacityEffect* self, intptr_t slot) { - QGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityChanged), self, [=](qreal opacity) { + MiqtVirtualQGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityChanged), self, [=](qreal opacity) { qreal opacity_ret = opacity; double sigval1 = static_cast(opacity_ret); miqt_exec_callback_QGraphicsOpacityEffect_OpacityChanged(slot, sigval1); @@ -636,7 +1085,7 @@ void QGraphicsOpacityEffect_OpacityMaskChanged(QGraphicsOpacityEffect* self, QBr } void QGraphicsOpacityEffect_connect_OpacityMaskChanged(QGraphicsOpacityEffect* self, intptr_t slot) { - QGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityMaskChanged), self, [=](const QBrush& mask) { + MiqtVirtualQGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityMaskChanged), self, [=](const QBrush& mask) { const QBrush& mask_ret = mask; // Cast returned reference into pointer QBrush* sigval1 = const_cast(&mask_ret); @@ -688,7 +1137,35 @@ struct miqt_string QGraphicsOpacityEffect_TrUtf83(const char* s, const char* c, return _ms; } -void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self) { - delete self; +void QGraphicsOpacityEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsOpacityEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsOpacityEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsOpacityEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsOpacityEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsOpacityEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsOpacityEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect) { + return ( (const MiqtVirtualQGraphicsOpacityEffect*)(self) )->virtualbase_BoundingRectFor(sourceRect); +} + +void QGraphicsOpacityEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsOpacityEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsOpacityEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsOpacityEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicseffect.go b/qt/gen_qgraphicseffect.go index 3922c1c9..ce669334 100644 --- a/qt/gen_qgraphicseffect.go +++ b/qt/gen_qgraphicseffect.go @@ -40,7 +40,8 @@ const ( ) type QGraphicsEffect struct { - h *C.QGraphicsEffect + h *C.QGraphicsEffect + isSubclass bool *QObject } @@ -58,15 +59,23 @@ func (this *QGraphicsEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsEffect(h *C.QGraphicsEffect) *QGraphicsEffect { +// newQGraphicsEffect constructs the type using only CGO pointers. +func newQGraphicsEffect(h *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsEffect { if h == nil { return nil } - return &QGraphicsEffect{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsEffect{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsEffect(h unsafe.Pointer) *QGraphicsEffect { - return newQGraphicsEffect((*C.QGraphicsEffect)(h)) +// UnsafeNewQGraphicsEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsEffect { + if h == nil { + return nil + } + + return &QGraphicsEffect{h: (*C.QGraphicsEffect)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGraphicsEffect) MetaObject() *QMetaObject { @@ -189,7 +198,7 @@ func QGraphicsEffect_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGraphicsEffect) Delete() { - C.QGraphicsEffect_Delete(this.h) + C.QGraphicsEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -202,7 +211,8 @@ func (this *QGraphicsEffect) GoGC() { } type QGraphicsColorizeEffect struct { - h *C.QGraphicsColorizeEffect + h *C.QGraphicsColorizeEffect + isSubclass bool *QGraphicsEffect } @@ -220,27 +230,47 @@ func (this *QGraphicsColorizeEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect) *QGraphicsColorizeEffect { +// newQGraphicsColorizeEffect constructs the type using only CGO pointers. +func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsColorizeEffect { if h == nil { return nil } - return &QGraphicsColorizeEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsColorizeEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer) *QGraphicsColorizeEffect { - return newQGraphicsColorizeEffect((*C.QGraphicsColorizeEffect)(h)) +// UnsafeNewQGraphicsColorizeEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsColorizeEffect { + if h == nil { + return nil + } + + return &QGraphicsColorizeEffect{h: (*C.QGraphicsColorizeEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsColorizeEffect constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect() *QGraphicsColorizeEffect { - ret := C.QGraphicsColorizeEffect_new() - return newQGraphicsColorizeEffect(ret) + var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsColorizeEffect_new(&outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsColorizeEffect2 constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect2(parent *QObject) *QGraphicsColorizeEffect { - ret := C.QGraphicsColorizeEffect_new2(parent.cPointer()) - return newQGraphicsColorizeEffect(ret) + var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsColorizeEffect_new2(parent.cPointer(), &outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsColorizeEffect) MetaObject() *QMetaObject { @@ -374,9 +404,83 @@ func QGraphicsColorizeEffect_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsColorizeEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsColorizeEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsColorizeEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsColorizeEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsColorizeEffect_Draw +func miqt_exec_callback_QGraphicsColorizeEffect_Draw(self *C.QGraphicsColorizeEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsColorizeEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsColorizeEffect) callVirtualBase_BoundingRectFor(sourceRect *QRectF) *QRectF { + + _ret := C.QGraphicsColorizeEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), sourceRect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsColorizeEffect) OnBoundingRectFor(slot func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) { + C.QGraphicsColorizeEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsColorizeEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsColorizeEffect_BoundingRectFor(self *C.QGraphicsColorizeEffect, cb C.intptr_t, sourceRect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(sourceRect)) + + virtualReturn := gofunc((&QGraphicsColorizeEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsColorizeEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsColorizeEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsColorizeEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsColorizeEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsColorizeEffect_SourceChanged +func miqt_exec_callback_QGraphicsColorizeEffect_SourceChanged(self *C.QGraphicsColorizeEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsColorizeEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsColorizeEffect) Delete() { - C.QGraphicsColorizeEffect_Delete(this.h) + C.QGraphicsColorizeEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -389,7 +493,8 @@ func (this *QGraphicsColorizeEffect) GoGC() { } type QGraphicsBlurEffect struct { - h *C.QGraphicsBlurEffect + h *C.QGraphicsBlurEffect + isSubclass bool *QGraphicsEffect } @@ -407,27 +512,47 @@ func (this *QGraphicsBlurEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect) *QGraphicsBlurEffect { +// newQGraphicsBlurEffect constructs the type using only CGO pointers. +func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsBlurEffect { if h == nil { return nil } - return &QGraphicsBlurEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsBlurEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer) *QGraphicsBlurEffect { - return newQGraphicsBlurEffect((*C.QGraphicsBlurEffect)(h)) +// UnsafeNewQGraphicsBlurEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsBlurEffect { + if h == nil { + return nil + } + + return &QGraphicsBlurEffect{h: (*C.QGraphicsBlurEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsBlurEffect constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect() *QGraphicsBlurEffect { - ret := C.QGraphicsBlurEffect_new() - return newQGraphicsBlurEffect(ret) + var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsBlurEffect_new(&outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsBlurEffect2 constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect2(parent *QObject) *QGraphicsBlurEffect { - ret := C.QGraphicsBlurEffect_new2(parent.cPointer()) - return newQGraphicsBlurEffect(ret) + var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsBlurEffect_new2(parent.cPointer(), &outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsBlurEffect) MetaObject() *QMetaObject { @@ -565,9 +690,83 @@ func QGraphicsBlurEffect_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsBlurEffect) callVirtualBase_BoundingRectFor(rect *QRectF) *QRectF { + + _ret := C.QGraphicsBlurEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), rect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsBlurEffect) OnBoundingRectFor(slot func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) { + C.QGraphicsBlurEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsBlurEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsBlurEffect_BoundingRectFor(self *C.QGraphicsBlurEffect, cb C.intptr_t, rect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + virtualReturn := gofunc((&QGraphicsBlurEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsBlurEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsBlurEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsBlurEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsBlurEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsBlurEffect_Draw +func miqt_exec_callback_QGraphicsBlurEffect_Draw(self *C.QGraphicsBlurEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsBlurEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsBlurEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsBlurEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsBlurEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsBlurEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsBlurEffect_SourceChanged +func miqt_exec_callback_QGraphicsBlurEffect_SourceChanged(self *C.QGraphicsBlurEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsBlurEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsBlurEffect) Delete() { - C.QGraphicsBlurEffect_Delete(this.h) + C.QGraphicsBlurEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -580,7 +779,8 @@ func (this *QGraphicsBlurEffect) GoGC() { } type QGraphicsDropShadowEffect struct { - h *C.QGraphicsDropShadowEffect + h *C.QGraphicsDropShadowEffect + isSubclass bool *QGraphicsEffect } @@ -598,27 +798,47 @@ func (this *QGraphicsDropShadowEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect) *QGraphicsDropShadowEffect { +// newQGraphicsDropShadowEffect constructs the type using only CGO pointers. +func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsDropShadowEffect { if h == nil { return nil } - return &QGraphicsDropShadowEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsDropShadowEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer) *QGraphicsDropShadowEffect { - return newQGraphicsDropShadowEffect((*C.QGraphicsDropShadowEffect)(h)) +// UnsafeNewQGraphicsDropShadowEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsDropShadowEffect { + if h == nil { + return nil + } + + return &QGraphicsDropShadowEffect{h: (*C.QGraphicsDropShadowEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsDropShadowEffect constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect() *QGraphicsDropShadowEffect { - ret := C.QGraphicsDropShadowEffect_new() - return newQGraphicsDropShadowEffect(ret) + var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsDropShadowEffect_new(&outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsDropShadowEffect2 constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect2(parent *QObject) *QGraphicsDropShadowEffect { - ret := C.QGraphicsDropShadowEffect_new2(parent.cPointer()) - return newQGraphicsDropShadowEffect(ret) + var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsDropShadowEffect_new2(parent.cPointer(), &outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsDropShadowEffect) MetaObject() *QMetaObject { @@ -814,9 +1034,83 @@ func QGraphicsDropShadowEffect_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsDropShadowEffect) callVirtualBase_BoundingRectFor(rect *QRectF) *QRectF { + + _ret := C.QGraphicsDropShadowEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), rect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsDropShadowEffect) OnBoundingRectFor(slot func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) { + C.QGraphicsDropShadowEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsDropShadowEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsDropShadowEffect_BoundingRectFor(self *C.QGraphicsDropShadowEffect, cb C.intptr_t, rect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + virtualReturn := gofunc((&QGraphicsDropShadowEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsDropShadowEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsDropShadowEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsDropShadowEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsDropShadowEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsDropShadowEffect_Draw +func miqt_exec_callback_QGraphicsDropShadowEffect_Draw(self *C.QGraphicsDropShadowEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsDropShadowEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsDropShadowEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsDropShadowEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsDropShadowEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsDropShadowEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsDropShadowEffect_SourceChanged +func miqt_exec_callback_QGraphicsDropShadowEffect_SourceChanged(self *C.QGraphicsDropShadowEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsDropShadowEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsDropShadowEffect) Delete() { - C.QGraphicsDropShadowEffect_Delete(this.h) + C.QGraphicsDropShadowEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -829,7 +1123,8 @@ func (this *QGraphicsDropShadowEffect) GoGC() { } type QGraphicsOpacityEffect struct { - h *C.QGraphicsOpacityEffect + h *C.QGraphicsOpacityEffect + isSubclass bool *QGraphicsEffect } @@ -847,27 +1142,47 @@ func (this *QGraphicsOpacityEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect) *QGraphicsOpacityEffect { +// newQGraphicsOpacityEffect constructs the type using only CGO pointers. +func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsOpacityEffect { if h == nil { return nil } - return &QGraphicsOpacityEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsOpacityEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer) *QGraphicsOpacityEffect { - return newQGraphicsOpacityEffect((*C.QGraphicsOpacityEffect)(h)) +// UnsafeNewQGraphicsOpacityEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsOpacityEffect { + if h == nil { + return nil + } + + return &QGraphicsOpacityEffect{h: (*C.QGraphicsOpacityEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsOpacityEffect constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect() *QGraphicsOpacityEffect { - ret := C.QGraphicsOpacityEffect_new() - return newQGraphicsOpacityEffect(ret) + var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsOpacityEffect_new(&outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsOpacityEffect2 constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect2(parent *QObject) *QGraphicsOpacityEffect { - ret := C.QGraphicsOpacityEffect_new2(parent.cPointer()) - return newQGraphicsOpacityEffect(ret) + var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsOpacityEffect_new2(parent.cPointer(), &outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsOpacityEffect) MetaObject() *QMetaObject { @@ -1001,9 +1316,83 @@ func QGraphicsOpacityEffect_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsOpacityEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsOpacityEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsOpacityEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsOpacityEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsOpacityEffect_Draw +func miqt_exec_callback_QGraphicsOpacityEffect_Draw(self *C.QGraphicsOpacityEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsOpacityEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsOpacityEffect) callVirtualBase_BoundingRectFor(sourceRect *QRectF) *QRectF { + + _ret := C.QGraphicsOpacityEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), sourceRect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsOpacityEffect) OnBoundingRectFor(slot func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) { + C.QGraphicsOpacityEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsOpacityEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsOpacityEffect_BoundingRectFor(self *C.QGraphicsOpacityEffect, cb C.intptr_t, sourceRect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(sourceRect)) + + virtualReturn := gofunc((&QGraphicsOpacityEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsOpacityEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsOpacityEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsOpacityEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsOpacityEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsOpacityEffect_SourceChanged +func miqt_exec_callback_QGraphicsOpacityEffect_SourceChanged(self *C.QGraphicsOpacityEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsOpacityEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsOpacityEffect) Delete() { - C.QGraphicsOpacityEffect_Delete(this.h) + C.QGraphicsOpacityEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicseffect.h b/qt/gen_qgraphicseffect.h index 91e34b81..29d91a56 100644 --- a/qt/gen_qgraphicseffect.h +++ b/qt/gen_qgraphicseffect.h @@ -24,6 +24,7 @@ class QGraphicsEffect; class QGraphicsOpacityEffect; class QMetaObject; class QObject; +class QPainter; class QPointF; class QRectF; #else @@ -36,6 +37,7 @@ typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsOpacityEffect QGraphicsOpacityEffect; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QPainter QPainter; typedef struct QPointF QPointF; typedef struct QRectF QRectF; #endif @@ -51,14 +53,16 @@ void QGraphicsEffect_SetEnabled(QGraphicsEffect* self, bool enable); void QGraphicsEffect_Update(QGraphicsEffect* self); void QGraphicsEffect_EnabledChanged(QGraphicsEffect* self, bool enabled); void QGraphicsEffect_connect_EnabledChanged(QGraphicsEffect* self, intptr_t slot); +void QGraphicsEffect_Draw(QGraphicsEffect* self, QPainter* painter); +void QGraphicsEffect_SourceChanged(QGraphicsEffect* self, int flags); struct miqt_string QGraphicsEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsEffect_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsEffect_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsEffect_TrUtf83(const char* s, const char* c, int n); -void QGraphicsEffect_Delete(QGraphicsEffect* self); +void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass); -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new(); -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent); +void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self); void* QGraphicsColorizeEffect_Metacast(QGraphicsColorizeEffect* self, const char* param1); struct miqt_string QGraphicsColorizeEffect_Tr(const char* s); @@ -71,14 +75,21 @@ void QGraphicsColorizeEffect_ColorChanged(QGraphicsColorizeEffect* self, QColor* void QGraphicsColorizeEffect_connect_ColorChanged(QGraphicsColorizeEffect* self, intptr_t slot); void QGraphicsColorizeEffect_StrengthChanged(QGraphicsColorizeEffect* self, double strength); void QGraphicsColorizeEffect_connect_StrengthChanged(QGraphicsColorizeEffect* self, intptr_t slot); +void QGraphicsColorizeEffect_Draw(QGraphicsColorizeEffect* self, QPainter* painter); struct miqt_string QGraphicsColorizeEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsColorizeEffect_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsColorizeEffect_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsColorizeEffect_TrUtf83(const char* s, const char* c, int n); -void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self); +void QGraphicsColorizeEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsColorizeEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsColorizeEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsColorizeEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect); +void QGraphicsColorizeEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsColorizeEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self, bool isSubclass); -QGraphicsBlurEffect* QGraphicsBlurEffect_new(); -QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent); +void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self); void* QGraphicsBlurEffect_Metacast(QGraphicsBlurEffect* self, const char* param1); struct miqt_string QGraphicsBlurEffect_Tr(const char* s); @@ -92,14 +103,21 @@ void QGraphicsBlurEffect_BlurRadiusChanged(QGraphicsBlurEffect* self, double blu void QGraphicsBlurEffect_connect_BlurRadiusChanged(QGraphicsBlurEffect* self, intptr_t slot); void QGraphicsBlurEffect_BlurHintsChanged(QGraphicsBlurEffect* self, int hints); void QGraphicsBlurEffect_connect_BlurHintsChanged(QGraphicsBlurEffect* self, intptr_t slot); +void QGraphicsBlurEffect_Draw(QGraphicsBlurEffect* self, QPainter* painter); struct miqt_string QGraphicsBlurEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsBlurEffect_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsBlurEffect_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsBlurEffect_TrUtf83(const char* s, const char* c, int n); -void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self); +void QGraphicsBlurEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsBlurEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect); +void QGraphicsBlurEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsBlurEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsBlurEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsBlurEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self, bool isSubclass); -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new(); -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent); +void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self); void* QGraphicsDropShadowEffect_Metacast(QGraphicsDropShadowEffect* self, const char* param1); struct miqt_string QGraphicsDropShadowEffect_Tr(const char* s); @@ -123,14 +141,21 @@ void QGraphicsDropShadowEffect_BlurRadiusChanged(QGraphicsDropShadowEffect* self void QGraphicsDropShadowEffect_connect_BlurRadiusChanged(QGraphicsDropShadowEffect* self, intptr_t slot); void QGraphicsDropShadowEffect_ColorChanged(QGraphicsDropShadowEffect* self, QColor* color); void QGraphicsDropShadowEffect_connect_ColorChanged(QGraphicsDropShadowEffect* self, intptr_t slot); +void QGraphicsDropShadowEffect_Draw(QGraphicsDropShadowEffect* self, QPainter* painter); struct miqt_string QGraphicsDropShadowEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsDropShadowEffect_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsDropShadowEffect_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsDropShadowEffect_TrUtf83(const char* s, const char* c, int n); -void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self); +void QGraphicsDropShadowEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsDropShadowEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect); +void QGraphicsDropShadowEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsDropShadowEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsDropShadowEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsDropShadowEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self, bool isSubclass); -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new(); -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent); +void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self); void* QGraphicsOpacityEffect_Metacast(QGraphicsOpacityEffect* self, const char* param1); struct miqt_string QGraphicsOpacityEffect_Tr(const char* s); @@ -143,11 +168,18 @@ void QGraphicsOpacityEffect_OpacityChanged(QGraphicsOpacityEffect* self, double void QGraphicsOpacityEffect_connect_OpacityChanged(QGraphicsOpacityEffect* self, intptr_t slot); void QGraphicsOpacityEffect_OpacityMaskChanged(QGraphicsOpacityEffect* self, QBrush* mask); void QGraphicsOpacityEffect_connect_OpacityMaskChanged(QGraphicsOpacityEffect* self, intptr_t slot); +void QGraphicsOpacityEffect_Draw(QGraphicsOpacityEffect* self, QPainter* painter); struct miqt_string QGraphicsOpacityEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsOpacityEffect_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsOpacityEffect_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsOpacityEffect_TrUtf83(const char* s, const char* c, int n); -void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self); +void QGraphicsOpacityEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsOpacityEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsOpacityEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsOpacityEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect); +void QGraphicsOpacityEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsOpacityEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsgridlayout.cpp b/qt/gen_qgraphicsgridlayout.cpp index 794c88f4..2cd46db0 100644 --- a/qt/gen_qgraphicsgridlayout.cpp +++ b/qt/gen_qgraphicsgridlayout.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -6,12 +8,251 @@ #include "gen_qgraphicsgridlayout.h" #include "_cgo_export.h" -QGraphicsGridLayout* QGraphicsGridLayout_new() { - return new QGraphicsGridLayout(); +class MiqtVirtualQGraphicsGridLayout : public virtual QGraphicsGridLayout { +public: + + MiqtVirtualQGraphicsGridLayout(): QGraphicsGridLayout() {}; + MiqtVirtualQGraphicsGridLayout(QGraphicsLayoutItem* parent): QGraphicsGridLayout(parent) {}; + + virtual ~MiqtVirtualQGraphicsGridLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGraphicsGridLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsGridLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGraphicsGridLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAtWithIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int index) const override { + if (handle__ItemAtWithIndex == 0) { + return QGraphicsGridLayout::itemAt(index); + } + + int sigval1 = index; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsGridLayout_ItemAtWithIndex(const_cast(this), handle__ItemAtWithIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGraphicsLayoutItem* virtualbase_ItemAtWithIndex(int index) const { + + return QGraphicsGridLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveAt = 0; + + // Subclass to allow providing a Go implementation + virtual void removeAt(int index) override { + if (handle__RemoveAt == 0) { + QGraphicsGridLayout::removeAt(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsGridLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveAt(int index) { + + QGraphicsGridLayout::removeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGraphicsGridLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsGridLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsGridLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsGridLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsGridLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsGridLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsGridLayout::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsGridLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsGridLayout::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsGridLayout::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsGridLayout_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsGridLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsGridLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsGridLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsGridLayout::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WidgetEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void widgetEvent(QEvent* e) override { + if (handle__WidgetEvent == 0) { + QGraphicsGridLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsGridLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsGridLayout::widgetEvent(e); + + } + +}; + +void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(); + *outptr_QGraphicsGridLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent) { - return new QGraphicsGridLayout(parent); +void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(parent); + *outptr_QGraphicsGridLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan) { @@ -203,8 +444,8 @@ void QGraphicsGridLayout_SetGeometry(QGraphicsGridLayout* self, QRectF* rect) { self->setGeometry(*rect); } -QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which) { - return new QSizeF(self->sizeHint(static_cast(which))); +QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which, QSizeF* constraint) { + return new QSizeF(self->sizeHint(static_cast(which), *constraint)); } void QGraphicsGridLayout_AddItem6(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int alignment) { @@ -215,11 +456,83 @@ void QGraphicsGridLayout_AddItem4(QGraphicsGridLayout* self, QGraphicsLayoutItem self->addItem(item, static_cast(row), static_cast(column), static_cast(alignment)); } -QSizeF* QGraphicsGridLayout_SizeHint2(const QGraphicsGridLayout* self, int which, QSizeF* constraint) { - return new QSizeF(self->sizeHint(static_cast(which), *constraint)); +void QGraphicsGridLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__Count = slot; +} + +int QGraphicsGridLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_Count(); +} + +void QGraphicsGridLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__ItemAtWithIndex = slot; +} + +QGraphicsLayoutItem* QGraphicsGridLayout_virtualbase_ItemAtWithIndex(const void* self, int index) { + return ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_ItemAtWithIndex(index); +} + +void QGraphicsGridLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsGridLayout_virtualbase_RemoveAt(void* self, int index) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_RemoveAt(index); +} + +void QGraphicsGridLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsGridLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsGridLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsGridLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsGridLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsGridLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsGridLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsGridLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsGridLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsGridLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsGridLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_WidgetEvent(e); } -void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self) { - delete self; +void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsgridlayout.go b/qt/gen_qgraphicsgridlayout.go index 8c32b85a..958bcbeb 100644 --- a/qt/gen_qgraphicsgridlayout.go +++ b/qt/gen_qgraphicsgridlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsGridLayout struct { - h *C.QGraphicsGridLayout + h *C.QGraphicsGridLayout + isSubclass bool *QGraphicsLayout } @@ -32,27 +34,47 @@ func (this *QGraphicsGridLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsGridLayout(h *C.QGraphicsGridLayout) *QGraphicsGridLayout { +// newQGraphicsGridLayout constructs the type using only CGO pointers. +func newQGraphicsGridLayout(h *C.QGraphicsGridLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsGridLayout { if h == nil { return nil } - return &QGraphicsGridLayout{h: h, QGraphicsLayout: UnsafeNewQGraphicsLayout(unsafe.Pointer(h))} + return &QGraphicsGridLayout{h: h, + QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer) *QGraphicsGridLayout { - return newQGraphicsGridLayout((*C.QGraphicsGridLayout)(h)) +// UnsafeNewQGraphicsGridLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsGridLayout { + if h == nil { + return nil + } + + return &QGraphicsGridLayout{h: (*C.QGraphicsGridLayout)(h), + QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } // NewQGraphicsGridLayout constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout() *QGraphicsGridLayout { - ret := C.QGraphicsGridLayout_new() - return newQGraphicsGridLayout(ret) + var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsGridLayout_new(&outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsGridLayout2 constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout2(parent *QGraphicsLayoutItem) *QGraphicsGridLayout { - ret := C.QGraphicsGridLayout_new2(parent.cPointer()) - return newQGraphicsGridLayout(ret) + var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsGridLayout_new2(parent.cPointer(), &outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsGridLayout) AddItem(item *QGraphicsLayoutItem, row int, column int, rowSpan int, columnSpan int) { @@ -231,8 +253,8 @@ func (this *QGraphicsGridLayout) SetGeometry(rect *QRectF) { C.QGraphicsGridLayout_SetGeometry(this.h, rect.cPointer()) } -func (this *QGraphicsGridLayout) SizeHint(which SizeHint) *QSizeF { - _ret := C.QGraphicsGridLayout_SizeHint(this.h, (C.int)(which)) +func (this *QGraphicsGridLayout) SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + _ret := C.QGraphicsGridLayout_SizeHint(this.h, (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -246,16 +268,223 @@ func (this *QGraphicsGridLayout) AddItem4(item *QGraphicsLayoutItem, row int, co C.QGraphicsGridLayout_AddItem4(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(alignment)) } -func (this *QGraphicsGridLayout) SizeHint2(which SizeHint, constraint *QSizeF) *QSizeF { - _ret := C.QGraphicsGridLayout_SizeHint2(this.h, (C.int)(which), constraint.cPointer()) +func (this *QGraphicsGridLayout) callVirtualBase_Count() int { + + return (int)(C.QGraphicsGridLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsGridLayout) OnCount(slot func(super func() int) int) { + C.QGraphicsGridLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_Count +func miqt_exec_callback_QGraphicsGridLayout_Count(self *C.QGraphicsGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_ItemAtWithIndex(index int) *QGraphicsLayoutItem { + + return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsGridLayout_virtualbase_ItemAtWithIndex(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGraphicsGridLayout) OnItemAtWithIndex(slot func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) { + C.QGraphicsGridLayout_override_virtual_ItemAtWithIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_ItemAtWithIndex +func miqt_exec_callback_QGraphicsGridLayout_ItemAtWithIndex(self *C.QGraphicsGridLayout, cb C.intptr_t, index C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_ItemAtWithIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsGridLayout) callVirtualBase_RemoveAt(index int) { + + C.QGraphicsGridLayout_virtualbase_RemoveAt(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QGraphicsGridLayout) OnRemoveAt(slot func(super func(index int), index int)) { + C.QGraphicsGridLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_RemoveAt +func miqt_exec_callback_QGraphicsGridLayout_RemoveAt(self *C.QGraphicsGridLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_RemoveAt, slotval1) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_Invalidate() { + + C.QGraphicsGridLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsGridLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsGridLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_Invalidate +func miqt_exec_callback_QGraphicsGridLayout_Invalidate(self *C.QGraphicsGridLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsGridLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsGridLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsGridLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_SetGeometry +func miqt_exec_callback_QGraphicsGridLayout_SetGeometry(self *C.QGraphicsGridLayout, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsGridLayout_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsGridLayout) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsGridLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_SizeHint +func miqt_exec_callback_QGraphicsGridLayout_SizeHint(self *C.QGraphicsGridLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsGridLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsGridLayout_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsGridLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsGridLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsGridLayout_GetContentsMargins(self *C.QGraphicsGridLayout, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsGridLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsGridLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsGridLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsGridLayout_UpdateGeometry(self *C.QGraphicsGridLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsGridLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsGridLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsGridLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_WidgetEvent +func miqt_exec_callback_QGraphicsGridLayout_WidgetEvent(self *C.QGraphicsGridLayout, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + } // Delete this object from C++ memory. func (this *QGraphicsGridLayout) Delete() { - C.QGraphicsGridLayout_Delete(this.h) + C.QGraphicsGridLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsgridlayout.h b/qt/gen_qgraphicsgridlayout.h index 852e958c..694867cb 100644 --- a/qt/gen_qgraphicsgridlayout.h +++ b/qt/gen_qgraphicsgridlayout.h @@ -15,19 +15,23 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsGridLayout; +class QGraphicsLayout; class QGraphicsLayoutItem; class QRectF; class QSizeF; #else +typedef struct QEvent QEvent; typedef struct QGraphicsGridLayout QGraphicsGridLayout; +typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -QGraphicsGridLayout* QGraphicsGridLayout_new(); -QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan); void QGraphicsGridLayout_AddItem2(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column); void QGraphicsGridLayout_SetHorizontalSpacing(QGraphicsGridLayout* self, double spacing); @@ -72,11 +76,28 @@ void QGraphicsGridLayout_RemoveAt(QGraphicsGridLayout* self, int index); void QGraphicsGridLayout_RemoveItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item); void QGraphicsGridLayout_Invalidate(QGraphicsGridLayout* self); void QGraphicsGridLayout_SetGeometry(QGraphicsGridLayout* self, QRectF* rect); -QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which); +QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which, QSizeF* constraint); void QGraphicsGridLayout_AddItem6(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int alignment); void QGraphicsGridLayout_AddItem4(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int alignment); -QSizeF* QGraphicsGridLayout_SizeHint2(const QGraphicsGridLayout* self, int which, QSizeF* constraint); -void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self); +void QGraphicsGridLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsGridLayout_virtualbase_Count(const void* self); +void QGraphicsGridLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsGridLayout_virtualbase_ItemAtWithIndex(const void* self, int index); +void QGraphicsGridLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsGridLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_Invalidate(void* self); +void QGraphicsGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsGridLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsGridLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsGridLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsGridLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsGridLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsitem.cpp b/qt/gen_qgraphicsitem.cpp index ae17d726..6d0b8f27 100644 --- a/qt/gen_qgraphicsitem.cpp +++ b/qt/gen_qgraphicsitem.cpp @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include #include #include @@ -14,14 +16,22 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -530,12 +540,12 @@ bool QGraphicsItem_Contains(const QGraphicsItem* self, QPointF* point) { return self->contains(*point); } -bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other) { - return self->collidesWithItem(other); +bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other, int mode) { + return self->collidesWithItem(other, static_cast(mode)); } -bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path) { - return self->collidesWithPath(*path); +bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path, int mode) { + return self->collidesWithPath(*path, static_cast(mode)); } struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems(const QGraphicsItem* self) { @@ -580,8 +590,8 @@ void QGraphicsItem_SetBoundingRegionGranularity(QGraphicsItem* self, double gran self->setBoundingRegionGranularity(static_cast(granularity)); } -void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } void QGraphicsItem_Update(QGraphicsItem* self) { @@ -801,14 +811,6 @@ void QGraphicsItem_SetTransform2(QGraphicsItem* self, QTransform* matrix, bool c self->setTransform(*matrix, combine); } -bool QGraphicsItem_CollidesWithItem2(const QGraphicsItem* self, QGraphicsItem* other, int mode) { - return self->collidesWithItem(other, static_cast(mode)); -} - -bool QGraphicsItem_CollidesWithPath2(const QGraphicsItem* self, QPainterPath* path, int mode) { - return self->collidesWithPath(*path, static_cast(mode)); -} - struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems1(const QGraphicsItem* self, int mode) { QList _ret = self->collidingItems(static_cast(mode)); // Convert QList<> from C++ memory to manually-managed C memory @@ -826,10 +828,6 @@ bool QGraphicsItem_IsObscured1(const QGraphicsItem* self, QRectF* rect) { return self->isObscured(*rect); } -void QGraphicsItem_Paint3(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} - void QGraphicsItem_Update1(QGraphicsItem* self, QRectF* rect) { self->update(*rect); } @@ -838,8 +836,12 @@ void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* re self->scroll(static_cast(dx), static_cast(dy), *rect); } -void QGraphicsItem_Delete(QGraphicsItem* self) { - delete self; +void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self) { @@ -1048,8 +1050,12 @@ void QGraphicsObject_GrabGesture2(QGraphicsObject* self, int typeVal, int flags) self->grabGesture(static_cast(typeVal), static_cast(flags)); } -void QGraphicsObject_Delete(QGraphicsObject* self) { - delete self; +void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self) { @@ -1076,828 +1082,6987 @@ QPainterPath* QAbstractGraphicsShapeItem_OpaqueArea(const QAbstractGraphicsShape return new QPainterPath(self->opaqueArea()); } -void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self) { - delete self; -} - -QGraphicsPathItem* QGraphicsPathItem_new() { - return new QGraphicsPathItem(); -} - -QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path) { - return new QGraphicsPathItem(*path); +void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent) { - return new QGraphicsPathItem(parent); -} +class MiqtVirtualQGraphicsPathItem : public virtual QGraphicsPathItem { +public: -QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent) { - return new QGraphicsPathItem(*path, parent); -} + MiqtVirtualQGraphicsPathItem(): QGraphicsPathItem() {}; + MiqtVirtualQGraphicsPathItem(const QPainterPath& path): QGraphicsPathItem(path) {}; + MiqtVirtualQGraphicsPathItem(QGraphicsItem* parent): QGraphicsPathItem(parent) {}; + MiqtVirtualQGraphicsPathItem(const QPainterPath& path, QGraphicsItem* parent): QGraphicsPathItem(path, parent) {}; -QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self) { - return new QPainterPath(self->path()); -} + virtual ~MiqtVirtualQGraphicsPathItem() = default; -void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path) { - self->setPath(*path); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; -QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self) { - return new QRectF(self->boundingRect()); -} + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsPathItem::boundingRect(); + } + -QPainterPath* QGraphicsPathItem_Shape(const QGraphicsPathItem* self) { - return new QPainterPath(self->shape()); -} + QRectF* callback_return_value = miqt_exec_callback_QGraphicsPathItem_BoundingRect(const_cast(this), handle__BoundingRect); -bool QGraphicsPathItem_Contains(const QGraphicsPathItem* self, QPointF* point) { - return self->contains(*point); -} + return *callback_return_value; + } -void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { -bool QGraphicsPathItem_IsObscuredBy(const QGraphicsPathItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + return new QRectF(QGraphicsPathItem::boundingRect()); -QPainterPath* QGraphicsPathItem_OpaqueArea(const QGraphicsPathItem* self) { - return new QPainterPath(self->opaqueArea()); -} + } -int QGraphicsPathItem_Type(const QGraphicsPathItem* self) { - return self->type(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; -void QGraphicsPathItem_Paint3(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsPathItem::shape(); + } + -void QGraphicsPathItem_Delete(QGraphicsPathItem* self) { - delete self; -} + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPathItem_Shape(const_cast(this), handle__Shape); -QGraphicsRectItem* QGraphicsRectItem_new() { - return new QGraphicsRectItem(); -} + return *callback_return_value; + } -QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect) { - return new QGraphicsRectItem(*rect); -} + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { -QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h) { - return new QGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + return new QPainterPath(QGraphicsPathItem::shape()); -QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent) { - return new QGraphicsRectItem(parent); -} + } -QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent) { - return new QGraphicsRectItem(*rect, parent); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; -QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { - return new QGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); -} + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsPathItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); -QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self) { - return new QRectF(self->rect()); -} + bool callback_return_value = miqt_exec_callback_QGraphicsPathItem_Contains(const_cast(this), handle__Contains, sigval1); -void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect) { - self->setRect(*rect); -} + return callback_return_value; + } -void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h) { - self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { -QRectF* QGraphicsRectItem_BoundingRect(const QGraphicsRectItem* self) { - return new QRectF(self->boundingRect()); -} + return QGraphicsPathItem::contains(*point); -QPainterPath* QGraphicsRectItem_Shape(const QGraphicsRectItem* self) { - return new QPainterPath(self->shape()); -} + } -bool QGraphicsRectItem_Contains(const QGraphicsRectItem* self, QPointF* point) { - return self->contains(*point); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; -void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsPathItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; -bool QGraphicsRectItem_IsObscuredBy(const QGraphicsRectItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + miqt_exec_callback_QGraphicsPathItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); -QPainterPath* QGraphicsRectItem_OpaqueArea(const QGraphicsRectItem* self) { - return new QPainterPath(self->opaqueArea()); -} + + } -int QGraphicsRectItem_Type(const QGraphicsRectItem* self) { - return self->type(); -} + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { -void QGraphicsRectItem_Paint3(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + QGraphicsPathItem::paint(painter, option, widget); -void QGraphicsRectItem_Delete(QGraphicsRectItem* self) { - delete self; -} + } -QGraphicsEllipseItem* QGraphicsEllipseItem_new() { - return new QGraphicsEllipseItem(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; -QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect) { - return new QGraphicsEllipseItem(*rect); -} + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsPathItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; -QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h) { - return new QGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + bool callback_return_value = miqt_exec_callback_QGraphicsPathItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); -QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent) { - return new QGraphicsEllipseItem(parent); -} + return callback_return_value; + } -QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent) { - return new QGraphicsEllipseItem(*rect, parent); -} + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { -QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { - return new QGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); -} + return QGraphicsPathItem::isObscuredBy(item); -QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self) { - return new QRectF(self->rect()); -} + } -void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect) { - self->setRect(*rect); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; -void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h) { - self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsPathItem::opaqueArea(); + } + -int QGraphicsEllipseItem_StartAngle(const QGraphicsEllipseItem* self) { - return self->startAngle(); -} + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPathItem_OpaqueArea(const_cast(this), handle__OpaqueArea); -void QGraphicsEllipseItem_SetStartAngle(QGraphicsEllipseItem* self, int angle) { - self->setStartAngle(static_cast(angle)); -} + return *callback_return_value; + } -int QGraphicsEllipseItem_SpanAngle(const QGraphicsEllipseItem* self) { - return self->spanAngle(); -} + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { -void QGraphicsEllipseItem_SetSpanAngle(QGraphicsEllipseItem* self, int angle) { - self->setSpanAngle(static_cast(angle)); -} + return new QPainterPath(QGraphicsPathItem::opaqueArea()); -QRectF* QGraphicsEllipseItem_BoundingRect(const QGraphicsEllipseItem* self) { - return new QRectF(self->boundingRect()); -} + } -QPainterPath* QGraphicsEllipseItem_Shape(const QGraphicsEllipseItem* self) { - return new QPainterPath(self->shape()); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; -bool QGraphicsEllipseItem_Contains(const QGraphicsEllipseItem* self, QPointF* point) { - return self->contains(*point); -} + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsPathItem::type(); + } + -void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + int callback_return_value = miqt_exec_callback_QGraphicsPathItem_Type(const_cast(this), handle__Type); -bool QGraphicsEllipseItem_IsObscuredBy(const QGraphicsEllipseItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + return static_cast(callback_return_value); + } -QPainterPath* QGraphicsEllipseItem_OpaqueArea(const QGraphicsEllipseItem* self) { - return new QPainterPath(self->opaqueArea()); -} + // Wrapper to allow calling protected method + int virtualbase_Type() const { -int QGraphicsEllipseItem_Type(const QGraphicsEllipseItem* self) { - return self->type(); -} + return QGraphicsPathItem::type(); -void QGraphicsEllipseItem_Paint3(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + } -void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self) { - delete self; -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; -QGraphicsPolygonItem* QGraphicsPolygonItem_new() { - return new QGraphicsPolygonItem(); -} + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsPathItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); -QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent) { - return new QGraphicsPolygonItem(parent); -} + bool callback_return_value = miqt_exec_callback_QGraphicsPathItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); -int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self) { - Qt::FillRule _ret = self->fillRule(); - return static_cast(_ret); -} + return callback_return_value; + } -void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule) { - self->setFillRule(static_cast(rule)); -} + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { -QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self) { - return new QRectF(self->boundingRect()); -} + return QGraphicsPathItem::supportsExtension(static_cast(extension)); -QPainterPath* QGraphicsPolygonItem_Shape(const QGraphicsPolygonItem* self) { - return new QPainterPath(self->shape()); -} + } -bool QGraphicsPolygonItem_Contains(const QGraphicsPolygonItem* self, QPointF* point) { - return self->contains(*point); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsPathItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsPathItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } -void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { -bool QGraphicsPolygonItem_IsObscuredBy(const QGraphicsPolygonItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + QGraphicsPathItem::setExtension(static_cast(extension), *variant); -QPainterPath* QGraphicsPolygonItem_OpaqueArea(const QGraphicsPolygonItem* self) { - return new QPainterPath(self->opaqueArea()); -} + } -int QGraphicsPolygonItem_Type(const QGraphicsPolygonItem* self) { - return self->type(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; -void QGraphicsPolygonItem_Paint3(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsPathItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); -void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self) { - delete self; -} + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPathItem_Extension(const_cast(this), handle__Extension, sigval1); -QGraphicsLineItem* QGraphicsLineItem_new() { - return new QGraphicsLineItem(); -} + return *callback_return_value; + } -QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line) { - return new QGraphicsLineItem(*line); -} + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { -QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2) { - return new QGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); -} + return new QVariant(QGraphicsPathItem::extension(*variant)); -QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent) { - return new QGraphicsLineItem(parent); -} + } -QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent) { - return new QGraphicsLineItem(*line, parent); -} +}; -QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent) { - return new QGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); +void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self) { - return new QPen(self->pen()); +void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen) { - self->setPen(*pen); +void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(parent); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self) { - return new QLineF(self->line()); +void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path, parent); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -void QGraphicsLineItem_SetLine(QGraphicsLineItem* self, QLineF* line) { - self->setLine(*line); +QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self) { + return new QPainterPath(self->path()); } -void QGraphicsLineItem_SetLine2(QGraphicsLineItem* self, double x1, double y1, double x2, double y2) { - self->setLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path) { + self->setPath(*path); } -QRectF* QGraphicsLineItem_BoundingRect(const QGraphicsLineItem* self) { +QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self) { return new QRectF(self->boundingRect()); } -QPainterPath* QGraphicsLineItem_Shape(const QGraphicsLineItem* self) { +QPainterPath* QGraphicsPathItem_Shape(const QGraphicsPathItem* self) { return new QPainterPath(self->shape()); } -bool QGraphicsLineItem_Contains(const QGraphicsLineItem* self, QPointF* point) { +bool QGraphicsPathItem_Contains(const QGraphicsPathItem* self, QPointF* point) { return self->contains(*point); } -void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } -bool QGraphicsLineItem_IsObscuredBy(const QGraphicsLineItem* self, QGraphicsItem* item) { +bool QGraphicsPathItem_IsObscuredBy(const QGraphicsPathItem* self, QGraphicsItem* item) { return self->isObscuredBy(item); } -QPainterPath* QGraphicsLineItem_OpaqueArea(const QGraphicsLineItem* self) { +QPainterPath* QGraphicsPathItem_OpaqueArea(const QGraphicsPathItem* self) { return new QPainterPath(self->opaqueArea()); } -int QGraphicsLineItem_Type(const QGraphicsLineItem* self) { +int QGraphicsPathItem_Type(const QGraphicsPathItem* self) { return self->type(); } -void QGraphicsLineItem_Paint3(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsPathItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__BoundingRect = slot; } -void QGraphicsLineItem_Delete(QGraphicsLineItem* self) { - delete self; +QRectF* QGraphicsPathItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_BoundingRect(); } -QGraphicsPixmapItem* QGraphicsPixmapItem_new() { - return new QGraphicsPixmapItem(); +void QGraphicsPathItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Shape = slot; } -QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap) { - return new QGraphicsPixmapItem(*pixmap); +QPainterPath* QGraphicsPathItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Shape(); } -QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent) { - return new QGraphicsPixmapItem(parent); +void QGraphicsPathItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Contains = slot; } -QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent) { - return new QGraphicsPixmapItem(*pixmap, parent); +bool QGraphicsPathItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Contains(point); } -QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self) { - return new QPixmap(self->pixmap()); +void QGraphicsPathItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Paint = slot; } -void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap) { - self->setPixmap(*pixmap); +void QGraphicsPathItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Paint(painter, option, widget); } -int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self) { - Qt::TransformationMode _ret = self->transformationMode(); - return static_cast(_ret); +void QGraphicsPathItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__IsObscuredBy = slot; } -void QGraphicsPixmapItem_SetTransformationMode(QGraphicsPixmapItem* self, int mode) { - self->setTransformationMode(static_cast(mode)); +bool QGraphicsPathItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_IsObscuredBy(item); } -QPointF* QGraphicsPixmapItem_Offset(const QGraphicsPixmapItem* self) { - return new QPointF(self->offset()); +void QGraphicsPathItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__OpaqueArea = slot; } -void QGraphicsPixmapItem_SetOffset(QGraphicsPixmapItem* self, QPointF* offset) { - self->setOffset(*offset); +QPainterPath* QGraphicsPathItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_OpaqueArea(); } -void QGraphicsPixmapItem_SetOffset2(QGraphicsPixmapItem* self, double x, double y) { - self->setOffset(static_cast(x), static_cast(y)); +void QGraphicsPathItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Type = slot; } -QRectF* QGraphicsPixmapItem_BoundingRect(const QGraphicsPixmapItem* self) { - return new QRectF(self->boundingRect()); +int QGraphicsPathItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Type(); } -QPainterPath* QGraphicsPixmapItem_Shape(const QGraphicsPixmapItem* self) { - return new QPainterPath(self->shape()); +void QGraphicsPathItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__SupportsExtension = slot; } -bool QGraphicsPixmapItem_Contains(const QGraphicsPixmapItem* self, QPointF* point) { - return self->contains(*point); +bool QGraphicsPathItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_SupportsExtension(extension); } -void QGraphicsPixmapItem_Paint(QGraphicsPixmapItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsPathItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__SetExtension = slot; } -bool QGraphicsPixmapItem_IsObscuredBy(const QGraphicsPixmapItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsPathItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_SetExtension(extension, variant); } -QPainterPath* QGraphicsPixmapItem_OpaqueArea(const QGraphicsPixmapItem* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsPathItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Extension = slot; } -int QGraphicsPixmapItem_Type(const QGraphicsPixmapItem* self) { - return self->type(); +QVariant* QGraphicsPathItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Extension(variant); } -int QGraphicsPixmapItem_ShapeMode(const QGraphicsPixmapItem* self) { - QGraphicsPixmapItem::ShapeMode _ret = self->shapeMode(); - return static_cast(_ret); +void QGraphicsPathItem_Delete(QGraphicsPathItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QGraphicsPixmapItem_SetShapeMode(QGraphicsPixmapItem* self, int mode) { - self->setShapeMode(static_cast(mode)); -} +class MiqtVirtualQGraphicsRectItem : public virtual QGraphicsRectItem { +public: -void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self) { - delete self; -} + MiqtVirtualQGraphicsRectItem(): QGraphicsRectItem() {}; + MiqtVirtualQGraphicsRectItem(const QRectF& rect): QGraphicsRectItem(rect) {}; + MiqtVirtualQGraphicsRectItem(qreal x, qreal y, qreal w, qreal h): QGraphicsRectItem(x, y, w, h) {}; + MiqtVirtualQGraphicsRectItem(QGraphicsItem* parent): QGraphicsRectItem(parent) {}; + MiqtVirtualQGraphicsRectItem(const QRectF& rect, QGraphicsItem* parent): QGraphicsRectItem(rect, parent) {}; + MiqtVirtualQGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent): QGraphicsRectItem(x, y, w, h, parent) {}; -QGraphicsTextItem* QGraphicsTextItem_new() { - return new QGraphicsTextItem(); + virtual ~MiqtVirtualQGraphicsRectItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsRectItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsRectItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsRectItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsRectItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsRectItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsRectItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsRectItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsRectItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsRectItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsRectItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsRectItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsRectItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsRectItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsRectItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsRectItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsRectItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsRectItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsRectItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsRectItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsRectItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsRectItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsRectItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsRectItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsRectItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsRectItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsRectItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsRectItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsRectItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsRectItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsRectItem::extension(*variant)); + + } + +}; + +void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(parent); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect, parent); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self) { + return new QRectF(self->rect()); +} + +void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect) { + self->setRect(*rect); +} + +void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h) { + self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); +} + +QRectF* QGraphicsRectItem_BoundingRect(const QGraphicsRectItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsRectItem_Shape(const QGraphicsRectItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsRectItem_Contains(const QGraphicsRectItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsRectItem_IsObscuredBy(const QGraphicsRectItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsRectItem_OpaqueArea(const QGraphicsRectItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsRectItem_Type(const QGraphicsRectItem* self) { + return self->type(); +} + +void QGraphicsRectItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsRectItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsRectItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsRectItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsRectItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsRectItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsRectItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsRectItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsRectItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsRectItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsRectItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsRectItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsRectItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Type = slot; +} + +int QGraphicsRectItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsRectItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsRectItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsRectItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsRectItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsRectItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsRectItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsRectItem_Delete(QGraphicsRectItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsEllipseItem : public virtual QGraphicsEllipseItem { +public: + + MiqtVirtualQGraphicsEllipseItem(): QGraphicsEllipseItem() {}; + MiqtVirtualQGraphicsEllipseItem(const QRectF& rect): QGraphicsEllipseItem(rect) {}; + MiqtVirtualQGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h): QGraphicsEllipseItem(x, y, w, h) {}; + MiqtVirtualQGraphicsEllipseItem(QGraphicsItem* parent): QGraphicsEllipseItem(parent) {}; + MiqtVirtualQGraphicsEllipseItem(const QRectF& rect, QGraphicsItem* parent): QGraphicsEllipseItem(rect, parent) {}; + MiqtVirtualQGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent): QGraphicsEllipseItem(x, y, w, h, parent) {}; + + virtual ~MiqtVirtualQGraphicsEllipseItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsEllipseItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsEllipseItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsEllipseItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsEllipseItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsEllipseItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsEllipseItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsEllipseItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsEllipseItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsEllipseItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsEllipseItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsEllipseItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsEllipseItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsEllipseItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsEllipseItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsEllipseItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsEllipseItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsEllipseItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsEllipseItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsEllipseItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsEllipseItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsEllipseItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsEllipseItem::extension(*variant)); + + } + +}; + +void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(parent); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect, parent); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self) { + return new QRectF(self->rect()); +} + +void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect) { + self->setRect(*rect); +} + +void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h) { + self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); +} + +int QGraphicsEllipseItem_StartAngle(const QGraphicsEllipseItem* self) { + return self->startAngle(); +} + +void QGraphicsEllipseItem_SetStartAngle(QGraphicsEllipseItem* self, int angle) { + self->setStartAngle(static_cast(angle)); +} + +int QGraphicsEllipseItem_SpanAngle(const QGraphicsEllipseItem* self) { + return self->spanAngle(); +} + +void QGraphicsEllipseItem_SetSpanAngle(QGraphicsEllipseItem* self, int angle) { + self->setSpanAngle(static_cast(angle)); +} + +QRectF* QGraphicsEllipseItem_BoundingRect(const QGraphicsEllipseItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsEllipseItem_Shape(const QGraphicsEllipseItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsEllipseItem_Contains(const QGraphicsEllipseItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsEllipseItem_IsObscuredBy(const QGraphicsEllipseItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsEllipseItem_OpaqueArea(const QGraphicsEllipseItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsEllipseItem_Type(const QGraphicsEllipseItem* self) { + return self->type(); +} + +void QGraphicsEllipseItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsEllipseItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsEllipseItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsEllipseItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsEllipseItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsEllipseItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsEllipseItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsEllipseItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsEllipseItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsEllipseItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsEllipseItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsEllipseItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsEllipseItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Type = slot; +} + +int QGraphicsEllipseItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsEllipseItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsEllipseItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsEllipseItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsEllipseItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsEllipseItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsEllipseItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsPolygonItem : public virtual QGraphicsPolygonItem { +public: + + MiqtVirtualQGraphicsPolygonItem(): QGraphicsPolygonItem() {}; + MiqtVirtualQGraphicsPolygonItem(QGraphicsItem* parent): QGraphicsPolygonItem(parent) {}; + + virtual ~MiqtVirtualQGraphicsPolygonItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsPolygonItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsPolygonItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsPolygonItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsPolygonItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsPolygonItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsPolygonItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsPolygonItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsPolygonItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsPolygonItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsPolygonItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsPolygonItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsPolygonItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsPolygonItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsPolygonItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsPolygonItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsPolygonItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsPolygonItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsPolygonItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsPolygonItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsPolygonItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsPolygonItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsPolygonItem::extension(*variant)); + + } + +}; + +void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(); + *outptr_QGraphicsPolygonItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(parent); + *outptr_QGraphicsPolygonItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self) { + Qt::FillRule _ret = self->fillRule(); + return static_cast(_ret); +} + +void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule) { + self->setFillRule(static_cast(rule)); +} + +QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsPolygonItem_Shape(const QGraphicsPolygonItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsPolygonItem_Contains(const QGraphicsPolygonItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsPolygonItem_IsObscuredBy(const QGraphicsPolygonItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsPolygonItem_OpaqueArea(const QGraphicsPolygonItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsPolygonItem_Type(const QGraphicsPolygonItem* self) { + return self->type(); +} + +void QGraphicsPolygonItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsPolygonItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsPolygonItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsPolygonItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsPolygonItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsPolygonItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsPolygonItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsPolygonItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsPolygonItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsPolygonItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsPolygonItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsPolygonItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsPolygonItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Type = slot; +} + +int QGraphicsPolygonItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsPolygonItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsPolygonItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsPolygonItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsPolygonItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsPolygonItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsPolygonItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsLineItem : public virtual QGraphicsLineItem { +public: + + MiqtVirtualQGraphicsLineItem(): QGraphicsLineItem() {}; + MiqtVirtualQGraphicsLineItem(const QLineF& line): QGraphicsLineItem(line) {}; + MiqtVirtualQGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2): QGraphicsLineItem(x1, y1, x2, y2) {}; + MiqtVirtualQGraphicsLineItem(QGraphicsItem* parent): QGraphicsLineItem(parent) {}; + MiqtVirtualQGraphicsLineItem(const QLineF& line, QGraphicsItem* parent): QGraphicsLineItem(line, parent) {}; + MiqtVirtualQGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem* parent): QGraphicsLineItem(x1, y1, x2, y2, parent) {}; + + virtual ~MiqtVirtualQGraphicsLineItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsLineItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsLineItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsLineItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsLineItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsLineItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsLineItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsLineItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsLineItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsLineItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsLineItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsLineItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsLineItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsLineItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsLineItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsLineItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsLineItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsLineItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsLineItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsLineItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsLineItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsLineItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsLineItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsLineItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsLineItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsLineItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsLineItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsLineItem::extension(*variant)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance(int phase) override { + if (handle__Advance == 0) { + QGraphicsLineItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsLineItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsLineItem::advance(static_cast(phase)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithItem = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithItem == 0) { + return QGraphicsLineItem::collidesWithItem(other, mode); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) other; + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_CollidesWithItem(const_cast(this), handle__CollidesWithItem, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithItem(QGraphicsItem* other, int mode) const { + + return QGraphicsLineItem::collidesWithItem(other, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithPath = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithPath == 0) { + return QGraphicsLineItem::collidesWithPath(path, mode); + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_CollidesWithPath(const_cast(this), handle__CollidesWithPath, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithPath(QPainterPath* path, int mode) const { + + return QGraphicsLineItem::collidesWithPath(*path, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override { + if (handle__SceneEventFilter == 0) { + return QGraphicsLineItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsLineItem::sceneEventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsLineItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsLineItem::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsLineItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsLineItem::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsLineItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsLineItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsLineItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsLineItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsLineItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsLineItem::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsLineItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsLineItem::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsLineItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsLineItem::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsLineItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsLineItem::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsLineItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsLineItem::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsLineItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsLineItem::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsLineItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsLineItem::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsLineItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsLineItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsLineItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsLineItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsLineItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsLineItem::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsLineItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsLineItem::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsLineItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsLineItem_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsLineItem::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsLineItem::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsLineItem_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsLineItem::itemChange(static_cast(change), *value)); + + } + +}; + +void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(parent); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line, parent); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self) { + return new QPen(self->pen()); +} + +void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen) { + self->setPen(*pen); +} + +QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self) { + return new QLineF(self->line()); +} + +void QGraphicsLineItem_SetLine(QGraphicsLineItem* self, QLineF* line) { + self->setLine(*line); +} + +void QGraphicsLineItem_SetLine2(QGraphicsLineItem* self, double x1, double y1, double x2, double y2) { + self->setLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +} + +QRectF* QGraphicsLineItem_BoundingRect(const QGraphicsLineItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsLineItem_Shape(const QGraphicsLineItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsLineItem_Contains(const QGraphicsLineItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsLineItem_IsObscuredBy(const QGraphicsLineItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsLineItem_OpaqueArea(const QGraphicsLineItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsLineItem_Type(const QGraphicsLineItem* self) { + return self->type(); +} + +void QGraphicsLineItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsLineItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsLineItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsLineItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsLineItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsLineItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsLineItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsLineItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsLineItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsLineItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsLineItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsLineItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsLineItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Type = slot; +} + +int QGraphicsLineItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsLineItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsLineItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsLineItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsLineItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsLineItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsLineItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsLineItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Advance = slot; +} + +void QGraphicsLineItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsLineItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsLineItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsLineItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsLineItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsLineItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsLineItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsLineItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsLineItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsLineItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsLineItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsLineItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsLineItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsLineItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsLineItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsLineItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsLineItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsLineItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsLineItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsLineItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsLineItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsLineItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsLineItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsLineItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsLineItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsLineItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsLineItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsLineItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsLineItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsLineItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsLineItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsLineItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsLineItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsLineItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsLineItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsLineItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsLineItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsLineItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsLineItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsLineItem_Delete(QGraphicsLineItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsPixmapItem : public virtual QGraphicsPixmapItem { +public: + + MiqtVirtualQGraphicsPixmapItem(): QGraphicsPixmapItem() {}; + MiqtVirtualQGraphicsPixmapItem(const QPixmap& pixmap): QGraphicsPixmapItem(pixmap) {}; + MiqtVirtualQGraphicsPixmapItem(QGraphicsItem* parent): QGraphicsPixmapItem(parent) {}; + MiqtVirtualQGraphicsPixmapItem(const QPixmap& pixmap, QGraphicsItem* parent): QGraphicsPixmapItem(pixmap, parent) {}; + + virtual ~MiqtVirtualQGraphicsPixmapItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsPixmapItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsPixmapItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsPixmapItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsPixmapItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsPixmapItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsPixmapItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsPixmapItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsPixmapItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsPixmapItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsPixmapItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsPixmapItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsPixmapItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsPixmapItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsPixmapItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsPixmapItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsPixmapItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsPixmapItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsPixmapItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsPixmapItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsPixmapItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsPixmapItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsPixmapItem::extension(*variant)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance(int phase) override { + if (handle__Advance == 0) { + QGraphicsPixmapItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsPixmapItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsPixmapItem::advance(static_cast(phase)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithItem = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithItem == 0) { + return QGraphicsPixmapItem::collidesWithItem(other, mode); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) other; + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_CollidesWithItem(const_cast(this), handle__CollidesWithItem, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithItem(QGraphicsItem* other, int mode) const { + + return QGraphicsPixmapItem::collidesWithItem(other, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithPath = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithPath == 0) { + return QGraphicsPixmapItem::collidesWithPath(path, mode); + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_CollidesWithPath(const_cast(this), handle__CollidesWithPath, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithPath(QPainterPath* path, int mode) const { + + return QGraphicsPixmapItem::collidesWithPath(*path, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override { + if (handle__SceneEventFilter == 0) { + return QGraphicsPixmapItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsPixmapItem::sceneEventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsPixmapItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsPixmapItem::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsPixmapItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsPixmapItem::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsPixmapItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsPixmapItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsPixmapItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsPixmapItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsPixmapItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsPixmapItem::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsPixmapItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsPixmapItem::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsPixmapItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsPixmapItem::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsPixmapItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsPixmapItem::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsPixmapItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsPixmapItem::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsPixmapItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsPixmapItem::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsPixmapItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsPixmapItem::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsPixmapItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsPixmapItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsPixmapItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsPixmapItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsPixmapItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsPixmapItem::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsPixmapItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsPixmapItem::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsPixmapItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsPixmapItem::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsPixmapItem::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsPixmapItem::itemChange(static_cast(change), *value)); + + } + +}; + +void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(parent); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap, parent); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self) { + return new QPixmap(self->pixmap()); +} + +void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap) { + self->setPixmap(*pixmap); +} + +int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self) { + Qt::TransformationMode _ret = self->transformationMode(); + return static_cast(_ret); +} + +void QGraphicsPixmapItem_SetTransformationMode(QGraphicsPixmapItem* self, int mode) { + self->setTransformationMode(static_cast(mode)); +} + +QPointF* QGraphicsPixmapItem_Offset(const QGraphicsPixmapItem* self) { + return new QPointF(self->offset()); +} + +void QGraphicsPixmapItem_SetOffset(QGraphicsPixmapItem* self, QPointF* offset) { + self->setOffset(*offset); +} + +void QGraphicsPixmapItem_SetOffset2(QGraphicsPixmapItem* self, double x, double y) { + self->setOffset(static_cast(x), static_cast(y)); +} + +QRectF* QGraphicsPixmapItem_BoundingRect(const QGraphicsPixmapItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsPixmapItem_Shape(const QGraphicsPixmapItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsPixmapItem_Contains(const QGraphicsPixmapItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsPixmapItem_Paint(QGraphicsPixmapItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsPixmapItem_IsObscuredBy(const QGraphicsPixmapItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsPixmapItem_OpaqueArea(const QGraphicsPixmapItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsPixmapItem_Type(const QGraphicsPixmapItem* self) { + return self->type(); +} + +int QGraphicsPixmapItem_ShapeMode(const QGraphicsPixmapItem* self) { + QGraphicsPixmapItem::ShapeMode _ret = self->shapeMode(); + return static_cast(_ret); +} + +void QGraphicsPixmapItem_SetShapeMode(QGraphicsPixmapItem* self, int mode) { + self->setShapeMode(static_cast(mode)); +} + +void QGraphicsPixmapItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsPixmapItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsPixmapItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsPixmapItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsPixmapItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsPixmapItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsPixmapItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsPixmapItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsPixmapItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsPixmapItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsPixmapItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsPixmapItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsPixmapItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Type = slot; +} + +int QGraphicsPixmapItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsPixmapItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsPixmapItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsPixmapItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsPixmapItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsPixmapItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsPixmapItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsPixmapItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Advance = slot; +} + +void QGraphicsPixmapItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsPixmapItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsPixmapItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsPixmapItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsPixmapItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsPixmapItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsPixmapItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsPixmapItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsPixmapItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsPixmapItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsPixmapItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsPixmapItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsTextItem : public virtual QGraphicsTextItem { +public: + + MiqtVirtualQGraphicsTextItem(): QGraphicsTextItem() {}; + MiqtVirtualQGraphicsTextItem(const QString& text): QGraphicsTextItem(text) {}; + MiqtVirtualQGraphicsTextItem(QGraphicsItem* parent): QGraphicsTextItem(parent) {}; + MiqtVirtualQGraphicsTextItem(const QString& text, QGraphicsItem* parent): QGraphicsTextItem(text, parent) {}; + + virtual ~MiqtVirtualQGraphicsTextItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsTextItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsTextItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsTextItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsTextItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsTextItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsTextItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsTextItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsTextItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsTextItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsTextItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsTextItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsTextItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsTextItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsTextItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsTextItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsTextItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsTextItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsTextItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsTextItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsTextItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsTextItem::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsTextItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsTextItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsTextItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsTextItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsTextItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsTextItem::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsTextItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsTextItem::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsTextItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsTextItem::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsTextItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsTextItem::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsTextItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsTextItem::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsTextItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsTextItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsTextItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsTextItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsTextItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsTextItem::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsTextItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsTextItem::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsTextItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsTextItem::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsTextItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsTextItem::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsTextItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsTextItem_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsTextItem::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsTextItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsTextItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsTextItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsTextItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsTextItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsTextItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsTextItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsTextItem::extension(*variant)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* ev) override { + if (handle__Event == 0) { + return QGraphicsTextItem::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsTextItem::event(ev); + + } + +}; + +void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(parent); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString, parent); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QGraphicsTextItem_Tr(const char* s) { + QString _ret = QGraphicsTextItem::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_TrUtf8(const char* s) { + QString _ret = QGraphicsTextItem::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_ToHtml(const QGraphicsTextItem* self) { + QString _ret = self->toHtml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsTextItem_SetHtml(QGraphicsTextItem* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +struct miqt_string QGraphicsTextItem_ToPlainText(const QGraphicsTextItem* self) { + QString _ret = self->toPlainText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsTextItem_SetPlainText(QGraphicsTextItem* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setPlainText(text_QString); +} + +QFont* QGraphicsTextItem_Font(const QGraphicsTextItem* self) { + return new QFont(self->font()); +} + +void QGraphicsTextItem_SetFont(QGraphicsTextItem* self, QFont* font) { + self->setFont(*font); +} + +void QGraphicsTextItem_SetDefaultTextColor(QGraphicsTextItem* self, QColor* c) { + self->setDefaultTextColor(*c); +} + +QColor* QGraphicsTextItem_DefaultTextColor(const QGraphicsTextItem* self) { + return new QColor(self->defaultTextColor()); +} + +QRectF* QGraphicsTextItem_BoundingRect(const QGraphicsTextItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsTextItem_Shape(const QGraphicsTextItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsTextItem_Contains(const QGraphicsTextItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsTextItem_Paint(QGraphicsTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsTextItem_IsObscuredBy(const QGraphicsTextItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsTextItem_OpaqueArea(const QGraphicsTextItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsTextItem_Type(const QGraphicsTextItem* self) { + return self->type(); +} + +void QGraphicsTextItem_SetTextWidth(QGraphicsTextItem* self, double width) { + self->setTextWidth(static_cast(width)); +} + +double QGraphicsTextItem_TextWidth(const QGraphicsTextItem* self) { + qreal _ret = self->textWidth(); + return static_cast(_ret); +} + +void QGraphicsTextItem_AdjustSize(QGraphicsTextItem* self) { + self->adjustSize(); +} + +void QGraphicsTextItem_SetDocument(QGraphicsTextItem* self, QTextDocument* document) { + self->setDocument(document); +} + +QTextDocument* QGraphicsTextItem_Document(const QGraphicsTextItem* self) { + return self->document(); +} + +void QGraphicsTextItem_SetTextInteractionFlags(QGraphicsTextItem* self, int flags) { + self->setTextInteractionFlags(static_cast(flags)); +} + +int QGraphicsTextItem_TextInteractionFlags(const QGraphicsTextItem* self) { + Qt::TextInteractionFlags _ret = self->textInteractionFlags(); + return static_cast(_ret); +} + +void QGraphicsTextItem_SetTabChangesFocus(QGraphicsTextItem* self, bool b) { + self->setTabChangesFocus(b); +} + +bool QGraphicsTextItem_TabChangesFocus(const QGraphicsTextItem* self) { + return self->tabChangesFocus(); +} + +void QGraphicsTextItem_SetOpenExternalLinks(QGraphicsTextItem* self, bool open) { + self->setOpenExternalLinks(open); +} + +bool QGraphicsTextItem_OpenExternalLinks(const QGraphicsTextItem* self) { + return self->openExternalLinks(); +} + +void QGraphicsTextItem_SetTextCursor(QGraphicsTextItem* self, QTextCursor* cursor) { + self->setTextCursor(*cursor); +} + +QTextCursor* QGraphicsTextItem_TextCursor(const QGraphicsTextItem* self) { + return new QTextCursor(self->textCursor()); +} + +void QGraphicsTextItem_LinkActivated(QGraphicsTextItem* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->linkActivated(param1_QString); +} + +void QGraphicsTextItem_connect_LinkActivated(QGraphicsTextItem* self, intptr_t slot) { + MiqtVirtualQGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkActivated), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QGraphicsTextItem_LinkActivated(slot, sigval1); + }); +} + +void QGraphicsTextItem_LinkHovered(QGraphicsTextItem* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->linkHovered(param1_QString); +} + +void QGraphicsTextItem_connect_LinkHovered(QGraphicsTextItem* self, intptr_t slot) { + MiqtVirtualQGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkHovered), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QGraphicsTextItem_LinkHovered(slot, sigval1); + }); +} + +struct miqt_string QGraphicsTextItem_Tr2(const char* s, const char* c) { + QString _ret = QGraphicsTextItem::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_Tr3(const char* s, const char* c, int n) { + QString _ret = QGraphicsTextItem::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_TrUtf82(const char* s, const char* c) { + QString _ret = QGraphicsTextItem::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QGraphicsTextItem::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsTextItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsTextItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsTextItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsTextItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsTextItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsTextItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsTextItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsTextItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsTextItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Type = slot; +} + +int QGraphicsTextItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsTextItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsTextItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsTextItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsTextItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsTextItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsTextItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsTextItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsTextItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsTextItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsTextItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsTextItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsTextItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsTextItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsTextItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsTextItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsTextItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsTextItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsTextItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsTextItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsTextItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsTextItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsTextItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsTextItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsTextItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsTextItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsTextItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsTextItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsTextItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsTextItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsTextItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsTextItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsTextItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsTextItem_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Event = slot; +} + +bool QGraphicsTextItem_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Event(ev); +} + +void QGraphicsTextItem_Delete(QGraphicsTextItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsSimpleTextItem : public virtual QGraphicsSimpleTextItem { +public: + + MiqtVirtualQGraphicsSimpleTextItem(): QGraphicsSimpleTextItem() {}; + MiqtVirtualQGraphicsSimpleTextItem(const QString& text): QGraphicsSimpleTextItem(text) {}; + MiqtVirtualQGraphicsSimpleTextItem(QGraphicsItem* parent): QGraphicsSimpleTextItem(parent) {}; + MiqtVirtualQGraphicsSimpleTextItem(const QString& text, QGraphicsItem* parent): QGraphicsSimpleTextItem(text, parent) {}; + + virtual ~MiqtVirtualQGraphicsSimpleTextItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsSimpleTextItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsSimpleTextItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsSimpleTextItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsSimpleTextItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsSimpleTextItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsSimpleTextItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsSimpleTextItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsSimpleTextItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsSimpleTextItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsSimpleTextItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsSimpleTextItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsSimpleTextItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsSimpleTextItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsSimpleTextItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsSimpleTextItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsSimpleTextItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsSimpleTextItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsSimpleTextItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsSimpleTextItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsSimpleTextItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsSimpleTextItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsSimpleTextItem::extension(*variant)); + + } + +}; + +void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(parent); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString, parent); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setText(text_QString); +} + +struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self) { + QString _ret = self->text(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font) { + self->setFont(*font); +} + +QFont* QGraphicsSimpleTextItem_Font(const QGraphicsSimpleTextItem* self) { + return new QFont(self->font()); +} + +QRectF* QGraphicsSimpleTextItem_BoundingRect(const QGraphicsSimpleTextItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsSimpleTextItem_Shape(const QGraphicsSimpleTextItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsSimpleTextItem_Contains(const QGraphicsSimpleTextItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsSimpleTextItem_Paint(QGraphicsSimpleTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsSimpleTextItem_IsObscuredBy(const QGraphicsSimpleTextItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsSimpleTextItem_OpaqueArea(const QGraphicsSimpleTextItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsSimpleTextItem_Type(const QGraphicsSimpleTextItem* self) { + return self->type(); +} + +void QGraphicsSimpleTextItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsSimpleTextItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsSimpleTextItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsSimpleTextItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsSimpleTextItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsSimpleTextItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsSimpleTextItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsSimpleTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsSimpleTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsSimpleTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsSimpleTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsSimpleTextItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsSimpleTextItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Type = slot; +} + +int QGraphicsSimpleTextItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsSimpleTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsSimpleTextItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsSimpleTextItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsSimpleTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsSimpleTextItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsSimpleTextItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsItemGroup : public virtual QGraphicsItemGroup { +public: + + MiqtVirtualQGraphicsItemGroup(): QGraphicsItemGroup() {}; + MiqtVirtualQGraphicsItemGroup(QGraphicsItem* parent): QGraphicsItemGroup(parent) {}; + + virtual ~MiqtVirtualQGraphicsItemGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsItemGroup::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsItemGroup::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsItemGroup::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsItemGroup_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsItemGroup::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsItemGroup::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsItemGroup::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsItemGroup::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsItemGroup::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsItemGroup::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsItemGroup::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance(int phase) override { + if (handle__Advance == 0) { + QGraphicsItemGroup::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsItemGroup_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsItemGroup::advance(static_cast(phase)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsItemGroup::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsItemGroup::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsItemGroup::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsItemGroup::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithItem = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithItem == 0) { + return QGraphicsItemGroup::collidesWithItem(other, mode); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) other; + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_CollidesWithItem(const_cast(this), handle__CollidesWithItem, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithItem(QGraphicsItem* other, int mode) const { + + return QGraphicsItemGroup::collidesWithItem(other, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithPath = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithPath == 0) { + return QGraphicsItemGroup::collidesWithPath(path, mode); + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_CollidesWithPath(const_cast(this), handle__CollidesWithPath, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithPath(QPainterPath* path, int mode) const { + + return QGraphicsItemGroup::collidesWithPath(*path, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override { + if (handle__SceneEventFilter == 0) { + return QGraphicsItemGroup::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsItemGroup::sceneEventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsItemGroup::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsItemGroup::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsItemGroup::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsItemGroup::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsItemGroup::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsItemGroup::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsItemGroup::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsItemGroup::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsItemGroup::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsItemGroup::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsItemGroup::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsItemGroup::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsItemGroup::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItemGroup::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsItemGroup::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItemGroup::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsItemGroup::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItemGroup::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsItemGroup::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsItemGroup::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsItemGroup::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsItemGroup::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsItemGroup::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsItemGroup::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsItemGroup::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsItemGroup::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsItemGroup::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsItemGroup::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsItemGroup::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsItemGroup::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsItemGroup::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsItemGroup::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsItemGroup::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsItemGroup::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsItemGroup::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsItemGroup::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsItemGroup::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsItemGroup_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsItemGroup::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsItemGroup::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsItemGroup::extension(*variant)); + + } + +}; + +void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(); + *outptr_QGraphicsItemGroup = ret; + *outptr_QGraphicsItem = static_cast(ret); } -QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsTextItem(text_QString); +void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(parent); + *outptr_QGraphicsItemGroup = ret; + *outptr_QGraphicsItem = static_cast(ret); } -QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent) { - return new QGraphicsTextItem(parent); +void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { + self->addToGroup(item); } -QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsTextItem(text_QString, parent); +void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { + self->removeFromGroup(item); } -QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self) { - return (QMetaObject*) self->metaObject(); +QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self) { + return new QRectF(self->boundingRect()); } -void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1) { - return self->qt_metacast(param1); +void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } -struct miqt_string QGraphicsTextItem_Tr(const char* s) { - QString _ret = QGraphicsTextItem::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QGraphicsItemGroup_IsObscuredBy(const QGraphicsItemGroup* self, QGraphicsItem* item) { + return self->isObscuredBy(item); } -struct miqt_string QGraphicsTextItem_TrUtf8(const char* s) { - QString _ret = QGraphicsTextItem::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QPainterPath* QGraphicsItemGroup_OpaqueArea(const QGraphicsItemGroup* self) { + return new QPainterPath(self->opaqueArea()); } -struct miqt_string QGraphicsTextItem_ToHtml(const QGraphicsTextItem* self) { - QString _ret = self->toHtml(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +int QGraphicsItemGroup_Type(const QGraphicsItemGroup* self) { + return self->type(); } -void QGraphicsTextItem_SetHtml(QGraphicsTextItem* self, struct miqt_string html) { - QString html_QString = QString::fromUtf8(html.data, html.len); - self->setHtml(html_QString); +void QGraphicsItemGroup_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__BoundingRect = slot; } -struct miqt_string QGraphicsTextItem_ToPlainText(const QGraphicsTextItem* self) { - QString _ret = self->toPlainText(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QRectF* QGraphicsItemGroup_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_BoundingRect(); } -void QGraphicsTextItem_SetPlainText(QGraphicsTextItem* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setPlainText(text_QString); +void QGraphicsItemGroup_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Paint = slot; } -QFont* QGraphicsTextItem_Font(const QGraphicsTextItem* self) { - return new QFont(self->font()); +void QGraphicsItemGroup_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Paint(painter, option, widget); } -void QGraphicsTextItem_SetFont(QGraphicsTextItem* self, QFont* font) { - self->setFont(*font); +void QGraphicsItemGroup_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__IsObscuredBy = slot; } -void QGraphicsTextItem_SetDefaultTextColor(QGraphicsTextItem* self, QColor* c) { - self->setDefaultTextColor(*c); +bool QGraphicsItemGroup_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_IsObscuredBy(item); } -QColor* QGraphicsTextItem_DefaultTextColor(const QGraphicsTextItem* self) { - return new QColor(self->defaultTextColor()); +void QGraphicsItemGroup_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__OpaqueArea = slot; } -QRectF* QGraphicsTextItem_BoundingRect(const QGraphicsTextItem* self) { - return new QRectF(self->boundingRect()); +QPainterPath* QGraphicsItemGroup_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_OpaqueArea(); } -QPainterPath* QGraphicsTextItem_Shape(const QGraphicsTextItem* self) { - return new QPainterPath(self->shape()); +void QGraphicsItemGroup_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Type = slot; } -bool QGraphicsTextItem_Contains(const QGraphicsTextItem* self, QPointF* point) { - return self->contains(*point); +int QGraphicsItemGroup_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Type(); } -void QGraphicsTextItem_Paint(QGraphicsTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsItemGroup_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Advance = slot; } -bool QGraphicsTextItem_IsObscuredBy(const QGraphicsTextItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsItemGroup_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Advance(phase); } -QPainterPath* QGraphicsTextItem_OpaqueArea(const QGraphicsTextItem* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsItemGroup_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Shape = slot; } -int QGraphicsTextItem_Type(const QGraphicsTextItem* self) { - return self->type(); +QPainterPath* QGraphicsItemGroup_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Shape(); } -void QGraphicsTextItem_SetTextWidth(QGraphicsTextItem* self, double width) { - self->setTextWidth(static_cast(width)); +void QGraphicsItemGroup_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Contains = slot; } -double QGraphicsTextItem_TextWidth(const QGraphicsTextItem* self) { - qreal _ret = self->textWidth(); - return static_cast(_ret); +bool QGraphicsItemGroup_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Contains(point); } -void QGraphicsTextItem_AdjustSize(QGraphicsTextItem* self) { - self->adjustSize(); +void QGraphicsItemGroup_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__CollidesWithItem = slot; } -void QGraphicsTextItem_SetDocument(QGraphicsTextItem* self, QTextDocument* document) { - self->setDocument(document); +bool QGraphicsItemGroup_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_CollidesWithItem(other, mode); } -QTextDocument* QGraphicsTextItem_Document(const QGraphicsTextItem* self) { - return self->document(); +void QGraphicsItemGroup_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__CollidesWithPath = slot; } -void QGraphicsTextItem_SetTextInteractionFlags(QGraphicsTextItem* self, int flags) { - self->setTextInteractionFlags(static_cast(flags)); +bool QGraphicsItemGroup_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_CollidesWithPath(path, mode); } -int QGraphicsTextItem_TextInteractionFlags(const QGraphicsTextItem* self) { - Qt::TextInteractionFlags _ret = self->textInteractionFlags(); - return static_cast(_ret); +void QGraphicsItemGroup_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SceneEventFilter = slot; } -void QGraphicsTextItem_SetTabChangesFocus(QGraphicsTextItem* self, bool b) { - self->setTabChangesFocus(b); +bool QGraphicsItemGroup_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SceneEventFilter(watched, event); } -bool QGraphicsTextItem_TabChangesFocus(const QGraphicsTextItem* self) { - return self->tabChangesFocus(); +void QGraphicsItemGroup_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SceneEvent = slot; } -void QGraphicsTextItem_SetOpenExternalLinks(QGraphicsTextItem* self, bool open) { - self->setOpenExternalLinks(open); +bool QGraphicsItemGroup_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SceneEvent(event); } -bool QGraphicsTextItem_OpenExternalLinks(const QGraphicsTextItem* self) { - return self->openExternalLinks(); +void QGraphicsItemGroup_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__ContextMenuEvent = slot; } -void QGraphicsTextItem_SetTextCursor(QGraphicsTextItem* self, QTextCursor* cursor) { - self->setTextCursor(*cursor); +void QGraphicsItemGroup_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_ContextMenuEvent(event); } -QTextCursor* QGraphicsTextItem_TextCursor(const QGraphicsTextItem* self) { - return new QTextCursor(self->textCursor()); +void QGraphicsItemGroup_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DragEnterEvent = slot; } -void QGraphicsTextItem_LinkActivated(QGraphicsTextItem* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->linkActivated(param1_QString); +void QGraphicsItemGroup_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DragEnterEvent(event); } -void QGraphicsTextItem_connect_LinkActivated(QGraphicsTextItem* self, intptr_t slot) { - QGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkActivated), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QGraphicsTextItem_LinkActivated(slot, sigval1); - }); +void QGraphicsItemGroup_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DragLeaveEvent = slot; } -void QGraphicsTextItem_LinkHovered(QGraphicsTextItem* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->linkHovered(param1_QString); +void QGraphicsItemGroup_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DragLeaveEvent(event); } -void QGraphicsTextItem_connect_LinkHovered(QGraphicsTextItem* self, intptr_t slot) { - QGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkHovered), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QGraphicsTextItem_LinkHovered(slot, sigval1); - }); +void QGraphicsItemGroup_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DragMoveEvent = slot; } -struct miqt_string QGraphicsTextItem_Tr2(const char* s, const char* c) { - QString _ret = QGraphicsTextItem::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DragMoveEvent(event); } -struct miqt_string QGraphicsTextItem_Tr3(const char* s, const char* c, int n) { - QString _ret = QGraphicsTextItem::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DropEvent = slot; } -struct miqt_string QGraphicsTextItem_TrUtf82(const char* s, const char* c) { - QString _ret = QGraphicsTextItem::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DropEvent(event); } -struct miqt_string QGraphicsTextItem_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QGraphicsTextItem::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__FocusInEvent = slot; } -void QGraphicsTextItem_Delete(QGraphicsTextItem* self) { - delete self; +void QGraphicsItemGroup_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_FocusInEvent(event); } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new() { - return new QGraphicsSimpleTextItem(); +void QGraphicsItemGroup_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__FocusOutEvent = slot; } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsSimpleTextItem(text_QString); +void QGraphicsItemGroup_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_FocusOutEvent(event); } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent) { - return new QGraphicsSimpleTextItem(parent); +void QGraphicsItemGroup_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__HoverEnterEvent = slot; } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsSimpleTextItem(text_QString, parent); +void QGraphicsItemGroup_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_HoverEnterEvent(event); } -void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setText(text_QString); +void QGraphicsItemGroup_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__HoverMoveEvent = slot; } -struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self) { - QString _ret = self->text(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_HoverMoveEvent(event); } -void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font) { - self->setFont(*font); +void QGraphicsItemGroup_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__HoverLeaveEvent = slot; } -QFont* QGraphicsSimpleTextItem_Font(const QGraphicsSimpleTextItem* self) { - return new QFont(self->font()); +void QGraphicsItemGroup_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_HoverLeaveEvent(event); } -QRectF* QGraphicsSimpleTextItem_BoundingRect(const QGraphicsSimpleTextItem* self) { - return new QRectF(self->boundingRect()); +void QGraphicsItemGroup_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__KeyPressEvent = slot; } -QPainterPath* QGraphicsSimpleTextItem_Shape(const QGraphicsSimpleTextItem* self) { - return new QPainterPath(self->shape()); +void QGraphicsItemGroup_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_KeyPressEvent(event); } -bool QGraphicsSimpleTextItem_Contains(const QGraphicsSimpleTextItem* self, QPointF* point) { - return self->contains(*point); +void QGraphicsItemGroup_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__KeyReleaseEvent = slot; } -void QGraphicsSimpleTextItem_Paint(QGraphicsSimpleTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsItemGroup_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_KeyReleaseEvent(event); } -bool QGraphicsSimpleTextItem_IsObscuredBy(const QGraphicsSimpleTextItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsItemGroup_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MousePressEvent = slot; } -QPainterPath* QGraphicsSimpleTextItem_OpaqueArea(const QGraphicsSimpleTextItem* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsItemGroup_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MousePressEvent(event); } -int QGraphicsSimpleTextItem_Type(const QGraphicsSimpleTextItem* self) { - return self->type(); +void QGraphicsItemGroup_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MouseMoveEvent = slot; } -void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self) { - delete self; +void QGraphicsItemGroup_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MouseMoveEvent(event); } -QGraphicsItemGroup* QGraphicsItemGroup_new() { - return new QGraphicsItemGroup(); +void QGraphicsItemGroup_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MouseReleaseEvent = slot; } -QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent) { - return new QGraphicsItemGroup(parent); +void QGraphicsItemGroup_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MouseReleaseEvent(event); } -void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { - self->addToGroup(item); +void QGraphicsItemGroup_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MouseDoubleClickEvent = slot; } -void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { - self->removeFromGroup(item); +void QGraphicsItemGroup_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MouseDoubleClickEvent(event); } -QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self) { - return new QRectF(self->boundingRect()); +void QGraphicsItemGroup_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__WheelEvent = slot; } -void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsItemGroup_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_WheelEvent(event); } -bool QGraphicsItemGroup_IsObscuredBy(const QGraphicsItemGroup* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsItemGroup_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__InputMethodEvent = slot; } -QPainterPath* QGraphicsItemGroup_OpaqueArea(const QGraphicsItemGroup* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsItemGroup_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_InputMethodEvent(event); } -int QGraphicsItemGroup_Type(const QGraphicsItemGroup* self) { - return self->type(); +void QGraphicsItemGroup_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__InputMethodQuery = slot; } -void QGraphicsItemGroup_Paint3(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +QVariant* QGraphicsItemGroup_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsItemGroup_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsItemGroup_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsItemGroup_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsItemGroup_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsItemGroup_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsItemGroup_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsItemGroup_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsItemGroup_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Extension(variant); } -void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self) { - delete self; +void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsitem.go b/qt/gen_qgraphicsitem.go index 7401de96..c942370f 100644 --- a/qt/gen_qgraphicsitem.go +++ b/qt/gen_qgraphicsitem.go @@ -101,6 +101,12 @@ const ( QGraphicsItem__UserType QGraphicsItem__ = 65536 ) +type QGraphicsItem__Extension int + +const ( + QGraphicsItem__UserExtension QGraphicsItem__Extension = 2147483648 +) + type QGraphicsPathItem__ int const ( @@ -164,7 +170,8 @@ const ( ) type QGraphicsItem struct { - h *C.QGraphicsItem + h *C.QGraphicsItem + isSubclass bool } func (this *QGraphicsItem) cPointer() *C.QGraphicsItem { @@ -181,6 +188,7 @@ func (this *QGraphicsItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGraphicsItem constructs the type using only CGO pointers. func newQGraphicsItem(h *C.QGraphicsItem) *QGraphicsItem { if h == nil { return nil @@ -188,12 +196,17 @@ func newQGraphicsItem(h *C.QGraphicsItem) *QGraphicsItem { return &QGraphicsItem{h: h} } +// UnsafeNewQGraphicsItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsItem(h unsafe.Pointer) *QGraphicsItem { - return newQGraphicsItem((*C.QGraphicsItem)(h)) + if h == nil { + return nil + } + + return &QGraphicsItem{h: (*C.QGraphicsItem)(h)} } func (this *QGraphicsItem) Scene() *QGraphicsScene { - return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsItem_Scene(this.h))) + return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsItem_Scene(this.h)), nil) } func (this *QGraphicsItem) ParentItem() *QGraphicsItem { @@ -205,19 +218,19 @@ func (this *QGraphicsItem) TopLevelItem() *QGraphicsItem { } func (this *QGraphicsItem) ParentObject() *QGraphicsObject { - return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ParentObject(this.h))) + return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ParentObject(this.h)), nil, nil) } func (this *QGraphicsItem) ParentWidget() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_ParentWidget(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_ParentWidget(this.h)), nil, nil, nil, nil) } func (this *QGraphicsItem) TopLevelWidget() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_TopLevelWidget(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_TopLevelWidget(this.h)), nil, nil, nil, nil) } func (this *QGraphicsItem) Window() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_Window(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_Window(this.h)), nil, nil, nil, nil) } func (this *QGraphicsItem) Panel() *QGraphicsItem { @@ -251,15 +264,15 @@ func (this *QGraphicsItem) IsPanel() bool { } func (this *QGraphicsItem) ToGraphicsObject() *QGraphicsObject { - return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject(this.h))) + return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject(this.h)), nil, nil) } func (this *QGraphicsItem) ToGraphicsObject2() *QGraphicsObject { - return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject2(this.h))) + return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject2(this.h)), nil, nil) } func (this *QGraphicsItem) Group() *QGraphicsItemGroup { - return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsItem_Group(this.h))) + return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsItem_Group(this.h)), nil) } func (this *QGraphicsItem) SetGroup(group *QGraphicsItemGroup) { @@ -389,7 +402,7 @@ func (this *QGraphicsItem) SetOpacity(opacity float64) { } func (this *QGraphicsItem) GraphicsEffect() *QGraphicsEffect { - return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QGraphicsItem_GraphicsEffect(this.h))) + return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QGraphicsItem_GraphicsEffect(this.h)), nil) } func (this *QGraphicsItem) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -617,7 +630,7 @@ func (this *QGraphicsItem) Transformations() []*QGraphicsTransform { _ret := make([]*QGraphicsTransform, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsTransform)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGraphicsTransform(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGraphicsTransform(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -706,12 +719,12 @@ func (this *QGraphicsItem) Contains(point *QPointF) bool { return (bool)(C.QGraphicsItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsItem) CollidesWithItem(other *QGraphicsItem) bool { - return (bool)(C.QGraphicsItem_CollidesWithItem(this.h, other.cPointer())) +func (this *QGraphicsItem) CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + return (bool)(C.QGraphicsItem_CollidesWithItem(this.h, other.cPointer(), (C.int)(mode))) } -func (this *QGraphicsItem) CollidesWithPath(path *QPainterPath) bool { - return (bool)(C.QGraphicsItem_CollidesWithPath(this.h, path.cPointer())) +func (this *QGraphicsItem) CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + return (bool)(C.QGraphicsItem_CollidesWithPath(this.h, path.cPointer(), (C.int)(mode))) } func (this *QGraphicsItem) CollidingItems() []*QGraphicsItem { @@ -758,8 +771,8 @@ func (this *QGraphicsItem) SetBoundingRegionGranularity(granularity float64) { C.QGraphicsItem_SetBoundingRegionGranularity(this.h, (C.double)(granularity)) } -func (this *QGraphicsItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsItem) Update() { @@ -1074,14 +1087,6 @@ func (this *QGraphicsItem) SetTransform2(matrix *QTransform, combine bool) { C.QGraphicsItem_SetTransform2(this.h, matrix.cPointer(), (C.bool)(combine)) } -func (this *QGraphicsItem) CollidesWithItem2(other *QGraphicsItem, mode ItemSelectionMode) bool { - return (bool)(C.QGraphicsItem_CollidesWithItem2(this.h, other.cPointer(), (C.int)(mode))) -} - -func (this *QGraphicsItem) CollidesWithPath2(path *QPainterPath, mode ItemSelectionMode) bool { - return (bool)(C.QGraphicsItem_CollidesWithPath2(this.h, path.cPointer(), (C.int)(mode))) -} - func (this *QGraphicsItem) CollidingItems1(mode ItemSelectionMode) []*QGraphicsItem { var _ma C.struct_miqt_array = C.QGraphicsItem_CollidingItems1(this.h, (C.int)(mode)) _ret := make([]*QGraphicsItem, int(_ma.len)) @@ -1096,10 +1101,6 @@ func (this *QGraphicsItem) IsObscured1(rect *QRectF) bool { return (bool)(C.QGraphicsItem_IsObscured1(this.h, rect.cPointer())) } -func (this *QGraphicsItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} - func (this *QGraphicsItem) Update1(rect *QRectF) { C.QGraphicsItem_Update1(this.h, rect.cPointer()) } @@ -1110,7 +1111,7 @@ func (this *QGraphicsItem) Scroll3(dx float64, dy float64, rect *QRectF) { // Delete this object from C++ memory. func (this *QGraphicsItem) Delete() { - C.QGraphicsItem_Delete(this.h) + C.QGraphicsItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1123,7 +1124,8 @@ func (this *QGraphicsItem) GoGC() { } type QGraphicsObject struct { - h *C.QGraphicsObject + h *C.QGraphicsObject + isSubclass bool *QObject *QGraphicsItem } @@ -1142,15 +1144,25 @@ func (this *QGraphicsObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsObject(h *C.QGraphicsObject) *QGraphicsObject { +// newQGraphicsObject constructs the type using only CGO pointers. +func newQGraphicsObject(h *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsObject { if h == nil { return nil } - return &QGraphicsObject{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + return &QGraphicsObject{h: h, + QObject: newQObject(h_QObject), + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} } -func UnsafeNewQGraphicsObject(h unsafe.Pointer) *QGraphicsObject { - return newQGraphicsObject((*C.QGraphicsObject)(h)) +// UnsafeNewQGraphicsObject constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsObject(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsObject { + if h == nil { + return nil + } + + return &QGraphicsObject{h: (*C.QGraphicsObject)(h), + QObject: UnsafeNewQObject(h_QObject), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } func (this *QGraphicsObject) MetaObject() *QMetaObject { @@ -1443,7 +1455,7 @@ func (this *QGraphicsObject) GrabGesture2(typeVal GestureType, flags GestureFlag // Delete this object from C++ memory. func (this *QGraphicsObject) Delete() { - C.QGraphicsObject_Delete(this.h) + C.QGraphicsObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1456,7 +1468,8 @@ func (this *QGraphicsObject) GoGC() { } type QAbstractGraphicsShapeItem struct { - h *C.QAbstractGraphicsShapeItem + h *C.QAbstractGraphicsShapeItem + isSubclass bool *QGraphicsItem } @@ -1474,15 +1487,23 @@ func (this *QAbstractGraphicsShapeItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem) *QAbstractGraphicsShapeItem { +// newQAbstractGraphicsShapeItem constructs the type using only CGO pointers. +func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QAbstractGraphicsShapeItem { if h == nil { return nil } - return &QAbstractGraphicsShapeItem{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + return &QAbstractGraphicsShapeItem{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} } -func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer) *QAbstractGraphicsShapeItem { - return newQAbstractGraphicsShapeItem((*C.QAbstractGraphicsShapeItem)(h)) +// UnsafeNewQAbstractGraphicsShapeItem constructs the type using only unsafe pointers. +func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QAbstractGraphicsShapeItem { + if h == nil { + return nil + } + + return &QAbstractGraphicsShapeItem{h: (*C.QAbstractGraphicsShapeItem)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } func (this *QAbstractGraphicsShapeItem) Pen() *QPen { @@ -1520,7 +1541,7 @@ func (this *QAbstractGraphicsShapeItem) OpaqueArea() *QPainterPath { // Delete this object from C++ memory. func (this *QAbstractGraphicsShapeItem) Delete() { - C.QAbstractGraphicsShapeItem_Delete(this.h) + C.QAbstractGraphicsShapeItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1533,7 +1554,8 @@ func (this *QAbstractGraphicsShapeItem) GoGC() { } type QGraphicsPathItem struct { - h *C.QGraphicsPathItem + h *C.QGraphicsPathItem + isSubclass bool *QAbstractGraphicsShapeItem } @@ -1551,39 +1573,71 @@ func (this *QGraphicsPathItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsPathItem(h *C.QGraphicsPathItem) *QGraphicsPathItem { +// newQGraphicsPathItem constructs the type using only CGO pointers. +func newQGraphicsPathItem(h *C.QGraphicsPathItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPathItem { if h == nil { return nil } - return &QGraphicsPathItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} + return &QGraphicsPathItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsPathItem(h unsafe.Pointer) *QGraphicsPathItem { - return newQGraphicsPathItem((*C.QGraphicsPathItem)(h)) +// UnsafeNewQGraphicsPathItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsPathItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPathItem { + if h == nil { + return nil + } + + return &QGraphicsPathItem{h: (*C.QGraphicsPathItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } // NewQGraphicsPathItem constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem() *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new() - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new(&outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsPathItem2 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem2(path *QPainterPath) *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new2(path.cPointer()) - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new2(path.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsPathItem3 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem3(parent *QGraphicsItem) *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new3(parent.cPointer()) - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new3(parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsPathItem4 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem4(path *QPainterPath, parent *QGraphicsItem) *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer()) - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } func (this *QGraphicsPathItem) Path() *QPainterPath { @@ -1615,8 +1669,8 @@ func (this *QGraphicsPathItem) Contains(point *QPointF) bool { return (bool)(C.QGraphicsPathItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsPathItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsPathItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsPathItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsPathItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsPathItem) IsObscuredBy(item *QGraphicsItem) bool { @@ -1634,13 +1688,259 @@ func (this *QGraphicsPathItem) Type() int { return (int)(C.QGraphicsPathItem_Type(this.h)) } -func (this *QGraphicsPathItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsPathItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsPathItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsPathItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsPathItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_BoundingRect +func miqt_exec_callback_QGraphicsPathItem_BoundingRect(self *C.QGraphicsPathItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPathItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsPathItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPathItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Shape +func miqt_exec_callback_QGraphicsPathItem_Shape(self *C.QGraphicsPathItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPathItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsPathItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsPathItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsPathItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Contains +func miqt_exec_callback_QGraphicsPathItem_Contains(self *C.QGraphicsPathItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsPathItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsPathItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsPathItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Paint +func miqt_exec_callback_QGraphicsPathItem_Paint(self *C.QGraphicsPathItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsPathItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsPathItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsPathItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsPathItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_IsObscuredBy +func miqt_exec_callback_QGraphicsPathItem_IsObscuredBy(self *C.QGraphicsPathItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsPathItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPathItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_OpaqueArea +func miqt_exec_callback_QGraphicsPathItem_OpaqueArea(self *C.QGraphicsPathItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPathItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsPathItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsPathItem) OnType(slot func(super func() int) int) { + C.QGraphicsPathItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Type +func miqt_exec_callback_QGraphicsPathItem_Type(self *C.QGraphicsPathItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsPathItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsPathItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsPathItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_SupportsExtension +func miqt_exec_callback_QGraphicsPathItem_SupportsExtension(self *C.QGraphicsPathItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsPathItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsPathItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsPathItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_SetExtension +func miqt_exec_callback_QGraphicsPathItem_SetExtension(self *C.QGraphicsPathItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsPathItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsPathItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsPathItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Extension +func miqt_exec_callback_QGraphicsPathItem_Extension(self *C.QGraphicsPathItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QGraphicsPathItem) Delete() { - C.QGraphicsPathItem_Delete(this.h) + C.QGraphicsPathItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1653,7 +1953,8 @@ func (this *QGraphicsPathItem) GoGC() { } type QGraphicsRectItem struct { - h *C.QGraphicsRectItem + h *C.QGraphicsRectItem + isSubclass bool *QAbstractGraphicsShapeItem } @@ -1671,51 +1972,95 @@ func (this *QGraphicsRectItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsRectItem(h *C.QGraphicsRectItem) *QGraphicsRectItem { +// newQGraphicsRectItem constructs the type using only CGO pointers. +func newQGraphicsRectItem(h *C.QGraphicsRectItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsRectItem { if h == nil { return nil } - return &QGraphicsRectItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} + return &QGraphicsRectItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsRectItem(h unsafe.Pointer) *QGraphicsRectItem { - return newQGraphicsRectItem((*C.QGraphicsRectItem)(h)) +// UnsafeNewQGraphicsRectItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsRectItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsRectItem { + if h == nil { + return nil + } + + return &QGraphicsRectItem{h: (*C.QGraphicsRectItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } // NewQGraphicsRectItem constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem() *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new() - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new(&outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem2 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem2(rect *QRectF) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new2(rect.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new2(rect.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem3 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem3(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem4 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem4(parent *QGraphicsItem) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new4(parent.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new4(parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem5 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem6 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } func (this *QGraphicsRectItem) Rect() *QRectF { @@ -1751,8 +2096,8 @@ func (this *QGraphicsRectItem) Contains(point *QPointF) bool { return (bool)(C.QGraphicsRectItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsRectItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsRectItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsRectItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsRectItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsRectItem) IsObscuredBy(item *QGraphicsItem) bool { @@ -1770,1143 +2115,5609 @@ func (this *QGraphicsRectItem) Type() int { return (int)(C.QGraphicsRectItem_Type(this.h)) } -func (this *QGraphicsRectItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsRectItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} +func (this *QGraphicsRectItem) callVirtualBase_BoundingRect() *QRectF { -// Delete this object from C++ memory. -func (this *QGraphicsRectItem) Delete() { - C.QGraphicsRectItem_Delete(this.h) -} + _ret := C.QGraphicsRectItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsRectItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsRectItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } - -type QGraphicsEllipseItem struct { - h *C.QGraphicsEllipseItem - *QAbstractGraphicsShapeItem +func (this *QGraphicsRectItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsRectItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) cPointer() *C.QGraphicsEllipseItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsRectItem_BoundingRect +func miqt_exec_callback_QGraphicsRectItem_BoundingRect(self *C.QGraphicsRectItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h -} -func (this *QGraphicsEllipseItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_BoundingRect) -func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem) *QGraphicsEllipseItem { - if h == nil { - return nil - } - return &QGraphicsEllipseItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} -} + return virtualReturn.cPointer() -func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem((*C.QGraphicsEllipseItem)(h)) } -// NewQGraphicsEllipseItem constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem() *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new() - return newQGraphicsEllipseItem(ret) -} +func (this *QGraphicsRectItem) callVirtualBase_Shape() *QPainterPath { -// NewQGraphicsEllipseItem2 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem2(rect *QRectF) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new2(rect.cPointer()) - return newQGraphicsEllipseItem(ret) -} + _ret := C.QGraphicsRectItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// NewQGraphicsEllipseItem3 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem3(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) - return newQGraphicsEllipseItem(ret) } - -// NewQGraphicsEllipseItem4 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem4(parent *QGraphicsItem) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new4(parent.cPointer()) - return newQGraphicsEllipseItem(ret) +func (this *QGraphicsRectItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsRectItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQGraphicsEllipseItem5 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer()) - return newQGraphicsEllipseItem(ret) -} +//export miqt_exec_callback_QGraphicsRectItem_Shape +func miqt_exec_callback_QGraphicsRectItem_Shape(self *C.QGraphicsRectItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -// NewQGraphicsEllipseItem6 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer()) - return newQGraphicsEllipseItem(ret) -} + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Shape) -func (this *QGraphicsEllipseItem) Rect() *QRectF { - _ret := C.QGraphicsEllipseItem_Rect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + return virtualReturn.cPointer() -func (this *QGraphicsEllipseItem) SetRect(rect *QRectF) { - C.QGraphicsEllipseItem_SetRect(this.h, rect.cPointer()) } -func (this *QGraphicsEllipseItem) SetRect2(x float64, y float64, w float64, h float64) { - C.QGraphicsEllipseItem_SetRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) -} +func (this *QGraphicsRectItem) callVirtualBase_Contains(point *QPointF) bool { -func (this *QGraphicsEllipseItem) StartAngle() int { - return (int)(C.QGraphicsEllipseItem_StartAngle(this.h)) -} + return (bool)(C.QGraphicsRectItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) -func (this *QGraphicsEllipseItem) SetStartAngle(angle int) { - C.QGraphicsEllipseItem_SetStartAngle(this.h, (C.int)(angle)) } - -func (this *QGraphicsEllipseItem) SpanAngle() int { - return (int)(C.QGraphicsEllipseItem_SpanAngle(this.h)) +func (this *QGraphicsRectItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsRectItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) SetSpanAngle(angle int) { - C.QGraphicsEllipseItem_SetSpanAngle(this.h, (C.int)(angle)) -} +//export miqt_exec_callback_QGraphicsRectItem_Contains +func miqt_exec_callback_QGraphicsRectItem_Contains(self *C.QGraphicsRectItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) -func (this *QGraphicsEllipseItem) BoundingRect() *QRectF { - _ret := C.QGraphicsEllipseItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } -func (this *QGraphicsEllipseItem) Shape() *QPainterPath { - _ret := C.QGraphicsEllipseItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsRectItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsRectItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsRectItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsRectItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsEllipseItem_Contains(this.h, point.cPointer())) +//export miqt_exec_callback_QGraphicsRectItem_Paint +func miqt_exec_callback_QGraphicsRectItem_Paint(self *C.QGraphicsRectItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + } -func (this *QGraphicsEllipseItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsEllipseItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsRectItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsRectItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsRectItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsRectItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsEllipseItem_IsObscuredBy(this.h, item.cPointer())) +//export miqt_exec_callback_QGraphicsRectItem_IsObscuredBy +func miqt_exec_callback_QGraphicsRectItem_IsObscuredBy(self *C.QGraphicsRectItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsEllipseItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsEllipseItem_OpaqueArea(this.h) +func (this *QGraphicsRectItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsRectItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsEllipseItem) Type() int { - return (int)(C.QGraphicsEllipseItem_Type(this.h)) } - -func (this *QGraphicsEllipseItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsEllipseItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsRectItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsRectItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// Delete this object from C++ memory. -func (this *QGraphicsEllipseItem) Delete() { - C.QGraphicsEllipseItem_Delete(this.h) -} +//export miqt_exec_callback_QGraphicsRectItem_OpaqueArea +func miqt_exec_callback_QGraphicsRectItem_OpaqueArea(self *C.QGraphicsRectItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsEllipseItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsEllipseItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } -type QGraphicsPolygonItem struct { - h *C.QGraphicsPolygonItem - *QAbstractGraphicsShapeItem +func (this *QGraphicsRectItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsRectItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsRectItem) OnType(slot func(super func() int) int) { + C.QGraphicsRectItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPolygonItem) cPointer() *C.QGraphicsPolygonItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsRectItem_Type +func miqt_exec_callback_QGraphicsRectItem_Type(self *C.QGraphicsRectItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + } -func (this *QGraphicsPolygonItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QGraphicsRectItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsRectItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsRectItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsRectItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem) *QGraphicsPolygonItem { - if h == nil { - return nil +//export miqt_exec_callback_QGraphicsRectItem_SupportsExtension +func miqt_exec_callback_QGraphicsRectItem_SupportsExtension(self *C.QGraphicsRectItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QGraphicsPolygonItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} -} -func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer) *QGraphicsPolygonItem { - return newQGraphicsPolygonItem((*C.QGraphicsPolygonItem)(h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) -// NewQGraphicsPolygonItem constructs a new QGraphicsPolygonItem object. -func NewQGraphicsPolygonItem() *QGraphicsPolygonItem { - ret := C.QGraphicsPolygonItem_new() - return newQGraphicsPolygonItem(ret) -} + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_SupportsExtension, slotval1) -// NewQGraphicsPolygonItem2 constructs a new QGraphicsPolygonItem object. -func NewQGraphicsPolygonItem2(parent *QGraphicsItem) *QGraphicsPolygonItem { - ret := C.QGraphicsPolygonItem_new2(parent.cPointer()) - return newQGraphicsPolygonItem(ret) -} + return (C.bool)(virtualReturn) -func (this *QGraphicsPolygonItem) FillRule() FillRule { - return (FillRule)(C.QGraphicsPolygonItem_FillRule(this.h)) } -func (this *QGraphicsPolygonItem) SetFillRule(rule FillRule) { - C.QGraphicsPolygonItem_SetFillRule(this.h, (C.int)(rule)) -} +func (this *QGraphicsRectItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { -func (this *QGraphicsPolygonItem) BoundingRect() *QRectF { - _ret := C.QGraphicsPolygonItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + C.QGraphicsRectItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) -func (this *QGraphicsPolygonItem) Shape() *QPainterPath { - _ret := C.QGraphicsPolygonItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } - -func (this *QGraphicsPolygonItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsPolygonItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsRectItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsRectItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPolygonItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsPolygonItem_Paint(this.h, painter.cPointer(), option.cPointer()) -} +//export miqt_exec_callback_QGraphicsRectItem_SetExtension +func miqt_exec_callback_QGraphicsRectItem_SetExtension(self *C.QGraphicsRectItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) -func (this *QGraphicsPolygonItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsPolygonItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsPolygonItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsPolygonItem_OpaqueArea(this.h) - _goptr := newQPainterPath(_ret) +func (this *QGraphicsRectItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsRectItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsPolygonItem) Type() int { - return (int)(C.QGraphicsPolygonItem_Type(this.h)) } +func (this *QGraphicsRectItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsRectItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsRectItem_Extension +func miqt_exec_callback_QGraphicsRectItem_Extension(self *C.QGraphicsRectItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() -func (this *QGraphicsPolygonItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsPolygonItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } // Delete this object from C++ memory. -func (this *QGraphicsPolygonItem) Delete() { - C.QGraphicsPolygonItem_Delete(this.h) +func (this *QGraphicsRectItem) Delete() { + C.QGraphicsRectItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsPolygonItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsPolygonItem) { +func (this *QGraphicsRectItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsRectItem) { this.Delete() runtime.KeepAlive(this.h) }) } -type QGraphicsLineItem struct { - h *C.QGraphicsLineItem - *QGraphicsItem +type QGraphicsEllipseItem struct { + h *C.QGraphicsEllipseItem + isSubclass bool + *QAbstractGraphicsShapeItem } -func (this *QGraphicsLineItem) cPointer() *C.QGraphicsLineItem { +func (this *QGraphicsEllipseItem) cPointer() *C.QGraphicsEllipseItem { if this == nil { return nil } return this.h } -func (this *QGraphicsLineItem) UnsafePointer() unsafe.Pointer { +func (this *QGraphicsEllipseItem) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQGraphicsLineItem(h *C.QGraphicsLineItem) *QGraphicsLineItem { +// newQGraphicsEllipseItem constructs the type using only CGO pointers. +func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsEllipseItem { if h == nil { return nil } - return &QGraphicsLineItem{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + return &QGraphicsEllipseItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsLineItem(h unsafe.Pointer) *QGraphicsLineItem { - return newQGraphicsLineItem((*C.QGraphicsLineItem)(h)) +// UnsafeNewQGraphicsEllipseItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsEllipseItem { + if h == nil { + return nil + } + + return &QGraphicsEllipseItem{h: (*C.QGraphicsEllipseItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -// NewQGraphicsLineItem constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem() *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new() - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem() *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new(&outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem2 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem2(line *QLineF) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new2(line.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem2 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem2(rect *QRectF) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new2(rect.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem3 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem3(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem3 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem3(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem4 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem4(parent *QGraphicsItem) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new4(parent.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem4 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem4(parent *QGraphicsItem) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new4(parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem5 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem5(line *QLineF, parent *QGraphicsItem) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem5 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem6 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem6(x1 float64, y1 float64, x2 float64, y2 float64, parent *QGraphicsItem) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem6 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsLineItem) Pen() *QPen { - _ret := C.QGraphicsLineItem_Pen(this.h) - _goptr := newQPen(_ret) +func (this *QGraphicsEllipseItem) Rect() *QRectF { + _ret := C.QGraphicsEllipseItem_Rect(this.h) + _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) SetPen(pen *QPen) { - C.QGraphicsLineItem_SetPen(this.h, pen.cPointer()) +func (this *QGraphicsEllipseItem) SetRect(rect *QRectF) { + C.QGraphicsEllipseItem_SetRect(this.h, rect.cPointer()) } -func (this *QGraphicsLineItem) Line() *QLineF { - _ret := C.QGraphicsLineItem_Line(this.h) - _goptr := newQLineF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsEllipseItem) SetRect2(x float64, y float64, w float64, h float64) { + C.QGraphicsEllipseItem_SetRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) } -func (this *QGraphicsLineItem) SetLine(line *QLineF) { - C.QGraphicsLineItem_SetLine(this.h, line.cPointer()) +func (this *QGraphicsEllipseItem) StartAngle() int { + return (int)(C.QGraphicsEllipseItem_StartAngle(this.h)) } -func (this *QGraphicsLineItem) SetLine2(x1 float64, y1 float64, x2 float64, y2 float64) { - C.QGraphicsLineItem_SetLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) +func (this *QGraphicsEllipseItem) SetStartAngle(angle int) { + C.QGraphicsEllipseItem_SetStartAngle(this.h, (C.int)(angle)) } -func (this *QGraphicsLineItem) BoundingRect() *QRectF { - _ret := C.QGraphicsLineItem_BoundingRect(this.h) +func (this *QGraphicsEllipseItem) SpanAngle() int { + return (int)(C.QGraphicsEllipseItem_SpanAngle(this.h)) +} + +func (this *QGraphicsEllipseItem) SetSpanAngle(angle int) { + C.QGraphicsEllipseItem_SetSpanAngle(this.h, (C.int)(angle)) +} + +func (this *QGraphicsEllipseItem) BoundingRect() *QRectF { + _ret := C.QGraphicsEllipseItem_BoundingRect(this.h) _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) Shape() *QPainterPath { - _ret := C.QGraphicsLineItem_Shape(this.h) +func (this *QGraphicsEllipseItem) Shape() *QPainterPath { + _ret := C.QGraphicsEllipseItem_Shape(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsLineItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsEllipseItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsEllipseItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsLineItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsLineItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsEllipseItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsEllipseItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsLineItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsLineItem_IsObscuredBy(this.h, item.cPointer())) +func (this *QGraphicsEllipseItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsEllipseItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsLineItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsLineItem_OpaqueArea(this.h) +func (this *QGraphicsEllipseItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsEllipseItem_OpaqueArea(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) Type() int { - return (int)(C.QGraphicsLineItem_Type(this.h)) +func (this *QGraphicsEllipseItem) Type() int { + return (int)(C.QGraphicsEllipseItem_Type(this.h)) } -func (this *QGraphicsLineItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsLineItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} +func (this *QGraphicsEllipseItem) callVirtualBase_BoundingRect() *QRectF { -// Delete this object from C++ memory. -func (this *QGraphicsLineItem) Delete() { - C.QGraphicsLineItem_Delete(this.h) -} + _ret := C.QGraphicsEllipseItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsLineItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsLineItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } - -type QGraphicsPixmapItem struct { - h *C.QGraphicsPixmapItem - *QGraphicsItem +func (this *QGraphicsEllipseItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsEllipseItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) cPointer() *C.QGraphicsPixmapItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsEllipseItem_BoundingRect +func miqt_exec_callback_QGraphicsEllipseItem_BoundingRect(self *C.QGraphicsEllipseItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + } -func (this *QGraphicsPixmapItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QGraphicsEllipseItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsEllipseItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsEllipseItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsEllipseItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem) *QGraphicsPixmapItem { - if h == nil { - return nil +//export miqt_exec_callback_QGraphicsEllipseItem_Shape +func miqt_exec_callback_QGraphicsEllipseItem_Shape(self *C.QGraphicsEllipseItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QGraphicsPixmapItem{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} -} -func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer) *QGraphicsPixmapItem { - return newQGraphicsPixmapItem((*C.QGraphicsPixmapItem)(h)) -} + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Shape) -// NewQGraphicsPixmapItem constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem() *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new() - return newQGraphicsPixmapItem(ret) -} + return virtualReturn.cPointer() -// NewQGraphicsPixmapItem2 constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem2(pixmap *QPixmap) *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new2(pixmap.cPointer()) - return newQGraphicsPixmapItem(ret) } -// NewQGraphicsPixmapItem3 constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem3(parent *QGraphicsItem) *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new3(parent.cPointer()) - return newQGraphicsPixmapItem(ret) +func (this *QGraphicsEllipseItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsEllipseItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsEllipseItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsEllipseItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQGraphicsPixmapItem4 constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem4(pixmap *QPixmap, parent *QGraphicsItem) *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer()) - return newQGraphicsPixmapItem(ret) +//export miqt_exec_callback_QGraphicsEllipseItem_Contains +func miqt_exec_callback_QGraphicsEllipseItem_Contains(self *C.QGraphicsEllipseItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Pixmap() *QPixmap { - _ret := C.QGraphicsPixmapItem_Pixmap(this.h) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsEllipseItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsEllipseItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsEllipseItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsEllipseItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetPixmap(pixmap *QPixmap) { - C.QGraphicsPixmapItem_SetPixmap(this.h, pixmap.cPointer()) +//export miqt_exec_callback_QGraphicsEllipseItem_Paint +func miqt_exec_callback_QGraphicsEllipseItem_Paint(self *C.QGraphicsEllipseItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + } -func (this *QGraphicsPixmapItem) TransformationMode() TransformationMode { - return (TransformationMode)(C.QGraphicsPixmapItem_TransformationMode(this.h)) +func (this *QGraphicsEllipseItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsEllipseItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsEllipseItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsEllipseItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetTransformationMode(mode TransformationMode) { - C.QGraphicsPixmapItem_SetTransformationMode(this.h, (C.int)(mode)) +//export miqt_exec_callback_QGraphicsEllipseItem_IsObscuredBy +func miqt_exec_callback_QGraphicsEllipseItem_IsObscuredBy(self *C.QGraphicsEllipseItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Offset() *QPointF { - _ret := C.QGraphicsPixmapItem_Offset(this.h) - _goptr := newQPointF(_ret) +func (this *QGraphicsEllipseItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsEllipseItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsEllipseItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsEllipseItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetOffset(offset *QPointF) { - C.QGraphicsPixmapItem_SetOffset(this.h, offset.cPointer()) +//export miqt_exec_callback_QGraphicsEllipseItem_OpaqueArea +func miqt_exec_callback_QGraphicsEllipseItem_OpaqueArea(self *C.QGraphicsEllipseItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + } -func (this *QGraphicsPixmapItem) SetOffset2(x float64, y float64) { - C.QGraphicsPixmapItem_SetOffset2(this.h, (C.double)(x), (C.double)(y)) +func (this *QGraphicsEllipseItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsEllipseItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsEllipseItem) OnType(slot func(super func() int) int) { + C.QGraphicsEllipseItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) BoundingRect() *QRectF { - _ret := C.QGraphicsPixmapItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QGraphicsEllipseItem_Type +func miqt_exec_callback_QGraphicsEllipseItem_Type(self *C.QGraphicsEllipseItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Shape() *QPainterPath { - _ret := C.QGraphicsPixmapItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsEllipseItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsEllipseItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsEllipseItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsEllipseItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsPixmapItem_Contains(this.h, point.cPointer())) +//export miqt_exec_callback_QGraphicsEllipseItem_SupportsExtension +func miqt_exec_callback_QGraphicsEllipseItem_SupportsExtension(self *C.QGraphicsEllipseItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsPixmapItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsEllipseItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsEllipseItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsEllipseItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsEllipseItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsPixmapItem_IsObscuredBy(this.h, item.cPointer())) +//export miqt_exec_callback_QGraphicsEllipseItem_SetExtension +func miqt_exec_callback_QGraphicsEllipseItem_SetExtension(self *C.QGraphicsEllipseItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + } -func (this *QGraphicsPixmapItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsPixmapItem_OpaqueArea(this.h) - _goptr := newQPainterPath(_ret) +func (this *QGraphicsEllipseItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsEllipseItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsPixmapItem) Type() int { - return (int)(C.QGraphicsPixmapItem_Type(this.h)) } - -func (this *QGraphicsPixmapItem) ShapeMode() QGraphicsPixmapItem__ShapeMode { - return (QGraphicsPixmapItem__ShapeMode)(C.QGraphicsPixmapItem_ShapeMode(this.h)) +func (this *QGraphicsEllipseItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsEllipseItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetShapeMode(mode QGraphicsPixmapItem__ShapeMode) { - C.QGraphicsPixmapItem_SetShapeMode(this.h, (C.int)(mode)) +//export miqt_exec_callback_QGraphicsEllipseItem_Extension +func miqt_exec_callback_QGraphicsEllipseItem_Extension(self *C.QGraphicsEllipseItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. -func (this *QGraphicsPixmapItem) Delete() { - C.QGraphicsPixmapItem_Delete(this.h) +func (this *QGraphicsEllipseItem) Delete() { + C.QGraphicsEllipseItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsPixmapItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsPixmapItem) { +func (this *QGraphicsEllipseItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsEllipseItem) { this.Delete() runtime.KeepAlive(this.h) }) } -type QGraphicsTextItem struct { - h *C.QGraphicsTextItem - *QGraphicsObject +type QGraphicsPolygonItem struct { + h *C.QGraphicsPolygonItem + isSubclass bool + *QAbstractGraphicsShapeItem } -func (this *QGraphicsTextItem) cPointer() *C.QGraphicsTextItem { +func (this *QGraphicsPolygonItem) cPointer() *C.QGraphicsPolygonItem { if this == nil { return nil } return this.h } -func (this *QGraphicsTextItem) UnsafePointer() unsafe.Pointer { +func (this *QGraphicsPolygonItem) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQGraphicsTextItem(h *C.QGraphicsTextItem) *QGraphicsTextItem { +// newQGraphicsPolygonItem constructs the type using only CGO pointers. +func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPolygonItem { if h == nil { return nil } - return &QGraphicsTextItem{h: h, QGraphicsObject: UnsafeNewQGraphicsObject(unsafe.Pointer(h))} + return &QGraphicsPolygonItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsTextItem(h unsafe.Pointer) *QGraphicsTextItem { - return newQGraphicsTextItem((*C.QGraphicsTextItem)(h)) +// UnsafeNewQGraphicsPolygonItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPolygonItem { + if h == nil { + return nil + } + + return &QGraphicsPolygonItem{h: (*C.QGraphicsPolygonItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -// NewQGraphicsTextItem constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem() *QGraphicsTextItem { - ret := C.QGraphicsTextItem_new() - return newQGraphicsTextItem(ret) +// NewQGraphicsPolygonItem constructs a new QGraphicsPolygonItem object. +func NewQGraphicsPolygonItem() *QGraphicsPolygonItem { + var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPolygonItem_new(&outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsTextItem2 constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem2(text string) *QGraphicsTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsTextItem_new2(text_ms) - return newQGraphicsTextItem(ret) +// NewQGraphicsPolygonItem2 constructs a new QGraphicsPolygonItem object. +func NewQGraphicsPolygonItem2(parent *QGraphicsItem) *QGraphicsPolygonItem { + var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPolygonItem_new2(parent.cPointer(), &outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsTextItem3 constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem3(parent *QGraphicsItem) *QGraphicsTextItem { - ret := C.QGraphicsTextItem_new3(parent.cPointer()) - return newQGraphicsTextItem(ret) +func (this *QGraphicsPolygonItem) FillRule() FillRule { + return (FillRule)(C.QGraphicsPolygonItem_FillRule(this.h)) } -// NewQGraphicsTextItem4 constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem4(text string, parent *QGraphicsItem) *QGraphicsTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsTextItem_new4(text_ms, parent.cPointer()) - return newQGraphicsTextItem(ret) +func (this *QGraphicsPolygonItem) SetFillRule(rule FillRule) { + C.QGraphicsPolygonItem_SetFillRule(this.h, (C.int)(rule)) } -func (this *QGraphicsTextItem) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsTextItem_MetaObject(this.h))) +func (this *QGraphicsPolygonItem) BoundingRect() *QRectF { + _ret := C.QGraphicsPolygonItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr } -func (this *QGraphicsTextItem) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QGraphicsTextItem_Metacast(this.h, param1_Cstring)) +func (this *QGraphicsPolygonItem) Shape() *QPainterPath { + _ret := C.QGraphicsPolygonItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr } -func QGraphicsTextItem_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QGraphicsPolygonItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsPolygonItem_Contains(this.h, point.cPointer())) } -func QGraphicsTextItem_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - -func (this *QGraphicsTextItem) ToHtml() string { - var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToHtml(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - -func (this *QGraphicsTextItem) SetHtml(html string) { - html_ms := C.struct_miqt_string{} - html_ms.data = C.CString(html) - html_ms.len = C.size_t(len(html)) - defer C.free(unsafe.Pointer(html_ms.data)) - C.QGraphicsTextItem_SetHtml(this.h, html_ms) -} - -func (this *QGraphicsTextItem) ToPlainText() string { - var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToPlainText(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QGraphicsPolygonItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsPolygonItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsTextItem) SetPlainText(text string) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QGraphicsTextItem_SetPlainText(this.h, text_ms) +func (this *QGraphicsPolygonItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsPolygonItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsTextItem) Font() *QFont { - _ret := C.QGraphicsTextItem_Font(this.h) - _goptr := newQFont(_ret) +func (this *QGraphicsPolygonItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsPolygonItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsTextItem) SetFont(font *QFont) { - C.QGraphicsTextItem_SetFont(this.h, font.cPointer()) -} - -func (this *QGraphicsTextItem) SetDefaultTextColor(c *QColor) { - C.QGraphicsTextItem_SetDefaultTextColor(this.h, c.cPointer()) +func (this *QGraphicsPolygonItem) Type() int { + return (int)(C.QGraphicsPolygonItem_Type(this.h)) } -func (this *QGraphicsTextItem) DefaultTextColor() *QColor { - _ret := C.QGraphicsTextItem_DefaultTextColor(this.h) - _goptr := newQColor(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} +func (this *QGraphicsPolygonItem) callVirtualBase_BoundingRect() *QRectF { -func (this *QGraphicsTextItem) BoundingRect() *QRectF { - _ret := C.QGraphicsTextItem_BoundingRect(this.h) + _ret := C.QGraphicsPolygonItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsTextItem) Shape() *QPainterPath { - _ret := C.QGraphicsTextItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } - -func (this *QGraphicsTextItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsTextItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsPolygonItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsPolygonItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} +//export miqt_exec_callback_QGraphicsPolygonItem_BoundingRect +func miqt_exec_callback_QGraphicsPolygonItem_BoundingRect(self *C.QGraphicsPolygonItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() -func (this *QGraphicsTextItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsTextItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsTextItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsTextItem_OpaqueArea(this.h) +func (this *QGraphicsPolygonItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsPolygonItem_virtualbase_Shape(unsafe.Pointer(this.h)) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsTextItem) Type() int { - return (int)(C.QGraphicsTextItem_Type(this.h)) } - -func (this *QGraphicsTextItem) SetTextWidth(width float64) { - C.QGraphicsTextItem_SetTextWidth(this.h, (C.double)(width)) +func (this *QGraphicsPolygonItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPolygonItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) TextWidth() float64 { - return (float64)(C.QGraphicsTextItem_TextWidth(this.h)) -} +//export miqt_exec_callback_QGraphicsPolygonItem_Shape +func miqt_exec_callback_QGraphicsPolygonItem_Shape(self *C.QGraphicsPolygonItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QGraphicsTextItem) AdjustSize() { - C.QGraphicsTextItem_AdjustSize(this.h) -} + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Shape) -func (this *QGraphicsTextItem) SetDocument(document *QTextDocument) { - C.QGraphicsTextItem_SetDocument(this.h, document.cPointer()) -} + return virtualReturn.cPointer() -func (this *QGraphicsTextItem) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QGraphicsTextItem_Document(this.h))) } -func (this *QGraphicsTextItem) SetTextInteractionFlags(flags TextInteractionFlag) { - C.QGraphicsTextItem_SetTextInteractionFlags(this.h, (C.int)(flags)) -} +func (this *QGraphicsPolygonItem) callVirtualBase_Contains(point *QPointF) bool { -func (this *QGraphicsTextItem) TextInteractionFlags() TextInteractionFlag { - return (TextInteractionFlag)(C.QGraphicsTextItem_TextInteractionFlags(this.h)) -} + return (bool)(C.QGraphicsPolygonItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) -func (this *QGraphicsTextItem) SetTabChangesFocus(b bool) { - C.QGraphicsTextItem_SetTabChangesFocus(this.h, (C.bool)(b)) } - -func (this *QGraphicsTextItem) TabChangesFocus() bool { - return (bool)(C.QGraphicsTextItem_TabChangesFocus(this.h)) +func (this *QGraphicsPolygonItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsPolygonItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) SetOpenExternalLinks(open bool) { - C.QGraphicsTextItem_SetOpenExternalLinks(this.h, (C.bool)(open)) -} +//export miqt_exec_callback_QGraphicsPolygonItem_Contains +func miqt_exec_callback_QGraphicsPolygonItem_Contains(self *C.QGraphicsPolygonItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QGraphicsTextItem) OpenExternalLinks() bool { - return (bool)(C.QGraphicsTextItem_OpenExternalLinks(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) -func (this *QGraphicsTextItem) SetTextCursor(cursor *QTextCursor) { - C.QGraphicsTextItem_SetTextCursor(this.h, cursor.cPointer()) -} + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) -func (this *QGraphicsTextItem) TextCursor() *QTextCursor { - _ret := C.QGraphicsTextItem_TextCursor(this.h) - _goptr := newQTextCursor(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } -func (this *QGraphicsTextItem) LinkActivated(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QGraphicsTextItem_LinkActivated(this.h, param1_ms) +func (this *QGraphicsPolygonItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsPolygonItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + } -func (this *QGraphicsTextItem) OnLinkActivated(slot func(param1 string)) { - C.QGraphicsTextItem_connect_LinkActivated(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QGraphicsPolygonItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsPolygonItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QGraphicsTextItem_LinkActivated -func miqt_exec_callback_QGraphicsTextItem_LinkActivated(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QGraphicsPolygonItem_Paint +func miqt_exec_callback_QGraphicsPolygonItem_Paint(self *C.QGraphicsPolygonItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) - gofunc(slotval1) } -func (this *QGraphicsTextItem) LinkHovered(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QGraphicsTextItem_LinkHovered(this.h, param1_ms) +func (this *QGraphicsPolygonItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsPolygonItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + } -func (this *QGraphicsTextItem) OnLinkHovered(slot func(param1 string)) { - C.QGraphicsTextItem_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QGraphicsPolygonItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsPolygonItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QGraphicsTextItem_LinkHovered -func miqt_exec_callback_QGraphicsTextItem_LinkHovered(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QGraphicsPolygonItem_IsObscuredBy +func miqt_exec_callback_QGraphicsPolygonItem_IsObscuredBy(self *C.QGraphicsPolygonItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret - - gofunc(slotval1) -} + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) -func QGraphicsTextItem_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) -func QGraphicsTextItem_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + return (C.bool)(virtualReturn) -func QGraphicsTextItem_TrUtf82(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_TrUtf82(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func QGraphicsTextItem_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} +func (this *QGraphicsPolygonItem) callVirtualBase_OpaqueArea() *QPainterPath { -// Delete this object from C++ memory. -func (this *QGraphicsTextItem) Delete() { - C.QGraphicsTextItem_Delete(this.h) -} + _ret := C.QGraphicsPolygonItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsTextItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsTextItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } - -type QGraphicsSimpleTextItem struct { - h *C.QGraphicsSimpleTextItem - *QAbstractGraphicsShapeItem +func (this *QGraphicsPolygonItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPolygonItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsSimpleTextItem) cPointer() *C.QGraphicsSimpleTextItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsPolygonItem_OpaqueArea +func miqt_exec_callback_QGraphicsPolygonItem_OpaqueArea(self *C.QGraphicsPolygonItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + } -func (this *QGraphicsSimpleTextItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QGraphicsPolygonItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsPolygonItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsPolygonItem) OnType(slot func(super func() int) int) { + C.QGraphicsPolygonItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem) *QGraphicsSimpleTextItem { - if h == nil { - return nil +//export miqt_exec_callback_QGraphicsPolygonItem_Type +func miqt_exec_callback_QGraphicsPolygonItem_Type(self *C.QGraphicsPolygonItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QGraphicsSimpleTextItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} -} -func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer) *QGraphicsSimpleTextItem { - return newQGraphicsSimpleTextItem((*C.QGraphicsSimpleTextItem)(h)) -} + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Type) -// NewQGraphicsSimpleTextItem constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem() *QGraphicsSimpleTextItem { - ret := C.QGraphicsSimpleTextItem_new() - return newQGraphicsSimpleTextItem(ret) -} + return (C.int)(virtualReturn) -// NewQGraphicsSimpleTextItem2 constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem2(text string) *QGraphicsSimpleTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsSimpleTextItem_new2(text_ms) - return newQGraphicsSimpleTextItem(ret) } -// NewQGraphicsSimpleTextItem3 constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem3(parent *QGraphicsItem) *QGraphicsSimpleTextItem { - ret := C.QGraphicsSimpleTextItem_new3(parent.cPointer()) - return newQGraphicsSimpleTextItem(ret) -} +func (this *QGraphicsPolygonItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { -// NewQGraphicsSimpleTextItem4 constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem4(text string, parent *QGraphicsItem) *QGraphicsSimpleTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer()) - return newQGraphicsSimpleTextItem(ret) -} + return (bool)(C.QGraphicsPolygonItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) -func (this *QGraphicsSimpleTextItem) SetText(text string) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QGraphicsSimpleTextItem_SetText(this.h, text_ms) } - -func (this *QGraphicsSimpleTextItem) Text() string { - var _ms C.struct_miqt_string = C.QGraphicsSimpleTextItem_Text(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QGraphicsPolygonItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsPolygonItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsSimpleTextItem) SetFont(font *QFont) { - C.QGraphicsSimpleTextItem_SetFont(this.h, font.cPointer()) -} +//export miqt_exec_callback_QGraphicsPolygonItem_SupportsExtension +func miqt_exec_callback_QGraphicsPolygonItem_SupportsExtension(self *C.QGraphicsPolygonItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QGraphicsSimpleTextItem) Font() *QFont { - _ret := C.QGraphicsSimpleTextItem_Font(this.h) - _goptr := newQFont(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) -func (this *QGraphicsSimpleTextItem) BoundingRect() *QRectF { - _ret := C.QGraphicsSimpleTextItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_SupportsExtension, slotval1) -func (this *QGraphicsSimpleTextItem) Shape() *QPainterPath { - _ret := C.QGraphicsSimpleTextItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + return (C.bool)(virtualReturn) -func (this *QGraphicsSimpleTextItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsSimpleTextItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsSimpleTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsSimpleTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsPolygonItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsPolygonItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsPolygonItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsPolygonItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsSimpleTextItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsSimpleTextItem_IsObscuredBy(this.h, item.cPointer())) +//export miqt_exec_callback_QGraphicsPolygonItem_SetExtension +func miqt_exec_callback_QGraphicsPolygonItem_SetExtension(self *C.QGraphicsPolygonItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + } -func (this *QGraphicsSimpleTextItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsSimpleTextItem_OpaqueArea(this.h) - _goptr := newQPainterPath(_ret) +func (this *QGraphicsPolygonItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsPolygonItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsPolygonItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsPolygonItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsSimpleTextItem) Type() int { - return (int)(C.QGraphicsSimpleTextItem_Type(this.h)) +//export miqt_exec_callback_QGraphicsPolygonItem_Extension +func miqt_exec_callback_QGraphicsPolygonItem_Extension(self *C.QGraphicsPolygonItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. -func (this *QGraphicsSimpleTextItem) Delete() { - C.QGraphicsSimpleTextItem_Delete(this.h) +func (this *QGraphicsPolygonItem) Delete() { + C.QGraphicsPolygonItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsSimpleTextItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsSimpleTextItem) { +func (this *QGraphicsPolygonItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsPolygonItem) { this.Delete() runtime.KeepAlive(this.h) }) } -type QGraphicsItemGroup struct { - h *C.QGraphicsItemGroup +type QGraphicsLineItem struct { + h *C.QGraphicsLineItem + isSubclass bool *QGraphicsItem } -func (this *QGraphicsItemGroup) cPointer() *C.QGraphicsItemGroup { +func (this *QGraphicsLineItem) cPointer() *C.QGraphicsLineItem { if this == nil { return nil } return this.h } -func (this *QGraphicsItemGroup) UnsafePointer() unsafe.Pointer { +func (this *QGraphicsLineItem) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQGraphicsItemGroup(h *C.QGraphicsItemGroup) *QGraphicsItemGroup { +// newQGraphicsLineItem constructs the type using only CGO pointers. +func newQGraphicsLineItem(h *C.QGraphicsLineItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsLineItem { + if h == nil { + return nil + } + return &QGraphicsLineItem{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsLineItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsLineItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsLineItem { if h == nil { return nil } - return &QGraphicsItemGroup{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + + return &QGraphicsLineItem{h: (*C.QGraphicsLineItem)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } -func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer) *QGraphicsItemGroup { - return newQGraphicsItemGroup((*C.QGraphicsItemGroup)(h)) +// NewQGraphicsLineItem constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem() *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new(&outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsItemGroup constructs a new QGraphicsItemGroup object. -func NewQGraphicsItemGroup() *QGraphicsItemGroup { - ret := C.QGraphicsItemGroup_new() - return newQGraphicsItemGroup(ret) +// NewQGraphicsLineItem2 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem2(line *QLineF) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new2(line.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsItemGroup2 constructs a new QGraphicsItemGroup object. -func NewQGraphicsItemGroup2(parent *QGraphicsItem) *QGraphicsItemGroup { - ret := C.QGraphicsItemGroup_new2(parent.cPointer()) - return newQGraphicsItemGroup(ret) +// NewQGraphicsLineItem3 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem3(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsItemGroup) AddToGroup(item *QGraphicsItem) { - C.QGraphicsItemGroup_AddToGroup(this.h, item.cPointer()) +// NewQGraphicsLineItem4 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem4(parent *QGraphicsItem) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new4(parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsItemGroup) RemoveFromGroup(item *QGraphicsItem) { - C.QGraphicsItemGroup_RemoveFromGroup(this.h, item.cPointer()) +// NewQGraphicsLineItem5 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem5(line *QLineF, parent *QGraphicsItem) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsItemGroup) BoundingRect() *QRectF { - _ret := C.QGraphicsItemGroup_BoundingRect(this.h) +// NewQGraphicsLineItem6 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem6(x1 float64, y1 float64, x2 float64, y2 float64, parent *QGraphicsItem) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsLineItem) Pen() *QPen { + _ret := C.QGraphicsLineItem_Pen(this.h) + _goptr := newQPen(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsLineItem) SetPen(pen *QPen) { + C.QGraphicsLineItem_SetPen(this.h, pen.cPointer()) +} + +func (this *QGraphicsLineItem) Line() *QLineF { + _ret := C.QGraphicsLineItem_Line(this.h) + _goptr := newQLineF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsLineItem) SetLine(line *QLineF) { + C.QGraphicsLineItem_SetLine(this.h, line.cPointer()) +} + +func (this *QGraphicsLineItem) SetLine2(x1 float64, y1 float64, x2 float64, y2 float64) { + C.QGraphicsLineItem_SetLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) +} + +func (this *QGraphicsLineItem) BoundingRect() *QRectF { + _ret := C.QGraphicsLineItem_BoundingRect(this.h) _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsItemGroup) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsItemGroup_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsLineItem) Shape() *QPainterPath { + _ret := C.QGraphicsLineItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsLineItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsLineItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsItemGroup) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsItemGroup_IsObscuredBy(this.h, item.cPointer())) +func (this *QGraphicsLineItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsLineItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsItemGroup) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsItemGroup_OpaqueArea(this.h) +func (this *QGraphicsLineItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsLineItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsLineItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsLineItem_OpaqueArea(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsItemGroup) Type() int { - return (int)(C.QGraphicsItemGroup_Type(this.h)) +func (this *QGraphicsLineItem) Type() int { + return (int)(C.QGraphicsLineItem_Type(this.h)) +} + +func (this *QGraphicsLineItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsLineItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsLineItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_BoundingRect +func miqt_exec_callback_QGraphicsLineItem_BoundingRect(self *C.QGraphicsLineItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsLineItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsLineItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Shape +func miqt_exec_callback_QGraphicsLineItem_Shape(self *C.QGraphicsLineItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsLineItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsLineItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Contains +func miqt_exec_callback_QGraphicsLineItem_Contains(self *C.QGraphicsLineItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsLineItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsLineItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsLineItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Paint +func miqt_exec_callback_QGraphicsLineItem_Paint(self *C.QGraphicsLineItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsLineItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsLineItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsLineItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_IsObscuredBy +func miqt_exec_callback_QGraphicsLineItem_IsObscuredBy(self *C.QGraphicsLineItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsItemGroup) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsItemGroup_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsLineItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsLineItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsLineItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_OpaqueArea +func miqt_exec_callback_QGraphicsLineItem_OpaqueArea(self *C.QGraphicsLineItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsLineItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsLineItem) OnType(slot func(super func() int) int) { + C.QGraphicsLineItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Type +func miqt_exec_callback_QGraphicsLineItem_Type(self *C.QGraphicsLineItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsLineItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsLineItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SupportsExtension +func miqt_exec_callback_QGraphicsLineItem_SupportsExtension(self *C.QGraphicsLineItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsLineItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsLineItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsLineItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SetExtension +func miqt_exec_callback_QGraphicsLineItem_SetExtension(self *C.QGraphicsLineItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsLineItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsLineItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsLineItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Extension +func miqt_exec_callback_QGraphicsLineItem_Extension(self *C.QGraphicsLineItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_Advance(phase int) { + + C.QGraphicsLineItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsLineItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsLineItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Advance +func miqt_exec_callback_QGraphicsLineItem_Advance(self *C.QGraphicsLineItem, cb C.intptr_t, phase C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(phase int), phase int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(phase) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Advance, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsLineItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsLineItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_CollidesWithItem +func miqt_exec_callback_QGraphicsLineItem_CollidesWithItem(self *C.QGraphicsLineItem, cb C.intptr_t, other *C.QGraphicsItem, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(other)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsLineItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsLineItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_CollidesWithPath +func miqt_exec_callback_QGraphicsLineItem_CollidesWithPath(self *C.QGraphicsLineItem, cb C.intptr_t, path *C.QPainterPath, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsLineItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsLineItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SceneEventFilter +func miqt_exec_callback_QGraphicsLineItem_SceneEventFilter(self *C.QGraphicsLineItem, cb C.intptr_t, watched *C.QGraphicsItem, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsLineItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsLineItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SceneEvent +func miqt_exec_callback_QGraphicsLineItem_SceneEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsLineItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsLineItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DragEnterEvent +func miqt_exec_callback_QGraphicsLineItem_DragEnterEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DragMoveEvent +func miqt_exec_callback_QGraphicsLineItem_DragMoveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DropEvent +func miqt_exec_callback_QGraphicsLineItem_DropEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsLineItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsLineItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_FocusInEvent +func miqt_exec_callback_QGraphicsLineItem_FocusInEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsLineItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsLineItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_FocusOutEvent +func miqt_exec_callback_QGraphicsLineItem_FocusOutEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsLineItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsLineItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsLineItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsLineItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsLineItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsLineItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsLineItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsLineItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_KeyPressEvent +func miqt_exec_callback_QGraphicsLineItem_KeyPressEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsLineItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsLineItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MousePressEvent +func miqt_exec_callback_QGraphicsLineItem_MousePressEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsLineItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsLineItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_WheelEvent +func miqt_exec_callback_QGraphicsLineItem_WheelEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsLineItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsLineItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_InputMethodEvent +func miqt_exec_callback_QGraphicsLineItem_InputMethodEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsLineItem_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsLineItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_InputMethodQuery +func miqt_exec_callback_QGraphicsLineItem_InputMethodQuery(self *C.QGraphicsLineItem, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsLineItem_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsLineItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_ItemChange +func miqt_exec_callback_QGraphicsLineItem_ItemChange(self *C.QGraphicsLineItem, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QGraphicsLineItem) Delete() { + C.QGraphicsLineItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsLineItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsLineItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsPixmapItem struct { + h *C.QGraphicsPixmapItem + isSubclass bool + *QGraphicsItem +} + +func (this *QGraphicsPixmapItem) cPointer() *C.QGraphicsPixmapItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsPixmapItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsPixmapItem constructs the type using only CGO pointers. +func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPixmapItem { + if h == nil { + return nil + } + return &QGraphicsPixmapItem{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsPixmapItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPixmapItem { + if h == nil { + return nil + } + + return &QGraphicsPixmapItem{h: (*C.QGraphicsPixmapItem)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +} + +// NewQGraphicsPixmapItem constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem() *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new(&outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsPixmapItem2 constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem2(pixmap *QPixmap) *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new2(pixmap.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsPixmapItem3 constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem3(parent *QGraphicsItem) *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new3(parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsPixmapItem4 constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem4(pixmap *QPixmap, parent *QGraphicsItem) *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsPixmapItem) Pixmap() *QPixmap { + _ret := C.QGraphicsPixmapItem_Pixmap(this.h) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) SetPixmap(pixmap *QPixmap) { + C.QGraphicsPixmapItem_SetPixmap(this.h, pixmap.cPointer()) +} + +func (this *QGraphicsPixmapItem) TransformationMode() TransformationMode { + return (TransformationMode)(C.QGraphicsPixmapItem_TransformationMode(this.h)) +} + +func (this *QGraphicsPixmapItem) SetTransformationMode(mode TransformationMode) { + C.QGraphicsPixmapItem_SetTransformationMode(this.h, (C.int)(mode)) +} + +func (this *QGraphicsPixmapItem) Offset() *QPointF { + _ret := C.QGraphicsPixmapItem_Offset(this.h) + _goptr := newQPointF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) SetOffset(offset *QPointF) { + C.QGraphicsPixmapItem_SetOffset(this.h, offset.cPointer()) +} + +func (this *QGraphicsPixmapItem) SetOffset2(x float64, y float64) { + C.QGraphicsPixmapItem_SetOffset2(this.h, (C.double)(x), (C.double)(y)) +} + +func (this *QGraphicsPixmapItem) BoundingRect() *QRectF { + _ret := C.QGraphicsPixmapItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) Shape() *QPainterPath { + _ret := C.QGraphicsPixmapItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsPixmapItem_Contains(this.h, point.cPointer())) +} + +func (this *QGraphicsPixmapItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsPixmapItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsPixmapItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsPixmapItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsPixmapItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsPixmapItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) Type() int { + return (int)(C.QGraphicsPixmapItem_Type(this.h)) +} + +func (this *QGraphicsPixmapItem) ShapeMode() QGraphicsPixmapItem__ShapeMode { + return (QGraphicsPixmapItem__ShapeMode)(C.QGraphicsPixmapItem_ShapeMode(this.h)) +} + +func (this *QGraphicsPixmapItem) SetShapeMode(mode QGraphicsPixmapItem__ShapeMode) { + C.QGraphicsPixmapItem_SetShapeMode(this.h, (C.int)(mode)) +} + +func (this *QGraphicsPixmapItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsPixmapItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsPixmapItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_BoundingRect +func miqt_exec_callback_QGraphicsPixmapItem_BoundingRect(self *C.QGraphicsPixmapItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsPixmapItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPixmapItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Shape +func miqt_exec_callback_QGraphicsPixmapItem_Shape(self *C.QGraphicsPixmapItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsPixmapItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Contains +func miqt_exec_callback_QGraphicsPixmapItem_Contains(self *C.QGraphicsPixmapItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsPixmapItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsPixmapItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Paint +func miqt_exec_callback_QGraphicsPixmapItem_Paint(self *C.QGraphicsPixmapItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsPixmapItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_IsObscuredBy +func miqt_exec_callback_QGraphicsPixmapItem_IsObscuredBy(self *C.QGraphicsPixmapItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsPixmapItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPixmapItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_OpaqueArea +func miqt_exec_callback_QGraphicsPixmapItem_OpaqueArea(self *C.QGraphicsPixmapItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsPixmapItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsPixmapItem) OnType(slot func(super func() int) int) { + C.QGraphicsPixmapItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Type +func miqt_exec_callback_QGraphicsPixmapItem_Type(self *C.QGraphicsPixmapItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsPixmapItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsPixmapItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SupportsExtension +func miqt_exec_callback_QGraphicsPixmapItem_SupportsExtension(self *C.QGraphicsPixmapItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsPixmapItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsPixmapItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SetExtension +func miqt_exec_callback_QGraphicsPixmapItem_SetExtension(self *C.QGraphicsPixmapItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsPixmapItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsPixmapItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Extension +func miqt_exec_callback_QGraphicsPixmapItem_Extension(self *C.QGraphicsPixmapItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Advance(phase int) { + + C.QGraphicsPixmapItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsPixmapItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsPixmapItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Advance +func miqt_exec_callback_QGraphicsPixmapItem_Advance(self *C.QGraphicsPixmapItem, cb C.intptr_t, phase C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(phase int), phase int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(phase) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Advance, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsPixmapItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsPixmapItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_CollidesWithItem +func miqt_exec_callback_QGraphicsPixmapItem_CollidesWithItem(self *C.QGraphicsPixmapItem, cb C.intptr_t, other *C.QGraphicsItem, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(other)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsPixmapItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsPixmapItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_CollidesWithPath +func miqt_exec_callback_QGraphicsPixmapItem_CollidesWithPath(self *C.QGraphicsPixmapItem, cb C.intptr_t, path *C.QPainterPath, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsPixmapItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SceneEventFilter +func miqt_exec_callback_QGraphicsPixmapItem_SceneEventFilter(self *C.QGraphicsPixmapItem, cb C.intptr_t, watched *C.QGraphicsItem, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsPixmapItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SceneEvent +func miqt_exec_callback_QGraphicsPixmapItem_SceneEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsPixmapItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsPixmapItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent +func miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent +func miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DropEvent +func miqt_exec_callback_QGraphicsPixmapItem_DropEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsPixmapItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsPixmapItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent +func miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsPixmapItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsPixmapItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent +func miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsPixmapItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsPixmapItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsPixmapItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsPixmapItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsPixmapItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsPixmapItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsPixmapItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsPixmapItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent +func miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsPixmapItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsPixmapItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent +func miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsPixmapItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsPixmapItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_WheelEvent +func miqt_exec_callback_QGraphicsPixmapItem_WheelEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsPixmapItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsPixmapItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent +func miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsPixmapItem_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsPixmapItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_InputMethodQuery +func miqt_exec_callback_QGraphicsPixmapItem_InputMethodQuery(self *C.QGraphicsPixmapItem, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsPixmapItem_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsPixmapItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_ItemChange +func miqt_exec_callback_QGraphicsPixmapItem_ItemChange(self *C.QGraphicsPixmapItem, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QGraphicsPixmapItem) Delete() { + C.QGraphicsPixmapItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsPixmapItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsPixmapItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsTextItem struct { + h *C.QGraphicsTextItem + isSubclass bool + *QGraphicsObject +} + +func (this *QGraphicsTextItem) cPointer() *C.QGraphicsTextItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsTextItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsTextItem constructs the type using only CGO pointers. +func newQGraphicsTextItem(h *C.QGraphicsTextItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsTextItem { + if h == nil { + return nil + } + return &QGraphicsTextItem{h: h, + QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsTextItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsTextItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsTextItem { + if h == nil { + return nil + } + + return &QGraphicsTextItem{h: (*C.QGraphicsTextItem)(h), + QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +} + +// NewQGraphicsTextItem constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem() *QGraphicsTextItem { + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new(&outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTextItem2 constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem2(text string) *QGraphicsTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new2(text_ms, &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTextItem3 constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem3(parent *QGraphicsItem) *QGraphicsTextItem { + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new3(parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTextItem4 constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem4(text string, parent *QGraphicsItem) *QGraphicsTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsTextItem) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsTextItem_MetaObject(this.h))) +} + +func (this *QGraphicsTextItem) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QGraphicsTextItem_Metacast(this.h, param1_Cstring)) +} + +func QGraphicsTextItem_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsTextItem_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) ToHtml() string { + var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToHtml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QGraphicsTextItem_SetHtml(this.h, html_ms) +} + +func (this *QGraphicsTextItem) ToPlainText() string { + var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToPlainText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) SetPlainText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QGraphicsTextItem_SetPlainText(this.h, text_ms) +} + +func (this *QGraphicsTextItem) Font() *QFont { + _ret := C.QGraphicsTextItem_Font(this.h) + _goptr := newQFont(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) SetFont(font *QFont) { + C.QGraphicsTextItem_SetFont(this.h, font.cPointer()) +} + +func (this *QGraphicsTextItem) SetDefaultTextColor(c *QColor) { + C.QGraphicsTextItem_SetDefaultTextColor(this.h, c.cPointer()) +} + +func (this *QGraphicsTextItem) DefaultTextColor() *QColor { + _ret := C.QGraphicsTextItem_DefaultTextColor(this.h) + _goptr := newQColor(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) BoundingRect() *QRectF { + _ret := C.QGraphicsTextItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) Shape() *QPainterPath { + _ret := C.QGraphicsTextItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsTextItem_Contains(this.h, point.cPointer())) +} + +func (this *QGraphicsTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsTextItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsTextItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsTextItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsTextItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) Type() int { + return (int)(C.QGraphicsTextItem_Type(this.h)) +} + +func (this *QGraphicsTextItem) SetTextWidth(width float64) { + C.QGraphicsTextItem_SetTextWidth(this.h, (C.double)(width)) +} + +func (this *QGraphicsTextItem) TextWidth() float64 { + return (float64)(C.QGraphicsTextItem_TextWidth(this.h)) +} + +func (this *QGraphicsTextItem) AdjustSize() { + C.QGraphicsTextItem_AdjustSize(this.h) +} + +func (this *QGraphicsTextItem) SetDocument(document *QTextDocument) { + C.QGraphicsTextItem_SetDocument(this.h, document.cPointer()) +} + +func (this *QGraphicsTextItem) Document() *QTextDocument { + return UnsafeNewQTextDocument(unsafe.Pointer(C.QGraphicsTextItem_Document(this.h)), nil) +} + +func (this *QGraphicsTextItem) SetTextInteractionFlags(flags TextInteractionFlag) { + C.QGraphicsTextItem_SetTextInteractionFlags(this.h, (C.int)(flags)) +} + +func (this *QGraphicsTextItem) TextInteractionFlags() TextInteractionFlag { + return (TextInteractionFlag)(C.QGraphicsTextItem_TextInteractionFlags(this.h)) +} + +func (this *QGraphicsTextItem) SetTabChangesFocus(b bool) { + C.QGraphicsTextItem_SetTabChangesFocus(this.h, (C.bool)(b)) +} + +func (this *QGraphicsTextItem) TabChangesFocus() bool { + return (bool)(C.QGraphicsTextItem_TabChangesFocus(this.h)) +} + +func (this *QGraphicsTextItem) SetOpenExternalLinks(open bool) { + C.QGraphicsTextItem_SetOpenExternalLinks(this.h, (C.bool)(open)) +} + +func (this *QGraphicsTextItem) OpenExternalLinks() bool { + return (bool)(C.QGraphicsTextItem_OpenExternalLinks(this.h)) +} + +func (this *QGraphicsTextItem) SetTextCursor(cursor *QTextCursor) { + C.QGraphicsTextItem_SetTextCursor(this.h, cursor.cPointer()) +} + +func (this *QGraphicsTextItem) TextCursor() *QTextCursor { + _ret := C.QGraphicsTextItem_TextCursor(this.h) + _goptr := newQTextCursor(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) LinkActivated(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QGraphicsTextItem_LinkActivated(this.h, param1_ms) +} +func (this *QGraphicsTextItem) OnLinkActivated(slot func(param1 string)) { + C.QGraphicsTextItem_connect_LinkActivated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_LinkActivated +func miqt_exec_callback_QGraphicsTextItem_LinkActivated(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func (this *QGraphicsTextItem) LinkHovered(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QGraphicsTextItem_LinkHovered(this.h, param1_ms) +} +func (this *QGraphicsTextItem) OnLinkHovered(slot func(param1 string)) { + C.QGraphicsTextItem_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_LinkHovered +func miqt_exec_callback_QGraphicsTextItem_LinkHovered(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func QGraphicsTextItem_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsTextItem_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsTextItem_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsTextItem_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsTextItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsTextItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_BoundingRect +func miqt_exec_callback_QGraphicsTextItem_BoundingRect(self *C.QGraphicsTextItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsTextItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsTextItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Shape +func miqt_exec_callback_QGraphicsTextItem_Shape(self *C.QGraphicsTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsTextItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsTextItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Contains +func miqt_exec_callback_QGraphicsTextItem_Contains(self *C.QGraphicsTextItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsTextItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsTextItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsTextItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Paint +func miqt_exec_callback_QGraphicsTextItem_Paint(self *C.QGraphicsTextItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsTextItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsTextItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsTextItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_IsObscuredBy +func miqt_exec_callback_QGraphicsTextItem_IsObscuredBy(self *C.QGraphicsTextItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsTextItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsTextItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_OpaqueArea +func miqt_exec_callback_QGraphicsTextItem_OpaqueArea(self *C.QGraphicsTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsTextItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsTextItem) OnType(slot func(super func() int) int) { + C.QGraphicsTextItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Type +func miqt_exec_callback_QGraphicsTextItem_Type(self *C.QGraphicsTextItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsTextItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsTextItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_SceneEvent +func miqt_exec_callback_QGraphicsTextItem_SceneEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MousePressEvent +func miqt_exec_callback_QGraphicsTextItem_MousePressEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsTextItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsTextItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsTextItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsTextItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_KeyPressEvent +func miqt_exec_callback_QGraphicsTextItem_KeyPressEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsTextItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsTextItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsTextItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsTextItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_FocusInEvent +func miqt_exec_callback_QGraphicsTextItem_FocusInEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsTextItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsTextItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_FocusOutEvent +func miqt_exec_callback_QGraphicsTextItem_FocusOutEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DragEnterEvent +func miqt_exec_callback_QGraphicsTextItem_DragEnterEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DragMoveEvent +func miqt_exec_callback_QGraphicsTextItem_DragMoveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DropEvent +func miqt_exec_callback_QGraphicsTextItem_DropEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsTextItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsTextItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_InputMethodEvent +func miqt_exec_callback_QGraphicsTextItem_InputMethodEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsTextItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsTextItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsTextItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsTextItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsTextItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsTextItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsTextItem_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsTextItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_InputMethodQuery +func miqt_exec_callback_QGraphicsTextItem_InputMethodQuery(self *C.QGraphicsTextItem, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsTextItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsTextItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_SupportsExtension +func miqt_exec_callback_QGraphicsTextItem_SupportsExtension(self *C.QGraphicsTextItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsTextItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsTextItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsTextItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_SetExtension +func miqt_exec_callback_QGraphicsTextItem_SetExtension(self *C.QGraphicsTextItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsTextItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsTextItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsTextItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Extension +func miqt_exec_callback_QGraphicsTextItem_Extension(self *C.QGraphicsTextItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Event(ev *QEvent) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_Event(unsafe.Pointer(this.h), ev.cPointer())) + +} +func (this *QGraphicsTextItem) OnEvent(slot func(super func(ev *QEvent) bool, ev *QEvent) bool) { + C.QGraphicsTextItem_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Event +func miqt_exec_callback_QGraphicsTextItem_Event(self *C.QGraphicsTextItem, cb C.intptr_t, ev *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QEvent) bool, ev *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(ev)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QGraphicsTextItem) Delete() { + C.QGraphicsTextItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsTextItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsTextItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsSimpleTextItem struct { + h *C.QGraphicsSimpleTextItem + isSubclass bool + *QAbstractGraphicsShapeItem +} + +func (this *QGraphicsSimpleTextItem) cPointer() *C.QGraphicsSimpleTextItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsSimpleTextItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsSimpleTextItem constructs the type using only CGO pointers. +func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSimpleTextItem { + if h == nil { + return nil + } + return &QGraphicsSimpleTextItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsSimpleTextItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSimpleTextItem { + if h == nil { + return nil + } + + return &QGraphicsSimpleTextItem{h: (*C.QGraphicsSimpleTextItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +} + +// NewQGraphicsSimpleTextItem constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem() *QGraphicsSimpleTextItem { + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new(&outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSimpleTextItem2 constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem2(text string) *QGraphicsSimpleTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new2(text_ms, &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSimpleTextItem3 constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem3(parent *QGraphicsItem) *QGraphicsSimpleTextItem { + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new3(parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSimpleTextItem4 constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem4(text string, parent *QGraphicsItem) *QGraphicsSimpleTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsSimpleTextItem) SetText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QGraphicsSimpleTextItem_SetText(this.h, text_ms) +} + +func (this *QGraphicsSimpleTextItem) Text() string { + var _ms C.struct_miqt_string = C.QGraphicsSimpleTextItem_Text(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSimpleTextItem) SetFont(font *QFont) { + C.QGraphicsSimpleTextItem_SetFont(this.h, font.cPointer()) +} + +func (this *QGraphicsSimpleTextItem) Font() *QFont { + _ret := C.QGraphicsSimpleTextItem_Font(this.h) + _goptr := newQFont(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) BoundingRect() *QRectF { + _ret := C.QGraphicsSimpleTextItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) Shape() *QPainterPath { + _ret := C.QGraphicsSimpleTextItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsSimpleTextItem_Contains(this.h, point.cPointer())) +} + +func (this *QGraphicsSimpleTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsSimpleTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsSimpleTextItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsSimpleTextItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsSimpleTextItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsSimpleTextItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) Type() int { + return (int)(C.QGraphicsSimpleTextItem_Type(this.h)) +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsSimpleTextItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_BoundingRect +func miqt_exec_callback_QGraphicsSimpleTextItem_BoundingRect(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsSimpleTextItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Shape +func miqt_exec_callback_QGraphicsSimpleTextItem_Shape(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsSimpleTextItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsSimpleTextItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsSimpleTextItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Contains +func miqt_exec_callback_QGraphicsSimpleTextItem_Contains(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsSimpleTextItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsSimpleTextItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsSimpleTextItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Paint +func miqt_exec_callback_QGraphicsSimpleTextItem_Paint(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsSimpleTextItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsSimpleTextItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsSimpleTextItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_IsObscuredBy +func miqt_exec_callback_QGraphicsSimpleTextItem_IsObscuredBy(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsSimpleTextItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_OpaqueArea +func miqt_exec_callback_QGraphicsSimpleTextItem_OpaqueArea(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsSimpleTextItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsSimpleTextItem) OnType(slot func(super func() int) int) { + C.QGraphicsSimpleTextItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Type +func miqt_exec_callback_QGraphicsSimpleTextItem_Type(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsSimpleTextItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsSimpleTextItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsSimpleTextItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_SupportsExtension +func miqt_exec_callback_QGraphicsSimpleTextItem_SupportsExtension(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsSimpleTextItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsSimpleTextItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsSimpleTextItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_SetExtension +func miqt_exec_callback_QGraphicsSimpleTextItem_SetExtension(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsSimpleTextItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Extension +func miqt_exec_callback_QGraphicsSimpleTextItem_Extension(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QGraphicsSimpleTextItem) Delete() { + C.QGraphicsSimpleTextItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsSimpleTextItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsSimpleTextItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsItemGroup struct { + h *C.QGraphicsItemGroup + isSubclass bool + *QGraphicsItem +} + +func (this *QGraphicsItemGroup) cPointer() *C.QGraphicsItemGroup { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsItemGroup) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsItemGroup constructs the type using only CGO pointers. +func newQGraphicsItemGroup(h *C.QGraphicsItemGroup, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsItemGroup { + if h == nil { + return nil + } + return &QGraphicsItemGroup{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsItemGroup constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsItemGroup { + if h == nil { + return nil + } + + return &QGraphicsItemGroup{h: (*C.QGraphicsItemGroup)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +} + +// NewQGraphicsItemGroup constructs a new QGraphicsItemGroup object. +func NewQGraphicsItemGroup() *QGraphicsItemGroup { + var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItemGroup_new(&outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsItemGroup2 constructs a new QGraphicsItemGroup object. +func NewQGraphicsItemGroup2(parent *QGraphicsItem) *QGraphicsItemGroup { + var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItemGroup_new2(parent.cPointer(), &outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsItemGroup) AddToGroup(item *QGraphicsItem) { + C.QGraphicsItemGroup_AddToGroup(this.h, item.cPointer()) +} + +func (this *QGraphicsItemGroup) RemoveFromGroup(item *QGraphicsItem) { + C.QGraphicsItemGroup_RemoveFromGroup(this.h, item.cPointer()) +} + +func (this *QGraphicsItemGroup) BoundingRect() *QRectF { + _ret := C.QGraphicsItemGroup_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsItemGroup) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsItemGroup_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsItemGroup) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsItemGroup_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsItemGroup) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsItemGroup_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsItemGroup) Type() int { + return (int)(C.QGraphicsItemGroup_Type(this.h)) +} + +func (this *QGraphicsItemGroup) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsItemGroup_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsItemGroup_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_BoundingRect +func miqt_exec_callback_QGraphicsItemGroup_BoundingRect(self *C.QGraphicsItemGroup, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsItemGroup_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsItemGroup) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsItemGroup_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Paint +func miqt_exec_callback_QGraphicsItemGroup_Paint(self *C.QGraphicsItemGroup, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsItemGroup) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsItemGroup_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_IsObscuredBy +func miqt_exec_callback_QGraphicsItemGroup_IsObscuredBy(self *C.QGraphicsItemGroup, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsItemGroup_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItemGroup_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_OpaqueArea +func miqt_exec_callback_QGraphicsItemGroup_OpaqueArea(self *C.QGraphicsItemGroup, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Type() int { + + return (int)(C.QGraphicsItemGroup_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsItemGroup) OnType(slot func(super func() int) int) { + C.QGraphicsItemGroup_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Type +func miqt_exec_callback_QGraphicsItemGroup_Type(self *C.QGraphicsItemGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Advance(phase int) { + + C.QGraphicsItemGroup_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsItemGroup) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsItemGroup_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Advance +func miqt_exec_callback_QGraphicsItemGroup_Advance(self *C.QGraphicsItemGroup, cb C.intptr_t, phase C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(phase int), phase int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(phase) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Advance, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsItemGroup_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItemGroup_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Shape +func miqt_exec_callback_QGraphicsItemGroup_Shape(self *C.QGraphicsItemGroup, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsItemGroup) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsItemGroup_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Contains +func miqt_exec_callback_QGraphicsItemGroup_Contains(self *C.QGraphicsItemGroup, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItemGroup) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsItemGroup_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_CollidesWithItem +func miqt_exec_callback_QGraphicsItemGroup_CollidesWithItem(self *C.QGraphicsItemGroup, cb C.intptr_t, other *C.QGraphicsItem, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(other)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItemGroup) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsItemGroup_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_CollidesWithPath +func miqt_exec_callback_QGraphicsItemGroup_CollidesWithPath(self *C.QGraphicsItemGroup, cb C.intptr_t, path *C.QPainterPath, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsItemGroup) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsItemGroup_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SceneEventFilter +func miqt_exec_callback_QGraphicsItemGroup_SceneEventFilter(self *C.QGraphicsItemGroup, cb C.intptr_t, watched *C.QGraphicsItem, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsItemGroup) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsItemGroup_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SceneEvent +func miqt_exec_callback_QGraphicsItemGroup_SceneEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsItemGroup_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsItemGroup_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent +func miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent +func miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent +func miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent +func miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DropEvent +func miqt_exec_callback_QGraphicsItemGroup_DropEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsItemGroup_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItemGroup_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_FocusInEvent +func miqt_exec_callback_QGraphicsItemGroup_FocusInEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsItemGroup_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItemGroup_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent +func miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItemGroup_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItemGroup_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent +func miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItemGroup_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItemGroup_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent +func miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItemGroup_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItemGroup_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent +func miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsItemGroup_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItemGroup_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent +func miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsItemGroup_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItemGroup_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent +func miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MousePressEvent +func miqt_exec_callback_QGraphicsItemGroup_MousePressEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent +func miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent +func miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsItemGroup_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsItemGroup_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_WheelEvent +func miqt_exec_callback_QGraphicsItemGroup_WheelEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsItemGroup_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsItemGroup_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent +func miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsItemGroup_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsItemGroup_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_InputMethodQuery +func miqt_exec_callback_QGraphicsItemGroup_InputMethodQuery(self *C.QGraphicsItemGroup, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsItemGroup_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsItemGroup_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_ItemChange +func miqt_exec_callback_QGraphicsItemGroup_ItemChange(self *C.QGraphicsItemGroup, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsItemGroup) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsItemGroup_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SupportsExtension +func miqt_exec_callback_QGraphicsItemGroup_SupportsExtension(self *C.QGraphicsItemGroup, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsItemGroup_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsItemGroup) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsItemGroup_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SetExtension +func miqt_exec_callback_QGraphicsItemGroup_SetExtension(self *C.QGraphicsItemGroup, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsItemGroup_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsItemGroup_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Extension +func miqt_exec_callback_QGraphicsItemGroup_Extension(self *C.QGraphicsItemGroup, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QGraphicsItemGroup) Delete() { - C.QGraphicsItemGroup_Delete(this.h) + C.QGraphicsItemGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsitem.h b/qt/gen_qgraphicsitem.h index 3c0eaa88..691fd4ae 100644 --- a/qt/gen_qgraphicsitem.h +++ b/qt/gen_qgraphicsitem.h @@ -19,6 +19,8 @@ class QAbstractGraphicsShapeItem; class QBrush; class QColor; class QCursor; +class QEvent; +class QFocusEvent; class QFont; class QGraphicsEffect; class QGraphicsEllipseItem; @@ -31,13 +33,21 @@ class QGraphicsPixmapItem; class QGraphicsPolygonItem; class QGraphicsRectItem; class QGraphicsScene; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneWheelEvent; class QGraphicsSimpleTextItem; class QGraphicsTextItem; class QGraphicsTransform; class QGraphicsWidget; +class QInputMethodEvent; +class QKeyEvent; class QLineF; class QMatrix; class QMetaObject; +class QObject; class QPainter; class QPainterPath; class QPen; @@ -57,6 +67,8 @@ typedef struct QAbstractGraphicsShapeItem QAbstractGraphicsShapeItem; typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QCursor QCursor; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsEllipseItem QGraphicsEllipseItem; @@ -69,13 +81,21 @@ typedef struct QGraphicsPixmapItem QGraphicsPixmapItem; typedef struct QGraphicsPolygonItem QGraphicsPolygonItem; typedef struct QGraphicsRectItem QGraphicsRectItem; typedef struct QGraphicsScene QGraphicsScene; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; typedef struct QGraphicsSimpleTextItem QGraphicsSimpleTextItem; typedef struct QGraphicsTextItem QGraphicsTextItem; typedef struct QGraphicsTransform QGraphicsTransform; typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineF QLineF; typedef struct QMatrix QMatrix; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPainterPath QPainterPath; typedef struct QPen QPen; @@ -203,8 +223,8 @@ QPainterPath* QGraphicsItem_Shape(const QGraphicsItem* self); bool QGraphicsItem_IsClipped(const QGraphicsItem* self); QPainterPath* QGraphicsItem_ClipPath(const QGraphicsItem* self); bool QGraphicsItem_Contains(const QGraphicsItem* self, QPointF* point); -bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other); -bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path); +bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other, int mode); +bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path, int mode); struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems(const QGraphicsItem* self); bool QGraphicsItem_IsObscured(const QGraphicsItem* self); bool QGraphicsItem_IsObscured2(const QGraphicsItem* self, double x, double y, double w, double h); @@ -213,7 +233,7 @@ QPainterPath* QGraphicsItem_OpaqueArea(const QGraphicsItem* self); QRegion* QGraphicsItem_BoundingRegion(const QGraphicsItem* self, QTransform* itemToDeviceTransform); double QGraphicsItem_BoundingRegionGranularity(const QGraphicsItem* self); void QGraphicsItem_SetBoundingRegionGranularity(QGraphicsItem* self, double granularity); -void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); void QGraphicsItem_Update(QGraphicsItem* self); void QGraphicsItem_Update2(QGraphicsItem* self, double x, double y, double width, double height); void QGraphicsItem_Scroll(QGraphicsItem* self, double dx, double dy); @@ -257,6 +277,31 @@ void QGraphicsItem_SetInputMethodHints(QGraphicsItem* self, int hints); int QGraphicsItem_Type(const QGraphicsItem* self); void QGraphicsItem_InstallSceneEventFilter(QGraphicsItem* self, QGraphicsItem* filterItem); void QGraphicsItem_RemoveSceneEventFilter(QGraphicsItem* self, QGraphicsItem* filterItem); +bool QGraphicsItem_SceneEventFilter(QGraphicsItem* self, QGraphicsItem* watched, QEvent* event); +bool QGraphicsItem_SceneEvent(QGraphicsItem* self, QEvent* event); +void QGraphicsItem_ContextMenuEvent(QGraphicsItem* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsItem_DragEnterEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_DragLeaveEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_DragMoveEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_DropEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_FocusInEvent(QGraphicsItem* self, QFocusEvent* event); +void QGraphicsItem_FocusOutEvent(QGraphicsItem* self, QFocusEvent* event); +void QGraphicsItem_HoverEnterEvent(QGraphicsItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_HoverMoveEvent(QGraphicsItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_HoverLeaveEvent(QGraphicsItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_KeyPressEvent(QGraphicsItem* self, QKeyEvent* event); +void QGraphicsItem_KeyReleaseEvent(QGraphicsItem* self, QKeyEvent* event); +void QGraphicsItem_MousePressEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_MouseMoveEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_MouseReleaseEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_MouseDoubleClickEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_WheelEvent(QGraphicsItem* self, QGraphicsSceneWheelEvent* event); +void QGraphicsItem_InputMethodEvent(QGraphicsItem* self, QInputMethodEvent* event); +QVariant* QGraphicsItem_InputMethodQuery(const QGraphicsItem* self, int query); +QVariant* QGraphicsItem_ItemChange(QGraphicsItem* self, int change, QVariant* value); +bool QGraphicsItem_SupportsExtension(const QGraphicsItem* self, int extension); +void QGraphicsItem_SetExtension(QGraphicsItem* self, int extension, QVariant* variant); +QVariant* QGraphicsItem_Extension(const QGraphicsItem* self, QVariant* variant); void QGraphicsItem_SetFlag2(QGraphicsItem* self, int flag, bool enabled); void QGraphicsItem_SetCacheMode2(QGraphicsItem* self, int mode, QSize* cacheSize); void QGraphicsItem_SetFocus1(QGraphicsItem* self, int focusReason); @@ -268,14 +313,11 @@ void QGraphicsItem_EnsureVisible6(QGraphicsItem* self, double x, double y, doubl void QGraphicsItem_SetMatrix2(QGraphicsItem* self, QMatrix* matrix, bool combine); QTransform* QGraphicsItem_ItemTransform2(const QGraphicsItem* self, QGraphicsItem* other, bool* ok); void QGraphicsItem_SetTransform2(QGraphicsItem* self, QTransform* matrix, bool combine); -bool QGraphicsItem_CollidesWithItem2(const QGraphicsItem* self, QGraphicsItem* other, int mode); -bool QGraphicsItem_CollidesWithPath2(const QGraphicsItem* self, QPainterPath* path, int mode); struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems1(const QGraphicsItem* self, int mode); bool QGraphicsItem_IsObscured1(const QGraphicsItem* self, QRectF* rect); -void QGraphicsItem_Paint3(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); void QGraphicsItem_Update1(QGraphicsItem* self, QRectF* rect); void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* rect); -void QGraphicsItem_Delete(QGraphicsItem* self); +void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass); QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self); void* QGraphicsObject_Metacast(QGraphicsObject* self, const char* param1); @@ -307,12 +349,13 @@ void QGraphicsObject_WidthChanged(QGraphicsObject* self); void QGraphicsObject_connect_WidthChanged(QGraphicsObject* self, intptr_t slot); void QGraphicsObject_HeightChanged(QGraphicsObject* self); void QGraphicsObject_connect_HeightChanged(QGraphicsObject* self, intptr_t slot); +bool QGraphicsObject_Event(QGraphicsObject* self, QEvent* ev); struct miqt_string QGraphicsObject_Tr2(const char* s, const char* c); struct miqt_string QGraphicsObject_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsObject_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsObject_TrUtf83(const char* s, const char* c, int n); void QGraphicsObject_GrabGesture2(QGraphicsObject* self, int typeVal, int flags); -void QGraphicsObject_Delete(QGraphicsObject* self); +void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass); QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self); void QAbstractGraphicsShapeItem_SetPen(QAbstractGraphicsShapeItem* self, QPen* pen); @@ -320,49 +363,93 @@ QBrush* QAbstractGraphicsShapeItem_Brush(const QAbstractGraphicsShapeItem* self) void QAbstractGraphicsShapeItem_SetBrush(QAbstractGraphicsShapeItem* self, QBrush* brush); bool QAbstractGraphicsShapeItem_IsObscuredBy(const QAbstractGraphicsShapeItem* self, QGraphicsItem* item); QPainterPath* QAbstractGraphicsShapeItem_OpaqueArea(const QAbstractGraphicsShapeItem* self); -void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self); +void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass); -QGraphicsPathItem* QGraphicsPathItem_new(); -QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path); -QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent); -QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent); +void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self); void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path); QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self); QPainterPath* QGraphicsPathItem_Shape(const QGraphicsPathItem* self); bool QGraphicsPathItem_Contains(const QGraphicsPathItem* self, QPointF* point); -void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsPathItem_IsObscuredBy(const QGraphicsPathItem* self, QGraphicsItem* item); QPainterPath* QGraphicsPathItem_OpaqueArea(const QGraphicsPathItem* self); int QGraphicsPathItem_Type(const QGraphicsPathItem* self); -void QGraphicsPathItem_Paint3(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsPathItem_Delete(QGraphicsPathItem* self); +bool QGraphicsPathItem_SupportsExtension(const QGraphicsPathItem* self, int extension); +void QGraphicsPathItem_SetExtension(QGraphicsPathItem* self, int extension, QVariant* variant); +QVariant* QGraphicsPathItem_Extension(const QGraphicsPathItem* self, QVariant* variant); +void QGraphicsPathItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsPathItem_virtualbase_BoundingRect(const void* self); +void QGraphicsPathItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsPathItem_virtualbase_Shape(const void* self); +void QGraphicsPathItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsPathItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsPathItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsPathItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsPathItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsPathItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsPathItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsPathItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsPathItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsPathItem_virtualbase_Type(const void* self); +void QGraphicsPathItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsPathItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsPathItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsPathItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsPathItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsPathItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsPathItem_Delete(QGraphicsPathItem* self, bool isSubclass); -QGraphicsRectItem* QGraphicsRectItem_new(); -QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect); -QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h); -QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent); -QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent); -QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self); void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect); void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h); QRectF* QGraphicsRectItem_BoundingRect(const QGraphicsRectItem* self); QPainterPath* QGraphicsRectItem_Shape(const QGraphicsRectItem* self); bool QGraphicsRectItem_Contains(const QGraphicsRectItem* self, QPointF* point); -void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsRectItem_IsObscuredBy(const QGraphicsRectItem* self, QGraphicsItem* item); QPainterPath* QGraphicsRectItem_OpaqueArea(const QGraphicsRectItem* self); int QGraphicsRectItem_Type(const QGraphicsRectItem* self); -void QGraphicsRectItem_Paint3(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsRectItem_Delete(QGraphicsRectItem* self); +bool QGraphicsRectItem_SupportsExtension(const QGraphicsRectItem* self, int extension); +void QGraphicsRectItem_SetExtension(QGraphicsRectItem* self, int extension, QVariant* variant); +QVariant* QGraphicsRectItem_Extension(const QGraphicsRectItem* self, QVariant* variant); +void QGraphicsRectItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsRectItem_virtualbase_BoundingRect(const void* self); +void QGraphicsRectItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsRectItem_virtualbase_Shape(const void* self); +void QGraphicsRectItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsRectItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsRectItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsRectItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsRectItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsRectItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsRectItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsRectItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsRectItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsRectItem_virtualbase_Type(const void* self); +void QGraphicsRectItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsRectItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsRectItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsRectItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsRectItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsRectItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsRectItem_Delete(QGraphicsRectItem* self, bool isSubclass); -QGraphicsEllipseItem* QGraphicsEllipseItem_new(); -QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect); -QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h); -QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent); -QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent); -QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self); void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect); void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h); @@ -373,33 +460,77 @@ void QGraphicsEllipseItem_SetSpanAngle(QGraphicsEllipseItem* self, int angle); QRectF* QGraphicsEllipseItem_BoundingRect(const QGraphicsEllipseItem* self); QPainterPath* QGraphicsEllipseItem_Shape(const QGraphicsEllipseItem* self); bool QGraphicsEllipseItem_Contains(const QGraphicsEllipseItem* self, QPointF* point); -void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsEllipseItem_IsObscuredBy(const QGraphicsEllipseItem* self, QGraphicsItem* item); QPainterPath* QGraphicsEllipseItem_OpaqueArea(const QGraphicsEllipseItem* self); int QGraphicsEllipseItem_Type(const QGraphicsEllipseItem* self); -void QGraphicsEllipseItem_Paint3(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self); +bool QGraphicsEllipseItem_SupportsExtension(const QGraphicsEllipseItem* self, int extension); +void QGraphicsEllipseItem_SetExtension(QGraphicsEllipseItem* self, int extension, QVariant* variant); +QVariant* QGraphicsEllipseItem_Extension(const QGraphicsEllipseItem* self, QVariant* variant); +void QGraphicsEllipseItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsEllipseItem_virtualbase_BoundingRect(const void* self); +void QGraphicsEllipseItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsEllipseItem_virtualbase_Shape(const void* self); +void QGraphicsEllipseItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsEllipseItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsEllipseItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsEllipseItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsEllipseItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsEllipseItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsEllipseItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsEllipseItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsEllipseItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsEllipseItem_virtualbase_Type(const void* self); +void QGraphicsEllipseItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsEllipseItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsEllipseItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsEllipseItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsEllipseItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsEllipseItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self, bool isSubclass); -QGraphicsPolygonItem* QGraphicsPolygonItem_new(); -QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent); +void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self); void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule); QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self); QPainterPath* QGraphicsPolygonItem_Shape(const QGraphicsPolygonItem* self); bool QGraphicsPolygonItem_Contains(const QGraphicsPolygonItem* self, QPointF* point); -void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsPolygonItem_IsObscuredBy(const QGraphicsPolygonItem* self, QGraphicsItem* item); QPainterPath* QGraphicsPolygonItem_OpaqueArea(const QGraphicsPolygonItem* self); int QGraphicsPolygonItem_Type(const QGraphicsPolygonItem* self); -void QGraphicsPolygonItem_Paint3(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self); +bool QGraphicsPolygonItem_SupportsExtension(const QGraphicsPolygonItem* self, int extension); +void QGraphicsPolygonItem_SetExtension(QGraphicsPolygonItem* self, int extension, QVariant* variant); +QVariant* QGraphicsPolygonItem_Extension(const QGraphicsPolygonItem* self, QVariant* variant); +void QGraphicsPolygonItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsPolygonItem_virtualbase_BoundingRect(const void* self); +void QGraphicsPolygonItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsPolygonItem_virtualbase_Shape(const void* self); +void QGraphicsPolygonItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsPolygonItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsPolygonItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsPolygonItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsPolygonItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsPolygonItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsPolygonItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsPolygonItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsPolygonItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsPolygonItem_virtualbase_Type(const void* self); +void QGraphicsPolygonItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsPolygonItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsPolygonItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsPolygonItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsPolygonItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsPolygonItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self, bool isSubclass); -QGraphicsLineItem* QGraphicsLineItem_new(); -QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line); -QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2); -QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent); -QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent); -QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent); +void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self); void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen); QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self); @@ -408,17 +539,89 @@ void QGraphicsLineItem_SetLine2(QGraphicsLineItem* self, double x1, double y1, d QRectF* QGraphicsLineItem_BoundingRect(const QGraphicsLineItem* self); QPainterPath* QGraphicsLineItem_Shape(const QGraphicsLineItem* self); bool QGraphicsLineItem_Contains(const QGraphicsLineItem* self, QPointF* point); -void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsLineItem_IsObscuredBy(const QGraphicsLineItem* self, QGraphicsItem* item); QPainterPath* QGraphicsLineItem_OpaqueArea(const QGraphicsLineItem* self); int QGraphicsLineItem_Type(const QGraphicsLineItem* self); -void QGraphicsLineItem_Paint3(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsLineItem_Delete(QGraphicsLineItem* self); +bool QGraphicsLineItem_SupportsExtension(const QGraphicsLineItem* self, int extension); +void QGraphicsLineItem_SetExtension(QGraphicsLineItem* self, int extension, QVariant* variant); +QVariant* QGraphicsLineItem_Extension(const QGraphicsLineItem* self, QVariant* variant); +void QGraphicsLineItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsLineItem_virtualbase_BoundingRect(const void* self); +void QGraphicsLineItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsLineItem_virtualbase_Shape(const void* self); +void QGraphicsLineItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsLineItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsLineItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsLineItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsLineItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsLineItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsLineItem_virtualbase_Type(const void* self); +void QGraphicsLineItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsLineItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsLineItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsLineItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsLineItem_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_Advance(void* self, int phase); +void QGraphicsLineItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsLineItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsLineItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsLineItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsLineItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsLineItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsLineItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsLineItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsLineItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsLineItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsLineItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsLineItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsLineItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsLineItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsLineItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsLineItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsLineItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsLineItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsLineItem_Delete(QGraphicsLineItem* self, bool isSubclass); -QGraphicsPixmapItem* QGraphicsPixmapItem_new(); -QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap); -QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent); -QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent); +void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self); void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap); int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self); @@ -435,12 +638,85 @@ QPainterPath* QGraphicsPixmapItem_OpaqueArea(const QGraphicsPixmapItem* self); int QGraphicsPixmapItem_Type(const QGraphicsPixmapItem* self); int QGraphicsPixmapItem_ShapeMode(const QGraphicsPixmapItem* self); void QGraphicsPixmapItem_SetShapeMode(QGraphicsPixmapItem* self, int mode); -void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self); +bool QGraphicsPixmapItem_SupportsExtension(const QGraphicsPixmapItem* self, int extension); +void QGraphicsPixmapItem_SetExtension(QGraphicsPixmapItem* self, int extension, QVariant* variant); +QVariant* QGraphicsPixmapItem_Extension(const QGraphicsPixmapItem* self, QVariant* variant); +void QGraphicsPixmapItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsPixmapItem_virtualbase_BoundingRect(const void* self); +void QGraphicsPixmapItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsPixmapItem_virtualbase_Shape(const void* self); +void QGraphicsPixmapItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsPixmapItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsPixmapItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsPixmapItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsPixmapItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsPixmapItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsPixmapItem_virtualbase_Type(const void* self); +void QGraphicsPixmapItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsPixmapItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsPixmapItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsPixmapItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsPixmapItem_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_Advance(void* self, int phase); +void QGraphicsPixmapItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsPixmapItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsPixmapItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsPixmapItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsPixmapItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsPixmapItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsPixmapItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsPixmapItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsPixmapItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsPixmapItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsPixmapItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsPixmapItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsPixmapItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsPixmapItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsPixmapItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsPixmapItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsPixmapItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsPixmapItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self, bool isSubclass); -QGraphicsTextItem* QGraphicsTextItem_new(); -QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text); -QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent); -QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self); void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1); struct miqt_string QGraphicsTextItem_Tr(const char* s); @@ -477,16 +753,98 @@ void QGraphicsTextItem_LinkActivated(QGraphicsTextItem* self, struct miqt_string void QGraphicsTextItem_connect_LinkActivated(QGraphicsTextItem* self, intptr_t slot); void QGraphicsTextItem_LinkHovered(QGraphicsTextItem* self, struct miqt_string param1); void QGraphicsTextItem_connect_LinkHovered(QGraphicsTextItem* self, intptr_t slot); +bool QGraphicsTextItem_SceneEvent(QGraphicsTextItem* self, QEvent* event); +void QGraphicsTextItem_MousePressEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_MouseMoveEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_MouseReleaseEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_MouseDoubleClickEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_ContextMenuEvent(QGraphicsTextItem* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsTextItem_KeyPressEvent(QGraphicsTextItem* self, QKeyEvent* event); +void QGraphicsTextItem_KeyReleaseEvent(QGraphicsTextItem* self, QKeyEvent* event); +void QGraphicsTextItem_FocusInEvent(QGraphicsTextItem* self, QFocusEvent* event); +void QGraphicsTextItem_FocusOutEvent(QGraphicsTextItem* self, QFocusEvent* event); +void QGraphicsTextItem_DragEnterEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_DragLeaveEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_DragMoveEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_DropEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_InputMethodEvent(QGraphicsTextItem* self, QInputMethodEvent* event); +void QGraphicsTextItem_HoverEnterEvent(QGraphicsTextItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_HoverMoveEvent(QGraphicsTextItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_HoverLeaveEvent(QGraphicsTextItem* self, QGraphicsSceneHoverEvent* event); +QVariant* QGraphicsTextItem_InputMethodQuery(const QGraphicsTextItem* self, int query); +bool QGraphicsTextItem_SupportsExtension(const QGraphicsTextItem* self, int extension); +void QGraphicsTextItem_SetExtension(QGraphicsTextItem* self, int extension, QVariant* variant); +QVariant* QGraphicsTextItem_Extension(const QGraphicsTextItem* self, QVariant* variant); struct miqt_string QGraphicsTextItem_Tr2(const char* s, const char* c); struct miqt_string QGraphicsTextItem_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsTextItem_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsTextItem_TrUtf83(const char* s, const char* c, int n); -void QGraphicsTextItem_Delete(QGraphicsTextItem* self); +void QGraphicsTextItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsTextItem_virtualbase_BoundingRect(const void* self); +void QGraphicsTextItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsTextItem_virtualbase_Shape(const void* self); +void QGraphicsTextItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsTextItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsTextItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsTextItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsTextItem_virtualbase_Type(const void* self); +void QGraphicsTextItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsTextItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsTextItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsTextItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsTextItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsTextItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsTextItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsTextItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsTextItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsTextItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsTextItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsTextItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsTextItem_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsTextItem_Delete(QGraphicsTextItem* self, bool isSubclass); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new(); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text); struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self); void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font); @@ -498,19 +856,111 @@ void QGraphicsSimpleTextItem_Paint(QGraphicsSimpleTextItem* self, QPainter* pain bool QGraphicsSimpleTextItem_IsObscuredBy(const QGraphicsSimpleTextItem* self, QGraphicsItem* item); QPainterPath* QGraphicsSimpleTextItem_OpaqueArea(const QGraphicsSimpleTextItem* self); int QGraphicsSimpleTextItem_Type(const QGraphicsSimpleTextItem* self); -void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self); +bool QGraphicsSimpleTextItem_SupportsExtension(const QGraphicsSimpleTextItem* self, int extension); +void QGraphicsSimpleTextItem_SetExtension(QGraphicsSimpleTextItem* self, int extension, QVariant* variant); +QVariant* QGraphicsSimpleTextItem_Extension(const QGraphicsSimpleTextItem* self, QVariant* variant); +void QGraphicsSimpleTextItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsSimpleTextItem_virtualbase_BoundingRect(const void* self); +void QGraphicsSimpleTextItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsSimpleTextItem_virtualbase_Shape(const void* self); +void QGraphicsSimpleTextItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsSimpleTextItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsSimpleTextItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsSimpleTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsSimpleTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsSimpleTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsSimpleTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsSimpleTextItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsSimpleTextItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsSimpleTextItem_virtualbase_Type(const void* self); +void QGraphicsSimpleTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsSimpleTextItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsSimpleTextItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsSimpleTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsSimpleTextItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsSimpleTextItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self, bool isSubclass); -QGraphicsItemGroup* QGraphicsItemGroup_new(); -QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent); +void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item); void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item); QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self); -void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsItemGroup_IsObscuredBy(const QGraphicsItemGroup* self, QGraphicsItem* item); QPainterPath* QGraphicsItemGroup_OpaqueArea(const QGraphicsItemGroup* self); int QGraphicsItemGroup_Type(const QGraphicsItemGroup* self); -void QGraphicsItemGroup_Paint3(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self); +void QGraphicsItemGroup_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsItemGroup_virtualbase_BoundingRect(const void* self); +void QGraphicsItemGroup_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsItemGroup_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsItemGroup_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsItemGroup_virtualbase_OpaqueArea(const void* self); +void QGraphicsItemGroup_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsItemGroup_virtualbase_Type(const void* self); +void QGraphicsItemGroup_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_Advance(void* self, int phase); +void QGraphicsItemGroup_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsItemGroup_virtualbase_Shape(const void* self); +void QGraphicsItemGroup_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsItemGroup_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsItemGroup_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsItemGroup_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsItemGroup_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsItemGroup_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsItemGroup_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsItemGroup_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsItemGroup_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItemGroup_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItemGroup_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItemGroup_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsItemGroup_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsItemGroup_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsItemGroup_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsItemGroup_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsItemGroup_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsItemGroup_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsItemGroup_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsItemGroup_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsItemGroup_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsItemGroup_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsItemGroup_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsitemanimation.cpp b/qt/gen_qgraphicsitemanimation.cpp index c8d53b28..5873ad53 100644 --- a/qt/gen_qgraphicsitemanimation.cpp +++ b/qt/gen_qgraphicsitemanimation.cpp @@ -1,7 +1,10 @@ +#include +#include #include #include #include #include +#include #include #include #include @@ -9,17 +12,253 @@ #include #include #include +#include #include #include #include "gen_qgraphicsitemanimation.h" #include "_cgo_export.h" -QGraphicsItemAnimation* QGraphicsItemAnimation_new() { - return new QGraphicsItemAnimation(); +class MiqtVirtualQGraphicsItemAnimation : public virtual QGraphicsItemAnimation { +public: + + MiqtVirtualQGraphicsItemAnimation(): QGraphicsItemAnimation() {}; + MiqtVirtualQGraphicsItemAnimation(QObject* parent): QGraphicsItemAnimation(parent) {}; + + virtual ~MiqtVirtualQGraphicsItemAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BeforeAnimationStep = 0; + + // Subclass to allow providing a Go implementation + virtual void beforeAnimationStep(qreal step) override { + if (handle__BeforeAnimationStep == 0) { + QGraphicsItemAnimation::beforeAnimationStep(step); + return; + } + + qreal step_ret = step; + double sigval1 = static_cast(step_ret); + + miqt_exec_callback_QGraphicsItemAnimation_BeforeAnimationStep(this, handle__BeforeAnimationStep, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BeforeAnimationStep(double step) { + + QGraphicsItemAnimation::beforeAnimationStep(static_cast(step)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AfterAnimationStep = 0; + + // Subclass to allow providing a Go implementation + virtual void afterAnimationStep(qreal step) override { + if (handle__AfterAnimationStep == 0) { + QGraphicsItemAnimation::afterAnimationStep(step); + return; + } + + qreal step_ret = step; + double sigval1 = static_cast(step_ret); + + miqt_exec_callback_QGraphicsItemAnimation_AfterAnimationStep(this, handle__AfterAnimationStep, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AfterAnimationStep(double step) { + + QGraphicsItemAnimation::afterAnimationStep(static_cast(step)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsItemAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsItemAnimation::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGraphicsItemAnimation::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemAnimation_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsItemAnimation::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGraphicsItemAnimation::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemAnimation_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsItemAnimation::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGraphicsItemAnimation::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemAnimation_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsItemAnimation::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QGraphicsItemAnimation::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemAnimation_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsItemAnimation::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QGraphicsItemAnimation::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsItemAnimation_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsItemAnimation::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QGraphicsItemAnimation::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsItemAnimation_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsItemAnimation::disconnectNotify(*signal); + + } + +}; + +void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { + MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(); + *outptr_QGraphicsItemAnimation = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent) { - return new QGraphicsItemAnimation(parent); +void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { + MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(parent); + *outptr_QGraphicsItemAnimation = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self) { @@ -306,7 +545,83 @@ struct miqt_string QGraphicsItemAnimation_TrUtf83(const char* s, const char* c, return _ms; } -void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self) { - delete self; +void QGraphicsItemAnimation_override_virtual_BeforeAnimationStep(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__BeforeAnimationStep = slot; +} + +void QGraphicsItemAnimation_virtualbase_BeforeAnimationStep(void* self, double step) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_BeforeAnimationStep(step); +} + +void QGraphicsItemAnimation_override_virtual_AfterAnimationStep(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__AfterAnimationStep = slot; +} + +void QGraphicsItemAnimation_virtualbase_AfterAnimationStep(void* self, double step) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_AfterAnimationStep(step); +} + +void QGraphicsItemAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__Event = slot; +} + +bool QGraphicsItemAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_Event(event); +} + +void QGraphicsItemAnimation_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsItemAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsItemAnimation_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsItemAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsItemAnimation_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsItemAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsItemAnimation_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsItemAnimation_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsItemAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsItemAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsItemAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsItemAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsitemanimation.go b/qt/gen_qgraphicsitemanimation.go index ccd02269..82418d40 100644 --- a/qt/gen_qgraphicsitemanimation.go +++ b/qt/gen_qgraphicsitemanimation.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsItemAnimation struct { - h *C.QGraphicsItemAnimation + h *C.QGraphicsItemAnimation + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QGraphicsItemAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation) *QGraphicsItemAnimation { +// newQGraphicsItemAnimation constructs the type using only CGO pointers. +func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation, h_QObject *C.QObject) *QGraphicsItemAnimation { if h == nil { return nil } - return &QGraphicsItemAnimation{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsItemAnimation{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer) *QGraphicsItemAnimation { - return newQGraphicsItemAnimation((*C.QGraphicsItemAnimation)(h)) +// UnsafeNewQGraphicsItemAnimation constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsItemAnimation { + if h == nil { + return nil + } + + return &QGraphicsItemAnimation{h: (*C.QGraphicsItemAnimation)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQGraphicsItemAnimation constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation() *QGraphicsItemAnimation { - ret := C.QGraphicsItemAnimation_new() - return newQGraphicsItemAnimation(ret) + var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsItemAnimation_new(&outptr_QGraphicsItemAnimation, &outptr_QObject) + ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsItemAnimation2 constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation2(parent *QObject) *QGraphicsItemAnimation { - ret := C.QGraphicsItemAnimation_new2(parent.cPointer()) - return newQGraphicsItemAnimation(ret) + var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsItemAnimation_new2(parent.cPointer(), &outptr_QGraphicsItemAnimation, &outptr_QObject) + ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsItemAnimation) MetaObject() *QMetaObject { @@ -92,7 +112,7 @@ func (this *QGraphicsItemAnimation) SetItem(item *QGraphicsItem) { } func (this *QGraphicsItemAnimation) TimeLine() *QTimeLine { - return UnsafeNewQTimeLine(unsafe.Pointer(C.QGraphicsItemAnimation_TimeLine(this.h))) + return UnsafeNewQTimeLine(unsafe.Pointer(C.QGraphicsItemAnimation_TimeLine(this.h)), nil) } func (this *QGraphicsItemAnimation) SetTimeLine(timeLine *QTimeLine) { @@ -366,9 +386,221 @@ func QGraphicsItemAnimation_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsItemAnimation) callVirtualBase_BeforeAnimationStep(step float64) { + + C.QGraphicsItemAnimation_virtualbase_BeforeAnimationStep(unsafe.Pointer(this.h), (C.double)(step)) + +} +func (this *QGraphicsItemAnimation) OnBeforeAnimationStep(slot func(super func(step float64), step float64)) { + C.QGraphicsItemAnimation_override_virtual_BeforeAnimationStep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_BeforeAnimationStep +func miqt_exec_callback_QGraphicsItemAnimation_BeforeAnimationStep(self *C.QGraphicsItemAnimation, cb C.intptr_t, step C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(step float64), step float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(step) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_BeforeAnimationStep, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_AfterAnimationStep(step float64) { + + C.QGraphicsItemAnimation_virtualbase_AfterAnimationStep(unsafe.Pointer(this.h), (C.double)(step)) + +} +func (this *QGraphicsItemAnimation) OnAfterAnimationStep(slot func(super func(step float64), step float64)) { + C.QGraphicsItemAnimation_override_virtual_AfterAnimationStep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_AfterAnimationStep +func miqt_exec_callback_QGraphicsItemAnimation_AfterAnimationStep(self *C.QGraphicsItemAnimation, cb C.intptr_t, step C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(step float64), step float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(step) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_AfterAnimationStep, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsItemAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsItemAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsItemAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_Event +func miqt_exec_callback_QGraphicsItemAnimation_Event(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsItemAnimation_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsItemAnimation) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsItemAnimation_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_EventFilter +func miqt_exec_callback_QGraphicsItemAnimation_EventFilter(self *C.QGraphicsItemAnimation, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsItemAnimation_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsItemAnimation_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_TimerEvent +func miqt_exec_callback_QGraphicsItemAnimation_TimerEvent(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsItemAnimation_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsItemAnimation_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_ChildEvent +func miqt_exec_callback_QGraphicsItemAnimation_ChildEvent(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsItemAnimation_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsItemAnimation_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_CustomEvent +func miqt_exec_callback_QGraphicsItemAnimation_CustomEvent(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsItemAnimation_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsItemAnimation_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_ConnectNotify +func miqt_exec_callback_QGraphicsItemAnimation_ConnectNotify(self *C.QGraphicsItemAnimation, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsItemAnimation_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsItemAnimation_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_DisconnectNotify +func miqt_exec_callback_QGraphicsItemAnimation_DisconnectNotify(self *C.QGraphicsItemAnimation, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsItemAnimation) Delete() { - C.QGraphicsItemAnimation_Delete(this.h) + C.QGraphicsItemAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsitemanimation.h b/qt/gen_qgraphicsitemanimation.h index ef2e2a1b..8b5ef609 100644 --- a/qt/gen_qgraphicsitemanimation.h +++ b/qt/gen_qgraphicsitemanimation.h @@ -15,27 +15,35 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGraphicsItem; class QGraphicsItemAnimation; class QMatrix; +class QMetaMethod; class QMetaObject; class QObject; class QPointF; class QTimeLine; +class QTimerEvent; class QTransform; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGraphicsItem QGraphicsItem; typedef struct QGraphicsItemAnimation QGraphicsItemAnimation; typedef struct QMatrix QMatrix; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPointF QPointF; typedef struct QTimeLine QTimeLine; +typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; #endif -QGraphicsItemAnimation* QGraphicsItemAnimation_new(); -QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent); +void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); +void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self); void* QGraphicsItemAnimation_Metacast(QGraphicsItemAnimation* self, const char* param1); struct miqt_string QGraphicsItemAnimation_Tr(const char* s); @@ -67,11 +75,31 @@ void QGraphicsItemAnimation_SetShearAt(QGraphicsItemAnimation* self, double step void QGraphicsItemAnimation_Clear(QGraphicsItemAnimation* self); void QGraphicsItemAnimation_SetStep(QGraphicsItemAnimation* self, double x); void QGraphicsItemAnimation_Reset(QGraphicsItemAnimation* self); +void QGraphicsItemAnimation_BeforeAnimationStep(QGraphicsItemAnimation* self, double step); +void QGraphicsItemAnimation_AfterAnimationStep(QGraphicsItemAnimation* self, double step); struct miqt_string QGraphicsItemAnimation_Tr2(const char* s, const char* c); struct miqt_string QGraphicsItemAnimation_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsItemAnimation_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsItemAnimation_TrUtf83(const char* s, const char* c, int n); -void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self); +void QGraphicsItemAnimation_override_virtual_BeforeAnimationStep(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_BeforeAnimationStep(void* self, double step); +void QGraphicsItemAnimation_override_virtual_AfterAnimationStep(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_AfterAnimationStep(void* self, double step); +void QGraphicsItemAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsItemAnimation_virtualbase_Event(void* self, QEvent* event); +void QGraphicsItemAnimation_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsItemAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsItemAnimation_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsItemAnimation_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsItemAnimation_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsItemAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsItemAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicslayout.cpp b/qt/gen_qgraphicslayout.cpp index 327943f2..96fa07da 100644 --- a/qt/gen_qgraphicslayout.cpp +++ b/qt/gen_qgraphicslayout.cpp @@ -53,7 +53,11 @@ bool QGraphicsLayout_InstantInvalidatePropagation() { return QGraphicsLayout::instantInvalidatePropagation(); } -void QGraphicsLayout_Delete(QGraphicsLayout* self) { - delete self; +void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicslayout.go b/qt/gen_qgraphicslayout.go index 4204a42f..3a2487fb 100644 --- a/qt/gen_qgraphicslayout.go +++ b/qt/gen_qgraphicslayout.go @@ -14,7 +14,8 @@ import ( ) type QGraphicsLayout struct { - h *C.QGraphicsLayout + h *C.QGraphicsLayout + isSubclass bool *QGraphicsLayoutItem } @@ -32,15 +33,23 @@ func (this *QGraphicsLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsLayout(h *C.QGraphicsLayout) *QGraphicsLayout { +// newQGraphicsLayout constructs the type using only CGO pointers. +func newQGraphicsLayout(h *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLayout { if h == nil { return nil } - return &QGraphicsLayout{h: h, QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(h))} + return &QGraphicsLayout{h: h, + QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsLayout(h unsafe.Pointer) *QGraphicsLayout { - return newQGraphicsLayout((*C.QGraphicsLayout)(h)) +// UnsafeNewQGraphicsLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsLayout(h unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLayout { + if h == nil { + return nil + } + + return &QGraphicsLayout{h: (*C.QGraphicsLayout)(h), + QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } func (this *QGraphicsLayout) SetContentsMargins(left float64, top float64, right float64, bottom float64) { @@ -93,7 +102,7 @@ func QGraphicsLayout_InstantInvalidatePropagation() bool { // Delete this object from C++ memory. func (this *QGraphicsLayout) Delete() { - C.QGraphicsLayout_Delete(this.h) + C.QGraphicsLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicslayout.h b/qt/gen_qgraphicslayout.h index ce14f15d..00d83b1a 100644 --- a/qt/gen_qgraphicslayout.h +++ b/qt/gen_qgraphicslayout.h @@ -36,7 +36,7 @@ QGraphicsLayoutItem* QGraphicsLayout_ItemAt(const QGraphicsLayout* self, int i); void QGraphicsLayout_RemoveAt(QGraphicsLayout* self, int index); void QGraphicsLayout_SetInstantInvalidatePropagation(bool enable); bool QGraphicsLayout_InstantInvalidatePropagation(); -void QGraphicsLayout_Delete(QGraphicsLayout* self); +void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicslayoutitem.cpp b/qt/gen_qgraphicslayoutitem.cpp index 52c98a59..08c162d3 100644 --- a/qt/gen_qgraphicslayoutitem.cpp +++ b/qt/gen_qgraphicslayoutitem.cpp @@ -161,7 +161,11 @@ QSizeF* QGraphicsLayoutItem_EffectiveSizeHint2(const QGraphicsLayoutItem* self, return new QSizeF(self->effectiveSizeHint(static_cast(which), *constraint)); } -void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self) { - delete self; +void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicslayoutitem.go b/qt/gen_qgraphicslayoutitem.go index 2f1c22e0..504eb27e 100644 --- a/qt/gen_qgraphicslayoutitem.go +++ b/qt/gen_qgraphicslayoutitem.go @@ -14,7 +14,8 @@ import ( ) type QGraphicsLayoutItem struct { - h *C.QGraphicsLayoutItem + h *C.QGraphicsLayoutItem + isSubclass bool } func (this *QGraphicsLayoutItem) cPointer() *C.QGraphicsLayoutItem { @@ -31,6 +32,7 @@ func (this *QGraphicsLayoutItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGraphicsLayoutItem constructs the type using only CGO pointers. func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem { if h == nil { return nil @@ -38,8 +40,13 @@ func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem { return &QGraphicsLayoutItem{h: h} } +// UnsafeNewQGraphicsLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem { - return newQGraphicsLayoutItem((*C.QGraphicsLayoutItem)(h)) + if h == nil { + return nil + } + + return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)} } func (this *QGraphicsLayoutItem) SetSizePolicy(policy *QSizePolicy) { @@ -216,7 +223,7 @@ func (this *QGraphicsLayoutItem) EffectiveSizeHint2(which SizeHint, constraint * // Delete this object from C++ memory. func (this *QGraphicsLayoutItem) Delete() { - C.QGraphicsLayoutItem_Delete(this.h) + C.QGraphicsLayoutItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicslayoutitem.h b/qt/gen_qgraphicslayoutitem.h index f0c58a43..bb67a374 100644 --- a/qt/gen_qgraphicslayoutitem.h +++ b/qt/gen_qgraphicslayoutitem.h @@ -63,9 +63,10 @@ void QGraphicsLayoutItem_SetParentLayoutItem(QGraphicsLayoutItem* self, QGraphic bool QGraphicsLayoutItem_IsLayout(const QGraphicsLayoutItem* self); QGraphicsItem* QGraphicsLayoutItem_GraphicsItem(const QGraphicsLayoutItem* self); bool QGraphicsLayoutItem_OwnedByLayout(const QGraphicsLayoutItem* self); +QSizeF* QGraphicsLayoutItem_SizeHint(const QGraphicsLayoutItem* self, int which, QSizeF* constraint); void QGraphicsLayoutItem_SetSizePolicy3(QGraphicsLayoutItem* self, int hPolicy, int vPolicy, int controlType); QSizeF* QGraphicsLayoutItem_EffectiveSizeHint2(const QGraphicsLayoutItem* self, int which, QSizeF* constraint); -void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self); +void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicslinearlayout.cpp b/qt/gen_qgraphicslinearlayout.cpp index a4834ebe..f7372267 100644 --- a/qt/gen_qgraphicslinearlayout.cpp +++ b/qt/gen_qgraphicslinearlayout.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -6,20 +8,267 @@ #include "gen_qgraphicslinearlayout.h" #include "_cgo_export.h" -QGraphicsLinearLayout* QGraphicsLinearLayout_new() { - return new QGraphicsLinearLayout(); +class MiqtVirtualQGraphicsLinearLayout : public virtual QGraphicsLinearLayout { +public: + + MiqtVirtualQGraphicsLinearLayout(): QGraphicsLinearLayout() {}; + MiqtVirtualQGraphicsLinearLayout(Qt::Orientation orientation): QGraphicsLinearLayout(orientation) {}; + MiqtVirtualQGraphicsLinearLayout(QGraphicsLayoutItem* parent): QGraphicsLinearLayout(parent) {}; + MiqtVirtualQGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem* parent): QGraphicsLinearLayout(orientation, parent) {}; + + virtual ~MiqtVirtualQGraphicsLinearLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveAt = 0; + + // Subclass to allow providing a Go implementation + virtual void removeAt(int index) override { + if (handle__RemoveAt == 0) { + QGraphicsLinearLayout::removeAt(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsLinearLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveAt(int index) { + + QGraphicsLinearLayout::removeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsLinearLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsLinearLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsLinearLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGraphicsLinearLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsLinearLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGraphicsLinearLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int index) const override { + if (handle__ItemAt == 0) { + return QGraphicsLinearLayout::itemAt(index); + } + + int sigval1 = index; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsLinearLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGraphicsLayoutItem* virtualbase_ItemAt(int index) const { + + return QGraphicsLinearLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGraphicsLinearLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsLinearLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsLinearLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsLinearLayout::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsLinearLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsLinearLayout::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsLinearLayout::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsLinearLayout_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsLinearLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsLinearLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsLinearLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsLinearLayout::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WidgetEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void widgetEvent(QEvent* e) override { + if (handle__WidgetEvent == 0) { + QGraphicsLinearLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsLinearLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsLinearLayout::widgetEvent(e); + + } + +}; + +void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation) { - return new QGraphicsLinearLayout(static_cast(orientation)); +void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation)); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent) { - return new QGraphicsLinearLayout(parent); +void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(parent); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent) { - return new QGraphicsLinearLayout(static_cast(orientation), parent); +void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation), parent); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation) { @@ -106,8 +355,8 @@ void QGraphicsLinearLayout_Invalidate(QGraphicsLinearLayout* self) { self->invalidate(); } -QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which) { - return new QSizeF(self->sizeHint(static_cast(which))); +QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which, QSizeF* constraint) { + return new QSizeF(self->sizeHint(static_cast(which), *constraint)); } void QGraphicsLinearLayout_Dump(const QGraphicsLinearLayout* self) { @@ -122,15 +371,87 @@ void QGraphicsLinearLayout_InsertStretch2(QGraphicsLinearLayout* self, int index self->insertStretch(static_cast(index), static_cast(stretch)); } -QSizeF* QGraphicsLinearLayout_SizeHint2(const QGraphicsLinearLayout* self, int which, QSizeF* constraint) { - return new QSizeF(self->sizeHint(static_cast(which), *constraint)); -} - void QGraphicsLinearLayout_Dump1(const QGraphicsLinearLayout* self, int indent) { self->dump(static_cast(indent)); } -void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self) { - delete self; +void QGraphicsLinearLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsLinearLayout_virtualbase_RemoveAt(void* self, int index) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_RemoveAt(index); +} + +void QGraphicsLinearLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsLinearLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsLinearLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__Count = slot; +} + +int QGraphicsLinearLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_Count(); +} + +void QGraphicsLinearLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__ItemAt = slot; +} + +QGraphicsLayoutItem* QGraphicsLinearLayout_virtualbase_ItemAt(const void* self, int index) { + return ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_ItemAt(index); +} + +void QGraphicsLinearLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsLinearLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsLinearLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsLinearLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsLinearLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsLinearLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsLinearLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsLinearLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsLinearLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsLinearLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_WidgetEvent(e); +} + +void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicslinearlayout.go b/qt/gen_qgraphicslinearlayout.go index 72b8d97f..2d224ed4 100644 --- a/qt/gen_qgraphicslinearlayout.go +++ b/qt/gen_qgraphicslinearlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsLinearLayout struct { - h *C.QGraphicsLinearLayout + h *C.QGraphicsLinearLayout + isSubclass bool *QGraphicsLayout } @@ -32,39 +34,71 @@ func (this *QGraphicsLinearLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout) *QGraphicsLinearLayout { +// newQGraphicsLinearLayout constructs the type using only CGO pointers. +func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLinearLayout { if h == nil { return nil } - return &QGraphicsLinearLayout{h: h, QGraphicsLayout: UnsafeNewQGraphicsLayout(unsafe.Pointer(h))} + return &QGraphicsLinearLayout{h: h, + QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer) *QGraphicsLinearLayout { - return newQGraphicsLinearLayout((*C.QGraphicsLinearLayout)(h)) +// UnsafeNewQGraphicsLinearLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLinearLayout { + if h == nil { + return nil + } + + return &QGraphicsLinearLayout{h: (*C.QGraphicsLinearLayout)(h), + QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } // NewQGraphicsLinearLayout constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout() *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new() - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new(&outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsLinearLayout2 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout2(orientation Orientation) *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new2((C.int)(orientation)) - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new2((C.int)(orientation), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsLinearLayout3 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout3(parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new3(parent.cPointer()) - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new3(parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsLinearLayout4 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout4(orientation Orientation, parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer()) - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsLinearLayout) SetOrientation(orientation Orientation) { @@ -147,8 +181,8 @@ func (this *QGraphicsLinearLayout) Invalidate() { C.QGraphicsLinearLayout_Invalidate(this.h) } -func (this *QGraphicsLinearLayout) SizeHint(which SizeHint) *QSizeF { - _ret := C.QGraphicsLinearLayout_SizeHint(this.h, (C.int)(which)) +func (this *QGraphicsLinearLayout) SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + _ret := C.QGraphicsLinearLayout_SizeHint(this.h, (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -166,20 +200,227 @@ func (this *QGraphicsLinearLayout) InsertStretch2(index int, stretch int) { C.QGraphicsLinearLayout_InsertStretch2(this.h, (C.int)(index), (C.int)(stretch)) } -func (this *QGraphicsLinearLayout) SizeHint2(which SizeHint, constraint *QSizeF) *QSizeF { - _ret := C.QGraphicsLinearLayout_SizeHint2(this.h, (C.int)(which), constraint.cPointer()) +func (this *QGraphicsLinearLayout) Dump1(indent int) { + C.QGraphicsLinearLayout_Dump1(this.h, (C.int)(indent)) +} + +func (this *QGraphicsLinearLayout) callVirtualBase_RemoveAt(index int) { + + C.QGraphicsLinearLayout_virtualbase_RemoveAt(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QGraphicsLinearLayout) OnRemoveAt(slot func(super func(index int), index int)) { + C.QGraphicsLinearLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_RemoveAt +func miqt_exec_callback_QGraphicsLinearLayout_RemoveAt(self *C.QGraphicsLinearLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_RemoveAt, slotval1) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsLinearLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsLinearLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsLinearLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_SetGeometry +func miqt_exec_callback_QGraphicsLinearLayout_SetGeometry(self *C.QGraphicsLinearLayout, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_Count() int { + + return (int)(C.QGraphicsLinearLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsLinearLayout) OnCount(slot func(super func() int) int) { + C.QGraphicsLinearLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_Count +func miqt_exec_callback_QGraphicsLinearLayout_Count(self *C.QGraphicsLinearLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_ItemAt(index int) *QGraphicsLayoutItem { + + return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsLinearLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGraphicsLinearLayout) OnItemAt(slot func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) { + C.QGraphicsLinearLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_ItemAt +func miqt_exec_callback_QGraphicsLinearLayout_ItemAt(self *C.QGraphicsLinearLayout, cb C.intptr_t, index C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_Invalidate() { + + C.QGraphicsLinearLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLinearLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsLinearLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_Invalidate +func miqt_exec_callback_QGraphicsLinearLayout_Invalidate(self *C.QGraphicsLinearLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsLinearLayout_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsLinearLayout) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsLinearLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsLinearLayout) Dump1(indent int) { - C.QGraphicsLinearLayout_Dump1(this.h, (C.int)(indent)) +//export miqt_exec_callback_QGraphicsLinearLayout_SizeHint +func miqt_exec_callback_QGraphicsLinearLayout_SizeHint(self *C.QGraphicsLinearLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsLinearLayout_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsLinearLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsLinearLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsLinearLayout_GetContentsMargins(self *C.QGraphicsLinearLayout, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsLinearLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLinearLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsLinearLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsLinearLayout_UpdateGeometry(self *C.QGraphicsLinearLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsLinearLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsLinearLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsLinearLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_WidgetEvent +func miqt_exec_callback_QGraphicsLinearLayout_WidgetEvent(self *C.QGraphicsLinearLayout, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + } // Delete this object from C++ memory. func (this *QGraphicsLinearLayout) Delete() { - C.QGraphicsLinearLayout_Delete(this.h) + C.QGraphicsLinearLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicslinearlayout.h b/qt/gen_qgraphicslinearlayout.h index 82c50d8f..43e17b2d 100644 --- a/qt/gen_qgraphicslinearlayout.h +++ b/qt/gen_qgraphicslinearlayout.h @@ -15,21 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QGraphicsLayout; class QGraphicsLayoutItem; class QGraphicsLinearLayout; class QRectF; class QSizeF; #else +typedef struct QEvent QEvent; +typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; typedef struct QGraphicsLinearLayout QGraphicsLinearLayout; typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -QGraphicsLinearLayout* QGraphicsLinearLayout_new(); -QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation); -QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent); -QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent); +void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation); int QGraphicsLinearLayout_Orientation(const QGraphicsLinearLayout* self); void QGraphicsLinearLayout_AddItem(QGraphicsLinearLayout* self, QGraphicsLayoutItem* item); @@ -50,13 +54,30 @@ void QGraphicsLinearLayout_SetGeometry(QGraphicsLinearLayout* self, QRectF* rect int QGraphicsLinearLayout_Count(const QGraphicsLinearLayout* self); QGraphicsLayoutItem* QGraphicsLinearLayout_ItemAt(const QGraphicsLinearLayout* self, int index); void QGraphicsLinearLayout_Invalidate(QGraphicsLinearLayout* self); -QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which); +QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which, QSizeF* constraint); void QGraphicsLinearLayout_Dump(const QGraphicsLinearLayout* self); void QGraphicsLinearLayout_AddStretch1(QGraphicsLinearLayout* self, int stretch); void QGraphicsLinearLayout_InsertStretch2(QGraphicsLinearLayout* self, int index, int stretch); -QSizeF* QGraphicsLinearLayout_SizeHint2(const QGraphicsLinearLayout* self, int which, QSizeF* constraint); void QGraphicsLinearLayout_Dump1(const QGraphicsLinearLayout* self, int indent); -void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self); +void QGraphicsLinearLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsLinearLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsLinearLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsLinearLayout_virtualbase_Count(const void* self); +void QGraphicsLinearLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsLinearLayout_virtualbase_ItemAt(const void* self, int index); +void QGraphicsLinearLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_Invalidate(void* self); +void QGraphicsLinearLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsLinearLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsLinearLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsLinearLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsLinearLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsproxywidget.cpp b/qt/gen_qgraphicsproxywidget.cpp index 04a211e7..13af69dd 100644 --- a/qt/gen_qgraphicsproxywidget.cpp +++ b/qt/gen_qgraphicsproxywidget.cpp @@ -1,27 +1,1250 @@ +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include +#include +#include #include #include #include +#include #include +#include #include #include #include "gen_qgraphicsproxywidget.h" #include "_cgo_export.h" -QGraphicsProxyWidget* QGraphicsProxyWidget_new() { - return new QGraphicsProxyWidget(); +class MiqtVirtualQGraphicsProxyWidget : public virtual QGraphicsProxyWidget { +public: + + MiqtVirtualQGraphicsProxyWidget(): QGraphicsProxyWidget() {}; + MiqtVirtualQGraphicsProxyWidget(QGraphicsItem* parent): QGraphicsProxyWidget(parent) {}; + MiqtVirtualQGraphicsProxyWidget(QGraphicsItem* parent, Qt::WindowFlags wFlags): QGraphicsProxyWidget(parent, wFlags) {}; + + virtual ~MiqtVirtualQGraphicsProxyWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsProxyWidget::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsProxyWidget_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsProxyWidget::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsProxyWidget::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsProxyWidget_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsProxyWidget::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsProxyWidget::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsProxyWidget::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsProxyWidget::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsProxyWidget::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsProxyWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsProxyWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGraphicsProxyWidget::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QGraphicsProxyWidget::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsProxyWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsProxyWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGraphicsProxyWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGraphicsProxyWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsProxyWidget::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsProxyWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsProxyWidget::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsProxyWidget::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsProxyWidget::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsProxyWidget::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsProxyWidget::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsProxyWidget::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsProxyWidget::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsProxyWidget::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsProxyWidget::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsProxyWidget::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabMouseEvent(QEvent* event) override { + if (handle__GrabMouseEvent == 0) { + QGraphicsProxyWidget::grabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_GrabMouseEvent(this, handle__GrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabMouseEvent(QEvent* event) { + + QGraphicsProxyWidget::grabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabMouseEvent(QEvent* event) override { + if (handle__UngrabMouseEvent == 0) { + QGraphicsProxyWidget::ungrabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_UngrabMouseEvent(this, handle__UngrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabMouseEvent(QEvent* event) { + + QGraphicsProxyWidget::ungrabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsProxyWidget::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsProxyWidget::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsProxyWidget::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsProxyWidget::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsProxyWidget::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsProxyWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsProxyWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsProxyWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsProxyWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsProxyWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsProxyWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsProxyWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsProxyWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsProxyWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsProxyWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsProxyWidget::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsProxyWidget::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsProxyWidget::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsProxyWidget::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsProxyWidget::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsProxyWidget::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsProxyWidget::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QGraphicsSceneResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsProxyWidget::resizeEvent(event); + return; + } + + QGraphicsSceneResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QGraphicsSceneResizeEvent* event) { + + QGraphicsProxyWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsProxyWidget::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsProxyWidget_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsProxyWidget::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintWindowFrame = 0; + + // Subclass to allow providing a Go implementation + virtual void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__PaintWindowFrame == 0) { + QGraphicsProxyWidget::paintWindowFrame(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame(this, handle__PaintWindowFrame, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintWindowFrame(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsProxyWidget::paintWindowFrame(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsProxyWidget::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsProxyWidget::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsProxyWidget::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsProxyWidget::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOption* option) const override { + if (handle__InitStyleOption == 0) { + QGraphicsProxyWidget::initStyleOption(option); + return; + } + + QStyleOption* sigval1 = option; + + miqt_exec_callback_QGraphicsProxyWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOption* option) const { + + QGraphicsProxyWidget::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsProxyWidget::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsProxyWidget_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsProxyWidget::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PropertyChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant propertyChange(const QString& propertyName, const QVariant& value) override { + if (handle__PropertyChange == 0) { + return QGraphicsProxyWidget::propertyChange(propertyName, value); + } + + const QString propertyName_ret = propertyName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray propertyName_b = propertyName_ret.toUtf8(); + struct miqt_string propertyName_ms; + propertyName_ms.len = propertyName_b.length(); + propertyName_ms.data = static_cast(malloc(propertyName_ms.len)); + memcpy(propertyName_ms.data, propertyName_b.data(), propertyName_ms.len); + struct miqt_string sigval1 = propertyName_ms; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_PropertyChange(this, handle__PropertyChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_PropertyChange(struct miqt_string propertyName, QVariant* value) { + QString propertyName_QString = QString::fromUtf8(propertyName.data, propertyName.len); + + return new QVariant(QGraphicsProxyWidget::propertyChange(propertyName_QString, *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsProxyWidget::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsProxyWidget::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool windowFrameEvent(QEvent* e) override { + if (handle__WindowFrameEvent == 0) { + return QGraphicsProxyWidget::windowFrameEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_WindowFrameEvent(this, handle__WindowFrameEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WindowFrameEvent(QEvent* e) { + + return QGraphicsProxyWidget::windowFrameEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameSectionAt = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const override { + if (handle__WindowFrameSectionAt == 0) { + return QGraphicsProxyWidget::windowFrameSectionAt(pos); + } + + const QPointF& pos_ret = pos; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&pos_ret); + + int callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_WindowFrameSectionAt(const_cast(this), handle__WindowFrameSectionAt, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_WindowFrameSectionAt(QPointF* pos) const { + + Qt::WindowFrameSection _ret = QGraphicsProxyWidget::windowFrameSectionAt(*pos); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGraphicsProxyWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGraphicsProxyWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGraphicsProxyWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGraphicsProxyWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QGraphicsSceneMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGraphicsProxyWidget::moveEvent(event); + return; + } + + QGraphicsSceneMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QGraphicsSceneMoveEvent* event) { + + QGraphicsProxyWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void polishEvent() override { + if (handle__PolishEvent == 0) { + QGraphicsProxyWidget::polishEvent(); + return; + } + + + miqt_exec_callback_QGraphicsProxyWidget_PolishEvent(this, handle__PolishEvent); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishEvent() { + + QGraphicsProxyWidget::polishEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabKeyboardEvent(QEvent* event) override { + if (handle__GrabKeyboardEvent == 0) { + QGraphicsProxyWidget::grabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_GrabKeyboardEvent(this, handle__GrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabKeyboardEvent(QEvent* event) { + + QGraphicsProxyWidget::grabKeyboardEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabKeyboardEvent(QEvent* event) override { + if (handle__UngrabKeyboardEvent == 0) { + QGraphicsProxyWidget::ungrabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_UngrabKeyboardEvent(this, handle__UngrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabKeyboardEvent(QEvent* event) { + + QGraphicsProxyWidget::ungrabKeyboardEvent(event); + + } + +}; + +void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(); + *outptr_QGraphicsProxyWidget = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent) { - return new QGraphicsProxyWidget(parent); +void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent); + *outptr_QGraphicsProxyWidget = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags) { - return new QGraphicsProxyWidget(parent, static_cast(wFlags)); +void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent, static_cast(wFlags)); + *outptr_QGraphicsProxyWidget = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self) { @@ -126,7 +1349,395 @@ struct miqt_string QGraphicsProxyWidget_TrUtf83(const char* s, const char* c, in return _ms; } -void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self) { - delete self; +void QGraphicsProxyWidget_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsProxyWidget_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsProxyWidget_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Paint = slot; +} + +void QGraphicsProxyWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsProxyWidget_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Type = slot; +} + +int QGraphicsProxyWidget_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Type(); +} + +void QGraphicsProxyWidget_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsProxyWidget_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsProxyWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Event = slot; +} + +bool QGraphicsProxyWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Event(event); +} + +void QGraphicsProxyWidget_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsProxyWidget_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_EventFilter(object, event); +} + +void QGraphicsProxyWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HideEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__GrabMouseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_GrabMouseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__UngrabMouseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_UngrabMouseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsProxyWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsProxyWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsProxyWidget_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsProxyWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsProxyWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsProxyWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsProxyWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsProxyWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__PaintWindowFrame = slot; +} + +void QGraphicsProxyWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_PaintWindowFrame(painter, option, widget); +} + +void QGraphicsProxyWidget_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsProxyWidget_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsProxyWidget_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsProxyWidget_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Shape(); +} + +void QGraphicsProxyWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QGraphicsProxyWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option) { + ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QGraphicsProxyWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsProxyWidget_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsProxyWidget_override_virtual_PropertyChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__PropertyChange = slot; +} + +QVariant* QGraphicsProxyWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_PropertyChange(propertyName, value); +} + +void QGraphicsProxyWidget_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsProxyWidget_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__WindowFrameEvent = slot; +} + +bool QGraphicsProxyWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_WindowFrameEvent(e); +} + +void QGraphicsProxyWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__WindowFrameSectionAt = slot; +} + +int QGraphicsProxyWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_WindowFrameSectionAt(pos); +} + +void QGraphicsProxyWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__CloseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_PolishEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__PolishEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_PolishEvent(void* self) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_PolishEvent(); +} + +void QGraphicsProxyWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__GrabKeyboardEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_GrabKeyboardEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__UngrabKeyboardEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_UngrabKeyboardEvent(event); +} + +void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsproxywidget.go b/qt/gen_qgraphicsproxywidget.go index c90f99cb..1469aed7 100644 --- a/qt/gen_qgraphicsproxywidget.go +++ b/qt/gen_qgraphicsproxywidget.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -20,7 +21,8 @@ const ( ) type QGraphicsProxyWidget struct { - h *C.QGraphicsProxyWidget + h *C.QGraphicsProxyWidget + isSubclass bool *QGraphicsWidget } @@ -38,33 +40,68 @@ func (this *QGraphicsProxyWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget) *QGraphicsProxyWidget { +// newQGraphicsProxyWidget constructs the type using only CGO pointers. +func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget, h_QGraphicsWidget *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsProxyWidget { if h == nil { return nil } - return &QGraphicsProxyWidget{h: h, QGraphicsWidget: UnsafeNewQGraphicsWidget(unsafe.Pointer(h))} + return &QGraphicsProxyWidget{h: h, + QGraphicsWidget: newQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget((*C.QGraphicsProxyWidget)(h)) +// UnsafeNewQGraphicsProxyWidget constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer, h_QGraphicsWidget unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsProxyWidget { + if h == nil { + return nil + } + + return &QGraphicsProxyWidget{h: (*C.QGraphicsProxyWidget)(h), + QGraphicsWidget: UnsafeNewQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} } // NewQGraphicsProxyWidget constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget() *QGraphicsProxyWidget { - ret := C.QGraphicsProxyWidget_new() - return newQGraphicsProxyWidget(ret) + var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsProxyWidget_new(&outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsProxyWidget2 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget2(parent *QGraphicsItem) *QGraphicsProxyWidget { - ret := C.QGraphicsProxyWidget_new2(parent.cPointer()) - return newQGraphicsProxyWidget(ret) + var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsProxyWidget_new2(parent.cPointer(), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsProxyWidget3 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsProxyWidget { - ret := C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags)) - return newQGraphicsProxyWidget(ret) + var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsProxyWidget) MetaObject() *QMetaObject { @@ -100,7 +137,7 @@ func (this *QGraphicsProxyWidget) SetWidget(widget *QWidget) { } func (this *QGraphicsProxyWidget) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsProxyWidget_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsProxyWidget_Widget(this.h)), nil, nil) } func (this *QGraphicsProxyWidget) SubWidgetRect(widget *QWidget) *QRectF { @@ -123,7 +160,7 @@ func (this *QGraphicsProxyWidget) Type() int { } func (this *QGraphicsProxyWidget) CreateProxyForChildWidget(child *QWidget) *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer()))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer())), nil, nil, nil, nil, nil) } func QGraphicsProxyWidget_Tr2(s string, c string) string { @@ -170,9 +207,1165 @@ func QGraphicsProxyWidget_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsProxyWidget) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsProxyWidget_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsProxyWidget_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_SetGeometry +func miqt_exec_callback_QGraphicsProxyWidget_SetGeometry(self *C.QGraphicsProxyWidget, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsProxyWidget_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsProxyWidget_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Paint +func miqt_exec_callback_QGraphicsProxyWidget_Paint(self *C.QGraphicsProxyWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Type() int { + + return (int)(C.QGraphicsProxyWidget_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsProxyWidget) OnType(slot func(super func() int) int) { + C.QGraphicsProxyWidget_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Type +func miqt_exec_callback_QGraphicsProxyWidget_Type(self *C.QGraphicsProxyWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsProxyWidget_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsProxyWidget_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ItemChange +func miqt_exec_callback_QGraphicsProxyWidget_ItemChange(self *C.QGraphicsProxyWidget, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Event +func miqt_exec_callback_QGraphicsProxyWidget_Event(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_EventFilter +func miqt_exec_callback_QGraphicsProxyWidget_EventFilter(self *C.QGraphicsProxyWidget, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGraphicsProxyWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGraphicsProxyWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ShowEvent +func miqt_exec_callback_QGraphicsProxyWidget_ShowEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QGraphicsProxyWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QGraphicsProxyWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HideEvent +func miqt_exec_callback_QGraphicsProxyWidget_HideEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsProxyWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsProxyWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent +func miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent +func miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent +func miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DropEvent +func miqt_exec_callback_QGraphicsProxyWidget_DropEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsProxyWidget_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsProxyWidget_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent +func miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsProxyWidget_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsProxyWidget_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent +func miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsProxyWidget_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsProxyWidget_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_GrabMouseEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_GrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnGrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_GrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_GrabMouseEvent +func miqt_exec_callback_QGraphicsProxyWidget_GrabMouseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_GrabMouseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_UngrabMouseEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_UngrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnUngrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_UngrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_UngrabMouseEvent +func miqt_exec_callback_QGraphicsProxyWidget_UngrabMouseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_UngrabMouseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent +func miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent +func miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsProxyWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsProxyWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_WheelEvent +func miqt_exec_callback_QGraphicsProxyWidget_WheelEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsProxyWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsProxyWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent +func miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsProxyWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsProxyWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent +func miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsProxyWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsProxyWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent +func miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsProxyWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsProxyWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent +func miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsProxyWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsProxyWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_FocusNextPrevChild +func miqt_exec_callback_QGraphicsProxyWidget_FocusNextPrevChild(self *C.QGraphicsProxyWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsProxyWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsProxyWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_InputMethodQuery +func miqt_exec_callback_QGraphicsProxyWidget_InputMethodQuery(self *C.QGraphicsProxyWidget, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsProxyWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsProxyWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent +func miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsProxyWidget_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsProxyWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_SizeHint +func miqt_exec_callback_QGraphicsProxyWidget_SizeHint(self *C.QGraphicsProxyWidget, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ResizeEvent(event *QGraphicsSceneResizeEvent) { + + C.QGraphicsProxyWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnResizeEvent(slot func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) { + C.QGraphicsProxyWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent +func miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsProxyWidget_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsProxyWidget) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsProxyWidget_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_GetContentsMargins +func miqt_exec_callback_QGraphicsProxyWidget_GetContentsMargins(self *C.QGraphicsProxyWidget, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsProxyWidget_virtualbase_PaintWindowFrame(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnPaintWindowFrame(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsProxyWidget_override_virtual_PaintWindowFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame +func miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame(self *C.QGraphicsProxyWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsProxyWidget_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsProxyWidget_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_BoundingRect +func miqt_exec_callback_QGraphicsProxyWidget_BoundingRect(self *C.QGraphicsProxyWidget, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsProxyWidget_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsProxyWidget_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Shape +func miqt_exec_callback_QGraphicsProxyWidget_Shape(self *C.QGraphicsProxyWidget, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_InitStyleOption(option *QStyleOption) { + + C.QGraphicsProxyWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnInitStyleOption(slot func(super func(option *QStyleOption), option *QStyleOption)) { + C.QGraphicsProxyWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_InitStyleOption +func miqt_exec_callback_QGraphicsProxyWidget_InitStyleOption(self *C.QGraphicsProxyWidget, cb C.intptr_t, option *C.QStyleOption) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOption), option *QStyleOption)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_UpdateGeometry() { + + C.QGraphicsProxyWidget_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsProxyWidget) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsProxyWidget_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_UpdateGeometry +func miqt_exec_callback_QGraphicsProxyWidget_UpdateGeometry(self *C.QGraphicsProxyWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_PropertyChange(propertyName string, value *QVariant) *QVariant { + propertyName_ms := C.struct_miqt_string{} + propertyName_ms.data = C.CString(propertyName) + propertyName_ms.len = C.size_t(len(propertyName)) + defer C.free(unsafe.Pointer(propertyName_ms.data)) + + _ret := C.QGraphicsProxyWidget_virtualbase_PropertyChange(unsafe.Pointer(this.h), propertyName_ms, value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnPropertyChange(slot func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) { + C.QGraphicsProxyWidget_override_virtual_PropertyChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_PropertyChange +func miqt_exec_callback_QGraphicsProxyWidget_PropertyChange(self *C.QGraphicsProxyWidget, cb C.intptr_t, propertyName C.struct_miqt_string, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var propertyName_ms C.struct_miqt_string = propertyName + propertyName_ret := C.GoStringN(propertyName_ms.data, C.int(int64(propertyName_ms.len))) + C.free(unsafe.Pointer(propertyName_ms.data)) + slotval1 := propertyName_ret + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PropertyChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_SceneEvent +func miqt_exec_callback_QGraphicsProxyWidget_SceneEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_WindowFrameEvent(e *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_WindowFrameEvent(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnWindowFrameEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_WindowFrameEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_WindowFrameEvent +func miqt_exec_callback_QGraphicsProxyWidget_WindowFrameEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WindowFrameEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_WindowFrameSectionAt(pos *QPointF) WindowFrameSection { + + return (WindowFrameSection)(C.QGraphicsProxyWidget_virtualbase_WindowFrameSectionAt(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnWindowFrameSectionAt(slot func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) { + C.QGraphicsProxyWidget_override_virtual_WindowFrameSectionAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_WindowFrameSectionAt +func miqt_exec_callback_QGraphicsProxyWidget_WindowFrameSectionAt(self *C.QGraphicsProxyWidget, cb C.intptr_t, pos *C.QPointF) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WindowFrameSectionAt, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ChangeEvent +func miqt_exec_callback_QGraphicsProxyWidget_ChangeEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QGraphicsProxyWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QGraphicsProxyWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_CloseEvent +func miqt_exec_callback_QGraphicsProxyWidget_CloseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MoveEvent(event *QGraphicsSceneMoveEvent) { + + C.QGraphicsProxyWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMoveEvent(slot func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) { + C.QGraphicsProxyWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_MoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_PolishEvent() { + + C.QGraphicsProxyWidget_virtualbase_PolishEvent(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsProxyWidget) OnPolishEvent(slot func(super func())) { + C.QGraphicsProxyWidget_override_virtual_PolishEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_PolishEvent +func miqt_exec_callback_QGraphicsProxyWidget_PolishEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PolishEvent) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_GrabKeyboardEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_GrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnGrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_GrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_GrabKeyboardEvent +func miqt_exec_callback_QGraphicsProxyWidget_GrabKeyboardEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_GrabKeyboardEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_UngrabKeyboardEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_UngrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnUngrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_UngrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_UngrabKeyboardEvent +func miqt_exec_callback_QGraphicsProxyWidget_UngrabKeyboardEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_UngrabKeyboardEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsProxyWidget) Delete() { - C.QGraphicsProxyWidget_Delete(this.h) + C.QGraphicsProxyWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsproxywidget.h b/qt/gen_qgraphicsproxywidget.h index e25deebb..c07da09a 100644 --- a/qt/gen_qgraphicsproxywidget.h +++ b/qt/gen_qgraphicsproxywidget.h @@ -15,26 +15,72 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QEvent; +class QFocusEvent; class QGraphicsItem; +class QGraphicsLayoutItem; +class QGraphicsObject; class QGraphicsProxyWidget; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneMoveEvent; +class QGraphicsSceneResizeEvent; +class QGraphicsSceneWheelEvent; +class QGraphicsWidget; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QObject; class QPainter; +class QPainterPath; +class QPointF; class QRectF; +class QShowEvent; +class QSizeF; +class QStyleOption; class QStyleOptionGraphicsItem; +class QVariant; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QGraphicsObject QGraphicsObject; typedef struct QGraphicsProxyWidget QGraphicsProxyWidget; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneMoveEvent QGraphicsSceneMoveEvent; +typedef struct QGraphicsSceneResizeEvent QGraphicsSceneResizeEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; +typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; +typedef struct QPainterPath QPainterPath; +typedef struct QPointF QPointF; typedef struct QRectF QRectF; +typedef struct QShowEvent QShowEvent; +typedef struct QSizeF QSizeF; +typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsProxyWidget* QGraphicsProxyWidget_new(); -QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent); -QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self); void* QGraphicsProxyWidget_Metacast(QGraphicsProxyWidget* self, const char* param1); struct miqt_string QGraphicsProxyWidget_Tr(const char* s); @@ -46,11 +92,136 @@ void QGraphicsProxyWidget_SetGeometry(QGraphicsProxyWidget* self, QRectF* rect); void QGraphicsProxyWidget_Paint(QGraphicsProxyWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); int QGraphicsProxyWidget_Type(const QGraphicsProxyWidget* self); QGraphicsProxyWidget* QGraphicsProxyWidget_CreateProxyForChildWidget(QGraphicsProxyWidget* self, QWidget* child); +QVariant* QGraphicsProxyWidget_ItemChange(QGraphicsProxyWidget* self, int change, QVariant* value); +bool QGraphicsProxyWidget_Event(QGraphicsProxyWidget* self, QEvent* event); +bool QGraphicsProxyWidget_EventFilter(QGraphicsProxyWidget* self, QObject* object, QEvent* event); +void QGraphicsProxyWidget_ShowEvent(QGraphicsProxyWidget* self, QShowEvent* event); +void QGraphicsProxyWidget_HideEvent(QGraphicsProxyWidget* self, QHideEvent* event); +void QGraphicsProxyWidget_ContextMenuEvent(QGraphicsProxyWidget* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsProxyWidget_DragEnterEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_DragLeaveEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_DragMoveEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_DropEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_HoverEnterEvent(QGraphicsProxyWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_HoverLeaveEvent(QGraphicsProxyWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_HoverMoveEvent(QGraphicsProxyWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_GrabMouseEvent(QGraphicsProxyWidget* self, QEvent* event); +void QGraphicsProxyWidget_UngrabMouseEvent(QGraphicsProxyWidget* self, QEvent* event); +void QGraphicsProxyWidget_MouseMoveEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_MousePressEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_MouseReleaseEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_MouseDoubleClickEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_WheelEvent(QGraphicsProxyWidget* self, QGraphicsSceneWheelEvent* event); +void QGraphicsProxyWidget_KeyPressEvent(QGraphicsProxyWidget* self, QKeyEvent* event); +void QGraphicsProxyWidget_KeyReleaseEvent(QGraphicsProxyWidget* self, QKeyEvent* event); +void QGraphicsProxyWidget_FocusInEvent(QGraphicsProxyWidget* self, QFocusEvent* event); +void QGraphicsProxyWidget_FocusOutEvent(QGraphicsProxyWidget* self, QFocusEvent* event); +bool QGraphicsProxyWidget_FocusNextPrevChild(QGraphicsProxyWidget* self, bool next); +QVariant* QGraphicsProxyWidget_InputMethodQuery(const QGraphicsProxyWidget* self, int query); +void QGraphicsProxyWidget_InputMethodEvent(QGraphicsProxyWidget* self, QInputMethodEvent* event); +QSizeF* QGraphicsProxyWidget_SizeHint(const QGraphicsProxyWidget* self, int which, QSizeF* constraint); +void QGraphicsProxyWidget_ResizeEvent(QGraphicsProxyWidget* self, QGraphicsSceneResizeEvent* event); struct miqt_string QGraphicsProxyWidget_Tr2(const char* s, const char* c); struct miqt_string QGraphicsProxyWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsProxyWidget_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsProxyWidget_TrUtf83(const char* s, const char* c, int n); -void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self); +void QGraphicsProxyWidget_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsProxyWidget_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsProxyWidget_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsProxyWidget_virtualbase_Type(const void* self); +void QGraphicsProxyWidget_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsProxyWidget_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsProxyWidget_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_Event(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QGraphicsProxyWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsProxyWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGraphicsProxyWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsProxyWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsProxyWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsProxyWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsProxyWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsProxyWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsProxyWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsProxyWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsProxyWidget_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsProxyWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsProxyWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsProxyWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsProxyWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event); +void QGraphicsProxyWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsProxyWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsProxyWidget_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsProxyWidget_virtualbase_BoundingRect(const void* self); +void QGraphicsProxyWidget_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsProxyWidget_virtualbase_Shape(const void* self); +void QGraphicsProxyWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option); +void QGraphicsProxyWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_UpdateGeometry(void* self); +void QGraphicsProxyWidget_override_virtual_PropertyChange(void* self, intptr_t slot); +QVariant* QGraphicsProxyWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value); +void QGraphicsProxyWidget_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e); +void QGraphicsProxyWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot); +int QGraphicsProxyWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos); +void QGraphicsProxyWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGraphicsProxyWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event); +void QGraphicsProxyWidget_override_virtual_PolishEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_PolishEvent(void* self); +void QGraphicsProxyWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsscene.cpp b/qt/gen_qgraphicsscene.cpp index 7c86d115..78eebd2c 100644 --- a/qt/gen_qgraphicsscene.cpp +++ b/qt/gen_qgraphicsscene.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -10,12 +12,20 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include +#include #include #include #include @@ -29,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -36,28 +47,687 @@ #include "gen_qgraphicsscene.h" #include "_cgo_export.h" -QGraphicsScene* QGraphicsScene_new() { - return new QGraphicsScene(); +class MiqtVirtualQGraphicsScene : public virtual QGraphicsScene { +public: + + MiqtVirtualQGraphicsScene(): QGraphicsScene() {}; + MiqtVirtualQGraphicsScene(const QRectF& sceneRect): QGraphicsScene(sceneRect) {}; + MiqtVirtualQGraphicsScene(qreal x, qreal y, qreal width, qreal height): QGraphicsScene(x, y, width, height) {}; + MiqtVirtualQGraphicsScene(QObject* parent): QGraphicsScene(parent) {}; + MiqtVirtualQGraphicsScene(const QRectF& sceneRect, QObject* parent): QGraphicsScene(sceneRect, parent) {}; + MiqtVirtualQGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject* parent): QGraphicsScene(x, y, width, height, parent) {}; + + virtual ~MiqtVirtualQGraphicsScene() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsScene::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsScene_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsScene::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsScene::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsScene_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsScene::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGraphicsScene::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsScene_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsScene::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsScene::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsScene::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsScene::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsScene::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsScene::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsScene::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsScene::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsScene::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsScene::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsScene::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HelpEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void helpEvent(QGraphicsSceneHelpEvent* event) override { + if (handle__HelpEvent == 0) { + QGraphicsScene::helpEvent(event); + return; + } + + QGraphicsSceneHelpEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_HelpEvent(this, handle__HelpEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HelpEvent(QGraphicsSceneHelpEvent* event) { + + QGraphicsScene::helpEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsScene::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsScene::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsScene::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsScene::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsScene::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsScene::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsScene::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsScene::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsScene::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsScene::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsScene::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsScene::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBackground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBackground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawBackground == 0) { + QGraphicsScene::drawBackground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsScene_DrawBackground(this, handle__DrawBackground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBackground(QPainter* painter, QRectF* rect) { + + QGraphicsScene::drawBackground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawForeground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawForeground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawForeground == 0) { + QGraphicsScene::drawForeground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsScene_DrawForeground(this, handle__DrawForeground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawForeground(QPainter* painter, QRectF* rect) { + + QGraphicsScene::drawForeground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGraphicsScene::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsScene::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGraphicsScene::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsScene::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QGraphicsScene::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsScene::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QGraphicsScene::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsScene_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsScene::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QGraphicsScene::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsScene_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsScene::disconnectNotify(*signal); + + } + +}; + +void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect) { - return new QGraphicsScene(*sceneRect); +void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height) { - return new QGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); +void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new4(QObject* parent) { - return new QGraphicsScene(parent); +void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(parent); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent) { - return new QGraphicsScene(*sceneRect, parent); +void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect, parent); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent) { - return new QGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); +void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self) { @@ -497,7 +1167,7 @@ void QGraphicsScene_Changed(QGraphicsScene* self, struct miqt_array /* of QRectF } void QGraphicsScene_connect_Changed(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast&)>(&QGraphicsScene::changed), self, [=](const QList& region) { + MiqtVirtualQGraphicsScene::connect(self, static_cast&)>(&QGraphicsScene::changed), self, [=](const QList& region) { const QList& region_ret = region; // Convert QList<> from C++ memory to manually-managed C memory QRectF** region_arr = static_cast(malloc(sizeof(QRectF*) * region_ret.length())); @@ -517,7 +1187,7 @@ void QGraphicsScene_SceneRectChanged(QGraphicsScene* self, QRectF* rect) { } void QGraphicsScene_connect_SceneRectChanged(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast(&QGraphicsScene::sceneRectChanged), self, [=](const QRectF& rect) { + MiqtVirtualQGraphicsScene::connect(self, static_cast(&QGraphicsScene::sceneRectChanged), self, [=](const QRectF& rect) { const QRectF& rect_ret = rect; // Cast returned reference into pointer QRectF* sigval1 = const_cast(&rect_ret); @@ -530,7 +1200,7 @@ void QGraphicsScene_SelectionChanged(QGraphicsScene* self) { } void QGraphicsScene_connect_SelectionChanged(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast(&QGraphicsScene::selectionChanged), self, [=]() { + MiqtVirtualQGraphicsScene::connect(self, static_cast(&QGraphicsScene::selectionChanged), self, [=]() { miqt_exec_callback_QGraphicsScene_SelectionChanged(slot); }); } @@ -540,7 +1210,7 @@ void QGraphicsScene_FocusItemChanged(QGraphicsScene* self, QGraphicsItem* newFoc } void QGraphicsScene_connect_FocusItemChanged(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast(&QGraphicsScene::focusItemChanged), self, [=](QGraphicsItem* newFocus, QGraphicsItem* oldFocus, Qt::FocusReason reason) { + MiqtVirtualQGraphicsScene::connect(self, static_cast(&QGraphicsScene::focusItemChanged), self, [=](QGraphicsItem* newFocus, QGraphicsItem* oldFocus, Qt::FocusReason reason) { QGraphicsItem* sigval1 = newFocus; QGraphicsItem* sigval2 = oldFocus; Qt::FocusReason reason_ret = reason; @@ -863,7 +1533,219 @@ void QGraphicsScene_Invalidate22(QGraphicsScene* self, QRectF* rect, int layers) self->invalidate(*rect, static_cast(layers)); } -void QGraphicsScene_Delete(QGraphicsScene* self) { - delete self; +void QGraphicsScene_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsScene_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsScene*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsScene_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__Event = slot; +} + +bool QGraphicsScene_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_Event(event); +} + +void QGraphicsScene_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsScene_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsScene_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsScene_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsScene_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsScene_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsScene_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsScene_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsScene_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsScene_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsScene_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsScene_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsScene_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsScene_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsScene_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsScene_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsScene_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__HelpEvent = slot; +} + +void QGraphicsScene_virtualbase_HelpEvent(void* self, QGraphicsSceneHelpEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_HelpEvent(event); +} + +void QGraphicsScene_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsScene_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsScene_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsScene_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsScene_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsScene_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsScene_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsScene_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsScene_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsScene_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsScene_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsScene_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsScene_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsScene_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsScene_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsScene_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsScene_override_virtual_DrawBackground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DrawBackground = slot; +} + +void QGraphicsScene_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DrawBackground(painter, rect); +} + +void QGraphicsScene_override_virtual_DrawForeground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DrawForeground = slot; +} + +void QGraphicsScene_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DrawForeground(painter, rect); +} + +void QGraphicsScene_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsScene_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsScene_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsScene_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsScene_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsScene_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsScene_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsScene_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsScene_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsScene_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGraphicsScene_Delete(QGraphicsScene* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsscene.go b/qt/gen_qgraphicsscene.go index 0d682b1a..a3ca6e3a 100644 --- a/qt/gen_qgraphicsscene.go +++ b/qt/gen_qgraphicsscene.go @@ -31,7 +31,8 @@ const ( ) type QGraphicsScene struct { - h *C.QGraphicsScene + h *C.QGraphicsScene + isSubclass bool *QObject } @@ -49,51 +50,89 @@ func (this *QGraphicsScene) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsScene(h *C.QGraphicsScene) *QGraphicsScene { +// newQGraphicsScene constructs the type using only CGO pointers. +func newQGraphicsScene(h *C.QGraphicsScene, h_QObject *C.QObject) *QGraphicsScene { if h == nil { return nil } - return &QGraphicsScene{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsScene{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsScene(h unsafe.Pointer) *QGraphicsScene { - return newQGraphicsScene((*C.QGraphicsScene)(h)) +// UnsafeNewQGraphicsScene constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsScene(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScene { + if h == nil { + return nil + } + + return &QGraphicsScene{h: (*C.QGraphicsScene)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQGraphicsScene constructs a new QGraphicsScene object. func NewQGraphicsScene() *QGraphicsScene { - ret := C.QGraphicsScene_new() - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new(&outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene2 constructs a new QGraphicsScene object. func NewQGraphicsScene2(sceneRect *QRectF) *QGraphicsScene { - ret := C.QGraphicsScene_new2(sceneRect.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new2(sceneRect.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene3 constructs a new QGraphicsScene object. func NewQGraphicsScene3(x float64, y float64, width float64, height float64) *QGraphicsScene { - ret := C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height)) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene4 constructs a new QGraphicsScene object. func NewQGraphicsScene4(parent *QObject) *QGraphicsScene { - ret := C.QGraphicsScene_new4(parent.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new4(parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene5 constructs a new QGraphicsScene object. func NewQGraphicsScene5(sceneRect *QRectF, parent *QObject) *QGraphicsScene { - ret := C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene6 constructs a new QGraphicsScene object. func NewQGraphicsScene6(x float64, y float64, width float64, height float64, parent *QObject) *QGraphicsScene { - ret := C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsScene) MetaObject() *QMetaObject { @@ -286,7 +325,7 @@ func (this *QGraphicsScene) CreateItemGroup(items []*QGraphicsItem) *QGraphicsIt items_CArray[i] = items[i].cPointer() } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsScene_CreateItemGroup(this.h, items_ma))) + return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsScene_CreateItemGroup(this.h, items_ma)), nil) } func (this *QGraphicsScene) DestroyItemGroup(group *QGraphicsItemGroup) { @@ -298,23 +337,23 @@ func (this *QGraphicsScene) AddItem(item *QGraphicsItem) { } func (this *QGraphicsScene) AddEllipse(rect *QRectF) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer())), nil, nil) } func (this *QGraphicsScene) AddLine(line *QLineF) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine(this.h, line.cPointer()))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine(this.h, line.cPointer())), nil) } func (this *QGraphicsScene) AddPath(path *QPainterPath) *QGraphicsPathItem { - return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath(this.h, path.cPointer()))) + return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath(this.h, path.cPointer())), nil, nil) } func (this *QGraphicsScene) AddPixmap(pixmap *QPixmap) *QGraphicsPixmapItem { - return UnsafeNewQGraphicsPixmapItem(unsafe.Pointer(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer()))) + return UnsafeNewQGraphicsPixmapItem(unsafe.Pointer(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer())), nil) } func (this *QGraphicsScene) AddRect(rect *QRectF) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect(this.h, rect.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect(this.h, rect.cPointer())), nil, nil) } func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { @@ -322,7 +361,7 @@ func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText(this.h, text_ms))) + return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText(this.h, text_ms)), nil, nil, nil) } func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem { @@ -330,23 +369,23 @@ func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText(this.h, text_ms))) + return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText(this.h, text_ms)), nil, nil) } func (this *QGraphicsScene) AddWidget(widget *QWidget) *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget(this.h, widget.cPointer()))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget(this.h, widget.cPointer())), nil, nil, nil, nil, nil) } func (this *QGraphicsScene) AddEllipse2(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))), nil, nil) } func (this *QGraphicsScene) AddLine2(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))), nil) } func (this *QGraphicsScene) AddRect2(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))), nil, nil) } func (this *QGraphicsScene) RemoveItem(item *QGraphicsItem) { @@ -419,7 +458,7 @@ func (this *QGraphicsScene) Views() []*QGraphicsView { _ret := make([]*QGraphicsView, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsView)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGraphicsView(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGraphicsView(unsafe.Pointer(_outCast[i]), nil, nil, nil, nil, nil) } return _ret } @@ -433,7 +472,7 @@ func (this *QGraphicsScene) Invalidate(x float64, y float64, w float64, h float6 } func (this *QGraphicsScene) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsScene_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsScene_Style(this.h)), nil) } func (this *QGraphicsScene) SetStyle(style *QStyle) { @@ -475,7 +514,7 @@ func (this *QGraphicsScene) SetActivePanel(item *QGraphicsItem) { } func (this *QGraphicsScene) ActiveWindow() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsScene_ActiveWindow(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsScene_ActiveWindow(this.h)), nil, nil, nil, nil) } func (this *QGraphicsScene) SetActiveWindow(widget *QGraphicsWidget) { @@ -809,31 +848,31 @@ func (this *QGraphicsScene) SetSelectionArea4(path *QPainterPath, selectionOpera } func (this *QGraphicsScene) AddEllipse22(rect *QRectF, pen *QPen) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddEllipse3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddLine22(line *QLineF, pen *QPen) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer())), nil) } func (this *QGraphicsScene) AddPath2(path *QPainterPath, pen *QPen) *QGraphicsPathItem { - return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddPath3(path *QPainterPath, pen *QPen, brush *QBrush) *QGraphicsPathItem { - return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddRect22(rect *QRectF, pen *QPen) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddRect3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextItem { @@ -841,7 +880,7 @@ func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextIte text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer()))) + return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer())), nil, nil, nil) } func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsSimpleTextItem { @@ -849,31 +888,31 @@ func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsS text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer()))) + return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer())), nil, nil) } func (this *QGraphicsScene) AddWidget2(widget *QWidget, wFlags WindowType) *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags)))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags))), nil, nil, nil, nil, nil) } func (this *QGraphicsScene) AddEllipse5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddEllipse6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddLine5(x1 float64, y1 float64, x2 float64, y2 float64, pen *QPen) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer()))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer())), nil) } func (this *QGraphicsScene) AddRect5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddRect6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) SetFocusItem2(item *QGraphicsItem, focusReason FocusReason) { @@ -900,9 +939,619 @@ func (this *QGraphicsScene) Invalidate22(rect *QRectF, layers QGraphicsScene__Sc C.QGraphicsScene_Invalidate22(this.h, rect.cPointer(), (C.int)(layers)) } +func (this *QGraphicsScene) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsScene_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsScene) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsScene_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_InputMethodQuery +func miqt_exec_callback_QGraphicsScene_InputMethodQuery(self *C.QGraphicsScene, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsScene) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsScene_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsScene) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsScene_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_Event +func miqt_exec_callback_QGraphicsScene_Event(self *C.QGraphicsScene, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsScene) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsScene_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsScene) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsScene_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_EventFilter +func miqt_exec_callback_QGraphicsScene_EventFilter(self *C.QGraphicsScene, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsScene) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsScene_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsScene_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_ContextMenuEvent +func miqt_exec_callback_QGraphicsScene_ContextMenuEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DragEnterEvent +func miqt_exec_callback_QGraphicsScene_DragEnterEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DragMoveEvent +func miqt_exec_callback_QGraphicsScene_DragMoveEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DragLeaveEvent +func miqt_exec_callback_QGraphicsScene_DragLeaveEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DropEvent +func miqt_exec_callback_QGraphicsScene_DropEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsScene_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsScene_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_FocusInEvent +func miqt_exec_callback_QGraphicsScene_FocusInEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsScene_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsScene_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_FocusOutEvent +func miqt_exec_callback_QGraphicsScene_FocusOutEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_HelpEvent(event *QGraphicsSceneHelpEvent) { + + C.QGraphicsScene_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnHelpEvent(slot func(super func(event *QGraphicsSceneHelpEvent), event *QGraphicsSceneHelpEvent)) { + C.QGraphicsScene_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_HelpEvent +func miqt_exec_callback_QGraphicsScene_HelpEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneHelpEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHelpEvent), event *QGraphicsSceneHelpEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHelpEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_HelpEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsScene_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsScene_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_KeyPressEvent +func miqt_exec_callback_QGraphicsScene_KeyPressEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsScene_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsScene_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_KeyReleaseEvent +func miqt_exec_callback_QGraphicsScene_KeyReleaseEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MousePressEvent +func miqt_exec_callback_QGraphicsScene_MousePressEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MouseMoveEvent +func miqt_exec_callback_QGraphicsScene_MouseMoveEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MouseReleaseEvent +func miqt_exec_callback_QGraphicsScene_MouseReleaseEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsScene_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsScene_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_WheelEvent +func miqt_exec_callback_QGraphicsScene_WheelEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsScene_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsScene_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_InputMethodEvent +func miqt_exec_callback_QGraphicsScene_InputMethodEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DrawBackground(painter *QPainter, rect *QRectF) { + + C.QGraphicsScene_virtualbase_DrawBackground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsScene) OnDrawBackground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsScene_override_virtual_DrawBackground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DrawBackground +func miqt_exec_callback_QGraphicsScene_DrawBackground(self *C.QGraphicsScene, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DrawBackground, slotval1, slotval2) + +} + +func (this *QGraphicsScene) callVirtualBase_DrawForeground(painter *QPainter, rect *QRectF) { + + C.QGraphicsScene_virtualbase_DrawForeground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsScene) OnDrawForeground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsScene_override_virtual_DrawForeground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DrawForeground +func miqt_exec_callback_QGraphicsScene_DrawForeground(self *C.QGraphicsScene, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DrawForeground, slotval1, slotval2) + +} + +func (this *QGraphicsScene) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsScene_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsScene_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_TimerEvent +func miqt_exec_callback_QGraphicsScene_TimerEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsScene_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsScene_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_ChildEvent +func miqt_exec_callback_QGraphicsScene_ChildEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsScene_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsScene_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_CustomEvent +func miqt_exec_callback_QGraphicsScene_CustomEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsScene_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsScene) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsScene_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_ConnectNotify +func miqt_exec_callback_QGraphicsScene_ConnectNotify(self *C.QGraphicsScene, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsScene_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsScene) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsScene_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DisconnectNotify +func miqt_exec_callback_QGraphicsScene_DisconnectNotify(self *C.QGraphicsScene, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsScene) Delete() { - C.QGraphicsScene_Delete(this.h) + C.QGraphicsScene_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsscene.h b/qt/gen_qgraphicsscene.h index 827a3f9d..e5236615 100644 --- a/qt/gen_qgraphicsscene.h +++ b/qt/gen_qgraphicsscene.h @@ -16,7 +16,9 @@ extern "C" { #ifdef __cplusplus class QBrush; +class QChildEvent; class QEvent; +class QFocusEvent; class QFont; class QGraphicsEllipseItem; class QGraphicsItem; @@ -27,11 +29,19 @@ class QGraphicsPixmapItem; class QGraphicsProxyWidget; class QGraphicsRectItem; class QGraphicsScene; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHelpEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneWheelEvent; class QGraphicsSimpleTextItem; class QGraphicsTextItem; class QGraphicsView; class QGraphicsWidget; +class QInputMethodEvent; +class QKeyEvent; class QLineF; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; @@ -42,12 +52,15 @@ class QPixmap; class QPointF; class QRectF; class QStyle; +class QTimerEvent; class QTransform; class QVariant; class QWidget; #else typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QGraphicsEllipseItem QGraphicsEllipseItem; typedef struct QGraphicsItem QGraphicsItem; @@ -58,11 +71,19 @@ typedef struct QGraphicsPixmapItem QGraphicsPixmapItem; typedef struct QGraphicsProxyWidget QGraphicsProxyWidget; typedef struct QGraphicsRectItem QGraphicsRectItem; typedef struct QGraphicsScene QGraphicsScene; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHelpEvent QGraphicsSceneHelpEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; typedef struct QGraphicsSimpleTextItem QGraphicsSimpleTextItem; typedef struct QGraphicsTextItem QGraphicsTextItem; typedef struct QGraphicsView QGraphicsView; typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineF QLineF; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; @@ -73,17 +94,18 @@ typedef struct QPixmap QPixmap; typedef struct QPointF QPointF; typedef struct QRectF QRectF; typedef struct QStyle QStyle; +typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsScene* QGraphicsScene_new(); -QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect); -QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height); -QGraphicsScene* QGraphicsScene_new4(QObject* parent); -QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent); -QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent); +void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self); void* QGraphicsScene_Metacast(QGraphicsScene* self, const char* param1); struct miqt_string QGraphicsScene_Tr(const char* s); @@ -166,6 +188,26 @@ void QGraphicsScene_Invalidate2(QGraphicsScene* self); void QGraphicsScene_Advance(QGraphicsScene* self); void QGraphicsScene_ClearSelection(QGraphicsScene* self); void QGraphicsScene_Clear(QGraphicsScene* self); +bool QGraphicsScene_Event(QGraphicsScene* self, QEvent* event); +bool QGraphicsScene_EventFilter(QGraphicsScene* self, QObject* watched, QEvent* event); +void QGraphicsScene_ContextMenuEvent(QGraphicsScene* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsScene_DragEnterEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_DragMoveEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_DragLeaveEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_DropEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_FocusInEvent(QGraphicsScene* self, QFocusEvent* event); +void QGraphicsScene_FocusOutEvent(QGraphicsScene* self, QFocusEvent* event); +void QGraphicsScene_HelpEvent(QGraphicsScene* self, QGraphicsSceneHelpEvent* event); +void QGraphicsScene_KeyPressEvent(QGraphicsScene* self, QKeyEvent* event); +void QGraphicsScene_KeyReleaseEvent(QGraphicsScene* self, QKeyEvent* event); +void QGraphicsScene_MousePressEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_MouseMoveEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_MouseReleaseEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_MouseDoubleClickEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_WheelEvent(QGraphicsScene* self, QGraphicsSceneWheelEvent* event); +void QGraphicsScene_InputMethodEvent(QGraphicsScene* self, QInputMethodEvent* event); +void QGraphicsScene_DrawBackground(QGraphicsScene* self, QPainter* painter, QRectF* rect); +void QGraphicsScene_DrawForeground(QGraphicsScene* self, QPainter* painter, QRectF* rect); void QGraphicsScene_Changed(QGraphicsScene* self, struct miqt_array /* of QRectF* */ region); void QGraphicsScene_connect_Changed(QGraphicsScene* self, intptr_t slot); void QGraphicsScene_SceneRectChanged(QGraphicsScene* self, QRectF* rect); @@ -218,7 +260,59 @@ void QGraphicsScene_Invalidate5(QGraphicsScene* self, double x, double y, double void QGraphicsScene_Update1(QGraphicsScene* self, QRectF* rect); void QGraphicsScene_Invalidate1(QGraphicsScene* self, QRectF* rect); void QGraphicsScene_Invalidate22(QGraphicsScene* self, QRectF* rect, int layers); -void QGraphicsScene_Delete(QGraphicsScene* self); +void QGraphicsScene_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsScene_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsScene_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsScene_virtualbase_Event(void* self, QEvent* event); +void QGraphicsScene_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsScene_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsScene_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsScene_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsScene_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsScene_override_virtual_HelpEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_HelpEvent(void* self, QGraphicsSceneHelpEvent* event); +void QGraphicsScene_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsScene_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsScene_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsScene_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsScene_override_virtual_DrawBackground(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsScene_override_virtual_DrawForeground(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsScene_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsScene_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsScene_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsScene_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsScene_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGraphicsScene_Delete(QGraphicsScene* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicssceneevent.cpp b/qt/gen_qgraphicssceneevent.cpp index 6c836da8..95318930 100644 --- a/qt/gen_qgraphicssceneevent.cpp +++ b/qt/gen_qgraphicssceneevent.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -16,8 +17,10 @@ #include "gen_qgraphicssceneevent.h" #include "_cgo_export.h" -QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal) { - return new QGraphicsSceneEvent(static_cast(typeVal)); +void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneEvent* ret = new QGraphicsSceneEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneEvent = ret; + *outptr_QEvent = static_cast(ret); } QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self) { @@ -28,16 +31,26 @@ void QGraphicsSceneEvent_SetWidget(QGraphicsSceneEvent* self, QWidget* widget) { self->setWidget(widget); } -void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self) { - delete self; +void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new() { - return new QGraphicsSceneMouseEvent(); +void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(); + *outptr_QGraphicsSceneMouseEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal) { - return new QGraphicsSceneMouseEvent(static_cast(typeVal)); +void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneMouseEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self) { @@ -157,16 +170,26 @@ void QGraphicsSceneMouseEvent_SetFlags(QGraphicsSceneMouseEvent* self, int flags self->setFlags(static_cast(flags)); } -void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self) { - delete self; +void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new() { - return new QGraphicsSceneWheelEvent(); +void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(); + *outptr_QGraphicsSceneWheelEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal) { - return new QGraphicsSceneWheelEvent(static_cast(typeVal)); +void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneWheelEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self) { @@ -228,16 +251,26 @@ void QGraphicsSceneWheelEvent_SetOrientation(QGraphicsSceneWheelEvent* self, int self->setOrientation(static_cast(orientation)); } -void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self) { - delete self; +void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new() { - return new QGraphicsSceneContextMenuEvent(); +void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(); + *outptr_QGraphicsSceneContextMenuEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal) { - return new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); +void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneContextMenuEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self) { @@ -282,16 +315,26 @@ void QGraphicsSceneContextMenuEvent_SetReason(QGraphicsSceneContextMenuEvent* se self->setReason(static_cast(reason)); } -void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self) { - delete self; +void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new() { - return new QGraphicsSceneHoverEvent(); +void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(); + *outptr_QGraphicsSceneHoverEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal) { - return new QGraphicsSceneHoverEvent(static_cast(typeVal)); +void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneHoverEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self) { @@ -351,16 +394,26 @@ void QGraphicsSceneHoverEvent_SetModifiers(QGraphicsSceneHoverEvent* self, int m self->setModifiers(static_cast(modifiers)); } -void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self) { - delete self; +void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new() { - return new QGraphicsSceneHelpEvent(); +void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(); + *outptr_QGraphicsSceneHelpEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal) { - return new QGraphicsSceneHelpEvent(static_cast(typeVal)); +void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneHelpEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self) { @@ -379,16 +432,26 @@ void QGraphicsSceneHelpEvent_SetScreenPos(QGraphicsSceneHelpEvent* self, QPoint* self->setScreenPos(*pos); } -void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self) { - delete self; +void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new() { - return new QGraphicsSceneDragDropEvent(); +void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(); + *outptr_QGraphicsSceneDragDropEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal) { - return new QGraphicsSceneDragDropEvent(static_cast(typeVal)); +void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneDragDropEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self) { @@ -480,12 +543,19 @@ void QGraphicsSceneDragDropEvent_SetMimeData(QGraphicsSceneDragDropEvent* self, self->setMimeData(data); } -void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self) { - delete self; +void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new() { - return new QGraphicsSceneResizeEvent(); +void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneResizeEvent* ret = new QGraphicsSceneResizeEvent(); + *outptr_QGraphicsSceneResizeEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self) { @@ -504,12 +574,19 @@ void QGraphicsSceneResizeEvent_SetNewSize(QGraphicsSceneResizeEvent* self, QSize self->setNewSize(*size); } -void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self) { - delete self; +void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new() { - return new QGraphicsSceneMoveEvent(); +void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneMoveEvent* ret = new QGraphicsSceneMoveEvent(); + *outptr_QGraphicsSceneMoveEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self) { @@ -528,7 +605,11 @@ void QGraphicsSceneMoveEvent_SetNewPos(QGraphicsSceneMoveEvent* self, QPointF* p self->setNewPos(*pos); } -void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self) { - delete self; +void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicssceneevent.go b/qt/gen_qgraphicssceneevent.go index a6c1f76b..07f7b37b 100644 --- a/qt/gen_qgraphicssceneevent.go +++ b/qt/gen_qgraphicssceneevent.go @@ -22,7 +22,8 @@ const ( ) type QGraphicsSceneEvent struct { - h *C.QGraphicsSceneEvent + h *C.QGraphicsSceneEvent + isSubclass bool *QEvent } @@ -40,25 +41,38 @@ func (this *QGraphicsSceneEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent) *QGraphicsSceneEvent { +// newQGraphicsSceneEvent constructs the type using only CGO pointers. +func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneEvent { if h == nil { return nil } - return &QGraphicsSceneEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QGraphicsSceneEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer) *QGraphicsSceneEvent { - return newQGraphicsSceneEvent((*C.QGraphicsSceneEvent)(h)) +// UnsafeNewQGraphicsSceneEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneEvent{h: (*C.QGraphicsSceneEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQGraphicsSceneEvent constructs a new QGraphicsSceneEvent object. func NewQGraphicsSceneEvent(typeVal QEvent__Type) *QGraphicsSceneEvent { - ret := C.QGraphicsSceneEvent_new((C.int)(typeVal)) - return newQGraphicsSceneEvent(ret) + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneEvent_new((C.int)(typeVal), &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneEvent) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneEvent_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneEvent_Widget(this.h)), nil, nil) } func (this *QGraphicsSceneEvent) SetWidget(widget *QWidget) { @@ -67,7 +81,7 @@ func (this *QGraphicsSceneEvent) SetWidget(widget *QWidget) { // Delete this object from C++ memory. func (this *QGraphicsSceneEvent) Delete() { - C.QGraphicsSceneEvent_Delete(this.h) + C.QGraphicsSceneEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -80,7 +94,8 @@ func (this *QGraphicsSceneEvent) GoGC() { } type QGraphicsSceneMouseEvent struct { - h *C.QGraphicsSceneMouseEvent + h *C.QGraphicsSceneMouseEvent + isSubclass bool *QGraphicsSceneEvent } @@ -98,27 +113,47 @@ func (this *QGraphicsSceneMouseEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent) *QGraphicsSceneMouseEvent { +// newQGraphicsSceneMouseEvent constructs the type using only CGO pointers. +func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMouseEvent { if h == nil { return nil } - return &QGraphicsSceneMouseEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneMouseEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer) *QGraphicsSceneMouseEvent { - return newQGraphicsSceneMouseEvent((*C.QGraphicsSceneMouseEvent)(h)) +// UnsafeNewQGraphicsSceneMouseEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMouseEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneMouseEvent{h: (*C.QGraphicsSceneMouseEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneMouseEvent constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent() *QGraphicsSceneMouseEvent { - ret := C.QGraphicsSceneMouseEvent_new() - return newQGraphicsSceneMouseEvent(ret) + var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneMouseEvent_new(&outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneMouseEvent2 constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent2(typeVal QEvent__Type) *QGraphicsSceneMouseEvent { - ret := C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneMouseEvent(ret) + var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneMouseEvent) Pos() *QPointF { @@ -262,7 +297,7 @@ func (this *QGraphicsSceneMouseEvent) SetFlags(flags MouseEventFlag) { // Delete this object from C++ memory. func (this *QGraphicsSceneMouseEvent) Delete() { - C.QGraphicsSceneMouseEvent_Delete(this.h) + C.QGraphicsSceneMouseEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -275,7 +310,8 @@ func (this *QGraphicsSceneMouseEvent) GoGC() { } type QGraphicsSceneWheelEvent struct { - h *C.QGraphicsSceneWheelEvent + h *C.QGraphicsSceneWheelEvent + isSubclass bool *QGraphicsSceneEvent } @@ -293,27 +329,47 @@ func (this *QGraphicsSceneWheelEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent) *QGraphicsSceneWheelEvent { +// newQGraphicsSceneWheelEvent constructs the type using only CGO pointers. +func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneWheelEvent { if h == nil { return nil } - return &QGraphicsSceneWheelEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneWheelEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer) *QGraphicsSceneWheelEvent { - return newQGraphicsSceneWheelEvent((*C.QGraphicsSceneWheelEvent)(h)) +// UnsafeNewQGraphicsSceneWheelEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneWheelEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneWheelEvent{h: (*C.QGraphicsSceneWheelEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneWheelEvent constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent() *QGraphicsSceneWheelEvent { - ret := C.QGraphicsSceneWheelEvent_new() - return newQGraphicsSceneWheelEvent(ret) + var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneWheelEvent_new(&outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneWheelEvent2 constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent2(typeVal QEvent__Type) *QGraphicsSceneWheelEvent { - ret := C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneWheelEvent(ret) + var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneWheelEvent) Pos() *QPointF { @@ -383,7 +439,7 @@ func (this *QGraphicsSceneWheelEvent) SetOrientation(orientation Orientation) { // Delete this object from C++ memory. func (this *QGraphicsSceneWheelEvent) Delete() { - C.QGraphicsSceneWheelEvent_Delete(this.h) + C.QGraphicsSceneWheelEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -396,7 +452,8 @@ func (this *QGraphicsSceneWheelEvent) GoGC() { } type QGraphicsSceneContextMenuEvent struct { - h *C.QGraphicsSceneContextMenuEvent + h *C.QGraphicsSceneContextMenuEvent + isSubclass bool *QGraphicsSceneEvent } @@ -414,27 +471,47 @@ func (this *QGraphicsSceneContextMenuEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent) *QGraphicsSceneContextMenuEvent { +// newQGraphicsSceneContextMenuEvent constructs the type using only CGO pointers. +func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneContextMenuEvent { if h == nil { return nil } - return &QGraphicsSceneContextMenuEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneContextMenuEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer) *QGraphicsSceneContextMenuEvent { - return newQGraphicsSceneContextMenuEvent((*C.QGraphicsSceneContextMenuEvent)(h)) +// UnsafeNewQGraphicsSceneContextMenuEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneContextMenuEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneContextMenuEvent{h: (*C.QGraphicsSceneContextMenuEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneContextMenuEvent constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent() *QGraphicsSceneContextMenuEvent { - ret := C.QGraphicsSceneContextMenuEvent_new() - return newQGraphicsSceneContextMenuEvent(ret) + var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneContextMenuEvent_new(&outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneContextMenuEvent2 constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent2(typeVal QEvent__Type) *QGraphicsSceneContextMenuEvent { - ret := C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneContextMenuEvent(ret) + var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneContextMenuEvent) Pos() *QPointF { @@ -488,7 +565,7 @@ func (this *QGraphicsSceneContextMenuEvent) SetReason(reason QGraphicsSceneConte // Delete this object from C++ memory. func (this *QGraphicsSceneContextMenuEvent) Delete() { - C.QGraphicsSceneContextMenuEvent_Delete(this.h) + C.QGraphicsSceneContextMenuEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -501,7 +578,8 @@ func (this *QGraphicsSceneContextMenuEvent) GoGC() { } type QGraphicsSceneHoverEvent struct { - h *C.QGraphicsSceneHoverEvent + h *C.QGraphicsSceneHoverEvent + isSubclass bool *QGraphicsSceneEvent } @@ -519,27 +597,47 @@ func (this *QGraphicsSceneHoverEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent) *QGraphicsSceneHoverEvent { +// newQGraphicsSceneHoverEvent constructs the type using only CGO pointers. +func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHoverEvent { if h == nil { return nil } - return &QGraphicsSceneHoverEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneHoverEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer) *QGraphicsSceneHoverEvent { - return newQGraphicsSceneHoverEvent((*C.QGraphicsSceneHoverEvent)(h)) +// UnsafeNewQGraphicsSceneHoverEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHoverEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneHoverEvent{h: (*C.QGraphicsSceneHoverEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneHoverEvent constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent() *QGraphicsSceneHoverEvent { - ret := C.QGraphicsSceneHoverEvent_new() - return newQGraphicsSceneHoverEvent(ret) + var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHoverEvent_new(&outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneHoverEvent2 constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent2(typeVal QEvent__Type) *QGraphicsSceneHoverEvent { - ret := C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneHoverEvent(ret) + var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneHoverEvent) Pos() *QPointF { @@ -618,7 +716,7 @@ func (this *QGraphicsSceneHoverEvent) SetModifiers(modifiers KeyboardModifier) { // Delete this object from C++ memory. func (this *QGraphicsSceneHoverEvent) Delete() { - C.QGraphicsSceneHoverEvent_Delete(this.h) + C.QGraphicsSceneHoverEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -631,7 +729,8 @@ func (this *QGraphicsSceneHoverEvent) GoGC() { } type QGraphicsSceneHelpEvent struct { - h *C.QGraphicsSceneHelpEvent + h *C.QGraphicsSceneHelpEvent + isSubclass bool *QGraphicsSceneEvent } @@ -649,27 +748,47 @@ func (this *QGraphicsSceneHelpEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent) *QGraphicsSceneHelpEvent { +// newQGraphicsSceneHelpEvent constructs the type using only CGO pointers. +func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHelpEvent { if h == nil { return nil } - return &QGraphicsSceneHelpEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneHelpEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer) *QGraphicsSceneHelpEvent { - return newQGraphicsSceneHelpEvent((*C.QGraphicsSceneHelpEvent)(h)) +// UnsafeNewQGraphicsSceneHelpEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHelpEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneHelpEvent{h: (*C.QGraphicsSceneHelpEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneHelpEvent constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent() *QGraphicsSceneHelpEvent { - ret := C.QGraphicsSceneHelpEvent_new() - return newQGraphicsSceneHelpEvent(ret) + var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHelpEvent_new(&outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneHelpEvent2 constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent2(typeVal QEvent__Type) *QGraphicsSceneHelpEvent { - ret := C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneHelpEvent(ret) + var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneHelpEvent) ScenePos() *QPointF { @@ -696,7 +815,7 @@ func (this *QGraphicsSceneHelpEvent) SetScreenPos(pos *QPoint) { // Delete this object from C++ memory. func (this *QGraphicsSceneHelpEvent) Delete() { - C.QGraphicsSceneHelpEvent_Delete(this.h) + C.QGraphicsSceneHelpEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -709,7 +828,8 @@ func (this *QGraphicsSceneHelpEvent) GoGC() { } type QGraphicsSceneDragDropEvent struct { - h *C.QGraphicsSceneDragDropEvent + h *C.QGraphicsSceneDragDropEvent + isSubclass bool *QGraphicsSceneEvent } @@ -727,27 +847,47 @@ func (this *QGraphicsSceneDragDropEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent) *QGraphicsSceneDragDropEvent { +// newQGraphicsSceneDragDropEvent constructs the type using only CGO pointers. +func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneDragDropEvent { if h == nil { return nil } - return &QGraphicsSceneDragDropEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneDragDropEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer) *QGraphicsSceneDragDropEvent { - return newQGraphicsSceneDragDropEvent((*C.QGraphicsSceneDragDropEvent)(h)) +// UnsafeNewQGraphicsSceneDragDropEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneDragDropEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneDragDropEvent{h: (*C.QGraphicsSceneDragDropEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneDragDropEvent constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent() *QGraphicsSceneDragDropEvent { - ret := C.QGraphicsSceneDragDropEvent_new() - return newQGraphicsSceneDragDropEvent(ret) + var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneDragDropEvent_new(&outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneDragDropEvent2 constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent2(typeVal QEvent__Type) *QGraphicsSceneDragDropEvent { - ret := C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneDragDropEvent(ret) + var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneDragDropEvent) Pos() *QPointF { @@ -828,7 +968,7 @@ func (this *QGraphicsSceneDragDropEvent) SetDropAction(action DropAction) { } func (this *QGraphicsSceneDragDropEvent) Source() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_Source(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_Source(this.h)), nil, nil) } func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { @@ -836,7 +976,7 @@ func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { } func (this *QGraphicsSceneDragDropEvent) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_MimeData(this.h)), nil) } func (this *QGraphicsSceneDragDropEvent) SetMimeData(data *QMimeData) { @@ -845,7 +985,7 @@ func (this *QGraphicsSceneDragDropEvent) SetMimeData(data *QMimeData) { // Delete this object from C++ memory. func (this *QGraphicsSceneDragDropEvent) Delete() { - C.QGraphicsSceneDragDropEvent_Delete(this.h) + C.QGraphicsSceneDragDropEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -858,7 +998,8 @@ func (this *QGraphicsSceneDragDropEvent) GoGC() { } type QGraphicsSceneResizeEvent struct { - h *C.QGraphicsSceneResizeEvent + h *C.QGraphicsSceneResizeEvent + isSubclass bool *QGraphicsSceneEvent } @@ -876,21 +1017,35 @@ func (this *QGraphicsSceneResizeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent) *QGraphicsSceneResizeEvent { +// newQGraphicsSceneResizeEvent constructs the type using only CGO pointers. +func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneResizeEvent { if h == nil { return nil } - return &QGraphicsSceneResizeEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneResizeEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer) *QGraphicsSceneResizeEvent { - return newQGraphicsSceneResizeEvent((*C.QGraphicsSceneResizeEvent)(h)) +// UnsafeNewQGraphicsSceneResizeEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneResizeEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneResizeEvent{h: (*C.QGraphicsSceneResizeEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneResizeEvent constructs a new QGraphicsSceneResizeEvent object. func NewQGraphicsSceneResizeEvent() *QGraphicsSceneResizeEvent { - ret := C.QGraphicsSceneResizeEvent_new() - return newQGraphicsSceneResizeEvent(ret) + var outptr_QGraphicsSceneResizeEvent *C.QGraphicsSceneResizeEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneResizeEvent_new(&outptr_QGraphicsSceneResizeEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneResizeEvent(outptr_QGraphicsSceneResizeEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneResizeEvent) OldSize() *QSizeF { @@ -917,7 +1072,7 @@ func (this *QGraphicsSceneResizeEvent) SetNewSize(size *QSizeF) { // Delete this object from C++ memory. func (this *QGraphicsSceneResizeEvent) Delete() { - C.QGraphicsSceneResizeEvent_Delete(this.h) + C.QGraphicsSceneResizeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -930,7 +1085,8 @@ func (this *QGraphicsSceneResizeEvent) GoGC() { } type QGraphicsSceneMoveEvent struct { - h *C.QGraphicsSceneMoveEvent + h *C.QGraphicsSceneMoveEvent + isSubclass bool *QGraphicsSceneEvent } @@ -948,21 +1104,35 @@ func (this *QGraphicsSceneMoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent) *QGraphicsSceneMoveEvent { +// newQGraphicsSceneMoveEvent constructs the type using only CGO pointers. +func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMoveEvent { if h == nil { return nil } - return &QGraphicsSceneMoveEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneMoveEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer) *QGraphicsSceneMoveEvent { - return newQGraphicsSceneMoveEvent((*C.QGraphicsSceneMoveEvent)(h)) +// UnsafeNewQGraphicsSceneMoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMoveEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneMoveEvent{h: (*C.QGraphicsSceneMoveEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneMoveEvent constructs a new QGraphicsSceneMoveEvent object. func NewQGraphicsSceneMoveEvent() *QGraphicsSceneMoveEvent { - ret := C.QGraphicsSceneMoveEvent_new() - return newQGraphicsSceneMoveEvent(ret) + var outptr_QGraphicsSceneMoveEvent *C.QGraphicsSceneMoveEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneMoveEvent_new(&outptr_QGraphicsSceneMoveEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneMoveEvent(outptr_QGraphicsSceneMoveEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneMoveEvent) OldPos() *QPointF { @@ -989,7 +1159,7 @@ func (this *QGraphicsSceneMoveEvent) SetNewPos(pos *QPointF) { // Delete this object from C++ memory. func (this *QGraphicsSceneMoveEvent) Delete() { - C.QGraphicsSceneMoveEvent_Delete(this.h) + C.QGraphicsSceneMoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicssceneevent.h b/qt/gen_qgraphicssceneevent.h index 8c87fde7..39a9c5df 100644 --- a/qt/gen_qgraphicssceneevent.h +++ b/qt/gen_qgraphicssceneevent.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsSceneContextMenuEvent; class QGraphicsSceneDragDropEvent; class QGraphicsSceneEvent; @@ -30,6 +31,7 @@ class QPointF; class QSizeF; class QWidget; #else +typedef struct QEvent QEvent; typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; typedef struct QGraphicsSceneEvent QGraphicsSceneEvent; @@ -46,13 +48,13 @@ typedef struct QSizeF QSizeF; typedef struct QWidget QWidget; #endif -QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal); +void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self); void QGraphicsSceneEvent_SetWidget(QGraphicsSceneEvent* self, QWidget* widget); -void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self); +void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass); -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new(); -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal); +void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetPos(QGraphicsSceneMouseEvent* self, QPointF* pos); QPointF* QGraphicsSceneMouseEvent_ScenePos(const QGraphicsSceneMouseEvent* self); @@ -81,10 +83,10 @@ int QGraphicsSceneMouseEvent_Source(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetSource(QGraphicsSceneMouseEvent* self, int source); int QGraphicsSceneMouseEvent_Flags(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetFlags(QGraphicsSceneMouseEvent* self, int flags); -void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self); +void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubclass); -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new(); -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal); +void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetPos(QGraphicsSceneWheelEvent* self, QPointF* pos); QPointF* QGraphicsSceneWheelEvent_ScenePos(const QGraphicsSceneWheelEvent* self); @@ -99,10 +101,10 @@ int QGraphicsSceneWheelEvent_Delta(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetDelta(QGraphicsSceneWheelEvent* self, int delta); int QGraphicsSceneWheelEvent_Orientation(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetOrientation(QGraphicsSceneWheelEvent* self, int orientation); -void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self); +void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubclass); -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new(); -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal); +void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self); void QGraphicsSceneContextMenuEvent_SetPos(QGraphicsSceneContextMenuEvent* self, QPointF* pos); QPointF* QGraphicsSceneContextMenuEvent_ScenePos(const QGraphicsSceneContextMenuEvent* self); @@ -113,10 +115,10 @@ int QGraphicsSceneContextMenuEvent_Modifiers(const QGraphicsSceneContextMenuEven void QGraphicsSceneContextMenuEvent_SetModifiers(QGraphicsSceneContextMenuEvent* self, int modifiers); int QGraphicsSceneContextMenuEvent_Reason(const QGraphicsSceneContextMenuEvent* self); void QGraphicsSceneContextMenuEvent_SetReason(QGraphicsSceneContextMenuEvent* self, int reason); -void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self); +void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, bool isSubclass); -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new(); -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal); +void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetPos(QGraphicsSceneHoverEvent* self, QPointF* pos); QPointF* QGraphicsSceneHoverEvent_ScenePos(const QGraphicsSceneHoverEvent* self); @@ -131,18 +133,18 @@ QPoint* QGraphicsSceneHoverEvent_LastScreenPos(const QGraphicsSceneHoverEvent* s void QGraphicsSceneHoverEvent_SetLastScreenPos(QGraphicsSceneHoverEvent* self, QPoint* pos); int QGraphicsSceneHoverEvent_Modifiers(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetModifiers(QGraphicsSceneHoverEvent* self, int modifiers); -void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self); +void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubclass); -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new(); -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal); +void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScenePos(QGraphicsSceneHelpEvent* self, QPointF* pos); QPoint* QGraphicsSceneHelpEvent_ScreenPos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScreenPos(QGraphicsSceneHelpEvent* self, QPoint* pos); -void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self); +void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubclass); -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new(); -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal); +void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self); void QGraphicsSceneDragDropEvent_SetPos(QGraphicsSceneDragDropEvent* self, QPointF* pos); QPointF* QGraphicsSceneDragDropEvent_ScenePos(const QGraphicsSceneDragDropEvent* self); @@ -164,21 +166,21 @@ QWidget* QGraphicsSceneDragDropEvent_Source(const QGraphicsSceneDragDropEvent* s void QGraphicsSceneDragDropEvent_SetSource(QGraphicsSceneDragDropEvent* self, QWidget* source); QMimeData* QGraphicsSceneDragDropEvent_MimeData(const QGraphicsSceneDragDropEvent* self); void QGraphicsSceneDragDropEvent_SetMimeData(QGraphicsSceneDragDropEvent* self, QMimeData* data); -void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self); +void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool isSubclass); -QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new(); +void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetOldSize(QGraphicsSceneResizeEvent* self, QSizeF* size); QSizeF* QGraphicsSceneResizeEvent_NewSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetNewSize(QGraphicsSceneResizeEvent* self, QSizeF* size); -void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self); +void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSubclass); -QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new(); +void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self); void QGraphicsSceneMoveEvent_SetOldPos(QGraphicsSceneMoveEvent* self, QPointF* pos); QPointF* QGraphicsSceneMoveEvent_NewPos(const QGraphicsSceneMoveEvent* self); void QGraphicsSceneMoveEvent_SetNewPos(QGraphicsSceneMoveEvent* self, QPointF* pos); -void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self); +void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicstransform.cpp b/qt/gen_qgraphicstransform.cpp index 83ced57d..f34f2b5d 100644 --- a/qt/gen_qgraphicstransform.cpp +++ b/qt/gen_qgraphicstransform.cpp @@ -90,16 +90,60 @@ struct miqt_string QGraphicsTransform_TrUtf83(const char* s, const char* c, int return _ms; } -void QGraphicsTransform_Delete(QGraphicsTransform* self) { - delete self; +void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsScale* QGraphicsScale_new() { - return new QGraphicsScale(); +class MiqtVirtualQGraphicsScale : public virtual QGraphicsScale { +public: + + MiqtVirtualQGraphicsScale(): QGraphicsScale() {}; + MiqtVirtualQGraphicsScale(QObject* parent): QGraphicsScale(parent) {}; + + virtual ~MiqtVirtualQGraphicsScale() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ApplyTo = 0; + + // Subclass to allow providing a Go implementation + virtual void applyTo(QMatrix4x4* matrix) const override { + if (handle__ApplyTo == 0) { + QGraphicsScale::applyTo(matrix); + return; + } + + QMatrix4x4* sigval1 = matrix; + + miqt_exec_callback_QGraphicsScale_ApplyTo(const_cast(this), handle__ApplyTo, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ApplyTo(QMatrix4x4* matrix) const { + + QGraphicsScale::applyTo(matrix); + + } + +}; + +void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(); + *outptr_QGraphicsScale = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsScale* QGraphicsScale_new2(QObject* parent) { - return new QGraphicsScale(parent); +void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(parent); + *outptr_QGraphicsScale = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self) { @@ -176,7 +220,7 @@ void QGraphicsScale_OriginChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_OriginChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::originChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::originChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_OriginChanged(slot); }); } @@ -186,7 +230,7 @@ void QGraphicsScale_XScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_XScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::xScaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::xScaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_XScaleChanged(slot); }); } @@ -196,7 +240,7 @@ void QGraphicsScale_YScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_YScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::yScaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::yScaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_YScaleChanged(slot); }); } @@ -206,7 +250,7 @@ void QGraphicsScale_ZScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_ZScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::zScaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::zScaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_ZScaleChanged(slot); }); } @@ -216,7 +260,7 @@ void QGraphicsScale_ScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_ScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::scaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::scaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_ScaleChanged(slot); }); } @@ -265,16 +309,68 @@ struct miqt_string QGraphicsScale_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QGraphicsScale_Delete(QGraphicsScale* self) { - delete self; +void QGraphicsScale_override_virtual_ApplyTo(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScale*)(self) )->handle__ApplyTo = slot; +} + +void QGraphicsScale_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix) { + ( (const MiqtVirtualQGraphicsScale*)(self) )->virtualbase_ApplyTo(matrix); +} + +void QGraphicsScale_Delete(QGraphicsScale* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsRotation* QGraphicsRotation_new() { - return new QGraphicsRotation(); +class MiqtVirtualQGraphicsRotation : public virtual QGraphicsRotation { +public: + + MiqtVirtualQGraphicsRotation(): QGraphicsRotation() {}; + MiqtVirtualQGraphicsRotation(QObject* parent): QGraphicsRotation(parent) {}; + + virtual ~MiqtVirtualQGraphicsRotation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ApplyTo = 0; + + // Subclass to allow providing a Go implementation + virtual void applyTo(QMatrix4x4* matrix) const override { + if (handle__ApplyTo == 0) { + QGraphicsRotation::applyTo(matrix); + return; + } + + QMatrix4x4* sigval1 = matrix; + + miqt_exec_callback_QGraphicsRotation_ApplyTo(const_cast(this), handle__ApplyTo, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ApplyTo(QMatrix4x4* matrix) const { + + QGraphicsRotation::applyTo(matrix); + + } + +}; + +void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(); + *outptr_QGraphicsRotation = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsRotation* QGraphicsRotation_new2(QObject* parent) { - return new QGraphicsRotation(parent); +void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(parent); + *outptr_QGraphicsRotation = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self) { @@ -345,7 +441,7 @@ void QGraphicsRotation_OriginChanged(QGraphicsRotation* self) { } void QGraphicsRotation_connect_OriginChanged(QGraphicsRotation* self, intptr_t slot) { - QGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::originChanged), self, [=]() { + MiqtVirtualQGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::originChanged), self, [=]() { miqt_exec_callback_QGraphicsRotation_OriginChanged(slot); }); } @@ -355,7 +451,7 @@ void QGraphicsRotation_AngleChanged(QGraphicsRotation* self) { } void QGraphicsRotation_connect_AngleChanged(QGraphicsRotation* self, intptr_t slot) { - QGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::angleChanged), self, [=]() { + MiqtVirtualQGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::angleChanged), self, [=]() { miqt_exec_callback_QGraphicsRotation_AngleChanged(slot); }); } @@ -365,7 +461,7 @@ void QGraphicsRotation_AxisChanged(QGraphicsRotation* self) { } void QGraphicsRotation_connect_AxisChanged(QGraphicsRotation* self, intptr_t slot) { - QGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::axisChanged), self, [=]() { + MiqtVirtualQGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::axisChanged), self, [=]() { miqt_exec_callback_QGraphicsRotation_AxisChanged(slot); }); } @@ -414,7 +510,19 @@ struct miqt_string QGraphicsRotation_TrUtf83(const char* s, const char* c, int n return _ms; } -void QGraphicsRotation_Delete(QGraphicsRotation* self) { - delete self; +void QGraphicsRotation_override_virtual_ApplyTo(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRotation*)(self) )->handle__ApplyTo = slot; +} + +void QGraphicsRotation_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix) { + ( (const MiqtVirtualQGraphicsRotation*)(self) )->virtualbase_ApplyTo(matrix); +} + +void QGraphicsRotation_Delete(QGraphicsRotation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicstransform.go b/qt/gen_qgraphicstransform.go index 0f8185cb..55b30432 100644 --- a/qt/gen_qgraphicstransform.go +++ b/qt/gen_qgraphicstransform.go @@ -15,7 +15,8 @@ import ( ) type QGraphicsTransform struct { - h *C.QGraphicsTransform + h *C.QGraphicsTransform + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QGraphicsTransform) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsTransform(h *C.QGraphicsTransform) *QGraphicsTransform { +// newQGraphicsTransform constructs the type using only CGO pointers. +func newQGraphicsTransform(h *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsTransform { if h == nil { return nil } - return &QGraphicsTransform{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsTransform{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsTransform(h unsafe.Pointer) *QGraphicsTransform { - return newQGraphicsTransform((*C.QGraphicsTransform)(h)) +// UnsafeNewQGraphicsTransform constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsTransform(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsTransform { + if h == nil { + return nil + } + + return &QGraphicsTransform{h: (*C.QGraphicsTransform)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGraphicsTransform) MetaObject() *QMetaObject { @@ -122,7 +131,7 @@ func QGraphicsTransform_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGraphicsTransform) Delete() { - C.QGraphicsTransform_Delete(this.h) + C.QGraphicsTransform_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -135,7 +144,8 @@ func (this *QGraphicsTransform) GoGC() { } type QGraphicsScale struct { - h *C.QGraphicsScale + h *C.QGraphicsScale + isSubclass bool *QGraphicsTransform } @@ -153,27 +163,47 @@ func (this *QGraphicsScale) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsScale(h *C.QGraphicsScale) *QGraphicsScale { +// newQGraphicsScale constructs the type using only CGO pointers. +func newQGraphicsScale(h *C.QGraphicsScale, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsScale { if h == nil { return nil } - return &QGraphicsScale{h: h, QGraphicsTransform: UnsafeNewQGraphicsTransform(unsafe.Pointer(h))} + return &QGraphicsScale{h: h, + QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } -func UnsafeNewQGraphicsScale(h unsafe.Pointer) *QGraphicsScale { - return newQGraphicsScale((*C.QGraphicsScale)(h)) +// UnsafeNewQGraphicsScale constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsScale(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScale { + if h == nil { + return nil + } + + return &QGraphicsScale{h: (*C.QGraphicsScale)(h), + QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } // NewQGraphicsScale constructs a new QGraphicsScale object. func NewQGraphicsScale() *QGraphicsScale { - ret := C.QGraphicsScale_new() - return newQGraphicsScale(ret) + var outptr_QGraphicsScale *C.QGraphicsScale = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScale_new(&outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScale2 constructs a new QGraphicsScale object. func NewQGraphicsScale2(parent *QObject) *QGraphicsScale { - ret := C.QGraphicsScale_new2(parent.cPointer()) - return newQGraphicsScale(ret) + var outptr_QGraphicsScale *C.QGraphicsScale = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScale_new2(parent.cPointer(), &outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsScale) MetaObject() *QMetaObject { @@ -372,9 +402,32 @@ func QGraphicsScale_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsScale) callVirtualBase_ApplyTo(matrix *QMatrix4x4) { + + C.QGraphicsScale_virtualbase_ApplyTo(unsafe.Pointer(this.h), matrix.cPointer()) + +} +func (this *QGraphicsScale) OnApplyTo(slot func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) { + C.QGraphicsScale_override_virtual_ApplyTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScale_ApplyTo +func miqt_exec_callback_QGraphicsScale_ApplyTo(self *C.QGraphicsScale, cb C.intptr_t, matrix *C.QMatrix4x4) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMatrix4x4(unsafe.Pointer(matrix)) + + gofunc((&QGraphicsScale{h: self}).callVirtualBase_ApplyTo, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsScale) Delete() { - C.QGraphicsScale_Delete(this.h) + C.QGraphicsScale_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -387,7 +440,8 @@ func (this *QGraphicsScale) GoGC() { } type QGraphicsRotation struct { - h *C.QGraphicsRotation + h *C.QGraphicsRotation + isSubclass bool *QGraphicsTransform } @@ -405,27 +459,47 @@ func (this *QGraphicsRotation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsRotation(h *C.QGraphicsRotation) *QGraphicsRotation { +// newQGraphicsRotation constructs the type using only CGO pointers. +func newQGraphicsRotation(h *C.QGraphicsRotation, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsRotation { if h == nil { return nil } - return &QGraphicsRotation{h: h, QGraphicsTransform: UnsafeNewQGraphicsTransform(unsafe.Pointer(h))} + return &QGraphicsRotation{h: h, + QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } -func UnsafeNewQGraphicsRotation(h unsafe.Pointer) *QGraphicsRotation { - return newQGraphicsRotation((*C.QGraphicsRotation)(h)) +// UnsafeNewQGraphicsRotation constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsRotation(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsRotation { + if h == nil { + return nil + } + + return &QGraphicsRotation{h: (*C.QGraphicsRotation)(h), + QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } // NewQGraphicsRotation constructs a new QGraphicsRotation object. func NewQGraphicsRotation() *QGraphicsRotation { - ret := C.QGraphicsRotation_new() - return newQGraphicsRotation(ret) + var outptr_QGraphicsRotation *C.QGraphicsRotation = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsRotation_new(&outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsRotation2 constructs a new QGraphicsRotation object. func NewQGraphicsRotation2(parent *QObject) *QGraphicsRotation { - ret := C.QGraphicsRotation_new2(parent.cPointer()) - return newQGraphicsRotation(ret) + var outptr_QGraphicsRotation *C.QGraphicsRotation = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsRotation_new2(parent.cPointer(), &outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsRotation) MetaObject() *QMetaObject { @@ -589,9 +663,32 @@ func QGraphicsRotation_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsRotation) callVirtualBase_ApplyTo(matrix *QMatrix4x4) { + + C.QGraphicsRotation_virtualbase_ApplyTo(unsafe.Pointer(this.h), matrix.cPointer()) + +} +func (this *QGraphicsRotation) OnApplyTo(slot func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) { + C.QGraphicsRotation_override_virtual_ApplyTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsRotation_ApplyTo +func miqt_exec_callback_QGraphicsRotation_ApplyTo(self *C.QGraphicsRotation, cb C.intptr_t, matrix *C.QMatrix4x4) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMatrix4x4(unsafe.Pointer(matrix)) + + gofunc((&QGraphicsRotation{h: self}).callVirtualBase_ApplyTo, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsRotation) Delete() { - C.QGraphicsRotation_Delete(this.h) + C.QGraphicsRotation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicstransform.h b/qt/gen_qgraphicstransform.h index 3e7a3515..304b2012 100644 --- a/qt/gen_qgraphicstransform.h +++ b/qt/gen_qgraphicstransform.h @@ -41,10 +41,10 @@ struct miqt_string QGraphicsTransform_Tr2(const char* s, const char* c); struct miqt_string QGraphicsTransform_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsTransform_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsTransform_TrUtf83(const char* s, const char* c, int n); -void QGraphicsTransform_Delete(QGraphicsTransform* self); +void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass); -QGraphicsScale* QGraphicsScale_new(); -QGraphicsScale* QGraphicsScale_new2(QObject* parent); +void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self); void* QGraphicsScale_Metacast(QGraphicsScale* self, const char* param1); struct miqt_string QGraphicsScale_Tr(const char* s); @@ -72,10 +72,12 @@ struct miqt_string QGraphicsScale_Tr2(const char* s, const char* c); struct miqt_string QGraphicsScale_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsScale_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsScale_TrUtf83(const char* s, const char* c, int n); -void QGraphicsScale_Delete(QGraphicsScale* self); +void QGraphicsScale_override_virtual_ApplyTo(void* self, intptr_t slot); +void QGraphicsScale_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); +void QGraphicsScale_Delete(QGraphicsScale* self, bool isSubclass); -QGraphicsRotation* QGraphicsRotation_new(); -QGraphicsRotation* QGraphicsRotation_new2(QObject* parent); +void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self); void* QGraphicsRotation_Metacast(QGraphicsRotation* self, const char* param1); struct miqt_string QGraphicsRotation_Tr(const char* s); @@ -98,7 +100,9 @@ struct miqt_string QGraphicsRotation_Tr2(const char* s, const char* c); struct miqt_string QGraphicsRotation_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsRotation_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsRotation_TrUtf83(const char* s, const char* c, int n); -void QGraphicsRotation_Delete(QGraphicsRotation* self); +void QGraphicsRotation_override_virtual_ApplyTo(void* self, intptr_t slot); +void QGraphicsRotation_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); +void QGraphicsRotation_Delete(QGraphicsRotation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicsview.cpp b/qt/gen_qgraphicsview.cpp index c9636624..0a95fa7d 100644 --- a/qt/gen_qgraphicsview.cpp +++ b/qt/gen_qgraphicsview.cpp @@ -1,41 +1,813 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qgraphicsview.h" #include "_cgo_export.h" -QGraphicsView* QGraphicsView_new(QWidget* parent) { - return new QGraphicsView(parent); +class MiqtVirtualQGraphicsView : public virtual QGraphicsView { +public: + + MiqtVirtualQGraphicsView(QWidget* parent): QGraphicsView(parent) {}; + MiqtVirtualQGraphicsView(): QGraphicsView() {}; + MiqtVirtualQGraphicsView(QGraphicsScene* scene): QGraphicsView(scene) {}; + MiqtVirtualQGraphicsView(QGraphicsScene* scene, QWidget* parent): QGraphicsView(scene, parent) {}; + + virtual ~MiqtVirtualQGraphicsView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QGraphicsView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGraphicsView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QGraphicsView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* widget) override { + if (handle__SetupViewport == 0) { + QGraphicsView::setupViewport(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QGraphicsView_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* widget) { + + QGraphicsView::setupViewport(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QGraphicsView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QGraphicsView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsView::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QGraphicsView::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QGraphicsView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QGraphicsView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QGraphicsView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QGraphicsView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsView::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsView::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QGraphicsView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QGraphicsView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QGraphicsView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QGraphicsView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsView::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QGraphicsView::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QGraphicsView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QGraphicsView::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QGraphicsView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QGraphicsView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QGraphicsView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QGraphicsView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsView::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsView::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBackground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBackground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawBackground == 0) { + QGraphicsView::drawBackground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsView_DrawBackground(this, handle__DrawBackground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBackground(QPainter* painter, QRectF* rect) { + + QGraphicsView::drawBackground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawForeground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawForeground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawForeground == 0) { + QGraphicsView::drawForeground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsView_DrawForeground(this, handle__DrawForeground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawForeground(QPainter* painter, QRectF* rect) { + + QGraphicsView::drawForeground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QGraphicsView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGraphicsView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QGraphicsView::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QGraphicsView::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QGraphicsView::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QGraphicsView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGraphicsView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QGraphicsView::viewportSizeHint()); + + } + +}; + +void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(parent); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGraphicsView* QGraphicsView_new2() { - return new QGraphicsView(); +void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene) { - return new QGraphicsView(scene); +void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent) { - return new QGraphicsView(scene, parent); +void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene, parent); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self) { @@ -438,7 +1210,7 @@ void QGraphicsView_RubberBandChanged(QGraphicsView* self, QRect* viewportRect, Q } void QGraphicsView_connect_RubberBandChanged(QGraphicsView* self, intptr_t slot) { - QGraphicsView::connect(self, static_cast(&QGraphicsView::rubberBandChanged), self, [=](QRect viewportRect, QPointF fromScenePoint, QPointF toScenePoint) { + MiqtVirtualQGraphicsView::connect(self, static_cast(&QGraphicsView::rubberBandChanged), self, [=](QRect viewportRect, QPointF fromScenePoint, QPointF toScenePoint) { QRect* sigval1 = new QRect(viewportRect); QPointF* sigval2 = new QPointF(fromScenePoint); QPointF* sigval3 = new QPointF(toScenePoint); @@ -601,7 +1373,251 @@ void QGraphicsView_InvalidateScene2(QGraphicsView* self, QRectF* rect, int layer self->invalidateScene(*rect, static_cast(layers)); } -void QGraphicsView_Delete(QGraphicsView* self) { - delete self; +void QGraphicsView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__SizeHint = slot; +} + +QSize* QGraphicsView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_SizeHint(); +} + +void QGraphicsView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsView_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__SetupViewport = slot; +} + +void QGraphicsView_virtualbase_SetupViewport(void* self, QWidget* widget) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_SetupViewport(widget); +} + +void QGraphicsView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__Event = slot; +} + +bool QGraphicsView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_Event(event); +} + +void QGraphicsView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ViewportEvent = slot; +} + +bool QGraphicsView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QGraphicsView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsView_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__PaintEvent = slot; +} + +void QGraphicsView_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_PaintEvent(event); +} + +void QGraphicsView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QGraphicsView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QGraphicsView_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsView_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsView_override_virtual_DrawBackground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DrawBackground = slot; +} + +void QGraphicsView_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DrawBackground(painter, rect); +} + +void QGraphicsView_override_virtual_DrawForeground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DrawForeground = slot; +} + +void QGraphicsView_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DrawForeground(painter, rect); +} + +void QGraphicsView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QGraphicsView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QGraphicsView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsView_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QGraphicsView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QGraphicsView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QGraphicsView_Delete(QGraphicsView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicsview.go b/qt/gen_qgraphicsview.go index 499f3a42..711f3109 100644 --- a/qt/gen_qgraphicsview.go +++ b/qt/gen_qgraphicsview.go @@ -57,7 +57,8 @@ const ( ) type QGraphicsView struct { - h *C.QGraphicsView + h *C.QGraphicsView + isSubclass bool *QAbstractScrollArea } @@ -75,39 +76,83 @@ func (this *QGraphicsView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsView(h *C.QGraphicsView) *QGraphicsView { +// newQGraphicsView constructs the type using only CGO pointers. +func newQGraphicsView(h *C.QGraphicsView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGraphicsView { if h == nil { return nil } - return &QGraphicsView{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QGraphicsView{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQGraphicsView(h unsafe.Pointer) *QGraphicsView { - return newQGraphicsView((*C.QGraphicsView)(h)) +// UnsafeNewQGraphicsView constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGraphicsView { + if h == nil { + return nil + } + + return &QGraphicsView{h: (*C.QGraphicsView)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQGraphicsView constructs a new QGraphicsView object. func NewQGraphicsView(parent *QWidget) *QGraphicsView { - ret := C.QGraphicsView_new(parent.cPointer()) - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new(parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGraphicsView2 constructs a new QGraphicsView object. func NewQGraphicsView2() *QGraphicsView { - ret := C.QGraphicsView_new2() - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new2(&outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGraphicsView3 constructs a new QGraphicsView object. func NewQGraphicsView3(scene *QGraphicsScene) *QGraphicsView { - ret := C.QGraphicsView_new3(scene.cPointer()) - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new3(scene.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGraphicsView4 constructs a new QGraphicsView object. func NewQGraphicsView4(scene *QGraphicsScene, parent *QWidget) *QGraphicsView { - ret := C.QGraphicsView_new4(scene.cPointer(), parent.cPointer()) - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new4(scene.cPointer(), parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QGraphicsView) MetaObject() *QMetaObject { @@ -245,7 +290,7 @@ func (this *QGraphicsView) SetInteractive(allowed bool) { } func (this *QGraphicsView) Scene() *QGraphicsScene { - return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsView_Scene(this.h))) + return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsView_Scene(this.h)), nil) } func (this *QGraphicsView) SetScene(scene *QGraphicsScene) { @@ -700,9 +745,723 @@ func (this *QGraphicsView) InvalidateScene2(rect *QRectF, layers QGraphicsScene_ C.QGraphicsView_InvalidateScene2(this.h, rect.cPointer(), (C.int)(layers)) } +func (this *QGraphicsView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QGraphicsView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QGraphicsView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_SizeHint +func miqt_exec_callback_QGraphicsView_SizeHint(self *C.QGraphicsView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_InputMethodQuery +func miqt_exec_callback_QGraphicsView_InputMethodQuery(self *C.QGraphicsView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsView) callVirtualBase_SetupViewport(widget *QWidget) { + + C.QGraphicsView_virtualbase_SetupViewport(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QGraphicsView) OnSetupViewport(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QGraphicsView_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_SetupViewport +func miqt_exec_callback_QGraphicsView_SetupViewport(self *C.QGraphicsView, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_Event +func miqt_exec_callback_QGraphicsView_Event(self *C.QGraphicsView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ViewportEvent +func miqt_exec_callback_QGraphicsView_ViewportEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QGraphicsView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QGraphicsView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ContextMenuEvent +func miqt_exec_callback_QGraphicsView_ContextMenuEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QGraphicsView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QGraphicsView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DragEnterEvent +func miqt_exec_callback_QGraphicsView_DragEnterEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QGraphicsView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QGraphicsView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DragLeaveEvent +func miqt_exec_callback_QGraphicsView_DragLeaveEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QGraphicsView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QGraphicsView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DragMoveEvent +func miqt_exec_callback_QGraphicsView_DragMoveEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QGraphicsView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QGraphicsView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DropEvent +func miqt_exec_callback_QGraphicsView_DropEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_FocusInEvent +func miqt_exec_callback_QGraphicsView_FocusInEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_FocusNextPrevChild +func miqt_exec_callback_QGraphicsView_FocusNextPrevChild(self *C.QGraphicsView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_FocusOutEvent +func miqt_exec_callback_QGraphicsView_FocusOutEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_KeyPressEvent +func miqt_exec_callback_QGraphicsView_KeyPressEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsView_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsView_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_KeyReleaseEvent +func miqt_exec_callback_QGraphicsView_KeyReleaseEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MousePressEvent +func miqt_exec_callback_QGraphicsView_MousePressEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MouseMoveEvent +func miqt_exec_callback_QGraphicsView_MouseMoveEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MouseReleaseEvent +func miqt_exec_callback_QGraphicsView_MouseReleaseEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QGraphicsView_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QGraphicsView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_WheelEvent +func miqt_exec_callback_QGraphicsView_WheelEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QGraphicsView_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QGraphicsView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_PaintEvent +func miqt_exec_callback_QGraphicsView_PaintEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QGraphicsView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QGraphicsView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ResizeEvent +func miqt_exec_callback_QGraphicsView_ResizeEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QGraphicsView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QGraphicsView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QGraphicsView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ScrollContentsBy +func miqt_exec_callback_QGraphicsView_ScrollContentsBy(self *C.QGraphicsView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QGraphicsView) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGraphicsView_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGraphicsView_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ShowEvent +func miqt_exec_callback_QGraphicsView_ShowEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_InputMethodEvent +func miqt_exec_callback_QGraphicsView_InputMethodEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DrawBackground(painter *QPainter, rect *QRectF) { + + C.QGraphicsView_virtualbase_DrawBackground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsView) OnDrawBackground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsView_override_virtual_DrawBackground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DrawBackground +func miqt_exec_callback_QGraphicsView_DrawBackground(self *C.QGraphicsView, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DrawBackground, slotval1, slotval2) + +} + +func (this *QGraphicsView) callVirtualBase_DrawForeground(painter *QPainter, rect *QRectF) { + + C.QGraphicsView_virtualbase_DrawForeground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsView) OnDrawForeground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsView_override_virtual_DrawForeground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DrawForeground +func miqt_exec_callback_QGraphicsView_DrawForeground(self *C.QGraphicsView, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DrawForeground, slotval1, slotval2) + +} + +func (this *QGraphicsView) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QGraphicsView_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QGraphicsView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MinimumSizeHint +func miqt_exec_callback_QGraphicsView_MinimumSizeHint(self *C.QGraphicsView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsView) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QGraphicsView_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QGraphicsView) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QGraphicsView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_EventFilter +func miqt_exec_callback_QGraphicsView_EventFilter(self *C.QGraphicsView, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QGraphicsView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QGraphicsView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ViewportSizeHint +func miqt_exec_callback_QGraphicsView_ViewportSizeHint(self *C.QGraphicsView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsView) Delete() { - C.QGraphicsView_Delete(this.h) + C.QGraphicsView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicsview.h b/qt/gen_qgraphicsview.h index 1b264926..bbb6a476 100644 --- a/qt/gen_qgraphicsview.h +++ b/qt/gen_qgraphicsview.h @@ -15,45 +15,81 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QBrush; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QGraphicsItem; class QGraphicsScene; class QGraphicsView; +class QInputMethodEvent; +class QKeyEvent; class QMatrix; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPainter; class QPainterPath; class QPoint; class QPointF; class QRect; class QRectF; +class QResizeEvent; +class QShowEvent; class QSize; class QTransform; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QGraphicsItem QGraphicsItem; typedef struct QGraphicsScene QGraphicsScene; typedef struct QGraphicsView QGraphicsView; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMatrix QMatrix; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPainterPath QPainterPath; typedef struct QPoint QPoint; typedef struct QPointF QPointF; typedef struct QRect QRect; typedef struct QRectF QRectF; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QTransform QTransform; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QGraphicsView* QGraphicsView_new(QWidget* parent); -QGraphicsView* QGraphicsView_new2(); -QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene); -QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent); +void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self); void* QGraphicsView_Metacast(QGraphicsView* self, const char* param1); struct miqt_string QGraphicsView_Tr(const char* s); @@ -134,6 +170,31 @@ void QGraphicsView_InvalidateScene(QGraphicsView* self); void QGraphicsView_UpdateSceneRect(QGraphicsView* self, QRectF* rect); void QGraphicsView_RubberBandChanged(QGraphicsView* self, QRect* viewportRect, QPointF* fromScenePoint, QPointF* toScenePoint); void QGraphicsView_connect_RubberBandChanged(QGraphicsView* self, intptr_t slot); +void QGraphicsView_SetupViewport(QGraphicsView* self, QWidget* widget); +bool QGraphicsView_Event(QGraphicsView* self, QEvent* event); +bool QGraphicsView_ViewportEvent(QGraphicsView* self, QEvent* event); +void QGraphicsView_ContextMenuEvent(QGraphicsView* self, QContextMenuEvent* event); +void QGraphicsView_DragEnterEvent(QGraphicsView* self, QDragEnterEvent* event); +void QGraphicsView_DragLeaveEvent(QGraphicsView* self, QDragLeaveEvent* event); +void QGraphicsView_DragMoveEvent(QGraphicsView* self, QDragMoveEvent* event); +void QGraphicsView_DropEvent(QGraphicsView* self, QDropEvent* event); +void QGraphicsView_FocusInEvent(QGraphicsView* self, QFocusEvent* event); +bool QGraphicsView_FocusNextPrevChild(QGraphicsView* self, bool next); +void QGraphicsView_FocusOutEvent(QGraphicsView* self, QFocusEvent* event); +void QGraphicsView_KeyPressEvent(QGraphicsView* self, QKeyEvent* event); +void QGraphicsView_KeyReleaseEvent(QGraphicsView* self, QKeyEvent* event); +void QGraphicsView_MouseDoubleClickEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_MousePressEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_MouseMoveEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_MouseReleaseEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_WheelEvent(QGraphicsView* self, QWheelEvent* event); +void QGraphicsView_PaintEvent(QGraphicsView* self, QPaintEvent* event); +void QGraphicsView_ResizeEvent(QGraphicsView* self, QResizeEvent* event); +void QGraphicsView_ScrollContentsBy(QGraphicsView* self, int dx, int dy); +void QGraphicsView_ShowEvent(QGraphicsView* self, QShowEvent* event); +void QGraphicsView_InputMethodEvent(QGraphicsView* self, QInputMethodEvent* event); +void QGraphicsView_DrawBackground(QGraphicsView* self, QPainter* painter, QRectF* rect); +void QGraphicsView_DrawForeground(QGraphicsView* self, QPainter* painter, QRectF* rect); struct miqt_string QGraphicsView_Tr2(const char* s, const char* c); struct miqt_string QGraphicsView_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsView_TrUtf82(const char* s, const char* c); @@ -159,7 +220,67 @@ struct miqt_array /* of QGraphicsItem* */ QGraphicsView_Items5(const QGraphicsV struct miqt_array /* of QGraphicsItem* */ QGraphicsView_Items24(const QGraphicsView* self, QPainterPath* path, int mode); void QGraphicsView_InvalidateScene1(QGraphicsView* self, QRectF* rect); void QGraphicsView_InvalidateScene2(QGraphicsView* self, QRectF* rect, int layers); -void QGraphicsView_Delete(QGraphicsView* self); +void QGraphicsView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QGraphicsView_virtualbase_SizeHint(const void* self); +void QGraphicsView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsView_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsView_override_virtual_SetupViewport(void* self, intptr_t slot); +void QGraphicsView_virtualbase_SetupViewport(void* self, QWidget* widget); +void QGraphicsView_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_Event(void* self, QEvent* event); +void QGraphicsView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QGraphicsView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QGraphicsView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QGraphicsView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QGraphicsView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QGraphicsView_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QGraphicsView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QGraphicsView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QGraphicsView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QGraphicsView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QGraphicsView_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsView_override_virtual_DrawBackground(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsView_override_virtual_DrawForeground(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QGraphicsView_virtualbase_MinimumSizeHint(const void* self); +void QGraphicsView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QGraphicsView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QGraphicsView_virtualbase_ViewportSizeHint(const void* self); +void QGraphicsView_Delete(QGraphicsView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgraphicswidget.cpp b/qt/gen_qgraphicswidget.cpp index 4c20e4b3..ba41a6b9 100644 --- a/qt/gen_qgraphicswidget.cpp +++ b/qt/gen_qgraphicswidget.cpp @@ -1,37 +1,864 @@ #include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include #include +#include #include #include #include #include +#include #include #include #include +#include #include +#include #include #include #include #include #include +#include #include +#include #include #include #include "gen_qgraphicswidget.h" #include "_cgo_export.h" -QGraphicsWidget* QGraphicsWidget_new() { - return new QGraphicsWidget(); +class MiqtVirtualQGraphicsWidget : public virtual QGraphicsWidget { +public: + + MiqtVirtualQGraphicsWidget(): QGraphicsWidget() {}; + MiqtVirtualQGraphicsWidget(QGraphicsItem* parent): QGraphicsWidget(parent) {}; + MiqtVirtualQGraphicsWidget(QGraphicsItem* parent, Qt::WindowFlags wFlags): QGraphicsWidget(parent, wFlags) {}; + + virtual ~MiqtVirtualQGraphicsWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsWidget::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsWidget_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsWidget::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsWidget::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsWidget_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsWidget::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsWidget::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsWidget_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsWidget::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsWidget::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsWidget_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsWidget::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintWindowFrame = 0; + + // Subclass to allow providing a Go implementation + virtual void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__PaintWindowFrame == 0) { + QGraphicsWidget::paintWindowFrame(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsWidget_PaintWindowFrame(this, handle__PaintWindowFrame, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintWindowFrame(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsWidget::paintWindowFrame(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsWidget::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsWidget_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsWidget::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsWidget::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsWidget_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsWidget::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOption* option) const override { + if (handle__InitStyleOption == 0) { + QGraphicsWidget::initStyleOption(option); + return; + } + + QStyleOption* sigval1 = option; + + miqt_exec_callback_QGraphicsWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOption* option) const { + + QGraphicsWidget::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsWidget::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsWidget_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsWidget::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsWidget::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsWidget_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsWidget::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsWidget::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsWidget_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsWidget::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PropertyChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant propertyChange(const QString& propertyName, const QVariant& value) override { + if (handle__PropertyChange == 0) { + return QGraphicsWidget::propertyChange(propertyName, value); + } + + const QString propertyName_ret = propertyName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray propertyName_b = propertyName_ret.toUtf8(); + struct miqt_string propertyName_ms; + propertyName_ms.len = propertyName_b.length(); + propertyName_ms.data = static_cast(malloc(propertyName_ms.len)); + memcpy(propertyName_ms.data, propertyName_b.data(), propertyName_ms.len); + struct miqt_string sigval1 = propertyName_ms; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsWidget_PropertyChange(this, handle__PropertyChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_PropertyChange(struct miqt_string propertyName, QVariant* value) { + QString propertyName_QString = QString::fromUtf8(propertyName.data, propertyName.len); + + return new QVariant(QGraphicsWidget::propertyChange(propertyName_QString, *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsWidget::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsWidget::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool windowFrameEvent(QEvent* e) override { + if (handle__WindowFrameEvent == 0) { + return QGraphicsWidget::windowFrameEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_WindowFrameEvent(this, handle__WindowFrameEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WindowFrameEvent(QEvent* e) { + + return QGraphicsWidget::windowFrameEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameSectionAt = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const override { + if (handle__WindowFrameSectionAt == 0) { + return QGraphicsWidget::windowFrameSectionAt(pos); + } + + const QPointF& pos_ret = pos; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&pos_ret); + + int callback_return_value = miqt_exec_callback_QGraphicsWidget_WindowFrameSectionAt(const_cast(this), handle__WindowFrameSectionAt, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_WindowFrameSectionAt(QPointF* pos) const { + + Qt::WindowFrameSection _ret = QGraphicsWidget::windowFrameSectionAt(*pos); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGraphicsWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGraphicsWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGraphicsWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGraphicsWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsWidget::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGraphicsWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGraphicsWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QGraphicsSceneMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGraphicsWidget::moveEvent(event); + return; + } + + QGraphicsSceneMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QGraphicsSceneMoveEvent* event) { + + QGraphicsWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void polishEvent() override { + if (handle__PolishEvent == 0) { + QGraphicsWidget::polishEvent(); + return; + } + + + miqt_exec_callback_QGraphicsWidget_PolishEvent(this, handle__PolishEvent); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishEvent() { + + QGraphicsWidget::polishEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QGraphicsSceneResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsWidget::resizeEvent(event); + return; + } + + QGraphicsSceneResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QGraphicsSceneResizeEvent* event) { + + QGraphicsWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsWidget::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsWidget::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsWidget::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsWidget::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabMouseEvent(QEvent* event) override { + if (handle__GrabMouseEvent == 0) { + QGraphicsWidget::grabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_GrabMouseEvent(this, handle__GrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabMouseEvent(QEvent* event) { + + QGraphicsWidget::grabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabMouseEvent(QEvent* event) override { + if (handle__UngrabMouseEvent == 0) { + QGraphicsWidget::ungrabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_UngrabMouseEvent(this, handle__UngrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabMouseEvent(QEvent* event) { + + QGraphicsWidget::ungrabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabKeyboardEvent(QEvent* event) override { + if (handle__GrabKeyboardEvent == 0) { + QGraphicsWidget::grabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_GrabKeyboardEvent(this, handle__GrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabKeyboardEvent(QEvent* event) { + + QGraphicsWidget::grabKeyboardEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabKeyboardEvent(QEvent* event) override { + if (handle__UngrabKeyboardEvent == 0) { + QGraphicsWidget::ungrabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_UngrabKeyboardEvent(this, handle__UngrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabKeyboardEvent(QEvent* event) { + + QGraphicsWidget::ungrabKeyboardEvent(event); + + } + +}; + +void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(); + *outptr_QGraphicsWidget = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent) { - return new QGraphicsWidget(parent); +void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent); + *outptr_QGraphicsWidget = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags) { - return new QGraphicsWidget(parent, static_cast(wFlags)); +void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent, static_cast(wFlags)); + *outptr_QGraphicsWidget = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self) { @@ -305,12 +1132,12 @@ int QGraphicsWidget_Type(const QGraphicsWidget* self) { return self->type(); } -void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } -void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paintWindowFrame(painter, option); +void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paintWindowFrame(painter, option, widget); } QRectF* QGraphicsWidget_BoundingRect(const QGraphicsWidget* self) { @@ -326,7 +1153,7 @@ void QGraphicsWidget_GeometryChanged(QGraphicsWidget* self) { } void QGraphicsWidget_connect_GeometryChanged(QGraphicsWidget* self, intptr_t slot) { - QGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::geometryChanged), self, [=]() { + MiqtVirtualQGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::geometryChanged), self, [=]() { miqt_exec_callback_QGraphicsWidget_GeometryChanged(slot); }); } @@ -336,7 +1163,7 @@ void QGraphicsWidget_LayoutChanged(QGraphicsWidget* self) { } void QGraphicsWidget_connect_LayoutChanged(QGraphicsWidget* self, intptr_t slot) { - QGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::layoutChanged), self, [=]() { + MiqtVirtualQGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::layoutChanged), self, [=]() { miqt_exec_callback_QGraphicsWidget_LayoutChanged(slot); }); } @@ -405,15 +1232,267 @@ void QGraphicsWidget_SetAttribute2(QGraphicsWidget* self, int attribute, bool on self->setAttribute(static_cast(attribute), on); } -void QGraphicsWidget_Paint3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsWidget_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__SetGeometry = slot; } -void QGraphicsWidget_PaintWindowFrame3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paintWindowFrame(painter, option, widget); +void QGraphicsWidget_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsWidget_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Type = slot; +} + +int QGraphicsWidget_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Type(); +} + +void QGraphicsWidget_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Paint = slot; +} + +void QGraphicsWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__PaintWindowFrame = slot; +} + +void QGraphicsWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_PaintWindowFrame(painter, option, widget); +} + +void QGraphicsWidget_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsWidget_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsWidget_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Shape = slot; } -void QGraphicsWidget_Delete(QGraphicsWidget* self) { - delete self; +QPainterPath* QGraphicsWidget_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Shape(); +} + +void QGraphicsWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QGraphicsWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option) { + ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QGraphicsWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsWidget_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsWidget_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsWidget_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsWidget_override_virtual_PropertyChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__PropertyChange = slot; +} + +QVariant* QGraphicsWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_PropertyChange(propertyName, value); +} + +void QGraphicsWidget_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsWidget_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__WindowFrameEvent = slot; +} + +bool QGraphicsWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_WindowFrameEvent(e); +} + +void QGraphicsWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__WindowFrameSectionAt = slot; +} + +int QGraphicsWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_WindowFrameSectionAt(pos); +} + +void QGraphicsWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Event = slot; +} + +bool QGraphicsWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Event(event); +} + +void QGraphicsWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QGraphicsWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGraphicsWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__CloseEvent = slot; +} + +void QGraphicsWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QGraphicsWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__HideEvent = slot; +} + +void QGraphicsWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QGraphicsWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__MoveEvent = slot; +} + +void QGraphicsWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QGraphicsWidget_override_virtual_PolishEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__PolishEvent = slot; +} + +void QGraphicsWidget_virtualbase_PolishEvent(void* self) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_PolishEvent(); +} + +void QGraphicsWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__GrabMouseEvent = slot; +} + +void QGraphicsWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_GrabMouseEvent(event); +} + +void QGraphicsWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__UngrabMouseEvent = slot; +} + +void QGraphicsWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_UngrabMouseEvent(event); +} + +void QGraphicsWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__GrabKeyboardEvent = slot; +} + +void QGraphicsWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_GrabKeyboardEvent(event); +} + +void QGraphicsWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__UngrabKeyboardEvent = slot; +} + +void QGraphicsWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_UngrabKeyboardEvent(event); +} + +void QGraphicsWidget_Delete(QGraphicsWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgraphicswidget.go b/qt/gen_qgraphicswidget.go index 6307cfe5..6d937e04 100644 --- a/qt/gen_qgraphicswidget.go +++ b/qt/gen_qgraphicswidget.go @@ -21,7 +21,8 @@ const ( ) type QGraphicsWidget struct { - h *C.QGraphicsWidget + h *C.QGraphicsWidget + isSubclass bool *QGraphicsObject *QGraphicsLayoutItem } @@ -40,33 +41,67 @@ func (this *QGraphicsWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsWidget(h *C.QGraphicsWidget) *QGraphicsWidget { +// newQGraphicsWidget constructs the type using only CGO pointers. +func newQGraphicsWidget(h *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsWidget { if h == nil { return nil } - return &QGraphicsWidget{h: h, QGraphicsObject: UnsafeNewQGraphicsObject(unsafe.Pointer(h)), QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(h))} + return &QGraphicsWidget{h: h, + QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), + QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsWidget(h unsafe.Pointer) *QGraphicsWidget { - return newQGraphicsWidget((*C.QGraphicsWidget)(h)) +// UnsafeNewQGraphicsWidget constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsWidget(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsWidget { + if h == nil { + return nil + } + + return &QGraphicsWidget{h: (*C.QGraphicsWidget)(h), + QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), + QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } // NewQGraphicsWidget constructs a new QGraphicsWidget object. func NewQGraphicsWidget() *QGraphicsWidget { - ret := C.QGraphicsWidget_new() - return newQGraphicsWidget(ret) + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWidget_new(&outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsWidget2 constructs a new QGraphicsWidget object. func NewQGraphicsWidget2(parent *QGraphicsItem) *QGraphicsWidget { - ret := C.QGraphicsWidget_new2(parent.cPointer()) - return newQGraphicsWidget(ret) + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWidget_new2(parent.cPointer(), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsWidget3 constructs a new QGraphicsWidget object. func NewQGraphicsWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsWidget { - ret := C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags)) - return newQGraphicsWidget(ret) + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsWidget) MetaObject() *QMetaObject { @@ -98,7 +133,7 @@ func QGraphicsWidget_TrUtf8(s string) string { } func (this *QGraphicsWidget) Layout() *QGraphicsLayout { - return UnsafeNewQGraphicsLayout(unsafe.Pointer(C.QGraphicsWidget_Layout(this.h))) + return UnsafeNewQGraphicsLayout(unsafe.Pointer(C.QGraphicsWidget_Layout(this.h)), nil) } func (this *QGraphicsWidget) SetLayout(layout *QGraphicsLayout) { @@ -122,7 +157,7 @@ func (this *QGraphicsWidget) UnsetLayoutDirection() { } func (this *QGraphicsWidget) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsWidget_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsWidget_Style(this.h)), nil) } func (this *QGraphicsWidget) SetStyle(style *QStyle) { @@ -275,7 +310,7 @@ func QGraphicsWidget_SetTabOrder(first *QGraphicsWidget, second *QGraphicsWidget } func (this *QGraphicsWidget) FocusWidget() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsWidget_FocusWidget(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsWidget_FocusWidget(this.h)), nil, nil, nil, nil) } func (this *QGraphicsWidget) GrabShortcut(sequence *QKeySequence) int { @@ -331,7 +366,7 @@ func (this *QGraphicsWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -348,12 +383,12 @@ func (this *QGraphicsWidget) Type() int { return (int)(C.QGraphicsWidget_Type(this.h)) } -func (this *QGraphicsWidget) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsWidget_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsWidget) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsWidget_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsWidget) PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsWidget_PaintWindowFrame(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsWidget) PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsWidget_PaintWindowFrame(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsWidget) BoundingRect() *QRectF { @@ -468,17 +503,789 @@ func (this *QGraphicsWidget) SetAttribute2(attribute WidgetAttribute, on bool) { C.QGraphicsWidget_SetAttribute2(this.h, (C.int)(attribute), (C.bool)(on)) } -func (this *QGraphicsWidget) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsWidget_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsWidget) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsWidget_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsWidget) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsWidget_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_SetGeometry +func miqt_exec_callback_QGraphicsWidget_SetGeometry(self *C.QGraphicsWidget, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsWidget_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsWidget) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsWidget_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_GetContentsMargins +func miqt_exec_callback_QGraphicsWidget_GetContentsMargins(self *C.QGraphicsWidget, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsWidget) callVirtualBase_Type() int { + + return (int)(C.QGraphicsWidget_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsWidget) OnType(slot func(super func() int) int) { + C.QGraphicsWidget_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Type +func miqt_exec_callback_QGraphicsWidget_Type(self *C.QGraphicsWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsWidget_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsWidget) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsWidget_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Paint +func miqt_exec_callback_QGraphicsWidget_Paint(self *C.QGraphicsWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsWidget) callVirtualBase_PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsWidget_virtualbase_PaintWindowFrame(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsWidget) OnPaintWindowFrame(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsWidget_override_virtual_PaintWindowFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_PaintWindowFrame +func miqt_exec_callback_QGraphicsWidget_PaintWindowFrame(self *C.QGraphicsWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsWidget) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsWidget_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsWidget_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_BoundingRect +func miqt_exec_callback_QGraphicsWidget_BoundingRect(self *C.QGraphicsWidget, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsWidget_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsWidget_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Shape +func miqt_exec_callback_QGraphicsWidget_Shape(self *C.QGraphicsWidget, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_InitStyleOption(option *QStyleOption) { + + C.QGraphicsWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QGraphicsWidget) OnInitStyleOption(slot func(super func(option *QStyleOption), option *QStyleOption)) { + C.QGraphicsWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_InitStyleOption +func miqt_exec_callback_QGraphicsWidget_InitStyleOption(self *C.QGraphicsWidget, cb C.intptr_t, option *C.QStyleOption) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOption), option *QStyleOption)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsWidget_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_SizeHint +func miqt_exec_callback_QGraphicsWidget_SizeHint(self *C.QGraphicsWidget, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_UpdateGeometry() { + + C.QGraphicsWidget_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsWidget) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsWidget_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_UpdateGeometry +func miqt_exec_callback_QGraphicsWidget_UpdateGeometry(self *C.QGraphicsWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsWidget) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsWidget_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsWidget_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ItemChange +func miqt_exec_callback_QGraphicsWidget_ItemChange(self *C.QGraphicsWidget, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QGraphicsWidget) PaintWindowFrame3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsWidget_PaintWindowFrame3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsWidget) callVirtualBase_PropertyChange(propertyName string, value *QVariant) *QVariant { + propertyName_ms := C.struct_miqt_string{} + propertyName_ms.data = C.CString(propertyName) + propertyName_ms.len = C.size_t(len(propertyName)) + defer C.free(unsafe.Pointer(propertyName_ms.data)) + + _ret := C.QGraphicsWidget_virtualbase_PropertyChange(unsafe.Pointer(this.h), propertyName_ms, value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnPropertyChange(slot func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) { + C.QGraphicsWidget_override_virtual_PropertyChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_PropertyChange +func miqt_exec_callback_QGraphicsWidget_PropertyChange(self *C.QGraphicsWidget, cb C.intptr_t, propertyName C.struct_miqt_string, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var propertyName_ms C.struct_miqt_string = propertyName + propertyName_ret := C.GoStringN(propertyName_ms.data, C.int(int64(propertyName_ms.len))) + C.free(unsafe.Pointer(propertyName_ms.data)) + slotval1 := propertyName_ret + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PropertyChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsWidget) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsWidget_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_SceneEvent +func miqt_exec_callback_QGraphicsWidget_SceneEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_WindowFrameEvent(e *QEvent) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_WindowFrameEvent(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QGraphicsWidget) OnWindowFrameEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QGraphicsWidget_override_virtual_WindowFrameEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_WindowFrameEvent +func miqt_exec_callback_QGraphicsWidget_WindowFrameEvent(self *C.QGraphicsWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_WindowFrameEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_WindowFrameSectionAt(pos *QPointF) WindowFrameSection { + + return (WindowFrameSection)(C.QGraphicsWidget_virtualbase_WindowFrameSectionAt(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QGraphicsWidget) OnWindowFrameSectionAt(slot func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) { + C.QGraphicsWidget_override_virtual_WindowFrameSectionAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_WindowFrameSectionAt +func miqt_exec_callback_QGraphicsWidget_WindowFrameSectionAt(self *C.QGraphicsWidget, cb C.intptr_t, pos *C.QPointF) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_WindowFrameSectionAt, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Event +func miqt_exec_callback_QGraphicsWidget_Event(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ChangeEvent +func miqt_exec_callback_QGraphicsWidget_ChangeEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QGraphicsWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QGraphicsWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_CloseEvent +func miqt_exec_callback_QGraphicsWidget_CloseEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_FocusInEvent +func miqt_exec_callback_QGraphicsWidget_FocusInEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_FocusNextPrevChild +func miqt_exec_callback_QGraphicsWidget_FocusNextPrevChild(self *C.QGraphicsWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_FocusOutEvent +func miqt_exec_callback_QGraphicsWidget_FocusOutEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QGraphicsWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QGraphicsWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_HideEvent +func miqt_exec_callback_QGraphicsWidget_HideEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_MoveEvent(event *QGraphicsSceneMoveEvent) { + + C.QGraphicsWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnMoveEvent(slot func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) { + C.QGraphicsWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_MoveEvent +func miqt_exec_callback_QGraphicsWidget_MoveEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_PolishEvent() { + + C.QGraphicsWidget_virtualbase_PolishEvent(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsWidget) OnPolishEvent(slot func(super func())) { + C.QGraphicsWidget_override_virtual_PolishEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_PolishEvent +func miqt_exec_callback_QGraphicsWidget_PolishEvent(self *C.QGraphicsWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PolishEvent) + +} + +func (this *QGraphicsWidget) callVirtualBase_ResizeEvent(event *QGraphicsSceneResizeEvent) { + + C.QGraphicsWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnResizeEvent(slot func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) { + C.QGraphicsWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ResizeEvent +func miqt_exec_callback_QGraphicsWidget_ResizeEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGraphicsWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGraphicsWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ShowEvent +func miqt_exec_callback_QGraphicsWidget_ShowEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsWidget_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsWidget_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_HoverMoveEvent +func miqt_exec_callback_QGraphicsWidget_HoverMoveEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsWidget_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsWidget_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent +func miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_GrabMouseEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_GrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnGrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_GrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_GrabMouseEvent +func miqt_exec_callback_QGraphicsWidget_GrabMouseEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_GrabMouseEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_UngrabMouseEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_UngrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnUngrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_UngrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_UngrabMouseEvent +func miqt_exec_callback_QGraphicsWidget_UngrabMouseEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_UngrabMouseEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_GrabKeyboardEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_GrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnGrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_GrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_GrabKeyboardEvent +func miqt_exec_callback_QGraphicsWidget_GrabKeyboardEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_GrabKeyboardEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_UngrabKeyboardEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_UngrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnUngrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_UngrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_UngrabKeyboardEvent +func miqt_exec_callback_QGraphicsWidget_UngrabKeyboardEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_UngrabKeyboardEvent, slotval1) + } // Delete this object from C++ memory. func (this *QGraphicsWidget) Delete() { - C.QGraphicsWidget_Delete(this.h) + C.QGraphicsWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgraphicswidget.h b/qt/gen_qgraphicswidget.h index 02112c16..f44711fc 100644 --- a/qt/gen_qgraphicswidget.h +++ b/qt/gen_qgraphicswidget.h @@ -16,43 +16,71 @@ extern "C" { #ifdef __cplusplus class QAction; +class QCloseEvent; +class QEvent; +class QFocusEvent; class QFont; class QGraphicsItem; class QGraphicsLayout; +class QGraphicsLayoutItem; +class QGraphicsObject; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMoveEvent; +class QGraphicsSceneResizeEvent; class QGraphicsWidget; +class QHideEvent; class QKeySequence; class QMarginsF; class QMetaObject; +class QObject; class QPainter; class QPainterPath; class QPalette; +class QPointF; class QRectF; +class QShowEvent; class QSizeF; class QStyle; +class QStyleOption; class QStyleOptionGraphicsItem; +class QVariant; class QWidget; #else typedef struct QAction QAction; +typedef struct QCloseEvent QCloseEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QGraphicsItem QGraphicsItem; typedef struct QGraphicsLayout QGraphicsLayout; +typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QGraphicsObject QGraphicsObject; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMoveEvent QGraphicsSceneMoveEvent; +typedef struct QGraphicsSceneResizeEvent QGraphicsSceneResizeEvent; typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QHideEvent QHideEvent; typedef struct QKeySequence QKeySequence; typedef struct QMarginsF QMarginsF; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPainterPath QPainterPath; typedef struct QPalette QPalette; +typedef struct QPointF QPointF; typedef struct QRectF QRectF; +typedef struct QShowEvent QShowEvent; typedef struct QSizeF QSizeF; typedef struct QStyle QStyle; +typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsWidget* QGraphicsWidget_new(); -QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent); -QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self); void* QGraphicsWidget_Metacast(QGraphicsWidget* self, const char* param1); struct miqt_string QGraphicsWidget_Tr(const char* s); @@ -109,8 +137,8 @@ struct miqt_array /* of QAction* */ QGraphicsWidget_Actions(const QGraphicsWidg void QGraphicsWidget_SetAttribute(QGraphicsWidget* self, int attribute); bool QGraphicsWidget_TestAttribute(const QGraphicsWidget* self, int attribute); int QGraphicsWidget_Type(const QGraphicsWidget* self); -void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option); -void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); QRectF* QGraphicsWidget_BoundingRect(const QGraphicsWidget* self); QPainterPath* QGraphicsWidget_Shape(const QGraphicsWidget* self); void QGraphicsWidget_GeometryChanged(QGraphicsWidget* self); @@ -118,6 +146,31 @@ void QGraphicsWidget_connect_GeometryChanged(QGraphicsWidget* self, intptr_t slo void QGraphicsWidget_LayoutChanged(QGraphicsWidget* self); void QGraphicsWidget_connect_LayoutChanged(QGraphicsWidget* self, intptr_t slot); bool QGraphicsWidget_Close(QGraphicsWidget* self); +void QGraphicsWidget_InitStyleOption(const QGraphicsWidget* self, QStyleOption* option); +QSizeF* QGraphicsWidget_SizeHint(const QGraphicsWidget* self, int which, QSizeF* constraint); +void QGraphicsWidget_UpdateGeometry(QGraphicsWidget* self); +QVariant* QGraphicsWidget_ItemChange(QGraphicsWidget* self, int change, QVariant* value); +QVariant* QGraphicsWidget_PropertyChange(QGraphicsWidget* self, struct miqt_string propertyName, QVariant* value); +bool QGraphicsWidget_SceneEvent(QGraphicsWidget* self, QEvent* event); +bool QGraphicsWidget_WindowFrameEvent(QGraphicsWidget* self, QEvent* e); +int QGraphicsWidget_WindowFrameSectionAt(const QGraphicsWidget* self, QPointF* pos); +bool QGraphicsWidget_Event(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_ChangeEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_CloseEvent(QGraphicsWidget* self, QCloseEvent* event); +void QGraphicsWidget_FocusInEvent(QGraphicsWidget* self, QFocusEvent* event); +bool QGraphicsWidget_FocusNextPrevChild(QGraphicsWidget* self, bool next); +void QGraphicsWidget_FocusOutEvent(QGraphicsWidget* self, QFocusEvent* event); +void QGraphicsWidget_HideEvent(QGraphicsWidget* self, QHideEvent* event); +void QGraphicsWidget_MoveEvent(QGraphicsWidget* self, QGraphicsSceneMoveEvent* event); +void QGraphicsWidget_PolishEvent(QGraphicsWidget* self); +void QGraphicsWidget_ResizeEvent(QGraphicsWidget* self, QGraphicsSceneResizeEvent* event); +void QGraphicsWidget_ShowEvent(QGraphicsWidget* self, QShowEvent* event); +void QGraphicsWidget_HoverMoveEvent(QGraphicsWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_HoverLeaveEvent(QGraphicsWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_GrabMouseEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_UngrabMouseEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_GrabKeyboardEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_UngrabKeyboardEvent(QGraphicsWidget* self, QEvent* event); struct miqt_string QGraphicsWidget_Tr2(const char* s, const char* c); struct miqt_string QGraphicsWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsWidget_TrUtf82(const char* s, const char* c); @@ -126,9 +179,71 @@ int QGraphicsWidget_GrabShortcut2(QGraphicsWidget* self, QKeySequence* sequence, void QGraphicsWidget_SetShortcutEnabled2(QGraphicsWidget* self, int id, bool enabled); void QGraphicsWidget_SetShortcutAutoRepeat2(QGraphicsWidget* self, int id, bool enabled); void QGraphicsWidget_SetAttribute2(QGraphicsWidget* self, int attribute, bool on); -void QGraphicsWidget_Paint3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsWidget_PaintWindowFrame3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsWidget_Delete(QGraphicsWidget* self); +void QGraphicsWidget_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsWidget_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsWidget_virtualbase_Type(const void* self); +void QGraphicsWidget_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWidget_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsWidget_virtualbase_BoundingRect(const void* self); +void QGraphicsWidget_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsWidget_virtualbase_Shape(const void* self); +void QGraphicsWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option); +void QGraphicsWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_UpdateGeometry(void* self); +void QGraphicsWidget_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsWidget_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsWidget_override_virtual_PropertyChange(void* self, intptr_t slot); +QVariant* QGraphicsWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value); +void QGraphicsWidget_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e); +void QGraphicsWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot); +int QGraphicsWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos); +void QGraphicsWidget_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_Event(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGraphicsWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGraphicsWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event); +void QGraphicsWidget_override_virtual_PolishEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_PolishEvent(void* self); +void QGraphicsWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event); +void QGraphicsWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsWidget_Delete(QGraphicsWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgridlayout.cpp b/qt/gen_qgridlayout.cpp index b7ef1618..4ed240cb 100644 --- a/qt/gen_qgridlayout.cpp +++ b/qt/gen_qgridlayout.cpp @@ -1,7 +1,9 @@ +#include #include #include #include #include +#include #include #include #include @@ -12,12 +14,464 @@ #include "gen_qgridlayout.h" #include "_cgo_export.h" -QGridLayout* QGridLayout_new(QWidget* parent) { - return new QGridLayout(parent); +class MiqtVirtualQGridLayout : public virtual QGridLayout { +public: + + MiqtVirtualQGridLayout(QWidget* parent): QGridLayout(parent) {}; + MiqtVirtualQGridLayout(): QGridLayout() {}; + + virtual ~MiqtVirtualQGridLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QGridLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGridLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QGridLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QGridLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGridLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QGridLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QGridLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGridLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QGridLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QGridLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QGridLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QGridLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QGridLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGridLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QGridLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QGridLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGridLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QGridLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QGridLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QGridLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGridLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGridLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGridLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int index) const override { + if (handle__ItemAt == 0) { + return QGridLayout::itemAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QGridLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int index) const { + + return QGridLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int index) override { + if (handle__TakeAt == 0) { + return QGridLayout::takeAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QGridLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int index) { + + return QGridLayout::takeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGridLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGridLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QGridLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QGridLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QGridLayout::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItemWithQLayoutItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItemWithQLayoutItem == 0) { + QGridLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QGridLayout_AddItemWithQLayoutItem(this, handle__AddItemWithQLayoutItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItemWithQLayoutItem(QLayoutItem* param1) { + + QGridLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QGridLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QGridLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QGridLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QGridLayout::indexOf(param1); + } + + QWidget* sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGridLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QGridLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QGridLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QGridLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QGridLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QGridLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QGridLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QGridLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QGridLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QGridLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QGridLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QGridLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QGridLayout::childEvent(e); + + } + +}; + +void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(parent); + *outptr_QGridLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QGridLayout* QGridLayout_new2() { - return new QGridLayout(); +void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(); + *outptr_QGridLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QGridLayout_MetaObject(const QGridLayout* self) { @@ -284,7 +738,163 @@ void QGridLayout_AddItem6(QGridLayout* self, QLayoutItem* item, int row, int col self->addItem(item, static_cast(row), static_cast(column), static_cast(rowSpan), static_cast(columnSpan), static_cast(param6)); } -void QGridLayout_Delete(QGridLayout* self) { - delete self; +void QGridLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QGridLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_SizeHint(); +} + +void QGridLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QGridLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QGridLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QGridLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QGridLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QGridLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QGridLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QGridLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QGridLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QGridLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QGridLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QGridLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QGridLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Invalidate = slot; +} + +void QGridLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGridLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QGridLayout_virtualbase_ItemAt(const void* self, int index) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_ItemAt(index); +} + +void QGridLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QGridLayout_virtualbase_TakeAt(void* self, int index) { + return ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_TakeAt(index); +} + +void QGridLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Count = slot; +} + +int QGridLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_Count(); +} + +void QGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGridLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QGridLayout_override_virtual_AddItemWithQLayoutItem(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__AddItemWithQLayoutItem = slot; +} + +void QGridLayout_virtualbase_AddItemWithQLayoutItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_AddItemWithQLayoutItem(param1); +} + +void QGridLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QGridLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_Geometry(); +} + +void QGridLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__IndexOf = slot; +} + +int QGridLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QGridLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QGridLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QGridLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ControlTypes = slot; +} + +int QGridLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QGridLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QGridLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_Layout(); +} + +void QGridLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ChildEvent = slot; +} + +void QGridLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QGridLayout_Delete(QGridLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgridlayout.go b/qt/gen_qgridlayout.go index 5beefdb5..e63ef993 100644 --- a/qt/gen_qgridlayout.go +++ b/qt/gen_qgridlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGridLayout struct { - h *C.QGridLayout + h *C.QGridLayout + isSubclass bool *QLayout } @@ -32,27 +34,49 @@ func (this *QGridLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGridLayout(h *C.QGridLayout) *QGridLayout { +// newQGridLayout constructs the type using only CGO pointers. +func newQGridLayout(h *C.QGridLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QGridLayout { if h == nil { return nil } - return &QGridLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QGridLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQGridLayout(h unsafe.Pointer) *QGridLayout { - return newQGridLayout((*C.QGridLayout)(h)) +// UnsafeNewQGridLayout constructs the type using only unsafe pointers. +func UnsafeNewQGridLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QGridLayout { + if h == nil { + return nil + } + + return &QGridLayout{h: (*C.QGridLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQGridLayout constructs a new QGridLayout object. func NewQGridLayout(parent *QWidget) *QGridLayout { - ret := C.QGridLayout_new(parent.cPointer()) - return newQGridLayout(ret) + var outptr_QGridLayout *C.QGridLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QGridLayout_new(parent.cPointer(), &outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQGridLayout2 constructs a new QGridLayout object. func NewQGridLayout2() *QGridLayout { - ret := C.QGridLayout_new2() - return newQGridLayout(ret) + var outptr_QGridLayout *C.QGridLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QGridLayout_new2(&outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QGridLayout) MetaObject() *QMetaObject { @@ -327,9 +351,452 @@ func (this *QGridLayout) AddItem6(item *QLayoutItem, row int, column int, rowSpa C.QGridLayout_AddItem6(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(rowSpan), (C.int)(columnSpan), (C.int)(param6)) } +func (this *QGridLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QGridLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QGridLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_SizeHint +func miqt_exec_callback_QGridLayout_SizeHint(self *C.QGridLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QGridLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QGridLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_MinimumSize +func miqt_exec_callback_QGridLayout_MinimumSize(self *C.QGridLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QGridLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QGridLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_MaximumSize +func miqt_exec_callback_QGridLayout_MaximumSize(self *C.QGridLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QGridLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QGridLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_HasHeightForWidth +func miqt_exec_callback_QGridLayout_HasHeightForWidth(self *C.QGridLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QGridLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGridLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QGridLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_HeightForWidth +func miqt_exec_callback_QGridLayout_HeightForWidth(self *C.QGridLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QGridLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGridLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QGridLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_MinimumHeightForWidth +func miqt_exec_callback_QGridLayout_MinimumHeightForWidth(self *C.QGridLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QGridLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QGridLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ExpandingDirections +func miqt_exec_callback_QGridLayout_ExpandingDirections(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_Invalidate() { + + C.QGridLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGridLayout) OnInvalidate(slot func(super func())) { + C.QGridLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Invalidate +func miqt_exec_callback_QGridLayout_Invalidate(self *C.QGridLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGridLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGridLayout) callVirtualBase_ItemAt(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QGridLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGridLayout) OnItemAt(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QGridLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ItemAt +func miqt_exec_callback_QGridLayout_ItemAt(self *C.QGridLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_TakeAt(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QGridLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGridLayout) OnTakeAt(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QGridLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_TakeAt +func miqt_exec_callback_QGridLayout_TakeAt(self *C.QGridLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_Count() int { + + return (int)(C.QGridLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnCount(slot func(super func() int) int) { + C.QGridLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Count +func miqt_exec_callback_QGridLayout_Count(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QGridLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QGridLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QGridLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_SetGeometry +func miqt_exec_callback_QGridLayout_SetGeometry(self *C.QGridLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QGridLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGridLayout) callVirtualBase_AddItemWithQLayoutItem(param1 *QLayoutItem) { + + C.QGridLayout_virtualbase_AddItemWithQLayoutItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QGridLayout) OnAddItemWithQLayoutItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QGridLayout_override_virtual_AddItemWithQLayoutItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_AddItemWithQLayoutItem +func miqt_exec_callback_QGridLayout_AddItemWithQLayoutItem(self *C.QGridLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QGridLayout{h: self}).callVirtualBase_AddItemWithQLayoutItem, slotval1) + +} + +func (this *QGridLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QGridLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QGridLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Geometry +func miqt_exec_callback_QGridLayout_Geometry(self *C.QGridLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QGridLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QGridLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QGridLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_IndexOf +func miqt_exec_callback_QGridLayout_IndexOf(self *C.QGridLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QGridLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QGridLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_IsEmpty +func miqt_exec_callback_QGridLayout_IsEmpty(self *C.QGridLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QGridLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QGridLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ControlTypes +func miqt_exec_callback_QGridLayout_ControlTypes(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QGridLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QGridLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QGridLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Layout +func miqt_exec_callback_QGridLayout_Layout(self *C.QGridLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QGridLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGridLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QGridLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ChildEvent +func miqt_exec_callback_QGridLayout_ChildEvent(self *C.QGridLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QGridLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QGridLayout) Delete() { - C.QGridLayout_Delete(this.h) + C.QGridLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgridlayout.h b/qt/gen_qgridlayout.h index 5e6448c1..38cd9a4d 100644 --- a/qt/gen_qgridlayout.h +++ b/qt/gen_qgridlayout.h @@ -15,25 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QGridLayout; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QGridLayout QGridLayout; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QGridLayout* QGridLayout_new(QWidget* parent); -QGridLayout* QGridLayout_new2(); +void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QGridLayout_MetaObject(const QGridLayout* self); void* QGridLayout_Metacast(QGridLayout* self, const char* param1); struct miqt_string QGridLayout_Tr(const char* s); @@ -78,6 +82,7 @@ void QGridLayout_SetGeometry(QGridLayout* self, QRect* geometry); void QGridLayout_AddItem(QGridLayout* self, QLayoutItem* item, int row, int column); void QGridLayout_SetDefaultPositioning(QGridLayout* self, int n, int orient); void QGridLayout_GetItemPosition(const QGridLayout* self, int idx, int* row, int* column, int* rowSpan, int* columnSpan); +void QGridLayout_AddItemWithQLayoutItem(QGridLayout* self, QLayoutItem* param1); struct miqt_string QGridLayout_Tr2(const char* s, const char* c); struct miqt_string QGridLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QGridLayout_TrUtf82(const char* s, const char* c); @@ -89,7 +94,45 @@ void QGridLayout_AddLayout6(QGridLayout* self, QLayout* param1, int row, int col void QGridLayout_AddItem4(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan); void QGridLayout_AddItem5(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan, int columnSpan); void QGridLayout_AddItem6(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int param6); -void QGridLayout_Delete(QGridLayout* self); +void QGridLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QGridLayout_virtualbase_SizeHint(const void* self); +void QGridLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QGridLayout_virtualbase_MinimumSize(const void* self); +void QGridLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QGridLayout_virtualbase_MaximumSize(const void* self); +void QGridLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QGridLayout_virtualbase_HasHeightForWidth(const void* self); +void QGridLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QGridLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QGridLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QGridLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QGridLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QGridLayout_virtualbase_ExpandingDirections(const void* self); +void QGridLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGridLayout_virtualbase_Invalidate(void* self); +void QGridLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QGridLayout_virtualbase_ItemAt(const void* self, int index); +void QGridLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QGridLayout_virtualbase_TakeAt(void* self, int index); +void QGridLayout_override_virtual_Count(void* self, intptr_t slot); +int QGridLayout_virtualbase_Count(const void* self); +void QGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGridLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QGridLayout_override_virtual_AddItemWithQLayoutItem(void* self, intptr_t slot); +void QGridLayout_virtualbase_AddItemWithQLayoutItem(void* self, QLayoutItem* param1); +void QGridLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QGridLayout_virtualbase_Geometry(const void* self); +void QGridLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QGridLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QGridLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QGridLayout_virtualbase_IsEmpty(const void* self); +void QGridLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QGridLayout_virtualbase_ControlTypes(const void* self); +void QGridLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QGridLayout_virtualbase_Layout(void* self); +void QGridLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGridLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QGridLayout_Delete(QGridLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qgroupbox.cpp b/qt/gen_qgroupbox.cpp index 6631ff6f..91946e5b 100644 --- a/qt/gen_qgroupbox.cpp +++ b/qt/gen_qgroupbox.cpp @@ -1,30 +1,1084 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qgroupbox.h" #include "_cgo_export.h" -QGroupBox* QGroupBox_new(QWidget* parent) { - return new QGroupBox(parent); +class MiqtVirtualQGroupBox : public virtual QGroupBox { +public: + + MiqtVirtualQGroupBox(QWidget* parent): QGroupBox(parent) {}; + MiqtVirtualQGroupBox(): QGroupBox() {}; + MiqtVirtualQGroupBox(const QString& title): QGroupBox(title) {}; + MiqtVirtualQGroupBox(const QString& title, QWidget* parent): QGroupBox(title, parent) {}; + + virtual ~MiqtVirtualQGroupBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QGroupBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGroupBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QGroupBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGroupBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGroupBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGroupBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGroupBox::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGroupBox::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGroupBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QGroupBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QGroupBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QGroupBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGroupBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGroupBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGroupBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGroupBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGroupBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QGroupBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGroupBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QGroupBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGroupBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QGroupBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QGroupBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QGroupBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QGroupBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QGroupBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QGroupBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QGroupBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QGroupBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGroupBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QGroupBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QGroupBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGroupBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QGroupBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QGroupBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QGroupBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QGroupBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QGroupBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QGroupBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QGroupBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGroupBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QGroupBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGroupBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QGroupBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGroupBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGroupBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGroupBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGroupBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGroupBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGroupBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QGroupBox::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QGroupBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QGroupBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QGroupBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGroupBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QGroupBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGroupBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGroupBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGroupBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QGroupBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QGroupBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QGroupBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QGroupBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QGroupBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGroupBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QGroupBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGroupBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QGroupBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGroupBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QGroupBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QGroupBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QGroupBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGroupBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGroupBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGroupBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGroupBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QGroupBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QGroupBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QGroupBox::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QGroupBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QGroupBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QGroupBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QGroupBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGroupBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QGroupBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QGroupBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QGroupBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QGroupBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QGroupBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QGroupBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QGroupBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QGroupBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QGroupBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QGroupBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QGroupBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGroupBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QGroupBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGroupBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGroupBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGroupBox::focusNextPrevChild(next); + + } + +}; + +void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(parent); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGroupBox* QGroupBox_new2() { - return new QGroupBox(); +void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGroupBox* QGroupBox_new3(struct miqt_string title) { +void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QGroupBox(title_QString); + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent) { +void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QGroupBox(title_QString, parent); + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString, parent); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QGroupBox_MetaObject(const QGroupBox* self) { @@ -115,7 +1169,7 @@ void QGroupBox_Clicked(QGroupBox* self) { } void QGroupBox_connect_Clicked(QGroupBox* self, intptr_t slot) { - QGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=]() { + MiqtVirtualQGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=]() { miqt_exec_callback_QGroupBox_Clicked(slot); }); } @@ -125,7 +1179,7 @@ void QGroupBox_Toggled(QGroupBox* self, bool param1) { } void QGroupBox_connect_Toggled(QGroupBox* self, intptr_t slot) { - QGroupBox::connect(self, static_cast(&QGroupBox::toggled), self, [=](bool param1) { + MiqtVirtualQGroupBox::connect(self, static_cast(&QGroupBox::toggled), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QGroupBox_Toggled(slot, sigval1); }); @@ -180,13 +1234,353 @@ void QGroupBox_Clicked1(QGroupBox* self, bool checked) { } void QGroupBox_connect_Clicked1(QGroupBox* self, intptr_t slot) { - QGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=](bool checked) { + MiqtVirtualQGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QGroupBox_Clicked1(slot, sigval1); }); } -void QGroupBox_Delete(QGroupBox* self) { - delete self; +void QGroupBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QGroupBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QGroupBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__Event = slot; +} + +bool QGroupBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_Event(event); +} + +void QGroupBox_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ChildEvent = slot; +} + +void QGroupBox_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ChildEvent(event); +} + +void QGroupBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ResizeEvent = slot; +} + +void QGroupBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGroupBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__PaintEvent = slot; +} + +void QGroupBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QGroupBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__FocusInEvent = slot; +} + +void QGroupBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGroupBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ChangeEvent = slot; +} + +void QGroupBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGroupBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MousePressEvent = slot; +} + +void QGroupBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGroupBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGroupBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGroupBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGroupBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGroupBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DevType = slot; +} + +int QGroupBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_DevType(); +} + +void QGroupBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__SetVisible = slot; +} + +void QGroupBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QGroupBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QGroupBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_SizeHint(); +} + +void QGroupBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__HeightForWidth = slot; +} + +int QGroupBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QGroupBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QGroupBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QGroupBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QGroupBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_PaintEngine(); +} + +void QGroupBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGroupBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGroupBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__WheelEvent = slot; +} + +void QGroupBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QGroupBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QGroupBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGroupBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGroupBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGroupBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QGroupBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGroupBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__EnterEvent = slot; +} + +void QGroupBox_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QGroupBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__LeaveEvent = slot; +} + +void QGroupBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QGroupBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MoveEvent = slot; +} + +void QGroupBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QGroupBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__CloseEvent = slot; +} + +void QGroupBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QGroupBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGroupBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGroupBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__TabletEvent = slot; +} + +void QGroupBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QGroupBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ActionEvent = slot; +} + +void QGroupBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QGroupBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QGroupBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGroupBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QGroupBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGroupBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGroupBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGroupBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DropEvent = slot; +} + +void QGroupBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DropEvent(event); +} + +void QGroupBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ShowEvent = slot; +} + +void QGroupBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QGroupBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__HideEvent = slot; +} + +void QGroupBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_HideEvent(event); +} + +void QGroupBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__NativeEvent = slot; +} + +bool QGroupBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QGroupBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__Metric = slot; +} + +int QGroupBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_Metric(param1); +} + +void QGroupBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InitPainter = slot; +} + +void QGroupBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QGroupBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QGroupBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_Redirected(offset); +} + +void QGroupBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QGroupBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_SharedPainter(); +} + +void QGroupBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QGroupBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QGroupBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGroupBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QGroupBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGroupBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGroupBox_Delete(QGroupBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qgroupbox.go b/qt/gen_qgroupbox.go index eaf7d1a2..e2c9a14d 100644 --- a/qt/gen_qgroupbox.go +++ b/qt/gen_qgroupbox.go @@ -15,7 +15,8 @@ import ( ) type QGroupBox struct { - h *C.QGroupBox + h *C.QGroupBox + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QGroupBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGroupBox(h *C.QGroupBox) *QGroupBox { +// newQGroupBox constructs the type using only CGO pointers. +func newQGroupBox(h *C.QGroupBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGroupBox { if h == nil { return nil } - return &QGroupBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QGroupBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQGroupBox(h unsafe.Pointer) *QGroupBox { - return newQGroupBox((*C.QGroupBox)(h)) +// UnsafeNewQGroupBox constructs the type using only unsafe pointers. +func UnsafeNewQGroupBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGroupBox { + if h == nil { + return nil + } + + return &QGroupBox{h: (*C.QGroupBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQGroupBox constructs a new QGroupBox object. func NewQGroupBox(parent *QWidget) *QGroupBox { - ret := C.QGroupBox_new(parent.cPointer()) - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new(parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGroupBox2 constructs a new QGroupBox object. func NewQGroupBox2() *QGroupBox { - ret := C.QGroupBox_new2() - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new2(&outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGroupBox3 constructs a new QGroupBox object. @@ -62,8 +85,15 @@ func NewQGroupBox3(title string) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QGroupBox_new3(title_ms) - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new3(title_ms, &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGroupBox4 constructs a new QGroupBox object. @@ -72,8 +102,15 @@ func NewQGroupBox4(title string, parent *QWidget) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QGroupBox_new4(title_ms, parent.cPointer()) - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new4(title_ms, parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QGroupBox) MetaObject() *QMetaObject { @@ -259,9 +296,998 @@ func miqt_exec_callback_QGroupBox_Clicked1(cb C.intptr_t, checked C.bool) { gofunc(slotval1) } +func (this *QGroupBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QGroupBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGroupBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QGroupBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MinimumSizeHint +func miqt_exec_callback_QGroupBox_MinimumSizeHint(self *C.QGroupBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGroupBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGroupBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGroupBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_Event +func miqt_exec_callback_QGroupBox_Event(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGroupBox_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGroupBox_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ChildEvent +func miqt_exec_callback_QGroupBox_ChildEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QGroupBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QGroupBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ResizeEvent +func miqt_exec_callback_QGroupBox_ResizeEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QGroupBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QGroupBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_PaintEvent +func miqt_exec_callback_QGroupBox_PaintEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGroupBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGroupBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_FocusInEvent +func miqt_exec_callback_QGroupBox_FocusInEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QGroupBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGroupBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ChangeEvent +func miqt_exec_callback_QGroupBox_ChangeEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MousePressEvent +func miqt_exec_callback_QGroupBox_MousePressEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MouseMoveEvent +func miqt_exec_callback_QGroupBox_MouseMoveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MouseReleaseEvent +func miqt_exec_callback_QGroupBox_MouseReleaseEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DevType() int { + + return (int)(C.QGroupBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QGroupBox) OnDevType(slot func(super func() int) int) { + C.QGroupBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DevType +func miqt_exec_callback_QGroupBox_DevType(self *C.QGroupBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_SetVisible(visible bool) { + + C.QGroupBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QGroupBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QGroupBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_SetVisible +func miqt_exec_callback_QGroupBox_SetVisible(self *C.QGroupBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QGroupBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QGroupBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGroupBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QGroupBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_SizeHint +func miqt_exec_callback_QGroupBox_SizeHint(self *C.QGroupBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QGroupBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGroupBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QGroupBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_HeightForWidth +func miqt_exec_callback_QGroupBox_HeightForWidth(self *C.QGroupBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QGroupBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QGroupBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QGroupBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_HasHeightForWidth +func miqt_exec_callback_QGroupBox_HasHeightForWidth(self *C.QGroupBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QGroupBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QGroupBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QGroupBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_PaintEngine +func miqt_exec_callback_QGroupBox_PaintEngine(self *C.QGroupBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MouseDoubleClickEvent +func miqt_exec_callback_QGroupBox_MouseDoubleClickEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QGroupBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QGroupBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_WheelEvent +func miqt_exec_callback_QGroupBox_WheelEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGroupBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGroupBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_KeyPressEvent +func miqt_exec_callback_QGroupBox_KeyPressEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGroupBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGroupBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_KeyReleaseEvent +func miqt_exec_callback_QGroupBox_KeyReleaseEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGroupBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGroupBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_FocusOutEvent +func miqt_exec_callback_QGroupBox_FocusOutEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_EnterEvent(event *QEvent) { + + C.QGroupBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGroupBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_EnterEvent +func miqt_exec_callback_QGroupBox_EnterEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QGroupBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGroupBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_LeaveEvent +func miqt_exec_callback_QGroupBox_LeaveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QGroupBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QGroupBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MoveEvent +func miqt_exec_callback_QGroupBox_MoveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QGroupBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QGroupBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_CloseEvent +func miqt_exec_callback_QGroupBox_CloseEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QGroupBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QGroupBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ContextMenuEvent +func miqt_exec_callback_QGroupBox_ContextMenuEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QGroupBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QGroupBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_TabletEvent +func miqt_exec_callback_QGroupBox_TabletEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QGroupBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QGroupBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ActionEvent +func miqt_exec_callback_QGroupBox_ActionEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QGroupBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QGroupBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DragEnterEvent +func miqt_exec_callback_QGroupBox_DragEnterEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QGroupBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QGroupBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DragMoveEvent +func miqt_exec_callback_QGroupBox_DragMoveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QGroupBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QGroupBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DragLeaveEvent +func miqt_exec_callback_QGroupBox_DragLeaveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QGroupBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QGroupBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DropEvent +func miqt_exec_callback_QGroupBox_DropEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGroupBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGroupBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ShowEvent +func miqt_exec_callback_QGroupBox_ShowEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QGroupBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QGroupBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_HideEvent +func miqt_exec_callback_QGroupBox_HideEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QGroupBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QGroupBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QGroupBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_NativeEvent +func miqt_exec_callback_QGroupBox_NativeEvent(self *C.QGroupBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QGroupBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGroupBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QGroupBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_Metric +func miqt_exec_callback_QGroupBox_Metric(self *C.QGroupBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QGroupBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGroupBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGroupBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InitPainter +func miqt_exec_callback_QGroupBox_InitPainter(self *C.QGroupBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QGroupBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QGroupBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QGroupBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_Redirected +func miqt_exec_callback_QGroupBox_Redirected(self *C.QGroupBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QGroupBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QGroupBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QGroupBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_SharedPainter +func miqt_exec_callback_QGroupBox_SharedPainter(self *C.QGroupBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QGroupBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QGroupBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QGroupBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InputMethodEvent +func miqt_exec_callback_QGroupBox_InputMethodEvent(self *C.QGroupBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QGroupBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGroupBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QGroupBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InputMethodQuery +func miqt_exec_callback_QGroupBox_InputMethodQuery(self *C.QGroupBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGroupBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGroupBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGroupBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_FocusNextPrevChild +func miqt_exec_callback_QGroupBox_FocusNextPrevChild(self *C.QGroupBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QGroupBox) Delete() { - C.QGroupBox_Delete(this.h) + C.QGroupBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qgroupbox.h b/qt/gen_qgroupbox.h index eeee29a5..7577af9f 100644 --- a/qt/gen_qgroupbox.h +++ b/qt/gen_qgroupbox.h @@ -15,21 +15,75 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QGroupBox; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QGroupBox QGroupBox; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QGroupBox* QGroupBox_new(QWidget* parent); -QGroupBox* QGroupBox_new2(); -QGroupBox* QGroupBox_new3(struct miqt_string title); -QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent); +void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QGroupBox_MetaObject(const QGroupBox* self); void* QGroupBox_Metacast(QGroupBox* self, const char* param1); struct miqt_string QGroupBox_Tr(const char* s); @@ -49,13 +103,106 @@ void QGroupBox_Clicked(QGroupBox* self); void QGroupBox_connect_Clicked(QGroupBox* self, intptr_t slot); void QGroupBox_Toggled(QGroupBox* self, bool param1); void QGroupBox_connect_Toggled(QGroupBox* self, intptr_t slot); +bool QGroupBox_Event(QGroupBox* self, QEvent* event); +void QGroupBox_ChildEvent(QGroupBox* self, QChildEvent* event); +void QGroupBox_ResizeEvent(QGroupBox* self, QResizeEvent* event); +void QGroupBox_PaintEvent(QGroupBox* self, QPaintEvent* event); +void QGroupBox_FocusInEvent(QGroupBox* self, QFocusEvent* event); +void QGroupBox_ChangeEvent(QGroupBox* self, QEvent* event); +void QGroupBox_MousePressEvent(QGroupBox* self, QMouseEvent* event); +void QGroupBox_MouseMoveEvent(QGroupBox* self, QMouseEvent* event); +void QGroupBox_MouseReleaseEvent(QGroupBox* self, QMouseEvent* event); struct miqt_string QGroupBox_Tr2(const char* s, const char* c); struct miqt_string QGroupBox_Tr3(const char* s, const char* c, int n); struct miqt_string QGroupBox_TrUtf82(const char* s, const char* c); struct miqt_string QGroupBox_TrUtf83(const char* s, const char* c, int n); void QGroupBox_Clicked1(QGroupBox* self, bool checked); void QGroupBox_connect_Clicked1(QGroupBox* self, intptr_t slot); -void QGroupBox_Delete(QGroupBox* self); +void QGroupBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QGroupBox_virtualbase_MinimumSizeHint(const void* self); +void QGroupBox_override_virtual_Event(void* self, intptr_t slot); +bool QGroupBox_virtualbase_Event(void* self, QEvent* event); +void QGroupBox_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGroupBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QGroupBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QGroupBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGroupBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGroupBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_DevType(void* self, intptr_t slot); +int QGroupBox_virtualbase_DevType(const void* self); +void QGroupBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QGroupBox_virtualbase_SetVisible(void* self, bool visible); +void QGroupBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QGroupBox_virtualbase_SizeHint(const void* self); +void QGroupBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QGroupBox_virtualbase_HeightForWidth(const void* self, int param1); +void QGroupBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QGroupBox_virtualbase_HasHeightForWidth(const void* self); +void QGroupBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QGroupBox_virtualbase_PaintEngine(const void* self); +void QGroupBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QGroupBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGroupBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGroupBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGroupBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_EnterEvent(void* self, QEvent* event); +void QGroupBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QGroupBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QGroupBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGroupBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QGroupBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QGroupBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QGroupBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QGroupBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QGroupBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QGroupBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QGroupBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGroupBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGroupBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QGroupBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QGroupBox_override_virtual_Metric(void* self, intptr_t slot); +int QGroupBox_virtualbase_Metric(const void* self, int param1); +void QGroupBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QGroupBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QGroupBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QGroupBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QGroupBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QGroupBox_virtualbase_SharedPainter(const void* self); +void QGroupBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QGroupBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGroupBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QGroupBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGroupBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGroupBox_Delete(QGroupBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qguiapplication.cpp b/qt/gen_qguiapplication.cpp index c1211083..6459fce1 100644 --- a/qt/gen_qguiapplication.cpp +++ b/qt/gen_qguiapplication.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -21,12 +22,75 @@ #include "gen_qguiapplication.h" #include "_cgo_export.h" -QGuiApplication* QGuiApplication_new(int* argc, char** argv) { - return new QGuiApplication(static_cast(*argc), argv); +class MiqtVirtualQGuiApplication : public virtual QGuiApplication { +public: + + MiqtVirtualQGuiApplication(int& argc, char** argv): QGuiApplication(argc, argv) {}; + MiqtVirtualQGuiApplication(int& argc, char** argv, int param3): QGuiApplication(argc, argv, param3) {}; + + virtual ~MiqtVirtualQGuiApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Notify = 0; + + // Subclass to allow providing a Go implementation + virtual bool notify(QObject* param1, QEvent* param2) override { + if (handle__Notify == 0) { + return QGuiApplication::notify(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QGuiApplication_Notify(this, handle__Notify, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Notify(QObject* param1, QEvent* param2) { + + return QGuiApplication::notify(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QGuiApplication::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QGuiApplication_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QGuiApplication::event(param1); + + } + +}; + +void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv); + *outptr_QGuiApplication = ret; + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3) { - return new QGuiApplication(static_cast(*argc), argv, static_cast(param3)); +void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv, static_cast(param3)); + *outptr_QGuiApplication = ret; + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self) { @@ -339,7 +403,7 @@ void QGuiApplication_FontDatabaseChanged(QGuiApplication* self) { } void QGuiApplication_connect_FontDatabaseChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::fontDatabaseChanged), self, [=]() { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::fontDatabaseChanged), self, [=]() { miqt_exec_callback_QGuiApplication_FontDatabaseChanged(slot); }); } @@ -349,7 +413,7 @@ void QGuiApplication_ScreenAdded(QGuiApplication* self, QScreen* screen) { } void QGuiApplication_connect_ScreenAdded(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::screenAdded), self, [=](QScreen* screen) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::screenAdded), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QGuiApplication_ScreenAdded(slot, sigval1); }); @@ -360,7 +424,7 @@ void QGuiApplication_ScreenRemoved(QGuiApplication* self, QScreen* screen) { } void QGuiApplication_connect_ScreenRemoved(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::screenRemoved), self, [=](QScreen* screen) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::screenRemoved), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QGuiApplication_ScreenRemoved(slot, sigval1); }); @@ -371,7 +435,7 @@ void QGuiApplication_PrimaryScreenChanged(QGuiApplication* self, QScreen* screen } void QGuiApplication_connect_PrimaryScreenChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::primaryScreenChanged), self, [=](QScreen* screen) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::primaryScreenChanged), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(slot, sigval1); }); @@ -382,7 +446,7 @@ void QGuiApplication_LastWindowClosed(QGuiApplication* self) { } void QGuiApplication_connect_LastWindowClosed(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::lastWindowClosed), self, [=]() { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::lastWindowClosed), self, [=]() { miqt_exec_callback_QGuiApplication_LastWindowClosed(slot); }); } @@ -392,7 +456,7 @@ void QGuiApplication_FocusObjectChanged(QGuiApplication* self, QObject* focusObj } void QGuiApplication_connect_FocusObjectChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::focusObjectChanged), self, [=](QObject* focusObject) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::focusObjectChanged), self, [=](QObject* focusObject) { QObject* sigval1 = focusObject; miqt_exec_callback_QGuiApplication_FocusObjectChanged(slot, sigval1); }); @@ -403,7 +467,7 @@ void QGuiApplication_FocusWindowChanged(QGuiApplication* self, QWindow* focusWin } void QGuiApplication_connect_FocusWindowChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::focusWindowChanged), self, [=](QWindow* focusWindow) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::focusWindowChanged), self, [=](QWindow* focusWindow) { QWindow* sigval1 = focusWindow; miqt_exec_callback_QGuiApplication_FocusWindowChanged(slot, sigval1); }); @@ -414,7 +478,7 @@ void QGuiApplication_ApplicationStateChanged(QGuiApplication* self, int state) { } void QGuiApplication_connect_ApplicationStateChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::applicationStateChanged), self, [=](Qt::ApplicationState state) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::applicationStateChanged), self, [=](Qt::ApplicationState state) { Qt::ApplicationState state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QGuiApplication_ApplicationStateChanged(slot, sigval1); @@ -426,7 +490,7 @@ void QGuiApplication_LayoutDirectionChanged(QGuiApplication* self, int direction } void QGuiApplication_connect_LayoutDirectionChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::layoutDirectionChanged), self, [=](Qt::LayoutDirection direction) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::layoutDirectionChanged), self, [=](Qt::LayoutDirection direction) { Qt::LayoutDirection direction_ret = direction; int sigval1 = static_cast(direction_ret); miqt_exec_callback_QGuiApplication_LayoutDirectionChanged(slot, sigval1); @@ -438,7 +502,7 @@ void QGuiApplication_CommitDataRequest(QGuiApplication* self, QSessionManager* s } void QGuiApplication_connect_CommitDataRequest(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::commitDataRequest), self, [=](QSessionManager& sessionManager) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::commitDataRequest), self, [=](QSessionManager& sessionManager) { QSessionManager& sessionManager_ret = sessionManager; // Cast returned reference into pointer QSessionManager* sigval1 = &sessionManager_ret; @@ -451,7 +515,7 @@ void QGuiApplication_SaveStateRequest(QGuiApplication* self, QSessionManager* se } void QGuiApplication_connect_SaveStateRequest(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::saveStateRequest), self, [=](QSessionManager& sessionManager) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::saveStateRequest), self, [=](QSessionManager& sessionManager) { QSessionManager& sessionManager_ret = sessionManager; // Cast returned reference into pointer QSessionManager* sigval1 = &sessionManager_ret; @@ -464,7 +528,7 @@ void QGuiApplication_PaletteChanged(QGuiApplication* self, QPalette* pal) { } void QGuiApplication_connect_PaletteChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::paletteChanged), self, [=](const QPalette& pal) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::paletteChanged), self, [=](const QPalette& pal) { const QPalette& pal_ret = pal; // Cast returned reference into pointer QPalette* sigval1 = const_cast(&pal_ret); @@ -477,7 +541,7 @@ void QGuiApplication_ApplicationDisplayNameChanged(QGuiApplication* self) { } void QGuiApplication_connect_ApplicationDisplayNameChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::applicationDisplayNameChanged), self, [=]() { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::applicationDisplayNameChanged), self, [=]() { miqt_exec_callback_QGuiApplication_ApplicationDisplayNameChanged(slot); }); } @@ -487,7 +551,7 @@ void QGuiApplication_FontChanged(QGuiApplication* self, QFont* font) { } void QGuiApplication_connect_FontChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::fontChanged), self, [=](const QFont& font) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::fontChanged), self, [=](const QFont& font) { const QFont& font_ret = font; // Cast returned reference into pointer QFont* sigval1 = const_cast(&font_ret); @@ -539,7 +603,27 @@ struct miqt_string QGuiApplication_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QGuiApplication_Delete(QGuiApplication* self) { - delete self; +void QGuiApplication_override_virtual_Notify(void* self, intptr_t slot) { + dynamic_cast( (QGuiApplication*)(self) )->handle__Notify = slot; +} + +bool QGuiApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQGuiApplication*)(self) )->virtualbase_Notify(param1, param2); +} + +void QGuiApplication_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGuiApplication*)(self) )->handle__Event = slot; +} + +bool QGuiApplication_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQGuiApplication*)(self) )->virtualbase_Event(param1); +} + +void QGuiApplication_Delete(QGuiApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qguiapplication.go b/qt/gen_qguiapplication.go index 68b0714c..882b9ffe 100644 --- a/qt/gen_qguiapplication.go +++ b/qt/gen_qguiapplication.go @@ -15,7 +15,8 @@ import ( ) type QGuiApplication struct { - h *C.QGuiApplication + h *C.QGuiApplication + isSubclass bool *QCoreApplication } @@ -33,15 +34,23 @@ func (this *QGuiApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGuiApplication(h *C.QGuiApplication) *QGuiApplication { +// newQGuiApplication constructs the type using only CGO pointers. +func newQGuiApplication(h *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QGuiApplication { if h == nil { return nil } - return &QGuiApplication{h: h, QCoreApplication: UnsafeNewQCoreApplication(unsafe.Pointer(h))} + return &QGuiApplication{h: h, + QCoreApplication: newQCoreApplication(h_QCoreApplication, h_QObject)} } -func UnsafeNewQGuiApplication(h unsafe.Pointer) *QGuiApplication { - return newQGuiApplication((*C.QGuiApplication)(h)) +// UnsafeNewQGuiApplication constructs the type using only unsafe pointers. +func UnsafeNewQGuiApplication(h unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QGuiApplication { + if h == nil { + return nil + } + + return &QGuiApplication{h: (*C.QGuiApplication)(h), + QCoreApplication: UnsafeNewQCoreApplication(h_QCoreApplication, h_QObject)} } // NewQGuiApplication constructs a new QGuiApplication object. @@ -56,8 +65,14 @@ func NewQGuiApplication(args []string) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QGuiApplication_new(argc, &argv[0]) - return newQGuiApplication(ret) + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QGuiApplication_new(argc, &argv[0], &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGuiApplication2 constructs a new QGuiApplication object. @@ -72,8 +87,14 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3)) - return newQGuiApplication(ret) + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGuiApplication) MetaObject() *QMetaObject { @@ -139,7 +160,7 @@ func QGuiApplication_AllWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } @@ -149,13 +170,13 @@ func QGuiApplication_TopLevelWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func QGuiApplication_TopLevelAt(pos *QPoint) *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_TopLevelAt(pos.cPointer()))) + return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_TopLevelAt(pos.cPointer())), nil, nil) } func QGuiApplication_SetWindowIcon(icon *QIcon) { @@ -177,11 +198,11 @@ func QGuiApplication_PlatformName() string { } func QGuiApplication_ModalWindow() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_ModalWindow())) + return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_ModalWindow()), nil, nil) } func QGuiApplication_FocusWindow() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_FocusWindow())) + return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_FocusWindow()), nil, nil) } func QGuiApplication_FocusObject() *QObject { @@ -189,7 +210,7 @@ func QGuiApplication_FocusObject() *QObject { } func QGuiApplication_PrimaryScreen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_PrimaryScreen())) + return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_PrimaryScreen()), nil) } func QGuiApplication_Screens() []*QScreen { @@ -197,13 +218,13 @@ func QGuiApplication_Screens() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i]), nil) } return _ret } func QGuiApplication_ScreenAt(point *QPoint) *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_ScreenAt(point.cPointer()))) + return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_ScreenAt(point.cPointer())), nil) } func (this *QGuiApplication) DevicePixelRatio() float64 { @@ -238,7 +259,7 @@ func QGuiApplication_SetFont(font *QFont) { } func QGuiApplication_Clipboard() *QClipboard { - return UnsafeNewQClipboard(unsafe.Pointer(C.QGuiApplication_Clipboard())) + return UnsafeNewQClipboard(unsafe.Pointer(C.QGuiApplication_Clipboard()), nil) } func QGuiApplication_Palette() *QPalette { @@ -281,7 +302,7 @@ func QGuiApplication_IsLeftToRight() bool { } func QGuiApplication_StyleHints() *QStyleHints { - return UnsafeNewQStyleHints(unsafe.Pointer(C.QGuiApplication_StyleHints())) + return UnsafeNewQStyleHints(unsafe.Pointer(C.QGuiApplication_StyleHints()), nil) } func QGuiApplication_SetDesktopSettingsAware(on bool) { @@ -293,7 +314,7 @@ func QGuiApplication_DesktopSettingsAware() bool { } func QGuiApplication_InputMethod() *QInputMethod { - return UnsafeNewQInputMethod(unsafe.Pointer(C.QGuiApplication_InputMethod())) + return UnsafeNewQInputMethod(unsafe.Pointer(C.QGuiApplication_InputMethod()), nil) } func QGuiApplication_SetQuitOnLastWindowClosed(quit bool) { @@ -390,7 +411,7 @@ func miqt_exec_callback_QGuiApplication_ScreenAdded(cb C.intptr_t, screen *C.QSc } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -410,7 +431,7 @@ func miqt_exec_callback_QGuiApplication_ScreenRemoved(cb C.intptr_t, screen *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -430,7 +451,7 @@ func miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(cb C.intptr_t, scre } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -487,7 +508,7 @@ func miqt_exec_callback_QGuiApplication_FocusWindowChanged(cb C.intptr_t, focusW } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWindow(unsafe.Pointer(focusWindow)) + slotval1 := UnsafeNewQWindow(unsafe.Pointer(focusWindow), nil, nil) gofunc(slotval1) } @@ -547,7 +568,7 @@ func miqt_exec_callback_QGuiApplication_CommitDataRequest(cb C.intptr_t, session } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager)) + slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager), nil) gofunc(slotval1) } @@ -567,7 +588,7 @@ func miqt_exec_callback_QGuiApplication_SaveStateRequest(cb C.intptr_t, sessionM } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager)) + slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager), nil) gofunc(slotval1) } @@ -673,9 +694,60 @@ func QGuiApplication_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGuiApplication) callVirtualBase_Notify(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QGuiApplication_virtualbase_Notify(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QGuiApplication) OnNotify(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QGuiApplication_override_virtual_Notify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGuiApplication_Notify +func miqt_exec_callback_QGuiApplication_Notify(self *C.QGuiApplication, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QGuiApplication{h: self}).callVirtualBase_Notify, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGuiApplication) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QGuiApplication_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QGuiApplication) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QGuiApplication_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGuiApplication_Event +func miqt_exec_callback_QGuiApplication_Event(self *C.QGuiApplication, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QGuiApplication{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QGuiApplication) Delete() { - C.QGuiApplication_Delete(this.h) + C.QGuiApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qguiapplication.h b/qt/gen_qguiapplication.h index ae4f5378..f1188523 100644 --- a/qt/gen_qguiapplication.h +++ b/qt/gen_qguiapplication.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QClipboard; +class QCoreApplication; class QCursor; class QEvent; class QFont; @@ -32,6 +33,7 @@ class QStyleHints; class QWindow; #else typedef struct QClipboard QClipboard; +typedef struct QCoreApplication QCoreApplication; typedef struct QCursor QCursor; typedef struct QEvent QEvent; typedef struct QFont QFont; @@ -48,8 +50,8 @@ typedef struct QStyleHints QStyleHints; typedef struct QWindow QWindow; #endif -QGuiApplication* QGuiApplication_new(int* argc, char** argv); -QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3); +void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self); void* QGuiApplication_Metacast(QGuiApplication* self, const char* param1); struct miqt_string QGuiApplication_Tr(const char* s); @@ -133,11 +135,16 @@ void QGuiApplication_ApplicationDisplayNameChanged(QGuiApplication* self); void QGuiApplication_connect_ApplicationDisplayNameChanged(QGuiApplication* self, intptr_t slot); void QGuiApplication_FontChanged(QGuiApplication* self, QFont* font); void QGuiApplication_connect_FontChanged(QGuiApplication* self, intptr_t slot); +bool QGuiApplication_Event(QGuiApplication* self, QEvent* param1); struct miqt_string QGuiApplication_Tr2(const char* s, const char* c); struct miqt_string QGuiApplication_Tr3(const char* s, const char* c, int n); struct miqt_string QGuiApplication_TrUtf82(const char* s, const char* c); struct miqt_string QGuiApplication_TrUtf83(const char* s, const char* c, int n); -void QGuiApplication_Delete(QGuiApplication* self); +void QGuiApplication_override_virtual_Notify(void* self, intptr_t slot); +bool QGuiApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2); +void QGuiApplication_override_virtual_Event(void* self, intptr_t slot); +bool QGuiApplication_virtualbase_Event(void* self, QEvent* param1); +void QGuiApplication_Delete(QGuiApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qhashfunctions.cpp b/qt/gen_qhashfunctions.cpp index 9b3241f1..9f3a3a06 100644 --- a/qt/gen_qhashfunctions.cpp +++ b/qt/gen_qhashfunctions.cpp @@ -4,19 +4,29 @@ #include "gen_qhashfunctions.h" #include "_cgo_export.h" -QtPrivate__QHashCombine* QtPrivate__QHashCombine_new() { - return new QtPrivate::QHashCombine(); +void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine) { + QtPrivate::QHashCombine* ret = new QtPrivate::QHashCombine(); + *outptr_QtPrivate__QHashCombine = ret; } -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self) { - delete self; +void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__QHashCombineCommutative* QtPrivate__QHashCombineCommutative_new() { - return new QtPrivate::QHashCombineCommutative(); +void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative) { + QtPrivate::QHashCombineCommutative* ret = new QtPrivate::QHashCombineCommutative(); + *outptr_QtPrivate__QHashCombineCommutative = ret; } -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self) { - delete self; +void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qhashfunctions.go b/qt/gen_qhashfunctions.go index 02265cc0..ceb2fc37 100644 --- a/qt/gen_qhashfunctions.go +++ b/qt/gen_qhashfunctions.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__QHashCombine struct { - h *C.QtPrivate__QHashCombine + h *C.QtPrivate__QHashCombine + isSubclass bool } func (this *QtPrivate__QHashCombine) cPointer() *C.QtPrivate__QHashCombine { @@ -31,6 +32,7 @@ func (this *QtPrivate__QHashCombine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QHashCombine constructs the type using only CGO pointers. func newQtPrivate__QHashCombine(h *C.QtPrivate__QHashCombine) *QtPrivate__QHashCombine { if h == nil { return nil @@ -38,19 +40,28 @@ func newQtPrivate__QHashCombine(h *C.QtPrivate__QHashCombine) *QtPrivate__QHashC return &QtPrivate__QHashCombine{h: h} } +// UnsafeNewQtPrivate__QHashCombine constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QHashCombine(h unsafe.Pointer) *QtPrivate__QHashCombine { - return newQtPrivate__QHashCombine((*C.QtPrivate__QHashCombine)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QHashCombine{h: (*C.QtPrivate__QHashCombine)(h)} } // NewQtPrivate__QHashCombine constructs a new QtPrivate::QHashCombine object. func NewQtPrivate__QHashCombine() *QtPrivate__QHashCombine { - ret := C.QtPrivate__QHashCombine_new() - return newQtPrivate__QHashCombine(ret) + var outptr_QtPrivate__QHashCombine *C.QtPrivate__QHashCombine = nil + + C.QtPrivate__QHashCombine_new(&outptr_QtPrivate__QHashCombine) + ret := newQtPrivate__QHashCombine(outptr_QtPrivate__QHashCombine) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__QHashCombine) Delete() { - C.QtPrivate__QHashCombine_Delete(this.h) + C.QtPrivate__QHashCombine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -63,7 +74,8 @@ func (this *QtPrivate__QHashCombine) GoGC() { } type QtPrivate__QHashCombineCommutative struct { - h *C.QtPrivate__QHashCombineCommutative + h *C.QtPrivate__QHashCombineCommutative + isSubclass bool } func (this *QtPrivate__QHashCombineCommutative) cPointer() *C.QtPrivate__QHashCombineCommutative { @@ -80,6 +92,7 @@ func (this *QtPrivate__QHashCombineCommutative) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QHashCombineCommutative constructs the type using only CGO pointers. func newQtPrivate__QHashCombineCommutative(h *C.QtPrivate__QHashCombineCommutative) *QtPrivate__QHashCombineCommutative { if h == nil { return nil @@ -87,19 +100,28 @@ func newQtPrivate__QHashCombineCommutative(h *C.QtPrivate__QHashCombineCommutati return &QtPrivate__QHashCombineCommutative{h: h} } +// UnsafeNewQtPrivate__QHashCombineCommutative constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QHashCombineCommutative(h unsafe.Pointer) *QtPrivate__QHashCombineCommutative { - return newQtPrivate__QHashCombineCommutative((*C.QtPrivate__QHashCombineCommutative)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QHashCombineCommutative{h: (*C.QtPrivate__QHashCombineCommutative)(h)} } // NewQtPrivate__QHashCombineCommutative constructs a new QtPrivate::QHashCombineCommutative object. func NewQtPrivate__QHashCombineCommutative() *QtPrivate__QHashCombineCommutative { - ret := C.QtPrivate__QHashCombineCommutative_new() - return newQtPrivate__QHashCombineCommutative(ret) + var outptr_QtPrivate__QHashCombineCommutative *C.QtPrivate__QHashCombineCommutative = nil + + C.QtPrivate__QHashCombineCommutative_new(&outptr_QtPrivate__QHashCombineCommutative) + ret := newQtPrivate__QHashCombineCommutative(outptr_QtPrivate__QHashCombineCommutative) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__QHashCombineCommutative) Delete() { - C.QtPrivate__QHashCombineCommutative_Delete(this.h) + C.QtPrivate__QHashCombineCommutative_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qhashfunctions.h b/qt/gen_qhashfunctions.h index fd704d68..80bd216b 100644 --- a/qt/gen_qhashfunctions.h +++ b/qt/gen_qhashfunctions.h @@ -30,11 +30,11 @@ typedef struct QtPrivate__QHashCombine QtPrivate__QHashCombine; typedef struct QtPrivate__QHashCombineCommutative QtPrivate__QHashCombineCommutative; #endif -QtPrivate__QHashCombine* QtPrivate__QHashCombine_new(); -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self); +void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine); +void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass); -QtPrivate__QHashCombineCommutative* QtPrivate__QHashCombineCommutative_new(); -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self); +void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative); +void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qheaderview.cpp b/qt/gen_qheaderview.cpp index f5f0ee1e..4d5466a1 100644 --- a/qt/gen_qheaderview.cpp +++ b/qt/gen_qheaderview.cpp @@ -1,23 +1,1622 @@ #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qheaderview.h" #include "_cgo_export.h" -QHeaderView* QHeaderView_new(int orientation) { - return new QHeaderView(static_cast(orientation)); +class MiqtVirtualQHeaderView : public virtual QHeaderView { +public: + + MiqtVirtualQHeaderView(Qt::Orientation orientation): QHeaderView(orientation) {}; + MiqtVirtualQHeaderView(Qt::Orientation orientation, QWidget* parent): QHeaderView(orientation, parent) {}; + + virtual ~MiqtVirtualQHeaderView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QHeaderView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QHeaderView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QHeaderView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QHeaderView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHeaderView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QHeaderView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool v) override { + if (handle__SetVisible == 0) { + QHeaderView::setVisible(v); + return; + } + + bool sigval1 = v; + + miqt_exec_callback_QHeaderView_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool v) { + + QHeaderView::setVisible(v); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QHeaderView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QHeaderView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QHeaderView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QHeaderView::reset(); + return; + } + + + miqt_exec_callback_QHeaderView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QHeaderView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& old) override { + if (handle__CurrentChanged == 0) { + QHeaderView::currentChanged(current, old); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& old_ret = old; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&old_ret); + + miqt_exec_callback_QHeaderView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* old) { + + QHeaderView::currentChanged(*current, *old); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QHeaderView::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QHeaderView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QHeaderView::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QHeaderView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QHeaderView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QHeaderView::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QHeaderView::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QHeaderView::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QHeaderView::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QHeaderView::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QHeaderView::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QHeaderView::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QHeaderView::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* e) override { + if (handle__ViewportEvent == 0) { + return QHeaderView::viewportEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QHeaderView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* e) { + + return QHeaderView::viewportEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintSection = 0; + + // Subclass to allow providing a Go implementation + virtual void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const override { + if (handle__PaintSection == 0) { + QHeaderView::paintSection(painter, rect, logicalIndex); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = logicalIndex; + + miqt_exec_callback_QHeaderView_PaintSection(const_cast(this), handle__PaintSection, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintSection(QPainter* painter, QRect* rect, int logicalIndex) const { + + QHeaderView::paintSection(painter, *rect, static_cast(logicalIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SectionSizeFromContents = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sectionSizeFromContents(int logicalIndex) const override { + if (handle__SectionSizeFromContents == 0) { + return QHeaderView::sectionSizeFromContents(logicalIndex); + } + + int sigval1 = logicalIndex; + + QSize* callback_return_value = miqt_exec_callback_QHeaderView_SectionSizeFromContents(const_cast(this), handle__SectionSizeFromContents, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SectionSizeFromContents(int logicalIndex) const { + + return new QSize(QHeaderView::sectionSizeFromContents(static_cast(logicalIndex))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QHeaderView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QHeaderView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QHeaderView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QHeaderView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QHeaderView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QHeaderView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QHeaderView::updateGeometries(); + return; + } + + + miqt_exec_callback_QHeaderView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QHeaderView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QHeaderView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QHeaderView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QHeaderView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QHeaderView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QHeaderView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QHeaderView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QHeaderView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QHeaderView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QHeaderView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QHeaderView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QHeaderView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QHeaderView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QHeaderView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QHeaderView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QHeaderView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QHeaderView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QHeaderView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QHeaderView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QHeaderView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QHeaderView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QHeaderView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction param1, Qt::KeyboardModifiers param2) override { + if (handle__MoveCursor == 0) { + return QHeaderView::moveCursor(param1, param2); + } + + QAbstractItemView::CursorAction param1_ret = param1; + int sigval1 = static_cast(param1_ret); + Qt::KeyboardModifiers param2_ret = param2; + int sigval2 = static_cast(param2_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QHeaderView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int param1, int param2) { + + return new QModelIndex(QHeaderView::moveCursor(static_cast(param1), static_cast(param2))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags) override { + if (handle__SetSelection == 0) { + QHeaderView::setSelection(rect, flags); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags flags_ret = flags; + int sigval2 = static_cast(flags_ret); + + miqt_exec_callback_QHeaderView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int flags) { + + QHeaderView::setSelection(*rect, static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QHeaderView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QHeaderView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QHeaderView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QHeaderView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QHeaderView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QHeaderView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QHeaderView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QHeaderView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QHeaderView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QHeaderView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QHeaderView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QHeaderView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QHeaderView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QHeaderView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QHeaderView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QHeaderView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QHeaderView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QHeaderView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QHeaderView::selectAll(); + return; + } + + + miqt_exec_callback_QHeaderView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QHeaderView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QHeaderView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QHeaderView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QHeaderView::updateEditorData(); + return; + } + + + miqt_exec_callback_QHeaderView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QHeaderView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QHeaderView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QHeaderView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QHeaderView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QHeaderView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QHeaderView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QHeaderView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QHeaderView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QHeaderView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QHeaderView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QHeaderView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QHeaderView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QHeaderView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QHeaderView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QHeaderView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QHeaderView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QHeaderView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QHeaderView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QHeaderView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QHeaderView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QHeaderView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QHeaderView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QHeaderView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QHeaderView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QHeaderView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QHeaderView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QHeaderView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QHeaderView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QHeaderView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QHeaderView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QHeaderView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QHeaderView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QHeaderView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QHeaderView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QHeaderView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QHeaderView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QHeaderView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QHeaderView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QHeaderView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QHeaderView::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QHeaderView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QHeaderView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QHeaderView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QHeaderView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QHeaderView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QHeaderView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QHeaderView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QHeaderView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QHeaderView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QHeaderView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QHeaderView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QHeaderView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QHeaderView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QHeaderView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QHeaderView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QHeaderView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QHeaderView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QHeaderView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QHeaderView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QHeaderView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QHeaderView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QHeaderView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QHeaderView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QHeaderView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QHeaderView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QHeaderView::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QHeaderView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHeaderView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QHeaderView::viewportSizeHint()); + + } + +}; + +void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation)); + *outptr_QHeaderView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QHeaderView* QHeaderView_new2(int orientation, QWidget* parent) { - return new QHeaderView(static_cast(orientation), parent); +void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation), parent); + *outptr_QHeaderView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QHeaderView_MetaObject(const QHeaderView* self) { @@ -337,7 +1936,7 @@ void QHeaderView_SectionMoved(QHeaderView* self, int logicalIndex, int oldVisual } void QHeaderView_connect_SectionMoved(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionMoved), self, [=](int logicalIndex, int oldVisualIndex, int newVisualIndex) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionMoved), self, [=](int logicalIndex, int oldVisualIndex, int newVisualIndex) { int sigval1 = logicalIndex; int sigval2 = oldVisualIndex; int sigval3 = newVisualIndex; @@ -350,7 +1949,7 @@ void QHeaderView_SectionResized(QHeaderView* self, int logicalIndex, int oldSize } void QHeaderView_connect_SectionResized(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionResized), self, [=](int logicalIndex, int oldSize, int newSize) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionResized), self, [=](int logicalIndex, int oldSize, int newSize) { int sigval1 = logicalIndex; int sigval2 = oldSize; int sigval3 = newSize; @@ -363,7 +1962,7 @@ void QHeaderView_SectionPressed(QHeaderView* self, int logicalIndex) { } void QHeaderView_connect_SectionPressed(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionPressed), self, [=](int logicalIndex) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionPressed), self, [=](int logicalIndex) { int sigval1 = logicalIndex; miqt_exec_callback_QHeaderView_SectionPressed(slot, sigval1); }); @@ -374,7 +1973,7 @@ void QHeaderView_SectionClicked(QHeaderView* self, int logicalIndex) { } void QHeaderView_connect_SectionClicked(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionClicked), self, [=](int logicalIndex) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionClicked), self, [=](int logicalIndex) { int sigval1 = logicalIndex; miqt_exec_callback_QHeaderView_SectionClicked(slot, sigval1); }); @@ -385,7 +1984,7 @@ void QHeaderView_SectionEntered(QHeaderView* self, int logicalIndex) { } void QHeaderView_connect_SectionEntered(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionEntered), self, [=](int logicalIndex) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionEntered), self, [=](int logicalIndex) { int sigval1 = logicalIndex; miqt_exec_callback_QHeaderView_SectionEntered(slot, sigval1); }); @@ -396,7 +1995,7 @@ void QHeaderView_SectionDoubleClicked(QHeaderView* self, int logicalIndex) { } void QHeaderView_connect_SectionDoubleClicked(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionDoubleClicked), self, [=](int logicalIndex) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionDoubleClicked), self, [=](int logicalIndex) { int sigval1 = logicalIndex; miqt_exec_callback_QHeaderView_SectionDoubleClicked(slot, sigval1); }); @@ -407,7 +2006,7 @@ void QHeaderView_SectionCountChanged(QHeaderView* self, int oldCount, int newCou } void QHeaderView_connect_SectionCountChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionCountChanged), self, [=](int oldCount, int newCount) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionCountChanged), self, [=](int oldCount, int newCount) { int sigval1 = oldCount; int sigval2 = newCount; miqt_exec_callback_QHeaderView_SectionCountChanged(slot, sigval1, sigval2); @@ -419,7 +2018,7 @@ void QHeaderView_SectionHandleDoubleClicked(QHeaderView* self, int logicalIndex) } void QHeaderView_connect_SectionHandleDoubleClicked(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionHandleDoubleClicked), self, [=](int logicalIndex) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionHandleDoubleClicked), self, [=](int logicalIndex) { int sigval1 = logicalIndex; miqt_exec_callback_QHeaderView_SectionHandleDoubleClicked(slot, sigval1); }); @@ -430,7 +2029,7 @@ void QHeaderView_GeometriesChanged(QHeaderView* self) { } void QHeaderView_connect_GeometriesChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::geometriesChanged), self, [=]() { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::geometriesChanged), self, [=]() { miqt_exec_callback_QHeaderView_GeometriesChanged(slot); }); } @@ -440,7 +2039,7 @@ void QHeaderView_SortIndicatorChanged(QHeaderView* self, int logicalIndex, int o } void QHeaderView_connect_SortIndicatorChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sortIndicatorChanged), self, [=](int logicalIndex, Qt::SortOrder order) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sortIndicatorChanged), self, [=](int logicalIndex, Qt::SortOrder order) { int sigval1 = logicalIndex; Qt::SortOrder order_ret = order; int sigval2 = static_cast(order_ret); @@ -492,7 +2091,507 @@ struct miqt_string QHeaderView_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QHeaderView_Delete(QHeaderView* self) { - delete self; +void QHeaderView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetModel = slot; +} + +void QHeaderView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetModel(model); +} + +void QHeaderView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SizeHint = slot; +} + +QSize* QHeaderView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SizeHint(); +} + +void QHeaderView_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetVisible = slot; +} + +void QHeaderView_virtualbase_SetVisible(void* self, bool v) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetVisible(v); +} + +void QHeaderView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DoItemsLayout = slot; +} + +void QHeaderView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QHeaderView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__Reset = slot; +} + +void QHeaderView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_Reset(); +} + +void QHeaderView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__CurrentChanged = slot; +} + +void QHeaderView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* old) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_CurrentChanged(current, old); +} + +void QHeaderView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__Event = slot; +} + +bool QHeaderView_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_Event(e); +} + +void QHeaderView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__PaintEvent = slot; +} + +void QHeaderView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_PaintEvent(e); +} + +void QHeaderView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MousePressEvent = slot; +} + +void QHeaderView_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MousePressEvent(e); +} + +void QHeaderView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QHeaderView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QHeaderView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QHeaderView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QHeaderView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QHeaderView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QHeaderView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ViewportEvent = slot; +} + +bool QHeaderView_virtualbase_ViewportEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ViewportEvent(e); +} + +void QHeaderView_override_virtual_PaintSection(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__PaintSection = slot; +} + +void QHeaderView_virtualbase_PaintSection(const void* self, QPainter* painter, QRect* rect, int logicalIndex) { + ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_PaintSection(painter, rect, logicalIndex); +} + +void QHeaderView_override_virtual_SectionSizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SectionSizeFromContents = slot; +} + +QSize* QHeaderView_virtualbase_SectionSizeFromContents(const void* self, int logicalIndex) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SectionSizeFromContents(logicalIndex); +} + +void QHeaderView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__HorizontalOffset = slot; +} + +int QHeaderView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QHeaderView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VerticalOffset = slot; +} + +int QHeaderView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_VerticalOffset(); +} + +void QHeaderView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__UpdateGeometries = slot; +} + +void QHeaderView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QHeaderView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QHeaderView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QHeaderView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DataChanged = slot; +} + +void QHeaderView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QHeaderView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__RowsInserted = slot; +} + +void QHeaderView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QHeaderView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VisualRect = slot; +} + +QRect* QHeaderView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_VisualRect(index); +} + +void QHeaderView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ScrollTo = slot; +} + +void QHeaderView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QHeaderView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QHeaderView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_IndexAt(p); +} + +void QHeaderView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QHeaderView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QHeaderView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QHeaderView_virtualbase_MoveCursor(void* self, int param1, int param2) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MoveCursor(param1, param2); +} + +void QHeaderView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetSelection = slot; +} + +void QHeaderView_virtualbase_SetSelection(void* self, QRect* rect, int flags) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetSelection(rect, flags); +} + +void QHeaderView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetSelectionModel = slot; +} + +void QHeaderView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QHeaderView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__KeyboardSearch = slot; +} + +void QHeaderView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QHeaderView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SizeHintForRow = slot; +} + +int QHeaderView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QHeaderView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QHeaderView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QHeaderView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QHeaderView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QHeaderView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetRootIndex = slot; +} + +void QHeaderView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QHeaderView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectAll = slot; +} + +void QHeaderView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectAll(); +} + +void QHeaderView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QHeaderView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QHeaderView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__UpdateEditorData = slot; +} + +void QHeaderView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QHeaderView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QHeaderView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QHeaderView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QHeaderView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QHeaderView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QHeaderView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QHeaderView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QHeaderView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QHeaderView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QHeaderView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QHeaderView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__CloseEditor = slot; +} + +void QHeaderView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QHeaderView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__CommitData = slot; +} + +void QHeaderView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_CommitData(editor); +} + +void QHeaderView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__EditorDestroyed = slot; +} + +void QHeaderView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QHeaderView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QHeaderView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QHeaderView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__Edit2 = slot; +} + +bool QHeaderView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QHeaderView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectionCommand = slot; +} + +int QHeaderView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QHeaderView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__StartDrag = slot; +} + +void QHeaderView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QHeaderView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QHeaderView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_ViewOptions(); +} + +void QHeaderView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QHeaderView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QHeaderView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DragEnterEvent = slot; +} + +void QHeaderView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QHeaderView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DragMoveEvent = slot; +} + +void QHeaderView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QHeaderView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QHeaderView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QHeaderView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DropEvent = slot; +} + +void QHeaderView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DropEvent(event); +} + +void QHeaderView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__FocusInEvent = slot; +} + +void QHeaderView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QHeaderView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__FocusOutEvent = slot; +} + +void QHeaderView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QHeaderView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__KeyPressEvent = slot; +} + +void QHeaderView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QHeaderView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ResizeEvent = slot; +} + +void QHeaderView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QHeaderView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__TimerEvent = slot; +} + +void QHeaderView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_TimerEvent(event); +} + +void QHeaderView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InputMethodEvent = slot; +} + +void QHeaderView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QHeaderView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__EventFilter = slot; +} + +bool QHeaderView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_EventFilter(object, event); +} + +void QHeaderView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QHeaderView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QHeaderView_Delete(QHeaderView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qheaderview.go b/qt/gen_qheaderview.go index 31e2a241..049ce369 100644 --- a/qt/gen_qheaderview.go +++ b/qt/gen_qheaderview.go @@ -25,7 +25,8 @@ const ( ) type QHeaderView struct { - h *C.QHeaderView + h *C.QHeaderView + isSubclass bool *QAbstractItemView } @@ -43,27 +44,55 @@ func (this *QHeaderView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHeaderView(h *C.QHeaderView) *QHeaderView { +// newQHeaderView constructs the type using only CGO pointers. +func newQHeaderView(h *C.QHeaderView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QHeaderView { if h == nil { return nil } - return &QHeaderView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QHeaderView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQHeaderView(h unsafe.Pointer) *QHeaderView { - return newQHeaderView((*C.QHeaderView)(h)) +// UnsafeNewQHeaderView constructs the type using only unsafe pointers. +func UnsafeNewQHeaderView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QHeaderView { + if h == nil { + return nil + } + + return &QHeaderView{h: (*C.QHeaderView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQHeaderView constructs a new QHeaderView object. func NewQHeaderView(orientation Orientation) *QHeaderView { - ret := C.QHeaderView_new((C.int)(orientation)) - return newQHeaderView(ret) + var outptr_QHeaderView *C.QHeaderView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QHeaderView_new((C.int)(orientation), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQHeaderView2 constructs a new QHeaderView object. func NewQHeaderView2(orientation Orientation, parent *QWidget) *QHeaderView { - ret := C.QHeaderView_new2((C.int)(orientation), parent.cPointer()) - return newQHeaderView(ret) + var outptr_QHeaderView *C.QHeaderView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QHeaderView_new2((C.int)(orientation), parent.cPointer(), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QHeaderView) MetaObject() *QMetaObject { @@ -628,9 +657,1520 @@ func QHeaderView_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QHeaderView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QHeaderView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QHeaderView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QHeaderView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetModel +func miqt_exec_callback_QHeaderView_SetModel(self *C.QHeaderView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QHeaderView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QHeaderView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SizeHint +func miqt_exec_callback_QHeaderView_SizeHint(self *C.QHeaderView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_SetVisible(v bool) { + + C.QHeaderView_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(v)) + +} +func (this *QHeaderView) OnSetVisible(slot func(super func(v bool), v bool)) { + C.QHeaderView_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetVisible +func miqt_exec_callback_QHeaderView_SetVisible(self *C.QHeaderView, cb C.intptr_t, v C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(v bool), v bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(v) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DoItemsLayout() { + + C.QHeaderView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnDoItemsLayout(slot func(super func())) { + C.QHeaderView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DoItemsLayout +func miqt_exec_callback_QHeaderView_DoItemsLayout(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QHeaderView) callVirtualBase_Reset() { + + C.QHeaderView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnReset(slot func(super func())) { + C.QHeaderView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_Reset +func miqt_exec_callback_QHeaderView_Reset(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_Reset) + +} + +func (this *QHeaderView) callVirtualBase_CurrentChanged(current *QModelIndex, old *QModelIndex) { + + C.QHeaderView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), old.cPointer()) + +} +func (this *QHeaderView) OnCurrentChanged(slot func(super func(current *QModelIndex, old *QModelIndex), current *QModelIndex, old *QModelIndex)) { + C.QHeaderView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_CurrentChanged +func miqt_exec_callback_QHeaderView_CurrentChanged(self *C.QHeaderView, cb C.intptr_t, current *C.QModelIndex, old *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, old *QModelIndex), current *QModelIndex, old *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(old)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QHeaderView) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QHeaderView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_Event +func miqt_exec_callback_QHeaderView_Event(self *C.QHeaderView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QHeaderView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QHeaderView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_PaintEvent +func miqt_exec_callback_QHeaderView_PaintEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MousePressEvent +func miqt_exec_callback_QHeaderView_MousePressEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MouseMoveEvent +func miqt_exec_callback_QHeaderView_MouseMoveEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MouseReleaseEvent +func miqt_exec_callback_QHeaderView_MouseReleaseEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MouseDoubleClickEvent +func miqt_exec_callback_QHeaderView_MouseDoubleClickEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_ViewportEvent(e *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QHeaderView) OnViewportEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QHeaderView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ViewportEvent +func miqt_exec_callback_QHeaderView_ViewportEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_PaintSection(painter *QPainter, rect *QRect, logicalIndex int) { + + C.QHeaderView_virtualbase_PaintSection(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(logicalIndex)) + +} +func (this *QHeaderView) OnPaintSection(slot func(super func(painter *QPainter, rect *QRect, logicalIndex int), painter *QPainter, rect *QRect, logicalIndex int)) { + C.QHeaderView_override_virtual_PaintSection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_PaintSection +func miqt_exec_callback_QHeaderView_PaintSection(self *C.QHeaderView, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, logicalIndex C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, logicalIndex int), painter *QPainter, rect *QRect, logicalIndex int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(logicalIndex) + + gofunc((&QHeaderView{h: self}).callVirtualBase_PaintSection, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_SectionSizeFromContents(logicalIndex int) *QSize { + + _ret := C.QHeaderView_virtualbase_SectionSizeFromContents(unsafe.Pointer(this.h), (C.int)(logicalIndex)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnSectionSizeFromContents(slot func(super func(logicalIndex int) *QSize, logicalIndex int) *QSize) { + C.QHeaderView_override_virtual_SectionSizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SectionSizeFromContents +func miqt_exec_callback_QHeaderView_SectionSizeFromContents(self *C.QHeaderView, cb C.intptr_t, logicalIndex C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(logicalIndex int) *QSize, logicalIndex int) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(logicalIndex) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SectionSizeFromContents, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QHeaderView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QHeaderView) OnHorizontalOffset(slot func(super func() int) int) { + C.QHeaderView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_HorizontalOffset +func miqt_exec_callback_QHeaderView_HorizontalOffset(self *C.QHeaderView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QHeaderView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QHeaderView) OnVerticalOffset(slot func(super func() int) int) { + C.QHeaderView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VerticalOffset +func miqt_exec_callback_QHeaderView_VerticalOffset(self *C.QHeaderView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_UpdateGeometries() { + + C.QHeaderView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnUpdateGeometries(slot func(super func())) { + C.QHeaderView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_UpdateGeometries +func miqt_exec_callback_QHeaderView_UpdateGeometries(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QHeaderView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QHeaderView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QHeaderView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QHeaderView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ScrollContentsBy +func miqt_exec_callback_QHeaderView_ScrollContentsBy(self *C.QHeaderView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QHeaderView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QHeaderView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QHeaderView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QHeaderView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DataChanged +func miqt_exec_callback_QHeaderView_DataChanged(self *C.QHeaderView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QHeaderView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QHeaderView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QHeaderView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QHeaderView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_RowsInserted +func miqt_exec_callback_QHeaderView_RowsInserted(self *C.QHeaderView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QHeaderView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QHeaderView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QHeaderView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VisualRect +func miqt_exec_callback_QHeaderView_VisualRect(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QHeaderView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QHeaderView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QHeaderView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ScrollTo +func miqt_exec_callback_QHeaderView_ScrollTo(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QHeaderView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QHeaderView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QHeaderView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_IndexAt +func miqt_exec_callback_QHeaderView_IndexAt(self *C.QHeaderView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QHeaderView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QHeaderView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QHeaderView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_IsIndexHidden +func miqt_exec_callback_QHeaderView_IsIndexHidden(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_MoveCursor(param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex { + + _ret := C.QHeaderView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(param1), (C.int)(param2)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnMoveCursor(slot func(super func(param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex, param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex) { + C.QHeaderView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MoveCursor +func miqt_exec_callback_QHeaderView_MoveCursor(self *C.QHeaderView, cb C.intptr_t, param1 C.int, param2 C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex, param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(param1) + + slotval2 := (KeyboardModifier)(param2) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_SetSelection(rect *QRect, flags QItemSelectionModel__SelectionFlag) { + + C.QHeaderView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(flags)) + +} +func (this *QHeaderView) OnSetSelection(slot func(super func(rect *QRect, flags QItemSelectionModel__SelectionFlag), rect *QRect, flags QItemSelectionModel__SelectionFlag)) { + C.QHeaderView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetSelection +func miqt_exec_callback_QHeaderView_SetSelection(self *C.QHeaderView, cb C.intptr_t, rect *C.QRect, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, flags QItemSelectionModel__SelectionFlag), rect *QRect, flags QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(flags) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QHeaderView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QHeaderView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QHeaderView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetSelectionModel +func miqt_exec_callback_QHeaderView_SetSelectionModel(self *C.QHeaderView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QHeaderView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QHeaderView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QHeaderView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_KeyboardSearch +func miqt_exec_callback_QHeaderView_KeyboardSearch(self *C.QHeaderView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QHeaderView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QHeaderView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QHeaderView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QHeaderView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SizeHintForRow +func miqt_exec_callback_QHeaderView_SizeHintForRow(self *C.QHeaderView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QHeaderView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QHeaderView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QHeaderView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SizeHintForColumn +func miqt_exec_callback_QHeaderView_SizeHintForColumn(self *C.QHeaderView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QHeaderView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QHeaderView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InputMethodQuery +func miqt_exec_callback_QHeaderView_InputMethodQuery(self *C.QHeaderView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QHeaderView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QHeaderView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QHeaderView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetRootIndex +func miqt_exec_callback_QHeaderView_SetRootIndex(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SelectAll() { + + C.QHeaderView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnSelectAll(slot func(super func())) { + C.QHeaderView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectAll +func miqt_exec_callback_QHeaderView_SelectAll(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QHeaderView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QHeaderView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QHeaderView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QHeaderView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved +func miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved(self *C.QHeaderView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QHeaderView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_UpdateEditorData() { + + C.QHeaderView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnUpdateEditorData(slot func(super func())) { + C.QHeaderView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_UpdateEditorData +func miqt_exec_callback_QHeaderView_UpdateEditorData(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QHeaderView) callVirtualBase_UpdateEditorGeometries() { + + C.QHeaderView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnUpdateEditorGeometries(slot func(super func())) { + C.QHeaderView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_UpdateEditorGeometries +func miqt_exec_callback_QHeaderView_UpdateEditorGeometries(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QHeaderView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QHeaderView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QHeaderView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QHeaderView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VerticalScrollbarAction +func miqt_exec_callback_QHeaderView_VerticalScrollbarAction(self *C.QHeaderView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QHeaderView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QHeaderView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QHeaderView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QHeaderView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_HorizontalScrollbarAction +func miqt_exec_callback_QHeaderView_HorizontalScrollbarAction(self *C.QHeaderView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QHeaderView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QHeaderView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QHeaderView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QHeaderView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VerticalScrollbarValueChanged +func miqt_exec_callback_QHeaderView_VerticalScrollbarValueChanged(self *C.QHeaderView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QHeaderView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QHeaderView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QHeaderView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QHeaderView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QHeaderView_HorizontalScrollbarValueChanged(self *C.QHeaderView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QHeaderView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QHeaderView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QHeaderView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QHeaderView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_CloseEditor +func miqt_exec_callback_QHeaderView_CloseEditor(self *C.QHeaderView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QHeaderView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_CommitData(editor *QWidget) { + + C.QHeaderView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QHeaderView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QHeaderView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_CommitData +func miqt_exec_callback_QHeaderView_CommitData(self *C.QHeaderView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QHeaderView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QHeaderView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QHeaderView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_EditorDestroyed +func miqt_exec_callback_QHeaderView_EditorDestroyed(self *C.QHeaderView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QHeaderView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QHeaderView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QHeaderView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectedIndexes +func miqt_exec_callback_QHeaderView_SelectedIndexes(self *C.QHeaderView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QHeaderView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QHeaderView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QHeaderView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_Edit2 +func miqt_exec_callback_QHeaderView_Edit2(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QHeaderView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QHeaderView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QHeaderView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectionCommand +func miqt_exec_callback_QHeaderView_SelectionCommand(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QHeaderView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QHeaderView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QHeaderView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_StartDrag +func miqt_exec_callback_QHeaderView_StartDrag(self *C.QHeaderView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QHeaderView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QHeaderView_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QHeaderView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ViewOptions +func miqt_exec_callback_QHeaderView_ViewOptions(self *C.QHeaderView, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QHeaderView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QHeaderView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QHeaderView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_FocusNextPrevChild +func miqt_exec_callback_QHeaderView_FocusNextPrevChild(self *C.QHeaderView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QHeaderView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QHeaderView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DragEnterEvent +func miqt_exec_callback_QHeaderView_DragEnterEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QHeaderView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QHeaderView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DragMoveEvent +func miqt_exec_callback_QHeaderView_DragMoveEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QHeaderView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QHeaderView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DragLeaveEvent +func miqt_exec_callback_QHeaderView_DragLeaveEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QHeaderView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QHeaderView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DropEvent +func miqt_exec_callback_QHeaderView_DropEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QHeaderView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QHeaderView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_FocusInEvent +func miqt_exec_callback_QHeaderView_FocusInEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QHeaderView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QHeaderView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_FocusOutEvent +func miqt_exec_callback_QHeaderView_FocusOutEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QHeaderView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QHeaderView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_KeyPressEvent +func miqt_exec_callback_QHeaderView_KeyPressEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QHeaderView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QHeaderView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ResizeEvent +func miqt_exec_callback_QHeaderView_ResizeEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QHeaderView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QHeaderView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_TimerEvent +func miqt_exec_callback_QHeaderView_TimerEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QHeaderView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QHeaderView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InputMethodEvent +func miqt_exec_callback_QHeaderView_InputMethodEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QHeaderView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QHeaderView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_EventFilter +func miqt_exec_callback_QHeaderView_EventFilter(self *C.QHeaderView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QHeaderView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QHeaderView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ViewportSizeHint +func miqt_exec_callback_QHeaderView_ViewportSizeHint(self *C.QHeaderView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QHeaderView) Delete() { - C.QHeaderView_Delete(this.h) + C.QHeaderView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qheaderview.h b/qt/gen_qheaderview.h index 1045ecc6..c697a030 100644 --- a/qt/gen_qheaderview.h +++ b/qt/gen_qheaderview.h @@ -16,24 +16,70 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; class QByteArray; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QHeaderView; +class QInputMethodEvent; +class QItemSelectionModel; +class QKeyEvent; class QMetaObject; +class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPainter; class QPoint; +class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QVariant; class QWidget; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QByteArray QByteArray; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QHeaderView* QHeaderView_new(int orientation); -QHeaderView* QHeaderView_new2(int orientation, QWidget* parent); +void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QHeaderView_MetaObject(const QHeaderView* self); void* QHeaderView_Metacast(QHeaderView* self, const char* param1); struct miqt_string QHeaderView_Tr(const char* s); @@ -126,11 +172,157 @@ void QHeaderView_GeometriesChanged(QHeaderView* self); void QHeaderView_connect_GeometriesChanged(QHeaderView* self, intptr_t slot); void QHeaderView_SortIndicatorChanged(QHeaderView* self, int logicalIndex, int order); void QHeaderView_connect_SortIndicatorChanged(QHeaderView* self, intptr_t slot); +void QHeaderView_CurrentChanged(QHeaderView* self, QModelIndex* current, QModelIndex* old); +bool QHeaderView_Event(QHeaderView* self, QEvent* e); +void QHeaderView_PaintEvent(QHeaderView* self, QPaintEvent* e); +void QHeaderView_MousePressEvent(QHeaderView* self, QMouseEvent* e); +void QHeaderView_MouseMoveEvent(QHeaderView* self, QMouseEvent* e); +void QHeaderView_MouseReleaseEvent(QHeaderView* self, QMouseEvent* e); +void QHeaderView_MouseDoubleClickEvent(QHeaderView* self, QMouseEvent* e); +bool QHeaderView_ViewportEvent(QHeaderView* self, QEvent* e); +void QHeaderView_PaintSection(const QHeaderView* self, QPainter* painter, QRect* rect, int logicalIndex); +QSize* QHeaderView_SectionSizeFromContents(const QHeaderView* self, int logicalIndex); +int QHeaderView_HorizontalOffset(const QHeaderView* self); +int QHeaderView_VerticalOffset(const QHeaderView* self); +void QHeaderView_UpdateGeometries(QHeaderView* self); +void QHeaderView_ScrollContentsBy(QHeaderView* self, int dx, int dy); +void QHeaderView_DataChanged(QHeaderView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QHeaderView_RowsInserted(QHeaderView* self, QModelIndex* parent, int start, int end); +QRect* QHeaderView_VisualRect(const QHeaderView* self, QModelIndex* index); +void QHeaderView_ScrollTo(QHeaderView* self, QModelIndex* index, int hint); +QModelIndex* QHeaderView_IndexAt(const QHeaderView* self, QPoint* p); +bool QHeaderView_IsIndexHidden(const QHeaderView* self, QModelIndex* index); +QModelIndex* QHeaderView_MoveCursor(QHeaderView* self, int param1, int param2); +void QHeaderView_SetSelection(QHeaderView* self, QRect* rect, int flags); struct miqt_string QHeaderView_Tr2(const char* s, const char* c); struct miqt_string QHeaderView_Tr3(const char* s, const char* c, int n); struct miqt_string QHeaderView_TrUtf82(const char* s, const char* c); struct miqt_string QHeaderView_TrUtf83(const char* s, const char* c, int n); -void QHeaderView_Delete(QHeaderView* self); +void QHeaderView_override_virtual_SetModel(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QHeaderView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QHeaderView_virtualbase_SizeHint(const void* self); +void QHeaderView_override_virtual_SetVisible(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetVisible(void* self, bool v); +void QHeaderView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QHeaderView_virtualbase_DoItemsLayout(void* self); +void QHeaderView_override_virtual_Reset(void* self, intptr_t slot); +void QHeaderView_virtualbase_Reset(void* self); +void QHeaderView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* old); +void QHeaderView_override_virtual_Event(void* self, intptr_t slot); +bool QHeaderView_virtualbase_Event(void* self, QEvent* e); +void QHeaderView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QHeaderView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QHeaderView_virtualbase_ViewportEvent(void* self, QEvent* e); +void QHeaderView_override_virtual_PaintSection(void* self, intptr_t slot); +void QHeaderView_virtualbase_PaintSection(const void* self, QPainter* painter, QRect* rect, int logicalIndex); +void QHeaderView_override_virtual_SectionSizeFromContents(void* self, intptr_t slot); +QSize* QHeaderView_virtualbase_SectionSizeFromContents(const void* self, int logicalIndex); +void QHeaderView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QHeaderView_virtualbase_HorizontalOffset(const void* self); +void QHeaderView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QHeaderView_virtualbase_VerticalOffset(const void* self); +void QHeaderView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QHeaderView_virtualbase_UpdateGeometries(void* self); +void QHeaderView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QHeaderView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QHeaderView_override_virtual_DataChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QHeaderView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QHeaderView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QHeaderView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QHeaderView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QHeaderView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QHeaderView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QHeaderView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QHeaderView_virtualbase_IndexAt(const void* self, QPoint* p); +void QHeaderView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QHeaderView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QHeaderView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QHeaderView_virtualbase_MoveCursor(void* self, int param1, int param2); +void QHeaderView_override_virtual_SetSelection(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetSelection(void* self, QRect* rect, int flags); +void QHeaderView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QHeaderView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QHeaderView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QHeaderView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QHeaderView_virtualbase_SizeHintForRow(const void* self, int row); +void QHeaderView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QHeaderView_virtualbase_SizeHintForColumn(const void* self, int column); +void QHeaderView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QHeaderView_virtualbase_InputMethodQuery(const void* self, int query); +void QHeaderView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QHeaderView_override_virtual_SelectAll(void* self, intptr_t slot); +void QHeaderView_virtualbase_SelectAll(void* self); +void QHeaderView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QHeaderView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QHeaderView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QHeaderView_virtualbase_UpdateEditorData(void* self); +void QHeaderView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QHeaderView_virtualbase_UpdateEditorGeometries(void* self); +void QHeaderView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QHeaderView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QHeaderView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QHeaderView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QHeaderView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QHeaderView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QHeaderView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QHeaderView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QHeaderView_override_virtual_CommitData(void* self, intptr_t slot); +void QHeaderView_virtualbase_CommitData(void* self, QWidget* editor); +void QHeaderView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QHeaderView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QHeaderView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QHeaderView_virtualbase_SelectedIndexes(const void* self); +void QHeaderView_override_virtual_Edit2(void* self, intptr_t slot); +bool QHeaderView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QHeaderView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QHeaderView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QHeaderView_override_virtual_StartDrag(void* self, intptr_t slot); +void QHeaderView_virtualbase_StartDrag(void* self, int supportedActions); +void QHeaderView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QHeaderView_virtualbase_ViewOptions(const void* self); +void QHeaderView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QHeaderView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QHeaderView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QHeaderView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QHeaderView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QHeaderView_override_virtual_DropEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QHeaderView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QHeaderView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QHeaderView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QHeaderView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QHeaderView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QHeaderView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QHeaderView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QHeaderView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QHeaderView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QHeaderView_virtualbase_ViewportSizeHint(const void* self); +void QHeaderView_Delete(QHeaderView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qhistorystate.cpp b/qt/gen_qhistorystate.cpp index 0109e25a..3170cb8e 100644 --- a/qt/gen_qhistorystate.cpp +++ b/qt/gen_qhistorystate.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -10,20 +12,115 @@ #include "gen_qhistorystate.h" #include "_cgo_export.h" -QHistoryState* QHistoryState_new() { - return new QHistoryState(); +class MiqtVirtualQHistoryState : public virtual QHistoryState { +public: + + MiqtVirtualQHistoryState(): QHistoryState() {}; + MiqtVirtualQHistoryState(QHistoryState::HistoryType typeVal): QHistoryState(typeVal) {}; + MiqtVirtualQHistoryState(QState* parent): QHistoryState(parent) {}; + MiqtVirtualQHistoryState(QHistoryState::HistoryType typeVal, QState* parent): QHistoryState(typeVal, parent) {}; + + virtual ~MiqtVirtualQHistoryState() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnEntry = 0; + + // Subclass to allow providing a Go implementation + virtual void onEntry(QEvent* event) override { + if (handle__OnEntry == 0) { + QHistoryState::onEntry(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QHistoryState_OnEntry(this, handle__OnEntry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnEntry(QEvent* event) { + + QHistoryState::onEntry(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnExit = 0; + + // Subclass to allow providing a Go implementation + virtual void onExit(QEvent* event) override { + if (handle__OnExit == 0) { + QHistoryState::onExit(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QHistoryState_OnExit(this, handle__OnExit, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnExit(QEvent* event) { + + QHistoryState::onExit(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QHistoryState::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QHistoryState_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QHistoryState::event(e); + + } + +}; + +void QHistoryState_new(QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(); + *outptr_QHistoryState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QHistoryState* QHistoryState_new2(int typeVal) { - return new QHistoryState(static_cast(typeVal)); +void QHistoryState_new2(int typeVal, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(static_cast(typeVal)); + *outptr_QHistoryState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QHistoryState* QHistoryState_new3(QState* parent) { - return new QHistoryState(parent); +void QHistoryState_new3(QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(parent); + *outptr_QHistoryState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QHistoryState* QHistoryState_new4(int typeVal, QState* parent) { - return new QHistoryState(static_cast(typeVal), parent); +void QHistoryState_new4(int typeVal, QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(static_cast(typeVal), parent); + *outptr_QHistoryState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QHistoryState_MetaObject(const QHistoryState* self) { @@ -125,7 +222,35 @@ struct miqt_string QHistoryState_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QHistoryState_Delete(QHistoryState* self) { - delete self; +void QHistoryState_override_virtual_OnEntry(void* self, intptr_t slot) { + dynamic_cast( (QHistoryState*)(self) )->handle__OnEntry = slot; +} + +void QHistoryState_virtualbase_OnEntry(void* self, QEvent* event) { + ( (MiqtVirtualQHistoryState*)(self) )->virtualbase_OnEntry(event); +} + +void QHistoryState_override_virtual_OnExit(void* self, intptr_t slot) { + dynamic_cast( (QHistoryState*)(self) )->handle__OnExit = slot; +} + +void QHistoryState_virtualbase_OnExit(void* self, QEvent* event) { + ( (MiqtVirtualQHistoryState*)(self) )->virtualbase_OnExit(event); +} + +void QHistoryState_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QHistoryState*)(self) )->handle__Event = slot; +} + +bool QHistoryState_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQHistoryState*)(self) )->virtualbase_Event(e); +} + +void QHistoryState_Delete(QHistoryState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qhistorystate.go b/qt/gen_qhistorystate.go index f4d0577d..4b6ba026 100644 --- a/qt/gen_qhistorystate.go +++ b/qt/gen_qhistorystate.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -21,7 +22,8 @@ const ( ) type QHistoryState struct { - h *C.QHistoryState + h *C.QHistoryState + isSubclass bool *QAbstractState } @@ -39,39 +41,71 @@ func (this *QHistoryState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHistoryState(h *C.QHistoryState) *QHistoryState { +// newQHistoryState constructs the type using only CGO pointers. +func newQHistoryState(h *C.QHistoryState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QHistoryState { if h == nil { return nil } - return &QHistoryState{h: h, QAbstractState: UnsafeNewQAbstractState(unsafe.Pointer(h))} + return &QHistoryState{h: h, + QAbstractState: newQAbstractState(h_QAbstractState, h_QObject)} } -func UnsafeNewQHistoryState(h unsafe.Pointer) *QHistoryState { - return newQHistoryState((*C.QHistoryState)(h)) +// UnsafeNewQHistoryState constructs the type using only unsafe pointers. +func UnsafeNewQHistoryState(h unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QHistoryState { + if h == nil { + return nil + } + + return &QHistoryState{h: (*C.QHistoryState)(h), + QAbstractState: UnsafeNewQAbstractState(h_QAbstractState, h_QObject)} } // NewQHistoryState constructs a new QHistoryState object. func NewQHistoryState() *QHistoryState { - ret := C.QHistoryState_new() - return newQHistoryState(ret) + var outptr_QHistoryState *C.QHistoryState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QHistoryState_new(&outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) + ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHistoryState2 constructs a new QHistoryState object. func NewQHistoryState2(typeVal QHistoryState__HistoryType) *QHistoryState { - ret := C.QHistoryState_new2((C.int)(typeVal)) - return newQHistoryState(ret) + var outptr_QHistoryState *C.QHistoryState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QHistoryState_new2((C.int)(typeVal), &outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) + ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHistoryState3 constructs a new QHistoryState object. func NewQHistoryState3(parent *QState) *QHistoryState { - ret := C.QHistoryState_new3(parent.cPointer()) - return newQHistoryState(ret) + var outptr_QHistoryState *C.QHistoryState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QHistoryState_new3(parent.cPointer(), &outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) + ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHistoryState4 constructs a new QHistoryState object. func NewQHistoryState4(typeVal QHistoryState__HistoryType, parent *QState) *QHistoryState { - ret := C.QHistoryState_new4((C.int)(typeVal), parent.cPointer()) - return newQHistoryState(ret) + var outptr_QHistoryState *C.QHistoryState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QHistoryState_new4((C.int)(typeVal), parent.cPointer(), &outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) + ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QHistoryState) MetaObject() *QMetaObject { @@ -103,7 +137,7 @@ func QHistoryState_TrUtf8(s string) string { } func (this *QHistoryState) DefaultTransition() *QAbstractTransition { - return UnsafeNewQAbstractTransition(unsafe.Pointer(C.QHistoryState_DefaultTransition(this.h))) + return UnsafeNewQAbstractTransition(unsafe.Pointer(C.QHistoryState_DefaultTransition(this.h)), nil) } func (this *QHistoryState) SetDefaultTransition(transition *QAbstractTransition) { @@ -111,7 +145,7 @@ func (this *QHistoryState) SetDefaultTransition(transition *QAbstractTransition) } func (this *QHistoryState) DefaultState() *QAbstractState { - return UnsafeNewQAbstractState(unsafe.Pointer(C.QHistoryState_DefaultState(this.h))) + return UnsafeNewQAbstractState(unsafe.Pointer(C.QHistoryState_DefaultState(this.h)), nil) } func (this *QHistoryState) SetDefaultState(state *QAbstractState) { @@ -170,9 +204,80 @@ func QHistoryState_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QHistoryState) callVirtualBase_OnEntry(event *QEvent) { + + C.QHistoryState_virtualbase_OnEntry(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHistoryState) OnOnEntry(slot func(super func(event *QEvent), event *QEvent)) { + C.QHistoryState_override_virtual_OnEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHistoryState_OnEntry +func miqt_exec_callback_QHistoryState_OnEntry(self *C.QHistoryState, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QHistoryState{h: self}).callVirtualBase_OnEntry, slotval1) + +} + +func (this *QHistoryState) callVirtualBase_OnExit(event *QEvent) { + + C.QHistoryState_virtualbase_OnExit(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHistoryState) OnOnExit(slot func(super func(event *QEvent), event *QEvent)) { + C.QHistoryState_override_virtual_OnExit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHistoryState_OnExit +func miqt_exec_callback_QHistoryState_OnExit(self *C.QHistoryState, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QHistoryState{h: self}).callVirtualBase_OnExit, slotval1) + +} + +func (this *QHistoryState) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QHistoryState_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QHistoryState) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QHistoryState_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHistoryState_Event +func miqt_exec_callback_QHistoryState_Event(self *C.QHistoryState, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QHistoryState{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QHistoryState) Delete() { - C.QHistoryState_Delete(this.h) + C.QHistoryState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qhistorystate.h b/qt/gen_qhistorystate.h index 79c9f49a..78d9a828 100644 --- a/qt/gen_qhistorystate.h +++ b/qt/gen_qhistorystate.h @@ -17,21 +17,25 @@ extern "C" { #ifdef __cplusplus class QAbstractState; class QAbstractTransition; +class QEvent; class QHistoryState; class QMetaObject; +class QObject; class QState; #else typedef struct QAbstractState QAbstractState; typedef struct QAbstractTransition QAbstractTransition; +typedef struct QEvent QEvent; typedef struct QHistoryState QHistoryState; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QState QState; #endif -QHistoryState* QHistoryState_new(); -QHistoryState* QHistoryState_new2(int typeVal); -QHistoryState* QHistoryState_new3(QState* parent); -QHistoryState* QHistoryState_new4(int typeVal, QState* parent); +void QHistoryState_new(QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QHistoryState_new2(int typeVal, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QHistoryState_new3(QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QHistoryState_new4(int typeVal, QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); QMetaObject* QHistoryState_MetaObject(const QHistoryState* self); void* QHistoryState_Metacast(QHistoryState* self, const char* param1); struct miqt_string QHistoryState_Tr(const char* s); @@ -42,11 +46,20 @@ QAbstractState* QHistoryState_DefaultState(const QHistoryState* self); void QHistoryState_SetDefaultState(QHistoryState* self, QAbstractState* state); int QHistoryState_HistoryType(const QHistoryState* self); void QHistoryState_SetHistoryType(QHistoryState* self, int typeVal); +void QHistoryState_OnEntry(QHistoryState* self, QEvent* event); +void QHistoryState_OnExit(QHistoryState* self, QEvent* event); +bool QHistoryState_Event(QHistoryState* self, QEvent* e); struct miqt_string QHistoryState_Tr2(const char* s, const char* c); struct miqt_string QHistoryState_Tr3(const char* s, const char* c, int n); struct miqt_string QHistoryState_TrUtf82(const char* s, const char* c); struct miqt_string QHistoryState_TrUtf83(const char* s, const char* c, int n); -void QHistoryState_Delete(QHistoryState* self); +void QHistoryState_override_virtual_OnEntry(void* self, intptr_t slot); +void QHistoryState_virtualbase_OnEntry(void* self, QEvent* event); +void QHistoryState_override_virtual_OnExit(void* self, intptr_t slot); +void QHistoryState_virtualbase_OnExit(void* self, QEvent* event); +void QHistoryState_override_virtual_Event(void* self, intptr_t slot); +bool QHistoryState_virtualbase_Event(void* self, QEvent* e); +void QHistoryState_Delete(QHistoryState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qicon.cpp b/qt/gen_qicon.cpp index fbb04561..2ccac75f 100644 --- a/qt/gen_qicon.cpp +++ b/qt/gen_qicon.cpp @@ -13,25 +13,30 @@ #include "gen_qicon.h" #include "_cgo_export.h" -QIcon* QIcon_new() { - return new QIcon(); +void QIcon_new(QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(); + *outptr_QIcon = ret; } -QIcon* QIcon_new2(QPixmap* pixmap) { - return new QIcon(*pixmap); +void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(*pixmap); + *outptr_QIcon = ret; } -QIcon* QIcon_new3(QIcon* other) { - return new QIcon(*other); +void QIcon_new3(QIcon* other, QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(*other); + *outptr_QIcon = ret; } -QIcon* QIcon_new4(struct miqt_string fileName) { +void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QIcon(fileName_QString); + QIcon* ret = new QIcon(fileName_QString); + *outptr_QIcon = ret; } -QIcon* QIcon_new5(QIconEngine* engine) { - return new QIcon(engine); +void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(engine); + *outptr_QIcon = ret; } void QIcon_OperatorAssign(QIcon* self, QIcon* other) { @@ -362,7 +367,11 @@ struct miqt_array /* of QSize* */ QIcon_AvailableSizes2(const QIcon* self, int return _out; } -void QIcon_Delete(QIcon* self) { - delete self; +void QIcon_Delete(QIcon* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qicon.go b/qt/gen_qicon.go index 4edb5e90..b015176e 100644 --- a/qt/gen_qicon.go +++ b/qt/gen_qicon.go @@ -30,7 +30,8 @@ const ( ) type QIcon struct { - h *C.QIcon + h *C.QIcon + isSubclass bool } func (this *QIcon) cPointer() *C.QIcon { @@ -47,6 +48,7 @@ func (this *QIcon) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIcon constructs the type using only CGO pointers. func newQIcon(h *C.QIcon) *QIcon { if h == nil { return nil @@ -54,26 +56,43 @@ func newQIcon(h *C.QIcon) *QIcon { return &QIcon{h: h} } +// UnsafeNewQIcon constructs the type using only unsafe pointers. func UnsafeNewQIcon(h unsafe.Pointer) *QIcon { - return newQIcon((*C.QIcon)(h)) + if h == nil { + return nil + } + + return &QIcon{h: (*C.QIcon)(h)} } // NewQIcon constructs a new QIcon object. func NewQIcon() *QIcon { - ret := C.QIcon_new() - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new(&outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon2 constructs a new QIcon object. func NewQIcon2(pixmap *QPixmap) *QIcon { - ret := C.QIcon_new2(pixmap.cPointer()) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new2(pixmap.cPointer(), &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon3 constructs a new QIcon object. func NewQIcon3(other *QIcon) *QIcon { - ret := C.QIcon_new3(other.cPointer()) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new3(other.cPointer(), &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon4 constructs a new QIcon object. @@ -82,14 +101,22 @@ func NewQIcon4(fileName string) *QIcon { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QIcon_new4(fileName_ms) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new4(fileName_ms, &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon5 constructs a new QIcon object. func NewQIcon5(engine *QIconEngine) *QIcon { - ret := C.QIcon_new5(engine.cPointer()) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new5(engine.cPointer(), &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } func (this *QIcon) OperatorAssign(other *QIcon) { @@ -102,28 +129,28 @@ func (this *QIcon) Swap(other *QIcon) { func (this *QIcon) Pixmap(size *QSize) *QPixmap { _ret := C.QIcon_Pixmap(this.h, size.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap2(w int, h int) *QPixmap { _ret := C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) PixmapWithExtent(extent int) *QPixmap { _ret := C.QIcon_PixmapWithExtent(this.h, (C.int)(extent)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap3(window *QWindow, size *QSize) *QPixmap { _ret := C.QIcon_Pixmap3(this.h, window.cPointer(), size.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -322,56 +349,56 @@ func QIcon_SetFallbackThemeName(name string) { func (this *QIcon) Pixmap22(size *QSize, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap32(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap33(w int, h int, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap4(w int, h int, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap4(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap23(extent int, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap34(extent int, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap35(window *QWindow, size *QSize, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap35(this.h, window.cPointer(), size.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap42(window *QWindow, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap42(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -488,7 +515,7 @@ func (this *QIcon) AvailableSizes2(mode QIcon__Mode, state QIcon__State) []QSize // Delete this object from C++ memory. func (this *QIcon) Delete() { - C.QIcon_Delete(this.h) + C.QIcon_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qicon.h b/qt/gen_qicon.h index 3cd90633..66869d25 100644 --- a/qt/gen_qicon.h +++ b/qt/gen_qicon.h @@ -32,11 +32,11 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -QIcon* QIcon_new(); -QIcon* QIcon_new2(QPixmap* pixmap); -QIcon* QIcon_new3(QIcon* other); -QIcon* QIcon_new4(struct miqt_string fileName); -QIcon* QIcon_new5(QIconEngine* engine); +void QIcon_new(QIcon** outptr_QIcon); +void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon); +void QIcon_new3(QIcon* other, QIcon** outptr_QIcon); +void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon); +void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon); void QIcon_OperatorAssign(QIcon* self, QIcon* other); void QIcon_Swap(QIcon* self, QIcon* other); QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size); @@ -93,7 +93,7 @@ void QIcon_AddFile3(QIcon* self, struct miqt_string fileName, QSize* size, int m void QIcon_AddFile4(QIcon* self, struct miqt_string fileName, QSize* size, int mode, int state); struct miqt_array /* of QSize* */ QIcon_AvailableSizes1(const QIcon* self, int mode); struct miqt_array /* of QSize* */ QIcon_AvailableSizes2(const QIcon* self, int mode, int state); -void QIcon_Delete(QIcon* self); +void QIcon_Delete(QIcon* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qiconengine.cpp b/qt/gen_qiconengine.cpp index 9e9bff7a..07f5bacb 100644 --- a/qt/gen_qiconengine.cpp +++ b/qt/gen_qiconengine.cpp @@ -58,8 +58,8 @@ bool QIconEngine_Write(const QIconEngine* self, QDataStream* out) { return self->write(*out); } -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(const QIconEngine* self) { - QList _ret = self->availableSizes(); +struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(const QIconEngine* self, int mode, int state) { + QList _ret = self->availableSizes(static_cast(mode), static_cast(state)); // Convert QList<> from C++ memory to manually-managed C memory QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -94,57 +94,45 @@ void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data) { self->virtual_hook(static_cast(id), data); } -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes1(const QIconEngine* self, int mode) { - QList _ret = self->availableSizes(static_cast(mode)); - // Convert QList<> from C++ memory to manually-managed C memory - QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QSize(_ret[i]); +void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; } -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes2(const QIconEngine* self, int mode, int state) { - QList _ret = self->availableSizes(static_cast(mode), static_cast(state)); - // Convert QList<> from C++ memory to manually-managed C memory - QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QSize(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -void QIconEngine_Delete(QIconEngine* self) { - delete self; -} - -QIconEngine__AvailableSizesArgument* QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1) { - return new QIconEngine::AvailableSizesArgument(*param1); +void QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1, QIconEngine__AvailableSizesArgument** outptr_QIconEngine__AvailableSizesArgument) { + QIconEngine::AvailableSizesArgument* ret = new QIconEngine::AvailableSizesArgument(*param1); + *outptr_QIconEngine__AvailableSizesArgument = ret; } void QIconEngine__AvailableSizesArgument_OperatorAssign(QIconEngine__AvailableSizesArgument* self, QIconEngine__AvailableSizesArgument* param1) { self->operator=(*param1); } -void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgument* self) { - delete self; +void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1) { - return new QIconEngine::ScaledPixmapArgument(*param1); +void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument) { + QIconEngine::ScaledPixmapArgument* ret = new QIconEngine::ScaledPixmapArgument(*param1); + *outptr_QIconEngine__ScaledPixmapArgument = ret; } void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1) { self->operator=(*param1); } -void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self) { - delete self; +void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qiconengine.go b/qt/gen_qiconengine.go index c6273870..c3e7f451 100644 --- a/qt/gen_qiconengine.go +++ b/qt/gen_qiconengine.go @@ -23,7 +23,8 @@ const ( ) type QIconEngine struct { - h *C.QIconEngine + h *C.QIconEngine + isSubclass bool } func (this *QIconEngine) cPointer() *C.QIconEngine { @@ -40,6 +41,7 @@ func (this *QIconEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIconEngine constructs the type using only CGO pointers. func newQIconEngine(h *C.QIconEngine) *QIconEngine { if h == nil { return nil @@ -47,8 +49,13 @@ func newQIconEngine(h *C.QIconEngine) *QIconEngine { return &QIconEngine{h: h} } +// UnsafeNewQIconEngine constructs the type using only unsafe pointers. func UnsafeNewQIconEngine(h unsafe.Pointer) *QIconEngine { - return newQIconEngine((*C.QIconEngine)(h)) + if h == nil { + return nil + } + + return &QIconEngine{h: (*C.QIconEngine)(h)} } func (this *QIconEngine) Paint(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State) { @@ -64,7 +71,7 @@ func (this *QIconEngine) ActualSize(size *QSize, mode QIcon__Mode, state QIcon__ func (this *QIconEngine) Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIconEngine_Pixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -100,8 +107,8 @@ func (this *QIconEngine) Write(out *QDataStream) bool { return (bool)(C.QIconEngine_Write(this.h, out.cPointer())) } -func (this *QIconEngine) AvailableSizes() []QSize { - var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes(this.h) +func (this *QIconEngine) AvailableSizes(mode QIcon__Mode, state QIcon__State) []QSize { + var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes(this.h, (C.int)(mode), (C.int)(state)) _ret := make([]QSize, int(_ma.len)) _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -126,7 +133,7 @@ func (this *QIconEngine) IsNull() bool { func (this *QIconEngine) ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap { _ret := C.QIconEngine_ScaledPixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -135,35 +142,9 @@ func (this *QIconEngine) VirtualHook(id int, data unsafe.Pointer) { C.QIconEngine_VirtualHook(this.h, (C.int)(id), data) } -func (this *QIconEngine) AvailableSizes1(mode QIcon__Mode) []QSize { - var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes1(this.h, (C.int)(mode)) - _ret := make([]QSize, int(_ma.len)) - _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQSize(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - -func (this *QIconEngine) AvailableSizes2(mode QIcon__Mode, state QIcon__State) []QSize { - var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes2(this.h, (C.int)(mode), (C.int)(state)) - _ret := make([]QSize, int(_ma.len)) - _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQSize(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - // Delete this object from C++ memory. func (this *QIconEngine) Delete() { - C.QIconEngine_Delete(this.h) + C.QIconEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -176,7 +157,8 @@ func (this *QIconEngine) GoGC() { } type QIconEngine__AvailableSizesArgument struct { - h *C.QIconEngine__AvailableSizesArgument + h *C.QIconEngine__AvailableSizesArgument + isSubclass bool } func (this *QIconEngine__AvailableSizesArgument) cPointer() *C.QIconEngine__AvailableSizesArgument { @@ -193,6 +175,7 @@ func (this *QIconEngine__AvailableSizesArgument) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQIconEngine__AvailableSizesArgument constructs the type using only CGO pointers. func newQIconEngine__AvailableSizesArgument(h *C.QIconEngine__AvailableSizesArgument) *QIconEngine__AvailableSizesArgument { if h == nil { return nil @@ -200,14 +183,23 @@ func newQIconEngine__AvailableSizesArgument(h *C.QIconEngine__AvailableSizesArgu return &QIconEngine__AvailableSizesArgument{h: h} } +// UnsafeNewQIconEngine__AvailableSizesArgument constructs the type using only unsafe pointers. func UnsafeNewQIconEngine__AvailableSizesArgument(h unsafe.Pointer) *QIconEngine__AvailableSizesArgument { - return newQIconEngine__AvailableSizesArgument((*C.QIconEngine__AvailableSizesArgument)(h)) + if h == nil { + return nil + } + + return &QIconEngine__AvailableSizesArgument{h: (*C.QIconEngine__AvailableSizesArgument)(h)} } // NewQIconEngine__AvailableSizesArgument constructs a new QIconEngine::AvailableSizesArgument object. func NewQIconEngine__AvailableSizesArgument(param1 *QIconEngine__AvailableSizesArgument) *QIconEngine__AvailableSizesArgument { - ret := C.QIconEngine__AvailableSizesArgument_new(param1.cPointer()) - return newQIconEngine__AvailableSizesArgument(ret) + var outptr_QIconEngine__AvailableSizesArgument *C.QIconEngine__AvailableSizesArgument = nil + + C.QIconEngine__AvailableSizesArgument_new(param1.cPointer(), &outptr_QIconEngine__AvailableSizesArgument) + ret := newQIconEngine__AvailableSizesArgument(outptr_QIconEngine__AvailableSizesArgument) + ret.isSubclass = true + return ret } func (this *QIconEngine__AvailableSizesArgument) OperatorAssign(param1 *QIconEngine__AvailableSizesArgument) { @@ -216,7 +208,7 @@ func (this *QIconEngine__AvailableSizesArgument) OperatorAssign(param1 *QIconEng // Delete this object from C++ memory. func (this *QIconEngine__AvailableSizesArgument) Delete() { - C.QIconEngine__AvailableSizesArgument_Delete(this.h) + C.QIconEngine__AvailableSizesArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -229,7 +221,8 @@ func (this *QIconEngine__AvailableSizesArgument) GoGC() { } type QIconEngine__ScaledPixmapArgument struct { - h *C.QIconEngine__ScaledPixmapArgument + h *C.QIconEngine__ScaledPixmapArgument + isSubclass bool } func (this *QIconEngine__ScaledPixmapArgument) cPointer() *C.QIconEngine__ScaledPixmapArgument { @@ -246,6 +239,7 @@ func (this *QIconEngine__ScaledPixmapArgument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIconEngine__ScaledPixmapArgument constructs the type using only CGO pointers. func newQIconEngine__ScaledPixmapArgument(h *C.QIconEngine__ScaledPixmapArgument) *QIconEngine__ScaledPixmapArgument { if h == nil { return nil @@ -253,14 +247,23 @@ func newQIconEngine__ScaledPixmapArgument(h *C.QIconEngine__ScaledPixmapArgument return &QIconEngine__ScaledPixmapArgument{h: h} } +// UnsafeNewQIconEngine__ScaledPixmapArgument constructs the type using only unsafe pointers. func UnsafeNewQIconEngine__ScaledPixmapArgument(h unsafe.Pointer) *QIconEngine__ScaledPixmapArgument { - return newQIconEngine__ScaledPixmapArgument((*C.QIconEngine__ScaledPixmapArgument)(h)) + if h == nil { + return nil + } + + return &QIconEngine__ScaledPixmapArgument{h: (*C.QIconEngine__ScaledPixmapArgument)(h)} } // NewQIconEngine__ScaledPixmapArgument constructs a new QIconEngine::ScaledPixmapArgument object. func NewQIconEngine__ScaledPixmapArgument(param1 *QIconEngine__ScaledPixmapArgument) *QIconEngine__ScaledPixmapArgument { - ret := C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer()) - return newQIconEngine__ScaledPixmapArgument(ret) + var outptr_QIconEngine__ScaledPixmapArgument *C.QIconEngine__ScaledPixmapArgument = nil + + C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer(), &outptr_QIconEngine__ScaledPixmapArgument) + ret := newQIconEngine__ScaledPixmapArgument(outptr_QIconEngine__ScaledPixmapArgument) + ret.isSubclass = true + return ret } func (this *QIconEngine__ScaledPixmapArgument) OperatorAssign(param1 *QIconEngine__ScaledPixmapArgument) { @@ -269,7 +272,7 @@ func (this *QIconEngine__ScaledPixmapArgument) OperatorAssign(param1 *QIconEngin // Delete this object from C++ memory. func (this *QIconEngine__ScaledPixmapArgument) Delete() { - C.QIconEngine__ScaledPixmapArgument_Delete(this.h) + C.QIconEngine__ScaledPixmapArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qiconengine.h b/qt/gen_qiconengine.h index d707ad43..f5a20038 100644 --- a/qt/gen_qiconengine.h +++ b/qt/gen_qiconengine.h @@ -51,22 +51,20 @@ struct miqt_string QIconEngine_Key(const QIconEngine* self); QIconEngine* QIconEngine_Clone(const QIconEngine* self); bool QIconEngine_Read(QIconEngine* self, QDataStream* in); bool QIconEngine_Write(const QIconEngine* self, QDataStream* out); -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(const QIconEngine* self); +struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(const QIconEngine* self, int mode, int state); struct miqt_string QIconEngine_IconName(const QIconEngine* self); bool QIconEngine_IsNull(const QIconEngine* self); QPixmap* QIconEngine_ScaledPixmap(QIconEngine* self, QSize* size, int mode, int state, double scale); void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data); -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes1(const QIconEngine* self, int mode); -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes2(const QIconEngine* self, int mode, int state); -void QIconEngine_Delete(QIconEngine* self); +void QIconEngine_Delete(QIconEngine* self, bool isSubclass); -QIconEngine__AvailableSizesArgument* QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1); +void QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1, QIconEngine__AvailableSizesArgument** outptr_QIconEngine__AvailableSizesArgument); void QIconEngine__AvailableSizesArgument_OperatorAssign(QIconEngine__AvailableSizesArgument* self, QIconEngine__AvailableSizesArgument* param1); -void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgument* self); +void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgument* self, bool isSubclass); -QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1); +void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument); void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1); -void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self); +void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qiconengineplugin.cpp b/qt/gen_qiconengineplugin.cpp index b70d79a6..ef721842 100644 --- a/qt/gen_qiconengineplugin.cpp +++ b/qt/gen_qiconengineplugin.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -38,8 +39,9 @@ struct miqt_string QIconEnginePlugin_TrUtf8(const char* s) { return _ms; } -QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self) { - return self->create(); +QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self, struct miqt_string filename) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + return self->create(filename_QString); } struct miqt_string QIconEnginePlugin_Tr2(const char* s, const char* c) { @@ -86,12 +88,11 @@ struct miqt_string QIconEnginePlugin_TrUtf83(const char* s, const char* c, int n return _ms; } -QIconEngine* QIconEnginePlugin_Create1(QIconEnginePlugin* self, struct miqt_string filename) { - QString filename_QString = QString::fromUtf8(filename.data, filename.len); - return self->create(filename_QString); -} - -void QIconEnginePlugin_Delete(QIconEnginePlugin* self) { - delete self; +void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qiconengineplugin.go b/qt/gen_qiconengineplugin.go index 9b6dbe66..b18469a2 100644 --- a/qt/gen_qiconengineplugin.go +++ b/qt/gen_qiconengineplugin.go @@ -14,7 +14,8 @@ import ( ) type QIconEnginePlugin struct { - h *C.QIconEnginePlugin + h *C.QIconEnginePlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QIconEnginePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIconEnginePlugin(h *C.QIconEnginePlugin) *QIconEnginePlugin { +// newQIconEnginePlugin constructs the type using only CGO pointers. +func newQIconEnginePlugin(h *C.QIconEnginePlugin, h_QObject *C.QObject) *QIconEnginePlugin { if h == nil { return nil } - return &QIconEnginePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QIconEnginePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQIconEnginePlugin(h unsafe.Pointer) *QIconEnginePlugin { - return newQIconEnginePlugin((*C.QIconEnginePlugin)(h)) +// UnsafeNewQIconEnginePlugin constructs the type using only unsafe pointers. +func UnsafeNewQIconEnginePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIconEnginePlugin { + if h == nil { + return nil + } + + return &QIconEnginePlugin{h: (*C.QIconEnginePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QIconEnginePlugin) MetaObject() *QMetaObject { @@ -71,8 +80,12 @@ func QIconEnginePlugin_TrUtf8(s string) string { return _ret } -func (this *QIconEnginePlugin) Create() *QIconEngine { - return UnsafeNewQIconEngine(unsafe.Pointer(C.QIconEnginePlugin_Create(this.h))) +func (this *QIconEnginePlugin) Create(filename string) *QIconEngine { + filename_ms := C.struct_miqt_string{} + filename_ms.data = C.CString(filename) + filename_ms.len = C.size_t(len(filename)) + defer C.free(unsafe.Pointer(filename_ms.data)) + return UnsafeNewQIconEngine(unsafe.Pointer(C.QIconEnginePlugin_Create(this.h, filename_ms))) } func QIconEnginePlugin_Tr2(s string, c string) string { @@ -119,17 +132,9 @@ func QIconEnginePlugin_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QIconEnginePlugin) Create1(filename string) *QIconEngine { - filename_ms := C.struct_miqt_string{} - filename_ms.data = C.CString(filename) - filename_ms.len = C.size_t(len(filename)) - defer C.free(unsafe.Pointer(filename_ms.data)) - return UnsafeNewQIconEngine(unsafe.Pointer(C.QIconEnginePlugin_Create1(this.h, filename_ms))) -} - // Delete this object from C++ memory. func (this *QIconEnginePlugin) Delete() { - C.QIconEnginePlugin_Delete(this.h) + C.QIconEnginePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qiconengineplugin.h b/qt/gen_qiconengineplugin.h index 12db2968..d9895e6f 100644 --- a/qt/gen_qiconengineplugin.h +++ b/qt/gen_qiconengineplugin.h @@ -18,23 +18,24 @@ extern "C" { class QIconEngine; class QIconEnginePlugin; class QMetaObject; +class QObject; #else typedef struct QIconEngine QIconEngine; typedef struct QIconEnginePlugin QIconEnginePlugin; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self); void* QIconEnginePlugin_Metacast(QIconEnginePlugin* self, const char* param1); struct miqt_string QIconEnginePlugin_Tr(const char* s); struct miqt_string QIconEnginePlugin_TrUtf8(const char* s); -QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self); +QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self, struct miqt_string filename); struct miqt_string QIconEnginePlugin_Tr2(const char* s, const char* c); struct miqt_string QIconEnginePlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QIconEnginePlugin_TrUtf82(const char* s, const char* c); struct miqt_string QIconEnginePlugin_TrUtf83(const char* s, const char* c, int n); -QIconEngine* QIconEnginePlugin_Create1(QIconEnginePlugin* self, struct miqt_string filename); -void QIconEnginePlugin_Delete(QIconEnginePlugin* self); +void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qidentityproxymodel.cpp b/qt/gen_qidentityproxymodel.cpp index 28b22c80..cbb557c0 100644 --- a/qt/gen_qidentityproxymodel.cpp +++ b/qt/gen_qidentityproxymodel.cpp @@ -1,10 +1,13 @@ #include +#include #include #include +#include #include #include #include #include +#include #include #include #include @@ -13,12 +16,1063 @@ #include "gen_qidentityproxymodel.h" #include "_cgo_export.h" -QIdentityProxyModel* QIdentityProxyModel_new() { - return new QIdentityProxyModel(); +class MiqtVirtualQIdentityProxyModel : public virtual QIdentityProxyModel { +public: + + MiqtVirtualQIdentityProxyModel(): QIdentityProxyModel() {}; + MiqtVirtualQIdentityProxyModel(QObject* parent): QIdentityProxyModel(parent) {}; + + virtual ~MiqtVirtualQIdentityProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QIdentityProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QIdentityProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QIdentityProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QIdentityProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override { + if (handle__MapFromSource == 0) { + return QIdentityProxyModel::mapFromSource(sourceIndex); + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapFromSource(QModelIndex* sourceIndex) const { + + return new QModelIndex(QIdentityProxyModel::mapFromSource(*sourceIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const override { + if (handle__MapToSource == 0) { + return QIdentityProxyModel::mapToSource(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapToSource(QModelIndex* proxyIndex) const { + + return new QModelIndex(QIdentityProxyModel::mapToSource(*proxyIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QIdentityProxyModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QIdentityProxyModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QIdentityProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QIdentityProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QIdentityProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QIdentityProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QIdentityProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QIdentityProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QIdentityProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QIdentityProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QIdentityProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QIdentityProxyModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QIdentityProxyModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSourceModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSourceModel(QAbstractItemModel* sourceModel) override { + if (handle__SetSourceModel == 0) { + QIdentityProxyModel::setSourceModel(sourceModel); + return; + } + + QAbstractItemModel* sigval1 = sourceModel; + + miqt_exec_callback_QIdentityProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* sourceModel) { + + QIdentityProxyModel::setSourceModel(sourceModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QIdentityProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QIdentityProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QIdentityProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QIdentityProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QIdentityProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QIdentityProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QIdentityProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QIdentityProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QIdentityProxyModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QIdentityProxyModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QIdentityProxyModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QIdentityProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QIdentityProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QIdentityProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QIdentityProxyModel::revert(); + return; + } + + + miqt_exec_callback_QIdentityProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QIdentityProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& proxyIndex, int role) const override { + if (handle__Data == 0) { + return QIdentityProxyModel::data(proxyIndex, role); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* proxyIndex, int role) const { + + return new QVariant(QIdentityProxyModel::data(*proxyIndex, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QIdentityProxyModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QIdentityProxyModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QIdentityProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QIdentityProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QIdentityProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QIdentityProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QIdentityProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QIdentityProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QIdentityProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QIdentityProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QIdentityProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QIdentityProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QIdentityProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QIdentityProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QIdentityProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QIdentityProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QIdentityProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QIdentityProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QIdentityProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QIdentityProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QIdentityProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QIdentityProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QIdentityProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QIdentityProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QIdentityProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QIdentityProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QIdentityProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QIdentityProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QIdentityProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QIdentityProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QIdentityProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QIdentityProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QIdentityProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QIdentityProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + +}; + +void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(); + *outptr_QIdentityProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent) { - return new QIdentityProxyModel(parent); +void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(parent); + *outptr_QIdentityProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self) { @@ -51,12 +1105,12 @@ struct miqt_string QIdentityProxyModel_TrUtf8(const char* s) { return _ms; } -int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self) { - return self->columnCount(); +int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QIdentityProxyModel_MapFromSource(const QIdentityProxyModel* self, QModelIndex* sourceIndex) { @@ -71,12 +1125,12 @@ QModelIndex* QIdentityProxyModel_Parent(const QIdentityProxyModel* self, QModelI return new QModelIndex(self->parent(*child)); } -int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self) { - return self->rowCount(); +int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } bool QIdentityProxyModel_DropMimeData(QIdentityProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { @@ -87,8 +1141,8 @@ QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* self, int ro return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value); +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -104,20 +1158,20 @@ void QIdentityProxyModel_SetSourceModel(QIdentityProxyModel* self, QAbstractItem self->setSourceModel(sourceModel); } -bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } -bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QIdentityProxyModel_MoveRows(QIdentityProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { @@ -172,65 +1226,299 @@ struct miqt_string QIdentityProxyModel_TrUtf83(const char* s, const char* c, int return _ms; } -int QIdentityProxyModel_ColumnCount1(const QIdentityProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QIdentityProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__ColumnCount = slot; } -QModelIndex* QIdentityProxyModel_Index3(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +int QIdentityProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_ColumnCount(parent); } -int QIdentityProxyModel_RowCount1(const QIdentityProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QIdentityProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Index = slot; } -QVariant* QIdentityProxyModel_HeaderData3(const QIdentityProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +QModelIndex* QIdentityProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Index(row, column, parent); } -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match4(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +void QIdentityProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapFromSource = slot; } -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match5(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +QModelIndex* QIdentityProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); } -bool QIdentityProxyModel_InsertColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); +void QIdentityProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapToSource = slot; } -bool QIdentityProxyModel_InsertRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +QModelIndex* QIdentityProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapToSource(proxyIndex); } -bool QIdentityProxyModel_RemoveColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); +void QIdentityProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Parent = slot; } -bool QIdentityProxyModel_RemoveRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +QModelIndex* QIdentityProxyModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Parent(child); +} + +void QIdentityProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RowCount = slot; +} + +int QIdentityProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RowCount(parent); +} + +void QIdentityProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QIdentityProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QIdentityProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QIdentityProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QIdentityProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QIdentityProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QIdentityProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QIdentityProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetSourceModel = slot; +} + +void QIdentityProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetSourceModel(sourceModel); +} + +void QIdentityProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QIdentityProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QIdentityProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QIdentityProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QIdentityProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QIdentityProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QIdentityProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QIdentityProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QIdentityProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QIdentityProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QIdentityProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QIdentityProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QIdentityProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Submit = slot; +} + +bool QIdentityProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Submit(); +} + +void QIdentityProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Revert = slot; +} + +void QIdentityProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Revert(); +} + +void QIdentityProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QIdentityProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Data(proxyIndex, role); +} + +void QIdentityProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QIdentityProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_ItemData(index); } -void QIdentityProxyModel_Delete(QIdentityProxyModel* self) { - delete self; +void QIdentityProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Flags = slot; +} + +int QIdentityProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QIdentityProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetData = slot; +} + +bool QIdentityProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QIdentityProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QIdentityProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QIdentityProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QIdentityProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QIdentityProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QIdentityProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QIdentityProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QIdentityProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QIdentityProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QIdentityProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QIdentityProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Sort = slot; +} + +void QIdentityProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QIdentityProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QIdentityProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Span(index); +} + +void QIdentityProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QIdentityProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QIdentityProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QIdentityProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QIdentityProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QIdentityProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QIdentityProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QIdentityProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QIdentityProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QIdentityProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QIdentityProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QIdentityProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QIdentityProxyModel_Delete(QIdentityProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qidentityproxymodel.go b/qt/gen_qidentityproxymodel.go index 5735a09f..de909b10 100644 --- a/qt/gen_qidentityproxymodel.go +++ b/qt/gen_qidentityproxymodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QIdentityProxyModel struct { - h *C.QIdentityProxyModel + h *C.QIdentityProxyModel + isSubclass bool *QAbstractProxyModel } @@ -32,27 +34,49 @@ func (this *QIdentityProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIdentityProxyModel(h *C.QIdentityProxyModel) *QIdentityProxyModel { +// newQIdentityProxyModel constructs the type using only CGO pointers. +func newQIdentityProxyModel(h *C.QIdentityProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QIdentityProxyModel { if h == nil { return nil } - return &QIdentityProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))} + return &QIdentityProxyModel{h: h, + QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQIdentityProxyModel(h unsafe.Pointer) *QIdentityProxyModel { - return newQIdentityProxyModel((*C.QIdentityProxyModel)(h)) +// UnsafeNewQIdentityProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQIdentityProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QIdentityProxyModel { + if h == nil { + return nil + } + + return &QIdentityProxyModel{h: (*C.QIdentityProxyModel)(h), + QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } // NewQIdentityProxyModel constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel() *QIdentityProxyModel { - ret := C.QIdentityProxyModel_new() - return newQIdentityProxyModel(ret) + var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QIdentityProxyModel_new(&outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIdentityProxyModel2 constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel2(parent *QObject) *QIdentityProxyModel { - ret := C.QIdentityProxyModel_new2(parent.cPointer()) - return newQIdentityProxyModel(ret) + var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QIdentityProxyModel_new2(parent.cPointer(), &outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QIdentityProxyModel) MetaObject() *QMetaObject { @@ -83,12 +107,12 @@ func QIdentityProxyModel_TrUtf8(s string) string { return _ret } -func (this *QIdentityProxyModel) ColumnCount() int { - return (int)(C.QIdentityProxyModel_ColumnCount(this.h)) +func (this *QIdentityProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QIdentityProxyModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QIdentityProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QIdentityProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QIdentityProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QIdentityProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -115,12 +139,12 @@ func (this *QIdentityProxyModel) Parent(child *QModelIndex) *QModelIndex { return _goptr } -func (this *QIdentityProxyModel) RowCount() int { - return (int)(C.QIdentityProxyModel_RowCount(this.h)) +func (this *QIdentityProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QIdentityProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QIdentityProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QIdentityProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QIdentityProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QIdentityProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -137,8 +161,8 @@ func (this *QIdentityProxyModel) Sibling(row int, column int, idx *QModelIndex) return _goptr } -func (this *QIdentityProxyModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex { - var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer()) +func (this *QIdentityProxyModel) Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -154,20 +178,20 @@ func (this *QIdentityProxyModel) SetSourceModel(sourceModel *QAbstractItemModel) C.QIdentityProxyModel_SetSourceModel(this.h, sourceModel.cPointer()) } -func (this *QIdentityProxyModel) InsertColumns(column int, count int) bool { - return (bool)(C.QIdentityProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QIdentityProxyModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QIdentityProxyModel) InsertRows(row int, count int) bool { - return (bool)(C.QIdentityProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QIdentityProxyModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QIdentityProxyModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QIdentityProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QIdentityProxyModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QIdentityProxyModel) RemoveRows(row int, count int) bool { - return (bool)(C.QIdentityProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QIdentityProxyModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } func (this *QIdentityProxyModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { @@ -222,30 +246,271 @@ func QIdentityProxyModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QIdentityProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QIdentityProxyModel_ColumnCount1(this.h, parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QIdentityProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QIdentityProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_ColumnCount +func miqt_exec_callback_QIdentityProxyModel_ColumnCount(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Index +func miqt_exec_callback_QIdentityProxyModel_Index(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_MapFromSource(sourceIndex *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_MapFromSource(unsafe.Pointer(this.h), sourceIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapFromSource(slot func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapFromSource +func miqt_exec_callback_QIdentityProxyModel_MapFromSource(self *C.QIdentityProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceIndex)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapFromSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_MapToSource(proxyIndex *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_MapToSource(unsafe.Pointer(this.h), proxyIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapToSource(slot func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapToSource +func miqt_exec_callback_QIdentityProxyModel_MapToSource(self *C.QIdentityProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapToSource, slotval1) + + return virtualReturn.cPointer() + } -func (this *QIdentityProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QIdentityProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QIdentityProxyModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QIdentityProxyModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Parent +func miqt_exec_callback_QIdentityProxyModel_Parent(self *C.QIdentityProxyModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QIdentityProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + } +func (this *QIdentityProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QIdentityProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RowCount +func miqt_exec_callback_QIdentityProxyModel_RowCount(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) -func (this *QIdentityProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QIdentityProxyModel_RowCount1(this.h, parent.cPointer())) } -func (this *QIdentityProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QIdentityProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QIdentityProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QIdentityProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QIdentityProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QIdentityProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_HeaderData +func miqt_exec_callback_QIdentityProxyModel_HeaderData(self *C.QIdentityProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_DropMimeData +func miqt_exec_callback_QIdentityProxyModel_DropMimeData(self *C.QIdentityProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } +func (this *QIdentityProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Sibling +func miqt_exec_callback_QIdentityProxyModel_Sibling(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QIdentityProxyModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex { - var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits)) + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QIdentityProxyModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -255,40 +520,816 @@ func (this *QIdentityProxyModel) Match4(start *QModelIndex, role int, value *QVa _ret[i] = *_lv_goptr } return _ret + +} +func (this *QIdentityProxyModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QIdentityProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QIdentityProxyModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { - var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya +//export miqt_exec_callback_QIdentityProxyModel_Match +func miqt_exec_callback_QIdentityProxyModel_Match(self *C.QIdentityProxyModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetSourceModel(sourceModel *QAbstractItemModel) { + + C.QIdentityProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), sourceModel.cPointer()) + +} +func (this *QIdentityProxyModel) OnSetSourceModel(slot func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) { + C.QIdentityProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetSourceModel +func miqt_exec_callback_QIdentityProxyModel_SetSourceModel(self *C.QIdentityProxyModel, cb C.intptr_t, sourceModel *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(sourceModel), nil) + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} + +func (this *QIdentityProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_InsertColumns +func miqt_exec_callback_QIdentityProxyModel_InsertColumns(self *C.QIdentityProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_InsertRows +func miqt_exec_callback_QIdentityProxyModel_InsertRows(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RemoveColumns +func miqt_exec_callback_QIdentityProxyModel_RemoveColumns(self *C.QIdentityProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RemoveRows +func miqt_exec_callback_QIdentityProxyModel_RemoveRows(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QIdentityProxyModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QIdentityProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MoveRows +func miqt_exec_callback_QIdentityProxyModel_MoveRows(self *C.QIdentityProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QIdentityProxyModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QIdentityProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MoveColumns +func miqt_exec_callback_QIdentityProxyModel_MoveColumns(self *C.QIdentityProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QIdentityProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QIdentityProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Submit +func miqt_exec_callback_QIdentityProxyModel_Submit(self *C.QIdentityProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Revert() { + + C.QIdentityProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QIdentityProxyModel) OnRevert(slot func(super func())) { + C.QIdentityProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Revert +func miqt_exec_callback_QIdentityProxyModel_Revert(self *C.QIdentityProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Data(proxyIndex *QModelIndex, role int) *QVariant { + + _ret := C.QIdentityProxyModel_virtualbase_Data(unsafe.Pointer(this.h), proxyIndex.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnData(slot func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) { + C.QIdentityProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Data +func miqt_exec_callback_QIdentityProxyModel_Data(self *C.QIdentityProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QIdentityProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QIdentityProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QIdentityProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_ItemData +func miqt_exec_callback_QIdentityProxyModel_ItemData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QIdentityProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QIdentityProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QIdentityProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QIdentityProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Flags +func miqt_exec_callback_QIdentityProxyModel_Flags(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QIdentityProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QIdentityProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetData +func miqt_exec_callback_QIdentityProxyModel_SetData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QIdentityProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QIdentityProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QIdentityProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetItemData +func miqt_exec_callback_QIdentityProxyModel_SetItemData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QIdentityProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QIdentityProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetHeaderData +func miqt_exec_callback_QIdentityProxyModel_SetHeaderData(self *C.QIdentityProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Buddy +func miqt_exec_callback_QIdentityProxyModel_Buddy(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_CanFetchMore +func miqt_exec_callback_QIdentityProxyModel_CanFetchMore(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QIdentityProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QIdentityProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QIdentityProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_FetchMore +func miqt_exec_callback_QIdentityProxyModel_FetchMore(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QIdentityProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QIdentityProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QIdentityProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Sort +func miqt_exec_callback_QIdentityProxyModel_Sort(self *C.QIdentityProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QIdentityProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QIdentityProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Span +func miqt_exec_callback_QIdentityProxyModel_Span(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_HasChildren +func miqt_exec_callback_QIdentityProxyModel_HasChildren(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QIdentityProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QIdentityProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QIdentityProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MimeData +func miqt_exec_callback_QIdentityProxyModel_MimeData(self *C.QIdentityProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_CanDropMimeData +func miqt_exec_callback_QIdentityProxyModel_CanDropMimeData(self *C.QIdentityProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QIdentityProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret } return _ret + +} +func (this *QIdentityProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QIdentityProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QIdentityProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QIdentityProxyModel_MimeTypes +func miqt_exec_callback_QIdentityProxyModel_MimeTypes(self *C.QIdentityProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + } -func (this *QIdentityProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QIdentityProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QIdentityProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QIdentityProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SupportedDragActions +func miqt_exec_callback_QIdentityProxyModel_SupportedDragActions(self *C.QIdentityProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + } -func (this *QIdentityProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QIdentityProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + } +func (this *QIdentityProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QIdentityProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SupportedDropActions +func miqt_exec_callback_QIdentityProxyModel_SupportedDropActions(self *C.QIdentityProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) -func (this *QIdentityProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } // Delete this object from C++ memory. func (this *QIdentityProxyModel) Delete() { - C.QIdentityProxyModel_Delete(this.h) + C.QIdentityProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qidentityproxymodel.h b/qt/gen_qidentityproxymodel.h index 8b78dfa1..cf8625ac 100644 --- a/qt/gen_qidentityproxymodel.h +++ b/qt/gen_qidentityproxymodel.h @@ -16,60 +16,126 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractProxyModel; class QIdentityProxyModel; class QMetaObject; class QMimeData; class QModelIndex; class QObject; +class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QIdentityProxyModel QIdentityProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; +typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QIdentityProxyModel* QIdentityProxyModel_new(); -QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent); +void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self); void* QIdentityProxyModel_Metacast(QIdentityProxyModel* self, const char* param1); struct miqt_string QIdentityProxyModel_Tr(const char* s); struct miqt_string QIdentityProxyModel_TrUtf8(const char* s); -int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self); -QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column); +int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self, QModelIndex* parent); +QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent); QModelIndex* QIdentityProxyModel_MapFromSource(const QIdentityProxyModel* self, QModelIndex* sourceIndex); QModelIndex* QIdentityProxyModel_MapToSource(const QIdentityProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QIdentityProxyModel_Parent(const QIdentityProxyModel* self, QModelIndex* child); -int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self); -QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation); +int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self, QModelIndex* parent); +QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation, int role); bool QIdentityProxyModel_DropMimeData(QIdentityProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* self, int row, int column, QModelIndex* idx); -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value); +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); void QIdentityProxyModel_SetSourceModel(QIdentityProxyModel* self, QAbstractItemModel* sourceModel); -bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count); -bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count); -bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count); -bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count); +bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); +bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); +bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); +bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); bool QIdentityProxyModel_MoveRows(QIdentityProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); bool QIdentityProxyModel_MoveColumns(QIdentityProxyModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); struct miqt_string QIdentityProxyModel_Tr2(const char* s, const char* c); struct miqt_string QIdentityProxyModel_Tr3(const char* s, const char* c, int n); struct miqt_string QIdentityProxyModel_TrUtf82(const char* s, const char* c); struct miqt_string QIdentityProxyModel_TrUtf83(const char* s, const char* c, int n); -int QIdentityProxyModel_ColumnCount1(const QIdentityProxyModel* self, QModelIndex* parent); -QModelIndex* QIdentityProxyModel_Index3(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent); -int QIdentityProxyModel_RowCount1(const QIdentityProxyModel* self, QModelIndex* parent); -QVariant* QIdentityProxyModel_HeaderData3(const QIdentityProxyModel* self, int section, int orientation, int role); -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match4(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits); -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match5(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); -bool QIdentityProxyModel_InsertColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); -bool QIdentityProxyModel_InsertRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); -bool QIdentityProxyModel_RemoveColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); -bool QIdentityProxyModel_RemoveRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); -void QIdentityProxyModel_Delete(QIdentityProxyModel* self); +void QIdentityProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QIdentityProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QIdentityProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QIdentityProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QIdentityProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QIdentityProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QIdentityProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QIdentityProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel); +void QIdentityProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QIdentityProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QIdentityProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_Submit(void* self); +void QIdentityProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_Revert(void* self); +void QIdentityProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QIdentityProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role); +void QIdentityProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QIdentityProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QIdentityProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QIdentityProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QIdentityProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_Sort(void* self, int column, int order); +void QIdentityProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QIdentityProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QIdentityProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QIdentityProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QIdentityProxyModel_virtualbase_MimeTypes(const void* self); +void QIdentityProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_SupportedDragActions(const void* self); +void QIdentityProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_SupportedDropActions(const void* self); +void QIdentityProxyModel_Delete(QIdentityProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qimage.cpp b/qt/gen_qimage.cpp index da79f0a1..ba8b2f7a 100644 --- a/qt/gen_qimage.cpp +++ b/qt/gen_qimage.cpp @@ -6,7 +6,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -19,46 +21,221 @@ #include "gen_qimage.h" #include "_cgo_export.h" -QImage* QImage_new() { - return new QImage(); +class MiqtVirtualQImage : public virtual QImage { +public: + + MiqtVirtualQImage(): QImage() {}; + MiqtVirtualQImage(const QSize& size, QImage::Format format): QImage(size, format) {}; + MiqtVirtualQImage(int width, int height, QImage::Format format): QImage(width, height, format) {}; + MiqtVirtualQImage(uchar* data, int width, int height, QImage::Format format): QImage(data, width, height, format) {}; + MiqtVirtualQImage(const uchar* data, int width, int height, QImage::Format format): QImage(data, width, height, format) {}; + MiqtVirtualQImage(uchar* data, int width, int height, int bytesPerLine, QImage::Format format): QImage(data, width, height, bytesPerLine, format) {}; + MiqtVirtualQImage(const uchar* data, int width, int height, int bytesPerLine, QImage::Format format): QImage(data, width, height, bytesPerLine, format) {}; + MiqtVirtualQImage(const QString& fileName): QImage(fileName) {}; + MiqtVirtualQImage(const QImage& param1): QImage(param1) {}; + MiqtVirtualQImage(const QString& fileName, const char* format): QImage(fileName, format) {}; + + virtual ~MiqtVirtualQImage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QImage::devType(); + } + + + int callback_return_value = miqt_exec_callback_QImage_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QImage::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QImage::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QImage_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QImage::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override { + if (handle__Metric == 0) { + return QImage::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QImage_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int metric) const { + + return QImage::metric(static_cast(metric)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QImage::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QImage_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QImage::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QImage::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QImage_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QImage::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QImage::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QImage_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QImage::sharedPainter(); + + } + +}; + +void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new2(QSize* size, int format) { - return new QImage(*size, static_cast(format)); +void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(*size, static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new3(int width, int height, int format) { - return new QImage(static_cast(width), static_cast(height), static_cast(format)); +void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(width), static_cast(height), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new4(unsigned char* data, int width, int height, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); +void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new5(const unsigned char* data, int width, int height, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); +void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); +void QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); +void QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new8(struct miqt_string fileName) { +void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImage(fileName_QString); + MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new9(QImage* param1) { - return new QImage(*param1); +void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(*param1); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new10(struct miqt_string fileName, const char* format) { +void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImage(fileName_QString, format); + MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString, format); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } void QImage_OperatorAssign(QImage* self, QImage* param1) { @@ -652,7 +829,59 @@ struct miqt_string QImage_Text1(const QImage* self, struct miqt_string key) { return _ms; } -void QImage_Delete(QImage* self) { - delete self; +void QImage_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__DevType = slot; +} + +int QImage_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_DevType(); +} + +void QImage_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QImage_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_PaintEngine(); +} + +void QImage_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__Metric = slot; +} + +int QImage_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_Metric(metric); +} + +void QImage_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__InitPainter = slot; +} + +void QImage_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQImage*)(self) )->virtualbase_InitPainter(painter); +} + +void QImage_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QImage_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_Redirected(offset); +} + +void QImage_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QImage_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_SharedPainter(); +} + +void QImage_Delete(QImage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qimage.go b/qt/gen_qimage.go index 29b39e5c..14b95817 100644 --- a/qt/gen_qimage.go +++ b/qt/gen_qimage.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -57,7 +58,8 @@ const ( ) type QImage struct { - h *C.QImage + h *C.QImage + isSubclass bool *QPaintDevice } @@ -75,57 +77,100 @@ func (this *QImage) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQImage(h *C.QImage) *QImage { +// newQImage constructs the type using only CGO pointers. +func newQImage(h *C.QImage, h_QPaintDevice *C.QPaintDevice) *QImage { if h == nil { return nil } - return &QImage{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QImage{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQImage(h unsafe.Pointer) *QImage { - return newQImage((*C.QImage)(h)) +// UnsafeNewQImage constructs the type using only unsafe pointers. +func UnsafeNewQImage(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QImage { + if h == nil { + return nil + } + + return &QImage{h: (*C.QImage)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQImage constructs a new QImage object. func NewQImage() *QImage { - ret := C.QImage_new() - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new(&outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage2 constructs a new QImage object. func NewQImage2(size *QSize, format QImage__Format) *QImage { - ret := C.QImage_new2(size.cPointer(), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new2(size.cPointer(), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage3 constructs a new QImage object. func NewQImage3(width int, height int, format QImage__Format) *QImage { - ret := C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage4 constructs a new QImage object. func NewQImage4(data *byte, width int, height int, format QImage__Format) *QImage { - ret := C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage5 constructs a new QImage object. func NewQImage5(data *byte, width int, height int, format QImage__Format) *QImage { - ret := C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage6 constructs a new QImage object. func NewQImage6(data *byte, width int, height int, bytesPerLine int, format QImage__Format) *QImage { - ret := C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage7 constructs a new QImage object. func NewQImage7(data *byte, width int, height int, bytesPerLine int, format QImage__Format) *QImage { - ret := C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage8 constructs a new QImage object. @@ -134,14 +179,24 @@ func NewQImage8(fileName string) *QImage { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QImage_new8(fileName_ms) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new8(fileName_ms, &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage9 constructs a new QImage object. func NewQImage9(param1 *QImage) *QImage { - ret := C.QImage_new9(param1.cPointer()) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new9(param1.cPointer(), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage10 constructs a new QImage object. @@ -152,8 +207,13 @@ func NewQImage10(fileName string, format string) *QImage { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QImage_new10(fileName_ms, format_Cstring) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new10(fileName_ms, format_Cstring, &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QImage) OperatorAssign(param1 *QImage) { @@ -190,14 +250,14 @@ func (this *QImage) IsDetached() bool { func (this *QImage) Copy() *QImage { _ret := C.QImage_Copy(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Copy2(x int, y int, w int, h int) *QImage { _ret := C.QImage_Copy2(this.h, (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -208,7 +268,7 @@ func (this *QImage) Format() QImage__Format { func (this *QImage) ConvertToFormat(f QImage__Format) *QImage { _ret := C.QImage_ConvertToFormat(this.h, (C.int)(f)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -221,7 +281,7 @@ func (this *QImage) ConvertToFormat2(f QImage__Format, colorTable []uint) *QImag } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} _ret := C.QImage_ConvertToFormat2(this.h, (C.int)(f), colorTable_ma) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -428,63 +488,63 @@ func (this *QImage) SetAlphaChannel(alphaChannel *QImage) { func (this *QImage) AlphaChannel() *QImage { _ret := C.QImage_AlphaChannel(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateAlphaMask() *QImage { _ret := C.QImage_CreateAlphaMask(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask() *QImage { _ret := C.QImage_CreateHeuristicMask(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor(color uint) *QImage { _ret := C.QImage_CreateMaskFromColor(this.h, (C.uint)(color)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled(w int, h int) *QImage { _ret := C.QImage_Scaled(this.h, (C.int)(w), (C.int)(h)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledWithQSize(s *QSize) *QImage { _ret := C.QImage_ScaledWithQSize(this.h, s.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth(w int) *QImage { _ret := C.QImage_ScaledToWidth(this.h, (C.int)(w)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight(h int) *QImage { _ret := C.QImage_ScaledToHeight(this.h, (C.int)(h)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed(matrix *QMatrix) *QImage { _ret := C.QImage_Transformed(this.h, matrix.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -498,7 +558,7 @@ func QImage_TrueMatrix(param1 *QMatrix, w int, h int) *QMatrix { func (this *QImage) TransformedWithMatrix(matrix *QTransform) *QImage { _ret := C.QImage_TransformedWithMatrix(this.h, matrix.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -512,14 +572,14 @@ func QImage_TrueMatrix2(param1 *QTransform, w int, h int) *QTransform { func (this *QImage) Mirrored() *QImage { _ret := C.QImage_Mirrored(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) RgbSwapped() *QImage { _ret := C.QImage_RgbSwapped(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -537,7 +597,7 @@ func (this *QImage) ColorSpace() *QColorSpace { func (this *QImage) ConvertedToColorSpace(param1 *QColorSpace) *QImage { _ret := C.QImage_ConvertedToColorSpace(this.h, param1.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -593,7 +653,7 @@ func (this *QImage) SaveWithDevice(device *QIODevice) bool { func QImage_FromData(data *byte, size int) *QImage { _ret := C.QImage_FromData((*C.uchar)(unsafe.Pointer(data)), (C.int)(size)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -603,7 +663,7 @@ func QImage_FromDataWithData(data []byte) *QImage { data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) _ret := C.QImage_FromDataWithData(data_alias) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -695,14 +755,14 @@ func QImage_ToImageFormat(format QPixelFormat) QImage__Format { func (this *QImage) Copy1(rect *QRect) *QImage { _ret := C.QImage_Copy1(this.h, rect.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ConvertToFormat22(f QImage__Format, flags ImageConversionFlag) *QImage { _ret := C.QImage_ConvertToFormat22(this.h, (C.int)(f), (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -715,7 +775,7 @@ func (this *QImage) ConvertToFormat3(f QImage__Format, colorTable []uint, flags } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} _ret := C.QImage_ConvertToFormat3(this.h, (C.int)(f), colorTable_ma, (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -726,91 +786,91 @@ func (this *QImage) ConvertTo2(f QImage__Format, flags ImageConversionFlag) { func (this *QImage) CreateAlphaMask1(flags ImageConversionFlag) *QImage { _ret := C.QImage_CreateAlphaMask1(this.h, (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask1(clipTight bool) *QImage { _ret := C.QImage_CreateHeuristicMask1(this.h, (C.bool)(clipTight)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor2(color uint, mode MaskMode) *QImage { _ret := C.QImage_CreateMaskFromColor2(this.h, (C.uint)(color), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled3(w int, h int, aspectMode AspectRatioMode) *QImage { _ret := C.QImage_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QImage { _ret := C.QImage_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled2(s *QSize, aspectMode AspectRatioMode) *QImage { _ret := C.QImage_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QImage { _ret := C.QImage_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth2(w int, mode TransformationMode) *QImage { _ret := C.QImage_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight2(h int, mode TransformationMode) *QImage { _ret := C.QImage_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed2(matrix *QMatrix, mode TransformationMode) *QImage { _ret := C.QImage_Transformed2(this.h, matrix.cPointer(), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed22(matrix *QTransform, mode TransformationMode) *QImage { _ret := C.QImage_Transformed22(this.h, matrix.cPointer(), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored1(horizontally bool) *QImage { _ret := C.QImage_Mirrored1(this.h, (C.bool)(horizontally)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored2(horizontally bool, vertically bool) *QImage { _ret := C.QImage_Mirrored2(this.h, (C.bool)(horizontally), (C.bool)(vertically)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -880,7 +940,7 @@ func QImage_FromData3(data *byte, size int, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) _ret := C.QImage_FromData3((*C.uchar)(unsafe.Pointer(data)), (C.int)(size), format_Cstring) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -892,7 +952,7 @@ func QImage_FromData2(data []byte, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) _ret := C.QImage_FromData2(data_alias, format_Cstring) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -908,9 +968,145 @@ func (this *QImage) Text1(key string) string { return _ret } +func (this *QImage) callVirtualBase_DevType() int { + + return (int)(C.QImage_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QImage) OnDevType(slot func(super func() int) int) { + C.QImage_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_DevType +func miqt_exec_callback_QImage_DevType(self *C.QImage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QImage) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QImage_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QImage) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QImage_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_PaintEngine +func miqt_exec_callback_QImage_PaintEngine(self *C.QImage, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QImage) callVirtualBase_Metric(metric QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QImage_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QImage) OnMetric(slot func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) { + C.QImage_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_Metric +func miqt_exec_callback_QImage_Metric(self *C.QImage, cb C.intptr_t, metric C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(metric) + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QImage) callVirtualBase_InitPainter(painter *QPainter) { + + C.QImage_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QImage) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QImage_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_InitPainter +func miqt_exec_callback_QImage_InitPainter(self *C.QImage, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QImage{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QImage) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QImage_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QImage) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QImage_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_Redirected +func miqt_exec_callback_QImage_Redirected(self *C.QImage, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QImage) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QImage_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QImage) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QImage_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_SharedPainter +func miqt_exec_callback_QImage_SharedPainter(self *C.QImage, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QImage) Delete() { - C.QImage_Delete(this.h) + C.QImage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qimage.h b/qt/gen_qimage.h index b32b87ee..33cd5f91 100644 --- a/qt/gen_qimage.h +++ b/qt/gen_qimage.h @@ -22,7 +22,9 @@ class QColorTransform; class QIODevice; class QImage; class QMatrix; +class QPaintDevice; class QPaintEngine; +class QPainter; class QPixelFormat; class QPoint; class QRect; @@ -36,7 +38,9 @@ typedef struct QColorTransform QColorTransform; typedef struct QIODevice QIODevice; typedef struct QImage QImage; typedef struct QMatrix QMatrix; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; typedef struct QPixelFormat QPixelFormat; typedef struct QPoint QPoint; typedef struct QRect QRect; @@ -44,16 +48,16 @@ typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -QImage* QImage_new(); -QImage* QImage_new2(QSize* size, int format); -QImage* QImage_new3(int width, int height, int format); -QImage* QImage_new4(unsigned char* data, int width, int height, int format); -QImage* QImage_new5(const unsigned char* data, int width, int height, int format); -QImage* QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format); -QImage* QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format); -QImage* QImage_new8(struct miqt_string fileName); -QImage* QImage_new9(QImage* param1); -QImage* QImage_new10(struct miqt_string fileName, const char* format); +void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); void QImage_OperatorAssign(QImage* self, QImage* param1); void QImage_Swap(QImage* self, QImage* other); bool QImage_IsNull(const QImage* self); @@ -153,6 +157,7 @@ void QImage_SetText(QImage* self, struct miqt_string key, struct miqt_string val QPixelFormat* QImage_PixelFormat(const QImage* self); QPixelFormat* QImage_ToPixelFormat(int format); int QImage_ToImageFormat(QPixelFormat* format); +int QImage_Metric(const QImage* self, int metric); QImage* QImage_Copy1(const QImage* self, QRect* rect); QImage* QImage_ConvertToFormat22(const QImage* self, int f, int flags); QImage* QImage_ConvertToFormat3(const QImage* self, int f, struct miqt_array /* of unsigned int */ colorTable, int flags); @@ -181,7 +186,19 @@ bool QImage_Save32(const QImage* self, QIODevice* device, const char* format, in QImage* QImage_FromData3(const unsigned char* data, int size, const char* format); QImage* QImage_FromData2(struct miqt_string data, const char* format); struct miqt_string QImage_Text1(const QImage* self, struct miqt_string key); -void QImage_Delete(QImage* self); +void QImage_override_virtual_DevType(void* self, intptr_t slot); +int QImage_virtualbase_DevType(const void* self); +void QImage_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QImage_virtualbase_PaintEngine(const void* self); +void QImage_override_virtual_Metric(void* self, intptr_t slot); +int QImage_virtualbase_Metric(const void* self, int metric); +void QImage_override_virtual_InitPainter(void* self, intptr_t slot); +void QImage_virtualbase_InitPainter(const void* self, QPainter* painter); +void QImage_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QImage_virtualbase_Redirected(const void* self, QPoint* offset); +void QImage_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QImage_virtualbase_SharedPainter(const void* self); +void QImage_Delete(QImage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qimageiohandler.cpp b/qt/gen_qimageiohandler.cpp index 367a9977..8e8029fa 100644 --- a/qt/gen_qimageiohandler.cpp +++ b/qt/gen_qimageiohandler.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -101,8 +102,12 @@ QRect* QImageIOHandler_CurrentImageRect(const QImageIOHandler* self) { return new QRect(self->currentImageRect()); } -void QImageIOHandler_Delete(QImageIOHandler* self) { - delete self; +void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self) { @@ -141,8 +146,9 @@ int QImageIOPlugin_Capabilities(const QImageIOPlugin* self, QIODevice* device, s return static_cast(_ret); } -QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device) { - return self->create(device); +QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format) { + QByteArray format_QByteArray(format.data, format.len); + return self->create(device, format_QByteArray); } struct miqt_string QImageIOPlugin_Tr2(const char* s, const char* c) { @@ -189,12 +195,11 @@ struct miqt_string QImageIOPlugin_TrUtf83(const char* s, const char* c, int n) { return _ms; } -QImageIOHandler* QImageIOPlugin_Create2(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format) { - QByteArray format_QByteArray(format.data, format.len); - return self->create(device, format_QByteArray); -} - -void QImageIOPlugin_Delete(QImageIOPlugin* self) { - delete self; +void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qimageiohandler.go b/qt/gen_qimageiohandler.go index 984e8a02..70b6367a 100644 --- a/qt/gen_qimageiohandler.go +++ b/qt/gen_qimageiohandler.go @@ -60,7 +60,8 @@ const ( ) type QImageIOHandler struct { - h *C.QImageIOHandler + h *C.QImageIOHandler + isSubclass bool } func (this *QImageIOHandler) cPointer() *C.QImageIOHandler { @@ -77,6 +78,7 @@ func (this *QImageIOHandler) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageIOHandler constructs the type using only CGO pointers. func newQImageIOHandler(h *C.QImageIOHandler) *QImageIOHandler { if h == nil { return nil @@ -84,8 +86,13 @@ func newQImageIOHandler(h *C.QImageIOHandler) *QImageIOHandler { return &QImageIOHandler{h: h} } +// UnsafeNewQImageIOHandler constructs the type using only unsafe pointers. func UnsafeNewQImageIOHandler(h unsafe.Pointer) *QImageIOHandler { - return newQImageIOHandler((*C.QImageIOHandler)(h)) + if h == nil { + return nil + } + + return &QImageIOHandler{h: (*C.QImageIOHandler)(h)} } func (this *QImageIOHandler) SetDevice(device *QIODevice) { @@ -93,7 +100,7 @@ func (this *QImageIOHandler) SetDevice(device *QIODevice) { } func (this *QImageIOHandler) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QImageIOHandler_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QImageIOHandler_Device(this.h)), nil) } func (this *QImageIOHandler) SetFormat(format []byte) { @@ -184,7 +191,7 @@ func (this *QImageIOHandler) CurrentImageRect() *QRect { // Delete this object from C++ memory. func (this *QImageIOHandler) Delete() { - C.QImageIOHandler_Delete(this.h) + C.QImageIOHandler_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -197,7 +204,8 @@ func (this *QImageIOHandler) GoGC() { } type QImageIOPlugin struct { - h *C.QImageIOPlugin + h *C.QImageIOPlugin + isSubclass bool *QObject } @@ -215,15 +223,23 @@ func (this *QImageIOPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQImageIOPlugin(h *C.QImageIOPlugin) *QImageIOPlugin { +// newQImageIOPlugin constructs the type using only CGO pointers. +func newQImageIOPlugin(h *C.QImageIOPlugin, h_QObject *C.QObject) *QImageIOPlugin { if h == nil { return nil } - return &QImageIOPlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QImageIOPlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQImageIOPlugin(h unsafe.Pointer) *QImageIOPlugin { - return newQImageIOPlugin((*C.QImageIOPlugin)(h)) +// UnsafeNewQImageIOPlugin constructs the type using only unsafe pointers. +func UnsafeNewQImageIOPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImageIOPlugin { + if h == nil { + return nil + } + + return &QImageIOPlugin{h: (*C.QImageIOPlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QImageIOPlugin) MetaObject() *QMetaObject { @@ -261,8 +277,11 @@ func (this *QImageIOPlugin) Capabilities(device *QIODevice, format []byte) QImag return (QImageIOPlugin__Capability)(C.QImageIOPlugin_Capabilities(this.h, device.cPointer(), format_alias)) } -func (this *QImageIOPlugin) Create(device *QIODevice) *QImageIOHandler { - return UnsafeNewQImageIOHandler(unsafe.Pointer(C.QImageIOPlugin_Create(this.h, device.cPointer()))) +func (this *QImageIOPlugin) Create(device *QIODevice, format []byte) *QImageIOHandler { + format_alias := C.struct_miqt_string{} + format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) + format_alias.len = C.size_t(len(format)) + return UnsafeNewQImageIOHandler(unsafe.Pointer(C.QImageIOPlugin_Create(this.h, device.cPointer(), format_alias))) } func QImageIOPlugin_Tr2(s string, c string) string { @@ -309,16 +328,9 @@ func QImageIOPlugin_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QImageIOPlugin) Create2(device *QIODevice, format []byte) *QImageIOHandler { - format_alias := C.struct_miqt_string{} - format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) - format_alias.len = C.size_t(len(format)) - return UnsafeNewQImageIOHandler(unsafe.Pointer(C.QImageIOPlugin_Create2(this.h, device.cPointer(), format_alias))) -} - // Delete this object from C++ memory. func (this *QImageIOPlugin) Delete() { - C.QImageIOPlugin_Delete(this.h) + C.QImageIOPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qimageiohandler.h b/qt/gen_qimageiohandler.h index 76a3e985..ace9af97 100644 --- a/qt/gen_qimageiohandler.h +++ b/qt/gen_qimageiohandler.h @@ -21,6 +21,7 @@ class QImage; class QImageIOHandler; class QImageIOPlugin; class QMetaObject; +class QObject; class QRect; class QVariant; #else @@ -30,6 +31,7 @@ typedef struct QImage QImage; typedef struct QImageIOHandler QImageIOHandler; typedef struct QImageIOPlugin QImageIOPlugin; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QVariant QVariant; #endif @@ -53,20 +55,19 @@ int QImageIOHandler_ImageCount(const QImageIOHandler* self); int QImageIOHandler_NextImageDelay(const QImageIOHandler* self); int QImageIOHandler_CurrentImageNumber(const QImageIOHandler* self); QRect* QImageIOHandler_CurrentImageRect(const QImageIOHandler* self); -void QImageIOHandler_Delete(QImageIOHandler* self); +void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass); QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self); void* QImageIOPlugin_Metacast(QImageIOPlugin* self, const char* param1); struct miqt_string QImageIOPlugin_Tr(const char* s); struct miqt_string QImageIOPlugin_TrUtf8(const char* s); int QImageIOPlugin_Capabilities(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format); -QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device); +QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format); struct miqt_string QImageIOPlugin_Tr2(const char* s, const char* c); struct miqt_string QImageIOPlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QImageIOPlugin_TrUtf82(const char* s, const char* c); struct miqt_string QImageIOPlugin_TrUtf83(const char* s, const char* c, int n); -QImageIOHandler* QImageIOPlugin_Create2(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format); -void QImageIOPlugin_Delete(QImageIOPlugin* self); +void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qimagereader.cpp b/qt/gen_qimagereader.cpp index d406e9cd..6809e18a 100644 --- a/qt/gen_qimagereader.cpp +++ b/qt/gen_qimagereader.cpp @@ -13,28 +13,33 @@ #include "gen_qimagereader.h" #include "_cgo_export.h" -QImageReader* QImageReader_new() { - return new QImageReader(); +void QImageReader_new(QImageReader** outptr_QImageReader) { + QImageReader* ret = new QImageReader(); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new2(QIODevice* device) { - return new QImageReader(device); +void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader) { + QImageReader* ret = new QImageReader(device); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new3(struct miqt_string fileName) { +void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImageReader(fileName_QString); + QImageReader* ret = new QImageReader(fileName_QString); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format) { +void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader) { QByteArray format_QByteArray(format.data, format.len); - return new QImageReader(device, format_QByteArray); + QImageReader* ret = new QImageReader(device, format_QByteArray); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format) { +void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QImageReader(fileName_QString, format_QByteArray); + QImageReader* ret = new QImageReader(fileName_QString, format_QByteArray); + *outptr_QImageReader = ret; } struct miqt_string QImageReader_Tr(const char* sourceText) { @@ -424,7 +429,11 @@ struct miqt_string QImageReader_TrUtf83(const char* sourceText, const char* disa return _ms; } -void QImageReader_Delete(QImageReader* self) { - delete self; +void QImageReader_Delete(QImageReader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qimagereader.go b/qt/gen_qimagereader.go index b20351c0..588e4007 100644 --- a/qt/gen_qimagereader.go +++ b/qt/gen_qimagereader.go @@ -24,7 +24,8 @@ const ( ) type QImageReader struct { - h *C.QImageReader + h *C.QImageReader + isSubclass bool } func (this *QImageReader) cPointer() *C.QImageReader { @@ -41,6 +42,7 @@ func (this *QImageReader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageReader constructs the type using only CGO pointers. func newQImageReader(h *C.QImageReader) *QImageReader { if h == nil { return nil @@ -48,20 +50,33 @@ func newQImageReader(h *C.QImageReader) *QImageReader { return &QImageReader{h: h} } +// UnsafeNewQImageReader constructs the type using only unsafe pointers. func UnsafeNewQImageReader(h unsafe.Pointer) *QImageReader { - return newQImageReader((*C.QImageReader)(h)) + if h == nil { + return nil + } + + return &QImageReader{h: (*C.QImageReader)(h)} } // NewQImageReader constructs a new QImageReader object. func NewQImageReader() *QImageReader { - ret := C.QImageReader_new() - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new(&outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader2 constructs a new QImageReader object. func NewQImageReader2(device *QIODevice) *QImageReader { - ret := C.QImageReader_new2(device.cPointer()) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new2(device.cPointer(), &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader3 constructs a new QImageReader object. @@ -70,8 +85,12 @@ func NewQImageReader3(fileName string) *QImageReader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QImageReader_new3(fileName_ms) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new3(fileName_ms, &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader4 constructs a new QImageReader object. @@ -79,8 +98,12 @@ func NewQImageReader4(device *QIODevice, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageReader_new4(device.cPointer(), format_alias) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new4(device.cPointer(), format_alias, &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader5 constructs a new QImageReader object. @@ -92,8 +115,12 @@ func NewQImageReader5(fileName string, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageReader_new5(fileName_ms, format_alias) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new5(fileName_ms, format_alias, &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } func QImageReader_Tr(sourceText string) string { @@ -149,7 +176,7 @@ func (this *QImageReader) SetDevice(device *QIODevice) { } func (this *QImageReader) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QImageReader_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QImageReader_Device(this.h)), nil) } func (this *QImageReader) SetFileName(fileName string) { @@ -304,7 +331,7 @@ func (this *QImageReader) CanRead() bool { func (this *QImageReader) Read() *QImage { _ret := C.QImageReader_Read(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -465,7 +492,7 @@ func QImageReader_TrUtf83(sourceText string, disambiguation string, n int) strin // Delete this object from C++ memory. func (this *QImageReader) Delete() { - C.QImageReader_Delete(this.h) + C.QImageReader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qimagereader.h b/qt/gen_qimagereader.h index 1de5efbd..333cbfad 100644 --- a/qt/gen_qimagereader.h +++ b/qt/gen_qimagereader.h @@ -32,11 +32,11 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif -QImageReader* QImageReader_new(); -QImageReader* QImageReader_new2(QIODevice* device); -QImageReader* QImageReader_new3(struct miqt_string fileName); -QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format); -QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format); +void QImageReader_new(QImageReader** outptr_QImageReader); +void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader); +void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader); +void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader); +void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader); struct miqt_string QImageReader_Tr(const char* sourceText); struct miqt_string QImageReader_TrUtf8(const char* sourceText); void QImageReader_SetFormat(QImageReader* self, struct miqt_string format); @@ -93,7 +93,7 @@ struct miqt_string QImageReader_Tr2(const char* sourceText, const char* disambig struct miqt_string QImageReader_Tr3(const char* sourceText, const char* disambiguation, int n); struct miqt_string QImageReader_TrUtf82(const char* sourceText, const char* disambiguation); struct miqt_string QImageReader_TrUtf83(const char* sourceText, const char* disambiguation, int n); -void QImageReader_Delete(QImageReader* self); +void QImageReader_Delete(QImageReader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qimagewriter.cpp b/qt/gen_qimagewriter.cpp index 38766ced..3138d05a 100644 --- a/qt/gen_qimagewriter.cpp +++ b/qt/gen_qimagewriter.cpp @@ -10,24 +10,28 @@ #include "gen_qimagewriter.h" #include "_cgo_export.h" -QImageWriter* QImageWriter_new() { - return new QImageWriter(); +void QImageWriter_new(QImageWriter** outptr_QImageWriter) { + QImageWriter* ret = new QImageWriter(); + *outptr_QImageWriter = ret; } -QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format) { +void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter) { QByteArray format_QByteArray(format.data, format.len); - return new QImageWriter(device, format_QByteArray); + QImageWriter* ret = new QImageWriter(device, format_QByteArray); + *outptr_QImageWriter = ret; } -QImageWriter* QImageWriter_new3(struct miqt_string fileName) { +void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImageWriter(fileName_QString); + QImageWriter* ret = new QImageWriter(fileName_QString); + *outptr_QImageWriter = ret; } -QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format) { +void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QImageWriter(fileName_QString, format_QByteArray); + QImageWriter* ret = new QImageWriter(fileName_QString, format_QByteArray); + *outptr_QImageWriter = ret; } struct miqt_string QImageWriter_Tr(const char* sourceText) { @@ -320,7 +324,11 @@ struct miqt_string QImageWriter_TrUtf83(const char* sourceText, const char* disa return _ms; } -void QImageWriter_Delete(QImageWriter* self) { - delete self; +void QImageWriter_Delete(QImageWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qimagewriter.go b/qt/gen_qimagewriter.go index 57a2921b..40f2e485 100644 --- a/qt/gen_qimagewriter.go +++ b/qt/gen_qimagewriter.go @@ -23,7 +23,8 @@ const ( ) type QImageWriter struct { - h *C.QImageWriter + h *C.QImageWriter + isSubclass bool } func (this *QImageWriter) cPointer() *C.QImageWriter { @@ -40,6 +41,7 @@ func (this *QImageWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageWriter constructs the type using only CGO pointers. func newQImageWriter(h *C.QImageWriter) *QImageWriter { if h == nil { return nil @@ -47,14 +49,23 @@ func newQImageWriter(h *C.QImageWriter) *QImageWriter { return &QImageWriter{h: h} } +// UnsafeNewQImageWriter constructs the type using only unsafe pointers. func UnsafeNewQImageWriter(h unsafe.Pointer) *QImageWriter { - return newQImageWriter((*C.QImageWriter)(h)) + if h == nil { + return nil + } + + return &QImageWriter{h: (*C.QImageWriter)(h)} } // NewQImageWriter constructs a new QImageWriter object. func NewQImageWriter() *QImageWriter { - ret := C.QImageWriter_new() - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new(&outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } // NewQImageWriter2 constructs a new QImageWriter object. @@ -62,8 +73,12 @@ func NewQImageWriter2(device *QIODevice, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageWriter_new2(device.cPointer(), format_alias) - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new2(device.cPointer(), format_alias, &outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } // NewQImageWriter3 constructs a new QImageWriter object. @@ -72,8 +87,12 @@ func NewQImageWriter3(fileName string) *QImageWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QImageWriter_new3(fileName_ms) - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new3(fileName_ms, &outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } // NewQImageWriter4 constructs a new QImageWriter object. @@ -85,8 +104,12 @@ func NewQImageWriter4(fileName string, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageWriter_new4(fileName_ms, format_alias) - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new4(fileName_ms, format_alias, &outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } func QImageWriter_Tr(sourceText string) string { @@ -126,7 +149,7 @@ func (this *QImageWriter) SetDevice(device *QIODevice) { } func (this *QImageWriter) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QImageWriter_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QImageWriter_Device(this.h)), nil) } func (this *QImageWriter) SetFileName(fileName string) { @@ -357,7 +380,7 @@ func QImageWriter_TrUtf83(sourceText string, disambiguation string, n int) strin // Delete this object from C++ memory. func (this *QImageWriter) Delete() { - C.QImageWriter_Delete(this.h) + C.QImageWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qimagewriter.h b/qt/gen_qimagewriter.h index 93e74960..698ce2e6 100644 --- a/qt/gen_qimagewriter.h +++ b/qt/gen_qimagewriter.h @@ -26,10 +26,10 @@ typedef struct QImage QImage; typedef struct QImageWriter QImageWriter; #endif -QImageWriter* QImageWriter_new(); -QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format); -QImageWriter* QImageWriter_new3(struct miqt_string fileName); -QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format); +void QImageWriter_new(QImageWriter** outptr_QImageWriter); +void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter); +void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter); +void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter); struct miqt_string QImageWriter_Tr(const char* sourceText); struct miqt_string QImageWriter_TrUtf8(const char* sourceText); void QImageWriter_SetFormat(QImageWriter* self, struct miqt_string format); @@ -68,7 +68,7 @@ struct miqt_string QImageWriter_Tr2(const char* sourceText, const char* disambig struct miqt_string QImageWriter_Tr3(const char* sourceText, const char* disambiguation, int n); struct miqt_string QImageWriter_TrUtf82(const char* sourceText, const char* disambiguation); struct miqt_string QImageWriter_TrUtf83(const char* sourceText, const char* disambiguation, int n); -void QImageWriter_Delete(QImageWriter* self); +void QImageWriter_Delete(QImageWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qinputdialog.cpp b/qt/gen_qinputdialog.cpp index 18a0490e..1abed1d3 100644 --- a/qt/gen_qinputdialog.cpp +++ b/qt/gen_qinputdialog.cpp @@ -1,6 +1,15 @@ +#include +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include #include #include #include @@ -10,16 +19,369 @@ #include "gen_qinputdialog.h" #include "_cgo_export.h" -QInputDialog* QInputDialog_new(QWidget* parent) { - return new QInputDialog(parent); +class MiqtVirtualQInputDialog : public virtual QInputDialog { +public: + + MiqtVirtualQInputDialog(QWidget* parent): QInputDialog(parent) {}; + MiqtVirtualQInputDialog(): QInputDialog() {}; + MiqtVirtualQInputDialog(QWidget* parent, Qt::WindowFlags flags): QInputDialog(parent, flags) {}; + + virtual ~MiqtVirtualQInputDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QInputDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QInputDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QInputDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QInputDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QInputDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QInputDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QInputDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QInputDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QInputDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QInputDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QInputDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QInputDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QInputDialog::open(); + return; + } + + + miqt_exec_callback_QInputDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QInputDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QInputDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QInputDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QInputDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QInputDialog::accept(); + return; + } + + + miqt_exec_callback_QInputDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QInputDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QInputDialog::reject(); + return; + } + + + miqt_exec_callback_QInputDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QInputDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QInputDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QInputDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QInputDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QInputDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QInputDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QInputDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QInputDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QInputDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QInputDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QInputDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QInputDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QInputDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QInputDialog::eventFilter(param1, param2); + + } + +}; + +void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent); + *outptr_QInputDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QInputDialog* QInputDialog_new2() { - return new QInputDialog(); +void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(); + *outptr_QInputDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QInputDialog* QInputDialog_new3(QWidget* parent, int flags) { - return new QInputDialog(parent, static_cast(flags)); +void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent, static_cast(flags)); + *outptr_QInputDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QInputDialog_MetaObject(const QInputDialog* self) { @@ -352,7 +714,7 @@ void QInputDialog_TextValueChanged(QInputDialog* self, struct miqt_string text) } void QInputDialog_connect_TextValueChanged(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::textValueChanged), self, [=](const QString& text) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::textValueChanged), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -371,7 +733,7 @@ void QInputDialog_TextValueSelected(QInputDialog* self, struct miqt_string text) } void QInputDialog_connect_TextValueSelected(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::textValueSelected), self, [=](const QString& text) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::textValueSelected), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -389,7 +751,7 @@ void QInputDialog_IntValueChanged(QInputDialog* self, int value) { } void QInputDialog_connect_IntValueChanged(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::intValueChanged), self, [=](int value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::intValueChanged), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QInputDialog_IntValueChanged(slot, sigval1); }); @@ -400,7 +762,7 @@ void QInputDialog_IntValueSelected(QInputDialog* self, int value) { } void QInputDialog_connect_IntValueSelected(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::intValueSelected), self, [=](int value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::intValueSelected), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QInputDialog_IntValueSelected(slot, sigval1); }); @@ -411,7 +773,7 @@ void QInputDialog_DoubleValueChanged(QInputDialog* self, double value) { } void QInputDialog_connect_DoubleValueChanged(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::doubleValueChanged), self, [=](double value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::doubleValueChanged), self, [=](double value) { double sigval1 = value; miqt_exec_callback_QInputDialog_DoubleValueChanged(slot, sigval1); }); @@ -422,7 +784,7 @@ void QInputDialog_DoubleValueSelected(QInputDialog* self, double value) { } void QInputDialog_connect_DoubleValueSelected(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::doubleValueSelected), self, [=](double value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::doubleValueSelected), self, [=](double value) { double sigval1 = value; miqt_exec_callback_QInputDialog_DoubleValueSelected(slot, sigval1); }); @@ -777,7 +1139,123 @@ double QInputDialog_GetDouble9(QWidget* parent, struct miqt_string title, struct return QInputDialog::getDouble(parent, title_QString, label_QString, static_cast(value), static_cast(minValue), static_cast(maxValue), static_cast(decimals), ok, static_cast(flags)); } -void QInputDialog_Delete(QInputDialog* self) { - delete self; +void QInputDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QInputDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQInputDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QInputDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QInputDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQInputDialog*)(self) )->virtualbase_SizeHint(); +} + +void QInputDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__SetVisible = slot; +} + +void QInputDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QInputDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Done = slot; +} + +void QInputDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Done(result); +} + +void QInputDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Open = slot; +} + +void QInputDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Open(); +} + +void QInputDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Exec = slot; +} + +int QInputDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Exec(); +} + +void QInputDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Accept = slot; +} + +void QInputDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Accept(); +} + +void QInputDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Reject = slot; +} + +void QInputDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Reject(); +} + +void QInputDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QInputDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QInputDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__CloseEvent = slot; +} + +void QInputDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QInputDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__ShowEvent = slot; +} + +void QInputDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QInputDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QInputDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QInputDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QInputDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QInputDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__EventFilter = slot; +} + +bool QInputDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QInputDialog_Delete(QInputDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qinputdialog.go b/qt/gen_qinputdialog.go index 5f349f95..25e92dee 100644 --- a/qt/gen_qinputdialog.go +++ b/qt/gen_qinputdialog.go @@ -31,7 +31,8 @@ const ( ) type QInputDialog struct { - h *C.QInputDialog + h *C.QInputDialog + isSubclass bool *QDialog } @@ -49,33 +50,65 @@ func (this *QInputDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputDialog(h *C.QInputDialog) *QInputDialog { +// newQInputDialog constructs the type using only CGO pointers. +func newQInputDialog(h *C.QInputDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QInputDialog { if h == nil { return nil } - return &QInputDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QInputDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQInputDialog(h unsafe.Pointer) *QInputDialog { - return newQInputDialog((*C.QInputDialog)(h)) +// UnsafeNewQInputDialog constructs the type using only unsafe pointers. +func UnsafeNewQInputDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QInputDialog { + if h == nil { + return nil + } + + return &QInputDialog{h: (*C.QInputDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQInputDialog constructs a new QInputDialog object. func NewQInputDialog(parent *QWidget) *QInputDialog { - ret := C.QInputDialog_new(parent.cPointer()) - return newQInputDialog(ret) + var outptr_QInputDialog *C.QInputDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QInputDialog_new(parent.cPointer(), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQInputDialog2 constructs a new QInputDialog object. func NewQInputDialog2() *QInputDialog { - ret := C.QInputDialog_new2() - return newQInputDialog(ret) + var outptr_QInputDialog *C.QInputDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QInputDialog_new2(&outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQInputDialog3 constructs a new QInputDialog object. func NewQInputDialog3(parent *QWidget, flags WindowType) *QInputDialog { - ret := C.QInputDialog_new3(parent.cPointer(), (C.int)(flags)) - return newQInputDialog(ret) + var outptr_QInputDialog *C.QInputDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QInputDialog_new3(parent.cPointer(), (C.int)(flags), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QInputDialog) MetaObject() *QMetaObject { @@ -1044,9 +1077,328 @@ func QInputDialog_GetDouble9(parent *QWidget, title string, label string, value return (float64)(C.QInputDialog_GetDouble9(parent.cPointer(), title_ms, label_ms, (C.double)(value), (C.double)(minValue), (C.double)(maxValue), (C.int)(decimals), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags))) } +func (this *QInputDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QInputDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QInputDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QInputDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_MinimumSizeHint +func miqt_exec_callback_QInputDialog_MinimumSizeHint(self *C.QInputDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QInputDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QInputDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QInputDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QInputDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_SizeHint +func miqt_exec_callback_QInputDialog_SizeHint(self *C.QInputDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QInputDialog) callVirtualBase_SetVisible(visible bool) { + + C.QInputDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QInputDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QInputDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_SetVisible +func miqt_exec_callback_QInputDialog_SetVisible(self *C.QInputDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QInputDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_Done(result int) { + + C.QInputDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QInputDialog) OnDone(slot func(super func(result int), result int)) { + C.QInputDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Done +func miqt_exec_callback_QInputDialog_Done(self *C.QInputDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QInputDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_Open() { + + C.QInputDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QInputDialog) OnOpen(slot func(super func())) { + C.QInputDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Open +func miqt_exec_callback_QInputDialog_Open(self *C.QInputDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QInputDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QInputDialog) callVirtualBase_Exec() int { + + return (int)(C.QInputDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QInputDialog) OnExec(slot func(super func() int) int) { + C.QInputDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Exec +func miqt_exec_callback_QInputDialog_Exec(self *C.QInputDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QInputDialog) callVirtualBase_Accept() { + + C.QInputDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QInputDialog) OnAccept(slot func(super func())) { + C.QInputDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Accept +func miqt_exec_callback_QInputDialog_Accept(self *C.QInputDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QInputDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QInputDialog) callVirtualBase_Reject() { + + C.QInputDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QInputDialog) OnReject(slot func(super func())) { + C.QInputDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Reject +func miqt_exec_callback_QInputDialog_Reject(self *C.QInputDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QInputDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QInputDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QInputDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QInputDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_KeyPressEvent +func miqt_exec_callback_QInputDialog_KeyPressEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QInputDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QInputDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_CloseEvent +func miqt_exec_callback_QInputDialog_CloseEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QInputDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QInputDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_ShowEvent +func miqt_exec_callback_QInputDialog_ShowEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QInputDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QInputDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_ResizeEvent +func miqt_exec_callback_QInputDialog_ResizeEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QInputDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QInputDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_ContextMenuEvent +func miqt_exec_callback_QInputDialog_ContextMenuEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QInputDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QInputDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QInputDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_EventFilter +func miqt_exec_callback_QInputDialog_EventFilter(self *C.QInputDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QInputDialog) Delete() { - C.QInputDialog_Delete(this.h) + C.QInputDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qinputdialog.h b/qt/gen_qinputdialog.h index bf192456..11fada9b 100644 --- a/qt/gen_qinputdialog.h +++ b/qt/gen_qinputdialog.h @@ -15,20 +15,38 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; class QInputDialog; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; typedef struct QInputDialog QInputDialog; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QInputDialog* QInputDialog_new(QWidget* parent); -QInputDialog* QInputDialog_new2(); -QInputDialog* QInputDialog_new3(QWidget* parent, int flags); +void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QInputDialog_MetaObject(const QInputDialog* self); void* QInputDialog_Metacast(QInputDialog* self, const char* param1); struct miqt_string QInputDialog_Tr(const char* s); @@ -126,7 +144,35 @@ double QInputDialog_GetDouble6(QWidget* parent, struct miqt_string title, struct double QInputDialog_GetDouble7(QWidget* parent, struct miqt_string title, struct miqt_string label, double value, double minValue, double maxValue, int decimals); double QInputDialog_GetDouble8(QWidget* parent, struct miqt_string title, struct miqt_string label, double value, double minValue, double maxValue, int decimals, bool* ok); double QInputDialog_GetDouble9(QWidget* parent, struct miqt_string title, struct miqt_string label, double value, double minValue, double maxValue, int decimals, bool* ok, int flags); -void QInputDialog_Delete(QInputDialog* self); +void QInputDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QInputDialog_virtualbase_MinimumSizeHint(const void* self); +void QInputDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QInputDialog_virtualbase_SizeHint(const void* self); +void QInputDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QInputDialog_virtualbase_SetVisible(void* self, bool visible); +void QInputDialog_override_virtual_Done(void* self, intptr_t slot); +void QInputDialog_virtualbase_Done(void* self, int result); +void QInputDialog_override_virtual_Open(void* self, intptr_t slot); +void QInputDialog_virtualbase_Open(void* self); +void QInputDialog_override_virtual_Exec(void* self, intptr_t slot); +int QInputDialog_virtualbase_Exec(void* self); +void QInputDialog_override_virtual_Accept(void* self, intptr_t slot); +void QInputDialog_virtualbase_Accept(void* self); +void QInputDialog_override_virtual_Reject(void* self, intptr_t slot); +void QInputDialog_virtualbase_Reject(void* self); +void QInputDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QInputDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QInputDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QInputDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QInputDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QInputDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QInputDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QInputDialog_Delete(QInputDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qinputmethod.cpp b/qt/gen_qinputmethod.cpp index 3ca33edf..cc47ad58 100644 --- a/qt/gen_qinputmethod.cpp +++ b/qt/gen_qinputmethod.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qinputmethod.go b/qt/gen_qinputmethod.go index 2a7c4d51..3b1ef301 100644 --- a/qt/gen_qinputmethod.go +++ b/qt/gen_qinputmethod.go @@ -21,7 +21,8 @@ const ( ) type QInputMethod struct { - h *C.QInputMethod + h *C.QInputMethod + isSubclass bool *QObject } @@ -39,15 +40,23 @@ func (this *QInputMethod) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputMethod(h *C.QInputMethod) *QInputMethod { +// newQInputMethod constructs the type using only CGO pointers. +func newQInputMethod(h *C.QInputMethod, h_QObject *C.QObject) *QInputMethod { if h == nil { return nil } - return &QInputMethod{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QInputMethod{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQInputMethod(h unsafe.Pointer) *QInputMethod { - return newQInputMethod((*C.QInputMethod)(h)) +// UnsafeNewQInputMethod constructs the type using only unsafe pointers. +func UnsafeNewQInputMethod(h unsafe.Pointer, h_QObject unsafe.Pointer) *QInputMethod { + if h == nil { + return nil + } + + return &QInputMethod{h: (*C.QInputMethod)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QInputMethod) MetaObject() *QMetaObject { diff --git a/qt/gen_qinputmethod.h b/qt/gen_qinputmethod.h index 32002f30..61832d17 100644 --- a/qt/gen_qinputmethod.h +++ b/qt/gen_qinputmethod.h @@ -18,6 +18,7 @@ extern "C" { class QInputMethod; class QLocale; class QMetaObject; +class QObject; class QRectF; class QTransform; class QVariant; @@ -25,6 +26,7 @@ class QVariant; typedef struct QInputMethod QInputMethod; typedef struct QLocale QLocale; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRectF QRectF; typedef struct QTransform QTransform; typedef struct QVariant QVariant; diff --git a/qt/gen_qiodevice.cpp b/qt/gen_qiodevice.cpp index 2c84c62c..61f27cef 100644 --- a/qt/gen_qiodevice.cpp +++ b/qt/gen_qiodevice.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -373,7 +374,11 @@ struct miqt_string QIODevice_ReadLine1(QIODevice* self, long long maxlen) { return _ms; } -void QIODevice_Delete(QIODevice* self) { - delete self; +void QIODevice_Delete(QIODevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qiodevice.go b/qt/gen_qiodevice.go index 4909bc82..4be393a3 100644 --- a/qt/gen_qiodevice.go +++ b/qt/gen_qiodevice.go @@ -30,7 +30,8 @@ const ( ) type QIODevice struct { - h *C.QIODevice + h *C.QIODevice + isSubclass bool *QObject } @@ -48,15 +49,23 @@ func (this *QIODevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIODevice(h *C.QIODevice) *QIODevice { +// newQIODevice constructs the type using only CGO pointers. +func newQIODevice(h *C.QIODevice, h_QObject *C.QObject) *QIODevice { if h == nil { return nil } - return &QIODevice{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QIODevice{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQIODevice(h unsafe.Pointer) *QIODevice { - return newQIODevice((*C.QIODevice)(h)) +// UnsafeNewQIODevice constructs the type using only unsafe pointers. +func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIODevice { + if h == nil { + return nil + } + + return &QIODevice{h: (*C.QIODevice)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QIODevice) MetaObject() *QMetaObject { @@ -459,7 +468,7 @@ func (this *QIODevice) ReadLine1(maxlen int64) []byte { // Delete this object from C++ memory. func (this *QIODevice) Delete() { - C.QIODevice_Delete(this.h) + C.QIODevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qiodevice.h b/qt/gen_qiodevice.h index a38d45d0..be93a623 100644 --- a/qt/gen_qiodevice.h +++ b/qt/gen_qiodevice.h @@ -18,10 +18,12 @@ extern "C" { class QByteArray; class QIODevice; class QMetaObject; +class QObject; #else typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QIODevice_MetaObject(const QIODevice* self); @@ -84,12 +86,15 @@ void QIODevice_AboutToClose(QIODevice* self); void QIODevice_connect_AboutToClose(QIODevice* self, intptr_t slot); void QIODevice_ReadChannelFinished(QIODevice* self); void QIODevice_connect_ReadChannelFinished(QIODevice* self, intptr_t slot); +long long QIODevice_ReadData(QIODevice* self, char* data, long long maxlen); +long long QIODevice_ReadLineData(QIODevice* self, char* data, long long maxlen); +long long QIODevice_WriteData(QIODevice* self, const char* data, long long lenVal); struct miqt_string QIODevice_Tr2(const char* s, const char* c); struct miqt_string QIODevice_Tr3(const char* s, const char* c, int n); struct miqt_string QIODevice_TrUtf82(const char* s, const char* c); struct miqt_string QIODevice_TrUtf83(const char* s, const char* c, int n); struct miqt_string QIODevice_ReadLine1(QIODevice* self, long long maxlen); -void QIODevice_Delete(QIODevice* self); +void QIODevice_Delete(QIODevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qitemdelegate.cpp b/qt/gen_qitemdelegate.cpp index 6e6ac35b..9db4471f 100644 --- a/qt/gen_qitemdelegate.cpp +++ b/qt/gen_qitemdelegate.cpp @@ -1,10 +1,17 @@ +#include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -15,12 +22,482 @@ #include "gen_qitemdelegate.h" #include "_cgo_export.h" -QItemDelegate* QItemDelegate_new() { - return new QItemDelegate(); +class MiqtVirtualQItemDelegate : public virtual QItemDelegate { +public: + + MiqtVirtualQItemDelegate(): QItemDelegate() {}; + MiqtVirtualQItemDelegate(QObject* parent): QItemDelegate(parent) {}; + + virtual ~MiqtVirtualQItemDelegate() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__Paint == 0) { + QItemDelegate::paint(painter, option, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_Paint(const_cast(this), handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) const { + + QItemDelegate::paint(painter, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__SizeHint == 0) { + return QItemDelegate::sizeHint(option, index); + } + + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval1 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QItemDelegate_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint(QStyleOptionViewItem* option, QModelIndex* index) const { + + return new QSize(QItemDelegate::sizeHint(*option, *index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateEditor = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__CreateEditor == 0) { + return QItemDelegate::createEditor(parent, option, index); + } + + QWidget* sigval1 = parent; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + QWidget* callback_return_value = miqt_exec_callback_QItemDelegate_CreateEditor(const_cast(this), handle__CreateEditor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateEditor(QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) const { + + return QItemDelegate::createEditor(parent, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override { + if (handle__SetEditorData == 0) { + QItemDelegate::setEditorData(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_SetEditorData(const_cast(this), handle__SetEditorData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditorData(QWidget* editor, QModelIndex* index) const { + + QItemDelegate::setEditorData(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModelData = 0; + + // Subclass to allow providing a Go implementation + virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override { + if (handle__SetModelData == 0) { + QItemDelegate::setModelData(editor, model, index); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemModel* sigval2 = model; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_SetModelData(const_cast(this), handle__SetModelData, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModelData(QWidget* editor, QAbstractItemModel* model, QModelIndex* index) const { + + QItemDelegate::setModelData(editor, model, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__UpdateEditorGeometry == 0) { + QItemDelegate::updateEditorGeometry(editor, option, index); + return; + } + + QWidget* sigval1 = editor; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_UpdateEditorGeometry(const_cast(this), handle__UpdateEditorGeometry, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometry(QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) const { + + QItemDelegate::updateEditorGeometry(editor, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawDisplay = 0; + + // Subclass to allow providing a Go implementation + virtual void drawDisplay(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const override { + if (handle__DrawDisplay == 0) { + QItemDelegate::drawDisplay(painter, option, rect, text); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval4 = text_ms; + + miqt_exec_callback_QItemDelegate_DrawDisplay(const_cast(this), handle__DrawDisplay, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawDisplay(QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QItemDelegate::drawDisplay(painter, *option, *rect, text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawDecoration = 0; + + // Subclass to allow providing a Go implementation + virtual void drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const override { + if (handle__DrawDecoration == 0) { + QItemDelegate::drawDecoration(painter, option, rect, pixmap); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval4 = const_cast(&pixmap_ret); + + miqt_exec_callback_QItemDelegate_DrawDecoration(const_cast(this), handle__DrawDecoration, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawDecoration(QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap) const { + + QItemDelegate::drawDecoration(painter, *option, *rect, *pixmap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawFocus = 0; + + // Subclass to allow providing a Go implementation + virtual void drawFocus(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const override { + if (handle__DrawFocus == 0) { + QItemDelegate::drawFocus(painter, option, rect); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + + miqt_exec_callback_QItemDelegate_DrawFocus(const_cast(this), handle__DrawFocus, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawFocus(QPainter* painter, QStyleOptionViewItem* option, QRect* rect) const { + + QItemDelegate::drawFocus(painter, *option, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawCheck = 0; + + // Subclass to allow providing a Go implementation + virtual void drawCheck(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const override { + if (handle__DrawCheck == 0) { + QItemDelegate::drawCheck(painter, option, rect, state); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + Qt::CheckState state_ret = state; + int sigval4 = static_cast(state_ret); + + miqt_exec_callback_QItemDelegate_DrawCheck(const_cast(this), handle__DrawCheck, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawCheck(QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state) const { + + QItemDelegate::drawCheck(painter, *option, *rect, static_cast(state)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QItemDelegate::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QItemDelegate_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QItemDelegate::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__EditorEvent == 0) { + return QItemDelegate::editorEvent(event, model, option, index); + } + + QEvent* sigval1 = event; + QAbstractItemModel* sigval2 = model; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QItemDelegate_EditorEvent(this, handle__EditorEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EditorEvent(QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + + return QItemDelegate::editorEvent(event, model, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DestroyEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void destroyEditor(QWidget* editor, const QModelIndex& index) const override { + if (handle__DestroyEditor == 0) { + QItemDelegate::destroyEditor(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_DestroyEditor(const_cast(this), handle__DestroyEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DestroyEditor(QWidget* editor, QModelIndex* index) const { + + QItemDelegate::destroyEditor(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HelpEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__HelpEvent == 0) { + return QItemDelegate::helpEvent(event, view, option, index); + } + + QHelpEvent* sigval1 = event; + QAbstractItemView* sigval2 = view; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QItemDelegate_HelpEvent(this, handle__HelpEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HelpEvent(QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + + return QItemDelegate::helpEvent(event, view, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintingRoles = 0; + + // Subclass to allow providing a Go implementation + virtual QVector paintingRoles() const override { + if (handle__PaintingRoles == 0) { + return QItemDelegate::paintingRoles(); + } + + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QItemDelegate_PaintingRoles(const_cast(this), handle__PaintingRoles); + QVector callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + int* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(static_cast(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of int */ virtualbase_PaintingRoles() const { + + QVector _ret = QItemDelegate::paintingRoles(); + // Convert QList<> from C++ memory to manually-managed C memory + int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + +}; + +void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(); + *outptr_QItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QItemDelegate* QItemDelegate_new2(QObject* parent) { - return new QItemDelegate(parent); +void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(parent); + *outptr_QItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self) { @@ -137,7 +614,131 @@ struct miqt_string QItemDelegate_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QItemDelegate_Delete(QItemDelegate* self) { - delete self; +void QItemDelegate_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__Paint = slot; +} + +void QItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_Paint(painter, option, index); +} + +void QItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__SizeHint = slot; +} + +QSize* QItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_SizeHint(option, index); +} + +void QItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_CreateEditor(parent, option, index); +} + +void QItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__SetEditorData = slot; +} + +void QItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_SetEditorData(editor, index); +} + +void QItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__SetModelData = slot; +} + +void QItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_SetModelData(editor, model, index); +} + +void QItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__UpdateEditorGeometry = slot; +} + +void QItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_UpdateEditorGeometry(editor, option, index); +} + +void QItemDelegate_override_virtual_DrawDisplay(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawDisplay = slot; +} + +void QItemDelegate_virtualbase_DrawDisplay(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawDisplay(painter, option, rect, text); +} + +void QItemDelegate_override_virtual_DrawDecoration(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawDecoration = slot; +} + +void QItemDelegate_virtualbase_DrawDecoration(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawDecoration(painter, option, rect, pixmap); +} + +void QItemDelegate_override_virtual_DrawFocus(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawFocus = slot; +} + +void QItemDelegate_virtualbase_DrawFocus(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawFocus(painter, option, rect); +} + +void QItemDelegate_override_virtual_DrawCheck(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawCheck = slot; +} + +void QItemDelegate_virtualbase_DrawCheck(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawCheck(painter, option, rect, state); +} + +void QItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__EventFilter = slot; +} + +bool QItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQItemDelegate*)(self) )->virtualbase_EventFilter(object, event); +} + +void QItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__EditorEvent = slot; +} + +bool QItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQItemDelegate*)(self) )->virtualbase_EditorEvent(event, model, option, index); +} + +void QItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DestroyEditor = slot; +} + +void QItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DestroyEditor(editor, index); +} + +void QItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__HelpEvent = slot; +} + +bool QItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQItemDelegate*)(self) )->virtualbase_HelpEvent(event, view, option, index); +} + +void QItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__PaintingRoles = slot; +} + +struct miqt_array /* of int */ QItemDelegate_virtualbase_PaintingRoles(const void* self) { + return ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_PaintingRoles(); +} + +void QItemDelegate_Delete(QItemDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qitemdelegate.go b/qt/gen_qitemdelegate.go index 05344b4a..fa35b976 100644 --- a/qt/gen_qitemdelegate.go +++ b/qt/gen_qitemdelegate.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QItemDelegate struct { - h *C.QItemDelegate + h *C.QItemDelegate + isSubclass bool *QAbstractItemDelegate } @@ -32,27 +34,47 @@ func (this *QItemDelegate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQItemDelegate(h *C.QItemDelegate) *QItemDelegate { +// newQItemDelegate constructs the type using only CGO pointers. +func newQItemDelegate(h *C.QItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QItemDelegate { if h == nil { return nil } - return &QItemDelegate{h: h, QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(unsafe.Pointer(h))} + return &QItemDelegate{h: h, + QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } -func UnsafeNewQItemDelegate(h unsafe.Pointer) *QItemDelegate { - return newQItemDelegate((*C.QItemDelegate)(h)) +// UnsafeNewQItemDelegate constructs the type using only unsafe pointers. +func UnsafeNewQItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QItemDelegate { + if h == nil { + return nil + } + + return &QItemDelegate{h: (*C.QItemDelegate)(h), + QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } // NewQItemDelegate constructs a new QItemDelegate object. func NewQItemDelegate() *QItemDelegate { - ret := C.QItemDelegate_new() - return newQItemDelegate(ret) + var outptr_QItemDelegate *C.QItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QItemDelegate_new(&outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } // NewQItemDelegate2 constructs a new QItemDelegate object. func NewQItemDelegate2(parent *QObject) *QItemDelegate { - ret := C.QItemDelegate_new2(parent.cPointer()) - return newQItemDelegate(ret) + var outptr_QItemDelegate *C.QItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QItemDelegate_new2(parent.cPointer(), &outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QItemDelegate) MetaObject() *QMetaObject { @@ -103,7 +125,7 @@ func (this *QItemDelegate) SizeHint(option *QStyleOptionViewItem, index *QModelI } func (this *QItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) } func (this *QItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -170,9 +192,413 @@ func QItemDelegate_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QItemDelegate) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QItemDelegate_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QItemDelegate_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_Paint +func miqt_exec_callback_QItemDelegate_Paint(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_SizeHint(option *QStyleOptionViewItem, index *QModelIndex) *QSize { + + _ret := C.QItemDelegate_virtualbase_SizeHint(unsafe.Pointer(this.h), option.cPointer(), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QItemDelegate) OnSizeHint(slot func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) { + C.QItemDelegate_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_SizeHint +func miqt_exec_callback_QItemDelegate_SizeHint(self *C.QItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) +} +func (this *QItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { + C.QItemDelegate_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_CreateEditor +func miqt_exec_callback_QItemDelegate_CreateEditor(self *C.QItemDelegate, cb C.intptr_t, parent *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QItemDelegate) callVirtualBase_SetEditorData(editor *QWidget, index *QModelIndex) { + + C.QItemDelegate_virtualbase_SetEditorData(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnSetEditorData(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QItemDelegate_override_virtual_SetEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_SetEditorData +func miqt_exec_callback_QItemDelegate_SetEditorData(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_SetEditorData, slotval1, slotval2) + +} + +func (this *QItemDelegate) callVirtualBase_SetModelData(editor *QWidget, model *QAbstractItemModel, index *QModelIndex) { + + C.QItemDelegate_virtualbase_SetModelData(unsafe.Pointer(this.h), editor.cPointer(), model.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnSetModelData(slot func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) { + C.QItemDelegate_override_virtual_SetModelData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_SetModelData +func miqt_exec_callback_QItemDelegate_SetModelData(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, model *C.QAbstractItemModel, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_SetModelData, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_UpdateEditorGeometry(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QItemDelegate_virtualbase_UpdateEditorGeometry(unsafe.Pointer(this.h), editor.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnUpdateEditorGeometry(slot func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QItemDelegate_override_virtual_UpdateEditorGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_UpdateEditorGeometry +func miqt_exec_callback_QItemDelegate_UpdateEditorGeometry(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_UpdateEditorGeometry, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_DrawDisplay(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QItemDelegate_virtualbase_DrawDisplay(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer(), text_ms) + +} +func (this *QItemDelegate) OnDrawDisplay(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string)) { + C.QItemDelegate_override_virtual_DrawDisplay(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawDisplay +func miqt_exec_callback_QItemDelegate_DrawDisplay(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval4 := text_ret + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawDisplay, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QItemDelegate) callVirtualBase_DrawDecoration(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap) { + + C.QItemDelegate_virtualbase_DrawDecoration(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer(), pixmap.cPointer()) + +} +func (this *QItemDelegate) OnDrawDecoration(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap)) { + C.QItemDelegate_override_virtual_DrawDecoration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawDecoration +func miqt_exec_callback_QItemDelegate_DrawDecoration(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect, pixmap *C.QPixmap) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval4 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawDecoration, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QItemDelegate) callVirtualBase_DrawFocus(painter *QPainter, option *QStyleOptionViewItem, rect *QRect) { + + C.QItemDelegate_virtualbase_DrawFocus(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer()) + +} +func (this *QItemDelegate) OnDrawFocus(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect), painter *QPainter, option *QStyleOptionViewItem, rect *QRect)) { + C.QItemDelegate_override_virtual_DrawFocus(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawFocus +func miqt_exec_callback_QItemDelegate_DrawFocus(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect), painter *QPainter, option *QStyleOptionViewItem, rect *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawFocus, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_DrawCheck(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState) { + + C.QItemDelegate_virtualbase_DrawCheck(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer(), (C.int)(state)) + +} +func (this *QItemDelegate) OnDrawCheck(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState)) { + C.QItemDelegate_override_virtual_DrawCheck(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawCheck +func miqt_exec_callback_QItemDelegate_DrawCheck(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval4 := (CheckState)(state) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawCheck, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QItemDelegate) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QItemDelegate_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QItemDelegate) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QItemDelegate_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_EventFilter +func miqt_exec_callback_QItemDelegate_EventFilter(self *C.QItemDelegate, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemDelegate) callVirtualBase_EditorEvent(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QItemDelegate_virtualbase_EditorEvent(unsafe.Pointer(this.h), event.cPointer(), model.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QItemDelegate) OnEditorEvent(slot func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QItemDelegate_override_virtual_EditorEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_EditorEvent +func miqt_exec_callback_QItemDelegate_EditorEvent(self *C.QItemDelegate, cb C.intptr_t, event *C.QEvent, model *C.QAbstractItemModel, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_EditorEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemDelegate) callVirtualBase_DestroyEditor(editor *QWidget, index *QModelIndex) { + + C.QItemDelegate_virtualbase_DestroyEditor(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnDestroyEditor(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QItemDelegate_override_virtual_DestroyEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DestroyEditor +func miqt_exec_callback_QItemDelegate_DestroyEditor(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DestroyEditor, slotval1, slotval2) + +} + +func (this *QItemDelegate) callVirtualBase_HelpEvent(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QItemDelegate_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer(), view.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QItemDelegate) OnHelpEvent(slot func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QItemDelegate_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_HelpEvent +func miqt_exec_callback_QItemDelegate_HelpEvent(self *C.QItemDelegate, cb C.intptr_t, event *C.QHelpEvent, view *C.QAbstractItemView, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHelpEvent(unsafe.Pointer(event), nil) + slotval2 := UnsafeNewQAbstractItemView(unsafe.Pointer(view), nil, nil, nil, nil, nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_HelpEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemDelegate) callVirtualBase_PaintingRoles() []int { + + var _ma C.struct_miqt_array = C.QItemDelegate_virtualbase_PaintingRoles(unsafe.Pointer(this.h)) + _ret := make([]int, int(_ma.len)) + _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _ret[i] = (int)(_outCast[i]) + } + return _ret + +} +func (this *QItemDelegate) OnPaintingRoles(slot func(super func() []int) []int) { + C.QItemDelegate_override_virtual_PaintingRoles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_PaintingRoles +func miqt_exec_callback_QItemDelegate_PaintingRoles(self *C.QItemDelegate, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []int) []int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_PaintingRoles) + virtualReturn_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (C.int)(virtualReturn[i]) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + // Delete this object from C++ memory. func (this *QItemDelegate) Delete() { - C.QItemDelegate_Delete(this.h) + C.QItemDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qitemdelegate.h b/qt/gen_qitemdelegate.h index e0f3061e..8d3268ce 100644 --- a/qt/gen_qitemdelegate.h +++ b/qt/gen_qitemdelegate.h @@ -15,31 +15,43 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QEvent; +class QHelpEvent; class QItemDelegate; class QItemEditorFactory; class QMetaObject; class QModelIndex; class QObject; class QPainter; +class QPixmap; +class QRect; class QSize; class QStyleOptionViewItem; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QEvent QEvent; +typedef struct QHelpEvent QHelpEvent; typedef struct QItemDelegate QItemDelegate; typedef struct QItemEditorFactory QItemEditorFactory; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPainter QPainter; +typedef struct QPixmap QPixmap; +typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QWidget QWidget; #endif -QItemDelegate* QItemDelegate_new(); -QItemDelegate* QItemDelegate_new2(QObject* parent); +void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self); void* QItemDelegate_Metacast(QItemDelegate* self, const char* param1); struct miqt_string QItemDelegate_Tr(const char* s); @@ -54,11 +66,47 @@ void QItemDelegate_SetModelData(const QItemDelegate* self, QWidget* editor, QAbs void QItemDelegate_UpdateEditorGeometry(const QItemDelegate* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); QItemEditorFactory* QItemDelegate_ItemEditorFactory(const QItemDelegate* self); void QItemDelegate_SetItemEditorFactory(QItemDelegate* self, QItemEditorFactory* factory); +void QItemDelegate_DrawDisplay(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text); +void QItemDelegate_DrawDecoration(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap); +void QItemDelegate_DrawFocus(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect); +void QItemDelegate_DrawCheck(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state); +bool QItemDelegate_EventFilter(QItemDelegate* self, QObject* object, QEvent* event); +bool QItemDelegate_EditorEvent(QItemDelegate* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); struct miqt_string QItemDelegate_Tr2(const char* s, const char* c); struct miqt_string QItemDelegate_Tr3(const char* s, const char* c, int n); struct miqt_string QItemDelegate_TrUtf82(const char* s, const char* c); struct miqt_string QItemDelegate_TrUtf83(const char* s, const char* c, int n); -void QItemDelegate_Delete(QItemDelegate* self); +void QItemDelegate_override_virtual_Paint(void* self, intptr_t slot); +void QItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot); +void QItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index); +void QItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot); +void QItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index); +void QItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot); +void QItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_DrawDisplay(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawDisplay(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text); +void QItemDelegate_override_virtual_DrawDecoration(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawDecoration(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap); +void QItemDelegate_override_virtual_DrawFocus(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawFocus(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect); +void QItemDelegate_override_virtual_DrawCheck(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawCheck(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state); +void QItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot); +bool QItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot); +bool QItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index); +void QItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot); +bool QItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot); +struct miqt_array /* of int */ QItemDelegate_virtualbase_PaintingRoles(const void* self); +void QItemDelegate_Delete(QItemDelegate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qitemeditorfactory.cpp b/qt/gen_qitemeditorfactory.cpp index ece20aa6..08641f11 100644 --- a/qt/gen_qitemeditorfactory.cpp +++ b/qt/gen_qitemeditorfactory.cpp @@ -23,16 +23,85 @@ void QItemEditorCreatorBase_OperatorAssign(QItemEditorCreatorBase* self, QItemEd self->operator=(*param1); } -void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self) { - delete self; +void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QItemEditorFactory* QItemEditorFactory_new() { - return new QItemEditorFactory(); +class MiqtVirtualQItemEditorFactory : public virtual QItemEditorFactory { +public: + + MiqtVirtualQItemEditorFactory(): QItemEditorFactory() {}; + MiqtVirtualQItemEditorFactory(const QItemEditorFactory& param1): QItemEditorFactory(param1) {}; + + virtual ~MiqtVirtualQItemEditorFactory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateEditor = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createEditor(int userType, QWidget* parent) const override { + if (handle__CreateEditor == 0) { + return QItemEditorFactory::createEditor(userType, parent); + } + + int sigval1 = userType; + QWidget* sigval2 = parent; + + QWidget* callback_return_value = miqt_exec_callback_QItemEditorFactory_CreateEditor(const_cast(this), handle__CreateEditor, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateEditor(int userType, QWidget* parent) const { + + return QItemEditorFactory::createEditor(static_cast(userType), parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValuePropertyName = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray valuePropertyName(int userType) const override { + if (handle__ValuePropertyName == 0) { + return QItemEditorFactory::valuePropertyName(userType); + } + + int sigval1 = userType; + + struct miqt_string callback_return_value = miqt_exec_callback_QItemEditorFactory_ValuePropertyName(const_cast(this), handle__ValuePropertyName, sigval1); + QByteArray callback_return_value_QByteArray(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QByteArray; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_ValuePropertyName(int userType) const { + + QByteArray _qb = QItemEditorFactory::valuePropertyName(static_cast(userType)); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; + + } + +}; + +void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory) { + MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(); + *outptr_QItemEditorFactory = ret; } -QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1) { - return new QItemEditorFactory(*param1); +void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory) { + MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(*param1); + *outptr_QItemEditorFactory = ret; } QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent) { @@ -60,7 +129,27 @@ void QItemEditorFactory_SetDefaultFactory(QItemEditorFactory* factory) { QItemEditorFactory::setDefaultFactory(factory); } -void QItemEditorFactory_Delete(QItemEditorFactory* self) { - delete self; +void QItemEditorFactory_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QItemEditorFactory*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QItemEditorFactory_virtualbase_CreateEditor(const void* self, int userType, QWidget* parent) { + return ( (const MiqtVirtualQItemEditorFactory*)(self) )->virtualbase_CreateEditor(userType, parent); +} + +void QItemEditorFactory_override_virtual_ValuePropertyName(void* self, intptr_t slot) { + dynamic_cast( (QItemEditorFactory*)(self) )->handle__ValuePropertyName = slot; +} + +struct miqt_string QItemEditorFactory_virtualbase_ValuePropertyName(const void* self, int userType) { + return ( (const MiqtVirtualQItemEditorFactory*)(self) )->virtualbase_ValuePropertyName(userType); +} + +void QItemEditorFactory_Delete(QItemEditorFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qitemeditorfactory.go b/qt/gen_qitemeditorfactory.go index fda6b464..564e4d88 100644 --- a/qt/gen_qitemeditorfactory.go +++ b/qt/gen_qitemeditorfactory.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QItemEditorCreatorBase struct { - h *C.QItemEditorCreatorBase + h *C.QItemEditorCreatorBase + isSubclass bool } func (this *QItemEditorCreatorBase) cPointer() *C.QItemEditorCreatorBase { @@ -31,6 +33,7 @@ func (this *QItemEditorCreatorBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQItemEditorCreatorBase constructs the type using only CGO pointers. func newQItemEditorCreatorBase(h *C.QItemEditorCreatorBase) *QItemEditorCreatorBase { if h == nil { return nil @@ -38,12 +41,17 @@ func newQItemEditorCreatorBase(h *C.QItemEditorCreatorBase) *QItemEditorCreatorB return &QItemEditorCreatorBase{h: h} } +// UnsafeNewQItemEditorCreatorBase constructs the type using only unsafe pointers. func UnsafeNewQItemEditorCreatorBase(h unsafe.Pointer) *QItemEditorCreatorBase { - return newQItemEditorCreatorBase((*C.QItemEditorCreatorBase)(h)) + if h == nil { + return nil + } + + return &QItemEditorCreatorBase{h: (*C.QItemEditorCreatorBase)(h)} } func (this *QItemEditorCreatorBase) CreateWidget(parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer())), nil, nil) } func (this *QItemEditorCreatorBase) ValuePropertyName() []byte { @@ -59,7 +67,7 @@ func (this *QItemEditorCreatorBase) OperatorAssign(param1 *QItemEditorCreatorBas // Delete this object from C++ memory. func (this *QItemEditorCreatorBase) Delete() { - C.QItemEditorCreatorBase_Delete(this.h) + C.QItemEditorCreatorBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -72,7 +80,8 @@ func (this *QItemEditorCreatorBase) GoGC() { } type QItemEditorFactory struct { - h *C.QItemEditorFactory + h *C.QItemEditorFactory + isSubclass bool } func (this *QItemEditorFactory) cPointer() *C.QItemEditorFactory { @@ -89,6 +98,7 @@ func (this *QItemEditorFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQItemEditorFactory constructs the type using only CGO pointers. func newQItemEditorFactory(h *C.QItemEditorFactory) *QItemEditorFactory { if h == nil { return nil @@ -96,24 +106,37 @@ func newQItemEditorFactory(h *C.QItemEditorFactory) *QItemEditorFactory { return &QItemEditorFactory{h: h} } +// UnsafeNewQItemEditorFactory constructs the type using only unsafe pointers. func UnsafeNewQItemEditorFactory(h unsafe.Pointer) *QItemEditorFactory { - return newQItemEditorFactory((*C.QItemEditorFactory)(h)) + if h == nil { + return nil + } + + return &QItemEditorFactory{h: (*C.QItemEditorFactory)(h)} } // NewQItemEditorFactory constructs a new QItemEditorFactory object. func NewQItemEditorFactory() *QItemEditorFactory { - ret := C.QItemEditorFactory_new() - return newQItemEditorFactory(ret) + var outptr_QItemEditorFactory *C.QItemEditorFactory = nil + + C.QItemEditorFactory_new(&outptr_QItemEditorFactory) + ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret.isSubclass = true + return ret } // NewQItemEditorFactory2 constructs a new QItemEditorFactory object. func NewQItemEditorFactory2(param1 *QItemEditorFactory) *QItemEditorFactory { - ret := C.QItemEditorFactory_new2(param1.cPointer()) - return newQItemEditorFactory(ret) + var outptr_QItemEditorFactory *C.QItemEditorFactory = nil + + C.QItemEditorFactory_new2(param1.cPointer(), &outptr_QItemEditorFactory) + ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret.isSubclass = true + return ret } func (this *QItemEditorFactory) CreateEditor(userType int, parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer())), nil, nil) } func (this *QItemEditorFactory) ValuePropertyName(userType int) []byte { @@ -135,9 +158,65 @@ func QItemEditorFactory_SetDefaultFactory(factory *QItemEditorFactory) { C.QItemEditorFactory_SetDefaultFactory(factory.cPointer()) } +func (this *QItemEditorFactory) callVirtualBase_CreateEditor(userType int, parent *QWidget) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorFactory_virtualbase_CreateEditor(unsafe.Pointer(this.h), (C.int)(userType), parent.cPointer())), nil, nil) +} +func (this *QItemEditorFactory) OnCreateEditor(slot func(super func(userType int, parent *QWidget) *QWidget, userType int, parent *QWidget) *QWidget) { + C.QItemEditorFactory_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemEditorFactory_CreateEditor +func miqt_exec_callback_QItemEditorFactory_CreateEditor(self *C.QItemEditorFactory, cb C.intptr_t, userType C.int, parent *C.QWidget) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(userType int, parent *QWidget) *QWidget, userType int, parent *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(userType) + + slotval2 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + + virtualReturn := gofunc((&QItemEditorFactory{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QItemEditorFactory) callVirtualBase_ValuePropertyName(userType int) []byte { + + var _bytearray C.struct_miqt_string = C.QItemEditorFactory_virtualbase_ValuePropertyName(unsafe.Pointer(this.h), (C.int)(userType)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QItemEditorFactory) OnValuePropertyName(slot func(super func(userType int) []byte, userType int) []byte) { + C.QItemEditorFactory_override_virtual_ValuePropertyName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemEditorFactory_ValuePropertyName +func miqt_exec_callback_QItemEditorFactory_ValuePropertyName(self *C.QItemEditorFactory, cb C.intptr_t, userType C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(userType int) []byte, userType int) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(userType) + + virtualReturn := gofunc((&QItemEditorFactory{h: self}).callVirtualBase_ValuePropertyName, slotval1) + virtualReturn_alias := C.struct_miqt_string{} + virtualReturn_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[0])) + virtualReturn_alias.len = C.size_t(len(virtualReturn)) + + return virtualReturn_alias + +} + // Delete this object from C++ memory. func (this *QItemEditorFactory) Delete() { - C.QItemEditorFactory_Delete(this.h) + C.QItemEditorFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qitemeditorfactory.h b/qt/gen_qitemeditorfactory.h index 5b3cfc8f..023c1375 100644 --- a/qt/gen_qitemeditorfactory.h +++ b/qt/gen_qitemeditorfactory.h @@ -29,16 +29,20 @@ typedef struct QWidget QWidget; QWidget* QItemEditorCreatorBase_CreateWidget(const QItemEditorCreatorBase* self, QWidget* parent); struct miqt_string QItemEditorCreatorBase_ValuePropertyName(const QItemEditorCreatorBase* self); void QItemEditorCreatorBase_OperatorAssign(QItemEditorCreatorBase* self, QItemEditorCreatorBase* param1); -void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self); +void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self, bool isSubclass); -QItemEditorFactory* QItemEditorFactory_new(); -QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1); +void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory); +void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory); QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent); struct miqt_string QItemEditorFactory_ValuePropertyName(const QItemEditorFactory* self, int userType); void QItemEditorFactory_RegisterEditor(QItemEditorFactory* self, int userType, QItemEditorCreatorBase* creator); QItemEditorFactory* QItemEditorFactory_DefaultFactory(); void QItemEditorFactory_SetDefaultFactory(QItemEditorFactory* factory); -void QItemEditorFactory_Delete(QItemEditorFactory* self); +void QItemEditorFactory_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QItemEditorFactory_virtualbase_CreateEditor(const void* self, int userType, QWidget* parent); +void QItemEditorFactory_override_virtual_ValuePropertyName(void* self, intptr_t slot); +struct miqt_string QItemEditorFactory_virtualbase_ValuePropertyName(const void* self, int userType); +void QItemEditorFactory_Delete(QItemEditorFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qitemselectionmodel.cpp b/qt/gen_qitemselectionmodel.cpp index 30b6ce0a..3478c1ef 100644 --- a/qt/gen_qitemselectionmodel.cpp +++ b/qt/gen_qitemselectionmodel.cpp @@ -1,7 +1,10 @@ #include +#include +#include #include #include #include +#include #include #include #include @@ -9,24 +12,29 @@ #include #include #include +#include #include #include "gen_qitemselectionmodel.h" #include "_cgo_export.h" -QItemSelectionRange* QItemSelectionRange_new() { - return new QItemSelectionRange(); +void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(); + *outptr_QItemSelectionRange = ret; } -QItemSelectionRange* QItemSelectionRange_new2(QItemSelectionRange* other) { - return new QItemSelectionRange(*other); +void QItemSelectionRange_new2(QItemSelectionRange* other, QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(*other); + *outptr_QItemSelectionRange = ret; } -QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR) { - return new QItemSelectionRange(*topL, *bottomR); +void QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(*topL, *bottomR); + *outptr_QItemSelectionRange = ret; } -QItemSelectionRange* QItemSelectionRange_new4(QModelIndex* index) { - return new QItemSelectionRange(*index); +void QItemSelectionRange_new4(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(*index); + *outptr_QItemSelectionRange = ret; } void QItemSelectionRange_OperatorAssign(QItemSelectionRange* self, QItemSelectionRange* other) { @@ -130,20 +138,337 @@ struct miqt_array /* of QModelIndex* */ QItemSelectionRange_Indexes(const QItem return _out; } -void QItemSelectionRange_Delete(QItemSelectionRange* self) { - delete self; +void QItemSelectionRange_Delete(QItemSelectionRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QItemSelectionModel* QItemSelectionModel_new() { - return new QItemSelectionModel(); +class MiqtVirtualQItemSelectionModel : public virtual QItemSelectionModel { +public: + + MiqtVirtualQItemSelectionModel(): QItemSelectionModel() {}; + MiqtVirtualQItemSelectionModel(QAbstractItemModel* model, QObject* parent): QItemSelectionModel(model, parent) {}; + MiqtVirtualQItemSelectionModel(QAbstractItemModel* model): QItemSelectionModel(model) {}; + + virtual ~MiqtVirtualQItemSelectionModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCurrentIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setCurrentIndex(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetCurrentIndex == 0) { + QItemSelectionModel::setCurrentIndex(index, command); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QItemSelectionModel_SetCurrentIndex(this, handle__SetCurrentIndex, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCurrentIndex(QModelIndex* index, int command) { + + QItemSelectionModel::setCurrentIndex(*index, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Select = 0; + + // Subclass to allow providing a Go implementation + virtual void select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) override { + if (handle__Select == 0) { + QItemSelectionModel::select(index, command); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QItemSelectionModel_Select(this, handle__Select, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Select(QModelIndex* index, int command) { + + QItemSelectionModel::select(*index, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QItemSelectionModel::clear(); + return; + } + + + miqt_exec_callback_QItemSelectionModel_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QItemSelectionModel::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QItemSelectionModel::reset(); + return; + } + + + miqt_exec_callback_QItemSelectionModel_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QItemSelectionModel::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearCurrentIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void clearCurrentIndex() override { + if (handle__ClearCurrentIndex == 0) { + QItemSelectionModel::clearCurrentIndex(); + return; + } + + + miqt_exec_callback_QItemSelectionModel_ClearCurrentIndex(this, handle__ClearCurrentIndex); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ClearCurrentIndex() { + + QItemSelectionModel::clearCurrentIndex(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QItemSelectionModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QItemSelectionModel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QItemSelectionModel::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QItemSelectionModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QItemSelectionModel_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QItemSelectionModel::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QItemSelectionModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QItemSelectionModel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QItemSelectionModel::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QItemSelectionModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QItemSelectionModel_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QItemSelectionModel::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QItemSelectionModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QItemSelectionModel_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QItemSelectionModel::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QItemSelectionModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QItemSelectionModel_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QItemSelectionModel::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QItemSelectionModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QItemSelectionModel_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QItemSelectionModel::disconnectNotify(*signal); + + } + +}; + +void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { + MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(); + *outptr_QItemSelectionModel = ret; + *outptr_QObject = static_cast(ret); } -QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent) { - return new QItemSelectionModel(model, parent); +void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { + MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model, parent); + *outptr_QItemSelectionModel = ret; + *outptr_QObject = static_cast(ret); } -QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model) { - return new QItemSelectionModel(model); +void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { + MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model); + *outptr_QItemSelectionModel = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self) { @@ -284,7 +609,7 @@ void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* } void QItemSelectionModel_connect_CurrentChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { const QModelIndex& current_ret = current; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¤t_ret); @@ -300,7 +625,7 @@ void QItemSelectionModel_CurrentRowChanged(QItemSelectionModel* self, QModelInde } void QItemSelectionModel_connect_CurrentRowChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentRowChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentRowChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { const QModelIndex& current_ret = current; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¤t_ret); @@ -316,7 +641,7 @@ void QItemSelectionModel_CurrentColumnChanged(QItemSelectionModel* self, QModelI } void QItemSelectionModel_connect_CurrentColumnChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentColumnChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentColumnChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { const QModelIndex& current_ret = current; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¤t_ret); @@ -332,7 +657,7 @@ void QItemSelectionModel_ModelChanged(QItemSelectionModel* self, QAbstractItemMo } void QItemSelectionModel_connect_ModelChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::modelChanged), self, [=](QAbstractItemModel* model) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::modelChanged), self, [=](QAbstractItemModel* model) { QAbstractItemModel* sigval1 = model; miqt_exec_callback_QItemSelectionModel_ModelChanged(slot, sigval1); }); @@ -424,7 +749,107 @@ struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns1(co return _out; } -void QItemSelectionModel_Delete(QItemSelectionModel* self) { - delete self; +void QItemSelectionModel_override_virtual_SetCurrentIndex(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__SetCurrentIndex = slot; +} + +void QItemSelectionModel_virtualbase_SetCurrentIndex(void* self, QModelIndex* index, int command) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_SetCurrentIndex(index, command); +} + +void QItemSelectionModel_override_virtual_Select(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Select = slot; +} + +void QItemSelectionModel_virtualbase_Select(void* self, QModelIndex* index, int command) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Select(index, command); +} + +void QItemSelectionModel_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Clear = slot; +} + +void QItemSelectionModel_virtualbase_Clear(void* self) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Clear(); +} + +void QItemSelectionModel_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Reset = slot; +} + +void QItemSelectionModel_virtualbase_Reset(void* self) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Reset(); +} + +void QItemSelectionModel_override_virtual_ClearCurrentIndex(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__ClearCurrentIndex = slot; +} + +void QItemSelectionModel_virtualbase_ClearCurrentIndex(void* self) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_ClearCurrentIndex(); +} + +void QItemSelectionModel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Event = slot; +} + +bool QItemSelectionModel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Event(event); +} + +void QItemSelectionModel_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__EventFilter = slot; +} + +bool QItemSelectionModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QItemSelectionModel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__TimerEvent = slot; +} + +void QItemSelectionModel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_TimerEvent(event); +} + +void QItemSelectionModel_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__ChildEvent = slot; +} + +void QItemSelectionModel_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_ChildEvent(event); +} + +void QItemSelectionModel_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__CustomEvent = slot; +} + +void QItemSelectionModel_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_CustomEvent(event); +} + +void QItemSelectionModel_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__ConnectNotify = slot; +} + +void QItemSelectionModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__DisconnectNotify = slot; +} + +void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qitemselectionmodel.go b/qt/gen_qitemselectionmodel.go index 470af72c..5d3e9459 100644 --- a/qt/gen_qitemselectionmodel.go +++ b/qt/gen_qitemselectionmodel.go @@ -31,7 +31,8 @@ const ( ) type QItemSelectionRange struct { - h *C.QItemSelectionRange + h *C.QItemSelectionRange + isSubclass bool } func (this *QItemSelectionRange) cPointer() *C.QItemSelectionRange { @@ -48,6 +49,7 @@ func (this *QItemSelectionRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQItemSelectionRange constructs the type using only CGO pointers. func newQItemSelectionRange(h *C.QItemSelectionRange) *QItemSelectionRange { if h == nil { return nil @@ -55,32 +57,53 @@ func newQItemSelectionRange(h *C.QItemSelectionRange) *QItemSelectionRange { return &QItemSelectionRange{h: h} } +// UnsafeNewQItemSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQItemSelectionRange(h unsafe.Pointer) *QItemSelectionRange { - return newQItemSelectionRange((*C.QItemSelectionRange)(h)) + if h == nil { + return nil + } + + return &QItemSelectionRange{h: (*C.QItemSelectionRange)(h)} } // NewQItemSelectionRange constructs a new QItemSelectionRange object. func NewQItemSelectionRange() *QItemSelectionRange { - ret := C.QItemSelectionRange_new() - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new(&outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } // NewQItemSelectionRange2 constructs a new QItemSelectionRange object. func NewQItemSelectionRange2(other *QItemSelectionRange) *QItemSelectionRange { - ret := C.QItemSelectionRange_new2(other.cPointer()) - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new2(other.cPointer(), &outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } // NewQItemSelectionRange3 constructs a new QItemSelectionRange object. func NewQItemSelectionRange3(topL *QModelIndex, bottomR *QModelIndex) *QItemSelectionRange { - ret := C.QItemSelectionRange_new3(topL.cPointer(), bottomR.cPointer()) - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new3(topL.cPointer(), bottomR.cPointer(), &outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } // NewQItemSelectionRange4 constructs a new QItemSelectionRange object. func NewQItemSelectionRange4(index *QModelIndex) *QItemSelectionRange { - ret := C.QItemSelectionRange_new4(index.cPointer()) - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new4(index.cPointer(), &outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } func (this *QItemSelectionRange) OperatorAssign(other *QItemSelectionRange) { @@ -131,7 +154,7 @@ func (this *QItemSelectionRange) Parent() *QModelIndex { } func (this *QItemSelectionRange) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionRange_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionRange_Model(this.h)), nil) } func (this *QItemSelectionRange) Contains(index *QModelIndex) bool { @@ -188,7 +211,7 @@ func (this *QItemSelectionRange) Indexes() []QModelIndex { // Delete this object from C++ memory. func (this *QItemSelectionRange) Delete() { - C.QItemSelectionRange_Delete(this.h) + C.QItemSelectionRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -201,7 +224,8 @@ func (this *QItemSelectionRange) GoGC() { } type QItemSelectionModel struct { - h *C.QItemSelectionModel + h *C.QItemSelectionModel + isSubclass bool *QObject } @@ -219,33 +243,56 @@ func (this *QItemSelectionModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQItemSelectionModel(h *C.QItemSelectionModel) *QItemSelectionModel { +// newQItemSelectionModel constructs the type using only CGO pointers. +func newQItemSelectionModel(h *C.QItemSelectionModel, h_QObject *C.QObject) *QItemSelectionModel { if h == nil { return nil } - return &QItemSelectionModel{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QItemSelectionModel{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQItemSelectionModel(h unsafe.Pointer) *QItemSelectionModel { - return newQItemSelectionModel((*C.QItemSelectionModel)(h)) +// UnsafeNewQItemSelectionModel constructs the type using only unsafe pointers. +func UnsafeNewQItemSelectionModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QItemSelectionModel { + if h == nil { + return nil + } + + return &QItemSelectionModel{h: (*C.QItemSelectionModel)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQItemSelectionModel constructs a new QItemSelectionModel object. func NewQItemSelectionModel() *QItemSelectionModel { - ret := C.QItemSelectionModel_new() - return newQItemSelectionModel(ret) + var outptr_QItemSelectionModel *C.QItemSelectionModel = nil + var outptr_QObject *C.QObject = nil + + C.QItemSelectionModel_new(&outptr_QItemSelectionModel, &outptr_QObject) + ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQItemSelectionModel2 constructs a new QItemSelectionModel object. func NewQItemSelectionModel2(model *QAbstractItemModel, parent *QObject) *QItemSelectionModel { - ret := C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer()) - return newQItemSelectionModel(ret) + var outptr_QItemSelectionModel *C.QItemSelectionModel = nil + var outptr_QObject *C.QObject = nil + + C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) + ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQItemSelectionModel3 constructs a new QItemSelectionModel object. func NewQItemSelectionModel3(model *QAbstractItemModel) *QItemSelectionModel { - ret := C.QItemSelectionModel_new3(model.cPointer()) - return newQItemSelectionModel(ret) + var outptr_QItemSelectionModel *C.QItemSelectionModel = nil + var outptr_QObject *C.QObject = nil + + C.QItemSelectionModel_new3(model.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) + ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QItemSelectionModel) MetaObject() *QMetaObject { @@ -347,11 +394,11 @@ func (this *QItemSelectionModel) SelectedColumns() []QModelIndex { } func (this *QItemSelectionModel) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model(this.h)), nil) } func (this *QItemSelectionModel) Model2() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model2(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model2(this.h)), nil) } func (this *QItemSelectionModel) SetModel(model *QAbstractItemModel) { @@ -460,7 +507,7 @@ func miqt_exec_callback_QItemSelectionModel_ModelChanged(cb C.intptr_t, model *C } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model)) + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) gofunc(slotval1) } @@ -551,9 +598,283 @@ func (this *QItemSelectionModel) SelectedColumns1(row int) []QModelIndex { return _ret } +func (this *QItemSelectionModel) callVirtualBase_SetCurrentIndex(index *QModelIndex, command QItemSelectionModel__SelectionFlag) { + + C.QItemSelectionModel_virtualbase_SetCurrentIndex(unsafe.Pointer(this.h), index.cPointer(), (C.int)(command)) + +} +func (this *QItemSelectionModel) OnSetCurrentIndex(slot func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) { + C.QItemSelectionModel_override_virtual_SetCurrentIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_SetCurrentIndex +func miqt_exec_callback_QItemSelectionModel_SetCurrentIndex(self *C.QItemSelectionModel, cb C.intptr_t, index *C.QModelIndex, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_SetCurrentIndex, slotval1, slotval2) + +} + +func (this *QItemSelectionModel) callVirtualBase_Select(index *QModelIndex, command QItemSelectionModel__SelectionFlag) { + + C.QItemSelectionModel_virtualbase_Select(unsafe.Pointer(this.h), index.cPointer(), (C.int)(command)) + +} +func (this *QItemSelectionModel) OnSelect(slot func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) { + C.QItemSelectionModel_override_virtual_Select(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Select +func miqt_exec_callback_QItemSelectionModel_Select(self *C.QItemSelectionModel, cb C.intptr_t, index *C.QModelIndex, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Select, slotval1, slotval2) + +} + +func (this *QItemSelectionModel) callVirtualBase_Clear() { + + C.QItemSelectionModel_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QItemSelectionModel) OnClear(slot func(super func())) { + C.QItemSelectionModel_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Clear +func miqt_exec_callback_QItemSelectionModel_Clear(self *C.QItemSelectionModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Clear) + +} + +func (this *QItemSelectionModel) callVirtualBase_Reset() { + + C.QItemSelectionModel_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QItemSelectionModel) OnReset(slot func(super func())) { + C.QItemSelectionModel_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Reset +func miqt_exec_callback_QItemSelectionModel_Reset(self *C.QItemSelectionModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Reset) + +} + +func (this *QItemSelectionModel) callVirtualBase_ClearCurrentIndex() { + + C.QItemSelectionModel_virtualbase_ClearCurrentIndex(unsafe.Pointer(this.h)) + +} +func (this *QItemSelectionModel) OnClearCurrentIndex(slot func(super func())) { + C.QItemSelectionModel_override_virtual_ClearCurrentIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_ClearCurrentIndex +func miqt_exec_callback_QItemSelectionModel_ClearCurrentIndex(self *C.QItemSelectionModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ClearCurrentIndex) + +} + +func (this *QItemSelectionModel) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QItemSelectionModel_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QItemSelectionModel) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QItemSelectionModel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Event +func miqt_exec_callback_QItemSelectionModel_Event(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemSelectionModel) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QItemSelectionModel_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QItemSelectionModel) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QItemSelectionModel_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_EventFilter +func miqt_exec_callback_QItemSelectionModel_EventFilter(self *C.QItemSelectionModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QItemSelectionModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemSelectionModel) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QItemSelectionModel_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QItemSelectionModel) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QItemSelectionModel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_TimerEvent +func miqt_exec_callback_QItemSelectionModel_TimerEvent(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QItemSelectionModel_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QItemSelectionModel) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QItemSelectionModel_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_ChildEvent +func miqt_exec_callback_QItemSelectionModel_ChildEvent(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_CustomEvent(event *QEvent) { + + C.QItemSelectionModel_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QItemSelectionModel) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QItemSelectionModel_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_CustomEvent +func miqt_exec_callback_QItemSelectionModel_CustomEvent(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QItemSelectionModel_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QItemSelectionModel) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QItemSelectionModel_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_ConnectNotify +func miqt_exec_callback_QItemSelectionModel_ConnectNotify(self *C.QItemSelectionModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QItemSelectionModel_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QItemSelectionModel) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QItemSelectionModel_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_DisconnectNotify +func miqt_exec_callback_QItemSelectionModel_DisconnectNotify(self *C.QItemSelectionModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QItemSelectionModel) Delete() { - C.QItemSelectionModel_Delete(this.h) + C.QItemSelectionModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qitemselectionmodel.h b/qt/gen_qitemselectionmodel.h index bf7e2270..1cd81477 100644 --- a/qt/gen_qitemselectionmodel.h +++ b/qt/gen_qitemselectionmodel.h @@ -16,26 +16,34 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QChildEvent; +class QEvent; class QItemSelectionModel; class QItemSelectionRange; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; class QPersistentModelIndex; +class QTimerEvent; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QItemSelectionRange QItemSelectionRange; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPersistentModelIndex QPersistentModelIndex; +typedef struct QTimerEvent QTimerEvent; #endif -QItemSelectionRange* QItemSelectionRange_new(); -QItemSelectionRange* QItemSelectionRange_new2(QItemSelectionRange* other); -QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR); -QItemSelectionRange* QItemSelectionRange_new4(QModelIndex* index); +void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange); +void QItemSelectionRange_new2(QItemSelectionRange* other, QItemSelectionRange** outptr_QItemSelectionRange); +void QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange); +void QItemSelectionRange_new4(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange); void QItemSelectionRange_OperatorAssign(QItemSelectionRange* self, QItemSelectionRange* other); void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other); int QItemSelectionRange_Top(const QItemSelectionRange* self); @@ -58,11 +66,11 @@ bool QItemSelectionRange_OperatorLesser(const QItemSelectionRange* self, QItemSe bool QItemSelectionRange_IsValid(const QItemSelectionRange* self); bool QItemSelectionRange_IsEmpty(const QItemSelectionRange* self); struct miqt_array /* of QModelIndex* */ QItemSelectionRange_Indexes(const QItemSelectionRange* self); -void QItemSelectionRange_Delete(QItemSelectionRange* self); +void QItemSelectionRange_Delete(QItemSelectionRange* self, bool isSubclass); -QItemSelectionModel* QItemSelectionModel_new(); -QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent); -QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model); +void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); +void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); +void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self); void* QItemSelectionModel_Metacast(QItemSelectionModel* self, const char* param1); struct miqt_string QItemSelectionModel_Tr(const char* s); @@ -104,7 +112,31 @@ bool QItemSelectionModel_RowIntersectsSelection2(const QItemSelectionModel* self bool QItemSelectionModel_ColumnIntersectsSelection2(const QItemSelectionModel* self, int column, QModelIndex* parent); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedRows1(const QItemSelectionModel* self, int column); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns1(const QItemSelectionModel* self, int row); -void QItemSelectionModel_Delete(QItemSelectionModel* self); +void QItemSelectionModel_override_virtual_SetCurrentIndex(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_SetCurrentIndex(void* self, QModelIndex* index, int command); +void QItemSelectionModel_override_virtual_Select(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Select(void* self, QModelIndex* index, int command); +void QItemSelectionModel_override_virtual_Clear(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Clear(void* self); +void QItemSelectionModel_override_virtual_Reset(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Reset(void* self); +void QItemSelectionModel_override_virtual_ClearCurrentIndex(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_ClearCurrentIndex(void* self); +void QItemSelectionModel_override_virtual_Event(void* self, intptr_t slot); +bool QItemSelectionModel_virtualbase_Event(void* self, QEvent* event); +void QItemSelectionModel_override_virtual_EventFilter(void* self, intptr_t slot); +bool QItemSelectionModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QItemSelectionModel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QItemSelectionModel_override_virtual_ChildEvent(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QItemSelectionModel_override_virtual_CustomEvent(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_CustomEvent(void* self, QEvent* event); +void QItemSelectionModel_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qjsonarray.cpp b/qt/gen_qjsonarray.cpp index 460fa974..bdc59306 100644 --- a/qt/gen_qjsonarray.cpp +++ b/qt/gen_qjsonarray.cpp @@ -13,12 +13,14 @@ #include "gen_qjsonarray.h" #include "_cgo_export.h" -QJsonArray* QJsonArray_new() { - return new QJsonArray(); +void QJsonArray_new(QJsonArray** outptr_QJsonArray) { + QJsonArray* ret = new QJsonArray(); + *outptr_QJsonArray = ret; } -QJsonArray* QJsonArray_new2(QJsonArray* other) { - return new QJsonArray(*other); +void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray) { + QJsonArray* ret = new QJsonArray(*other); + *outptr_QJsonArray = ret; } void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other) { @@ -192,20 +194,27 @@ bool QJsonArray_Empty(const QJsonArray* self) { return self->empty(); } -void QJsonArray_Delete(QJsonArray* self) { - delete self; +void QJsonArray_Delete(QJsonArray* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonArray__iterator* QJsonArray__iterator_new() { - return new QJsonArray::iterator(); +void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator) { + QJsonArray::iterator* ret = new QJsonArray::iterator(); + *outptr_QJsonArray__iterator = ret; } -QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, int index) { - return new QJsonArray::iterator(array, static_cast(index)); +void QJsonArray__iterator_new2(QJsonArray* array, int index, QJsonArray__iterator** outptr_QJsonArray__iterator) { + QJsonArray::iterator* ret = new QJsonArray::iterator(array, static_cast(index)); + *outptr_QJsonArray__iterator = ret; } -QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* param1) { - return new QJsonArray::iterator(*param1); +void QJsonArray__iterator_new3(QJsonArray__iterator* param1, QJsonArray__iterator** outptr_QJsonArray__iterator) { + QJsonArray::iterator* ret = new QJsonArray::iterator(*param1); + *outptr_QJsonArray__iterator = ret; } QJsonValueRef* QJsonArray__iterator_OperatorMultiply(const QJsonArray__iterator* self) { @@ -312,24 +321,32 @@ int QJsonArray__iterator_OperatorMinusWithQJsonArrayiterator(const QJsonArray__i return self->operator-(*j); } -void QJsonArray__iterator_Delete(QJsonArray__iterator* self) { - delete self; +void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonArray__const_iterator* QJsonArray__const_iterator_new() { - return new QJsonArray::const_iterator(); +void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(); + *outptr_QJsonArray__const_iterator = ret; } -QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, int index) { - return new QJsonArray::const_iterator(array, static_cast(index)); +void QJsonArray__const_iterator_new2(QJsonArray* array, int index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(array, static_cast(index)); + *outptr_QJsonArray__const_iterator = ret; } -QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o) { - return new QJsonArray::const_iterator(*o); +void QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*o); + *outptr_QJsonArray__const_iterator = ret; } -QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__iterator* o) { - return new QJsonArray::const_iterator(*o); +void QJsonArray__const_iterator_new4(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*o); + *outptr_QJsonArray__const_iterator = ret; } QJsonValue* QJsonArray__const_iterator_OperatorMultiply(const QJsonArray__const_iterator* self) { @@ -412,7 +429,11 @@ int QJsonArray__const_iterator_OperatorMinusWithQJsonArrayconstIterator(const QJ return self->operator-(*j); } -void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self) { - delete self; +void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qjsonarray.go b/qt/gen_qjsonarray.go index 9f23dfae..3de690a6 100644 --- a/qt/gen_qjsonarray.go +++ b/qt/gen_qjsonarray.go @@ -14,7 +14,8 @@ import ( ) type QJsonArray struct { - h *C.QJsonArray + h *C.QJsonArray + isSubclass bool } func (this *QJsonArray) cPointer() *C.QJsonArray { @@ -31,6 +32,7 @@ func (this *QJsonArray) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonArray constructs the type using only CGO pointers. func newQJsonArray(h *C.QJsonArray) *QJsonArray { if h == nil { return nil @@ -38,20 +40,33 @@ func newQJsonArray(h *C.QJsonArray) *QJsonArray { return &QJsonArray{h: h} } +// UnsafeNewQJsonArray constructs the type using only unsafe pointers. func UnsafeNewQJsonArray(h unsafe.Pointer) *QJsonArray { - return newQJsonArray((*C.QJsonArray)(h)) + if h == nil { + return nil + } + + return &QJsonArray{h: (*C.QJsonArray)(h)} } // NewQJsonArray constructs a new QJsonArray object. func NewQJsonArray() *QJsonArray { - ret := C.QJsonArray_new() - return newQJsonArray(ret) + var outptr_QJsonArray *C.QJsonArray = nil + + C.QJsonArray_new(&outptr_QJsonArray) + ret := newQJsonArray(outptr_QJsonArray) + ret.isSubclass = true + return ret } // NewQJsonArray2 constructs a new QJsonArray object. func NewQJsonArray2(other *QJsonArray) *QJsonArray { - ret := C.QJsonArray_new2(other.cPointer()) - return newQJsonArray(ret) + var outptr_QJsonArray *C.QJsonArray = nil + + C.QJsonArray_new2(other.cPointer(), &outptr_QJsonArray) + ret := newQJsonArray(outptr_QJsonArray) + ret.isSubclass = true + return ret } func (this *QJsonArray) OperatorAssign(other *QJsonArray) { @@ -280,7 +295,7 @@ func (this *QJsonArray) Empty() bool { // Delete this object from C++ memory. func (this *QJsonArray) Delete() { - C.QJsonArray_Delete(this.h) + C.QJsonArray_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -293,7 +308,8 @@ func (this *QJsonArray) GoGC() { } type QJsonArray__iterator struct { - h *C.QJsonArray__iterator + h *C.QJsonArray__iterator + isSubclass bool } func (this *QJsonArray__iterator) cPointer() *C.QJsonArray__iterator { @@ -310,6 +326,7 @@ func (this *QJsonArray__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonArray__iterator constructs the type using only CGO pointers. func newQJsonArray__iterator(h *C.QJsonArray__iterator) *QJsonArray__iterator { if h == nil { return nil @@ -317,26 +334,43 @@ func newQJsonArray__iterator(h *C.QJsonArray__iterator) *QJsonArray__iterator { return &QJsonArray__iterator{h: h} } +// UnsafeNewQJsonArray__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__iterator(h unsafe.Pointer) *QJsonArray__iterator { - return newQJsonArray__iterator((*C.QJsonArray__iterator)(h)) + if h == nil { + return nil + } + + return &QJsonArray__iterator{h: (*C.QJsonArray__iterator)(h)} } // NewQJsonArray__iterator constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator() *QJsonArray__iterator { - ret := C.QJsonArray__iterator_new() - return newQJsonArray__iterator(ret) + var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil + + C.QJsonArray__iterator_new(&outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__iterator2 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator2(array *QJsonArray, index int) *QJsonArray__iterator { - ret := C.QJsonArray__iterator_new2(array.cPointer(), (C.int)(index)) - return newQJsonArray__iterator(ret) + var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil + + C.QJsonArray__iterator_new2(array.cPointer(), (C.int)(index), &outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__iterator3 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator3(param1 *QJsonArray__iterator) *QJsonArray__iterator { - ret := C.QJsonArray__iterator_new3(param1.cPointer()) - return newQJsonArray__iterator(ret) + var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil + + C.QJsonArray__iterator_new3(param1.cPointer(), &outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret.isSubclass = true + return ret } func (this *QJsonArray__iterator) OperatorMultiply() *QJsonValueRef { @@ -458,7 +492,7 @@ func (this *QJsonArray__iterator) OperatorMinusWithQJsonArrayiterator(j QJsonArr // Delete this object from C++ memory. func (this *QJsonArray__iterator) Delete() { - C.QJsonArray__iterator_Delete(this.h) + C.QJsonArray__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -471,7 +505,8 @@ func (this *QJsonArray__iterator) GoGC() { } type QJsonArray__const_iterator struct { - h *C.QJsonArray__const_iterator + h *C.QJsonArray__const_iterator + isSubclass bool } func (this *QJsonArray__const_iterator) cPointer() *C.QJsonArray__const_iterator { @@ -488,6 +523,7 @@ func (this *QJsonArray__const_iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonArray__const_iterator constructs the type using only CGO pointers. func newQJsonArray__const_iterator(h *C.QJsonArray__const_iterator) *QJsonArray__const_iterator { if h == nil { return nil @@ -495,32 +531,53 @@ func newQJsonArray__const_iterator(h *C.QJsonArray__const_iterator) *QJsonArray_ return &QJsonArray__const_iterator{h: h} } +// UnsafeNewQJsonArray__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__const_iterator(h unsafe.Pointer) *QJsonArray__const_iterator { - return newQJsonArray__const_iterator((*C.QJsonArray__const_iterator)(h)) + if h == nil { + return nil + } + + return &QJsonArray__const_iterator{h: (*C.QJsonArray__const_iterator)(h)} } // NewQJsonArray__const_iterator constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator() *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new() - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new(&outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__const_iterator2 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator2(array *QJsonArray, index int) *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new2(array.cPointer(), (C.int)(index)) - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new2(array.cPointer(), (C.int)(index), &outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__const_iterator3 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator3(o *QJsonArray__const_iterator) *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new3(o.cPointer()) - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new3(o.cPointer(), &outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__const_iterator4 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator4(o *QJsonArray__iterator) *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new4(o.cPointer()) - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new4(o.cPointer(), &outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } func (this *QJsonArray__const_iterator) OperatorMultiply() *QJsonValue { @@ -618,7 +675,7 @@ func (this *QJsonArray__const_iterator) OperatorMinusWithQJsonArrayconstIterator // Delete this object from C++ memory. func (this *QJsonArray__const_iterator) Delete() { - C.QJsonArray__const_iterator_Delete(this.h) + C.QJsonArray__const_iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qjsonarray.h b/qt/gen_qjsonarray.h index 667e3e2c..8522a534 100644 --- a/qt/gen_qjsonarray.h +++ b/qt/gen_qjsonarray.h @@ -40,8 +40,8 @@ typedef struct QJsonValueRef QJsonValueRef; typedef struct QJsonValueRefPtr QJsonValueRefPtr; #endif -QJsonArray* QJsonArray_new(); -QJsonArray* QJsonArray_new2(QJsonArray* other); +void QJsonArray_new(QJsonArray** outptr_QJsonArray); +void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray); void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other); QJsonArray* QJsonArray_FromStringList(struct miqt_array /* of struct miqt_string */ list); int QJsonArray_Size(const QJsonArray* self); @@ -82,11 +82,11 @@ void QJsonArray_PushFront(QJsonArray* self, QJsonValue* t); void QJsonArray_PopFront(QJsonArray* self); void QJsonArray_PopBack(QJsonArray* self); bool QJsonArray_Empty(const QJsonArray* self); -void QJsonArray_Delete(QJsonArray* self); +void QJsonArray_Delete(QJsonArray* self, bool isSubclass); -QJsonArray__iterator* QJsonArray__iterator_new(); -QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, int index); -QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* param1); +void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator); +void QJsonArray__iterator_new2(QJsonArray* array, int index, QJsonArray__iterator** outptr_QJsonArray__iterator); +void QJsonArray__iterator_new3(QJsonArray__iterator* param1, QJsonArray__iterator** outptr_QJsonArray__iterator); QJsonValueRef* QJsonArray__iterator_OperatorMultiply(const QJsonArray__iterator* self); QJsonValueRefPtr* QJsonArray__iterator_OperatorMinusGreater(const QJsonArray__iterator* self); QJsonValueRef* QJsonArray__iterator_OperatorSubscript(const QJsonArray__iterator* self, int j); @@ -111,12 +111,12 @@ QJsonArray__iterator* QJsonArray__iterator_OperatorMinusAssign(QJsonArray__itera QJsonArray__iterator* QJsonArray__iterator_OperatorPlus(const QJsonArray__iterator* self, int j); QJsonArray__iterator* QJsonArray__iterator_OperatorMinus(const QJsonArray__iterator* self, int j); int QJsonArray__iterator_OperatorMinusWithQJsonArrayiterator(const QJsonArray__iterator* self, QJsonArray__iterator* j); -void QJsonArray__iterator_Delete(QJsonArray__iterator* self); +void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass); -QJsonArray__const_iterator* QJsonArray__const_iterator_new(); -QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, int index); -QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o); -QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__iterator* o); +void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +void QJsonArray__const_iterator_new2(QJsonArray* array, int index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +void QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +void QJsonArray__const_iterator_new4(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); QJsonValue* QJsonArray__const_iterator_OperatorMultiply(const QJsonArray__const_iterator* self); QJsonValuePtr* QJsonArray__const_iterator_OperatorMinusGreater(const QJsonArray__const_iterator* self); QJsonValue* QJsonArray__const_iterator_OperatorSubscript(const QJsonArray__const_iterator* self, int j); @@ -135,7 +135,7 @@ QJsonArray__const_iterator* QJsonArray__const_iterator_OperatorMinusAssign(QJson QJsonArray__const_iterator* QJsonArray__const_iterator_OperatorPlus(const QJsonArray__const_iterator* self, int j); QJsonArray__const_iterator* QJsonArray__const_iterator_OperatorMinus(const QJsonArray__const_iterator* self, int j); int QJsonArray__const_iterator_OperatorMinusWithQJsonArrayconstIterator(const QJsonArray__const_iterator* self, QJsonArray__const_iterator* j); -void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self); +void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qjsondocument.cpp b/qt/gen_qjsondocument.cpp index 28e022bb..608177c6 100644 --- a/qt/gen_qjsondocument.cpp +++ b/qt/gen_qjsondocument.cpp @@ -23,24 +23,32 @@ struct miqt_string QJsonParseError_ErrorString(const QJsonParseError* self) { return _ms; } -void QJsonParseError_Delete(QJsonParseError* self) { - delete self; +void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonDocument* QJsonDocument_new() { - return new QJsonDocument(); +void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(); + *outptr_QJsonDocument = ret; } -QJsonDocument* QJsonDocument_new2(QJsonObject* object) { - return new QJsonDocument(*object); +void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(*object); + *outptr_QJsonDocument = ret; } -QJsonDocument* QJsonDocument_new3(QJsonArray* array) { - return new QJsonDocument(*array); +void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(*array); + *outptr_QJsonDocument = ret; } -QJsonDocument* QJsonDocument_new4(QJsonDocument* other) { - return new QJsonDocument(*other); +void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(*other); + *outptr_QJsonDocument = ret; } void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other) { @@ -167,7 +175,11 @@ QJsonDocument* QJsonDocument_FromJson2(struct miqt_string json, QJsonParseError* return new QJsonDocument(QJsonDocument::fromJson(json_QByteArray, error)); } -void QJsonDocument_Delete(QJsonDocument* self) { - delete self; +void QJsonDocument_Delete(QJsonDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qjsondocument.go b/qt/gen_qjsondocument.go index 8739974f..e56d9697 100644 --- a/qt/gen_qjsondocument.go +++ b/qt/gen_qjsondocument.go @@ -48,7 +48,8 @@ const ( ) type QJsonParseError struct { - h *C.QJsonParseError + h *C.QJsonParseError + isSubclass bool } func (this *QJsonParseError) cPointer() *C.QJsonParseError { @@ -65,6 +66,7 @@ func (this *QJsonParseError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonParseError constructs the type using only CGO pointers. func newQJsonParseError(h *C.QJsonParseError) *QJsonParseError { if h == nil { return nil @@ -72,8 +74,13 @@ func newQJsonParseError(h *C.QJsonParseError) *QJsonParseError { return &QJsonParseError{h: h} } +// UnsafeNewQJsonParseError constructs the type using only unsafe pointers. func UnsafeNewQJsonParseError(h unsafe.Pointer) *QJsonParseError { - return newQJsonParseError((*C.QJsonParseError)(h)) + if h == nil { + return nil + } + + return &QJsonParseError{h: (*C.QJsonParseError)(h)} } func (this *QJsonParseError) ErrorString() string { @@ -85,7 +92,7 @@ func (this *QJsonParseError) ErrorString() string { // Delete this object from C++ memory. func (this *QJsonParseError) Delete() { - C.QJsonParseError_Delete(this.h) + C.QJsonParseError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -98,7 +105,8 @@ func (this *QJsonParseError) GoGC() { } type QJsonDocument struct { - h *C.QJsonDocument + h *C.QJsonDocument + isSubclass bool } func (this *QJsonDocument) cPointer() *C.QJsonDocument { @@ -115,6 +123,7 @@ func (this *QJsonDocument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonDocument constructs the type using only CGO pointers. func newQJsonDocument(h *C.QJsonDocument) *QJsonDocument { if h == nil { return nil @@ -122,32 +131,53 @@ func newQJsonDocument(h *C.QJsonDocument) *QJsonDocument { return &QJsonDocument{h: h} } +// UnsafeNewQJsonDocument constructs the type using only unsafe pointers. func UnsafeNewQJsonDocument(h unsafe.Pointer) *QJsonDocument { - return newQJsonDocument((*C.QJsonDocument)(h)) + if h == nil { + return nil + } + + return &QJsonDocument{h: (*C.QJsonDocument)(h)} } // NewQJsonDocument constructs a new QJsonDocument object. func NewQJsonDocument() *QJsonDocument { - ret := C.QJsonDocument_new() - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new(&outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } // NewQJsonDocument2 constructs a new QJsonDocument object. func NewQJsonDocument2(object *QJsonObject) *QJsonDocument { - ret := C.QJsonDocument_new2(object.cPointer()) - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new2(object.cPointer(), &outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } // NewQJsonDocument3 constructs a new QJsonDocument object. func NewQJsonDocument3(array *QJsonArray) *QJsonDocument { - ret := C.QJsonDocument_new3(array.cPointer()) - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new3(array.cPointer(), &outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } // NewQJsonDocument4 constructs a new QJsonDocument object. func NewQJsonDocument4(other *QJsonDocument) *QJsonDocument { - ret := C.QJsonDocument_new4(other.cPointer()) - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new4(other.cPointer(), &outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } func (this *QJsonDocument) OperatorAssign(other *QJsonDocument) { @@ -322,7 +352,7 @@ func QJsonDocument_FromJson2(json []byte, error *QJsonParseError) *QJsonDocument // Delete this object from C++ memory. func (this *QJsonDocument) Delete() { - C.QJsonDocument_Delete(this.h) + C.QJsonDocument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qjsondocument.h b/qt/gen_qjsondocument.h index bfa9ed66..60dbb1fc 100644 --- a/qt/gen_qjsondocument.h +++ b/qt/gen_qjsondocument.h @@ -33,12 +33,12 @@ typedef struct QVariant QVariant; #endif struct miqt_string QJsonParseError_ErrorString(const QJsonParseError* self); -void QJsonParseError_Delete(QJsonParseError* self); +void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass); -QJsonDocument* QJsonDocument_new(); -QJsonDocument* QJsonDocument_new2(QJsonObject* object); -QJsonDocument* QJsonDocument_new3(QJsonArray* array); -QJsonDocument* QJsonDocument_new4(QJsonDocument* other); +void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument); +void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument); +void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument); +void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument); void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other); void QJsonDocument_Swap(QJsonDocument* self, QJsonDocument* other); QJsonDocument* QJsonDocument_FromRawData(const char* data, int size); @@ -65,7 +65,7 @@ bool QJsonDocument_IsNull(const QJsonDocument* self); QJsonDocument* QJsonDocument_FromRawData3(const char* data, int size, int validation); QJsonDocument* QJsonDocument_FromBinaryData2(struct miqt_string data, int validation); QJsonDocument* QJsonDocument_FromJson2(struct miqt_string json, QJsonParseError* error); -void QJsonDocument_Delete(QJsonDocument* self); +void QJsonDocument_Delete(QJsonDocument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qjsonobject.cpp b/qt/gen_qjsonobject.cpp index 81aa65e9..d17085e0 100644 --- a/qt/gen_qjsonobject.cpp +++ b/qt/gen_qjsonobject.cpp @@ -15,12 +15,14 @@ #include "gen_qjsonobject.h" #include "_cgo_export.h" -QJsonObject* QJsonObject_new() { - return new QJsonObject(); +void QJsonObject_new(QJsonObject** outptr_QJsonObject) { + QJsonObject* ret = new QJsonObject(); + *outptr_QJsonObject = ret; } -QJsonObject* QJsonObject_new2(QJsonObject* other) { - return new QJsonObject(*other); +void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject) { + QJsonObject* ret = new QJsonObject(*other); + *outptr_QJsonObject = ret; } void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other) { @@ -230,20 +232,27 @@ bool QJsonObject_Empty(const QJsonObject* self) { return self->empty(); } -void QJsonObject_Delete(QJsonObject* self) { - delete self; +void QJsonObject_Delete(QJsonObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonObject__iterator* QJsonObject__iterator_new() { - return new QJsonObject::iterator(); +void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator) { + QJsonObject::iterator* ret = new QJsonObject::iterator(); + *outptr_QJsonObject__iterator = ret; } -QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, int index) { - return new QJsonObject::iterator(obj, static_cast(index)); +void QJsonObject__iterator_new2(QJsonObject* obj, int index, QJsonObject__iterator** outptr_QJsonObject__iterator) { + QJsonObject::iterator* ret = new QJsonObject::iterator(obj, static_cast(index)); + *outptr_QJsonObject__iterator = ret; } -QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* param1) { - return new QJsonObject::iterator(*param1); +void QJsonObject__iterator_new3(QJsonObject__iterator* param1, QJsonObject__iterator** outptr_QJsonObject__iterator) { + QJsonObject::iterator* ret = new QJsonObject::iterator(*param1); + *outptr_QJsonObject__iterator = ret; } struct miqt_string QJsonObject__iterator_Key(const QJsonObject__iterator* self) { @@ -365,24 +374,32 @@ bool QJsonObject__iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__it return self->operator>=(*other); } -void QJsonObject__iterator_Delete(QJsonObject__iterator* self) { - delete self; +void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonObject__const_iterator* QJsonObject__const_iterator_new() { - return new QJsonObject::const_iterator(); +void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(); + *outptr_QJsonObject__const_iterator = ret; } -QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, int index) { - return new QJsonObject::const_iterator(obj, static_cast(index)); +void QJsonObject__const_iterator_new2(QJsonObject* obj, int index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(obj, static_cast(index)); + *outptr_QJsonObject__const_iterator = ret; } -QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other) { - return new QJsonObject::const_iterator(*other); +void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*other); + *outptr_QJsonObject__const_iterator = ret; } -QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1) { - return new QJsonObject::const_iterator(*param1); +void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*param1); + *outptr_QJsonObject__const_iterator = ret; } struct miqt_string QJsonObject__const_iterator_Key(const QJsonObject__const_iterator* self) { @@ -504,7 +521,11 @@ bool QJsonObject__const_iterator_OperatorGreaterOrEqualWithOther(const QJsonObje return self->operator>=(*other); } -void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self) { - delete self; +void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qjsonobject.go b/qt/gen_qjsonobject.go index 2db02046..cfb6c2d4 100644 --- a/qt/gen_qjsonobject.go +++ b/qt/gen_qjsonobject.go @@ -14,7 +14,8 @@ import ( ) type QJsonObject struct { - h *C.QJsonObject + h *C.QJsonObject + isSubclass bool } func (this *QJsonObject) cPointer() *C.QJsonObject { @@ -31,6 +32,7 @@ func (this *QJsonObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonObject constructs the type using only CGO pointers. func newQJsonObject(h *C.QJsonObject) *QJsonObject { if h == nil { return nil @@ -38,20 +40,33 @@ func newQJsonObject(h *C.QJsonObject) *QJsonObject { return &QJsonObject{h: h} } +// UnsafeNewQJsonObject constructs the type using only unsafe pointers. func UnsafeNewQJsonObject(h unsafe.Pointer) *QJsonObject { - return newQJsonObject((*C.QJsonObject)(h)) + if h == nil { + return nil + } + + return &QJsonObject{h: (*C.QJsonObject)(h)} } // NewQJsonObject constructs a new QJsonObject object. func NewQJsonObject() *QJsonObject { - ret := C.QJsonObject_new() - return newQJsonObject(ret) + var outptr_QJsonObject *C.QJsonObject = nil + + C.QJsonObject_new(&outptr_QJsonObject) + ret := newQJsonObject(outptr_QJsonObject) + ret.isSubclass = true + return ret } // NewQJsonObject2 constructs a new QJsonObject object. func NewQJsonObject2(other *QJsonObject) *QJsonObject { - ret := C.QJsonObject_new2(other.cPointer()) - return newQJsonObject(ret) + var outptr_QJsonObject *C.QJsonObject = nil + + C.QJsonObject_new2(other.cPointer(), &outptr_QJsonObject) + ret := newQJsonObject(outptr_QJsonObject) + ret.isSubclass = true + return ret } func (this *QJsonObject) OperatorAssign(other *QJsonObject) { @@ -350,7 +365,7 @@ func (this *QJsonObject) Empty() bool { // Delete this object from C++ memory. func (this *QJsonObject) Delete() { - C.QJsonObject_Delete(this.h) + C.QJsonObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -363,7 +378,8 @@ func (this *QJsonObject) GoGC() { } type QJsonObject__iterator struct { - h *C.QJsonObject__iterator + h *C.QJsonObject__iterator + isSubclass bool } func (this *QJsonObject__iterator) cPointer() *C.QJsonObject__iterator { @@ -380,6 +396,7 @@ func (this *QJsonObject__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonObject__iterator constructs the type using only CGO pointers. func newQJsonObject__iterator(h *C.QJsonObject__iterator) *QJsonObject__iterator { if h == nil { return nil @@ -387,26 +404,43 @@ func newQJsonObject__iterator(h *C.QJsonObject__iterator) *QJsonObject__iterator return &QJsonObject__iterator{h: h} } +// UnsafeNewQJsonObject__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__iterator(h unsafe.Pointer) *QJsonObject__iterator { - return newQJsonObject__iterator((*C.QJsonObject__iterator)(h)) + if h == nil { + return nil + } + + return &QJsonObject__iterator{h: (*C.QJsonObject__iterator)(h)} } // NewQJsonObject__iterator constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator() *QJsonObject__iterator { - ret := C.QJsonObject__iterator_new() - return newQJsonObject__iterator(ret) + var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil + + C.QJsonObject__iterator_new(&outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__iterator2 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator2(obj *QJsonObject, index int) *QJsonObject__iterator { - ret := C.QJsonObject__iterator_new2(obj.cPointer(), (C.int)(index)) - return newQJsonObject__iterator(ret) + var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil + + C.QJsonObject__iterator_new2(obj.cPointer(), (C.int)(index), &outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__iterator3 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator3(param1 *QJsonObject__iterator) *QJsonObject__iterator { - ret := C.QJsonObject__iterator_new3(param1.cPointer()) - return newQJsonObject__iterator(ret) + var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil + + C.QJsonObject__iterator_new3(param1.cPointer(), &outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret.isSubclass = true + return ret } func (this *QJsonObject__iterator) Key() string { @@ -542,7 +576,7 @@ func (this *QJsonObject__iterator) OperatorGreaterOrEqualWithOther(other *QJsonO // Delete this object from C++ memory. func (this *QJsonObject__iterator) Delete() { - C.QJsonObject__iterator_Delete(this.h) + C.QJsonObject__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -555,7 +589,8 @@ func (this *QJsonObject__iterator) GoGC() { } type QJsonObject__const_iterator struct { - h *C.QJsonObject__const_iterator + h *C.QJsonObject__const_iterator + isSubclass bool } func (this *QJsonObject__const_iterator) cPointer() *C.QJsonObject__const_iterator { @@ -572,6 +607,7 @@ func (this *QJsonObject__const_iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonObject__const_iterator constructs the type using only CGO pointers. func newQJsonObject__const_iterator(h *C.QJsonObject__const_iterator) *QJsonObject__const_iterator { if h == nil { return nil @@ -579,32 +615,53 @@ func newQJsonObject__const_iterator(h *C.QJsonObject__const_iterator) *QJsonObje return &QJsonObject__const_iterator{h: h} } +// UnsafeNewQJsonObject__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__const_iterator(h unsafe.Pointer) *QJsonObject__const_iterator { - return newQJsonObject__const_iterator((*C.QJsonObject__const_iterator)(h)) + if h == nil { + return nil + } + + return &QJsonObject__const_iterator{h: (*C.QJsonObject__const_iterator)(h)} } // NewQJsonObject__const_iterator constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator() *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new() - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new(&outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__const_iterator2 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator2(obj *QJsonObject, index int) *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.int)(index)) - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.int)(index), &outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__const_iterator3 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator3(other *QJsonObject__iterator) *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new3(other.cPointer()) - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new3(other.cPointer(), &outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__const_iterator4 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator4(param1 *QJsonObject__const_iterator) *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new4(param1.cPointer()) - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new4(param1.cPointer(), &outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } func (this *QJsonObject__const_iterator) Key() string { @@ -740,7 +797,7 @@ func (this *QJsonObject__const_iterator) OperatorGreaterOrEqualWithOther(other * // Delete this object from C++ memory. func (this *QJsonObject__const_iterator) Delete() { - C.QJsonObject__const_iterator_Delete(this.h) + C.QJsonObject__const_iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qjsonobject.h b/qt/gen_qjsonobject.h index 6b903a38..7ad75776 100644 --- a/qt/gen_qjsonobject.h +++ b/qt/gen_qjsonobject.h @@ -42,8 +42,8 @@ typedef struct QJsonValueRefPtr QJsonValueRefPtr; typedef struct QVariant QVariant; #endif -QJsonObject* QJsonObject_new(); -QJsonObject* QJsonObject_new2(QJsonObject* other); +void QJsonObject_new(QJsonObject** outptr_QJsonObject); +void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject); void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other); void QJsonObject_Swap(QJsonObject* self, QJsonObject* other); QJsonObject* QJsonObject_FromVariantMap(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); @@ -75,11 +75,11 @@ QJsonObject__const_iterator* QJsonObject_FindWithKey(const QJsonObject* self, st QJsonObject__const_iterator* QJsonObject_ConstFind(const QJsonObject* self, struct miqt_string key); QJsonObject__iterator* QJsonObject_Insert(QJsonObject* self, struct miqt_string key, QJsonValue* value); bool QJsonObject_Empty(const QJsonObject* self); -void QJsonObject_Delete(QJsonObject* self); +void QJsonObject_Delete(QJsonObject* self, bool isSubclass); -QJsonObject__iterator* QJsonObject__iterator_new(); -QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, int index); -QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* param1); +void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator); +void QJsonObject__iterator_new2(QJsonObject* obj, int index, QJsonObject__iterator** outptr_QJsonObject__iterator); +void QJsonObject__iterator_new3(QJsonObject__iterator* param1, QJsonObject__iterator** outptr_QJsonObject__iterator); struct miqt_string QJsonObject__iterator_Key(const QJsonObject__iterator* self); QJsonValueRef* QJsonObject__iterator_Value(const QJsonObject__iterator* self); QJsonValueRef* QJsonObject__iterator_OperatorMultiply(const QJsonObject__iterator* self); @@ -106,12 +106,12 @@ bool QJsonObject__iterator_OperatorLesserWithOther(const QJsonObject__iterator* bool QJsonObject__iterator_OperatorLesserOrEqualWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); bool QJsonObject__iterator_OperatorGreaterWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); bool QJsonObject__iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); -void QJsonObject__iterator_Delete(QJsonObject__iterator* self); +void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass); -QJsonObject__const_iterator* QJsonObject__const_iterator_new(); -QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, int index); -QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other); -QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1); +void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +void QJsonObject__const_iterator_new2(QJsonObject* obj, int index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); struct miqt_string QJsonObject__const_iterator_Key(const QJsonObject__const_iterator* self); QJsonValue* QJsonObject__const_iterator_Value(const QJsonObject__const_iterator* self); QJsonValue* QJsonObject__const_iterator_OperatorMultiply(const QJsonObject__const_iterator* self); @@ -138,7 +138,7 @@ bool QJsonObject__const_iterator_OperatorLesserWithOther(const QJsonObject__cons bool QJsonObject__const_iterator_OperatorLesserOrEqualWithOther(const QJsonObject__const_iterator* self, QJsonObject__iterator* other); bool QJsonObject__const_iterator_OperatorGreaterWithOther(const QJsonObject__const_iterator* self, QJsonObject__iterator* other); bool QJsonObject__const_iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__const_iterator* self, QJsonObject__iterator* other); -void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self); +void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qjsonvalue.cpp b/qt/gen_qjsonvalue.cpp index 87d54021..0ffa4a30 100644 --- a/qt/gen_qjsonvalue.cpp +++ b/qt/gen_qjsonvalue.cpp @@ -12,49 +12,60 @@ #include "gen_qjsonvalue.h" #include "_cgo_export.h" -QJsonValue* QJsonValue_new() { - return new QJsonValue(); +void QJsonValue_new(QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new2(bool b) { - return new QJsonValue(b); +void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(b); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new3(double n) { - return new QJsonValue(static_cast(n)); +void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(n)); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new4(int n) { - return new QJsonValue(static_cast(n)); +void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(n)); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new5(long long v) { - return new QJsonValue(static_cast(v)); +void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(v)); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new6(struct miqt_string s) { +void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue) { QString s_QString = QString::fromUtf8(s.data, s.len); - return new QJsonValue(s_QString); + QJsonValue* ret = new QJsonValue(s_QString); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new7(const char* s) { - return new QJsonValue(s); +void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(s); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new8(QJsonArray* a) { - return new QJsonValue(*a); +void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(*a); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new9(QJsonObject* o) { - return new QJsonValue(*o); +void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(*o); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new10(QJsonValue* other) { - return new QJsonValue(*other); +void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(*other); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new11(int param1) { - return new QJsonValue(static_cast(param1)); +void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(param1)); + *outptr_QJsonValue = ret; } void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other) { @@ -186,20 +197,27 @@ double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue) { return self->toDouble(static_cast(defaultValue)); } -void QJsonValue_Delete(QJsonValue* self) { - delete self; +void QJsonValue_Delete(QJsonValue* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1) { - return new QJsonValueRef(*param1); +void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef) { + QJsonValueRef* ret = new QJsonValueRef(*param1); + *outptr_QJsonValueRef = ret; } -QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, int idx) { - return new QJsonValueRef(array, static_cast(idx)); +void QJsonValueRef_new2(QJsonArray* array, int idx, QJsonValueRef** outptr_QJsonValueRef) { + QJsonValueRef* ret = new QJsonValueRef(array, static_cast(idx)); + *outptr_QJsonValueRef = ret; } -QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx) { - return new QJsonValueRef(object, static_cast(idx)); +void QJsonValueRef_new3(QJsonObject* object, int idx, QJsonValueRef** outptr_QJsonValueRef) { + QJsonValueRef* ret = new QJsonValueRef(object, static_cast(idx)); + *outptr_QJsonValueRef = ret; } void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val) { @@ -310,16 +328,22 @@ bool QJsonValueRef_OperatorNotEqual(const QJsonValueRef* self, QJsonValue* other return self->operator!=(*other); } -void QJsonValueRef_Delete(QJsonValueRef* self) { - delete self; +void QJsonValueRef_Delete(QJsonValueRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonValuePtr* QJsonValuePtr_new(QJsonValue* val) { - return new QJsonValuePtr(*val); +void QJsonValuePtr_new(QJsonValue* val, QJsonValuePtr** outptr_QJsonValuePtr) { + QJsonValuePtr* ret = new QJsonValuePtr(*val); + *outptr_QJsonValuePtr = ret; } -QJsonValuePtr* QJsonValuePtr_new2(QJsonValuePtr* param1) { - return new QJsonValuePtr(*param1); +void QJsonValuePtr_new2(QJsonValuePtr* param1, QJsonValuePtr** outptr_QJsonValuePtr) { + QJsonValuePtr* ret = new QJsonValuePtr(*param1); + *outptr_QJsonValuePtr = ret; } QJsonValue* QJsonValuePtr_OperatorMultiply(QJsonValuePtr* self) { @@ -336,20 +360,27 @@ void QJsonValuePtr_OperatorAssign(QJsonValuePtr* self, QJsonValuePtr* param1) { self->operator=(*param1); } -void QJsonValuePtr_Delete(QJsonValuePtr* self) { - delete self; +void QJsonValuePtr_Delete(QJsonValuePtr* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonValueRefPtr* QJsonValueRefPtr_new(QJsonArray* array, int idx) { - return new QJsonValueRefPtr(array, static_cast(idx)); +void QJsonValueRefPtr_new(QJsonArray* array, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr) { + QJsonValueRefPtr* ret = new QJsonValueRefPtr(array, static_cast(idx)); + *outptr_QJsonValueRefPtr = ret; } -QJsonValueRefPtr* QJsonValueRefPtr_new2(QJsonObject* object, int idx) { - return new QJsonValueRefPtr(object, static_cast(idx)); +void QJsonValueRefPtr_new2(QJsonObject* object, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr) { + QJsonValueRefPtr* ret = new QJsonValueRefPtr(object, static_cast(idx)); + *outptr_QJsonValueRefPtr = ret; } -QJsonValueRefPtr* QJsonValueRefPtr_new3(QJsonValueRefPtr* param1) { - return new QJsonValueRefPtr(*param1); +void QJsonValueRefPtr_new3(QJsonValueRefPtr* param1, QJsonValueRefPtr** outptr_QJsonValueRefPtr) { + QJsonValueRefPtr* ret = new QJsonValueRefPtr(*param1); + *outptr_QJsonValueRefPtr = ret; } QJsonValueRef* QJsonValueRefPtr_OperatorMultiply(QJsonValueRefPtr* self) { @@ -366,7 +397,11 @@ void QJsonValueRefPtr_OperatorAssign(QJsonValueRefPtr* self, QJsonValueRefPtr* p self->operator=(*param1); } -void QJsonValueRefPtr_Delete(QJsonValueRefPtr* self) { - delete self; +void QJsonValueRefPtr_Delete(QJsonValueRefPtr* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qjsonvalue.go b/qt/gen_qjsonvalue.go index fa4d552f..ae584ed3 100644 --- a/qt/gen_qjsonvalue.go +++ b/qt/gen_qjsonvalue.go @@ -26,7 +26,8 @@ const ( ) type QJsonValue struct { - h *C.QJsonValue + h *C.QJsonValue + isSubclass bool } func (this *QJsonValue) cPointer() *C.QJsonValue { @@ -43,6 +44,7 @@ func (this *QJsonValue) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonValue constructs the type using only CGO pointers. func newQJsonValue(h *C.QJsonValue) *QJsonValue { if h == nil { return nil @@ -50,38 +52,63 @@ func newQJsonValue(h *C.QJsonValue) *QJsonValue { return &QJsonValue{h: h} } +// UnsafeNewQJsonValue constructs the type using only unsafe pointers. func UnsafeNewQJsonValue(h unsafe.Pointer) *QJsonValue { - return newQJsonValue((*C.QJsonValue)(h)) + if h == nil { + return nil + } + + return &QJsonValue{h: (*C.QJsonValue)(h)} } // NewQJsonValue constructs a new QJsonValue object. func NewQJsonValue() *QJsonValue { - ret := C.QJsonValue_new() - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new(&outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue2 constructs a new QJsonValue object. func NewQJsonValue2(b bool) *QJsonValue { - ret := C.QJsonValue_new2((C.bool)(b)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new2((C.bool)(b), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue3 constructs a new QJsonValue object. func NewQJsonValue3(n float64) *QJsonValue { - ret := C.QJsonValue_new3((C.double)(n)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new3((C.double)(n), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue4 constructs a new QJsonValue object. func NewQJsonValue4(n int) *QJsonValue { - ret := C.QJsonValue_new4((C.int)(n)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new4((C.int)(n), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue5 constructs a new QJsonValue object. func NewQJsonValue5(v int64) *QJsonValue { - ret := C.QJsonValue_new5((C.longlong)(v)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new5((C.longlong)(v), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue6 constructs a new QJsonValue object. @@ -90,40 +117,64 @@ func NewQJsonValue6(s string) *QJsonValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - ret := C.QJsonValue_new6(s_ms) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new6(s_ms, &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue7 constructs a new QJsonValue object. func NewQJsonValue7(s string) *QJsonValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - ret := C.QJsonValue_new7(s_Cstring) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new7(s_Cstring, &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue8 constructs a new QJsonValue object. func NewQJsonValue8(a *QJsonArray) *QJsonValue { - ret := C.QJsonValue_new8(a.cPointer()) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new8(a.cPointer(), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue9 constructs a new QJsonValue object. func NewQJsonValue9(o *QJsonObject) *QJsonValue { - ret := C.QJsonValue_new9(o.cPointer()) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new9(o.cPointer(), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue10 constructs a new QJsonValue object. func NewQJsonValue10(other *QJsonValue) *QJsonValue { - ret := C.QJsonValue_new10(other.cPointer()) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new10(other.cPointer(), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue11 constructs a new QJsonValue object. func NewQJsonValue11(param1 QJsonValue__Type) *QJsonValue { - ret := C.QJsonValue_new11((C.int)(param1)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new11((C.int)(param1), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } func (this *QJsonValue) OperatorAssign(other *QJsonValue) { @@ -278,7 +329,7 @@ func (this *QJsonValue) ToDouble1(defaultValue float64) float64 { // Delete this object from C++ memory. func (this *QJsonValue) Delete() { - C.QJsonValue_Delete(this.h) + C.QJsonValue_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -291,7 +342,8 @@ func (this *QJsonValue) GoGC() { } type QJsonValueRef struct { - h *C.QJsonValueRef + h *C.QJsonValueRef + isSubclass bool } func (this *QJsonValueRef) cPointer() *C.QJsonValueRef { @@ -308,6 +360,7 @@ func (this *QJsonValueRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonValueRef constructs the type using only CGO pointers. func newQJsonValueRef(h *C.QJsonValueRef) *QJsonValueRef { if h == nil { return nil @@ -315,26 +368,43 @@ func newQJsonValueRef(h *C.QJsonValueRef) *QJsonValueRef { return &QJsonValueRef{h: h} } +// UnsafeNewQJsonValueRef constructs the type using only unsafe pointers. func UnsafeNewQJsonValueRef(h unsafe.Pointer) *QJsonValueRef { - return newQJsonValueRef((*C.QJsonValueRef)(h)) + if h == nil { + return nil + } + + return &QJsonValueRef{h: (*C.QJsonValueRef)(h)} } // NewQJsonValueRef constructs a new QJsonValueRef object. func NewQJsonValueRef(param1 *QJsonValueRef) *QJsonValueRef { - ret := C.QJsonValueRef_new(param1.cPointer()) - return newQJsonValueRef(ret) + var outptr_QJsonValueRef *C.QJsonValueRef = nil + + C.QJsonValueRef_new(param1.cPointer(), &outptr_QJsonValueRef) + ret := newQJsonValueRef(outptr_QJsonValueRef) + ret.isSubclass = true + return ret } // NewQJsonValueRef2 constructs a new QJsonValueRef object. func NewQJsonValueRef2(array *QJsonArray, idx int) *QJsonValueRef { - ret := C.QJsonValueRef_new2(array.cPointer(), (C.int)(idx)) - return newQJsonValueRef(ret) + var outptr_QJsonValueRef *C.QJsonValueRef = nil + + C.QJsonValueRef_new2(array.cPointer(), (C.int)(idx), &outptr_QJsonValueRef) + ret := newQJsonValueRef(outptr_QJsonValueRef) + ret.isSubclass = true + return ret } // NewQJsonValueRef3 constructs a new QJsonValueRef object. func NewQJsonValueRef3(object *QJsonObject, idx int) *QJsonValueRef { - ret := C.QJsonValueRef_new3(object.cPointer(), (C.int)(idx)) - return newQJsonValueRef(ret) + var outptr_QJsonValueRef *C.QJsonValueRef = nil + + C.QJsonValueRef_new3(object.cPointer(), (C.int)(idx), &outptr_QJsonValueRef) + ret := newQJsonValueRef(outptr_QJsonValueRef) + ret.isSubclass = true + return ret } func (this *QJsonValueRef) OperatorAssign(val *QJsonValue) { @@ -450,7 +520,7 @@ func (this *QJsonValueRef) OperatorNotEqual(other *QJsonValue) bool { // Delete this object from C++ memory. func (this *QJsonValueRef) Delete() { - C.QJsonValueRef_Delete(this.h) + C.QJsonValueRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -463,7 +533,8 @@ func (this *QJsonValueRef) GoGC() { } type QJsonValuePtr struct { - h *C.QJsonValuePtr + h *C.QJsonValuePtr + isSubclass bool } func (this *QJsonValuePtr) cPointer() *C.QJsonValuePtr { @@ -480,6 +551,7 @@ func (this *QJsonValuePtr) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonValuePtr constructs the type using only CGO pointers. func newQJsonValuePtr(h *C.QJsonValuePtr) *QJsonValuePtr { if h == nil { return nil @@ -487,20 +559,33 @@ func newQJsonValuePtr(h *C.QJsonValuePtr) *QJsonValuePtr { return &QJsonValuePtr{h: h} } +// UnsafeNewQJsonValuePtr constructs the type using only unsafe pointers. func UnsafeNewQJsonValuePtr(h unsafe.Pointer) *QJsonValuePtr { - return newQJsonValuePtr((*C.QJsonValuePtr)(h)) + if h == nil { + return nil + } + + return &QJsonValuePtr{h: (*C.QJsonValuePtr)(h)} } // NewQJsonValuePtr constructs a new QJsonValuePtr object. func NewQJsonValuePtr(val *QJsonValue) *QJsonValuePtr { - ret := C.QJsonValuePtr_new(val.cPointer()) - return newQJsonValuePtr(ret) + var outptr_QJsonValuePtr *C.QJsonValuePtr = nil + + C.QJsonValuePtr_new(val.cPointer(), &outptr_QJsonValuePtr) + ret := newQJsonValuePtr(outptr_QJsonValuePtr) + ret.isSubclass = true + return ret } // NewQJsonValuePtr2 constructs a new QJsonValuePtr object. func NewQJsonValuePtr2(param1 *QJsonValuePtr) *QJsonValuePtr { - ret := C.QJsonValuePtr_new2(param1.cPointer()) - return newQJsonValuePtr(ret) + var outptr_QJsonValuePtr *C.QJsonValuePtr = nil + + C.QJsonValuePtr_new2(param1.cPointer(), &outptr_QJsonValuePtr) + ret := newQJsonValuePtr(outptr_QJsonValuePtr) + ret.isSubclass = true + return ret } func (this *QJsonValuePtr) OperatorMultiply() *QJsonValue { @@ -517,7 +602,7 @@ func (this *QJsonValuePtr) OperatorAssign(param1 *QJsonValuePtr) { // Delete this object from C++ memory. func (this *QJsonValuePtr) Delete() { - C.QJsonValuePtr_Delete(this.h) + C.QJsonValuePtr_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -530,7 +615,8 @@ func (this *QJsonValuePtr) GoGC() { } type QJsonValueRefPtr struct { - h *C.QJsonValueRefPtr + h *C.QJsonValueRefPtr + isSubclass bool } func (this *QJsonValueRefPtr) cPointer() *C.QJsonValueRefPtr { @@ -547,6 +633,7 @@ func (this *QJsonValueRefPtr) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonValueRefPtr constructs the type using only CGO pointers. func newQJsonValueRefPtr(h *C.QJsonValueRefPtr) *QJsonValueRefPtr { if h == nil { return nil @@ -554,26 +641,43 @@ func newQJsonValueRefPtr(h *C.QJsonValueRefPtr) *QJsonValueRefPtr { return &QJsonValueRefPtr{h: h} } +// UnsafeNewQJsonValueRefPtr constructs the type using only unsafe pointers. func UnsafeNewQJsonValueRefPtr(h unsafe.Pointer) *QJsonValueRefPtr { - return newQJsonValueRefPtr((*C.QJsonValueRefPtr)(h)) + if h == nil { + return nil + } + + return &QJsonValueRefPtr{h: (*C.QJsonValueRefPtr)(h)} } // NewQJsonValueRefPtr constructs a new QJsonValueRefPtr object. func NewQJsonValueRefPtr(array *QJsonArray, idx int) *QJsonValueRefPtr { - ret := C.QJsonValueRefPtr_new(array.cPointer(), (C.int)(idx)) - return newQJsonValueRefPtr(ret) + var outptr_QJsonValueRefPtr *C.QJsonValueRefPtr = nil + + C.QJsonValueRefPtr_new(array.cPointer(), (C.int)(idx), &outptr_QJsonValueRefPtr) + ret := newQJsonValueRefPtr(outptr_QJsonValueRefPtr) + ret.isSubclass = true + return ret } // NewQJsonValueRefPtr2 constructs a new QJsonValueRefPtr object. func NewQJsonValueRefPtr2(object *QJsonObject, idx int) *QJsonValueRefPtr { - ret := C.QJsonValueRefPtr_new2(object.cPointer(), (C.int)(idx)) - return newQJsonValueRefPtr(ret) + var outptr_QJsonValueRefPtr *C.QJsonValueRefPtr = nil + + C.QJsonValueRefPtr_new2(object.cPointer(), (C.int)(idx), &outptr_QJsonValueRefPtr) + ret := newQJsonValueRefPtr(outptr_QJsonValueRefPtr) + ret.isSubclass = true + return ret } // NewQJsonValueRefPtr3 constructs a new QJsonValueRefPtr object. func NewQJsonValueRefPtr3(param1 *QJsonValueRefPtr) *QJsonValueRefPtr { - ret := C.QJsonValueRefPtr_new3(param1.cPointer()) - return newQJsonValueRefPtr(ret) + var outptr_QJsonValueRefPtr *C.QJsonValueRefPtr = nil + + C.QJsonValueRefPtr_new3(param1.cPointer(), &outptr_QJsonValueRefPtr) + ret := newQJsonValueRefPtr(outptr_QJsonValueRefPtr) + ret.isSubclass = true + return ret } func (this *QJsonValueRefPtr) OperatorMultiply() *QJsonValueRef { @@ -590,7 +694,7 @@ func (this *QJsonValueRefPtr) OperatorAssign(param1 *QJsonValueRefPtr) { // Delete this object from C++ memory. func (this *QJsonValueRefPtr) Delete() { - C.QJsonValueRefPtr_Delete(this.h) + C.QJsonValueRefPtr_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qjsonvalue.h b/qt/gen_qjsonvalue.h index c4225e30..df2714da 100644 --- a/qt/gen_qjsonvalue.h +++ b/qt/gen_qjsonvalue.h @@ -32,17 +32,17 @@ typedef struct QJsonValueRefPtr QJsonValueRefPtr; typedef struct QVariant QVariant; #endif -QJsonValue* QJsonValue_new(); -QJsonValue* QJsonValue_new2(bool b); -QJsonValue* QJsonValue_new3(double n); -QJsonValue* QJsonValue_new4(int n); -QJsonValue* QJsonValue_new5(long long v); -QJsonValue* QJsonValue_new6(struct miqt_string s); -QJsonValue* QJsonValue_new7(const char* s); -QJsonValue* QJsonValue_new8(QJsonArray* a); -QJsonValue* QJsonValue_new9(QJsonObject* o); -QJsonValue* QJsonValue_new10(QJsonValue* other); -QJsonValue* QJsonValue_new11(int param1); +void QJsonValue_new(QJsonValue** outptr_QJsonValue); +void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue); +void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue); +void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue); +void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue); +void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue); +void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue); +void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue); +void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue); +void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue); +void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue); void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other); void QJsonValue_Swap(QJsonValue* self, QJsonValue* other); QJsonValue* QJsonValue_FromVariant(QVariant* variant); @@ -71,11 +71,11 @@ bool QJsonValue_OperatorNotEqual(const QJsonValue* self, QJsonValue* other); bool QJsonValue_ToBool1(const QJsonValue* self, bool defaultValue); int QJsonValue_ToInt1(const QJsonValue* self, int defaultValue); double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue); -void QJsonValue_Delete(QJsonValue* self); +void QJsonValue_Delete(QJsonValue* self, bool isSubclass); -QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1); -QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, int idx); -QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx); +void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef); +void QJsonValueRef_new2(QJsonArray* array, int idx, QJsonValueRef** outptr_QJsonValueRef); +void QJsonValueRef_new3(QJsonObject* object, int idx, QJsonValueRef** outptr_QJsonValueRef); void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val); void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val); QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self); @@ -99,22 +99,22 @@ double QJsonValueRef_ToDoubleWithDefaultValue(const QJsonValueRef* self, double struct miqt_string QJsonValueRef_ToStringWithDefaultValue(const QJsonValueRef* self, struct miqt_string defaultValue); bool QJsonValueRef_OperatorEqual(const QJsonValueRef* self, QJsonValue* other); bool QJsonValueRef_OperatorNotEqual(const QJsonValueRef* self, QJsonValue* other); -void QJsonValueRef_Delete(QJsonValueRef* self); +void QJsonValueRef_Delete(QJsonValueRef* self, bool isSubclass); -QJsonValuePtr* QJsonValuePtr_new(QJsonValue* val); -QJsonValuePtr* QJsonValuePtr_new2(QJsonValuePtr* param1); +void QJsonValuePtr_new(QJsonValue* val, QJsonValuePtr** outptr_QJsonValuePtr); +void QJsonValuePtr_new2(QJsonValuePtr* param1, QJsonValuePtr** outptr_QJsonValuePtr); QJsonValue* QJsonValuePtr_OperatorMultiply(QJsonValuePtr* self); QJsonValue* QJsonValuePtr_OperatorMinusGreater(QJsonValuePtr* self); void QJsonValuePtr_OperatorAssign(QJsonValuePtr* self, QJsonValuePtr* param1); -void QJsonValuePtr_Delete(QJsonValuePtr* self); +void QJsonValuePtr_Delete(QJsonValuePtr* self, bool isSubclass); -QJsonValueRefPtr* QJsonValueRefPtr_new(QJsonArray* array, int idx); -QJsonValueRefPtr* QJsonValueRefPtr_new2(QJsonObject* object, int idx); -QJsonValueRefPtr* QJsonValueRefPtr_new3(QJsonValueRefPtr* param1); +void QJsonValueRefPtr_new(QJsonArray* array, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr); +void QJsonValueRefPtr_new2(QJsonObject* object, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr); +void QJsonValueRefPtr_new3(QJsonValueRefPtr* param1, QJsonValueRefPtr** outptr_QJsonValueRefPtr); QJsonValueRef* QJsonValueRefPtr_OperatorMultiply(QJsonValueRefPtr* self); QJsonValueRef* QJsonValueRefPtr_OperatorMinusGreater(QJsonValueRefPtr* self); void QJsonValueRefPtr_OperatorAssign(QJsonValueRefPtr* self, QJsonValueRefPtr* param1); -void QJsonValueRefPtr_Delete(QJsonValueRefPtr* self); +void QJsonValueRefPtr_Delete(QJsonValueRefPtr* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qkeyeventtransition.cpp b/qt/gen_qkeyeventtransition.cpp index b984b6d9..5dbe3d1a 100644 --- a/qt/gen_qkeyeventtransition.cpp +++ b/qt/gen_qkeyeventtransition.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -9,20 +12,118 @@ #include "gen_qkeyeventtransition.h" #include "_cgo_export.h" -QKeyEventTransition* QKeyEventTransition_new() { - return new QKeyEventTransition(); +class MiqtVirtualQKeyEventTransition : public virtual QKeyEventTransition { +public: + + MiqtVirtualQKeyEventTransition(): QKeyEventTransition() {}; + MiqtVirtualQKeyEventTransition(QObject* object, QEvent::Type typeVal, int key): QKeyEventTransition(object, typeVal, key) {}; + MiqtVirtualQKeyEventTransition(QState* sourceState): QKeyEventTransition(sourceState) {}; + MiqtVirtualQKeyEventTransition(QObject* object, QEvent::Type typeVal, int key, QState* sourceState): QKeyEventTransition(object, typeVal, key, sourceState) {}; + + virtual ~MiqtVirtualQKeyEventTransition() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnTransition = 0; + + // Subclass to allow providing a Go implementation + virtual void onTransition(QEvent* event) override { + if (handle__OnTransition == 0) { + QKeyEventTransition::onTransition(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QKeyEventTransition_OnTransition(this, handle__OnTransition, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnTransition(QEvent* event) { + + QKeyEventTransition::onTransition(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventTest = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventTest(QEvent* event) override { + if (handle__EventTest == 0) { + return QKeyEventTransition::eventTest(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QKeyEventTransition_EventTest(this, handle__EventTest, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventTest(QEvent* event) { + + return QKeyEventTransition::eventTest(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QKeyEventTransition::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QKeyEventTransition_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QKeyEventTransition::event(e); + + } + +}; + +void QKeyEventTransition_new(QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(); + *outptr_QKeyEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QKeyEventTransition* QKeyEventTransition_new2(QObject* object, int typeVal, int key) { - return new QKeyEventTransition(object, static_cast(typeVal), static_cast(key)); +void QKeyEventTransition_new2(QObject* object, int typeVal, int key, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(object, static_cast(typeVal), static_cast(key)); + *outptr_QKeyEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QKeyEventTransition* QKeyEventTransition_new3(QState* sourceState) { - return new QKeyEventTransition(sourceState); +void QKeyEventTransition_new3(QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(sourceState); + *outptr_QKeyEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QKeyEventTransition* QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState) { - return new QKeyEventTransition(object, static_cast(typeVal), static_cast(key), sourceState); +void QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(object, static_cast(typeVal), static_cast(key), sourceState); + *outptr_QKeyEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QKeyEventTransition_MetaObject(const QKeyEventTransition* self) { @@ -116,7 +217,35 @@ struct miqt_string QKeyEventTransition_TrUtf83(const char* s, const char* c, int return _ms; } -void QKeyEventTransition_Delete(QKeyEventTransition* self) { - delete self; +void QKeyEventTransition_override_virtual_OnTransition(void* self, intptr_t slot) { + dynamic_cast( (QKeyEventTransition*)(self) )->handle__OnTransition = slot; +} + +void QKeyEventTransition_virtualbase_OnTransition(void* self, QEvent* event) { + ( (MiqtVirtualQKeyEventTransition*)(self) )->virtualbase_OnTransition(event); +} + +void QKeyEventTransition_override_virtual_EventTest(void* self, intptr_t slot) { + dynamic_cast( (QKeyEventTransition*)(self) )->handle__EventTest = slot; +} + +bool QKeyEventTransition_virtualbase_EventTest(void* self, QEvent* event) { + return ( (MiqtVirtualQKeyEventTransition*)(self) )->virtualbase_EventTest(event); +} + +void QKeyEventTransition_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QKeyEventTransition*)(self) )->handle__Event = slot; +} + +bool QKeyEventTransition_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQKeyEventTransition*)(self) )->virtualbase_Event(e); +} + +void QKeyEventTransition_Delete(QKeyEventTransition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qkeyeventtransition.go b/qt/gen_qkeyeventtransition.go index e5038252..dccfeabd 100644 --- a/qt/gen_qkeyeventtransition.go +++ b/qt/gen_qkeyeventtransition.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QKeyEventTransition struct { - h *C.QKeyEventTransition + h *C.QKeyEventTransition + isSubclass bool *QEventTransition } @@ -32,39 +34,75 @@ func (this *QKeyEventTransition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQKeyEventTransition(h *C.QKeyEventTransition) *QKeyEventTransition { +// newQKeyEventTransition constructs the type using only CGO pointers. +func newQKeyEventTransition(h *C.QKeyEventTransition, h_QEventTransition *C.QEventTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QKeyEventTransition { if h == nil { return nil } - return &QKeyEventTransition{h: h, QEventTransition: UnsafeNewQEventTransition(unsafe.Pointer(h))} + return &QKeyEventTransition{h: h, + QEventTransition: newQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} } -func UnsafeNewQKeyEventTransition(h unsafe.Pointer) *QKeyEventTransition { - return newQKeyEventTransition((*C.QKeyEventTransition)(h)) +// UnsafeNewQKeyEventTransition constructs the type using only unsafe pointers. +func UnsafeNewQKeyEventTransition(h unsafe.Pointer, h_QEventTransition unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QKeyEventTransition { + if h == nil { + return nil + } + + return &QKeyEventTransition{h: (*C.QKeyEventTransition)(h), + QEventTransition: UnsafeNewQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} } // NewQKeyEventTransition constructs a new QKeyEventTransition object. func NewQKeyEventTransition() *QKeyEventTransition { - ret := C.QKeyEventTransition_new() - return newQKeyEventTransition(ret) + var outptr_QKeyEventTransition *C.QKeyEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QKeyEventTransition_new(&outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQKeyEventTransition2 constructs a new QKeyEventTransition object. func NewQKeyEventTransition2(object *QObject, typeVal QEvent__Type, key int) *QKeyEventTransition { - ret := C.QKeyEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(key)) - return newQKeyEventTransition(ret) + var outptr_QKeyEventTransition *C.QKeyEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QKeyEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(key), &outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQKeyEventTransition3 constructs a new QKeyEventTransition object. func NewQKeyEventTransition3(sourceState *QState) *QKeyEventTransition { - ret := C.QKeyEventTransition_new3(sourceState.cPointer()) - return newQKeyEventTransition(ret) + var outptr_QKeyEventTransition *C.QKeyEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QKeyEventTransition_new3(sourceState.cPointer(), &outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQKeyEventTransition4 constructs a new QKeyEventTransition object. func NewQKeyEventTransition4(object *QObject, typeVal QEvent__Type, key int, sourceState *QState) *QKeyEventTransition { - ret := C.QKeyEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(key), sourceState.cPointer()) - return newQKeyEventTransition(ret) + var outptr_QKeyEventTransition *C.QKeyEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QKeyEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(key), sourceState.cPointer(), &outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QKeyEventTransition) MetaObject() *QMetaObject { @@ -155,9 +193,82 @@ func QKeyEventTransition_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QKeyEventTransition) callVirtualBase_OnTransition(event *QEvent) { + + C.QKeyEventTransition_virtualbase_OnTransition(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeyEventTransition) OnOnTransition(slot func(super func(event *QEvent), event *QEvent)) { + C.QKeyEventTransition_override_virtual_OnTransition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeyEventTransition_OnTransition +func miqt_exec_callback_QKeyEventTransition_OnTransition(self *C.QKeyEventTransition, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QKeyEventTransition{h: self}).callVirtualBase_OnTransition, slotval1) + +} + +func (this *QKeyEventTransition) callVirtualBase_EventTest(event *QEvent) bool { + + return (bool)(C.QKeyEventTransition_virtualbase_EventTest(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QKeyEventTransition) OnEventTest(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QKeyEventTransition_override_virtual_EventTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeyEventTransition_EventTest +func miqt_exec_callback_QKeyEventTransition_EventTest(self *C.QKeyEventTransition, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QKeyEventTransition{h: self}).callVirtualBase_EventTest, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeyEventTransition) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QKeyEventTransition_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QKeyEventTransition) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QKeyEventTransition_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeyEventTransition_Event +func miqt_exec_callback_QKeyEventTransition_Event(self *C.QKeyEventTransition, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QKeyEventTransition{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QKeyEventTransition) Delete() { - C.QKeyEventTransition_Delete(this.h) + C.QKeyEventTransition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qkeyeventtransition.h b/qt/gen_qkeyeventtransition.h index e5011a7a..f9282752 100644 --- a/qt/gen_qkeyeventtransition.h +++ b/qt/gen_qkeyeventtransition.h @@ -15,21 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractTransition; +class QEvent; +class QEventTransition; class QKeyEventTransition; class QMetaObject; class QObject; class QState; #else +typedef struct QAbstractTransition QAbstractTransition; +typedef struct QEvent QEvent; +typedef struct QEventTransition QEventTransition; typedef struct QKeyEventTransition QKeyEventTransition; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QState QState; #endif -QKeyEventTransition* QKeyEventTransition_new(); -QKeyEventTransition* QKeyEventTransition_new2(QObject* object, int typeVal, int key); -QKeyEventTransition* QKeyEventTransition_new3(QState* sourceState); -QKeyEventTransition* QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState); +void QKeyEventTransition_new(QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QKeyEventTransition_new2(QObject* object, int typeVal, int key, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QKeyEventTransition_new3(QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); QMetaObject* QKeyEventTransition_MetaObject(const QKeyEventTransition* self); void* QKeyEventTransition_Metacast(QKeyEventTransition* self, const char* param1); struct miqt_string QKeyEventTransition_Tr(const char* s); @@ -38,11 +44,19 @@ int QKeyEventTransition_Key(const QKeyEventTransition* self); void QKeyEventTransition_SetKey(QKeyEventTransition* self, int key); int QKeyEventTransition_ModifierMask(const QKeyEventTransition* self); void QKeyEventTransition_SetModifierMask(QKeyEventTransition* self, int modifiers); +void QKeyEventTransition_OnTransition(QKeyEventTransition* self, QEvent* event); +bool QKeyEventTransition_EventTest(QKeyEventTransition* self, QEvent* event); struct miqt_string QKeyEventTransition_Tr2(const char* s, const char* c); struct miqt_string QKeyEventTransition_Tr3(const char* s, const char* c, int n); struct miqt_string QKeyEventTransition_TrUtf82(const char* s, const char* c); struct miqt_string QKeyEventTransition_TrUtf83(const char* s, const char* c, int n); -void QKeyEventTransition_Delete(QKeyEventTransition* self); +void QKeyEventTransition_override_virtual_OnTransition(void* self, intptr_t slot); +void QKeyEventTransition_virtualbase_OnTransition(void* self, QEvent* event); +void QKeyEventTransition_override_virtual_EventTest(void* self, intptr_t slot); +bool QKeyEventTransition_virtualbase_EventTest(void* self, QEvent* event); +void QKeyEventTransition_override_virtual_Event(void* self, intptr_t slot); +bool QKeyEventTransition_virtualbase_Event(void* self, QEvent* e); +void QKeyEventTransition_Delete(QKeyEventTransition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qkeysequence.cpp b/qt/gen_qkeysequence.cpp index 359cd818..f8a75cce 100644 --- a/qt/gen_qkeysequence.cpp +++ b/qt/gen_qkeysequence.cpp @@ -7,42 +7,51 @@ #include "gen_qkeysequence.h" #include "_cgo_export.h" -QKeySequence* QKeySequence_new() { - return new QKeySequence(); +void QKeySequence_new(QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new2(struct miqt_string key) { +void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QKeySequence(key_QString); + QKeySequence* ret = new QKeySequence(key_QString); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new3(int k1) { - return new QKeySequence(static_cast(k1)); +void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new4(QKeySequence* ks) { - return new QKeySequence(*ks); +void QKeySequence_new4(QKeySequence* ks, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(*ks); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new5(int key) { - return new QKeySequence(static_cast(key)); +void QKeySequence_new5(int key, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(key)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new6(struct miqt_string key, int format) { +void QKeySequence_new6(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QKeySequence(key_QString, static_cast(format)); + QKeySequence* ret = new QKeySequence(key_QString, static_cast(format)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new7(int k1, int k2) { - return new QKeySequence(static_cast(k1), static_cast(k2)); +void QKeySequence_new7(int k1, int k2, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new8(int k1, int k2, int k3) { - return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); +void QKeySequence_new8(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new9(int k1, int k2, int k3, int k4) { - return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); +void QKeySequence_new9(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); + *outptr_QKeySequence = ret; } int QKeySequence_Count(const QKeySequence* self) { @@ -210,7 +219,11 @@ struct miqt_string QKeySequence_ListToString2(struct miqt_array /* of QKeySequen return _ms; } -void QKeySequence_Delete(QKeySequence* self) { - delete self; +void QKeySequence_Delete(QKeySequence* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qkeysequence.go b/qt/gen_qkeysequence.go index abd4d2dc..0f9f862d 100644 --- a/qt/gen_qkeysequence.go +++ b/qt/gen_qkeysequence.go @@ -105,7 +105,8 @@ const ( ) type QKeySequence struct { - h *C.QKeySequence + h *C.QKeySequence + isSubclass bool } func (this *QKeySequence) cPointer() *C.QKeySequence { @@ -122,6 +123,7 @@ func (this *QKeySequence) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQKeySequence constructs the type using only CGO pointers. func newQKeySequence(h *C.QKeySequence) *QKeySequence { if h == nil { return nil @@ -129,14 +131,23 @@ func newQKeySequence(h *C.QKeySequence) *QKeySequence { return &QKeySequence{h: h} } +// UnsafeNewQKeySequence constructs the type using only unsafe pointers. func UnsafeNewQKeySequence(h unsafe.Pointer) *QKeySequence { - return newQKeySequence((*C.QKeySequence)(h)) + if h == nil { + return nil + } + + return &QKeySequence{h: (*C.QKeySequence)(h)} } // NewQKeySequence constructs a new QKeySequence object. func NewQKeySequence() *QKeySequence { - ret := C.QKeySequence_new() - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new(&outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence2 constructs a new QKeySequence object. @@ -145,26 +156,42 @@ func NewQKeySequence2(key string) *QKeySequence { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QKeySequence_new2(key_ms) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new2(key_ms, &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence3 constructs a new QKeySequence object. func NewQKeySequence3(k1 int) *QKeySequence { - ret := C.QKeySequence_new3((C.int)(k1)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new3((C.int)(k1), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence4 constructs a new QKeySequence object. func NewQKeySequence4(ks *QKeySequence) *QKeySequence { - ret := C.QKeySequence_new4(ks.cPointer()) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new4(ks.cPointer(), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence5 constructs a new QKeySequence object. func NewQKeySequence5(key QKeySequence__StandardKey) *QKeySequence { - ret := C.QKeySequence_new5((C.int)(key)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new5((C.int)(key), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence6 constructs a new QKeySequence object. @@ -173,26 +200,42 @@ func NewQKeySequence6(key string, format QKeySequence__SequenceFormat) *QKeySequ key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QKeySequence_new6(key_ms, (C.int)(format)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new6(key_ms, (C.int)(format), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence7 constructs a new QKeySequence object. func NewQKeySequence7(k1 int, k2 int) *QKeySequence { - ret := C.QKeySequence_new7((C.int)(k1), (C.int)(k2)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new7((C.int)(k1), (C.int)(k2), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence8 constructs a new QKeySequence object. func NewQKeySequence8(k1 int, k2 int, k3 int) *QKeySequence { - ret := C.QKeySequence_new8((C.int)(k1), (C.int)(k2), (C.int)(k3)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new8((C.int)(k1), (C.int)(k2), (C.int)(k3), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence9 constructs a new QKeySequence object. func NewQKeySequence9(k1 int, k2 int, k3 int, k4 int) *QKeySequence { - ret := C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } func (this *QKeySequence) Count() int { @@ -369,7 +412,7 @@ func QKeySequence_ListToString2(list []QKeySequence, format QKeySequence__Sequen // Delete this object from C++ memory. func (this *QKeySequence) Delete() { - C.QKeySequence_Delete(this.h) + C.QKeySequence_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qkeysequence.h b/qt/gen_qkeysequence.h index 77b3e169..830c6e2d 100644 --- a/qt/gen_qkeysequence.h +++ b/qt/gen_qkeysequence.h @@ -20,15 +20,15 @@ class QKeySequence; typedef struct QKeySequence QKeySequence; #endif -QKeySequence* QKeySequence_new(); -QKeySequence* QKeySequence_new2(struct miqt_string key); -QKeySequence* QKeySequence_new3(int k1); -QKeySequence* QKeySequence_new4(QKeySequence* ks); -QKeySequence* QKeySequence_new5(int key); -QKeySequence* QKeySequence_new6(struct miqt_string key, int format); -QKeySequence* QKeySequence_new7(int k1, int k2); -QKeySequence* QKeySequence_new8(int k1, int k2, int k3); -QKeySequence* QKeySequence_new9(int k1, int k2, int k3, int k4); +void QKeySequence_new(QKeySequence** outptr_QKeySequence); +void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence); +void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence); +void QKeySequence_new4(QKeySequence* ks, QKeySequence** outptr_QKeySequence); +void QKeySequence_new5(int key, QKeySequence** outptr_QKeySequence); +void QKeySequence_new6(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence); +void QKeySequence_new7(int k1, int k2, QKeySequence** outptr_QKeySequence); +void QKeySequence_new8(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence); +void QKeySequence_new9(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence); int QKeySequence_Count(const QKeySequence* self); bool QKeySequence_IsEmpty(const QKeySequence* self); struct miqt_string QKeySequence_ToString(const QKeySequence* self); @@ -52,7 +52,7 @@ struct miqt_string QKeySequence_ToString1(const QKeySequence* self, int format); QKeySequence* QKeySequence_FromString2(struct miqt_string str, int format); struct miqt_array /* of QKeySequence* */ QKeySequence_ListFromString2(struct miqt_string str, int format); struct miqt_string QKeySequence_ListToString2(struct miqt_array /* of QKeySequence* */ list, int format); -void QKeySequence_Delete(QKeySequence* self); +void QKeySequence_Delete(QKeySequence* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qkeysequenceedit.cpp b/qt/gen_qkeysequenceedit.cpp index 74ac1e52..aca36472 100644 --- a/qt/gen_qkeysequenceedit.cpp +++ b/qt/gen_qkeysequenceedit.cpp @@ -1,28 +1,1083 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qkeysequenceedit.h" #include "_cgo_export.h" -QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent) { - return new QKeySequenceEdit(parent); +class MiqtVirtualQKeySequenceEdit : public virtual QKeySequenceEdit { +public: + + MiqtVirtualQKeySequenceEdit(QWidget* parent): QKeySequenceEdit(parent) {}; + MiqtVirtualQKeySequenceEdit(): QKeySequenceEdit() {}; + MiqtVirtualQKeySequenceEdit(const QKeySequence& keySequence): QKeySequenceEdit(keySequence) {}; + MiqtVirtualQKeySequenceEdit(const QKeySequence& keySequence, QWidget* parent): QKeySequenceEdit(keySequence, parent) {}; + + virtual ~MiqtVirtualQKeySequenceEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QKeySequenceEdit::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QKeySequenceEdit::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QKeySequenceEdit::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QKeySequenceEdit::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QKeySequenceEdit::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QKeySequenceEdit::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QKeySequenceEdit::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QKeySequenceEdit::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QKeySequenceEdit::devType(); + } + + + int callback_return_value = miqt_exec_callback_QKeySequenceEdit_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QKeySequenceEdit::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QKeySequenceEdit::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QKeySequenceEdit_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QKeySequenceEdit::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QKeySequenceEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QKeySequenceEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QKeySequenceEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QKeySequenceEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QKeySequenceEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QKeySequenceEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QKeySequenceEdit::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QKeySequenceEdit_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QKeySequenceEdit::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QKeySequenceEdit::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QKeySequenceEdit::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QKeySequenceEdit::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QKeySequenceEdit_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QKeySequenceEdit::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QKeySequenceEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QKeySequenceEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QKeySequenceEdit::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QKeySequenceEdit::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QKeySequenceEdit::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QKeySequenceEdit::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QKeySequenceEdit::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QKeySequenceEdit::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QKeySequenceEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QKeySequenceEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QKeySequenceEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QKeySequenceEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QKeySequenceEdit::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QKeySequenceEdit::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QKeySequenceEdit::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QKeySequenceEdit::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QKeySequenceEdit::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QKeySequenceEdit::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QKeySequenceEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QKeySequenceEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QKeySequenceEdit::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QKeySequenceEdit::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QKeySequenceEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QKeySequenceEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QKeySequenceEdit::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QKeySequenceEdit::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QKeySequenceEdit::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QKeySequenceEdit::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QKeySequenceEdit::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QKeySequenceEdit::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QKeySequenceEdit::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QKeySequenceEdit::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QKeySequenceEdit::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QKeySequenceEdit::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QKeySequenceEdit::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QKeySequenceEdit::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QKeySequenceEdit::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QKeySequenceEdit::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QKeySequenceEdit::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QKeySequenceEdit::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QKeySequenceEdit::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QKeySequenceEdit::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QKeySequenceEdit::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QKeySequenceEdit::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QKeySequenceEdit::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QKeySequenceEdit::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QKeySequenceEdit::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QKeySequenceEdit::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QKeySequenceEdit::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QKeySequenceEdit_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QKeySequenceEdit::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QKeySequenceEdit::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QKeySequenceEdit_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QKeySequenceEdit::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QKeySequenceEdit::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QKeySequenceEdit_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QKeySequenceEdit::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QKeySequenceEdit::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QKeySequenceEdit_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QKeySequenceEdit::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QKeySequenceEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QKeySequenceEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QKeySequenceEdit::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QKeySequenceEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QKeySequenceEdit::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QKeySequenceEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QKeySequenceEdit::focusNextPrevChild(next); + + } + +}; + +void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(parent); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QKeySequenceEdit* QKeySequenceEdit_new2() { - return new QKeySequenceEdit(); +void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence) { - return new QKeySequenceEdit(*keySequence); +void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent) { - return new QKeySequenceEdit(*keySequence, parent); +void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence, parent); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self) { @@ -72,7 +1127,7 @@ void QKeySequenceEdit_EditingFinished(QKeySequenceEdit* self) { } void QKeySequenceEdit_connect_EditingFinished(QKeySequenceEdit* self, intptr_t slot) { - QKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::editingFinished), self, [=]() { + MiqtVirtualQKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::editingFinished), self, [=]() { miqt_exec_callback_QKeySequenceEdit_EditingFinished(slot); }); } @@ -82,7 +1137,7 @@ void QKeySequenceEdit_KeySequenceChanged(QKeySequenceEdit* self, QKeySequence* k } void QKeySequenceEdit_connect_KeySequenceChanged(QKeySequenceEdit* self, intptr_t slot) { - QKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::keySequenceChanged), self, [=](const QKeySequence& keySequence) { + MiqtVirtualQKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::keySequenceChanged), self, [=](const QKeySequence& keySequence) { const QKeySequence& keySequence_ret = keySequence; // Cast returned reference into pointer QKeySequence* sigval1 = const_cast(&keySequence_ret); @@ -134,7 +1189,347 @@ struct miqt_string QKeySequenceEdit_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QKeySequenceEdit_Delete(QKeySequenceEdit* self) { - delete self; +void QKeySequenceEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__Event = slot; +} + +bool QKeySequenceEdit_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_Event(param1); +} + +void QKeySequenceEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QKeySequenceEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QKeySequenceEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QKeySequenceEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QKeySequenceEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__TimerEvent = slot; +} + +void QKeySequenceEdit_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_TimerEvent(param1); +} + +void QKeySequenceEdit_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DevType = slot; +} + +int QKeySequenceEdit_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DevType(); +} + +void QKeySequenceEdit_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__SetVisible = slot; +} + +void QKeySequenceEdit_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_SetVisible(visible); +} + +void QKeySequenceEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QKeySequenceEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_SizeHint(); +} + +void QKeySequenceEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QKeySequenceEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QKeySequenceEdit_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__HeightForWidth = slot; +} + +int QKeySequenceEdit_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QKeySequenceEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QKeySequenceEdit_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QKeySequenceEdit_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QKeySequenceEdit_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_PaintEngine(); +} + +void QKeySequenceEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QKeySequenceEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QKeySequenceEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QKeySequenceEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QKeySequenceEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__WheelEvent = slot; +} + +void QKeySequenceEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QKeySequenceEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QKeySequenceEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void QKeySequenceEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QKeySequenceEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QKeySequenceEdit_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__EnterEvent = slot; +} + +void QKeySequenceEdit_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_EnterEvent(event); +} + +void QKeySequenceEdit_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__LeaveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_LeaveEvent(event); +} + +void QKeySequenceEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__PaintEvent = slot; +} + +void QKeySequenceEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QKeySequenceEdit_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MoveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MoveEvent(event); +} + +void QKeySequenceEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void QKeySequenceEdit_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__CloseEvent = slot; +} + +void QKeySequenceEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_CloseEvent(event); +} + +void QKeySequenceEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QKeySequenceEdit_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__TabletEvent = slot; +} + +void QKeySequenceEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_TabletEvent(event); +} + +void QKeySequenceEdit_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ActionEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ActionEvent(event); +} + +void QKeySequenceEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QKeySequenceEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QKeySequenceEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QKeySequenceEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DropEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DropEvent(event); +} + +void QKeySequenceEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ShowEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ShowEvent(event); +} + +void QKeySequenceEdit_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__HideEvent = slot; +} + +void QKeySequenceEdit_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_HideEvent(event); +} + +void QKeySequenceEdit_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__NativeEvent = slot; +} + +bool QKeySequenceEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QKeySequenceEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QKeySequenceEdit_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__Metric = slot; +} + +int QKeySequenceEdit_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_Metric(param1); +} + +void QKeySequenceEdit_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__InitPainter = slot; +} + +void QKeySequenceEdit_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_InitPainter(painter); +} + +void QKeySequenceEdit_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QKeySequenceEdit_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_Redirected(offset); +} + +void QKeySequenceEdit_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QKeySequenceEdit_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_SharedPainter(); +} + +void QKeySequenceEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void QKeySequenceEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QKeySequenceEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QKeySequenceEdit_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QKeySequenceEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QKeySequenceEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QKeySequenceEdit_Delete(QKeySequenceEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qkeysequenceedit.go b/qt/gen_qkeysequenceedit.go index 6e56693f..309b8a1a 100644 --- a/qt/gen_qkeysequenceedit.go +++ b/qt/gen_qkeysequenceedit.go @@ -15,7 +15,8 @@ import ( ) type QKeySequenceEdit struct { - h *C.QKeySequenceEdit + h *C.QKeySequenceEdit + isSubclass bool *QWidget } @@ -33,39 +34,75 @@ func (this *QKeySequenceEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQKeySequenceEdit(h *C.QKeySequenceEdit) *QKeySequenceEdit { +// newQKeySequenceEdit constructs the type using only CGO pointers. +func newQKeySequenceEdit(h *C.QKeySequenceEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QKeySequenceEdit { if h == nil { return nil } - return &QKeySequenceEdit{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QKeySequenceEdit{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQKeySequenceEdit(h unsafe.Pointer) *QKeySequenceEdit { - return newQKeySequenceEdit((*C.QKeySequenceEdit)(h)) +// UnsafeNewQKeySequenceEdit constructs the type using only unsafe pointers. +func UnsafeNewQKeySequenceEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QKeySequenceEdit { + if h == nil { + return nil + } + + return &QKeySequenceEdit{h: (*C.QKeySequenceEdit)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQKeySequenceEdit constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit(parent *QWidget) *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new(parent.cPointer()) - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new(parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQKeySequenceEdit2 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit2() *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new2() - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new2(&outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQKeySequenceEdit3 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit3(keySequence *QKeySequence) *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new3(keySequence.cPointer()) - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new3(keySequence.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQKeySequenceEdit4 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit4(keySequence *QKeySequence, parent *QWidget) *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer()) - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QKeySequenceEdit) MetaObject() *QMetaObject { @@ -192,9 +229,998 @@ func QKeySequenceEdit_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QKeySequenceEdit) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QKeySequenceEdit_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QKeySequenceEdit) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QKeySequenceEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_Event +func miqt_exec_callback_QKeySequenceEdit_Event(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QKeySequenceEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QKeySequenceEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_KeyPressEvent +func miqt_exec_callback_QKeySequenceEdit_KeyPressEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_KeyReleaseEvent(param1 *QKeyEvent) { + + C.QKeySequenceEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnKeyReleaseEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QKeySequenceEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent +func miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QKeySequenceEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QKeySequenceEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_TimerEvent +func miqt_exec_callback_QKeySequenceEdit_TimerEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DevType() int { + + return (int)(C.QKeySequenceEdit_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QKeySequenceEdit) OnDevType(slot func(super func() int) int) { + C.QKeySequenceEdit_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DevType +func miqt_exec_callback_QKeySequenceEdit_DevType(self *C.QKeySequenceEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_SetVisible(visible bool) { + + C.QKeySequenceEdit_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QKeySequenceEdit) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QKeySequenceEdit_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_SetVisible +func miqt_exec_callback_QKeySequenceEdit_SetVisible(self *C.QKeySequenceEdit, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QKeySequenceEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QKeySequenceEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QKeySequenceEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_SizeHint +func miqt_exec_callback_QKeySequenceEdit_SizeHint(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QKeySequenceEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QKeySequenceEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QKeySequenceEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MinimumSizeHint +func miqt_exec_callback_QKeySequenceEdit_MinimumSizeHint(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QKeySequenceEdit_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QKeySequenceEdit) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QKeySequenceEdit_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_HeightForWidth +func miqt_exec_callback_QKeySequenceEdit_HeightForWidth(self *C.QKeySequenceEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QKeySequenceEdit_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QKeySequenceEdit) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QKeySequenceEdit_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_HasHeightForWidth +func miqt_exec_callback_QKeySequenceEdit_HasHeightForWidth(self *C.QKeySequenceEdit, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QKeySequenceEdit_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QKeySequenceEdit) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QKeySequenceEdit_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_PaintEngine +func miqt_exec_callback_QKeySequenceEdit_PaintEngine(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MousePressEvent +func miqt_exec_callback_QKeySequenceEdit_MousePressEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent +func miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent +func miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent +func miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QKeySequenceEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QKeySequenceEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_WheelEvent +func miqt_exec_callback_QKeySequenceEdit_WheelEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QKeySequenceEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QKeySequenceEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_FocusInEvent +func miqt_exec_callback_QKeySequenceEdit_FocusInEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QKeySequenceEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QKeySequenceEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_FocusOutEvent +func miqt_exec_callback_QKeySequenceEdit_FocusOutEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_EnterEvent(event *QEvent) { + + C.QKeySequenceEdit_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QKeySequenceEdit_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_EnterEvent +func miqt_exec_callback_QKeySequenceEdit_EnterEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QKeySequenceEdit_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QKeySequenceEdit_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_LeaveEvent +func miqt_exec_callback_QKeySequenceEdit_LeaveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QKeySequenceEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QKeySequenceEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_PaintEvent +func miqt_exec_callback_QKeySequenceEdit_PaintEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QKeySequenceEdit_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QKeySequenceEdit_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MoveEvent +func miqt_exec_callback_QKeySequenceEdit_MoveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QKeySequenceEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QKeySequenceEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ResizeEvent +func miqt_exec_callback_QKeySequenceEdit_ResizeEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QKeySequenceEdit_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QKeySequenceEdit_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_CloseEvent +func miqt_exec_callback_QKeySequenceEdit_CloseEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QKeySequenceEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QKeySequenceEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent +func miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QKeySequenceEdit_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QKeySequenceEdit_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_TabletEvent +func miqt_exec_callback_QKeySequenceEdit_TabletEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QKeySequenceEdit_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QKeySequenceEdit_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ActionEvent +func miqt_exec_callback_QKeySequenceEdit_ActionEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QKeySequenceEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QKeySequenceEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DragEnterEvent +func miqt_exec_callback_QKeySequenceEdit_DragEnterEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QKeySequenceEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QKeySequenceEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DragMoveEvent +func miqt_exec_callback_QKeySequenceEdit_DragMoveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QKeySequenceEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QKeySequenceEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent +func miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QKeySequenceEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QKeySequenceEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DropEvent +func miqt_exec_callback_QKeySequenceEdit_DropEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QKeySequenceEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QKeySequenceEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ShowEvent +func miqt_exec_callback_QKeySequenceEdit_ShowEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QKeySequenceEdit_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QKeySequenceEdit_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_HideEvent +func miqt_exec_callback_QKeySequenceEdit_HideEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QKeySequenceEdit_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QKeySequenceEdit) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QKeySequenceEdit_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_NativeEvent +func miqt_exec_callback_QKeySequenceEdit_NativeEvent(self *C.QKeySequenceEdit, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QKeySequenceEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QKeySequenceEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ChangeEvent +func miqt_exec_callback_QKeySequenceEdit_ChangeEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QKeySequenceEdit_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QKeySequenceEdit) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QKeySequenceEdit_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_Metric +func miqt_exec_callback_QKeySequenceEdit_Metric(self *C.QKeySequenceEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_InitPainter(painter *QPainter) { + + C.QKeySequenceEdit_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QKeySequenceEdit) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QKeySequenceEdit_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_InitPainter +func miqt_exec_callback_QKeySequenceEdit_InitPainter(self *C.QKeySequenceEdit, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QKeySequenceEdit_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QKeySequenceEdit) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QKeySequenceEdit_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_Redirected +func miqt_exec_callback_QKeySequenceEdit_Redirected(self *C.QKeySequenceEdit, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QKeySequenceEdit_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QKeySequenceEdit) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QKeySequenceEdit_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_SharedPainter +func miqt_exec_callback_QKeySequenceEdit_SharedPainter(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QKeySequenceEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QKeySequenceEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_InputMethodEvent +func miqt_exec_callback_QKeySequenceEdit_InputMethodEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QKeySequenceEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QKeySequenceEdit) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QKeySequenceEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_InputMethodQuery +func miqt_exec_callback_QKeySequenceEdit_InputMethodQuery(self *C.QKeySequenceEdit, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QKeySequenceEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QKeySequenceEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QKeySequenceEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_FocusNextPrevChild +func miqt_exec_callback_QKeySequenceEdit_FocusNextPrevChild(self *C.QKeySequenceEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QKeySequenceEdit) Delete() { - C.QKeySequenceEdit_Delete(this.h) + C.QKeySequenceEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qkeysequenceedit.h b/qt/gen_qkeysequenceedit.h index 3d681564..c6b887c5 100644 --- a/qt/gen_qkeysequenceedit.h +++ b/qt/gen_qkeysequenceedit.h @@ -15,21 +15,77 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QKeySequence; class QKeySequenceEdit; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QKeySequence QKeySequence; typedef struct QKeySequenceEdit QKeySequenceEdit; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent); -QKeySequenceEdit* QKeySequenceEdit_new2(); -QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence); -QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent); +void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self); void* QKeySequenceEdit_Metacast(QKeySequenceEdit* self, const char* param1); struct miqt_string QKeySequenceEdit_Tr(const char* s); @@ -41,11 +97,99 @@ void QKeySequenceEdit_EditingFinished(QKeySequenceEdit* self); void QKeySequenceEdit_connect_EditingFinished(QKeySequenceEdit* self, intptr_t slot); void QKeySequenceEdit_KeySequenceChanged(QKeySequenceEdit* self, QKeySequence* keySequence); void QKeySequenceEdit_connect_KeySequenceChanged(QKeySequenceEdit* self, intptr_t slot); +bool QKeySequenceEdit_Event(QKeySequenceEdit* self, QEvent* param1); +void QKeySequenceEdit_KeyPressEvent(QKeySequenceEdit* self, QKeyEvent* param1); +void QKeySequenceEdit_KeyReleaseEvent(QKeySequenceEdit* self, QKeyEvent* param1); +void QKeySequenceEdit_TimerEvent(QKeySequenceEdit* self, QTimerEvent* param1); struct miqt_string QKeySequenceEdit_Tr2(const char* s, const char* c); struct miqt_string QKeySequenceEdit_Tr3(const char* s, const char* c, int n); struct miqt_string QKeySequenceEdit_TrUtf82(const char* s, const char* c); struct miqt_string QKeySequenceEdit_TrUtf83(const char* s, const char* c, int n); -void QKeySequenceEdit_Delete(QKeySequenceEdit* self); +void QKeySequenceEdit_override_virtual_Event(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_Event(void* self, QEvent* param1); +void QKeySequenceEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QKeySequenceEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QKeySequenceEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QKeySequenceEdit_override_virtual_DevType(void* self, intptr_t slot); +int QKeySequenceEdit_virtualbase_DevType(const void* self); +void QKeySequenceEdit_override_virtual_SetVisible(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_SetVisible(void* self, bool visible); +void QKeySequenceEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QKeySequenceEdit_virtualbase_SizeHint(const void* self); +void QKeySequenceEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QKeySequenceEdit_virtualbase_MinimumSizeHint(const void* self); +void QKeySequenceEdit_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QKeySequenceEdit_virtualbase_HeightForWidth(const void* self, int param1); +void QKeySequenceEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_HasHeightForWidth(const void* self); +void QKeySequenceEdit_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QKeySequenceEdit_virtualbase_PaintEngine(const void* self); +void QKeySequenceEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QKeySequenceEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QKeySequenceEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QKeySequenceEdit_override_virtual_EnterEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_EnterEvent(void* self, QEvent* event); +void QKeySequenceEdit_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_LeaveEvent(void* self, QEvent* event); +void QKeySequenceEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QKeySequenceEdit_override_virtual_MoveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QKeySequenceEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QKeySequenceEdit_override_virtual_CloseEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QKeySequenceEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QKeySequenceEdit_override_virtual_TabletEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QKeySequenceEdit_override_virtual_ActionEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QKeySequenceEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QKeySequenceEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QKeySequenceEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QKeySequenceEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DropEvent(void* self, QDropEvent* event); +void QKeySequenceEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QKeySequenceEdit_override_virtual_HideEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_HideEvent(void* self, QHideEvent* event); +void QKeySequenceEdit_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QKeySequenceEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QKeySequenceEdit_override_virtual_Metric(void* self, intptr_t slot); +int QKeySequenceEdit_virtualbase_Metric(const void* self, int param1); +void QKeySequenceEdit_override_virtual_InitPainter(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_InitPainter(const void* self, QPainter* painter); +void QKeySequenceEdit_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QKeySequenceEdit_virtualbase_Redirected(const void* self, QPoint* offset); +void QKeySequenceEdit_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QKeySequenceEdit_virtualbase_SharedPainter(const void* self); +void QKeySequenceEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QKeySequenceEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QKeySequenceEdit_virtualbase_InputMethodQuery(const void* self, int param1); +void QKeySequenceEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QKeySequenceEdit_Delete(QKeySequenceEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlabel.cpp b/qt/gen_qlabel.cpp index d644fb6e..18859ee0 100644 --- a/qt/gen_qlabel.cpp +++ b/qt/gen_qlabel.cpp @@ -1,6 +1,15 @@ +#include +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include #include #include #include @@ -12,31 +21,404 @@ #include "gen_qlabel.h" #include "_cgo_export.h" -QLabel* QLabel_new(QWidget* parent) { - return new QLabel(parent); +class MiqtVirtualQLabel : public virtual QLabel { +public: + + MiqtVirtualQLabel(QWidget* parent): QLabel(parent) {}; + MiqtVirtualQLabel(): QLabel() {}; + MiqtVirtualQLabel(const QString& text): QLabel(text) {}; + MiqtVirtualQLabel(QWidget* parent, Qt::WindowFlags f): QLabel(parent, f) {}; + MiqtVirtualQLabel(const QString& text, QWidget* parent): QLabel(text, parent) {}; + MiqtVirtualQLabel(const QString& text, QWidget* parent, Qt::WindowFlags f): QLabel(text, parent, f) {}; + + virtual ~MiqtVirtualQLabel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QLabel::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLabel_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QLabel::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QLabel::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLabel_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QLabel::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QLabel::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLabel_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QLabel::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QLabel::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QLabel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QLabel::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QLabel::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QLabel::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QLabel::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QLabel_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QLabel::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QLabel::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QLabel_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QLabel::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* ev) override { + if (handle__MousePressEvent == 0) { + QLabel::mousePressEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* ev) { + + QLabel::mousePressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* ev) override { + if (handle__MouseMoveEvent == 0) { + QLabel::mouseMoveEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* ev) { + + QLabel::mouseMoveEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* ev) override { + if (handle__MouseReleaseEvent == 0) { + QLabel::mouseReleaseEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* ev) { + + QLabel::mouseReleaseEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* ev) override { + if (handle__ContextMenuEvent == 0) { + QLabel::contextMenuEvent(ev); + return; + } + + QContextMenuEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* ev) { + + QLabel::contextMenuEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* ev) override { + if (handle__FocusInEvent == 0) { + QLabel::focusInEvent(ev); + return; + } + + QFocusEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* ev) { + + QLabel::focusInEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* ev) override { + if (handle__FocusOutEvent == 0) { + QLabel::focusOutEvent(ev); + return; + } + + QFocusEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* ev) { + + QLabel::focusOutEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QLabel::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QLabel_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QLabel::focusNextPrevChild(next); + + } + +}; + +void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new2() { - return new QLabel(); +void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new3(struct miqt_string text) { +void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QLabel(text_QString); + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new4(QWidget* parent, int f) { - return new QLabel(parent, static_cast(f)); +void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent, static_cast(f)); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new5(struct miqt_string text, QWidget* parent) { +void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QLabel(text_QString, parent); + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f) { +void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QLabel(text_QString, parent, static_cast(f)); + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent, static_cast(f)); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QLabel_MetaObject(const QLabel* self) { @@ -245,7 +627,7 @@ void QLabel_LinkActivated(QLabel* self, struct miqt_string link) { } void QLabel_connect_LinkActivated(QLabel* self, intptr_t slot) { - QLabel::connect(self, static_cast(&QLabel::linkActivated), self, [=](const QString& link) { + MiqtVirtualQLabel::connect(self, static_cast(&QLabel::linkActivated), self, [=](const QString& link) { const QString link_ret = link; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray link_b = link_ret.toUtf8(); @@ -264,7 +646,7 @@ void QLabel_LinkHovered(QLabel* self, struct miqt_string link) { } void QLabel_connect_LinkHovered(QLabel* self, intptr_t slot) { - QLabel::connect(self, static_cast(&QLabel::linkHovered), self, [=](const QString& link) { + MiqtVirtualQLabel::connect(self, static_cast(&QLabel::linkHovered), self, [=](const QString& link) { const QString link_ret = link; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray link_b = link_ret.toUtf8(); @@ -321,7 +703,123 @@ struct miqt_string QLabel_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QLabel_Delete(QLabel* self) { - delete self; +void QLabel_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__SizeHint = slot; +} + +QSize* QLabel_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQLabel*)(self) )->virtualbase_SizeHint(); +} + +void QLabel_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QLabel_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQLabel*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QLabel_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__HeightForWidth = slot; +} + +int QLabel_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLabel*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLabel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__Event = slot; +} + +bool QLabel_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQLabel*)(self) )->virtualbase_Event(e); +} + +void QLabel_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__KeyPressEvent = slot; +} + +void QLabel_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QLabel_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__PaintEvent = slot; +} + +void QLabel_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_PaintEvent(param1); +} + +void QLabel_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__ChangeEvent = slot; +} + +void QLabel_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QLabel_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MousePressEvent = slot; +} + +void QLabel_virtualbase_MousePressEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_MousePressEvent(ev); +} + +void QLabel_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MouseMoveEvent = slot; +} + +void QLabel_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_MouseMoveEvent(ev); +} + +void QLabel_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QLabel_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_MouseReleaseEvent(ev); +} + +void QLabel_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__ContextMenuEvent = slot; +} + +void QLabel_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_ContextMenuEvent(ev); +} + +void QLabel_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__FocusInEvent = slot; +} + +void QLabel_virtualbase_FocusInEvent(void* self, QFocusEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_FocusInEvent(ev); +} + +void QLabel_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__FocusOutEvent = slot; +} + +void QLabel_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_FocusOutEvent(ev); +} + +void QLabel_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QLabel_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQLabel*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QLabel_Delete(QLabel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlabel.go b/qt/gen_qlabel.go index bcec2cd5..b80b7d62 100644 --- a/qt/gen_qlabel.go +++ b/qt/gen_qlabel.go @@ -15,7 +15,8 @@ import ( ) type QLabel struct { - h *C.QLabel + h *C.QLabel + isSubclass bool *QFrame } @@ -33,27 +34,51 @@ func (this *QLabel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLabel(h *C.QLabel) *QLabel { +// newQLabel constructs the type using only CGO pointers. +func newQLabel(h *C.QLabel, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLabel { if h == nil { return nil } - return &QLabel{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QLabel{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQLabel(h unsafe.Pointer) *QLabel { - return newQLabel((*C.QLabel)(h)) +// UnsafeNewQLabel constructs the type using only unsafe pointers. +func UnsafeNewQLabel(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLabel { + if h == nil { + return nil + } + + return &QLabel{h: (*C.QLabel)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQLabel constructs a new QLabel object. func NewQLabel(parent *QWidget) *QLabel { - ret := C.QLabel_new(parent.cPointer()) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new(parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel2 constructs a new QLabel object. func NewQLabel2() *QLabel { - ret := C.QLabel_new2() - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new2(&outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel3 constructs a new QLabel object. @@ -62,14 +87,30 @@ func NewQLabel3(text string) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QLabel_new3(text_ms) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new3(text_ms, &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel4 constructs a new QLabel object. func NewQLabel4(parent *QWidget, f WindowType) *QLabel { - ret := C.QLabel_new4(parent.cPointer(), (C.int)(f)) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new4(parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel5 constructs a new QLabel object. @@ -78,8 +119,16 @@ func NewQLabel5(text string, parent *QWidget) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QLabel_new5(text_ms, parent.cPointer()) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new5(text_ms, parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel6 constructs a new QLabel object. @@ -88,8 +137,16 @@ func NewQLabel6(text string, parent *QWidget, f WindowType) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f)) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QLabel) MetaObject() *QMetaObject { @@ -128,29 +185,29 @@ func (this *QLabel) Text() string { } func (this *QLabel) Pixmap() *QPixmap { - return UnsafeNewQPixmap(unsafe.Pointer(C.QLabel_Pixmap(this.h))) + return UnsafeNewQPixmap(unsafe.Pointer(C.QLabel_Pixmap(this.h)), nil) } func (this *QLabel) PixmapWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QPixmap { _ret := C.QLabel_PixmapWithQtReturnByValueConstant(this.h, (C.int)(param1)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Picture() *QPicture { - return UnsafeNewQPicture(unsafe.Pointer(C.QLabel_Picture(this.h))) + return UnsafeNewQPicture(unsafe.Pointer(C.QLabel_Picture(this.h)), nil) } func (this *QLabel) PictureWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QPicture { _ret := C.QLabel_PictureWithQtReturnByValueConstant(this.h, (C.int)(param1)) - _goptr := newQPicture(_ret) + _goptr := newQPicture(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Movie() *QMovie { - return UnsafeNewQMovie(unsafe.Pointer(C.QLabel_Movie(this.h))) + return UnsafeNewQMovie(unsafe.Pointer(C.QLabel_Movie(this.h)), nil) } func (this *QLabel) TextFormat() TextFormat { @@ -220,7 +277,7 @@ func (this *QLabel) SetBuddy(buddy *QWidget) { } func (this *QLabel) Buddy() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLabel_Buddy(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLabel_Buddy(this.h)), nil, nil) } func (this *QLabel) HeightForWidth(param1 int) int { @@ -392,9 +449,341 @@ func QLabel_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QLabel) callVirtualBase_SizeHint() *QSize { + + _ret := C.QLabel_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLabel) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QLabel_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_SizeHint +func miqt_exec_callback_QLabel_SizeHint(self *C.QLabel, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLabel) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QLabel_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLabel) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QLabel_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MinimumSizeHint +func miqt_exec_callback_QLabel_MinimumSizeHint(self *C.QLabel, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLabel) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLabel_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLabel) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLabel_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_HeightForWidth +func miqt_exec_callback_QLabel_HeightForWidth(self *C.QLabel, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLabel) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QLabel_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QLabel) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QLabel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_Event +func miqt_exec_callback_QLabel_Event(self *C.QLabel, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLabel) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QLabel_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QLabel_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_KeyPressEvent +func miqt_exec_callback_QLabel_KeyPressEvent(self *C.QLabel, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QLabel_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLabel) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QLabel_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_PaintEvent +func miqt_exec_callback_QLabel_PaintEvent(self *C.QLabel, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QLabel_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLabel) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QLabel_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_ChangeEvent +func miqt_exec_callback_QLabel_ChangeEvent(self *C.QLabel, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QLabel{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_MousePressEvent(ev *QMouseEvent) { + + C.QLabel_virtualbase_MousePressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnMousePressEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QLabel_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MousePressEvent +func miqt_exec_callback_QLabel_MousePressEvent(self *C.QLabel, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_MouseMoveEvent(ev *QMouseEvent) { + + C.QLabel_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnMouseMoveEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QLabel_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MouseMoveEvent +func miqt_exec_callback_QLabel_MouseMoveEvent(self *C.QLabel, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_MouseReleaseEvent(ev *QMouseEvent) { + + C.QLabel_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnMouseReleaseEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QLabel_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MouseReleaseEvent +func miqt_exec_callback_QLabel_MouseReleaseEvent(self *C.QLabel, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_ContextMenuEvent(ev *QContextMenuEvent) { + + C.QLabel_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnContextMenuEvent(slot func(super func(ev *QContextMenuEvent), ev *QContextMenuEvent)) { + C.QLabel_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_ContextMenuEvent +func miqt_exec_callback_QLabel_ContextMenuEvent(self *C.QLabel, cb C.intptr_t, ev *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QContextMenuEvent), ev *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_FocusInEvent(ev *QFocusEvent) { + + C.QLabel_virtualbase_FocusInEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnFocusInEvent(slot func(super func(ev *QFocusEvent), ev *QFocusEvent)) { + C.QLabel_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_FocusInEvent +func miqt_exec_callback_QLabel_FocusInEvent(self *C.QLabel, cb C.intptr_t, ev *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QFocusEvent), ev *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(ev), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_FocusOutEvent(ev *QFocusEvent) { + + C.QLabel_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnFocusOutEvent(slot func(super func(ev *QFocusEvent), ev *QFocusEvent)) { + C.QLabel_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_FocusOutEvent +func miqt_exec_callback_QLabel_FocusOutEvent(self *C.QLabel, cb C.intptr_t, ev *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QFocusEvent), ev *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(ev), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QLabel_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QLabel) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QLabel_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_FocusNextPrevChild +func miqt_exec_callback_QLabel_FocusNextPrevChild(self *C.QLabel, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QLabel) Delete() { - C.QLabel_Delete(this.h) + C.QLabel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlabel.h b/qt/gen_qlabel.h index 59d713a4..56643a3b 100644 --- a/qt/gen_qlabel.h +++ b/qt/gen_qlabel.h @@ -15,29 +15,47 @@ extern "C" { #endif #ifdef __cplusplus +class QContextMenuEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QKeyEvent; class QLabel; class QMetaObject; +class QMouseEvent; class QMovie; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPicture; class QPixmap; class QSize; class QWidget; #else +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QLabel QLabel; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; typedef struct QMovie QMovie; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPicture QPicture; typedef struct QPixmap QPixmap; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QLabel* QLabel_new(QWidget* parent); -QLabel* QLabel_new2(); -QLabel* QLabel_new3(struct miqt_string text); -QLabel* QLabel_new4(QWidget* parent, int f); -QLabel* QLabel_new5(struct miqt_string text, QWidget* parent); -QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f); +void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QLabel_MetaObject(const QLabel* self); void* QLabel_Metacast(QLabel* self, const char* param1); struct miqt_string QLabel_Tr(const char* s); @@ -84,11 +102,50 @@ void QLabel_LinkActivated(QLabel* self, struct miqt_string link); void QLabel_connect_LinkActivated(QLabel* self, intptr_t slot); void QLabel_LinkHovered(QLabel* self, struct miqt_string link); void QLabel_connect_LinkHovered(QLabel* self, intptr_t slot); +bool QLabel_Event(QLabel* self, QEvent* e); +void QLabel_KeyPressEvent(QLabel* self, QKeyEvent* ev); +void QLabel_PaintEvent(QLabel* self, QPaintEvent* param1); +void QLabel_ChangeEvent(QLabel* self, QEvent* param1); +void QLabel_MousePressEvent(QLabel* self, QMouseEvent* ev); +void QLabel_MouseMoveEvent(QLabel* self, QMouseEvent* ev); +void QLabel_MouseReleaseEvent(QLabel* self, QMouseEvent* ev); +void QLabel_ContextMenuEvent(QLabel* self, QContextMenuEvent* ev); +void QLabel_FocusInEvent(QLabel* self, QFocusEvent* ev); +void QLabel_FocusOutEvent(QLabel* self, QFocusEvent* ev); +bool QLabel_FocusNextPrevChild(QLabel* self, bool next); struct miqt_string QLabel_Tr2(const char* s, const char* c); struct miqt_string QLabel_Tr3(const char* s, const char* c, int n); struct miqt_string QLabel_TrUtf82(const char* s, const char* c); struct miqt_string QLabel_TrUtf83(const char* s, const char* c, int n); -void QLabel_Delete(QLabel* self); +void QLabel_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLabel_virtualbase_SizeHint(const void* self); +void QLabel_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QLabel_virtualbase_MinimumSizeHint(const void* self); +void QLabel_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLabel_virtualbase_HeightForWidth(const void* self, int param1); +void QLabel_override_virtual_Event(void* self, intptr_t slot); +bool QLabel_virtualbase_Event(void* self, QEvent* e); +void QLabel_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QLabel_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QLabel_override_virtual_PaintEvent(void* self, intptr_t slot); +void QLabel_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QLabel_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QLabel_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QLabel_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QLabel_virtualbase_MousePressEvent(void* self, QMouseEvent* ev); +void QLabel_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QLabel_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev); +void QLabel_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QLabel_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev); +void QLabel_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QLabel_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* ev); +void QLabel_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QLabel_virtualbase_FocusInEvent(void* self, QFocusEvent* ev); +void QLabel_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QLabel_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev); +void QLabel_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QLabel_virtualbase_FocusNextPrevChild(void* self, bool next); +void QLabel_Delete(QLabel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlayout.cpp b/qt/gen_qlayout.cpp index 7ae86adc..822138df 100644 --- a/qt/gen_qlayout.cpp +++ b/qt/gen_qlayout.cpp @@ -1,7 +1,9 @@ +#include #include #include #include #include +#include #include #include #include @@ -269,7 +271,11 @@ QLayoutItem* QLayout_ReplaceWidget3(QLayout* self, QWidget* from, QWidget* to, i return self->replaceWidget(from, to, static_cast(options)); } -void QLayout_Delete(QLayout* self) { - delete self; +void QLayout_Delete(QLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlayout.go b/qt/gen_qlayout.go index 0b0f9a62..1eb0e99e 100644 --- a/qt/gen_qlayout.go +++ b/qt/gen_qlayout.go @@ -25,7 +25,8 @@ const ( ) type QLayout struct { - h *C.QLayout + h *C.QLayout + isSubclass bool *QObject *QLayoutItem } @@ -44,15 +45,25 @@ func (this *QLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLayout(h *C.QLayout) *QLayout { +// newQLayout constructs the type using only CGO pointers. +func newQLayout(h *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QLayout { if h == nil { return nil } - return &QLayout{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QLayoutItem: UnsafeNewQLayoutItem(unsafe.Pointer(h))} + return &QLayout{h: h, + QObject: newQObject(h_QObject), + QLayoutItem: newQLayoutItem(h_QLayoutItem)} } -func UnsafeNewQLayout(h unsafe.Pointer) *QLayout { - return newQLayout((*C.QLayout)(h)) +// UnsafeNewQLayout constructs the type using only unsafe pointers. +func UnsafeNewQLayout(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QLayout { + if h == nil { + return nil + } + + return &QLayout{h: (*C.QLayout)(h), + QObject: UnsafeNewQObject(h_QObject), + QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } func (this *QLayout) MetaObject() *QMetaObject { @@ -146,11 +157,11 @@ func (this *QLayout) SetMenuBar(w *QWidget) { } func (this *QLayout) MenuBar() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_MenuBar(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_MenuBar(this.h)), nil, nil) } func (this *QLayout) ParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_ParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_ParentWidget(this.h)), nil, nil) } func (this *QLayout) Invalidate() { @@ -268,7 +279,7 @@ func (this *QLayout) TotalSizeHint() *QSize { } func (this *QLayout) Layout() *QLayout { - return UnsafeNewQLayout(unsafe.Pointer(C.QLayout_Layout(this.h))) + return UnsafeNewQLayout(unsafe.Pointer(C.QLayout_Layout(this.h)), nil, nil) } func (this *QLayout) SetEnabled(enabled bool) { @@ -336,7 +347,7 @@ func (this *QLayout) ReplaceWidget3(from *QWidget, to *QWidget, options FindChil // Delete this object from C++ memory. func (this *QLayout) Delete() { - C.QLayout_Delete(this.h) + C.QLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlayout.h b/qt/gen_qlayout.h index b415a920..bc8fa836 100644 --- a/qt/gen_qlayout.h +++ b/qt/gen_qlayout.h @@ -15,18 +15,22 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QLayout; class QLayoutItem; class QMargins; class QMetaObject; +class QObject; class QRect; class QSize; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMargins QMargins; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QWidget QWidget; @@ -80,12 +84,13 @@ QLayout* QLayout_Layout(QLayout* self); void QLayout_SetEnabled(QLayout* self, bool enabled); bool QLayout_IsEnabled(const QLayout* self); QSize* QLayout_ClosestAcceptableSize(QWidget* w, QSize* s); +void QLayout_ChildEvent(QLayout* self, QChildEvent* e); struct miqt_string QLayout_Tr2(const char* s, const char* c); struct miqt_string QLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QLayout_TrUtf82(const char* s, const char* c); struct miqt_string QLayout_TrUtf83(const char* s, const char* c, int n); QLayoutItem* QLayout_ReplaceWidget3(QLayout* self, QWidget* from, QWidget* to, int options); -void QLayout_Delete(QLayout* self); +void QLayout_Delete(QLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlayoutitem.cpp b/qt/gen_qlayoutitem.cpp index 3b0dc1a6..c582ee1a 100644 --- a/qt/gen_qlayoutitem.cpp +++ b/qt/gen_qlayoutitem.cpp @@ -82,24 +82,387 @@ int QLayoutItem_ControlTypes(const QLayoutItem* self) { return static_cast(_ret); } -void QLayoutItem_Delete(QLayoutItem* self) { - delete self; +void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSpacerItem* QSpacerItem_new(int w, int h) { - return new QSpacerItem(static_cast(w), static_cast(h)); +class MiqtVirtualQSpacerItem : public virtual QSpacerItem { +public: + + MiqtVirtualQSpacerItem(int w, int h): QSpacerItem(w, h) {}; + MiqtVirtualQSpacerItem(const QSpacerItem& param1): QSpacerItem(param1) {}; + MiqtVirtualQSpacerItem(int w, int h, QSizePolicy::Policy hData): QSpacerItem(w, h, hData) {}; + MiqtVirtualQSpacerItem(int w, int h, QSizePolicy::Policy hData, QSizePolicy::Policy vData): QSpacerItem(w, h, hData, vData) {}; + + virtual ~MiqtVirtualQSpacerItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSpacerItem::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpacerItem_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSpacerItem::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QSpacerItem::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpacerItem_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QSpacerItem::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QSpacerItem::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpacerItem_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QSpacerItem::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QSpacerItem::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QSpacerItem_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QSpacerItem::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QSpacerItem::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QSpacerItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QSpacerItem::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QSpacerItem::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QSpacerItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QSpacerItem::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QSpacerItem::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QSpacerItem_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QSpacerItem::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SpacerItem = 0; + + // Subclass to allow providing a Go implementation + virtual QSpacerItem* spacerItem() override { + if (handle__SpacerItem == 0) { + return QSpacerItem::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QSpacerItem_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QSpacerItem::spacerItem(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSpacerItem::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSpacerItem_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSpacerItem::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSpacerItem::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSpacerItem_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSpacerItem::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QSpacerItem::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSpacerItem_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QSpacerItem::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QSpacerItem::invalidate(); + return; + } + + + miqt_exec_callback_QSpacerItem_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QSpacerItem::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Widget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* widget() override { + if (handle__Widget == 0) { + return QSpacerItem::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QSpacerItem_Widget(this, handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() { + + return QSpacerItem::widget(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QSpacerItem::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QSpacerItem_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QSpacerItem::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QSpacerItem::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QSpacerItem_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QSpacerItem::controlTypes(); + return static_cast(_ret); + + } + +}; + +void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h)); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } -QSpacerItem* QSpacerItem_new2(QSpacerItem* param1) { - return new QSpacerItem(*param1); +void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(*param1); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } -QSpacerItem* QSpacerItem_new3(int w, int h, int hData) { - return new QSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); +void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } -QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData) { - return new QSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); +void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h) { @@ -151,12 +514,486 @@ void QSpacerItem_ChangeSize4(QSpacerItem* self, int w, int h, int hData, int vDa self->changeSize(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); } -void QSpacerItem_Delete(QSpacerItem* self) { - delete self; +void QSpacerItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__SizeHint = slot; +} + +QSize* QSpacerItem_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_SizeHint(); +} + +void QSpacerItem_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__MinimumSize = slot; +} + +QSize* QSpacerItem_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_MinimumSize(); +} + +void QSpacerItem_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__MaximumSize = slot; +} + +QSize* QSpacerItem_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_MaximumSize(); +} + +void QSpacerItem_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__ExpandingDirections = slot; +} + +int QSpacerItem_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_ExpandingDirections(); +} + +void QSpacerItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__IsEmpty = slot; +} + +bool QSpacerItem_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_IsEmpty(); +} + +void QSpacerItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__SetGeometry = slot; +} + +void QSpacerItem_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QSpacerItem_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Geometry = slot; +} + +QRect* QSpacerItem_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_Geometry(); +} + +void QSpacerItem_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QSpacerItem_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_SpacerItem(); +} + +void QSpacerItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSpacerItem_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSpacerItem_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__HeightForWidth = slot; } -QWidgetItem* QWidgetItem_new(QWidget* w) { - return new QWidgetItem(w); +int QSpacerItem_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSpacerItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QSpacerItem_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QSpacerItem_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Invalidate = slot; +} + +void QSpacerItem_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_Invalidate(); +} + +void QSpacerItem_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Widget = slot; +} + +QWidget* QSpacerItem_virtualbase_Widget(void* self) { + return ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_Widget(); +} + +void QSpacerItem_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Layout = slot; +} + +QLayout* QSpacerItem_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_Layout(); +} + +void QSpacerItem_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__ControlTypes = slot; +} + +int QSpacerItem_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_ControlTypes(); +} + +void QSpacerItem_Delete(QSpacerItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWidgetItem : public virtual QWidgetItem { +public: + + MiqtVirtualQWidgetItem(QWidget* w): QWidgetItem(w) {}; + + virtual ~MiqtVirtualQWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWidgetItem::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItem_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWidgetItem::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QWidgetItem::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItem_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QWidgetItem::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QWidgetItem::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItem_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QWidgetItem::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QWidgetItem::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItem_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QWidgetItem::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QWidgetItem::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QWidgetItem::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QWidgetItem::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QWidgetItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QWidgetItem::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QWidgetItem::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QWidgetItem_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QWidgetItem::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Widget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* widget() override { + if (handle__Widget == 0) { + return QWidgetItem::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QWidgetItem_Widget(this, handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() { + + return QWidgetItem::widget(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWidgetItem::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItem_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWidgetItem::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWidgetItem::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidgetItem_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWidgetItem::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QWidgetItem::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItem_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QWidgetItem::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QWidgetItem::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidgetItem_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QWidgetItem::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QWidgetItem::invalidate(); + return; + } + + + miqt_exec_callback_QWidgetItem_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QWidgetItem::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QWidgetItem::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QWidgetItem_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QWidgetItem::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SpacerItem = 0; + + // Subclass to allow providing a Go implementation + virtual QSpacerItem* spacerItem() override { + if (handle__SpacerItem == 0) { + return QWidgetItem::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QWidgetItem_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QWidgetItem::spacerItem(); + + } + +}; + +void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQWidgetItem* ret = new MiqtVirtualQWidgetItem(w); + *outptr_QWidgetItem = ret; + *outptr_QLayoutItem = static_cast(ret); } QSize* QWidgetItem_SizeHint(const QWidgetItem* self) { @@ -205,12 +1042,397 @@ int QWidgetItem_ControlTypes(const QWidgetItem* self) { return static_cast(_ret); } -void QWidgetItem_Delete(QWidgetItem* self) { - delete self; +void QWidgetItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__SizeHint = slot; +} + +QSize* QWidgetItem_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_SizeHint(); +} + +void QWidgetItem_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__MinimumSize = slot; +} + +QSize* QWidgetItem_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_MinimumSize(); +} + +void QWidgetItem_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__MaximumSize = slot; +} + +QSize* QWidgetItem_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_MaximumSize(); +} + +void QWidgetItem_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__ExpandingDirections = slot; } -QWidgetItemV2* QWidgetItemV2_new(QWidget* widget) { - return new QWidgetItemV2(widget); +int QWidgetItem_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_ExpandingDirections(); +} + +void QWidgetItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__IsEmpty = slot; +} + +bool QWidgetItem_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_IsEmpty(); +} + +void QWidgetItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__SetGeometry = slot; +} + +void QWidgetItem_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QWidgetItem_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Geometry = slot; +} + +QRect* QWidgetItem_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_Geometry(); +} + +void QWidgetItem_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Widget = slot; +} + +QWidget* QWidgetItem_virtualbase_Widget(void* self) { + return ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_Widget(); +} + +void QWidgetItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWidgetItem_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWidgetItem_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__HeightForWidth = slot; +} + +int QWidgetItem_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWidgetItem_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__ControlTypes = slot; +} + +int QWidgetItem_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_ControlTypes(); +} + +void QWidgetItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QWidgetItem_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QWidgetItem_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Invalidate = slot; +} + +void QWidgetItem_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_Invalidate(); +} + +void QWidgetItem_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Layout = slot; +} + +QLayout* QWidgetItem_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_Layout(); +} + +void QWidgetItem_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QWidgetItem_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_SpacerItem(); +} + +void QWidgetItem_Delete(QWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWidgetItemV2 : public virtual QWidgetItemV2 { +public: + + MiqtVirtualQWidgetItemV2(QWidget* widget): QWidgetItemV2(widget) {}; + + virtual ~MiqtVirtualQWidgetItemV2() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWidgetItemV2::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItemV2_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWidgetItemV2::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QWidgetItemV2::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItemV2_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QWidgetItemV2::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QWidgetItemV2::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItemV2_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QWidgetItemV2::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QWidgetItemV2::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QWidgetItemV2::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QWidgetItemV2::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QWidgetItemV2::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QWidgetItemV2::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItemV2_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QWidgetItemV2::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QWidgetItemV2::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QWidgetItemV2_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QWidgetItemV2::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QWidgetItemV2::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QWidgetItemV2_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QWidgetItemV2::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Widget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* widget() override { + if (handle__Widget == 0) { + return QWidgetItemV2::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QWidgetItemV2_Widget(this, handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() { + + return QWidgetItemV2::widget(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWidgetItemV2::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItemV2_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWidgetItemV2::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QWidgetItemV2::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QWidgetItemV2::controlTypes(); + return static_cast(_ret); + + } + +}; + +void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQWidgetItemV2* ret = new MiqtVirtualQWidgetItemV2(widget); + *outptr_QWidgetItemV2 = ret; + *outptr_QWidgetItem = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self) { @@ -229,7 +1451,99 @@ int QWidgetItemV2_HeightForWidth(const QWidgetItemV2* self, int width) { return self->heightForWidth(static_cast(width)); } -void QWidgetItemV2_Delete(QWidgetItemV2* self) { - delete self; +void QWidgetItemV2_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__SizeHint = slot; +} + +QSize* QWidgetItemV2_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_SizeHint(); +} + +void QWidgetItemV2_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__MinimumSize = slot; +} + +QSize* QWidgetItemV2_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_MinimumSize(); +} + +void QWidgetItemV2_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__MaximumSize = slot; +} + +QSize* QWidgetItemV2_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_MaximumSize(); +} + +void QWidgetItemV2_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__HeightForWidth = slot; +} + +int QWidgetItemV2_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_HeightForWidth(width); +} + +void QWidgetItemV2_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__ExpandingDirections = slot; +} + +int QWidgetItemV2_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_ExpandingDirections(); +} + +void QWidgetItemV2_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__IsEmpty = slot; +} + +bool QWidgetItemV2_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_IsEmpty(); +} + +void QWidgetItemV2_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__SetGeometry = slot; +} + +void QWidgetItemV2_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QWidgetItemV2_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__Geometry = slot; +} + +QRect* QWidgetItemV2_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_Geometry(); +} + +void QWidgetItemV2_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__Widget = slot; +} + +QWidget* QWidgetItemV2_virtualbase_Widget(void* self) { + return ( (MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_Widget(); +} + +void QWidgetItemV2_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWidgetItemV2_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWidgetItemV2_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__ControlTypes = slot; +} + +int QWidgetItemV2_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_ControlTypes(); +} + +void QWidgetItemV2_Delete(QWidgetItemV2* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlayoutitem.go b/qt/gen_qlayoutitem.go index 4025237f..13b0b027 100644 --- a/qt/gen_qlayoutitem.go +++ b/qt/gen_qlayoutitem.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QLayoutItem struct { - h *C.QLayoutItem + h *C.QLayoutItem + isSubclass bool } func (this *QLayoutItem) cPointer() *C.QLayoutItem { @@ -31,6 +33,7 @@ func (this *QLayoutItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLayoutItem constructs the type using only CGO pointers. func newQLayoutItem(h *C.QLayoutItem) *QLayoutItem { if h == nil { return nil @@ -38,8 +41,13 @@ func newQLayoutItem(h *C.QLayoutItem) *QLayoutItem { return &QLayoutItem{h: h} } +// UnsafeNewQLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQLayoutItem(h unsafe.Pointer) *QLayoutItem { - return newQLayoutItem((*C.QLayoutItem)(h)) + if h == nil { + return nil + } + + return &QLayoutItem{h: (*C.QLayoutItem)(h)} } func (this *QLayoutItem) SizeHint() *QSize { @@ -99,15 +107,15 @@ func (this *QLayoutItem) Invalidate() { } func (this *QLayoutItem) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLayoutItem_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLayoutItem_Widget(this.h)), nil, nil) } func (this *QLayoutItem) Layout() *QLayout { - return UnsafeNewQLayout(unsafe.Pointer(C.QLayoutItem_Layout(this.h))) + return UnsafeNewQLayout(unsafe.Pointer(C.QLayoutItem_Layout(this.h)), nil, nil) } func (this *QLayoutItem) SpacerItem() *QSpacerItem { - return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayoutItem_SpacerItem(this.h))) + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayoutItem_SpacerItem(this.h)), nil) } func (this *QLayoutItem) Alignment() AlignmentFlag { @@ -124,7 +132,7 @@ func (this *QLayoutItem) ControlTypes() QSizePolicy__ControlType { // Delete this object from C++ memory. func (this *QLayoutItem) Delete() { - C.QLayoutItem_Delete(this.h) + C.QLayoutItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -137,7 +145,8 @@ func (this *QLayoutItem) GoGC() { } type QSpacerItem struct { - h *C.QSpacerItem + h *C.QSpacerItem + isSubclass bool *QLayoutItem } @@ -155,39 +164,67 @@ func (this *QSpacerItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSpacerItem(h *C.QSpacerItem) *QSpacerItem { +// newQSpacerItem constructs the type using only CGO pointers. +func newQSpacerItem(h *C.QSpacerItem, h_QLayoutItem *C.QLayoutItem) *QSpacerItem { if h == nil { return nil } - return &QSpacerItem{h: h, QLayoutItem: UnsafeNewQLayoutItem(unsafe.Pointer(h))} + return &QSpacerItem{h: h, + QLayoutItem: newQLayoutItem(h_QLayoutItem)} } -func UnsafeNewQSpacerItem(h unsafe.Pointer) *QSpacerItem { - return newQSpacerItem((*C.QSpacerItem)(h)) +// UnsafeNewQSpacerItem constructs the type using only unsafe pointers. +func UnsafeNewQSpacerItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QSpacerItem { + if h == nil { + return nil + } + + return &QSpacerItem{h: (*C.QSpacerItem)(h), + QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } // NewQSpacerItem constructs a new QSpacerItem object. func NewQSpacerItem(w int, h int) *QSpacerItem { - ret := C.QSpacerItem_new((C.int)(w), (C.int)(h)) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new((C.int)(w), (C.int)(h), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQSpacerItem2 constructs a new QSpacerItem object. func NewQSpacerItem2(param1 *QSpacerItem) *QSpacerItem { - ret := C.QSpacerItem_new2(param1.cPointer()) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new2(param1.cPointer(), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQSpacerItem3 constructs a new QSpacerItem object. func NewQSpacerItem3(w int, h int, hData QSizePolicy__Policy) *QSpacerItem { - ret := C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData)) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQSpacerItem4 constructs a new QSpacerItem object. func NewQSpacerItem4(w int, h int, hData QSizePolicy__Policy, vData QSizePolicy__Policy) *QSpacerItem { - ret := C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData)) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QSpacerItem) ChangeSize(w int, h int) { @@ -235,7 +272,7 @@ func (this *QSpacerItem) Geometry() *QRect { } func (this *QSpacerItem) SpacerItem() *QSpacerItem { - return UnsafeNewQSpacerItem(unsafe.Pointer(C.QSpacerItem_SpacerItem(this.h))) + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QSpacerItem_SpacerItem(this.h)), nil) } func (this *QSpacerItem) SizePolicy() *QSizePolicy { @@ -253,9 +290,353 @@ func (this *QSpacerItem) ChangeSize4(w int, h int, hData QSizePolicy__Policy, vD C.QSpacerItem_ChangeSize4(this.h, (C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData)) } +func (this *QSpacerItem) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSpacerItem_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSpacerItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_SizeHint +func miqt_exec_callback_QSpacerItem_SizeHint(self *C.QSpacerItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QSpacerItem_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QSpacerItem_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_MinimumSize +func miqt_exec_callback_QSpacerItem_MinimumSize(self *C.QSpacerItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QSpacerItem_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QSpacerItem_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_MaximumSize +func miqt_exec_callback_QSpacerItem_MaximumSize(self *C.QSpacerItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QSpacerItem_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QSpacerItem_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_ExpandingDirections +func miqt_exec_callback_QSpacerItem_ExpandingDirections(self *C.QSpacerItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QSpacerItem_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnIsEmpty(slot func(super func() bool) bool) { + C.QSpacerItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_IsEmpty +func miqt_exec_callback_QSpacerItem_IsEmpty(self *C.QSpacerItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QSpacerItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QSpacerItem) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QSpacerItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_SetGeometry +func miqt_exec_callback_QSpacerItem_SetGeometry(self *C.QSpacerItem, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QSpacerItem{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QSpacerItem) callVirtualBase_Geometry() *QRect { + + _ret := C.QSpacerItem_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QSpacerItem_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Geometry +func miqt_exec_callback_QSpacerItem_Geometry(self *C.QSpacerItem, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QSpacerItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QSpacerItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QSpacerItem_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_SpacerItem +func miqt_exec_callback_QSpacerItem_SpacerItem(self *C.QSpacerItem, cb C.intptr_t) *C.QSpacerItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSpacerItem) *QSpacerItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSpacerItem_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSpacerItem_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_HasHeightForWidth +func miqt_exec_callback_QSpacerItem_HasHeightForWidth(self *C.QSpacerItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSpacerItem_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSpacerItem) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSpacerItem_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_HeightForWidth +func miqt_exec_callback_QSpacerItem_HeightForWidth(self *C.QSpacerItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QSpacerItem_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSpacerItem) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSpacerItem_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_MinimumHeightForWidth +func miqt_exec_callback_QSpacerItem_MinimumHeightForWidth(self *C.QSpacerItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_Invalidate() { + + C.QSpacerItem_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QSpacerItem) OnInvalidate(slot func(super func())) { + C.QSpacerItem_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Invalidate +func miqt_exec_callback_QSpacerItem_Invalidate(self *C.QSpacerItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSpacerItem{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QSpacerItem) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QSpacerItem_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QSpacerItem) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QSpacerItem_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Widget +func miqt_exec_callback_QSpacerItem_Widget(self *C.QSpacerItem, cb C.intptr_t) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QSpacerItem_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QSpacerItem) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QSpacerItem_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Layout +func miqt_exec_callback_QSpacerItem_Layout(self *C.QSpacerItem, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QSpacerItem_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QSpacerItem_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_ControlTypes +func miqt_exec_callback_QSpacerItem_ControlTypes(self *C.QSpacerItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSpacerItem) Delete() { - C.QSpacerItem_Delete(this.h) + C.QSpacerItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -268,7 +649,8 @@ func (this *QSpacerItem) GoGC() { } type QWidgetItem struct { - h *C.QWidgetItem + h *C.QWidgetItem + isSubclass bool *QLayoutItem } @@ -286,21 +668,34 @@ func (this *QWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidgetItem(h *C.QWidgetItem) *QWidgetItem { +// newQWidgetItem constructs the type using only CGO pointers. +func newQWidgetItem(h *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItem { if h == nil { return nil } - return &QWidgetItem{h: h, QLayoutItem: UnsafeNewQLayoutItem(unsafe.Pointer(h))} + return &QWidgetItem{h: h, + QLayoutItem: newQLayoutItem(h_QLayoutItem)} } -func UnsafeNewQWidgetItem(h unsafe.Pointer) *QWidgetItem { - return newQWidgetItem((*C.QWidgetItem)(h)) +// UnsafeNewQWidgetItem constructs the type using only unsafe pointers. +func UnsafeNewQWidgetItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItem { + if h == nil { + return nil + } + + return &QWidgetItem{h: (*C.QWidgetItem)(h), + QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } // NewQWidgetItem constructs a new QWidgetItem object. func NewQWidgetItem(w *QWidget) *QWidgetItem { - ret := C.QWidgetItem_new(w.cPointer()) - return newQWidgetItem(ret) + var outptr_QWidgetItem *C.QWidgetItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QWidgetItem_new(w.cPointer(), &outptr_QWidgetItem, &outptr_QLayoutItem) + ret := newQWidgetItem(outptr_QWidgetItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QWidgetItem) SizeHint() *QSize { @@ -344,7 +739,7 @@ func (this *QWidgetItem) Geometry() *QRect { } func (this *QWidgetItem) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItem_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItem_Widget(this.h)), nil, nil) } func (this *QWidgetItem) HasHeightForWidth() bool { @@ -359,9 +754,353 @@ func (this *QWidgetItem) ControlTypes() QSizePolicy__ControlType { return (QSizePolicy__ControlType)(C.QWidgetItem_ControlTypes(this.h)) } +func (this *QWidgetItem) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWidgetItem_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItem) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidgetItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_SizeHint +func miqt_exec_callback_QWidgetItem_SizeHint(self *C.QWidgetItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QWidgetItem_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItem) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItem_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_MinimumSize +func miqt_exec_callback_QWidgetItem_MinimumSize(self *C.QWidgetItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QWidgetItem_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItem) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItem_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_MaximumSize +func miqt_exec_callback_QWidgetItem_MaximumSize(self *C.QWidgetItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QWidgetItem_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QWidgetItem_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_ExpandingDirections +func miqt_exec_callback_QWidgetItem_ExpandingDirections(self *C.QWidgetItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QWidgetItem_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnIsEmpty(slot func(super func() bool) bool) { + C.QWidgetItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_IsEmpty +func miqt_exec_callback_QWidgetItem_IsEmpty(self *C.QWidgetItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QWidgetItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QWidgetItem) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QWidgetItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_SetGeometry +func miqt_exec_callback_QWidgetItem_SetGeometry(self *C.QWidgetItem, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QWidgetItem{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QWidgetItem) callVirtualBase_Geometry() *QRect { + + _ret := C.QWidgetItem_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItem) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QWidgetItem_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Geometry +func miqt_exec_callback_QWidgetItem_Geometry(self *C.QWidgetItem, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItem_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QWidgetItem) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QWidgetItem_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Widget +func miqt_exec_callback_QWidgetItem_Widget(self *C.QWidgetItem, cb C.intptr_t) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWidgetItem_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWidgetItem_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_HasHeightForWidth +func miqt_exec_callback_QWidgetItem_HasHeightForWidth(self *C.QWidgetItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWidgetItem_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidgetItem) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidgetItem_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_HeightForWidth +func miqt_exec_callback_QWidgetItem_HeightForWidth(self *C.QWidgetItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QWidgetItem_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QWidgetItem_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_ControlTypes +func miqt_exec_callback_QWidgetItem_ControlTypes(self *C.QWidgetItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QWidgetItem_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidgetItem) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidgetItem_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_MinimumHeightForWidth +func miqt_exec_callback_QWidgetItem_MinimumHeightForWidth(self *C.QWidgetItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_Invalidate() { + + C.QWidgetItem_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QWidgetItem) OnInvalidate(slot func(super func())) { + C.QWidgetItem_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Invalidate +func miqt_exec_callback_QWidgetItem_Invalidate(self *C.QWidgetItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWidgetItem{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QWidgetItem) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QWidgetItem_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QWidgetItem) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QWidgetItem_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Layout +func miqt_exec_callback_QWidgetItem_Layout(self *C.QWidgetItem, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QWidgetItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QWidgetItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QWidgetItem_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_SpacerItem +func miqt_exec_callback_QWidgetItem_SpacerItem(self *C.QWidgetItem, cb C.intptr_t) *C.QSpacerItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSpacerItem) *QSpacerItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QWidgetItem) Delete() { - C.QWidgetItem_Delete(this.h) + C.QWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -374,7 +1113,8 @@ func (this *QWidgetItem) GoGC() { } type QWidgetItemV2 struct { - h *C.QWidgetItemV2 + h *C.QWidgetItemV2 + isSubclass bool *QWidgetItem } @@ -392,21 +1132,35 @@ func (this *QWidgetItemV2) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidgetItemV2(h *C.QWidgetItemV2) *QWidgetItemV2 { +// newQWidgetItemV2 constructs the type using only CGO pointers. +func newQWidgetItemV2(h *C.QWidgetItemV2, h_QWidgetItem *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItemV2 { if h == nil { return nil } - return &QWidgetItemV2{h: h, QWidgetItem: UnsafeNewQWidgetItem(unsafe.Pointer(h))} + return &QWidgetItemV2{h: h, + QWidgetItem: newQWidgetItem(h_QWidgetItem, h_QLayoutItem)} } -func UnsafeNewQWidgetItemV2(h unsafe.Pointer) *QWidgetItemV2 { - return newQWidgetItemV2((*C.QWidgetItemV2)(h)) +// UnsafeNewQWidgetItemV2 constructs the type using only unsafe pointers. +func UnsafeNewQWidgetItemV2(h unsafe.Pointer, h_QWidgetItem unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItemV2 { + if h == nil { + return nil + } + + return &QWidgetItemV2{h: (*C.QWidgetItemV2)(h), + QWidgetItem: UnsafeNewQWidgetItem(h_QWidgetItem, h_QLayoutItem)} } // NewQWidgetItemV2 constructs a new QWidgetItemV2 object. func NewQWidgetItemV2(widget *QWidget) *QWidgetItemV2 { - ret := C.QWidgetItemV2_new(widget.cPointer()) - return newQWidgetItemV2(ret) + var outptr_QWidgetItemV2 *C.QWidgetItemV2 = nil + var outptr_QWidgetItem *C.QWidgetItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QWidgetItemV2_new(widget.cPointer(), &outptr_QWidgetItemV2, &outptr_QWidgetItem, &outptr_QLayoutItem) + ret := newQWidgetItemV2(outptr_QWidgetItemV2, outptr_QWidgetItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QWidgetItemV2) SizeHint() *QSize { @@ -434,9 +1188,266 @@ func (this *QWidgetItemV2) HeightForWidth(width int) int { return (int)(C.QWidgetItemV2_HeightForWidth(this.h, (C.int)(width))) } +func (this *QWidgetItemV2) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWidgetItemV2_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidgetItemV2_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_SizeHint +func miqt_exec_callback_QWidgetItemV2_SizeHint(self *C.QWidgetItemV2, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QWidgetItemV2_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItemV2_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_MinimumSize +func miqt_exec_callback_QWidgetItemV2_MinimumSize(self *C.QWidgetItemV2, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QWidgetItemV2_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItemV2_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_MaximumSize +func miqt_exec_callback_QWidgetItemV2_MaximumSize(self *C.QWidgetItemV2, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QWidgetItemV2_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QWidgetItemV2) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QWidgetItemV2_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_HeightForWidth +func miqt_exec_callback_QWidgetItemV2_HeightForWidth(self *C.QWidgetItemV2, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QWidgetItemV2_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QWidgetItemV2_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_ExpandingDirections +func miqt_exec_callback_QWidgetItemV2_ExpandingDirections(self *C.QWidgetItemV2, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QWidgetItemV2_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnIsEmpty(slot func(super func() bool) bool) { + C.QWidgetItemV2_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_IsEmpty +func miqt_exec_callback_QWidgetItemV2_IsEmpty(self *C.QWidgetItemV2, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QWidgetItemV2_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QWidgetItemV2) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QWidgetItemV2_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_SetGeometry +func miqt_exec_callback_QWidgetItemV2_SetGeometry(self *C.QWidgetItemV2, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QWidgetItemV2{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QWidgetItemV2) callVirtualBase_Geometry() *QRect { + + _ret := C.QWidgetItemV2_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QWidgetItemV2_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_Geometry +func miqt_exec_callback_QWidgetItemV2_Geometry(self *C.QWidgetItemV2, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItemV2_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QWidgetItemV2) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QWidgetItemV2_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_Widget +func miqt_exec_callback_QWidgetItemV2_Widget(self *C.QWidgetItemV2, cb C.intptr_t) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWidgetItemV2_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWidgetItemV2_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_HasHeightForWidth +func miqt_exec_callback_QWidgetItemV2_HasHeightForWidth(self *C.QWidgetItemV2, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QWidgetItemV2_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QWidgetItemV2_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_ControlTypes +func miqt_exec_callback_QWidgetItemV2_ControlTypes(self *C.QWidgetItemV2, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QWidgetItemV2) Delete() { - C.QWidgetItemV2_Delete(this.h) + C.QWidgetItemV2_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlayoutitem.h b/qt/gen_qlayoutitem.h index c3400785..8def6c1a 100644 --- a/qt/gen_qlayoutitem.h +++ b/qt/gen_qlayoutitem.h @@ -53,12 +53,12 @@ QSpacerItem* QLayoutItem_SpacerItem(QLayoutItem* self); int QLayoutItem_Alignment(const QLayoutItem* self); void QLayoutItem_SetAlignment(QLayoutItem* self, int a); int QLayoutItem_ControlTypes(const QLayoutItem* self); -void QLayoutItem_Delete(QLayoutItem* self); +void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass); -QSpacerItem* QSpacerItem_new(int w, int h); -QSpacerItem* QSpacerItem_new2(QSpacerItem* param1); -QSpacerItem* QSpacerItem_new3(int w, int h, int hData); -QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData); +void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h); QSize* QSpacerItem_SizeHint(const QSpacerItem* self); QSize* QSpacerItem_MinimumSize(const QSpacerItem* self); @@ -71,9 +71,39 @@ QSpacerItem* QSpacerItem_SpacerItem(QSpacerItem* self); QSizePolicy* QSpacerItem_SizePolicy(const QSpacerItem* self); void QSpacerItem_ChangeSize3(QSpacerItem* self, int w, int h, int hData); void QSpacerItem_ChangeSize4(QSpacerItem* self, int w, int h, int hData, int vData); -void QSpacerItem_Delete(QSpacerItem* self); +void QSpacerItem_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSpacerItem_virtualbase_SizeHint(const void* self); +void QSpacerItem_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QSpacerItem_virtualbase_MinimumSize(const void* self); +void QSpacerItem_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QSpacerItem_virtualbase_MaximumSize(const void* self); +void QSpacerItem_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QSpacerItem_virtualbase_ExpandingDirections(const void* self); +void QSpacerItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QSpacerItem_virtualbase_IsEmpty(const void* self); +void QSpacerItem_override_virtual_SetGeometry(void* self, intptr_t slot); +void QSpacerItem_virtualbase_SetGeometry(void* self, QRect* geometry); +void QSpacerItem_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QSpacerItem_virtualbase_Geometry(const void* self); +void QSpacerItem_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QSpacerItem_virtualbase_SpacerItem(void* self); +void QSpacerItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSpacerItem_virtualbase_HasHeightForWidth(const void* self); +void QSpacerItem_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSpacerItem_virtualbase_HeightForWidth(const void* self, int param1); +void QSpacerItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QSpacerItem_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QSpacerItem_override_virtual_Invalidate(void* self, intptr_t slot); +void QSpacerItem_virtualbase_Invalidate(void* self); +void QSpacerItem_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QSpacerItem_virtualbase_Widget(void* self); +void QSpacerItem_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QSpacerItem_virtualbase_Layout(void* self); +void QSpacerItem_override_virtual_ControlTypes(void* self, intptr_t slot); +int QSpacerItem_virtualbase_ControlTypes(const void* self); +void QSpacerItem_Delete(QSpacerItem* self, bool isSubclass); -QWidgetItem* QWidgetItem_new(QWidget* w); +void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); QSize* QWidgetItem_SizeHint(const QWidgetItem* self); QSize* QWidgetItem_MinimumSize(const QWidgetItem* self); QSize* QWidgetItem_MaximumSize(const QWidgetItem* self); @@ -85,14 +115,66 @@ QWidget* QWidgetItem_Widget(QWidgetItem* self); bool QWidgetItem_HasHeightForWidth(const QWidgetItem* self); int QWidgetItem_HeightForWidth(const QWidgetItem* self, int param1); int QWidgetItem_ControlTypes(const QWidgetItem* self); -void QWidgetItem_Delete(QWidgetItem* self); +void QWidgetItem_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWidgetItem_virtualbase_SizeHint(const void* self); +void QWidgetItem_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QWidgetItem_virtualbase_MinimumSize(const void* self); +void QWidgetItem_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QWidgetItem_virtualbase_MaximumSize(const void* self); +void QWidgetItem_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QWidgetItem_virtualbase_ExpandingDirections(const void* self); +void QWidgetItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QWidgetItem_virtualbase_IsEmpty(const void* self); +void QWidgetItem_override_virtual_SetGeometry(void* self, intptr_t slot); +void QWidgetItem_virtualbase_SetGeometry(void* self, QRect* geometry); +void QWidgetItem_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QWidgetItem_virtualbase_Geometry(const void* self); +void QWidgetItem_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QWidgetItem_virtualbase_Widget(void* self); +void QWidgetItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWidgetItem_virtualbase_HasHeightForWidth(const void* self); +void QWidgetItem_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWidgetItem_virtualbase_HeightForWidth(const void* self, int param1); +void QWidgetItem_override_virtual_ControlTypes(void* self, intptr_t slot); +int QWidgetItem_virtualbase_ControlTypes(const void* self); +void QWidgetItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QWidgetItem_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QWidgetItem_override_virtual_Invalidate(void* self, intptr_t slot); +void QWidgetItem_virtualbase_Invalidate(void* self); +void QWidgetItem_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QWidgetItem_virtualbase_Layout(void* self); +void QWidgetItem_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QWidgetItem_virtualbase_SpacerItem(void* self); +void QWidgetItem_Delete(QWidgetItem* self, bool isSubclass); -QWidgetItemV2* QWidgetItemV2_new(QWidget* widget); +void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self); QSize* QWidgetItemV2_MinimumSize(const QWidgetItemV2* self); QSize* QWidgetItemV2_MaximumSize(const QWidgetItemV2* self); int QWidgetItemV2_HeightForWidth(const QWidgetItemV2* self, int width); -void QWidgetItemV2_Delete(QWidgetItemV2* self); +void QWidgetItemV2_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWidgetItemV2_virtualbase_SizeHint(const void* self); +void QWidgetItemV2_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QWidgetItemV2_virtualbase_MinimumSize(const void* self); +void QWidgetItemV2_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QWidgetItemV2_virtualbase_MaximumSize(const void* self); +void QWidgetItemV2_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_HeightForWidth(const void* self, int width); +void QWidgetItemV2_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_ExpandingDirections(const void* self); +void QWidgetItemV2_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QWidgetItemV2_virtualbase_IsEmpty(const void* self); +void QWidgetItemV2_override_virtual_SetGeometry(void* self, intptr_t slot); +void QWidgetItemV2_virtualbase_SetGeometry(void* self, QRect* geometry); +void QWidgetItemV2_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QWidgetItemV2_virtualbase_Geometry(const void* self); +void QWidgetItemV2_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QWidgetItemV2_virtualbase_Widget(void* self); +void QWidgetItemV2_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWidgetItemV2_virtualbase_HasHeightForWidth(const void* self); +void QWidgetItemV2_override_virtual_ControlTypes(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_ControlTypes(const void* self); +void QWidgetItemV2_Delete(QWidgetItemV2* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlcdnumber.cpp b/qt/gen_qlcdnumber.cpp index 59fe52f5..e8e616fb 100644 --- a/qt/gen_qlcdnumber.cpp +++ b/qt/gen_qlcdnumber.cpp @@ -1,5 +1,10 @@ +#include +#include #include #include +#include +#include +#include #include #include #include @@ -9,20 +14,145 @@ #include "gen_qlcdnumber.h" #include "_cgo_export.h" -QLCDNumber* QLCDNumber_new(QWidget* parent) { - return new QLCDNumber(parent); +class MiqtVirtualQLCDNumber : public virtual QLCDNumber { +public: + + MiqtVirtualQLCDNumber(QWidget* parent): QLCDNumber(parent) {}; + MiqtVirtualQLCDNumber(): QLCDNumber() {}; + MiqtVirtualQLCDNumber(uint numDigits): QLCDNumber(numDigits) {}; + MiqtVirtualQLCDNumber(uint numDigits, QWidget* parent): QLCDNumber(numDigits, parent) {}; + + virtual ~MiqtVirtualQLCDNumber() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QLCDNumber::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLCDNumber_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QLCDNumber::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QLCDNumber::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QLCDNumber_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QLCDNumber::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QLCDNumber::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QLCDNumber_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QLCDNumber::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QLCDNumber::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QLCDNumber_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QLCDNumber::changeEvent(param1); + + } + +}; + +void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(parent); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLCDNumber* QLCDNumber_new2() { - return new QLCDNumber(); +void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLCDNumber* QLCDNumber_new3(unsigned int numDigits) { - return new QLCDNumber(static_cast(numDigits)); +void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits)); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent) { - return new QLCDNumber(static_cast(numDigits), parent); +void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits), parent); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self) { @@ -143,7 +273,7 @@ void QLCDNumber_Overflow(QLCDNumber* self) { } void QLCDNumber_connect_Overflow(QLCDNumber* self, intptr_t slot) { - QLCDNumber::connect(self, static_cast(&QLCDNumber::overflow), self, [=]() { + MiqtVirtualQLCDNumber::connect(self, static_cast(&QLCDNumber::overflow), self, [=]() { miqt_exec_callback_QLCDNumber_Overflow(slot); }); } @@ -192,7 +322,43 @@ struct miqt_string QLCDNumber_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QLCDNumber_Delete(QLCDNumber* self) { - delete self; +void QLCDNumber_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__SizeHint = slot; +} + +QSize* QLCDNumber_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQLCDNumber*)(self) )->virtualbase_SizeHint(); +} + +void QLCDNumber_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__Event = slot; +} + +bool QLCDNumber_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQLCDNumber*)(self) )->virtualbase_Event(e); +} + +void QLCDNumber_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__PaintEvent = slot; +} + +void QLCDNumber_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQLCDNumber*)(self) )->virtualbase_PaintEvent(param1); +} + +void QLCDNumber_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__ChangeEvent = slot; +} + +void QLCDNumber_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQLCDNumber*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QLCDNumber_Delete(QLCDNumber* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlcdnumber.go b/qt/gen_qlcdnumber.go index 153775e1..39b2ea18 100644 --- a/qt/gen_qlcdnumber.go +++ b/qt/gen_qlcdnumber.go @@ -32,7 +32,8 @@ const ( ) type QLCDNumber struct { - h *C.QLCDNumber + h *C.QLCDNumber + isSubclass bool *QFrame } @@ -50,39 +51,79 @@ func (this *QLCDNumber) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLCDNumber(h *C.QLCDNumber) *QLCDNumber { +// newQLCDNumber constructs the type using only CGO pointers. +func newQLCDNumber(h *C.QLCDNumber, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLCDNumber { if h == nil { return nil } - return &QLCDNumber{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QLCDNumber{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQLCDNumber(h unsafe.Pointer) *QLCDNumber { - return newQLCDNumber((*C.QLCDNumber)(h)) +// UnsafeNewQLCDNumber constructs the type using only unsafe pointers. +func UnsafeNewQLCDNumber(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLCDNumber { + if h == nil { + return nil + } + + return &QLCDNumber{h: (*C.QLCDNumber)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQLCDNumber constructs a new QLCDNumber object. func NewQLCDNumber(parent *QWidget) *QLCDNumber { - ret := C.QLCDNumber_new(parent.cPointer()) - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new(parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLCDNumber2 constructs a new QLCDNumber object. func NewQLCDNumber2() *QLCDNumber { - ret := C.QLCDNumber_new2() - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new2(&outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLCDNumber3 constructs a new QLCDNumber object. func NewQLCDNumber3(numDigits uint) *QLCDNumber { - ret := C.QLCDNumber_new3((C.uint)(numDigits)) - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new3((C.uint)(numDigits), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLCDNumber4 constructs a new QLCDNumber object. func NewQLCDNumber4(numDigits uint, parent *QWidget) *QLCDNumber { - ret := C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer()) - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QLCDNumber) MetaObject() *QMetaObject { @@ -261,9 +302,105 @@ func QLCDNumber_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QLCDNumber) callVirtualBase_SizeHint() *QSize { + + _ret := C.QLCDNumber_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLCDNumber) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QLCDNumber_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_SizeHint +func miqt_exec_callback_QLCDNumber_SizeHint(self *C.QLCDNumber, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLCDNumber{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLCDNumber) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QLCDNumber_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QLCDNumber) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QLCDNumber_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_Event +func miqt_exec_callback_QLCDNumber_Event(self *C.QLCDNumber, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QLCDNumber{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLCDNumber) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QLCDNumber_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLCDNumber) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QLCDNumber_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_PaintEvent +func miqt_exec_callback_QLCDNumber_PaintEvent(self *C.QLCDNumber, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLCDNumber{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QLCDNumber) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QLCDNumber_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLCDNumber) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QLCDNumber_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_ChangeEvent +func miqt_exec_callback_QLCDNumber_ChangeEvent(self *C.QLCDNumber, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QLCDNumber{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QLCDNumber) Delete() { - C.QLCDNumber_Delete(this.h) + C.QLCDNumber_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlcdnumber.h b/qt/gen_qlcdnumber.h index 9a23c1b3..3c037599 100644 --- a/qt/gen_qlcdnumber.h +++ b/qt/gen_qlcdnumber.h @@ -15,21 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QFrame; class QLCDNumber; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; class QSize; class QWidget; #else +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QLCDNumber QLCDNumber; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QLCDNumber* QLCDNumber_new(QWidget* parent); -QLCDNumber* QLCDNumber_new2(); -QLCDNumber* QLCDNumber_new3(unsigned int numDigits); -QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent); +void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self); void* QLCDNumber_Metacast(QLCDNumber* self, const char* param1); struct miqt_string QLCDNumber_Tr(const char* s); @@ -56,11 +66,21 @@ void QLCDNumber_SetBinMode(QLCDNumber* self); void QLCDNumber_SetSmallDecimalPoint(QLCDNumber* self, bool smallDecimalPoint); void QLCDNumber_Overflow(QLCDNumber* self); void QLCDNumber_connect_Overflow(QLCDNumber* self, intptr_t slot); +bool QLCDNumber_Event(QLCDNumber* self, QEvent* e); +void QLCDNumber_PaintEvent(QLCDNumber* self, QPaintEvent* param1); struct miqt_string QLCDNumber_Tr2(const char* s, const char* c); struct miqt_string QLCDNumber_Tr3(const char* s, const char* c, int n); struct miqt_string QLCDNumber_TrUtf82(const char* s, const char* c); struct miqt_string QLCDNumber_TrUtf83(const char* s, const char* c, int n); -void QLCDNumber_Delete(QLCDNumber* self); +void QLCDNumber_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLCDNumber_virtualbase_SizeHint(const void* self); +void QLCDNumber_override_virtual_Event(void* self, intptr_t slot); +bool QLCDNumber_virtualbase_Event(void* self, QEvent* e); +void QLCDNumber_override_virtual_PaintEvent(void* self, intptr_t slot); +void QLCDNumber_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QLCDNumber_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QLCDNumber_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QLCDNumber_Delete(QLCDNumber* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlibrary.cpp b/qt/gen_qlibrary.cpp index 82e336e3..e2961bb3 100644 --- a/qt/gen_qlibrary.cpp +++ b/qt/gen_qlibrary.cpp @@ -1,51 +1,258 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qlibrary.h" #include "_cgo_export.h" -QLibrary* QLibrary_new() { - return new QLibrary(); +class MiqtVirtualQLibrary : public virtual QLibrary { +public: + + MiqtVirtualQLibrary(): QLibrary() {}; + MiqtVirtualQLibrary(const QString& fileName): QLibrary(fileName) {}; + MiqtVirtualQLibrary(const QString& fileName, int verNum): QLibrary(fileName, verNum) {}; + MiqtVirtualQLibrary(const QString& fileName, const QString& version): QLibrary(fileName, version) {}; + MiqtVirtualQLibrary(QObject* parent): QLibrary(parent) {}; + MiqtVirtualQLibrary(const QString& fileName, QObject* parent): QLibrary(fileName, parent) {}; + MiqtVirtualQLibrary(const QString& fileName, int verNum, QObject* parent): QLibrary(fileName, verNum, parent) {}; + MiqtVirtualQLibrary(const QString& fileName, const QString& version, QObject* parent): QLibrary(fileName, version, parent) {}; + + virtual ~MiqtVirtualQLibrary() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QLibrary::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QLibrary_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QLibrary::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QLibrary::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QLibrary_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QLibrary::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QLibrary::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QLibrary_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QLibrary::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QLibrary::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QLibrary_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QLibrary::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QLibrary::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLibrary_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QLibrary::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QLibrary::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLibrary_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QLibrary::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QLibrary::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLibrary_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QLibrary::disconnectNotify(*signal); + + } + +}; + +void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject) { + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new2(struct miqt_string fileName) { +void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum) { +void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString, static_cast(verNum)); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum)); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version) { +void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - return new QLibrary(fileName_QString, version_QString); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new5(QObject* parent) { - return new QLibrary(parent); +void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent) { +void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString, parent); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent) { +void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString, static_cast(verNum), parent); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum), parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent) { +void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - return new QLibrary(fileName_QString, version_QString, parent); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString, parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QLibrary_MetaObject(const QLibrary* self) { @@ -186,7 +393,67 @@ struct miqt_string QLibrary_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QLibrary_Delete(QLibrary* self) { - delete self; +void QLibrary_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__Event = slot; +} + +bool QLibrary_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQLibrary*)(self) )->virtualbase_Event(event); +} + +void QLibrary_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__EventFilter = slot; +} + +bool QLibrary_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQLibrary*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QLibrary_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__TimerEvent = slot; +} + +void QLibrary_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_TimerEvent(event); +} + +void QLibrary_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__ChildEvent = slot; +} + +void QLibrary_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_ChildEvent(event); +} + +void QLibrary_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__CustomEvent = slot; +} + +void QLibrary_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_CustomEvent(event); +} + +void QLibrary_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__ConnectNotify = slot; +} + +void QLibrary_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QLibrary_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__DisconnectNotify = slot; +} + +void QLibrary_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QLibrary_Delete(QLibrary* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlibrary.go b/qt/gen_qlibrary.go index 7efd4f5a..2244674c 100644 --- a/qt/gen_qlibrary.go +++ b/qt/gen_qlibrary.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -24,7 +25,8 @@ const ( ) type QLibrary struct { - h *C.QLibrary + h *C.QLibrary + isSubclass bool *QObject } @@ -42,21 +44,34 @@ func (this *QLibrary) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLibrary(h *C.QLibrary) *QLibrary { +// newQLibrary constructs the type using only CGO pointers. +func newQLibrary(h *C.QLibrary, h_QObject *C.QObject) *QLibrary { if h == nil { return nil } - return &QLibrary{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QLibrary{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQLibrary(h unsafe.Pointer) *QLibrary { - return newQLibrary((*C.QLibrary)(h)) +// UnsafeNewQLibrary constructs the type using only unsafe pointers. +func UnsafeNewQLibrary(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLibrary { + if h == nil { + return nil + } + + return &QLibrary{h: (*C.QLibrary)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQLibrary constructs a new QLibrary object. func NewQLibrary() *QLibrary { - ret := C.QLibrary_new() - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new(&outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary2 constructs a new QLibrary object. @@ -65,8 +80,13 @@ func NewQLibrary2(fileName string) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new2(fileName_ms) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new2(fileName_ms, &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary3 constructs a new QLibrary object. @@ -75,8 +95,13 @@ func NewQLibrary3(fileName string, verNum int) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new3(fileName_ms, (C.int)(verNum)) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new3(fileName_ms, (C.int)(verNum), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary4 constructs a new QLibrary object. @@ -89,14 +114,24 @@ func NewQLibrary4(fileName string, version string) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - ret := C.QLibrary_new4(fileName_ms, version_ms) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new4(fileName_ms, version_ms, &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary5 constructs a new QLibrary object. func NewQLibrary5(parent *QObject) *QLibrary { - ret := C.QLibrary_new5(parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new5(parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary6 constructs a new QLibrary object. @@ -105,8 +140,13 @@ func NewQLibrary6(fileName string, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new6(fileName_ms, parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new6(fileName_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary7 constructs a new QLibrary object. @@ -115,8 +155,13 @@ func NewQLibrary7(fileName string, verNum int, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary8 constructs a new QLibrary object. @@ -129,8 +174,13 @@ func NewQLibrary8(fileName string, version string, parent *QObject) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - ret := C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QLibrary) MetaObject() *QMetaObject { @@ -275,9 +325,175 @@ func QLibrary_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QLibrary) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QLibrary_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QLibrary) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QLibrary_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_Event +func miqt_exec_callback_QLibrary_Event(self *C.QLibrary, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLibrary{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLibrary) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QLibrary_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QLibrary) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QLibrary_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_EventFilter +func miqt_exec_callback_QLibrary_EventFilter(self *C.QLibrary, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLibrary{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QLibrary) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QLibrary_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLibrary) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QLibrary_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_TimerEvent +func miqt_exec_callback_QLibrary_TimerEvent(self *C.QLibrary, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QLibrary{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLibrary) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QLibrary_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLibrary) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QLibrary_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_ChildEvent +func miqt_exec_callback_QLibrary_ChildEvent(self *C.QLibrary, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QLibrary{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QLibrary) callVirtualBase_CustomEvent(event *QEvent) { + + C.QLibrary_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLibrary) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLibrary_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_CustomEvent +func miqt_exec_callback_QLibrary_CustomEvent(self *C.QLibrary, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLibrary{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QLibrary) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QLibrary_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLibrary) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLibrary_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_ConnectNotify +func miqt_exec_callback_QLibrary_ConnectNotify(self *C.QLibrary, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLibrary{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QLibrary) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QLibrary_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLibrary) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLibrary_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_DisconnectNotify +func miqt_exec_callback_QLibrary_DisconnectNotify(self *C.QLibrary, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLibrary{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QLibrary) Delete() { - C.QLibrary_Delete(this.h) + C.QLibrary_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlibrary.h b/qt/gen_qlibrary.h index b3cb98c0..8cb05154 100644 --- a/qt/gen_qlibrary.h +++ b/qt/gen_qlibrary.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QLibrary; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLibrary QLibrary; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QLibrary* QLibrary_new(); -QLibrary* QLibrary_new2(struct miqt_string fileName); -QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum); -QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version); -QLibrary* QLibrary_new5(QObject* parent); -QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent); -QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent); -QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent); +void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); QMetaObject* QLibrary_MetaObject(const QLibrary* self); void* QLibrary_Metacast(QLibrary* self, const char* param1); struct miqt_string QLibrary_Tr(const char* s); @@ -51,7 +59,21 @@ struct miqt_string QLibrary_Tr2(const char* s, const char* c); struct miqt_string QLibrary_Tr3(const char* s, const char* c, int n); struct miqt_string QLibrary_TrUtf82(const char* s, const char* c); struct miqt_string QLibrary_TrUtf83(const char* s, const char* c, int n); -void QLibrary_Delete(QLibrary* self); +void QLibrary_override_virtual_Event(void* self, intptr_t slot); +bool QLibrary_virtualbase_Event(void* self, QEvent* event); +void QLibrary_override_virtual_EventFilter(void* self, intptr_t slot); +bool QLibrary_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QLibrary_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLibrary_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QLibrary_override_virtual_ChildEvent(void* self, intptr_t slot); +void QLibrary_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QLibrary_override_virtual_CustomEvent(void* self, intptr_t slot); +void QLibrary_virtualbase_CustomEvent(void* self, QEvent* event); +void QLibrary_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QLibrary_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QLibrary_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QLibrary_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QLibrary_Delete(QLibrary* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlibraryinfo.cpp b/qt/gen_qlibraryinfo.cpp index 68ec74fd..d4e6f8f8 100644 --- a/qt/gen_qlibraryinfo.cpp +++ b/qt/gen_qlibraryinfo.cpp @@ -79,7 +79,11 @@ struct miqt_array /* of struct miqt_string */ QLibraryInfo_PlatformPluginArgume return _out; } -void QLibraryInfo_Delete(QLibraryInfo* self) { - delete self; +void QLibraryInfo_Delete(QLibraryInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlibraryinfo.go b/qt/gen_qlibraryinfo.go index 8301bb40..cf17fde1 100644 --- a/qt/gen_qlibraryinfo.go +++ b/qt/gen_qlibraryinfo.go @@ -34,7 +34,8 @@ const ( ) type QLibraryInfo struct { - h *C.QLibraryInfo + h *C.QLibraryInfo + isSubclass bool } func (this *QLibraryInfo) cPointer() *C.QLibraryInfo { @@ -51,6 +52,7 @@ func (this *QLibraryInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLibraryInfo constructs the type using only CGO pointers. func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo { if h == nil { return nil @@ -58,8 +60,13 @@ func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo { return &QLibraryInfo{h: h} } +// UnsafeNewQLibraryInfo constructs the type using only unsafe pointers. func UnsafeNewQLibraryInfo(h unsafe.Pointer) *QLibraryInfo { - return newQLibraryInfo((*C.QLibraryInfo)(h)) + if h == nil { + return nil + } + + return &QLibraryInfo{h: (*C.QLibraryInfo)(h)} } func QLibraryInfo_Licensee() string { @@ -125,7 +132,7 @@ func QLibraryInfo_PlatformPluginArguments(platformName string) []string { // Delete this object from C++ memory. func (this *QLibraryInfo) Delete() { - C.QLibraryInfo_Delete(this.h) + C.QLibraryInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlibraryinfo.h b/qt/gen_qlibraryinfo.h index 27fde647..2b0e3fa5 100644 --- a/qt/gen_qlibraryinfo.h +++ b/qt/gen_qlibraryinfo.h @@ -32,7 +32,7 @@ bool QLibraryInfo_IsDebugBuild(); QVersionNumber* QLibraryInfo_Version(); struct miqt_string QLibraryInfo_Location(int param1); struct miqt_array /* of struct miqt_string */ QLibraryInfo_PlatformPluginArguments(struct miqt_string platformName); -void QLibraryInfo_Delete(QLibraryInfo* self); +void QLibraryInfo_Delete(QLibraryInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qline.cpp b/qt/gen_qline.cpp index db4e08e6..cfbbf0e1 100644 --- a/qt/gen_qline.cpp +++ b/qt/gen_qline.cpp @@ -6,20 +6,24 @@ #include "gen_qline.h" #include "_cgo_export.h" -QLine* QLine_new() { - return new QLine(); +void QLine_new(QLine** outptr_QLine) { + QLine* ret = new QLine(); + *outptr_QLine = ret; } -QLine* QLine_new2(QPoint* pt1, QPoint* pt2) { - return new QLine(*pt1, *pt2); +void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine) { + QLine* ret = new QLine(*pt1, *pt2); + *outptr_QLine = ret; } -QLine* QLine_new3(int x1, int y1, int x2, int y2) { - return new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine) { + QLine* ret = new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); + *outptr_QLine = ret; } -QLine* QLine_new4(QLine* param1) { - return new QLine(*param1); +void QLine_new4(QLine* param1, QLine** outptr_QLine) { + QLine* ret = new QLine(*param1); + *outptr_QLine = ret; } bool QLine_IsNull(const QLine* self) { @@ -102,28 +106,37 @@ bool QLine_OperatorNotEqual(const QLine* self, QLine* d) { return self->operator!=(*d); } -void QLine_Delete(QLine* self) { - delete self; +void QLine_Delete(QLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QLineF* QLineF_new() { - return new QLineF(); +void QLineF_new(QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(); + *outptr_QLineF = ret; } -QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2) { - return new QLineF(*pt1, *pt2); +void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(*pt1, *pt2); + *outptr_QLineF = ret; } -QLineF* QLineF_new3(double x1, double y1, double x2, double y2) { - return new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); + *outptr_QLineF = ret; } -QLineF* QLineF_new4(QLine* line) { - return new QLineF(*line); +void QLineF_new4(QLine* line, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(*line); + *outptr_QLineF = ret; } -QLineF* QLineF_new5(QLineF* param1) { - return new QLineF(*param1); +void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(*param1); + *outptr_QLineF = ret; } QLineF* QLineF_FromPolar(double length, double angle) { @@ -270,7 +283,11 @@ QLine* QLineF_ToLine(const QLineF* self) { return new QLine(self->toLine()); } -void QLineF_Delete(QLineF* self) { - delete self; +void QLineF_Delete(QLineF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qline.go b/qt/gen_qline.go index e74de68c..ec8251a6 100644 --- a/qt/gen_qline.go +++ b/qt/gen_qline.go @@ -22,7 +22,8 @@ const ( ) type QLine struct { - h *C.QLine + h *C.QLine + isSubclass bool } func (this *QLine) cPointer() *C.QLine { @@ -39,6 +40,7 @@ func (this *QLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLine constructs the type using only CGO pointers. func newQLine(h *C.QLine) *QLine { if h == nil { return nil @@ -46,32 +48,53 @@ func newQLine(h *C.QLine) *QLine { return &QLine{h: h} } +// UnsafeNewQLine constructs the type using only unsafe pointers. func UnsafeNewQLine(h unsafe.Pointer) *QLine { - return newQLine((*C.QLine)(h)) + if h == nil { + return nil + } + + return &QLine{h: (*C.QLine)(h)} } // NewQLine constructs a new QLine object. func NewQLine() *QLine { - ret := C.QLine_new() - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new(&outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } // NewQLine2 constructs a new QLine object. func NewQLine2(pt1 *QPoint, pt2 *QPoint) *QLine { - ret := C.QLine_new2(pt1.cPointer(), pt2.cPointer()) - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } // NewQLine3 constructs a new QLine object. func NewQLine3(x1 int, y1 int, x2 int, y2 int) *QLine { - ret := C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2)) - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2), &outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } // NewQLine4 constructs a new QLine object. func NewQLine4(param1 *QLine) *QLine { - ret := C.QLine_new4(param1.cPointer()) - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new4(param1.cPointer(), &outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } func (this *QLine) IsNull() bool { @@ -171,7 +194,7 @@ func (this *QLine) OperatorNotEqual(d *QLine) bool { // Delete this object from C++ memory. func (this *QLine) Delete() { - C.QLine_Delete(this.h) + C.QLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -184,7 +207,8 @@ func (this *QLine) GoGC() { } type QLineF struct { - h *C.QLineF + h *C.QLineF + isSubclass bool } func (this *QLineF) cPointer() *C.QLineF { @@ -201,6 +225,7 @@ func (this *QLineF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLineF constructs the type using only CGO pointers. func newQLineF(h *C.QLineF) *QLineF { if h == nil { return nil @@ -208,38 +233,63 @@ func newQLineF(h *C.QLineF) *QLineF { return &QLineF{h: h} } +// UnsafeNewQLineF constructs the type using only unsafe pointers. func UnsafeNewQLineF(h unsafe.Pointer) *QLineF { - return newQLineF((*C.QLineF)(h)) + if h == nil { + return nil + } + + return &QLineF{h: (*C.QLineF)(h)} } // NewQLineF constructs a new QLineF object. func NewQLineF() *QLineF { - ret := C.QLineF_new() - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new(&outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF2 constructs a new QLineF object. func NewQLineF2(pt1 *QPointF, pt2 *QPointF) *QLineF { - ret := C.QLineF_new2(pt1.cPointer(), pt2.cPointer()) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF3 constructs a new QLineF object. func NewQLineF3(x1 float64, y1 float64, x2 float64, y2 float64) *QLineF { - ret := C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF4 constructs a new QLineF object. func NewQLineF4(line *QLine) *QLineF { - ret := C.QLineF_new4(line.cPointer()) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new4(line.cPointer(), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF5 constructs a new QLineF object. func NewQLineF5(param1 *QLineF) *QLineF { - ret := C.QLineF_new5(param1.cPointer()) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new5(param1.cPointer(), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } func QLineF_FromPolar(length float64, angle float64) *QLineF { @@ -406,7 +456,7 @@ func (this *QLineF) ToLine() *QLine { // Delete this object from C++ memory. func (this *QLineF) Delete() { - C.QLineF_Delete(this.h) + C.QLineF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qline.h b/qt/gen_qline.h index d13d5233..878fee90 100644 --- a/qt/gen_qline.h +++ b/qt/gen_qline.h @@ -26,10 +26,10 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -QLine* QLine_new(); -QLine* QLine_new2(QPoint* pt1, QPoint* pt2); -QLine* QLine_new3(int x1, int y1, int x2, int y2); -QLine* QLine_new4(QLine* param1); +void QLine_new(QLine** outptr_QLine); +void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine); +void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine); +void QLine_new4(QLine* param1, QLine** outptr_QLine); bool QLine_IsNull(const QLine* self); QPoint* QLine_P1(const QLine* self); QPoint* QLine_P2(const QLine* self); @@ -50,13 +50,13 @@ void QLine_SetPoints(QLine* self, QPoint* p1, QPoint* p2); void QLine_SetLine(QLine* self, int x1, int y1, int x2, int y2); bool QLine_OperatorEqual(const QLine* self, QLine* d); bool QLine_OperatorNotEqual(const QLine* self, QLine* d); -void QLine_Delete(QLine* self); +void QLine_Delete(QLine* self, bool isSubclass); -QLineF* QLineF_new(); -QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2); -QLineF* QLineF_new3(double x1, double y1, double x2, double y2); -QLineF* QLineF_new4(QLine* line); -QLineF* QLineF_new5(QLineF* param1); +void QLineF_new(QLineF** outptr_QLineF); +void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF); +void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF); +void QLineF_new4(QLine* line, QLineF** outptr_QLineF); +void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF); QLineF* QLineF_FromPolar(double length, double angle); bool QLineF_IsNull(const QLineF* self); QPointF* QLineF_P1(const QLineF* self); @@ -90,7 +90,7 @@ void QLineF_SetLine(QLineF* self, double x1, double y1, double x2, double y2); bool QLineF_OperatorEqual(const QLineF* self, QLineF* d); bool QLineF_OperatorNotEqual(const QLineF* self, QLineF* d); QLine* QLineF_ToLine(const QLineF* self); -void QLineF_Delete(QLineF* self); +void QLineF_Delete(QLineF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlineedit.cpp b/qt/gen_qlineedit.cpp index ce66fa72..21d78356 100644 --- a/qt/gen_qlineedit.cpp +++ b/qt/gen_qlineedit.cpp @@ -1,39 +1,1065 @@ #include +#include +#include +#include #include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include #include #include +#include #include #include #include "gen_qlineedit.h" #include "_cgo_export.h" -QLineEdit* QLineEdit_new(QWidget* parent) { - return new QLineEdit(parent); +class MiqtVirtualQLineEdit : public virtual QLineEdit { +public: + + MiqtVirtualQLineEdit(QWidget* parent): QLineEdit(parent) {}; + MiqtVirtualQLineEdit(): QLineEdit() {}; + MiqtVirtualQLineEdit(const QString& param1): QLineEdit(param1) {}; + MiqtVirtualQLineEdit(const QString& param1, QWidget* parent): QLineEdit(param1, parent) {}; + + virtual ~MiqtVirtualQLineEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QLineEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLineEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QLineEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QLineEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLineEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QLineEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QLineEdit::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QLineEdit::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QLineEdit::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QLineEdit::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QLineEdit::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QLineEdit::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QLineEdit::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QLineEdit::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QLineEdit::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QLineEdit::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QLineEdit::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QLineEdit::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QLineEdit::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QLineEdit::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QLineEdit::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QLineEdit::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QLineEdit::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QLineEdit::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QLineEdit::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QLineEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QLineEdit::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QLineEdit::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QLineEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QLineEdit::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QLineEdit::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QLineEdit::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QLineEdit::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QLineEdit::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QLineEdit::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QLineEdit::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QLineEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QLineEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QLineEdit::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QLineEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QLineEdit::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QLineEdit::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QLineEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QLineEdit::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QLineEdit::devType(); + } + + + int callback_return_value = miqt_exec_callback_QLineEdit_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QLineEdit::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QLineEdit::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QLineEdit_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QLineEdit::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QLineEdit::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLineEdit_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QLineEdit::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QLineEdit::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QLineEdit_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QLineEdit::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QLineEdit::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QLineEdit_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QLineEdit::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QLineEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QLineEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QLineEdit::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QLineEdit::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QLineEdit::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QLineEdit::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QLineEdit::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QLineEdit::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QLineEdit::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QLineEdit::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QLineEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QLineEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QLineEdit::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QLineEdit::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QLineEdit::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QLineEdit::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QLineEdit::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QLineEdit::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QLineEdit::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QLineEdit::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QLineEdit::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QLineEdit::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QLineEdit::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QLineEdit_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QLineEdit::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QLineEdit::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QLineEdit_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QLineEdit::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QLineEdit::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QLineEdit_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QLineEdit::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QLineEdit::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QLineEdit_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QLineEdit::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QLineEdit::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QLineEdit_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QLineEdit::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QLineEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QLineEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QLineEdit::focusNextPrevChild(next); + + } + +}; + +void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(parent); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLineEdit* QLineEdit_new2() { - return new QLineEdit(); +void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLineEdit* QLineEdit_new3(struct miqt_string param1) { +void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - return new QLineEdit(param1_QString); + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent) { +void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - return new QLineEdit(param1_QString, parent); + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString, parent); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QLineEdit_MetaObject(const QLineEdit* self) { @@ -382,7 +1408,7 @@ void QLineEdit_TextChanged(QLineEdit* self, struct miqt_string param1) { } void QLineEdit_connect_TextChanged(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::textChanged), self, [=](const QString& param1) { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::textChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -401,7 +1427,7 @@ void QLineEdit_TextEdited(QLineEdit* self, struct miqt_string param1) { } void QLineEdit_connect_TextEdited(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::textEdited), self, [=](const QString& param1) { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::textEdited), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -419,7 +1445,7 @@ void QLineEdit_CursorPositionChanged(QLineEdit* self, int param1, int param2) { } void QLineEdit_connect_CursorPositionChanged(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::cursorPositionChanged), self, [=](int param1, int param2) { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::cursorPositionChanged), self, [=](int param1, int param2) { int sigval1 = param1; int sigval2 = param2; miqt_exec_callback_QLineEdit_CursorPositionChanged(slot, sigval1, sigval2); @@ -431,7 +1457,7 @@ void QLineEdit_ReturnPressed(QLineEdit* self) { } void QLineEdit_connect_ReturnPressed(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::returnPressed), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::returnPressed), self, [=]() { miqt_exec_callback_QLineEdit_ReturnPressed(slot); }); } @@ -441,7 +1467,7 @@ void QLineEdit_EditingFinished(QLineEdit* self) { } void QLineEdit_connect_EditingFinished(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::editingFinished), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::editingFinished), self, [=]() { miqt_exec_callback_QLineEdit_EditingFinished(slot); }); } @@ -451,7 +1477,7 @@ void QLineEdit_SelectionChanged(QLineEdit* self) { } void QLineEdit_connect_SelectionChanged(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::selectionChanged), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::selectionChanged), self, [=]() { miqt_exec_callback_QLineEdit_SelectionChanged(slot); }); } @@ -461,7 +1487,7 @@ void QLineEdit_InputRejected(QLineEdit* self) { } void QLineEdit_connect_InputRejected(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::inputRejected), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::inputRejected), self, [=]() { miqt_exec_callback_QLineEdit_InputRejected(slot); }); } @@ -530,7 +1556,339 @@ void QLineEdit_CursorBackward2(QLineEdit* self, bool mark, int steps) { self->cursorBackward(mark, static_cast(steps)); } -void QLineEdit_Delete(QLineEdit* self) { - delete self; +void QLineEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QLineEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_SizeHint(); +} + +void QLineEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QLineEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QLineEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QLineEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QLineEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QLineEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QLineEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QLineEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QLineEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QLineEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QLineEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QLineEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QLineEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QLineEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QLineEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QLineEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QLineEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__PaintEvent = slot; +} + +void QLineEdit_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_PaintEvent(param1); +} + +void QLineEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QLineEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QLineEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QLineEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QLineEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QLineEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QLineEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DropEvent = slot; +} + +void QLineEdit_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DropEvent(param1); +} + +void QLineEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QLineEdit_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QLineEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QLineEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QLineEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void QLineEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QLineEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QLineEdit_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QLineEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__Event = slot; +} + +bool QLineEdit_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_Event(param1); +} + +void QLineEdit_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DevType = slot; +} + +int QLineEdit_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_DevType(); +} + +void QLineEdit_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__SetVisible = slot; +} + +void QLineEdit_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_SetVisible(visible); +} + +void QLineEdit_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__HeightForWidth = slot; +} + +int QLineEdit_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLineEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QLineEdit_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QLineEdit_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QLineEdit_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_PaintEngine(); +} + +void QLineEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__WheelEvent = slot; +} + +void QLineEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QLineEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QLineEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QLineEdit_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__EnterEvent = slot; +} + +void QLineEdit_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_EnterEvent(event); +} + +void QLineEdit_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__LeaveEvent = slot; +} + +void QLineEdit_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_LeaveEvent(event); +} + +void QLineEdit_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MoveEvent = slot; +} + +void QLineEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MoveEvent(event); +} + +void QLineEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QLineEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void QLineEdit_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__CloseEvent = slot; +} + +void QLineEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_CloseEvent(event); +} + +void QLineEdit_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__TabletEvent = slot; +} + +void QLineEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_TabletEvent(event); +} + +void QLineEdit_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ActionEvent = slot; +} + +void QLineEdit_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ActionEvent(event); +} + +void QLineEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ShowEvent = slot; +} + +void QLineEdit_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ShowEvent(event); +} + +void QLineEdit_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__HideEvent = slot; +} + +void QLineEdit_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_HideEvent(event); +} + +void QLineEdit_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__NativeEvent = slot; +} + +bool QLineEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QLineEdit_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__Metric = slot; +} + +int QLineEdit_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_Metric(param1); +} + +void QLineEdit_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InitPainter = slot; +} + +void QLineEdit_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_InitPainter(painter); +} + +void QLineEdit_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QLineEdit_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_Redirected(offset); +} + +void QLineEdit_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QLineEdit_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_SharedPainter(); +} + +void QLineEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QLineEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QLineEdit_Delete(QLineEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlineedit.go b/qt/gen_qlineedit.go index 8976ca40..b2015a42 100644 --- a/qt/gen_qlineedit.go +++ b/qt/gen_qlineedit.go @@ -31,7 +31,8 @@ const ( ) type QLineEdit struct { - h *C.QLineEdit + h *C.QLineEdit + isSubclass bool *QWidget } @@ -49,27 +50,49 @@ func (this *QLineEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLineEdit(h *C.QLineEdit) *QLineEdit { +// newQLineEdit constructs the type using only CGO pointers. +func newQLineEdit(h *C.QLineEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLineEdit { if h == nil { return nil } - return &QLineEdit{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QLineEdit{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQLineEdit(h unsafe.Pointer) *QLineEdit { - return newQLineEdit((*C.QLineEdit)(h)) +// UnsafeNewQLineEdit constructs the type using only unsafe pointers. +func UnsafeNewQLineEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLineEdit { + if h == nil { + return nil + } + + return &QLineEdit{h: (*C.QLineEdit)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQLineEdit constructs a new QLineEdit object. func NewQLineEdit(parent *QWidget) *QLineEdit { - ret := C.QLineEdit_new(parent.cPointer()) - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new(parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLineEdit2 constructs a new QLineEdit object. func NewQLineEdit2() *QLineEdit { - ret := C.QLineEdit_new2() - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new2(&outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLineEdit3 constructs a new QLineEdit object. @@ -78,8 +101,15 @@ func NewQLineEdit3(param1 string) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - ret := C.QLineEdit_new3(param1_ms) - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new3(param1_ms, &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLineEdit4 constructs a new QLineEdit object. @@ -88,8 +118,15 @@ func NewQLineEdit4(param1 string, parent *QWidget) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - ret := C.QLineEdit_new4(param1_ms, parent.cPointer()) - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new4(param1_ms, parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QLineEdit) MetaObject() *QMetaObject { @@ -194,7 +231,7 @@ func (this *QLineEdit) SetValidator(validator *QValidator) { } func (this *QLineEdit) Validator() *QValidator { - return UnsafeNewQValidator(unsafe.Pointer(C.QLineEdit_Validator(this.h))) + return UnsafeNewQValidator(unsafe.Pointer(C.QLineEdit_Validator(this.h)), nil) } func (this *QLineEdit) SetCompleter(completer *QCompleter) { @@ -202,7 +239,7 @@ func (this *QLineEdit) SetCompleter(completer *QCompleter) { } func (this *QLineEdit) Completer() *QCompleter { - return UnsafeNewQCompleter(unsafe.Pointer(C.QLineEdit_Completer(this.h))) + return UnsafeNewQCompleter(unsafe.Pointer(C.QLineEdit_Completer(this.h)), nil) } func (this *QLineEdit) SizeHint() *QSize { @@ -373,7 +410,7 @@ func (this *QLineEdit) AddAction(action *QAction, position QLineEdit__ActionPosi } func (this *QLineEdit) AddAction2(icon *QIcon, position QLineEdit__ActionPosition) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position)))) + return UnsafeNewQAction(unsafe.Pointer(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position))), nil) } func (this *QLineEdit) SetText(text string) { @@ -425,7 +462,7 @@ func (this *QLineEdit) Insert(param1 string) { } func (this *QLineEdit) CreateStandardContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QLineEdit_CreateStandardContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QLineEdit_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QLineEdit) TextChanged(param1 string) { @@ -642,9 +679,975 @@ func (this *QLineEdit) CursorBackward2(mark bool, steps int) { C.QLineEdit_CursorBackward2(this.h, (C.bool)(mark), (C.int)(steps)) } +func (this *QLineEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QLineEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLineEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QLineEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_SizeHint +func miqt_exec_callback_QLineEdit_SizeHint(self *C.QLineEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QLineEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLineEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QLineEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MinimumSizeHint +func miqt_exec_callback_QLineEdit_MinimumSizeHint(self *C.QLineEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MousePressEvent +func miqt_exec_callback_QLineEdit_MousePressEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MouseMoveEvent +func miqt_exec_callback_QLineEdit_MouseMoveEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MouseReleaseEvent +func miqt_exec_callback_QLineEdit_MouseReleaseEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MouseDoubleClickEvent +func miqt_exec_callback_QLineEdit_MouseDoubleClickEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QLineEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QLineEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_KeyPressEvent +func miqt_exec_callback_QLineEdit_KeyPressEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QLineEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QLineEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_FocusInEvent +func miqt_exec_callback_QLineEdit_FocusInEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QLineEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QLineEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_FocusOutEvent +func miqt_exec_callback_QLineEdit_FocusOutEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QLineEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QLineEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_PaintEvent +func miqt_exec_callback_QLineEdit_PaintEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QLineEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QLineEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DragEnterEvent +func miqt_exec_callback_QLineEdit_DragEnterEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QLineEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QLineEdit) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QLineEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DragMoveEvent +func miqt_exec_callback_QLineEdit_DragMoveEvent(self *C.QLineEdit, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QLineEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QLineEdit) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QLineEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DragLeaveEvent +func miqt_exec_callback_QLineEdit_DragLeaveEvent(self *C.QLineEdit, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QLineEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QLineEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DropEvent +func miqt_exec_callback_QLineEdit_DropEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QLineEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QLineEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ChangeEvent +func miqt_exec_callback_QLineEdit_ChangeEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QLineEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QLineEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ContextMenuEvent +func miqt_exec_callback_QLineEdit_ContextMenuEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QLineEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QLineEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InputMethodEvent +func miqt_exec_callback_QLineEdit_InputMethodEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QLineEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLineEdit) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QLineEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InputMethodQuery +func miqt_exec_callback_QLineEdit_InputMethodQuery(self *C.QLineEdit, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QLineEdit_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QLineEdit) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QLineEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_Event +func miqt_exec_callback_QLineEdit_Event(self *C.QLineEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_DevType() int { + + return (int)(C.QLineEdit_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QLineEdit) OnDevType(slot func(super func() int) int) { + C.QLineEdit_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DevType +func miqt_exec_callback_QLineEdit_DevType(self *C.QLineEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_SetVisible(visible bool) { + + C.QLineEdit_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QLineEdit) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QLineEdit_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_SetVisible +func miqt_exec_callback_QLineEdit_SetVisible(self *C.QLineEdit, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QLineEdit{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLineEdit_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLineEdit) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLineEdit_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_HeightForWidth +func miqt_exec_callback_QLineEdit_HeightForWidth(self *C.QLineEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QLineEdit_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QLineEdit) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QLineEdit_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_HasHeightForWidth +func miqt_exec_callback_QLineEdit_HasHeightForWidth(self *C.QLineEdit, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QLineEdit_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QLineEdit) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QLineEdit_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_PaintEngine +func miqt_exec_callback_QLineEdit_PaintEngine(self *C.QLineEdit, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QLineEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QLineEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_WheelEvent +func miqt_exec_callback_QLineEdit_WheelEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QLineEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QLineEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_KeyReleaseEvent +func miqt_exec_callback_QLineEdit_KeyReleaseEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_EnterEvent(event *QEvent) { + + C.QLineEdit_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLineEdit_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_EnterEvent +func miqt_exec_callback_QLineEdit_EnterEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QLineEdit_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLineEdit_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_LeaveEvent +func miqt_exec_callback_QLineEdit_LeaveEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QLineEdit_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QLineEdit_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MoveEvent +func miqt_exec_callback_QLineEdit_MoveEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QLineEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QLineEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ResizeEvent +func miqt_exec_callback_QLineEdit_ResizeEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QLineEdit_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QLineEdit_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_CloseEvent +func miqt_exec_callback_QLineEdit_CloseEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QLineEdit_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QLineEdit_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_TabletEvent +func miqt_exec_callback_QLineEdit_TabletEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QLineEdit_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QLineEdit_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ActionEvent +func miqt_exec_callback_QLineEdit_ActionEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QLineEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QLineEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ShowEvent +func miqt_exec_callback_QLineEdit_ShowEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QLineEdit_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QLineEdit_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_HideEvent +func miqt_exec_callback_QLineEdit_HideEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QLineEdit_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QLineEdit) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QLineEdit_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_NativeEvent +func miqt_exec_callback_QLineEdit_NativeEvent(self *C.QLineEdit, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QLineEdit_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLineEdit) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QLineEdit_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_Metric +func miqt_exec_callback_QLineEdit_Metric(self *C.QLineEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_InitPainter(painter *QPainter) { + + C.QLineEdit_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QLineEdit) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QLineEdit_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InitPainter +func miqt_exec_callback_QLineEdit_InitPainter(self *C.QLineEdit, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QLineEdit_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QLineEdit) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QLineEdit_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_Redirected +func miqt_exec_callback_QLineEdit_Redirected(self *C.QLineEdit, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QLineEdit_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QLineEdit) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QLineEdit_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_SharedPainter +func miqt_exec_callback_QLineEdit_SharedPainter(self *C.QLineEdit, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QLineEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QLineEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QLineEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_FocusNextPrevChild +func miqt_exec_callback_QLineEdit_FocusNextPrevChild(self *C.QLineEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QLineEdit) Delete() { - C.QLineEdit_Delete(this.h) + C.QLineEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlineedit.h b/qt/gen_qlineedit.h index 18de77b5..f232da37 100644 --- a/qt/gen_qlineedit.h +++ b/qt/gen_qlineedit.h @@ -16,38 +16,84 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; class QCompleter; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QLineEdit; class QMargins; class QMenu; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QValidator; class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QCompleter QCompleter; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineEdit QLineEdit; typedef struct QMargins QMargins; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QValidator QValidator; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QLineEdit* QLineEdit_new(QWidget* parent); -QLineEdit* QLineEdit_new2(); -QLineEdit* QLineEdit_new3(struct miqt_string param1); -QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent); +void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QLineEdit_MetaObject(const QLineEdit* self); void* QLineEdit_Metacast(QLineEdit* self, const char* param1); struct miqt_string QLineEdit_Tr(const char* s); @@ -133,6 +179,21 @@ void QLineEdit_SelectionChanged(QLineEdit* self); void QLineEdit_connect_SelectionChanged(QLineEdit* self, intptr_t slot); void QLineEdit_InputRejected(QLineEdit* self); void QLineEdit_connect_InputRejected(QLineEdit* self, intptr_t slot); +void QLineEdit_MousePressEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_MouseMoveEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_MouseReleaseEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_MouseDoubleClickEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_KeyPressEvent(QLineEdit* self, QKeyEvent* param1); +void QLineEdit_FocusInEvent(QLineEdit* self, QFocusEvent* param1); +void QLineEdit_FocusOutEvent(QLineEdit* self, QFocusEvent* param1); +void QLineEdit_PaintEvent(QLineEdit* self, QPaintEvent* param1); +void QLineEdit_DragEnterEvent(QLineEdit* self, QDragEnterEvent* param1); +void QLineEdit_DragMoveEvent(QLineEdit* self, QDragMoveEvent* e); +void QLineEdit_DragLeaveEvent(QLineEdit* self, QDragLeaveEvent* e); +void QLineEdit_DropEvent(QLineEdit* self, QDropEvent* param1); +void QLineEdit_ChangeEvent(QLineEdit* self, QEvent* param1); +void QLineEdit_ContextMenuEvent(QLineEdit* self, QContextMenuEvent* param1); +void QLineEdit_InputMethodEvent(QLineEdit* self, QInputMethodEvent* param1); QVariant* QLineEdit_InputMethodQuery(const QLineEdit* self, int param1); QVariant* QLineEdit_InputMethodQuery2(const QLineEdit* self, int property, QVariant* argument); bool QLineEdit_Event(QLineEdit* self, QEvent* param1); @@ -142,7 +203,89 @@ struct miqt_string QLineEdit_TrUtf82(const char* s, const char* c); struct miqt_string QLineEdit_TrUtf83(const char* s, const char* c, int n); void QLineEdit_CursorForward2(QLineEdit* self, bool mark, int steps); void QLineEdit_CursorBackward2(QLineEdit* self, bool mark, int steps); -void QLineEdit_Delete(QLineEdit* self); +void QLineEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLineEdit_virtualbase_SizeHint(const void* self); +void QLineEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QLineEdit_virtualbase_MinimumSizeHint(const void* self); +void QLineEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QLineEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QLineEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QLineEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QLineEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QLineEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QLineEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QLineEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QLineEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QLineEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QLineEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QLineEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QLineEdit_virtualbase_InputMethodQuery(const void* self, int param1); +void QLineEdit_override_virtual_Event(void* self, intptr_t slot); +bool QLineEdit_virtualbase_Event(void* self, QEvent* param1); +void QLineEdit_override_virtual_DevType(void* self, intptr_t slot); +int QLineEdit_virtualbase_DevType(const void* self); +void QLineEdit_override_virtual_SetVisible(void* self, intptr_t slot); +void QLineEdit_virtualbase_SetVisible(void* self, bool visible); +void QLineEdit_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLineEdit_virtualbase_HeightForWidth(const void* self, int param1); +void QLineEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QLineEdit_virtualbase_HasHeightForWidth(const void* self); +void QLineEdit_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QLineEdit_virtualbase_PaintEngine(const void* self); +void QLineEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QLineEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QLineEdit_override_virtual_EnterEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_EnterEvent(void* self, QEvent* event); +void QLineEdit_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_LeaveEvent(void* self, QEvent* event); +void QLineEdit_override_virtual_MoveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QLineEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QLineEdit_override_virtual_CloseEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QLineEdit_override_virtual_TabletEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QLineEdit_override_virtual_ActionEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QLineEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QLineEdit_override_virtual_HideEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_HideEvent(void* self, QHideEvent* event); +void QLineEdit_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QLineEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QLineEdit_override_virtual_Metric(void* self, intptr_t slot); +int QLineEdit_virtualbase_Metric(const void* self, int param1); +void QLineEdit_override_virtual_InitPainter(void* self, intptr_t slot); +void QLineEdit_virtualbase_InitPainter(const void* self, QPainter* painter); +void QLineEdit_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QLineEdit_virtualbase_Redirected(const void* self, QPoint* offset); +void QLineEdit_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QLineEdit_virtualbase_SharedPainter(const void* self); +void QLineEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QLineEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QLineEdit_Delete(QLineEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlinkedlist.cpp b/qt/gen_qlinkedlist.cpp index 20c37582..535915be 100644 --- a/qt/gen_qlinkedlist.cpp +++ b/qt/gen_qlinkedlist.cpp @@ -3,11 +3,16 @@ #include "gen_qlinkedlist.h" #include "_cgo_export.h" -QLinkedListData* QLinkedListData_new() { - return new QLinkedListData(); +void QLinkedListData_new(QLinkedListData** outptr_QLinkedListData) { + QLinkedListData* ret = new QLinkedListData(); + *outptr_QLinkedListData = ret; } -void QLinkedListData_Delete(QLinkedListData* self) { - delete self; +void QLinkedListData_Delete(QLinkedListData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlinkedlist.go b/qt/gen_qlinkedlist.go index b8379dc7..0be1df27 100644 --- a/qt/gen_qlinkedlist.go +++ b/qt/gen_qlinkedlist.go @@ -14,7 +14,8 @@ import ( ) type QLinkedListData struct { - h *C.QLinkedListData + h *C.QLinkedListData + isSubclass bool } func (this *QLinkedListData) cPointer() *C.QLinkedListData { @@ -31,6 +32,7 @@ func (this *QLinkedListData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLinkedListData constructs the type using only CGO pointers. func newQLinkedListData(h *C.QLinkedListData) *QLinkedListData { if h == nil { return nil @@ -38,19 +40,28 @@ func newQLinkedListData(h *C.QLinkedListData) *QLinkedListData { return &QLinkedListData{h: h} } +// UnsafeNewQLinkedListData constructs the type using only unsafe pointers. func UnsafeNewQLinkedListData(h unsafe.Pointer) *QLinkedListData { - return newQLinkedListData((*C.QLinkedListData)(h)) + if h == nil { + return nil + } + + return &QLinkedListData{h: (*C.QLinkedListData)(h)} } // NewQLinkedListData constructs a new QLinkedListData object. func NewQLinkedListData() *QLinkedListData { - ret := C.QLinkedListData_new() - return newQLinkedListData(ret) + var outptr_QLinkedListData *C.QLinkedListData = nil + + C.QLinkedListData_new(&outptr_QLinkedListData) + ret := newQLinkedListData(outptr_QLinkedListData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QLinkedListData) Delete() { - C.QLinkedListData_Delete(this.h) + C.QLinkedListData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlinkedlist.h b/qt/gen_qlinkedlist.h index 654f36f1..36e1cee4 100644 --- a/qt/gen_qlinkedlist.h +++ b/qt/gen_qlinkedlist.h @@ -20,8 +20,8 @@ class QLinkedListData; typedef struct QLinkedListData QLinkedListData; #endif -QLinkedListData* QLinkedListData_new(); -void QLinkedListData_Delete(QLinkedListData* self); +void QLinkedListData_new(QLinkedListData** outptr_QLinkedListData); +void QLinkedListData_Delete(QLinkedListData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlistview.cpp b/qt/gen_qlistview.cpp index f34fa1f6..1e98abe6 100644 --- a/qt/gen_qlistview.cpp +++ b/qt/gen_qlistview.cpp @@ -1,24 +1,1548 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qlistview.h" #include "_cgo_export.h" -QListView* QListView_new(QWidget* parent) { - return new QListView(parent); +class MiqtVirtualQListView : public virtual QListView { +public: + + MiqtVirtualQListView(QWidget* parent): QListView(parent) {}; + MiqtVirtualQListView(): QListView() {}; + + virtual ~MiqtVirtualQListView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QListView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QListView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QListView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QListView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QListView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QListView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QListView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QListView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QListView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QListView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QListView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QListView::reset(); + return; + } + + + miqt_exec_callback_QListView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QListView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QListView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QListView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QListView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QListView::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QListView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QListView::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QListView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QListView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QListView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QListView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QListView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QListView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QListView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QListView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QListView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QListView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QListView::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QListView::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QListView::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QListView::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QListView::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QListView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QListView::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QListView::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QListView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QListView::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QListView::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QListView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QListView::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QListView::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QListView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QListView::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QListView::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QListView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QListView::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QListView::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QListView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QListView::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QListView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QListView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QListView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QListView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QListView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QListView::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QListView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QListView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QListView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QListView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QListView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QListView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QListView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QListView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QListView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QListView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QListView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QListView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QListView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QListView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QListView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QListView::updateGeometries(); + return; + } + + + miqt_exec_callback_QListView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QListView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QListView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QListView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QListView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QListView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QListView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QListView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QListView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QListView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QListView::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QListView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QListView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QListView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QListView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QListView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QListView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QListView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QListView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QListView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QListView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QListView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QListView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QListView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QListView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QListView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QListView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QListView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QListView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QListView::selectAll(); + return; + } + + + miqt_exec_callback_QListView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QListView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QListView::updateEditorData(); + return; + } + + + miqt_exec_callback_QListView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QListView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QListView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QListView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QListView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QListView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QListView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QListView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QListView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QListView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QListView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QListView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QListView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QListView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QListView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QListView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QListView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QListView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QListView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QListView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QListView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QListView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QListView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QListView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QListView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QListView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QListView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QListView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QListView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QListView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QListView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QListView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QListView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QListView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QListView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QListView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QListView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QListView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QListView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QListView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QListView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QListView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QListView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QListView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QListView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QListView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QListView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QListView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QListView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QListView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QListView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QListView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QListView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QListView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QListView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QListView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QListView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QListView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QListView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QListView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QListView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QListView::eventFilter(object, event); + + } + +}; + +void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListView* ret = new MiqtVirtualQListView(parent); + *outptr_QListView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QListView* QListView_new2() { - return new QListView(); +void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListView* ret = new MiqtVirtualQListView(); + *outptr_QListView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QListView_MetaObject(const QListView* self) { @@ -185,8 +1709,8 @@ QRect* QListView_VisualRect(const QListView* self, QModelIndex* index) { return new QRect(self->visualRect(*index)); } -void QListView_ScrollTo(QListView* self, QModelIndex* index) { - self->scrollTo(*index); +void QListView_ScrollTo(QListView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QModelIndex* QListView_IndexAt(const QListView* self, QPoint* p) { @@ -216,7 +1740,7 @@ void QListView_IndexesMoved(QListView* self, struct miqt_array /* of QModelIndex } void QListView_connect_IndexesMoved(QListView* self, intptr_t slot) { - QListView::connect(self, static_cast(&QListView::indexesMoved), self, [=](const QModelIndexList& indexes) { + MiqtVirtualQListView::connect(self, static_cast(&QListView::indexesMoved), self, [=](const QModelIndexList& indexes) { const QModelIndexList& indexes_ret = indexes; // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); @@ -275,11 +1799,483 @@ struct miqt_string QListView_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QListView_ScrollTo2(QListView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QListView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VisualRect = slot; +} + +QRect* QListView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_VisualRect(index); +} + +void QListView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ScrollTo = slot; +} + +void QListView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QListView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QListView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_IndexAt(p); +} + +void QListView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DoItemsLayout = slot; +} + +void QListView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QListView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__Reset = slot; +} + +void QListView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_Reset(); +} + +void QListView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetRootIndex = slot; +} + +void QListView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QListView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__Event = slot; +} + +bool QListView_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_Event(e); +} + +void QListView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QListView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QListView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DataChanged = slot; +} + +void QListView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QListView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__RowsInserted = slot; +} + +void QListView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QListView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QListView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QListView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QListView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QListView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QListView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QListView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__WheelEvent = slot; +} + +void QListView_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_WheelEvent(e); +} + +void QListView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__TimerEvent = slot; +} + +void QListView_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_TimerEvent(e); +} + +void QListView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ResizeEvent = slot; +} + +void QListView_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_ResizeEvent(e); +} + +void QListView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DragMoveEvent = slot; +} + +void QListView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QListView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QListView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QListView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DropEvent = slot; +} + +void QListView_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DropEvent(e); +} + +void QListView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__StartDrag = slot; +} + +void QListView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QListView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QListView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_ViewOptions(); +} + +void QListView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__PaintEvent = slot; +} + +void QListView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_PaintEvent(e); +} + +void QListView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__HorizontalOffset = slot; +} + +int QListView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QListView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VerticalOffset = slot; +} + +int QListView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_VerticalOffset(); +} + +void QListView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QListView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QListView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetSelection = slot; +} + +void QListView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QListView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QListView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QListView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__UpdateGeometries = slot; +} + +void QListView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QListView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QListView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QListView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__CurrentChanged = slot; +} + +void QListView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QListView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QListView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QListView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetModel = slot; +} + +void QListView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetModel(model); +} + +void QListView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetSelectionModel = slot; +} + +void QListView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QListView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__KeyboardSearch = slot; +} + +void QListView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QListView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SizeHintForRow = slot; +} + +int QListView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QListView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QListView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QListView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QListView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QListView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectAll = slot; +} + +void QListView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SelectAll(); +} + +void QListView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__UpdateEditorData = slot; +} + +void QListView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QListView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QListView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QListView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QListView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QListView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QListView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QListView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QListView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QListView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QListView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QListView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__CloseEditor = slot; +} + +void QListView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QListView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__CommitData = slot; +} + +void QListView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_CommitData(editor); +} + +void QListView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__EditorDestroyed = slot; +} + +void QListView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QListView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__Edit2 = slot; +} + +bool QListView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QListView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectionCommand = slot; +} + +int QListView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QListView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QListView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QListView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ViewportEvent = slot; +} + +bool QListView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QListView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MousePressEvent = slot; +} + +void QListView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QListView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QListView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QListView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DragEnterEvent = slot; +} + +void QListView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QListView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__FocusInEvent = slot; +} + +void QListView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QListView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__FocusOutEvent = slot; +} + +void QListView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QListView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__KeyPressEvent = slot; +} + +void QListView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QListView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__InputMethodEvent = slot; +} + +void QListView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QListView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__EventFilter = slot; +} + +bool QListView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_EventFilter(object, event); } -void QListView_Delete(QListView* self) { - delete self; +void QListView_Delete(QListView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlistview.go b/qt/gen_qlistview.go index ffe48ea8..c2deb50c 100644 --- a/qt/gen_qlistview.go +++ b/qt/gen_qlistview.go @@ -51,7 +51,8 @@ const ( ) type QListView struct { - h *C.QListView + h *C.QListView + isSubclass bool *QAbstractItemView } @@ -69,27 +70,55 @@ func (this *QListView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQListView(h *C.QListView) *QListView { +// newQListView constructs the type using only CGO pointers. +func newQListView(h *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListView { if h == nil { return nil } - return &QListView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QListView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQListView(h unsafe.Pointer) *QListView { - return newQListView((*C.QListView)(h)) +// UnsafeNewQListView constructs the type using only unsafe pointers. +func UnsafeNewQListView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListView { + if h == nil { + return nil + } + + return &QListView{h: (*C.QListView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQListView constructs a new QListView object. func NewQListView(parent *QWidget) *QListView { - ret := C.QListView_new(parent.cPointer()) - return newQListView(ret) + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListView_new(parent.cPointer(), &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQListView2 constructs a new QListView object. func NewQListView2() *QListView { - ret := C.QListView_new2() - return newQListView(ret) + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListView_new2(&outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QListView) MetaObject() *QMetaObject { @@ -254,8 +283,8 @@ func (this *QListView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QListView) ScrollTo(index *QModelIndex) { - C.QListView_ScrollTo(this.h, index.cPointer()) +func (this *QListView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QListView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QListView) IndexAt(p *QPoint) *QModelIndex { @@ -356,13 +385,1442 @@ func QListView_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QListView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QListView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QListView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QListView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QListView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VisualRect +func miqt_exec_callback_QListView_VisualRect(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QListView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QListView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QListView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ScrollTo +func miqt_exec_callback_QListView_ScrollTo(self *C.QListView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QListView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QListView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QListView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_IndexAt +func miqt_exec_callback_QListView_IndexAt(self *C.QListView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_DoItemsLayout() { + + C.QListView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnDoItemsLayout(slot func(super func())) { + C.QListView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DoItemsLayout +func miqt_exec_callback_QListView_DoItemsLayout(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QListView) callVirtualBase_Reset() { + + C.QListView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnReset(slot func(super func())) { + C.QListView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_Reset +func miqt_exec_callback_QListView_Reset(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_Reset) + +} + +func (this *QListView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QListView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QListView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QListView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetRootIndex +func miqt_exec_callback_QListView_SetRootIndex(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QListView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QListView) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QListView_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QListView) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QListView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_Event +func miqt_exec_callback_QListView_Event(self *C.QListView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QListView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QListView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QListView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ScrollContentsBy +func miqt_exec_callback_QListView_ScrollContentsBy(self *C.QListView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QListView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QListView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QListView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QListView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DataChanged +func miqt_exec_callback_QListView_DataChanged(self *C.QListView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QListView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QListView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QListView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_RowsInserted +func miqt_exec_callback_QListView_RowsInserted(self *C.QListView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QListView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QListView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_RowsAboutToBeRemoved +func miqt_exec_callback_QListView_RowsAboutToBeRemoved(self *C.QListView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QListView) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QListView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MouseMoveEvent +func miqt_exec_callback_QListView_MouseMoveEvent(self *C.QListView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QListView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MouseReleaseEvent +func miqt_exec_callback_QListView_MouseReleaseEvent(self *C.QListView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QListView_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QListView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_WheelEvent +func miqt_exec_callback_QListView_WheelEvent(self *C.QListView, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QListView_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QListView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_TimerEvent +func miqt_exec_callback_QListView_TimerEvent(self *C.QListView, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QListView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QListView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ResizeEvent +func miqt_exec_callback_QListView_ResizeEvent(self *C.QListView, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QListView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QListView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DragMoveEvent +func miqt_exec_callback_QListView_DragMoveEvent(self *C.QListView, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QListView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QListView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DragLeaveEvent +func miqt_exec_callback_QListView_DragLeaveEvent(self *C.QListView, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QListView_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QListView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DropEvent +func miqt_exec_callback_QListView_DropEvent(self *C.QListView, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QListView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QListView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QListView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_StartDrag +func miqt_exec_callback_QListView_StartDrag(self *C.QListView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QListView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QListView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QListView_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QListView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ViewOptions +func miqt_exec_callback_QListView_ViewOptions(self *C.QListView, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QListView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QListView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_PaintEvent +func miqt_exec_callback_QListView_PaintEvent(self *C.QListView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QListView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListView) OnHorizontalOffset(slot func(super func() int) int) { + C.QListView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_HorizontalOffset +func miqt_exec_callback_QListView_HorizontalOffset(self *C.QListView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QListView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListView) OnVerticalOffset(slot func(super func() int) int) { + C.QListView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VerticalOffset +func miqt_exec_callback_QListView_VerticalOffset(self *C.QListView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QListView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QListView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MoveCursor +func miqt_exec_callback_QListView_MoveCursor(self *C.QListView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QListView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QListView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QListView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetSelection +func miqt_exec_callback_QListView_SetSelection(self *C.QListView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QListView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QListView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QListView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QListView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectedIndexes +func miqt_exec_callback_QListView_SelectedIndexes(self *C.QListView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QListView) callVirtualBase_UpdateGeometries() { + + C.QListView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnUpdateGeometries(slot func(super func())) { + C.QListView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_UpdateGeometries +func miqt_exec_callback_QListView_UpdateGeometries(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QListView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QListView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QListView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QListView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_IsIndexHidden +func miqt_exec_callback_QListView_IsIndexHidden(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QListView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QListView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QListView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_CurrentChanged +func miqt_exec_callback_QListView_CurrentChanged(self *C.QListView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QListView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QListView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QListView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ViewportSizeHint +func miqt_exec_callback_QListView_ViewportSizeHint(self *C.QListView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QListView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QListView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QListView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetModel +func miqt_exec_callback_QListView_SetModel(self *C.QListView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QListView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QListView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QListView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QListView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QListView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetSelectionModel +func miqt_exec_callback_QListView_SetSelectionModel(self *C.QListView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QListView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QListView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QListView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QListView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QListView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_KeyboardSearch +func miqt_exec_callback_QListView_KeyboardSearch(self *C.QListView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QListView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QListView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QListView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QListView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QListView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SizeHintForRow +func miqt_exec_callback_QListView_SizeHintForRow(self *C.QListView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QListView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QListView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QListView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SizeHintForColumn +func miqt_exec_callback_QListView_SizeHintForColumn(self *C.QListView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QListView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QListView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_InputMethodQuery +func miqt_exec_callback_QListView_InputMethodQuery(self *C.QListView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_SelectAll() { + + C.QListView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnSelectAll(slot func(super func())) { + C.QListView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectAll +func miqt_exec_callback_QListView_SelectAll(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QListView) callVirtualBase_UpdateEditorData() { + + C.QListView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnUpdateEditorData(slot func(super func())) { + C.QListView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_UpdateEditorData +func miqt_exec_callback_QListView_UpdateEditorData(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QListView) callVirtualBase_UpdateEditorGeometries() { + + C.QListView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnUpdateEditorGeometries(slot func(super func())) { + C.QListView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_UpdateEditorGeometries +func miqt_exec_callback_QListView_UpdateEditorGeometries(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QListView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QListView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QListView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QListView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VerticalScrollbarAction +func miqt_exec_callback_QListView_VerticalScrollbarAction(self *C.QListView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QListView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QListView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QListView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QListView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QListView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_HorizontalScrollbarAction +func miqt_exec_callback_QListView_HorizontalScrollbarAction(self *C.QListView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QListView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QListView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QListView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QListView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QListView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VerticalScrollbarValueChanged +func miqt_exec_callback_QListView_VerticalScrollbarValueChanged(self *C.QListView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QListView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QListView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QListView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QListView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QListView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QListView_HorizontalScrollbarValueChanged(self *C.QListView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QListView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QListView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QListView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QListView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QListView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_CloseEditor +func miqt_exec_callback_QListView_CloseEditor(self *C.QListView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QListView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_CommitData(editor *QWidget) { + + C.QListView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QListView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QListView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_CommitData +func miqt_exec_callback_QListView_CommitData(self *C.QListView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QListView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QListView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QListView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QListView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_EditorDestroyed +func miqt_exec_callback_QListView_EditorDestroyed(self *C.QListView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QListView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QListView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QListView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QListView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QListView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_Edit2 +func miqt_exec_callback_QListView_Edit2(self *C.QListView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QListView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QListView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QListView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectionCommand +func miqt_exec_callback_QListView_SelectionCommand(self *C.QListView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QListView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QListView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QListView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_FocusNextPrevChild +func miqt_exec_callback_QListView_FocusNextPrevChild(self *C.QListView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QListView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QListView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QListView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ViewportEvent +func miqt_exec_callback_QListView_ViewportEvent(self *C.QListView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QListView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QListView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MousePressEvent +func miqt_exec_callback_QListView_MousePressEvent(self *C.QListView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QListView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QListView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MouseDoubleClickEvent +func miqt_exec_callback_QListView_MouseDoubleClickEvent(self *C.QListView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QListView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QListView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DragEnterEvent +func miqt_exec_callback_QListView_DragEnterEvent(self *C.QListView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QListView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QListView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_FocusInEvent +func miqt_exec_callback_QListView_FocusInEvent(self *C.QListView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QListView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QListView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QListView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_FocusOutEvent +func miqt_exec_callback_QListView_FocusOutEvent(self *C.QListView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QListView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QListView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QListView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_KeyPressEvent +func miqt_exec_callback_QListView_KeyPressEvent(self *C.QListView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QListView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QListView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_InputMethodEvent +func miqt_exec_callback_QListView_InputMethodEvent(self *C.QListView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QListView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QListView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QListView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QListView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_EventFilter +func miqt_exec_callback_QListView_EventFilter(self *C.QListView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QListView) Delete() { - C.QListView_Delete(this.h) + C.QListView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlistview.h b/qt/gen_qlistview.h index 10567c70..142741e7 100644 --- a/qt/gen_qlistview.h +++ b/qt/gen_qlistview.h @@ -15,25 +15,69 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; +class QItemSelectionModel; +class QKeyEvent; class QListView; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QListView QListView; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QListView* QListView_new(QWidget* parent); -QListView* QListView_new2(); +void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QListView_MetaObject(const QListView* self); void* QListView_Metacast(QListView* self, const char* param1); struct miqt_string QListView_Tr(const char* s); @@ -70,19 +114,161 @@ bool QListView_IsSelectionRectVisible(const QListView* self); void QListView_SetItemAlignment(QListView* self, int alignment); int QListView_ItemAlignment(const QListView* self); QRect* QListView_VisualRect(const QListView* self, QModelIndex* index); -void QListView_ScrollTo(QListView* self, QModelIndex* index); +void QListView_ScrollTo(QListView* self, QModelIndex* index, int hint); QModelIndex* QListView_IndexAt(const QListView* self, QPoint* p); void QListView_DoItemsLayout(QListView* self); void QListView_Reset(QListView* self); void QListView_SetRootIndex(QListView* self, QModelIndex* index); void QListView_IndexesMoved(QListView* self, struct miqt_array /* of QModelIndex* */ indexes); void QListView_connect_IndexesMoved(QListView* self, intptr_t slot); +bool QListView_Event(QListView* self, QEvent* e); +void QListView_ScrollContentsBy(QListView* self, int dx, int dy); +void QListView_DataChanged(QListView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QListView_RowsInserted(QListView* self, QModelIndex* parent, int start, int end); +void QListView_RowsAboutToBeRemoved(QListView* self, QModelIndex* parent, int start, int end); +void QListView_MouseMoveEvent(QListView* self, QMouseEvent* e); +void QListView_MouseReleaseEvent(QListView* self, QMouseEvent* e); +void QListView_WheelEvent(QListView* self, QWheelEvent* e); +void QListView_TimerEvent(QListView* self, QTimerEvent* e); +void QListView_ResizeEvent(QListView* self, QResizeEvent* e); +void QListView_DragMoveEvent(QListView* self, QDragMoveEvent* e); +void QListView_DragLeaveEvent(QListView* self, QDragLeaveEvent* e); +void QListView_DropEvent(QListView* self, QDropEvent* e); +void QListView_StartDrag(QListView* self, int supportedActions); +QStyleOptionViewItem* QListView_ViewOptions(const QListView* self); +void QListView_PaintEvent(QListView* self, QPaintEvent* e); +int QListView_HorizontalOffset(const QListView* self); +int QListView_VerticalOffset(const QListView* self); +QModelIndex* QListView_MoveCursor(QListView* self, int cursorAction, int modifiers); +void QListView_SetSelection(QListView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QListView_SelectedIndexes(const QListView* self); +void QListView_UpdateGeometries(QListView* self); +bool QListView_IsIndexHidden(const QListView* self, QModelIndex* index); +void QListView_CurrentChanged(QListView* self, QModelIndex* current, QModelIndex* previous); +QSize* QListView_ViewportSizeHint(const QListView* self); struct miqt_string QListView_Tr2(const char* s, const char* c); struct miqt_string QListView_Tr3(const char* s, const char* c, int n); struct miqt_string QListView_TrUtf82(const char* s, const char* c); struct miqt_string QListView_TrUtf83(const char* s, const char* c, int n); -void QListView_ScrollTo2(QListView* self, QModelIndex* index, int hint); -void QListView_Delete(QListView* self); +void QListView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QListView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QListView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QListView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QListView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QListView_virtualbase_IndexAt(const void* self, QPoint* p); +void QListView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QListView_virtualbase_DoItemsLayout(void* self); +void QListView_override_virtual_Reset(void* self, intptr_t slot); +void QListView_virtualbase_Reset(void* self); +void QListView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QListView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QListView_override_virtual_Event(void* self, intptr_t slot); +bool QListView_virtualbase_Event(void* self, QEvent* e); +void QListView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QListView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QListView_override_virtual_DataChanged(void* self, intptr_t slot); +void QListView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QListView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QListView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QListView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QListView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QListView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QListView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QListView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QListView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QListView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QListView_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QListView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QListView_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QListView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QListView_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QListView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QListView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QListView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QListView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QListView_override_virtual_DropEvent(void* self, intptr_t slot); +void QListView_virtualbase_DropEvent(void* self, QDropEvent* e); +void QListView_override_virtual_StartDrag(void* self, intptr_t slot); +void QListView_virtualbase_StartDrag(void* self, int supportedActions); +void QListView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QListView_virtualbase_ViewOptions(const void* self); +void QListView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QListView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QListView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QListView_virtualbase_HorizontalOffset(const void* self); +void QListView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QListView_virtualbase_VerticalOffset(const void* self); +void QListView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QListView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QListView_override_virtual_SetSelection(void* self, intptr_t slot); +void QListView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QListView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QListView_virtualbase_SelectedIndexes(const void* self); +void QListView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QListView_virtualbase_UpdateGeometries(void* self); +void QListView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QListView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QListView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QListView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QListView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QListView_virtualbase_ViewportSizeHint(const void* self); +void QListView_override_virtual_SetModel(void* self, intptr_t slot); +void QListView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QListView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QListView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QListView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QListView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QListView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QListView_virtualbase_SizeHintForRow(const void* self, int row); +void QListView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QListView_virtualbase_SizeHintForColumn(const void* self, int column); +void QListView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QListView_virtualbase_InputMethodQuery(const void* self, int query); +void QListView_override_virtual_SelectAll(void* self, intptr_t slot); +void QListView_virtualbase_SelectAll(void* self); +void QListView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QListView_virtualbase_UpdateEditorData(void* self); +void QListView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QListView_virtualbase_UpdateEditorGeometries(void* self); +void QListView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QListView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QListView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QListView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QListView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QListView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QListView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QListView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QListView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QListView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QListView_override_virtual_CommitData(void* self, intptr_t slot); +void QListView_virtualbase_CommitData(void* self, QWidget* editor); +void QListView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QListView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QListView_override_virtual_Edit2(void* self, intptr_t slot); +bool QListView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QListView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QListView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QListView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QListView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QListView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QListView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QListView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QListView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QListView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QListView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QListView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QListView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QListView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QListView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QListView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QListView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QListView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QListView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QListView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QListView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QListView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QListView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QListView_Delete(QListView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlistwidget.cpp b/qt/gen_qlistwidget.cpp index 45d76c9a..0faa3f35 100644 --- a/qt/gen_qlistwidget.cpp +++ b/qt/gen_qlistwidget.cpp @@ -1,70 +1,290 @@ +#include +#include #include #include #include +#include +#include #include +#include #include +#include #include #include #include +#include #include #include #include +#include +#include +#include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include #include +#include #include #include #include "gen_qlistwidget.h" #include "_cgo_export.h" -QListWidgetItem* QListWidgetItem_new() { - return new QListWidgetItem(); +class MiqtVirtualQListWidgetItem : public virtual QListWidgetItem { +public: + + MiqtVirtualQListWidgetItem(): QListWidgetItem() {}; + MiqtVirtualQListWidgetItem(const QString& text): QListWidgetItem(text) {}; + MiqtVirtualQListWidgetItem(const QIcon& icon, const QString& text): QListWidgetItem(icon, text) {}; + MiqtVirtualQListWidgetItem(const QListWidgetItem& other): QListWidgetItem(other) {}; + MiqtVirtualQListWidgetItem(QListWidget* listview): QListWidgetItem(listview) {}; + MiqtVirtualQListWidgetItem(QListWidget* listview, int typeVal): QListWidgetItem(listview, typeVal) {}; + MiqtVirtualQListWidgetItem(const QString& text, QListWidget* listview): QListWidgetItem(text, listview) {}; + MiqtVirtualQListWidgetItem(const QString& text, QListWidget* listview, int typeVal): QListWidgetItem(text, listview, typeVal) {}; + MiqtVirtualQListWidgetItem(const QIcon& icon, const QString& text, QListWidget* listview): QListWidgetItem(icon, text, listview) {}; + MiqtVirtualQListWidgetItem(const QIcon& icon, const QString& text, QListWidget* listview, int typeVal): QListWidgetItem(icon, text, listview, typeVal) {}; + + virtual ~MiqtVirtualQListWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QListWidgetItem* clone() const override { + if (handle__Clone == 0) { + return QListWidgetItem::clone(); + } + + + QListWidgetItem* callback_return_value = miqt_exec_callback_QListWidgetItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QListWidgetItem* virtualbase_Clone() const { + + return QListWidgetItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetBackgroundColor = 0; + + // Subclass to allow providing a Go implementation + virtual void setBackgroundColor(const QColor& color) override { + if (handle__SetBackgroundColor == 0) { + QListWidgetItem::setBackgroundColor(color); + return; + } + + const QColor& color_ret = color; + // Cast returned reference into pointer + QColor* sigval1 = const_cast(&color_ret); + + miqt_exec_callback_QListWidgetItem_SetBackgroundColor(this, handle__SetBackgroundColor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetBackgroundColor(QColor* color) { + + QListWidgetItem::setBackgroundColor(*color); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int role) const override { + if (handle__Data == 0) { + return QListWidgetItem::data(role); + } + + int sigval1 = role; + + QVariant* callback_return_value = miqt_exec_callback_QListWidgetItem_Data(const_cast(this), handle__Data, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int role) const { + + return new QVariant(QListWidgetItem::data(static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(int role, const QVariant& value) override { + if (handle__SetData == 0) { + QListWidgetItem::setData(role, value); + return; + } + + int sigval1 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QListWidgetItem_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(int role, QVariant* value) { + + QListWidgetItem::setData(static_cast(role), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QListWidgetItem& other) const override { + if (handle__OperatorLesser == 0) { + return QListWidgetItem::operator<(other); + } + + const QListWidgetItem& other_ret = other; + // Cast returned reference into pointer + QListWidgetItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QListWidgetItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QListWidgetItem* other) const { + + return QListWidgetItem::operator<(*other); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QListWidgetItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QListWidgetItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QListWidgetItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QListWidgetItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QListWidgetItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QListWidgetItem::write(*out); + + } + +}; + +void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new2(struct miqt_string text) { +void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(text_QString); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text) { +void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(*icon, text_QString); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other) { - return new QListWidgetItem(*other); +void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*other); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new5(QListWidget* listview) { - return new QListWidgetItem(listview); +void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal) { - return new QListWidgetItem(listview, static_cast(typeVal)); +void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview, static_cast(typeVal)); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview) { +void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(text_QString, listview); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal) { +void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(text_QString, listview, static_cast(typeVal)); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview, static_cast(typeVal)); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview) { +void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(*icon, text_QString, listview); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal) { +void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); + *outptr_QListWidgetItem = ret; } QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self) { @@ -140,141 +360,1179 @@ void QListWidgetItem_SetStatusTip(QListWidgetItem* self, struct miqt_string stat self->setStatusTip(statusTip_QString); } -struct miqt_string QListWidgetItem_ToolTip(const QListWidgetItem* self) { - QString _ret = self->toolTip(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} +struct miqt_string QListWidgetItem_ToolTip(const QListWidgetItem* self) { + QString _ret = self->toolTip(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QListWidgetItem_SetToolTip(QListWidgetItem* self, struct miqt_string toolTip) { + QString toolTip_QString = QString::fromUtf8(toolTip.data, toolTip.len); + self->setToolTip(toolTip_QString); +} + +struct miqt_string QListWidgetItem_WhatsThis(const QListWidgetItem* self) { + QString _ret = self->whatsThis(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QListWidgetItem_SetWhatsThis(QListWidgetItem* self, struct miqt_string whatsThis) { + QString whatsThis_QString = QString::fromUtf8(whatsThis.data, whatsThis.len); + self->setWhatsThis(whatsThis_QString); +} + +QFont* QListWidgetItem_Font(const QListWidgetItem* self) { + return new QFont(self->font()); +} + +void QListWidgetItem_SetFont(QListWidgetItem* self, QFont* font) { + self->setFont(*font); +} + +int QListWidgetItem_TextAlignment(const QListWidgetItem* self) { + return self->textAlignment(); +} + +void QListWidgetItem_SetTextAlignment(QListWidgetItem* self, int alignment) { + self->setTextAlignment(static_cast(alignment)); +} + +QColor* QListWidgetItem_BackgroundColor(const QListWidgetItem* self) { + return new QColor(self->backgroundColor()); +} + +void QListWidgetItem_SetBackgroundColor(QListWidgetItem* self, QColor* color) { + self->setBackgroundColor(*color); +} + +QBrush* QListWidgetItem_Background(const QListWidgetItem* self) { + return new QBrush(self->background()); +} + +void QListWidgetItem_SetBackground(QListWidgetItem* self, QBrush* brush) { + self->setBackground(*brush); +} + +QColor* QListWidgetItem_TextColor(const QListWidgetItem* self) { + return new QColor(self->textColor()); +} + +void QListWidgetItem_SetTextColor(QListWidgetItem* self, QColor* color) { + self->setTextColor(*color); +} + +QBrush* QListWidgetItem_Foreground(const QListWidgetItem* self) { + return new QBrush(self->foreground()); +} + +void QListWidgetItem_SetForeground(QListWidgetItem* self, QBrush* brush) { + self->setForeground(*brush); +} + +int QListWidgetItem_CheckState(const QListWidgetItem* self) { + Qt::CheckState _ret = self->checkState(); + return static_cast(_ret); +} + +void QListWidgetItem_SetCheckState(QListWidgetItem* self, int state) { + self->setCheckState(static_cast(state)); +} + +QSize* QListWidgetItem_SizeHint(const QListWidgetItem* self) { + return new QSize(self->sizeHint()); +} + +void QListWidgetItem_SetSizeHint(QListWidgetItem* self, QSize* size) { + self->setSizeHint(*size); +} + +QVariant* QListWidgetItem_Data(const QListWidgetItem* self, int role) { + return new QVariant(self->data(static_cast(role))); +} + +void QListWidgetItem_SetData(QListWidgetItem* self, int role, QVariant* value) { + self->setData(static_cast(role), *value); +} + +bool QListWidgetItem_OperatorLesser(const QListWidgetItem* self, QListWidgetItem* other) { + return self->operator<(*other); +} + +void QListWidgetItem_Read(QListWidgetItem* self, QDataStream* in) { + self->read(*in); +} + +void QListWidgetItem_Write(const QListWidgetItem* self, QDataStream* out) { + self->write(*out); +} + +void QListWidgetItem_OperatorAssign(QListWidgetItem* self, QListWidgetItem* other) { + self->operator=(*other); +} + +int QListWidgetItem_Type(const QListWidgetItem* self) { + return self->type(); +} + +void QListWidgetItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Clone = slot; +} + +QListWidgetItem* QListWidgetItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Clone(); +} + +void QListWidgetItem_override_virtual_SetBackgroundColor(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__SetBackgroundColor = slot; +} + +void QListWidgetItem_virtualbase_SetBackgroundColor(void* self, QColor* color) { + ( (MiqtVirtualQListWidgetItem*)(self) )->virtualbase_SetBackgroundColor(color); +} + +void QListWidgetItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Data = slot; +} + +QVariant* QListWidgetItem_virtualbase_Data(const void* self, int role) { + return ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Data(role); +} + +void QListWidgetItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__SetData = slot; +} + +void QListWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value) { + ( (MiqtVirtualQListWidgetItem*)(self) )->virtualbase_SetData(role, value); +} + +void QListWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__OperatorLesser = slot; +} + +bool QListWidgetItem_virtualbase_OperatorLesser(const void* self, QListWidgetItem* other) { + return ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_OperatorLesser(other); +} + +void QListWidgetItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Read = slot; +} + +void QListWidgetItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Read(in); +} + +void QListWidgetItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Write = slot; +} + +void QListWidgetItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Write(out); +} + +void QListWidgetItem_Delete(QListWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQListWidget : public virtual QListWidget { +public: + + MiqtVirtualQListWidget(QWidget* parent): QListWidget(parent) {}; + MiqtVirtualQListWidget(): QListWidget() {}; + + virtual ~MiqtVirtualQListWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QListWidget::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QListWidget_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QListWidget::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QListWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QListWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QListWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QListWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QListWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QListWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QListWidget::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QListWidget_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QListWidget::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QList items) const override { + if (handle__MimeData == 0) { + return QListWidget::mimeData(items); + } + + const QList items_ret = items; + // Convert QList<> from C++ memory to manually-managed C memory + QListWidgetItem** items_arr = static_cast(malloc(sizeof(QListWidgetItem*) * items_ret.length())); + for (size_t i = 0, e = items_ret.length(); i < e; ++i) { + items_arr[i] = items_ret[i]; + } + struct miqt_array items_out; + items_out.len = items_ret.length(); + items_out.data = static_cast(items_arr); + struct miqt_array /* of QListWidgetItem* */ sigval1 = items_out; + + QMimeData* callback_return_value = miqt_exec_callback_QListWidget_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QListWidgetItem* */ items) const { + QList items_QList; + items_QList.reserve(items.len); + QListWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + + return QListWidget::mimeData(items_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(int index, const QMimeData* data, Qt::DropAction action) override { + if (handle__DropMimeData == 0) { + return QListWidget::dropMimeData(index, data, action); + } + + int sigval1 = index; + QMimeData* sigval2 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval3 = static_cast(action_ret); + + bool callback_return_value = miqt_exec_callback_QListWidget_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(int index, QMimeData* data, int action) { + + return QListWidget::dropMimeData(static_cast(index), data, static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QListWidget::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QListWidget_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QListWidget::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QListWidget::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QListWidget_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QListWidget::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QListWidget::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QListWidget_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QListWidget::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QListWidget::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListWidget_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QListWidget::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QListWidget::doItemsLayout(); + return; + } + + + miqt_exec_callback_QListWidget_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QListWidget::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QListWidget::reset(); + return; + } + + + miqt_exec_callback_QListWidget_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QListWidget::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QListWidget::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QListWidget_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QListWidget::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QListWidget::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QListWidget_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QListWidget::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QListWidget::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QListWidget_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QListWidget::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QListWidget::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListWidget_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QListWidget::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QListWidget::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListWidget_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QListWidget::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QListWidget::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QListWidget::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QListWidget::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QListWidget::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QListWidget::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QListWidget::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QListWidget::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QListWidget::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QListWidget::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QListWidget::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QListWidget::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QListWidget::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QListWidget::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QListWidget::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QListWidget::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QListWidget_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QListWidget::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QListWidget::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QListWidget_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QListWidget::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QListWidget::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QListWidget::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QListWidget::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListWidget_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QListWidget::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QListWidget::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListWidget_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QListWidget::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QListWidget::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListWidget_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QListWidget::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QListWidget::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QListWidget_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QListWidget::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QListWidget::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QListWidget_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } -void QListWidgetItem_SetToolTip(QListWidgetItem* self, struct miqt_string toolTip) { - QString toolTip_QString = QString::fromUtf8(toolTip.data, toolTip.len); - self->setToolTip(toolTip_QString); -} + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { -struct miqt_string QListWidgetItem_WhatsThis(const QListWidgetItem* self) { - QString _ret = self->whatsThis(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + QModelIndexList _ret = QListWidget::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; -void QListWidgetItem_SetWhatsThis(QListWidgetItem* self, struct miqt_string whatsThis) { - QString whatsThis_QString = QString::fromUtf8(whatsThis.data, whatsThis.len); - self->setWhatsThis(whatsThis_QString); -} + } -QFont* QListWidgetItem_Font(const QListWidgetItem* self) { - return new QFont(self->font()); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; -void QListWidgetItem_SetFont(QListWidgetItem* self, QFont* font) { - self->setFont(*font); -} + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QListWidget::updateGeometries(); + return; + } + -int QListWidgetItem_TextAlignment(const QListWidgetItem* self) { - return self->textAlignment(); -} + miqt_exec_callback_QListWidget_UpdateGeometries(this, handle__UpdateGeometries); -void QListWidgetItem_SetTextAlignment(QListWidgetItem* self, int alignment) { - self->setTextAlignment(static_cast(alignment)); -} + + } -QColor* QListWidgetItem_BackgroundColor(const QListWidgetItem* self) { - return new QColor(self->backgroundColor()); -} + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { -void QListWidgetItem_SetBackgroundColor(QListWidgetItem* self, QColor* color) { - self->setBackgroundColor(*color); -} + QListWidget::updateGeometries(); -QBrush* QListWidgetItem_Background(const QListWidgetItem* self) { - return new QBrush(self->background()); -} + } -void QListWidgetItem_SetBackground(QListWidgetItem* self, QBrush* brush) { - self->setBackground(*brush); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; -QColor* QListWidgetItem_TextColor(const QListWidgetItem* self) { - return new QColor(self->textColor()); -} + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QListWidget::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); -void QListWidgetItem_SetTextColor(QListWidgetItem* self, QColor* color) { - self->setTextColor(*color); -} + bool callback_return_value = miqt_exec_callback_QListWidget_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); -QBrush* QListWidgetItem_Foreground(const QListWidgetItem* self) { - return new QBrush(self->foreground()); -} + return callback_return_value; + } -void QListWidgetItem_SetForeground(QListWidgetItem* self, QBrush* brush) { - self->setForeground(*brush); -} + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { -int QListWidgetItem_CheckState(const QListWidgetItem* self) { - Qt::CheckState _ret = self->checkState(); - return static_cast(_ret); -} + return QListWidget::isIndexHidden(*index); -void QListWidgetItem_SetCheckState(QListWidgetItem* self, int state) { - self->setCheckState(static_cast(state)); -} + } -QSize* QListWidgetItem_SizeHint(const QListWidgetItem* self) { - return new QSize(self->sizeHint()); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QListWidget::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QListWidget_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } -void QListWidgetItem_SetSizeHint(QListWidgetItem* self, QSize* size) { - self->setSizeHint(*size); -} + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { -QVariant* QListWidgetItem_Data(const QListWidgetItem* self, int role) { - return new QVariant(self->data(static_cast(role))); -} + QListWidget::currentChanged(*current, *previous); -void QListWidgetItem_SetData(QListWidgetItem* self, int role, QVariant* value) { - self->setData(static_cast(role), *value); -} + } -bool QListWidgetItem_OperatorLesser(const QListWidgetItem* self, QListWidgetItem* other) { - return self->operator<(*other); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; -void QListWidgetItem_Read(QListWidgetItem* self, QDataStream* in) { - self->read(*in); -} + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QListWidget::viewportSizeHint(); + } + -void QListWidgetItem_Write(const QListWidgetItem* self, QDataStream* out) { - self->write(*out); -} + QSize* callback_return_value = miqt_exec_callback_QListWidget_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); -void QListWidgetItem_OperatorAssign(QListWidgetItem* self, QListWidgetItem* other) { - self->operator=(*other); -} + return *callback_return_value; + } -int QListWidgetItem_Type(const QListWidgetItem* self) { - return self->type(); -} + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { -void QListWidgetItem_Delete(QListWidgetItem* self) { - delete self; -} + return new QSize(QListWidget::viewportSizeHint()); -QListWidget* QListWidget_new(QWidget* parent) { - return new QListWidget(parent); + } + +}; + +void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(parent); + *outptr_QListWidget = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QListWidget* QListWidget_new2() { - return new QListWidget(); +void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(); + *outptr_QListWidget = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QListWidget_MetaObject(const QListWidget* self) { @@ -503,7 +1761,7 @@ void QListWidget_ItemPressed(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemPressed(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemPressed), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemPressed), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemPressed(slot, sigval1); }); @@ -514,7 +1772,7 @@ void QListWidget_ItemClicked(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemClicked(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemClicked), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemClicked), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemClicked(slot, sigval1); }); @@ -525,7 +1783,7 @@ void QListWidget_ItemDoubleClicked(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemDoubleClicked(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemDoubleClicked), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemDoubleClicked), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemDoubleClicked(slot, sigval1); }); @@ -536,7 +1794,7 @@ void QListWidget_ItemActivated(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemActivated(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemActivated), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemActivated), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemActivated(slot, sigval1); }); @@ -547,7 +1805,7 @@ void QListWidget_ItemEntered(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemEntered(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemEntered), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemEntered), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemEntered(slot, sigval1); }); @@ -558,7 +1816,7 @@ void QListWidget_ItemChanged(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemChanged), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemChanged), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemChanged(slot, sigval1); }); @@ -569,7 +1827,7 @@ void QListWidget_CurrentItemChanged(QListWidget* self, QListWidgetItem* current, } void QListWidget_connect_CurrentItemChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::currentItemChanged), self, [=](QListWidgetItem* current, QListWidgetItem* previous) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::currentItemChanged), self, [=](QListWidgetItem* current, QListWidgetItem* previous) { QListWidgetItem* sigval1 = current; QListWidgetItem* sigval2 = previous; miqt_exec_callback_QListWidget_CurrentItemChanged(slot, sigval1, sigval2); @@ -582,7 +1840,7 @@ void QListWidget_CurrentTextChanged(QListWidget* self, struct miqt_string curren } void QListWidget_connect_CurrentTextChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::currentTextChanged), self, [=](const QString& currentText) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::currentTextChanged), self, [=](const QString& currentText) { const QString currentText_ret = currentText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray currentText_b = currentText_ret.toUtf8(); @@ -600,7 +1858,7 @@ void QListWidget_CurrentRowChanged(QListWidget* self, int currentRow) { } void QListWidget_connect_CurrentRowChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::currentRowChanged), self, [=](int currentRow) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::currentRowChanged), self, [=](int currentRow) { int sigval1 = currentRow; miqt_exec_callback_QListWidget_CurrentRowChanged(slot, sigval1); }); @@ -611,7 +1869,7 @@ void QListWidget_ItemSelectionChanged(QListWidget* self) { } void QListWidget_connect_ItemSelectionChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemSelectionChanged), self, [=]() { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemSelectionChanged), self, [=]() { miqt_exec_callback_QListWidget_ItemSelectionChanged(slot); }); } @@ -668,7 +1926,299 @@ void QListWidget_ScrollToItem2(QListWidget* self, QListWidgetItem* item, int hin self->scrollToItem(item, static_cast(hint)); } -void QListWidget_Delete(QListWidget* self) { - delete self; +void QListWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SetSelectionModel = slot; +} + +void QListWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QListWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DropEvent = slot; +} + +void QListWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QListWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__Event = slot; +} + +bool QListWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQListWidget*)(self) )->virtualbase_Event(e); +} + +void QListWidget_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QListWidget_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_MimeTypes(); +} + +void QListWidget_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MimeData = slot; +} + +QMimeData* QListWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QListWidgetItem* */ items) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_MimeData(items); +} + +void QListWidget_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DropMimeData = slot; +} + +bool QListWidget_virtualbase_DropMimeData(void* self, int index, QMimeData* data, int action) { + return ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DropMimeData(index, data, action); +} + +void QListWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SupportedDropActions = slot; +} + +int QListWidget_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_SupportedDropActions(); +} + +void QListWidget_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__VisualRect = slot; +} + +QRect* QListWidget_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_VisualRect(index); +} + +void QListWidget_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ScrollTo = slot; +} + +void QListWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QListWidget_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QListWidget_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_IndexAt(p); +} + +void QListWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DoItemsLayout = slot; +} + +void QListWidget_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DoItemsLayout(); +} + +void QListWidget_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__Reset = slot; +} + +void QListWidget_virtualbase_Reset(void* self) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_Reset(); +} + +void QListWidget_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SetRootIndex = slot; +} + +void QListWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetRootIndex(index); +} + +void QListWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ScrollContentsBy = slot; +} + +void QListWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QListWidget_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DataChanged = slot; +} + +void QListWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QListWidget_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__RowsInserted = slot; +} + +void QListWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QListWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QListWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QListWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QListWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QListWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QListWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QListWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__WheelEvent = slot; +} + +void QListWidget_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_WheelEvent(e); +} + +void QListWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__TimerEvent = slot; +} + +void QListWidget_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_TimerEvent(e); +} + +void QListWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QListWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_ResizeEvent(e); +} + +void QListWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QListWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QListWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QListWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QListWidget_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__StartDrag = slot; +} + +void QListWidget_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QListWidget_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QListWidget_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_ViewOptions(); +} + +void QListWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__PaintEvent = slot; +} + +void QListWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_PaintEvent(e); +} + +void QListWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__HorizontalOffset = slot; +} + +int QListWidget_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_HorizontalOffset(); +} + +void QListWidget_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__VerticalOffset = slot; +} + +int QListWidget_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_VerticalOffset(); +} + +void QListWidget_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QListWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQListWidget*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QListWidget_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SetSelection = slot; +} + +void QListWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QListWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QListWidget_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_SelectedIndexes(); +} + +void QListWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__UpdateGeometries = slot; +} + +void QListWidget_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_UpdateGeometries(); +} + +void QListWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__IsIndexHidden = slot; +} + +bool QListWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QListWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__CurrentChanged = slot; +} + +void QListWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QListWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QListWidget_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QListWidget_Delete(QListWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlistwidget.go b/qt/gen_qlistwidget.go index 39504164..3401039f 100644 --- a/qt/gen_qlistwidget.go +++ b/qt/gen_qlistwidget.go @@ -22,7 +22,8 @@ const ( ) type QListWidgetItem struct { - h *C.QListWidgetItem + h *C.QListWidgetItem + isSubclass bool } func (this *QListWidgetItem) cPointer() *C.QListWidgetItem { @@ -39,6 +40,7 @@ func (this *QListWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQListWidgetItem constructs the type using only CGO pointers. func newQListWidgetItem(h *C.QListWidgetItem) *QListWidgetItem { if h == nil { return nil @@ -46,14 +48,23 @@ func newQListWidgetItem(h *C.QListWidgetItem) *QListWidgetItem { return &QListWidgetItem{h: h} } +// UnsafeNewQListWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQListWidgetItem(h unsafe.Pointer) *QListWidgetItem { - return newQListWidgetItem((*C.QListWidgetItem)(h)) + if h == nil { + return nil + } + + return &QListWidgetItem{h: (*C.QListWidgetItem)(h)} } // NewQListWidgetItem constructs a new QListWidgetItem object. func NewQListWidgetItem() *QListWidgetItem { - ret := C.QListWidgetItem_new() - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new(&outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem2 constructs a new QListWidgetItem object. @@ -62,8 +73,12 @@ func NewQListWidgetItem2(text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new2(text_ms) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new2(text_ms, &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem3 constructs a new QListWidgetItem object. @@ -72,26 +87,42 @@ func NewQListWidgetItem3(icon *QIcon, text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new3(icon.cPointer(), text_ms) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem4 constructs a new QListWidgetItem object. func NewQListWidgetItem4(other *QListWidgetItem) *QListWidgetItem { - ret := C.QListWidgetItem_new4(other.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new4(other.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem5 constructs a new QListWidgetItem object. func NewQListWidgetItem5(listview *QListWidget) *QListWidgetItem { - ret := C.QListWidgetItem_new5(listview.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new5(listview.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem6 constructs a new QListWidgetItem object. func NewQListWidgetItem6(listview *QListWidget, typeVal int) *QListWidgetItem { - ret := C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal)) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem7 constructs a new QListWidgetItem object. @@ -100,8 +131,12 @@ func NewQListWidgetItem7(text string, listview *QListWidget) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new7(text_ms, listview.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new7(text_ms, listview.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem8 constructs a new QListWidgetItem object. @@ -110,8 +145,12 @@ func NewQListWidgetItem8(text string, listview *QListWidget, typeVal int) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal)) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem9 constructs a new QListWidgetItem object. @@ -120,8 +159,12 @@ func NewQListWidgetItem9(icon *QIcon, text string, listview *QListWidget) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem10 constructs a new QListWidgetItem object. @@ -130,8 +173,12 @@ func NewQListWidgetItem10(icon *QIcon, text string, listview *QListWidget, typeV text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal)) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } func (this *QListWidgetItem) Clone() *QListWidgetItem { @@ -139,7 +186,7 @@ func (this *QListWidgetItem) Clone() *QListWidgetItem { } func (this *QListWidgetItem) ListWidget() *QListWidget { - return UnsafeNewQListWidget(unsafe.Pointer(C.QListWidgetItem_ListWidget(this.h))) + return UnsafeNewQListWidget(unsafe.Pointer(C.QListWidgetItem_ListWidget(this.h)), nil, nil, nil, nil, nil, nil, nil) } func (this *QListWidgetItem) SetSelected(selectVal bool) { @@ -350,9 +397,177 @@ func (this *QListWidgetItem) Type() int { return (int)(C.QListWidgetItem_Type(this.h)) } +func (this *QListWidgetItem) callVirtualBase_Clone() *QListWidgetItem { + + return UnsafeNewQListWidgetItem(unsafe.Pointer(C.QListWidgetItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QListWidgetItem) OnClone(slot func(super func() *QListWidgetItem) *QListWidgetItem) { + C.QListWidgetItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Clone +func miqt_exec_callback_QListWidgetItem_Clone(self *C.QListWidgetItem, cb C.intptr_t) *C.QListWidgetItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QListWidgetItem) *QListWidgetItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidgetItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QListWidgetItem) callVirtualBase_SetBackgroundColor(color *QColor) { + + C.QListWidgetItem_virtualbase_SetBackgroundColor(unsafe.Pointer(this.h), color.cPointer()) + +} +func (this *QListWidgetItem) OnSetBackgroundColor(slot func(super func(color *QColor), color *QColor)) { + C.QListWidgetItem_override_virtual_SetBackgroundColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_SetBackgroundColor +func miqt_exec_callback_QListWidgetItem_SetBackgroundColor(self *C.QListWidgetItem, cb C.intptr_t, color *C.QColor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(color *QColor), color *QColor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQColor(unsafe.Pointer(color)) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_SetBackgroundColor, slotval1) + +} + +func (this *QListWidgetItem) callVirtualBase_Data(role int) *QVariant { + + _ret := C.QListWidgetItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidgetItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) { + C.QListWidgetItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Data +func miqt_exec_callback_QListWidgetItem_Data(self *C.QListWidgetItem, cb C.intptr_t, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + virtualReturn := gofunc((&QListWidgetItem{h: self}).callVirtualBase_Data, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidgetItem) callVirtualBase_SetData(role int, value *QVariant) { + + C.QListWidgetItem_virtualbase_SetData(unsafe.Pointer(this.h), (C.int)(role), value.cPointer()) + +} +func (this *QListWidgetItem) OnSetData(slot func(super func(role int, value *QVariant), role int, value *QVariant)) { + C.QListWidgetItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_SetData +func miqt_exec_callback_QListWidgetItem_SetData(self *C.QListWidgetItem, cb C.intptr_t, role C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int, value *QVariant), role int, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QListWidgetItem) callVirtualBase_OperatorLesser(other *QListWidgetItem) bool { + + return (bool)(C.QListWidgetItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QListWidgetItem) OnOperatorLesser(slot func(super func(other *QListWidgetItem) bool, other *QListWidgetItem) bool) { + C.QListWidgetItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_OperatorLesser +func miqt_exec_callback_QListWidgetItem_OperatorLesser(self *C.QListWidgetItem, cb C.intptr_t, other *C.QListWidgetItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QListWidgetItem) bool, other *QListWidgetItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQListWidgetItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QListWidgetItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidgetItem) callVirtualBase_Read(in *QDataStream) { + + C.QListWidgetItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QListWidgetItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QListWidgetItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Read +func miqt_exec_callback_QListWidgetItem_Read(self *C.QListWidgetItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in)) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QListWidgetItem) callVirtualBase_Write(out *QDataStream) { + + C.QListWidgetItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QListWidgetItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QListWidgetItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Write +func miqt_exec_callback_QListWidgetItem_Write(self *C.QListWidgetItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out)) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_Write, slotval1) + +} + // Delete this object from C++ memory. func (this *QListWidgetItem) Delete() { - C.QListWidgetItem_Delete(this.h) + C.QListWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -365,7 +580,8 @@ func (this *QListWidgetItem) GoGC() { } type QListWidget struct { - h *C.QListWidget + h *C.QListWidget + isSubclass bool *QListView } @@ -383,27 +599,57 @@ func (this *QListWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQListWidget(h *C.QListWidget) *QListWidget { +// newQListWidget constructs the type using only CGO pointers. +func newQListWidget(h *C.QListWidget, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListWidget { if h == nil { return nil } - return &QListWidget{h: h, QListView: UnsafeNewQListView(unsafe.Pointer(h))} + return &QListWidget{h: h, + QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQListWidget(h unsafe.Pointer) *QListWidget { - return newQListWidget((*C.QListWidget)(h)) +// UnsafeNewQListWidget constructs the type using only unsafe pointers. +func UnsafeNewQListWidget(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListWidget { + if h == nil { + return nil + } + + return &QListWidget{h: (*C.QListWidget)(h), + QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQListWidget constructs a new QListWidget object. func NewQListWidget(parent *QWidget) *QListWidget { - ret := C.QListWidget_new(parent.cPointer()) - return newQListWidget(ret) + var outptr_QListWidget *C.QListWidget = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListWidget_new(parent.cPointer(), &outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQListWidget2 constructs a new QListWidget object. func NewQListWidget2() *QListWidget { - ret := C.QListWidget_new2() - return newQListWidget(ret) + var outptr_QListWidget *C.QListWidget = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListWidget_new2(&outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QListWidget) MetaObject() *QMetaObject { @@ -574,7 +820,7 @@ func (this *QListWidget) IsPersistentEditorOpen(item *QListWidgetItem) bool { } func (this *QListWidget) ItemWidget(item *QListWidgetItem) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QListWidget_ItemWidget(this.h, item.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QListWidget_ItemWidget(this.h, item.cPointer())), nil, nil) } func (this *QListWidget) SetItemWidget(item *QListWidgetItem, widget *QWidget) { @@ -894,9 +1140,925 @@ func (this *QListWidget) ScrollToItem2(item *QListWidgetItem, hint QAbstractItem C.QListWidget_ScrollToItem2(this.h, item.cPointer(), (C.int)(hint)) } +func (this *QListWidget) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QListWidget_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QListWidget) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QListWidget_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SetSelectionModel +func miqt_exec_callback_QListWidget_SetSelectionModel(self *C.QListWidget, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QListWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QListWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QListWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DropEvent +func miqt_exec_callback_QListWidget_DropEvent(self *C.QListWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QListWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QListWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QListWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_Event +func miqt_exec_callback_QListWidget_Event(self *C.QListWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QListWidget_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QListWidget) OnMimeTypes(slot func(super func() []string) []string) { + C.QListWidget_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MimeTypes +func miqt_exec_callback_QListWidget_MimeTypes(self *C.QListWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QListWidget) callVirtualBase_MimeData(items []*QListWidgetItem) *QMimeData { + items_CArray := (*[0xffff]*C.QListWidgetItem)(C.malloc(C.size_t(8 * len(items)))) + defer C.free(unsafe.Pointer(items_CArray)) + for i := range items { + items_CArray[i] = items[i].cPointer() + } + items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QListWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)), nil) +} +func (this *QListWidget) OnMimeData(slot func(super func(items []*QListWidgetItem) *QMimeData, items []*QListWidgetItem) *QMimeData) { + C.QListWidget_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MimeData +func miqt_exec_callback_QListWidget_MimeData(self *C.QListWidget, cb C.intptr_t, items C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(items []*QListWidgetItem) *QMimeData, items []*QListWidgetItem) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var items_ma C.struct_miqt_array = items + items_ret := make([]*QListWidgetItem, int(items_ma.len)) + items_outCast := (*[0xffff]*C.QListWidgetItem)(unsafe.Pointer(items_ma.data)) // hey ya + for i := 0; i < int(items_ma.len); i++ { + items_ret[i] = UnsafeNewQListWidgetItem(unsafe.Pointer(items_outCast[i])) + } + slotval1 := items_ret + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_DropMimeData(index int, data *QMimeData, action DropAction) bool { + + return (bool)(C.QListWidget_virtualbase_DropMimeData(unsafe.Pointer(this.h), (C.int)(index), data.cPointer(), (C.int)(action))) + +} +func (this *QListWidget) OnDropMimeData(slot func(super func(index int, data *QMimeData, action DropAction) bool, index int, data *QMimeData, action DropAction) bool) { + C.QListWidget_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DropMimeData +func miqt_exec_callback_QListWidget_DropMimeData(self *C.QListWidget, cb C.intptr_t, index C.int, data *C.QMimeData, action C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int, data *QMimeData, action DropAction) bool, index int, data *QMimeData, action DropAction) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + slotval2 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval3 := (DropAction)(action) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QListWidget_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QListWidget) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QListWidget_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SupportedDropActions +func miqt_exec_callback_QListWidget_SupportedDropActions(self *C.QListWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QListWidget_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QListWidget_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_VisualRect +func miqt_exec_callback_QListWidget_VisualRect(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QListWidget_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QListWidget) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QListWidget_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ScrollTo +func miqt_exec_callback_QListWidget_ScrollTo(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QListWidget{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QListWidget_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QListWidget_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_IndexAt +func miqt_exec_callback_QListWidget_IndexAt(self *C.QListWidget, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_DoItemsLayout() { + + C.QListWidget_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QListWidget) OnDoItemsLayout(slot func(super func())) { + C.QListWidget_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DoItemsLayout +func miqt_exec_callback_QListWidget_DoItemsLayout(self *C.QListWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListWidget{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QListWidget) callVirtualBase_Reset() { + + C.QListWidget_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QListWidget) OnReset(slot func(super func())) { + C.QListWidget_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_Reset +func miqt_exec_callback_QListWidget_Reset(self *C.QListWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListWidget{h: self}).callVirtualBase_Reset) + +} + +func (this *QListWidget) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QListWidget_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QListWidget) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QListWidget_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SetRootIndex +func miqt_exec_callback_QListWidget_SetRootIndex(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QListWidget{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QListWidget) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QListWidget_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QListWidget) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QListWidget_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ScrollContentsBy +func miqt_exec_callback_QListWidget_ScrollContentsBy(self *C.QListWidget, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QListWidget{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QListWidget_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QListWidget) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QListWidget_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DataChanged +func miqt_exec_callback_QListWidget_DataChanged(self *C.QListWidget, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QListWidget{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QListWidget) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QListWidget_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListWidget) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListWidget_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_RowsInserted +func miqt_exec_callback_QListWidget_RowsInserted(self *C.QListWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListWidget{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QListWidget) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QListWidget_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListWidget) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListWidget_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_RowsAboutToBeRemoved +func miqt_exec_callback_QListWidget_RowsAboutToBeRemoved(self *C.QListWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListWidget{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QListWidget) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QListWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MouseMoveEvent +func miqt_exec_callback_QListWidget_MouseMoveEvent(self *C.QListWidget, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QListWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MouseReleaseEvent +func miqt_exec_callback_QListWidget_MouseReleaseEvent(self *C.QListWidget, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QListWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QListWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_WheelEvent +func miqt_exec_callback_QListWidget_WheelEvent(self *C.QListWidget, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QListWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QListWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_TimerEvent +func miqt_exec_callback_QListWidget_TimerEvent(self *C.QListWidget, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QListWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QListWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ResizeEvent +func miqt_exec_callback_QListWidget_ResizeEvent(self *C.QListWidget, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QListWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QListWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DragMoveEvent +func miqt_exec_callback_QListWidget_DragMoveEvent(self *C.QListWidget, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QListWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QListWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DragLeaveEvent +func miqt_exec_callback_QListWidget_DragLeaveEvent(self *C.QListWidget, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QListWidget_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QListWidget) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QListWidget_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_StartDrag +func miqt_exec_callback_QListWidget_StartDrag(self *C.QListWidget, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QListWidget{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QListWidget) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QListWidget_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QListWidget_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ViewOptions +func miqt_exec_callback_QListWidget_ViewOptions(self *C.QListWidget, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QListWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QListWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_PaintEvent +func miqt_exec_callback_QListWidget_PaintEvent(self *C.QListWidget, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QListWidget_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListWidget) OnHorizontalOffset(slot func(super func() int) int) { + C.QListWidget_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_HorizontalOffset +func miqt_exec_callback_QListWidget_HorizontalOffset(self *C.QListWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_VerticalOffset() int { + + return (int)(C.QListWidget_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListWidget) OnVerticalOffset(slot func(super func() int) int) { + C.QListWidget_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_VerticalOffset +func miqt_exec_callback_QListWidget_VerticalOffset(self *C.QListWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QListWidget_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QListWidget_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MoveCursor +func miqt_exec_callback_QListWidget_MoveCursor(self *C.QListWidget, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QListWidget_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QListWidget) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QListWidget_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SetSelection +func miqt_exec_callback_QListWidget_SetSelection(self *C.QListWidget, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QListWidget{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QListWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QListWidget) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QListWidget_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SelectedIndexes +func miqt_exec_callback_QListWidget_SelectedIndexes(self *C.QListWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QListWidget) callVirtualBase_UpdateGeometries() { + + C.QListWidget_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QListWidget) OnUpdateGeometries(slot func(super func())) { + C.QListWidget_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_UpdateGeometries +func miqt_exec_callback_QListWidget_UpdateGeometries(self *C.QListWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListWidget{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QListWidget) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QListWidget_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QListWidget) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QListWidget_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_IsIndexHidden +func miqt_exec_callback_QListWidget_IsIndexHidden(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QListWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QListWidget) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QListWidget_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_CurrentChanged +func miqt_exec_callback_QListWidget_CurrentChanged(self *C.QListWidget, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QListWidget{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QListWidget_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QListWidget_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ViewportSizeHint +func miqt_exec_callback_QListWidget_ViewportSizeHint(self *C.QListWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QListWidget) Delete() { - C.QListWidget_Delete(this.h) + C.QListWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlistwidget.h b/qt/gen_qlistwidget.h index 3c747f1a..a2f16c32 100644 --- a/qt/gen_qlistwidget.h +++ b/qt/gen_qlistwidget.h @@ -15,49 +15,83 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; class QBrush; class QColor; class QDataStream; +class QDragLeaveEvent; +class QDragMoveEvent; class QDropEvent; +class QEvent; class QFont; +class QFrame; class QIcon; class QItemSelectionModel; +class QListView; class QListWidget; class QListWidgetItem; class QMetaObject; +class QMimeData; +class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QDataStream QDataStream; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QListView QListView; typedef struct QListWidget QListWidget; typedef struct QListWidgetItem QListWidgetItem; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QListWidgetItem* QListWidgetItem_new(); -QListWidgetItem* QListWidgetItem_new2(struct miqt_string text); -QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text); -QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other); -QListWidgetItem* QListWidgetItem_new5(QListWidget* listview); -QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal); -QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview); -QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal); -QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview); -QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal); +void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self); QListWidget* QListWidgetItem_ListWidget(const QListWidgetItem* self); void QListWidgetItem_SetSelected(QListWidgetItem* self, bool selectVal); @@ -99,10 +133,24 @@ void QListWidgetItem_Read(QListWidgetItem* self, QDataStream* in); void QListWidgetItem_Write(const QListWidgetItem* self, QDataStream* out); void QListWidgetItem_OperatorAssign(QListWidgetItem* self, QListWidgetItem* other); int QListWidgetItem_Type(const QListWidgetItem* self); -void QListWidgetItem_Delete(QListWidgetItem* self); +void QListWidgetItem_override_virtual_Clone(void* self, intptr_t slot); +QListWidgetItem* QListWidgetItem_virtualbase_Clone(const void* self); +void QListWidgetItem_override_virtual_SetBackgroundColor(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_SetBackgroundColor(void* self, QColor* color); +void QListWidgetItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QListWidgetItem_virtualbase_Data(const void* self, int role); +void QListWidgetItem_override_virtual_SetData(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value); +void QListWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QListWidgetItem_virtualbase_OperatorLesser(const void* self, QListWidgetItem* other); +void QListWidgetItem_override_virtual_Read(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_Read(void* self, QDataStream* in); +void QListWidgetItem_override_virtual_Write(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_Write(const void* self, QDataStream* out); +void QListWidgetItem_Delete(QListWidgetItem* self, bool isSubclass); -QListWidget* QListWidget_new(QWidget* parent); -QListWidget* QListWidget_new2(); +void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QListWidget_MetaObject(const QListWidget* self); void* QListWidget_Metacast(QListWidget* self, const char* param1); struct miqt_string QListWidget_Tr(const char* s); @@ -166,13 +214,90 @@ void QListWidget_CurrentRowChanged(QListWidget* self, int currentRow); void QListWidget_connect_CurrentRowChanged(QListWidget* self, intptr_t slot); void QListWidget_ItemSelectionChanged(QListWidget* self); void QListWidget_connect_ItemSelectionChanged(QListWidget* self, intptr_t slot); +bool QListWidget_Event(QListWidget* self, QEvent* e); +struct miqt_array /* of struct miqt_string */ QListWidget_MimeTypes(const QListWidget* self); +QMimeData* QListWidget_MimeData(const QListWidget* self, struct miqt_array /* of QListWidgetItem* */ items); +bool QListWidget_DropMimeData(QListWidget* self, int index, QMimeData* data, int action); +int QListWidget_SupportedDropActions(const QListWidget* self); struct miqt_string QListWidget_Tr2(const char* s, const char* c); struct miqt_string QListWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QListWidget_TrUtf82(const char* s, const char* c); struct miqt_string QListWidget_TrUtf83(const char* s, const char* c, int n); void QListWidget_SortItems1(QListWidget* self, int order); void QListWidget_ScrollToItem2(QListWidget* self, QListWidgetItem* item, int hint); -void QListWidget_Delete(QListWidget* self); +void QListWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QListWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QListWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QListWidget_override_virtual_Event(void* self, intptr_t slot); +bool QListWidget_virtualbase_Event(void* self, QEvent* e); +void QListWidget_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QListWidget_virtualbase_MimeTypes(const void* self); +void QListWidget_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QListWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QListWidgetItem* */ items); +void QListWidget_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QListWidget_virtualbase_DropMimeData(void* self, int index, QMimeData* data, int action); +void QListWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QListWidget_virtualbase_SupportedDropActions(const void* self); +void QListWidget_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QListWidget_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QListWidget_override_virtual_ScrollTo(void* self, intptr_t slot); +void QListWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QListWidget_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QListWidget_virtualbase_IndexAt(const void* self, QPoint* p); +void QListWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QListWidget_virtualbase_DoItemsLayout(void* self); +void QListWidget_override_virtual_Reset(void* self, intptr_t slot); +void QListWidget_virtualbase_Reset(void* self); +void QListWidget_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QListWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QListWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QListWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QListWidget_override_virtual_DataChanged(void* self, intptr_t slot); +void QListWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QListWidget_override_virtual_RowsInserted(void* self, intptr_t slot); +void QListWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QListWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QListWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QListWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QListWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QListWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QListWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QListWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QListWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QListWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QListWidget_override_virtual_StartDrag(void* self, intptr_t slot); +void QListWidget_virtualbase_StartDrag(void* self, int supportedActions); +void QListWidget_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QListWidget_virtualbase_ViewOptions(const void* self); +void QListWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QListWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QListWidget_virtualbase_HorizontalOffset(const void* self); +void QListWidget_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QListWidget_virtualbase_VerticalOffset(const void* self); +void QListWidget_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QListWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QListWidget_override_virtual_SetSelection(void* self, intptr_t slot); +void QListWidget_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QListWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QListWidget_virtualbase_SelectedIndexes(const void* self); +void QListWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QListWidget_virtualbase_UpdateGeometries(void* self); +void QListWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QListWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QListWidget_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QListWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QListWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QListWidget_virtualbase_ViewportSizeHint(const void* self); +void QListWidget_Delete(QListWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlocale.cpp b/qt/gen_qlocale.cpp index 29eb15fa..268c9545 100644 --- a/qt/gen_qlocale.cpp +++ b/qt/gen_qlocale.cpp @@ -12,29 +12,35 @@ #include "gen_qlocale.h" #include "_cgo_export.h" -QLocale* QLocale_new() { - return new QLocale(); +void QLocale_new(QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(); + *outptr_QLocale = ret; } -QLocale* QLocale_new2(struct miqt_string name) { +void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QLocale(name_QString); + QLocale* ret = new QLocale(name_QString); + *outptr_QLocale = ret; } -QLocale* QLocale_new3(int language) { - return new QLocale(static_cast(language)); +void QLocale_new3(int language, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language)); + *outptr_QLocale = ret; } -QLocale* QLocale_new4(int language, int script, int country) { - return new QLocale(static_cast(language), static_cast(script), static_cast(country)); +void QLocale_new4(int language, int script, int country, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language), static_cast(script), static_cast(country)); + *outptr_QLocale = ret; } -QLocale* QLocale_new5(QLocale* other) { - return new QLocale(*other); +void QLocale_new5(QLocale* other, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(*other); + *outptr_QLocale = ret; } -QLocale* QLocale_new6(int language, int country) { - return new QLocale(static_cast(language), static_cast(country)); +void QLocale_new6(int language, int country, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language), static_cast(country)); + *outptr_QLocale = ret; } void QLocale_OperatorAssign(QLocale* self, QLocale* other) { @@ -1281,7 +1287,11 @@ struct miqt_string QLocale_QuoteString2(const QLocale* self, struct miqt_string return _ms; } -void QLocale_Delete(QLocale* self) { - delete self; +void QLocale_Delete(QLocale* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlocale.go b/qt/gen_qlocale.go index 647f4db8..67192752 100644 --- a/qt/gen_qlocale.go +++ b/qt/gen_qlocale.go @@ -892,7 +892,8 @@ const ( ) type QLocale struct { - h *C.QLocale + h *C.QLocale + isSubclass bool } func (this *QLocale) cPointer() *C.QLocale { @@ -909,6 +910,7 @@ func (this *QLocale) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLocale constructs the type using only CGO pointers. func newQLocale(h *C.QLocale) *QLocale { if h == nil { return nil @@ -916,14 +918,23 @@ func newQLocale(h *C.QLocale) *QLocale { return &QLocale{h: h} } +// UnsafeNewQLocale constructs the type using only unsafe pointers. func UnsafeNewQLocale(h unsafe.Pointer) *QLocale { - return newQLocale((*C.QLocale)(h)) + if h == nil { + return nil + } + + return &QLocale{h: (*C.QLocale)(h)} } // NewQLocale constructs a new QLocale object. func NewQLocale() *QLocale { - ret := C.QLocale_new() - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new(&outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale2 constructs a new QLocale object. @@ -932,32 +943,52 @@ func NewQLocale2(name string) *QLocale { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QLocale_new2(name_ms) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new2(name_ms, &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale3 constructs a new QLocale object. func NewQLocale3(language QLocale__Language) *QLocale { - ret := C.QLocale_new3((C.int)(language)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new3((C.int)(language), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale4 constructs a new QLocale object. func NewQLocale4(language QLocale__Language, script QLocale__Script, country QLocale__Country) *QLocale { - ret := C.QLocale_new4((C.int)(language), (C.int)(script), (C.int)(country)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new4((C.int)(language), (C.int)(script), (C.int)(country), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale5 constructs a new QLocale object. func NewQLocale5(other *QLocale) *QLocale { - ret := C.QLocale_new5(other.cPointer()) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new5(other.cPointer(), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale6 constructs a new QLocale object. func NewQLocale6(language QLocale__Language, country QLocale__Country) *QLocale { - ret := C.QLocale_new6((C.int)(language), (C.int)(country)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new6((C.int)(language), (C.int)(country), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } func (this *QLocale) OperatorAssign(other *QLocale) { @@ -2110,7 +2141,7 @@ func (this *QLocale) QuoteString2(str string, style QLocale__QuotationStyle) str // Delete this object from C++ memory. func (this *QLocale) Delete() { - C.QLocale_Delete(this.h) + C.QLocale_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlocale.h b/qt/gen_qlocale.h index fbb3c92d..4682a317 100644 --- a/qt/gen_qlocale.h +++ b/qt/gen_qlocale.h @@ -30,12 +30,12 @@ typedef struct QLocale QLocale; typedef struct QTime QTime; #endif -QLocale* QLocale_new(); -QLocale* QLocale_new2(struct miqt_string name); -QLocale* QLocale_new3(int language); -QLocale* QLocale_new4(int language, int script, int country); -QLocale* QLocale_new5(QLocale* other); -QLocale* QLocale_new6(int language, int country); +void QLocale_new(QLocale** outptr_QLocale); +void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale); +void QLocale_new3(int language, QLocale** outptr_QLocale); +void QLocale_new4(int language, int script, int country, QLocale** outptr_QLocale); +void QLocale_new5(QLocale* other, QLocale** outptr_QLocale); +void QLocale_new6(int language, int country, QLocale** outptr_QLocale); void QLocale_OperatorAssign(QLocale* self, QLocale* other); void QLocale_Swap(QLocale* self, QLocale* other); int QLocale_Language(const QLocale* self); @@ -177,7 +177,7 @@ struct miqt_string QLocale_FormattedDataSize3(QLocale* self, long long bytes, in struct miqt_string QLocale_FormattedDataSize22(const QLocale* self, long long bytes, int precision); struct miqt_string QLocale_FormattedDataSize32(const QLocale* self, long long bytes, int precision, int format); struct miqt_string QLocale_QuoteString2(const QLocale* self, struct miqt_string str, int style); -void QLocale_Delete(QLocale* self); +void QLocale_Delete(QLocale* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qlockfile.cpp b/qt/gen_qlockfile.cpp index 95c27183..7637c4d3 100644 --- a/qt/gen_qlockfile.cpp +++ b/qt/gen_qlockfile.cpp @@ -6,9 +6,10 @@ #include "gen_qlockfile.h" #include "_cgo_export.h" -QLockFile* QLockFile_new(struct miqt_string fileName) { +void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLockFile(fileName_QString); + QLockFile* ret = new QLockFile(fileName_QString); + *outptr_QLockFile = ret; } bool QLockFile_Lock(QLockFile* self) { @@ -48,7 +49,11 @@ bool QLockFile_TryLock1(QLockFile* self, int timeout) { return self->tryLock(static_cast(timeout)); } -void QLockFile_Delete(QLockFile* self) { - delete self; +void QLockFile_Delete(QLockFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qlockfile.go b/qt/gen_qlockfile.go index 2c174948..4a6b8086 100644 --- a/qt/gen_qlockfile.go +++ b/qt/gen_qlockfile.go @@ -23,7 +23,8 @@ const ( ) type QLockFile struct { - h *C.QLockFile + h *C.QLockFile + isSubclass bool } func (this *QLockFile) cPointer() *C.QLockFile { @@ -40,6 +41,7 @@ func (this *QLockFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLockFile constructs the type using only CGO pointers. func newQLockFile(h *C.QLockFile) *QLockFile { if h == nil { return nil @@ -47,8 +49,13 @@ func newQLockFile(h *C.QLockFile) *QLockFile { return &QLockFile{h: h} } +// UnsafeNewQLockFile constructs the type using only unsafe pointers. func UnsafeNewQLockFile(h unsafe.Pointer) *QLockFile { - return newQLockFile((*C.QLockFile)(h)) + if h == nil { + return nil + } + + return &QLockFile{h: (*C.QLockFile)(h)} } // NewQLockFile constructs a new QLockFile object. @@ -57,8 +64,12 @@ func NewQLockFile(fileName string) *QLockFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLockFile_new(fileName_ms) - return newQLockFile(ret) + var outptr_QLockFile *C.QLockFile = nil + + C.QLockFile_new(fileName_ms, &outptr_QLockFile) + ret := newQLockFile(outptr_QLockFile) + ret.isSubclass = true + return ret } func (this *QLockFile) Lock() bool { @@ -99,7 +110,7 @@ func (this *QLockFile) TryLock1(timeout int) bool { // Delete this object from C++ memory. func (this *QLockFile) Delete() { - C.QLockFile_Delete(this.h) + C.QLockFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qlockfile.h b/qt/gen_qlockfile.h index 09497f8b..42b7533a 100644 --- a/qt/gen_qlockfile.h +++ b/qt/gen_qlockfile.h @@ -20,7 +20,7 @@ class QLockFile; typedef struct QLockFile QLockFile; #endif -QLockFile* QLockFile_new(struct miqt_string fileName); +void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile); bool QLockFile_Lock(QLockFile* self); bool QLockFile_TryLock(QLockFile* self); void QLockFile_Unlock(QLockFile* self); @@ -30,7 +30,7 @@ bool QLockFile_IsLocked(const QLockFile* self); bool QLockFile_RemoveStaleLockFile(QLockFile* self); int QLockFile_Error(const QLockFile* self); bool QLockFile_TryLock1(QLockFile* self, int timeout); -void QLockFile_Delete(QLockFile* self); +void QLockFile_Delete(QLockFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qloggingcategory.cpp b/qt/gen_qloggingcategory.cpp index f7e39c04..e9926534 100644 --- a/qt/gen_qloggingcategory.cpp +++ b/qt/gen_qloggingcategory.cpp @@ -6,8 +6,9 @@ #include "gen_qloggingcategory.h" #include "_cgo_export.h" -QLoggingCategory* QLoggingCategory_new(const char* category) { - return new QLoggingCategory(category); +void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory) { + QLoggingCategory* ret = new QLoggingCategory(category); + *outptr_QLoggingCategory = ret; } bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self) { @@ -51,7 +52,11 @@ void QLoggingCategory_SetFilterRules(struct miqt_string rules) { QLoggingCategory::setFilterRules(rules_QString); } -void QLoggingCategory_Delete(QLoggingCategory* self) { - delete self; +void QLoggingCategory_Delete(QLoggingCategory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qloggingcategory.go b/qt/gen_qloggingcategory.go index 0b994895..79730854 100644 --- a/qt/gen_qloggingcategory.go +++ b/qt/gen_qloggingcategory.go @@ -14,7 +14,8 @@ import ( ) type QLoggingCategory struct { - h *C.QLoggingCategory + h *C.QLoggingCategory + isSubclass bool } func (this *QLoggingCategory) cPointer() *C.QLoggingCategory { @@ -31,6 +32,7 @@ func (this *QLoggingCategory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLoggingCategory constructs the type using only CGO pointers. func newQLoggingCategory(h *C.QLoggingCategory) *QLoggingCategory { if h == nil { return nil @@ -38,16 +40,25 @@ func newQLoggingCategory(h *C.QLoggingCategory) *QLoggingCategory { return &QLoggingCategory{h: h} } +// UnsafeNewQLoggingCategory constructs the type using only unsafe pointers. func UnsafeNewQLoggingCategory(h unsafe.Pointer) *QLoggingCategory { - return newQLoggingCategory((*C.QLoggingCategory)(h)) + if h == nil { + return nil + } + + return &QLoggingCategory{h: (*C.QLoggingCategory)(h)} } // NewQLoggingCategory constructs a new QLoggingCategory object. func NewQLoggingCategory(category string) *QLoggingCategory { category_Cstring := C.CString(category) defer C.free(unsafe.Pointer(category_Cstring)) - ret := C.QLoggingCategory_new(category_Cstring) - return newQLoggingCategory(ret) + var outptr_QLoggingCategory *C.QLoggingCategory = nil + + C.QLoggingCategory_new(category_Cstring, &outptr_QLoggingCategory) + ret := newQLoggingCategory(outptr_QLoggingCategory) + ret.isSubclass = true + return ret } func (this *QLoggingCategory) IsDebugEnabled() bool { @@ -93,7 +104,7 @@ func QLoggingCategory_SetFilterRules(rules string) { // Delete this object from C++ memory. func (this *QLoggingCategory) Delete() { - C.QLoggingCategory_Delete(this.h) + C.QLoggingCategory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qloggingcategory.h b/qt/gen_qloggingcategory.h index 8dacc814..fc7648af 100644 --- a/qt/gen_qloggingcategory.h +++ b/qt/gen_qloggingcategory.h @@ -20,7 +20,7 @@ class QLoggingCategory; typedef struct QLoggingCategory QLoggingCategory; #endif -QLoggingCategory* QLoggingCategory_new(const char* category); +void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory); bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsInfoEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsWarningEnabled(const QLoggingCategory* self); @@ -30,7 +30,7 @@ QLoggingCategory* QLoggingCategory_OperatorCall(QLoggingCategory* self); QLoggingCategory* QLoggingCategory_OperatorCall2(const QLoggingCategory* self); QLoggingCategory* QLoggingCategory_DefaultCategory(); void QLoggingCategory_SetFilterRules(struct miqt_string rules); -void QLoggingCategory_Delete(QLoggingCategory* self); +void QLoggingCategory_Delete(QLoggingCategory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmainwindow.cpp b/qt/gen_qmainwindow.cpp index b233cd88..628acd30 100644 --- a/qt/gen_qmainwindow.cpp +++ b/qt/gen_qmainwindow.cpp @@ -1,32 +1,1076 @@ +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include "gen_qmainwindow.h" #include "_cgo_export.h" -QMainWindow* QMainWindow_new(QWidget* parent) { - return new QMainWindow(parent); +class MiqtVirtualQMainWindow : public virtual QMainWindow { +public: + + MiqtVirtualQMainWindow(QWidget* parent): QMainWindow(parent) {}; + MiqtVirtualQMainWindow(): QMainWindow() {}; + MiqtVirtualQMainWindow(QWidget* parent, Qt::WindowFlags flags): QMainWindow(parent, flags) {}; + + virtual ~MiqtVirtualQMainWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreatePopupMenu = 0; + + // Subclass to allow providing a Go implementation + virtual QMenu* createPopupMenu() override { + if (handle__CreatePopupMenu == 0) { + return QMainWindow::createPopupMenu(); + } + + + QMenu* callback_return_value = miqt_exec_callback_QMainWindow_CreatePopupMenu(this, handle__CreatePopupMenu); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMenu* virtualbase_CreatePopupMenu() { + + return QMainWindow::createPopupMenu(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QMainWindow::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QMainWindow::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMainWindow::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMainWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMainWindow::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMainWindow::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMainWindow_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMainWindow::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMainWindow::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMainWindow_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMainWindow::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMainWindow::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMainWindow_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMainWindow::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMainWindow::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMainWindow_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMainWindow::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMainWindow::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMainWindow_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMainWindow::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMainWindow::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMainWindow_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMainWindow::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMainWindow::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMainWindow_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMainWindow::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QMainWindow::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QMainWindow::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QMainWindow::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QMainWindow::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QMainWindow::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QMainWindow::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QMainWindow::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QMainWindow::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QMainWindow::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QMainWindow::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QMainWindow::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QMainWindow::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMainWindow::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMainWindow::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QMainWindow::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QMainWindow::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QMainWindow::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QMainWindow::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QMainWindow::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QMainWindow::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QMainWindow::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QMainWindow::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QMainWindow::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QMainWindow::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QMainWindow::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QMainWindow::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QMainWindow::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QMainWindow::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMainWindow::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMainWindow::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMainWindow::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMainWindow::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QMainWindow::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QMainWindow::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMainWindow::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMainWindow::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMainWindow::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMainWindow::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMainWindow::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMainWindow::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMainWindow::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMainWindow::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMainWindow::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMainWindow::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QMainWindow::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QMainWindow::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QMainWindow::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QMainWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMainWindow::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QMainWindow::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMainWindow_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QMainWindow::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMainWindow::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMainWindow_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMainWindow::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMainWindow::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMainWindow_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMainWindow::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMainWindow::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMainWindow_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMainWindow::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMainWindow::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMainWindow_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMainWindow::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMainWindow::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMainWindow_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMainWindow::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMainWindow::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMainWindow_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMainWindow::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMainWindow::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMainWindow_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMainWindow::focusNextPrevChild(next); + + } + +}; + +void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent); + *outptr_QMainWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMainWindow* QMainWindow_new2() { - return new QMainWindow(); +void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(); + *outptr_QMainWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMainWindow* QMainWindow_new3(QWidget* parent, int flags) { - return new QMainWindow(parent, static_cast(flags)); +void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent, static_cast(flags)); + *outptr_QMainWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMainWindow_MetaObject(const QMainWindow* self) { @@ -307,7 +1351,7 @@ void QMainWindow_IconSizeChanged(QMainWindow* self, QSize* iconSize) { } void QMainWindow_connect_IconSizeChanged(QMainWindow* self, intptr_t slot) { - QMainWindow::connect(self, static_cast(&QMainWindow::iconSizeChanged), self, [=](const QSize& iconSize) { + MiqtVirtualQMainWindow::connect(self, static_cast(&QMainWindow::iconSizeChanged), self, [=](const QSize& iconSize) { const QSize& iconSize_ret = iconSize; // Cast returned reference into pointer QSize* sigval1 = const_cast(&iconSize_ret); @@ -320,7 +1364,7 @@ void QMainWindow_ToolButtonStyleChanged(QMainWindow* self, int toolButtonStyle) } void QMainWindow_connect_ToolButtonStyleChanged(QMainWindow* self, intptr_t slot) { - QMainWindow::connect(self, static_cast(&QMainWindow::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { + MiqtVirtualQMainWindow::connect(self, static_cast(&QMainWindow::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { Qt::ToolButtonStyle toolButtonStyle_ret = toolButtonStyle; int sigval1 = static_cast(toolButtonStyle_ret); miqt_exec_callback_QMainWindow_ToolButtonStyleChanged(slot, sigval1); @@ -332,7 +1376,7 @@ void QMainWindow_TabifiedDockWidgetActivated(QMainWindow* self, QDockWidget* doc } void QMainWindow_connect_TabifiedDockWidgetActivated(QMainWindow* self, intptr_t slot) { - QMainWindow::connect(self, static_cast(&QMainWindow::tabifiedDockWidgetActivated), self, [=](QDockWidget* dockWidget) { + MiqtVirtualQMainWindow::connect(self, static_cast(&QMainWindow::tabifiedDockWidgetActivated), self, [=](QDockWidget* dockWidget) { QDockWidget* sigval1 = dockWidget; miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(slot, sigval1); }); @@ -400,7 +1444,347 @@ bool QMainWindow_RestoreState2(QMainWindow* self, struct miqt_string state, int return self->restoreState(state_QByteArray, static_cast(version)); } -void QMainWindow_Delete(QMainWindow* self) { - delete self; +void QMainWindow_override_virtual_CreatePopupMenu(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__CreatePopupMenu = slot; +} + +QMenu* QMainWindow_virtualbase_CreatePopupMenu(void* self) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_CreatePopupMenu(); +} + +void QMainWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMainWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QMainWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__Event = slot; +} + +bool QMainWindow_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_Event(event); +} + +void QMainWindow_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DevType = slot; +} + +int QMainWindow_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_DevType(); +} + +void QMainWindow_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__SetVisible = slot; +} + +void QMainWindow_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_SetVisible(visible); +} + +void QMainWindow_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__SizeHint = slot; +} + +QSize* QMainWindow_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_SizeHint(); +} + +void QMainWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMainWindow_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMainWindow_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__HeightForWidth = slot; +} + +int QMainWindow_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMainWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMainWindow_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMainWindow_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMainWindow_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_PaintEngine(); +} + +void QMainWindow_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MousePressEvent = slot; +} + +void QMainWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MousePressEvent(event); +} + +void QMainWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMainWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QMainWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMainWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QMainWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMainWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QMainWindow_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__WheelEvent = slot; +} + +void QMainWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_WheelEvent(event); +} + +void QMainWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__KeyPressEvent = slot; +} + +void QMainWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QMainWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMainWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMainWindow_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__FocusInEvent = slot; +} + +void QMainWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_FocusInEvent(event); +} + +void QMainWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__FocusOutEvent = slot; +} + +void QMainWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QMainWindow_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__EnterEvent = slot; +} + +void QMainWindow_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_EnterEvent(event); +} + +void QMainWindow_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__LeaveEvent = slot; +} + +void QMainWindow_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_LeaveEvent(event); +} + +void QMainWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__PaintEvent = slot; +} + +void QMainWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_PaintEvent(event); +} + +void QMainWindow_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MoveEvent = slot; +} + +void QMainWindow_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MoveEvent(event); +} + +void QMainWindow_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ResizeEvent = slot; +} + +void QMainWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ResizeEvent(event); +} + +void QMainWindow_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__CloseEvent = slot; +} + +void QMainWindow_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_CloseEvent(event); +} + +void QMainWindow_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__TabletEvent = slot; +} + +void QMainWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_TabletEvent(event); +} + +void QMainWindow_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ActionEvent = slot; +} + +void QMainWindow_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ActionEvent(event); +} + +void QMainWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DragEnterEvent = slot; +} + +void QMainWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMainWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DragMoveEvent = slot; +} + +void QMainWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMainWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMainWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMainWindow_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DropEvent = slot; +} + +void QMainWindow_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DropEvent(event); +} + +void QMainWindow_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ShowEvent = slot; +} + +void QMainWindow_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ShowEvent(event); +} + +void QMainWindow_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__HideEvent = slot; +} + +void QMainWindow_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_HideEvent(event); +} + +void QMainWindow_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__NativeEvent = slot; +} + +bool QMainWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMainWindow_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ChangeEvent = slot; +} + +void QMainWindow_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QMainWindow_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__Metric = slot; +} + +int QMainWindow_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_Metric(param1); +} + +void QMainWindow_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__InitPainter = slot; +} + +void QMainWindow_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_InitPainter(painter); +} + +void QMainWindow_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMainWindow_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_Redirected(offset); +} + +void QMainWindow_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMainWindow_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_SharedPainter(); +} + +void QMainWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__InputMethodEvent = slot; +} + +void QMainWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMainWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMainWindow_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMainWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMainWindow_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMainWindow_Delete(QMainWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmainwindow.go b/qt/gen_qmainwindow.go index 57ccf563..f09b36e8 100644 --- a/qt/gen_qmainwindow.go +++ b/qt/gen_qmainwindow.go @@ -26,7 +26,8 @@ const ( ) type QMainWindow struct { - h *C.QMainWindow + h *C.QMainWindow + isSubclass bool *QWidget } @@ -44,33 +45,62 @@ func (this *QMainWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMainWindow(h *C.QMainWindow) *QMainWindow { +// newQMainWindow constructs the type using only CGO pointers. +func newQMainWindow(h *C.QMainWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMainWindow { if h == nil { return nil } - return &QMainWindow{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMainWindow{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMainWindow(h unsafe.Pointer) *QMainWindow { - return newQMainWindow((*C.QMainWindow)(h)) +// UnsafeNewQMainWindow constructs the type using only unsafe pointers. +func UnsafeNewQMainWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMainWindow { + if h == nil { + return nil + } + + return &QMainWindow{h: (*C.QMainWindow)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMainWindow constructs a new QMainWindow object. func NewQMainWindow(parent *QWidget) *QMainWindow { - ret := C.QMainWindow_new(parent.cPointer()) - return newQMainWindow(ret) + var outptr_QMainWindow *C.QMainWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMainWindow_new(parent.cPointer(), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMainWindow2 constructs a new QMainWindow object. func NewQMainWindow2() *QMainWindow { - ret := C.QMainWindow_new2() - return newQMainWindow(ret) + var outptr_QMainWindow *C.QMainWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMainWindow_new2(&outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMainWindow3 constructs a new QMainWindow object. func NewQMainWindow3(parent *QWidget, flags WindowType) *QMainWindow { - ret := C.QMainWindow_new3(parent.cPointer(), (C.int)(flags)) - return newQMainWindow(ret) + var outptr_QMainWindow *C.QMainWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMainWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMainWindow) MetaObject() *QMetaObject { @@ -165,7 +195,7 @@ func (this *QMainWindow) IsSeparator(pos *QPoint) bool { } func (this *QMainWindow) MenuBar() *QMenuBar { - return UnsafeNewQMenuBar(unsafe.Pointer(C.QMainWindow_MenuBar(this.h))) + return UnsafeNewQMenuBar(unsafe.Pointer(C.QMainWindow_MenuBar(this.h)), nil, nil, nil) } func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { @@ -173,7 +203,7 @@ func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { } func (this *QMainWindow) MenuWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_MenuWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_MenuWidget(this.h)), nil, nil) } func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { @@ -181,7 +211,7 @@ func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { } func (this *QMainWindow) StatusBar() *QStatusBar { - return UnsafeNewQStatusBar(unsafe.Pointer(C.QMainWindow_StatusBar(this.h))) + return UnsafeNewQStatusBar(unsafe.Pointer(C.QMainWindow_StatusBar(this.h)), nil, nil, nil) } func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { @@ -189,7 +219,7 @@ func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { } func (this *QMainWindow) CentralWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_CentralWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_CentralWidget(this.h)), nil, nil) } func (this *QMainWindow) SetCentralWidget(widget *QWidget) { @@ -197,7 +227,7 @@ func (this *QMainWindow) SetCentralWidget(widget *QWidget) { } func (this *QMainWindow) TakeCentralWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_TakeCentralWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_TakeCentralWidget(this.h)), nil, nil) } func (this *QMainWindow) SetCorner(corner Corner, area DockWidgetArea) { @@ -229,7 +259,7 @@ func (this *QMainWindow) AddToolBarWithTitle(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQToolBar(unsafe.Pointer(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms))) + return UnsafeNewQToolBar(unsafe.Pointer(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms)), nil, nil, nil) } func (this *QMainWindow) InsertToolBar(before *QToolBar, toolbar *QToolBar) { @@ -277,7 +307,7 @@ func (this *QMainWindow) TabifiedDockWidgets(dockwidget *QDockWidget) []*QDockWi _ret := make([]*QDockWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QDockWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQDockWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQDockWidget(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } @@ -325,7 +355,7 @@ func (this *QMainWindow) RestoreState(state []byte) bool { } func (this *QMainWindow) CreatePopupMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QMainWindow_CreatePopupMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMainWindow_CreatePopupMenu(this.h)), nil, nil, nil) } func (this *QMainWindow) SetAnimated(enabled bool) { @@ -395,7 +425,7 @@ func miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(cb C.intptr_t, d } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQDockWidget(unsafe.Pointer(dockWidget)) + slotval1 := UnsafeNewQDockWidget(unsafe.Pointer(dockWidget), nil, nil, nil) gofunc(slotval1) } @@ -462,9 +492,996 @@ func (this *QMainWindow) RestoreState2(state []byte, version int) bool { return (bool)(C.QMainWindow_RestoreState2(this.h, state_alias, (C.int)(version))) } +func (this *QMainWindow) callVirtualBase_CreatePopupMenu() *QMenu { + + return UnsafeNewQMenu(unsafe.Pointer(C.QMainWindow_virtualbase_CreatePopupMenu(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QMainWindow) OnCreatePopupMenu(slot func(super func() *QMenu) *QMenu) { + C.QMainWindow_override_virtual_CreatePopupMenu(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_CreatePopupMenu +func miqt_exec_callback_QMainWindow_CreatePopupMenu(self *C.QMainWindow, cb C.intptr_t) *C.QMenu { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMenu) *QMenu) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_CreatePopupMenu) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QMainWindow_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QMainWindow_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ContextMenuEvent +func miqt_exec_callback_QMainWindow_ContextMenuEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMainWindow_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMainWindow) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMainWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_Event +func miqt_exec_callback_QMainWindow_Event(self *C.QMainWindow, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_DevType() int { + + return (int)(C.QMainWindow_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMainWindow) OnDevType(slot func(super func() int) int) { + C.QMainWindow_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DevType +func miqt_exec_callback_QMainWindow_DevType(self *C.QMainWindow, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_SetVisible(visible bool) { + + C.QMainWindow_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMainWindow) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMainWindow_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_SetVisible +func miqt_exec_callback_QMainWindow_SetVisible(self *C.QMainWindow, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMainWindow{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMainWindow_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMainWindow) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMainWindow_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_SizeHint +func miqt_exec_callback_QMainWindow_SizeHint(self *C.QMainWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMainWindow_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMainWindow) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMainWindow_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MinimumSizeHint +func miqt_exec_callback_QMainWindow_MinimumSizeHint(self *C.QMainWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMainWindow_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMainWindow) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMainWindow_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_HeightForWidth +func miqt_exec_callback_QMainWindow_HeightForWidth(self *C.QMainWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMainWindow_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMainWindow) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMainWindow_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_HasHeightForWidth +func miqt_exec_callback_QMainWindow_HasHeightForWidth(self *C.QMainWindow, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMainWindow_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMainWindow) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMainWindow_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_PaintEngine +func miqt_exec_callback_QMainWindow_PaintEngine(self *C.QMainWindow, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MousePressEvent +func miqt_exec_callback_QMainWindow_MousePressEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MouseReleaseEvent +func miqt_exec_callback_QMainWindow_MouseReleaseEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MouseDoubleClickEvent +func miqt_exec_callback_QMainWindow_MouseDoubleClickEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MouseMoveEvent +func miqt_exec_callback_QMainWindow_MouseMoveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QMainWindow_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QMainWindow_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_WheelEvent +func miqt_exec_callback_QMainWindow_WheelEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QMainWindow_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMainWindow_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_KeyPressEvent +func miqt_exec_callback_QMainWindow_KeyPressEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMainWindow_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMainWindow_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_KeyReleaseEvent +func miqt_exec_callback_QMainWindow_KeyReleaseEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QMainWindow_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMainWindow_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_FocusInEvent +func miqt_exec_callback_QMainWindow_FocusInEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QMainWindow_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMainWindow_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_FocusOutEvent +func miqt_exec_callback_QMainWindow_FocusOutEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_EnterEvent(event *QEvent) { + + C.QMainWindow_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMainWindow_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_EnterEvent +func miqt_exec_callback_QMainWindow_EnterEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QMainWindow_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMainWindow_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_LeaveEvent +func miqt_exec_callback_QMainWindow_LeaveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QMainWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QMainWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_PaintEvent +func miqt_exec_callback_QMainWindow_PaintEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QMainWindow_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QMainWindow_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MoveEvent +func miqt_exec_callback_QMainWindow_MoveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QMainWindow_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QMainWindow_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ResizeEvent +func miqt_exec_callback_QMainWindow_ResizeEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMainWindow_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMainWindow_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_CloseEvent +func miqt_exec_callback_QMainWindow_CloseEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMainWindow_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMainWindow_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_TabletEvent +func miqt_exec_callback_QMainWindow_TabletEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QMainWindow_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QMainWindow_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ActionEvent +func miqt_exec_callback_QMainWindow_ActionEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMainWindow_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMainWindow_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DragEnterEvent +func miqt_exec_callback_QMainWindow_DragEnterEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMainWindow_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMainWindow_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DragMoveEvent +func miqt_exec_callback_QMainWindow_DragMoveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMainWindow_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMainWindow_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DragLeaveEvent +func miqt_exec_callback_QMainWindow_DragLeaveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMainWindow_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMainWindow_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DropEvent +func miqt_exec_callback_QMainWindow_DropEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMainWindow_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMainWindow_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ShowEvent +func miqt_exec_callback_QMainWindow_ShowEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QMainWindow_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QMainWindow_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_HideEvent +func miqt_exec_callback_QMainWindow_HideEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMainWindow_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QMainWindow) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QMainWindow_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_NativeEvent +func miqt_exec_callback_QMainWindow_NativeEvent(self *C.QMainWindow, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QMainWindow_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMainWindow) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMainWindow_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ChangeEvent +func miqt_exec_callback_QMainWindow_ChangeEvent(self *C.QMainWindow, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMainWindow_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMainWindow) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMainWindow_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_Metric +func miqt_exec_callback_QMainWindow_Metric(self *C.QMainWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMainWindow_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMainWindow) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMainWindow_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_InitPainter +func miqt_exec_callback_QMainWindow_InitPainter(self *C.QMainWindow, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMainWindow_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMainWindow) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMainWindow_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_Redirected +func miqt_exec_callback_QMainWindow_Redirected(self *C.QMainWindow, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMainWindow_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMainWindow) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMainWindow_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_SharedPainter +func miqt_exec_callback_QMainWindow_SharedPainter(self *C.QMainWindow, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMainWindow_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMainWindow) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMainWindow_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_InputMethodEvent +func miqt_exec_callback_QMainWindow_InputMethodEvent(self *C.QMainWindow, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMainWindow_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMainWindow) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMainWindow_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_InputMethodQuery +func miqt_exec_callback_QMainWindow_InputMethodQuery(self *C.QMainWindow, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMainWindow_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMainWindow) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMainWindow_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_FocusNextPrevChild +func miqt_exec_callback_QMainWindow_FocusNextPrevChild(self *C.QMainWindow, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMainWindow) Delete() { - C.QMainWindow_Delete(this.h) + C.QMainWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmainwindow.h b/qt/gen_qmainwindow.h index 99151b47..d19e2156 100644 --- a/qt/gen_qmainwindow.h +++ b/qt/gen_qmainwindow.h @@ -15,34 +15,82 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDockWidget; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMainWindow; class QMenu; class QMenuBar; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QStatusBar; +class QTabletEvent; class QToolBar; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMainWindow QMainWindow; typedef struct QMenu QMenu; typedef struct QMenuBar QMenuBar; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QStatusBar QStatusBar; +typedef struct QTabletEvent QTabletEvent; typedef struct QToolBar QToolBar; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMainWindow* QMainWindow_new(QWidget* parent); -QMainWindow* QMainWindow_new2(); -QMainWindow* QMainWindow_new3(QWidget* parent, int flags); +void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMainWindow_MetaObject(const QMainWindow* self); void* QMainWindow_Metacast(QMainWindow* self, const char* param1); struct miqt_string QMainWindow_Tr(const char* s); @@ -105,6 +153,8 @@ void QMainWindow_ToolButtonStyleChanged(QMainWindow* self, int toolButtonStyle); void QMainWindow_connect_ToolButtonStyleChanged(QMainWindow* self, intptr_t slot); void QMainWindow_TabifiedDockWidgetActivated(QMainWindow* self, QDockWidget* dockWidget); void QMainWindow_connect_TabifiedDockWidgetActivated(QMainWindow* self, intptr_t slot); +void QMainWindow_ContextMenuEvent(QMainWindow* self, QContextMenuEvent* event); +bool QMainWindow_Event(QMainWindow* self, QEvent* event); struct miqt_string QMainWindow_Tr2(const char* s, const char* c); struct miqt_string QMainWindow_Tr3(const char* s, const char* c, int n); struct miqt_string QMainWindow_TrUtf82(const char* s, const char* c); @@ -112,7 +162,91 @@ struct miqt_string QMainWindow_TrUtf83(const char* s, const char* c, int n); void QMainWindow_AddToolBarBreak1(QMainWindow* self, int area); struct miqt_string QMainWindow_SaveState1(const QMainWindow* self, int version); bool QMainWindow_RestoreState2(QMainWindow* self, struct miqt_string state, int version); -void QMainWindow_Delete(QMainWindow* self); +void QMainWindow_override_virtual_CreatePopupMenu(void* self, intptr_t slot); +QMenu* QMainWindow_virtualbase_CreatePopupMenu(void* self); +void QMainWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QMainWindow_override_virtual_Event(void* self, intptr_t slot); +bool QMainWindow_virtualbase_Event(void* self, QEvent* event); +void QMainWindow_override_virtual_DevType(void* self, intptr_t slot); +int QMainWindow_virtualbase_DevType(const void* self); +void QMainWindow_override_virtual_SetVisible(void* self, intptr_t slot); +void QMainWindow_virtualbase_SetVisible(void* self, bool visible); +void QMainWindow_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMainWindow_virtualbase_SizeHint(const void* self); +void QMainWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMainWindow_virtualbase_MinimumSizeHint(const void* self); +void QMainWindow_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMainWindow_virtualbase_HeightForWidth(const void* self, int param1); +void QMainWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMainWindow_virtualbase_HasHeightForWidth(const void* self); +void QMainWindow_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMainWindow_virtualbase_PaintEngine(const void* self); +void QMainWindow_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QMainWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QMainWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMainWindow_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QMainWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QMainWindow_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_EnterEvent(void* self, QEvent* event); +void QMainWindow_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_LeaveEvent(void* self, QEvent* event); +void QMainWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QMainWindow_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QMainWindow_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QMainWindow_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMainWindow_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMainWindow_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QMainWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMainWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMainWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMainWindow_override_virtual_DropEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMainWindow_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMainWindow_override_virtual_HideEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_HideEvent(void* self, QHideEvent* event); +void QMainWindow_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMainWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QMainWindow_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QMainWindow_override_virtual_Metric(void* self, intptr_t slot); +int QMainWindow_virtualbase_Metric(const void* self, int param1); +void QMainWindow_override_virtual_InitPainter(void* self, intptr_t slot); +void QMainWindow_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMainWindow_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMainWindow_virtualbase_Redirected(const void* self, QPoint* offset); +void QMainWindow_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMainWindow_virtualbase_SharedPainter(const void* self); +void QMainWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMainWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMainWindow_virtualbase_InputMethodQuery(const void* self, int param1); +void QMainWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMainWindow_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMainWindow_Delete(QMainWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmargins.cpp b/qt/gen_qmargins.cpp index 6d52a535..7c594773 100644 --- a/qt/gen_qmargins.cpp +++ b/qt/gen_qmargins.cpp @@ -4,16 +4,19 @@ #include "gen_qmargins.h" #include "_cgo_export.h" -QMargins* QMargins_new() { - return new QMargins(); +void QMargins_new(QMargins** outptr_QMargins) { + QMargins* ret = new QMargins(); + *outptr_QMargins = ret; } -QMargins* QMargins_new2(int left, int top, int right, int bottom) { - return new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); +void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins) { + QMargins* ret = new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + *outptr_QMargins = ret; } -QMargins* QMargins_new3(QMargins* param1) { - return new QMargins(*param1); +void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins) { + QMargins* ret = new QMargins(*param1); + *outptr_QMargins = ret; } bool QMargins_IsNull(const QMargins* self) { @@ -100,24 +103,32 @@ QMargins* QMargins_OperatorDivideAssignWithQreal(QMargins* self, double param1) return &_ret; } -void QMargins_Delete(QMargins* self) { - delete self; +void QMargins_Delete(QMargins* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMarginsF* QMarginsF_new() { - return new QMarginsF(); +void QMarginsF_new(QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(); + *outptr_QMarginsF = ret; } -QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom) { - return new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); +void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + *outptr_QMarginsF = ret; } -QMarginsF* QMarginsF_new3(QMargins* margins) { - return new QMarginsF(*margins); +void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(*margins); + *outptr_QMarginsF = ret; } -QMarginsF* QMarginsF_new4(QMarginsF* param1) { - return new QMarginsF(*param1); +void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(*param1); + *outptr_QMarginsF = ret; } bool QMarginsF_IsNull(const QMarginsF* self) { @@ -200,7 +211,11 @@ QMargins* QMarginsF_ToMargins(const QMarginsF* self) { return new QMargins(self->toMargins()); } -void QMarginsF_Delete(QMarginsF* self) { - delete self; +void QMarginsF_Delete(QMarginsF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmargins.go b/qt/gen_qmargins.go index d97e25d0..49b8b21e 100644 --- a/qt/gen_qmargins.go +++ b/qt/gen_qmargins.go @@ -14,7 +14,8 @@ import ( ) type QMargins struct { - h *C.QMargins + h *C.QMargins + isSubclass bool } func (this *QMargins) cPointer() *C.QMargins { @@ -31,6 +32,7 @@ func (this *QMargins) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMargins constructs the type using only CGO pointers. func newQMargins(h *C.QMargins) *QMargins { if h == nil { return nil @@ -38,26 +40,43 @@ func newQMargins(h *C.QMargins) *QMargins { return &QMargins{h: h} } +// UnsafeNewQMargins constructs the type using only unsafe pointers. func UnsafeNewQMargins(h unsafe.Pointer) *QMargins { - return newQMargins((*C.QMargins)(h)) + if h == nil { + return nil + } + + return &QMargins{h: (*C.QMargins)(h)} } // NewQMargins constructs a new QMargins object. func NewQMargins() *QMargins { - ret := C.QMargins_new() - return newQMargins(ret) + var outptr_QMargins *C.QMargins = nil + + C.QMargins_new(&outptr_QMargins) + ret := newQMargins(outptr_QMargins) + ret.isSubclass = true + return ret } // NewQMargins2 constructs a new QMargins object. func NewQMargins2(left int, top int, right int, bottom int) *QMargins { - ret := C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom)) - return newQMargins(ret) + var outptr_QMargins *C.QMargins = nil + + C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom), &outptr_QMargins) + ret := newQMargins(outptr_QMargins) + ret.isSubclass = true + return ret } // NewQMargins3 constructs a new QMargins object. func NewQMargins3(param1 *QMargins) *QMargins { - ret := C.QMargins_new3(param1.cPointer()) - return newQMargins(ret) + var outptr_QMargins *C.QMargins = nil + + C.QMargins_new3(param1.cPointer(), &outptr_QMargins) + ret := newQMargins(outptr_QMargins) + ret.isSubclass = true + return ret } func (this *QMargins) IsNull() bool { @@ -130,7 +149,7 @@ func (this *QMargins) OperatorDivideAssignWithQreal(param1 float64) *QMargins { // Delete this object from C++ memory. func (this *QMargins) Delete() { - C.QMargins_Delete(this.h) + C.QMargins_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -143,7 +162,8 @@ func (this *QMargins) GoGC() { } type QMarginsF struct { - h *C.QMarginsF + h *C.QMarginsF + isSubclass bool } func (this *QMarginsF) cPointer() *C.QMarginsF { @@ -160,6 +180,7 @@ func (this *QMarginsF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMarginsF constructs the type using only CGO pointers. func newQMarginsF(h *C.QMarginsF) *QMarginsF { if h == nil { return nil @@ -167,32 +188,53 @@ func newQMarginsF(h *C.QMarginsF) *QMarginsF { return &QMarginsF{h: h} } +// UnsafeNewQMarginsF constructs the type using only unsafe pointers. func UnsafeNewQMarginsF(h unsafe.Pointer) *QMarginsF { - return newQMarginsF((*C.QMarginsF)(h)) + if h == nil { + return nil + } + + return &QMarginsF{h: (*C.QMarginsF)(h)} } // NewQMarginsF constructs a new QMarginsF object. func NewQMarginsF() *QMarginsF { - ret := C.QMarginsF_new() - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new(&outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } // NewQMarginsF2 constructs a new QMarginsF object. func NewQMarginsF2(left float64, top float64, right float64, bottom float64) *QMarginsF { - ret := C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom)) - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom), &outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } // NewQMarginsF3 constructs a new QMarginsF object. func NewQMarginsF3(margins *QMargins) *QMarginsF { - ret := C.QMarginsF_new3(margins.cPointer()) - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new3(margins.cPointer(), &outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } // NewQMarginsF4 constructs a new QMarginsF object. func NewQMarginsF4(param1 *QMarginsF) *QMarginsF { - ret := C.QMarginsF_new4(param1.cPointer()) - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new4(param1.cPointer(), &outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } func (this *QMarginsF) IsNull() bool { @@ -264,7 +306,7 @@ func (this *QMarginsF) ToMargins() *QMargins { // Delete this object from C++ memory. func (this *QMarginsF) Delete() { - C.QMarginsF_Delete(this.h) + C.QMarginsF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmargins.h b/qt/gen_qmargins.h index 3e3d9958..f1773614 100644 --- a/qt/gen_qmargins.h +++ b/qt/gen_qmargins.h @@ -22,9 +22,9 @@ typedef struct QMargins QMargins; typedef struct QMarginsF QMarginsF; #endif -QMargins* QMargins_new(); -QMargins* QMargins_new2(int left, int top, int right, int bottom); -QMargins* QMargins_new3(QMargins* param1); +void QMargins_new(QMargins** outptr_QMargins); +void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins); +void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins); bool QMargins_IsNull(const QMargins* self); int QMargins_Left(const QMargins* self); int QMargins_Top(const QMargins* self); @@ -42,12 +42,12 @@ QMargins* QMargins_OperatorMultiplyAssign(QMargins* self, int param1); QMargins* QMargins_OperatorDivideAssign(QMargins* self, int param1); QMargins* QMargins_OperatorMultiplyAssignWithQreal(QMargins* self, double param1); QMargins* QMargins_OperatorDivideAssignWithQreal(QMargins* self, double param1); -void QMargins_Delete(QMargins* self); +void QMargins_Delete(QMargins* self, bool isSubclass); -QMarginsF* QMarginsF_new(); -QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom); -QMarginsF* QMarginsF_new3(QMargins* margins); -QMarginsF* QMarginsF_new4(QMarginsF* param1); +void QMarginsF_new(QMarginsF** outptr_QMarginsF); +void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF); +void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF); +void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF); bool QMarginsF_IsNull(const QMarginsF* self); double QMarginsF_Left(const QMarginsF* self); double QMarginsF_Top(const QMarginsF* self); @@ -64,7 +64,7 @@ QMarginsF* QMarginsF_OperatorMinusAssignWithSubtrahend(QMarginsF* self, double s QMarginsF* QMarginsF_OperatorMultiplyAssign(QMarginsF* self, double factor); QMarginsF* QMarginsF_OperatorDivideAssign(QMarginsF* self, double divisor); QMargins* QMarginsF_ToMargins(const QMarginsF* self); -void QMarginsF_Delete(QMarginsF* self); +void QMarginsF_Delete(QMarginsF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmatrix.cpp b/qt/gen_qmatrix.cpp index caad16ea..bbe869d2 100644 --- a/qt/gen_qmatrix.cpp +++ b/qt/gen_qmatrix.cpp @@ -11,20 +11,24 @@ #include "gen_qmatrix.h" #include "_cgo_export.h" -QMatrix* QMatrix_new(int param1) { - return new QMatrix(static_cast(param1)); +void QMatrix_new(int param1, QMatrix** outptr_QMatrix) { + QMatrix* ret = new QMatrix(static_cast(param1)); + *outptr_QMatrix = ret; } -QMatrix* QMatrix_new2() { - return new QMatrix(); +void QMatrix_new2(QMatrix** outptr_QMatrix) { + QMatrix* ret = new QMatrix(); + *outptr_QMatrix = ret; } -QMatrix* QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy) { - return new QMatrix(static_cast(m11), static_cast(m12), static_cast(m21), static_cast(m22), static_cast(dx), static_cast(dy)); +void QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy, QMatrix** outptr_QMatrix) { + QMatrix* ret = new QMatrix(static_cast(m11), static_cast(m12), static_cast(m21), static_cast(m22), static_cast(dx), static_cast(dy)); + *outptr_QMatrix = ret; } -QMatrix* QMatrix_new4(QMatrix* other) { - return new QMatrix(*other); +void QMatrix_new4(QMatrix* other, QMatrix** outptr_QMatrix) { + QMatrix* ret = new QMatrix(*other); + *outptr_QMatrix = ret; } void QMatrix_OperatorAssign(QMatrix* self, QMatrix* param1) { @@ -172,7 +176,11 @@ QMatrix* QMatrix_Inverted1(const QMatrix* self, bool* invertible) { return new QMatrix(self->inverted(invertible)); } -void QMatrix_Delete(QMatrix* self) { - delete self; +void QMatrix_Delete(QMatrix* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmatrix.go b/qt/gen_qmatrix.go index 34ee6a67..dc5efb13 100644 --- a/qt/gen_qmatrix.go +++ b/qt/gen_qmatrix.go @@ -14,7 +14,8 @@ import ( ) type QMatrix struct { - h *C.QMatrix + h *C.QMatrix + isSubclass bool } func (this *QMatrix) cPointer() *C.QMatrix { @@ -31,6 +32,7 @@ func (this *QMatrix) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMatrix constructs the type using only CGO pointers. func newQMatrix(h *C.QMatrix) *QMatrix { if h == nil { return nil @@ -38,32 +40,53 @@ func newQMatrix(h *C.QMatrix) *QMatrix { return &QMatrix{h: h} } +// UnsafeNewQMatrix constructs the type using only unsafe pointers. func UnsafeNewQMatrix(h unsafe.Pointer) *QMatrix { - return newQMatrix((*C.QMatrix)(h)) + if h == nil { + return nil + } + + return &QMatrix{h: (*C.QMatrix)(h)} } // NewQMatrix constructs a new QMatrix object. func NewQMatrix(param1 Initialization) *QMatrix { - ret := C.QMatrix_new((C.int)(param1)) - return newQMatrix(ret) + var outptr_QMatrix *C.QMatrix = nil + + C.QMatrix_new((C.int)(param1), &outptr_QMatrix) + ret := newQMatrix(outptr_QMatrix) + ret.isSubclass = true + return ret } // NewQMatrix2 constructs a new QMatrix object. func NewQMatrix2() *QMatrix { - ret := C.QMatrix_new2() - return newQMatrix(ret) + var outptr_QMatrix *C.QMatrix = nil + + C.QMatrix_new2(&outptr_QMatrix) + ret := newQMatrix(outptr_QMatrix) + ret.isSubclass = true + return ret } // NewQMatrix3 constructs a new QMatrix object. func NewQMatrix3(m11 float64, m12 float64, m21 float64, m22 float64, dx float64, dy float64) *QMatrix { - ret := C.QMatrix_new3((C.double)(m11), (C.double)(m12), (C.double)(m21), (C.double)(m22), (C.double)(dx), (C.double)(dy)) - return newQMatrix(ret) + var outptr_QMatrix *C.QMatrix = nil + + C.QMatrix_new3((C.double)(m11), (C.double)(m12), (C.double)(m21), (C.double)(m22), (C.double)(dx), (C.double)(dy), &outptr_QMatrix) + ret := newQMatrix(outptr_QMatrix) + ret.isSubclass = true + return ret } // NewQMatrix4 constructs a new QMatrix object. func NewQMatrix4(other *QMatrix) *QMatrix { - ret := C.QMatrix_new4(other.cPointer()) - return newQMatrix(ret) + var outptr_QMatrix *C.QMatrix = nil + + C.QMatrix_new4(other.cPointer(), &outptr_QMatrix) + ret := newQMatrix(outptr_QMatrix) + ret.isSubclass = true + return ret } func (this *QMatrix) OperatorAssign(param1 *QMatrix) { @@ -229,7 +252,7 @@ func (this *QMatrix) Inverted1(invertible *bool) *QMatrix { // Delete this object from C++ memory. func (this *QMatrix) Delete() { - C.QMatrix_Delete(this.h) + C.QMatrix_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmatrix.h b/qt/gen_qmatrix.h index caa711c6..64bc7df2 100644 --- a/qt/gen_qmatrix.h +++ b/qt/gen_qmatrix.h @@ -36,10 +36,10 @@ typedef struct QRectF QRectF; typedef struct QRegion QRegion; #endif -QMatrix* QMatrix_new(int param1); -QMatrix* QMatrix_new2(); -QMatrix* QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy); -QMatrix* QMatrix_new4(QMatrix* other); +void QMatrix_new(int param1, QMatrix** outptr_QMatrix); +void QMatrix_new2(QMatrix** outptr_QMatrix); +void QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy, QMatrix** outptr_QMatrix); +void QMatrix_new4(QMatrix* other, QMatrix** outptr_QMatrix); void QMatrix_OperatorAssign(QMatrix* self, QMatrix* param1); void QMatrix_SetMatrix(QMatrix* self, double m11, double m12, double m21, double m22, double dx, double dy); double QMatrix_M11(const QMatrix* self); @@ -72,7 +72,7 @@ bool QMatrix_OperatorNotEqual(const QMatrix* self, QMatrix* param1); QMatrix* QMatrix_OperatorMultiplyAssign(QMatrix* self, QMatrix* param1); QMatrix* QMatrix_OperatorMultiply(const QMatrix* self, QMatrix* o); QMatrix* QMatrix_Inverted1(const QMatrix* self, bool* invertible); -void QMatrix_Delete(QMatrix* self); +void QMatrix_Delete(QMatrix* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmatrix4x4.cpp b/qt/gen_qmatrix4x4.cpp index e08158a9..a2cc1c0a 100644 --- a/qt/gen_qmatrix4x4.cpp +++ b/qt/gen_qmatrix4x4.cpp @@ -12,36 +12,44 @@ #include "gen_qmatrix4x4.h" #include "_cgo_export.h" -QMatrix4x4* QMatrix4x4_new() { - return new QMatrix4x4(); +void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new2(int param1) { - return new QMatrix4x4(static_cast(param1)); +void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(param1)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new3(const float* values) { - return new QMatrix4x4(static_cast(values)); +void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(values)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { - return new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); +void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows) { - return new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); +void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new6(QTransform* transform) { - return new QMatrix4x4(*transform); +void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(*transform); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new7(QMatrix* matrix) { - return new QMatrix4x4(*matrix); +void QMatrix4x4_new7(QMatrix* matrix, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(*matrix); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new8(QMatrix4x4* param1) { - return new QMatrix4x4(*param1); +void QMatrix4x4_new8(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(*param1); + *outptr_QMatrix4x4 = ret; } QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index) { @@ -278,7 +286,11 @@ void QMatrix4x4_Viewport6(QMatrix4x4* self, float left, float bottom, float widt self->viewport(static_cast(left), static_cast(bottom), static_cast(width), static_cast(height), static_cast(nearPlane), static_cast(farPlane)); } -void QMatrix4x4_Delete(QMatrix4x4* self) { - delete self; +void QMatrix4x4_Delete(QMatrix4x4* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmatrix4x4.go b/qt/gen_qmatrix4x4.go index 61720528..3b68a66c 100644 --- a/qt/gen_qmatrix4x4.go +++ b/qt/gen_qmatrix4x4.go @@ -14,7 +14,8 @@ import ( ) type QMatrix4x4 struct { - h *C.QMatrix4x4 + h *C.QMatrix4x4 + isSubclass bool } func (this *QMatrix4x4) cPointer() *C.QMatrix4x4 { @@ -31,6 +32,7 @@ func (this *QMatrix4x4) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMatrix4x4 constructs the type using only CGO pointers. func newQMatrix4x4(h *C.QMatrix4x4) *QMatrix4x4 { if h == nil { return nil @@ -38,56 +40,93 @@ func newQMatrix4x4(h *C.QMatrix4x4) *QMatrix4x4 { return &QMatrix4x4{h: h} } +// UnsafeNewQMatrix4x4 constructs the type using only unsafe pointers. func UnsafeNewQMatrix4x4(h unsafe.Pointer) *QMatrix4x4 { - return newQMatrix4x4((*C.QMatrix4x4)(h)) + if h == nil { + return nil + } + + return &QMatrix4x4{h: (*C.QMatrix4x4)(h)} } // NewQMatrix4x4 constructs a new QMatrix4x4 object. func NewQMatrix4x4() *QMatrix4x4 { - ret := C.QMatrix4x4_new() - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new(&outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x42 constructs a new QMatrix4x4 object. func NewQMatrix4x42(param1 Initialization) *QMatrix4x4 { - ret := C.QMatrix4x4_new2((C.int)(param1)) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new2((C.int)(param1), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x43 constructs a new QMatrix4x4 object. func NewQMatrix4x43(values *float32) *QMatrix4x4 { - ret := C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values))) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values)), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x44 constructs a new QMatrix4x4 object. func NewQMatrix4x44(m11 float32, m12 float32, m13 float32, m14 float32, m21 float32, m22 float32, m23 float32, m24 float32, m31 float32, m32 float32, m33 float32, m34 float32, m41 float32, m42 float32, m43 float32, m44 float32) *QMatrix4x4 { - ret := C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44)) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x45 constructs a new QMatrix4x4 object. func NewQMatrix4x45(values *float32, cols int, rows int) *QMatrix4x4 { - ret := C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows)) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x46 constructs a new QMatrix4x4 object. func NewQMatrix4x46(transform *QTransform) *QMatrix4x4 { - ret := C.QMatrix4x4_new6(transform.cPointer()) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new6(transform.cPointer(), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x47 constructs a new QMatrix4x4 object. func NewQMatrix4x47(matrix *QMatrix) *QMatrix4x4 { - ret := C.QMatrix4x4_new7(matrix.cPointer()) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new7(matrix.cPointer(), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x48 constructs a new QMatrix4x4 object. func NewQMatrix4x48(param1 *QMatrix4x4) *QMatrix4x4 { - ret := C.QMatrix4x4_new8(param1.cPointer()) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new8(param1.cPointer(), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } func (this *QMatrix4x4) Column(index int) *QVector4D { @@ -361,7 +400,7 @@ func (this *QMatrix4x4) Viewport6(left float32, bottom float32, width float32, h // Delete this object from C++ memory. func (this *QMatrix4x4) Delete() { - C.QMatrix4x4_Delete(this.h) + C.QMatrix4x4_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmatrix4x4.h b/qt/gen_qmatrix4x4.h index abbe7774..b306c28f 100644 --- a/qt/gen_qmatrix4x4.h +++ b/qt/gen_qmatrix4x4.h @@ -38,14 +38,14 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QMatrix4x4* QMatrix4x4_new(); -QMatrix4x4* QMatrix4x4_new2(int param1); -QMatrix4x4* QMatrix4x4_new3(const float* values); -QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44); -QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows); -QMatrix4x4* QMatrix4x4_new6(QTransform* transform); -QMatrix4x4* QMatrix4x4_new7(QMatrix* matrix); -QMatrix4x4* QMatrix4x4_new8(QMatrix4x4* param1); +void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new7(QMatrix* matrix, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new8(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4); QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index); void QMatrix4x4_SetColumn(QMatrix4x4* self, int index, QVector4D* value); QVector4D* QMatrix4x4_Row(const QMatrix4x4* self, int index); @@ -102,7 +102,7 @@ QMatrix4x4* QMatrix4x4_Inverted1(const QMatrix4x4* self, bool* invertible); void QMatrix4x4_Rotate4(QMatrix4x4* self, float angle, float x, float y, float z); void QMatrix4x4_Viewport5(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane); void QMatrix4x4_Viewport6(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane, float farPlane); -void QMatrix4x4_Delete(QMatrix4x4* self); +void QMatrix4x4_Delete(QMatrix4x4* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmdiarea.cpp b/qt/gen_qmdiarea.cpp index 007e0951..b9d0e37d 100644 --- a/qt/gen_qmdiarea.cpp +++ b/qt/gen_qmdiarea.cpp @@ -1,23 +1,632 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include "gen_qmdiarea.h" #include "_cgo_export.h" -QMdiArea* QMdiArea_new(QWidget* parent) { - return new QMdiArea(parent); +class MiqtVirtualQMdiArea : public virtual QMdiArea { +public: + + MiqtVirtualQMdiArea(QWidget* parent): QMdiArea(parent) {}; + MiqtVirtualQMdiArea(): QMdiArea() {}; + + virtual ~MiqtVirtualQMdiArea() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMdiArea::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiArea_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMdiArea::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMdiArea::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiArea_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMdiArea::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QMdiArea::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QMdiArea_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QMdiArea::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMdiArea::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMdiArea_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMdiArea::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMdiArea::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMdiArea_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QMdiArea::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* paintEvent) override { + if (handle__PaintEvent == 0) { + QMdiArea::paintEvent(paintEvent); + return; + } + + QPaintEvent* sigval1 = paintEvent; + + miqt_exec_callback_QMdiArea_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* paintEvent) { + + QMdiArea::paintEvent(paintEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* childEvent) override { + if (handle__ChildEvent == 0) { + QMdiArea::childEvent(childEvent); + return; + } + + QChildEvent* sigval1 = childEvent; + + miqt_exec_callback_QMdiArea_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* childEvent) { + + QMdiArea::childEvent(childEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* resizeEvent) override { + if (handle__ResizeEvent == 0) { + QMdiArea::resizeEvent(resizeEvent); + return; + } + + QResizeEvent* sigval1 = resizeEvent; + + miqt_exec_callback_QMdiArea_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* resizeEvent) { + + QMdiArea::resizeEvent(resizeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* timerEvent) override { + if (handle__TimerEvent == 0) { + QMdiArea::timerEvent(timerEvent); + return; + } + + QTimerEvent* sigval1 = timerEvent; + + miqt_exec_callback_QMdiArea_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* timerEvent) { + + QMdiArea::timerEvent(timerEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* showEvent) override { + if (handle__ShowEvent == 0) { + QMdiArea::showEvent(showEvent); + return; + } + + QShowEvent* sigval1 = showEvent; + + miqt_exec_callback_QMdiArea_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* showEvent) { + + QMdiArea::showEvent(showEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QMdiArea::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMdiArea_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QMdiArea::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QMdiArea::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QMdiArea_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QMdiArea::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QMdiArea::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QMdiArea::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QMdiArea::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QMdiArea::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QMdiArea::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QMdiArea::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QMdiArea::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QMdiArea::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QMdiArea::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QMdiArea::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QMdiArea::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QMdiArea::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QMdiArea::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QMdiArea::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QMdiArea::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QMdiArea::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QMdiArea::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QMdiArea::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QMdiArea::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QMdiArea::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QMdiArea::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QMdiArea::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QMdiArea::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiArea_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QMdiArea::viewportSizeHint()); + + } + +}; + +void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(parent); + *outptr_QMdiArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMdiArea* QMdiArea_new2() { - return new QMdiArea(); +void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(); + *outptr_QMdiArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMdiArea_MetaObject(const QMdiArea* self) { @@ -168,7 +777,7 @@ void QMdiArea_SubWindowActivated(QMdiArea* self, QMdiSubWindow* param1) { } void QMdiArea_connect_SubWindowActivated(QMdiArea* self, intptr_t slot) { - QMdiArea::connect(self, static_cast(&QMdiArea::subWindowActivated), self, [=](QMdiSubWindow* param1) { + MiqtVirtualQMdiArea::connect(self, static_cast(&QMdiArea::subWindowActivated), self, [=](QMdiSubWindow* param1) { QMdiSubWindow* sigval1 = param1; miqt_exec_callback_QMdiArea_SubWindowActivated(slot, sigval1); }); @@ -267,7 +876,203 @@ void QMdiArea_SetOption2(QMdiArea* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QMdiArea_Delete(QMdiArea* self) { - delete self; +void QMdiArea_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__SizeHint = slot; +} + +QSize* QMdiArea_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMdiArea*)(self) )->virtualbase_SizeHint(); +} + +void QMdiArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMdiArea_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMdiArea*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMdiArea_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__SetupViewport = slot; +} + +void QMdiArea_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QMdiArea_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__Event = slot; +} + +bool QMdiArea_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_Event(event); +} + +void QMdiArea_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__EventFilter = slot; +} + +bool QMdiArea_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_EventFilter(object, event); +} + +void QMdiArea_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__PaintEvent = slot; +} + +void QMdiArea_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_PaintEvent(paintEvent); +} + +void QMdiArea_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ChildEvent = slot; +} + +void QMdiArea_virtualbase_ChildEvent(void* self, QChildEvent* childEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ChildEvent(childEvent); +} + +void QMdiArea_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ResizeEvent = slot; +} + +void QMdiArea_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ResizeEvent(resizeEvent); +} + +void QMdiArea_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__TimerEvent = slot; +} + +void QMdiArea_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_TimerEvent(timerEvent); +} + +void QMdiArea_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ShowEvent = slot; +} + +void QMdiArea_virtualbase_ShowEvent(void* self, QShowEvent* showEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ShowEvent(showEvent); +} + +void QMdiArea_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ViewportEvent = slot; +} + +bool QMdiArea_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ViewportEvent(event); +} + +void QMdiArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ScrollContentsBy = slot; +} + +void QMdiArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QMdiArea_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MousePressEvent = slot; +} + +void QMdiArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QMdiArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMdiArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QMdiArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMdiArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QMdiArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMdiArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QMdiArea_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__WheelEvent = slot; +} + +void QMdiArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_WheelEvent(param1); +} + +void QMdiArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMdiArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QMdiArea_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DragEnterEvent = slot; +} + +void QMdiArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QMdiArea_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DragMoveEvent = slot; +} + +void QMdiArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QMdiArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMdiArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QMdiArea_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DropEvent = slot; +} + +void QMdiArea_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DropEvent(param1); +} + +void QMdiArea_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__KeyPressEvent = slot; +} + +void QMdiArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QMdiArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QMdiArea_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQMdiArea*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QMdiArea_Delete(QMdiArea* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmdiarea.go b/qt/gen_qmdiarea.go index 8626c1f0..05a9a621 100644 --- a/qt/gen_qmdiarea.go +++ b/qt/gen_qmdiarea.go @@ -36,7 +36,8 @@ const ( ) type QMdiArea struct { - h *C.QMdiArea + h *C.QMdiArea + isSubclass bool *QAbstractScrollArea } @@ -54,27 +55,53 @@ func (this *QMdiArea) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMdiArea(h *C.QMdiArea) *QMdiArea { +// newQMdiArea constructs the type using only CGO pointers. +func newQMdiArea(h *C.QMdiArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiArea { if h == nil { return nil } - return &QMdiArea{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QMdiArea{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMdiArea(h unsafe.Pointer) *QMdiArea { - return newQMdiArea((*C.QMdiArea)(h)) +// UnsafeNewQMdiArea constructs the type using only unsafe pointers. +func UnsafeNewQMdiArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiArea { + if h == nil { + return nil + } + + return &QMdiArea{h: (*C.QMdiArea)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMdiArea constructs a new QMdiArea object. func NewQMdiArea(parent *QWidget) *QMdiArea { - ret := C.QMdiArea_new(parent.cPointer()) - return newQMdiArea(ret) + var outptr_QMdiArea *C.QMdiArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiArea_new(parent.cPointer(), &outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMdiArea2 constructs a new QMdiArea object. func NewQMdiArea2() *QMdiArea { - ret := C.QMdiArea_new2() - return newQMdiArea(ret) + var outptr_QMdiArea *C.QMdiArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiArea_new2(&outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMdiArea) MetaObject() *QMetaObject { @@ -120,11 +147,11 @@ func (this *QMdiArea) MinimumSizeHint() *QSize { } func (this *QMdiArea) CurrentSubWindow() *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_CurrentSubWindow(this.h))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_CurrentSubWindow(this.h)), nil, nil, nil) } func (this *QMdiArea) ActiveSubWindow() *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_ActiveSubWindow(this.h))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_ActiveSubWindow(this.h)), nil, nil, nil) } func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { @@ -132,13 +159,13 @@ func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } func (this *QMdiArea) AddSubWindow(widget *QWidget) *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow(this.h, widget.cPointer()))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow(this.h, widget.cPointer())), nil, nil, nil) } func (this *QMdiArea) RemoveSubWindow(widget *QWidget) { @@ -235,7 +262,7 @@ func miqt_exec_callback_QMdiArea_SubWindowActivated(cb C.intptr_t, param1 *C.QMd } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQMdiSubWindow(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQMdiSubWindow(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -317,22 +344,589 @@ func (this *QMdiArea) SubWindowList1(order QMdiArea__WindowOrder) []*QMdiSubWind _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } func (this *QMdiArea) AddSubWindow2(widget *QWidget, flags WindowType) *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags)))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags))), nil, nil, nil) } func (this *QMdiArea) SetOption2(option QMdiArea__AreaOption, on bool) { C.QMdiArea_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } +func (this *QMdiArea) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMdiArea_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiArea) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiArea_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_SizeHint +func miqt_exec_callback_QMdiArea_SizeHint(self *C.QMdiArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiArea) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMdiArea_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiArea) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiArea_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MinimumSizeHint +func miqt_exec_callback_QMdiArea_MinimumSizeHint(self *C.QMdiArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiArea) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QMdiArea_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QMdiArea) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QMdiArea_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_SetupViewport +func miqt_exec_callback_QMdiArea_SetupViewport(self *C.QMdiArea, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMdiArea_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMdiArea) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMdiArea_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_Event +func miqt_exec_callback_QMdiArea_Event(self *C.QMdiArea, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiArea) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QMdiArea_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QMdiArea) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QMdiArea_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_EventFilter +func miqt_exec_callback_QMdiArea_EventFilter(self *C.QMdiArea, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiArea) callVirtualBase_PaintEvent(paintEvent *QPaintEvent) { + + C.QMdiArea_virtualbase_PaintEvent(unsafe.Pointer(this.h), paintEvent.cPointer()) + +} +func (this *QMdiArea) OnPaintEvent(slot func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) { + C.QMdiArea_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_PaintEvent +func miqt_exec_callback_QMdiArea_PaintEvent(self *C.QMdiArea, cb C.intptr_t, paintEvent *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(paintEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ChildEvent(childEvent *QChildEvent) { + + C.QMdiArea_virtualbase_ChildEvent(unsafe.Pointer(this.h), childEvent.cPointer()) + +} +func (this *QMdiArea) OnChildEvent(slot func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) { + C.QMdiArea_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ChildEvent +func miqt_exec_callback_QMdiArea_ChildEvent(self *C.QMdiArea, cb C.intptr_t, childEvent *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(childEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ResizeEvent(resizeEvent *QResizeEvent) { + + C.QMdiArea_virtualbase_ResizeEvent(unsafe.Pointer(this.h), resizeEvent.cPointer()) + +} +func (this *QMdiArea) OnResizeEvent(slot func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) { + C.QMdiArea_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ResizeEvent +func miqt_exec_callback_QMdiArea_ResizeEvent(self *C.QMdiArea, cb C.intptr_t, resizeEvent *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(resizeEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_TimerEvent(timerEvent *QTimerEvent) { + + C.QMdiArea_virtualbase_TimerEvent(unsafe.Pointer(this.h), timerEvent.cPointer()) + +} +func (this *QMdiArea) OnTimerEvent(slot func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) { + C.QMdiArea_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_TimerEvent +func miqt_exec_callback_QMdiArea_TimerEvent(self *C.QMdiArea, cb C.intptr_t, timerEvent *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(timerEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ShowEvent(showEvent *QShowEvent) { + + C.QMdiArea_virtualbase_ShowEvent(unsafe.Pointer(this.h), showEvent.cPointer()) + +} +func (this *QMdiArea) OnShowEvent(slot func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) { + C.QMdiArea_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ShowEvent +func miqt_exec_callback_QMdiArea_ShowEvent(self *C.QMdiArea, cb C.intptr_t, showEvent *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(showEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QMdiArea_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMdiArea) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMdiArea_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ViewportEvent +func miqt_exec_callback_QMdiArea_ViewportEvent(self *C.QMdiArea, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiArea) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QMdiArea_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QMdiArea) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QMdiArea_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ScrollContentsBy +func miqt_exec_callback_QMdiArea_ScrollContentsBy(self *C.QMdiArea, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QMdiArea) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MousePressEvent +func miqt_exec_callback_QMdiArea_MousePressEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MouseReleaseEvent +func miqt_exec_callback_QMdiArea_MouseReleaseEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MouseDoubleClickEvent +func miqt_exec_callback_QMdiArea_MouseDoubleClickEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MouseMoveEvent +func miqt_exec_callback_QMdiArea_MouseMoveEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QMdiArea_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QMdiArea_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_WheelEvent +func miqt_exec_callback_QMdiArea_WheelEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QMdiArea_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QMdiArea_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ContextMenuEvent +func miqt_exec_callback_QMdiArea_ContextMenuEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QMdiArea_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QMdiArea_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DragEnterEvent +func miqt_exec_callback_QMdiArea_DragEnterEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DragMoveEvent(param1 *QDragMoveEvent) { + + C.QMdiArea_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDragMoveEvent(slot func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) { + C.QMdiArea_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DragMoveEvent +func miqt_exec_callback_QMdiArea_DragMoveEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DragLeaveEvent(param1 *QDragLeaveEvent) { + + C.QMdiArea_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDragLeaveEvent(slot func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) { + C.QMdiArea_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DragLeaveEvent +func miqt_exec_callback_QMdiArea_DragLeaveEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QMdiArea_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QMdiArea_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DropEvent +func miqt_exec_callback_QMdiArea_DropEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QMdiArea_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QMdiArea_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_KeyPressEvent +func miqt_exec_callback_QMdiArea_KeyPressEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QMdiArea_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiArea) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiArea_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ViewportSizeHint +func miqt_exec_callback_QMdiArea_ViewportSizeHint(self *C.QMdiArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QMdiArea) Delete() { - C.QMdiArea_Delete(this.h) + C.QMdiArea_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmdiarea.h b/qt/gen_qmdiarea.h index 1c86a840..2781a012 100644 --- a/qt/gen_qmdiarea.h +++ b/qt/gen_qmdiarea.h @@ -15,23 +15,59 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QBrush; +class QChildEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; +class QKeyEvent; class QMdiArea; class QMdiSubWindow; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QSize; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QMdiArea QMdiArea; typedef struct QMdiSubWindow QMdiSubWindow; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMdiArea* QMdiArea_new(QWidget* parent); -QMdiArea* QMdiArea_new2(); +void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMdiArea_MetaObject(const QMdiArea* self); void* QMdiArea_Metacast(QMdiArea* self, const char* param1); struct miqt_string QMdiArea_Tr(const char* s); @@ -70,6 +106,16 @@ void QMdiArea_CloseActiveSubWindow(QMdiArea* self); void QMdiArea_CloseAllSubWindows(QMdiArea* self); void QMdiArea_ActivateNextSubWindow(QMdiArea* self); void QMdiArea_ActivatePreviousSubWindow(QMdiArea* self); +void QMdiArea_SetupViewport(QMdiArea* self, QWidget* viewport); +bool QMdiArea_Event(QMdiArea* self, QEvent* event); +bool QMdiArea_EventFilter(QMdiArea* self, QObject* object, QEvent* event); +void QMdiArea_PaintEvent(QMdiArea* self, QPaintEvent* paintEvent); +void QMdiArea_ChildEvent(QMdiArea* self, QChildEvent* childEvent); +void QMdiArea_ResizeEvent(QMdiArea* self, QResizeEvent* resizeEvent); +void QMdiArea_TimerEvent(QMdiArea* self, QTimerEvent* timerEvent); +void QMdiArea_ShowEvent(QMdiArea* self, QShowEvent* showEvent); +bool QMdiArea_ViewportEvent(QMdiArea* self, QEvent* event); +void QMdiArea_ScrollContentsBy(QMdiArea* self, int dx, int dy); struct miqt_string QMdiArea_Tr2(const char* s, const char* c); struct miqt_string QMdiArea_Tr3(const char* s, const char* c, int n); struct miqt_string QMdiArea_TrUtf82(const char* s, const char* c); @@ -77,7 +123,55 @@ struct miqt_string QMdiArea_TrUtf83(const char* s, const char* c, int n); struct miqt_array /* of QMdiSubWindow* */ QMdiArea_SubWindowList1(const QMdiArea* self, int order); QMdiSubWindow* QMdiArea_AddSubWindow2(QMdiArea* self, QWidget* widget, int flags); void QMdiArea_SetOption2(QMdiArea* self, int option, bool on); -void QMdiArea_Delete(QMdiArea* self); +void QMdiArea_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMdiArea_virtualbase_SizeHint(const void* self); +void QMdiArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMdiArea_virtualbase_MinimumSizeHint(const void* self); +void QMdiArea_override_virtual_SetupViewport(void* self, intptr_t slot); +void QMdiArea_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QMdiArea_override_virtual_Event(void* self, intptr_t slot); +bool QMdiArea_virtualbase_Event(void* self, QEvent* event); +void QMdiArea_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMdiArea_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QMdiArea_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent); +void QMdiArea_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ChildEvent(void* self, QChildEvent* childEvent); +void QMdiArea_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent); +void QMdiArea_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent); +void QMdiArea_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ShowEvent(void* self, QShowEvent* showEvent); +void QMdiArea_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QMdiArea_virtualbase_ViewportEvent(void* self, QEvent* event); +void QMdiArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QMdiArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QMdiArea_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QMdiArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QMdiArea_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QMdiArea_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QMdiArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QMdiArea_override_virtual_DropEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QMdiArea_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QMdiArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QMdiArea_virtualbase_ViewportSizeHint(const void* self); +void QMdiArea_Delete(QMdiArea* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmdisubwindow.cpp b/qt/gen_qmdisubwindow.cpp index 0050eacf..0a1a4291 100644 --- a/qt/gen_qmdisubwindow.cpp +++ b/qt/gen_qmdisubwindow.cpp @@ -1,26 +1,1124 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qmdisubwindow.h" #include "_cgo_export.h" -QMdiSubWindow* QMdiSubWindow_new(QWidget* parent) { - return new QMdiSubWindow(parent); +class MiqtVirtualQMdiSubWindow : public virtual QMdiSubWindow { +public: + + MiqtVirtualQMdiSubWindow(QWidget* parent): QMdiSubWindow(parent) {}; + MiqtVirtualQMdiSubWindow(): QMdiSubWindow() {}; + MiqtVirtualQMdiSubWindow(QWidget* parent, Qt::WindowFlags flags): QMdiSubWindow(parent, flags) {}; + + virtual ~MiqtVirtualQMdiSubWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMdiSubWindow::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiSubWindow_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMdiSubWindow::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMdiSubWindow::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiSubWindow_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMdiSubWindow::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMdiSubWindow::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QMdiSubWindow::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMdiSubWindow::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMdiSubWindow::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* showEvent) override { + if (handle__ShowEvent == 0) { + QMdiSubWindow::showEvent(showEvent); + return; + } + + QShowEvent* sigval1 = showEvent; + + miqt_exec_callback_QMdiSubWindow_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* showEvent) { + + QMdiSubWindow::showEvent(showEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* hideEvent) override { + if (handle__HideEvent == 0) { + QMdiSubWindow::hideEvent(hideEvent); + return; + } + + QHideEvent* sigval1 = hideEvent; + + miqt_exec_callback_QMdiSubWindow_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* hideEvent) { + + QMdiSubWindow::hideEvent(hideEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* changeEvent) override { + if (handle__ChangeEvent == 0) { + QMdiSubWindow::changeEvent(changeEvent); + return; + } + + QEvent* sigval1 = changeEvent; + + miqt_exec_callback_QMdiSubWindow_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* changeEvent) { + + QMdiSubWindow::changeEvent(changeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* closeEvent) override { + if (handle__CloseEvent == 0) { + QMdiSubWindow::closeEvent(closeEvent); + return; + } + + QCloseEvent* sigval1 = closeEvent; + + miqt_exec_callback_QMdiSubWindow_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* closeEvent) { + + QMdiSubWindow::closeEvent(closeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* leaveEvent) override { + if (handle__LeaveEvent == 0) { + QMdiSubWindow::leaveEvent(leaveEvent); + return; + } + + QEvent* sigval1 = leaveEvent; + + miqt_exec_callback_QMdiSubWindow_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* leaveEvent) { + + QMdiSubWindow::leaveEvent(leaveEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* resizeEvent) override { + if (handle__ResizeEvent == 0) { + QMdiSubWindow::resizeEvent(resizeEvent); + return; + } + + QResizeEvent* sigval1 = resizeEvent; + + miqt_exec_callback_QMdiSubWindow_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* resizeEvent) { + + QMdiSubWindow::resizeEvent(resizeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* timerEvent) override { + if (handle__TimerEvent == 0) { + QMdiSubWindow::timerEvent(timerEvent); + return; + } + + QTimerEvent* sigval1 = timerEvent; + + miqt_exec_callback_QMdiSubWindow_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* timerEvent) { + + QMdiSubWindow::timerEvent(timerEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* moveEvent) override { + if (handle__MoveEvent == 0) { + QMdiSubWindow::moveEvent(moveEvent); + return; + } + + QMoveEvent* sigval1 = moveEvent; + + miqt_exec_callback_QMdiSubWindow_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* moveEvent) { + + QMdiSubWindow::moveEvent(moveEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* paintEvent) override { + if (handle__PaintEvent == 0) { + QMdiSubWindow::paintEvent(paintEvent); + return; + } + + QPaintEvent* sigval1 = paintEvent; + + miqt_exec_callback_QMdiSubWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* paintEvent) { + + QMdiSubWindow::paintEvent(paintEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* mouseEvent) override { + if (handle__MousePressEvent == 0) { + QMdiSubWindow::mousePressEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mousePressEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseDoubleClickEvent == 0) { + QMdiSubWindow::mouseDoubleClickEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mouseDoubleClickEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseReleaseEvent == 0) { + QMdiSubWindow::mouseReleaseEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mouseReleaseEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseMoveEvent == 0) { + QMdiSubWindow::mouseMoveEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mouseMoveEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* keyEvent) override { + if (handle__KeyPressEvent == 0) { + QMdiSubWindow::keyPressEvent(keyEvent); + return; + } + + QKeyEvent* sigval1 = keyEvent; + + miqt_exec_callback_QMdiSubWindow_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* keyEvent) { + + QMdiSubWindow::keyPressEvent(keyEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* contextMenuEvent) override { + if (handle__ContextMenuEvent == 0) { + QMdiSubWindow::contextMenuEvent(contextMenuEvent); + return; + } + + QContextMenuEvent* sigval1 = contextMenuEvent; + + miqt_exec_callback_QMdiSubWindow_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* contextMenuEvent) { + + QMdiSubWindow::contextMenuEvent(contextMenuEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* focusInEvent) override { + if (handle__FocusInEvent == 0) { + QMdiSubWindow::focusInEvent(focusInEvent); + return; + } + + QFocusEvent* sigval1 = focusInEvent; + + miqt_exec_callback_QMdiSubWindow_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* focusInEvent) { + + QMdiSubWindow::focusInEvent(focusInEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* focusOutEvent) override { + if (handle__FocusOutEvent == 0) { + QMdiSubWindow::focusOutEvent(focusOutEvent); + return; + } + + QFocusEvent* sigval1 = focusOutEvent; + + miqt_exec_callback_QMdiSubWindow_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* focusOutEvent) { + + QMdiSubWindow::focusOutEvent(focusOutEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* childEvent) override { + if (handle__ChildEvent == 0) { + QMdiSubWindow::childEvent(childEvent); + return; + } + + QChildEvent* sigval1 = childEvent; + + miqt_exec_callback_QMdiSubWindow_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* childEvent) { + + QMdiSubWindow::childEvent(childEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMdiSubWindow::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMdiSubWindow_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMdiSubWindow::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMdiSubWindow::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMdiSubWindow_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMdiSubWindow::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMdiSubWindow::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMdiSubWindow_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMdiSubWindow::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMdiSubWindow::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMdiSubWindow::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMdiSubWindow::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMdiSubWindow_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMdiSubWindow::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QMdiSubWindow::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QMdiSubWindow::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMdiSubWindow::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMdiSubWindow::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QMdiSubWindow::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QMdiSubWindow::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMdiSubWindow::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMdiSubWindow::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QMdiSubWindow::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QMdiSubWindow::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMdiSubWindow::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMdiSubWindow::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMdiSubWindow::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMdiSubWindow::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMdiSubWindow::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMdiSubWindow::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMdiSubWindow::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMdiSubWindow::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QMdiSubWindow::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMdiSubWindow::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMdiSubWindow::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMdiSubWindow_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMdiSubWindow::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMdiSubWindow::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMdiSubWindow_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMdiSubWindow::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMdiSubWindow::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMdiSubWindow_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMdiSubWindow::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMdiSubWindow::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMdiSubWindow_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMdiSubWindow::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMdiSubWindow::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMdiSubWindow_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMdiSubWindow::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMdiSubWindow::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMdiSubWindow_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMdiSubWindow::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMdiSubWindow::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMdiSubWindow::focusNextPrevChild(next); + + } + +}; + +void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent); + *outptr_QMdiSubWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMdiSubWindow* QMdiSubWindow_new2() { - return new QMdiSubWindow(); +void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(); + *outptr_QMdiSubWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags) { - return new QMdiSubWindow(parent, static_cast(flags)); +void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent, static_cast(flags)); + *outptr_QMdiSubWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self) { @@ -122,7 +1220,7 @@ void QMdiSubWindow_WindowStateChanged(QMdiSubWindow* self, int oldState, int new } void QMdiSubWindow_connect_WindowStateChanged(QMdiSubWindow* self, intptr_t slot) { - QMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::windowStateChanged), self, [=](Qt::WindowStates oldState, Qt::WindowStates newState) { + MiqtVirtualQMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::windowStateChanged), self, [=](Qt::WindowStates oldState, Qt::WindowStates newState) { Qt::WindowStates oldState_ret = oldState; int sigval1 = static_cast(oldState_ret); Qt::WindowStates newState_ret = newState; @@ -136,7 +1234,7 @@ void QMdiSubWindow_AboutToActivate(QMdiSubWindow* self) { } void QMdiSubWindow_connect_AboutToActivate(QMdiSubWindow* self, intptr_t slot) { - QMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::aboutToActivate), self, [=]() { + MiqtVirtualQMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::aboutToActivate), self, [=]() { miqt_exec_callback_QMdiSubWindow_AboutToActivate(slot); }); } @@ -197,7 +1295,363 @@ void QMdiSubWindow_SetOption2(QMdiSubWindow* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QMdiSubWindow_Delete(QMdiSubWindow* self) { - delete self; +void QMdiSubWindow_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__SizeHint = slot; +} + +QSize* QMdiSubWindow_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_SizeHint(); +} + +void QMdiSubWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMdiSubWindow_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMdiSubWindow_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__EventFilter = slot; +} + +bool QMdiSubWindow_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_EventFilter(object, event); +} + +void QMdiSubWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__Event = slot; +} + +bool QMdiSubWindow_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_Event(event); +} + +void QMdiSubWindow_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ShowEvent = slot; +} + +void QMdiSubWindow_virtualbase_ShowEvent(void* self, QShowEvent* showEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ShowEvent(showEvent); +} + +void QMdiSubWindow_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__HideEvent = slot; +} + +void QMdiSubWindow_virtualbase_HideEvent(void* self, QHideEvent* hideEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_HideEvent(hideEvent); +} + +void QMdiSubWindow_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ChangeEvent = slot; +} + +void QMdiSubWindow_virtualbase_ChangeEvent(void* self, QEvent* changeEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ChangeEvent(changeEvent); +} + +void QMdiSubWindow_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__CloseEvent = slot; +} + +void QMdiSubWindow_virtualbase_CloseEvent(void* self, QCloseEvent* closeEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_CloseEvent(closeEvent); +} + +void QMdiSubWindow_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__LeaveEvent = slot; +} + +void QMdiSubWindow_virtualbase_LeaveEvent(void* self, QEvent* leaveEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_LeaveEvent(leaveEvent); +} + +void QMdiSubWindow_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ResizeEvent = slot; +} + +void QMdiSubWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ResizeEvent(resizeEvent); +} + +void QMdiSubWindow_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__TimerEvent = slot; +} + +void QMdiSubWindow_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_TimerEvent(timerEvent); +} + +void QMdiSubWindow_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MoveEvent = slot; +} + +void QMdiSubWindow_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MoveEvent(moveEvent); +} + +void QMdiSubWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__PaintEvent = slot; +} + +void QMdiSubWindow_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_PaintEvent(paintEvent); +} + +void QMdiSubWindow_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MousePressEvent = slot; +} + +void QMdiSubWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MousePressEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMdiSubWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MouseDoubleClickEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMdiSubWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MouseReleaseEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMdiSubWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MouseMoveEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__KeyPressEvent = slot; +} + +void QMdiSubWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* keyEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_KeyPressEvent(keyEvent); +} + +void QMdiSubWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMdiSubWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* contextMenuEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ContextMenuEvent(contextMenuEvent); +} + +void QMdiSubWindow_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__FocusInEvent = slot; +} + +void QMdiSubWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* focusInEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_FocusInEvent(focusInEvent); +} + +void QMdiSubWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__FocusOutEvent = slot; +} + +void QMdiSubWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* focusOutEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_FocusOutEvent(focusOutEvent); +} + +void QMdiSubWindow_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ChildEvent = slot; +} + +void QMdiSubWindow_virtualbase_ChildEvent(void* self, QChildEvent* childEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ChildEvent(childEvent); +} + +void QMdiSubWindow_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DevType = slot; +} + +int QMdiSubWindow_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DevType(); +} + +void QMdiSubWindow_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__SetVisible = slot; +} + +void QMdiSubWindow_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_SetVisible(visible); +} + +void QMdiSubWindow_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__HeightForWidth = slot; +} + +int QMdiSubWindow_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMdiSubWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMdiSubWindow_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMdiSubWindow_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMdiSubWindow_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_PaintEngine(); +} + +void QMdiSubWindow_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__WheelEvent = slot; +} + +void QMdiSubWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_WheelEvent(event); +} + +void QMdiSubWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMdiSubWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMdiSubWindow_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__EnterEvent = slot; +} + +void QMdiSubWindow_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_EnterEvent(event); +} + +void QMdiSubWindow_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__TabletEvent = slot; +} + +void QMdiSubWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_TabletEvent(event); +} + +void QMdiSubWindow_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ActionEvent = slot; +} + +void QMdiSubWindow_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ActionEvent(event); +} + +void QMdiSubWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DragEnterEvent = slot; +} + +void QMdiSubWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMdiSubWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DragMoveEvent = slot; +} + +void QMdiSubWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMdiSubWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMdiSubWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMdiSubWindow_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DropEvent = slot; +} + +void QMdiSubWindow_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DropEvent(event); +} + +void QMdiSubWindow_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__NativeEvent = slot; +} + +bool QMdiSubWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMdiSubWindow_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__Metric = slot; +} + +int QMdiSubWindow_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_Metric(param1); +} + +void QMdiSubWindow_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__InitPainter = slot; +} + +void QMdiSubWindow_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_InitPainter(painter); +} + +void QMdiSubWindow_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMdiSubWindow_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_Redirected(offset); +} + +void QMdiSubWindow_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMdiSubWindow_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_SharedPainter(); +} + +void QMdiSubWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__InputMethodEvent = slot; +} + +void QMdiSubWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMdiSubWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMdiSubWindow_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMdiSubWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMdiSubWindow_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMdiSubWindow_Delete(QMdiSubWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmdisubwindow.go b/qt/gen_qmdisubwindow.go index 473f6c65..c71b899d 100644 --- a/qt/gen_qmdisubwindow.go +++ b/qt/gen_qmdisubwindow.go @@ -24,7 +24,8 @@ const ( ) type QMdiSubWindow struct { - h *C.QMdiSubWindow + h *C.QMdiSubWindow + isSubclass bool *QWidget } @@ -42,33 +43,62 @@ func (this *QMdiSubWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMdiSubWindow(h *C.QMdiSubWindow) *QMdiSubWindow { +// newQMdiSubWindow constructs the type using only CGO pointers. +func newQMdiSubWindow(h *C.QMdiSubWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiSubWindow { if h == nil { return nil } - return &QMdiSubWindow{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMdiSubWindow{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMdiSubWindow(h unsafe.Pointer) *QMdiSubWindow { - return newQMdiSubWindow((*C.QMdiSubWindow)(h)) +// UnsafeNewQMdiSubWindow constructs the type using only unsafe pointers. +func UnsafeNewQMdiSubWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiSubWindow { + if h == nil { + return nil + } + + return &QMdiSubWindow{h: (*C.QMdiSubWindow)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMdiSubWindow constructs a new QMdiSubWindow object. func NewQMdiSubWindow(parent *QWidget) *QMdiSubWindow { - ret := C.QMdiSubWindow_new(parent.cPointer()) - return newQMdiSubWindow(ret) + var outptr_QMdiSubWindow *C.QMdiSubWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiSubWindow_new(parent.cPointer(), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMdiSubWindow2 constructs a new QMdiSubWindow object. func NewQMdiSubWindow2() *QMdiSubWindow { - ret := C.QMdiSubWindow_new2() - return newQMdiSubWindow(ret) + var outptr_QMdiSubWindow *C.QMdiSubWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiSubWindow_new2(&outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMdiSubWindow3 constructs a new QMdiSubWindow object. func NewQMdiSubWindow3(parent *QWidget, flags WindowType) *QMdiSubWindow { - ret := C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags)) - return newQMdiSubWindow(ret) + var outptr_QMdiSubWindow *C.QMdiSubWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMdiSubWindow) MetaObject() *QMetaObject { @@ -118,15 +148,15 @@ func (this *QMdiSubWindow) SetWidget(widget *QWidget) { } func (this *QMdiSubWindow) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_Widget(this.h)), nil, nil) } func (this *QMdiSubWindow) MaximizedButtonsWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedButtonsWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedButtonsWidget(this.h)), nil, nil) } func (this *QMdiSubWindow) MaximizedSystemMenuIconWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h)), nil, nil) } func (this *QMdiSubWindow) IsShaded() bool { @@ -162,11 +192,11 @@ func (this *QMdiSubWindow) SetSystemMenu(systemMenu *QMenu) { } func (this *QMdiSubWindow) SystemMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QMdiSubWindow_SystemMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMdiSubWindow_SystemMenu(this.h)), nil, nil, nil) } func (this *QMdiSubWindow) MdiArea() *QMdiArea { - return UnsafeNewQMdiArea(unsafe.Pointer(C.QMdiSubWindow_MdiArea(this.h))) + return UnsafeNewQMdiArea(unsafe.Pointer(C.QMdiSubWindow_MdiArea(this.h)), nil, nil, nil, nil, nil) } func (this *QMdiSubWindow) WindowStateChanged(oldState WindowState, newState WindowState) { @@ -264,9 +294,1047 @@ func (this *QMdiSubWindow) SetOption2(option QMdiSubWindow__SubWindowOption, on C.QMdiSubWindow_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } +func (this *QMdiSubWindow) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMdiSubWindow_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiSubWindow) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiSubWindow_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_SizeHint +func miqt_exec_callback_QMdiSubWindow_SizeHint(self *C.QMdiSubWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMdiSubWindow_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiSubWindow) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiSubWindow_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MinimumSizeHint +func miqt_exec_callback_QMdiSubWindow_MinimumSizeHint(self *C.QMdiSubWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QMdiSubWindow_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QMdiSubWindow) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QMdiSubWindow_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_EventFilter +func miqt_exec_callback_QMdiSubWindow_EventFilter(self *C.QMdiSubWindow, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMdiSubWindow_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMdiSubWindow) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMdiSubWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_Event +func miqt_exec_callback_QMdiSubWindow_Event(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_ShowEvent(showEvent *QShowEvent) { + + C.QMdiSubWindow_virtualbase_ShowEvent(unsafe.Pointer(this.h), showEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnShowEvent(slot func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) { + C.QMdiSubWindow_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ShowEvent +func miqt_exec_callback_QMdiSubWindow_ShowEvent(self *C.QMdiSubWindow, cb C.intptr_t, showEvent *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(showEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_HideEvent(hideEvent *QHideEvent) { + + C.QMdiSubWindow_virtualbase_HideEvent(unsafe.Pointer(this.h), hideEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnHideEvent(slot func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) { + C.QMdiSubWindow_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_HideEvent +func miqt_exec_callback_QMdiSubWindow_HideEvent(self *C.QMdiSubWindow, cb C.intptr_t, hideEvent *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(hideEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ChangeEvent(changeEvent *QEvent) { + + C.QMdiSubWindow_virtualbase_ChangeEvent(unsafe.Pointer(this.h), changeEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnChangeEvent(slot func(super func(changeEvent *QEvent), changeEvent *QEvent)) { + C.QMdiSubWindow_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ChangeEvent +func miqt_exec_callback_QMdiSubWindow_ChangeEvent(self *C.QMdiSubWindow, cb C.intptr_t, changeEvent *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(changeEvent *QEvent), changeEvent *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(changeEvent)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_CloseEvent(closeEvent *QCloseEvent) { + + C.QMdiSubWindow_virtualbase_CloseEvent(unsafe.Pointer(this.h), closeEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnCloseEvent(slot func(super func(closeEvent *QCloseEvent), closeEvent *QCloseEvent)) { + C.QMdiSubWindow_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_CloseEvent +func miqt_exec_callback_QMdiSubWindow_CloseEvent(self *C.QMdiSubWindow, cb C.intptr_t, closeEvent *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(closeEvent *QCloseEvent), closeEvent *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(closeEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_LeaveEvent(leaveEvent *QEvent) { + + C.QMdiSubWindow_virtualbase_LeaveEvent(unsafe.Pointer(this.h), leaveEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnLeaveEvent(slot func(super func(leaveEvent *QEvent), leaveEvent *QEvent)) { + C.QMdiSubWindow_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_LeaveEvent +func miqt_exec_callback_QMdiSubWindow_LeaveEvent(self *C.QMdiSubWindow, cb C.intptr_t, leaveEvent *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(leaveEvent *QEvent), leaveEvent *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(leaveEvent)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ResizeEvent(resizeEvent *QResizeEvent) { + + C.QMdiSubWindow_virtualbase_ResizeEvent(unsafe.Pointer(this.h), resizeEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnResizeEvent(slot func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) { + C.QMdiSubWindow_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ResizeEvent +func miqt_exec_callback_QMdiSubWindow_ResizeEvent(self *C.QMdiSubWindow, cb C.intptr_t, resizeEvent *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(resizeEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_TimerEvent(timerEvent *QTimerEvent) { + + C.QMdiSubWindow_virtualbase_TimerEvent(unsafe.Pointer(this.h), timerEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnTimerEvent(slot func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) { + C.QMdiSubWindow_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_TimerEvent +func miqt_exec_callback_QMdiSubWindow_TimerEvent(self *C.QMdiSubWindow, cb C.intptr_t, timerEvent *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(timerEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MoveEvent(moveEvent *QMoveEvent) { + + C.QMdiSubWindow_virtualbase_MoveEvent(unsafe.Pointer(this.h), moveEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMoveEvent(slot func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) { + C.QMdiSubWindow_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MoveEvent +func miqt_exec_callback_QMdiSubWindow_MoveEvent(self *C.QMdiSubWindow, cb C.intptr_t, moveEvent *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(moveEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_PaintEvent(paintEvent *QPaintEvent) { + + C.QMdiSubWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), paintEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnPaintEvent(slot func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) { + C.QMdiSubWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_PaintEvent +func miqt_exec_callback_QMdiSubWindow_PaintEvent(self *C.QMdiSubWindow, cb C.intptr_t, paintEvent *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(paintEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MousePressEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MousePressEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMousePressEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MousePressEvent +func miqt_exec_callback_QMdiSubWindow_MousePressEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MouseDoubleClickEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMouseDoubleClickEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent +func miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MouseReleaseEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMouseReleaseEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent +func miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MouseMoveEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMouseMoveEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MouseMoveEvent +func miqt_exec_callback_QMdiSubWindow_MouseMoveEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_KeyPressEvent(keyEvent *QKeyEvent) { + + C.QMdiSubWindow_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), keyEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnKeyPressEvent(slot func(super func(keyEvent *QKeyEvent), keyEvent *QKeyEvent)) { + C.QMdiSubWindow_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_KeyPressEvent +func miqt_exec_callback_QMdiSubWindow_KeyPressEvent(self *C.QMdiSubWindow, cb C.intptr_t, keyEvent *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(keyEvent *QKeyEvent), keyEvent *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(keyEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ContextMenuEvent(contextMenuEvent *QContextMenuEvent) { + + C.QMdiSubWindow_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), contextMenuEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnContextMenuEvent(slot func(super func(contextMenuEvent *QContextMenuEvent), contextMenuEvent *QContextMenuEvent)) { + C.QMdiSubWindow_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ContextMenuEvent +func miqt_exec_callback_QMdiSubWindow_ContextMenuEvent(self *C.QMdiSubWindow, cb C.intptr_t, contextMenuEvent *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(contextMenuEvent *QContextMenuEvent), contextMenuEvent *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(contextMenuEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_FocusInEvent(focusInEvent *QFocusEvent) { + + C.QMdiSubWindow_virtualbase_FocusInEvent(unsafe.Pointer(this.h), focusInEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnFocusInEvent(slot func(super func(focusInEvent *QFocusEvent), focusInEvent *QFocusEvent)) { + C.QMdiSubWindow_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_FocusInEvent +func miqt_exec_callback_QMdiSubWindow_FocusInEvent(self *C.QMdiSubWindow, cb C.intptr_t, focusInEvent *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(focusInEvent *QFocusEvent), focusInEvent *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(focusInEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_FocusOutEvent(focusOutEvent *QFocusEvent) { + + C.QMdiSubWindow_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), focusOutEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnFocusOutEvent(slot func(super func(focusOutEvent *QFocusEvent), focusOutEvent *QFocusEvent)) { + C.QMdiSubWindow_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_FocusOutEvent +func miqt_exec_callback_QMdiSubWindow_FocusOutEvent(self *C.QMdiSubWindow, cb C.intptr_t, focusOutEvent *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(focusOutEvent *QFocusEvent), focusOutEvent *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(focusOutEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ChildEvent(childEvent *QChildEvent) { + + C.QMdiSubWindow_virtualbase_ChildEvent(unsafe.Pointer(this.h), childEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnChildEvent(slot func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) { + C.QMdiSubWindow_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ChildEvent +func miqt_exec_callback_QMdiSubWindow_ChildEvent(self *C.QMdiSubWindow, cb C.intptr_t, childEvent *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(childEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DevType() int { + + return (int)(C.QMdiSubWindow_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMdiSubWindow) OnDevType(slot func(super func() int) int) { + C.QMdiSubWindow_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DevType +func miqt_exec_callback_QMdiSubWindow_DevType(self *C.QMdiSubWindow, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_SetVisible(visible bool) { + + C.QMdiSubWindow_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMdiSubWindow) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMdiSubWindow_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_SetVisible +func miqt_exec_callback_QMdiSubWindow_SetVisible(self *C.QMdiSubWindow, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMdiSubWindow_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMdiSubWindow) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMdiSubWindow_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_HeightForWidth +func miqt_exec_callback_QMdiSubWindow_HeightForWidth(self *C.QMdiSubWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMdiSubWindow_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMdiSubWindow) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMdiSubWindow_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_HasHeightForWidth +func miqt_exec_callback_QMdiSubWindow_HasHeightForWidth(self *C.QMdiSubWindow, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMdiSubWindow_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMdiSubWindow) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMdiSubWindow_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_PaintEngine +func miqt_exec_callback_QMdiSubWindow_PaintEngine(self *C.QMdiSubWindow, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QMdiSubWindow_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QMdiSubWindow_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_WheelEvent +func miqt_exec_callback_QMdiSubWindow_WheelEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMdiSubWindow_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMdiSubWindow_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent +func miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_EnterEvent(event *QEvent) { + + C.QMdiSubWindow_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMdiSubWindow_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_EnterEvent +func miqt_exec_callback_QMdiSubWindow_EnterEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMdiSubWindow_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMdiSubWindow_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_TabletEvent +func miqt_exec_callback_QMdiSubWindow_TabletEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QMdiSubWindow_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QMdiSubWindow_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ActionEvent +func miqt_exec_callback_QMdiSubWindow_ActionEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMdiSubWindow_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMdiSubWindow_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DragEnterEvent +func miqt_exec_callback_QMdiSubWindow_DragEnterEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMdiSubWindow_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMdiSubWindow_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DragMoveEvent +func miqt_exec_callback_QMdiSubWindow_DragMoveEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMdiSubWindow_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMdiSubWindow_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DragLeaveEvent +func miqt_exec_callback_QMdiSubWindow_DragLeaveEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMdiSubWindow_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMdiSubWindow_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DropEvent +func miqt_exec_callback_QMdiSubWindow_DropEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMdiSubWindow_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QMdiSubWindow) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QMdiSubWindow_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_NativeEvent +func miqt_exec_callback_QMdiSubWindow_NativeEvent(self *C.QMdiSubWindow, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMdiSubWindow_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMdiSubWindow) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMdiSubWindow_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_Metric +func miqt_exec_callback_QMdiSubWindow_Metric(self *C.QMdiSubWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMdiSubWindow_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMdiSubWindow) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMdiSubWindow_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_InitPainter +func miqt_exec_callback_QMdiSubWindow_InitPainter(self *C.QMdiSubWindow, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMdiSubWindow_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMdiSubWindow) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMdiSubWindow_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_Redirected +func miqt_exec_callback_QMdiSubWindow_Redirected(self *C.QMdiSubWindow, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMdiSubWindow_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMdiSubWindow) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMdiSubWindow_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_SharedPainter +func miqt_exec_callback_QMdiSubWindow_SharedPainter(self *C.QMdiSubWindow, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMdiSubWindow_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiSubWindow) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMdiSubWindow_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_InputMethodEvent +func miqt_exec_callback_QMdiSubWindow_InputMethodEvent(self *C.QMdiSubWindow, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMdiSubWindow_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiSubWindow) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMdiSubWindow_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_InputMethodQuery +func miqt_exec_callback_QMdiSubWindow_InputMethodQuery(self *C.QMdiSubWindow, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMdiSubWindow_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMdiSubWindow) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMdiSubWindow_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_FocusNextPrevChild +func miqt_exec_callback_QMdiSubWindow_FocusNextPrevChild(self *C.QMdiSubWindow, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMdiSubWindow) Delete() { - C.QMdiSubWindow_Delete(this.h) + C.QMdiSubWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmdisubwindow.h b/qt/gen_qmdisubwindow.h index dc179162..cc1257cb 100644 --- a/qt/gen_qmdisubwindow.h +++ b/qt/gen_qmdisubwindow.h @@ -15,24 +15,80 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMdiArea; class QMdiSubWindow; class QMenu; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMdiArea QMdiArea; typedef struct QMdiSubWindow QMdiSubWindow; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMdiSubWindow* QMdiSubWindow_new(QWidget* parent); -QMdiSubWindow* QMdiSubWindow_new2(); -QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags); +void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self); void* QMdiSubWindow_Metacast(QMdiSubWindow* self, const char* param1); struct miqt_string QMdiSubWindow_Tr(const char* s); @@ -59,12 +115,120 @@ void QMdiSubWindow_AboutToActivate(QMdiSubWindow* self); void QMdiSubWindow_connect_AboutToActivate(QMdiSubWindow* self, intptr_t slot); void QMdiSubWindow_ShowSystemMenu(QMdiSubWindow* self); void QMdiSubWindow_ShowShaded(QMdiSubWindow* self); +bool QMdiSubWindow_EventFilter(QMdiSubWindow* self, QObject* object, QEvent* event); +bool QMdiSubWindow_Event(QMdiSubWindow* self, QEvent* event); +void QMdiSubWindow_ShowEvent(QMdiSubWindow* self, QShowEvent* showEvent); +void QMdiSubWindow_HideEvent(QMdiSubWindow* self, QHideEvent* hideEvent); +void QMdiSubWindow_ChangeEvent(QMdiSubWindow* self, QEvent* changeEvent); +void QMdiSubWindow_CloseEvent(QMdiSubWindow* self, QCloseEvent* closeEvent); +void QMdiSubWindow_LeaveEvent(QMdiSubWindow* self, QEvent* leaveEvent); +void QMdiSubWindow_ResizeEvent(QMdiSubWindow* self, QResizeEvent* resizeEvent); +void QMdiSubWindow_TimerEvent(QMdiSubWindow* self, QTimerEvent* timerEvent); +void QMdiSubWindow_MoveEvent(QMdiSubWindow* self, QMoveEvent* moveEvent); +void QMdiSubWindow_PaintEvent(QMdiSubWindow* self, QPaintEvent* paintEvent); +void QMdiSubWindow_MousePressEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_MouseDoubleClickEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_MouseReleaseEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_MouseMoveEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_KeyPressEvent(QMdiSubWindow* self, QKeyEvent* keyEvent); +void QMdiSubWindow_ContextMenuEvent(QMdiSubWindow* self, QContextMenuEvent* contextMenuEvent); +void QMdiSubWindow_FocusInEvent(QMdiSubWindow* self, QFocusEvent* focusInEvent); +void QMdiSubWindow_FocusOutEvent(QMdiSubWindow* self, QFocusEvent* focusOutEvent); +void QMdiSubWindow_ChildEvent(QMdiSubWindow* self, QChildEvent* childEvent); struct miqt_string QMdiSubWindow_Tr2(const char* s, const char* c); struct miqt_string QMdiSubWindow_Tr3(const char* s, const char* c, int n); struct miqt_string QMdiSubWindow_TrUtf82(const char* s, const char* c); struct miqt_string QMdiSubWindow_TrUtf83(const char* s, const char* c, int n); void QMdiSubWindow_SetOption2(QMdiSubWindow* self, int option, bool on); -void QMdiSubWindow_Delete(QMdiSubWindow* self); +void QMdiSubWindow_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMdiSubWindow_virtualbase_SizeHint(const void* self); +void QMdiSubWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMdiSubWindow_virtualbase_MinimumSizeHint(const void* self); +void QMdiSubWindow_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QMdiSubWindow_override_virtual_Event(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_Event(void* self, QEvent* event); +void QMdiSubWindow_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ShowEvent(void* self, QShowEvent* showEvent); +void QMdiSubWindow_override_virtual_HideEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_HideEvent(void* self, QHideEvent* hideEvent); +void QMdiSubWindow_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ChangeEvent(void* self, QEvent* changeEvent); +void QMdiSubWindow_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_CloseEvent(void* self, QCloseEvent* closeEvent); +void QMdiSubWindow_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_LeaveEvent(void* self, QEvent* leaveEvent); +void QMdiSubWindow_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent); +void QMdiSubWindow_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent); +void QMdiSubWindow_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent); +void QMdiSubWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent); +void QMdiSubWindow_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* keyEvent); +void QMdiSubWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* contextMenuEvent); +void QMdiSubWindow_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* focusInEvent); +void QMdiSubWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* focusOutEvent); +void QMdiSubWindow_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ChildEvent(void* self, QChildEvent* childEvent); +void QMdiSubWindow_override_virtual_DevType(void* self, intptr_t slot); +int QMdiSubWindow_virtualbase_DevType(const void* self); +void QMdiSubWindow_override_virtual_SetVisible(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_SetVisible(void* self, bool visible); +void QMdiSubWindow_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMdiSubWindow_virtualbase_HeightForWidth(const void* self, int param1); +void QMdiSubWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_HasHeightForWidth(const void* self); +void QMdiSubWindow_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMdiSubWindow_virtualbase_PaintEngine(const void* self); +void QMdiSubWindow_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QMdiSubWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMdiSubWindow_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_EnterEvent(void* self, QEvent* event); +void QMdiSubWindow_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMdiSubWindow_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QMdiSubWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMdiSubWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMdiSubWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMdiSubWindow_override_virtual_DropEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMdiSubWindow_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QMdiSubWindow_override_virtual_Metric(void* self, intptr_t slot); +int QMdiSubWindow_virtualbase_Metric(const void* self, int param1); +void QMdiSubWindow_override_virtual_InitPainter(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMdiSubWindow_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMdiSubWindow_virtualbase_Redirected(const void* self, QPoint* offset); +void QMdiSubWindow_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMdiSubWindow_virtualbase_SharedPainter(const void* self); +void QMdiSubWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMdiSubWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMdiSubWindow_virtualbase_InputMethodQuery(const void* self, int param1); +void QMdiSubWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMdiSubWindow_Delete(QMdiSubWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmenu.cpp b/qt/gen_qmenu.cpp index a5a2af79..d93103c7 100644 --- a/qt/gen_qmenu.cpp +++ b/qt/gen_qmenu.cpp @@ -1,35 +1,1088 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qmenu.h" #include "_cgo_export.h" -QMenu* QMenu_new(QWidget* parent) { - return new QMenu(parent); +class MiqtVirtualQMenu : public virtual QMenu { +public: + + MiqtVirtualQMenu(QWidget* parent): QMenu(parent) {}; + MiqtVirtualQMenu(): QMenu() {}; + MiqtVirtualQMenu(const QString& title): QMenu(title) {}; + MiqtVirtualQMenu(const QString& title, QWidget* parent): QMenu(title, parent) {}; + + virtual ~MiqtVirtualQMenu() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMenu::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenu_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMenu::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QMenu::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QMenu::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QMenu::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QMenu::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QMenu::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QMenu::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QMenu::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QMenu::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QMenu::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QMenu::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QMenu::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QMenu::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* param1) override { + if (handle__EnterEvent == 0) { + QMenu::enterEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* param1) { + + QMenu::enterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* param1) override { + if (handle__LeaveEvent == 0) { + QMenu::leaveEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* param1) { + + QMenu::leaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QMenu::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QMenu::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QMenu::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QMenu::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* param1) override { + if (handle__ActionEvent == 0) { + QMenu::actionEvent(param1); + return; + } + + QActionEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* param1) { + + QMenu::actionEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QMenu::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QMenu::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QMenu::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QMenu_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QMenu::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMenu::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMenu_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMenu::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMenu::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMenu_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMenu::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMenu::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMenu_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMenu::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMenu::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenu_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMenu::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMenu::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMenu_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMenu::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMenu::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMenu_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMenu::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMenu::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMenu_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMenu::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QMenu::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMenu_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QMenu::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMenu::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMenu_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMenu::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QMenu::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMenu_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QMenu::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QMenu::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMenu_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QMenu::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QMenu::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenu_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QMenu::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QMenu::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QMenu_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QMenu::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMenu::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMenu_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMenu::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QMenu::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QMenu_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QMenu::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMenu::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMenu_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMenu::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMenu::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMenu::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMenu::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMenu::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMenu::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMenu::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMenu::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMenu::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMenu::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMenu_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMenu::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QMenu::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QMenu_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMenu::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMenu::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMenu_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMenu::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMenu::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMenu_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMenu::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMenu::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMenu_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMenu::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMenu::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMenu_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMenu::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMenu::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMenu::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMenu::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMenu_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMenu::inputMethodQuery(static_cast(param1))); + + } + +}; + +void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(parent); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenu* QMenu_new2() { - return new QMenu(); +void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenu* QMenu_new3(struct miqt_string title) { +void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QMenu(title_QString); + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenu* QMenu_new4(struct miqt_string title, QWidget* parent) { +void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QMenu(title_QString, parent); + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString, parent); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMenu_MetaObject(const QMenu* self) { @@ -253,7 +1306,7 @@ void QMenu_AboutToShow(QMenu* self) { } void QMenu_connect_AboutToShow(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::aboutToShow), self, [=]() { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::aboutToShow), self, [=]() { miqt_exec_callback_QMenu_AboutToShow(slot); }); } @@ -263,7 +1316,7 @@ void QMenu_AboutToHide(QMenu* self) { } void QMenu_connect_AboutToHide(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::aboutToHide), self, [=]() { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::aboutToHide), self, [=]() { miqt_exec_callback_QMenu_AboutToHide(slot); }); } @@ -273,7 +1326,7 @@ void QMenu_Triggered(QMenu* self, QAction* action) { } void QMenu_connect_Triggered(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::triggered), self, [=](QAction* action) { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::triggered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenu_Triggered(slot, sigval1); }); @@ -284,7 +1337,7 @@ void QMenu_Hovered(QMenu* self, QAction* action) { } void QMenu_connect_Hovered(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::hovered), self, [=](QAction* action) { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::hovered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenu_Hovered(slot, sigval1); }); @@ -362,7 +1415,347 @@ QAction* QMenu_Exec4(struct miqt_array /* of QAction* */ actions, QPoint* pos, return QMenu::exec(actions_QList, *pos, at, parent); } -void QMenu_Delete(QMenu* self) { - delete self; +void QMenu_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__SizeHint = slot; +} + +QSize* QMenu_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_SizeHint(); +} + +void QMenu_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ChangeEvent = slot; +} + +void QMenu_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QMenu_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__KeyPressEvent = slot; +} + +void QMenu_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QMenu_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMenu_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QMenu_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MousePressEvent = slot; +} + +void QMenu_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QMenu_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMenu_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QMenu_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__WheelEvent = slot; +} + +void QMenu_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_WheelEvent(param1); +} + +void QMenu_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__EnterEvent = slot; +} + +void QMenu_virtualbase_EnterEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_EnterEvent(param1); +} + +void QMenu_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__LeaveEvent = slot; +} + +void QMenu_virtualbase_LeaveEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_LeaveEvent(param1); +} + +void QMenu_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__HideEvent = slot; +} + +void QMenu_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_HideEvent(param1); +} + +void QMenu_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__PaintEvent = slot; +} + +void QMenu_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_PaintEvent(param1); +} + +void QMenu_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ActionEvent = slot; +} + +void QMenu_virtualbase_ActionEvent(void* self, QActionEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ActionEvent(param1); +} + +void QMenu_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__TimerEvent = slot; +} + +void QMenu_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_TimerEvent(param1); +} + +void QMenu_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__Event = slot; +} + +bool QMenu_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQMenu*)(self) )->virtualbase_Event(param1); +} + +void QMenu_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMenu_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMenu*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMenu_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DevType = slot; +} + +int QMenu_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_DevType(); +} + +void QMenu_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__SetVisible = slot; +} + +void QMenu_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_SetVisible(visible); +} + +void QMenu_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMenu_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMenu_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__HeightForWidth = slot; +} + +int QMenu_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMenu_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMenu_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMenu_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMenu_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_PaintEngine(); +} + +void QMenu_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMenu_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QMenu_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMenu_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMenu_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__FocusInEvent = slot; +} + +void QMenu_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_FocusInEvent(event); +} + +void QMenu_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__FocusOutEvent = slot; +} + +void QMenu_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QMenu_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MoveEvent = slot; +} + +void QMenu_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MoveEvent(event); +} + +void QMenu_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ResizeEvent = slot; +} + +void QMenu_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ResizeEvent(event); +} + +void QMenu_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__CloseEvent = slot; +} + +void QMenu_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_CloseEvent(event); +} + +void QMenu_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMenu_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QMenu_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__TabletEvent = slot; +} + +void QMenu_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_TabletEvent(event); +} + +void QMenu_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DragEnterEvent = slot; +} + +void QMenu_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMenu_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DragMoveEvent = slot; +} + +void QMenu_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMenu_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMenu_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMenu_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DropEvent = slot; +} + +void QMenu_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DropEvent(event); +} + +void QMenu_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ShowEvent = slot; +} + +void QMenu_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ShowEvent(event); +} + +void QMenu_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__NativeEvent = slot; +} + +bool QMenu_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQMenu*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMenu_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__Metric = slot; +} + +int QMenu_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_Metric(param1); +} + +void QMenu_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InitPainter = slot; +} + +void QMenu_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMenu*)(self) )->virtualbase_InitPainter(painter); +} + +void QMenu_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMenu_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_Redirected(offset); +} + +void QMenu_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMenu_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_SharedPainter(); +} + +void QMenu_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InputMethodEvent = slot; +} + +void QMenu_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMenu_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMenu_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMenu_Delete(QMenu* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmenu.go b/qt/gen_qmenu.go index 94c0878f..42949ad5 100644 --- a/qt/gen_qmenu.go +++ b/qt/gen_qmenu.go @@ -15,7 +15,8 @@ import ( ) type QMenu struct { - h *C.QMenu + h *C.QMenu + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QMenu) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMenu(h *C.QMenu) *QMenu { +// newQMenu constructs the type using only CGO pointers. +func newQMenu(h *C.QMenu, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenu { if h == nil { return nil } - return &QMenu{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMenu{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMenu(h unsafe.Pointer) *QMenu { - return newQMenu((*C.QMenu)(h)) +// UnsafeNewQMenu constructs the type using only unsafe pointers. +func UnsafeNewQMenu(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenu { + if h == nil { + return nil + } + + return &QMenu{h: (*C.QMenu)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMenu constructs a new QMenu object. func NewQMenu(parent *QWidget) *QMenu { - ret := C.QMenu_new(parent.cPointer()) - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new(parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenu2 constructs a new QMenu object. func NewQMenu2() *QMenu { - ret := C.QMenu_new2() - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new2(&outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenu3 constructs a new QMenu object. @@ -62,8 +85,15 @@ func NewQMenu3(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QMenu_new3(title_ms) - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new3(title_ms, &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenu4 constructs a new QMenu object. @@ -72,8 +102,15 @@ func NewQMenu4(title string, parent *QWidget) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QMenu_new4(title_ms, parent.cPointer()) - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new4(title_ms, parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMenu) MetaObject() *QMetaObject { @@ -109,7 +146,7 @@ func (this *QMenu) AddAction(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddAction(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddAction(this.h, text_ms)), nil) } func (this *QMenu) AddAction2(icon *QIcon, text string) *QAction { @@ -117,11 +154,11 @@ func (this *QMenu) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddAction2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddAction2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QMenu) AddMenu(menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddMenu(this.h, menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddMenu(this.h, menu.cPointer())), nil) } func (this *QMenu) AddMenuWithTitle(title string) *QMenu { @@ -129,7 +166,7 @@ func (this *QMenu) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenuWithTitle(this.h, title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenuWithTitle(this.h, title_ms)), nil, nil, nil) } func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { @@ -137,11 +174,11 @@ func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms)), nil, nil, nil) } func (this *QMenu) AddSeparator() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSeparator(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSeparator(this.h)), nil) } func (this *QMenu) AddSection(text string) *QAction { @@ -149,7 +186,7 @@ func (this *QMenu) AddSection(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection(this.h, text_ms)), nil) } func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { @@ -157,15 +194,15 @@ func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QMenu) InsertMenu(before *QAction, menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer())), nil) } func (this *QMenu) InsertSeparator(before *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSeparator(this.h, before.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSeparator(this.h, before.cPointer())), nil) } func (this *QMenu) InsertSection(before *QAction, text string) *QAction { @@ -173,7 +210,7 @@ func (this *QMenu) InsertSection(before *QAction, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms)), nil) } func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QAction { @@ -181,7 +218,7 @@ func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QA text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms)), nil) } func (this *QMenu) IsEmpty() bool { @@ -221,7 +258,7 @@ func (this *QMenu) SetDefaultAction(defaultAction *QAction) { } func (this *QMenu) DefaultAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_DefaultAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_DefaultAction(this.h)), nil) } func (this *QMenu) SetActiveAction(act *QAction) { @@ -229,7 +266,7 @@ func (this *QMenu) SetActiveAction(act *QAction) { } func (this *QMenu) ActiveAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActiveAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActiveAction(this.h)), nil) } func (this *QMenu) Popup(pos *QPoint) { @@ -237,11 +274,11 @@ func (this *QMenu) Popup(pos *QPoint) { } func (this *QMenu) Exec() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec(this.h)), nil) } func (this *QMenu) ExecWithPos(pos *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ExecWithPos(this.h, pos.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ExecWithPos(this.h, pos.cPointer())), nil) } func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { @@ -251,7 +288,7 @@ func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec2(actions_ma, pos.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec2(actions_ma, pos.cPointer())), nil) } func (this *QMenu) SizeHint() *QSize { @@ -269,11 +306,11 @@ func (this *QMenu) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenu) ActionAt(param1 *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActionAt(this.h, param1.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActionAt(this.h, param1.cPointer())), nil) } func (this *QMenu) MenuAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_MenuAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_MenuAction(this.h)), nil) } func (this *QMenu) Title() string { @@ -371,7 +408,7 @@ func miqt_exec_callback_QMenu_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -391,7 +428,7 @@ func miqt_exec_callback_QMenu_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -445,7 +482,7 @@ func (this *QMenu) Popup2(pos *QPoint, at *QAction) { } func (this *QMenu) Exec22(pos *QPoint, at *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer())), nil) } func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { @@ -455,7 +492,7 @@ func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer())), nil) } func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) *QAction { @@ -465,12 +502,1001 @@ func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer())), nil) +} + +func (this *QMenu) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMenu_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenu) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenu_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_SizeHint +func miqt_exec_callback_QMenu_SizeHint(self *C.QMenu, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QMenu_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenu_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ChangeEvent +func miqt_exec_callback_QMenu_ChangeEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenu{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QMenu_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QMenu_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_KeyPressEvent +func miqt_exec_callback_QMenu_KeyPressEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QMenu_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenu_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MouseReleaseEvent +func miqt_exec_callback_QMenu_MouseReleaseEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QMenu_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenu_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MousePressEvent +func miqt_exec_callback_QMenu_MousePressEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QMenu_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenu_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MouseMoveEvent +func miqt_exec_callback_QMenu_MouseMoveEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QMenu_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QMenu_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_WheelEvent +func miqt_exec_callback_QMenu_WheelEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_EnterEvent(param1 *QEvent) { + + C.QMenu_virtualbase_EnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnEnterEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenu_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_EnterEvent +func miqt_exec_callback_QMenu_EnterEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenu{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_LeaveEvent(param1 *QEvent) { + + C.QMenu_virtualbase_LeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnLeaveEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenu_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_LeaveEvent +func miqt_exec_callback_QMenu_LeaveEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenu{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QMenu_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QMenu_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_HideEvent +func miqt_exec_callback_QMenu_HideEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QMenu_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QMenu_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_PaintEvent +func miqt_exec_callback_QMenu_PaintEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ActionEvent(param1 *QActionEvent) { + + C.QMenu_virtualbase_ActionEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnActionEvent(slot func(super func(param1 *QActionEvent), param1 *QActionEvent)) { + C.QMenu_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ActionEvent +func miqt_exec_callback_QMenu_ActionEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QActionEvent), param1 *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QMenu_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QMenu_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_TimerEvent +func miqt_exec_callback_QMenu_TimerEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QMenu_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QMenu) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QMenu_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_Event +func miqt_exec_callback_QMenu_Event(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMenu_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMenu) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMenu_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_FocusNextPrevChild +func miqt_exec_callback_QMenu_FocusNextPrevChild(self *C.QMenu, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_DevType() int { + + return (int)(C.QMenu_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMenu) OnDevType(slot func(super func() int) int) { + C.QMenu_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DevType +func miqt_exec_callback_QMenu_DevType(self *C.QMenu, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_SetVisible(visible bool) { + + C.QMenu_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMenu) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMenu_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_SetVisible +func miqt_exec_callback_QMenu_SetVisible(self *C.QMenu, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMenu{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMenu) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMenu_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenu) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenu_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MinimumSizeHint +func miqt_exec_callback_QMenu_MinimumSizeHint(self *C.QMenu, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMenu_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenu) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMenu_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_HeightForWidth +func miqt_exec_callback_QMenu_HeightForWidth(self *C.QMenu, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMenu_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMenu) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMenu_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_HasHeightForWidth +func miqt_exec_callback_QMenu_HasHeightForWidth(self *C.QMenu, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMenu_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMenu) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMenu_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_PaintEngine +func miqt_exec_callback_QMenu_PaintEngine(self *C.QMenu, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QMenu_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMenu_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MouseDoubleClickEvent +func miqt_exec_callback_QMenu_MouseDoubleClickEvent(self *C.QMenu, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMenu_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMenu_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_KeyReleaseEvent +func miqt_exec_callback_QMenu_KeyReleaseEvent(self *C.QMenu, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QMenu_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMenu_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_FocusInEvent +func miqt_exec_callback_QMenu_FocusInEvent(self *C.QMenu, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QMenu_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMenu_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_FocusOutEvent +func miqt_exec_callback_QMenu_FocusOutEvent(self *C.QMenu, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QMenu_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QMenu_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MoveEvent +func miqt_exec_callback_QMenu_MoveEvent(self *C.QMenu, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QMenu_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QMenu_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ResizeEvent +func miqt_exec_callback_QMenu_ResizeEvent(self *C.QMenu, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMenu_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMenu_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_CloseEvent +func miqt_exec_callback_QMenu_CloseEvent(self *C.QMenu, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QMenu_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QMenu_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ContextMenuEvent +func miqt_exec_callback_QMenu_ContextMenuEvent(self *C.QMenu, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMenu_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMenu_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_TabletEvent +func miqt_exec_callback_QMenu_TabletEvent(self *C.QMenu, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMenu_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMenu_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DragEnterEvent +func miqt_exec_callback_QMenu_DragEnterEvent(self *C.QMenu, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMenu_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMenu_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DragMoveEvent +func miqt_exec_callback_QMenu_DragMoveEvent(self *C.QMenu, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMenu_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMenu_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DragLeaveEvent +func miqt_exec_callback_QMenu_DragLeaveEvent(self *C.QMenu, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMenu_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMenu_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DropEvent +func miqt_exec_callback_QMenu_DropEvent(self *C.QMenu, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMenu_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMenu_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ShowEvent +func miqt_exec_callback_QMenu_ShowEvent(self *C.QMenu, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMenu_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QMenu) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QMenu_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_NativeEvent +func miqt_exec_callback_QMenu_NativeEvent(self *C.QMenu, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMenu_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenu) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMenu_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_Metric +func miqt_exec_callback_QMenu_Metric(self *C.QMenu, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMenu_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMenu) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMenu_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InitPainter +func miqt_exec_callback_QMenu_InitPainter(self *C.QMenu, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMenu{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMenu) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMenu_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMenu) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMenu_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_Redirected +func miqt_exec_callback_QMenu_Redirected(self *C.QMenu, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMenu_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMenu) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMenu_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_SharedPainter +func miqt_exec_callback_QMenu_SharedPainter(self *C.QMenu, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMenu_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMenu_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InputMethodEvent +func miqt_exec_callback_QMenu_InputMethodEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMenu_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenu) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMenu_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InputMethodQuery +func miqt_exec_callback_QMenu_InputMethodQuery(self *C.QMenu, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QMenu) Delete() { - C.QMenu_Delete(this.h) + C.QMenu_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmenu.h b/qt/gen_qmenu.h index 1e751f9d..01662f62 100644 --- a/qt/gen_qmenu.h +++ b/qt/gen_qmenu.h @@ -16,28 +16,80 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMenu* QMenu_new(QWidget* parent); -QMenu* QMenu_new2(); -QMenu* QMenu_new3(struct miqt_string title); -QMenu* QMenu_new4(struct miqt_string title, QWidget* parent); +void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMenu_MetaObject(const QMenu* self); void* QMenu_Metacast(QMenu* self, const char* param1); struct miqt_string QMenu_Tr(const char* s); @@ -91,6 +143,20 @@ void QMenu_Triggered(QMenu* self, QAction* action); void QMenu_connect_Triggered(QMenu* self, intptr_t slot); void QMenu_Hovered(QMenu* self, QAction* action); void QMenu_connect_Hovered(QMenu* self, intptr_t slot); +void QMenu_ChangeEvent(QMenu* self, QEvent* param1); +void QMenu_KeyPressEvent(QMenu* self, QKeyEvent* param1); +void QMenu_MouseReleaseEvent(QMenu* self, QMouseEvent* param1); +void QMenu_MousePressEvent(QMenu* self, QMouseEvent* param1); +void QMenu_MouseMoveEvent(QMenu* self, QMouseEvent* param1); +void QMenu_WheelEvent(QMenu* self, QWheelEvent* param1); +void QMenu_EnterEvent(QMenu* self, QEvent* param1); +void QMenu_LeaveEvent(QMenu* self, QEvent* param1); +void QMenu_HideEvent(QMenu* self, QHideEvent* param1); +void QMenu_PaintEvent(QMenu* self, QPaintEvent* param1); +void QMenu_ActionEvent(QMenu* self, QActionEvent* param1); +void QMenu_TimerEvent(QMenu* self, QTimerEvent* param1); +bool QMenu_Event(QMenu* self, QEvent* param1); +bool QMenu_FocusNextPrevChild(QMenu* self, bool next); struct miqt_string QMenu_Tr2(const char* s, const char* c); struct miqt_string QMenu_Tr3(const char* s, const char* c, int n); struct miqt_string QMenu_TrUtf82(const char* s, const char* c); @@ -99,7 +165,91 @@ void QMenu_Popup2(QMenu* self, QPoint* pos, QAction* at); QAction* QMenu_Exec22(QMenu* self, QPoint* pos, QAction* at); QAction* QMenu_Exec3(struct miqt_array /* of QAction* */ actions, QPoint* pos, QAction* at); QAction* QMenu_Exec4(struct miqt_array /* of QAction* */ actions, QPoint* pos, QAction* at, QWidget* parent); -void QMenu_Delete(QMenu* self); +void QMenu_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMenu_virtualbase_SizeHint(const void* self); +void QMenu_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QMenu_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMenu_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QMenu_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QMenu_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QMenu_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QMenu_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMenu_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QMenu_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMenu_virtualbase_EnterEvent(void* self, QEvent* param1); +void QMenu_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_LeaveEvent(void* self, QEvent* param1); +void QMenu_override_virtual_HideEvent(void* self, intptr_t slot); +void QMenu_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QMenu_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMenu_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QMenu_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ActionEvent(void* self, QActionEvent* param1); +void QMenu_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMenu_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QMenu_override_virtual_Event(void* self, intptr_t slot); +bool QMenu_virtualbase_Event(void* self, QEvent* param1); +void QMenu_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMenu_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMenu_override_virtual_DevType(void* self, intptr_t slot); +int QMenu_virtualbase_DevType(const void* self); +void QMenu_override_virtual_SetVisible(void* self, intptr_t slot); +void QMenu_virtualbase_SetVisible(void* self, bool visible); +void QMenu_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMenu_virtualbase_MinimumSizeHint(const void* self); +void QMenu_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMenu_virtualbase_HeightForWidth(const void* self, int param1); +void QMenu_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMenu_virtualbase_HasHeightForWidth(const void* self); +void QMenu_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMenu_virtualbase_PaintEngine(const void* self); +void QMenu_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QMenu_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMenu_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMenu_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMenu_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QMenu_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMenu_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QMenu_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QMenu_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QMenu_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMenu_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMenu_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QMenu_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMenu_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMenu_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMenu_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMenu_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMenu_override_virtual_DropEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMenu_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMenu_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMenu_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QMenu_override_virtual_Metric(void* self, intptr_t slot); +int QMenu_virtualbase_Metric(const void* self, int param1); +void QMenu_override_virtual_InitPainter(void* self, intptr_t slot); +void QMenu_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMenu_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMenu_virtualbase_Redirected(const void* self, QPoint* offset); +void QMenu_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMenu_virtualbase_SharedPainter(const void* self); +void QMenu_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMenu_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMenu_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMenu_virtualbase_InputMethodQuery(const void* self, int param1); +void QMenu_Delete(QMenu* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmenubar.cpp b/qt/gen_qmenubar.cpp index 3d3efcdc..e3c62771 100644 --- a/qt/gen_qmenubar.cpp +++ b/qt/gen_qmenubar.cpp @@ -1,25 +1,1092 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qmenubar.h" #include "_cgo_export.h" -QMenuBar* QMenuBar_new(QWidget* parent) { - return new QMenuBar(parent); +class MiqtVirtualQMenuBar : public virtual QMenuBar { +public: + + MiqtVirtualQMenuBar(QWidget* parent): QMenuBar(parent) {}; + MiqtVirtualQMenuBar(): QMenuBar() {}; + + virtual ~MiqtVirtualQMenuBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMenuBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenuBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMenuBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMenuBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenuBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMenuBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMenuBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMenuBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMenuBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMenuBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMenuBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMenuBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QMenuBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QMenuBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QMenuBar::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QMenuBar::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QMenuBar::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QMenuBar::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QMenuBar::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QMenuBar::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QMenuBar::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QMenuBar::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* param1) override { + if (handle__LeaveEvent == 0) { + QMenuBar::leaveEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* param1) { + + QMenuBar::leaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QMenuBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QMenuBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QMenuBar::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QMenuBar::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* param1) override { + if (handle__ActionEvent == 0) { + QMenuBar::actionEvent(param1); + return; + } + + QActionEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* param1) { + + QMenuBar::actionEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QMenuBar::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QMenuBar::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QMenuBar::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QMenuBar::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QMenuBar::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QMenuBar::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QMenuBar::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QMenuBar_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QMenuBar::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QMenuBar::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QMenuBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QMenuBar::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMenuBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMenuBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMenuBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMenuBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMenuBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMenuBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMenuBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMenuBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMenuBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QMenuBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QMenuBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QMenuBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QMenuBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMenuBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMenuBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QMenuBar::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QMenuBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QMenuBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QMenuBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMenuBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMenuBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QMenuBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QMenuBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMenuBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMenuBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMenuBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMenuBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMenuBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMenuBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMenuBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMenuBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMenuBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMenuBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMenuBar::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMenuBar::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QMenuBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QMenuBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QMenuBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QMenuBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMenuBar::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMenuBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMenuBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMenuBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMenuBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMenuBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMenuBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMenuBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMenuBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMenuBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMenuBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMenuBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMenuBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMenuBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMenuBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMenuBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMenuBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMenuBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMenuBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMenuBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMenuBar::focusNextPrevChild(next); + + } + +}; + +void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(parent); + *outptr_QMenuBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenuBar* QMenuBar_new2() { - return new QMenuBar(); +void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(); + *outptr_QMenuBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMenuBar_MetaObject(const QMenuBar* self) { @@ -148,7 +1215,7 @@ void QMenuBar_Triggered(QMenuBar* self, QAction* action) { } void QMenuBar_connect_Triggered(QMenuBar* self, intptr_t slot) { - QMenuBar::connect(self, static_cast(&QMenuBar::triggered), self, [=](QAction* action) { + MiqtVirtualQMenuBar::connect(self, static_cast(&QMenuBar::triggered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenuBar_Triggered(slot, sigval1); }); @@ -159,7 +1226,7 @@ void QMenuBar_Hovered(QMenuBar* self, QAction* action) { } void QMenuBar_connect_Hovered(QMenuBar* self, intptr_t slot) { - QMenuBar::connect(self, static_cast(&QMenuBar::hovered), self, [=](QAction* action) { + MiqtVirtualQMenuBar::connect(self, static_cast(&QMenuBar::hovered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenuBar_Hovered(slot, sigval1); }); @@ -217,7 +1284,355 @@ QWidget* QMenuBar_CornerWidget1(const QMenuBar* self, int corner) { return self->cornerWidget(static_cast(corner)); } -void QMenuBar_Delete(QMenuBar* self) { - delete self; +void QMenuBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QMenuBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_SizeHint(); +} + +void QMenuBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMenuBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMenuBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__HeightForWidth = slot; +} + +int QMenuBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMenuBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__SetVisible = slot; +} + +void QMenuBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QMenuBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ChangeEvent = slot; +} + +void QMenuBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QMenuBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QMenuBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QMenuBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMenuBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QMenuBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MousePressEvent = slot; +} + +void QMenuBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QMenuBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMenuBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QMenuBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__LeaveEvent = slot; +} + +void QMenuBar_virtualbase_LeaveEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_LeaveEvent(param1); +} + +void QMenuBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__PaintEvent = slot; +} + +void QMenuBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QMenuBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ResizeEvent = slot; +} + +void QMenuBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QMenuBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ActionEvent = slot; +} + +void QMenuBar_virtualbase_ActionEvent(void* self, QActionEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ActionEvent(param1); +} + +void QMenuBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QMenuBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QMenuBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__FocusInEvent = slot; +} + +void QMenuBar_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QMenuBar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__TimerEvent = slot; +} + +void QMenuBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_TimerEvent(param1); +} + +void QMenuBar_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__EventFilter = slot; +} + +bool QMenuBar_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QMenuBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__Event = slot; +} + +bool QMenuBar_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_Event(param1); +} + +void QMenuBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DevType = slot; +} + +int QMenuBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_DevType(); +} + +void QMenuBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMenuBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMenuBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMenuBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_PaintEngine(); +} + +void QMenuBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMenuBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QMenuBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__WheelEvent = slot; +} + +void QMenuBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QMenuBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMenuBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMenuBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__EnterEvent = slot; +} + +void QMenuBar_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QMenuBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MoveEvent = slot; +} + +void QMenuBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QMenuBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__CloseEvent = slot; +} + +void QMenuBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QMenuBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMenuBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QMenuBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__TabletEvent = slot; +} + +void QMenuBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QMenuBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QMenuBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMenuBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QMenuBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMenuBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMenuBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMenuBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DropEvent = slot; +} + +void QMenuBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DropEvent(event); +} + +void QMenuBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ShowEvent = slot; +} + +void QMenuBar_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ShowEvent(event); +} + +void QMenuBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__HideEvent = slot; +} + +void QMenuBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_HideEvent(event); +} + +void QMenuBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__NativeEvent = slot; +} + +bool QMenuBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMenuBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__Metric = slot; +} + +int QMenuBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_Metric(param1); +} + +void QMenuBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InitPainter = slot; +} + +void QMenuBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QMenuBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMenuBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_Redirected(offset); +} + +void QMenuBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMenuBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_SharedPainter(); +} + +void QMenuBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QMenuBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMenuBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMenuBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMenuBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMenuBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMenuBar_Delete(QMenuBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmenubar.go b/qt/gen_qmenubar.go index 78cf8007..ca583374 100644 --- a/qt/gen_qmenubar.go +++ b/qt/gen_qmenubar.go @@ -15,7 +15,8 @@ import ( ) type QMenuBar struct { - h *C.QMenuBar + h *C.QMenuBar + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QMenuBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMenuBar(h *C.QMenuBar) *QMenuBar { +// newQMenuBar constructs the type using only CGO pointers. +func newQMenuBar(h *C.QMenuBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenuBar { if h == nil { return nil } - return &QMenuBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMenuBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMenuBar(h unsafe.Pointer) *QMenuBar { - return newQMenuBar((*C.QMenuBar)(h)) +// UnsafeNewQMenuBar constructs the type using only unsafe pointers. +func UnsafeNewQMenuBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenuBar { + if h == nil { + return nil + } + + return &QMenuBar{h: (*C.QMenuBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMenuBar constructs a new QMenuBar object. func NewQMenuBar(parent *QWidget) *QMenuBar { - ret := C.QMenuBar_new(parent.cPointer()) - return newQMenuBar(ret) + var outptr_QMenuBar *C.QMenuBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenuBar_new(parent.cPointer(), &outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenuBar2 constructs a new QMenuBar object. func NewQMenuBar2() *QMenuBar { - ret := C.QMenuBar_new2() - return newQMenuBar(ret) + var outptr_QMenuBar *C.QMenuBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenuBar_new2(&outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMenuBar) MetaObject() *QMetaObject { @@ -89,11 +112,11 @@ func (this *QMenuBar) AddAction(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddAction(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddAction(this.h, text_ms)), nil) } func (this *QMenuBar) AddMenu(menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddMenu(this.h, menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddMenu(this.h, menu.cPointer())), nil) } func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { @@ -101,7 +124,7 @@ func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenuWithTitle(this.h, title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenuWithTitle(this.h, title_ms)), nil, nil, nil) } func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { @@ -109,19 +132,19 @@ func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms)), nil, nil, nil) } func (this *QMenuBar) AddSeparator() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddSeparator(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddSeparator(this.h)), nil) } func (this *QMenuBar) InsertSeparator(before *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertSeparator(this.h, before.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertSeparator(this.h, before.cPointer())), nil) } func (this *QMenuBar) InsertMenu(before *QAction, menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer())), nil) } func (this *QMenuBar) Clear() { @@ -129,7 +152,7 @@ func (this *QMenuBar) Clear() { } func (this *QMenuBar) ActiveAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActiveAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActiveAction(this.h)), nil) } func (this *QMenuBar) SetActiveAction(action *QAction) { @@ -170,7 +193,7 @@ func (this *QMenuBar) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenuBar) ActionAt(param1 *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActionAt(this.h, param1.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActionAt(this.h, param1.cPointer())), nil) } func (this *QMenuBar) SetCornerWidget(w *QWidget) { @@ -178,7 +201,7 @@ func (this *QMenuBar) SetCornerWidget(w *QWidget) { } func (this *QMenuBar) CornerWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget(this.h)), nil, nil) } func (this *QMenuBar) IsNativeMenuBar() bool { @@ -208,7 +231,7 @@ func miqt_exec_callback_QMenuBar_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -228,7 +251,7 @@ func miqt_exec_callback_QMenuBar_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -282,12 +305,1027 @@ func (this *QMenuBar) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QMenuBar) CornerWidget1(corner Corner) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner))), nil, nil) +} + +func (this *QMenuBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMenuBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenuBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenuBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_SizeHint +func miqt_exec_callback_QMenuBar_SizeHint(self *C.QMenuBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMenuBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenuBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenuBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MinimumSizeHint +func miqt_exec_callback_QMenuBar_MinimumSizeHint(self *C.QMenuBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMenuBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenuBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMenuBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_HeightForWidth +func miqt_exec_callback_QMenuBar_HeightForWidth(self *C.QMenuBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_SetVisible(visible bool) { + + C.QMenuBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMenuBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMenuBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_SetVisible +func miqt_exec_callback_QMenuBar_SetVisible(self *C.QMenuBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMenuBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QMenuBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenuBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ChangeEvent +func miqt_exec_callback_QMenuBar_ChangeEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QMenuBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QMenuBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_KeyPressEvent +func miqt_exec_callback_QMenuBar_KeyPressEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QMenuBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenuBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MouseReleaseEvent +func miqt_exec_callback_QMenuBar_MouseReleaseEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QMenuBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenuBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MousePressEvent +func miqt_exec_callback_QMenuBar_MousePressEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QMenuBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenuBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MouseMoveEvent +func miqt_exec_callback_QMenuBar_MouseMoveEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_LeaveEvent(param1 *QEvent) { + + C.QMenuBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnLeaveEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenuBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_LeaveEvent +func miqt_exec_callback_QMenuBar_LeaveEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QMenuBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QMenuBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_PaintEvent +func miqt_exec_callback_QMenuBar_PaintEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QMenuBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QMenuBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ResizeEvent +func miqt_exec_callback_QMenuBar_ResizeEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ActionEvent(param1 *QActionEvent) { + + C.QMenuBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnActionEvent(slot func(super func(param1 *QActionEvent), param1 *QActionEvent)) { + C.QMenuBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ActionEvent +func miqt_exec_callback_QMenuBar_ActionEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QActionEvent), param1 *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QMenuBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QMenuBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_FocusOutEvent +func miqt_exec_callback_QMenuBar_FocusOutEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QMenuBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QMenuBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_FocusInEvent +func miqt_exec_callback_QMenuBar_FocusInEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QMenuBar_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QMenuBar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_TimerEvent +func miqt_exec_callback_QMenuBar_TimerEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QMenuBar_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QMenuBar) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QMenuBar_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_EventFilter +func miqt_exec_callback_QMenuBar_EventFilter(self *C.QMenuBar, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QMenuBar_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QMenuBar) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QMenuBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_Event +func miqt_exec_callback_QMenuBar_Event(self *C.QMenuBar, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_DevType() int { + + return (int)(C.QMenuBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMenuBar) OnDevType(slot func(super func() int) int) { + C.QMenuBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DevType +func miqt_exec_callback_QMenuBar_DevType(self *C.QMenuBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMenuBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMenuBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMenuBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_HasHeightForWidth +func miqt_exec_callback_QMenuBar_HasHeightForWidth(self *C.QMenuBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMenuBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMenuBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMenuBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_PaintEngine +func miqt_exec_callback_QMenuBar_PaintEngine(self *C.QMenuBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QMenuBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMenuBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MouseDoubleClickEvent +func miqt_exec_callback_QMenuBar_MouseDoubleClickEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QMenuBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QMenuBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_WheelEvent +func miqt_exec_callback_QMenuBar_WheelEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMenuBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMenuBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_KeyReleaseEvent +func miqt_exec_callback_QMenuBar_KeyReleaseEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_EnterEvent(event *QEvent) { + + C.QMenuBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMenuBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_EnterEvent +func miqt_exec_callback_QMenuBar_EnterEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QMenuBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QMenuBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MoveEvent +func miqt_exec_callback_QMenuBar_MoveEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMenuBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMenuBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_CloseEvent +func miqt_exec_callback_QMenuBar_CloseEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QMenuBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QMenuBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ContextMenuEvent +func miqt_exec_callback_QMenuBar_ContextMenuEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMenuBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMenuBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_TabletEvent +func miqt_exec_callback_QMenuBar_TabletEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMenuBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMenuBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DragEnterEvent +func miqt_exec_callback_QMenuBar_DragEnterEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMenuBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMenuBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DragMoveEvent +func miqt_exec_callback_QMenuBar_DragMoveEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMenuBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMenuBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DragLeaveEvent +func miqt_exec_callback_QMenuBar_DragLeaveEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMenuBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMenuBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DropEvent +func miqt_exec_callback_QMenuBar_DropEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMenuBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMenuBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ShowEvent +func miqt_exec_callback_QMenuBar_ShowEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QMenuBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QMenuBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_HideEvent +func miqt_exec_callback_QMenuBar_HideEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMenuBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QMenuBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QMenuBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_NativeEvent +func miqt_exec_callback_QMenuBar_NativeEvent(self *C.QMenuBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMenuBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenuBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMenuBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_Metric +func miqt_exec_callback_QMenuBar_Metric(self *C.QMenuBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMenuBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMenuBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMenuBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InitPainter +func miqt_exec_callback_QMenuBar_InitPainter(self *C.QMenuBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMenuBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMenuBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMenuBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_Redirected +func miqt_exec_callback_QMenuBar_Redirected(self *C.QMenuBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMenuBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMenuBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMenuBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_SharedPainter +func miqt_exec_callback_QMenuBar_SharedPainter(self *C.QMenuBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMenuBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMenuBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InputMethodEvent +func miqt_exec_callback_QMenuBar_InputMethodEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMenuBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenuBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMenuBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InputMethodQuery +func miqt_exec_callback_QMenuBar_InputMethodQuery(self *C.QMenuBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMenuBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMenuBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMenuBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_FocusNextPrevChild +func miqt_exec_callback_QMenuBar_FocusNextPrevChild(self *C.QMenuBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QMenuBar) Delete() { - C.QMenuBar_Delete(this.h) + C.QMenuBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmenubar.h b/qt/gen_qmenubar.h index 3a378e40..f2d1c54e 100644 --- a/qt/gen_qmenubar.h +++ b/qt/gen_qmenubar.h @@ -16,28 +16,80 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMenuBar; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMenuBar QMenuBar; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMenuBar* QMenuBar_new(QWidget* parent); -QMenuBar* QMenuBar_new2(); +void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMenuBar_MetaObject(const QMenuBar* self); void* QMenuBar_Metacast(QMenuBar* self, const char* param1); struct miqt_string QMenuBar_Tr(const char* s); @@ -68,13 +120,113 @@ void QMenuBar_Triggered(QMenuBar* self, QAction* action); void QMenuBar_connect_Triggered(QMenuBar* self, intptr_t slot); void QMenuBar_Hovered(QMenuBar* self, QAction* action); void QMenuBar_connect_Hovered(QMenuBar* self, intptr_t slot); +void QMenuBar_ChangeEvent(QMenuBar* self, QEvent* param1); +void QMenuBar_KeyPressEvent(QMenuBar* self, QKeyEvent* param1); +void QMenuBar_MouseReleaseEvent(QMenuBar* self, QMouseEvent* param1); +void QMenuBar_MousePressEvent(QMenuBar* self, QMouseEvent* param1); +void QMenuBar_MouseMoveEvent(QMenuBar* self, QMouseEvent* param1); +void QMenuBar_LeaveEvent(QMenuBar* self, QEvent* param1); +void QMenuBar_PaintEvent(QMenuBar* self, QPaintEvent* param1); +void QMenuBar_ResizeEvent(QMenuBar* self, QResizeEvent* param1); +void QMenuBar_ActionEvent(QMenuBar* self, QActionEvent* param1); +void QMenuBar_FocusOutEvent(QMenuBar* self, QFocusEvent* param1); +void QMenuBar_FocusInEvent(QMenuBar* self, QFocusEvent* param1); +void QMenuBar_TimerEvent(QMenuBar* self, QTimerEvent* param1); +bool QMenuBar_EventFilter(QMenuBar* self, QObject* param1, QEvent* param2); +bool QMenuBar_Event(QMenuBar* self, QEvent* param1); struct miqt_string QMenuBar_Tr2(const char* s, const char* c); struct miqt_string QMenuBar_Tr3(const char* s, const char* c, int n); struct miqt_string QMenuBar_TrUtf82(const char* s, const char* c); struct miqt_string QMenuBar_TrUtf83(const char* s, const char* c, int n); void QMenuBar_SetCornerWidget2(QMenuBar* self, QWidget* w, int corner); QWidget* QMenuBar_CornerWidget1(const QMenuBar* self, int corner); -void QMenuBar_Delete(QMenuBar* self); +void QMenuBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMenuBar_virtualbase_SizeHint(const void* self); +void QMenuBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMenuBar_virtualbase_MinimumSizeHint(const void* self); +void QMenuBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMenuBar_virtualbase_HeightForWidth(const void* self, int param1); +void QMenuBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QMenuBar_virtualbase_SetVisible(void* self, bool visible); +void QMenuBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QMenuBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QMenuBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QMenuBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QMenuBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QMenuBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_LeaveEvent(void* self, QEvent* param1); +void QMenuBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QMenuBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QMenuBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ActionEvent(void* self, QActionEvent* param1); +void QMenuBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QMenuBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QMenuBar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QMenuBar_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMenuBar_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QMenuBar_override_virtual_Event(void* self, intptr_t slot); +bool QMenuBar_virtualbase_Event(void* self, QEvent* param1); +void QMenuBar_override_virtual_DevType(void* self, intptr_t slot); +int QMenuBar_virtualbase_DevType(const void* self); +void QMenuBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMenuBar_virtualbase_HasHeightForWidth(const void* self); +void QMenuBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMenuBar_virtualbase_PaintEngine(const void* self); +void QMenuBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QMenuBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QMenuBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMenuBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_EnterEvent(void* self, QEvent* event); +void QMenuBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QMenuBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMenuBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QMenuBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMenuBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMenuBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMenuBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMenuBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMenuBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMenuBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QMenuBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMenuBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QMenuBar_override_virtual_Metric(void* self, intptr_t slot); +int QMenuBar_virtualbase_Metric(const void* self, int param1); +void QMenuBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QMenuBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMenuBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMenuBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QMenuBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMenuBar_virtualbase_SharedPainter(const void* self); +void QMenuBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMenuBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMenuBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QMenuBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMenuBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMenuBar_Delete(QMenuBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmessageauthenticationcode.cpp b/qt/gen_qmessageauthenticationcode.cpp index b43e1a9c..b0918ca6 100644 --- a/qt/gen_qmessageauthenticationcode.cpp +++ b/qt/gen_qmessageauthenticationcode.cpp @@ -5,13 +5,15 @@ #include "gen_qmessageauthenticationcode.h" #include "_cgo_export.h" -QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method) { - return new QMessageAuthenticationCode(static_cast(method)); +void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { + QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method)); + *outptr_QMessageAuthenticationCode = ret; } -QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key) { +void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { QByteArray key_QByteArray(key.data, key.len); - return new QMessageAuthenticationCode(static_cast(method), key_QByteArray); + QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method), key_QByteArray); + *outptr_QMessageAuthenticationCode = ret; } void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self) { @@ -56,7 +58,11 @@ struct miqt_string QMessageAuthenticationCode_Hash(struct miqt_string message, s return _ms; } -void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self) { - delete self; +void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmessageauthenticationcode.go b/qt/gen_qmessageauthenticationcode.go index 023fa8f3..e17c20b1 100644 --- a/qt/gen_qmessageauthenticationcode.go +++ b/qt/gen_qmessageauthenticationcode.go @@ -14,7 +14,8 @@ import ( ) type QMessageAuthenticationCode struct { - h *C.QMessageAuthenticationCode + h *C.QMessageAuthenticationCode + isSubclass bool } func (this *QMessageAuthenticationCode) cPointer() *C.QMessageAuthenticationCode { @@ -31,6 +32,7 @@ func (this *QMessageAuthenticationCode) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMessageAuthenticationCode constructs the type using only CGO pointers. func newQMessageAuthenticationCode(h *C.QMessageAuthenticationCode) *QMessageAuthenticationCode { if h == nil { return nil @@ -38,14 +40,23 @@ func newQMessageAuthenticationCode(h *C.QMessageAuthenticationCode) *QMessageAut return &QMessageAuthenticationCode{h: h} } +// UnsafeNewQMessageAuthenticationCode constructs the type using only unsafe pointers. func UnsafeNewQMessageAuthenticationCode(h unsafe.Pointer) *QMessageAuthenticationCode { - return newQMessageAuthenticationCode((*C.QMessageAuthenticationCode)(h)) + if h == nil { + return nil + } + + return &QMessageAuthenticationCode{h: (*C.QMessageAuthenticationCode)(h)} } // NewQMessageAuthenticationCode constructs a new QMessageAuthenticationCode object. func NewQMessageAuthenticationCode(method QCryptographicHash__Algorithm) *QMessageAuthenticationCode { - ret := C.QMessageAuthenticationCode_new((C.int)(method)) - return newQMessageAuthenticationCode(ret) + var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil + + C.QMessageAuthenticationCode_new((C.int)(method), &outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret.isSubclass = true + return ret } // NewQMessageAuthenticationCode2 constructs a new QMessageAuthenticationCode object. @@ -53,8 +64,12 @@ func NewQMessageAuthenticationCode2(method QCryptographicHash__Algorithm, key [] key_alias := C.struct_miqt_string{} key_alias.data = (*C.char)(unsafe.Pointer(&key[0])) key_alias.len = C.size_t(len(key)) - ret := C.QMessageAuthenticationCode_new2((C.int)(method), key_alias) - return newQMessageAuthenticationCode(ret) + var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil + + C.QMessageAuthenticationCode_new2((C.int)(method), key_alias, &outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret.isSubclass = true + return ret } func (this *QMessageAuthenticationCode) Reset() { @@ -107,7 +122,7 @@ func QMessageAuthenticationCode_Hash(message []byte, key []byte, method QCryptog // Delete this object from C++ memory. func (this *QMessageAuthenticationCode) Delete() { - C.QMessageAuthenticationCode_Delete(this.h) + C.QMessageAuthenticationCode_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmessageauthenticationcode.h b/qt/gen_qmessageauthenticationcode.h index 932225f0..12bda40e 100644 --- a/qt/gen_qmessageauthenticationcode.h +++ b/qt/gen_qmessageauthenticationcode.h @@ -24,8 +24,8 @@ typedef struct QIODevice QIODevice; typedef struct QMessageAuthenticationCode QMessageAuthenticationCode; #endif -QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method); -QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key); +void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); +void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self); void QMessageAuthenticationCode_SetKey(QMessageAuthenticationCode* self, struct miqt_string key); void QMessageAuthenticationCode_AddData(QMessageAuthenticationCode* self, const char* data, int length); @@ -33,7 +33,7 @@ void QMessageAuthenticationCode_AddDataWithData(QMessageAuthenticationCode* self bool QMessageAuthenticationCode_AddDataWithDevice(QMessageAuthenticationCode* self, QIODevice* device); struct miqt_string QMessageAuthenticationCode_Result(const QMessageAuthenticationCode* self); struct miqt_string QMessageAuthenticationCode_Hash(struct miqt_string message, struct miqt_string key, int method); -void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self); +void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmessagebox.cpp b/qt/gen_qmessagebox.cpp index e8f408c9..1ac854a8 100644 --- a/qt/gen_qmessagebox.cpp +++ b/qt/gen_qmessagebox.cpp @@ -1,10 +1,20 @@ #include #include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include +#include +#include +#include #include #include #include @@ -13,54 +23,490 @@ #include "gen_qmessagebox.h" #include "_cgo_export.h" -QMessageBox* QMessageBox_new(QWidget* parent) { - return new QMessageBox(parent); +class MiqtVirtualQMessageBox : public virtual QMessageBox { +public: + + MiqtVirtualQMessageBox(QWidget* parent): QMessageBox(parent) {}; + MiqtVirtualQMessageBox(): QMessageBox() {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text): QMessageBox(icon, title, text) {}; + MiqtVirtualQMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2): QMessageBox(title, text, icon, button0, button1, button2) {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons): QMessageBox(icon, title, text, buttons) {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QWidget* parent): QMessageBox(icon, title, text, buttons, parent) {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QWidget* parent, Qt::WindowFlags flags): QMessageBox(icon, title, text, buttons, parent, flags) {}; + MiqtVirtualQMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent): QMessageBox(title, text, icon, button0, button1, button2, parent) {}; + MiqtVirtualQMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent, Qt::WindowFlags f): QMessageBox(title, text, icon, button0, button1, button2, parent, f) {}; + + virtual ~MiqtVirtualQMessageBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QMessageBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QMessageBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QMessageBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QMessageBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QMessageBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMessageBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMessageBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMessageBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMessageBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QMessageBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QMessageBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QMessageBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QMessageBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMessageBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMessageBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMessageBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMessageBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMessageBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMessageBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMessageBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMessageBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMessageBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QMessageBox::open(); + return; + } + + + miqt_exec_callback_QMessageBox_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QMessageBox::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QMessageBox::exec(); + } + + + int callback_return_value = miqt_exec_callback_QMessageBox_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QMessageBox::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QMessageBox::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QMessageBox_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QMessageBox::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QMessageBox::accept(); + return; + } + + + miqt_exec_callback_QMessageBox_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QMessageBox::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QMessageBox::reject(); + return; + } + + + miqt_exec_callback_QMessageBox_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QMessageBox::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QMessageBox::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QMessageBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QMessageBox::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QMessageBox::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QMessageBox_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QMessageBox::eventFilter(param1, param2); + + } + +}; + +void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(parent); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new2() { - return new QMessageBox(); +void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text) { +void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2) { +void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons) { +void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent) { +void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags) { +void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent) { +void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f) { +void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMessageBox_MetaObject(const QMessageBox* self) { @@ -414,7 +860,7 @@ void QMessageBox_ButtonClicked(QMessageBox* self, QAbstractButton* button) { } void QMessageBox_connect_ButtonClicked(QMessageBox* self, intptr_t slot) { - QMessageBox::connect(self, static_cast(&QMessageBox::buttonClicked), self, [=](QAbstractButton* button) { + MiqtVirtualQMessageBox::connect(self, static_cast(&QMessageBox::buttonClicked), self, [=](QAbstractButton* button) { QAbstractButton* sigval1 = button; miqt_exec_callback_QMessageBox_ButtonClicked(slot, sigval1); }); @@ -708,7 +1154,139 @@ int QMessageBox_Critical8(QWidget* parent, struct miqt_string title, struct miqt return QMessageBox::critical(parent, title_QString, text_QString, button0Text_QString, button1Text_QString, button2Text_QString, static_cast(defaultButtonNumber), static_cast(escapeButtonNumber)); } -void QMessageBox_Delete(QMessageBox* self) { - delete self; +void QMessageBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Event = slot; +} + +bool QMessageBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Event(e); +} + +void QMessageBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ResizeEvent = slot; +} + +void QMessageBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QMessageBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ShowEvent = slot; +} + +void QMessageBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QMessageBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__CloseEvent = slot; +} + +void QMessageBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QMessageBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QMessageBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QMessageBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ChangeEvent = slot; +} + +void QMessageBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QMessageBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__SetVisible = slot; +} + +void QMessageBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QMessageBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QMessageBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMessageBox*)(self) )->virtualbase_SizeHint(); +} + +void QMessageBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMessageBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMessageBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMessageBox_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Open = slot; +} + +void QMessageBox_virtualbase_Open(void* self) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Open(); +} + +void QMessageBox_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Exec = slot; +} + +int QMessageBox_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Exec(); +} + +void QMessageBox_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Done = slot; +} + +void QMessageBox_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Done(param1); +} + +void QMessageBox_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Accept = slot; +} + +void QMessageBox_virtualbase_Accept(void* self) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Accept(); +} + +void QMessageBox_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Reject = slot; +} + +void QMessageBox_virtualbase_Reject(void* self) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Reject(); +} + +void QMessageBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMessageBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QMessageBox_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__EventFilter = slot; +} + +bool QMessageBox_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QMessageBox_Delete(QMessageBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmessagebox.go b/qt/gen_qmessagebox.go index 8e5d4415..56dca00d 100644 --- a/qt/gen_qmessagebox.go +++ b/qt/gen_qmessagebox.go @@ -73,7 +73,8 @@ const ( ) type QMessageBox struct { - h *C.QMessageBox + h *C.QMessageBox + isSubclass bool *QDialog } @@ -91,27 +92,51 @@ func (this *QMessageBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMessageBox(h *C.QMessageBox) *QMessageBox { +// newQMessageBox constructs the type using only CGO pointers. +func newQMessageBox(h *C.QMessageBox, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMessageBox { if h == nil { return nil } - return &QMessageBox{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QMessageBox{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMessageBox(h unsafe.Pointer) *QMessageBox { - return newQMessageBox((*C.QMessageBox)(h)) +// UnsafeNewQMessageBox constructs the type using only unsafe pointers. +func UnsafeNewQMessageBox(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMessageBox { + if h == nil { + return nil + } + + return &QMessageBox{h: (*C.QMessageBox)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMessageBox constructs a new QMessageBox object. func NewQMessageBox(parent *QWidget) *QMessageBox { - ret := C.QMessageBox_new(parent.cPointer()) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new(parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox2 constructs a new QMessageBox object. func NewQMessageBox2() *QMessageBox { - ret := C.QMessageBox_new2() - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new2(&outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox3 constructs a new QMessageBox object. @@ -124,8 +149,16 @@ func NewQMessageBox3(icon QMessageBox__Icon, title string, text string) *QMessag text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new3((C.int)(icon), title_ms, text_ms) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new3((C.int)(icon), title_ms, text_ms, &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox4 constructs a new QMessageBox object. @@ -138,8 +171,16 @@ func NewQMessageBox4(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox5 constructs a new QMessageBox object. @@ -152,8 +193,16 @@ func NewQMessageBox5(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox6 constructs a new QMessageBox object. @@ -166,8 +215,16 @@ func NewQMessageBox6(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer()) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox7 constructs a new QMessageBox object. @@ -180,8 +237,16 @@ func NewQMessageBox7(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox8 constructs a new QMessageBox object. @@ -194,8 +259,16 @@ func NewQMessageBox8(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer()) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox9 constructs a new QMessageBox object. @@ -208,8 +281,16 @@ func NewQMessageBox9(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMessageBox) MetaObject() *QMetaObject { @@ -249,11 +330,11 @@ func (this *QMessageBox) AddButton2(text string, role QMessageBox__ButtonRole) * text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role))), nil, nil, nil, nil) } func (this *QMessageBox) AddButtonWithButton(button QMessageBox__StandardButton) *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button))), nil, nil, nil, nil) } func (this *QMessageBox) RemoveButton(button *QAbstractButton) { @@ -265,7 +346,7 @@ func (this *QMessageBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } @@ -287,11 +368,11 @@ func (this *QMessageBox) StandardButton(button *QAbstractButton) QMessageBox__St } func (this *QMessageBox) Button(which QMessageBox__StandardButton) *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_Button(this.h, (C.int)(which)))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_Button(this.h, (C.int)(which))), nil, nil, nil) } func (this *QMessageBox) DefaultButton() *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_DefaultButton(this.h))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_DefaultButton(this.h)), nil, nil, nil, nil) } func (this *QMessageBox) SetDefaultButton(button *QPushButton) { @@ -303,7 +384,7 @@ func (this *QMessageBox) SetDefaultButtonWithButton(button QMessageBox__Standard } func (this *QMessageBox) EscapeButton() *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_EscapeButton(this.h))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_EscapeButton(this.h)), nil, nil, nil) } func (this *QMessageBox) SetEscapeButton(button *QAbstractButton) { @@ -315,7 +396,7 @@ func (this *QMessageBox) SetEscapeButtonWithButton(button QMessageBox__StandardB } func (this *QMessageBox) ClickedButton() *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_ClickedButton(this.h))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_ClickedButton(this.h)), nil, nil, nil) } func (this *QMessageBox) Text() string { @@ -343,7 +424,7 @@ func (this *QMessageBox) SetIcon(icon QMessageBox__Icon) { func (this *QMessageBox) IconPixmap() *QPixmap { _ret := C.QMessageBox_IconPixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -373,7 +454,7 @@ func (this *QMessageBox) SetCheckBox(cb *QCheckBox) { } func (this *QMessageBox) CheckBox() *QCheckBox { - return UnsafeNewQCheckBox(unsafe.Pointer(C.QMessageBox_CheckBox(this.h))) + return UnsafeNewQCheckBox(unsafe.Pointer(C.QMessageBox_CheckBox(this.h)), nil, nil, nil, nil) } func QMessageBox_Information(parent *QWidget, title string, text string) QMessageBox__StandardButton { @@ -659,7 +740,7 @@ func (this *QMessageBox) SetWindowModality(windowModality WindowModality) { func QMessageBox_StandardIcon(icon QMessageBox__Icon) *QPixmap { _ret := C.QMessageBox_StandardIcon((C.int)(icon)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -679,7 +760,7 @@ func miqt_exec_callback_QMessageBox_ButtonClicked(cb C.intptr_t, button *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button), nil, nil, nil) gofunc(slotval1) } @@ -1284,9 +1365,376 @@ func QMessageBox_Critical8(parent *QWidget, title string, text string, button0Te return (int)(C.QMessageBox_Critical8(parent.cPointer(), title_ms, text_ms, button0Text_ms, button1Text_ms, button2Text_ms, (C.int)(defaultButtonNumber), (C.int)(escapeButtonNumber))) } +func (this *QMessageBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QMessageBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QMessageBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QMessageBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Event +func miqt_exec_callback_QMessageBox_Event(self *C.QMessageBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMessageBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QMessageBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QMessageBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ResizeEvent +func miqt_exec_callback_QMessageBox_ResizeEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMessageBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMessageBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ShowEvent +func miqt_exec_callback_QMessageBox_ShowEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMessageBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMessageBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_CloseEvent +func miqt_exec_callback_QMessageBox_CloseEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QMessageBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMessageBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_KeyPressEvent +func miqt_exec_callback_QMessageBox_KeyPressEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QMessageBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMessageBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ChangeEvent +func miqt_exec_callback_QMessageBox_ChangeEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_SetVisible(visible bool) { + + C.QMessageBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMessageBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMessageBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_SetVisible +func miqt_exec_callback_QMessageBox_SetVisible(self *C.QMessageBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMessageBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMessageBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMessageBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMessageBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_SizeHint +func miqt_exec_callback_QMessageBox_SizeHint(self *C.QMessageBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMessageBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMessageBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMessageBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMessageBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_MinimumSizeHint +func miqt_exec_callback_QMessageBox_MinimumSizeHint(self *C.QMessageBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMessageBox) callVirtualBase_Open() { + + C.QMessageBox_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QMessageBox) OnOpen(slot func(super func())) { + C.QMessageBox_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Open +func miqt_exec_callback_QMessageBox_Open(self *C.QMessageBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QMessageBox{h: self}).callVirtualBase_Open) + +} + +func (this *QMessageBox) callVirtualBase_Exec() int { + + return (int)(C.QMessageBox_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QMessageBox) OnExec(slot func(super func() int) int) { + C.QMessageBox_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Exec +func miqt_exec_callback_QMessageBox_Exec(self *C.QMessageBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QMessageBox) callVirtualBase_Done(param1 int) { + + C.QMessageBox_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QMessageBox) OnDone(slot func(super func(param1 int), param1 int)) { + C.QMessageBox_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Done +func miqt_exec_callback_QMessageBox_Done(self *C.QMessageBox, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QMessageBox{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_Accept() { + + C.QMessageBox_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QMessageBox) OnAccept(slot func(super func())) { + C.QMessageBox_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Accept +func miqt_exec_callback_QMessageBox_Accept(self *C.QMessageBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QMessageBox{h: self}).callVirtualBase_Accept) + +} + +func (this *QMessageBox) callVirtualBase_Reject() { + + C.QMessageBox_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QMessageBox) OnReject(slot func(super func())) { + C.QMessageBox_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Reject +func miqt_exec_callback_QMessageBox_Reject(self *C.QMessageBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QMessageBox{h: self}).callVirtualBase_Reject) + +} + +func (this *QMessageBox) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QMessageBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMessageBox) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QMessageBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ContextMenuEvent +func miqt_exec_callback_QMessageBox_ContextMenuEvent(self *C.QMessageBox, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QMessageBox_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QMessageBox) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QMessageBox_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_EventFilter +func miqt_exec_callback_QMessageBox_EventFilter(self *C.QMessageBox, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMessageBox) Delete() { - C.QMessageBox_Delete(this.h) + C.QMessageBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmessagebox.h b/qt/gen_qmessagebox.h index 4b73c67c..4b34ac99 100644 --- a/qt/gen_qmessagebox.h +++ b/qt/gen_qmessagebox.h @@ -17,30 +17,50 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QCheckBox; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMessageBox; class QMetaObject; +class QObject; +class QPaintDevice; class QPixmap; class QPushButton; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else typedef struct QAbstractButton QAbstractButton; typedef struct QCheckBox QCheckBox; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMessageBox QMessageBox; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPixmap QPixmap; typedef struct QPushButton QPushButton; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QMessageBox* QMessageBox_new(QWidget* parent); -QMessageBox* QMessageBox_new2(); -QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text); -QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2); -QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons); -QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent); -QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags); -QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent); -QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f); +void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMessageBox_MetaObject(const QMessageBox* self); void* QMessageBox_Metacast(QMessageBox* self, const char* param1); struct miqt_string QMessageBox_Tr(const char* s); @@ -103,6 +123,12 @@ void QMessageBox_SetWindowModality(QMessageBox* self, int windowModality); QPixmap* QMessageBox_StandardIcon(int icon); void QMessageBox_ButtonClicked(QMessageBox* self, QAbstractButton* button); void QMessageBox_connect_ButtonClicked(QMessageBox* self, intptr_t slot); +bool QMessageBox_Event(QMessageBox* self, QEvent* e); +void QMessageBox_ResizeEvent(QMessageBox* self, QResizeEvent* event); +void QMessageBox_ShowEvent(QMessageBox* self, QShowEvent* event); +void QMessageBox_CloseEvent(QMessageBox* self, QCloseEvent* event); +void QMessageBox_KeyPressEvent(QMessageBox* self, QKeyEvent* event); +void QMessageBox_ChangeEvent(QMessageBox* self, QEvent* event); struct miqt_string QMessageBox_Tr2(const char* s, const char* c); struct miqt_string QMessageBox_Tr3(const char* s, const char* c, int n); struct miqt_string QMessageBox_TrUtf82(const char* s, const char* c); @@ -139,7 +165,39 @@ int QMessageBox_Critical52(QWidget* parent, struct miqt_string title, struct miq int QMessageBox_Critical62(QWidget* parent, struct miqt_string title, struct miqt_string text, struct miqt_string button0Text, struct miqt_string button1Text, struct miqt_string button2Text); int QMessageBox_Critical7(QWidget* parent, struct miqt_string title, struct miqt_string text, struct miqt_string button0Text, struct miqt_string button1Text, struct miqt_string button2Text, int defaultButtonNumber); int QMessageBox_Critical8(QWidget* parent, struct miqt_string title, struct miqt_string text, struct miqt_string button0Text, struct miqt_string button1Text, struct miqt_string button2Text, int defaultButtonNumber, int escapeButtonNumber); -void QMessageBox_Delete(QMessageBox* self); +void QMessageBox_override_virtual_Event(void* self, intptr_t slot); +bool QMessageBox_virtualbase_Event(void* self, QEvent* e); +void QMessageBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QMessageBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMessageBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMessageBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QMessageBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QMessageBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QMessageBox_virtualbase_SetVisible(void* self, bool visible); +void QMessageBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMessageBox_virtualbase_SizeHint(const void* self); +void QMessageBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMessageBox_virtualbase_MinimumSizeHint(const void* self); +void QMessageBox_override_virtual_Open(void* self, intptr_t slot); +void QMessageBox_virtualbase_Open(void* self); +void QMessageBox_override_virtual_Exec(void* self, intptr_t slot); +int QMessageBox_virtualbase_Exec(void* self); +void QMessageBox_override_virtual_Done(void* self, intptr_t slot); +void QMessageBox_virtualbase_Done(void* self, int param1); +void QMessageBox_override_virtual_Accept(void* self, intptr_t slot); +void QMessageBox_virtualbase_Accept(void* self); +void QMessageBox_override_virtual_Reject(void* self, intptr_t slot); +void QMessageBox_virtualbase_Reject(void* self); +void QMessageBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QMessageBox_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMessageBox_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QMessageBox_Delete(QMessageBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmetaobject.cpp b/qt/gen_qmetaobject.cpp index b8fe2a5f..edadc92f 100644 --- a/qt/gen_qmetaobject.cpp +++ b/qt/gen_qmetaobject.cpp @@ -13,12 +13,14 @@ #include "gen_qmetaobject.h" #include "_cgo_export.h" -QMetaMethod* QMetaMethod_new() { - return new QMetaMethod(); +void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod) { + QMetaMethod* ret = new QMetaMethod(); + *outptr_QMetaMethod = ret; } -QMetaMethod* QMetaMethod_new2(QMetaMethod* param1) { - return new QMetaMethod(*param1); +void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod) { + QMetaMethod* ret = new QMetaMethod(*param1); + *outptr_QMetaMethod = ret; } struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self) { @@ -393,16 +395,22 @@ bool QMetaMethod_InvokeOnGadget112(const QMetaMethod* self, void* gadget, QGener return self->invokeOnGadget(gadget, *val0, *val1, *val2, *val3, *val4, *val5, *val6, *val7, *val8, *val9); } -void QMetaMethod_Delete(QMetaMethod* self) { - delete self; +void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaEnum* QMetaEnum_new() { - return new QMetaEnum(); +void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum) { + QMetaEnum* ret = new QMetaEnum(); + *outptr_QMetaEnum = ret; } -QMetaEnum* QMetaEnum_new2(QMetaEnum* param1) { - return new QMetaEnum(*param1); +void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum) { + QMetaEnum* ret = new QMetaEnum(*param1); + *outptr_QMetaEnum = ret; } const char* QMetaEnum_Name(const QMetaEnum* self) { @@ -474,12 +482,17 @@ int QMetaEnum_KeysToValue2(const QMetaEnum* self, const char* keys, bool* ok) { return self->keysToValue(keys, ok); } -void QMetaEnum_Delete(QMetaEnum* self) { - delete self; +void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaProperty* QMetaProperty_new() { - return new QMetaProperty(); +void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty) { + QMetaProperty* ret = new QMetaProperty(); + *outptr_QMetaProperty = ret; } const char* QMetaProperty_Name(const QMetaProperty* self) { @@ -635,12 +648,17 @@ bool QMetaProperty_IsUser1(const QMetaProperty* self, QObject* obj) { return self->isUser(obj); } -void QMetaProperty_Delete(QMetaProperty* self) { - delete self; +void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaClassInfo* QMetaClassInfo_new() { - return new QMetaClassInfo(); +void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo) { + QMetaClassInfo* ret = new QMetaClassInfo(); + *outptr_QMetaClassInfo = ret; } const char* QMetaClassInfo_Name(const QMetaClassInfo* self) { @@ -655,7 +673,11 @@ QMetaObject* QMetaClassInfo_EnclosingMetaObject(const QMetaClassInfo* self) { return (QMetaObject*) self->enclosingMetaObject(); } -void QMetaClassInfo_Delete(QMetaClassInfo* self) { - delete self; +void QMetaClassInfo_Delete(QMetaClassInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmetaobject.go b/qt/gen_qmetaobject.go index a32c6973..3635e344 100644 --- a/qt/gen_qmetaobject.go +++ b/qt/gen_qmetaobject.go @@ -39,7 +39,8 @@ const ( ) type QMetaMethod struct { - h *C.QMetaMethod + h *C.QMetaMethod + isSubclass bool } func (this *QMetaMethod) cPointer() *C.QMetaMethod { @@ -56,6 +57,7 @@ func (this *QMetaMethod) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaMethod constructs the type using only CGO pointers. func newQMetaMethod(h *C.QMetaMethod) *QMetaMethod { if h == nil { return nil @@ -63,20 +65,33 @@ func newQMetaMethod(h *C.QMetaMethod) *QMetaMethod { return &QMetaMethod{h: h} } +// UnsafeNewQMetaMethod constructs the type using only unsafe pointers. func UnsafeNewQMetaMethod(h unsafe.Pointer) *QMetaMethod { - return newQMetaMethod((*C.QMetaMethod)(h)) + if h == nil { + return nil + } + + return &QMetaMethod{h: (*C.QMetaMethod)(h)} } // NewQMetaMethod constructs a new QMetaMethod object. func NewQMetaMethod() *QMetaMethod { - ret := C.QMetaMethod_new() - return newQMetaMethod(ret) + var outptr_QMetaMethod *C.QMetaMethod = nil + + C.QMetaMethod_new(&outptr_QMetaMethod) + ret := newQMetaMethod(outptr_QMetaMethod) + ret.isSubclass = true + return ret } // NewQMetaMethod2 constructs a new QMetaMethod object. func NewQMetaMethod2(param1 *QMetaMethod) *QMetaMethod { - ret := C.QMetaMethod_new2(param1.cPointer()) - return newQMetaMethod(ret) + var outptr_QMetaMethod *C.QMetaMethod = nil + + C.QMetaMethod_new2(param1.cPointer(), &outptr_QMetaMethod) + ret := newQMetaMethod(outptr_QMetaMethod) + ret.isSubclass = true + return ret } func (this *QMetaMethod) MethodSignature() []byte { @@ -439,7 +454,7 @@ func (this *QMetaMethod) InvokeOnGadget112(gadget unsafe.Pointer, val0 QGenericA // Delete this object from C++ memory. func (this *QMetaMethod) Delete() { - C.QMetaMethod_Delete(this.h) + C.QMetaMethod_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -452,7 +467,8 @@ func (this *QMetaMethod) GoGC() { } type QMetaEnum struct { - h *C.QMetaEnum + h *C.QMetaEnum + isSubclass bool } func (this *QMetaEnum) cPointer() *C.QMetaEnum { @@ -469,6 +485,7 @@ func (this *QMetaEnum) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaEnum constructs the type using only CGO pointers. func newQMetaEnum(h *C.QMetaEnum) *QMetaEnum { if h == nil { return nil @@ -476,20 +493,33 @@ func newQMetaEnum(h *C.QMetaEnum) *QMetaEnum { return &QMetaEnum{h: h} } +// UnsafeNewQMetaEnum constructs the type using only unsafe pointers. func UnsafeNewQMetaEnum(h unsafe.Pointer) *QMetaEnum { - return newQMetaEnum((*C.QMetaEnum)(h)) + if h == nil { + return nil + } + + return &QMetaEnum{h: (*C.QMetaEnum)(h)} } // NewQMetaEnum constructs a new QMetaEnum object. func NewQMetaEnum() *QMetaEnum { - ret := C.QMetaEnum_new() - return newQMetaEnum(ret) + var outptr_QMetaEnum *C.QMetaEnum = nil + + C.QMetaEnum_new(&outptr_QMetaEnum) + ret := newQMetaEnum(outptr_QMetaEnum) + ret.isSubclass = true + return ret } // NewQMetaEnum2 constructs a new QMetaEnum object. func NewQMetaEnum2(param1 *QMetaEnum) *QMetaEnum { - ret := C.QMetaEnum_new2(param1.cPointer()) - return newQMetaEnum(ret) + var outptr_QMetaEnum *C.QMetaEnum = nil + + C.QMetaEnum_new2(param1.cPointer(), &outptr_QMetaEnum) + ret := newQMetaEnum(outptr_QMetaEnum) + ret.isSubclass = true + return ret } func (this *QMetaEnum) Name() string { @@ -574,7 +604,7 @@ func (this *QMetaEnum) KeysToValue2(keys string, ok *bool) int { // Delete this object from C++ memory. func (this *QMetaEnum) Delete() { - C.QMetaEnum_Delete(this.h) + C.QMetaEnum_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -587,7 +617,8 @@ func (this *QMetaEnum) GoGC() { } type QMetaProperty struct { - h *C.QMetaProperty + h *C.QMetaProperty + isSubclass bool } func (this *QMetaProperty) cPointer() *C.QMetaProperty { @@ -604,6 +635,7 @@ func (this *QMetaProperty) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaProperty constructs the type using only CGO pointers. func newQMetaProperty(h *C.QMetaProperty) *QMetaProperty { if h == nil { return nil @@ -611,14 +643,23 @@ func newQMetaProperty(h *C.QMetaProperty) *QMetaProperty { return &QMetaProperty{h: h} } +// UnsafeNewQMetaProperty constructs the type using only unsafe pointers. func UnsafeNewQMetaProperty(h unsafe.Pointer) *QMetaProperty { - return newQMetaProperty((*C.QMetaProperty)(h)) + if h == nil { + return nil + } + + return &QMetaProperty{h: (*C.QMetaProperty)(h)} } // NewQMetaProperty constructs a new QMetaProperty object. func NewQMetaProperty() *QMetaProperty { - ret := C.QMetaProperty_new() - return newQMetaProperty(ret) + var outptr_QMetaProperty *C.QMetaProperty = nil + + C.QMetaProperty_new(&outptr_QMetaProperty) + ret := newQMetaProperty(outptr_QMetaProperty) + ret.isSubclass = true + return ret } func (this *QMetaProperty) Name() string { @@ -789,7 +830,7 @@ func (this *QMetaProperty) IsUser1(obj *QObject) bool { // Delete this object from C++ memory. func (this *QMetaProperty) Delete() { - C.QMetaProperty_Delete(this.h) + C.QMetaProperty_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -802,7 +843,8 @@ func (this *QMetaProperty) GoGC() { } type QMetaClassInfo struct { - h *C.QMetaClassInfo + h *C.QMetaClassInfo + isSubclass bool } func (this *QMetaClassInfo) cPointer() *C.QMetaClassInfo { @@ -819,6 +861,7 @@ func (this *QMetaClassInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaClassInfo constructs the type using only CGO pointers. func newQMetaClassInfo(h *C.QMetaClassInfo) *QMetaClassInfo { if h == nil { return nil @@ -826,14 +869,23 @@ func newQMetaClassInfo(h *C.QMetaClassInfo) *QMetaClassInfo { return &QMetaClassInfo{h: h} } +// UnsafeNewQMetaClassInfo constructs the type using only unsafe pointers. func UnsafeNewQMetaClassInfo(h unsafe.Pointer) *QMetaClassInfo { - return newQMetaClassInfo((*C.QMetaClassInfo)(h)) + if h == nil { + return nil + } + + return &QMetaClassInfo{h: (*C.QMetaClassInfo)(h)} } // NewQMetaClassInfo constructs a new QMetaClassInfo object. func NewQMetaClassInfo() *QMetaClassInfo { - ret := C.QMetaClassInfo_new() - return newQMetaClassInfo(ret) + var outptr_QMetaClassInfo *C.QMetaClassInfo = nil + + C.QMetaClassInfo_new(&outptr_QMetaClassInfo) + ret := newQMetaClassInfo(outptr_QMetaClassInfo) + ret.isSubclass = true + return ret } func (this *QMetaClassInfo) Name() string { @@ -852,7 +904,7 @@ func (this *QMetaClassInfo) EnclosingMetaObject() *QMetaObject { // Delete this object from C++ memory. func (this *QMetaClassInfo) Delete() { - C.QMetaClassInfo_Delete(this.h) + C.QMetaClassInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmetaobject.h b/qt/gen_qmetaobject.h index df778b04..10cc44fa 100644 --- a/qt/gen_qmetaobject.h +++ b/qt/gen_qmetaobject.h @@ -38,8 +38,8 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif -QMetaMethod* QMetaMethod_new(); -QMetaMethod* QMetaMethod_new2(QMetaMethod* param1); +void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod); +void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod); struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self); struct miqt_string QMetaMethod_Name(const QMetaMethod* self); const char* QMetaMethod_TypeName(const QMetaMethod* self); @@ -123,10 +123,10 @@ bool QMetaMethod_InvokeOnGadget82(const QMetaMethod* self, void* gadget, QGeneri bool QMetaMethod_InvokeOnGadget92(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7); bool QMetaMethod_InvokeOnGadget102(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8); bool QMetaMethod_InvokeOnGadget112(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); -void QMetaMethod_Delete(QMetaMethod* self); +void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass); -QMetaEnum* QMetaEnum_new(); -QMetaEnum* QMetaEnum_new2(QMetaEnum* param1); +void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum); +void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum); const char* QMetaEnum_Name(const QMetaEnum* self); const char* QMetaEnum_EnumName(const QMetaEnum* self); bool QMetaEnum_IsFlag(const QMetaEnum* self); @@ -143,9 +143,9 @@ QMetaObject* QMetaEnum_EnclosingMetaObject(const QMetaEnum* self); bool QMetaEnum_IsValid(const QMetaEnum* self); int QMetaEnum_KeyToValue2(const QMetaEnum* self, const char* key, bool* ok); int QMetaEnum_KeysToValue2(const QMetaEnum* self, const char* keys, bool* ok); -void QMetaEnum_Delete(QMetaEnum* self); +void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass); -QMetaProperty* QMetaProperty_new(); +void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty); const char* QMetaProperty_Name(const QMetaProperty* self); const char* QMetaProperty_TypeName(const QMetaProperty* self); int QMetaProperty_Type(const QMetaProperty* self); @@ -184,13 +184,13 @@ bool QMetaProperty_IsScriptable1(const QMetaProperty* self, QObject* obj); bool QMetaProperty_IsStored1(const QMetaProperty* self, QObject* obj); bool QMetaProperty_IsEditable1(const QMetaProperty* self, QObject* obj); bool QMetaProperty_IsUser1(const QMetaProperty* self, QObject* obj); -void QMetaProperty_Delete(QMetaProperty* self); +void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass); -QMetaClassInfo* QMetaClassInfo_new(); +void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo); const char* QMetaClassInfo_Name(const QMetaClassInfo* self); const char* QMetaClassInfo_Value(const QMetaClassInfo* self); QMetaObject* QMetaClassInfo_EnclosingMetaObject(const QMetaClassInfo* self); -void QMetaClassInfo_Delete(QMetaClassInfo* self); +void QMetaClassInfo_Delete(QMetaClassInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmetatype.cpp b/qt/gen_qmetatype.cpp index aa787d2e..40de91f0 100644 --- a/qt/gen_qmetatype.cpp +++ b/qt/gen_qmetatype.cpp @@ -15,36 +15,53 @@ #include "gen_qmetatype.h" #include "_cgo_export.h" -QtPrivate__AbstractDebugStreamFunction* QtPrivate__AbstractDebugStreamFunction_new() { - return new QtPrivate::AbstractDebugStreamFunction(); +void QtPrivate__AbstractDebugStreamFunction_new(QtPrivate__AbstractDebugStreamFunction** outptr_QtPrivate__AbstractDebugStreamFunction) { + QtPrivate::AbstractDebugStreamFunction* ret = new QtPrivate::AbstractDebugStreamFunction(); + *outptr_QtPrivate__AbstractDebugStreamFunction = ret; } -void QtPrivate__AbstractDebugStreamFunction_Delete(QtPrivate__AbstractDebugStreamFunction* self) { - delete self; +void QtPrivate__AbstractDebugStreamFunction_Delete(QtPrivate__AbstractDebugStreamFunction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__AbstractComparatorFunction* QtPrivate__AbstractComparatorFunction_new() { - return new QtPrivate::AbstractComparatorFunction(); +void QtPrivate__AbstractComparatorFunction_new(QtPrivate__AbstractComparatorFunction** outptr_QtPrivate__AbstractComparatorFunction) { + QtPrivate::AbstractComparatorFunction* ret = new QtPrivate::AbstractComparatorFunction(); + *outptr_QtPrivate__AbstractComparatorFunction = ret; } -void QtPrivate__AbstractComparatorFunction_Delete(QtPrivate__AbstractComparatorFunction* self) { - delete self; +void QtPrivate__AbstractComparatorFunction_Delete(QtPrivate__AbstractComparatorFunction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__AbstractConverterFunction* QtPrivate__AbstractConverterFunction_new() { - return new QtPrivate::AbstractConverterFunction(); +void QtPrivate__AbstractConverterFunction_new(QtPrivate__AbstractConverterFunction** outptr_QtPrivate__AbstractConverterFunction) { + QtPrivate::AbstractConverterFunction* ret = new QtPrivate::AbstractConverterFunction(); + *outptr_QtPrivate__AbstractConverterFunction = ret; } -void QtPrivate__AbstractConverterFunction_Delete(QtPrivate__AbstractConverterFunction* self) { - delete self; +void QtPrivate__AbstractConverterFunction_Delete(QtPrivate__AbstractConverterFunction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaType* QMetaType_new() { - return new QMetaType(); +void QMetaType_new(QMetaType** outptr_QMetaType) { + QMetaType* ret = new QMetaType(); + *outptr_QMetaType = ret; } -QMetaType* QMetaType_new2(const int typeVal) { - return new QMetaType(static_cast(typeVal)); +void QMetaType_new2(const int typeVal, QMetaType** outptr_QMetaType) { + QMetaType* ret = new QMetaType(static_cast(typeVal)); + *outptr_QMetaType = ret; } bool QMetaType_UnregisterType(int typeVal) { @@ -204,32 +221,48 @@ void* QMetaType_Construct2(const QMetaType* self, void* where, const void* copyV return self->construct(where, copyVal); } -void QMetaType_Delete(QMetaType* self) { - delete self; +void QMetaType_Delete(QMetaType* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__VariantData_new(const int metaTypeId_, const void* data_, const unsigned int flags_) { - return new QtMetaTypePrivate::VariantData(static_cast(metaTypeId_), data_, static_cast(flags_)); +void QtMetaTypePrivate__VariantData_new(const int metaTypeId_, const void* data_, const unsigned int flags_, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData) { + QtMetaTypePrivate::VariantData* ret = new QtMetaTypePrivate::VariantData(static_cast(metaTypeId_), data_, static_cast(flags_)); + *outptr_QtMetaTypePrivate__VariantData = ret; } -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__VariantData_new2(QtMetaTypePrivate__VariantData* other) { - return new QtMetaTypePrivate::VariantData(*other); +void QtMetaTypePrivate__VariantData_new2(QtMetaTypePrivate__VariantData* other, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData) { + QtMetaTypePrivate::VariantData* ret = new QtMetaTypePrivate::VariantData(*other); + *outptr_QtMetaTypePrivate__VariantData = ret; } -void QtMetaTypePrivate__VariantData_Delete(QtMetaTypePrivate__VariantData* self) { - delete self; +void QtMetaTypePrivate__VariantData_Delete(QtMetaTypePrivate__VariantData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtMetaTypePrivate__VectorBoolElements_Delete(QtMetaTypePrivate__VectorBoolElements* self) { - delete self; +void QtMetaTypePrivate__VectorBoolElements_Delete(QtMetaTypePrivate__VectorBoolElements* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaTypePrivate__QSequentialIterableImpl* QtMetaTypePrivate__QSequentialIterableImpl_new() { - return new QtMetaTypePrivate::QSequentialIterableImpl(); +void QtMetaTypePrivate__QSequentialIterableImpl_new(QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl) { + QtMetaTypePrivate::QSequentialIterableImpl* ret = new QtMetaTypePrivate::QSequentialIterableImpl(); + *outptr_QtMetaTypePrivate__QSequentialIterableImpl = ret; } -QtMetaTypePrivate__QSequentialIterableImpl* QtMetaTypePrivate__QSequentialIterableImpl_new2(QtMetaTypePrivate__QSequentialIterableImpl* param1) { - return new QtMetaTypePrivate::QSequentialIterableImpl(*param1); +void QtMetaTypePrivate__QSequentialIterableImpl_new2(QtMetaTypePrivate__QSequentialIterableImpl* param1, QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl) { + QtMetaTypePrivate::QSequentialIterableImpl* ret = new QtMetaTypePrivate::QSequentialIterableImpl(*param1); + *outptr_QtMetaTypePrivate__QSequentialIterableImpl = ret; } int QtMetaTypePrivate__QSequentialIterableImpl_IteratorCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self) { @@ -293,16 +326,22 @@ void QtMetaTypePrivate__QSequentialIterableImpl_OperatorAssign(QtMetaTypePrivate self->operator=(*param1); } -void QtMetaTypePrivate__QSequentialIterableImpl_Delete(QtMetaTypePrivate__QSequentialIterableImpl* self) { - delete self; +void QtMetaTypePrivate__QSequentialIterableImpl_Delete(QtMetaTypePrivate__QSequentialIterableImpl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaTypePrivate__QAssociativeIterableImpl* QtMetaTypePrivate__QAssociativeIterableImpl_new() { - return new QtMetaTypePrivate::QAssociativeIterableImpl(); +void QtMetaTypePrivate__QAssociativeIterableImpl_new(QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl) { + QtMetaTypePrivate::QAssociativeIterableImpl* ret = new QtMetaTypePrivate::QAssociativeIterableImpl(); + *outptr_QtMetaTypePrivate__QAssociativeIterableImpl = ret; } -QtMetaTypePrivate__QAssociativeIterableImpl* QtMetaTypePrivate__QAssociativeIterableImpl_new2(QtMetaTypePrivate__QAssociativeIterableImpl* param1) { - return new QtMetaTypePrivate::QAssociativeIterableImpl(*param1); +void QtMetaTypePrivate__QAssociativeIterableImpl_new2(QtMetaTypePrivate__QAssociativeIterableImpl* param1, QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl) { + QtMetaTypePrivate::QAssociativeIterableImpl* ret = new QtMetaTypePrivate::QAssociativeIterableImpl(*param1); + *outptr_QtMetaTypePrivate__QAssociativeIterableImpl = ret; } void QtMetaTypePrivate__QAssociativeIterableImpl_Begin(QtMetaTypePrivate__QAssociativeIterableImpl* self) { @@ -351,16 +390,22 @@ void QtMetaTypePrivate__QAssociativeIterableImpl_OperatorAssign(QtMetaTypePrivat self->operator=(*param1); } -void QtMetaTypePrivate__QAssociativeIterableImpl_Delete(QtMetaTypePrivate__QAssociativeIterableImpl* self) { - delete self; +void QtMetaTypePrivate__QAssociativeIterableImpl_Delete(QtMetaTypePrivate__QAssociativeIterableImpl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new() { - return new QtMetaTypePrivate::QPairVariantInterfaceImpl(); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { + QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(); + *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; } -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1) { - return new QtMetaTypePrivate::QPairVariantInterfaceImpl(*param1); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { + QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(*param1); + *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; } QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self) { @@ -371,7 +416,11 @@ QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_Sec return new QtMetaTypePrivate::VariantData(self->second()); } -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self) { - delete self; +void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmetatype.go b/qt/gen_qmetatype.go index 1e328a94..df2180b5 100644 --- a/qt/gen_qmetatype.go +++ b/qt/gen_qmetatype.go @@ -148,7 +148,8 @@ const ( ) type QtPrivate__AbstractDebugStreamFunction struct { - h *C.QtPrivate__AbstractDebugStreamFunction + h *C.QtPrivate__AbstractDebugStreamFunction + isSubclass bool } func (this *QtPrivate__AbstractDebugStreamFunction) cPointer() *C.QtPrivate__AbstractDebugStreamFunction { @@ -165,6 +166,7 @@ func (this *QtPrivate__AbstractDebugStreamFunction) UnsafePointer() unsafe.Point return unsafe.Pointer(this.h) } +// newQtPrivate__AbstractDebugStreamFunction constructs the type using only CGO pointers. func newQtPrivate__AbstractDebugStreamFunction(h *C.QtPrivate__AbstractDebugStreamFunction) *QtPrivate__AbstractDebugStreamFunction { if h == nil { return nil @@ -172,19 +174,28 @@ func newQtPrivate__AbstractDebugStreamFunction(h *C.QtPrivate__AbstractDebugStre return &QtPrivate__AbstractDebugStreamFunction{h: h} } +// UnsafeNewQtPrivate__AbstractDebugStreamFunction constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__AbstractDebugStreamFunction(h unsafe.Pointer) *QtPrivate__AbstractDebugStreamFunction { - return newQtPrivate__AbstractDebugStreamFunction((*C.QtPrivate__AbstractDebugStreamFunction)(h)) + if h == nil { + return nil + } + + return &QtPrivate__AbstractDebugStreamFunction{h: (*C.QtPrivate__AbstractDebugStreamFunction)(h)} } // NewQtPrivate__AbstractDebugStreamFunction constructs a new QtPrivate::AbstractDebugStreamFunction object. func NewQtPrivate__AbstractDebugStreamFunction() *QtPrivate__AbstractDebugStreamFunction { - ret := C.QtPrivate__AbstractDebugStreamFunction_new() - return newQtPrivate__AbstractDebugStreamFunction(ret) + var outptr_QtPrivate__AbstractDebugStreamFunction *C.QtPrivate__AbstractDebugStreamFunction = nil + + C.QtPrivate__AbstractDebugStreamFunction_new(&outptr_QtPrivate__AbstractDebugStreamFunction) + ret := newQtPrivate__AbstractDebugStreamFunction(outptr_QtPrivate__AbstractDebugStreamFunction) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__AbstractDebugStreamFunction) Delete() { - C.QtPrivate__AbstractDebugStreamFunction_Delete(this.h) + C.QtPrivate__AbstractDebugStreamFunction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -197,7 +208,8 @@ func (this *QtPrivate__AbstractDebugStreamFunction) GoGC() { } type QtPrivate__AbstractComparatorFunction struct { - h *C.QtPrivate__AbstractComparatorFunction + h *C.QtPrivate__AbstractComparatorFunction + isSubclass bool } func (this *QtPrivate__AbstractComparatorFunction) cPointer() *C.QtPrivate__AbstractComparatorFunction { @@ -214,6 +226,7 @@ func (this *QtPrivate__AbstractComparatorFunction) UnsafePointer() unsafe.Pointe return unsafe.Pointer(this.h) } +// newQtPrivate__AbstractComparatorFunction constructs the type using only CGO pointers. func newQtPrivate__AbstractComparatorFunction(h *C.QtPrivate__AbstractComparatorFunction) *QtPrivate__AbstractComparatorFunction { if h == nil { return nil @@ -221,19 +234,28 @@ func newQtPrivate__AbstractComparatorFunction(h *C.QtPrivate__AbstractComparator return &QtPrivate__AbstractComparatorFunction{h: h} } +// UnsafeNewQtPrivate__AbstractComparatorFunction constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__AbstractComparatorFunction(h unsafe.Pointer) *QtPrivate__AbstractComparatorFunction { - return newQtPrivate__AbstractComparatorFunction((*C.QtPrivate__AbstractComparatorFunction)(h)) + if h == nil { + return nil + } + + return &QtPrivate__AbstractComparatorFunction{h: (*C.QtPrivate__AbstractComparatorFunction)(h)} } // NewQtPrivate__AbstractComparatorFunction constructs a new QtPrivate::AbstractComparatorFunction object. func NewQtPrivate__AbstractComparatorFunction() *QtPrivate__AbstractComparatorFunction { - ret := C.QtPrivate__AbstractComparatorFunction_new() - return newQtPrivate__AbstractComparatorFunction(ret) + var outptr_QtPrivate__AbstractComparatorFunction *C.QtPrivate__AbstractComparatorFunction = nil + + C.QtPrivate__AbstractComparatorFunction_new(&outptr_QtPrivate__AbstractComparatorFunction) + ret := newQtPrivate__AbstractComparatorFunction(outptr_QtPrivate__AbstractComparatorFunction) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__AbstractComparatorFunction) Delete() { - C.QtPrivate__AbstractComparatorFunction_Delete(this.h) + C.QtPrivate__AbstractComparatorFunction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -246,7 +268,8 @@ func (this *QtPrivate__AbstractComparatorFunction) GoGC() { } type QtPrivate__AbstractConverterFunction struct { - h *C.QtPrivate__AbstractConverterFunction + h *C.QtPrivate__AbstractConverterFunction + isSubclass bool } func (this *QtPrivate__AbstractConverterFunction) cPointer() *C.QtPrivate__AbstractConverterFunction { @@ -263,6 +286,7 @@ func (this *QtPrivate__AbstractConverterFunction) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQtPrivate__AbstractConverterFunction constructs the type using only CGO pointers. func newQtPrivate__AbstractConverterFunction(h *C.QtPrivate__AbstractConverterFunction) *QtPrivate__AbstractConverterFunction { if h == nil { return nil @@ -270,19 +294,28 @@ func newQtPrivate__AbstractConverterFunction(h *C.QtPrivate__AbstractConverterFu return &QtPrivate__AbstractConverterFunction{h: h} } +// UnsafeNewQtPrivate__AbstractConverterFunction constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__AbstractConverterFunction(h unsafe.Pointer) *QtPrivate__AbstractConverterFunction { - return newQtPrivate__AbstractConverterFunction((*C.QtPrivate__AbstractConverterFunction)(h)) + if h == nil { + return nil + } + + return &QtPrivate__AbstractConverterFunction{h: (*C.QtPrivate__AbstractConverterFunction)(h)} } // NewQtPrivate__AbstractConverterFunction constructs a new QtPrivate::AbstractConverterFunction object. func NewQtPrivate__AbstractConverterFunction() *QtPrivate__AbstractConverterFunction { - ret := C.QtPrivate__AbstractConverterFunction_new() - return newQtPrivate__AbstractConverterFunction(ret) + var outptr_QtPrivate__AbstractConverterFunction *C.QtPrivate__AbstractConverterFunction = nil + + C.QtPrivate__AbstractConverterFunction_new(&outptr_QtPrivate__AbstractConverterFunction) + ret := newQtPrivate__AbstractConverterFunction(outptr_QtPrivate__AbstractConverterFunction) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__AbstractConverterFunction) Delete() { - C.QtPrivate__AbstractConverterFunction_Delete(this.h) + C.QtPrivate__AbstractConverterFunction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -295,7 +328,8 @@ func (this *QtPrivate__AbstractConverterFunction) GoGC() { } type QMetaType struct { - h *C.QMetaType + h *C.QMetaType + isSubclass bool } func (this *QMetaType) cPointer() *C.QMetaType { @@ -312,6 +346,7 @@ func (this *QMetaType) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaType constructs the type using only CGO pointers. func newQMetaType(h *C.QMetaType) *QMetaType { if h == nil { return nil @@ -319,20 +354,33 @@ func newQMetaType(h *C.QMetaType) *QMetaType { return &QMetaType{h: h} } +// UnsafeNewQMetaType constructs the type using only unsafe pointers. func UnsafeNewQMetaType(h unsafe.Pointer) *QMetaType { - return newQMetaType((*C.QMetaType)(h)) + if h == nil { + return nil + } + + return &QMetaType{h: (*C.QMetaType)(h)} } // NewQMetaType constructs a new QMetaType object. func NewQMetaType() *QMetaType { - ret := C.QMetaType_new() - return newQMetaType(ret) + var outptr_QMetaType *C.QMetaType = nil + + C.QMetaType_new(&outptr_QMetaType) + ret := newQMetaType(outptr_QMetaType) + ret.isSubclass = true + return ret } // NewQMetaType2 constructs a new QMetaType object. func NewQMetaType2(typeVal int) *QMetaType { - ret := C.QMetaType_new2((C.int)(typeVal)) - return newQMetaType(ret) + var outptr_QMetaType *C.QMetaType = nil + + C.QMetaType_new2((C.int)(typeVal), &outptr_QMetaType) + ret := newQMetaType(outptr_QMetaType) + ret.isSubclass = true + return ret } func QMetaType_UnregisterType(typeVal int) bool { @@ -499,7 +547,7 @@ func (this *QMetaType) Construct2(where unsafe.Pointer, copyVal unsafe.Pointer) // Delete this object from C++ memory. func (this *QMetaType) Delete() { - C.QMetaType_Delete(this.h) + C.QMetaType_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -512,7 +560,8 @@ func (this *QMetaType) GoGC() { } type QtMetaTypePrivate__VariantData struct { - h *C.QtMetaTypePrivate__VariantData + h *C.QtMetaTypePrivate__VariantData + isSubclass bool } func (this *QtMetaTypePrivate__VariantData) cPointer() *C.QtMetaTypePrivate__VariantData { @@ -529,6 +578,7 @@ func (this *QtMetaTypePrivate__VariantData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtMetaTypePrivate__VariantData constructs the type using only CGO pointers. func newQtMetaTypePrivate__VariantData(h *C.QtMetaTypePrivate__VariantData) *QtMetaTypePrivate__VariantData { if h == nil { return nil @@ -536,25 +586,38 @@ func newQtMetaTypePrivate__VariantData(h *C.QtMetaTypePrivate__VariantData) *QtM return &QtMetaTypePrivate__VariantData{h: h} } +// UnsafeNewQtMetaTypePrivate__VariantData constructs the type using only unsafe pointers. func UnsafeNewQtMetaTypePrivate__VariantData(h unsafe.Pointer) *QtMetaTypePrivate__VariantData { - return newQtMetaTypePrivate__VariantData((*C.QtMetaTypePrivate__VariantData)(h)) + if h == nil { + return nil + } + + return &QtMetaTypePrivate__VariantData{h: (*C.QtMetaTypePrivate__VariantData)(h)} } // NewQtMetaTypePrivate__VariantData constructs a new QtMetaTypePrivate::VariantData object. func NewQtMetaTypePrivate__VariantData(metaTypeId_ int, data_ unsafe.Pointer, flags_ uint) *QtMetaTypePrivate__VariantData { - ret := C.QtMetaTypePrivate__VariantData_new((C.int)(metaTypeId_), data_, (C.uint)(flags_)) - return newQtMetaTypePrivate__VariantData(ret) + var outptr_QtMetaTypePrivate__VariantData *C.QtMetaTypePrivate__VariantData = nil + + C.QtMetaTypePrivate__VariantData_new((C.int)(metaTypeId_), data_, (C.uint)(flags_), &outptr_QtMetaTypePrivate__VariantData) + ret := newQtMetaTypePrivate__VariantData(outptr_QtMetaTypePrivate__VariantData) + ret.isSubclass = true + return ret } // NewQtMetaTypePrivate__VariantData2 constructs a new QtMetaTypePrivate::VariantData object. func NewQtMetaTypePrivate__VariantData2(other *QtMetaTypePrivate__VariantData) *QtMetaTypePrivate__VariantData { - ret := C.QtMetaTypePrivate__VariantData_new2(other.cPointer()) - return newQtMetaTypePrivate__VariantData(ret) + var outptr_QtMetaTypePrivate__VariantData *C.QtMetaTypePrivate__VariantData = nil + + C.QtMetaTypePrivate__VariantData_new2(other.cPointer(), &outptr_QtMetaTypePrivate__VariantData) + ret := newQtMetaTypePrivate__VariantData(outptr_QtMetaTypePrivate__VariantData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtMetaTypePrivate__VariantData) Delete() { - C.QtMetaTypePrivate__VariantData_Delete(this.h) + C.QtMetaTypePrivate__VariantData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -567,7 +630,8 @@ func (this *QtMetaTypePrivate__VariantData) GoGC() { } type QtMetaTypePrivate__VectorBoolElements struct { - h *C.QtMetaTypePrivate__VectorBoolElements + h *C.QtMetaTypePrivate__VectorBoolElements + isSubclass bool } func (this *QtMetaTypePrivate__VectorBoolElements) cPointer() *C.QtMetaTypePrivate__VectorBoolElements { @@ -584,6 +648,7 @@ func (this *QtMetaTypePrivate__VectorBoolElements) UnsafePointer() unsafe.Pointe return unsafe.Pointer(this.h) } +// newQtMetaTypePrivate__VectorBoolElements constructs the type using only CGO pointers. func newQtMetaTypePrivate__VectorBoolElements(h *C.QtMetaTypePrivate__VectorBoolElements) *QtMetaTypePrivate__VectorBoolElements { if h == nil { return nil @@ -591,13 +656,18 @@ func newQtMetaTypePrivate__VectorBoolElements(h *C.QtMetaTypePrivate__VectorBool return &QtMetaTypePrivate__VectorBoolElements{h: h} } +// UnsafeNewQtMetaTypePrivate__VectorBoolElements constructs the type using only unsafe pointers. func UnsafeNewQtMetaTypePrivate__VectorBoolElements(h unsafe.Pointer) *QtMetaTypePrivate__VectorBoolElements { - return newQtMetaTypePrivate__VectorBoolElements((*C.QtMetaTypePrivate__VectorBoolElements)(h)) + if h == nil { + return nil + } + + return &QtMetaTypePrivate__VectorBoolElements{h: (*C.QtMetaTypePrivate__VectorBoolElements)(h)} } // Delete this object from C++ memory. func (this *QtMetaTypePrivate__VectorBoolElements) Delete() { - C.QtMetaTypePrivate__VectorBoolElements_Delete(this.h) + C.QtMetaTypePrivate__VectorBoolElements_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -610,7 +680,8 @@ func (this *QtMetaTypePrivate__VectorBoolElements) GoGC() { } type QtMetaTypePrivate__QSequentialIterableImpl struct { - h *C.QtMetaTypePrivate__QSequentialIterableImpl + h *C.QtMetaTypePrivate__QSequentialIterableImpl + isSubclass bool } func (this *QtMetaTypePrivate__QSequentialIterableImpl) cPointer() *C.QtMetaTypePrivate__QSequentialIterableImpl { @@ -627,6 +698,7 @@ func (this *QtMetaTypePrivate__QSequentialIterableImpl) UnsafePointer() unsafe.P return unsafe.Pointer(this.h) } +// newQtMetaTypePrivate__QSequentialIterableImpl constructs the type using only CGO pointers. func newQtMetaTypePrivate__QSequentialIterableImpl(h *C.QtMetaTypePrivate__QSequentialIterableImpl) *QtMetaTypePrivate__QSequentialIterableImpl { if h == nil { return nil @@ -634,20 +706,33 @@ func newQtMetaTypePrivate__QSequentialIterableImpl(h *C.QtMetaTypePrivate__QSequ return &QtMetaTypePrivate__QSequentialIterableImpl{h: h} } +// UnsafeNewQtMetaTypePrivate__QSequentialIterableImpl constructs the type using only unsafe pointers. func UnsafeNewQtMetaTypePrivate__QSequentialIterableImpl(h unsafe.Pointer) *QtMetaTypePrivate__QSequentialIterableImpl { - return newQtMetaTypePrivate__QSequentialIterableImpl((*C.QtMetaTypePrivate__QSequentialIterableImpl)(h)) + if h == nil { + return nil + } + + return &QtMetaTypePrivate__QSequentialIterableImpl{h: (*C.QtMetaTypePrivate__QSequentialIterableImpl)(h)} } // NewQtMetaTypePrivate__QSequentialIterableImpl constructs a new QtMetaTypePrivate::QSequentialIterableImpl object. func NewQtMetaTypePrivate__QSequentialIterableImpl() *QtMetaTypePrivate__QSequentialIterableImpl { - ret := C.QtMetaTypePrivate__QSequentialIterableImpl_new() - return newQtMetaTypePrivate__QSequentialIterableImpl(ret) + var outptr_QtMetaTypePrivate__QSequentialIterableImpl *C.QtMetaTypePrivate__QSequentialIterableImpl = nil + + C.QtMetaTypePrivate__QSequentialIterableImpl_new(&outptr_QtMetaTypePrivate__QSequentialIterableImpl) + ret := newQtMetaTypePrivate__QSequentialIterableImpl(outptr_QtMetaTypePrivate__QSequentialIterableImpl) + ret.isSubclass = true + return ret } // NewQtMetaTypePrivate__QSequentialIterableImpl2 constructs a new QtMetaTypePrivate::QSequentialIterableImpl object. func NewQtMetaTypePrivate__QSequentialIterableImpl2(param1 *QtMetaTypePrivate__QSequentialIterableImpl) *QtMetaTypePrivate__QSequentialIterableImpl { - ret := C.QtMetaTypePrivate__QSequentialIterableImpl_new2(param1.cPointer()) - return newQtMetaTypePrivate__QSequentialIterableImpl(ret) + var outptr_QtMetaTypePrivate__QSequentialIterableImpl *C.QtMetaTypePrivate__QSequentialIterableImpl = nil + + C.QtMetaTypePrivate__QSequentialIterableImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QSequentialIterableImpl) + ret := newQtMetaTypePrivate__QSequentialIterableImpl(outptr_QtMetaTypePrivate__QSequentialIterableImpl) + ret.isSubclass = true + return ret } func (this *QtMetaTypePrivate__QSequentialIterableImpl) IteratorCapabilities() QtMetaTypePrivate__IteratorCapability { @@ -714,7 +799,7 @@ func (this *QtMetaTypePrivate__QSequentialIterableImpl) OperatorAssign(param1 *Q // Delete this object from C++ memory. func (this *QtMetaTypePrivate__QSequentialIterableImpl) Delete() { - C.QtMetaTypePrivate__QSequentialIterableImpl_Delete(this.h) + C.QtMetaTypePrivate__QSequentialIterableImpl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -727,7 +812,8 @@ func (this *QtMetaTypePrivate__QSequentialIterableImpl) GoGC() { } type QtMetaTypePrivate__QAssociativeIterableImpl struct { - h *C.QtMetaTypePrivate__QAssociativeIterableImpl + h *C.QtMetaTypePrivate__QAssociativeIterableImpl + isSubclass bool } func (this *QtMetaTypePrivate__QAssociativeIterableImpl) cPointer() *C.QtMetaTypePrivate__QAssociativeIterableImpl { @@ -744,6 +830,7 @@ func (this *QtMetaTypePrivate__QAssociativeIterableImpl) UnsafePointer() unsafe. return unsafe.Pointer(this.h) } +// newQtMetaTypePrivate__QAssociativeIterableImpl constructs the type using only CGO pointers. func newQtMetaTypePrivate__QAssociativeIterableImpl(h *C.QtMetaTypePrivate__QAssociativeIterableImpl) *QtMetaTypePrivate__QAssociativeIterableImpl { if h == nil { return nil @@ -751,20 +838,33 @@ func newQtMetaTypePrivate__QAssociativeIterableImpl(h *C.QtMetaTypePrivate__QAss return &QtMetaTypePrivate__QAssociativeIterableImpl{h: h} } +// UnsafeNewQtMetaTypePrivate__QAssociativeIterableImpl constructs the type using only unsafe pointers. func UnsafeNewQtMetaTypePrivate__QAssociativeIterableImpl(h unsafe.Pointer) *QtMetaTypePrivate__QAssociativeIterableImpl { - return newQtMetaTypePrivate__QAssociativeIterableImpl((*C.QtMetaTypePrivate__QAssociativeIterableImpl)(h)) + if h == nil { + return nil + } + + return &QtMetaTypePrivate__QAssociativeIterableImpl{h: (*C.QtMetaTypePrivate__QAssociativeIterableImpl)(h)} } // NewQtMetaTypePrivate__QAssociativeIterableImpl constructs a new QtMetaTypePrivate::QAssociativeIterableImpl object. func NewQtMetaTypePrivate__QAssociativeIterableImpl() *QtMetaTypePrivate__QAssociativeIterableImpl { - ret := C.QtMetaTypePrivate__QAssociativeIterableImpl_new() - return newQtMetaTypePrivate__QAssociativeIterableImpl(ret) + var outptr_QtMetaTypePrivate__QAssociativeIterableImpl *C.QtMetaTypePrivate__QAssociativeIterableImpl = nil + + C.QtMetaTypePrivate__QAssociativeIterableImpl_new(&outptr_QtMetaTypePrivate__QAssociativeIterableImpl) + ret := newQtMetaTypePrivate__QAssociativeIterableImpl(outptr_QtMetaTypePrivate__QAssociativeIterableImpl) + ret.isSubclass = true + return ret } // NewQtMetaTypePrivate__QAssociativeIterableImpl2 constructs a new QtMetaTypePrivate::QAssociativeIterableImpl object. func NewQtMetaTypePrivate__QAssociativeIterableImpl2(param1 *QtMetaTypePrivate__QAssociativeIterableImpl) *QtMetaTypePrivate__QAssociativeIterableImpl { - ret := C.QtMetaTypePrivate__QAssociativeIterableImpl_new2(param1.cPointer()) - return newQtMetaTypePrivate__QAssociativeIterableImpl(ret) + var outptr_QtMetaTypePrivate__QAssociativeIterableImpl *C.QtMetaTypePrivate__QAssociativeIterableImpl = nil + + C.QtMetaTypePrivate__QAssociativeIterableImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QAssociativeIterableImpl) + ret := newQtMetaTypePrivate__QAssociativeIterableImpl(outptr_QtMetaTypePrivate__QAssociativeIterableImpl) + ret.isSubclass = true + return ret } func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Begin() { @@ -819,7 +919,7 @@ func (this *QtMetaTypePrivate__QAssociativeIterableImpl) OperatorAssign(param1 * // Delete this object from C++ memory. func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Delete() { - C.QtMetaTypePrivate__QAssociativeIterableImpl_Delete(this.h) + C.QtMetaTypePrivate__QAssociativeIterableImpl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -832,7 +932,8 @@ func (this *QtMetaTypePrivate__QAssociativeIterableImpl) GoGC() { } type QtMetaTypePrivate__QPairVariantInterfaceImpl struct { - h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl + h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl + isSubclass bool } func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) cPointer() *C.QtMetaTypePrivate__QPairVariantInterfaceImpl { @@ -849,6 +950,7 @@ func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) UnsafePointer() unsafe return unsafe.Pointer(this.h) } +// newQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only CGO pointers. func newQtMetaTypePrivate__QPairVariantInterfaceImpl(h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { if h == nil { return nil @@ -856,20 +958,33 @@ func newQtMetaTypePrivate__QPairVariantInterfaceImpl(h *C.QtMetaTypePrivate__QPa return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: h} } +// UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only unsafe pointers. func UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl(h unsafe.Pointer) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - return newQtMetaTypePrivate__QPairVariantInterfaceImpl((*C.QtMetaTypePrivate__QPairVariantInterfaceImpl)(h)) + if h == nil { + return nil + } + + return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: (*C.QtMetaTypePrivate__QPairVariantInterfaceImpl)(h)} } // NewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. func NewQtMetaTypePrivate__QPairVariantInterfaceImpl() *QtMetaTypePrivate__QPairVariantInterfaceImpl { - ret := C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new() - return newQtMetaTypePrivate__QPairVariantInterfaceImpl(ret) + var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil + + C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new(&outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret.isSubclass = true + return ret } // NewQtMetaTypePrivate__QPairVariantInterfaceImpl2 constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. func NewQtMetaTypePrivate__QPairVariantInterfaceImpl2(param1 *QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - ret := C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(param1.cPointer()) - return newQtMetaTypePrivate__QPairVariantInterfaceImpl(ret) + var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil + + C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret.isSubclass = true + return ret } func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) First() *QtMetaTypePrivate__VariantData { @@ -888,7 +1003,7 @@ func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Second() *QtMetaTypePr // Delete this object from C++ memory. func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Delete() { - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(this.h) + C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmetatype.h b/qt/gen_qmetatype.h index 350eca79..78f3e2b0 100644 --- a/qt/gen_qmetatype.h +++ b/qt/gen_qmetatype.h @@ -76,17 +76,17 @@ typedef struct QtPrivate__AbstractConverterFunction QtPrivate__AbstractConverter typedef struct QtPrivate__AbstractDebugStreamFunction QtPrivate__AbstractDebugStreamFunction; #endif -QtPrivate__AbstractDebugStreamFunction* QtPrivate__AbstractDebugStreamFunction_new(); -void QtPrivate__AbstractDebugStreamFunction_Delete(QtPrivate__AbstractDebugStreamFunction* self); +void QtPrivate__AbstractDebugStreamFunction_new(QtPrivate__AbstractDebugStreamFunction** outptr_QtPrivate__AbstractDebugStreamFunction); +void QtPrivate__AbstractDebugStreamFunction_Delete(QtPrivate__AbstractDebugStreamFunction* self, bool isSubclass); -QtPrivate__AbstractComparatorFunction* QtPrivate__AbstractComparatorFunction_new(); -void QtPrivate__AbstractComparatorFunction_Delete(QtPrivate__AbstractComparatorFunction* self); +void QtPrivate__AbstractComparatorFunction_new(QtPrivate__AbstractComparatorFunction** outptr_QtPrivate__AbstractComparatorFunction); +void QtPrivate__AbstractComparatorFunction_Delete(QtPrivate__AbstractComparatorFunction* self, bool isSubclass); -QtPrivate__AbstractConverterFunction* QtPrivate__AbstractConverterFunction_new(); -void QtPrivate__AbstractConverterFunction_Delete(QtPrivate__AbstractConverterFunction* self); +void QtPrivate__AbstractConverterFunction_new(QtPrivate__AbstractConverterFunction** outptr_QtPrivate__AbstractConverterFunction); +void QtPrivate__AbstractConverterFunction_Delete(QtPrivate__AbstractConverterFunction* self, bool isSubclass); -QMetaType* QMetaType_new(); -QMetaType* QMetaType_new2(const int typeVal); +void QMetaType_new(QMetaType** outptr_QMetaType); +void QMetaType_new2(const int typeVal, QMetaType** outptr_QMetaType); bool QMetaType_UnregisterType(int typeVal); int QMetaType_RegisterTypedef(const char* typeName, int aliasId); int QMetaType_RegisterNormalizedTypedef(struct miqt_string normalizedTypeName, int aliasId); @@ -124,16 +124,16 @@ bool QMetaType_HasRegisteredConverterFunction(int fromTypeId, int toTypeId); void* QMetaType_Create22(int typeVal, const void* copyVal); void* QMetaType_Create1(const QMetaType* self, const void* copyVal); void* QMetaType_Construct2(const QMetaType* self, void* where, const void* copyVal); -void QMetaType_Delete(QMetaType* self); +void QMetaType_Delete(QMetaType* self, bool isSubclass); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__VariantData_new(const int metaTypeId_, const void* data_, const unsigned int flags_); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__VariantData_new2(QtMetaTypePrivate__VariantData* other); -void QtMetaTypePrivate__VariantData_Delete(QtMetaTypePrivate__VariantData* self); +void QtMetaTypePrivate__VariantData_new(const int metaTypeId_, const void* data_, const unsigned int flags_, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData); +void QtMetaTypePrivate__VariantData_new2(QtMetaTypePrivate__VariantData* other, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData); +void QtMetaTypePrivate__VariantData_Delete(QtMetaTypePrivate__VariantData* self, bool isSubclass); -void QtMetaTypePrivate__VectorBoolElements_Delete(QtMetaTypePrivate__VectorBoolElements* self); +void QtMetaTypePrivate__VectorBoolElements_Delete(QtMetaTypePrivate__VectorBoolElements* self, bool isSubclass); -QtMetaTypePrivate__QSequentialIterableImpl* QtMetaTypePrivate__QSequentialIterableImpl_new(); -QtMetaTypePrivate__QSequentialIterableImpl* QtMetaTypePrivate__QSequentialIterableImpl_new2(QtMetaTypePrivate__QSequentialIterableImpl* param1); +void QtMetaTypePrivate__QSequentialIterableImpl_new(QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl); +void QtMetaTypePrivate__QSequentialIterableImpl_new2(QtMetaTypePrivate__QSequentialIterableImpl* param1, QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl); int QtMetaTypePrivate__QSequentialIterableImpl_IteratorCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self); unsigned int QtMetaTypePrivate__QSequentialIterableImpl_Revision(QtMetaTypePrivate__QSequentialIterableImpl* self); unsigned int QtMetaTypePrivate__QSequentialIterableImpl_ContainerCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self); @@ -148,10 +148,10 @@ int QtMetaTypePrivate__QSequentialIterableImpl_Size(const QtMetaTypePrivate__QSe void QtMetaTypePrivate__QSequentialIterableImpl_DestroyIter(QtMetaTypePrivate__QSequentialIterableImpl* self); void QtMetaTypePrivate__QSequentialIterableImpl_Copy(QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* other); void QtMetaTypePrivate__QSequentialIterableImpl_OperatorAssign(QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* param1); -void QtMetaTypePrivate__QSequentialIterableImpl_Delete(QtMetaTypePrivate__QSequentialIterableImpl* self); +void QtMetaTypePrivate__QSequentialIterableImpl_Delete(QtMetaTypePrivate__QSequentialIterableImpl* self, bool isSubclass); -QtMetaTypePrivate__QAssociativeIterableImpl* QtMetaTypePrivate__QAssociativeIterableImpl_new(); -QtMetaTypePrivate__QAssociativeIterableImpl* QtMetaTypePrivate__QAssociativeIterableImpl_new2(QtMetaTypePrivate__QAssociativeIterableImpl* param1); +void QtMetaTypePrivate__QAssociativeIterableImpl_new(QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl); +void QtMetaTypePrivate__QAssociativeIterableImpl_new2(QtMetaTypePrivate__QAssociativeIterableImpl* param1, QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl); void QtMetaTypePrivate__QAssociativeIterableImpl_Begin(QtMetaTypePrivate__QAssociativeIterableImpl* self); void QtMetaTypePrivate__QAssociativeIterableImpl_End(QtMetaTypePrivate__QAssociativeIterableImpl* self); bool QtMetaTypePrivate__QAssociativeIterableImpl_Equal(const QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* other); @@ -163,13 +163,13 @@ void QtMetaTypePrivate__QAssociativeIterableImpl_Find(QtMetaTypePrivate__QAssoci int QtMetaTypePrivate__QAssociativeIterableImpl_Size(const QtMetaTypePrivate__QAssociativeIterableImpl* self); void QtMetaTypePrivate__QAssociativeIterableImpl_Copy(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* other); void QtMetaTypePrivate__QAssociativeIterableImpl_OperatorAssign(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* param1); -void QtMetaTypePrivate__QAssociativeIterableImpl_Delete(QtMetaTypePrivate__QAssociativeIterableImpl* self); +void QtMetaTypePrivate__QAssociativeIterableImpl_Delete(QtMetaTypePrivate__QAssociativeIterableImpl* self, bool isSubclass); -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new(); -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self); QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmimedata.cpp b/qt/gen_qmimedata.cpp index 57fd2027..b175d6f4 100644 --- a/qt/gen_qmimedata.cpp +++ b/qt/gen_qmimedata.cpp @@ -1,18 +1,314 @@ #include +#include +#include #include +#include #include #include +#include #include #include #include +#include #include #include #include #include "gen_qmimedata.h" #include "_cgo_export.h" -QMimeData* QMimeData_new() { - return new QMimeData(); +class MiqtVirtualQMimeData : public virtual QMimeData { +public: + + MiqtVirtualQMimeData(): QMimeData() {}; + + virtual ~MiqtVirtualQMimeData() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasFormat = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasFormat(const QString& mimetype) const override { + if (handle__HasFormat == 0) { + return QMimeData::hasFormat(mimetype); + } + + const QString mimetype_ret = mimetype; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray mimetype_b = mimetype_ret.toUtf8(); + struct miqt_string mimetype_ms; + mimetype_ms.len = mimetype_b.length(); + mimetype_ms.data = static_cast(malloc(mimetype_ms.len)); + memcpy(mimetype_ms.data, mimetype_b.data(), mimetype_ms.len); + struct miqt_string sigval1 = mimetype_ms; + + bool callback_return_value = miqt_exec_callback_QMimeData_HasFormat(const_cast(this), handle__HasFormat, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasFormat(struct miqt_string mimetype) const { + QString mimetype_QString = QString::fromUtf8(mimetype.data, mimetype.len); + + return QMimeData::hasFormat(mimetype_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Formats = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList formats() const override { + if (handle__Formats == 0) { + return QMimeData::formats(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QMimeData_Formats(const_cast(this), handle__Formats); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_Formats() const { + + QStringList _ret = QMimeData::formats(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RetrieveData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant retrieveData(const QString& mimetype, QVariant::Type preferredType) const override { + if (handle__RetrieveData == 0) { + return QMimeData::retrieveData(mimetype, preferredType); + } + + const QString mimetype_ret = mimetype; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray mimetype_b = mimetype_ret.toUtf8(); + struct miqt_string mimetype_ms; + mimetype_ms.len = mimetype_b.length(); + mimetype_ms.data = static_cast(malloc(mimetype_ms.len)); + memcpy(mimetype_ms.data, mimetype_b.data(), mimetype_ms.len); + struct miqt_string sigval1 = mimetype_ms; + QVariant::Type preferredType_ret = preferredType; + int sigval2 = static_cast(preferredType_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMimeData_RetrieveData(const_cast(this), handle__RetrieveData, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_RetrieveData(struct miqt_string mimetype, int preferredType) const { + QString mimetype_QString = QString::fromUtf8(mimetype.data, mimetype.len); + + return new QVariant(QMimeData::retrieveData(mimetype_QString, static_cast(preferredType))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMimeData::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMimeData_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMimeData::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMimeData::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMimeData_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMimeData::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMimeData::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMimeData_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMimeData::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMimeData::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMimeData_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMimeData::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMimeData::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMimeData_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMimeData::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMimeData::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMimeData_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMimeData::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMimeData::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMimeData_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMimeData::disconnectNotify(*signal); + + } + +}; + +void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject) { + MiqtVirtualQMimeData* ret = new MiqtVirtualQMimeData(); + *outptr_QMimeData = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMimeData_MetaObject(const QMimeData* self) { @@ -230,7 +526,91 @@ struct miqt_string QMimeData_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QMimeData_Delete(QMimeData* self) { - delete self; +void QMimeData_override_virtual_HasFormat(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__HasFormat = slot; +} + +bool QMimeData_virtualbase_HasFormat(const void* self, struct miqt_string mimetype) { + return ( (const MiqtVirtualQMimeData*)(self) )->virtualbase_HasFormat(mimetype); +} + +void QMimeData_override_virtual_Formats(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__Formats = slot; +} + +struct miqt_array /* of struct miqt_string */ QMimeData_virtualbase_Formats(const void* self) { + return ( (const MiqtVirtualQMimeData*)(self) )->virtualbase_Formats(); +} + +void QMimeData_override_virtual_RetrieveData(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__RetrieveData = slot; +} + +QVariant* QMimeData_virtualbase_RetrieveData(const void* self, struct miqt_string mimetype, int preferredType) { + return ( (const MiqtVirtualQMimeData*)(self) )->virtualbase_RetrieveData(mimetype, preferredType); +} + +void QMimeData_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__Event = slot; +} + +bool QMimeData_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMimeData*)(self) )->virtualbase_Event(event); +} + +void QMimeData_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__EventFilter = slot; +} + +bool QMimeData_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMimeData*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMimeData_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__TimerEvent = slot; +} + +void QMimeData_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_TimerEvent(event); +} + +void QMimeData_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__ChildEvent = slot; +} + +void QMimeData_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_ChildEvent(event); +} + +void QMimeData_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__CustomEvent = slot; +} + +void QMimeData_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_CustomEvent(event); +} + +void QMimeData_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__ConnectNotify = slot; +} + +void QMimeData_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMimeData_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__DisconnectNotify = slot; +} + +void QMimeData_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMimeData_Delete(QMimeData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmimedata.go b/qt/gen_qmimedata.go index fdbd3b8c..885d18af 100644 --- a/qt/gen_qmimedata.go +++ b/qt/gen_qmimedata.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QMimeData struct { - h *C.QMimeData + h *C.QMimeData + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QMimeData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMimeData(h *C.QMimeData) *QMimeData { +// newQMimeData constructs the type using only CGO pointers. +func newQMimeData(h *C.QMimeData, h_QObject *C.QObject) *QMimeData { if h == nil { return nil } - return &QMimeData{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QMimeData{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQMimeData(h unsafe.Pointer) *QMimeData { - return newQMimeData((*C.QMimeData)(h)) +// UnsafeNewQMimeData constructs the type using only unsafe pointers. +func UnsafeNewQMimeData(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMimeData { + if h == nil { + return nil + } + + return &QMimeData{h: (*C.QMimeData)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQMimeData constructs a new QMimeData object. func NewQMimeData() *QMimeData { - ret := C.QMimeData_new() - return newQMimeData(ret) + var outptr_QMimeData *C.QMimeData = nil + var outptr_QObject *C.QObject = nil + + C.QMimeData_new(&outptr_QMimeData, &outptr_QObject) + ret := newQMimeData(outptr_QMimeData, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMimeData) MetaObject() *QMetaObject { @@ -271,9 +286,284 @@ func QMimeData_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QMimeData) callVirtualBase_HasFormat(mimetype string) bool { + mimetype_ms := C.struct_miqt_string{} + mimetype_ms.data = C.CString(mimetype) + mimetype_ms.len = C.size_t(len(mimetype)) + defer C.free(unsafe.Pointer(mimetype_ms.data)) + + return (bool)(C.QMimeData_virtualbase_HasFormat(unsafe.Pointer(this.h), mimetype_ms)) + +} +func (this *QMimeData) OnHasFormat(slot func(super func(mimetype string) bool, mimetype string) bool) { + C.QMimeData_override_virtual_HasFormat(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_HasFormat +func miqt_exec_callback_QMimeData_HasFormat(self *C.QMimeData, cb C.intptr_t, mimetype C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mimetype string) bool, mimetype string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var mimetype_ms C.struct_miqt_string = mimetype + mimetype_ret := C.GoStringN(mimetype_ms.data, C.int(int64(mimetype_ms.len))) + C.free(unsafe.Pointer(mimetype_ms.data)) + slotval1 := mimetype_ret + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_HasFormat, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMimeData) callVirtualBase_Formats() []string { + + var _ma C.struct_miqt_array = C.QMimeData_virtualbase_Formats(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QMimeData) OnFormats(slot func(super func() []string) []string) { + C.QMimeData_override_virtual_Formats(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_Formats +func miqt_exec_callback_QMimeData_Formats(self *C.QMimeData, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_Formats) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QMimeData) callVirtualBase_RetrieveData(mimetype string, preferredType QVariant__Type) *QVariant { + mimetype_ms := C.struct_miqt_string{} + mimetype_ms.data = C.CString(mimetype) + mimetype_ms.len = C.size_t(len(mimetype)) + defer C.free(unsafe.Pointer(mimetype_ms.data)) + + _ret := C.QMimeData_virtualbase_RetrieveData(unsafe.Pointer(this.h), mimetype_ms, (C.int)(preferredType)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMimeData) OnRetrieveData(slot func(super func(mimetype string, preferredType QVariant__Type) *QVariant, mimetype string, preferredType QVariant__Type) *QVariant) { + C.QMimeData_override_virtual_RetrieveData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_RetrieveData +func miqt_exec_callback_QMimeData_RetrieveData(self *C.QMimeData, cb C.intptr_t, mimetype C.struct_miqt_string, preferredType C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mimetype string, preferredType QVariant__Type) *QVariant, mimetype string, preferredType QVariant__Type) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var mimetype_ms C.struct_miqt_string = mimetype + mimetype_ret := C.GoStringN(mimetype_ms.data, C.int(int64(mimetype_ms.len))) + C.free(unsafe.Pointer(mimetype_ms.data)) + slotval1 := mimetype_ret + slotval2 := (QVariant__Type)(preferredType) + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_RetrieveData, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QMimeData) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMimeData_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMimeData) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMimeData_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_Event +func miqt_exec_callback_QMimeData_Event(self *C.QMimeData, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMimeData) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QMimeData_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QMimeData) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QMimeData_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_EventFilter +func miqt_exec_callback_QMimeData_EventFilter(self *C.QMimeData, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMimeData) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QMimeData_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMimeData) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QMimeData_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_TimerEvent +func miqt_exec_callback_QMimeData_TimerEvent(self *C.QMimeData, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMimeData{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMimeData) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QMimeData_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMimeData) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QMimeData_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_ChildEvent +func miqt_exec_callback_QMimeData_ChildEvent(self *C.QMimeData, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMimeData{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMimeData) callVirtualBase_CustomEvent(event *QEvent) { + + C.QMimeData_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMimeData) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMimeData_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_CustomEvent +func miqt_exec_callback_QMimeData_CustomEvent(self *C.QMimeData, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMimeData{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMimeData) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QMimeData_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMimeData) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMimeData_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_ConnectNotify +func miqt_exec_callback_QMimeData_ConnectNotify(self *C.QMimeData, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMimeData{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMimeData) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QMimeData_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMimeData) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMimeData_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_DisconnectNotify +func miqt_exec_callback_QMimeData_DisconnectNotify(self *C.QMimeData, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMimeData{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMimeData) Delete() { - C.QMimeData_Delete(this.h) + C.QMimeData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmimedata.h b/qt/gen_qmimedata.h index fb7734f2..f01ef469 100644 --- a/qt/gen_qmimedata.h +++ b/qt/gen_qmimedata.h @@ -16,19 +16,29 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QMimeData; +class QObject; +class QTimerEvent; class QUrl; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QMimeData* QMimeData_new(); +void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject); QMetaObject* QMimeData_MetaObject(const QMimeData* self); void* QMimeData_Metacast(QMimeData* self, const char* param1); struct miqt_string QMimeData_Tr(const char* s); @@ -54,11 +64,32 @@ void QMimeData_RemoveFormat(QMimeData* self, struct miqt_string mimetype); bool QMimeData_HasFormat(const QMimeData* self, struct miqt_string mimetype); struct miqt_array /* of struct miqt_string */ QMimeData_Formats(const QMimeData* self); void QMimeData_Clear(QMimeData* self); +QVariant* QMimeData_RetrieveData(const QMimeData* self, struct miqt_string mimetype, int preferredType); struct miqt_string QMimeData_Tr2(const char* s, const char* c); struct miqt_string QMimeData_Tr3(const char* s, const char* c, int n); struct miqt_string QMimeData_TrUtf82(const char* s, const char* c); struct miqt_string QMimeData_TrUtf83(const char* s, const char* c, int n); -void QMimeData_Delete(QMimeData* self); +void QMimeData_override_virtual_HasFormat(void* self, intptr_t slot); +bool QMimeData_virtualbase_HasFormat(const void* self, struct miqt_string mimetype); +void QMimeData_override_virtual_Formats(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QMimeData_virtualbase_Formats(const void* self); +void QMimeData_override_virtual_RetrieveData(void* self, intptr_t slot); +QVariant* QMimeData_virtualbase_RetrieveData(const void* self, struct miqt_string mimetype, int preferredType); +void QMimeData_override_virtual_Event(void* self, intptr_t slot); +bool QMimeData_virtualbase_Event(void* self, QEvent* event); +void QMimeData_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMimeData_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMimeData_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMimeData_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMimeData_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMimeData_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMimeData_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMimeData_virtualbase_CustomEvent(void* self, QEvent* event); +void QMimeData_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMimeData_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMimeData_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMimeData_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMimeData_Delete(QMimeData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmimedatabase.cpp b/qt/gen_qmimedatabase.cpp index 0e4cc76b..ee71f459 100644 --- a/qt/gen_qmimedatabase.cpp +++ b/qt/gen_qmimedatabase.cpp @@ -12,8 +12,9 @@ #include "gen_qmimedatabase.h" #include "_cgo_export.h" -QMimeDatabase* QMimeDatabase_new() { - return new QMimeDatabase(); +void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase) { + QMimeDatabase* ret = new QMimeDatabase(); + *outptr_QMimeDatabase = ret; } QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias) { @@ -102,7 +103,11 @@ QMimeType* QMimeDatabase_MimeTypeForFile22(const QMimeDatabase* self, QFileInfo* return new QMimeType(self->mimeTypeForFile(*fileInfo, static_cast(mode))); } -void QMimeDatabase_Delete(QMimeDatabase* self) { - delete self; +void QMimeDatabase_Delete(QMimeDatabase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmimedatabase.go b/qt/gen_qmimedatabase.go index 8edba9c8..ee33cd96 100644 --- a/qt/gen_qmimedatabase.go +++ b/qt/gen_qmimedatabase.go @@ -22,7 +22,8 @@ const ( ) type QMimeDatabase struct { - h *C.QMimeDatabase + h *C.QMimeDatabase + isSubclass bool } func (this *QMimeDatabase) cPointer() *C.QMimeDatabase { @@ -39,6 +40,7 @@ func (this *QMimeDatabase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMimeDatabase constructs the type using only CGO pointers. func newQMimeDatabase(h *C.QMimeDatabase) *QMimeDatabase { if h == nil { return nil @@ -46,14 +48,23 @@ func newQMimeDatabase(h *C.QMimeDatabase) *QMimeDatabase { return &QMimeDatabase{h: h} } +// UnsafeNewQMimeDatabase constructs the type using only unsafe pointers. func UnsafeNewQMimeDatabase(h unsafe.Pointer) *QMimeDatabase { - return newQMimeDatabase((*C.QMimeDatabase)(h)) + if h == nil { + return nil + } + + return &QMimeDatabase{h: (*C.QMimeDatabase)(h)} } // NewQMimeDatabase constructs a new QMimeDatabase object. func NewQMimeDatabase() *QMimeDatabase { - ret := C.QMimeDatabase_new() - return newQMimeDatabase(ret) + var outptr_QMimeDatabase *C.QMimeDatabase = nil + + C.QMimeDatabase_new(&outptr_QMimeDatabase) + ret := newQMimeDatabase(outptr_QMimeDatabase) + ret.isSubclass = true + return ret } func (this *QMimeDatabase) MimeTypeForName(nameOrAlias string) *QMimeType { @@ -195,7 +206,7 @@ func (this *QMimeDatabase) MimeTypeForFile22(fileInfo *QFileInfo, mode QMimeData // Delete this object from C++ memory. func (this *QMimeDatabase) Delete() { - C.QMimeDatabase_Delete(this.h) + C.QMimeDatabase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmimedatabase.h b/qt/gen_qmimedatabase.h index 67adf35e..3df1f10d 100644 --- a/qt/gen_qmimedatabase.h +++ b/qt/gen_qmimedatabase.h @@ -30,7 +30,7 @@ typedef struct QMimeType QMimeType; typedef struct QUrl QUrl; #endif -QMimeDatabase* QMimeDatabase_new(); +void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase); QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias); QMimeType* QMimeDatabase_MimeTypeForFile(const QMimeDatabase* self, struct miqt_string fileName); QMimeType* QMimeDatabase_MimeTypeForFileWithFileInfo(const QMimeDatabase* self, QFileInfo* fileInfo); @@ -44,7 +44,7 @@ struct miqt_string QMimeDatabase_SuffixForFileName(const QMimeDatabase* self, st struct miqt_array /* of QMimeType* */ QMimeDatabase_AllMimeTypes(const QMimeDatabase* self); QMimeType* QMimeDatabase_MimeTypeForFile2(const QMimeDatabase* self, struct miqt_string fileName, int mode); QMimeType* QMimeDatabase_MimeTypeForFile22(const QMimeDatabase* self, QFileInfo* fileInfo, int mode); -void QMimeDatabase_Delete(QMimeDatabase* self); +void QMimeDatabase_Delete(QMimeDatabase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmimetype.cpp b/qt/gen_qmimetype.cpp index a2e96d57..df6a2a83 100644 --- a/qt/gen_qmimetype.cpp +++ b/qt/gen_qmimetype.cpp @@ -7,12 +7,14 @@ #include "gen_qmimetype.h" #include "_cgo_export.h" -QMimeType* QMimeType_new() { - return new QMimeType(); +void QMimeType_new(QMimeType** outptr_QMimeType) { + QMimeType* ret = new QMimeType(); + *outptr_QMimeType = ret; } -QMimeType* QMimeType_new2(QMimeType* other) { - return new QMimeType(*other); +void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType) { + QMimeType* ret = new QMimeType(*other); + *outptr_QMimeType = ret; } void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other) { @@ -210,7 +212,11 @@ struct miqt_string QMimeType_FilterString(const QMimeType* self) { return _ms; } -void QMimeType_Delete(QMimeType* self) { - delete self; +void QMimeType_Delete(QMimeType* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmimetype.go b/qt/gen_qmimetype.go index eaab8a7d..451e6092 100644 --- a/qt/gen_qmimetype.go +++ b/qt/gen_qmimetype.go @@ -14,7 +14,8 @@ import ( ) type QMimeType struct { - h *C.QMimeType + h *C.QMimeType + isSubclass bool } func (this *QMimeType) cPointer() *C.QMimeType { @@ -31,6 +32,7 @@ func (this *QMimeType) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMimeType constructs the type using only CGO pointers. func newQMimeType(h *C.QMimeType) *QMimeType { if h == nil { return nil @@ -38,20 +40,33 @@ func newQMimeType(h *C.QMimeType) *QMimeType { return &QMimeType{h: h} } +// UnsafeNewQMimeType constructs the type using only unsafe pointers. func UnsafeNewQMimeType(h unsafe.Pointer) *QMimeType { - return newQMimeType((*C.QMimeType)(h)) + if h == nil { + return nil + } + + return &QMimeType{h: (*C.QMimeType)(h)} } // NewQMimeType constructs a new QMimeType object. func NewQMimeType() *QMimeType { - ret := C.QMimeType_new() - return newQMimeType(ret) + var outptr_QMimeType *C.QMimeType = nil + + C.QMimeType_new(&outptr_QMimeType) + ret := newQMimeType(outptr_QMimeType) + ret.isSubclass = true + return ret } // NewQMimeType2 constructs a new QMimeType object. func NewQMimeType2(other *QMimeType) *QMimeType { - ret := C.QMimeType_new2(other.cPointer()) - return newQMimeType(ret) + var outptr_QMimeType *C.QMimeType = nil + + C.QMimeType_new2(other.cPointer(), &outptr_QMimeType) + ret := newQMimeType(outptr_QMimeType) + ret.isSubclass = true + return ret } func (this *QMimeType) OperatorAssign(other *QMimeType) { @@ -195,7 +210,7 @@ func (this *QMimeType) FilterString() string { // Delete this object from C++ memory. func (this *QMimeType) Delete() { - C.QMimeType_Delete(this.h) + C.QMimeType_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmimetype.h b/qt/gen_qmimetype.h index 56cc7e9c..c5b26033 100644 --- a/qt/gen_qmimetype.h +++ b/qt/gen_qmimetype.h @@ -20,8 +20,8 @@ class QMimeType; typedef struct QMimeType QMimeType; #endif -QMimeType* QMimeType_new(); -QMimeType* QMimeType_new2(QMimeType* other); +void QMimeType_new(QMimeType** outptr_QMimeType); +void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType); void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other); void QMimeType_Swap(QMimeType* self, QMimeType* other); bool QMimeType_OperatorEqual(const QMimeType* self, QMimeType* other); @@ -40,7 +40,7 @@ struct miqt_array /* of struct miqt_string */ QMimeType_Suffixes(const QMimeTyp struct miqt_string QMimeType_PreferredSuffix(const QMimeType* self); bool QMimeType_Inherits(const QMimeType* self, struct miqt_string mimeTypeName); struct miqt_string QMimeType_FilterString(const QMimeType* self); -void QMimeType_Delete(QMimeType* self); +void QMimeType_Delete(QMimeType* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmouseeventtransition.cpp b/qt/gen_qmouseeventtransition.cpp index f3f372dc..287d671f 100644 --- a/qt/gen_qmouseeventtransition.cpp +++ b/qt/gen_qmouseeventtransition.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -10,20 +13,118 @@ #include "gen_qmouseeventtransition.h" #include "_cgo_export.h" -QMouseEventTransition* QMouseEventTransition_new() { - return new QMouseEventTransition(); +class MiqtVirtualQMouseEventTransition : public virtual QMouseEventTransition { +public: + + MiqtVirtualQMouseEventTransition(): QMouseEventTransition() {}; + MiqtVirtualQMouseEventTransition(QObject* object, QEvent::Type typeVal, Qt::MouseButton button): QMouseEventTransition(object, typeVal, button) {}; + MiqtVirtualQMouseEventTransition(QState* sourceState): QMouseEventTransition(sourceState) {}; + MiqtVirtualQMouseEventTransition(QObject* object, QEvent::Type typeVal, Qt::MouseButton button, QState* sourceState): QMouseEventTransition(object, typeVal, button, sourceState) {}; + + virtual ~MiqtVirtualQMouseEventTransition() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnTransition = 0; + + // Subclass to allow providing a Go implementation + virtual void onTransition(QEvent* event) override { + if (handle__OnTransition == 0) { + QMouseEventTransition::onTransition(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMouseEventTransition_OnTransition(this, handle__OnTransition, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnTransition(QEvent* event) { + + QMouseEventTransition::onTransition(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventTest = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventTest(QEvent* event) override { + if (handle__EventTest == 0) { + return QMouseEventTransition::eventTest(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMouseEventTransition_EventTest(this, handle__EventTest, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventTest(QEvent* event) { + + return QMouseEventTransition::eventTest(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QMouseEventTransition::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QMouseEventTransition_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QMouseEventTransition::event(e); + + } + +}; + +void QMouseEventTransition_new(QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(); + *outptr_QMouseEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QMouseEventTransition* QMouseEventTransition_new2(QObject* object, int typeVal, int button) { - return new QMouseEventTransition(object, static_cast(typeVal), static_cast(button)); +void QMouseEventTransition_new2(QObject* object, int typeVal, int button, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(object, static_cast(typeVal), static_cast(button)); + *outptr_QMouseEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QMouseEventTransition* QMouseEventTransition_new3(QState* sourceState) { - return new QMouseEventTransition(sourceState); +void QMouseEventTransition_new3(QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(sourceState); + *outptr_QMouseEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QMouseEventTransition* QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState) { - return new QMouseEventTransition(object, static_cast(typeVal), static_cast(button), sourceState); +void QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(object, static_cast(typeVal), static_cast(button), sourceState); + *outptr_QMouseEventTransition = ret; + *outptr_QEventTransition = static_cast(ret); + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QMouseEventTransition_MetaObject(const QMouseEventTransition* self) { @@ -126,7 +227,35 @@ struct miqt_string QMouseEventTransition_TrUtf83(const char* s, const char* c, i return _ms; } -void QMouseEventTransition_Delete(QMouseEventTransition* self) { - delete self; +void QMouseEventTransition_override_virtual_OnTransition(void* self, intptr_t slot) { + dynamic_cast( (QMouseEventTransition*)(self) )->handle__OnTransition = slot; +} + +void QMouseEventTransition_virtualbase_OnTransition(void* self, QEvent* event) { + ( (MiqtVirtualQMouseEventTransition*)(self) )->virtualbase_OnTransition(event); +} + +void QMouseEventTransition_override_virtual_EventTest(void* self, intptr_t slot) { + dynamic_cast( (QMouseEventTransition*)(self) )->handle__EventTest = slot; +} + +bool QMouseEventTransition_virtualbase_EventTest(void* self, QEvent* event) { + return ( (MiqtVirtualQMouseEventTransition*)(self) )->virtualbase_EventTest(event); +} + +void QMouseEventTransition_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMouseEventTransition*)(self) )->handle__Event = slot; +} + +bool QMouseEventTransition_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQMouseEventTransition*)(self) )->virtualbase_Event(e); +} + +void QMouseEventTransition_Delete(QMouseEventTransition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmouseeventtransition.go b/qt/gen_qmouseeventtransition.go index 574d34ca..1dce83d4 100644 --- a/qt/gen_qmouseeventtransition.go +++ b/qt/gen_qmouseeventtransition.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QMouseEventTransition struct { - h *C.QMouseEventTransition + h *C.QMouseEventTransition + isSubclass bool *QEventTransition } @@ -32,39 +34,75 @@ func (this *QMouseEventTransition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMouseEventTransition(h *C.QMouseEventTransition) *QMouseEventTransition { +// newQMouseEventTransition constructs the type using only CGO pointers. +func newQMouseEventTransition(h *C.QMouseEventTransition, h_QEventTransition *C.QEventTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QMouseEventTransition { if h == nil { return nil } - return &QMouseEventTransition{h: h, QEventTransition: UnsafeNewQEventTransition(unsafe.Pointer(h))} + return &QMouseEventTransition{h: h, + QEventTransition: newQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} } -func UnsafeNewQMouseEventTransition(h unsafe.Pointer) *QMouseEventTransition { - return newQMouseEventTransition((*C.QMouseEventTransition)(h)) +// UnsafeNewQMouseEventTransition constructs the type using only unsafe pointers. +func UnsafeNewQMouseEventTransition(h unsafe.Pointer, h_QEventTransition unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QMouseEventTransition { + if h == nil { + return nil + } + + return &QMouseEventTransition{h: (*C.QMouseEventTransition)(h), + QEventTransition: UnsafeNewQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} } // NewQMouseEventTransition constructs a new QMouseEventTransition object. func NewQMouseEventTransition() *QMouseEventTransition { - ret := C.QMouseEventTransition_new() - return newQMouseEventTransition(ret) + var outptr_QMouseEventTransition *C.QMouseEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QMouseEventTransition_new(&outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMouseEventTransition2 constructs a new QMouseEventTransition object. func NewQMouseEventTransition2(object *QObject, typeVal QEvent__Type, button MouseButton) *QMouseEventTransition { - ret := C.QMouseEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(button)) - return newQMouseEventTransition(ret) + var outptr_QMouseEventTransition *C.QMouseEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QMouseEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(button), &outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMouseEventTransition3 constructs a new QMouseEventTransition object. func NewQMouseEventTransition3(sourceState *QState) *QMouseEventTransition { - ret := C.QMouseEventTransition_new3(sourceState.cPointer()) - return newQMouseEventTransition(ret) + var outptr_QMouseEventTransition *C.QMouseEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QMouseEventTransition_new3(sourceState.cPointer(), &outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMouseEventTransition4 constructs a new QMouseEventTransition object. func NewQMouseEventTransition4(object *QObject, typeVal QEvent__Type, button MouseButton, sourceState *QState) *QMouseEventTransition { - ret := C.QMouseEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(button), sourceState.cPointer()) - return newQMouseEventTransition(ret) + var outptr_QMouseEventTransition *C.QMouseEventTransition = nil + var outptr_QEventTransition *C.QEventTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QMouseEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(button), sourceState.cPointer(), &outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMouseEventTransition) MetaObject() *QMetaObject { @@ -166,9 +204,82 @@ func QMouseEventTransition_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QMouseEventTransition) callVirtualBase_OnTransition(event *QEvent) { + + C.QMouseEventTransition_virtualbase_OnTransition(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMouseEventTransition) OnOnTransition(slot func(super func(event *QEvent), event *QEvent)) { + C.QMouseEventTransition_override_virtual_OnTransition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEventTransition_OnTransition +func miqt_exec_callback_QMouseEventTransition_OnTransition(self *C.QMouseEventTransition, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMouseEventTransition{h: self}).callVirtualBase_OnTransition, slotval1) + +} + +func (this *QMouseEventTransition) callVirtualBase_EventTest(event *QEvent) bool { + + return (bool)(C.QMouseEventTransition_virtualbase_EventTest(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMouseEventTransition) OnEventTest(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMouseEventTransition_override_virtual_EventTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEventTransition_EventTest +func miqt_exec_callback_QMouseEventTransition_EventTest(self *C.QMouseEventTransition, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMouseEventTransition{h: self}).callVirtualBase_EventTest, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMouseEventTransition) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QMouseEventTransition_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QMouseEventTransition) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QMouseEventTransition_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEventTransition_Event +func miqt_exec_callback_QMouseEventTransition_Event(self *C.QMouseEventTransition, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QMouseEventTransition{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMouseEventTransition) Delete() { - C.QMouseEventTransition_Delete(this.h) + C.QMouseEventTransition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmouseeventtransition.h b/qt/gen_qmouseeventtransition.h index 3a3b8ed4..e0f95711 100644 --- a/qt/gen_qmouseeventtransition.h +++ b/qt/gen_qmouseeventtransition.h @@ -15,12 +15,18 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractTransition; +class QEvent; +class QEventTransition; class QMetaObject; class QMouseEventTransition; class QObject; class QPainterPath; class QState; #else +typedef struct QAbstractTransition QAbstractTransition; +typedef struct QEvent QEvent; +typedef struct QEventTransition QEventTransition; typedef struct QMetaObject QMetaObject; typedef struct QMouseEventTransition QMouseEventTransition; typedef struct QObject QObject; @@ -28,10 +34,10 @@ typedef struct QPainterPath QPainterPath; typedef struct QState QState; #endif -QMouseEventTransition* QMouseEventTransition_new(); -QMouseEventTransition* QMouseEventTransition_new2(QObject* object, int typeVal, int button); -QMouseEventTransition* QMouseEventTransition_new3(QState* sourceState); -QMouseEventTransition* QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState); +void QMouseEventTransition_new(QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QMouseEventTransition_new2(QObject* object, int typeVal, int button, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QMouseEventTransition_new3(QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); QMetaObject* QMouseEventTransition_MetaObject(const QMouseEventTransition* self); void* QMouseEventTransition_Metacast(QMouseEventTransition* self, const char* param1); struct miqt_string QMouseEventTransition_Tr(const char* s); @@ -42,11 +48,19 @@ int QMouseEventTransition_ModifierMask(const QMouseEventTransition* self); void QMouseEventTransition_SetModifierMask(QMouseEventTransition* self, int modifiers); QPainterPath* QMouseEventTransition_HitTestPath(const QMouseEventTransition* self); void QMouseEventTransition_SetHitTestPath(QMouseEventTransition* self, QPainterPath* path); +void QMouseEventTransition_OnTransition(QMouseEventTransition* self, QEvent* event); +bool QMouseEventTransition_EventTest(QMouseEventTransition* self, QEvent* event); struct miqt_string QMouseEventTransition_Tr2(const char* s, const char* c); struct miqt_string QMouseEventTransition_Tr3(const char* s, const char* c, int n); struct miqt_string QMouseEventTransition_TrUtf82(const char* s, const char* c); struct miqt_string QMouseEventTransition_TrUtf83(const char* s, const char* c, int n); -void QMouseEventTransition_Delete(QMouseEventTransition* self); +void QMouseEventTransition_override_virtual_OnTransition(void* self, intptr_t slot); +void QMouseEventTransition_virtualbase_OnTransition(void* self, QEvent* event); +void QMouseEventTransition_override_virtual_EventTest(void* self, intptr_t slot); +bool QMouseEventTransition_virtualbase_EventTest(void* self, QEvent* event); +void QMouseEventTransition_override_virtual_Event(void* self, intptr_t slot); +bool QMouseEventTransition_virtualbase_Event(void* self, QEvent* e); +void QMouseEventTransition_Delete(QMouseEventTransition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmovie.cpp b/qt/gen_qmovie.cpp index 5a83f807..823dd964 100644 --- a/qt/gen_qmovie.cpp +++ b/qt/gen_qmovie.cpp @@ -1,8 +1,11 @@ #include +#include #include +#include #include #include #include +#include #include #include #include @@ -12,47 +15,251 @@ #include #include #include +#include #include #include "gen_qmovie.h" #include "_cgo_export.h" -QMovie* QMovie_new() { - return new QMovie(); +class MiqtVirtualQMovie : public virtual QMovie { +public: + + MiqtVirtualQMovie(): QMovie() {}; + MiqtVirtualQMovie(QIODevice* device): QMovie(device) {}; + MiqtVirtualQMovie(const QString& fileName): QMovie(fileName) {}; + MiqtVirtualQMovie(QObject* parent): QMovie(parent) {}; + MiqtVirtualQMovie(QIODevice* device, const QByteArray& format): QMovie(device, format) {}; + MiqtVirtualQMovie(QIODevice* device, const QByteArray& format, QObject* parent): QMovie(device, format, parent) {}; + MiqtVirtualQMovie(const QString& fileName, const QByteArray& format): QMovie(fileName, format) {}; + MiqtVirtualQMovie(const QString& fileName, const QByteArray& format, QObject* parent): QMovie(fileName, format, parent) {}; + + virtual ~MiqtVirtualQMovie() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMovie::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMovie_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMovie::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMovie::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMovie_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMovie::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMovie::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMovie_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMovie::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMovie::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMovie_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMovie::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMovie::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMovie_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMovie::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMovie::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMovie_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMovie::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMovie::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMovie_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMovie::disconnectNotify(*signal); + + } + +}; + +void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject) { + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new2(QIODevice* device) { - return new QMovie(device); +void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject) { + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new3(struct miqt_string fileName) { +void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QMovie(fileName_QString); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new4(QObject* parent) { - return new QMovie(parent); +void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(parent); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new5(QIODevice* device, struct miqt_string format) { +void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { QByteArray format_QByteArray(format.data, format.len); - return new QMovie(device, format_QByteArray); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent) { +void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { QByteArray format_QByteArray(format.data, format.len); - return new QMovie(device, format_QByteArray, parent); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray, parent); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format) { +void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QMovie(fileName_QString, format_QByteArray); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent) { +void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QMovie(fileName_QString, format_QByteArray, parent); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray, parent); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMovie_MetaObject(const QMovie* self) { @@ -232,7 +439,7 @@ void QMovie_Started(QMovie* self) { } void QMovie_connect_Started(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::started), self, [=]() { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::started), self, [=]() { miqt_exec_callback_QMovie_Started(slot); }); } @@ -242,7 +449,7 @@ void QMovie_Resized(QMovie* self, QSize* size) { } void QMovie_connect_Resized(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::resized), self, [=](const QSize& size) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::resized), self, [=](const QSize& size) { const QSize& size_ret = size; // Cast returned reference into pointer QSize* sigval1 = const_cast(&size_ret); @@ -255,7 +462,7 @@ void QMovie_Updated(QMovie* self, QRect* rect) { } void QMovie_connect_Updated(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::updated), self, [=](const QRect& rect) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::updated), self, [=](const QRect& rect) { const QRect& rect_ret = rect; // Cast returned reference into pointer QRect* sigval1 = const_cast(&rect_ret); @@ -268,7 +475,7 @@ void QMovie_StateChanged(QMovie* self, int state) { } void QMovie_connect_StateChanged(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::stateChanged), self, [=](QMovie::MovieState state) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::stateChanged), self, [=](QMovie::MovieState state) { QMovie::MovieState state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QMovie_StateChanged(slot, sigval1); @@ -280,7 +487,7 @@ void QMovie_Error(QMovie* self, int error) { } void QMovie_connect_Error(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::error), self, [=](QImageReader::ImageReaderError error) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::error), self, [=](QImageReader::ImageReaderError error) { QImageReader::ImageReaderError error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QMovie_Error(slot, sigval1); @@ -292,7 +499,7 @@ void QMovie_Finished(QMovie* self) { } void QMovie_connect_Finished(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::finished), self, [=]() { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::finished), self, [=]() { miqt_exec_callback_QMovie_Finished(slot); }); } @@ -302,7 +509,7 @@ void QMovie_FrameChanged(QMovie* self, int frameNumber) { } void QMovie_connect_FrameChanged(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::frameChanged), self, [=](int frameNumber) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::frameChanged), self, [=](int frameNumber) { int sigval1 = frameNumber; miqt_exec_callback_QMovie_FrameChanged(slot, sigval1); }); @@ -372,7 +579,67 @@ struct miqt_string QMovie_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QMovie_Delete(QMovie* self) { - delete self; +void QMovie_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__Event = slot; +} + +bool QMovie_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMovie*)(self) )->virtualbase_Event(event); +} + +void QMovie_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__EventFilter = slot; +} + +bool QMovie_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMovie*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMovie_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__TimerEvent = slot; +} + +void QMovie_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_TimerEvent(event); +} + +void QMovie_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__ChildEvent = slot; +} + +void QMovie_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_ChildEvent(event); +} + +void QMovie_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__CustomEvent = slot; +} + +void QMovie_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_CustomEvent(event); +} + +void QMovie_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__ConnectNotify = slot; +} + +void QMovie_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMovie_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__DisconnectNotify = slot; +} + +void QMovie_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMovie_Delete(QMovie* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmovie.go b/qt/gen_qmovie.go index 9ecf03ae..a6fba279 100644 --- a/qt/gen_qmovie.go +++ b/qt/gen_qmovie.go @@ -30,7 +30,8 @@ const ( ) type QMovie struct { - h *C.QMovie + h *C.QMovie + isSubclass bool *QObject } @@ -48,27 +49,45 @@ func (this *QMovie) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMovie(h *C.QMovie) *QMovie { +// newQMovie constructs the type using only CGO pointers. +func newQMovie(h *C.QMovie, h_QObject *C.QObject) *QMovie { if h == nil { return nil } - return &QMovie{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QMovie{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQMovie(h unsafe.Pointer) *QMovie { - return newQMovie((*C.QMovie)(h)) +// UnsafeNewQMovie constructs the type using only unsafe pointers. +func UnsafeNewQMovie(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMovie { + if h == nil { + return nil + } + + return &QMovie{h: (*C.QMovie)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQMovie constructs a new QMovie object. func NewQMovie() *QMovie { - ret := C.QMovie_new() - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new(&outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie2 constructs a new QMovie object. func NewQMovie2(device *QIODevice) *QMovie { - ret := C.QMovie_new2(device.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new2(device.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie3 constructs a new QMovie object. @@ -77,14 +96,24 @@ func NewQMovie3(fileName string) *QMovie { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QMovie_new3(fileName_ms) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new3(fileName_ms, &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie4 constructs a new QMovie object. func NewQMovie4(parent *QObject) *QMovie { - ret := C.QMovie_new4(parent.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new4(parent.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie5 constructs a new QMovie object. @@ -92,8 +121,13 @@ func NewQMovie5(device *QIODevice, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new5(device.cPointer(), format_alias) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new5(device.cPointer(), format_alias, &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie6 constructs a new QMovie object. @@ -101,8 +135,13 @@ func NewQMovie6(device *QIODevice, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie7 constructs a new QMovie object. @@ -114,8 +153,13 @@ func NewQMovie7(fileName string, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new7(fileName_ms, format_alias) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new7(fileName_ms, format_alias, &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie8 constructs a new QMovie object. @@ -127,8 +171,13 @@ func NewQMovie8(fileName string, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new8(fileName_ms, format_alias, parent.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new8(fileName_ms, format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMovie) MetaObject() *QMetaObject { @@ -177,7 +226,7 @@ func (this *QMovie) SetDevice(device *QIODevice) { } func (this *QMovie) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QMovie_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QMovie_Device(this.h)), nil) } func (this *QMovie) SetFileName(fileName string) { @@ -233,14 +282,14 @@ func (this *QMovie) FrameRect() *QRect { func (this *QMovie) CurrentImage() *QImage { _ret := C.QMovie_CurrentImage(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QMovie) CurrentPixmap() *QPixmap { _ret := C.QMovie_CurrentPixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -501,9 +550,175 @@ func QMovie_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QMovie) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMovie_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMovie) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMovie_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_Event +func miqt_exec_callback_QMovie_Event(self *C.QMovie, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMovie{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMovie) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QMovie_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QMovie) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QMovie_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_EventFilter +func miqt_exec_callback_QMovie_EventFilter(self *C.QMovie, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMovie{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMovie) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QMovie_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMovie) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QMovie_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_TimerEvent +func miqt_exec_callback_QMovie_TimerEvent(self *C.QMovie, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMovie{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMovie) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QMovie_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMovie) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QMovie_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_ChildEvent +func miqt_exec_callback_QMovie_ChildEvent(self *C.QMovie, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMovie{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMovie) callVirtualBase_CustomEvent(event *QEvent) { + + C.QMovie_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMovie) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMovie_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_CustomEvent +func miqt_exec_callback_QMovie_CustomEvent(self *C.QMovie, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMovie{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMovie) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QMovie_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMovie) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMovie_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_ConnectNotify +func miqt_exec_callback_QMovie_ConnectNotify(self *C.QMovie, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMovie{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMovie) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QMovie_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMovie) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMovie_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_DisconnectNotify +func miqt_exec_callback_QMovie_DisconnectNotify(self *C.QMovie, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMovie{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMovie) Delete() { - C.QMovie_Delete(this.h) + C.QMovie_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmovie.h b/qt/gen_qmovie.h index f54ef5a0..69bf6dd3 100644 --- a/qt/gen_qmovie.h +++ b/qt/gen_qmovie.h @@ -16,36 +16,44 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QColor; +class QEvent; class QIODevice; class QImage; +class QMetaMethod; class QMetaObject; class QMovie; class QObject; class QPixmap; class QRect; class QSize; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; typedef struct QImage QImage; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QMovie QMovie; typedef struct QObject QObject; typedef struct QPixmap QPixmap; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; #endif -QMovie* QMovie_new(); -QMovie* QMovie_new2(QIODevice* device); -QMovie* QMovie_new3(struct miqt_string fileName); -QMovie* QMovie_new4(QObject* parent); -QMovie* QMovie_new5(QIODevice* device, struct miqt_string format); -QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent); -QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format); -QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent); +void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); QMetaObject* QMovie_MetaObject(const QMovie* self); void* QMovie_Metacast(QMovie* self, const char* param1); struct miqt_string QMovie_Tr(const char* s); @@ -99,7 +107,21 @@ struct miqt_string QMovie_Tr2(const char* s, const char* c); struct miqt_string QMovie_Tr3(const char* s, const char* c, int n); struct miqt_string QMovie_TrUtf82(const char* s, const char* c); struct miqt_string QMovie_TrUtf83(const char* s, const char* c, int n); -void QMovie_Delete(QMovie* self); +void QMovie_override_virtual_Event(void* self, intptr_t slot); +bool QMovie_virtualbase_Event(void* self, QEvent* event); +void QMovie_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMovie_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMovie_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMovie_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMovie_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMovie_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMovie_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMovie_virtualbase_CustomEvent(void* self, QEvent* event); +void QMovie_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMovie_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMovie_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMovie_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMovie_Delete(QMovie* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qmutex.cpp b/qt/gen_qmutex.cpp index 0bead860..16250c4d 100644 --- a/qt/gen_qmutex.cpp +++ b/qt/gen_qmutex.cpp @@ -6,8 +6,9 @@ #include "gen_qmutex.h" #include "_cgo_export.h" -QBasicMutex* QBasicMutex_new() { - return new QBasicMutex(); +void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex) { + QBasicMutex* ret = new QBasicMutex(); + *outptr_QBasicMutex = ret; } void QBasicMutex_Lock(QBasicMutex* self) { @@ -34,16 +35,24 @@ bool QBasicMutex_IsRecursive2(const QBasicMutex* self) { return self->isRecursive(); } -void QBasicMutex_Delete(QBasicMutex* self) { - delete self; +void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMutex* QMutex_new() { - return new QMutex(); +void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex) { + QMutex* ret = new QMutex(); + *outptr_QMutex = ret; + *outptr_QBasicMutex = static_cast(ret); } -QMutex* QMutex_new2(int mode) { - return new QMutex(static_cast(mode)); +void QMutex_new2(int mode, QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex) { + QMutex* ret = new QMutex(static_cast(mode)); + *outptr_QMutex = ret; + *outptr_QBasicMutex = static_cast(ret); } void QMutex_Lock(QMutex* self) { @@ -70,24 +79,35 @@ bool QMutex_TryLock1(QMutex* self, int timeout) { return self->tryLock(static_cast(timeout)); } -void QMutex_Delete(QMutex* self) { - delete self; +void QMutex_Delete(QMutex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRecursiveMutex* QRecursiveMutex_new() { - return new QRecursiveMutex(); +void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex) { + QRecursiveMutex* ret = new QRecursiveMutex(); + *outptr_QRecursiveMutex = ret; } -void QRecursiveMutex_Delete(QRecursiveMutex* self) { - delete self; +void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMutexLocker* QMutexLocker_new(QBasicMutex* m) { - return new QMutexLocker(m); +void QMutexLocker_new(QBasicMutex* m, QMutexLocker** outptr_QMutexLocker) { + QMutexLocker* ret = new QMutexLocker(m); + *outptr_QMutexLocker = ret; } -QMutexLocker* QMutexLocker_new2(QRecursiveMutex* m) { - return new QMutexLocker(m); +void QMutexLocker_new2(QRecursiveMutex* m, QMutexLocker** outptr_QMutexLocker) { + QMutexLocker* ret = new QMutexLocker(m); + *outptr_QMutexLocker = ret; } void QMutexLocker_Unlock(QMutexLocker* self) { @@ -102,7 +122,11 @@ QMutex* QMutexLocker_Mutex(const QMutexLocker* self) { return self->mutex(); } -void QMutexLocker_Delete(QMutexLocker* self) { - delete self; +void QMutexLocker_Delete(QMutexLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qmutex.go b/qt/gen_qmutex.go index a0037032..3ad9e8f0 100644 --- a/qt/gen_qmutex.go +++ b/qt/gen_qmutex.go @@ -21,7 +21,8 @@ const ( ) type QBasicMutex struct { - h *C.QBasicMutex + h *C.QBasicMutex + isSubclass bool } func (this *QBasicMutex) cPointer() *C.QBasicMutex { @@ -38,6 +39,7 @@ func (this *QBasicMutex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBasicMutex constructs the type using only CGO pointers. func newQBasicMutex(h *C.QBasicMutex) *QBasicMutex { if h == nil { return nil @@ -45,14 +47,23 @@ func newQBasicMutex(h *C.QBasicMutex) *QBasicMutex { return &QBasicMutex{h: h} } +// UnsafeNewQBasicMutex constructs the type using only unsafe pointers. func UnsafeNewQBasicMutex(h unsafe.Pointer) *QBasicMutex { - return newQBasicMutex((*C.QBasicMutex)(h)) + if h == nil { + return nil + } + + return &QBasicMutex{h: (*C.QBasicMutex)(h)} } // NewQBasicMutex constructs a new QBasicMutex object. func NewQBasicMutex() *QBasicMutex { - ret := C.QBasicMutex_new() - return newQBasicMutex(ret) + var outptr_QBasicMutex *C.QBasicMutex = nil + + C.QBasicMutex_new(&outptr_QBasicMutex) + ret := newQBasicMutex(outptr_QBasicMutex) + ret.isSubclass = true + return ret } func (this *QBasicMutex) Lock() { @@ -81,7 +92,7 @@ func (this *QBasicMutex) IsRecursive2() bool { // Delete this object from C++ memory. func (this *QBasicMutex) Delete() { - C.QBasicMutex_Delete(this.h) + C.QBasicMutex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -94,7 +105,8 @@ func (this *QBasicMutex) GoGC() { } type QMutex struct { - h *C.QMutex + h *C.QMutex + isSubclass bool *QBasicMutex } @@ -112,27 +124,45 @@ func (this *QMutex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMutex(h *C.QMutex) *QMutex { +// newQMutex constructs the type using only CGO pointers. +func newQMutex(h *C.QMutex, h_QBasicMutex *C.QBasicMutex) *QMutex { if h == nil { return nil } - return &QMutex{h: h, QBasicMutex: UnsafeNewQBasicMutex(unsafe.Pointer(h))} + return &QMutex{h: h, + QBasicMutex: newQBasicMutex(h_QBasicMutex)} } -func UnsafeNewQMutex(h unsafe.Pointer) *QMutex { - return newQMutex((*C.QMutex)(h)) +// UnsafeNewQMutex constructs the type using only unsafe pointers. +func UnsafeNewQMutex(h unsafe.Pointer, h_QBasicMutex unsafe.Pointer) *QMutex { + if h == nil { + return nil + } + + return &QMutex{h: (*C.QMutex)(h), + QBasicMutex: UnsafeNewQBasicMutex(h_QBasicMutex)} } // NewQMutex constructs a new QMutex object. func NewQMutex() *QMutex { - ret := C.QMutex_new() - return newQMutex(ret) + var outptr_QMutex *C.QMutex = nil + var outptr_QBasicMutex *C.QBasicMutex = nil + + C.QMutex_new(&outptr_QMutex, &outptr_QBasicMutex) + ret := newQMutex(outptr_QMutex, outptr_QBasicMutex) + ret.isSubclass = true + return ret } // NewQMutex2 constructs a new QMutex object. func NewQMutex2(mode QMutex__RecursionMode) *QMutex { - ret := C.QMutex_new2((C.int)(mode)) - return newQMutex(ret) + var outptr_QMutex *C.QMutex = nil + var outptr_QBasicMutex *C.QBasicMutex = nil + + C.QMutex_new2((C.int)(mode), &outptr_QMutex, &outptr_QBasicMutex) + ret := newQMutex(outptr_QMutex, outptr_QBasicMutex) + ret.isSubclass = true + return ret } func (this *QMutex) Lock() { @@ -161,7 +191,7 @@ func (this *QMutex) TryLock1(timeout int) bool { // Delete this object from C++ memory. func (this *QMutex) Delete() { - C.QMutex_Delete(this.h) + C.QMutex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -174,7 +204,8 @@ func (this *QMutex) GoGC() { } type QRecursiveMutex struct { - h *C.QRecursiveMutex + h *C.QRecursiveMutex + isSubclass bool } func (this *QRecursiveMutex) cPointer() *C.QRecursiveMutex { @@ -191,6 +222,7 @@ func (this *QRecursiveMutex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRecursiveMutex constructs the type using only CGO pointers. func newQRecursiveMutex(h *C.QRecursiveMutex) *QRecursiveMutex { if h == nil { return nil @@ -198,19 +230,28 @@ func newQRecursiveMutex(h *C.QRecursiveMutex) *QRecursiveMutex { return &QRecursiveMutex{h: h} } +// UnsafeNewQRecursiveMutex constructs the type using only unsafe pointers. func UnsafeNewQRecursiveMutex(h unsafe.Pointer) *QRecursiveMutex { - return newQRecursiveMutex((*C.QRecursiveMutex)(h)) + if h == nil { + return nil + } + + return &QRecursiveMutex{h: (*C.QRecursiveMutex)(h)} } // NewQRecursiveMutex constructs a new QRecursiveMutex object. func NewQRecursiveMutex() *QRecursiveMutex { - ret := C.QRecursiveMutex_new() - return newQRecursiveMutex(ret) + var outptr_QRecursiveMutex *C.QRecursiveMutex = nil + + C.QRecursiveMutex_new(&outptr_QRecursiveMutex) + ret := newQRecursiveMutex(outptr_QRecursiveMutex) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QRecursiveMutex) Delete() { - C.QRecursiveMutex_Delete(this.h) + C.QRecursiveMutex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -223,7 +264,8 @@ func (this *QRecursiveMutex) GoGC() { } type QMutexLocker struct { - h *C.QMutexLocker + h *C.QMutexLocker + isSubclass bool } func (this *QMutexLocker) cPointer() *C.QMutexLocker { @@ -240,6 +282,7 @@ func (this *QMutexLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMutexLocker constructs the type using only CGO pointers. func newQMutexLocker(h *C.QMutexLocker) *QMutexLocker { if h == nil { return nil @@ -247,20 +290,33 @@ func newQMutexLocker(h *C.QMutexLocker) *QMutexLocker { return &QMutexLocker{h: h} } +// UnsafeNewQMutexLocker constructs the type using only unsafe pointers. func UnsafeNewQMutexLocker(h unsafe.Pointer) *QMutexLocker { - return newQMutexLocker((*C.QMutexLocker)(h)) + if h == nil { + return nil + } + + return &QMutexLocker{h: (*C.QMutexLocker)(h)} } // NewQMutexLocker constructs a new QMutexLocker object. func NewQMutexLocker(m *QBasicMutex) *QMutexLocker { - ret := C.QMutexLocker_new(m.cPointer()) - return newQMutexLocker(ret) + var outptr_QMutexLocker *C.QMutexLocker = nil + + C.QMutexLocker_new(m.cPointer(), &outptr_QMutexLocker) + ret := newQMutexLocker(outptr_QMutexLocker) + ret.isSubclass = true + return ret } // NewQMutexLocker2 constructs a new QMutexLocker object. func NewQMutexLocker2(m *QRecursiveMutex) *QMutexLocker { - ret := C.QMutexLocker_new2(m.cPointer()) - return newQMutexLocker(ret) + var outptr_QMutexLocker *C.QMutexLocker = nil + + C.QMutexLocker_new2(m.cPointer(), &outptr_QMutexLocker) + ret := newQMutexLocker(outptr_QMutexLocker) + ret.isSubclass = true + return ret } func (this *QMutexLocker) Unlock() { @@ -272,12 +328,12 @@ func (this *QMutexLocker) Relock() { } func (this *QMutexLocker) Mutex() *QMutex { - return UnsafeNewQMutex(unsafe.Pointer(C.QMutexLocker_Mutex(this.h))) + return UnsafeNewQMutex(unsafe.Pointer(C.QMutexLocker_Mutex(this.h)), nil) } // Delete this object from C++ memory. func (this *QMutexLocker) Delete() { - C.QMutexLocker_Delete(this.h) + C.QMutexLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qmutex.h b/qt/gen_qmutex.h index 4c9efc68..d5ef6528 100644 --- a/qt/gen_qmutex.h +++ b/qt/gen_qmutex.h @@ -26,34 +26,34 @@ typedef struct QMutexLocker QMutexLocker; typedef struct QRecursiveMutex QRecursiveMutex; #endif -QBasicMutex* QBasicMutex_new(); +void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex); void QBasicMutex_Lock(QBasicMutex* self); void QBasicMutex_Unlock(QBasicMutex* self); bool QBasicMutex_TryLock(QBasicMutex* self); bool QBasicMutex_TryLock2(QBasicMutex* self); bool QBasicMutex_IsRecursive(QBasicMutex* self); bool QBasicMutex_IsRecursive2(const QBasicMutex* self); -void QBasicMutex_Delete(QBasicMutex* self); +void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass); -QMutex* QMutex_new(); -QMutex* QMutex_new2(int mode); +void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex); +void QMutex_new2(int mode, QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex); void QMutex_Lock(QMutex* self); bool QMutex_TryLock(QMutex* self); void QMutex_Unlock(QMutex* self); bool QMutex_TryLock2(QMutex* self); bool QMutex_IsRecursive(const QMutex* self); bool QMutex_TryLock1(QMutex* self, int timeout); -void QMutex_Delete(QMutex* self); +void QMutex_Delete(QMutex* self, bool isSubclass); -QRecursiveMutex* QRecursiveMutex_new(); -void QRecursiveMutex_Delete(QRecursiveMutex* self); +void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex); +void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass); -QMutexLocker* QMutexLocker_new(QBasicMutex* m); -QMutexLocker* QMutexLocker_new2(QRecursiveMutex* m); +void QMutexLocker_new(QBasicMutex* m, QMutexLocker** outptr_QMutexLocker); +void QMutexLocker_new2(QRecursiveMutex* m, QMutexLocker** outptr_QMutexLocker); void QMutexLocker_Unlock(QMutexLocker* self); void QMutexLocker_Relock(QMutexLocker* self); QMutex* QMutexLocker_Mutex(const QMutexLocker* self); -void QMutexLocker_Delete(QMutexLocker* self); +void QMutexLocker_Delete(QMutexLocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qnamespace.cpp b/qt/gen_qnamespace.cpp index c972e15c..9b684aba 100644 --- a/qt/gen_qnamespace.cpp +++ b/qt/gen_qnamespace.cpp @@ -3,7 +3,11 @@ #include "gen_qnamespace.h" #include "_cgo_export.h" -void QInternal_Delete(QInternal* self) { - delete self; +void QInternal_Delete(QInternal* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qnamespace.go b/qt/gen_qnamespace.go index 4e12eb82..0ae39b2a 100644 --- a/qt/gen_qnamespace.go +++ b/qt/gen_qnamespace.go @@ -1702,7 +1702,8 @@ const ( ) type QInternal struct { - h *C.QInternal + h *C.QInternal + isSubclass bool } func (this *QInternal) cPointer() *C.QInternal { @@ -1719,6 +1720,7 @@ func (this *QInternal) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQInternal constructs the type using only CGO pointers. func newQInternal(h *C.QInternal) *QInternal { if h == nil { return nil @@ -1726,13 +1728,18 @@ func newQInternal(h *C.QInternal) *QInternal { return &QInternal{h: h} } +// UnsafeNewQInternal constructs the type using only unsafe pointers. func UnsafeNewQInternal(h unsafe.Pointer) *QInternal { - return newQInternal((*C.QInternal)(h)) + if h == nil { + return nil + } + + return &QInternal{h: (*C.QInternal)(h)} } // Delete this object from C++ memory. func (this *QInternal) Delete() { - C.QInternal_Delete(this.h) + C.QInternal_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qnamespace.h b/qt/gen_qnamespace.h index 0e475d6b..19f68d80 100644 --- a/qt/gen_qnamespace.h +++ b/qt/gen_qnamespace.h @@ -20,7 +20,7 @@ class QInternal; typedef struct QInternal QInternal; #endif -void QInternal_Delete(QInternal* self); +void QInternal_Delete(QInternal* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qobject.cpp b/qt/gen_qobject.cpp index f60acc43..7ccec9c9 100644 --- a/qt/gen_qobject.cpp +++ b/qt/gen_qobject.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -12,6 +13,7 @@ #include #include #include +#include #include #include #include "gen_qobject.h" @@ -21,16 +23,203 @@ QMetaObject* QObjectData_DynamicMetaObject(const QObjectData* self) { return self->dynamicMetaObject(); } -void QObjectData_Delete(QObjectData* self) { - delete self; +void QObjectData_Delete(QObjectData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QObject* QObject_new() { - return new QObject(); +class MiqtVirtualQObject : public virtual QObject { +public: + + MiqtVirtualQObject(): QObject() {}; + MiqtVirtualQObject(QObject* parent): QObject(parent) {}; + + virtual ~MiqtVirtualQObject() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QObject::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QObject_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QObject::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QObject::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QObject_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QObject::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QObject::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QObject_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QObject::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QObject::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QObject_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QObject::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QObject::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QObject_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QObject::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QObject::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObject_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QObject::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QObject::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObject_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QObject::disconnectNotify(*signal); + + } + +}; + +void QObject_new(QObject** outptr_QObject) { + MiqtVirtualQObject* ret = new MiqtVirtualQObject(); + *outptr_QObject = ret; } -QObject* QObject_new2(QObject* parent) { - return new QObject(parent); +void QObject_new2(QObject* parent, QObject** outptr_QObject) { + MiqtVirtualQObject* ret = new MiqtVirtualQObject(parent); + *outptr_QObject = ret; } QMetaObject* QObject_MetaObject(const QObject* self) { @@ -220,7 +409,7 @@ void QObject_Destroyed(QObject* self) { } void QObject_connect_Destroyed(QObject* self, intptr_t slot) { - QObject::connect(self, static_cast(&QObject::destroyed), self, [=]() { + MiqtVirtualQObject::connect(self, static_cast(&QObject::destroyed), self, [=]() { miqt_exec_callback_QObject_Destroyed(slot); }); } @@ -298,30 +487,97 @@ void QObject_Destroyed1(QObject* self, QObject* param1) { } void QObject_connect_Destroyed1(QObject* self, intptr_t slot) { - QObject::connect(self, static_cast(&QObject::destroyed), self, [=](QObject* param1) { + MiqtVirtualQObject::connect(self, static_cast(&QObject::destroyed), self, [=](QObject* param1) { QObject* sigval1 = param1; miqt_exec_callback_QObject_Destroyed1(slot, sigval1); }); } -void QObject_Delete(QObject* self) { - delete self; +void QObject_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__Event = slot; +} + +bool QObject_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQObject*)(self) )->virtualbase_Event(event); +} + +void QObject_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__EventFilter = slot; } -QObjectUserData* QObjectUserData_new() { - return new QObjectUserData(); +bool QObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQObject*)(self) )->virtualbase_EventFilter(watched, event); } -void QObjectUserData_Delete(QObjectUserData* self) { - delete self; +void QObject_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__TimerEvent = slot; } -QSignalBlocker* QSignalBlocker_new(QObject* o) { - return new QSignalBlocker(o); +void QObject_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_TimerEvent(event); } -QSignalBlocker* QSignalBlocker_new2(QObject* o) { - return new QSignalBlocker(*o); +void QObject_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__ChildEvent = slot; +} + +void QObject_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_ChildEvent(event); +} + +void QObject_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__CustomEvent = slot; +} + +void QObject_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_CustomEvent(event); +} + +void QObject_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__ConnectNotify = slot; +} + +void QObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QObject_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__DisconnectNotify = slot; +} + +void QObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QObject_Delete(QObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QObjectUserData_new(QObjectUserData** outptr_QObjectUserData) { + QObjectUserData* ret = new QObjectUserData(); + *outptr_QObjectUserData = ret; +} + +void QObjectUserData_Delete(QObjectUserData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { + QSignalBlocker* ret = new QSignalBlocker(o); + *outptr_QSignalBlocker = ret; +} + +void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { + QSignalBlocker* ret = new QSignalBlocker(*o); + *outptr_QSignalBlocker = ret; } void QSignalBlocker_Reblock(QSignalBlocker* self) { @@ -332,7 +588,11 @@ void QSignalBlocker_Unblock(QSignalBlocker* self) { self->unblock(); } -void QSignalBlocker_Delete(QSignalBlocker* self) { - delete self; +void QSignalBlocker_Delete(QSignalBlocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qobject.go b/qt/gen_qobject.go index e16f023e..57040170 100644 --- a/qt/gen_qobject.go +++ b/qt/gen_qobject.go @@ -21,7 +21,8 @@ const ( ) type QObjectData struct { - h *C.QObjectData + h *C.QObjectData + isSubclass bool } func (this *QObjectData) cPointer() *C.QObjectData { @@ -38,6 +39,7 @@ func (this *QObjectData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQObjectData constructs the type using only CGO pointers. func newQObjectData(h *C.QObjectData) *QObjectData { if h == nil { return nil @@ -45,8 +47,13 @@ func newQObjectData(h *C.QObjectData) *QObjectData { return &QObjectData{h: h} } +// UnsafeNewQObjectData constructs the type using only unsafe pointers. func UnsafeNewQObjectData(h unsafe.Pointer) *QObjectData { - return newQObjectData((*C.QObjectData)(h)) + if h == nil { + return nil + } + + return &QObjectData{h: (*C.QObjectData)(h)} } func (this *QObjectData) DynamicMetaObject() *QMetaObject { @@ -55,7 +62,7 @@ func (this *QObjectData) DynamicMetaObject() *QMetaObject { // Delete this object from C++ memory. func (this *QObjectData) Delete() { - C.QObjectData_Delete(this.h) + C.QObjectData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -68,7 +75,8 @@ func (this *QObjectData) GoGC() { } type QObject struct { - h *C.QObject + h *C.QObject + isSubclass bool } func (this *QObject) cPointer() *C.QObject { @@ -85,6 +93,7 @@ func (this *QObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQObject constructs the type using only CGO pointers. func newQObject(h *C.QObject) *QObject { if h == nil { return nil @@ -92,20 +101,33 @@ func newQObject(h *C.QObject) *QObject { return &QObject{h: h} } +// UnsafeNewQObject constructs the type using only unsafe pointers. func UnsafeNewQObject(h unsafe.Pointer) *QObject { - return newQObject((*C.QObject)(h)) + if h == nil { + return nil + } + + return &QObject{h: (*C.QObject)(h)} } // NewQObject constructs a new QObject object. func NewQObject() *QObject { - ret := C.QObject_new() - return newQObject(ret) + var outptr_QObject *C.QObject = nil + + C.QObject_new(&outptr_QObject) + ret := newQObject(outptr_QObject) + ret.isSubclass = true + return ret } // NewQObject2 constructs a new QObject object. func NewQObject2(parent *QObject) *QObject { - ret := C.QObject_new2(parent.cPointer()) - return newQObject(ret) + var outptr_QObject *C.QObject = nil + + C.QObject_new2(parent.cPointer(), &outptr_QObject) + ret := newQObject(outptr_QObject) + ret.isSubclass = true + return ret } func (this *QObject) MetaObject() *QMetaObject { @@ -176,7 +198,7 @@ func (this *QObject) BlockSignals(b bool) bool { } func (this *QObject) Thread() *QThread { - return UnsafeNewQThread(unsafe.Pointer(C.QObject_Thread(this.h))) + return UnsafeNewQThread(unsafe.Pointer(C.QObject_Thread(this.h)), nil) } func (this *QObject) MoveToThread(thread *QThread) { @@ -412,9 +434,175 @@ func miqt_exec_callback_QObject_Destroyed1(cb C.intptr_t, param1 *C.QObject) { gofunc(slotval1) } +func (this *QObject) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QObject_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QObject) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QObject_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_Event +func miqt_exec_callback_QObject_Event(self *C.QObject, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObject{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QObject) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QObject_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QObject) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QObject_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_EventFilter +func miqt_exec_callback_QObject_EventFilter(self *C.QObject, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObject{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QObject) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QObject_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObject) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QObject_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_TimerEvent +func miqt_exec_callback_QObject_TimerEvent(self *C.QObject, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QObject{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QObject) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QObject_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObject) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QObject_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_ChildEvent +func miqt_exec_callback_QObject_ChildEvent(self *C.QObject, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QObject{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QObject) callVirtualBase_CustomEvent(event *QEvent) { + + C.QObject_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObject) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QObject_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_CustomEvent +func miqt_exec_callback_QObject_CustomEvent(self *C.QObject, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QObject{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QObject) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QObject_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObject) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObject_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_ConnectNotify +func miqt_exec_callback_QObject_ConnectNotify(self *C.QObject, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObject{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QObject) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QObject_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObject) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObject_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_DisconnectNotify +func miqt_exec_callback_QObject_DisconnectNotify(self *C.QObject, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObject{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QObject) Delete() { - C.QObject_Delete(this.h) + C.QObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -427,7 +615,8 @@ func (this *QObject) GoGC() { } type QObjectUserData struct { - h *C.QObjectUserData + h *C.QObjectUserData + isSubclass bool } func (this *QObjectUserData) cPointer() *C.QObjectUserData { @@ -444,6 +633,7 @@ func (this *QObjectUserData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQObjectUserData constructs the type using only CGO pointers. func newQObjectUserData(h *C.QObjectUserData) *QObjectUserData { if h == nil { return nil @@ -451,19 +641,28 @@ func newQObjectUserData(h *C.QObjectUserData) *QObjectUserData { return &QObjectUserData{h: h} } +// UnsafeNewQObjectUserData constructs the type using only unsafe pointers. func UnsafeNewQObjectUserData(h unsafe.Pointer) *QObjectUserData { - return newQObjectUserData((*C.QObjectUserData)(h)) + if h == nil { + return nil + } + + return &QObjectUserData{h: (*C.QObjectUserData)(h)} } // NewQObjectUserData constructs a new QObjectUserData object. func NewQObjectUserData() *QObjectUserData { - ret := C.QObjectUserData_new() - return newQObjectUserData(ret) + var outptr_QObjectUserData *C.QObjectUserData = nil + + C.QObjectUserData_new(&outptr_QObjectUserData) + ret := newQObjectUserData(outptr_QObjectUserData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QObjectUserData) Delete() { - C.QObjectUserData_Delete(this.h) + C.QObjectUserData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -476,7 +675,8 @@ func (this *QObjectUserData) GoGC() { } type QSignalBlocker struct { - h *C.QSignalBlocker + h *C.QSignalBlocker + isSubclass bool } func (this *QSignalBlocker) cPointer() *C.QSignalBlocker { @@ -493,6 +693,7 @@ func (this *QSignalBlocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSignalBlocker constructs the type using only CGO pointers. func newQSignalBlocker(h *C.QSignalBlocker) *QSignalBlocker { if h == nil { return nil @@ -500,20 +701,33 @@ func newQSignalBlocker(h *C.QSignalBlocker) *QSignalBlocker { return &QSignalBlocker{h: h} } +// UnsafeNewQSignalBlocker constructs the type using only unsafe pointers. func UnsafeNewQSignalBlocker(h unsafe.Pointer) *QSignalBlocker { - return newQSignalBlocker((*C.QSignalBlocker)(h)) + if h == nil { + return nil + } + + return &QSignalBlocker{h: (*C.QSignalBlocker)(h)} } // NewQSignalBlocker constructs a new QSignalBlocker object. func NewQSignalBlocker(o *QObject) *QSignalBlocker { - ret := C.QSignalBlocker_new(o.cPointer()) - return newQSignalBlocker(ret) + var outptr_QSignalBlocker *C.QSignalBlocker = nil + + C.QSignalBlocker_new(o.cPointer(), &outptr_QSignalBlocker) + ret := newQSignalBlocker(outptr_QSignalBlocker) + ret.isSubclass = true + return ret } // NewQSignalBlocker2 constructs a new QSignalBlocker object. func NewQSignalBlocker2(o *QObject) *QSignalBlocker { - ret := C.QSignalBlocker_new2(o.cPointer()) - return newQSignalBlocker(ret) + var outptr_QSignalBlocker *C.QSignalBlocker = nil + + C.QSignalBlocker_new2(o.cPointer(), &outptr_QSignalBlocker) + ret := newQSignalBlocker(outptr_QSignalBlocker) + ret.isSubclass = true + return ret } func (this *QSignalBlocker) Reblock() { @@ -526,7 +740,7 @@ func (this *QSignalBlocker) Unblock() { // Delete this object from C++ memory. func (this *QSignalBlocker) Delete() { - C.QSignalBlocker_Delete(this.h) + C.QSignalBlocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qobject.h b/qt/gen_qobject.h index 9ef93f8a..838063c6 100644 --- a/qt/gen_qobject.h +++ b/qt/gen_qobject.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QEvent; class QMetaMethod; class QMetaObject; @@ -29,9 +30,11 @@ class QObjectData; class QObjectUserData; class QSignalBlocker; class QThread; +class QTimerEvent; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; @@ -41,14 +44,15 @@ typedef struct QObjectData QObjectData; typedef struct QObjectUserData QObjectUserData; typedef struct QSignalBlocker QSignalBlocker; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif QMetaObject* QObjectData_DynamicMetaObject(const QObjectData* self); -void QObjectData_Delete(QObjectData* self); +void QObjectData_Delete(QObjectData* self, bool isSubclass); -QObject* QObject_new(); -QObject* QObject_new2(QObject* parent); +void QObject_new(QObject** outptr_QObject); +void QObject_new2(QObject* parent, QObject** outptr_QObject); QMetaObject* QObject_MetaObject(const QObject* self); void* QObject_Metacast(QObject* self, const char* param1); struct miqt_string QObject_Tr(const char* s); @@ -88,6 +92,11 @@ void QObject_connect_Destroyed(QObject* self, intptr_t slot); QObject* QObject_Parent(const QObject* self); bool QObject_Inherits(const QObject* self, const char* classname); void QObject_DeleteLater(QObject* self); +void QObject_TimerEvent(QObject* self, QTimerEvent* event); +void QObject_ChildEvent(QObject* self, QChildEvent* event); +void QObject_CustomEvent(QObject* self, QEvent* event); +void QObject_ConnectNotify(QObject* self, QMetaMethod* signal); +void QObject_DisconnectNotify(QObject* self, QMetaMethod* signal); struct miqt_string QObject_Tr2(const char* s, const char* c); struct miqt_string QObject_Tr3(const char* s, const char* c, int n); struct miqt_string QObject_TrUtf82(const char* s, const char* c); @@ -97,16 +106,30 @@ QMetaObject__Connection* QObject_Connect5(QObject* sender, QMetaMethod* signal, QMetaObject__Connection* QObject_Connect4(const QObject* self, QObject* sender, const char* signal, const char* member, int typeVal); void QObject_Destroyed1(QObject* self, QObject* param1); void QObject_connect_Destroyed1(QObject* self, intptr_t slot); -void QObject_Delete(QObject* self); +void QObject_override_virtual_Event(void* self, intptr_t slot); +bool QObject_virtualbase_Event(void* self, QEvent* event); +void QObject_override_virtual_EventFilter(void* self, intptr_t slot); +bool QObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QObject_override_virtual_TimerEvent(void* self, intptr_t slot); +void QObject_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QObject_override_virtual_ChildEvent(void* self, intptr_t slot); +void QObject_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QObject_override_virtual_CustomEvent(void* self, intptr_t slot); +void QObject_virtualbase_CustomEvent(void* self, QEvent* event); +void QObject_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QObject_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QObject_Delete(QObject* self, bool isSubclass); -QObjectUserData* QObjectUserData_new(); -void QObjectUserData_Delete(QObjectUserData* self); +void QObjectUserData_new(QObjectUserData** outptr_QObjectUserData); +void QObjectUserData_Delete(QObjectUserData* self, bool isSubclass); -QSignalBlocker* QSignalBlocker_new(QObject* o); -QSignalBlocker* QSignalBlocker_new2(QObject* o); +void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker); +void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker); void QSignalBlocker_Reblock(QSignalBlocker* self); void QSignalBlocker_Unblock(QSignalBlocker* self); -void QSignalBlocker_Delete(QSignalBlocker* self); +void QSignalBlocker_Delete(QSignalBlocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qobjectcleanuphandler.cpp b/qt/gen_qobjectcleanuphandler.cpp index b8f55f44..d56e201a 100644 --- a/qt/gen_qobjectcleanuphandler.cpp +++ b/qt/gen_qobjectcleanuphandler.cpp @@ -1,15 +1,201 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qobjectcleanuphandler.h" #include "_cgo_export.h" -QObjectCleanupHandler* QObjectCleanupHandler_new() { - return new QObjectCleanupHandler(); +class MiqtVirtualQObjectCleanupHandler : public virtual QObjectCleanupHandler { +public: + + MiqtVirtualQObjectCleanupHandler(): QObjectCleanupHandler() {}; + + virtual ~MiqtVirtualQObjectCleanupHandler() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QObjectCleanupHandler::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QObjectCleanupHandler_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QObjectCleanupHandler::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QObjectCleanupHandler::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QObjectCleanupHandler_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QObjectCleanupHandler::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QObjectCleanupHandler::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QObjectCleanupHandler_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QObjectCleanupHandler::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QObjectCleanupHandler::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QObjectCleanupHandler_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QObjectCleanupHandler::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QObjectCleanupHandler::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QObjectCleanupHandler_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QObjectCleanupHandler::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QObjectCleanupHandler::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObjectCleanupHandler_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QObjectCleanupHandler::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QObjectCleanupHandler::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObjectCleanupHandler_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QObjectCleanupHandler::disconnectNotify(*signal); + + } + +}; + +void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject) { + MiqtVirtualQObjectCleanupHandler* ret = new MiqtVirtualQObjectCleanupHandler(); + *outptr_QObjectCleanupHandler = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self) { @@ -102,7 +288,67 @@ struct miqt_string QObjectCleanupHandler_TrUtf83(const char* s, const char* c, i return _ms; } -void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self) { - delete self; +void QObjectCleanupHandler_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__Event = slot; +} + +bool QObjectCleanupHandler_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_Event(event); +} + +void QObjectCleanupHandler_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__EventFilter = slot; +} + +bool QObjectCleanupHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QObjectCleanupHandler_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__TimerEvent = slot; +} + +void QObjectCleanupHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_TimerEvent(event); +} + +void QObjectCleanupHandler_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__ChildEvent = slot; +} + +void QObjectCleanupHandler_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_ChildEvent(event); +} + +void QObjectCleanupHandler_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__CustomEvent = slot; +} + +void QObjectCleanupHandler_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_CustomEvent(event); +} + +void QObjectCleanupHandler_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__ConnectNotify = slot; +} + +void QObjectCleanupHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QObjectCleanupHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__DisconnectNotify = slot; +} + +void QObjectCleanupHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qobjectcleanuphandler.go b/qt/gen_qobjectcleanuphandler.go index 97ed3305..21c52ec3 100644 --- a/qt/gen_qobjectcleanuphandler.go +++ b/qt/gen_qobjectcleanuphandler.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QObjectCleanupHandler struct { - h *C.QObjectCleanupHandler + h *C.QObjectCleanupHandler + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QObjectCleanupHandler) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQObjectCleanupHandler(h *C.QObjectCleanupHandler) *QObjectCleanupHandler { +// newQObjectCleanupHandler constructs the type using only CGO pointers. +func newQObjectCleanupHandler(h *C.QObjectCleanupHandler, h_QObject *C.QObject) *QObjectCleanupHandler { if h == nil { return nil } - return &QObjectCleanupHandler{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QObjectCleanupHandler{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer) *QObjectCleanupHandler { - return newQObjectCleanupHandler((*C.QObjectCleanupHandler)(h)) +// UnsafeNewQObjectCleanupHandler constructs the type using only unsafe pointers. +func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QObjectCleanupHandler { + if h == nil { + return nil + } + + return &QObjectCleanupHandler{h: (*C.QObjectCleanupHandler)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQObjectCleanupHandler constructs a new QObjectCleanupHandler object. func NewQObjectCleanupHandler() *QObjectCleanupHandler { - ret := C.QObjectCleanupHandler_new() - return newQObjectCleanupHandler(ret) + var outptr_QObjectCleanupHandler *C.QObjectCleanupHandler = nil + var outptr_QObject *C.QObject = nil + + C.QObjectCleanupHandler_new(&outptr_QObjectCleanupHandler, &outptr_QObject) + ret := newQObjectCleanupHandler(outptr_QObjectCleanupHandler, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QObjectCleanupHandler) MetaObject() *QMetaObject { @@ -137,9 +152,175 @@ func QObjectCleanupHandler_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QObjectCleanupHandler) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QObjectCleanupHandler_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QObjectCleanupHandler) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QObjectCleanupHandler_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_Event +func miqt_exec_callback_QObjectCleanupHandler_Event(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QObjectCleanupHandler_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QObjectCleanupHandler) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QObjectCleanupHandler_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_EventFilter +func miqt_exec_callback_QObjectCleanupHandler_EventFilter(self *C.QObjectCleanupHandler, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QObjectCleanupHandler_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObjectCleanupHandler) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QObjectCleanupHandler_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_TimerEvent +func miqt_exec_callback_QObjectCleanupHandler_TimerEvent(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QObjectCleanupHandler_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObjectCleanupHandler) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QObjectCleanupHandler_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_ChildEvent +func miqt_exec_callback_QObjectCleanupHandler_ChildEvent(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_CustomEvent(event *QEvent) { + + C.QObjectCleanupHandler_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObjectCleanupHandler) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QObjectCleanupHandler_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_CustomEvent +func miqt_exec_callback_QObjectCleanupHandler_CustomEvent(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QObjectCleanupHandler_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObjectCleanupHandler) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObjectCleanupHandler_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_ConnectNotify +func miqt_exec_callback_QObjectCleanupHandler_ConnectNotify(self *C.QObjectCleanupHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QObjectCleanupHandler_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObjectCleanupHandler) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObjectCleanupHandler_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_DisconnectNotify +func miqt_exec_callback_QObjectCleanupHandler_DisconnectNotify(self *C.QObjectCleanupHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QObjectCleanupHandler) Delete() { - C.QObjectCleanupHandler_Delete(this.h) + C.QObjectCleanupHandler_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qobjectcleanuphandler.h b/qt/gen_qobjectcleanuphandler.h index b44672e8..de0927f6 100644 --- a/qt/gen_qobjectcleanuphandler.h +++ b/qt/gen_qobjectcleanuphandler.h @@ -15,16 +15,24 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QObjectCleanupHandler; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QObjectCleanupHandler QObjectCleanupHandler; +typedef struct QTimerEvent QTimerEvent; #endif -QObjectCleanupHandler* QObjectCleanupHandler_new(); +void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject); QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self); void* QObjectCleanupHandler_Metacast(QObjectCleanupHandler* self, const char* param1); struct miqt_string QObjectCleanupHandler_Tr(const char* s); @@ -37,7 +45,21 @@ struct miqt_string QObjectCleanupHandler_Tr2(const char* s, const char* c); struct miqt_string QObjectCleanupHandler_Tr3(const char* s, const char* c, int n); struct miqt_string QObjectCleanupHandler_TrUtf82(const char* s, const char* c); struct miqt_string QObjectCleanupHandler_TrUtf83(const char* s, const char* c, int n); -void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self); +void QObjectCleanupHandler_override_virtual_Event(void* self, intptr_t slot); +bool QObjectCleanupHandler_virtualbase_Event(void* self, QEvent* event); +void QObjectCleanupHandler_override_virtual_EventFilter(void* self, intptr_t slot); +bool QObjectCleanupHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QObjectCleanupHandler_override_virtual_TimerEvent(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QObjectCleanupHandler_override_virtual_ChildEvent(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QObjectCleanupHandler_override_virtual_CustomEvent(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_CustomEvent(void* self, QEvent* event); +void QObjectCleanupHandler_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QObjectCleanupHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qobjectdefs.cpp b/qt/gen_qobjectdefs.cpp index 7ee8aecb..92dd0b92 100644 --- a/qt/gen_qobjectdefs.cpp +++ b/qt/gen_qobjectdefs.cpp @@ -16,20 +16,24 @@ #include "gen_qobjectdefs.h" #include "_cgo_export.h" -QGenericArgument* QGenericArgument_new() { - return new QGenericArgument(); +void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(); + *outptr_QGenericArgument = ret; } -QGenericArgument* QGenericArgument_new2(QGenericArgument* param1) { - return new QGenericArgument(*param1); +void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(*param1); + *outptr_QGenericArgument = ret; } -QGenericArgument* QGenericArgument_new3(const char* aName) { - return new QGenericArgument(aName); +void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(aName); + *outptr_QGenericArgument = ret; } -QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData) { - return new QGenericArgument(aName, aData); +void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(aName, aData); + *outptr_QGenericArgument = ret; } void* QGenericArgument_Data(const QGenericArgument* self) { @@ -40,36 +44,54 @@ const char* QGenericArgument_Name(const QGenericArgument* self) { return (const char*) self->name(); } -void QGenericArgument_Delete(QGenericArgument* self) { - delete self; +void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGenericReturnArgument* QGenericReturnArgument_new() { - return new QGenericReturnArgument(); +void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1) { - return new QGenericReturnArgument(*param1); +void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(*param1); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName) { - return new QGenericReturnArgument(aName); +void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(aName); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData) { - return new QGenericReturnArgument(aName, aData); +void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(aName, aData); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -void QGenericReturnArgument_Delete(QGenericReturnArgument* self) { - delete self; +void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject* QMetaObject_new() { - return new QMetaObject(); +void QMetaObject_new(QMetaObject** outptr_QMetaObject) { + QMetaObject* ret = new QMetaObject(); + *outptr_QMetaObject = ret; } -QMetaObject* QMetaObject_new2(QMetaObject* param1) { - return new QMetaObject(*param1); +void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject) { + QMetaObject* ret = new QMetaObject(*param1); + *outptr_QMetaObject = ret; } const char* QMetaObject_ClassName(const QMetaObject* self) { @@ -472,36 +494,49 @@ QObject* QMetaObject_NewInstance10(const QMetaObject* self, QGenericArgument* va return self->newInstance(*val0, *val1, *val2, *val3, *val4, *val5, *val6, *val7, *val8, *val9); } -void QMetaObject_Delete(QMetaObject* self) { - delete self; +void QMetaObject_Delete(QMetaObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject__Connection* QMetaObject__Connection_new() { - return new QMetaObject::Connection(); +void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection) { + QMetaObject::Connection* ret = new QMetaObject::Connection(); + *outptr_QMetaObject__Connection = ret; } -QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other) { - return new QMetaObject::Connection(*other); +void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection) { + QMetaObject::Connection* ret = new QMetaObject::Connection(*other); + *outptr_QMetaObject__Connection = ret; } void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other) { self->operator=(*other); } -void QMetaObject__Connection_Delete(QMetaObject__Connection* self) { - delete self; +void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject__SuperData* QMetaObject__SuperData_new() { - return new QMetaObject::SuperData(); +void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData) { + QMetaObject::SuperData* ret = new QMetaObject::SuperData(); + *outptr_QMetaObject__SuperData = ret; } -QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo) { - return new QMetaObject::SuperData(mo); +void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { + QMetaObject::SuperData* ret = new QMetaObject::SuperData(mo); + *outptr_QMetaObject__SuperData = ret; } -QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1) { - return new QMetaObject::SuperData(*param1); +void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { + QMetaObject::SuperData* ret = new QMetaObject::SuperData(*param1); + *outptr_QMetaObject__SuperData = ret; } QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self) { @@ -512,7 +547,11 @@ void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaOb self->operator=(*param1); } -void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self) { - delete self; +void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qobjectdefs.go b/qt/gen_qobjectdefs.go index 1610a94f..a9c460df 100644 --- a/qt/gen_qobjectdefs.go +++ b/qt/gen_qobjectdefs.go @@ -32,7 +32,8 @@ const ( ) type QGenericArgument struct { - h *C.QGenericArgument + h *C.QGenericArgument + isSubclass bool } func (this *QGenericArgument) cPointer() *C.QGenericArgument { @@ -49,6 +50,7 @@ func (this *QGenericArgument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGenericArgument constructs the type using only CGO pointers. func newQGenericArgument(h *C.QGenericArgument) *QGenericArgument { if h == nil { return nil @@ -56,36 +58,57 @@ func newQGenericArgument(h *C.QGenericArgument) *QGenericArgument { return &QGenericArgument{h: h} } +// UnsafeNewQGenericArgument constructs the type using only unsafe pointers. func UnsafeNewQGenericArgument(h unsafe.Pointer) *QGenericArgument { - return newQGenericArgument((*C.QGenericArgument)(h)) + if h == nil { + return nil + } + + return &QGenericArgument{h: (*C.QGenericArgument)(h)} } // NewQGenericArgument constructs a new QGenericArgument object. func NewQGenericArgument() *QGenericArgument { - ret := C.QGenericArgument_new() - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new(&outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericArgument2 constructs a new QGenericArgument object. func NewQGenericArgument2(param1 *QGenericArgument) *QGenericArgument { - ret := C.QGenericArgument_new2(param1.cPointer()) - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new2(param1.cPointer(), &outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericArgument3 constructs a new QGenericArgument object. func NewQGenericArgument3(aName string) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericArgument_new3(aName_Cstring) - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new3(aName_Cstring, &outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericArgument4 constructs a new QGenericArgument object. func NewQGenericArgument4(aName string, aData unsafe.Pointer) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericArgument_new4(aName_Cstring, aData) - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new4(aName_Cstring, aData, &outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } func (this *QGenericArgument) Data() unsafe.Pointer { @@ -99,7 +122,7 @@ func (this *QGenericArgument) Name() string { // Delete this object from C++ memory. func (this *QGenericArgument) Delete() { - C.QGenericArgument_Delete(this.h) + C.QGenericArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -112,7 +135,8 @@ func (this *QGenericArgument) GoGC() { } type QGenericReturnArgument struct { - h *C.QGenericReturnArgument + h *C.QGenericReturnArgument + isSubclass bool *QGenericArgument } @@ -130,48 +154,76 @@ func (this *QGenericReturnArgument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGenericReturnArgument(h *C.QGenericReturnArgument) *QGenericReturnArgument { +// newQGenericReturnArgument constructs the type using only CGO pointers. +func newQGenericReturnArgument(h *C.QGenericReturnArgument, h_QGenericArgument *C.QGenericArgument) *QGenericReturnArgument { if h == nil { return nil } - return &QGenericReturnArgument{h: h, QGenericArgument: UnsafeNewQGenericArgument(unsafe.Pointer(h))} + return &QGenericReturnArgument{h: h, + QGenericArgument: newQGenericArgument(h_QGenericArgument)} } -func UnsafeNewQGenericReturnArgument(h unsafe.Pointer) *QGenericReturnArgument { - return newQGenericReturnArgument((*C.QGenericReturnArgument)(h)) +// UnsafeNewQGenericReturnArgument constructs the type using only unsafe pointers. +func UnsafeNewQGenericReturnArgument(h unsafe.Pointer, h_QGenericArgument unsafe.Pointer) *QGenericReturnArgument { + if h == nil { + return nil + } + + return &QGenericReturnArgument{h: (*C.QGenericReturnArgument)(h), + QGenericArgument: UnsafeNewQGenericArgument(h_QGenericArgument)} } // NewQGenericReturnArgument constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument() *QGenericReturnArgument { - ret := C.QGenericReturnArgument_new() - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new(&outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericReturnArgument2 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument2(param1 *QGenericReturnArgument) *QGenericReturnArgument { - ret := C.QGenericReturnArgument_new2(param1.cPointer()) - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new2(param1.cPointer(), &outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericReturnArgument3 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument3(aName string) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericReturnArgument_new3(aName_Cstring) - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new3(aName_Cstring, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericReturnArgument4 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument4(aName string, aData unsafe.Pointer) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericReturnArgument_new4(aName_Cstring, aData) - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new4(aName_Cstring, aData, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QGenericReturnArgument) Delete() { - C.QGenericReturnArgument_Delete(this.h) + C.QGenericReturnArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -184,7 +236,8 @@ func (this *QGenericReturnArgument) GoGC() { } type QMetaObject struct { - h *C.QMetaObject + h *C.QMetaObject + isSubclass bool } func (this *QMetaObject) cPointer() *C.QMetaObject { @@ -201,6 +254,7 @@ func (this *QMetaObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject constructs the type using only CGO pointers. func newQMetaObject(h *C.QMetaObject) *QMetaObject { if h == nil { return nil @@ -208,20 +262,33 @@ func newQMetaObject(h *C.QMetaObject) *QMetaObject { return &QMetaObject{h: h} } +// UnsafeNewQMetaObject constructs the type using only unsafe pointers. func UnsafeNewQMetaObject(h unsafe.Pointer) *QMetaObject { - return newQMetaObject((*C.QMetaObject)(h)) + if h == nil { + return nil + } + + return &QMetaObject{h: (*C.QMetaObject)(h)} } // NewQMetaObject constructs a new QMetaObject object. func NewQMetaObject() *QMetaObject { - ret := C.QMetaObject_new() - return newQMetaObject(ret) + var outptr_QMetaObject *C.QMetaObject = nil + + C.QMetaObject_new(&outptr_QMetaObject) + ret := newQMetaObject(outptr_QMetaObject) + ret.isSubclass = true + return ret } // NewQMetaObject2 constructs a new QMetaObject object. func NewQMetaObject2(param1 *QMetaObject) *QMetaObject { - ret := C.QMetaObject_new2(param1.cPointer()) - return newQMetaObject(ret) + var outptr_QMetaObject *C.QMetaObject = nil + + C.QMetaObject_new2(param1.cPointer(), &outptr_QMetaObject) + ret := newQMetaObject(outptr_QMetaObject) + ret.isSubclass = true + return ret } func (this *QMetaObject) ClassName() string { @@ -760,7 +827,7 @@ func (this *QMetaObject) NewInstance10(val0 QGenericArgument, val1 QGenericArgum // Delete this object from C++ memory. func (this *QMetaObject) Delete() { - C.QMetaObject_Delete(this.h) + C.QMetaObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -773,7 +840,8 @@ func (this *QMetaObject) GoGC() { } type QMetaObject__Connection struct { - h *C.QMetaObject__Connection + h *C.QMetaObject__Connection + isSubclass bool } func (this *QMetaObject__Connection) cPointer() *C.QMetaObject__Connection { @@ -790,6 +858,7 @@ func (this *QMetaObject__Connection) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject__Connection constructs the type using only CGO pointers. func newQMetaObject__Connection(h *C.QMetaObject__Connection) *QMetaObject__Connection { if h == nil { return nil @@ -797,20 +866,33 @@ func newQMetaObject__Connection(h *C.QMetaObject__Connection) *QMetaObject__Conn return &QMetaObject__Connection{h: h} } +// UnsafeNewQMetaObject__Connection constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__Connection(h unsafe.Pointer) *QMetaObject__Connection { - return newQMetaObject__Connection((*C.QMetaObject__Connection)(h)) + if h == nil { + return nil + } + + return &QMetaObject__Connection{h: (*C.QMetaObject__Connection)(h)} } // NewQMetaObject__Connection constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection() *QMetaObject__Connection { - ret := C.QMetaObject__Connection_new() - return newQMetaObject__Connection(ret) + var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil + + C.QMetaObject__Connection_new(&outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret.isSubclass = true + return ret } // NewQMetaObject__Connection2 constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection2(other *QMetaObject__Connection) *QMetaObject__Connection { - ret := C.QMetaObject__Connection_new2(other.cPointer()) - return newQMetaObject__Connection(ret) + var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil + + C.QMetaObject__Connection_new2(other.cPointer(), &outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret.isSubclass = true + return ret } func (this *QMetaObject__Connection) OperatorAssign(other *QMetaObject__Connection) { @@ -819,7 +901,7 @@ func (this *QMetaObject__Connection) OperatorAssign(other *QMetaObject__Connecti // Delete this object from C++ memory. func (this *QMetaObject__Connection) Delete() { - C.QMetaObject__Connection_Delete(this.h) + C.QMetaObject__Connection_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -832,7 +914,8 @@ func (this *QMetaObject__Connection) GoGC() { } type QMetaObject__SuperData struct { - h *C.QMetaObject__SuperData + h *C.QMetaObject__SuperData + isSubclass bool } func (this *QMetaObject__SuperData) cPointer() *C.QMetaObject__SuperData { @@ -849,6 +932,7 @@ func (this *QMetaObject__SuperData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject__SuperData constructs the type using only CGO pointers. func newQMetaObject__SuperData(h *C.QMetaObject__SuperData) *QMetaObject__SuperData { if h == nil { return nil @@ -856,26 +940,43 @@ func newQMetaObject__SuperData(h *C.QMetaObject__SuperData) *QMetaObject__SuperD return &QMetaObject__SuperData{h: h} } +// UnsafeNewQMetaObject__SuperData constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__SuperData(h unsafe.Pointer) *QMetaObject__SuperData { - return newQMetaObject__SuperData((*C.QMetaObject__SuperData)(h)) + if h == nil { + return nil + } + + return &QMetaObject__SuperData{h: (*C.QMetaObject__SuperData)(h)} } // NewQMetaObject__SuperData constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData() *QMetaObject__SuperData { - ret := C.QMetaObject__SuperData_new() - return newQMetaObject__SuperData(ret) + var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil + + C.QMetaObject__SuperData_new(&outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret.isSubclass = true + return ret } // NewQMetaObject__SuperData2 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData2(mo *QMetaObject) *QMetaObject__SuperData { - ret := C.QMetaObject__SuperData_new2(mo.cPointer()) - return newQMetaObject__SuperData(ret) + var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil + + C.QMetaObject__SuperData_new2(mo.cPointer(), &outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret.isSubclass = true + return ret } // NewQMetaObject__SuperData3 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData3(param1 *QMetaObject__SuperData) *QMetaObject__SuperData { - ret := C.QMetaObject__SuperData_new3(param1.cPointer()) - return newQMetaObject__SuperData(ret) + var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil + + C.QMetaObject__SuperData_new3(param1.cPointer(), &outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret.isSubclass = true + return ret } func (this *QMetaObject__SuperData) OperatorMinusGreater() *QMetaObject { @@ -888,7 +989,7 @@ func (this *QMetaObject__SuperData) OperatorAssign(param1 *QMetaObject__SuperDat // Delete this object from C++ memory. func (this *QMetaObject__SuperData) Delete() { - C.QMetaObject__SuperData_Delete(this.h) + C.QMetaObject__SuperData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qobjectdefs.h b/qt/gen_qobjectdefs.h index ea400587..8ad6b9e1 100644 --- a/qt/gen_qobjectdefs.h +++ b/qt/gen_qobjectdefs.h @@ -48,22 +48,22 @@ typedef struct QMetaProperty QMetaProperty; typedef struct QObject QObject; #endif -QGenericArgument* QGenericArgument_new(); -QGenericArgument* QGenericArgument_new2(QGenericArgument* param1); -QGenericArgument* QGenericArgument_new3(const char* aName); -QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData); +void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument); +void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument); +void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument); +void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument); void* QGenericArgument_Data(const QGenericArgument* self); const char* QGenericArgument_Name(const QGenericArgument* self); -void QGenericArgument_Delete(QGenericArgument* self); +void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass); -QGenericReturnArgument* QGenericReturnArgument_new(); -QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1); -QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName); -QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData); -void QGenericReturnArgument_Delete(QGenericReturnArgument* self); +void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass); -QMetaObject* QMetaObject_new(); -QMetaObject* QMetaObject_new2(QMetaObject* param1); +void QMetaObject_new(QMetaObject** outptr_QMetaObject); +void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject); const char* QMetaObject_ClassName(const QMetaObject* self); QMetaObject* QMetaObject_SuperClass(const QMetaObject* self); bool QMetaObject_Inherits(const QMetaObject* self, QMetaObject* metaObject); @@ -158,19 +158,19 @@ QObject* QMetaObject_NewInstance7(const QMetaObject* self, QGenericArgument* val QObject* QMetaObject_NewInstance8(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7); QObject* QMetaObject_NewInstance9(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8); QObject* QMetaObject_NewInstance10(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); -void QMetaObject_Delete(QMetaObject* self); +void QMetaObject_Delete(QMetaObject* self, bool isSubclass); -QMetaObject__Connection* QMetaObject__Connection_new(); -QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other); +void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection); +void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection); void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other); -void QMetaObject__Connection_Delete(QMetaObject__Connection* self); +void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubclass); -QMetaObject__SuperData* QMetaObject__SuperData_new(); -QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo); -QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1); +void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData); +void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData); +void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData); QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self); void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1); -void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self); +void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qoffscreensurface.cpp b/qt/gen_qoffscreensurface.cpp index 513e0726..9e9632c6 100644 --- a/qt/gen_qoffscreensurface.cpp +++ b/qt/gen_qoffscreensurface.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,21 +9,281 @@ #include #include #include +#include #include +#include #include #include "gen_qoffscreensurface.h" #include "_cgo_export.h" -QOffscreenSurface* QOffscreenSurface_new(QScreen* screen, QObject* parent) { - return new QOffscreenSurface(screen, parent); +class MiqtVirtualQOffscreenSurface : public virtual QOffscreenSurface { +public: + + MiqtVirtualQOffscreenSurface(QScreen* screen, QObject* parent): QOffscreenSurface(screen, parent) {}; + MiqtVirtualQOffscreenSurface(): QOffscreenSurface() {}; + MiqtVirtualQOffscreenSurface(QScreen* screen): QOffscreenSurface(screen) {}; + + virtual ~MiqtVirtualQOffscreenSurface() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SurfaceType = 0; + + // Subclass to allow providing a Go implementation + virtual QSurface::SurfaceType surfaceType() const override { + if (handle__SurfaceType == 0) { + return QOffscreenSurface::surfaceType(); + } + + + int callback_return_value = miqt_exec_callback_QOffscreenSurface_SurfaceType(const_cast(this), handle__SurfaceType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SurfaceType() const { + + QSurface::SurfaceType _ret = QOffscreenSurface::surfaceType(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Format = 0; + + // Subclass to allow providing a Go implementation + virtual QSurfaceFormat format() const override { + if (handle__Format == 0) { + return QOffscreenSurface::format(); + } + + + QSurfaceFormat* callback_return_value = miqt_exec_callback_QOffscreenSurface_Format(const_cast(this), handle__Format); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSurfaceFormat* virtualbase_Format() const { + + return new QSurfaceFormat(QOffscreenSurface::format()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual QSize size() const override { + if (handle__Size == 0) { + return QOffscreenSurface::size(); + } + + + QSize* callback_return_value = miqt_exec_callback_QOffscreenSurface_Size(const_cast(this), handle__Size); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Size() const { + + return new QSize(QOffscreenSurface::size()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QOffscreenSurface::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QOffscreenSurface_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QOffscreenSurface::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QOffscreenSurface::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QOffscreenSurface_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QOffscreenSurface::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QOffscreenSurface::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QOffscreenSurface_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QOffscreenSurface::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QOffscreenSurface::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QOffscreenSurface_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QOffscreenSurface::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QOffscreenSurface::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QOffscreenSurface_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QOffscreenSurface::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QOffscreenSurface::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QOffscreenSurface_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QOffscreenSurface::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QOffscreenSurface::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QOffscreenSurface_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QOffscreenSurface::disconnectNotify(*signal); + + } + +}; + +void QOffscreenSurface_new(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen, parent); + *outptr_QOffscreenSurface = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QOffscreenSurface* QOffscreenSurface_new2() { - return new QOffscreenSurface(); +void QOffscreenSurface_new2(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(); + *outptr_QOffscreenSurface = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen) { - return new QOffscreenSurface(screen); +void QOffscreenSurface_new3(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen); + *outptr_QOffscreenSurface = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self) { @@ -107,7 +370,7 @@ void QOffscreenSurface_ScreenChanged(QOffscreenSurface* self, QScreen* screen) { } void QOffscreenSurface_connect_ScreenChanged(QOffscreenSurface* self, intptr_t slot) { - QOffscreenSurface::connect(self, static_cast(&QOffscreenSurface::screenChanged), self, [=](QScreen* screen) { + MiqtVirtualQOffscreenSurface::connect(self, static_cast(&QOffscreenSurface::screenChanged), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QOffscreenSurface_ScreenChanged(slot, sigval1); }); @@ -157,7 +420,91 @@ struct miqt_string QOffscreenSurface_TrUtf83(const char* s, const char* c, int n return _ms; } -void QOffscreenSurface_Delete(QOffscreenSurface* self) { - delete self; +void QOffscreenSurface_override_virtual_SurfaceType(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__SurfaceType = slot; +} + +int QOffscreenSurface_virtualbase_SurfaceType(const void* self) { + return ( (const MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_SurfaceType(); +} + +void QOffscreenSurface_override_virtual_Format(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__Format = slot; +} + +QSurfaceFormat* QOffscreenSurface_virtualbase_Format(const void* self) { + return ( (const MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_Format(); +} + +void QOffscreenSurface_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__Size = slot; +} + +QSize* QOffscreenSurface_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_Size(); +} + +void QOffscreenSurface_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__Event = slot; +} + +bool QOffscreenSurface_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_Event(event); +} + +void QOffscreenSurface_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__EventFilter = slot; +} + +bool QOffscreenSurface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QOffscreenSurface_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__TimerEvent = slot; +} + +void QOffscreenSurface_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_TimerEvent(event); +} + +void QOffscreenSurface_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__ChildEvent = slot; +} + +void QOffscreenSurface_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_ChildEvent(event); +} + +void QOffscreenSurface_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__CustomEvent = slot; +} + +void QOffscreenSurface_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_CustomEvent(event); +} + +void QOffscreenSurface_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__ConnectNotify = slot; +} + +void QOffscreenSurface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QOffscreenSurface_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__DisconnectNotify = slot; +} + +void QOffscreenSurface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QOffscreenSurface_Delete(QOffscreenSurface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qoffscreensurface.go b/qt/gen_qoffscreensurface.go index 66ec7f2b..9ec783b0 100644 --- a/qt/gen_qoffscreensurface.go +++ b/qt/gen_qoffscreensurface.go @@ -15,7 +15,8 @@ import ( ) type QOffscreenSurface struct { - h *C.QOffscreenSurface + h *C.QOffscreenSurface + isSubclass bool *QObject *QSurface } @@ -34,33 +35,61 @@ func (this *QOffscreenSurface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQOffscreenSurface(h *C.QOffscreenSurface) *QOffscreenSurface { +// newQOffscreenSurface constructs the type using only CGO pointers. +func newQOffscreenSurface(h *C.QOffscreenSurface, h_QObject *C.QObject, h_QSurface *C.QSurface) *QOffscreenSurface { if h == nil { return nil } - return &QOffscreenSurface{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QSurface: UnsafeNewQSurface(unsafe.Pointer(h))} + return &QOffscreenSurface{h: h, + QObject: newQObject(h_QObject), + QSurface: newQSurface(h_QSurface)} } -func UnsafeNewQOffscreenSurface(h unsafe.Pointer) *QOffscreenSurface { - return newQOffscreenSurface((*C.QOffscreenSurface)(h)) +// UnsafeNewQOffscreenSurface constructs the type using only unsafe pointers. +func UnsafeNewQOffscreenSurface(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QOffscreenSurface { + if h == nil { + return nil + } + + return &QOffscreenSurface{h: (*C.QOffscreenSurface)(h), + QObject: UnsafeNewQObject(h_QObject), + QSurface: UnsafeNewQSurface(h_QSurface)} } // NewQOffscreenSurface constructs a new QOffscreenSurface object. func NewQOffscreenSurface(screen *QScreen, parent *QObject) *QOffscreenSurface { - ret := C.QOffscreenSurface_new(screen.cPointer(), parent.cPointer()) - return newQOffscreenSurface(ret) + var outptr_QOffscreenSurface *C.QOffscreenSurface = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QOffscreenSurface_new(screen.cPointer(), parent.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) + ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQOffscreenSurface2 constructs a new QOffscreenSurface object. func NewQOffscreenSurface2() *QOffscreenSurface { - ret := C.QOffscreenSurface_new2() - return newQOffscreenSurface(ret) + var outptr_QOffscreenSurface *C.QOffscreenSurface = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QOffscreenSurface_new2(&outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) + ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQOffscreenSurface3 constructs a new QOffscreenSurface object. func NewQOffscreenSurface3(screen *QScreen) *QOffscreenSurface { - ret := C.QOffscreenSurface_new3(screen.cPointer()) - return newQOffscreenSurface(ret) + var outptr_QOffscreenSurface *C.QOffscreenSurface = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QOffscreenSurface_new3(screen.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) + ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } func (this *QOffscreenSurface) MetaObject() *QMetaObject { @@ -133,7 +162,7 @@ func (this *QOffscreenSurface) Size() *QSize { } func (this *QOffscreenSurface) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QOffscreenSurface_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QOffscreenSurface_Screen(this.h)), nil) } func (this *QOffscreenSurface) SetScreen(screen *QScreen) { @@ -163,7 +192,7 @@ func miqt_exec_callback_QOffscreenSurface_ScreenChanged(cb C.intptr_t, screen *C } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -212,9 +241,247 @@ func QOffscreenSurface_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QOffscreenSurface) callVirtualBase_SurfaceType() QSurface__SurfaceType { + + return (QSurface__SurfaceType)(C.QOffscreenSurface_virtualbase_SurfaceType(unsafe.Pointer(this.h))) + +} +func (this *QOffscreenSurface) OnSurfaceType(slot func(super func() QSurface__SurfaceType) QSurface__SurfaceType) { + C.QOffscreenSurface_override_virtual_SurfaceType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_SurfaceType +func miqt_exec_callback_QOffscreenSurface_SurfaceType(self *C.QOffscreenSurface, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSurface__SurfaceType) QSurface__SurfaceType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_SurfaceType) + + return (C.int)(virtualReturn) + +} + +func (this *QOffscreenSurface) callVirtualBase_Format() *QSurfaceFormat { + + _ret := C.QOffscreenSurface_virtualbase_Format(unsafe.Pointer(this.h)) + _goptr := newQSurfaceFormat(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QOffscreenSurface) OnFormat(slot func(super func() *QSurfaceFormat) *QSurfaceFormat) { + C.QOffscreenSurface_override_virtual_Format(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_Format +func miqt_exec_callback_QOffscreenSurface_Format(self *C.QOffscreenSurface, cb C.intptr_t) *C.QSurfaceFormat { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSurfaceFormat) *QSurfaceFormat) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_Format) + + return virtualReturn.cPointer() + +} + +func (this *QOffscreenSurface) callVirtualBase_Size() *QSize { + + _ret := C.QOffscreenSurface_virtualbase_Size(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QOffscreenSurface) OnSize(slot func(super func() *QSize) *QSize) { + C.QOffscreenSurface_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_Size +func miqt_exec_callback_QOffscreenSurface_Size(self *C.QOffscreenSurface, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_Size) + + return virtualReturn.cPointer() + +} + +func (this *QOffscreenSurface) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QOffscreenSurface_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QOffscreenSurface) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QOffscreenSurface_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_Event +func miqt_exec_callback_QOffscreenSurface_Event(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QOffscreenSurface) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QOffscreenSurface_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QOffscreenSurface) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QOffscreenSurface_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_EventFilter +func miqt_exec_callback_QOffscreenSurface_EventFilter(self *C.QOffscreenSurface, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QOffscreenSurface) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QOffscreenSurface_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QOffscreenSurface) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QOffscreenSurface_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_TimerEvent +func miqt_exec_callback_QOffscreenSurface_TimerEvent(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QOffscreenSurface_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QOffscreenSurface) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QOffscreenSurface_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_ChildEvent +func miqt_exec_callback_QOffscreenSurface_ChildEvent(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_CustomEvent(event *QEvent) { + + C.QOffscreenSurface_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QOffscreenSurface) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QOffscreenSurface_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_CustomEvent +func miqt_exec_callback_QOffscreenSurface_CustomEvent(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QOffscreenSurface_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QOffscreenSurface) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QOffscreenSurface_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_ConnectNotify +func miqt_exec_callback_QOffscreenSurface_ConnectNotify(self *C.QOffscreenSurface, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QOffscreenSurface_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QOffscreenSurface) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QOffscreenSurface_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_DisconnectNotify +func miqt_exec_callback_QOffscreenSurface_DisconnectNotify(self *C.QOffscreenSurface, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QOffscreenSurface) Delete() { - C.QOffscreenSurface_Delete(this.h) + C.QOffscreenSurface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qoffscreensurface.h b/qt/gen_qoffscreensurface.h index 73771354..67f80b16 100644 --- a/qt/gen_qoffscreensurface.h +++ b/qt/gen_qoffscreensurface.h @@ -15,24 +15,34 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QOffscreenSurface; class QScreen; class QSize; +class QSurface; class QSurfaceFormat; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QOffscreenSurface QOffscreenSurface; typedef struct QScreen QScreen; typedef struct QSize QSize; +typedef struct QSurface QSurface; typedef struct QSurfaceFormat QSurfaceFormat; +typedef struct QTimerEvent QTimerEvent; #endif -QOffscreenSurface* QOffscreenSurface_new(QScreen* screen, QObject* parent); -QOffscreenSurface* QOffscreenSurface_new2(); -QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen); +void QOffscreenSurface_new(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QOffscreenSurface_new2(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QOffscreenSurface_new3(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self); void* QOffscreenSurface_Metacast(QOffscreenSurface* self, const char* param1); struct miqt_string QOffscreenSurface_Tr(const char* s); @@ -55,7 +65,27 @@ struct miqt_string QOffscreenSurface_Tr2(const char* s, const char* c); struct miqt_string QOffscreenSurface_Tr3(const char* s, const char* c, int n); struct miqt_string QOffscreenSurface_TrUtf82(const char* s, const char* c); struct miqt_string QOffscreenSurface_TrUtf83(const char* s, const char* c, int n); -void QOffscreenSurface_Delete(QOffscreenSurface* self); +void QOffscreenSurface_override_virtual_SurfaceType(void* self, intptr_t slot); +int QOffscreenSurface_virtualbase_SurfaceType(const void* self); +void QOffscreenSurface_override_virtual_Format(void* self, intptr_t slot); +QSurfaceFormat* QOffscreenSurface_virtualbase_Format(const void* self); +void QOffscreenSurface_override_virtual_Size(void* self, intptr_t slot); +QSize* QOffscreenSurface_virtualbase_Size(const void* self); +void QOffscreenSurface_override_virtual_Event(void* self, intptr_t slot); +bool QOffscreenSurface_virtualbase_Event(void* self, QEvent* event); +void QOffscreenSurface_override_virtual_EventFilter(void* self, intptr_t slot); +bool QOffscreenSurface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QOffscreenSurface_override_virtual_TimerEvent(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QOffscreenSurface_override_virtual_ChildEvent(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QOffscreenSurface_override_virtual_CustomEvent(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_CustomEvent(void* self, QEvent* event); +void QOffscreenSurface_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QOffscreenSurface_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QOffscreenSurface_Delete(QOffscreenSurface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qoperatingsystemversion.cpp b/qt/gen_qoperatingsystemversion.cpp index 849a3b50..f06542fd 100644 --- a/qt/gen_qoperatingsystemversion.cpp +++ b/qt/gen_qoperatingsystemversion.cpp @@ -6,16 +6,19 @@ #include "gen_qoperatingsystemversion.h" #include "_cgo_export.h" -QOperatingSystemVersion* QOperatingSystemVersion_new(int osType, int vmajor) { - return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); +void QOperatingSystemVersion_new(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); + *outptr_QOperatingSystemVersion = ret; } -QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor, int vminor) { - return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); +void QOperatingSystemVersion_new2(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); + *outptr_QOperatingSystemVersion = ret; } -QOperatingSystemVersion* QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro) { - return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); +void QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); + *outptr_QOperatingSystemVersion = ret; } QOperatingSystemVersion* QOperatingSystemVersion_Current() { @@ -59,7 +62,11 @@ struct miqt_string QOperatingSystemVersion_Name(const QOperatingSystemVersion* s return _ms; } -void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self) { - delete self; +void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qoperatingsystemversion.go b/qt/gen_qoperatingsystemversion.go index 588d2578..46831b02 100644 --- a/qt/gen_qoperatingsystemversion.go +++ b/qt/gen_qoperatingsystemversion.go @@ -26,7 +26,8 @@ const ( ) type QOperatingSystemVersion struct { - h *C.QOperatingSystemVersion + h *C.QOperatingSystemVersion + isSubclass bool } func (this *QOperatingSystemVersion) cPointer() *C.QOperatingSystemVersion { @@ -43,6 +44,7 @@ func (this *QOperatingSystemVersion) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQOperatingSystemVersion constructs the type using only CGO pointers. func newQOperatingSystemVersion(h *C.QOperatingSystemVersion) *QOperatingSystemVersion { if h == nil { return nil @@ -50,26 +52,43 @@ func newQOperatingSystemVersion(h *C.QOperatingSystemVersion) *QOperatingSystemV return &QOperatingSystemVersion{h: h} } +// UnsafeNewQOperatingSystemVersion constructs the type using only unsafe pointers. func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer) *QOperatingSystemVersion { - return newQOperatingSystemVersion((*C.QOperatingSystemVersion)(h)) + if h == nil { + return nil + } + + return &QOperatingSystemVersion{h: (*C.QOperatingSystemVersion)(h)} } // NewQOperatingSystemVersion constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion(osType QOperatingSystemVersion__OSType, vmajor int) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new((C.int)(osType), (C.int)(vmajor)) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + + C.QOperatingSystemVersion_new((C.int)(osType), (C.int)(vmajor), &outptr_QOperatingSystemVersion) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersion2 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion2(osType QOperatingSystemVersion__OSType, vmajor int, vminor int) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor), (C.int)(vminor)) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + + C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), &outptr_QOperatingSystemVersion) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersion3 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion3(osType QOperatingSystemVersion__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro)) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + + C.QOperatingSystemVersion_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro), &outptr_QOperatingSystemVersion) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion) + ret.isSubclass = true + return ret } func QOperatingSystemVersion_Current() *QOperatingSystemVersion { @@ -112,7 +131,7 @@ func (this *QOperatingSystemVersion) Name() string { // Delete this object from C++ memory. func (this *QOperatingSystemVersion) Delete() { - C.QOperatingSystemVersion_Delete(this.h) + C.QOperatingSystemVersion_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qoperatingsystemversion.h b/qt/gen_qoperatingsystemversion.h index fe4215a7..ebeebd3f 100644 --- a/qt/gen_qoperatingsystemversion.h +++ b/qt/gen_qoperatingsystemversion.h @@ -20,9 +20,9 @@ class QOperatingSystemVersion; typedef struct QOperatingSystemVersion QOperatingSystemVersion; #endif -QOperatingSystemVersion* QOperatingSystemVersion_new(int osType, int vmajor); -QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor, int vminor); -QOperatingSystemVersion* QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro); +void QOperatingSystemVersion_new(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion); +void QOperatingSystemVersion_new2(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion); +void QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion); QOperatingSystemVersion* QOperatingSystemVersion_Current(); int QOperatingSystemVersion_CurrentType(); int QOperatingSystemVersion_MajorVersion(const QOperatingSystemVersion* self); @@ -31,7 +31,7 @@ int QOperatingSystemVersion_MicroVersion(const QOperatingSystemVersion* self); int QOperatingSystemVersion_SegmentCount(const QOperatingSystemVersion* self); int QOperatingSystemVersion_Type(const QOperatingSystemVersion* self); struct miqt_string QOperatingSystemVersion_Name(const QOperatingSystemVersion* self); -void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self); +void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpagedpaintdevice.cpp b/qt/gen_qpagedpaintdevice.cpp index 448dcf5e..24fa2a60 100644 --- a/qt/gen_qpagedpaintdevice.cpp +++ b/qt/gen_qpagedpaintdevice.cpp @@ -3,6 +3,7 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins +#include #include #include #include "gen_qpagedpaintdevice.h" @@ -61,11 +62,19 @@ QPagedPaintDevice__Margins* QPagedPaintDevice_Margins(const QPagedPaintDevice* s return new QPagedPaintDevice::Margins(self->margins()); } -void QPagedPaintDevice_Delete(QPagedPaintDevice* self) { - delete self; +void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QPagedPaintDevice__Margins_Delete(QPagedPaintDevice__Margins* self) { - delete self; +void QPagedPaintDevice__Margins_Delete(QPagedPaintDevice__Margins* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpagedpaintdevice.go b/qt/gen_qpagedpaintdevice.go index ff068418..c9137db7 100644 --- a/qt/gen_qpagedpaintdevice.go +++ b/qt/gen_qpagedpaintdevice.go @@ -154,7 +154,8 @@ const ( ) type QPagedPaintDevice struct { - h *C.QPagedPaintDevice + h *C.QPagedPaintDevice + isSubclass bool *QPaintDevice } @@ -172,15 +173,23 @@ func (this *QPagedPaintDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPagedPaintDevice(h *C.QPagedPaintDevice) *QPagedPaintDevice { +// newQPagedPaintDevice constructs the type using only CGO pointers. +func newQPagedPaintDevice(h *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPagedPaintDevice { if h == nil { return nil } - return &QPagedPaintDevice{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPagedPaintDevice{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPagedPaintDevice(h unsafe.Pointer) *QPagedPaintDevice { - return newQPagedPaintDevice((*C.QPagedPaintDevice)(h)) +// UnsafeNewQPagedPaintDevice constructs the type using only unsafe pointers. +func UnsafeNewQPagedPaintDevice(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPagedPaintDevice { + if h == nil { + return nil + } + + return &QPagedPaintDevice{h: (*C.QPagedPaintDevice)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } func (this *QPagedPaintDevice) NewPage() bool { @@ -246,7 +255,7 @@ func (this *QPagedPaintDevice) Margins() *QPagedPaintDevice__Margins { // Delete this object from C++ memory. func (this *QPagedPaintDevice) Delete() { - C.QPagedPaintDevice_Delete(this.h) + C.QPagedPaintDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -259,7 +268,8 @@ func (this *QPagedPaintDevice) GoGC() { } type QPagedPaintDevice__Margins struct { - h *C.QPagedPaintDevice__Margins + h *C.QPagedPaintDevice__Margins + isSubclass bool } func (this *QPagedPaintDevice__Margins) cPointer() *C.QPagedPaintDevice__Margins { @@ -276,6 +286,7 @@ func (this *QPagedPaintDevice__Margins) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPagedPaintDevice__Margins constructs the type using only CGO pointers. func newQPagedPaintDevice__Margins(h *C.QPagedPaintDevice__Margins) *QPagedPaintDevice__Margins { if h == nil { return nil @@ -283,13 +294,18 @@ func newQPagedPaintDevice__Margins(h *C.QPagedPaintDevice__Margins) *QPagedPaint return &QPagedPaintDevice__Margins{h: h} } +// UnsafeNewQPagedPaintDevice__Margins constructs the type using only unsafe pointers. func UnsafeNewQPagedPaintDevice__Margins(h unsafe.Pointer) *QPagedPaintDevice__Margins { - return newQPagedPaintDevice__Margins((*C.QPagedPaintDevice__Margins)(h)) + if h == nil { + return nil + } + + return &QPagedPaintDevice__Margins{h: (*C.QPagedPaintDevice__Margins)(h)} } // Delete this object from C++ memory. func (this *QPagedPaintDevice__Margins) Delete() { - C.QPagedPaintDevice__Margins_Delete(this.h) + C.QPagedPaintDevice__Margins_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpagedpaintdevice.h b/qt/gen_qpagedpaintdevice.h index 83db5495..3fd71c93 100644 --- a/qt/gen_qpagedpaintdevice.h +++ b/qt/gen_qpagedpaintdevice.h @@ -24,6 +24,7 @@ typedef QPagedPaintDevice::Margins QPagedPaintDevice__Margins; #else class QPagedPaintDevice__Margins; #endif +class QPaintDevice; class QSizeF; #else typedef struct QMarginsF QMarginsF; @@ -31,6 +32,7 @@ typedef struct QPageLayout QPageLayout; typedef struct QPageSize QPageSize; typedef struct QPagedPaintDevice QPagedPaintDevice; typedef struct QPagedPaintDevice__Margins QPagedPaintDevice__Margins; +typedef struct QPaintDevice QPaintDevice; typedef struct QSizeF QSizeF; #endif @@ -47,9 +49,9 @@ void QPagedPaintDevice_SetPageSizeMM(QPagedPaintDevice* self, QSizeF* size); QSizeF* QPagedPaintDevice_PageSizeMM(const QPagedPaintDevice* self); void QPagedPaintDevice_SetMargins(QPagedPaintDevice* self, QPagedPaintDevice__Margins* margins); QPagedPaintDevice__Margins* QPagedPaintDevice_Margins(const QPagedPaintDevice* self); -void QPagedPaintDevice_Delete(QPagedPaintDevice* self); +void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass); -void QPagedPaintDevice__Margins_Delete(QPagedPaintDevice__Margins* self); +void QPagedPaintDevice__Margins_Delete(QPagedPaintDevice__Margins* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpagelayout.cpp b/qt/gen_qpagelayout.cpp index bab98a32..aafdbcb3 100644 --- a/qt/gen_qpagelayout.cpp +++ b/qt/gen_qpagelayout.cpp @@ -8,24 +8,29 @@ #include "gen_qpagelayout.h" #include "_cgo_export.h" -QPageLayout* QPageLayout_new() { - return new QPageLayout(); +void QPageLayout_new(QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins) { - return new QPageLayout(*pageSize, static_cast(orientation), *margins); +void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new3(QPageLayout* other) { - return new QPageLayout(*other); +void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*other); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units) { - return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); +void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins) { - return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); +void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); + *outptr_QPageLayout = ret; } void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other) { @@ -163,7 +168,11 @@ void QPageLayout_SetPageSize2(QPageLayout* self, QPageSize* pageSize, QMarginsF* self->setPageSize(*pageSize, *minMargins); } -void QPageLayout_Delete(QPageLayout* self) { - delete self; +void QPageLayout_Delete(QPageLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpagelayout.go b/qt/gen_qpagelayout.go index e18e96a9..3658624f 100644 --- a/qt/gen_qpagelayout.go +++ b/qt/gen_qpagelayout.go @@ -39,7 +39,8 @@ const ( ) type QPageLayout struct { - h *C.QPageLayout + h *C.QPageLayout + isSubclass bool } func (this *QPageLayout) cPointer() *C.QPageLayout { @@ -56,6 +57,7 @@ func (this *QPageLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPageLayout constructs the type using only CGO pointers. func newQPageLayout(h *C.QPageLayout) *QPageLayout { if h == nil { return nil @@ -63,38 +65,63 @@ func newQPageLayout(h *C.QPageLayout) *QPageLayout { return &QPageLayout{h: h} } +// UnsafeNewQPageLayout constructs the type using only unsafe pointers. func UnsafeNewQPageLayout(h unsafe.Pointer) *QPageLayout { - return newQPageLayout((*C.QPageLayout)(h)) + if h == nil { + return nil + } + + return &QPageLayout{h: (*C.QPageLayout)(h)} } // NewQPageLayout constructs a new QPageLayout object. func NewQPageLayout() *QPageLayout { - ret := C.QPageLayout_new() - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new(&outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout2 constructs a new QPageLayout object. func NewQPageLayout2(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF) *QPageLayout { - ret := C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer()) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout3 constructs a new QPageLayout object. func NewQPageLayout3(other *QPageLayout) *QPageLayout { - ret := C.QPageLayout_new3(other.cPointer()) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new3(other.cPointer(), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout4 constructs a new QPageLayout object. func NewQPageLayout4(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit) *QPageLayout { - ret := C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units)) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout5 constructs a new QPageLayout object. func NewQPageLayout5(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit, minMargins *QMarginsF) *QPageLayout { - ret := C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer()) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer(), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } func (this *QPageLayout) OperatorAssign(other *QPageLayout) { @@ -276,7 +303,7 @@ func (this *QPageLayout) SetPageSize2(pageSize *QPageSize, minMargins *QMarginsF // Delete this object from C++ memory. func (this *QPageLayout) Delete() { - C.QPageLayout_Delete(this.h) + C.QPageLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpagelayout.h b/qt/gen_qpagelayout.h index 98baca3f..c00ec4b2 100644 --- a/qt/gen_qpagelayout.h +++ b/qt/gen_qpagelayout.h @@ -30,11 +30,11 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; #endif -QPageLayout* QPageLayout_new(); -QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins); -QPageLayout* QPageLayout_new3(QPageLayout* other); -QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units); -QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins); +void QPageLayout_new(QPageLayout** outptr_QPageLayout); +void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout); +void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout); +void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout); +void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout); void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other); void QPageLayout_Swap(QPageLayout* self, QPageLayout* other); bool QPageLayout_IsEquivalentTo(const QPageLayout* self, QPageLayout* other); @@ -68,7 +68,7 @@ QRectF* QPageLayout_PaintRectWithUnits(const QPageLayout* self, int units); QRect* QPageLayout_PaintRectPoints(const QPageLayout* self); QRect* QPageLayout_PaintRectPixels(const QPageLayout* self, int resolution); void QPageLayout_SetPageSize2(QPageLayout* self, QPageSize* pageSize, QMarginsF* minMargins); -void QPageLayout_Delete(QPageLayout* self); +void QPageLayout_Delete(QPageLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpagesize.cpp b/qt/gen_qpagesize.cpp index 706d6005..f7121d1f 100644 --- a/qt/gen_qpagesize.cpp +++ b/qt/gen_qpagesize.cpp @@ -10,44 +10,53 @@ #include "gen_qpagesize.h" #include "_cgo_export.h" -QPageSize* QPageSize_new() { - return new QPageSize(); +void QPageSize_new(QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new2(int pageSizeId) { - return new QPageSize(static_cast(pageSizeId)); +void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(static_cast(pageSizeId)); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new3(QSize* pointSize) { - return new QPageSize(*pointSize); +void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(*pointSize); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new4(QSizeF* size, int units) { - return new QPageSize(*size, static_cast(units)); +void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(*size, static_cast(units)); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new5(QPageSize* other) { - return new QPageSize(*other); +void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(*other); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name) { +void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*pointSize, name_QString); + QPageSize* ret = new QPageSize(*pointSize, name_QString); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy) { +void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); + QPageSize* ret = new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name) { +void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*size, static_cast(units), name_QString); + QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy) { +void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); + QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); + *outptr_QPageSize = ret; } void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other) { @@ -202,7 +211,11 @@ int QPageSize_Id3(QSizeF* size, int units, int matchPolicy) { return static_cast(_ret); } -void QPageSize_Delete(QPageSize* self) { - delete self; +void QPageSize_Delete(QPageSize* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpagesize.go b/qt/gen_qpagesize.go index 07e6f51d..40179ca8 100644 --- a/qt/gen_qpagesize.go +++ b/qt/gen_qpagesize.go @@ -165,7 +165,8 @@ const ( ) type QPageSize struct { - h *C.QPageSize + h *C.QPageSize + isSubclass bool } func (this *QPageSize) cPointer() *C.QPageSize { @@ -182,6 +183,7 @@ func (this *QPageSize) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPageSize constructs the type using only CGO pointers. func newQPageSize(h *C.QPageSize) *QPageSize { if h == nil { return nil @@ -189,38 +191,63 @@ func newQPageSize(h *C.QPageSize) *QPageSize { return &QPageSize{h: h} } +// UnsafeNewQPageSize constructs the type using only unsafe pointers. func UnsafeNewQPageSize(h unsafe.Pointer) *QPageSize { - return newQPageSize((*C.QPageSize)(h)) + if h == nil { + return nil + } + + return &QPageSize{h: (*C.QPageSize)(h)} } // NewQPageSize constructs a new QPageSize object. func NewQPageSize() *QPageSize { - ret := C.QPageSize_new() - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new(&outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize2 constructs a new QPageSize object. func NewQPageSize2(pageSizeId QPageSize__PageSizeId) *QPageSize { - ret := C.QPageSize_new2((C.int)(pageSizeId)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new2((C.int)(pageSizeId), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize3 constructs a new QPageSize object. func NewQPageSize3(pointSize *QSize) *QPageSize { - ret := C.QPageSize_new3(pointSize.cPointer()) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new3(pointSize.cPointer(), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize4 constructs a new QPageSize object. func NewQPageSize4(size *QSizeF, units QPageSize__Unit) *QPageSize { - ret := C.QPageSize_new4(size.cPointer(), (C.int)(units)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new4(size.cPointer(), (C.int)(units), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize5 constructs a new QPageSize object. func NewQPageSize5(other *QPageSize) *QPageSize { - ret := C.QPageSize_new5(other.cPointer()) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new5(other.cPointer(), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize6 constructs a new QPageSize object. @@ -229,8 +256,12 @@ func NewQPageSize6(pointSize *QSize, name string) *QPageSize { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new6(pointSize.cPointer(), name_ms) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new6(pointSize.cPointer(), name_ms, &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize7 constructs a new QPageSize object. @@ -239,8 +270,12 @@ func NewQPageSize7(pointSize *QSize, name string, matchPolicy QPageSize__SizeMat name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize8 constructs a new QPageSize object. @@ -249,8 +284,12 @@ func NewQPageSize8(size *QSizeF, units QPageSize__Unit, name string) *QPageSize name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms, &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize9 constructs a new QPageSize object. @@ -259,8 +298,12 @@ func NewQPageSize9(size *QSizeF, units QPageSize__Unit, name string, matchPolicy name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } func (this *QPageSize) OperatorAssign(other *QPageSize) { @@ -426,7 +469,7 @@ func QPageSize_Id3(size *QSizeF, units QPageSize__Unit, matchPolicy QPageSize__S // Delete this object from C++ memory. func (this *QPageSize) Delete() { - C.QPageSize_Delete(this.h) + C.QPageSize_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpagesize.h b/qt/gen_qpagesize.h index 7afb23bf..07a07263 100644 --- a/qt/gen_qpagesize.h +++ b/qt/gen_qpagesize.h @@ -28,15 +28,15 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QPageSize* QPageSize_new(); -QPageSize* QPageSize_new2(int pageSizeId); -QPageSize* QPageSize_new3(QSize* pointSize); -QPageSize* QPageSize_new4(QSizeF* size, int units); -QPageSize* QPageSize_new5(QPageSize* other); -QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name); -QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy); -QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name); -QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy); +void QPageSize_new(QPageSize** outptr_QPageSize); +void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize); +void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize); +void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize); +void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize); +void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize); +void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); +void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize); +void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other); void QPageSize_Swap(QPageSize* self, QPageSize* other); bool QPageSize_IsEquivalentTo(const QPageSize* self, QPageSize* other); @@ -66,7 +66,7 @@ QSize* QPageSize_SizePointsWithPageSizeId(int pageSizeId); QSize* QPageSize_SizePixels2(int pageSizeId, int resolution); int QPageSize_Id22(QSize* pointSize, int matchPolicy); int QPageSize_Id3(QSizeF* size, int units, int matchPolicy); -void QPageSize_Delete(QPageSize* self); +void QPageSize_Delete(QPageSize* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpaintdevice.cpp b/qt/gen_qpaintdevice.cpp index 63e99db7..cc5e9b97 100644 --- a/qt/gen_qpaintdevice.cpp +++ b/qt/gen_qpaintdevice.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include "gen_qpaintdevice.h" #include "_cgo_export.h" @@ -70,7 +72,11 @@ double QPaintDevice_DevicePixelRatioFScale() { return static_cast(_ret); } -void QPaintDevice_Delete(QPaintDevice* self) { - delete self; +void QPaintDevice_Delete(QPaintDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpaintdevice.go b/qt/gen_qpaintdevice.go index a0f8e96c..70e33f26 100644 --- a/qt/gen_qpaintdevice.go +++ b/qt/gen_qpaintdevice.go @@ -31,7 +31,8 @@ const ( ) type QPaintDevice struct { - h *C.QPaintDevice + h *C.QPaintDevice + isSubclass bool } func (this *QPaintDevice) cPointer() *C.QPaintDevice { @@ -48,6 +49,7 @@ func (this *QPaintDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPaintDevice constructs the type using only CGO pointers. func newQPaintDevice(h *C.QPaintDevice) *QPaintDevice { if h == nil { return nil @@ -55,8 +57,13 @@ func newQPaintDevice(h *C.QPaintDevice) *QPaintDevice { return &QPaintDevice{h: h} } +// UnsafeNewQPaintDevice constructs the type using only unsafe pointers. func UnsafeNewQPaintDevice(h unsafe.Pointer) *QPaintDevice { - return newQPaintDevice((*C.QPaintDevice)(h)) + if h == nil { + return nil + } + + return &QPaintDevice{h: (*C.QPaintDevice)(h)} } func (this *QPaintDevice) DevType() int { @@ -125,7 +132,7 @@ func QPaintDevice_DevicePixelRatioFScale() float64 { // Delete this object from C++ memory. func (this *QPaintDevice) Delete() { - C.QPaintDevice_Delete(this.h) + C.QPaintDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpaintdevice.h b/qt/gen_qpaintdevice.h index b6f389ae..9220ead0 100644 --- a/qt/gen_qpaintdevice.h +++ b/qt/gen_qpaintdevice.h @@ -17,9 +17,13 @@ extern "C" { #ifdef __cplusplus class QPaintDevice; class QPaintEngine; +class QPainter; +class QPoint; #else typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; #endif int QPaintDevice_DevType(const QPaintDevice* self); @@ -38,7 +42,11 @@ double QPaintDevice_DevicePixelRatioF(const QPaintDevice* self); int QPaintDevice_ColorCount(const QPaintDevice* self); int QPaintDevice_Depth(const QPaintDevice* self); double QPaintDevice_DevicePixelRatioFScale(); -void QPaintDevice_Delete(QPaintDevice* self); +int QPaintDevice_Metric(const QPaintDevice* self, int metric); +void QPaintDevice_InitPainter(const QPaintDevice* self, QPainter* painter); +QPaintDevice* QPaintDevice_Redirected(const QPaintDevice* self, QPoint* offset); +QPainter* QPaintDevice_SharedPainter(const QPaintDevice* self); +void QPaintDevice_Delete(QPaintDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpaintdevicewindow.cpp b/qt/gen_qpaintdevicewindow.cpp index 0c222dbe..e77c0838 100644 --- a/qt/gen_qpaintdevicewindow.cpp +++ b/qt/gen_qpaintdevicewindow.cpp @@ -1,10 +1,17 @@ +#include +#include #include +#include +#include #include +#include #include #include #include #include #include +#include +#include #include #include "gen_qpaintdevicewindow.h" #include "_cgo_export.h" @@ -95,7 +102,11 @@ struct miqt_string QPaintDeviceWindow_TrUtf83(const char* s, const char* c, int return _ms; } -void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self) { - delete self; +void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpaintdevicewindow.go b/qt/gen_qpaintdevicewindow.go index 699485a4..8850b3be 100644 --- a/qt/gen_qpaintdevicewindow.go +++ b/qt/gen_qpaintdevicewindow.go @@ -14,7 +14,8 @@ import ( ) type QPaintDeviceWindow struct { - h *C.QPaintDeviceWindow + h *C.QPaintDeviceWindow + isSubclass bool *QWindow *QPaintDevice } @@ -33,15 +34,25 @@ func (this *QPaintDeviceWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPaintDeviceWindow(h *C.QPaintDeviceWindow) *QPaintDeviceWindow { +// newQPaintDeviceWindow constructs the type using only CGO pointers. +func newQPaintDeviceWindow(h *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QPaintDeviceWindow { if h == nil { return nil } - return &QPaintDeviceWindow{h: h, QWindow: UnsafeNewQWindow(unsafe.Pointer(h)), QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPaintDeviceWindow{h: h, + QWindow: newQWindow(h_QWindow, h_QObject, h_QSurface), + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer) *QPaintDeviceWindow { - return newQPaintDeviceWindow((*C.QPaintDeviceWindow)(h)) +// UnsafeNewQPaintDeviceWindow constructs the type using only unsafe pointers. +func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPaintDeviceWindow { + if h == nil { + return nil + } + + return &QPaintDeviceWindow{h: (*C.QPaintDeviceWindow)(h), + QWindow: UnsafeNewQWindow(h_QWindow, h_QObject, h_QSurface), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } func (this *QPaintDeviceWindow) MetaObject() *QMetaObject { @@ -130,7 +141,7 @@ func QPaintDeviceWindow_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPaintDeviceWindow) Delete() { - C.QPaintDeviceWindow_Delete(this.h) + C.QPaintDeviceWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpaintdevicewindow.h b/qt/gen_qpaintdevicewindow.h index f19fd63b..852e95f1 100644 --- a/qt/gen_qpaintdevicewindow.h +++ b/qt/gen_qpaintdevicewindow.h @@ -15,15 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QExposeEvent; class QMetaObject; +class QObject; +class QPaintDevice; class QPaintDeviceWindow; +class QPaintEvent; class QRect; class QRegion; +class QSurface; +class QWindow; #else +typedef struct QEvent QEvent; +typedef struct QExposeEvent QExposeEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintDeviceWindow QPaintDeviceWindow; +typedef struct QPaintEvent QPaintEvent; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QSurface QSurface; +typedef struct QWindow QWindow; #endif QMetaObject* QPaintDeviceWindow_MetaObject(const QPaintDeviceWindow* self); @@ -33,11 +47,15 @@ struct miqt_string QPaintDeviceWindow_TrUtf8(const char* s); void QPaintDeviceWindow_Update(QPaintDeviceWindow* self, QRect* rect); void QPaintDeviceWindow_UpdateWithRegion(QPaintDeviceWindow* self, QRegion* region); void QPaintDeviceWindow_Update2(QPaintDeviceWindow* self); +void QPaintDeviceWindow_PaintEvent(QPaintDeviceWindow* self, QPaintEvent* event); +int QPaintDeviceWindow_Metric(const QPaintDeviceWindow* self, int metric); +void QPaintDeviceWindow_ExposeEvent(QPaintDeviceWindow* self, QExposeEvent* param1); +bool QPaintDeviceWindow_Event(QPaintDeviceWindow* self, QEvent* event); struct miqt_string QPaintDeviceWindow_Tr2(const char* s, const char* c); struct miqt_string QPaintDeviceWindow_Tr3(const char* s, const char* c, int n); struct miqt_string QPaintDeviceWindow_TrUtf82(const char* s, const char* c); struct miqt_string QPaintDeviceWindow_TrUtf83(const char* s, const char* c, int n); -void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self); +void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpaintengine.cpp b/qt/gen_qpaintengine.cpp index 08b549f6..58c2ec2e 100644 --- a/qt/gen_qpaintengine.cpp +++ b/qt/gen_qpaintengine.cpp @@ -60,8 +60,12 @@ QFont* QTextItem_Font(const QTextItem* self) { return new QFont(self->font()); } -void QTextItem_Delete(QTextItem* self) { - delete self; +void QTextItem_Delete(QTextItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QPaintEngine_IsActive(const QPaintEngine* self) { @@ -140,8 +144,8 @@ void QPaintEngine_DrawTiledPixmap(QPaintEngine* self, QRectF* r, QPixmap* pixmap self->drawTiledPixmap(*r, *pixmap, *s); } -void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr) { - self->drawImage(*r, *pm, *sr); +void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags) { + self->drawImage(*r, *pm, *sr, static_cast(flags)); } void QPaintEngine_SetPaintDevice(QPaintEngine* self, QPaintDevice* device) { @@ -209,12 +213,12 @@ bool QPaintEngine_IsExtended(const QPaintEngine* self) { return self->isExtended(); } -void QPaintEngine_DrawImage4(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags) { - self->drawImage(*r, *pm, *sr, static_cast(flags)); -} - -void QPaintEngine_Delete(QPaintEngine* self) { - delete self; +void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } int QPaintEngineState_State(const QPaintEngineState* self) { @@ -299,7 +303,11 @@ bool QPaintEngineState_PenNeedsResolving(const QPaintEngineState* self) { return self->penNeedsResolving(); } -void QPaintEngineState_Delete(QPaintEngineState* self) { - delete self; +void QPaintEngineState_Delete(QPaintEngineState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpaintengine.go b/qt/gen_qpaintengine.go index bb5377c1..b40239c0 100644 --- a/qt/gen_qpaintengine.go +++ b/qt/gen_qpaintengine.go @@ -102,7 +102,8 @@ const ( ) type QTextItem struct { - h *C.QTextItem + h *C.QTextItem + isSubclass bool } func (this *QTextItem) cPointer() *C.QTextItem { @@ -119,6 +120,7 @@ func (this *QTextItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextItem constructs the type using only CGO pointers. func newQTextItem(h *C.QTextItem) *QTextItem { if h == nil { return nil @@ -126,8 +128,13 @@ func newQTextItem(h *C.QTextItem) *QTextItem { return &QTextItem{h: h} } +// UnsafeNewQTextItem constructs the type using only unsafe pointers. func UnsafeNewQTextItem(h unsafe.Pointer) *QTextItem { - return newQTextItem((*C.QTextItem)(h)) + if h == nil { + return nil + } + + return &QTextItem{h: (*C.QTextItem)(h)} } func (this *QTextItem) Descent() float64 { @@ -162,7 +169,7 @@ func (this *QTextItem) Font() *QFont { // Delete this object from C++ memory. func (this *QTextItem) Delete() { - C.QTextItem_Delete(this.h) + C.QTextItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -175,7 +182,8 @@ func (this *QTextItem) GoGC() { } type QPaintEngine struct { - h *C.QPaintEngine + h *C.QPaintEngine + isSubclass bool } func (this *QPaintEngine) cPointer() *C.QPaintEngine { @@ -192,6 +200,7 @@ func (this *QPaintEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPaintEngine constructs the type using only CGO pointers. func newQPaintEngine(h *C.QPaintEngine) *QPaintEngine { if h == nil { return nil @@ -199,8 +208,13 @@ func newQPaintEngine(h *C.QPaintEngine) *QPaintEngine { return &QPaintEngine{h: h} } +// UnsafeNewQPaintEngine constructs the type using only unsafe pointers. func UnsafeNewQPaintEngine(h unsafe.Pointer) *QPaintEngine { - return newQPaintEngine((*C.QPaintEngine)(h)) + if h == nil { + return nil + } + + return &QPaintEngine{h: (*C.QPaintEngine)(h)} } func (this *QPaintEngine) IsActive() bool { @@ -279,8 +293,8 @@ func (this *QPaintEngine) DrawTiledPixmap(r *QRectF, pixmap *QPixmap, s *QPointF C.QPaintEngine_DrawTiledPixmap(this.h, r.cPointer(), pixmap.cPointer(), s.cPointer()) } -func (this *QPaintEngine) DrawImage(r *QRectF, pm *QImage, sr *QRectF) { - C.QPaintEngine_DrawImage(this.h, r.cPointer(), pm.cPointer(), sr.cPointer()) +func (this *QPaintEngine) DrawImage(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag) { + C.QPaintEngine_DrawImage(this.h, r.cPointer(), pm.cPointer(), sr.cPointer(), (C.int)(flags)) } func (this *QPaintEngine) SetPaintDevice(device *QPaintDevice) { @@ -356,13 +370,9 @@ func (this *QPaintEngine) IsExtended() bool { return (bool)(C.QPaintEngine_IsExtended(this.h)) } -func (this *QPaintEngine) DrawImage4(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag) { - C.QPaintEngine_DrawImage4(this.h, r.cPointer(), pm.cPointer(), sr.cPointer(), (C.int)(flags)) -} - // Delete this object from C++ memory. func (this *QPaintEngine) Delete() { - C.QPaintEngine_Delete(this.h) + C.QPaintEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -375,7 +385,8 @@ func (this *QPaintEngine) GoGC() { } type QPaintEngineState struct { - h *C.QPaintEngineState + h *C.QPaintEngineState + isSubclass bool } func (this *QPaintEngineState) cPointer() *C.QPaintEngineState { @@ -392,6 +403,7 @@ func (this *QPaintEngineState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPaintEngineState constructs the type using only CGO pointers. func newQPaintEngineState(h *C.QPaintEngineState) *QPaintEngineState { if h == nil { return nil @@ -399,8 +411,13 @@ func newQPaintEngineState(h *C.QPaintEngineState) *QPaintEngineState { return &QPaintEngineState{h: h} } +// UnsafeNewQPaintEngineState constructs the type using only unsafe pointers. func UnsafeNewQPaintEngineState(h unsafe.Pointer) *QPaintEngineState { - return newQPaintEngineState((*C.QPaintEngineState)(h)) + if h == nil { + return nil + } + + return &QPaintEngineState{h: (*C.QPaintEngineState)(h)} } func (this *QPaintEngineState) State() QPaintEngine__DirtyFlag { @@ -508,7 +525,7 @@ func (this *QPaintEngineState) PenNeedsResolving() bool { // Delete this object from C++ memory. func (this *QPaintEngineState) Delete() { - C.QPaintEngineState_Delete(this.h) + C.QPaintEngineState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpaintengine.h b/qt/gen_qpaintengine.h index f262fef4..a14516c6 100644 --- a/qt/gen_qpaintengine.h +++ b/qt/gen_qpaintengine.h @@ -64,7 +64,7 @@ double QTextItem_Width(const QTextItem* self); int QTextItem_RenderFlags(const QTextItem* self); struct miqt_string QTextItem_Text(const QTextItem* self); QFont* QTextItem_Font(const QTextItem* self); -void QTextItem_Delete(QTextItem* self); +void QTextItem_Delete(QTextItem* self, bool isSubclass); bool QPaintEngine_IsActive(const QPaintEngine* self); void QPaintEngine_SetActive(QPaintEngine* self, bool newState); @@ -85,7 +85,7 @@ void QPaintEngine_DrawPolygon2(QPaintEngine* self, QPoint* points, int pointCoun void QPaintEngine_DrawPixmap(QPaintEngine* self, QRectF* r, QPixmap* pm, QRectF* sr); void QPaintEngine_DrawTextItem(QPaintEngine* self, QPointF* p, QTextItem* textItem); void QPaintEngine_DrawTiledPixmap(QPaintEngine* self, QRectF* r, QPixmap* pixmap, QPointF* s); -void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr); +void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags); void QPaintEngine_SetPaintDevice(QPaintEngine* self, QPaintDevice* device); QPaintDevice* QPaintEngine_PaintDevice(const QPaintEngine* self); void QPaintEngine_SetSystemClip(QPaintEngine* self, QRegion* baseClip); @@ -102,8 +102,7 @@ bool QPaintEngine_HasFeature(const QPaintEngine* self, int feature); QPainter* QPaintEngine_Painter(const QPaintEngine* self); void QPaintEngine_SyncState(QPaintEngine* self); bool QPaintEngine_IsExtended(const QPaintEngine* self); -void QPaintEngine_DrawImage4(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags); -void QPaintEngine_Delete(QPaintEngine* self); +void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass); int QPaintEngineState_State(const QPaintEngineState* self); QPen* QPaintEngineState_Pen(const QPaintEngineState* self); @@ -124,7 +123,7 @@ double QPaintEngineState_Opacity(const QPaintEngineState* self); QPainter* QPaintEngineState_Painter(const QPaintEngineState* self); bool QPaintEngineState_BrushNeedsResolving(const QPaintEngineState* self); bool QPaintEngineState_PenNeedsResolving(const QPaintEngineState* self); -void QPaintEngineState_Delete(QPaintEngineState* self); +void QPaintEngineState_Delete(QPaintEngineState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpainter.cpp b/qt/gen_qpainter.cpp index aacab2b6..dfd0c13a 100644 --- a/qt/gen_qpainter.cpp +++ b/qt/gen_qpainter.cpp @@ -33,12 +33,14 @@ #include "gen_qpainter.h" #include "_cgo_export.h" -QPainter* QPainter_new() { - return new QPainter(); +void QPainter_new(QPainter** outptr_QPainter) { + QPainter* ret = new QPainter(); + *outptr_QPainter = ret; } -QPainter* QPainter_new2(QPaintDevice* param1) { - return new QPainter(param1); +void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter) { + QPainter* ret = new QPainter(param1); + *outptr_QPainter = ret; } QPaintDevice* QPainter_Device(const QPainter* self) { @@ -1099,8 +1101,12 @@ QPaintDevice* QPainter_Redirected2(QPaintDevice* device, QPoint* offset) { return QPainter::redirected(device, offset); } -void QPainter_Delete(QPainter* self) { - delete self; +void QPainter_Delete(QPainter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QPainter__PixmapFragment* QPainter__PixmapFragment_Create(QPointF* pos, QRectF* sourceRect) { @@ -1123,7 +1129,11 @@ QPainter__PixmapFragment* QPainter__PixmapFragment_Create6(QPointF* pos, QRectF* return new QPainter::PixmapFragment(QPainter::PixmapFragment::create(*pos, *sourceRect, static_cast(scaleX), static_cast(scaleY), static_cast(rotation), static_cast(opacity))); } -void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self) { - delete self; +void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpainter.go b/qt/gen_qpainter.go index 9ee0303c..12eab210 100644 --- a/qt/gen_qpainter.go +++ b/qt/gen_qpainter.go @@ -75,7 +75,8 @@ const ( ) type QPainter struct { - h *C.QPainter + h *C.QPainter + isSubclass bool } func (this *QPainter) cPointer() *C.QPainter { @@ -92,6 +93,7 @@ func (this *QPainter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainter constructs the type using only CGO pointers. func newQPainter(h *C.QPainter) *QPainter { if h == nil { return nil @@ -99,20 +101,33 @@ func newQPainter(h *C.QPainter) *QPainter { return &QPainter{h: h} } +// UnsafeNewQPainter constructs the type using only unsafe pointers. func UnsafeNewQPainter(h unsafe.Pointer) *QPainter { - return newQPainter((*C.QPainter)(h)) + if h == nil { + return nil + } + + return &QPainter{h: (*C.QPainter)(h)} } // NewQPainter constructs a new QPainter object. func NewQPainter() *QPainter { - ret := C.QPainter_new() - return newQPainter(ret) + var outptr_QPainter *C.QPainter = nil + + C.QPainter_new(&outptr_QPainter) + ret := newQPainter(outptr_QPainter) + ret.isSubclass = true + return ret } // NewQPainter2 constructs a new QPainter object. func NewQPainter2(param1 *QPaintDevice) *QPainter { - ret := C.QPainter_new2(param1.cPointer()) - return newQPainter(ret) + var outptr_QPainter *C.QPainter = nil + + C.QPainter_new2(param1.cPointer(), &outptr_QPainter) + ret := newQPainter(outptr_QPainter) + ret.isSubclass = true + return ret } func (this *QPainter) Device() *QPaintDevice { @@ -1246,7 +1261,7 @@ func QPainter_Redirected2(device *QPaintDevice, offset *QPoint) *QPaintDevice { // Delete this object from C++ memory. func (this *QPainter) Delete() { - C.QPainter_Delete(this.h) + C.QPainter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1259,7 +1274,8 @@ func (this *QPainter) GoGC() { } type QPainter__PixmapFragment struct { - h *C.QPainter__PixmapFragment + h *C.QPainter__PixmapFragment + isSubclass bool } func (this *QPainter__PixmapFragment) cPointer() *C.QPainter__PixmapFragment { @@ -1276,6 +1292,7 @@ func (this *QPainter__PixmapFragment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainter__PixmapFragment constructs the type using only CGO pointers. func newQPainter__PixmapFragment(h *C.QPainter__PixmapFragment) *QPainter__PixmapFragment { if h == nil { return nil @@ -1283,8 +1300,13 @@ func newQPainter__PixmapFragment(h *C.QPainter__PixmapFragment) *QPainter__Pixma return &QPainter__PixmapFragment{h: h} } +// UnsafeNewQPainter__PixmapFragment constructs the type using only unsafe pointers. func UnsafeNewQPainter__PixmapFragment(h unsafe.Pointer) *QPainter__PixmapFragment { - return newQPainter__PixmapFragment((*C.QPainter__PixmapFragment)(h)) + if h == nil { + return nil + } + + return &QPainter__PixmapFragment{h: (*C.QPainter__PixmapFragment)(h)} } func QPainter__PixmapFragment_Create(pos *QPointF, sourceRect *QRectF) *QPainter__PixmapFragment { @@ -1324,7 +1346,7 @@ func QPainter__PixmapFragment_Create6(pos *QPointF, sourceRect *QRectF, scaleX f // Delete this object from C++ memory. func (this *QPainter__PixmapFragment) Delete() { - C.QPainter__PixmapFragment_Delete(this.h) + C.QPainter__PixmapFragment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpainter.h b/qt/gen_qpainter.h index 2d3b33bf..69609f65 100644 --- a/qt/gen_qpainter.h +++ b/qt/gen_qpainter.h @@ -76,8 +76,8 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -QPainter* QPainter_new(); -QPainter* QPainter_new2(QPaintDevice* param1); +void QPainter_new(QPainter** outptr_QPainter); +void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter); QPaintDevice* QPainter_Device(const QPainter* self); bool QPainter_Begin(QPainter* self, QPaintDevice* param1); bool QPainter_End(QPainter* self); @@ -323,14 +323,14 @@ void QPainter_SetRenderHint2(QPainter* self, int hint, bool on); void QPainter_SetRenderHints2(QPainter* self, int hints, bool on); void QPainter_SetRedirected3(QPaintDevice* device, QPaintDevice* replacement, QPoint* offset); QPaintDevice* QPainter_Redirected2(QPaintDevice* device, QPoint* offset); -void QPainter_Delete(QPainter* self); +void QPainter_Delete(QPainter* self, bool isSubclass); QPainter__PixmapFragment* QPainter__PixmapFragment_Create(QPointF* pos, QRectF* sourceRect); QPainter__PixmapFragment* QPainter__PixmapFragment_Create3(QPointF* pos, QRectF* sourceRect, double scaleX); QPainter__PixmapFragment* QPainter__PixmapFragment_Create4(QPointF* pos, QRectF* sourceRect, double scaleX, double scaleY); QPainter__PixmapFragment* QPainter__PixmapFragment_Create5(QPointF* pos, QRectF* sourceRect, double scaleX, double scaleY, double rotation); QPainter__PixmapFragment* QPainter__PixmapFragment_Create6(QPointF* pos, QRectF* sourceRect, double scaleX, double scaleY, double rotation, double opacity); -void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self); +void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpainterpath.cpp b/qt/gen_qpainterpath.cpp index 0ac8236c..b90f0082 100644 --- a/qt/gen_qpainterpath.cpp +++ b/qt/gen_qpainterpath.cpp @@ -14,16 +14,19 @@ #include "gen_qpainterpath.h" #include "_cgo_export.h" -QPainterPath* QPainterPath_new() { - return new QPainterPath(); +void QPainterPath_new(QPainterPath** outptr_QPainterPath) { + QPainterPath* ret = new QPainterPath(); + *outptr_QPainterPath = ret; } -QPainterPath* QPainterPath_new2(QPointF* startPoint) { - return new QPainterPath(*startPoint); +void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath) { + QPainterPath* ret = new QPainterPath(*startPoint); + *outptr_QPainterPath = ret; } -QPainterPath* QPainterPath_new3(QPainterPath* other) { - return new QPainterPath(*other); +void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath) { + QPainterPath* ret = new QPainterPath(*other); + *outptr_QPainterPath = ret; } void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other) { @@ -337,16 +340,22 @@ void QPainterPath_AddRoundedRect7(QPainterPath* self, double x, double y, double self->addRoundedRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(xRadius), static_cast(yRadius), static_cast(mode)); } -void QPainterPath_Delete(QPainterPath* self) { - delete self; +void QPainterPath_Delete(QPainterPath* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPainterPathStroker* QPainterPathStroker_new() { - return new QPainterPathStroker(); +void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker) { + QPainterPathStroker* ret = new QPainterPathStroker(); + *outptr_QPainterPathStroker = ret; } -QPainterPathStroker* QPainterPathStroker_new2(QPen* pen) { - return new QPainterPathStroker(*pen); +void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker) { + QPainterPathStroker* ret = new QPainterPathStroker(*pen); + *outptr_QPainterPathStroker = ret; } void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width) { @@ -434,8 +443,12 @@ QPainterPath* QPainterPathStroker_CreateStroke(const QPainterPathStroker* self, return new QPainterPath(self->createStroke(*path)); } -void QPainterPathStroker_Delete(QPainterPathStroker* self) { - delete self; +void QPainterPathStroker_Delete(QPainterPathStroker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QPainterPath__Element_IsMoveTo(const QPainterPath__Element* self) { @@ -458,7 +471,11 @@ bool QPainterPath__Element_OperatorNotEqual(const QPainterPath__Element* self, Q return self->operator!=(*e); } -void QPainterPath__Element_Delete(QPainterPath__Element* self) { - delete self; +void QPainterPath__Element_Delete(QPainterPath__Element* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpainterpath.go b/qt/gen_qpainterpath.go index e99ac6b6..533f8887 100644 --- a/qt/gen_qpainterpath.go +++ b/qt/gen_qpainterpath.go @@ -23,7 +23,8 @@ const ( ) type QPainterPath struct { - h *C.QPainterPath + h *C.QPainterPath + isSubclass bool } func (this *QPainterPath) cPointer() *C.QPainterPath { @@ -40,6 +41,7 @@ func (this *QPainterPath) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainterPath constructs the type using only CGO pointers. func newQPainterPath(h *C.QPainterPath) *QPainterPath { if h == nil { return nil @@ -47,26 +49,43 @@ func newQPainterPath(h *C.QPainterPath) *QPainterPath { return &QPainterPath{h: h} } +// UnsafeNewQPainterPath constructs the type using only unsafe pointers. func UnsafeNewQPainterPath(h unsafe.Pointer) *QPainterPath { - return newQPainterPath((*C.QPainterPath)(h)) + if h == nil { + return nil + } + + return &QPainterPath{h: (*C.QPainterPath)(h)} } // NewQPainterPath constructs a new QPainterPath object. func NewQPainterPath() *QPainterPath { - ret := C.QPainterPath_new() - return newQPainterPath(ret) + var outptr_QPainterPath *C.QPainterPath = nil + + C.QPainterPath_new(&outptr_QPainterPath) + ret := newQPainterPath(outptr_QPainterPath) + ret.isSubclass = true + return ret } // NewQPainterPath2 constructs a new QPainterPath object. func NewQPainterPath2(startPoint *QPointF) *QPainterPath { - ret := C.QPainterPath_new2(startPoint.cPointer()) - return newQPainterPath(ret) + var outptr_QPainterPath *C.QPainterPath = nil + + C.QPainterPath_new2(startPoint.cPointer(), &outptr_QPainterPath) + ret := newQPainterPath(outptr_QPainterPath) + ret.isSubclass = true + return ret } // NewQPainterPath3 constructs a new QPainterPath object. func NewQPainterPath3(other *QPainterPath) *QPainterPath { - ret := C.QPainterPath_new3(other.cPointer()) - return newQPainterPath(ret) + var outptr_QPainterPath *C.QPainterPath = nil + + C.QPainterPath_new3(other.cPointer(), &outptr_QPainterPath) + ret := newQPainterPath(outptr_QPainterPath) + ret.isSubclass = true + return ret } func (this *QPainterPath) OperatorAssign(other *QPainterPath) { @@ -430,7 +449,7 @@ func (this *QPainterPath) AddRoundedRect7(x float64, y float64, w float64, h flo // Delete this object from C++ memory. func (this *QPainterPath) Delete() { - C.QPainterPath_Delete(this.h) + C.QPainterPath_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -443,7 +462,8 @@ func (this *QPainterPath) GoGC() { } type QPainterPathStroker struct { - h *C.QPainterPathStroker + h *C.QPainterPathStroker + isSubclass bool } func (this *QPainterPathStroker) cPointer() *C.QPainterPathStroker { @@ -460,6 +480,7 @@ func (this *QPainterPathStroker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainterPathStroker constructs the type using only CGO pointers. func newQPainterPathStroker(h *C.QPainterPathStroker) *QPainterPathStroker { if h == nil { return nil @@ -467,20 +488,33 @@ func newQPainterPathStroker(h *C.QPainterPathStroker) *QPainterPathStroker { return &QPainterPathStroker{h: h} } +// UnsafeNewQPainterPathStroker constructs the type using only unsafe pointers. func UnsafeNewQPainterPathStroker(h unsafe.Pointer) *QPainterPathStroker { - return newQPainterPathStroker((*C.QPainterPathStroker)(h)) + if h == nil { + return nil + } + + return &QPainterPathStroker{h: (*C.QPainterPathStroker)(h)} } // NewQPainterPathStroker constructs a new QPainterPathStroker object. func NewQPainterPathStroker() *QPainterPathStroker { - ret := C.QPainterPathStroker_new() - return newQPainterPathStroker(ret) + var outptr_QPainterPathStroker *C.QPainterPathStroker = nil + + C.QPainterPathStroker_new(&outptr_QPainterPathStroker) + ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret.isSubclass = true + return ret } // NewQPainterPathStroker2 constructs a new QPainterPathStroker object. func NewQPainterPathStroker2(pen *QPen) *QPainterPathStroker { - ret := C.QPainterPathStroker_new2(pen.cPointer()) - return newQPainterPathStroker(ret) + var outptr_QPainterPathStroker *C.QPainterPathStroker = nil + + C.QPainterPathStroker_new2(pen.cPointer(), &outptr_QPainterPathStroker) + ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret.isSubclass = true + return ret } func (this *QPainterPathStroker) SetWidth(width float64) { @@ -564,7 +598,7 @@ func (this *QPainterPathStroker) CreateStroke(path *QPainterPath) *QPainterPath // Delete this object from C++ memory. func (this *QPainterPathStroker) Delete() { - C.QPainterPathStroker_Delete(this.h) + C.QPainterPathStroker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -577,7 +611,8 @@ func (this *QPainterPathStroker) GoGC() { } type QPainterPath__Element struct { - h *C.QPainterPath__Element + h *C.QPainterPath__Element + isSubclass bool } func (this *QPainterPath__Element) cPointer() *C.QPainterPath__Element { @@ -594,6 +629,7 @@ func (this *QPainterPath__Element) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainterPath__Element constructs the type using only CGO pointers. func newQPainterPath__Element(h *C.QPainterPath__Element) *QPainterPath__Element { if h == nil { return nil @@ -601,8 +637,13 @@ func newQPainterPath__Element(h *C.QPainterPath__Element) *QPainterPath__Element return &QPainterPath__Element{h: h} } +// UnsafeNewQPainterPath__Element constructs the type using only unsafe pointers. func UnsafeNewQPainterPath__Element(h unsafe.Pointer) *QPainterPath__Element { - return newQPainterPath__Element((*C.QPainterPath__Element)(h)) + if h == nil { + return nil + } + + return &QPainterPath__Element{h: (*C.QPainterPath__Element)(h)} } func (this *QPainterPath__Element) IsMoveTo() bool { @@ -627,7 +668,7 @@ func (this *QPainterPath__Element) OperatorNotEqual(e *QPainterPath__Element) bo // Delete this object from C++ memory. func (this *QPainterPath__Element) Delete() { - C.QPainterPath__Element_Delete(this.h) + C.QPainterPath__Element_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpainterpath.h b/qt/gen_qpainterpath.h index 9f712f6e..b15bcc5b 100644 --- a/qt/gen_qpainterpath.h +++ b/qt/gen_qpainterpath.h @@ -38,9 +38,9 @@ typedef struct QRectF QRectF; typedef struct QRegion QRegion; #endif -QPainterPath* QPainterPath_new(); -QPainterPath* QPainterPath_new2(QPointF* startPoint); -QPainterPath* QPainterPath_new3(QPainterPath* other); +void QPainterPath_new(QPainterPath** outptr_QPainterPath); +void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath); +void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath); void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other); void QPainterPath_Swap(QPainterPath* self, QPainterPath* other); void QPainterPath_Clear(QPainterPath* self); @@ -116,10 +116,10 @@ QPainterPath* QPainterPath_OperatorPlusAssign(QPainterPath* self, QPainterPath* QPainterPath* QPainterPath_OperatorMinusAssign(QPainterPath* self, QPainterPath* other); void QPainterPath_AddRoundedRect4(QPainterPath* self, QRectF* rect, double xRadius, double yRadius, int mode); void QPainterPath_AddRoundedRect7(QPainterPath* self, double x, double y, double w, double h, double xRadius, double yRadius, int mode); -void QPainterPath_Delete(QPainterPath* self); +void QPainterPath_Delete(QPainterPath* self, bool isSubclass); -QPainterPathStroker* QPainterPathStroker_new(); -QPainterPathStroker* QPainterPathStroker_new2(QPen* pen); +void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker); +void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker); void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width); double QPainterPathStroker_Width(const QPainterPathStroker* self); void QPainterPathStroker_SetCapStyle(QPainterPathStroker* self, int style); @@ -136,14 +136,14 @@ struct miqt_array /* of double */ QPainterPathStroker_DashPattern(const QPainte void QPainterPathStroker_SetDashOffset(QPainterPathStroker* self, double offset); double QPainterPathStroker_DashOffset(const QPainterPathStroker* self); QPainterPath* QPainterPathStroker_CreateStroke(const QPainterPathStroker* self, QPainterPath* path); -void QPainterPathStroker_Delete(QPainterPathStroker* self); +void QPainterPathStroker_Delete(QPainterPathStroker* self, bool isSubclass); bool QPainterPath__Element_IsMoveTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsLineTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsCurveTo(const QPainterPath__Element* self); bool QPainterPath__Element_OperatorEqual(const QPainterPath__Element* self, QPainterPath__Element* e); bool QPainterPath__Element_OperatorNotEqual(const QPainterPath__Element* self, QPainterPath__Element* e); -void QPainterPath__Element_Delete(QPainterPath__Element* self); +void QPainterPath__Element_Delete(QPainterPath__Element* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpalette.cpp b/qt/gen_qpalette.cpp index c3e7c91e..07bcfd49 100644 --- a/qt/gen_qpalette.cpp +++ b/qt/gen_qpalette.cpp @@ -5,32 +5,39 @@ #include "gen_qpalette.h" #include "_cgo_export.h" -QPalette* QPalette_new() { - return new QPalette(); +void QPalette_new(QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(); + *outptr_QPalette = ret; } -QPalette* QPalette_new2(QColor* button) { - return new QPalette(*button); +void QPalette_new2(QColor* button, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*button); + *outptr_QPalette = ret; } -QPalette* QPalette_new3(int button) { - return new QPalette(static_cast(button)); +void QPalette_new3(int button, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(static_cast(button)); + *outptr_QPalette = ret; } -QPalette* QPalette_new4(QColor* button, QColor* window) { - return new QPalette(*button, *window); +void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*button, *window); + *outptr_QPalette = ret; } -QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window) { - return new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); +void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); + *outptr_QPalette = ret; } -QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base) { - return new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); +void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); + *outptr_QPalette = ret; } -QPalette* QPalette_new7(QPalette* palette) { - return new QPalette(*palette); +void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*palette); + *outptr_QPalette = ret; } void QPalette_OperatorAssign(QPalette* self, QPalette* palette) { @@ -264,7 +271,11 @@ void QPalette_ResolveWithMask(QPalette* self, unsigned int mask) { self->resolve(static_cast(mask)); } -void QPalette_Delete(QPalette* self) { - delete self; +void QPalette_Delete(QPalette* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpalette.go b/qt/gen_qpalette.go index b904411c..fa39b2b5 100644 --- a/qt/gen_qpalette.go +++ b/qt/gen_qpalette.go @@ -55,7 +55,8 @@ const ( ) type QPalette struct { - h *C.QPalette + h *C.QPalette + isSubclass bool } func (this *QPalette) cPointer() *C.QPalette { @@ -72,6 +73,7 @@ func (this *QPalette) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPalette constructs the type using only CGO pointers. func newQPalette(h *C.QPalette) *QPalette { if h == nil { return nil @@ -79,50 +81,83 @@ func newQPalette(h *C.QPalette) *QPalette { return &QPalette{h: h} } +// UnsafeNewQPalette constructs the type using only unsafe pointers. func UnsafeNewQPalette(h unsafe.Pointer) *QPalette { - return newQPalette((*C.QPalette)(h)) + if h == nil { + return nil + } + + return &QPalette{h: (*C.QPalette)(h)} } // NewQPalette constructs a new QPalette object. func NewQPalette() *QPalette { - ret := C.QPalette_new() - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new(&outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette2 constructs a new QPalette object. func NewQPalette2(button *QColor) *QPalette { - ret := C.QPalette_new2(button.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new2(button.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette3 constructs a new QPalette object. func NewQPalette3(button GlobalColor) *QPalette { - ret := C.QPalette_new3((C.int)(button)) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new3((C.int)(button), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette4 constructs a new QPalette object. func NewQPalette4(button *QColor, window *QColor) *QPalette { - ret := C.QPalette_new4(button.cPointer(), window.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new4(button.cPointer(), window.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette5 constructs a new QPalette object. func NewQPalette5(windowText *QBrush, button *QBrush, light *QBrush, dark *QBrush, mid *QBrush, text *QBrush, bright_text *QBrush, base *QBrush, window *QBrush) *QPalette { - ret := C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette6 constructs a new QPalette object. func NewQPalette6(windowText *QColor, window *QColor, light *QColor, dark *QColor, mid *QColor, text *QColor, base *QColor) *QPalette { - ret := C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette7 constructs a new QPalette object. func NewQPalette7(palette *QPalette) *QPalette { - ret := C.QPalette_new7(palette.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new7(palette.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } func (this *QPalette) OperatorAssign(palette *QPalette) { @@ -306,7 +341,7 @@ func (this *QPalette) ResolveWithMask(mask uint) { // Delete this object from C++ memory. func (this *QPalette) Delete() { - C.QPalette_Delete(this.h) + C.QPalette_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpalette.h b/qt/gen_qpalette.h index 9f72ae10..8a83ba17 100644 --- a/qt/gen_qpalette.h +++ b/qt/gen_qpalette.h @@ -24,13 +24,13 @@ typedef struct QColor QColor; typedef struct QPalette QPalette; #endif -QPalette* QPalette_new(); -QPalette* QPalette_new2(QColor* button); -QPalette* QPalette_new3(int button); -QPalette* QPalette_new4(QColor* button, QColor* window); -QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window); -QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base); -QPalette* QPalette_new7(QPalette* palette); +void QPalette_new(QPalette** outptr_QPalette); +void QPalette_new2(QColor* button, QPalette** outptr_QPalette); +void QPalette_new3(int button, QPalette** outptr_QPalette); +void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette); +void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette); +void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette); +void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette); void QPalette_OperatorAssign(QPalette* self, QPalette* palette); void QPalette_Swap(QPalette* self, QPalette* other); int QPalette_CurrentColorGroup(const QPalette* self); @@ -75,7 +75,7 @@ long long QPalette_CacheKey(const QPalette* self); QPalette* QPalette_Resolve(const QPalette* self, QPalette* param1); unsigned int QPalette_Resolve2(const QPalette* self); void QPalette_ResolveWithMask(QPalette* self, unsigned int mask); -void QPalette_Delete(QPalette* self); +void QPalette_Delete(QPalette* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qparallelanimationgroup.cpp b/qt/gen_qparallelanimationgroup.cpp index 87baeb37..d205918c 100644 --- a/qt/gen_qparallelanimationgroup.cpp +++ b/qt/gen_qparallelanimationgroup.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -8,12 +11,151 @@ #include "gen_qparallelanimationgroup.h" #include "_cgo_export.h" -QParallelAnimationGroup* QParallelAnimationGroup_new() { - return new QParallelAnimationGroup(); +class MiqtVirtualQParallelAnimationGroup : public virtual QParallelAnimationGroup { +public: + + MiqtVirtualQParallelAnimationGroup(): QParallelAnimationGroup() {}; + MiqtVirtualQParallelAnimationGroup(QObject* parent): QParallelAnimationGroup(parent) {}; + + virtual ~MiqtVirtualQParallelAnimationGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QParallelAnimationGroup::duration(); + } + + + int callback_return_value = miqt_exec_callback_QParallelAnimationGroup_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QParallelAnimationGroup::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QParallelAnimationGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QParallelAnimationGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QParallelAnimationGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int currentTime) override { + if (handle__UpdateCurrentTime == 0) { + QParallelAnimationGroup::updateCurrentTime(currentTime); + return; + } + + int sigval1 = currentTime; + + miqt_exec_callback_QParallelAnimationGroup_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int currentTime) { + + QParallelAnimationGroup::updateCurrentTime(static_cast(currentTime)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QParallelAnimationGroup::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QParallelAnimationGroup_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QParallelAnimationGroup::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QParallelAnimationGroup::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QParallelAnimationGroup_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QParallelAnimationGroup::updateDirection(static_cast(direction)); + + } + +}; + +void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(); + *outptr_QParallelAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent) { - return new QParallelAnimationGroup(parent); +void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(parent); + *outptr_QParallelAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self) { @@ -94,7 +236,51 @@ struct miqt_string QParallelAnimationGroup_TrUtf83(const char* s, const char* c, return _ms; } -void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self) { - delete self; +void QParallelAnimationGroup_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__Duration = slot; +} + +int QParallelAnimationGroup_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_Duration(); +} + +void QParallelAnimationGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__Event = slot; +} + +bool QParallelAnimationGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_Event(event); +} + +void QParallelAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QParallelAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int currentTime) { + ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_UpdateCurrentTime(currentTime); +} + +void QParallelAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__UpdateState = slot; +} + +void QParallelAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QParallelAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__UpdateDirection = slot; +} + +void QParallelAnimationGroup_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qparallelanimationgroup.go b/qt/gen_qparallelanimationgroup.go index bbeef8d4..a61db825 100644 --- a/qt/gen_qparallelanimationgroup.go +++ b/qt/gen_qparallelanimationgroup.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QParallelAnimationGroup struct { - h *C.QParallelAnimationGroup + h *C.QParallelAnimationGroup + isSubclass bool *QAnimationGroup } @@ -32,27 +34,49 @@ func (this *QParallelAnimationGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQParallelAnimationGroup(h *C.QParallelAnimationGroup) *QParallelAnimationGroup { +// newQParallelAnimationGroup constructs the type using only CGO pointers. +func newQParallelAnimationGroup(h *C.QParallelAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QParallelAnimationGroup { if h == nil { return nil } - return &QParallelAnimationGroup{h: h, QAnimationGroup: UnsafeNewQAnimationGroup(unsafe.Pointer(h))} + return &QParallelAnimationGroup{h: h, + QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer) *QParallelAnimationGroup { - return newQParallelAnimationGroup((*C.QParallelAnimationGroup)(h)) +// UnsafeNewQParallelAnimationGroup constructs the type using only unsafe pointers. +func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QParallelAnimationGroup { + if h == nil { + return nil + } + + return &QParallelAnimationGroup{h: (*C.QParallelAnimationGroup)(h), + QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } // NewQParallelAnimationGroup constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup() *QParallelAnimationGroup { - ret := C.QParallelAnimationGroup_new() - return newQParallelAnimationGroup(ret) + var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QParallelAnimationGroup_new(&outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQParallelAnimationGroup2 constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup2(parent *QObject) *QParallelAnimationGroup { - ret := C.QParallelAnimationGroup_new2(parent.cPointer()) - return newQParallelAnimationGroup(ret) + var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QParallelAnimationGroup_new2(parent.cPointer(), &outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QParallelAnimationGroup) MetaObject() *QMetaObject { @@ -131,9 +155,127 @@ func QParallelAnimationGroup_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QParallelAnimationGroup) callVirtualBase_Duration() int { + + return (int)(C.QParallelAnimationGroup_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QParallelAnimationGroup) OnDuration(slot func(super func() int) int) { + C.QParallelAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_Duration +func miqt_exec_callback_QParallelAnimationGroup_Duration(self *C.QParallelAnimationGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QParallelAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QParallelAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QParallelAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_Event +func miqt_exec_callback_QParallelAnimationGroup_Event(self *C.QParallelAnimationGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_UpdateCurrentTime(currentTime int) { + + C.QParallelAnimationGroup_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(currentTime)) + +} +func (this *QParallelAnimationGroup) OnUpdateCurrentTime(slot func(super func(currentTime int), currentTime int)) { + C.QParallelAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_UpdateCurrentTime +func miqt_exec_callback_QParallelAnimationGroup_UpdateCurrentTime(self *C.QParallelAnimationGroup, cb C.intptr_t, currentTime C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(currentTime int), currentTime int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentTime) + + gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QParallelAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QParallelAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QParallelAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_UpdateState +func miqt_exec_callback_QParallelAnimationGroup_UpdateState(self *C.QParallelAnimationGroup, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QParallelAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QParallelAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QParallelAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_UpdateDirection +func miqt_exec_callback_QParallelAnimationGroup_UpdateDirection(self *C.QParallelAnimationGroup, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QParallelAnimationGroup) Delete() { - C.QParallelAnimationGroup_Delete(this.h) + C.QParallelAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qparallelanimationgroup.h b/qt/gen_qparallelanimationgroup.h index ade222c4..c3e97a2b 100644 --- a/qt/gen_qparallelanimationgroup.h +++ b/qt/gen_qparallelanimationgroup.h @@ -15,27 +15,47 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; +class QAnimationGroup; +class QEvent; class QMetaObject; class QObject; class QParallelAnimationGroup; #else +typedef struct QAbstractAnimation QAbstractAnimation; +typedef struct QAnimationGroup QAnimationGroup; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QParallelAnimationGroup QParallelAnimationGroup; #endif -QParallelAnimationGroup* QParallelAnimationGroup_new(); -QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent); +void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self); void* QParallelAnimationGroup_Metacast(QParallelAnimationGroup* self, const char* param1); struct miqt_string QParallelAnimationGroup_Tr(const char* s); struct miqt_string QParallelAnimationGroup_TrUtf8(const char* s); int QParallelAnimationGroup_Duration(const QParallelAnimationGroup* self); +bool QParallelAnimationGroup_Event(QParallelAnimationGroup* self, QEvent* event); +void QParallelAnimationGroup_UpdateCurrentTime(QParallelAnimationGroup* self, int currentTime); +void QParallelAnimationGroup_UpdateState(QParallelAnimationGroup* self, int newState, int oldState); +void QParallelAnimationGroup_UpdateDirection(QParallelAnimationGroup* self, int direction); struct miqt_string QParallelAnimationGroup_Tr2(const char* s, const char* c); struct miqt_string QParallelAnimationGroup_Tr3(const char* s, const char* c, int n); struct miqt_string QParallelAnimationGroup_TrUtf82(const char* s, const char* c); struct miqt_string QParallelAnimationGroup_TrUtf83(const char* s, const char* c, int n); -void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self); +void QParallelAnimationGroup_override_virtual_Duration(void* self, intptr_t slot); +int QParallelAnimationGroup_virtualbase_Duration(const void* self); +void QParallelAnimationGroup_override_virtual_Event(void* self, intptr_t slot); +bool QParallelAnimationGroup_virtualbase_Event(void* self, QEvent* event); +void QParallelAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QParallelAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int currentTime); +void QParallelAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot); +void QParallelAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState); +void QParallelAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QParallelAnimationGroup_virtualbase_UpdateDirection(void* self, int direction); +void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpauseanimation.cpp b/qt/gen_qpauseanimation.cpp index c5a7079c..d58cd897 100644 --- a/qt/gen_qpauseanimation.cpp +++ b/qt/gen_qpauseanimation.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -8,20 +10,165 @@ #include "gen_qpauseanimation.h" #include "_cgo_export.h" -QPauseAnimation* QPauseAnimation_new() { - return new QPauseAnimation(); +class MiqtVirtualQPauseAnimation : public virtual QPauseAnimation { +public: + + MiqtVirtualQPauseAnimation(): QPauseAnimation() {}; + MiqtVirtualQPauseAnimation(int msecs): QPauseAnimation(msecs) {}; + MiqtVirtualQPauseAnimation(QObject* parent): QPauseAnimation(parent) {}; + MiqtVirtualQPauseAnimation(int msecs, QObject* parent): QPauseAnimation(msecs, parent) {}; + + virtual ~MiqtVirtualQPauseAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QPauseAnimation::duration(); + } + + + int callback_return_value = miqt_exec_callback_QPauseAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QPauseAnimation::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QPauseAnimation::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QPauseAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QPauseAnimation::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QPauseAnimation::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QPauseAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QPauseAnimation::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QPauseAnimation::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QPauseAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QPauseAnimation::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QPauseAnimation::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QPauseAnimation_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QPauseAnimation::updateDirection(static_cast(direction)); + + } + +}; + +void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPauseAnimation* QPauseAnimation_new2(int msecs) { - return new QPauseAnimation(static_cast(msecs)); +void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs)); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPauseAnimation* QPauseAnimation_new3(QObject* parent) { - return new QPauseAnimation(parent); +void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(parent); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent) { - return new QPauseAnimation(static_cast(msecs), parent); +void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs), parent); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self) { @@ -106,7 +253,51 @@ struct miqt_string QPauseAnimation_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QPauseAnimation_Delete(QPauseAnimation* self) { - delete self; +void QPauseAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__Duration = slot; +} + +int QPauseAnimation_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQPauseAnimation*)(self) )->virtualbase_Duration(); +} + +void QPauseAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__Event = slot; +} + +bool QPauseAnimation_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_Event(e); +} + +void QPauseAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QPauseAnimation_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QPauseAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__UpdateState = slot; +} + +void QPauseAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QPauseAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__UpdateDirection = slot; +} + +void QPauseAnimation_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QPauseAnimation_Delete(QPauseAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpauseanimation.go b/qt/gen_qpauseanimation.go index 3ea227c7..98f1b003 100644 --- a/qt/gen_qpauseanimation.go +++ b/qt/gen_qpauseanimation.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPauseAnimation struct { - h *C.QPauseAnimation + h *C.QPauseAnimation + isSubclass bool *QAbstractAnimation } @@ -32,39 +34,71 @@ func (this *QPauseAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPauseAnimation(h *C.QPauseAnimation) *QPauseAnimation { +// newQPauseAnimation constructs the type using only CGO pointers. +func newQPauseAnimation(h *C.QPauseAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPauseAnimation { if h == nil { return nil } - return &QPauseAnimation{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))} + return &QPauseAnimation{h: h, + QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQPauseAnimation(h unsafe.Pointer) *QPauseAnimation { - return newQPauseAnimation((*C.QPauseAnimation)(h)) +// UnsafeNewQPauseAnimation constructs the type using only unsafe pointers. +func UnsafeNewQPauseAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPauseAnimation { + if h == nil { + return nil + } + + return &QPauseAnimation{h: (*C.QPauseAnimation)(h), + QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } // NewQPauseAnimation constructs a new QPauseAnimation object. func NewQPauseAnimation() *QPauseAnimation { - ret := C.QPauseAnimation_new() - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new(&outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPauseAnimation2 constructs a new QPauseAnimation object. func NewQPauseAnimation2(msecs int) *QPauseAnimation { - ret := C.QPauseAnimation_new2((C.int)(msecs)) - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new2((C.int)(msecs), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPauseAnimation3 constructs a new QPauseAnimation object. func NewQPauseAnimation3(parent *QObject) *QPauseAnimation { - ret := C.QPauseAnimation_new3(parent.cPointer()) - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new3(parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPauseAnimation4 constructs a new QPauseAnimation object. func NewQPauseAnimation4(msecs int, parent *QObject) *QPauseAnimation { - ret := C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer()) - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPauseAnimation) MetaObject() *QMetaObject { @@ -147,9 +181,127 @@ func QPauseAnimation_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPauseAnimation) callVirtualBase_Duration() int { + + return (int)(C.QPauseAnimation_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QPauseAnimation) OnDuration(slot func(super func() int) int) { + C.QPauseAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_Duration +func miqt_exec_callback_QPauseAnimation_Duration(self *C.QPauseAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPauseAnimation{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QPauseAnimation) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QPauseAnimation_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QPauseAnimation) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QPauseAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_Event +func miqt_exec_callback_QPauseAnimation_Event(self *C.QPauseAnimation, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QPauseAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPauseAnimation) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QPauseAnimation_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QPauseAnimation) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QPauseAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_UpdateCurrentTime +func miqt_exec_callback_QPauseAnimation_UpdateCurrentTime(self *C.QPauseAnimation, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QPauseAnimation{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QPauseAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QPauseAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QPauseAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QPauseAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_UpdateState +func miqt_exec_callback_QPauseAnimation_UpdateState(self *C.QPauseAnimation, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QPauseAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QPauseAnimation) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QPauseAnimation_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QPauseAnimation) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QPauseAnimation_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_UpdateDirection +func miqt_exec_callback_QPauseAnimation_UpdateDirection(self *C.QPauseAnimation, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QPauseAnimation{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QPauseAnimation) Delete() { - C.QPauseAnimation_Delete(this.h) + C.QPauseAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpauseanimation.h b/qt/gen_qpauseanimation.h index 88c22dac..8bc883ba 100644 --- a/qt/gen_qpauseanimation.h +++ b/qt/gen_qpauseanimation.h @@ -15,30 +15,46 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; +class QEvent; class QMetaObject; class QObject; class QPauseAnimation; #else +typedef struct QAbstractAnimation QAbstractAnimation; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPauseAnimation QPauseAnimation; #endif -QPauseAnimation* QPauseAnimation_new(); -QPauseAnimation* QPauseAnimation_new2(int msecs); -QPauseAnimation* QPauseAnimation_new3(QObject* parent); -QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent); +void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self); void* QPauseAnimation_Metacast(QPauseAnimation* self, const char* param1); struct miqt_string QPauseAnimation_Tr(const char* s); struct miqt_string QPauseAnimation_TrUtf8(const char* s); int QPauseAnimation_Duration(const QPauseAnimation* self); void QPauseAnimation_SetDuration(QPauseAnimation* self, int msecs); +bool QPauseAnimation_Event(QPauseAnimation* self, QEvent* e); +void QPauseAnimation_UpdateCurrentTime(QPauseAnimation* self, int param1); struct miqt_string QPauseAnimation_Tr2(const char* s, const char* c); struct miqt_string QPauseAnimation_Tr3(const char* s, const char* c, int n); struct miqt_string QPauseAnimation_TrUtf82(const char* s, const char* c); struct miqt_string QPauseAnimation_TrUtf83(const char* s, const char* c, int n); -void QPauseAnimation_Delete(QPauseAnimation* self); +void QPauseAnimation_override_virtual_Duration(void* self, intptr_t slot); +int QPauseAnimation_virtualbase_Duration(const void* self); +void QPauseAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QPauseAnimation_virtualbase_Event(void* self, QEvent* e); +void QPauseAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QPauseAnimation_virtualbase_UpdateCurrentTime(void* self, int param1); +void QPauseAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QPauseAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QPauseAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QPauseAnimation_virtualbase_UpdateDirection(void* self, int direction); +void QPauseAnimation_Delete(QPauseAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpdfwriter.cpp b/qt/gen_qpdfwriter.cpp index a477153d..57b73eaa 100644 --- a/qt/gen_qpdfwriter.cpp +++ b/qt/gen_qpdfwriter.cpp @@ -1,23 +1,365 @@ #include +#include +#include #include +#include #include +#include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins +#include +#include #include #include #include #include #include +#include #include #include "gen_qpdfwriter.h" #include "_cgo_export.h" -QPdfWriter* QPdfWriter_new(struct miqt_string filename) { +class MiqtVirtualQPdfWriter : public virtual QPdfWriter { +public: + + MiqtVirtualQPdfWriter(const QString& filename): QPdfWriter(filename) {}; + MiqtVirtualQPdfWriter(QIODevice* device): QPdfWriter(device) {}; + + virtual ~MiqtVirtualQPdfWriter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool newPage() override { + if (handle__NewPage == 0) { + return QPdfWriter::newPage(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfWriter_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NewPage() { + + return QPdfWriter::newPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSize(QPagedPaintDevice::PageSize size) override { + if (handle__SetPageSize == 0) { + QPdfWriter::setPageSize(size); + return; + } + + QPagedPaintDevice::PageSize size_ret = size; + int sigval1 = static_cast(size_ret); + + miqt_exec_callback_QPdfWriter_SetPageSize(this, handle__SetPageSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSize(int size) { + + QPdfWriter::setPageSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSizeMM = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSizeMM(const QSizeF& size) override { + if (handle__SetPageSizeMM == 0) { + QPdfWriter::setPageSizeMM(size); + return; + } + + const QSizeF& size_ret = size; + // Cast returned reference into pointer + QSizeF* sigval1 = const_cast(&size_ret); + + miqt_exec_callback_QPdfWriter_SetPageSizeMM(this, handle__SetPageSizeMM, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSizeMM(QSizeF* size) { + + QPdfWriter::setPageSizeMM(*size); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void setMargins(const QPagedPaintDevice::Margins& m) override { + if (handle__SetMargins == 0) { + QPdfWriter::setMargins(m); + return; + } + + const QPagedPaintDevice::Margins& m_ret = m; + // Cast returned reference into pointer + QPagedPaintDevice__Margins* sigval1 = const_cast(&m_ret); + + miqt_exec_callback_QPdfWriter_SetMargins(this, handle__SetMargins, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMargins(QPagedPaintDevice__Margins* m) { + + QPdfWriter::setMargins(*m); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPdfWriter::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPdfWriter_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPdfWriter::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric id) const override { + if (handle__Metric == 0) { + return QPdfWriter::metric(id); + } + + QPaintDevice::PaintDeviceMetric id_ret = id; + int sigval1 = static_cast(id_ret); + + int callback_return_value = miqt_exec_callback_QPdfWriter_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int id) const { + + return QPdfWriter::metric(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPdfWriter::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfWriter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPdfWriter::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QPdfWriter::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfWriter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QPdfWriter::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QPdfWriter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfWriter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QPdfWriter::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QPdfWriter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfWriter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QPdfWriter::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QPdfWriter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfWriter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QPdfWriter::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QPdfWriter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfWriter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QPdfWriter::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QPdfWriter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfWriter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QPdfWriter::disconnectNotify(*signal); + + } + +}; + +void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - return new QPdfWriter(filename_QString); + MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(filename_QString); + *outptr_QPdfWriter = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPdfWriter* QPdfWriter_new2(QIODevice* device) { - return new QPdfWriter(device); +void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(device); + *outptr_QPdfWriter = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self) { @@ -186,7 +528,115 @@ void QPdfWriter_AddFileAttachment3(QPdfWriter* self, struct miqt_string fileName self->addFileAttachment(fileName_QString, data_QByteArray, mimeType_QString); } -void QPdfWriter_Delete(QPdfWriter* self) { - delete self; +void QPdfWriter_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__NewPage = slot; +} + +bool QPdfWriter_virtualbase_NewPage(void* self) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_NewPage(); +} + +void QPdfWriter_override_virtual_SetPageSize(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageSize = slot; +} + +void QPdfWriter_virtualbase_SetPageSize(void* self, int size) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageSize(size); +} + +void QPdfWriter_override_virtual_SetPageSizeMM(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageSizeMM = slot; +} + +void QPdfWriter_virtualbase_SetPageSizeMM(void* self, QSizeF* size) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageSizeMM(size); +} + +void QPdfWriter_override_virtual_SetMargins(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetMargins = slot; +} + +void QPdfWriter_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* m) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetMargins(m); +} + +void QPdfWriter_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPdfWriter_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPdfWriter*)(self) )->virtualbase_PaintEngine(); +} + +void QPdfWriter_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__Metric = slot; +} + +int QPdfWriter_virtualbase_Metric(const void* self, int id) { + return ( (const MiqtVirtualQPdfWriter*)(self) )->virtualbase_Metric(id); +} + +void QPdfWriter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__Event = slot; +} + +bool QPdfWriter_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_Event(event); +} + +void QPdfWriter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__EventFilter = slot; +} + +bool QPdfWriter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QPdfWriter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__TimerEvent = slot; +} + +void QPdfWriter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_TimerEvent(event); +} + +void QPdfWriter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__ChildEvent = slot; +} + +void QPdfWriter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_ChildEvent(event); +} + +void QPdfWriter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__CustomEvent = slot; +} + +void QPdfWriter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_CustomEvent(event); +} + +void QPdfWriter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__ConnectNotify = slot; +} + +void QPdfWriter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QPdfWriter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__DisconnectNotify = slot; +} + +void QPdfWriter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QPdfWriter_Delete(QPdfWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpdfwriter.go b/qt/gen_qpdfwriter.go index 81418b1f..69051efe 100644 --- a/qt/gen_qpdfwriter.go +++ b/qt/gen_qpdfwriter.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPdfWriter struct { - h *C.QPdfWriter + h *C.QPdfWriter + isSubclass bool *QObject *QPagedPaintDevice } @@ -33,15 +35,25 @@ func (this *QPdfWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPdfWriter(h *C.QPdfWriter) *QPdfWriter { +// newQPdfWriter constructs the type using only CGO pointers. +func newQPdfWriter(h *C.QPdfWriter, h_QObject *C.QObject, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPdfWriter { if h == nil { return nil } - return &QPdfWriter{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QPagedPaintDevice: UnsafeNewQPagedPaintDevice(unsafe.Pointer(h))} + return &QPdfWriter{h: h, + QObject: newQObject(h_QObject), + QPagedPaintDevice: newQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} } -func UnsafeNewQPdfWriter(h unsafe.Pointer) *QPdfWriter { - return newQPdfWriter((*C.QPdfWriter)(h)) +// UnsafeNewQPdfWriter constructs the type using only unsafe pointers. +func UnsafeNewQPdfWriter(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPdfWriter { + if h == nil { + return nil + } + + return &QPdfWriter{h: (*C.QPdfWriter)(h), + QObject: UnsafeNewQObject(h_QObject), + QPagedPaintDevice: UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} } // NewQPdfWriter constructs a new QPdfWriter object. @@ -50,14 +62,28 @@ func NewQPdfWriter(filename string) *QPdfWriter { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - ret := C.QPdfWriter_new(filename_ms) - return newQPdfWriter(ret) + var outptr_QPdfWriter *C.QPdfWriter = nil + var outptr_QObject *C.QObject = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPdfWriter_new(filename_ms, &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPdfWriter2 constructs a new QPdfWriter object. func NewQPdfWriter2(device *QIODevice) *QPdfWriter { - ret := C.QPdfWriter_new2(device.cPointer()) - return newQPdfWriter(ret) + var outptr_QPdfWriter *C.QPdfWriter = nil + var outptr_QObject *C.QObject = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPdfWriter_new2(device.cPointer(), &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPdfWriter) MetaObject() *QMetaObject { @@ -234,9 +260,312 @@ func (this *QPdfWriter) AddFileAttachment3(fileName string, data []byte, mimeTyp C.QPdfWriter_AddFileAttachment3(this.h, fileName_ms, data_alias, mimeType_ms) } +func (this *QPdfWriter) callVirtualBase_NewPage() bool { + + return (bool)(C.QPdfWriter_virtualbase_NewPage(unsafe.Pointer(this.h))) + +} +func (this *QPdfWriter) OnNewPage(slot func(super func() bool) bool) { + C.QPdfWriter_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_NewPage +func miqt_exec_callback_QPdfWriter_NewPage(self *C.QPdfWriter, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_NewPage) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageSize(size QPagedPaintDevice__PageSize) { + + C.QPdfWriter_virtualbase_SetPageSize(unsafe.Pointer(this.h), (C.int)(size)) + +} +func (this *QPdfWriter) OnSetPageSize(slot func(super func(size QPagedPaintDevice__PageSize), size QPagedPaintDevice__PageSize)) { + C.QPdfWriter_override_virtual_SetPageSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageSize +func miqt_exec_callback_QPdfWriter_SetPageSize(self *C.QPdfWriter, cb C.intptr_t, size C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size QPagedPaintDevice__PageSize), size QPagedPaintDevice__PageSize)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPagedPaintDevice__PageSize)(size) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageSize, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageSizeMM(size *QSizeF) { + + C.QPdfWriter_virtualbase_SetPageSizeMM(unsafe.Pointer(this.h), size.cPointer()) + +} +func (this *QPdfWriter) OnSetPageSizeMM(slot func(super func(size *QSizeF), size *QSizeF)) { + C.QPdfWriter_override_virtual_SetPageSizeMM(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageSizeMM +func miqt_exec_callback_QPdfWriter_SetPageSizeMM(self *C.QPdfWriter, cb C.intptr_t, size *C.QSizeF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *QSizeF), size *QSizeF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSizeF(unsafe.Pointer(size)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageSizeMM, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_SetMargins(m *QPagedPaintDevice__Margins) { + + C.QPdfWriter_virtualbase_SetMargins(unsafe.Pointer(this.h), m.cPointer()) + +} +func (this *QPdfWriter) OnSetMargins(slot func(super func(m *QPagedPaintDevice__Margins), m *QPagedPaintDevice__Margins)) { + C.QPdfWriter_override_virtual_SetMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetMargins +func miqt_exec_callback_QPdfWriter_SetMargins(self *C.QPdfWriter, cb C.intptr_t, m *C.QPagedPaintDevice__Margins) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m *QPagedPaintDevice__Margins), m *QPagedPaintDevice__Margins)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPagedPaintDevice__Margins(unsafe.Pointer(m)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_SetMargins, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPdfWriter_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPdfWriter) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QPdfWriter_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_PaintEngine +func miqt_exec_callback_QPdfWriter_PaintEngine(self *C.QPdfWriter, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QPdfWriter) callVirtualBase_Metric(id QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPdfWriter_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(id))) + +} +func (this *QPdfWriter) OnMetric(slot func(super func(id QPaintDevice__PaintDeviceMetric) int, id QPaintDevice__PaintDeviceMetric) int) { + C.QPdfWriter_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_Metric +func miqt_exec_callback_QPdfWriter_Metric(self *C.QPdfWriter, cb C.intptr_t, id C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id QPaintDevice__PaintDeviceMetric) int, id QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(id) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPdfWriter_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPdfWriter) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPdfWriter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_Event +func miqt_exec_callback_QPdfWriter_Event(self *C.QPdfWriter, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QPdfWriter_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QPdfWriter) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QPdfWriter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_EventFilter +func miqt_exec_callback_QPdfWriter_EventFilter(self *C.QPdfWriter, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QPdfWriter_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPdfWriter) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QPdfWriter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_TimerEvent +func miqt_exec_callback_QPdfWriter_TimerEvent(self *C.QPdfWriter, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QPdfWriter_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPdfWriter) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QPdfWriter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_ChildEvent +func miqt_exec_callback_QPdfWriter_ChildEvent(self *C.QPdfWriter, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_CustomEvent(event *QEvent) { + + C.QPdfWriter_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPdfWriter) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QPdfWriter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_CustomEvent +func miqt_exec_callback_QPdfWriter_CustomEvent(self *C.QPdfWriter, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QPdfWriter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPdfWriter) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPdfWriter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_ConnectNotify +func miqt_exec_callback_QPdfWriter_ConnectNotify(self *C.QPdfWriter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QPdfWriter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPdfWriter) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPdfWriter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_DisconnectNotify +func miqt_exec_callback_QPdfWriter_DisconnectNotify(self *C.QPdfWriter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QPdfWriter) Delete() { - C.QPdfWriter_Delete(this.h) + C.QPdfWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpdfwriter.h b/qt/gen_qpdfwriter.h index ed502c63..d97d5e2f 100644 --- a/qt/gen_qpdfwriter.h +++ b/qt/gen_qpdfwriter.h @@ -16,26 +16,42 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; +class QObject; +class QPagedPaintDevice; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins) typedef QPagedPaintDevice::Margins QPagedPaintDevice__Margins; #else class QPagedPaintDevice__Margins; #endif +class QPaintDevice; +class QPaintEngine; class QPdfWriter; class QSizeF; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPagedPaintDevice QPagedPaintDevice; typedef struct QPagedPaintDevice__Margins QPagedPaintDevice__Margins; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; typedef struct QPdfWriter QPdfWriter; typedef struct QSizeF QSizeF; +typedef struct QTimerEvent QTimerEvent; #endif -QPdfWriter* QPdfWriter_new(struct miqt_string filename); -QPdfWriter* QPdfWriter_new2(QIODevice* device); +void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self); void* QPdfWriter_Metacast(QPdfWriter* self, const char* param1); struct miqt_string QPdfWriter_Tr(const char* s); @@ -55,12 +71,40 @@ void QPdfWriter_AddFileAttachment(QPdfWriter* self, struct miqt_string fileName, void QPdfWriter_SetPageSize(QPdfWriter* self, int size); void QPdfWriter_SetPageSizeMM(QPdfWriter* self, QSizeF* size); void QPdfWriter_SetMargins(QPdfWriter* self, QPagedPaintDevice__Margins* m); +QPaintEngine* QPdfWriter_PaintEngine(const QPdfWriter* self); +int QPdfWriter_Metric(const QPdfWriter* self, int id); struct miqt_string QPdfWriter_Tr2(const char* s, const char* c); struct miqt_string QPdfWriter_Tr3(const char* s, const char* c, int n); struct miqt_string QPdfWriter_TrUtf82(const char* s, const char* c); struct miqt_string QPdfWriter_TrUtf83(const char* s, const char* c, int n); void QPdfWriter_AddFileAttachment3(QPdfWriter* self, struct miqt_string fileName, struct miqt_string data, struct miqt_string mimeType); -void QPdfWriter_Delete(QPdfWriter* self); +void QPdfWriter_override_virtual_NewPage(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_NewPage(void* self); +void QPdfWriter_override_virtual_SetPageSize(void* self, intptr_t slot); +void QPdfWriter_virtualbase_SetPageSize(void* self, int size); +void QPdfWriter_override_virtual_SetPageSizeMM(void* self, intptr_t slot); +void QPdfWriter_virtualbase_SetPageSizeMM(void* self, QSizeF* size); +void QPdfWriter_override_virtual_SetMargins(void* self, intptr_t slot); +void QPdfWriter_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* m); +void QPdfWriter_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPdfWriter_virtualbase_PaintEngine(const void* self); +void QPdfWriter_override_virtual_Metric(void* self, intptr_t slot); +int QPdfWriter_virtualbase_Metric(const void* self, int id); +void QPdfWriter_override_virtual_Event(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_Event(void* self, QEvent* event); +void QPdfWriter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QPdfWriter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPdfWriter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QPdfWriter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QPdfWriter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QPdfWriter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QPdfWriter_virtualbase_CustomEvent(void* self, QEvent* event); +void QPdfWriter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QPdfWriter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QPdfWriter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QPdfWriter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QPdfWriter_Delete(QPdfWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpen.cpp b/qt/gen_qpen.cpp index 26e58812..1f2b1bb6 100644 --- a/qt/gen_qpen.cpp +++ b/qt/gen_qpen.cpp @@ -6,36 +6,44 @@ #include "gen_qpen.h" #include "_cgo_export.h" -QPen* QPen_new() { - return new QPen(); +void QPen_new(QPen** outptr_QPen) { + QPen* ret = new QPen(); + *outptr_QPen = ret; } -QPen* QPen_new2(int param1) { - return new QPen(static_cast(param1)); +void QPen_new2(int param1, QPen** outptr_QPen) { + QPen* ret = new QPen(static_cast(param1)); + *outptr_QPen = ret; } -QPen* QPen_new3(QColor* color) { - return new QPen(*color); +void QPen_new3(QColor* color, QPen** outptr_QPen) { + QPen* ret = new QPen(*color); + *outptr_QPen = ret; } -QPen* QPen_new4(QBrush* brush, double width) { - return new QPen(*brush, static_cast(width)); +void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width)); + *outptr_QPen = ret; } -QPen* QPen_new5(QPen* pen) { - return new QPen(*pen); +void QPen_new5(QPen* pen, QPen** outptr_QPen) { + QPen* ret = new QPen(*pen); + *outptr_QPen = ret; } -QPen* QPen_new6(QBrush* brush, double width, int s) { - return new QPen(*brush, static_cast(width), static_cast(s)); +void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width), static_cast(s)); + *outptr_QPen = ret; } -QPen* QPen_new7(QBrush* brush, double width, int s, int c) { - return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); +void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); + *outptr_QPen = ret; } -QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j) { - return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); +void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); + *outptr_QPen = ret; } void QPen_OperatorAssign(QPen* self, QPen* pen) { @@ -171,7 +179,11 @@ bool QPen_IsDetached(QPen* self) { return self->isDetached(); } -void QPen_Delete(QPen* self) { - delete self; +void QPen_Delete(QPen* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpen.go b/qt/gen_qpen.go index 1354a556..6dccda88 100644 --- a/qt/gen_qpen.go +++ b/qt/gen_qpen.go @@ -14,7 +14,8 @@ import ( ) type QPen struct { - h *C.QPen + h *C.QPen + isSubclass bool } func (this *QPen) cPointer() *C.QPen { @@ -31,6 +32,7 @@ func (this *QPen) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPen constructs the type using only CGO pointers. func newQPen(h *C.QPen) *QPen { if h == nil { return nil @@ -38,56 +40,93 @@ func newQPen(h *C.QPen) *QPen { return &QPen{h: h} } +// UnsafeNewQPen constructs the type using only unsafe pointers. func UnsafeNewQPen(h unsafe.Pointer) *QPen { - return newQPen((*C.QPen)(h)) + if h == nil { + return nil + } + + return &QPen{h: (*C.QPen)(h)} } // NewQPen constructs a new QPen object. func NewQPen() *QPen { - ret := C.QPen_new() - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new(&outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen2 constructs a new QPen object. func NewQPen2(param1 PenStyle) *QPen { - ret := C.QPen_new2((C.int)(param1)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new2((C.int)(param1), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen3 constructs a new QPen object. func NewQPen3(color *QColor) *QPen { - ret := C.QPen_new3(color.cPointer()) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new3(color.cPointer(), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen4 constructs a new QPen object. func NewQPen4(brush *QBrush, width float64) *QPen { - ret := C.QPen_new4(brush.cPointer(), (C.double)(width)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new4(brush.cPointer(), (C.double)(width), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen5 constructs a new QPen object. func NewQPen5(pen *QPen) *QPen { - ret := C.QPen_new5(pen.cPointer()) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new5(pen.cPointer(), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen6 constructs a new QPen object. func NewQPen6(brush *QBrush, width float64, s PenStyle) *QPen { - ret := C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen7 constructs a new QPen object. func NewQPen7(brush *QBrush, width float64, s PenStyle, c PenCapStyle) *QPen { - ret := C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen8 constructs a new QPen object. func NewQPen8(brush *QBrush, width float64, s PenStyle, c PenCapStyle, j PenJoinStyle) *QPen { - ret := C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } func (this *QPen) OperatorAssign(pen *QPen) { @@ -222,7 +261,7 @@ func (this *QPen) IsDetached() bool { // Delete this object from C++ memory. func (this *QPen) Delete() { - C.QPen_Delete(this.h) + C.QPen_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpen.h b/qt/gen_qpen.h index 0d8a8c13..ad12f4b3 100644 --- a/qt/gen_qpen.h +++ b/qt/gen_qpen.h @@ -24,14 +24,14 @@ typedef struct QColor QColor; typedef struct QPen QPen; #endif -QPen* QPen_new(); -QPen* QPen_new2(int param1); -QPen* QPen_new3(QColor* color); -QPen* QPen_new4(QBrush* brush, double width); -QPen* QPen_new5(QPen* pen); -QPen* QPen_new6(QBrush* brush, double width, int s); -QPen* QPen_new7(QBrush* brush, double width, int s, int c); -QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j); +void QPen_new(QPen** outptr_QPen); +void QPen_new2(int param1, QPen** outptr_QPen); +void QPen_new3(QColor* color, QPen** outptr_QPen); +void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen); +void QPen_new5(QPen* pen, QPen** outptr_QPen); +void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen); +void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen); +void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen); void QPen_OperatorAssign(QPen* self, QPen* pen); void QPen_Swap(QPen* self, QPen* other); int QPen_Style(const QPen* self); @@ -60,7 +60,7 @@ void QPen_SetCosmetic(QPen* self, bool cosmetic); bool QPen_OperatorEqual(const QPen* self, QPen* p); bool QPen_OperatorNotEqual(const QPen* self, QPen* p); bool QPen_IsDetached(QPen* self); -void QPen_Delete(QPen* self); +void QPen_Delete(QPen* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpicture.cpp b/qt/gen_qpicture.cpp index e767d202..7bcaec94 100644 --- a/qt/gen_qpicture.cpp +++ b/qt/gen_qpicture.cpp @@ -1,10 +1,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -13,16 +15,196 @@ #include "gen_qpicture.h" #include "_cgo_export.h" -QPicture* QPicture_new() { - return new QPicture(); +class MiqtVirtualQPicture : public virtual QPicture { +public: + + MiqtVirtualQPicture(): QPicture() {}; + MiqtVirtualQPicture(const QPicture& param1): QPicture(param1) {}; + MiqtVirtualQPicture(int formatVersion): QPicture(formatVersion) {}; + + virtual ~MiqtVirtualQPicture() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPicture::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPicture_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPicture::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(const char* data, uint size) override { + if (handle__SetData == 0) { + QPicture::setData(data, size); + return; + } + + const char* sigval1 = (const char*) data; + uint size_ret = size; + unsigned int sigval2 = static_cast(size_ret); + + miqt_exec_callback_QPicture_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(const char* data, unsigned int size) { + + QPicture::setData(data, static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPicture::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPicture_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPicture::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric m) const override { + if (handle__Metric == 0) { + return QPicture::metric(m); + } + + QPaintDevice::PaintDeviceMetric m_ret = m; + int sigval1 = static_cast(m_ret); + + int callback_return_value = miqt_exec_callback_QPicture_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int m) const { + + return QPicture::metric(static_cast(m)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QPicture::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPicture_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPicture::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QPicture::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPicture_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPicture::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QPicture::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPicture_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPicture::sharedPainter(); + + } + +}; + +void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(); + *outptr_QPicture = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPicture* QPicture_new2(QPicture* param1) { - return new QPicture(*param1); +void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(*param1); + *outptr_QPicture = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPicture* QPicture_new3(int formatVersion) { - return new QPicture(static_cast(formatVersion)); +void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(static_cast(formatVersion)); + *outptr_QPicture = ret; + *outptr_QPaintDevice = static_cast(ret); } bool QPicture_IsNull(const QPicture* self) { @@ -195,21 +377,84 @@ bool QPicture_Save22(QPicture* self, struct miqt_string fileName, const char* fo return self->save(fileName_QString, format); } -void QPicture_Delete(QPicture* self) { - delete self; +void QPicture_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__DevType = slot; +} + +int QPicture_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_DevType(); +} + +void QPicture_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__SetData = slot; +} + +void QPicture_virtualbase_SetData(void* self, const char* data, unsigned int size) { + ( (MiqtVirtualQPicture*)(self) )->virtualbase_SetData(data, size); } -QPictureIO* QPictureIO_new() { - return new QPictureIO(); +void QPicture_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__PaintEngine = slot; } -QPictureIO* QPictureIO_new2(QIODevice* ioDevice, const char* format) { - return new QPictureIO(ioDevice, format); +QPaintEngine* QPicture_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_PaintEngine(); } -QPictureIO* QPictureIO_new3(struct miqt_string fileName, const char* format) { +void QPicture_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__Metric = slot; +} + +int QPicture_virtualbase_Metric(const void* self, int m) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_Metric(m); +} + +void QPicture_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__InitPainter = slot; +} + +void QPicture_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPicture*)(self) )->virtualbase_InitPainter(painter); +} + +void QPicture_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPicture_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_Redirected(offset); +} + +void QPicture_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPicture_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_SharedPainter(); +} + +void QPicture_Delete(QPicture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QPictureIO_new(QPictureIO** outptr_QPictureIO) { + QPictureIO* ret = new QPictureIO(); + *outptr_QPictureIO = ret; +} + +void QPictureIO_new2(QIODevice* ioDevice, const char* format, QPictureIO** outptr_QPictureIO) { + QPictureIO* ret = new QPictureIO(ioDevice, format); + *outptr_QPictureIO = ret; +} + +void QPictureIO_new3(struct miqt_string fileName, const char* format, QPictureIO** outptr_QPictureIO) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPictureIO(fileName_QString, format); + QPictureIO* ret = new QPictureIO(fileName_QString, format); + *outptr_QPictureIO = ret; } QPicture* QPictureIO_Picture(const QPictureIO* self) { @@ -365,7 +610,11 @@ struct miqt_array /* of struct miqt_string */ QPictureIO_OutputFormats() { return _out; } -void QPictureIO_Delete(QPictureIO* self) { - delete self; +void QPictureIO_Delete(QPictureIO* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpicture.go b/qt/gen_qpicture.go index 7fba6864..93f27cec 100644 --- a/qt/gen_qpicture.go +++ b/qt/gen_qpicture.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPicture struct { - h *C.QPicture + h *C.QPicture + isSubclass bool *QPaintDevice } @@ -32,33 +34,56 @@ func (this *QPicture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPicture(h *C.QPicture) *QPicture { +// newQPicture constructs the type using only CGO pointers. +func newQPicture(h *C.QPicture, h_QPaintDevice *C.QPaintDevice) *QPicture { if h == nil { return nil } - return &QPicture{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPicture{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPicture(h unsafe.Pointer) *QPicture { - return newQPicture((*C.QPicture)(h)) +// UnsafeNewQPicture constructs the type using only unsafe pointers. +func UnsafeNewQPicture(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPicture { + if h == nil { + return nil + } + + return &QPicture{h: (*C.QPicture)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQPicture constructs a new QPicture object. func NewQPicture() *QPicture { - ret := C.QPicture_new() - return newQPicture(ret) + var outptr_QPicture *C.QPicture = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPicture_new(&outptr_QPicture, &outptr_QPaintDevice) + ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPicture2 constructs a new QPicture object. func NewQPicture2(param1 *QPicture) *QPicture { - ret := C.QPicture_new2(param1.cPointer()) - return newQPicture(ret) + var outptr_QPicture *C.QPicture = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPicture_new2(param1.cPointer(), &outptr_QPicture, &outptr_QPaintDevice) + ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPicture3 constructs a new QPicture object. func NewQPicture3(formatVersion int) *QPicture { - ret := C.QPicture_new3((C.int)(formatVersion)) - return newQPicture(ret) + var outptr_QPicture *C.QPicture = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPicture_new3((C.int)(formatVersion), &outptr_QPicture, &outptr_QPaintDevice) + ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPicture) IsNull() bool { @@ -236,9 +261,173 @@ func (this *QPicture) Save22(fileName string, format string) bool { return (bool)(C.QPicture_Save22(this.h, fileName_ms, format_Cstring)) } +func (this *QPicture) callVirtualBase_DevType() int { + + return (int)(C.QPicture_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPicture) OnDevType(slot func(super func() int) int) { + C.QPicture_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_DevType +func miqt_exec_callback_QPicture_DevType(self *C.QPicture, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPicture) callVirtualBase_SetData(data string, size uint) { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + C.QPicture_virtualbase_SetData(unsafe.Pointer(this.h), data_Cstring, (C.uint)(size)) + +} +func (this *QPicture) OnSetData(slot func(super func(data string, size uint), data string, size uint)) { + C.QPicture_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_SetData +func miqt_exec_callback_QPicture_SetData(self *C.QPicture, cb C.intptr_t, data *C.const_char, size C.uint) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, size uint), data string, size uint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (uint)(size) + + gofunc((&QPicture{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QPicture) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPicture_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPicture) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QPicture_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_PaintEngine +func miqt_exec_callback_QPicture_PaintEngine(self *C.QPicture, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QPicture) callVirtualBase_Metric(m QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPicture_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(m))) + +} +func (this *QPicture) OnMetric(slot func(super func(m QPaintDevice__PaintDeviceMetric) int, m QPaintDevice__PaintDeviceMetric) int) { + C.QPicture_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_Metric +func miqt_exec_callback_QPicture_Metric(self *C.QPicture, cb C.intptr_t, m C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m QPaintDevice__PaintDeviceMetric) int, m QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(m) + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPicture) callVirtualBase_InitPainter(painter *QPainter) { + + C.QPicture_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QPicture) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QPicture_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_InitPainter +func miqt_exec_callback_QPicture_InitPainter(self *C.QPicture, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPicture{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPicture) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QPicture_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QPicture) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QPicture_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_Redirected +func miqt_exec_callback_QPicture_Redirected(self *C.QPicture, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPicture) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QPicture_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPicture) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QPicture_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_SharedPainter +func miqt_exec_callback_QPicture_SharedPainter(self *C.QPicture, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QPicture) Delete() { - C.QPicture_Delete(this.h) + C.QPicture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -251,7 +440,8 @@ func (this *QPicture) GoGC() { } type QPictureIO struct { - h *C.QPictureIO + h *C.QPictureIO + isSubclass bool } func (this *QPictureIO) cPointer() *C.QPictureIO { @@ -268,6 +458,7 @@ func (this *QPictureIO) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPictureIO constructs the type using only CGO pointers. func newQPictureIO(h *C.QPictureIO) *QPictureIO { if h == nil { return nil @@ -275,22 +466,35 @@ func newQPictureIO(h *C.QPictureIO) *QPictureIO { return &QPictureIO{h: h} } +// UnsafeNewQPictureIO constructs the type using only unsafe pointers. func UnsafeNewQPictureIO(h unsafe.Pointer) *QPictureIO { - return newQPictureIO((*C.QPictureIO)(h)) + if h == nil { + return nil + } + + return &QPictureIO{h: (*C.QPictureIO)(h)} } // NewQPictureIO constructs a new QPictureIO object. func NewQPictureIO() *QPictureIO { - ret := C.QPictureIO_new() - return newQPictureIO(ret) + var outptr_QPictureIO *C.QPictureIO = nil + + C.QPictureIO_new(&outptr_QPictureIO) + ret := newQPictureIO(outptr_QPictureIO) + ret.isSubclass = true + return ret } // NewQPictureIO2 constructs a new QPictureIO object. func NewQPictureIO2(ioDevice *QIODevice, format string) *QPictureIO { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QPictureIO_new2(ioDevice.cPointer(), format_Cstring) - return newQPictureIO(ret) + var outptr_QPictureIO *C.QPictureIO = nil + + C.QPictureIO_new2(ioDevice.cPointer(), format_Cstring, &outptr_QPictureIO) + ret := newQPictureIO(outptr_QPictureIO) + ret.isSubclass = true + return ret } // NewQPictureIO3 constructs a new QPictureIO object. @@ -301,12 +505,16 @@ func NewQPictureIO3(fileName string, format string) *QPictureIO { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QPictureIO_new3(fileName_ms, format_Cstring) - return newQPictureIO(ret) + var outptr_QPictureIO *C.QPictureIO = nil + + C.QPictureIO_new3(fileName_ms, format_Cstring, &outptr_QPictureIO) + ret := newQPictureIO(outptr_QPictureIO) + ret.isSubclass = true + return ret } func (this *QPictureIO) Picture() *QPicture { - return UnsafeNewQPicture(unsafe.Pointer(C.QPictureIO_Picture(this.h))) + return UnsafeNewQPicture(unsafe.Pointer(C.QPictureIO_Picture(this.h)), nil) } func (this *QPictureIO) Status() int { @@ -319,7 +527,7 @@ func (this *QPictureIO) Format() string { } func (this *QPictureIO) IoDevice() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QPictureIO_IoDevice(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QPictureIO_IoDevice(this.h)), nil) } func (this *QPictureIO) FileName() string { @@ -451,7 +659,7 @@ func QPictureIO_OutputFormats() [][]byte { // Delete this object from C++ memory. func (this *QPictureIO) Delete() { - C.QPictureIO_Delete(this.h) + C.QPictureIO_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpicture.h b/qt/gen_qpicture.h index 21930fe8..4135f4c0 100644 --- a/qt/gen_qpicture.h +++ b/qt/gen_qpicture.h @@ -17,24 +17,28 @@ extern "C" { #ifdef __cplusplus class QByteArray; class QIODevice; +class QPaintDevice; class QPaintEngine; class QPainter; class QPicture; class QPictureIO; +class QPoint; class QRect; #else typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; typedef struct QPainter QPainter; typedef struct QPicture QPicture; typedef struct QPictureIO QPictureIO; +typedef struct QPoint QPoint; typedef struct QRect QRect; #endif -QPicture* QPicture_new(); -QPicture* QPicture_new2(QPicture* param1); -QPicture* QPicture_new3(int formatVersion); +void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); +void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); +void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); bool QPicture_IsNull(const QPicture* self); int QPicture_DevType(const QPicture* self); unsigned int QPicture_Size(const QPicture* self); @@ -57,15 +61,30 @@ struct miqt_array /* of struct miqt_string */ QPicture_OutputFormats(); struct miqt_array /* of struct miqt_string */ QPicture_InputFormatList(); struct miqt_array /* of struct miqt_string */ QPicture_OutputFormatList(); QPaintEngine* QPicture_PaintEngine(const QPicture* self); +int QPicture_Metric(const QPicture* self, int m); bool QPicture_Load2(QPicture* self, QIODevice* dev, const char* format); bool QPicture_Load22(QPicture* self, struct miqt_string fileName, const char* format); bool QPicture_Save2(QPicture* self, QIODevice* dev, const char* format); bool QPicture_Save22(QPicture* self, struct miqt_string fileName, const char* format); -void QPicture_Delete(QPicture* self); +void QPicture_override_virtual_DevType(void* self, intptr_t slot); +int QPicture_virtualbase_DevType(const void* self); +void QPicture_override_virtual_SetData(void* self, intptr_t slot); +void QPicture_virtualbase_SetData(void* self, const char* data, unsigned int size); +void QPicture_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPicture_virtualbase_PaintEngine(const void* self); +void QPicture_override_virtual_Metric(void* self, intptr_t slot); +int QPicture_virtualbase_Metric(const void* self, int m); +void QPicture_override_virtual_InitPainter(void* self, intptr_t slot); +void QPicture_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPicture_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPicture_virtualbase_Redirected(const void* self, QPoint* offset); +void QPicture_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPicture_virtualbase_SharedPainter(const void* self); +void QPicture_Delete(QPicture* self, bool isSubclass); -QPictureIO* QPictureIO_new(); -QPictureIO* QPictureIO_new2(QIODevice* ioDevice, const char* format); -QPictureIO* QPictureIO_new3(struct miqt_string fileName, const char* format); +void QPictureIO_new(QPictureIO** outptr_QPictureIO); +void QPictureIO_new2(QIODevice* ioDevice, const char* format, QPictureIO** outptr_QPictureIO); +void QPictureIO_new3(struct miqt_string fileName, const char* format, QPictureIO** outptr_QPictureIO); QPicture* QPictureIO_Picture(const QPictureIO* self); int QPictureIO_Status(const QPictureIO* self); const char* QPictureIO_Format(const QPictureIO* self); @@ -90,7 +109,7 @@ struct miqt_string QPictureIO_PictureFormat(struct miqt_string fileName); struct miqt_string QPictureIO_PictureFormatWithQIODevice(QIODevice* param1); struct miqt_array /* of struct miqt_string */ QPictureIO_InputFormats(); struct miqt_array /* of struct miqt_string */ QPictureIO_OutputFormats(); -void QPictureIO_Delete(QPictureIO* self); +void QPictureIO_Delete(QPictureIO* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpictureformatplugin.cpp b/qt/gen_qpictureformatplugin.cpp index 58846cda..9e264b3e 100644 --- a/qt/gen_qpictureformatplugin.cpp +++ b/qt/gen_qpictureformatplugin.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -99,7 +100,11 @@ struct miqt_string QPictureFormatPlugin_TrUtf83(const char* s, const char* c, in return _ms; } -void QPictureFormatPlugin_Delete(QPictureFormatPlugin* self) { - delete self; +void QPictureFormatPlugin_Delete(QPictureFormatPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpictureformatplugin.go b/qt/gen_qpictureformatplugin.go index b7ef8526..d5d232a2 100644 --- a/qt/gen_qpictureformatplugin.go +++ b/qt/gen_qpictureformatplugin.go @@ -14,7 +14,8 @@ import ( ) type QPictureFormatPlugin struct { - h *C.QPictureFormatPlugin + h *C.QPictureFormatPlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QPictureFormatPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPictureFormatPlugin(h *C.QPictureFormatPlugin) *QPictureFormatPlugin { +// newQPictureFormatPlugin constructs the type using only CGO pointers. +func newQPictureFormatPlugin(h *C.QPictureFormatPlugin, h_QObject *C.QObject) *QPictureFormatPlugin { if h == nil { return nil } - return &QPictureFormatPlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QPictureFormatPlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQPictureFormatPlugin(h unsafe.Pointer) *QPictureFormatPlugin { - return newQPictureFormatPlugin((*C.QPictureFormatPlugin)(h)) +// UnsafeNewQPictureFormatPlugin constructs the type using only unsafe pointers. +func UnsafeNewQPictureFormatPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QPictureFormatPlugin { + if h == nil { + return nil + } + + return &QPictureFormatPlugin{h: (*C.QPictureFormatPlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QPictureFormatPlugin) MetaObject() *QMetaObject { @@ -149,7 +158,7 @@ func QPictureFormatPlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPictureFormatPlugin) Delete() { - C.QPictureFormatPlugin_Delete(this.h) + C.QPictureFormatPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpictureformatplugin.h b/qt/gen_qpictureformatplugin.h index 89535d80..7ea5b893 100644 --- a/qt/gen_qpictureformatplugin.h +++ b/qt/gen_qpictureformatplugin.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QPicture; class QPictureFormatPlugin; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPicture QPicture; typedef struct QPictureFormatPlugin QPictureFormatPlugin; #endif @@ -35,7 +37,7 @@ struct miqt_string QPictureFormatPlugin_Tr2(const char* s, const char* c); struct miqt_string QPictureFormatPlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QPictureFormatPlugin_TrUtf82(const char* s, const char* c); struct miqt_string QPictureFormatPlugin_TrUtf83(const char* s, const char* c, int n); -void QPictureFormatPlugin_Delete(QPictureFormatPlugin* self); +void QPictureFormatPlugin_Delete(QPictureFormatPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpixelformat.cpp b/qt/gen_qpixelformat.cpp index a12eea47..a5747dfa 100644 --- a/qt/gen_qpixelformat.cpp +++ b/qt/gen_qpixelformat.cpp @@ -3,24 +3,29 @@ #include "gen_qpixelformat.h" #include "_cgo_export.h" -QPixelFormat* QPixelFormat_new() { - return new QPixelFormat(); +void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation) { - return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); +void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new3(QPixelFormat* param1) { - return new QPixelFormat(*param1); +void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(*param1); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder) { - return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); +void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum) { - return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); +void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); + *outptr_QPixelFormat = ret; } int QPixelFormat_ColorModel(const QPixelFormat* self) { @@ -133,7 +138,11 @@ unsigned char QPixelFormat_SubEnum(const QPixelFormat* self) { return static_cast(_ret); } -void QPixelFormat_Delete(QPixelFormat* self) { - delete self; +void QPixelFormat_Delete(QPixelFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpixelformat.go b/qt/gen_qpixelformat.go index 1743dfda..9ba57a83 100644 --- a/qt/gen_qpixelformat.go +++ b/qt/gen_qpixelformat.go @@ -87,7 +87,8 @@ const ( ) type QPixelFormat struct { - h *C.QPixelFormat + h *C.QPixelFormat + isSubclass bool } func (this *QPixelFormat) cPointer() *C.QPixelFormat { @@ -104,6 +105,7 @@ func (this *QPixelFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPixelFormat constructs the type using only CGO pointers. func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat { if h == nil { return nil @@ -111,38 +113,63 @@ func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat { return &QPixelFormat{h: h} } +// UnsafeNewQPixelFormat constructs the type using only unsafe pointers. func UnsafeNewQPixelFormat(h unsafe.Pointer) *QPixelFormat { - return newQPixelFormat((*C.QPixelFormat)(h)) + if h == nil { + return nil + } + + return &QPixelFormat{h: (*C.QPixelFormat)(h)} } // NewQPixelFormat constructs a new QPixelFormat object. func NewQPixelFormat() *QPixelFormat { - ret := C.QPixelFormat_new() - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new(&outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat2 constructs a new QPixelFormat object. func NewQPixelFormat2(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation) *QPixelFormat { - ret := C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation)) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat3 constructs a new QPixelFormat object. func NewQPixelFormat3(param1 *QPixelFormat) *QPixelFormat { - ret := C.QPixelFormat_new3(param1.cPointer()) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new3(param1.cPointer(), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat4 constructs a new QPixelFormat object. func NewQPixelFormat4(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder) *QPixelFormat { - ret := C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder)) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat5 constructs a new QPixelFormat object. func NewQPixelFormat5(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder, subEnum byte) *QPixelFormat { - ret := C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum)) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } func (this *QPixelFormat) ColorModel() QPixelFormat__ColorModel { @@ -235,7 +262,7 @@ func (this *QPixelFormat) SubEnum() byte { // Delete this object from C++ memory. func (this *QPixelFormat) Delete() { - C.QPixelFormat_Delete(this.h) + C.QPixelFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpixelformat.h b/qt/gen_qpixelformat.h index 54d8f91d..7f1e405c 100644 --- a/qt/gen_qpixelformat.h +++ b/qt/gen_qpixelformat.h @@ -20,11 +20,11 @@ class QPixelFormat; typedef struct QPixelFormat QPixelFormat; #endif -QPixelFormat* QPixelFormat_new(); -QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation); -QPixelFormat* QPixelFormat_new3(QPixelFormat* param1); -QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder); -QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum); +void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat); int QPixelFormat_ColorModel(const QPixelFormat* self); unsigned char QPixelFormat_ChannelCount(const QPixelFormat* self); unsigned char QPixelFormat_RedSize(const QPixelFormat* self); @@ -47,7 +47,7 @@ int QPixelFormat_TypeInterpretation(const QPixelFormat* self); int QPixelFormat_ByteOrder(const QPixelFormat* self); int QPixelFormat_YuvLayout(const QPixelFormat* self); unsigned char QPixelFormat_SubEnum(const QPixelFormat* self); -void QPixelFormat_Delete(QPixelFormat* self); +void QPixelFormat_Delete(QPixelFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpixmap.cpp b/qt/gen_qpixmap.cpp index c98bc5b5..d911f4cc 100644 --- a/qt/gen_qpixmap.cpp +++ b/qt/gen_qpixmap.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -21,35 +22,201 @@ #include "gen_qpixmap.h" #include "_cgo_export.h" -QPixmap* QPixmap_new() { - return new QPixmap(); +class MiqtVirtualQPixmap : public virtual QPixmap { +public: + + MiqtVirtualQPixmap(): QPixmap() {}; + MiqtVirtualQPixmap(int w, int h): QPixmap(w, h) {}; + MiqtVirtualQPixmap(const QSize& param1): QPixmap(param1) {}; + MiqtVirtualQPixmap(const QString& fileName): QPixmap(fileName) {}; + MiqtVirtualQPixmap(const QPixmap& param1): QPixmap(param1) {}; + MiqtVirtualQPixmap(const QString& fileName, const char* format): QPixmap(fileName, format) {}; + MiqtVirtualQPixmap(const QString& fileName, const char* format, Qt::ImageConversionFlags flags): QPixmap(fileName, format, flags) {}; + + virtual ~MiqtVirtualQPixmap() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPixmap::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPixmap_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPixmap::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPixmap::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPixmap_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPixmap::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QPixmap::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPixmap_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QPixmap::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QPixmap::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPixmap_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPixmap::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QPixmap::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPixmap_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPixmap::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QPixmap::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPixmap_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPixmap::sharedPainter(); + + } + +}; + +void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new2(int w, int h) { - return new QPixmap(static_cast(w), static_cast(h)); +void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(static_cast(w), static_cast(h)); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new3(QSize* param1) { - return new QPixmap(*param1); +void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new4(struct miqt_string fileName) { +void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPixmap(fileName_QString); + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new5(QPixmap* param1) { - return new QPixmap(*param1); +void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format) { +void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPixmap(fileName_QString, format); + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags) { +void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPixmap(fileName_QString, format, static_cast(flags)); + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format, static_cast(flags)); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1) { @@ -407,7 +574,59 @@ void QPixmap_Scroll4(QPixmap* self, int dx, int dy, QRect* rect, QRegion* expose self->scroll(static_cast(dx), static_cast(dy), *rect, exposed); } -void QPixmap_Delete(QPixmap* self) { - delete self; +void QPixmap_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__DevType = slot; +} + +int QPixmap_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_DevType(); +} + +void QPixmap_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPixmap_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_PaintEngine(); +} + +void QPixmap_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__Metric = slot; +} + +int QPixmap_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_Metric(param1); +} + +void QPixmap_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__InitPainter = slot; +} + +void QPixmap_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_InitPainter(painter); +} + +void QPixmap_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPixmap_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_Redirected(offset); +} + +void QPixmap_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPixmap_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_SharedPainter(); +} + +void QPixmap_Delete(QPixmap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpixmap.go b/qt/gen_qpixmap.go index 2ac6a581..7b65a51e 100644 --- a/qt/gen_qpixmap.go +++ b/qt/gen_qpixmap.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPixmap struct { - h *C.QPixmap + h *C.QPixmap + isSubclass bool *QPaintDevice } @@ -32,33 +34,56 @@ func (this *QPixmap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPixmap(h *C.QPixmap) *QPixmap { +// newQPixmap constructs the type using only CGO pointers. +func newQPixmap(h *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QPixmap { if h == nil { return nil } - return &QPixmap{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPixmap{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPixmap(h unsafe.Pointer) *QPixmap { - return newQPixmap((*C.QPixmap)(h)) +// UnsafeNewQPixmap constructs the type using only unsafe pointers. +func UnsafeNewQPixmap(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPixmap { + if h == nil { + return nil + } + + return &QPixmap{h: (*C.QPixmap)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQPixmap constructs a new QPixmap object. func NewQPixmap() *QPixmap { - ret := C.QPixmap_new() - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new(&outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap2 constructs a new QPixmap object. func NewQPixmap2(w int, h int) *QPixmap { - ret := C.QPixmap_new2((C.int)(w), (C.int)(h)) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new2((C.int)(w), (C.int)(h), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap3 constructs a new QPixmap object. func NewQPixmap3(param1 *QSize) *QPixmap { - ret := C.QPixmap_new3(param1.cPointer()) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new3(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap4 constructs a new QPixmap object. @@ -67,14 +92,24 @@ func NewQPixmap4(fileName string) *QPixmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QPixmap_new4(fileName_ms) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new4(fileName_ms, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap5 constructs a new QPixmap object. func NewQPixmap5(param1 *QPixmap) *QPixmap { - ret := C.QPixmap_new5(param1.cPointer()) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new5(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap6 constructs a new QPixmap object. @@ -85,8 +120,13 @@ func NewQPixmap6(fileName string, format string) *QPixmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QPixmap_new6(fileName_ms, format_Cstring) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new6(fileName_ms, format_Cstring, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap7 constructs a new QPixmap object. @@ -97,8 +137,13 @@ func NewQPixmap7(fileName string, format string, flags ImageConversionFlag) *QPi defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags)) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPixmap) OperatorAssign(param1 *QPixmap) { @@ -161,7 +206,7 @@ func (this *QPixmap) Fill3(device *QPaintDevice, xofs int, yofs int) { func (this *QPixmap) Mask() *QBitmap { _ret := C.QPixmap_Mask(this.h) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -188,70 +233,70 @@ func (this *QPixmap) HasAlphaChannel() bool { func (this *QPixmap) CreateHeuristicMask() *QBitmap { _ret := C.QPixmap_CreateHeuristicMask(this.h) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor(maskColor *QColor) *QBitmap { _ret := C.QPixmap_CreateMaskFromColor(this.h, maskColor.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow(param1 uintptr) *QPixmap { _ret := C.QPixmap_GrabWindow((C.uintptr_t)(param1)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget(widget *QObject, rect *QRect) *QPixmap { _ret := C.QPixmap_GrabWidget(widget.cPointer(), rect.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidgetWithWidget(widget *QObject) *QPixmap { _ret := C.QPixmap_GrabWidgetWithWidget(widget.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled(w int, h int) *QPixmap { _ret := C.QPixmap_Scaled(this.h, (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledWithQSize(s *QSize) *QPixmap { _ret := C.QPixmap_ScaledWithQSize(this.h, s.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth(w int) *QPixmap { _ret := C.QPixmap_ScaledToWidth(this.h, (C.int)(w)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight(h int) *QPixmap { _ret := C.QPixmap_ScaledToHeight(this.h, (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed(param1 *QMatrix) *QPixmap { _ret := C.QPixmap_Transformed(this.h, param1.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -265,7 +310,7 @@ func QPixmap_TrueMatrix(m *QMatrix, w int, h int) *QMatrix { func (this *QPixmap) TransformedWithQTransform(param1 *QTransform) *QPixmap { _ret := C.QPixmap_TransformedWithQTransform(this.h, param1.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -279,21 +324,21 @@ func QPixmap_TrueMatrix2(m *QTransform, w int, h int) *QTransform { func (this *QPixmap) ToImage() *QImage { _ret := C.QPixmap_ToImage(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage(image *QImage) *QPixmap { _ret := C.QPixmap_FromImage(image.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader(imageReader *QImageReader) *QPixmap { _ret := C.QPixmap_FromImageReader(imageReader.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -335,14 +380,14 @@ func (this *QPixmap) ConvertFromImage(img *QImage) bool { func (this *QPixmap) Copy(x int, y int, width int, height int) *QPixmap { _ret := C.QPixmap_Copy(this.h, (C.int)(x), (C.int)(y), (C.int)(width), (C.int)(height)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Copy2() *QPixmap { _ret := C.QPixmap_Copy2(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -385,140 +430,140 @@ func (this *QPixmap) Fill1(fillColor *QColor) { func (this *QPixmap) CreateHeuristicMask1(clipTight bool) *QBitmap { _ret := C.QPixmap_CreateHeuristicMask1(this.h, (C.bool)(clipTight)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor2(maskColor *QColor, mode MaskMode) *QBitmap { _ret := C.QPixmap_CreateMaskFromColor2(this.h, maskColor.cPointer(), (C.int)(mode)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow2(param1 uintptr, x int) *QPixmap { _ret := C.QPixmap_GrabWindow2((C.uintptr_t)(param1), (C.int)(x)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow3(param1 uintptr, x int, y int) *QPixmap { _ret := C.QPixmap_GrabWindow3((C.uintptr_t)(param1), (C.int)(x), (C.int)(y)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow4(param1 uintptr, x int, y int, w int) *QPixmap { _ret := C.QPixmap_GrabWindow4((C.uintptr_t)(param1), (C.int)(x), (C.int)(y), (C.int)(w)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow5(param1 uintptr, x int, y int, w int, h int) *QPixmap { _ret := C.QPixmap_GrabWindow5((C.uintptr_t)(param1), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget2(widget *QObject, x int) *QPixmap { _ret := C.QPixmap_GrabWidget2(widget.cPointer(), (C.int)(x)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget3(widget *QObject, x int, y int) *QPixmap { _ret := C.QPixmap_GrabWidget3(widget.cPointer(), (C.int)(x), (C.int)(y)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget4(widget *QObject, x int, y int, w int) *QPixmap { _ret := C.QPixmap_GrabWidget4(widget.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget5(widget *QObject, x int, y int, w int, h int) *QPixmap { _ret := C.QPixmap_GrabWidget5(widget.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled3(w int, h int, aspectMode AspectRatioMode) *QPixmap { _ret := C.QPixmap_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled2(s *QSize, aspectMode AspectRatioMode) *QPixmap { _ret := C.QPixmap_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth2(w int, mode TransformationMode) *QPixmap { _ret := C.QPixmap_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight2(h int, mode TransformationMode) *QPixmap { _ret := C.QPixmap_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed2(param1 *QMatrix, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Transformed2(this.h, param1.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed22(param1 *QTransform, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Transformed22(this.h, param1.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage2(image *QImage, flags ImageConversionFlag) *QPixmap { _ret := C.QPixmap_FromImage2(image.cPointer(), (C.int)(flags)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader2(imageReader *QImageReader, flags ImageConversionFlag) *QPixmap { _ret := C.QPixmap_FromImageReader2(imageReader.cPointer(), (C.int)(flags)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -611,7 +656,7 @@ func (this *QPixmap) ConvertFromImage2(img *QImage, flags ImageConversionFlag) b func (this *QPixmap) Copy1(rect *QRect) *QPixmap { _ret := C.QPixmap_Copy1(this.h, rect.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -624,9 +669,145 @@ func (this *QPixmap) Scroll4(dx int, dy int, rect *QRect, exposed *QRegion) { C.QPixmap_Scroll4(this.h, (C.int)(dx), (C.int)(dy), rect.cPointer(), exposed.cPointer()) } +func (this *QPixmap) callVirtualBase_DevType() int { + + return (int)(C.QPixmap_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPixmap) OnDevType(slot func(super func() int) int) { + C.QPixmap_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_DevType +func miqt_exec_callback_QPixmap_DevType(self *C.QPixmap, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPixmap) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPixmap_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPixmap) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QPixmap_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_PaintEngine +func miqt_exec_callback_QPixmap_PaintEngine(self *C.QPixmap, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QPixmap) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPixmap_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPixmap) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QPixmap_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_Metric +func miqt_exec_callback_QPixmap_Metric(self *C.QPixmap, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPixmap) callVirtualBase_InitPainter(painter *QPainter) { + + C.QPixmap_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QPixmap) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QPixmap_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_InitPainter +func miqt_exec_callback_QPixmap_InitPainter(self *C.QPixmap, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPixmap{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPixmap) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QPixmap_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QPixmap) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QPixmap_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_Redirected +func miqt_exec_callback_QPixmap_Redirected(self *C.QPixmap, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPixmap) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QPixmap_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPixmap) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QPixmap_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_SharedPainter +func miqt_exec_callback_QPixmap_SharedPainter(self *C.QPixmap, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QPixmap) Delete() { - C.QPixmap_Delete(this.h) + C.QPixmap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpixmap.h b/qt/gen_qpixmap.h index 9151cd3f..d8dafb31 100644 --- a/qt/gen_qpixmap.h +++ b/qt/gen_qpixmap.h @@ -25,6 +25,7 @@ class QMatrix; class QObject; class QPaintDevice; class QPaintEngine; +class QPainter; class QPixmap; class QPoint; class QRect; @@ -42,6 +43,7 @@ typedef struct QMatrix QMatrix; typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QRect QRect; @@ -50,13 +52,13 @@ typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -QPixmap* QPixmap_new(); -QPixmap* QPixmap_new2(int w, int h); -QPixmap* QPixmap_new3(QSize* param1); -QPixmap* QPixmap_new4(struct miqt_string fileName); -QPixmap* QPixmap_new5(QPixmap* param1); -QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format); -QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags); +void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1); void QPixmap_Swap(QPixmap* self, QPixmap* other); bool QPixmap_IsNull(const QPixmap* self); @@ -108,6 +110,7 @@ void QPixmap_Detach(QPixmap* self); bool QPixmap_IsQBitmap(const QPixmap* self); QPaintEngine* QPixmap_PaintEngine(const QPixmap* self); bool QPixmap_OperatorNot(const QPixmap* self); +int QPixmap_Metric(const QPixmap* self, int param1); void QPixmap_Fill1(QPixmap* self, QColor* fillColor); QBitmap* QPixmap_CreateHeuristicMask1(const QPixmap* self, bool clipTight); QBitmap* QPixmap_CreateMaskFromColor2(const QPixmap* self, QColor* maskColor, int mode); @@ -143,7 +146,19 @@ bool QPixmap_ConvertFromImage2(QPixmap* self, QImage* img, int flags); QPixmap* QPixmap_Copy1(const QPixmap* self, QRect* rect); void QPixmap_Scroll7(QPixmap* self, int dx, int dy, int x, int y, int width, int height, QRegion* exposed); void QPixmap_Scroll4(QPixmap* self, int dx, int dy, QRect* rect, QRegion* exposed); -void QPixmap_Delete(QPixmap* self); +void QPixmap_override_virtual_DevType(void* self, intptr_t slot); +int QPixmap_virtualbase_DevType(const void* self); +void QPixmap_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPixmap_virtualbase_PaintEngine(const void* self); +void QPixmap_override_virtual_Metric(void* self, intptr_t slot); +int QPixmap_virtualbase_Metric(const void* self, int param1); +void QPixmap_override_virtual_InitPainter(void* self, intptr_t slot); +void QPixmap_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPixmap_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPixmap_virtualbase_Redirected(const void* self, QPoint* offset); +void QPixmap_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPixmap_virtualbase_SharedPainter(const void* self); +void QPixmap_Delete(QPixmap* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpixmapcache.cpp b/qt/gen_qpixmapcache.cpp index e1c17fab..1b19a3c0 100644 --- a/qt/gen_qpixmapcache.cpp +++ b/qt/gen_qpixmapcache.cpp @@ -61,16 +61,22 @@ void QPixmapCache_Clear() { QPixmapCache::clear(); } -void QPixmapCache_Delete(QPixmapCache* self) { - delete self; +void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPixmapCache__Key* QPixmapCache__Key_new() { - return new QPixmapCache::Key(); +void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key) { + QPixmapCache::Key* ret = new QPixmapCache::Key(); + *outptr_QPixmapCache__Key = ret; } -QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other) { - return new QPixmapCache::Key(*other); +void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key) { + QPixmapCache::Key* ret = new QPixmapCache::Key(*other); + *outptr_QPixmapCache__Key = ret; } bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) { @@ -93,7 +99,11 @@ bool QPixmapCache__Key_IsValid(const QPixmapCache__Key* self) { return self->isValid(); } -void QPixmapCache__Key_Delete(QPixmapCache__Key* self) { - delete self; +void QPixmapCache__Key_Delete(QPixmapCache__Key* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpixmapcache.go b/qt/gen_qpixmapcache.go index 13f6311c..5220e2b2 100644 --- a/qt/gen_qpixmapcache.go +++ b/qt/gen_qpixmapcache.go @@ -14,7 +14,8 @@ import ( ) type QPixmapCache struct { - h *C.QPixmapCache + h *C.QPixmapCache + isSubclass bool } func (this *QPixmapCache) cPointer() *C.QPixmapCache { @@ -31,6 +32,7 @@ func (this *QPixmapCache) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPixmapCache constructs the type using only CGO pointers. func newQPixmapCache(h *C.QPixmapCache) *QPixmapCache { if h == nil { return nil @@ -38,8 +40,13 @@ func newQPixmapCache(h *C.QPixmapCache) *QPixmapCache { return &QPixmapCache{h: h} } +// UnsafeNewQPixmapCache constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache(h unsafe.Pointer) *QPixmapCache { - return newQPixmapCache((*C.QPixmapCache)(h)) + if h == nil { + return nil + } + + return &QPixmapCache{h: (*C.QPixmapCache)(h)} } func QPixmapCache_CacheLimit() int { @@ -55,7 +62,7 @@ func QPixmapCache_Find(key string) *QPixmap { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return UnsafeNewQPixmap(unsafe.Pointer(C.QPixmapCache_Find(key_ms))) + return UnsafeNewQPixmap(unsafe.Pointer(C.QPixmapCache_Find(key_ms)), nil) } func QPixmapCache_Find2(key string, pixmap *QPixmap) bool { @@ -115,7 +122,7 @@ func QPixmapCache_Clear() { // Delete this object from C++ memory. func (this *QPixmapCache) Delete() { - C.QPixmapCache_Delete(this.h) + C.QPixmapCache_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -128,7 +135,8 @@ func (this *QPixmapCache) GoGC() { } type QPixmapCache__Key struct { - h *C.QPixmapCache__Key + h *C.QPixmapCache__Key + isSubclass bool } func (this *QPixmapCache__Key) cPointer() *C.QPixmapCache__Key { @@ -145,6 +153,7 @@ func (this *QPixmapCache__Key) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPixmapCache__Key constructs the type using only CGO pointers. func newQPixmapCache__Key(h *C.QPixmapCache__Key) *QPixmapCache__Key { if h == nil { return nil @@ -152,20 +161,33 @@ func newQPixmapCache__Key(h *C.QPixmapCache__Key) *QPixmapCache__Key { return &QPixmapCache__Key{h: h} } +// UnsafeNewQPixmapCache__Key constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache__Key(h unsafe.Pointer) *QPixmapCache__Key { - return newQPixmapCache__Key((*C.QPixmapCache__Key)(h)) + if h == nil { + return nil + } + + return &QPixmapCache__Key{h: (*C.QPixmapCache__Key)(h)} } // NewQPixmapCache__Key constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key() *QPixmapCache__Key { - ret := C.QPixmapCache__Key_new() - return newQPixmapCache__Key(ret) + var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil + + C.QPixmapCache__Key_new(&outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret.isSubclass = true + return ret } // NewQPixmapCache__Key2 constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key2(other *QPixmapCache__Key) *QPixmapCache__Key { - ret := C.QPixmapCache__Key_new2(other.cPointer()) - return newQPixmapCache__Key(ret) + var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil + + C.QPixmapCache__Key_new2(other.cPointer(), &outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret.isSubclass = true + return ret } func (this *QPixmapCache__Key) OperatorEqual(key *QPixmapCache__Key) bool { @@ -190,7 +212,7 @@ func (this *QPixmapCache__Key) IsValid() bool { // Delete this object from C++ memory. func (this *QPixmapCache__Key) Delete() { - C.QPixmapCache__Key_Delete(this.h) + C.QPixmapCache__Key_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpixmapcache.h b/qt/gen_qpixmapcache.h index db73126d..d63ba993 100644 --- a/qt/gen_qpixmapcache.h +++ b/qt/gen_qpixmapcache.h @@ -40,16 +40,16 @@ bool QPixmapCache_Replace(QPixmapCache__Key* key, QPixmap* pixmap); void QPixmapCache_Remove(struct miqt_string key); void QPixmapCache_RemoveWithKey(QPixmapCache__Key* key); void QPixmapCache_Clear(); -void QPixmapCache_Delete(QPixmapCache* self); +void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass); -QPixmapCache__Key* QPixmapCache__Key_new(); -QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other); +void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key); +void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key); bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); bool QPixmapCache__Key_OperatorNotEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); void QPixmapCache__Key_OperatorAssign(QPixmapCache__Key* self, QPixmapCache__Key* other); void QPixmapCache__Key_Swap(QPixmapCache__Key* self, QPixmapCache__Key* other); bool QPixmapCache__Key_IsValid(const QPixmapCache__Key* self); -void QPixmapCache__Key_Delete(QPixmapCache__Key* self); +void QPixmapCache__Key_Delete(QPixmapCache__Key* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qplaintextedit.cpp b/qt/gen_qplaintextedit.cpp index d1e64363..a3e77c1b 100644 --- a/qt/gen_qplaintextedit.cpp +++ b/qt/gen_qplaintextedit.cpp @@ -1,8 +1,25 @@ +#include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include #include +#include +#include #include #include #include @@ -12,6 +29,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -21,30 +41,903 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QTextEdit__ExtraSelection +#include #include +#include +#include #include #include +#include #include #include #include "gen_qplaintextedit.h" #include "_cgo_export.h" -QPlainTextEdit* QPlainTextEdit_new(QWidget* parent) { - return new QPlainTextEdit(parent); +class MiqtVirtualQPlainTextEdit : public virtual QPlainTextEdit { +public: + + MiqtVirtualQPlainTextEdit(QWidget* parent): QPlainTextEdit(parent) {}; + MiqtVirtualQPlainTextEdit(): QPlainTextEdit() {}; + MiqtVirtualQPlainTextEdit(const QString& text): QPlainTextEdit(text) {}; + MiqtVirtualQPlainTextEdit(const QString& text, QWidget* parent): QPlainTextEdit(text, parent) {}; + + virtual ~MiqtVirtualQPlainTextEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QPlainTextEdit::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPlainTextEdit_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QPlainTextEdit::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QPlainTextEdit::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPlainTextEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QPlainTextEdit::inputMethodQuery(static_cast(property))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QPlainTextEdit::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QPlainTextEdit::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QPlainTextEdit::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QPlainTextEdit::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QPlainTextEdit::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QPlainTextEdit::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QPlainTextEdit::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QPlainTextEdit::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QPlainTextEdit::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QPlainTextEdit::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QPlainTextEdit::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QPlainTextEdit::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QPlainTextEdit::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QPlainTextEdit::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QPlainTextEdit::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QPlainTextEdit::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QPlainTextEdit::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QPlainTextEdit::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QPlainTextEdit::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QPlainTextEdit::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QPlainTextEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QPlainTextEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QPlainTextEdit::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QPlainTextEdit::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QPlainTextEdit::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QPlainTextEdit::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QPlainTextEdit::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QPlainTextEdit::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QPlainTextEdit::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QPlainTextEdit::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QPlainTextEdit::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QPlainTextEdit::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QPlainTextEdit::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QPlainTextEdit::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QPlainTextEdit::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QPlainTextEdit::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QPlainTextEdit::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QPlainTextEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QPlainTextEdit::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QPlainTextEdit::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QPlainTextEdit::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QPlainTextEdit::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QPlainTextEdit::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateMimeDataFromSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* createMimeDataFromSelection() const override { + if (handle__CreateMimeDataFromSelection == 0) { + return QPlainTextEdit::createMimeDataFromSelection(); + } + + + QMimeData* callback_return_value = miqt_exec_callback_QPlainTextEdit_CreateMimeDataFromSelection(const_cast(this), handle__CreateMimeDataFromSelection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_CreateMimeDataFromSelection() const { + + return QPlainTextEdit::createMimeDataFromSelection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QPlainTextEdit::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QPlainTextEdit::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual void insertFromMimeData(const QMimeData* source) override { + if (handle__InsertFromMimeData == 0) { + QPlainTextEdit::insertFromMimeData(source); + return; + } + + QMimeData* sigval1 = (QMimeData*) source; + + miqt_exec_callback_QPlainTextEdit_InsertFromMimeData(this, handle__InsertFromMimeData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertFromMimeData(QMimeData* source) { + + QPlainTextEdit::insertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QPlainTextEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QPlainTextEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QPlainTextEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QPlainTextEdit::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QPlainTextEdit_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QPlainTextEdit::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetTextCursor = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetTextCursor(const QTextCursor& cursor) override { + if (handle__DoSetTextCursor == 0) { + QPlainTextEdit::doSetTextCursor(cursor); + return; + } + + const QTextCursor& cursor_ret = cursor; + // Cast returned reference into pointer + QTextCursor* sigval1 = const_cast(&cursor_ret); + + miqt_exec_callback_QPlainTextEdit_DoSetTextCursor(this, handle__DoSetTextCursor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetTextCursor(QTextCursor* cursor) { + + QPlainTextEdit::doSetTextCursor(*cursor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPlainTextEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPlainTextEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPlainTextEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPlainTextEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPlainTextEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPlainTextEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QPlainTextEdit::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QPlainTextEdit_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QPlainTextEdit::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QPlainTextEdit::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QPlainTextEdit::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QPlainTextEdit::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QPlainTextEdit::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QPlainTextEdit::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPlainTextEdit_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QPlainTextEdit::viewportSizeHint()); + + } + +}; + +void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(parent); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPlainTextEdit* QPlainTextEdit_new2() { - return new QPlainTextEdit(); +void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text) { +void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPlainTextEdit(text_QString); + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent) { +void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPlainTextEdit(text_QString, parent); + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString, parent); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self) { @@ -393,202 +1286,758 @@ void QPlainTextEdit_InsertPlainText(QPlainTextEdit* self, struct miqt_string tex self->insertPlainText(text_QString); } -void QPlainTextEdit_AppendPlainText(QPlainTextEdit* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->appendPlainText(text_QString); +void QPlainTextEdit_AppendPlainText(QPlainTextEdit* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->appendPlainText(text_QString); +} + +void QPlainTextEdit_AppendHtml(QPlainTextEdit* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->appendHtml(html_QString); +} + +void QPlainTextEdit_CenterCursor(QPlainTextEdit* self) { + self->centerCursor(); +} + +void QPlainTextEdit_ZoomIn(QPlainTextEdit* self) { + self->zoomIn(); +} + +void QPlainTextEdit_ZoomOut(QPlainTextEdit* self) { + self->zoomOut(); +} + +void QPlainTextEdit_TextChanged(QPlainTextEdit* self) { + self->textChanged(); +} + +void QPlainTextEdit_connect_TextChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::textChanged), self, [=]() { + miqt_exec_callback_QPlainTextEdit_TextChanged(slot); + }); +} + +void QPlainTextEdit_UndoAvailable(QPlainTextEdit* self, bool b) { + self->undoAvailable(b); +} + +void QPlainTextEdit_connect_UndoAvailable(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::undoAvailable), self, [=](bool b) { + bool sigval1 = b; + miqt_exec_callback_QPlainTextEdit_UndoAvailable(slot, sigval1); + }); +} + +void QPlainTextEdit_RedoAvailable(QPlainTextEdit* self, bool b) { + self->redoAvailable(b); +} + +void QPlainTextEdit_connect_RedoAvailable(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::redoAvailable), self, [=](bool b) { + bool sigval1 = b; + miqt_exec_callback_QPlainTextEdit_RedoAvailable(slot, sigval1); + }); +} + +void QPlainTextEdit_CopyAvailable(QPlainTextEdit* self, bool b) { + self->copyAvailable(b); +} + +void QPlainTextEdit_connect_CopyAvailable(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::copyAvailable), self, [=](bool b) { + bool sigval1 = b; + miqt_exec_callback_QPlainTextEdit_CopyAvailable(slot, sigval1); + }); +} + +void QPlainTextEdit_SelectionChanged(QPlainTextEdit* self) { + self->selectionChanged(); +} + +void QPlainTextEdit_connect_SelectionChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::selectionChanged), self, [=]() { + miqt_exec_callback_QPlainTextEdit_SelectionChanged(slot); + }); +} + +void QPlainTextEdit_CursorPositionChanged(QPlainTextEdit* self) { + self->cursorPositionChanged(); +} + +void QPlainTextEdit_connect_CursorPositionChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::cursorPositionChanged), self, [=]() { + miqt_exec_callback_QPlainTextEdit_CursorPositionChanged(slot); + }); +} + +void QPlainTextEdit_UpdateRequest(QPlainTextEdit* self, QRect* rect, int dy) { + self->updateRequest(*rect, static_cast(dy)); +} + +void QPlainTextEdit_connect_UpdateRequest(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::updateRequest), self, [=](const QRect& rect, int dy) { + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + int sigval2 = dy; + miqt_exec_callback_QPlainTextEdit_UpdateRequest(slot, sigval1, sigval2); + }); +} + +void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount) { + self->blockCountChanged(static_cast(newBlockCount)); +} + +void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::blockCountChanged), self, [=](int newBlockCount) { + int sigval1 = newBlockCount; + miqt_exec_callback_QPlainTextEdit_BlockCountChanged(slot, sigval1); + }); +} + +void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1) { + self->modificationChanged(param1); +} + +void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::modificationChanged), self, [=](bool param1) { + bool sigval1 = param1; + miqt_exec_callback_QPlainTextEdit_ModificationChanged(slot, sigval1); + }); +} + +struct miqt_string QPlainTextEdit_Tr2(const char* s, const char* c) { + QString _ret = QPlainTextEdit::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPlainTextEdit_Tr3(const char* s, const char* c, int n) { + QString _ret = QPlainTextEdit::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPlainTextEdit_TrUtf82(const char* s, const char* c) { + QString _ret = QPlainTextEdit::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPlainTextEdit_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QPlainTextEdit::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPlainTextEdit_Find22(QPlainTextEdit* self, struct miqt_string exp, int options) { + QString exp_QString = QString::fromUtf8(exp.data, exp.len); + return self->find(exp_QString, static_cast(options)); +} + +bool QPlainTextEdit_Find23(QPlainTextEdit* self, QRegExp* exp, int options) { + return self->find(*exp, static_cast(options)); +} + +bool QPlainTextEdit_Find24(QPlainTextEdit* self, QRegularExpression* exp, int options) { + return self->find(*exp, static_cast(options)); +} + +void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, int operation, int mode) { + self->moveCursor(static_cast(operation), static_cast(mode)); +} + +void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal) { + self->zoomIn(static_cast(rangeVal)); +} + +void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal) { + self->zoomOut(static_cast(rangeVal)); +} + +void QPlainTextEdit_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__LoadResource = slot; +} + +QVariant* QPlainTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QPlainTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QPlainTextEdit_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_InputMethodQuery(property); +} + +void QPlainTextEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__Event = slot; +} + +bool QPlainTextEdit_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_Event(e); +} + +void QPlainTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__TimerEvent = slot; +} + +void QPlainTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_TimerEvent(e); +} + +void QPlainTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QPlainTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QPlainTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QPlainTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QPlainTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QPlainTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ResizeEvent(e); +} + +void QPlainTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__PaintEvent = slot; +} + +void QPlainTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_PaintEvent(e); +} + +void QPlainTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QPlainTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MousePressEvent(e); +} + +void QPlainTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QPlainTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QPlainTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QPlainTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QPlainTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QPlainTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QPlainTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QPlainTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QPlainTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPlainTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QPlainTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QPlainTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QPlainTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QPlainTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QPlainTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QPlainTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QPlainTextEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DropEvent = slot; +} + +void QPlainTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DropEvent(e); +} + +void QPlainTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QPlainTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_FocusInEvent(e); } -void QPlainTextEdit_AppendHtml(QPlainTextEdit* self, struct miqt_string html) { - QString html_QString = QString::fromUtf8(html.data, html.len); - self->appendHtml(html_QString); +void QPlainTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__FocusOutEvent = slot; } -void QPlainTextEdit_CenterCursor(QPlainTextEdit* self) { - self->centerCursor(); +void QPlainTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_FocusOutEvent(e); } -void QPlainTextEdit_ZoomIn(QPlainTextEdit* self) { - self->zoomIn(); +void QPlainTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ShowEvent = slot; } -void QPlainTextEdit_ZoomOut(QPlainTextEdit* self) { - self->zoomOut(); +void QPlainTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ShowEvent(param1); } -void QPlainTextEdit_TextChanged(QPlainTextEdit* self) { - self->textChanged(); +void QPlainTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ChangeEvent = slot; } -void QPlainTextEdit_connect_TextChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::textChanged), self, [=]() { - miqt_exec_callback_QPlainTextEdit_TextChanged(slot); - }); +void QPlainTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ChangeEvent(e); } -void QPlainTextEdit_UndoAvailable(QPlainTextEdit* self, bool b) { - self->undoAvailable(b); +void QPlainTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__WheelEvent = slot; } -void QPlainTextEdit_connect_UndoAvailable(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::undoAvailable), self, [=](bool b) { - bool sigval1 = b; - miqt_exec_callback_QPlainTextEdit_UndoAvailable(slot, sigval1); - }); +void QPlainTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_WheelEvent(e); } -void QPlainTextEdit_RedoAvailable(QPlainTextEdit* self, bool b) { - self->redoAvailable(b); +void QPlainTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__CreateMimeDataFromSelection = slot; } -void QPlainTextEdit_connect_RedoAvailable(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::redoAvailable), self, [=](bool b) { - bool sigval1 = b; - miqt_exec_callback_QPlainTextEdit_RedoAvailable(slot, sigval1); - }); +QMimeData* QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_CreateMimeDataFromSelection(); } -void QPlainTextEdit_CopyAvailable(QPlainTextEdit* self, bool b) { - self->copyAvailable(b); +void QPlainTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__CanInsertFromMimeData = slot; } -void QPlainTextEdit_connect_CopyAvailable(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::copyAvailable), self, [=](bool b) { - bool sigval1 = b; - miqt_exec_callback_QPlainTextEdit_CopyAvailable(slot, sigval1); - }); +bool QPlainTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_CanInsertFromMimeData(source); } -void QPlainTextEdit_SelectionChanged(QPlainTextEdit* self) { - self->selectionChanged(); +void QPlainTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__InsertFromMimeData = slot; } -void QPlainTextEdit_connect_SelectionChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::selectionChanged), self, [=]() { - miqt_exec_callback_QPlainTextEdit_SelectionChanged(slot); - }); +void QPlainTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_InsertFromMimeData(source); } -void QPlainTextEdit_CursorPositionChanged(QPlainTextEdit* self) { - self->cursorPositionChanged(); +void QPlainTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__InputMethodEvent = slot; } -void QPlainTextEdit_connect_CursorPositionChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::cursorPositionChanged), self, [=]() { - miqt_exec_callback_QPlainTextEdit_CursorPositionChanged(slot); - }); +void QPlainTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_InputMethodEvent(param1); } -void QPlainTextEdit_UpdateRequest(QPlainTextEdit* self, QRect* rect, int dy) { - self->updateRequest(*rect, static_cast(dy)); +void QPlainTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ScrollContentsBy = slot; } -void QPlainTextEdit_connect_UpdateRequest(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::updateRequest), self, [=](const QRect& rect, int dy) { - const QRect& rect_ret = rect; - // Cast returned reference into pointer - QRect* sigval1 = const_cast(&rect_ret); - int sigval2 = dy; - miqt_exec_callback_QPlainTextEdit_UpdateRequest(slot, sigval1, sigval2); - }); +void QPlainTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount) { - self->blockCountChanged(static_cast(newBlockCount)); +void QPlainTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DoSetTextCursor = slot; } -void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::blockCountChanged), self, [=](int newBlockCount) { - int sigval1 = newBlockCount; - miqt_exec_callback_QPlainTextEdit_BlockCountChanged(slot, sigval1); - }); +void QPlainTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DoSetTextCursor(cursor); } -void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1) { - self->modificationChanged(param1); +void QPlainTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MinimumSizeHint = slot; } -void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::modificationChanged), self, [=](bool param1) { - bool sigval1 = param1; - miqt_exec_callback_QPlainTextEdit_ModificationChanged(slot, sigval1); - }); +QSize* QPlainTextEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MinimumSizeHint(); } -struct miqt_string QPlainTextEdit_Tr2(const char* s, const char* c) { - QString _ret = QPlainTextEdit::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QPlainTextEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__SizeHint = slot; } -struct miqt_string QPlainTextEdit_Tr3(const char* s, const char* c, int n) { - QString _ret = QPlainTextEdit::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QSize* QPlainTextEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_SizeHint(); } -struct miqt_string QPlainTextEdit_TrUtf82(const char* s, const char* c) { - QString _ret = QPlainTextEdit::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QPlainTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__SetupViewport = slot; } -struct miqt_string QPlainTextEdit_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QPlainTextEdit::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QPlainTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_SetupViewport(viewport); } -bool QPlainTextEdit_Find22(QPlainTextEdit* self, struct miqt_string exp, int options) { - QString exp_QString = QString::fromUtf8(exp.data, exp.len); - return self->find(exp_QString, static_cast(options)); +void QPlainTextEdit_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__EventFilter = slot; } -bool QPlainTextEdit_Find23(QPlainTextEdit* self, QRegExp* exp, int options) { - return self->find(*exp, static_cast(options)); +bool QPlainTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_EventFilter(param1, param2); } -bool QPlainTextEdit_Find24(QPlainTextEdit* self, QRegularExpression* exp, int options) { - return self->find(*exp, static_cast(options)); +void QPlainTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ViewportEvent = slot; } -void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, int operation, int mode) { - self->moveCursor(static_cast(operation), static_cast(mode)); +bool QPlainTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ViewportEvent(param1); } -void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal) { - self->zoomIn(static_cast(rangeVal)); +void QPlainTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ViewportSizeHint = slot; } -void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal) { - self->zoomOut(static_cast(rangeVal)); +QSize* QPlainTextEdit_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ViewportSizeHint(); } -void QPlainTextEdit_Delete(QPlainTextEdit* self) { - delete self; +void QPlainTextEdit_Delete(QPlainTextEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document) { - return new QPlainTextDocumentLayout(document); +class MiqtVirtualQPlainTextDocumentLayout : public virtual QPlainTextDocumentLayout { +public: + + MiqtVirtualQPlainTextDocumentLayout(QTextDocument* document): QPlainTextDocumentLayout(document) {}; + + virtual ~MiqtVirtualQPlainTextDocumentLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* param1, const QAbstractTextDocumentLayout::PaintContext& param2) override { + if (handle__Draw == 0) { + QPlainTextDocumentLayout::draw(param1, param2); + return; + } + + QPainter* sigval1 = param1; + const QAbstractTextDocumentLayout::PaintContext& param2_ret = param2; + // Cast returned reference into pointer + QAbstractTextDocumentLayout__PaintContext* sigval2 = const_cast(¶m2_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_Draw(this, handle__Draw, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2) { + + QPlainTextDocumentLayout::draw(param1, *param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTest = 0; + + // Subclass to allow providing a Go implementation + virtual int hitTest(const QPointF& param1, Qt::HitTestAccuracy param2) const override { + if (handle__HitTest == 0) { + return QPlainTextDocumentLayout::hitTest(param1, param2); + } + + const QPointF& param1_ret = param1; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(¶m1_ret); + Qt::HitTestAccuracy param2_ret = param2; + int sigval2 = static_cast(param2_ret); + + int callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_HitTest(const_cast(this), handle__HitTest, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HitTest(QPointF* param1, int param2) const { + + return QPlainTextDocumentLayout::hitTest(*param1, static_cast(param2)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PageCount = 0; + + // Subclass to allow providing a Go implementation + virtual int pageCount() const override { + if (handle__PageCount == 0) { + return QPlainTextDocumentLayout::pageCount(); + } + + + int callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_PageCount(const_cast(this), handle__PageCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PageCount() const { + + return QPlainTextDocumentLayout::pageCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DocumentSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF documentSize() const override { + if (handle__DocumentSize == 0) { + return QPlainTextDocumentLayout::documentSize(); + } + + + QSizeF* callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_DocumentSize(const_cast(this), handle__DocumentSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_DocumentSize() const { + + return new QSizeF(QPlainTextDocumentLayout::documentSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FrameBoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF frameBoundingRect(QTextFrame* param1) const override { + if (handle__FrameBoundingRect == 0) { + return QPlainTextDocumentLayout::frameBoundingRect(param1); + } + + QTextFrame* sigval1 = param1; + + QRectF* callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect(const_cast(this), handle__FrameBoundingRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_FrameBoundingRect(QTextFrame* param1) const { + + return new QRectF(QPlainTextDocumentLayout::frameBoundingRect(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockBoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF blockBoundingRect(const QTextBlock& block) const override { + if (handle__BlockBoundingRect == 0) { + return QPlainTextDocumentLayout::blockBoundingRect(block); + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + QRectF* callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_BlockBoundingRect(const_cast(this), handle__BlockBoundingRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BlockBoundingRect(QTextBlock* block) const { + + return new QRectF(QPlainTextDocumentLayout::blockBoundingRect(*block)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DocumentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void documentChanged(int from, int param2, int charsAdded) override { + if (handle__DocumentChanged == 0) { + QPlainTextDocumentLayout::documentChanged(from, param2, charsAdded); + return; + } + + int sigval1 = from; + int sigval2 = param2; + int sigval3 = charsAdded; + + miqt_exec_callback_QPlainTextDocumentLayout_DocumentChanged(this, handle__DocumentChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DocumentChanged(int from, int param2, int charsAdded) { + + QPlainTextDocumentLayout::documentChanged(static_cast(from), static_cast(param2), static_cast(charsAdded)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeInlineObject = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat& format) override { + if (handle__ResizeInlineObject == 0) { + QPlainTextDocumentLayout::resizeInlineObject(item, posInDocument, format); + return; + } + + QTextInlineObject* sigval1 = new QTextInlineObject(item); + int sigval2 = posInDocument; + const QTextFormat& format_ret = format; + // Cast returned reference into pointer + QTextFormat* sigval3 = const_cast(&format_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_ResizeInlineObject(this, handle__ResizeInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QPlainTextDocumentLayout::resizeInlineObject(*item, static_cast(posInDocument), *format); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PositionInlineObject = 0; + + // Subclass to allow providing a Go implementation + virtual void positionInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat& format) override { + if (handle__PositionInlineObject == 0) { + QPlainTextDocumentLayout::positionInlineObject(item, posInDocument, format); + return; + } + + QTextInlineObject* sigval1 = new QTextInlineObject(item); + int sigval2 = posInDocument; + const QTextFormat& format_ret = format; + // Cast returned reference into pointer + QTextFormat* sigval3 = const_cast(&format_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_PositionInlineObject(this, handle__PositionInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PositionInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QPlainTextDocumentLayout::positionInlineObject(*item, static_cast(posInDocument), *format); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawInlineObject = 0; + + // Subclass to allow providing a Go implementation + virtual void drawInlineObject(QPainter* painter, const QRectF& rect, QTextInlineObject object, int posInDocument, const QTextFormat& format) override { + if (handle__DrawInlineObject == 0) { + QPlainTextDocumentLayout::drawInlineObject(painter, rect, object, posInDocument, format); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + QTextInlineObject* sigval3 = new QTextInlineObject(object); + int sigval4 = posInDocument; + const QTextFormat& format_ret = format; + // Cast returned reference into pointer + QTextFormat* sigval5 = const_cast(&format_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_DrawInlineObject(this, handle__DrawInlineObject, sigval1, sigval2, sigval3, sigval4, sigval5); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawInlineObject(QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format) { + + QPlainTextDocumentLayout::drawInlineObject(painter, *rect, *object, static_cast(posInDocument), *format); + + } + +}; + +void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { + MiqtVirtualQPlainTextDocumentLayout* ret = new MiqtVirtualQPlainTextDocumentLayout(document); + *outptr_QPlainTextDocumentLayout = ret; + *outptr_QAbstractTextDocumentLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self) { @@ -705,7 +2154,91 @@ struct miqt_string QPlainTextDocumentLayout_TrUtf83(const char* s, const char* c return _ms; } -void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self) { - delete self; +void QPlainTextDocumentLayout_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__Draw = slot; +} + +void QPlainTextDocumentLayout_virtualbase_Draw(void* self, QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_Draw(param1, param2); +} + +void QPlainTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__HitTest = slot; +} + +int QPlainTextDocumentLayout_virtualbase_HitTest(const void* self, QPointF* param1, int param2) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_HitTest(param1, param2); +} + +void QPlainTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__PageCount = slot; +} + +int QPlainTextDocumentLayout_virtualbase_PageCount(const void* self) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_PageCount(); +} + +void QPlainTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__DocumentSize = slot; +} + +QSizeF* QPlainTextDocumentLayout_virtualbase_DocumentSize(const void* self) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_DocumentSize(); +} + +void QPlainTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__FrameBoundingRect = slot; +} + +QRectF* QPlainTextDocumentLayout_virtualbase_FrameBoundingRect(const void* self, QTextFrame* param1) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_FrameBoundingRect(param1); +} + +void QPlainTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__BlockBoundingRect = slot; +} + +QRectF* QPlainTextDocumentLayout_virtualbase_BlockBoundingRect(const void* self, QTextBlock* block) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_BlockBoundingRect(block); +} + +void QPlainTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__DocumentChanged = slot; +} + +void QPlainTextDocumentLayout_virtualbase_DocumentChanged(void* self, int from, int param2, int charsAdded) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_DocumentChanged(from, param2, charsAdded); +} + +void QPlainTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__ResizeInlineObject = slot; +} + +void QPlainTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_ResizeInlineObject(item, posInDocument, format); +} + +void QPlainTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__PositionInlineObject = slot; +} + +void QPlainTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_PositionInlineObject(item, posInDocument, format); +} + +void QPlainTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__DrawInlineObject = slot; +} + +void QPlainTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_DrawInlineObject(painter, rect, object, posInDocument, format); +} + +void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qplaintextedit.go b/qt/gen_qplaintextedit.go index 3c71252d..8b0a40b9 100644 --- a/qt/gen_qplaintextedit.go +++ b/qt/gen_qplaintextedit.go @@ -22,7 +22,8 @@ const ( ) type QPlainTextEdit struct { - h *C.QPlainTextEdit + h *C.QPlainTextEdit + isSubclass bool *QAbstractScrollArea } @@ -40,27 +41,53 @@ func (this *QPlainTextEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPlainTextEdit(h *C.QPlainTextEdit) *QPlainTextEdit { +// newQPlainTextEdit constructs the type using only CGO pointers. +func newQPlainTextEdit(h *C.QPlainTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPlainTextEdit { if h == nil { return nil } - return &QPlainTextEdit{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QPlainTextEdit{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQPlainTextEdit(h unsafe.Pointer) *QPlainTextEdit { - return newQPlainTextEdit((*C.QPlainTextEdit)(h)) +// UnsafeNewQPlainTextEdit constructs the type using only unsafe pointers. +func UnsafeNewQPlainTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPlainTextEdit { + if h == nil { + return nil + } + + return &QPlainTextEdit{h: (*C.QPlainTextEdit)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPlainTextEdit constructs a new QPlainTextEdit object. func NewQPlainTextEdit(parent *QWidget) *QPlainTextEdit { - ret := C.QPlainTextEdit_new(parent.cPointer()) - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new(parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPlainTextEdit2 constructs a new QPlainTextEdit object. func NewQPlainTextEdit2() *QPlainTextEdit { - ret := C.QPlainTextEdit_new2() - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new2(&outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPlainTextEdit3 constructs a new QPlainTextEdit object. @@ -69,8 +96,17 @@ func NewQPlainTextEdit3(text string) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPlainTextEdit_new3(text_ms) - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new3(text_ms, &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPlainTextEdit4 constructs a new QPlainTextEdit object. @@ -79,8 +115,17 @@ func NewQPlainTextEdit4(text string, parent *QWidget) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPlainTextEdit_new4(text_ms, parent.cPointer()) - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new4(text_ms, parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPlainTextEdit) MetaObject() *QMetaObject { @@ -116,7 +161,7 @@ func (this *QPlainTextEdit) SetDocument(document *QTextDocument) { } func (this *QPlainTextEdit) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QPlainTextEdit_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QPlainTextEdit_Document(this.h)), nil) } func (this *QPlainTextEdit) SetPlaceholderText(placeholderText string) { @@ -171,7 +216,7 @@ func (this *QPlainTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { func (this *QPlainTextEdit) CurrentCharFormat() *QTextCharFormat { _ret := C.QPlainTextEdit_CurrentCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -282,11 +327,11 @@ func (this *QPlainTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QPlainTextEdit) CreateStandardContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QPlainTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()))) + return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())), nil, nil, nil) } func (this *QPlainTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -718,170 +763,1019 @@ func (this *QPlainTextEdit) ZoomOut1(rangeVal int) { C.QPlainTextEdit_ZoomOut1(this.h, (C.int)(rangeVal)) } -// Delete this object from C++ memory. -func (this *QPlainTextEdit) Delete() { - C.QPlainTextEdit_Delete(this.h) +func (this *QPlainTextEdit) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QPlainTextEdit_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QPlainTextEdit_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QPlainTextEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QPlainTextEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QPlainTextEdit_LoadResource +func miqt_exec_callback_QPlainTextEdit_LoadResource(self *C.QPlainTextEdit, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + } -type QPlainTextDocumentLayout struct { - h *C.QPlainTextDocumentLayout - *QAbstractTextDocumentLayout +func (this *QPlainTextEdit) callVirtualBase_InputMethodQuery(property InputMethodQuery) *QVariant { + + _ret := C.QPlainTextEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnInputMethodQuery(slot func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) { + C.QPlainTextEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) cPointer() *C.QPlainTextDocumentLayout { - if this == nil { - return nil +//export miqt_exec_callback_QPlainTextEdit_InputMethodQuery +func miqt_exec_callback_QPlainTextEdit_InputMethodQuery(self *C.QPlainTextEdit, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(property) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } -func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QPlainTextEdit) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QPlainTextEdit) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QPlainTextEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_Event +func miqt_exec_callback_QPlainTextEdit_Event(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout) *QPlainTextDocumentLayout { - if h == nil { - return nil +func (this *QPlainTextEdit) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QPlainTextEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QPlainTextEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_TimerEvent +func miqt_exec_callback_QPlainTextEdit_TimerEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QPlainTextDocumentLayout{h: h, QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(h))} + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + } -func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer) *QPlainTextDocumentLayout { - return newQPlainTextDocumentLayout((*C.QPlainTextDocumentLayout)(h)) +func (this *QPlainTextEdit) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QPlainTextEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QPlainTextEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object. -func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout { - ret := C.QPlainTextDocumentLayout_new(document.cPointer()) - return newQPlainTextDocumentLayout(ret) +//export miqt_exec_callback_QPlainTextEdit_KeyPressEvent +func miqt_exec_callback_QPlainTextEdit_KeyPressEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QPlainTextDocumentLayout_MetaObject(this.h))) +func (this *QPlainTextEdit) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QPlainTextEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QPlainTextEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QPlainTextDocumentLayout_Metacast(this.h, param1_Cstring)) +//export miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent +func miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + } -func QPlainTextDocumentLayout_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QPlainTextEdit) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QPlainTextEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QPlainTextEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QPlainTextDocumentLayout_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QPlainTextEdit_ResizeEvent +func miqt_exec_callback_QPlainTextEdit_ResizeEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) { - C.QPlainTextDocumentLayout_Draw(this.h, param1.cPointer(), param2.cPointer()) +func (this *QPlainTextEdit) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QPlainTextEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QPlainTextEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) HitTest(param1 *QPointF, param2 HitTestAccuracy) int { - return (int)(C.QPlainTextDocumentLayout_HitTest(this.h, param1.cPointer(), (C.int)(param2))) +//export miqt_exec_callback_QPlainTextEdit_PaintEvent +func miqt_exec_callback_QPlainTextEdit_PaintEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) PageCount() int { - return (int)(C.QPlainTextDocumentLayout_PageCount(this.h)) +func (this *QPlainTextEdit) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) DocumentSize() *QSizeF { - _ret := C.QPlainTextDocumentLayout_DocumentSize(this.h) - _goptr := newQSizeF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QPlainTextEdit_MousePressEvent +func miqt_exec_callback_QPlainTextEdit_MousePressEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) FrameBoundingRect(param1 *QTextFrame) *QRectF { - _ret := C.QPlainTextDocumentLayout_FrameBoundingRect(this.h, param1.cPointer()) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QPlainTextEdit) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) BlockBoundingRect(block *QTextBlock) *QRectF { - _ret := C.QPlainTextDocumentLayout_BlockBoundingRect(this.h, block.cPointer()) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QPlainTextEdit_MouseMoveEvent +func miqt_exec_callback_QPlainTextEdit_MouseMoveEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) EnsureBlockLayout(block *QTextBlock) { - C.QPlainTextDocumentLayout_EnsureBlockLayout(this.h, block.cPointer()) +func (this *QPlainTextEdit) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) SetCursorWidth(width int) { - C.QPlainTextDocumentLayout_SetCursorWidth(this.h, (C.int)(width)) +//export miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent +func miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) CursorWidth() int { - return (int)(C.QPlainTextDocumentLayout_CursorWidth(this.h)) +func (this *QPlainTextEdit) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) RequestUpdate() { - C.QPlainTextDocumentLayout_RequestUpdate(this.h) +//export miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent +func miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + } -func QPlainTextDocumentLayout_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QPlainTextEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QPlainTextEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QPlainTextEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QPlainTextDocumentLayout_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QPlainTextEdit_FocusNextPrevChild +func miqt_exec_callback_QPlainTextEdit_FocusNextPrevChild(self *C.QPlainTextEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + } -func QPlainTextDocumentLayout_TrUtf82(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_TrUtf82(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QPlainTextEdit) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QPlainTextEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QPlainTextEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QPlainTextDocumentLayout_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) +//export miqt_exec_callback_QPlainTextEdit_ContextMenuEvent +func miqt_exec_callback_QPlainTextEdit_ContextMenuEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DragEnterEvent(e *QDragEnterEvent) { + + C.QPlainTextEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDragEnterEvent(slot func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) { + C.QPlainTextEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DragEnterEvent +func miqt_exec_callback_QPlainTextEdit_DragEnterEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QPlainTextEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QPlainTextEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DragLeaveEvent +func miqt_exec_callback_QPlainTextEdit_DragLeaveEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QPlainTextEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QPlainTextEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DragMoveEvent +func miqt_exec_callback_QPlainTextEdit_DragMoveEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QPlainTextEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QPlainTextEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DropEvent +func miqt_exec_callback_QPlainTextEdit_DropEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QPlainTextEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QPlainTextEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_FocusInEvent +func miqt_exec_callback_QPlainTextEdit_FocusInEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QPlainTextEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QPlainTextEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_FocusOutEvent +func miqt_exec_callback_QPlainTextEdit_FocusOutEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QPlainTextEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPlainTextEdit) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QPlainTextEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ShowEvent +func miqt_exec_callback_QPlainTextEdit_ShowEvent(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QPlainTextEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QPlainTextEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ChangeEvent +func miqt_exec_callback_QPlainTextEdit_ChangeEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QPlainTextEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QPlainTextEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_WheelEvent +func miqt_exec_callback_QPlainTextEdit_WheelEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { + + return UnsafeNewQMimeData(unsafe.Pointer(C.QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))), nil) +} +func (this *QPlainTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { + C.QPlainTextEdit_override_virtual_CreateMimeDataFromSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_CreateMimeDataFromSelection +func miqt_exec_callback_QPlainTextEdit_CreateMimeDataFromSelection(self *C.QPlainTextEdit, cb C.intptr_t) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMimeData) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_CreateMimeDataFromSelection) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextEdit) callVirtualBase_CanInsertFromMimeData(source *QMimeData) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), source.cPointer())) + +} +func (this *QPlainTextEdit) OnCanInsertFromMimeData(slot func(super func(source *QMimeData) bool, source *QMimeData) bool) { + C.QPlainTextEdit_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData +func miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData(self *C.QPlainTextEdit, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData) bool, source *QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_InsertFromMimeData(source *QMimeData) { + + C.QPlainTextEdit_virtualbase_InsertFromMimeData(unsafe.Pointer(this.h), source.cPointer()) + +} +func (this *QPlainTextEdit) OnInsertFromMimeData(slot func(super func(source *QMimeData), source *QMimeData)) { + C.QPlainTextEdit_override_virtual_InsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_InsertFromMimeData +func miqt_exec_callback_QPlainTextEdit_InsertFromMimeData(self *C.QPlainTextEdit, cb C.intptr_t, source *C.QMimeData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData), source *QMimeData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QPlainTextEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPlainTextEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QPlainTextEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_InputMethodEvent +func miqt_exec_callback_QPlainTextEdit_InputMethodEvent(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QPlainTextEdit_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QPlainTextEdit) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QPlainTextEdit_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ScrollContentsBy +func miqt_exec_callback_QPlainTextEdit_ScrollContentsBy(self *C.QPlainTextEdit, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QPlainTextEdit) callVirtualBase_DoSetTextCursor(cursor *QTextCursor) { + + C.QPlainTextEdit_virtualbase_DoSetTextCursor(unsafe.Pointer(this.h), cursor.cPointer()) + +} +func (this *QPlainTextEdit) OnDoSetTextCursor(slot func(super func(cursor *QTextCursor), cursor *QTextCursor)) { + C.QPlainTextEdit_override_virtual_DoSetTextCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DoSetTextCursor +func miqt_exec_callback_QPlainTextEdit_DoSetTextCursor(self *C.QPlainTextEdit, cb C.intptr_t, cursor *C.QTextCursor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursor *QTextCursor), cursor *QTextCursor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextCursor(unsafe.Pointer(cursor)) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DoSetTextCursor, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QPlainTextEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QPlainTextEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_MinimumSizeHint +func miqt_exec_callback_QPlainTextEdit_MinimumSizeHint(self *C.QPlainTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QPlainTextEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QPlainTextEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_SizeHint +func miqt_exec_callback_QPlainTextEdit_SizeHint(self *C.QPlainTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextEdit) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QPlainTextEdit_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QPlainTextEdit) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QPlainTextEdit_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_SetupViewport +func miqt_exec_callback_QPlainTextEdit_SetupViewport(self *C.QPlainTextEdit, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QPlainTextEdit) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QPlainTextEdit_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_EventFilter +func miqt_exec_callback_QPlainTextEdit_EventFilter(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QPlainTextEdit) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QPlainTextEdit_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ViewportEvent +func miqt_exec_callback_QPlainTextEdit_ViewportEvent(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QPlainTextEdit_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QPlainTextEdit_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ViewportSizeHint +func miqt_exec_callback_QPlainTextEdit_ViewportSizeHint(self *C.QPlainTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QPlainTextEdit) Delete() { + C.QPlainTextEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPlainTextEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QPlainTextEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QPlainTextDocumentLayout struct { + h *C.QPlainTextDocumentLayout + isSubclass bool + *QAbstractTextDocumentLayout +} + +func (this *QPlainTextDocumentLayout) cPointer() *C.QPlainTextDocumentLayout { + if this == nil { + return nil + } + return this.h +} + +func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPlainTextDocumentLayout constructs the type using only CGO pointers. +func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout, h_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QPlainTextDocumentLayout { + if h == nil { + return nil + } + return &QPlainTextDocumentLayout{h: h, + QAbstractTextDocumentLayout: newQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} +} + +// UnsafeNewQPlainTextDocumentLayout constructs the type using only unsafe pointers. +func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer, h_QAbstractTextDocumentLayout unsafe.Pointer, h_QObject unsafe.Pointer) *QPlainTextDocumentLayout { + if h == nil { + return nil + } + + return &QPlainTextDocumentLayout{h: (*C.QPlainTextDocumentLayout)(h), + QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} +} + +// NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object. +func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout { + var outptr_QPlainTextDocumentLayout *C.QPlainTextDocumentLayout = nil + var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil + var outptr_QObject *C.QObject = nil + + C.QPlainTextDocumentLayout_new(document.cPointer(), &outptr_QPlainTextDocumentLayout, &outptr_QAbstractTextDocumentLayout, &outptr_QObject) + ret := newQPlainTextDocumentLayout(outptr_QPlainTextDocumentLayout, outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QPlainTextDocumentLayout) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QPlainTextDocumentLayout_MetaObject(this.h))) +} + +func (this *QPlainTextDocumentLayout) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPlainTextDocumentLayout_Metacast(this.h, param1_Cstring)) +} + +func QPlainTextDocumentLayout_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPlainTextDocumentLayout_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPlainTextDocumentLayout) Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) { + C.QPlainTextDocumentLayout_Draw(this.h, param1.cPointer(), param2.cPointer()) +} + +func (this *QPlainTextDocumentLayout) HitTest(param1 *QPointF, param2 HitTestAccuracy) int { + return (int)(C.QPlainTextDocumentLayout_HitTest(this.h, param1.cPointer(), (C.int)(param2))) +} + +func (this *QPlainTextDocumentLayout) PageCount() int { + return (int)(C.QPlainTextDocumentLayout_PageCount(this.h)) +} + +func (this *QPlainTextDocumentLayout) DocumentSize() *QSizeF { + _ret := C.QPlainTextDocumentLayout_DocumentSize(this.h) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPlainTextDocumentLayout) FrameBoundingRect(param1 *QTextFrame) *QRectF { + _ret := C.QPlainTextDocumentLayout_FrameBoundingRect(this.h, param1.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPlainTextDocumentLayout) BlockBoundingRect(block *QTextBlock) *QRectF { + _ret := C.QPlainTextDocumentLayout_BlockBoundingRect(this.h, block.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPlainTextDocumentLayout) EnsureBlockLayout(block *QTextBlock) { + C.QPlainTextDocumentLayout_EnsureBlockLayout(this.h, block.cPointer()) +} + +func (this *QPlainTextDocumentLayout) SetCursorWidth(width int) { + C.QPlainTextDocumentLayout_SetCursorWidth(this.h, (C.int)(width)) +} + +func (this *QPlainTextDocumentLayout) CursorWidth() int { + return (int)(C.QPlainTextDocumentLayout_CursorWidth(this.h)) +} + +func (this *QPlainTextDocumentLayout) RequestUpdate() { + C.QPlainTextDocumentLayout_RequestUpdate(this.h) +} + +func QPlainTextDocumentLayout_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPlainTextDocumentLayout_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPlainTextDocumentLayout_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPlainTextDocumentLayout_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) @@ -889,9 +1783,281 @@ func QPlainTextDocumentLayout_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPlainTextDocumentLayout) callVirtualBase_Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) { + + C.QPlainTextDocumentLayout_virtualbase_Draw(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnDraw(slot func(super func(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext), param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext)) { + C.QPlainTextDocumentLayout_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_Draw +func miqt_exec_callback_QPlainTextDocumentLayout_Draw(self *C.QPlainTextDocumentLayout, cb C.intptr_t, param1 *C.QPainter, param2 *C.QAbstractTextDocumentLayout__PaintContext) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext), param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQAbstractTextDocumentLayout__PaintContext(unsafe.Pointer(param2)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_Draw, slotval1, slotval2) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_HitTest(param1 *QPointF, param2 HitTestAccuracy) int { + + return (int)(C.QPlainTextDocumentLayout_virtualbase_HitTest(unsafe.Pointer(this.h), param1.cPointer(), (C.int)(param2))) + +} +func (this *QPlainTextDocumentLayout) OnHitTest(slot func(super func(param1 *QPointF, param2 HitTestAccuracy) int, param1 *QPointF, param2 HitTestAccuracy) int) { + C.QPlainTextDocumentLayout_override_virtual_HitTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_HitTest +func miqt_exec_callback_QPlainTextDocumentLayout_HitTest(self *C.QPlainTextDocumentLayout, cb C.intptr_t, param1 *C.QPointF, param2 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPointF, param2 HitTestAccuracy) int, param1 *QPointF, param2 HitTestAccuracy) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(param1)) + slotval2 := (HitTestAccuracy)(param2) + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_HitTest, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_PageCount() int { + + return (int)(C.QPlainTextDocumentLayout_virtualbase_PageCount(unsafe.Pointer(this.h))) + +} +func (this *QPlainTextDocumentLayout) OnPageCount(slot func(super func() int) int) { + C.QPlainTextDocumentLayout_override_virtual_PageCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_PageCount +func miqt_exec_callback_QPlainTextDocumentLayout_PageCount(self *C.QPlainTextDocumentLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_PageCount) + + return (C.int)(virtualReturn) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_DocumentSize() *QSizeF { + + _ret := C.QPlainTextDocumentLayout_virtualbase_DocumentSize(unsafe.Pointer(this.h)) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextDocumentLayout) OnDocumentSize(slot func(super func() *QSizeF) *QSizeF) { + C.QPlainTextDocumentLayout_override_virtual_DocumentSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_DocumentSize +func miqt_exec_callback_QPlainTextDocumentLayout_DocumentSize(self *C.QPlainTextDocumentLayout, cb C.intptr_t) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_DocumentSize) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_FrameBoundingRect(param1 *QTextFrame) *QRectF { + + _ret := C.QPlainTextDocumentLayout_virtualbase_FrameBoundingRect(unsafe.Pointer(this.h), param1.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextDocumentLayout) OnFrameBoundingRect(slot func(super func(param1 *QTextFrame) *QRectF, param1 *QTextFrame) *QRectF) { + C.QPlainTextDocumentLayout_override_virtual_FrameBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect +func miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect(self *C.QPlainTextDocumentLayout, cb C.intptr_t, param1 *C.QTextFrame) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTextFrame) *QRectF, param1 *QTextFrame) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextFrame(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_FrameBoundingRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_BlockBoundingRect(block *QTextBlock) *QRectF { + + _ret := C.QPlainTextDocumentLayout_virtualbase_BlockBoundingRect(unsafe.Pointer(this.h), block.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextDocumentLayout) OnBlockBoundingRect(slot func(super func(block *QTextBlock) *QRectF, block *QTextBlock) *QRectF) { + C.QPlainTextDocumentLayout_override_virtual_BlockBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_BlockBoundingRect +func miqt_exec_callback_QPlainTextDocumentLayout_BlockBoundingRect(self *C.QPlainTextDocumentLayout, cb C.intptr_t, block *C.QTextBlock) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock) *QRectF, block *QTextBlock) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_BlockBoundingRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_DocumentChanged(from int, param2 int, charsAdded int) { + + C.QPlainTextDocumentLayout_virtualbase_DocumentChanged(unsafe.Pointer(this.h), (C.int)(from), (C.int)(param2), (C.int)(charsAdded)) + +} +func (this *QPlainTextDocumentLayout) OnDocumentChanged(slot func(super func(from int, param2 int, charsAdded int), from int, param2 int, charsAdded int)) { + C.QPlainTextDocumentLayout_override_virtual_DocumentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_DocumentChanged +func miqt_exec_callback_QPlainTextDocumentLayout_DocumentChanged(self *C.QPlainTextDocumentLayout, cb C.intptr_t, from C.int, param2 C.int, charsAdded C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from int, param2 int, charsAdded int), from int, param2 int, charsAdded int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(from) + + slotval2 := (int)(param2) + + slotval3 := (int)(charsAdded) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_DocumentChanged, slotval1, slotval2, slotval3) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_ResizeInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QPlainTextDocumentLayout_virtualbase_ResizeInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnResizeInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QPlainTextDocumentLayout_override_virtual_ResizeInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_ResizeInlineObject +func miqt_exec_callback_QPlainTextDocumentLayout_ResizeInlineObject(self *C.QPlainTextDocumentLayout, cb C.intptr_t, item *C.QTextInlineObject, posInDocument C.int, format *C.QTextFormat) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + item_ret := item + item_goptr := newQTextInlineObject(item_ret) + item_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *item_goptr + + slotval2 := (int)(posInDocument) + + slotval3 := UnsafeNewQTextFormat(unsafe.Pointer(format)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_ResizeInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_PositionInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QPlainTextDocumentLayout_virtualbase_PositionInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnPositionInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QPlainTextDocumentLayout_override_virtual_PositionInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_PositionInlineObject +func miqt_exec_callback_QPlainTextDocumentLayout_PositionInlineObject(self *C.QPlainTextDocumentLayout, cb C.intptr_t, item *C.QTextInlineObject, posInDocument C.int, format *C.QTextFormat) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + item_ret := item + item_goptr := newQTextInlineObject(item_ret) + item_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *item_goptr + + slotval2 := (int)(posInDocument) + + slotval3 := UnsafeNewQTextFormat(unsafe.Pointer(format)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_PositionInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_DrawInlineObject(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QPlainTextDocumentLayout_virtualbase_DrawInlineObject(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), object.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnDrawInlineObject(slot func(super func(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat), painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QPlainTextDocumentLayout_override_virtual_DrawInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_DrawInlineObject +func miqt_exec_callback_QPlainTextDocumentLayout_DrawInlineObject(self *C.QPlainTextDocumentLayout, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF, object *C.QTextInlineObject, posInDocument C.int, format *C.QTextFormat) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat), painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + object_ret := object + object_goptr := newQTextInlineObject(object_ret) + object_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *object_goptr + + slotval4 := (int)(posInDocument) + + slotval5 := UnsafeNewQTextFormat(unsafe.Pointer(format)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_DrawInlineObject, slotval1, slotval2, slotval3, slotval4, slotval5) + +} + // Delete this object from C++ memory. func (this *QPlainTextDocumentLayout) Delete() { - C.QPlainTextDocumentLayout_Delete(this.h) + C.QPlainTextDocumentLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qplaintextedit.h b/qt/gen_qplaintextedit.h index 3d233c11..f9b6bbc2 100644 --- a/qt/gen_qplaintextedit.h +++ b/qt/gen_qplaintextedit.h @@ -15,14 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QAbstractTextDocumentLayout; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext) typedef QAbstractTextDocumentLayout::PaintContext QAbstractTextDocumentLayout__PaintContext; #else class QAbstractTextDocumentLayout__PaintContext; #endif +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; class QPagedPaintDevice; +class QPaintDevice; +class QPaintEvent; class QPainter; class QPlainTextDocumentLayout; class QPlainTextEdit; @@ -32,6 +49,9 @@ class QRect; class QRectF; class QRegExp; class QRegularExpression; +class QResizeEvent; +class QShowEvent; +class QSize; class QSizeF; class QTextBlock; class QTextCharFormat; @@ -42,15 +62,36 @@ typedef QTextEdit::ExtraSelection QTextEdit__ExtraSelection; #else class QTextEdit__ExtraSelection; #endif +class QTextFormat; class QTextFrame; +class QTextInlineObject; +class QTimerEvent; class QUrl; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractTextDocumentLayout__PaintContext QAbstractTextDocumentLayout__PaintContext; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPlainTextDocumentLayout QPlainTextDocumentLayout; typedef struct QPlainTextEdit QPlainTextEdit; @@ -60,22 +101,29 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QRegExp QRegExp; typedef struct QRegularExpression QRegularExpression; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QSizeF QSizeF; typedef struct QTextBlock QTextBlock; typedef struct QTextCharFormat QTextCharFormat; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; typedef struct QTextEdit__ExtraSelection QTextEdit__ExtraSelection; +typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; +typedef struct QTextInlineObject QTextInlineObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QPlainTextEdit* QPlainTextEdit_new(QWidget* parent); -QPlainTextEdit* QPlainTextEdit_new2(); -QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text); -QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent); +void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self); void* QPlainTextEdit_Metacast(QPlainTextEdit* self, const char* param1); struct miqt_string QPlainTextEdit_Tr(const char* s); @@ -169,6 +217,33 @@ void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount); void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, intptr_t slot); void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1); void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, intptr_t slot); +bool QPlainTextEdit_Event(QPlainTextEdit* self, QEvent* e); +void QPlainTextEdit_TimerEvent(QPlainTextEdit* self, QTimerEvent* e); +void QPlainTextEdit_KeyPressEvent(QPlainTextEdit* self, QKeyEvent* e); +void QPlainTextEdit_KeyReleaseEvent(QPlainTextEdit* self, QKeyEvent* e); +void QPlainTextEdit_ResizeEvent(QPlainTextEdit* self, QResizeEvent* e); +void QPlainTextEdit_PaintEvent(QPlainTextEdit* self, QPaintEvent* e); +void QPlainTextEdit_MousePressEvent(QPlainTextEdit* self, QMouseEvent* e); +void QPlainTextEdit_MouseMoveEvent(QPlainTextEdit* self, QMouseEvent* e); +void QPlainTextEdit_MouseReleaseEvent(QPlainTextEdit* self, QMouseEvent* e); +void QPlainTextEdit_MouseDoubleClickEvent(QPlainTextEdit* self, QMouseEvent* e); +bool QPlainTextEdit_FocusNextPrevChild(QPlainTextEdit* self, bool next); +void QPlainTextEdit_ContextMenuEvent(QPlainTextEdit* self, QContextMenuEvent* e); +void QPlainTextEdit_DragEnterEvent(QPlainTextEdit* self, QDragEnterEvent* e); +void QPlainTextEdit_DragLeaveEvent(QPlainTextEdit* self, QDragLeaveEvent* e); +void QPlainTextEdit_DragMoveEvent(QPlainTextEdit* self, QDragMoveEvent* e); +void QPlainTextEdit_DropEvent(QPlainTextEdit* self, QDropEvent* e); +void QPlainTextEdit_FocusInEvent(QPlainTextEdit* self, QFocusEvent* e); +void QPlainTextEdit_FocusOutEvent(QPlainTextEdit* self, QFocusEvent* e); +void QPlainTextEdit_ShowEvent(QPlainTextEdit* self, QShowEvent* param1); +void QPlainTextEdit_ChangeEvent(QPlainTextEdit* self, QEvent* e); +void QPlainTextEdit_WheelEvent(QPlainTextEdit* self, QWheelEvent* e); +QMimeData* QPlainTextEdit_CreateMimeDataFromSelection(const QPlainTextEdit* self); +bool QPlainTextEdit_CanInsertFromMimeData(const QPlainTextEdit* self, QMimeData* source); +void QPlainTextEdit_InsertFromMimeData(QPlainTextEdit* self, QMimeData* source); +void QPlainTextEdit_InputMethodEvent(QPlainTextEdit* self, QInputMethodEvent* param1); +void QPlainTextEdit_ScrollContentsBy(QPlainTextEdit* self, int dx, int dy); +void QPlainTextEdit_DoSetTextCursor(QPlainTextEdit* self, QTextCursor* cursor); struct miqt_string QPlainTextEdit_Tr2(const char* s, const char* c); struct miqt_string QPlainTextEdit_Tr3(const char* s, const char* c, int n); struct miqt_string QPlainTextEdit_TrUtf82(const char* s, const char* c); @@ -179,9 +254,79 @@ bool QPlainTextEdit_Find24(QPlainTextEdit* self, QRegularExpression* exp, int op void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, int operation, int mode); void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal); void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal); -void QPlainTextEdit_Delete(QPlainTextEdit* self); +void QPlainTextEdit_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QPlainTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QPlainTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QPlainTextEdit_virtualbase_InputMethodQuery(const void* self, int property); +void QPlainTextEdit_override_virtual_Event(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_Event(void* self, QEvent* e); +void QPlainTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QPlainTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QPlainTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QPlainTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QPlainTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QPlainTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QPlainTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QPlainTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QPlainTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QPlainTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QPlainTextEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e); +void QPlainTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QPlainTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QPlainTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QPlainTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e); +void QPlainTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QPlainTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot); +QMimeData* QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self); +void QPlainTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QPlainTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source); +void QPlainTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QPlainTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QPlainTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor); +void QPlainTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPlainTextEdit_virtualbase_MinimumSizeHint(const void* self); +void QPlainTextEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPlainTextEdit_virtualbase_SizeHint(const void* self); +void QPlainTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QPlainTextEdit_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QPlainTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QPlainTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QPlainTextEdit_virtualbase_ViewportSizeHint(const void* self); +void QPlainTextEdit_Delete(QPlainTextEdit* self, bool isSubclass); -QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document); +void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self); void* QPlainTextDocumentLayout_Metacast(QPlainTextDocumentLayout* self, const char* param1); struct miqt_string QPlainTextDocumentLayout_Tr(const char* s); @@ -196,11 +341,32 @@ void QPlainTextDocumentLayout_EnsureBlockLayout(const QPlainTextDocumentLayout* void QPlainTextDocumentLayout_SetCursorWidth(QPlainTextDocumentLayout* self, int width); int QPlainTextDocumentLayout_CursorWidth(const QPlainTextDocumentLayout* self); void QPlainTextDocumentLayout_RequestUpdate(QPlainTextDocumentLayout* self); +void QPlainTextDocumentLayout_DocumentChanged(QPlainTextDocumentLayout* self, int from, int param2, int charsAdded); struct miqt_string QPlainTextDocumentLayout_Tr2(const char* s, const char* c); struct miqt_string QPlainTextDocumentLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QPlainTextDocumentLayout_TrUtf82(const char* s, const char* c); struct miqt_string QPlainTextDocumentLayout_TrUtf83(const char* s, const char* c, int n); -void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self); +void QPlainTextDocumentLayout_override_virtual_Draw(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_Draw(void* self, QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2); +void QPlainTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot); +int QPlainTextDocumentLayout_virtualbase_HitTest(const void* self, QPointF* param1, int param2); +void QPlainTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot); +int QPlainTextDocumentLayout_virtualbase_PageCount(const void* self); +void QPlainTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot); +QSizeF* QPlainTextDocumentLayout_virtualbase_DocumentSize(const void* self); +void QPlainTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot); +QRectF* QPlainTextDocumentLayout_virtualbase_FrameBoundingRect(const void* self, QTextFrame* param1); +void QPlainTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot); +QRectF* QPlainTextDocumentLayout_virtualbase_BlockBoundingRect(const void* self, QTextBlock* block); +void QPlainTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_DocumentChanged(void* self, int from, int param2, int charsAdded); +void QPlainTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QPlainTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QPlainTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format); +void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qplugin.cpp b/qt/gen_qplugin.cpp index ccfdc274..61fee3cb 100644 --- a/qt/gen_qplugin.cpp +++ b/qt/gen_qplugin.cpp @@ -8,7 +8,11 @@ QJsonObject* QStaticPlugin_MetaData(const QStaticPlugin* self) { return new QJsonObject(self->metaData()); } -void QStaticPlugin_Delete(QStaticPlugin* self) { - delete self; +void QStaticPlugin_Delete(QStaticPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qplugin.go b/qt/gen_qplugin.go index a073a19a..13d4a8dc 100644 --- a/qt/gen_qplugin.go +++ b/qt/gen_qplugin.go @@ -14,7 +14,8 @@ import ( ) type QStaticPlugin struct { - h *C.QStaticPlugin + h *C.QStaticPlugin + isSubclass bool } func (this *QStaticPlugin) cPointer() *C.QStaticPlugin { @@ -31,6 +32,7 @@ func (this *QStaticPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStaticPlugin constructs the type using only CGO pointers. func newQStaticPlugin(h *C.QStaticPlugin) *QStaticPlugin { if h == nil { return nil @@ -38,8 +40,13 @@ func newQStaticPlugin(h *C.QStaticPlugin) *QStaticPlugin { return &QStaticPlugin{h: h} } +// UnsafeNewQStaticPlugin constructs the type using only unsafe pointers. func UnsafeNewQStaticPlugin(h unsafe.Pointer) *QStaticPlugin { - return newQStaticPlugin((*C.QStaticPlugin)(h)) + if h == nil { + return nil + } + + return &QStaticPlugin{h: (*C.QStaticPlugin)(h)} } func (this *QStaticPlugin) MetaData() *QJsonObject { @@ -51,7 +58,7 @@ func (this *QStaticPlugin) MetaData() *QJsonObject { // Delete this object from C++ memory. func (this *QStaticPlugin) Delete() { - C.QStaticPlugin_Delete(this.h) + C.QStaticPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qplugin.h b/qt/gen_qplugin.h index 4ea0fda4..af529939 100644 --- a/qt/gen_qplugin.h +++ b/qt/gen_qplugin.h @@ -23,7 +23,7 @@ typedef struct QStaticPlugin QStaticPlugin; #endif QJsonObject* QStaticPlugin_MetaData(const QStaticPlugin* self); -void QStaticPlugin_Delete(QStaticPlugin* self); +void QStaticPlugin_Delete(QStaticPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpluginloader.cpp b/qt/gen_qpluginloader.cpp index e93437db..07023ab4 100644 --- a/qt/gen_qpluginloader.cpp +++ b/qt/gen_qpluginloader.cpp @@ -1,5 +1,8 @@ +#include +#include #include #include +#include #include #include #include @@ -7,26 +10,218 @@ #include #include #include +#include #include #include "gen_qpluginloader.h" #include "_cgo_export.h" -QPluginLoader* QPluginLoader_new() { - return new QPluginLoader(); +class MiqtVirtualQPluginLoader : public virtual QPluginLoader { +public: + + MiqtVirtualQPluginLoader(): QPluginLoader() {}; + MiqtVirtualQPluginLoader(const QString& fileName): QPluginLoader(fileName) {}; + MiqtVirtualQPluginLoader(QObject* parent): QPluginLoader(parent) {}; + MiqtVirtualQPluginLoader(const QString& fileName, QObject* parent): QPluginLoader(fileName, parent) {}; + + virtual ~MiqtVirtualQPluginLoader() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPluginLoader::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPluginLoader_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPluginLoader::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QPluginLoader::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPluginLoader_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QPluginLoader::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QPluginLoader::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPluginLoader_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QPluginLoader::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QPluginLoader::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPluginLoader_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QPluginLoader::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QPluginLoader::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPluginLoader_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QPluginLoader::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QPluginLoader::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPluginLoader_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QPluginLoader::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QPluginLoader::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPluginLoader_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QPluginLoader::disconnectNotify(*signal); + + } + +}; + +void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } -QPluginLoader* QPluginLoader_new2(struct miqt_string fileName) { +void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPluginLoader(fileName_QString); + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } -QPluginLoader* QPluginLoader_new3(QObject* parent) { - return new QPluginLoader(parent); +void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(parent); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } -QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent) { +void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPluginLoader(fileName_QString, parent); + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString, parent); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self) { @@ -185,7 +380,67 @@ struct miqt_string QPluginLoader_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QPluginLoader_Delete(QPluginLoader* self) { - delete self; +void QPluginLoader_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__Event = slot; +} + +bool QPluginLoader_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_Event(event); +} + +void QPluginLoader_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__EventFilter = slot; +} + +bool QPluginLoader_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QPluginLoader_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__TimerEvent = slot; +} + +void QPluginLoader_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_TimerEvent(event); +} + +void QPluginLoader_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__ChildEvent = slot; +} + +void QPluginLoader_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_ChildEvent(event); +} + +void QPluginLoader_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__CustomEvent = slot; +} + +void QPluginLoader_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_CustomEvent(event); +} + +void QPluginLoader_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__ConnectNotify = slot; +} + +void QPluginLoader_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QPluginLoader_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__DisconnectNotify = slot; +} + +void QPluginLoader_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QPluginLoader_Delete(QPluginLoader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpluginloader.go b/qt/gen_qpluginloader.go index 58c378dd..89c219d5 100644 --- a/qt/gen_qpluginloader.go +++ b/qt/gen_qpluginloader.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPluginLoader struct { - h *C.QPluginLoader + h *C.QPluginLoader + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QPluginLoader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPluginLoader(h *C.QPluginLoader) *QPluginLoader { +// newQPluginLoader constructs the type using only CGO pointers. +func newQPluginLoader(h *C.QPluginLoader, h_QObject *C.QObject) *QPluginLoader { if h == nil { return nil } - return &QPluginLoader{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QPluginLoader{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQPluginLoader(h unsafe.Pointer) *QPluginLoader { - return newQPluginLoader((*C.QPluginLoader)(h)) +// UnsafeNewQPluginLoader constructs the type using only unsafe pointers. +func UnsafeNewQPluginLoader(h unsafe.Pointer, h_QObject unsafe.Pointer) *QPluginLoader { + if h == nil { + return nil + } + + return &QPluginLoader{h: (*C.QPluginLoader)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQPluginLoader constructs a new QPluginLoader object. func NewQPluginLoader() *QPluginLoader { - ret := C.QPluginLoader_new() - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new(&outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPluginLoader2 constructs a new QPluginLoader object. @@ -55,14 +70,24 @@ func NewQPluginLoader2(fileName string) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QPluginLoader_new2(fileName_ms) - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new2(fileName_ms, &outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPluginLoader3 constructs a new QPluginLoader object. func NewQPluginLoader3(parent *QObject) *QPluginLoader { - ret := C.QPluginLoader_new3(parent.cPointer()) - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new3(parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPluginLoader4 constructs a new QPluginLoader object. @@ -71,8 +96,13 @@ func NewQPluginLoader4(fileName string, parent *QObject) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QPluginLoader_new4(fileName_ms, parent.cPointer()) - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new4(fileName_ms, parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPluginLoader) MetaObject() *QMetaObject { @@ -223,9 +253,175 @@ func QPluginLoader_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPluginLoader) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPluginLoader_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPluginLoader) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPluginLoader_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_Event +func miqt_exec_callback_QPluginLoader_Event(self *C.QPluginLoader, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPluginLoader{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPluginLoader) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QPluginLoader_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QPluginLoader) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QPluginLoader_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_EventFilter +func miqt_exec_callback_QPluginLoader_EventFilter(self *C.QPluginLoader, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPluginLoader{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPluginLoader) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QPluginLoader_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPluginLoader) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QPluginLoader_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_TimerEvent +func miqt_exec_callback_QPluginLoader_TimerEvent(self *C.QPluginLoader, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QPluginLoader_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPluginLoader) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QPluginLoader_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_ChildEvent +func miqt_exec_callback_QPluginLoader_ChildEvent(self *C.QPluginLoader, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_CustomEvent(event *QEvent) { + + C.QPluginLoader_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPluginLoader) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QPluginLoader_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_CustomEvent +func miqt_exec_callback_QPluginLoader_CustomEvent(self *C.QPluginLoader, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QPluginLoader_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPluginLoader) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPluginLoader_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_ConnectNotify +func miqt_exec_callback_QPluginLoader_ConnectNotify(self *C.QPluginLoader, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QPluginLoader_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPluginLoader) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPluginLoader_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_DisconnectNotify +func miqt_exec_callback_QPluginLoader_DisconnectNotify(self *C.QPluginLoader, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QPluginLoader) Delete() { - C.QPluginLoader_Delete(this.h) + C.QPluginLoader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpluginloader.h b/qt/gen_qpluginloader.h index b942dc3c..80dc36c5 100644 --- a/qt/gen_qpluginloader.h +++ b/qt/gen_qpluginloader.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QJsonObject; +class QMetaMethod; class QMetaObject; class QObject; class QPluginLoader; class QStaticPlugin; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QJsonObject QJsonObject; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPluginLoader QPluginLoader; typedef struct QStaticPlugin QStaticPlugin; +typedef struct QTimerEvent QTimerEvent; #endif -QPluginLoader* QPluginLoader_new(); -QPluginLoader* QPluginLoader_new2(struct miqt_string fileName); -QPluginLoader* QPluginLoader_new3(QObject* parent); -QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent); +void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self); void* QPluginLoader_Metacast(QPluginLoader* self, const char* param1); struct miqt_string QPluginLoader_Tr(const char* s); @@ -52,7 +60,21 @@ struct miqt_string QPluginLoader_Tr2(const char* s, const char* c); struct miqt_string QPluginLoader_Tr3(const char* s, const char* c, int n); struct miqt_string QPluginLoader_TrUtf82(const char* s, const char* c); struct miqt_string QPluginLoader_TrUtf83(const char* s, const char* c, int n); -void QPluginLoader_Delete(QPluginLoader* self); +void QPluginLoader_override_virtual_Event(void* self, intptr_t slot); +bool QPluginLoader_virtualbase_Event(void* self, QEvent* event); +void QPluginLoader_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPluginLoader_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QPluginLoader_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPluginLoader_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QPluginLoader_override_virtual_ChildEvent(void* self, intptr_t slot); +void QPluginLoader_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QPluginLoader_override_virtual_CustomEvent(void* self, intptr_t slot); +void QPluginLoader_virtualbase_CustomEvent(void* self, QEvent* event); +void QPluginLoader_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QPluginLoader_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QPluginLoader_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QPluginLoader_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QPluginLoader_Delete(QPluginLoader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpoint.cpp b/qt/gen_qpoint.cpp index 3f8e65c2..72139762 100644 --- a/qt/gen_qpoint.cpp +++ b/qt/gen_qpoint.cpp @@ -4,16 +4,19 @@ #include "gen_qpoint.h" #include "_cgo_export.h" -QPoint* QPoint_new() { - return new QPoint(); +void QPoint_new(QPoint** outptr_QPoint) { + QPoint* ret = new QPoint(); + *outptr_QPoint = ret; } -QPoint* QPoint_new2(int xpos, int ypos) { - return new QPoint(static_cast(xpos), static_cast(ypos)); +void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint) { + QPoint* ret = new QPoint(static_cast(xpos), static_cast(ypos)); + *outptr_QPoint = ret; } -QPoint* QPoint_new3(QPoint* param1) { - return new QPoint(*param1); +void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint) { + QPoint* ret = new QPoint(*param1); + *outptr_QPoint = ret; } bool QPoint_IsNull(const QPoint* self) { @@ -84,24 +87,32 @@ int QPoint_DotProduct(QPoint* p1, QPoint* p2) { return QPoint::dotProduct(*p1, *p2); } -void QPoint_Delete(QPoint* self) { - delete self; +void QPoint_Delete(QPoint* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPointF* QPointF_new() { - return new QPointF(); +void QPointF_new(QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(); + *outptr_QPointF = ret; } -QPointF* QPointF_new2(QPoint* p) { - return new QPointF(*p); +void QPointF_new2(QPoint* p, QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(*p); + *outptr_QPointF = ret; } -QPointF* QPointF_new3(double xpos, double ypos) { - return new QPointF(static_cast(xpos), static_cast(ypos)); +void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(static_cast(xpos), static_cast(ypos)); + *outptr_QPointF = ret; } -QPointF* QPointF_new4(QPointF* param1) { - return new QPointF(*param1); +void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(*param1); + *outptr_QPointF = ret; } double QPointF_ManhattanLength(const QPointF* self) { @@ -168,7 +179,11 @@ QPoint* QPointF_ToPoint(const QPointF* self) { return new QPoint(self->toPoint()); } -void QPointF_Delete(QPointF* self) { - delete self; +void QPointF_Delete(QPointF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpoint.go b/qt/gen_qpoint.go index a1626797..e2d24aa4 100644 --- a/qt/gen_qpoint.go +++ b/qt/gen_qpoint.go @@ -14,7 +14,8 @@ import ( ) type QPoint struct { - h *C.QPoint + h *C.QPoint + isSubclass bool } func (this *QPoint) cPointer() *C.QPoint { @@ -31,6 +32,7 @@ func (this *QPoint) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPoint constructs the type using only CGO pointers. func newQPoint(h *C.QPoint) *QPoint { if h == nil { return nil @@ -38,26 +40,43 @@ func newQPoint(h *C.QPoint) *QPoint { return &QPoint{h: h} } +// UnsafeNewQPoint constructs the type using only unsafe pointers. func UnsafeNewQPoint(h unsafe.Pointer) *QPoint { - return newQPoint((*C.QPoint)(h)) + if h == nil { + return nil + } + + return &QPoint{h: (*C.QPoint)(h)} } // NewQPoint constructs a new QPoint object. func NewQPoint() *QPoint { - ret := C.QPoint_new() - return newQPoint(ret) + var outptr_QPoint *C.QPoint = nil + + C.QPoint_new(&outptr_QPoint) + ret := newQPoint(outptr_QPoint) + ret.isSubclass = true + return ret } // NewQPoint2 constructs a new QPoint object. func NewQPoint2(xpos int, ypos int) *QPoint { - ret := C.QPoint_new2((C.int)(xpos), (C.int)(ypos)) - return newQPoint(ret) + var outptr_QPoint *C.QPoint = nil + + C.QPoint_new2((C.int)(xpos), (C.int)(ypos), &outptr_QPoint) + ret := newQPoint(outptr_QPoint) + ret.isSubclass = true + return ret } // NewQPoint3 constructs a new QPoint object. func NewQPoint3(param1 *QPoint) *QPoint { - ret := C.QPoint_new3(param1.cPointer()) - return newQPoint(ret) + var outptr_QPoint *C.QPoint = nil + + C.QPoint_new3(param1.cPointer(), &outptr_QPoint) + ret := newQPoint(outptr_QPoint) + ret.isSubclass = true + return ret } func (this *QPoint) IsNull() bool { @@ -121,7 +140,7 @@ func QPoint_DotProduct(p1 *QPoint, p2 *QPoint) int { // Delete this object from C++ memory. func (this *QPoint) Delete() { - C.QPoint_Delete(this.h) + C.QPoint_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -134,7 +153,8 @@ func (this *QPoint) GoGC() { } type QPointF struct { - h *C.QPointF + h *C.QPointF + isSubclass bool } func (this *QPointF) cPointer() *C.QPointF { @@ -151,6 +171,7 @@ func (this *QPointF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPointF constructs the type using only CGO pointers. func newQPointF(h *C.QPointF) *QPointF { if h == nil { return nil @@ -158,32 +179,53 @@ func newQPointF(h *C.QPointF) *QPointF { return &QPointF{h: h} } +// UnsafeNewQPointF constructs the type using only unsafe pointers. func UnsafeNewQPointF(h unsafe.Pointer) *QPointF { - return newQPointF((*C.QPointF)(h)) + if h == nil { + return nil + } + + return &QPointF{h: (*C.QPointF)(h)} } // NewQPointF constructs a new QPointF object. func NewQPointF() *QPointF { - ret := C.QPointF_new() - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new(&outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } // NewQPointF2 constructs a new QPointF object. func NewQPointF2(p *QPoint) *QPointF { - ret := C.QPointF_new2(p.cPointer()) - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new2(p.cPointer(), &outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } // NewQPointF3 constructs a new QPointF object. func NewQPointF3(xpos float64, ypos float64) *QPointF { - ret := C.QPointF_new3((C.double)(xpos), (C.double)(ypos)) - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new3((C.double)(xpos), (C.double)(ypos), &outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } // NewQPointF4 constructs a new QPointF object. func NewQPointF4(param1 *QPointF) *QPointF { - ret := C.QPointF_new4(param1.cPointer()) - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new4(param1.cPointer(), &outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } func (this *QPointF) ManhattanLength() float64 { @@ -246,7 +288,7 @@ func (this *QPointF) ToPoint() *QPoint { // Delete this object from C++ memory. func (this *QPointF) Delete() { - C.QPointF_Delete(this.h) + C.QPointF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpoint.h b/qt/gen_qpoint.h index e8b349ee..63d2338b 100644 --- a/qt/gen_qpoint.h +++ b/qt/gen_qpoint.h @@ -22,9 +22,9 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -QPoint* QPoint_new(); -QPoint* QPoint_new2(int xpos, int ypos); -QPoint* QPoint_new3(QPoint* param1); +void QPoint_new(QPoint** outptr_QPoint); +void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint); +void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint); bool QPoint_IsNull(const QPoint* self); int QPoint_X(const QPoint* self); int QPoint_Y(const QPoint* self); @@ -39,12 +39,12 @@ QPoint* QPoint_OperatorMultiplyAssignWithFactor(QPoint* self, double factor); QPoint* QPoint_OperatorMultiplyAssign2(QPoint* self, int factor); QPoint* QPoint_OperatorDivideAssign(QPoint* self, double divisor); int QPoint_DotProduct(QPoint* p1, QPoint* p2); -void QPoint_Delete(QPoint* self); +void QPoint_Delete(QPoint* self, bool isSubclass); -QPointF* QPointF_new(); -QPointF* QPointF_new2(QPoint* p); -QPointF* QPointF_new3(double xpos, double ypos); -QPointF* QPointF_new4(QPointF* param1); +void QPointF_new(QPointF** outptr_QPointF); +void QPointF_new2(QPoint* p, QPointF** outptr_QPointF); +void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF); +void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF); double QPointF_ManhattanLength(const QPointF* self); bool QPointF_IsNull(const QPointF* self); double QPointF_X(const QPointF* self); @@ -58,7 +58,7 @@ QPointF* QPointF_OperatorMultiplyAssign(QPointF* self, double c); QPointF* QPointF_OperatorDivideAssign(QPointF* self, double c); double QPointF_DotProduct(QPointF* p1, QPointF* p2); QPoint* QPointF_ToPoint(const QPointF* self); -void QPointF_Delete(QPointF* self); +void QPointF_Delete(QPointF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qprocess.cpp b/qt/gen_qprocess.cpp index cb92d296..0f521e65 100644 --- a/qt/gen_qprocess.cpp +++ b/qt/gen_qprocess.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -11,12 +12,14 @@ #include "gen_qprocess.h" #include "_cgo_export.h" -QProcessEnvironment* QProcessEnvironment_new() { - return new QProcessEnvironment(); +void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment) { + QProcessEnvironment* ret = new QProcessEnvironment(); + *outptr_QProcessEnvironment = ret; } -QProcessEnvironment* QProcessEnvironment_new2(QProcessEnvironment* other) { - return new QProcessEnvironment(*other); +void QProcessEnvironment_new2(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment) { + QProcessEnvironment* ret = new QProcessEnvironment(*other); + *outptr_QProcessEnvironment = ret; } void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other) { @@ -132,16 +135,434 @@ struct miqt_string QProcessEnvironment_Value2(const QProcessEnvironment* self, s return _ms; } -void QProcessEnvironment_Delete(QProcessEnvironment* self) { - delete self; +void QProcessEnvironment_Delete(QProcessEnvironment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QProcess* QProcess_new() { - return new QProcess(); +class MiqtVirtualQProcess : public virtual QProcess { +public: + + MiqtVirtualQProcess(): QProcess() {}; + MiqtVirtualQProcess(QObject* parent): QProcess(parent) {}; + + virtual ~MiqtVirtualQProcess() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode mode) override { + if (handle__Open == 0) { + return QProcess::open(mode); + } + + QIODevice::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QProcess_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QProcess::open(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QProcess::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QProcess_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QProcess::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QProcess::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QProcess_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QProcess::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QProcess::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QProcess::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QProcess::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QProcess::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QProcess::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QProcess::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QProcess::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QProcess::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QProcess::close(); + return; + } + + + miqt_exec_callback_QProcess_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QProcess::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QProcess::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QProcess::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupChildProcess = 0; + + // Subclass to allow providing a Go implementation + virtual void setupChildProcess() override { + if (handle__SetupChildProcess == 0) { + QProcess::setupChildProcess(); + return; + } + + + miqt_exec_callback_QProcess_SetupChildProcess(this, handle__SetupChildProcess); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupChildProcess() { + + QProcess::setupChildProcess(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QProcess::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QProcess::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QProcess::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QProcess::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QProcess::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QProcess::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QProcess::size(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QProcess::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QProcess::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QProcess_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QProcess::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QProcess::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QProcess::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QProcess::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QProcess::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(); + *outptr_QProcess = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QProcess* QProcess_new2(QObject* parent) { - return new QProcess(parent); +void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(parent); + *outptr_QProcess = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QProcess_MetaObject(const QProcess* self) { @@ -199,8 +620,8 @@ bool QProcess_StartDetached(QProcess* self) { return self->startDetached(); } -bool QProcess_Open(QProcess* self) { - return self->open(); +bool QProcess_Open(QProcess* self, int mode) { + return self->open(static_cast(mode)); } struct miqt_string QProcess_Program(const QProcess* self) { @@ -397,12 +818,12 @@ bool QProcess_WaitForStarted(QProcess* self) { return self->waitForStarted(); } -bool QProcess_WaitForReadyRead(QProcess* self) { - return self->waitForReadyRead(); +bool QProcess_WaitForReadyRead(QProcess* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } -bool QProcess_WaitForBytesWritten(QProcess* self) { - return self->waitForBytesWritten(); +bool QProcess_WaitForBytesWritten(QProcess* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } bool QProcess_WaitForFinished(QProcess* self) { @@ -553,7 +974,7 @@ void QProcess_Finished(QProcess* self, int exitCode) { } void QProcess_connect_Finished(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode) { int sigval1 = exitCode; miqt_exec_callback_QProcess_Finished(slot, sigval1); }); @@ -564,7 +985,7 @@ void QProcess_Finished2(QProcess* self, int exitCode, int exitStatus) { } void QProcess_connect_Finished2(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode, QProcess::ExitStatus exitStatus) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode, QProcess::ExitStatus exitStatus) { int sigval1 = exitCode; QProcess::ExitStatus exitStatus_ret = exitStatus; int sigval2 = static_cast(exitStatus_ret); @@ -577,7 +998,7 @@ void QProcess_ErrorWithError(QProcess* self, int error) { } void QProcess_connect_ErrorWithError(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::error), self, [=](QProcess::ProcessError error) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::error), self, [=](QProcess::ProcessError error) { QProcess::ProcessError error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QProcess_ErrorWithError(slot, sigval1); @@ -589,7 +1010,7 @@ void QProcess_ErrorOccurred(QProcess* self, int error) { } void QProcess_connect_ErrorOccurred(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::errorOccurred), self, [=](QProcess::ProcessError error) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::errorOccurred), self, [=](QProcess::ProcessError error) { QProcess::ProcessError error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QProcess_ErrorOccurred(slot, sigval1); @@ -665,10 +1086,6 @@ bool QProcess_StartDetached1(QProcess* self, long long* pid) { return self->startDetached(static_cast(pid)); } -bool QProcess_Open1(QProcess* self, int mode) { - return self->open(static_cast(mode)); -} - void QProcess_SetStandardOutputFile2(QProcess* self, struct miqt_string fileName, int mode) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); self->setStandardOutputFile(fileName_QString, static_cast(mode)); @@ -683,14 +1100,6 @@ bool QProcess_WaitForStarted1(QProcess* self, int msecs) { return self->waitForStarted(static_cast(msecs)); } -bool QProcess_WaitForReadyRead1(QProcess* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); -} - -bool QProcess_WaitForBytesWritten1(QProcess* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); -} - bool QProcess_WaitForFinished1(QProcess* self, int msecs) { return self->waitForFinished(static_cast(msecs)); } @@ -708,7 +1117,147 @@ bool QProcess_StartDetached4(struct miqt_string program, struct miqt_array /* of return QProcess::startDetached(program_QString, arguments_QList, workingDirectory_QString, static_cast(pid)); } -void QProcess_Delete(QProcess* self) { - delete self; +void QProcess_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Open = slot; +} + +bool QProcess_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_Open(mode); +} + +void QProcess_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QProcess_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QProcess_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QProcess_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QProcess_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__BytesAvailable = slot; +} + +long long QProcess_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_BytesAvailable(); +} + +void QProcess_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__BytesToWrite = slot; +} + +long long QProcess_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_BytesToWrite(); +} + +void QProcess_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__IsSequential = slot; +} + +bool QProcess_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_IsSequential(); +} + +void QProcess_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__CanReadLine = slot; +} + +bool QProcess_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_CanReadLine(); +} + +void QProcess_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Close = slot; +} + +void QProcess_virtualbase_Close(void* self) { + ( (MiqtVirtualQProcess*)(self) )->virtualbase_Close(); +} + +void QProcess_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__AtEnd = slot; +} + +bool QProcess_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_AtEnd(); +} + +void QProcess_override_virtual_SetupChildProcess(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__SetupChildProcess = slot; +} + +void QProcess_virtualbase_SetupChildProcess(void* self) { + ( (MiqtVirtualQProcess*)(self) )->virtualbase_SetupChildProcess(); +} + +void QProcess_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__ReadData = slot; +} + +long long QProcess_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QProcess_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__WriteData = slot; +} + +long long QProcess_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QProcess_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Pos = slot; +} + +long long QProcess_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_Pos(); +} + +void QProcess_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Size = slot; +} + +long long QProcess_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_Size(); +} + +void QProcess_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Seek = slot; +} + +bool QProcess_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_Seek(pos); +} + +void QProcess_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Reset = slot; +} + +bool QProcess_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_Reset(); +} + +void QProcess_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__ReadLineData = slot; +} + +long long QProcess_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QProcess_Delete(QProcess* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qprocess.go b/qt/gen_qprocess.go index ce04ae3c..3960cb27 100644 --- a/qt/gen_qprocess.go +++ b/qt/gen_qprocess.go @@ -65,7 +65,8 @@ const ( ) type QProcessEnvironment struct { - h *C.QProcessEnvironment + h *C.QProcessEnvironment + isSubclass bool } func (this *QProcessEnvironment) cPointer() *C.QProcessEnvironment { @@ -82,6 +83,7 @@ func (this *QProcessEnvironment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQProcessEnvironment constructs the type using only CGO pointers. func newQProcessEnvironment(h *C.QProcessEnvironment) *QProcessEnvironment { if h == nil { return nil @@ -89,20 +91,33 @@ func newQProcessEnvironment(h *C.QProcessEnvironment) *QProcessEnvironment { return &QProcessEnvironment{h: h} } +// UnsafeNewQProcessEnvironment constructs the type using only unsafe pointers. func UnsafeNewQProcessEnvironment(h unsafe.Pointer) *QProcessEnvironment { - return newQProcessEnvironment((*C.QProcessEnvironment)(h)) + if h == nil { + return nil + } + + return &QProcessEnvironment{h: (*C.QProcessEnvironment)(h)} } // NewQProcessEnvironment constructs a new QProcessEnvironment object. func NewQProcessEnvironment() *QProcessEnvironment { - ret := C.QProcessEnvironment_new() - return newQProcessEnvironment(ret) + var outptr_QProcessEnvironment *C.QProcessEnvironment = nil + + C.QProcessEnvironment_new(&outptr_QProcessEnvironment) + ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret.isSubclass = true + return ret } // NewQProcessEnvironment2 constructs a new QProcessEnvironment object. func NewQProcessEnvironment2(other *QProcessEnvironment) *QProcessEnvironment { - ret := C.QProcessEnvironment_new2(other.cPointer()) - return newQProcessEnvironment(ret) + var outptr_QProcessEnvironment *C.QProcessEnvironment = nil + + C.QProcessEnvironment_new2(other.cPointer(), &outptr_QProcessEnvironment) + ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret.isSubclass = true + return ret } func (this *QProcessEnvironment) OperatorAssign(other *QProcessEnvironment) { @@ -222,7 +237,7 @@ func (this *QProcessEnvironment) Value2(name string, defaultValue string) string // Delete this object from C++ memory. func (this *QProcessEnvironment) Delete() { - C.QProcessEnvironment_Delete(this.h) + C.QProcessEnvironment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -235,7 +250,8 @@ func (this *QProcessEnvironment) GoGC() { } type QProcess struct { - h *C.QProcess + h *C.QProcess + isSubclass bool *QIODevice } @@ -253,27 +269,47 @@ func (this *QProcess) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProcess(h *C.QProcess) *QProcess { +// newQProcess constructs the type using only CGO pointers. +func newQProcess(h *C.QProcess, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QProcess { if h == nil { return nil } - return &QProcess{h: h, QIODevice: UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QProcess{h: h, + QIODevice: newQIODevice(h_QIODevice, h_QObject)} } -func UnsafeNewQProcess(h unsafe.Pointer) *QProcess { - return newQProcess((*C.QProcess)(h)) +// UnsafeNewQProcess constructs the type using only unsafe pointers. +func UnsafeNewQProcess(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QProcess { + if h == nil { + return nil + } + + return &QProcess{h: (*C.QProcess)(h), + QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject)} } // NewQProcess constructs a new QProcess object. func NewQProcess() *QProcess { - ret := C.QProcess_new() - return newQProcess(ret) + var outptr_QProcess *C.QProcess = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QProcess_new(&outptr_QProcess, &outptr_QIODevice, &outptr_QObject) + ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQProcess2 constructs a new QProcess object. func NewQProcess2(parent *QObject) *QProcess { - ret := C.QProcess_new2(parent.cPointer()) - return newQProcess(ret) + var outptr_QProcess *C.QProcess = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QProcess_new2(parent.cPointer(), &outptr_QProcess, &outptr_QIODevice, &outptr_QObject) + ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QProcess) MetaObject() *QMetaObject { @@ -338,8 +374,8 @@ func (this *QProcess) StartDetached() bool { return (bool)(C.QProcess_StartDetached(this.h)) } -func (this *QProcess) Open() bool { - return (bool)(C.QProcess_Open(this.h)) +func (this *QProcess) Open(mode QIODevice__OpenModeFlag) bool { + return (bool)(C.QProcess_Open(this.h, (C.int)(mode))) } func (this *QProcess) Program() string { @@ -529,12 +565,12 @@ func (this *QProcess) WaitForStarted() bool { return (bool)(C.QProcess_WaitForStarted(this.h)) } -func (this *QProcess) WaitForReadyRead() bool { - return (bool)(C.QProcess_WaitForReadyRead(this.h)) +func (this *QProcess) WaitForReadyRead(msecs int) bool { + return (bool)(C.QProcess_WaitForReadyRead(this.h, (C.int)(msecs))) } -func (this *QProcess) WaitForBytesWritten() bool { - return (bool)(C.QProcess_WaitForBytesWritten(this.h)) +func (this *QProcess) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QProcess_WaitForBytesWritten(this.h, (C.int)(msecs))) } func (this *QProcess) WaitForFinished() bool { @@ -849,10 +885,6 @@ func (this *QProcess) StartDetached1(pid *int64) bool { return (bool)(C.QProcess_StartDetached1(this.h, (*C.longlong)(unsafe.Pointer(pid)))) } -func (this *QProcess) Open1(mode QIODevice__OpenModeFlag) bool { - return (bool)(C.QProcess_Open1(this.h, (C.int)(mode))) -} - func (this *QProcess) SetStandardOutputFile2(fileName string, mode QIODevice__OpenModeFlag) { fileName_ms := C.struct_miqt_string{} fileName_ms.data = C.CString(fileName) @@ -873,14 +905,6 @@ func (this *QProcess) WaitForStarted1(msecs int) bool { return (bool)(C.QProcess_WaitForStarted1(this.h, (C.int)(msecs))) } -func (this *QProcess) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QProcess_WaitForReadyRead1(this.h, (C.int)(msecs))) -} - -func (this *QProcess) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QProcess_WaitForBytesWritten1(this.h, (C.int)(msecs))) -} - func (this *QProcess) WaitForFinished1(msecs int) bool { return (bool)(C.QProcess_WaitForFinished1(this.h, (C.int)(msecs))) } @@ -907,9 +931,415 @@ func QProcess_StartDetached4(program string, arguments []string, workingDirector return (bool)(C.QProcess_StartDetached4(program_ms, arguments_ma, workingDirectory_ms, (*C.longlong)(unsafe.Pointer(pid)))) } +func (this *QProcess) callVirtualBase_Open(mode QIODevice__OpenModeFlag) bool { + + return (bool)(C.QProcess_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QProcess) OnOpen(slot func(super func(mode QIODevice__OpenModeFlag) bool, mode QIODevice__OpenModeFlag) bool) { + C.QProcess_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Open +func miqt_exec_callback_QProcess_Open(self *C.QProcess, cb C.intptr_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QIODevice__OpenModeFlag) bool, mode QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODevice__OpenModeFlag)(mode) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QProcess_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QProcess) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QProcess_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_WaitForReadyRead +func miqt_exec_callback_QProcess_WaitForReadyRead(self *C.QProcess, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QProcess_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QProcess) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QProcess_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_WaitForBytesWritten +func miqt_exec_callback_QProcess_WaitForBytesWritten(self *C.QProcess, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QProcess_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnBytesAvailable(slot func(super func() int64) int64) { + C.QProcess_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_BytesAvailable +func miqt_exec_callback_QProcess_BytesAvailable(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QProcess_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnBytesToWrite(slot func(super func() int64) int64) { + C.QProcess_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_BytesToWrite +func miqt_exec_callback_QProcess_BytesToWrite(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_IsSequential() bool { + + return (bool)(C.QProcess_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnIsSequential(slot func(super func() bool) bool) { + C.QProcess_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_IsSequential +func miqt_exec_callback_QProcess_IsSequential(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QProcess_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnCanReadLine(slot func(super func() bool) bool) { + C.QProcess_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_CanReadLine +func miqt_exec_callback_QProcess_CanReadLine(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Close() { + + C.QProcess_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QProcess) OnClose(slot func(super func())) { + C.QProcess_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Close +func miqt_exec_callback_QProcess_Close(self *C.QProcess, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProcess{h: self}).callVirtualBase_Close) + +} + +func (this *QProcess) callVirtualBase_AtEnd() bool { + + return (bool)(C.QProcess_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnAtEnd(slot func(super func() bool) bool) { + C.QProcess_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_AtEnd +func miqt_exec_callback_QProcess_AtEnd(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_SetupChildProcess() { + + C.QProcess_virtualbase_SetupChildProcess(unsafe.Pointer(this.h)) + +} +func (this *QProcess) OnSetupChildProcess(slot func(super func())) { + C.QProcess_override_virtual_SetupChildProcess(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_SetupChildProcess +func miqt_exec_callback_QProcess_SetupChildProcess(self *C.QProcess, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProcess{h: self}).callVirtualBase_SetupChildProcess) + +} + +func (this *QProcess) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QProcess_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QProcess) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QProcess_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_ReadData +func miqt_exec_callback_QProcess_ReadData(self *C.QProcess, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QProcess_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QProcess) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QProcess_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_WriteData +func miqt_exec_callback_QProcess_WriteData(self *C.QProcess, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Pos() int64 { + + return (int64)(C.QProcess_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnPos(slot func(super func() int64) int64) { + C.QProcess_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Pos +func miqt_exec_callback_QProcess_Pos(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Size() int64 { + + return (int64)(C.QProcess_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnSize(slot func(super func() int64) int64) { + C.QProcess_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Size +func miqt_exec_callback_QProcess_Size(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QProcess_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QProcess) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QProcess_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Seek +func miqt_exec_callback_QProcess_Seek(self *C.QProcess, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Reset() bool { + + return (bool)(C.QProcess_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnReset(slot func(super func() bool) bool) { + C.QProcess_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Reset +func miqt_exec_callback_QProcess_Reset(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QProcess_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QProcess) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QProcess_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_ReadLineData +func miqt_exec_callback_QProcess_ReadLineData(self *C.QProcess, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QProcess) Delete() { - C.QProcess_Delete(this.h) + C.QProcess_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qprocess.h b/qt/gen_qprocess.h index dd16f854..74276026 100644 --- a/qt/gen_qprocess.h +++ b/qt/gen_qprocess.h @@ -16,20 +16,22 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QIODevice; class QMetaObject; class QObject; class QProcess; class QProcessEnvironment; #else typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QProcess QProcess; typedef struct QProcessEnvironment QProcessEnvironment; #endif -QProcessEnvironment* QProcessEnvironment_new(); -QProcessEnvironment* QProcessEnvironment_new2(QProcessEnvironment* other); +void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment); +void QProcessEnvironment_new2(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment); void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other); void QProcessEnvironment_Swap(QProcessEnvironment* self, QProcessEnvironment* other); bool QProcessEnvironment_OperatorEqual(const QProcessEnvironment* self, QProcessEnvironment* other); @@ -45,10 +47,10 @@ struct miqt_array /* of struct miqt_string */ QProcessEnvironment_Keys(const QP void QProcessEnvironment_InsertWithQProcessEnvironment(QProcessEnvironment* self, QProcessEnvironment* e); QProcessEnvironment* QProcessEnvironment_SystemEnvironment(); struct miqt_string QProcessEnvironment_Value2(const QProcessEnvironment* self, struct miqt_string name, struct miqt_string defaultValue); -void QProcessEnvironment_Delete(QProcessEnvironment* self); +void QProcessEnvironment_Delete(QProcessEnvironment* self, bool isSubclass); -QProcess* QProcess_new(); -QProcess* QProcess_new2(QObject* parent); +void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QProcess_MetaObject(const QProcess* self); void* QProcess_Metacast(QProcess* self, const char* param1); struct miqt_string QProcess_Tr(const char* s); @@ -57,7 +59,7 @@ void QProcess_Start(QProcess* self, struct miqt_string program, struct miqt_arra void QProcess_StartWithCommand(QProcess* self, struct miqt_string command); void QProcess_Start2(QProcess* self); bool QProcess_StartDetached(QProcess* self); -bool QProcess_Open(QProcess* self); +bool QProcess_Open(QProcess* self, int mode); struct miqt_string QProcess_Program(const QProcess* self); void QProcess_SetProgram(QProcess* self, struct miqt_string program); struct miqt_array /* of struct miqt_string */ QProcess_Arguments(const QProcess* self); @@ -87,8 +89,8 @@ int QProcess_State(const QProcess* self); long long QProcess_Pid(const QProcess* self); long long QProcess_ProcessId(const QProcess* self); bool QProcess_WaitForStarted(QProcess* self); -bool QProcess_WaitForReadyRead(QProcess* self); -bool QProcess_WaitForBytesWritten(QProcess* self); +bool QProcess_WaitForReadyRead(QProcess* self, int msecs); +bool QProcess_WaitForBytesWritten(QProcess* self, int msecs); bool QProcess_WaitForFinished(QProcess* self); struct miqt_string QProcess_ReadAllStandardOutput(QProcess* self); struct miqt_string QProcess_ReadAllStandardError(QProcess* self); @@ -117,6 +119,9 @@ void QProcess_ErrorWithError(QProcess* self, int error); void QProcess_connect_ErrorWithError(QProcess* self, intptr_t slot); void QProcess_ErrorOccurred(QProcess* self, int error); void QProcess_connect_ErrorOccurred(QProcess* self, intptr_t slot); +void QProcess_SetupChildProcess(QProcess* self); +long long QProcess_ReadData(QProcess* self, char* data, long long maxlen); +long long QProcess_WriteData(QProcess* self, const char* data, long long lenVal); struct miqt_string QProcess_Tr2(const char* s, const char* c); struct miqt_string QProcess_Tr3(const char* s, const char* c, int n); struct miqt_string QProcess_TrUtf82(const char* s, const char* c); @@ -125,15 +130,46 @@ void QProcess_Start3(QProcess* self, struct miqt_string program, struct miqt_arr void QProcess_Start22(QProcess* self, struct miqt_string command, int mode); void QProcess_Start1(QProcess* self, int mode); bool QProcess_StartDetached1(QProcess* self, long long* pid); -bool QProcess_Open1(QProcess* self, int mode); void QProcess_SetStandardOutputFile2(QProcess* self, struct miqt_string fileName, int mode); void QProcess_SetStandardErrorFile2(QProcess* self, struct miqt_string fileName, int mode); bool QProcess_WaitForStarted1(QProcess* self, int msecs); -bool QProcess_WaitForReadyRead1(QProcess* self, int msecs); -bool QProcess_WaitForBytesWritten1(QProcess* self, int msecs); bool QProcess_WaitForFinished1(QProcess* self, int msecs); bool QProcess_StartDetached4(struct miqt_string program, struct miqt_array /* of struct miqt_string */ arguments, struct miqt_string workingDirectory, long long* pid); -void QProcess_Delete(QProcess* self); +void QProcess_override_virtual_Open(void* self, intptr_t slot); +bool QProcess_virtualbase_Open(void* self, int mode); +void QProcess_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QProcess_virtualbase_WaitForReadyRead(void* self, int msecs); +void QProcess_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QProcess_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QProcess_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QProcess_virtualbase_BytesAvailable(const void* self); +void QProcess_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QProcess_virtualbase_BytesToWrite(const void* self); +void QProcess_override_virtual_IsSequential(void* self, intptr_t slot); +bool QProcess_virtualbase_IsSequential(const void* self); +void QProcess_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QProcess_virtualbase_CanReadLine(const void* self); +void QProcess_override_virtual_Close(void* self, intptr_t slot); +void QProcess_virtualbase_Close(void* self); +void QProcess_override_virtual_AtEnd(void* self, intptr_t slot); +bool QProcess_virtualbase_AtEnd(const void* self); +void QProcess_override_virtual_SetupChildProcess(void* self, intptr_t slot); +void QProcess_virtualbase_SetupChildProcess(void* self); +void QProcess_override_virtual_ReadData(void* self, intptr_t slot); +long long QProcess_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QProcess_override_virtual_WriteData(void* self, intptr_t slot); +long long QProcess_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QProcess_override_virtual_Pos(void* self, intptr_t slot); +long long QProcess_virtualbase_Pos(const void* self); +void QProcess_override_virtual_Size(void* self, intptr_t slot); +long long QProcess_virtualbase_Size(const void* self); +void QProcess_override_virtual_Seek(void* self, intptr_t slot); +bool QProcess_virtualbase_Seek(void* self, long long pos); +void QProcess_override_virtual_Reset(void* self, intptr_t slot); +bool QProcess_virtualbase_Reset(void* self); +void QProcess_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QProcess_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QProcess_Delete(QProcess* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qprogressbar.cpp b/qt/gen_qprogressbar.cpp index 9cff8408..8045c682 100644 --- a/qt/gen_qprogressbar.cpp +++ b/qt/gen_qprogressbar.cpp @@ -1,20 +1,1069 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qprogressbar.h" #include "_cgo_export.h" -QProgressBar* QProgressBar_new(QWidget* parent) { - return new QProgressBar(parent); +class MiqtVirtualQProgressBar : public virtual QProgressBar { +public: + + MiqtVirtualQProgressBar(QWidget* parent): QProgressBar(parent) {}; + MiqtVirtualQProgressBar(): QProgressBar() {}; + + virtual ~MiqtVirtualQProgressBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Text = 0; + + // Subclass to allow providing a Go implementation + virtual QString text() const override { + if (handle__Text == 0) { + return QProgressBar::text(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QProgressBar_Text(const_cast(this), handle__Text); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Text() const { + + QString _ret = QProgressBar::text(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QProgressBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QProgressBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QProgressBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QProgressBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QProgressBar::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QProgressBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QProgressBar::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QProgressBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QProgressBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QProgressBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QProgressBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QProgressBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QProgressBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QProgressBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QProgressBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QProgressBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QProgressBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QProgressBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QProgressBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QProgressBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QProgressBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QProgressBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QProgressBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QProgressBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QProgressBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QProgressBar::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QProgressBar::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QProgressBar::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QProgressBar::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QProgressBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QProgressBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QProgressBar::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QProgressBar::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QProgressBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QProgressBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QProgressBar::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QProgressBar::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QProgressBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QProgressBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QProgressBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QProgressBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QProgressBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QProgressBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QProgressBar::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QProgressBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QProgressBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QProgressBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QProgressBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QProgressBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QProgressBar::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QProgressBar::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QProgressBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QProgressBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QProgressBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QProgressBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QProgressBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QProgressBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QProgressBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QProgressBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QProgressBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QProgressBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QProgressBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QProgressBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QProgressBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QProgressBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QProgressBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QProgressBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QProgressBar::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QProgressBar::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QProgressBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QProgressBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QProgressBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QProgressBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QProgressBar::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QProgressBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QProgressBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QProgressBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QProgressBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QProgressBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QProgressBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QProgressBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QProgressBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QProgressBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QProgressBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QProgressBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QProgressBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QProgressBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QProgressBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QProgressBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QProgressBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QProgressBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QProgressBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QProgressBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QProgressBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QProgressBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QProgressBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QProgressBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QProgressBar::focusNextPrevChild(next); + + } + +}; + +void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(parent); + *outptr_QProgressBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressBar* QProgressBar_new2() { - return new QProgressBar(); +void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(); + *outptr_QProgressBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QProgressBar_MetaObject(const QProgressBar* self) { @@ -166,7 +1215,7 @@ void QProgressBar_ValueChanged(QProgressBar* self, int value) { } void QProgressBar_connect_ValueChanged(QProgressBar* self, intptr_t slot) { - QProgressBar::connect(self, static_cast(&QProgressBar::valueChanged), self, [=](int value) { + MiqtVirtualQProgressBar::connect(self, static_cast(&QProgressBar::valueChanged), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QProgressBar_ValueChanged(slot, sigval1); }); @@ -216,7 +1265,347 @@ struct miqt_string QProgressBar_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QProgressBar_Delete(QProgressBar* self) { - delete self; +void QProgressBar_override_virtual_Text(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Text = slot; +} + +struct miqt_string QProgressBar_virtualbase_Text(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_Text(); +} + +void QProgressBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QProgressBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_SizeHint(); +} + +void QProgressBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QProgressBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QProgressBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Event = slot; +} + +bool QProgressBar_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_Event(e); +} + +void QProgressBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__PaintEvent = slot; +} + +void QProgressBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QProgressBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DevType = slot; +} + +int QProgressBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_DevType(); +} + +void QProgressBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__SetVisible = slot; +} + +void QProgressBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QProgressBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__HeightForWidth = slot; +} + +int QProgressBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QProgressBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QProgressBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QProgressBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QProgressBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_PaintEngine(); +} + +void QProgressBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MousePressEvent = slot; +} + +void QProgressBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MousePressEvent(event); +} + +void QProgressBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QProgressBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QProgressBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QProgressBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QProgressBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QProgressBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QProgressBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__WheelEvent = slot; +} + +void QProgressBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QProgressBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QProgressBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QProgressBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QProgressBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QProgressBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__FocusInEvent = slot; +} + +void QProgressBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QProgressBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QProgressBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QProgressBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__EnterEvent = slot; +} + +void QProgressBar_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QProgressBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__LeaveEvent = slot; +} + +void QProgressBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QProgressBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MoveEvent = slot; +} + +void QProgressBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QProgressBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ResizeEvent = slot; +} + +void QProgressBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ResizeEvent(event); +} + +void QProgressBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__CloseEvent = slot; +} + +void QProgressBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QProgressBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QProgressBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QProgressBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__TabletEvent = slot; +} + +void QProgressBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QProgressBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ActionEvent = slot; +} + +void QProgressBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QProgressBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QProgressBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QProgressBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QProgressBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QProgressBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QProgressBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QProgressBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DropEvent = slot; +} + +void QProgressBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DropEvent(event); +} + +void QProgressBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ShowEvent = slot; +} + +void QProgressBar_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ShowEvent(event); +} + +void QProgressBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__HideEvent = slot; +} + +void QProgressBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_HideEvent(event); +} + +void QProgressBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__NativeEvent = slot; +} + +bool QProgressBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QProgressBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ChangeEvent = slot; +} + +void QProgressBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QProgressBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Metric = slot; +} + +int QProgressBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_Metric(param1); +} + +void QProgressBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InitPainter = slot; +} + +void QProgressBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QProgressBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QProgressBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_Redirected(offset); +} + +void QProgressBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QProgressBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_SharedPainter(); +} + +void QProgressBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QProgressBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QProgressBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QProgressBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QProgressBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QProgressBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QProgressBar_Delete(QProgressBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qprogressbar.go b/qt/gen_qprogressbar.go index 505a265b..01e315d3 100644 --- a/qt/gen_qprogressbar.go +++ b/qt/gen_qprogressbar.go @@ -22,7 +22,8 @@ const ( ) type QProgressBar struct { - h *C.QProgressBar + h *C.QProgressBar + isSubclass bool *QWidget } @@ -40,27 +41,49 @@ func (this *QProgressBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProgressBar(h *C.QProgressBar) *QProgressBar { +// newQProgressBar constructs the type using only CGO pointers. +func newQProgressBar(h *C.QProgressBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressBar { if h == nil { return nil } - return &QProgressBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QProgressBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQProgressBar(h unsafe.Pointer) *QProgressBar { - return newQProgressBar((*C.QProgressBar)(h)) +// UnsafeNewQProgressBar constructs the type using only unsafe pointers. +func UnsafeNewQProgressBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressBar { + if h == nil { + return nil + } + + return &QProgressBar{h: (*C.QProgressBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQProgressBar constructs a new QProgressBar object. func NewQProgressBar(parent *QWidget) *QProgressBar { - ret := C.QProgressBar_new(parent.cPointer()) - return newQProgressBar(ret) + var outptr_QProgressBar *C.QProgressBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressBar_new(parent.cPointer(), &outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressBar2 constructs a new QProgressBar object. func NewQProgressBar2() *QProgressBar { - ret := C.QProgressBar_new2() - return newQProgressBar(ret) + var outptr_QProgressBar *C.QProgressBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressBar_new2(&outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QProgressBar) MetaObject() *QMetaObject { @@ -267,9 +290,1003 @@ func QProgressBar_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QProgressBar) callVirtualBase_Text() string { + + var _ms C.struct_miqt_string = C.QProgressBar_virtualbase_Text(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QProgressBar) OnText(slot func(super func() string) string) { + C.QProgressBar_override_virtual_Text(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Text +func miqt_exec_callback_QProgressBar_Text(self *C.QProgressBar, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Text) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QProgressBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QProgressBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_SizeHint +func miqt_exec_callback_QProgressBar_SizeHint(self *C.QProgressBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QProgressBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MinimumSizeHint +func miqt_exec_callback_QProgressBar_MinimumSizeHint(self *C.QProgressBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QProgressBar_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QProgressBar) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QProgressBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Event +func miqt_exec_callback_QProgressBar_Event(self *C.QProgressBar, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QProgressBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QProgressBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_PaintEvent +func miqt_exec_callback_QProgressBar_PaintEvent(self *C.QProgressBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DevType() int { + + return (int)(C.QProgressBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QProgressBar) OnDevType(slot func(super func() int) int) { + C.QProgressBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DevType +func miqt_exec_callback_QProgressBar_DevType(self *C.QProgressBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_SetVisible(visible bool) { + + C.QProgressBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QProgressBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QProgressBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_SetVisible +func miqt_exec_callback_QProgressBar_SetVisible(self *C.QProgressBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QProgressBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QProgressBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QProgressBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QProgressBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_HeightForWidth +func miqt_exec_callback_QProgressBar_HeightForWidth(self *C.QProgressBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QProgressBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QProgressBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QProgressBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_HasHeightForWidth +func miqt_exec_callback_QProgressBar_HasHeightForWidth(self *C.QProgressBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QProgressBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QProgressBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QProgressBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_PaintEngine +func miqt_exec_callback_QProgressBar_PaintEngine(self *C.QProgressBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MousePressEvent +func miqt_exec_callback_QProgressBar_MousePressEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MouseReleaseEvent +func miqt_exec_callback_QProgressBar_MouseReleaseEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MouseDoubleClickEvent +func miqt_exec_callback_QProgressBar_MouseDoubleClickEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MouseMoveEvent +func miqt_exec_callback_QProgressBar_MouseMoveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QProgressBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QProgressBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_WheelEvent +func miqt_exec_callback_QProgressBar_WheelEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QProgressBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QProgressBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_KeyPressEvent +func miqt_exec_callback_QProgressBar_KeyPressEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QProgressBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QProgressBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_KeyReleaseEvent +func miqt_exec_callback_QProgressBar_KeyReleaseEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QProgressBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QProgressBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_FocusInEvent +func miqt_exec_callback_QProgressBar_FocusInEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QProgressBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QProgressBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_FocusOutEvent +func miqt_exec_callback_QProgressBar_FocusOutEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_EnterEvent(event *QEvent) { + + C.QProgressBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QProgressBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_EnterEvent +func miqt_exec_callback_QProgressBar_EnterEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QProgressBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QProgressBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_LeaveEvent +func miqt_exec_callback_QProgressBar_LeaveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QProgressBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QProgressBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MoveEvent +func miqt_exec_callback_QProgressBar_MoveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QProgressBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QProgressBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ResizeEvent +func miqt_exec_callback_QProgressBar_ResizeEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QProgressBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QProgressBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_CloseEvent +func miqt_exec_callback_QProgressBar_CloseEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QProgressBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QProgressBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ContextMenuEvent +func miqt_exec_callback_QProgressBar_ContextMenuEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QProgressBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QProgressBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_TabletEvent +func miqt_exec_callback_QProgressBar_TabletEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QProgressBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QProgressBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ActionEvent +func miqt_exec_callback_QProgressBar_ActionEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QProgressBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QProgressBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DragEnterEvent +func miqt_exec_callback_QProgressBar_DragEnterEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QProgressBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QProgressBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DragMoveEvent +func miqt_exec_callback_QProgressBar_DragMoveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QProgressBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QProgressBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DragLeaveEvent +func miqt_exec_callback_QProgressBar_DragLeaveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QProgressBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QProgressBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DropEvent +func miqt_exec_callback_QProgressBar_DropEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QProgressBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QProgressBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ShowEvent +func miqt_exec_callback_QProgressBar_ShowEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QProgressBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QProgressBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_HideEvent +func miqt_exec_callback_QProgressBar_HideEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QProgressBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QProgressBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QProgressBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_NativeEvent +func miqt_exec_callback_QProgressBar_NativeEvent(self *C.QProgressBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QProgressBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QProgressBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ChangeEvent +func miqt_exec_callback_QProgressBar_ChangeEvent(self *C.QProgressBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QProgressBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QProgressBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QProgressBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Metric +func miqt_exec_callback_QProgressBar_Metric(self *C.QProgressBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QProgressBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QProgressBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QProgressBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InitPainter +func miqt_exec_callback_QProgressBar_InitPainter(self *C.QProgressBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QProgressBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QProgressBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QProgressBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Redirected +func miqt_exec_callback_QProgressBar_Redirected(self *C.QProgressBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QProgressBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QProgressBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QProgressBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_SharedPainter +func miqt_exec_callback_QProgressBar_SharedPainter(self *C.QProgressBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QProgressBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QProgressBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InputMethodEvent +func miqt_exec_callback_QProgressBar_InputMethodEvent(self *C.QProgressBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QProgressBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QProgressBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InputMethodQuery +func miqt_exec_callback_QProgressBar_InputMethodQuery(self *C.QProgressBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QProgressBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QProgressBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QProgressBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_FocusNextPrevChild +func miqt_exec_callback_QProgressBar_FocusNextPrevChild(self *C.QProgressBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QProgressBar) Delete() { - C.QProgressBar_Delete(this.h) + C.QProgressBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qprogressbar.h b/qt/gen_qprogressbar.h index d6094207..0fd31489 100644 --- a/qt/gen_qprogressbar.h +++ b/qt/gen_qprogressbar.h @@ -15,19 +15,71 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QProgressBar; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QProgressBar QProgressBar; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QProgressBar* QProgressBar_new(QWidget* parent); -QProgressBar* QProgressBar_new2(); +void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QProgressBar_MetaObject(const QProgressBar* self); void* QProgressBar_Metacast(QProgressBar* self, const char* param1); struct miqt_string QProgressBar_Tr(const char* s); @@ -58,11 +110,97 @@ void QProgressBar_SetValue(QProgressBar* self, int value); void QProgressBar_SetOrientation(QProgressBar* self, int orientation); void QProgressBar_ValueChanged(QProgressBar* self, int value); void QProgressBar_connect_ValueChanged(QProgressBar* self, intptr_t slot); +bool QProgressBar_Event(QProgressBar* self, QEvent* e); +void QProgressBar_PaintEvent(QProgressBar* self, QPaintEvent* param1); struct miqt_string QProgressBar_Tr2(const char* s, const char* c); struct miqt_string QProgressBar_Tr3(const char* s, const char* c, int n); struct miqt_string QProgressBar_TrUtf82(const char* s, const char* c); struct miqt_string QProgressBar_TrUtf83(const char* s, const char* c, int n); -void QProgressBar_Delete(QProgressBar* self); +void QProgressBar_override_virtual_Text(void* self, intptr_t slot); +struct miqt_string QProgressBar_virtualbase_Text(const void* self); +void QProgressBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QProgressBar_virtualbase_SizeHint(const void* self); +void QProgressBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QProgressBar_virtualbase_MinimumSizeHint(const void* self); +void QProgressBar_override_virtual_Event(void* self, intptr_t slot); +bool QProgressBar_virtualbase_Event(void* self, QEvent* e); +void QProgressBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QProgressBar_override_virtual_DevType(void* self, intptr_t slot); +int QProgressBar_virtualbase_DevType(const void* self); +void QProgressBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QProgressBar_virtualbase_SetVisible(void* self, bool visible); +void QProgressBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QProgressBar_virtualbase_HeightForWidth(const void* self, int param1); +void QProgressBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QProgressBar_virtualbase_HasHeightForWidth(const void* self); +void QProgressBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QProgressBar_virtualbase_PaintEngine(const void* self); +void QProgressBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QProgressBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QProgressBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QProgressBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QProgressBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QProgressBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_EnterEvent(void* self, QEvent* event); +void QProgressBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QProgressBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QProgressBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QProgressBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QProgressBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QProgressBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QProgressBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QProgressBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QProgressBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QProgressBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QProgressBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QProgressBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QProgressBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QProgressBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QProgressBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QProgressBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QProgressBar_override_virtual_Metric(void* self, intptr_t slot); +int QProgressBar_virtualbase_Metric(const void* self, int param1); +void QProgressBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QProgressBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QProgressBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QProgressBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QProgressBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QProgressBar_virtualbase_SharedPainter(const void* self); +void QProgressBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QProgressBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QProgressBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QProgressBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QProgressBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QProgressBar_Delete(QProgressBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qprogressdialog.cpp b/qt/gen_qprogressdialog.cpp index 40150f0e..bc478459 100644 --- a/qt/gen_qprogressdialog.cpp +++ b/qt/gen_qprogressdialog.cpp @@ -1,8 +1,17 @@ +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include +#include +#include #include #include #include @@ -12,34 +21,429 @@ #include "gen_qprogressdialog.h" #include "_cgo_export.h" -QProgressDialog* QProgressDialog_new(QWidget* parent) { - return new QProgressDialog(parent); +class MiqtVirtualQProgressDialog : public virtual QProgressDialog { +public: + + MiqtVirtualQProgressDialog(QWidget* parent): QProgressDialog(parent) {}; + MiqtVirtualQProgressDialog(): QProgressDialog() {}; + MiqtVirtualQProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum): QProgressDialog(labelText, cancelButtonText, minimum, maximum) {}; + MiqtVirtualQProgressDialog(QWidget* parent, Qt::WindowFlags flags): QProgressDialog(parent, flags) {}; + MiqtVirtualQProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum, QWidget* parent): QProgressDialog(labelText, cancelButtonText, minimum, maximum, parent) {}; + MiqtVirtualQProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum, QWidget* parent, Qt::WindowFlags flags): QProgressDialog(labelText, cancelButtonText, minimum, maximum, parent, flags) {}; + + virtual ~MiqtVirtualQProgressDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QProgressDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QProgressDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QProgressDialog::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QProgressDialog::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QProgressDialog::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QProgressDialog::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QProgressDialog::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QProgressDialog::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QProgressDialog::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QProgressDialog::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QProgressDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QProgressDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QProgressDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QProgressDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QProgressDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QProgressDialog::open(); + return; + } + + + miqt_exec_callback_QProgressDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QProgressDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QProgressDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QProgressDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QProgressDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QProgressDialog::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QProgressDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QProgressDialog::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QProgressDialog::accept(); + return; + } + + + miqt_exec_callback_QProgressDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QProgressDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QProgressDialog::reject(); + return; + } + + + miqt_exec_callback_QProgressDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QProgressDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QProgressDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QProgressDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QProgressDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QProgressDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QProgressDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QProgressDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QProgressDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QProgressDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QProgressDialog::eventFilter(param1, param2); + + } + +}; + +void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new2() { - return new QProgressDialog(); +void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum) { +void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - return new QProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags) { - return new QProgressDialog(parent, static_cast(flags)); +void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent, static_cast(flags)); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent) { +void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - return new QProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags) { +void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - return new QProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self) { @@ -178,7 +582,7 @@ void QProgressDialog_Canceled(QProgressDialog* self) { } void QProgressDialog_connect_Canceled(QProgressDialog* self, intptr_t slot) { - QProgressDialog::connect(self, static_cast(&QProgressDialog::canceled), self, [=]() { + MiqtVirtualQProgressDialog::connect(self, static_cast(&QProgressDialog::canceled), self, [=]() { miqt_exec_callback_QProgressDialog_Canceled(slot); }); } @@ -227,7 +631,131 @@ struct miqt_string QProgressDialog_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QProgressDialog_Delete(QProgressDialog* self) { - delete self; +void QProgressDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QProgressDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQProgressDialog*)(self) )->virtualbase_SizeHint(); +} + +void QProgressDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QProgressDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ResizeEvent(event); +} + +void QProgressDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__CloseEvent = slot; +} + +void QProgressDialog_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_CloseEvent(event); +} + +void QProgressDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QProgressDialog_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ChangeEvent(event); +} + +void QProgressDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ShowEvent = slot; +} + +void QProgressDialog_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ShowEvent(event); +} + +void QProgressDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__SetVisible = slot; +} + +void QProgressDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QProgressDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QProgressDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQProgressDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QProgressDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Open = slot; +} + +void QProgressDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Open(); +} + +void QProgressDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Exec = slot; +} + +int QProgressDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Exec(); +} + +void QProgressDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Done = slot; +} + +void QProgressDialog_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Done(param1); +} + +void QProgressDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Accept = slot; +} + +void QProgressDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Accept(); +} + +void QProgressDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Reject = slot; +} + +void QProgressDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Reject(); +} + +void QProgressDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QProgressDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QProgressDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QProgressDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QProgressDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__EventFilter = slot; +} + +bool QProgressDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QProgressDialog_Delete(QProgressDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qprogressdialog.go b/qt/gen_qprogressdialog.go index 35d330e3..6294a3ca 100644 --- a/qt/gen_qprogressdialog.go +++ b/qt/gen_qprogressdialog.go @@ -15,7 +15,8 @@ import ( ) type QProgressDialog struct { - h *C.QProgressDialog + h *C.QProgressDialog + isSubclass bool *QDialog } @@ -33,27 +34,51 @@ func (this *QProgressDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProgressDialog(h *C.QProgressDialog) *QProgressDialog { +// newQProgressDialog constructs the type using only CGO pointers. +func newQProgressDialog(h *C.QProgressDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressDialog { if h == nil { return nil } - return &QProgressDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QProgressDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQProgressDialog(h unsafe.Pointer) *QProgressDialog { - return newQProgressDialog((*C.QProgressDialog)(h)) +// UnsafeNewQProgressDialog constructs the type using only unsafe pointers. +func UnsafeNewQProgressDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressDialog { + if h == nil { + return nil + } + + return &QProgressDialog{h: (*C.QProgressDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQProgressDialog constructs a new QProgressDialog object. func NewQProgressDialog(parent *QWidget) *QProgressDialog { - ret := C.QProgressDialog_new(parent.cPointer()) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new(parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog2 constructs a new QProgressDialog object. func NewQProgressDialog2() *QProgressDialog { - ret := C.QProgressDialog_new2() - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new2(&outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog3 constructs a new QProgressDialog object. @@ -66,14 +91,30 @@ func NewQProgressDialog3(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - ret := C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum)) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog4 constructs a new QProgressDialog object. func NewQProgressDialog4(parent *QWidget, flags WindowType) *QProgressDialog { - ret := C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags)) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog5 constructs a new QProgressDialog object. @@ -86,8 +127,16 @@ func NewQProgressDialog5(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - ret := C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer()) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog6 constructs a new QProgressDialog object. @@ -100,8 +149,16 @@ func NewQProgressDialog6(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - ret := C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags)) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QProgressDialog) MetaObject() *QMetaObject { @@ -299,9 +356,351 @@ func QProgressDialog_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QProgressDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QProgressDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_SizeHint +func miqt_exec_callback_QProgressDialog_SizeHint(self *C.QProgressDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressDialog) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QProgressDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QProgressDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ResizeEvent +func miqt_exec_callback_QProgressDialog_ResizeEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QProgressDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QProgressDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_CloseEvent +func miqt_exec_callback_QProgressDialog_CloseEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QProgressDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QProgressDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ChangeEvent +func miqt_exec_callback_QProgressDialog_ChangeEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QProgressDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QProgressDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ShowEvent +func miqt_exec_callback_QProgressDialog_ShowEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_SetVisible(visible bool) { + + C.QProgressDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QProgressDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QProgressDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_SetVisible +func miqt_exec_callback_QProgressDialog_SetVisible(self *C.QProgressDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QProgressDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_MinimumSizeHint +func miqt_exec_callback_QProgressDialog_MinimumSizeHint(self *C.QProgressDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressDialog) callVirtualBase_Open() { + + C.QProgressDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QProgressDialog) OnOpen(slot func(super func())) { + C.QProgressDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Open +func miqt_exec_callback_QProgressDialog_Open(self *C.QProgressDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QProgressDialog) callVirtualBase_Exec() int { + + return (int)(C.QProgressDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QProgressDialog) OnExec(slot func(super func() int) int) { + C.QProgressDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Exec +func miqt_exec_callback_QProgressDialog_Exec(self *C.QProgressDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressDialog) callVirtualBase_Done(param1 int) { + + C.QProgressDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QProgressDialog) OnDone(slot func(super func(param1 int), param1 int)) { + C.QProgressDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Done +func miqt_exec_callback_QProgressDialog_Done(self *C.QProgressDialog, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_Accept() { + + C.QProgressDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QProgressDialog) OnAccept(slot func(super func())) { + C.QProgressDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Accept +func miqt_exec_callback_QProgressDialog_Accept(self *C.QProgressDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QProgressDialog) callVirtualBase_Reject() { + + C.QProgressDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QProgressDialog) OnReject(slot func(super func())) { + C.QProgressDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Reject +func miqt_exec_callback_QProgressDialog_Reject(self *C.QProgressDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QProgressDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QProgressDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QProgressDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_KeyPressEvent +func miqt_exec_callback_QProgressDialog_KeyPressEvent(self *C.QProgressDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QProgressDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QProgressDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ContextMenuEvent +func miqt_exec_callback_QProgressDialog_ContextMenuEvent(self *C.QProgressDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QProgressDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QProgressDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QProgressDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_EventFilter +func miqt_exec_callback_QProgressDialog_EventFilter(self *C.QProgressDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QProgressDialog) Delete() { - C.QProgressDialog_Delete(this.h) + C.QProgressDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qprogressdialog.h b/qt/gen_qprogressdialog.h index 4f29a071..a82045ef 100644 --- a/qt/gen_qprogressdialog.h +++ b/qt/gen_qprogressdialog.h @@ -15,29 +15,47 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QLabel; class QMetaObject; +class QObject; +class QPaintDevice; class QProgressBar; class QProgressDialog; class QPushButton; +class QResizeEvent; +class QShowEvent; class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLabel QLabel; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QProgressBar QProgressBar; typedef struct QProgressDialog QProgressDialog; typedef struct QPushButton QPushButton; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QProgressDialog* QProgressDialog_new(QWidget* parent); -QProgressDialog* QProgressDialog_new2(); -QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum); -QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags); -QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent); -QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags); +void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self); void* QProgressDialog_Metacast(QProgressDialog* self, const char* param1); struct miqt_string QProgressDialog_Tr(const char* s); @@ -67,11 +85,45 @@ void QProgressDialog_SetCancelButtonText(QProgressDialog* self, struct miqt_stri void QProgressDialog_SetMinimumDuration(QProgressDialog* self, int ms); void QProgressDialog_Canceled(QProgressDialog* self); void QProgressDialog_connect_Canceled(QProgressDialog* self, intptr_t slot); +void QProgressDialog_ResizeEvent(QProgressDialog* self, QResizeEvent* event); +void QProgressDialog_CloseEvent(QProgressDialog* self, QCloseEvent* event); +void QProgressDialog_ChangeEvent(QProgressDialog* self, QEvent* event); +void QProgressDialog_ShowEvent(QProgressDialog* self, QShowEvent* event); struct miqt_string QProgressDialog_Tr2(const char* s, const char* c); struct miqt_string QProgressDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QProgressDialog_TrUtf82(const char* s, const char* c); struct miqt_string QProgressDialog_TrUtf83(const char* s, const char* c, int n); -void QProgressDialog_Delete(QProgressDialog* self); +void QProgressDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QProgressDialog_virtualbase_SizeHint(const void* self); +void QProgressDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QProgressDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QProgressDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ChangeEvent(void* self, QEvent* event); +void QProgressDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QProgressDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QProgressDialog_virtualbase_SetVisible(void* self, bool visible); +void QProgressDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QProgressDialog_virtualbase_MinimumSizeHint(const void* self); +void QProgressDialog_override_virtual_Open(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Open(void* self); +void QProgressDialog_override_virtual_Exec(void* self, intptr_t slot); +int QProgressDialog_virtualbase_Exec(void* self); +void QProgressDialog_override_virtual_Done(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Done(void* self, int param1); +void QProgressDialog_override_virtual_Accept(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Accept(void* self); +void QProgressDialog_override_virtual_Reject(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Reject(void* self); +void QProgressDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QProgressDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QProgressDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QProgressDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QProgressDialog_Delete(QProgressDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpropertyanimation.cpp b/qt/gen_qpropertyanimation.cpp index 98afeafe..fe22f3cd 100644 --- a/qt/gen_qpropertyanimation.cpp +++ b/qt/gen_qpropertyanimation.cpp @@ -1,30 +1,214 @@ +#include #include +#include #include #include #include #include #include #include +#include +#include #include #include "gen_qpropertyanimation.h" #include "_cgo_export.h" -QPropertyAnimation* QPropertyAnimation_new() { - return new QPropertyAnimation(); +class MiqtVirtualQPropertyAnimation : public virtual QPropertyAnimation { +public: + + MiqtVirtualQPropertyAnimation(): QPropertyAnimation() {}; + MiqtVirtualQPropertyAnimation(QObject* target, const QByteArray& propertyName): QPropertyAnimation(target, propertyName) {}; + MiqtVirtualQPropertyAnimation(QObject* parent): QPropertyAnimation(parent) {}; + MiqtVirtualQPropertyAnimation(QObject* target, const QByteArray& propertyName, QObject* parent): QPropertyAnimation(target, propertyName, parent) {}; + + virtual ~MiqtVirtualQPropertyAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPropertyAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPropertyAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPropertyAnimation::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentValue = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentValue(const QVariant& value) override { + if (handle__UpdateCurrentValue == 0) { + QPropertyAnimation::updateCurrentValue(value); + return; + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + + miqt_exec_callback_QPropertyAnimation_UpdateCurrentValue(this, handle__UpdateCurrentValue, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentValue(QVariant* value) { + + QPropertyAnimation::updateCurrentValue(*value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QPropertyAnimation::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QPropertyAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QPropertyAnimation::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QPropertyAnimation::duration(); + } + + + int callback_return_value = miqt_exec_callback_QPropertyAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QPropertyAnimation::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QPropertyAnimation::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QPropertyAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QPropertyAnimation::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Interpolated = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant interpolated(const QVariant& from, const QVariant& to, qreal progress) const override { + if (handle__Interpolated == 0) { + return QPropertyAnimation::interpolated(from, to, progress); + } + + const QVariant& from_ret = from; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&from_ret); + const QVariant& to_ret = to; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&to_ret); + qreal progress_ret = progress; + double sigval3 = static_cast(progress_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPropertyAnimation_Interpolated(const_cast(this), handle__Interpolated, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Interpolated(QVariant* from, QVariant* to, double progress) const { + + return new QVariant(QPropertyAnimation::interpolated(*from, *to, static_cast(progress))); + + } + +}; + +void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName) { +void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - return new QPropertyAnimation(target, propertyName_QByteArray); + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPropertyAnimation* QPropertyAnimation_new3(QObject* parent) { - return new QPropertyAnimation(parent); +void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(parent); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent) { +void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - return new QPropertyAnimation(target, propertyName_QByteArray, parent); + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray, parent); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self) { @@ -123,7 +307,59 @@ struct miqt_string QPropertyAnimation_TrUtf83(const char* s, const char* c, int return _ms; } -void QPropertyAnimation_Delete(QPropertyAnimation* self) { - delete self; +void QPropertyAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__Event = slot; +} + +bool QPropertyAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_Event(event); +} + +void QPropertyAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__UpdateCurrentValue = slot; +} + +void QPropertyAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value) { + ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_UpdateCurrentValue(value); +} + +void QPropertyAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__UpdateState = slot; +} + +void QPropertyAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QPropertyAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__Duration = slot; +} + +int QPropertyAnimation_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_Duration(); +} + +void QPropertyAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QPropertyAnimation_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QPropertyAnimation_override_virtual_Interpolated(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__Interpolated = slot; +} + +QVariant* QPropertyAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress) { + return ( (const MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_Interpolated(from, to, progress); +} + +void QPropertyAnimation_Delete(QPropertyAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpropertyanimation.go b/qt/gen_qpropertyanimation.go index 223cabe2..6d62a566 100644 --- a/qt/gen_qpropertyanimation.go +++ b/qt/gen_qpropertyanimation.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPropertyAnimation struct { - h *C.QPropertyAnimation + h *C.QPropertyAnimation + isSubclass bool *QVariantAnimation } @@ -32,21 +34,36 @@ func (this *QPropertyAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPropertyAnimation(h *C.QPropertyAnimation) *QPropertyAnimation { +// newQPropertyAnimation constructs the type using only CGO pointers. +func newQPropertyAnimation(h *C.QPropertyAnimation, h_QVariantAnimation *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPropertyAnimation { if h == nil { return nil } - return &QPropertyAnimation{h: h, QVariantAnimation: UnsafeNewQVariantAnimation(unsafe.Pointer(h))} + return &QPropertyAnimation{h: h, + QVariantAnimation: newQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQPropertyAnimation(h unsafe.Pointer) *QPropertyAnimation { - return newQPropertyAnimation((*C.QPropertyAnimation)(h)) +// UnsafeNewQPropertyAnimation constructs the type using only unsafe pointers. +func UnsafeNewQPropertyAnimation(h unsafe.Pointer, h_QVariantAnimation unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPropertyAnimation { + if h == nil { + return nil + } + + return &QPropertyAnimation{h: (*C.QPropertyAnimation)(h), + QVariantAnimation: UnsafeNewQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} } // NewQPropertyAnimation constructs a new QPropertyAnimation object. func NewQPropertyAnimation() *QPropertyAnimation { - ret := C.QPropertyAnimation_new() - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new(&outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPropertyAnimation2 constructs a new QPropertyAnimation object. @@ -54,14 +71,28 @@ func NewQPropertyAnimation2(target *QObject, propertyName []byte) *QPropertyAnim propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - ret := C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias) - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias, &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPropertyAnimation3 constructs a new QPropertyAnimation object. func NewQPropertyAnimation3(parent *QObject) *QPropertyAnimation { - ret := C.QPropertyAnimation_new3(parent.cPointer()) - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new3(parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPropertyAnimation4 constructs a new QPropertyAnimation object. @@ -69,8 +100,15 @@ func NewQPropertyAnimation4(target *QObject, propertyName []byte, parent *QObjec propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - ret := C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer()) - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPropertyAnimation) MetaObject() *QMetaObject { @@ -167,9 +205,157 @@ func QPropertyAnimation_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPropertyAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPropertyAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPropertyAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPropertyAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_Event +func miqt_exec_callback_QPropertyAnimation_Event(self *C.QPropertyAnimation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPropertyAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPropertyAnimation) callVirtualBase_UpdateCurrentValue(value *QVariant) { + + C.QPropertyAnimation_virtualbase_UpdateCurrentValue(unsafe.Pointer(this.h), value.cPointer()) + +} +func (this *QPropertyAnimation) OnUpdateCurrentValue(slot func(super func(value *QVariant), value *QVariant)) { + C.QPropertyAnimation_override_virtual_UpdateCurrentValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_UpdateCurrentValue +func miqt_exec_callback_QPropertyAnimation_UpdateCurrentValue(self *C.QPropertyAnimation, cb C.intptr_t, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant), value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QPropertyAnimation{h: self}).callVirtualBase_UpdateCurrentValue, slotval1) + +} + +func (this *QPropertyAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QPropertyAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QPropertyAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QPropertyAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_UpdateState +func miqt_exec_callback_QPropertyAnimation_UpdateState(self *C.QPropertyAnimation, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QPropertyAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QPropertyAnimation) callVirtualBase_Duration() int { + + return (int)(C.QPropertyAnimation_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QPropertyAnimation) OnDuration(slot func(super func() int) int) { + C.QPropertyAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_Duration +func miqt_exec_callback_QPropertyAnimation_Duration(self *C.QPropertyAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPropertyAnimation{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QPropertyAnimation) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QPropertyAnimation_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QPropertyAnimation) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QPropertyAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_UpdateCurrentTime +func miqt_exec_callback_QPropertyAnimation_UpdateCurrentTime(self *C.QPropertyAnimation, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QPropertyAnimation{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QPropertyAnimation) callVirtualBase_Interpolated(from *QVariant, to *QVariant, progress float64) *QVariant { + + _ret := C.QPropertyAnimation_virtualbase_Interpolated(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.double)(progress)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPropertyAnimation) OnInterpolated(slot func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) { + C.QPropertyAnimation_override_virtual_Interpolated(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_Interpolated +func miqt_exec_callback_QPropertyAnimation_Interpolated(self *C.QPropertyAnimation, cb C.intptr_t, from *C.QVariant, to *C.QVariant, progress C.double) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(from)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(to)) + slotval3 := (float64)(progress) + + virtualReturn := gofunc((&QPropertyAnimation{h: self}).callVirtualBase_Interpolated, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QPropertyAnimation) Delete() { - C.QPropertyAnimation_Delete(this.h) + C.QPropertyAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpropertyanimation.h b/qt/gen_qpropertyanimation.h index e1ca79b7..89accb30 100644 --- a/qt/gen_qpropertyanimation.h +++ b/qt/gen_qpropertyanimation.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; class QByteArray; +class QEvent; class QMetaObject; class QObject; class QPropertyAnimation; +class QVariant; +class QVariantAnimation; #else +typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QByteArray QByteArray; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPropertyAnimation QPropertyAnimation; +typedef struct QVariant QVariant; +typedef struct QVariantAnimation QVariantAnimation; #endif -QPropertyAnimation* QPropertyAnimation_new(); -QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName); -QPropertyAnimation* QPropertyAnimation_new3(QObject* parent); -QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent); +void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self); void* QPropertyAnimation_Metacast(QPropertyAnimation* self, const char* param1); struct miqt_string QPropertyAnimation_Tr(const char* s); @@ -38,11 +46,26 @@ QObject* QPropertyAnimation_TargetObject(const QPropertyAnimation* self); void QPropertyAnimation_SetTargetObject(QPropertyAnimation* self, QObject* target); struct miqt_string QPropertyAnimation_PropertyName(const QPropertyAnimation* self); void QPropertyAnimation_SetPropertyName(QPropertyAnimation* self, struct miqt_string propertyName); +bool QPropertyAnimation_Event(QPropertyAnimation* self, QEvent* event); +void QPropertyAnimation_UpdateCurrentValue(QPropertyAnimation* self, QVariant* value); +void QPropertyAnimation_UpdateState(QPropertyAnimation* self, int newState, int oldState); struct miqt_string QPropertyAnimation_Tr2(const char* s, const char* c); struct miqt_string QPropertyAnimation_Tr3(const char* s, const char* c, int n); struct miqt_string QPropertyAnimation_TrUtf82(const char* s, const char* c); struct miqt_string QPropertyAnimation_TrUtf83(const char* s, const char* c, int n); -void QPropertyAnimation_Delete(QPropertyAnimation* self); +void QPropertyAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QPropertyAnimation_virtualbase_Event(void* self, QEvent* event); +void QPropertyAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot); +void QPropertyAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value); +void QPropertyAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QPropertyAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QPropertyAnimation_override_virtual_Duration(void* self, intptr_t slot); +int QPropertyAnimation_virtualbase_Duration(const void* self); +void QPropertyAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QPropertyAnimation_virtualbase_UpdateCurrentTime(void* self, int param1); +void QPropertyAnimation_override_virtual_Interpolated(void* self, intptr_t slot); +QVariant* QPropertyAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress); +void QPropertyAnimation_Delete(QPropertyAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qproxystyle.cpp b/qt/gen_qproxystyle.cpp index 66d6512e..bf104d12 100644 --- a/qt/gen_qproxystyle.cpp +++ b/qt/gen_qproxystyle.cpp @@ -1,7 +1,10 @@ #include +#include +#include #include #include #include +#include #include #include #include @@ -21,17 +24,709 @@ #include "gen_qproxystyle.h" #include "_cgo_export.h" -QProxyStyle* QProxyStyle_new() { - return new QProxyStyle(); +class MiqtVirtualQProxyStyle : public virtual QProxyStyle { +public: + + MiqtVirtualQProxyStyle(): QProxyStyle() {}; + MiqtVirtualQProxyStyle(const QString& key): QProxyStyle(key) {}; + MiqtVirtualQProxyStyle(QStyle* style): QProxyStyle(style) {}; + + virtual ~MiqtVirtualQProxyStyle() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPrimitive = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const override { + if (handle__DrawPrimitive == 0) { + QProxyStyle::drawPrimitive(element, option, painter, widget); + return; + } + + QStyle::PrimitiveElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QPainter* sigval3 = painter; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QProxyStyle_DrawPrimitive(const_cast(this), handle__DrawPrimitive, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPrimitive(int element, QStyleOption* option, QPainter* painter, QWidget* widget) const { + + QProxyStyle::drawPrimitive(static_cast(element), option, painter, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawControl(QStyle::ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const override { + if (handle__DrawControl == 0) { + QProxyStyle::drawControl(element, option, painter, widget); + return; + } + + QStyle::ControlElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QPainter* sigval3 = painter; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QProxyStyle_DrawControl(const_cast(this), handle__DrawControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawControl(int element, QStyleOption* option, QPainter* painter, QWidget* widget) const { + + QProxyStyle::drawControl(static_cast(element), option, painter, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex* option, QPainter* painter, const QWidget* widget) const override { + if (handle__DrawComplexControl == 0) { + QProxyStyle::drawComplexControl(control, option, painter, widget); + return; + } + + QStyle::ComplexControl control_ret = control; + int sigval1 = static_cast(control_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) option; + QPainter* sigval3 = painter; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QProxyStyle_DrawComplexControl(const_cast(this), handle__DrawComplexControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawComplexControl(int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) const { + + QProxyStyle::drawComplexControl(static_cast(control), option, painter, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemText = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const override { + if (handle__DrawItemText == 0) { + QProxyStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = flags; + const QPalette& pal_ret = pal; + // Cast returned reference into pointer + QPalette* sigval4 = const_cast(&pal_ret); + bool sigval5 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval6 = text_ms; + QPalette::ColorRole textRole_ret = textRole; + int sigval7 = static_cast(textRole_ret); + + miqt_exec_callback_QProxyStyle_DrawItemText(const_cast(this), handle__DrawItemText, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemText(QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QProxyStyle::drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const override { + if (handle__DrawItemPixmap == 0) { + QProxyStyle::drawItemPixmap(painter, rect, alignment, pixmap); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = alignment; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval4 = const_cast(&pixmap_ret); + + miqt_exec_callback_QProxyStyle_DrawItemPixmap(const_cast(this), handle__DrawItemPixmap, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemPixmap(QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) const { + + QProxyStyle::drawItemPixmap(painter, *rect, static_cast(alignment), *pixmap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeFromContents = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeFromContents(QStyle::ContentsType typeVal, const QStyleOption* option, const QSize& size, const QWidget* widget) const override { + if (handle__SizeFromContents == 0) { + return QProxyStyle::sizeFromContents(typeVal, option, size, widget); + } + + QStyle::ContentsType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval3 = const_cast(&size_ret); + QWidget* sigval4 = (QWidget*) widget; + + QSize* callback_return_value = miqt_exec_callback_QProxyStyle_SizeFromContents(const_cast(this), handle__SizeFromContents, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeFromContents(int typeVal, QStyleOption* option, QSize* size, QWidget* widget) const { + + return new QSize(QProxyStyle::sizeFromContents(static_cast(typeVal), option, *size, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubElementRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subElementRect(QStyle::SubElement element, const QStyleOption* option, const QWidget* widget) const override { + if (handle__SubElementRect == 0) { + return QProxyStyle::subElementRect(element, option, widget); + } + + QStyle::SubElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_SubElementRect(const_cast(this), handle__SubElementRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubElementRect(int element, QStyleOption* option, QWidget* widget) const { + + return new QRect(QProxyStyle::subElementRect(static_cast(element), option, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubControlRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* widget) const override { + if (handle__SubControlRect == 0) { + return QProxyStyle::subControlRect(cc, opt, sc, widget); + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QStyle::SubControl sc_ret = sc; + int sigval3 = static_cast(sc_ret); + QWidget* sigval4 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_SubControlRect(const_cast(this), handle__SubControlRect, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubControlRect(int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) const { + + return new QRect(QProxyStyle::subControlRect(static_cast(cc), opt, static_cast(sc), widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemTextRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemTextRect(const QFontMetrics& fm, const QRect& r, int flags, bool enabled, const QString& text) const override { + if (handle__ItemTextRect == 0) { + return QProxyStyle::itemTextRect(fm, r, flags, enabled, text); + } + + const QFontMetrics& fm_ret = fm; + // Cast returned reference into pointer + QFontMetrics* sigval1 = const_cast(&fm_ret); + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&r_ret); + int sigval3 = flags; + bool sigval4 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval5 = text_ms; + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_ItemTextRect(const_cast(this), handle__ItemTextRect, sigval1, sigval2, sigval3, sigval4, sigval5); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemTextRect(QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QRect(QProxyStyle::itemTextRect(*fm, *r, static_cast(flags), enabled, text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemPixmapRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const override { + if (handle__ItemPixmapRect == 0) { + return QProxyStyle::itemPixmapRect(r, flags, pixmap); + } + + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&r_ret); + int sigval2 = flags; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval3 = const_cast(&pixmap_ret); + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_ItemPixmapRect(const_cast(this), handle__ItemPixmapRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemPixmapRect(QRect* r, int flags, QPixmap* pixmap) const { + + return new QRect(QProxyStyle::itemPixmapRect(*r, static_cast(flags), *pixmap)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTestComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex* option, const QPoint& pos, const QWidget* widget) const override { + if (handle__HitTestComplexControl == 0) { + return QProxyStyle::hitTestComplexControl(control, option, pos, widget); + } + + QStyle::ComplexControl control_ret = control; + int sigval1 = static_cast(control_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) option; + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval3 = const_cast(&pos_ret); + QWidget* sigval4 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QProxyStyle_HitTestComplexControl(const_cast(this), handle__HitTestComplexControl, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HitTestComplexControl(int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) const { + + QStyle::SubControl _ret = QProxyStyle::hitTestComplexControl(static_cast(control), option, *pos, widget); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleHint = 0; + + // Subclass to allow providing a Go implementation + virtual int styleHint(QStyle::StyleHint hint, const QStyleOption* option, const QWidget* widget, QStyleHintReturn* returnData) const override { + if (handle__StyleHint == 0) { + return QProxyStyle::styleHint(hint, option, widget, returnData); + } + + QStyle::StyleHint hint_ret = hint; + int sigval1 = static_cast(hint_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + QStyleHintReturn* sigval4 = returnData; + + int callback_return_value = miqt_exec_callback_QProxyStyle_StyleHint(const_cast(this), handle__StyleHint, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleHint(int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) const { + + return QProxyStyle::styleHint(static_cast(hint), option, widget, returnData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PixelMetric = 0; + + // Subclass to allow providing a Go implementation + virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override { + if (handle__PixelMetric == 0) { + return QProxyStyle::pixelMetric(metric, option, widget); + } + + QStyle::PixelMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QProxyStyle_PixelMetric(const_cast(this), handle__PixelMetric, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PixelMetric(int metric, QStyleOption* option, QWidget* widget) const { + + return QProxyStyle::pixelMetric(static_cast(metric), option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LayoutSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const override { + if (handle__LayoutSpacing == 0) { + return QProxyStyle::layoutSpacing(control1, control2, orientation, option, widget); + } + + QSizePolicy::ControlType control1_ret = control1; + int sigval1 = static_cast(control1_ret); + QSizePolicy::ControlType control2_ret = control2; + int sigval2 = static_cast(control2_ret); + Qt::Orientation orientation_ret = orientation; + int sigval3 = static_cast(orientation_ret); + QStyleOption* sigval4 = (QStyleOption*) option; + QWidget* sigval5 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QProxyStyle_LayoutSpacing(const_cast(this), handle__LayoutSpacing, sigval1, sigval2, sigval3, sigval4, sigval5); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LayoutSpacing(int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) const { + + return QProxyStyle::layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardIcon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* option, const QWidget* widget) const override { + if (handle__StandardIcon == 0) { + return QProxyStyle::standardIcon(standardIcon, option, widget); + } + + QStyle::StandardPixmap standardIcon_ret = standardIcon; + int sigval1 = static_cast(standardIcon_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + QIcon* callback_return_value = miqt_exec_callback_QProxyStyle_StandardIcon(const_cast(this), handle__StandardIcon, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_StandardIcon(int standardIcon, QStyleOption* option, QWidget* widget) const { + + return new QIcon(QProxyStyle::standardIcon(static_cast(standardIcon), option, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__StandardPixmap == 0) { + return QProxyStyle::standardPixmap(standardPixmap, opt, widget); + } + + QStyle::StandardPixmap standardPixmap_ret = standardPixmap; + int sigval1 = static_cast(standardPixmap_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QPixmap* callback_return_value = miqt_exec_callback_QProxyStyle_StandardPixmap(const_cast(this), handle__StandardPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_StandardPixmap(int standardPixmap, QStyleOption* opt, QWidget* widget) const { + + return new QPixmap(QProxyStyle::standardPixmap(static_cast(standardPixmap), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GeneratedIconPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const override { + if (handle__GeneratedIconPixmap == 0) { + return QProxyStyle::generatedIconPixmap(iconMode, pixmap, opt); + } + + QIcon::Mode iconMode_ret = iconMode; + int sigval1 = static_cast(iconMode_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pixmap_ret); + QStyleOption* sigval3 = (QStyleOption*) opt; + + QPixmap* callback_return_value = miqt_exec_callback_QProxyStyle_GeneratedIconPixmap(const_cast(this), handle__GeneratedIconPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_GeneratedIconPixmap(int iconMode, QPixmap* pixmap, QStyleOption* opt) const { + + return new QPixmap(QProxyStyle::generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPalette = 0; + + // Subclass to allow providing a Go implementation + virtual QPalette standardPalette() const override { + if (handle__StandardPalette == 0) { + return QProxyStyle::standardPalette(); + } + + + QPalette* callback_return_value = miqt_exec_callback_QProxyStyle_StandardPalette(const_cast(this), handle__StandardPalette); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPalette* virtualbase_StandardPalette() const { + + return new QPalette(QProxyStyle::standardPalette()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Polish = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QWidget* widget) override { + if (handle__Polish == 0) { + QProxyStyle::polish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QProxyStyle_Polish(this, handle__Polish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Polish(QWidget* widget) { + + QProxyStyle::polish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithPal = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QPalette& pal) override { + if (handle__PolishWithPal == 0) { + QProxyStyle::polish(pal); + return; + } + + QPalette& pal_ret = pal; + // Cast returned reference into pointer + QPalette* sigval1 = &pal_ret; + + miqt_exec_callback_QProxyStyle_PolishWithPal(this, handle__PolishWithPal, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithPal(QPalette* pal) { + + QProxyStyle::polish(*pal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithApp = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QApplication* app) override { + if (handle__PolishWithApp == 0) { + QProxyStyle::polish(app); + return; + } + + QApplication* sigval1 = app; + + miqt_exec_callback_QProxyStyle_PolishWithApp(this, handle__PolishWithApp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithApp(QApplication* app) { + + QProxyStyle::polish(app); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unpolish = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QWidget* widget) override { + if (handle__Unpolish == 0) { + QProxyStyle::unpolish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QProxyStyle_Unpolish(this, handle__Unpolish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unpolish(QWidget* widget) { + + QProxyStyle::unpolish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnpolishWithApp = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QApplication* app) override { + if (handle__UnpolishWithApp == 0) { + QProxyStyle::unpolish(app); + return; + } + + QApplication* sigval1 = app; + + miqt_exec_callback_QProxyStyle_UnpolishWithApp(this, handle__UnpolishWithApp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UnpolishWithApp(QApplication* app) { + + QProxyStyle::unpolish(app); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QProxyStyle::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QProxyStyle_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QProxyStyle::event(e); + + } + +}; + +void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(); + *outptr_QProxyStyle = ret; + *outptr_QCommonStyle = static_cast(ret); + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QProxyStyle* QProxyStyle_new2(struct miqt_string key) { +void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QProxyStyle(key_QString); + MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(key_QString); + *outptr_QProxyStyle = ret; + *outptr_QCommonStyle = static_cast(ret); + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QProxyStyle* QProxyStyle_new3(QStyle* style) { - return new QProxyStyle(style); +void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(style); + *outptr_QProxyStyle = ret; + *outptr_QCommonStyle = static_cast(ret); + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self) { @@ -72,21 +767,21 @@ void QProxyStyle_SetBaseStyle(QProxyStyle* self, QStyle* style) { self->setBaseStyle(style); } -void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter) { - self->drawPrimitive(static_cast(element), option, painter); +void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + self->drawPrimitive(static_cast(element), option, painter, widget); } -void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter) { - self->drawControl(static_cast(element), option, painter); +void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + self->drawControl(static_cast(element), option, painter, widget); } -void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter) { - self->drawComplexControl(static_cast(control), option, painter); +void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { + self->drawComplexControl(static_cast(control), option, painter, widget); } -void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text) { +void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString); + self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } void QProxyStyle_DrawItemPixmap(const QProxyStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { @@ -114,29 +809,29 @@ QRect* QProxyStyle_ItemPixmapRect(const QProxyStyle* self, QRect* r, int flags, return new QRect(self->itemPixmapRect(*r, static_cast(flags), *pixmap)); } -int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos); +int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { + QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos, widget); return static_cast(_ret); } -int QProxyStyle_StyleHint(const QProxyStyle* self, int hint) { - return self->styleHint(static_cast(hint)); +int QProxyStyle_StyleHint(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { + return self->styleHint(static_cast(hint), option, widget, returnData); } -int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric) { - return self->pixelMetric(static_cast(metric)); +int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget) { + return self->pixelMetric(static_cast(metric), option, widget); } -int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); +int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } -QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon) { - return new QIcon(self->standardIcon(static_cast(standardIcon))); +QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { + return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } -QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); +QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { + return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } QPixmap* QProxyStyle_GeneratedIconPixmap(const QProxyStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { @@ -211,69 +906,203 @@ struct miqt_string QProxyStyle_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QProxyStyle_DrawPrimitive4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { - self->drawPrimitive(static_cast(element), option, painter, widget); +void QProxyStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawPrimitive = slot; } -void QProxyStyle_DrawControl4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { - self->drawControl(static_cast(element), option, painter, widget); +void QProxyStyle_virtualbase_DrawPrimitive(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawPrimitive(element, option, painter, widget); } -void QProxyStyle_DrawComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { - self->drawComplexControl(static_cast(control), option, painter, widget); +void QProxyStyle_override_virtual_DrawControl(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawControl = slot; } -void QProxyStyle_DrawItemText7(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); +void QProxyStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawControl(element, option, painter, widget); } -int QProxyStyle_HitTestComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos, widget); - return static_cast(_ret); +void QProxyStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawComplexControl = slot; } -int QProxyStyle_StyleHint2(const QProxyStyle* self, int hint, QStyleOption* option) { - return self->styleHint(static_cast(hint), option); +void QProxyStyle_virtualbase_DrawComplexControl(const void* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawComplexControl(control, option, painter, widget); } -int QProxyStyle_StyleHint3(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget) { - return self->styleHint(static_cast(hint), option, widget); +void QProxyStyle_override_virtual_DrawItemText(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawItemText = slot; } -int QProxyStyle_StyleHint4(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { - return self->styleHint(static_cast(hint), option, widget, returnData); +void QProxyStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawItemText(painter, rect, flags, pal, enabled, text, textRole); } -int QProxyStyle_PixelMetric2(const QProxyStyle* self, int metric, QStyleOption* option) { - return self->pixelMetric(static_cast(metric), option); +void QProxyStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawItemPixmap = slot; } -int QProxyStyle_PixelMetric3(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget) { - return self->pixelMetric(static_cast(metric), option, widget); +void QProxyStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawItemPixmap(painter, rect, alignment, pixmap); } -int QProxyStyle_LayoutSpacing4(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); +void QProxyStyle_override_virtual_SizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__SizeFromContents = slot; } -int QProxyStyle_LayoutSpacing5(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); +QSize* QProxyStyle_virtualbase_SizeFromContents(const void* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_SizeFromContents(typeVal, option, size, widget); } -QIcon* QProxyStyle_StandardIcon2(const QProxyStyle* self, int standardIcon, QStyleOption* option) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option)); +void QProxyStyle_override_virtual_SubElementRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__SubElementRect = slot; } -QIcon* QProxyStyle_StandardIcon3(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); +QRect* QProxyStyle_virtualbase_SubElementRect(const void* self, int element, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_SubElementRect(element, option, widget); } -QPixmap* QProxyStyle_StandardPixmap3(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); +void QProxyStyle_override_virtual_SubControlRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__SubControlRect = slot; +} + +QRect* QProxyStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_SubControlRect(cc, opt, sc, widget); +} + +void QProxyStyle_override_virtual_ItemTextRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__ItemTextRect = slot; +} + +QRect* QProxyStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_ItemTextRect(fm, r, flags, enabled, text); +} + +void QProxyStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__ItemPixmapRect = slot; +} + +QRect* QProxyStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_ItemPixmapRect(r, flags, pixmap); +} + +void QProxyStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__HitTestComplexControl = slot; +} + +int QProxyStyle_virtualbase_HitTestComplexControl(const void* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_HitTestComplexControl(control, option, pos, widget); +} + +void QProxyStyle_override_virtual_StyleHint(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StyleHint = slot; +} + +int QProxyStyle_virtualbase_StyleHint(const void* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StyleHint(hint, option, widget, returnData); +} + +void QProxyStyle_override_virtual_PixelMetric(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__PixelMetric = slot; +} + +int QProxyStyle_virtualbase_PixelMetric(const void* self, int metric, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_PixelMetric(metric, option, widget); +} + +void QProxyStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__LayoutSpacing = slot; +} + +int QProxyStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_LayoutSpacing(control1, control2, orientation, option, widget); +} + +void QProxyStyle_override_virtual_StandardIcon(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StandardIcon = slot; +} + +QIcon* QProxyStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StandardIcon(standardIcon, option, widget); +} + +void QProxyStyle_override_virtual_StandardPixmap(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StandardPixmap = slot; +} + +QPixmap* QProxyStyle_virtualbase_StandardPixmap(const void* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StandardPixmap(standardPixmap, opt, widget); +} + +void QProxyStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__GeneratedIconPixmap = slot; +} + +QPixmap* QProxyStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_GeneratedIconPixmap(iconMode, pixmap, opt); +} + +void QProxyStyle_override_virtual_StandardPalette(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StandardPalette = slot; +} + +QPalette* QProxyStyle_virtualbase_StandardPalette(const void* self) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StandardPalette(); +} + +void QProxyStyle_override_virtual_Polish(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__Polish = slot; +} + +void QProxyStyle_virtualbase_Polish(void* self, QWidget* widget) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_Polish(widget); +} + +void QProxyStyle_override_virtual_PolishWithPal(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__PolishWithPal = slot; +} + +void QProxyStyle_virtualbase_PolishWithPal(void* self, QPalette* pal) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_PolishWithPal(pal); +} + +void QProxyStyle_override_virtual_PolishWithApp(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__PolishWithApp = slot; +} + +void QProxyStyle_virtualbase_PolishWithApp(void* self, QApplication* app) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_PolishWithApp(app); +} + +void QProxyStyle_override_virtual_Unpolish(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__Unpolish = slot; +} + +void QProxyStyle_virtualbase_Unpolish(void* self, QWidget* widget) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_Unpolish(widget); +} + +void QProxyStyle_override_virtual_UnpolishWithApp(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__UnpolishWithApp = slot; +} + +void QProxyStyle_virtualbase_UnpolishWithApp(void* self, QApplication* app) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_UnpolishWithApp(app); +} + +void QProxyStyle_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__Event = slot; +} + +bool QProxyStyle_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_Event(e); } -void QProxyStyle_Delete(QProxyStyle* self) { - delete self; +void QProxyStyle_Delete(QProxyStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qproxystyle.go b/qt/gen_qproxystyle.go index 185e97fb..07692d98 100644 --- a/qt/gen_qproxystyle.go +++ b/qt/gen_qproxystyle.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QProxyStyle struct { - h *C.QProxyStyle + h *C.QProxyStyle + isSubclass bool *QCommonStyle } @@ -32,21 +34,36 @@ func (this *QProxyStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProxyStyle(h *C.QProxyStyle) *QProxyStyle { +// newQProxyStyle constructs the type using only CGO pointers. +func newQProxyStyle(h *C.QProxyStyle, h_QCommonStyle *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QProxyStyle { if h == nil { return nil } - return &QProxyStyle{h: h, QCommonStyle: UnsafeNewQCommonStyle(unsafe.Pointer(h))} + return &QProxyStyle{h: h, + QCommonStyle: newQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} } -func UnsafeNewQProxyStyle(h unsafe.Pointer) *QProxyStyle { - return newQProxyStyle((*C.QProxyStyle)(h)) +// UnsafeNewQProxyStyle constructs the type using only unsafe pointers. +func UnsafeNewQProxyStyle(h unsafe.Pointer, h_QCommonStyle unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QProxyStyle { + if h == nil { + return nil + } + + return &QProxyStyle{h: (*C.QProxyStyle)(h), + QCommonStyle: UnsafeNewQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} } // NewQProxyStyle constructs a new QProxyStyle object. func NewQProxyStyle() *QProxyStyle { - ret := C.QProxyStyle_new() - return newQProxyStyle(ret) + var outptr_QProxyStyle *C.QProxyStyle = nil + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QProxyStyle_new(&outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } // NewQProxyStyle2 constructs a new QProxyStyle object. @@ -55,14 +72,28 @@ func NewQProxyStyle2(key string) *QProxyStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QProxyStyle_new2(key_ms) - return newQProxyStyle(ret) + var outptr_QProxyStyle *C.QProxyStyle = nil + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QProxyStyle_new2(key_ms, &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } // NewQProxyStyle3 constructs a new QProxyStyle object. func NewQProxyStyle3(style *QStyle) *QProxyStyle { - ret := C.QProxyStyle_new3(style.cPointer()) - return newQProxyStyle(ret) + var outptr_QProxyStyle *C.QProxyStyle = nil + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QProxyStyle_new3(style.cPointer(), &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QProxyStyle) MetaObject() *QMetaObject { @@ -94,31 +125,31 @@ func QProxyStyle_TrUtf8(s string) string { } func (this *QProxyStyle) BaseStyle() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QProxyStyle_BaseStyle(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QProxyStyle_BaseStyle(this.h)), nil) } func (this *QProxyStyle) SetBaseStyle(style *QStyle) { C.QProxyStyle_SetBaseStyle(this.h, style.cPointer()) } -func (this *QProxyStyle) DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter) { - C.QProxyStyle_DrawPrimitive(this.h, (C.int)(element), option.cPointer(), painter.cPointer()) +func (this *QProxyStyle) DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + C.QProxyStyle_DrawPrimitive(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) } -func (this *QProxyStyle) DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter) { - C.QProxyStyle_DrawControl(this.h, (C.int)(element), option.cPointer(), painter.cPointer()) +func (this *QProxyStyle) DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + C.QProxyStyle_DrawControl(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) } -func (this *QProxyStyle) DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter) { - C.QProxyStyle_DrawComplexControl(this.h, (C.int)(control), option.cPointer(), painter.cPointer()) +func (this *QProxyStyle) DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) { + C.QProxyStyle_DrawComplexControl(this.h, (C.int)(control), option.cPointer(), painter.cPointer(), widget.cPointer()) } -func (this *QProxyStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string) { +func (this *QProxyStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { text_ms := C.struct_miqt_string{} text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - C.QProxyStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms) + C.QProxyStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) } func (this *QProxyStyle) DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { @@ -164,39 +195,39 @@ func (this *QProxyStyle) ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *Q return _goptr } -func (this *QProxyStyle) HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint) QStyle__SubControl { - return (QStyle__SubControl)(C.QProxyStyle_HitTestComplexControl(this.h, (C.int)(control), option.cPointer(), pos.cPointer())) +func (this *QProxyStyle) HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl { + return (QStyle__SubControl)(C.QProxyStyle_HitTestComplexControl(this.h, (C.int)(control), option.cPointer(), pos.cPointer(), widget.cPointer())) } -func (this *QProxyStyle) StyleHint(hint QStyle__StyleHint) int { - return (int)(C.QProxyStyle_StyleHint(this.h, (C.int)(hint))) +func (this *QProxyStyle) StyleHint(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { + return (int)(C.QProxyStyle_StyleHint(this.h, (C.int)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())) } -func (this *QProxyStyle) PixelMetric(metric QStyle__PixelMetric) int { - return (int)(C.QProxyStyle_PixelMetric(this.h, (C.int)(metric))) +func (this *QProxyStyle) PixelMetric(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { + return (int)(C.QProxyStyle_PixelMetric(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) } -func (this *QProxyStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int { - return (int)(C.QProxyStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation))) +func (this *QProxyStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + return (int)(C.QProxyStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } -func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { - _ret := C.QProxyStyle_StandardIcon(this.h, (C.int)(standardIcon)) +func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { + _ret := C.QProxyStyle_StandardIcon(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption) *QPixmap { - _ret := C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer()) - _goptr := newQPixmap(_ret) +func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + _ret := C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QProxyStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { _ret := C.QProxyStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -272,82 +303,699 @@ func QProxyStyle_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QProxyStyle) DrawPrimitive4(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) { - C.QProxyStyle_DrawPrimitive4(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) +func (this *QProxyStyle) callVirtualBase_DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + + C.QProxyStyle_virtualbase_DrawPrimitive(unsafe.Pointer(this.h), (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) + +} +func (this *QProxyStyle) OnDrawPrimitive(slot func(super func(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget)) { + C.QProxyStyle_override_virtual_DrawPrimitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_DrawPrimitive +func miqt_exec_callback_QProxyStyle_DrawPrimitive(self *C.QProxyStyle, cb C.intptr_t, element C.int, option *C.QStyleOption, painter *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PrimitiveElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QProxyStyle) callVirtualBase_DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + + C.QProxyStyle_virtualbase_DrawControl(unsafe.Pointer(this.h), (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) + +} +func (this *QProxyStyle) OnDrawControl(slot func(super func(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget)) { + C.QProxyStyle_override_virtual_DrawControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) DrawControl4(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) { - C.QProxyStyle_DrawControl4(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) +//export miqt_exec_callback_QProxyStyle_DrawControl +func miqt_exec_callback_QProxyStyle_DrawControl(self *C.QProxyStyle, cb C.intptr_t, element C.int, option *C.QStyleOption, painter *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ControlElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) + } -func (this *QProxyStyle) DrawComplexControl4(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) { - C.QProxyStyle_DrawComplexControl4(this.h, (C.int)(control), option.cPointer(), painter.cPointer(), widget.cPointer()) +func (this *QProxyStyle) callVirtualBase_DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) { + + C.QProxyStyle_virtualbase_DrawComplexControl(unsafe.Pointer(this.h), (C.int)(control), option.cPointer(), painter.cPointer(), widget.cPointer()) + } +func (this *QProxyStyle) OnDrawComplexControl(slot func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget), control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget)) { + C.QProxyStyle_override_virtual_DrawComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_DrawComplexControl +func miqt_exec_callback_QProxyStyle_DrawComplexControl(self *C.QProxyStyle, cb C.intptr_t, control C.int, option *C.QStyleOptionComplex, painter *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget), control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(control) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) -func (this *QProxyStyle) DrawItemText7(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QProxyStyle) callVirtualBase_DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { text_ms := C.struct_miqt_string{} text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - C.QProxyStyle_DrawItemText7(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) + + C.QProxyStyle_virtualbase_DrawItemText(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) + +} +func (this *QProxyStyle) OnDrawItemText(slot func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) { + C.QProxyStyle_override_virtual_DrawItemText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) HitTestComplexControl4(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl { - return (QStyle__SubControl)(C.QProxyStyle_HitTestComplexControl4(this.h, (C.int)(control), option.cPointer(), pos.cPointer(), widget.cPointer())) +//export miqt_exec_callback_QProxyStyle_DrawItemText +func miqt_exec_callback_QProxyStyle_DrawItemText(self *C.QProxyStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, flags C.int, pal *C.QPalette, enabled C.bool, text C.struct_miqt_string, textRole C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(flags) + + slotval4 := UnsafeNewQPalette(unsafe.Pointer(pal)) + slotval5 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval6 := text_ret + slotval7 := (QPalette__ColorRole)(textRole) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawItemText, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7) + } -func (this *QProxyStyle) StyleHint2(hint QStyle__StyleHint, option *QStyleOption) int { - return (int)(C.QProxyStyle_StyleHint2(this.h, (C.int)(hint), option.cPointer())) +func (this *QProxyStyle) callVirtualBase_DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { + + C.QProxyStyle_virtualbase_DrawItemPixmap(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer()) + } +func (this *QProxyStyle) OnDrawItemPixmap(slot func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) { + C.QProxyStyle_override_virtual_DrawItemPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_DrawItemPixmap +func miqt_exec_callback_QProxyStyle_DrawItemPixmap(self *C.QProxyStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, alignment C.int, pixmap *C.QPixmap) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(alignment) + + slotval4 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QProxyStyle) callVirtualBase_SizeFromContents(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize { + + _ret := C.QProxyStyle_virtualbase_SizeFromContents(unsafe.Pointer(this.h), (C.int)(typeVal), option.cPointer(), size.cPointer(), widget.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnSizeFromContents(slot func(super func(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize, typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize) { + C.QProxyStyle_override_virtual_SizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_SizeFromContents +func miqt_exec_callback_QProxyStyle_SizeFromContents(self *C.QProxyStyle, cb C.intptr_t, typeVal C.int, option *C.QStyleOption, size *C.QSize, widget *C.QWidget) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize, typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ContentsType)(typeVal) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_SubElementRect(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect { + + _ret := C.QProxyStyle_virtualbase_SubElementRect(unsafe.Pointer(this.h), (C.int)(element), option.cPointer(), widget.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -func (this *QProxyStyle) StyleHint3(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget) int { - return (int)(C.QProxyStyle_StyleHint3(this.h, (C.int)(hint), option.cPointer(), widget.cPointer())) } +func (this *QProxyStyle) OnSubElementRect(slot func(super func(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect, element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect) { + C.QProxyStyle_override_virtual_SubElementRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_SubElementRect +func miqt_exec_callback_QProxyStyle_SubElementRect(self *C.QProxyStyle, cb C.intptr_t, element C.int, option *C.QStyleOption, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect, element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__SubElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() -func (this *QProxyStyle) StyleHint4(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { - return (int)(C.QProxyStyle_StyleHint4(this.h, (C.int)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())) } -func (this *QProxyStyle) PixelMetric2(metric QStyle__PixelMetric, option *QStyleOption) int { - return (int)(C.QProxyStyle_PixelMetric2(this.h, (C.int)(metric), option.cPointer())) +func (this *QProxyStyle) callVirtualBase_SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect { + + _ret := C.QProxyStyle_virtualbase_SubControlRect(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), (C.int)(sc), widget.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnSubControlRect(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect) { + C.QProxyStyle_override_virtual_SubControlRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) PixelMetric3(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { - return (int)(C.QProxyStyle_PixelMetric3(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) +//export miqt_exec_callback_QProxyStyle_SubControlRect +func miqt_exec_callback_QProxyStyle_SubControlRect(self *C.QProxyStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, sc C.int, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := (QStyle__SubControl)(sc) + + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + } -func (this *QProxyStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { - return (int)(C.QProxyStyle_LayoutSpacing4(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer())) +func (this *QProxyStyle) callVirtualBase_ItemTextRect(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QProxyStyle_virtualbase_ItemTextRect(unsafe.Pointer(this.h), fm.cPointer(), r.cPointer(), (C.int)(flags), (C.bool)(enabled), text_ms) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnItemTextRect(slot func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) { + C.QProxyStyle_override_virtual_ItemTextRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { - return (int)(C.QProxyStyle_LayoutSpacing5(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) +//export miqt_exec_callback_QProxyStyle_ItemTextRect +func miqt_exec_callback_QProxyStyle_ItemTextRect(self *C.QProxyStyle, cb C.intptr_t, fm *C.QFontMetrics, r *C.QRect, flags C.int, enabled C.bool, text C.struct_miqt_string) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFontMetrics(unsafe.Pointer(fm)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval3 := (int)(flags) + + slotval4 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval5 := text_ret + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_ItemTextRect, slotval1, slotval2, slotval3, slotval4, slotval5) + + return virtualReturn.cPointer() + } -func (this *QProxyStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, option *QStyleOption) *QIcon { - _ret := C.QProxyStyle_StandardIcon2(this.h, (C.int)(standardIcon), option.cPointer()) - _goptr := newQIcon(_ret) +func (this *QProxyStyle) callVirtualBase_ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect { + + _ret := C.QProxyStyle_virtualbase_ItemPixmapRect(unsafe.Pointer(this.h), r.cPointer(), (C.int)(flags), pixmap.cPointer()) + _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QProxyStyle) OnItemPixmapRect(slot func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) { + C.QProxyStyle_override_virtual_ItemPixmapRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_ItemPixmapRect +func miqt_exec_callback_QProxyStyle_ItemPixmapRect(self *C.QProxyStyle, cb C.intptr_t, r *C.QRect, flags C.int, pixmap *C.QPixmap) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval2 := (int)(flags) + + slotval3 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl { + + return (QStyle__SubControl)(C.QProxyStyle_virtualbase_HitTestComplexControl(unsafe.Pointer(this.h), (C.int)(control), option.cPointer(), pos.cPointer(), widget.cPointer())) + +} +func (this *QProxyStyle) OnHitTestComplexControl(slot func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl, control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl) { + C.QProxyStyle_override_virtual_HitTestComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { - _ret := C.QProxyStyle_StandardIcon3(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) +//export miqt_exec_callback_QProxyStyle_HitTestComplexControl +func miqt_exec_callback_QProxyStyle_HitTestComplexControl(self *C.QProxyStyle, cb C.intptr_t, control C.int, option *C.QStyleOptionComplex, pos *C.QPoint, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl, control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(control) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQPoint(unsafe.Pointer(pos)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_StyleHint(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { + + return (int)(C.QProxyStyle_virtualbase_StyleHint(unsafe.Pointer(this.h), (C.int)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())) + +} +func (this *QProxyStyle) OnStyleHint(slot func(super func(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int, hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int) { + C.QProxyStyle_override_virtual_StyleHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_StyleHint +func miqt_exec_callback_QProxyStyle_StyleHint(self *C.QProxyStyle, cb C.intptr_t, hint C.int, option *C.QStyleOption, widget *C.QWidget, returnData *C.QStyleHintReturn) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int, hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StyleHint)(hint) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval4 := UnsafeNewQStyleHintReturn(unsafe.Pointer(returnData)) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StyleHint, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_PixelMetric(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { + + return (int)(C.QProxyStyle_virtualbase_PixelMetric(unsafe.Pointer(this.h), (C.int)(metric), option.cPointer(), widget.cPointer())) + +} +func (this *QProxyStyle) OnPixelMetric(slot func(super func(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int, metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int) { + C.QProxyStyle_override_virtual_PixelMetric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_PixelMetric +func miqt_exec_callback_QProxyStyle_PixelMetric(self *C.QProxyStyle, cb C.intptr_t, metric C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int, metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PixelMetric)(metric) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + + return (int)(C.QProxyStyle_virtualbase_LayoutSpacing(unsafe.Pointer(this.h), (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) + +} +func (this *QProxyStyle) OnLayoutSpacing(slot func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) { + C.QProxyStyle_override_virtual_LayoutSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_LayoutSpacing +func miqt_exec_callback_QProxyStyle_LayoutSpacing(self *C.QProxyStyle, cb C.intptr_t, control1 C.int, control2 C.int, orientation C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QSizePolicy__ControlType)(control1) + + slotval2 := (QSizePolicy__ControlType)(control2) + + slotval3 := (Orientation)(orientation) + + slotval4 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval5 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_StandardIcon(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { + + _ret := C.QProxyStyle_virtualbase_StandardIcon(unsafe.Pointer(this.h), (C.int)(standardIcon), option.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QProxyStyle) OnStandardIcon(slot func(super func(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon) { + C.QProxyStyle_override_virtual_StandardIcon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) StandardPixmap3(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _ret := C.QProxyStyle_StandardPixmap3(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) - _goptr := newQPixmap(_ret) +//export miqt_exec_callback_QProxyStyle_StandardIcon +func miqt_exec_callback_QProxyStyle_StandardIcon(self *C.QProxyStyle, cb C.intptr_t, standardIcon C.int, option *C.QStyleOption, widget *C.QWidget) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(standardIcon) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + + _ret := C.QProxyStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QProxyStyle) OnStandardPixmap(slot func(super func(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) { + C.QProxyStyle_override_virtual_StandardPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_StandardPixmap +func miqt_exec_callback_QProxyStyle_StandardPixmap(self *C.QProxyStyle, cb C.intptr_t, standardPixmap C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(standardPixmap) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { + + _ret := C.QProxyStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnGeneratedIconPixmap(slot func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) { + C.QProxyStyle_override_virtual_GeneratedIconPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_GeneratedIconPixmap +func miqt_exec_callback_QProxyStyle_GeneratedIconPixmap(self *C.QProxyStyle, cb C.intptr_t, iconMode C.int, pixmap *C.QPixmap, opt *C.QStyleOption) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIcon__Mode)(iconMode) + + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval3 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_GeneratedIconPixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_StandardPalette() *QPalette { + + _ret := C.QProxyStyle_virtualbase_StandardPalette(unsafe.Pointer(this.h)) + _goptr := newQPalette(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnStandardPalette(slot func(super func() *QPalette) *QPalette) { + C.QProxyStyle_override_virtual_StandardPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_StandardPalette +func miqt_exec_callback_QProxyStyle_StandardPalette(self *C.QProxyStyle, cb C.intptr_t) *C.QPalette { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPalette) *QPalette) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardPalette) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_Polish(widget *QWidget) { + + C.QProxyStyle_virtualbase_Polish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QProxyStyle) OnPolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QProxyStyle_override_virtual_Polish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_Polish +func miqt_exec_callback_QProxyStyle_Polish(self *C.QProxyStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_Polish, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_PolishWithPal(pal *QPalette) { + + C.QProxyStyle_virtualbase_PolishWithPal(unsafe.Pointer(this.h), pal.cPointer()) + +} +func (this *QProxyStyle) OnPolishWithPal(slot func(super func(pal *QPalette), pal *QPalette)) { + C.QProxyStyle_override_virtual_PolishWithPal(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_PolishWithPal +func miqt_exec_callback_QProxyStyle_PolishWithPal(self *C.QProxyStyle, cb C.intptr_t, pal *C.QPalette) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pal *QPalette), pal *QPalette)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPalette(unsafe.Pointer(pal)) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_PolishWithPal, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_PolishWithApp(app *QApplication) { + + C.QProxyStyle_virtualbase_PolishWithApp(unsafe.Pointer(this.h), app.cPointer()) + +} +func (this *QProxyStyle) OnPolishWithApp(slot func(super func(app *QApplication), app *QApplication)) { + C.QProxyStyle_override_virtual_PolishWithApp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_PolishWithApp +func miqt_exec_callback_QProxyStyle_PolishWithApp(self *C.QProxyStyle, cb C.intptr_t, app *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(app *QApplication), app *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(app), nil, nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_Unpolish(widget *QWidget) { + + C.QProxyStyle_virtualbase_Unpolish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QProxyStyle) OnUnpolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QProxyStyle_override_virtual_Unpolish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_Unpolish +func miqt_exec_callback_QProxyStyle_Unpolish(self *C.QProxyStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_Unpolish, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_UnpolishWithApp(app *QApplication) { + + C.QProxyStyle_virtualbase_UnpolishWithApp(unsafe.Pointer(this.h), app.cPointer()) + +} +func (this *QProxyStyle) OnUnpolishWithApp(slot func(super func(app *QApplication), app *QApplication)) { + C.QProxyStyle_override_virtual_UnpolishWithApp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_UnpolishWithApp +func miqt_exec_callback_QProxyStyle_UnpolishWithApp(self *C.QProxyStyle, cb C.intptr_t, app *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(app *QApplication), app *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(app), nil, nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_UnpolishWithApp, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QProxyStyle_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QProxyStyle) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QProxyStyle_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_Event +func miqt_exec_callback_QProxyStyle_Event(self *C.QProxyStyle, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QProxyStyle) Delete() { - C.QProxyStyle_Delete(this.h) + C.QProxyStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qproxystyle.h b/qt/gen_qproxystyle.h index d3d09e8e..c21dbf40 100644 --- a/qt/gen_qproxystyle.h +++ b/qt/gen_qproxystyle.h @@ -16,9 +16,12 @@ extern "C" { #ifdef __cplusplus class QApplication; +class QCommonStyle; +class QEvent; class QFontMetrics; class QIcon; class QMetaObject; +class QObject; class QPainter; class QPalette; class QPixmap; @@ -33,9 +36,12 @@ class QStyleOptionComplex; class QWidget; #else typedef struct QApplication QApplication; +typedef struct QCommonStyle QCommonStyle; +typedef struct QEvent QEvent; typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; @@ -50,31 +56,31 @@ typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -QProxyStyle* QProxyStyle_new(); -QProxyStyle* QProxyStyle_new2(struct miqt_string key); -QProxyStyle* QProxyStyle_new3(QStyle* style); +void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self); void* QProxyStyle_Metacast(QProxyStyle* self, const char* param1); struct miqt_string QProxyStyle_Tr(const char* s); struct miqt_string QProxyStyle_TrUtf8(const char* s); QStyle* QProxyStyle_BaseStyle(const QProxyStyle* self); void QProxyStyle_SetBaseStyle(QProxyStyle* self, QStyle* style); -void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter); -void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter); -void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter); -void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text); +void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget); +void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); void QProxyStyle_DrawItemPixmap(const QProxyStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); QSize* QProxyStyle_SizeFromContents(const QProxyStyle* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget); QRect* QProxyStyle_SubElementRect(const QProxyStyle* self, int element, QStyleOption* option, QWidget* widget); QRect* QProxyStyle_SubControlRect(const QProxyStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); QRect* QProxyStyle_ItemTextRect(const QProxyStyle* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); QRect* QProxyStyle_ItemPixmapRect(const QProxyStyle* self, QRect* r, int flags, QPixmap* pixmap); -int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos); -int QProxyStyle_StyleHint(const QProxyStyle* self, int hint); -int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric); -int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation); -QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon); -QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt); +int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget); +int QProxyStyle_StyleHint(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData); +int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget); +int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); +QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); QPixmap* QProxyStyle_GeneratedIconPixmap(const QProxyStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); QPalette* QProxyStyle_StandardPalette(const QProxyStyle* self); void QProxyStyle_Polish(QProxyStyle* self, QWidget* widget); @@ -82,26 +88,60 @@ void QProxyStyle_PolishWithPal(QProxyStyle* self, QPalette* pal); void QProxyStyle_PolishWithApp(QProxyStyle* self, QApplication* app); void QProxyStyle_Unpolish(QProxyStyle* self, QWidget* widget); void QProxyStyle_UnpolishWithApp(QProxyStyle* self, QApplication* app); +bool QProxyStyle_Event(QProxyStyle* self, QEvent* e); struct miqt_string QProxyStyle_Tr2(const char* s, const char* c); struct miqt_string QProxyStyle_Tr3(const char* s, const char* c, int n); struct miqt_string QProxyStyle_TrUtf82(const char* s, const char* c); struct miqt_string QProxyStyle_TrUtf83(const char* s, const char* c, int n); -void QProxyStyle_DrawPrimitive4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); -void QProxyStyle_DrawControl4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); -void QProxyStyle_DrawComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget); -void QProxyStyle_DrawItemText7(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); -int QProxyStyle_HitTestComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget); -int QProxyStyle_StyleHint2(const QProxyStyle* self, int hint, QStyleOption* option); -int QProxyStyle_StyleHint3(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget); -int QProxyStyle_StyleHint4(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData); -int QProxyStyle_PixelMetric2(const QProxyStyle* self, int metric, QStyleOption* option); -int QProxyStyle_PixelMetric3(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget); -int QProxyStyle_LayoutSpacing4(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option); -int QProxyStyle_LayoutSpacing5(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); -QIcon* QProxyStyle_StandardIcon2(const QProxyStyle* self, int standardIcon, QStyleOption* option); -QIcon* QProxyStyle_StandardIcon3(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); -QPixmap* QProxyStyle_StandardPixmap3(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); -void QProxyStyle_Delete(QProxyStyle* self); +void QProxyStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawPrimitive(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_override_virtual_DrawControl(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawComplexControl(const void* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget); +void QProxyStyle_override_virtual_DrawItemText(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); +void QProxyStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); +void QProxyStyle_override_virtual_SizeFromContents(void* self, intptr_t slot); +QSize* QProxyStyle_virtualbase_SizeFromContents(const void* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget); +void QProxyStyle_override_virtual_SubElementRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_SubElementRect(const void* self, int element, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_SubControlRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); +void QProxyStyle_override_virtual_ItemTextRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); +void QProxyStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap); +void QProxyStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot); +int QProxyStyle_virtualbase_HitTestComplexControl(const void* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget); +void QProxyStyle_override_virtual_StyleHint(void* self, intptr_t slot); +int QProxyStyle_virtualbase_StyleHint(const void* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData); +void QProxyStyle_override_virtual_PixelMetric(void* self, intptr_t slot); +int QProxyStyle_virtualbase_PixelMetric(const void* self, int metric, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot); +int QProxyStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_StandardIcon(void* self, intptr_t slot); +QIcon* QProxyStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_StandardPixmap(void* self, intptr_t slot); +QPixmap* QProxyStyle_virtualbase_StandardPixmap(const void* self, int standardPixmap, QStyleOption* opt, QWidget* widget); +void QProxyStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot); +QPixmap* QProxyStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); +void QProxyStyle_override_virtual_StandardPalette(void* self, intptr_t slot); +QPalette* QProxyStyle_virtualbase_StandardPalette(const void* self); +void QProxyStyle_override_virtual_Polish(void* self, intptr_t slot); +void QProxyStyle_virtualbase_Polish(void* self, QWidget* widget); +void QProxyStyle_override_virtual_PolishWithPal(void* self, intptr_t slot); +void QProxyStyle_virtualbase_PolishWithPal(void* self, QPalette* pal); +void QProxyStyle_override_virtual_PolishWithApp(void* self, intptr_t slot); +void QProxyStyle_virtualbase_PolishWithApp(void* self, QApplication* app); +void QProxyStyle_override_virtual_Unpolish(void* self, intptr_t slot); +void QProxyStyle_virtualbase_Unpolish(void* self, QWidget* widget); +void QProxyStyle_override_virtual_UnpolishWithApp(void* self, intptr_t slot); +void QProxyStyle_virtualbase_UnpolishWithApp(void* self, QApplication* app); +void QProxyStyle_override_virtual_Event(void* self, intptr_t slot); +bool QProxyStyle_virtualbase_Event(void* self, QEvent* e); +void QProxyStyle_Delete(QProxyStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qpushbutton.cpp b/qt/gen_qpushbutton.cpp index 2e74df68..bda4fd99 100644 --- a/qt/gen_qpushbutton.cpp +++ b/qt/gen_qpushbutton.cpp @@ -1,42 +1,474 @@ +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include "gen_qpushbutton.h" #include "_cgo_export.h" -QPushButton* QPushButton_new(QWidget* parent) { - return new QPushButton(parent); +class MiqtVirtualQPushButton : public virtual QPushButton { +public: + + MiqtVirtualQPushButton(QWidget* parent): QPushButton(parent) {}; + MiqtVirtualQPushButton(): QPushButton() {}; + MiqtVirtualQPushButton(const QString& text): QPushButton(text) {}; + MiqtVirtualQPushButton(const QIcon& icon, const QString& text): QPushButton(icon, text) {}; + MiqtVirtualQPushButton(const QString& text, QWidget* parent): QPushButton(text, parent) {}; + MiqtVirtualQPushButton(const QIcon& icon, const QString& text, QWidget* parent): QPushButton(icon, text, parent) {}; + + virtual ~MiqtVirtualQPushButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPushButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPushButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPushButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPushButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPushButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPushButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QPushButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QPushButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QPushButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QPushButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QPushButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QPushButton::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QPushButton::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QPushButton::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QPushButton::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QPushButton::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QPushButton::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QPushButton::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QPushButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QPushButton::hitButton(*pos); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QPushButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QPushButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QPushButton::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QPushButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QPushButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QPushButton::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QPushButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QPushButton::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QPushButton::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QPushButton::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QPushButton::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QPushButton::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QPushButton::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QPushButton::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QPushButton::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QPushButton::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QPushButton::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QPushButton::timerEvent(e); + + } + +}; + +void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(parent); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new2() { - return new QPushButton(); +void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new3(struct miqt_string text) { +void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(text_QString); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text) { +void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(*icon, text_QString); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent) { +void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(text_QString, parent); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString, parent); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent) { +void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(*icon, text_QString, parent); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString, parent); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPushButton_MetaObject(const QPushButton* self) { @@ -157,7 +589,139 @@ struct miqt_string QPushButton_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QPushButton_Delete(QPushButton* self) { - delete self; +void QPushButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QPushButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_SizeHint(); +} + +void QPushButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPushButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPushButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__Event = slot; +} + +bool QPushButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQPushButton*)(self) )->virtualbase_Event(e); +} + +void QPushButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__PaintEvent = slot; +} + +void QPushButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QPushButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QPushButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QPushButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__FocusInEvent = slot; +} + +void QPushButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QPushButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QPushButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QPushButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__HitButton = slot; +} + +bool QPushButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_HitButton(pos); +} + +void QPushButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__CheckStateSet = slot; +} + +void QPushButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QPushButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__NextCheckState = slot; +} + +void QPushButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_NextCheckState(); +} + +void QPushButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QPushButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QPushButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MousePressEvent = slot; +} + +void QPushButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_MousePressEvent(e); +} + +void QPushButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QPushButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QPushButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QPushButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QPushButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__ChangeEvent = slot; +} + +void QPushButton_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_ChangeEvent(e); +} + +void QPushButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__TimerEvent = slot; +} + +void QPushButton_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_TimerEvent(e); +} + +void QPushButton_Delete(QPushButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qpushbutton.go b/qt/gen_qpushbutton.go index 7549711e..79fcc092 100644 --- a/qt/gen_qpushbutton.go +++ b/qt/gen_qpushbutton.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPushButton struct { - h *C.QPushButton + h *C.QPushButton + isSubclass bool *QAbstractButton } @@ -32,27 +34,51 @@ func (this *QPushButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPushButton(h *C.QPushButton) *QPushButton { +// newQPushButton constructs the type using only CGO pointers. +func newQPushButton(h *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPushButton { if h == nil { return nil } - return &QPushButton{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QPushButton{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQPushButton(h unsafe.Pointer) *QPushButton { - return newQPushButton((*C.QPushButton)(h)) +// UnsafeNewQPushButton constructs the type using only unsafe pointers. +func UnsafeNewQPushButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPushButton { + if h == nil { + return nil + } + + return &QPushButton{h: (*C.QPushButton)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPushButton constructs a new QPushButton object. func NewQPushButton(parent *QWidget) *QPushButton { - ret := C.QPushButton_new(parent.cPointer()) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new(parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton2 constructs a new QPushButton object. func NewQPushButton2() *QPushButton { - ret := C.QPushButton_new2() - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new2(&outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton3 constructs a new QPushButton object. @@ -61,8 +87,16 @@ func NewQPushButton3(text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new3(text_ms) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new3(text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton4 constructs a new QPushButton object. @@ -71,8 +105,16 @@ func NewQPushButton4(icon *QIcon, text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new4(icon.cPointer(), text_ms) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new4(icon.cPointer(), text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton5 constructs a new QPushButton object. @@ -81,8 +123,16 @@ func NewQPushButton5(text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new5(text_ms, parent.cPointer()) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new5(text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton6 constructs a new QPushButton object. @@ -91,8 +141,16 @@ func NewQPushButton6(icon *QIcon, text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer()) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPushButton) MetaObject() *QMetaObject { @@ -158,7 +216,7 @@ func (this *QPushButton) SetMenu(menu *QMenu) { } func (this *QPushButton) Menu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QPushButton_Menu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QPushButton_Menu(this.h)), nil, nil, nil) } func (this *QPushButton) SetFlat(flat bool) { @@ -217,9 +275,379 @@ func QPushButton_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPushButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QPushButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPushButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QPushButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_SizeHint +func miqt_exec_callback_QPushButton_SizeHint(self *C.QPushButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPushButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QPushButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPushButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QPushButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MinimumSizeHint +func miqt_exec_callback_QPushButton_MinimumSizeHint(self *C.QPushButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPushButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QPushButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QPushButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QPushButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_Event +func miqt_exec_callback_QPushButton_Event(self *C.QPushButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPushButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QPushButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QPushButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_PaintEvent +func miqt_exec_callback_QPushButton_PaintEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QPushButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QPushButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_KeyPressEvent +func miqt_exec_callback_QPushButton_KeyPressEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QPushButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QPushButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_FocusInEvent +func miqt_exec_callback_QPushButton_FocusInEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QPushButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QPushButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_FocusOutEvent +func miqt_exec_callback_QPushButton_FocusOutEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QPushButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QPushButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QPushButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_HitButton +func miqt_exec_callback_QPushButton_HitButton(self *C.QPushButton, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPushButton) callVirtualBase_CheckStateSet() { + + C.QPushButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QPushButton) OnCheckStateSet(slot func(super func())) { + C.QPushButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_CheckStateSet +func miqt_exec_callback_QPushButton_CheckStateSet(self *C.QPushButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPushButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QPushButton) callVirtualBase_NextCheckState() { + + C.QPushButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QPushButton) OnNextCheckState(slot func(super func())) { + C.QPushButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_NextCheckState +func miqt_exec_callback_QPushButton_NextCheckState(self *C.QPushButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPushButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QPushButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QPushButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QPushButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_KeyReleaseEvent +func miqt_exec_callback_QPushButton_KeyReleaseEvent(self *C.QPushButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QPushButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPushButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MousePressEvent +func miqt_exec_callback_QPushButton_MousePressEvent(self *C.QPushButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QPushButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPushButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MouseReleaseEvent +func miqt_exec_callback_QPushButton_MouseReleaseEvent(self *C.QPushButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QPushButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPushButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MouseMoveEvent +func miqt_exec_callback_QPushButton_MouseMoveEvent(self *C.QPushButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QPushButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QPushButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_ChangeEvent +func miqt_exec_callback_QPushButton_ChangeEvent(self *C.QPushButton, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QPushButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QPushButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QPushButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_TimerEvent +func miqt_exec_callback_QPushButton_TimerEvent(self *C.QPushButton, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QPushButton) Delete() { - C.QPushButton_Delete(this.h) + C.QPushButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qpushbutton.h b/qt/gen_qpushbutton.h index 20f27748..afa7f75d 100644 --- a/qt/gen_qpushbutton.h +++ b/qt/gen_qpushbutton.h @@ -15,27 +15,47 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; +class QEvent; +class QFocusEvent; class QIcon; +class QKeyEvent; class QMenu; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QPushButton; class QSize; +class QTimerEvent; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QIcon QIcon; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QPushButton QPushButton; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QPushButton* QPushButton_new(QWidget* parent); -QPushButton* QPushButton_new2(); -QPushButton* QPushButton_new3(struct miqt_string text); -QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text); -QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent); -QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent); +void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPushButton_MetaObject(const QPushButton* self); void* QPushButton_Metacast(QPushButton* self, const char* param1); struct miqt_string QPushButton_Tr(const char* s); @@ -51,11 +71,49 @@ QMenu* QPushButton_Menu(const QPushButton* self); void QPushButton_SetFlat(QPushButton* self, bool flat); bool QPushButton_IsFlat(const QPushButton* self); void QPushButton_ShowMenu(QPushButton* self); +bool QPushButton_Event(QPushButton* self, QEvent* e); +void QPushButton_PaintEvent(QPushButton* self, QPaintEvent* param1); +void QPushButton_KeyPressEvent(QPushButton* self, QKeyEvent* param1); +void QPushButton_FocusInEvent(QPushButton* self, QFocusEvent* param1); +void QPushButton_FocusOutEvent(QPushButton* self, QFocusEvent* param1); +bool QPushButton_HitButton(const QPushButton* self, QPoint* pos); struct miqt_string QPushButton_Tr2(const char* s, const char* c); struct miqt_string QPushButton_Tr3(const char* s, const char* c, int n); struct miqt_string QPushButton_TrUtf82(const char* s, const char* c); struct miqt_string QPushButton_TrUtf83(const char* s, const char* c, int n); -void QPushButton_Delete(QPushButton* self); +void QPushButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPushButton_virtualbase_SizeHint(const void* self); +void QPushButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPushButton_virtualbase_MinimumSizeHint(const void* self); +void QPushButton_override_virtual_Event(void* self, intptr_t slot); +bool QPushButton_virtualbase_Event(void* self, QEvent* e); +void QPushButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QPushButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QPushButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QPushButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QPushButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QPushButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QPushButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QPushButton_virtualbase_CheckStateSet(void* self); +void QPushButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QPushButton_virtualbase_NextCheckState(void* self); +void QPushButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QPushButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QPushButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QPushButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QPushButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_ChangeEvent(void* self, QEvent* e); +void QPushButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QPushButton_Delete(QPushButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qquaternion.cpp b/qt/gen_qquaternion.cpp index 902d1db3..832e42f9 100644 --- a/qt/gen_qquaternion.cpp +++ b/qt/gen_qquaternion.cpp @@ -5,28 +5,34 @@ #include "gen_qquaternion.h" #include "_cgo_export.h" -QQuaternion* QQuaternion_new() { - return new QQuaternion(); +void QQuaternion_new(QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new2(int param1) { - return new QQuaternion(static_cast(param1)); +void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(static_cast(param1)); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos) { - return new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); +void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector) { - return new QQuaternion(static_cast(scalar), *vector); +void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(static_cast(scalar), *vector); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new5(QVector4D* vector) { - return new QQuaternion(*vector); +void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(*vector); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new6(QQuaternion* param1) { - return new QQuaternion(*param1); +void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(*param1); + *outptr_QQuaternion = ret; } bool QQuaternion_IsNull(const QQuaternion* self) { @@ -207,7 +213,11 @@ QQuaternion* QQuaternion_Nlerp(QQuaternion* q1, QQuaternion* q2, float t) { return new QQuaternion(QQuaternion::nlerp(*q1, *q2, static_cast(t))); } -void QQuaternion_Delete(QQuaternion* self) { - delete self; +void QQuaternion_Delete(QQuaternion* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qquaternion.go b/qt/gen_qquaternion.go index 49cb53c4..a5f2974a 100644 --- a/qt/gen_qquaternion.go +++ b/qt/gen_qquaternion.go @@ -14,7 +14,8 @@ import ( ) type QQuaternion struct { - h *C.QQuaternion + h *C.QQuaternion + isSubclass bool } func (this *QQuaternion) cPointer() *C.QQuaternion { @@ -31,6 +32,7 @@ func (this *QQuaternion) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQQuaternion constructs the type using only CGO pointers. func newQQuaternion(h *C.QQuaternion) *QQuaternion { if h == nil { return nil @@ -38,44 +40,73 @@ func newQQuaternion(h *C.QQuaternion) *QQuaternion { return &QQuaternion{h: h} } +// UnsafeNewQQuaternion constructs the type using only unsafe pointers. func UnsafeNewQQuaternion(h unsafe.Pointer) *QQuaternion { - return newQQuaternion((*C.QQuaternion)(h)) + if h == nil { + return nil + } + + return &QQuaternion{h: (*C.QQuaternion)(h)} } // NewQQuaternion constructs a new QQuaternion object. func NewQQuaternion() *QQuaternion { - ret := C.QQuaternion_new() - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new(&outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion2 constructs a new QQuaternion object. func NewQQuaternion2(param1 Initialization) *QQuaternion { - ret := C.QQuaternion_new2((C.int)(param1)) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new2((C.int)(param1), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion3 constructs a new QQuaternion object. func NewQQuaternion3(scalar float32, xpos float32, ypos float32, zpos float32) *QQuaternion { - ret := C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos)) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion4 constructs a new QQuaternion object. func NewQQuaternion4(scalar float32, vector *QVector3D) *QQuaternion { - ret := C.QQuaternion_new4((C.float)(scalar), vector.cPointer()) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new4((C.float)(scalar), vector.cPointer(), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion5 constructs a new QQuaternion object. func NewQQuaternion5(vector *QVector4D) *QQuaternion { - ret := C.QQuaternion_new5(vector.cPointer()) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new5(vector.cPointer(), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion6 constructs a new QQuaternion object. func NewQQuaternion6(param1 *QQuaternion) *QQuaternion { - ret := C.QQuaternion_new6(param1.cPointer()) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new6(param1.cPointer(), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } func (this *QQuaternion) IsNull() bool { @@ -299,7 +330,7 @@ func QQuaternion_Nlerp(q1 *QQuaternion, q2 *QQuaternion, t float32) *QQuaternion // Delete this object from C++ memory. func (this *QQuaternion) Delete() { - C.QQuaternion_Delete(this.h) + C.QQuaternion_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qquaternion.h b/qt/gen_qquaternion.h index 8da76fdb..cff44ba8 100644 --- a/qt/gen_qquaternion.h +++ b/qt/gen_qquaternion.h @@ -24,12 +24,12 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QQuaternion* QQuaternion_new(); -QQuaternion* QQuaternion_new2(int param1); -QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos); -QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector); -QQuaternion* QQuaternion_new5(QVector4D* vector); -QQuaternion* QQuaternion_new6(QQuaternion* param1); +void QQuaternion_new(QQuaternion** outptr_QQuaternion); +void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion); +void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion); +void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion); +void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion); +void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion); bool QQuaternion_IsNull(const QQuaternion* self); bool QQuaternion_IsIdentity(const QQuaternion* self); QVector3D* QQuaternion_Vector(const QQuaternion* self); @@ -72,7 +72,7 @@ QQuaternion* QQuaternion_FromDirection(QVector3D* direction, QVector3D* up); QQuaternion* QQuaternion_RotationTo(QVector3D* from, QVector3D* to); QQuaternion* QQuaternion_Slerp(QQuaternion* q1, QQuaternion* q2, float t); QQuaternion* QQuaternion_Nlerp(QQuaternion* q1, QQuaternion* q2, float t); -void QQuaternion_Delete(QQuaternion* self); +void QQuaternion_Delete(QQuaternion* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qradiobutton.cpp b/qt/gen_qradiobutton.cpp index c2e289b0..ab135c96 100644 --- a/qt/gen_qradiobutton.cpp +++ b/qt/gen_qradiobutton.cpp @@ -1,30 +1,450 @@ +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include "gen_qradiobutton.h" #include "_cgo_export.h" -QRadioButton* QRadioButton_new(QWidget* parent) { - return new QRadioButton(parent); +class MiqtVirtualQRadioButton : public virtual QRadioButton { +public: + + MiqtVirtualQRadioButton(QWidget* parent): QRadioButton(parent) {}; + MiqtVirtualQRadioButton(): QRadioButton() {}; + MiqtVirtualQRadioButton(const QString& text): QRadioButton(text) {}; + MiqtVirtualQRadioButton(const QString& text, QWidget* parent): QRadioButton(text, parent) {}; + + virtual ~MiqtVirtualQRadioButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QRadioButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRadioButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QRadioButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QRadioButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRadioButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QRadioButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QRadioButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QRadioButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QRadioButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& param1) const override { + if (handle__HitButton == 0) { + return QRadioButton::hitButton(param1); + } + + const QPoint& param1_ret = param1; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(¶m1_ret); + + bool callback_return_value = miqt_exec_callback_QRadioButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* param1) const { + + return QRadioButton::hitButton(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QRadioButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QRadioButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QRadioButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QRadioButton::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QRadioButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QRadioButton::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QRadioButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QRadioButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QRadioButton::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QRadioButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QRadioButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QRadioButton::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QRadioButton::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QRadioButton::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QRadioButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QRadioButton::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QRadioButton::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QRadioButton::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QRadioButton::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QRadioButton::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QRadioButton::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QRadioButton::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QRadioButton::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QRadioButton::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QRadioButton::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QRadioButton::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QRadioButton::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QRadioButton::timerEvent(e); + + } + +}; + +void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(parent); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRadioButton* QRadioButton_new2() { - return new QRadioButton(); +void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRadioButton* QRadioButton_new3(struct miqt_string text) { +void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QRadioButton(text_QString); + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent) { +void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QRadioButton(text_QString, parent); + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString, parent); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QRadioButton_MetaObject(const QRadioButton* self) { @@ -109,7 +529,139 @@ struct miqt_string QRadioButton_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QRadioButton_Delete(QRadioButton* self) { - delete self; +void QRadioButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QRadioButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_SizeHint(); +} + +void QRadioButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QRadioButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QRadioButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__Event = slot; +} + +bool QRadioButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_Event(e); +} + +void QRadioButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__HitButton = slot; +} + +bool QRadioButton_virtualbase_HitButton(const void* self, QPoint* param1) { + return ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_HitButton(param1); +} + +void QRadioButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__PaintEvent = slot; +} + +void QRadioButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QRadioButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QRadioButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QRadioButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__CheckStateSet = slot; +} + +void QRadioButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QRadioButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__NextCheckState = slot; +} + +void QRadioButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_NextCheckState(); +} + +void QRadioButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QRadioButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QRadioButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QRadioButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QRadioButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MousePressEvent = slot; +} + +void QRadioButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_MousePressEvent(e); +} + +void QRadioButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QRadioButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QRadioButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__FocusInEvent = slot; +} + +void QRadioButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_FocusInEvent(e); +} + +void QRadioButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QRadioButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QRadioButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__ChangeEvent = slot; +} + +void QRadioButton_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_ChangeEvent(e); +} + +void QRadioButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__TimerEvent = slot; +} + +void QRadioButton_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_TimerEvent(e); +} + +void QRadioButton_Delete(QRadioButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qradiobutton.go b/qt/gen_qradiobutton.go index b69586f7..7e442e2b 100644 --- a/qt/gen_qradiobutton.go +++ b/qt/gen_qradiobutton.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QRadioButton struct { - h *C.QRadioButton + h *C.QRadioButton + isSubclass bool *QAbstractButton } @@ -32,27 +34,51 @@ func (this *QRadioButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadioButton(h *C.QRadioButton) *QRadioButton { +// newQRadioButton constructs the type using only CGO pointers. +func newQRadioButton(h *C.QRadioButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRadioButton { if h == nil { return nil } - return &QRadioButton{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QRadioButton{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQRadioButton(h unsafe.Pointer) *QRadioButton { - return newQRadioButton((*C.QRadioButton)(h)) +// UnsafeNewQRadioButton constructs the type using only unsafe pointers. +func UnsafeNewQRadioButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRadioButton { + if h == nil { + return nil + } + + return &QRadioButton{h: (*C.QRadioButton)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQRadioButton constructs a new QRadioButton object. func NewQRadioButton(parent *QWidget) *QRadioButton { - ret := C.QRadioButton_new(parent.cPointer()) - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new(parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRadioButton2 constructs a new QRadioButton object. func NewQRadioButton2() *QRadioButton { - ret := C.QRadioButton_new2() - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new2(&outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRadioButton3 constructs a new QRadioButton object. @@ -61,8 +87,16 @@ func NewQRadioButton3(text string) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QRadioButton_new3(text_ms) - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new3(text_ms, &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRadioButton4 constructs a new QRadioButton object. @@ -71,8 +105,16 @@ func NewQRadioButton4(text string, parent *QWidget) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QRadioButton_new4(text_ms, parent.cPointer()) - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new4(text_ms, parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QRadioButton) MetaObject() *QMetaObject { @@ -161,9 +203,379 @@ func QRadioButton_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QRadioButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QRadioButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRadioButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QRadioButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_SizeHint +func miqt_exec_callback_QRadioButton_SizeHint(self *C.QRadioButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRadioButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QRadioButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRadioButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QRadioButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MinimumSizeHint +func miqt_exec_callback_QRadioButton_MinimumSizeHint(self *C.QRadioButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRadioButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QRadioButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QRadioButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QRadioButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_Event +func miqt_exec_callback_QRadioButton_Event(self *C.QRadioButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioButton) callVirtualBase_HitButton(param1 *QPoint) bool { + + return (bool)(C.QRadioButton_virtualbase_HitButton(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QRadioButton) OnHitButton(slot func(super func(param1 *QPoint) bool, param1 *QPoint) bool) { + C.QRadioButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_HitButton +func miqt_exec_callback_QRadioButton_HitButton(self *C.QRadioButton, cb C.intptr_t, param1 *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPoint) bool, param1 *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QRadioButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRadioButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QRadioButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_PaintEvent +func miqt_exec_callback_QRadioButton_PaintEvent(self *C.QRadioButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QRadioButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRadioButton) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QRadioButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MouseMoveEvent +func miqt_exec_callback_QRadioButton_MouseMoveEvent(self *C.QRadioButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_CheckStateSet() { + + C.QRadioButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QRadioButton) OnCheckStateSet(slot func(super func())) { + C.QRadioButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_CheckStateSet +func miqt_exec_callback_QRadioButton_CheckStateSet(self *C.QRadioButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QRadioButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QRadioButton) callVirtualBase_NextCheckState() { + + C.QRadioButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QRadioButton) OnNextCheckState(slot func(super func())) { + C.QRadioButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_NextCheckState +func miqt_exec_callback_QRadioButton_NextCheckState(self *C.QRadioButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QRadioButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QRadioButton) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QRadioButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QRadioButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_KeyPressEvent +func miqt_exec_callback_QRadioButton_KeyPressEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QRadioButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QRadioButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_KeyReleaseEvent +func miqt_exec_callback_QRadioButton_KeyReleaseEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QRadioButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QRadioButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MousePressEvent +func miqt_exec_callback_QRadioButton_MousePressEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QRadioButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QRadioButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MouseReleaseEvent +func miqt_exec_callback_QRadioButton_MouseReleaseEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QRadioButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QRadioButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_FocusInEvent +func miqt_exec_callback_QRadioButton_FocusInEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QRadioButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QRadioButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_FocusOutEvent +func miqt_exec_callback_QRadioButton_FocusOutEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QRadioButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QRadioButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_ChangeEvent +func miqt_exec_callback_QRadioButton_ChangeEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QRadioButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QRadioButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QRadioButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_TimerEvent +func miqt_exec_callback_QRadioButton_TimerEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QRadioButton) Delete() { - C.QRadioButton_Delete(this.h) + C.QRadioButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qradiobutton.h b/qt/gen_qradiobutton.h index 6ebf43a8..ce112dce 100644 --- a/qt/gen_qradiobutton.h +++ b/qt/gen_qradiobutton.h @@ -15,32 +15,88 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QRadioButton; class QSize; +class QTimerEvent; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QRadioButton QRadioButton; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QRadioButton* QRadioButton_new(QWidget* parent); -QRadioButton* QRadioButton_new2(); -QRadioButton* QRadioButton_new3(struct miqt_string text); -QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent); +void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QRadioButton_MetaObject(const QRadioButton* self); void* QRadioButton_Metacast(QRadioButton* self, const char* param1); struct miqt_string QRadioButton_Tr(const char* s); struct miqt_string QRadioButton_TrUtf8(const char* s); QSize* QRadioButton_SizeHint(const QRadioButton* self); QSize* QRadioButton_MinimumSizeHint(const QRadioButton* self); +bool QRadioButton_Event(QRadioButton* self, QEvent* e); +bool QRadioButton_HitButton(const QRadioButton* self, QPoint* param1); +void QRadioButton_PaintEvent(QRadioButton* self, QPaintEvent* param1); +void QRadioButton_MouseMoveEvent(QRadioButton* self, QMouseEvent* param1); struct miqt_string QRadioButton_Tr2(const char* s, const char* c); struct miqt_string QRadioButton_Tr3(const char* s, const char* c, int n); struct miqt_string QRadioButton_TrUtf82(const char* s, const char* c); struct miqt_string QRadioButton_TrUtf83(const char* s, const char* c, int n); -void QRadioButton_Delete(QRadioButton* self); +void QRadioButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QRadioButton_virtualbase_SizeHint(const void* self); +void QRadioButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QRadioButton_virtualbase_MinimumSizeHint(const void* self); +void QRadioButton_override_virtual_Event(void* self, intptr_t slot); +bool QRadioButton_virtualbase_Event(void* self, QEvent* e); +void QRadioButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QRadioButton_virtualbase_HitButton(const void* self, QPoint* param1); +void QRadioButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QRadioButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QRadioButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QRadioButton_virtualbase_CheckStateSet(void* self); +void QRadioButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QRadioButton_virtualbase_NextCheckState(void* self); +void QRadioButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QRadioButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QRadioButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QRadioButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QRadioButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QRadioButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QRadioButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_ChangeEvent(void* self, QEvent* e); +void QRadioButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QRadioButton_Delete(QRadioButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrandom.cpp b/qt/gen_qrandom.cpp index 5c07b35d..807cdca7 100644 --- a/qt/gen_qrandom.cpp +++ b/qt/gen_qrandom.cpp @@ -4,24 +4,29 @@ #include "gen_qrandom.h" #include "_cgo_export.h" -QRandomGenerator* QRandomGenerator_new() { - return new QRandomGenerator(); +void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { - return new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); +void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end) { - return new QRandomGenerator(static_cast(begin), static_cast(end)); +void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(static_cast(begin), static_cast(end)); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other) { - return new QRandomGenerator(*other); +void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(*other); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue) { - return new QRandomGenerator(static_cast(seedValue)); +void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(static_cast(seedValue)); + *outptr_QRandomGenerator = ret; } void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other) { @@ -107,32 +112,48 @@ void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s) { self->seed(static_cast(s)); } -void QRandomGenerator_Delete(QRandomGenerator* self) { - delete self; +void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRandomGenerator64* QRandomGenerator64_new() { - return new QRandomGenerator64(); +void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { - return new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); +void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end) { - return new QRandomGenerator64(static_cast(begin), static_cast(end)); +void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(static_cast(begin), static_cast(end)); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other) { - return new QRandomGenerator64(*other); +void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(*other); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1) { - return new QRandomGenerator64(*param1); +void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(*param1); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue) { - return new QRandomGenerator64(static_cast(seedValue)); +void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedValue)); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self) { @@ -175,7 +196,11 @@ void QRandomGenerator64_OperatorAssign(QRandomGenerator64* self, QRandomGenerato self->operator=(*param1); } -void QRandomGenerator64_Delete(QRandomGenerator64* self) { - delete self; +void QRandomGenerator64_Delete(QRandomGenerator64* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrandom.go b/qt/gen_qrandom.go index 0bd27417..c803471e 100644 --- a/qt/gen_qrandom.go +++ b/qt/gen_qrandom.go @@ -14,7 +14,8 @@ import ( ) type QRandomGenerator struct { - h *C.QRandomGenerator + h *C.QRandomGenerator + isSubclass bool } func (this *QRandomGenerator) cPointer() *C.QRandomGenerator { @@ -31,6 +32,7 @@ func (this *QRandomGenerator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRandomGenerator constructs the type using only CGO pointers. func newQRandomGenerator(h *C.QRandomGenerator) *QRandomGenerator { if h == nil { return nil @@ -38,38 +40,63 @@ func newQRandomGenerator(h *C.QRandomGenerator) *QRandomGenerator { return &QRandomGenerator{h: h} } +// UnsafeNewQRandomGenerator constructs the type using only unsafe pointers. func UnsafeNewQRandomGenerator(h unsafe.Pointer) *QRandomGenerator { - return newQRandomGenerator((*C.QRandomGenerator)(h)) + if h == nil { + return nil + } + + return &QRandomGenerator{h: (*C.QRandomGenerator)(h)} } // NewQRandomGenerator constructs a new QRandomGenerator object. func NewQRandomGenerator() *QRandomGenerator { - ret := C.QRandomGenerator_new() - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new(&outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator2 constructs a new QRandomGenerator object. func NewQRandomGenerator2(seedBuffer *uint, lenVal int64) *QRandomGenerator { - ret := C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal)) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator3 constructs a new QRandomGenerator object. func NewQRandomGenerator3(begin *uint, end *uint) *QRandomGenerator { - ret := C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end))) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator4 constructs a new QRandomGenerator object. func NewQRandomGenerator4(other *QRandomGenerator) *QRandomGenerator { - ret := C.QRandomGenerator_new4(other.cPointer()) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new4(other.cPointer(), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator5 constructs a new QRandomGenerator object. func NewQRandomGenerator5(seedValue uint) *QRandomGenerator { - ret := C.QRandomGenerator_new5((C.uint)(seedValue)) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new5((C.uint)(seedValue), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } func (this *QRandomGenerator) OperatorAssign(other *QRandomGenerator) { @@ -153,7 +180,7 @@ func (this *QRandomGenerator) Seed1(s uint) { // Delete this object from C++ memory. func (this *QRandomGenerator) Delete() { - C.QRandomGenerator_Delete(this.h) + C.QRandomGenerator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -166,7 +193,8 @@ func (this *QRandomGenerator) GoGC() { } type QRandomGenerator64 struct { - h *C.QRandomGenerator64 + h *C.QRandomGenerator64 + isSubclass bool *QRandomGenerator } @@ -184,51 +212,89 @@ func (this *QRandomGenerator64) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRandomGenerator64(h *C.QRandomGenerator64) *QRandomGenerator64 { +// newQRandomGenerator64 constructs the type using only CGO pointers. +func newQRandomGenerator64(h *C.QRandomGenerator64, h_QRandomGenerator *C.QRandomGenerator) *QRandomGenerator64 { if h == nil { return nil } - return &QRandomGenerator64{h: h, QRandomGenerator: UnsafeNewQRandomGenerator(unsafe.Pointer(h))} + return &QRandomGenerator64{h: h, + QRandomGenerator: newQRandomGenerator(h_QRandomGenerator)} } -func UnsafeNewQRandomGenerator64(h unsafe.Pointer) *QRandomGenerator64 { - return newQRandomGenerator64((*C.QRandomGenerator64)(h)) +// UnsafeNewQRandomGenerator64 constructs the type using only unsafe pointers. +func UnsafeNewQRandomGenerator64(h unsafe.Pointer, h_QRandomGenerator unsafe.Pointer) *QRandomGenerator64 { + if h == nil { + return nil + } + + return &QRandomGenerator64{h: (*C.QRandomGenerator64)(h), + QRandomGenerator: UnsafeNewQRandomGenerator(h_QRandomGenerator)} } // NewQRandomGenerator64 constructs a new QRandomGenerator64 object. func NewQRandomGenerator64() *QRandomGenerator64 { - ret := C.QRandomGenerator64_new() - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new(&outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator642 constructs a new QRandomGenerator64 object. func NewQRandomGenerator642(seedBuffer *uint, lenVal int64) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal)) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator643 constructs a new QRandomGenerator64 object. func NewQRandomGenerator643(begin *uint, end *uint) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end))) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator644 constructs a new QRandomGenerator64 object. func NewQRandomGenerator644(other *QRandomGenerator) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new4(other.cPointer()) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new4(other.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator645 constructs a new QRandomGenerator64 object. func NewQRandomGenerator645(param1 *QRandomGenerator64) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new5(param1.cPointer()) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new5(param1.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator646 constructs a new QRandomGenerator64 object. func NewQRandomGenerator646(seedValue uint) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new6((C.uint)(seedValue)) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new6((C.uint)(seedValue), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } func (this *QRandomGenerator64) Generate() uint64 { @@ -252,16 +318,16 @@ func QRandomGenerator64_Max() uint64 { } func QRandomGenerator64_System() *QRandomGenerator64 { - return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_System())) + return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_System()), nil) } func QRandomGenerator64_Global() *QRandomGenerator64 { - return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_Global())) + return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_Global()), nil) } func QRandomGenerator64_SecurelySeeded() *QRandomGenerator64 { _ret := C.QRandomGenerator64_SecurelySeeded() - _goptr := newQRandomGenerator64(_ret) + _goptr := newQRandomGenerator64(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -272,7 +338,7 @@ func (this *QRandomGenerator64) OperatorAssign(param1 *QRandomGenerator64) { // Delete this object from C++ memory. func (this *QRandomGenerator64) Delete() { - C.QRandomGenerator64_Delete(this.h) + C.QRandomGenerator64_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrandom.h b/qt/gen_qrandom.h index 0a18a7bb..c79a6195 100644 --- a/qt/gen_qrandom.h +++ b/qt/gen_qrandom.h @@ -22,11 +22,11 @@ typedef struct QRandomGenerator QRandomGenerator; typedef struct QRandomGenerator64 QRandomGenerator64; #endif -QRandomGenerator* QRandomGenerator_new(); -QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); -QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end); -QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other); -QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue); +void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator); void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other); unsigned int QRandomGenerator_Generate(QRandomGenerator* self); unsigned long long QRandomGenerator_Generate64(QRandomGenerator* self); @@ -46,14 +46,14 @@ QRandomGenerator* QRandomGenerator_System(); QRandomGenerator* QRandomGenerator_Global(); QRandomGenerator* QRandomGenerator_SecurelySeeded(); void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s); -void QRandomGenerator_Delete(QRandomGenerator* self); +void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass); -QRandomGenerator64* QRandomGenerator64_new(); -QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); -QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end); -QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other); -QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1); -QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue); +void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self); unsigned long long QRandomGenerator64_OperatorCall(QRandomGenerator64* self); void QRandomGenerator64_Discard(QRandomGenerator64* self, unsigned long long z); @@ -63,7 +63,7 @@ QRandomGenerator64* QRandomGenerator64_System(); QRandomGenerator64* QRandomGenerator64_Global(); QRandomGenerator64* QRandomGenerator64_SecurelySeeded(); void QRandomGenerator64_OperatorAssign(QRandomGenerator64* self, QRandomGenerator64* param1); -void QRandomGenerator64_Delete(QRandomGenerator64* self); +void QRandomGenerator64_Delete(QRandomGenerator64* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrasterwindow.cpp b/qt/gen_qrasterwindow.cpp index 67e0aeb1..97a76be3 100644 --- a/qt/gen_qrasterwindow.cpp +++ b/qt/gen_qrasterwindow.cpp @@ -1,19 +1,167 @@ +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include "gen_qrasterwindow.h" #include "_cgo_export.h" -QRasterWindow* QRasterWindow_new() { - return new QRasterWindow(); +class MiqtVirtualQRasterWindow : public virtual QRasterWindow { +public: + + MiqtVirtualQRasterWindow(): QRasterWindow() {}; + MiqtVirtualQRasterWindow(QWindow* parent): QRasterWindow(parent) {}; + + virtual ~MiqtVirtualQRasterWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override { + if (handle__Metric == 0) { + return QRasterWindow::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QRasterWindow_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int metric) const { + + return QRasterWindow::metric(static_cast(metric)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* param1) const override { + if (handle__Redirected == 0) { + return QRasterWindow::redirected(param1); + } + + QPoint* sigval1 = param1; + + QPaintDevice* callback_return_value = miqt_exec_callback_QRasterWindow_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* param1) const { + + return QRasterWindow::redirected(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QRasterWindow::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QRasterWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QRasterWindow::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExposeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void exposeEvent(QExposeEvent* param1) override { + if (handle__ExposeEvent == 0) { + QRasterWindow::exposeEvent(param1); + return; + } + + QExposeEvent* sigval1 = param1; + + miqt_exec_callback_QRasterWindow_ExposeEvent(this, handle__ExposeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ExposeEvent(QExposeEvent* param1) { + + QRasterWindow::exposeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QRasterWindow::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QRasterWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QRasterWindow::event(event); + + } + +}; + +void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(); + *outptr_QRasterWindow = ret; + *outptr_QPaintDeviceWindow = static_cast(ret); + *outptr_QWindow = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRasterWindow* QRasterWindow_new2(QWindow* parent) { - return new QRasterWindow(parent); +void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(parent); + *outptr_QRasterWindow = ret; + *outptr_QPaintDeviceWindow = static_cast(ret); + *outptr_QWindow = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self) { @@ -90,7 +238,51 @@ struct miqt_string QRasterWindow_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QRasterWindow_Delete(QRasterWindow* self) { - delete self; +void QRasterWindow_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__Metric = slot; +} + +int QRasterWindow_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQRasterWindow*)(self) )->virtualbase_Metric(metric); +} + +void QRasterWindow_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QRasterWindow_virtualbase_Redirected(const void* self, QPoint* param1) { + return ( (const MiqtVirtualQRasterWindow*)(self) )->virtualbase_Redirected(param1); +} + +void QRasterWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__PaintEvent = slot; +} + +void QRasterWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_PaintEvent(event); +} + +void QRasterWindow_override_virtual_ExposeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__ExposeEvent = slot; +} + +void QRasterWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1) { + ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_ExposeEvent(param1); +} + +void QRasterWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__Event = slot; +} + +bool QRasterWindow_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_Event(event); +} + +void QRasterWindow_Delete(QRasterWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrasterwindow.go b/qt/gen_qrasterwindow.go index 5a065dd1..72de8a13 100644 --- a/qt/gen_qrasterwindow.go +++ b/qt/gen_qrasterwindow.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QRasterWindow struct { - h *C.QRasterWindow + h *C.QRasterWindow + isSubclass bool *QPaintDeviceWindow } @@ -32,27 +34,53 @@ func (this *QRasterWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRasterWindow(h *C.QRasterWindow) *QRasterWindow { +// newQRasterWindow constructs the type using only CGO pointers. +func newQRasterWindow(h *C.QRasterWindow, h_QPaintDeviceWindow *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QRasterWindow { if h == nil { return nil } - return &QRasterWindow{h: h, QPaintDeviceWindow: UnsafeNewQPaintDeviceWindow(unsafe.Pointer(h))} + return &QRasterWindow{h: h, + QPaintDeviceWindow: newQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} } -func UnsafeNewQRasterWindow(h unsafe.Pointer) *QRasterWindow { - return newQRasterWindow((*C.QRasterWindow)(h)) +// UnsafeNewQRasterWindow constructs the type using only unsafe pointers. +func UnsafeNewQRasterWindow(h unsafe.Pointer, h_QPaintDeviceWindow unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRasterWindow { + if h == nil { + return nil + } + + return &QRasterWindow{h: (*C.QRasterWindow)(h), + QPaintDeviceWindow: UnsafeNewQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} } // NewQRasterWindow constructs a new QRasterWindow object. func NewQRasterWindow() *QRasterWindow { - ret := C.QRasterWindow_new() - return newQRasterWindow(ret) + var outptr_QRasterWindow *C.QRasterWindow = nil + var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRasterWindow_new(&outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) + ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRasterWindow2 constructs a new QRasterWindow object. func NewQRasterWindow2(parent *QWindow) *QRasterWindow { - ret := C.QRasterWindow_new2(parent.cPointer()) - return newQRasterWindow(ret) + var outptr_QRasterWindow *C.QRasterWindow = nil + var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRasterWindow_new2(parent.cPointer(), &outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) + ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QRasterWindow) MetaObject() *QMetaObject { @@ -127,9 +155,129 @@ func QRasterWindow_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QRasterWindow) callVirtualBase_Metric(metric QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QRasterWindow_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QRasterWindow) OnMetric(slot func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) { + C.QRasterWindow_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_Metric +func miqt_exec_callback_QRasterWindow_Metric(self *C.QRasterWindow, cb C.intptr_t, metric C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(metric) + + virtualReturn := gofunc((&QRasterWindow{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QRasterWindow) callVirtualBase_Redirected(param1 *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QRasterWindow_virtualbase_Redirected(unsafe.Pointer(this.h), param1.cPointer()))) +} +func (this *QRasterWindow) OnRedirected(slot func(super func(param1 *QPoint) *QPaintDevice, param1 *QPoint) *QPaintDevice) { + C.QRasterWindow_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_Redirected +func miqt_exec_callback_QRasterWindow_Redirected(self *C.QRasterWindow, cb C.intptr_t, param1 *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPoint) *QPaintDevice, param1 *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QRasterWindow{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QRasterWindow) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QRasterWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRasterWindow) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QRasterWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_PaintEvent +func miqt_exec_callback_QRasterWindow_PaintEvent(self *C.QRasterWindow, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QRasterWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QRasterWindow) callVirtualBase_ExposeEvent(param1 *QExposeEvent) { + + C.QRasterWindow_virtualbase_ExposeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRasterWindow) OnExposeEvent(slot func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) { + C.QRasterWindow_override_virtual_ExposeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_ExposeEvent +func miqt_exec_callback_QRasterWindow_ExposeEvent(self *C.QRasterWindow, cb C.intptr_t, param1 *C.QExposeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQExposeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRasterWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) + +} + +func (this *QRasterWindow) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QRasterWindow_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QRasterWindow) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QRasterWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_Event +func miqt_exec_callback_QRasterWindow_Event(self *C.QRasterWindow, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QRasterWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QRasterWindow) Delete() { - C.QRasterWindow_Delete(this.h) + C.QRasterWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrasterwindow.h b/qt/gen_qrasterwindow.h index 573c08d3..7b22bc55 100644 --- a/qt/gen_qrasterwindow.h +++ b/qt/gen_qrasterwindow.h @@ -15,26 +15,54 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QExposeEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintDeviceWindow; +class QPaintEvent; +class QPoint; class QRasterWindow; +class QSurface; class QWindow; #else +typedef struct QEvent QEvent; +typedef struct QExposeEvent QExposeEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintDeviceWindow QPaintDeviceWindow; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QRasterWindow QRasterWindow; +typedef struct QSurface QSurface; typedef struct QWindow QWindow; #endif -QRasterWindow* QRasterWindow_new(); -QRasterWindow* QRasterWindow_new2(QWindow* parent); +void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); +void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self); void* QRasterWindow_Metacast(QRasterWindow* self, const char* param1); struct miqt_string QRasterWindow_Tr(const char* s); struct miqt_string QRasterWindow_TrUtf8(const char* s); +int QRasterWindow_Metric(const QRasterWindow* self, int metric); +QPaintDevice* QRasterWindow_Redirected(const QRasterWindow* self, QPoint* param1); struct miqt_string QRasterWindow_Tr2(const char* s, const char* c); struct miqt_string QRasterWindow_Tr3(const char* s, const char* c, int n); struct miqt_string QRasterWindow_TrUtf82(const char* s, const char* c); struct miqt_string QRasterWindow_TrUtf83(const char* s, const char* c, int n); -void QRasterWindow_Delete(QRasterWindow* self); +void QRasterWindow_override_virtual_Metric(void* self, intptr_t slot); +int QRasterWindow_virtualbase_Metric(const void* self, int metric); +void QRasterWindow_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QRasterWindow_virtualbase_Redirected(const void* self, QPoint* param1); +void QRasterWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QRasterWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QRasterWindow_override_virtual_ExposeEvent(void* self, intptr_t slot); +void QRasterWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1); +void QRasterWindow_override_virtual_Event(void* self, intptr_t slot); +bool QRasterWindow_virtualbase_Event(void* self, QEvent* event); +void QRasterWindow_Delete(QRasterWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrawfont.cpp b/qt/gen_qrawfont.cpp index a129da43..5b2388df 100644 --- a/qt/gen_qrawfont.cpp +++ b/qt/gen_qrawfont.cpp @@ -15,32 +15,38 @@ #include "gen_qrawfont.h" #include "_cgo_export.h" -QRawFont* QRawFont_new() { - return new QRawFont(); +void QRawFont_new(QRawFont** outptr_QRawFont) { + QRawFont* ret = new QRawFont(); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize) { +void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QRawFont(fileName_QString, static_cast(pixelSize)); + QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize)); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize) { +void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - return new QRawFont(fontData_QByteArray, static_cast(pixelSize)); + QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize)); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new4(QRawFont* other) { - return new QRawFont(*other); +void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont) { + QRawFont* ret = new QRawFont(*other); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference) { +void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); + QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference) { +void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - return new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); + QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); + *outptr_QRawFont = ret; } void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other) { @@ -291,7 +297,11 @@ QRawFont* QRawFont_FromFont2(QFont* font, int writingSystem) { return new QRawFont(QRawFont::fromFont(*font, static_cast(writingSystem))); } -void QRawFont_Delete(QRawFont* self) { - delete self; +void QRawFont_Delete(QRawFont* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrawfont.go b/qt/gen_qrawfont.go index 80ef06f3..6dad0448 100644 --- a/qt/gen_qrawfont.go +++ b/qt/gen_qrawfont.go @@ -29,7 +29,8 @@ const ( ) type QRawFont struct { - h *C.QRawFont + h *C.QRawFont + isSubclass bool } func (this *QRawFont) cPointer() *C.QRawFont { @@ -46,6 +47,7 @@ func (this *QRawFont) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRawFont constructs the type using only CGO pointers. func newQRawFont(h *C.QRawFont) *QRawFont { if h == nil { return nil @@ -53,14 +55,23 @@ func newQRawFont(h *C.QRawFont) *QRawFont { return &QRawFont{h: h} } +// UnsafeNewQRawFont constructs the type using only unsafe pointers. func UnsafeNewQRawFont(h unsafe.Pointer) *QRawFont { - return newQRawFont((*C.QRawFont)(h)) + if h == nil { + return nil + } + + return &QRawFont{h: (*C.QRawFont)(h)} } // NewQRawFont constructs a new QRawFont object. func NewQRawFont() *QRawFont { - ret := C.QRawFont_new() - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new(&outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont2 constructs a new QRawFont object. @@ -69,8 +80,12 @@ func NewQRawFont2(fileName string, pixelSize float64) *QRawFont { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QRawFont_new2(fileName_ms, (C.double)(pixelSize)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new2(fileName_ms, (C.double)(pixelSize), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont3 constructs a new QRawFont object. @@ -78,14 +93,22 @@ func NewQRawFont3(fontData []byte, pixelSize float64) *QRawFont { fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - ret := C.QRawFont_new3(fontData_alias, (C.double)(pixelSize)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new3(fontData_alias, (C.double)(pixelSize), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont4 constructs a new QRawFont object. func NewQRawFont4(other *QRawFont) *QRawFont { - ret := C.QRawFont_new4(other.cPointer()) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new4(other.cPointer(), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont5 constructs a new QRawFont object. @@ -94,8 +117,12 @@ func NewQRawFont5(fileName string, pixelSize float64, hintingPreference QFont__H fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont6 constructs a new QRawFont object. @@ -103,8 +130,12 @@ func NewQRawFont6(fontData []byte, pixelSize float64, hintingPreference QFont__H fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - ret := C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } func (this *QRawFont) OperatorAssign(other *QRawFont) { @@ -215,7 +246,7 @@ func (this *QRawFont) AdvancesForGlyphIndexes4(glyphIndexes *uint, advances *QPo func (this *QRawFont) AlphaMapForGlyph(glyphIndex uint) *QImage { _ret := C.QRawFont_AlphaMapForGlyph(this.h, (C.uint)(glyphIndex)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -337,14 +368,14 @@ func QRawFont_FromFont(font *QFont) *QRawFont { func (this *QRawFont) AlphaMapForGlyph2(glyphIndex uint, antialiasingType QRawFont__AntialiasingType) *QImage { _ret := C.QRawFont_AlphaMapForGlyph2(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QRawFont) AlphaMapForGlyph3(glyphIndex uint, antialiasingType QRawFont__AntialiasingType, transform *QTransform) *QImage { _ret := C.QRawFont_AlphaMapForGlyph3(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType), transform.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -358,7 +389,7 @@ func QRawFont_FromFont2(font *QFont, writingSystem QFontDatabase__WritingSystem) // Delete this object from C++ memory. func (this *QRawFont) Delete() { - C.QRawFont_Delete(this.h) + C.QRawFont_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrawfont.h b/qt/gen_qrawfont.h index 63faec09..e211c98d 100644 --- a/qt/gen_qrawfont.h +++ b/qt/gen_qrawfont.h @@ -36,12 +36,12 @@ typedef struct QRectF QRectF; typedef struct QTransform QTransform; #endif -QRawFont* QRawFont_new(); -QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize); -QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize); -QRawFont* QRawFont_new4(QRawFont* other); -QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference); -QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference); +void QRawFont_new(QRawFont** outptr_QRawFont); +void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont); +void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont); +void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont); +void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); +void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other); void QRawFont_Swap(QRawFont* self, QRawFont* other); bool QRawFont_IsValid(const QRawFont* self); @@ -83,7 +83,7 @@ QRawFont* QRawFont_FromFont(QFont* font); QImage* QRawFont_AlphaMapForGlyph2(const QRawFont* self, unsigned int glyphIndex, int antialiasingType); QImage* QRawFont_AlphaMapForGlyph3(const QRawFont* self, unsigned int glyphIndex, int antialiasingType, QTransform* transform); QRawFont* QRawFont_FromFont2(QFont* font, int writingSystem); -void QRawFont_Delete(QRawFont* self); +void QRawFont_Delete(QRawFont* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qreadwritelock.cpp b/qt/gen_qreadwritelock.cpp index 735ddb26..67011be5 100644 --- a/qt/gen_qreadwritelock.cpp +++ b/qt/gen_qreadwritelock.cpp @@ -5,12 +5,14 @@ #include "gen_qreadwritelock.h" #include "_cgo_export.h" -QReadWriteLock* QReadWriteLock_new() { - return new QReadWriteLock(); +void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock) { + QReadWriteLock* ret = new QReadWriteLock(); + *outptr_QReadWriteLock = ret; } -QReadWriteLock* QReadWriteLock_new2(int recursionMode) { - return new QReadWriteLock(static_cast(recursionMode)); +void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock) { + QReadWriteLock* ret = new QReadWriteLock(static_cast(recursionMode)); + *outptr_QReadWriteLock = ret; } void QReadWriteLock_LockForRead(QReadWriteLock* self) { @@ -41,12 +43,17 @@ void QReadWriteLock_Unlock(QReadWriteLock* self) { self->unlock(); } -void QReadWriteLock_Delete(QReadWriteLock* self) { - delete self; +void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock) { - return new QReadLocker(readWriteLock); +void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker) { + QReadLocker* ret = new QReadLocker(readWriteLock); + *outptr_QReadLocker = ret; } void QReadLocker_Unlock(QReadLocker* self) { @@ -61,12 +68,17 @@ QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self) { return self->readWriteLock(); } -void QReadLocker_Delete(QReadLocker* self) { - delete self; +void QReadLocker_Delete(QReadLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock) { - return new QWriteLocker(readWriteLock); +void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker) { + QWriteLocker* ret = new QWriteLocker(readWriteLock); + *outptr_QWriteLocker = ret; } void QWriteLocker_Unlock(QWriteLocker* self) { @@ -81,7 +93,11 @@ QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self) { return self->readWriteLock(); } -void QWriteLocker_Delete(QWriteLocker* self) { - delete self; +void QWriteLocker_Delete(QWriteLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qreadwritelock.go b/qt/gen_qreadwritelock.go index 2de02df9..af1a199e 100644 --- a/qt/gen_qreadwritelock.go +++ b/qt/gen_qreadwritelock.go @@ -21,7 +21,8 @@ const ( ) type QReadWriteLock struct { - h *C.QReadWriteLock + h *C.QReadWriteLock + isSubclass bool } func (this *QReadWriteLock) cPointer() *C.QReadWriteLock { @@ -38,6 +39,7 @@ func (this *QReadWriteLock) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQReadWriteLock constructs the type using only CGO pointers. func newQReadWriteLock(h *C.QReadWriteLock) *QReadWriteLock { if h == nil { return nil @@ -45,20 +47,33 @@ func newQReadWriteLock(h *C.QReadWriteLock) *QReadWriteLock { return &QReadWriteLock{h: h} } +// UnsafeNewQReadWriteLock constructs the type using only unsafe pointers. func UnsafeNewQReadWriteLock(h unsafe.Pointer) *QReadWriteLock { - return newQReadWriteLock((*C.QReadWriteLock)(h)) + if h == nil { + return nil + } + + return &QReadWriteLock{h: (*C.QReadWriteLock)(h)} } // NewQReadWriteLock constructs a new QReadWriteLock object. func NewQReadWriteLock() *QReadWriteLock { - ret := C.QReadWriteLock_new() - return newQReadWriteLock(ret) + var outptr_QReadWriteLock *C.QReadWriteLock = nil + + C.QReadWriteLock_new(&outptr_QReadWriteLock) + ret := newQReadWriteLock(outptr_QReadWriteLock) + ret.isSubclass = true + return ret } // NewQReadWriteLock2 constructs a new QReadWriteLock object. func NewQReadWriteLock2(recursionMode QReadWriteLock__RecursionMode) *QReadWriteLock { - ret := C.QReadWriteLock_new2((C.int)(recursionMode)) - return newQReadWriteLock(ret) + var outptr_QReadWriteLock *C.QReadWriteLock = nil + + C.QReadWriteLock_new2((C.int)(recursionMode), &outptr_QReadWriteLock) + ret := newQReadWriteLock(outptr_QReadWriteLock) + ret.isSubclass = true + return ret } func (this *QReadWriteLock) LockForRead() { @@ -91,7 +106,7 @@ func (this *QReadWriteLock) Unlock() { // Delete this object from C++ memory. func (this *QReadWriteLock) Delete() { - C.QReadWriteLock_Delete(this.h) + C.QReadWriteLock_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -104,7 +119,8 @@ func (this *QReadWriteLock) GoGC() { } type QReadLocker struct { - h *C.QReadLocker + h *C.QReadLocker + isSubclass bool } func (this *QReadLocker) cPointer() *C.QReadLocker { @@ -121,6 +137,7 @@ func (this *QReadLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQReadLocker constructs the type using only CGO pointers. func newQReadLocker(h *C.QReadLocker) *QReadLocker { if h == nil { return nil @@ -128,14 +145,23 @@ func newQReadLocker(h *C.QReadLocker) *QReadLocker { return &QReadLocker{h: h} } +// UnsafeNewQReadLocker constructs the type using only unsafe pointers. func UnsafeNewQReadLocker(h unsafe.Pointer) *QReadLocker { - return newQReadLocker((*C.QReadLocker)(h)) + if h == nil { + return nil + } + + return &QReadLocker{h: (*C.QReadLocker)(h)} } // NewQReadLocker constructs a new QReadLocker object. func NewQReadLocker(readWriteLock *QReadWriteLock) *QReadLocker { - ret := C.QReadLocker_new(readWriteLock.cPointer()) - return newQReadLocker(ret) + var outptr_QReadLocker *C.QReadLocker = nil + + C.QReadLocker_new(readWriteLock.cPointer(), &outptr_QReadLocker) + ret := newQReadLocker(outptr_QReadLocker) + ret.isSubclass = true + return ret } func (this *QReadLocker) Unlock() { @@ -152,7 +178,7 @@ func (this *QReadLocker) ReadWriteLock() *QReadWriteLock { // Delete this object from C++ memory. func (this *QReadLocker) Delete() { - C.QReadLocker_Delete(this.h) + C.QReadLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -165,7 +191,8 @@ func (this *QReadLocker) GoGC() { } type QWriteLocker struct { - h *C.QWriteLocker + h *C.QWriteLocker + isSubclass bool } func (this *QWriteLocker) cPointer() *C.QWriteLocker { @@ -182,6 +209,7 @@ func (this *QWriteLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWriteLocker constructs the type using only CGO pointers. func newQWriteLocker(h *C.QWriteLocker) *QWriteLocker { if h == nil { return nil @@ -189,14 +217,23 @@ func newQWriteLocker(h *C.QWriteLocker) *QWriteLocker { return &QWriteLocker{h: h} } +// UnsafeNewQWriteLocker constructs the type using only unsafe pointers. func UnsafeNewQWriteLocker(h unsafe.Pointer) *QWriteLocker { - return newQWriteLocker((*C.QWriteLocker)(h)) + if h == nil { + return nil + } + + return &QWriteLocker{h: (*C.QWriteLocker)(h)} } // NewQWriteLocker constructs a new QWriteLocker object. func NewQWriteLocker(readWriteLock *QReadWriteLock) *QWriteLocker { - ret := C.QWriteLocker_new(readWriteLock.cPointer()) - return newQWriteLocker(ret) + var outptr_QWriteLocker *C.QWriteLocker = nil + + C.QWriteLocker_new(readWriteLock.cPointer(), &outptr_QWriteLocker) + ret := newQWriteLocker(outptr_QWriteLocker) + ret.isSubclass = true + return ret } func (this *QWriteLocker) Unlock() { @@ -213,7 +250,7 @@ func (this *QWriteLocker) ReadWriteLock() *QReadWriteLock { // Delete this object from C++ memory. func (this *QWriteLocker) Delete() { - C.QWriteLocker_Delete(this.h) + C.QWriteLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qreadwritelock.h b/qt/gen_qreadwritelock.h index 0398ca40..a26a105d 100644 --- a/qt/gen_qreadwritelock.h +++ b/qt/gen_qreadwritelock.h @@ -24,8 +24,8 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWriteLocker QWriteLocker; #endif -QReadWriteLock* QReadWriteLock_new(); -QReadWriteLock* QReadWriteLock_new2(int recursionMode); +void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock); +void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock); void QReadWriteLock_LockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForReadWithTimeout(QReadWriteLock* self, int timeout); @@ -33,19 +33,19 @@ void QReadWriteLock_LockForWrite(QReadWriteLock* self); bool QReadWriteLock_TryLockForWrite(QReadWriteLock* self); bool QReadWriteLock_TryLockForWriteWithTimeout(QReadWriteLock* self, int timeout); void QReadWriteLock_Unlock(QReadWriteLock* self); -void QReadWriteLock_Delete(QReadWriteLock* self); +void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass); -QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock); +void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker); void QReadLocker_Unlock(QReadLocker* self); void QReadLocker_Relock(QReadLocker* self); QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self); -void QReadLocker_Delete(QReadLocker* self); +void QReadLocker_Delete(QReadLocker* self, bool isSubclass); -QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock); +void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker); void QWriteLocker_Unlock(QWriteLocker* self); void QWriteLocker_Relock(QWriteLocker* self); QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self); -void QWriteLocker_Delete(QWriteLocker* self); +void QWriteLocker_Delete(QWriteLocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrect.cpp b/qt/gen_qrect.cpp index 3d466a1a..f900c91a 100644 --- a/qt/gen_qrect.cpp +++ b/qt/gen_qrect.cpp @@ -10,24 +10,29 @@ #include "gen_qrect.h" #include "_cgo_export.h" -QRect* QRect_new() { - return new QRect(); +void QRect_new(QRect** outptr_QRect) { + QRect* ret = new QRect(); + *outptr_QRect = ret; } -QRect* QRect_new2(QPoint* topleft, QPoint* bottomright) { - return new QRect(*topleft, *bottomright); +void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect) { + QRect* ret = new QRect(*topleft, *bottomright); + *outptr_QRect = ret; } -QRect* QRect_new3(QPoint* topleft, QSize* size) { - return new QRect(*topleft, *size); +void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect) { + QRect* ret = new QRect(*topleft, *size); + *outptr_QRect = ret; } -QRect* QRect_new4(int left, int top, int width, int height) { - return new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); +void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect) { + QRect* ret = new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); + *outptr_QRect = ret; } -QRect* QRect_new5(QRect* param1) { - return new QRect(*param1); +void QRect_new5(QRect* param1, QRect** outptr_QRect) { + QRect* ret = new QRect(*param1); + *outptr_QRect = ret; } bool QRect_IsNull(const QRect* self) { @@ -314,32 +319,42 @@ bool QRect_Contains23(const QRect* self, QPoint* p, bool proper) { return self->contains(*p, proper); } -void QRect_Delete(QRect* self) { - delete self; +void QRect_Delete(QRect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRectF* QRectF_new() { - return new QRectF(); +void QRectF_new(QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(); + *outptr_QRectF = ret; } -QRectF* QRectF_new2(QPointF* topleft, QSizeF* size) { - return new QRectF(*topleft, *size); +void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*topleft, *size); + *outptr_QRectF = ret; } -QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight) { - return new QRectF(*topleft, *bottomRight); +void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*topleft, *bottomRight); + *outptr_QRectF = ret; } -QRectF* QRectF_new4(double left, double top, double width, double height) { - return new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); +void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); + *outptr_QRectF = ret; } -QRectF* QRectF_new5(QRect* rect) { - return new QRectF(*rect); +void QRectF_new5(QRect* rect, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*rect); + *outptr_QRectF = ret; } -QRectF* QRectF_new6(QRectF* param1) { - return new QRectF(*param1); +void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*param1); + *outptr_QRectF = ret; } bool QRectF_IsNull(const QRectF* self) { @@ -630,7 +645,11 @@ QRect* QRectF_ToAlignedRect(const QRectF* self) { return new QRect(self->toAlignedRect()); } -void QRectF_Delete(QRectF* self) { - delete self; +void QRectF_Delete(QRectF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrect.go b/qt/gen_qrect.go index 0c6d695a..90809abf 100644 --- a/qt/gen_qrect.go +++ b/qt/gen_qrect.go @@ -14,7 +14,8 @@ import ( ) type QRect struct { - h *C.QRect + h *C.QRect + isSubclass bool } func (this *QRect) cPointer() *C.QRect { @@ -31,6 +32,7 @@ func (this *QRect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRect constructs the type using only CGO pointers. func newQRect(h *C.QRect) *QRect { if h == nil { return nil @@ -38,38 +40,63 @@ func newQRect(h *C.QRect) *QRect { return &QRect{h: h} } +// UnsafeNewQRect constructs the type using only unsafe pointers. func UnsafeNewQRect(h unsafe.Pointer) *QRect { - return newQRect((*C.QRect)(h)) + if h == nil { + return nil + } + + return &QRect{h: (*C.QRect)(h)} } // NewQRect constructs a new QRect object. func NewQRect() *QRect { - ret := C.QRect_new() - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new(&outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect2 constructs a new QRect object. func NewQRect2(topleft *QPoint, bottomright *QPoint) *QRect { - ret := C.QRect_new2(topleft.cPointer(), bottomright.cPointer()) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new2(topleft.cPointer(), bottomright.cPointer(), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect3 constructs a new QRect object. func NewQRect3(topleft *QPoint, size *QSize) *QRect { - ret := C.QRect_new3(topleft.cPointer(), size.cPointer()) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new3(topleft.cPointer(), size.cPointer(), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect4 constructs a new QRect object. func NewQRect4(left int, top int, width int, height int) *QRect { - ret := C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height)) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect5 constructs a new QRect object. func NewQRect5(param1 *QRect) *QRect { - ret := C.QRect_new5(param1.cPointer()) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new5(param1.cPointer(), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } func (this *QRect) IsNull() bool { @@ -405,7 +432,7 @@ func (this *QRect) Contains23(p *QPoint, proper bool) bool { // Delete this object from C++ memory. func (this *QRect) Delete() { - C.QRect_Delete(this.h) + C.QRect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -418,7 +445,8 @@ func (this *QRect) GoGC() { } type QRectF struct { - h *C.QRectF + h *C.QRectF + isSubclass bool } func (this *QRectF) cPointer() *C.QRectF { @@ -435,6 +463,7 @@ func (this *QRectF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRectF constructs the type using only CGO pointers. func newQRectF(h *C.QRectF) *QRectF { if h == nil { return nil @@ -442,44 +471,73 @@ func newQRectF(h *C.QRectF) *QRectF { return &QRectF{h: h} } +// UnsafeNewQRectF constructs the type using only unsafe pointers. func UnsafeNewQRectF(h unsafe.Pointer) *QRectF { - return newQRectF((*C.QRectF)(h)) + if h == nil { + return nil + } + + return &QRectF{h: (*C.QRectF)(h)} } // NewQRectF constructs a new QRectF object. func NewQRectF() *QRectF { - ret := C.QRectF_new() - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new(&outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF2 constructs a new QRectF object. func NewQRectF2(topleft *QPointF, size *QSizeF) *QRectF { - ret := C.QRectF_new2(topleft.cPointer(), size.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new2(topleft.cPointer(), size.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF3 constructs a new QRectF object. func NewQRectF3(topleft *QPointF, bottomRight *QPointF) *QRectF { - ret := C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF4 constructs a new QRectF object. func NewQRectF4(left float64, top float64, width float64, height float64) *QRectF { - ret := C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height)) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF5 constructs a new QRectF object. func NewQRectF5(rect *QRect) *QRectF { - ret := C.QRectF_new5(rect.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new5(rect.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF6 constructs a new QRectF object. func NewQRectF6(param1 *QRectF) *QRectF { - ret := C.QRectF_new6(param1.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new6(param1.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } func (this *QRectF) IsNull() bool { @@ -817,7 +875,7 @@ func (this *QRectF) ToAlignedRect() *QRect { // Delete this object from C++ memory. func (this *QRectF) Delete() { - C.QRectF_Delete(this.h) + C.QRectF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrect.h b/qt/gen_qrect.h index 856185ef..f02af041 100644 --- a/qt/gen_qrect.h +++ b/qt/gen_qrect.h @@ -34,11 +34,11 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QRect* QRect_new(); -QRect* QRect_new2(QPoint* topleft, QPoint* bottomright); -QRect* QRect_new3(QPoint* topleft, QSize* size); -QRect* QRect_new4(int left, int top, int width, int height); -QRect* QRect_new5(QRect* param1); +void QRect_new(QRect** outptr_QRect); +void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect); +void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect); +void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect); +void QRect_new5(QRect* param1, QRect** outptr_QRect); bool QRect_IsNull(const QRect* self); bool QRect_IsEmpty(const QRect* self); bool QRect_IsValid(const QRect* self); @@ -109,14 +109,14 @@ QRect* QRect_OperatorPlusAssign(QRect* self, QMargins* margins); QRect* QRect_OperatorMinusAssign(QRect* self, QMargins* margins); bool QRect_Contains22(const QRect* self, QRect* r, bool proper); bool QRect_Contains23(const QRect* self, QPoint* p, bool proper); -void QRect_Delete(QRect* self); +void QRect_Delete(QRect* self, bool isSubclass); -QRectF* QRectF_new(); -QRectF* QRectF_new2(QPointF* topleft, QSizeF* size); -QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight); -QRectF* QRectF_new4(double left, double top, double width, double height); -QRectF* QRectF_new5(QRect* rect); -QRectF* QRectF_new6(QRectF* param1); +void QRectF_new(QRectF** outptr_QRectF); +void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF); +void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF); +void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF); +void QRectF_new5(QRect* rect, QRectF** outptr_QRectF); +void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF); bool QRectF_IsNull(const QRectF* self); bool QRectF_IsEmpty(const QRectF* self); bool QRectF_IsValid(const QRectF* self); @@ -186,7 +186,7 @@ QRectF* QRectF_OperatorPlusAssign(QRectF* self, QMarginsF* margins); QRectF* QRectF_OperatorMinusAssign(QRectF* self, QMarginsF* margins); QRect* QRectF_ToRect(const QRectF* self); QRect* QRectF_ToAlignedRect(const QRectF* self); -void QRectF_Delete(QRectF* self); +void QRectF_Delete(QRectF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrefcount.cpp b/qt/gen_qrefcount.cpp index a8fe9ac6..3ecfc0a1 100644 --- a/qt/gen_qrefcount.cpp +++ b/qt/gen_qrefcount.cpp @@ -35,7 +35,11 @@ void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self) { self->initializeUnsharable(); } -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self) { - delete self; +void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrefcount.go b/qt/gen_qrefcount.go index 42816c6e..3b89f19b 100644 --- a/qt/gen_qrefcount.go +++ b/qt/gen_qrefcount.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__RefCount struct { - h *C.QtPrivate__RefCount + h *C.QtPrivate__RefCount + isSubclass bool } func (this *QtPrivate__RefCount) cPointer() *C.QtPrivate__RefCount { @@ -31,6 +32,7 @@ func (this *QtPrivate__RefCount) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__RefCount constructs the type using only CGO pointers. func newQtPrivate__RefCount(h *C.QtPrivate__RefCount) *QtPrivate__RefCount { if h == nil { return nil @@ -38,8 +40,13 @@ func newQtPrivate__RefCount(h *C.QtPrivate__RefCount) *QtPrivate__RefCount { return &QtPrivate__RefCount{h: h} } +// UnsafeNewQtPrivate__RefCount constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__RefCount(h unsafe.Pointer) *QtPrivate__RefCount { - return newQtPrivate__RefCount((*C.QtPrivate__RefCount)(h)) + if h == nil { + return nil + } + + return &QtPrivate__RefCount{h: (*C.QtPrivate__RefCount)(h)} } func (this *QtPrivate__RefCount) Ref() bool { @@ -76,7 +83,7 @@ func (this *QtPrivate__RefCount) InitializeUnsharable() { // Delete this object from C++ memory. func (this *QtPrivate__RefCount) Delete() { - C.QtPrivate__RefCount_Delete(this.h) + C.QtPrivate__RefCount_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrefcount.h b/qt/gen_qrefcount.h index 4d7f2601..9c079239 100644 --- a/qt/gen_qrefcount.h +++ b/qt/gen_qrefcount.h @@ -32,7 +32,7 @@ bool QtPrivate__RefCount_IsStatic(const QtPrivate__RefCount* self); bool QtPrivate__RefCount_IsShared(const QtPrivate__RefCount* self); void QtPrivate__RefCount_InitializeOwned(QtPrivate__RefCount* self); void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self); -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self); +void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qregexp.cpp b/qt/gen_qregexp.cpp index 3c049b47..9366ea16 100644 --- a/qt/gen_qregexp.cpp +++ b/qt/gen_qregexp.cpp @@ -7,27 +7,32 @@ #include "gen_qregexp.h" #include "_cgo_export.h" -QRegExp* QRegExp_new() { - return new QRegExp(); +void QRegExp_new(QRegExp** outptr_QRegExp) { + QRegExp* ret = new QRegExp(); + *outptr_QRegExp = ret; } -QRegExp* QRegExp_new2(struct miqt_string pattern) { +void QRegExp_new2(struct miqt_string pattern, QRegExp** outptr_QRegExp) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegExp(pattern_QString); + QRegExp* ret = new QRegExp(pattern_QString); + *outptr_QRegExp = ret; } -QRegExp* QRegExp_new3(QRegExp* rx) { - return new QRegExp(*rx); +void QRegExp_new3(QRegExp* rx, QRegExp** outptr_QRegExp) { + QRegExp* ret = new QRegExp(*rx); + *outptr_QRegExp = ret; } -QRegExp* QRegExp_new4(struct miqt_string pattern, int cs) { +void QRegExp_new4(struct miqt_string pattern, int cs, QRegExp** outptr_QRegExp) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegExp(pattern_QString, static_cast(cs)); + QRegExp* ret = new QRegExp(pattern_QString, static_cast(cs)); + *outptr_QRegExp = ret; } -QRegExp* QRegExp_new5(struct miqt_string pattern, int cs, int syntax) { +void QRegExp_new5(struct miqt_string pattern, int cs, int syntax, QRegExp** outptr_QRegExp) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegExp(pattern_QString, static_cast(cs), static_cast(syntax)); + QRegExp* ret = new QRegExp(pattern_QString, static_cast(cs), static_cast(syntax)); + *outptr_QRegExp = ret; } void QRegExp_OperatorAssign(QRegExp* self, QRegExp* rx) { @@ -273,7 +278,11 @@ int QRegExp_Pos1WithNth(QRegExp* self, int nth) { return self->pos(static_cast(nth)); } -void QRegExp_Delete(QRegExp* self) { - delete self; +void QRegExp_Delete(QRegExp* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qregexp.go b/qt/gen_qregexp.go index 7594a45c..86f6573d 100644 --- a/qt/gen_qregexp.go +++ b/qt/gen_qregexp.go @@ -33,7 +33,8 @@ const ( ) type QRegExp struct { - h *C.QRegExp + h *C.QRegExp + isSubclass bool } func (this *QRegExp) cPointer() *C.QRegExp { @@ -50,6 +51,7 @@ func (this *QRegExp) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegExp constructs the type using only CGO pointers. func newQRegExp(h *C.QRegExp) *QRegExp { if h == nil { return nil @@ -57,14 +59,23 @@ func newQRegExp(h *C.QRegExp) *QRegExp { return &QRegExp{h: h} } +// UnsafeNewQRegExp constructs the type using only unsafe pointers. func UnsafeNewQRegExp(h unsafe.Pointer) *QRegExp { - return newQRegExp((*C.QRegExp)(h)) + if h == nil { + return nil + } + + return &QRegExp{h: (*C.QRegExp)(h)} } // NewQRegExp constructs a new QRegExp object. func NewQRegExp() *QRegExp { - ret := C.QRegExp_new() - return newQRegExp(ret) + var outptr_QRegExp *C.QRegExp = nil + + C.QRegExp_new(&outptr_QRegExp) + ret := newQRegExp(outptr_QRegExp) + ret.isSubclass = true + return ret } // NewQRegExp2 constructs a new QRegExp object. @@ -73,14 +84,22 @@ func NewQRegExp2(pattern string) *QRegExp { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegExp_new2(pattern_ms) - return newQRegExp(ret) + var outptr_QRegExp *C.QRegExp = nil + + C.QRegExp_new2(pattern_ms, &outptr_QRegExp) + ret := newQRegExp(outptr_QRegExp) + ret.isSubclass = true + return ret } // NewQRegExp3 constructs a new QRegExp object. func NewQRegExp3(rx *QRegExp) *QRegExp { - ret := C.QRegExp_new3(rx.cPointer()) - return newQRegExp(ret) + var outptr_QRegExp *C.QRegExp = nil + + C.QRegExp_new3(rx.cPointer(), &outptr_QRegExp) + ret := newQRegExp(outptr_QRegExp) + ret.isSubclass = true + return ret } // NewQRegExp4 constructs a new QRegExp object. @@ -89,8 +108,12 @@ func NewQRegExp4(pattern string, cs CaseSensitivity) *QRegExp { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegExp_new4(pattern_ms, (C.int)(cs)) - return newQRegExp(ret) + var outptr_QRegExp *C.QRegExp = nil + + C.QRegExp_new4(pattern_ms, (C.int)(cs), &outptr_QRegExp) + ret := newQRegExp(outptr_QRegExp) + ret.isSubclass = true + return ret } // NewQRegExp5 constructs a new QRegExp object. @@ -99,8 +122,12 @@ func NewQRegExp5(pattern string, cs CaseSensitivity, syntax QRegExp__PatternSynt pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegExp_new5(pattern_ms, (C.int)(cs), (C.int)(syntax)) - return newQRegExp(ret) + var outptr_QRegExp *C.QRegExp = nil + + C.QRegExp_new5(pattern_ms, (C.int)(cs), (C.int)(syntax), &outptr_QRegExp) + ret := newQRegExp(outptr_QRegExp) + ret.isSubclass = true + return ret } func (this *QRegExp) OperatorAssign(rx *QRegExp) { @@ -327,7 +354,7 @@ func (this *QRegExp) Pos1WithNth(nth int) int { // Delete this object from C++ memory. func (this *QRegExp) Delete() { - C.QRegExp_Delete(this.h) + C.QRegExp_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qregexp.h b/qt/gen_qregexp.h index 0843e13a..a32fd1a3 100644 --- a/qt/gen_qregexp.h +++ b/qt/gen_qregexp.h @@ -20,11 +20,11 @@ class QRegExp; typedef struct QRegExp QRegExp; #endif -QRegExp* QRegExp_new(); -QRegExp* QRegExp_new2(struct miqt_string pattern); -QRegExp* QRegExp_new3(QRegExp* rx); -QRegExp* QRegExp_new4(struct miqt_string pattern, int cs); -QRegExp* QRegExp_new5(struct miqt_string pattern, int cs, int syntax); +void QRegExp_new(QRegExp** outptr_QRegExp); +void QRegExp_new2(struct miqt_string pattern, QRegExp** outptr_QRegExp); +void QRegExp_new3(QRegExp* rx, QRegExp** outptr_QRegExp); +void QRegExp_new4(struct miqt_string pattern, int cs, QRegExp** outptr_QRegExp); +void QRegExp_new5(struct miqt_string pattern, int cs, int syntax, QRegExp** outptr_QRegExp); void QRegExp_OperatorAssign(QRegExp* self, QRegExp* rx); void QRegExp_Swap(QRegExp* self, QRegExp* other); bool QRegExp_OperatorEqual(const QRegExp* self, QRegExp* rx); @@ -61,7 +61,7 @@ struct miqt_string QRegExp_Cap1(const QRegExp* self, int nth); struct miqt_string QRegExp_Cap1WithNth(QRegExp* self, int nth); int QRegExp_Pos1(const QRegExp* self, int nth); int QRegExp_Pos1WithNth(QRegExp* self, int nth); -void QRegExp_Delete(QRegExp* self); +void QRegExp_Delete(QRegExp* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qregion.cpp b/qt/gen_qregion.cpp index aab8a815..6482734d 100644 --- a/qt/gen_qregion.cpp +++ b/qt/gen_qregion.cpp @@ -7,32 +7,39 @@ #include "gen_qregion.h" #include "_cgo_export.h" -QRegion* QRegion_new() { - return new QRegion(); +void QRegion_new(QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(); + *outptr_QRegion = ret; } -QRegion* QRegion_new2(int x, int y, int w, int h) { - return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); +void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); + *outptr_QRegion = ret; } -QRegion* QRegion_new3(QRect* r) { - return new QRegion(*r); +void QRegion_new3(QRect* r, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*r); + *outptr_QRegion = ret; } -QRegion* QRegion_new4(QRegion* region) { - return new QRegion(*region); +void QRegion_new4(QRegion* region, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*region); + *outptr_QRegion = ret; } -QRegion* QRegion_new5(QBitmap* bitmap) { - return new QRegion(*bitmap); +void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*bitmap); + *outptr_QRegion = ret; } -QRegion* QRegion_new6(int x, int y, int w, int h, int t) { - return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); +void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); + *outptr_QRegion = ret; } -QRegion* QRegion_new7(QRect* r, int t) { - return new QRegion(*r, static_cast(t)); +void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*r, static_cast(t)); + *outptr_QRegion = ret; } void QRegion_OperatorAssign(QRegion* self, QRegion* param1) { @@ -222,7 +229,11 @@ bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r) { return self->operator!=(*r); } -void QRegion_Delete(QRegion* self) { - delete self; +void QRegion_Delete(QRegion* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qregion.go b/qt/gen_qregion.go index 388d46e7..3308d0da 100644 --- a/qt/gen_qregion.go +++ b/qt/gen_qregion.go @@ -21,7 +21,8 @@ const ( ) type QRegion struct { - h *C.QRegion + h *C.QRegion + isSubclass bool } func (this *QRegion) cPointer() *C.QRegion { @@ -38,6 +39,7 @@ func (this *QRegion) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegion constructs the type using only CGO pointers. func newQRegion(h *C.QRegion) *QRegion { if h == nil { return nil @@ -45,50 +47,83 @@ func newQRegion(h *C.QRegion) *QRegion { return &QRegion{h: h} } +// UnsafeNewQRegion constructs the type using only unsafe pointers. func UnsafeNewQRegion(h unsafe.Pointer) *QRegion { - return newQRegion((*C.QRegion)(h)) + if h == nil { + return nil + } + + return &QRegion{h: (*C.QRegion)(h)} } // NewQRegion constructs a new QRegion object. func NewQRegion() *QRegion { - ret := C.QRegion_new() - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new(&outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion2 constructs a new QRegion object. func NewQRegion2(x int, y int, w int, h int) *QRegion { - ret := C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion3 constructs a new QRegion object. func NewQRegion3(r *QRect) *QRegion { - ret := C.QRegion_new3(r.cPointer()) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new3(r.cPointer(), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion4 constructs a new QRegion object. func NewQRegion4(region *QRegion) *QRegion { - ret := C.QRegion_new4(region.cPointer()) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new4(region.cPointer(), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion5 constructs a new QRegion object. func NewQRegion5(bitmap *QBitmap) *QRegion { - ret := C.QRegion_new5(bitmap.cPointer()) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new5(bitmap.cPointer(), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion6 constructs a new QRegion object. func NewQRegion6(x int, y int, w int, h int, t QRegion__RegionType) *QRegion { - ret := C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t)) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion7 constructs a new QRegion object. func NewQRegion7(r *QRect, t QRegion__RegionType) *QRegion { - ret := C.QRegion_new7(r.cPointer(), (C.int)(t)) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new7(r.cPointer(), (C.int)(t), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion) OperatorAssign(param1 *QRegion) { @@ -318,7 +353,7 @@ func (this *QRegion) OperatorNotEqual(r *QRegion) bool { // Delete this object from C++ memory. func (this *QRegion) Delete() { - C.QRegion_Delete(this.h) + C.QRegion_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qregion.h b/qt/gen_qregion.h index 86eccb81..3d38581e 100644 --- a/qt/gen_qregion.h +++ b/qt/gen_qregion.h @@ -26,13 +26,13 @@ typedef struct QRect QRect; typedef struct QRegion QRegion; #endif -QRegion* QRegion_new(); -QRegion* QRegion_new2(int x, int y, int w, int h); -QRegion* QRegion_new3(QRect* r); -QRegion* QRegion_new4(QRegion* region); -QRegion* QRegion_new5(QBitmap* bitmap); -QRegion* QRegion_new6(int x, int y, int w, int h, int t); -QRegion* QRegion_new7(QRect* r, int t); +void QRegion_new(QRegion** outptr_QRegion); +void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion); +void QRegion_new3(QRect* r, QRegion** outptr_QRegion); +void QRegion_new4(QRegion* region, QRegion** outptr_QRegion); +void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion); +void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion); +void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion); void QRegion_OperatorAssign(QRegion* self, QRegion* param1); void QRegion_Swap(QRegion* self, QRegion* other); bool QRegion_IsEmpty(const QRegion* self); @@ -75,7 +75,7 @@ QRegion* QRegion_OperatorMinusAssign(QRegion* self, QRegion* r); void QRegion_OperatorBitwiseNotAssign(QRegion* self, QRegion* r); bool QRegion_OperatorEqual(const QRegion* self, QRegion* r); bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r); -void QRegion_Delete(QRegion* self); +void QRegion_Delete(QRegion* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qregularexpression.cpp b/qt/gen_qregularexpression.cpp index a5ae9acb..b3e16105 100644 --- a/qt/gen_qregularexpression.cpp +++ b/qt/gen_qregularexpression.cpp @@ -9,22 +9,26 @@ #include "gen_qregularexpression.h" #include "_cgo_export.h" -QRegularExpression* QRegularExpression_new() { - return new QRegularExpression(); +void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression) { + QRegularExpression* ret = new QRegularExpression(); + *outptr_QRegularExpression = ret; } -QRegularExpression* QRegularExpression_new2(struct miqt_string pattern) { +void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegularExpression(pattern_QString); + QRegularExpression* ret = new QRegularExpression(pattern_QString); + *outptr_QRegularExpression = ret; } -QRegularExpression* QRegularExpression_new3(QRegularExpression* re) { - return new QRegularExpression(*re); +void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression) { + QRegularExpression* ret = new QRegularExpression(*re); + *outptr_QRegularExpression = ret; } -QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options) { +void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegularExpression(pattern_QString, static_cast(options)); + QRegularExpression* ret = new QRegularExpression(pattern_QString, static_cast(options)); + *outptr_QRegularExpression = ret; } int QRegularExpression_PatternOptions(const QRegularExpression* self) { @@ -191,16 +195,22 @@ QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch4(const QRegularE return new QRegularExpressionMatchIterator(self->globalMatch(subject_QString, static_cast(offset), static_cast(matchType), static_cast(matchOptions))); } -void QRegularExpression_Delete(QRegularExpression* self) { - delete self; +void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRegularExpressionMatch* QRegularExpressionMatch_new() { - return new QRegularExpressionMatch(); +void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch) { + QRegularExpressionMatch* ret = new QRegularExpressionMatch(); + *outptr_QRegularExpressionMatch = ret; } -QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match) { - return new QRegularExpressionMatch(*match); +void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch) { + QRegularExpressionMatch* ret = new QRegularExpressionMatch(*match); + *outptr_QRegularExpressionMatch = ret; } void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match) { @@ -334,16 +344,22 @@ int QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* self, in return self->capturedEnd(static_cast(nth)); } -void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self) { - delete self; +void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new() { - return new QRegularExpressionMatchIterator(); +void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { + QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(); + *outptr_QRegularExpressionMatchIterator = ret; } -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator) { - return new QRegularExpressionMatchIterator(*iterator); +void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { + QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(*iterator); + *outptr_QRegularExpressionMatchIterator = ret; } void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator) { @@ -384,7 +400,11 @@ int QRegularExpressionMatchIterator_MatchOptions(const QRegularExpressionMatchIt return static_cast(_ret); } -void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self) { - delete self; +void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qregularexpression.go b/qt/gen_qregularexpression.go index 9aaf9e29..bfdd2304 100644 --- a/qt/gen_qregularexpression.go +++ b/qt/gen_qregularexpression.go @@ -46,7 +46,8 @@ const ( ) type QRegularExpression struct { - h *C.QRegularExpression + h *C.QRegularExpression + isSubclass bool } func (this *QRegularExpression) cPointer() *C.QRegularExpression { @@ -63,6 +64,7 @@ func (this *QRegularExpression) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegularExpression constructs the type using only CGO pointers. func newQRegularExpression(h *C.QRegularExpression) *QRegularExpression { if h == nil { return nil @@ -70,14 +72,23 @@ func newQRegularExpression(h *C.QRegularExpression) *QRegularExpression { return &QRegularExpression{h: h} } +// UnsafeNewQRegularExpression constructs the type using only unsafe pointers. func UnsafeNewQRegularExpression(h unsafe.Pointer) *QRegularExpression { - return newQRegularExpression((*C.QRegularExpression)(h)) + if h == nil { + return nil + } + + return &QRegularExpression{h: (*C.QRegularExpression)(h)} } // NewQRegularExpression constructs a new QRegularExpression object. func NewQRegularExpression() *QRegularExpression { - ret := C.QRegularExpression_new() - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new(&outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } // NewQRegularExpression2 constructs a new QRegularExpression object. @@ -86,14 +97,22 @@ func NewQRegularExpression2(pattern string) *QRegularExpression { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegularExpression_new2(pattern_ms) - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new2(pattern_ms, &outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } // NewQRegularExpression3 constructs a new QRegularExpression object. func NewQRegularExpression3(re *QRegularExpression) *QRegularExpression { - ret := C.QRegularExpression_new3(re.cPointer()) - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new3(re.cPointer(), &outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } // NewQRegularExpression4 constructs a new QRegularExpression object. @@ -102,8 +121,12 @@ func NewQRegularExpression4(pattern string, options QRegularExpression__PatternO pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegularExpression_new4(pattern_ms, (C.int)(options)) - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new4(pattern_ms, (C.int)(options), &outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } func (this *QRegularExpression) PatternOptions() QRegularExpression__PatternOption { @@ -304,7 +327,7 @@ func (this *QRegularExpression) GlobalMatch4(subject string, offset int, matchTy // Delete this object from C++ memory. func (this *QRegularExpression) Delete() { - C.QRegularExpression_Delete(this.h) + C.QRegularExpression_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -317,7 +340,8 @@ func (this *QRegularExpression) GoGC() { } type QRegularExpressionMatch struct { - h *C.QRegularExpressionMatch + h *C.QRegularExpressionMatch + isSubclass bool } func (this *QRegularExpressionMatch) cPointer() *C.QRegularExpressionMatch { @@ -334,6 +358,7 @@ func (this *QRegularExpressionMatch) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegularExpressionMatch constructs the type using only CGO pointers. func newQRegularExpressionMatch(h *C.QRegularExpressionMatch) *QRegularExpressionMatch { if h == nil { return nil @@ -341,20 +366,33 @@ func newQRegularExpressionMatch(h *C.QRegularExpressionMatch) *QRegularExpressio return &QRegularExpressionMatch{h: h} } +// UnsafeNewQRegularExpressionMatch constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatch(h unsafe.Pointer) *QRegularExpressionMatch { - return newQRegularExpressionMatch((*C.QRegularExpressionMatch)(h)) + if h == nil { + return nil + } + + return &QRegularExpressionMatch{h: (*C.QRegularExpressionMatch)(h)} } // NewQRegularExpressionMatch constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch() *QRegularExpressionMatch { - ret := C.QRegularExpressionMatch_new() - return newQRegularExpressionMatch(ret) + var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil + + C.QRegularExpressionMatch_new(&outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret.isSubclass = true + return ret } // NewQRegularExpressionMatch2 constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch2(match *QRegularExpressionMatch) *QRegularExpressionMatch { - ret := C.QRegularExpressionMatch_new2(match.cPointer()) - return newQRegularExpressionMatch(ret) + var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil + + C.QRegularExpressionMatch_new2(match.cPointer(), &outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret.isSubclass = true + return ret } func (this *QRegularExpressionMatch) OperatorAssign(match *QRegularExpressionMatch) { @@ -484,7 +522,7 @@ func (this *QRegularExpressionMatch) CapturedEnd1(nth int) int { // Delete this object from C++ memory. func (this *QRegularExpressionMatch) Delete() { - C.QRegularExpressionMatch_Delete(this.h) + C.QRegularExpressionMatch_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -497,7 +535,8 @@ func (this *QRegularExpressionMatch) GoGC() { } type QRegularExpressionMatchIterator struct { - h *C.QRegularExpressionMatchIterator + h *C.QRegularExpressionMatchIterator + isSubclass bool } func (this *QRegularExpressionMatchIterator) cPointer() *C.QRegularExpressionMatchIterator { @@ -514,6 +553,7 @@ func (this *QRegularExpressionMatchIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegularExpressionMatchIterator constructs the type using only CGO pointers. func newQRegularExpressionMatchIterator(h *C.QRegularExpressionMatchIterator) *QRegularExpressionMatchIterator { if h == nil { return nil @@ -521,20 +561,33 @@ func newQRegularExpressionMatchIterator(h *C.QRegularExpressionMatchIterator) *Q return &QRegularExpressionMatchIterator{h: h} } +// UnsafeNewQRegularExpressionMatchIterator constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatchIterator(h unsafe.Pointer) *QRegularExpressionMatchIterator { - return newQRegularExpressionMatchIterator((*C.QRegularExpressionMatchIterator)(h)) + if h == nil { + return nil + } + + return &QRegularExpressionMatchIterator{h: (*C.QRegularExpressionMatchIterator)(h)} } // NewQRegularExpressionMatchIterator constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator() *QRegularExpressionMatchIterator { - ret := C.QRegularExpressionMatchIterator_new() - return newQRegularExpressionMatchIterator(ret) + var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil + + C.QRegularExpressionMatchIterator_new(&outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret.isSubclass = true + return ret } // NewQRegularExpressionMatchIterator2 constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator2(iterator *QRegularExpressionMatchIterator) *QRegularExpressionMatchIterator { - ret := C.QRegularExpressionMatchIterator_new2(iterator.cPointer()) - return newQRegularExpressionMatchIterator(ret) + var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil + + C.QRegularExpressionMatchIterator_new2(iterator.cPointer(), &outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret.isSubclass = true + return ret } func (this *QRegularExpressionMatchIterator) OperatorAssign(iterator *QRegularExpressionMatchIterator) { @@ -584,7 +637,7 @@ func (this *QRegularExpressionMatchIterator) MatchOptions() QRegularExpression__ // Delete this object from C++ memory. func (this *QRegularExpressionMatchIterator) Delete() { - C.QRegularExpressionMatchIterator_Delete(this.h) + C.QRegularExpressionMatchIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qregularexpression.h b/qt/gen_qregularexpression.h index 5ce9116f..7c422b46 100644 --- a/qt/gen_qregularexpression.h +++ b/qt/gen_qregularexpression.h @@ -24,10 +24,10 @@ typedef struct QRegularExpressionMatch QRegularExpressionMatch; typedef struct QRegularExpressionMatchIterator QRegularExpressionMatchIterator; #endif -QRegularExpression* QRegularExpression_new(); -QRegularExpression* QRegularExpression_new2(struct miqt_string pattern); -QRegularExpression* QRegularExpression_new3(QRegularExpression* re); -QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options); +void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression); +void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression); +void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression); +void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression); int QRegularExpression_PatternOptions(const QRegularExpression* self); void QRegularExpression_SetPatternOptions(QRegularExpression* self, int options); void QRegularExpression_OperatorAssign(QRegularExpression* self, QRegularExpression* re); @@ -53,10 +53,10 @@ QRegularExpressionMatch* QRegularExpression_Match4(const QRegularExpression* sel QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch2(const QRegularExpression* self, struct miqt_string subject, int offset); QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch3(const QRegularExpression* self, struct miqt_string subject, int offset, int matchType); QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch4(const QRegularExpression* self, struct miqt_string subject, int offset, int matchType, int matchOptions); -void QRegularExpression_Delete(QRegularExpression* self); +void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass); -QRegularExpressionMatch* QRegularExpressionMatch_new(); -QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match); +void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch); +void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch); void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match); void QRegularExpressionMatch_Swap(QRegularExpressionMatch* self, QRegularExpressionMatch* other); QRegularExpression* QRegularExpressionMatch_RegularExpression(const QRegularExpressionMatch* self); @@ -79,10 +79,10 @@ struct miqt_string QRegularExpressionMatch_Captured1(const QRegularExpressionMat int QRegularExpressionMatch_CapturedStart1(const QRegularExpressionMatch* self, int nth); int QRegularExpressionMatch_CapturedLength1(const QRegularExpressionMatch* self, int nth); int QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* self, int nth); -void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self); +void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass); -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new(); -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator); +void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); +void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator); void QRegularExpressionMatchIterator_Swap(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* other); bool QRegularExpressionMatchIterator_IsValid(const QRegularExpressionMatchIterator* self); @@ -92,7 +92,7 @@ QRegularExpressionMatch* QRegularExpressionMatchIterator_PeekNext(const QRegular QRegularExpression* QRegularExpressionMatchIterator_RegularExpression(const QRegularExpressionMatchIterator* self); int QRegularExpressionMatchIterator_MatchType(const QRegularExpressionMatchIterator* self); int QRegularExpressionMatchIterator_MatchOptions(const QRegularExpressionMatchIterator* self); -void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self); +void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qresource.cpp b/qt/gen_qresource.cpp index aa259eb4..feb48fb7 100644 --- a/qt/gen_qresource.cpp +++ b/qt/gen_qresource.cpp @@ -10,18 +10,21 @@ #include "gen_qresource.h" #include "_cgo_export.h" -QResource* QResource_new() { - return new QResource(); +void QResource_new(QResource** outptr_QResource) { + QResource* ret = new QResource(); + *outptr_QResource = ret; } -QResource* QResource_new2(struct miqt_string file) { +void QResource_new2(struct miqt_string file, QResource** outptr_QResource) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QResource(file_QString); + QResource* ret = new QResource(file_QString); + *outptr_QResource = ret; } -QResource* QResource_new3(struct miqt_string file, QLocale* locale) { +void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QResource(file_QString, *locale); + QResource* ret = new QResource(file_QString, *locale); + *outptr_QResource = ret; } void QResource_SetFileName(QResource* self, struct miqt_string file) { @@ -165,7 +168,11 @@ bool QResource_UnregisterResource22(const unsigned char* rccData, struct miqt_st return QResource::unregisterResource(static_cast(rccData), resourceRoot_QString); } -void QResource_Delete(QResource* self) { - delete self; +void QResource_Delete(QResource* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qresource.go b/qt/gen_qresource.go index 1f02f28c..159c3a54 100644 --- a/qt/gen_qresource.go +++ b/qt/gen_qresource.go @@ -22,7 +22,8 @@ const ( ) type QResource struct { - h *C.QResource + h *C.QResource + isSubclass bool } func (this *QResource) cPointer() *C.QResource { @@ -39,6 +40,7 @@ func (this *QResource) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQResource constructs the type using only CGO pointers. func newQResource(h *C.QResource) *QResource { if h == nil { return nil @@ -46,14 +48,23 @@ func newQResource(h *C.QResource) *QResource { return &QResource{h: h} } +// UnsafeNewQResource constructs the type using only unsafe pointers. func UnsafeNewQResource(h unsafe.Pointer) *QResource { - return newQResource((*C.QResource)(h)) + if h == nil { + return nil + } + + return &QResource{h: (*C.QResource)(h)} } // NewQResource constructs a new QResource object. func NewQResource() *QResource { - ret := C.QResource_new() - return newQResource(ret) + var outptr_QResource *C.QResource = nil + + C.QResource_new(&outptr_QResource) + ret := newQResource(outptr_QResource) + ret.isSubclass = true + return ret } // NewQResource2 constructs a new QResource object. @@ -62,8 +73,12 @@ func NewQResource2(file string) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QResource_new2(file_ms) - return newQResource(ret) + var outptr_QResource *C.QResource = nil + + C.QResource_new2(file_ms, &outptr_QResource) + ret := newQResource(outptr_QResource) + ret.isSubclass = true + return ret } // NewQResource3 constructs a new QResource object. @@ -72,8 +87,12 @@ func NewQResource3(file string, locale *QLocale) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QResource_new3(file_ms, locale.cPointer()) - return newQResource(ret) + var outptr_QResource *C.QResource = nil + + C.QResource_new3(file_ms, locale.cPointer(), &outptr_QResource) + ret := newQResource(outptr_QResource) + ret.isSubclass = true + return ret } func (this *QResource) SetFileName(file string) { @@ -234,7 +253,7 @@ func QResource_UnregisterResource22(rccData *byte, resourceRoot string) bool { // Delete this object from C++ memory. func (this *QResource) Delete() { - C.QResource_Delete(this.h) + C.QResource_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qresource.h b/qt/gen_qresource.h index b6d60048..a4052974 100644 --- a/qt/gen_qresource.h +++ b/qt/gen_qresource.h @@ -26,9 +26,9 @@ typedef struct QLocale QLocale; typedef struct QResource QResource; #endif -QResource* QResource_new(); -QResource* QResource_new2(struct miqt_string file); -QResource* QResource_new3(struct miqt_string file, QLocale* locale); +void QResource_new(QResource** outptr_QResource); +void QResource_new2(struct miqt_string file, QResource** outptr_QResource); +void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource); void QResource_SetFileName(QResource* self, struct miqt_string file); struct miqt_string QResource_FileName(const QResource* self); struct miqt_string QResource_AbsoluteFilePath(const QResource* self); @@ -52,7 +52,7 @@ bool QResource_RegisterResource2(struct miqt_string rccFilename, struct miqt_str bool QResource_UnregisterResource2(struct miqt_string rccFilename, struct miqt_string resourceRoot); bool QResource_RegisterResource22(const unsigned char* rccData, struct miqt_string resourceRoot); bool QResource_UnregisterResource22(const unsigned char* rccData, struct miqt_string resourceRoot); -void QResource_Delete(QResource* self); +void QResource_Delete(QResource* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qresultstore.cpp b/qt/gen_qresultstore.cpp index 763f743e..51cee81b 100644 --- a/qt/gen_qresultstore.cpp +++ b/qt/gen_qresultstore.cpp @@ -5,16 +5,19 @@ #include "gen_qresultstore.h" #include "_cgo_export.h" -QtPrivate__ResultItem* QtPrivate__ResultItem_new(const void* _result, int _count) { - return new QtPrivate::ResultItem(_result, static_cast(_count)); +void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { + QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result, static_cast(_count)); + *outptr_QtPrivate__ResultItem = ret; } -QtPrivate__ResultItem* QtPrivate__ResultItem_new2(const void* _result) { - return new QtPrivate::ResultItem(_result); +void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { + QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result); + *outptr_QtPrivate__ResultItem = ret; } -QtPrivate__ResultItem* QtPrivate__ResultItem_new3() { - return new QtPrivate::ResultItem(); +void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { + QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(); + *outptr_QtPrivate__ResultItem = ret; } bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self) { @@ -29,12 +32,17 @@ int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self) { return self->count(); } -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self) { - delete self; +void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__ResultIteratorBase* QtPrivate__ResultIteratorBase_new() { - return new QtPrivate::ResultIteratorBase(); +void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase) { + QtPrivate::ResultIteratorBase* ret = new QtPrivate::ResultIteratorBase(); + *outptr_QtPrivate__ResultIteratorBase = ret; } int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self) { @@ -61,12 +69,17 @@ bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__Resu return self->canIncrementVectorIndex(); } -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self) { - delete self; +void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__ResultStoreBase* QtPrivate__ResultStoreBase_new() { - return new QtPrivate::ResultStoreBase(); +void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase) { + QtPrivate::ResultStoreBase* ret = new QtPrivate::ResultStoreBase(); + *outptr_QtPrivate__ResultStoreBase = ret; } void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable) { @@ -101,7 +114,11 @@ int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* sel return self->addCanceledResult(static_cast(index)); } -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self) { - delete self; +void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qresultstore.go b/qt/gen_qresultstore.go index 6c222a3f..ce1a9a64 100644 --- a/qt/gen_qresultstore.go +++ b/qt/gen_qresultstore.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__ResultItem struct { - h *C.QtPrivate__ResultItem + h *C.QtPrivate__ResultItem + isSubclass bool } func (this *QtPrivate__ResultItem) cPointer() *C.QtPrivate__ResultItem { @@ -31,6 +32,7 @@ func (this *QtPrivate__ResultItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ResultItem constructs the type using only CGO pointers. func newQtPrivate__ResultItem(h *C.QtPrivate__ResultItem) *QtPrivate__ResultItem { if h == nil { return nil @@ -38,26 +40,43 @@ func newQtPrivate__ResultItem(h *C.QtPrivate__ResultItem) *QtPrivate__ResultItem return &QtPrivate__ResultItem{h: h} } +// UnsafeNewQtPrivate__ResultItem constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ResultItem(h unsafe.Pointer) *QtPrivate__ResultItem { - return newQtPrivate__ResultItem((*C.QtPrivate__ResultItem)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ResultItem{h: (*C.QtPrivate__ResultItem)(h)} } // NewQtPrivate__ResultItem constructs a new QtPrivate::ResultItem object. func NewQtPrivate__ResultItem(_result unsafe.Pointer, _count int) *QtPrivate__ResultItem { - ret := C.QtPrivate__ResultItem_new(_result, (C.int)(_count)) - return newQtPrivate__ResultItem(ret) + var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil + + C.QtPrivate__ResultItem_new(_result, (C.int)(_count), &outptr_QtPrivate__ResultItem) + ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) + ret.isSubclass = true + return ret } // NewQtPrivate__ResultItem2 constructs a new QtPrivate::ResultItem object. func NewQtPrivate__ResultItem2(_result unsafe.Pointer) *QtPrivate__ResultItem { - ret := C.QtPrivate__ResultItem_new2(_result) - return newQtPrivate__ResultItem(ret) + var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil + + C.QtPrivate__ResultItem_new2(_result, &outptr_QtPrivate__ResultItem) + ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) + ret.isSubclass = true + return ret } // NewQtPrivate__ResultItem3 constructs a new QtPrivate::ResultItem object. func NewQtPrivate__ResultItem3() *QtPrivate__ResultItem { - ret := C.QtPrivate__ResultItem_new3() - return newQtPrivate__ResultItem(ret) + var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil + + C.QtPrivate__ResultItem_new3(&outptr_QtPrivate__ResultItem) + ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) + ret.isSubclass = true + return ret } func (this *QtPrivate__ResultItem) IsValid() bool { @@ -74,7 +93,7 @@ func (this *QtPrivate__ResultItem) Count() int { // Delete this object from C++ memory. func (this *QtPrivate__ResultItem) Delete() { - C.QtPrivate__ResultItem_Delete(this.h) + C.QtPrivate__ResultItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -87,7 +106,8 @@ func (this *QtPrivate__ResultItem) GoGC() { } type QtPrivate__ResultIteratorBase struct { - h *C.QtPrivate__ResultIteratorBase + h *C.QtPrivate__ResultIteratorBase + isSubclass bool } func (this *QtPrivate__ResultIteratorBase) cPointer() *C.QtPrivate__ResultIteratorBase { @@ -104,6 +124,7 @@ func (this *QtPrivate__ResultIteratorBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ResultIteratorBase constructs the type using only CGO pointers. func newQtPrivate__ResultIteratorBase(h *C.QtPrivate__ResultIteratorBase) *QtPrivate__ResultIteratorBase { if h == nil { return nil @@ -111,14 +132,23 @@ func newQtPrivate__ResultIteratorBase(h *C.QtPrivate__ResultIteratorBase) *QtPri return &QtPrivate__ResultIteratorBase{h: h} } +// UnsafeNewQtPrivate__ResultIteratorBase constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ResultIteratorBase(h unsafe.Pointer) *QtPrivate__ResultIteratorBase { - return newQtPrivate__ResultIteratorBase((*C.QtPrivate__ResultIteratorBase)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ResultIteratorBase{h: (*C.QtPrivate__ResultIteratorBase)(h)} } // NewQtPrivate__ResultIteratorBase constructs a new QtPrivate::ResultIteratorBase object. func NewQtPrivate__ResultIteratorBase() *QtPrivate__ResultIteratorBase { - ret := C.QtPrivate__ResultIteratorBase_new() - return newQtPrivate__ResultIteratorBase(ret) + var outptr_QtPrivate__ResultIteratorBase *C.QtPrivate__ResultIteratorBase = nil + + C.QtPrivate__ResultIteratorBase_new(&outptr_QtPrivate__ResultIteratorBase) + ret := newQtPrivate__ResultIteratorBase(outptr_QtPrivate__ResultIteratorBase) + ret.isSubclass = true + return ret } func (this *QtPrivate__ResultIteratorBase) VectorIndex() int { @@ -147,7 +177,7 @@ func (this *QtPrivate__ResultIteratorBase) CanIncrementVectorIndex() bool { // Delete this object from C++ memory. func (this *QtPrivate__ResultIteratorBase) Delete() { - C.QtPrivate__ResultIteratorBase_Delete(this.h) + C.QtPrivate__ResultIteratorBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -160,7 +190,8 @@ func (this *QtPrivate__ResultIteratorBase) GoGC() { } type QtPrivate__ResultStoreBase struct { - h *C.QtPrivate__ResultStoreBase + h *C.QtPrivate__ResultStoreBase + isSubclass bool } func (this *QtPrivate__ResultStoreBase) cPointer() *C.QtPrivate__ResultStoreBase { @@ -177,6 +208,7 @@ func (this *QtPrivate__ResultStoreBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ResultStoreBase constructs the type using only CGO pointers. func newQtPrivate__ResultStoreBase(h *C.QtPrivate__ResultStoreBase) *QtPrivate__ResultStoreBase { if h == nil { return nil @@ -184,14 +216,23 @@ func newQtPrivate__ResultStoreBase(h *C.QtPrivate__ResultStoreBase) *QtPrivate__ return &QtPrivate__ResultStoreBase{h: h} } +// UnsafeNewQtPrivate__ResultStoreBase constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ResultStoreBase(h unsafe.Pointer) *QtPrivate__ResultStoreBase { - return newQtPrivate__ResultStoreBase((*C.QtPrivate__ResultStoreBase)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ResultStoreBase{h: (*C.QtPrivate__ResultStoreBase)(h)} } // NewQtPrivate__ResultStoreBase constructs a new QtPrivate::ResultStoreBase object. func NewQtPrivate__ResultStoreBase() *QtPrivate__ResultStoreBase { - ret := C.QtPrivate__ResultStoreBase_new() - return newQtPrivate__ResultStoreBase(ret) + var outptr_QtPrivate__ResultStoreBase *C.QtPrivate__ResultStoreBase = nil + + C.QtPrivate__ResultStoreBase_new(&outptr_QtPrivate__ResultStoreBase) + ret := newQtPrivate__ResultStoreBase(outptr_QtPrivate__ResultStoreBase) + ret.isSubclass = true + return ret } func (this *QtPrivate__ResultStoreBase) SetFilterMode(enable bool) { @@ -228,7 +269,7 @@ func (this *QtPrivate__ResultStoreBase) AddCanceledResult(index int) int { // Delete this object from C++ memory. func (this *QtPrivate__ResultStoreBase) Delete() { - C.QtPrivate__ResultStoreBase_Delete(this.h) + C.QtPrivate__ResultStoreBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qresultstore.h b/qt/gen_qresultstore.h index 469e8177..fb006000 100644 --- a/qt/gen_qresultstore.h +++ b/qt/gen_qresultstore.h @@ -36,24 +36,24 @@ typedef struct QtPrivate__ResultIteratorBase QtPrivate__ResultIteratorBase; typedef struct QtPrivate__ResultStoreBase QtPrivate__ResultStoreBase; #endif -QtPrivate__ResultItem* QtPrivate__ResultItem_new(const void* _result, int _count); -QtPrivate__ResultItem* QtPrivate__ResultItem_new2(const void* _result); -QtPrivate__ResultItem* QtPrivate__ResultItem_new3(); +void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); +void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); +void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self); bool QtPrivate__ResultItem_IsVector(const QtPrivate__ResultItem* self); int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self); -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self); +void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass); -QtPrivate__ResultIteratorBase* QtPrivate__ResultIteratorBase_new(); +void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase); int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self); int QtPrivate__ResultIteratorBase_ResultIndex(const QtPrivate__ResultIteratorBase* self); int QtPrivate__ResultIteratorBase_BatchSize(const QtPrivate__ResultIteratorBase* self); void QtPrivate__ResultIteratorBase_BatchedAdvance(QtPrivate__ResultIteratorBase* self); bool QtPrivate__ResultIteratorBase_IsVector(const QtPrivate__ResultIteratorBase* self); bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__ResultIteratorBase* self); -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self); +void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass); -QtPrivate__ResultStoreBase* QtPrivate__ResultStoreBase_new(); +void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase); void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable); bool QtPrivate__ResultStoreBase_FilterMode(const QtPrivate__ResultStoreBase* self); int QtPrivate__ResultStoreBase_AddResult(QtPrivate__ResultStoreBase* self, int index, const void* result); @@ -62,7 +62,7 @@ bool QtPrivate__ResultStoreBase_HasNextResult(const QtPrivate__ResultStoreBase* bool QtPrivate__ResultStoreBase_Contains(const QtPrivate__ResultStoreBase* self, int index); int QtPrivate__ResultStoreBase_Count(const QtPrivate__ResultStoreBase* self); int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* self, int index); -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self); +void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrgba64.cpp b/qt/gen_qrgba64.cpp index 81f267d5..b008c03a 100644 --- a/qt/gen_qrgba64.cpp +++ b/qt/gen_qrgba64.cpp @@ -3,12 +3,14 @@ #include "gen_qrgba64.h" #include "_cgo_export.h" -QRgba64* QRgba64_new() { - return new QRgba64(); +void QRgba64_new(QRgba64** outptr_QRgba64) { + QRgba64* ret = new QRgba64(); + *outptr_QRgba64 = ret; } -QRgba64* QRgba64_new2(QRgba64* param1) { - return new QRgba64(*param1); +void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64) { + QRgba64* ret = new QRgba64(*param1); + *outptr_QRgba64 = ret; } QRgba64* QRgba64_FromRgba64(unsigned long long c) { @@ -113,7 +115,11 @@ void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba) { self->operator=(static_cast(_rgba)); } -void QRgba64_Delete(QRgba64* self) { - delete self; +void QRgba64_Delete(QRgba64* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrgba64.go b/qt/gen_qrgba64.go index 68a6c11d..ee94a55f 100644 --- a/qt/gen_qrgba64.go +++ b/qt/gen_qrgba64.go @@ -14,7 +14,8 @@ import ( ) type QRgba64 struct { - h *C.QRgba64 + h *C.QRgba64 + isSubclass bool } func (this *QRgba64) cPointer() *C.QRgba64 { @@ -31,6 +32,7 @@ func (this *QRgba64) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRgba64 constructs the type using only CGO pointers. func newQRgba64(h *C.QRgba64) *QRgba64 { if h == nil { return nil @@ -38,20 +40,33 @@ func newQRgba64(h *C.QRgba64) *QRgba64 { return &QRgba64{h: h} } +// UnsafeNewQRgba64 constructs the type using only unsafe pointers. func UnsafeNewQRgba64(h unsafe.Pointer) *QRgba64 { - return newQRgba64((*C.QRgba64)(h)) + if h == nil { + return nil + } + + return &QRgba64{h: (*C.QRgba64)(h)} } // NewQRgba64 constructs a new QRgba64 object. func NewQRgba64() *QRgba64 { - ret := C.QRgba64_new() - return newQRgba64(ret) + var outptr_QRgba64 *C.QRgba64 = nil + + C.QRgba64_new(&outptr_QRgba64) + ret := newQRgba64(outptr_QRgba64) + ret.isSubclass = true + return ret } // NewQRgba642 constructs a new QRgba64 object. func NewQRgba642(param1 *QRgba64) *QRgba64 { - ret := C.QRgba64_new2(param1.cPointer()) - return newQRgba64(ret) + var outptr_QRgba64 *C.QRgba64 = nil + + C.QRgba64_new2(param1.cPointer(), &outptr_QRgba64) + ret := newQRgba64(outptr_QRgba64) + ret.isSubclass = true + return ret } func QRgba64_FromRgba64(c uint64) *QRgba64 { @@ -166,7 +181,7 @@ func (this *QRgba64) OperatorAssign(_rgba uint64) { // Delete this object from C++ memory. func (this *QRgba64) Delete() { - C.QRgba64_Delete(this.h) + C.QRgba64_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrgba64.h b/qt/gen_qrgba64.h index fe888173..66d07060 100644 --- a/qt/gen_qrgba64.h +++ b/qt/gen_qrgba64.h @@ -20,8 +20,8 @@ class QRgba64; typedef struct QRgba64 QRgba64; #endif -QRgba64* QRgba64_new(); -QRgba64* QRgba64_new2(QRgba64* param1); +void QRgba64_new(QRgba64** outptr_QRgba64); +void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64); QRgba64* QRgba64_FromRgba64(unsigned long long c); QRgba64* QRgba64_FromRgba642(uint16_t red, uint16_t green, uint16_t blue, uint16_t alpha); QRgba64* QRgba64_FromRgba(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha); @@ -45,7 +45,7 @@ uint16_t QRgba64_ToRgb16(const QRgba64* self); QRgba64* QRgba64_Premultiplied(const QRgba64* self); QRgba64* QRgba64_Unpremultiplied(const QRgba64* self); void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba); -void QRgba64_Delete(QRgba64* self); +void QRgba64_Delete(QRgba64* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrubberband.cpp b/qt/gen_qrubberband.cpp index e2f418cc..cfe9ebae 100644 --- a/qt/gen_qrubberband.cpp +++ b/qt/gen_qrubberband.cpp @@ -1,22 +1,1040 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qrubberband.h" #include "_cgo_export.h" -QRubberBand* QRubberBand_new(int param1) { - return new QRubberBand(static_cast(param1)); +class MiqtVirtualQRubberBand : public virtual QRubberBand { +public: + + MiqtVirtualQRubberBand(QRubberBand::Shape param1): QRubberBand(param1) {}; + MiqtVirtualQRubberBand(QRubberBand::Shape param1, QWidget* param2): QRubberBand(param1, param2) {}; + + virtual ~MiqtVirtualQRubberBand() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QRubberBand::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QRubberBand_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QRubberBand::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QRubberBand::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QRubberBand::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QRubberBand::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QRubberBand::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QRubberBand::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QRubberBand::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QRubberBand::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QRubberBand::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* param1) override { + if (handle__MoveEvent == 0) { + QRubberBand::moveEvent(param1); + return; + } + + QMoveEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* param1) { + + QRubberBand::moveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QRubberBand::devType(); + } + + + int callback_return_value = miqt_exec_callback_QRubberBand_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QRubberBand::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QRubberBand::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QRubberBand_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QRubberBand::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QRubberBand::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRubberBand_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QRubberBand::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QRubberBand::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRubberBand_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QRubberBand::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QRubberBand::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QRubberBand_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QRubberBand::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QRubberBand::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QRubberBand_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QRubberBand::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QRubberBand::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QRubberBand_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QRubberBand::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QRubberBand::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QRubberBand::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QRubberBand::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QRubberBand::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QRubberBand::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QRubberBand::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QRubberBand::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QRubberBand::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QRubberBand::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QRubberBand::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QRubberBand::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QRubberBand::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QRubberBand::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QRubberBand::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QRubberBand::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QRubberBand::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QRubberBand::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QRubberBand::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QRubberBand::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QRubberBand::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QRubberBand::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QRubberBand::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QRubberBand::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QRubberBand::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QRubberBand::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QRubberBand::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QRubberBand::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QRubberBand::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QRubberBand::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QRubberBand::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QRubberBand::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QRubberBand::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QRubberBand::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QRubberBand::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QRubberBand::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QRubberBand::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QRubberBand::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QRubberBand::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QRubberBand::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QRubberBand::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QRubberBand::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QRubberBand_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QRubberBand::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QRubberBand::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QRubberBand_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QRubberBand::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QRubberBand::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QRubberBand_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QRubberBand::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QRubberBand::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QRubberBand_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QRubberBand::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QRubberBand::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QRubberBand_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QRubberBand::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QRubberBand::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QRubberBand::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QRubberBand::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QRubberBand_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QRubberBand::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QRubberBand::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QRubberBand_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QRubberBand::focusNextPrevChild(next); + + } + +}; + +void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1)); + *outptr_QRubberBand = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRubberBand* QRubberBand_new2(int param1, QWidget* param2) { - return new QRubberBand(static_cast(param1), param2); +void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1), param2); + *outptr_QRubberBand = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QRubberBand_MetaObject(const QRubberBand* self) { @@ -122,7 +1140,339 @@ struct miqt_string QRubberBand_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QRubberBand_Delete(QRubberBand* self) { - delete self; +void QRubberBand_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__Event = slot; +} + +bool QRubberBand_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_Event(e); +} + +void QRubberBand_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__PaintEvent = slot; +} + +void QRubberBand_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_PaintEvent(param1); +} + +void QRubberBand_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ChangeEvent = slot; +} + +void QRubberBand_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QRubberBand_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ShowEvent = slot; +} + +void QRubberBand_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ShowEvent(param1); +} + +void QRubberBand_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ResizeEvent = slot; +} + +void QRubberBand_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QRubberBand_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MoveEvent = slot; +} + +void QRubberBand_virtualbase_MoveEvent(void* self, QMoveEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MoveEvent(param1); +} + +void QRubberBand_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DevType = slot; +} + +int QRubberBand_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_DevType(); +} + +void QRubberBand_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__SetVisible = slot; +} + +void QRubberBand_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_SetVisible(visible); +} + +void QRubberBand_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__SizeHint = slot; +} + +QSize* QRubberBand_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_SizeHint(); +} + +void QRubberBand_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QRubberBand_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QRubberBand_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__HeightForWidth = slot; +} + +int QRubberBand_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QRubberBand_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QRubberBand_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QRubberBand_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QRubberBand_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_PaintEngine(); +} + +void QRubberBand_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MousePressEvent = slot; +} + +void QRubberBand_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MousePressEvent(event); +} + +void QRubberBand_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QRubberBand_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QRubberBand_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QRubberBand_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QRubberBand_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MouseMoveEvent = slot; +} + +void QRubberBand_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QRubberBand_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__WheelEvent = slot; +} + +void QRubberBand_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_WheelEvent(event); +} + +void QRubberBand_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__KeyPressEvent = slot; +} + +void QRubberBand_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QRubberBand_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QRubberBand_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QRubberBand_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__FocusInEvent = slot; +} + +void QRubberBand_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_FocusInEvent(event); +} + +void QRubberBand_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__FocusOutEvent = slot; +} + +void QRubberBand_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QRubberBand_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__EnterEvent = slot; +} + +void QRubberBand_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_EnterEvent(event); +} + +void QRubberBand_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__LeaveEvent = slot; +} + +void QRubberBand_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_LeaveEvent(event); +} + +void QRubberBand_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__CloseEvent = slot; +} + +void QRubberBand_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_CloseEvent(event); +} + +void QRubberBand_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ContextMenuEvent = slot; +} + +void QRubberBand_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QRubberBand_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__TabletEvent = slot; +} + +void QRubberBand_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_TabletEvent(event); +} + +void QRubberBand_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ActionEvent = slot; +} + +void QRubberBand_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ActionEvent(event); +} + +void QRubberBand_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DragEnterEvent = slot; +} + +void QRubberBand_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QRubberBand_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DragMoveEvent = slot; +} + +void QRubberBand_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QRubberBand_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DragLeaveEvent = slot; +} + +void QRubberBand_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QRubberBand_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DropEvent = slot; +} + +void QRubberBand_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DropEvent(event); +} + +void QRubberBand_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__HideEvent = slot; +} + +void QRubberBand_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_HideEvent(event); +} + +void QRubberBand_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__NativeEvent = slot; +} + +bool QRubberBand_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QRubberBand_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__Metric = slot; +} + +int QRubberBand_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_Metric(param1); +} + +void QRubberBand_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InitPainter = slot; +} + +void QRubberBand_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_InitPainter(painter); +} + +void QRubberBand_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QRubberBand_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_Redirected(offset); +} + +void QRubberBand_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QRubberBand_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_SharedPainter(); +} + +void QRubberBand_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InputMethodEvent = slot; +} + +void QRubberBand_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QRubberBand_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QRubberBand_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QRubberBand_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QRubberBand_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QRubberBand_Delete(QRubberBand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrubberband.go b/qt/gen_qrubberband.go index 2c91403e..9b56e165 100644 --- a/qt/gen_qrubberband.go +++ b/qt/gen_qrubberband.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -21,7 +22,8 @@ const ( ) type QRubberBand struct { - h *C.QRubberBand + h *C.QRubberBand + isSubclass bool *QWidget } @@ -39,27 +41,49 @@ func (this *QRubberBand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRubberBand(h *C.QRubberBand) *QRubberBand { +// newQRubberBand constructs the type using only CGO pointers. +func newQRubberBand(h *C.QRubberBand, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRubberBand { if h == nil { return nil } - return &QRubberBand{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QRubberBand{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQRubberBand(h unsafe.Pointer) *QRubberBand { - return newQRubberBand((*C.QRubberBand)(h)) +// UnsafeNewQRubberBand constructs the type using only unsafe pointers. +func UnsafeNewQRubberBand(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRubberBand { + if h == nil { + return nil + } + + return &QRubberBand{h: (*C.QRubberBand)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQRubberBand constructs a new QRubberBand object. func NewQRubberBand(param1 QRubberBand__Shape) *QRubberBand { - ret := C.QRubberBand_new((C.int)(param1)) - return newQRubberBand(ret) + var outptr_QRubberBand *C.QRubberBand = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRubberBand_new((C.int)(param1), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRubberBand2 constructs a new QRubberBand object. func NewQRubberBand2(param1 QRubberBand__Shape, param2 *QWidget) *QRubberBand { - ret := C.QRubberBand_new2((C.int)(param1), param2.cPointer()) - return newQRubberBand(ret) + var outptr_QRubberBand *C.QRubberBand = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRubberBand_new2((C.int)(param1), param2.cPointer(), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QRubberBand) MetaObject() *QMetaObject { @@ -162,9 +186,975 @@ func QRubberBand_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QRubberBand) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QRubberBand_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QRubberBand) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QRubberBand_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_Event +func miqt_exec_callback_QRubberBand_Event(self *C.QRubberBand, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QRubberBand_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QRubberBand_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_PaintEvent +func miqt_exec_callback_QRubberBand_PaintEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QRubberBand_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QRubberBand_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ChangeEvent +func miqt_exec_callback_QRubberBand_ChangeEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QRubberBand_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QRubberBand_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ShowEvent +func miqt_exec_callback_QRubberBand_ShowEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QRubberBand_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QRubberBand_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ResizeEvent +func miqt_exec_callback_QRubberBand_ResizeEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MoveEvent(param1 *QMoveEvent) { + + C.QRubberBand_virtualbase_MoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnMoveEvent(slot func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) { + C.QRubberBand_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MoveEvent +func miqt_exec_callback_QRubberBand_MoveEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DevType() int { + + return (int)(C.QRubberBand_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QRubberBand) OnDevType(slot func(super func() int) int) { + C.QRubberBand_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DevType +func miqt_exec_callback_QRubberBand_DevType(self *C.QRubberBand, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_SetVisible(visible bool) { + + C.QRubberBand_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QRubberBand) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QRubberBand_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_SetVisible +func miqt_exec_callback_QRubberBand_SetVisible(self *C.QRubberBand, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QRubberBand{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_SizeHint() *QSize { + + _ret := C.QRubberBand_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRubberBand) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QRubberBand_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_SizeHint +func miqt_exec_callback_QRubberBand_SizeHint(self *C.QRubberBand, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QRubberBand_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRubberBand) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QRubberBand_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MinimumSizeHint +func miqt_exec_callback_QRubberBand_MinimumSizeHint(self *C.QRubberBand, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QRubberBand_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QRubberBand) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QRubberBand_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_HeightForWidth +func miqt_exec_callback_QRubberBand_HeightForWidth(self *C.QRubberBand, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QRubberBand_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QRubberBand) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QRubberBand_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_HasHeightForWidth +func miqt_exec_callback_QRubberBand_HasHeightForWidth(self *C.QRubberBand, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QRubberBand_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QRubberBand) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QRubberBand_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_PaintEngine +func miqt_exec_callback_QRubberBand_PaintEngine(self *C.QRubberBand, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MousePressEvent +func miqt_exec_callback_QRubberBand_MousePressEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MouseReleaseEvent +func miqt_exec_callback_QRubberBand_MouseReleaseEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MouseDoubleClickEvent +func miqt_exec_callback_QRubberBand_MouseDoubleClickEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MouseMoveEvent +func miqt_exec_callback_QRubberBand_MouseMoveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QRubberBand_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QRubberBand_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_WheelEvent +func miqt_exec_callback_QRubberBand_WheelEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QRubberBand_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QRubberBand_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_KeyPressEvent +func miqt_exec_callback_QRubberBand_KeyPressEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QRubberBand_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QRubberBand_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_KeyReleaseEvent +func miqt_exec_callback_QRubberBand_KeyReleaseEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QRubberBand_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QRubberBand_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_FocusInEvent +func miqt_exec_callback_QRubberBand_FocusInEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QRubberBand_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QRubberBand_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_FocusOutEvent +func miqt_exec_callback_QRubberBand_FocusOutEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_EnterEvent(event *QEvent) { + + C.QRubberBand_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QRubberBand_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_EnterEvent +func miqt_exec_callback_QRubberBand_EnterEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QRubberBand_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QRubberBand_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_LeaveEvent +func miqt_exec_callback_QRubberBand_LeaveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QRubberBand_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QRubberBand_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_CloseEvent +func miqt_exec_callback_QRubberBand_CloseEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QRubberBand_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QRubberBand_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ContextMenuEvent +func miqt_exec_callback_QRubberBand_ContextMenuEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QRubberBand_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QRubberBand_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_TabletEvent +func miqt_exec_callback_QRubberBand_TabletEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QRubberBand_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QRubberBand_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ActionEvent +func miqt_exec_callback_QRubberBand_ActionEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QRubberBand_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QRubberBand_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DragEnterEvent +func miqt_exec_callback_QRubberBand_DragEnterEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QRubberBand_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QRubberBand_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DragMoveEvent +func miqt_exec_callback_QRubberBand_DragMoveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QRubberBand_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QRubberBand_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DragLeaveEvent +func miqt_exec_callback_QRubberBand_DragLeaveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QRubberBand_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QRubberBand_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DropEvent +func miqt_exec_callback_QRubberBand_DropEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QRubberBand_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QRubberBand_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_HideEvent +func miqt_exec_callback_QRubberBand_HideEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QRubberBand_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QRubberBand) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QRubberBand_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_NativeEvent +func miqt_exec_callback_QRubberBand_NativeEvent(self *C.QRubberBand, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QRubberBand_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QRubberBand) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QRubberBand_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_Metric +func miqt_exec_callback_QRubberBand_Metric(self *C.QRubberBand, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_InitPainter(painter *QPainter) { + + C.QRubberBand_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QRubberBand) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QRubberBand_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InitPainter +func miqt_exec_callback_QRubberBand_InitPainter(self *C.QRubberBand, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QRubberBand_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QRubberBand) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QRubberBand_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_Redirected +func miqt_exec_callback_QRubberBand_Redirected(self *C.QRubberBand, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QRubberBand_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QRubberBand) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QRubberBand_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_SharedPainter +func miqt_exec_callback_QRubberBand_SharedPainter(self *C.QRubberBand, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QRubberBand_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QRubberBand_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InputMethodEvent +func miqt_exec_callback_QRubberBand_InputMethodEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QRubberBand_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRubberBand) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QRubberBand_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InputMethodQuery +func miqt_exec_callback_QRubberBand_InputMethodQuery(self *C.QRubberBand, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QRubberBand_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QRubberBand) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QRubberBand_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_FocusNextPrevChild +func miqt_exec_callback_QRubberBand_FocusNextPrevChild(self *C.QRubberBand, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QRubberBand) Delete() { - C.QRubberBand_Delete(this.h) + C.QRubberBand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrubberband.h b/qt/gen_qrubberband.h index 1a2192ed..6f031924 100644 --- a/qt/gen_qrubberband.h +++ b/qt/gen_qrubberband.h @@ -15,23 +15,73 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; class QRubberBand; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QRubberBand QRubberBand; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QRubberBand* QRubberBand_new(int param1); -QRubberBand* QRubberBand_new2(int param1, QWidget* param2); +void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QRubberBand_MetaObject(const QRubberBand* self); void* QRubberBand_Metacast(QRubberBand* self, const char* param1); struct miqt_string QRubberBand_Tr(const char* s); @@ -43,11 +93,99 @@ void QRubberBand_Move(QRubberBand* self, int x, int y); void QRubberBand_MoveWithQPoint(QRubberBand* self, QPoint* p); void QRubberBand_Resize(QRubberBand* self, int w, int h); void QRubberBand_ResizeWithQSize(QRubberBand* self, QSize* s); +bool QRubberBand_Event(QRubberBand* self, QEvent* e); +void QRubberBand_PaintEvent(QRubberBand* self, QPaintEvent* param1); +void QRubberBand_ChangeEvent(QRubberBand* self, QEvent* param1); +void QRubberBand_ShowEvent(QRubberBand* self, QShowEvent* param1); +void QRubberBand_ResizeEvent(QRubberBand* self, QResizeEvent* param1); +void QRubberBand_MoveEvent(QRubberBand* self, QMoveEvent* param1); struct miqt_string QRubberBand_Tr2(const char* s, const char* c); struct miqt_string QRubberBand_Tr3(const char* s, const char* c, int n); struct miqt_string QRubberBand_TrUtf82(const char* s, const char* c); struct miqt_string QRubberBand_TrUtf83(const char* s, const char* c, int n); -void QRubberBand_Delete(QRubberBand* self); +void QRubberBand_override_virtual_Event(void* self, intptr_t slot); +bool QRubberBand_virtualbase_Event(void* self, QEvent* e); +void QRubberBand_override_virtual_PaintEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QRubberBand_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QRubberBand_override_virtual_ShowEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QRubberBand_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QRubberBand_override_virtual_MoveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MoveEvent(void* self, QMoveEvent* param1); +void QRubberBand_override_virtual_DevType(void* self, intptr_t slot); +int QRubberBand_virtualbase_DevType(const void* self); +void QRubberBand_override_virtual_SetVisible(void* self, intptr_t slot); +void QRubberBand_virtualbase_SetVisible(void* self, bool visible); +void QRubberBand_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QRubberBand_virtualbase_SizeHint(const void* self); +void QRubberBand_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QRubberBand_virtualbase_MinimumSizeHint(const void* self); +void QRubberBand_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QRubberBand_virtualbase_HeightForWidth(const void* self, int param1); +void QRubberBand_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QRubberBand_virtualbase_HasHeightForWidth(const void* self); +void QRubberBand_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QRubberBand_virtualbase_PaintEngine(const void* self); +void QRubberBand_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_WheelEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QRubberBand_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QRubberBand_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QRubberBand_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QRubberBand_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QRubberBand_override_virtual_EnterEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_EnterEvent(void* self, QEvent* event); +void QRubberBand_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_LeaveEvent(void* self, QEvent* event); +void QRubberBand_override_virtual_CloseEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QRubberBand_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QRubberBand_override_virtual_TabletEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QRubberBand_override_virtual_ActionEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QRubberBand_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QRubberBand_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QRubberBand_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QRubberBand_override_virtual_DropEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DropEvent(void* self, QDropEvent* event); +void QRubberBand_override_virtual_HideEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_HideEvent(void* self, QHideEvent* event); +void QRubberBand_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QRubberBand_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QRubberBand_override_virtual_Metric(void* self, intptr_t slot); +int QRubberBand_virtualbase_Metric(const void* self, int param1); +void QRubberBand_override_virtual_InitPainter(void* self, intptr_t slot); +void QRubberBand_virtualbase_InitPainter(const void* self, QPainter* painter); +void QRubberBand_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QRubberBand_virtualbase_Redirected(const void* self, QPoint* offset); +void QRubberBand_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QRubberBand_virtualbase_SharedPainter(const void* self); +void QRubberBand_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QRubberBand_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QRubberBand_virtualbase_InputMethodQuery(const void* self, int param1); +void QRubberBand_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QRubberBand_virtualbase_FocusNextPrevChild(void* self, bool next); +void QRubberBand_Delete(QRubberBand* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qrunnable.cpp b/qt/gen_qrunnable.cpp index 6c6ab6e8..0b20ed50 100644 --- a/qt/gen_qrunnable.cpp +++ b/qt/gen_qrunnable.cpp @@ -19,7 +19,11 @@ void QRunnable_OperatorAssign(QRunnable* self, QRunnable* param1) { self->operator=(*param1); } -void QRunnable_Delete(QRunnable* self) { - delete self; +void QRunnable_Delete(QRunnable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qrunnable.go b/qt/gen_qrunnable.go index 5d8d23bc..266a0212 100644 --- a/qt/gen_qrunnable.go +++ b/qt/gen_qrunnable.go @@ -14,7 +14,8 @@ import ( ) type QRunnable struct { - h *C.QRunnable + h *C.QRunnable + isSubclass bool } func (this *QRunnable) cPointer() *C.QRunnable { @@ -31,6 +32,7 @@ func (this *QRunnable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRunnable constructs the type using only CGO pointers. func newQRunnable(h *C.QRunnable) *QRunnable { if h == nil { return nil @@ -38,8 +40,13 @@ func newQRunnable(h *C.QRunnable) *QRunnable { return &QRunnable{h: h} } +// UnsafeNewQRunnable constructs the type using only unsafe pointers. func UnsafeNewQRunnable(h unsafe.Pointer) *QRunnable { - return newQRunnable((*C.QRunnable)(h)) + if h == nil { + return nil + } + + return &QRunnable{h: (*C.QRunnable)(h)} } func (this *QRunnable) Run() { @@ -60,7 +67,7 @@ func (this *QRunnable) OperatorAssign(param1 *QRunnable) { // Delete this object from C++ memory. func (this *QRunnable) Delete() { - C.QRunnable_Delete(this.h) + C.QRunnable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qrunnable.h b/qt/gen_qrunnable.h index 4e9a1924..1927f6f0 100644 --- a/qt/gen_qrunnable.h +++ b/qt/gen_qrunnable.h @@ -24,7 +24,7 @@ void QRunnable_Run(QRunnable* self); bool QRunnable_AutoDelete(const QRunnable* self); void QRunnable_SetAutoDelete(QRunnable* self, bool _autoDelete); void QRunnable_OperatorAssign(QRunnable* self, QRunnable* param1); -void QRunnable_Delete(QRunnable* self); +void QRunnable_Delete(QRunnable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsavefile.cpp b/qt/gen_qsavefile.cpp index 2aeea087..57e6159f 100644 --- a/qt/gen_qsavefile.cpp +++ b/qt/gen_qsavefile.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -8,22 +10,367 @@ #include "gen_qsavefile.h" #include "_cgo_export.h" -QSaveFile* QSaveFile_new(struct miqt_string name) { +class MiqtVirtualQSaveFile : public virtual QSaveFile { +public: + + MiqtVirtualQSaveFile(const QString& name): QSaveFile(name) {}; + MiqtVirtualQSaveFile(): QSaveFile() {}; + MiqtVirtualQSaveFile(const QString& name, QObject* parent): QSaveFile(name, parent) {}; + MiqtVirtualQSaveFile(QObject* parent): QSaveFile(parent) {}; + + virtual ~MiqtVirtualQSaveFile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FileName = 0; + + // Subclass to allow providing a Go implementation + virtual QString fileName() const override { + if (handle__FileName == 0) { + return QSaveFile::fileName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QSaveFile_FileName(const_cast(this), handle__FileName); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FileName() const { + + QString _ret = QSaveFile::fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode flags) override { + if (handle__Open == 0) { + return QSaveFile::open(flags); + } + + QIODevice::OpenMode flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int flags) { + + return QSaveFile::open(static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QSaveFile::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QSaveFile_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QSaveFile::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QSaveFile::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QSaveFile_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QSaveFile::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QSaveFile::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QSaveFile_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QSaveFile::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 offset) override { + if (handle__Seek == 0) { + return QSaveFile::seek(offset); + } + + qint64 offset_ret = offset; + long long sigval1 = static_cast(offset_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long offset) { + + return QSaveFile::seek(static_cast(offset)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QSaveFile::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QSaveFile_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QSaveFile::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QSaveFile::size(); + } + + + long long callback_return_value = miqt_exec_callback_QSaveFile_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QSaveFile::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resize = 0; + + // Subclass to allow providing a Go implementation + virtual bool resize(qint64 sz) override { + if (handle__Resize == 0) { + return QSaveFile::resize(sz); + } + + qint64 sz_ret = sz; + long long sigval1 = static_cast(sz_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_Resize(this, handle__Resize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Resize(long long sz) { + + return QSaveFile::resize(static_cast(sz)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Permissions = 0; + + // Subclass to allow providing a Go implementation + virtual QFileDevice::Permissions permissions() const override { + if (handle__Permissions == 0) { + return QSaveFile::permissions(); + } + + + int callback_return_value = miqt_exec_callback_QSaveFile_Permissions(const_cast(this), handle__Permissions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Permissions() const { + + QFileDevice::Permissions _ret = QSaveFile::permissions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPermissions = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPermissions(QFileDevice::Permissions permissionSpec) override { + if (handle__SetPermissions == 0) { + return QSaveFile::setPermissions(permissionSpec); + } + + QFileDevice::Permissions permissionSpec_ret = permissionSpec; + int sigval1 = static_cast(permissionSpec_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_SetPermissions(this, handle__SetPermissions, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPermissions(int permissionSpec) { + + return QSaveFile::setPermissions(static_cast(permissionSpec)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QSaveFile::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSaveFile_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QSaveFile::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QSaveFile::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSaveFile_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QSaveFile::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSaveFile(name_QString); + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSaveFile* QSaveFile_new2() { - return new QSaveFile(); +void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent) { +void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSaveFile(name_QString, parent); + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString, parent); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSaveFile* QSaveFile_new4(QObject* parent) { - return new QSaveFile(parent); +void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(parent); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSaveFile_MetaObject(const QSaveFile* self) { @@ -136,7 +483,115 @@ struct miqt_string QSaveFile_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSaveFile_Delete(QSaveFile* self) { - delete self; +void QSaveFile_override_virtual_FileName(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__FileName = slot; +} + +struct miqt_string QSaveFile_virtualbase_FileName(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_FileName(); +} + +void QSaveFile_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Open = slot; +} + +bool QSaveFile_virtualbase_Open(void* self, int flags) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_Open(flags); +} + +void QSaveFile_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__WriteData = slot; +} + +long long QSaveFile_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QSaveFile_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__IsSequential = slot; +} + +bool QSaveFile_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_IsSequential(); +} + +void QSaveFile_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Pos = slot; +} + +long long QSaveFile_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_Pos(); +} + +void QSaveFile_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Seek = slot; +} + +bool QSaveFile_virtualbase_Seek(void* self, long long offset) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_Seek(offset); +} + +void QSaveFile_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__AtEnd = slot; +} + +bool QSaveFile_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_AtEnd(); +} + +void QSaveFile_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Size = slot; +} + +long long QSaveFile_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_Size(); +} + +void QSaveFile_override_virtual_Resize(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Resize = slot; +} + +bool QSaveFile_virtualbase_Resize(void* self, long long sz) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_Resize(sz); +} + +void QSaveFile_override_virtual_Permissions(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Permissions = slot; +} + +int QSaveFile_virtualbase_Permissions(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_Permissions(); +} + +void QSaveFile_override_virtual_SetPermissions(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__SetPermissions = slot; +} + +bool QSaveFile_virtualbase_SetPermissions(void* self, int permissionSpec) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_SetPermissions(permissionSpec); +} + +void QSaveFile_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__ReadData = slot; +} + +long long QSaveFile_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QSaveFile_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__ReadLineData = slot; +} + +long long QSaveFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QSaveFile_Delete(QSaveFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsavefile.go b/qt/gen_qsavefile.go index eda36cef..dc06cf65 100644 --- a/qt/gen_qsavefile.go +++ b/qt/gen_qsavefile.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QSaveFile struct { - h *C.QSaveFile + h *C.QSaveFile + isSubclass bool *QFileDevice } @@ -32,15 +34,23 @@ func (this *QSaveFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSaveFile(h *C.QSaveFile) *QSaveFile { +// newQSaveFile constructs the type using only CGO pointers. +func newQSaveFile(h *C.QSaveFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QSaveFile { if h == nil { return nil } - return &QSaveFile{h: h, QFileDevice: UnsafeNewQFileDevice(unsafe.Pointer(h))} + return &QSaveFile{h: h, + QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} } -func UnsafeNewQSaveFile(h unsafe.Pointer) *QSaveFile { - return newQSaveFile((*C.QSaveFile)(h)) +// UnsafeNewQSaveFile constructs the type using only unsafe pointers. +func UnsafeNewQSaveFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QSaveFile { + if h == nil { + return nil + } + + return &QSaveFile{h: (*C.QSaveFile)(h), + QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} } // NewQSaveFile constructs a new QSaveFile object. @@ -49,14 +59,28 @@ func NewQSaveFile(name string) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSaveFile_new(name_ms) - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QSaveFile_new(name_ms, &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSaveFile2 constructs a new QSaveFile object. func NewQSaveFile2() *QSaveFile { - ret := C.QSaveFile_new2() - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QSaveFile_new2(&outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSaveFile3 constructs a new QSaveFile object. @@ -65,14 +89,28 @@ func NewQSaveFile3(name string, parent *QObject) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSaveFile_new3(name_ms, parent.cPointer()) - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QSaveFile_new3(name_ms, parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSaveFile4 constructs a new QSaveFile object. func NewQSaveFile4(parent *QObject) *QSaveFile { - ret := C.QSaveFile_new4(parent.cPointer()) - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QSaveFile_new4(parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSaveFile) MetaObject() *QMetaObject { @@ -182,9 +220,337 @@ func QSaveFile_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSaveFile) callVirtualBase_FileName() string { + + var _ms C.struct_miqt_string = C.QSaveFile_virtualbase_FileName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QSaveFile) OnFileName(slot func(super func() string) string) { + C.QSaveFile_override_virtual_FileName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_FileName +func miqt_exec_callback_QSaveFile_FileName(self *C.QSaveFile, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_FileName) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QSaveFile) callVirtualBase_Open(flags QIODevice__OpenModeFlag) bool { + + return (bool)(C.QSaveFile_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(flags))) + +} +func (this *QSaveFile) OnOpen(slot func(super func(flags QIODevice__OpenModeFlag) bool, flags QIODevice__OpenModeFlag) bool) { + C.QSaveFile_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Open +func miqt_exec_callback_QSaveFile_Open(self *C.QSaveFile, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QIODevice__OpenModeFlag) bool, flags QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODevice__OpenModeFlag)(flags) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSaveFile_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QSaveFile) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QSaveFile_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_WriteData +func miqt_exec_callback_QSaveFile_WriteData(self *C.QSaveFile, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_IsSequential() bool { + + return (bool)(C.QSaveFile_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnIsSequential(slot func(super func() bool) bool) { + C.QSaveFile_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_IsSequential +func miqt_exec_callback_QSaveFile_IsSequential(self *C.QSaveFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Pos() int64 { + + return (int64)(C.QSaveFile_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnPos(slot func(super func() int64) int64) { + C.QSaveFile_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Pos +func miqt_exec_callback_QSaveFile_Pos(self *C.QSaveFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Seek(offset int64) bool { + + return (bool)(C.QSaveFile_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(offset))) + +} +func (this *QSaveFile) OnSeek(slot func(super func(offset int64) bool, offset int64) bool) { + C.QSaveFile_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Seek +func miqt_exec_callback_QSaveFile_Seek(self *C.QSaveFile, cb C.intptr_t, offset C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset int64) bool, offset int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(offset) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_AtEnd() bool { + + return (bool)(C.QSaveFile_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnAtEnd(slot func(super func() bool) bool) { + C.QSaveFile_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_AtEnd +func miqt_exec_callback_QSaveFile_AtEnd(self *C.QSaveFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Size() int64 { + + return (int64)(C.QSaveFile_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnSize(slot func(super func() int64) int64) { + C.QSaveFile_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Size +func miqt_exec_callback_QSaveFile_Size(self *C.QSaveFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Resize(sz int64) bool { + + return (bool)(C.QSaveFile_virtualbase_Resize(unsafe.Pointer(this.h), (C.longlong)(sz))) + +} +func (this *QSaveFile) OnResize(slot func(super func(sz int64) bool, sz int64) bool) { + C.QSaveFile_override_virtual_Resize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Resize +func miqt_exec_callback_QSaveFile_Resize(self *C.QSaveFile, cb C.intptr_t, sz C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sz int64) bool, sz int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(sz) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Resize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Permissions() QFileDevice__Permission { + + return (QFileDevice__Permission)(C.QSaveFile_virtualbase_Permissions(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnPermissions(slot func(super func() QFileDevice__Permission) QFileDevice__Permission) { + C.QSaveFile_override_virtual_Permissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Permissions +func miqt_exec_callback_QSaveFile_Permissions(self *C.QSaveFile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QFileDevice__Permission) QFileDevice__Permission) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Permissions) + + return (C.int)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_SetPermissions(permissionSpec QFileDevice__Permission) bool { + + return (bool)(C.QSaveFile_virtualbase_SetPermissions(unsafe.Pointer(this.h), (C.int)(permissionSpec))) + +} +func (this *QSaveFile) OnSetPermissions(slot func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) { + C.QSaveFile_override_virtual_SetPermissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_SetPermissions +func miqt_exec_callback_QSaveFile_SetPermissions(self *C.QSaveFile, cb C.intptr_t, permissionSpec C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileDevice__Permission)(permissionSpec) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_SetPermissions, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSaveFile_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSaveFile) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSaveFile_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_ReadData +func miqt_exec_callback_QSaveFile_ReadData(self *C.QSaveFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSaveFile_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSaveFile) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSaveFile_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_ReadLineData +func miqt_exec_callback_QSaveFile_ReadLineData(self *C.QSaveFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSaveFile) Delete() { - C.QSaveFile_Delete(this.h) + C.QSaveFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsavefile.h b/qt/gen_qsavefile.h index 0fa71b5c..322cf83e 100644 --- a/qt/gen_qsavefile.h +++ b/qt/gen_qsavefile.h @@ -15,19 +15,23 @@ extern "C" { #endif #ifdef __cplusplus +class QFileDevice; +class QIODevice; class QMetaObject; class QObject; class QSaveFile; #else +typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSaveFile QSaveFile; #endif -QSaveFile* QSaveFile_new(struct miqt_string name); -QSaveFile* QSaveFile_new2(); -QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent); -QSaveFile* QSaveFile_new4(QObject* parent); +void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QSaveFile_MetaObject(const QSaveFile* self); void* QSaveFile_Metacast(QSaveFile* self, const char* param1); struct miqt_string QSaveFile_Tr(const char* s); @@ -39,11 +43,38 @@ bool QSaveFile_Commit(QSaveFile* self); void QSaveFile_CancelWriting(QSaveFile* self); void QSaveFile_SetDirectWriteFallback(QSaveFile* self, bool enabled); bool QSaveFile_DirectWriteFallback(const QSaveFile* self); +long long QSaveFile_WriteData(QSaveFile* self, const char* data, long long lenVal); struct miqt_string QSaveFile_Tr2(const char* s, const char* c); struct miqt_string QSaveFile_Tr3(const char* s, const char* c, int n); struct miqt_string QSaveFile_TrUtf82(const char* s, const char* c); struct miqt_string QSaveFile_TrUtf83(const char* s, const char* c, int n); -void QSaveFile_Delete(QSaveFile* self); +void QSaveFile_override_virtual_FileName(void* self, intptr_t slot); +struct miqt_string QSaveFile_virtualbase_FileName(const void* self); +void QSaveFile_override_virtual_Open(void* self, intptr_t slot); +bool QSaveFile_virtualbase_Open(void* self, int flags); +void QSaveFile_override_virtual_WriteData(void* self, intptr_t slot); +long long QSaveFile_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QSaveFile_override_virtual_IsSequential(void* self, intptr_t slot); +bool QSaveFile_virtualbase_IsSequential(const void* self); +void QSaveFile_override_virtual_Pos(void* self, intptr_t slot); +long long QSaveFile_virtualbase_Pos(const void* self); +void QSaveFile_override_virtual_Seek(void* self, intptr_t slot); +bool QSaveFile_virtualbase_Seek(void* self, long long offset); +void QSaveFile_override_virtual_AtEnd(void* self, intptr_t slot); +bool QSaveFile_virtualbase_AtEnd(const void* self); +void QSaveFile_override_virtual_Size(void* self, intptr_t slot); +long long QSaveFile_virtualbase_Size(const void* self); +void QSaveFile_override_virtual_Resize(void* self, intptr_t slot); +bool QSaveFile_virtualbase_Resize(void* self, long long sz); +void QSaveFile_override_virtual_Permissions(void* self, intptr_t slot); +int QSaveFile_virtualbase_Permissions(const void* self); +void QSaveFile_override_virtual_SetPermissions(void* self, intptr_t slot); +bool QSaveFile_virtualbase_SetPermissions(void* self, int permissionSpec); +void QSaveFile_override_virtual_ReadData(void* self, intptr_t slot); +long long QSaveFile_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QSaveFile_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QSaveFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QSaveFile_Delete(QSaveFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qscopedpointer.cpp b/qt/gen_qscopedpointer.cpp index 5b25a0c8..39c07c9e 100644 --- a/qt/gen_qscopedpointer.cpp +++ b/qt/gen_qscopedpointer.cpp @@ -7,7 +7,11 @@ void QScopedPointerPodDeleter_Cleanup(void* pointer) { QScopedPointerPodDeleter::cleanup(pointer); } -void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self) { - delete self; +void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qscopedpointer.go b/qt/gen_qscopedpointer.go index 23303fb7..47c92bf6 100644 --- a/qt/gen_qscopedpointer.go +++ b/qt/gen_qscopedpointer.go @@ -14,7 +14,8 @@ import ( ) type QScopedPointerPodDeleter struct { - h *C.QScopedPointerPodDeleter + h *C.QScopedPointerPodDeleter + isSubclass bool } func (this *QScopedPointerPodDeleter) cPointer() *C.QScopedPointerPodDeleter { @@ -31,6 +32,7 @@ func (this *QScopedPointerPodDeleter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQScopedPointerPodDeleter constructs the type using only CGO pointers. func newQScopedPointerPodDeleter(h *C.QScopedPointerPodDeleter) *QScopedPointerPodDeleter { if h == nil { return nil @@ -38,8 +40,13 @@ func newQScopedPointerPodDeleter(h *C.QScopedPointerPodDeleter) *QScopedPointerP return &QScopedPointerPodDeleter{h: h} } +// UnsafeNewQScopedPointerPodDeleter constructs the type using only unsafe pointers. func UnsafeNewQScopedPointerPodDeleter(h unsafe.Pointer) *QScopedPointerPodDeleter { - return newQScopedPointerPodDeleter((*C.QScopedPointerPodDeleter)(h)) + if h == nil { + return nil + } + + return &QScopedPointerPodDeleter{h: (*C.QScopedPointerPodDeleter)(h)} } func QScopedPointerPodDeleter_Cleanup(pointer unsafe.Pointer) { @@ -48,7 +55,7 @@ func QScopedPointerPodDeleter_Cleanup(pointer unsafe.Pointer) { // Delete this object from C++ memory. func (this *QScopedPointerPodDeleter) Delete() { - C.QScopedPointerPodDeleter_Delete(this.h) + C.QScopedPointerPodDeleter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qscopedpointer.h b/qt/gen_qscopedpointer.h index 6b21b77a..4bf032ce 100644 --- a/qt/gen_qscopedpointer.h +++ b/qt/gen_qscopedpointer.h @@ -21,7 +21,7 @@ typedef struct QScopedPointerPodDeleter QScopedPointerPodDeleter; #endif void QScopedPointerPodDeleter_Cleanup(void* pointer); -void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self); +void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qscreen.cpp b/qt/gen_qscreen.cpp index 60e92be0..504d452b 100644 --- a/qt/gen_qscreen.cpp +++ b/qt/gen_qscreen.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -405,7 +406,11 @@ QPixmap* QScreen_GrabWindow5(QScreen* self, uintptr_t window, int x, int y, int return new QPixmap(self->grabWindow(static_cast(window), static_cast(x), static_cast(y), static_cast(w), static_cast(h))); } -void QScreen_Delete(QScreen* self) { - delete self; +void QScreen_Delete(QScreen* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qscreen.go b/qt/gen_qscreen.go index ed26e7fe..643591da 100644 --- a/qt/gen_qscreen.go +++ b/qt/gen_qscreen.go @@ -15,7 +15,8 @@ import ( ) type QScreen struct { - h *C.QScreen + h *C.QScreen + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QScreen) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScreen(h *C.QScreen) *QScreen { +// newQScreen constructs the type using only CGO pointers. +func newQScreen(h *C.QScreen, h_QObject *C.QObject) *QScreen { if h == nil { return nil } - return &QScreen{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QScreen{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQScreen(h unsafe.Pointer) *QScreen { - return newQScreen((*C.QScreen)(h)) +// UnsafeNewQScreen constructs the type using only unsafe pointers. +func UnsafeNewQScreen(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScreen { + if h == nil { + return nil + } + + return &QScreen{h: (*C.QScreen)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QScreen) MetaObject() *QMetaObject { @@ -172,13 +181,13 @@ func (this *QScreen) VirtualSiblings() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QScreen) VirtualSiblingAt(point QPoint) *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QScreen_VirtualSiblingAt(this.h, point.cPointer()))) + return UnsafeNewQScreen(unsafe.Pointer(C.QScreen_VirtualSiblingAt(this.h, point.cPointer())), nil) } func (this *QScreen) VirtualSize() *QSize { @@ -257,7 +266,7 @@ func (this *QScreen) IsLandscape(orientation ScreenOrientation) bool { func (this *QScreen) GrabWindow(window uintptr) *QPixmap { _ret := C.QScreen_GrabWindow(this.h, (C.uintptr_t)(window)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -492,35 +501,35 @@ func QScreen_TrUtf83(s string, c string, n int) string { func (this *QScreen) GrabWindow2(window uintptr, x int) *QPixmap { _ret := C.QScreen_GrabWindow2(this.h, (C.uintptr_t)(window), (C.int)(x)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow3(window uintptr, x int, y int) *QPixmap { _ret := C.QScreen_GrabWindow3(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow4(window uintptr, x int, y int, w int) *QPixmap { _ret := C.QScreen_GrabWindow4(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow5(window uintptr, x int, y int, w int, h int) *QPixmap { _ret := C.QScreen_GrabWindow5(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } // Delete this object from C++ memory. func (this *QScreen) Delete() { - C.QScreen_Delete(this.h) + C.QScreen_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qscreen.h b/qt/gen_qscreen.h index 528335f3..116e9487 100644 --- a/qt/gen_qscreen.h +++ b/qt/gen_qscreen.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QPixmap; class QPoint; class QRect; @@ -25,6 +26,7 @@ class QSizeF; class QTransform; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QRect QRect; @@ -99,7 +101,7 @@ QPixmap* QScreen_GrabWindow2(QScreen* self, uintptr_t window, int x); QPixmap* QScreen_GrabWindow3(QScreen* self, uintptr_t window, int x, int y); QPixmap* QScreen_GrabWindow4(QScreen* self, uintptr_t window, int x, int y, int w); QPixmap* QScreen_GrabWindow5(QScreen* self, uintptr_t window, int x, int y, int w, int h); -void QScreen_Delete(QScreen* self); +void QScreen_Delete(QScreen* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qscrollarea.cpp b/qt/gen_qscrollarea.cpp index ad6b7212..1f05d0bd 100644 --- a/qt/gen_qscrollarea.cpp +++ b/qt/gen_qscrollarea.cpp @@ -1,20 +1,577 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include "gen_qscrollarea.h" #include "_cgo_export.h" -QScrollArea* QScrollArea_new(QWidget* parent) { - return new QScrollArea(parent); +class MiqtVirtualQScrollArea : public virtual QScrollArea { +public: + + MiqtVirtualQScrollArea(QWidget* parent): QScrollArea(parent) {}; + MiqtVirtualQScrollArea(): QScrollArea() {}; + + virtual ~MiqtVirtualQScrollArea() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QScrollArea::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollArea_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QScrollArea::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QScrollArea::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QScrollArea_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QScrollArea::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QScrollArea::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QScrollArea_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QScrollArea::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QScrollArea::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QScrollArea_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QScrollArea::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QScrollArea::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QScrollArea::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QScrollArea::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QScrollArea_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QScrollArea::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QScrollArea::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollArea_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QScrollArea::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QScrollArea::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollArea_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QScrollArea::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QScrollArea::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QScrollArea_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QScrollArea::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QScrollArea::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QScrollArea_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QScrollArea::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QScrollArea::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QScrollArea::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QScrollArea::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QScrollArea::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QScrollArea::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QScrollArea::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QScrollArea::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QScrollArea::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QScrollArea::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QScrollArea::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QScrollArea::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QScrollArea::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QScrollArea::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QScrollArea::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QScrollArea::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QScrollArea::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QScrollArea::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QScrollArea::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QScrollArea::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QScrollArea::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QScrollArea::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QScrollArea::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QScrollArea::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QScrollArea::keyPressEvent(param1); + + } + +}; + +void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(parent); + *outptr_QScrollArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollArea* QScrollArea_new2() { - return new QScrollArea(); +void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(); + *outptr_QScrollArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QScrollArea_MetaObject(const QScrollArea* self) { @@ -152,7 +709,187 @@ void QScrollArea_EnsureWidgetVisible3(QScrollArea* self, QWidget* childWidget, i self->ensureWidgetVisible(childWidget, static_cast(xmargin), static_cast(ymargin)); } -void QScrollArea_Delete(QScrollArea* self) { - delete self; +void QScrollArea_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__SizeHint = slot; +} + +QSize* QScrollArea_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQScrollArea*)(self) )->virtualbase_SizeHint(); +} + +void QScrollArea_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QScrollArea_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QScrollArea_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__Event = slot; +} + +bool QScrollArea_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_Event(param1); +} + +void QScrollArea_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__EventFilter = slot; +} + +bool QScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ResizeEvent = slot; +} + +void QScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ScrollContentsBy = slot; +} + +void QScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QScrollArea_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQScrollArea*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QScrollArea_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQScrollArea*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__SetupViewport = slot; +} + +void QScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ViewportEvent = slot; +} + +bool QScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__PaintEvent = slot; +} + +void QScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_PaintEvent(param1); +} + +void QScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MousePressEvent = slot; +} + +void QScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MouseMoveEvent = slot; +} + +void QScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__WheelEvent = slot; +} + +void QScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_WheelEvent(param1); +} + +void QScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ContextMenuEvent = slot; +} + +void QScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DragEnterEvent = slot; +} + +void QScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DragMoveEvent = slot; +} + +void QScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DragLeaveEvent = slot; +} + +void QScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QScrollArea_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DropEvent = slot; +} + +void QScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DropEvent(param1); +} + +void QScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__KeyPressEvent = slot; +} + +void QScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QScrollArea_Delete(QScrollArea* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qscrollarea.go b/qt/gen_qscrollarea.go index d1fb1463..2a34db7e 100644 --- a/qt/gen_qscrollarea.go +++ b/qt/gen_qscrollarea.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QScrollArea struct { - h *C.QScrollArea + h *C.QScrollArea + isSubclass bool *QAbstractScrollArea } @@ -32,27 +34,53 @@ func (this *QScrollArea) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollArea(h *C.QScrollArea) *QScrollArea { +// newQScrollArea constructs the type using only CGO pointers. +func newQScrollArea(h *C.QScrollArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollArea { if h == nil { return nil } - return &QScrollArea{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QScrollArea{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQScrollArea(h unsafe.Pointer) *QScrollArea { - return newQScrollArea((*C.QScrollArea)(h)) +// UnsafeNewQScrollArea constructs the type using only unsafe pointers. +func UnsafeNewQScrollArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollArea { + if h == nil { + return nil + } + + return &QScrollArea{h: (*C.QScrollArea)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQScrollArea constructs a new QScrollArea object. func NewQScrollArea(parent *QWidget) *QScrollArea { - ret := C.QScrollArea_new(parent.cPointer()) - return newQScrollArea(ret) + var outptr_QScrollArea *C.QScrollArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollArea_new(parent.cPointer(), &outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollArea2 constructs a new QScrollArea object. func NewQScrollArea2() *QScrollArea { - ret := C.QScrollArea_new2() - return newQScrollArea(ret) + var outptr_QScrollArea *C.QScrollArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollArea_new2(&outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QScrollArea) MetaObject() *QMetaObject { @@ -84,7 +112,7 @@ func QScrollArea_TrUtf8(s string) string { } func (this *QScrollArea) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_Widget(this.h)), nil, nil) } func (this *QScrollArea) SetWidget(widget *QWidget) { @@ -92,7 +120,7 @@ func (this *QScrollArea) SetWidget(widget *QWidget) { } func (this *QScrollArea) TakeWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_TakeWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_TakeWidget(this.h)), nil, nil) } func (this *QScrollArea) WidgetResizable() bool { @@ -190,9 +218,532 @@ func (this *QScrollArea) EnsureWidgetVisible3(childWidget *QWidget, xmargin int, C.QScrollArea_EnsureWidgetVisible3(this.h, childWidget.cPointer(), (C.int)(xmargin), (C.int)(ymargin)) } +func (this *QScrollArea) callVirtualBase_SizeHint() *QSize { + + _ret := C.QScrollArea_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollArea) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollArea_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_SizeHint +func miqt_exec_callback_QScrollArea_SizeHint(self *C.QScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollArea) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QScrollArea_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QScrollArea) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QScrollArea_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_FocusNextPrevChild +func miqt_exec_callback_QScrollArea_FocusNextPrevChild(self *C.QScrollArea, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QScrollArea_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QScrollArea) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QScrollArea_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_Event +func miqt_exec_callback_QScrollArea_Event(self *C.QScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QScrollArea_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QScrollArea) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QScrollArea_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_EventFilter +func miqt_exec_callback_QScrollArea_EventFilter(self *C.QScrollArea, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QScrollArea_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QScrollArea_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ResizeEvent +func miqt_exec_callback_QScrollArea_ResizeEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QScrollArea_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QScrollArea) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QScrollArea_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ScrollContentsBy +func miqt_exec_callback_QScrollArea_ScrollContentsBy(self *C.QScrollArea, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QScrollArea{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QScrollArea) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QScrollArea_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollArea) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollArea_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ViewportSizeHint +func miqt_exec_callback_QScrollArea_ViewportSizeHint(self *C.QScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollArea) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QScrollArea_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollArea) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollArea_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MinimumSizeHint +func miqt_exec_callback_QScrollArea_MinimumSizeHint(self *C.QScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollArea) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QScrollArea_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QScrollArea) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QScrollArea_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_SetupViewport +func miqt_exec_callback_QScrollArea_SetupViewport(self *C.QScrollArea, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QScrollArea_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QScrollArea) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QScrollArea_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ViewportEvent +func miqt_exec_callback_QScrollArea_ViewportEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QScrollArea_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QScrollArea_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_PaintEvent +func miqt_exec_callback_QScrollArea_PaintEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MousePressEvent +func miqt_exec_callback_QScrollArea_MousePressEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MouseReleaseEvent +func miqt_exec_callback_QScrollArea_MouseReleaseEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MouseDoubleClickEvent +func miqt_exec_callback_QScrollArea_MouseDoubleClickEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MouseMoveEvent +func miqt_exec_callback_QScrollArea_MouseMoveEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QScrollArea_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QScrollArea_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_WheelEvent +func miqt_exec_callback_QScrollArea_WheelEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QScrollArea_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QScrollArea_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ContextMenuEvent +func miqt_exec_callback_QScrollArea_ContextMenuEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QScrollArea_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QScrollArea_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DragEnterEvent +func miqt_exec_callback_QScrollArea_DragEnterEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DragMoveEvent(param1 *QDragMoveEvent) { + + C.QScrollArea_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDragMoveEvent(slot func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) { + C.QScrollArea_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DragMoveEvent +func miqt_exec_callback_QScrollArea_DragMoveEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DragLeaveEvent(param1 *QDragLeaveEvent) { + + C.QScrollArea_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDragLeaveEvent(slot func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) { + C.QScrollArea_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DragLeaveEvent +func miqt_exec_callback_QScrollArea_DragLeaveEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QScrollArea_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QScrollArea_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DropEvent +func miqt_exec_callback_QScrollArea_DropEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QScrollArea_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QScrollArea_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_KeyPressEvent +func miqt_exec_callback_QScrollArea_KeyPressEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QScrollArea) Delete() { - C.QScrollArea_Delete(this.h) + C.QScrollArea_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qscrollarea.h b/qt/gen_qscrollarea.h index eda80c0c..4219d260 100644 --- a/qt/gen_qscrollarea.h +++ b/qt/gen_qscrollarea.h @@ -15,19 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; class QScrollArea; class QSize; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; typedef struct QScrollArea QScrollArea; typedef struct QSize QSize; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QScrollArea* QScrollArea_new(QWidget* parent); -QScrollArea* QScrollArea_new2(); +void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QScrollArea_MetaObject(const QScrollArea* self); void* QScrollArea_Metacast(QScrollArea* self, const char* param1); struct miqt_string QScrollArea_Tr(const char* s); @@ -43,6 +73,11 @@ int QScrollArea_Alignment(const QScrollArea* self); void QScrollArea_SetAlignment(QScrollArea* self, int alignment); void QScrollArea_EnsureVisible(QScrollArea* self, int x, int y); void QScrollArea_EnsureWidgetVisible(QScrollArea* self, QWidget* childWidget); +bool QScrollArea_Event(QScrollArea* self, QEvent* param1); +bool QScrollArea_EventFilter(QScrollArea* self, QObject* param1, QEvent* param2); +void QScrollArea_ResizeEvent(QScrollArea* self, QResizeEvent* param1); +void QScrollArea_ScrollContentsBy(QScrollArea* self, int dx, int dy); +QSize* QScrollArea_ViewportSizeHint(const QScrollArea* self); struct miqt_string QScrollArea_Tr2(const char* s, const char* c); struct miqt_string QScrollArea_Tr3(const char* s, const char* c, int n); struct miqt_string QScrollArea_TrUtf82(const char* s, const char* c); @@ -51,7 +86,51 @@ void QScrollArea_EnsureVisible3(QScrollArea* self, int x, int y, int xmargin); void QScrollArea_EnsureVisible4(QScrollArea* self, int x, int y, int xmargin, int ymargin); void QScrollArea_EnsureWidgetVisible2(QScrollArea* self, QWidget* childWidget, int xmargin); void QScrollArea_EnsureWidgetVisible3(QScrollArea* self, QWidget* childWidget, int xmargin, int ymargin); -void QScrollArea_Delete(QScrollArea* self); +void QScrollArea_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QScrollArea_virtualbase_SizeHint(const void* self); +void QScrollArea_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QScrollArea_virtualbase_FocusNextPrevChild(void* self, bool next); +void QScrollArea_override_virtual_Event(void* self, intptr_t slot); +bool QScrollArea_virtualbase_Event(void* self, QEvent* param1); +void QScrollArea_override_virtual_EventFilter(void* self, intptr_t slot); +bool QScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QScrollArea_virtualbase_ViewportSizeHint(const void* self); +void QScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QScrollArea_virtualbase_MinimumSizeHint(const void* self); +void QScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot); +void QScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QScrollArea_override_virtual_DropEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QScrollArea_Delete(QScrollArea* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qscrollbar.cpp b/qt/gen_qscrollbar.cpp index 1d52403a..780c5b9d 100644 --- a/qt/gen_qscrollbar.cpp +++ b/qt/gen_qscrollbar.cpp @@ -1,29 +1,381 @@ +#include +#include #include +#include +#include #include +#include +#include +#include +#include #include #include #include #include #include +#include +#include #include #include #include "gen_qscrollbar.h" #include "_cgo_export.h" -QScrollBar* QScrollBar_new(QWidget* parent) { - return new QScrollBar(parent); +class MiqtVirtualQScrollBar : public virtual QScrollBar { +public: + + MiqtVirtualQScrollBar(QWidget* parent): QScrollBar(parent) {}; + MiqtVirtualQScrollBar(): QScrollBar() {}; + MiqtVirtualQScrollBar(Qt::Orientation param1): QScrollBar(param1) {}; + MiqtVirtualQScrollBar(Qt::Orientation param1, QWidget* parent): QScrollBar(param1, parent) {}; + + virtual ~MiqtVirtualQScrollBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QScrollBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QScrollBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QScrollBar::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QScrollBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QScrollBar::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QScrollBar::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QScrollBar::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QScrollBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QScrollBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QScrollBar::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QScrollBar::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QScrollBar::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QScrollBar::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QScrollBar::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QScrollBar::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QScrollBar::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QScrollBar::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QScrollBar::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QScrollBar_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QScrollBar::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QScrollBar::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QScrollBar::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QScrollBar::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QScrollBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QScrollBar::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QScrollBar::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QScrollBar::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QScrollBar::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QScrollBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QScrollBar::changeEvent(e); + + } + +}; + +void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(parent); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollBar* QScrollBar_new2() { - return new QScrollBar(); +void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollBar* QScrollBar_new3(int param1) { - return new QScrollBar(static_cast(param1)); +void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1)); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollBar* QScrollBar_new4(int param1, QWidget* parent) { - return new QScrollBar(static_cast(param1), parent); +void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1), parent); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QScrollBar_MetaObject(const QScrollBar* self) { @@ -108,7 +460,115 @@ struct miqt_string QScrollBar_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QScrollBar_Delete(QScrollBar* self) { - delete self; +void QScrollBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QScrollBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQScrollBar*)(self) )->virtualbase_SizeHint(); +} + +void QScrollBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__Event = slot; +} + +bool QScrollBar_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_Event(event); +} + +void QScrollBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__WheelEvent = slot; +} + +void QScrollBar_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_WheelEvent(param1); +} + +void QScrollBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__PaintEvent = slot; +} + +void QScrollBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QScrollBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__MousePressEvent = slot; +} + +void QScrollBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QScrollBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QScrollBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QScrollBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QScrollBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QScrollBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__HideEvent = slot; +} + +void QScrollBar_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_HideEvent(param1); +} + +void QScrollBar_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__SliderChange = slot; +} + +void QScrollBar_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_SliderChange(change); +} + +void QScrollBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QScrollBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QScrollBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QScrollBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QScrollBar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__TimerEvent = slot; +} + +void QScrollBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_TimerEvent(param1); +} + +void QScrollBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__ChangeEvent = slot; +} + +void QScrollBar_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_ChangeEvent(e); +} + +void QScrollBar_Delete(QScrollBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qscrollbar.go b/qt/gen_qscrollbar.go index adc6d1e1..2cf6880b 100644 --- a/qt/gen_qscrollbar.go +++ b/qt/gen_qscrollbar.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QScrollBar struct { - h *C.QScrollBar + h *C.QScrollBar + isSubclass bool *QAbstractSlider } @@ -32,39 +34,79 @@ func (this *QScrollBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollBar(h *C.QScrollBar) *QScrollBar { +// newQScrollBar constructs the type using only CGO pointers. +func newQScrollBar(h *C.QScrollBar, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollBar { if h == nil { return nil } - return &QScrollBar{h: h, QAbstractSlider: UnsafeNewQAbstractSlider(unsafe.Pointer(h))} + return &QScrollBar{h: h, + QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQScrollBar(h unsafe.Pointer) *QScrollBar { - return newQScrollBar((*C.QScrollBar)(h)) +// UnsafeNewQScrollBar constructs the type using only unsafe pointers. +func UnsafeNewQScrollBar(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollBar { + if h == nil { + return nil + } + + return &QScrollBar{h: (*C.QScrollBar)(h), + QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQScrollBar constructs a new QScrollBar object. func NewQScrollBar(parent *QWidget) *QScrollBar { - ret := C.QScrollBar_new(parent.cPointer()) - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new(parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollBar2 constructs a new QScrollBar object. func NewQScrollBar2() *QScrollBar { - ret := C.QScrollBar_new2() - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new2(&outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollBar3 constructs a new QScrollBar object. func NewQScrollBar3(param1 Orientation) *QScrollBar { - ret := C.QScrollBar_new3((C.int)(param1)) - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new3((C.int)(param1), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollBar4 constructs a new QScrollBar object. func NewQScrollBar4(param1 Orientation, parent *QWidget) *QScrollBar { - ret := C.QScrollBar_new4((C.int)(param1), parent.cPointer()) - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new4((C.int)(param1), parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QScrollBar) MetaObject() *QMetaObject { @@ -150,9 +192,312 @@ func QScrollBar_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QScrollBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QScrollBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_SizeHint +func miqt_exec_callback_QScrollBar_SizeHint(self *C.QScrollBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollBar) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QScrollBar_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QScrollBar) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QScrollBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_Event +func miqt_exec_callback_QScrollBar_Event(self *C.QScrollBar, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QScrollBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollBar) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QScrollBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QScrollBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_WheelEvent +func miqt_exec_callback_QScrollBar_WheelEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QScrollBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QScrollBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_PaintEvent +func miqt_exec_callback_QScrollBar_PaintEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QScrollBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_MousePressEvent +func miqt_exec_callback_QScrollBar_MousePressEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QScrollBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_MouseReleaseEvent +func miqt_exec_callback_QScrollBar_MouseReleaseEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QScrollBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_MouseMoveEvent +func miqt_exec_callback_QScrollBar_MouseMoveEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QScrollBar_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QScrollBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_HideEvent +func miqt_exec_callback_QScrollBar_HideEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QScrollBar_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QScrollBar) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QScrollBar_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_SliderChange +func miqt_exec_callback_QScrollBar_SliderChange(self *C.QScrollBar, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QScrollBar{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QScrollBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QScrollBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_ContextMenuEvent +func miqt_exec_callback_QScrollBar_ContextMenuEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QScrollBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QScrollBar) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QScrollBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_KeyPressEvent +func miqt_exec_callback_QScrollBar_KeyPressEvent(self *C.QScrollBar, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QScrollBar_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QScrollBar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_TimerEvent +func miqt_exec_callback_QScrollBar_TimerEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QScrollBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QScrollBar) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QScrollBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_ChangeEvent +func miqt_exec_callback_QScrollBar_ChangeEvent(self *C.QScrollBar, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QScrollBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QScrollBar) Delete() { - C.QScrollBar_Delete(this.h) + C.QScrollBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qscrollbar.h b/qt/gen_qscrollbar.h index c7b9eea2..80a9512d 100644 --- a/qt/gen_qscrollbar.h +++ b/qt/gen_qscrollbar.h @@ -15,34 +15,88 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSlider; +class QContextMenuEvent; class QEvent; +class QHideEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QScrollBar; class QSize; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSlider QAbstractSlider; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QEvent QEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QScrollBar QScrollBar; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QScrollBar* QScrollBar_new(QWidget* parent); -QScrollBar* QScrollBar_new2(); -QScrollBar* QScrollBar_new3(int param1); -QScrollBar* QScrollBar_new4(int param1, QWidget* parent); +void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QScrollBar_MetaObject(const QScrollBar* self); void* QScrollBar_Metacast(QScrollBar* self, const char* param1); struct miqt_string QScrollBar_Tr(const char* s); struct miqt_string QScrollBar_TrUtf8(const char* s); QSize* QScrollBar_SizeHint(const QScrollBar* self); bool QScrollBar_Event(QScrollBar* self, QEvent* event); +void QScrollBar_WheelEvent(QScrollBar* self, QWheelEvent* param1); +void QScrollBar_PaintEvent(QScrollBar* self, QPaintEvent* param1); +void QScrollBar_MousePressEvent(QScrollBar* self, QMouseEvent* param1); +void QScrollBar_MouseReleaseEvent(QScrollBar* self, QMouseEvent* param1); +void QScrollBar_MouseMoveEvent(QScrollBar* self, QMouseEvent* param1); +void QScrollBar_HideEvent(QScrollBar* self, QHideEvent* param1); +void QScrollBar_SliderChange(QScrollBar* self, int change); +void QScrollBar_ContextMenuEvent(QScrollBar* self, QContextMenuEvent* param1); struct miqt_string QScrollBar_Tr2(const char* s, const char* c); struct miqt_string QScrollBar_Tr3(const char* s, const char* c, int n); struct miqt_string QScrollBar_TrUtf82(const char* s, const char* c); struct miqt_string QScrollBar_TrUtf83(const char* s, const char* c, int n); -void QScrollBar_Delete(QScrollBar* self); +void QScrollBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QScrollBar_virtualbase_SizeHint(const void* self); +void QScrollBar_override_virtual_Event(void* self, intptr_t slot); +bool QScrollBar_virtualbase_Event(void* self, QEvent* event); +void QScrollBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QScrollBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QScrollBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QScrollBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QScrollBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QScrollBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QScrollBar_override_virtual_SliderChange(void* self, intptr_t slot); +void QScrollBar_virtualbase_SliderChange(void* self, int change); +void QScrollBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QScrollBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QScrollBar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QScrollBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_ChangeEvent(void* self, QEvent* e); +void QScrollBar_Delete(QScrollBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qscroller.go b/qt/gen_qscroller.go index 32b2da10..c7c1e13a 100644 --- a/qt/gen_qscroller.go +++ b/qt/gen_qscroller.go @@ -40,7 +40,8 @@ const ( ) type QScroller struct { - h *C.QScroller + h *C.QScroller + isSubclass bool *QObject } @@ -58,15 +59,23 @@ func (this *QScroller) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScroller(h *C.QScroller) *QScroller { +// newQScroller constructs the type using only CGO pointers. +func newQScroller(h *C.QScroller, h_QObject *C.QObject) *QScroller { if h == nil { return nil } - return &QScroller{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QScroller{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQScroller(h unsafe.Pointer) *QScroller { - return newQScroller((*C.QScroller)(h)) +// UnsafeNewQScroller constructs the type using only unsafe pointers. +func UnsafeNewQScroller(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScroller { + if h == nil { + return nil + } + + return &QScroller{h: (*C.QScroller)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QScroller) MetaObject() *QMetaObject { @@ -102,11 +111,11 @@ func QScroller_HasScroller(target *QObject) bool { } func QScroller_Scroller(target *QObject) *QScroller { - return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_Scroller(target.cPointer()))) + return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_Scroller(target.cPointer())), nil) } func QScroller_ScrollerWithTarget(target *QObject) *QScroller { - return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_ScrollerWithTarget(target.cPointer()))) + return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_ScrollerWithTarget(target.cPointer())), nil) } func QScroller_GrabGesture(target *QObject) GestureType { @@ -126,7 +135,7 @@ func QScroller_ActiveScrollers() []*QScroller { _ret := make([]*QScroller, int(_ma.len)) _outCast := (*[0xffff]*C.QScroller)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQScroller(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQScroller(unsafe.Pointer(_outCast[i]), nil) } return _ret } diff --git a/qt/gen_qscrollerproperties.cpp b/qt/gen_qscrollerproperties.cpp index 23abe2d4..47617dbf 100644 --- a/qt/gen_qscrollerproperties.cpp +++ b/qt/gen_qscrollerproperties.cpp @@ -4,12 +4,14 @@ #include "gen_qscrollerproperties.h" #include "_cgo_export.h" -QScrollerProperties* QScrollerProperties_new() { - return new QScrollerProperties(); +void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties) { + QScrollerProperties* ret = new QScrollerProperties(); + *outptr_QScrollerProperties = ret; } -QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp) { - return new QScrollerProperties(*sp); +void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties) { + QScrollerProperties* ret = new QScrollerProperties(*sp); + *outptr_QScrollerProperties = ret; } void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp) { @@ -40,7 +42,11 @@ void QScrollerProperties_SetScrollMetric(QScrollerProperties* self, int metric, self->setScrollMetric(static_cast(metric), *value); } -void QScrollerProperties_Delete(QScrollerProperties* self) { - delete self; +void QScrollerProperties_Delete(QScrollerProperties* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qscrollerproperties.go b/qt/gen_qscrollerproperties.go index 99187fb9..2dece64f 100644 --- a/qt/gen_qscrollerproperties.go +++ b/qt/gen_qscrollerproperties.go @@ -57,7 +57,8 @@ const ( ) type QScrollerProperties struct { - h *C.QScrollerProperties + h *C.QScrollerProperties + isSubclass bool } func (this *QScrollerProperties) cPointer() *C.QScrollerProperties { @@ -74,6 +75,7 @@ func (this *QScrollerProperties) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQScrollerProperties constructs the type using only CGO pointers. func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties { if h == nil { return nil @@ -81,20 +83,33 @@ func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties { return &QScrollerProperties{h: h} } +// UnsafeNewQScrollerProperties constructs the type using only unsafe pointers. func UnsafeNewQScrollerProperties(h unsafe.Pointer) *QScrollerProperties { - return newQScrollerProperties((*C.QScrollerProperties)(h)) + if h == nil { + return nil + } + + return &QScrollerProperties{h: (*C.QScrollerProperties)(h)} } // NewQScrollerProperties constructs a new QScrollerProperties object. func NewQScrollerProperties() *QScrollerProperties { - ret := C.QScrollerProperties_new() - return newQScrollerProperties(ret) + var outptr_QScrollerProperties *C.QScrollerProperties = nil + + C.QScrollerProperties_new(&outptr_QScrollerProperties) + ret := newQScrollerProperties(outptr_QScrollerProperties) + ret.isSubclass = true + return ret } // NewQScrollerProperties2 constructs a new QScrollerProperties object. func NewQScrollerProperties2(sp *QScrollerProperties) *QScrollerProperties { - ret := C.QScrollerProperties_new2(sp.cPointer()) - return newQScrollerProperties(ret) + var outptr_QScrollerProperties *C.QScrollerProperties = nil + + C.QScrollerProperties_new2(sp.cPointer(), &outptr_QScrollerProperties) + ret := newQScrollerProperties(outptr_QScrollerProperties) + ret.isSubclass = true + return ret } func (this *QScrollerProperties) OperatorAssign(sp *QScrollerProperties) { @@ -130,7 +145,7 @@ func (this *QScrollerProperties) SetScrollMetric(metric QScrollerProperties__Scr // Delete this object from C++ memory. func (this *QScrollerProperties) Delete() { - C.QScrollerProperties_Delete(this.h) + C.QScrollerProperties_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qscrollerproperties.h b/qt/gen_qscrollerproperties.h index 36bd6275..5f9114c0 100644 --- a/qt/gen_qscrollerproperties.h +++ b/qt/gen_qscrollerproperties.h @@ -22,8 +22,8 @@ typedef struct QScrollerProperties QScrollerProperties; typedef struct QVariant QVariant; #endif -QScrollerProperties* QScrollerProperties_new(); -QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp); +void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties); +void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties); void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorEqual(const QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorNotEqual(const QScrollerProperties* self, QScrollerProperties* sp); @@ -31,7 +31,7 @@ void QScrollerProperties_SetDefaultScrollerProperties(QScrollerProperties* sp); void QScrollerProperties_UnsetDefaultScrollerProperties(); QVariant* QScrollerProperties_ScrollMetric(const QScrollerProperties* self, int metric); void QScrollerProperties_SetScrollMetric(QScrollerProperties* self, int metric, QVariant* value); -void QScrollerProperties_Delete(QScrollerProperties* self); +void QScrollerProperties_Delete(QScrollerProperties* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsemaphore.cpp b/qt/gen_qsemaphore.cpp index a0b67265..5def7910 100644 --- a/qt/gen_qsemaphore.cpp +++ b/qt/gen_qsemaphore.cpp @@ -4,12 +4,14 @@ #include "gen_qsemaphore.h" #include "_cgo_export.h" -QSemaphore* QSemaphore_new() { - return new QSemaphore(); +void QSemaphore_new(QSemaphore** outptr_QSemaphore) { + QSemaphore* ret = new QSemaphore(); + *outptr_QSemaphore = ret; } -QSemaphore* QSemaphore_new2(int n) { - return new QSemaphore(static_cast(n)); +void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore) { + QSemaphore* ret = new QSemaphore(static_cast(n)); + *outptr_QSemaphore = ret; } void QSemaphore_Acquire(QSemaphore* self) { @@ -44,28 +46,37 @@ void QSemaphore_Release1(QSemaphore* self, int n) { self->release(static_cast(n)); } -void QSemaphore_Delete(QSemaphore* self) { - delete self; +void QSemaphore_Delete(QSemaphore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSemaphoreReleaser* QSemaphoreReleaser_new() { - return new QSemaphoreReleaser(); +void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem) { - return new QSemaphoreReleaser(*sem); +void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem) { - return new QSemaphoreReleaser(sem); +void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n) { - return new QSemaphoreReleaser(*sem, static_cast(n)); +void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem, static_cast(n)); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n) { - return new QSemaphoreReleaser(sem, static_cast(n)); +void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem, static_cast(n)); + *outptr_QSemaphoreReleaser = ret; } void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other) { @@ -80,7 +91,11 @@ QSemaphore* QSemaphoreReleaser_Cancel(QSemaphoreReleaser* self) { return self->cancel(); } -void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self) { - delete self; +void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsemaphore.go b/qt/gen_qsemaphore.go index 6afe3a62..5c70cfd8 100644 --- a/qt/gen_qsemaphore.go +++ b/qt/gen_qsemaphore.go @@ -14,7 +14,8 @@ import ( ) type QSemaphore struct { - h *C.QSemaphore + h *C.QSemaphore + isSubclass bool } func (this *QSemaphore) cPointer() *C.QSemaphore { @@ -31,6 +32,7 @@ func (this *QSemaphore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSemaphore constructs the type using only CGO pointers. func newQSemaphore(h *C.QSemaphore) *QSemaphore { if h == nil { return nil @@ -38,20 +40,33 @@ func newQSemaphore(h *C.QSemaphore) *QSemaphore { return &QSemaphore{h: h} } +// UnsafeNewQSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSemaphore(h unsafe.Pointer) *QSemaphore { - return newQSemaphore((*C.QSemaphore)(h)) + if h == nil { + return nil + } + + return &QSemaphore{h: (*C.QSemaphore)(h)} } // NewQSemaphore constructs a new QSemaphore object. func NewQSemaphore() *QSemaphore { - ret := C.QSemaphore_new() - return newQSemaphore(ret) + var outptr_QSemaphore *C.QSemaphore = nil + + C.QSemaphore_new(&outptr_QSemaphore) + ret := newQSemaphore(outptr_QSemaphore) + ret.isSubclass = true + return ret } // NewQSemaphore2 constructs a new QSemaphore object. func NewQSemaphore2(n int) *QSemaphore { - ret := C.QSemaphore_new2((C.int)(n)) - return newQSemaphore(ret) + var outptr_QSemaphore *C.QSemaphore = nil + + C.QSemaphore_new2((C.int)(n), &outptr_QSemaphore) + ret := newQSemaphore(outptr_QSemaphore) + ret.isSubclass = true + return ret } func (this *QSemaphore) Acquire() { @@ -88,7 +103,7 @@ func (this *QSemaphore) Release1(n int) { // Delete this object from C++ memory. func (this *QSemaphore) Delete() { - C.QSemaphore_Delete(this.h) + C.QSemaphore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -101,7 +116,8 @@ func (this *QSemaphore) GoGC() { } type QSemaphoreReleaser struct { - h *C.QSemaphoreReleaser + h *C.QSemaphoreReleaser + isSubclass bool } func (this *QSemaphoreReleaser) cPointer() *C.QSemaphoreReleaser { @@ -118,6 +134,7 @@ func (this *QSemaphoreReleaser) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSemaphoreReleaser constructs the type using only CGO pointers. func newQSemaphoreReleaser(h *C.QSemaphoreReleaser) *QSemaphoreReleaser { if h == nil { return nil @@ -125,38 +142,63 @@ func newQSemaphoreReleaser(h *C.QSemaphoreReleaser) *QSemaphoreReleaser { return &QSemaphoreReleaser{h: h} } +// UnsafeNewQSemaphoreReleaser constructs the type using only unsafe pointers. func UnsafeNewQSemaphoreReleaser(h unsafe.Pointer) *QSemaphoreReleaser { - return newQSemaphoreReleaser((*C.QSemaphoreReleaser)(h)) + if h == nil { + return nil + } + + return &QSemaphoreReleaser{h: (*C.QSemaphoreReleaser)(h)} } // NewQSemaphoreReleaser constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser() *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new() - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new(&outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser2 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser2(sem *QSemaphore) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new2(sem.cPointer()) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new2(sem.cPointer(), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser3 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser3(sem *QSemaphore) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new3(sem.cPointer()) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new3(sem.cPointer(), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser4 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser4(sem *QSemaphore, n int) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n)) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser5 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser5(sem *QSemaphore, n int) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n)) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } func (this *QSemaphoreReleaser) Swap(other *QSemaphoreReleaser) { @@ -173,7 +215,7 @@ func (this *QSemaphoreReleaser) Cancel() *QSemaphore { // Delete this object from C++ memory. func (this *QSemaphoreReleaser) Delete() { - C.QSemaphoreReleaser_Delete(this.h) + C.QSemaphoreReleaser_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsemaphore.h b/qt/gen_qsemaphore.h index d92862ad..4d37412d 100644 --- a/qt/gen_qsemaphore.h +++ b/qt/gen_qsemaphore.h @@ -22,8 +22,8 @@ typedef struct QSemaphore QSemaphore; typedef struct QSemaphoreReleaser QSemaphoreReleaser; #endif -QSemaphore* QSemaphore_new(); -QSemaphore* QSemaphore_new2(int n); +void QSemaphore_new(QSemaphore** outptr_QSemaphore); +void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore); void QSemaphore_Acquire(QSemaphore* self); bool QSemaphore_TryAcquire(QSemaphore* self); bool QSemaphore_TryAcquire2(QSemaphore* self, int n, int timeout); @@ -32,17 +32,17 @@ int QSemaphore_Available(const QSemaphore* self); void QSemaphore_Acquire1(QSemaphore* self, int n); bool QSemaphore_TryAcquire1(QSemaphore* self, int n); void QSemaphore_Release1(QSemaphore* self, int n); -void QSemaphore_Delete(QSemaphore* self); +void QSemaphore_Delete(QSemaphore* self, bool isSubclass); -QSemaphoreReleaser* QSemaphoreReleaser_new(); -QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem); -QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem); -QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n); -QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n); +void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other); QSemaphore* QSemaphoreReleaser_Semaphore(const QSemaphoreReleaser* self); QSemaphore* QSemaphoreReleaser_Cancel(QSemaphoreReleaser* self); -void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self); +void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsequentialanimationgroup.cpp b/qt/gen_qsequentialanimationgroup.cpp index a8c4df61..15e51b8e 100644 --- a/qt/gen_qsequentialanimationgroup.cpp +++ b/qt/gen_qsequentialanimationgroup.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -10,12 +12,151 @@ #include "gen_qsequentialanimationgroup.h" #include "_cgo_export.h" -QSequentialAnimationGroup* QSequentialAnimationGroup_new() { - return new QSequentialAnimationGroup(); +class MiqtVirtualQSequentialAnimationGroup : public virtual QSequentialAnimationGroup { +public: + + MiqtVirtualQSequentialAnimationGroup(): QSequentialAnimationGroup() {}; + MiqtVirtualQSequentialAnimationGroup(QObject* parent): QSequentialAnimationGroup(parent) {}; + + virtual ~MiqtVirtualQSequentialAnimationGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QSequentialAnimationGroup::duration(); + } + + + int callback_return_value = miqt_exec_callback_QSequentialAnimationGroup_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QSequentialAnimationGroup::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSequentialAnimationGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSequentialAnimationGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSequentialAnimationGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QSequentialAnimationGroup::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QSequentialAnimationGroup_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QSequentialAnimationGroup::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QSequentialAnimationGroup::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QSequentialAnimationGroup_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QSequentialAnimationGroup::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QSequentialAnimationGroup::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QSequentialAnimationGroup_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QSequentialAnimationGroup::updateDirection(static_cast(direction)); + + } + +}; + +void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(); + *outptr_QSequentialAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent) { - return new QSequentialAnimationGroup(parent); +void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(parent); + *outptr_QSequentialAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self) { @@ -69,7 +210,7 @@ void QSequentialAnimationGroup_CurrentAnimationChanged(QSequentialAnimationGroup } void QSequentialAnimationGroup_connect_CurrentAnimationChanged(QSequentialAnimationGroup* self, intptr_t slot) { - QSequentialAnimationGroup::connect(self, static_cast(&QSequentialAnimationGroup::currentAnimationChanged), self, [=](QAbstractAnimation* current) { + MiqtVirtualQSequentialAnimationGroup::connect(self, static_cast(&QSequentialAnimationGroup::currentAnimationChanged), self, [=](QAbstractAnimation* current) { QAbstractAnimation* sigval1 = current; miqt_exec_callback_QSequentialAnimationGroup_CurrentAnimationChanged(slot, sigval1); }); @@ -119,7 +260,51 @@ struct miqt_string QSequentialAnimationGroup_TrUtf83(const char* s, const char* return _ms; } -void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self) { - delete self; +void QSequentialAnimationGroup_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__Duration = slot; +} + +int QSequentialAnimationGroup_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_Duration(); +} + +void QSequentialAnimationGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__Event = slot; +} + +bool QSequentialAnimationGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_Event(event); +} + +void QSequentialAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QSequentialAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QSequentialAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__UpdateState = slot; +} + +void QSequentialAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QSequentialAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__UpdateDirection = slot; +} + +void QSequentialAnimationGroup_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsequentialanimationgroup.go b/qt/gen_qsequentialanimationgroup.go index 81f9a64e..c3de439f 100644 --- a/qt/gen_qsequentialanimationgroup.go +++ b/qt/gen_qsequentialanimationgroup.go @@ -15,7 +15,8 @@ import ( ) type QSequentialAnimationGroup struct { - h *C.QSequentialAnimationGroup + h *C.QSequentialAnimationGroup + isSubclass bool *QAnimationGroup } @@ -33,27 +34,49 @@ func (this *QSequentialAnimationGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup) *QSequentialAnimationGroup { +// newQSequentialAnimationGroup constructs the type using only CGO pointers. +func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QSequentialAnimationGroup { if h == nil { return nil } - return &QSequentialAnimationGroup{h: h, QAnimationGroup: UnsafeNewQAnimationGroup(unsafe.Pointer(h))} + return &QSequentialAnimationGroup{h: h, + QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer) *QSequentialAnimationGroup { - return newQSequentialAnimationGroup((*C.QSequentialAnimationGroup)(h)) +// UnsafeNewQSequentialAnimationGroup constructs the type using only unsafe pointers. +func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QSequentialAnimationGroup { + if h == nil { + return nil + } + + return &QSequentialAnimationGroup{h: (*C.QSequentialAnimationGroup)(h), + QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } // NewQSequentialAnimationGroup constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup() *QSequentialAnimationGroup { - ret := C.QSequentialAnimationGroup_new() - return newQSequentialAnimationGroup(ret) + var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QSequentialAnimationGroup_new(&outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSequentialAnimationGroup2 constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup2(parent *QObject) *QSequentialAnimationGroup { - ret := C.QSequentialAnimationGroup_new2(parent.cPointer()) - return newQSequentialAnimationGroup(ret) + var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QSequentialAnimationGroup_new2(parent.cPointer(), &outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSequentialAnimationGroup) MetaObject() *QMetaObject { @@ -85,15 +108,15 @@ func QSequentialAnimationGroup_TrUtf8(s string) string { } func (this *QSequentialAnimationGroup) AddPause(msecs int) *QPauseAnimation { - return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs)))) + return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs))), nil, nil) } func (this *QSequentialAnimationGroup) InsertPause(index int, msecs int) *QPauseAnimation { - return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs)))) + return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs))), nil, nil) } func (this *QSequentialAnimationGroup) CurrentAnimation() *QAbstractAnimation { - return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_CurrentAnimation(this.h))) + return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_CurrentAnimation(this.h)), nil) } func (this *QSequentialAnimationGroup) Duration() int { @@ -115,7 +138,7 @@ func miqt_exec_callback_QSequentialAnimationGroup_CurrentAnimationChanged(cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractAnimation(unsafe.Pointer(current)) + slotval1 := UnsafeNewQAbstractAnimation(unsafe.Pointer(current), nil) gofunc(slotval1) } @@ -164,9 +187,127 @@ func QSequentialAnimationGroup_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSequentialAnimationGroup) callVirtualBase_Duration() int { + + return (int)(C.QSequentialAnimationGroup_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QSequentialAnimationGroup) OnDuration(slot func(super func() int) int) { + C.QSequentialAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_Duration +func miqt_exec_callback_QSequentialAnimationGroup_Duration(self *C.QSequentialAnimationGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSequentialAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSequentialAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSequentialAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_Event +func miqt_exec_callback_QSequentialAnimationGroup_Event(self *C.QSequentialAnimationGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QSequentialAnimationGroup_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QSequentialAnimationGroup) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QSequentialAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_UpdateCurrentTime +func miqt_exec_callback_QSequentialAnimationGroup_UpdateCurrentTime(self *C.QSequentialAnimationGroup, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QSequentialAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QSequentialAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QSequentialAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_UpdateState +func miqt_exec_callback_QSequentialAnimationGroup_UpdateState(self *C.QSequentialAnimationGroup, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QSequentialAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QSequentialAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QSequentialAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_UpdateDirection +func miqt_exec_callback_QSequentialAnimationGroup_UpdateDirection(self *C.QSequentialAnimationGroup, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QSequentialAnimationGroup) Delete() { - C.QSequentialAnimationGroup_Delete(this.h) + C.QSequentialAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsequentialanimationgroup.h b/qt/gen_qsequentialanimationgroup.h index 7296a9d2..8fe077ca 100644 --- a/qt/gen_qsequentialanimationgroup.h +++ b/qt/gen_qsequentialanimationgroup.h @@ -16,20 +16,24 @@ extern "C" { #ifdef __cplusplus class QAbstractAnimation; +class QAnimationGroup; +class QEvent; class QMetaObject; class QObject; class QPauseAnimation; class QSequentialAnimationGroup; #else typedef struct QAbstractAnimation QAbstractAnimation; +typedef struct QAnimationGroup QAnimationGroup; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPauseAnimation QPauseAnimation; typedef struct QSequentialAnimationGroup QSequentialAnimationGroup; #endif -QSequentialAnimationGroup* QSequentialAnimationGroup_new(); -QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent); +void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self); void* QSequentialAnimationGroup_Metacast(QSequentialAnimationGroup* self, const char* param1); struct miqt_string QSequentialAnimationGroup_Tr(const char* s); @@ -40,11 +44,25 @@ QAbstractAnimation* QSequentialAnimationGroup_CurrentAnimation(const QSequential int QSequentialAnimationGroup_Duration(const QSequentialAnimationGroup* self); void QSequentialAnimationGroup_CurrentAnimationChanged(QSequentialAnimationGroup* self, QAbstractAnimation* current); void QSequentialAnimationGroup_connect_CurrentAnimationChanged(QSequentialAnimationGroup* self, intptr_t slot); +bool QSequentialAnimationGroup_Event(QSequentialAnimationGroup* self, QEvent* event); +void QSequentialAnimationGroup_UpdateCurrentTime(QSequentialAnimationGroup* self, int param1); +void QSequentialAnimationGroup_UpdateState(QSequentialAnimationGroup* self, int newState, int oldState); +void QSequentialAnimationGroup_UpdateDirection(QSequentialAnimationGroup* self, int direction); struct miqt_string QSequentialAnimationGroup_Tr2(const char* s, const char* c); struct miqt_string QSequentialAnimationGroup_Tr3(const char* s, const char* c, int n); struct miqt_string QSequentialAnimationGroup_TrUtf82(const char* s, const char* c); struct miqt_string QSequentialAnimationGroup_TrUtf83(const char* s, const char* c, int n); -void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self); +void QSequentialAnimationGroup_override_virtual_Duration(void* self, intptr_t slot); +int QSequentialAnimationGroup_virtualbase_Duration(const void* self); +void QSequentialAnimationGroup_override_virtual_Event(void* self, intptr_t slot); +bool QSequentialAnimationGroup_virtualbase_Event(void* self, QEvent* event); +void QSequentialAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QSequentialAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int param1); +void QSequentialAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot); +void QSequentialAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState); +void QSequentialAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QSequentialAnimationGroup_virtualbase_UpdateDirection(void* self, int direction); +void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsessionmanager.cpp b/qt/gen_qsessionmanager.cpp index 95e79c97..f56d84e3 100644 --- a/qt/gen_qsessionmanager.cpp +++ b/qt/gen_qsessionmanager.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt/gen_qsessionmanager.go b/qt/gen_qsessionmanager.go index e40eb4bf..5e2e6bab 100644 --- a/qt/gen_qsessionmanager.go +++ b/qt/gen_qsessionmanager.go @@ -22,7 +22,8 @@ const ( ) type QSessionManager struct { - h *C.QSessionManager + h *C.QSessionManager + isSubclass bool *QObject } @@ -40,15 +41,23 @@ func (this *QSessionManager) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSessionManager(h *C.QSessionManager) *QSessionManager { +// newQSessionManager constructs the type using only CGO pointers. +func newQSessionManager(h *C.QSessionManager, h_QObject *C.QObject) *QSessionManager { if h == nil { return nil } - return &QSessionManager{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSessionManager{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSessionManager(h unsafe.Pointer) *QSessionManager { - return newQSessionManager((*C.QSessionManager)(h)) +// UnsafeNewQSessionManager constructs the type using only unsafe pointers. +func UnsafeNewQSessionManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSessionManager { + if h == nil { + return nil + } + + return &QSessionManager{h: (*C.QSessionManager)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QSessionManager) MetaObject() *QMetaObject { diff --git a/qt/gen_qsessionmanager.h b/qt/gen_qsessionmanager.h index 468391dc..4e600bf3 100644 --- a/qt/gen_qsessionmanager.h +++ b/qt/gen_qsessionmanager.h @@ -16,9 +16,11 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QSessionManager; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSessionManager QSessionManager; #endif diff --git a/qt/gen_qsettings.cpp b/qt/gen_qsettings.cpp index e4044235..022e9c17 100644 --- a/qt/gen_qsettings.cpp +++ b/qt/gen_qsettings.cpp @@ -1,4 +1,7 @@ +#include +#include #include +#include #include #include #include @@ -6,86 +9,311 @@ #include #include #include +#include #include #include #include "gen_qsettings.h" #include "_cgo_export.h" -QSettings* QSettings_new(struct miqt_string organization) { +class MiqtVirtualQSettings : public virtual QSettings { +public: + + MiqtVirtualQSettings(const QString& organization): QSettings(organization) {}; + MiqtVirtualQSettings(QSettings::Scope scope, const QString& organization): QSettings(scope, organization) {}; + MiqtVirtualQSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization): QSettings(format, scope, organization) {}; + MiqtVirtualQSettings(const QString& fileName, QSettings::Format format): QSettings(fileName, format) {}; + MiqtVirtualQSettings(): QSettings() {}; + MiqtVirtualQSettings(QSettings::Scope scope): QSettings(scope) {}; + MiqtVirtualQSettings(const QString& organization, const QString& application): QSettings(organization, application) {}; + MiqtVirtualQSettings(const QString& organization, const QString& application, QObject* parent): QSettings(organization, application, parent) {}; + MiqtVirtualQSettings(QSettings::Scope scope, const QString& organization, const QString& application): QSettings(scope, organization, application) {}; + MiqtVirtualQSettings(QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent): QSettings(scope, organization, application, parent) {}; + MiqtVirtualQSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application): QSettings(format, scope, organization, application) {}; + MiqtVirtualQSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent): QSettings(format, scope, organization, application, parent) {}; + MiqtVirtualQSettings(const QString& fileName, QSettings::Format format, QObject* parent): QSettings(fileName, format, parent) {}; + MiqtVirtualQSettings(QObject* parent): QSettings(parent) {}; + MiqtVirtualQSettings(QSettings::Scope scope, QObject* parent): QSettings(scope, parent) {}; + + virtual ~MiqtVirtualQSettings() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSettings::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSettings_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSettings::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSettings::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSettings_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSettings::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSettings::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSettings_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSettings::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSettings::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSettings_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSettings::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSettings::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSettings_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSettings::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSettings::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSettings_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSettings::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSettings::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSettings_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSettings::disconnectNotify(*signal); + + } + +}; + +void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - return new QSettings(organization_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new2(int scope, struct miqt_string organization) { +void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - return new QSettings(static_cast(scope), organization_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new3(int format, int scope, struct miqt_string organization) { +void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - return new QSettings(static_cast(format), static_cast(scope), organization_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new4(struct miqt_string fileName, int format) { +void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QSettings(fileName_QString, static_cast(format)); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format)); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new5() { - return new QSettings(); +void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new6(int scope) { - return new QSettings(static_cast(scope)); +void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope)); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application) { +void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(organization_QString, application_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent) { +void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(organization_QString, application_QString, parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString, parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application) { +void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(scope), organization_QString, application_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { +void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(scope), organization_QString, application_QString, parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString, parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application) { +void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { +void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent) { +void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QSettings(fileName_QString, static_cast(format), parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format), parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new14(QObject* parent) { - return new QSettings(parent); +void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new15(int scope, QObject* parent) { - return new QSettings(static_cast(scope), parent); +void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSettings_MetaObject(const QSettings* self) { @@ -402,7 +630,67 @@ QVariant* QSettings_Value2(const QSettings* self, struct miqt_string key, QVaria return new QVariant(self->value(key_QString, *defaultValue)); } -void QSettings_Delete(QSettings* self) { - delete self; +void QSettings_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__Event = slot; +} + +bool QSettings_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSettings*)(self) )->virtualbase_Event(event); +} + +void QSettings_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__EventFilter = slot; +} + +bool QSettings_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSettings*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSettings_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__TimerEvent = slot; +} + +void QSettings_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_TimerEvent(event); +} + +void QSettings_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__ChildEvent = slot; +} + +void QSettings_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_ChildEvent(event); +} + +void QSettings_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__CustomEvent = slot; +} + +void QSettings_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_CustomEvent(event); +} + +void QSettings_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__ConnectNotify = slot; +} + +void QSettings_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSettings_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__DisconnectNotify = slot; +} + +void QSettings_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSettings_Delete(QSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsettings.go b/qt/gen_qsettings.go index 240f5cca..c9442a06 100644 --- a/qt/gen_qsettings.go +++ b/qt/gen_qsettings.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -53,7 +54,8 @@ const ( ) type QSettings struct { - h *C.QSettings + h *C.QSettings + isSubclass bool *QObject } @@ -71,15 +73,23 @@ func (this *QSettings) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSettings(h *C.QSettings) *QSettings { +// newQSettings constructs the type using only CGO pointers. +func newQSettings(h *C.QSettings, h_QObject *C.QObject) *QSettings { if h == nil { return nil } - return &QSettings{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSettings{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSettings(h unsafe.Pointer) *QSettings { - return newQSettings((*C.QSettings)(h)) +// UnsafeNewQSettings constructs the type using only unsafe pointers. +func UnsafeNewQSettings(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSettings { + if h == nil { + return nil + } + + return &QSettings{h: (*C.QSettings)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSettings constructs a new QSettings object. @@ -88,8 +98,13 @@ func NewQSettings(organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - ret := C.QSettings_new(organization_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new(organization_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings2 constructs a new QSettings object. @@ -98,8 +113,13 @@ func NewQSettings2(scope QSettings__Scope, organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - ret := C.QSettings_new2((C.int)(scope), organization_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new2((C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings3 constructs a new QSettings object. @@ -108,8 +128,13 @@ func NewQSettings3(format QSettings__Format, scope QSettings__Scope, organizatio organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - ret := C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings4 constructs a new QSettings object. @@ -118,20 +143,35 @@ func NewQSettings4(fileName string, format QSettings__Format) *QSettings { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QSettings_new4(fileName_ms, (C.int)(format)) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new4(fileName_ms, (C.int)(format), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings5 constructs a new QSettings object. func NewQSettings5() *QSettings { - ret := C.QSettings_new5() - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new5(&outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings6 constructs a new QSettings object. func NewQSettings6(scope QSettings__Scope) *QSettings { - ret := C.QSettings_new6((C.int)(scope)) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new6((C.int)(scope), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings7 constructs a new QSettings object. @@ -144,8 +184,13 @@ func NewQSettings7(organization string, application string) *QSettings { application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new7(organization_ms, application_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new7(organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings8 constructs a new QSettings object. @@ -158,8 +203,13 @@ func NewQSettings8(organization string, application string, parent *QObject) *QS application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new8(organization_ms, application_ms, parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new8(organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings9 constructs a new QSettings object. @@ -172,8 +222,13 @@ func NewQSettings9(scope QSettings__Scope, organization string, application stri application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new9((C.int)(scope), organization_ms, application_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new9((C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings10 constructs a new QSettings object. @@ -186,8 +241,13 @@ func NewQSettings10(scope QSettings__Scope, organization string, application str application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings11 constructs a new QSettings object. @@ -200,8 +260,13 @@ func NewQSettings11(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings12 constructs a new QSettings object. @@ -214,8 +279,13 @@ func NewQSettings12(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings13 constructs a new QSettings object. @@ -224,20 +294,35 @@ func NewQSettings13(fileName string, format QSettings__Format, parent *QObject) fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings14 constructs a new QSettings object. func NewQSettings14(parent *QObject) *QSettings { - ret := C.QSettings_new14(parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new14(parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings15 constructs a new QSettings object. func NewQSettings15(scope QSettings__Scope, parent *QObject) *QSettings { - ret := C.QSettings_new15((C.int)(scope), parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new15((C.int)(scope), parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSettings) MetaObject() *QMetaObject { @@ -555,9 +640,175 @@ func (this *QSettings) Value2(key string, defaultValue *QVariant) *QVariant { return _goptr } +func (this *QSettings) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSettings_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSettings) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSettings_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_Event +func miqt_exec_callback_QSettings_Event(self *C.QSettings, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSettings{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSettings) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSettings_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSettings) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSettings_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_EventFilter +func miqt_exec_callback_QSettings_EventFilter(self *C.QSettings, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSettings{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSettings) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSettings_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSettings) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSettings_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_TimerEvent +func miqt_exec_callback_QSettings_TimerEvent(self *C.QSettings, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSettings{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSettings) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSettings_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSettings) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSettings_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_ChildEvent +func miqt_exec_callback_QSettings_ChildEvent(self *C.QSettings, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSettings{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSettings) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSettings_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSettings) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSettings_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_CustomEvent +func miqt_exec_callback_QSettings_CustomEvent(self *C.QSettings, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSettings{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSettings) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSettings_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSettings) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSettings_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_ConnectNotify +func miqt_exec_callback_QSettings_ConnectNotify(self *C.QSettings, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSettings{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSettings) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSettings_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSettings) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSettings_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_DisconnectNotify +func miqt_exec_callback_QSettings_DisconnectNotify(self *C.QSettings, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSettings{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSettings) Delete() { - C.QSettings_Delete(this.h) + C.QSettings_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsettings.h b/qt/gen_qsettings.h index b11b74e8..c7d6d5c1 100644 --- a/qt/gen_qsettings.h +++ b/qt/gen_qsettings.h @@ -15,34 +15,42 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSettings; class QTextCodec; +class QTimerEvent; class QVariant; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSettings QSettings; typedef struct QTextCodec QTextCodec; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QSettings* QSettings_new(struct miqt_string organization); -QSettings* QSettings_new2(int scope, struct miqt_string organization); -QSettings* QSettings_new3(int format, int scope, struct miqt_string organization); -QSettings* QSettings_new4(struct miqt_string fileName, int format); -QSettings* QSettings_new5(); -QSettings* QSettings_new6(int scope); -QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application); -QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent); -QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application); -QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); -QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application); -QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); -QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent); -QSettings* QSettings_new14(QObject* parent); -QSettings* QSettings_new15(int scope, QObject* parent); +void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); QMetaObject* QSettings_MetaObject(const QSettings* self); void* QSettings_Metacast(QSettings* self, const char* param1); struct miqt_string QSettings_Tr(const char* s); @@ -82,13 +90,28 @@ int QSettings_DefaultFormat(); void QSettings_SetSystemIniPath(struct miqt_string dir); void QSettings_SetUserIniPath(struct miqt_string dir); void QSettings_SetPath(int format, int scope, struct miqt_string path); +bool QSettings_Event(QSettings* self, QEvent* event); struct miqt_string QSettings_Tr2(const char* s, const char* c); struct miqt_string QSettings_Tr3(const char* s, const char* c, int n); struct miqt_string QSettings_TrUtf82(const char* s, const char* c); struct miqt_string QSettings_TrUtf83(const char* s, const char* c, int n); void QSettings_BeginWriteArray2(QSettings* self, struct miqt_string prefix, int size); QVariant* QSettings_Value2(const QSettings* self, struct miqt_string key, QVariant* defaultValue); -void QSettings_Delete(QSettings* self); +void QSettings_override_virtual_Event(void* self, intptr_t slot); +bool QSettings_virtualbase_Event(void* self, QEvent* event); +void QSettings_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSettings_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSettings_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSettings_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSettings_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSettings_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSettings_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSettings_virtualbase_CustomEvent(void* self, QEvent* event); +void QSettings_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSettings_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSettings_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSettings_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSettings_Delete(QSettings* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qshareddata.cpp b/qt/gen_qshareddata.cpp index c85e3f8c..5410375c 100644 --- a/qt/gen_qshareddata.cpp +++ b/qt/gen_qshareddata.cpp @@ -3,15 +3,21 @@ #include "gen_qshareddata.h" #include "_cgo_export.h" -QSharedData* QSharedData_new() { - return new QSharedData(); +void QSharedData_new(QSharedData** outptr_QSharedData) { + QSharedData* ret = new QSharedData(); + *outptr_QSharedData = ret; } -QSharedData* QSharedData_new2(QSharedData* param1) { - return new QSharedData(*param1); +void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData) { + QSharedData* ret = new QSharedData(*param1); + *outptr_QSharedData = ret; } -void QSharedData_Delete(QSharedData* self) { - delete self; +void QSharedData_Delete(QSharedData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qshareddata.go b/qt/gen_qshareddata.go index 05724641..d324f332 100644 --- a/qt/gen_qshareddata.go +++ b/qt/gen_qshareddata.go @@ -14,7 +14,8 @@ import ( ) type QSharedData struct { - h *C.QSharedData + h *C.QSharedData + isSubclass bool } func (this *QSharedData) cPointer() *C.QSharedData { @@ -31,6 +32,7 @@ func (this *QSharedData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSharedData constructs the type using only CGO pointers. func newQSharedData(h *C.QSharedData) *QSharedData { if h == nil { return nil @@ -38,25 +40,38 @@ func newQSharedData(h *C.QSharedData) *QSharedData { return &QSharedData{h: h} } +// UnsafeNewQSharedData constructs the type using only unsafe pointers. func UnsafeNewQSharedData(h unsafe.Pointer) *QSharedData { - return newQSharedData((*C.QSharedData)(h)) + if h == nil { + return nil + } + + return &QSharedData{h: (*C.QSharedData)(h)} } // NewQSharedData constructs a new QSharedData object. func NewQSharedData() *QSharedData { - ret := C.QSharedData_new() - return newQSharedData(ret) + var outptr_QSharedData *C.QSharedData = nil + + C.QSharedData_new(&outptr_QSharedData) + ret := newQSharedData(outptr_QSharedData) + ret.isSubclass = true + return ret } // NewQSharedData2 constructs a new QSharedData object. func NewQSharedData2(param1 *QSharedData) *QSharedData { - ret := C.QSharedData_new2(param1.cPointer()) - return newQSharedData(ret) + var outptr_QSharedData *C.QSharedData = nil + + C.QSharedData_new2(param1.cPointer(), &outptr_QSharedData) + ret := newQSharedData(outptr_QSharedData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QSharedData) Delete() { - C.QSharedData_Delete(this.h) + C.QSharedData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qshareddata.h b/qt/gen_qshareddata.h index d6cd260d..21641baf 100644 --- a/qt/gen_qshareddata.h +++ b/qt/gen_qshareddata.h @@ -20,9 +20,9 @@ class QSharedData; typedef struct QSharedData QSharedData; #endif -QSharedData* QSharedData_new(); -QSharedData* QSharedData_new2(QSharedData* param1); -void QSharedData_Delete(QSharedData* self); +void QSharedData_new(QSharedData** outptr_QSharedData); +void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData); +void QSharedData_Delete(QSharedData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsharedmemory.cpp b/qt/gen_qsharedmemory.cpp index c7f7fc39..1cabbef6 100644 --- a/qt/gen_qsharedmemory.cpp +++ b/qt/gen_qsharedmemory.cpp @@ -1,29 +1,224 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qsharedmemory.h" #include "_cgo_export.h" -QSharedMemory* QSharedMemory_new() { - return new QSharedMemory(); +class MiqtVirtualQSharedMemory : public virtual QSharedMemory { +public: + + MiqtVirtualQSharedMemory(): QSharedMemory() {}; + MiqtVirtualQSharedMemory(const QString& key): QSharedMemory(key) {}; + MiqtVirtualQSharedMemory(QObject* parent): QSharedMemory(parent) {}; + MiqtVirtualQSharedMemory(const QString& key, QObject* parent): QSharedMemory(key, parent) {}; + + virtual ~MiqtVirtualQSharedMemory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSharedMemory::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSharedMemory_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSharedMemory::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSharedMemory::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSharedMemory_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSharedMemory::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSharedMemory::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSharedMemory_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSharedMemory::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSharedMemory::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSharedMemory_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSharedMemory::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSharedMemory::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSharedMemory_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSharedMemory::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSharedMemory::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSharedMemory_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSharedMemory::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSharedMemory::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSharedMemory_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSharedMemory::disconnectNotify(*signal); + + } + +}; + +void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } -QSharedMemory* QSharedMemory_new2(struct miqt_string key) { +void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSharedMemory(key_QString); + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } -QSharedMemory* QSharedMemory_new3(QObject* parent) { - return new QSharedMemory(parent); +void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(parent); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } -QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent) { +void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSharedMemory(key_QString, parent); + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString, parent); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self) { @@ -196,7 +391,67 @@ bool QSharedMemory_Attach1(QSharedMemory* self, int mode) { return self->attach(static_cast(mode)); } -void QSharedMemory_Delete(QSharedMemory* self) { - delete self; +void QSharedMemory_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__Event = slot; +} + +bool QSharedMemory_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_Event(event); +} + +void QSharedMemory_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__EventFilter = slot; +} + +bool QSharedMemory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSharedMemory_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__TimerEvent = slot; +} + +void QSharedMemory_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_TimerEvent(event); +} + +void QSharedMemory_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__ChildEvent = slot; +} + +void QSharedMemory_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_ChildEvent(event); +} + +void QSharedMemory_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__CustomEvent = slot; +} + +void QSharedMemory_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_CustomEvent(event); +} + +void QSharedMemory_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__ConnectNotify = slot; +} + +void QSharedMemory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSharedMemory_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__DisconnectNotify = slot; +} + +void QSharedMemory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSharedMemory_Delete(QSharedMemory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsharedmemory.go b/qt/gen_qsharedmemory.go index 5a297ac4..eaf0a582 100644 --- a/qt/gen_qsharedmemory.go +++ b/qt/gen_qsharedmemory.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QSharedMemory struct { - h *C.QSharedMemory + h *C.QSharedMemory + isSubclass bool *QObject } @@ -53,21 +55,34 @@ func (this *QSharedMemory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSharedMemory(h *C.QSharedMemory) *QSharedMemory { +// newQSharedMemory constructs the type using only CGO pointers. +func newQSharedMemory(h *C.QSharedMemory, h_QObject *C.QObject) *QSharedMemory { if h == nil { return nil } - return &QSharedMemory{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSharedMemory{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSharedMemory(h unsafe.Pointer) *QSharedMemory { - return newQSharedMemory((*C.QSharedMemory)(h)) +// UnsafeNewQSharedMemory constructs the type using only unsafe pointers. +func UnsafeNewQSharedMemory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSharedMemory { + if h == nil { + return nil + } + + return &QSharedMemory{h: (*C.QSharedMemory)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSharedMemory constructs a new QSharedMemory object. func NewQSharedMemory() *QSharedMemory { - ret := C.QSharedMemory_new() - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new(&outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSharedMemory2 constructs a new QSharedMemory object. @@ -76,14 +91,24 @@ func NewQSharedMemory2(key string) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSharedMemory_new2(key_ms) - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new2(key_ms, &outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSharedMemory3 constructs a new QSharedMemory object. func NewQSharedMemory3(parent *QObject) *QSharedMemory { - ret := C.QSharedMemory_new3(parent.cPointer()) - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new3(parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSharedMemory4 constructs a new QSharedMemory object. @@ -92,8 +117,13 @@ func NewQSharedMemory4(key string, parent *QObject) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSharedMemory_new4(key_ms, parent.cPointer()) - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new4(key_ms, parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSharedMemory) MetaObject() *QMetaObject { @@ -257,9 +287,175 @@ func (this *QSharedMemory) Attach1(mode QSharedMemory__AccessMode) bool { return (bool)(C.QSharedMemory_Attach1(this.h, (C.int)(mode))) } +func (this *QSharedMemory) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSharedMemory_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSharedMemory) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSharedMemory_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_Event +func miqt_exec_callback_QSharedMemory_Event(self *C.QSharedMemory, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSharedMemory{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSharedMemory) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSharedMemory_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSharedMemory) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSharedMemory_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_EventFilter +func miqt_exec_callback_QSharedMemory_EventFilter(self *C.QSharedMemory, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSharedMemory{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSharedMemory) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSharedMemory_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSharedMemory) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSharedMemory_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_TimerEvent +func miqt_exec_callback_QSharedMemory_TimerEvent(self *C.QSharedMemory, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSharedMemory_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSharedMemory) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSharedMemory_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_ChildEvent +func miqt_exec_callback_QSharedMemory_ChildEvent(self *C.QSharedMemory, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSharedMemory_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSharedMemory) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSharedMemory_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_CustomEvent +func miqt_exec_callback_QSharedMemory_CustomEvent(self *C.QSharedMemory, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSharedMemory_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSharedMemory) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSharedMemory_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_ConnectNotify +func miqt_exec_callback_QSharedMemory_ConnectNotify(self *C.QSharedMemory, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSharedMemory_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSharedMemory) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSharedMemory_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_DisconnectNotify +func miqt_exec_callback_QSharedMemory_DisconnectNotify(self *C.QSharedMemory, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSharedMemory) Delete() { - C.QSharedMemory_Delete(this.h) + C.QSharedMemory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsharedmemory.h b/qt/gen_qsharedmemory.h index 78cbd8cb..d1c3a9d7 100644 --- a/qt/gen_qsharedmemory.h +++ b/qt/gen_qsharedmemory.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSharedMemory; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSharedMemory QSharedMemory; +typedef struct QTimerEvent QTimerEvent; #endif -QSharedMemory* QSharedMemory_new(); -QSharedMemory* QSharedMemory_new2(struct miqt_string key); -QSharedMemory* QSharedMemory_new3(QObject* parent); -QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent); +void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self); void* QSharedMemory_Metacast(QSharedMemory* self, const char* param1); struct miqt_string QSharedMemory_Tr(const char* s); @@ -54,7 +62,21 @@ struct miqt_string QSharedMemory_TrUtf82(const char* s, const char* c); struct miqt_string QSharedMemory_TrUtf83(const char* s, const char* c, int n); bool QSharedMemory_Create2(QSharedMemory* self, int size, int mode); bool QSharedMemory_Attach1(QSharedMemory* self, int mode); -void QSharedMemory_Delete(QSharedMemory* self); +void QSharedMemory_override_virtual_Event(void* self, intptr_t slot); +bool QSharedMemory_virtualbase_Event(void* self, QEvent* event); +void QSharedMemory_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSharedMemory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSharedMemory_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSharedMemory_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSharedMemory_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSharedMemory_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSharedMemory_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSharedMemory_virtualbase_CustomEvent(void* self, QEvent* event); +void QSharedMemory_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSharedMemory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSharedMemory_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSharedMemory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSharedMemory_Delete(QSharedMemory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qshortcut.cpp b/qt/gen_qshortcut.cpp index 11c1ba74..361c075a 100644 --- a/qt/gen_qshortcut.cpp +++ b/qt/gen_qshortcut.cpp @@ -1,32 +1,231 @@ +#include +#include #include +#include #include +#include #include #include #include #include +#include #include #include #include "gen_qshortcut.h" #include "_cgo_export.h" -QShortcut* QShortcut_new(QWidget* parent) { - return new QShortcut(parent); +class MiqtVirtualQShortcut : public virtual QShortcut { +public: + + MiqtVirtualQShortcut(QWidget* parent): QShortcut(parent) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QWidget* parent): QShortcut(key, parent) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QWidget* parent, const char* member): QShortcut(key, parent, member) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QWidget* parent, const char* member, const char* ambiguousMember): QShortcut(key, parent, member, ambiguousMember) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QWidget* parent, const char* member, const char* ambiguousMember, Qt::ShortcutContext shortcutContext): QShortcut(key, parent, member, ambiguousMember, shortcutContext) {}; + + virtual ~MiqtVirtualQShortcut() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QShortcut::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QShortcut_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QShortcut::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QShortcut::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QShortcut_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QShortcut::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QShortcut::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QShortcut_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QShortcut::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QShortcut::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QShortcut_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QShortcut::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QShortcut::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QShortcut_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QShortcut::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QShortcut::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QShortcut_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QShortcut::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QShortcut::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QShortcut_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QShortcut::disconnectNotify(*signal); + + } + +}; + +void QShortcut_new(QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(parent); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new2(QKeySequence* key, QWidget* parent) { - return new QShortcut(*key, parent); +void QShortcut_new2(QKeySequence* key, QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member) { - return new QShortcut(*key, parent, member); +void QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember) { - return new QShortcut(*key, parent, member, ambiguousMember); +void QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext) { - return new QShortcut(*key, parent, member, ambiguousMember, static_cast(shortcutContext)); +void QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember, static_cast(shortcutContext)); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QShortcut_MetaObject(const QShortcut* self) { @@ -121,7 +320,7 @@ void QShortcut_Activated(QShortcut* self) { } void QShortcut_connect_Activated(QShortcut* self, intptr_t slot) { - QShortcut::connect(self, static_cast(&QShortcut::activated), self, [=]() { + MiqtVirtualQShortcut::connect(self, static_cast(&QShortcut::activated), self, [=]() { miqt_exec_callback_QShortcut_Activated(slot); }); } @@ -131,7 +330,7 @@ void QShortcut_ActivatedAmbiguously(QShortcut* self) { } void QShortcut_connect_ActivatedAmbiguously(QShortcut* self, intptr_t slot) { - QShortcut::connect(self, static_cast(&QShortcut::activatedAmbiguously), self, [=]() { + MiqtVirtualQShortcut::connect(self, static_cast(&QShortcut::activatedAmbiguously), self, [=]() { miqt_exec_callback_QShortcut_ActivatedAmbiguously(slot); }); } @@ -180,7 +379,67 @@ struct miqt_string QShortcut_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QShortcut_Delete(QShortcut* self) { - delete self; +void QShortcut_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__Event = slot; +} + +bool QShortcut_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQShortcut*)(self) )->virtualbase_Event(e); +} + +void QShortcut_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__EventFilter = slot; +} + +bool QShortcut_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQShortcut*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QShortcut_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__TimerEvent = slot; +} + +void QShortcut_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_TimerEvent(event); +} + +void QShortcut_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__ChildEvent = slot; +} + +void QShortcut_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_ChildEvent(event); +} + +void QShortcut_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__CustomEvent = slot; +} + +void QShortcut_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_CustomEvent(event); +} + +void QShortcut_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__ConnectNotify = slot; +} + +void QShortcut_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QShortcut_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__DisconnectNotify = slot; +} + +void QShortcut_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QShortcut_Delete(QShortcut* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qshortcut.go b/qt/gen_qshortcut.go index 23529047..934c6bdc 100644 --- a/qt/gen_qshortcut.go +++ b/qt/gen_qshortcut.go @@ -15,7 +15,8 @@ import ( ) type QShortcut struct { - h *C.QShortcut + h *C.QShortcut + isSubclass bool *QObject } @@ -33,35 +34,58 @@ func (this *QShortcut) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQShortcut(h *C.QShortcut) *QShortcut { +// newQShortcut constructs the type using only CGO pointers. +func newQShortcut(h *C.QShortcut, h_QObject *C.QObject) *QShortcut { if h == nil { return nil } - return &QShortcut{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QShortcut{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQShortcut(h unsafe.Pointer) *QShortcut { - return newQShortcut((*C.QShortcut)(h)) +// UnsafeNewQShortcut constructs the type using only unsafe pointers. +func UnsafeNewQShortcut(h unsafe.Pointer, h_QObject unsafe.Pointer) *QShortcut { + if h == nil { + return nil + } + + return &QShortcut{h: (*C.QShortcut)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQShortcut constructs a new QShortcut object. func NewQShortcut(parent *QWidget) *QShortcut { - ret := C.QShortcut_new(parent.cPointer()) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new(parent.cPointer(), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut2 constructs a new QShortcut object. func NewQShortcut2(key *QKeySequence, parent *QWidget) *QShortcut { - ret := C.QShortcut_new2(key.cPointer(), parent.cPointer()) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new2(key.cPointer(), parent.cPointer(), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut3 constructs a new QShortcut object. func NewQShortcut3(key *QKeySequence, parent *QWidget, member string) *QShortcut { member_Cstring := C.CString(member) defer C.free(unsafe.Pointer(member_Cstring)) - ret := C.QShortcut_new3(key.cPointer(), parent.cPointer(), member_Cstring) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new3(key.cPointer(), parent.cPointer(), member_Cstring, &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut4 constructs a new QShortcut object. @@ -70,8 +94,13 @@ func NewQShortcut4(key *QKeySequence, parent *QWidget, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - ret := C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut5 constructs a new QShortcut object. @@ -80,8 +109,13 @@ func NewQShortcut5(key *QKeySequence, parent *QWidget, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - ret := C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(shortcutContext)) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(shortcutContext), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QShortcut) MetaObject() *QMetaObject { @@ -167,7 +201,7 @@ func (this *QShortcut) Id() int { } func (this *QShortcut) ParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QShortcut_ParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QShortcut_ParentWidget(this.h)), nil, nil) } func (this *QShortcut) Activated() { @@ -248,9 +282,175 @@ func QShortcut_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QShortcut) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QShortcut_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QShortcut) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QShortcut_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_Event +func miqt_exec_callback_QShortcut_Event(self *C.QShortcut, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QShortcut{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QShortcut) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QShortcut_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QShortcut) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QShortcut_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_EventFilter +func miqt_exec_callback_QShortcut_EventFilter(self *C.QShortcut, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QShortcut{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QShortcut) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QShortcut_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QShortcut) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QShortcut_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_TimerEvent +func miqt_exec_callback_QShortcut_TimerEvent(self *C.QShortcut, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QShortcut{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QShortcut) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QShortcut_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QShortcut) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QShortcut_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_ChildEvent +func miqt_exec_callback_QShortcut_ChildEvent(self *C.QShortcut, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QShortcut{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QShortcut) callVirtualBase_CustomEvent(event *QEvent) { + + C.QShortcut_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QShortcut) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QShortcut_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_CustomEvent +func miqt_exec_callback_QShortcut_CustomEvent(self *C.QShortcut, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QShortcut{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QShortcut) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QShortcut_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QShortcut) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QShortcut_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_ConnectNotify +func miqt_exec_callback_QShortcut_ConnectNotify(self *C.QShortcut, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QShortcut{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QShortcut) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QShortcut_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QShortcut) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QShortcut_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_DisconnectNotify +func miqt_exec_callback_QShortcut_DisconnectNotify(self *C.QShortcut, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QShortcut{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QShortcut) Delete() { - C.QShortcut_Delete(this.h) + C.QShortcut_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qshortcut.h b/qt/gen_qshortcut.h index 16b321da..402d2760 100644 --- a/qt/gen_qshortcut.h +++ b/qt/gen_qshortcut.h @@ -15,22 +15,32 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QKeySequence; +class QMetaMethod; class QMetaObject; +class QObject; class QShortcut; +class QTimerEvent; class QWidget; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QKeySequence QKeySequence; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QShortcut QShortcut; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QShortcut* QShortcut_new(QWidget* parent); -QShortcut* QShortcut_new2(QKeySequence* key, QWidget* parent); -QShortcut* QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member); -QShortcut* QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember); -QShortcut* QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext); +void QShortcut_new(QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new2(QKeySequence* key, QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext, QShortcut** outptr_QShortcut, QObject** outptr_QObject); QMetaObject* QShortcut_MetaObject(const QShortcut* self); void* QShortcut_Metacast(QShortcut* self, const char* param1); struct miqt_string QShortcut_Tr(const char* s); @@ -51,11 +61,26 @@ void QShortcut_Activated(QShortcut* self); void QShortcut_connect_Activated(QShortcut* self, intptr_t slot); void QShortcut_ActivatedAmbiguously(QShortcut* self); void QShortcut_connect_ActivatedAmbiguously(QShortcut* self, intptr_t slot); +bool QShortcut_Event(QShortcut* self, QEvent* e); struct miqt_string QShortcut_Tr2(const char* s, const char* c); struct miqt_string QShortcut_Tr3(const char* s, const char* c, int n); struct miqt_string QShortcut_TrUtf82(const char* s, const char* c); struct miqt_string QShortcut_TrUtf83(const char* s, const char* c, int n); -void QShortcut_Delete(QShortcut* self); +void QShortcut_override_virtual_Event(void* self, intptr_t slot); +bool QShortcut_virtualbase_Event(void* self, QEvent* e); +void QShortcut_override_virtual_EventFilter(void* self, intptr_t slot); +bool QShortcut_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QShortcut_override_virtual_TimerEvent(void* self, intptr_t slot); +void QShortcut_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QShortcut_override_virtual_ChildEvent(void* self, intptr_t slot); +void QShortcut_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QShortcut_override_virtual_CustomEvent(void* self, intptr_t slot); +void QShortcut_virtualbase_CustomEvent(void* self, QEvent* event); +void QShortcut_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QShortcut_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QShortcut_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QShortcut_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QShortcut_Delete(QShortcut* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsignalmapper.cpp b/qt/gen_qsignalmapper.cpp index fec0ffcc..5aa87822 100644 --- a/qt/gen_qsignalmapper.cpp +++ b/qt/gen_qsignalmapper.cpp @@ -1,20 +1,209 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qsignalmapper.h" #include "_cgo_export.h" -QSignalMapper* QSignalMapper_new() { - return new QSignalMapper(); +class MiqtVirtualQSignalMapper : public virtual QSignalMapper { +public: + + MiqtVirtualQSignalMapper(): QSignalMapper() {}; + MiqtVirtualQSignalMapper(QObject* parent): QSignalMapper(parent) {}; + + virtual ~MiqtVirtualQSignalMapper() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSignalMapper::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSignalMapper_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSignalMapper::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSignalMapper::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSignalMapper_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSignalMapper::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSignalMapper::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSignalMapper_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSignalMapper::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSignalMapper::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSignalMapper_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSignalMapper::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSignalMapper::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSignalMapper_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSignalMapper::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSignalMapper::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSignalMapper_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSignalMapper::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSignalMapper::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSignalMapper_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSignalMapper::disconnectNotify(*signal); + + } + +}; + +void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { + MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(); + *outptr_QSignalMapper = ret; + *outptr_QObject = static_cast(ret); } -QSignalMapper* QSignalMapper_new2(QObject* parent) { - return new QSignalMapper(parent); +void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { + MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(parent); + *outptr_QSignalMapper = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self) { @@ -90,7 +279,7 @@ void QSignalMapper_Mapped(QSignalMapper* self, int param1) { } void QSignalMapper_connect_Mapped(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](int param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QSignalMapper_Mapped(slot, sigval1); }); @@ -102,7 +291,7 @@ void QSignalMapper_MappedWithQString(QSignalMapper* self, struct miqt_string par } void QSignalMapper_connect_MappedWithQString(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](const QString& param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -120,7 +309,7 @@ void QSignalMapper_MappedWithQWidget(QSignalMapper* self, QWidget* param1) { } void QSignalMapper_connect_MappedWithQWidget(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](QWidget* param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](QWidget* param1) { QWidget* sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedWithQWidget(slot, sigval1); }); @@ -131,7 +320,7 @@ void QSignalMapper_MappedWithQObject(QSignalMapper* self, QObject* param1) { } void QSignalMapper_connect_MappedWithQObject(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](QObject* param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mapped), self, [=](QObject* param1) { QObject* sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedWithQObject(slot, sigval1); }); @@ -142,7 +331,7 @@ void QSignalMapper_MappedInt(QSignalMapper* self, int param1) { } void QSignalMapper_connect_MappedInt(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedInt), self, [=](int param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedInt), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedInt(slot, sigval1); }); @@ -154,7 +343,7 @@ void QSignalMapper_MappedString(QSignalMapper* self, struct miqt_string param1) } void QSignalMapper_connect_MappedString(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedString), self, [=](const QString& param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedString), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -172,7 +361,7 @@ void QSignalMapper_MappedWidget(QSignalMapper* self, QWidget* param1) { } void QSignalMapper_connect_MappedWidget(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedWidget), self, [=](QWidget* param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedWidget), self, [=](QWidget* param1) { QWidget* sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedWidget(slot, sigval1); }); @@ -183,7 +372,7 @@ void QSignalMapper_MappedObject(QSignalMapper* self, QObject* param1) { } void QSignalMapper_connect_MappedObject(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedObject), self, [=](QObject* param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedObject), self, [=](QObject* param1) { QObject* sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedObject(slot, sigval1); }); @@ -241,7 +430,67 @@ struct miqt_string QSignalMapper_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSignalMapper_Delete(QSignalMapper* self) { - delete self; +void QSignalMapper_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__Event = slot; +} + +bool QSignalMapper_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_Event(event); +} + +void QSignalMapper_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__EventFilter = slot; +} + +bool QSignalMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSignalMapper_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__TimerEvent = slot; +} + +void QSignalMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_TimerEvent(event); +} + +void QSignalMapper_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__ChildEvent = slot; +} + +void QSignalMapper_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_ChildEvent(event); +} + +void QSignalMapper_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__CustomEvent = slot; +} + +void QSignalMapper_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_CustomEvent(event); +} + +void QSignalMapper_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__ConnectNotify = slot; +} + +void QSignalMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSignalMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__DisconnectNotify = slot; +} + +void QSignalMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSignalMapper_Delete(QSignalMapper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsignalmapper.go b/qt/gen_qsignalmapper.go index 71127ce9..f115a3e1 100644 --- a/qt/gen_qsignalmapper.go +++ b/qt/gen_qsignalmapper.go @@ -15,7 +15,8 @@ import ( ) type QSignalMapper struct { - h *C.QSignalMapper + h *C.QSignalMapper + isSubclass bool *QObject } @@ -33,27 +34,45 @@ func (this *QSignalMapper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSignalMapper(h *C.QSignalMapper) *QSignalMapper { +// newQSignalMapper constructs the type using only CGO pointers. +func newQSignalMapper(h *C.QSignalMapper, h_QObject *C.QObject) *QSignalMapper { if h == nil { return nil } - return &QSignalMapper{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSignalMapper{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSignalMapper(h unsafe.Pointer) *QSignalMapper { - return newQSignalMapper((*C.QSignalMapper)(h)) +// UnsafeNewQSignalMapper constructs the type using only unsafe pointers. +func UnsafeNewQSignalMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSignalMapper { + if h == nil { + return nil + } + + return &QSignalMapper{h: (*C.QSignalMapper)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSignalMapper constructs a new QSignalMapper object. func NewQSignalMapper() *QSignalMapper { - ret := C.QSignalMapper_new() - return newQSignalMapper(ret) + var outptr_QSignalMapper *C.QSignalMapper = nil + var outptr_QObject *C.QObject = nil + + C.QSignalMapper_new(&outptr_QSignalMapper, &outptr_QObject) + ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSignalMapper2 constructs a new QSignalMapper object. func NewQSignalMapper2(parent *QObject) *QSignalMapper { - ret := C.QSignalMapper_new2(parent.cPointer()) - return newQSignalMapper(ret) + var outptr_QSignalMapper *C.QSignalMapper = nil + var outptr_QObject *C.QObject = nil + + C.QSignalMapper_new2(parent.cPointer(), &outptr_QSignalMapper, &outptr_QObject) + ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSignalMapper) MetaObject() *QMetaObject { @@ -190,7 +209,7 @@ func miqt_exec_callback_QSignalMapper_MappedWithQWidget(cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) gofunc(slotval1) } @@ -277,7 +296,7 @@ func miqt_exec_callback_QSignalMapper_MappedWidget(cb C.intptr_t, param1 *C.QWid } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) gofunc(slotval1) } @@ -354,9 +373,175 @@ func QSignalMapper_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSignalMapper) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSignalMapper_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSignalMapper) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSignalMapper_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_Event +func miqt_exec_callback_QSignalMapper_Event(self *C.QSignalMapper, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSignalMapper{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSignalMapper) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSignalMapper_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSignalMapper) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSignalMapper_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_EventFilter +func miqt_exec_callback_QSignalMapper_EventFilter(self *C.QSignalMapper, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSignalMapper{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSignalMapper) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSignalMapper_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalMapper) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSignalMapper_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_TimerEvent +func miqt_exec_callback_QSignalMapper_TimerEvent(self *C.QSignalMapper, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSignalMapper_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalMapper) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSignalMapper_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_ChildEvent +func miqt_exec_callback_QSignalMapper_ChildEvent(self *C.QSignalMapper, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSignalMapper_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalMapper) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSignalMapper_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_CustomEvent +func miqt_exec_callback_QSignalMapper_CustomEvent(self *C.QSignalMapper, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSignalMapper_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSignalMapper) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSignalMapper_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_ConnectNotify +func miqt_exec_callback_QSignalMapper_ConnectNotify(self *C.QSignalMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSignalMapper_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSignalMapper) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSignalMapper_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_DisconnectNotify +func miqt_exec_callback_QSignalMapper_DisconnectNotify(self *C.QSignalMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSignalMapper) Delete() { - C.QSignalMapper_Delete(this.h) + C.QSignalMapper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsignalmapper.h b/qt/gen_qsignalmapper.h index 16a3e831..8f5761b7 100644 --- a/qt/gen_qsignalmapper.h +++ b/qt/gen_qsignalmapper.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSignalMapper; +class QTimerEvent; class QWidget; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSignalMapper QSignalMapper; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QSignalMapper* QSignalMapper_new(); -QSignalMapper* QSignalMapper_new2(QObject* parent); +void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); +void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self); void* QSignalMapper_Metacast(QSignalMapper* self, const char* param1); struct miqt_string QSignalMapper_Tr(const char* s); @@ -63,7 +71,21 @@ struct miqt_string QSignalMapper_Tr2(const char* s, const char* c); struct miqt_string QSignalMapper_Tr3(const char* s, const char* c, int n); struct miqt_string QSignalMapper_TrUtf82(const char* s, const char* c); struct miqt_string QSignalMapper_TrUtf83(const char* s, const char* c, int n); -void QSignalMapper_Delete(QSignalMapper* self); +void QSignalMapper_override_virtual_Event(void* self, intptr_t slot); +bool QSignalMapper_virtualbase_Event(void* self, QEvent* event); +void QSignalMapper_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSignalMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSignalMapper_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSignalMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSignalMapper_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSignalMapper_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSignalMapper_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSignalMapper_virtualbase_CustomEvent(void* self, QEvent* event); +void QSignalMapper_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSignalMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSignalMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSignalMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSignalMapper_Delete(QSignalMapper* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsignaltransition.cpp b/qt/gen_qsignaltransition.cpp index 02e7dcf9..274b34f5 100644 --- a/qt/gen_qsignaltransition.cpp +++ b/qt/gen_qsignaltransition.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -10,20 +12,114 @@ #include "gen_qsignaltransition.h" #include "_cgo_export.h" -QSignalTransition* QSignalTransition_new() { - return new QSignalTransition(); +class MiqtVirtualQSignalTransition : public virtual QSignalTransition { +public: + + MiqtVirtualQSignalTransition(): QSignalTransition() {}; + MiqtVirtualQSignalTransition(const QObject* sender, const char* signal): QSignalTransition(sender, signal) {}; + MiqtVirtualQSignalTransition(QState* sourceState): QSignalTransition(sourceState) {}; + MiqtVirtualQSignalTransition(const QObject* sender, const char* signal, QState* sourceState): QSignalTransition(sender, signal, sourceState) {}; + + virtual ~MiqtVirtualQSignalTransition() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventTest = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventTest(QEvent* event) override { + if (handle__EventTest == 0) { + return QSignalTransition::eventTest(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSignalTransition_EventTest(this, handle__EventTest, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventTest(QEvent* event) { + + return QSignalTransition::eventTest(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnTransition = 0; + + // Subclass to allow providing a Go implementation + virtual void onTransition(QEvent* event) override { + if (handle__OnTransition == 0) { + QSignalTransition::onTransition(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSignalTransition_OnTransition(this, handle__OnTransition, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnTransition(QEvent* event) { + + QSignalTransition::onTransition(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QSignalTransition::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QSignalTransition_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QSignalTransition::event(e); + + } + +}; + +void QSignalTransition_new(QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(); + *outptr_QSignalTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSignalTransition* QSignalTransition_new2(QObject* sender, const char* signal) { - return new QSignalTransition(sender, signal); +void QSignalTransition_new2(QObject* sender, const char* signal, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(sender, signal); + *outptr_QSignalTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSignalTransition* QSignalTransition_new3(QState* sourceState) { - return new QSignalTransition(sourceState); +void QSignalTransition_new3(QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(sourceState); + *outptr_QSignalTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSignalTransition* QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState) { - return new QSignalTransition(sender, signal, sourceState); +void QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(sender, signal, sourceState); + *outptr_QSignalTransition = ret; + *outptr_QAbstractTransition = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSignalTransition_MetaObject(const QSignalTransition* self) { @@ -122,7 +218,35 @@ struct miqt_string QSignalTransition_TrUtf83(const char* s, const char* c, int n return _ms; } -void QSignalTransition_Delete(QSignalTransition* self) { - delete self; +void QSignalTransition_override_virtual_EventTest(void* self, intptr_t slot) { + dynamic_cast( (QSignalTransition*)(self) )->handle__EventTest = slot; +} + +bool QSignalTransition_virtualbase_EventTest(void* self, QEvent* event) { + return ( (MiqtVirtualQSignalTransition*)(self) )->virtualbase_EventTest(event); +} + +void QSignalTransition_override_virtual_OnTransition(void* self, intptr_t slot) { + dynamic_cast( (QSignalTransition*)(self) )->handle__OnTransition = slot; +} + +void QSignalTransition_virtualbase_OnTransition(void* self, QEvent* event) { + ( (MiqtVirtualQSignalTransition*)(self) )->virtualbase_OnTransition(event); +} + +void QSignalTransition_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSignalTransition*)(self) )->handle__Event = slot; +} + +bool QSignalTransition_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQSignalTransition*)(self) )->virtualbase_Event(e); +} + +void QSignalTransition_Delete(QSignalTransition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsignaltransition.go b/qt/gen_qsignaltransition.go index 24de3999..3cba5730 100644 --- a/qt/gen_qsignaltransition.go +++ b/qt/gen_qsignaltransition.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QSignalTransition struct { - h *C.QSignalTransition + h *C.QSignalTransition + isSubclass bool *QAbstractTransition } @@ -32,43 +34,75 @@ func (this *QSignalTransition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSignalTransition(h *C.QSignalTransition) *QSignalTransition { +// newQSignalTransition constructs the type using only CGO pointers. +func newQSignalTransition(h *C.QSignalTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QSignalTransition { if h == nil { return nil } - return &QSignalTransition{h: h, QAbstractTransition: UnsafeNewQAbstractTransition(unsafe.Pointer(h))} + return &QSignalTransition{h: h, + QAbstractTransition: newQAbstractTransition(h_QAbstractTransition, h_QObject)} } -func UnsafeNewQSignalTransition(h unsafe.Pointer) *QSignalTransition { - return newQSignalTransition((*C.QSignalTransition)(h)) +// UnsafeNewQSignalTransition constructs the type using only unsafe pointers. +func UnsafeNewQSignalTransition(h unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QSignalTransition { + if h == nil { + return nil + } + + return &QSignalTransition{h: (*C.QSignalTransition)(h), + QAbstractTransition: UnsafeNewQAbstractTransition(h_QAbstractTransition, h_QObject)} } // NewQSignalTransition constructs a new QSignalTransition object. func NewQSignalTransition() *QSignalTransition { - ret := C.QSignalTransition_new() - return newQSignalTransition(ret) + var outptr_QSignalTransition *C.QSignalTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QSignalTransition_new(&outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSignalTransition2 constructs a new QSignalTransition object. func NewQSignalTransition2(sender *QObject, signal string) *QSignalTransition { signal_Cstring := C.CString(signal) defer C.free(unsafe.Pointer(signal_Cstring)) - ret := C.QSignalTransition_new2(sender.cPointer(), signal_Cstring) - return newQSignalTransition(ret) + var outptr_QSignalTransition *C.QSignalTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QSignalTransition_new2(sender.cPointer(), signal_Cstring, &outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSignalTransition3 constructs a new QSignalTransition object. func NewQSignalTransition3(sourceState *QState) *QSignalTransition { - ret := C.QSignalTransition_new3(sourceState.cPointer()) - return newQSignalTransition(ret) + var outptr_QSignalTransition *C.QSignalTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QSignalTransition_new3(sourceState.cPointer(), &outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSignalTransition4 constructs a new QSignalTransition object. func NewQSignalTransition4(sender *QObject, signal string, sourceState *QState) *QSignalTransition { signal_Cstring := C.CString(signal) defer C.free(unsafe.Pointer(signal_Cstring)) - ret := C.QSignalTransition_new4(sender.cPointer(), signal_Cstring, sourceState.cPointer()) - return newQSignalTransition(ret) + var outptr_QSignalTransition *C.QSignalTransition = nil + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QSignalTransition_new4(sender.cPointer(), signal_Cstring, sourceState.cPointer(), &outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) + ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSignalTransition) MetaObject() *QMetaObject { @@ -165,9 +199,82 @@ func QSignalTransition_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSignalTransition) callVirtualBase_EventTest(event *QEvent) bool { + + return (bool)(C.QSignalTransition_virtualbase_EventTest(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSignalTransition) OnEventTest(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSignalTransition_override_virtual_EventTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalTransition_EventTest +func miqt_exec_callback_QSignalTransition_EventTest(self *C.QSignalTransition, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSignalTransition{h: self}).callVirtualBase_EventTest, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSignalTransition) callVirtualBase_OnTransition(event *QEvent) { + + C.QSignalTransition_virtualbase_OnTransition(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalTransition) OnOnTransition(slot func(super func(event *QEvent), event *QEvent)) { + C.QSignalTransition_override_virtual_OnTransition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalTransition_OnTransition +func miqt_exec_callback_QSignalTransition_OnTransition(self *C.QSignalTransition, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSignalTransition{h: self}).callVirtualBase_OnTransition, slotval1) + +} + +func (this *QSignalTransition) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QSignalTransition_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QSignalTransition) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QSignalTransition_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalTransition_Event +func miqt_exec_callback_QSignalTransition_Event(self *C.QSignalTransition, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QSignalTransition{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSignalTransition) Delete() { - C.QSignalTransition_Delete(this.h) + C.QSignalTransition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsignaltransition.h b/qt/gen_qsignaltransition.h index 7a7c23ae..f99c11aa 100644 --- a/qt/gen_qsignaltransition.h +++ b/qt/gen_qsignaltransition.h @@ -15,23 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractTransition; class QByteArray; +class QEvent; class QMetaObject; class QObject; class QSignalTransition; class QState; #else +typedef struct QAbstractTransition QAbstractTransition; typedef struct QByteArray QByteArray; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSignalTransition QSignalTransition; typedef struct QState QState; #endif -QSignalTransition* QSignalTransition_new(); -QSignalTransition* QSignalTransition_new2(QObject* sender, const char* signal); -QSignalTransition* QSignalTransition_new3(QState* sourceState); -QSignalTransition* QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState); +void QSignalTransition_new(QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QSignalTransition_new2(QObject* sender, const char* signal, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QSignalTransition_new3(QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); QMetaObject* QSignalTransition_MetaObject(const QSignalTransition* self); void* QSignalTransition_Metacast(QSignalTransition* self, const char* param1); struct miqt_string QSignalTransition_Tr(const char* s); @@ -40,11 +44,20 @@ QObject* QSignalTransition_SenderObject(const QSignalTransition* self); void QSignalTransition_SetSenderObject(QSignalTransition* self, QObject* sender); struct miqt_string QSignalTransition_Signal(const QSignalTransition* self); void QSignalTransition_SetSignal(QSignalTransition* self, struct miqt_string signal); +bool QSignalTransition_EventTest(QSignalTransition* self, QEvent* event); +void QSignalTransition_OnTransition(QSignalTransition* self, QEvent* event); +bool QSignalTransition_Event(QSignalTransition* self, QEvent* e); struct miqt_string QSignalTransition_Tr2(const char* s, const char* c); struct miqt_string QSignalTransition_Tr3(const char* s, const char* c, int n); struct miqt_string QSignalTransition_TrUtf82(const char* s, const char* c); struct miqt_string QSignalTransition_TrUtf83(const char* s, const char* c, int n); -void QSignalTransition_Delete(QSignalTransition* self); +void QSignalTransition_override_virtual_EventTest(void* self, intptr_t slot); +bool QSignalTransition_virtualbase_EventTest(void* self, QEvent* event); +void QSignalTransition_override_virtual_OnTransition(void* self, intptr_t slot); +void QSignalTransition_virtualbase_OnTransition(void* self, QEvent* event); +void QSignalTransition_override_virtual_Event(void* self, intptr_t slot); +bool QSignalTransition_virtualbase_Event(void* self, QEvent* e); +void QSignalTransition_Delete(QSignalTransition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsize.cpp b/qt/gen_qsize.cpp index fc723ff2..bbfae404 100644 --- a/qt/gen_qsize.cpp +++ b/qt/gen_qsize.cpp @@ -6,16 +6,19 @@ #include "gen_qsize.h" #include "_cgo_export.h" -QSize* QSize_new() { - return new QSize(); +void QSize_new(QSize** outptr_QSize) { + QSize* ret = new QSize(); + *outptr_QSize = ret; } -QSize* QSize_new2(int w, int h) { - return new QSize(static_cast(w), static_cast(h)); +void QSize_new2(int w, int h, QSize** outptr_QSize) { + QSize* ret = new QSize(static_cast(w), static_cast(h)); + *outptr_QSize = ret; } -QSize* QSize_new3(QSize* param1) { - return new QSize(*param1); +void QSize_new3(QSize* param1, QSize** outptr_QSize) { + QSize* ret = new QSize(*param1); + *outptr_QSize = ret; } bool QSize_IsNull(const QSize* self) { @@ -110,24 +113,32 @@ QSize* QSize_OperatorDivideAssign(QSize* self, double c) { return &_ret; } -void QSize_Delete(QSize* self) { - delete self; +void QSize_Delete(QSize* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSizeF* QSizeF_new() { - return new QSizeF(); +void QSizeF_new(QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(); + *outptr_QSizeF = ret; } -QSizeF* QSizeF_new2(QSize* sz) { - return new QSizeF(*sz); +void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(*sz); + *outptr_QSizeF = ret; } -QSizeF* QSizeF_new3(double w, double h) { - return new QSizeF(static_cast(w), static_cast(h)); +void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(static_cast(w), static_cast(h)); + *outptr_QSizeF = ret; } -QSizeF* QSizeF_new4(QSizeF* param1) { - return new QSizeF(*param1); +void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(*param1); + *outptr_QSizeF = ret; } bool QSizeF_IsNull(const QSizeF* self) { @@ -228,7 +239,11 @@ QSize* QSizeF_ToSize(const QSizeF* self) { return new QSize(self->toSize()); } -void QSizeF_Delete(QSizeF* self) { - delete self; +void QSizeF_Delete(QSizeF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsize.go b/qt/gen_qsize.go index f1eedc67..bda639e8 100644 --- a/qt/gen_qsize.go +++ b/qt/gen_qsize.go @@ -14,7 +14,8 @@ import ( ) type QSize struct { - h *C.QSize + h *C.QSize + isSubclass bool } func (this *QSize) cPointer() *C.QSize { @@ -31,6 +32,7 @@ func (this *QSize) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSize constructs the type using only CGO pointers. func newQSize(h *C.QSize) *QSize { if h == nil { return nil @@ -38,26 +40,43 @@ func newQSize(h *C.QSize) *QSize { return &QSize{h: h} } +// UnsafeNewQSize constructs the type using only unsafe pointers. func UnsafeNewQSize(h unsafe.Pointer) *QSize { - return newQSize((*C.QSize)(h)) + if h == nil { + return nil + } + + return &QSize{h: (*C.QSize)(h)} } // NewQSize constructs a new QSize object. func NewQSize() *QSize { - ret := C.QSize_new() - return newQSize(ret) + var outptr_QSize *C.QSize = nil + + C.QSize_new(&outptr_QSize) + ret := newQSize(outptr_QSize) + ret.isSubclass = true + return ret } // NewQSize2 constructs a new QSize object. func NewQSize2(w int, h int) *QSize { - ret := C.QSize_new2((C.int)(w), (C.int)(h)) - return newQSize(ret) + var outptr_QSize *C.QSize = nil + + C.QSize_new2((C.int)(w), (C.int)(h), &outptr_QSize) + ret := newQSize(outptr_QSize) + ret.isSubclass = true + return ret } // NewQSize3 constructs a new QSize object. func NewQSize3(param1 *QSize) *QSize { - ret := C.QSize_new3(param1.cPointer()) - return newQSize(ret) + var outptr_QSize *C.QSize = nil + + C.QSize_new3(param1.cPointer(), &outptr_QSize) + ret := newQSize(outptr_QSize) + ret.isSubclass = true + return ret } func (this *QSize) IsNull() bool { @@ -167,7 +186,7 @@ func (this *QSize) OperatorDivideAssign(c float64) *QSize { // Delete this object from C++ memory. func (this *QSize) Delete() { - C.QSize_Delete(this.h) + C.QSize_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -180,7 +199,8 @@ func (this *QSize) GoGC() { } type QSizeF struct { - h *C.QSizeF + h *C.QSizeF + isSubclass bool } func (this *QSizeF) cPointer() *C.QSizeF { @@ -197,6 +217,7 @@ func (this *QSizeF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSizeF constructs the type using only CGO pointers. func newQSizeF(h *C.QSizeF) *QSizeF { if h == nil { return nil @@ -204,32 +225,53 @@ func newQSizeF(h *C.QSizeF) *QSizeF { return &QSizeF{h: h} } +// UnsafeNewQSizeF constructs the type using only unsafe pointers. func UnsafeNewQSizeF(h unsafe.Pointer) *QSizeF { - return newQSizeF((*C.QSizeF)(h)) + if h == nil { + return nil + } + + return &QSizeF{h: (*C.QSizeF)(h)} } // NewQSizeF constructs a new QSizeF object. func NewQSizeF() *QSizeF { - ret := C.QSizeF_new() - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new(&outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } // NewQSizeF2 constructs a new QSizeF object. func NewQSizeF2(sz *QSize) *QSizeF { - ret := C.QSizeF_new2(sz.cPointer()) - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new2(sz.cPointer(), &outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } // NewQSizeF3 constructs a new QSizeF object. func NewQSizeF3(w float64, h float64) *QSizeF { - ret := C.QSizeF_new3((C.double)(w), (C.double)(h)) - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new3((C.double)(w), (C.double)(h), &outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } // NewQSizeF4 constructs a new QSizeF object. func NewQSizeF4(param1 *QSizeF) *QSizeF { - ret := C.QSizeF_new4(param1.cPointer()) - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new4(param1.cPointer(), &outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } func (this *QSizeF) IsNull() bool { @@ -346,7 +388,7 @@ func (this *QSizeF) ToSize() *QSize { // Delete this object from C++ memory. func (this *QSizeF) Delete() { - C.QSizeF_Delete(this.h) + C.QSizeF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsize.h b/qt/gen_qsize.h index eacdd411..19d1ae4b 100644 --- a/qt/gen_qsize.h +++ b/qt/gen_qsize.h @@ -26,9 +26,9 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QSize* QSize_new(); -QSize* QSize_new2(int w, int h); -QSize* QSize_new3(QSize* param1); +void QSize_new(QSize** outptr_QSize); +void QSize_new2(int w, int h, QSize** outptr_QSize); +void QSize_new3(QSize* param1, QSize** outptr_QSize); bool QSize_IsNull(const QSize* self); bool QSize_IsEmpty(const QSize* self); bool QSize_IsValid(const QSize* self); @@ -50,12 +50,12 @@ QSize* QSize_OperatorPlusAssign(QSize* self, QSize* param1); QSize* QSize_OperatorMinusAssign(QSize* self, QSize* param1); QSize* QSize_OperatorMultiplyAssign(QSize* self, double c); QSize* QSize_OperatorDivideAssign(QSize* self, double c); -void QSize_Delete(QSize* self); +void QSize_Delete(QSize* self, bool isSubclass); -QSizeF* QSizeF_new(); -QSizeF* QSizeF_new2(QSize* sz); -QSizeF* QSizeF_new3(double w, double h); -QSizeF* QSizeF_new4(QSizeF* param1); +void QSizeF_new(QSizeF** outptr_QSizeF); +void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF); +void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF); +void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF); bool QSizeF_IsNull(const QSizeF* self); bool QSizeF_IsEmpty(const QSizeF* self); bool QSizeF_IsValid(const QSizeF* self); @@ -78,7 +78,7 @@ QSizeF* QSizeF_OperatorMinusAssign(QSizeF* self, QSizeF* param1); QSizeF* QSizeF_OperatorMultiplyAssign(QSizeF* self, double c); QSizeF* QSizeF_OperatorDivideAssign(QSizeF* self, double c); QSize* QSizeF_ToSize(const QSizeF* self); -void QSizeF_Delete(QSizeF* self); +void QSizeF_Delete(QSizeF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsizegrip.cpp b/qt/gen_qsizegrip.cpp index d2f5f62c..e059857e 100644 --- a/qt/gen_qsizegrip.cpp +++ b/qt/gen_qsizegrip.cpp @@ -1,16 +1,1054 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qsizegrip.h" #include "_cgo_export.h" -QSizeGrip* QSizeGrip_new(QWidget* parent) { - return new QSizeGrip(parent); +class MiqtVirtualQSizeGrip : public virtual QSizeGrip { +public: + + MiqtVirtualQSizeGrip(QWidget* parent): QSizeGrip(parent) {}; + + virtual ~MiqtVirtualQSizeGrip() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSizeGrip::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSizeGrip_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSizeGrip::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QSizeGrip::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSizeGrip_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSizeGrip::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QSizeGrip::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QSizeGrip::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QSizeGrip::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QSizeGrip::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QSizeGrip::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QSizeGrip::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseReleaseEvent == 0) { + QSizeGrip::mouseReleaseEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QSizeGrip_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* mouseEvent) { + + QSizeGrip::mouseReleaseEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* moveEvent) override { + if (handle__MoveEvent == 0) { + QSizeGrip::moveEvent(moveEvent); + return; + } + + QMoveEvent* sigval1 = moveEvent; + + miqt_exec_callback_QSizeGrip_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* moveEvent) { + + QSizeGrip::moveEvent(moveEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* showEvent) override { + if (handle__ShowEvent == 0) { + QSizeGrip::showEvent(showEvent); + return; + } + + QShowEvent* sigval1 = showEvent; + + miqt_exec_callback_QSizeGrip_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* showEvent) { + + QSizeGrip::showEvent(showEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* hideEvent) override { + if (handle__HideEvent == 0) { + QSizeGrip::hideEvent(hideEvent); + return; + } + + QHideEvent* sigval1 = hideEvent; + + miqt_exec_callback_QSizeGrip_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* hideEvent) { + + QSizeGrip::hideEvent(hideEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QSizeGrip::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QSizeGrip::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSizeGrip::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSizeGrip::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSizeGrip::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSizeGrip_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSizeGrip::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSizeGrip::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSizeGrip_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSizeGrip::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSizeGrip::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSizeGrip_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSizeGrip::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSizeGrip::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSizeGrip_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSizeGrip::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QSizeGrip::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSizeGrip_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSizeGrip::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QSizeGrip::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSizeGrip::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSizeGrip::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSizeGrip::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSizeGrip::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSizeGrip::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSizeGrip::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSizeGrip::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSizeGrip::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSizeGrip::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSizeGrip::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSizeGrip::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QSizeGrip::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QSizeGrip::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QSizeGrip::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSizeGrip::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QSizeGrip::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSizeGrip::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSizeGrip::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSizeGrip::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSizeGrip::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSizeGrip::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QSizeGrip::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSizeGrip::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QSizeGrip::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSizeGrip::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QSizeGrip::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSizeGrip::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QSizeGrip::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSizeGrip::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QSizeGrip::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSizeGrip::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QSizeGrip::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSizeGrip::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QSizeGrip::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QSizeGrip::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSizeGrip::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSizeGrip::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSizeGrip::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSizeGrip_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QSizeGrip::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QSizeGrip::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSizeGrip_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSizeGrip::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QSizeGrip::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSizeGrip_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSizeGrip::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QSizeGrip::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSizeGrip_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSizeGrip::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QSizeGrip::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSizeGrip::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSizeGrip::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSizeGrip_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSizeGrip::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QSizeGrip::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSizeGrip::focusNextPrevChild(next); + + } + +}; + +void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSizeGrip* ret = new MiqtVirtualQSizeGrip(parent); + *outptr_QSizeGrip = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self) { @@ -95,7 +1133,347 @@ struct miqt_string QSizeGrip_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSizeGrip_Delete(QSizeGrip* self) { - delete self; +void QSizeGrip_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__SizeHint = slot; +} + +QSize* QSizeGrip_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_SizeHint(); +} + +void QSizeGrip_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__SetVisible = slot; +} + +void QSizeGrip_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_SetVisible(visible); +} + +void QSizeGrip_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__PaintEvent = slot; +} + +void QSizeGrip_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_PaintEvent(param1); +} + +void QSizeGrip_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MousePressEvent = slot; +} + +void QSizeGrip_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QSizeGrip_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSizeGrip_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QSizeGrip_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSizeGrip_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MouseReleaseEvent(mouseEvent); +} + +void QSizeGrip_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MoveEvent = slot; +} + +void QSizeGrip_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MoveEvent(moveEvent); +} + +void QSizeGrip_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ShowEvent = slot; +} + +void QSizeGrip_virtualbase_ShowEvent(void* self, QShowEvent* showEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ShowEvent(showEvent); +} + +void QSizeGrip_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__HideEvent = slot; +} + +void QSizeGrip_virtualbase_HideEvent(void* self, QHideEvent* hideEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_HideEvent(hideEvent); +} + +void QSizeGrip_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__EventFilter = slot; +} + +bool QSizeGrip_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QSizeGrip_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__Event = slot; +} + +bool QSizeGrip_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_Event(param1); +} + +void QSizeGrip_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DevType = slot; +} + +int QSizeGrip_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_DevType(); +} + +void QSizeGrip_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSizeGrip_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSizeGrip_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__HeightForWidth = slot; +} + +int QSizeGrip_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSizeGrip_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSizeGrip_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSizeGrip_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSizeGrip_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_PaintEngine(); +} + +void QSizeGrip_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSizeGrip_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSizeGrip_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__WheelEvent = slot; +} + +void QSizeGrip_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_WheelEvent(event); +} + +void QSizeGrip_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__KeyPressEvent = slot; +} + +void QSizeGrip_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSizeGrip_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSizeGrip_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSizeGrip_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__FocusInEvent = slot; +} + +void QSizeGrip_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSizeGrip_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__FocusOutEvent = slot; +} + +void QSizeGrip_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSizeGrip_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__EnterEvent = slot; +} + +void QSizeGrip_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_EnterEvent(event); +} + +void QSizeGrip_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__LeaveEvent = slot; +} + +void QSizeGrip_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSizeGrip_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ResizeEvent = slot; +} + +void QSizeGrip_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSizeGrip_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__CloseEvent = slot; +} + +void QSizeGrip_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_CloseEvent(event); +} + +void QSizeGrip_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSizeGrip_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSizeGrip_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__TabletEvent = slot; +} + +void QSizeGrip_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_TabletEvent(event); +} + +void QSizeGrip_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ActionEvent = slot; +} + +void QSizeGrip_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ActionEvent(event); +} + +void QSizeGrip_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DragEnterEvent = slot; +} + +void QSizeGrip_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSizeGrip_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DragMoveEvent = slot; +} + +void QSizeGrip_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSizeGrip_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSizeGrip_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSizeGrip_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DropEvent = slot; +} + +void QSizeGrip_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DropEvent(event); +} + +void QSizeGrip_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__NativeEvent = slot; +} + +bool QSizeGrip_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSizeGrip_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ChangeEvent = slot; +} + +void QSizeGrip_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSizeGrip_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__Metric = slot; +} + +int QSizeGrip_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_Metric(param1); +} + +void QSizeGrip_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__InitPainter = slot; +} + +void QSizeGrip_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_InitPainter(painter); +} + +void QSizeGrip_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSizeGrip_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_Redirected(offset); +} + +void QSizeGrip_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSizeGrip_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_SharedPainter(); +} + +void QSizeGrip_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__InputMethodEvent = slot; +} + +void QSizeGrip_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSizeGrip_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSizeGrip_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSizeGrip_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSizeGrip_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSizeGrip_Delete(QSizeGrip* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsizegrip.go b/qt/gen_qsizegrip.go index b76caa89..01c36eb0 100644 --- a/qt/gen_qsizegrip.go +++ b/qt/gen_qsizegrip.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QSizeGrip struct { - h *C.QSizeGrip + h *C.QSizeGrip + isSubclass bool *QWidget } @@ -32,21 +34,36 @@ func (this *QSizeGrip) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSizeGrip(h *C.QSizeGrip) *QSizeGrip { +// newQSizeGrip constructs the type using only CGO pointers. +func newQSizeGrip(h *C.QSizeGrip, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSizeGrip { if h == nil { return nil } - return &QSizeGrip{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QSizeGrip{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSizeGrip(h unsafe.Pointer) *QSizeGrip { - return newQSizeGrip((*C.QSizeGrip)(h)) +// UnsafeNewQSizeGrip constructs the type using only unsafe pointers. +func UnsafeNewQSizeGrip(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSizeGrip { + if h == nil { + return nil + } + + return &QSizeGrip{h: (*C.QSizeGrip)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSizeGrip constructs a new QSizeGrip object. func NewQSizeGrip(parent *QWidget) *QSizeGrip { - ret := C.QSizeGrip_new(parent.cPointer()) - return newQSizeGrip(ret) + var outptr_QSizeGrip *C.QSizeGrip = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSizeGrip_new(parent.cPointer(), &outptr_QSizeGrip, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSizeGrip(outptr_QSizeGrip, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSizeGrip) MetaObject() *QMetaObject { @@ -132,9 +149,1001 @@ func QSizeGrip_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSizeGrip) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSizeGrip_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSizeGrip) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSizeGrip_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_SizeHint +func miqt_exec_callback_QSizeGrip_SizeHint(self *C.QSizeGrip, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_SetVisible(visible bool) { + + C.QSizeGrip_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSizeGrip) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSizeGrip_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_SetVisible +func miqt_exec_callback_QSizeGrip_SetVisible(self *C.QSizeGrip, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QSizeGrip_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QSizeGrip_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_PaintEvent +func miqt_exec_callback_QSizeGrip_PaintEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QSizeGrip_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSizeGrip_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MousePressEvent +func miqt_exec_callback_QSizeGrip_MousePressEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QSizeGrip_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSizeGrip_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MouseMoveEvent +func miqt_exec_callback_QSizeGrip_MouseMoveEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MouseReleaseEvent(mouseEvent *QMouseEvent) { + + C.QSizeGrip_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QSizeGrip) OnMouseReleaseEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QSizeGrip_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MouseReleaseEvent +func miqt_exec_callback_QSizeGrip_MouseReleaseEvent(self *C.QSizeGrip, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MoveEvent(moveEvent *QMoveEvent) { + + C.QSizeGrip_virtualbase_MoveEvent(unsafe.Pointer(this.h), moveEvent.cPointer()) + +} +func (this *QSizeGrip) OnMoveEvent(slot func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) { + C.QSizeGrip_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MoveEvent +func miqt_exec_callback_QSizeGrip_MoveEvent(self *C.QSizeGrip, cb C.intptr_t, moveEvent *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(moveEvent), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ShowEvent(showEvent *QShowEvent) { + + C.QSizeGrip_virtualbase_ShowEvent(unsafe.Pointer(this.h), showEvent.cPointer()) + +} +func (this *QSizeGrip) OnShowEvent(slot func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) { + C.QSizeGrip_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ShowEvent +func miqt_exec_callback_QSizeGrip_ShowEvent(self *C.QSizeGrip, cb C.intptr_t, showEvent *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(showEvent), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_HideEvent(hideEvent *QHideEvent) { + + C.QSizeGrip_virtualbase_HideEvent(unsafe.Pointer(this.h), hideEvent.cPointer()) + +} +func (this *QSizeGrip) OnHideEvent(slot func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) { + C.QSizeGrip_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_HideEvent +func miqt_exec_callback_QSizeGrip_HideEvent(self *C.QSizeGrip, cb C.intptr_t, hideEvent *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(hideEvent), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QSizeGrip_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QSizeGrip) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QSizeGrip_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_EventFilter +func miqt_exec_callback_QSizeGrip_EventFilter(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSizeGrip_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSizeGrip) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSizeGrip_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_Event +func miqt_exec_callback_QSizeGrip_Event(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_DevType() int { + + return (int)(C.QSizeGrip_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSizeGrip) OnDevType(slot func(super func() int) int) { + C.QSizeGrip_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DevType +func miqt_exec_callback_QSizeGrip_DevType(self *C.QSizeGrip, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSizeGrip_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSizeGrip) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSizeGrip_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MinimumSizeHint +func miqt_exec_callback_QSizeGrip_MinimumSizeHint(self *C.QSizeGrip, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSizeGrip_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSizeGrip) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSizeGrip_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_HeightForWidth +func miqt_exec_callback_QSizeGrip_HeightForWidth(self *C.QSizeGrip, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSizeGrip_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSizeGrip) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSizeGrip_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_HasHeightForWidth +func miqt_exec_callback_QSizeGrip_HasHeightForWidth(self *C.QSizeGrip, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QSizeGrip_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSizeGrip) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QSizeGrip_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_PaintEngine +func miqt_exec_callback_QSizeGrip_PaintEngine(self *C.QSizeGrip, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QSizeGrip_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSizeGrip_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent +func miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSizeGrip_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSizeGrip_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_WheelEvent +func miqt_exec_callback_QSizeGrip_WheelEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSizeGrip_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSizeGrip_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_KeyPressEvent +func miqt_exec_callback_QSizeGrip_KeyPressEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSizeGrip_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSizeGrip_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_KeyReleaseEvent +func miqt_exec_callback_QSizeGrip_KeyReleaseEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSizeGrip_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSizeGrip_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_FocusInEvent +func miqt_exec_callback_QSizeGrip_FocusInEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSizeGrip_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSizeGrip_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_FocusOutEvent +func miqt_exec_callback_QSizeGrip_FocusOutEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_EnterEvent(event *QEvent) { + + C.QSizeGrip_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSizeGrip_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_EnterEvent +func miqt_exec_callback_QSizeGrip_EnterEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QSizeGrip_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSizeGrip_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_LeaveEvent +func miqt_exec_callback_QSizeGrip_LeaveEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QSizeGrip_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QSizeGrip_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ResizeEvent +func miqt_exec_callback_QSizeGrip_ResizeEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSizeGrip_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSizeGrip_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_CloseEvent +func miqt_exec_callback_QSizeGrip_CloseEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSizeGrip_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSizeGrip_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ContextMenuEvent +func miqt_exec_callback_QSizeGrip_ContextMenuEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QSizeGrip_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QSizeGrip_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_TabletEvent +func miqt_exec_callback_QSizeGrip_TabletEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QSizeGrip_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QSizeGrip_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ActionEvent +func miqt_exec_callback_QSizeGrip_ActionEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QSizeGrip_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QSizeGrip_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DragEnterEvent +func miqt_exec_callback_QSizeGrip_DragEnterEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QSizeGrip_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QSizeGrip_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DragMoveEvent +func miqt_exec_callback_QSizeGrip_DragMoveEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QSizeGrip_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QSizeGrip_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DragLeaveEvent +func miqt_exec_callback_QSizeGrip_DragLeaveEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QSizeGrip_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QSizeGrip_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DropEvent +func miqt_exec_callback_QSizeGrip_DropEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QSizeGrip_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QSizeGrip) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QSizeGrip_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_NativeEvent +func miqt_exec_callback_QSizeGrip_NativeEvent(self *C.QSizeGrip, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSizeGrip_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSizeGrip_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ChangeEvent +func miqt_exec_callback_QSizeGrip_ChangeEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSizeGrip_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSizeGrip) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QSizeGrip_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_Metric +func miqt_exec_callback_QSizeGrip_Metric(self *C.QSizeGrip, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_InitPainter(painter *QPainter) { + + C.QSizeGrip_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSizeGrip) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSizeGrip_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_InitPainter +func miqt_exec_callback_QSizeGrip_InitPainter(self *C.QSizeGrip, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QSizeGrip_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QSizeGrip) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QSizeGrip_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_Redirected +func miqt_exec_callback_QSizeGrip_Redirected(self *C.QSizeGrip, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QSizeGrip_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSizeGrip) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QSizeGrip_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_SharedPainter +func miqt_exec_callback_QSizeGrip_SharedPainter(self *C.QSizeGrip, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QSizeGrip_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QSizeGrip_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_InputMethodEvent +func miqt_exec_callback_QSizeGrip_InputMethodEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSizeGrip_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSizeGrip) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSizeGrip_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_InputMethodQuery +func miqt_exec_callback_QSizeGrip_InputMethodQuery(self *C.QSizeGrip, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSizeGrip_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSizeGrip) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSizeGrip_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_FocusNextPrevChild +func miqt_exec_callback_QSizeGrip_FocusNextPrevChild(self *C.QSizeGrip, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSizeGrip) Delete() { - C.QSizeGrip_Delete(this.h) + C.QSizeGrip_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsizegrip.h b/qt/gen_qsizegrip.h index 4c1d7648..fc913605 100644 --- a/qt/gen_qsizegrip.h +++ b/qt/gen_qsizegrip.h @@ -15,29 +15,174 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QSizeGrip; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QSizeGrip QSizeGrip; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSizeGrip* QSizeGrip_new(QWidget* parent); +void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self); void* QSizeGrip_Metacast(QSizeGrip* self, const char* param1); struct miqt_string QSizeGrip_Tr(const char* s); struct miqt_string QSizeGrip_TrUtf8(const char* s); QSize* QSizeGrip_SizeHint(const QSizeGrip* self); void QSizeGrip_SetVisible(QSizeGrip* self, bool visible); +void QSizeGrip_PaintEvent(QSizeGrip* self, QPaintEvent* param1); +void QSizeGrip_MousePressEvent(QSizeGrip* self, QMouseEvent* param1); +void QSizeGrip_MouseMoveEvent(QSizeGrip* self, QMouseEvent* param1); +void QSizeGrip_MouseReleaseEvent(QSizeGrip* self, QMouseEvent* mouseEvent); +void QSizeGrip_MoveEvent(QSizeGrip* self, QMoveEvent* moveEvent); +void QSizeGrip_ShowEvent(QSizeGrip* self, QShowEvent* showEvent); +void QSizeGrip_HideEvent(QSizeGrip* self, QHideEvent* hideEvent); +bool QSizeGrip_EventFilter(QSizeGrip* self, QObject* param1, QEvent* param2); +bool QSizeGrip_Event(QSizeGrip* self, QEvent* param1); struct miqt_string QSizeGrip_Tr2(const char* s, const char* c); struct miqt_string QSizeGrip_Tr3(const char* s, const char* c, int n); struct miqt_string QSizeGrip_TrUtf82(const char* s, const char* c); struct miqt_string QSizeGrip_TrUtf83(const char* s, const char* c, int n); -void QSizeGrip_Delete(QSizeGrip* self); +void QSizeGrip_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSizeGrip_virtualbase_SizeHint(const void* self); +void QSizeGrip_override_virtual_SetVisible(void* self, intptr_t slot); +void QSizeGrip_virtualbase_SetVisible(void* self, bool visible); +void QSizeGrip_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QSizeGrip_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QSizeGrip_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QSizeGrip_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent); +void QSizeGrip_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent); +void QSizeGrip_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ShowEvent(void* self, QShowEvent* showEvent); +void QSizeGrip_override_virtual_HideEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_HideEvent(void* self, QHideEvent* hideEvent); +void QSizeGrip_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QSizeGrip_override_virtual_Event(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_Event(void* self, QEvent* param1); +void QSizeGrip_override_virtual_DevType(void* self, intptr_t slot); +int QSizeGrip_virtualbase_DevType(const void* self); +void QSizeGrip_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSizeGrip_virtualbase_MinimumSizeHint(const void* self); +void QSizeGrip_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSizeGrip_virtualbase_HeightForWidth(const void* self, int param1); +void QSizeGrip_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_HasHeightForWidth(const void* self); +void QSizeGrip_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSizeGrip_virtualbase_PaintEngine(const void* self); +void QSizeGrip_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSizeGrip_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSizeGrip_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSizeGrip_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSizeGrip_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSizeGrip_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSizeGrip_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_EnterEvent(void* self, QEvent* event); +void QSizeGrip_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSizeGrip_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSizeGrip_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSizeGrip_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSizeGrip_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSizeGrip_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSizeGrip_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSizeGrip_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSizeGrip_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSizeGrip_override_virtual_DropEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSizeGrip_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QSizeGrip_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSizeGrip_override_virtual_Metric(void* self, intptr_t slot); +int QSizeGrip_virtualbase_Metric(const void* self, int param1); +void QSizeGrip_override_virtual_InitPainter(void* self, intptr_t slot); +void QSizeGrip_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSizeGrip_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSizeGrip_virtualbase_Redirected(const void* self, QPoint* offset); +void QSizeGrip_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSizeGrip_virtualbase_SharedPainter(const void* self); +void QSizeGrip_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSizeGrip_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSizeGrip_virtualbase_InputMethodQuery(const void* self, int param1); +void QSizeGrip_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSizeGrip_Delete(QSizeGrip* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsizepolicy.cpp b/qt/gen_qsizepolicy.cpp index b332a145..8ada3a9d 100644 --- a/qt/gen_qsizepolicy.cpp +++ b/qt/gen_qsizepolicy.cpp @@ -3,20 +3,24 @@ #include "gen_qsizepolicy.h" #include "_cgo_export.h" -QSizePolicy* QSizePolicy_new() { - return new QSizePolicy(); +void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(); + *outptr_QSizePolicy = ret; } -QSizePolicy* QSizePolicy_new2(int horizontal, int vertical) { - return new QSizePolicy(static_cast(horizontal), static_cast(vertical)); +void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical)); + *outptr_QSizePolicy = ret; } -QSizePolicy* QSizePolicy_new3(QSizePolicy* param1) { - return new QSizePolicy(*param1); +void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(*param1); + *outptr_QSizePolicy = ret; } -QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal) { - return new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); +void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); + *outptr_QSizePolicy = ret; } int QSizePolicy_HorizontalPolicy(const QSizePolicy* self) { @@ -107,7 +111,11 @@ QSizePolicy* QSizePolicy_Transposed(const QSizePolicy* self) { return new QSizePolicy(self->transposed()); } -void QSizePolicy_Delete(QSizePolicy* self) { - delete self; +void QSizePolicy_Delete(QSizePolicy* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsizepolicy.go b/qt/gen_qsizepolicy.go index 433b7f24..240b3a06 100644 --- a/qt/gen_qsizepolicy.go +++ b/qt/gen_qsizepolicy.go @@ -55,7 +55,8 @@ const ( ) type QSizePolicy struct { - h *C.QSizePolicy + h *C.QSizePolicy + isSubclass bool } func (this *QSizePolicy) cPointer() *C.QSizePolicy { @@ -72,6 +73,7 @@ func (this *QSizePolicy) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSizePolicy constructs the type using only CGO pointers. func newQSizePolicy(h *C.QSizePolicy) *QSizePolicy { if h == nil { return nil @@ -79,32 +81,53 @@ func newQSizePolicy(h *C.QSizePolicy) *QSizePolicy { return &QSizePolicy{h: h} } +// UnsafeNewQSizePolicy constructs the type using only unsafe pointers. func UnsafeNewQSizePolicy(h unsafe.Pointer) *QSizePolicy { - return newQSizePolicy((*C.QSizePolicy)(h)) + if h == nil { + return nil + } + + return &QSizePolicy{h: (*C.QSizePolicy)(h)} } // NewQSizePolicy constructs a new QSizePolicy object. func NewQSizePolicy() *QSizePolicy { - ret := C.QSizePolicy_new() - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new(&outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } // NewQSizePolicy2 constructs a new QSizePolicy object. func NewQSizePolicy2(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy) *QSizePolicy { - ret := C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical)) - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical), &outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } // NewQSizePolicy3 constructs a new QSizePolicy object. func NewQSizePolicy3(param1 *QSizePolicy) *QSizePolicy { - ret := C.QSizePolicy_new3(param1.cPointer()) - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new3(param1.cPointer(), &outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } // NewQSizePolicy4 constructs a new QSizePolicy object. func NewQSizePolicy4(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy, typeVal QSizePolicy__ControlType) *QSizePolicy { - ret := C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal)) - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal), &outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } func (this *QSizePolicy) HorizontalPolicy() QSizePolicy__Policy { @@ -196,7 +219,7 @@ func (this *QSizePolicy) Transposed() *QSizePolicy { // Delete this object from C++ memory. func (this *QSizePolicy) Delete() { - C.QSizePolicy_Delete(this.h) + C.QSizePolicy_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsizepolicy.h b/qt/gen_qsizepolicy.h index 1fa77f89..e19b97f6 100644 --- a/qt/gen_qsizepolicy.h +++ b/qt/gen_qsizepolicy.h @@ -20,10 +20,10 @@ class QSizePolicy; typedef struct QSizePolicy QSizePolicy; #endif -QSizePolicy* QSizePolicy_new(); -QSizePolicy* QSizePolicy_new2(int horizontal, int vertical); -QSizePolicy* QSizePolicy_new3(QSizePolicy* param1); -QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal); +void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy); +void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy); +void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy); +void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy); int QSizePolicy_HorizontalPolicy(const QSizePolicy* self); int QSizePolicy_VerticalPolicy(const QSizePolicy* self); int QSizePolicy_ControlType(const QSizePolicy* self); @@ -45,7 +45,7 @@ bool QSizePolicy_RetainSizeWhenHidden(const QSizePolicy* self); void QSizePolicy_SetRetainSizeWhenHidden(QSizePolicy* self, bool retainSize); void QSizePolicy_Transpose(QSizePolicy* self); QSizePolicy* QSizePolicy_Transposed(const QSizePolicy* self); -void QSizePolicy_Delete(QSizePolicy* self); +void QSizePolicy_Delete(QSizePolicy* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qslider.cpp b/qt/gen_qslider.cpp index 83907070..608817dd 100644 --- a/qt/gen_qslider.cpp +++ b/qt/gen_qslider.cpp @@ -1,29 +1,353 @@ +#include #include +#include #include +#include +#include +#include +#include #include #include #include #include #include +#include +#include #include #include #include "gen_qslider.h" #include "_cgo_export.h" -QSlider* QSlider_new(QWidget* parent) { - return new QSlider(parent); +class MiqtVirtualQSlider : public virtual QSlider { +public: + + MiqtVirtualQSlider(QWidget* parent): QSlider(parent) {}; + MiqtVirtualQSlider(): QSlider() {}; + MiqtVirtualQSlider(Qt::Orientation orientation): QSlider(orientation) {}; + MiqtVirtualQSlider(Qt::Orientation orientation, QWidget* parent): QSlider(orientation, parent) {}; + + virtual ~MiqtVirtualQSlider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSlider::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSlider_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSlider::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSlider::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSlider_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSlider::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSlider::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSlider_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSlider::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* ev) override { + if (handle__PaintEvent == 0) { + QSlider::paintEvent(ev); + return; + } + + QPaintEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* ev) { + + QSlider::paintEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* ev) override { + if (handle__MousePressEvent == 0) { + QSlider::mousePressEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* ev) { + + QSlider::mousePressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* ev) override { + if (handle__MouseReleaseEvent == 0) { + QSlider::mouseReleaseEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* ev) { + + QSlider::mouseReleaseEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* ev) override { + if (handle__MouseMoveEvent == 0) { + QSlider::mouseMoveEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* ev) { + + QSlider::mouseMoveEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QSlider::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QSlider_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QSlider::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QSlider::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QSlider::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QSlider::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QSlider_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QSlider::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QSlider::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QSlider_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QSlider::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QSlider::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QSlider_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QSlider::changeEvent(e); + + } + +}; + +void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(parent); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSlider* QSlider_new2() { - return new QSlider(); +void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSlider* QSlider_new3(int orientation) { - return new QSlider(static_cast(orientation)); +void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation)); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSlider* QSlider_new4(int orientation, QWidget* parent) { - return new QSlider(static_cast(orientation), parent); +void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation), parent); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSlider_MetaObject(const QSlider* self) { @@ -129,7 +453,107 @@ struct miqt_string QSlider_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSlider_Delete(QSlider* self) { - delete self; +void QSlider_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__SizeHint = slot; +} + +QSize* QSlider_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSlider*)(self) )->virtualbase_SizeHint(); +} + +void QSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSlider_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSlider*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSlider_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__Event = slot; +} + +bool QSlider_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSlider*)(self) )->virtualbase_Event(event); +} + +void QSlider_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__PaintEvent = slot; +} + +void QSlider_virtualbase_PaintEvent(void* self, QPaintEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_PaintEvent(ev); +} + +void QSlider_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MousePressEvent = slot; +} + +void QSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_MousePressEvent(ev); +} + +void QSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_MouseReleaseEvent(ev); +} + +void QSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_MouseMoveEvent(ev); +} + +void QSlider_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__SliderChange = slot; +} + +void QSlider_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_SliderChange(change); +} + +void QSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__KeyPressEvent = slot; +} + +void QSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QSlider_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__TimerEvent = slot; +} + +void QSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_TimerEvent(param1); +} + +void QSlider_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__WheelEvent = slot; +} + +void QSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_WheelEvent(e); +} + +void QSlider_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__ChangeEvent = slot; +} + +void QSlider_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_ChangeEvent(e); +} + +void QSlider_Delete(QSlider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qslider.go b/qt/gen_qslider.go index 4f8f69fc..697acd02 100644 --- a/qt/gen_qslider.go +++ b/qt/gen_qslider.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -25,7 +26,8 @@ const ( ) type QSlider struct { - h *C.QSlider + h *C.QSlider + isSubclass bool *QAbstractSlider } @@ -43,39 +45,79 @@ func (this *QSlider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSlider(h *C.QSlider) *QSlider { +// newQSlider constructs the type using only CGO pointers. +func newQSlider(h *C.QSlider, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSlider { if h == nil { return nil } - return &QSlider{h: h, QAbstractSlider: UnsafeNewQAbstractSlider(unsafe.Pointer(h))} + return &QSlider{h: h, + QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSlider(h unsafe.Pointer) *QSlider { - return newQSlider((*C.QSlider)(h)) +// UnsafeNewQSlider constructs the type using only unsafe pointers. +func UnsafeNewQSlider(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSlider { + if h == nil { + return nil + } + + return &QSlider{h: (*C.QSlider)(h), + QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSlider constructs a new QSlider object. func NewQSlider(parent *QWidget) *QSlider { - ret := C.QSlider_new(parent.cPointer()) - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new(parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSlider2 constructs a new QSlider object. func NewQSlider2() *QSlider { - ret := C.QSlider_new2() - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new2(&outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSlider3 constructs a new QSlider object. func NewQSlider3(orientation Orientation) *QSlider { - ret := C.QSlider_new3((C.int)(orientation)) - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new3((C.int)(orientation), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSlider4 constructs a new QSlider object. func NewQSlider4(orientation Orientation, parent *QWidget) *QSlider { - ret := C.QSlider_new4((C.int)(orientation), parent.cPointer()) - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new4((C.int)(orientation), parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSlider) MetaObject() *QMetaObject { @@ -184,9 +226,291 @@ func QSlider_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSlider) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSlider_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSlider) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSlider_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_SizeHint +func miqt_exec_callback_QSlider_SizeHint(self *C.QSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSlider{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSlider) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSlider_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSlider) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSlider_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MinimumSizeHint +func miqt_exec_callback_QSlider_MinimumSizeHint(self *C.QSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSlider{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSlider) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSlider_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSlider) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSlider_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_Event +func miqt_exec_callback_QSlider_Event(self *C.QSlider, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSlider{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSlider) callVirtualBase_PaintEvent(ev *QPaintEvent) { + + C.QSlider_virtualbase_PaintEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnPaintEvent(slot func(super func(ev *QPaintEvent), ev *QPaintEvent)) { + C.QSlider_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_PaintEvent +func miqt_exec_callback_QSlider_PaintEvent(self *C.QSlider, cb C.intptr_t, ev *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QPaintEvent), ev *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(ev), nil) + + gofunc((&QSlider{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_MousePressEvent(ev *QMouseEvent) { + + C.QSlider_virtualbase_MousePressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnMousePressEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QSlider_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MousePressEvent +func miqt_exec_callback_QSlider_MousePressEvent(self *C.QSlider, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_MouseReleaseEvent(ev *QMouseEvent) { + + C.QSlider_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnMouseReleaseEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QSlider_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MouseReleaseEvent +func miqt_exec_callback_QSlider_MouseReleaseEvent(self *C.QSlider, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_MouseMoveEvent(ev *QMouseEvent) { + + C.QSlider_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnMouseMoveEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QSlider_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MouseMoveEvent +func miqt_exec_callback_QSlider_MouseMoveEvent(self *C.QSlider, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QSlider_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QSlider) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QSlider_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_SliderChange +func miqt_exec_callback_QSlider_SliderChange(self *C.QSlider, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QSlider{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QSlider) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QSlider_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QSlider_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_KeyPressEvent +func miqt_exec_callback_QSlider_KeyPressEvent(self *C.QSlider, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QSlider_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSlider) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QSlider_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_TimerEvent +func miqt_exec_callback_QSlider_TimerEvent(self *C.QSlider, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSlider{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QSlider_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QSlider) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QSlider_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_WheelEvent +func miqt_exec_callback_QSlider_WheelEvent(self *C.QSlider, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QSlider_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QSlider) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QSlider_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_ChangeEvent +func miqt_exec_callback_QSlider_ChangeEvent(self *C.QSlider, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QSlider{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QSlider) Delete() { - C.QSlider_Delete(this.h) + C.QSlider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qslider.h b/qt/gen_qslider.h index 5721ba6f..665ae644 100644 --- a/qt/gen_qslider.h +++ b/qt/gen_qslider.h @@ -15,23 +15,39 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSlider; class QEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QSize; class QSlider; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSlider QAbstractSlider; typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QSize QSize; typedef struct QSlider QSlider; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSlider* QSlider_new(QWidget* parent); -QSlider* QSlider_new2(); -QSlider* QSlider_new3(int orientation); -QSlider* QSlider_new4(int orientation, QWidget* parent); +void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSlider_MetaObject(const QSlider* self); void* QSlider_Metacast(QSlider* self, const char* param1); struct miqt_string QSlider_Tr(const char* s); @@ -43,11 +59,39 @@ int QSlider_TickPosition(const QSlider* self); void QSlider_SetTickInterval(QSlider* self, int ti); int QSlider_TickInterval(const QSlider* self); bool QSlider_Event(QSlider* self, QEvent* event); +void QSlider_PaintEvent(QSlider* self, QPaintEvent* ev); +void QSlider_MousePressEvent(QSlider* self, QMouseEvent* ev); +void QSlider_MouseReleaseEvent(QSlider* self, QMouseEvent* ev); +void QSlider_MouseMoveEvent(QSlider* self, QMouseEvent* ev); struct miqt_string QSlider_Tr2(const char* s, const char* c); struct miqt_string QSlider_Tr3(const char* s, const char* c, int n); struct miqt_string QSlider_TrUtf82(const char* s, const char* c); struct miqt_string QSlider_TrUtf83(const char* s, const char* c, int n); -void QSlider_Delete(QSlider* self); +void QSlider_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSlider_virtualbase_SizeHint(const void* self); +void QSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSlider_virtualbase_MinimumSizeHint(const void* self); +void QSlider_override_virtual_Event(void* self, intptr_t slot); +bool QSlider_virtualbase_Event(void* self, QEvent* event); +void QSlider_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSlider_virtualbase_PaintEvent(void* self, QPaintEvent* ev); +void QSlider_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* ev); +void QSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev); +void QSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev); +void QSlider_override_virtual_SliderChange(void* self, intptr_t slot); +void QSlider_virtualbase_SliderChange(void* self, int change); +void QSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QSlider_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QSlider_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QSlider_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSlider_virtualbase_ChangeEvent(void* self, QEvent* e); +void QSlider_Delete(QSlider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsocketnotifier.cpp b/qt/gen_qsocketnotifier.cpp index 88029c0f..25bbbc9f 100644 --- a/qt/gen_qsocketnotifier.cpp +++ b/qt/gen_qsocketnotifier.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -5,16 +8,202 @@ #include #include #include +#include #include #include "gen_qsocketnotifier.h" #include "_cgo_export.h" -QSocketNotifier* QSocketNotifier_new(intptr_t socket, int param2) { - return new QSocketNotifier((qintptr)(socket), static_cast(param2)); +class MiqtVirtualQSocketNotifier : public virtual QSocketNotifier { +public: + + MiqtVirtualQSocketNotifier(qintptr socket, QSocketNotifier::Type param2): QSocketNotifier(socket, param2) {}; + MiqtVirtualQSocketNotifier(qintptr socket, QSocketNotifier::Type param2, QObject* parent): QSocketNotifier(socket, param2, parent) {}; + + virtual ~MiqtVirtualQSocketNotifier() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSocketNotifier::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSocketNotifier_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSocketNotifier::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSocketNotifier::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSocketNotifier_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSocketNotifier::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSocketNotifier::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSocketNotifier_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSocketNotifier::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSocketNotifier::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSocketNotifier_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSocketNotifier::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSocketNotifier::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSocketNotifier_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSocketNotifier::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSocketNotifier::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSocketNotifier_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSocketNotifier::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSocketNotifier::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSocketNotifier_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSocketNotifier::disconnectNotify(*signal); + + } + +}; + +void QSocketNotifier_new(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { + MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2)); + *outptr_QSocketNotifier = ret; + *outptr_QObject = static_cast(ret); } -QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent) { - return new QSocketNotifier((qintptr)(socket), static_cast(param2), parent); +void QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { + MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2), parent); + *outptr_QSocketNotifier = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self) { @@ -109,31 +298,97 @@ struct miqt_string QSocketNotifier_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QSocketNotifier_Delete(QSocketNotifier* self) { - delete self; +void QSocketNotifier_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__Event = slot; +} + +bool QSocketNotifier_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_Event(param1); +} + +void QSocketNotifier_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__EventFilter = slot; +} + +bool QSocketNotifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSocketNotifier_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__TimerEvent = slot; +} + +void QSocketNotifier_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_TimerEvent(event); +} + +void QSocketNotifier_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__ChildEvent = slot; +} + +void QSocketNotifier_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_ChildEvent(event); +} + +void QSocketNotifier_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__CustomEvent = slot; +} + +void QSocketNotifier_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_CustomEvent(event); +} + +void QSocketNotifier_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__ConnectNotify = slot; +} + +void QSocketNotifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSocketNotifier_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__DisconnectNotify = slot; +} + +void QSocketNotifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSocketDescriptor* QSocketDescriptor_new() { - return new QSocketDescriptor(); +void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor) { + QSocketDescriptor* ret = new QSocketDescriptor(); + *outptr_QSocketDescriptor = ret; } -QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1) { - return new QSocketDescriptor(*param1); +void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor) { + QSocketDescriptor* ret = new QSocketDescriptor(*param1); + *outptr_QSocketDescriptor = ret; } -QSocketDescriptor* QSocketDescriptor_new3(int descriptor) { -#ifdef Q_OS_LINUX - return new QSocketDescriptor(static_cast(descriptor)); -#else - return nullptr; +void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) { +#ifndef Q_OS_LINUX + return; #endif + QSocketDescriptor* ret = new QSocketDescriptor(static_cast(descriptor)); + *outptr_QSocketDescriptor = ret; } bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) { return self->isValid(); } -void QSocketDescriptor_Delete(QSocketDescriptor* self) { - delete self; +void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsocketnotifier.go b/qt/gen_qsocketnotifier.go index e85fa45d..794a2ac7 100644 --- a/qt/gen_qsocketnotifier.go +++ b/qt/gen_qsocketnotifier.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -22,7 +23,8 @@ const ( ) type QSocketNotifier struct { - h *C.QSocketNotifier + h *C.QSocketNotifier + isSubclass bool *QObject } @@ -40,27 +42,45 @@ func (this *QSocketNotifier) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSocketNotifier(h *C.QSocketNotifier) *QSocketNotifier { +// newQSocketNotifier constructs the type using only CGO pointers. +func newQSocketNotifier(h *C.QSocketNotifier, h_QObject *C.QObject) *QSocketNotifier { if h == nil { return nil } - return &QSocketNotifier{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSocketNotifier{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSocketNotifier(h unsafe.Pointer) *QSocketNotifier { - return newQSocketNotifier((*C.QSocketNotifier)(h)) +// UnsafeNewQSocketNotifier constructs the type using only unsafe pointers. +func UnsafeNewQSocketNotifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSocketNotifier { + if h == nil { + return nil + } + + return &QSocketNotifier{h: (*C.QSocketNotifier)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSocketNotifier constructs a new QSocketNotifier object. func NewQSocketNotifier(socket uintptr, param2 QSocketNotifier__Type) *QSocketNotifier { - ret := C.QSocketNotifier_new((C.intptr_t)(socket), (C.int)(param2)) - return newQSocketNotifier(ret) + var outptr_QSocketNotifier *C.QSocketNotifier = nil + var outptr_QObject *C.QObject = nil + + C.QSocketNotifier_new((C.intptr_t)(socket), (C.int)(param2), &outptr_QSocketNotifier, &outptr_QObject) + ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSocketNotifier2 constructs a new QSocketNotifier object. func NewQSocketNotifier2(socket uintptr, param2 QSocketNotifier__Type, parent *QObject) *QSocketNotifier { - ret := C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), parent.cPointer()) - return newQSocketNotifier(ret) + var outptr_QSocketNotifier *C.QSocketNotifier = nil + var outptr_QObject *C.QObject = nil + + C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), parent.cPointer(), &outptr_QSocketNotifier, &outptr_QObject) + ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSocketNotifier) MetaObject() *QMetaObject { @@ -151,9 +171,175 @@ func QSocketNotifier_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSocketNotifier) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSocketNotifier_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSocketNotifier) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSocketNotifier_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_Event +func miqt_exec_callback_QSocketNotifier_Event(self *C.QSocketNotifier, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSocketNotifier{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSocketNotifier) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSocketNotifier_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSocketNotifier) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSocketNotifier_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_EventFilter +func miqt_exec_callback_QSocketNotifier_EventFilter(self *C.QSocketNotifier, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSocketNotifier{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSocketNotifier) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSocketNotifier_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSocketNotifier) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSocketNotifier_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_TimerEvent +func miqt_exec_callback_QSocketNotifier_TimerEvent(self *C.QSocketNotifier, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSocketNotifier_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSocketNotifier) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSocketNotifier_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_ChildEvent +func miqt_exec_callback_QSocketNotifier_ChildEvent(self *C.QSocketNotifier, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSocketNotifier_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSocketNotifier) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSocketNotifier_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_CustomEvent +func miqt_exec_callback_QSocketNotifier_CustomEvent(self *C.QSocketNotifier, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSocketNotifier_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSocketNotifier) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSocketNotifier_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_ConnectNotify +func miqt_exec_callback_QSocketNotifier_ConnectNotify(self *C.QSocketNotifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSocketNotifier_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSocketNotifier) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSocketNotifier_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_DisconnectNotify +func miqt_exec_callback_QSocketNotifier_DisconnectNotify(self *C.QSocketNotifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSocketNotifier) Delete() { - C.QSocketNotifier_Delete(this.h) + C.QSocketNotifier_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -166,7 +352,8 @@ func (this *QSocketNotifier) GoGC() { } type QSocketDescriptor struct { - h *C.QSocketDescriptor + h *C.QSocketDescriptor + isSubclass bool } func (this *QSocketDescriptor) cPointer() *C.QSocketDescriptor { @@ -183,6 +370,7 @@ func (this *QSocketDescriptor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSocketDescriptor constructs the type using only CGO pointers. func newQSocketDescriptor(h *C.QSocketDescriptor) *QSocketDescriptor { if h == nil { return nil @@ -190,30 +378,47 @@ func newQSocketDescriptor(h *C.QSocketDescriptor) *QSocketDescriptor { return &QSocketDescriptor{h: h} } +// UnsafeNewQSocketDescriptor constructs the type using only unsafe pointers. func UnsafeNewQSocketDescriptor(h unsafe.Pointer) *QSocketDescriptor { - return newQSocketDescriptor((*C.QSocketDescriptor)(h)) + if h == nil { + return nil + } + + return &QSocketDescriptor{h: (*C.QSocketDescriptor)(h)} } // NewQSocketDescriptor constructs a new QSocketDescriptor object. func NewQSocketDescriptor() *QSocketDescriptor { - ret := C.QSocketDescriptor_new() - return newQSocketDescriptor(ret) + var outptr_QSocketDescriptor *C.QSocketDescriptor = nil + + C.QSocketDescriptor_new(&outptr_QSocketDescriptor) + ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret.isSubclass = true + return ret } // NewQSocketDescriptor2 constructs a new QSocketDescriptor object. func NewQSocketDescriptor2(param1 *QSocketDescriptor) *QSocketDescriptor { - ret := C.QSocketDescriptor_new2(param1.cPointer()) - return newQSocketDescriptor(ret) + var outptr_QSocketDescriptor *C.QSocketDescriptor = nil + + C.QSocketDescriptor_new2(param1.cPointer(), &outptr_QSocketDescriptor) + ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret.isSubclass = true + return ret } // NewQSocketDescriptor3 constructs a new QSocketDescriptor object. func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor { - if runtime.GOOS == "linux" { - ret := C.QSocketDescriptor_new3((C.int)(descriptor)) - return newQSocketDescriptor(ret) - } else { + + if runtime.GOOS != "linux" { panic("Unsupported OS") } + var outptr_QSocketDescriptor *C.QSocketDescriptor = nil + + C.QSocketDescriptor_new3((C.int)(descriptor), &outptr_QSocketDescriptor) + ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret.isSubclass = true + return ret } func (this *QSocketDescriptor) IsValid() bool { @@ -222,7 +427,7 @@ func (this *QSocketDescriptor) IsValid() bool { // Delete this object from C++ memory. func (this *QSocketDescriptor) Delete() { - C.QSocketDescriptor_Delete(this.h) + C.QSocketDescriptor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsocketnotifier.h b/qt/gen_qsocketnotifier.h index 8201847c..2af4938e 100644 --- a/qt/gen_qsocketnotifier.h +++ b/qt/gen_qsocketnotifier.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSocketDescriptor; class QSocketNotifier; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketDescriptor QSocketDescriptor; typedef struct QSocketNotifier QSocketNotifier; +typedef struct QTimerEvent QTimerEvent; #endif -QSocketNotifier* QSocketNotifier_new(intptr_t socket, int param2); -QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent); +void QSocketNotifier_new(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); +void QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self); void* QSocketNotifier_Metacast(QSocketNotifier* self, const char* param1); struct miqt_string QSocketNotifier_Tr(const char* s); @@ -36,17 +44,32 @@ intptr_t QSocketNotifier_Socket(const QSocketNotifier* self); int QSocketNotifier_Type(const QSocketNotifier* self); bool QSocketNotifier_IsEnabled(const QSocketNotifier* self); void QSocketNotifier_SetEnabled(QSocketNotifier* self, bool enabled); +bool QSocketNotifier_Event(QSocketNotifier* self, QEvent* param1); struct miqt_string QSocketNotifier_Tr2(const char* s, const char* c); struct miqt_string QSocketNotifier_Tr3(const char* s, const char* c, int n); struct miqt_string QSocketNotifier_TrUtf82(const char* s, const char* c); struct miqt_string QSocketNotifier_TrUtf83(const char* s, const char* c, int n); -void QSocketNotifier_Delete(QSocketNotifier* self); +void QSocketNotifier_override_virtual_Event(void* self, intptr_t slot); +bool QSocketNotifier_virtualbase_Event(void* self, QEvent* param1); +void QSocketNotifier_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSocketNotifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSocketNotifier_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSocketNotifier_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSocketNotifier_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_CustomEvent(void* self, QEvent* event); +void QSocketNotifier_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSocketNotifier_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass); -QSocketDescriptor* QSocketDescriptor_new(); -QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1); -QSocketDescriptor* QSocketDescriptor_new3(int descriptor); +void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor); +void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor); +void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor); bool QSocketDescriptor_IsValid(const QSocketDescriptor* self); -void QSocketDescriptor_Delete(QSocketDescriptor* self); +void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsortfilterproxymodel.cpp b/qt/gen_qsortfilterproxymodel.cpp index 334532d5..26bbfea9 100644 --- a/qt/gen_qsortfilterproxymodel.cpp +++ b/qt/gen_qsortfilterproxymodel.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -16,12 +18,1081 @@ #include "gen_qsortfilterproxymodel.h" #include "_cgo_export.h" -QSortFilterProxyModel* QSortFilterProxyModel_new() { - return new QSortFilterProxyModel(); +class MiqtVirtualQSortFilterProxyModel : public virtual QSortFilterProxyModel { +public: + + MiqtVirtualQSortFilterProxyModel(): QSortFilterProxyModel() {}; + MiqtVirtualQSortFilterProxyModel(QObject* parent): QSortFilterProxyModel(parent) {}; + + virtual ~MiqtVirtualQSortFilterProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSourceModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSourceModel(QAbstractItemModel* sourceModel) override { + if (handle__SetSourceModel == 0) { + QSortFilterProxyModel::setSourceModel(sourceModel); + return; + } + + QAbstractItemModel* sigval1 = sourceModel; + + miqt_exec_callback_QSortFilterProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* sourceModel) { + + QSortFilterProxyModel::setSourceModel(sourceModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const override { + if (handle__MapToSource == 0) { + return QSortFilterProxyModel::mapToSource(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapToSource(QModelIndex* proxyIndex) const { + + return new QModelIndex(QSortFilterProxyModel::mapToSource(*proxyIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override { + if (handle__MapFromSource == 0) { + return QSortFilterProxyModel::mapFromSource(sourceIndex); + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapFromSource(QModelIndex* sourceIndex) const { + + return new QModelIndex(QSortFilterProxyModel::mapFromSource(*sourceIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FilterAcceptsRow = 0; + + // Subclass to allow providing a Go implementation + virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override { + if (handle__FilterAcceptsRow == 0) { + return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); + } + + int sigval1 = source_row; + const QModelIndex& source_parent_ret = source_parent; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&source_parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsRow(const_cast(this), handle__FilterAcceptsRow, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FilterAcceptsRow(int source_row, QModelIndex* source_parent) const { + + return QSortFilterProxyModel::filterAcceptsRow(static_cast(source_row), *source_parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FilterAcceptsColumn = 0; + + // Subclass to allow providing a Go implementation + virtual bool filterAcceptsColumn(int source_column, const QModelIndex& source_parent) const override { + if (handle__FilterAcceptsColumn == 0) { + return QSortFilterProxyModel::filterAcceptsColumn(source_column, source_parent); + } + + int sigval1 = source_column; + const QModelIndex& source_parent_ret = source_parent; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&source_parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsColumn(const_cast(this), handle__FilterAcceptsColumn, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FilterAcceptsColumn(int source_column, QModelIndex* source_parent) const { + + return QSortFilterProxyModel::filterAcceptsColumn(static_cast(source_column), *source_parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LessThan = 0; + + // Subclass to allow providing a Go implementation + virtual bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override { + if (handle__LessThan == 0) { + return QSortFilterProxyModel::lessThan(source_left, source_right); + } + + const QModelIndex& source_left_ret = source_left; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&source_left_ret); + const QModelIndex& source_right_ret = source_right; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&source_right_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_LessThan(const_cast(this), handle__LessThan, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_LessThan(QModelIndex* source_left, QModelIndex* source_right) const { + + return QSortFilterProxyModel::lessThan(*source_left, *source_right); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QSortFilterProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QSortFilterProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QSortFilterProxyModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QSortFilterProxyModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QSortFilterProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QSortFilterProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QSortFilterProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QSortFilterProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QSortFilterProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QSortFilterProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QSortFilterProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QSortFilterProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QSortFilterProxyModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QSortFilterProxyModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QSortFilterProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QSortFilterProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QSortFilterProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QSortFilterProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QSortFilterProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QSortFilterProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QSortFilterProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QSortFilterProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QSortFilterProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QSortFilterProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QSortFilterProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QSortFilterProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QSortFilterProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QSortFilterProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QSortFilterProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QSortFilterProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QSortFilterProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QSortFilterProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QSortFilterProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QSortFilterProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QSortFilterProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QSortFilterProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QSortFilterProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QSortFilterProxyModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QSortFilterProxyModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QSortFilterProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QSortFilterProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QSortFilterProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QSortFilterProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QSortFilterProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QSortFilterProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QSortFilterProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QSortFilterProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QSortFilterProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QSortFilterProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QSortFilterProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QSortFilterProxyModel::revert(); + return; + } + + + miqt_exec_callback_QSortFilterProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QSortFilterProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QSortFilterProxyModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QSortFilterProxyModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QSortFilterProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QSortFilterProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QSortFilterProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QSortFilterProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QSortFilterProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QSortFilterProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + +}; + +void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(); + *outptr_QSortFilterProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent) { - return new QSortFilterProxyModel(parent); +void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(parent); + *outptr_QSortFilterProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self) { @@ -185,8 +1256,8 @@ void QSortFilterProxyModel_Invalidate(QSortFilterProxyModel* self) { self->invalidate(); } -QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QSortFilterProxyModel_Parent(const QSortFilterProxyModel* self, QModelIndex* child) { @@ -197,32 +1268,32 @@ QModelIndex* QSortFilterProxyModel_Sibling(const QSortFilterProxyModel* self, in return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self) { - return self->rowCount(); +int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self) { - return self->columnCount(); +int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self) { - return self->hasChildren(); +bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } -QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } QMimeData* QSortFilterProxyModel_MimeData(const QSortFilterProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes) { @@ -239,20 +1310,20 @@ bool QSortFilterProxyModel_DropMimeData(QSortFilterProxyModel* self, QMimeData* return self->dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } -bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } -bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } void QSortFilterProxyModel_FetchMore(QSortFilterProxyModel* self, QModelIndex* parent) { @@ -272,8 +1343,8 @@ QModelIndex* QSortFilterProxyModel_Buddy(const QSortFilterProxyModel* self, QMod return new QModelIndex(self->buddy(*index)); } -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value); +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -289,8 +1360,8 @@ QSize* QSortFilterProxyModel_Span(const QSortFilterProxyModel* self, QModelIndex return new QSize(self->span(*index)); } -void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column) { - self->sort(static_cast(column)); +void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_MimeTypes(const QSortFilterProxyModel* self) { @@ -323,7 +1394,7 @@ void QSortFilterProxyModel_DynamicSortFilterChanged(QSortFilterProxyModel* self, } void QSortFilterProxyModel_connect_DynamicSortFilterChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::dynamicSortFilterChanged), self, [=](bool dynamicSortFilter) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::dynamicSortFilterChanged), self, [=](bool dynamicSortFilter) { bool sigval1 = dynamicSortFilter; miqt_exec_callback_QSortFilterProxyModel_DynamicSortFilterChanged(slot, sigval1); }); @@ -334,7 +1405,7 @@ void QSortFilterProxyModel_FilterCaseSensitivityChanged(QSortFilterProxyModel* s } void QSortFilterProxyModel_connect_FilterCaseSensitivityChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterCaseSensitivityChanged), self, [=](Qt::CaseSensitivity filterCaseSensitivity) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterCaseSensitivityChanged), self, [=](Qt::CaseSensitivity filterCaseSensitivity) { Qt::CaseSensitivity filterCaseSensitivity_ret = filterCaseSensitivity; int sigval1 = static_cast(filterCaseSensitivity_ret); miqt_exec_callback_QSortFilterProxyModel_FilterCaseSensitivityChanged(slot, sigval1); @@ -346,7 +1417,7 @@ void QSortFilterProxyModel_SortCaseSensitivityChanged(QSortFilterProxyModel* sel } void QSortFilterProxyModel_connect_SortCaseSensitivityChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortCaseSensitivityChanged), self, [=](Qt::CaseSensitivity sortCaseSensitivity) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortCaseSensitivityChanged), self, [=](Qt::CaseSensitivity sortCaseSensitivity) { Qt::CaseSensitivity sortCaseSensitivity_ret = sortCaseSensitivity; int sigval1 = static_cast(sortCaseSensitivity_ret); miqt_exec_callback_QSortFilterProxyModel_SortCaseSensitivityChanged(slot, sigval1); @@ -358,7 +1429,7 @@ void QSortFilterProxyModel_SortLocaleAwareChanged(QSortFilterProxyModel* self, b } void QSortFilterProxyModel_connect_SortLocaleAwareChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortLocaleAwareChanged), self, [=](bool sortLocaleAware) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortLocaleAwareChanged), self, [=](bool sortLocaleAware) { bool sigval1 = sortLocaleAware; miqt_exec_callback_QSortFilterProxyModel_SortLocaleAwareChanged(slot, sigval1); }); @@ -369,7 +1440,7 @@ void QSortFilterProxyModel_SortRoleChanged(QSortFilterProxyModel* self, int sort } void QSortFilterProxyModel_connect_SortRoleChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortRoleChanged), self, [=](int sortRole) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortRoleChanged), self, [=](int sortRole) { int sigval1 = sortRole; miqt_exec_callback_QSortFilterProxyModel_SortRoleChanged(slot, sigval1); }); @@ -380,7 +1451,7 @@ void QSortFilterProxyModel_FilterRoleChanged(QSortFilterProxyModel* self, int fi } void QSortFilterProxyModel_connect_FilterRoleChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterRoleChanged), self, [=](int filterRole) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterRoleChanged), self, [=](int filterRole) { int sigval1 = filterRole; miqt_exec_callback_QSortFilterProxyModel_FilterRoleChanged(slot, sigval1); }); @@ -391,7 +1462,7 @@ void QSortFilterProxyModel_RecursiveFilteringEnabledChanged(QSortFilterProxyMode } void QSortFilterProxyModel_connect_RecursiveFilteringEnabledChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::recursiveFilteringEnabledChanged), self, [=](bool recursiveFilteringEnabled) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::recursiveFilteringEnabledChanged), self, [=](bool recursiveFilteringEnabled) { bool sigval1 = recursiveFilteringEnabled; miqt_exec_callback_QSortFilterProxyModel_RecursiveFilteringEnabledChanged(slot, sigval1); }); @@ -441,85 +1512,307 @@ struct miqt_string QSortFilterProxyModel_TrUtf83(const char* s, const char* c, i return _ms; } -QModelIndex* QSortFilterProxyModel_Index3(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +void QSortFilterProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetSourceModel = slot; } -int QSortFilterProxyModel_RowCount1(const QSortFilterProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QSortFilterProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetSourceModel(sourceModel); } -int QSortFilterProxyModel_ColumnCount1(const QSortFilterProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QSortFilterProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapToSource = slot; } -bool QSortFilterProxyModel_HasChildren1(const QSortFilterProxyModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); +QModelIndex* QSortFilterProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapToSource(proxyIndex); } -QVariant* QSortFilterProxyModel_Data2(const QSortFilterProxyModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +void QSortFilterProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapFromSource = slot; } -bool QSortFilterProxyModel_SetData3(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +QModelIndex* QSortFilterProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); } -QVariant* QSortFilterProxyModel_HeaderData3(const QSortFilterProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QSortFilterProxyModel_override_virtual_FilterAcceptsRow(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FilterAcceptsRow = slot; } -bool QSortFilterProxyModel_SetHeaderData4(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsRow(const void* self, int source_row, QModelIndex* source_parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_FilterAcceptsRow(source_row, source_parent); } -bool QSortFilterProxyModel_InsertRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +void QSortFilterProxyModel_override_virtual_FilterAcceptsColumn(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FilterAcceptsColumn = slot; } -bool QSortFilterProxyModel_InsertColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsColumn(const void* self, int source_column, QModelIndex* source_parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_FilterAcceptsColumn(source_column, source_parent); } -bool QSortFilterProxyModel_RemoveRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +void QSortFilterProxyModel_override_virtual_LessThan(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__LessThan = slot; } -bool QSortFilterProxyModel_RemoveColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); +bool QSortFilterProxyModel_virtualbase_LessThan(const void* self, QModelIndex* source_left, QModelIndex* source_right) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_LessThan(source_left, source_right); } -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match4(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +void QSortFilterProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Index = slot; } -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match5(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +QModelIndex* QSortFilterProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Index(row, column, parent); } -void QSortFilterProxyModel_Sort2(QSortFilterProxyModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +void QSortFilterProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QSortFilterProxyModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Parent(child); } -void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self) { - delete self; +void QSortFilterProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QSortFilterProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QSortFilterProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RowCount = slot; +} + +int QSortFilterProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RowCount(parent); +} + +void QSortFilterProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__ColumnCount = slot; +} + +int QSortFilterProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QSortFilterProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QSortFilterProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QSortFilterProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QSortFilterProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Data(index, role); +} + +void QSortFilterProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetData = slot; +} + +bool QSortFilterProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QSortFilterProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QSortFilterProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QSortFilterProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QSortFilterProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QSortFilterProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QSortFilterProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QSortFilterProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QSortFilterProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QSortFilterProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QSortFilterProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QSortFilterProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QSortFilterProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QSortFilterProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QSortFilterProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QSortFilterProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QSortFilterProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QSortFilterProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QSortFilterProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QSortFilterProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QSortFilterProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QSortFilterProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Flags = slot; +} + +int QSortFilterProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QSortFilterProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QSortFilterProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QSortFilterProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QSortFilterProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QSortFilterProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Span(index); +} + +void QSortFilterProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Sort = slot; +} + +void QSortFilterProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QSortFilterProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QSortFilterProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QSortFilterProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QSortFilterProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Submit = slot; +} + +bool QSortFilterProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Submit(); +} + +void QSortFilterProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Revert = slot; +} + +void QSortFilterProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Revert(); +} + +void QSortFilterProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QSortFilterProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QSortFilterProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QSortFilterProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QSortFilterProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QSortFilterProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QSortFilterProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QSortFilterProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsortfilterproxymodel.go b/qt/gen_qsortfilterproxymodel.go index 385842f5..d9bfc252 100644 --- a/qt/gen_qsortfilterproxymodel.go +++ b/qt/gen_qsortfilterproxymodel.go @@ -15,7 +15,8 @@ import ( ) type QSortFilterProxyModel struct { - h *C.QSortFilterProxyModel + h *C.QSortFilterProxyModel + isSubclass bool *QAbstractProxyModel } @@ -33,27 +34,49 @@ func (this *QSortFilterProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSortFilterProxyModel(h *C.QSortFilterProxyModel) *QSortFilterProxyModel { +// newQSortFilterProxyModel constructs the type using only CGO pointers. +func newQSortFilterProxyModel(h *C.QSortFilterProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QSortFilterProxyModel { if h == nil { return nil } - return &QSortFilterProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))} + return &QSortFilterProxyModel{h: h, + QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer) *QSortFilterProxyModel { - return newQSortFilterProxyModel((*C.QSortFilterProxyModel)(h)) +// UnsafeNewQSortFilterProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QSortFilterProxyModel { + if h == nil { + return nil + } + + return &QSortFilterProxyModel{h: (*C.QSortFilterProxyModel)(h), + QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } // NewQSortFilterProxyModel constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel() *QSortFilterProxyModel { - ret := C.QSortFilterProxyModel_new() - return newQSortFilterProxyModel(ret) + var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QSortFilterProxyModel_new(&outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSortFilterProxyModel2 constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel2(parent *QObject) *QSortFilterProxyModel { - ret := C.QSortFilterProxyModel_new2(parent.cPointer()) - return newQSortFilterProxyModel(ret) + var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QSortFilterProxyModel_new2(parent.cPointer(), &outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSortFilterProxyModel) MetaObject() *QMetaObject { @@ -236,8 +259,8 @@ func (this *QSortFilterProxyModel) Invalidate() { C.QSortFilterProxyModel_Invalidate(this.h) } -func (this *QSortFilterProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QSortFilterProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QSortFilterProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QSortFilterProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -257,38 +280,38 @@ func (this *QSortFilterProxyModel) Sibling(row int, column int, idx *QModelIndex return _goptr } -func (this *QSortFilterProxyModel) RowCount() int { - return (int)(C.QSortFilterProxyModel_RowCount(this.h)) +func (this *QSortFilterProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QSortFilterProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) ColumnCount() int { - return (int)(C.QSortFilterProxyModel_ColumnCount(this.h)) +func (this *QSortFilterProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QSortFilterProxyModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) HasChildren() bool { - return (bool)(C.QSortFilterProxyModel_HasChildren(this.h)) +func (this *QSortFilterProxyModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_HasChildren(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) Data(index *QModelIndex) *QVariant { - _ret := C.QSortFilterProxyModel_Data(this.h, index.cPointer()) +func (this *QSortFilterProxyModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QSortFilterProxyModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QSortFilterProxyModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QSortFilterProxyModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QSortFilterProxyModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QSortFilterProxyModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QSortFilterProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QSortFilterProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QSortFilterProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QSortFilterProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QSortFilterProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QSortFilterProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QSortFilterProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QSortFilterProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { @@ -298,27 +321,27 @@ func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma)), nil) } func (this *QSortFilterProxyModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { return (bool)(C.QSortFilterProxyModel_DropMimeData(this.h, data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) } -func (this *QSortFilterProxyModel) InsertRows(row int, count int) bool { - return (bool)(C.QSortFilterProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QSortFilterProxyModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) InsertColumns(column int, count int) bool { - return (bool)(C.QSortFilterProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QSortFilterProxyModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) RemoveRows(row int, count int) bool { - return (bool)(C.QSortFilterProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QSortFilterProxyModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QSortFilterProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QSortFilterProxyModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QSortFilterProxyModel) FetchMore(parent *QModelIndex) { @@ -340,8 +363,8 @@ func (this *QSortFilterProxyModel) Buddy(index *QModelIndex) *QModelIndex { return _goptr } -func (this *QSortFilterProxyModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex { - var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer()) +func (this *QSortFilterProxyModel) Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -360,8 +383,8 @@ func (this *QSortFilterProxyModel) Span(index *QModelIndex) *QSize { return _goptr } -func (this *QSortFilterProxyModel) Sort(column int) { - C.QSortFilterProxyModel_Sort(this.h, (C.int)(column)) +func (this *QSortFilterProxyModel) Sort(column int, order SortOrder) { + C.QSortFilterProxyModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QSortFilterProxyModel) MimeTypes() []string { @@ -565,96 +588,1108 @@ func QSortFilterProxyModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QSortFilterProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QSortFilterProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QSortFilterProxyModel) callVirtualBase_SetSourceModel(sourceModel *QAbstractItemModel) { + + C.QSortFilterProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), sourceModel.cPointer()) + +} +func (this *QSortFilterProxyModel) OnSetSourceModel(slot func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) { + C.QSortFilterProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetSourceModel +func miqt_exec_callback_QSortFilterProxyModel_SetSourceModel(self *C.QSortFilterProxyModel, cb C.intptr_t, sourceModel *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(sourceModel), nil) + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MapToSource(proxyIndex *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_MapToSource(unsafe.Pointer(this.h), proxyIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnMapToSource(slot func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapToSource +func miqt_exec_callback_QSortFilterProxyModel_MapToSource(self *C.QSortFilterProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MapFromSource(sourceIndex *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_MapFromSource(unsafe.Pointer(this.h), sourceIndex.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QSortFilterProxyModel) OnMapFromSource(slot func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapFromSource +func miqt_exec_callback_QSortFilterProxyModel_MapFromSource(self *C.QSortFilterProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceIndex)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapFromSource, slotval1) + + return virtualReturn.cPointer() -func (this *QSortFilterProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QSortFilterProxyModel_RowCount1(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QSortFilterProxyModel_ColumnCount1(this.h, parent.cPointer())) +func (this *QSortFilterProxyModel) callVirtualBase_FilterAcceptsRow(source_row int, source_parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_FilterAcceptsRow(unsafe.Pointer(this.h), (C.int)(source_row), source_parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnFilterAcceptsRow(slot func(super func(source_row int, source_parent *QModelIndex) bool, source_row int, source_parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_FilterAcceptsRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSortFilterProxyModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_HasChildren1(this.h, parent.cPointer())) +//export miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsRow +func miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsRow(self *C.QSortFilterProxyModel, cb C.intptr_t, source_row C.int, source_parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source_row int, source_parent *QModelIndex) bool, source_row int, source_parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(source_row) + + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(source_parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_FilterAcceptsRow, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } -func (this *QSortFilterProxyModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QSortFilterProxyModel_Data2(this.h, index.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) +func (this *QSortFilterProxyModel) callVirtualBase_FilterAcceptsColumn(source_column int, source_parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_FilterAcceptsColumn(unsafe.Pointer(this.h), (C.int)(source_column), source_parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnFilterAcceptsColumn(slot func(super func(source_column int, source_parent *QModelIndex) bool, source_column int, source_parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_FilterAcceptsColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsColumn +func miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsColumn(self *C.QSortFilterProxyModel, cb C.intptr_t, source_column C.int, source_parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source_column int, source_parent *QModelIndex) bool, source_column int, source_parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(source_column) + + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(source_parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_FilterAcceptsColumn, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_LessThan(source_left *QModelIndex, source_right *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_LessThan(unsafe.Pointer(this.h), source_left.cPointer(), source_right.cPointer())) + +} +func (this *QSortFilterProxyModel) OnLessThan(slot func(super func(source_left *QModelIndex, source_right *QModelIndex) bool, source_left *QModelIndex, source_right *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_LessThan(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_LessThan +func miqt_exec_callback_QSortFilterProxyModel_LessThan(self *C.QSortFilterProxyModel, cb C.intptr_t, source_left *C.QModelIndex, source_right *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source_left *QModelIndex, source_right *QModelIndex) bool, source_left *QModelIndex, source_right *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(source_left)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(source_right)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_LessThan, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Index +func miqt_exec_callback_QSortFilterProxyModel_Index(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QSortFilterProxyModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Parent +func miqt_exec_callback_QSortFilterProxyModel_Parent(self *C.QSortFilterProxyModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() -func (this *QSortFilterProxyModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QSortFilterProxyModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QSortFilterProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QSortFilterProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) +func (this *QSortFilterProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QSortFilterProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Sibling +func miqt_exec_callback_QSortFilterProxyModel_Sibling(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QSortFilterProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QSortFilterProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) +func (this *QSortFilterProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QSortFilterProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + } +func (this *QSortFilterProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QSortFilterProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RowCount +func miqt_exec_callback_QSortFilterProxyModel_RowCount(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) -func (this *QSortFilterProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QSortFilterProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QSortFilterProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QSortFilterProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSortFilterProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QSortFilterProxyModel_ColumnCount +func miqt_exec_callback_QSortFilterProxyModel_ColumnCount(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QSortFilterProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QSortFilterProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSortFilterProxyModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex { - var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr +//export miqt_exec_callback_QSortFilterProxyModel_HasChildren +func miqt_exec_callback_QSortFilterProxyModel_HasChildren(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return _ret + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QSortFilterProxyModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { - var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr +func (this *QSortFilterProxyModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QSortFilterProxyModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QSortFilterProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Data +func miqt_exec_callback_QSortFilterProxyModel_Data(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return _ret + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QSortFilterProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QSortFilterProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetData +func miqt_exec_callback_QSortFilterProxyModel_SetData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QSortFilterProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QSortFilterProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_HeaderData +func miqt_exec_callback_QSortFilterProxyModel_HeaderData(self *C.QSortFilterProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QSortFilterProxyModel) Sort2(column int, order SortOrder) { - C.QSortFilterProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +func (this *QSortFilterProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QSortFilterProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QSortFilterProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetHeaderData +func miqt_exec_callback_QSortFilterProxyModel_SetHeaderData(self *C.QSortFilterProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QSortFilterProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QSortFilterProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QSortFilterProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MimeData +func miqt_exec_callback_QSortFilterProxyModel_MimeData(self *C.QSortFilterProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_DropMimeData +func miqt_exec_callback_QSortFilterProxyModel_DropMimeData(self *C.QSortFilterProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_InsertRows +func miqt_exec_callback_QSortFilterProxyModel_InsertRows(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_InsertColumns +func miqt_exec_callback_QSortFilterProxyModel_InsertColumns(self *C.QSortFilterProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RemoveRows +func miqt_exec_callback_QSortFilterProxyModel_RemoveRows(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RemoveColumns +func miqt_exec_callback_QSortFilterProxyModel_RemoveColumns(self *C.QSortFilterProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QSortFilterProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QSortFilterProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QSortFilterProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_FetchMore +func miqt_exec_callback_QSortFilterProxyModel_FetchMore(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_CanFetchMore +func miqt_exec_callback_QSortFilterProxyModel_CanFetchMore(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QSortFilterProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QSortFilterProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QSortFilterProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Flags +func miqt_exec_callback_QSortFilterProxyModel_Flags(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Buddy +func miqt_exec_callback_QSortFilterProxyModel_Buddy(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QSortFilterProxyModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QSortFilterProxyModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Match +func miqt_exec_callback_QSortFilterProxyModel_Match(self *C.QSortFilterProxyModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QSortFilterProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QSortFilterProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Span +func miqt_exec_callback_QSortFilterProxyModel_Span(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QSortFilterProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QSortFilterProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QSortFilterProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Sort +func miqt_exec_callback_QSortFilterProxyModel_Sort(self *C.QSortFilterProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QSortFilterProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QSortFilterProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QSortFilterProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MimeTypes +func miqt_exec_callback_QSortFilterProxyModel_MimeTypes(self *C.QSortFilterProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QSortFilterProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QSortFilterProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QSortFilterProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SupportedDropActions +func miqt_exec_callback_QSortFilterProxyModel_SupportedDropActions(self *C.QSortFilterProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QSortFilterProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QSortFilterProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Submit +func miqt_exec_callback_QSortFilterProxyModel_Submit(self *C.QSortFilterProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Revert() { + + C.QSortFilterProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QSortFilterProxyModel) OnRevert(slot func(super func())) { + C.QSortFilterProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Revert +func miqt_exec_callback_QSortFilterProxyModel_Revert(self *C.QSortFilterProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QSortFilterProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QSortFilterProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QSortFilterProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_ItemData +func miqt_exec_callback_QSortFilterProxyModel_ItemData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QSortFilterProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QSortFilterProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QSortFilterProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetItemData +func miqt_exec_callback_QSortFilterProxyModel_SetItemData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData +func miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData(self *C.QSortFilterProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QSortFilterProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QSortFilterProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QSortFilterProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SupportedDragActions +func miqt_exec_callback_QSortFilterProxyModel_SupportedDragActions(self *C.QSortFilterProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + } // Delete this object from C++ memory. func (this *QSortFilterProxyModel) Delete() { - C.QSortFilterProxyModel_Delete(this.h) + C.QSortFilterProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsortfilterproxymodel.h b/qt/gen_qsortfilterproxymodel.h index 702c2772..14b0df8a 100644 --- a/qt/gen_qsortfilterproxymodel.h +++ b/qt/gen_qsortfilterproxymodel.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractProxyModel; class QMetaObject; class QMimeData; class QModelIndex; @@ -27,6 +28,7 @@ class QSortFilterProxyModel; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -38,8 +40,8 @@ typedef struct QSortFilterProxyModel QSortFilterProxyModel; typedef struct QVariant QVariant; #endif -QSortFilterProxyModel* QSortFilterProxyModel_new(); -QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent); +void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self); void* QSortFilterProxyModel_Metacast(QSortFilterProxyModel* self, const char* param1); struct miqt_string QSortFilterProxyModel_Tr(const char* s); @@ -75,29 +77,32 @@ void QSortFilterProxyModel_SetFilterWildcard(QSortFilterProxyModel* self, struct void QSortFilterProxyModel_SetFilterFixedString(QSortFilterProxyModel* self, struct miqt_string pattern); void QSortFilterProxyModel_Clear(QSortFilterProxyModel* self); void QSortFilterProxyModel_Invalidate(QSortFilterProxyModel* self); -QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column); +bool QSortFilterProxyModel_FilterAcceptsRow(const QSortFilterProxyModel* self, int source_row, QModelIndex* source_parent); +bool QSortFilterProxyModel_FilterAcceptsColumn(const QSortFilterProxyModel* self, int source_column, QModelIndex* source_parent); +bool QSortFilterProxyModel_LessThan(const QSortFilterProxyModel* self, QModelIndex* source_left, QModelIndex* source_right); +QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent); QModelIndex* QSortFilterProxyModel_Parent(const QSortFilterProxyModel* self, QModelIndex* child); QModelIndex* QSortFilterProxyModel_Sibling(const QSortFilterProxyModel* self, int row, int column, QModelIndex* idx); -int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self); -int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self); -bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self); -QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index); -bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value); -QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation); -bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value); +int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self, QModelIndex* parent); +int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self, QModelIndex* parent); +bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self, QModelIndex* parent); +QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index, int role); +bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation, int role); +bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role); QMimeData* QSortFilterProxyModel_MimeData(const QSortFilterProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QSortFilterProxyModel_DropMimeData(QSortFilterProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); -bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count); -bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count); -bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count); -bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count); +bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); +bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); +bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); +bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); void QSortFilterProxyModel_FetchMore(QSortFilterProxyModel* self, QModelIndex* parent); bool QSortFilterProxyModel_CanFetchMore(const QSortFilterProxyModel* self, QModelIndex* parent); int QSortFilterProxyModel_Flags(const QSortFilterProxyModel* self, QModelIndex* index); QModelIndex* QSortFilterProxyModel_Buddy(const QSortFilterProxyModel* self, QModelIndex* index); -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value); +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); QSize* QSortFilterProxyModel_Span(const QSortFilterProxyModel* self, QModelIndex* index); -void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column); +void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_MimeTypes(const QSortFilterProxyModel* self); int QSortFilterProxyModel_SupportedDropActions(const QSortFilterProxyModel* self); void QSortFilterProxyModel_DynamicSortFilterChanged(QSortFilterProxyModel* self, bool dynamicSortFilter); @@ -118,22 +123,81 @@ struct miqt_string QSortFilterProxyModel_Tr2(const char* s, const char* c); struct miqt_string QSortFilterProxyModel_Tr3(const char* s, const char* c, int n); struct miqt_string QSortFilterProxyModel_TrUtf82(const char* s, const char* c); struct miqt_string QSortFilterProxyModel_TrUtf83(const char* s, const char* c, int n); -QModelIndex* QSortFilterProxyModel_Index3(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent); -int QSortFilterProxyModel_RowCount1(const QSortFilterProxyModel* self, QModelIndex* parent); -int QSortFilterProxyModel_ColumnCount1(const QSortFilterProxyModel* self, QModelIndex* parent); -bool QSortFilterProxyModel_HasChildren1(const QSortFilterProxyModel* self, QModelIndex* parent); -QVariant* QSortFilterProxyModel_Data2(const QSortFilterProxyModel* self, QModelIndex* index, int role); -bool QSortFilterProxyModel_SetData3(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QSortFilterProxyModel_HeaderData3(const QSortFilterProxyModel* self, int section, int orientation, int role); -bool QSortFilterProxyModel_SetHeaderData4(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role); -bool QSortFilterProxyModel_InsertRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); -bool QSortFilterProxyModel_InsertColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); -bool QSortFilterProxyModel_RemoveRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); -bool QSortFilterProxyModel_RemoveColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match4(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits); -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match5(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); -void QSortFilterProxyModel_Sort2(QSortFilterProxyModel* self, int column, int order); -void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self); +void QSortFilterProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel); +void QSortFilterProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QSortFilterProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QSortFilterProxyModel_override_virtual_FilterAcceptsRow(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsRow(const void* self, int source_row, QModelIndex* source_parent); +void QSortFilterProxyModel_override_virtual_FilterAcceptsColumn(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsColumn(const void* self, int source_column, QModelIndex* source_parent); +void QSortFilterProxyModel_override_virtual_LessThan(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_LessThan(const void* self, QModelIndex* source_left, QModelIndex* source_right); +void QSortFilterProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QSortFilterProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QSortFilterProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QSortFilterProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QSortFilterProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QSortFilterProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QSortFilterProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QSortFilterProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QSortFilterProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QSortFilterProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QSortFilterProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QSortFilterProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QSortFilterProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_Sort(void* self, int column, int order); +void QSortFilterProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_virtualbase_MimeTypes(const void* self); +void QSortFilterProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_SupportedDropActions(const void* self); +void QSortFilterProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_Submit(void* self); +void QSortFilterProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_Revert(void* self); +void QSortFilterProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QSortFilterProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QSortFilterProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_SupportedDragActions(const void* self); +void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qspinbox.cpp b/qt/gen_qspinbox.cpp index b3d6d540..5807f2b6 100644 --- a/qt/gen_qspinbox.cpp +++ b/qt/gen_qspinbox.cpp @@ -1,20 +1,729 @@ +#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qspinbox.h" #include "_cgo_export.h" -QSpinBox* QSpinBox_new(QWidget* parent) { - return new QSpinBox(parent); +class MiqtVirtualQSpinBox : public virtual QSpinBox { +public: + + MiqtVirtualQSpinBox(QWidget* parent): QSpinBox(parent) {}; + MiqtVirtualQSpinBox(): QSpinBox() {}; + + virtual ~MiqtVirtualQSpinBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSpinBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSpinBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSpinBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QSpinBox::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QSpinBox_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QSpinBox::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValueFromText = 0; + + // Subclass to allow providing a Go implementation + virtual int valueFromText(const QString& text) const override { + if (handle__ValueFromText == 0) { + return QSpinBox::valueFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + int callback_return_value = miqt_exec_callback_QSpinBox_ValueFromText(const_cast(this), handle__ValueFromText, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ValueFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return QSpinBox::valueFromText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromValue = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromValue(int val) const override { + if (handle__TextFromValue == 0) { + return QSpinBox::textFromValue(val); + } + + int sigval1 = val; + + struct miqt_string callback_return_value = miqt_exec_callback_QSpinBox_TextFromValue(const_cast(this), handle__TextFromValue, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromValue(int val) const { + + QString _ret = QSpinBox::textFromValue(static_cast(val)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& str) const override { + if (handle__Fixup == 0) { + QSpinBox::fixup(str); + return; + } + + QString str_ret = str; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray str_b = str_ret.toUtf8(); + struct miqt_string str_ms; + str_ms.len = str_b.length(); + str_ms.data = static_cast(malloc(str_ms.len)); + memcpy(str_ms.data, str_b.data(), str_ms.len); + struct miqt_string sigval1 = str_ms; + + miqt_exec_callback_QSpinBox_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string str) const { + QString str_QString = QString::fromUtf8(str.data, str.len); + + QSpinBox::fixup(str_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSpinBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpinBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSpinBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSpinBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpinBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSpinBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSpinBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSpinBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSpinBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QSpinBox::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QSpinBox_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QSpinBox::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QSpinBox::clear(); + return; + } + + + miqt_exec_callback_QSpinBox_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QSpinBox::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QSpinBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSpinBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSpinBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSpinBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSpinBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSpinBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSpinBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSpinBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSpinBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSpinBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSpinBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSpinBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSpinBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSpinBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QSpinBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QSpinBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSpinBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSpinBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QSpinBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSpinBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QSpinBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QSpinBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QSpinBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QSpinBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QSpinBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QSpinBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSpinBox::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSpinBox::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QSpinBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QSpinBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QSpinBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSpinBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QSpinBox::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QSpinBox_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QSpinBox::stepEnabled(); + return static_cast(_ret); + + } + +}; + +void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(parent); + *outptr_QSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSpinBox* QSpinBox_new2() { - return new QSpinBox(); +void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(); + *outptr_QSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSpinBox_MetaObject(const QSpinBox* self) { @@ -62,190 +771,1102 @@ struct miqt_string QSpinBox_Prefix(const QSpinBox* self) { return _ms; } -void QSpinBox_SetPrefix(QSpinBox* self, struct miqt_string prefix) { - QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); - self->setPrefix(prefix_QString); -} +void QSpinBox_SetPrefix(QSpinBox* self, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + self->setPrefix(prefix_QString); +} + +struct miqt_string QSpinBox_Suffix(const QSpinBox* self) { + QString _ret = self->suffix(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSpinBox_SetSuffix(QSpinBox* self, struct miqt_string suffix) { + QString suffix_QString = QString::fromUtf8(suffix.data, suffix.len); + self->setSuffix(suffix_QString); +} + +struct miqt_string QSpinBox_CleanText(const QSpinBox* self) { + QString _ret = self->cleanText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QSpinBox_SingleStep(const QSpinBox* self) { + return self->singleStep(); +} + +void QSpinBox_SetSingleStep(QSpinBox* self, int val) { + self->setSingleStep(static_cast(val)); +} + +int QSpinBox_Minimum(const QSpinBox* self) { + return self->minimum(); +} + +void QSpinBox_SetMinimum(QSpinBox* self, int min) { + self->setMinimum(static_cast(min)); +} + +int QSpinBox_Maximum(const QSpinBox* self) { + return self->maximum(); +} + +void QSpinBox_SetMaximum(QSpinBox* self, int max) { + self->setMaximum(static_cast(max)); +} + +void QSpinBox_SetRange(QSpinBox* self, int min, int max) { + self->setRange(static_cast(min), static_cast(max)); +} + +int QSpinBox_StepType(const QSpinBox* self) { + QAbstractSpinBox::StepType _ret = self->stepType(); + return static_cast(_ret); +} + +void QSpinBox_SetStepType(QSpinBox* self, int stepType) { + self->setStepType(static_cast(stepType)); +} + +int QSpinBox_DisplayIntegerBase(const QSpinBox* self) { + return self->displayIntegerBase(); +} + +void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base) { + self->setDisplayIntegerBase(static_cast(base)); +} + +void QSpinBox_SetValue(QSpinBox* self, int val) { + self->setValue(static_cast(val)); +} + +void QSpinBox_ValueChanged(QSpinBox* self, int param1) { + self->valueChanged(static_cast(param1)); +} + +void QSpinBox_connect_ValueChanged(QSpinBox* self, intptr_t slot) { + MiqtVirtualQSpinBox::connect(self, static_cast(&QSpinBox::valueChanged), self, [=](int param1) { + int sigval1 = param1; + miqt_exec_callback_QSpinBox_ValueChanged(slot, sigval1); + }); +} + +void QSpinBox_TextChanged(QSpinBox* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->textChanged(param1_QString); +} + +void QSpinBox_connect_TextChanged(QSpinBox* self, intptr_t slot) { + MiqtVirtualQSpinBox::connect(self, static_cast(&QSpinBox::textChanged), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QSpinBox_TextChanged(slot, sigval1); + }); +} + +void QSpinBox_ValueChangedWithQString(QSpinBox* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->valueChanged(param1_QString); +} + +void QSpinBox_connect_ValueChangedWithQString(QSpinBox* self, intptr_t slot) { + MiqtVirtualQSpinBox::connect(self, static_cast(&QSpinBox::valueChanged), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QSpinBox_ValueChangedWithQString(slot, sigval1); + }); +} + +struct miqt_string QSpinBox_Tr2(const char* s, const char* c) { + QString _ret = QSpinBox::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSpinBox_Tr3(const char* s, const char* c, int n) { + QString _ret = QSpinBox::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSpinBox_TrUtf82(const char* s, const char* c) { + QString _ret = QSpinBox::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSpinBox_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QSpinBox::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSpinBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Event = slot; +} + +bool QSpinBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_Event(event); +} + +void QSpinBox_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Validate = slot; +} + +int QSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_Validate(input, pos); +} + +void QSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ValueFromText = slot; +} + +int QSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_ValueFromText(text); +} + +void QSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__TextFromValue = slot; +} + +struct miqt_string QSpinBox_virtualbase_TextFromValue(const void* self, int val) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_TextFromValue(val); +} + +void QSpinBox_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Fixup = slot; +} + +void QSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str) { + ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_Fixup(str); +} + +void QSpinBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QSpinBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_SizeHint(); +} + +void QSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSpinBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSpinBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSpinBox_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__StepBy = slot; +} + +void QSpinBox_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_StepBy(steps); +} + +void QSpinBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Clear = slot; +} + +void QSpinBox_virtualbase_Clear(void* self) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_Clear(); +} + +void QSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ResizeEvent = slot; +} + +void QSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__WheelEvent = slot; +} + +void QSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__FocusInEvent = slot; +} + +void QSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ChangeEvent = slot; +} + +void QSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__CloseEvent = slot; +} + +void QSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QSpinBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__HideEvent = slot; +} + +void QSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_HideEvent(event); +} + +void QSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MousePressEvent = slot; +} + +void QSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__TimerEvent = slot; +} + +void QSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_TimerEvent(event); +} + +void QSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__PaintEvent = slot; +} + +void QSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ShowEvent = slot; +} + +void QSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__StepEnabled = slot; +} + +int QSpinBox_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_StepEnabled(); +} + +void QSpinBox_Delete(QSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDoubleSpinBox : public virtual QDoubleSpinBox { +public: + + MiqtVirtualQDoubleSpinBox(QWidget* parent): QDoubleSpinBox(parent) {}; + MiqtVirtualQDoubleSpinBox(): QDoubleSpinBox() {}; + + virtual ~MiqtVirtualQDoubleSpinBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QDoubleSpinBox::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QDoubleSpinBox_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QDoubleSpinBox::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValueFromText = 0; + + // Subclass to allow providing a Go implementation + virtual double valueFromText(const QString& text) const override { + if (handle__ValueFromText == 0) { + return QDoubleSpinBox::valueFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + double callback_return_value = miqt_exec_callback_QDoubleSpinBox_ValueFromText(const_cast(this), handle__ValueFromText, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + double virtualbase_ValueFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return QDoubleSpinBox::valueFromText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromValue = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromValue(double val) const override { + if (handle__TextFromValue == 0) { + return QDoubleSpinBox::textFromValue(val); + } + + double sigval1 = val; + + struct miqt_string callback_return_value = miqt_exec_callback_QDoubleSpinBox_TextFromValue(const_cast(this), handle__TextFromValue, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromValue(double val) const { + + QString _ret = QDoubleSpinBox::textFromValue(static_cast(val)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& str) const override { + if (handle__Fixup == 0) { + QDoubleSpinBox::fixup(str); + return; + } + + QString str_ret = str; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray str_b = str_ret.toUtf8(); + struct miqt_string str_ms; + str_ms.len = str_b.length(); + str_ms.data = static_cast(malloc(str_ms.len)); + memcpy(str_ms.data, str_b.data(), str_ms.len); + struct miqt_string sigval1 = str_ms; + + miqt_exec_callback_QDoubleSpinBox_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string str) const { + QString str_QString = QString::fromUtf8(str.data, str.len); + + QDoubleSpinBox::fixup(str_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDoubleSpinBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDoubleSpinBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDoubleSpinBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDoubleSpinBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDoubleSpinBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDoubleSpinBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDoubleSpinBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDoubleSpinBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDoubleSpinBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDoubleSpinBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDoubleSpinBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDoubleSpinBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QDoubleSpinBox::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QDoubleSpinBox_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QDoubleSpinBox::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QDoubleSpinBox::clear(); + return; + } + + + miqt_exec_callback_QDoubleSpinBox_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QDoubleSpinBox::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDoubleSpinBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDoubleSpinBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDoubleSpinBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDoubleSpinBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDoubleSpinBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDoubleSpinBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDoubleSpinBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDoubleSpinBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDoubleSpinBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDoubleSpinBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDoubleSpinBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDoubleSpinBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDoubleSpinBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDoubleSpinBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDoubleSpinBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDoubleSpinBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDoubleSpinBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDoubleSpinBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDoubleSpinBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDoubleSpinBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDoubleSpinBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDoubleSpinBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDoubleSpinBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDoubleSpinBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDoubleSpinBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDoubleSpinBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; -struct miqt_string QSpinBox_Suffix(const QSpinBox* self) { - QString _ret = self->suffix(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDoubleSpinBox::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; -void QSpinBox_SetSuffix(QSpinBox* self, struct miqt_string suffix) { - QString suffix_QString = QString::fromUtf8(suffix.data, suffix.len); - self->setSuffix(suffix_QString); -} + miqt_exec_callback_QDoubleSpinBox_TimerEvent(this, handle__TimerEvent, sigval1); -struct miqt_string QSpinBox_CleanText(const QSpinBox* self) { - QString _ret = self->cleanText(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + + } -int QSpinBox_SingleStep(const QSpinBox* self) { - return self->singleStep(); -} + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { -void QSpinBox_SetSingleStep(QSpinBox* self, int val) { - self->setSingleStep(static_cast(val)); -} + QDoubleSpinBox::timerEvent(event); -int QSpinBox_Minimum(const QSpinBox* self) { - return self->minimum(); -} + } -void QSpinBox_SetMinimum(QSpinBox* self, int min) { - self->setMinimum(static_cast(min)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; -int QSpinBox_Maximum(const QSpinBox* self) { - return self->maximum(); -} + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDoubleSpinBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; -void QSpinBox_SetMaximum(QSpinBox* self, int max) { - self->setMaximum(static_cast(max)); -} + miqt_exec_callback_QDoubleSpinBox_PaintEvent(this, handle__PaintEvent, sigval1); -void QSpinBox_SetRange(QSpinBox* self, int min, int max) { - self->setRange(static_cast(min), static_cast(max)); -} + + } -int QSpinBox_StepType(const QSpinBox* self) { - QAbstractSpinBox::StepType _ret = self->stepType(); - return static_cast(_ret); -} + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { -void QSpinBox_SetStepType(QSpinBox* self, int stepType) { - self->setStepType(static_cast(stepType)); -} + QDoubleSpinBox::paintEvent(event); -int QSpinBox_DisplayIntegerBase(const QSpinBox* self) { - return self->displayIntegerBase(); -} + } -void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base) { - self->setDisplayIntegerBase(static_cast(base)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; -void QSpinBox_SetValue(QSpinBox* self, int val) { - self->setValue(static_cast(val)); -} + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDoubleSpinBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; -void QSpinBox_ValueChanged(QSpinBox* self, int param1) { - self->valueChanged(static_cast(param1)); -} + miqt_exec_callback_QDoubleSpinBox_ShowEvent(this, handle__ShowEvent, sigval1); -void QSpinBox_connect_ValueChanged(QSpinBox* self, intptr_t slot) { - QSpinBox::connect(self, static_cast(&QSpinBox::valueChanged), self, [=](int param1) { - int sigval1 = param1; - miqt_exec_callback_QSpinBox_ValueChanged(slot, sigval1); - }); -} + + } -void QSpinBox_TextChanged(QSpinBox* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->textChanged(param1_QString); -} + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { -void QSpinBox_connect_TextChanged(QSpinBox* self, intptr_t slot) { - QSpinBox::connect(self, static_cast(&QSpinBox::textChanged), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QSpinBox_TextChanged(slot, sigval1); - }); -} + QDoubleSpinBox::showEvent(event); -void QSpinBox_ValueChangedWithQString(QSpinBox* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->valueChanged(param1_QString); -} + } -void QSpinBox_connect_ValueChangedWithQString(QSpinBox* self, intptr_t slot) { - QSpinBox::connect(self, static_cast(&QSpinBox::valueChanged), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QSpinBox_ValueChangedWithQString(slot, sigval1); - }); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; -struct miqt_string QSpinBox_Tr2(const char* s, const char* c) { - QString _ret = QSpinBox::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QDoubleSpinBox::stepEnabled(); + } + -struct miqt_string QSpinBox_Tr3(const char* s, const char* c, int n) { - QString _ret = QSpinBox::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + int callback_return_value = miqt_exec_callback_QDoubleSpinBox_StepEnabled(const_cast(this), handle__StepEnabled); -struct miqt_string QSpinBox_TrUtf82(const char* s, const char* c) { - QString _ret = QSpinBox::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + return static_cast(callback_return_value); + } -struct miqt_string QSpinBox_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QSpinBox::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { -void QSpinBox_Delete(QSpinBox* self) { - delete self; -} + QAbstractSpinBox::StepEnabled _ret = QDoubleSpinBox::stepEnabled(); + return static_cast(_ret); + + } + +}; -QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent) { - return new QDoubleSpinBox(parent); +void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(parent); + *outptr_QDoubleSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDoubleSpinBox* QDoubleSpinBox_new2() { - return new QDoubleSpinBox(); +void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(); + *outptr_QDoubleSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self) { @@ -406,7 +2027,7 @@ void QDoubleSpinBox_ValueChanged(QDoubleSpinBox* self, double param1) { } void QDoubleSpinBox_connect_ValueChanged(QDoubleSpinBox* self, intptr_t slot) { - QDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::valueChanged), self, [=](double param1) { + MiqtVirtualQDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::valueChanged), self, [=](double param1) { double sigval1 = param1; miqt_exec_callback_QDoubleSpinBox_ValueChanged(slot, sigval1); }); @@ -418,7 +2039,7 @@ void QDoubleSpinBox_TextChanged(QDoubleSpinBox* self, struct miqt_string param1) } void QDoubleSpinBox_connect_TextChanged(QDoubleSpinBox* self, intptr_t slot) { - QDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::textChanged), self, [=](const QString& param1) { + MiqtVirtualQDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::textChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -437,7 +2058,7 @@ void QDoubleSpinBox_ValueChangedWithQString(QDoubleSpinBox* self, struct miqt_st } void QDoubleSpinBox_connect_ValueChangedWithQString(QDoubleSpinBox* self, intptr_t slot) { - QDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::valueChanged), self, [=](const QString& param1) { + MiqtVirtualQDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::valueChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -494,7 +2115,227 @@ struct miqt_string QDoubleSpinBox_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDoubleSpinBox_Delete(QDoubleSpinBox* self) { - delete self; +void QDoubleSpinBox_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Validate = slot; +} + +int QDoubleSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Validate(input, pos); +} + +void QDoubleSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ValueFromText = slot; +} + +double QDoubleSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ValueFromText(text); +} + +void QDoubleSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__TextFromValue = slot; +} + +struct miqt_string QDoubleSpinBox_virtualbase_TextFromValue(const void* self, double val) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_TextFromValue(val); +} + +void QDoubleSpinBox_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Fixup = slot; +} + +void QDoubleSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str) { + ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Fixup(str); +} + +void QDoubleSpinBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QDoubleSpinBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_SizeHint(); +} + +void QDoubleSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDoubleSpinBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDoubleSpinBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Event = slot; +} + +bool QDoubleSpinBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Event(event); +} + +void QDoubleSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDoubleSpinBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDoubleSpinBox_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__StepBy = slot; +} + +void QDoubleSpinBox_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_StepBy(steps); +} + +void QDoubleSpinBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Clear = slot; +} + +void QDoubleSpinBox_virtualbase_Clear(void* self) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Clear(); +} + +void QDoubleSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ResizeEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDoubleSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QDoubleSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDoubleSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDoubleSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDoubleSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__WheelEvent = slot; +} + +void QDoubleSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QDoubleSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__FocusInEvent = slot; +} + +void QDoubleSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDoubleSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QDoubleSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDoubleSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDoubleSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ChangeEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDoubleSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__CloseEvent = slot; +} + +void QDoubleSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QDoubleSpinBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__HideEvent = slot; +} + +void QDoubleSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_HideEvent(event); +} + +void QDoubleSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MousePressEvent = slot; +} + +void QDoubleSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDoubleSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDoubleSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDoubleSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDoubleSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDoubleSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__TimerEvent = slot; +} + +void QDoubleSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_TimerEvent(event); +} + +void QDoubleSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__PaintEvent = slot; +} + +void QDoubleSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QDoubleSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ShowEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QDoubleSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__StepEnabled = slot; +} + +int QDoubleSpinBox_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_StepEnabled(); +} + +void QDoubleSpinBox_Delete(QDoubleSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qspinbox.go b/qt/gen_qspinbox.go index d16b4721..d95e9d3a 100644 --- a/qt/gen_qspinbox.go +++ b/qt/gen_qspinbox.go @@ -15,7 +15,8 @@ import ( ) type QSpinBox struct { - h *C.QSpinBox + h *C.QSpinBox + isSubclass bool *QAbstractSpinBox } @@ -33,27 +34,51 @@ func (this *QSpinBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSpinBox(h *C.QSpinBox) *QSpinBox { +// newQSpinBox constructs the type using only CGO pointers. +func newQSpinBox(h *C.QSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSpinBox { if h == nil { return nil } - return &QSpinBox{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))} + return &QSpinBox{h: h, + QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSpinBox(h unsafe.Pointer) *QSpinBox { - return newQSpinBox((*C.QSpinBox)(h)) +// UnsafeNewQSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSpinBox { + if h == nil { + return nil + } + + return &QSpinBox{h: (*C.QSpinBox)(h), + QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSpinBox constructs a new QSpinBox object. func NewQSpinBox(parent *QWidget) *QSpinBox { - ret := C.QSpinBox_new(parent.cPointer()) - return newQSpinBox(ret) + var outptr_QSpinBox *C.QSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSpinBox_new(parent.cPointer(), &outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSpinBox2 constructs a new QSpinBox object. func NewQSpinBox2() *QSpinBox { - ret := C.QSpinBox_new2() - return newQSpinBox(ret) + var outptr_QSpinBox *C.QSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSpinBox_new2(&outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSpinBox) MetaObject() *QMetaObject { @@ -291,331 +316,1680 @@ func QSpinBox_TrUtf83(s string, c string, n int) string { return _ret } -// Delete this object from C++ memory. -func (this *QSpinBox) Delete() { - C.QSpinBox_Delete(this.h) -} +func (this *QSpinBox) callVirtualBase_Event(event *QEvent) bool { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QSpinBox) GoGC() { - runtime.SetFinalizer(this, func(this *QSpinBox) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + return (bool)(C.QSpinBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) -type QDoubleSpinBox struct { - h *C.QDoubleSpinBox - *QAbstractSpinBox +} +func (this *QSpinBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSpinBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) cPointer() *C.QDoubleSpinBox { - if this == nil { - return nil +//export miqt_exec_callback_QSpinBox_Event +func miqt_exec_callback_QSpinBox_Event(self *C.QSpinBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QDoubleSpinBox) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QSpinBox) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QSpinBox_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QSpinBox) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QSpinBox_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQDoubleSpinBox(h *C.QDoubleSpinBox) *QDoubleSpinBox { - if h == nil { - return nil +//export miqt_exec_callback_QSpinBox_Validate +func miqt_exec_callback_QSpinBox_Validate(self *C.QSpinBox, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QDoubleSpinBox{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))} -} -func UnsafeNewQDoubleSpinBox(h unsafe.Pointer) *QDoubleSpinBox { - return newQDoubleSpinBox((*C.QDoubleSpinBox)(h)) -} + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) -// NewQDoubleSpinBox constructs a new QDoubleSpinBox object. -func NewQDoubleSpinBox(parent *QWidget) *QDoubleSpinBox { - ret := C.QDoubleSpinBox_new(parent.cPointer()) - return newQDoubleSpinBox(ret) -} + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_Validate, slotval1, slotval2) -// NewQDoubleSpinBox2 constructs a new QDoubleSpinBox object. -func NewQDoubleSpinBox2() *QDoubleSpinBox { - ret := C.QDoubleSpinBox_new2() - return newQDoubleSpinBox(ret) -} + return (C.int)(virtualReturn) -func (this *QDoubleSpinBox) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QDoubleSpinBox_MetaObject(this.h))) } -func (this *QDoubleSpinBox) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QDoubleSpinBox_Metacast(this.h, param1_Cstring)) -} +func (this *QSpinBox) callVirtualBase_ValueFromText(text string) int { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) -func QDoubleSpinBox_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + return (int)(C.QSpinBox_virtualbase_ValueFromText(unsafe.Pointer(this.h), text_ms)) -func QDoubleSpinBox_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } - -func (this *QDoubleSpinBox) Value() float64 { - return (float64)(C.QDoubleSpinBox_Value(this.h)) +func (this *QSpinBox) OnValueFromText(slot func(super func(text string) int, text string) int) { + C.QSpinBox_override_virtual_ValueFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) Prefix() string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Prefix(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} +//export miqt_exec_callback_QSpinBox_ValueFromText +func miqt_exec_callback_QSpinBox_ValueFromText(self *C.QSpinBox, cb C.intptr_t, text C.struct_miqt_string) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) int, text string) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QDoubleSpinBox) SetPrefix(prefix string) { - prefix_ms := C.struct_miqt_string{} - prefix_ms.data = C.CString(prefix) - prefix_ms.len = C.size_t(len(prefix)) - defer C.free(unsafe.Pointer(prefix_ms.data)) - C.QDoubleSpinBox_SetPrefix(this.h, prefix_ms) -} + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret -func (this *QDoubleSpinBox) Suffix() string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Suffix(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_ValueFromText, slotval1) + + return (C.int)(virtualReturn) -func (this *QDoubleSpinBox) SetSuffix(suffix string) { - suffix_ms := C.struct_miqt_string{} - suffix_ms.data = C.CString(suffix) - suffix_ms.len = C.size_t(len(suffix)) - defer C.free(unsafe.Pointer(suffix_ms.data)) - C.QDoubleSpinBox_SetSuffix(this.h, suffix_ms) } -func (this *QDoubleSpinBox) CleanText() string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_CleanText(this.h) +func (this *QSpinBox) callVirtualBase_TextFromValue(val int) string { + + var _ms C.struct_miqt_string = C.QSpinBox_virtualbase_TextFromValue(unsafe.Pointer(this.h), (C.int)(val)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } - -func (this *QDoubleSpinBox) SingleStep() float64 { - return (float64)(C.QDoubleSpinBox_SingleStep(this.h)) +func (this *QSpinBox) OnTextFromValue(slot func(super func(val int) string, val int) string) { + C.QSpinBox_override_virtual_TextFromValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) SetSingleStep(val float64) { - C.QDoubleSpinBox_SetSingleStep(this.h, (C.double)(val)) -} +//export miqt_exec_callback_QSpinBox_TextFromValue +func miqt_exec_callback_QSpinBox_TextFromValue(self *C.QSpinBox, cb C.intptr_t, val C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(val int) string, val int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QDoubleSpinBox) Minimum() float64 { - return (float64)(C.QDoubleSpinBox_Minimum(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(val) -func (this *QDoubleSpinBox) SetMinimum(min float64) { - C.QDoubleSpinBox_SetMinimum(this.h, (C.double)(min)) -} + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_TextFromValue, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) -func (this *QDoubleSpinBox) Maximum() float64 { - return (float64)(C.QDoubleSpinBox_Maximum(this.h)) -} + return virtualReturn_ms -func (this *QDoubleSpinBox) SetMaximum(max float64) { - C.QDoubleSpinBox_SetMaximum(this.h, (C.double)(max)) } -func (this *QDoubleSpinBox) SetRange(min float64, max float64) { - C.QDoubleSpinBox_SetRange(this.h, (C.double)(min), (C.double)(max)) -} +func (this *QSpinBox) callVirtualBase_Fixup(str string) { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) -func (this *QDoubleSpinBox) StepType() QAbstractSpinBox__StepType { - return (QAbstractSpinBox__StepType)(C.QDoubleSpinBox_StepType(this.h)) -} + C.QSpinBox_virtualbase_Fixup(unsafe.Pointer(this.h), str_ms) -func (this *QDoubleSpinBox) SetStepType(stepType QAbstractSpinBox__StepType) { - C.QDoubleSpinBox_SetStepType(this.h, (C.int)(stepType)) } - -func (this *QDoubleSpinBox) Decimals() int { - return (int)(C.QDoubleSpinBox_Decimals(this.h)) +func (this *QSpinBox) OnFixup(slot func(super func(str string), str string)) { + C.QSpinBox_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) SetDecimals(prec int) { - C.QDoubleSpinBox_SetDecimals(this.h, (C.int)(prec)) -} +//export miqt_exec_callback_QSpinBox_Fixup +func miqt_exec_callback_QSpinBox_Fixup(self *C.QSpinBox, cb C.intptr_t, str C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(str string), str string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QDoubleSpinBox) Validate(input string, pos *int) QValidator__State { - input_ms := C.struct_miqt_string{} - input_ms.data = C.CString(input) - input_ms.len = C.size_t(len(input)) - defer C.free(unsafe.Pointer(input_ms.data)) - return (QValidator__State)(C.QDoubleSpinBox_Validate(this.h, input_ms, (*C.int)(unsafe.Pointer(pos)))) -} + // Convert all CABI parameters to Go parameters + var str_ms C.struct_miqt_string = str + str_ret := C.GoStringN(str_ms.data, C.int(int64(str_ms.len))) + C.free(unsafe.Pointer(str_ms.data)) + slotval1 := str_ret -func (this *QDoubleSpinBox) ValueFromText(text string) float64 { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - return (float64)(C.QDoubleSpinBox_ValueFromText(this.h, text_ms)) -} + gofunc((&QSpinBox{h: self}).callVirtualBase_Fixup, slotval1) -func (this *QDoubleSpinBox) TextFromValue(val float64) string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_TextFromValue(this.h, (C.double)(val)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func (this *QDoubleSpinBox) Fixup(str string) { - str_ms := C.struct_miqt_string{} - str_ms.data = C.CString(str) - str_ms.len = C.size_t(len(str)) - defer C.free(unsafe.Pointer(str_ms.data)) - C.QDoubleSpinBox_Fixup(this.h, str_ms) +func (this *QSpinBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSpinBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpinBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSpinBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) SetValue(val float64) { - C.QDoubleSpinBox_SetValue(this.h, (C.double)(val)) +//export miqt_exec_callback_QSpinBox_SizeHint +func miqt_exec_callback_QSpinBox_SizeHint(self *C.QSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func (this *QDoubleSpinBox) ValueChanged(param1 float64) { - C.QDoubleSpinBox_ValueChanged(this.h, (C.double)(param1)) +func (this *QSpinBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSpinBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } -func (this *QDoubleSpinBox) OnValueChanged(slot func(param1 float64)) { - C.QDoubleSpinBox_connect_ValueChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QSpinBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSpinBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDoubleSpinBox_ValueChanged -func miqt_exec_callback_QDoubleSpinBox_ValueChanged(cb C.intptr_t, param1 C.double) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 float64)) +//export miqt_exec_callback_QSpinBox_MinimumSizeHint +func miqt_exec_callback_QSpinBox_MinimumSizeHint(self *C.QSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - // Convert all CABI parameters to Go parameters - slotval1 := (float64)(param1) + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() - gofunc(slotval1) } -func (this *QDoubleSpinBox) TextChanged(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QDoubleSpinBox_TextChanged(this.h, param1_ms) +func (this *QSpinBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSpinBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } -func (this *QDoubleSpinBox) OnTextChanged(slot func(param1 string)) { - C.QDoubleSpinBox_connect_TextChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QSpinBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSpinBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDoubleSpinBox_TextChanged -func miqt_exec_callback_QDoubleSpinBox_TextChanged(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QSpinBox_InputMethodQuery +func miqt_exec_callback_QSpinBox_InputMethodQuery(self *C.QSpinBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() - gofunc(slotval1) } -func (this *QDoubleSpinBox) ValueChangedWithQString(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QDoubleSpinBox_ValueChangedWithQString(this.h, param1_ms) +func (this *QSpinBox) callVirtualBase_StepBy(steps int) { + + C.QSpinBox_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + } -func (this *QDoubleSpinBox) OnValueChangedWithQString(slot func(param1 string)) { - C.QDoubleSpinBox_connect_ValueChangedWithQString(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QSpinBox) OnStepBy(slot func(super func(steps int), steps int)) { + C.QSpinBox_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDoubleSpinBox_ValueChangedWithQString -func miqt_exec_callback_QDoubleSpinBox_ValueChangedWithQString(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QSpinBox_StepBy +func miqt_exec_callback_QSpinBox_StepBy(self *C.QSpinBox, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret + slotval1 := (int)(steps) + + gofunc((&QSpinBox{h: self}).callVirtualBase_StepBy, slotval1) - gofunc(slotval1) } -func QDoubleSpinBox_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) +func (this *QSpinBox) callVirtualBase_Clear() { + + C.QSpinBox_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QSpinBox) OnClear(slot func(super func())) { + C.QSpinBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_Clear +func miqt_exec_callback_QSpinBox_Clear(self *C.QSpinBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSpinBox{h: self}).callVirtualBase_Clear) + +} + +func (this *QSpinBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QSpinBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QSpinBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ResizeEvent +func miqt_exec_callback_QSpinBox_ResizeEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSpinBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSpinBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_KeyPressEvent +func miqt_exec_callback_QSpinBox_KeyPressEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSpinBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSpinBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_KeyReleaseEvent +func miqt_exec_callback_QSpinBox_KeyReleaseEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSpinBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSpinBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_WheelEvent +func miqt_exec_callback_QSpinBox_WheelEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSpinBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSpinBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_FocusInEvent +func miqt_exec_callback_QSpinBox_FocusInEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSpinBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSpinBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_FocusOutEvent +func miqt_exec_callback_QSpinBox_FocusOutEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSpinBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSpinBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ContextMenuEvent +func miqt_exec_callback_QSpinBox_ContextMenuEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QSpinBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSpinBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ChangeEvent +func miqt_exec_callback_QSpinBox_ChangeEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSpinBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSpinBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_CloseEvent +func miqt_exec_callback_QSpinBox_CloseEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QSpinBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QSpinBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_HideEvent +func miqt_exec_callback_QSpinBox_HideEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QSpinBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSpinBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_MousePressEvent +func miqt_exec_callback_QSpinBox_MousePressEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QSpinBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSpinBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_MouseReleaseEvent +func miqt_exec_callback_QSpinBox_MouseReleaseEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QSpinBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSpinBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_MouseMoveEvent +func miqt_exec_callback_QSpinBox_MouseMoveEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSpinBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSpinBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_TimerEvent +func miqt_exec_callback_QSpinBox_TimerEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QSpinBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QSpinBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_PaintEvent +func miqt_exec_callback_QSpinBox_PaintEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QSpinBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QSpinBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ShowEvent +func miqt_exec_callback_QSpinBox_ShowEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QSpinBox_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QSpinBox) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QSpinBox_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_StepEnabled +func miqt_exec_callback_QSpinBox_StepEnabled(self *C.QSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QSpinBox) Delete() { + C.QSpinBox_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QSpinBox) GoGC() { + runtime.SetFinalizer(this, func(this *QSpinBox) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QDoubleSpinBox struct { + h *C.QDoubleSpinBox + isSubclass bool + *QAbstractSpinBox +} + +func (this *QDoubleSpinBox) cPointer() *C.QDoubleSpinBox { + if this == nil { + return nil + } + return this.h +} + +func (this *QDoubleSpinBox) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQDoubleSpinBox constructs the type using only CGO pointers. +func newQDoubleSpinBox(h *C.QDoubleSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDoubleSpinBox { + if h == nil { + return nil + } + return &QDoubleSpinBox{h: h, + QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQDoubleSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQDoubleSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDoubleSpinBox { + if h == nil { + return nil + } + + return &QDoubleSpinBox{h: (*C.QDoubleSpinBox)(h), + QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQDoubleSpinBox constructs a new QDoubleSpinBox object. +func NewQDoubleSpinBox(parent *QWidget) *QDoubleSpinBox { + var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDoubleSpinBox_new(parent.cPointer(), &outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDoubleSpinBox2 constructs a new QDoubleSpinBox object. +func NewQDoubleSpinBox2() *QDoubleSpinBox { + var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDoubleSpinBox_new2(&outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QDoubleSpinBox) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QDoubleSpinBox_MetaObject(this.h))) +} + +func (this *QDoubleSpinBox) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QDoubleSpinBox_Metacast(this.h, param1_Cstring)) +} + +func QDoubleSpinBox_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDoubleSpinBox_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) Value() float64 { + return (float64)(C.QDoubleSpinBox_Value(this.h)) +} + +func (this *QDoubleSpinBox) Prefix() string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Prefix(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) SetPrefix(prefix string) { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + C.QDoubleSpinBox_SetPrefix(this.h, prefix_ms) +} + +func (this *QDoubleSpinBox) Suffix() string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Suffix(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) SetSuffix(suffix string) { + suffix_ms := C.struct_miqt_string{} + suffix_ms.data = C.CString(suffix) + suffix_ms.len = C.size_t(len(suffix)) + defer C.free(unsafe.Pointer(suffix_ms.data)) + C.QDoubleSpinBox_SetSuffix(this.h, suffix_ms) +} + +func (this *QDoubleSpinBox) CleanText() string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_CleanText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) SingleStep() float64 { + return (float64)(C.QDoubleSpinBox_SingleStep(this.h)) +} + +func (this *QDoubleSpinBox) SetSingleStep(val float64) { + C.QDoubleSpinBox_SetSingleStep(this.h, (C.double)(val)) +} + +func (this *QDoubleSpinBox) Minimum() float64 { + return (float64)(C.QDoubleSpinBox_Minimum(this.h)) +} + +func (this *QDoubleSpinBox) SetMinimum(min float64) { + C.QDoubleSpinBox_SetMinimum(this.h, (C.double)(min)) +} + +func (this *QDoubleSpinBox) Maximum() float64 { + return (float64)(C.QDoubleSpinBox_Maximum(this.h)) +} + +func (this *QDoubleSpinBox) SetMaximum(max float64) { + C.QDoubleSpinBox_SetMaximum(this.h, (C.double)(max)) +} + +func (this *QDoubleSpinBox) SetRange(min float64, max float64) { + C.QDoubleSpinBox_SetRange(this.h, (C.double)(min), (C.double)(max)) +} + +func (this *QDoubleSpinBox) StepType() QAbstractSpinBox__StepType { + return (QAbstractSpinBox__StepType)(C.QDoubleSpinBox_StepType(this.h)) +} + +func (this *QDoubleSpinBox) SetStepType(stepType QAbstractSpinBox__StepType) { + C.QDoubleSpinBox_SetStepType(this.h, (C.int)(stepType)) +} + +func (this *QDoubleSpinBox) Decimals() int { + return (int)(C.QDoubleSpinBox_Decimals(this.h)) +} + +func (this *QDoubleSpinBox) SetDecimals(prec int) { + C.QDoubleSpinBox_SetDecimals(this.h, (C.int)(prec)) +} + +func (this *QDoubleSpinBox) Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + return (QValidator__State)(C.QDoubleSpinBox_Validate(this.h, input_ms, (*C.int)(unsafe.Pointer(pos)))) +} + +func (this *QDoubleSpinBox) ValueFromText(text string) float64 { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + return (float64)(C.QDoubleSpinBox_ValueFromText(this.h, text_ms)) +} + +func (this *QDoubleSpinBox) TextFromValue(val float64) string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_TextFromValue(this.h, (C.double)(val)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) Fixup(str string) { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) + C.QDoubleSpinBox_Fixup(this.h, str_ms) +} + +func (this *QDoubleSpinBox) SetValue(val float64) { + C.QDoubleSpinBox_SetValue(this.h, (C.double)(val)) +} + +func (this *QDoubleSpinBox) ValueChanged(param1 float64) { + C.QDoubleSpinBox_ValueChanged(this.h, (C.double)(param1)) +} +func (this *QDoubleSpinBox) OnValueChanged(slot func(param1 float64)) { + C.QDoubleSpinBox_connect_ValueChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ValueChanged +func miqt_exec_callback_QDoubleSpinBox_ValueChanged(cb C.intptr_t, param1 C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(param1) + + gofunc(slotval1) +} + +func (this *QDoubleSpinBox) TextChanged(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QDoubleSpinBox_TextChanged(this.h, param1_ms) +} +func (this *QDoubleSpinBox) OnTextChanged(slot func(param1 string)) { + C.QDoubleSpinBox_connect_TextChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_TextChanged +func miqt_exec_callback_QDoubleSpinBox_TextChanged(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func (this *QDoubleSpinBox) ValueChangedWithQString(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QDoubleSpinBox_ValueChangedWithQString(this.h, param1_ms) +} +func (this *QDoubleSpinBox) OnValueChangedWithQString(slot func(param1 string)) { + C.QDoubleSpinBox_connect_ValueChangedWithQString(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ValueChangedWithQString +func miqt_exec_callback_QDoubleSpinBox_ValueChangedWithQString(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func QDoubleSpinBox_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDoubleSpinBox_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDoubleSpinBox_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDoubleSpinBox_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QDoubleSpinBox_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QDoubleSpinBox) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QDoubleSpinBox_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Validate +func miqt_exec_callback_QDoubleSpinBox_Validate(self *C.QDoubleSpinBox, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ValueFromText(text string) float64 { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + return (float64)(C.QDoubleSpinBox_virtualbase_ValueFromText(unsafe.Pointer(this.h), text_ms)) + +} +func (this *QDoubleSpinBox) OnValueFromText(slot func(super func(text string) float64, text string) float64) { + C.QDoubleSpinBox_override_virtual_ValueFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ValueFromText +func miqt_exec_callback_QDoubleSpinBox_ValueFromText(self *C.QDoubleSpinBox, cb C.intptr_t, text C.struct_miqt_string) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) float64, text string) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ValueFromText, slotval1) + + return (C.double)(virtualReturn) + +} + +func (this *QDoubleSpinBox) callVirtualBase_TextFromValue(val float64) string { + + var _ms C.struct_miqt_string = C.QDoubleSpinBox_virtualbase_TextFromValue(unsafe.Pointer(this.h), (C.double)(val)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QDoubleSpinBox) OnTextFromValue(slot func(super func(val float64) string, val float64) string) { + C.QDoubleSpinBox_override_virtual_TextFromValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_TextFromValue +func miqt_exec_callback_QDoubleSpinBox_TextFromValue(self *C.QDoubleSpinBox, cb C.intptr_t, val C.double) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(val float64) string, val float64) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(val) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_TextFromValue, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QDoubleSpinBox) callVirtualBase_Fixup(str string) { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) + + C.QDoubleSpinBox_virtualbase_Fixup(unsafe.Pointer(this.h), str_ms) + +} +func (this *QDoubleSpinBox) OnFixup(slot func(super func(str string), str string)) { + C.QDoubleSpinBox_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Fixup +func miqt_exec_callback_QDoubleSpinBox_Fixup(self *C.QDoubleSpinBox, cb C.intptr_t, str C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(str string), str string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var str_ms C.struct_miqt_string = str + str_ret := C.GoStringN(str_ms.data, C.int(int64(str_ms.len))) + C.free(unsafe.Pointer(str_ms.data)) + slotval1 := str_ret + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDoubleSpinBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDoubleSpinBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDoubleSpinBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_SizeHint +func miqt_exec_callback_QDoubleSpinBox_SizeHint(self *C.QDoubleSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDoubleSpinBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDoubleSpinBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDoubleSpinBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDoubleSpinBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MinimumSizeHint +func miqt_exec_callback_QDoubleSpinBox_MinimumSizeHint(self *C.QDoubleSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDoubleSpinBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDoubleSpinBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDoubleSpinBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDoubleSpinBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Event +func miqt_exec_callback_QDoubleSpinBox_Event(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDoubleSpinBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDoubleSpinBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDoubleSpinBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDoubleSpinBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_InputMethodQuery +func miqt_exec_callback_QDoubleSpinBox_InputMethodQuery(self *C.QDoubleSpinBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDoubleSpinBox) callVirtualBase_StepBy(steps int) { + + C.QDoubleSpinBox_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QDoubleSpinBox) OnStepBy(slot func(super func(steps int), steps int)) { + C.QDoubleSpinBox_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_StepBy +func miqt_exec_callback_QDoubleSpinBox_StepBy(self *C.QDoubleSpinBox, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_Clear() { + + C.QDoubleSpinBox_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QDoubleSpinBox) OnClear(slot func(super func())) { + C.QDoubleSpinBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Clear +func miqt_exec_callback_QDoubleSpinBox_Clear(self *C.QDoubleSpinBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Clear) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDoubleSpinBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDoubleSpinBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ResizeEvent +func miqt_exec_callback_QDoubleSpinBox_ResizeEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) -func QDoubleSpinBox_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func QDoubleSpinBox_TrUtf82(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_TrUtf82(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QDoubleSpinBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDoubleSpinBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDoubleSpinBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QDoubleSpinBox_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QDoubleSpinBox_KeyPressEvent +func miqt_exec_callback_QDoubleSpinBox_KeyPressEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDoubleSpinBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDoubleSpinBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent +func miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDoubleSpinBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDoubleSpinBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_WheelEvent +func miqt_exec_callback_QDoubleSpinBox_WheelEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDoubleSpinBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDoubleSpinBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_FocusInEvent +func miqt_exec_callback_QDoubleSpinBox_FocusInEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDoubleSpinBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDoubleSpinBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_FocusOutEvent +func miqt_exec_callback_QDoubleSpinBox_FocusOutEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDoubleSpinBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDoubleSpinBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent +func miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDoubleSpinBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDoubleSpinBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ChangeEvent +func miqt_exec_callback_QDoubleSpinBox_ChangeEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDoubleSpinBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDoubleSpinBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_CloseEvent +func miqt_exec_callback_QDoubleSpinBox_CloseEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDoubleSpinBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDoubleSpinBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_HideEvent +func miqt_exec_callback_QDoubleSpinBox_HideEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDoubleSpinBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDoubleSpinBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MousePressEvent +func miqt_exec_callback_QDoubleSpinBox_MousePressEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDoubleSpinBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDoubleSpinBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent +func miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDoubleSpinBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDoubleSpinBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent +func miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDoubleSpinBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDoubleSpinBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_TimerEvent +func miqt_exec_callback_QDoubleSpinBox_TimerEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDoubleSpinBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDoubleSpinBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_PaintEvent +func miqt_exec_callback_QDoubleSpinBox_PaintEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDoubleSpinBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDoubleSpinBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ShowEvent +func miqt_exec_callback_QDoubleSpinBox_ShowEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QDoubleSpinBox_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QDoubleSpinBox) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QDoubleSpinBox_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_StepEnabled +func miqt_exec_callback_QDoubleSpinBox_StepEnabled(self *C.QDoubleSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + } // Delete this object from C++ memory. func (this *QDoubleSpinBox) Delete() { - C.QDoubleSpinBox_Delete(this.h) + C.QDoubleSpinBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qspinbox.h b/qt/gen_qspinbox.h index d883e8fc..64e38c99 100644 --- a/qt/gen_qspinbox.h +++ b/qt/gen_qspinbox.h @@ -15,19 +15,53 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSpinBox; +class QCloseEvent; +class QContextMenuEvent; class QDoubleSpinBox; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; +class QSize; class QSpinBox; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSpinBox QAbstractSpinBox; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDoubleSpinBox QDoubleSpinBox; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QSpinBox QSpinBox; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSpinBox* QSpinBox_new(QWidget* parent); -QSpinBox* QSpinBox_new2(); +void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSpinBox_MetaObject(const QSpinBox* self); void* QSpinBox_Metacast(QSpinBox* self, const char* param1); struct miqt_string QSpinBox_Tr(const char* s); @@ -49,6 +83,11 @@ int QSpinBox_StepType(const QSpinBox* self); void QSpinBox_SetStepType(QSpinBox* self, int stepType); int QSpinBox_DisplayIntegerBase(const QSpinBox* self); void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base); +bool QSpinBox_Event(QSpinBox* self, QEvent* event); +int QSpinBox_Validate(const QSpinBox* self, struct miqt_string input, int* pos); +int QSpinBox_ValueFromText(const QSpinBox* self, struct miqt_string text); +struct miqt_string QSpinBox_TextFromValue(const QSpinBox* self, int val); +void QSpinBox_Fixup(const QSpinBox* self, struct miqt_string str); void QSpinBox_SetValue(QSpinBox* self, int val); void QSpinBox_ValueChanged(QSpinBox* self, int param1); void QSpinBox_connect_ValueChanged(QSpinBox* self, intptr_t slot); @@ -60,10 +99,64 @@ struct miqt_string QSpinBox_Tr2(const char* s, const char* c); struct miqt_string QSpinBox_Tr3(const char* s, const char* c, int n); struct miqt_string QSpinBox_TrUtf82(const char* s, const char* c); struct miqt_string QSpinBox_TrUtf83(const char* s, const char* c, int n); -void QSpinBox_Delete(QSpinBox* self); +void QSpinBox_override_virtual_Event(void* self, intptr_t slot); +bool QSpinBox_virtualbase_Event(void* self, QEvent* event); +void QSpinBox_override_virtual_Validate(void* self, intptr_t slot); +int QSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot); +int QSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text); +void QSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot); +struct miqt_string QSpinBox_virtualbase_TextFromValue(const void* self, int val); +void QSpinBox_override_virtual_Fixup(void* self, intptr_t slot); +void QSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str); +void QSpinBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSpinBox_virtualbase_SizeHint(const void* self); +void QSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSpinBox_virtualbase_MinimumSizeHint(const void* self); +void QSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSpinBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QSpinBox_override_virtual_StepBy(void* self, intptr_t slot); +void QSpinBox_virtualbase_StepBy(void* self, int steps); +void QSpinBox_override_virtual_Clear(void* self, intptr_t slot); +void QSpinBox_virtualbase_Clear(void* self); +void QSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSpinBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); +int QSpinBox_virtualbase_StepEnabled(const void* self); +void QSpinBox_Delete(QSpinBox* self, bool isSubclass); -QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent); -QDoubleSpinBox* QDoubleSpinBox_new2(); +void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self); void* QDoubleSpinBox_Metacast(QDoubleSpinBox* self, const char* param1); struct miqt_string QDoubleSpinBox_Tr(const char* s); @@ -100,7 +193,61 @@ struct miqt_string QDoubleSpinBox_Tr2(const char* s, const char* c); struct miqt_string QDoubleSpinBox_Tr3(const char* s, const char* c, int n); struct miqt_string QDoubleSpinBox_TrUtf82(const char* s, const char* c); struct miqt_string QDoubleSpinBox_TrUtf83(const char* s, const char* c, int n); -void QDoubleSpinBox_Delete(QDoubleSpinBox* self); +void QDoubleSpinBox_override_virtual_Validate(void* self, intptr_t slot); +int QDoubleSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QDoubleSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot); +double QDoubleSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text); +void QDoubleSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot); +struct miqt_string QDoubleSpinBox_virtualbase_TextFromValue(const void* self, double val); +void QDoubleSpinBox_override_virtual_Fixup(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str); +void QDoubleSpinBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDoubleSpinBox_virtualbase_SizeHint(const void* self); +void QDoubleSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDoubleSpinBox_virtualbase_MinimumSizeHint(const void* self); +void QDoubleSpinBox_override_virtual_Event(void* self, intptr_t slot); +bool QDoubleSpinBox_virtualbase_Event(void* self, QEvent* event); +void QDoubleSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDoubleSpinBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QDoubleSpinBox_override_virtual_StepBy(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_StepBy(void* self, int steps); +void QDoubleSpinBox_override_virtual_Clear(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_Clear(void* self); +void QDoubleSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDoubleSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDoubleSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDoubleSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDoubleSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDoubleSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDoubleSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDoubleSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDoubleSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDoubleSpinBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDoubleSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDoubleSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDoubleSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDoubleSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDoubleSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDoubleSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDoubleSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); +int QDoubleSpinBox_virtualbase_StepEnabled(const void* self); +void QDoubleSpinBox_Delete(QDoubleSpinBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsplashscreen.cpp b/qt/gen_qsplashscreen.cpp index f457a648..8daefd17 100644 --- a/qt/gen_qsplashscreen.cpp +++ b/qt/gen_qsplashscreen.cpp @@ -1,50 +1,1129 @@ +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qsplashscreen.h" #include "_cgo_export.h" -QSplashScreen* QSplashScreen_new(QWidget* parent) { - return new QSplashScreen(parent); +class MiqtVirtualQSplashScreen : public virtual QSplashScreen { +public: + + MiqtVirtualQSplashScreen(QWidget* parent): QSplashScreen(parent) {}; + MiqtVirtualQSplashScreen(): QSplashScreen() {}; + MiqtVirtualQSplashScreen(QScreen* screen): QSplashScreen(screen) {}; + MiqtVirtualQSplashScreen(const QPixmap& pixmap): QSplashScreen(pixmap) {}; + MiqtVirtualQSplashScreen(const QPixmap& pixmap, Qt::WindowFlags f): QSplashScreen(pixmap, f) {}; + MiqtVirtualQSplashScreen(QScreen* screen, const QPixmap& pixmap): QSplashScreen(screen, pixmap) {}; + MiqtVirtualQSplashScreen(QScreen* screen, const QPixmap& pixmap, Qt::WindowFlags f): QSplashScreen(screen, pixmap, f) {}; + MiqtVirtualQSplashScreen(QWidget* parent, const QPixmap& pixmap): QSplashScreen(parent, pixmap) {}; + MiqtVirtualQSplashScreen(QWidget* parent, const QPixmap& pixmap, Qt::WindowFlags f): QSplashScreen(parent, pixmap, f) {}; + + virtual ~MiqtVirtualQSplashScreen() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QSplashScreen::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QSplashScreen_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QSplashScreen::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawContents = 0; + + // Subclass to allow providing a Go implementation + virtual void drawContents(QPainter* painter) override { + if (handle__DrawContents == 0) { + QSplashScreen::drawContents(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSplashScreen_DrawContents(this, handle__DrawContents, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawContents(QPainter* painter) { + + QSplashScreen::drawContents(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QSplashScreen::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplashScreen_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QSplashScreen::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSplashScreen::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSplashScreen_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSplashScreen::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QSplashScreen::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSplashScreen_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSplashScreen::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSplashScreen::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplashScreen_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSplashScreen::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSplashScreen::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplashScreen_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSplashScreen::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSplashScreen::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSplashScreen_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSplashScreen::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSplashScreen::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSplashScreen_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSplashScreen::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QSplashScreen::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSplashScreen_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSplashScreen::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QSplashScreen::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QSplashScreen::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QSplashScreen::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSplashScreen::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QSplashScreen::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QSplashScreen::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSplashScreen::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSplashScreen::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSplashScreen::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSplashScreen::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSplashScreen::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSplashScreen::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSplashScreen::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSplashScreen::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSplashScreen::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSplashScreen::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QSplashScreen::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QSplashScreen::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QSplashScreen::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSplashScreen::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QSplashScreen::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QSplashScreen::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QSplashScreen::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QSplashScreen::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QSplashScreen::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSplashScreen::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSplashScreen::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSplashScreen::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSplashScreen::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSplashScreen::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QSplashScreen::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSplashScreen::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QSplashScreen::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSplashScreen::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QSplashScreen::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSplashScreen::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QSplashScreen::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSplashScreen::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QSplashScreen::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSplashScreen::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QSplashScreen::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSplashScreen::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QSplashScreen::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSplashScreen::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QSplashScreen::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSplashScreen::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QSplashScreen::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QSplashScreen_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QSplashScreen::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSplashScreen::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSplashScreen_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSplashScreen::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSplashScreen::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSplashScreen_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QSplashScreen::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QSplashScreen::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSplashScreen_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSplashScreen::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QSplashScreen::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSplashScreen_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSplashScreen::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QSplashScreen::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSplashScreen_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSplashScreen::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QSplashScreen::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSplashScreen_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSplashScreen::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSplashScreen::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSplashScreen_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSplashScreen::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QSplashScreen::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSplashScreen_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSplashScreen::focusNextPrevChild(next); + + } + +}; + +void QSplashScreen_new(QWidget* parent, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(parent); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new2() { - return new QSplashScreen(); +void QSplashScreen_new2(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new3(QScreen* screen) { - return new QSplashScreen(screen); +void QSplashScreen_new3(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new4(QPixmap* pixmap) { - return new QSplashScreen(*pixmap); +void QSplashScreen_new4(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new5(QPixmap* pixmap, int f) { - return new QSplashScreen(*pixmap, static_cast(f)); +void QSplashScreen_new5(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap, static_cast(f)); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap) { - return new QSplashScreen(screen, *pixmap); +void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f) { - return new QSplashScreen(screen, *pixmap, static_cast(f)); +void QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap, static_cast(f)); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new8(QWidget* parent, QPixmap* pixmap) { - return new QSplashScreen(parent, *pixmap); +void QSplashScreen_new8(QWidget* parent, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(parent, *pixmap); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f) { - return new QSplashScreen(parent, *pixmap, static_cast(f)); +void QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(parent, *pixmap, static_cast(f)); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self) { @@ -119,7 +1198,7 @@ void QSplashScreen_MessageChanged(QSplashScreen* self, struct miqt_string messag } void QSplashScreen_connect_MessageChanged(QSplashScreen* self, intptr_t slot) { - QSplashScreen::connect(self, static_cast(&QSplashScreen::messageChanged), self, [=](const QString& message) { + MiqtVirtualQSplashScreen::connect(self, static_cast(&QSplashScreen::messageChanged), self, [=](const QString& message) { const QString message_ret = message; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray message_b = message_ret.toUtf8(); @@ -186,7 +1265,347 @@ void QSplashScreen_ShowMessage3(QSplashScreen* self, struct miqt_string message, self->showMessage(message_QString, static_cast(alignment), *color); } -void QSplashScreen_Delete(QSplashScreen* self) { - delete self; +void QSplashScreen_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__Event = slot; +} + +bool QSplashScreen_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_Event(e); +} + +void QSplashScreen_override_virtual_DrawContents(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DrawContents = slot; +} + +void QSplashScreen_virtualbase_DrawContents(void* self, QPainter* painter) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DrawContents(painter); +} + +void QSplashScreen_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MousePressEvent = slot; +} + +void QSplashScreen_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QSplashScreen_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DevType = slot; +} + +int QSplashScreen_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_DevType(); +} + +void QSplashScreen_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__SetVisible = slot; +} + +void QSplashScreen_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_SetVisible(visible); +} + +void QSplashScreen_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__SizeHint = slot; +} + +QSize* QSplashScreen_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_SizeHint(); +} + +void QSplashScreen_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSplashScreen_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSplashScreen_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__HeightForWidth = slot; +} + +int QSplashScreen_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSplashScreen_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSplashScreen_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSplashScreen_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSplashScreen_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_PaintEngine(); +} + +void QSplashScreen_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSplashScreen_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QSplashScreen_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSplashScreen_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSplashScreen_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSplashScreen_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QSplashScreen_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__WheelEvent = slot; +} + +void QSplashScreen_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_WheelEvent(event); +} + +void QSplashScreen_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__KeyPressEvent = slot; +} + +void QSplashScreen_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSplashScreen_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSplashScreen_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSplashScreen_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__FocusInEvent = slot; +} + +void QSplashScreen_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSplashScreen_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__FocusOutEvent = slot; +} + +void QSplashScreen_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSplashScreen_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__EnterEvent = slot; +} + +void QSplashScreen_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_EnterEvent(event); +} + +void QSplashScreen_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__LeaveEvent = slot; +} + +void QSplashScreen_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSplashScreen_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__PaintEvent = slot; +} + +void QSplashScreen_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_PaintEvent(event); +} + +void QSplashScreen_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MoveEvent = slot; +} + +void QSplashScreen_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MoveEvent(event); +} + +void QSplashScreen_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ResizeEvent = slot; +} + +void QSplashScreen_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSplashScreen_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__CloseEvent = slot; +} + +void QSplashScreen_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_CloseEvent(event); +} + +void QSplashScreen_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSplashScreen_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSplashScreen_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__TabletEvent = slot; +} + +void QSplashScreen_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_TabletEvent(event); +} + +void QSplashScreen_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ActionEvent = slot; +} + +void QSplashScreen_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ActionEvent(event); +} + +void QSplashScreen_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DragEnterEvent = slot; +} + +void QSplashScreen_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSplashScreen_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DragMoveEvent = slot; +} + +void QSplashScreen_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSplashScreen_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSplashScreen_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSplashScreen_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DropEvent = slot; +} + +void QSplashScreen_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DropEvent(event); +} + +void QSplashScreen_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ShowEvent = slot; +} + +void QSplashScreen_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ShowEvent(event); +} + +void QSplashScreen_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__HideEvent = slot; +} + +void QSplashScreen_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_HideEvent(event); +} + +void QSplashScreen_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__NativeEvent = slot; +} + +bool QSplashScreen_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSplashScreen_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ChangeEvent = slot; +} + +void QSplashScreen_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSplashScreen_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__Metric = slot; +} + +int QSplashScreen_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_Metric(param1); +} + +void QSplashScreen_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__InitPainter = slot; +} + +void QSplashScreen_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_InitPainter(painter); +} + +void QSplashScreen_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSplashScreen_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_Redirected(offset); +} + +void QSplashScreen_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSplashScreen_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_SharedPainter(); +} + +void QSplashScreen_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__InputMethodEvent = slot; +} + +void QSplashScreen_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSplashScreen_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSplashScreen_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSplashScreen_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSplashScreen_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSplashScreen_Delete(QSplashScreen* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsplashscreen.go b/qt/gen_qsplashscreen.go index 1ab5fb06..b8536a0d 100644 --- a/qt/gen_qsplashscreen.go +++ b/qt/gen_qsplashscreen.go @@ -15,7 +15,8 @@ import ( ) type QSplashScreen struct { - h *C.QSplashScreen + h *C.QSplashScreen + isSubclass bool *QWidget } @@ -33,69 +34,140 @@ func (this *QSplashScreen) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSplashScreen(h *C.QSplashScreen) *QSplashScreen { +// newQSplashScreen constructs the type using only CGO pointers. +func newQSplashScreen(h *C.QSplashScreen, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplashScreen { if h == nil { return nil } - return &QSplashScreen{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QSplashScreen{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSplashScreen(h unsafe.Pointer) *QSplashScreen { - return newQSplashScreen((*C.QSplashScreen)(h)) +// UnsafeNewQSplashScreen constructs the type using only unsafe pointers. +func UnsafeNewQSplashScreen(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplashScreen { + if h == nil { + return nil + } + + return &QSplashScreen{h: (*C.QSplashScreen)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSplashScreen constructs a new QSplashScreen object. func NewQSplashScreen(parent *QWidget) *QSplashScreen { - ret := C.QSplashScreen_new(parent.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new(parent.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen2 constructs a new QSplashScreen object. func NewQSplashScreen2() *QSplashScreen { - ret := C.QSplashScreen_new2() - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new2(&outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen3 constructs a new QSplashScreen object. func NewQSplashScreen3(screen *QScreen) *QSplashScreen { - ret := C.QSplashScreen_new3(screen.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new3(screen.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen4 constructs a new QSplashScreen object. func NewQSplashScreen4(pixmap *QPixmap) *QSplashScreen { - ret := C.QSplashScreen_new4(pixmap.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new4(pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen5 constructs a new QSplashScreen object. func NewQSplashScreen5(pixmap *QPixmap, f WindowType) *QSplashScreen { - ret := C.QSplashScreen_new5(pixmap.cPointer(), (C.int)(f)) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new5(pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen6 constructs a new QSplashScreen object. func NewQSplashScreen6(screen *QScreen, pixmap *QPixmap) *QSplashScreen { - ret := C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen7 constructs a new QSplashScreen object. func NewQSplashScreen7(screen *QScreen, pixmap *QPixmap, f WindowType) *QSplashScreen { - ret := C.QSplashScreen_new7(screen.cPointer(), pixmap.cPointer(), (C.int)(f)) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new7(screen.cPointer(), pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen8 constructs a new QSplashScreen object. func NewQSplashScreen8(parent *QWidget, pixmap *QPixmap) *QSplashScreen { - ret := C.QSplashScreen_new8(parent.cPointer(), pixmap.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new8(parent.cPointer(), pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen9 constructs a new QSplashScreen object. func NewQSplashScreen9(parent *QWidget, pixmap *QPixmap, f WindowType) *QSplashScreen { - ret := C.QSplashScreen_new9(parent.cPointer(), pixmap.cPointer(), (C.int)(f)) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new9(parent.cPointer(), pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSplashScreen) MetaObject() *QMetaObject { @@ -132,7 +204,7 @@ func (this *QSplashScreen) SetPixmap(pixmap *QPixmap) { func (this *QSplashScreen) Pixmap() *QPixmap { _ret := C.QSplashScreen_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -251,9 +323,998 @@ func (this *QSplashScreen) ShowMessage3(message string, alignment int, color *QC C.QSplashScreen_ShowMessage3(this.h, message_ms, (C.int)(alignment), color.cPointer()) } +func (this *QSplashScreen) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QSplashScreen_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QSplashScreen) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QSplashScreen_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_Event +func miqt_exec_callback_QSplashScreen_Event(self *C.QSplashScreen, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_DrawContents(painter *QPainter) { + + C.QSplashScreen_virtualbase_DrawContents(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSplashScreen) OnDrawContents(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSplashScreen_override_virtual_DrawContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DrawContents +func miqt_exec_callback_QSplashScreen_DrawContents(self *C.QSplashScreen, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DrawContents, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QSplashScreen_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplashScreen) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplashScreen_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MousePressEvent +func miqt_exec_callback_QSplashScreen_MousePressEvent(self *C.QSplashScreen, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DevType() int { + + return (int)(C.QSplashScreen_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSplashScreen) OnDevType(slot func(super func() int) int) { + C.QSplashScreen_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DevType +func miqt_exec_callback_QSplashScreen_DevType(self *C.QSplashScreen, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_SetVisible(visible bool) { + + C.QSplashScreen_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSplashScreen) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSplashScreen_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_SetVisible +func miqt_exec_callback_QSplashScreen_SetVisible(self *C.QSplashScreen, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSplashScreen_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplashScreen) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplashScreen_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_SizeHint +func miqt_exec_callback_QSplashScreen_SizeHint(self *C.QSplashScreen, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSplashScreen_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplashScreen) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplashScreen_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MinimumSizeHint +func miqt_exec_callback_QSplashScreen_MinimumSizeHint(self *C.QSplashScreen, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSplashScreen_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplashScreen) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSplashScreen_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_HeightForWidth +func miqt_exec_callback_QSplashScreen_HeightForWidth(self *C.QSplashScreen, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSplashScreen_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSplashScreen) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSplashScreen_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_HasHeightForWidth +func miqt_exec_callback_QSplashScreen_HasHeightForWidth(self *C.QSplashScreen, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QSplashScreen_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSplashScreen) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QSplashScreen_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_PaintEngine +func miqt_exec_callback_QSplashScreen_PaintEngine(self *C.QSplashScreen, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QSplashScreen_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplashScreen_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MouseReleaseEvent +func miqt_exec_callback_QSplashScreen_MouseReleaseEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QSplashScreen_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplashScreen_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent +func miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QSplashScreen_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplashScreen_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MouseMoveEvent +func miqt_exec_callback_QSplashScreen_MouseMoveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSplashScreen_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSplashScreen_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_WheelEvent +func miqt_exec_callback_QSplashScreen_WheelEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSplashScreen_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplashScreen_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_KeyPressEvent +func miqt_exec_callback_QSplashScreen_KeyPressEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSplashScreen_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplashScreen_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_KeyReleaseEvent +func miqt_exec_callback_QSplashScreen_KeyReleaseEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSplashScreen_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplashScreen_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_FocusInEvent +func miqt_exec_callback_QSplashScreen_FocusInEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSplashScreen_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplashScreen_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_FocusOutEvent +func miqt_exec_callback_QSplashScreen_FocusOutEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_EnterEvent(event *QEvent) { + + C.QSplashScreen_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSplashScreen_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_EnterEvent +func miqt_exec_callback_QSplashScreen_EnterEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QSplashScreen_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSplashScreen_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_LeaveEvent +func miqt_exec_callback_QSplashScreen_LeaveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QSplashScreen_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QSplashScreen_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_PaintEvent +func miqt_exec_callback_QSplashScreen_PaintEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QSplashScreen_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QSplashScreen_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MoveEvent +func miqt_exec_callback_QSplashScreen_MoveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QSplashScreen_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QSplashScreen_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ResizeEvent +func miqt_exec_callback_QSplashScreen_ResizeEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSplashScreen_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSplashScreen_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_CloseEvent +func miqt_exec_callback_QSplashScreen_CloseEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSplashScreen_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSplashScreen_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ContextMenuEvent +func miqt_exec_callback_QSplashScreen_ContextMenuEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QSplashScreen_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QSplashScreen_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_TabletEvent +func miqt_exec_callback_QSplashScreen_TabletEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QSplashScreen_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QSplashScreen_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ActionEvent +func miqt_exec_callback_QSplashScreen_ActionEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QSplashScreen_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QSplashScreen_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DragEnterEvent +func miqt_exec_callback_QSplashScreen_DragEnterEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QSplashScreen_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QSplashScreen_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DragMoveEvent +func miqt_exec_callback_QSplashScreen_DragMoveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QSplashScreen_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QSplashScreen_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DragLeaveEvent +func miqt_exec_callback_QSplashScreen_DragLeaveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QSplashScreen_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QSplashScreen_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DropEvent +func miqt_exec_callback_QSplashScreen_DropEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QSplashScreen_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QSplashScreen_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ShowEvent +func miqt_exec_callback_QSplashScreen_ShowEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QSplashScreen_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QSplashScreen_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_HideEvent +func miqt_exec_callback_QSplashScreen_HideEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QSplashScreen_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QSplashScreen) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QSplashScreen_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_NativeEvent +func miqt_exec_callback_QSplashScreen_NativeEvent(self *C.QSplashScreen, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSplashScreen_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplashScreen) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSplashScreen_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ChangeEvent +func miqt_exec_callback_QSplashScreen_ChangeEvent(self *C.QSplashScreen, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSplashScreen_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplashScreen) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QSplashScreen_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_Metric +func miqt_exec_callback_QSplashScreen_Metric(self *C.QSplashScreen, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_InitPainter(painter *QPainter) { + + C.QSplashScreen_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSplashScreen) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSplashScreen_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_InitPainter +func miqt_exec_callback_QSplashScreen_InitPainter(self *C.QSplashScreen, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QSplashScreen_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QSplashScreen) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QSplashScreen_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_Redirected +func miqt_exec_callback_QSplashScreen_Redirected(self *C.QSplashScreen, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QSplashScreen_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSplashScreen) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QSplashScreen_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_SharedPainter +func miqt_exec_callback_QSplashScreen_SharedPainter(self *C.QSplashScreen, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QSplashScreen_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplashScreen) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QSplashScreen_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_InputMethodEvent +func miqt_exec_callback_QSplashScreen_InputMethodEvent(self *C.QSplashScreen, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSplashScreen_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplashScreen) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSplashScreen_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_InputMethodQuery +func miqt_exec_callback_QSplashScreen_InputMethodQuery(self *C.QSplashScreen, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSplashScreen_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSplashScreen) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSplashScreen_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_FocusNextPrevChild +func miqt_exec_callback_QSplashScreen_FocusNextPrevChild(self *C.QSplashScreen, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSplashScreen) Delete() { - C.QSplashScreen_Delete(this.h) + C.QSplashScreen_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsplashscreen.h b/qt/gen_qsplashscreen.h index 5dc4d3b4..339703ae 100644 --- a/qt/gen_qsplashscreen.h +++ b/qt/gen_qsplashscreen.h @@ -15,30 +15,84 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPixmap; +class QPoint; +class QResizeEvent; class QScreen; +class QShowEvent; +class QSize; class QSplashScreen; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; typedef struct QScreen QScreen; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QSplashScreen QSplashScreen; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSplashScreen* QSplashScreen_new(QWidget* parent); -QSplashScreen* QSplashScreen_new2(); -QSplashScreen* QSplashScreen_new3(QScreen* screen); -QSplashScreen* QSplashScreen_new4(QPixmap* pixmap); -QSplashScreen* QSplashScreen_new5(QPixmap* pixmap, int f); -QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap); -QSplashScreen* QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f); -QSplashScreen* QSplashScreen_new8(QWidget* parent, QPixmap* pixmap); -QSplashScreen* QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f); +void QSplashScreen_new(QWidget* parent, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new2(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new3(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new4(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new5(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new8(QWidget* parent, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self); void* QSplashScreen_Metacast(QSplashScreen* self, const char* param1); struct miqt_string QSplashScreen_Tr(const char* s); @@ -52,13 +106,100 @@ void QSplashScreen_ShowMessage(QSplashScreen* self, struct miqt_string message); void QSplashScreen_ClearMessage(QSplashScreen* self); void QSplashScreen_MessageChanged(QSplashScreen* self, struct miqt_string message); void QSplashScreen_connect_MessageChanged(QSplashScreen* self, intptr_t slot); +bool QSplashScreen_Event(QSplashScreen* self, QEvent* e); +void QSplashScreen_DrawContents(QSplashScreen* self, QPainter* painter); +void QSplashScreen_MousePressEvent(QSplashScreen* self, QMouseEvent* param1); struct miqt_string QSplashScreen_Tr2(const char* s, const char* c); struct miqt_string QSplashScreen_Tr3(const char* s, const char* c, int n); struct miqt_string QSplashScreen_TrUtf82(const char* s, const char* c); struct miqt_string QSplashScreen_TrUtf83(const char* s, const char* c, int n); void QSplashScreen_ShowMessage2(QSplashScreen* self, struct miqt_string message, int alignment); void QSplashScreen_ShowMessage3(QSplashScreen* self, struct miqt_string message, int alignment, QColor* color); -void QSplashScreen_Delete(QSplashScreen* self); +void QSplashScreen_override_virtual_Event(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_Event(void* self, QEvent* e); +void QSplashScreen_override_virtual_DrawContents(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DrawContents(void* self, QPainter* painter); +void QSplashScreen_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QSplashScreen_override_virtual_DevType(void* self, intptr_t slot); +int QSplashScreen_virtualbase_DevType(const void* self); +void QSplashScreen_override_virtual_SetVisible(void* self, intptr_t slot); +void QSplashScreen_virtualbase_SetVisible(void* self, bool visible); +void QSplashScreen_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSplashScreen_virtualbase_SizeHint(const void* self); +void QSplashScreen_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSplashScreen_virtualbase_MinimumSizeHint(const void* self); +void QSplashScreen_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSplashScreen_virtualbase_HeightForWidth(const void* self, int param1); +void QSplashScreen_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_HasHeightForWidth(const void* self); +void QSplashScreen_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSplashScreen_virtualbase_PaintEngine(const void* self); +void QSplashScreen_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QSplashScreen_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSplashScreen_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QSplashScreen_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSplashScreen_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSplashScreen_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSplashScreen_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSplashScreen_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSplashScreen_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_EnterEvent(void* self, QEvent* event); +void QSplashScreen_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSplashScreen_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QSplashScreen_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QSplashScreen_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSplashScreen_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSplashScreen_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSplashScreen_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSplashScreen_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSplashScreen_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSplashScreen_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSplashScreen_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSplashScreen_override_virtual_DropEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSplashScreen_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSplashScreen_override_virtual_HideEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSplashScreen_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QSplashScreen_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSplashScreen_override_virtual_Metric(void* self, intptr_t slot); +int QSplashScreen_virtualbase_Metric(const void* self, int param1); +void QSplashScreen_override_virtual_InitPainter(void* self, intptr_t slot); +void QSplashScreen_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSplashScreen_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSplashScreen_virtualbase_Redirected(const void* self, QPoint* offset); +void QSplashScreen_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSplashScreen_virtualbase_SharedPainter(const void* self); +void QSplashScreen_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSplashScreen_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSplashScreen_virtualbase_InputMethodQuery(const void* self, int param1); +void QSplashScreen_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSplashScreen_Delete(QSplashScreen* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsplitter.cpp b/qt/gen_qsplitter.cpp index 0198508a..df601469 100644 --- a/qt/gen_qsplitter.cpp +++ b/qt/gen_qsplitter.cpp @@ -1,31 +1,275 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qsplitter.h" #include "_cgo_export.h" -QSplitter* QSplitter_new(QWidget* parent) { - return new QSplitter(parent); +class MiqtVirtualQSplitter : public virtual QSplitter { +public: + + MiqtVirtualQSplitter(QWidget* parent): QSplitter(parent) {}; + MiqtVirtualQSplitter(): QSplitter() {}; + MiqtVirtualQSplitter(Qt::Orientation param1): QSplitter(param1) {}; + MiqtVirtualQSplitter(Qt::Orientation param1, QWidget* parent): QSplitter(param1, parent) {}; + + virtual ~MiqtVirtualQSplitter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSplitter::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitter_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSplitter::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSplitter::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitter_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSplitter::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateHandle = 0; + + // Subclass to allow providing a Go implementation + virtual QSplitterHandle* createHandle() override { + if (handle__CreateHandle == 0) { + return QSplitter::createHandle(); + } + + + QSplitterHandle* callback_return_value = miqt_exec_callback_QSplitter_CreateHandle(this, handle__CreateHandle); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSplitterHandle* virtualbase_CreateHandle() { + + return QSplitter::createHandle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* param1) override { + if (handle__ChildEvent == 0) { + QSplitter::childEvent(param1); + return; + } + + QChildEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* param1) { + + QSplitter::childEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSplitter::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSplitter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSplitter::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QSplitter::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QSplitter::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSplitter::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSplitter::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QSplitter::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QSplitter::paintEvent(param1); + + } + +}; + +void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(parent); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplitter* QSplitter_new2() { - return new QSplitter(); +void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplitter* QSplitter_new3(int param1) { - return new QSplitter(static_cast(param1)); +void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1)); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplitter* QSplitter_new4(int param1, QWidget* parent) { - return new QSplitter(static_cast(param1), parent); +void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1), parent); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSplitter_MetaObject(const QSplitter* self) { @@ -189,7 +433,7 @@ void QSplitter_SplitterMoved(QSplitter* self, int pos, int index) { } void QSplitter_connect_SplitterMoved(QSplitter* self, intptr_t slot) { - QSplitter::connect(self, static_cast(&QSplitter::splitterMoved), self, [=](int pos, int index) { + MiqtVirtualQSplitter::connect(self, static_cast(&QSplitter::splitterMoved), self, [=](int pos, int index) { int sigval1 = pos; int sigval2 = index; miqt_exec_callback_QSplitter_SplitterMoved(slot, sigval1, sigval2); @@ -244,110 +488,1498 @@ void QSplitter_SetOpaqueResize1(QSplitter* self, bool opaque) { self->setOpaqueResize(opaque); } -void QSplitter_Delete(QSplitter* self) { - delete self; +void QSplitter_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__SizeHint = slot; } -QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent) { - return new QSplitterHandle(static_cast(o), parent); +QSize* QSplitter_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSplitter*)(self) )->virtualbase_SizeHint(); } -QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self) { - return (QMetaObject*) self->metaObject(); +void QSplitter_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__MinimumSizeHint = slot; } -void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1) { - return self->qt_metacast(param1); +QSize* QSplitter_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSplitter*)(self) )->virtualbase_MinimumSizeHint(); } -struct miqt_string QSplitterHandle_Tr(const char* s) { - QString _ret = QSplitterHandle::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_override_virtual_CreateHandle(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__CreateHandle = slot; } -struct miqt_string QSplitterHandle_TrUtf8(const char* s) { - QString _ret = QSplitterHandle::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QSplitterHandle* QSplitter_virtualbase_CreateHandle(void* self) { + return ( (MiqtVirtualQSplitter*)(self) )->virtualbase_CreateHandle(); } -void QSplitterHandle_SetOrientation(QSplitterHandle* self, int o) { - self->setOrientation(static_cast(o)); +void QSplitter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__ChildEvent = slot; } -int QSplitterHandle_Orientation(const QSplitterHandle* self) { - Qt::Orientation _ret = self->orientation(); - return static_cast(_ret); +void QSplitter_virtualbase_ChildEvent(void* self, QChildEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_ChildEvent(param1); } -bool QSplitterHandle_OpaqueResize(const QSplitterHandle* self) { - return self->opaqueResize(); +void QSplitter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__Event = slot; } -QSplitter* QSplitterHandle_Splitter(const QSplitterHandle* self) { - return self->splitter(); +bool QSplitter_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSplitter*)(self) )->virtualbase_Event(param1); } -QSize* QSplitterHandle_SizeHint(const QSplitterHandle* self) { - return new QSize(self->sizeHint()); +void QSplitter_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__ResizeEvent = slot; } -struct miqt_string QSplitterHandle_Tr2(const char* s, const char* c) { - QString _ret = QSplitterHandle::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_ResizeEvent(param1); } -struct miqt_string QSplitterHandle_Tr3(const char* s, const char* c, int n) { - QString _ret = QSplitterHandle::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__ChangeEvent = slot; } -struct miqt_string QSplitterHandle_TrUtf82(const char* s, const char* c) { - QString _ret = QSplitterHandle::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_ChangeEvent(param1); } -struct miqt_string QSplitterHandle_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QSplitterHandle::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__PaintEvent = slot; +} + +void QSplitter_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_PaintEvent(param1); +} + +void QSplitter_Delete(QSplitter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QSplitterHandle_Delete(QSplitterHandle* self) { - delete self; +class MiqtVirtualQSplitterHandle : public virtual QSplitterHandle { +public: + + MiqtVirtualQSplitterHandle(Qt::Orientation o, QSplitter* parent): QSplitterHandle(o, parent) {}; + + virtual ~MiqtVirtualQSplitterHandle() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSplitterHandle::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitterHandle_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSplitterHandle::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QSplitterHandle::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QSplitterHandle::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QSplitterHandle::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QSplitterHandle::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QSplitterHandle::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QSplitterHandle::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QSplitterHandle::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QSplitterHandle::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QSplitterHandle::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QSplitterHandle::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSplitterHandle::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSplitterHandle::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSplitterHandle::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSplitterHandle_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSplitterHandle::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QSplitterHandle::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSplitterHandle_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSplitterHandle::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSplitterHandle::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitterHandle_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSplitterHandle::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSplitterHandle::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSplitterHandle_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSplitterHandle::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSplitterHandle::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSplitterHandle::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QSplitterHandle::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSplitterHandle_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSplitterHandle::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QSplitterHandle::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSplitterHandle::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSplitterHandle::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSplitterHandle::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSplitterHandle::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSplitterHandle::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSplitterHandle::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSplitterHandle::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSplitterHandle::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSplitterHandle::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSplitterHandle::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSplitterHandle::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QSplitterHandle::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QSplitterHandle::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QSplitterHandle::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSplitterHandle::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QSplitterHandle::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QSplitterHandle::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSplitterHandle::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSplitterHandle::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSplitterHandle::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSplitterHandle::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QSplitterHandle::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSplitterHandle::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QSplitterHandle::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSplitterHandle::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QSplitterHandle::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSplitterHandle::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QSplitterHandle::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSplitterHandle::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QSplitterHandle::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSplitterHandle::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QSplitterHandle::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSplitterHandle::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QSplitterHandle::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSplitterHandle::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QSplitterHandle::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSplitterHandle::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QSplitterHandle::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QSplitterHandle::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSplitterHandle::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSplitterHandle::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSplitterHandle::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSplitterHandle_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QSplitterHandle::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QSplitterHandle::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSplitterHandle_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSplitterHandle::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QSplitterHandle::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSplitterHandle_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSplitterHandle::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QSplitterHandle::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSplitterHandle_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSplitterHandle::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QSplitterHandle::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSplitterHandle::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSplitterHandle::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSplitterHandle_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSplitterHandle::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QSplitterHandle::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSplitterHandle::focusNextPrevChild(next); + + } + +}; + +void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitterHandle* ret = new MiqtVirtualQSplitterHandle(static_cast(o), parent); + *outptr_QSplitterHandle = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSplitterHandle_Tr(const char* s) { + QString _ret = QSplitterHandle::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSplitterHandle_TrUtf8(const char* s) { + QString _ret = QSplitterHandle::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSplitterHandle_SetOrientation(QSplitterHandle* self, int o) { + self->setOrientation(static_cast(o)); +} + +int QSplitterHandle_Orientation(const QSplitterHandle* self) { + Qt::Orientation _ret = self->orientation(); + return static_cast(_ret); +} + +bool QSplitterHandle_OpaqueResize(const QSplitterHandle* self) { + return self->opaqueResize(); +} + +QSplitter* QSplitterHandle_Splitter(const QSplitterHandle* self) { + return self->splitter(); +} + +QSize* QSplitterHandle_SizeHint(const QSplitterHandle* self) { + return new QSize(self->sizeHint()); +} + +struct miqt_string QSplitterHandle_Tr2(const char* s, const char* c) { + QString _ret = QSplitterHandle::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSplitterHandle_Tr3(const char* s, const char* c, int n) { + QString _ret = QSplitterHandle::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSplitterHandle_TrUtf82(const char* s, const char* c) { + QString _ret = QSplitterHandle::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSplitterHandle_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QSplitterHandle::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSplitterHandle_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__SizeHint = slot; +} + +QSize* QSplitterHandle_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_SizeHint(); +} + +void QSplitterHandle_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__PaintEvent = slot; +} + +void QSplitterHandle_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_PaintEvent(param1); +} + +void QSplitterHandle_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSplitterHandle_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QSplitterHandle_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MousePressEvent = slot; +} + +void QSplitterHandle_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QSplitterHandle_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSplitterHandle_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QSplitterHandle_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ResizeEvent = slot; +} + +void QSplitterHandle_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QSplitterHandle_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__Event = slot; +} + +bool QSplitterHandle_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_Event(param1); +} + +void QSplitterHandle_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DevType = slot; +} + +int QSplitterHandle_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DevType(); +} + +void QSplitterHandle_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__SetVisible = slot; +} + +void QSplitterHandle_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_SetVisible(visible); +} + +void QSplitterHandle_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSplitterHandle_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSplitterHandle_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__HeightForWidth = slot; +} + +int QSplitterHandle_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSplitterHandle_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSplitterHandle_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSplitterHandle_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSplitterHandle_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_PaintEngine(); +} + +void QSplitterHandle_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSplitterHandle_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSplitterHandle_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__WheelEvent = slot; +} + +void QSplitterHandle_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_WheelEvent(event); +} + +void QSplitterHandle_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__KeyPressEvent = slot; +} + +void QSplitterHandle_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSplitterHandle_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSplitterHandle_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSplitterHandle_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__FocusInEvent = slot; +} + +void QSplitterHandle_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSplitterHandle_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__FocusOutEvent = slot; +} + +void QSplitterHandle_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSplitterHandle_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__EnterEvent = slot; +} + +void QSplitterHandle_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_EnterEvent(event); +} + +void QSplitterHandle_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__LeaveEvent = slot; +} + +void QSplitterHandle_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSplitterHandle_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MoveEvent = slot; +} + +void QSplitterHandle_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MoveEvent(event); +} + +void QSplitterHandle_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__CloseEvent = slot; +} + +void QSplitterHandle_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_CloseEvent(event); +} + +void QSplitterHandle_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSplitterHandle_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSplitterHandle_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__TabletEvent = slot; +} + +void QSplitterHandle_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_TabletEvent(event); +} + +void QSplitterHandle_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ActionEvent = slot; +} + +void QSplitterHandle_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ActionEvent(event); +} + +void QSplitterHandle_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DragEnterEvent = slot; +} + +void QSplitterHandle_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSplitterHandle_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DragMoveEvent = slot; +} + +void QSplitterHandle_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSplitterHandle_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSplitterHandle_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSplitterHandle_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DropEvent = slot; +} + +void QSplitterHandle_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DropEvent(event); +} + +void QSplitterHandle_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ShowEvent = slot; +} + +void QSplitterHandle_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ShowEvent(event); +} + +void QSplitterHandle_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__HideEvent = slot; +} + +void QSplitterHandle_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_HideEvent(event); +} + +void QSplitterHandle_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__NativeEvent = slot; +} + +bool QSplitterHandle_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSplitterHandle_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ChangeEvent = slot; +} + +void QSplitterHandle_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSplitterHandle_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__Metric = slot; +} + +int QSplitterHandle_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_Metric(param1); +} + +void QSplitterHandle_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__InitPainter = slot; +} + +void QSplitterHandle_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_InitPainter(painter); +} + +void QSplitterHandle_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSplitterHandle_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_Redirected(offset); +} + +void QSplitterHandle_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSplitterHandle_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_SharedPainter(); +} + +void QSplitterHandle_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__InputMethodEvent = slot; +} + +void QSplitterHandle_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSplitterHandle_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSplitterHandle_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSplitterHandle_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSplitterHandle_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSplitterHandle_Delete(QSplitterHandle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsplitter.go b/qt/gen_qsplitter.go index 6f52f31d..2f42ec04 100644 --- a/qt/gen_qsplitter.go +++ b/qt/gen_qsplitter.go @@ -15,7 +15,8 @@ import ( ) type QSplitter struct { - h *C.QSplitter + h *C.QSplitter + isSubclass bool *QFrame } @@ -33,39 +34,79 @@ func (this *QSplitter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSplitter(h *C.QSplitter) *QSplitter { +// newQSplitter constructs the type using only CGO pointers. +func newQSplitter(h *C.QSplitter, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitter { if h == nil { return nil } - return &QSplitter{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QSplitter{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSplitter(h unsafe.Pointer) *QSplitter { - return newQSplitter((*C.QSplitter)(h)) +// UnsafeNewQSplitter constructs the type using only unsafe pointers. +func UnsafeNewQSplitter(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitter { + if h == nil { + return nil + } + + return &QSplitter{h: (*C.QSplitter)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSplitter constructs a new QSplitter object. func NewQSplitter(parent *QWidget) *QSplitter { - ret := C.QSplitter_new(parent.cPointer()) - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new(parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplitter2 constructs a new QSplitter object. func NewQSplitter2() *QSplitter { - ret := C.QSplitter_new2() - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new2(&outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplitter3 constructs a new QSplitter object. func NewQSplitter3(param1 Orientation) *QSplitter { - ret := C.QSplitter_new3((C.int)(param1)) - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new3((C.int)(param1), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplitter4 constructs a new QSplitter object. func NewQSplitter4(param1 Orientation, parent *QWidget) *QSplitter { - ret := C.QSplitter_new4((C.int)(param1), parent.cPointer()) - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new4((C.int)(param1), parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSplitter) MetaObject() *QMetaObject { @@ -105,7 +146,7 @@ func (this *QSplitter) InsertWidget(index int, widget *QWidget) { } func (this *QSplitter) ReplaceWidget(index int, widget *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer())), nil, nil) } func (this *QSplitter) SetOrientation(orientation Orientation) { @@ -205,7 +246,7 @@ func (this *QSplitter) IndexOf(w *QWidget) int { } func (this *QSplitter) Widget(index int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_Widget(this.h, (C.int)(index)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_Widget(this.h, (C.int)(index))), nil, nil) } func (this *QSplitter) Count() int { @@ -217,7 +258,7 @@ func (this *QSplitter) GetRange(index int, param2 *int, param3 *int) { } func (this *QSplitter) Handle(index int) *QSplitterHandle { - return UnsafeNewQSplitterHandle(unsafe.Pointer(C.QSplitter_Handle(this.h, (C.int)(index)))) + return UnsafeNewQSplitterHandle(unsafe.Pointer(C.QSplitter_Handle(this.h, (C.int)(index))), nil, nil, nil) } func (this *QSplitter) SetStretchFactor(index int, stretch int) { @@ -294,9 +335,197 @@ func (this *QSplitter) SetOpaqueResize1(opaque bool) { C.QSplitter_SetOpaqueResize1(this.h, (C.bool)(opaque)) } +func (this *QSplitter) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSplitter_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitter) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitter_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_SizeHint +func miqt_exec_callback_QSplitter_SizeHint(self *C.QSplitter, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitter) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSplitter_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitter) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitter_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_MinimumSizeHint +func miqt_exec_callback_QSplitter_MinimumSizeHint(self *C.QSplitter, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitter) callVirtualBase_CreateHandle() *QSplitterHandle { + + return UnsafeNewQSplitterHandle(unsafe.Pointer(C.QSplitter_virtualbase_CreateHandle(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QSplitter) OnCreateHandle(slot func(super func() *QSplitterHandle) *QSplitterHandle) { + C.QSplitter_override_virtual_CreateHandle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_CreateHandle +func miqt_exec_callback_QSplitter_CreateHandle(self *C.QSplitter, cb C.intptr_t) *C.QSplitterHandle { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSplitterHandle) *QSplitterHandle) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_CreateHandle) + + return virtualReturn.cPointer() + +} + +func (this *QSplitter) callVirtualBase_ChildEvent(param1 *QChildEvent) { + + C.QSplitter_virtualbase_ChildEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnChildEvent(slot func(super func(param1 *QChildEvent), param1 *QChildEvent)) { + C.QSplitter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_ChildEvent +func miqt_exec_callback_QSplitter_ChildEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QChildEvent), param1 *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSplitter_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSplitter) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSplitter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_Event +func miqt_exec_callback_QSplitter_Event(self *C.QSplitter, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitter) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QSplitter_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QSplitter_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_ResizeEvent +func miqt_exec_callback_QSplitter_ResizeEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSplitter_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSplitter_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_ChangeEvent +func miqt_exec_callback_QSplitter_ChangeEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSplitter{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QSplitter_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QSplitter_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_PaintEvent +func miqt_exec_callback_QSplitter_PaintEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QSplitter) Delete() { - C.QSplitter_Delete(this.h) + C.QSplitter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -309,7 +538,8 @@ func (this *QSplitter) GoGC() { } type QSplitterHandle struct { - h *C.QSplitterHandle + h *C.QSplitterHandle + isSubclass bool *QWidget } @@ -327,21 +557,36 @@ func (this *QSplitterHandle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSplitterHandle(h *C.QSplitterHandle) *QSplitterHandle { +// newQSplitterHandle constructs the type using only CGO pointers. +func newQSplitterHandle(h *C.QSplitterHandle, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitterHandle { if h == nil { return nil } - return &QSplitterHandle{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QSplitterHandle{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSplitterHandle(h unsafe.Pointer) *QSplitterHandle { - return newQSplitterHandle((*C.QSplitterHandle)(h)) +// UnsafeNewQSplitterHandle constructs the type using only unsafe pointers. +func UnsafeNewQSplitterHandle(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitterHandle { + if h == nil { + return nil + } + + return &QSplitterHandle{h: (*C.QSplitterHandle)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSplitterHandle constructs a new QSplitterHandle object. func NewQSplitterHandle(o Orientation, parent *QSplitter) *QSplitterHandle { - ret := C.QSplitterHandle_new((C.int)(o), parent.cPointer()) - return newQSplitterHandle(ret) + var outptr_QSplitterHandle *C.QSplitterHandle = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitterHandle_new((C.int)(o), parent.cPointer(), &outptr_QSplitterHandle, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitterHandle(outptr_QSplitterHandle, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSplitterHandle) MetaObject() *QMetaObject { @@ -385,7 +630,7 @@ func (this *QSplitterHandle) OpaqueResize() bool { } func (this *QSplitterHandle) Splitter() *QSplitter { - return UnsafeNewQSplitter(unsafe.Pointer(C.QSplitterHandle_Splitter(this.h))) + return UnsafeNewQSplitter(unsafe.Pointer(C.QSplitterHandle_Splitter(this.h)), nil, nil, nil, nil) } func (this *QSplitterHandle) SizeHint() *QSize { @@ -439,9 +684,975 @@ func QSplitterHandle_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSplitterHandle) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSplitterHandle_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitterHandle) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitterHandle_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_SizeHint +func miqt_exec_callback_QSplitterHandle_SizeHint(self *C.QSplitterHandle, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QSplitterHandle_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QSplitterHandle_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_PaintEvent +func miqt_exec_callback_QSplitterHandle_PaintEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MouseMoveEvent +func miqt_exec_callback_QSplitterHandle_MouseMoveEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MousePressEvent +func miqt_exec_callback_QSplitterHandle_MousePressEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MouseReleaseEvent +func miqt_exec_callback_QSplitterHandle_MouseReleaseEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QSplitterHandle_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QSplitterHandle_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ResizeEvent +func miqt_exec_callback_QSplitterHandle_ResizeEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSplitterHandle_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSplitterHandle) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSplitterHandle_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_Event +func miqt_exec_callback_QSplitterHandle_Event(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_DevType() int { + + return (int)(C.QSplitterHandle_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSplitterHandle) OnDevType(slot func(super func() int) int) { + C.QSplitterHandle_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DevType +func miqt_exec_callback_QSplitterHandle_DevType(self *C.QSplitterHandle, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_SetVisible(visible bool) { + + C.QSplitterHandle_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSplitterHandle) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSplitterHandle_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_SetVisible +func miqt_exec_callback_QSplitterHandle_SetVisible(self *C.QSplitterHandle, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSplitterHandle_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitterHandle) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitterHandle_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MinimumSizeHint +func miqt_exec_callback_QSplitterHandle_MinimumSizeHint(self *C.QSplitterHandle, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSplitterHandle_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplitterHandle) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSplitterHandle_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_HeightForWidth +func miqt_exec_callback_QSplitterHandle_HeightForWidth(self *C.QSplitterHandle, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSplitterHandle_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSplitterHandle) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSplitterHandle_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_HasHeightForWidth +func miqt_exec_callback_QSplitterHandle_HasHeightForWidth(self *C.QSplitterHandle, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QSplitterHandle_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSplitterHandle) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QSplitterHandle_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_PaintEngine +func miqt_exec_callback_QSplitterHandle_PaintEngine(self *C.QSplitterHandle, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent +func miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSplitterHandle_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSplitterHandle_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_WheelEvent +func miqt_exec_callback_QSplitterHandle_WheelEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSplitterHandle_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplitterHandle_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_KeyPressEvent +func miqt_exec_callback_QSplitterHandle_KeyPressEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSplitterHandle_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplitterHandle_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_KeyReleaseEvent +func miqt_exec_callback_QSplitterHandle_KeyReleaseEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSplitterHandle_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplitterHandle_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_FocusInEvent +func miqt_exec_callback_QSplitterHandle_FocusInEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSplitterHandle_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplitterHandle_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_FocusOutEvent +func miqt_exec_callback_QSplitterHandle_FocusOutEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_EnterEvent(event *QEvent) { + + C.QSplitterHandle_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSplitterHandle_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_EnterEvent +func miqt_exec_callback_QSplitterHandle_EnterEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QSplitterHandle_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSplitterHandle_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_LeaveEvent +func miqt_exec_callback_QSplitterHandle_LeaveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QSplitterHandle_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QSplitterHandle_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MoveEvent +func miqt_exec_callback_QSplitterHandle_MoveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSplitterHandle_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSplitterHandle_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_CloseEvent +func miqt_exec_callback_QSplitterHandle_CloseEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSplitterHandle_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSplitterHandle_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ContextMenuEvent +func miqt_exec_callback_QSplitterHandle_ContextMenuEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QSplitterHandle_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QSplitterHandle_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_TabletEvent +func miqt_exec_callback_QSplitterHandle_TabletEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QSplitterHandle_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QSplitterHandle_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ActionEvent +func miqt_exec_callback_QSplitterHandle_ActionEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QSplitterHandle_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QSplitterHandle_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DragEnterEvent +func miqt_exec_callback_QSplitterHandle_DragEnterEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QSplitterHandle_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QSplitterHandle_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DragMoveEvent +func miqt_exec_callback_QSplitterHandle_DragMoveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QSplitterHandle_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QSplitterHandle_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DragLeaveEvent +func miqt_exec_callback_QSplitterHandle_DragLeaveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QSplitterHandle_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QSplitterHandle_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DropEvent +func miqt_exec_callback_QSplitterHandle_DropEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QSplitterHandle_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QSplitterHandle_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ShowEvent +func miqt_exec_callback_QSplitterHandle_ShowEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QSplitterHandle_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QSplitterHandle_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_HideEvent +func miqt_exec_callback_QSplitterHandle_HideEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QSplitterHandle_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QSplitterHandle) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QSplitterHandle_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_NativeEvent +func miqt_exec_callback_QSplitterHandle_NativeEvent(self *C.QSplitterHandle, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSplitterHandle_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSplitterHandle_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ChangeEvent +func miqt_exec_callback_QSplitterHandle_ChangeEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSplitterHandle_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplitterHandle) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QSplitterHandle_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_Metric +func miqt_exec_callback_QSplitterHandle_Metric(self *C.QSplitterHandle, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_InitPainter(painter *QPainter) { + + C.QSplitterHandle_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSplitterHandle) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSplitterHandle_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_InitPainter +func miqt_exec_callback_QSplitterHandle_InitPainter(self *C.QSplitterHandle, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QSplitterHandle_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QSplitterHandle) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QSplitterHandle_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_Redirected +func miqt_exec_callback_QSplitterHandle_Redirected(self *C.QSplitterHandle, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QSplitterHandle_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSplitterHandle) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QSplitterHandle_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_SharedPainter +func miqt_exec_callback_QSplitterHandle_SharedPainter(self *C.QSplitterHandle, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QSplitterHandle_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QSplitterHandle_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_InputMethodEvent +func miqt_exec_callback_QSplitterHandle_InputMethodEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSplitterHandle_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitterHandle) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSplitterHandle_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_InputMethodQuery +func miqt_exec_callback_QSplitterHandle_InputMethodQuery(self *C.QSplitterHandle, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSplitterHandle_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSplitterHandle) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSplitterHandle_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_FocusNextPrevChild +func miqt_exec_callback_QSplitterHandle_FocusNextPrevChild(self *C.QSplitterHandle, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSplitterHandle) Delete() { - C.QSplitterHandle_Delete(this.h) + C.QSplitterHandle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsplitter.h b/qt/gen_qsplitter.h index f9f8818d..6d1a19f3 100644 --- a/qt/gen_qsplitter.h +++ b/qt/gen_qsplitter.h @@ -15,25 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QSplitter; class QSplitterHandle; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QSplitter QSplitter; typedef struct QSplitterHandle QSplitterHandle; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSplitter* QSplitter_new(QWidget* parent); -QSplitter* QSplitter_new2(); -QSplitter* QSplitter_new3(int param1); -QSplitter* QSplitter_new4(int param1, QWidget* parent); +void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSplitter_MetaObject(const QSplitter* self); void* QSplitter_Metacast(QSplitter* self, const char* param1); struct miqt_string QSplitter_Tr(const char* s); @@ -66,14 +120,35 @@ QSplitterHandle* QSplitter_Handle(const QSplitter* self, int index); void QSplitter_SetStretchFactor(QSplitter* self, int index, int stretch); void QSplitter_SplitterMoved(QSplitter* self, int pos, int index); void QSplitter_connect_SplitterMoved(QSplitter* self, intptr_t slot); +QSplitterHandle* QSplitter_CreateHandle(QSplitter* self); +void QSplitter_ChildEvent(QSplitter* self, QChildEvent* param1); +bool QSplitter_Event(QSplitter* self, QEvent* param1); +void QSplitter_ResizeEvent(QSplitter* self, QResizeEvent* param1); +void QSplitter_ChangeEvent(QSplitter* self, QEvent* param1); struct miqt_string QSplitter_Tr2(const char* s, const char* c); struct miqt_string QSplitter_Tr3(const char* s, const char* c, int n); struct miqt_string QSplitter_TrUtf82(const char* s, const char* c); struct miqt_string QSplitter_TrUtf83(const char* s, const char* c, int n); void QSplitter_SetOpaqueResize1(QSplitter* self, bool opaque); -void QSplitter_Delete(QSplitter* self); +void QSplitter_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSplitter_virtualbase_SizeHint(const void* self); +void QSplitter_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSplitter_virtualbase_MinimumSizeHint(const void* self); +void QSplitter_override_virtual_CreateHandle(void* self, intptr_t slot); +QSplitterHandle* QSplitter_virtualbase_CreateHandle(void* self); +void QSplitter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_ChildEvent(void* self, QChildEvent* param1); +void QSplitter_override_virtual_Event(void* self, intptr_t slot); +bool QSplitter_virtualbase_Event(void* self, QEvent* param1); +void QSplitter_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QSplitter_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSplitter_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QSplitter_Delete(QSplitter* self, bool isSubclass); -QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent); +void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self); void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1); struct miqt_string QSplitterHandle_Tr(const char* s); @@ -83,11 +158,99 @@ int QSplitterHandle_Orientation(const QSplitterHandle* self); bool QSplitterHandle_OpaqueResize(const QSplitterHandle* self); QSplitter* QSplitterHandle_Splitter(const QSplitterHandle* self); QSize* QSplitterHandle_SizeHint(const QSplitterHandle* self); +void QSplitterHandle_PaintEvent(QSplitterHandle* self, QPaintEvent* param1); +void QSplitterHandle_MouseMoveEvent(QSplitterHandle* self, QMouseEvent* param1); +void QSplitterHandle_MousePressEvent(QSplitterHandle* self, QMouseEvent* param1); +void QSplitterHandle_MouseReleaseEvent(QSplitterHandle* self, QMouseEvent* param1); +void QSplitterHandle_ResizeEvent(QSplitterHandle* self, QResizeEvent* param1); +bool QSplitterHandle_Event(QSplitterHandle* self, QEvent* param1); struct miqt_string QSplitterHandle_Tr2(const char* s, const char* c); struct miqt_string QSplitterHandle_Tr3(const char* s, const char* c, int n); struct miqt_string QSplitterHandle_TrUtf82(const char* s, const char* c); struct miqt_string QSplitterHandle_TrUtf83(const char* s, const char* c, int n); -void QSplitterHandle_Delete(QSplitterHandle* self); +void QSplitterHandle_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSplitterHandle_virtualbase_SizeHint(const void* self); +void QSplitterHandle_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QSplitterHandle_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QSplitterHandle_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QSplitterHandle_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QSplitterHandle_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QSplitterHandle_override_virtual_Event(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_Event(void* self, QEvent* param1); +void QSplitterHandle_override_virtual_DevType(void* self, intptr_t slot); +int QSplitterHandle_virtualbase_DevType(const void* self); +void QSplitterHandle_override_virtual_SetVisible(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_SetVisible(void* self, bool visible); +void QSplitterHandle_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSplitterHandle_virtualbase_MinimumSizeHint(const void* self); +void QSplitterHandle_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSplitterHandle_virtualbase_HeightForWidth(const void* self, int param1); +void QSplitterHandle_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_HasHeightForWidth(const void* self); +void QSplitterHandle_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSplitterHandle_virtualbase_PaintEngine(const void* self); +void QSplitterHandle_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSplitterHandle_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSplitterHandle_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSplitterHandle_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSplitterHandle_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSplitterHandle_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSplitterHandle_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_EnterEvent(void* self, QEvent* event); +void QSplitterHandle_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSplitterHandle_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QSplitterHandle_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSplitterHandle_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSplitterHandle_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSplitterHandle_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSplitterHandle_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSplitterHandle_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSplitterHandle_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSplitterHandle_override_virtual_DropEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSplitterHandle_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSplitterHandle_override_virtual_HideEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSplitterHandle_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QSplitterHandle_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSplitterHandle_override_virtual_Metric(void* self, intptr_t slot); +int QSplitterHandle_virtualbase_Metric(const void* self, int param1); +void QSplitterHandle_override_virtual_InitPainter(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSplitterHandle_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSplitterHandle_virtualbase_Redirected(const void* self, QPoint* offset); +void QSplitterHandle_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSplitterHandle_virtualbase_SharedPainter(const void* self); +void QSplitterHandle_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSplitterHandle_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSplitterHandle_virtualbase_InputMethodQuery(const void* self, int param1); +void QSplitterHandle_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSplitterHandle_Delete(QSplitterHandle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstackedlayout.cpp b/qt/gen_qstackedlayout.cpp index 1e689772..4fea5046 100644 --- a/qt/gen_qstackedlayout.cpp +++ b/qt/gen_qstackedlayout.cpp @@ -1,6 +1,8 @@ +#include #include #include #include +#include #include #include #include @@ -12,16 +14,450 @@ #include "gen_qstackedlayout.h" #include "_cgo_export.h" -QStackedLayout* QStackedLayout_new(QWidget* parent) { - return new QStackedLayout(parent); +class MiqtVirtualQStackedLayout : public virtual QStackedLayout { +public: + + MiqtVirtualQStackedLayout(QWidget* parent): QStackedLayout(parent) {}; + MiqtVirtualQStackedLayout(): QStackedLayout() {}; + MiqtVirtualQStackedLayout(QLayout* parentLayout): QStackedLayout(parentLayout) {}; + + virtual ~MiqtVirtualQStackedLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QStackedLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QStackedLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* item) override { + if (handle__AddItem == 0) { + QStackedLayout::addItem(item); + return; + } + + QLayoutItem* sigval1 = item; + + miqt_exec_callback_QStackedLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* item) { + + QStackedLayout::addItem(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QStackedLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QStackedLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QStackedLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QStackedLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QStackedLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QStackedLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QStackedLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QStackedLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QStackedLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QStackedLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& rect) override { + if (handle__SetGeometry == 0) { + QStackedLayout::setGeometry(rect); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QStackedLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* rect) { + + QStackedLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QStackedLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QStackedLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QStackedLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QStackedLayout::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QStackedLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QStackedLayout::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QStackedLayout::invalidate(); + return; + } + + + miqt_exec_callback_QStackedLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QStackedLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QStackedLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QStackedLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QStackedLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QStackedLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QStackedLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QStackedLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QStackedLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QStackedLayout::indexOf(param1); + } + + QWidget* sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QStackedLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QStackedLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QStackedLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QStackedLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QStackedLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QStackedLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QStackedLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QStackedLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QStackedLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QStackedLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QStackedLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QStackedLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QStackedLayout::childEvent(e); + + } + +}; + +void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parent); + *outptr_QStackedLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QStackedLayout* QStackedLayout_new2() { - return new QStackedLayout(); +void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(); + *outptr_QStackedLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QStackedLayout* QStackedLayout_new3(QLayout* parentLayout) { - return new QStackedLayout(parentLayout); +void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parentLayout); + *outptr_QStackedLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self) { @@ -124,7 +560,7 @@ void QStackedLayout_WidgetRemoved(QStackedLayout* self, int index) { } void QStackedLayout_connect_WidgetRemoved(QStackedLayout* self, intptr_t slot) { - QStackedLayout::connect(self, static_cast(&QStackedLayout::widgetRemoved), self, [=](int index) { + MiqtVirtualQStackedLayout::connect(self, static_cast(&QStackedLayout::widgetRemoved), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QStackedLayout_WidgetRemoved(slot, sigval1); }); @@ -135,7 +571,7 @@ void QStackedLayout_CurrentChanged(QStackedLayout* self, int index) { } void QStackedLayout_connect_CurrentChanged(QStackedLayout* self, intptr_t slot) { - QStackedLayout::connect(self, static_cast(&QStackedLayout::currentChanged), self, [=](int index) { + MiqtVirtualQStackedLayout::connect(self, static_cast(&QStackedLayout::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QStackedLayout_CurrentChanged(slot, sigval1); }); @@ -193,7 +629,155 @@ struct miqt_string QStackedLayout_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QStackedLayout_Delete(QStackedLayout* self) { - delete self; +void QStackedLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Count = slot; +} + +int QStackedLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_Count(); +} + +void QStackedLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__AddItem = slot; +} + +void QStackedLayout_virtualbase_AddItem(void* self, QLayoutItem* item) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_AddItem(item); +} + +void QStackedLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QStackedLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_SizeHint(); +} + +void QStackedLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QStackedLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QStackedLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QStackedLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QStackedLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QStackedLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QStackedLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__SetGeometry = slot; +} + +void QStackedLayout_virtualbase_SetGeometry(void* self, QRect* rect) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QStackedLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QStackedLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QStackedLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QStackedLayout_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_HeightForWidth(width); +} + +void QStackedLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Invalidate = slot; +} + +void QStackedLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_Invalidate(); +} + +void QStackedLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QStackedLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_Geometry(); +} + +void QStackedLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QStackedLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QStackedLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QStackedLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QStackedLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__IndexOf = slot; +} + +int QStackedLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QStackedLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QStackedLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QStackedLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ControlTypes = slot; +} + +int QStackedLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QStackedLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QStackedLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_Layout(); +} + +void QStackedLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ChildEvent = slot; +} + +void QStackedLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QStackedLayout_Delete(QStackedLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstackedlayout.go b/qt/gen_qstackedlayout.go index 933573bc..0c1a9859 100644 --- a/qt/gen_qstackedlayout.go +++ b/qt/gen_qstackedlayout.go @@ -22,7 +22,8 @@ const ( ) type QStackedLayout struct { - h *C.QStackedLayout + h *C.QStackedLayout + isSubclass bool *QLayout } @@ -40,33 +41,62 @@ func (this *QStackedLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStackedLayout(h *C.QStackedLayout) *QStackedLayout { +// newQStackedLayout constructs the type using only CGO pointers. +func newQStackedLayout(h *C.QStackedLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QStackedLayout { if h == nil { return nil } - return &QStackedLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QStackedLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQStackedLayout(h unsafe.Pointer) *QStackedLayout { - return newQStackedLayout((*C.QStackedLayout)(h)) +// UnsafeNewQStackedLayout constructs the type using only unsafe pointers. +func UnsafeNewQStackedLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QStackedLayout { + if h == nil { + return nil + } + + return &QStackedLayout{h: (*C.QStackedLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQStackedLayout constructs a new QStackedLayout object. func NewQStackedLayout(parent *QWidget) *QStackedLayout { - ret := C.QStackedLayout_new(parent.cPointer()) - return newQStackedLayout(ret) + var outptr_QStackedLayout *C.QStackedLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QStackedLayout_new(parent.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQStackedLayout2 constructs a new QStackedLayout object. func NewQStackedLayout2() *QStackedLayout { - ret := C.QStackedLayout_new2() - return newQStackedLayout(ret) + var outptr_QStackedLayout *C.QStackedLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QStackedLayout_new2(&outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQStackedLayout3 constructs a new QStackedLayout object. func NewQStackedLayout3(parentLayout *QLayout) *QStackedLayout { - ret := C.QStackedLayout_new3(parentLayout.cPointer()) - return newQStackedLayout(ret) + var outptr_QStackedLayout *C.QStackedLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QStackedLayout_new3(parentLayout.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QStackedLayout) MetaObject() *QMetaObject { @@ -106,7 +136,7 @@ func (this *QStackedLayout) InsertWidget(index int, w *QWidget) int { } func (this *QStackedLayout) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_CurrentWidget(this.h)), nil, nil) } func (this *QStackedLayout) CurrentIndex() int { @@ -114,7 +144,7 @@ func (this *QStackedLayout) CurrentIndex() int { } func (this *QStackedLayout) Widget(param1 int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_Widget(this.h, (C.int)(param1)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_Widget(this.h, (C.int)(param1))), nil, nil) } func (this *QStackedLayout) Count() int { @@ -259,9 +289,427 @@ func QStackedLayout_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QStackedLayout) callVirtualBase_Count() int { + + return (int)(C.QStackedLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnCount(slot func(super func() int) int) { + C.QStackedLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Count +func miqt_exec_callback_QStackedLayout_Count(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_AddItem(item *QLayoutItem) { + + C.QStackedLayout_virtualbase_AddItem(unsafe.Pointer(this.h), item.cPointer()) + +} +func (this *QStackedLayout) OnAddItem(slot func(super func(item *QLayoutItem), item *QLayoutItem)) { + C.QStackedLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_AddItem +func miqt_exec_callback_QStackedLayout_AddItem(self *C.QStackedLayout, cb C.intptr_t, item *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QLayoutItem), item *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(item)) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QStackedLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QStackedLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QStackedLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_SizeHint +func miqt_exec_callback_QStackedLayout_SizeHint(self *C.QStackedLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QStackedLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QStackedLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_MinimumSize +func miqt_exec_callback_QStackedLayout_MinimumSize(self *C.QStackedLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QStackedLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QStackedLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QStackedLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ItemAt +func miqt_exec_callback_QStackedLayout_ItemAt(self *C.QStackedLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QStackedLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QStackedLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QStackedLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_TakeAt +func miqt_exec_callback_QStackedLayout_TakeAt(self *C.QStackedLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_SetGeometry(rect *QRect) { + + C.QStackedLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QStackedLayout) OnSetGeometry(slot func(super func(rect *QRect), rect *QRect)) { + C.QStackedLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_SetGeometry +func miqt_exec_callback_QStackedLayout_SetGeometry(self *C.QStackedLayout, cb C.intptr_t, rect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect), rect *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QStackedLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QStackedLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QStackedLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_HasHeightForWidth +func miqt_exec_callback_QStackedLayout_HasHeightForWidth(self *C.QStackedLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QStackedLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QStackedLayout) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QStackedLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_HeightForWidth +func miqt_exec_callback_QStackedLayout_HeightForWidth(self *C.QStackedLayout, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_Invalidate() { + + C.QStackedLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QStackedLayout) OnInvalidate(slot func(super func())) { + C.QStackedLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Invalidate +func miqt_exec_callback_QStackedLayout_Invalidate(self *C.QStackedLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QStackedLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QStackedLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QStackedLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QStackedLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Geometry +func miqt_exec_callback_QStackedLayout_Geometry(self *C.QStackedLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QStackedLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QStackedLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ExpandingDirections +func miqt_exec_callback_QStackedLayout_ExpandingDirections(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QStackedLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QStackedLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_MaximumSize +func miqt_exec_callback_QStackedLayout_MaximumSize(self *C.QStackedLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QStackedLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QStackedLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QStackedLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_IndexOf +func miqt_exec_callback_QStackedLayout_IndexOf(self *C.QStackedLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QStackedLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QStackedLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_IsEmpty +func miqt_exec_callback_QStackedLayout_IsEmpty(self *C.QStackedLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QStackedLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QStackedLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ControlTypes +func miqt_exec_callback_QStackedLayout_ControlTypes(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QStackedLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QStackedLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QStackedLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Layout +func miqt_exec_callback_QStackedLayout_Layout(self *C.QStackedLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QStackedLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QStackedLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QStackedLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ChildEvent +func miqt_exec_callback_QStackedLayout_ChildEvent(self *C.QStackedLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QStackedLayout) Delete() { - C.QStackedLayout_Delete(this.h) + C.QStackedLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstackedlayout.h b/qt/gen_qstackedlayout.h index 63ca449b..190aedd0 100644 --- a/qt/gen_qstackedlayout.h +++ b/qt/gen_qstackedlayout.h @@ -15,26 +15,30 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QStackedLayout; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QStackedLayout QStackedLayout; typedef struct QWidget QWidget; #endif -QStackedLayout* QStackedLayout_new(QWidget* parent); -QStackedLayout* QStackedLayout_new2(); -QStackedLayout* QStackedLayout_new3(QLayout* parentLayout); +void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self); void* QStackedLayout_Metacast(QStackedLayout* self, const char* param1); struct miqt_string QStackedLayout_Tr(const char* s); @@ -65,7 +69,43 @@ struct miqt_string QStackedLayout_Tr2(const char* s, const char* c); struct miqt_string QStackedLayout_Tr3(const char* s, const char* c, int n); struct miqt_string QStackedLayout_TrUtf82(const char* s, const char* c); struct miqt_string QStackedLayout_TrUtf83(const char* s, const char* c, int n); -void QStackedLayout_Delete(QStackedLayout* self); +void QStackedLayout_override_virtual_Count(void* self, intptr_t slot); +int QStackedLayout_virtualbase_Count(const void* self); +void QStackedLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QStackedLayout_virtualbase_AddItem(void* self, QLayoutItem* item); +void QStackedLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStackedLayout_virtualbase_SizeHint(const void* self); +void QStackedLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QStackedLayout_virtualbase_MinimumSize(const void* self); +void QStackedLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QStackedLayout_virtualbase_ItemAt(const void* self, int param1); +void QStackedLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QStackedLayout_virtualbase_TakeAt(void* self, int param1); +void QStackedLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QStackedLayout_virtualbase_SetGeometry(void* self, QRect* rect); +void QStackedLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QStackedLayout_virtualbase_HasHeightForWidth(const void* self); +void QStackedLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QStackedLayout_virtualbase_HeightForWidth(const void* self, int width); +void QStackedLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QStackedLayout_virtualbase_Invalidate(void* self); +void QStackedLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QStackedLayout_virtualbase_Geometry(const void* self); +void QStackedLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QStackedLayout_virtualbase_ExpandingDirections(const void* self); +void QStackedLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QStackedLayout_virtualbase_MaximumSize(const void* self); +void QStackedLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QStackedLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QStackedLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QStackedLayout_virtualbase_IsEmpty(const void* self); +void QStackedLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QStackedLayout_virtualbase_ControlTypes(const void* self); +void QStackedLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QStackedLayout_virtualbase_Layout(void* self); +void QStackedLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QStackedLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QStackedLayout_Delete(QStackedLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstackedwidget.cpp b/qt/gen_qstackedwidget.cpp index b47bffa0..9ab30d99 100644 --- a/qt/gen_qstackedwidget.cpp +++ b/qt/gen_qstackedwidget.cpp @@ -1,4 +1,10 @@ +#include +#include #include +#include +#include +#include +#include #include #include #include @@ -8,12 +14,125 @@ #include "gen_qstackedwidget.h" #include "_cgo_export.h" -QStackedWidget* QStackedWidget_new(QWidget* parent) { - return new QStackedWidget(parent); +class MiqtVirtualQStackedWidget : public virtual QStackedWidget { +public: + + MiqtVirtualQStackedWidget(QWidget* parent): QStackedWidget(parent) {}; + MiqtVirtualQStackedWidget(): QStackedWidget() {}; + + virtual ~MiqtVirtualQStackedWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QStackedWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QStackedWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QStackedWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QStackedWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QStackedWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QStackedWidget::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QStackedWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QStackedWidget::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QStackedWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QStackedWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QStackedWidget::changeEvent(param1); + + } + +}; + +void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(parent); + *outptr_QStackedWidget = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QStackedWidget* QStackedWidget_new2() { - return new QStackedWidget(); +void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(); + *outptr_QStackedWidget = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self) { @@ -91,7 +210,7 @@ void QStackedWidget_CurrentChanged(QStackedWidget* self, int param1) { } void QStackedWidget_connect_CurrentChanged(QStackedWidget* self, intptr_t slot) { - QStackedWidget::connect(self, static_cast(&QStackedWidget::currentChanged), self, [=](int param1) { + MiqtVirtualQStackedWidget::connect(self, static_cast(&QStackedWidget::currentChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QStackedWidget_CurrentChanged(slot, sigval1); }); @@ -102,7 +221,7 @@ void QStackedWidget_WidgetRemoved(QStackedWidget* self, int index) { } void QStackedWidget_connect_WidgetRemoved(QStackedWidget* self, intptr_t slot) { - QStackedWidget::connect(self, static_cast(&QStackedWidget::widgetRemoved), self, [=](int index) { + MiqtVirtualQStackedWidget::connect(self, static_cast(&QStackedWidget::widgetRemoved), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QStackedWidget_WidgetRemoved(slot, sigval1); }); @@ -152,7 +271,43 @@ struct miqt_string QStackedWidget_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QStackedWidget_Delete(QStackedWidget* self) { - delete self; +void QStackedWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__Event = slot; +} + +bool QStackedWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQStackedWidget*)(self) )->virtualbase_Event(e); +} + +void QStackedWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QStackedWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQStackedWidget*)(self) )->virtualbase_SizeHint(); +} + +void QStackedWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__PaintEvent = slot; +} + +void QStackedWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQStackedWidget*)(self) )->virtualbase_PaintEvent(param1); +} + +void QStackedWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QStackedWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQStackedWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QStackedWidget_Delete(QStackedWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstackedwidget.go b/qt/gen_qstackedwidget.go index fcf196a3..3ee7ddb1 100644 --- a/qt/gen_qstackedwidget.go +++ b/qt/gen_qstackedwidget.go @@ -15,7 +15,8 @@ import ( ) type QStackedWidget struct { - h *C.QStackedWidget + h *C.QStackedWidget + isSubclass bool *QFrame } @@ -33,27 +34,51 @@ func (this *QStackedWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStackedWidget(h *C.QStackedWidget) *QStackedWidget { +// newQStackedWidget constructs the type using only CGO pointers. +func newQStackedWidget(h *C.QStackedWidget, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStackedWidget { if h == nil { return nil } - return &QStackedWidget{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QStackedWidget{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQStackedWidget(h unsafe.Pointer) *QStackedWidget { - return newQStackedWidget((*C.QStackedWidget)(h)) +// UnsafeNewQStackedWidget constructs the type using only unsafe pointers. +func UnsafeNewQStackedWidget(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStackedWidget { + if h == nil { + return nil + } + + return &QStackedWidget{h: (*C.QStackedWidget)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQStackedWidget constructs a new QStackedWidget object. func NewQStackedWidget(parent *QWidget) *QStackedWidget { - ret := C.QStackedWidget_new(parent.cPointer()) - return newQStackedWidget(ret) + var outptr_QStackedWidget *C.QStackedWidget = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStackedWidget_new(parent.cPointer(), &outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQStackedWidget2 constructs a new QStackedWidget object. func NewQStackedWidget2() *QStackedWidget { - ret := C.QStackedWidget_new2() - return newQStackedWidget(ret) + var outptr_QStackedWidget *C.QStackedWidget = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStackedWidget_new2(&outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QStackedWidget) MetaObject() *QMetaObject { @@ -97,7 +122,7 @@ func (this *QStackedWidget) RemoveWidget(w *QWidget) { } func (this *QStackedWidget) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_CurrentWidget(this.h)), nil, nil) } func (this *QStackedWidget) CurrentIndex() int { @@ -109,7 +134,7 @@ func (this *QStackedWidget) IndexOf(param1 *QWidget) int { } func (this *QStackedWidget) Widget(param1 int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_Widget(this.h, (C.int)(param1)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_Widget(this.h, (C.int)(param1))), nil, nil) } func (this *QStackedWidget) Count() int { @@ -208,9 +233,105 @@ func QStackedWidget_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QStackedWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QStackedWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QStackedWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QStackedWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_Event +func miqt_exec_callback_QStackedWidget_Event(self *C.QStackedWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QStackedWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStackedWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QStackedWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QStackedWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_SizeHint +func miqt_exec_callback_QStackedWidget_SizeHint(self *C.QStackedWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStackedWidget) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QStackedWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStackedWidget) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QStackedWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_PaintEvent +func miqt_exec_callback_QStackedWidget_PaintEvent(self *C.QStackedWidget, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStackedWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QStackedWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QStackedWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStackedWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QStackedWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_ChangeEvent +func miqt_exec_callback_QStackedWidget_ChangeEvent(self *C.QStackedWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QStackedWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QStackedWidget) Delete() { - C.QStackedWidget_Delete(this.h) + C.QStackedWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstackedwidget.h b/qt/gen_qstackedwidget.h index e7a1e958..ebba3e99 100644 --- a/qt/gen_qstackedwidget.h +++ b/qt/gen_qstackedwidget.h @@ -15,17 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QFrame; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QSize; class QStackedWidget; class QWidget; #else +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QSize QSize; typedef struct QStackedWidget QStackedWidget; typedef struct QWidget QWidget; #endif -QStackedWidget* QStackedWidget_new(QWidget* parent); -QStackedWidget* QStackedWidget_new2(); +void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self); void* QStackedWidget_Metacast(QStackedWidget* self, const char* param1); struct miqt_string QStackedWidget_Tr(const char* s); @@ -44,11 +56,20 @@ void QStackedWidget_CurrentChanged(QStackedWidget* self, int param1); void QStackedWidget_connect_CurrentChanged(QStackedWidget* self, intptr_t slot); void QStackedWidget_WidgetRemoved(QStackedWidget* self, int index); void QStackedWidget_connect_WidgetRemoved(QStackedWidget* self, intptr_t slot); +bool QStackedWidget_Event(QStackedWidget* self, QEvent* e); struct miqt_string QStackedWidget_Tr2(const char* s, const char* c); struct miqt_string QStackedWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QStackedWidget_TrUtf82(const char* s, const char* c); struct miqt_string QStackedWidget_TrUtf83(const char* s, const char* c, int n); -void QStackedWidget_Delete(QStackedWidget* self); +void QStackedWidget_override_virtual_Event(void* self, intptr_t slot); +bool QStackedWidget_virtualbase_Event(void* self, QEvent* e); +void QStackedWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStackedWidget_virtualbase_SizeHint(const void* self); +void QStackedWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QStackedWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QStackedWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QStackedWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QStackedWidget_Delete(QStackedWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstandarditemmodel.cpp b/qt/gen_qstandarditemmodel.cpp index 2f407cea..c6b9cc78 100644 --- a/qt/gen_qstandarditemmodel.cpp +++ b/qt/gen_qstandarditemmodel.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -20,34 +21,223 @@ #include "gen_qstandarditemmodel.h" #include "_cgo_export.h" -QStandardItem* QStandardItem_new() { - return new QStandardItem(); +class MiqtVirtualQStandardItem : public virtual QStandardItem { +public: + + MiqtVirtualQStandardItem(): QStandardItem() {}; + MiqtVirtualQStandardItem(const QString& text): QStandardItem(text) {}; + MiqtVirtualQStandardItem(const QIcon& icon, const QString& text): QStandardItem(icon, text) {}; + MiqtVirtualQStandardItem(int rows): QStandardItem(rows) {}; + MiqtVirtualQStandardItem(int rows, int columns): QStandardItem(rows, columns) {}; + + virtual ~MiqtVirtualQStandardItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int role) const override { + if (handle__Data == 0) { + return QStandardItem::data(role); + } + + int sigval1 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStandardItem_Data(const_cast(this), handle__Data, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int role) const { + + return new QVariant(QStandardItem::data(static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(const QVariant& value, int role) override { + if (handle__SetData == 0) { + QStandardItem::setData(value, role); + return; + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + int sigval2 = role; + + miqt_exec_callback_QStandardItem_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(QVariant* value, int role) { + + QStandardItem::setData(*value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QStandardItem* clone() const override { + if (handle__Clone == 0) { + return QStandardItem::clone(); + } + + + QStandardItem* callback_return_value = miqt_exec_callback_QStandardItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QStandardItem* virtualbase_Clone() const { + + return QStandardItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QStandardItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QStandardItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QStandardItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QStandardItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QStandardItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QStandardItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QStandardItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QStandardItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QStandardItem::write(*out); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QStandardItem& other) const override { + if (handle__OperatorLesser == 0) { + return QStandardItem::operator<(other); + } + + const QStandardItem& other_ret = other; + // Cast returned reference into pointer + QStandardItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QStandardItem* other) const { + + return QStandardItem::operator<(*other); + + } + +}; + +void QStandardItem_new(QStandardItem** outptr_QStandardItem) { + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new2(struct miqt_string text) { +void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QStandardItem(text_QString); + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(text_QString); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text) { +void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QStandardItem(*icon, text_QString); + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(*icon, text_QString); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new4(int rows) { - return new QStandardItem(static_cast(rows)); +void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem) { + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows)); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new5(int rows, int columns) { - return new QStandardItem(static_cast(rows), static_cast(columns)); +void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem) { + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows), static_cast(columns)); + *outptr_QStandardItem = ret; } -QVariant* QStandardItem_Data(const QStandardItem* self) { - return new QVariant(self->data()); +QVariant* QStandardItem_Data(const QStandardItem* self, int role) { + return new QVariant(self->data(static_cast(role))); } -void QStandardItem_SetData(QStandardItem* self, QVariant* value) { - self->setData(*value); +void QStandardItem_SetData(QStandardItem* self, QVariant* value, int role) { + self->setData(*value, static_cast(role)); } void QStandardItem_ClearData(QStandardItem* self) { @@ -487,14 +677,6 @@ bool QStandardItem_OperatorLesser(const QStandardItem* self, QStandardItem* othe return self->operator<(*other); } -QVariant* QStandardItem_Data1(const QStandardItem* self, int role) { - return new QVariant(self->data(static_cast(role))); -} - -void QStandardItem_SetData2(QStandardItem* self, QVariant* value, int role) { - self->setData(*value, static_cast(role)); -} - QStandardItem* QStandardItem_Child2(const QStandardItem* self, int row, int column) { return self->child(static_cast(row), static_cast(column)); } @@ -507,279 +689,1371 @@ void QStandardItem_SortChildren2(QStandardItem* self, int column, int order) { self->sortChildren(static_cast(column), static_cast(order)); } -void QStandardItem_Delete(QStandardItem* self) { - delete self; +void QStandardItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Data = slot; } -QStandardItemModel* QStandardItemModel_new() { - return new QStandardItemModel(); +QVariant* QStandardItem_virtualbase_Data(const void* self, int role) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Data(role); } -QStandardItemModel* QStandardItemModel_new2(int rows, int columns) { - return new QStandardItemModel(static_cast(rows), static_cast(columns)); +void QStandardItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__SetData = slot; } -QStandardItemModel* QStandardItemModel_new3(QObject* parent) { - return new QStandardItemModel(parent); +void QStandardItem_virtualbase_SetData(void* self, QVariant* value, int role) { + ( (MiqtVirtualQStandardItem*)(self) )->virtualbase_SetData(value, role); } -QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent) { - return new QStandardItemModel(static_cast(rows), static_cast(columns), parent); +void QStandardItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Clone = slot; } -QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { - return (QMetaObject*) self->metaObject(); +QStandardItem* QStandardItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Clone(); } -void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1) { - return self->qt_metacast(param1); +void QStandardItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Type = slot; } -struct miqt_string QStandardItemModel_Tr(const char* s) { - QString _ret = QStandardItemModel::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +int QStandardItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Type(); } -struct miqt_string QStandardItemModel_TrUtf8(const char* s) { - QString _ret = QStandardItemModel::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QStandardItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Read = slot; } -void QStandardItemModel_SetItemRoleNames(QStandardItemModel* self, struct miqt_map /* of int to struct miqt_string */ roleNames) { - QHash roleNames_QMap; - roleNames_QMap.reserve(roleNames.len); - int* roleNames_karr = static_cast(roleNames.keys); - struct miqt_string* roleNames_varr = static_cast(roleNames.values); - for(size_t i = 0; i < roleNames.len; ++i) { - QByteArray roleNames_varr_i_QByteArray(roleNames_varr[i].data, roleNames_varr[i].len); - roleNames_QMap[static_cast(roleNames_karr[i])] = roleNames_varr_i_QByteArray; - } - self->setItemRoleNames(roleNames_QMap); +void QStandardItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQStandardItem*)(self) )->virtualbase_Read(in); } -QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +void QStandardItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Write = slot; } -QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child) { - return new QModelIndex(self->parent(*child)); +void QStandardItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Write(out); } -int QStandardItemModel_RowCount(const QStandardItemModel* self) { - return self->rowCount(); +void QStandardItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__OperatorLesser = slot; } -int QStandardItemModel_ColumnCount(const QStandardItemModel* self) { - return self->columnCount(); +bool QStandardItem_virtualbase_OperatorLesser(const void* self, QStandardItem* other) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_OperatorLesser(other); } -bool QStandardItemModel_HasChildren(const QStandardItemModel* self) { - return self->hasChildren(); +void QStandardItem_Delete(QStandardItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QModelIndex* QStandardItemModel_Sibling(const QStandardItemModel* self, int row, int column, QModelIndex* idx) { - return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); -} +class MiqtVirtualQStandardItemModel : public virtual QStandardItemModel { +public: -QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); -} + MiqtVirtualQStandardItemModel(): QStandardItemModel() {}; + MiqtVirtualQStandardItemModel(int rows, int columns): QStandardItemModel(rows, columns) {}; + MiqtVirtualQStandardItemModel(QObject* parent): QStandardItemModel(parent) {}; + MiqtVirtualQStandardItemModel(int rows, int columns, QObject* parent): QStandardItemModel(rows, columns, parent) {}; -bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); -} + virtual ~MiqtVirtualQStandardItemModel() = default; -bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index) { - return self->clearItemData(*index); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; -QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); -} + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QStandardItemModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); -bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); -} + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); -bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); -} + return *callback_return_value; + } -bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); -} + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { -bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); -} + return new QModelIndex(QStandardItemModel::index(static_cast(row), static_cast(column), *parent)); -bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); -} + } -int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index) { - Qt::ItemFlags _ret = self->flags(*index); - return static_cast(_ret); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; -int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self) { - Qt::DropActions _ret = self->supportedDropActions(); - return static_cast(_ret); -} + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QStandardItemModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); -struct miqt_map /* of int to QVariant* */ QStandardItemModel_ItemData(const QStandardItemModel* self, QModelIndex* index) { - QMap _ret = self->itemData(*index); - // Convert QMap<> from C++ memory to manually-managed C memory - int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); - QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); - int _ctr = 0; - for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { - _karr[_ctr] = _itr->first; - _varr[_ctr] = new QVariant(_itr->second); - _ctr++; - } - struct miqt_map _out; - _out.len = _ret.size(); - _out.keys = static_cast(_karr); - _out.values = static_cast(_varr); - return _out; -} + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Parent(const_cast(this), handle__Parent, sigval1); -bool QStandardItemModel_SetItemData(QStandardItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { - QMap roles_QMap; - int* roles_karr = static_cast(roles.keys); - QVariant** roles_varr = static_cast(roles.values); - for(size_t i = 0; i < roles.len; ++i) { - roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + return *callback_return_value; } - return self->setItemData(*index, roles_QMap); -} -void QStandardItemModel_Clear(QStandardItemModel* self) { - self->clear(); -} + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { -void QStandardItemModel_Sort(QStandardItemModel* self, int column) { - self->sort(static_cast(column)); -} + return new QModelIndex(QStandardItemModel::parent(*child)); -QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index) { - return self->itemFromIndex(*index); -} + } -QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item) { - return new QModelIndex(self->indexFromItem(item)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; -QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row) { - return self->item(static_cast(row)); -} + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QStandardItemModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); -void QStandardItemModel_SetItem(QStandardItemModel* self, int row, int column, QStandardItem* item) { - self->setItem(static_cast(row), static_cast(column), item); -} + int callback_return_value = miqt_exec_callback_QStandardItemModel_RowCount(const_cast(this), handle__RowCount, sigval1); -void QStandardItemModel_SetItem2(QStandardItemModel* self, int row, QStandardItem* item) { - self->setItem(static_cast(row), item); -} + return static_cast(callback_return_value); + } -QStandardItem* QStandardItemModel_InvisibleRootItem(const QStandardItemModel* self) { - return self->invisibleRootItem(); -} + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { -QStandardItem* QStandardItemModel_HorizontalHeaderItem(const QStandardItemModel* self, int column) { - return self->horizontalHeaderItem(static_cast(column)); -} + return QStandardItemModel::rowCount(*parent); -void QStandardItemModel_SetHorizontalHeaderItem(QStandardItemModel* self, int column, QStandardItem* item) { - self->setHorizontalHeaderItem(static_cast(column), item); -} + } -QStandardItem* QStandardItemModel_VerticalHeaderItem(const QStandardItemModel* self, int row) { - return self->verticalHeaderItem(static_cast(row)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; -void QStandardItemModel_SetVerticalHeaderItem(QStandardItemModel* self, int row, QStandardItem* item) { - self->setVerticalHeaderItem(static_cast(row), item); -} + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QStandardItemModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); -void QStandardItemModel_SetHorizontalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { - QStringList labels_QList; - labels_QList.reserve(labels.len); - struct miqt_string* labels_arr = static_cast(labels.data); - for(size_t i = 0; i < labels.len; ++i) { - QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); - labels_QList.push_back(labels_arr_i_QString); - } - self->setHorizontalHeaderLabels(labels_QList); -} + int callback_return_value = miqt_exec_callback_QStandardItemModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); -void QStandardItemModel_SetVerticalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { - QStringList labels_QList; - labels_QList.reserve(labels.len); - struct miqt_string* labels_arr = static_cast(labels.data); - for(size_t i = 0; i < labels.len; ++i) { - QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); - labels_QList.push_back(labels_arr_i_QString); + return static_cast(callback_return_value); } - self->setVerticalHeaderLabels(labels_QList); -} -void QStandardItemModel_SetRowCount(QStandardItemModel* self, int rows) { - self->setRowCount(static_cast(rows)); -} + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { -void QStandardItemModel_SetColumnCount(QStandardItemModel* self, int columns) { - self->setColumnCount(static_cast(columns)); -} + return QStandardItemModel::columnCount(*parent); -void QStandardItemModel_AppendRow(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { - QList items_QList; - items_QList.reserve(items.len); - QStandardItem** items_arr = static_cast(items.data); - for(size_t i = 0; i < items.len; ++i) { - items_QList.push_back(items_arr[i]); } - self->appendRow(items_QList); -} -void QStandardItemModel_AppendColumn(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { - QList items_QList; - items_QList.reserve(items.len); - QStandardItem** items_arr = static_cast(items.data); - for(size_t i = 0; i < items.len; ++i) { - items_QList.push_back(items_arr[i]); + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QStandardItemModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; } - self->appendColumn(items_QList); -} -void QStandardItemModel_AppendRowWithItem(QStandardItemModel* self, QStandardItem* item) { - self->appendRow(item); -} + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QStandardItemModel::hasChildren(*parent); -void QStandardItemModel_InsertRow(QStandardItemModel* self, int row, struct miqt_array /* of QStandardItem* */ items) { - QList items_QList; - items_QList.reserve(items.len); - QStandardItem** items_arr = static_cast(items.data); - for(size_t i = 0; i < items.len; ++i) { - items_QList.push_back(items_arr[i]); } - self->insertRow(static_cast(row), items_QList); -} -void QStandardItemModel_InsertColumn(QStandardItemModel* self, int column, struct miqt_array /* of QStandardItem* */ items) { + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QStandardItemModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QStandardItemModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QStandardItemModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStandardItemModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QStandardItemModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QStandardItemModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QStandardItemModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QStandardItemModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStandardItemModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QStandardItemModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QStandardItemModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QStandardItemModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QStandardItemModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QStandardItemModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QStandardItemModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QStandardItemModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QStandardItemModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QStandardItemModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QStandardItemModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QStandardItemModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QStandardItemModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QStandardItemModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QStandardItemModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QStandardItemModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QStandardItemModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QStandardItemModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QStandardItemModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QStandardItemModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QStandardItemModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QStandardItemModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QStandardItemModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QStandardItemModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QStandardItemModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QStandardItemModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QStandardItemModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QStandardItemModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QStandardItemModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QStandardItemModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QStandardItemModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QStandardItemModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QStandardItemModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QStandardItemModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QStandardItemModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QStandardItemModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QStandardItemModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QStandardItemModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QStandardItemModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QStandardItemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QStandardItemModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QStandardItemModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QStandardItemModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QStandardItemModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QStandardItemModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QStandardItemModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QStandardItemModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QStandardItemModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QStandardItemModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QStandardItemModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QStandardItemModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QStandardItemModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QStandardItemModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QStandardItemModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QStandardItemModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QStandardItemModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QStandardItemModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QStandardItemModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QStandardItemModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QStandardItemModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QStandardItemModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QStandardItemModel::revert(); + return; + } + + + miqt_exec_callback_QStandardItemModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QStandardItemModel::revert(); + + } + +}; + +void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns)); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(parent); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns), parent); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QStandardItemModel_Tr(const char* s) { + QString _ret = QStandardItemModel::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QStandardItemModel_TrUtf8(const char* s) { + QString _ret = QStandardItemModel::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QStandardItemModel_SetItemRoleNames(QStandardItemModel* self, struct miqt_map /* of int to struct miqt_string */ roleNames) { + QHash roleNames_QMap; + roleNames_QMap.reserve(roleNames.len); + int* roleNames_karr = static_cast(roleNames.keys); + struct miqt_string* roleNames_varr = static_cast(roleNames.values); + for(size_t i = 0; i < roleNames.len; ++i) { + QByteArray roleNames_varr_i_QByteArray(roleNames_varr[i].data, roleNames_varr[i].len); + roleNames_QMap[static_cast(roleNames_karr[i])] = roleNames_varr_i_QByteArray; + } + self->setItemRoleNames(roleNames_QMap); +} + +QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +} + +QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child) { + return new QModelIndex(self->parent(*child)); +} + +int QStandardItemModel_RowCount(const QStandardItemModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +int QStandardItemModel_ColumnCount(const QStandardItemModel* self, QModelIndex* parent) { + return self->columnCount(*parent); +} + +bool QStandardItemModel_HasChildren(const QStandardItemModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); +} + +QModelIndex* QStandardItemModel_Sibling(const QStandardItemModel* self, int row, int column, QModelIndex* idx) { + return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); +} + +QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); +} + +bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index) { + return self->clearItemData(*index); +} + +QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +} + +bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); +} + +bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); +} + +bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); +} + +bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); +} + +bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); +} + +int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index) { + Qt::ItemFlags _ret = self->flags(*index); + return static_cast(_ret); +} + +int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self) { + Qt::DropActions _ret = self->supportedDropActions(); + return static_cast(_ret); +} + +struct miqt_map /* of int to QVariant* */ QStandardItemModel_ItemData(const QStandardItemModel* self, QModelIndex* index) { + QMap _ret = self->itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +bool QStandardItemModel_SetItemData(QStandardItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + return self->setItemData(*index, roles_QMap); +} + +void QStandardItemModel_Clear(QStandardItemModel* self) { + self->clear(); +} + +void QStandardItemModel_Sort(QStandardItemModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); +} + +QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index) { + return self->itemFromIndex(*index); +} + +QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item) { + return new QModelIndex(self->indexFromItem(item)); +} + +QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row) { + return self->item(static_cast(row)); +} + +void QStandardItemModel_SetItem(QStandardItemModel* self, int row, int column, QStandardItem* item) { + self->setItem(static_cast(row), static_cast(column), item); +} + +void QStandardItemModel_SetItem2(QStandardItemModel* self, int row, QStandardItem* item) { + self->setItem(static_cast(row), item); +} + +QStandardItem* QStandardItemModel_InvisibleRootItem(const QStandardItemModel* self) { + return self->invisibleRootItem(); +} + +QStandardItem* QStandardItemModel_HorizontalHeaderItem(const QStandardItemModel* self, int column) { + return self->horizontalHeaderItem(static_cast(column)); +} + +void QStandardItemModel_SetHorizontalHeaderItem(QStandardItemModel* self, int column, QStandardItem* item) { + self->setHorizontalHeaderItem(static_cast(column), item); +} + +QStandardItem* QStandardItemModel_VerticalHeaderItem(const QStandardItemModel* self, int row) { + return self->verticalHeaderItem(static_cast(row)); +} + +void QStandardItemModel_SetVerticalHeaderItem(QStandardItemModel* self, int row, QStandardItem* item) { + self->setVerticalHeaderItem(static_cast(row), item); +} + +void QStandardItemModel_SetHorizontalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { + QStringList labels_QList; + labels_QList.reserve(labels.len); + struct miqt_string* labels_arr = static_cast(labels.data); + for(size_t i = 0; i < labels.len; ++i) { + QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); + labels_QList.push_back(labels_arr_i_QString); + } + self->setHorizontalHeaderLabels(labels_QList); +} + +void QStandardItemModel_SetVerticalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { + QStringList labels_QList; + labels_QList.reserve(labels.len); + struct miqt_string* labels_arr = static_cast(labels.data); + for(size_t i = 0; i < labels.len; ++i) { + QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); + labels_QList.push_back(labels_arr_i_QString); + } + self->setVerticalHeaderLabels(labels_QList); +} + +void QStandardItemModel_SetRowCount(QStandardItemModel* self, int rows) { + self->setRowCount(static_cast(rows)); +} + +void QStandardItemModel_SetColumnCount(QStandardItemModel* self, int columns) { + self->setColumnCount(static_cast(columns)); +} + +void QStandardItemModel_AppendRow(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { + QList items_QList; + items_QList.reserve(items.len); + QStandardItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + self->appendRow(items_QList); +} + +void QStandardItemModel_AppendColumn(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { + QList items_QList; + items_QList.reserve(items.len); + QStandardItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + self->appendColumn(items_QList); +} + +void QStandardItemModel_AppendRowWithItem(QStandardItemModel* self, QStandardItem* item) { + self->appendRow(item); +} + +void QStandardItemModel_InsertRow(QStandardItemModel* self, int row, struct miqt_array /* of QStandardItem* */ items) { + QList items_QList; + items_QList.reserve(items.len); + QStandardItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + self->insertRow(static_cast(row), items_QList); +} + +void QStandardItemModel_InsertColumn(QStandardItemModel* self, int column, struct miqt_array /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items.len); QStandardItem** items_arr = static_cast(items.data); @@ -908,7 +2182,7 @@ void QStandardItemModel_ItemChanged(QStandardItemModel* self, QStandardItem* ite } void QStandardItemModel_connect_ItemChanged(QStandardItemModel* self, intptr_t slot) { - QStandardItemModel::connect(self, static_cast(&QStandardItemModel::itemChanged), self, [=](QStandardItem* item) { + MiqtVirtualQStandardItemModel::connect(self, static_cast(&QStandardItemModel::itemChanged), self, [=](QStandardItem* item) { QStandardItem* sigval1 = item; miqt_exec_callback_QStandardItemModel_ItemChanged(slot, sigval1); }); @@ -958,58 +2232,6 @@ struct miqt_string QStandardItemModel_TrUtf83(const char* s, const char* c, int return _ms; } -QModelIndex* QStandardItemModel_Index3(const QStandardItemModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -int QStandardItemModel_RowCount1(const QStandardItemModel* self, QModelIndex* parent) { - return self->rowCount(*parent); -} - -int QStandardItemModel_ColumnCount1(const QStandardItemModel* self, QModelIndex* parent) { - return self->columnCount(*parent); -} - -bool QStandardItemModel_HasChildren1(const QStandardItemModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); -} - -QVariant* QStandardItemModel_Data2(const QStandardItemModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); -} - -bool QStandardItemModel_SetData3(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); -} - -QVariant* QStandardItemModel_HeaderData3(const QStandardItemModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); -} - -bool QStandardItemModel_SetHeaderData4(QStandardItemModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); -} - -bool QStandardItemModel_InsertRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); -} - -bool QStandardItemModel_InsertColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); -} - -bool QStandardItemModel_RemoveRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); -} - -bool QStandardItemModel_RemoveColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); -} - -void QStandardItemModel_Sort2(QStandardItemModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); -} - QStandardItem* QStandardItemModel_Item2(const QStandardItemModel* self, int row, int column) { return self->item(static_cast(row), static_cast(column)); } @@ -1054,7 +2276,283 @@ struct miqt_array /* of QStandardItem* */ QStandardItemModel_FindItems3(const Q return _out; } -void QStandardItemModel_Delete(QStandardItemModel* self) { - delete self; +void QStandardItemModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QStandardItemModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Parent(child); +} + +void QStandardItemModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RowCount = slot; +} + +int QStandardItemModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RowCount(parent); +} + +void QStandardItemModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__ColumnCount = slot; +} + +int QStandardItemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QStandardItemModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__HasChildren = slot; +} + +bool QStandardItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QStandardItemModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QStandardItemModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Data = slot; +} + +QVariant* QStandardItemModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Data(index, role); +} + +void QStandardItemModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SetData = slot; +} + +bool QStandardItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QStandardItemModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QStandardItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QStandardItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QStandardItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QStandardItemModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__InsertRows = slot; +} + +bool QStandardItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QStandardItemModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__InsertColumns = slot; +} + +bool QStandardItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QStandardItemModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RemoveRows = slot; +} + +bool QStandardItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QStandardItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QStandardItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QStandardItemModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Flags = slot; +} + +int QStandardItemModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Flags(index); +} + +void QStandardItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QStandardItemModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QStandardItemModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QStandardItemModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_ItemData(index); +} + +void QStandardItemModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SetItemData = slot; +} + +bool QStandardItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QStandardItemModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Sort = slot; +} + +void QStandardItemModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Sort(column, order); +} + +void QStandardItemModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QStandardItemModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MimeTypes(); +} + +void QStandardItemModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QStandardItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QStandardItemModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__DropMimeData = slot; +} + +bool QStandardItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QStandardItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QStandardItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QStandardItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QStandardItemModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QStandardItemModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MoveRows = slot; +} + +bool QStandardItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QStandardItemModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MoveColumns = slot; +} + +bool QStandardItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QStandardItemModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__FetchMore = slot; +} + +void QStandardItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QStandardItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QStandardItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QStandardItemModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Buddy(index); +} + +void QStandardItemModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QStandardItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QStandardItemModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Span = slot; +} + +QSize* QStandardItemModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Span(index); +} + +void QStandardItemModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RoleNames(); +} + +void QStandardItemModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Submit = slot; +} + +bool QStandardItemModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Submit(); +} + +void QStandardItemModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Revert = slot; +} + +void QStandardItemModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Revert(); +} + +void QStandardItemModel_Delete(QStandardItemModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstandarditemmodel.go b/qt/gen_qstandarditemmodel.go index 0585eebc..537a3b40 100644 --- a/qt/gen_qstandarditemmodel.go +++ b/qt/gen_qstandarditemmodel.go @@ -22,7 +22,8 @@ const ( ) type QStandardItem struct { - h *C.QStandardItem + h *C.QStandardItem + isSubclass bool } func (this *QStandardItem) cPointer() *C.QStandardItem { @@ -39,6 +40,7 @@ func (this *QStandardItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStandardItem constructs the type using only CGO pointers. func newQStandardItem(h *C.QStandardItem) *QStandardItem { if h == nil { return nil @@ -46,14 +48,23 @@ func newQStandardItem(h *C.QStandardItem) *QStandardItem { return &QStandardItem{h: h} } +// UnsafeNewQStandardItem constructs the type using only unsafe pointers. func UnsafeNewQStandardItem(h unsafe.Pointer) *QStandardItem { - return newQStandardItem((*C.QStandardItem)(h)) + if h == nil { + return nil + } + + return &QStandardItem{h: (*C.QStandardItem)(h)} } // NewQStandardItem constructs a new QStandardItem object. func NewQStandardItem() *QStandardItem { - ret := C.QStandardItem_new() - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new(&outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem2 constructs a new QStandardItem object. @@ -62,8 +73,12 @@ func NewQStandardItem2(text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QStandardItem_new2(text_ms) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new2(text_ms, &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem3 constructs a new QStandardItem object. @@ -72,31 +87,43 @@ func NewQStandardItem3(icon *QIcon, text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QStandardItem_new3(icon.cPointer(), text_ms) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new3(icon.cPointer(), text_ms, &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem4 constructs a new QStandardItem object. func NewQStandardItem4(rows int) *QStandardItem { - ret := C.QStandardItem_new4((C.int)(rows)) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new4((C.int)(rows), &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem5 constructs a new QStandardItem object. func NewQStandardItem5(rows int, columns int) *QStandardItem { - ret := C.QStandardItem_new5((C.int)(rows), (C.int)(columns)) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new5((C.int)(rows), (C.int)(columns), &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } -func (this *QStandardItem) Data() *QVariant { - _ret := C.QStandardItem_Data(this.h) +func (this *QStandardItem) Data(role int) *QVariant { + _ret := C.QStandardItem_Data(this.h, (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStandardItem) SetData(value *QVariant) { - C.QStandardItem_SetData(this.h, value.cPointer()) +func (this *QStandardItem) SetData(value *QVariant, role int) { + C.QStandardItem_SetData(this.h, value.cPointer(), (C.int)(role)) } func (this *QStandardItem) ClearData() { @@ -364,7 +391,7 @@ func (this *QStandardItem) Index() *QModelIndex { } func (this *QStandardItem) Model() *QStandardItemModel { - return UnsafeNewQStandardItemModel(unsafe.Pointer(C.QStandardItem_Model(this.h))) + return UnsafeNewQStandardItemModel(unsafe.Pointer(C.QStandardItem_Model(this.h)), nil, nil) } func (this *QStandardItem) RowCount() int { @@ -539,32 +566,187 @@ func (this *QStandardItem) OperatorLesser(other *QStandardItem) bool { return (bool)(C.QStandardItem_OperatorLesser(this.h, other.cPointer())) } -func (this *QStandardItem) Data1(role int) *QVariant { - _ret := C.QStandardItem_Data1(this.h, (C.int)(role)) +func (this *QStandardItem) Child2(row int, column int) *QStandardItem { + return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Child2(this.h, (C.int)(row), (C.int)(column)))) +} + +func (this *QStandardItem) TakeChild2(row int, column int) *QStandardItem { + return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_TakeChild2(this.h, (C.int)(row), (C.int)(column)))) +} + +func (this *QStandardItem) SortChildren2(column int, order SortOrder) { + C.QStandardItem_SortChildren2(this.h, (C.int)(column), (C.int)(order)) +} + +func (this *QStandardItem) callVirtualBase_Data(role int) *QVariant { + + _ret := C.QStandardItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QStandardItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) { + C.QStandardItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Data +func miqt_exec_callback_QStandardItem_Data(self *C.QStandardItem, cb C.intptr_t, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Data, slotval1) + + return virtualReturn.cPointer() + } -func (this *QStandardItem) SetData2(value *QVariant, role int) { - C.QStandardItem_SetData2(this.h, value.cPointer(), (C.int)(role)) +func (this *QStandardItem) callVirtualBase_SetData(value *QVariant, role int) { + + C.QStandardItem_virtualbase_SetData(unsafe.Pointer(this.h), value.cPointer(), (C.int)(role)) + +} +func (this *QStandardItem) OnSetData(slot func(super func(value *QVariant, role int), value *QVariant, role int)) { + C.QStandardItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QStandardItem) Child2(row int, column int) *QStandardItem { - return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Child2(this.h, (C.int)(row), (C.int)(column)))) +//export miqt_exec_callback_QStandardItem_SetData +func miqt_exec_callback_QStandardItem_SetData(self *C.QStandardItem, cb C.intptr_t, value *C.QVariant, role C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant, role int), value *QVariant, role int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval2 := (int)(role) + + gofunc((&QStandardItem{h: self}).callVirtualBase_SetData, slotval1, slotval2) + } -func (this *QStandardItem) TakeChild2(row int, column int) *QStandardItem { - return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_TakeChild2(this.h, (C.int)(row), (C.int)(column)))) +func (this *QStandardItem) callVirtualBase_Clone() *QStandardItem { + + return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QStandardItem) OnClone(slot func(super func() *QStandardItem) *QStandardItem) { + C.QStandardItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QStandardItem) SortChildren2(column int, order SortOrder) { - C.QStandardItem_SortChildren2(this.h, (C.int)(column), (C.int)(order)) +//export miqt_exec_callback_QStandardItem_Clone +func miqt_exec_callback_QStandardItem_Clone(self *C.QStandardItem, cb C.intptr_t) *C.QStandardItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStandardItem) *QStandardItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItem) callVirtualBase_Type() int { + + return (int)(C.QStandardItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QStandardItem) OnType(slot func(super func() int) int) { + C.QStandardItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Type +func miqt_exec_callback_QStandardItem_Type(self *C.QStandardItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItem) callVirtualBase_Read(in *QDataStream) { + + C.QStandardItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QStandardItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QStandardItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Read +func miqt_exec_callback_QStandardItem_Read(self *C.QStandardItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in)) + + gofunc((&QStandardItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QStandardItem) callVirtualBase_Write(out *QDataStream) { + + C.QStandardItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QStandardItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QStandardItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Write +func miqt_exec_callback_QStandardItem_Write(self *C.QStandardItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out)) + + gofunc((&QStandardItem{h: self}).callVirtualBase_Write, slotval1) + +} + +func (this *QStandardItem) callVirtualBase_OperatorLesser(other *QStandardItem) bool { + + return (bool)(C.QStandardItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QStandardItem) OnOperatorLesser(slot func(super func(other *QStandardItem) bool, other *QStandardItem) bool) { + C.QStandardItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_OperatorLesser +func miqt_exec_callback_QStandardItem_OperatorLesser(self *C.QStandardItem, cb C.intptr_t, other *C.QStandardItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QStandardItem) bool, other *QStandardItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStandardItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QStandardItem) Delete() { - C.QStandardItem_Delete(this.h) + C.QStandardItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -577,7 +759,8 @@ func (this *QStandardItem) GoGC() { } type QStandardItemModel struct { - h *C.QStandardItemModel + h *C.QStandardItemModel + isSubclass bool *QAbstractItemModel } @@ -595,39 +778,71 @@ func (this *QStandardItemModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStandardItemModel(h *C.QStandardItemModel) *QStandardItemModel { +// newQStandardItemModel constructs the type using only CGO pointers. +func newQStandardItemModel(h *C.QStandardItemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStandardItemModel { if h == nil { return nil } - return &QStandardItemModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QStandardItemModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQStandardItemModel(h unsafe.Pointer) *QStandardItemModel { - return newQStandardItemModel((*C.QStandardItemModel)(h)) +// UnsafeNewQStandardItemModel constructs the type using only unsafe pointers. +func UnsafeNewQStandardItemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStandardItemModel { + if h == nil { + return nil + } + + return &QStandardItemModel{h: (*C.QStandardItemModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQStandardItemModel constructs a new QStandardItemModel object. func NewQStandardItemModel() *QStandardItemModel { - ret := C.QStandardItemModel_new() - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new(&outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStandardItemModel2 constructs a new QStandardItemModel object. func NewQStandardItemModel2(rows int, columns int) *QStandardItemModel { - ret := C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns)) - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStandardItemModel3 constructs a new QStandardItemModel object. func NewQStandardItemModel3(parent *QObject) *QStandardItemModel { - ret := C.QStandardItemModel_new3(parent.cPointer()) - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new3(parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStandardItemModel4 constructs a new QStandardItemModel object. func NewQStandardItemModel4(rows int, columns int, parent *QObject) *QStandardItemModel { - ret := C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer()) - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStandardItemModel) MetaObject() *QMetaObject { @@ -680,8 +895,8 @@ func (this *QStandardItemModel) SetItemRoleNames(roleNames map[int][]byte) { C.QStandardItemModel_SetItemRoleNames(this.h, roleNames_mm) } -func (this *QStandardItemModel) Index(row int, column int) *QModelIndex { - _ret := C.QStandardItemModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QStandardItemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QStandardItemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -694,16 +909,16 @@ func (this *QStandardItemModel) Parent(child *QModelIndex) *QModelIndex { return _goptr } -func (this *QStandardItemModel) RowCount() int { - return (int)(C.QStandardItemModel_RowCount(this.h)) +func (this *QStandardItemModel) RowCount(parent *QModelIndex) int { + return (int)(C.QStandardItemModel_RowCount(this.h, parent.cPointer())) } -func (this *QStandardItemModel) ColumnCount() int { - return (int)(C.QStandardItemModel_ColumnCount(this.h)) +func (this *QStandardItemModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QStandardItemModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QStandardItemModel) HasChildren() bool { - return (bool)(C.QStandardItemModel_HasChildren(this.h)) +func (this *QStandardItemModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_HasChildren(this.h, parent.cPointer())) } func (this *QStandardItemModel) Sibling(row int, column int, idx *QModelIndex) *QModelIndex { @@ -713,46 +928,46 @@ func (this *QStandardItemModel) Sibling(row int, column int, idx *QModelIndex) * return _goptr } -func (this *QStandardItemModel) Data(index *QModelIndex) *QVariant { - _ret := C.QStandardItemModel_Data(this.h, index.cPointer()) +func (this *QStandardItemModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QStandardItemModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStandardItemModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QStandardItemModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QStandardItemModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QStandardItemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QStandardItemModel) ClearItemData(index *QModelIndex) bool { return (bool)(C.QStandardItemModel_ClearItemData(this.h, index.cPointer())) } -func (this *QStandardItemModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QStandardItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QStandardItemModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QStandardItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStandardItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QStandardItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QStandardItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QStandardItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } -func (this *QStandardItemModel) InsertRows(row int, count int) bool { - return (bool)(C.QStandardItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStandardItemModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStandardItemModel) InsertColumns(column int, count int) bool { - return (bool)(C.QStandardItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QStandardItemModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QStandardItemModel) RemoveRows(row int, count int) bool { - return (bool)(C.QStandardItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStandardItemModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStandardItemModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QStandardItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QStandardItemModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QStandardItemModel) Flags(index *QModelIndex) ItemFlag { @@ -804,8 +1019,8 @@ func (this *QStandardItemModel) Clear() { C.QStandardItemModel_Clear(this.h) } -func (this *QStandardItemModel) Sort(column int) { - C.QStandardItemModel_Sort(this.h, (C.int)(column)) +func (this *QStandardItemModel) Sort(column int, order SortOrder) { + C.QStandardItemModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QStandardItemModel) ItemFromIndex(index *QModelIndex) *QStandardItem { @@ -1025,7 +1240,7 @@ func (this *QStandardItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_MimeData(this.h, indexes_ma)), nil) } func (this *QStandardItemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -1096,67 +1311,6 @@ func QStandardItemModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QStandardItemModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QStandardItemModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStandardItemModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QStandardItemModel_RowCount1(this.h, parent.cPointer())) -} - -func (this *QStandardItemModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QStandardItemModel_ColumnCount1(this.h, parent.cPointer())) -} - -func (this *QStandardItemModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_HasChildren1(this.h, parent.cPointer())) -} - -func (this *QStandardItemModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QStandardItemModel_Data2(this.h, index.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStandardItemModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QStandardItemModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) -} - -func (this *QStandardItemModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QStandardItemModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStandardItemModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QStandardItemModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) -} - -func (this *QStandardItemModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) Sort2(column int, order SortOrder) { - C.QStandardItemModel_Sort2(this.h, (C.int)(column), (C.int)(order)) -} - func (this *QStandardItemModel) Item2(row int, column int) *QStandardItem { return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_Item2(this.h, (C.int)(row), (C.int)(column)))) } @@ -1201,9 +1355,1064 @@ func (this *QStandardItemModel) FindItems3(text string, flags MatchFlag, column return _ret } +func (this *QStandardItemModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Index +func miqt_exec_callback_QStandardItemModel_Index(self *C.QStandardItemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Parent +func miqt_exec_callback_QStandardItemModel_Parent(self *C.QStandardItemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QStandardItemModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QStandardItemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RowCount +func miqt_exec_callback_QStandardItemModel_RowCount(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QStandardItemModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QStandardItemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_ColumnCount +func miqt_exec_callback_QStandardItemModel_ColumnCount(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_HasChildren +func miqt_exec_callback_QStandardItemModel_HasChildren(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Sibling +func miqt_exec_callback_QStandardItemModel_Sibling(self *C.QStandardItemModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QStandardItemModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QStandardItemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Data +func miqt_exec_callback_QStandardItemModel_Data(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QStandardItemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QStandardItemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SetData +func miqt_exec_callback_QStandardItemModel_SetData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QStandardItemModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QStandardItemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_HeaderData +func miqt_exec_callback_QStandardItemModel_HeaderData(self *C.QStandardItemModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QStandardItemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QStandardItemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SetHeaderData +func miqt_exec_callback_QStandardItemModel_SetHeaderData(self *C.QStandardItemModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_InsertRows +func miqt_exec_callback_QStandardItemModel_InsertRows(self *C.QStandardItemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_InsertColumns +func miqt_exec_callback_QStandardItemModel_InsertColumns(self *C.QStandardItemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RemoveRows +func miqt_exec_callback_QStandardItemModel_RemoveRows(self *C.QStandardItemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RemoveColumns +func miqt_exec_callback_QStandardItemModel_RemoveColumns(self *C.QStandardItemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QStandardItemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QStandardItemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QStandardItemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Flags +func miqt_exec_callback_QStandardItemModel_Flags(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QStandardItemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QStandardItemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QStandardItemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SupportedDropActions +func miqt_exec_callback_QStandardItemModel_SupportedDropActions(self *C.QStandardItemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QStandardItemModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QStandardItemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QStandardItemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_ItemData +func miqt_exec_callback_QStandardItemModel_ItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QStandardItemModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QStandardItemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QStandardItemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QStandardItemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SetItemData +func miqt_exec_callback_QStandardItemModel_SetItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QStandardItemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QStandardItemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QStandardItemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Sort +func miqt_exec_callback_QStandardItemModel_Sort(self *C.QStandardItemModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QStandardItemModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QStandardItemModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QStandardItemModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QStandardItemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MimeTypes +func miqt_exec_callback_QStandardItemModel_MimeTypes(self *C.QStandardItemModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QStandardItemModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QStandardItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QStandardItemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MimeData +func miqt_exec_callback_QStandardItemModel_MimeData(self *C.QStandardItemModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QStandardItemModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_DropMimeData +func miqt_exec_callback_QStandardItemModel_DropMimeData(self *C.QStandardItemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QStandardItemModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_CanDropMimeData +func miqt_exec_callback_QStandardItemModel_CanDropMimeData(self *C.QStandardItemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QStandardItemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QStandardItemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QStandardItemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SupportedDragActions +func miqt_exec_callback_QStandardItemModel_SupportedDragActions(self *C.QStandardItemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QStandardItemModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QStandardItemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MoveRows +func miqt_exec_callback_QStandardItemModel_MoveRows(self *C.QStandardItemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QStandardItemModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QStandardItemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MoveColumns +func miqt_exec_callback_QStandardItemModel_MoveColumns(self *C.QStandardItemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QStandardItemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QStandardItemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QStandardItemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_FetchMore +func miqt_exec_callback_QStandardItemModel_FetchMore(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QStandardItemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_CanFetchMore +func miqt_exec_callback_QStandardItemModel_CanFetchMore(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Buddy +func miqt_exec_callback_QStandardItemModel_Buddy(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QStandardItemModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QStandardItemModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QStandardItemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Match +func miqt_exec_callback_QStandardItemModel_Match(self *C.QStandardItemModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QStandardItemModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QStandardItemModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QStandardItemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Span +func miqt_exec_callback_QStandardItemModel_Span(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QStandardItemModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QStandardItemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QStandardItemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RoleNames +func miqt_exec_callback_QStandardItemModel_RoleNames(self *C.QStandardItemModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QStandardItemModel) callVirtualBase_Submit() bool { + + return (bool)(C.QStandardItemModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QStandardItemModel) OnSubmit(slot func(super func() bool) bool) { + C.QStandardItemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Submit +func miqt_exec_callback_QStandardItemModel_Submit(self *C.QStandardItemModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Revert() { + + C.QStandardItemModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QStandardItemModel) OnRevert(slot func(super func())) { + C.QStandardItemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Revert +func miqt_exec_callback_QStandardItemModel_Revert(self *C.QStandardItemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_Revert) + +} + // Delete this object from C++ memory. func (this *QStandardItemModel) Delete() { - C.QStandardItemModel_Delete(this.h) + C.QStandardItemModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstandarditemmodel.h b/qt/gen_qstandarditemmodel.h index 3b4e94ab..168a4212 100644 --- a/qt/gen_qstandarditemmodel.h +++ b/qt/gen_qstandarditemmodel.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; class QBrush; class QByteArray; class QDataStream; @@ -29,6 +30,7 @@ class QStandardItem; class QStandardItemModel; class QVariant; #else +typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QBrush QBrush; typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; @@ -44,13 +46,13 @@ typedef struct QStandardItemModel QStandardItemModel; typedef struct QVariant QVariant; #endif -QStandardItem* QStandardItem_new(); -QStandardItem* QStandardItem_new2(struct miqt_string text); -QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text); -QStandardItem* QStandardItem_new4(int rows); -QStandardItem* QStandardItem_new5(int rows, int columns); -QVariant* QStandardItem_Data(const QStandardItem* self); -void QStandardItem_SetData(QStandardItem* self, QVariant* value); +void QStandardItem_new(QStandardItem** outptr_QStandardItem); +void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem); +void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem); +void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem); +void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem); +QVariant* QStandardItem_Data(const QStandardItem* self, int role); +void QStandardItem_SetData(QStandardItem* self, QVariant* value, int role); void QStandardItem_ClearData(QStandardItem* self); struct miqt_string QStandardItem_Text(const QStandardItem* self); void QStandardItem_SetText(QStandardItem* self, struct miqt_string text); @@ -134,43 +136,55 @@ int QStandardItem_Type(const QStandardItem* self); void QStandardItem_Read(QStandardItem* self, QDataStream* in); void QStandardItem_Write(const QStandardItem* self, QDataStream* out); bool QStandardItem_OperatorLesser(const QStandardItem* self, QStandardItem* other); -QVariant* QStandardItem_Data1(const QStandardItem* self, int role); -void QStandardItem_SetData2(QStandardItem* self, QVariant* value, int role); QStandardItem* QStandardItem_Child2(const QStandardItem* self, int row, int column); QStandardItem* QStandardItem_TakeChild2(QStandardItem* self, int row, int column); void QStandardItem_SortChildren2(QStandardItem* self, int column, int order); -void QStandardItem_Delete(QStandardItem* self); +void QStandardItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QStandardItem_virtualbase_Data(const void* self, int role); +void QStandardItem_override_virtual_SetData(void* self, intptr_t slot); +void QStandardItem_virtualbase_SetData(void* self, QVariant* value, int role); +void QStandardItem_override_virtual_Clone(void* self, intptr_t slot); +QStandardItem* QStandardItem_virtualbase_Clone(const void* self); +void QStandardItem_override_virtual_Type(void* self, intptr_t slot); +int QStandardItem_virtualbase_Type(const void* self); +void QStandardItem_override_virtual_Read(void* self, intptr_t slot); +void QStandardItem_virtualbase_Read(void* self, QDataStream* in); +void QStandardItem_override_virtual_Write(void* self, intptr_t slot); +void QStandardItem_virtualbase_Write(const void* self, QDataStream* out); +void QStandardItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QStandardItem_virtualbase_OperatorLesser(const void* self, QStandardItem* other); +void QStandardItem_Delete(QStandardItem* self, bool isSubclass); -QStandardItemModel* QStandardItemModel_new(); -QStandardItemModel* QStandardItemModel_new2(int rows, int columns); -QStandardItemModel* QStandardItemModel_new3(QObject* parent); -QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent); +void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self); void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1); struct miqt_string QStandardItemModel_Tr(const char* s); struct miqt_string QStandardItemModel_TrUtf8(const char* s); void QStandardItemModel_SetItemRoleNames(QStandardItemModel* self, struct miqt_map /* of int to struct miqt_string */ roleNames); -QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column); +QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child); -int QStandardItemModel_RowCount(const QStandardItemModel* self); -int QStandardItemModel_ColumnCount(const QStandardItemModel* self); -bool QStandardItemModel_HasChildren(const QStandardItemModel* self); +int QStandardItemModel_RowCount(const QStandardItemModel* self, QModelIndex* parent); +int QStandardItemModel_ColumnCount(const QStandardItemModel* self, QModelIndex* parent); +bool QStandardItemModel_HasChildren(const QStandardItemModel* self, QModelIndex* parent); QModelIndex* QStandardItemModel_Sibling(const QStandardItemModel* self, int row, int column, QModelIndex* idx); -QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index); -bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value); +QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index, int role); +bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role); bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index); -QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation); -bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value); -bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count); -bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count); -bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count); -bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count); +QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation, int role); +bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value, int role); +bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count, QModelIndex* parent); +bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent); +bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count, QModelIndex* parent); +bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent); int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index); int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self); struct miqt_map /* of int to QVariant* */ QStandardItemModel_ItemData(const QStandardItemModel* self, QModelIndex* index); bool QStandardItemModel_SetItemData(QStandardItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); void QStandardItemModel_Clear(QStandardItemModel* self); -void QStandardItemModel_Sort(QStandardItemModel* self, int column); +void QStandardItemModel_Sort(QStandardItemModel* self, int column, int order); QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index); QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item); QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row); @@ -212,26 +226,81 @@ struct miqt_string QStandardItemModel_Tr2(const char* s, const char* c); struct miqt_string QStandardItemModel_Tr3(const char* s, const char* c, int n); struct miqt_string QStandardItemModel_TrUtf82(const char* s, const char* c); struct miqt_string QStandardItemModel_TrUtf83(const char* s, const char* c, int n); -QModelIndex* QStandardItemModel_Index3(const QStandardItemModel* self, int row, int column, QModelIndex* parent); -int QStandardItemModel_RowCount1(const QStandardItemModel* self, QModelIndex* parent); -int QStandardItemModel_ColumnCount1(const QStandardItemModel* self, QModelIndex* parent); -bool QStandardItemModel_HasChildren1(const QStandardItemModel* self, QModelIndex* parent); -QVariant* QStandardItemModel_Data2(const QStandardItemModel* self, QModelIndex* index, int role); -bool QStandardItemModel_SetData3(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QStandardItemModel_HeaderData3(const QStandardItemModel* self, int section, int orientation, int role); -bool QStandardItemModel_SetHeaderData4(QStandardItemModel* self, int section, int orientation, QVariant* value, int role); -bool QStandardItemModel_InsertRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent); -bool QStandardItemModel_InsertColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent); -bool QStandardItemModel_RemoveRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent); -bool QStandardItemModel_RemoveColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent); -void QStandardItemModel_Sort2(QStandardItemModel* self, int column, int order); QStandardItem* QStandardItemModel_Item2(const QStandardItemModel* self, int row, int column); bool QStandardItemModel_InsertRow22(QStandardItemModel* self, int row, QModelIndex* parent); bool QStandardItemModel_InsertColumn2(QStandardItemModel* self, int column, QModelIndex* parent); QStandardItem* QStandardItemModel_TakeItem2(QStandardItemModel* self, int row, int column); struct miqt_array /* of QStandardItem* */ QStandardItemModel_FindItems2(const QStandardItemModel* self, struct miqt_string text, int flags); struct miqt_array /* of QStandardItem* */ QStandardItemModel_FindItems3(const QStandardItemModel* self, struct miqt_string text, int flags, int column); -void QStandardItemModel_Delete(QStandardItemModel* self); +void QStandardItemModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QStandardItemModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QStandardItemModel_override_virtual_RowCount(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QStandardItemModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QStandardItemModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QStandardItemModel_override_virtual_SetData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QStandardItemModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QStandardItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QStandardItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QStandardItemModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_Flags(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_SupportedDropActions(const void* self); +void QStandardItemModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QStandardItemModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QStandardItemModel_override_virtual_Sort(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_Sort(void* self, int column, int order); +void QStandardItemModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QStandardItemModel_virtualbase_MimeTypes(const void* self); +void QStandardItemModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QStandardItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QStandardItemModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QStandardItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QStandardItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_SupportedDragActions(const void* self); +void QStandardItemModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QStandardItemModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QStandardItemModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QStandardItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QStandardItemModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QStandardItemModel_virtualbase_Span(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_virtualbase_RoleNames(const void* self); +void QStandardItemModel_override_virtual_Submit(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_Submit(void* self); +void QStandardItemModel_override_virtual_Revert(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_Revert(void* self); +void QStandardItemModel_Delete(QStandardItemModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstandardpaths.go b/qt/gen_qstandardpaths.go index 823c3ced..48aea22a 100644 --- a/qt/gen_qstandardpaths.go +++ b/qt/gen_qstandardpaths.go @@ -45,7 +45,8 @@ const ( ) type QStandardPaths struct { - h *C.QStandardPaths + h *C.QStandardPaths + isSubclass bool } func (this *QStandardPaths) cPointer() *C.QStandardPaths { @@ -62,6 +63,7 @@ func (this *QStandardPaths) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStandardPaths constructs the type using only CGO pointers. func newQStandardPaths(h *C.QStandardPaths) *QStandardPaths { if h == nil { return nil @@ -69,8 +71,13 @@ func newQStandardPaths(h *C.QStandardPaths) *QStandardPaths { return &QStandardPaths{h: h} } +// UnsafeNewQStandardPaths constructs the type using only unsafe pointers. func UnsafeNewQStandardPaths(h unsafe.Pointer) *QStandardPaths { - return newQStandardPaths((*C.QStandardPaths)(h)) + if h == nil { + return nil + } + + return &QStandardPaths{h: (*C.QStandardPaths)(h)} } func QStandardPaths_WritableLocation(typeVal QStandardPaths__StandardLocation) string { diff --git a/qt/gen_qstate.cpp b/qt/gen_qstate.cpp index 70d0227a..f57ee373 100644 --- a/qt/gen_qstate.cpp +++ b/qt/gen_qstate.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -13,20 +14,115 @@ #include "gen_qstate.h" #include "_cgo_export.h" -QState* QState_new() { - return new QState(); +class MiqtVirtualQState : public virtual QState { +public: + + MiqtVirtualQState(): QState() {}; + MiqtVirtualQState(QState::ChildMode childMode): QState(childMode) {}; + MiqtVirtualQState(QState* parent): QState(parent) {}; + MiqtVirtualQState(QState::ChildMode childMode, QState* parent): QState(childMode, parent) {}; + + virtual ~MiqtVirtualQState() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnEntry = 0; + + // Subclass to allow providing a Go implementation + virtual void onEntry(QEvent* event) override { + if (handle__OnEntry == 0) { + QState::onEntry(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QState_OnEntry(this, handle__OnEntry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnEntry(QEvent* event) { + + QState::onEntry(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnExit = 0; + + // Subclass to allow providing a Go implementation + virtual void onExit(QEvent* event) override { + if (handle__OnExit == 0) { + QState::onExit(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QState_OnExit(this, handle__OnExit, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnExit(QEvent* event) { + + QState::onExit(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QState::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QState_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QState::event(e); + + } + +}; + +void QState_new(QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQState* ret = new MiqtVirtualQState(); + *outptr_QState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QState* QState_new2(int childMode) { - return new QState(static_cast(childMode)); +void QState_new2(int childMode, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQState* ret = new MiqtVirtualQState(static_cast(childMode)); + *outptr_QState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QState* QState_new3(QState* parent) { - return new QState(parent); +void QState_new3(QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQState* ret = new MiqtVirtualQState(parent); + *outptr_QState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QState* QState_new4(int childMode, QState* parent) { - return new QState(static_cast(childMode), parent); +void QState_new4(int childMode, QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQState* ret = new MiqtVirtualQState(static_cast(childMode), parent); + *outptr_QState = ret; + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QState_MetaObject(const QState* self) { @@ -161,7 +257,35 @@ struct miqt_string QState_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QState_Delete(QState* self) { - delete self; +void QState_override_virtual_OnEntry(void* self, intptr_t slot) { + dynamic_cast( (QState*)(self) )->handle__OnEntry = slot; +} + +void QState_virtualbase_OnEntry(void* self, QEvent* event) { + ( (MiqtVirtualQState*)(self) )->virtualbase_OnEntry(event); +} + +void QState_override_virtual_OnExit(void* self, intptr_t slot) { + dynamic_cast( (QState*)(self) )->handle__OnExit = slot; +} + +void QState_virtualbase_OnExit(void* self, QEvent* event) { + ( (MiqtVirtualQState*)(self) )->virtualbase_OnExit(event); +} + +void QState_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QState*)(self) )->handle__Event = slot; +} + +bool QState_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQState*)(self) )->virtualbase_Event(e); +} + +void QState_Delete(QState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstate.go b/qt/gen_qstate.go index ceab4c1b..3ffcab20 100644 --- a/qt/gen_qstate.go +++ b/qt/gen_qstate.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -28,7 +29,8 @@ const ( ) type QState struct { - h *C.QState + h *C.QState + isSubclass bool *QAbstractState } @@ -46,39 +48,71 @@ func (this *QState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQState(h *C.QState) *QState { +// newQState constructs the type using only CGO pointers. +func newQState(h *C.QState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QState { if h == nil { return nil } - return &QState{h: h, QAbstractState: UnsafeNewQAbstractState(unsafe.Pointer(h))} + return &QState{h: h, + QAbstractState: newQAbstractState(h_QAbstractState, h_QObject)} } -func UnsafeNewQState(h unsafe.Pointer) *QState { - return newQState((*C.QState)(h)) +// UnsafeNewQState constructs the type using only unsafe pointers. +func UnsafeNewQState(h unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QState { + if h == nil { + return nil + } + + return &QState{h: (*C.QState)(h), + QAbstractState: UnsafeNewQAbstractState(h_QAbstractState, h_QObject)} } // NewQState constructs a new QState object. func NewQState() *QState { - ret := C.QState_new() - return newQState(ret) + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QState_new(&outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQState2 constructs a new QState object. func NewQState2(childMode QState__ChildMode) *QState { - ret := C.QState_new2((C.int)(childMode)) - return newQState(ret) + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QState_new2((C.int)(childMode), &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQState3 constructs a new QState object. func NewQState3(parent *QState) *QState { - ret := C.QState_new3(parent.cPointer()) - return newQState(ret) + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QState_new3(parent.cPointer(), &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQState4 constructs a new QState object. func NewQState4(childMode QState__ChildMode, parent *QState) *QState { - ret := C.QState_new4((C.int)(childMode), parent.cPointer()) - return newQState(ret) + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QState_new4((C.int)(childMode), parent.cPointer(), &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QState) MetaObject() *QMetaObject { @@ -110,7 +144,7 @@ func QState_TrUtf8(s string) string { } func (this *QState) ErrorState() *QAbstractState { - return UnsafeNewQAbstractState(unsafe.Pointer(C.QState_ErrorState(this.h))) + return UnsafeNewQAbstractState(unsafe.Pointer(C.QState_ErrorState(this.h)), nil) } func (this *QState) SetErrorState(state *QAbstractState) { @@ -124,11 +158,11 @@ func (this *QState) AddTransition(transition *QAbstractTransition) { func (this *QState) AddTransition2(sender *QObject, signal string, target *QAbstractState) *QSignalTransition { signal_Cstring := C.CString(signal) defer C.free(unsafe.Pointer(signal_Cstring)) - return UnsafeNewQSignalTransition(unsafe.Pointer(C.QState_AddTransition2(this.h, sender.cPointer(), signal_Cstring, target.cPointer()))) + return UnsafeNewQSignalTransition(unsafe.Pointer(C.QState_AddTransition2(this.h, sender.cPointer(), signal_Cstring, target.cPointer())), nil, nil) } func (this *QState) AddTransitionWithTarget(target *QAbstractState) *QAbstractTransition { - return UnsafeNewQAbstractTransition(unsafe.Pointer(C.QState_AddTransitionWithTarget(this.h, target.cPointer()))) + return UnsafeNewQAbstractTransition(unsafe.Pointer(C.QState_AddTransitionWithTarget(this.h, target.cPointer())), nil) } func (this *QState) RemoveTransition(transition *QAbstractTransition) { @@ -140,13 +174,13 @@ func (this *QState) Transitions() []*QAbstractTransition { _ret := make([]*QAbstractTransition, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractTransition)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractTransition(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractTransition(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QState) InitialState() *QAbstractState { - return UnsafeNewQAbstractState(unsafe.Pointer(C.QState_InitialState(this.h))) + return UnsafeNewQAbstractState(unsafe.Pointer(C.QState_InitialState(this.h)), nil) } func (this *QState) SetInitialState(state *QAbstractState) { @@ -211,9 +245,80 @@ func QState_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QState) callVirtualBase_OnEntry(event *QEvent) { + + C.QState_virtualbase_OnEntry(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QState) OnOnEntry(slot func(super func(event *QEvent), event *QEvent)) { + C.QState_override_virtual_OnEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QState_OnEntry +func miqt_exec_callback_QState_OnEntry(self *C.QState, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QState{h: self}).callVirtualBase_OnEntry, slotval1) + +} + +func (this *QState) callVirtualBase_OnExit(event *QEvent) { + + C.QState_virtualbase_OnExit(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QState) OnOnExit(slot func(super func(event *QEvent), event *QEvent)) { + C.QState_override_virtual_OnExit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QState_OnExit +func miqt_exec_callback_QState_OnExit(self *C.QState, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QState{h: self}).callVirtualBase_OnExit, slotval1) + +} + +func (this *QState) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QState_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QState) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QState_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QState_Event +func miqt_exec_callback_QState_Event(self *C.QState, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QState{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QState) Delete() { - C.QState_Delete(this.h) + C.QState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstate.h b/qt/gen_qstate.h index 51ceef5e..4d38c662 100644 --- a/qt/gen_qstate.h +++ b/qt/gen_qstate.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QAbstractState; class QAbstractTransition; +class QEvent; class QMetaObject; class QObject; class QSignalTransition; @@ -25,6 +26,7 @@ class QVariant; #else typedef struct QAbstractState QAbstractState; typedef struct QAbstractTransition QAbstractTransition; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSignalTransition QSignalTransition; @@ -32,10 +34,10 @@ typedef struct QState QState; typedef struct QVariant QVariant; #endif -QState* QState_new(); -QState* QState_new2(int childMode); -QState* QState_new3(QState* parent); -QState* QState_new4(int childMode, QState* parent); +void QState_new(QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QState_new2(int childMode, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QState_new3(QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QState_new4(int childMode, QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); QMetaObject* QState_MetaObject(const QState* self); void* QState_Metacast(QState* self, const char* param1); struct miqt_string QState_Tr(const char* s); @@ -52,11 +54,20 @@ void QState_SetInitialState(QState* self, QAbstractState* state); int QState_ChildMode(const QState* self); void QState_SetChildMode(QState* self, int mode); void QState_AssignProperty(QState* self, QObject* object, const char* name, QVariant* value); +void QState_OnEntry(QState* self, QEvent* event); +void QState_OnExit(QState* self, QEvent* event); +bool QState_Event(QState* self, QEvent* e); struct miqt_string QState_Tr2(const char* s, const char* c); struct miqt_string QState_Tr3(const char* s, const char* c, int n); struct miqt_string QState_TrUtf82(const char* s, const char* c); struct miqt_string QState_TrUtf83(const char* s, const char* c, int n); -void QState_Delete(QState* self); +void QState_override_virtual_OnEntry(void* self, intptr_t slot); +void QState_virtualbase_OnEntry(void* self, QEvent* event); +void QState_override_virtual_OnExit(void* self, intptr_t slot); +void QState_virtualbase_OnExit(void* self, QEvent* event); +void QState_override_virtual_Event(void* self, intptr_t slot); +bool QState_virtualbase_Event(void* self, QEvent* e); +void QState_Delete(QState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstatemachine.cpp b/qt/gen_qstatemachine.cpp index 2e7fa769..fed379e5 100644 --- a/qt/gen_qstatemachine.cpp +++ b/qt/gen_qstatemachine.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QStateMachine__SignalEvent #define WORKAROUND_INNER_CLASS_DEFINITION_QStateMachine__WrappedEvent @@ -14,20 +15,239 @@ #include "gen_qstatemachine.h" #include "_cgo_export.h" -QStateMachine* QStateMachine_new() { - return new QStateMachine(); +class MiqtVirtualQStateMachine : public virtual QStateMachine { +public: + + MiqtVirtualQStateMachine(): QStateMachine() {}; + MiqtVirtualQStateMachine(QState::ChildMode childMode): QStateMachine(childMode) {}; + MiqtVirtualQStateMachine(QObject* parent): QStateMachine(parent) {}; + MiqtVirtualQStateMachine(QState::ChildMode childMode, QObject* parent): QStateMachine(childMode, parent) {}; + + virtual ~MiqtVirtualQStateMachine() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QStateMachine::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStateMachine_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QStateMachine::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnEntry = 0; + + // Subclass to allow providing a Go implementation + virtual void onEntry(QEvent* event) override { + if (handle__OnEntry == 0) { + QStateMachine::onEntry(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStateMachine_OnEntry(this, handle__OnEntry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnEntry(QEvent* event) { + + QStateMachine::onEntry(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OnExit = 0; + + // Subclass to allow providing a Go implementation + virtual void onExit(QEvent* event) override { + if (handle__OnExit == 0) { + QStateMachine::onExit(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStateMachine_OnExit(this, handle__OnExit, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_OnExit(QEvent* event) { + + QStateMachine::onExit(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BeginSelectTransitions = 0; + + // Subclass to allow providing a Go implementation + virtual void beginSelectTransitions(QEvent* event) override { + if (handle__BeginSelectTransitions == 0) { + QStateMachine::beginSelectTransitions(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStateMachine_BeginSelectTransitions(this, handle__BeginSelectTransitions, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BeginSelectTransitions(QEvent* event) { + + QStateMachine::beginSelectTransitions(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EndSelectTransitions = 0; + + // Subclass to allow providing a Go implementation + virtual void endSelectTransitions(QEvent* event) override { + if (handle__EndSelectTransitions == 0) { + QStateMachine::endSelectTransitions(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStateMachine_EndSelectTransitions(this, handle__EndSelectTransitions, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EndSelectTransitions(QEvent* event) { + + QStateMachine::endSelectTransitions(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BeginMicrostep = 0; + + // Subclass to allow providing a Go implementation + virtual void beginMicrostep(QEvent* event) override { + if (handle__BeginMicrostep == 0) { + QStateMachine::beginMicrostep(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStateMachine_BeginMicrostep(this, handle__BeginMicrostep, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BeginMicrostep(QEvent* event) { + + QStateMachine::beginMicrostep(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EndMicrostep = 0; + + // Subclass to allow providing a Go implementation + virtual void endMicrostep(QEvent* event) override { + if (handle__EndMicrostep == 0) { + QStateMachine::endMicrostep(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStateMachine_EndMicrostep(this, handle__EndMicrostep, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EndMicrostep(QEvent* event) { + + QStateMachine::endMicrostep(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QStateMachine::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QStateMachine_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QStateMachine::event(e); + + } + +}; + +void QStateMachine_new(QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(); + *outptr_QStateMachine = ret; + *outptr_QState = static_cast(ret); + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStateMachine* QStateMachine_new2(int childMode) { - return new QStateMachine(static_cast(childMode)); +void QStateMachine_new2(int childMode, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(static_cast(childMode)); + *outptr_QStateMachine = ret; + *outptr_QState = static_cast(ret); + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStateMachine* QStateMachine_new3(QObject* parent) { - return new QStateMachine(parent); +void QStateMachine_new3(QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(parent); + *outptr_QStateMachine = ret; + *outptr_QState = static_cast(ret); + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStateMachine* QStateMachine_new4(int childMode, QObject* parent) { - return new QStateMachine(static_cast(childMode), parent); +void QStateMachine_new4(int childMode, QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { + MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(static_cast(childMode), parent); + *outptr_QStateMachine = ret; + *outptr_QState = static_cast(ret); + *outptr_QAbstractState = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QStateMachine_MetaObject(const QStateMachine* self) { @@ -178,7 +398,7 @@ void QStateMachine_RunningChanged(QStateMachine* self, bool running) { } void QStateMachine_connect_RunningChanged(QStateMachine* self, intptr_t slot) { - QStateMachine::connect(self, static_cast(&QStateMachine::runningChanged), self, [=](bool running) { + MiqtVirtualQStateMachine::connect(self, static_cast(&QStateMachine::runningChanged), self, [=](bool running) { bool sigval1 = running; miqt_exec_callback_QStateMachine_RunningChanged(slot, sigval1); }); @@ -232,12 +452,82 @@ void QStateMachine_PostEvent2(QStateMachine* self, QEvent* event, int priority) self->postEvent(event, static_cast(priority)); } -void QStateMachine_Delete(QStateMachine* self) { - delete self; +void QStateMachine_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__EventFilter = slot; +} + +bool QStateMachine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QStateMachine_override_virtual_OnEntry(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__OnEntry = slot; +} + +void QStateMachine_virtualbase_OnEntry(void* self, QEvent* event) { + ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_OnEntry(event); +} + +void QStateMachine_override_virtual_OnExit(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__OnExit = slot; } -QStateMachine__SignalEvent* QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1) { - return new QStateMachine::SignalEvent(*param1); +void QStateMachine_virtualbase_OnExit(void* self, QEvent* event) { + ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_OnExit(event); +} + +void QStateMachine_override_virtual_BeginSelectTransitions(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__BeginSelectTransitions = slot; +} + +void QStateMachine_virtualbase_BeginSelectTransitions(void* self, QEvent* event) { + ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_BeginSelectTransitions(event); +} + +void QStateMachine_override_virtual_EndSelectTransitions(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__EndSelectTransitions = slot; +} + +void QStateMachine_virtualbase_EndSelectTransitions(void* self, QEvent* event) { + ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_EndSelectTransitions(event); +} + +void QStateMachine_override_virtual_BeginMicrostep(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__BeginMicrostep = slot; +} + +void QStateMachine_virtualbase_BeginMicrostep(void* self, QEvent* event) { + ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_BeginMicrostep(event); +} + +void QStateMachine_override_virtual_EndMicrostep(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__EndMicrostep = slot; +} + +void QStateMachine_virtualbase_EndMicrostep(void* self, QEvent* event) { + ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_EndMicrostep(event); +} + +void QStateMachine_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStateMachine*)(self) )->handle__Event = slot; +} + +bool QStateMachine_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQStateMachine*)(self) )->virtualbase_Event(e); +} + +void QStateMachine_Delete(QStateMachine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1, QStateMachine__SignalEvent** outptr_QStateMachine__SignalEvent, QEvent** outptr_QEvent) { + QStateMachine::SignalEvent* ret = new QStateMachine::SignalEvent(*param1); + *outptr_QStateMachine__SignalEvent = ret; + *outptr_QEvent = static_cast(ret); } QObject* QStateMachine__SignalEvent_Sender(const QStateMachine__SignalEvent* self) { @@ -248,16 +538,24 @@ int QStateMachine__SignalEvent_SignalIndex(const QStateMachine__SignalEvent* sel return self->signalIndex(); } -void QStateMachine__SignalEvent_Delete(QStateMachine__SignalEvent* self) { - delete self; +void QStateMachine__SignalEvent_Delete(QStateMachine__SignalEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new(QObject* object, QEvent* event) { - return new QStateMachine::WrappedEvent(object, event); +void QStateMachine__WrappedEvent_new(QObject* object, QEvent* event, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent) { + QStateMachine::WrappedEvent* ret = new QStateMachine::WrappedEvent(object, event); + *outptr_QStateMachine__WrappedEvent = ret; + *outptr_QEvent = static_cast(ret); } -QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1) { - return new QStateMachine::WrappedEvent(*param1); +void QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent) { + QStateMachine::WrappedEvent* ret = new QStateMachine::WrappedEvent(*param1); + *outptr_QStateMachine__WrappedEvent = ret; + *outptr_QEvent = static_cast(ret); } QObject* QStateMachine__WrappedEvent_Object(const QStateMachine__WrappedEvent* self) { @@ -268,7 +566,11 @@ QEvent* QStateMachine__WrappedEvent_Event(const QStateMachine__WrappedEvent* sel return self->event(); } -void QStateMachine__WrappedEvent_Delete(QStateMachine__WrappedEvent* self) { - delete self; +void QStateMachine__WrappedEvent_Delete(QStateMachine__WrappedEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstatemachine.go b/qt/gen_qstatemachine.go index 6e99ff55..0318888f 100644 --- a/qt/gen_qstatemachine.go +++ b/qt/gen_qstatemachine.go @@ -32,7 +32,8 @@ const ( ) type QStateMachine struct { - h *C.QStateMachine + h *C.QStateMachine + isSubclass bool *QState } @@ -50,39 +51,75 @@ func (this *QStateMachine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStateMachine(h *C.QStateMachine) *QStateMachine { +// newQStateMachine constructs the type using only CGO pointers. +func newQStateMachine(h *C.QStateMachine, h_QState *C.QState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QStateMachine { if h == nil { return nil } - return &QStateMachine{h: h, QState: UnsafeNewQState(unsafe.Pointer(h))} + return &QStateMachine{h: h, + QState: newQState(h_QState, h_QAbstractState, h_QObject)} } -func UnsafeNewQStateMachine(h unsafe.Pointer) *QStateMachine { - return newQStateMachine((*C.QStateMachine)(h)) +// UnsafeNewQStateMachine constructs the type using only unsafe pointers. +func UnsafeNewQStateMachine(h unsafe.Pointer, h_QState unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QStateMachine { + if h == nil { + return nil + } + + return &QStateMachine{h: (*C.QStateMachine)(h), + QState: UnsafeNewQState(h_QState, h_QAbstractState, h_QObject)} } // NewQStateMachine constructs a new QStateMachine object. func NewQStateMachine() *QStateMachine { - ret := C.QStateMachine_new() - return newQStateMachine(ret) + var outptr_QStateMachine *C.QStateMachine = nil + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QStateMachine_new(&outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStateMachine2 constructs a new QStateMachine object. func NewQStateMachine2(childMode QState__ChildMode) *QStateMachine { - ret := C.QStateMachine_new2((C.int)(childMode)) - return newQStateMachine(ret) + var outptr_QStateMachine *C.QStateMachine = nil + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QStateMachine_new2((C.int)(childMode), &outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStateMachine3 constructs a new QStateMachine object. func NewQStateMachine3(parent *QObject) *QStateMachine { - ret := C.QStateMachine_new3(parent.cPointer()) - return newQStateMachine(ret) + var outptr_QStateMachine *C.QStateMachine = nil + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QStateMachine_new3(parent.cPointer(), &outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStateMachine4 constructs a new QStateMachine object. func NewQStateMachine4(childMode QState__ChildMode, parent *QObject) *QStateMachine { - ret := C.QStateMachine_new4((C.int)(childMode), parent.cPointer()) - return newQStateMachine(ret) + var outptr_QStateMachine *C.QStateMachine = nil + var outptr_QState *C.QState = nil + var outptr_QAbstractState *C.QAbstractState = nil + var outptr_QObject *C.QObject = nil + + C.QStateMachine_new4((C.int)(childMode), parent.cPointer(), &outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) + ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStateMachine) MetaObject() *QMetaObject { @@ -157,7 +194,7 @@ func (this *QStateMachine) DefaultAnimations() []*QAbstractAnimation { _ret := make([]*QAbstractAnimation, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractAnimation(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractAnimation(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -191,7 +228,7 @@ func (this *QStateMachine) Configuration() map[*QAbstractState]struct{} { _ret := make(map[*QAbstractState]struct{}, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _element := UnsafeNewQAbstractState(unsafe.Pointer(_outCast[i])) + _element := UnsafeNewQAbstractState(unsafe.Pointer(_outCast[i]), nil) _ret[_element] = struct{}{} } return _ret @@ -281,9 +318,198 @@ func (this *QStateMachine) PostEvent2(event *QEvent, priority QStateMachine__Eve C.QStateMachine_PostEvent2(this.h, event.cPointer(), (C.int)(priority)) } +func (this *QStateMachine) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QStateMachine_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QStateMachine) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QStateMachine_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_EventFilter +func miqt_exec_callback_QStateMachine_EventFilter(self *C.QStateMachine, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QStateMachine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStateMachine) callVirtualBase_OnEntry(event *QEvent) { + + C.QStateMachine_virtualbase_OnEntry(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStateMachine) OnOnEntry(slot func(super func(event *QEvent), event *QEvent)) { + C.QStateMachine_override_virtual_OnEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_OnEntry +func miqt_exec_callback_QStateMachine_OnEntry(self *C.QStateMachine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStateMachine{h: self}).callVirtualBase_OnEntry, slotval1) + +} + +func (this *QStateMachine) callVirtualBase_OnExit(event *QEvent) { + + C.QStateMachine_virtualbase_OnExit(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStateMachine) OnOnExit(slot func(super func(event *QEvent), event *QEvent)) { + C.QStateMachine_override_virtual_OnExit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_OnExit +func miqt_exec_callback_QStateMachine_OnExit(self *C.QStateMachine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStateMachine{h: self}).callVirtualBase_OnExit, slotval1) + +} + +func (this *QStateMachine) callVirtualBase_BeginSelectTransitions(event *QEvent) { + + C.QStateMachine_virtualbase_BeginSelectTransitions(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStateMachine) OnBeginSelectTransitions(slot func(super func(event *QEvent), event *QEvent)) { + C.QStateMachine_override_virtual_BeginSelectTransitions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_BeginSelectTransitions +func miqt_exec_callback_QStateMachine_BeginSelectTransitions(self *C.QStateMachine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStateMachine{h: self}).callVirtualBase_BeginSelectTransitions, slotval1) + +} + +func (this *QStateMachine) callVirtualBase_EndSelectTransitions(event *QEvent) { + + C.QStateMachine_virtualbase_EndSelectTransitions(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStateMachine) OnEndSelectTransitions(slot func(super func(event *QEvent), event *QEvent)) { + C.QStateMachine_override_virtual_EndSelectTransitions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_EndSelectTransitions +func miqt_exec_callback_QStateMachine_EndSelectTransitions(self *C.QStateMachine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStateMachine{h: self}).callVirtualBase_EndSelectTransitions, slotval1) + +} + +func (this *QStateMachine) callVirtualBase_BeginMicrostep(event *QEvent) { + + C.QStateMachine_virtualbase_BeginMicrostep(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStateMachine) OnBeginMicrostep(slot func(super func(event *QEvent), event *QEvent)) { + C.QStateMachine_override_virtual_BeginMicrostep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_BeginMicrostep +func miqt_exec_callback_QStateMachine_BeginMicrostep(self *C.QStateMachine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStateMachine{h: self}).callVirtualBase_BeginMicrostep, slotval1) + +} + +func (this *QStateMachine) callVirtualBase_EndMicrostep(event *QEvent) { + + C.QStateMachine_virtualbase_EndMicrostep(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStateMachine) OnEndMicrostep(slot func(super func(event *QEvent), event *QEvent)) { + C.QStateMachine_override_virtual_EndMicrostep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_EndMicrostep +func miqt_exec_callback_QStateMachine_EndMicrostep(self *C.QStateMachine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStateMachine{h: self}).callVirtualBase_EndMicrostep, slotval1) + +} + +func (this *QStateMachine) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QStateMachine_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QStateMachine) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QStateMachine_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStateMachine_Event +func miqt_exec_callback_QStateMachine_Event(self *C.QStateMachine, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QStateMachine{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QStateMachine) Delete() { - C.QStateMachine_Delete(this.h) + C.QStateMachine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -296,7 +522,8 @@ func (this *QStateMachine) GoGC() { } type QStateMachine__SignalEvent struct { - h *C.QStateMachine__SignalEvent + h *C.QStateMachine__SignalEvent + isSubclass bool *QEvent } @@ -314,21 +541,34 @@ func (this *QStateMachine__SignalEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStateMachine__SignalEvent(h *C.QStateMachine__SignalEvent) *QStateMachine__SignalEvent { +// newQStateMachine__SignalEvent constructs the type using only CGO pointers. +func newQStateMachine__SignalEvent(h *C.QStateMachine__SignalEvent, h_QEvent *C.QEvent) *QStateMachine__SignalEvent { if h == nil { return nil } - return &QStateMachine__SignalEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QStateMachine__SignalEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQStateMachine__SignalEvent(h unsafe.Pointer) *QStateMachine__SignalEvent { - return newQStateMachine__SignalEvent((*C.QStateMachine__SignalEvent)(h)) +// UnsafeNewQStateMachine__SignalEvent constructs the type using only unsafe pointers. +func UnsafeNewQStateMachine__SignalEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStateMachine__SignalEvent { + if h == nil { + return nil + } + + return &QStateMachine__SignalEvent{h: (*C.QStateMachine__SignalEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQStateMachine__SignalEvent constructs a new QStateMachine::SignalEvent object. func NewQStateMachine__SignalEvent(param1 *QStateMachine__SignalEvent) *QStateMachine__SignalEvent { - ret := C.QStateMachine__SignalEvent_new(param1.cPointer()) - return newQStateMachine__SignalEvent(ret) + var outptr_QStateMachine__SignalEvent *C.QStateMachine__SignalEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QStateMachine__SignalEvent_new(param1.cPointer(), &outptr_QStateMachine__SignalEvent, &outptr_QEvent) + ret := newQStateMachine__SignalEvent(outptr_QStateMachine__SignalEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QStateMachine__SignalEvent) Sender() *QObject { @@ -341,7 +581,7 @@ func (this *QStateMachine__SignalEvent) SignalIndex() int { // Delete this object from C++ memory. func (this *QStateMachine__SignalEvent) Delete() { - C.QStateMachine__SignalEvent_Delete(this.h) + C.QStateMachine__SignalEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -354,7 +594,8 @@ func (this *QStateMachine__SignalEvent) GoGC() { } type QStateMachine__WrappedEvent struct { - h *C.QStateMachine__WrappedEvent + h *C.QStateMachine__WrappedEvent + isSubclass bool *QEvent } @@ -372,27 +613,45 @@ func (this *QStateMachine__WrappedEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStateMachine__WrappedEvent(h *C.QStateMachine__WrappedEvent) *QStateMachine__WrappedEvent { +// newQStateMachine__WrappedEvent constructs the type using only CGO pointers. +func newQStateMachine__WrappedEvent(h *C.QStateMachine__WrappedEvent, h_QEvent *C.QEvent) *QStateMachine__WrappedEvent { if h == nil { return nil } - return &QStateMachine__WrappedEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QStateMachine__WrappedEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQStateMachine__WrappedEvent(h unsafe.Pointer) *QStateMachine__WrappedEvent { - return newQStateMachine__WrappedEvent((*C.QStateMachine__WrappedEvent)(h)) +// UnsafeNewQStateMachine__WrappedEvent constructs the type using only unsafe pointers. +func UnsafeNewQStateMachine__WrappedEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStateMachine__WrappedEvent { + if h == nil { + return nil + } + + return &QStateMachine__WrappedEvent{h: (*C.QStateMachine__WrappedEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQStateMachine__WrappedEvent constructs a new QStateMachine::WrappedEvent object. func NewQStateMachine__WrappedEvent(object *QObject, event *QEvent) *QStateMachine__WrappedEvent { - ret := C.QStateMachine__WrappedEvent_new(object.cPointer(), event.cPointer()) - return newQStateMachine__WrappedEvent(ret) + var outptr_QStateMachine__WrappedEvent *C.QStateMachine__WrappedEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QStateMachine__WrappedEvent_new(object.cPointer(), event.cPointer(), &outptr_QStateMachine__WrappedEvent, &outptr_QEvent) + ret := newQStateMachine__WrappedEvent(outptr_QStateMachine__WrappedEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQStateMachine__WrappedEvent2 constructs a new QStateMachine::WrappedEvent object. func NewQStateMachine__WrappedEvent2(param1 *QStateMachine__WrappedEvent) *QStateMachine__WrappedEvent { - ret := C.QStateMachine__WrappedEvent_new2(param1.cPointer()) - return newQStateMachine__WrappedEvent(ret) + var outptr_QStateMachine__WrappedEvent *C.QStateMachine__WrappedEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QStateMachine__WrappedEvent_new2(param1.cPointer(), &outptr_QStateMachine__WrappedEvent, &outptr_QEvent) + ret := newQStateMachine__WrappedEvent(outptr_QStateMachine__WrappedEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QStateMachine__WrappedEvent) Object() *QObject { @@ -405,7 +664,7 @@ func (this *QStateMachine__WrappedEvent) Event() *QEvent { // Delete this object from C++ memory. func (this *QStateMachine__WrappedEvent) Delete() { - C.QStateMachine__WrappedEvent_Delete(this.h) + C.QStateMachine__WrappedEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstatemachine.h b/qt/gen_qstatemachine.h index 0e61dd69..191e52d2 100644 --- a/qt/gen_qstatemachine.h +++ b/qt/gen_qstatemachine.h @@ -20,6 +20,7 @@ class QAbstractState; class QEvent; class QMetaObject; class QObject; +class QState; class QStateMachine; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QStateMachine__SignalEvent) typedef QStateMachine::SignalEvent QStateMachine__SignalEvent; @@ -37,15 +38,16 @@ typedef struct QAbstractState QAbstractState; typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QState QState; typedef struct QStateMachine QStateMachine; typedef struct QStateMachine__SignalEvent QStateMachine__SignalEvent; typedef struct QStateMachine__WrappedEvent QStateMachine__WrappedEvent; #endif -QStateMachine* QStateMachine_new(); -QStateMachine* QStateMachine_new2(int childMode); -QStateMachine* QStateMachine_new3(QObject* parent); -QStateMachine* QStateMachine_new4(int childMode, QObject* parent); +void QStateMachine_new(QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QStateMachine_new2(int childMode, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QStateMachine_new3(QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +void QStateMachine_new4(int childMode, QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); QMetaObject* QStateMachine_MetaObject(const QStateMachine* self); void* QStateMachine_Metacast(QStateMachine* self, const char* param1); struct miqt_string QStateMachine_Tr(const char* s); @@ -73,23 +75,46 @@ void QStateMachine_Stop(QStateMachine* self); void QStateMachine_SetRunning(QStateMachine* self, bool running); void QStateMachine_RunningChanged(QStateMachine* self, bool running); void QStateMachine_connect_RunningChanged(QStateMachine* self, intptr_t slot); +void QStateMachine_OnEntry(QStateMachine* self, QEvent* event); +void QStateMachine_OnExit(QStateMachine* self, QEvent* event); +void QStateMachine_BeginSelectTransitions(QStateMachine* self, QEvent* event); +void QStateMachine_EndSelectTransitions(QStateMachine* self, QEvent* event); +void QStateMachine_BeginMicrostep(QStateMachine* self, QEvent* event); +void QStateMachine_EndMicrostep(QStateMachine* self, QEvent* event); +bool QStateMachine_Event(QStateMachine* self, QEvent* e); struct miqt_string QStateMachine_Tr2(const char* s, const char* c); struct miqt_string QStateMachine_Tr3(const char* s, const char* c, int n); struct miqt_string QStateMachine_TrUtf82(const char* s, const char* c); struct miqt_string QStateMachine_TrUtf83(const char* s, const char* c, int n); void QStateMachine_PostEvent2(QStateMachine* self, QEvent* event, int priority); -void QStateMachine_Delete(QStateMachine* self); +void QStateMachine_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStateMachine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QStateMachine_override_virtual_OnEntry(void* self, intptr_t slot); +void QStateMachine_virtualbase_OnEntry(void* self, QEvent* event); +void QStateMachine_override_virtual_OnExit(void* self, intptr_t slot); +void QStateMachine_virtualbase_OnExit(void* self, QEvent* event); +void QStateMachine_override_virtual_BeginSelectTransitions(void* self, intptr_t slot); +void QStateMachine_virtualbase_BeginSelectTransitions(void* self, QEvent* event); +void QStateMachine_override_virtual_EndSelectTransitions(void* self, intptr_t slot); +void QStateMachine_virtualbase_EndSelectTransitions(void* self, QEvent* event); +void QStateMachine_override_virtual_BeginMicrostep(void* self, intptr_t slot); +void QStateMachine_virtualbase_BeginMicrostep(void* self, QEvent* event); +void QStateMachine_override_virtual_EndMicrostep(void* self, intptr_t slot); +void QStateMachine_virtualbase_EndMicrostep(void* self, QEvent* event); +void QStateMachine_override_virtual_Event(void* self, intptr_t slot); +bool QStateMachine_virtualbase_Event(void* self, QEvent* e); +void QStateMachine_Delete(QStateMachine* self, bool isSubclass); -QStateMachine__SignalEvent* QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1); +void QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1, QStateMachine__SignalEvent** outptr_QStateMachine__SignalEvent, QEvent** outptr_QEvent); QObject* QStateMachine__SignalEvent_Sender(const QStateMachine__SignalEvent* self); int QStateMachine__SignalEvent_SignalIndex(const QStateMachine__SignalEvent* self); -void QStateMachine__SignalEvent_Delete(QStateMachine__SignalEvent* self); +void QStateMachine__SignalEvent_Delete(QStateMachine__SignalEvent* self, bool isSubclass); -QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new(QObject* object, QEvent* event); -QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1); +void QStateMachine__WrappedEvent_new(QObject* object, QEvent* event, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent); +void QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent); QObject* QStateMachine__WrappedEvent_Object(const QStateMachine__WrappedEvent* self); QEvent* QStateMachine__WrappedEvent_Event(const QStateMachine__WrappedEvent* self); -void QStateMachine__WrappedEvent_Delete(QStateMachine__WrappedEvent* self); +void QStateMachine__WrappedEvent_Delete(QStateMachine__WrappedEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstatictext.cpp b/qt/gen_qstatictext.cpp index 89977da8..74f05533 100644 --- a/qt/gen_qstatictext.cpp +++ b/qt/gen_qstatictext.cpp @@ -10,17 +10,20 @@ #include "gen_qstatictext.h" #include "_cgo_export.h" -QStaticText* QStaticText_new() { - return new QStaticText(); +void QStaticText_new(QStaticText** outptr_QStaticText) { + QStaticText* ret = new QStaticText(); + *outptr_QStaticText = ret; } -QStaticText* QStaticText_new2(struct miqt_string text) { +void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QStaticText(text_QString); + QStaticText* ret = new QStaticText(text_QString); + *outptr_QStaticText = ret; } -QStaticText* QStaticText_new3(QStaticText* other) { - return new QStaticText(*other); +void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText) { + QStaticText* ret = new QStaticText(*other); + *outptr_QStaticText = ret; } void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1) { @@ -106,7 +109,11 @@ void QStaticText_Prepare2(QStaticText* self, QTransform* matrix, QFont* font) { self->prepare(*matrix, *font); } -void QStaticText_Delete(QStaticText* self) { - delete self; +void QStaticText_Delete(QStaticText* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstatictext.go b/qt/gen_qstatictext.go index c3dd9a0b..c96e2a5c 100644 --- a/qt/gen_qstatictext.go +++ b/qt/gen_qstatictext.go @@ -21,7 +21,8 @@ const ( ) type QStaticText struct { - h *C.QStaticText + h *C.QStaticText + isSubclass bool } func (this *QStaticText) cPointer() *C.QStaticText { @@ -38,6 +39,7 @@ func (this *QStaticText) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStaticText constructs the type using only CGO pointers. func newQStaticText(h *C.QStaticText) *QStaticText { if h == nil { return nil @@ -45,14 +47,23 @@ func newQStaticText(h *C.QStaticText) *QStaticText { return &QStaticText{h: h} } +// UnsafeNewQStaticText constructs the type using only unsafe pointers. func UnsafeNewQStaticText(h unsafe.Pointer) *QStaticText { - return newQStaticText((*C.QStaticText)(h)) + if h == nil { + return nil + } + + return &QStaticText{h: (*C.QStaticText)(h)} } // NewQStaticText constructs a new QStaticText object. func NewQStaticText() *QStaticText { - ret := C.QStaticText_new() - return newQStaticText(ret) + var outptr_QStaticText *C.QStaticText = nil + + C.QStaticText_new(&outptr_QStaticText) + ret := newQStaticText(outptr_QStaticText) + ret.isSubclass = true + return ret } // NewQStaticText2 constructs a new QStaticText object. @@ -61,14 +72,22 @@ func NewQStaticText2(text string) *QStaticText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QStaticText_new2(text_ms) - return newQStaticText(ret) + var outptr_QStaticText *C.QStaticText = nil + + C.QStaticText_new2(text_ms, &outptr_QStaticText) + ret := newQStaticText(outptr_QStaticText) + ret.isSubclass = true + return ret } // NewQStaticText3 constructs a new QStaticText object. func NewQStaticText3(other *QStaticText) *QStaticText { - ret := C.QStaticText_new3(other.cPointer()) - return newQStaticText(ret) + var outptr_QStaticText *C.QStaticText = nil + + C.QStaticText_new3(other.cPointer(), &outptr_QStaticText) + ret := newQStaticText(outptr_QStaticText) + ret.isSubclass = true + return ret } func (this *QStaticText) OperatorAssign(param1 *QStaticText) { @@ -158,7 +177,7 @@ func (this *QStaticText) Prepare2(matrix *QTransform, font *QFont) { // Delete this object from C++ memory. func (this *QStaticText) Delete() { - C.QStaticText_Delete(this.h) + C.QStaticText_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstatictext.h b/qt/gen_qstatictext.h index 17fb7af7..c3bad277 100644 --- a/qt/gen_qstatictext.h +++ b/qt/gen_qstatictext.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -QStaticText* QStaticText_new(); -QStaticText* QStaticText_new2(struct miqt_string text); -QStaticText* QStaticText_new3(QStaticText* other); +void QStaticText_new(QStaticText** outptr_QStaticText); +void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText); +void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText); void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1); void QStaticText_Swap(QStaticText* self, QStaticText* other); void QStaticText_SetText(QStaticText* self, struct miqt_string text); @@ -49,7 +49,7 @@ bool QStaticText_OperatorEqual(const QStaticText* self, QStaticText* param1); bool QStaticText_OperatorNotEqual(const QStaticText* self, QStaticText* param1); void QStaticText_Prepare1(QStaticText* self, QTransform* matrix); void QStaticText_Prepare2(QStaticText* self, QTransform* matrix, QFont* font); -void QStaticText_Delete(QStaticText* self); +void QStaticText_Delete(QStaticText* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstatusbar.cpp b/qt/gen_qstatusbar.cpp index 45da2588..54b68bc9 100644 --- a/qt/gen_qstatusbar.cpp +++ b/qt/gen_qstatusbar.cpp @@ -1,19 +1,1039 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qstatusbar.h" #include "_cgo_export.h" -QStatusBar* QStatusBar_new(QWidget* parent) { - return new QStatusBar(parent); +class MiqtVirtualQStatusBar : public virtual QStatusBar { +public: + + MiqtVirtualQStatusBar(QWidget* parent): QStatusBar(parent) {}; + MiqtVirtualQStatusBar(): QStatusBar() {}; + + virtual ~MiqtVirtualQStatusBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QStatusBar::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QStatusBar::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QStatusBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QStatusBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QStatusBar::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QStatusBar::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QStatusBar::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QStatusBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QStatusBar::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QStatusBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QStatusBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QStatusBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QStatusBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QStatusBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QStatusBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QStatusBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStatusBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QStatusBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QStatusBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStatusBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QStatusBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QStatusBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QStatusBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QStatusBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QStatusBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QStatusBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QStatusBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QStatusBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QStatusBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QStatusBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QStatusBar::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QStatusBar::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QStatusBar::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QStatusBar::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QStatusBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QStatusBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QStatusBar::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QStatusBar::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QStatusBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QStatusBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QStatusBar::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QStatusBar::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QStatusBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QStatusBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QStatusBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QStatusBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QStatusBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QStatusBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QStatusBar::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QStatusBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QStatusBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QStatusBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QStatusBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QStatusBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QStatusBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QStatusBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QStatusBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QStatusBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QStatusBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QStatusBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QStatusBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QStatusBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QStatusBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QStatusBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QStatusBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QStatusBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QStatusBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QStatusBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QStatusBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QStatusBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QStatusBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QStatusBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QStatusBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QStatusBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QStatusBar::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QStatusBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QStatusBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QStatusBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QStatusBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QStatusBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QStatusBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QStatusBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QStatusBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QStatusBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QStatusBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QStatusBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QStatusBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QStatusBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QStatusBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QStatusBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QStatusBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QStatusBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QStatusBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QStatusBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QStatusBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QStatusBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QStatusBar::focusNextPrevChild(next); + + } + +}; + +void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(parent); + *outptr_QStatusBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QStatusBar* QStatusBar_new2() { - return new QStatusBar(); +void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(); + *outptr_QStatusBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QStatusBar_MetaObject(const QStatusBar* self) { @@ -100,7 +1120,7 @@ void QStatusBar_MessageChanged(QStatusBar* self, struct miqt_string text) { } void QStatusBar_connect_MessageChanged(QStatusBar* self, intptr_t slot) { - QStatusBar::connect(self, static_cast(&QStatusBar::messageChanged), self, [=](const QString& text) { + MiqtVirtualQStatusBar::connect(self, static_cast(&QStatusBar::messageChanged), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -178,7 +1198,339 @@ void QStatusBar_ShowMessage2(QStatusBar* self, struct miqt_string text, int time self->showMessage(text_QString, static_cast(timeout)); } -void QStatusBar_Delete(QStatusBar* self) { - delete self; +void QStatusBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ShowEvent = slot; +} + +void QStatusBar_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ShowEvent(param1); +} + +void QStatusBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__PaintEvent = slot; +} + +void QStatusBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QStatusBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ResizeEvent = slot; +} + +void QStatusBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QStatusBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__Event = slot; +} + +bool QStatusBar_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_Event(param1); +} + +void QStatusBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DevType = slot; +} + +int QStatusBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_DevType(); +} + +void QStatusBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__SetVisible = slot; +} + +void QStatusBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QStatusBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QStatusBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_SizeHint(); +} + +void QStatusBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QStatusBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QStatusBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__HeightForWidth = slot; +} + +int QStatusBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QStatusBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QStatusBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QStatusBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QStatusBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_PaintEngine(); +} + +void QStatusBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MousePressEvent = slot; +} + +void QStatusBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MousePressEvent(event); +} + +void QStatusBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QStatusBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QStatusBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QStatusBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QStatusBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QStatusBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QStatusBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__WheelEvent = slot; +} + +void QStatusBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QStatusBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QStatusBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QStatusBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QStatusBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QStatusBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__FocusInEvent = slot; +} + +void QStatusBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QStatusBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QStatusBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QStatusBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__EnterEvent = slot; +} + +void QStatusBar_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QStatusBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__LeaveEvent = slot; +} + +void QStatusBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QStatusBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MoveEvent = slot; +} + +void QStatusBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QStatusBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__CloseEvent = slot; +} + +void QStatusBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QStatusBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QStatusBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QStatusBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__TabletEvent = slot; +} + +void QStatusBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QStatusBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ActionEvent = slot; +} + +void QStatusBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QStatusBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QStatusBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QStatusBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QStatusBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QStatusBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QStatusBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QStatusBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DropEvent = slot; +} + +void QStatusBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DropEvent(event); +} + +void QStatusBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__HideEvent = slot; +} + +void QStatusBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_HideEvent(event); +} + +void QStatusBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__NativeEvent = slot; +} + +bool QStatusBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QStatusBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ChangeEvent = slot; +} + +void QStatusBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QStatusBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__Metric = slot; +} + +int QStatusBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_Metric(param1); +} + +void QStatusBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__InitPainter = slot; +} + +void QStatusBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QStatusBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QStatusBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_Redirected(offset); +} + +void QStatusBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QStatusBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_SharedPainter(); +} + +void QStatusBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QStatusBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QStatusBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QStatusBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QStatusBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QStatusBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QStatusBar_Delete(QStatusBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstatusbar.go b/qt/gen_qstatusbar.go index 081b81b1..7e2c9141 100644 --- a/qt/gen_qstatusbar.go +++ b/qt/gen_qstatusbar.go @@ -15,7 +15,8 @@ import ( ) type QStatusBar struct { - h *C.QStatusBar + h *C.QStatusBar + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QStatusBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStatusBar(h *C.QStatusBar) *QStatusBar { +// newQStatusBar constructs the type using only CGO pointers. +func newQStatusBar(h *C.QStatusBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStatusBar { if h == nil { return nil } - return &QStatusBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QStatusBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQStatusBar(h unsafe.Pointer) *QStatusBar { - return newQStatusBar((*C.QStatusBar)(h)) +// UnsafeNewQStatusBar constructs the type using only unsafe pointers. +func UnsafeNewQStatusBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStatusBar { + if h == nil { + return nil + } + + return &QStatusBar{h: (*C.QStatusBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQStatusBar constructs a new QStatusBar object. func NewQStatusBar(parent *QWidget) *QStatusBar { - ret := C.QStatusBar_new(parent.cPointer()) - return newQStatusBar(ret) + var outptr_QStatusBar *C.QStatusBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStatusBar_new(parent.cPointer(), &outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQStatusBar2 constructs a new QStatusBar object. func NewQStatusBar2() *QStatusBar { - ret := C.QStatusBar_new2() - return newQStatusBar(ret) + var outptr_QStatusBar *C.QStatusBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStatusBar_new2(&outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QStatusBar) MetaObject() *QMetaObject { @@ -226,9 +249,975 @@ func (this *QStatusBar) ShowMessage2(text string, timeout int) { C.QStatusBar_ShowMessage2(this.h, text_ms, (C.int)(timeout)) } +func (this *QStatusBar) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QStatusBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QStatusBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ShowEvent +func miqt_exec_callback_QStatusBar_ShowEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QStatusBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QStatusBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_PaintEvent +func miqt_exec_callback_QStatusBar_PaintEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QStatusBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QStatusBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ResizeEvent +func miqt_exec_callback_QStatusBar_ResizeEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QStatusBar_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QStatusBar) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QStatusBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_Event +func miqt_exec_callback_QStatusBar_Event(self *C.QStatusBar, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_DevType() int { + + return (int)(C.QStatusBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QStatusBar) OnDevType(slot func(super func() int) int) { + C.QStatusBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DevType +func miqt_exec_callback_QStatusBar_DevType(self *C.QStatusBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_SetVisible(visible bool) { + + C.QStatusBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QStatusBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QStatusBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_SetVisible +func miqt_exec_callback_QStatusBar_SetVisible(self *C.QStatusBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QStatusBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QStatusBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStatusBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QStatusBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_SizeHint +func miqt_exec_callback_QStatusBar_SizeHint(self *C.QStatusBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QStatusBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStatusBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QStatusBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MinimumSizeHint +func miqt_exec_callback_QStatusBar_MinimumSizeHint(self *C.QStatusBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QStatusBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QStatusBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QStatusBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_HeightForWidth +func miqt_exec_callback_QStatusBar_HeightForWidth(self *C.QStatusBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QStatusBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QStatusBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QStatusBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_HasHeightForWidth +func miqt_exec_callback_QStatusBar_HasHeightForWidth(self *C.QStatusBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QStatusBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QStatusBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QStatusBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_PaintEngine +func miqt_exec_callback_QStatusBar_PaintEngine(self *C.QStatusBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MousePressEvent +func miqt_exec_callback_QStatusBar_MousePressEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MouseReleaseEvent +func miqt_exec_callback_QStatusBar_MouseReleaseEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MouseDoubleClickEvent +func miqt_exec_callback_QStatusBar_MouseDoubleClickEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MouseMoveEvent +func miqt_exec_callback_QStatusBar_MouseMoveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QStatusBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QStatusBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_WheelEvent +func miqt_exec_callback_QStatusBar_WheelEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QStatusBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QStatusBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_KeyPressEvent +func miqt_exec_callback_QStatusBar_KeyPressEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QStatusBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QStatusBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_KeyReleaseEvent +func miqt_exec_callback_QStatusBar_KeyReleaseEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QStatusBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QStatusBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_FocusInEvent +func miqt_exec_callback_QStatusBar_FocusInEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QStatusBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QStatusBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_FocusOutEvent +func miqt_exec_callback_QStatusBar_FocusOutEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_EnterEvent(event *QEvent) { + + C.QStatusBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStatusBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_EnterEvent +func miqt_exec_callback_QStatusBar_EnterEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QStatusBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStatusBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_LeaveEvent +func miqt_exec_callback_QStatusBar_LeaveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QStatusBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QStatusBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MoveEvent +func miqt_exec_callback_QStatusBar_MoveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QStatusBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QStatusBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_CloseEvent +func miqt_exec_callback_QStatusBar_CloseEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QStatusBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QStatusBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ContextMenuEvent +func miqt_exec_callback_QStatusBar_ContextMenuEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QStatusBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QStatusBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_TabletEvent +func miqt_exec_callback_QStatusBar_TabletEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QStatusBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QStatusBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ActionEvent +func miqt_exec_callback_QStatusBar_ActionEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QStatusBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QStatusBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DragEnterEvent +func miqt_exec_callback_QStatusBar_DragEnterEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QStatusBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QStatusBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DragMoveEvent +func miqt_exec_callback_QStatusBar_DragMoveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QStatusBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QStatusBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DragLeaveEvent +func miqt_exec_callback_QStatusBar_DragLeaveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QStatusBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QStatusBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DropEvent +func miqt_exec_callback_QStatusBar_DropEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QStatusBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QStatusBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_HideEvent +func miqt_exec_callback_QStatusBar_HideEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QStatusBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QStatusBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QStatusBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_NativeEvent +func miqt_exec_callback_QStatusBar_NativeEvent(self *C.QStatusBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QStatusBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QStatusBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ChangeEvent +func miqt_exec_callback_QStatusBar_ChangeEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QStatusBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QStatusBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QStatusBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_Metric +func miqt_exec_callback_QStatusBar_Metric(self *C.QStatusBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QStatusBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QStatusBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QStatusBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_InitPainter +func miqt_exec_callback_QStatusBar_InitPainter(self *C.QStatusBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QStatusBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QStatusBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QStatusBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_Redirected +func miqt_exec_callback_QStatusBar_Redirected(self *C.QStatusBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QStatusBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QStatusBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QStatusBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_SharedPainter +func miqt_exec_callback_QStatusBar_SharedPainter(self *C.QStatusBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QStatusBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QStatusBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_InputMethodEvent +func miqt_exec_callback_QStatusBar_InputMethodEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QStatusBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStatusBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QStatusBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_InputMethodQuery +func miqt_exec_callback_QStatusBar_InputMethodQuery(self *C.QStatusBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QStatusBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QStatusBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QStatusBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_FocusNextPrevChild +func miqt_exec_callback_QStatusBar_FocusNextPrevChild(self *C.QStatusBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QStatusBar) Delete() { - C.QStatusBar_Delete(this.h) + C.QStatusBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstatusbar.h b/qt/gen_qstatusbar.h index bfebbc75..1ecead00 100644 --- a/qt/gen_qstatusbar.h +++ b/qt/gen_qstatusbar.h @@ -15,17 +15,71 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; class QStatusBar; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QStatusBar QStatusBar; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QStatusBar* QStatusBar_new(QWidget* parent); -QStatusBar* QStatusBar_new2(); +void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QStatusBar_MetaObject(const QStatusBar* self); void* QStatusBar_Metacast(QStatusBar* self, const char* param1); struct miqt_string QStatusBar_Tr(const char* s); @@ -42,6 +96,10 @@ void QStatusBar_ShowMessage(QStatusBar* self, struct miqt_string text); void QStatusBar_ClearMessage(QStatusBar* self); void QStatusBar_MessageChanged(QStatusBar* self, struct miqt_string text); void QStatusBar_connect_MessageChanged(QStatusBar* self, intptr_t slot); +void QStatusBar_ShowEvent(QStatusBar* self, QShowEvent* param1); +void QStatusBar_PaintEvent(QStatusBar* self, QPaintEvent* param1); +void QStatusBar_ResizeEvent(QStatusBar* self, QResizeEvent* param1); +bool QStatusBar_Event(QStatusBar* self, QEvent* param1); struct miqt_string QStatusBar_Tr2(const char* s, const char* c); struct miqt_string QStatusBar_Tr3(const char* s, const char* c, int n); struct miqt_string QStatusBar_TrUtf82(const char* s, const char* c); @@ -51,7 +109,89 @@ int QStatusBar_InsertWidget3(QStatusBar* self, int index, QWidget* widget, int s void QStatusBar_AddPermanentWidget2(QStatusBar* self, QWidget* widget, int stretch); int QStatusBar_InsertPermanentWidget3(QStatusBar* self, int index, QWidget* widget, int stretch); void QStatusBar_ShowMessage2(QStatusBar* self, struct miqt_string text, int timeout); -void QStatusBar_Delete(QStatusBar* self); +void QStatusBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QStatusBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QStatusBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QStatusBar_override_virtual_Event(void* self, intptr_t slot); +bool QStatusBar_virtualbase_Event(void* self, QEvent* param1); +void QStatusBar_override_virtual_DevType(void* self, intptr_t slot); +int QStatusBar_virtualbase_DevType(const void* self); +void QStatusBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QStatusBar_virtualbase_SetVisible(void* self, bool visible); +void QStatusBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStatusBar_virtualbase_SizeHint(const void* self); +void QStatusBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QStatusBar_virtualbase_MinimumSizeHint(const void* self); +void QStatusBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QStatusBar_virtualbase_HeightForWidth(const void* self, int param1); +void QStatusBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QStatusBar_virtualbase_HasHeightForWidth(const void* self); +void QStatusBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QStatusBar_virtualbase_PaintEngine(const void* self); +void QStatusBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QStatusBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QStatusBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QStatusBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QStatusBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QStatusBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_EnterEvent(void* self, QEvent* event); +void QStatusBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QStatusBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QStatusBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QStatusBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QStatusBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QStatusBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QStatusBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QStatusBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QStatusBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QStatusBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QStatusBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QStatusBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QStatusBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QStatusBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QStatusBar_override_virtual_Metric(void* self, intptr_t slot); +int QStatusBar_virtualbase_Metric(const void* self, int param1); +void QStatusBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QStatusBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QStatusBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QStatusBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QStatusBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QStatusBar_virtualbase_SharedPainter(const void* self); +void QStatusBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QStatusBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QStatusBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QStatusBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QStatusBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QStatusBar_Delete(QStatusBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstorageinfo.cpp b/qt/gen_qstorageinfo.cpp index 35a393c3..bd643154 100644 --- a/qt/gen_qstorageinfo.cpp +++ b/qt/gen_qstorageinfo.cpp @@ -9,21 +9,25 @@ #include "gen_qstorageinfo.h" #include "_cgo_export.h" -QStorageInfo* QStorageInfo_new() { - return new QStorageInfo(); +void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo) { + QStorageInfo* ret = new QStorageInfo(); + *outptr_QStorageInfo = ret; } -QStorageInfo* QStorageInfo_new2(struct miqt_string path) { +void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QStorageInfo(path_QString); + QStorageInfo* ret = new QStorageInfo(path_QString); + *outptr_QStorageInfo = ret; } -QStorageInfo* QStorageInfo_new3(QDir* dir) { - return new QStorageInfo(*dir); +void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo) { + QStorageInfo* ret = new QStorageInfo(*dir); + *outptr_QStorageInfo = ret; } -QStorageInfo* QStorageInfo_new4(QStorageInfo* other) { - return new QStorageInfo(*other); +void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo) { + QStorageInfo* ret = new QStorageInfo(*other); + *outptr_QStorageInfo = ret; } void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other) { @@ -155,7 +159,11 @@ QStorageInfo* QStorageInfo_Root() { return new QStorageInfo(QStorageInfo::root()); } -void QStorageInfo_Delete(QStorageInfo* self) { - delete self; +void QStorageInfo_Delete(QStorageInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstorageinfo.go b/qt/gen_qstorageinfo.go index 9916859c..ca24d2a3 100644 --- a/qt/gen_qstorageinfo.go +++ b/qt/gen_qstorageinfo.go @@ -14,7 +14,8 @@ import ( ) type QStorageInfo struct { - h *C.QStorageInfo + h *C.QStorageInfo + isSubclass bool } func (this *QStorageInfo) cPointer() *C.QStorageInfo { @@ -31,6 +32,7 @@ func (this *QStorageInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStorageInfo constructs the type using only CGO pointers. func newQStorageInfo(h *C.QStorageInfo) *QStorageInfo { if h == nil { return nil @@ -38,14 +40,23 @@ func newQStorageInfo(h *C.QStorageInfo) *QStorageInfo { return &QStorageInfo{h: h} } +// UnsafeNewQStorageInfo constructs the type using only unsafe pointers. func UnsafeNewQStorageInfo(h unsafe.Pointer) *QStorageInfo { - return newQStorageInfo((*C.QStorageInfo)(h)) + if h == nil { + return nil + } + + return &QStorageInfo{h: (*C.QStorageInfo)(h)} } // NewQStorageInfo constructs a new QStorageInfo object. func NewQStorageInfo() *QStorageInfo { - ret := C.QStorageInfo_new() - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new(&outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } // NewQStorageInfo2 constructs a new QStorageInfo object. @@ -54,20 +65,32 @@ func NewQStorageInfo2(path string) *QStorageInfo { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QStorageInfo_new2(path_ms) - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new2(path_ms, &outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } // NewQStorageInfo3 constructs a new QStorageInfo object. func NewQStorageInfo3(dir *QDir) *QStorageInfo { - ret := C.QStorageInfo_new3(dir.cPointer()) - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new3(dir.cPointer(), &outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } // NewQStorageInfo4 constructs a new QStorageInfo object. func NewQStorageInfo4(other *QStorageInfo) *QStorageInfo { - ret := C.QStorageInfo_new4(other.cPointer()) - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new4(other.cPointer(), &outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } func (this *QStorageInfo) OperatorAssign(other *QStorageInfo) { @@ -186,7 +209,7 @@ func QStorageInfo_Root() *QStorageInfo { // Delete this object from C++ memory. func (this *QStorageInfo) Delete() { - C.QStorageInfo_Delete(this.h) + C.QStorageInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstorageinfo.h b/qt/gen_qstorageinfo.h index 4fa2db8b..ff708dc9 100644 --- a/qt/gen_qstorageinfo.h +++ b/qt/gen_qstorageinfo.h @@ -24,10 +24,10 @@ typedef struct QDir QDir; typedef struct QStorageInfo QStorageInfo; #endif -QStorageInfo* QStorageInfo_new(); -QStorageInfo* QStorageInfo_new2(struct miqt_string path); -QStorageInfo* QStorageInfo_new3(QDir* dir); -QStorageInfo* QStorageInfo_new4(QStorageInfo* other); +void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo); +void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo); +void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo); +void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo); void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_Swap(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_SetPath(QStorageInfo* self, struct miqt_string path); @@ -48,7 +48,7 @@ bool QStorageInfo_IsValid(const QStorageInfo* self); void QStorageInfo_Refresh(QStorageInfo* self); struct miqt_array /* of QStorageInfo* */ QStorageInfo_MountedVolumes(); QStorageInfo* QStorageInfo_Root(); -void QStorageInfo_Delete(QStorageInfo* self); +void QStorageInfo_Delete(QStorageInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstringbuilder.cpp b/qt/gen_qstringbuilder.cpp index 15758bdf..4018eb00 100644 --- a/qt/gen_qstringbuilder.cpp +++ b/qt/gen_qstringbuilder.cpp @@ -2,7 +2,11 @@ #include "gen_qstringbuilder.h" #include "_cgo_export.h" -void QAbstractConcatenable_Delete(QAbstractConcatenable* self) { - delete self; +void QAbstractConcatenable_Delete(QAbstractConcatenable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstringbuilder.go b/qt/gen_qstringbuilder.go index 034c2dcb..9a97943b 100644 --- a/qt/gen_qstringbuilder.go +++ b/qt/gen_qstringbuilder.go @@ -14,7 +14,8 @@ import ( ) type QAbstractConcatenable struct { - h *C.QAbstractConcatenable + h *C.QAbstractConcatenable + isSubclass bool } func (this *QAbstractConcatenable) cPointer() *C.QAbstractConcatenable { @@ -31,6 +32,7 @@ func (this *QAbstractConcatenable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractConcatenable constructs the type using only CGO pointers. func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable { if h == nil { return nil @@ -38,13 +40,18 @@ func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable return &QAbstractConcatenable{h: h} } +// UnsafeNewQAbstractConcatenable constructs the type using only unsafe pointers. func UnsafeNewQAbstractConcatenable(h unsafe.Pointer) *QAbstractConcatenable { - return newQAbstractConcatenable((*C.QAbstractConcatenable)(h)) + if h == nil { + return nil + } + + return &QAbstractConcatenable{h: (*C.QAbstractConcatenable)(h)} } // Delete this object from C++ memory. func (this *QAbstractConcatenable) Delete() { - C.QAbstractConcatenable_Delete(this.h) + C.QAbstractConcatenable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstringbuilder.h b/qt/gen_qstringbuilder.h index b4e4643d..78e095d2 100644 --- a/qt/gen_qstringbuilder.h +++ b/qt/gen_qstringbuilder.h @@ -20,7 +20,7 @@ class QAbstractConcatenable; typedef struct QAbstractConcatenable QAbstractConcatenable; #endif -void QAbstractConcatenable_Delete(QAbstractConcatenable* self); +void QAbstractConcatenable_Delete(QAbstractConcatenable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstringlistmodel.cpp b/qt/gen_qstringlistmodel.cpp index 61e468c0..246b7835 100644 --- a/qt/gen_qstringlistmodel.cpp +++ b/qt/gen_qstringlistmodel.cpp @@ -1,6 +1,9 @@ +#include +#include #include #include #include +#include #include #include #include @@ -12,11 +15,442 @@ #include "gen_qstringlistmodel.h" #include "_cgo_export.h" -QStringListModel* QStringListModel_new() { - return new QStringListModel(); +class MiqtVirtualQStringListModel : public virtual QStringListModel { +public: + + MiqtVirtualQStringListModel(): QStringListModel() {}; + MiqtVirtualQStringListModel(const QStringList& strings): QStringListModel(strings) {}; + MiqtVirtualQStringListModel(QObject* parent): QStringListModel(parent) {}; + MiqtVirtualQStringListModel(const QStringList& strings, QObject* parent): QStringListModel(strings, parent) {}; + + virtual ~MiqtVirtualQStringListModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QStringListModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QStringListModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QStringListModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QStringListModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStringListModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QStringListModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QStringListModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStringListModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QStringListModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QStringListModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QStringListModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QStringListModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QStringListModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QStringListModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QStringListModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QStringListModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QStringListModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QStringListModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QStringListModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QStringListModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QStringListModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QStringListModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QStringListModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QStringListModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QStringListModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QStringListModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QStringListModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QStringListModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QStringListModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QStringListModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QStringListModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QStringListModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QStringListModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QStringListModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QStringListModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStringListModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QStringListModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QStringListModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QStringListModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + +}; + +void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings) { +void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -24,14 +458,22 @@ QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_stri QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QStringListModel(strings_QList); + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStringListModel* QStringListModel_new3(QObject* parent) { - return new QStringListModel(parent); +void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(parent); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent) { +void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -39,7 +481,11 @@ QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_stri QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QStringListModel(strings_QList, parent); + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList, parent); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QStringListModel_MetaObject(const QStringListModel* self) { @@ -72,20 +518,20 @@ struct miqt_string QStringListModel_TrUtf8(const char* s) { return _ms; } -int QStringListModel_RowCount(const QStringListModel* self) { - return self->rowCount(); +int QStringListModel_RowCount(const QStringListModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } QModelIndex* QStringListModel_Sibling(const QStringListModel* self, int row, int column, QModelIndex* idx) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } int QStringListModel_Flags(const QStringListModel* self, QModelIndex* index) { @@ -93,12 +539,12 @@ int QStringListModel_Flags(const QStringListModel* self, QModelIndex* index) { return static_cast(_ret); } -bool QStringListModel_InsertRows(QStringListModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QStringListModel_InsertRows(QStringListModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QStringListModel_MoveRows(QStringListModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { @@ -133,8 +579,8 @@ bool QStringListModel_SetItemData(QStringListModel* self, QModelIndex* index, st return self->setItemData(*index, roles_QMap); } -void QStringListModel_Sort(QStringListModel* self, int column) { - self->sort(static_cast(column)); +void QStringListModel_Sort(QStringListModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QStringListModel_StringList(const QStringListModel* self) { @@ -217,31 +663,123 @@ struct miqt_string QStringListModel_TrUtf83(const char* s, const char* c, int n) return _ms; } -int QStringListModel_RowCount1(const QStringListModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QStringListModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__RowCount = slot; } -QVariant* QStringListModel_Data2(const QStringListModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +int QStringListModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_RowCount(parent); } -bool QStringListModel_SetData3(QStringListModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +void QStringListModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Sibling = slot; } -bool QStringListModel_InsertRows3(QStringListModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +QModelIndex* QStringListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Sibling(row, column, idx); } -bool QStringListModel_RemoveRows3(QStringListModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +void QStringListModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Data = slot; } -void QStringListModel_Sort2(QStringListModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +QVariant* QStringListModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Data(index, role); } -void QStringListModel_Delete(QStringListModel* self) { - delete self; +void QStringListModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__SetData = slot; +} + +bool QStringListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QStringListModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Flags = slot; +} + +int QStringListModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Flags(index); +} + +void QStringListModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__InsertRows = slot; +} + +bool QStringListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QStringListModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__RemoveRows = slot; +} + +bool QStringListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QStringListModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__MoveRows = slot; +} + +bool QStringListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QStringListModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QStringListModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_ItemData(index); +} + +void QStringListModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__SetItemData = slot; +} + +bool QStringListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QStringListModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Sort = slot; +} + +void QStringListModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_Sort(column, order); +} + +void QStringListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QStringListModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QStringListModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QStringListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QStringListModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__DropMimeData = slot; +} + +bool QStringListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QStringListModel_Delete(QStringListModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstringlistmodel.go b/qt/gen_qstringlistmodel.go index 2ac209a2..b35bd03e 100644 --- a/qt/gen_qstringlistmodel.go +++ b/qt/gen_qstringlistmodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QStringListModel struct { - h *C.QStringListModel + h *C.QStringListModel + isSubclass bool *QAbstractListModel } @@ -32,21 +34,36 @@ func (this *QStringListModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStringListModel(h *C.QStringListModel) *QStringListModel { +// newQStringListModel constructs the type using only CGO pointers. +func newQStringListModel(h *C.QStringListModel, h_QAbstractListModel *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStringListModel { if h == nil { return nil } - return &QStringListModel{h: h, QAbstractListModel: UnsafeNewQAbstractListModel(unsafe.Pointer(h))} + return &QStringListModel{h: h, + QAbstractListModel: newQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQStringListModel(h unsafe.Pointer) *QStringListModel { - return newQStringListModel((*C.QStringListModel)(h)) +// UnsafeNewQStringListModel constructs the type using only unsafe pointers. +func UnsafeNewQStringListModel(h unsafe.Pointer, h_QAbstractListModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStringListModel { + if h == nil { + return nil + } + + return &QStringListModel{h: (*C.QStringListModel)(h), + QAbstractListModel: UnsafeNewQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} } // NewQStringListModel constructs a new QStringListModel object. func NewQStringListModel() *QStringListModel { - ret := C.QStringListModel_new() - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new(&outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStringListModel2 constructs a new QStringListModel object. @@ -61,14 +78,28 @@ func NewQStringListModel2(strings []string) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QStringListModel_new2(strings_ma) - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new2(strings_ma, &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStringListModel3 constructs a new QStringListModel object. func NewQStringListModel3(parent *QObject) *QStringListModel { - ret := C.QStringListModel_new3(parent.cPointer()) - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new3(parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStringListModel4 constructs a new QStringListModel object. @@ -83,8 +114,15 @@ func NewQStringListModel4(strings []string, parent *QObject) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QStringListModel_new4(strings_ma, parent.cPointer()) - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new4(strings_ma, parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStringListModel) MetaObject() *QMetaObject { @@ -115,8 +153,8 @@ func QStringListModel_TrUtf8(s string) string { return _ret } -func (this *QStringListModel) RowCount() int { - return (int)(C.QStringListModel_RowCount(this.h)) +func (this *QStringListModel) RowCount(parent *QModelIndex) int { + return (int)(C.QStringListModel_RowCount(this.h, parent.cPointer())) } func (this *QStringListModel) Sibling(row int, column int, idx *QModelIndex) *QModelIndex { @@ -126,27 +164,27 @@ func (this *QStringListModel) Sibling(row int, column int, idx *QModelIndex) *QM return _goptr } -func (this *QStringListModel) Data(index *QModelIndex) *QVariant { - _ret := C.QStringListModel_Data(this.h, index.cPointer()) +func (this *QStringListModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QStringListModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStringListModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QStringListModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QStringListModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QStringListModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QStringListModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QStringListModel_Flags(this.h, index.cPointer())) } -func (this *QStringListModel) InsertRows(row int, count int) bool { - return (bool)(C.QStringListModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStringListModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStringListModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStringListModel) RemoveRows(row int, count int) bool { - return (bool)(C.QStringListModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStringListModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStringListModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } func (this *QStringListModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { @@ -190,8 +228,8 @@ func (this *QStringListModel) SetItemData(index *QModelIndex, roles map[int]QVar return (bool)(C.QStringListModel_SetItemData(this.h, index.cPointer(), roles_mm)) } -func (this *QStringListModel) Sort(column int) { - C.QStringListModel_Sort(this.h, (C.int)(column)) +func (this *QStringListModel) Sort(column int, order SortOrder) { + C.QStringListModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QStringListModel) StringList() []string { @@ -269,36 +307,456 @@ func QStringListModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QStringListModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QStringListModel_RowCount1(this.h, parent.cPointer())) +func (this *QStringListModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QStringListModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStringListModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QStringListModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_RowCount +func miqt_exec_callback_QStringListModel_RowCount(self *C.QStringListModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QStringListModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStringListModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QStringListModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Sibling +func miqt_exec_callback_QStringListModel_Sibling(self *C.QStringListModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QStringListModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QStringListModel_Data2(this.h, index.cPointer(), (C.int)(role)) +func (this *QStringListModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QStringListModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QStringListModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QStringListModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QStringListModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QStringListModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +//export miqt_exec_callback_QStringListModel_Data +func miqt_exec_callback_QStringListModel_Data(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QStringListModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStringListModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +func (this *QStringListModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QStringListModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + } +func (this *QStringListModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QStringListModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_SetData +func miqt_exec_callback_QStringListModel_SetData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) -func (this *QStringListModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStringListModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStringListModel) Sort2(column int, order SortOrder) { - C.QStringListModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +func (this *QStringListModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QStringListModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QStringListModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QStringListModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Flags +func miqt_exec_callback_QStringListModel_Flags(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStringListModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStringListModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_InsertRows +func miqt_exec_callback_QStringListModel_InsertRows(self *C.QStringListModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStringListModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStringListModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_RemoveRows +func miqt_exec_callback_QStringListModel_RemoveRows(self *C.QStringListModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QStringListModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QStringListModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QStringListModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_MoveRows +func miqt_exec_callback_QStringListModel_MoveRows(self *C.QStringListModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QStringListModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QStringListModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QStringListModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_ItemData +func miqt_exec_callback_QStringListModel_ItemData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QStringListModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QStringListModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QStringListModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QStringListModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_SetItemData +func miqt_exec_callback_QStringListModel_SetItemData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QStringListModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QStringListModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QStringListModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Sort +func miqt_exec_callback_QStringListModel_Sort(self *C.QStringListModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QStringListModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QStringListModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QStringListModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QStringListModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QStringListModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_SupportedDropActions +func miqt_exec_callback_QStringListModel_SupportedDropActions(self *C.QStringListModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QStringListModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStringListModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QStringListModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Index +func miqt_exec_callback_QStringListModel_Index(self *C.QStringListModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStringListModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QStringListModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QStringListModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_DropMimeData +func miqt_exec_callback_QStringListModel_DropMimeData(self *C.QStringListModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QStringListModel) Delete() { - C.QStringListModel_Delete(this.h) + C.QStringListModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstringlistmodel.h b/qt/gen_qstringlistmodel.h index a110c1c7..83a9da12 100644 --- a/qt/gen_qstringlistmodel.h +++ b/qt/gen_qstringlistmodel.h @@ -15,38 +15,44 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; +class QAbstractListModel; class QMetaObject; +class QMimeData; class QModelIndex; class QObject; class QStringListModel; class QVariant; #else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractListModel QAbstractListModel; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QStringListModel QStringListModel; typedef struct QVariant QVariant; #endif -QStringListModel* QStringListModel_new(); -QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings); -QStringListModel* QStringListModel_new3(QObject* parent); -QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent); +void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QStringListModel_MetaObject(const QStringListModel* self); void* QStringListModel_Metacast(QStringListModel* self, const char* param1); struct miqt_string QStringListModel_Tr(const char* s); struct miqt_string QStringListModel_TrUtf8(const char* s); -int QStringListModel_RowCount(const QStringListModel* self); +int QStringListModel_RowCount(const QStringListModel* self, QModelIndex* parent); QModelIndex* QStringListModel_Sibling(const QStringListModel* self, int row, int column, QModelIndex* idx); -QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index); -bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value); +QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index, int role); +bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value, int role); int QStringListModel_Flags(const QStringListModel* self, QModelIndex* index); -bool QStringListModel_InsertRows(QStringListModel* self, int row, int count); -bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count); +bool QStringListModel_InsertRows(QStringListModel* self, int row, int count, QModelIndex* parent); +bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count, QModelIndex* parent); bool QStringListModel_MoveRows(QStringListModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); struct miqt_map /* of int to QVariant* */ QStringListModel_ItemData(const QStringListModel* self, QModelIndex* index); bool QStringListModel_SetItemData(QStringListModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); -void QStringListModel_Sort(QStringListModel* self, int column); +void QStringListModel_Sort(QStringListModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QStringListModel_StringList(const QStringListModel* self); void QStringListModel_SetStringList(QStringListModel* self, struct miqt_array /* of struct miqt_string */ strings); int QStringListModel_SupportedDropActions(const QStringListModel* self); @@ -54,13 +60,35 @@ struct miqt_string QStringListModel_Tr2(const char* s, const char* c); struct miqt_string QStringListModel_Tr3(const char* s, const char* c, int n); struct miqt_string QStringListModel_TrUtf82(const char* s, const char* c); struct miqt_string QStringListModel_TrUtf83(const char* s, const char* c, int n); -int QStringListModel_RowCount1(const QStringListModel* self, QModelIndex* parent); -QVariant* QStringListModel_Data2(const QStringListModel* self, QModelIndex* index, int role); -bool QStringListModel_SetData3(QStringListModel* self, QModelIndex* index, QVariant* value, int role); -bool QStringListModel_InsertRows3(QStringListModel* self, int row, int count, QModelIndex* parent); -bool QStringListModel_RemoveRows3(QStringListModel* self, int row, int count, QModelIndex* parent); -void QStringListModel_Sort2(QStringListModel* self, int column, int order); -void QStringListModel_Delete(QStringListModel* self); +void QStringListModel_override_virtual_RowCount(void* self, intptr_t slot); +int QStringListModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QStringListModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QStringListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QStringListModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QStringListModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QStringListModel_override_virtual_SetData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QStringListModel_override_virtual_Flags(void* self, intptr_t slot); +int QStringListModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QStringListModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QStringListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QStringListModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QStringListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QStringListModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QStringListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QStringListModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QStringListModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QStringListModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QStringListModel_override_virtual_Sort(void* self, intptr_t slot); +void QStringListModel_virtualbase_Sort(void* self, int column, int order); +void QStringListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QStringListModel_virtualbase_SupportedDropActions(const void* self); +void QStringListModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QStringListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QStringListModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QStringListModel_Delete(QStringListModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstringliteral.cpp b/qt/gen_qstringliteral.cpp index ceb67114..bc91368b 100644 --- a/qt/gen_qstringliteral.cpp +++ b/qt/gen_qstringliteral.cpp @@ -3,7 +3,11 @@ #include "gen_qstringliteral.h" #include "_cgo_export.h" -void QStringDataPtr_Delete(QStringDataPtr* self) { - delete self; +void QStringDataPtr_Delete(QStringDataPtr* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstringliteral.go b/qt/gen_qstringliteral.go index cf4c9f4c..32795e73 100644 --- a/qt/gen_qstringliteral.go +++ b/qt/gen_qstringliteral.go @@ -14,7 +14,8 @@ import ( ) type QStringDataPtr struct { - h *C.QStringDataPtr + h *C.QStringDataPtr + isSubclass bool } func (this *QStringDataPtr) cPointer() *C.QStringDataPtr { @@ -31,6 +32,7 @@ func (this *QStringDataPtr) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringDataPtr constructs the type using only CGO pointers. func newQStringDataPtr(h *C.QStringDataPtr) *QStringDataPtr { if h == nil { return nil @@ -38,13 +40,18 @@ func newQStringDataPtr(h *C.QStringDataPtr) *QStringDataPtr { return &QStringDataPtr{h: h} } +// UnsafeNewQStringDataPtr constructs the type using only unsafe pointers. func UnsafeNewQStringDataPtr(h unsafe.Pointer) *QStringDataPtr { - return newQStringDataPtr((*C.QStringDataPtr)(h)) + if h == nil { + return nil + } + + return &QStringDataPtr{h: (*C.QStringDataPtr)(h)} } // Delete this object from C++ memory. func (this *QStringDataPtr) Delete() { - C.QStringDataPtr_Delete(this.h) + C.QStringDataPtr_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstringliteral.h b/qt/gen_qstringliteral.h index 929b889a..c952ce7f 100644 --- a/qt/gen_qstringliteral.h +++ b/qt/gen_qstringliteral.h @@ -20,7 +20,7 @@ class QStringDataPtr; typedef struct QStringDataPtr QStringDataPtr; #endif -void QStringDataPtr_Delete(QStringDataPtr* self); +void QStringDataPtr_Delete(QStringDataPtr* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstringmatcher.cpp b/qt/gen_qstringmatcher.cpp index 1de4663d..bdb9965c 100644 --- a/qt/gen_qstringmatcher.cpp +++ b/qt/gen_qstringmatcher.cpp @@ -7,30 +7,36 @@ #include "gen_qstringmatcher.h" #include "_cgo_export.h" -QStringMatcher* QStringMatcher_new() { - return new QStringMatcher(); +void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new2(struct miqt_string pattern) { +void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QStringMatcher(pattern_QString); + QStringMatcher* ret = new QStringMatcher(pattern_QString); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new3(QChar* uc, int lenVal) { - return new QStringMatcher(uc, static_cast(lenVal)); +void QStringMatcher_new3(QChar* uc, int lenVal, QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(uc, static_cast(lenVal)); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new4(QStringMatcher* other) { - return new QStringMatcher(*other); +void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(*other); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs) { +void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QStringMatcher(pattern_QString, static_cast(cs)); + QStringMatcher* ret = new QStringMatcher(pattern_QString, static_cast(cs)); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new6(QChar* uc, int lenVal, int cs) { - return new QStringMatcher(uc, static_cast(lenVal), static_cast(cs)); +void QStringMatcher_new6(QChar* uc, int lenVal, int cs, QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(uc, static_cast(lenVal), static_cast(cs)); + *outptr_QStringMatcher = ret; } void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other) { @@ -80,7 +86,11 @@ int QStringMatcher_IndexIn3(const QStringMatcher* self, QChar* str, int length, return self->indexIn(str, static_cast(length), static_cast(from)); } -void QStringMatcher_Delete(QStringMatcher* self) { - delete self; +void QStringMatcher_Delete(QStringMatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstringmatcher.go b/qt/gen_qstringmatcher.go index 9fabd5de..584c36fc 100644 --- a/qt/gen_qstringmatcher.go +++ b/qt/gen_qstringmatcher.go @@ -14,7 +14,8 @@ import ( ) type QStringMatcher struct { - h *C.QStringMatcher + h *C.QStringMatcher + isSubclass bool } func (this *QStringMatcher) cPointer() *C.QStringMatcher { @@ -31,6 +32,7 @@ func (this *QStringMatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringMatcher constructs the type using only CGO pointers. func newQStringMatcher(h *C.QStringMatcher) *QStringMatcher { if h == nil { return nil @@ -38,14 +40,23 @@ func newQStringMatcher(h *C.QStringMatcher) *QStringMatcher { return &QStringMatcher{h: h} } +// UnsafeNewQStringMatcher constructs the type using only unsafe pointers. func UnsafeNewQStringMatcher(h unsafe.Pointer) *QStringMatcher { - return newQStringMatcher((*C.QStringMatcher)(h)) + if h == nil { + return nil + } + + return &QStringMatcher{h: (*C.QStringMatcher)(h)} } // NewQStringMatcher constructs a new QStringMatcher object. func NewQStringMatcher() *QStringMatcher { - ret := C.QStringMatcher_new() - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new(&outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher2 constructs a new QStringMatcher object. @@ -54,20 +65,32 @@ func NewQStringMatcher2(pattern string) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QStringMatcher_new2(pattern_ms) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new2(pattern_ms, &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher3 constructs a new QStringMatcher object. func NewQStringMatcher3(uc *QChar, lenVal int) *QStringMatcher { - ret := C.QStringMatcher_new3(uc.cPointer(), (C.int)(lenVal)) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new3(uc.cPointer(), (C.int)(lenVal), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher4 constructs a new QStringMatcher object. func NewQStringMatcher4(other *QStringMatcher) *QStringMatcher { - ret := C.QStringMatcher_new4(other.cPointer()) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new4(other.cPointer(), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher5 constructs a new QStringMatcher object. @@ -76,14 +99,22 @@ func NewQStringMatcher5(pattern string, cs CaseSensitivity) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QStringMatcher_new5(pattern_ms, (C.int)(cs)) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new5(pattern_ms, (C.int)(cs), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher6 constructs a new QStringMatcher object. func NewQStringMatcher6(uc *QChar, lenVal int, cs CaseSensitivity) *QStringMatcher { - ret := C.QStringMatcher_new6(uc.cPointer(), (C.int)(lenVal), (C.int)(cs)) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new6(uc.cPointer(), (C.int)(lenVal), (C.int)(cs), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } func (this *QStringMatcher) OperatorAssign(other *QStringMatcher) { @@ -139,7 +170,7 @@ func (this *QStringMatcher) IndexIn3(str *QChar, length int, from int) int { // Delete this object from C++ memory. func (this *QStringMatcher) Delete() { - C.QStringMatcher_Delete(this.h) + C.QStringMatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstringmatcher.h b/qt/gen_qstringmatcher.h index 8536c01d..98400372 100644 --- a/qt/gen_qstringmatcher.h +++ b/qt/gen_qstringmatcher.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QStringMatcher QStringMatcher; #endif -QStringMatcher* QStringMatcher_new(); -QStringMatcher* QStringMatcher_new2(struct miqt_string pattern); -QStringMatcher* QStringMatcher_new3(QChar* uc, int lenVal); -QStringMatcher* QStringMatcher_new4(QStringMatcher* other); -QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs); -QStringMatcher* QStringMatcher_new6(QChar* uc, int lenVal, int cs); +void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new3(QChar* uc, int lenVal, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new6(QChar* uc, int lenVal, int cs, QStringMatcher** outptr_QStringMatcher); void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other); void QStringMatcher_SetPattern(QStringMatcher* self, struct miqt_string pattern); void QStringMatcher_SetCaseSensitivity(QStringMatcher* self, int cs); @@ -37,7 +37,7 @@ struct miqt_string QStringMatcher_Pattern(const QStringMatcher* self); int QStringMatcher_CaseSensitivity(const QStringMatcher* self); int QStringMatcher_IndexIn22(const QStringMatcher* self, struct miqt_string str, int from); int QStringMatcher_IndexIn3(const QStringMatcher* self, QChar* str, int length, int from); -void QStringMatcher_Delete(QStringMatcher* self); +void QStringMatcher_Delete(QStringMatcher* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstringview.cpp b/qt/gen_qstringview.cpp index ab4438e2..d930d4d9 100644 --- a/qt/gen_qstringview.cpp +++ b/qt/gen_qstringview.cpp @@ -9,8 +9,9 @@ #include "gen_qstringview.h" #include "_cgo_export.h" -QStringView* QStringView_new() { - return new QStringView(); +void QStringView_new(QStringView** outptr_QStringView) { + QStringView* ret = new QStringView(); + *outptr_QStringView = ret; } struct miqt_string QStringView_ToString(const QStringView* self) { @@ -349,7 +350,11 @@ double QStringView_ToDouble1(const QStringView* self, bool* ok) { return self->toDouble(ok); } -void QStringView_Delete(QStringView* self) { - delete self; +void QStringView_Delete(QStringView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstringview.go b/qt/gen_qstringview.go index 47d9e04e..0bb18c8d 100644 --- a/qt/gen_qstringview.go +++ b/qt/gen_qstringview.go @@ -14,7 +14,8 @@ import ( ) type QStringView struct { - h *C.QStringView + h *C.QStringView + isSubclass bool } func (this *QStringView) cPointer() *C.QStringView { @@ -31,6 +32,7 @@ func (this *QStringView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringView constructs the type using only CGO pointers. func newQStringView(h *C.QStringView) *QStringView { if h == nil { return nil @@ -38,14 +40,23 @@ func newQStringView(h *C.QStringView) *QStringView { return &QStringView{h: h} } +// UnsafeNewQStringView constructs the type using only unsafe pointers. func UnsafeNewQStringView(h unsafe.Pointer) *QStringView { - return newQStringView((*C.QStringView)(h)) + if h == nil { + return nil + } + + return &QStringView{h: (*C.QStringView)(h)} } // NewQStringView constructs a new QStringView object. func NewQStringView() *QStringView { - ret := C.QStringView_new() - return newQStringView(ret) + var outptr_QStringView *C.QStringView = nil + + C.QStringView_new(&outptr_QStringView) + ret := newQStringView(outptr_QStringView) + ret.isSubclass = true + return ret } func (this *QStringView) ToString() string { @@ -362,7 +373,7 @@ func (this *QStringView) ToDouble1(ok *bool) float64 { // Delete this object from C++ memory. func (this *QStringView) Delete() { - C.QStringView_Delete(this.h) + C.QStringView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstringview.h b/qt/gen_qstringview.h index f3968756..8cbff8e3 100644 --- a/qt/gen_qstringview.h +++ b/qt/gen_qstringview.h @@ -24,7 +24,7 @@ typedef struct QChar QChar; typedef struct QStringView QStringView; #endif -QStringView* QStringView_new(); +void QStringView_new(QStringView** outptr_QStringView); struct miqt_string QStringView_ToString(const QStringView* self); ptrdiff_t QStringView_Size(const QStringView* self); QChar* QStringView_Data(const QStringView* self); @@ -94,7 +94,7 @@ unsigned long long QStringView_ToULongLong1(const QStringView* self, bool* ok); unsigned long long QStringView_ToULongLong2(const QStringView* self, bool* ok, int base); float QStringView_ToFloat1(const QStringView* self, bool* ok); double QStringView_ToDouble1(const QStringView* self, bool* ok); -void QStringView_Delete(QStringView* self); +void QStringView_Delete(QStringView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstyle.cpp b/qt/gen_qstyle.cpp index e46bafbe..fbad0ea1 100644 --- a/qt/gen_qstyle.cpp +++ b/qt/gen_qstyle.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -79,9 +80,9 @@ QRect* QStyle_ItemPixmapRect(const QStyle* self, QRect* r, int flags, QPixmap* p return new QRect(self->itemPixmapRect(*r, static_cast(flags), *pixmap)); } -void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text) { +void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString); + self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } void QStyle_DrawItemPixmap(const QStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { @@ -92,49 +93,49 @@ QPalette* QStyle_StandardPalette(const QStyle* self) { return new QPalette(self->standardPalette()); } -void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p) { - self->drawPrimitive(static_cast(pe), opt, p); +void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawPrimitive(static_cast(pe), opt, p, w); } -void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p) { - self->drawControl(static_cast(element), opt, p); +void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawControl(static_cast(element), opt, p, w); } -QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option) { - return new QRect(self->subElementRect(static_cast(subElement), option)); +QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget) { + return new QRect(self->subElementRect(static_cast(subElement), option, widget)); } -void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p) { - self->drawComplexControl(static_cast(cc), opt, p); +void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget) { + self->drawComplexControl(static_cast(cc), opt, p, widget); } -int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt); +int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget) { + QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, widget); return static_cast(_ret); } -QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc))); +QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { + return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), widget)); } -int QStyle_PixelMetric(const QStyle* self, int metric) { - return self->pixelMetric(static_cast(metric)); +int QStyle_PixelMetric(const QStyle* self, int metric, QStyleOption* option, QWidget* widget) { + return self->pixelMetric(static_cast(metric), option, widget); } -QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize)); +QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w) { + return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, w)); } -int QStyle_StyleHint(const QStyle* self, int stylehint) { - return self->styleHint(static_cast(stylehint)); +int QStyle_StyleHint(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData) { + return self->styleHint(static_cast(stylehint), opt, widget, returnData); } -QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap))); +QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { + return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } -QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon) { - return new QIcon(self->standardIcon(static_cast(standardIcon))); +QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { + return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } QPixmap* QStyle_GeneratedIconPixmap(const QStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { @@ -166,8 +167,8 @@ QRect* QStyle_AlignedRect(int direction, int alignment, QSize* size, QRect* rect return new QRect(QStyle::alignedRect(static_cast(direction), static_cast(alignment), *size, *rectangle)); } -int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); +int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } int QStyle_CombinedLayoutSpacing(const QStyle* self, int controls1, int controls2, int orientation) { @@ -222,76 +223,6 @@ struct miqt_string QStyle_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QStyle_DrawItemText7(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); -} - -void QStyle_DrawPrimitive4(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawPrimitive(static_cast(pe), opt, p, w); -} - -void QStyle_DrawControl4(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawControl(static_cast(element), opt, p, w); -} - -QRect* QStyle_SubElementRect3(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget) { - return new QRect(self->subElementRect(static_cast(subElement), option, widget)); -} - -void QStyle_DrawComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget) { - self->drawComplexControl(static_cast(cc), opt, p, widget); -} - -int QStyle_HitTestComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, widget); - return static_cast(_ret); -} - -QRect* QStyle_SubControlRect4(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), widget)); -} - -int QStyle_PixelMetric2(const QStyle* self, int metric, QStyleOption* option) { - return self->pixelMetric(static_cast(metric), option); -} - -int QStyle_PixelMetric3(const QStyle* self, int metric, QStyleOption* option, QWidget* widget) { - return self->pixelMetric(static_cast(metric), option, widget); -} - -QSize* QStyle_SizeFromContents4(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, w)); -} - -int QStyle_StyleHint2(const QStyle* self, int stylehint, QStyleOption* opt) { - return self->styleHint(static_cast(stylehint), opt); -} - -int QStyle_StyleHint3(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget) { - return self->styleHint(static_cast(stylehint), opt, widget); -} - -int QStyle_StyleHint4(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData) { - return self->styleHint(static_cast(stylehint), opt, widget, returnData); -} - -QPixmap* QStyle_StandardPixmap2(const QStyle* self, int standardPixmap, QStyleOption* opt) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); -} - -QPixmap* QStyle_StandardPixmap3(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); -} - -QIcon* QStyle_StandardIcon2(const QStyle* self, int standardIcon, QStyleOption* option) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option)); -} - -QIcon* QStyle_StandardIcon3(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); -} - int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool upsideDown) { return QStyle::sliderPositionFromValue(static_cast(min), static_cast(max), static_cast(val), static_cast(space), upsideDown); } @@ -300,14 +231,6 @@ int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool u return QStyle::sliderValueFromPosition(static_cast(min), static_cast(max), static_cast(pos), static_cast(space), upsideDown); } -int QStyle_LayoutSpacing4(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); -} - -int QStyle_LayoutSpacing5(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); -} - int QStyle_CombinedLayoutSpacing4(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option) { return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation), option); } @@ -316,7 +239,11 @@ int QStyle_CombinedLayoutSpacing5(const QStyle* self, int controls1, int control return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation), option, widget); } -void QStyle_Delete(QStyle* self) { - delete self; +void QStyle_Delete(QStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstyle.go b/qt/gen_qstyle.go index 1f9f7e6d..3ef4ca53 100644 --- a/qt/gen_qstyle.go +++ b/qt/gen_qstyle.go @@ -637,7 +637,8 @@ const ( ) type QStyle struct { - h *C.QStyle + h *C.QStyle + isSubclass bool *QObject } @@ -655,15 +656,23 @@ func (this *QStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyle(h *C.QStyle) *QStyle { +// newQStyle constructs the type using only CGO pointers. +func newQStyle(h *C.QStyle, h_QObject *C.QObject) *QStyle { if h == nil { return nil } - return &QStyle{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QStyle{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQStyle(h unsafe.Pointer) *QStyle { - return newQStyle((*C.QStyle)(h)) +// UnsafeNewQStyle constructs the type using only unsafe pointers. +func UnsafeNewQStyle(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyle { + if h == nil { + return nil + } + + return &QStyle{h: (*C.QStyle)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QStyle) MetaObject() *QMetaObject { @@ -732,12 +741,12 @@ func (this *QStyle) ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect return _goptr } -func (this *QStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string) { +func (this *QStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { text_ms := C.struct_miqt_string{} text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - C.QStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms) + C.QStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) } func (this *QStyle) DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { @@ -751,60 +760,60 @@ func (this *QStyle) StandardPalette() *QPalette { return _goptr } -func (this *QStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter) { - C.QStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer()) +func (this *QStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter) { - C.QStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer()) +func (this *QStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QStyle) SubElementRect(subElement QStyle__SubElement, option *QStyleOption) *QRect { - _ret := C.QStyle_SubElementRect(this.h, (C.int)(subElement), option.cPointer()) +func (this *QStyle) SubElementRect(subElement QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect { + _ret := C.QStyle_SubElementRect(this.h, (C.int)(subElement), option.cPointer(), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter) { - C.QStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer()) +func (this *QStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *QWidget) { + C.QStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), widget.cPointer()) } -func (this *QStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint) QStyle__SubControl { - return (QStyle__SubControl)(C.QStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer())) +func (this *QStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, widget *QWidget) QStyle__SubControl { + return (QStyle__SubControl)(C.QStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), widget.cPointer())) } -func (this *QStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl) *QRect { - _ret := C.QStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc)) +func (this *QStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect { + _ret := C.QStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) PixelMetric(metric QStyle__PixelMetric) int { - return (int)(C.QStyle_PixelMetric(this.h, (C.int)(metric))) +func (this *QStyle) PixelMetric(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { + return (int)(C.QStyle_PixelMetric(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) } -func (this *QStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize) *QSize { - _ret := C.QStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer()) +func (this *QStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *QWidget) *QSize { + _ret := C.QStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), w.cPointer()) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) StyleHint(stylehint QStyle__StyleHint) int { - return (int)(C.QStyle_StyleHint(this.h, (C.int)(stylehint))) +func (this *QStyle) StyleHint(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { + return (int)(C.QStyle_StyleHint(this.h, (C.int)(stylehint), opt.cPointer(), widget.cPointer(), returnData.cPointer())) } -func (this *QStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap) *QPixmap { - _ret := C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap)) - _goptr := newQPixmap(_ret) +func (this *QStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + _ret := C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { - _ret := C.QStyle_StandardIcon(this.h, (C.int)(standardIcon)) +func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { + _ret := C.QStyle_StandardIcon(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -812,7 +821,7 @@ func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { func (this *QStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { _ret := C.QStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -850,8 +859,8 @@ func QStyle_AlignedRect(direction LayoutDirection, alignment AlignmentFlag, size return _goptr } -func (this *QStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int { - return (int)(C.QStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation))) +func (this *QStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + return (int)(C.QStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } func (this *QStyle) CombinedLayoutSpacing(controls1 QSizePolicy__ControlType, controls2 QSizePolicy__ControlType, orientation Orientation) int { @@ -859,7 +868,7 @@ func (this *QStyle) CombinedLayoutSpacing(controls1 QSizePolicy__ControlType, co } func (this *QStyle) Proxy() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QStyle_Proxy(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStyle_Proxy(this.h)), nil) } func QStyle_Tr2(s string, c string) string { @@ -906,99 +915,6 @@ func QStyle_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QStyle) DrawItemText7(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QStyle_DrawItemText7(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) -} - -func (this *QStyle) DrawPrimitive4(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QStyle_DrawPrimitive4(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) -} - -func (this *QStyle) DrawControl4(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QStyle_DrawControl4(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) -} - -func (this *QStyle) SubElementRect3(subElement QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect { - _ret := C.QStyle_SubElementRect3(this.h, (C.int)(subElement), option.cPointer(), widget.cPointer()) - _goptr := newQRect(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) DrawComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *QWidget) { - C.QStyle_DrawComplexControl4(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), widget.cPointer()) -} - -func (this *QStyle) HitTestComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, widget *QWidget) QStyle__SubControl { - return (QStyle__SubControl)(C.QStyle_HitTestComplexControl4(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), widget.cPointer())) -} - -func (this *QStyle) SubControlRect4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect { - _ret := C.QStyle_SubControlRect4(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), widget.cPointer()) - _goptr := newQRect(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) PixelMetric2(metric QStyle__PixelMetric, option *QStyleOption) int { - return (int)(C.QStyle_PixelMetric2(this.h, (C.int)(metric), option.cPointer())) -} - -func (this *QStyle) PixelMetric3(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { - return (int)(C.QStyle_PixelMetric3(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) -} - -func (this *QStyle) SizeFromContents4(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *QWidget) *QSize { - _ret := C.QStyle_SizeFromContents4(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), w.cPointer()) - _goptr := newQSize(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StyleHint2(stylehint QStyle__StyleHint, opt *QStyleOption) int { - return (int)(C.QStyle_StyleHint2(this.h, (C.int)(stylehint), opt.cPointer())) -} - -func (this *QStyle) StyleHint3(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget) int { - return (int)(C.QStyle_StyleHint3(this.h, (C.int)(stylehint), opt.cPointer(), widget.cPointer())) -} - -func (this *QStyle) StyleHint4(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { - return (int)(C.QStyle_StyleHint4(this.h, (C.int)(stylehint), opt.cPointer(), widget.cPointer(), returnData.cPointer())) -} - -func (this *QStyle) StandardPixmap2(standardPixmap QStyle__StandardPixmap, opt *QStyleOption) *QPixmap { - _ret := C.QStyle_StandardPixmap2(this.h, (C.int)(standardPixmap), opt.cPointer()) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StandardPixmap3(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _ret := C.QStyle_StandardPixmap3(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, option *QStyleOption) *QIcon { - _ret := C.QStyle_StandardIcon2(this.h, (C.int)(standardIcon), option.cPointer()) - _goptr := newQIcon(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { - _ret := C.QStyle_StandardIcon3(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) - _goptr := newQIcon(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - func QStyle_SliderPositionFromValue5(min int, max int, val int, space int, upsideDown bool) int { return (int)(C.QStyle_SliderPositionFromValue5((C.int)(min), (C.int)(max), (C.int)(val), (C.int)(space), (C.bool)(upsideDown))) } @@ -1007,14 +923,6 @@ func QStyle_SliderValueFromPosition5(min int, max int, pos int, space int, upsid return (int)(C.QStyle_SliderValueFromPosition5((C.int)(min), (C.int)(max), (C.int)(pos), (C.int)(space), (C.bool)(upsideDown))) } -func (this *QStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { - return (int)(C.QStyle_LayoutSpacing4(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer())) -} - -func (this *QStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { - return (int)(C.QStyle_LayoutSpacing5(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) -} - func (this *QStyle) CombinedLayoutSpacing4(controls1 QSizePolicy__ControlType, controls2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { return (int)(C.QStyle_CombinedLayoutSpacing4(this.h, (C.int)(controls1), (C.int)(controls2), (C.int)(orientation), option.cPointer())) } @@ -1025,7 +933,7 @@ func (this *QStyle) CombinedLayoutSpacing5(controls1 QSizePolicy__ControlType, c // Delete this object from C++ memory. func (this *QStyle) Delete() { - C.QStyle_Delete(this.h) + C.QStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstyle.h b/qt/gen_qstyle.h index 8f6d606b..5c25d3e5 100644 --- a/qt/gen_qstyle.h +++ b/qt/gen_qstyle.h @@ -19,6 +19,7 @@ class QApplication; class QFontMetrics; class QIcon; class QMetaObject; +class QObject; class QPainter; class QPalette; class QPixmap; @@ -35,6 +36,7 @@ typedef struct QApplication QApplication; typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; @@ -59,20 +61,20 @@ void QStyle_UnpolishWithApplication(QStyle* self, QApplication* application); void QStyle_PolishWithPalette(QStyle* self, QPalette* palette); QRect* QStyle_ItemTextRect(const QStyle* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); QRect* QStyle_ItemPixmapRect(const QStyle* self, QRect* r, int flags, QPixmap* pixmap); -void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text); +void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); void QStyle_DrawItemPixmap(const QStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); QPalette* QStyle_StandardPalette(const QStyle* self); -void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p); -void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p); -QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option); -void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p); -int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt); -QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc); -int QStyle_PixelMetric(const QStyle* self, int metric); -QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize); -int QStyle_StyleHint(const QStyle* self, int stylehint); -QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap); -QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon); +void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget); +void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget); +int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget); +QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); +int QStyle_PixelMetric(const QStyle* self, int metric, QStyleOption* option, QWidget* widget); +QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w); +int QStyle_StyleHint(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData); +QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); +QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); QPixmap* QStyle_GeneratedIconPixmap(const QStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); QRect* QStyle_VisualRect(int direction, QRect* boundingRect, QRect* logicalRect); QPoint* QStyle_VisualPos(int direction, QRect* boundingRect, QPoint* logicalPos); @@ -80,37 +82,18 @@ int QStyle_SliderPositionFromValue(int min, int max, int val, int space); int QStyle_SliderValueFromPosition(int min, int max, int pos, int space); int QStyle_VisualAlignment(int direction, int alignment); QRect* QStyle_AlignedRect(int direction, int alignment, QSize* size, QRect* rectangle); -int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation); +int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); int QStyle_CombinedLayoutSpacing(const QStyle* self, int controls1, int controls2, int orientation); QStyle* QStyle_Proxy(const QStyle* self); struct miqt_string QStyle_Tr2(const char* s, const char* c); struct miqt_string QStyle_Tr3(const char* s, const char* c, int n); struct miqt_string QStyle_TrUtf82(const char* s, const char* c); struct miqt_string QStyle_TrUtf83(const char* s, const char* c, int n); -void QStyle_DrawItemText7(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); -void QStyle_DrawPrimitive4(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); -void QStyle_DrawControl4(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); -QRect* QStyle_SubElementRect3(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget); -void QStyle_DrawComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget); -int QStyle_HitTestComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget); -QRect* QStyle_SubControlRect4(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); -int QStyle_PixelMetric2(const QStyle* self, int metric, QStyleOption* option); -int QStyle_PixelMetric3(const QStyle* self, int metric, QStyleOption* option, QWidget* widget); -QSize* QStyle_SizeFromContents4(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w); -int QStyle_StyleHint2(const QStyle* self, int stylehint, QStyleOption* opt); -int QStyle_StyleHint3(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget); -int QStyle_StyleHint4(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData); -QPixmap* QStyle_StandardPixmap2(const QStyle* self, int standardPixmap, QStyleOption* opt); -QPixmap* QStyle_StandardPixmap3(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); -QIcon* QStyle_StandardIcon2(const QStyle* self, int standardIcon, QStyleOption* option); -QIcon* QStyle_StandardIcon3(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool upsideDown); int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool upsideDown); -int QStyle_LayoutSpacing4(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option); -int QStyle_LayoutSpacing5(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); int QStyle_CombinedLayoutSpacing4(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option); int QStyle_CombinedLayoutSpacing5(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option, QWidget* widget); -void QStyle_Delete(QStyle* self); +void QStyle_Delete(QStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstyleditemdelegate.cpp b/qt/gen_qstyleditemdelegate.cpp index e51b50ad..717a6de1 100644 --- a/qt/gen_qstyleditemdelegate.cpp +++ b/qt/gen_qstyleditemdelegate.cpp @@ -1,5 +1,10 @@ +#include #include +#include +#include +#include #include +#include #include #include #include @@ -17,12 +22,411 @@ #include "gen_qstyleditemdelegate.h" #include "_cgo_export.h" -QStyledItemDelegate* QStyledItemDelegate_new() { - return new QStyledItemDelegate(); +class MiqtVirtualQStyledItemDelegate : public virtual QStyledItemDelegate { +public: + + MiqtVirtualQStyledItemDelegate(): QStyledItemDelegate() {}; + MiqtVirtualQStyledItemDelegate(QObject* parent): QStyledItemDelegate(parent) {}; + + virtual ~MiqtVirtualQStyledItemDelegate() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__Paint == 0) { + QStyledItemDelegate::paint(painter, option, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_Paint(const_cast(this), handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) const { + + QStyledItemDelegate::paint(painter, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__SizeHint == 0) { + return QStyledItemDelegate::sizeHint(option, index); + } + + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval1 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QStyledItemDelegate_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint(QStyleOptionViewItem* option, QModelIndex* index) const { + + return new QSize(QStyledItemDelegate::sizeHint(*option, *index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateEditor = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__CreateEditor == 0) { + return QStyledItemDelegate::createEditor(parent, option, index); + } + + QWidget* sigval1 = parent; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + QWidget* callback_return_value = miqt_exec_callback_QStyledItemDelegate_CreateEditor(const_cast(this), handle__CreateEditor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateEditor(QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) const { + + return QStyledItemDelegate::createEditor(parent, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override { + if (handle__SetEditorData == 0) { + QStyledItemDelegate::setEditorData(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_SetEditorData(const_cast(this), handle__SetEditorData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditorData(QWidget* editor, QModelIndex* index) const { + + QStyledItemDelegate::setEditorData(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModelData = 0; + + // Subclass to allow providing a Go implementation + virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override { + if (handle__SetModelData == 0) { + QStyledItemDelegate::setModelData(editor, model, index); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemModel* sigval2 = model; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_SetModelData(const_cast(this), handle__SetModelData, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModelData(QWidget* editor, QAbstractItemModel* model, QModelIndex* index) const { + + QStyledItemDelegate::setModelData(editor, model, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__UpdateEditorGeometry == 0) { + QStyledItemDelegate::updateEditorGeometry(editor, option, index); + return; + } + + QWidget* sigval1 = editor; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry(const_cast(this), handle__UpdateEditorGeometry, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometry(QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) const { + + QStyledItemDelegate::updateEditorGeometry(editor, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisplayText = 0; + + // Subclass to allow providing a Go implementation + virtual QString displayText(const QVariant& value, const QLocale& locale) const override { + if (handle__DisplayText == 0) { + return QStyledItemDelegate::displayText(value, locale); + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + const QLocale& locale_ret = locale; + // Cast returned reference into pointer + QLocale* sigval2 = const_cast(&locale_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QStyledItemDelegate_DisplayText(const_cast(this), handle__DisplayText, sigval1, sigval2); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_DisplayText(QVariant* value, QLocale* locale) const { + + QString _ret = QStyledItemDelegate::displayText(*value, *locale); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) const override { + if (handle__InitStyleOption == 0) { + QStyledItemDelegate::initStyleOption(option, index); + return; + } + + QStyleOptionViewItem* sigval1 = option; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionViewItem* option, QModelIndex* index) const { + + QStyledItemDelegate::initStyleOption(option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QStyledItemDelegate::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStyledItemDelegate_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QStyledItemDelegate::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__EditorEvent == 0) { + return QStyledItemDelegate::editorEvent(event, model, option, index); + } + + QEvent* sigval1 = event; + QAbstractItemModel* sigval2 = model; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QStyledItemDelegate_EditorEvent(this, handle__EditorEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EditorEvent(QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + + return QStyledItemDelegate::editorEvent(event, model, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DestroyEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void destroyEditor(QWidget* editor, const QModelIndex& index) const override { + if (handle__DestroyEditor == 0) { + QStyledItemDelegate::destroyEditor(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_DestroyEditor(const_cast(this), handle__DestroyEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DestroyEditor(QWidget* editor, QModelIndex* index) const { + + QStyledItemDelegate::destroyEditor(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HelpEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__HelpEvent == 0) { + return QStyledItemDelegate::helpEvent(event, view, option, index); + } + + QHelpEvent* sigval1 = event; + QAbstractItemView* sigval2 = view; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QStyledItemDelegate_HelpEvent(this, handle__HelpEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HelpEvent(QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + + return QStyledItemDelegate::helpEvent(event, view, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintingRoles = 0; + + // Subclass to allow providing a Go implementation + virtual QVector paintingRoles() const override { + if (handle__PaintingRoles == 0) { + return QStyledItemDelegate::paintingRoles(); + } + + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QStyledItemDelegate_PaintingRoles(const_cast(this), handle__PaintingRoles); + QVector callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + int* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(static_cast(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of int */ virtualbase_PaintingRoles() const { + + QVector _ret = QStyledItemDelegate::paintingRoles(); + // Convert QList<> from C++ memory to manually-managed C memory + int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + +}; + +void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(); + *outptr_QStyledItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent) { - return new QStyledItemDelegate(parent); +void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(parent); + *outptr_QStyledItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self) { @@ -142,7 +546,115 @@ struct miqt_string QStyledItemDelegate_TrUtf83(const char* s, const char* c, int return _ms; } -void QStyledItemDelegate_Delete(QStyledItemDelegate* self) { - delete self; +void QStyledItemDelegate_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__Paint = slot; +} + +void QStyledItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_Paint(painter, option, index); +} + +void QStyledItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__SizeHint = slot; +} + +QSize* QStyledItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_SizeHint(option, index); +} + +void QStyledItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QStyledItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_CreateEditor(parent, option, index); +} + +void QStyledItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__SetEditorData = slot; +} + +void QStyledItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_SetEditorData(editor, index); +} + +void QStyledItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__SetModelData = slot; +} + +void QStyledItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_SetModelData(editor, model, index); +} + +void QStyledItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__UpdateEditorGeometry = slot; +} + +void QStyledItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_UpdateEditorGeometry(editor, option, index); +} + +void QStyledItemDelegate_override_virtual_DisplayText(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__DisplayText = slot; +} + +struct miqt_string QStyledItemDelegate_virtualbase_DisplayText(const void* self, QVariant* value, QLocale* locale) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_DisplayText(value, locale); +} + +void QStyledItemDelegate_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__InitStyleOption = slot; +} + +void QStyledItemDelegate_virtualbase_InitStyleOption(const void* self, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_InitStyleOption(option, index); +} + +void QStyledItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__EventFilter = slot; +} + +bool QStyledItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_EventFilter(object, event); +} + +void QStyledItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__EditorEvent = slot; +} + +bool QStyledItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_EditorEvent(event, model, option, index); +} + +void QStyledItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__DestroyEditor = slot; +} + +void QStyledItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_DestroyEditor(editor, index); +} + +void QStyledItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__HelpEvent = slot; +} + +bool QStyledItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_HelpEvent(event, view, option, index); +} + +void QStyledItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__PaintingRoles = slot; +} + +struct miqt_array /* of int */ QStyledItemDelegate_virtualbase_PaintingRoles(const void* self) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_PaintingRoles(); +} + +void QStyledItemDelegate_Delete(QStyledItemDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstyleditemdelegate.go b/qt/gen_qstyleditemdelegate.go index 7398e52f..51ff6032 100644 --- a/qt/gen_qstyleditemdelegate.go +++ b/qt/gen_qstyleditemdelegate.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QStyledItemDelegate struct { - h *C.QStyledItemDelegate + h *C.QStyledItemDelegate + isSubclass bool *QAbstractItemDelegate } @@ -32,27 +34,47 @@ func (this *QStyledItemDelegate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyledItemDelegate(h *C.QStyledItemDelegate) *QStyledItemDelegate { +// newQStyledItemDelegate constructs the type using only CGO pointers. +func newQStyledItemDelegate(h *C.QStyledItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QStyledItemDelegate { if h == nil { return nil } - return &QStyledItemDelegate{h: h, QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(unsafe.Pointer(h))} + return &QStyledItemDelegate{h: h, + QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } -func UnsafeNewQStyledItemDelegate(h unsafe.Pointer) *QStyledItemDelegate { - return newQStyledItemDelegate((*C.QStyledItemDelegate)(h)) +// UnsafeNewQStyledItemDelegate constructs the type using only unsafe pointers. +func UnsafeNewQStyledItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QStyledItemDelegate { + if h == nil { + return nil + } + + return &QStyledItemDelegate{h: (*C.QStyledItemDelegate)(h), + QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } // NewQStyledItemDelegate constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate() *QStyledItemDelegate { - ret := C.QStyledItemDelegate_new() - return newQStyledItemDelegate(ret) + var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QStyledItemDelegate_new(&outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStyledItemDelegate2 constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate2(parent *QObject) *QStyledItemDelegate { - ret := C.QStyledItemDelegate_new2(parent.cPointer()) - return newQStyledItemDelegate(ret) + var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QStyledItemDelegate_new2(parent.cPointer(), &outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStyledItemDelegate) MetaObject() *QMetaObject { @@ -95,7 +117,7 @@ func (this *QStyledItemDelegate) SizeHint(option *QStyleOptionViewItem, index *Q } func (this *QStyledItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) } func (this *QStyledItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -169,9 +191,359 @@ func QStyledItemDelegate_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QStyledItemDelegate) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_Paint +func miqt_exec_callback_QStyledItemDelegate_Paint(self *C.QStyledItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QStyledItemDelegate) callVirtualBase_SizeHint(option *QStyleOptionViewItem, index *QModelIndex) *QSize { + + _ret := C.QStyledItemDelegate_virtualbase_SizeHint(unsafe.Pointer(this.h), option.cPointer(), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStyledItemDelegate) OnSizeHint(slot func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) { + C.QStyledItemDelegate_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_SizeHint +func miqt_exec_callback_QStyledItemDelegate_SizeHint(self *C.QStyledItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QStyledItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QStyledItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) +} +func (this *QStyledItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { + C.QStyledItemDelegate_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_CreateEditor +func miqt_exec_callback_QStyledItemDelegate_CreateEditor(self *C.QStyledItemDelegate, cb C.intptr_t, parent *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStyledItemDelegate) callVirtualBase_SetEditorData(editor *QWidget, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_SetEditorData(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnSetEditorData(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_SetEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_SetEditorData +func miqt_exec_callback_QStyledItemDelegate_SetEditorData(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_SetEditorData, slotval1, slotval2) + +} + +func (this *QStyledItemDelegate) callVirtualBase_SetModelData(editor *QWidget, model *QAbstractItemModel, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_SetModelData(unsafe.Pointer(this.h), editor.cPointer(), model.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnSetModelData(slot func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_SetModelData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_SetModelData +func miqt_exec_callback_QStyledItemDelegate_SetModelData(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, model *C.QAbstractItemModel, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_SetModelData, slotval1, slotval2, slotval3) + +} + +func (this *QStyledItemDelegate) callVirtualBase_UpdateEditorGeometry(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_UpdateEditorGeometry(unsafe.Pointer(this.h), editor.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnUpdateEditorGeometry(slot func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_UpdateEditorGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry +func miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_UpdateEditorGeometry, slotval1, slotval2, slotval3) + +} + +func (this *QStyledItemDelegate) callVirtualBase_DisplayText(value *QVariant, locale *QLocale) string { + + var _ms C.struct_miqt_string = C.QStyledItemDelegate_virtualbase_DisplayText(unsafe.Pointer(this.h), value.cPointer(), locale.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QStyledItemDelegate) OnDisplayText(slot func(super func(value *QVariant, locale *QLocale) string, value *QVariant, locale *QLocale) string) { + C.QStyledItemDelegate_override_virtual_DisplayText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_DisplayText +func miqt_exec_callback_QStyledItemDelegate_DisplayText(self *C.QStyledItemDelegate, cb C.intptr_t, value *C.QVariant, locale *C.QLocale) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant, locale *QLocale) string, value *QVariant, locale *QLocale) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval2 := UnsafeNewQLocale(unsafe.Pointer(locale)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_DisplayText, slotval1, slotval2) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QStyledItemDelegate) callVirtualBase_InitStyleOption(option *QStyleOptionViewItem, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnInitStyleOption(slot func(super func(option *QStyleOptionViewItem, index *QModelIndex), option *QStyleOptionViewItem, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_InitStyleOption +func miqt_exec_callback_QStyledItemDelegate_InitStyleOption(self *C.QStyledItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem, index *QModelIndex), option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) + +} + +func (this *QStyledItemDelegate) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QStyledItemDelegate_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QStyledItemDelegate) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QStyledItemDelegate_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_EventFilter +func miqt_exec_callback_QStyledItemDelegate_EventFilter(self *C.QStyledItemDelegate, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyledItemDelegate) callVirtualBase_EditorEvent(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QStyledItemDelegate_virtualbase_EditorEvent(unsafe.Pointer(this.h), event.cPointer(), model.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QStyledItemDelegate) OnEditorEvent(slot func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QStyledItemDelegate_override_virtual_EditorEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_EditorEvent +func miqt_exec_callback_QStyledItemDelegate_EditorEvent(self *C.QStyledItemDelegate, cb C.intptr_t, event *C.QEvent, model *C.QAbstractItemModel, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_EditorEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyledItemDelegate) callVirtualBase_DestroyEditor(editor *QWidget, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_DestroyEditor(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnDestroyEditor(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_DestroyEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_DestroyEditor +func miqt_exec_callback_QStyledItemDelegate_DestroyEditor(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_DestroyEditor, slotval1, slotval2) + +} + +func (this *QStyledItemDelegate) callVirtualBase_HelpEvent(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QStyledItemDelegate_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer(), view.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QStyledItemDelegate) OnHelpEvent(slot func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QStyledItemDelegate_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_HelpEvent +func miqt_exec_callback_QStyledItemDelegate_HelpEvent(self *C.QStyledItemDelegate, cb C.intptr_t, event *C.QHelpEvent, view *C.QAbstractItemView, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHelpEvent(unsafe.Pointer(event), nil) + slotval2 := UnsafeNewQAbstractItemView(unsafe.Pointer(view), nil, nil, nil, nil, nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_HelpEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyledItemDelegate) callVirtualBase_PaintingRoles() []int { + + var _ma C.struct_miqt_array = C.QStyledItemDelegate_virtualbase_PaintingRoles(unsafe.Pointer(this.h)) + _ret := make([]int, int(_ma.len)) + _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _ret[i] = (int)(_outCast[i]) + } + return _ret + +} +func (this *QStyledItemDelegate) OnPaintingRoles(slot func(super func() []int) []int) { + C.QStyledItemDelegate_override_virtual_PaintingRoles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_PaintingRoles +func miqt_exec_callback_QStyledItemDelegate_PaintingRoles(self *C.QStyledItemDelegate, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []int) []int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_PaintingRoles) + virtualReturn_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (C.int)(virtualReturn[i]) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + // Delete this object from C++ memory. func (this *QStyledItemDelegate) Delete() { - C.QStyledItemDelegate_Delete(this.h) + C.QStyledItemDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstyleditemdelegate.h b/qt/gen_qstyleditemdelegate.h index 162e20b7..0b49d75f 100644 --- a/qt/gen_qstyleditemdelegate.h +++ b/qt/gen_qstyleditemdelegate.h @@ -15,7 +15,11 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QEvent; +class QHelpEvent; class QItemEditorFactory; class QLocale; class QMetaObject; @@ -28,7 +32,11 @@ class QStyledItemDelegate; class QVariant; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QEvent QEvent; +typedef struct QHelpEvent QHelpEvent; typedef struct QItemEditorFactory QItemEditorFactory; typedef struct QLocale QLocale; typedef struct QMetaObject QMetaObject; @@ -42,8 +50,8 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QStyledItemDelegate* QStyledItemDelegate_new(); -QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent); +void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self); void* QStyledItemDelegate_Metacast(QStyledItemDelegate* self, const char* param1); struct miqt_string QStyledItemDelegate_Tr(const char* s); @@ -57,11 +65,40 @@ void QStyledItemDelegate_UpdateEditorGeometry(const QStyledItemDelegate* self, Q QItemEditorFactory* QStyledItemDelegate_ItemEditorFactory(const QStyledItemDelegate* self); void QStyledItemDelegate_SetItemEditorFactory(QStyledItemDelegate* self, QItemEditorFactory* factory); struct miqt_string QStyledItemDelegate_DisplayText(const QStyledItemDelegate* self, QVariant* value, QLocale* locale); +void QStyledItemDelegate_InitStyleOption(const QStyledItemDelegate* self, QStyleOptionViewItem* option, QModelIndex* index); +bool QStyledItemDelegate_EventFilter(QStyledItemDelegate* self, QObject* object, QEvent* event); +bool QStyledItemDelegate_EditorEvent(QStyledItemDelegate* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); struct miqt_string QStyledItemDelegate_Tr2(const char* s, const char* c); struct miqt_string QStyledItemDelegate_Tr3(const char* s, const char* c, int n); struct miqt_string QStyledItemDelegate_TrUtf82(const char* s, const char* c); struct miqt_string QStyledItemDelegate_TrUtf83(const char* s, const char* c, int n); -void QStyledItemDelegate_Delete(QStyledItemDelegate* self); +void QStyledItemDelegate_override_virtual_Paint(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStyledItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QStyledItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index); +void QStyledItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index); +void QStyledItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_DisplayText(void* self, intptr_t slot); +struct miqt_string QStyledItemDelegate_virtualbase_DisplayText(const void* self, QVariant* value, QLocale* locale); +void QStyledItemDelegate_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_InitStyleOption(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStyledItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QStyledItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot); +bool QStyledItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index); +void QStyledItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot); +bool QStyledItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot); +struct miqt_array /* of int */ QStyledItemDelegate_virtualbase_PaintingRoles(const void* self); +void QStyledItemDelegate_Delete(QStyledItemDelegate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstylefactory.cpp b/qt/gen_qstylefactory.cpp index 2e2586b0..0d3e75cc 100644 --- a/qt/gen_qstylefactory.cpp +++ b/qt/gen_qstylefactory.cpp @@ -33,7 +33,11 @@ QStyle* QStyleFactory_Create(struct miqt_string param1) { return QStyleFactory::create(param1_QString); } -void QStyleFactory_Delete(QStyleFactory* self) { - delete self; +void QStyleFactory_Delete(QStyleFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstylefactory.go b/qt/gen_qstylefactory.go index dc8ab470..999c40a6 100644 --- a/qt/gen_qstylefactory.go +++ b/qt/gen_qstylefactory.go @@ -14,7 +14,8 @@ import ( ) type QStyleFactory struct { - h *C.QStyleFactory + h *C.QStyleFactory + isSubclass bool } func (this *QStyleFactory) cPointer() *C.QStyleFactory { @@ -31,6 +32,7 @@ func (this *QStyleFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStyleFactory constructs the type using only CGO pointers. func newQStyleFactory(h *C.QStyleFactory) *QStyleFactory { if h == nil { return nil @@ -38,8 +40,13 @@ func newQStyleFactory(h *C.QStyleFactory) *QStyleFactory { return &QStyleFactory{h: h} } +// UnsafeNewQStyleFactory constructs the type using only unsafe pointers. func UnsafeNewQStyleFactory(h unsafe.Pointer) *QStyleFactory { - return newQStyleFactory((*C.QStyleFactory)(h)) + if h == nil { + return nil + } + + return &QStyleFactory{h: (*C.QStyleFactory)(h)} } func QStyleFactory_Keys() []string { @@ -60,12 +67,12 @@ func QStyleFactory_Create(param1 string) *QStyle { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - return UnsafeNewQStyle(unsafe.Pointer(C.QStyleFactory_Create(param1_ms))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStyleFactory_Create(param1_ms)), nil) } // Delete this object from C++ memory. func (this *QStyleFactory) Delete() { - C.QStyleFactory_Delete(this.h) + C.QStyleFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstylefactory.h b/qt/gen_qstylefactory.h index 7feebabd..208731a7 100644 --- a/qt/gen_qstylefactory.h +++ b/qt/gen_qstylefactory.h @@ -24,7 +24,7 @@ typedef struct QStyleFactory QStyleFactory; struct miqt_array /* of struct miqt_string */ QStyleFactory_Keys(); QStyle* QStyleFactory_Create(struct miqt_string param1); -void QStyleFactory_Delete(QStyleFactory* self); +void QStyleFactory_Delete(QStyleFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstylehints.cpp b/qt/gen_qstylehints.cpp index 2634e9b1..c67e00f4 100644 --- a/qt/gen_qstylehints.cpp +++ b/qt/gen_qstylehints.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -342,7 +343,11 @@ struct miqt_string QStyleHints_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QStyleHints_Delete(QStyleHints* self) { - delete self; +void QStyleHints_Delete(QStyleHints* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstylehints.go b/qt/gen_qstylehints.go index 12a6f2c1..0d598426 100644 --- a/qt/gen_qstylehints.go +++ b/qt/gen_qstylehints.go @@ -15,7 +15,8 @@ import ( ) type QStyleHints struct { - h *C.QStyleHints + h *C.QStyleHints + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QStyleHints) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleHints(h *C.QStyleHints) *QStyleHints { +// newQStyleHints constructs the type using only CGO pointers. +func newQStyleHints(h *C.QStyleHints, h_QObject *C.QObject) *QStyleHints { if h == nil { return nil } - return &QStyleHints{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QStyleHints{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQStyleHints(h unsafe.Pointer) *QStyleHints { - return newQStyleHints((*C.QStyleHints)(h)) +// UnsafeNewQStyleHints constructs the type using only unsafe pointers. +func UnsafeNewQStyleHints(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyleHints { + if h == nil { + return nil + } + + return &QStyleHints{h: (*C.QStyleHints)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QStyleHints) MetaObject() *QMetaObject { @@ -477,7 +486,7 @@ func QStyleHints_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QStyleHints) Delete() { - C.QStyleHints_Delete(this.h) + C.QStyleHints_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstylehints.h b/qt/gen_qstylehints.h index 0bc781a5..7f600ced 100644 --- a/qt/gen_qstylehints.h +++ b/qt/gen_qstylehints.h @@ -17,10 +17,12 @@ extern "C" { #ifdef __cplusplus class QChar; class QMetaObject; +class QObject; class QStyleHints; #else typedef struct QChar QChar; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QStyleHints QStyleHints; #endif @@ -88,7 +90,7 @@ struct miqt_string QStyleHints_Tr2(const char* s, const char* c); struct miqt_string QStyleHints_Tr3(const char* s, const char* c, int n); struct miqt_string QStyleHints_TrUtf82(const char* s, const char* c); struct miqt_string QStyleHints_TrUtf83(const char* s, const char* c, int n); -void QStyleHints_Delete(QStyleHints* self); +void QStyleHints_Delete(QStyleHints* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstyleoption.cpp b/qt/gen_qstyleoption.cpp index e908b106..117ebec7 100644 --- a/qt/gen_qstyleoption.cpp +++ b/qt/gen_qstyleoption.cpp @@ -32,20 +32,24 @@ #include "gen_qstyleoption.h" #include "_cgo_export.h" -QStyleOption* QStyleOption_new() { - return new QStyleOption(); +void QStyleOption_new(QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(); + *outptr_QStyleOption = ret; } -QStyleOption* QStyleOption_new2(QStyleOption* other) { - return new QStyleOption(*other); +void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(*other); + *outptr_QStyleOption = ret; } -QStyleOption* QStyleOption_new3(int version) { - return new QStyleOption(static_cast(version)); +void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(static_cast(version)); + *outptr_QStyleOption = ret; } -QStyleOption* QStyleOption_new4(int version, int typeVal) { - return new QStyleOption(static_cast(version), static_cast(typeVal)); +void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(static_cast(version), static_cast(typeVal)); + *outptr_QStyleOption = ret; } void QStyleOption_Init(QStyleOption* self, QWidget* w) { @@ -60,304 +64,516 @@ void QStyleOption_OperatorAssign(QStyleOption* self, QStyleOption* other) { self->operator=(*other); } -void QStyleOption_Delete(QStyleOption* self) { - delete self; +void QStyleOption_Delete(QStyleOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionFocusRect* QStyleOptionFocusRect_new() { - return new QStyleOptionFocusRect(); +void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { + QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(); + *outptr_QStyleOptionFocusRect = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other) { - return new QStyleOptionFocusRect(*other); +void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { + QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(*other); + *outptr_QStyleOptionFocusRect = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self) { - delete self; +void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionFrame* QStyleOptionFrame_new() { - return new QStyleOptionFrame(); +void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionFrame* ret = new QStyleOptionFrame(); + *outptr_QStyleOptionFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other) { - return new QStyleOptionFrame(*other); +void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionFrame* ret = new QStyleOptionFrame(*other); + *outptr_QStyleOptionFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionFrame_Delete(QStyleOptionFrame* self) { - delete self; +void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new() { - return new QStyleOptionTabWidgetFrame(); +void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(); + *outptr_QStyleOptionTabWidgetFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other) { - return new QStyleOptionTabWidgetFrame(*other); +void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(*other); + *outptr_QStyleOptionTabWidgetFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self) { - delete self; +void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new() { - return new QStyleOptionTabBarBase(); +void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(); + *outptr_QStyleOptionTabBarBase = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other) { - return new QStyleOptionTabBarBase(*other); +void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(*other); + *outptr_QStyleOptionTabBarBase = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self) { - delete self; +void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionHeader* QStyleOptionHeader_new() { - return new QStyleOptionHeader(); +void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { + QStyleOptionHeader* ret = new QStyleOptionHeader(); + *outptr_QStyleOptionHeader = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other) { - return new QStyleOptionHeader(*other); +void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { + QStyleOptionHeader* ret = new QStyleOptionHeader(*other); + *outptr_QStyleOptionHeader = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionHeader_Delete(QStyleOptionHeader* self) { - delete self; +void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionButton* QStyleOptionButton_new() { - return new QStyleOptionButton(); +void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { + QStyleOptionButton* ret = new QStyleOptionButton(); + *outptr_QStyleOptionButton = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other) { - return new QStyleOptionButton(*other); +void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { + QStyleOptionButton* ret = new QStyleOptionButton(*other); + *outptr_QStyleOptionButton = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionButton_Delete(QStyleOptionButton* self) { - delete self; +void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTab* QStyleOptionTab_new() { - return new QStyleOptionTab(); +void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { + QStyleOptionTab* ret = new QStyleOptionTab(); + *outptr_QStyleOptionTab = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other) { - return new QStyleOptionTab(*other); +void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { + QStyleOptionTab* ret = new QStyleOptionTab(*other); + *outptr_QStyleOptionTab = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTab_Delete(QStyleOptionTab* self) { - delete self; +void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTabV4* QStyleOptionTabV4_new() { - return new QStyleOptionTabV4(); +void QStyleOptionTabV4_new(QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabV4* ret = new QStyleOptionTabV4(); + *outptr_QStyleOptionTabV4 = ret; + *outptr_QStyleOptionTab = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTabV4* QStyleOptionTabV4_new2(QStyleOptionTabV4* param1) { - return new QStyleOptionTabV4(*param1); +void QStyleOptionTabV4_new2(QStyleOptionTabV4* param1, QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabV4* ret = new QStyleOptionTabV4(*param1); + *outptr_QStyleOptionTabV4 = ret; + *outptr_QStyleOptionTab = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } void QStyleOptionTabV4_OperatorAssign(QStyleOptionTabV4* self, QStyleOptionTabV4* param1) { self->operator=(*param1); } -void QStyleOptionTabV4_Delete(QStyleOptionTabV4* self) { - delete self; +void QStyleOptionTabV4_Delete(QStyleOptionTabV4* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionToolBar* QStyleOptionToolBar_new() { - return new QStyleOptionToolBar(); +void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBar* ret = new QStyleOptionToolBar(); + *outptr_QStyleOptionToolBar = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other) { - return new QStyleOptionToolBar(*other); +void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBar* ret = new QStyleOptionToolBar(*other); + *outptr_QStyleOptionToolBar = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self) { - delete self; +void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionProgressBar* QStyleOptionProgressBar_new() { - return new QStyleOptionProgressBar(); +void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(); + *outptr_QStyleOptionProgressBar = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other) { - return new QStyleOptionProgressBar(*other); +void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(*other); + *outptr_QStyleOptionProgressBar = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self) { - delete self; +void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionMenuItem* QStyleOptionMenuItem_new() { - return new QStyleOptionMenuItem(); +void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(); + *outptr_QStyleOptionMenuItem = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other) { - return new QStyleOptionMenuItem(*other); +void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(*other); + *outptr_QStyleOptionMenuItem = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self) { - delete self; +void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionDockWidget* QStyleOptionDockWidget_new() { - return new QStyleOptionDockWidget(); +void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { + QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(); + *outptr_QStyleOptionDockWidget = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other) { - return new QStyleOptionDockWidget(*other); +void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { + QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(*other); + *outptr_QStyleOptionDockWidget = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self) { - delete self; +void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionViewItem* QStyleOptionViewItem_new() { - return new QStyleOptionViewItem(); +void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionViewItem* ret = new QStyleOptionViewItem(); + *outptr_QStyleOptionViewItem = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other) { - return new QStyleOptionViewItem(*other); +void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionViewItem* ret = new QStyleOptionViewItem(*other); + *outptr_QStyleOptionViewItem = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self) { - delete self; +void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionToolBox* QStyleOptionToolBox_new() { - return new QStyleOptionToolBox(); +void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBox* ret = new QStyleOptionToolBox(); + *outptr_QStyleOptionToolBox = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other) { - return new QStyleOptionToolBox(*other); +void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBox* ret = new QStyleOptionToolBox(*other); + *outptr_QStyleOptionToolBox = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self) { - delete self; +void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionRubberBand* QStyleOptionRubberBand_new() { - return new QStyleOptionRubberBand(); +void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { + QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(); + *outptr_QStyleOptionRubberBand = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other) { - return new QStyleOptionRubberBand(*other); +void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { + QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(*other); + *outptr_QStyleOptionRubberBand = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self) { - delete self; +void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionComplex* QStyleOptionComplex_new() { - return new QStyleOptionComplex(); +void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other) { - return new QStyleOptionComplex(*other); +void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(*other); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComplex* QStyleOptionComplex_new3(int version) { - return new QStyleOptionComplex(static_cast(version)); +void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version)); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal) { - return new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); +void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionComplex_Delete(QStyleOptionComplex* self) { - delete self; +void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionSlider* QStyleOptionSlider_new() { - return new QStyleOptionSlider(); +void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSlider* ret = new QStyleOptionSlider(); + *outptr_QStyleOptionSlider = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other) { - return new QStyleOptionSlider(*other); +void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSlider* ret = new QStyleOptionSlider(*other); + *outptr_QStyleOptionSlider = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionSlider_Delete(QStyleOptionSlider* self) { - delete self; +void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionSpinBox* QStyleOptionSpinBox_new() { - return new QStyleOptionSpinBox(); +void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(); + *outptr_QStyleOptionSpinBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other) { - return new QStyleOptionSpinBox(*other); +void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(*other); + *outptr_QStyleOptionSpinBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self) { - delete self; +void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionToolButton* QStyleOptionToolButton_new() { - return new QStyleOptionToolButton(); +void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolButton* ret = new QStyleOptionToolButton(); + *outptr_QStyleOptionToolButton = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other) { - return new QStyleOptionToolButton(*other); +void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolButton* ret = new QStyleOptionToolButton(*other); + *outptr_QStyleOptionToolButton = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self) { - delete self; +void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionComboBox* QStyleOptionComboBox_new() { - return new QStyleOptionComboBox(); +void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComboBox* ret = new QStyleOptionComboBox(); + *outptr_QStyleOptionComboBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other) { - return new QStyleOptionComboBox(*other); +void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComboBox* ret = new QStyleOptionComboBox(*other); + *outptr_QStyleOptionComboBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self) { - delete self; +void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTitleBar* QStyleOptionTitleBar_new() { - return new QStyleOptionTitleBar(); +void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(); + *outptr_QStyleOptionTitleBar = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other) { - return new QStyleOptionTitleBar(*other); +void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(*other); + *outptr_QStyleOptionTitleBar = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self) { - delete self; +void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionGroupBox* QStyleOptionGroupBox_new() { - return new QStyleOptionGroupBox(); +void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(); + *outptr_QStyleOptionGroupBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other) { - return new QStyleOptionGroupBox(*other); +void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(*other); + *outptr_QStyleOptionGroupBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self) { - delete self; +void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new() { - return new QStyleOptionSizeGrip(); +void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(); + *outptr_QStyleOptionSizeGrip = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other) { - return new QStyleOptionSizeGrip(*other); +void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(*other); + *outptr_QStyleOptionSizeGrip = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self) { - delete self; +void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new() { - return new QStyleOptionGraphicsItem(); +void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(); + *outptr_QStyleOptionGraphicsItem = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other) { - return new QStyleOptionGraphicsItem(*other); +void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(*other); + *outptr_QStyleOptionGraphicsItem = ret; + *outptr_QStyleOption = static_cast(ret); } double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform) { @@ -365,63 +581,91 @@ double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTran return static_cast(_ret); } -void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self) { - delete self; +void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleHintReturn* QStyleHintReturn_new() { - return new QStyleHintReturn(); +void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(); + *outptr_QStyleHintReturn = ret; } -QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1) { - return new QStyleHintReturn(*param1); +void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(*param1); + *outptr_QStyleHintReturn = ret; } -QStyleHintReturn* QStyleHintReturn_new3(int version) { - return new QStyleHintReturn(static_cast(version)); +void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version)); + *outptr_QStyleHintReturn = ret; } -QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal) { - return new QStyleHintReturn(static_cast(version), static_cast(typeVal)); +void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version), static_cast(typeVal)); + *outptr_QStyleHintReturn = ret; } void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1) { self->operator=(*param1); } -void QStyleHintReturn_Delete(QStyleHintReturn* self) { - delete self; +void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleHintReturnMask* QStyleHintReturnMask_new() { - return new QStyleHintReturnMask(); +void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnMask* ret = new QStyleHintReturnMask(); + *outptr_QStyleHintReturnMask = ret; + *outptr_QStyleHintReturn = static_cast(ret); } -QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1) { - return new QStyleHintReturnMask(*param1); +void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnMask* ret = new QStyleHintReturnMask(*param1); + *outptr_QStyleHintReturnMask = ret; + *outptr_QStyleHintReturn = static_cast(ret); } void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1) { self->operator=(*param1); } -void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self) { - delete self; +void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleHintReturnVariant* QStyleHintReturnVariant_new() { - return new QStyleHintReturnVariant(); +void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(); + *outptr_QStyleHintReturnVariant = ret; + *outptr_QStyleHintReturn = static_cast(ret); } -QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1) { - return new QStyleHintReturnVariant(*param1); +void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(*param1); + *outptr_QStyleHintReturnVariant = ret; + *outptr_QStyleHintReturn = static_cast(ret); } void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1) { self->operator=(*param1); } -void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self) { - delete self; +void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstyleoption.go b/qt/gen_qstyleoption.go index 2f189902..39d07eff 100644 --- a/qt/gen_qstyleoption.go +++ b/qt/gen_qstyleoption.go @@ -555,7 +555,8 @@ const ( ) type QStyleOption struct { - h *C.QStyleOption + h *C.QStyleOption + isSubclass bool } func (this *QStyleOption) cPointer() *C.QStyleOption { @@ -572,6 +573,7 @@ func (this *QStyleOption) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStyleOption constructs the type using only CGO pointers. func newQStyleOption(h *C.QStyleOption) *QStyleOption { if h == nil { return nil @@ -579,32 +581,53 @@ func newQStyleOption(h *C.QStyleOption) *QStyleOption { return &QStyleOption{h: h} } +// UnsafeNewQStyleOption constructs the type using only unsafe pointers. func UnsafeNewQStyleOption(h unsafe.Pointer) *QStyleOption { - return newQStyleOption((*C.QStyleOption)(h)) + if h == nil { + return nil + } + + return &QStyleOption{h: (*C.QStyleOption)(h)} } // NewQStyleOption constructs a new QStyleOption object. func NewQStyleOption() *QStyleOption { - ret := C.QStyleOption_new() - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new(&outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOption2 constructs a new QStyleOption object. func NewQStyleOption2(other *QStyleOption) *QStyleOption { - ret := C.QStyleOption_new2(other.cPointer()) - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new2(other.cPointer(), &outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOption3 constructs a new QStyleOption object. func NewQStyleOption3(version int) *QStyleOption { - ret := C.QStyleOption_new3((C.int)(version)) - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new3((C.int)(version), &outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOption4 constructs a new QStyleOption object. func NewQStyleOption4(version int, typeVal int) *QStyleOption { - ret := C.QStyleOption_new4((C.int)(version), (C.int)(typeVal)) - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } func (this *QStyleOption) Init(w *QWidget) { @@ -621,7 +644,7 @@ func (this *QStyleOption) OperatorAssign(other *QStyleOption) { // Delete this object from C++ memory. func (this *QStyleOption) Delete() { - C.QStyleOption_Delete(this.h) + C.QStyleOption_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -634,7 +657,8 @@ func (this *QStyleOption) GoGC() { } type QStyleOptionFocusRect struct { - h *C.QStyleOptionFocusRect + h *C.QStyleOptionFocusRect + isSubclass bool *QStyleOption } @@ -652,32 +676,50 @@ func (this *QStyleOptionFocusRect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect) *QStyleOptionFocusRect { +// newQStyleOptionFocusRect constructs the type using only CGO pointers. +func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect, h_QStyleOption *C.QStyleOption) *QStyleOptionFocusRect { if h == nil { return nil } - return &QStyleOptionFocusRect{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionFocusRect{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer) *QStyleOptionFocusRect { - return newQStyleOptionFocusRect((*C.QStyleOptionFocusRect)(h)) +// UnsafeNewQStyleOptionFocusRect constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFocusRect { + if h == nil { + return nil + } + + return &QStyleOptionFocusRect{h: (*C.QStyleOptionFocusRect)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionFocusRect constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect() *QStyleOptionFocusRect { - ret := C.QStyleOptionFocusRect_new() - return newQStyleOptionFocusRect(ret) + var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFocusRect_new(&outptr_QStyleOptionFocusRect, &outptr_QStyleOption) + ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionFocusRect2 constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect2(other *QStyleOptionFocusRect) *QStyleOptionFocusRect { - ret := C.QStyleOptionFocusRect_new2(other.cPointer()) - return newQStyleOptionFocusRect(ret) + var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFocusRect_new2(other.cPointer(), &outptr_QStyleOptionFocusRect, &outptr_QStyleOption) + ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionFocusRect) Delete() { - C.QStyleOptionFocusRect_Delete(this.h) + C.QStyleOptionFocusRect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -690,7 +732,8 @@ func (this *QStyleOptionFocusRect) GoGC() { } type QStyleOptionFrame struct { - h *C.QStyleOptionFrame + h *C.QStyleOptionFrame + isSubclass bool *QStyleOption } @@ -708,32 +751,50 @@ func (this *QStyleOptionFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionFrame(h *C.QStyleOptionFrame) *QStyleOptionFrame { +// newQStyleOptionFrame constructs the type using only CGO pointers. +func newQStyleOptionFrame(h *C.QStyleOptionFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionFrame { if h == nil { return nil } - return &QStyleOptionFrame{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionFrame{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionFrame(h unsafe.Pointer) *QStyleOptionFrame { - return newQStyleOptionFrame((*C.QStyleOptionFrame)(h)) +// UnsafeNewQStyleOptionFrame constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFrame { + if h == nil { + return nil + } + + return &QStyleOptionFrame{h: (*C.QStyleOptionFrame)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionFrame constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame() *QStyleOptionFrame { - ret := C.QStyleOptionFrame_new() - return newQStyleOptionFrame(ret) + var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFrame_new(&outptr_QStyleOptionFrame, &outptr_QStyleOption) + ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionFrame2 constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame2(other *QStyleOptionFrame) *QStyleOptionFrame { - ret := C.QStyleOptionFrame_new2(other.cPointer()) - return newQStyleOptionFrame(ret) + var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFrame_new2(other.cPointer(), &outptr_QStyleOptionFrame, &outptr_QStyleOption) + ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionFrame) Delete() { - C.QStyleOptionFrame_Delete(this.h) + C.QStyleOptionFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -746,7 +807,8 @@ func (this *QStyleOptionFrame) GoGC() { } type QStyleOptionTabWidgetFrame struct { - h *C.QStyleOptionTabWidgetFrame + h *C.QStyleOptionTabWidgetFrame + isSubclass bool *QStyleOption } @@ -764,32 +826,50 @@ func (this *QStyleOptionTabWidgetFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { +// newQStyleOptionTabWidgetFrame constructs the type using only CGO pointers. +func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionTabWidgetFrame { if h == nil { return nil } - return &QStyleOptionTabWidgetFrame{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionTabWidgetFrame{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer) *QStyleOptionTabWidgetFrame { - return newQStyleOptionTabWidgetFrame((*C.QStyleOptionTabWidgetFrame)(h)) +// UnsafeNewQStyleOptionTabWidgetFrame constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabWidgetFrame { + if h == nil { + return nil + } + + return &QStyleOptionTabWidgetFrame{h: (*C.QStyleOptionTabWidgetFrame)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionTabWidgetFrame constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame() *QStyleOptionTabWidgetFrame { - ret := C.QStyleOptionTabWidgetFrame_new() - return newQStyleOptionTabWidgetFrame(ret) + var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabWidgetFrame_new(&outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTabWidgetFrame2 constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame2(other *QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { - ret := C.QStyleOptionTabWidgetFrame_new2(other.cPointer()) - return newQStyleOptionTabWidgetFrame(ret) + var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabWidgetFrame_new2(other.cPointer(), &outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTabWidgetFrame) Delete() { - C.QStyleOptionTabWidgetFrame_Delete(this.h) + C.QStyleOptionTabWidgetFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -802,7 +882,8 @@ func (this *QStyleOptionTabWidgetFrame) GoGC() { } type QStyleOptionTabBarBase struct { - h *C.QStyleOptionTabBarBase + h *C.QStyleOptionTabBarBase + isSubclass bool *QStyleOption } @@ -820,32 +901,50 @@ func (this *QStyleOptionTabBarBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase) *QStyleOptionTabBarBase { +// newQStyleOptionTabBarBase constructs the type using only CGO pointers. +func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase, h_QStyleOption *C.QStyleOption) *QStyleOptionTabBarBase { if h == nil { return nil } - return &QStyleOptionTabBarBase{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionTabBarBase{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer) *QStyleOptionTabBarBase { - return newQStyleOptionTabBarBase((*C.QStyleOptionTabBarBase)(h)) +// UnsafeNewQStyleOptionTabBarBase constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabBarBase { + if h == nil { + return nil + } + + return &QStyleOptionTabBarBase{h: (*C.QStyleOptionTabBarBase)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionTabBarBase constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase() *QStyleOptionTabBarBase { - ret := C.QStyleOptionTabBarBase_new() - return newQStyleOptionTabBarBase(ret) + var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabBarBase_new(&outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTabBarBase2 constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase2(other *QStyleOptionTabBarBase) *QStyleOptionTabBarBase { - ret := C.QStyleOptionTabBarBase_new2(other.cPointer()) - return newQStyleOptionTabBarBase(ret) + var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabBarBase_new2(other.cPointer(), &outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTabBarBase) Delete() { - C.QStyleOptionTabBarBase_Delete(this.h) + C.QStyleOptionTabBarBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -858,7 +957,8 @@ func (this *QStyleOptionTabBarBase) GoGC() { } type QStyleOptionHeader struct { - h *C.QStyleOptionHeader + h *C.QStyleOptionHeader + isSubclass bool *QStyleOption } @@ -876,32 +976,50 @@ func (this *QStyleOptionHeader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionHeader(h *C.QStyleOptionHeader) *QStyleOptionHeader { +// newQStyleOptionHeader constructs the type using only CGO pointers. +func newQStyleOptionHeader(h *C.QStyleOptionHeader, h_QStyleOption *C.QStyleOption) *QStyleOptionHeader { if h == nil { return nil } - return &QStyleOptionHeader{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionHeader{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionHeader(h unsafe.Pointer) *QStyleOptionHeader { - return newQStyleOptionHeader((*C.QStyleOptionHeader)(h)) +// UnsafeNewQStyleOptionHeader constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionHeader(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionHeader { + if h == nil { + return nil + } + + return &QStyleOptionHeader{h: (*C.QStyleOptionHeader)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionHeader constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader() *QStyleOptionHeader { - ret := C.QStyleOptionHeader_new() - return newQStyleOptionHeader(ret) + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionHeader_new(&outptr_QStyleOptionHeader, &outptr_QStyleOption) + ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionHeader2 constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader2(other *QStyleOptionHeader) *QStyleOptionHeader { - ret := C.QStyleOptionHeader_new2(other.cPointer()) - return newQStyleOptionHeader(ret) + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionHeader_new2(other.cPointer(), &outptr_QStyleOptionHeader, &outptr_QStyleOption) + ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionHeader) Delete() { - C.QStyleOptionHeader_Delete(this.h) + C.QStyleOptionHeader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -914,7 +1032,8 @@ func (this *QStyleOptionHeader) GoGC() { } type QStyleOptionButton struct { - h *C.QStyleOptionButton + h *C.QStyleOptionButton + isSubclass bool *QStyleOption } @@ -932,32 +1051,50 @@ func (this *QStyleOptionButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionButton(h *C.QStyleOptionButton) *QStyleOptionButton { +// newQStyleOptionButton constructs the type using only CGO pointers. +func newQStyleOptionButton(h *C.QStyleOptionButton, h_QStyleOption *C.QStyleOption) *QStyleOptionButton { if h == nil { return nil } - return &QStyleOptionButton{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionButton{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionButton(h unsafe.Pointer) *QStyleOptionButton { - return newQStyleOptionButton((*C.QStyleOptionButton)(h)) +// UnsafeNewQStyleOptionButton constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionButton(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionButton { + if h == nil { + return nil + } + + return &QStyleOptionButton{h: (*C.QStyleOptionButton)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionButton constructs a new QStyleOptionButton object. func NewQStyleOptionButton() *QStyleOptionButton { - ret := C.QStyleOptionButton_new() - return newQStyleOptionButton(ret) + var outptr_QStyleOptionButton *C.QStyleOptionButton = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionButton_new(&outptr_QStyleOptionButton, &outptr_QStyleOption) + ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionButton2 constructs a new QStyleOptionButton object. func NewQStyleOptionButton2(other *QStyleOptionButton) *QStyleOptionButton { - ret := C.QStyleOptionButton_new2(other.cPointer()) - return newQStyleOptionButton(ret) + var outptr_QStyleOptionButton *C.QStyleOptionButton = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionButton_new2(other.cPointer(), &outptr_QStyleOptionButton, &outptr_QStyleOption) + ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionButton) Delete() { - C.QStyleOptionButton_Delete(this.h) + C.QStyleOptionButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -970,7 +1107,8 @@ func (this *QStyleOptionButton) GoGC() { } type QStyleOptionTab struct { - h *C.QStyleOptionTab + h *C.QStyleOptionTab + isSubclass bool *QStyleOption } @@ -988,32 +1126,50 @@ func (this *QStyleOptionTab) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTab(h *C.QStyleOptionTab) *QStyleOptionTab { +// newQStyleOptionTab constructs the type using only CGO pointers. +func newQStyleOptionTab(h *C.QStyleOptionTab, h_QStyleOption *C.QStyleOption) *QStyleOptionTab { if h == nil { return nil } - return &QStyleOptionTab{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionTab{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionTab(h unsafe.Pointer) *QStyleOptionTab { - return newQStyleOptionTab((*C.QStyleOptionTab)(h)) +// UnsafeNewQStyleOptionTab constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTab(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTab { + if h == nil { + return nil + } + + return &QStyleOptionTab{h: (*C.QStyleOptionTab)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionTab constructs a new QStyleOptionTab object. func NewQStyleOptionTab() *QStyleOptionTab { - ret := C.QStyleOptionTab_new() - return newQStyleOptionTab(ret) + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTab_new(&outptr_QStyleOptionTab, &outptr_QStyleOption) + ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTab2 constructs a new QStyleOptionTab object. func NewQStyleOptionTab2(other *QStyleOptionTab) *QStyleOptionTab { - ret := C.QStyleOptionTab_new2(other.cPointer()) - return newQStyleOptionTab(ret) + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTab_new2(other.cPointer(), &outptr_QStyleOptionTab, &outptr_QStyleOption) + ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTab) Delete() { - C.QStyleOptionTab_Delete(this.h) + C.QStyleOptionTab_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1026,7 +1182,8 @@ func (this *QStyleOptionTab) GoGC() { } type QStyleOptionTabV4 struct { - h *C.QStyleOptionTabV4 + h *C.QStyleOptionTabV4 + isSubclass bool *QStyleOptionTab } @@ -1044,27 +1201,47 @@ func (this *QStyleOptionTabV4) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTabV4(h *C.QStyleOptionTabV4) *QStyleOptionTabV4 { +// newQStyleOptionTabV4 constructs the type using only CGO pointers. +func newQStyleOptionTabV4(h *C.QStyleOptionTabV4, h_QStyleOptionTab *C.QStyleOptionTab, h_QStyleOption *C.QStyleOption) *QStyleOptionTabV4 { if h == nil { return nil } - return &QStyleOptionTabV4{h: h, QStyleOptionTab: UnsafeNewQStyleOptionTab(unsafe.Pointer(h))} + return &QStyleOptionTabV4{h: h, + QStyleOptionTab: newQStyleOptionTab(h_QStyleOptionTab, h_QStyleOption)} } -func UnsafeNewQStyleOptionTabV4(h unsafe.Pointer) *QStyleOptionTabV4 { - return newQStyleOptionTabV4((*C.QStyleOptionTabV4)(h)) +// UnsafeNewQStyleOptionTabV4 constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTabV4(h unsafe.Pointer, h_QStyleOptionTab unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabV4 { + if h == nil { + return nil + } + + return &QStyleOptionTabV4{h: (*C.QStyleOptionTabV4)(h), + QStyleOptionTab: UnsafeNewQStyleOptionTab(h_QStyleOptionTab, h_QStyleOption)} } // NewQStyleOptionTabV4 constructs a new QStyleOptionTabV4 object. func NewQStyleOptionTabV4() *QStyleOptionTabV4 { - ret := C.QStyleOptionTabV4_new() - return newQStyleOptionTabV4(ret) + var outptr_QStyleOptionTabV4 *C.QStyleOptionTabV4 = nil + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabV4_new(&outptr_QStyleOptionTabV4, &outptr_QStyleOptionTab, &outptr_QStyleOption) + ret := newQStyleOptionTabV4(outptr_QStyleOptionTabV4, outptr_QStyleOptionTab, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTabV42 constructs a new QStyleOptionTabV4 object. func NewQStyleOptionTabV42(param1 *QStyleOptionTabV4) *QStyleOptionTabV4 { - ret := C.QStyleOptionTabV4_new2(param1.cPointer()) - return newQStyleOptionTabV4(ret) + var outptr_QStyleOptionTabV4 *C.QStyleOptionTabV4 = nil + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabV4_new2(param1.cPointer(), &outptr_QStyleOptionTabV4, &outptr_QStyleOptionTab, &outptr_QStyleOption) + ret := newQStyleOptionTabV4(outptr_QStyleOptionTabV4, outptr_QStyleOptionTab, outptr_QStyleOption) + ret.isSubclass = true + return ret } func (this *QStyleOptionTabV4) OperatorAssign(param1 *QStyleOptionTabV4) { @@ -1073,7 +1250,7 @@ func (this *QStyleOptionTabV4) OperatorAssign(param1 *QStyleOptionTabV4) { // Delete this object from C++ memory. func (this *QStyleOptionTabV4) Delete() { - C.QStyleOptionTabV4_Delete(this.h) + C.QStyleOptionTabV4_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1086,7 +1263,8 @@ func (this *QStyleOptionTabV4) GoGC() { } type QStyleOptionToolBar struct { - h *C.QStyleOptionToolBar + h *C.QStyleOptionToolBar + isSubclass bool *QStyleOption } @@ -1104,32 +1282,50 @@ func (this *QStyleOptionToolBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionToolBar(h *C.QStyleOptionToolBar) *QStyleOptionToolBar { +// newQStyleOptionToolBar constructs the type using only CGO pointers. +func newQStyleOptionToolBar(h *C.QStyleOptionToolBar, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBar { if h == nil { return nil } - return &QStyleOptionToolBar{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionToolBar{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer) *QStyleOptionToolBar { - return newQStyleOptionToolBar((*C.QStyleOptionToolBar)(h)) +// UnsafeNewQStyleOptionToolBar constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBar { + if h == nil { + return nil + } + + return &QStyleOptionToolBar{h: (*C.QStyleOptionToolBar)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionToolBar constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar() *QStyleOptionToolBar { - ret := C.QStyleOptionToolBar_new() - return newQStyleOptionToolBar(ret) + var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBar_new(&outptr_QStyleOptionToolBar, &outptr_QStyleOption) + ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionToolBar2 constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar2(other *QStyleOptionToolBar) *QStyleOptionToolBar { - ret := C.QStyleOptionToolBar_new2(other.cPointer()) - return newQStyleOptionToolBar(ret) + var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBar_new2(other.cPointer(), &outptr_QStyleOptionToolBar, &outptr_QStyleOption) + ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionToolBar) Delete() { - C.QStyleOptionToolBar_Delete(this.h) + C.QStyleOptionToolBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1142,7 +1338,8 @@ func (this *QStyleOptionToolBar) GoGC() { } type QStyleOptionProgressBar struct { - h *C.QStyleOptionProgressBar + h *C.QStyleOptionProgressBar + isSubclass bool *QStyleOption } @@ -1160,32 +1357,50 @@ func (this *QStyleOptionProgressBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar) *QStyleOptionProgressBar { +// newQStyleOptionProgressBar constructs the type using only CGO pointers. +func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar, h_QStyleOption *C.QStyleOption) *QStyleOptionProgressBar { if h == nil { return nil } - return &QStyleOptionProgressBar{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionProgressBar{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer) *QStyleOptionProgressBar { - return newQStyleOptionProgressBar((*C.QStyleOptionProgressBar)(h)) +// UnsafeNewQStyleOptionProgressBar constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionProgressBar { + if h == nil { + return nil + } + + return &QStyleOptionProgressBar{h: (*C.QStyleOptionProgressBar)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionProgressBar constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar() *QStyleOptionProgressBar { - ret := C.QStyleOptionProgressBar_new() - return newQStyleOptionProgressBar(ret) + var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionProgressBar_new(&outptr_QStyleOptionProgressBar, &outptr_QStyleOption) + ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionProgressBar2 constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar2(other *QStyleOptionProgressBar) *QStyleOptionProgressBar { - ret := C.QStyleOptionProgressBar_new2(other.cPointer()) - return newQStyleOptionProgressBar(ret) + var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionProgressBar_new2(other.cPointer(), &outptr_QStyleOptionProgressBar, &outptr_QStyleOption) + ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionProgressBar) Delete() { - C.QStyleOptionProgressBar_Delete(this.h) + C.QStyleOptionProgressBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1198,7 +1413,8 @@ func (this *QStyleOptionProgressBar) GoGC() { } type QStyleOptionMenuItem struct { - h *C.QStyleOptionMenuItem + h *C.QStyleOptionMenuItem + isSubclass bool *QStyleOption } @@ -1216,32 +1432,50 @@ func (this *QStyleOptionMenuItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem) *QStyleOptionMenuItem { +// newQStyleOptionMenuItem constructs the type using only CGO pointers. +func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem, h_QStyleOption *C.QStyleOption) *QStyleOptionMenuItem { if h == nil { return nil } - return &QStyleOptionMenuItem{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionMenuItem{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer) *QStyleOptionMenuItem { - return newQStyleOptionMenuItem((*C.QStyleOptionMenuItem)(h)) +// UnsafeNewQStyleOptionMenuItem constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionMenuItem { + if h == nil { + return nil + } + + return &QStyleOptionMenuItem{h: (*C.QStyleOptionMenuItem)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionMenuItem constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem() *QStyleOptionMenuItem { - ret := C.QStyleOptionMenuItem_new() - return newQStyleOptionMenuItem(ret) + var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionMenuItem_new(&outptr_QStyleOptionMenuItem, &outptr_QStyleOption) + ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionMenuItem2 constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem2(other *QStyleOptionMenuItem) *QStyleOptionMenuItem { - ret := C.QStyleOptionMenuItem_new2(other.cPointer()) - return newQStyleOptionMenuItem(ret) + var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionMenuItem_new2(other.cPointer(), &outptr_QStyleOptionMenuItem, &outptr_QStyleOption) + ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionMenuItem) Delete() { - C.QStyleOptionMenuItem_Delete(this.h) + C.QStyleOptionMenuItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1254,7 +1488,8 @@ func (this *QStyleOptionMenuItem) GoGC() { } type QStyleOptionDockWidget struct { - h *C.QStyleOptionDockWidget + h *C.QStyleOptionDockWidget + isSubclass bool *QStyleOption } @@ -1272,32 +1507,50 @@ func (this *QStyleOptionDockWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget) *QStyleOptionDockWidget { +// newQStyleOptionDockWidget constructs the type using only CGO pointers. +func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget, h_QStyleOption *C.QStyleOption) *QStyleOptionDockWidget { if h == nil { return nil } - return &QStyleOptionDockWidget{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionDockWidget{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer) *QStyleOptionDockWidget { - return newQStyleOptionDockWidget((*C.QStyleOptionDockWidget)(h)) +// UnsafeNewQStyleOptionDockWidget constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionDockWidget { + if h == nil { + return nil + } + + return &QStyleOptionDockWidget{h: (*C.QStyleOptionDockWidget)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionDockWidget constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget() *QStyleOptionDockWidget { - ret := C.QStyleOptionDockWidget_new() - return newQStyleOptionDockWidget(ret) + var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionDockWidget_new(&outptr_QStyleOptionDockWidget, &outptr_QStyleOption) + ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionDockWidget2 constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget2(other *QStyleOptionDockWidget) *QStyleOptionDockWidget { - ret := C.QStyleOptionDockWidget_new2(other.cPointer()) - return newQStyleOptionDockWidget(ret) + var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionDockWidget_new2(other.cPointer(), &outptr_QStyleOptionDockWidget, &outptr_QStyleOption) + ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionDockWidget) Delete() { - C.QStyleOptionDockWidget_Delete(this.h) + C.QStyleOptionDockWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1310,7 +1563,8 @@ func (this *QStyleOptionDockWidget) GoGC() { } type QStyleOptionViewItem struct { - h *C.QStyleOptionViewItem + h *C.QStyleOptionViewItem + isSubclass bool *QStyleOption } @@ -1328,32 +1582,50 @@ func (this *QStyleOptionViewItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionViewItem(h *C.QStyleOptionViewItem) *QStyleOptionViewItem { +// newQStyleOptionViewItem constructs the type using only CGO pointers. +func newQStyleOptionViewItem(h *C.QStyleOptionViewItem, h_QStyleOption *C.QStyleOption) *QStyleOptionViewItem { if h == nil { return nil } - return &QStyleOptionViewItem{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionViewItem{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer) *QStyleOptionViewItem { - return newQStyleOptionViewItem((*C.QStyleOptionViewItem)(h)) +// UnsafeNewQStyleOptionViewItem constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionViewItem { + if h == nil { + return nil + } + + return &QStyleOptionViewItem{h: (*C.QStyleOptionViewItem)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionViewItem constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem() *QStyleOptionViewItem { - ret := C.QStyleOptionViewItem_new() - return newQStyleOptionViewItem(ret) + var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionViewItem_new(&outptr_QStyleOptionViewItem, &outptr_QStyleOption) + ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionViewItem2 constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem2(other *QStyleOptionViewItem) *QStyleOptionViewItem { - ret := C.QStyleOptionViewItem_new2(other.cPointer()) - return newQStyleOptionViewItem(ret) + var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionViewItem_new2(other.cPointer(), &outptr_QStyleOptionViewItem, &outptr_QStyleOption) + ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionViewItem) Delete() { - C.QStyleOptionViewItem_Delete(this.h) + C.QStyleOptionViewItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1366,7 +1638,8 @@ func (this *QStyleOptionViewItem) GoGC() { } type QStyleOptionToolBox struct { - h *C.QStyleOptionToolBox + h *C.QStyleOptionToolBox + isSubclass bool *QStyleOption } @@ -1384,32 +1657,50 @@ func (this *QStyleOptionToolBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionToolBox(h *C.QStyleOptionToolBox) *QStyleOptionToolBox { +// newQStyleOptionToolBox constructs the type using only CGO pointers. +func newQStyleOptionToolBox(h *C.QStyleOptionToolBox, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBox { if h == nil { return nil } - return &QStyleOptionToolBox{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionToolBox{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer) *QStyleOptionToolBox { - return newQStyleOptionToolBox((*C.QStyleOptionToolBox)(h)) +// UnsafeNewQStyleOptionToolBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBox { + if h == nil { + return nil + } + + return &QStyleOptionToolBox{h: (*C.QStyleOptionToolBox)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionToolBox constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox() *QStyleOptionToolBox { - ret := C.QStyleOptionToolBox_new() - return newQStyleOptionToolBox(ret) + var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBox_new(&outptr_QStyleOptionToolBox, &outptr_QStyleOption) + ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionToolBox2 constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox2(other *QStyleOptionToolBox) *QStyleOptionToolBox { - ret := C.QStyleOptionToolBox_new2(other.cPointer()) - return newQStyleOptionToolBox(ret) + var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBox_new2(other.cPointer(), &outptr_QStyleOptionToolBox, &outptr_QStyleOption) + ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionToolBox) Delete() { - C.QStyleOptionToolBox_Delete(this.h) + C.QStyleOptionToolBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1422,7 +1713,8 @@ func (this *QStyleOptionToolBox) GoGC() { } type QStyleOptionRubberBand struct { - h *C.QStyleOptionRubberBand + h *C.QStyleOptionRubberBand + isSubclass bool *QStyleOption } @@ -1440,32 +1732,50 @@ func (this *QStyleOptionRubberBand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand) *QStyleOptionRubberBand { +// newQStyleOptionRubberBand constructs the type using only CGO pointers. +func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand, h_QStyleOption *C.QStyleOption) *QStyleOptionRubberBand { if h == nil { return nil } - return &QStyleOptionRubberBand{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionRubberBand{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer) *QStyleOptionRubberBand { - return newQStyleOptionRubberBand((*C.QStyleOptionRubberBand)(h)) +// UnsafeNewQStyleOptionRubberBand constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionRubberBand { + if h == nil { + return nil + } + + return &QStyleOptionRubberBand{h: (*C.QStyleOptionRubberBand)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionRubberBand constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand() *QStyleOptionRubberBand { - ret := C.QStyleOptionRubberBand_new() - return newQStyleOptionRubberBand(ret) + var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionRubberBand_new(&outptr_QStyleOptionRubberBand, &outptr_QStyleOption) + ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionRubberBand2 constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand2(other *QStyleOptionRubberBand) *QStyleOptionRubberBand { - ret := C.QStyleOptionRubberBand_new2(other.cPointer()) - return newQStyleOptionRubberBand(ret) + var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionRubberBand_new2(other.cPointer(), &outptr_QStyleOptionRubberBand, &outptr_QStyleOption) + ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionRubberBand) Delete() { - C.QStyleOptionRubberBand_Delete(this.h) + C.QStyleOptionRubberBand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1478,7 +1788,8 @@ func (this *QStyleOptionRubberBand) GoGC() { } type QStyleOptionComplex struct { - h *C.QStyleOptionComplex + h *C.QStyleOptionComplex + isSubclass bool *QStyleOption } @@ -1496,44 +1807,72 @@ func (this *QStyleOptionComplex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionComplex(h *C.QStyleOptionComplex) *QStyleOptionComplex { +// newQStyleOptionComplex constructs the type using only CGO pointers. +func newQStyleOptionComplex(h *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComplex { if h == nil { return nil } - return &QStyleOptionComplex{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionComplex{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionComplex(h unsafe.Pointer) *QStyleOptionComplex { - return newQStyleOptionComplex((*C.QStyleOptionComplex)(h)) +// UnsafeNewQStyleOptionComplex constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionComplex(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComplex { + if h == nil { + return nil + } + + return &QStyleOptionComplex{h: (*C.QStyleOptionComplex)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionComplex constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex() *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new() - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new(&outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComplex2 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex2(other *QStyleOptionComplex) *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new2(other.cPointer()) - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new2(other.cPointer(), &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComplex3 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex3(version int) *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new3((C.int)(version)) - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new3((C.int)(version), &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComplex4 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex4(version int, typeVal int) *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal)) - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionComplex) Delete() { - C.QStyleOptionComplex_Delete(this.h) + C.QStyleOptionComplex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1546,7 +1885,8 @@ func (this *QStyleOptionComplex) GoGC() { } type QStyleOptionSlider struct { - h *C.QStyleOptionSlider + h *C.QStyleOptionSlider + isSubclass bool *QStyleOptionComplex } @@ -1564,32 +1904,52 @@ func (this *QStyleOptionSlider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionSlider(h *C.QStyleOptionSlider) *QStyleOptionSlider { +// newQStyleOptionSlider constructs the type using only CGO pointers. +func newQStyleOptionSlider(h *C.QStyleOptionSlider, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSlider { if h == nil { return nil } - return &QStyleOptionSlider{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionSlider{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionSlider(h unsafe.Pointer) *QStyleOptionSlider { - return newQStyleOptionSlider((*C.QStyleOptionSlider)(h)) +// UnsafeNewQStyleOptionSlider constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionSlider(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSlider { + if h == nil { + return nil + } + + return &QStyleOptionSlider{h: (*C.QStyleOptionSlider)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionSlider constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider() *QStyleOptionSlider { - ret := C.QStyleOptionSlider_new() - return newQStyleOptionSlider(ret) + var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSlider_new(&outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionSlider2 constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider2(other *QStyleOptionSlider) *QStyleOptionSlider { - ret := C.QStyleOptionSlider_new2(other.cPointer()) - return newQStyleOptionSlider(ret) + var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSlider_new2(other.cPointer(), &outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionSlider) Delete() { - C.QStyleOptionSlider_Delete(this.h) + C.QStyleOptionSlider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1602,7 +1962,8 @@ func (this *QStyleOptionSlider) GoGC() { } type QStyleOptionSpinBox struct { - h *C.QStyleOptionSpinBox + h *C.QStyleOptionSpinBox + isSubclass bool *QStyleOptionComplex } @@ -1620,32 +1981,52 @@ func (this *QStyleOptionSpinBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox) *QStyleOptionSpinBox { +// newQStyleOptionSpinBox constructs the type using only CGO pointers. +func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSpinBox { if h == nil { return nil } - return &QStyleOptionSpinBox{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionSpinBox{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer) *QStyleOptionSpinBox { - return newQStyleOptionSpinBox((*C.QStyleOptionSpinBox)(h)) +// UnsafeNewQStyleOptionSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSpinBox { + if h == nil { + return nil + } + + return &QStyleOptionSpinBox{h: (*C.QStyleOptionSpinBox)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionSpinBox constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox() *QStyleOptionSpinBox { - ret := C.QStyleOptionSpinBox_new() - return newQStyleOptionSpinBox(ret) + var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSpinBox_new(&outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionSpinBox2 constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox2(other *QStyleOptionSpinBox) *QStyleOptionSpinBox { - ret := C.QStyleOptionSpinBox_new2(other.cPointer()) - return newQStyleOptionSpinBox(ret) + var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSpinBox_new2(other.cPointer(), &outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionSpinBox) Delete() { - C.QStyleOptionSpinBox_Delete(this.h) + C.QStyleOptionSpinBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1658,7 +2039,8 @@ func (this *QStyleOptionSpinBox) GoGC() { } type QStyleOptionToolButton struct { - h *C.QStyleOptionToolButton + h *C.QStyleOptionToolButton + isSubclass bool *QStyleOptionComplex } @@ -1676,32 +2058,52 @@ func (this *QStyleOptionToolButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionToolButton(h *C.QStyleOptionToolButton) *QStyleOptionToolButton { +// newQStyleOptionToolButton constructs the type using only CGO pointers. +func newQStyleOptionToolButton(h *C.QStyleOptionToolButton, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionToolButton { if h == nil { return nil } - return &QStyleOptionToolButton{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionToolButton{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer) *QStyleOptionToolButton { - return newQStyleOptionToolButton((*C.QStyleOptionToolButton)(h)) +// UnsafeNewQStyleOptionToolButton constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolButton { + if h == nil { + return nil + } + + return &QStyleOptionToolButton{h: (*C.QStyleOptionToolButton)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionToolButton constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton() *QStyleOptionToolButton { - ret := C.QStyleOptionToolButton_new() - return newQStyleOptionToolButton(ret) + var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolButton_new(&outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionToolButton2 constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton2(other *QStyleOptionToolButton) *QStyleOptionToolButton { - ret := C.QStyleOptionToolButton_new2(other.cPointer()) - return newQStyleOptionToolButton(ret) + var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolButton_new2(other.cPointer(), &outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionToolButton) Delete() { - C.QStyleOptionToolButton_Delete(this.h) + C.QStyleOptionToolButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1714,7 +2116,8 @@ func (this *QStyleOptionToolButton) GoGC() { } type QStyleOptionComboBox struct { - h *C.QStyleOptionComboBox + h *C.QStyleOptionComboBox + isSubclass bool *QStyleOptionComplex } @@ -1732,32 +2135,52 @@ func (this *QStyleOptionComboBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionComboBox(h *C.QStyleOptionComboBox) *QStyleOptionComboBox { +// newQStyleOptionComboBox constructs the type using only CGO pointers. +func newQStyleOptionComboBox(h *C.QStyleOptionComboBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComboBox { if h == nil { return nil } - return &QStyleOptionComboBox{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionComboBox{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer) *QStyleOptionComboBox { - return newQStyleOptionComboBox((*C.QStyleOptionComboBox)(h)) +// UnsafeNewQStyleOptionComboBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComboBox { + if h == nil { + return nil + } + + return &QStyleOptionComboBox{h: (*C.QStyleOptionComboBox)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionComboBox constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox() *QStyleOptionComboBox { - ret := C.QStyleOptionComboBox_new() - return newQStyleOptionComboBox(ret) + var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComboBox_new(&outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComboBox2 constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox2(other *QStyleOptionComboBox) *QStyleOptionComboBox { - ret := C.QStyleOptionComboBox_new2(other.cPointer()) - return newQStyleOptionComboBox(ret) + var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComboBox_new2(other.cPointer(), &outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionComboBox) Delete() { - C.QStyleOptionComboBox_Delete(this.h) + C.QStyleOptionComboBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1770,7 +2193,8 @@ func (this *QStyleOptionComboBox) GoGC() { } type QStyleOptionTitleBar struct { - h *C.QStyleOptionTitleBar + h *C.QStyleOptionTitleBar + isSubclass bool *QStyleOptionComplex } @@ -1788,32 +2212,52 @@ func (this *QStyleOptionTitleBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar) *QStyleOptionTitleBar { +// newQStyleOptionTitleBar constructs the type using only CGO pointers. +func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionTitleBar { if h == nil { return nil } - return &QStyleOptionTitleBar{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionTitleBar{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer) *QStyleOptionTitleBar { - return newQStyleOptionTitleBar((*C.QStyleOptionTitleBar)(h)) +// UnsafeNewQStyleOptionTitleBar constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTitleBar { + if h == nil { + return nil + } + + return &QStyleOptionTitleBar{h: (*C.QStyleOptionTitleBar)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionTitleBar constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar() *QStyleOptionTitleBar { - ret := C.QStyleOptionTitleBar_new() - return newQStyleOptionTitleBar(ret) + var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTitleBar_new(&outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTitleBar2 constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar2(other *QStyleOptionTitleBar) *QStyleOptionTitleBar { - ret := C.QStyleOptionTitleBar_new2(other.cPointer()) - return newQStyleOptionTitleBar(ret) + var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTitleBar_new2(other.cPointer(), &outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTitleBar) Delete() { - C.QStyleOptionTitleBar_Delete(this.h) + C.QStyleOptionTitleBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1826,7 +2270,8 @@ func (this *QStyleOptionTitleBar) GoGC() { } type QStyleOptionGroupBox struct { - h *C.QStyleOptionGroupBox + h *C.QStyleOptionGroupBox + isSubclass bool *QStyleOptionComplex } @@ -1844,32 +2289,52 @@ func (this *QStyleOptionGroupBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox) *QStyleOptionGroupBox { +// newQStyleOptionGroupBox constructs the type using only CGO pointers. +func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionGroupBox { if h == nil { return nil } - return &QStyleOptionGroupBox{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionGroupBox{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer) *QStyleOptionGroupBox { - return newQStyleOptionGroupBox((*C.QStyleOptionGroupBox)(h)) +// UnsafeNewQStyleOptionGroupBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGroupBox { + if h == nil { + return nil + } + + return &QStyleOptionGroupBox{h: (*C.QStyleOptionGroupBox)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionGroupBox constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox() *QStyleOptionGroupBox { - ret := C.QStyleOptionGroupBox_new() - return newQStyleOptionGroupBox(ret) + var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGroupBox_new(&outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionGroupBox2 constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox2(other *QStyleOptionGroupBox) *QStyleOptionGroupBox { - ret := C.QStyleOptionGroupBox_new2(other.cPointer()) - return newQStyleOptionGroupBox(ret) + var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGroupBox_new2(other.cPointer(), &outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionGroupBox) Delete() { - C.QStyleOptionGroupBox_Delete(this.h) + C.QStyleOptionGroupBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1882,7 +2347,8 @@ func (this *QStyleOptionGroupBox) GoGC() { } type QStyleOptionSizeGrip struct { - h *C.QStyleOptionSizeGrip + h *C.QStyleOptionSizeGrip + isSubclass bool *QStyleOptionComplex } @@ -1900,32 +2366,52 @@ func (this *QStyleOptionSizeGrip) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip) *QStyleOptionSizeGrip { +// newQStyleOptionSizeGrip constructs the type using only CGO pointers. +func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSizeGrip { if h == nil { return nil } - return &QStyleOptionSizeGrip{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionSizeGrip{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer) *QStyleOptionSizeGrip { - return newQStyleOptionSizeGrip((*C.QStyleOptionSizeGrip)(h)) +// UnsafeNewQStyleOptionSizeGrip constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSizeGrip { + if h == nil { + return nil + } + + return &QStyleOptionSizeGrip{h: (*C.QStyleOptionSizeGrip)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionSizeGrip constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip() *QStyleOptionSizeGrip { - ret := C.QStyleOptionSizeGrip_new() - return newQStyleOptionSizeGrip(ret) + var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSizeGrip_new(&outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionSizeGrip2 constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip2(other *QStyleOptionSizeGrip) *QStyleOptionSizeGrip { - ret := C.QStyleOptionSizeGrip_new2(other.cPointer()) - return newQStyleOptionSizeGrip(ret) + var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSizeGrip_new2(other.cPointer(), &outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionSizeGrip) Delete() { - C.QStyleOptionSizeGrip_Delete(this.h) + C.QStyleOptionSizeGrip_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1938,7 +2424,8 @@ func (this *QStyleOptionSizeGrip) GoGC() { } type QStyleOptionGraphicsItem struct { - h *C.QStyleOptionGraphicsItem + h *C.QStyleOptionGraphicsItem + isSubclass bool *QStyleOption } @@ -1956,27 +2443,45 @@ func (this *QStyleOptionGraphicsItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { +// newQStyleOptionGraphicsItem constructs the type using only CGO pointers. +func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem, h_QStyleOption *C.QStyleOption) *QStyleOptionGraphicsItem { if h == nil { return nil } - return &QStyleOptionGraphicsItem{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionGraphicsItem{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer) *QStyleOptionGraphicsItem { - return newQStyleOptionGraphicsItem((*C.QStyleOptionGraphicsItem)(h)) +// UnsafeNewQStyleOptionGraphicsItem constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGraphicsItem { + if h == nil { + return nil + } + + return &QStyleOptionGraphicsItem{h: (*C.QStyleOptionGraphicsItem)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionGraphicsItem constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem() *QStyleOptionGraphicsItem { - ret := C.QStyleOptionGraphicsItem_new() - return newQStyleOptionGraphicsItem(ret) + var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGraphicsItem_new(&outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionGraphicsItem2 constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem2(other *QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { - ret := C.QStyleOptionGraphicsItem_new2(other.cPointer()) - return newQStyleOptionGraphicsItem(ret) + var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGraphicsItem_new2(other.cPointer(), &outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } func QStyleOptionGraphicsItem_LevelOfDetailFromTransform(worldTransform *QTransform) float64 { @@ -1985,7 +2490,7 @@ func QStyleOptionGraphicsItem_LevelOfDetailFromTransform(worldTransform *QTransf // Delete this object from C++ memory. func (this *QStyleOptionGraphicsItem) Delete() { - C.QStyleOptionGraphicsItem_Delete(this.h) + C.QStyleOptionGraphicsItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1998,7 +2503,8 @@ func (this *QStyleOptionGraphicsItem) GoGC() { } type QStyleHintReturn struct { - h *C.QStyleHintReturn + h *C.QStyleHintReturn + isSubclass bool } func (this *QStyleHintReturn) cPointer() *C.QStyleHintReturn { @@ -2015,6 +2521,7 @@ func (this *QStyleHintReturn) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStyleHintReturn constructs the type using only CGO pointers. func newQStyleHintReturn(h *C.QStyleHintReturn) *QStyleHintReturn { if h == nil { return nil @@ -2022,32 +2529,53 @@ func newQStyleHintReturn(h *C.QStyleHintReturn) *QStyleHintReturn { return &QStyleHintReturn{h: h} } +// UnsafeNewQStyleHintReturn constructs the type using only unsafe pointers. func UnsafeNewQStyleHintReturn(h unsafe.Pointer) *QStyleHintReturn { - return newQStyleHintReturn((*C.QStyleHintReturn)(h)) + if h == nil { + return nil + } + + return &QStyleHintReturn{h: (*C.QStyleHintReturn)(h)} } // NewQStyleHintReturn constructs a new QStyleHintReturn object. func NewQStyleHintReturn() *QStyleHintReturn { - ret := C.QStyleHintReturn_new() - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new(&outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturn2 constructs a new QStyleHintReturn object. func NewQStyleHintReturn2(param1 *QStyleHintReturn) *QStyleHintReturn { - ret := C.QStyleHintReturn_new2(param1.cPointer()) - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new2(param1.cPointer(), &outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturn3 constructs a new QStyleHintReturn object. func NewQStyleHintReturn3(version int) *QStyleHintReturn { - ret := C.QStyleHintReturn_new3((C.int)(version)) - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new3((C.int)(version), &outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturn4 constructs a new QStyleHintReturn object. func NewQStyleHintReturn4(version int, typeVal int) *QStyleHintReturn { - ret := C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal)) - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } func (this *QStyleHintReturn) OperatorAssign(param1 *QStyleHintReturn) { @@ -2056,7 +2584,7 @@ func (this *QStyleHintReturn) OperatorAssign(param1 *QStyleHintReturn) { // Delete this object from C++ memory. func (this *QStyleHintReturn) Delete() { - C.QStyleHintReturn_Delete(this.h) + C.QStyleHintReturn_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2069,7 +2597,8 @@ func (this *QStyleHintReturn) GoGC() { } type QStyleHintReturnMask struct { - h *C.QStyleHintReturnMask + h *C.QStyleHintReturnMask + isSubclass bool *QStyleHintReturn } @@ -2087,27 +2616,45 @@ func (this *QStyleHintReturnMask) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleHintReturnMask(h *C.QStyleHintReturnMask) *QStyleHintReturnMask { +// newQStyleHintReturnMask constructs the type using only CGO pointers. +func newQStyleHintReturnMask(h *C.QStyleHintReturnMask, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnMask { if h == nil { return nil } - return &QStyleHintReturnMask{h: h, QStyleHintReturn: UnsafeNewQStyleHintReturn(unsafe.Pointer(h))} + return &QStyleHintReturnMask{h: h, + QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} } -func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer) *QStyleHintReturnMask { - return newQStyleHintReturnMask((*C.QStyleHintReturnMask)(h)) +// UnsafeNewQStyleHintReturnMask constructs the type using only unsafe pointers. +func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnMask { + if h == nil { + return nil + } + + return &QStyleHintReturnMask{h: (*C.QStyleHintReturnMask)(h), + QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} } // NewQStyleHintReturnMask constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask() *QStyleHintReturnMask { - ret := C.QStyleHintReturnMask_new() - return newQStyleHintReturnMask(ret) + var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnMask_new(&outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturnMask2 constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask2(param1 *QStyleHintReturnMask) *QStyleHintReturnMask { - ret := C.QStyleHintReturnMask_new2(param1.cPointer()) - return newQStyleHintReturnMask(ret) + var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnMask_new2(param1.cPointer(), &outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } func (this *QStyleHintReturnMask) OperatorAssign(param1 *QStyleHintReturnMask) { @@ -2116,7 +2663,7 @@ func (this *QStyleHintReturnMask) OperatorAssign(param1 *QStyleHintReturnMask) { // Delete this object from C++ memory. func (this *QStyleHintReturnMask) Delete() { - C.QStyleHintReturnMask_Delete(this.h) + C.QStyleHintReturnMask_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2129,7 +2676,8 @@ func (this *QStyleHintReturnMask) GoGC() { } type QStyleHintReturnVariant struct { - h *C.QStyleHintReturnVariant + h *C.QStyleHintReturnVariant + isSubclass bool *QStyleHintReturn } @@ -2147,27 +2695,45 @@ func (this *QStyleHintReturnVariant) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant) *QStyleHintReturnVariant { +// newQStyleHintReturnVariant constructs the type using only CGO pointers. +func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnVariant { if h == nil { return nil } - return &QStyleHintReturnVariant{h: h, QStyleHintReturn: UnsafeNewQStyleHintReturn(unsafe.Pointer(h))} + return &QStyleHintReturnVariant{h: h, + QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} } -func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer) *QStyleHintReturnVariant { - return newQStyleHintReturnVariant((*C.QStyleHintReturnVariant)(h)) +// UnsafeNewQStyleHintReturnVariant constructs the type using only unsafe pointers. +func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnVariant { + if h == nil { + return nil + } + + return &QStyleHintReturnVariant{h: (*C.QStyleHintReturnVariant)(h), + QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} } // NewQStyleHintReturnVariant constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant() *QStyleHintReturnVariant { - ret := C.QStyleHintReturnVariant_new() - return newQStyleHintReturnVariant(ret) + var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnVariant_new(&outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturnVariant2 constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant2(param1 *QStyleHintReturnVariant) *QStyleHintReturnVariant { - ret := C.QStyleHintReturnVariant_new2(param1.cPointer()) - return newQStyleHintReturnVariant(ret) + var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnVariant_new2(param1.cPointer(), &outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } func (this *QStyleHintReturnVariant) OperatorAssign(param1 *QStyleHintReturnVariant) { @@ -2176,7 +2742,7 @@ func (this *QStyleHintReturnVariant) OperatorAssign(param1 *QStyleHintReturnVari // Delete this object from C++ memory. func (this *QStyleHintReturnVariant) Delete() { - C.QStyleHintReturnVariant_Delete(this.h) + C.QStyleHintReturnVariant_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstyleoption.h b/qt/gen_qstyleoption.h index fc6ca0cc..d24e45f0 100644 --- a/qt/gen_qstyleoption.h +++ b/qt/gen_qstyleoption.h @@ -78,131 +78,131 @@ typedef struct QTransform QTransform; typedef struct QWidget QWidget; #endif -QStyleOption* QStyleOption_new(); -QStyleOption* QStyleOption_new2(QStyleOption* other); -QStyleOption* QStyleOption_new3(int version); -QStyleOption* QStyleOption_new4(int version, int typeVal); +void QStyleOption_new(QStyleOption** outptr_QStyleOption); +void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption); +void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption); +void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption); void QStyleOption_Init(QStyleOption* self, QWidget* w); void QStyleOption_InitFrom(QStyleOption* self, QWidget* w); void QStyleOption_OperatorAssign(QStyleOption* self, QStyleOption* other); -void QStyleOption_Delete(QStyleOption* self); +void QStyleOption_Delete(QStyleOption* self, bool isSubclass); -QStyleOptionFocusRect* QStyleOptionFocusRect_new(); -QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other); -void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self); +void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); +void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); +void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass); -QStyleOptionFrame* QStyleOptionFrame_new(); -QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other); -void QStyleOptionFrame_Delete(QStyleOptionFrame* self); +void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass); -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new(); -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other); -void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self); +void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass); -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new(); -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other); -void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self); +void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass); -QStyleOptionHeader* QStyleOptionHeader_new(); -QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other); -void QStyleOptionHeader_Delete(QStyleOptionHeader* self); +void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass); -QStyleOptionButton* QStyleOptionButton_new(); -QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other); -void QStyleOptionButton_Delete(QStyleOptionButton* self); +void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); +void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); +void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass); -QStyleOptionTab* QStyleOptionTab_new(); -QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other); -void QStyleOptionTab_Delete(QStyleOptionTab* self); +void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass); -QStyleOptionTabV4* QStyleOptionTabV4_new(); -QStyleOptionTabV4* QStyleOptionTabV4_new2(QStyleOptionTabV4* param1); +void QStyleOptionTabV4_new(QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabV4_new2(QStyleOptionTabV4* param1, QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); void QStyleOptionTabV4_OperatorAssign(QStyleOptionTabV4* self, QStyleOptionTabV4* param1); -void QStyleOptionTabV4_Delete(QStyleOptionTabV4* self); +void QStyleOptionTabV4_Delete(QStyleOptionTabV4* self, bool isSubclass); -QStyleOptionToolBar* QStyleOptionToolBar_new(); -QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other); -void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self); +void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass); -QStyleOptionProgressBar* QStyleOptionProgressBar_new(); -QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other); -void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self); +void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass); -QStyleOptionMenuItem* QStyleOptionMenuItem_new(); -QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other); -void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self); +void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass); -QStyleOptionDockWidget* QStyleOptionDockWidget_new(); -QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other); -void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self); +void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); +void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); +void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass); -QStyleOptionViewItem* QStyleOptionViewItem_new(); -QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other); -void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self); +void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass); -QStyleOptionToolBox* QStyleOptionToolBox_new(); -QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other); -void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self); +void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass); -QStyleOptionRubberBand* QStyleOptionRubberBand_new(); -QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other); -void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self); +void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); +void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); +void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass); -QStyleOptionComplex* QStyleOptionComplex_new(); -QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other); -QStyleOptionComplex* QStyleOptionComplex_new3(int version); -QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal); -void QStyleOptionComplex_Delete(QStyleOptionComplex* self); +void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass); -QStyleOptionSlider* QStyleOptionSlider_new(); -QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other); -void QStyleOptionSlider_Delete(QStyleOptionSlider* self); +void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass); -QStyleOptionSpinBox* QStyleOptionSpinBox_new(); -QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other); -void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self); +void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass); -QStyleOptionToolButton* QStyleOptionToolButton_new(); -QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other); -void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self); +void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass); -QStyleOptionComboBox* QStyleOptionComboBox_new(); -QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other); -void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self); +void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass); -QStyleOptionTitleBar* QStyleOptionTitleBar_new(); -QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other); -void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self); +void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass); -QStyleOptionGroupBox* QStyleOptionGroupBox_new(); -QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other); -void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self); +void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass); -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new(); -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other); -void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self); +void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass); -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new(); -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other); +void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform); -void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self); +void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubclass); -QStyleHintReturn* QStyleHintReturn_new(); -QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1); -QStyleHintReturn* QStyleHintReturn_new3(int version); -QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal); +void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1); -void QStyleHintReturn_Delete(QStyleHintReturn* self); +void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass); -QStyleHintReturnMask* QStyleHintReturnMask_new(); -QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1); +void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1); -void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self); +void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass); -QStyleHintReturnVariant* QStyleHintReturnVariant_new(); -QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1); +void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1); -void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self); +void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstylepainter.cpp b/qt/gen_qstylepainter.cpp index 327e99eb..d0f15ade 100644 --- a/qt/gen_qstylepainter.cpp +++ b/qt/gen_qstylepainter.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -14,16 +15,22 @@ #include "gen_qstylepainter.h" #include "_cgo_export.h" -QStylePainter* QStylePainter_new(QWidget* w) { - return new QStylePainter(w); +void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { + QStylePainter* ret = new QStylePainter(w); + *outptr_QStylePainter = ret; + *outptr_QPainter = static_cast(ret); } -QStylePainter* QStylePainter_new2() { - return new QStylePainter(); +void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { + QStylePainter* ret = new QStylePainter(); + *outptr_QStylePainter = ret; + *outptr_QPainter = static_cast(ret); } -QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w) { - return new QStylePainter(pd, w); +void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { + QStylePainter* ret = new QStylePainter(pd, w); + *outptr_QStylePainter = ret; + *outptr_QPainter = static_cast(ret); } bool QStylePainter_Begin(QStylePainter* self, QWidget* w) { @@ -64,7 +71,11 @@ void QStylePainter_DrawItemText6(QStylePainter* self, QRect* r, int flags, QPale self->drawItemText(*r, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } -void QStylePainter_Delete(QStylePainter* self) { - delete self; +void QStylePainter_Delete(QStylePainter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstylepainter.go b/qt/gen_qstylepainter.go index 5b80a87a..8af15631 100644 --- a/qt/gen_qstylepainter.go +++ b/qt/gen_qstylepainter.go @@ -14,7 +14,8 @@ import ( ) type QStylePainter struct { - h *C.QStylePainter + h *C.QStylePainter + isSubclass bool *QPainter } @@ -32,33 +33,56 @@ func (this *QStylePainter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStylePainter(h *C.QStylePainter) *QStylePainter { +// newQStylePainter constructs the type using only CGO pointers. +func newQStylePainter(h *C.QStylePainter, h_QPainter *C.QPainter) *QStylePainter { if h == nil { return nil } - return &QStylePainter{h: h, QPainter: UnsafeNewQPainter(unsafe.Pointer(h))} + return &QStylePainter{h: h, + QPainter: newQPainter(h_QPainter)} } -func UnsafeNewQStylePainter(h unsafe.Pointer) *QStylePainter { - return newQStylePainter((*C.QStylePainter)(h)) +// UnsafeNewQStylePainter constructs the type using only unsafe pointers. +func UnsafeNewQStylePainter(h unsafe.Pointer, h_QPainter unsafe.Pointer) *QStylePainter { + if h == nil { + return nil + } + + return &QStylePainter{h: (*C.QStylePainter)(h), + QPainter: UnsafeNewQPainter(h_QPainter)} } // NewQStylePainter constructs a new QStylePainter object. func NewQStylePainter(w *QWidget) *QStylePainter { - ret := C.QStylePainter_new(w.cPointer()) - return newQStylePainter(ret) + var outptr_QStylePainter *C.QStylePainter = nil + var outptr_QPainter *C.QPainter = nil + + C.QStylePainter_new(w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) + ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret.isSubclass = true + return ret } // NewQStylePainter2 constructs a new QStylePainter object. func NewQStylePainter2() *QStylePainter { - ret := C.QStylePainter_new2() - return newQStylePainter(ret) + var outptr_QStylePainter *C.QStylePainter = nil + var outptr_QPainter *C.QPainter = nil + + C.QStylePainter_new2(&outptr_QStylePainter, &outptr_QPainter) + ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret.isSubclass = true + return ret } // NewQStylePainter3 constructs a new QStylePainter object. func NewQStylePainter3(pd *QPaintDevice, w *QWidget) *QStylePainter { - ret := C.QStylePainter_new3(pd.cPointer(), w.cPointer()) - return newQStylePainter(ret) + var outptr_QStylePainter *C.QStylePainter = nil + var outptr_QPainter *C.QPainter = nil + + C.QStylePainter_new3(pd.cPointer(), w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) + ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret.isSubclass = true + return ret } func (this *QStylePainter) Begin(w *QWidget) bool { @@ -94,7 +118,7 @@ func (this *QStylePainter) DrawItemPixmap(r *QRect, flags int, pixmap *QPixmap) } func (this *QStylePainter) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QStylePainter_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStylePainter_Style(this.h)), nil) } func (this *QStylePainter) DrawItemText6(r *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { @@ -107,7 +131,7 @@ func (this *QStylePainter) DrawItemText6(r *QRect, flags int, pal *QPalette, ena // Delete this object from C++ memory. func (this *QStylePainter) Delete() { - C.QStylePainter_Delete(this.h) + C.QStylePainter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstylepainter.h b/qt/gen_qstylepainter.h index a5d114a9..b195e863 100644 --- a/qt/gen_qstylepainter.h +++ b/qt/gen_qstylepainter.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QPaintDevice; +class QPainter; class QPalette; class QPixmap; class QRect; @@ -26,6 +27,7 @@ class QStylePainter; class QWidget; #else typedef struct QPaintDevice QPaintDevice; +typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; typedef struct QRect QRect; @@ -36,9 +38,9 @@ typedef struct QStylePainter QStylePainter; typedef struct QWidget QWidget; #endif -QStylePainter* QStylePainter_new(QWidget* w); -QStylePainter* QStylePainter_new2(); -QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w); +void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); +void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); +void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); bool QStylePainter_Begin(QStylePainter* self, QWidget* w); bool QStylePainter_Begin2(QStylePainter* self, QPaintDevice* pd, QWidget* w); void QStylePainter_DrawPrimitive(QStylePainter* self, int pe, QStyleOption* opt); @@ -48,7 +50,7 @@ void QStylePainter_DrawItemText(QStylePainter* self, QRect* r, int flags, QPalet void QStylePainter_DrawItemPixmap(QStylePainter* self, QRect* r, int flags, QPixmap* pixmap); QStyle* QStylePainter_Style(const QStylePainter* self); void QStylePainter_DrawItemText6(QStylePainter* self, QRect* r, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); -void QStylePainter_Delete(QStylePainter* self); +void QStylePainter_Delete(QStylePainter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qstyleplugin.cpp b/qt/gen_qstyleplugin.cpp index fe4be010..00eda03a 100644 --- a/qt/gen_qstyleplugin.cpp +++ b/qt/gen_qstyleplugin.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -87,7 +88,11 @@ struct miqt_string QStylePlugin_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QStylePlugin_Delete(QStylePlugin* self) { - delete self; +void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qstyleplugin.go b/qt/gen_qstyleplugin.go index e9a19891..eb1111ac 100644 --- a/qt/gen_qstyleplugin.go +++ b/qt/gen_qstyleplugin.go @@ -14,7 +14,8 @@ import ( ) type QStylePlugin struct { - h *C.QStylePlugin + h *C.QStylePlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QStylePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStylePlugin(h *C.QStylePlugin) *QStylePlugin { +// newQStylePlugin constructs the type using only CGO pointers. +func newQStylePlugin(h *C.QStylePlugin, h_QObject *C.QObject) *QStylePlugin { if h == nil { return nil } - return &QStylePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QStylePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQStylePlugin(h unsafe.Pointer) *QStylePlugin { - return newQStylePlugin((*C.QStylePlugin)(h)) +// UnsafeNewQStylePlugin constructs the type using only unsafe pointers. +func UnsafeNewQStylePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStylePlugin { + if h == nil { + return nil + } + + return &QStylePlugin{h: (*C.QStylePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QStylePlugin) MetaObject() *QMetaObject { @@ -76,7 +85,7 @@ func (this *QStylePlugin) Create(key string) *QStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return UnsafeNewQStyle(unsafe.Pointer(C.QStylePlugin_Create(this.h, key_ms))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStylePlugin_Create(this.h, key_ms)), nil) } func QStylePlugin_Tr2(s string, c string) string { @@ -125,7 +134,7 @@ func QStylePlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QStylePlugin) Delete() { - C.QStylePlugin_Delete(this.h) + C.QStylePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qstyleplugin.h b/qt/gen_qstyleplugin.h index 0c0243c0..4185d0a6 100644 --- a/qt/gen_qstyleplugin.h +++ b/qt/gen_qstyleplugin.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QStyle; class QStylePlugin; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QStyle QStyle; typedef struct QStylePlugin QStylePlugin; #endif @@ -33,7 +35,7 @@ struct miqt_string QStylePlugin_Tr2(const char* s, const char* c); struct miqt_string QStylePlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QStylePlugin_TrUtf82(const char* s, const char* c); struct miqt_string QStylePlugin_TrUtf83(const char* s, const char* c, int n); -void QStylePlugin_Delete(QStylePlugin* self); +void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsurface.cpp b/qt/gen_qsurface.cpp index f88d7930..b080ea37 100644 --- a/qt/gen_qsurface.cpp +++ b/qt/gen_qsurface.cpp @@ -27,7 +27,11 @@ QSize* QSurface_Size(const QSurface* self) { return new QSize(self->size()); } -void QSurface_Delete(QSurface* self) { - delete self; +void QSurface_Delete(QSurface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsurface.go b/qt/gen_qsurface.go index 855a9028..f3f6b72a 100644 --- a/qt/gen_qsurface.go +++ b/qt/gen_qsurface.go @@ -32,7 +32,8 @@ const ( ) type QSurface struct { - h *C.QSurface + h *C.QSurface + isSubclass bool } func (this *QSurface) cPointer() *C.QSurface { @@ -49,6 +50,7 @@ func (this *QSurface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSurface constructs the type using only CGO pointers. func newQSurface(h *C.QSurface) *QSurface { if h == nil { return nil @@ -56,8 +58,13 @@ func newQSurface(h *C.QSurface) *QSurface { return &QSurface{h: h} } +// UnsafeNewQSurface constructs the type using only unsafe pointers. func UnsafeNewQSurface(h unsafe.Pointer) *QSurface { - return newQSurface((*C.QSurface)(h)) + if h == nil { + return nil + } + + return &QSurface{h: (*C.QSurface)(h)} } func (this *QSurface) SurfaceClass() QSurface__SurfaceClass { @@ -88,7 +95,7 @@ func (this *QSurface) Size() *QSize { // Delete this object from C++ memory. func (this *QSurface) Delete() { - C.QSurface_Delete(this.h) + C.QSurface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsurface.h b/qt/gen_qsurface.h index af826665..2c962c14 100644 --- a/qt/gen_qsurface.h +++ b/qt/gen_qsurface.h @@ -29,7 +29,7 @@ QSurfaceFormat* QSurface_Format(const QSurface* self); int QSurface_SurfaceType(const QSurface* self); bool QSurface_SupportsOpenGL(const QSurface* self); QSize* QSurface_Size(const QSurface* self); -void QSurface_Delete(QSurface* self); +void QSurface_Delete(QSurface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsurfaceformat.cpp b/qt/gen_qsurfaceformat.cpp index 6b41bb94..e08c6315 100644 --- a/qt/gen_qsurfaceformat.cpp +++ b/qt/gen_qsurfaceformat.cpp @@ -3,16 +3,19 @@ #include "gen_qsurfaceformat.h" #include "_cgo_export.h" -QSurfaceFormat* QSurfaceFormat_new() { - return new QSurfaceFormat(); +void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat) { + QSurfaceFormat* ret = new QSurfaceFormat(); + *outptr_QSurfaceFormat = ret; } -QSurfaceFormat* QSurfaceFormat_new2(int options) { - return new QSurfaceFormat(static_cast(options)); +void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat) { + QSurfaceFormat* ret = new QSurfaceFormat(static_cast(options)); + *outptr_QSurfaceFormat = ret; } -QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other) { - return new QSurfaceFormat(*other); +void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat) { + QSurfaceFormat* ret = new QSurfaceFormat(*other); + *outptr_QSurfaceFormat = ret; } void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other) { @@ -202,7 +205,11 @@ void QSurfaceFormat_SetOption2(QSurfaceFormat* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QSurfaceFormat_Delete(QSurfaceFormat* self) { - delete self; +void QSurfaceFormat_Delete(QSurfaceFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsurfaceformat.go b/qt/gen_qsurfaceformat.go index 7ba5dfc4..ef38809f 100644 --- a/qt/gen_qsurfaceformat.go +++ b/qt/gen_qsurfaceformat.go @@ -56,7 +56,8 @@ const ( ) type QSurfaceFormat struct { - h *C.QSurfaceFormat + h *C.QSurfaceFormat + isSubclass bool } func (this *QSurfaceFormat) cPointer() *C.QSurfaceFormat { @@ -73,6 +74,7 @@ func (this *QSurfaceFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSurfaceFormat constructs the type using only CGO pointers. func newQSurfaceFormat(h *C.QSurfaceFormat) *QSurfaceFormat { if h == nil { return nil @@ -80,26 +82,43 @@ func newQSurfaceFormat(h *C.QSurfaceFormat) *QSurfaceFormat { return &QSurfaceFormat{h: h} } +// UnsafeNewQSurfaceFormat constructs the type using only unsafe pointers. func UnsafeNewQSurfaceFormat(h unsafe.Pointer) *QSurfaceFormat { - return newQSurfaceFormat((*C.QSurfaceFormat)(h)) + if h == nil { + return nil + } + + return &QSurfaceFormat{h: (*C.QSurfaceFormat)(h)} } // NewQSurfaceFormat constructs a new QSurfaceFormat object. func NewQSurfaceFormat() *QSurfaceFormat { - ret := C.QSurfaceFormat_new() - return newQSurfaceFormat(ret) + var outptr_QSurfaceFormat *C.QSurfaceFormat = nil + + C.QSurfaceFormat_new(&outptr_QSurfaceFormat) + ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret.isSubclass = true + return ret } // NewQSurfaceFormat2 constructs a new QSurfaceFormat object. func NewQSurfaceFormat2(options QSurfaceFormat__FormatOption) *QSurfaceFormat { - ret := C.QSurfaceFormat_new2((C.int)(options)) - return newQSurfaceFormat(ret) + var outptr_QSurfaceFormat *C.QSurfaceFormat = nil + + C.QSurfaceFormat_new2((C.int)(options), &outptr_QSurfaceFormat) + ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret.isSubclass = true + return ret } // NewQSurfaceFormat3 constructs a new QSurfaceFormat object. func NewQSurfaceFormat3(other *QSurfaceFormat) *QSurfaceFormat { - ret := C.QSurfaceFormat_new3(other.cPointer()) - return newQSurfaceFormat(ret) + var outptr_QSurfaceFormat *C.QSurfaceFormat = nil + + C.QSurfaceFormat_new3(other.cPointer(), &outptr_QSurfaceFormat) + ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret.isSubclass = true + return ret } func (this *QSurfaceFormat) OperatorAssign(other *QSurfaceFormat) { @@ -292,7 +311,7 @@ func (this *QSurfaceFormat) SetOption2(option QSurfaceFormat__FormatOption, on b // Delete this object from C++ memory. func (this *QSurfaceFormat) Delete() { - C.QSurfaceFormat_Delete(this.h) + C.QSurfaceFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsurfaceformat.h b/qt/gen_qsurfaceformat.h index 841ae32f..ba2bbf9e 100644 --- a/qt/gen_qsurfaceformat.h +++ b/qt/gen_qsurfaceformat.h @@ -20,9 +20,9 @@ class QSurfaceFormat; typedef struct QSurfaceFormat QSurfaceFormat; #endif -QSurfaceFormat* QSurfaceFormat_new(); -QSurfaceFormat* QSurfaceFormat_new2(int options); -QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other); +void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat); +void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat); +void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat); void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other); void QSurfaceFormat_SetDepthBufferSize(QSurfaceFormat* self, int size); int QSurfaceFormat_DepthBufferSize(const QSurfaceFormat* self); @@ -66,7 +66,7 @@ void QSurfaceFormat_SetColorSpace(QSurfaceFormat* self, int colorSpace); void QSurfaceFormat_SetDefaultFormat(QSurfaceFormat* format); QSurfaceFormat* QSurfaceFormat_DefaultFormat(); void QSurfaceFormat_SetOption2(QSurfaceFormat* self, int option, bool on); -void QSurfaceFormat_Delete(QSurfaceFormat* self); +void QSurfaceFormat_Delete(QSurfaceFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsyntaxhighlighter.cpp b/qt/gen_qsyntaxhighlighter.cpp index bbc14794..c9d290a5 100644 --- a/qt/gen_qsyntaxhighlighter.cpp +++ b/qt/gen_qsyntaxhighlighter.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -99,7 +100,11 @@ struct miqt_string QSyntaxHighlighter_TrUtf83(const char* s, const char* c, int return _ms; } -void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self) { - delete self; +void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsyntaxhighlighter.go b/qt/gen_qsyntaxhighlighter.go index 725e6d0d..bd8e679a 100644 --- a/qt/gen_qsyntaxhighlighter.go +++ b/qt/gen_qsyntaxhighlighter.go @@ -14,7 +14,8 @@ import ( ) type QSyntaxHighlighter struct { - h *C.QSyntaxHighlighter + h *C.QSyntaxHighlighter + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QSyntaxHighlighter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSyntaxHighlighter(h *C.QSyntaxHighlighter) *QSyntaxHighlighter { +// newQSyntaxHighlighter constructs the type using only CGO pointers. +func newQSyntaxHighlighter(h *C.QSyntaxHighlighter, h_QObject *C.QObject) *QSyntaxHighlighter { if h == nil { return nil } - return &QSyntaxHighlighter{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSyntaxHighlighter{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer) *QSyntaxHighlighter { - return newQSyntaxHighlighter((*C.QSyntaxHighlighter)(h)) +// UnsafeNewQSyntaxHighlighter constructs the type using only unsafe pointers. +func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSyntaxHighlighter { + if h == nil { + return nil + } + + return &QSyntaxHighlighter{h: (*C.QSyntaxHighlighter)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QSyntaxHighlighter) MetaObject() *QMetaObject { @@ -76,7 +85,7 @@ func (this *QSyntaxHighlighter) SetDocument(doc *QTextDocument) { } func (this *QSyntaxHighlighter) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QSyntaxHighlighter_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QSyntaxHighlighter_Document(this.h)), nil) } func (this *QSyntaxHighlighter) Rehighlight() { @@ -133,7 +142,7 @@ func QSyntaxHighlighter_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QSyntaxHighlighter) Delete() { - C.QSyntaxHighlighter_Delete(this.h) + C.QSyntaxHighlighter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsyntaxhighlighter.h b/qt/gen_qsyntaxhighlighter.h index 7c7aea52..c883eb24 100644 --- a/qt/gen_qsyntaxhighlighter.h +++ b/qt/gen_qsyntaxhighlighter.h @@ -16,11 +16,13 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QSyntaxHighlighter; class QTextBlock; class QTextDocument; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSyntaxHighlighter QSyntaxHighlighter; typedef struct QTextBlock QTextBlock; typedef struct QTextDocument QTextDocument; @@ -34,11 +36,12 @@ void QSyntaxHighlighter_SetDocument(QSyntaxHighlighter* self, QTextDocument* doc QTextDocument* QSyntaxHighlighter_Document(const QSyntaxHighlighter* self); void QSyntaxHighlighter_Rehighlight(QSyntaxHighlighter* self); void QSyntaxHighlighter_RehighlightBlock(QSyntaxHighlighter* self, QTextBlock* block); +void QSyntaxHighlighter_HighlightBlock(QSyntaxHighlighter* self, struct miqt_string text); struct miqt_string QSyntaxHighlighter_Tr2(const char* s, const char* c); struct miqt_string QSyntaxHighlighter_Tr3(const char* s, const char* c, int n); struct miqt_string QSyntaxHighlighter_TrUtf82(const char* s, const char* c); struct miqt_string QSyntaxHighlighter_TrUtf83(const char* s, const char* c, int n); -void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self); +void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsystemsemaphore.cpp b/qt/gen_qsystemsemaphore.cpp index aed291a4..5085d9d7 100644 --- a/qt/gen_qsystemsemaphore.cpp +++ b/qt/gen_qsystemsemaphore.cpp @@ -6,19 +6,22 @@ #include "gen_qsystemsemaphore.h" #include "_cgo_export.h" -QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key) { +void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSystemSemaphore(key_QString); + QSystemSemaphore* ret = new QSystemSemaphore(key_QString); + *outptr_QSystemSemaphore = ret; } -QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue) { +void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSystemSemaphore(key_QString, static_cast(initialValue)); + QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue)); + *outptr_QSystemSemaphore = ret; } -QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode) { +void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); + QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); + *outptr_QSystemSemaphore = ret; } void QSystemSemaphore_SetKey(QSystemSemaphore* self, struct miqt_string key) { @@ -75,7 +78,11 @@ bool QSystemSemaphore_Release1(QSystemSemaphore* self, int n) { return self->release(static_cast(n)); } -void QSystemSemaphore_Delete(QSystemSemaphore* self) { - delete self; +void QSystemSemaphore_Delete(QSystemSemaphore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsystemsemaphore.go b/qt/gen_qsystemsemaphore.go index 7f7c5428..a0ee859c 100644 --- a/qt/gen_qsystemsemaphore.go +++ b/qt/gen_qsystemsemaphore.go @@ -33,7 +33,8 @@ const ( ) type QSystemSemaphore struct { - h *C.QSystemSemaphore + h *C.QSystemSemaphore + isSubclass bool } func (this *QSystemSemaphore) cPointer() *C.QSystemSemaphore { @@ -50,6 +51,7 @@ func (this *QSystemSemaphore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSystemSemaphore constructs the type using only CGO pointers. func newQSystemSemaphore(h *C.QSystemSemaphore) *QSystemSemaphore { if h == nil { return nil @@ -57,8 +59,13 @@ func newQSystemSemaphore(h *C.QSystemSemaphore) *QSystemSemaphore { return &QSystemSemaphore{h: h} } +// UnsafeNewQSystemSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSystemSemaphore(h unsafe.Pointer) *QSystemSemaphore { - return newQSystemSemaphore((*C.QSystemSemaphore)(h)) + if h == nil { + return nil + } + + return &QSystemSemaphore{h: (*C.QSystemSemaphore)(h)} } // NewQSystemSemaphore constructs a new QSystemSemaphore object. @@ -67,8 +74,12 @@ func NewQSystemSemaphore(key string) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSystemSemaphore_new(key_ms) - return newQSystemSemaphore(ret) + var outptr_QSystemSemaphore *C.QSystemSemaphore = nil + + C.QSystemSemaphore_new(key_ms, &outptr_QSystemSemaphore) + ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret.isSubclass = true + return ret } // NewQSystemSemaphore2 constructs a new QSystemSemaphore object. @@ -77,8 +88,12 @@ func NewQSystemSemaphore2(key string, initialValue int) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue)) - return newQSystemSemaphore(ret) + var outptr_QSystemSemaphore *C.QSystemSemaphore = nil + + C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue), &outptr_QSystemSemaphore) + ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret.isSubclass = true + return ret } // NewQSystemSemaphore3 constructs a new QSystemSemaphore object. @@ -87,8 +102,12 @@ func NewQSystemSemaphore3(key string, initialValue int, mode QSystemSemaphore__A key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode)) - return newQSystemSemaphore(ret) + var outptr_QSystemSemaphore *C.QSystemSemaphore = nil + + C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode), &outptr_QSystemSemaphore) + ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret.isSubclass = true + return ret } func (this *QSystemSemaphore) SetKey(key string) { @@ -147,7 +166,7 @@ func (this *QSystemSemaphore) Release1(n int) bool { // Delete this object from C++ memory. func (this *QSystemSemaphore) Delete() { - C.QSystemSemaphore_Delete(this.h) + C.QSystemSemaphore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsystemsemaphore.h b/qt/gen_qsystemsemaphore.h index f3258d21..427ad524 100644 --- a/qt/gen_qsystemsemaphore.h +++ b/qt/gen_qsystemsemaphore.h @@ -20,9 +20,9 @@ class QSystemSemaphore; typedef struct QSystemSemaphore QSystemSemaphore; #endif -QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key); -QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue); -QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode); +void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore); +void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore); +void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore); void QSystemSemaphore_SetKey(QSystemSemaphore* self, struct miqt_string key); struct miqt_string QSystemSemaphore_Key(const QSystemSemaphore* self); bool QSystemSemaphore_Acquire(QSystemSemaphore* self); @@ -32,7 +32,7 @@ struct miqt_string QSystemSemaphore_ErrorString(const QSystemSemaphore* self); void QSystemSemaphore_SetKey2(QSystemSemaphore* self, struct miqt_string key, int initialValue); void QSystemSemaphore_SetKey3(QSystemSemaphore* self, struct miqt_string key, int initialValue, int mode); bool QSystemSemaphore_Release1(QSystemSemaphore* self, int n); -void QSystemSemaphore_Delete(QSystemSemaphore* self); +void QSystemSemaphore_Delete(QSystemSemaphore* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qsystemtrayicon.cpp b/qt/gen_qsystemtrayicon.cpp index 1f72b611..8513389b 100644 --- a/qt/gen_qsystemtrayicon.cpp +++ b/qt/gen_qsystemtrayicon.cpp @@ -1,5 +1,8 @@ +#include +#include #include #include +#include #include #include #include @@ -7,24 +10,216 @@ #include #include #include +#include #include #include "gen_qsystemtrayicon.h" #include "_cgo_export.h" -QSystemTrayIcon* QSystemTrayIcon_new() { - return new QSystemTrayIcon(); +class MiqtVirtualQSystemTrayIcon : public virtual QSystemTrayIcon { +public: + + MiqtVirtualQSystemTrayIcon(): QSystemTrayIcon() {}; + MiqtVirtualQSystemTrayIcon(const QIcon& icon): QSystemTrayIcon(icon) {}; + MiqtVirtualQSystemTrayIcon(QObject* parent): QSystemTrayIcon(parent) {}; + MiqtVirtualQSystemTrayIcon(const QIcon& icon, QObject* parent): QSystemTrayIcon(icon, parent) {}; + + virtual ~MiqtVirtualQSystemTrayIcon() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSystemTrayIcon::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSystemTrayIcon_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSystemTrayIcon::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSystemTrayIcon::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSystemTrayIcon_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSystemTrayIcon::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSystemTrayIcon::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSystemTrayIcon_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSystemTrayIcon::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSystemTrayIcon::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSystemTrayIcon_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSystemTrayIcon::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSystemTrayIcon::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSystemTrayIcon_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSystemTrayIcon::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSystemTrayIcon::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSystemTrayIcon_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSystemTrayIcon::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSystemTrayIcon::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSystemTrayIcon_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSystemTrayIcon::disconnectNotify(*signal); + + } + +}; + +void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } -QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon) { - return new QSystemTrayIcon(*icon); +void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } -QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent) { - return new QSystemTrayIcon(parent); +void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(parent); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } -QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent) { - return new QSystemTrayIcon(*icon, parent); +void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon, parent); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self) { @@ -134,7 +329,7 @@ void QSystemTrayIcon_Activated(QSystemTrayIcon* self, int reason) { } void QSystemTrayIcon_connect_Activated(QSystemTrayIcon* self, intptr_t slot) { - QSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::activated), self, [=](QSystemTrayIcon::ActivationReason reason) { + MiqtVirtualQSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::activated), self, [=](QSystemTrayIcon::ActivationReason reason) { QSystemTrayIcon::ActivationReason reason_ret = reason; int sigval1 = static_cast(reason_ret); miqt_exec_callback_QSystemTrayIcon_Activated(slot, sigval1); @@ -146,7 +341,7 @@ void QSystemTrayIcon_MessageClicked(QSystemTrayIcon* self) { } void QSystemTrayIcon_connect_MessageClicked(QSystemTrayIcon* self, intptr_t slot) { - QSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::messageClicked), self, [=]() { + MiqtVirtualQSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::messageClicked), self, [=]() { miqt_exec_callback_QSystemTrayIcon_MessageClicked(slot); }); } @@ -213,7 +408,67 @@ void QSystemTrayIcon_ShowMessage42(QSystemTrayIcon* self, struct miqt_string tit self->showMessage(title_QString, msg_QString, static_cast(icon), static_cast(msecs)); } -void QSystemTrayIcon_Delete(QSystemTrayIcon* self) { - delete self; +void QSystemTrayIcon_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__Event = slot; +} + +bool QSystemTrayIcon_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_Event(event); +} + +void QSystemTrayIcon_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__EventFilter = slot; +} + +bool QSystemTrayIcon_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSystemTrayIcon_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__TimerEvent = slot; +} + +void QSystemTrayIcon_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_TimerEvent(event); +} + +void QSystemTrayIcon_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__ChildEvent = slot; +} + +void QSystemTrayIcon_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_ChildEvent(event); +} + +void QSystemTrayIcon_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__CustomEvent = slot; +} + +void QSystemTrayIcon_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_CustomEvent(event); +} + +void QSystemTrayIcon_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__ConnectNotify = slot; +} + +void QSystemTrayIcon_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSystemTrayIcon_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__DisconnectNotify = slot; +} + +void QSystemTrayIcon_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSystemTrayIcon_Delete(QSystemTrayIcon* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qsystemtrayicon.go b/qt/gen_qsystemtrayicon.go index 22ddc7a2..5043a46b 100644 --- a/qt/gen_qsystemtrayicon.go +++ b/qt/gen_qsystemtrayicon.go @@ -34,7 +34,8 @@ const ( ) type QSystemTrayIcon struct { - h *C.QSystemTrayIcon + h *C.QSystemTrayIcon + isSubclass bool *QObject } @@ -52,39 +53,67 @@ func (this *QSystemTrayIcon) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSystemTrayIcon(h *C.QSystemTrayIcon) *QSystemTrayIcon { +// newQSystemTrayIcon constructs the type using only CGO pointers. +func newQSystemTrayIcon(h *C.QSystemTrayIcon, h_QObject *C.QObject) *QSystemTrayIcon { if h == nil { return nil } - return &QSystemTrayIcon{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSystemTrayIcon{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSystemTrayIcon(h unsafe.Pointer) *QSystemTrayIcon { - return newQSystemTrayIcon((*C.QSystemTrayIcon)(h)) +// UnsafeNewQSystemTrayIcon constructs the type using only unsafe pointers. +func UnsafeNewQSystemTrayIcon(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSystemTrayIcon { + if h == nil { + return nil + } + + return &QSystemTrayIcon{h: (*C.QSystemTrayIcon)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSystemTrayIcon constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon() *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new() - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new(&outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSystemTrayIcon2 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon2(icon *QIcon) *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new2(icon.cPointer()) - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new2(icon.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSystemTrayIcon3 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon3(parent *QObject) *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new3(parent.cPointer()) - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new3(parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSystemTrayIcon4 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon4(icon *QIcon, parent *QObject) *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer()) - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSystemTrayIcon) MetaObject() *QMetaObject { @@ -120,7 +149,7 @@ func (this *QSystemTrayIcon) SetContextMenu(menu *QMenu) { } func (this *QSystemTrayIcon) ContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QSystemTrayIcon_ContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QSystemTrayIcon_ContextMenu(this.h)), nil, nil, nil) } func (this *QSystemTrayIcon) Icon() *QIcon { @@ -321,9 +350,175 @@ func (this *QSystemTrayIcon) ShowMessage42(title string, msg string, icon QSyste C.QSystemTrayIcon_ShowMessage42(this.h, title_ms, msg_ms, (C.int)(icon), (C.int)(msecs)) } +func (this *QSystemTrayIcon) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSystemTrayIcon_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSystemTrayIcon) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSystemTrayIcon_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_Event +func miqt_exec_callback_QSystemTrayIcon_Event(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSystemTrayIcon) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSystemTrayIcon_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSystemTrayIcon) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSystemTrayIcon_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_EventFilter +func miqt_exec_callback_QSystemTrayIcon_EventFilter(self *C.QSystemTrayIcon, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSystemTrayIcon) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSystemTrayIcon_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSystemTrayIcon) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSystemTrayIcon_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_TimerEvent +func miqt_exec_callback_QSystemTrayIcon_TimerEvent(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSystemTrayIcon_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSystemTrayIcon) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSystemTrayIcon_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_ChildEvent +func miqt_exec_callback_QSystemTrayIcon_ChildEvent(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSystemTrayIcon_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSystemTrayIcon) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSystemTrayIcon_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_CustomEvent +func miqt_exec_callback_QSystemTrayIcon_CustomEvent(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSystemTrayIcon_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSystemTrayIcon) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSystemTrayIcon_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_ConnectNotify +func miqt_exec_callback_QSystemTrayIcon_ConnectNotify(self *C.QSystemTrayIcon, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSystemTrayIcon_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSystemTrayIcon) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSystemTrayIcon_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_DisconnectNotify +func miqt_exec_callback_QSystemTrayIcon_DisconnectNotify(self *C.QSystemTrayIcon, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSystemTrayIcon) Delete() { - C.QSystemTrayIcon_Delete(this.h) + C.QSystemTrayIcon_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qsystemtrayicon.h b/qt/gen_qsystemtrayicon.h index d0a17d52..fa47f10f 100644 --- a/qt/gen_qsystemtrayicon.h +++ b/qt/gen_qsystemtrayicon.h @@ -15,25 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QIcon; class QMenu; +class QMetaMethod; class QMetaObject; class QObject; class QRect; class QSystemTrayIcon; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIcon QIcon; typedef struct QMenu QMenu; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSystemTrayIcon QSystemTrayIcon; +typedef struct QTimerEvent QTimerEvent; #endif -QSystemTrayIcon* QSystemTrayIcon_new(); -QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon); -QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent); -QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent); +void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self); void* QSystemTrayIcon_Metacast(QSystemTrayIcon* self, const char* param1); struct miqt_string QSystemTrayIcon_Tr(const char* s); @@ -57,6 +65,7 @@ void QSystemTrayIcon_Activated(QSystemTrayIcon* self, int reason); void QSystemTrayIcon_connect_Activated(QSystemTrayIcon* self, intptr_t slot); void QSystemTrayIcon_MessageClicked(QSystemTrayIcon* self); void QSystemTrayIcon_connect_MessageClicked(QSystemTrayIcon* self, intptr_t slot); +bool QSystemTrayIcon_Event(QSystemTrayIcon* self, QEvent* event); struct miqt_string QSystemTrayIcon_Tr2(const char* s, const char* c); struct miqt_string QSystemTrayIcon_Tr3(const char* s, const char* c, int n); struct miqt_string QSystemTrayIcon_TrUtf82(const char* s, const char* c); @@ -64,7 +73,21 @@ struct miqt_string QSystemTrayIcon_TrUtf83(const char* s, const char* c, int n); void QSystemTrayIcon_ShowMessage4(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, QIcon* icon, int msecs); void QSystemTrayIcon_ShowMessage3(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, int icon); void QSystemTrayIcon_ShowMessage42(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, int icon, int msecs); -void QSystemTrayIcon_Delete(QSystemTrayIcon* self); +void QSystemTrayIcon_override_virtual_Event(void* self, intptr_t slot); +bool QSystemTrayIcon_virtualbase_Event(void* self, QEvent* event); +void QSystemTrayIcon_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSystemTrayIcon_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSystemTrayIcon_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSystemTrayIcon_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSystemTrayIcon_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_CustomEvent(void* self, QEvent* event); +void QSystemTrayIcon_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSystemTrayIcon_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSystemTrayIcon_Delete(QSystemTrayIcon* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtabbar.cpp b/qt/gen_qtabbar.cpp index 440021db..5f8a54fc 100644 --- a/qt/gen_qtabbar.cpp +++ b/qt/gen_qtabbar.cpp @@ -1,25 +1,1184 @@ +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include #include +#include +#include #include +#include #include #include #include "gen_qtabbar.h" #include "_cgo_export.h" -QTabBar* QTabBar_new(QWidget* parent) { - return new QTabBar(parent); +class MiqtVirtualQTabBar : public virtual QTabBar { +public: + + MiqtVirtualQTabBar(QWidget* parent): QTabBar(parent) {}; + MiqtVirtualQTabBar(): QTabBar() {}; + + virtual ~MiqtVirtualQTabBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTabBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTabBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QTabBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QTabBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize tabSizeHint(int index) const override { + if (handle__TabSizeHint == 0) { + return QTabBar::tabSizeHint(index); + } + + int sigval1 = index; + + QSize* callback_return_value = miqt_exec_callback_QTabBar_TabSizeHint(const_cast(this), handle__TabSizeHint, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_TabSizeHint(int index) const { + + return new QSize(QTabBar::tabSizeHint(static_cast(index))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumTabSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumTabSizeHint(int index) const override { + if (handle__MinimumTabSizeHint == 0) { + return QTabBar::minimumTabSizeHint(index); + } + + int sigval1 = index; + + QSize* callback_return_value = miqt_exec_callback_QTabBar_MinimumTabSizeHint(const_cast(this), handle__MinimumTabSizeHint, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumTabSizeHint(int index) const { + + return new QSize(QTabBar::minimumTabSizeHint(static_cast(index))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void tabInserted(int index) override { + if (handle__TabInserted == 0) { + QTabBar::tabInserted(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabBar_TabInserted(this, handle__TabInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabInserted(int index) { + + QTabBar::tabInserted(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void tabRemoved(int index) override { + if (handle__TabRemoved == 0) { + QTabBar::tabRemoved(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabBar_TabRemoved(this, handle__TabRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabRemoved(int index) { + + QTabBar::tabRemoved(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabLayoutChange = 0; + + // Subclass to allow providing a Go implementation + virtual void tabLayoutChange() override { + if (handle__TabLayoutChange == 0) { + QTabBar::tabLayoutChange(); + return; + } + + + miqt_exec_callback_QTabBar_TabLayoutChange(this, handle__TabLayoutChange); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabLayoutChange() { + + QTabBar::tabLayoutChange(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QTabBar::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QTabBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QTabBar::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QTabBar::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QTabBar::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTabBar::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTabBar::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QTabBar::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QTabBar::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QTabBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QTabBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QTabBar::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QTabBar::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QTabBar::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QTabBar::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QTabBar::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QTabBar::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QTabBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QTabBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QTabBar::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QTabBar::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QTabBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QTabBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTabBar::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTabBar::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QTabBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QTabBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QTabBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QTabBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QTabBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QTabBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QTabBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QTabBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QTabBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QTabBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QTabBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QTabBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QTabBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QTabBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QTabBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTabBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTabBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QTabBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QTabBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTabBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTabBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTabBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTabBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QTabBar::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QTabBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QTabBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QTabBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QTabBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QTabBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QTabBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QTabBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QTabBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QTabBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QTabBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QTabBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QTabBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QTabBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTabBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTabBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTabBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTabBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTabBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTabBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTabBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTabBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QTabBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QTabBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QTabBar::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QTabBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QTabBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QTabBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QTabBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QTabBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QTabBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QTabBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QTabBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QTabBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QTabBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QTabBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QTabBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTabBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTabBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QTabBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTabBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QTabBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTabBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTabBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTabBar::focusNextPrevChild(next); + + } + +}; + +void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(parent); + *outptr_QTabBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTabBar* QTabBar_new2() { - return new QTabBar(); +void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(); + *outptr_QTabBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTabBar_MetaObject(const QTabBar* self) { @@ -324,7 +1483,7 @@ void QTabBar_CurrentChanged(QTabBar* self, int index) { } void QTabBar_connect_CurrentChanged(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::currentChanged), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_CurrentChanged(slot, sigval1); }); @@ -335,7 +1494,7 @@ void QTabBar_TabCloseRequested(QTabBar* self, int index) { } void QTabBar_connect_TabCloseRequested(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabCloseRequested), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabCloseRequested), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_TabCloseRequested(slot, sigval1); }); @@ -346,7 +1505,7 @@ void QTabBar_TabMoved(QTabBar* self, int from, int to) { } void QTabBar_connect_TabMoved(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabMoved), self, [=](int from, int to) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabMoved), self, [=](int from, int to) { int sigval1 = from; int sigval2 = to; miqt_exec_callback_QTabBar_TabMoved(slot, sigval1, sigval2); @@ -358,7 +1517,7 @@ void QTabBar_TabBarClicked(QTabBar* self, int index) { } void QTabBar_connect_TabBarClicked(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabBarClicked), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabBarClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_TabBarClicked(slot, sigval1); }); @@ -369,7 +1528,7 @@ void QTabBar_TabBarDoubleClicked(QTabBar* self, int index) { } void QTabBar_connect_TabBarDoubleClicked(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabBarDoubleClicked), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabBarDoubleClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_TabBarDoubleClicked(slot, sigval1); }); @@ -419,7 +1578,387 @@ struct miqt_string QTabBar_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTabBar_Delete(QTabBar* self) { - delete self; +void QTabBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QTabBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_SizeHint(); +} + +void QTabBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QTabBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QTabBar_override_virtual_TabSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabSizeHint = slot; +} + +QSize* QTabBar_virtualbase_TabSizeHint(const void* self, int index) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_TabSizeHint(index); +} + +void QTabBar_override_virtual_MinimumTabSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MinimumTabSizeHint = slot; +} + +QSize* QTabBar_virtualbase_MinimumTabSizeHint(const void* self, int index) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_MinimumTabSizeHint(index); +} + +void QTabBar_override_virtual_TabInserted(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabInserted = slot; +} + +void QTabBar_virtualbase_TabInserted(void* self, int index) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabInserted(index); +} + +void QTabBar_override_virtual_TabRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabRemoved = slot; +} + +void QTabBar_virtualbase_TabRemoved(void* self, int index) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabRemoved(index); +} + +void QTabBar_override_virtual_TabLayoutChange(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabLayoutChange = slot; +} + +void QTabBar_virtualbase_TabLayoutChange(void* self) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabLayoutChange(); +} + +void QTabBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__Event = slot; +} + +bool QTabBar_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQTabBar*)(self) )->virtualbase_Event(param1); +} + +void QTabBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ResizeEvent = slot; +} + +void QTabBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QTabBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ShowEvent = slot; +} + +void QTabBar_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTabBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__HideEvent = slot; +} + +void QTabBar_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_HideEvent(param1); +} + +void QTabBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__PaintEvent = slot; +} + +void QTabBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QTabBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MousePressEvent = slot; +} + +void QTabBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QTabBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTabBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QTabBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTabBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QTabBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__WheelEvent = slot; +} + +void QTabBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QTabBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QTabBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QTabBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ChangeEvent = slot; +} + +void QTabBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QTabBar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TimerEvent = slot; +} + +void QTabBar_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TimerEvent(event); +} + +void QTabBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DevType = slot; +} + +int QTabBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_DevType(); +} + +void QTabBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__SetVisible = slot; +} + +void QTabBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QTabBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__HeightForWidth = slot; +} + +int QTabBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QTabBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QTabBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QTabBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QTabBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_PaintEngine(); +} + +void QTabBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTabBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTabBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTabBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QTabBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__FocusInEvent = slot; +} + +void QTabBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTabBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QTabBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTabBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__EnterEvent = slot; +} + +void QTabBar_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QTabBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__LeaveEvent = slot; +} + +void QTabBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QTabBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MoveEvent = slot; +} + +void QTabBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QTabBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__CloseEvent = slot; +} + +void QTabBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QTabBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTabBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QTabBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabletEvent = slot; +} + +void QTabBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QTabBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ActionEvent = slot; +} + +void QTabBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QTabBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QTabBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTabBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QTabBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTabBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTabBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTabBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DropEvent = slot; +} + +void QTabBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DropEvent(event); +} + +void QTabBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__NativeEvent = slot; +} + +bool QTabBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQTabBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QTabBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__Metric = slot; +} + +int QTabBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_Metric(param1); +} + +void QTabBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InitPainter = slot; +} + +void QTabBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QTabBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QTabBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_Redirected(offset); +} + +void QTabBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QTabBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_SharedPainter(); +} + +void QTabBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QTabBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTabBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTabBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QTabBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTabBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTabBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTabBar_Delete(QTabBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtabbar.go b/qt/gen_qtabbar.go index 500645ec..c25663f4 100644 --- a/qt/gen_qtabbar.go +++ b/qt/gen_qtabbar.go @@ -43,7 +43,8 @@ const ( ) type QTabBar struct { - h *C.QTabBar + h *C.QTabBar + isSubclass bool *QWidget } @@ -61,27 +62,49 @@ func (this *QTabBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTabBar(h *C.QTabBar) *QTabBar { +// newQTabBar constructs the type using only CGO pointers. +func newQTabBar(h *C.QTabBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabBar { if h == nil { return nil } - return &QTabBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QTabBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTabBar(h unsafe.Pointer) *QTabBar { - return newQTabBar((*C.QTabBar)(h)) +// UnsafeNewQTabBar constructs the type using only unsafe pointers. +func UnsafeNewQTabBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabBar { + if h == nil { + return nil + } + + return &QTabBar{h: (*C.QTabBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTabBar constructs a new QTabBar object. func NewQTabBar(parent *QWidget) *QTabBar { - ret := C.QTabBar_new(parent.cPointer()) - return newQTabBar(ret) + var outptr_QTabBar *C.QTabBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabBar_new(parent.cPointer(), &outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTabBar2 constructs a new QTabBar object. func NewQTabBar2() *QTabBar { - ret := C.QTabBar_new2() - return newQTabBar(ret) + var outptr_QTabBar *C.QTabBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabBar_new2(&outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTabBar) MetaObject() *QMetaObject { @@ -335,7 +358,7 @@ func (this *QTabBar) SetTabButton(index int, position QTabBar__ButtonPosition, w } func (this *QTabBar) TabButton(index int, position QTabBar__ButtonPosition) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position))), nil, nil) } func (this *QTabBar) SelectionBehaviorOnRemove() QTabBar__SelectionBehavior { @@ -551,9 +574,1120 @@ func QTabBar_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTabBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTabBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_SizeHint +func miqt_exec_callback_QTabBar_SizeHint(self *C.QTabBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QTabBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MinimumSizeHint +func miqt_exec_callback_QTabBar_MinimumSizeHint(self *C.QTabBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_TabSizeHint(index int) *QSize { + + _ret := C.QTabBar_virtualbase_TabSizeHint(unsafe.Pointer(this.h), (C.int)(index)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnTabSizeHint(slot func(super func(index int) *QSize, index int) *QSize) { + C.QTabBar_override_virtual_TabSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabSizeHint +func miqt_exec_callback_QTabBar_TabSizeHint(self *C.QTabBar, cb C.intptr_t, index C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QSize, index int) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_TabSizeHint, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_MinimumTabSizeHint(index int) *QSize { + + _ret := C.QTabBar_virtualbase_MinimumTabSizeHint(unsafe.Pointer(this.h), (C.int)(index)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnMinimumTabSizeHint(slot func(super func(index int) *QSize, index int) *QSize) { + C.QTabBar_override_virtual_MinimumTabSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MinimumTabSizeHint +func miqt_exec_callback_QTabBar_MinimumTabSizeHint(self *C.QTabBar, cb C.intptr_t, index C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QSize, index int) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_MinimumTabSizeHint, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_TabInserted(index int) { + + C.QTabBar_virtualbase_TabInserted(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabBar) OnTabInserted(slot func(super func(index int), index int)) { + C.QTabBar_override_virtual_TabInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabInserted +func miqt_exec_callback_QTabBar_TabInserted(self *C.QTabBar, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabBar{h: self}).callVirtualBase_TabInserted, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TabRemoved(index int) { + + C.QTabBar_virtualbase_TabRemoved(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabBar) OnTabRemoved(slot func(super func(index int), index int)) { + C.QTabBar_override_virtual_TabRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabRemoved +func miqt_exec_callback_QTabBar_TabRemoved(self *C.QTabBar, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabBar{h: self}).callVirtualBase_TabRemoved, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TabLayoutChange() { + + C.QTabBar_virtualbase_TabLayoutChange(unsafe.Pointer(this.h)) + +} +func (this *QTabBar) OnTabLayoutChange(slot func(super func())) { + C.QTabBar_override_virtual_TabLayoutChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabLayoutChange +func miqt_exec_callback_QTabBar_TabLayoutChange(self *C.QTabBar, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTabBar{h: self}).callVirtualBase_TabLayoutChange) + +} + +func (this *QTabBar) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QTabBar_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QTabBar) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QTabBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_Event +func miqt_exec_callback_QTabBar_Event(self *C.QTabBar, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QTabBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QTabBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ResizeEvent +func miqt_exec_callback_QTabBar_ResizeEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTabBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTabBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ShowEvent +func miqt_exec_callback_QTabBar_ShowEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QTabBar_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QTabBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_HideEvent +func miqt_exec_callback_QTabBar_HideEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QTabBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QTabBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_PaintEvent +func miqt_exec_callback_QTabBar_PaintEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MousePressEvent +func miqt_exec_callback_QTabBar_MousePressEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MouseMoveEvent +func miqt_exec_callback_QTabBar_MouseMoveEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MouseReleaseEvent +func miqt_exec_callback_QTabBar_MouseReleaseEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QTabBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QTabBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_WheelEvent +func miqt_exec_callback_QTabBar_WheelEvent(self *C.QTabBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QTabBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QTabBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_KeyPressEvent +func miqt_exec_callback_QTabBar_KeyPressEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QTabBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QTabBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ChangeEvent +func miqt_exec_callback_QTabBar_ChangeEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QTabBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTabBar_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTabBar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TimerEvent +func miqt_exec_callback_QTabBar_TimerEvent(self *C.QTabBar, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DevType() int { + + return (int)(C.QTabBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QTabBar) OnDevType(slot func(super func() int) int) { + C.QTabBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DevType +func miqt_exec_callback_QTabBar_DevType(self *C.QTabBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_SetVisible(visible bool) { + + C.QTabBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QTabBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QTabBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_SetVisible +func miqt_exec_callback_QTabBar_SetVisible(self *C.QTabBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QTabBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QTabBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QTabBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QTabBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QTabBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_HeightForWidth +func miqt_exec_callback_QTabBar_HeightForWidth(self *C.QTabBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QTabBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QTabBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QTabBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_HasHeightForWidth +func miqt_exec_callback_QTabBar_HasHeightForWidth(self *C.QTabBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QTabBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QTabBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QTabBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_PaintEngine +func miqt_exec_callback_QTabBar_PaintEngine(self *C.QTabBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTabBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MouseDoubleClickEvent +func miqt_exec_callback_QTabBar_MouseDoubleClickEvent(self *C.QTabBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QTabBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTabBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_KeyReleaseEvent +func miqt_exec_callback_QTabBar_KeyReleaseEvent(self *C.QTabBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTabBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_FocusInEvent +func miqt_exec_callback_QTabBar_FocusInEvent(self *C.QTabBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTabBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_FocusOutEvent +func miqt_exec_callback_QTabBar_FocusOutEvent(self *C.QTabBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_EnterEvent(event *QEvent) { + + C.QTabBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTabBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_EnterEvent +func miqt_exec_callback_QTabBar_EnterEvent(self *C.QTabBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTabBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QTabBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTabBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_LeaveEvent +func miqt_exec_callback_QTabBar_LeaveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTabBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QTabBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QTabBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MoveEvent +func miqt_exec_callback_QTabBar_MoveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QTabBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QTabBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_CloseEvent +func miqt_exec_callback_QTabBar_CloseEvent(self *C.QTabBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QTabBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QTabBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ContextMenuEvent +func miqt_exec_callback_QTabBar_ContextMenuEvent(self *C.QTabBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QTabBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QTabBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabletEvent +func miqt_exec_callback_QTabBar_TabletEvent(self *C.QTabBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QTabBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QTabBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ActionEvent +func miqt_exec_callback_QTabBar_ActionEvent(self *C.QTabBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTabBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTabBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DragEnterEvent +func miqt_exec_callback_QTabBar_DragEnterEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTabBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTabBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DragMoveEvent +func miqt_exec_callback_QTabBar_DragMoveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTabBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTabBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DragLeaveEvent +func miqt_exec_callback_QTabBar_DragLeaveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTabBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTabBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DropEvent +func miqt_exec_callback_QTabBar_DropEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QTabBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QTabBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QTabBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_NativeEvent +func miqt_exec_callback_QTabBar_NativeEvent(self *C.QTabBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QTabBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QTabBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QTabBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_Metric +func miqt_exec_callback_QTabBar_Metric(self *C.QTabBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QTabBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QTabBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QTabBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InitPainter +func miqt_exec_callback_QTabBar_InitPainter(self *C.QTabBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QTabBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QTabBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QTabBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QTabBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QTabBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_Redirected +func miqt_exec_callback_QTabBar_Redirected(self *C.QTabBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QTabBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QTabBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QTabBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_SharedPainter +func miqt_exec_callback_QTabBar_SharedPainter(self *C.QTabBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTabBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTabBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InputMethodEvent +func miqt_exec_callback_QTabBar_InputMethodEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QTabBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QTabBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InputMethodQuery +func miqt_exec_callback_QTabBar_InputMethodQuery(self *C.QTabBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTabBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTabBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTabBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_FocusNextPrevChild +func miqt_exec_callback_QTabBar_FocusNextPrevChild(self *C.QTabBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTabBar) Delete() { - C.QTabBar_Delete(this.h) + C.QTabBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtabbar.h b/qt/gen_qtabbar.h index 7aa2baa6..92209511 100644 --- a/qt/gen_qtabbar.h +++ b/qt/gen_qtabbar.h @@ -15,29 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; class QTabBar; +class QTabletEvent; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QTabBar QTabBar; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTabBar* QTabBar_new(QWidget* parent); -QTabBar* QTabBar_new2(); +void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTabBar_MetaObject(const QTabBar* self); void* QTabBar_Metacast(QTabBar* self, const char* param1); struct miqt_string QTabBar_Tr(const char* s); @@ -109,11 +159,122 @@ void QTabBar_TabBarClicked(QTabBar* self, int index); void QTabBar_connect_TabBarClicked(QTabBar* self, intptr_t slot); void QTabBar_TabBarDoubleClicked(QTabBar* self, int index); void QTabBar_connect_TabBarDoubleClicked(QTabBar* self, intptr_t slot); +QSize* QTabBar_TabSizeHint(const QTabBar* self, int index); +QSize* QTabBar_MinimumTabSizeHint(const QTabBar* self, int index); +void QTabBar_TabInserted(QTabBar* self, int index); +void QTabBar_TabRemoved(QTabBar* self, int index); +void QTabBar_TabLayoutChange(QTabBar* self); +bool QTabBar_Event(QTabBar* self, QEvent* param1); +void QTabBar_ResizeEvent(QTabBar* self, QResizeEvent* param1); +void QTabBar_ShowEvent(QTabBar* self, QShowEvent* param1); +void QTabBar_HideEvent(QTabBar* self, QHideEvent* param1); +void QTabBar_PaintEvent(QTabBar* self, QPaintEvent* param1); +void QTabBar_MousePressEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_MouseMoveEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_MouseReleaseEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_WheelEvent(QTabBar* self, QWheelEvent* event); +void QTabBar_KeyPressEvent(QTabBar* self, QKeyEvent* param1); +void QTabBar_ChangeEvent(QTabBar* self, QEvent* param1); +void QTabBar_TimerEvent(QTabBar* self, QTimerEvent* event); struct miqt_string QTabBar_Tr2(const char* s, const char* c); struct miqt_string QTabBar_Tr3(const char* s, const char* c, int n); struct miqt_string QTabBar_TrUtf82(const char* s, const char* c); struct miqt_string QTabBar_TrUtf83(const char* s, const char* c, int n); -void QTabBar_Delete(QTabBar* self); +void QTabBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_SizeHint(const void* self); +void QTabBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_MinimumSizeHint(const void* self); +void QTabBar_override_virtual_TabSizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_TabSizeHint(const void* self, int index); +void QTabBar_override_virtual_MinimumTabSizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_MinimumTabSizeHint(const void* self, int index); +void QTabBar_override_virtual_TabInserted(void* self, intptr_t slot); +void QTabBar_virtualbase_TabInserted(void* self, int index); +void QTabBar_override_virtual_TabRemoved(void* self, intptr_t slot); +void QTabBar_virtualbase_TabRemoved(void* self, int index); +void QTabBar_override_virtual_TabLayoutChange(void* self, intptr_t slot); +void QTabBar_virtualbase_TabLayoutChange(void* self); +void QTabBar_override_virtual_Event(void* self, intptr_t slot); +bool QTabBar_virtualbase_Event(void* self, QEvent* param1); +void QTabBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QTabBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTabBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QTabBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QTabBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QTabBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QTabBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QTabBar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTabBar_override_virtual_DevType(void* self, intptr_t slot); +int QTabBar_virtualbase_DevType(const void* self); +void QTabBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QTabBar_virtualbase_SetVisible(void* self, bool visible); +void QTabBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QTabBar_virtualbase_HeightForWidth(const void* self, int param1); +void QTabBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QTabBar_virtualbase_HasHeightForWidth(const void* self); +void QTabBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QTabBar_virtualbase_PaintEngine(const void* self); +void QTabBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTabBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QTabBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTabBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTabBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_EnterEvent(void* self, QEvent* event); +void QTabBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QTabBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QTabBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QTabBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QTabBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QTabBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QTabBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTabBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTabBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTabBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTabBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QTabBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QTabBar_override_virtual_Metric(void* self, intptr_t slot); +int QTabBar_virtualbase_Metric(const void* self, int param1); +void QTabBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QTabBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QTabBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QTabBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QTabBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QTabBar_virtualbase_SharedPainter(const void* self); +void QTabBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTabBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTabBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QTabBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTabBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTabBar_Delete(QTabBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtableview.cpp b/qt/gen_qtableview.cpp index c7ed6eeb..97392cae 100644 --- a/qt/gen_qtableview.cpp +++ b/qt/gen_qtableview.cpp @@ -1,25 +1,1524 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include #include +#include +#include +#include +#include #include #include +#include +#include #include #include #include +#include #include +#include +#include #include #include #include "gen_qtableview.h" #include "_cgo_export.h" -QTableView* QTableView_new(QWidget* parent) { - return new QTableView(parent); +class MiqtVirtualQTableView : public virtual QTableView { +public: + + MiqtVirtualQTableView(QWidget* parent): QTableView(parent) {}; + MiqtVirtualQTableView(): QTableView() {}; + + virtual ~MiqtVirtualQTableView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QTableView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QTableView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QTableView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTableView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTableView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTableView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTableView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTableView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTableView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTableView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTableView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTableView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTableView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTableView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTableView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTableView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTableView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTableView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTableView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTableView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTableView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTableView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTableView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QTableView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QTableView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QTableView::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTableView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTableView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTableView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTableView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTableView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTableView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTableView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTableView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTableView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTableView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTableView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTableView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTableView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTableView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTableView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTableView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTableView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTableView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTableView::updateGeometries(); + return; + } + + + miqt_exec_callback_QTableView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTableView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTableView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTableView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTableView::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QTableView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QTableView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QTableView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTableView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTableView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTableView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QTableView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QTableView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTableView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTableView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTableView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTableView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTableView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTableView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTableView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTableView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QTableView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QTableView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QTableView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QTableView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTableView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QTableView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QTableView::reset(); + return; + } + + + miqt_exec_callback_QTableView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QTableView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QTableView::selectAll(); + return; + } + + + miqt_exec_callback_QTableView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QTableView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QTableView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QTableView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QTableView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QTableView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTableView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QTableView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QTableView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTableView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QTableView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QTableView::updateEditorData(); + return; + } + + + miqt_exec_callback_QTableView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QTableView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QTableView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QTableView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QTableView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QTableView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTableView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QTableView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QTableView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTableView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QTableView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QTableView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTableView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QTableView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QTableView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QTableView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QTableView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QTableView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QTableView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QTableView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QTableView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QTableView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QTableView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QTableView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QTableView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QTableView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QTableView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QTableView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTableView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTableView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTableView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTableView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTableView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QTableView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QTableView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTableView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTableView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTableView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTableView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTableView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTableView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTableView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTableView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTableView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTableView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTableView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTableView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTableView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTableView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTableView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTableView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTableView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTableView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTableView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTableView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTableView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTableView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTableView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTableView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTableView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QTableView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QTableView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QTableView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QTableView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QTableView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QTableView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTableView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QTableView::eventFilter(object, event); + + } + +}; + +void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(parent); + *outptr_QTableView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTableView* QTableView_new2() { - return new QTableView(); +void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(); + *outptr_QTableView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTableView_MetaObject(const QTableView* self) { @@ -173,8 +1672,8 @@ QRect* QTableView_VisualRect(const QTableView* self, QModelIndex* index) { return new QRect(self->visualRect(*index)); } -void QTableView_ScrollTo(QTableView* self, QModelIndex* index) { - self->scrollTo(*index); +void QTableView_ScrollTo(QTableView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QModelIndex* QTableView_IndexAt(const QTableView* self, QPoint* p) { @@ -293,11 +1792,475 @@ struct miqt_string QTableView_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTableView_ScrollTo2(QTableView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QTableView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetModel = slot; +} + +void QTableView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetModel(model); +} + +void QTableView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetRootIndex = slot; +} + +void QTableView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTableView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetSelectionModel = slot; +} + +void QTableView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTableView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DoItemsLayout = slot; +} + +void QTableView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTableView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VisualRect = slot; +} + +QRect* QTableView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_VisualRect(index); +} + +void QTableView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ScrollTo = slot; +} + +void QTableView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTableView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTableView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_IndexAt(p); +} + +void QTableView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTableView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTableView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QTableView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_ViewOptions(); +} + +void QTableView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__PaintEvent = slot; +} + +void QTableView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_PaintEvent(e); +} + +void QTableView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__TimerEvent = slot; +} + +void QTableView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_TimerEvent(event); +} + +void QTableView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__HorizontalOffset = slot; +} + +int QTableView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QTableView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VerticalOffset = slot; +} + +int QTableView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_VerticalOffset(); +} + +void QTableView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QTableView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QTableView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetSelection = slot; +} + +void QTableView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QTableView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QTableView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QTableView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__UpdateGeometries = slot; +} + +void QTableView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QTableView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTableView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTableView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SizeHintForRow = slot; +} + +int QTableView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QTableView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QTableView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QTableView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QTableView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QTableView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QTableView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QTableView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QTableView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QTableView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__CurrentChanged = slot; +} + +void QTableView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QTableView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__KeyboardSearch = slot; +} + +void QTableView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QTableView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTableView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QTableView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__Reset = slot; +} + +void QTableView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_Reset(); +} + +void QTableView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectAll = slot; +} + +void QTableView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SelectAll(); +} + +void QTableView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DataChanged = slot; +} + +void QTableView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QTableView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__RowsInserted = slot; +} + +void QTableView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QTableView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QTableView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QTableView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__UpdateEditorData = slot; +} + +void QTableView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QTableView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QTableView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QTableView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QTableView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QTableView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QTableView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QTableView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__CloseEditor = slot; +} + +void QTableView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QTableView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__CommitData = slot; +} + +void QTableView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_CommitData(editor); +} + +void QTableView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__EditorDestroyed = slot; +} + +void QTableView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QTableView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__Edit2 = slot; +} + +bool QTableView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QTableView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectionCommand = slot; +} + +int QTableView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QTableView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__StartDrag = slot; +} + +void QTableView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QTableView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTableView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTableView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__Event = slot; +} + +bool QTableView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_Event(event); +} + +void QTableView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ViewportEvent = slot; +} + +bool QTableView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QTableView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MousePressEvent = slot; +} + +void QTableView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTableView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTableView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QTableView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTableView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QTableView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTableView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTableView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DragEnterEvent = slot; +} + +void QTableView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTableView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DragMoveEvent = slot; +} + +void QTableView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTableView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTableView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTableView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DropEvent = slot; +} + +void QTableView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DropEvent(event); +} + +void QTableView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__FocusInEvent = slot; +} + +void QTableView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTableView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__FocusOutEvent = slot; +} + +void QTableView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTableView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__KeyPressEvent = slot; +} + +void QTableView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QTableView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ResizeEvent = slot; +} + +void QTableView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QTableView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__InputMethodEvent = slot; +} + +void QTableView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QTableView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__EventFilter = slot; +} + +bool QTableView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_EventFilter(object, event); } -void QTableView_Delete(QTableView* self) { - delete self; +void QTableView_Delete(QTableView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtableview.go b/qt/gen_qtableview.go index cd68e052..02536de4 100644 --- a/qt/gen_qtableview.go +++ b/qt/gen_qtableview.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTableView struct { - h *C.QTableView + h *C.QTableView + isSubclass bool *QAbstractItemView } @@ -32,27 +34,55 @@ func (this *QTableView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTableView(h *C.QTableView) *QTableView { +// newQTableView constructs the type using only CGO pointers. +func newQTableView(h *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableView { if h == nil { return nil } - return &QTableView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QTableView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTableView(h unsafe.Pointer) *QTableView { - return newQTableView((*C.QTableView)(h)) +// UnsafeNewQTableView constructs the type using only unsafe pointers. +func UnsafeNewQTableView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableView { + if h == nil { + return nil + } + + return &QTableView{h: (*C.QTableView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTableView constructs a new QTableView object. func NewQTableView(parent *QWidget) *QTableView { - ret := C.QTableView_new(parent.cPointer()) - return newQTableView(ret) + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableView_new(parent.cPointer(), &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableView2 constructs a new QTableView object. func NewQTableView2() *QTableView { - ret := C.QTableView_new2() - return newQTableView(ret) + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableView_new2(&outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTableView) MetaObject() *QMetaObject { @@ -100,11 +130,11 @@ func (this *QTableView) DoItemsLayout() { } func (this *QTableView) HorizontalHeader() *QHeaderView { - return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_HorizontalHeader(this.h))) + return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_HorizontalHeader(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QTableView) VerticalHeader() *QHeaderView { - return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_VerticalHeader(this.h))) + return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_VerticalHeader(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QTableView) SetHorizontalHeader(header *QHeaderView) { @@ -206,8 +236,8 @@ func (this *QTableView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QTableView) ScrollTo(index *QModelIndex) { - C.QTableView_ScrollTo(this.h, index.cPointer()) +func (this *QTableView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QTableView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QTableView) IndexAt(p *QPoint) *QModelIndex { @@ -329,13 +359,1419 @@ func QTableView_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QTableView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QTableView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QTableView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QTableView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QTableView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QTableView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetModel +func miqt_exec_callback_QTableView_SetModel(self *C.QTableView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QTableView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTableView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTableView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTableView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetRootIndex +func miqt_exec_callback_QTableView_SetRootIndex(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTableView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTableView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTableView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTableView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTableView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetSelectionModel +func miqt_exec_callback_QTableView_SetSelectionModel(self *C.QTableView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTableView) callVirtualBase_DoItemsLayout() { + + C.QTableView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnDoItemsLayout(slot func(super func())) { + C.QTableView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DoItemsLayout +func miqt_exec_callback_QTableView_DoItemsLayout(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTableView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTableView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTableView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VisualRect +func miqt_exec_callback_QTableView_VisualRect(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTableView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTableView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTableView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ScrollTo +func miqt_exec_callback_QTableView_ScrollTo(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTableView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTableView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTableView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_IndexAt +func miqt_exec_callback_QTableView_IndexAt(self *C.QTableView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTableView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTableView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTableView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ScrollContentsBy +func miqt_exec_callback_QTableView_ScrollContentsBy(self *C.QTableView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTableView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QTableView_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QTableView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ViewOptions +func miqt_exec_callback_QTableView_ViewOptions(self *C.QTableView, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTableView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTableView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTableView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_PaintEvent +func miqt_exec_callback_QTableView_PaintEvent(self *C.QTableView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTableView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTableView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_TimerEvent +func miqt_exec_callback_QTableView_TimerEvent(self *C.QTableView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTableView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableView) OnHorizontalOffset(slot func(super func() int) int) { + C.QTableView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_HorizontalOffset +func miqt_exec_callback_QTableView_HorizontalOffset(self *C.QTableView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTableView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableView) OnVerticalOffset(slot func(super func() int) int) { + C.QTableView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VerticalOffset +func miqt_exec_callback_QTableView_VerticalOffset(self *C.QTableView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTableView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTableView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MoveCursor +func miqt_exec_callback_QTableView_MoveCursor(self *C.QTableView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTableView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTableView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTableView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetSelection +func miqt_exec_callback_QTableView_SetSelection(self *C.QTableView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTableView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTableView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTableView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTableView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectedIndexes +func miqt_exec_callback_QTableView_SelectedIndexes(self *C.QTableView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTableView) callVirtualBase_UpdateGeometries() { + + C.QTableView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnUpdateGeometries(slot func(super func())) { + C.QTableView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_UpdateGeometries +func miqt_exec_callback_QTableView_UpdateGeometries(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTableView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTableView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTableView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ViewportSizeHint +func miqt_exec_callback_QTableView_ViewportSizeHint(self *C.QTableView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QTableView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QTableView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QTableView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SizeHintForRow +func miqt_exec_callback_QTableView_SizeHintForRow(self *C.QTableView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTableView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTableView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTableView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SizeHintForColumn +func miqt_exec_callback_QTableView_SizeHintForColumn(self *C.QTableView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QTableView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VerticalScrollbarAction +func miqt_exec_callback_QTableView_VerticalScrollbarAction(self *C.QTableView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QTableView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTableView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_HorizontalScrollbarAction +func miqt_exec_callback_QTableView_HorizontalScrollbarAction(self *C.QTableView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTableView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTableView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTableView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTableView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_IsIndexHidden +func miqt_exec_callback_QTableView_IsIndexHidden(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTableView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTableView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTableView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_CurrentChanged +func miqt_exec_callback_QTableView_CurrentChanged(self *C.QTableView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTableView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QTableView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QTableView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QTableView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_KeyboardSearch +func miqt_exec_callback_QTableView_KeyboardSearch(self *C.QTableView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QTableView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QTableView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QTableView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QTableView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_InputMethodQuery +func miqt_exec_callback_QTableView_InputMethodQuery(self *C.QTableView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_Reset() { + + C.QTableView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnReset(slot func(super func())) { + C.QTableView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_Reset +func miqt_exec_callback_QTableView_Reset(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_Reset) + +} + +func (this *QTableView) callVirtualBase_SelectAll() { + + C.QTableView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnSelectAll(slot func(super func())) { + C.QTableView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectAll +func miqt_exec_callback_QTableView_SelectAll(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QTableView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QTableView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QTableView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QTableView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DataChanged +func miqt_exec_callback_QTableView_DataChanged(self *C.QTableView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QTableView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QTableView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QTableView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTableView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTableView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_RowsInserted +func miqt_exec_callback_QTableView_RowsInserted(self *C.QTableView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTableView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QTableView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QTableView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTableView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTableView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_RowsAboutToBeRemoved +func miqt_exec_callback_QTableView_RowsAboutToBeRemoved(self *C.QTableView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTableView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QTableView) callVirtualBase_UpdateEditorData() { + + C.QTableView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnUpdateEditorData(slot func(super func())) { + C.QTableView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_UpdateEditorData +func miqt_exec_callback_QTableView_UpdateEditorData(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QTableView) callVirtualBase_UpdateEditorGeometries() { + + C.QTableView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnUpdateEditorGeometries(slot func(super func())) { + C.QTableView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_UpdateEditorGeometries +func miqt_exec_callback_QTableView_UpdateEditorGeometries(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QTableView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QTableView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTableView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTableView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VerticalScrollbarValueChanged +func miqt_exec_callback_QTableView_VerticalScrollbarValueChanged(self *C.QTableView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTableView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QTableView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QTableView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTableView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTableView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QTableView_HorizontalScrollbarValueChanged(self *C.QTableView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTableView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QTableView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QTableView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QTableView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QTableView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_CloseEditor +func miqt_exec_callback_QTableView_CloseEditor(self *C.QTableView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QTableView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_CommitData(editor *QWidget) { + + C.QTableView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTableView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QTableView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_CommitData +func miqt_exec_callback_QTableView_CommitData(self *C.QTableView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QTableView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QTableView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTableView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QTableView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_EditorDestroyed +func miqt_exec_callback_QTableView_EditorDestroyed(self *C.QTableView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QTableView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QTableView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QTableView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QTableView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_Edit2 +func miqt_exec_callback_QTableView_Edit2(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QTableView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QTableView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QTableView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectionCommand +func miqt_exec_callback_QTableView_SelectionCommand(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QTableView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QTableView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QTableView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_StartDrag +func miqt_exec_callback_QTableView_StartDrag(self *C.QTableView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QTableView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QTableView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTableView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTableView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTableView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_FocusNextPrevChild +func miqt_exec_callback_QTableView_FocusNextPrevChild(self *C.QTableView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTableView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTableView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_Event +func miqt_exec_callback_QTableView_Event(self *C.QTableView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTableView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTableView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ViewportEvent +func miqt_exec_callback_QTableView_ViewportEvent(self *C.QTableView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MousePressEvent +func miqt_exec_callback_QTableView_MousePressEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MouseMoveEvent +func miqt_exec_callback_QTableView_MouseMoveEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MouseReleaseEvent +func miqt_exec_callback_QTableView_MouseReleaseEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MouseDoubleClickEvent +func miqt_exec_callback_QTableView_MouseDoubleClickEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTableView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTableView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DragEnterEvent +func miqt_exec_callback_QTableView_DragEnterEvent(self *C.QTableView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTableView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTableView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DragMoveEvent +func miqt_exec_callback_QTableView_DragMoveEvent(self *C.QTableView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTableView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTableView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DragLeaveEvent +func miqt_exec_callback_QTableView_DragLeaveEvent(self *C.QTableView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTableView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTableView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DropEvent +func miqt_exec_callback_QTableView_DropEvent(self *C.QTableView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTableView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTableView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_FocusInEvent +func miqt_exec_callback_QTableView_FocusInEvent(self *C.QTableView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTableView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTableView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_FocusOutEvent +func miqt_exec_callback_QTableView_FocusOutEvent(self *C.QTableView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTableView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTableView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_KeyPressEvent +func miqt_exec_callback_QTableView_KeyPressEvent(self *C.QTableView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QTableView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QTableView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ResizeEvent +func miqt_exec_callback_QTableView_ResizeEvent(self *C.QTableView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QTableView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QTableView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_InputMethodEvent +func miqt_exec_callback_QTableView_InputMethodEvent(self *C.QTableView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QTableView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QTableView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_EventFilter +func miqt_exec_callback_QTableView_EventFilter(self *C.QTableView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QTableView) Delete() { - C.QTableView_Delete(this.h) + C.QTableView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtableview.h b/qt/gen_qtableview.h index 29de2c12..17ff86a1 100644 --- a/qt/gen_qtableview.h +++ b/qt/gen_qtableview.h @@ -16,28 +16,68 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QHeaderView; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QResizeEvent; +class QSize; +class QStyleOptionViewItem; class QTableView; +class QTimerEvent; +class QVariant; class QWidget; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QTableView QTableView; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTableView* QTableView_new(QWidget* parent); -QTableView* QTableView_new2(); +void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTableView_MetaObject(const QTableView* self); void* QTableView_Metacast(QTableView* self, const char* param1); struct miqt_string QTableView_Tr(const char* s); @@ -72,7 +112,7 @@ bool QTableView_WordWrap(const QTableView* self); void QTableView_SetCornerButtonEnabled(QTableView* self, bool enable); bool QTableView_IsCornerButtonEnabled(const QTableView* self); QRect* QTableView_VisualRect(const QTableView* self, QModelIndex* index); -void QTableView_ScrollTo(QTableView* self, QModelIndex* index); +void QTableView_ScrollTo(QTableView* self, QModelIndex* index, int hint); QModelIndex* QTableView_IndexAt(const QTableView* self, QPoint* p); void QTableView_SetSpan(QTableView* self, int row, int column, int rowSpan, int columnSpan); int QTableView_RowSpan(const QTableView* self, int row, int column); @@ -91,12 +131,144 @@ void QTableView_ResizeColumnsToContents(QTableView* self); void QTableView_SortByColumn(QTableView* self, int column); void QTableView_SortByColumn2(QTableView* self, int column, int order); void QTableView_SetShowGrid(QTableView* self, bool show); +void QTableView_ScrollContentsBy(QTableView* self, int dx, int dy); +QStyleOptionViewItem* QTableView_ViewOptions(const QTableView* self); +void QTableView_PaintEvent(QTableView* self, QPaintEvent* e); +void QTableView_TimerEvent(QTableView* self, QTimerEvent* event); +int QTableView_HorizontalOffset(const QTableView* self); +int QTableView_VerticalOffset(const QTableView* self); +QModelIndex* QTableView_MoveCursor(QTableView* self, int cursorAction, int modifiers); +void QTableView_SetSelection(QTableView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QTableView_SelectedIndexes(const QTableView* self); +void QTableView_UpdateGeometries(QTableView* self); +QSize* QTableView_ViewportSizeHint(const QTableView* self); +int QTableView_SizeHintForRow(const QTableView* self, int row); +int QTableView_SizeHintForColumn(const QTableView* self, int column); +void QTableView_VerticalScrollbarAction(QTableView* self, int action); +void QTableView_HorizontalScrollbarAction(QTableView* self, int action); +bool QTableView_IsIndexHidden(const QTableView* self, QModelIndex* index); +void QTableView_CurrentChanged(QTableView* self, QModelIndex* current, QModelIndex* previous); struct miqt_string QTableView_Tr2(const char* s, const char* c); struct miqt_string QTableView_Tr3(const char* s, const char* c, int n); struct miqt_string QTableView_TrUtf82(const char* s, const char* c); struct miqt_string QTableView_TrUtf83(const char* s, const char* c, int n); -void QTableView_ScrollTo2(QTableView* self, QModelIndex* index, int hint); -void QTableView_Delete(QTableView* self); +void QTableView_override_virtual_SetModel(void* self, intptr_t slot); +void QTableView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QTableView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTableView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTableView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTableView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTableView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTableView_virtualbase_DoItemsLayout(void* self); +void QTableView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTableView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTableView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTableView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTableView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTableView_virtualbase_IndexAt(const void* self, QPoint* p); +void QTableView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTableView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTableView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QTableView_virtualbase_ViewOptions(const void* self); +void QTableView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTableView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTableView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTableView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTableView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTableView_virtualbase_HorizontalOffset(const void* self); +void QTableView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTableView_virtualbase_VerticalOffset(const void* self); +void QTableView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTableView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTableView_override_virtual_SetSelection(void* self, intptr_t slot); +void QTableView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTableView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTableView_virtualbase_SelectedIndexes(const void* self); +void QTableView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTableView_virtualbase_UpdateGeometries(void* self); +void QTableView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTableView_virtualbase_ViewportSizeHint(const void* self); +void QTableView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QTableView_virtualbase_SizeHintForRow(const void* self, int row); +void QTableView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTableView_virtualbase_SizeHintForColumn(const void* self, int column); +void QTableView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QTableView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QTableView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTableView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTableView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTableView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTableView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTableView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTableView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QTableView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QTableView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTableView_virtualbase_InputMethodQuery(const void* self, int query); +void QTableView_override_virtual_Reset(void* self, intptr_t slot); +void QTableView_virtualbase_Reset(void* self); +void QTableView_override_virtual_SelectAll(void* self, intptr_t slot); +void QTableView_virtualbase_SelectAll(void* self); +void QTableView_override_virtual_DataChanged(void* self, intptr_t slot); +void QTableView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QTableView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QTableView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QTableView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QTableView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QTableView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QTableView_virtualbase_UpdateEditorData(void* self); +void QTableView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QTableView_virtualbase_UpdateEditorGeometries(void* self); +void QTableView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QTableView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QTableView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QTableView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QTableView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QTableView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QTableView_override_virtual_CommitData(void* self, intptr_t slot); +void QTableView_virtualbase_CommitData(void* self, QWidget* editor); +void QTableView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QTableView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QTableView_override_virtual_Edit2(void* self, intptr_t slot); +bool QTableView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QTableView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QTableView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QTableView_override_virtual_StartDrag(void* self, intptr_t slot); +void QTableView_virtualbase_StartDrag(void* self, int supportedActions); +void QTableView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTableView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTableView_override_virtual_Event(void* self, intptr_t slot); +bool QTableView_virtualbase_Event(void* self, QEvent* event); +void QTableView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTableView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QTableView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTableView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTableView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTableView_override_virtual_DropEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTableView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTableView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTableView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTableView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTableView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTableView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTableView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTableView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QTableView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTableView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QTableView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTableView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QTableView_Delete(QTableView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtablewidget.cpp b/qt/gen_qtablewidget.cpp index 05386211..a08e3b6b 100644 --- a/qt/gen_qtablewidget.cpp +++ b/qt/gen_qtablewidget.cpp @@ -1,35 +1,52 @@ +#include +#include #include #include #include +#include +#include #include +#include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include +#include #include #include #include #include "gen_qtablewidget.h" #include "_cgo_export.h" -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new() { - return new QTableWidgetSelectionRange(); +void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { + QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(); + *outptr_QTableWidgetSelectionRange = ret; } -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right) { - return new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); +void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { + QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); + *outptr_QTableWidgetSelectionRange = ret; } -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other) { - return new QTableWidgetSelectionRange(*other); +void QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { + QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(*other); + *outptr_QTableWidgetSelectionRange = ret; } void QTableWidgetSelectionRange_OperatorAssign(QTableWidgetSelectionRange* self, QTableWidgetSelectionRange* other) { @@ -60,40 +77,215 @@ int QTableWidgetSelectionRange_ColumnCount(const QTableWidgetSelectionRange* sel return self->columnCount(); } -void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self) { - delete self; +void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTableWidgetItem* QTableWidgetItem_new() { - return new QTableWidgetItem(); +class MiqtVirtualQTableWidgetItem : public virtual QTableWidgetItem { +public: + + MiqtVirtualQTableWidgetItem(): QTableWidgetItem() {}; + MiqtVirtualQTableWidgetItem(const QString& text): QTableWidgetItem(text) {}; + MiqtVirtualQTableWidgetItem(const QIcon& icon, const QString& text): QTableWidgetItem(icon, text) {}; + MiqtVirtualQTableWidgetItem(const QTableWidgetItem& other): QTableWidgetItem(other) {}; + MiqtVirtualQTableWidgetItem(int typeVal): QTableWidgetItem(typeVal) {}; + MiqtVirtualQTableWidgetItem(const QString& text, int typeVal): QTableWidgetItem(text, typeVal) {}; + MiqtVirtualQTableWidgetItem(const QIcon& icon, const QString& text, int typeVal): QTableWidgetItem(icon, text, typeVal) {}; + + virtual ~MiqtVirtualQTableWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTableWidgetItem* clone() const override { + if (handle__Clone == 0) { + return QTableWidgetItem::clone(); + } + + + QTableWidgetItem* callback_return_value = miqt_exec_callback_QTableWidgetItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTableWidgetItem* virtualbase_Clone() const { + + return QTableWidgetItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int role) const override { + if (handle__Data == 0) { + return QTableWidgetItem::data(role); + } + + int sigval1 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTableWidgetItem_Data(const_cast(this), handle__Data, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int role) const { + + return new QVariant(QTableWidgetItem::data(static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(int role, const QVariant& value) override { + if (handle__SetData == 0) { + QTableWidgetItem::setData(role, value); + return; + } + + int sigval1 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QTableWidgetItem_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(int role, QVariant* value) { + + QTableWidgetItem::setData(static_cast(role), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QTableWidgetItem& other) const override { + if (handle__OperatorLesser == 0) { + return QTableWidgetItem::operator<(other); + } + + const QTableWidgetItem& other_ret = other; + // Cast returned reference into pointer + QTableWidgetItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QTableWidgetItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QTableWidgetItem* other) const { + + return QTableWidgetItem::operator<(*other); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QTableWidgetItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QTableWidgetItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QTableWidgetItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QTableWidgetItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QTableWidgetItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QTableWidgetItem::write(*out); + + } + +}; + +void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem) { + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text) { +void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(text_QString); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text) { +void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(*icon, text_QString); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other) { - return new QTableWidgetItem(*other); +void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem) { + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*other); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new5(int typeVal) { - return new QTableWidgetItem(static_cast(typeVal)); +void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(static_cast(typeVal)); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal) { +void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(text_QString, static_cast(typeVal)); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString, static_cast(typeVal)); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal) { +void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(*icon, text_QString, static_cast(typeVal)); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString, static_cast(typeVal)); + *outptr_QTableWidgetItem = ret; } QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self) { @@ -294,24 +486,874 @@ int QTableWidgetItem_Type(const QTableWidgetItem* self) { return self->type(); } -void QTableWidgetItem_Delete(QTableWidgetItem* self) { - delete self; +void QTableWidgetItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Clone = slot; +} + +QTableWidgetItem* QTableWidgetItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Clone(); +} + +void QTableWidgetItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Data = slot; +} + +QVariant* QTableWidgetItem_virtualbase_Data(const void* self, int role) { + return ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Data(role); +} + +void QTableWidgetItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__SetData = slot; +} + +void QTableWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value) { + ( (MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_SetData(role, value); +} + +void QTableWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__OperatorLesser = slot; +} + +bool QTableWidgetItem_virtualbase_OperatorLesser(const void* self, QTableWidgetItem* other) { + return ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_OperatorLesser(other); } -QTableWidget* QTableWidget_new(QWidget* parent) { - return new QTableWidget(parent); +void QTableWidgetItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Read = slot; } -QTableWidget* QTableWidget_new2() { - return new QTableWidget(); +void QTableWidgetItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Read(in); } -QTableWidget* QTableWidget_new3(int rows, int columns) { - return new QTableWidget(static_cast(rows), static_cast(columns)); +void QTableWidgetItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Write = slot; } -QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent) { - return new QTableWidget(static_cast(rows), static_cast(columns), parent); +void QTableWidgetItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Write(out); +} + +void QTableWidgetItem_Delete(QTableWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQTableWidget : public virtual QTableWidget { +public: + + MiqtVirtualQTableWidget(QWidget* parent): QTableWidget(parent) {}; + MiqtVirtualQTableWidget(): QTableWidget() {}; + MiqtVirtualQTableWidget(int rows, int columns): QTableWidget(rows, columns) {}; + MiqtVirtualQTableWidget(int rows, int columns, QWidget* parent): QTableWidget(rows, columns, parent) {}; + + virtual ~MiqtVirtualQTableWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTableWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTableWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTableWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QTableWidget::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QTableWidget_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QTableWidget::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QList items) const override { + if (handle__MimeData == 0) { + return QTableWidget::mimeData(items); + } + + const QList items_ret = items; + // Convert QList<> from C++ memory to manually-managed C memory + QTableWidgetItem** items_arr = static_cast(malloc(sizeof(QTableWidgetItem*) * items_ret.length())); + for (size_t i = 0, e = items_ret.length(); i < e; ++i) { + items_arr[i] = items_ret[i]; + } + struct miqt_array items_out; + items_out.len = items_ret.length(); + items_out.data = static_cast(items_arr); + struct miqt_array /* of QTableWidgetItem* */ sigval1 = items_out; + + QMimeData* callback_return_value = miqt_exec_callback_QTableWidget_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QTableWidgetItem* */ items) const { + QList items_QList; + items_QList.reserve(items.len); + QTableWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + + return QTableWidget::mimeData(items_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(int row, int column, const QMimeData* data, Qt::DropAction action) override { + if (handle__DropMimeData == 0) { + return QTableWidget::dropMimeData(row, column, data, action); + } + + int sigval1 = row; + int sigval2 = column; + QMimeData* sigval3 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval4 = static_cast(action_ret); + + bool callback_return_value = miqt_exec_callback_QTableWidget_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(int row, int column, QMimeData* data, int action) { + + return QTableWidget::dropMimeData(static_cast(row), static_cast(column), data, static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QTableWidget::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QTableWidget_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QTableWidget::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTableWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTableWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTableWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTableWidget::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTableWidget_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTableWidget::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTableWidget::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTableWidget_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTableWidget::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTableWidget::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTableWidget_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTableWidget::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTableWidget::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTableWidget_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTableWidget::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTableWidget::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTableWidget_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTableWidget::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTableWidget::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableWidget_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTableWidget::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTableWidget::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTableWidget_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTableWidget::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QTableWidget::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QTableWidget_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QTableWidget::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTableWidget::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTableWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTableWidget::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTableWidget::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTableWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTableWidget::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTableWidget::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableWidget_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTableWidget::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTableWidget::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableWidget_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTableWidget::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTableWidget::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableWidget_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTableWidget::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTableWidget::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTableWidget_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTableWidget::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTableWidget::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTableWidget_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTableWidget::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTableWidget::updateGeometries(); + return; + } + + + miqt_exec_callback_QTableWidget_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTableWidget::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTableWidget::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTableWidget_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTableWidget::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QTableWidget::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QTableWidget_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QTableWidget::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTableWidget::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTableWidget_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTableWidget::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QTableWidget::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableWidget_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QTableWidget::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTableWidget::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableWidget_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTableWidget::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTableWidget::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTableWidget_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTableWidget::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTableWidget::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTableWidget_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTableWidget::currentChanged(*current, *previous); + + } + +}; + +void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(parent); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns)); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns), parent); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTableWidget_MetaObject(const QTableWidget* self) { @@ -607,7 +1649,7 @@ void QTableWidget_ItemPressed(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemPressed(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemPressed), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemPressed), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemPressed(slot, sigval1); }); @@ -618,7 +1660,7 @@ void QTableWidget_ItemClicked(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemClicked), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemClicked), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemClicked(slot, sigval1); }); @@ -629,7 +1671,7 @@ void QTableWidget_ItemDoubleClicked(QTableWidget* self, QTableWidgetItem* item) } void QTableWidget_connect_ItemDoubleClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemDoubleClicked), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemDoubleClicked), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemDoubleClicked(slot, sigval1); }); @@ -640,7 +1682,7 @@ void QTableWidget_ItemActivated(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemActivated(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemActivated), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemActivated), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemActivated(slot, sigval1); }); @@ -651,7 +1693,7 @@ void QTableWidget_ItemEntered(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemEntered(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemEntered), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemEntered), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemEntered(slot, sigval1); }); @@ -662,7 +1704,7 @@ void QTableWidget_ItemChanged(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemChanged), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemChanged), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemChanged(slot, sigval1); }); @@ -673,7 +1715,7 @@ void QTableWidget_CurrentItemChanged(QTableWidget* self, QTableWidgetItem* curre } void QTableWidget_connect_CurrentItemChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::currentItemChanged), self, [=](QTableWidgetItem* current, QTableWidgetItem* previous) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::currentItemChanged), self, [=](QTableWidgetItem* current, QTableWidgetItem* previous) { QTableWidgetItem* sigval1 = current; QTableWidgetItem* sigval2 = previous; miqt_exec_callback_QTableWidget_CurrentItemChanged(slot, sigval1, sigval2); @@ -685,7 +1727,7 @@ void QTableWidget_ItemSelectionChanged(QTableWidget* self) { } void QTableWidget_connect_ItemSelectionChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemSelectionChanged), self, [=]() { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemSelectionChanged), self, [=]() { miqt_exec_callback_QTableWidget_ItemSelectionChanged(slot); }); } @@ -695,7 +1737,7 @@ void QTableWidget_CellPressed(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellPressed(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellPressed), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellPressed), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellPressed(slot, sigval1, sigval2); @@ -707,7 +1749,7 @@ void QTableWidget_CellClicked(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellClicked), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellClicked), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellClicked(slot, sigval1, sigval2); @@ -719,7 +1761,7 @@ void QTableWidget_CellDoubleClicked(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellDoubleClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellDoubleClicked), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellDoubleClicked), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellDoubleClicked(slot, sigval1, sigval2); @@ -731,7 +1773,7 @@ void QTableWidget_CellActivated(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellActivated(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellActivated), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellActivated), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellActivated(slot, sigval1, sigval2); @@ -743,7 +1785,7 @@ void QTableWidget_CellEntered(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellEntered(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellEntered), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellEntered), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellEntered(slot, sigval1, sigval2); @@ -755,7 +1797,7 @@ void QTableWidget_CellChanged(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellChanged), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellChanged), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellChanged(slot, sigval1, sigval2); @@ -767,7 +1809,7 @@ void QTableWidget_CurrentCellChanged(QTableWidget* self, int currentRow, int cur } void QTableWidget_connect_CurrentCellChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::currentCellChanged), self, [=](int currentRow, int currentColumn, int previousRow, int previousColumn) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::currentCellChanged), self, [=](int currentRow, int currentColumn, int previousRow, int previousColumn) { int sigval1 = currentRow; int sigval2 = currentColumn; int sigval3 = previousRow; @@ -828,7 +1870,243 @@ void QTableWidget_ScrollToItem2(QTableWidget* self, QTableWidgetItem* item, int self->scrollToItem(item, static_cast(hint)); } -void QTableWidget_Delete(QTableWidget* self) { - delete self; +void QTableWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__Event = slot; +} + +bool QTableWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_Event(e); +} + +void QTableWidget_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QTableWidget_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_MimeTypes(); +} + +void QTableWidget_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__MimeData = slot; +} + +QMimeData* QTableWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTableWidgetItem* */ items) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_MimeData(items); +} + +void QTableWidget_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__DropMimeData = slot; +} + +bool QTableWidget_virtualbase_DropMimeData(void* self, int row, int column, QMimeData* data, int action) { + return ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_DropMimeData(row, column, data, action); +} + +void QTableWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SupportedDropActions = slot; +} + +int QTableWidget_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SupportedDropActions(); +} + +void QTableWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__DropEvent = slot; +} + +void QTableWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QTableWidget_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SetRootIndex = slot; +} + +void QTableWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTableWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SetSelectionModel = slot; +} + +void QTableWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTableWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__DoItemsLayout = slot; +} + +void QTableWidget_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTableWidget_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VisualRect = slot; +} + +QRect* QTableWidget_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_VisualRect(index); +} + +void QTableWidget_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ScrollTo = slot; +} + +void QTableWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTableWidget_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTableWidget_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_IndexAt(p); +} + +void QTableWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTableWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTableWidget_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QTableWidget_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_ViewOptions(); +} + +void QTableWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__PaintEvent = slot; +} + +void QTableWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_PaintEvent(e); +} + +void QTableWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__TimerEvent = slot; +} + +void QTableWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_TimerEvent(event); +} + +void QTableWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__HorizontalOffset = slot; +} + +int QTableWidget_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_HorizontalOffset(); +} + +void QTableWidget_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VerticalOffset = slot; +} + +int QTableWidget_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_VerticalOffset(); +} + +void QTableWidget_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QTableWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QTableWidget_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SetSelection = slot; +} + +void QTableWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QTableWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QTableWidget_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SelectedIndexes(); +} + +void QTableWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__UpdateGeometries = slot; +} + +void QTableWidget_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_UpdateGeometries(); +} + +void QTableWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTableWidget_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTableWidget_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SizeHintForRow = slot; +} + +int QTableWidget_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QTableWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SizeHintForColumn = slot; +} + +int QTableWidget_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QTableWidget_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QTableWidget_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QTableWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QTableWidget_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QTableWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__IsIndexHidden = slot; +} + +bool QTableWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QTableWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__CurrentChanged = slot; +} + +void QTableWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QTableWidget_Delete(QTableWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtablewidget.go b/qt/gen_qtablewidget.go index a545afe5..ca86f1d3 100644 --- a/qt/gen_qtablewidget.go +++ b/qt/gen_qtablewidget.go @@ -22,7 +22,8 @@ const ( ) type QTableWidgetSelectionRange struct { - h *C.QTableWidgetSelectionRange + h *C.QTableWidgetSelectionRange + isSubclass bool } func (this *QTableWidgetSelectionRange) cPointer() *C.QTableWidgetSelectionRange { @@ -39,6 +40,7 @@ func (this *QTableWidgetSelectionRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTableWidgetSelectionRange constructs the type using only CGO pointers. func newQTableWidgetSelectionRange(h *C.QTableWidgetSelectionRange) *QTableWidgetSelectionRange { if h == nil { return nil @@ -46,26 +48,43 @@ func newQTableWidgetSelectionRange(h *C.QTableWidgetSelectionRange) *QTableWidge return &QTableWidgetSelectionRange{h: h} } +// UnsafeNewQTableWidgetSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetSelectionRange(h unsafe.Pointer) *QTableWidgetSelectionRange { - return newQTableWidgetSelectionRange((*C.QTableWidgetSelectionRange)(h)) + if h == nil { + return nil + } + + return &QTableWidgetSelectionRange{h: (*C.QTableWidgetSelectionRange)(h)} } // NewQTableWidgetSelectionRange constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange() *QTableWidgetSelectionRange { - ret := C.QTableWidgetSelectionRange_new() - return newQTableWidgetSelectionRange(ret) + var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil + + C.QTableWidgetSelectionRange_new(&outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret.isSubclass = true + return ret } // NewQTableWidgetSelectionRange2 constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange2(top int, left int, bottom int, right int) *QTableWidgetSelectionRange { - ret := C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right)) - return newQTableWidgetSelectionRange(ret) + var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil + + C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right), &outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret.isSubclass = true + return ret } // NewQTableWidgetSelectionRange3 constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange3(other *QTableWidgetSelectionRange) *QTableWidgetSelectionRange { - ret := C.QTableWidgetSelectionRange_new3(other.cPointer()) - return newQTableWidgetSelectionRange(ret) + var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil + + C.QTableWidgetSelectionRange_new3(other.cPointer(), &outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret.isSubclass = true + return ret } func (this *QTableWidgetSelectionRange) OperatorAssign(other *QTableWidgetSelectionRange) { @@ -98,7 +117,7 @@ func (this *QTableWidgetSelectionRange) ColumnCount() int { // Delete this object from C++ memory. func (this *QTableWidgetSelectionRange) Delete() { - C.QTableWidgetSelectionRange_Delete(this.h) + C.QTableWidgetSelectionRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -111,7 +130,8 @@ func (this *QTableWidgetSelectionRange) GoGC() { } type QTableWidgetItem struct { - h *C.QTableWidgetItem + h *C.QTableWidgetItem + isSubclass bool } func (this *QTableWidgetItem) cPointer() *C.QTableWidgetItem { @@ -128,6 +148,7 @@ func (this *QTableWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTableWidgetItem constructs the type using only CGO pointers. func newQTableWidgetItem(h *C.QTableWidgetItem) *QTableWidgetItem { if h == nil { return nil @@ -135,14 +156,23 @@ func newQTableWidgetItem(h *C.QTableWidgetItem) *QTableWidgetItem { return &QTableWidgetItem{h: h} } +// UnsafeNewQTableWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetItem(h unsafe.Pointer) *QTableWidgetItem { - return newQTableWidgetItem((*C.QTableWidgetItem)(h)) + if h == nil { + return nil + } + + return &QTableWidgetItem{h: (*C.QTableWidgetItem)(h)} } // NewQTableWidgetItem constructs a new QTableWidgetItem object. func NewQTableWidgetItem() *QTableWidgetItem { - ret := C.QTableWidgetItem_new() - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new(&outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem2 constructs a new QTableWidgetItem object. @@ -151,8 +181,12 @@ func NewQTableWidgetItem2(text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new2(text_ms) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new2(text_ms, &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem3 constructs a new QTableWidgetItem object. @@ -161,20 +195,32 @@ func NewQTableWidgetItem3(icon *QIcon, text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new3(icon.cPointer(), text_ms) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem4 constructs a new QTableWidgetItem object. func NewQTableWidgetItem4(other *QTableWidgetItem) *QTableWidgetItem { - ret := C.QTableWidgetItem_new4(other.cPointer()) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new4(other.cPointer(), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem5 constructs a new QTableWidgetItem object. func NewQTableWidgetItem5(typeVal int) *QTableWidgetItem { - ret := C.QTableWidgetItem_new5((C.int)(typeVal)) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new5((C.int)(typeVal), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem6 constructs a new QTableWidgetItem object. @@ -183,8 +229,12 @@ func NewQTableWidgetItem6(text string, typeVal int) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal)) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem7 constructs a new QTableWidgetItem object. @@ -193,8 +243,12 @@ func NewQTableWidgetItem7(icon *QIcon, text string, typeVal int) *QTableWidgetIt text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal)) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } func (this *QTableWidgetItem) Clone() *QTableWidgetItem { @@ -202,7 +256,7 @@ func (this *QTableWidgetItem) Clone() *QTableWidgetItem { } func (this *QTableWidgetItem) TableWidget() *QTableWidget { - return UnsafeNewQTableWidget(unsafe.Pointer(C.QTableWidgetItem_TableWidget(this.h))) + return UnsafeNewQTableWidget(unsafe.Pointer(C.QTableWidgetItem_TableWidget(this.h)), nil, nil, nil, nil, nil, nil, nil) } func (this *QTableWidgetItem) Row() int { @@ -413,9 +467,154 @@ func (this *QTableWidgetItem) Type() int { return (int)(C.QTableWidgetItem_Type(this.h)) } +func (this *QTableWidgetItem) callVirtualBase_Clone() *QTableWidgetItem { + + return UnsafeNewQTableWidgetItem(unsafe.Pointer(C.QTableWidgetItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QTableWidgetItem) OnClone(slot func(super func() *QTableWidgetItem) *QTableWidgetItem) { + C.QTableWidgetItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Clone +func miqt_exec_callback_QTableWidgetItem_Clone(self *C.QTableWidgetItem, cb C.intptr_t) *C.QTableWidgetItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTableWidgetItem) *QTableWidgetItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidgetItem) callVirtualBase_Data(role int) *QVariant { + + _ret := C.QTableWidgetItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidgetItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) { + C.QTableWidgetItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Data +func miqt_exec_callback_QTableWidgetItem_Data(self *C.QTableWidgetItem, cb C.intptr_t, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + virtualReturn := gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Data, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidgetItem) callVirtualBase_SetData(role int, value *QVariant) { + + C.QTableWidgetItem_virtualbase_SetData(unsafe.Pointer(this.h), (C.int)(role), value.cPointer()) + +} +func (this *QTableWidgetItem) OnSetData(slot func(super func(role int, value *QVariant), role int, value *QVariant)) { + C.QTableWidgetItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_SetData +func miqt_exec_callback_QTableWidgetItem_SetData(self *C.QTableWidgetItem, cb C.intptr_t, role C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int, value *QVariant), role int, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QTableWidgetItem{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QTableWidgetItem) callVirtualBase_OperatorLesser(other *QTableWidgetItem) bool { + + return (bool)(C.QTableWidgetItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QTableWidgetItem) OnOperatorLesser(slot func(super func(other *QTableWidgetItem) bool, other *QTableWidgetItem) bool) { + C.QTableWidgetItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_OperatorLesser +func miqt_exec_callback_QTableWidgetItem_OperatorLesser(self *C.QTableWidgetItem, cb C.intptr_t, other *C.QTableWidgetItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QTableWidgetItem) bool, other *QTableWidgetItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTableWidgetItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QTableWidgetItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidgetItem) callVirtualBase_Read(in *QDataStream) { + + C.QTableWidgetItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QTableWidgetItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QTableWidgetItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Read +func miqt_exec_callback_QTableWidgetItem_Read(self *C.QTableWidgetItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in)) + + gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QTableWidgetItem) callVirtualBase_Write(out *QDataStream) { + + C.QTableWidgetItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QTableWidgetItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QTableWidgetItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Write +func miqt_exec_callback_QTableWidgetItem_Write(self *C.QTableWidgetItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out)) + + gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Write, slotval1) + +} + // Delete this object from C++ memory. func (this *QTableWidgetItem) Delete() { - C.QTableWidgetItem_Delete(this.h) + C.QTableWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -428,7 +627,8 @@ func (this *QTableWidgetItem) GoGC() { } type QTableWidget struct { - h *C.QTableWidget + h *C.QTableWidget + isSubclass bool *QTableView } @@ -446,39 +646,91 @@ func (this *QTableWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTableWidget(h *C.QTableWidget) *QTableWidget { +// newQTableWidget constructs the type using only CGO pointers. +func newQTableWidget(h *C.QTableWidget, h_QTableView *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableWidget { if h == nil { return nil } - return &QTableWidget{h: h, QTableView: UnsafeNewQTableView(unsafe.Pointer(h))} + return &QTableWidget{h: h, + QTableView: newQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTableWidget(h unsafe.Pointer) *QTableWidget { - return newQTableWidget((*C.QTableWidget)(h)) +// UnsafeNewQTableWidget constructs the type using only unsafe pointers. +func UnsafeNewQTableWidget(h unsafe.Pointer, h_QTableView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableWidget { + if h == nil { + return nil + } + + return &QTableWidget{h: (*C.QTableWidget)(h), + QTableView: UnsafeNewQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTableWidget constructs a new QTableWidget object. func NewQTableWidget(parent *QWidget) *QTableWidget { - ret := C.QTableWidget_new(parent.cPointer()) - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new(parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableWidget2 constructs a new QTableWidget object. func NewQTableWidget2() *QTableWidget { - ret := C.QTableWidget_new2() - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new2(&outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableWidget3 constructs a new QTableWidget object. func NewQTableWidget3(rows int, columns int) *QTableWidget { - ret := C.QTableWidget_new3((C.int)(rows), (C.int)(columns)) - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new3((C.int)(rows), (C.int)(columns), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableWidget4 constructs a new QTableWidget object. func NewQTableWidget4(rows int, columns int, parent *QWidget) *QTableWidget { - ret := C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer()) - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTableWidget) MetaObject() *QMetaObject { @@ -654,7 +906,7 @@ func (this *QTableWidget) IsPersistentEditorOpen(item *QTableWidgetItem) bool { } func (this *QTableWidget) CellWidget(row int, column int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column))), nil, nil) } func (this *QTableWidget) SetCellWidget(row int, column int, widget *QWidget) { @@ -1141,9 +1393,753 @@ func (this *QTableWidget) ScrollToItem2(item *QTableWidgetItem, hint QAbstractIt C.QTableWidget_ScrollToItem2(this.h, item.cPointer(), (C.int)(hint)) } +func (this *QTableWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTableWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTableWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTableWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_Event +func miqt_exec_callback_QTableWidget_Event(self *C.QTableWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QTableWidget_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QTableWidget) OnMimeTypes(slot func(super func() []string) []string) { + C.QTableWidget_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_MimeTypes +func miqt_exec_callback_QTableWidget_MimeTypes(self *C.QTableWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTableWidget) callVirtualBase_MimeData(items []*QTableWidgetItem) *QMimeData { + items_CArray := (*[0xffff]*C.QTableWidgetItem)(C.malloc(C.size_t(8 * len(items)))) + defer C.free(unsafe.Pointer(items_CArray)) + for i := range items { + items_CArray[i] = items[i].cPointer() + } + items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTableWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)), nil) +} +func (this *QTableWidget) OnMimeData(slot func(super func(items []*QTableWidgetItem) *QMimeData, items []*QTableWidgetItem) *QMimeData) { + C.QTableWidget_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_MimeData +func miqt_exec_callback_QTableWidget_MimeData(self *C.QTableWidget, cb C.intptr_t, items C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(items []*QTableWidgetItem) *QMimeData, items []*QTableWidgetItem) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var items_ma C.struct_miqt_array = items + items_ret := make([]*QTableWidgetItem, int(items_ma.len)) + items_outCast := (*[0xffff]*C.QTableWidgetItem)(unsafe.Pointer(items_ma.data)) // hey ya + for i := 0; i < int(items_ma.len); i++ { + items_ret[i] = UnsafeNewQTableWidgetItem(unsafe.Pointer(items_outCast[i])) + } + slotval1 := items_ret + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_DropMimeData(row int, column int, data *QMimeData, action DropAction) bool { + + return (bool)(C.QTableWidget_virtualbase_DropMimeData(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), data.cPointer(), (C.int)(action))) + +} +func (this *QTableWidget) OnDropMimeData(slot func(super func(row int, column int, data *QMimeData, action DropAction) bool, row int, column int, data *QMimeData, action DropAction) bool) { + C.QTableWidget_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_DropMimeData +func miqt_exec_callback_QTableWidget_DropMimeData(self *C.QTableWidget, cb C.intptr_t, row C.int, column C.int, data *C.QMimeData, action C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, data *QMimeData, action DropAction) bool, row int, column int, data *QMimeData, action DropAction) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval4 := (DropAction)(action) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QTableWidget_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QTableWidget) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QTableWidget_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SupportedDropActions +func miqt_exec_callback_QTableWidget_SupportedDropActions(self *C.QTableWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTableWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTableWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_DropEvent +func miqt_exec_callback_QTableWidget_DropEvent(self *C.QTableWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTableWidget_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTableWidget) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTableWidget_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SetRootIndex +func miqt_exec_callback_QTableWidget_SetRootIndex(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTableWidget_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTableWidget) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTableWidget_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SetSelectionModel +func miqt_exec_callback_QTableWidget_SetSelectionModel(self *C.QTableWidget, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_DoItemsLayout() { + + C.QTableWidget_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTableWidget) OnDoItemsLayout(slot func(super func())) { + C.QTableWidget_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_DoItemsLayout +func miqt_exec_callback_QTableWidget_DoItemsLayout(self *C.QTableWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableWidget{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTableWidget) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTableWidget_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTableWidget_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VisualRect +func miqt_exec_callback_QTableWidget_VisualRect(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTableWidget_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTableWidget) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTableWidget_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ScrollTo +func miqt_exec_callback_QTableWidget_ScrollTo(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTableWidget{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTableWidget) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTableWidget_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTableWidget_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_IndexAt +func miqt_exec_callback_QTableWidget_IndexAt(self *C.QTableWidget, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTableWidget_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTableWidget) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTableWidget_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ScrollContentsBy +func miqt_exec_callback_QTableWidget_ScrollContentsBy(self *C.QTableWidget, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTableWidget{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTableWidget) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QTableWidget_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QTableWidget_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ViewOptions +func miqt_exec_callback_QTableWidget_ViewOptions(self *C.QTableWidget, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTableWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTableWidget) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTableWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_PaintEvent +func miqt_exec_callback_QTableWidget_PaintEvent(self *C.QTableWidget, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTableWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableWidget) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTableWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_TimerEvent +func miqt_exec_callback_QTableWidget_TimerEvent(self *C.QTableWidget, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTableWidget_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableWidget) OnHorizontalOffset(slot func(super func() int) int) { + C.QTableWidget_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_HorizontalOffset +func miqt_exec_callback_QTableWidget_HorizontalOffset(self *C.QTableWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTableWidget_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableWidget) OnVerticalOffset(slot func(super func() int) int) { + C.QTableWidget_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VerticalOffset +func miqt_exec_callback_QTableWidget_VerticalOffset(self *C.QTableWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTableWidget_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTableWidget_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_MoveCursor +func miqt_exec_callback_QTableWidget_MoveCursor(self *C.QTableWidget, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTableWidget_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTableWidget) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTableWidget_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SetSelection +func miqt_exec_callback_QTableWidget_SetSelection(self *C.QTableWidget, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTableWidget) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTableWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTableWidget) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTableWidget_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SelectedIndexes +func miqt_exec_callback_QTableWidget_SelectedIndexes(self *C.QTableWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTableWidget) callVirtualBase_UpdateGeometries() { + + C.QTableWidget_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTableWidget) OnUpdateGeometries(slot func(super func())) { + C.QTableWidget_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_UpdateGeometries +func miqt_exec_callback_QTableWidget_UpdateGeometries(self *C.QTableWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableWidget{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTableWidget) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTableWidget_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTableWidget_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ViewportSizeHint +func miqt_exec_callback_QTableWidget_ViewportSizeHint(self *C.QTableWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QTableWidget_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QTableWidget) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QTableWidget_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SizeHintForRow +func miqt_exec_callback_QTableWidget_SizeHintForRow(self *C.QTableWidget, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTableWidget_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTableWidget) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTableWidget_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SizeHintForColumn +func miqt_exec_callback_QTableWidget_SizeHintForColumn(self *C.QTableWidget, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QTableWidget_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableWidget) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableWidget_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VerticalScrollbarAction +func miqt_exec_callback_QTableWidget_VerticalScrollbarAction(self *C.QTableWidget, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableWidget{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTableWidget_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableWidget) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableWidget_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_HorizontalScrollbarAction +func miqt_exec_callback_QTableWidget_HorizontalScrollbarAction(self *C.QTableWidget, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableWidget{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTableWidget_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTableWidget) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTableWidget_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_IsIndexHidden +func miqt_exec_callback_QTableWidget_IsIndexHidden(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTableWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTableWidget) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTableWidget_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_CurrentChanged +func miqt_exec_callback_QTableWidget_CurrentChanged(self *C.QTableWidget, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTableWidget{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QTableWidget) Delete() { - C.QTableWidget_Delete(this.h) + C.QTableWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtablewidget.h b/qt/gen_qtablewidget.h index ee7b4681..eada69a5 100644 --- a/qt/gen_qtablewidget.h +++ b/qt/gen_qtablewidget.h @@ -15,40 +15,68 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; class QBrush; class QColor; class QDataStream; +class QDropEvent; +class QEvent; class QFont; +class QFrame; class QIcon; +class QItemSelectionModel; class QMetaObject; +class QMimeData; +class QModelIndex; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; class QSize; +class QStyleOptionViewItem; +class QTableView; class QTableWidget; class QTableWidgetItem; class QTableWidgetSelectionRange; +class QTimerEvent; class QVariant; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QDataStream QDataStream; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTableView QTableView; typedef struct QTableWidget QTableWidget; typedef struct QTableWidgetItem QTableWidgetItem; typedef struct QTableWidgetSelectionRange QTableWidgetSelectionRange; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new(); -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right); -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other); +void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); +void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); +void QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); void QTableWidgetSelectionRange_OperatorAssign(QTableWidgetSelectionRange* self, QTableWidgetSelectionRange* other); int QTableWidgetSelectionRange_TopRow(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_BottomRow(const QTableWidgetSelectionRange* self); @@ -56,15 +84,15 @@ int QTableWidgetSelectionRange_LeftColumn(const QTableWidgetSelectionRange* self int QTableWidgetSelectionRange_RightColumn(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_RowCount(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_ColumnCount(const QTableWidgetSelectionRange* self); -void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self); +void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self, bool isSubclass); -QTableWidgetItem* QTableWidgetItem_new(); -QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text); -QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text); -QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other); -QTableWidgetItem* QTableWidgetItem_new5(int typeVal); -QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal); -QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal); +void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self); QTableWidget* QTableWidgetItem_TableWidget(const QTableWidgetItem* self); int QTableWidgetItem_Row(const QTableWidgetItem* self); @@ -106,12 +134,24 @@ void QTableWidgetItem_Read(QTableWidgetItem* self, QDataStream* in); void QTableWidgetItem_Write(const QTableWidgetItem* self, QDataStream* out); void QTableWidgetItem_OperatorAssign(QTableWidgetItem* self, QTableWidgetItem* other); int QTableWidgetItem_Type(const QTableWidgetItem* self); -void QTableWidgetItem_Delete(QTableWidgetItem* self); +void QTableWidgetItem_override_virtual_Clone(void* self, intptr_t slot); +QTableWidgetItem* QTableWidgetItem_virtualbase_Clone(const void* self); +void QTableWidgetItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QTableWidgetItem_virtualbase_Data(const void* self, int role); +void QTableWidgetItem_override_virtual_SetData(void* self, intptr_t slot); +void QTableWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value); +void QTableWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QTableWidgetItem_virtualbase_OperatorLesser(const void* self, QTableWidgetItem* other); +void QTableWidgetItem_override_virtual_Read(void* self, intptr_t slot); +void QTableWidgetItem_virtualbase_Read(void* self, QDataStream* in); +void QTableWidgetItem_override_virtual_Write(void* self, intptr_t slot); +void QTableWidgetItem_virtualbase_Write(const void* self, QDataStream* out); +void QTableWidgetItem_Delete(QTableWidgetItem* self, bool isSubclass); -QTableWidget* QTableWidget_new(QWidget* parent); -QTableWidget* QTableWidget_new2(); -QTableWidget* QTableWidget_new3(int rows, int columns); -QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent); +void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTableWidget_MetaObject(const QTableWidget* self); void* QTableWidget_Metacast(QTableWidget* self, const char* param1); struct miqt_string QTableWidget_Tr(const char* s); @@ -200,13 +240,77 @@ void QTableWidget_CellChanged(QTableWidget* self, int row, int column); void QTableWidget_connect_CellChanged(QTableWidget* self, intptr_t slot); void QTableWidget_CurrentCellChanged(QTableWidget* self, int currentRow, int currentColumn, int previousRow, int previousColumn); void QTableWidget_connect_CurrentCellChanged(QTableWidget* self, intptr_t slot); +bool QTableWidget_Event(QTableWidget* self, QEvent* e); +struct miqt_array /* of struct miqt_string */ QTableWidget_MimeTypes(const QTableWidget* self); +QMimeData* QTableWidget_MimeData(const QTableWidget* self, struct miqt_array /* of QTableWidgetItem* */ items); +bool QTableWidget_DropMimeData(QTableWidget* self, int row, int column, QMimeData* data, int action); +int QTableWidget_SupportedDropActions(const QTableWidget* self); +void QTableWidget_DropEvent(QTableWidget* self, QDropEvent* event); struct miqt_string QTableWidget_Tr2(const char* s, const char* c); struct miqt_string QTableWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QTableWidget_TrUtf82(const char* s, const char* c); struct miqt_string QTableWidget_TrUtf83(const char* s, const char* c, int n); void QTableWidget_SortItems2(QTableWidget* self, int column, int order); void QTableWidget_ScrollToItem2(QTableWidget* self, QTableWidgetItem* item, int hint); -void QTableWidget_Delete(QTableWidget* self); +void QTableWidget_override_virtual_Event(void* self, intptr_t slot); +bool QTableWidget_virtualbase_Event(void* self, QEvent* e); +void QTableWidget_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QTableWidget_virtualbase_MimeTypes(const void* self); +void QTableWidget_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QTableWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTableWidgetItem* */ items); +void QTableWidget_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QTableWidget_virtualbase_DropMimeData(void* self, int row, int column, QMimeData* data, int action); +void QTableWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QTableWidget_virtualbase_SupportedDropActions(const void* self); +void QTableWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QTableWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTableWidget_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTableWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTableWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTableWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTableWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTableWidget_virtualbase_DoItemsLayout(void* self); +void QTableWidget_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTableWidget_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTableWidget_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTableWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTableWidget_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTableWidget_virtualbase_IndexAt(const void* self, QPoint* p); +void QTableWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTableWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTableWidget_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QTableWidget_virtualbase_ViewOptions(const void* self); +void QTableWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTableWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTableWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTableWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTableWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTableWidget_virtualbase_HorizontalOffset(const void* self); +void QTableWidget_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTableWidget_virtualbase_VerticalOffset(const void* self); +void QTableWidget_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTableWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTableWidget_override_virtual_SetSelection(void* self, intptr_t slot); +void QTableWidget_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTableWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTableWidget_virtualbase_SelectedIndexes(const void* self); +void QTableWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTableWidget_virtualbase_UpdateGeometries(void* self); +void QTableWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTableWidget_virtualbase_ViewportSizeHint(const void* self); +void QTableWidget_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QTableWidget_virtualbase_SizeHintForRow(const void* self, int row); +void QTableWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTableWidget_virtualbase_SizeHintForColumn(const void* self, int column); +void QTableWidget_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QTableWidget_virtualbase_VerticalScrollbarAction(void* self, int action); +void QTableWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTableWidget_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTableWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTableWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTableWidget_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTableWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTableWidget_Delete(QTableWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtabwidget.cpp b/qt/gen_qtabwidget.cpp index 4bba58bf..8eb16d68 100644 --- a/qt/gen_qtabwidget.cpp +++ b/qt/gen_qtabwidget.cpp @@ -1,22 +1,1089 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qtabwidget.h" #include "_cgo_export.h" -QTabWidget* QTabWidget_new(QWidget* parent) { - return new QTabWidget(parent); +class MiqtVirtualQTabWidget : public virtual QTabWidget { +public: + + MiqtVirtualQTabWidget(QWidget* parent): QTabWidget(parent) {}; + MiqtVirtualQTabWidget(): QTabWidget() {}; + + virtual ~MiqtVirtualQTabWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTabWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTabWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QTabWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QTabWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QTabWidget::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QTabWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QTabWidget::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QTabWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QTabWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QTabWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void tabInserted(int index) override { + if (handle__TabInserted == 0) { + QTabWidget::tabInserted(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabWidget_TabInserted(this, handle__TabInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabInserted(int index) { + + QTabWidget::tabInserted(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void tabRemoved(int index) override { + if (handle__TabRemoved == 0) { + QTabWidget::tabRemoved(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabWidget_TabRemoved(this, handle__TabRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabRemoved(int index) { + + QTabWidget::tabRemoved(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTabWidget::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTabWidget::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QTabWidget::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QTabWidget::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QTabWidget::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QTabWidget::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QTabWidget::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QTabWidget::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QTabWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QTabWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QTabWidget::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QTabWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QTabWidget::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QTabWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QTabWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QTabWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QTabWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QTabWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QTabWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QTabWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QTabWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QTabWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTabWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTabWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTabWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTabWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTabWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTabWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTabWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTabWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QTabWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QTabWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QTabWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QTabWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTabWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTabWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTabWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTabWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QTabWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QTabWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QTabWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QTabWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QTabWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QTabWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QTabWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QTabWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QTabWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QTabWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QTabWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QTabWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QTabWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QTabWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTabWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTabWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTabWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTabWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTabWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTabWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTabWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTabWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QTabWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QTabWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QTabWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QTabWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QTabWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QTabWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QTabWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QTabWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QTabWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QTabWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QTabWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QTabWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QTabWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QTabWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QTabWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QTabWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QTabWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTabWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTabWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QTabWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTabWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QTabWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTabWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTabWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTabWidget::focusNextPrevChild(next); + + } + +}; + +void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(parent); + *outptr_QTabWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTabWidget* QTabWidget_new2() { - return new QTabWidget(); +void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(); + *outptr_QTabWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTabWidget_MetaObject(const QTabWidget* self) { @@ -285,7 +1352,7 @@ void QTabWidget_CurrentChanged(QTabWidget* self, int index) { } void QTabWidget_connect_CurrentChanged(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::currentChanged), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_CurrentChanged(slot, sigval1); }); @@ -296,7 +1363,7 @@ void QTabWidget_TabCloseRequested(QTabWidget* self, int index) { } void QTabWidget_connect_TabCloseRequested(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::tabCloseRequested), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::tabCloseRequested), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_TabCloseRequested(slot, sigval1); }); @@ -307,7 +1374,7 @@ void QTabWidget_TabBarClicked(QTabWidget* self, int index) { } void QTabWidget_connect_TabBarClicked(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::tabBarClicked), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::tabBarClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_TabBarClicked(slot, sigval1); }); @@ -318,7 +1385,7 @@ void QTabWidget_TabBarDoubleClicked(QTabWidget* self, int index) { } void QTabWidget_connect_TabBarDoubleClicked(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::tabBarDoubleClicked), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::tabBarDoubleClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_TabBarDoubleClicked(slot, sigval1); }); @@ -376,7 +1443,355 @@ QWidget* QTabWidget_CornerWidget1(const QTabWidget* self, int corner) { return self->cornerWidget(static_cast(corner)); } -void QTabWidget_Delete(QTabWidget* self) { - delete self; +void QTabWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QTabWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_SizeHint(); +} + +void QTabWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QTabWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QTabWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QTabWidget_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_HeightForWidth(width); +} + +void QTabWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QTabWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QTabWidget_override_virtual_TabInserted(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__TabInserted = slot; +} + +void QTabWidget_virtualbase_TabInserted(void* self, int index) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_TabInserted(index); +} + +void QTabWidget_override_virtual_TabRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__TabRemoved = slot; +} + +void QTabWidget_virtualbase_TabRemoved(void* self, int index) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_TabRemoved(index); +} + +void QTabWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ShowEvent = slot; +} + +void QTabWidget_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTabWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QTabWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QTabWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QTabWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QTabWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__PaintEvent = slot; +} + +void QTabWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_PaintEvent(param1); +} + +void QTabWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QTabWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QTabWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__Event = slot; +} + +bool QTabWidget_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_Event(param1); +} + +void QTabWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DevType = slot; +} + +int QTabWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_DevType(); +} + +void QTabWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__SetVisible = slot; +} + +void QTabWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QTabWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QTabWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QTabWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QTabWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTabWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTabWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QTabWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTabWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTabWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTabWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QTabWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__WheelEvent = slot; +} + +void QTabWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QTabWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTabWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QTabWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QTabWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTabWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QTabWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTabWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__EnterEvent = slot; +} + +void QTabWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QTabWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QTabWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QTabWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MoveEvent = slot; +} + +void QTabWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QTabWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__CloseEvent = slot; +} + +void QTabWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QTabWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTabWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QTabWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__TabletEvent = slot; +} + +void QTabWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QTabWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ActionEvent = slot; +} + +void QTabWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QTabWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QTabWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTabWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QTabWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTabWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTabWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTabWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DropEvent = slot; +} + +void QTabWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QTabWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__HideEvent = slot; +} + +void QTabWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QTabWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QTabWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QTabWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__Metric = slot; +} + +int QTabWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_Metric(param1); +} + +void QTabWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InitPainter = slot; +} + +void QTabWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QTabWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QTabWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QTabWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QTabWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QTabWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QTabWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTabWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTabWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QTabWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTabWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTabWidget_Delete(QTabWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtabwidget.go b/qt/gen_qtabwidget.go index feec7333..ad42d868 100644 --- a/qt/gen_qtabwidget.go +++ b/qt/gen_qtabwidget.go @@ -31,7 +31,8 @@ const ( ) type QTabWidget struct { - h *C.QTabWidget + h *C.QTabWidget + isSubclass bool *QWidget } @@ -49,27 +50,49 @@ func (this *QTabWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTabWidget(h *C.QTabWidget) *QTabWidget { +// newQTabWidget constructs the type using only CGO pointers. +func newQTabWidget(h *C.QTabWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabWidget { if h == nil { return nil } - return &QTabWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QTabWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTabWidget(h unsafe.Pointer) *QTabWidget { - return newQTabWidget((*C.QTabWidget)(h)) +// UnsafeNewQTabWidget constructs the type using only unsafe pointers. +func UnsafeNewQTabWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabWidget { + if h == nil { + return nil + } + + return &QTabWidget{h: (*C.QTabWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTabWidget constructs a new QTabWidget object. func NewQTabWidget(parent *QWidget) *QTabWidget { - ret := C.QTabWidget_new(parent.cPointer()) - return newQTabWidget(ret) + var outptr_QTabWidget *C.QTabWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabWidget_new(parent.cPointer(), &outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTabWidget2 constructs a new QTabWidget object. func NewQTabWidget2() *QTabWidget { - ret := C.QTabWidget_new2() - return newQTabWidget(ret) + var outptr_QTabWidget *C.QTabWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabWidget_new2(&outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTabWidget) MetaObject() *QMetaObject { @@ -213,11 +236,11 @@ func (this *QTabWidget) CurrentIndex() int { } func (this *QTabWidget) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CurrentWidget(this.h)), nil, nil) } func (this *QTabWidget) Widget(index int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_Widget(this.h, (C.int)(index)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_Widget(this.h, (C.int)(index))), nil, nil) } func (this *QTabWidget) IndexOf(widget *QWidget) int { @@ -287,7 +310,7 @@ func (this *QTabWidget) SetCornerWidget(w *QWidget) { } func (this *QTabWidget) CornerWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget(this.h)), nil, nil) } func (this *QTabWidget) ElideMode() TextElideMode { @@ -338,7 +361,7 @@ func (this *QTabWidget) Clear() { } func (this *QTabWidget) TabBar() *QTabBar { - return UnsafeNewQTabBar(unsafe.Pointer(C.QTabWidget_TabBar(this.h))) + return UnsafeNewQTabBar(unsafe.Pointer(C.QTabWidget_TabBar(this.h)), nil, nil, nil) } func (this *QTabWidget) SetCurrentIndex(index int) { @@ -478,12 +501,1024 @@ func (this *QTabWidget) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QTabWidget) CornerWidget1(corner Corner) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner))), nil, nil) +} + +func (this *QTabWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTabWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_SizeHint +func miqt_exec_callback_QTabWidget_SizeHint(self *C.QTabWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QTabWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MinimumSizeHint +func miqt_exec_callback_QTabWidget_MinimumSizeHint(self *C.QTabWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QTabWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QTabWidget) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QTabWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_HeightForWidth +func miqt_exec_callback_QTabWidget_HeightForWidth(self *C.QTabWidget, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QTabWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QTabWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QTabWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_HasHeightForWidth +func miqt_exec_callback_QTabWidget_HasHeightForWidth(self *C.QTabWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_TabInserted(index int) { + + C.QTabWidget_virtualbase_TabInserted(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabWidget) OnTabInserted(slot func(super func(index int), index int)) { + C.QTabWidget_override_virtual_TabInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_TabInserted +func miqt_exec_callback_QTabWidget_TabInserted(self *C.QTabWidget, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabWidget{h: self}).callVirtualBase_TabInserted, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_TabRemoved(index int) { + + C.QTabWidget_virtualbase_TabRemoved(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabWidget) OnTabRemoved(slot func(super func(index int), index int)) { + C.QTabWidget_override_virtual_TabRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_TabRemoved +func miqt_exec_callback_QTabWidget_TabRemoved(self *C.QTabWidget, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabWidget{h: self}).callVirtualBase_TabRemoved, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTabWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTabWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ShowEvent +func miqt_exec_callback_QTabWidget_ShowEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QTabWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QTabWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ResizeEvent +func miqt_exec_callback_QTabWidget_ResizeEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QTabWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QTabWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_KeyPressEvent +func miqt_exec_callback_QTabWidget_KeyPressEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QTabWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QTabWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_PaintEvent +func miqt_exec_callback_QTabWidget_PaintEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QTabWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QTabWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ChangeEvent +func miqt_exec_callback_QTabWidget_ChangeEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QTabWidget_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QTabWidget) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QTabWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_Event +func miqt_exec_callback_QTabWidget_Event(self *C.QTabWidget, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_DevType() int { + + return (int)(C.QTabWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QTabWidget) OnDevType(slot func(super func() int) int) { + C.QTabWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DevType +func miqt_exec_callback_QTabWidget_DevType(self *C.QTabWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_SetVisible(visible bool) { + + C.QTabWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QTabWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QTabWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_SetVisible +func miqt_exec_callback_QTabWidget_SetVisible(self *C.QTabWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QTabWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QTabWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QTabWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QTabWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_PaintEngine +func miqt_exec_callback_QTabWidget_PaintEngine(self *C.QTabWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MousePressEvent +func miqt_exec_callback_QTabWidget_MousePressEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MouseReleaseEvent +func miqt_exec_callback_QTabWidget_MouseReleaseEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MouseDoubleClickEvent +func miqt_exec_callback_QTabWidget_MouseDoubleClickEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MouseMoveEvent +func miqt_exec_callback_QTabWidget_MouseMoveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QTabWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QTabWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_WheelEvent +func miqt_exec_callback_QTabWidget_WheelEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QTabWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTabWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_KeyReleaseEvent +func miqt_exec_callback_QTabWidget_KeyReleaseEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTabWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_FocusInEvent +func miqt_exec_callback_QTabWidget_FocusInEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTabWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_FocusOutEvent +func miqt_exec_callback_QTabWidget_FocusOutEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_EnterEvent(event *QEvent) { + + C.QTabWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTabWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_EnterEvent +func miqt_exec_callback_QTabWidget_EnterEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QTabWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTabWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_LeaveEvent +func miqt_exec_callback_QTabWidget_LeaveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QTabWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QTabWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MoveEvent +func miqt_exec_callback_QTabWidget_MoveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QTabWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QTabWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_CloseEvent +func miqt_exec_callback_QTabWidget_CloseEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QTabWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QTabWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ContextMenuEvent +func miqt_exec_callback_QTabWidget_ContextMenuEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QTabWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QTabWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_TabletEvent +func miqt_exec_callback_QTabWidget_TabletEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QTabWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QTabWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ActionEvent +func miqt_exec_callback_QTabWidget_ActionEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTabWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTabWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DragEnterEvent +func miqt_exec_callback_QTabWidget_DragEnterEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTabWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTabWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DragMoveEvent +func miqt_exec_callback_QTabWidget_DragMoveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTabWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTabWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DragLeaveEvent +func miqt_exec_callback_QTabWidget_DragLeaveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTabWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTabWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DropEvent +func miqt_exec_callback_QTabWidget_DropEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QTabWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QTabWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_HideEvent +func miqt_exec_callback_QTabWidget_HideEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QTabWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QTabWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QTabWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_NativeEvent +func miqt_exec_callback_QTabWidget_NativeEvent(self *C.QTabWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QTabWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QTabWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QTabWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_Metric +func miqt_exec_callback_QTabWidget_Metric(self *C.QTabWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QTabWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QTabWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QTabWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InitPainter +func miqt_exec_callback_QTabWidget_InitPainter(self *C.QTabWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QTabWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QTabWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QTabWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_Redirected +func miqt_exec_callback_QTabWidget_Redirected(self *C.QTabWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QTabWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QTabWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QTabWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_SharedPainter +func miqt_exec_callback_QTabWidget_SharedPainter(self *C.QTabWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTabWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTabWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InputMethodEvent +func miqt_exec_callback_QTabWidget_InputMethodEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QTabWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QTabWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InputMethodQuery +func miqt_exec_callback_QTabWidget_InputMethodQuery(self *C.QTabWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTabWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTabWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTabWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_FocusNextPrevChild +func miqt_exec_callback_QTabWidget_FocusNextPrevChild(self *C.QTabWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QTabWidget) Delete() { - C.QTabWidget_Delete(this.h) + C.QTabWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtabwidget.h b/qt/gen_qtabwidget.h index 57a37f6b..4b901afa 100644 --- a/qt/gen_qtabwidget.h +++ b/qt/gen_qtabwidget.h @@ -15,23 +15,75 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QTabBar; class QTabWidget; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QTabBar QTabBar; typedef struct QTabWidget QTabWidget; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTabWidget* QTabWidget_new(QWidget* parent); -QTabWidget* QTabWidget_new2(); +void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTabWidget_MetaObject(const QTabWidget* self); void* QTabWidget_Metacast(QTabWidget* self, const char* param1); struct miqt_string QTabWidget_Tr(const char* s); @@ -94,13 +146,107 @@ void QTabWidget_TabBarClicked(QTabWidget* self, int index); void QTabWidget_connect_TabBarClicked(QTabWidget* self, intptr_t slot); void QTabWidget_TabBarDoubleClicked(QTabWidget* self, int index); void QTabWidget_connect_TabBarDoubleClicked(QTabWidget* self, intptr_t slot); +void QTabWidget_TabInserted(QTabWidget* self, int index); +void QTabWidget_TabRemoved(QTabWidget* self, int index); +void QTabWidget_ShowEvent(QTabWidget* self, QShowEvent* param1); +void QTabWidget_ResizeEvent(QTabWidget* self, QResizeEvent* param1); +void QTabWidget_KeyPressEvent(QTabWidget* self, QKeyEvent* param1); +void QTabWidget_PaintEvent(QTabWidget* self, QPaintEvent* param1); +void QTabWidget_ChangeEvent(QTabWidget* self, QEvent* param1); +bool QTabWidget_Event(QTabWidget* self, QEvent* param1); struct miqt_string QTabWidget_Tr2(const char* s, const char* c); struct miqt_string QTabWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QTabWidget_TrUtf82(const char* s, const char* c); struct miqt_string QTabWidget_TrUtf83(const char* s, const char* c, int n); void QTabWidget_SetCornerWidget2(QTabWidget* self, QWidget* w, int corner); QWidget* QTabWidget_CornerWidget1(const QTabWidget* self, int corner); -void QTabWidget_Delete(QTabWidget* self); +void QTabWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTabWidget_virtualbase_SizeHint(const void* self); +void QTabWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QTabWidget_virtualbase_MinimumSizeHint(const void* self); +void QTabWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QTabWidget_virtualbase_HeightForWidth(const void* self, int width); +void QTabWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QTabWidget_virtualbase_HasHeightForWidth(const void* self); +void QTabWidget_override_virtual_TabInserted(void* self, intptr_t slot); +void QTabWidget_virtualbase_TabInserted(void* self, int index); +void QTabWidget_override_virtual_TabRemoved(void* self, intptr_t slot); +void QTabWidget_virtualbase_TabRemoved(void* self, int index); +void QTabWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTabWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QTabWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QTabWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QTabWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QTabWidget_override_virtual_Event(void* self, intptr_t slot); +bool QTabWidget_virtualbase_Event(void* self, QEvent* param1); +void QTabWidget_override_virtual_DevType(void* self, intptr_t slot); +int QTabWidget_virtualbase_DevType(const void* self); +void QTabWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QTabWidget_virtualbase_SetVisible(void* self, bool visible); +void QTabWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QTabWidget_virtualbase_PaintEngine(const void* self); +void QTabWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QTabWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QTabWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTabWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTabWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QTabWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QTabWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QTabWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QTabWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QTabWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QTabWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QTabWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTabWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTabWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTabWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTabWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QTabWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QTabWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QTabWidget_override_virtual_Metric(void* self, intptr_t slot); +int QTabWidget_virtualbase_Metric(const void* self, int param1); +void QTabWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QTabWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QTabWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QTabWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QTabWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QTabWidget_virtualbase_SharedPainter(const void* self); +void QTabWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTabWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTabWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QTabWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTabWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTabWidget_Delete(QTabWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtemporarydir.cpp b/qt/gen_qtemporarydir.cpp index c845933e..4963253c 100644 --- a/qt/gen_qtemporarydir.cpp +++ b/qt/gen_qtemporarydir.cpp @@ -6,13 +6,15 @@ #include "gen_qtemporarydir.h" #include "_cgo_export.h" -QTemporaryDir* QTemporaryDir_new() { - return new QTemporaryDir(); +void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir) { + QTemporaryDir* ret = new QTemporaryDir(); + *outptr_QTemporaryDir = ret; } -QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName) { +void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - return new QTemporaryDir(templateName_QString); + QTemporaryDir* ret = new QTemporaryDir(templateName_QString); + *outptr_QTemporaryDir = ret; } bool QTemporaryDir_IsValid(const QTemporaryDir* self) { @@ -65,7 +67,11 @@ struct miqt_string QTemporaryDir_FilePath(const QTemporaryDir* self, struct miqt return _ms; } -void QTemporaryDir_Delete(QTemporaryDir* self) { - delete self; +void QTemporaryDir_Delete(QTemporaryDir* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtemporarydir.go b/qt/gen_qtemporarydir.go index a8fb977a..9ef62e65 100644 --- a/qt/gen_qtemporarydir.go +++ b/qt/gen_qtemporarydir.go @@ -14,7 +14,8 @@ import ( ) type QTemporaryDir struct { - h *C.QTemporaryDir + h *C.QTemporaryDir + isSubclass bool } func (this *QTemporaryDir) cPointer() *C.QTemporaryDir { @@ -31,6 +32,7 @@ func (this *QTemporaryDir) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTemporaryDir constructs the type using only CGO pointers. func newQTemporaryDir(h *C.QTemporaryDir) *QTemporaryDir { if h == nil { return nil @@ -38,14 +40,23 @@ func newQTemporaryDir(h *C.QTemporaryDir) *QTemporaryDir { return &QTemporaryDir{h: h} } +// UnsafeNewQTemporaryDir constructs the type using only unsafe pointers. func UnsafeNewQTemporaryDir(h unsafe.Pointer) *QTemporaryDir { - return newQTemporaryDir((*C.QTemporaryDir)(h)) + if h == nil { + return nil + } + + return &QTemporaryDir{h: (*C.QTemporaryDir)(h)} } // NewQTemporaryDir constructs a new QTemporaryDir object. func NewQTemporaryDir() *QTemporaryDir { - ret := C.QTemporaryDir_new() - return newQTemporaryDir(ret) + var outptr_QTemporaryDir *C.QTemporaryDir = nil + + C.QTemporaryDir_new(&outptr_QTemporaryDir) + ret := newQTemporaryDir(outptr_QTemporaryDir) + ret.isSubclass = true + return ret } // NewQTemporaryDir2 constructs a new QTemporaryDir object. @@ -54,8 +65,12 @@ func NewQTemporaryDir2(templateName string) *QTemporaryDir { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - ret := C.QTemporaryDir_new2(templateName_ms) - return newQTemporaryDir(ret) + var outptr_QTemporaryDir *C.QTemporaryDir = nil + + C.QTemporaryDir_new2(templateName_ms, &outptr_QTemporaryDir) + ret := newQTemporaryDir(outptr_QTemporaryDir) + ret.isSubclass = true + return ret } func (this *QTemporaryDir) IsValid() bool { @@ -101,7 +116,7 @@ func (this *QTemporaryDir) FilePath(fileName string) string { // Delete this object from C++ memory. func (this *QTemporaryDir) Delete() { - C.QTemporaryDir_Delete(this.h) + C.QTemporaryDir_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtemporarydir.h b/qt/gen_qtemporarydir.h index 30d5f889..3a774358 100644 --- a/qt/gen_qtemporarydir.h +++ b/qt/gen_qtemporarydir.h @@ -20,8 +20,8 @@ class QTemporaryDir; typedef struct QTemporaryDir QTemporaryDir; #endif -QTemporaryDir* QTemporaryDir_new(); -QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName); +void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir); +void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir); bool QTemporaryDir_IsValid(const QTemporaryDir* self); struct miqt_string QTemporaryDir_ErrorString(const QTemporaryDir* self); bool QTemporaryDir_AutoRemove(const QTemporaryDir* self); @@ -29,7 +29,7 @@ void QTemporaryDir_SetAutoRemove(QTemporaryDir* self, bool b); bool QTemporaryDir_Remove(QTemporaryDir* self); struct miqt_string QTemporaryDir_Path(const QTemporaryDir* self); struct miqt_string QTemporaryDir_FilePath(const QTemporaryDir* self, struct miqt_string fileName); -void QTemporaryDir_Delete(QTemporaryDir* self); +void QTemporaryDir_Delete(QTemporaryDir* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtemporaryfile.cpp b/qt/gen_qtemporaryfile.cpp index 2d377f02..afa0f61c 100644 --- a/qt/gen_qtemporaryfile.cpp +++ b/qt/gen_qtemporaryfile.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -9,22 +11,202 @@ #include "gen_qtemporaryfile.h" #include "_cgo_export.h" -QTemporaryFile* QTemporaryFile_new() { - return new QTemporaryFile(); +class MiqtVirtualQTemporaryFile : public virtual QTemporaryFile { +public: + + MiqtVirtualQTemporaryFile(): QTemporaryFile() {}; + MiqtVirtualQTemporaryFile(const QString& templateName): QTemporaryFile(templateName) {}; + MiqtVirtualQTemporaryFile(QObject* parent): QTemporaryFile(parent) {}; + MiqtVirtualQTemporaryFile(const QString& templateName, QObject* parent): QTemporaryFile(templateName, parent) {}; + + virtual ~MiqtVirtualQTemporaryFile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FileName = 0; + + // Subclass to allow providing a Go implementation + virtual QString fileName() const override { + if (handle__FileName == 0) { + return QTemporaryFile::fileName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QTemporaryFile_FileName(const_cast(this), handle__FileName); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FileName() const { + + QString _ret = QTemporaryFile::fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpenWithFlags = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode flags) override { + if (handle__OpenWithFlags == 0) { + return QTemporaryFile::open(flags); + } + + QIODevice::OpenMode flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QTemporaryFile_OpenWithFlags(this, handle__OpenWithFlags, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OpenWithFlags(int flags) { + + return QTemporaryFile::open(static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QTemporaryFile::size(); + } + + + long long callback_return_value = miqt_exec_callback_QTemporaryFile_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QTemporaryFile::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resize = 0; + + // Subclass to allow providing a Go implementation + virtual bool resize(qint64 sz) override { + if (handle__Resize == 0) { + return QTemporaryFile::resize(sz); + } + + qint64 sz_ret = sz; + long long sigval1 = static_cast(sz_ret); + + bool callback_return_value = miqt_exec_callback_QTemporaryFile_Resize(this, handle__Resize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Resize(long long sz) { + + return QTemporaryFile::resize(static_cast(sz)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Permissions = 0; + + // Subclass to allow providing a Go implementation + virtual QFileDevice::Permissions permissions() const override { + if (handle__Permissions == 0) { + return QTemporaryFile::permissions(); + } + + + int callback_return_value = miqt_exec_callback_QTemporaryFile_Permissions(const_cast(this), handle__Permissions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Permissions() const { + + QFileDevice::Permissions _ret = QTemporaryFile::permissions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPermissions = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPermissions(QFileDevice::Permissions permissionSpec) override { + if (handle__SetPermissions == 0) { + return QTemporaryFile::setPermissions(permissionSpec); + } + + QFileDevice::Permissions permissionSpec_ret = permissionSpec; + int sigval1 = static_cast(permissionSpec_ret); + + bool callback_return_value = miqt_exec_callback_QTemporaryFile_SetPermissions(this, handle__SetPermissions, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPermissions(int permissionSpec) { + + return QTemporaryFile::setPermissions(static_cast(permissionSpec)); + + } + +}; + +void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName) { +void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - return new QTemporaryFile(templateName_QString); + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTemporaryFile* QTemporaryFile_new3(QObject* parent) { - return new QTemporaryFile(parent); +void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(parent); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent) { +void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - return new QTemporaryFile(templateName_QString, parent); + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString, parent); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self) { @@ -163,7 +345,59 @@ struct miqt_string QTemporaryFile_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTemporaryFile_Delete(QTemporaryFile* self) { - delete self; +void QTemporaryFile_override_virtual_FileName(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__FileName = slot; +} + +struct miqt_string QTemporaryFile_virtualbase_FileName(const void* self) { + return ( (const MiqtVirtualQTemporaryFile*)(self) )->virtualbase_FileName(); +} + +void QTemporaryFile_override_virtual_OpenWithFlags(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__OpenWithFlags = slot; +} + +bool QTemporaryFile_virtualbase_OpenWithFlags(void* self, int flags) { + return ( (MiqtVirtualQTemporaryFile*)(self) )->virtualbase_OpenWithFlags(flags); +} + +void QTemporaryFile_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__Size = slot; +} + +long long QTemporaryFile_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQTemporaryFile*)(self) )->virtualbase_Size(); +} + +void QTemporaryFile_override_virtual_Resize(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__Resize = slot; +} + +bool QTemporaryFile_virtualbase_Resize(void* self, long long sz) { + return ( (MiqtVirtualQTemporaryFile*)(self) )->virtualbase_Resize(sz); +} + +void QTemporaryFile_override_virtual_Permissions(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__Permissions = slot; +} + +int QTemporaryFile_virtualbase_Permissions(const void* self) { + return ( (const MiqtVirtualQTemporaryFile*)(self) )->virtualbase_Permissions(); +} + +void QTemporaryFile_override_virtual_SetPermissions(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__SetPermissions = slot; +} + +bool QTemporaryFile_virtualbase_SetPermissions(void* self, int permissionSpec) { + return ( (MiqtVirtualQTemporaryFile*)(self) )->virtualbase_SetPermissions(permissionSpec); +} + +void QTemporaryFile_Delete(QTemporaryFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtemporaryfile.go b/qt/gen_qtemporaryfile.go index d4b8e2f5..0efdb6d5 100644 --- a/qt/gen_qtemporaryfile.go +++ b/qt/gen_qtemporaryfile.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTemporaryFile struct { - h *C.QTemporaryFile + h *C.QTemporaryFile + isSubclass bool *QFile } @@ -32,21 +34,37 @@ func (this *QTemporaryFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTemporaryFile(h *C.QTemporaryFile) *QTemporaryFile { +// newQTemporaryFile constructs the type using only CGO pointers. +func newQTemporaryFile(h *C.QTemporaryFile, h_QFile *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QTemporaryFile { if h == nil { return nil } - return &QTemporaryFile{h: h, QFile: UnsafeNewQFile(unsafe.Pointer(h))} + return &QTemporaryFile{h: h, + QFile: newQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject)} } -func UnsafeNewQTemporaryFile(h unsafe.Pointer) *QTemporaryFile { - return newQTemporaryFile((*C.QTemporaryFile)(h)) +// UnsafeNewQTemporaryFile constructs the type using only unsafe pointers. +func UnsafeNewQTemporaryFile(h unsafe.Pointer, h_QFile unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QTemporaryFile { + if h == nil { + return nil + } + + return &QTemporaryFile{h: (*C.QTemporaryFile)(h), + QFile: UnsafeNewQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject)} } // NewQTemporaryFile constructs a new QTemporaryFile object. func NewQTemporaryFile() *QTemporaryFile { - ret := C.QTemporaryFile_new() - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QTemporaryFile_new(&outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTemporaryFile2 constructs a new QTemporaryFile object. @@ -55,14 +73,30 @@ func NewQTemporaryFile2(templateName string) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - ret := C.QTemporaryFile_new2(templateName_ms) - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QTemporaryFile_new2(templateName_ms, &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTemporaryFile3 constructs a new QTemporaryFile object. func NewQTemporaryFile3(parent *QObject) *QTemporaryFile { - ret := C.QTemporaryFile_new3(parent.cPointer()) - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QTemporaryFile_new3(parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTemporaryFile4 constructs a new QTemporaryFile object. @@ -71,8 +105,16 @@ func NewQTemporaryFile4(templateName string, parent *QObject) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - ret := C.QTemporaryFile_new4(templateName_ms, parent.cPointer()) - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QTemporaryFile_new4(templateName_ms, parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTemporaryFile) MetaObject() *QMetaObject { @@ -150,11 +192,11 @@ func QTemporaryFile_CreateLocalFile(fileName string) *QTemporaryFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateLocalFile(fileName_ms))) + return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateLocalFile(fileName_ms)), nil, nil, nil, nil) } func QTemporaryFile_CreateLocalFileWithFile(file *QFile) *QTemporaryFile { - return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateLocalFileWithFile(file.cPointer()))) + return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateLocalFileWithFile(file.cPointer())), nil, nil, nil, nil) } func QTemporaryFile_CreateNativeFile(fileName string) *QTemporaryFile { @@ -162,11 +204,11 @@ func QTemporaryFile_CreateNativeFile(fileName string) *QTemporaryFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFile(fileName_ms))) + return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFile(fileName_ms)), nil, nil, nil, nil) } func QTemporaryFile_CreateNativeFileWithFile(file *QFile) *QTemporaryFile { - return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer()))) + return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer())), nil, nil, nil, nil) } func QTemporaryFile_Tr2(s string, c string) string { @@ -213,9 +255,156 @@ func QTemporaryFile_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTemporaryFile) callVirtualBase_FileName() string { + + var _ms C.struct_miqt_string = C.QTemporaryFile_virtualbase_FileName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QTemporaryFile) OnFileName(slot func(super func() string) string) { + C.QTemporaryFile_override_virtual_FileName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_FileName +func miqt_exec_callback_QTemporaryFile_FileName(self *C.QTemporaryFile, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_FileName) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QTemporaryFile) callVirtualBase_OpenWithFlags(flags QIODevice__OpenModeFlag) bool { + + return (bool)(C.QTemporaryFile_virtualbase_OpenWithFlags(unsafe.Pointer(this.h), (C.int)(flags))) + +} +func (this *QTemporaryFile) OnOpenWithFlags(slot func(super func(flags QIODevice__OpenModeFlag) bool, flags QIODevice__OpenModeFlag) bool) { + C.QTemporaryFile_override_virtual_OpenWithFlags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_OpenWithFlags +func miqt_exec_callback_QTemporaryFile_OpenWithFlags(self *C.QTemporaryFile, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QIODevice__OpenModeFlag) bool, flags QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODevice__OpenModeFlag)(flags) + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_OpenWithFlags, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_Size() int64 { + + return (int64)(C.QTemporaryFile_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QTemporaryFile) OnSize(slot func(super func() int64) int64) { + C.QTemporaryFile_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_Size +func miqt_exec_callback_QTemporaryFile_Size(self *C.QTemporaryFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_Resize(sz int64) bool { + + return (bool)(C.QTemporaryFile_virtualbase_Resize(unsafe.Pointer(this.h), (C.longlong)(sz))) + +} +func (this *QTemporaryFile) OnResize(slot func(super func(sz int64) bool, sz int64) bool) { + C.QTemporaryFile_override_virtual_Resize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_Resize +func miqt_exec_callback_QTemporaryFile_Resize(self *C.QTemporaryFile, cb C.intptr_t, sz C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sz int64) bool, sz int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(sz) + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_Resize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_Permissions() QFileDevice__Permission { + + return (QFileDevice__Permission)(C.QTemporaryFile_virtualbase_Permissions(unsafe.Pointer(this.h))) + +} +func (this *QTemporaryFile) OnPermissions(slot func(super func() QFileDevice__Permission) QFileDevice__Permission) { + C.QTemporaryFile_override_virtual_Permissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_Permissions +func miqt_exec_callback_QTemporaryFile_Permissions(self *C.QTemporaryFile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QFileDevice__Permission) QFileDevice__Permission) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_Permissions) + + return (C.int)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_SetPermissions(permissionSpec QFileDevice__Permission) bool { + + return (bool)(C.QTemporaryFile_virtualbase_SetPermissions(unsafe.Pointer(this.h), (C.int)(permissionSpec))) + +} +func (this *QTemporaryFile) OnSetPermissions(slot func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) { + C.QTemporaryFile_override_virtual_SetPermissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_SetPermissions +func miqt_exec_callback_QTemporaryFile_SetPermissions(self *C.QTemporaryFile, cb C.intptr_t, permissionSpec C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileDevice__Permission)(permissionSpec) + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_SetPermissions, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTemporaryFile) Delete() { - C.QTemporaryFile_Delete(this.h) + C.QTemporaryFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtemporaryfile.h b/qt/gen_qtemporaryfile.h index 94045b96..9d79a731 100644 --- a/qt/gen_qtemporaryfile.h +++ b/qt/gen_qtemporaryfile.h @@ -16,20 +16,24 @@ extern "C" { #ifdef __cplusplus class QFile; +class QFileDevice; +class QIODevice; class QMetaObject; class QObject; class QTemporaryFile; #else typedef struct QFile QFile; +typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTemporaryFile QTemporaryFile; #endif -QTemporaryFile* QTemporaryFile_new(); -QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName); -QTemporaryFile* QTemporaryFile_new3(QObject* parent); -QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent); +void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self); void* QTemporaryFile_Metacast(QTemporaryFile* self, const char* param1); struct miqt_string QTemporaryFile_Tr(const char* s); @@ -45,11 +49,24 @@ QTemporaryFile* QTemporaryFile_CreateLocalFile(struct miqt_string fileName); QTemporaryFile* QTemporaryFile_CreateLocalFileWithFile(QFile* file); QTemporaryFile* QTemporaryFile_CreateNativeFile(struct miqt_string fileName); QTemporaryFile* QTemporaryFile_CreateNativeFileWithFile(QFile* file); +bool QTemporaryFile_OpenWithFlags(QTemporaryFile* self, int flags); struct miqt_string QTemporaryFile_Tr2(const char* s, const char* c); struct miqt_string QTemporaryFile_Tr3(const char* s, const char* c, int n); struct miqt_string QTemporaryFile_TrUtf82(const char* s, const char* c); struct miqt_string QTemporaryFile_TrUtf83(const char* s, const char* c, int n); -void QTemporaryFile_Delete(QTemporaryFile* self); +void QTemporaryFile_override_virtual_FileName(void* self, intptr_t slot); +struct miqt_string QTemporaryFile_virtualbase_FileName(const void* self); +void QTemporaryFile_override_virtual_OpenWithFlags(void* self, intptr_t slot); +bool QTemporaryFile_virtualbase_OpenWithFlags(void* self, int flags); +void QTemporaryFile_override_virtual_Size(void* self, intptr_t slot); +long long QTemporaryFile_virtualbase_Size(const void* self); +void QTemporaryFile_override_virtual_Resize(void* self, intptr_t slot); +bool QTemporaryFile_virtualbase_Resize(void* self, long long sz); +void QTemporaryFile_override_virtual_Permissions(void* self, intptr_t slot); +int QTemporaryFile_virtualbase_Permissions(const void* self); +void QTemporaryFile_override_virtual_SetPermissions(void* self, intptr_t slot); +bool QTemporaryFile_virtualbase_SetPermissions(void* self, int permissionSpec); +void QTemporaryFile_Delete(QTemporaryFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextboundaryfinder.cpp b/qt/gen_qtextboundaryfinder.cpp index cdaeacbf..396cf94e 100644 --- a/qt/gen_qtextboundaryfinder.cpp +++ b/qt/gen_qtextboundaryfinder.cpp @@ -7,29 +7,35 @@ #include "gen_qtextboundaryfinder.h" #include "_cgo_export.h" -QTextBoundaryFinder* QTextBoundaryFinder_new() { - return new QTextBoundaryFinder(); +void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other) { - return new QTextBoundaryFinder(*other); +void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(*other); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal) { +void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - return new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length) { - return new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length)); +void QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length)); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer) { - return new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer)); +void QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer)); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize) { - return new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer), static_cast(bufferSize)); +void QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer), static_cast(bufferSize)); + *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other) { @@ -89,7 +95,11 @@ int QTextBoundaryFinder_BoundaryReasons(const QTextBoundaryFinder* self) { return static_cast(_ret); } -void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self) { - delete self; +void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextboundaryfinder.go b/qt/gen_qtextboundaryfinder.go index 081f5410..4b69aff8 100644 --- a/qt/gen_qtextboundaryfinder.go +++ b/qt/gen_qtextboundaryfinder.go @@ -34,7 +34,8 @@ const ( ) type QTextBoundaryFinder struct { - h *C.QTextBoundaryFinder + h *C.QTextBoundaryFinder + isSubclass bool } func (this *QTextBoundaryFinder) cPointer() *C.QTextBoundaryFinder { @@ -51,6 +52,7 @@ func (this *QTextBoundaryFinder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBoundaryFinder constructs the type using only CGO pointers. func newQTextBoundaryFinder(h *C.QTextBoundaryFinder) *QTextBoundaryFinder { if h == nil { return nil @@ -58,20 +60,33 @@ func newQTextBoundaryFinder(h *C.QTextBoundaryFinder) *QTextBoundaryFinder { return &QTextBoundaryFinder{h: h} } +// UnsafeNewQTextBoundaryFinder constructs the type using only unsafe pointers. func UnsafeNewQTextBoundaryFinder(h unsafe.Pointer) *QTextBoundaryFinder { - return newQTextBoundaryFinder((*C.QTextBoundaryFinder)(h)) + if h == nil { + return nil + } + + return &QTextBoundaryFinder{h: (*C.QTextBoundaryFinder)(h)} } // NewQTextBoundaryFinder constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder() *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new() - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new(&outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder2 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder2(other *QTextBoundaryFinder) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new2(other.cPointer()) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new2(other.cPointer(), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder3 constructs a new QTextBoundaryFinder object. @@ -80,26 +95,42 @@ func NewQTextBoundaryFinder3(typeVal QTextBoundaryFinder__BoundaryType, stringVa stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - ret := C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms, &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder4 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder4(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.int)(length)) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.int)(length), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder5 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder5(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int, buffer *byte) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer))) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder6 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder6(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int, buffer *byte, bufferSize int) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.int)(bufferSize)) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.int)(bufferSize), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } func (this *QTextBoundaryFinder) OperatorAssign(other *QTextBoundaryFinder) { @@ -155,7 +186,7 @@ func (this *QTextBoundaryFinder) BoundaryReasons() QTextBoundaryFinder__Boundary // Delete this object from C++ memory. func (this *QTextBoundaryFinder) Delete() { - C.QTextBoundaryFinder_Delete(this.h) + C.QTextBoundaryFinder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextboundaryfinder.h b/qt/gen_qtextboundaryfinder.h index c0b5b38f..a889c58d 100644 --- a/qt/gen_qtextboundaryfinder.h +++ b/qt/gen_qtextboundaryfinder.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QTextBoundaryFinder QTextBoundaryFinder; #endif -QTextBoundaryFinder* QTextBoundaryFinder_new(); -QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other); -QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal); -QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length); -QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer); -QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize); +void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder); void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other); bool QTextBoundaryFinder_IsValid(const QTextBoundaryFinder* self); int QTextBoundaryFinder_Type(const QTextBoundaryFinder* self); @@ -40,7 +40,7 @@ int QTextBoundaryFinder_ToNextBoundary(QTextBoundaryFinder* self); int QTextBoundaryFinder_ToPreviousBoundary(QTextBoundaryFinder* self); bool QTextBoundaryFinder_IsAtBoundary(const QTextBoundaryFinder* self); int QTextBoundaryFinder_BoundaryReasons(const QTextBoundaryFinder* self); -void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self); +void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextbrowser.cpp b/qt/gen_qtextbrowser.cpp index e0578246..8d9d236b 100644 --- a/qt/gen_qtextbrowser.cpp +++ b/qt/gen_qtextbrowser.cpp @@ -1,22 +1,882 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include +#include #include #include #include "gen_qtextbrowser.h" #include "_cgo_export.h" -QTextBrowser* QTextBrowser_new(QWidget* parent) { - return new QTextBrowser(parent); +class MiqtVirtualQTextBrowser : public virtual QTextBrowser { +public: + + MiqtVirtualQTextBrowser(QWidget* parent): QTextBrowser(parent) {}; + MiqtVirtualQTextBrowser(): QTextBrowser() {}; + + virtual ~MiqtVirtualQTextBrowser() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QTextBrowser::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextBrowser_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QTextBrowser::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSource = 0; + + // Subclass to allow providing a Go implementation + virtual void setSource(const QUrl& name) override { + if (handle__SetSource == 0) { + QTextBrowser::setSource(name); + return; + } + + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&name_ret); + + miqt_exec_callback_QTextBrowser_SetSource(this, handle__SetSource, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSource(QUrl* name) { + + QTextBrowser::setSource(*name); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Backward = 0; + + // Subclass to allow providing a Go implementation + virtual void backward() override { + if (handle__Backward == 0) { + QTextBrowser::backward(); + return; + } + + + miqt_exec_callback_QTextBrowser_Backward(this, handle__Backward); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Backward() { + + QTextBrowser::backward(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Forward = 0; + + // Subclass to allow providing a Go implementation + virtual void forward() override { + if (handle__Forward == 0) { + QTextBrowser::forward(); + return; + } + + + miqt_exec_callback_QTextBrowser_Forward(this, handle__Forward); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Forward() { + + QTextBrowser::forward(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Home = 0; + + // Subclass to allow providing a Go implementation + virtual void home() override { + if (handle__Home == 0) { + QTextBrowser::home(); + return; + } + + + miqt_exec_callback_QTextBrowser_Home(this, handle__Home); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Home() { + + QTextBrowser::home(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reload = 0; + + // Subclass to allow providing a Go implementation + virtual void reload() override { + if (handle__Reload == 0) { + QTextBrowser::reload(); + return; + } + + + miqt_exec_callback_QTextBrowser_Reload(this, handle__Reload); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reload() { + + QTextBrowser::reload(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTextBrowser::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTextBrowser_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTextBrowser::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QTextBrowser::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QTextBrowser::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* ev) override { + if (handle__MouseMoveEvent == 0) { + QTextBrowser::mouseMoveEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* ev) { + + QTextBrowser::mouseMoveEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* ev) override { + if (handle__MousePressEvent == 0) { + QTextBrowser::mousePressEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* ev) { + + QTextBrowser::mousePressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* ev) override { + if (handle__MouseReleaseEvent == 0) { + QTextBrowser::mouseReleaseEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* ev) { + + QTextBrowser::mouseReleaseEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* ev) override { + if (handle__FocusOutEvent == 0) { + QTextBrowser::focusOutEvent(ev); + return; + } + + QFocusEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* ev) { + + QTextBrowser::focusOutEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTextBrowser::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTextBrowser_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTextBrowser::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTextBrowser::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTextBrowser::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QTextBrowser::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextBrowser_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QTextBrowser::inputMethodQuery(static_cast(property))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QTextBrowser::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QTextBrowser::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QTextBrowser::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QTextBrowser::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QTextBrowser::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QTextBrowser::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QTextBrowser::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QTextBrowser::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QTextBrowser::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QTextBrowser::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QTextBrowser::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QTextBrowser::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QTextBrowser::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QTextBrowser::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QTextBrowser::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QTextBrowser::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QTextBrowser::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QTextBrowser::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QTextBrowser::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QTextBrowser::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTextBrowser::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTextBrowser_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTextBrowser::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QTextBrowser::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QTextBrowser::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QTextBrowser::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QTextBrowser::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateMimeDataFromSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* createMimeDataFromSelection() const override { + if (handle__CreateMimeDataFromSelection == 0) { + return QTextBrowser::createMimeDataFromSelection(); + } + + + QMimeData* callback_return_value = miqt_exec_callback_QTextBrowser_CreateMimeDataFromSelection(const_cast(this), handle__CreateMimeDataFromSelection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_CreateMimeDataFromSelection() const { + + return QTextBrowser::createMimeDataFromSelection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QTextBrowser::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QTextBrowser_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QTextBrowser::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual void insertFromMimeData(const QMimeData* source) override { + if (handle__InsertFromMimeData == 0) { + QTextBrowser::insertFromMimeData(source); + return; + } + + QMimeData* sigval1 = (QMimeData*) source; + + miqt_exec_callback_QTextBrowser_InsertFromMimeData(this, handle__InsertFromMimeData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertFromMimeData(QMimeData* source) { + + QTextBrowser::insertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTextBrowser::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTextBrowser_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTextBrowser::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTextBrowser::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTextBrowser_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTextBrowser::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetTextCursor = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetTextCursor(const QTextCursor& cursor) override { + if (handle__DoSetTextCursor == 0) { + QTextBrowser::doSetTextCursor(cursor); + return; + } + + const QTextCursor& cursor_ret = cursor; + // Cast returned reference into pointer + QTextCursor* sigval1 = const_cast(&cursor_ret); + + miqt_exec_callback_QTextBrowser_DoSetTextCursor(this, handle__DoSetTextCursor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetTextCursor(QTextCursor* cursor) { + + QTextBrowser::doSetTextCursor(*cursor); + + } + +}; + +void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(parent); + *outptr_QTextBrowser = ret; + *outptr_QTextEdit = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextBrowser* QTextBrowser_new2() { - return new QTextBrowser(); +void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(); + *outptr_QTextBrowser = ret; + *outptr_QTextEdit = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self) { @@ -173,7 +1033,7 @@ void QTextBrowser_BackwardAvailable(QTextBrowser* self, bool param1) { } void QTextBrowser_connect_BackwardAvailable(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::backwardAvailable), self, [=](bool param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::backwardAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextBrowser_BackwardAvailable(slot, sigval1); }); @@ -184,7 +1044,7 @@ void QTextBrowser_ForwardAvailable(QTextBrowser* self, bool param1) { } void QTextBrowser_connect_ForwardAvailable(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::forwardAvailable), self, [=](bool param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::forwardAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextBrowser_ForwardAvailable(slot, sigval1); }); @@ -195,7 +1055,7 @@ void QTextBrowser_HistoryChanged(QTextBrowser* self) { } void QTextBrowser_connect_HistoryChanged(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::historyChanged), self, [=]() { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::historyChanged), self, [=]() { miqt_exec_callback_QTextBrowser_HistoryChanged(slot); }); } @@ -205,7 +1065,7 @@ void QTextBrowser_SourceChanged(QTextBrowser* self, QUrl* param1) { } void QTextBrowser_connect_SourceChanged(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::sourceChanged), self, [=](const QUrl& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::sourceChanged), self, [=](const QUrl& param1) { const QUrl& param1_ret = param1; // Cast returned reference into pointer QUrl* sigval1 = const_cast(¶m1_ret); @@ -218,7 +1078,7 @@ void QTextBrowser_Highlighted(QTextBrowser* self, QUrl* param1) { } void QTextBrowser_connect_Highlighted(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::highlighted), self, [=](const QUrl& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::highlighted), self, [=](const QUrl& param1) { const QUrl& param1_ret = param1; // Cast returned reference into pointer QUrl* sigval1 = const_cast(¶m1_ret); @@ -232,7 +1092,7 @@ void QTextBrowser_HighlightedWithQString(QTextBrowser* self, struct miqt_string } void QTextBrowser_connect_HighlightedWithQString(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::highlighted), self, [=](const QString& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::highlighted), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -250,7 +1110,7 @@ void QTextBrowser_AnchorClicked(QTextBrowser* self, QUrl* param1) { } void QTextBrowser_connect_AnchorClicked(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::anchorClicked), self, [=](const QUrl& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::anchorClicked), self, [=](const QUrl& param1) { const QUrl& param1_ret = param1; // Cast returned reference into pointer QUrl* sigval1 = const_cast(¶m1_ret); @@ -302,7 +1162,283 @@ struct miqt_string QTextBrowser_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTextBrowser_Delete(QTextBrowser* self) { - delete self; +void QTextBrowser_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__LoadResource = slot; +} + +QVariant* QTextBrowser_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QTextBrowser_override_virtual_SetSource(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__SetSource = slot; +} + +void QTextBrowser_virtualbase_SetSource(void* self, QUrl* name) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_SetSource(name); +} + +void QTextBrowser_override_virtual_Backward(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Backward = slot; +} + +void QTextBrowser_virtualbase_Backward(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Backward(); +} + +void QTextBrowser_override_virtual_Forward(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Forward = slot; +} + +void QTextBrowser_virtualbase_Forward(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Forward(); +} + +void QTextBrowser_override_virtual_Home(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Home = slot; +} + +void QTextBrowser_virtualbase_Home(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Home(); +} + +void QTextBrowser_override_virtual_Reload(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Reload = slot; +} + +void QTextBrowser_virtualbase_Reload(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Reload(); +} + +void QTextBrowser_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Event = slot; +} + +bool QTextBrowser_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Event(e); +} + +void QTextBrowser_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__KeyPressEvent = slot; +} + +void QTextBrowser_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QTextBrowser_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTextBrowser_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MouseMoveEvent(ev); +} + +void QTextBrowser_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MousePressEvent = slot; +} + +void QTextBrowser_virtualbase_MousePressEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MousePressEvent(ev); +} + +void QTextBrowser_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTextBrowser_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MouseReleaseEvent(ev); +} + +void QTextBrowser_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__FocusOutEvent = slot; +} + +void QTextBrowser_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_FocusOutEvent(ev); +} + +void QTextBrowser_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTextBrowser_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTextBrowser_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__PaintEvent = slot; +} + +void QTextBrowser_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_PaintEvent(e); +} + +void QTextBrowser_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTextBrowser_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQTextBrowser*)(self) )->virtualbase_InputMethodQuery(property); +} + +void QTextBrowser_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__TimerEvent = slot; +} + +void QTextBrowser_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_TimerEvent(e); +} + +void QTextBrowser_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTextBrowser_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QTextBrowser_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ResizeEvent = slot; +} + +void QTextBrowser_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ResizeEvent(e); +} + +void QTextBrowser_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTextBrowser_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QTextBrowser_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTextBrowser_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QTextBrowser_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DragEnterEvent = slot; +} + +void QTextBrowser_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QTextBrowser_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTextBrowser_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QTextBrowser_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DragMoveEvent = slot; +} + +void QTextBrowser_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QTextBrowser_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DropEvent = slot; +} + +void QTextBrowser_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DropEvent(e); +} + +void QTextBrowser_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__FocusInEvent = slot; +} + +void QTextBrowser_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_FocusInEvent(e); +} + +void QTextBrowser_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ShowEvent = slot; +} + +void QTextBrowser_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTextBrowser_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ChangeEvent = slot; +} + +void QTextBrowser_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ChangeEvent(e); +} + +void QTextBrowser_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__WheelEvent = slot; +} + +void QTextBrowser_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_WheelEvent(e); +} + +void QTextBrowser_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__CreateMimeDataFromSelection = slot; +} + +QMimeData* QTextBrowser_virtualbase_CreateMimeDataFromSelection(const void* self) { + return ( (const MiqtVirtualQTextBrowser*)(self) )->virtualbase_CreateMimeDataFromSelection(); +} + +void QTextBrowser_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__CanInsertFromMimeData = slot; +} + +bool QTextBrowser_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQTextBrowser*)(self) )->virtualbase_CanInsertFromMimeData(source); +} + +void QTextBrowser_override_virtual_InsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__InsertFromMimeData = slot; +} + +void QTextBrowser_virtualbase_InsertFromMimeData(void* self, QMimeData* source) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_InsertFromMimeData(source); +} + +void QTextBrowser_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__InputMethodEvent = slot; +} + +void QTextBrowser_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTextBrowser_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTextBrowser_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTextBrowser_override_virtual_DoSetTextCursor(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DoSetTextCursor = slot; +} + +void QTextBrowser_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DoSetTextCursor(cursor); +} + +void QTextBrowser_Delete(QTextBrowser* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextbrowser.go b/qt/gen_qtextbrowser.go index 1478c7c7..d6616763 100644 --- a/qt/gen_qtextbrowser.go +++ b/qt/gen_qtextbrowser.go @@ -15,7 +15,8 @@ import ( ) type QTextBrowser struct { - h *C.QTextBrowser + h *C.QTextBrowser + isSubclass bool *QTextEdit } @@ -33,27 +34,55 @@ func (this *QTextBrowser) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextBrowser(h *C.QTextBrowser) *QTextBrowser { +// newQTextBrowser constructs the type using only CGO pointers. +func newQTextBrowser(h *C.QTextBrowser, h_QTextEdit *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextBrowser { if h == nil { return nil } - return &QTextBrowser{h: h, QTextEdit: UnsafeNewQTextEdit(unsafe.Pointer(h))} + return &QTextBrowser{h: h, + QTextEdit: newQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTextBrowser(h unsafe.Pointer) *QTextBrowser { - return newQTextBrowser((*C.QTextBrowser)(h)) +// UnsafeNewQTextBrowser constructs the type using only unsafe pointers. +func UnsafeNewQTextBrowser(h unsafe.Pointer, h_QTextEdit unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextBrowser { + if h == nil { + return nil + } + + return &QTextBrowser{h: (*C.QTextBrowser)(h), + QTextEdit: UnsafeNewQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTextBrowser constructs a new QTextBrowser object. func NewQTextBrowser(parent *QWidget) *QTextBrowser { - ret := C.QTextBrowser_new(parent.cPointer()) - return newQTextBrowser(ret) + var outptr_QTextBrowser *C.QTextBrowser = nil + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextBrowser_new(parent.cPointer(), &outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextBrowser2 constructs a new QTextBrowser object. func NewQTextBrowser2() *QTextBrowser { - ret := C.QTextBrowser_new2() - return newQTextBrowser(ret) + var outptr_QTextBrowser *C.QTextBrowser = nil + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextBrowser_new2(&outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTextBrowser) MetaObject() *QMetaObject { @@ -391,9 +420,797 @@ func QTextBrowser_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTextBrowser) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QTextBrowser_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextBrowser) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QTextBrowser_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_LoadResource +func miqt_exec_callback_QTextBrowser_LoadResource(self *C.QTextBrowser, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTextBrowser) callVirtualBase_SetSource(name *QUrl) { + + C.QTextBrowser_virtualbase_SetSource(unsafe.Pointer(this.h), name.cPointer()) + +} +func (this *QTextBrowser) OnSetSource(slot func(super func(name *QUrl), name *QUrl)) { + C.QTextBrowser_override_virtual_SetSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_SetSource +func miqt_exec_callback_QTextBrowser_SetSource(self *C.QTextBrowser, cb C.intptr_t, name *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(name *QUrl), name *QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQUrl(unsafe.Pointer(name)) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_SetSource, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_Backward() { + + C.QTextBrowser_virtualbase_Backward(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnBackward(slot func(super func())) { + C.QTextBrowser_override_virtual_Backward(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Backward +func miqt_exec_callback_QTextBrowser_Backward(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Backward) + +} + +func (this *QTextBrowser) callVirtualBase_Forward() { + + C.QTextBrowser_virtualbase_Forward(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnForward(slot func(super func())) { + C.QTextBrowser_override_virtual_Forward(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Forward +func miqt_exec_callback_QTextBrowser_Forward(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Forward) + +} + +func (this *QTextBrowser) callVirtualBase_Home() { + + C.QTextBrowser_virtualbase_Home(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnHome(slot func(super func())) { + C.QTextBrowser_override_virtual_Home(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Home +func miqt_exec_callback_QTextBrowser_Home(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Home) + +} + +func (this *QTextBrowser) callVirtualBase_Reload() { + + C.QTextBrowser_virtualbase_Reload(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnReload(slot func(super func())) { + C.QTextBrowser_override_virtual_Reload(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Reload +func miqt_exec_callback_QTextBrowser_Reload(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Reload) + +} + +func (this *QTextBrowser) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTextBrowser_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTextBrowser) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTextBrowser_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Event +func miqt_exec_callback_QTextBrowser_Event(self *C.QTextBrowser, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextBrowser) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QTextBrowser_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QTextBrowser_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_KeyPressEvent +func miqt_exec_callback_QTextBrowser_KeyPressEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MouseMoveEvent(ev *QMouseEvent) { + + C.QTextBrowser_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnMouseMoveEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QTextBrowser_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MouseMoveEvent +func miqt_exec_callback_QTextBrowser_MouseMoveEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MousePressEvent(ev *QMouseEvent) { + + C.QTextBrowser_virtualbase_MousePressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnMousePressEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QTextBrowser_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MousePressEvent +func miqt_exec_callback_QTextBrowser_MousePressEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MouseReleaseEvent(ev *QMouseEvent) { + + C.QTextBrowser_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnMouseReleaseEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QTextBrowser_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MouseReleaseEvent +func miqt_exec_callback_QTextBrowser_MouseReleaseEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_FocusOutEvent(ev *QFocusEvent) { + + C.QTextBrowser_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnFocusOutEvent(slot func(super func(ev *QFocusEvent), ev *QFocusEvent)) { + C.QTextBrowser_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_FocusOutEvent +func miqt_exec_callback_QTextBrowser_FocusOutEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QFocusEvent), ev *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(ev), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTextBrowser_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTextBrowser) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTextBrowser_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_FocusNextPrevChild +func miqt_exec_callback_QTextBrowser_FocusNextPrevChild(self *C.QTextBrowser, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextBrowser) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTextBrowser_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTextBrowser_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_PaintEvent +func miqt_exec_callback_QTextBrowser_PaintEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_InputMethodQuery(property InputMethodQuery) *QVariant { + + _ret := C.QTextBrowser_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextBrowser) OnInputMethodQuery(slot func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) { + C.QTextBrowser_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_InputMethodQuery +func miqt_exec_callback_QTextBrowser_InputMethodQuery(self *C.QTextBrowser, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(property) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTextBrowser) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QTextBrowser_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QTextBrowser_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_TimerEvent +func miqt_exec_callback_QTextBrowser_TimerEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QTextBrowser_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QTextBrowser_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_KeyReleaseEvent +func miqt_exec_callback_QTextBrowser_KeyReleaseEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QTextBrowser_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QTextBrowser_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ResizeEvent +func miqt_exec_callback_QTextBrowser_ResizeEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QTextBrowser_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextBrowser_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent +func miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QTextBrowser_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QTextBrowser_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ContextMenuEvent +func miqt_exec_callback_QTextBrowser_ContextMenuEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DragEnterEvent(e *QDragEnterEvent) { + + C.QTextBrowser_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDragEnterEvent(slot func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) { + C.QTextBrowser_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DragEnterEvent +func miqt_exec_callback_QTextBrowser_DragEnterEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QTextBrowser_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QTextBrowser_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DragLeaveEvent +func miqt_exec_callback_QTextBrowser_DragLeaveEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QTextBrowser_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QTextBrowser_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DragMoveEvent +func miqt_exec_callback_QTextBrowser_DragMoveEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QTextBrowser_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QTextBrowser_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DropEvent +func miqt_exec_callback_QTextBrowser_DropEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QTextBrowser_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QTextBrowser_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_FocusInEvent +func miqt_exec_callback_QTextBrowser_FocusInEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTextBrowser_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextBrowser) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTextBrowser_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ShowEvent +func miqt_exec_callback_QTextBrowser_ShowEvent(self *C.QTextBrowser, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QTextBrowser_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QTextBrowser_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ChangeEvent +func miqt_exec_callback_QTextBrowser_ChangeEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QTextBrowser_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QTextBrowser_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_WheelEvent +func miqt_exec_callback_QTextBrowser_WheelEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTextBrowser_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))), nil) +} +func (this *QTextBrowser) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { + C.QTextBrowser_override_virtual_CreateMimeDataFromSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_CreateMimeDataFromSelection +func miqt_exec_callback_QTextBrowser_CreateMimeDataFromSelection(self *C.QTextBrowser, cb C.intptr_t) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMimeData) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_CreateMimeDataFromSelection) + + return virtualReturn.cPointer() + +} + +func (this *QTextBrowser) callVirtualBase_CanInsertFromMimeData(source *QMimeData) bool { + + return (bool)(C.QTextBrowser_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), source.cPointer())) + +} +func (this *QTextBrowser) OnCanInsertFromMimeData(slot func(super func(source *QMimeData) bool, source *QMimeData) bool) { + C.QTextBrowser_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_CanInsertFromMimeData +func miqt_exec_callback_QTextBrowser_CanInsertFromMimeData(self *C.QTextBrowser, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData) bool, source *QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextBrowser) callVirtualBase_InsertFromMimeData(source *QMimeData) { + + C.QTextBrowser_virtualbase_InsertFromMimeData(unsafe.Pointer(this.h), source.cPointer()) + +} +func (this *QTextBrowser) OnInsertFromMimeData(slot func(super func(source *QMimeData), source *QMimeData)) { + C.QTextBrowser_override_virtual_InsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_InsertFromMimeData +func miqt_exec_callback_QTextBrowser_InsertFromMimeData(self *C.QTextBrowser, cb C.intptr_t, source *C.QMimeData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData), source *QMimeData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_InsertFromMimeData, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTextBrowser_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextBrowser) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTextBrowser_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_InputMethodEvent +func miqt_exec_callback_QTextBrowser_InputMethodEvent(self *C.QTextBrowser, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTextBrowser_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTextBrowser) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTextBrowser_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ScrollContentsBy +func miqt_exec_callback_QTextBrowser_ScrollContentsBy(self *C.QTextBrowser, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTextBrowser) callVirtualBase_DoSetTextCursor(cursor *QTextCursor) { + + C.QTextBrowser_virtualbase_DoSetTextCursor(unsafe.Pointer(this.h), cursor.cPointer()) + +} +func (this *QTextBrowser) OnDoSetTextCursor(slot func(super func(cursor *QTextCursor), cursor *QTextCursor)) { + C.QTextBrowser_override_virtual_DoSetTextCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DoSetTextCursor +func miqt_exec_callback_QTextBrowser_DoSetTextCursor(self *C.QTextBrowser, cb C.intptr_t, cursor *C.QTextCursor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursor *QTextCursor), cursor *QTextCursor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextCursor(unsafe.Pointer(cursor)) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DoSetTextCursor, slotval1) + +} + // Delete this object from C++ memory. func (this *QTextBrowser) Delete() { - C.QTextBrowser_Delete(this.h) + C.QTextBrowser_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextbrowser.h b/qt/gen_qtextbrowser.h index e46dffe8..686c761d 100644 --- a/qt/gen_qtextbrowser.h +++ b/qt/gen_qtextbrowser.h @@ -15,21 +15,65 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QTextBrowser; +class QTextCursor; +class QTextEdit; +class QTimerEvent; class QUrl; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QTextBrowser QTextBrowser; +typedef struct QTextCursor QTextCursor; +typedef struct QTextEdit QTextEdit; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTextBrowser* QTextBrowser_new(QWidget* parent); -QTextBrowser* QTextBrowser_new2(); +void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self); void* QTextBrowser_Metacast(QTextBrowser* self, const char* param1); struct miqt_string QTextBrowser_Tr(const char* s); @@ -70,11 +114,87 @@ void QTextBrowser_HighlightedWithQString(QTextBrowser* self, struct miqt_string void QTextBrowser_connect_HighlightedWithQString(QTextBrowser* self, intptr_t slot); void QTextBrowser_AnchorClicked(QTextBrowser* self, QUrl* param1); void QTextBrowser_connect_AnchorClicked(QTextBrowser* self, intptr_t slot); +bool QTextBrowser_Event(QTextBrowser* self, QEvent* e); +void QTextBrowser_KeyPressEvent(QTextBrowser* self, QKeyEvent* ev); +void QTextBrowser_MouseMoveEvent(QTextBrowser* self, QMouseEvent* ev); +void QTextBrowser_MousePressEvent(QTextBrowser* self, QMouseEvent* ev); +void QTextBrowser_MouseReleaseEvent(QTextBrowser* self, QMouseEvent* ev); +void QTextBrowser_FocusOutEvent(QTextBrowser* self, QFocusEvent* ev); +bool QTextBrowser_FocusNextPrevChild(QTextBrowser* self, bool next); +void QTextBrowser_PaintEvent(QTextBrowser* self, QPaintEvent* e); struct miqt_string QTextBrowser_Tr2(const char* s, const char* c); struct miqt_string QTextBrowser_Tr3(const char* s, const char* c, int n); struct miqt_string QTextBrowser_TrUtf82(const char* s, const char* c); struct miqt_string QTextBrowser_TrUtf83(const char* s, const char* c, int n); -void QTextBrowser_Delete(QTextBrowser* self); +void QTextBrowser_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QTextBrowser_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QTextBrowser_override_virtual_SetSource(void* self, intptr_t slot); +void QTextBrowser_virtualbase_SetSource(void* self, QUrl* name); +void QTextBrowser_override_virtual_Backward(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Backward(void* self); +void QTextBrowser_override_virtual_Forward(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Forward(void* self); +void QTextBrowser_override_virtual_Home(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Home(void* self); +void QTextBrowser_override_virtual_Reload(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Reload(void* self); +void QTextBrowser_override_virtual_Event(void* self, intptr_t slot); +bool QTextBrowser_virtualbase_Event(void* self, QEvent* e); +void QTextBrowser_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QTextBrowser_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev); +void QTextBrowser_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MousePressEvent(void* self, QMouseEvent* ev); +void QTextBrowser_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev); +void QTextBrowser_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev); +void QTextBrowser_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTextBrowser_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTextBrowser_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTextBrowser_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTextBrowser_virtualbase_InputMethodQuery(const void* self, int property); +void QTextBrowser_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QTextBrowser_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QTextBrowser_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QTextBrowser_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QTextBrowser_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QTextBrowser_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QTextBrowser_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QTextBrowser_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QTextBrowser_override_virtual_DropEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DropEvent(void* self, QDropEvent* e); +void QTextBrowser_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QTextBrowser_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTextBrowser_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ChangeEvent(void* self, QEvent* e); +void QTextBrowser_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QTextBrowser_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot); +QMimeData* QTextBrowser_virtualbase_CreateMimeDataFromSelection(const void* self); +void QTextBrowser_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QTextBrowser_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QTextBrowser_override_virtual_InsertFromMimeData(void* self, intptr_t slot); +void QTextBrowser_virtualbase_InsertFromMimeData(void* self, QMimeData* source); +void QTextBrowser_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTextBrowser_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTextBrowser_override_virtual_DoSetTextCursor(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor); +void QTextBrowser_Delete(QTextBrowser* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextcodec.cpp b/qt/gen_qtextcodec.cpp index 8d405203..ed3bf03b 100644 --- a/qt/gen_qtextcodec.cpp +++ b/qt/gen_qtextcodec.cpp @@ -213,12 +213,14 @@ QTextEncoder* QTextCodec_MakeEncoder1(const QTextCodec* self, int flags) { return self->makeEncoder(static_cast(flags)); } -QTextEncoder* QTextEncoder_new(QTextCodec* codec) { - return new QTextEncoder(codec); +void QTextEncoder_new(QTextCodec* codec, QTextEncoder** outptr_QTextEncoder) { + QTextEncoder* ret = new QTextEncoder(codec); + *outptr_QTextEncoder = ret; } -QTextEncoder* QTextEncoder_new2(QTextCodec* codec, int flags) { - return new QTextEncoder(codec, static_cast(flags)); +void QTextEncoder_new2(QTextCodec* codec, int flags, QTextEncoder** outptr_QTextEncoder) { + QTextEncoder* ret = new QTextEncoder(codec, static_cast(flags)); + *outptr_QTextEncoder = ret; } struct miqt_string QTextEncoder_FromUnicode(QTextEncoder* self, struct miqt_string str) { @@ -244,16 +246,22 @@ bool QTextEncoder_HasFailure(const QTextEncoder* self) { return self->hasFailure(); } -void QTextEncoder_Delete(QTextEncoder* self) { - delete self; +void QTextEncoder_Delete(QTextEncoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextDecoder* QTextDecoder_new(QTextCodec* codec) { - return new QTextDecoder(codec); +void QTextDecoder_new(QTextCodec* codec, QTextDecoder** outptr_QTextDecoder) { + QTextDecoder* ret = new QTextDecoder(codec); + *outptr_QTextDecoder = ret; } -QTextDecoder* QTextDecoder_new2(QTextCodec* codec, int flags) { - return new QTextDecoder(codec, static_cast(flags)); +void QTextDecoder_new2(QTextCodec* codec, int flags, QTextDecoder** outptr_QTextDecoder) { + QTextDecoder* ret = new QTextDecoder(codec, static_cast(flags)); + *outptr_QTextDecoder = ret; } struct miqt_string QTextDecoder_ToUnicode(QTextDecoder* self, const char* chars, int lenVal) { @@ -287,19 +295,29 @@ bool QTextDecoder_NeedsMoreData(const QTextDecoder* self) { return self->needsMoreData(); } -void QTextDecoder_Delete(QTextDecoder* self) { - delete self; +void QTextDecoder_Delete(QTextDecoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextCodec__ConverterState* QTextCodec__ConverterState_new() { - return new QTextCodec::ConverterState(); +void QTextCodec__ConverterState_new(QTextCodec__ConverterState** outptr_QTextCodec__ConverterState) { + QTextCodec::ConverterState* ret = new QTextCodec::ConverterState(); + *outptr_QTextCodec__ConverterState = ret; } -QTextCodec__ConverterState* QTextCodec__ConverterState_new2(int f) { - return new QTextCodec::ConverterState(static_cast(f)); +void QTextCodec__ConverterState_new2(int f, QTextCodec__ConverterState** outptr_QTextCodec__ConverterState) { + QTextCodec::ConverterState* ret = new QTextCodec::ConverterState(static_cast(f)); + *outptr_QTextCodec__ConverterState = ret; } -void QTextCodec__ConverterState_Delete(QTextCodec__ConverterState* self) { - delete self; +void QTextCodec__ConverterState_Delete(QTextCodec__ConverterState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextcodec.go b/qt/gen_qtextcodec.go index 3ea0727d..5b8f980a 100644 --- a/qt/gen_qtextcodec.go +++ b/qt/gen_qtextcodec.go @@ -23,7 +23,8 @@ const ( ) type QTextCodec struct { - h *C.QTextCodec + h *C.QTextCodec + isSubclass bool } func (this *QTextCodec) cPointer() *C.QTextCodec { @@ -40,6 +41,7 @@ func (this *QTextCodec) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextCodec constructs the type using only CGO pointers. func newQTextCodec(h *C.QTextCodec) *QTextCodec { if h == nil { return nil @@ -47,8 +49,13 @@ func newQTextCodec(h *C.QTextCodec) *QTextCodec { return &QTextCodec{h: h} } +// UnsafeNewQTextCodec constructs the type using only unsafe pointers. func UnsafeNewQTextCodec(h unsafe.Pointer) *QTextCodec { - return newQTextCodec((*C.QTextCodec)(h)) + if h == nil { + return nil + } + + return &QTextCodec{h: (*C.QTextCodec)(h)} } func QTextCodec_CodecForName(name []byte) *QTextCodec { @@ -242,7 +249,8 @@ func (this *QTextCodec) MakeEncoder1(flags QTextCodec__ConversionFlag) *QTextEnc } type QTextEncoder struct { - h *C.QTextEncoder + h *C.QTextEncoder + isSubclass bool } func (this *QTextEncoder) cPointer() *C.QTextEncoder { @@ -259,6 +267,7 @@ func (this *QTextEncoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextEncoder constructs the type using only CGO pointers. func newQTextEncoder(h *C.QTextEncoder) *QTextEncoder { if h == nil { return nil @@ -266,20 +275,33 @@ func newQTextEncoder(h *C.QTextEncoder) *QTextEncoder { return &QTextEncoder{h: h} } +// UnsafeNewQTextEncoder constructs the type using only unsafe pointers. func UnsafeNewQTextEncoder(h unsafe.Pointer) *QTextEncoder { - return newQTextEncoder((*C.QTextEncoder)(h)) + if h == nil { + return nil + } + + return &QTextEncoder{h: (*C.QTextEncoder)(h)} } // NewQTextEncoder constructs a new QTextEncoder object. func NewQTextEncoder(codec *QTextCodec) *QTextEncoder { - ret := C.QTextEncoder_new(codec.cPointer()) - return newQTextEncoder(ret) + var outptr_QTextEncoder *C.QTextEncoder = nil + + C.QTextEncoder_new(codec.cPointer(), &outptr_QTextEncoder) + ret := newQTextEncoder(outptr_QTextEncoder) + ret.isSubclass = true + return ret } // NewQTextEncoder2 constructs a new QTextEncoder object. func NewQTextEncoder2(codec *QTextCodec, flags QTextCodec__ConversionFlag) *QTextEncoder { - ret := C.QTextEncoder_new2(codec.cPointer(), (C.int)(flags)) - return newQTextEncoder(ret) + var outptr_QTextEncoder *C.QTextEncoder = nil + + C.QTextEncoder_new2(codec.cPointer(), (C.int)(flags), &outptr_QTextEncoder) + ret := newQTextEncoder(outptr_QTextEncoder) + ret.isSubclass = true + return ret } func (this *QTextEncoder) FromUnicode(str string) []byte { @@ -306,7 +328,7 @@ func (this *QTextEncoder) HasFailure() bool { // Delete this object from C++ memory. func (this *QTextEncoder) Delete() { - C.QTextEncoder_Delete(this.h) + C.QTextEncoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -319,7 +341,8 @@ func (this *QTextEncoder) GoGC() { } type QTextDecoder struct { - h *C.QTextDecoder + h *C.QTextDecoder + isSubclass bool } func (this *QTextDecoder) cPointer() *C.QTextDecoder { @@ -336,6 +359,7 @@ func (this *QTextDecoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextDecoder constructs the type using only CGO pointers. func newQTextDecoder(h *C.QTextDecoder) *QTextDecoder { if h == nil { return nil @@ -343,20 +367,33 @@ func newQTextDecoder(h *C.QTextDecoder) *QTextDecoder { return &QTextDecoder{h: h} } +// UnsafeNewQTextDecoder constructs the type using only unsafe pointers. func UnsafeNewQTextDecoder(h unsafe.Pointer) *QTextDecoder { - return newQTextDecoder((*C.QTextDecoder)(h)) + if h == nil { + return nil + } + + return &QTextDecoder{h: (*C.QTextDecoder)(h)} } // NewQTextDecoder constructs a new QTextDecoder object. func NewQTextDecoder(codec *QTextCodec) *QTextDecoder { - ret := C.QTextDecoder_new(codec.cPointer()) - return newQTextDecoder(ret) + var outptr_QTextDecoder *C.QTextDecoder = nil + + C.QTextDecoder_new(codec.cPointer(), &outptr_QTextDecoder) + ret := newQTextDecoder(outptr_QTextDecoder) + ret.isSubclass = true + return ret } // NewQTextDecoder2 constructs a new QTextDecoder object. func NewQTextDecoder2(codec *QTextCodec, flags QTextCodec__ConversionFlag) *QTextDecoder { - ret := C.QTextDecoder_new2(codec.cPointer(), (C.int)(flags)) - return newQTextDecoder(ret) + var outptr_QTextDecoder *C.QTextDecoder = nil + + C.QTextDecoder_new2(codec.cPointer(), (C.int)(flags), &outptr_QTextDecoder) + ret := newQTextDecoder(outptr_QTextDecoder) + ret.isSubclass = true + return ret } func (this *QTextDecoder) ToUnicode(chars string, lenVal int) string { @@ -388,7 +425,7 @@ func (this *QTextDecoder) NeedsMoreData() bool { // Delete this object from C++ memory. func (this *QTextDecoder) Delete() { - C.QTextDecoder_Delete(this.h) + C.QTextDecoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -401,7 +438,8 @@ func (this *QTextDecoder) GoGC() { } type QTextCodec__ConverterState struct { - h *C.QTextCodec__ConverterState + h *C.QTextCodec__ConverterState + isSubclass bool } func (this *QTextCodec__ConverterState) cPointer() *C.QTextCodec__ConverterState { @@ -418,6 +456,7 @@ func (this *QTextCodec__ConverterState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextCodec__ConverterState constructs the type using only CGO pointers. func newQTextCodec__ConverterState(h *C.QTextCodec__ConverterState) *QTextCodec__ConverterState { if h == nil { return nil @@ -425,25 +464,38 @@ func newQTextCodec__ConverterState(h *C.QTextCodec__ConverterState) *QTextCodec_ return &QTextCodec__ConverterState{h: h} } +// UnsafeNewQTextCodec__ConverterState constructs the type using only unsafe pointers. func UnsafeNewQTextCodec__ConverterState(h unsafe.Pointer) *QTextCodec__ConverterState { - return newQTextCodec__ConverterState((*C.QTextCodec__ConverterState)(h)) + if h == nil { + return nil + } + + return &QTextCodec__ConverterState{h: (*C.QTextCodec__ConverterState)(h)} } // NewQTextCodec__ConverterState constructs a new QTextCodec::ConverterState object. func NewQTextCodec__ConverterState() *QTextCodec__ConverterState { - ret := C.QTextCodec__ConverterState_new() - return newQTextCodec__ConverterState(ret) + var outptr_QTextCodec__ConverterState *C.QTextCodec__ConverterState = nil + + C.QTextCodec__ConverterState_new(&outptr_QTextCodec__ConverterState) + ret := newQTextCodec__ConverterState(outptr_QTextCodec__ConverterState) + ret.isSubclass = true + return ret } // NewQTextCodec__ConverterState2 constructs a new QTextCodec::ConverterState object. func NewQTextCodec__ConverterState2(f QTextCodec__ConversionFlag) *QTextCodec__ConverterState { - ret := C.QTextCodec__ConverterState_new2((C.int)(f)) - return newQTextCodec__ConverterState(ret) + var outptr_QTextCodec__ConverterState *C.QTextCodec__ConverterState = nil + + C.QTextCodec__ConverterState_new2((C.int)(f), &outptr_QTextCodec__ConverterState) + ret := newQTextCodec__ConverterState(outptr_QTextCodec__ConverterState) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QTextCodec__ConverterState) Delete() { - C.QTextCodec__ConverterState_Delete(this.h) + C.QTextCodec__ConverterState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextcodec.h b/qt/gen_qtextcodec.h index b1ebefd9..9318770b 100644 --- a/qt/gen_qtextcodec.h +++ b/qt/gen_qtextcodec.h @@ -57,29 +57,31 @@ QTextEncoder* QTextCodec_MakeEncoder(const QTextCodec* self); struct miqt_string QTextCodec_Name(const QTextCodec* self); struct miqt_array /* of struct miqt_string */ QTextCodec_Aliases(const QTextCodec* self); int QTextCodec_MibEnum(const QTextCodec* self); +struct miqt_string QTextCodec_ConvertToUnicode(const QTextCodec* self, const char* in, int length, QTextCodec__ConverterState* state); +struct miqt_string QTextCodec_ConvertFromUnicode(const QTextCodec* self, QChar* in, int length, QTextCodec__ConverterState* state); struct miqt_string QTextCodec_ToUnicode3(const QTextCodec* self, const char* in, int length, QTextCodec__ConverterState* state); struct miqt_string QTextCodec_FromUnicode3(const QTextCodec* self, QChar* in, int length, QTextCodec__ConverterState* state); QTextDecoder* QTextCodec_MakeDecoder1(const QTextCodec* self, int flags); QTextEncoder* QTextCodec_MakeEncoder1(const QTextCodec* self, int flags); -QTextEncoder* QTextEncoder_new(QTextCodec* codec); -QTextEncoder* QTextEncoder_new2(QTextCodec* codec, int flags); +void QTextEncoder_new(QTextCodec* codec, QTextEncoder** outptr_QTextEncoder); +void QTextEncoder_new2(QTextCodec* codec, int flags, QTextEncoder** outptr_QTextEncoder); struct miqt_string QTextEncoder_FromUnicode(QTextEncoder* self, struct miqt_string str); struct miqt_string QTextEncoder_FromUnicode2(QTextEncoder* self, QChar* uc, int lenVal); bool QTextEncoder_HasFailure(const QTextEncoder* self); -void QTextEncoder_Delete(QTextEncoder* self); +void QTextEncoder_Delete(QTextEncoder* self, bool isSubclass); -QTextDecoder* QTextDecoder_new(QTextCodec* codec); -QTextDecoder* QTextDecoder_new2(QTextCodec* codec, int flags); +void QTextDecoder_new(QTextCodec* codec, QTextDecoder** outptr_QTextDecoder); +void QTextDecoder_new2(QTextCodec* codec, int flags, QTextDecoder** outptr_QTextDecoder); struct miqt_string QTextDecoder_ToUnicode(QTextDecoder* self, const char* chars, int lenVal); struct miqt_string QTextDecoder_ToUnicodeWithBa(QTextDecoder* self, struct miqt_string ba); bool QTextDecoder_HasFailure(const QTextDecoder* self); bool QTextDecoder_NeedsMoreData(const QTextDecoder* self); -void QTextDecoder_Delete(QTextDecoder* self); +void QTextDecoder_Delete(QTextDecoder* self, bool isSubclass); -QTextCodec__ConverterState* QTextCodec__ConverterState_new(); -QTextCodec__ConverterState* QTextCodec__ConverterState_new2(int f); -void QTextCodec__ConverterState_Delete(QTextCodec__ConverterState* self); +void QTextCodec__ConverterState_new(QTextCodec__ConverterState** outptr_QTextCodec__ConverterState); +void QTextCodec__ConverterState_new2(int f, QTextCodec__ConverterState** outptr_QTextCodec__ConverterState); +void QTextCodec__ConverterState_Delete(QTextCodec__ConverterState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextcursor.cpp b/qt/gen_qtextcursor.cpp index 8e9f05b0..5af4899e 100644 --- a/qt/gen_qtextcursor.cpp +++ b/qt/gen_qtextcursor.cpp @@ -19,24 +19,29 @@ #include "gen_qtextcursor.h" #include "_cgo_export.h" -QTextCursor* QTextCursor_new() { - return new QTextCursor(); +void QTextCursor_new(QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new2(QTextDocument* document) { - return new QTextCursor(document); +void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(document); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new3(QTextFrame* frame) { - return new QTextCursor(frame); +void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(frame); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new4(QTextBlock* block) { - return new QTextCursor(*block); +void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(*block); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new5(QTextCursor* cursor) { - return new QTextCursor(*cursor); +void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(*cursor); + *outptr_QTextCursor = ret; } void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other) { @@ -363,7 +368,11 @@ void QTextCursor_InsertImage2(QTextCursor* self, QImage* image, struct miqt_stri self->insertImage(*image, name_QString); } -void QTextCursor_Delete(QTextCursor* self) { - delete self; +void QTextCursor_Delete(QTextCursor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextcursor.go b/qt/gen_qtextcursor.go index 6d24914f..d5c3051e 100644 --- a/qt/gen_qtextcursor.go +++ b/qt/gen_qtextcursor.go @@ -60,7 +60,8 @@ const ( ) type QTextCursor struct { - h *C.QTextCursor + h *C.QTextCursor + isSubclass bool } func (this *QTextCursor) cPointer() *C.QTextCursor { @@ -77,6 +78,7 @@ func (this *QTextCursor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextCursor constructs the type using only CGO pointers. func newQTextCursor(h *C.QTextCursor) *QTextCursor { if h == nil { return nil @@ -84,38 +86,63 @@ func newQTextCursor(h *C.QTextCursor) *QTextCursor { return &QTextCursor{h: h} } +// UnsafeNewQTextCursor constructs the type using only unsafe pointers. func UnsafeNewQTextCursor(h unsafe.Pointer) *QTextCursor { - return newQTextCursor((*C.QTextCursor)(h)) + if h == nil { + return nil + } + + return &QTextCursor{h: (*C.QTextCursor)(h)} } // NewQTextCursor constructs a new QTextCursor object. func NewQTextCursor() *QTextCursor { - ret := C.QTextCursor_new() - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new(&outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor2 constructs a new QTextCursor object. func NewQTextCursor2(document *QTextDocument) *QTextCursor { - ret := C.QTextCursor_new2(document.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new2(document.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor3 constructs a new QTextCursor object. func NewQTextCursor3(frame *QTextFrame) *QTextCursor { - ret := C.QTextCursor_new3(frame.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new3(frame.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor4 constructs a new QTextCursor object. func NewQTextCursor4(block *QTextBlock) *QTextCursor { - ret := C.QTextCursor_new4(block.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new4(block.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor5 constructs a new QTextCursor object. func NewQTextCursor5(cursor *QTextCursor) *QTextCursor { - ret := C.QTextCursor_new5(cursor.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new5(cursor.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } func (this *QTextCursor) OperatorAssign(other *QTextCursor) { @@ -253,7 +280,7 @@ func (this *QTextCursor) Block() *QTextBlock { func (this *QTextCursor) CharFormat() *QTextCharFormat { _ret := C.QTextCursor_CharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -268,7 +295,7 @@ func (this *QTextCursor) MergeCharFormat(modifier *QTextCharFormat) { func (this *QTextCursor) BlockFormat() *QTextBlockFormat { _ret := C.QTextCursor_BlockFormat(this.h) - _goptr := newQTextBlockFormat(_ret) + _goptr := newQTextBlockFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -283,7 +310,7 @@ func (this *QTextCursor) MergeBlockFormat(modifier *QTextBlockFormat) { func (this *QTextCursor) BlockCharFormat() *QTextCharFormat { _ret := C.QTextCursor_BlockCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -325,43 +352,43 @@ func (this *QTextCursor) InsertBlock2(format *QTextBlockFormat, charFormat *QTex } func (this *QTextCursor) InsertList(format *QTextListFormat) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertList(this.h, format.cPointer()))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertList(this.h, format.cPointer())), nil, nil, nil) } func (this *QTextCursor) InsertListWithStyle(style QTextListFormat__Style) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style)))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style))), nil, nil, nil) } func (this *QTextCursor) CreateList(format *QTextListFormat) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateList(this.h, format.cPointer()))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateList(this.h, format.cPointer())), nil, nil, nil) } func (this *QTextCursor) CreateListWithStyle(style QTextListFormat__Style) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style)))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style))), nil, nil, nil) } func (this *QTextCursor) CurrentList() *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CurrentList(this.h))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CurrentList(this.h)), nil, nil, nil) } func (this *QTextCursor) InsertTable(rows int, cols int, format *QTextTableFormat) *QTextTable { - return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer()))) + return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer())), nil, nil, nil) } func (this *QTextCursor) InsertTable2(rows int, cols int) *QTextTable { - return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols)))) + return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols))), nil, nil, nil) } func (this *QTextCursor) CurrentTable() *QTextTable { - return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_CurrentTable(this.h))) + return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_CurrentTable(this.h)), nil, nil, nil) } func (this *QTextCursor) InsertFrame(format *QTextFrameFormat) *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_InsertFrame(this.h, format.cPointer()))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_InsertFrame(this.h, format.cPointer())), nil, nil) } func (this *QTextCursor) CurrentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_CurrentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_CurrentFrame(this.h)), nil, nil) } func (this *QTextCursor) InsertFragment(fragment *QTextDocumentFragment) { @@ -445,7 +472,7 @@ func (this *QTextCursor) ColumnNumber() int { } func (this *QTextCursor) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextCursor_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextCursor_Document(this.h)), nil) } func (this *QTextCursor) SetPosition2(pos int, mode QTextCursor__MoveMode) { @@ -470,7 +497,7 @@ func (this *QTextCursor) InsertImage2(image *QImage, name string) { // Delete this object from C++ memory. func (this *QTextCursor) Delete() { - C.QTextCursor_Delete(this.h) + C.QTextCursor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextcursor.h b/qt/gen_qtextcursor.h index 8550cc3a..1a12dc5e 100644 --- a/qt/gen_qtextcursor.h +++ b/qt/gen_qtextcursor.h @@ -46,11 +46,11 @@ typedef struct QTextTable QTextTable; typedef struct QTextTableFormat QTextTableFormat; #endif -QTextCursor* QTextCursor_new(); -QTextCursor* QTextCursor_new2(QTextDocument* document); -QTextCursor* QTextCursor_new3(QTextFrame* frame); -QTextCursor* QTextCursor_new4(QTextBlock* block); -QTextCursor* QTextCursor_new5(QTextCursor* cursor); +void QTextCursor_new(QTextCursor** outptr_QTextCursor); +void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor); +void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor); +void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor); +void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor); void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other); void QTextCursor_Swap(QTextCursor* self, QTextCursor* other); bool QTextCursor_IsNull(const QTextCursor* self); @@ -129,7 +129,7 @@ void QTextCursor_SetPosition2(QTextCursor* self, int pos, int mode); bool QTextCursor_MovePosition2(QTextCursor* self, int op, int param2); bool QTextCursor_MovePosition3(QTextCursor* self, int op, int param2, int n); void QTextCursor_InsertImage2(QTextCursor* self, QImage* image, struct miqt_string name); -void QTextCursor_Delete(QTextCursor* self); +void QTextCursor_Delete(QTextCursor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextdocument.cpp b/qt/gen_qtextdocument.cpp index 7183a8dd..9f02b8ed 100644 --- a/qt/gen_qtextdocument.cpp +++ b/qt/gen_qtextdocument.cpp @@ -2,8 +2,11 @@ #include #include #include +#include +#include #include #include +#include #include #include #include @@ -22,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -40,26 +44,295 @@ void QAbstractUndoItem_OperatorAssign(QAbstractUndoItem* self, QAbstractUndoItem self->operator=(*param1); } -void QAbstractUndoItem_Delete(QAbstractUndoItem* self) { - delete self; +void QAbstractUndoItem_Delete(QAbstractUndoItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextDocument* QTextDocument_new() { - return new QTextDocument(); +class MiqtVirtualQTextDocument : public virtual QTextDocument { +public: + + MiqtVirtualQTextDocument(): QTextDocument() {}; + MiqtVirtualQTextDocument(const QString& text): QTextDocument(text) {}; + MiqtVirtualQTextDocument(QObject* parent): QTextDocument(parent) {}; + MiqtVirtualQTextDocument(const QString& text, QObject* parent): QTextDocument(text, parent) {}; + + virtual ~MiqtVirtualQTextDocument() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QTextDocument::clear(); + return; + } + + + miqt_exec_callback_QTextDocument_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QTextDocument::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateObject = 0; + + // Subclass to allow providing a Go implementation + virtual QTextObject* createObject(const QTextFormat& f) override { + if (handle__CreateObject == 0) { + return QTextDocument::createObject(f); + } + + const QTextFormat& f_ret = f; + // Cast returned reference into pointer + QTextFormat* sigval1 = const_cast(&f_ret); + + QTextObject* callback_return_value = miqt_exec_callback_QTextDocument_CreateObject(this, handle__CreateObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTextObject* virtualbase_CreateObject(QTextFormat* f) { + + return QTextDocument::createObject(*f); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QTextDocument::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextDocument_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QTextDocument::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTextDocument::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTextDocument_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTextDocument::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTextDocument::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTextDocument_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTextDocument::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTextDocument::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTextDocument_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTextDocument::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTextDocument::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTextDocument_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTextDocument::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTextDocument::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTextDocument_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTextDocument::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTextDocument::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTextDocument_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTextDocument::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTextDocument::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTextDocument_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTextDocument::disconnectNotify(*signal); + + } + +}; + +void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } -QTextDocument* QTextDocument_new2(struct miqt_string text) { +void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextDocument(text_QString); + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } -QTextDocument* QTextDocument_new3(QObject* parent) { - return new QTextDocument(parent); +void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(parent); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } -QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent) { +void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextDocument(text_QString, parent); + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString, parent); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTextDocument_MetaObject(const QTextDocument* self) { @@ -472,7 +745,7 @@ void QTextDocument_ContentsChange(QTextDocument* self, int from, int charsRemove } void QTextDocument_connect_ContentsChange(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::contentsChange), self, [=](int from, int charsRemoved, int charsAdded) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::contentsChange), self, [=](int from, int charsRemoved, int charsAdded) { int sigval1 = from; int sigval2 = charsRemoved; int sigval3 = charsAdded; @@ -485,7 +758,7 @@ void QTextDocument_ContentsChanged(QTextDocument* self) { } void QTextDocument_connect_ContentsChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::contentsChanged), self, [=]() { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::contentsChanged), self, [=]() { miqt_exec_callback_QTextDocument_ContentsChanged(slot); }); } @@ -495,7 +768,7 @@ void QTextDocument_UndoAvailable(QTextDocument* self, bool param1) { } void QTextDocument_connect_UndoAvailable(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::undoAvailable), self, [=](bool param1) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::undoAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextDocument_UndoAvailable(slot, sigval1); }); @@ -506,7 +779,7 @@ void QTextDocument_RedoAvailable(QTextDocument* self, bool param1) { } void QTextDocument_connect_RedoAvailable(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::redoAvailable), self, [=](bool param1) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::redoAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextDocument_RedoAvailable(slot, sigval1); }); @@ -517,7 +790,7 @@ void QTextDocument_UndoCommandAdded(QTextDocument* self) { } void QTextDocument_connect_UndoCommandAdded(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::undoCommandAdded), self, [=]() { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::undoCommandAdded), self, [=]() { miqt_exec_callback_QTextDocument_UndoCommandAdded(slot); }); } @@ -527,7 +800,7 @@ void QTextDocument_ModificationChanged(QTextDocument* self, bool m) { } void QTextDocument_connect_ModificationChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::modificationChanged), self, [=](bool m) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::modificationChanged), self, [=](bool m) { bool sigval1 = m; miqt_exec_callback_QTextDocument_ModificationChanged(slot, sigval1); }); @@ -538,7 +811,7 @@ void QTextDocument_CursorPositionChanged(QTextDocument* self, QTextCursor* curso } void QTextDocument_connect_CursorPositionChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::cursorPositionChanged), self, [=](const QTextCursor& cursor) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::cursorPositionChanged), self, [=](const QTextCursor& cursor) { const QTextCursor& cursor_ret = cursor; // Cast returned reference into pointer QTextCursor* sigval1 = const_cast(&cursor_ret); @@ -551,7 +824,7 @@ void QTextDocument_BlockCountChanged(QTextDocument* self, int newBlockCount) { } void QTextDocument_connect_BlockCountChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::blockCountChanged), self, [=](int newBlockCount) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::blockCountChanged), self, [=](int newBlockCount) { int sigval1 = newBlockCount; miqt_exec_callback_QTextDocument_BlockCountChanged(slot, sigval1); }); @@ -562,7 +835,7 @@ void QTextDocument_BaseUrlChanged(QTextDocument* self, QUrl* url) { } void QTextDocument_connect_BaseUrlChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::baseUrlChanged), self, [=](const QUrl& url) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::baseUrlChanged), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -575,7 +848,7 @@ void QTextDocument_DocumentLayoutChanged(QTextDocument* self) { } void QTextDocument_connect_DocumentLayoutChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::documentLayoutChanged), self, [=]() { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::documentLayoutChanged), self, [=]() { miqt_exec_callback_QTextDocument_DocumentLayoutChanged(slot); }); } @@ -723,7 +996,91 @@ void QTextDocument_SetModified1(QTextDocument* self, bool m) { self->setModified(m); } -void QTextDocument_Delete(QTextDocument* self) { - delete self; +void QTextDocument_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__Clear = slot; +} + +void QTextDocument_virtualbase_Clear(void* self) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_Clear(); +} + +void QTextDocument_override_virtual_CreateObject(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__CreateObject = slot; +} + +QTextObject* QTextDocument_virtualbase_CreateObject(void* self, QTextFormat* f) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_CreateObject(f); +} + +void QTextDocument_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__LoadResource = slot; +} + +QVariant* QTextDocument_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QTextDocument_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__Event = slot; +} + +bool QTextDocument_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_Event(event); +} + +void QTextDocument_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__EventFilter = slot; +} + +bool QTextDocument_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTextDocument_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__TimerEvent = slot; +} + +void QTextDocument_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_TimerEvent(event); +} + +void QTextDocument_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__ChildEvent = slot; +} + +void QTextDocument_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_ChildEvent(event); +} + +void QTextDocument_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__CustomEvent = slot; +} + +void QTextDocument_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_CustomEvent(event); +} + +void QTextDocument_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__ConnectNotify = slot; +} + +void QTextDocument_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTextDocument_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__DisconnectNotify = slot; +} + +void QTextDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTextDocument_Delete(QTextDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextdocument.go b/qt/gen_qtextdocument.go index 6eba8aaf..1de7173b 100644 --- a/qt/gen_qtextdocument.go +++ b/qt/gen_qtextdocument.go @@ -57,7 +57,8 @@ const ( ) type QAbstractUndoItem struct { - h *C.QAbstractUndoItem + h *C.QAbstractUndoItem + isSubclass bool } func (this *QAbstractUndoItem) cPointer() *C.QAbstractUndoItem { @@ -74,6 +75,7 @@ func (this *QAbstractUndoItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractUndoItem constructs the type using only CGO pointers. func newQAbstractUndoItem(h *C.QAbstractUndoItem) *QAbstractUndoItem { if h == nil { return nil @@ -81,8 +83,13 @@ func newQAbstractUndoItem(h *C.QAbstractUndoItem) *QAbstractUndoItem { return &QAbstractUndoItem{h: h} } +// UnsafeNewQAbstractUndoItem constructs the type using only unsafe pointers. func UnsafeNewQAbstractUndoItem(h unsafe.Pointer) *QAbstractUndoItem { - return newQAbstractUndoItem((*C.QAbstractUndoItem)(h)) + if h == nil { + return nil + } + + return &QAbstractUndoItem{h: (*C.QAbstractUndoItem)(h)} } func (this *QAbstractUndoItem) Undo() { @@ -99,7 +106,7 @@ func (this *QAbstractUndoItem) OperatorAssign(param1 *QAbstractUndoItem) { // Delete this object from C++ memory. func (this *QAbstractUndoItem) Delete() { - C.QAbstractUndoItem_Delete(this.h) + C.QAbstractUndoItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -112,7 +119,8 @@ func (this *QAbstractUndoItem) GoGC() { } type QTextDocument struct { - h *C.QTextDocument + h *C.QTextDocument + isSubclass bool *QObject } @@ -130,21 +138,34 @@ func (this *QTextDocument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextDocument(h *C.QTextDocument) *QTextDocument { +// newQTextDocument constructs the type using only CGO pointers. +func newQTextDocument(h *C.QTextDocument, h_QObject *C.QObject) *QTextDocument { if h == nil { return nil } - return &QTextDocument{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTextDocument{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTextDocument(h unsafe.Pointer) *QTextDocument { - return newQTextDocument((*C.QTextDocument)(h)) +// UnsafeNewQTextDocument constructs the type using only unsafe pointers. +func UnsafeNewQTextDocument(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextDocument { + if h == nil { + return nil + } + + return &QTextDocument{h: (*C.QTextDocument)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTextDocument constructs a new QTextDocument object. func NewQTextDocument() *QTextDocument { - ret := C.QTextDocument_new() - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new(&outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTextDocument2 constructs a new QTextDocument object. @@ -153,14 +174,24 @@ func NewQTextDocument2(text string) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextDocument_new2(text_ms) - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new2(text_ms, &outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTextDocument3 constructs a new QTextDocument object. func NewQTextDocument3(parent *QObject) *QTextDocument { - ret := C.QTextDocument_new3(parent.cPointer()) - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new3(parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTextDocument4 constructs a new QTextDocument object. @@ -169,8 +200,13 @@ func NewQTextDocument4(text string, parent *QObject) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextDocument_new4(text_ms, parent.cPointer()) - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new4(text_ms, parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextDocument) MetaObject() *QMetaObject { @@ -202,7 +238,7 @@ func QTextDocument_TrUtf8(s string) string { } func (this *QTextDocument) Clone() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone(this.h)), nil) } func (this *QTextDocument) IsEmpty() bool { @@ -246,7 +282,7 @@ func (this *QTextDocument) SetDocumentLayout(layout *QAbstractTextDocumentLayout } func (this *QTextDocument) DocumentLayout() *QAbstractTextDocumentLayout { - return UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(C.QTextDocument_DocumentLayout(this.h))) + return UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(C.QTextDocument_DocumentLayout(this.h)), nil) } func (this *QTextDocument) SetMetaInformation(info QTextDocument__MetaInformation, param2 string) { @@ -374,19 +410,19 @@ func (this *QTextDocument) Find5(expr *QRegularExpression, cursor *QTextCursor) } func (this *QTextDocument) FrameAt(pos int) *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_FrameAt(this.h, (C.int)(pos)))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_FrameAt(this.h, (C.int)(pos))), nil, nil) } func (this *QTextDocument) RootFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_RootFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_RootFrame(this.h)), nil, nil) } func (this *QTextDocument) Object(objectIndex int) *QTextObject { - return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_Object(this.h, (C.int)(objectIndex)))) + return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_Object(this.h, (C.int)(objectIndex))), nil) } func (this *QTextDocument) ObjectForFormat(param1 *QTextFormat) *QTextObject { - return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer()))) + return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer())), nil) } func (this *QTextDocument) FindBlock(pos int) *QTextBlock { @@ -884,7 +920,7 @@ func QTextDocument_TrUtf83(s string, c string, n int) string { } func (this *QTextDocument) Clone1(parent *QObject) *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone1(this.h, parent.cPointer()))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone1(this.h, parent.cPointer())), nil) } func (this *QTextDocument) ToHtml1(encoding []byte) string { @@ -999,9 +1035,249 @@ func (this *QTextDocument) SetModified1(m bool) { C.QTextDocument_SetModified1(this.h, (C.bool)(m)) } +func (this *QTextDocument) callVirtualBase_Clear() { + + C.QTextDocument_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QTextDocument) OnClear(slot func(super func())) { + C.QTextDocument_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_Clear +func miqt_exec_callback_QTextDocument_Clear(self *C.QTextDocument, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextDocument{h: self}).callVirtualBase_Clear) + +} + +func (this *QTextDocument) callVirtualBase_CreateObject(f *QTextFormat) *QTextObject { + + return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_virtualbase_CreateObject(unsafe.Pointer(this.h), f.cPointer())), nil) +} +func (this *QTextDocument) OnCreateObject(slot func(super func(f *QTextFormat) *QTextObject, f *QTextFormat) *QTextObject) { + C.QTextDocument_override_virtual_CreateObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_CreateObject +func miqt_exec_callback_QTextDocument_CreateObject(self *C.QTextDocument, cb C.intptr_t, f *C.QTextFormat) *C.QTextObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *QTextFormat) *QTextObject, f *QTextFormat) *QTextObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextFormat(unsafe.Pointer(f)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_CreateObject, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTextDocument) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QTextDocument_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextDocument) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QTextDocument_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_LoadResource +func miqt_exec_callback_QTextDocument_LoadResource(self *C.QTextDocument, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTextDocument) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTextDocument_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTextDocument) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTextDocument_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_Event +func miqt_exec_callback_QTextDocument_Event(self *C.QTextDocument, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextDocument) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTextDocument_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTextDocument) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTextDocument_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_EventFilter +func miqt_exec_callback_QTextDocument_EventFilter(self *C.QTextDocument, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextDocument) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTextDocument_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTextDocument) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTextDocument_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_TimerEvent +func miqt_exec_callback_QTextDocument_TimerEvent(self *C.QTextDocument, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTextDocument{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTextDocument_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTextDocument) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTextDocument_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_ChildEvent +func miqt_exec_callback_QTextDocument_ChildEvent(self *C.QTextDocument, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTextDocument{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTextDocument_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTextDocument) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTextDocument_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_CustomEvent +func miqt_exec_callback_QTextDocument_CustomEvent(self *C.QTextDocument, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTextDocument{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTextDocument_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTextDocument) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTextDocument_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_ConnectNotify +func miqt_exec_callback_QTextDocument_ConnectNotify(self *C.QTextDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTextDocument{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTextDocument_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTextDocument) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTextDocument_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_DisconnectNotify +func miqt_exec_callback_QTextDocument_DisconnectNotify(self *C.QTextDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTextDocument{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTextDocument) Delete() { - C.QTextDocument_Delete(this.h) + C.QTextDocument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextdocument.h b/qt/gen_qtextdocument.h index f28f1994..a4c3d6ab 100644 --- a/qt/gen_qtextdocument.h +++ b/qt/gen_qtextdocument.h @@ -19,7 +19,10 @@ class QAbstractTextDocumentLayout; class QAbstractUndoItem; class QByteArray; class QChar; +class QChildEvent; +class QEvent; class QFont; +class QMetaMethod; class QMetaObject; class QObject; class QPagedPaintDevice; @@ -35,6 +38,7 @@ class QTextFormat; class QTextFrame; class QTextObject; class QTextOption; +class QTimerEvent; class QUrl; class QVariant; #else @@ -42,7 +46,10 @@ typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractUndoItem QAbstractUndoItem; typedef struct QByteArray QByteArray; typedef struct QChar QChar; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPagedPaintDevice QPagedPaintDevice; @@ -58,6 +65,7 @@ typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; typedef struct QTextObject QTextObject; typedef struct QTextOption QTextOption; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif @@ -65,12 +73,12 @@ typedef struct QVariant QVariant; void QAbstractUndoItem_Undo(QAbstractUndoItem* self); void QAbstractUndoItem_Redo(QAbstractUndoItem* self); void QAbstractUndoItem_OperatorAssign(QAbstractUndoItem* self, QAbstractUndoItem* param1); -void QAbstractUndoItem_Delete(QAbstractUndoItem* self); +void QAbstractUndoItem_Delete(QAbstractUndoItem* self, bool isSubclass); -QTextDocument* QTextDocument_new(); -QTextDocument* QTextDocument_new2(struct miqt_string text); -QTextDocument* QTextDocument_new3(QObject* parent); -QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent); +void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); QMetaObject* QTextDocument_MetaObject(const QTextDocument* self); void* QTextDocument_Metacast(QTextDocument* self, const char* param1); struct miqt_string QTextDocument_Tr(const char* s); @@ -177,6 +185,8 @@ void QTextDocument_Undo2(QTextDocument* self); void QTextDocument_Redo2(QTextDocument* self); void QTextDocument_AppendUndoItem(QTextDocument* self, QAbstractUndoItem* param1); void QTextDocument_SetModified(QTextDocument* self); +QTextObject* QTextDocument_CreateObject(QTextDocument* self, QTextFormat* f); +QVariant* QTextDocument_LoadResource(QTextDocument* self, int typeVal, QUrl* name); struct miqt_string QTextDocument_Tr2(const char* s, const char* c); struct miqt_string QTextDocument_Tr3(const char* s, const char* c, int n); struct miqt_string QTextDocument_TrUtf82(const char* s, const char* c); @@ -197,7 +207,27 @@ QTextCursor* QTextDocument_Find37(const QTextDocument* self, QRegularExpression* void QTextDocument_DrawContents2(QTextDocument* self, QPainter* painter, QRectF* rect); void QTextDocument_ClearUndoRedoStacks1(QTextDocument* self, int historyToClear); void QTextDocument_SetModified1(QTextDocument* self, bool m); -void QTextDocument_Delete(QTextDocument* self); +void QTextDocument_override_virtual_Clear(void* self, intptr_t slot); +void QTextDocument_virtualbase_Clear(void* self); +void QTextDocument_override_virtual_CreateObject(void* self, intptr_t slot); +QTextObject* QTextDocument_virtualbase_CreateObject(void* self, QTextFormat* f); +void QTextDocument_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QTextDocument_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QTextDocument_override_virtual_Event(void* self, intptr_t slot); +bool QTextDocument_virtualbase_Event(void* self, QEvent* event); +void QTextDocument_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTextDocument_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTextDocument_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTextDocument_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTextDocument_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTextDocument_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTextDocument_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTextDocument_virtualbase_CustomEvent(void* self, QEvent* event); +void QTextDocument_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTextDocument_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTextDocument_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTextDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTextDocument_Delete(QTextDocument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextdocumentfragment.cpp b/qt/gen_qtextdocumentfragment.cpp index fa052105..be2d95d2 100644 --- a/qt/gen_qtextdocumentfragment.cpp +++ b/qt/gen_qtextdocumentfragment.cpp @@ -9,20 +9,24 @@ #include "gen_qtextdocumentfragment.h" #include "_cgo_export.h" -QTextDocumentFragment* QTextDocumentFragment_new() { - return new QTextDocumentFragment(); +void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(); + *outptr_QTextDocumentFragment = ret; } -QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document) { - return new QTextDocumentFragment(document); +void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(document); + *outptr_QTextDocumentFragment = ret; } -QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal) { - return new QTextDocumentFragment(*rangeVal); +void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(*rangeVal); + *outptr_QTextDocumentFragment = ret; } -QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs) { - return new QTextDocumentFragment(*rhs); +void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(*rhs); + *outptr_QTextDocumentFragment = ret; } void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs) { @@ -82,7 +86,11 @@ struct miqt_string QTextDocumentFragment_ToHtml1(const QTextDocumentFragment* se return _ms; } -void QTextDocumentFragment_Delete(QTextDocumentFragment* self) { - delete self; +void QTextDocumentFragment_Delete(QTextDocumentFragment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextdocumentfragment.go b/qt/gen_qtextdocumentfragment.go index d76f714d..3b24eaaf 100644 --- a/qt/gen_qtextdocumentfragment.go +++ b/qt/gen_qtextdocumentfragment.go @@ -14,7 +14,8 @@ import ( ) type QTextDocumentFragment struct { - h *C.QTextDocumentFragment + h *C.QTextDocumentFragment + isSubclass bool } func (this *QTextDocumentFragment) cPointer() *C.QTextDocumentFragment { @@ -31,6 +32,7 @@ func (this *QTextDocumentFragment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextDocumentFragment constructs the type using only CGO pointers. func newQTextDocumentFragment(h *C.QTextDocumentFragment) *QTextDocumentFragment { if h == nil { return nil @@ -38,32 +40,53 @@ func newQTextDocumentFragment(h *C.QTextDocumentFragment) *QTextDocumentFragment return &QTextDocumentFragment{h: h} } +// UnsafeNewQTextDocumentFragment constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentFragment(h unsafe.Pointer) *QTextDocumentFragment { - return newQTextDocumentFragment((*C.QTextDocumentFragment)(h)) + if h == nil { + return nil + } + + return &QTextDocumentFragment{h: (*C.QTextDocumentFragment)(h)} } // NewQTextDocumentFragment constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment() *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new() - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new(&outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } // NewQTextDocumentFragment2 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment2(document *QTextDocument) *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new2(document.cPointer()) - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new2(document.cPointer(), &outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } // NewQTextDocumentFragment3 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment3(rangeVal *QTextCursor) *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new3(rangeVal.cPointer()) - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new3(rangeVal.cPointer(), &outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } // NewQTextDocumentFragment4 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment4(rhs *QTextDocumentFragment) *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new4(rhs.cPointer()) - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new4(rhs.cPointer(), &outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } func (this *QTextDocumentFragment) OperatorAssign(rhs *QTextDocumentFragment) { @@ -133,7 +156,7 @@ func (this *QTextDocumentFragment) ToHtml1(encoding []byte) string { // Delete this object from C++ memory. func (this *QTextDocumentFragment) Delete() { - C.QTextDocumentFragment_Delete(this.h) + C.QTextDocumentFragment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextdocumentfragment.h b/qt/gen_qtextdocumentfragment.h index 53b5a244..7f4e6495 100644 --- a/qt/gen_qtextdocumentfragment.h +++ b/qt/gen_qtextdocumentfragment.h @@ -26,10 +26,10 @@ typedef struct QTextDocument QTextDocument; typedef struct QTextDocumentFragment QTextDocumentFragment; #endif -QTextDocumentFragment* QTextDocumentFragment_new(); -QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document); -QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal); -QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs); +void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment); +void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment); +void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment); +void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment); void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs); bool QTextDocumentFragment_IsEmpty(const QTextDocumentFragment* self); struct miqt_string QTextDocumentFragment_ToPlainText(const QTextDocumentFragment* self); @@ -38,7 +38,7 @@ QTextDocumentFragment* QTextDocumentFragment_FromPlainText(struct miqt_string pl QTextDocumentFragment* QTextDocumentFragment_FromHtml(struct miqt_string html); QTextDocumentFragment* QTextDocumentFragment_FromHtml2(struct miqt_string html, QTextDocument* resourceProvider); struct miqt_string QTextDocumentFragment_ToHtml1(const QTextDocumentFragment* self, struct miqt_string encoding); -void QTextDocumentFragment_Delete(QTextDocumentFragment* self); +void QTextDocumentFragment_Delete(QTextDocumentFragment* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextdocumentwriter.cpp b/qt/gen_qtextdocumentwriter.cpp index db5ee319..1fd6205e 100644 --- a/qt/gen_qtextdocumentwriter.cpp +++ b/qt/gen_qtextdocumentwriter.cpp @@ -12,24 +12,28 @@ #include "gen_qtextdocumentwriter.h" #include "_cgo_export.h" -QTextDocumentWriter* QTextDocumentWriter_new() { - return new QTextDocumentWriter(); +void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter) { + QTextDocumentWriter* ret = new QTextDocumentWriter(); + *outptr_QTextDocumentWriter = ret; } -QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format) { +void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { QByteArray format_QByteArray(format.data, format.len); - return new QTextDocumentWriter(device, format_QByteArray); + QTextDocumentWriter* ret = new QTextDocumentWriter(device, format_QByteArray); + *outptr_QTextDocumentWriter = ret; } -QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName) { +void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QTextDocumentWriter(fileName_QString); + QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString); + *outptr_QTextDocumentWriter = ret; } -QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format) { +void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QTextDocumentWriter(fileName_QString, format_QByteArray); + QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString, format_QByteArray); + *outptr_QTextDocumentWriter = ret; } void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format) { @@ -104,7 +108,11 @@ struct miqt_array /* of struct miqt_string */ QTextDocumentWriter_SupportedDocu return _out; } -void QTextDocumentWriter_Delete(QTextDocumentWriter* self) { - delete self; +void QTextDocumentWriter_Delete(QTextDocumentWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextdocumentwriter.go b/qt/gen_qtextdocumentwriter.go index 5dcf1fa9..c70772c4 100644 --- a/qt/gen_qtextdocumentwriter.go +++ b/qt/gen_qtextdocumentwriter.go @@ -14,7 +14,8 @@ import ( ) type QTextDocumentWriter struct { - h *C.QTextDocumentWriter + h *C.QTextDocumentWriter + isSubclass bool } func (this *QTextDocumentWriter) cPointer() *C.QTextDocumentWriter { @@ -31,6 +32,7 @@ func (this *QTextDocumentWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextDocumentWriter constructs the type using only CGO pointers. func newQTextDocumentWriter(h *C.QTextDocumentWriter) *QTextDocumentWriter { if h == nil { return nil @@ -38,14 +40,23 @@ func newQTextDocumentWriter(h *C.QTextDocumentWriter) *QTextDocumentWriter { return &QTextDocumentWriter{h: h} } +// UnsafeNewQTextDocumentWriter constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentWriter(h unsafe.Pointer) *QTextDocumentWriter { - return newQTextDocumentWriter((*C.QTextDocumentWriter)(h)) + if h == nil { + return nil + } + + return &QTextDocumentWriter{h: (*C.QTextDocumentWriter)(h)} } // NewQTextDocumentWriter constructs a new QTextDocumentWriter object. func NewQTextDocumentWriter() *QTextDocumentWriter { - ret := C.QTextDocumentWriter_new() - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new(&outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } // NewQTextDocumentWriter2 constructs a new QTextDocumentWriter object. @@ -53,8 +64,12 @@ func NewQTextDocumentWriter2(device *QIODevice, format []byte) *QTextDocumentWri format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QTextDocumentWriter_new2(device.cPointer(), format_alias) - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new2(device.cPointer(), format_alias, &outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } // NewQTextDocumentWriter3 constructs a new QTextDocumentWriter object. @@ -63,8 +78,12 @@ func NewQTextDocumentWriter3(fileName string) *QTextDocumentWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QTextDocumentWriter_new3(fileName_ms) - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new3(fileName_ms, &outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } // NewQTextDocumentWriter4 constructs a new QTextDocumentWriter object. @@ -76,8 +95,12 @@ func NewQTextDocumentWriter4(fileName string, format []byte) *QTextDocumentWrite format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QTextDocumentWriter_new4(fileName_ms, format_alias) - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new4(fileName_ms, format_alias, &outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } func (this *QTextDocumentWriter) SetFormat(format []byte) { @@ -99,7 +122,7 @@ func (this *QTextDocumentWriter) SetDevice(device *QIODevice) { } func (this *QTextDocumentWriter) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QTextDocumentWriter_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QTextDocumentWriter_Device(this.h)), nil) } func (this *QTextDocumentWriter) SetFileName(fileName string) { @@ -148,7 +171,7 @@ func QTextDocumentWriter_SupportedDocumentFormats() [][]byte { // Delete this object from C++ memory. func (this *QTextDocumentWriter) Delete() { - C.QTextDocumentWriter_Delete(this.h) + C.QTextDocumentWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextdocumentwriter.h b/qt/gen_qtextdocumentwriter.h index b71e3544..58d7190f 100644 --- a/qt/gen_qtextdocumentwriter.h +++ b/qt/gen_qtextdocumentwriter.h @@ -30,10 +30,10 @@ typedef struct QTextDocumentFragment QTextDocumentFragment; typedef struct QTextDocumentWriter QTextDocumentWriter; #endif -QTextDocumentWriter* QTextDocumentWriter_new(); -QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format); -QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName); -QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format); +void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter); +void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); +void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter); +void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format); struct miqt_string QTextDocumentWriter_Format(const QTextDocumentWriter* self); void QTextDocumentWriter_SetDevice(QTextDocumentWriter* self, QIODevice* device); @@ -45,7 +45,7 @@ bool QTextDocumentWriter_WriteWithFragment(QTextDocumentWriter* self, QTextDocum void QTextDocumentWriter_SetCodec(QTextDocumentWriter* self, QTextCodec* codec); QTextCodec* QTextDocumentWriter_Codec(const QTextDocumentWriter* self); struct miqt_array /* of struct miqt_string */ QTextDocumentWriter_SupportedDocumentFormats(); -void QTextDocumentWriter_Delete(QTextDocumentWriter* self); +void QTextDocumentWriter_Delete(QTextDocumentWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextedit.cpp b/qt/gen_qtextedit.cpp index aaff37f2..24c6a07e 100644 --- a/qt/gen_qtextedit.cpp +++ b/qt/gen_qtextedit.cpp @@ -1,13 +1,32 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include @@ -16,29 +35,900 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QTextEdit__ExtraSelection +#include #include #include +#include #include #include #include "gen_qtextedit.h" #include "_cgo_export.h" -QTextEdit* QTextEdit_new(QWidget* parent) { - return new QTextEdit(parent); +class MiqtVirtualQTextEdit : public virtual QTextEdit { +public: + + MiqtVirtualQTextEdit(QWidget* parent): QTextEdit(parent) {}; + MiqtVirtualQTextEdit(): QTextEdit() {}; + MiqtVirtualQTextEdit(const QString& text): QTextEdit(text) {}; + MiqtVirtualQTextEdit(const QString& text, QWidget* parent): QTextEdit(text, parent) {}; + + virtual ~MiqtVirtualQTextEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QTextEdit::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextEdit_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QTextEdit::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QTextEdit::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QTextEdit::inputMethodQuery(static_cast(property))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTextEdit::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTextEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTextEdit::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QTextEdit::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QTextEdit::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QTextEdit::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QTextEdit::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QTextEdit::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QTextEdit::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QTextEdit::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QTextEdit::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTextEdit::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTextEdit::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QTextEdit::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QTextEdit::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QTextEdit::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QTextEdit::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QTextEdit::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QTextEdit::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QTextEdit::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QTextEdit::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTextEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTextEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTextEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QTextEdit::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QTextEdit::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QTextEdit::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QTextEdit::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QTextEdit::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QTextEdit::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QTextEdit::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QTextEdit::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QTextEdit::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QTextEdit::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QTextEdit::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QTextEdit::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QTextEdit::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QTextEdit::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTextEdit::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTextEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTextEdit::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QTextEdit::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QTextEdit::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QTextEdit::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QTextEdit::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateMimeDataFromSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* createMimeDataFromSelection() const override { + if (handle__CreateMimeDataFromSelection == 0) { + return QTextEdit::createMimeDataFromSelection(); + } + + + QMimeData* callback_return_value = miqt_exec_callback_QTextEdit_CreateMimeDataFromSelection(const_cast(this), handle__CreateMimeDataFromSelection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_CreateMimeDataFromSelection() const { + + return QTextEdit::createMimeDataFromSelection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QTextEdit::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QTextEdit_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QTextEdit::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual void insertFromMimeData(const QMimeData* source) override { + if (handle__InsertFromMimeData == 0) { + QTextEdit::insertFromMimeData(source); + return; + } + + QMimeData* sigval1 = (QMimeData*) source; + + miqt_exec_callback_QTextEdit_InsertFromMimeData(this, handle__InsertFromMimeData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertFromMimeData(QMimeData* source) { + + QTextEdit::insertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTextEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTextEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTextEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTextEdit::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTextEdit_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTextEdit::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetTextCursor = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetTextCursor(const QTextCursor& cursor) override { + if (handle__DoSetTextCursor == 0) { + QTextEdit::doSetTextCursor(cursor); + return; + } + + const QTextCursor& cursor_ret = cursor; + // Cast returned reference into pointer + QTextCursor* sigval1 = const_cast(&cursor_ret); + + miqt_exec_callback_QTextEdit_DoSetTextCursor(this, handle__DoSetTextCursor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetTextCursor(QTextCursor* cursor) { + + QTextEdit::doSetTextCursor(*cursor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QTextEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTextEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QTextEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTextEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTextEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTextEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QTextEdit::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QTextEdit_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QTextEdit::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QTextEdit::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QTextEdit_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QTextEdit::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QTextEdit::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QTextEdit_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QTextEdit::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTextEdit::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTextEdit_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTextEdit::viewportSizeHint()); + + } + +}; + +void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(parent); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextEdit* QTextEdit_new2() { - return new QTextEdit(); +void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextEdit* QTextEdit_new3(struct miqt_string text) { +void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextEdit(text_QString); + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent) { +void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextEdit(text_QString, parent); + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString, parent); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTextEdit_MetaObject(const QTextEdit* self) { @@ -531,7 +1421,7 @@ void QTextEdit_TextChanged(QTextEdit* self) { } void QTextEdit_connect_TextChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::textChanged), self, [=]() { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::textChanged), self, [=]() { miqt_exec_callback_QTextEdit_TextChanged(slot); }); } @@ -541,7 +1431,7 @@ void QTextEdit_UndoAvailable(QTextEdit* self, bool b) { } void QTextEdit_connect_UndoAvailable(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::undoAvailable), self, [=](bool b) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::undoAvailable), self, [=](bool b) { bool sigval1 = b; miqt_exec_callback_QTextEdit_UndoAvailable(slot, sigval1); }); @@ -552,7 +1442,7 @@ void QTextEdit_RedoAvailable(QTextEdit* self, bool b) { } void QTextEdit_connect_RedoAvailable(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::redoAvailable), self, [=](bool b) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::redoAvailable), self, [=](bool b) { bool sigval1 = b; miqt_exec_callback_QTextEdit_RedoAvailable(slot, sigval1); }); @@ -563,7 +1453,7 @@ void QTextEdit_CurrentCharFormatChanged(QTextEdit* self, QTextCharFormat* format } void QTextEdit_connect_CurrentCharFormatChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::currentCharFormatChanged), self, [=](const QTextCharFormat& format) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::currentCharFormatChanged), self, [=](const QTextCharFormat& format) { const QTextCharFormat& format_ret = format; // Cast returned reference into pointer QTextCharFormat* sigval1 = const_cast(&format_ret); @@ -576,7 +1466,7 @@ void QTextEdit_CopyAvailable(QTextEdit* self, bool b) { } void QTextEdit_connect_CopyAvailable(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::copyAvailable), self, [=](bool b) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::copyAvailable), self, [=](bool b) { bool sigval1 = b; miqt_exec_callback_QTextEdit_CopyAvailable(slot, sigval1); }); @@ -587,7 +1477,7 @@ void QTextEdit_SelectionChanged(QTextEdit* self) { } void QTextEdit_connect_SelectionChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::selectionChanged), self, [=]() { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::selectionChanged), self, [=]() { miqt_exec_callback_QTextEdit_SelectionChanged(slot); }); } @@ -597,7 +1487,7 @@ void QTextEdit_CursorPositionChanged(QTextEdit* self) { } void QTextEdit_connect_CursorPositionChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::cursorPositionChanged), self, [=]() { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::cursorPositionChanged), self, [=]() { miqt_exec_callback_QTextEdit_CursorPositionChanged(slot); }); } @@ -682,19 +1572,308 @@ void QTextEdit_ZoomOut1(QTextEdit* self, int rangeVal) { self->zoomOut(static_cast(rangeVal)); } -void QTextEdit_Delete(QTextEdit* self) { - delete self; +void QTextEdit_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__LoadResource = slot; +} + +QVariant* QTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTextEdit_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_InputMethodQuery(property); } -QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1) { - return new QTextEdit::ExtraSelection(*param1); +void QTextEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__Event = slot; +} + +bool QTextEdit_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_Event(e); +} + +void QTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__TimerEvent = slot; +} + +void QTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_TimerEvent(e); +} + +void QTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ResizeEvent(e); +} + +void QTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__PaintEvent = slot; +} + +void QTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_PaintEvent(e); +} + +void QTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MousePressEvent(e); +} + +void QTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QTextEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DropEvent = slot; +} + +void QTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DropEvent(e); +} + +void QTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_FocusInEvent(e); +} + +void QTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ShowEvent = slot; +} + +void QTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ChangeEvent(e); +} + +void QTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__WheelEvent = slot; +} + +void QTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_WheelEvent(e); +} + +void QTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__CreateMimeDataFromSelection = slot; +} + +QMimeData* QTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_CreateMimeDataFromSelection(); +} + +void QTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__CanInsertFromMimeData = slot; +} + +bool QTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_CanInsertFromMimeData(source); +} + +void QTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__InsertFromMimeData = slot; +} + +void QTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_InsertFromMimeData(source); +} + +void QTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void QTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DoSetTextCursor = slot; +} + +void QTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DoSetTextCursor(cursor); +} + +void QTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QTextEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QTextEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QTextEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_SizeHint(); +} + +void QTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__SetupViewport = slot; +} + +void QTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QTextEdit_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__EventFilter = slot; +} + +bool QTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ViewportEvent = slot; +} + +bool QTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTextEdit_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTextEdit_Delete(QTextEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection) { + QTextEdit::ExtraSelection* ret = new QTextEdit::ExtraSelection(*param1); + *outptr_QTextEdit__ExtraSelection = ret; } void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1) { self->operator=(*param1); } -void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self) { - delete self; +void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextedit.go b/qt/gen_qtextedit.go index ce44756d..e3c2017e 100644 --- a/qt/gen_qtextedit.go +++ b/qt/gen_qtextedit.go @@ -32,7 +32,8 @@ const ( ) type QTextEdit struct { - h *C.QTextEdit + h *C.QTextEdit + isSubclass bool *QAbstractScrollArea } @@ -50,27 +51,53 @@ func (this *QTextEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextEdit(h *C.QTextEdit) *QTextEdit { +// newQTextEdit constructs the type using only CGO pointers. +func newQTextEdit(h *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextEdit { if h == nil { return nil } - return &QTextEdit{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QTextEdit{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTextEdit(h unsafe.Pointer) *QTextEdit { - return newQTextEdit((*C.QTextEdit)(h)) +// UnsafeNewQTextEdit constructs the type using only unsafe pointers. +func UnsafeNewQTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextEdit { + if h == nil { + return nil + } + + return &QTextEdit{h: (*C.QTextEdit)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTextEdit constructs a new QTextEdit object. func NewQTextEdit(parent *QWidget) *QTextEdit { - ret := C.QTextEdit_new(parent.cPointer()) - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new(parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextEdit2 constructs a new QTextEdit object. func NewQTextEdit2() *QTextEdit { - ret := C.QTextEdit_new2() - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new2(&outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextEdit3 constructs a new QTextEdit object. @@ -79,8 +106,17 @@ func NewQTextEdit3(text string) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextEdit_new3(text_ms) - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new3(text_ms, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextEdit4 constructs a new QTextEdit object. @@ -89,8 +125,17 @@ func NewQTextEdit4(text string, parent *QWidget) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextEdit_new4(text_ms, parent.cPointer()) - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new4(text_ms, parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTextEdit) MetaObject() *QMetaObject { @@ -126,7 +171,7 @@ func (this *QTextEdit) SetDocument(document *QTextDocument) { } func (this *QTextEdit) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextEdit_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextEdit_Document(this.h)), nil) } func (this *QTextEdit) SetPlaceholderText(placeholderText string) { @@ -229,7 +274,7 @@ func (this *QTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { func (this *QTextEdit) CurrentCharFormat() *QTextCharFormat { _ret := C.QTextEdit_CurrentCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -346,11 +391,11 @@ func (this *QTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QTextEdit) CreateStandardContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()))) + return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())), nil, nil, nil) } func (this *QTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -682,7 +727,7 @@ func miqt_exec_callback_QTextEdit_CurrentCharFormatChanged(cb C.intptr_t, format } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQTextCharFormat(unsafe.Pointer(format)) + slotval1 := UnsafeNewQTextCharFormat(unsafe.Pointer(format), nil) gofunc(slotval1) } @@ -820,53 +865,898 @@ func (this *QTextEdit) ZoomOut1(rangeVal int) { C.QTextEdit_ZoomOut1(this.h, (C.int)(rangeVal)) } -// Delete this object from C++ memory. -func (this *QTextEdit) Delete() { - C.QTextEdit_Delete(this.h) +func (this *QTextEdit) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QTextEdit_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QTextEdit_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QTextEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QTextEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QTextEdit_LoadResource +func miqt_exec_callback_QTextEdit_LoadResource(self *C.QTextEdit, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + } -type QTextEdit__ExtraSelection struct { - h *C.QTextEdit__ExtraSelection +func (this *QTextEdit) callVirtualBase_InputMethodQuery(property InputMethodQuery) *QVariant { + + _ret := C.QTextEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnInputMethodQuery(slot func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) { + C.QTextEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTextEdit__ExtraSelection) cPointer() *C.QTextEdit__ExtraSelection { - if this == nil { - return nil +//export miqt_exec_callback_QTextEdit_InputMethodQuery +func miqt_exec_callback_QTextEdit_InputMethodQuery(self *C.QTextEdit, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(property) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } -func (this *QTextEdit__ExtraSelection) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QTextEdit) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTextEdit_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTextEdit) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTextEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_Event +func miqt_exec_callback_QTextEdit_Event(self *C.QTextEdit, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func newQTextEdit__ExtraSelection(h *C.QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { - if h == nil { - return nil +func (this *QTextEdit) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QTextEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QTextEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_TimerEvent +func miqt_exec_callback_QTextEdit_TimerEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QTextEdit__ExtraSelection{h: h} + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + } -func UnsafeNewQTextEdit__ExtraSelection(h unsafe.Pointer) *QTextEdit__ExtraSelection { - return newQTextEdit__ExtraSelection((*C.QTextEdit__ExtraSelection)(h)) +func (this *QTextEdit) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QTextEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QTextEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQTextEdit__ExtraSelection constructs a new QTextEdit::ExtraSelection object. -func NewQTextEdit__ExtraSelection(param1 *QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { - ret := C.QTextEdit__ExtraSelection_new(param1.cPointer()) - return newQTextEdit__ExtraSelection(ret) +//export miqt_exec_callback_QTextEdit_KeyPressEvent +func miqt_exec_callback_QTextEdit_KeyPressEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QTextEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QTextEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_KeyReleaseEvent +func miqt_exec_callback_QTextEdit_KeyReleaseEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QTextEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QTextEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ResizeEvent +func miqt_exec_callback_QTextEdit_ResizeEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTextEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTextEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_PaintEvent +func miqt_exec_callback_QTextEdit_PaintEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MousePressEvent +func miqt_exec_callback_QTextEdit_MousePressEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MouseMoveEvent +func miqt_exec_callback_QTextEdit_MouseMoveEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MouseReleaseEvent +func miqt_exec_callback_QTextEdit_MouseReleaseEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MouseDoubleClickEvent +func miqt_exec_callback_QTextEdit_MouseDoubleClickEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTextEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTextEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTextEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_FocusNextPrevChild +func miqt_exec_callback_QTextEdit_FocusNextPrevChild(self *C.QTextEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QTextEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QTextEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ContextMenuEvent +func miqt_exec_callback_QTextEdit_ContextMenuEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DragEnterEvent(e *QDragEnterEvent) { + + C.QTextEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDragEnterEvent(slot func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) { + C.QTextEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DragEnterEvent +func miqt_exec_callback_QTextEdit_DragEnterEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QTextEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QTextEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DragLeaveEvent +func miqt_exec_callback_QTextEdit_DragLeaveEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QTextEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QTextEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DragMoveEvent +func miqt_exec_callback_QTextEdit_DragMoveEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QTextEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QTextEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DropEvent +func miqt_exec_callback_QTextEdit_DropEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QTextEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QTextEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_FocusInEvent +func miqt_exec_callback_QTextEdit_FocusInEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QTextEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QTextEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_FocusOutEvent +func miqt_exec_callback_QTextEdit_FocusOutEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTextEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextEdit) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTextEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ShowEvent +func miqt_exec_callback_QTextEdit_ShowEvent(self *C.QTextEdit, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QTextEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QTextEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ChangeEvent +func miqt_exec_callback_QTextEdit_ChangeEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QTextEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QTextEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_WheelEvent +func miqt_exec_callback_QTextEdit_WheelEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))), nil) +} +func (this *QTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { + C.QTextEdit_override_virtual_CreateMimeDataFromSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_CreateMimeDataFromSelection +func miqt_exec_callback_QTextEdit_CreateMimeDataFromSelection(self *C.QTextEdit, cb C.intptr_t) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMimeData) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_CreateMimeDataFromSelection) + + return virtualReturn.cPointer() + +} + +func (this *QTextEdit) callVirtualBase_CanInsertFromMimeData(source *QMimeData) bool { + + return (bool)(C.QTextEdit_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), source.cPointer())) + +} +func (this *QTextEdit) OnCanInsertFromMimeData(slot func(super func(source *QMimeData) bool, source *QMimeData) bool) { + C.QTextEdit_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_CanInsertFromMimeData +func miqt_exec_callback_QTextEdit_CanInsertFromMimeData(self *C.QTextEdit, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData) bool, source *QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_InsertFromMimeData(source *QMimeData) { + + C.QTextEdit_virtualbase_InsertFromMimeData(unsafe.Pointer(this.h), source.cPointer()) + +} +func (this *QTextEdit) OnInsertFromMimeData(slot func(super func(source *QMimeData), source *QMimeData)) { + C.QTextEdit_override_virtual_InsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_InsertFromMimeData +func miqt_exec_callback_QTextEdit_InsertFromMimeData(self *C.QTextEdit, cb C.intptr_t, source *C.QMimeData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData), source *QMimeData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTextEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTextEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_InputMethodEvent +func miqt_exec_callback_QTextEdit_InputMethodEvent(self *C.QTextEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTextEdit_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTextEdit) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTextEdit_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ScrollContentsBy +func miqt_exec_callback_QTextEdit_ScrollContentsBy(self *C.QTextEdit, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTextEdit) callVirtualBase_DoSetTextCursor(cursor *QTextCursor) { + + C.QTextEdit_virtualbase_DoSetTextCursor(unsafe.Pointer(this.h), cursor.cPointer()) + +} +func (this *QTextEdit) OnDoSetTextCursor(slot func(super func(cursor *QTextCursor), cursor *QTextCursor)) { + C.QTextEdit_override_virtual_DoSetTextCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DoSetTextCursor +func miqt_exec_callback_QTextEdit_DoSetTextCursor(self *C.QTextEdit, cb C.intptr_t, cursor *C.QTextCursor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursor *QTextCursor), cursor *QTextCursor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextCursor(unsafe.Pointer(cursor)) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DoSetTextCursor, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QTextEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QTextEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MinimumSizeHint +func miqt_exec_callback_QTextEdit_MinimumSizeHint(self *C.QTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTextEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTextEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTextEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_SizeHint +func miqt_exec_callback_QTextEdit_SizeHint(self *C.QTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTextEdit) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QTextEdit_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QTextEdit) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QTextEdit_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_SetupViewport +func miqt_exec_callback_QTextEdit_SetupViewport(self *C.QTextEdit, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QTextEdit_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QTextEdit) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QTextEdit_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_EventFilter +func miqt_exec_callback_QTextEdit_EventFilter(self *C.QTextEdit, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QTextEdit_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QTextEdit) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QTextEdit_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ViewportEvent +func miqt_exec_callback_QTextEdit_ViewportEvent(self *C.QTextEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTextEdit_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTextEdit_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ViewportSizeHint +func miqt_exec_callback_QTextEdit_ViewportSizeHint(self *C.QTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QTextEdit) Delete() { + C.QTextEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QTextEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QTextEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QTextEdit__ExtraSelection struct { + h *C.QTextEdit__ExtraSelection + isSubclass bool +} + +func (this *QTextEdit__ExtraSelection) cPointer() *C.QTextEdit__ExtraSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QTextEdit__ExtraSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQTextEdit__ExtraSelection constructs the type using only CGO pointers. +func newQTextEdit__ExtraSelection(h *C.QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { + if h == nil { + return nil + } + return &QTextEdit__ExtraSelection{h: h} +} + +// UnsafeNewQTextEdit__ExtraSelection constructs the type using only unsafe pointers. +func UnsafeNewQTextEdit__ExtraSelection(h unsafe.Pointer) *QTextEdit__ExtraSelection { + if h == nil { + return nil + } + + return &QTextEdit__ExtraSelection{h: (*C.QTextEdit__ExtraSelection)(h)} +} + +// NewQTextEdit__ExtraSelection constructs a new QTextEdit::ExtraSelection object. +func NewQTextEdit__ExtraSelection(param1 *QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { + var outptr_QTextEdit__ExtraSelection *C.QTextEdit__ExtraSelection = nil + + C.QTextEdit__ExtraSelection_new(param1.cPointer(), &outptr_QTextEdit__ExtraSelection) + ret := newQTextEdit__ExtraSelection(outptr_QTextEdit__ExtraSelection) + ret.isSubclass = true + return ret } func (this *QTextEdit__ExtraSelection) OperatorAssign(param1 *QTextEdit__ExtraSelection) { @@ -875,7 +1765,7 @@ func (this *QTextEdit__ExtraSelection) OperatorAssign(param1 *QTextEdit__ExtraSe // Delete this object from C++ memory. func (this *QTextEdit__ExtraSelection) Delete() { - C.QTextEdit__ExtraSelection_Delete(this.h) + C.QTextEdit__ExtraSelection_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextedit.h b/qt/gen_qtextedit.h index b8acdd31..046e55de 100644 --- a/qt/gen_qtextedit.h +++ b/qt/gen_qtextedit.h @@ -15,15 +15,34 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFont; +class QFrame; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; class QPagedPaintDevice; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; class QRegExp; class QRegularExpression; +class QResizeEvent; +class QShowEvent; +class QSize; class QTextCharFormat; class QTextCursor; class QTextDocument; @@ -33,33 +52,56 @@ typedef QTextEdit::ExtraSelection QTextEdit__ExtraSelection; #else class QTextEdit__ExtraSelection; #endif +class QTimerEvent; class QUrl; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegExp QRegExp; typedef struct QRegularExpression QRegularExpression; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QTextCharFormat QTextCharFormat; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; typedef struct QTextEdit QTextEdit; typedef struct QTextEdit__ExtraSelection QTextEdit__ExtraSelection; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTextEdit* QTextEdit_new(QWidget* parent); -QTextEdit* QTextEdit_new2(); -QTextEdit* QTextEdit_new3(struct miqt_string text); -QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent); +void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTextEdit_MetaObject(const QTextEdit* self); void* QTextEdit_Metacast(QTextEdit* self, const char* param1); struct miqt_string QTextEdit_Tr(const char* s); @@ -171,6 +213,33 @@ void QTextEdit_SelectionChanged(QTextEdit* self); void QTextEdit_connect_SelectionChanged(QTextEdit* self, intptr_t slot); void QTextEdit_CursorPositionChanged(QTextEdit* self); void QTextEdit_connect_CursorPositionChanged(QTextEdit* self, intptr_t slot); +bool QTextEdit_Event(QTextEdit* self, QEvent* e); +void QTextEdit_TimerEvent(QTextEdit* self, QTimerEvent* e); +void QTextEdit_KeyPressEvent(QTextEdit* self, QKeyEvent* e); +void QTextEdit_KeyReleaseEvent(QTextEdit* self, QKeyEvent* e); +void QTextEdit_ResizeEvent(QTextEdit* self, QResizeEvent* e); +void QTextEdit_PaintEvent(QTextEdit* self, QPaintEvent* e); +void QTextEdit_MousePressEvent(QTextEdit* self, QMouseEvent* e); +void QTextEdit_MouseMoveEvent(QTextEdit* self, QMouseEvent* e); +void QTextEdit_MouseReleaseEvent(QTextEdit* self, QMouseEvent* e); +void QTextEdit_MouseDoubleClickEvent(QTextEdit* self, QMouseEvent* e); +bool QTextEdit_FocusNextPrevChild(QTextEdit* self, bool next); +void QTextEdit_ContextMenuEvent(QTextEdit* self, QContextMenuEvent* e); +void QTextEdit_DragEnterEvent(QTextEdit* self, QDragEnterEvent* e); +void QTextEdit_DragLeaveEvent(QTextEdit* self, QDragLeaveEvent* e); +void QTextEdit_DragMoveEvent(QTextEdit* self, QDragMoveEvent* e); +void QTextEdit_DropEvent(QTextEdit* self, QDropEvent* e); +void QTextEdit_FocusInEvent(QTextEdit* self, QFocusEvent* e); +void QTextEdit_FocusOutEvent(QTextEdit* self, QFocusEvent* e); +void QTextEdit_ShowEvent(QTextEdit* self, QShowEvent* param1); +void QTextEdit_ChangeEvent(QTextEdit* self, QEvent* e); +void QTextEdit_WheelEvent(QTextEdit* self, QWheelEvent* e); +QMimeData* QTextEdit_CreateMimeDataFromSelection(const QTextEdit* self); +bool QTextEdit_CanInsertFromMimeData(const QTextEdit* self, QMimeData* source); +void QTextEdit_InsertFromMimeData(QTextEdit* self, QMimeData* source); +void QTextEdit_InputMethodEvent(QTextEdit* self, QInputMethodEvent* param1); +void QTextEdit_ScrollContentsBy(QTextEdit* self, int dx, int dy); +void QTextEdit_DoSetTextCursor(QTextEdit* self, QTextCursor* cursor); struct miqt_string QTextEdit_Tr2(const char* s, const char* c); struct miqt_string QTextEdit_Tr3(const char* s, const char* c, int n); struct miqt_string QTextEdit_TrUtf82(const char* s, const char* c); @@ -182,11 +251,81 @@ struct miqt_string QTextEdit_ToMarkdown1(const QTextEdit* self, int features); void QTextEdit_MoveCursor2(QTextEdit* self, int operation, int mode); void QTextEdit_ZoomIn1(QTextEdit* self, int rangeVal); void QTextEdit_ZoomOut1(QTextEdit* self, int rangeVal); -void QTextEdit_Delete(QTextEdit* self); +void QTextEdit_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTextEdit_virtualbase_InputMethodQuery(const void* self, int property); +void QTextEdit_override_virtual_Event(void* self, intptr_t slot); +bool QTextEdit_virtualbase_Event(void* self, QEvent* e); +void QTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QTextEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e); +void QTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e); +void QTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot); +QMimeData* QTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self); +void QTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot); +void QTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source); +void QTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot); +void QTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor); +void QTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QTextEdit_virtualbase_MinimumSizeHint(const void* self); +void QTextEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTextEdit_virtualbase_SizeHint(const void* self); +void QTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot); +void QTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QTextEdit_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTextEdit_virtualbase_ViewportSizeHint(const void* self); +void QTextEdit_Delete(QTextEdit* self, bool isSubclass); -QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1); +void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection); void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1); -void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self); +void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextformat.cpp b/qt/gen_qtextformat.cpp index 29e50015..62d02e73 100644 --- a/qt/gen_qtextformat.cpp +++ b/qt/gen_qtextformat.cpp @@ -22,16 +22,19 @@ #include "gen_qtextformat.h" #include "_cgo_export.h" -QTextLength* QTextLength_new() { - return new QTextLength(); +void QTextLength_new(QTextLength** outptr_QTextLength) { + QTextLength* ret = new QTextLength(); + *outptr_QTextLength = ret; } -QTextLength* QTextLength_new2(int typeVal, double value) { - return new QTextLength(static_cast(typeVal), static_cast(value)); +void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength) { + QTextLength* ret = new QTextLength(static_cast(typeVal), static_cast(value)); + *outptr_QTextLength = ret; } -QTextLength* QTextLength_new3(QTextLength* param1) { - return new QTextLength(*param1); +void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength) { + QTextLength* ret = new QTextLength(*param1); + *outptr_QTextLength = ret; } int QTextLength_Type(const QTextLength* self) { @@ -57,20 +60,27 @@ bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other) { return self->operator!=(*other); } -void QTextLength_Delete(QTextLength* self) { - delete self; +void QTextLength_Delete(QTextLength* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFormat* QTextFormat_new() { - return new QTextFormat(); +void QTextFormat_new(QTextFormat** outptr_QTextFormat) { + QTextFormat* ret = new QTextFormat(); + *outptr_QTextFormat = ret; } -QTextFormat* QTextFormat_new2(int typeVal) { - return new QTextFormat(static_cast(typeVal)); +void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat) { + QTextFormat* ret = new QTextFormat(static_cast(typeVal)); + *outptr_QTextFormat = ret; } -QTextFormat* QTextFormat_new3(QTextFormat* rhs) { - return new QTextFormat(*rhs); +void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat) { + QTextFormat* ret = new QTextFormat(*rhs); + *outptr_QTextFormat = ret; } void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs) { @@ -311,16 +321,24 @@ void QTextFormat_ClearForeground(QTextFormat* self) { self->clearForeground(); } -void QTextFormat_Delete(QTextFormat* self) { - delete self; +void QTextFormat_Delete(QTextFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextCharFormat* QTextCharFormat_new() { - return new QTextCharFormat(); +void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextCharFormat* ret = new QTextCharFormat(); + *outptr_QTextCharFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1) { - return new QTextCharFormat(*param1); +void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextCharFormat* ret = new QTextCharFormat(*param1); + *outptr_QTextCharFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextCharFormat_IsValid(const QTextCharFormat* self) { @@ -656,16 +674,24 @@ void QTextCharFormat_SetFontStyleHint2(QTextCharFormat* self, int hint, int stra self->setFontStyleHint(static_cast(hint), static_cast(strategy)); } -void QTextCharFormat_Delete(QTextCharFormat* self) { - delete self; +void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextBlockFormat* QTextBlockFormat_new() { - return new QTextBlockFormat(); +void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { + QTextBlockFormat* ret = new QTextBlockFormat(); + *outptr_QTextBlockFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1) { - return new QTextBlockFormat(*param1); +void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { + QTextBlockFormat* ret = new QTextBlockFormat(*param1); + *outptr_QTextBlockFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextBlockFormat_IsValid(const QTextBlockFormat* self) { @@ -809,16 +835,24 @@ int QTextBlockFormat_Marker(const QTextBlockFormat* self) { return static_cast(_ret); } -void QTextBlockFormat_Delete(QTextBlockFormat* self) { - delete self; +void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextListFormat* QTextListFormat_new() { - return new QTextListFormat(); +void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { + QTextListFormat* ret = new QTextListFormat(); + *outptr_QTextListFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextListFormat* QTextListFormat_new2(QTextListFormat* param1) { - return new QTextListFormat(*param1); +void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { + QTextListFormat* ret = new QTextListFormat(*param1); + *outptr_QTextListFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextListFormat_IsValid(const QTextListFormat* self) { @@ -874,12 +908,19 @@ struct miqt_string QTextListFormat_NumberSuffix(const QTextListFormat* self) { return _ms; } -void QTextListFormat_Delete(QTextListFormat* self) { - delete self; +void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextImageFormat* QTextImageFormat_new() { - return new QTextImageFormat(); +void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextImageFormat* ret = new QTextImageFormat(); + *outptr_QTextImageFormat = ret; + *outptr_QTextCharFormat = static_cast(ret); + *outptr_QTextFormat = static_cast(ret); } bool QTextImageFormat_IsValid(const QTextImageFormat* self) { @@ -932,16 +973,24 @@ void QTextImageFormat_SetQuality1(QTextImageFormat* self, int quality) { self->setQuality(static_cast(quality)); } -void QTextImageFormat_Delete(QTextImageFormat* self) { - delete self; +void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFrameFormat* QTextFrameFormat_new() { - return new QTextFrameFormat(); +void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { + QTextFrameFormat* ret = new QTextFrameFormat(); + *outptr_QTextFrameFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1) { - return new QTextFrameFormat(*param1); +void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { + QTextFrameFormat* ret = new QTextFrameFormat(*param1); + *outptr_QTextFrameFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextFrameFormat_IsValid(const QTextFrameFormat* self) { @@ -1070,12 +1119,19 @@ int QTextFrameFormat_PageBreakPolicy(const QTextFrameFormat* self) { return static_cast(_ret); } -void QTextFrameFormat_Delete(QTextFrameFormat* self) { - delete self; +void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextTableFormat* QTextTableFormat_new() { - return new QTextTableFormat(); +void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { + QTextTableFormat* ret = new QTextTableFormat(); + *outptr_QTextTableFormat = ret; + *outptr_QTextFrameFormat = static_cast(ret); + *outptr_QTextFormat = static_cast(ret); } bool QTextTableFormat_IsValid(const QTextTableFormat* self) { @@ -1160,12 +1216,19 @@ bool QTextTableFormat_BorderCollapse(const QTextTableFormat* self) { return self->borderCollapse(); } -void QTextTableFormat_Delete(QTextTableFormat* self) { - delete self; +void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextTableCellFormat* QTextTableCellFormat_new() { - return new QTextTableCellFormat(); +void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextTableCellFormat* ret = new QTextTableCellFormat(); + *outptr_QTextTableCellFormat = ret; + *outptr_QTextCharFormat = static_cast(ret); + *outptr_QTextFormat = static_cast(ret); } bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self) { @@ -1328,7 +1391,11 @@ void QTextTableCellFormat_SetBorderBrush(QTextTableCellFormat* self, QBrush* bru self->setBorderBrush(*brush); } -void QTextTableCellFormat_Delete(QTextTableCellFormat* self) { - delete self; +void QTextTableCellFormat_Delete(QTextTableCellFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextformat.go b/qt/gen_qtextformat.go index f704fd89..f42c53f1 100644 --- a/qt/gen_qtextformat.go +++ b/qt/gen_qtextformat.go @@ -250,7 +250,8 @@ const ( ) type QTextLength struct { - h *C.QTextLength + h *C.QTextLength + isSubclass bool } func (this *QTextLength) cPointer() *C.QTextLength { @@ -267,6 +268,7 @@ func (this *QTextLength) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLength constructs the type using only CGO pointers. func newQTextLength(h *C.QTextLength) *QTextLength { if h == nil { return nil @@ -274,26 +276,43 @@ func newQTextLength(h *C.QTextLength) *QTextLength { return &QTextLength{h: h} } +// UnsafeNewQTextLength constructs the type using only unsafe pointers. func UnsafeNewQTextLength(h unsafe.Pointer) *QTextLength { - return newQTextLength((*C.QTextLength)(h)) + if h == nil { + return nil + } + + return &QTextLength{h: (*C.QTextLength)(h)} } // NewQTextLength constructs a new QTextLength object. func NewQTextLength() *QTextLength { - ret := C.QTextLength_new() - return newQTextLength(ret) + var outptr_QTextLength *C.QTextLength = nil + + C.QTextLength_new(&outptr_QTextLength) + ret := newQTextLength(outptr_QTextLength) + ret.isSubclass = true + return ret } // NewQTextLength2 constructs a new QTextLength object. func NewQTextLength2(typeVal QTextLength__Type, value float64) *QTextLength { - ret := C.QTextLength_new2((C.int)(typeVal), (C.double)(value)) - return newQTextLength(ret) + var outptr_QTextLength *C.QTextLength = nil + + C.QTextLength_new2((C.int)(typeVal), (C.double)(value), &outptr_QTextLength) + ret := newQTextLength(outptr_QTextLength) + ret.isSubclass = true + return ret } // NewQTextLength3 constructs a new QTextLength object. func NewQTextLength3(param1 *QTextLength) *QTextLength { - ret := C.QTextLength_new3(param1.cPointer()) - return newQTextLength(ret) + var outptr_QTextLength *C.QTextLength = nil + + C.QTextLength_new3(param1.cPointer(), &outptr_QTextLength) + ret := newQTextLength(outptr_QTextLength) + ret.isSubclass = true + return ret } func (this *QTextLength) Type() QTextLength__Type { @@ -318,7 +337,7 @@ func (this *QTextLength) OperatorNotEqual(other *QTextLength) bool { // Delete this object from C++ memory. func (this *QTextLength) Delete() { - C.QTextLength_Delete(this.h) + C.QTextLength_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -331,7 +350,8 @@ func (this *QTextLength) GoGC() { } type QTextFormat struct { - h *C.QTextFormat + h *C.QTextFormat + isSubclass bool } func (this *QTextFormat) cPointer() *C.QTextFormat { @@ -348,6 +368,7 @@ func (this *QTextFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFormat constructs the type using only CGO pointers. func newQTextFormat(h *C.QTextFormat) *QTextFormat { if h == nil { return nil @@ -355,26 +376,43 @@ func newQTextFormat(h *C.QTextFormat) *QTextFormat { return &QTextFormat{h: h} } +// UnsafeNewQTextFormat constructs the type using only unsafe pointers. func UnsafeNewQTextFormat(h unsafe.Pointer) *QTextFormat { - return newQTextFormat((*C.QTextFormat)(h)) + if h == nil { + return nil + } + + return &QTextFormat{h: (*C.QTextFormat)(h)} } // NewQTextFormat constructs a new QTextFormat object. func NewQTextFormat() *QTextFormat { - ret := C.QTextFormat_new() - return newQTextFormat(ret) + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFormat_new(&outptr_QTextFormat) + ret := newQTextFormat(outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextFormat2 constructs a new QTextFormat object. func NewQTextFormat2(typeVal int) *QTextFormat { - ret := C.QTextFormat_new2((C.int)(typeVal)) - return newQTextFormat(ret) + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFormat_new2((C.int)(typeVal), &outptr_QTextFormat) + ret := newQTextFormat(outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextFormat3 constructs a new QTextFormat object. func NewQTextFormat3(rhs *QTextFormat) *QTextFormat { - ret := C.QTextFormat_new3(rhs.cPointer()) - return newQTextFormat(ret) + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFormat_new3(rhs.cPointer(), &outptr_QTextFormat) + ret := newQTextFormat(outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextFormat) OperatorAssign(rhs *QTextFormat) { @@ -558,49 +596,49 @@ func (this *QTextFormat) IsTableCellFormat() bool { func (this *QTextFormat) ToBlockFormat() *QTextBlockFormat { _ret := C.QTextFormat_ToBlockFormat(this.h) - _goptr := newQTextBlockFormat(_ret) + _goptr := newQTextBlockFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToCharFormat() *QTextCharFormat { _ret := C.QTextFormat_ToCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToListFormat() *QTextListFormat { _ret := C.QTextFormat_ToListFormat(this.h) - _goptr := newQTextListFormat(_ret) + _goptr := newQTextListFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableFormat() *QTextTableFormat { _ret := C.QTextFormat_ToTableFormat(this.h) - _goptr := newQTextTableFormat(_ret) + _goptr := newQTextTableFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToFrameFormat() *QTextFrameFormat { _ret := C.QTextFormat_ToFrameFormat(this.h) - _goptr := newQTextFrameFormat(_ret) + _goptr := newQTextFrameFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToImageFormat() *QTextImageFormat { _ret := C.QTextFormat_ToImageFormat(this.h) - _goptr := newQTextImageFormat(_ret) + _goptr := newQTextImageFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableCellFormat() *QTextTableCellFormat { _ret := C.QTextFormat_ToTableCellFormat(this.h) - _goptr := newQTextTableCellFormat(_ret) + _goptr := newQTextTableCellFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -653,7 +691,7 @@ func (this *QTextFormat) ClearForeground() { // Delete this object from C++ memory. func (this *QTextFormat) Delete() { - C.QTextFormat_Delete(this.h) + C.QTextFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -666,7 +704,8 @@ func (this *QTextFormat) GoGC() { } type QTextCharFormat struct { - h *C.QTextCharFormat + h *C.QTextCharFormat + isSubclass bool *QTextFormat } @@ -684,27 +723,45 @@ func (this *QTextCharFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextCharFormat(h *C.QTextCharFormat) *QTextCharFormat { +// newQTextCharFormat constructs the type using only CGO pointers. +func newQTextCharFormat(h *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextCharFormat { if h == nil { return nil } - return &QTextCharFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextCharFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextCharFormat(h unsafe.Pointer) *QTextCharFormat { - return newQTextCharFormat((*C.QTextCharFormat)(h)) +// UnsafeNewQTextCharFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextCharFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextCharFormat { + if h == nil { + return nil + } + + return &QTextCharFormat{h: (*C.QTextCharFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextCharFormat constructs a new QTextCharFormat object. func NewQTextCharFormat() *QTextCharFormat { - ret := C.QTextCharFormat_new() - return newQTextCharFormat(ret) + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextCharFormat_new(&outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextCharFormat2 constructs a new QTextCharFormat object. func NewQTextCharFormat2(param1 *QTextCharFormat) *QTextCharFormat { - ret := C.QTextCharFormat_new2(param1.cPointer()) - return newQTextCharFormat(ret) + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextCharFormat_new2(param1.cPointer(), &outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextCharFormat) IsValid() bool { @@ -1045,7 +1102,7 @@ func (this *QTextCharFormat) SetFontStyleHint2(hint QFont__StyleHint, strategy Q // Delete this object from C++ memory. func (this *QTextCharFormat) Delete() { - C.QTextCharFormat_Delete(this.h) + C.QTextCharFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1058,7 +1115,8 @@ func (this *QTextCharFormat) GoGC() { } type QTextBlockFormat struct { - h *C.QTextBlockFormat + h *C.QTextBlockFormat + isSubclass bool *QTextFormat } @@ -1076,27 +1134,45 @@ func (this *QTextBlockFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextBlockFormat(h *C.QTextBlockFormat) *QTextBlockFormat { +// newQTextBlockFormat constructs the type using only CGO pointers. +func newQTextBlockFormat(h *C.QTextBlockFormat, h_QTextFormat *C.QTextFormat) *QTextBlockFormat { if h == nil { return nil } - return &QTextBlockFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextBlockFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextBlockFormat(h unsafe.Pointer) *QTextBlockFormat { - return newQTextBlockFormat((*C.QTextBlockFormat)(h)) +// UnsafeNewQTextBlockFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextBlockFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextBlockFormat { + if h == nil { + return nil + } + + return &QTextBlockFormat{h: (*C.QTextBlockFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextBlockFormat constructs a new QTextBlockFormat object. func NewQTextBlockFormat() *QTextBlockFormat { - ret := C.QTextBlockFormat_new() - return newQTextBlockFormat(ret) + var outptr_QTextBlockFormat *C.QTextBlockFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextBlockFormat_new(&outptr_QTextBlockFormat, &outptr_QTextFormat) + ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextBlockFormat2 constructs a new QTextBlockFormat object. func NewQTextBlockFormat2(param1 *QTextBlockFormat) *QTextBlockFormat { - ret := C.QTextBlockFormat_new2(param1.cPointer()) - return newQTextBlockFormat(ret) + var outptr_QTextBlockFormat *C.QTextBlockFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextBlockFormat_new2(param1.cPointer(), &outptr_QTextBlockFormat, &outptr_QTextFormat) + ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextBlockFormat) IsValid() bool { @@ -1232,7 +1308,7 @@ func (this *QTextBlockFormat) Marker() QTextBlockFormat__MarkerType { // Delete this object from C++ memory. func (this *QTextBlockFormat) Delete() { - C.QTextBlockFormat_Delete(this.h) + C.QTextBlockFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1245,7 +1321,8 @@ func (this *QTextBlockFormat) GoGC() { } type QTextListFormat struct { - h *C.QTextListFormat + h *C.QTextListFormat + isSubclass bool *QTextFormat } @@ -1263,27 +1340,45 @@ func (this *QTextListFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextListFormat(h *C.QTextListFormat) *QTextListFormat { +// newQTextListFormat constructs the type using only CGO pointers. +func newQTextListFormat(h *C.QTextListFormat, h_QTextFormat *C.QTextFormat) *QTextListFormat { if h == nil { return nil } - return &QTextListFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextListFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextListFormat(h unsafe.Pointer) *QTextListFormat { - return newQTextListFormat((*C.QTextListFormat)(h)) +// UnsafeNewQTextListFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextListFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextListFormat { + if h == nil { + return nil + } + + return &QTextListFormat{h: (*C.QTextListFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextListFormat constructs a new QTextListFormat object. func NewQTextListFormat() *QTextListFormat { - ret := C.QTextListFormat_new() - return newQTextListFormat(ret) + var outptr_QTextListFormat *C.QTextListFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextListFormat_new(&outptr_QTextListFormat, &outptr_QTextFormat) + ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextListFormat2 constructs a new QTextListFormat object. func NewQTextListFormat2(param1 *QTextListFormat) *QTextListFormat { - ret := C.QTextListFormat_new2(param1.cPointer()) - return newQTextListFormat(ret) + var outptr_QTextListFormat *C.QTextListFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextListFormat_new2(param1.cPointer(), &outptr_QTextListFormat, &outptr_QTextFormat) + ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextListFormat) IsValid() bool { @@ -1338,7 +1433,7 @@ func (this *QTextListFormat) NumberSuffix() string { // Delete this object from C++ memory. func (this *QTextListFormat) Delete() { - C.QTextListFormat_Delete(this.h) + C.QTextListFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1351,7 +1446,8 @@ func (this *QTextListFormat) GoGC() { } type QTextImageFormat struct { - h *C.QTextImageFormat + h *C.QTextImageFormat + isSubclass bool *QTextCharFormat } @@ -1369,21 +1465,35 @@ func (this *QTextImageFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextImageFormat(h *C.QTextImageFormat) *QTextImageFormat { +// newQTextImageFormat constructs the type using only CGO pointers. +func newQTextImageFormat(h *C.QTextImageFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextImageFormat { if h == nil { return nil } - return &QTextImageFormat{h: h, QTextCharFormat: UnsafeNewQTextCharFormat(unsafe.Pointer(h))} + return &QTextImageFormat{h: h, + QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } -func UnsafeNewQTextImageFormat(h unsafe.Pointer) *QTextImageFormat { - return newQTextImageFormat((*C.QTextImageFormat)(h)) +// UnsafeNewQTextImageFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextImageFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextImageFormat { + if h == nil { + return nil + } + + return &QTextImageFormat{h: (*C.QTextImageFormat)(h), + QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } // NewQTextImageFormat constructs a new QTextImageFormat object. func NewQTextImageFormat() *QTextImageFormat { - ret := C.QTextImageFormat_new() - return newQTextImageFormat(ret) + var outptr_QTextImageFormat *C.QTextImageFormat = nil + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextImageFormat_new(&outptr_QTextImageFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextImageFormat(outptr_QTextImageFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextImageFormat) IsValid() bool { @@ -1435,7 +1545,7 @@ func (this *QTextImageFormat) SetQuality1(quality int) { // Delete this object from C++ memory. func (this *QTextImageFormat) Delete() { - C.QTextImageFormat_Delete(this.h) + C.QTextImageFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1448,7 +1558,8 @@ func (this *QTextImageFormat) GoGC() { } type QTextFrameFormat struct { - h *C.QTextFrameFormat + h *C.QTextFrameFormat + isSubclass bool *QTextFormat } @@ -1466,27 +1577,45 @@ func (this *QTextFrameFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextFrameFormat(h *C.QTextFrameFormat) *QTextFrameFormat { +// newQTextFrameFormat constructs the type using only CGO pointers. +func newQTextFrameFormat(h *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextFrameFormat { if h == nil { return nil } - return &QTextFrameFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextFrameFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextFrameFormat(h unsafe.Pointer) *QTextFrameFormat { - return newQTextFrameFormat((*C.QTextFrameFormat)(h)) +// UnsafeNewQTextFrameFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextFrameFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextFrameFormat { + if h == nil { + return nil + } + + return &QTextFrameFormat{h: (*C.QTextFrameFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextFrameFormat constructs a new QTextFrameFormat object. func NewQTextFrameFormat() *QTextFrameFormat { - ret := C.QTextFrameFormat_new() - return newQTextFrameFormat(ret) + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFrameFormat_new(&outptr_QTextFrameFormat, &outptr_QTextFormat) + ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextFrameFormat2 constructs a new QTextFrameFormat object. func NewQTextFrameFormat2(param1 *QTextFrameFormat) *QTextFrameFormat { - ret := C.QTextFrameFormat_new2(param1.cPointer()) - return newQTextFrameFormat(ret) + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFrameFormat_new2(param1.cPointer(), &outptr_QTextFrameFormat, &outptr_QTextFormat) + ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextFrameFormat) IsValid() bool { @@ -1616,7 +1745,7 @@ func (this *QTextFrameFormat) PageBreakPolicy() QTextFormat__PageBreakFlag { // Delete this object from C++ memory. func (this *QTextFrameFormat) Delete() { - C.QTextFrameFormat_Delete(this.h) + C.QTextFrameFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1629,7 +1758,8 @@ func (this *QTextFrameFormat) GoGC() { } type QTextTableFormat struct { - h *C.QTextTableFormat + h *C.QTextTableFormat + isSubclass bool *QTextFrameFormat } @@ -1647,21 +1777,35 @@ func (this *QTextTableFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextTableFormat(h *C.QTextTableFormat) *QTextTableFormat { +// newQTextTableFormat constructs the type using only CGO pointers. +func newQTextTableFormat(h *C.QTextTableFormat, h_QTextFrameFormat *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextTableFormat { if h == nil { return nil } - return &QTextTableFormat{h: h, QTextFrameFormat: UnsafeNewQTextFrameFormat(unsafe.Pointer(h))} + return &QTextTableFormat{h: h, + QTextFrameFormat: newQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} } -func UnsafeNewQTextTableFormat(h unsafe.Pointer) *QTextTableFormat { - return newQTextTableFormat((*C.QTextTableFormat)(h)) +// UnsafeNewQTextTableFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextTableFormat(h unsafe.Pointer, h_QTextFrameFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableFormat { + if h == nil { + return nil + } + + return &QTextTableFormat{h: (*C.QTextTableFormat)(h), + QTextFrameFormat: UnsafeNewQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} } // NewQTextTableFormat constructs a new QTextTableFormat object. func NewQTextTableFormat() *QTextTableFormat { - ret := C.QTextTableFormat_new() - return newQTextTableFormat(ret) + var outptr_QTextTableFormat *C.QTextTableFormat = nil + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextTableFormat_new(&outptr_QTextTableFormat, &outptr_QTextFrameFormat, &outptr_QTextFormat) + ret := newQTextTableFormat(outptr_QTextTableFormat, outptr_QTextFrameFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextTableFormat) IsValid() bool { @@ -1745,7 +1889,7 @@ func (this *QTextTableFormat) BorderCollapse() bool { // Delete this object from C++ memory. func (this *QTextTableFormat) Delete() { - C.QTextTableFormat_Delete(this.h) + C.QTextTableFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1758,7 +1902,8 @@ func (this *QTextTableFormat) GoGC() { } type QTextTableCellFormat struct { - h *C.QTextTableCellFormat + h *C.QTextTableCellFormat + isSubclass bool *QTextCharFormat } @@ -1776,21 +1921,35 @@ func (this *QTextTableCellFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextTableCellFormat(h *C.QTextTableCellFormat) *QTextTableCellFormat { +// newQTextTableCellFormat constructs the type using only CGO pointers. +func newQTextTableCellFormat(h *C.QTextTableCellFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextTableCellFormat { if h == nil { return nil } - return &QTextTableCellFormat{h: h, QTextCharFormat: UnsafeNewQTextCharFormat(unsafe.Pointer(h))} + return &QTextTableCellFormat{h: h, + QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } -func UnsafeNewQTextTableCellFormat(h unsafe.Pointer) *QTextTableCellFormat { - return newQTextTableCellFormat((*C.QTextTableCellFormat)(h)) +// UnsafeNewQTextTableCellFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextTableCellFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableCellFormat { + if h == nil { + return nil + } + + return &QTextTableCellFormat{h: (*C.QTextTableCellFormat)(h), + QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } // NewQTextTableCellFormat constructs a new QTextTableCellFormat object. func NewQTextTableCellFormat() *QTextTableCellFormat { - ret := C.QTextTableCellFormat_new() - return newQTextTableCellFormat(ret) + var outptr_QTextTableCellFormat *C.QTextTableCellFormat = nil + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextTableCellFormat_new(&outptr_QTextTableCellFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextTableCellFormat(outptr_QTextTableCellFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextTableCellFormat) IsValid() bool { @@ -1955,7 +2114,7 @@ func (this *QTextTableCellFormat) SetBorderBrush(brush *QBrush) { // Delete this object from C++ memory. func (this *QTextTableCellFormat) Delete() { - C.QTextTableCellFormat_Delete(this.h) + C.QTextTableCellFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextformat.h b/qt/gen_qtextformat.h index f21e9f09..d6bec3f1 100644 --- a/qt/gen_qtextformat.h +++ b/qt/gen_qtextformat.h @@ -52,19 +52,19 @@ typedef struct QTextTableFormat QTextTableFormat; typedef struct QVariant QVariant; #endif -QTextLength* QTextLength_new(); -QTextLength* QTextLength_new2(int typeVal, double value); -QTextLength* QTextLength_new3(QTextLength* param1); +void QTextLength_new(QTextLength** outptr_QTextLength); +void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength); +void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength); int QTextLength_Type(const QTextLength* self); double QTextLength_Value(const QTextLength* self, double maximumLength); double QTextLength_RawValue(const QTextLength* self); bool QTextLength_OperatorEqual(const QTextLength* self, QTextLength* other); bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other); -void QTextLength_Delete(QTextLength* self); +void QTextLength_Delete(QTextLength* self, bool isSubclass); -QTextFormat* QTextFormat_new(); -QTextFormat* QTextFormat_new2(int typeVal); -QTextFormat* QTextFormat_new3(QTextFormat* rhs); +void QTextFormat_new(QTextFormat** outptr_QTextFormat); +void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat); +void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat); void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs); void QTextFormat_Swap(QTextFormat* self, QTextFormat* other); void QTextFormat_Merge(QTextFormat* self, QTextFormat* other); @@ -115,10 +115,10 @@ void QTextFormat_ClearBackground(QTextFormat* self); void QTextFormat_SetForeground(QTextFormat* self, QBrush* brush); QBrush* QTextFormat_Foreground(const QTextFormat* self); void QTextFormat_ClearForeground(QTextFormat* self); -void QTextFormat_Delete(QTextFormat* self); +void QTextFormat_Delete(QTextFormat* self, bool isSubclass); -QTextCharFormat* QTextCharFormat_new(); -QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1); +void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); bool QTextCharFormat_IsValid(const QTextCharFormat* self); void QTextCharFormat_SetFont(QTextCharFormat* self, QFont* font, int behavior); void QTextCharFormat_SetFontWithFont(QTextCharFormat* self, QFont* font); @@ -184,10 +184,10 @@ int QTextCharFormat_TableCellRowSpan(const QTextCharFormat* self); void QTextCharFormat_SetTableCellColumnSpan(QTextCharFormat* self, int tableCellColumnSpan); int QTextCharFormat_TableCellColumnSpan(const QTextCharFormat* self); void QTextCharFormat_SetFontStyleHint2(QTextCharFormat* self, int hint, int strategy); -void QTextCharFormat_Delete(QTextCharFormat* self); +void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass); -QTextBlockFormat* QTextBlockFormat_new(); -QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1); +void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); +void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); bool QTextBlockFormat_IsValid(const QTextBlockFormat* self); void QTextBlockFormat_SetAlignment(QTextBlockFormat* self, int alignment); int QTextBlockFormat_Alignment(const QTextBlockFormat* self); @@ -217,10 +217,10 @@ void QTextBlockFormat_SetTabPositions(QTextBlockFormat* self, struct miqt_array struct miqt_array /* of QTextOption__Tab* */ QTextBlockFormat_TabPositions(const QTextBlockFormat* self); void QTextBlockFormat_SetMarker(QTextBlockFormat* self, int marker); int QTextBlockFormat_Marker(const QTextBlockFormat* self); -void QTextBlockFormat_Delete(QTextBlockFormat* self); +void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass); -QTextListFormat* QTextListFormat_new(); -QTextListFormat* QTextListFormat_new2(QTextListFormat* param1); +void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); +void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); bool QTextListFormat_IsValid(const QTextListFormat* self); void QTextListFormat_SetStyle(QTextListFormat* self, int style); int QTextListFormat_Style(const QTextListFormat* self); @@ -230,9 +230,9 @@ void QTextListFormat_SetNumberPrefix(QTextListFormat* self, struct miqt_string n struct miqt_string QTextListFormat_NumberPrefix(const QTextListFormat* self); void QTextListFormat_SetNumberSuffix(QTextListFormat* self, struct miqt_string numberSuffix); struct miqt_string QTextListFormat_NumberSuffix(const QTextListFormat* self); -void QTextListFormat_Delete(QTextListFormat* self); +void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass); -QTextImageFormat* QTextImageFormat_new(); +void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); bool QTextImageFormat_IsValid(const QTextImageFormat* self); void QTextImageFormat_SetName(QTextImageFormat* self, struct miqt_string name); struct miqt_string QTextImageFormat_Name(const QTextImageFormat* self); @@ -243,10 +243,10 @@ double QTextImageFormat_Height(const QTextImageFormat* self); void QTextImageFormat_SetQuality(QTextImageFormat* self); int QTextImageFormat_Quality(const QTextImageFormat* self); void QTextImageFormat_SetQuality1(QTextImageFormat* self, int quality); -void QTextImageFormat_Delete(QTextImageFormat* self); +void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass); -QTextFrameFormat* QTextFrameFormat_new(); -QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1); +void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); +void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); bool QTextFrameFormat_IsValid(const QTextFrameFormat* self); void QTextFrameFormat_SetPosition(QTextFrameFormat* self, int f); int QTextFrameFormat_Position(const QTextFrameFormat* self); @@ -276,9 +276,9 @@ void QTextFrameFormat_SetHeightWithHeight(QTextFrameFormat* self, QTextLength* h QTextLength* QTextFrameFormat_Height(const QTextFrameFormat* self); void QTextFrameFormat_SetPageBreakPolicy(QTextFrameFormat* self, int flags); int QTextFrameFormat_PageBreakPolicy(const QTextFrameFormat* self); -void QTextFrameFormat_Delete(QTextFrameFormat* self); +void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass); -QTextTableFormat* QTextTableFormat_new(); +void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); bool QTextTableFormat_IsValid(const QTextTableFormat* self); int QTextTableFormat_Columns(const QTextTableFormat* self); void QTextTableFormat_SetColumns(QTextTableFormat* self, int columns); @@ -295,9 +295,9 @@ void QTextTableFormat_SetHeaderRowCount(QTextTableFormat* self, int count); int QTextTableFormat_HeaderRowCount(const QTextTableFormat* self); void QTextTableFormat_SetBorderCollapse(QTextTableFormat* self, bool borderCollapse); bool QTextTableFormat_BorderCollapse(const QTextTableFormat* self); -void QTextTableFormat_Delete(QTextTableFormat* self); +void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass); -QTextTableCellFormat* QTextTableCellFormat_new(); +void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self); void QTextTableCellFormat_SetTopPadding(QTextTableCellFormat* self, double padding); double QTextTableCellFormat_TopPadding(const QTextTableCellFormat* self); @@ -335,7 +335,7 @@ QBrush* QTextTableCellFormat_LeftBorderBrush(const QTextTableCellFormat* self); void QTextTableCellFormat_SetRightBorderBrush(QTextTableCellFormat* self, QBrush* brush); QBrush* QTextTableCellFormat_RightBorderBrush(const QTextTableCellFormat* self); void QTextTableCellFormat_SetBorderBrush(QTextTableCellFormat* self, QBrush* brush); -void QTextTableCellFormat_Delete(QTextTableCellFormat* self); +void QTextTableCellFormat_Delete(QTextTableCellFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextlayout.cpp b/qt/gen_qtextlayout.cpp index fd7d30f2..21c95f5f 100644 --- a/qt/gen_qtextlayout.cpp +++ b/qt/gen_qtextlayout.cpp @@ -20,8 +20,9 @@ #include "gen_qtextlayout.h" #include "_cgo_export.h" -QTextInlineObject* QTextInlineObject_new() { - return new QTextInlineObject(); +void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject) { + QTextInlineObject* ret = new QTextInlineObject(); + *outptr_QTextInlineObject = ret; } bool QTextInlineObject_IsValid(const QTextInlineObject* self) { @@ -81,31 +82,40 @@ QTextFormat* QTextInlineObject_Format(const QTextInlineObject* self) { return new QTextFormat(self->format()); } -void QTextInlineObject_Delete(QTextInlineObject* self) { - delete self; +void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextLayout* QTextLayout_new() { - return new QTextLayout(); +void QTextLayout_new(QTextLayout** outptr_QTextLayout) { + QTextLayout* ret = new QTextLayout(); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new2(struct miqt_string text) { +void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextLayout(text_QString); + QTextLayout* ret = new QTextLayout(text_QString); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font) { +void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextLayout(text_QString, *font); + QTextLayout* ret = new QTextLayout(text_QString, *font); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new4(QTextBlock* b) { - return new QTextLayout(*b); +void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout) { + QTextLayout* ret = new QTextLayout(*b); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice) { +void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextLayout(text_QString, *font, paintdevice); + QTextLayout* ret = new QTextLayout(text_QString, *font, paintdevice); + *outptr_QTextLayout = ret; } void QTextLayout_SetFont(QTextLayout* self, QFont* f) { @@ -390,12 +400,17 @@ struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns2(const QTextLayout* return _out; } -void QTextLayout_Delete(QTextLayout* self) { - delete self; +void QTextLayout_Delete(QTextLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextLine* QTextLine_new() { - return new QTextLine(); +void QTextLine_new(QTextLine** outptr_QTextLine) { + QTextLine* ret = new QTextLine(); + *outptr_QTextLine = ret; } bool QTextLine_IsValid(const QTextLine* self) { @@ -570,11 +585,19 @@ struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns2(const QTextLine* sel return _out; } -void QTextLine_Delete(QTextLine* self) { - delete self; +void QTextLine_Delete(QTextLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self) { - delete self; +void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextlayout.go b/qt/gen_qtextlayout.go index 6d5cd1f3..564fb495 100644 --- a/qt/gen_qtextlayout.go +++ b/qt/gen_qtextlayout.go @@ -35,7 +35,8 @@ const ( ) type QTextInlineObject struct { - h *C.QTextInlineObject + h *C.QTextInlineObject + isSubclass bool } func (this *QTextInlineObject) cPointer() *C.QTextInlineObject { @@ -52,6 +53,7 @@ func (this *QTextInlineObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextInlineObject constructs the type using only CGO pointers. func newQTextInlineObject(h *C.QTextInlineObject) *QTextInlineObject { if h == nil { return nil @@ -59,14 +61,23 @@ func newQTextInlineObject(h *C.QTextInlineObject) *QTextInlineObject { return &QTextInlineObject{h: h} } +// UnsafeNewQTextInlineObject constructs the type using only unsafe pointers. func UnsafeNewQTextInlineObject(h unsafe.Pointer) *QTextInlineObject { - return newQTextInlineObject((*C.QTextInlineObject)(h)) + if h == nil { + return nil + } + + return &QTextInlineObject{h: (*C.QTextInlineObject)(h)} } // NewQTextInlineObject constructs a new QTextInlineObject object. func NewQTextInlineObject() *QTextInlineObject { - ret := C.QTextInlineObject_new() - return newQTextInlineObject(ret) + var outptr_QTextInlineObject *C.QTextInlineObject = nil + + C.QTextInlineObject_new(&outptr_QTextInlineObject) + ret := newQTextInlineObject(outptr_QTextInlineObject) + ret.isSubclass = true + return ret } func (this *QTextInlineObject) IsValid() bool { @@ -129,7 +140,7 @@ func (this *QTextInlineObject) Format() *QTextFormat { // Delete this object from C++ memory. func (this *QTextInlineObject) Delete() { - C.QTextInlineObject_Delete(this.h) + C.QTextInlineObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -142,7 +153,8 @@ func (this *QTextInlineObject) GoGC() { } type QTextLayout struct { - h *C.QTextLayout + h *C.QTextLayout + isSubclass bool } func (this *QTextLayout) cPointer() *C.QTextLayout { @@ -159,6 +171,7 @@ func (this *QTextLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLayout constructs the type using only CGO pointers. func newQTextLayout(h *C.QTextLayout) *QTextLayout { if h == nil { return nil @@ -166,14 +179,23 @@ func newQTextLayout(h *C.QTextLayout) *QTextLayout { return &QTextLayout{h: h} } +// UnsafeNewQTextLayout constructs the type using only unsafe pointers. func UnsafeNewQTextLayout(h unsafe.Pointer) *QTextLayout { - return newQTextLayout((*C.QTextLayout)(h)) + if h == nil { + return nil + } + + return &QTextLayout{h: (*C.QTextLayout)(h)} } // NewQTextLayout constructs a new QTextLayout object. func NewQTextLayout() *QTextLayout { - ret := C.QTextLayout_new() - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new(&outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout2 constructs a new QTextLayout object. @@ -182,8 +204,12 @@ func NewQTextLayout2(text string) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextLayout_new2(text_ms) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new2(text_ms, &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout3 constructs a new QTextLayout object. @@ -192,14 +218,22 @@ func NewQTextLayout3(text string, font *QFont) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextLayout_new3(text_ms, font.cPointer()) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new3(text_ms, font.cPointer(), &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout4 constructs a new QTextLayout object. func NewQTextLayout4(b *QTextBlock) *QTextLayout { - ret := C.QTextLayout_new4(b.cPointer()) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new4(b.cPointer(), &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout5 constructs a new QTextLayout object. @@ -208,8 +242,12 @@ func NewQTextLayout5(text string, font *QFont, paintdevice *QPaintDevice) *QText text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer()) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer(), &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } func (this *QTextLayout) SetFont(f *QFont) { @@ -507,7 +545,7 @@ func (this *QTextLayout) GlyphRuns2(from int, length int) []QGlyphRun { // Delete this object from C++ memory. func (this *QTextLayout) Delete() { - C.QTextLayout_Delete(this.h) + C.QTextLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -520,7 +558,8 @@ func (this *QTextLayout) GoGC() { } type QTextLine struct { - h *C.QTextLine + h *C.QTextLine + isSubclass bool } func (this *QTextLine) cPointer() *C.QTextLine { @@ -537,6 +576,7 @@ func (this *QTextLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLine constructs the type using only CGO pointers. func newQTextLine(h *C.QTextLine) *QTextLine { if h == nil { return nil @@ -544,14 +584,23 @@ func newQTextLine(h *C.QTextLine) *QTextLine { return &QTextLine{h: h} } +// UnsafeNewQTextLine constructs the type using only unsafe pointers. func UnsafeNewQTextLine(h unsafe.Pointer) *QTextLine { - return newQTextLine((*C.QTextLine)(h)) + if h == nil { + return nil + } + + return &QTextLine{h: (*C.QTextLine)(h)} } // NewQTextLine constructs a new QTextLine object. func NewQTextLine() *QTextLine { - ret := C.QTextLine_new() - return newQTextLine(ret) + var outptr_QTextLine *C.QTextLine = nil + + C.QTextLine_new(&outptr_QTextLine) + ret := newQTextLine(outptr_QTextLine) + ret.isSubclass = true + return ret } func (this *QTextLine) IsValid() bool { @@ -724,7 +773,7 @@ func (this *QTextLine) GlyphRuns2(from int, length int) []QGlyphRun { // Delete this object from C++ memory. func (this *QTextLine) Delete() { - C.QTextLine_Delete(this.h) + C.QTextLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -737,7 +786,8 @@ func (this *QTextLine) GoGC() { } type QTextLayout__FormatRange struct { - h *C.QTextLayout__FormatRange + h *C.QTextLayout__FormatRange + isSubclass bool } func (this *QTextLayout__FormatRange) cPointer() *C.QTextLayout__FormatRange { @@ -754,6 +804,7 @@ func (this *QTextLayout__FormatRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLayout__FormatRange constructs the type using only CGO pointers. func newQTextLayout__FormatRange(h *C.QTextLayout__FormatRange) *QTextLayout__FormatRange { if h == nil { return nil @@ -761,13 +812,18 @@ func newQTextLayout__FormatRange(h *C.QTextLayout__FormatRange) *QTextLayout__Fo return &QTextLayout__FormatRange{h: h} } +// UnsafeNewQTextLayout__FormatRange constructs the type using only unsafe pointers. func UnsafeNewQTextLayout__FormatRange(h unsafe.Pointer) *QTextLayout__FormatRange { - return newQTextLayout__FormatRange((*C.QTextLayout__FormatRange)(h)) + if h == nil { + return nil + } + + return &QTextLayout__FormatRange{h: (*C.QTextLayout__FormatRange)(h)} } // Delete this object from C++ memory. func (this *QTextLayout__FormatRange) Delete() { - C.QTextLayout__FormatRange_Delete(this.h) + C.QTextLayout__FormatRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextlayout.h b/qt/gen_qtextlayout.h index 34e42c75..c4406649 100644 --- a/qt/gen_qtextlayout.h +++ b/qt/gen_qtextlayout.h @@ -50,7 +50,7 @@ typedef struct QTextLine QTextLine; typedef struct QTextOption QTextOption; #endif -QTextInlineObject* QTextInlineObject_new(); +void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject); bool QTextInlineObject_IsValid(const QTextInlineObject* self); QRectF* QTextInlineObject_Rect(const QTextInlineObject* self); double QTextInlineObject_Width(const QTextInlineObject* self); @@ -64,13 +64,13 @@ void QTextInlineObject_SetDescent(QTextInlineObject* self, double d); int QTextInlineObject_TextPosition(const QTextInlineObject* self); int QTextInlineObject_FormatIndex(const QTextInlineObject* self); QTextFormat* QTextInlineObject_Format(const QTextInlineObject* self); -void QTextInlineObject_Delete(QTextInlineObject* self); +void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass); -QTextLayout* QTextLayout_new(); -QTextLayout* QTextLayout_new2(struct miqt_string text); -QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font); -QTextLayout* QTextLayout_new4(QTextBlock* b); -QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice); +void QTextLayout_new(QTextLayout** outptr_QTextLayout); +void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout); +void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout); +void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout); +void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout); void QTextLayout_SetFont(QTextLayout* self, QFont* f); QFont* QTextLayout_Font(const QTextLayout* self); void QTextLayout_SetRawFont(QTextLayout* self, QRawFont* rawFont); @@ -119,9 +119,9 @@ void QTextLayout_Draw3(const QTextLayout* self, QPainter* p, QPointF* pos, struc void QTextLayout_Draw4(const QTextLayout* self, QPainter* p, QPointF* pos, struct miqt_array /* of QTextLayout__FormatRange* */ selections, QRectF* clip); struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns1(const QTextLayout* self, int from); struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns2(const QTextLayout* self, int from, int length); -void QTextLayout_Delete(QTextLayout* self); +void QTextLayout_Delete(QTextLayout* self, bool isSubclass); -QTextLine* QTextLine_new(); +void QTextLine_new(QTextLine** outptr_QTextLine); bool QTextLine_IsValid(const QTextLine* self); QRectF* QTextLine_Rect(const QTextLine* self); double QTextLine_X(const QTextLine* self); @@ -155,9 +155,9 @@ int QTextLine_XToCursor2(const QTextLine* self, double x, int param2); void QTextLine_Draw3(const QTextLine* self, QPainter* p, QPointF* point, QTextLayout__FormatRange* selection); struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns1(const QTextLine* self, int from); struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns2(const QTextLine* self, int from, int length); -void QTextLine_Delete(QTextLine* self); +void QTextLine_Delete(QTextLine* self, bool isSubclass); -void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self); +void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextlist.cpp b/qt/gen_qtextlist.cpp index 262e1008..0c144cee 100644 --- a/qt/gen_qtextlist.cpp +++ b/qt/gen_qtextlist.cpp @@ -1,17 +1,111 @@ #include +#include #include #include #include #include +#include #include #include #include +#include #include #include "gen_qtextlist.h" #include "_cgo_export.h" -QTextList* QTextList_new(QTextDocument* doc) { - return new QTextList(doc); +class MiqtVirtualQTextList : public virtual QTextList { +public: + + MiqtVirtualQTextList(QTextDocument* doc): QTextList(doc) {}; + + virtual ~MiqtVirtualQTextList() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void blockInserted(const QTextBlock& block) override { + if (handle__BlockInserted == 0) { + QTextList::blockInserted(block); + return; + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + miqt_exec_callback_QTextList_BlockInserted(this, handle__BlockInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BlockInserted(QTextBlock* block) { + + QTextList::blockInserted(*block); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void blockRemoved(const QTextBlock& block) override { + if (handle__BlockRemoved == 0) { + QTextList::blockRemoved(block); + return; + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + miqt_exec_callback_QTextList_BlockRemoved(this, handle__BlockRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BlockRemoved(QTextBlock* block) { + + QTextList::blockRemoved(*block); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockFormatChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void blockFormatChanged(const QTextBlock& block) override { + if (handle__BlockFormatChanged == 0) { + QTextList::blockFormatChanged(block); + return; + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + miqt_exec_callback_QTextList_BlockFormatChanged(this, handle__BlockFormatChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BlockFormatChanged(QTextBlock* block) { + + QTextList::blockFormatChanged(*block); + + } + +}; + +void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { + MiqtVirtualQTextList* ret = new MiqtVirtualQTextList(doc); + *outptr_QTextList = ret; + *outptr_QTextBlockGroup = static_cast(ret); + *outptr_QTextObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTextList_MetaObject(const QTextList* self) { @@ -135,7 +229,35 @@ struct miqt_string QTextList_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTextList_Delete(QTextList* self) { - delete self; +void QTextList_override_virtual_BlockInserted(void* self, intptr_t slot) { + dynamic_cast( (QTextList*)(self) )->handle__BlockInserted = slot; +} + +void QTextList_virtualbase_BlockInserted(void* self, QTextBlock* block) { + ( (MiqtVirtualQTextList*)(self) )->virtualbase_BlockInserted(block); +} + +void QTextList_override_virtual_BlockRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTextList*)(self) )->handle__BlockRemoved = slot; +} + +void QTextList_virtualbase_BlockRemoved(void* self, QTextBlock* block) { + ( (MiqtVirtualQTextList*)(self) )->virtualbase_BlockRemoved(block); +} + +void QTextList_override_virtual_BlockFormatChanged(void* self, intptr_t slot) { + dynamic_cast( (QTextList*)(self) )->handle__BlockFormatChanged = slot; +} + +void QTextList_virtualbase_BlockFormatChanged(void* self, QTextBlock* block) { + ( (MiqtVirtualQTextList*)(self) )->virtualbase_BlockFormatChanged(block); +} + +void QTextList_Delete(QTextList* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextlist.go b/qt/gen_qtextlist.go index 3aabf720..d900952d 100644 --- a/qt/gen_qtextlist.go +++ b/qt/gen_qtextlist.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTextList struct { - h *C.QTextList + h *C.QTextList + isSubclass bool *QTextBlockGroup } @@ -32,21 +34,36 @@ func (this *QTextList) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextList(h *C.QTextList) *QTextList { +// newQTextList constructs the type using only CGO pointers. +func newQTextList(h *C.QTextList, h_QTextBlockGroup *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextList { if h == nil { return nil } - return &QTextList{h: h, QTextBlockGroup: UnsafeNewQTextBlockGroup(unsafe.Pointer(h))} + return &QTextList{h: h, + QTextBlockGroup: newQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} } -func UnsafeNewQTextList(h unsafe.Pointer) *QTextList { - return newQTextList((*C.QTextList)(h)) +// UnsafeNewQTextList constructs the type using only unsafe pointers. +func UnsafeNewQTextList(h unsafe.Pointer, h_QTextBlockGroup unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextList { + if h == nil { + return nil + } + + return &QTextList{h: (*C.QTextList)(h), + QTextBlockGroup: UnsafeNewQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} } // NewQTextList constructs a new QTextList object. func NewQTextList(doc *QTextDocument) *QTextList { - ret := C.QTextList_new(doc.cPointer()) - return newQTextList(ret) + var outptr_QTextList *C.QTextList = nil + var outptr_QTextBlockGroup *C.QTextBlockGroup = nil + var outptr_QTextObject *C.QTextObject = nil + var outptr_QObject *C.QObject = nil + + C.QTextList_new(doc.cPointer(), &outptr_QTextList, &outptr_QTextBlockGroup, &outptr_QTextObject, &outptr_QObject) + ret := newQTextList(outptr_QTextList, outptr_QTextBlockGroup, outptr_QTextObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextList) MetaObject() *QMetaObject { @@ -121,7 +138,7 @@ func (this *QTextList) SetFormat(format *QTextListFormat) { func (this *QTextList) Format() *QTextListFormat { _ret := C.QTextList_Format(this.h) - _goptr := newQTextListFormat(_ret) + _goptr := newQTextListFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -170,9 +187,78 @@ func QTextList_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTextList) callVirtualBase_BlockInserted(block *QTextBlock) { + + C.QTextList_virtualbase_BlockInserted(unsafe.Pointer(this.h), block.cPointer()) + +} +func (this *QTextList) OnBlockInserted(slot func(super func(block *QTextBlock), block *QTextBlock)) { + C.QTextList_override_virtual_BlockInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextList_BlockInserted +func miqt_exec_callback_QTextList_BlockInserted(self *C.QTextList, cb C.intptr_t, block *C.QTextBlock) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock), block *QTextBlock)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + gofunc((&QTextList{h: self}).callVirtualBase_BlockInserted, slotval1) + +} + +func (this *QTextList) callVirtualBase_BlockRemoved(block *QTextBlock) { + + C.QTextList_virtualbase_BlockRemoved(unsafe.Pointer(this.h), block.cPointer()) + +} +func (this *QTextList) OnBlockRemoved(slot func(super func(block *QTextBlock), block *QTextBlock)) { + C.QTextList_override_virtual_BlockRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextList_BlockRemoved +func miqt_exec_callback_QTextList_BlockRemoved(self *C.QTextList, cb C.intptr_t, block *C.QTextBlock) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock), block *QTextBlock)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + gofunc((&QTextList{h: self}).callVirtualBase_BlockRemoved, slotval1) + +} + +func (this *QTextList) callVirtualBase_BlockFormatChanged(block *QTextBlock) { + + C.QTextList_virtualbase_BlockFormatChanged(unsafe.Pointer(this.h), block.cPointer()) + +} +func (this *QTextList) OnBlockFormatChanged(slot func(super func(block *QTextBlock), block *QTextBlock)) { + C.QTextList_override_virtual_BlockFormatChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextList_BlockFormatChanged +func miqt_exec_callback_QTextList_BlockFormatChanged(self *C.QTextList, cb C.intptr_t, block *C.QTextBlock) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock), block *QTextBlock)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + gofunc((&QTextList{h: self}).callVirtualBase_BlockFormatChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QTextList) Delete() { - C.QTextList_Delete(this.h) + C.QTextList_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextlist.h b/qt/gen_qtextlist.h index a6c22090..baa892f7 100644 --- a/qt/gen_qtextlist.h +++ b/qt/gen_qtextlist.h @@ -16,19 +16,25 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QTextBlock; +class QTextBlockGroup; class QTextDocument; class QTextList; class QTextListFormat; +class QTextObject; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QTextBlock QTextBlock; +typedef struct QTextBlockGroup QTextBlockGroup; typedef struct QTextDocument QTextDocument; typedef struct QTextList QTextList; typedef struct QTextListFormat QTextListFormat; +typedef struct QTextObject QTextObject; #endif -QTextList* QTextList_new(QTextDocument* doc); +void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject); QMetaObject* QTextList_MetaObject(const QTextList* self); void* QTextList_Metacast(QTextList* self, const char* param1); struct miqt_string QTextList_Tr(const char* s); @@ -47,7 +53,13 @@ struct miqt_string QTextList_Tr2(const char* s, const char* c); struct miqt_string QTextList_Tr3(const char* s, const char* c, int n); struct miqt_string QTextList_TrUtf82(const char* s, const char* c); struct miqt_string QTextList_TrUtf83(const char* s, const char* c, int n); -void QTextList_Delete(QTextList* self); +void QTextList_override_virtual_BlockInserted(void* self, intptr_t slot); +void QTextList_virtualbase_BlockInserted(void* self, QTextBlock* block); +void QTextList_override_virtual_BlockRemoved(void* self, intptr_t slot); +void QTextList_virtualbase_BlockRemoved(void* self, QTextBlock* block); +void QTextList_override_virtual_BlockFormatChanged(void* self, intptr_t slot); +void QTextList_virtualbase_BlockFormatChanged(void* self, QTextBlock* block); +void QTextList_Delete(QTextList* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextobject.cpp b/qt/gen_qtextobject.cpp index 49b0d1e8..68c98c286 100644 --- a/qt/gen_qtextobject.cpp +++ b/qt/gen_qtextobject.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -194,12 +195,19 @@ void QTextFrameLayoutData_OperatorAssign(QTextFrameLayoutData* self, QTextFrameL self->operator=(*param1); } -void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self) { - delete self; +void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFrame* QTextFrame_new(QTextDocument* doc) { - return new QTextFrame(doc); +void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { + QTextFrame* ret = new QTextFrame(doc); + *outptr_QTextFrame = ret; + *outptr_QTextObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTextFrame_MetaObject(const QTextFrame* self) { @@ -333,24 +341,34 @@ struct miqt_string QTextFrame_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTextFrame_Delete(QTextFrame* self) { - delete self; +void QTextFrame_Delete(QTextFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void QTextBlockUserData_OperatorAssign(QTextBlockUserData* self, QTextBlockUserData* param1) { self->operator=(*param1); } -void QTextBlockUserData_Delete(QTextBlockUserData* self) { - delete self; +void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextBlock* QTextBlock_new() { - return new QTextBlock(); +void QTextBlock_new(QTextBlock** outptr_QTextBlock) { + QTextBlock* ret = new QTextBlock(); + *outptr_QTextBlock = ret; } -QTextBlock* QTextBlock_new2(QTextBlock* o) { - return new QTextBlock(*o); +void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock) { + QTextBlock* ret = new QTextBlock(*o); + *outptr_QTextBlock = ret; } void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o) { @@ -514,16 +532,22 @@ int QTextBlock_FragmentIndex(const QTextBlock* self) { return self->fragmentIndex(); } -void QTextBlock_Delete(QTextBlock* self) { - delete self; +void QTextBlock_Delete(QTextBlock* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFragment* QTextFragment_new() { - return new QTextFragment(); +void QTextFragment_new(QTextFragment** outptr_QTextFragment) { + QTextFragment* ret = new QTextFragment(); + *outptr_QTextFragment = ret; } -QTextFragment* QTextFragment_new2(QTextFragment* o) { - return new QTextFragment(*o); +void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment) { + QTextFragment* ret = new QTextFragment(*o); + *outptr_QTextFragment = ret; } void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o) { @@ -616,16 +640,22 @@ struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns2(const QTextFragm return _out; } -void QTextFragment_Delete(QTextFragment* self) { - delete self; +void QTextFragment_Delete(QTextFragment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFrame__iterator* QTextFrame__iterator_new() { - return new QTextFrame::iterator(); +void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator) { + QTextFrame::iterator* ret = new QTextFrame::iterator(); + *outptr_QTextFrame__iterator = ret; } -QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* o) { - return new QTextFrame::iterator(*o); +void QTextFrame__iterator_new2(QTextFrame__iterator* o, QTextFrame__iterator** outptr_QTextFrame__iterator) { + QTextFrame::iterator* ret = new QTextFrame::iterator(*o); + *outptr_QTextFrame__iterator = ret; } void QTextFrame__iterator_OperatorAssign(QTextFrame__iterator* self, QTextFrame__iterator* o) { @@ -676,16 +706,22 @@ QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinusWithInt(QTextFrame_ return new QTextFrame::iterator(self->operator--(static_cast(param1))); } -void QTextFrame__iterator_Delete(QTextFrame__iterator* self) { - delete self; +void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextBlock__iterator* QTextBlock__iterator_new() { - return new QTextBlock::iterator(); +void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator) { + QTextBlock::iterator* ret = new QTextBlock::iterator(); + *outptr_QTextBlock__iterator = ret; } -QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* o) { - return new QTextBlock::iterator(*o); +void QTextBlock__iterator_new2(QTextBlock__iterator* o, QTextBlock__iterator** outptr_QTextBlock__iterator) { + QTextBlock::iterator* ret = new QTextBlock::iterator(*o); + *outptr_QTextBlock__iterator = ret; } void QTextBlock__iterator_OperatorAssign(QTextBlock__iterator* self, QTextBlock__iterator* o) { @@ -728,7 +764,11 @@ QTextBlock__iterator* QTextBlock__iterator_OperatorMinusMinusWithInt(QTextBlock_ return new QTextBlock::iterator(self->operator--(static_cast(param1))); } -void QTextBlock__iterator_Delete(QTextBlock__iterator* self) { - delete self; +void QTextBlock__iterator_Delete(QTextBlock__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextobject.go b/qt/gen_qtextobject.go index bc53353b..be7c152c 100644 --- a/qt/gen_qtextobject.go +++ b/qt/gen_qtextobject.go @@ -14,7 +14,8 @@ import ( ) type QTextObject struct { - h *C.QTextObject + h *C.QTextObject + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QTextObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextObject(h *C.QTextObject) *QTextObject { +// newQTextObject constructs the type using only CGO pointers. +func newQTextObject(h *C.QTextObject, h_QObject *C.QObject) *QTextObject { if h == nil { return nil } - return &QTextObject{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTextObject{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTextObject(h unsafe.Pointer) *QTextObject { - return newQTextObject((*C.QTextObject)(h)) +// UnsafeNewQTextObject constructs the type using only unsafe pointers. +func UnsafeNewQTextObject(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextObject { + if h == nil { + return nil + } + + return &QTextObject{h: (*C.QTextObject)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QTextObject) MetaObject() *QMetaObject { @@ -83,7 +92,7 @@ func (this *QTextObject) FormatIndex() int { } func (this *QTextObject) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextObject_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextObject_Document(this.h)), nil) } func (this *QTextObject) ObjectIndex() int { @@ -135,7 +144,8 @@ func QTextObject_TrUtf83(s string, c string, n int) string { } type QTextBlockGroup struct { - h *C.QTextBlockGroup + h *C.QTextBlockGroup + isSubclass bool *QTextObject } @@ -153,15 +163,23 @@ func (this *QTextBlockGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextBlockGroup(h *C.QTextBlockGroup) *QTextBlockGroup { +// newQTextBlockGroup constructs the type using only CGO pointers. +func newQTextBlockGroup(h *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextBlockGroup { if h == nil { return nil } - return &QTextBlockGroup{h: h, QTextObject: UnsafeNewQTextObject(unsafe.Pointer(h))} + return &QTextBlockGroup{h: h, + QTextObject: newQTextObject(h_QTextObject, h_QObject)} } -func UnsafeNewQTextBlockGroup(h unsafe.Pointer) *QTextBlockGroup { - return newQTextBlockGroup((*C.QTextBlockGroup)(h)) +// UnsafeNewQTextBlockGroup constructs the type using only unsafe pointers. +func UnsafeNewQTextBlockGroup(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextBlockGroup { + if h == nil { + return nil + } + + return &QTextBlockGroup{h: (*C.QTextBlockGroup)(h), + QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} } func (this *QTextBlockGroup) MetaObject() *QMetaObject { @@ -237,7 +255,8 @@ func QTextBlockGroup_TrUtf83(s string, c string, n int) string { } type QTextFrameLayoutData struct { - h *C.QTextFrameLayoutData + h *C.QTextFrameLayoutData + isSubclass bool } func (this *QTextFrameLayoutData) cPointer() *C.QTextFrameLayoutData { @@ -254,6 +273,7 @@ func (this *QTextFrameLayoutData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFrameLayoutData constructs the type using only CGO pointers. func newQTextFrameLayoutData(h *C.QTextFrameLayoutData) *QTextFrameLayoutData { if h == nil { return nil @@ -261,8 +281,13 @@ func newQTextFrameLayoutData(h *C.QTextFrameLayoutData) *QTextFrameLayoutData { return &QTextFrameLayoutData{h: h} } +// UnsafeNewQTextFrameLayoutData constructs the type using only unsafe pointers. func UnsafeNewQTextFrameLayoutData(h unsafe.Pointer) *QTextFrameLayoutData { - return newQTextFrameLayoutData((*C.QTextFrameLayoutData)(h)) + if h == nil { + return nil + } + + return &QTextFrameLayoutData{h: (*C.QTextFrameLayoutData)(h)} } func (this *QTextFrameLayoutData) OperatorAssign(param1 *QTextFrameLayoutData) { @@ -271,7 +296,7 @@ func (this *QTextFrameLayoutData) OperatorAssign(param1 *QTextFrameLayoutData) { // Delete this object from C++ memory. func (this *QTextFrameLayoutData) Delete() { - C.QTextFrameLayoutData_Delete(this.h) + C.QTextFrameLayoutData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -284,7 +309,8 @@ func (this *QTextFrameLayoutData) GoGC() { } type QTextFrame struct { - h *C.QTextFrame + h *C.QTextFrame + isSubclass bool *QTextObject } @@ -302,21 +328,35 @@ func (this *QTextFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextFrame(h *C.QTextFrame) *QTextFrame { +// newQTextFrame constructs the type using only CGO pointers. +func newQTextFrame(h *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextFrame { if h == nil { return nil } - return &QTextFrame{h: h, QTextObject: UnsafeNewQTextObject(unsafe.Pointer(h))} + return &QTextFrame{h: h, + QTextObject: newQTextObject(h_QTextObject, h_QObject)} } -func UnsafeNewQTextFrame(h unsafe.Pointer) *QTextFrame { - return newQTextFrame((*C.QTextFrame)(h)) +// UnsafeNewQTextFrame constructs the type using only unsafe pointers. +func UnsafeNewQTextFrame(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextFrame { + if h == nil { + return nil + } + + return &QTextFrame{h: (*C.QTextFrame)(h), + QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} } // NewQTextFrame constructs a new QTextFrame object. func NewQTextFrame(doc *QTextDocument) *QTextFrame { - ret := C.QTextFrame_new(doc.cPointer()) - return newQTextFrame(ret) + var outptr_QTextFrame *C.QTextFrame = nil + var outptr_QTextObject *C.QTextObject = nil + var outptr_QObject *C.QObject = nil + + C.QTextFrame_new(doc.cPointer(), &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) + ret := newQTextFrame(outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextFrame) MetaObject() *QMetaObject { @@ -353,7 +393,7 @@ func (this *QTextFrame) SetFrameFormat(format *QTextFrameFormat) { func (this *QTextFrame) FrameFormat() *QTextFrameFormat { _ret := C.QTextFrame_FrameFormat(this.h) - _goptr := newQTextFrameFormat(_ret) + _goptr := newQTextFrameFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -393,13 +433,13 @@ func (this *QTextFrame) ChildFrames() []*QTextFrame { _ret := make([]*QTextFrame, int(_ma.len)) _outCast := (*[0xffff]*C.QTextFrame)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQTextFrame(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQTextFrame(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func (this *QTextFrame) ParentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame_ParentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame_ParentFrame(this.h)), nil, nil) } func (this *QTextFrame) Begin() *QTextFrame__iterator { @@ -462,7 +502,7 @@ func QTextFrame_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTextFrame) Delete() { - C.QTextFrame_Delete(this.h) + C.QTextFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -475,7 +515,8 @@ func (this *QTextFrame) GoGC() { } type QTextBlockUserData struct { - h *C.QTextBlockUserData + h *C.QTextBlockUserData + isSubclass bool } func (this *QTextBlockUserData) cPointer() *C.QTextBlockUserData { @@ -492,6 +533,7 @@ func (this *QTextBlockUserData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBlockUserData constructs the type using only CGO pointers. func newQTextBlockUserData(h *C.QTextBlockUserData) *QTextBlockUserData { if h == nil { return nil @@ -499,8 +541,13 @@ func newQTextBlockUserData(h *C.QTextBlockUserData) *QTextBlockUserData { return &QTextBlockUserData{h: h} } +// UnsafeNewQTextBlockUserData constructs the type using only unsafe pointers. func UnsafeNewQTextBlockUserData(h unsafe.Pointer) *QTextBlockUserData { - return newQTextBlockUserData((*C.QTextBlockUserData)(h)) + if h == nil { + return nil + } + + return &QTextBlockUserData{h: (*C.QTextBlockUserData)(h)} } func (this *QTextBlockUserData) OperatorAssign(param1 *QTextBlockUserData) { @@ -509,7 +556,7 @@ func (this *QTextBlockUserData) OperatorAssign(param1 *QTextBlockUserData) { // Delete this object from C++ memory. func (this *QTextBlockUserData) Delete() { - C.QTextBlockUserData_Delete(this.h) + C.QTextBlockUserData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -522,7 +569,8 @@ func (this *QTextBlockUserData) GoGC() { } type QTextBlock struct { - h *C.QTextBlock + h *C.QTextBlock + isSubclass bool } func (this *QTextBlock) cPointer() *C.QTextBlock { @@ -539,6 +587,7 @@ func (this *QTextBlock) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBlock constructs the type using only CGO pointers. func newQTextBlock(h *C.QTextBlock) *QTextBlock { if h == nil { return nil @@ -546,20 +595,33 @@ func newQTextBlock(h *C.QTextBlock) *QTextBlock { return &QTextBlock{h: h} } +// UnsafeNewQTextBlock constructs the type using only unsafe pointers. func UnsafeNewQTextBlock(h unsafe.Pointer) *QTextBlock { - return newQTextBlock((*C.QTextBlock)(h)) + if h == nil { + return nil + } + + return &QTextBlock{h: (*C.QTextBlock)(h)} } // NewQTextBlock constructs a new QTextBlock object. func NewQTextBlock() *QTextBlock { - ret := C.QTextBlock_new() - return newQTextBlock(ret) + var outptr_QTextBlock *C.QTextBlock = nil + + C.QTextBlock_new(&outptr_QTextBlock) + ret := newQTextBlock(outptr_QTextBlock) + ret.isSubclass = true + return ret } // NewQTextBlock2 constructs a new QTextBlock object. func NewQTextBlock2(o *QTextBlock) *QTextBlock { - ret := C.QTextBlock_new2(o.cPointer()) - return newQTextBlock(ret) + var outptr_QTextBlock *C.QTextBlock = nil + + C.QTextBlock_new2(o.cPointer(), &outptr_QTextBlock) + ret := newQTextBlock(outptr_QTextBlock) + ret.isSubclass = true + return ret } func (this *QTextBlock) OperatorAssign(o *QTextBlock) { @@ -604,7 +666,7 @@ func (this *QTextBlock) ClearLayout() { func (this *QTextBlock) BlockFormat() *QTextBlockFormat { _ret := C.QTextBlock_BlockFormat(this.h) - _goptr := newQTextBlockFormat(_ret) + _goptr := newQTextBlockFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -615,7 +677,7 @@ func (this *QTextBlock) BlockFormatIndex() int { func (this *QTextBlock) CharFormat() *QTextCharFormat { _ret := C.QTextBlock_CharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -649,11 +711,11 @@ func (this *QTextBlock) TextFormats() []QTextLayout__FormatRange { } func (this *QTextBlock) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextBlock_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextBlock_Document(this.h)), nil) } func (this *QTextBlock) TextList() *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextBlock_TextList(this.h))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextBlock_TextList(this.h)), nil, nil, nil) } func (this *QTextBlock) UserData() *QTextBlockUserData { @@ -738,7 +800,7 @@ func (this *QTextBlock) FragmentIndex() int { // Delete this object from C++ memory. func (this *QTextBlock) Delete() { - C.QTextBlock_Delete(this.h) + C.QTextBlock_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -751,7 +813,8 @@ func (this *QTextBlock) GoGC() { } type QTextFragment struct { - h *C.QTextFragment + h *C.QTextFragment + isSubclass bool } func (this *QTextFragment) cPointer() *C.QTextFragment { @@ -768,6 +831,7 @@ func (this *QTextFragment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFragment constructs the type using only CGO pointers. func newQTextFragment(h *C.QTextFragment) *QTextFragment { if h == nil { return nil @@ -775,20 +839,33 @@ func newQTextFragment(h *C.QTextFragment) *QTextFragment { return &QTextFragment{h: h} } +// UnsafeNewQTextFragment constructs the type using only unsafe pointers. func UnsafeNewQTextFragment(h unsafe.Pointer) *QTextFragment { - return newQTextFragment((*C.QTextFragment)(h)) + if h == nil { + return nil + } + + return &QTextFragment{h: (*C.QTextFragment)(h)} } // NewQTextFragment constructs a new QTextFragment object. func NewQTextFragment() *QTextFragment { - ret := C.QTextFragment_new() - return newQTextFragment(ret) + var outptr_QTextFragment *C.QTextFragment = nil + + C.QTextFragment_new(&outptr_QTextFragment) + ret := newQTextFragment(outptr_QTextFragment) + ret.isSubclass = true + return ret } // NewQTextFragment2 constructs a new QTextFragment object. func NewQTextFragment2(o *QTextFragment) *QTextFragment { - ret := C.QTextFragment_new2(o.cPointer()) - return newQTextFragment(ret) + var outptr_QTextFragment *C.QTextFragment = nil + + C.QTextFragment_new2(o.cPointer(), &outptr_QTextFragment) + ret := newQTextFragment(outptr_QTextFragment) + ret.isSubclass = true + return ret } func (this *QTextFragment) OperatorAssign(o *QTextFragment) { @@ -825,7 +902,7 @@ func (this *QTextFragment) Contains(position int) bool { func (this *QTextFragment) CharFormat() *QTextCharFormat { _ret := C.QTextFragment_CharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -882,7 +959,7 @@ func (this *QTextFragment) GlyphRuns2(from int, length int) []QGlyphRun { // Delete this object from C++ memory. func (this *QTextFragment) Delete() { - C.QTextFragment_Delete(this.h) + C.QTextFragment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -895,7 +972,8 @@ func (this *QTextFragment) GoGC() { } type QTextFrame__iterator struct { - h *C.QTextFrame__iterator + h *C.QTextFrame__iterator + isSubclass bool } func (this *QTextFrame__iterator) cPointer() *C.QTextFrame__iterator { @@ -912,6 +990,7 @@ func (this *QTextFrame__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFrame__iterator constructs the type using only CGO pointers. func newQTextFrame__iterator(h *C.QTextFrame__iterator) *QTextFrame__iterator { if h == nil { return nil @@ -919,20 +998,33 @@ func newQTextFrame__iterator(h *C.QTextFrame__iterator) *QTextFrame__iterator { return &QTextFrame__iterator{h: h} } +// UnsafeNewQTextFrame__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextFrame__iterator(h unsafe.Pointer) *QTextFrame__iterator { - return newQTextFrame__iterator((*C.QTextFrame__iterator)(h)) + if h == nil { + return nil + } + + return &QTextFrame__iterator{h: (*C.QTextFrame__iterator)(h)} } // NewQTextFrame__iterator constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator() *QTextFrame__iterator { - ret := C.QTextFrame__iterator_new() - return newQTextFrame__iterator(ret) + var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil + + C.QTextFrame__iterator_new(&outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret.isSubclass = true + return ret } // NewQTextFrame__iterator2 constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator2(o *QTextFrame__iterator) *QTextFrame__iterator { - ret := C.QTextFrame__iterator_new2(o.cPointer()) - return newQTextFrame__iterator(ret) + var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil + + C.QTextFrame__iterator_new2(o.cPointer(), &outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret.isSubclass = true + return ret } func (this *QTextFrame__iterator) OperatorAssign(o *QTextFrame__iterator) { @@ -940,11 +1032,11 @@ func (this *QTextFrame__iterator) OperatorAssign(o *QTextFrame__iterator) { } func (this *QTextFrame__iterator) ParentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_ParentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_ParentFrame(this.h)), nil, nil) } func (this *QTextFrame__iterator) CurrentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_CurrentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_CurrentFrame(this.h)), nil, nil) } func (this *QTextFrame__iterator) CurrentBlock() *QTextBlock { @@ -990,7 +1082,7 @@ func (this *QTextFrame__iterator) OperatorMinusMinusWithInt(param1 int) *QTextFr // Delete this object from C++ memory. func (this *QTextFrame__iterator) Delete() { - C.QTextFrame__iterator_Delete(this.h) + C.QTextFrame__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1003,7 +1095,8 @@ func (this *QTextFrame__iterator) GoGC() { } type QTextBlock__iterator struct { - h *C.QTextBlock__iterator + h *C.QTextBlock__iterator + isSubclass bool } func (this *QTextBlock__iterator) cPointer() *C.QTextBlock__iterator { @@ -1020,6 +1113,7 @@ func (this *QTextBlock__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBlock__iterator constructs the type using only CGO pointers. func newQTextBlock__iterator(h *C.QTextBlock__iterator) *QTextBlock__iterator { if h == nil { return nil @@ -1027,20 +1121,33 @@ func newQTextBlock__iterator(h *C.QTextBlock__iterator) *QTextBlock__iterator { return &QTextBlock__iterator{h: h} } +// UnsafeNewQTextBlock__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextBlock__iterator(h unsafe.Pointer) *QTextBlock__iterator { - return newQTextBlock__iterator((*C.QTextBlock__iterator)(h)) + if h == nil { + return nil + } + + return &QTextBlock__iterator{h: (*C.QTextBlock__iterator)(h)} } // NewQTextBlock__iterator constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator() *QTextBlock__iterator { - ret := C.QTextBlock__iterator_new() - return newQTextBlock__iterator(ret) + var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil + + C.QTextBlock__iterator_new(&outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret.isSubclass = true + return ret } // NewQTextBlock__iterator2 constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator2(o *QTextBlock__iterator) *QTextBlock__iterator { - ret := C.QTextBlock__iterator_new2(o.cPointer()) - return newQTextBlock__iterator(ret) + var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil + + C.QTextBlock__iterator_new2(o.cPointer(), &outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret.isSubclass = true + return ret } func (this *QTextBlock__iterator) OperatorAssign(o *QTextBlock__iterator) { @@ -1090,7 +1197,7 @@ func (this *QTextBlock__iterator) OperatorMinusMinusWithInt(param1 int) *QTextBl // Delete this object from C++ memory. func (this *QTextBlock__iterator) Delete() { - C.QTextBlock__iterator_Delete(this.h) + C.QTextBlock__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextobject.h b/qt/gen_qtextobject.h index f55da8fa..d4aab01d 100644 --- a/qt/gen_qtextobject.h +++ b/qt/gen_qtextobject.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QGlyphRun; class QMetaObject; +class QObject; class QTextBlock; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTextBlock__iterator) typedef QTextBlock::iterator QTextBlock__iterator; @@ -50,6 +51,7 @@ class QTextObject; #else typedef struct QGlyphRun QGlyphRun; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QTextBlock QTextBlock; typedef struct QTextBlock__iterator QTextBlock__iterator; typedef struct QTextBlockFormat QTextBlockFormat; @@ -87,15 +89,18 @@ QMetaObject* QTextBlockGroup_MetaObject(const QTextBlockGroup* self); void* QTextBlockGroup_Metacast(QTextBlockGroup* self, const char* param1); struct miqt_string QTextBlockGroup_Tr(const char* s); struct miqt_string QTextBlockGroup_TrUtf8(const char* s); +void QTextBlockGroup_BlockInserted(QTextBlockGroup* self, QTextBlock* block); +void QTextBlockGroup_BlockRemoved(QTextBlockGroup* self, QTextBlock* block); +void QTextBlockGroup_BlockFormatChanged(QTextBlockGroup* self, QTextBlock* block); struct miqt_string QTextBlockGroup_Tr2(const char* s, const char* c); struct miqt_string QTextBlockGroup_Tr3(const char* s, const char* c, int n); struct miqt_string QTextBlockGroup_TrUtf82(const char* s, const char* c); struct miqt_string QTextBlockGroup_TrUtf83(const char* s, const char* c, int n); void QTextFrameLayoutData_OperatorAssign(QTextFrameLayoutData* self, QTextFrameLayoutData* param1); -void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self); +void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass); -QTextFrame* QTextFrame_new(QTextDocument* doc); +void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); QMetaObject* QTextFrame_MetaObject(const QTextFrame* self); void* QTextFrame_Metacast(QTextFrame* self, const char* param1); struct miqt_string QTextFrame_Tr(const char* s); @@ -116,13 +121,13 @@ struct miqt_string QTextFrame_Tr2(const char* s, const char* c); struct miqt_string QTextFrame_Tr3(const char* s, const char* c, int n); struct miqt_string QTextFrame_TrUtf82(const char* s, const char* c); struct miqt_string QTextFrame_TrUtf83(const char* s, const char* c, int n); -void QTextFrame_Delete(QTextFrame* self); +void QTextFrame_Delete(QTextFrame* self, bool isSubclass); void QTextBlockUserData_OperatorAssign(QTextBlockUserData* self, QTextBlockUserData* param1); -void QTextBlockUserData_Delete(QTextBlockUserData* self); +void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass); -QTextBlock* QTextBlock_new(); -QTextBlock* QTextBlock_new2(QTextBlock* o); +void QTextBlock_new(QTextBlock** outptr_QTextBlock); +void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock); void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o); bool QTextBlock_IsValid(const QTextBlock* self); bool QTextBlock_OperatorEqual(const QTextBlock* self, QTextBlock* o); @@ -159,10 +164,10 @@ QTextBlock__iterator* QTextBlock_End(const QTextBlock* self); QTextBlock* QTextBlock_Next(const QTextBlock* self); QTextBlock* QTextBlock_Previous(const QTextBlock* self); int QTextBlock_FragmentIndex(const QTextBlock* self); -void QTextBlock_Delete(QTextBlock* self); +void QTextBlock_Delete(QTextBlock* self, bool isSubclass); -QTextFragment* QTextFragment_new(); -QTextFragment* QTextFragment_new2(QTextFragment* o); +void QTextFragment_new(QTextFragment** outptr_QTextFragment); +void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment); void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o); bool QTextFragment_IsValid(const QTextFragment* self); bool QTextFragment_OperatorEqual(const QTextFragment* self, QTextFragment* o); @@ -177,10 +182,10 @@ struct miqt_string QTextFragment_Text(const QTextFragment* self); struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns(const QTextFragment* self); struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns1(const QTextFragment* self, int from); struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns2(const QTextFragment* self, int from, int length); -void QTextFragment_Delete(QTextFragment* self); +void QTextFragment_Delete(QTextFragment* self, bool isSubclass); -QTextFrame__iterator* QTextFrame__iterator_new(); -QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* o); +void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator); +void QTextFrame__iterator_new2(QTextFrame__iterator* o, QTextFrame__iterator** outptr_QTextFrame__iterator); void QTextFrame__iterator_OperatorAssign(QTextFrame__iterator* self, QTextFrame__iterator* o); QTextFrame* QTextFrame__iterator_ParentFrame(const QTextFrame__iterator* self); QTextFrame* QTextFrame__iterator_CurrentFrame(const QTextFrame__iterator* self); @@ -192,10 +197,10 @@ QTextFrame__iterator* QTextFrame__iterator_OperatorPlusPlus(QTextFrame__iterator QTextFrame__iterator* QTextFrame__iterator_OperatorPlusPlusWithInt(QTextFrame__iterator* self, int param1); QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinus(QTextFrame__iterator* self); QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinusWithInt(QTextFrame__iterator* self, int param1); -void QTextFrame__iterator_Delete(QTextFrame__iterator* self); +void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass); -QTextBlock__iterator* QTextBlock__iterator_new(); -QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* o); +void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator); +void QTextBlock__iterator_new2(QTextBlock__iterator* o, QTextBlock__iterator** outptr_QTextBlock__iterator); void QTextBlock__iterator_OperatorAssign(QTextBlock__iterator* self, QTextBlock__iterator* o); QTextFragment* QTextBlock__iterator_Fragment(const QTextBlock__iterator* self); bool QTextBlock__iterator_AtEnd(const QTextBlock__iterator* self); @@ -205,7 +210,7 @@ QTextBlock__iterator* QTextBlock__iterator_OperatorPlusPlus(QTextBlock__iterator QTextBlock__iterator* QTextBlock__iterator_OperatorPlusPlusWithInt(QTextBlock__iterator* self, int param1); QTextBlock__iterator* QTextBlock__iterator_OperatorMinusMinus(QTextBlock__iterator* self); QTextBlock__iterator* QTextBlock__iterator_OperatorMinusMinusWithInt(QTextBlock__iterator* self, int param1); -void QTextBlock__iterator_Delete(QTextBlock__iterator* self); +void QTextBlock__iterator_Delete(QTextBlock__iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextoption.cpp b/qt/gen_qtextoption.cpp index 4ba70521..f4d76e4e 100644 --- a/qt/gen_qtextoption.cpp +++ b/qt/gen_qtextoption.cpp @@ -6,16 +6,19 @@ #include "gen_qtextoption.h" #include "_cgo_export.h" -QTextOption* QTextOption_new() { - return new QTextOption(); +void QTextOption_new(QTextOption** outptr_QTextOption) { + QTextOption* ret = new QTextOption(); + *outptr_QTextOption = ret; } -QTextOption* QTextOption_new2(int alignment) { - return new QTextOption(static_cast(alignment)); +void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption) { + QTextOption* ret = new QTextOption(static_cast(alignment)); + *outptr_QTextOption = ret; } -QTextOption* QTextOption_new3(QTextOption* o) { - return new QTextOption(*o); +void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption) { + QTextOption* ret = new QTextOption(*o); + *outptr_QTextOption = ret; } void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o) { @@ -130,24 +133,32 @@ bool QTextOption_UseDesignMetrics(const QTextOption* self) { return self->useDesignMetrics(); } -void QTextOption_Delete(QTextOption* self) { - delete self; +void QTextOption_Delete(QTextOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextOption__Tab* QTextOption__Tab_new() { - return new QTextOption::Tab(); +void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(); + *outptr_QTextOption__Tab = ret; } -QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType) { - return new QTextOption::Tab(static_cast(pos), static_cast(tabType)); +void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType)); + *outptr_QTextOption__Tab = ret; } -QTextOption__Tab* QTextOption__Tab_new3(QTextOption__Tab* param1) { - return new QTextOption::Tab(*param1); +void QTextOption__Tab_new3(QTextOption__Tab* param1, QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(*param1); + *outptr_QTextOption__Tab = ret; } -QTextOption__Tab* QTextOption__Tab_new4(double pos, int tabType, QChar* delim) { - return new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); +void QTextOption__Tab_new4(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); + *outptr_QTextOption__Tab = ret; } bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other) { @@ -158,7 +169,11 @@ bool QTextOption__Tab_OperatorNotEqual(const QTextOption__Tab* self, QTextOption return self->operator!=(*other); } -void QTextOption__Tab_Delete(QTextOption__Tab* self) { - delete self; +void QTextOption__Tab_Delete(QTextOption__Tab* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextoption.go b/qt/gen_qtextoption.go index 1e398883..e9764510 100644 --- a/qt/gen_qtextoption.go +++ b/qt/gen_qtextoption.go @@ -44,7 +44,8 @@ const ( ) type QTextOption struct { - h *C.QTextOption + h *C.QTextOption + isSubclass bool } func (this *QTextOption) cPointer() *C.QTextOption { @@ -61,6 +62,7 @@ func (this *QTextOption) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextOption constructs the type using only CGO pointers. func newQTextOption(h *C.QTextOption) *QTextOption { if h == nil { return nil @@ -68,26 +70,43 @@ func newQTextOption(h *C.QTextOption) *QTextOption { return &QTextOption{h: h} } +// UnsafeNewQTextOption constructs the type using only unsafe pointers. func UnsafeNewQTextOption(h unsafe.Pointer) *QTextOption { - return newQTextOption((*C.QTextOption)(h)) + if h == nil { + return nil + } + + return &QTextOption{h: (*C.QTextOption)(h)} } // NewQTextOption constructs a new QTextOption object. func NewQTextOption() *QTextOption { - ret := C.QTextOption_new() - return newQTextOption(ret) + var outptr_QTextOption *C.QTextOption = nil + + C.QTextOption_new(&outptr_QTextOption) + ret := newQTextOption(outptr_QTextOption) + ret.isSubclass = true + return ret } // NewQTextOption2 constructs a new QTextOption object. func NewQTextOption2(alignment AlignmentFlag) *QTextOption { - ret := C.QTextOption_new2((C.int)(alignment)) - return newQTextOption(ret) + var outptr_QTextOption *C.QTextOption = nil + + C.QTextOption_new2((C.int)(alignment), &outptr_QTextOption) + ret := newQTextOption(outptr_QTextOption) + ret.isSubclass = true + return ret } // NewQTextOption3 constructs a new QTextOption object. func NewQTextOption3(o *QTextOption) *QTextOption { - ret := C.QTextOption_new3(o.cPointer()) - return newQTextOption(ret) + var outptr_QTextOption *C.QTextOption = nil + + C.QTextOption_new3(o.cPointer(), &outptr_QTextOption) + ret := newQTextOption(outptr_QTextOption) + ret.isSubclass = true + return ret } func (this *QTextOption) OperatorAssign(o *QTextOption) { @@ -195,7 +214,7 @@ func (this *QTextOption) UseDesignMetrics() bool { // Delete this object from C++ memory. func (this *QTextOption) Delete() { - C.QTextOption_Delete(this.h) + C.QTextOption_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -208,7 +227,8 @@ func (this *QTextOption) GoGC() { } type QTextOption__Tab struct { - h *C.QTextOption__Tab + h *C.QTextOption__Tab + isSubclass bool } func (this *QTextOption__Tab) cPointer() *C.QTextOption__Tab { @@ -225,6 +245,7 @@ func (this *QTextOption__Tab) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextOption__Tab constructs the type using only CGO pointers. func newQTextOption__Tab(h *C.QTextOption__Tab) *QTextOption__Tab { if h == nil { return nil @@ -232,32 +253,53 @@ func newQTextOption__Tab(h *C.QTextOption__Tab) *QTextOption__Tab { return &QTextOption__Tab{h: h} } +// UnsafeNewQTextOption__Tab constructs the type using only unsafe pointers. func UnsafeNewQTextOption__Tab(h unsafe.Pointer) *QTextOption__Tab { - return newQTextOption__Tab((*C.QTextOption__Tab)(h)) + if h == nil { + return nil + } + + return &QTextOption__Tab{h: (*C.QTextOption__Tab)(h)} } // NewQTextOption__Tab constructs a new QTextOption::Tab object. func NewQTextOption__Tab() *QTextOption__Tab { - ret := C.QTextOption__Tab_new() - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new(&outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } // NewQTextOption__Tab2 constructs a new QTextOption::Tab object. func NewQTextOption__Tab2(pos float64, tabType QTextOption__TabType) *QTextOption__Tab { - ret := C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType)) - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType), &outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } // NewQTextOption__Tab3 constructs a new QTextOption::Tab object. func NewQTextOption__Tab3(param1 *QTextOption__Tab) *QTextOption__Tab { - ret := C.QTextOption__Tab_new3(param1.cPointer()) - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new3(param1.cPointer(), &outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } // NewQTextOption__Tab4 constructs a new QTextOption::Tab object. func NewQTextOption__Tab4(pos float64, tabType QTextOption__TabType, delim QChar) *QTextOption__Tab { - ret := C.QTextOption__Tab_new4((C.double)(pos), (C.int)(tabType), delim.cPointer()) - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new4((C.double)(pos), (C.int)(tabType), delim.cPointer(), &outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } func (this *QTextOption__Tab) OperatorEqual(other *QTextOption__Tab) bool { @@ -270,7 +312,7 @@ func (this *QTextOption__Tab) OperatorNotEqual(other *QTextOption__Tab) bool { // Delete this object from C++ memory. func (this *QTextOption__Tab) Delete() { - C.QTextOption__Tab_Delete(this.h) + C.QTextOption__Tab_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextoption.h b/qt/gen_qtextoption.h index d5a7c28a..321cd8b9 100644 --- a/qt/gen_qtextoption.h +++ b/qt/gen_qtextoption.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTextOption__Tab QTextOption__Tab; #endif -QTextOption* QTextOption_new(); -QTextOption* QTextOption_new2(int alignment); -QTextOption* QTextOption_new3(QTextOption* o); +void QTextOption_new(QTextOption** outptr_QTextOption); +void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption); +void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption); void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o); void QTextOption_SetAlignment(QTextOption* self, int alignment); int QTextOption_Alignment(const QTextOption* self); @@ -50,15 +50,15 @@ void QTextOption_SetTabs(QTextOption* self, struct miqt_array /* of QTextOption_ struct miqt_array /* of QTextOption__Tab* */ QTextOption_Tabs(const QTextOption* self); void QTextOption_SetUseDesignMetrics(QTextOption* self, bool b); bool QTextOption_UseDesignMetrics(const QTextOption* self); -void QTextOption_Delete(QTextOption* self); +void QTextOption_Delete(QTextOption* self, bool isSubclass); -QTextOption__Tab* QTextOption__Tab_new(); -QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType); -QTextOption__Tab* QTextOption__Tab_new3(QTextOption__Tab* param1); -QTextOption__Tab* QTextOption__Tab_new4(double pos, int tabType, QChar* delim); +void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab); +void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab); +void QTextOption__Tab_new3(QTextOption__Tab* param1, QTextOption__Tab** outptr_QTextOption__Tab); +void QTextOption__Tab_new4(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab); bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other); bool QTextOption__Tab_OperatorNotEqual(const QTextOption__Tab* self, QTextOption__Tab* other); -void QTextOption__Tab_Delete(QTextOption__Tab* self); +void QTextOption__Tab_Delete(QTextOption__Tab* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtextstream.cpp b/qt/gen_qtextstream.cpp index 54dc2ef6..a068c76e 100644 --- a/qt/gen_qtextstream.cpp +++ b/qt/gen_qtextstream.cpp @@ -11,22 +11,26 @@ #include "gen_qtextstream.h" #include "_cgo_export.h" -QTextStream* QTextStream_new() { - return new QTextStream(); +void QTextStream_new(QTextStream** outptr_QTextStream) { + QTextStream* ret = new QTextStream(); + *outptr_QTextStream = ret; } -QTextStream* QTextStream_new2(QIODevice* device) { - return new QTextStream(device); +void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream) { + QTextStream* ret = new QTextStream(device); + *outptr_QTextStream = ret; } -QTextStream* QTextStream_new3(struct miqt_string array) { +void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream) { QByteArray array_QByteArray(array.data, array.len); - return new QTextStream(array_QByteArray); + QTextStream* ret = new QTextStream(array_QByteArray); + *outptr_QTextStream = ret; } -QTextStream* QTextStream_new4(struct miqt_string array, int openMode) { +void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream) { QByteArray array_QByteArray(array.data, array.len); - return new QTextStream(array_QByteArray, static_cast(openMode)); + QTextStream* ret = new QTextStream(array_QByteArray, static_cast(openMode)); + *outptr_QTextStream = ret; } void QTextStream_SetCodec(QTextStream* self, QTextCodec* codec) { @@ -415,7 +419,11 @@ struct miqt_string QTextStream_ReadLine1(QTextStream* self, long long maxlen) { return _ms; } -void QTextStream_Delete(QTextStream* self) { - delete self; +void QTextStream_Delete(QTextStream* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtextstream.go b/qt/gen_qtextstream.go index d2beda62..ac494104 100644 --- a/qt/gen_qtextstream.go +++ b/qt/gen_qtextstream.go @@ -50,7 +50,8 @@ const ( ) type QTextStream struct { - h *C.QTextStream + h *C.QTextStream + isSubclass bool } func (this *QTextStream) cPointer() *C.QTextStream { @@ -67,6 +68,7 @@ func (this *QTextStream) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextStream constructs the type using only CGO pointers. func newQTextStream(h *C.QTextStream) *QTextStream { if h == nil { return nil @@ -74,20 +76,33 @@ func newQTextStream(h *C.QTextStream) *QTextStream { return &QTextStream{h: h} } +// UnsafeNewQTextStream constructs the type using only unsafe pointers. func UnsafeNewQTextStream(h unsafe.Pointer) *QTextStream { - return newQTextStream((*C.QTextStream)(h)) + if h == nil { + return nil + } + + return &QTextStream{h: (*C.QTextStream)(h)} } // NewQTextStream constructs a new QTextStream object. func NewQTextStream() *QTextStream { - ret := C.QTextStream_new() - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + + C.QTextStream_new(&outptr_QTextStream) + ret := newQTextStream(outptr_QTextStream) + ret.isSubclass = true + return ret } // NewQTextStream2 constructs a new QTextStream object. func NewQTextStream2(device *QIODevice) *QTextStream { - ret := C.QTextStream_new2(device.cPointer()) - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + + C.QTextStream_new2(device.cPointer(), &outptr_QTextStream) + ret := newQTextStream(outptr_QTextStream) + ret.isSubclass = true + return ret } // NewQTextStream3 constructs a new QTextStream object. @@ -95,8 +110,12 @@ func NewQTextStream3(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - ret := C.QTextStream_new3(array_alias) - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + + C.QTextStream_new3(array_alias, &outptr_QTextStream) + ret := newQTextStream(outptr_QTextStream) + ret.isSubclass = true + return ret } // NewQTextStream4 constructs a new QTextStream object. @@ -104,8 +123,12 @@ func NewQTextStream4(array []byte, openMode QIODevice__OpenModeFlag) *QTextStrea array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - ret := C.QTextStream_new4(array_alias, (C.int)(openMode)) - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + + C.QTextStream_new4(array_alias, (C.int)(openMode), &outptr_QTextStream) + ret := newQTextStream(outptr_QTextStream) + ret.isSubclass = true + return ret } func (this *QTextStream) SetCodec(codec *QTextCodec) { @@ -154,7 +177,7 @@ func (this *QTextStream) SetDevice(device *QIODevice) { } func (this *QTextStream) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QTextStream_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QTextStream_Device(this.h)), nil) } func (this *QTextStream) String() string { @@ -431,7 +454,7 @@ func (this *QTextStream) ReadLine1(maxlen int64) string { // Delete this object from C++ memory. func (this *QTextStream) Delete() { - C.QTextStream_Delete(this.h) + C.QTextStream_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtextstream.h b/qt/gen_qtextstream.h index 6a2eccc8..af13ca79 100644 --- a/qt/gen_qtextstream.h +++ b/qt/gen_qtextstream.h @@ -30,10 +30,10 @@ typedef struct QTextCodec QTextCodec; typedef struct QTextStream QTextStream; #endif -QTextStream* QTextStream_new(); -QTextStream* QTextStream_new2(QIODevice* device); -QTextStream* QTextStream_new3(struct miqt_string array); -QTextStream* QTextStream_new4(struct miqt_string array, int openMode); +void QTextStream_new(QTextStream** outptr_QTextStream); +void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream); +void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream); +void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream); void QTextStream_SetCodec(QTextStream* self, QTextCodec* codec); void QTextStream_SetCodecWithCodecName(QTextStream* self, const char* codecName); QTextCodec* QTextStream_Codec(const QTextStream* self); @@ -104,7 +104,7 @@ QTextStream* QTextStream_OperatorShiftLeftWithArray(QTextStream* self, struct mi QTextStream* QTextStream_OperatorShiftLeftWithChar(QTextStream* self, const char* c); QTextStream* QTextStream_OperatorShiftLeftWithPtr(QTextStream* self, const void* ptr); struct miqt_string QTextStream_ReadLine1(QTextStream* self, long long maxlen); -void QTextStream_Delete(QTextStream* self); +void QTextStream_Delete(QTextStream* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtexttable.cpp b/qt/gen_qtexttable.cpp index 10e6f678..fecc12a4 100644 --- a/qt/gen_qtexttable.cpp +++ b/qt/gen_qtexttable.cpp @@ -1,11 +1,14 @@ #include +#include #include #include #include #include #include #include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QTextFrame__iterator +#include #include #include #include @@ -13,12 +16,14 @@ #include "gen_qtexttable.h" #include "_cgo_export.h" -QTextTableCell* QTextTableCell_new() { - return new QTextTableCell(); +void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell) { + QTextTableCell* ret = new QTextTableCell(); + *outptr_QTextTableCell = ret; } -QTextTableCell* QTextTableCell_new2(QTextTableCell* o) { - return new QTextTableCell(*o); +void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell) { + QTextTableCell* ret = new QTextTableCell(*o); + *outptr_QTextTableCell = ret; } void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o) { @@ -89,12 +94,20 @@ int QTextTableCell_TableCellFormatIndex(const QTextTableCell* self) { return self->tableCellFormatIndex(); } -void QTextTableCell_Delete(QTextTableCell* self) { - delete self; +void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextTable* QTextTable_new(QTextDocument* doc) { - return new QTextTable(doc); +void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { + QTextTable* ret = new QTextTable(doc); + *outptr_QTextTable = ret; + *outptr_QTextFrame = static_cast(ret); + *outptr_QTextObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTextTable_MetaObject(const QTextTable* self) { @@ -247,7 +260,11 @@ struct miqt_string QTextTable_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTextTable_Delete(QTextTable* self) { - delete self; +void QTextTable_Delete(QTextTable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtexttable.go b/qt/gen_qtexttable.go index 0fdd9a0d..dc5ed859 100644 --- a/qt/gen_qtexttable.go +++ b/qt/gen_qtexttable.go @@ -14,7 +14,8 @@ import ( ) type QTextTableCell struct { - h *C.QTextTableCell + h *C.QTextTableCell + isSubclass bool } func (this *QTextTableCell) cPointer() *C.QTextTableCell { @@ -31,6 +32,7 @@ func (this *QTextTableCell) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextTableCell constructs the type using only CGO pointers. func newQTextTableCell(h *C.QTextTableCell) *QTextTableCell { if h == nil { return nil @@ -38,20 +40,33 @@ func newQTextTableCell(h *C.QTextTableCell) *QTextTableCell { return &QTextTableCell{h: h} } +// UnsafeNewQTextTableCell constructs the type using only unsafe pointers. func UnsafeNewQTextTableCell(h unsafe.Pointer) *QTextTableCell { - return newQTextTableCell((*C.QTextTableCell)(h)) + if h == nil { + return nil + } + + return &QTextTableCell{h: (*C.QTextTableCell)(h)} } // NewQTextTableCell constructs a new QTextTableCell object. func NewQTextTableCell() *QTextTableCell { - ret := C.QTextTableCell_new() - return newQTextTableCell(ret) + var outptr_QTextTableCell *C.QTextTableCell = nil + + C.QTextTableCell_new(&outptr_QTextTableCell) + ret := newQTextTableCell(outptr_QTextTableCell) + ret.isSubclass = true + return ret } // NewQTextTableCell2 constructs a new QTextTableCell object. func NewQTextTableCell2(o *QTextTableCell) *QTextTableCell { - ret := C.QTextTableCell_new2(o.cPointer()) - return newQTextTableCell(ret) + var outptr_QTextTableCell *C.QTextTableCell = nil + + C.QTextTableCell_new2(o.cPointer(), &outptr_QTextTableCell) + ret := newQTextTableCell(outptr_QTextTableCell) + ret.isSubclass = true + return ret } func (this *QTextTableCell) OperatorAssign(o *QTextTableCell) { @@ -64,7 +79,7 @@ func (this *QTextTableCell) SetFormat(format *QTextCharFormat) { func (this *QTextTableCell) Format() *QTextCharFormat { _ret := C.QTextTableCell_Format(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -139,7 +154,7 @@ func (this *QTextTableCell) TableCellFormatIndex() int { // Delete this object from C++ memory. func (this *QTextTableCell) Delete() { - C.QTextTableCell_Delete(this.h) + C.QTextTableCell_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -152,7 +167,8 @@ func (this *QTextTableCell) GoGC() { } type QTextTable struct { - h *C.QTextTable + h *C.QTextTable + isSubclass bool *QTextFrame } @@ -170,21 +186,36 @@ func (this *QTextTable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextTable(h *C.QTextTable) *QTextTable { +// newQTextTable constructs the type using only CGO pointers. +func newQTextTable(h *C.QTextTable, h_QTextFrame *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextTable { if h == nil { return nil } - return &QTextTable{h: h, QTextFrame: UnsafeNewQTextFrame(unsafe.Pointer(h))} + return &QTextTable{h: h, + QTextFrame: newQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} } -func UnsafeNewQTextTable(h unsafe.Pointer) *QTextTable { - return newQTextTable((*C.QTextTable)(h)) +// UnsafeNewQTextTable constructs the type using only unsafe pointers. +func UnsafeNewQTextTable(h unsafe.Pointer, h_QTextFrame unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextTable { + if h == nil { + return nil + } + + return &QTextTable{h: (*C.QTextTable)(h), + QTextFrame: UnsafeNewQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} } // NewQTextTable constructs a new QTextTable object. func NewQTextTable(doc *QTextDocument) *QTextTable { - ret := C.QTextTable_new(doc.cPointer()) - return newQTextTable(ret) + var outptr_QTextTable *C.QTextTable = nil + var outptr_QTextFrame *C.QTextFrame = nil + var outptr_QTextObject *C.QTextObject = nil + var outptr_QObject *C.QObject = nil + + C.QTextTable_new(doc.cPointer(), &outptr_QTextTable, &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) + ret := newQTextTable(outptr_QTextTable, outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextTable) MetaObject() *QMetaObject { @@ -304,7 +335,7 @@ func (this *QTextTable) SetFormat(format *QTextTableFormat) { func (this *QTextTable) Format() *QTextTableFormat { _ret := C.QTextTable_Format(this.h) - _goptr := newQTextTableFormat(_ret) + _goptr := newQTextTableFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -355,7 +386,7 @@ func QTextTable_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTextTable) Delete() { - C.QTextTable_Delete(this.h) + C.QTextTable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtexttable.h b/qt/gen_qtexttable.h index 2636e742..39621830 100644 --- a/qt/gen_qtexttable.h +++ b/qt/gen_qtexttable.h @@ -16,30 +16,36 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QTextCharFormat; class QTextCursor; class QTextDocument; +class QTextFrame; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTextFrame__iterator) typedef QTextFrame::iterator QTextFrame__iterator; #else class QTextFrame__iterator; #endif +class QTextObject; class QTextTable; class QTextTableCell; class QTextTableFormat; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QTextCharFormat QTextCharFormat; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; +typedef struct QTextFrame QTextFrame; typedef struct QTextFrame__iterator QTextFrame__iterator; +typedef struct QTextObject QTextObject; typedef struct QTextTable QTextTable; typedef struct QTextTableCell QTextTableCell; typedef struct QTextTableFormat QTextTableFormat; #endif -QTextTableCell* QTextTableCell_new(); -QTextTableCell* QTextTableCell_new2(QTextTableCell* o); +void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell); +void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell); void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o); void QTextTableCell_SetFormat(QTextTableCell* self, QTextCharFormat* format); QTextCharFormat* QTextTableCell_Format(const QTextTableCell* self); @@ -57,9 +63,9 @@ bool QTextTableCell_OperatorNotEqual(const QTextTableCell* self, QTextTableCell* QTextFrame__iterator* QTextTableCell_Begin(const QTextTableCell* self); QTextFrame__iterator* QTextTableCell_End(const QTextTableCell* self); int QTextTableCell_TableCellFormatIndex(const QTextTableCell* self); -void QTextTableCell_Delete(QTextTableCell* self); +void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass); -QTextTable* QTextTable_new(QTextDocument* doc); +void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); QMetaObject* QTextTable_MetaObject(const QTextTable* self); void* QTextTable_Metacast(QTextTable* self, const char* param1); struct miqt_string QTextTable_Tr(const char* s); @@ -87,7 +93,7 @@ struct miqt_string QTextTable_Tr2(const char* s, const char* c); struct miqt_string QTextTable_Tr3(const char* s, const char* c, int n); struct miqt_string QTextTable_TrUtf82(const char* s, const char* c); struct miqt_string QTextTable_TrUtf83(const char* s, const char* c, int n); -void QTextTable_Delete(QTextTable* self); +void QTextTable_Delete(QTextTable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qthread.cpp b/qt/gen_qthread.cpp index 65cfccde..8c90cb63 100644 --- a/qt/gen_qthread.cpp +++ b/qt/gen_qthread.cpp @@ -1,22 +1,233 @@ #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qthread.h" #include "_cgo_export.h" -QThread* QThread_new() { - return new QThread(); +class MiqtVirtualQThread : public virtual QThread { +public: + + MiqtVirtualQThread(): QThread() {}; + MiqtVirtualQThread(QObject* parent): QThread(parent) {}; + + virtual ~MiqtVirtualQThread() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QThread::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QThread_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QThread::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Run = 0; + + // Subclass to allow providing a Go implementation + virtual void run() override { + if (handle__Run == 0) { + QThread::run(); + return; + } + + + miqt_exec_callback_QThread_Run(this, handle__Run); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Run() { + + QThread::run(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QThread::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QThread_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QThread::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QThread::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QThread_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QThread::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QThread::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QThread_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QThread::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QThread::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QThread_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QThread::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QThread::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThread_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QThread::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QThread::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThread_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QThread::disconnectNotify(*signal); + + } + +}; + +void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject) { + MiqtVirtualQThread* ret = new MiqtVirtualQThread(); + *outptr_QThread = ret; + *outptr_QObject = static_cast(ret); } -QThread* QThread_new2(QObject* parent) { - return new QThread(parent); +void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject) { + MiqtVirtualQThread* ret = new MiqtVirtualQThread(parent); + *outptr_QThread = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QThread_MetaObject(const QThread* self) { @@ -208,7 +419,75 @@ bool QThread_Wait1(QThread* self, QDeadlineTimer* deadline) { return self->wait(*deadline); } -void QThread_Delete(QThread* self) { - delete self; +void QThread_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__Event = slot; +} + +bool QThread_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQThread*)(self) )->virtualbase_Event(event); +} + +void QThread_override_virtual_Run(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__Run = slot; +} + +void QThread_virtualbase_Run(void* self) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_Run(); +} + +void QThread_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__EventFilter = slot; +} + +bool QThread_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQThread*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QThread_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__TimerEvent = slot; +} + +void QThread_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_TimerEvent(event); +} + +void QThread_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__ChildEvent = slot; +} + +void QThread_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_ChildEvent(event); +} + +void QThread_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__CustomEvent = slot; +} + +void QThread_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_CustomEvent(event); +} + +void QThread_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__ConnectNotify = slot; +} + +void QThread_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QThread_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__DisconnectNotify = slot; +} + +void QThread_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QThread_Delete(QThread* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qthread.go b/qt/gen_qthread.go index 6f051f28..65335e35 100644 --- a/qt/gen_qthread.go +++ b/qt/gen_qthread.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -27,7 +28,8 @@ const ( ) type QThread struct { - h *C.QThread + h *C.QThread + isSubclass bool *QObject } @@ -45,27 +47,45 @@ func (this *QThread) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQThread(h *C.QThread) *QThread { +// newQThread constructs the type using only CGO pointers. +func newQThread(h *C.QThread, h_QObject *C.QObject) *QThread { if h == nil { return nil } - return &QThread{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QThread{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQThread(h unsafe.Pointer) *QThread { - return newQThread((*C.QThread)(h)) +// UnsafeNewQThread constructs the type using only unsafe pointers. +func UnsafeNewQThread(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThread { + if h == nil { + return nil + } + + return &QThread{h: (*C.QThread)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQThread constructs a new QThread object. func NewQThread() *QThread { - ret := C.QThread_new() - return newQThread(ret) + var outptr_QThread *C.QThread = nil + var outptr_QObject *C.QObject = nil + + C.QThread_new(&outptr_QThread, &outptr_QObject) + ret := newQThread(outptr_QThread, outptr_QObject) + ret.isSubclass = true + return ret } // NewQThread2 constructs a new QThread object. func NewQThread2(parent *QObject) *QThread { - ret := C.QThread_new2(parent.cPointer()) - return newQThread(ret) + var outptr_QThread *C.QThread = nil + var outptr_QObject *C.QObject = nil + + C.QThread_new2(parent.cPointer(), &outptr_QThread, &outptr_QObject) + ret := newQThread(outptr_QThread, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QThread) MetaObject() *QMetaObject { @@ -101,7 +121,7 @@ func QThread_CurrentThreadId() unsafe.Pointer { } func QThread_CurrentThread() *QThread { - return UnsafeNewQThread(unsafe.Pointer(C.QThread_CurrentThread())) + return UnsafeNewQThread(unsafe.Pointer(C.QThread_CurrentThread()), nil) } func QThread_IdealThreadCount() int { @@ -149,7 +169,7 @@ func (this *QThread) Exit() { } func (this *QThread) EventDispatcher() *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QThread_EventDispatcher(this.h))) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QThread_EventDispatcher(this.h)), nil) } func (this *QThread) SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -252,9 +272,195 @@ func (this *QThread) Wait1(deadline QDeadlineTimer) bool { return (bool)(C.QThread_Wait1(this.h, deadline.cPointer())) } +func (this *QThread) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QThread_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QThread) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QThread_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_Event +func miqt_exec_callback_QThread_Event(self *C.QThread, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThread{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QThread) callVirtualBase_Run() { + + C.QThread_virtualbase_Run(unsafe.Pointer(this.h)) + +} +func (this *QThread) OnRun(slot func(super func())) { + C.QThread_override_virtual_Run(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_Run +func miqt_exec_callback_QThread_Run(self *C.QThread, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QThread{h: self}).callVirtualBase_Run) + +} + +func (this *QThread) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QThread_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QThread) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QThread_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_EventFilter +func miqt_exec_callback_QThread_EventFilter(self *C.QThread, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThread{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QThread) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QThread_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThread) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QThread_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_TimerEvent +func miqt_exec_callback_QThread_TimerEvent(self *C.QThread, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QThread{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QThread) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QThread_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThread) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QThread_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_ChildEvent +func miqt_exec_callback_QThread_ChildEvent(self *C.QThread, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QThread{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QThread) callVirtualBase_CustomEvent(event *QEvent) { + + C.QThread_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThread) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QThread_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_CustomEvent +func miqt_exec_callback_QThread_CustomEvent(self *C.QThread, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QThread{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QThread) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QThread_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThread) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThread_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_ConnectNotify +func miqt_exec_callback_QThread_ConnectNotify(self *C.QThread, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThread{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QThread) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QThread_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThread) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThread_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_DisconnectNotify +func miqt_exec_callback_QThread_DisconnectNotify(self *C.QThread, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThread{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QThread) Delete() { - C.QThread_Delete(this.h) + C.QThread_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qthread.h b/qt/gen_qthread.h index b961ab70..af41839a 100644 --- a/qt/gen_qthread.h +++ b/qt/gen_qthread.h @@ -16,22 +16,28 @@ extern "C" { #ifdef __cplusplus class QAbstractEventDispatcher; +class QChildEvent; class QDeadlineTimer; class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QThread; +class QTimerEvent; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; +typedef struct QChildEvent QChildEvent; typedef struct QDeadlineTimer QDeadlineTimer; typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; #endif -QThread* QThread_new(); -QThread* QThread_new2(QObject* parent); +void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject); +void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject); QMetaObject* QThread_MetaObject(const QThread* self); void* QThread_Metacast(QThread* self, const char* param1); struct miqt_string QThread_Tr(const char* s); @@ -61,6 +67,7 @@ bool QThread_WaitWithTime(QThread* self, unsigned long time); void QThread_Sleep(unsigned long param1); void QThread_Msleep(unsigned long param1); void QThread_Usleep(unsigned long param1); +void QThread_Run(QThread* self); struct miqt_string QThread_Tr2(const char* s, const char* c); struct miqt_string QThread_Tr3(const char* s, const char* c, int n); struct miqt_string QThread_TrUtf82(const char* s, const char* c); @@ -68,7 +75,23 @@ struct miqt_string QThread_TrUtf83(const char* s, const char* c, int n); void QThread_Exit1(QThread* self, int retcode); void QThread_Start1(QThread* self, int param1); bool QThread_Wait1(QThread* self, QDeadlineTimer* deadline); -void QThread_Delete(QThread* self); +void QThread_override_virtual_Event(void* self, intptr_t slot); +bool QThread_virtualbase_Event(void* self, QEvent* event); +void QThread_override_virtual_Run(void* self, intptr_t slot); +void QThread_virtualbase_Run(void* self); +void QThread_override_virtual_EventFilter(void* self, intptr_t slot); +bool QThread_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QThread_override_virtual_TimerEvent(void* self, intptr_t slot); +void QThread_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QThread_override_virtual_ChildEvent(void* self, intptr_t slot); +void QThread_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QThread_override_virtual_CustomEvent(void* self, intptr_t slot); +void QThread_virtualbase_CustomEvent(void* self, QEvent* event); +void QThread_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QThread_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QThread_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QThread_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QThread_Delete(QThread* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qthreadpool.cpp b/qt/gen_qthreadpool.cpp index 0b370e92..a1c00d96 100644 --- a/qt/gen_qthreadpool.cpp +++ b/qt/gen_qthreadpool.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,16 +9,202 @@ #include #include #include +#include #include #include "gen_qthreadpool.h" #include "_cgo_export.h" -QThreadPool* QThreadPool_new() { - return new QThreadPool(); +class MiqtVirtualQThreadPool : public virtual QThreadPool { +public: + + MiqtVirtualQThreadPool(): QThreadPool() {}; + MiqtVirtualQThreadPool(QObject* parent): QThreadPool(parent) {}; + + virtual ~MiqtVirtualQThreadPool() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QThreadPool::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QThreadPool_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QThreadPool::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QThreadPool::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QThreadPool_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QThreadPool::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QThreadPool::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QThreadPool_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QThreadPool::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QThreadPool::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QThreadPool_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QThreadPool::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QThreadPool::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QThreadPool_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QThreadPool::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QThreadPool::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThreadPool_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QThreadPool::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QThreadPool::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThreadPool_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QThreadPool::disconnectNotify(*signal); + + } + +}; + +void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { + MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(); + *outptr_QThreadPool = ret; + *outptr_QObject = static_cast(ret); } -QThreadPool* QThreadPool_new2(QObject* parent) { - return new QThreadPool(parent); +void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { + MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(parent); + *outptr_QThreadPool = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QThreadPool_MetaObject(const QThreadPool* self) { @@ -169,7 +358,67 @@ bool QThreadPool_WaitForDone1(QThreadPool* self, int msecs) { return self->waitForDone(static_cast(msecs)); } -void QThreadPool_Delete(QThreadPool* self) { - delete self; +void QThreadPool_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__Event = slot; +} + +bool QThreadPool_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_Event(event); +} + +void QThreadPool_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__EventFilter = slot; +} + +bool QThreadPool_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QThreadPool_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__TimerEvent = slot; +} + +void QThreadPool_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_TimerEvent(event); +} + +void QThreadPool_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__ChildEvent = slot; +} + +void QThreadPool_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_ChildEvent(event); +} + +void QThreadPool_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__CustomEvent = slot; +} + +void QThreadPool_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_CustomEvent(event); +} + +void QThreadPool_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__ConnectNotify = slot; +} + +void QThreadPool_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QThreadPool_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__DisconnectNotify = slot; +} + +void QThreadPool_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QThreadPool_Delete(QThreadPool* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qthreadpool.go b/qt/gen_qthreadpool.go index 2aec2121..c71c23f0 100644 --- a/qt/gen_qthreadpool.go +++ b/qt/gen_qthreadpool.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QThreadPool struct { - h *C.QThreadPool + h *C.QThreadPool + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QThreadPool) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQThreadPool(h *C.QThreadPool) *QThreadPool { +// newQThreadPool constructs the type using only CGO pointers. +func newQThreadPool(h *C.QThreadPool, h_QObject *C.QObject) *QThreadPool { if h == nil { return nil } - return &QThreadPool{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QThreadPool{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQThreadPool(h unsafe.Pointer) *QThreadPool { - return newQThreadPool((*C.QThreadPool)(h)) +// UnsafeNewQThreadPool constructs the type using only unsafe pointers. +func UnsafeNewQThreadPool(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThreadPool { + if h == nil { + return nil + } + + return &QThreadPool{h: (*C.QThreadPool)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQThreadPool constructs a new QThreadPool object. func NewQThreadPool() *QThreadPool { - ret := C.QThreadPool_new() - return newQThreadPool(ret) + var outptr_QThreadPool *C.QThreadPool = nil + var outptr_QObject *C.QObject = nil + + C.QThreadPool_new(&outptr_QThreadPool, &outptr_QObject) + ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret.isSubclass = true + return ret } // NewQThreadPool2 constructs a new QThreadPool object. func NewQThreadPool2(parent *QObject) *QThreadPool { - ret := C.QThreadPool_new2(parent.cPointer()) - return newQThreadPool(ret) + var outptr_QThreadPool *C.QThreadPool = nil + var outptr_QObject *C.QObject = nil + + C.QThreadPool_new2(parent.cPointer(), &outptr_QThreadPool, &outptr_QObject) + ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QThreadPool) MetaObject() *QMetaObject { @@ -84,7 +104,7 @@ func QThreadPool_TrUtf8(s string) string { } func QThreadPool_GlobalInstance() *QThreadPool { - return UnsafeNewQThreadPool(unsafe.Pointer(C.QThreadPool_GlobalInstance())) + return UnsafeNewQThreadPool(unsafe.Pointer(C.QThreadPool_GlobalInstance()), nil) } func (this *QThreadPool) Start(runnable *QRunnable) { @@ -203,9 +223,175 @@ func (this *QThreadPool) WaitForDone1(msecs int) bool { return (bool)(C.QThreadPool_WaitForDone1(this.h, (C.int)(msecs))) } +func (this *QThreadPool) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QThreadPool_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QThreadPool) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QThreadPool_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_Event +func miqt_exec_callback_QThreadPool_Event(self *C.QThreadPool, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThreadPool{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QThreadPool) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QThreadPool_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QThreadPool) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QThreadPool_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_EventFilter +func miqt_exec_callback_QThreadPool_EventFilter(self *C.QThreadPool, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThreadPool{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QThreadPool) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QThreadPool_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThreadPool) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QThreadPool_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_TimerEvent +func miqt_exec_callback_QThreadPool_TimerEvent(self *C.QThreadPool, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QThreadPool{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QThreadPool_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThreadPool) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QThreadPool_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_ChildEvent +func miqt_exec_callback_QThreadPool_ChildEvent(self *C.QThreadPool, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QThreadPool{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_CustomEvent(event *QEvent) { + + C.QThreadPool_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThreadPool) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QThreadPool_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_CustomEvent +func miqt_exec_callback_QThreadPool_CustomEvent(self *C.QThreadPool, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QThreadPool{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QThreadPool_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThreadPool) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThreadPool_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_ConnectNotify +func miqt_exec_callback_QThreadPool_ConnectNotify(self *C.QThreadPool, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThreadPool{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QThreadPool_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThreadPool) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThreadPool_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_DisconnectNotify +func miqt_exec_callback_QThreadPool_DisconnectNotify(self *C.QThreadPool, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThreadPool{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QThreadPool) Delete() { - C.QThreadPool_Delete(this.h) + C.QThreadPool_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qthreadpool.h b/qt/gen_qthreadpool.h index 97d69d5b..d3b52f7e 100644 --- a/qt/gen_qthreadpool.h +++ b/qt/gen_qthreadpool.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QRunnable; class QThread; class QThreadPool; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRunnable QRunnable; typedef struct QThread QThread; typedef struct QThreadPool QThreadPool; +typedef struct QTimerEvent QTimerEvent; #endif -QThreadPool* QThreadPool_new(); -QThreadPool* QThreadPool_new2(QObject* parent); +void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); +void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); QMetaObject* QThreadPool_MetaObject(const QThreadPool* self); void* QThreadPool_Metacast(QThreadPool* self, const char* param1); struct miqt_string QThreadPool_Tr(const char* s); @@ -57,7 +65,21 @@ struct miqt_string QThreadPool_TrUtf82(const char* s, const char* c); struct miqt_string QThreadPool_TrUtf83(const char* s, const char* c, int n); void QThreadPool_Start2(QThreadPool* self, QRunnable* runnable, int priority); bool QThreadPool_WaitForDone1(QThreadPool* self, int msecs); -void QThreadPool_Delete(QThreadPool* self); +void QThreadPool_override_virtual_Event(void* self, intptr_t slot); +bool QThreadPool_virtualbase_Event(void* self, QEvent* event); +void QThreadPool_override_virtual_EventFilter(void* self, intptr_t slot); +bool QThreadPool_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QThreadPool_override_virtual_TimerEvent(void* self, intptr_t slot); +void QThreadPool_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QThreadPool_override_virtual_ChildEvent(void* self, intptr_t slot); +void QThreadPool_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QThreadPool_override_virtual_CustomEvent(void* self, intptr_t slot); +void QThreadPool_virtualbase_CustomEvent(void* self, QEvent* event); +void QThreadPool_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QThreadPool_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QThreadPool_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QThreadPool_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QThreadPool_Delete(QThreadPool* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qthreadstorage.cpp b/qt/gen_qthreadstorage.cpp index c144d63d..e694cada 100644 --- a/qt/gen_qthreadstorage.cpp +++ b/qt/gen_qthreadstorage.cpp @@ -3,11 +3,16 @@ #include "gen_qthreadstorage.h" #include "_cgo_export.h" -QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1) { - return new QThreadStorageData(*param1); +void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData) { + QThreadStorageData* ret = new QThreadStorageData(*param1); + *outptr_QThreadStorageData = ret; } -void QThreadStorageData_Delete(QThreadStorageData* self) { - delete self; +void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qthreadstorage.go b/qt/gen_qthreadstorage.go index d2a0a70b..314dbf54 100644 --- a/qt/gen_qthreadstorage.go +++ b/qt/gen_qthreadstorage.go @@ -14,7 +14,8 @@ import ( ) type QThreadStorageData struct { - h *C.QThreadStorageData + h *C.QThreadStorageData + isSubclass bool } func (this *QThreadStorageData) cPointer() *C.QThreadStorageData { @@ -31,6 +32,7 @@ func (this *QThreadStorageData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQThreadStorageData constructs the type using only CGO pointers. func newQThreadStorageData(h *C.QThreadStorageData) *QThreadStorageData { if h == nil { return nil @@ -38,19 +40,28 @@ func newQThreadStorageData(h *C.QThreadStorageData) *QThreadStorageData { return &QThreadStorageData{h: h} } +// UnsafeNewQThreadStorageData constructs the type using only unsafe pointers. func UnsafeNewQThreadStorageData(h unsafe.Pointer) *QThreadStorageData { - return newQThreadStorageData((*C.QThreadStorageData)(h)) + if h == nil { + return nil + } + + return &QThreadStorageData{h: (*C.QThreadStorageData)(h)} } // NewQThreadStorageData constructs a new QThreadStorageData object. func NewQThreadStorageData(param1 *QThreadStorageData) *QThreadStorageData { - ret := C.QThreadStorageData_new(param1.cPointer()) - return newQThreadStorageData(ret) + var outptr_QThreadStorageData *C.QThreadStorageData = nil + + C.QThreadStorageData_new(param1.cPointer(), &outptr_QThreadStorageData) + ret := newQThreadStorageData(outptr_QThreadStorageData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QThreadStorageData) Delete() { - C.QThreadStorageData_Delete(this.h) + C.QThreadStorageData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qthreadstorage.h b/qt/gen_qthreadstorage.h index 571f3356..6895508c 100644 --- a/qt/gen_qthreadstorage.h +++ b/qt/gen_qthreadstorage.h @@ -20,8 +20,8 @@ class QThreadStorageData; typedef struct QThreadStorageData QThreadStorageData; #endif -QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1); -void QThreadStorageData_Delete(QThreadStorageData* self); +void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData); +void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtimeline.cpp b/qt/gen_qtimeline.cpp index 7e115c74..5694ce46 100644 --- a/qt/gen_qtimeline.cpp +++ b/qt/gen_qtimeline.cpp @@ -1,24 +1,240 @@ +#include #include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qtimeline.h" #include "_cgo_export.h" -QTimeLine* QTimeLine_new() { - return new QTimeLine(); +class MiqtVirtualQTimeLine : public virtual QTimeLine { +public: + + MiqtVirtualQTimeLine(): QTimeLine() {}; + MiqtVirtualQTimeLine(int duration): QTimeLine(duration) {}; + MiqtVirtualQTimeLine(int duration, QObject* parent): QTimeLine(duration, parent) {}; + + virtual ~MiqtVirtualQTimeLine() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValueForTime = 0; + + // Subclass to allow providing a Go implementation + virtual qreal valueForTime(int msec) const override { + if (handle__ValueForTime == 0) { + return QTimeLine::valueForTime(msec); + } + + int sigval1 = msec; + + double callback_return_value = miqt_exec_callback_QTimeLine_ValueForTime(const_cast(this), handle__ValueForTime, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + double virtualbase_ValueForTime(int msec) const { + + qreal _ret = QTimeLine::valueForTime(static_cast(msec)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTimeLine::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTimeLine_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTimeLine::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTimeLine::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTimeLine_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTimeLine::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTimeLine::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTimeLine_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTimeLine::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTimeLine::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTimeLine_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTimeLine::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTimeLine::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTimeLine_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTimeLine::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTimeLine::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimeLine_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTimeLine::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTimeLine::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimeLine_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTimeLine::disconnectNotify(*signal); + + } + +}; + +void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { + MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(); + *outptr_QTimeLine = ret; + *outptr_QObject = static_cast(ret); } -QTimeLine* QTimeLine_new2(int duration) { - return new QTimeLine(static_cast(duration)); +void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { + MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration)); + *outptr_QTimeLine = ret; + *outptr_QObject = static_cast(ret); } -QTimeLine* QTimeLine_new3(int duration, QObject* parent) { - return new QTimeLine(static_cast(duration), parent); +void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { + MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration), parent); + *outptr_QTimeLine = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTimeLine_MetaObject(const QTimeLine* self) { @@ -216,7 +432,75 @@ struct miqt_string QTimeLine_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTimeLine_Delete(QTimeLine* self) { - delete self; +void QTimeLine_override_virtual_ValueForTime(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__ValueForTime = slot; +} + +double QTimeLine_virtualbase_ValueForTime(const void* self, int msec) { + return ( (const MiqtVirtualQTimeLine*)(self) )->virtualbase_ValueForTime(msec); +} + +void QTimeLine_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__TimerEvent = slot; +} + +void QTimeLine_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_TimerEvent(event); +} + +void QTimeLine_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__Event = slot; +} + +bool QTimeLine_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_Event(event); +} + +void QTimeLine_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__EventFilter = slot; +} + +bool QTimeLine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTimeLine_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__ChildEvent = slot; +} + +void QTimeLine_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_ChildEvent(event); +} + +void QTimeLine_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__CustomEvent = slot; +} + +void QTimeLine_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_CustomEvent(event); +} + +void QTimeLine_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__ConnectNotify = slot; +} + +void QTimeLine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTimeLine_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__DisconnectNotify = slot; +} + +void QTimeLine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTimeLine_Delete(QTimeLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtimeline.go b/qt/gen_qtimeline.go index 36069068..f3cdaefb 100644 --- a/qt/gen_qtimeline.go +++ b/qt/gen_qtimeline.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -40,7 +41,8 @@ const ( ) type QTimeLine struct { - h *C.QTimeLine + h *C.QTimeLine + isSubclass bool *QObject } @@ -58,33 +60,56 @@ func (this *QTimeLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTimeLine(h *C.QTimeLine) *QTimeLine { +// newQTimeLine constructs the type using only CGO pointers. +func newQTimeLine(h *C.QTimeLine, h_QObject *C.QObject) *QTimeLine { if h == nil { return nil } - return &QTimeLine{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTimeLine{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTimeLine(h unsafe.Pointer) *QTimeLine { - return newQTimeLine((*C.QTimeLine)(h)) +// UnsafeNewQTimeLine constructs the type using only unsafe pointers. +func UnsafeNewQTimeLine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimeLine { + if h == nil { + return nil + } + + return &QTimeLine{h: (*C.QTimeLine)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTimeLine constructs a new QTimeLine object. func NewQTimeLine() *QTimeLine { - ret := C.QTimeLine_new() - return newQTimeLine(ret) + var outptr_QTimeLine *C.QTimeLine = nil + var outptr_QObject *C.QObject = nil + + C.QTimeLine_new(&outptr_QTimeLine, &outptr_QObject) + ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTimeLine2 constructs a new QTimeLine object. func NewQTimeLine2(duration int) *QTimeLine { - ret := C.QTimeLine_new2((C.int)(duration)) - return newQTimeLine(ret) + var outptr_QTimeLine *C.QTimeLine = nil + var outptr_QObject *C.QObject = nil + + C.QTimeLine_new2((C.int)(duration), &outptr_QTimeLine, &outptr_QObject) + ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTimeLine3 constructs a new QTimeLine object. func NewQTimeLine3(duration int, parent *QObject) *QTimeLine { - ret := C.QTimeLine_new3((C.int)(duration), parent.cPointer()) - return newQTimeLine(ret) + var outptr_QTimeLine *C.QTimeLine = nil + var outptr_QObject *C.QObject = nil + + C.QTimeLine_new3((C.int)(duration), parent.cPointer(), &outptr_QTimeLine, &outptr_QObject) + ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTimeLine) MetaObject() *QMetaObject { @@ -278,9 +303,200 @@ func QTimeLine_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTimeLine) callVirtualBase_ValueForTime(msec int) float64 { + + return (float64)(C.QTimeLine_virtualbase_ValueForTime(unsafe.Pointer(this.h), (C.int)(msec))) + +} +func (this *QTimeLine) OnValueForTime(slot func(super func(msec int) float64, msec int) float64) { + C.QTimeLine_override_virtual_ValueForTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_ValueForTime +func miqt_exec_callback_QTimeLine_ValueForTime(self *C.QTimeLine, cb C.intptr_t, msec C.int) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msec int) float64, msec int) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msec) + + virtualReturn := gofunc((&QTimeLine{h: self}).callVirtualBase_ValueForTime, slotval1) + + return (C.double)(virtualReturn) + +} + +func (this *QTimeLine) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTimeLine_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeLine) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTimeLine_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_TimerEvent +func miqt_exec_callback_QTimeLine_TimerEvent(self *C.QTimeLine, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeLine{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTimeLine_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTimeLine) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTimeLine_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_Event +func miqt_exec_callback_QTimeLine_Event(self *C.QTimeLine, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimeLine{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeLine) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTimeLine_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTimeLine) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTimeLine_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_EventFilter +func miqt_exec_callback_QTimeLine_EventFilter(self *C.QTimeLine, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimeLine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeLine) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTimeLine_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeLine) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTimeLine_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_ChildEvent +func miqt_exec_callback_QTimeLine_ChildEvent(self *C.QTimeLine, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeLine{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTimeLine_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeLine) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTimeLine_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_CustomEvent +func miqt_exec_callback_QTimeLine_CustomEvent(self *C.QTimeLine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTimeLine{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTimeLine_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimeLine) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimeLine_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_ConnectNotify +func miqt_exec_callback_QTimeLine_ConnectNotify(self *C.QTimeLine, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimeLine{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTimeLine_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimeLine) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimeLine_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_DisconnectNotify +func miqt_exec_callback_QTimeLine_DisconnectNotify(self *C.QTimeLine, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimeLine{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTimeLine) Delete() { - C.QTimeLine_Delete(this.h) + C.QTimeLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtimeline.h b/qt/gen_qtimeline.h index 05ccab08..915f4798 100644 --- a/qt/gen_qtimeline.h +++ b/qt/gen_qtimeline.h @@ -15,20 +15,28 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QEasingCurve; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QTimeLine; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; typedef struct QEasingCurve QEasingCurve; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTimeLine QTimeLine; +typedef struct QTimerEvent QTimerEvent; #endif -QTimeLine* QTimeLine_new(); -QTimeLine* QTimeLine_new2(int duration); -QTimeLine* QTimeLine_new3(int duration, QObject* parent); +void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); +void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); +void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); QMetaObject* QTimeLine_MetaObject(const QTimeLine* self); void* QTimeLine_Metacast(QTimeLine* self, const char* param1); struct miqt_string QTimeLine_Tr(const char* s); @@ -62,11 +70,28 @@ void QTimeLine_Stop(QTimeLine* self); void QTimeLine_SetPaused(QTimeLine* self, bool paused); void QTimeLine_SetCurrentTime(QTimeLine* self, int msec); void QTimeLine_ToggleDirection(QTimeLine* self); +void QTimeLine_TimerEvent(QTimeLine* self, QTimerEvent* event); struct miqt_string QTimeLine_Tr2(const char* s, const char* c); struct miqt_string QTimeLine_Tr3(const char* s, const char* c, int n); struct miqt_string QTimeLine_TrUtf82(const char* s, const char* c); struct miqt_string QTimeLine_TrUtf83(const char* s, const char* c, int n); -void QTimeLine_Delete(QTimeLine* self); +void QTimeLine_override_virtual_ValueForTime(void* self, intptr_t slot); +double QTimeLine_virtualbase_ValueForTime(const void* self, int msec); +void QTimeLine_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTimeLine_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTimeLine_override_virtual_Event(void* self, intptr_t slot); +bool QTimeLine_virtualbase_Event(void* self, QEvent* event); +void QTimeLine_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTimeLine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTimeLine_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTimeLine_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTimeLine_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTimeLine_virtualbase_CustomEvent(void* self, QEvent* event); +void QTimeLine_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTimeLine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTimeLine_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTimeLine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTimeLine_Delete(QTimeLine* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtimer.cpp b/qt/gen_qtimer.cpp index a40231d2..31683528 100644 --- a/qt/gen_qtimer.cpp +++ b/qt/gen_qtimer.cpp @@ -1,19 +1,208 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qtimer.h" #include "_cgo_export.h" -QTimer* QTimer_new() { - return new QTimer(); +class MiqtVirtualQTimer : public virtual QTimer { +public: + + MiqtVirtualQTimer(): QTimer() {}; + MiqtVirtualQTimer(QObject* parent): QTimer(parent) {}; + + virtual ~MiqtVirtualQTimer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QTimer::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QTimer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QTimer::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTimer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTimer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTimer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTimer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTimer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTimer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTimer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTimer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTimer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTimer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTimer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTimer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTimer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTimer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTimer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTimer::disconnectNotify(*signal); + + } + +}; + +void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject) { + MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(); + *outptr_QTimer = ret; + *outptr_QObject = static_cast(ret); } -QTimer* QTimer_new2(QObject* parent) { - return new QTimer(parent); +void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject) { + MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(parent); + *outptr_QTimer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTimer_MetaObject(const QTimer* self) { @@ -139,7 +328,67 @@ struct miqt_string QTimer_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTimer_Delete(QTimer* self) { - delete self; +void QTimer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__TimerEvent = slot; +} + +void QTimer_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_TimerEvent(param1); +} + +void QTimer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__Event = slot; +} + +bool QTimer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTimer*)(self) )->virtualbase_Event(event); +} + +void QTimer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__EventFilter = slot; +} + +bool QTimer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTimer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTimer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__ChildEvent = slot; +} + +void QTimer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_ChildEvent(event); +} + +void QTimer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__CustomEvent = slot; +} + +void QTimer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_CustomEvent(event); +} + +void QTimer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__ConnectNotify = slot; +} + +void QTimer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTimer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__DisconnectNotify = slot; +} + +void QTimer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTimer_Delete(QTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtimer.go b/qt/gen_qtimer.go index c49546bd..9b3a1764 100644 --- a/qt/gen_qtimer.go +++ b/qt/gen_qtimer.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTimer struct { - h *C.QTimer + h *C.QTimer + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTimer(h *C.QTimer) *QTimer { +// newQTimer constructs the type using only CGO pointers. +func newQTimer(h *C.QTimer, h_QObject *C.QObject) *QTimer { if h == nil { return nil } - return &QTimer{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTimer{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTimer(h unsafe.Pointer) *QTimer { - return newQTimer((*C.QTimer)(h)) +// UnsafeNewQTimer constructs the type using only unsafe pointers. +func UnsafeNewQTimer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimer { + if h == nil { + return nil + } + + return &QTimer{h: (*C.QTimer)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTimer constructs a new QTimer object. func NewQTimer() *QTimer { - ret := C.QTimer_new() - return newQTimer(ret) + var outptr_QTimer *C.QTimer = nil + var outptr_QObject *C.QObject = nil + + C.QTimer_new(&outptr_QTimer, &outptr_QObject) + ret := newQTimer(outptr_QTimer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTimer2 constructs a new QTimer object. func NewQTimer2(parent *QObject) *QTimer { - ret := C.QTimer_new2(parent.cPointer()) - return newQTimer(ret) + var outptr_QTimer *C.QTimer = nil + var outptr_QObject *C.QObject = nil + + C.QTimer_new2(parent.cPointer(), &outptr_QTimer, &outptr_QObject) + ret := newQTimer(outptr_QTimer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTimer) MetaObject() *QMetaObject { @@ -175,9 +195,175 @@ func QTimer_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTimer) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QTimer_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTimer) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QTimer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_TimerEvent +func miqt_exec_callback_QTimer_TimerEvent(self *C.QTimer, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTimer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTimer) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTimer_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTimer) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTimer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_Event +func miqt_exec_callback_QTimer_Event(self *C.QTimer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimer) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTimer_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTimer) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTimer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_EventFilter +func miqt_exec_callback_QTimer_EventFilter(self *C.QTimer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimer) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTimer_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimer) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTimer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_ChildEvent +func miqt_exec_callback_QTimer_ChildEvent(self *C.QTimer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTimer) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTimer_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimer) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTimer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_CustomEvent +func miqt_exec_callback_QTimer_CustomEvent(self *C.QTimer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTimer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTimer) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTimer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimer) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_ConnectNotify +func miqt_exec_callback_QTimer_ConnectNotify(self *C.QTimer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTimer) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTimer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimer) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_DisconnectNotify +func miqt_exec_callback_QTimer_DisconnectNotify(self *C.QTimer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTimer) Delete() { - C.QTimer_Delete(this.h) + C.QTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtimer.h b/qt/gen_qtimer.h index 3460ea20..1fdd0484 100644 --- a/qt/gen_qtimer.h +++ b/qt/gen_qtimer.h @@ -15,17 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QTimer; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTimer QTimer; +typedef struct QTimerEvent QTimerEvent; #endif -QTimer* QTimer_new(); -QTimer* QTimer_new2(QObject* parent); +void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject); +void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject); QMetaObject* QTimer_MetaObject(const QTimer* self); void* QTimer_Metacast(QTimer* self, const char* param1); struct miqt_string QTimer_Tr(const char* s); @@ -42,11 +50,26 @@ bool QTimer_IsSingleShot(const QTimer* self); void QTimer_Start(QTimer* self, int msec); void QTimer_Start2(QTimer* self); void QTimer_Stop(QTimer* self); +void QTimer_TimerEvent(QTimer* self, QTimerEvent* param1); struct miqt_string QTimer_Tr2(const char* s, const char* c); struct miqt_string QTimer_Tr3(const char* s, const char* c, int n); struct miqt_string QTimer_TrUtf82(const char* s, const char* c); struct miqt_string QTimer_TrUtf83(const char* s, const char* c, int n); -void QTimer_Delete(QTimer* self); +void QTimer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTimer_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QTimer_override_virtual_Event(void* self, intptr_t slot); +bool QTimer_virtualbase_Event(void* self, QEvent* event); +void QTimer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTimer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTimer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTimer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTimer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTimer_virtualbase_CustomEvent(void* self, QEvent* event); +void QTimer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTimer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTimer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTimer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTimer_Delete(QTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtimezone.cpp b/qt/gen_qtimezone.cpp index 755534e1..4b2ddb51 100644 --- a/qt/gen_qtimezone.cpp +++ b/qt/gen_qtimezone.cpp @@ -11,43 +11,50 @@ #include "gen_qtimezone.h" #include "_cgo_export.h" -QTimeZone* QTimeZone_new() { - return new QTimeZone(); +void QTimeZone_new(QTimeZone** outptr_QTimeZone) { + QTimeZone* ret = new QTimeZone(); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new2(struct miqt_string ianaId) { +void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone) { QByteArray ianaId_QByteArray(ianaId.data, ianaId.len); - return new QTimeZone(ianaId_QByteArray); + QTimeZone* ret = new QTimeZone(ianaId_QByteArray); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new3(int offsetSeconds) { - return new QTimeZone(static_cast(offsetSeconds)); +void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone) { + QTimeZone* ret = new QTimeZone(static_cast(offsetSeconds)); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation) { +void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); + QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new5(QTimeZone* other) { - return new QTimeZone(*other); +void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone) { + QTimeZone* ret = new QTimeZone(*other); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country) { +void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, QTimeZone** outptr_QTimeZone) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country)); + QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country)); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment) { +void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment, QTimeZone** outptr_QTimeZone) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); QString comment_QString = QString::fromUtf8(comment.data, comment.len); - return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country), comment_QString); + QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country), comment_QString); + *outptr_QTimeZone = ret; } void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other) { @@ -357,19 +364,28 @@ struct miqt_string QTimeZone_DisplayName32(const QTimeZone* self, int timeType, return _ms; } -void QTimeZone_Delete(QTimeZone* self) { - delete self; +void QTimeZone_Delete(QTimeZone* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1) { - return new QTimeZone::OffsetData(*param1); +void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData) { + QTimeZone::OffsetData* ret = new QTimeZone::OffsetData(*param1); + *outptr_QTimeZone__OffsetData = ret; } void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1) { self->operator=(*param1); } -void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self) { - delete self; +void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtimezone.go b/qt/gen_qtimezone.go index 3538f100..8cf515ed 100644 --- a/qt/gen_qtimezone.go +++ b/qt/gen_qtimezone.go @@ -38,7 +38,8 @@ const ( ) type QTimeZone struct { - h *C.QTimeZone + h *C.QTimeZone + isSubclass bool } func (this *QTimeZone) cPointer() *C.QTimeZone { @@ -55,6 +56,7 @@ func (this *QTimeZone) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTimeZone constructs the type using only CGO pointers. func newQTimeZone(h *C.QTimeZone) *QTimeZone { if h == nil { return nil @@ -62,14 +64,23 @@ func newQTimeZone(h *C.QTimeZone) *QTimeZone { return &QTimeZone{h: h} } +// UnsafeNewQTimeZone constructs the type using only unsafe pointers. func UnsafeNewQTimeZone(h unsafe.Pointer) *QTimeZone { - return newQTimeZone((*C.QTimeZone)(h)) + if h == nil { + return nil + } + + return &QTimeZone{h: (*C.QTimeZone)(h)} } // NewQTimeZone constructs a new QTimeZone object. func NewQTimeZone() *QTimeZone { - ret := C.QTimeZone_new() - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new(&outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone2 constructs a new QTimeZone object. @@ -77,14 +88,22 @@ func NewQTimeZone2(ianaId []byte) *QTimeZone { ianaId_alias := C.struct_miqt_string{} ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0])) ianaId_alias.len = C.size_t(len(ianaId)) - ret := C.QTimeZone_new2(ianaId_alias) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new2(ianaId_alias, &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone3 constructs a new QTimeZone object. func NewQTimeZone3(offsetSeconds int) *QTimeZone { - ret := C.QTimeZone_new3((C.int)(offsetSeconds)) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new3((C.int)(offsetSeconds), &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone4 constructs a new QTimeZone object. @@ -100,14 +119,22 @@ func NewQTimeZone4(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - ret := C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone5 constructs a new QTimeZone object. func NewQTimeZone5(other *QTimeZone) *QTimeZone { - ret := C.QTimeZone_new5(other.cPointer()) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new5(other.cPointer(), &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone6 constructs a new QTimeZone object. @@ -123,8 +150,12 @@ func NewQTimeZone6(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - ret := C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country)) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone7 constructs a new QTimeZone object. @@ -144,8 +175,12 @@ func NewQTimeZone7(zoneId []byte, offsetSeconds int, name string, abbreviation s comment_ms.data = C.CString(comment) comment_ms.len = C.size_t(len(comment)) defer C.free(unsafe.Pointer(comment_ms.data)) - ret := C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), comment_ms) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), comment_ms, &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } func (this *QTimeZone) OperatorAssign(other *QTimeZone) { @@ -416,7 +451,7 @@ func (this *QTimeZone) DisplayName32(timeType QTimeZone__TimeType, nameType QTim // Delete this object from C++ memory. func (this *QTimeZone) Delete() { - C.QTimeZone_Delete(this.h) + C.QTimeZone_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -429,7 +464,8 @@ func (this *QTimeZone) GoGC() { } type QTimeZone__OffsetData struct { - h *C.QTimeZone__OffsetData + h *C.QTimeZone__OffsetData + isSubclass bool } func (this *QTimeZone__OffsetData) cPointer() *C.QTimeZone__OffsetData { @@ -446,6 +482,7 @@ func (this *QTimeZone__OffsetData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTimeZone__OffsetData constructs the type using only CGO pointers. func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData { if h == nil { return nil @@ -453,14 +490,23 @@ func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData return &QTimeZone__OffsetData{h: h} } +// UnsafeNewQTimeZone__OffsetData constructs the type using only unsafe pointers. func UnsafeNewQTimeZone__OffsetData(h unsafe.Pointer) *QTimeZone__OffsetData { - return newQTimeZone__OffsetData((*C.QTimeZone__OffsetData)(h)) + if h == nil { + return nil + } + + return &QTimeZone__OffsetData{h: (*C.QTimeZone__OffsetData)(h)} } // NewQTimeZone__OffsetData constructs a new QTimeZone::OffsetData object. func NewQTimeZone__OffsetData(param1 *QTimeZone__OffsetData) *QTimeZone__OffsetData { - ret := C.QTimeZone__OffsetData_new(param1.cPointer()) - return newQTimeZone__OffsetData(ret) + var outptr_QTimeZone__OffsetData *C.QTimeZone__OffsetData = nil + + C.QTimeZone__OffsetData_new(param1.cPointer(), &outptr_QTimeZone__OffsetData) + ret := newQTimeZone__OffsetData(outptr_QTimeZone__OffsetData) + ret.isSubclass = true + return ret } func (this *QTimeZone__OffsetData) OperatorAssign(param1 *QTimeZone__OffsetData) { @@ -469,7 +515,7 @@ func (this *QTimeZone__OffsetData) OperatorAssign(param1 *QTimeZone__OffsetData) // Delete this object from C++ memory. func (this *QTimeZone__OffsetData) Delete() { - C.QTimeZone__OffsetData_Delete(this.h) + C.QTimeZone__OffsetData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtimezone.h b/qt/gen_qtimezone.h index 11371928..4c4ece2b 100644 --- a/qt/gen_qtimezone.h +++ b/qt/gen_qtimezone.h @@ -32,13 +32,13 @@ typedef struct QTimeZone QTimeZone; typedef struct QTimeZone__OffsetData QTimeZone__OffsetData; #endif -QTimeZone* QTimeZone_new(); -QTimeZone* QTimeZone_new2(struct miqt_string ianaId); -QTimeZone* QTimeZone_new3(int offsetSeconds); -QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation); -QTimeZone* QTimeZone_new5(QTimeZone* other); -QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country); -QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment); +void QTimeZone_new(QTimeZone** outptr_QTimeZone); +void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone); +void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone); +void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone); +void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone); +void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, QTimeZone** outptr_QTimeZone); +void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment, QTimeZone** outptr_QTimeZone); void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other); void QTimeZone_Swap(QTimeZone* self, QTimeZone* other); bool QTimeZone_IsValid(const QTimeZone* self); @@ -74,11 +74,11 @@ struct miqt_string QTimeZone_DisplayName2(const QTimeZone* self, QDateTime* atDa struct miqt_string QTimeZone_DisplayName3(const QTimeZone* self, QDateTime* atDateTime, int nameType, QLocale* locale); struct miqt_string QTimeZone_DisplayName22(const QTimeZone* self, int timeType, int nameType); struct miqt_string QTimeZone_DisplayName32(const QTimeZone* self, int timeType, int nameType, QLocale* locale); -void QTimeZone_Delete(QTimeZone* self); +void QTimeZone_Delete(QTimeZone* self, bool isSubclass); -QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1); +void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData); void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1); -void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self); +void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtoolbar.cpp b/qt/gen_qtoolbar.cpp index 5f380455..5dabf549 100644 --- a/qt/gen_qtoolbar.cpp +++ b/qt/gen_qtoolbar.cpp @@ -1,34 +1,1062 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include #include +#include +#include #include #include #include "gen_qtoolbar.h" #include "_cgo_export.h" -QToolBar* QToolBar_new(QWidget* parent) { - return new QToolBar(parent); +class MiqtVirtualQToolBar : public virtual QToolBar { +public: + + MiqtVirtualQToolBar(QWidget* parent): QToolBar(parent) {}; + MiqtVirtualQToolBar(const QString& title): QToolBar(title) {}; + MiqtVirtualQToolBar(): QToolBar() {}; + MiqtVirtualQToolBar(const QString& title, QWidget* parent): QToolBar(title, parent) {}; + + virtual ~MiqtVirtualQToolBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QToolBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QToolBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QToolBar::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QToolBar::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QToolBar::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QToolBar::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QToolBar::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QToolBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QToolBar::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QToolBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QToolBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QToolBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QToolBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QToolBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QToolBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QToolBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QToolBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QToolBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QToolBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QToolBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QToolBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QToolBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QToolBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QToolBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QToolBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QToolBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QToolBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QToolBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QToolBar::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QToolBar::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QToolBar::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QToolBar::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QToolBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QToolBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QToolBar::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QToolBar::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QToolBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QToolBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QToolBar::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QToolBar::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QToolBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QToolBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QToolBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QToolBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QToolBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QToolBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QToolBar::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QToolBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QToolBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QToolBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QToolBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QToolBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QToolBar::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QToolBar::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QToolBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QToolBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QToolBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QToolBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QToolBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QToolBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QToolBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QToolBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QToolBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QToolBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QToolBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QToolBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QToolBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QToolBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QToolBar::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QToolBar::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QToolBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QToolBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QToolBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QToolBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QToolBar::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QToolBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QToolBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QToolBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QToolBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QToolBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QToolBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QToolBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QToolBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QToolBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QToolBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QToolBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QToolBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QToolBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QToolBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QToolBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QToolBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QToolBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QToolBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QToolBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QToolBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QToolBar::focusNextPrevChild(next); + + } + +}; + +void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(parent); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBar* QToolBar_new2(struct miqt_string title) { +void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QToolBar(title_QString); + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBar* QToolBar_new3() { - return new QToolBar(); +void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent) { +void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QToolBar(title_QString, parent); + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString, parent); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QToolBar_MetaObject(const QToolBar* self) { @@ -175,7 +1203,7 @@ void QToolBar_ActionTriggered(QToolBar* self, QAction* action) { } void QToolBar_connect_ActionTriggered(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::actionTriggered), self, [=](QAction* action) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::actionTriggered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QToolBar_ActionTriggered(slot, sigval1); }); @@ -186,7 +1214,7 @@ void QToolBar_MovableChanged(QToolBar* self, bool movable) { } void QToolBar_connect_MovableChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::movableChanged), self, [=](bool movable) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::movableChanged), self, [=](bool movable) { bool sigval1 = movable; miqt_exec_callback_QToolBar_MovableChanged(slot, sigval1); }); @@ -197,7 +1225,7 @@ void QToolBar_AllowedAreasChanged(QToolBar* self, int allowedAreas) { } void QToolBar_connect_AllowedAreasChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::allowedAreasChanged), self, [=](Qt::ToolBarAreas allowedAreas) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::allowedAreasChanged), self, [=](Qt::ToolBarAreas allowedAreas) { Qt::ToolBarAreas allowedAreas_ret = allowedAreas; int sigval1 = static_cast(allowedAreas_ret); miqt_exec_callback_QToolBar_AllowedAreasChanged(slot, sigval1); @@ -209,7 +1237,7 @@ void QToolBar_OrientationChanged(QToolBar* self, int orientation) { } void QToolBar_connect_OrientationChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::orientationChanged), self, [=](Qt::Orientation orientation) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::orientationChanged), self, [=](Qt::Orientation orientation) { Qt::Orientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); miqt_exec_callback_QToolBar_OrientationChanged(slot, sigval1); @@ -221,7 +1249,7 @@ void QToolBar_IconSizeChanged(QToolBar* self, QSize* iconSize) { } void QToolBar_connect_IconSizeChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::iconSizeChanged), self, [=](const QSize& iconSize) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::iconSizeChanged), self, [=](const QSize& iconSize) { const QSize& iconSize_ret = iconSize; // Cast returned reference into pointer QSize* sigval1 = const_cast(&iconSize_ret); @@ -234,7 +1262,7 @@ void QToolBar_ToolButtonStyleChanged(QToolBar* self, int toolButtonStyle) { } void QToolBar_connect_ToolButtonStyleChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { Qt::ToolButtonStyle toolButtonStyle_ret = toolButtonStyle; int sigval1 = static_cast(toolButtonStyle_ret); miqt_exec_callback_QToolBar_ToolButtonStyleChanged(slot, sigval1); @@ -246,7 +1274,7 @@ void QToolBar_TopLevelChanged(QToolBar* self, bool topLevel) { } void QToolBar_connect_TopLevelChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::topLevelChanged), self, [=](bool topLevel) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::topLevelChanged), self, [=](bool topLevel) { bool sigval1 = topLevel; miqt_exec_callback_QToolBar_TopLevelChanged(slot, sigval1); }); @@ -257,7 +1285,7 @@ void QToolBar_VisibilityChanged(QToolBar* self, bool visible) { } void QToolBar_connect_VisibilityChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::visibilityChanged), self, [=](bool visible) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::visibilityChanged), self, [=](bool visible) { bool sigval1 = visible; miqt_exec_callback_QToolBar_VisibilityChanged(slot, sigval1); }); @@ -307,7 +1335,339 @@ struct miqt_string QToolBar_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QToolBar_Delete(QToolBar* self) { - delete self; +void QToolBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ActionEvent = slot; +} + +void QToolBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QToolBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ChangeEvent = slot; +} + +void QToolBar_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ChangeEvent(event); +} + +void QToolBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__PaintEvent = slot; +} + +void QToolBar_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_PaintEvent(event); +} + +void QToolBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__Event = slot; +} + +bool QToolBar_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQToolBar*)(self) )->virtualbase_Event(event); +} + +void QToolBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DevType = slot; +} + +int QToolBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_DevType(); +} + +void QToolBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__SetVisible = slot; +} + +void QToolBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QToolBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QToolBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_SizeHint(); +} + +void QToolBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QToolBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QToolBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__HeightForWidth = slot; +} + +int QToolBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QToolBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QToolBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QToolBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QToolBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_PaintEngine(); +} + +void QToolBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MousePressEvent = slot; +} + +void QToolBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MousePressEvent(event); +} + +void QToolBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QToolBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QToolBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QToolBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QToolBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QToolBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QToolBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__WheelEvent = slot; +} + +void QToolBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QToolBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QToolBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QToolBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QToolBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QToolBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__FocusInEvent = slot; +} + +void QToolBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QToolBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QToolBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QToolBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__EnterEvent = slot; +} + +void QToolBar_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QToolBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__LeaveEvent = slot; +} + +void QToolBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QToolBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MoveEvent = slot; +} + +void QToolBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QToolBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ResizeEvent = slot; +} + +void QToolBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ResizeEvent(event); +} + +void QToolBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__CloseEvent = slot; +} + +void QToolBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QToolBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QToolBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QToolBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__TabletEvent = slot; +} + +void QToolBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QToolBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QToolBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QToolBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QToolBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QToolBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QToolBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QToolBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DropEvent = slot; +} + +void QToolBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DropEvent(event); +} + +void QToolBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ShowEvent = slot; +} + +void QToolBar_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ShowEvent(event); +} + +void QToolBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__HideEvent = slot; +} + +void QToolBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_HideEvent(event); +} + +void QToolBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__NativeEvent = slot; +} + +bool QToolBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQToolBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QToolBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__Metric = slot; +} + +int QToolBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_Metric(param1); +} + +void QToolBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InitPainter = slot; +} + +void QToolBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QToolBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QToolBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_Redirected(offset); +} + +void QToolBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QToolBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_SharedPainter(); +} + +void QToolBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QToolBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QToolBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QToolBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QToolBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QToolBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQToolBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QToolBar_Delete(QToolBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtoolbar.go b/qt/gen_qtoolbar.go index 825607c0..ab5f4c6b 100644 --- a/qt/gen_qtoolbar.go +++ b/qt/gen_qtoolbar.go @@ -15,7 +15,8 @@ import ( ) type QToolBar struct { - h *C.QToolBar + h *C.QToolBar + isSubclass bool *QWidget } @@ -33,21 +34,36 @@ func (this *QToolBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolBar(h *C.QToolBar) *QToolBar { +// newQToolBar constructs the type using only CGO pointers. +func newQToolBar(h *C.QToolBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBar { if h == nil { return nil } - return &QToolBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QToolBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQToolBar(h unsafe.Pointer) *QToolBar { - return newQToolBar((*C.QToolBar)(h)) +// UnsafeNewQToolBar constructs the type using only unsafe pointers. +func UnsafeNewQToolBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBar { + if h == nil { + return nil + } + + return &QToolBar{h: (*C.QToolBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQToolBar constructs a new QToolBar object. func NewQToolBar(parent *QWidget) *QToolBar { - ret := C.QToolBar_new(parent.cPointer()) - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new(parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBar2 constructs a new QToolBar object. @@ -56,14 +72,28 @@ func NewQToolBar2(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QToolBar_new2(title_ms) - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new2(title_ms, &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBar3 constructs a new QToolBar object. func NewQToolBar3() *QToolBar { - ret := C.QToolBar_new3() - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new3(&outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBar4 constructs a new QToolBar object. @@ -72,8 +102,15 @@ func NewQToolBar4(title string, parent *QWidget) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QToolBar_new4(title_ms, parent.cPointer()) - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new4(title_ms, parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QToolBar) MetaObject() *QMetaObject { @@ -141,7 +178,7 @@ func (this *QToolBar) AddAction(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddAction(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddAction(this.h, text_ms)), nil) } func (this *QToolBar) AddAction2(icon *QIcon, text string) *QAction { @@ -149,23 +186,23 @@ func (this *QToolBar) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddAction2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddAction2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QToolBar) AddSeparator() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddSeparator(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddSeparator(this.h)), nil) } func (this *QToolBar) InsertSeparator(before *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertSeparator(this.h, before.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertSeparator(this.h, before.cPointer())), nil) } func (this *QToolBar) AddWidget(widget *QWidget) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddWidget(this.h, widget.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddWidget(this.h, widget.cPointer())), nil) } func (this *QToolBar) InsertWidget(before *QAction, widget *QWidget) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer())), nil) } func (this *QToolBar) ActionGeometry(action *QAction) *QRect { @@ -176,15 +213,15 @@ func (this *QToolBar) ActionGeometry(action *QAction) *QRect { } func (this *QToolBar) ActionAt(p *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt(this.h, p.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt(this.h, p.cPointer())), nil) } func (this *QToolBar) ActionAt2(x int, y int) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y)))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y))), nil) } func (this *QToolBar) ToggleViewAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ToggleViewAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ToggleViewAction(this.h)), nil) } func (this *QToolBar) IconSize() *QSize { @@ -199,7 +236,7 @@ func (this *QToolBar) ToolButtonStyle() ToolButtonStyle { } func (this *QToolBar) WidgetForAction(action *QAction) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QToolBar_WidgetForAction(this.h, action.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QToolBar_WidgetForAction(this.h, action.cPointer())), nil, nil) } func (this *QToolBar) IsFloatable() bool { @@ -237,7 +274,7 @@ func miqt_exec_callback_QToolBar_ActionTriggered(cb C.intptr_t, action *C.QActio } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -426,9 +463,975 @@ func QToolBar_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QToolBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QToolBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QToolBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ActionEvent +func miqt_exec_callback_QToolBar_ActionEvent(self *C.QToolBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QToolBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QToolBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ChangeEvent +func miqt_exec_callback_QToolBar_ChangeEvent(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QToolBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QToolBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QToolBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_PaintEvent +func miqt_exec_callback_QToolBar_PaintEvent(self *C.QToolBar, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QToolBar_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QToolBar) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QToolBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_Event +func miqt_exec_callback_QToolBar_Event(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_DevType() int { + + return (int)(C.QToolBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QToolBar) OnDevType(slot func(super func() int) int) { + C.QToolBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DevType +func miqt_exec_callback_QToolBar_DevType(self *C.QToolBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_SetVisible(visible bool) { + + C.QToolBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QToolBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QToolBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_SetVisible +func miqt_exec_callback_QToolBar_SetVisible(self *C.QToolBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QToolBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QToolBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QToolBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_SizeHint +func miqt_exec_callback_QToolBar_SizeHint(self *C.QToolBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QToolBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MinimumSizeHint +func miqt_exec_callback_QToolBar_MinimumSizeHint(self *C.QToolBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QToolBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QToolBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QToolBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_HeightForWidth +func miqt_exec_callback_QToolBar_HeightForWidth(self *C.QToolBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QToolBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QToolBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QToolBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_HasHeightForWidth +func miqt_exec_callback_QToolBar_HasHeightForWidth(self *C.QToolBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QToolBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QToolBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QToolBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_PaintEngine +func miqt_exec_callback_QToolBar_PaintEngine(self *C.QToolBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MousePressEvent +func miqt_exec_callback_QToolBar_MousePressEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MouseReleaseEvent +func miqt_exec_callback_QToolBar_MouseReleaseEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MouseDoubleClickEvent +func miqt_exec_callback_QToolBar_MouseDoubleClickEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MouseMoveEvent +func miqt_exec_callback_QToolBar_MouseMoveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QToolBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QToolBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_WheelEvent +func miqt_exec_callback_QToolBar_WheelEvent(self *C.QToolBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QToolBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QToolBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_KeyPressEvent +func miqt_exec_callback_QToolBar_KeyPressEvent(self *C.QToolBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QToolBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QToolBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_KeyReleaseEvent +func miqt_exec_callback_QToolBar_KeyReleaseEvent(self *C.QToolBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QToolBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QToolBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_FocusInEvent +func miqt_exec_callback_QToolBar_FocusInEvent(self *C.QToolBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QToolBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QToolBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_FocusOutEvent +func miqt_exec_callback_QToolBar_FocusOutEvent(self *C.QToolBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_EnterEvent(event *QEvent) { + + C.QToolBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QToolBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_EnterEvent +func miqt_exec_callback_QToolBar_EnterEvent(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QToolBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QToolBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QToolBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_LeaveEvent +func miqt_exec_callback_QToolBar_LeaveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QToolBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QToolBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QToolBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MoveEvent +func miqt_exec_callback_QToolBar_MoveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QToolBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QToolBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ResizeEvent +func miqt_exec_callback_QToolBar_ResizeEvent(self *C.QToolBar, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QToolBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QToolBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_CloseEvent +func miqt_exec_callback_QToolBar_CloseEvent(self *C.QToolBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QToolBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QToolBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ContextMenuEvent +func miqt_exec_callback_QToolBar_ContextMenuEvent(self *C.QToolBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QToolBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QToolBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_TabletEvent +func miqt_exec_callback_QToolBar_TabletEvent(self *C.QToolBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QToolBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QToolBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DragEnterEvent +func miqt_exec_callback_QToolBar_DragEnterEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QToolBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QToolBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DragMoveEvent +func miqt_exec_callback_QToolBar_DragMoveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QToolBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QToolBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DragLeaveEvent +func miqt_exec_callback_QToolBar_DragLeaveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QToolBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QToolBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DropEvent +func miqt_exec_callback_QToolBar_DropEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QToolBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QToolBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ShowEvent +func miqt_exec_callback_QToolBar_ShowEvent(self *C.QToolBar, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QToolBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QToolBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_HideEvent +func miqt_exec_callback_QToolBar_HideEvent(self *C.QToolBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QToolBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QToolBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QToolBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_NativeEvent +func miqt_exec_callback_QToolBar_NativeEvent(self *C.QToolBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QToolBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QToolBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QToolBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_Metric +func miqt_exec_callback_QToolBar_Metric(self *C.QToolBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QToolBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QToolBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QToolBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InitPainter +func miqt_exec_callback_QToolBar_InitPainter(self *C.QToolBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QToolBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QToolBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QToolBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QToolBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QToolBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_Redirected +func miqt_exec_callback_QToolBar_Redirected(self *C.QToolBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QToolBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QToolBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QToolBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_SharedPainter +func miqt_exec_callback_QToolBar_SharedPainter(self *C.QToolBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QToolBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QToolBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InputMethodEvent +func miqt_exec_callback_QToolBar_InputMethodEvent(self *C.QToolBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QToolBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QToolBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InputMethodQuery +func miqt_exec_callback_QToolBar_InputMethodQuery(self *C.QToolBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QToolBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QToolBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QToolBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_FocusNextPrevChild +func miqt_exec_callback_QToolBar_FocusNextPrevChild(self *C.QToolBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QToolBar) Delete() { - C.QToolBar_Delete(this.h) + C.QToolBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtoolbar.h b/qt/gen_qtoolbar.h index fe40805c..a91e50ea 100644 --- a/qt/gen_qtoolbar.h +++ b/qt/gen_qtoolbar.h @@ -16,28 +16,78 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QToolBar; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QToolBar QToolBar; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QToolBar* QToolBar_new(QWidget* parent); -QToolBar* QToolBar_new2(struct miqt_string title); -QToolBar* QToolBar_new3(); -QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent); +void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QToolBar_MetaObject(const QToolBar* self); void* QToolBar_Metacast(QToolBar* self, const char* param1); struct miqt_string QToolBar_Tr(const char* s); @@ -84,11 +134,97 @@ void QToolBar_TopLevelChanged(QToolBar* self, bool topLevel); void QToolBar_connect_TopLevelChanged(QToolBar* self, intptr_t slot); void QToolBar_VisibilityChanged(QToolBar* self, bool visible); void QToolBar_connect_VisibilityChanged(QToolBar* self, intptr_t slot); +void QToolBar_ActionEvent(QToolBar* self, QActionEvent* event); +void QToolBar_ChangeEvent(QToolBar* self, QEvent* event); +void QToolBar_PaintEvent(QToolBar* self, QPaintEvent* event); +bool QToolBar_Event(QToolBar* self, QEvent* event); struct miqt_string QToolBar_Tr2(const char* s, const char* c); struct miqt_string QToolBar_Tr3(const char* s, const char* c, int n); struct miqt_string QToolBar_TrUtf82(const char* s, const char* c); struct miqt_string QToolBar_TrUtf83(const char* s, const char* c, int n); -void QToolBar_Delete(QToolBar* self); +void QToolBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QToolBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ChangeEvent(void* self, QEvent* event); +void QToolBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QToolBar_override_virtual_Event(void* self, intptr_t slot); +bool QToolBar_virtualbase_Event(void* self, QEvent* event); +void QToolBar_override_virtual_DevType(void* self, intptr_t slot); +int QToolBar_virtualbase_DevType(const void* self); +void QToolBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QToolBar_virtualbase_SetVisible(void* self, bool visible); +void QToolBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QToolBar_virtualbase_SizeHint(const void* self); +void QToolBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QToolBar_virtualbase_MinimumSizeHint(const void* self); +void QToolBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QToolBar_virtualbase_HeightForWidth(const void* self, int param1); +void QToolBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QToolBar_virtualbase_HasHeightForWidth(const void* self); +void QToolBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QToolBar_virtualbase_PaintEngine(const void* self); +void QToolBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QToolBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QToolBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QToolBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QToolBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QToolBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_EnterEvent(void* self, QEvent* event); +void QToolBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QToolBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QToolBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QToolBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QToolBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QToolBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QToolBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QToolBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QToolBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QToolBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QToolBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QToolBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QToolBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QToolBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QToolBar_override_virtual_Metric(void* self, intptr_t slot); +int QToolBar_virtualbase_Metric(const void* self, int param1); +void QToolBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QToolBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QToolBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QToolBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QToolBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QToolBar_virtualbase_SharedPainter(const void* self); +void QToolBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QToolBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QToolBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QToolBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QToolBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QToolBar_Delete(QToolBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtoolbox.cpp b/qt/gen_qtoolbox.cpp index 959cfe6e..a0da80f6 100644 --- a/qt/gen_qtoolbox.cpp +++ b/qt/gen_qtoolbox.cpp @@ -1,5 +1,12 @@ +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -9,16 +16,207 @@ #include "gen_qtoolbox.h" #include "_cgo_export.h" -QToolBox* QToolBox_new(QWidget* parent) { - return new QToolBox(parent); +class MiqtVirtualQToolBox : public virtual QToolBox { +public: + + MiqtVirtualQToolBox(QWidget* parent): QToolBox(parent) {}; + MiqtVirtualQToolBox(): QToolBox() {}; + MiqtVirtualQToolBox(QWidget* parent, Qt::WindowFlags f): QToolBox(parent, f) {}; + + virtual ~MiqtVirtualQToolBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QToolBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QToolBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QToolBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void itemInserted(int index) override { + if (handle__ItemInserted == 0) { + QToolBox::itemInserted(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QToolBox_ItemInserted(this, handle__ItemInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ItemInserted(int index) { + + QToolBox::itemInserted(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void itemRemoved(int index) override { + if (handle__ItemRemoved == 0) { + QToolBox::itemRemoved(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QToolBox_ItemRemoved(this, handle__ItemRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ItemRemoved(int index) { + + QToolBox::itemRemoved(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* e) override { + if (handle__ShowEvent == 0) { + QToolBox::showEvent(e); + return; + } + + QShowEvent* sigval1 = e; + + miqt_exec_callback_QToolBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* e) { + + QToolBox::showEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QToolBox::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QToolBox::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QToolBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QToolBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QToolBox::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QToolBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QToolBox::paintEvent(param1); + + } + +}; + +void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent); + *outptr_QToolBox = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBox* QToolBox_new2() { - return new QToolBox(); +void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(); + *outptr_QToolBox = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBox* QToolBox_new3(QWidget* parent, int f) { - return new QToolBox(parent, static_cast(f)); +void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent, static_cast(f)); + *outptr_QToolBox = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QToolBox_MetaObject(const QToolBox* self) { @@ -156,7 +354,7 @@ void QToolBox_CurrentChanged(QToolBox* self, int index) { } void QToolBox_connect_CurrentChanged(QToolBox* self, intptr_t slot) { - QToolBox::connect(self, static_cast(&QToolBox::currentChanged), self, [=](int index) { + MiqtVirtualQToolBox::connect(self, static_cast(&QToolBox::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QToolBox_CurrentChanged(slot, sigval1); }); @@ -206,7 +404,67 @@ struct miqt_string QToolBox_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QToolBox_Delete(QToolBox* self) { - delete self; +void QToolBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__Event = slot; +} + +bool QToolBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQToolBox*)(self) )->virtualbase_Event(e); +} + +void QToolBox_override_virtual_ItemInserted(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ItemInserted = slot; +} + +void QToolBox_virtualbase_ItemInserted(void* self, int index) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ItemInserted(index); +} + +void QToolBox_override_virtual_ItemRemoved(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ItemRemoved = slot; +} + +void QToolBox_virtualbase_ItemRemoved(void* self, int index) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ItemRemoved(index); +} + +void QToolBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ShowEvent = slot; +} + +void QToolBox_virtualbase_ShowEvent(void* self, QShowEvent* e) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ShowEvent(e); +} + +void QToolBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ChangeEvent = slot; +} + +void QToolBox_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QToolBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QToolBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQToolBox*)(self) )->virtualbase_SizeHint(); +} + +void QToolBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__PaintEvent = slot; +} + +void QToolBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_PaintEvent(param1); +} + +void QToolBox_Delete(QToolBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtoolbox.go b/qt/gen_qtoolbox.go index 023c29bc..68cf3781 100644 --- a/qt/gen_qtoolbox.go +++ b/qt/gen_qtoolbox.go @@ -15,7 +15,8 @@ import ( ) type QToolBox struct { - h *C.QToolBox + h *C.QToolBox + isSubclass bool *QFrame } @@ -33,33 +34,65 @@ func (this *QToolBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolBox(h *C.QToolBox) *QToolBox { +// newQToolBox constructs the type using only CGO pointers. +func newQToolBox(h *C.QToolBox, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBox { if h == nil { return nil } - return &QToolBox{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QToolBox{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQToolBox(h unsafe.Pointer) *QToolBox { - return newQToolBox((*C.QToolBox)(h)) +// UnsafeNewQToolBox constructs the type using only unsafe pointers. +func UnsafeNewQToolBox(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBox { + if h == nil { + return nil + } + + return &QToolBox{h: (*C.QToolBox)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQToolBox constructs a new QToolBox object. func NewQToolBox(parent *QWidget) *QToolBox { - ret := C.QToolBox_new(parent.cPointer()) - return newQToolBox(ret) + var outptr_QToolBox *C.QToolBox = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBox_new(parent.cPointer(), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBox2 constructs a new QToolBox object. func NewQToolBox2() *QToolBox { - ret := C.QToolBox_new2() - return newQToolBox(ret) + var outptr_QToolBox *C.QToolBox = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBox_new2(&outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBox3 constructs a new QToolBox object. func NewQToolBox3(parent *QWidget, f WindowType) *QToolBox { - ret := C.QToolBox_new3(parent.cPointer(), (C.int)(f)) - return newQToolBox(ret) + var outptr_QToolBox *C.QToolBox = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBox_new3(parent.cPointer(), (C.int)(f), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QToolBox) MetaObject() *QMetaObject { @@ -180,11 +213,11 @@ func (this *QToolBox) CurrentIndex() int { } func (this *QToolBox) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_CurrentWidget(this.h)), nil, nil) } func (this *QToolBox) Widget(index int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_Widget(this.h, (C.int)(index)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_Widget(this.h, (C.int)(index))), nil, nil) } func (this *QToolBox) IndexOf(widget *QWidget) int { @@ -267,9 +300,174 @@ func QToolBox_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QToolBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QToolBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QToolBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QToolBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_Event +func miqt_exec_callback_QToolBox_Event(self *C.QToolBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QToolBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBox) callVirtualBase_ItemInserted(index int) { + + C.QToolBox_virtualbase_ItemInserted(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QToolBox) OnItemInserted(slot func(super func(index int), index int)) { + C.QToolBox_override_virtual_ItemInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ItemInserted +func miqt_exec_callback_QToolBox_ItemInserted(self *C.QToolBox, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QToolBox{h: self}).callVirtualBase_ItemInserted, slotval1) + +} + +func (this *QToolBox) callVirtualBase_ItemRemoved(index int) { + + C.QToolBox_virtualbase_ItemRemoved(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QToolBox) OnItemRemoved(slot func(super func(index int), index int)) { + C.QToolBox_override_virtual_ItemRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ItemRemoved +func miqt_exec_callback_QToolBox_ItemRemoved(self *C.QToolBox, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QToolBox{h: self}).callVirtualBase_ItemRemoved, slotval1) + +} + +func (this *QToolBox) callVirtualBase_ShowEvent(e *QShowEvent) { + + C.QToolBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolBox) OnShowEvent(slot func(super func(e *QShowEvent), e *QShowEvent)) { + C.QToolBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ShowEvent +func miqt_exec_callback_QToolBox_ShowEvent(self *C.QToolBox, cb C.intptr_t, e *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QShowEvent), e *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(e), nil) + + gofunc((&QToolBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QToolBox) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QToolBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolBox) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ChangeEvent +func miqt_exec_callback_QToolBox_ChangeEvent(self *C.QToolBox, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QToolBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QToolBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_SizeHint +func miqt_exec_callback_QToolBox_SizeHint(self *C.QToolBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolBox) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QToolBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolBox) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QToolBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_PaintEvent +func miqt_exec_callback_QToolBox_PaintEvent(self *C.QToolBox, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QToolBox) Delete() { - C.QToolBox_Delete(this.h) + C.QToolBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtoolbox.h b/qt/gen_qtoolbox.h index 3f3b47fe..e5d2e363 100644 --- a/qt/gen_qtoolbox.h +++ b/qt/gen_qtoolbox.h @@ -15,20 +15,34 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QFrame; class QIcon; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QShowEvent; +class QSize; class QToolBox; class QWidget; #else +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QToolBox QToolBox; typedef struct QWidget QWidget; #endif -QToolBox* QToolBox_new(QWidget* parent); -QToolBox* QToolBox_new2(); -QToolBox* QToolBox_new3(QWidget* parent, int f); +void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QToolBox_MetaObject(const QToolBox* self); void* QToolBox_Metacast(QToolBox* self, const char* param1); struct miqt_string QToolBox_Tr(const char* s); @@ -55,11 +69,30 @@ void QToolBox_SetCurrentIndex(QToolBox* self, int index); void QToolBox_SetCurrentWidget(QToolBox* self, QWidget* widget); void QToolBox_CurrentChanged(QToolBox* self, int index); void QToolBox_connect_CurrentChanged(QToolBox* self, intptr_t slot); +bool QToolBox_Event(QToolBox* self, QEvent* e); +void QToolBox_ItemInserted(QToolBox* self, int index); +void QToolBox_ItemRemoved(QToolBox* self, int index); +void QToolBox_ShowEvent(QToolBox* self, QShowEvent* e); +void QToolBox_ChangeEvent(QToolBox* self, QEvent* param1); struct miqt_string QToolBox_Tr2(const char* s, const char* c); struct miqt_string QToolBox_Tr3(const char* s, const char* c, int n); struct miqt_string QToolBox_TrUtf82(const char* s, const char* c); struct miqt_string QToolBox_TrUtf83(const char* s, const char* c, int n); -void QToolBox_Delete(QToolBox* self); +void QToolBox_override_virtual_Event(void* self, intptr_t slot); +bool QToolBox_virtualbase_Event(void* self, QEvent* e); +void QToolBox_override_virtual_ItemInserted(void* self, intptr_t slot); +void QToolBox_virtualbase_ItemInserted(void* self, int index); +void QToolBox_override_virtual_ItemRemoved(void* self, intptr_t slot); +void QToolBox_virtualbase_ItemRemoved(void* self, int index); +void QToolBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QToolBox_virtualbase_ShowEvent(void* self, QShowEvent* e); +void QToolBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QToolBox_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QToolBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QToolBox_virtualbase_SizeHint(const void* self); +void QToolBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QToolBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QToolBox_Delete(QToolBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtoolbutton.cpp b/qt/gen_qtoolbutton.cpp index c2d8b36d..4ee0c9e0 100644 --- a/qt/gen_qtoolbutton.cpp +++ b/qt/gen_qtoolbutton.cpp @@ -1,22 +1,503 @@ +#include #include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include #include "gen_qtoolbutton.h" #include "_cgo_export.h" -QToolButton* QToolButton_new(QWidget* parent) { - return new QToolButton(parent); +class MiqtVirtualQToolButton : public virtual QToolButton { +public: + + MiqtVirtualQToolButton(QWidget* parent): QToolButton(parent) {}; + MiqtVirtualQToolButton(): QToolButton() {}; + + virtual ~MiqtVirtualQToolButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QToolButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QToolButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QToolButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QToolButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QToolButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QToolButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QToolButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QToolButton::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QToolButton::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QToolButton::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QToolButton::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QToolButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QToolButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* param1) override { + if (handle__ActionEvent == 0) { + QToolButton::actionEvent(param1); + return; + } + + QActionEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* param1) { + + QToolButton::actionEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* param1) override { + if (handle__EnterEvent == 0) { + QToolButton::enterEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* param1) { + + QToolButton::enterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* param1) override { + if (handle__LeaveEvent == 0) { + QToolButton::leaveEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* param1) { + + QToolButton::leaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QToolButton::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QToolButton::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QToolButton::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QToolButton::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QToolButton::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QToolButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QToolButton::hitButton(*pos); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QToolButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QToolButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QToolButton::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QToolButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QToolButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QToolButton::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QToolButton::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QToolButton::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QToolButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QToolButton::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QToolButton::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QToolButton::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QToolButton::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QToolButton::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QToolButton::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QToolButton::focusOutEvent(e); + + } + +}; + +void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(parent); + *outptr_QToolButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolButton* QToolButton_new2() { - return new QToolButton(); +void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(); + *outptr_QToolButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QToolButton_MetaObject(const QToolButton* self) { @@ -117,7 +598,7 @@ void QToolButton_Triggered(QToolButton* self, QAction* param1) { } void QToolButton_connect_Triggered(QToolButton* self, intptr_t slot) { - QToolButton::connect(self, static_cast(&QToolButton::triggered), self, [=](QAction* param1) { + MiqtVirtualQToolButton::connect(self, static_cast(&QToolButton::triggered), self, [=](QAction* param1) { QAction* sigval1 = param1; miqt_exec_callback_QToolButton_Triggered(slot, sigval1); }); @@ -167,7 +648,163 @@ struct miqt_string QToolButton_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QToolButton_Delete(QToolButton* self) { - delete self; +void QToolButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QToolButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_SizeHint(); +} + +void QToolButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QToolButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QToolButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__Event = slot; +} + +bool QToolButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQToolButton*)(self) )->virtualbase_Event(e); +} + +void QToolButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MousePressEvent = slot; +} + +void QToolButton_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QToolButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QToolButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QToolButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__PaintEvent = slot; +} + +void QToolButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QToolButton_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__ActionEvent = slot; +} + +void QToolButton_virtualbase_ActionEvent(void* self, QActionEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_ActionEvent(param1); +} + +void QToolButton_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__EnterEvent = slot; +} + +void QToolButton_virtualbase_EnterEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_EnterEvent(param1); +} + +void QToolButton_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__LeaveEvent = slot; +} + +void QToolButton_virtualbase_LeaveEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_LeaveEvent(param1); +} + +void QToolButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__TimerEvent = slot; +} + +void QToolButton_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_TimerEvent(param1); +} + +void QToolButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__ChangeEvent = slot; +} + +void QToolButton_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QToolButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__HitButton = slot; +} + +bool QToolButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_HitButton(pos); +} + +void QToolButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__NextCheckState = slot; +} + +void QToolButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_NextCheckState(); +} + +void QToolButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__CheckStateSet = slot; +} + +void QToolButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QToolButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QToolButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QToolButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QToolButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QToolButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QToolButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QToolButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__FocusInEvent = slot; +} + +void QToolButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_FocusInEvent(e); +} + +void QToolButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QToolButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QToolButton_Delete(QToolButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtoolbutton.go b/qt/gen_qtoolbutton.go index bbb7dcf0..7bfececd 100644 --- a/qt/gen_qtoolbutton.go +++ b/qt/gen_qtoolbutton.go @@ -23,7 +23,8 @@ const ( ) type QToolButton struct { - h *C.QToolButton + h *C.QToolButton + isSubclass bool *QAbstractButton } @@ -41,27 +42,51 @@ func (this *QToolButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolButton(h *C.QToolButton) *QToolButton { +// newQToolButton constructs the type using only CGO pointers. +func newQToolButton(h *C.QToolButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolButton { if h == nil { return nil } - return &QToolButton{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QToolButton{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQToolButton(h unsafe.Pointer) *QToolButton { - return newQToolButton((*C.QToolButton)(h)) +// UnsafeNewQToolButton constructs the type using only unsafe pointers. +func UnsafeNewQToolButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolButton { + if h == nil { + return nil + } + + return &QToolButton{h: (*C.QToolButton)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQToolButton constructs a new QToolButton object. func NewQToolButton(parent *QWidget) *QToolButton { - ret := C.QToolButton_new(parent.cPointer()) - return newQToolButton(ret) + var outptr_QToolButton *C.QToolButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolButton_new(parent.cPointer(), &outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolButton2 constructs a new QToolButton object. func NewQToolButton2() *QToolButton { - ret := C.QToolButton_new2() - return newQToolButton(ret) + var outptr_QToolButton *C.QToolButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolButton_new2(&outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QToolButton) MetaObject() *QMetaObject { @@ -123,7 +148,7 @@ func (this *QToolButton) SetMenu(menu *QMenu) { } func (this *QToolButton) Menu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QToolButton_Menu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QToolButton_Menu(this.h)), nil, nil, nil) } func (this *QToolButton) SetPopupMode(mode QToolButton__ToolButtonPopupMode) { @@ -135,7 +160,7 @@ func (this *QToolButton) PopupMode() QToolButton__ToolButtonPopupMode { } func (this *QToolButton) DefaultAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolButton_DefaultAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolButton_DefaultAction(this.h)), nil) } func (this *QToolButton) SetAutoRaise(enable bool) { @@ -173,7 +198,7 @@ func miqt_exec_callback_QToolButton_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(param1), nil) gofunc(slotval1) } @@ -222,9 +247,448 @@ func QToolButton_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QToolButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QToolButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_SizeHint +func miqt_exec_callback_QToolButton_SizeHint(self *C.QToolButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QToolButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MinimumSizeHint +func miqt_exec_callback_QToolButton_MinimumSizeHint(self *C.QToolButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QToolButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QToolButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QToolButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_Event +func miqt_exec_callback_QToolButton_Event(self *C.QToolButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolButton) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QToolButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QToolButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MousePressEvent +func miqt_exec_callback_QToolButton_MousePressEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QToolButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QToolButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MouseReleaseEvent +func miqt_exec_callback_QToolButton_MouseReleaseEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QToolButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QToolButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_PaintEvent +func miqt_exec_callback_QToolButton_PaintEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_ActionEvent(param1 *QActionEvent) { + + C.QToolButton_virtualbase_ActionEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnActionEvent(slot func(super func(param1 *QActionEvent), param1 *QActionEvent)) { + C.QToolButton_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_ActionEvent +func miqt_exec_callback_QToolButton_ActionEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QActionEvent), param1 *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_EnterEvent(param1 *QEvent) { + + C.QToolButton_virtualbase_EnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnEnterEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolButton_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_EnterEvent +func miqt_exec_callback_QToolButton_EnterEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolButton{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_LeaveEvent(param1 *QEvent) { + + C.QToolButton_virtualbase_LeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnLeaveEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolButton_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_LeaveEvent +func miqt_exec_callback_QToolButton_LeaveEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolButton{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QToolButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QToolButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_TimerEvent +func miqt_exec_callback_QToolButton_TimerEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QToolButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_ChangeEvent +func miqt_exec_callback_QToolButton_ChangeEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QToolButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QToolButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QToolButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_HitButton +func miqt_exec_callback_QToolButton_HitButton(self *C.QToolButton, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolButton) callVirtualBase_NextCheckState() { + + C.QToolButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QToolButton) OnNextCheckState(slot func(super func())) { + C.QToolButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_NextCheckState +func miqt_exec_callback_QToolButton_NextCheckState(self *C.QToolButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QToolButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QToolButton) callVirtualBase_CheckStateSet() { + + C.QToolButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QToolButton) OnCheckStateSet(slot func(super func())) { + C.QToolButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_CheckStateSet +func miqt_exec_callback_QToolButton_CheckStateSet(self *C.QToolButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QToolButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QToolButton) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QToolButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QToolButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_KeyPressEvent +func miqt_exec_callback_QToolButton_KeyPressEvent(self *C.QToolButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QToolButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QToolButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_KeyReleaseEvent +func miqt_exec_callback_QToolButton_KeyReleaseEvent(self *C.QToolButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QToolButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QToolButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MouseMoveEvent +func miqt_exec_callback_QToolButton_MouseMoveEvent(self *C.QToolButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QToolButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QToolButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_FocusInEvent +func miqt_exec_callback_QToolButton_FocusInEvent(self *C.QToolButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QToolButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QToolButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_FocusOutEvent +func miqt_exec_callback_QToolButton_FocusOutEvent(self *C.QToolButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QToolButton) Delete() { - C.QToolButton_Delete(this.h) + C.QToolButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtoolbutton.h b/qt/gen_qtoolbutton.h index 184fb430..7656acf9 100644 --- a/qt/gen_qtoolbutton.h +++ b/qt/gen_qtoolbutton.h @@ -15,23 +15,45 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; class QAction; +class QActionEvent; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QSize; +class QTimerEvent; class QToolButton; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QToolButton QToolButton; typedef struct QWidget QWidget; #endif -QToolButton* QToolButton_new(QWidget* parent); -QToolButton* QToolButton_new2(); +void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QToolButton_MetaObject(const QToolButton* self); void* QToolButton_Metacast(QToolButton* self, const char* param1); struct miqt_string QToolButton_Tr(const char* s); @@ -53,11 +75,60 @@ void QToolButton_SetToolButtonStyle(QToolButton* self, int style); void QToolButton_SetDefaultAction(QToolButton* self, QAction* defaultAction); void QToolButton_Triggered(QToolButton* self, QAction* param1); void QToolButton_connect_Triggered(QToolButton* self, intptr_t slot); +bool QToolButton_Event(QToolButton* self, QEvent* e); +void QToolButton_MousePressEvent(QToolButton* self, QMouseEvent* param1); +void QToolButton_MouseReleaseEvent(QToolButton* self, QMouseEvent* param1); +void QToolButton_PaintEvent(QToolButton* self, QPaintEvent* param1); +void QToolButton_ActionEvent(QToolButton* self, QActionEvent* param1); +void QToolButton_EnterEvent(QToolButton* self, QEvent* param1); +void QToolButton_LeaveEvent(QToolButton* self, QEvent* param1); +void QToolButton_TimerEvent(QToolButton* self, QTimerEvent* param1); +void QToolButton_ChangeEvent(QToolButton* self, QEvent* param1); +bool QToolButton_HitButton(const QToolButton* self, QPoint* pos); +void QToolButton_NextCheckState(QToolButton* self); struct miqt_string QToolButton_Tr2(const char* s, const char* c); struct miqt_string QToolButton_Tr3(const char* s, const char* c, int n); struct miqt_string QToolButton_TrUtf82(const char* s, const char* c); struct miqt_string QToolButton_TrUtf83(const char* s, const char* c, int n); -void QToolButton_Delete(QToolButton* self); +void QToolButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QToolButton_virtualbase_SizeHint(const void* self); +void QToolButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QToolButton_virtualbase_MinimumSizeHint(const void* self); +void QToolButton_override_virtual_Event(void* self, intptr_t slot); +bool QToolButton_virtualbase_Event(void* self, QEvent* e); +void QToolButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QToolButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QToolButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QToolButton_override_virtual_ActionEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_ActionEvent(void* self, QActionEvent* param1); +void QToolButton_override_virtual_EnterEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_EnterEvent(void* self, QEvent* param1); +void QToolButton_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_LeaveEvent(void* self, QEvent* param1); +void QToolButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QToolButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QToolButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QToolButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QToolButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QToolButton_virtualbase_NextCheckState(void* self); +void QToolButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QToolButton_virtualbase_CheckStateSet(void* self); +void QToolButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QToolButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QToolButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QToolButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QToolButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QToolButton_Delete(QToolButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtooltip.cpp b/qt/gen_qtooltip.cpp index 8efdcdd6..d58170b5 100644 --- a/qt/gen_qtooltip.cpp +++ b/qt/gen_qtooltip.cpp @@ -66,7 +66,11 @@ void QToolTip_ShowText32(QPoint* pos, struct miqt_string text, QWidget* w) { QToolTip::showText(*pos, text_QString, w); } -void QToolTip_Delete(QToolTip* self) { - delete self; +void QToolTip_Delete(QToolTip* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtooltip.go b/qt/gen_qtooltip.go index d4e55598..b7506ce6 100644 --- a/qt/gen_qtooltip.go +++ b/qt/gen_qtooltip.go @@ -14,7 +14,8 @@ import ( ) type QToolTip struct { - h *C.QToolTip + h *C.QToolTip + isSubclass bool } func (this *QToolTip) cPointer() *C.QToolTip { @@ -31,6 +32,7 @@ func (this *QToolTip) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQToolTip constructs the type using only CGO pointers. func newQToolTip(h *C.QToolTip) *QToolTip { if h == nil { return nil @@ -38,8 +40,13 @@ func newQToolTip(h *C.QToolTip) *QToolTip { return &QToolTip{h: h} } +// UnsafeNewQToolTip constructs the type using only unsafe pointers. func UnsafeNewQToolTip(h unsafe.Pointer) *QToolTip { - return newQToolTip((*C.QToolTip)(h)) + if h == nil { + return nil + } + + return &QToolTip{h: (*C.QToolTip)(h)} } func QToolTip_ShowText(pos *QPoint, text string) { @@ -113,7 +120,7 @@ func QToolTip_ShowText32(pos *QPoint, text string, w *QWidget) { // Delete this object from C++ memory. func (this *QToolTip) Delete() { - C.QToolTip_Delete(this.h) + C.QToolTip_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtooltip.h b/qt/gen_qtooltip.h index b4d1eb7c..3752248a 100644 --- a/qt/gen_qtooltip.h +++ b/qt/gen_qtooltip.h @@ -41,7 +41,7 @@ void QToolTip_SetPalette(QPalette* palette); QFont* QToolTip_Font(); void QToolTip_SetFont(QFont* font); void QToolTip_ShowText32(QPoint* pos, struct miqt_string text, QWidget* w); -void QToolTip_Delete(QToolTip* self); +void QToolTip_Delete(QToolTip* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtouchdevice.cpp b/qt/gen_qtouchdevice.cpp index ed06ae17..d82c579f 100644 --- a/qt/gen_qtouchdevice.cpp +++ b/qt/gen_qtouchdevice.cpp @@ -7,8 +7,9 @@ #include "gen_qtouchdevice.h" #include "_cgo_export.h" -QTouchDevice* QTouchDevice_new() { - return new QTouchDevice(); +void QTouchDevice_new(QTouchDevice** outptr_QTouchDevice) { + QTouchDevice* ret = new QTouchDevice(); + *outptr_QTouchDevice = ret; } struct miqt_array /* of QTouchDevice* */ QTouchDevice_Devices() { @@ -66,7 +67,11 @@ void QTouchDevice_SetMaximumTouchPoints(QTouchDevice* self, int max) { self->setMaximumTouchPoints(static_cast(max)); } -void QTouchDevice_Delete(QTouchDevice* self) { - delete self; +void QTouchDevice_Delete(QTouchDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtouchdevice.go b/qt/gen_qtouchdevice.go index fadaa305..0a651d42 100644 --- a/qt/gen_qtouchdevice.go +++ b/qt/gen_qtouchdevice.go @@ -33,7 +33,8 @@ const ( ) type QTouchDevice struct { - h *C.QTouchDevice + h *C.QTouchDevice + isSubclass bool } func (this *QTouchDevice) cPointer() *C.QTouchDevice { @@ -50,6 +51,7 @@ func (this *QTouchDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTouchDevice constructs the type using only CGO pointers. func newQTouchDevice(h *C.QTouchDevice) *QTouchDevice { if h == nil { return nil @@ -57,14 +59,23 @@ func newQTouchDevice(h *C.QTouchDevice) *QTouchDevice { return &QTouchDevice{h: h} } +// UnsafeNewQTouchDevice constructs the type using only unsafe pointers. func UnsafeNewQTouchDevice(h unsafe.Pointer) *QTouchDevice { - return newQTouchDevice((*C.QTouchDevice)(h)) + if h == nil { + return nil + } + + return &QTouchDevice{h: (*C.QTouchDevice)(h)} } // NewQTouchDevice constructs a new QTouchDevice object. func NewQTouchDevice() *QTouchDevice { - ret := C.QTouchDevice_new() - return newQTouchDevice(ret) + var outptr_QTouchDevice *C.QTouchDevice = nil + + C.QTouchDevice_new(&outptr_QTouchDevice) + ret := newQTouchDevice(outptr_QTouchDevice) + ret.isSubclass = true + return ret } func QTouchDevice_Devices() []*QTouchDevice { @@ -118,7 +129,7 @@ func (this *QTouchDevice) SetMaximumTouchPoints(max int) { // Delete this object from C++ memory. func (this *QTouchDevice) Delete() { - C.QTouchDevice_Delete(this.h) + C.QTouchDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtouchdevice.h b/qt/gen_qtouchdevice.h index e84f5c83..211e8592 100644 --- a/qt/gen_qtouchdevice.h +++ b/qt/gen_qtouchdevice.h @@ -20,7 +20,7 @@ class QTouchDevice; typedef struct QTouchDevice QTouchDevice; #endif -QTouchDevice* QTouchDevice_new(); +void QTouchDevice_new(QTouchDevice** outptr_QTouchDevice); struct miqt_array /* of QTouchDevice* */ QTouchDevice_Devices(); struct miqt_string QTouchDevice_Name(const QTouchDevice* self); int QTouchDevice_Type(const QTouchDevice* self); @@ -30,7 +30,7 @@ void QTouchDevice_SetName(QTouchDevice* self, struct miqt_string name); void QTouchDevice_SetType(QTouchDevice* self, int devType); void QTouchDevice_SetCapabilities(QTouchDevice* self, int caps); void QTouchDevice_SetMaximumTouchPoints(QTouchDevice* self, int max); -void QTouchDevice_Delete(QTouchDevice* self); +void QTouchDevice_Delete(QTouchDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtransform.cpp b/qt/gen_qtransform.cpp index 260a853b..4a0e6343 100644 --- a/qt/gen_qtransform.cpp +++ b/qt/gen_qtransform.cpp @@ -12,32 +12,39 @@ #include "gen_qtransform.h" #include "_cgo_export.h" -QTransform* QTransform_new(int param1) { - return new QTransform(static_cast(param1)); +void QTransform_new(int param1, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(param1)); + *outptr_QTransform = ret; } -QTransform* QTransform_new2() { - return new QTransform(); +void QTransform_new2(QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(); + *outptr_QTransform = ret; } -QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32) { - return new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32)); +void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32)); + *outptr_QTransform = ret; } -QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy) { - return new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); +void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); + *outptr_QTransform = ret; } -QTransform* QTransform_new5(QMatrix* mtx) { - return new QTransform(*mtx); +void QTransform_new5(QMatrix* mtx, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(*mtx); + *outptr_QTransform = ret; } -QTransform* QTransform_new6(QTransform* other) { - return new QTransform(*other); +void QTransform_new6(QTransform* other, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(*other); + *outptr_QTransform = ret; } -QTransform* QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33) { - return new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); +void QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); + *outptr_QTransform = ret; } void QTransform_OperatorAssign(QTransform* self, QTransform* param1) { @@ -300,7 +307,11 @@ QTransform* QTransform_RotateRadians2(QTransform* self, double a, int axis) { return &_ret; } -void QTransform_Delete(QTransform* self) { - delete self; +void QTransform_Delete(QTransform* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtransform.go b/qt/gen_qtransform.go index 3bd56dac..697e63df 100644 --- a/qt/gen_qtransform.go +++ b/qt/gen_qtransform.go @@ -25,7 +25,8 @@ const ( ) type QTransform struct { - h *C.QTransform + h *C.QTransform + isSubclass bool } func (this *QTransform) cPointer() *C.QTransform { @@ -42,6 +43,7 @@ func (this *QTransform) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTransform constructs the type using only CGO pointers. func newQTransform(h *C.QTransform) *QTransform { if h == nil { return nil @@ -49,50 +51,83 @@ func newQTransform(h *C.QTransform) *QTransform { return &QTransform{h: h} } +// UnsafeNewQTransform constructs the type using only unsafe pointers. func UnsafeNewQTransform(h unsafe.Pointer) *QTransform { - return newQTransform((*C.QTransform)(h)) + if h == nil { + return nil + } + + return &QTransform{h: (*C.QTransform)(h)} } // NewQTransform constructs a new QTransform object. func NewQTransform(param1 Initialization) *QTransform { - ret := C.QTransform_new((C.int)(param1)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new((C.int)(param1), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform2 constructs a new QTransform object. func NewQTransform2() *QTransform { - ret := C.QTransform_new2() - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new2(&outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform3 constructs a new QTransform object. func NewQTransform3(h11 float64, h12 float64, h13 float64, h21 float64, h22 float64, h23 float64, h31 float64, h32 float64) *QTransform { - ret := C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform4 constructs a new QTransform object. func NewQTransform4(h11 float64, h12 float64, h21 float64, h22 float64, dx float64, dy float64) *QTransform { - ret := C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform5 constructs a new QTransform object. func NewQTransform5(mtx *QMatrix) *QTransform { - ret := C.QTransform_new5(mtx.cPointer()) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new5(mtx.cPointer(), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform6 constructs a new QTransform object. func NewQTransform6(other *QTransform) *QTransform { - ret := C.QTransform_new6(other.cPointer()) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new6(other.cPointer(), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform7 constructs a new QTransform object. func NewQTransform7(h11 float64, h12 float64, h13 float64, h21 float64, h22 float64, h23 float64, h31 float64, h32 float64, h33 float64) *QTransform { - ret := C.QTransform_new7((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new7((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } func (this *QTransform) OperatorAssign(param1 *QTransform) { @@ -362,7 +397,7 @@ func (this *QTransform) RotateRadians2(a float64, axis Axis) *QTransform { // Delete this object from C++ memory. func (this *QTransform) Delete() { - C.QTransform_Delete(this.h) + C.QTransform_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtransform.h b/qt/gen_qtransform.h index f5c13c2e..4d14781f 100644 --- a/qt/gen_qtransform.h +++ b/qt/gen_qtransform.h @@ -38,13 +38,13 @@ typedef struct QRegion QRegion; typedef struct QTransform QTransform; #endif -QTransform* QTransform_new(int param1); -QTransform* QTransform_new2(); -QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32); -QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy); -QTransform* QTransform_new5(QMatrix* mtx); -QTransform* QTransform_new6(QTransform* other); -QTransform* QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33); +void QTransform_new(int param1, QTransform** outptr_QTransform); +void QTransform_new2(QTransform** outptr_QTransform); +void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, QTransform** outptr_QTransform); +void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform); +void QTransform_new5(QMatrix* mtx, QTransform** outptr_QTransform); +void QTransform_new6(QTransform* other, QTransform** outptr_QTransform); +void QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform); void QTransform_OperatorAssign(QTransform* self, QTransform* param1); bool QTransform_IsAffine(const QTransform* self); bool QTransform_IsIdentity(const QTransform* self); @@ -100,7 +100,7 @@ QTransform* QTransform_FromScale(double dx, double dy); QTransform* QTransform_Inverted1(const QTransform* self, bool* invertible); QTransform* QTransform_Rotate2(QTransform* self, double a, int axis); QTransform* QTransform_RotateRadians2(QTransform* self, double a, int axis); -void QTransform_Delete(QTransform* self); +void QTransform_Delete(QTransform* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtranslator.cpp b/qt/gen_qtranslator.cpp index ffc65c07..6ca27206 100644 --- a/qt/gen_qtranslator.cpp +++ b/qt/gen_qtranslator.cpp @@ -1,20 +1,265 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qtranslator.h" #include "_cgo_export.h" -QTranslator* QTranslator_new() { - return new QTranslator(); +class MiqtVirtualQTranslator : public virtual QTranslator { +public: + + MiqtVirtualQTranslator(): QTranslator() {}; + MiqtVirtualQTranslator(QObject* parent): QTranslator(parent) {}; + + virtual ~MiqtVirtualQTranslator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Translate = 0; + + // Subclass to allow providing a Go implementation + virtual QString translate(const char* context, const char* sourceText, const char* disambiguation, int n) const override { + if (handle__Translate == 0) { + return QTranslator::translate(context, sourceText, disambiguation, n); + } + + const char* sigval1 = (const char*) context; + const char* sigval2 = (const char*) sourceText; + const char* sigval3 = (const char*) disambiguation; + int sigval4 = n; + + struct miqt_string callback_return_value = miqt_exec_callback_QTranslator_Translate(const_cast(this), handle__Translate, sigval1, sigval2, sigval3, sigval4); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Translate(const char* context, const char* sourceText, const char* disambiguation, int n) const { + + QString _ret = QTranslator::translate(context, sourceText, disambiguation, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QTranslator::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QTranslator_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QTranslator::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTranslator::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTranslator_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTranslator::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTranslator::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTranslator_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTranslator::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTranslator::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTranslator_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTranslator::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTranslator::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTranslator_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTranslator::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTranslator::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTranslator_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTranslator::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTranslator::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTranslator_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTranslator::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTranslator::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTranslator_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTranslator::disconnectNotify(*signal); + + } + +}; + +void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject) { + MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(); + *outptr_QTranslator = ret; + *outptr_QObject = static_cast(ret); } -QTranslator* QTranslator_new2(QObject* parent) { - return new QTranslator(parent); +void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject) { + MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(parent); + *outptr_QTranslator = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTranslator_MetaObject(const QTranslator* self) { @@ -47,8 +292,8 @@ struct miqt_string QTranslator_TrUtf8(const char* s) { return _ms; } -struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText) { - QString _ret = self->translate(context, sourceText); +struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n) { + QString _ret = self->translate(context, sourceText, disambiguation, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -142,28 +387,6 @@ struct miqt_string QTranslator_TrUtf83(const char* s, const char* c, int n) { return _ms; } -struct miqt_string QTranslator_Translate3(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation) { - QString _ret = self->translate(context, sourceText, disambiguation); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} - -struct miqt_string QTranslator_Translate4(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n) { - QString _ret = self->translate(context, sourceText, disambiguation, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} - bool QTranslator_Load22(QTranslator* self, struct miqt_string filename, struct miqt_string directory) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); @@ -211,7 +434,83 @@ bool QTranslator_Load34(QTranslator* self, const unsigned char* data, int lenVal return self->load(static_cast(data), static_cast(lenVal), directory_QString); } -void QTranslator_Delete(QTranslator* self) { - delete self; +void QTranslator_override_virtual_Translate(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__Translate = slot; +} + +struct miqt_string QTranslator_virtualbase_Translate(const void* self, const char* context, const char* sourceText, const char* disambiguation, int n) { + return ( (const MiqtVirtualQTranslator*)(self) )->virtualbase_Translate(context, sourceText, disambiguation, n); +} + +void QTranslator_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__IsEmpty = slot; +} + +bool QTranslator_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQTranslator*)(self) )->virtualbase_IsEmpty(); +} + +void QTranslator_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__Event = slot; +} + +bool QTranslator_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTranslator*)(self) )->virtualbase_Event(event); +} + +void QTranslator_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__EventFilter = slot; +} + +bool QTranslator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTranslator*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTranslator_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__TimerEvent = slot; +} + +void QTranslator_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_TimerEvent(event); +} + +void QTranslator_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__ChildEvent = slot; +} + +void QTranslator_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_ChildEvent(event); +} + +void QTranslator_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__CustomEvent = slot; +} + +void QTranslator_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_CustomEvent(event); +} + +void QTranslator_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__ConnectNotify = slot; +} + +void QTranslator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTranslator_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__DisconnectNotify = slot; +} + +void QTranslator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTranslator_Delete(QTranslator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtranslator.go b/qt/gen_qtranslator.go index 004f8740..dcdf14f7 100644 --- a/qt/gen_qtranslator.go +++ b/qt/gen_qtranslator.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTranslator struct { - h *C.QTranslator + h *C.QTranslator + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QTranslator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTranslator(h *C.QTranslator) *QTranslator { +// newQTranslator constructs the type using only CGO pointers. +func newQTranslator(h *C.QTranslator, h_QObject *C.QObject) *QTranslator { if h == nil { return nil } - return &QTranslator{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTranslator{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTranslator(h unsafe.Pointer) *QTranslator { - return newQTranslator((*C.QTranslator)(h)) +// UnsafeNewQTranslator constructs the type using only unsafe pointers. +func UnsafeNewQTranslator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTranslator { + if h == nil { + return nil + } + + return &QTranslator{h: (*C.QTranslator)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTranslator constructs a new QTranslator object. func NewQTranslator() *QTranslator { - ret := C.QTranslator_new() - return newQTranslator(ret) + var outptr_QTranslator *C.QTranslator = nil + var outptr_QObject *C.QObject = nil + + C.QTranslator_new(&outptr_QTranslator, &outptr_QObject) + ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTranslator2 constructs a new QTranslator object. func NewQTranslator2(parent *QObject) *QTranslator { - ret := C.QTranslator_new2(parent.cPointer()) - return newQTranslator(ret) + var outptr_QTranslator *C.QTranslator = nil + var outptr_QObject *C.QObject = nil + + C.QTranslator_new2(parent.cPointer(), &outptr_QTranslator, &outptr_QObject) + ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTranslator) MetaObject() *QMetaObject { @@ -83,12 +103,14 @@ func QTranslator_TrUtf8(s string) string { return _ret } -func (this *QTranslator) Translate(context string, sourceText string) string { +func (this *QTranslator) Translate(context string, sourceText string, disambiguation string, n int) string { context_Cstring := C.CString(context) defer C.free(unsafe.Pointer(context_Cstring)) sourceText_Cstring := C.CString(sourceText) defer C.free(unsafe.Pointer(sourceText_Cstring)) - var _ms C.struct_miqt_string = C.QTranslator_Translate(this.h, context_Cstring, sourceText_Cstring) + disambiguation_Cstring := C.CString(disambiguation) + defer C.free(unsafe.Pointer(disambiguation_Cstring)) + var _ms C.struct_miqt_string = C.QTranslator_Translate(this.h, context_Cstring, sourceText_Cstring, disambiguation_Cstring, (C.int)(n)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret @@ -176,32 +198,6 @@ func QTranslator_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QTranslator) Translate3(context string, sourceText string, disambiguation string) string { - context_Cstring := C.CString(context) - defer C.free(unsafe.Pointer(context_Cstring)) - sourceText_Cstring := C.CString(sourceText) - defer C.free(unsafe.Pointer(sourceText_Cstring)) - disambiguation_Cstring := C.CString(disambiguation) - defer C.free(unsafe.Pointer(disambiguation_Cstring)) - var _ms C.struct_miqt_string = C.QTranslator_Translate3(this.h, context_Cstring, sourceText_Cstring, disambiguation_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - -func (this *QTranslator) Translate4(context string, sourceText string, disambiguation string, n int) string { - context_Cstring := C.CString(context) - defer C.free(unsafe.Pointer(context_Cstring)) - sourceText_Cstring := C.CString(sourceText) - defer C.free(unsafe.Pointer(sourceText_Cstring)) - disambiguation_Cstring := C.CString(disambiguation) - defer C.free(unsafe.Pointer(disambiguation_Cstring)) - var _ms C.struct_miqt_string = C.QTranslator_Translate4(this.h, context_Cstring, sourceText_Cstring, disambiguation_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - func (this *QTranslator) Load22(filename string, directory string) bool { filename_ms := C.struct_miqt_string{} filename_ms.data = C.CString(filename) @@ -306,9 +302,243 @@ func (this *QTranslator) Load34(data *byte, lenVal int, directory string) bool { return (bool)(C.QTranslator_Load34(this.h, (*C.uchar)(unsafe.Pointer(data)), (C.int)(lenVal), directory_ms)) } +func (this *QTranslator) callVirtualBase_Translate(context string, sourceText string, disambiguation string, n int) string { + context_Cstring := C.CString(context) + defer C.free(unsafe.Pointer(context_Cstring)) + sourceText_Cstring := C.CString(sourceText) + defer C.free(unsafe.Pointer(sourceText_Cstring)) + disambiguation_Cstring := C.CString(disambiguation) + defer C.free(unsafe.Pointer(disambiguation_Cstring)) + + var _ms C.struct_miqt_string = C.QTranslator_virtualbase_Translate(unsafe.Pointer(this.h), context_Cstring, sourceText_Cstring, disambiguation_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QTranslator) OnTranslate(slot func(super func(context string, sourceText string, disambiguation string, n int) string, context string, sourceText string, disambiguation string, n int) string) { + C.QTranslator_override_virtual_Translate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_Translate +func miqt_exec_callback_QTranslator_Translate(self *C.QTranslator, cb C.intptr_t, context *C.const_char, sourceText *C.const_char, disambiguation *C.const_char, n C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(context string, sourceText string, disambiguation string, n int) string, context string, sourceText string, disambiguation string, n int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + context_ret := context + slotval1 := C.GoString(context_ret) + + sourceText_ret := sourceText + slotval2 := C.GoString(sourceText_ret) + + disambiguation_ret := disambiguation + slotval3 := C.GoString(disambiguation_ret) + + slotval4 := (int)(n) + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_Translate, slotval1, slotval2, slotval3, slotval4) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QTranslator) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QTranslator_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QTranslator) OnIsEmpty(slot func(super func() bool) bool) { + C.QTranslator_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_IsEmpty +func miqt_exec_callback_QTranslator_IsEmpty(self *C.QTranslator, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QTranslator) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTranslator_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTranslator) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTranslator_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_Event +func miqt_exec_callback_QTranslator_Event(self *C.QTranslator, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTranslator) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTranslator_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTranslator) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTranslator_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_EventFilter +func miqt_exec_callback_QTranslator_EventFilter(self *C.QTranslator, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTranslator) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTranslator_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTranslator) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTranslator_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_TimerEvent +func miqt_exec_callback_QTranslator_TimerEvent(self *C.QTranslator, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTranslator{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTranslator) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTranslator_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTranslator) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTranslator_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_ChildEvent +func miqt_exec_callback_QTranslator_ChildEvent(self *C.QTranslator, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTranslator{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTranslator) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTranslator_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTranslator) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTranslator_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_CustomEvent +func miqt_exec_callback_QTranslator_CustomEvent(self *C.QTranslator, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTranslator{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTranslator) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTranslator_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTranslator) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTranslator_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_ConnectNotify +func miqt_exec_callback_QTranslator_ConnectNotify(self *C.QTranslator, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTranslator{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTranslator) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTranslator_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTranslator) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTranslator_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_DisconnectNotify +func miqt_exec_callback_QTranslator_DisconnectNotify(self *C.QTranslator, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTranslator{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTranslator) Delete() { - C.QTranslator_Delete(this.h) + C.QTranslator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtranslator.h b/qt/gen_qtranslator.h index 69fe5347..3a30f39d 100644 --- a/qt/gen_qtranslator.h +++ b/qt/gen_qtranslator.h @@ -15,24 +15,32 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QLocale; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QTranslator; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLocale QLocale; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -QTranslator* QTranslator_new(); -QTranslator* QTranslator_new2(QObject* parent); +void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject); +void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject); QMetaObject* QTranslator_MetaObject(const QTranslator* self); void* QTranslator_Metacast(QTranslator* self, const char* param1); struct miqt_string QTranslator_Tr(const char* s); struct miqt_string QTranslator_TrUtf8(const char* s); -struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText); +struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n); bool QTranslator_IsEmpty(const QTranslator* self); struct miqt_string QTranslator_Language(const QTranslator* self); struct miqt_string QTranslator_FilePath(const QTranslator* self); @@ -43,8 +51,6 @@ struct miqt_string QTranslator_Tr2(const char* s, const char* c); struct miqt_string QTranslator_Tr3(const char* s, const char* c, int n); struct miqt_string QTranslator_TrUtf82(const char* s, const char* c); struct miqt_string QTranslator_TrUtf83(const char* s, const char* c, int n); -struct miqt_string QTranslator_Translate3(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation); -struct miqt_string QTranslator_Translate4(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n); bool QTranslator_Load22(QTranslator* self, struct miqt_string filename, struct miqt_string directory); bool QTranslator_Load32(QTranslator* self, struct miqt_string filename, struct miqt_string directory, struct miqt_string search_delimiters); bool QTranslator_Load4(QTranslator* self, struct miqt_string filename, struct miqt_string directory, struct miqt_string search_delimiters, struct miqt_string suffix); @@ -52,7 +58,25 @@ bool QTranslator_Load33(QTranslator* self, QLocale* locale, struct miqt_string f bool QTranslator_Load42(QTranslator* self, QLocale* locale, struct miqt_string filename, struct miqt_string prefix, struct miqt_string directory); bool QTranslator_Load5(QTranslator* self, QLocale* locale, struct miqt_string filename, struct miqt_string prefix, struct miqt_string directory, struct miqt_string suffix); bool QTranslator_Load34(QTranslator* self, const unsigned char* data, int lenVal, struct miqt_string directory); -void QTranslator_Delete(QTranslator* self); +void QTranslator_override_virtual_Translate(void* self, intptr_t slot); +struct miqt_string QTranslator_virtualbase_Translate(const void* self, const char* context, const char* sourceText, const char* disambiguation, int n); +void QTranslator_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QTranslator_virtualbase_IsEmpty(const void* self); +void QTranslator_override_virtual_Event(void* self, intptr_t slot); +bool QTranslator_virtualbase_Event(void* self, QEvent* event); +void QTranslator_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTranslator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTranslator_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTranslator_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTranslator_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTranslator_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTranslator_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTranslator_virtualbase_CustomEvent(void* self, QEvent* event); +void QTranslator_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTranslator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTranslator_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTranslator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTranslator_Delete(QTranslator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtransposeproxymodel.cpp b/qt/gen_qtransposeproxymodel.cpp index c2cb1873..aaeb13c3 100644 --- a/qt/gen_qtransposeproxymodel.cpp +++ b/qt/gen_qtransposeproxymodel.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -13,12 +16,1016 @@ #include "gen_qtransposeproxymodel.h" #include "_cgo_export.h" -QTransposeProxyModel* QTransposeProxyModel_new() { - return new QTransposeProxyModel(); +class MiqtVirtualQTransposeProxyModel : public virtual QTransposeProxyModel { +public: + + MiqtVirtualQTransposeProxyModel(): QTransposeProxyModel() {}; + MiqtVirtualQTransposeProxyModel(QObject* parent): QTransposeProxyModel(parent) {}; + + virtual ~MiqtVirtualQTransposeProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSourceModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSourceModel(QAbstractItemModel* newSourceModel) override { + if (handle__SetSourceModel == 0) { + QTransposeProxyModel::setSourceModel(newSourceModel); + return; + } + + QAbstractItemModel* sigval1 = newSourceModel; + + miqt_exec_callback_QTransposeProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* newSourceModel) { + + QTransposeProxyModel::setSourceModel(newSourceModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QTransposeProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QTransposeProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QTransposeProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QTransposeProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QTransposeProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTransposeProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QTransposeProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QTransposeProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QTransposeProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QTransposeProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QTransposeProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QTransposeProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QTransposeProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QTransposeProxyModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QTransposeProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QTransposeProxyModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override { + if (handle__MapFromSource == 0) { + return QTransposeProxyModel::mapFromSource(sourceIndex); + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapFromSource(QModelIndex* sourceIndex) const { + + return new QModelIndex(QTransposeProxyModel::mapFromSource(*sourceIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const override { + if (handle__MapToSource == 0) { + return QTransposeProxyModel::mapToSource(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapToSource(QModelIndex* proxyIndex) const { + + return new QModelIndex(QTransposeProxyModel::mapToSource(*proxyIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& index) const override { + if (handle__Parent == 0) { + return QTransposeProxyModel::parent(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* index) const { + + return new QModelIndex(QTransposeProxyModel::parent(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QTransposeProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QTransposeProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QTransposeProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QTransposeProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QTransposeProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QTransposeProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QTransposeProxyModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QTransposeProxyModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QTransposeProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QTransposeProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QTransposeProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QTransposeProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QTransposeProxyModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QTransposeProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QTransposeProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QTransposeProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QTransposeProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QTransposeProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QTransposeProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QTransposeProxyModel::revert(); + return; + } + + + miqt_exec_callback_QTransposeProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QTransposeProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& proxyIndex, int role) const override { + if (handle__Data == 0) { + return QTransposeProxyModel::data(proxyIndex, role); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* proxyIndex, int role) const { + + return new QVariant(QTransposeProxyModel::data(*proxyIndex, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QTransposeProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QTransposeProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QTransposeProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QTransposeProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QTransposeProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QTransposeProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QTransposeProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QTransposeProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QTransposeProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QTransposeProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QTransposeProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QTransposeProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QTransposeProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QTransposeProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QTransposeProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QTransposeProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QTransposeProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QTransposeProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QTransposeProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QTransposeProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QTransposeProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QTransposeProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QTransposeProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QTransposeProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QTransposeProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QTransposeProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QTransposeProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QTransposeProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + +}; + +void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(); + *outptr_QTransposeProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent) { - return new QTransposeProxyModel(parent); +void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(parent); + *outptr_QTransposeProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self) { @@ -55,20 +1062,20 @@ void QTransposeProxyModel_SetSourceModel(QTransposeProxyModel* self, QAbstractIt self->setSourceModel(newSourceModel); } -int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self) { - return self->rowCount(); +int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self) { - return self->columnCount(); +int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } bool QTransposeProxyModel_SetItemData(QTransposeProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { @@ -115,36 +1122,36 @@ QModelIndex* QTransposeProxyModel_Parent(const QTransposeProxyModel* self, QMode return new QModelIndex(self->parent(*index)); } -QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } -bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QTransposeProxyModel_MoveRows(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { return self->moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); } -bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } bool QTransposeProxyModel_MoveColumns(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { return self->moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); } -void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column) { - self->sort(static_cast(column)); +void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_string QTransposeProxyModel_Tr2(const char* s, const char* c) { @@ -191,47 +1198,291 @@ struct miqt_string QTransposeProxyModel_TrUtf83(const char* s, const char* c, in return _ms; } -int QTransposeProxyModel_RowCount1(const QTransposeProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QTransposeProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetSourceModel = slot; } -int QTransposeProxyModel_ColumnCount1(const QTransposeProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QTransposeProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* newSourceModel) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetSourceModel(newSourceModel); } -QVariant* QTransposeProxyModel_HeaderData3(const QTransposeProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QTransposeProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RowCount = slot; } -bool QTransposeProxyModel_SetHeaderData4(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); +int QTransposeProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RowCount(parent); } -QModelIndex* QTransposeProxyModel_Index3(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +void QTransposeProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__ColumnCount = slot; } -bool QTransposeProxyModel_InsertRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +int QTransposeProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_ColumnCount(parent); } -bool QTransposeProxyModel_RemoveRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +void QTransposeProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__HeaderData = slot; } -bool QTransposeProxyModel_InsertColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); +QVariant* QTransposeProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); } -bool QTransposeProxyModel_RemoveColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); +void QTransposeProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetHeaderData = slot; } -void QTransposeProxyModel_Sort2(QTransposeProxyModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +bool QTransposeProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QTransposeProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QTransposeProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QTransposeProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Span = slot; } -void QTransposeProxyModel_Delete(QTransposeProxyModel* self) { - delete self; +QSize* QTransposeProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Span(index); +} + +void QTransposeProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QTransposeProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QTransposeProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapFromSource = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); +} + +void QTransposeProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapToSource = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapToSource(proxyIndex); +} + +void QTransposeProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Parent(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Parent(index); +} + +void QTransposeProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QTransposeProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QTransposeProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QTransposeProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QTransposeProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QTransposeProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QTransposeProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QTransposeProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QTransposeProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QTransposeProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QTransposeProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QTransposeProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QTransposeProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QTransposeProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Sort = slot; +} + +void QTransposeProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QTransposeProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Submit = slot; +} + +bool QTransposeProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Submit(); +} + +void QTransposeProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Revert = slot; +} + +void QTransposeProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Revert(); +} + +void QTransposeProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QTransposeProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Data(proxyIndex, role); +} + +void QTransposeProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Flags = slot; +} + +int QTransposeProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QTransposeProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetData = slot; +} + +bool QTransposeProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QTransposeProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QTransposeProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QTransposeProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QTransposeProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QTransposeProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QTransposeProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QTransposeProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QTransposeProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QTransposeProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QTransposeProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QTransposeProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QTransposeProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QTransposeProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QTransposeProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QTransposeProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QTransposeProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QTransposeProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QTransposeProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QTransposeProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QTransposeProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QTransposeProxyModel_Delete(QTransposeProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtransposeproxymodel.go b/qt/gen_qtransposeproxymodel.go index be719f85..4ed2f75e 100644 --- a/qt/gen_qtransposeproxymodel.go +++ b/qt/gen_qtransposeproxymodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTransposeProxyModel struct { - h *C.QTransposeProxyModel + h *C.QTransposeProxyModel + isSubclass bool *QAbstractProxyModel } @@ -32,27 +34,49 @@ func (this *QTransposeProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTransposeProxyModel(h *C.QTransposeProxyModel) *QTransposeProxyModel { +// newQTransposeProxyModel constructs the type using only CGO pointers. +func newQTransposeProxyModel(h *C.QTransposeProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QTransposeProxyModel { if h == nil { return nil } - return &QTransposeProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))} + return &QTransposeProxyModel{h: h, + QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQTransposeProxyModel(h unsafe.Pointer) *QTransposeProxyModel { - return newQTransposeProxyModel((*C.QTransposeProxyModel)(h)) +// UnsafeNewQTransposeProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQTransposeProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QTransposeProxyModel { + if h == nil { + return nil + } + + return &QTransposeProxyModel{h: (*C.QTransposeProxyModel)(h), + QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } // NewQTransposeProxyModel constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel() *QTransposeProxyModel { - ret := C.QTransposeProxyModel_new() - return newQTransposeProxyModel(ret) + var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QTransposeProxyModel_new(&outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTransposeProxyModel2 constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel2(parent *QObject) *QTransposeProxyModel { - ret := C.QTransposeProxyModel_new2(parent.cPointer()) - return newQTransposeProxyModel(ret) + var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QTransposeProxyModel_new2(parent.cPointer(), &outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTransposeProxyModel) MetaObject() *QMetaObject { @@ -87,23 +111,23 @@ func (this *QTransposeProxyModel) SetSourceModel(newSourceModel *QAbstractItemMo C.QTransposeProxyModel_SetSourceModel(this.h, newSourceModel.cPointer()) } -func (this *QTransposeProxyModel) RowCount() int { - return (int)(C.QTransposeProxyModel_RowCount(this.h)) +func (this *QTransposeProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QTransposeProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QTransposeProxyModel) ColumnCount() int { - return (int)(C.QTransposeProxyModel_ColumnCount(this.h)) +func (this *QTransposeProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QTransposeProxyModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QTransposeProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QTransposeProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QTransposeProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QTransposeProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QTransposeProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QTransposeProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QTransposeProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QTransposeProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QTransposeProxyModel) SetItemData(index *QModelIndex, roles map[int]QVariant) bool { @@ -171,39 +195,39 @@ func (this *QTransposeProxyModel) Parent(index *QModelIndex) *QModelIndex { return _goptr } -func (this *QTransposeProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QTransposeProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QTransposeProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QTransposeProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QTransposeProxyModel) InsertRows(row int, count int) bool { - return (bool)(C.QTransposeProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QTransposeProxyModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QTransposeProxyModel) RemoveRows(row int, count int) bool { - return (bool)(C.QTransposeProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QTransposeProxyModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } func (this *QTransposeProxyModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { return (bool)(C.QTransposeProxyModel_MoveRows(this.h, sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) } -func (this *QTransposeProxyModel) InsertColumns(column int, count int) bool { - return (bool)(C.QTransposeProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QTransposeProxyModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QTransposeProxyModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QTransposeProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QTransposeProxyModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QTransposeProxyModel) MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { return (bool)(C.QTransposeProxyModel_MoveColumns(this.h, sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) } -func (this *QTransposeProxyModel) Sort(column int) { - C.QTransposeProxyModel_Sort(this.h, (C.int)(column)) +func (this *QTransposeProxyModel) Sort(column int, order SortOrder) { + C.QTransposeProxyModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func QTransposeProxyModel_Tr2(s string, c string) string { @@ -250,55 +274,1044 @@ func QTransposeProxyModel_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QTransposeProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QTransposeProxyModel_RowCount1(this.h, parent.cPointer())) +func (this *QTransposeProxyModel) callVirtualBase_SetSourceModel(newSourceModel *QAbstractItemModel) { + + C.QTransposeProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), newSourceModel.cPointer()) + } +func (this *QTransposeProxyModel) OnSetSourceModel(slot func(super func(newSourceModel *QAbstractItemModel), newSourceModel *QAbstractItemModel)) { + C.QTransposeProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetSourceModel +func miqt_exec_callback_QTransposeProxyModel_SetSourceModel(self *C.QTransposeProxyModel, cb C.intptr_t, newSourceModel *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newSourceModel *QAbstractItemModel), newSourceModel *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(newSourceModel), nil) + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) -func (this *QTransposeProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QTransposeProxyModel_ColumnCount1(this.h, parent.cPointer())) } -func (this *QTransposeProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QTransposeProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QTransposeProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QTransposeProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QTransposeProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_RowCount +func miqt_exec_callback_QTransposeProxyModel_RowCount(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QTransposeProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QTransposeProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_ColumnCount +func miqt_exec_callback_QTransposeProxyModel_ColumnCount(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QTransposeProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QTransposeProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QTransposeProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_HeaderData +func miqt_exec_callback_QTransposeProxyModel_HeaderData(self *C.QTransposeProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QTransposeProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QTransposeProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetHeaderData +func miqt_exec_callback_QTransposeProxyModel_SetHeaderData(self *C.QTransposeProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QTransposeProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QTransposeProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QTransposeProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetItemData +func miqt_exec_callback_QTransposeProxyModel_SetItemData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QTransposeProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QTransposeProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Span +func miqt_exec_callback_QTransposeProxyModel_Span(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QTransposeProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QTransposeProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QTransposeProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_ItemData +func miqt_exec_callback_QTransposeProxyModel_ItemData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QTransposeProxyModel) callVirtualBase_MapFromSource(sourceIndex *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_MapFromSource(unsafe.Pointer(this.h), sourceIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapFromSource(slot func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QTransposeProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) +//export miqt_exec_callback_QTransposeProxyModel_MapFromSource +func miqt_exec_callback_QTransposeProxyModel_MapFromSource(self *C.QTransposeProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceIndex)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapFromSource, slotval1) + + return virtualReturn.cPointer() + } -func (this *QTransposeProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QTransposeProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QTransposeProxyModel) callVirtualBase_MapToSource(proxyIndex *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_MapToSource(unsafe.Pointer(this.h), proxyIndex.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QTransposeProxyModel) OnMapToSource(slot func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QTransposeProxyModel_MapToSource +func miqt_exec_callback_QTransposeProxyModel_MapToSource(self *C.QTransposeProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapToSource, slotval1) + + return virtualReturn.cPointer() + } -func (this *QTransposeProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +func (this *QTransposeProxyModel) callVirtualBase_Parent(index *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } +func (this *QTransposeProxyModel) OnParent(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Parent +func miqt_exec_callback_QTransposeProxyModel_Parent(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() -func (this *QTransposeProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QTransposeProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QTransposeProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } +func (this *QTransposeProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Index +func miqt_exec_callback_QTransposeProxyModel_Index(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_InsertRows +func miqt_exec_callback_QTransposeProxyModel_InsertRows(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_RemoveRows +func miqt_exec_callback_QTransposeProxyModel_RemoveRows(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QTransposeProxyModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QTransposeProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MoveRows +func miqt_exec_callback_QTransposeProxyModel_MoveRows(self *C.QTransposeProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_InsertColumns +func miqt_exec_callback_QTransposeProxyModel_InsertColumns(self *C.QTransposeProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_RemoveColumns +func miqt_exec_callback_QTransposeProxyModel_RemoveColumns(self *C.QTransposeProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QTransposeProxyModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QTransposeProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MoveColumns +func miqt_exec_callback_QTransposeProxyModel_MoveColumns(self *C.QTransposeProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QTransposeProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QTransposeProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QTransposeProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Sort +func miqt_exec_callback_QTransposeProxyModel_Sort(self *C.QTransposeProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QTransposeProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QTransposeProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Submit +func miqt_exec_callback_QTransposeProxyModel_Submit(self *C.QTransposeProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Revert() { + + C.QTransposeProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QTransposeProxyModel) OnRevert(slot func(super func())) { + C.QTransposeProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Revert +func miqt_exec_callback_QTransposeProxyModel_Revert(self *C.QTransposeProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Data(proxyIndex *QModelIndex, role int) *QVariant { + + _ret := C.QTransposeProxyModel_virtualbase_Data(unsafe.Pointer(this.h), proxyIndex.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnData(slot func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) { + C.QTransposeProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Data +func miqt_exec_callback_QTransposeProxyModel_Data(self *C.QTransposeProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QTransposeProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTransposeProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QTransposeProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Flags +func miqt_exec_callback_QTransposeProxyModel_Flags(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QTransposeProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QTransposeProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetData +func miqt_exec_callback_QTransposeProxyModel_SetData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Buddy +func miqt_exec_callback_QTransposeProxyModel_Buddy(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_CanFetchMore +func miqt_exec_callback_QTransposeProxyModel_CanFetchMore(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QTransposeProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QTransposeProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QTransposeProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_FetchMore +func miqt_exec_callback_QTransposeProxyModel_FetchMore(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QTransposeProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_HasChildren +func miqt_exec_callback_QTransposeProxyModel_HasChildren(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Sibling +func miqt_exec_callback_QTransposeProxyModel_Sibling(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTransposeProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QTransposeProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QTransposeProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MimeData +func miqt_exec_callback_QTransposeProxyModel_MimeData(self *C.QTransposeProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_CanDropMimeData +func miqt_exec_callback_QTransposeProxyModel_CanDropMimeData(self *C.QTransposeProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_DropMimeData +func miqt_exec_callback_QTransposeProxyModel_DropMimeData(self *C.QTransposeProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QTransposeProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QTransposeProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QTransposeProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MimeTypes +func miqt_exec_callback_QTransposeProxyModel_MimeTypes(self *C.QTransposeProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTransposeProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QTransposeProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QTransposeProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QTransposeProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SupportedDragActions +func miqt_exec_callback_QTransposeProxyModel_SupportedDragActions(self *C.QTransposeProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QTransposeProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QTransposeProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QTransposeProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SupportedDropActions +func miqt_exec_callback_QTransposeProxyModel_SupportedDropActions(self *C.QTransposeProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) -func (this *QTransposeProxyModel) Sort2(column int, order SortOrder) { - C.QTransposeProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order)) } // Delete this object from C++ memory. func (this *QTransposeProxyModel) Delete() { - C.QTransposeProxyModel_Delete(this.h) + C.QTransposeProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtransposeproxymodel.h b/qt/gen_qtransposeproxymodel.h index 47beb06a..3db0ae74 100644 --- a/qt/gen_qtransposeproxymodel.h +++ b/qt/gen_qtransposeproxymodel.h @@ -16,7 +16,9 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractProxyModel; class QMetaObject; +class QMimeData; class QModelIndex; class QObject; class QSize; @@ -24,7 +26,9 @@ class QTransposeProxyModel; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QSize QSize; @@ -32,46 +36,106 @@ typedef struct QTransposeProxyModel QTransposeProxyModel; typedef struct QVariant QVariant; #endif -QTransposeProxyModel* QTransposeProxyModel_new(); -QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent); +void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self); void* QTransposeProxyModel_Metacast(QTransposeProxyModel* self, const char* param1); struct miqt_string QTransposeProxyModel_Tr(const char* s); struct miqt_string QTransposeProxyModel_TrUtf8(const char* s); void QTransposeProxyModel_SetSourceModel(QTransposeProxyModel* self, QAbstractItemModel* newSourceModel); -int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self); -int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self); -QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation); -bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value); +int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self, QModelIndex* parent); +int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self, QModelIndex* parent); +QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation, int role); +bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role); bool QTransposeProxyModel_SetItemData(QTransposeProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); QSize* QTransposeProxyModel_Span(const QTransposeProxyModel* self, QModelIndex* index); struct miqt_map /* of int to QVariant* */ QTransposeProxyModel_ItemData(const QTransposeProxyModel* self, QModelIndex* index); QModelIndex* QTransposeProxyModel_MapFromSource(const QTransposeProxyModel* self, QModelIndex* sourceIndex); QModelIndex* QTransposeProxyModel_MapToSource(const QTransposeProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QTransposeProxyModel_Parent(const QTransposeProxyModel* self, QModelIndex* index); -QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column); -bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count); -bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count); +QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent); +bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); +bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); bool QTransposeProxyModel_MoveRows(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); -bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count); -bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count); +bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); +bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); bool QTransposeProxyModel_MoveColumns(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); -void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column); +void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column, int order); struct miqt_string QTransposeProxyModel_Tr2(const char* s, const char* c); struct miqt_string QTransposeProxyModel_Tr3(const char* s, const char* c, int n); struct miqt_string QTransposeProxyModel_TrUtf82(const char* s, const char* c); struct miqt_string QTransposeProxyModel_TrUtf83(const char* s, const char* c, int n); -int QTransposeProxyModel_RowCount1(const QTransposeProxyModel* self, QModelIndex* parent); -int QTransposeProxyModel_ColumnCount1(const QTransposeProxyModel* self, QModelIndex* parent); -QVariant* QTransposeProxyModel_HeaderData3(const QTransposeProxyModel* self, int section, int orientation, int role); -bool QTransposeProxyModel_SetHeaderData4(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role); -QModelIndex* QTransposeProxyModel_Index3(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent); -bool QTransposeProxyModel_InsertRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); -bool QTransposeProxyModel_RemoveRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); -bool QTransposeProxyModel_InsertColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); -bool QTransposeProxyModel_RemoveColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); -void QTransposeProxyModel_Sort2(QTransposeProxyModel* self, int column, int order); -void QTransposeProxyModel_Delete(QTransposeProxyModel* self); +void QTransposeProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* newSourceModel); +void QTransposeProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QTransposeProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QTransposeProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QTransposeProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QTransposeProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QTransposeProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QTransposeProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QTransposeProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QTransposeProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Parent(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QTransposeProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QTransposeProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_Sort(void* self, int column, int order); +void QTransposeProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_Submit(void* self); +void QTransposeProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_Revert(void* self); +void QTransposeProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QTransposeProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role); +void QTransposeProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QTransposeProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QTransposeProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QTransposeProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QTransposeProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QTransposeProxyModel_virtualbase_MimeTypes(const void* self); +void QTransposeProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_SupportedDragActions(const void* self); +void QTransposeProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_SupportedDropActions(const void* self); +void QTransposeProxyModel_Delete(QTransposeProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtreeview.cpp b/qt/gen_qtreeview.cpp index d3022d9f..5c1a23c4 100644 --- a/qt/gen_qtreeview.cpp +++ b/qt/gen_qtreeview.cpp @@ -1,400 +1,2435 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include #include #include #include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include +#include +#include #include +#include #include #include #include "gen_qtreeview.h" #include "_cgo_export.h" -QTreeView* QTreeView_new(QWidget* parent) { - return new QTreeView(parent); +class MiqtVirtualQTreeView : public virtual QTreeView { +public: + + MiqtVirtualQTreeView(QWidget* parent): QTreeView(parent) {}; + MiqtVirtualQTreeView(): QTreeView() {}; + + virtual ~MiqtVirtualQTreeView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QTreeView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QTreeView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QTreeView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTreeView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTreeView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTreeView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTreeView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTreeView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTreeView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QTreeView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QTreeView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QTreeView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTreeView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTreeView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTreeView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTreeView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTreeView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTreeView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTreeView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTreeView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTreeView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTreeView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTreeView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QTreeView::reset(); + return; + } + + + miqt_exec_callback_QTreeView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QTreeView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QTreeView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QTreeView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QTreeView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QTreeView::selectAll(); + return; + } + + + miqt_exec_callback_QTreeView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QTreeView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QTreeView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTreeView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QTreeView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTreeView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTreeView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTreeView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QTreeView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QTreeView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QTreeView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QTreeView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTreeView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTreeView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTreeView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTreeView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTreeView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTreeView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTreeView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTreeView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTreeView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTreeView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTreeView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTreeView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTreeView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTreeView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QTreeView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QTreeView::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRow = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const override { + if (handle__DrawRow == 0) { + QTreeView::drawRow(painter, options, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& options_ret = options; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&options_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeView_DrawRow(const_cast(this), handle__DrawRow, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRow(QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) const { + + QTreeView::drawRow(painter, *options, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBranches = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const override { + if (handle__DrawBranches == 0) { + QTreeView::drawBranches(painter, rect, index); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeView_DrawBranches(const_cast(this), handle__DrawBranches, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBranches(QPainter* painter, QRect* rect, QModelIndex* index) const { + + QTreeView::drawBranches(painter, *rect, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTreeView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTreeView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTreeView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTreeView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTreeView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTreeView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTreeView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTreeView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTreeView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTreeView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTreeView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTreeView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QTreeView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QTreeView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTreeView::updateGeometries(); + return; + } + + + miqt_exec_callback_QTreeView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTreeView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTreeView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTreeView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTreeView::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTreeView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTreeView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTreeView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTreeView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTreeView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTreeView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTreeView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTreeView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTreeView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTreeView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTreeView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTreeView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QTreeView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QTreeView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QTreeView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QTreeView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTreeView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QTreeView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QTreeView::updateEditorData(); + return; + } + + + miqt_exec_callback_QTreeView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QTreeView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QTreeView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QTreeView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QTreeView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QTreeView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTreeView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QTreeView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QTreeView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTreeView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QTreeView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QTreeView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTreeView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QTreeView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QTreeView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QTreeView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QTreeView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QTreeView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QTreeView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QTreeView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QTreeView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QTreeView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QTreeView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QTreeView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QTreeView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QTreeView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QTreeView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QTreeView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QTreeView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QTreeView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QTreeView::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTreeView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTreeView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTreeView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTreeView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTreeView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTreeView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTreeView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTreeView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTreeView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTreeView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTreeView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTreeView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTreeView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTreeView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTreeView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QTreeView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QTreeView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QTreeView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QTreeView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTreeView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QTreeView::eventFilter(object, event); + + } + +}; + +void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(parent); + *outptr_QTreeView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(); + *outptr_QTreeView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QTreeView_MetaObject(const QTreeView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QTreeView_Metacast(QTreeView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QTreeView_Tr(const char* s) { + QString _ret = QTreeView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTreeView_TrUtf8(const char* s) { + QString _ret = QTreeView::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTreeView_SetModel(QTreeView* self, QAbstractItemModel* model) { + self->setModel(model); +} + +void QTreeView_SetRootIndex(QTreeView* self, QModelIndex* index) { + self->setRootIndex(*index); +} + +void QTreeView_SetSelectionModel(QTreeView* self, QItemSelectionModel* selectionModel) { + self->setSelectionModel(selectionModel); +} + +QHeaderView* QTreeView_Header(const QTreeView* self) { + return self->header(); +} + +void QTreeView_SetHeader(QTreeView* self, QHeaderView* header) { + self->setHeader(header); +} + +int QTreeView_AutoExpandDelay(const QTreeView* self) { + return self->autoExpandDelay(); +} + +void QTreeView_SetAutoExpandDelay(QTreeView* self, int delay) { + self->setAutoExpandDelay(static_cast(delay)); +} + +int QTreeView_Indentation(const QTreeView* self) { + return self->indentation(); +} + +void QTreeView_SetIndentation(QTreeView* self, int i) { + self->setIndentation(static_cast(i)); +} + +void QTreeView_ResetIndentation(QTreeView* self) { + self->resetIndentation(); +} + +bool QTreeView_RootIsDecorated(const QTreeView* self) { + return self->rootIsDecorated(); +} + +void QTreeView_SetRootIsDecorated(QTreeView* self, bool show) { + self->setRootIsDecorated(show); +} + +bool QTreeView_UniformRowHeights(const QTreeView* self) { + return self->uniformRowHeights(); +} + +void QTreeView_SetUniformRowHeights(QTreeView* self, bool uniform) { + self->setUniformRowHeights(uniform); +} + +bool QTreeView_ItemsExpandable(const QTreeView* self) { + return self->itemsExpandable(); +} + +void QTreeView_SetItemsExpandable(QTreeView* self, bool enable) { + self->setItemsExpandable(enable); +} + +bool QTreeView_ExpandsOnDoubleClick(const QTreeView* self) { + return self->expandsOnDoubleClick(); +} + +void QTreeView_SetExpandsOnDoubleClick(QTreeView* self, bool enable) { + self->setExpandsOnDoubleClick(enable); +} + +int QTreeView_ColumnViewportPosition(const QTreeView* self, int column) { + return self->columnViewportPosition(static_cast(column)); +} + +int QTreeView_ColumnWidth(const QTreeView* self, int column) { + return self->columnWidth(static_cast(column)); +} + +void QTreeView_SetColumnWidth(QTreeView* self, int column, int width) { + self->setColumnWidth(static_cast(column), static_cast(width)); +} + +int QTreeView_ColumnAt(const QTreeView* self, int x) { + return self->columnAt(static_cast(x)); +} + +bool QTreeView_IsColumnHidden(const QTreeView* self, int column) { + return self->isColumnHidden(static_cast(column)); +} + +void QTreeView_SetColumnHidden(QTreeView* self, int column, bool hide) { + self->setColumnHidden(static_cast(column), hide); +} + +bool QTreeView_IsHeaderHidden(const QTreeView* self) { + return self->isHeaderHidden(); +} + +void QTreeView_SetHeaderHidden(QTreeView* self, bool hide) { + self->setHeaderHidden(hide); +} + +bool QTreeView_IsRowHidden(const QTreeView* self, int row, QModelIndex* parent) { + return self->isRowHidden(static_cast(row), *parent); +} + +void QTreeView_SetRowHidden(QTreeView* self, int row, QModelIndex* parent, bool hide) { + self->setRowHidden(static_cast(row), *parent, hide); +} + +bool QTreeView_IsFirstColumnSpanned(const QTreeView* self, int row, QModelIndex* parent) { + return self->isFirstColumnSpanned(static_cast(row), *parent); +} + +void QTreeView_SetFirstColumnSpanned(QTreeView* self, int row, QModelIndex* parent, bool span) { + self->setFirstColumnSpanned(static_cast(row), *parent, span); +} + +bool QTreeView_IsExpanded(const QTreeView* self, QModelIndex* index) { + return self->isExpanded(*index); +} + +void QTreeView_SetExpanded(QTreeView* self, QModelIndex* index, bool expand) { + self->setExpanded(*index, expand); +} + +void QTreeView_SetSortingEnabled(QTreeView* self, bool enable) { + self->setSortingEnabled(enable); +} + +bool QTreeView_IsSortingEnabled(const QTreeView* self) { + return self->isSortingEnabled(); +} + +void QTreeView_SetAnimated(QTreeView* self, bool enable) { + self->setAnimated(enable); +} + +bool QTreeView_IsAnimated(const QTreeView* self) { + return self->isAnimated(); +} + +void QTreeView_SetAllColumnsShowFocus(QTreeView* self, bool enable) { + self->setAllColumnsShowFocus(enable); +} + +bool QTreeView_AllColumnsShowFocus(const QTreeView* self) { + return self->allColumnsShowFocus(); +} + +void QTreeView_SetWordWrap(QTreeView* self, bool on) { + self->setWordWrap(on); +} + +bool QTreeView_WordWrap(const QTreeView* self) { + return self->wordWrap(); +} + +void QTreeView_SetTreePosition(QTreeView* self, int logicalIndex) { + self->setTreePosition(static_cast(logicalIndex)); +} + +int QTreeView_TreePosition(const QTreeView* self) { + return self->treePosition(); +} + +void QTreeView_KeyboardSearch(QTreeView* self, struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + self->keyboardSearch(search_QString); +} + +QRect* QTreeView_VisualRect(const QTreeView* self, QModelIndex* index) { + return new QRect(self->visualRect(*index)); +} + +void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); +} + +QModelIndex* QTreeView_IndexAt(const QTreeView* self, QPoint* p) { + return new QModelIndex(self->indexAt(*p)); +} + +QModelIndex* QTreeView_IndexAbove(const QTreeView* self, QModelIndex* index) { + return new QModelIndex(self->indexAbove(*index)); +} + +QModelIndex* QTreeView_IndexBelow(const QTreeView* self, QModelIndex* index) { + return new QModelIndex(self->indexBelow(*index)); +} + +void QTreeView_DoItemsLayout(QTreeView* self) { + self->doItemsLayout(); +} + +void QTreeView_Reset(QTreeView* self) { + self->reset(); +} + +void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + self->dataChanged(*topLeft, *bottomRight, roles_QList); +} + +void QTreeView_SelectAll(QTreeView* self) { + self->selectAll(); +} + +void QTreeView_Expanded(QTreeView* self, QModelIndex* index) { + self->expanded(*index); +} + +void QTreeView_connect_Expanded(QTreeView* self, intptr_t slot) { + MiqtVirtualQTreeView::connect(self, static_cast(&QTreeView::expanded), self, [=](const QModelIndex& index) { + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + miqt_exec_callback_QTreeView_Expanded(slot, sigval1); + }); +} + +void QTreeView_Collapsed(QTreeView* self, QModelIndex* index) { + self->collapsed(*index); +} + +void QTreeView_connect_Collapsed(QTreeView* self, intptr_t slot) { + MiqtVirtualQTreeView::connect(self, static_cast(&QTreeView::collapsed), self, [=](const QModelIndex& index) { + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + miqt_exec_callback_QTreeView_Collapsed(slot, sigval1); + }); +} + +void QTreeView_HideColumn(QTreeView* self, int column) { + self->hideColumn(static_cast(column)); +} + +void QTreeView_ShowColumn(QTreeView* self, int column) { + self->showColumn(static_cast(column)); +} + +void QTreeView_Expand(QTreeView* self, QModelIndex* index) { + self->expand(*index); +} + +void QTreeView_Collapse(QTreeView* self, QModelIndex* index) { + self->collapse(*index); +} + +void QTreeView_ResizeColumnToContents(QTreeView* self, int column) { + self->resizeColumnToContents(static_cast(column)); +} + +void QTreeView_SortByColumn(QTreeView* self, int column) { + self->sortByColumn(static_cast(column)); +} + +void QTreeView_SortByColumn2(QTreeView* self, int column, int order) { + self->sortByColumn(static_cast(column), static_cast(order)); +} + +void QTreeView_ExpandAll(QTreeView* self) { + self->expandAll(); +} + +void QTreeView_ExpandRecursively(QTreeView* self, QModelIndex* index) { + self->expandRecursively(*index); +} + +void QTreeView_CollapseAll(QTreeView* self) { + self->collapseAll(); +} + +void QTreeView_ExpandToDepth(QTreeView* self, int depth) { + self->expandToDepth(static_cast(depth)); +} + +struct miqt_string QTreeView_Tr2(const char* s, const char* c) { + QString _ret = QTreeView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTreeView_Tr3(const char* s, const char* c, int n) { + QString _ret = QTreeView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTreeView_TrUtf82(const char* s, const char* c) { + QString _ret = QTreeView::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTreeView_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QTreeView::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTreeView_ExpandRecursively2(QTreeView* self, QModelIndex* index, int depth) { + self->expandRecursively(*index, static_cast(depth)); +} + +void QTreeView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetModel = slot; +} + +void QTreeView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetModel(model); +} + +void QTreeView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetRootIndex = slot; +} + +void QTreeView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTreeView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetSelectionModel = slot; +} + +void QTreeView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTreeView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__KeyboardSearch = slot; +} + +void QTreeView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QTreeView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VisualRect = slot; +} + +QRect* QTreeView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_VisualRect(index); +} + +void QTreeView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ScrollTo = slot; +} + +void QTreeView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTreeView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTreeView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_IndexAt(p); +} + +void QTreeView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DoItemsLayout = slot; +} + +void QTreeView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTreeView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__Reset = slot; } -QTreeView* QTreeView_new2() { - return new QTreeView(); +void QTreeView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_Reset(); } -QMetaObject* QTreeView_MetaObject(const QTreeView* self) { - return (QMetaObject*) self->metaObject(); +void QTreeView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DataChanged = slot; } -void* QTreeView_Metacast(QTreeView* self, const char* param1) { - return self->qt_metacast(param1); +void QTreeView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); } -struct miqt_string QTreeView_Tr(const char* s) { - QString _ret = QTreeView::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectAll = slot; } -struct miqt_string QTreeView_TrUtf8(const char* s) { - QString _ret = QTreeView::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SelectAll(); } -void QTreeView_SetModel(QTreeView* self, QAbstractItemModel* model) { - self->setModel(model); +void QTreeView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VerticalScrollbarValueChanged = slot; } -void QTreeView_SetRootIndex(QTreeView* self, QModelIndex* index) { - self->setRootIndex(*index); +void QTreeView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); } -void QTreeView_SetSelectionModel(QTreeView* self, QItemSelectionModel* selectionModel) { - self->setSelectionModel(selectionModel); +void QTreeView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ScrollContentsBy = slot; } -QHeaderView* QTreeView_Header(const QTreeView* self) { - return self->header(); +void QTreeView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -void QTreeView_SetHeader(QTreeView* self, QHeaderView* header) { - self->setHeader(header); +void QTreeView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__RowsInserted = slot; } -int QTreeView_AutoExpandDelay(const QTreeView* self) { - return self->autoExpandDelay(); +void QTreeView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_RowsInserted(parent, start, end); } -void QTreeView_SetAutoExpandDelay(QTreeView* self, int delay) { - self->setAutoExpandDelay(static_cast(delay)); +void QTreeView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__RowsAboutToBeRemoved = slot; } -int QTreeView_Indentation(const QTreeView* self) { - return self->indentation(); +void QTreeView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } -void QTreeView_SetIndentation(QTreeView* self, int i) { - self->setIndentation(static_cast(i)); +void QTreeView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MoveCursor = slot; } -void QTreeView_ResetIndentation(QTreeView* self) { - self->resetIndentation(); +QModelIndex* QTreeView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); } -bool QTreeView_RootIsDecorated(const QTreeView* self) { - return self->rootIsDecorated(); +void QTreeView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__HorizontalOffset = slot; } -void QTreeView_SetRootIsDecorated(QTreeView* self, bool show) { - self->setRootIsDecorated(show); +int QTreeView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_HorizontalOffset(); } -bool QTreeView_UniformRowHeights(const QTreeView* self) { - return self->uniformRowHeights(); +void QTreeView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VerticalOffset = slot; } -void QTreeView_SetUniformRowHeights(QTreeView* self, bool uniform) { - self->setUniformRowHeights(uniform); +int QTreeView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_VerticalOffset(); } -bool QTreeView_ItemsExpandable(const QTreeView* self) { - return self->itemsExpandable(); +void QTreeView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetSelection = slot; } -void QTreeView_SetItemsExpandable(QTreeView* self, bool enable) { - self->setItemsExpandable(enable); +void QTreeView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetSelection(rect, command); } -bool QTreeView_ExpandsOnDoubleClick(const QTreeView* self) { - return self->expandsOnDoubleClick(); +void QTreeView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectedIndexes = slot; } -void QTreeView_SetExpandsOnDoubleClick(QTreeView* self, bool enable) { - self->setExpandsOnDoubleClick(enable); +struct miqt_array /* of QModelIndex* */ QTreeView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SelectedIndexes(); } -int QTreeView_ColumnViewportPosition(const QTreeView* self, int column) { - return self->columnViewportPosition(static_cast(column)); +void QTreeView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__TimerEvent = slot; } -int QTreeView_ColumnWidth(const QTreeView* self, int column) { - return self->columnWidth(static_cast(column)); +void QTreeView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_TimerEvent(event); } -void QTreeView_SetColumnWidth(QTreeView* self, int column, int width) { - self->setColumnWidth(static_cast(column), static_cast(width)); +void QTreeView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__PaintEvent = slot; } -int QTreeView_ColumnAt(const QTreeView* self, int x) { - return self->columnAt(static_cast(x)); +void QTreeView_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_PaintEvent(event); } -bool QTreeView_IsColumnHidden(const QTreeView* self, int column) { - return self->isColumnHidden(static_cast(column)); +void QTreeView_override_virtual_DrawRow(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DrawRow = slot; } -void QTreeView_SetColumnHidden(QTreeView* self, int column, bool hide) { - self->setColumnHidden(static_cast(column), hide); +void QTreeView_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) { + ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_DrawRow(painter, options, index); } -bool QTreeView_IsHeaderHidden(const QTreeView* self) { - return self->isHeaderHidden(); +void QTreeView_override_virtual_DrawBranches(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DrawBranches = slot; } -void QTreeView_SetHeaderHidden(QTreeView* self, bool hide) { - self->setHeaderHidden(hide); +void QTreeView_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index) { + ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_DrawBranches(painter, rect, index); } -bool QTreeView_IsRowHidden(const QTreeView* self, int row, QModelIndex* parent) { - return self->isRowHidden(static_cast(row), *parent); +void QTreeView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MousePressEvent = slot; } -void QTreeView_SetRowHidden(QTreeView* self, int row, QModelIndex* parent, bool hide) { - self->setRowHidden(static_cast(row), *parent, hide); +void QTreeView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MousePressEvent(event); } -bool QTreeView_IsFirstColumnSpanned(const QTreeView* self, int row, QModelIndex* parent) { - return self->isFirstColumnSpanned(static_cast(row), *parent); +void QTreeView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MouseReleaseEvent = slot; } -void QTreeView_SetFirstColumnSpanned(QTreeView* self, int row, QModelIndex* parent, bool span) { - self->setFirstColumnSpanned(static_cast(row), *parent, span); +void QTreeView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MouseReleaseEvent(event); } -bool QTreeView_IsExpanded(const QTreeView* self, QModelIndex* index) { - return self->isExpanded(*index); +void QTreeView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MouseDoubleClickEvent = slot; } -void QTreeView_SetExpanded(QTreeView* self, QModelIndex* index, bool expand) { - self->setExpanded(*index, expand); +void QTreeView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MouseDoubleClickEvent(event); } -void QTreeView_SetSortingEnabled(QTreeView* self, bool enable) { - self->setSortingEnabled(enable); +void QTreeView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MouseMoveEvent = slot; } -bool QTreeView_IsSortingEnabled(const QTreeView* self) { - return self->isSortingEnabled(); +void QTreeView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MouseMoveEvent(event); } -void QTreeView_SetAnimated(QTreeView* self, bool enable) { - self->setAnimated(enable); +void QTreeView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__KeyPressEvent = slot; } -bool QTreeView_IsAnimated(const QTreeView* self) { - return self->isAnimated(); +void QTreeView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_KeyPressEvent(event); } -void QTreeView_SetAllColumnsShowFocus(QTreeView* self, bool enable) { - self->setAllColumnsShowFocus(enable); +void QTreeView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DragMoveEvent = slot; } -bool QTreeView_AllColumnsShowFocus(const QTreeView* self) { - return self->allColumnsShowFocus(); +void QTreeView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DragMoveEvent(event); } -void QTreeView_SetWordWrap(QTreeView* self, bool on) { - self->setWordWrap(on); +void QTreeView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ViewportEvent = slot; } -bool QTreeView_WordWrap(const QTreeView* self) { - return self->wordWrap(); +bool QTreeView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ViewportEvent(event); } -void QTreeView_SetTreePosition(QTreeView* self, int logicalIndex) { - self->setTreePosition(static_cast(logicalIndex)); +void QTreeView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__UpdateGeometries = slot; } -int QTreeView_TreePosition(const QTreeView* self) { - return self->treePosition(); +void QTreeView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_UpdateGeometries(); } -void QTreeView_KeyboardSearch(QTreeView* self, struct miqt_string search) { - QString search_QString = QString::fromUtf8(search.data, search.len); - self->keyboardSearch(search_QString); +void QTreeView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ViewportSizeHint = slot; } -QRect* QTreeView_VisualRect(const QTreeView* self, QModelIndex* index) { - return new QRect(self->visualRect(*index)); +QSize* QTreeView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_ViewportSizeHint(); } -void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index) { - self->scrollTo(*index); +void QTreeView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SizeHintForColumn = slot; } -QModelIndex* QTreeView_IndexAt(const QTreeView* self, QPoint* p) { - return new QModelIndex(self->indexAt(*p)); +int QTreeView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SizeHintForColumn(column); } -QModelIndex* QTreeView_IndexAbove(const QTreeView* self, QModelIndex* index) { - return new QModelIndex(self->indexAbove(*index)); +void QTreeView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__HorizontalScrollbarAction = slot; } -QModelIndex* QTreeView_IndexBelow(const QTreeView* self, QModelIndex* index) { - return new QModelIndex(self->indexBelow(*index)); +void QTreeView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_HorizontalScrollbarAction(action); } -void QTreeView_DoItemsLayout(QTreeView* self) { - self->doItemsLayout(); +void QTreeView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__IsIndexHidden = slot; } -void QTreeView_Reset(QTreeView* self) { - self->reset(); +bool QTreeView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_IsIndexHidden(index); } -void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight) { - self->dataChanged(*topLeft, *bottomRight); +void QTreeView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__CurrentChanged = slot; } -void QTreeView_SelectAll(QTreeView* self) { - self->selectAll(); +void QTreeView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_CurrentChanged(current, previous); } -void QTreeView_Expanded(QTreeView* self, QModelIndex* index) { - self->expanded(*index); +void QTreeView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SizeHintForRow = slot; } -void QTreeView_connect_Expanded(QTreeView* self, intptr_t slot) { - QTreeView::connect(self, static_cast(&QTreeView::expanded), self, [=](const QModelIndex& index) { - const QModelIndex& index_ret = index; - // Cast returned reference into pointer - QModelIndex* sigval1 = const_cast(&index_ret); - miqt_exec_callback_QTreeView_Expanded(slot, sigval1); - }); +int QTreeView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SizeHintForRow(row); } -void QTreeView_Collapsed(QTreeView* self, QModelIndex* index) { - self->collapsed(*index); +void QTreeView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__InputMethodQuery = slot; } -void QTreeView_connect_Collapsed(QTreeView* self, intptr_t slot) { - QTreeView::connect(self, static_cast(&QTreeView::collapsed), self, [=](const QModelIndex& index) { - const QModelIndex& index_ret = index; - // Cast returned reference into pointer - QModelIndex* sigval1 = const_cast(&index_ret); - miqt_exec_callback_QTreeView_Collapsed(slot, sigval1); - }); +QVariant* QTreeView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_InputMethodQuery(query); } -void QTreeView_HideColumn(QTreeView* self, int column) { - self->hideColumn(static_cast(column)); +void QTreeView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__UpdateEditorData = slot; } -void QTreeView_ShowColumn(QTreeView* self, int column) { - self->showColumn(static_cast(column)); +void QTreeView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_UpdateEditorData(); } -void QTreeView_Expand(QTreeView* self, QModelIndex* index) { - self->expand(*index); +void QTreeView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__UpdateEditorGeometries = slot; } -void QTreeView_Collapse(QTreeView* self, QModelIndex* index) { - self->collapse(*index); +void QTreeView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_UpdateEditorGeometries(); } -void QTreeView_ResizeColumnToContents(QTreeView* self, int column) { - self->resizeColumnToContents(static_cast(column)); +void QTreeView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VerticalScrollbarAction = slot; } -void QTreeView_SortByColumn(QTreeView* self, int column) { - self->sortByColumn(static_cast(column)); +void QTreeView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_VerticalScrollbarAction(action); } -void QTreeView_SortByColumn2(QTreeView* self, int column, int order) { - self->sortByColumn(static_cast(column), static_cast(order)); +void QTreeView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; } -void QTreeView_ExpandAll(QTreeView* self) { - self->expandAll(); +void QTreeView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); } -void QTreeView_ExpandRecursively(QTreeView* self, QModelIndex* index) { - self->expandRecursively(*index); +void QTreeView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__CloseEditor = slot; } -void QTreeView_CollapseAll(QTreeView* self) { - self->collapseAll(); +void QTreeView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_CloseEditor(editor, hint); } -void QTreeView_ExpandToDepth(QTreeView* self, int depth) { - self->expandToDepth(static_cast(depth)); +void QTreeView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__CommitData = slot; } -struct miqt_string QTreeView_Tr2(const char* s, const char* c) { - QString _ret = QTreeView::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_CommitData(editor); } -struct miqt_string QTreeView_Tr3(const char* s, const char* c, int n) { - QString _ret = QTreeView::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__EditorDestroyed = slot; } -struct miqt_string QTreeView_TrUtf82(const char* s, const char* c) { - QString _ret = QTreeView::trUtf8(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_EditorDestroyed(editor); } -struct miqt_string QTreeView_TrUtf83(const char* s, const char* c, int n) { - QString _ret = QTreeView::trUtf8(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__Edit2 = slot; } -void QTreeView_ScrollTo2(QTreeView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +bool QTreeView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_Edit2(index, trigger, event); } -void QTreeView_DataChanged3(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { - QVector roles_QList; - roles_QList.reserve(roles.len); - int* roles_arr = static_cast(roles.data); - for(size_t i = 0; i < roles.len; ++i) { - roles_QList.push_back(static_cast(roles_arr[i])); - } - self->dataChanged(*topLeft, *bottomRight, roles_QList); +void QTreeView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectionCommand = slot; } -void QTreeView_ExpandRecursively2(QTreeView* self, QModelIndex* index, int depth) { - self->expandRecursively(*index, static_cast(depth)); +int QTreeView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QTreeView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__StartDrag = slot; +} + +void QTreeView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QTreeView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QTreeView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_ViewOptions(); +} + +void QTreeView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTreeView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTreeView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__Event = slot; +} + +bool QTreeView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_Event(event); +} + +void QTreeView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DragEnterEvent = slot; +} + +void QTreeView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTreeView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTreeView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTreeView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DropEvent = slot; +} + +void QTreeView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DropEvent(event); +} + +void QTreeView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__FocusInEvent = slot; +} + +void QTreeView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTreeView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__FocusOutEvent = slot; +} + +void QTreeView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTreeView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ResizeEvent = slot; +} + +void QTreeView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QTreeView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__InputMethodEvent = slot; +} + +void QTreeView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QTreeView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__EventFilter = slot; +} + +bool QTreeView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_EventFilter(object, event); } -void QTreeView_Delete(QTreeView* self) { - delete self; +void QTreeView_Delete(QTreeView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtreeview.go b/qt/gen_qtreeview.go index bc9be9f0..7df6042f 100644 --- a/qt/gen_qtreeview.go +++ b/qt/gen_qtreeview.go @@ -15,7 +15,8 @@ import ( ) type QTreeView struct { - h *C.QTreeView + h *C.QTreeView + isSubclass bool *QAbstractItemView } @@ -33,27 +34,55 @@ func (this *QTreeView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTreeView(h *C.QTreeView) *QTreeView { +// newQTreeView constructs the type using only CGO pointers. +func newQTreeView(h *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeView { if h == nil { return nil } - return &QTreeView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QTreeView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTreeView(h unsafe.Pointer) *QTreeView { - return newQTreeView((*C.QTreeView)(h)) +// UnsafeNewQTreeView constructs the type using only unsafe pointers. +func UnsafeNewQTreeView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeView { + if h == nil { + return nil + } + + return &QTreeView{h: (*C.QTreeView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTreeView constructs a new QTreeView object. func NewQTreeView(parent *QWidget) *QTreeView { - ret := C.QTreeView_new(parent.cPointer()) - return newQTreeView(ret) + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeView_new(parent.cPointer(), &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTreeView2 constructs a new QTreeView object. func NewQTreeView2() *QTreeView { - ret := C.QTreeView_new2() - return newQTreeView(ret) + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeView_new2(&outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTreeView) MetaObject() *QMetaObject { @@ -97,7 +126,7 @@ func (this *QTreeView) SetSelectionModel(selectionModel *QItemSelectionModel) { } func (this *QTreeView) Header() *QHeaderView { - return UnsafeNewQHeaderView(unsafe.Pointer(C.QTreeView_Header(this.h))) + return UnsafeNewQHeaderView(unsafe.Pointer(C.QTreeView_Header(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QTreeView) SetHeader(header *QHeaderView) { @@ -267,8 +296,8 @@ func (this *QTreeView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QTreeView) ScrollTo(index *QModelIndex) { - C.QTreeView_ScrollTo(this.h, index.cPointer()) +func (this *QTreeView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QTreeView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QTreeView) IndexAt(p *QPoint) *QModelIndex { @@ -300,8 +329,14 @@ func (this *QTreeView) Reset() { C.QTreeView_Reset(this.h) } -func (this *QTreeView) DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex) { - C.QTreeView_DataChanged(this.h, topLeft.cPointer(), bottomRight.cPointer()) +func (this *QTreeView) DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + C.QTreeView_DataChanged(this.h, topLeft.cPointer(), bottomRight.cPointer(), roles_ma) } func (this *QTreeView) SelectAll() { @@ -436,27 +471,1473 @@ func QTreeView_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QTreeView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QTreeView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QTreeView) ExpandRecursively2(index *QModelIndex, depth int) { + C.QTreeView_ExpandRecursively2(this.h, index.cPointer(), (C.int)(depth)) +} + +func (this *QTreeView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QTreeView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QTreeView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QTreeView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetModel +func miqt_exec_callback_QTreeView_SetModel(self *C.QTreeView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QTreeView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTreeView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTreeView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTreeView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetRootIndex +func miqt_exec_callback_QTreeView_SetRootIndex(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTreeView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTreeView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTreeView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTreeView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetSelectionModel +func miqt_exec_callback_QTreeView_SetSelectionModel(self *C.QTreeView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTreeView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QTreeView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QTreeView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QTreeView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_KeyboardSearch +func miqt_exec_callback_QTreeView_KeyboardSearch(self *C.QTreeView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QTreeView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QTreeView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTreeView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTreeView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VisualRect +func miqt_exec_callback_QTreeView_VisualRect(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTreeView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTreeView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTreeView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ScrollTo +func miqt_exec_callback_QTreeView_ScrollTo(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTreeView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTreeView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTreeView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_IndexAt +func miqt_exec_callback_QTreeView_IndexAt(self *C.QTreeView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_DoItemsLayout() { + + C.QTreeView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnDoItemsLayout(slot func(super func())) { + C.QTreeView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DoItemsLayout +func miqt_exec_callback_QTreeView_DoItemsLayout(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTreeView) callVirtualBase_Reset() { + + C.QTreeView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnReset(slot func(super func())) { + C.QTreeView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_Reset +func miqt_exec_callback_QTreeView_Reset(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_Reset) + } -func (this *QTreeView) DataChanged3(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { +func (this *QTreeView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) defer C.free(unsafe.Pointer(roles_CArray)) for i := range roles { roles_CArray[i] = (C.int)(roles[i]) } roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} - C.QTreeView_DataChanged3(this.h, topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + + C.QTreeView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QTreeView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QTreeView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTreeView) ExpandRecursively2(index *QModelIndex, depth int) { - C.QTreeView_ExpandRecursively2(this.h, index.cPointer(), (C.int)(depth)) +//export miqt_exec_callback_QTreeView_DataChanged +func miqt_exec_callback_QTreeView_DataChanged(self *C.QTreeView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QTreeView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_SelectAll() { + + C.QTreeView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnSelectAll(slot func(super func())) { + C.QTreeView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectAll +func miqt_exec_callback_QTreeView_SelectAll(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QTreeView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QTreeView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTreeView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTreeView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VerticalScrollbarValueChanged +func miqt_exec_callback_QTreeView_VerticalScrollbarValueChanged(self *C.QTreeView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTreeView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTreeView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTreeView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTreeView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ScrollContentsBy +func miqt_exec_callback_QTreeView_ScrollContentsBy(self *C.QTreeView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTreeView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QTreeView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_RowsInserted +func miqt_exec_callback_QTreeView_RowsInserted(self *C.QTreeView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QTreeView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_RowsAboutToBeRemoved +func miqt_exec_callback_QTreeView_RowsAboutToBeRemoved(self *C.QTreeView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTreeView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTreeView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MoveCursor +func miqt_exec_callback_QTreeView_MoveCursor(self *C.QTreeView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTreeView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeView) OnHorizontalOffset(slot func(super func() int) int) { + C.QTreeView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_HorizontalOffset +func miqt_exec_callback_QTreeView_HorizontalOffset(self *C.QTreeView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTreeView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeView) OnVerticalOffset(slot func(super func() int) int) { + C.QTreeView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VerticalOffset +func miqt_exec_callback_QTreeView_VerticalOffset(self *C.QTreeView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTreeView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTreeView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTreeView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetSelection +func miqt_exec_callback_QTreeView_SetSelection(self *C.QTreeView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTreeView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTreeView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTreeView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectedIndexes +func miqt_exec_callback_QTreeView_SelectedIndexes(self *C.QTreeView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTreeView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTreeView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTreeView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_TimerEvent +func miqt_exec_callback_QTreeView_TimerEvent(self *C.QTreeView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QTreeView_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QTreeView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_PaintEvent +func miqt_exec_callback_QTreeView_PaintEvent(self *C.QTreeView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DrawRow(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex) { + + C.QTreeView_virtualbase_DrawRow(unsafe.Pointer(this.h), painter.cPointer(), options.cPointer(), index.cPointer()) + +} +func (this *QTreeView) OnDrawRow(slot func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) { + C.QTreeView_override_virtual_DrawRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DrawRow +func miqt_exec_callback_QTreeView_DrawRow(self *C.QTreeView, cb C.intptr_t, painter *C.QPainter, options *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(options), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeView{h: self}).callVirtualBase_DrawRow, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_DrawBranches(painter *QPainter, rect *QRect, index *QModelIndex) { + + C.QTreeView_virtualbase_DrawBranches(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), index.cPointer()) + +} +func (this *QTreeView) OnDrawBranches(slot func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) { + C.QTreeView_override_virtual_DrawBranches(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DrawBranches +func miqt_exec_callback_QTreeView_DrawBranches(self *C.QTreeView, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeView{h: self}).callVirtualBase_DrawBranches, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MousePressEvent +func miqt_exec_callback_QTreeView_MousePressEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MouseReleaseEvent +func miqt_exec_callback_QTreeView_MouseReleaseEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MouseDoubleClickEvent +func miqt_exec_callback_QTreeView_MouseDoubleClickEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MouseMoveEvent +func miqt_exec_callback_QTreeView_MouseMoveEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTreeView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTreeView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_KeyPressEvent +func miqt_exec_callback_QTreeView_KeyPressEvent(self *C.QTreeView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTreeView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTreeView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DragMoveEvent +func miqt_exec_callback_QTreeView_DragMoveEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTreeView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTreeView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ViewportEvent +func miqt_exec_callback_QTreeView_ViewportEvent(self *C.QTreeView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_UpdateGeometries() { + + C.QTreeView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnUpdateGeometries(slot func(super func())) { + C.QTreeView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_UpdateGeometries +func miqt_exec_callback_QTreeView_UpdateGeometries(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTreeView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTreeView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTreeView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ViewportSizeHint +func miqt_exec_callback_QTreeView_ViewportSizeHint(self *C.QTreeView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTreeView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTreeView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTreeView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SizeHintForColumn +func miqt_exec_callback_QTreeView_SizeHintForColumn(self *C.QTreeView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTreeView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTreeView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTreeView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_HorizontalScrollbarAction +func miqt_exec_callback_QTreeView_HorizontalScrollbarAction(self *C.QTreeView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTreeView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTreeView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTreeView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTreeView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTreeView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_IsIndexHidden +func miqt_exec_callback_QTreeView_IsIndexHidden(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTreeView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTreeView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTreeView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_CurrentChanged +func miqt_exec_callback_QTreeView_CurrentChanged(self *C.QTreeView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTreeView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QTreeView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QTreeView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QTreeView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SizeHintForRow +func miqt_exec_callback_QTreeView_SizeHintForRow(self *C.QTreeView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QTreeView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QTreeView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_InputMethodQuery +func miqt_exec_callback_QTreeView_InputMethodQuery(self *C.QTreeView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_UpdateEditorData() { + + C.QTreeView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnUpdateEditorData(slot func(super func())) { + C.QTreeView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_UpdateEditorData +func miqt_exec_callback_QTreeView_UpdateEditorData(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QTreeView) callVirtualBase_UpdateEditorGeometries() { + + C.QTreeView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnUpdateEditorGeometries(slot func(super func())) { + C.QTreeView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_UpdateEditorGeometries +func miqt_exec_callback_QTreeView_UpdateEditorGeometries(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QTreeView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QTreeView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTreeView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QTreeView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VerticalScrollbarAction +func miqt_exec_callback_QTreeView_VerticalScrollbarAction(self *C.QTreeView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTreeView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QTreeView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QTreeView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTreeView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTreeView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QTreeView_HorizontalScrollbarValueChanged(self *C.QTreeView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTreeView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QTreeView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QTreeView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QTreeView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QTreeView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_CloseEditor +func miqt_exec_callback_QTreeView_CloseEditor(self *C.QTreeView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QTreeView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_CommitData(editor *QWidget) { + + C.QTreeView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTreeView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QTreeView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_CommitData +func miqt_exec_callback_QTreeView_CommitData(self *C.QTreeView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QTreeView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QTreeView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTreeView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QTreeView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_EditorDestroyed +func miqt_exec_callback_QTreeView_EditorDestroyed(self *C.QTreeView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QTreeView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QTreeView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QTreeView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QTreeView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_Edit2 +func miqt_exec_callback_QTreeView_Edit2(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QTreeView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QTreeView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QTreeView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectionCommand +func miqt_exec_callback_QTreeView_SelectionCommand(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QTreeView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QTreeView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QTreeView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_StartDrag +func miqt_exec_callback_QTreeView_StartDrag(self *C.QTreeView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QTreeView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QTreeView_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QTreeView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ViewOptions +func miqt_exec_callback_QTreeView_ViewOptions(self *C.QTreeView, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTreeView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTreeView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTreeView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_FocusNextPrevChild +func miqt_exec_callback_QTreeView_FocusNextPrevChild(self *C.QTreeView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTreeView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTreeView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_Event +func miqt_exec_callback_QTreeView_Event(self *C.QTreeView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTreeView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTreeView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DragEnterEvent +func miqt_exec_callback_QTreeView_DragEnterEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTreeView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTreeView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DragLeaveEvent +func miqt_exec_callback_QTreeView_DragLeaveEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTreeView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTreeView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DropEvent +func miqt_exec_callback_QTreeView_DropEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTreeView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTreeView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_FocusInEvent +func miqt_exec_callback_QTreeView_FocusInEvent(self *C.QTreeView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTreeView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTreeView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_FocusOutEvent +func miqt_exec_callback_QTreeView_FocusOutEvent(self *C.QTreeView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QTreeView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QTreeView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ResizeEvent +func miqt_exec_callback_QTreeView_ResizeEvent(self *C.QTreeView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QTreeView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QTreeView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_InputMethodEvent +func miqt_exec_callback_QTreeView_InputMethodEvent(self *C.QTreeView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QTreeView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QTreeView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_EventFilter +func miqt_exec_callback_QTreeView_EventFilter(self *C.QTreeView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QTreeView) Delete() { - C.QTreeView_Delete(this.h) + C.QTreeView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtreeview.h b/qt/gen_qtreeview.h index feff4dfc..4929576c 100644 --- a/qt/gen_qtreeview.h +++ b/qt/gen_qtreeview.h @@ -16,28 +16,70 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QHeaderView; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QTreeView; +class QVariant; class QWidget; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QTreeView QTreeView; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTreeView* QTreeView_new(QWidget* parent); -QTreeView* QTreeView_new2(); +void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTreeView_MetaObject(const QTreeView* self); void* QTreeView_Metacast(QTreeView* self, const char* param1); struct miqt_string QTreeView_Tr(const char* s); @@ -86,13 +128,13 @@ void QTreeView_SetTreePosition(QTreeView* self, int logicalIndex); int QTreeView_TreePosition(const QTreeView* self); void QTreeView_KeyboardSearch(QTreeView* self, struct miqt_string search); QRect* QTreeView_VisualRect(const QTreeView* self, QModelIndex* index); -void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index); +void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index, int hint); QModelIndex* QTreeView_IndexAt(const QTreeView* self, QPoint* p); QModelIndex* QTreeView_IndexAbove(const QTreeView* self, QModelIndex* index); QModelIndex* QTreeView_IndexBelow(const QTreeView* self, QModelIndex* index); void QTreeView_DoItemsLayout(QTreeView* self); void QTreeView_Reset(QTreeView* self); -void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight); +void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); void QTreeView_SelectAll(QTreeView* self); void QTreeView_Expanded(QTreeView* self, QModelIndex* index); void QTreeView_connect_Expanded(QTreeView* self, intptr_t slot); @@ -109,14 +151,158 @@ void QTreeView_ExpandAll(QTreeView* self); void QTreeView_ExpandRecursively(QTreeView* self, QModelIndex* index); void QTreeView_CollapseAll(QTreeView* self); void QTreeView_ExpandToDepth(QTreeView* self, int depth); +void QTreeView_VerticalScrollbarValueChanged(QTreeView* self, int value); +void QTreeView_ScrollContentsBy(QTreeView* self, int dx, int dy); +void QTreeView_RowsInserted(QTreeView* self, QModelIndex* parent, int start, int end); +void QTreeView_RowsAboutToBeRemoved(QTreeView* self, QModelIndex* parent, int start, int end); +QModelIndex* QTreeView_MoveCursor(QTreeView* self, int cursorAction, int modifiers); +int QTreeView_HorizontalOffset(const QTreeView* self); +int QTreeView_VerticalOffset(const QTreeView* self); +void QTreeView_SetSelection(QTreeView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QTreeView_SelectedIndexes(const QTreeView* self); +void QTreeView_TimerEvent(QTreeView* self, QTimerEvent* event); +void QTreeView_PaintEvent(QTreeView* self, QPaintEvent* event); +void QTreeView_DrawRow(const QTreeView* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index); +void QTreeView_DrawBranches(const QTreeView* self, QPainter* painter, QRect* rect, QModelIndex* index); +void QTreeView_MousePressEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_MouseReleaseEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_MouseDoubleClickEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_MouseMoveEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_KeyPressEvent(QTreeView* self, QKeyEvent* event); +void QTreeView_DragMoveEvent(QTreeView* self, QDragMoveEvent* event); +bool QTreeView_ViewportEvent(QTreeView* self, QEvent* event); +void QTreeView_UpdateGeometries(QTreeView* self); +QSize* QTreeView_ViewportSizeHint(const QTreeView* self); +int QTreeView_SizeHintForColumn(const QTreeView* self, int column); +void QTreeView_HorizontalScrollbarAction(QTreeView* self, int action); +bool QTreeView_IsIndexHidden(const QTreeView* self, QModelIndex* index); +void QTreeView_CurrentChanged(QTreeView* self, QModelIndex* current, QModelIndex* previous); struct miqt_string QTreeView_Tr2(const char* s, const char* c); struct miqt_string QTreeView_Tr3(const char* s, const char* c, int n); struct miqt_string QTreeView_TrUtf82(const char* s, const char* c); struct miqt_string QTreeView_TrUtf83(const char* s, const char* c, int n); -void QTreeView_ScrollTo2(QTreeView* self, QModelIndex* index, int hint); -void QTreeView_DataChanged3(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); void QTreeView_ExpandRecursively2(QTreeView* self, QModelIndex* index, int depth); -void QTreeView_Delete(QTreeView* self); +void QTreeView_override_virtual_SetModel(void* self, intptr_t slot); +void QTreeView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QTreeView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTreeView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTreeView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTreeView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTreeView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QTreeView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QTreeView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTreeView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTreeView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTreeView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTreeView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTreeView_virtualbase_IndexAt(const void* self, QPoint* p); +void QTreeView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTreeView_virtualbase_DoItemsLayout(void* self); +void QTreeView_override_virtual_Reset(void* self, intptr_t slot); +void QTreeView_virtualbase_Reset(void* self); +void QTreeView_override_virtual_DataChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QTreeView_override_virtual_SelectAll(void* self, intptr_t slot); +void QTreeView_virtualbase_SelectAll(void* self); +void QTreeView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QTreeView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTreeView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTreeView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QTreeView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QTreeView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QTreeView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QTreeView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTreeView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTreeView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTreeView_virtualbase_HorizontalOffset(const void* self); +void QTreeView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTreeView_virtualbase_VerticalOffset(const void* self); +void QTreeView_override_virtual_SetSelection(void* self, intptr_t slot); +void QTreeView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTreeView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTreeView_virtualbase_SelectedIndexes(const void* self); +void QTreeView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTreeView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QTreeView_override_virtual_DrawRow(void* self, intptr_t slot); +void QTreeView_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index); +void QTreeView_override_virtual_DrawBranches(void* self, intptr_t slot); +void QTreeView_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index); +void QTreeView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTreeView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTreeView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTreeView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QTreeView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTreeView_virtualbase_UpdateGeometries(void* self); +void QTreeView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTreeView_virtualbase_ViewportSizeHint(const void* self); +void QTreeView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTreeView_virtualbase_SizeHintForColumn(const void* self, int column); +void QTreeView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTreeView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTreeView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTreeView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTreeView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTreeView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QTreeView_virtualbase_SizeHintForRow(const void* self, int row); +void QTreeView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTreeView_virtualbase_InputMethodQuery(const void* self, int query); +void QTreeView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QTreeView_virtualbase_UpdateEditorData(void* self); +void QTreeView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QTreeView_virtualbase_UpdateEditorGeometries(void* self); +void QTreeView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QTreeView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QTreeView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QTreeView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QTreeView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QTreeView_override_virtual_CommitData(void* self, intptr_t slot); +void QTreeView_virtualbase_CommitData(void* self, QWidget* editor); +void QTreeView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QTreeView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QTreeView_override_virtual_Edit2(void* self, intptr_t slot); +bool QTreeView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QTreeView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QTreeView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QTreeView_override_virtual_StartDrag(void* self, intptr_t slot); +void QTreeView_virtualbase_StartDrag(void* self, int supportedActions); +void QTreeView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QTreeView_virtualbase_ViewOptions(const void* self); +void QTreeView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTreeView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTreeView_override_virtual_Event(void* self, intptr_t slot); +bool QTreeView_virtualbase_Event(void* self, QEvent* event); +void QTreeView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTreeView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTreeView_override_virtual_DropEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTreeView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTreeView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTreeView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QTreeView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QTreeView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTreeView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QTreeView_Delete(QTreeView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtreewidget.cpp b/qt/gen_qtreewidget.cpp index 9e8bd917..192cbce7 100644 --- a/qt/gen_qtreewidget.cpp +++ b/qt/gen_qtreewidget.cpp @@ -1,17 +1,34 @@ +#include +#include #include #include #include +#include +#include +#include #include +#include #include #include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include @@ -20,11 +37,188 @@ #include "gen_qtreewidget.h" #include "_cgo_export.h" -QTreeWidgetItem* QTreeWidgetItem_new() { - return new QTreeWidgetItem(); +class MiqtVirtualQTreeWidgetItem : public virtual QTreeWidgetItem { +public: + + MiqtVirtualQTreeWidgetItem(): QTreeWidgetItem() {}; + MiqtVirtualQTreeWidgetItem(const QStringList& strings): QTreeWidgetItem(strings) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview): QTreeWidgetItem(treeview) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, const QStringList& strings): QTreeWidgetItem(treeview, strings) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, QTreeWidgetItem* after): QTreeWidgetItem(treeview, after) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent): QTreeWidgetItem(parent) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, const QStringList& strings): QTreeWidgetItem(parent, strings) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, QTreeWidgetItem* after): QTreeWidgetItem(parent, after) {}; + MiqtVirtualQTreeWidgetItem(const QTreeWidgetItem& other): QTreeWidgetItem(other) {}; + MiqtVirtualQTreeWidgetItem(int typeVal): QTreeWidgetItem(typeVal) {}; + MiqtVirtualQTreeWidgetItem(const QStringList& strings, int typeVal): QTreeWidgetItem(strings, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, int typeVal): QTreeWidgetItem(treeview, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, const QStringList& strings, int typeVal): QTreeWidgetItem(treeview, strings, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal): QTreeWidgetItem(treeview, after, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, int typeVal): QTreeWidgetItem(parent, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, const QStringList& strings, int typeVal): QTreeWidgetItem(parent, strings, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal): QTreeWidgetItem(parent, after, typeVal) {}; + + virtual ~MiqtVirtualQTreeWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTreeWidgetItem* clone() const override { + if (handle__Clone == 0) { + return QTreeWidgetItem::clone(); + } + + + QTreeWidgetItem* callback_return_value = miqt_exec_callback_QTreeWidgetItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTreeWidgetItem* virtualbase_Clone() const { + + return QTreeWidgetItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int column, int role) const override { + if (handle__Data == 0) { + return QTreeWidgetItem::data(column, role); + } + + int sigval1 = column; + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTreeWidgetItem_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int column, int role) const { + + return new QVariant(QTreeWidgetItem::data(static_cast(column), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(int column, int role, const QVariant& value) override { + if (handle__SetData == 0) { + QTreeWidgetItem::setData(column, role, value); + return; + } + + int sigval1 = column; + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + + miqt_exec_callback_QTreeWidgetItem_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(int column, int role, QVariant* value) { + + QTreeWidgetItem::setData(static_cast(column), static_cast(role), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QTreeWidgetItem& other) const override { + if (handle__OperatorLesser == 0) { + return QTreeWidgetItem::operator<(other); + } + + const QTreeWidgetItem& other_ret = other; + // Cast returned reference into pointer + QTreeWidgetItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QTreeWidgetItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QTreeWidgetItem* other) const { + + return QTreeWidgetItem::operator<(*other); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QTreeWidgetItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QTreeWidgetItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QTreeWidgetItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QTreeWidgetItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QTreeWidgetItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QTreeWidgetItem::write(*out); + + } + +}; + +void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings) { +void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -32,14 +226,16 @@ QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(strings_QList); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview) { - return new QTreeWidgetItem(treeview); +void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings) { +void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -47,18 +243,21 @@ QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array / QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(treeview, strings_QList); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after) { - return new QTreeWidgetItem(treeview, after); +void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent) { - return new QTreeWidgetItem(parent); +void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings) { +void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -66,22 +265,26 @@ QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(parent, strings_QList); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after) { - return new QTreeWidgetItem(parent, after); +void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other) { - return new QTreeWidgetItem(*other); +void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(*other); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal) { - return new QTreeWidgetItem(static_cast(typeVal)); +void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal) { +void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -89,14 +292,16 @@ QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_strin QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(strings_QList, static_cast(typeVal)); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal) { - return new QTreeWidgetItem(treeview, static_cast(typeVal)); +void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { +void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -104,18 +309,21 @@ QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal) { - return new QTreeWidgetItem(treeview, after, static_cast(typeVal)); +void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal) { - return new QTreeWidgetItem(parent, static_cast(typeVal)); +void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { +void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -123,11 +331,13 @@ QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_arra QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal) { - return new QTreeWidgetItem(parent, after, static_cast(typeVal)); +void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self) { @@ -333,117 +543,1310 @@ void QTreeWidgetItem_SetSizeHint(QTreeWidgetItem* self, int column, QSize* size) self->setSizeHint(static_cast(column), *size); } -QVariant* QTreeWidgetItem_Data(const QTreeWidgetItem* self, int column, int role) { - return new QVariant(self->data(static_cast(column), static_cast(role))); -} +QVariant* QTreeWidgetItem_Data(const QTreeWidgetItem* self, int column, int role) { + return new QVariant(self->data(static_cast(column), static_cast(role))); +} + +void QTreeWidgetItem_SetData(QTreeWidgetItem* self, int column, int role, QVariant* value) { + self->setData(static_cast(column), static_cast(role), *value); +} + +bool QTreeWidgetItem_OperatorLesser(const QTreeWidgetItem* self, QTreeWidgetItem* other) { + return self->operator<(*other); +} + +void QTreeWidgetItem_Read(QTreeWidgetItem* self, QDataStream* in) { + self->read(*in); +} + +void QTreeWidgetItem_Write(const QTreeWidgetItem* self, QDataStream* out) { + self->write(*out); +} + +void QTreeWidgetItem_OperatorAssign(QTreeWidgetItem* self, QTreeWidgetItem* other) { + self->operator=(*other); +} + +QTreeWidgetItem* QTreeWidgetItem_Parent(const QTreeWidgetItem* self) { + return self->parent(); +} + +QTreeWidgetItem* QTreeWidgetItem_Child(const QTreeWidgetItem* self, int index) { + return self->child(static_cast(index)); +} + +int QTreeWidgetItem_ChildCount(const QTreeWidgetItem* self) { + return self->childCount(); +} + +int QTreeWidgetItem_ColumnCount(const QTreeWidgetItem* self) { + return self->columnCount(); +} + +int QTreeWidgetItem_IndexOfChild(const QTreeWidgetItem* self, QTreeWidgetItem* child) { + return self->indexOfChild(child); +} + +void QTreeWidgetItem_AddChild(QTreeWidgetItem* self, QTreeWidgetItem* child) { + self->addChild(child); +} + +void QTreeWidgetItem_InsertChild(QTreeWidgetItem* self, int index, QTreeWidgetItem* child) { + self->insertChild(static_cast(index), child); +} + +void QTreeWidgetItem_RemoveChild(QTreeWidgetItem* self, QTreeWidgetItem* child) { + self->removeChild(child); +} + +QTreeWidgetItem* QTreeWidgetItem_TakeChild(QTreeWidgetItem* self, int index) { + return self->takeChild(static_cast(index)); +} + +void QTreeWidgetItem_AddChildren(QTreeWidgetItem* self, struct miqt_array /* of QTreeWidgetItem* */ children) { + QList children_QList; + children_QList.reserve(children.len); + QTreeWidgetItem** children_arr = static_cast(children.data); + for(size_t i = 0; i < children.len; ++i) { + children_QList.push_back(children_arr[i]); + } + self->addChildren(children_QList); +} + +void QTreeWidgetItem_InsertChildren(QTreeWidgetItem* self, int index, struct miqt_array /* of QTreeWidgetItem* */ children) { + QList children_QList; + children_QList.reserve(children.len); + QTreeWidgetItem** children_arr = static_cast(children.data); + for(size_t i = 0; i < children.len; ++i) { + children_QList.push_back(children_arr[i]); + } + self->insertChildren(static_cast(index), children_QList); +} + +struct miqt_array /* of QTreeWidgetItem* */ QTreeWidgetItem_TakeChildren(QTreeWidgetItem* self) { + QList _ret = self->takeChildren(); + // Convert QList<> from C++ memory to manually-managed C memory + QTreeWidgetItem** _arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +int QTreeWidgetItem_Type(const QTreeWidgetItem* self) { + return self->type(); +} + +void QTreeWidgetItem_SortChildren(QTreeWidgetItem* self, int column, int order) { + self->sortChildren(static_cast(column), static_cast(order)); +} + +void QTreeWidgetItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Clone = slot; +} + +QTreeWidgetItem* QTreeWidgetItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Clone(); +} + +void QTreeWidgetItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Data = slot; +} + +QVariant* QTreeWidgetItem_virtualbase_Data(const void* self, int column, int role) { + return ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Data(column, role); +} + +void QTreeWidgetItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__SetData = slot; +} + +void QTreeWidgetItem_virtualbase_SetData(void* self, int column, int role, QVariant* value) { + ( (MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_SetData(column, role, value); +} + +void QTreeWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__OperatorLesser = slot; +} + +bool QTreeWidgetItem_virtualbase_OperatorLesser(const void* self, QTreeWidgetItem* other) { + return ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_OperatorLesser(other); +} + +void QTreeWidgetItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Read = slot; +} + +void QTreeWidgetItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Read(in); +} + +void QTreeWidgetItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Write = slot; +} + +void QTreeWidgetItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Write(out); +} + +void QTreeWidgetItem_Delete(QTreeWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQTreeWidget : public virtual QTreeWidget { +public: + + MiqtVirtualQTreeWidget(QWidget* parent): QTreeWidget(parent) {}; + MiqtVirtualQTreeWidget(): QTreeWidget() {}; + + virtual ~MiqtVirtualQTreeWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTreeWidget::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTreeWidget_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTreeWidget::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTreeWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTreeWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTreeWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QTreeWidget::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QTreeWidget_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QTreeWidget::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QList items) const override { + if (handle__MimeData == 0) { + return QTreeWidget::mimeData(items); + } + + const QList items_ret = items; + // Convert QList<> from C++ memory to manually-managed C memory + QTreeWidgetItem** items_arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * items_ret.length())); + for (size_t i = 0, e = items_ret.length(); i < e; ++i) { + items_arr[i] = items_ret[i]; + } + struct miqt_array items_out; + items_out.len = items_ret.length(); + items_out.data = static_cast(items_arr); + struct miqt_array /* of QTreeWidgetItem* */ sigval1 = items_out; + + QMimeData* callback_return_value = miqt_exec_callback_QTreeWidget_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QTreeWidgetItem* */ items) const { + QList items_QList; + items_QList.reserve(items.len); + QTreeWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + + return QTreeWidget::mimeData(items_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(QTreeWidgetItem* parent, int index, const QMimeData* data, Qt::DropAction action) override { + if (handle__DropMimeData == 0) { + return QTreeWidget::dropMimeData(parent, index, data, action); + } + + QTreeWidgetItem* sigval1 = parent; + int sigval2 = index; + QMimeData* sigval3 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval4 = static_cast(action_ret); + + bool callback_return_value = miqt_exec_callback_QTreeWidget_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QTreeWidgetItem* parent, int index, QMimeData* data, int action) { + + return QTreeWidget::dropMimeData(parent, static_cast(index), data, static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QTreeWidget::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QTreeWidget_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QTreeWidget::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTreeWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTreeWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTreeWidget::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTreeWidget_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTreeWidget::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QTreeWidget::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QTreeWidget_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QTreeWidget::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTreeWidget::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTreeWidget_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTreeWidget::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTreeWidget::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTreeWidget_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTreeWidget::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTreeWidget::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeWidget_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTreeWidget::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTreeWidget::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTreeWidget_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTreeWidget::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QTreeWidget::reset(); + return; + } + + + miqt_exec_callback_QTreeWidget_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QTreeWidget::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QTreeWidget::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QTreeWidget_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QTreeWidget::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QTreeWidget::selectAll(); + return; + } + + + miqt_exec_callback_QTreeWidget_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QTreeWidget::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QTreeWidget::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTreeWidget_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QTreeWidget::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTreeWidget::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTreeWidget_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTreeWidget::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QTreeWidget::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeWidget_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QTreeWidget::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QTreeWidget::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeWidget_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QTreeWidget::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTreeWidget::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeWidget_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTreeWidget::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTreeWidget::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeWidget_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTreeWidget::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTreeWidget::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeWidget_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTreeWidget::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTreeWidget::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTreeWidget_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTreeWidget::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTreeWidget::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTreeWidget_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTreeWidget::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTreeWidget::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTreeWidget::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QTreeWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QTreeWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRow = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const override { + if (handle__DrawRow == 0) { + QTreeWidget::drawRow(painter, options, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& options_ret = options; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&options_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeWidget_DrawRow(const_cast(this), handle__DrawRow, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRow(QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) const { + + QTreeWidget::drawRow(painter, *options, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBranches = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const override { + if (handle__DrawBranches == 0) { + QTreeWidget::drawBranches(painter, rect, index); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeWidget_DrawBranches(const_cast(this), handle__DrawBranches, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBranches(QPainter* painter, QRect* rect, QModelIndex* index) const { + + QTreeWidget::drawBranches(painter, *rect, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTreeWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTreeWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTreeWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTreeWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTreeWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTreeWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTreeWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTreeWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTreeWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTreeWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTreeWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTreeWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QTreeWidget::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTreeWidget_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QTreeWidget::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTreeWidget::updateGeometries(); + return; + } + + + miqt_exec_callback_QTreeWidget_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTreeWidget::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTreeWidget::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTreeWidget_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTreeWidget::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTreeWidget::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTreeWidget_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); -void QTreeWidgetItem_SetData(QTreeWidgetItem* self, int column, int role, QVariant* value) { - self->setData(static_cast(column), static_cast(role), *value); -} + return static_cast(callback_return_value); + } -bool QTreeWidgetItem_OperatorLesser(const QTreeWidgetItem* self, QTreeWidgetItem* other) { - return self->operator<(*other); -} + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { -void QTreeWidgetItem_Read(QTreeWidgetItem* self, QDataStream* in) { - self->read(*in); -} + return QTreeWidget::sizeHintForColumn(static_cast(column)); -void QTreeWidgetItem_Write(const QTreeWidgetItem* self, QDataStream* out) { - self->write(*out); -} + } -void QTreeWidgetItem_OperatorAssign(QTreeWidgetItem* self, QTreeWidgetItem* other) { - self->operator=(*other); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; -QTreeWidgetItem* QTreeWidgetItem_Parent(const QTreeWidgetItem* self) { - return self->parent(); -} + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTreeWidget::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; -QTreeWidgetItem* QTreeWidgetItem_Child(const QTreeWidgetItem* self, int index) { - return self->child(static_cast(index)); -} + miqt_exec_callback_QTreeWidget_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); -int QTreeWidgetItem_ChildCount(const QTreeWidgetItem* self) { - return self->childCount(); -} + + } -int QTreeWidgetItem_ColumnCount(const QTreeWidgetItem* self) { - return self->columnCount(); -} + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { -int QTreeWidgetItem_IndexOfChild(const QTreeWidgetItem* self, QTreeWidgetItem* child) { - return self->indexOfChild(child); -} + QTreeWidget::horizontalScrollbarAction(static_cast(action)); -void QTreeWidgetItem_AddChild(QTreeWidgetItem* self, QTreeWidgetItem* child) { - self->addChild(child); -} + } -void QTreeWidgetItem_InsertChild(QTreeWidgetItem* self, int index, QTreeWidgetItem* child) { - self->insertChild(static_cast(index), child); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; -void QTreeWidgetItem_RemoveChild(QTreeWidgetItem* self, QTreeWidgetItem* child) { - self->removeChild(child); -} + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTreeWidget::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); -QTreeWidgetItem* QTreeWidgetItem_TakeChild(QTreeWidgetItem* self, int index) { - return self->takeChild(static_cast(index)); -} + bool callback_return_value = miqt_exec_callback_QTreeWidget_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); -void QTreeWidgetItem_AddChildren(QTreeWidgetItem* self, struct miqt_array /* of QTreeWidgetItem* */ children) { - QList children_QList; - children_QList.reserve(children.len); - QTreeWidgetItem** children_arr = static_cast(children.data); - for(size_t i = 0; i < children.len; ++i) { - children_QList.push_back(children_arr[i]); + return callback_return_value; } - self->addChildren(children_QList); -} -void QTreeWidgetItem_InsertChildren(QTreeWidgetItem* self, int index, struct miqt_array /* of QTreeWidgetItem* */ children) { - QList children_QList; - children_QList.reserve(children.len); - QTreeWidgetItem** children_arr = static_cast(children.data); - for(size_t i = 0; i < children.len; ++i) { - children_QList.push_back(children_arr[i]); + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTreeWidget::isIndexHidden(*index); + } - self->insertChildren(static_cast(index), children_QList); -} -struct miqt_array /* of QTreeWidgetItem* */ QTreeWidgetItem_TakeChildren(QTreeWidgetItem* self) { - QList _ret = self->takeChildren(); - // Convert QList<> from C++ memory to manually-managed C memory - QTreeWidgetItem** _arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTreeWidget::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTreeWidget_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} -int QTreeWidgetItem_Type(const QTreeWidgetItem* self) { - return self->type(); -} + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { -void QTreeWidgetItem_SortChildren(QTreeWidgetItem* self, int column, int order) { - self->sortChildren(static_cast(column), static_cast(order)); -} + QTreeWidget::currentChanged(*current, *previous); -void QTreeWidgetItem_Delete(QTreeWidgetItem* self) { - delete self; -} + } -QTreeWidget* QTreeWidget_new(QWidget* parent) { - return new QTreeWidget(parent); +}; + +void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(parent); + *outptr_QTreeWidget = ret; + *outptr_QTreeView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTreeWidget* QTreeWidget_new2() { - return new QTreeWidget(); +void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(); + *outptr_QTreeWidget = ret; + *outptr_QTreeView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self) { @@ -716,7 +2119,7 @@ void QTreeWidget_ItemPressed(QTreeWidget* self, QTreeWidgetItem* item, int colum } void QTreeWidget_connect_ItemPressed(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemPressed), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemPressed), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemPressed(slot, sigval1, sigval2); @@ -728,7 +2131,7 @@ void QTreeWidget_ItemClicked(QTreeWidget* self, QTreeWidgetItem* item, int colum } void QTreeWidget_connect_ItemClicked(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemClicked), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemClicked), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemClicked(slot, sigval1, sigval2); @@ -740,7 +2143,7 @@ void QTreeWidget_ItemDoubleClicked(QTreeWidget* self, QTreeWidgetItem* item, int } void QTreeWidget_connect_ItemDoubleClicked(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemDoubleClicked), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemDoubleClicked), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemDoubleClicked(slot, sigval1, sigval2); @@ -752,7 +2155,7 @@ void QTreeWidget_ItemActivated(QTreeWidget* self, QTreeWidgetItem* item, int col } void QTreeWidget_connect_ItemActivated(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemActivated), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemActivated), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemActivated(slot, sigval1, sigval2); @@ -764,7 +2167,7 @@ void QTreeWidget_ItemEntered(QTreeWidget* self, QTreeWidgetItem* item, int colum } void QTreeWidget_connect_ItemEntered(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemEntered), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemEntered), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemEntered(slot, sigval1, sigval2); @@ -776,7 +2179,7 @@ void QTreeWidget_ItemChanged(QTreeWidget* self, QTreeWidgetItem* item, int colum } void QTreeWidget_connect_ItemChanged(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemChanged), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemChanged), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemChanged(slot, sigval1, sigval2); @@ -788,7 +2191,7 @@ void QTreeWidget_ItemExpanded(QTreeWidget* self, QTreeWidgetItem* item) { } void QTreeWidget_connect_ItemExpanded(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemExpanded), self, [=](QTreeWidgetItem* item) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemExpanded), self, [=](QTreeWidgetItem* item) { QTreeWidgetItem* sigval1 = item; miqt_exec_callback_QTreeWidget_ItemExpanded(slot, sigval1); }); @@ -799,7 +2202,7 @@ void QTreeWidget_ItemCollapsed(QTreeWidget* self, QTreeWidgetItem* item) { } void QTreeWidget_connect_ItemCollapsed(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemCollapsed), self, [=](QTreeWidgetItem* item) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemCollapsed), self, [=](QTreeWidgetItem* item) { QTreeWidgetItem* sigval1 = item; miqt_exec_callback_QTreeWidget_ItemCollapsed(slot, sigval1); }); @@ -810,7 +2213,7 @@ void QTreeWidget_CurrentItemChanged(QTreeWidget* self, QTreeWidgetItem* current, } void QTreeWidget_connect_CurrentItemChanged(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::currentItemChanged), self, [=](QTreeWidgetItem* current, QTreeWidgetItem* previous) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::currentItemChanged), self, [=](QTreeWidgetItem* current, QTreeWidgetItem* previous) { QTreeWidgetItem* sigval1 = current; QTreeWidgetItem* sigval2 = previous; miqt_exec_callback_QTreeWidget_CurrentItemChanged(slot, sigval1, sigval2); @@ -822,7 +2225,7 @@ void QTreeWidget_ItemSelectionChanged(QTreeWidget* self) { } void QTreeWidget_connect_ItemSelectionChanged(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemSelectionChanged), self, [=]() { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemSelectionChanged), self, [=]() { miqt_exec_callback_QTreeWidget_ItemSelectionChanged(slot); }); } @@ -905,7 +2308,347 @@ void QTreeWidget_ScrollToItem2(QTreeWidget* self, QTreeWidgetItem* item, int hin self->scrollToItem(item, static_cast(hint)); } -void QTreeWidget_Delete(QTreeWidget* self) { - delete self; +void QTreeWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SetSelectionModel = slot; +} + +void QTreeWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTreeWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__Event = slot; +} + +bool QTreeWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_Event(e); +} + +void QTreeWidget_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QTreeWidget_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_MimeTypes(); +} + +void QTreeWidget_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MimeData = slot; +} + +QMimeData* QTreeWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTreeWidgetItem* */ items) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_MimeData(items); +} + +void QTreeWidget_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DropMimeData = slot; +} + +bool QTreeWidget_virtualbase_DropMimeData(void* self, QTreeWidgetItem* parent, int index, QMimeData* data, int action) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DropMimeData(parent, index, data, action); +} + +void QTreeWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SupportedDropActions = slot; +} + +int QTreeWidget_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_SupportedDropActions(); +} + +void QTreeWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DropEvent = slot; +} + +void QTreeWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QTreeWidget_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SetRootIndex = slot; +} + +void QTreeWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTreeWidget_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__KeyboardSearch = slot; +} + +void QTreeWidget_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QTreeWidget_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VisualRect = slot; +} + +QRect* QTreeWidget_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_VisualRect(index); +} + +void QTreeWidget_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ScrollTo = slot; +} + +void QTreeWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTreeWidget_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTreeWidget_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_IndexAt(p); +} + +void QTreeWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DoItemsLayout = slot; +} + +void QTreeWidget_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTreeWidget_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__Reset = slot; +} + +void QTreeWidget_virtualbase_Reset(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_Reset(); +} + +void QTreeWidget_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DataChanged = slot; +} + +void QTreeWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QTreeWidget_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SelectAll = slot; +} + +void QTreeWidget_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SelectAll(); +} + +void QTreeWidget_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QTreeWidget_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QTreeWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTreeWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTreeWidget_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__RowsInserted = slot; +} + +void QTreeWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QTreeWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QTreeWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QTreeWidget_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QTreeWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QTreeWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__HorizontalOffset = slot; +} + +int QTreeWidget_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_HorizontalOffset(); +} + +void QTreeWidget_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VerticalOffset = slot; +} + +int QTreeWidget_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_VerticalOffset(); +} + +void QTreeWidget_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SetSelection = slot; +} + +void QTreeWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QTreeWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QTreeWidget_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_SelectedIndexes(); +} + +void QTreeWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__TimerEvent = slot; +} + +void QTreeWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_TimerEvent(event); +} + +void QTreeWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__PaintEvent = slot; +} + +void QTreeWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QTreeWidget_override_virtual_DrawRow(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DrawRow = slot; +} + +void QTreeWidget_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) { + ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_DrawRow(painter, options, index); +} + +void QTreeWidget_override_virtual_DrawBranches(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DrawBranches = slot; +} + +void QTreeWidget_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index) { + ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_DrawBranches(painter, rect, index); +} + +void QTreeWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QTreeWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTreeWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTreeWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QTreeWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTreeWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTreeWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTreeWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QTreeWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QTreeWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QTreeWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QTreeWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTreeWidget_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ViewportEvent = slot; +} + +bool QTreeWidget_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ViewportEvent(event); +} + +void QTreeWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__UpdateGeometries = slot; +} + +void QTreeWidget_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_UpdateGeometries(); +} + +void QTreeWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTreeWidget_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTreeWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SizeHintForColumn = slot; +} + +int QTreeWidget_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QTreeWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QTreeWidget_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QTreeWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__IsIndexHidden = slot; +} + +bool QTreeWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QTreeWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__CurrentChanged = slot; +} + +void QTreeWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QTreeWidget_Delete(QTreeWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtreewidget.go b/qt/gen_qtreewidget.go index ec0198d6..2945ab72 100644 --- a/qt/gen_qtreewidget.go +++ b/qt/gen_qtreewidget.go @@ -30,7 +30,8 @@ const ( ) type QTreeWidgetItem struct { - h *C.QTreeWidgetItem + h *C.QTreeWidgetItem + isSubclass bool } func (this *QTreeWidgetItem) cPointer() *C.QTreeWidgetItem { @@ -47,6 +48,7 @@ func (this *QTreeWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTreeWidgetItem constructs the type using only CGO pointers. func newQTreeWidgetItem(h *C.QTreeWidgetItem) *QTreeWidgetItem { if h == nil { return nil @@ -54,14 +56,23 @@ func newQTreeWidgetItem(h *C.QTreeWidgetItem) *QTreeWidgetItem { return &QTreeWidgetItem{h: h} } +// UnsafeNewQTreeWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItem(h unsafe.Pointer) *QTreeWidgetItem { - return newQTreeWidgetItem((*C.QTreeWidgetItem)(h)) + if h == nil { + return nil + } + + return &QTreeWidgetItem{h: (*C.QTreeWidgetItem)(h)} } // NewQTreeWidgetItem constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem() *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new() - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new(&outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem2 constructs a new QTreeWidgetItem object. @@ -76,14 +87,22 @@ func NewQTreeWidgetItem2(strings []string) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new2(strings_ma) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new2(strings_ma, &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem3 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem3(treeview *QTreeWidget) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new3(treeview.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new3(treeview.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem4 constructs a new QTreeWidgetItem object. @@ -98,20 +117,32 @@ func NewQTreeWidgetItem4(treeview *QTreeWidget, strings []string) *QTreeWidgetIt strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma, &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem5 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem5(treeview *QTreeWidget, after *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem6 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem6(parent *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new6(parent.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new6(parent.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem7 constructs a new QTreeWidgetItem object. @@ -126,26 +157,42 @@ func NewQTreeWidgetItem7(parent *QTreeWidgetItem, strings []string) *QTreeWidget strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma, &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem8 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem8(parent *QTreeWidgetItem, after *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem9 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem9(other *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new9(other.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new9(other.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem10 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem10(typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new10((C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new10((C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem11 constructs a new QTreeWidgetItem object. @@ -160,14 +207,22 @@ func NewQTreeWidgetItem11(strings []string, typeVal int) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem12 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem12(treeview *QTreeWidget, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem13 constructs a new QTreeWidgetItem object. @@ -182,20 +237,32 @@ func NewQTreeWidgetItem13(treeview *QTreeWidget, strings []string, typeVal int) strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem14 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem14(treeview *QTreeWidget, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem15 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem15(parent *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem16 constructs a new QTreeWidgetItem object. @@ -210,14 +277,22 @@ func NewQTreeWidgetItem16(parent *QTreeWidgetItem, strings []string, typeVal int strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem17 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem17(parent *QTreeWidgetItem, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } func (this *QTreeWidgetItem) Clone() *QTreeWidgetItem { @@ -225,7 +300,7 @@ func (this *QTreeWidgetItem) Clone() *QTreeWidgetItem { } func (this *QTreeWidgetItem) TreeWidget() *QTreeWidget { - return UnsafeNewQTreeWidget(unsafe.Pointer(C.QTreeWidgetItem_TreeWidget(this.h))) + return UnsafeNewQTreeWidget(unsafe.Pointer(C.QTreeWidgetItem_TreeWidget(this.h)), nil, nil, nil, nil, nil, nil, nil) } func (this *QTreeWidgetItem) SetSelected(selectVal bool) { @@ -538,9 +613,158 @@ func (this *QTreeWidgetItem) SortChildren(column int, order SortOrder) { C.QTreeWidgetItem_SortChildren(this.h, (C.int)(column), (C.int)(order)) } +func (this *QTreeWidgetItem) callVirtualBase_Clone() *QTreeWidgetItem { + + return UnsafeNewQTreeWidgetItem(unsafe.Pointer(C.QTreeWidgetItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QTreeWidgetItem) OnClone(slot func(super func() *QTreeWidgetItem) *QTreeWidgetItem) { + C.QTreeWidgetItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Clone +func miqt_exec_callback_QTreeWidgetItem_Clone(self *C.QTreeWidgetItem, cb C.intptr_t) *C.QTreeWidgetItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTreeWidgetItem) *QTreeWidgetItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidgetItem) callVirtualBase_Data(column int, role int) *QVariant { + + _ret := C.QTreeWidgetItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(column), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidgetItem) OnData(slot func(super func(column int, role int) *QVariant, column int, role int) *QVariant) { + C.QTreeWidgetItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Data +func miqt_exec_callback_QTreeWidgetItem_Data(self *C.QTreeWidgetItem, cb C.intptr_t, column C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, role int) *QVariant, column int, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(role) + + virtualReturn := gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidgetItem) callVirtualBase_SetData(column int, role int, value *QVariant) { + + C.QTreeWidgetItem_virtualbase_SetData(unsafe.Pointer(this.h), (C.int)(column), (C.int)(role), value.cPointer()) + +} +func (this *QTreeWidgetItem) OnSetData(slot func(super func(column int, role int, value *QVariant), column int, role int, value *QVariant)) { + C.QTreeWidgetItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_SetData +func miqt_exec_callback_QTreeWidgetItem_SetData(self *C.QTreeWidgetItem, cb C.intptr_t, column C.int, role C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, role int, value *QVariant), column int, role int, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidgetItem) callVirtualBase_OperatorLesser(other *QTreeWidgetItem) bool { + + return (bool)(C.QTreeWidgetItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QTreeWidgetItem) OnOperatorLesser(slot func(super func(other *QTreeWidgetItem) bool, other *QTreeWidgetItem) bool) { + C.QTreeWidgetItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_OperatorLesser +func miqt_exec_callback_QTreeWidgetItem_OperatorLesser(self *C.QTreeWidgetItem, cb C.intptr_t, other *C.QTreeWidgetItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QTreeWidgetItem) bool, other *QTreeWidgetItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTreeWidgetItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidgetItem) callVirtualBase_Read(in *QDataStream) { + + C.QTreeWidgetItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QTreeWidgetItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QTreeWidgetItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Read +func miqt_exec_callback_QTreeWidgetItem_Read(self *C.QTreeWidgetItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in)) + + gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QTreeWidgetItem) callVirtualBase_Write(out *QDataStream) { + + C.QTreeWidgetItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QTreeWidgetItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QTreeWidgetItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Write +func miqt_exec_callback_QTreeWidgetItem_Write(self *C.QTreeWidgetItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out)) + + gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Write, slotval1) + +} + // Delete this object from C++ memory. func (this *QTreeWidgetItem) Delete() { - C.QTreeWidgetItem_Delete(this.h) + C.QTreeWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -553,7 +777,8 @@ func (this *QTreeWidgetItem) GoGC() { } type QTreeWidget struct { - h *C.QTreeWidget + h *C.QTreeWidget + isSubclass bool *QTreeView } @@ -571,27 +796,57 @@ func (this *QTreeWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTreeWidget(h *C.QTreeWidget) *QTreeWidget { +// newQTreeWidget constructs the type using only CGO pointers. +func newQTreeWidget(h *C.QTreeWidget, h_QTreeView *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeWidget { if h == nil { return nil } - return &QTreeWidget{h: h, QTreeView: UnsafeNewQTreeView(unsafe.Pointer(h))} + return &QTreeWidget{h: h, + QTreeView: newQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTreeWidget(h unsafe.Pointer) *QTreeWidget { - return newQTreeWidget((*C.QTreeWidget)(h)) +// UnsafeNewQTreeWidget constructs the type using only unsafe pointers. +func UnsafeNewQTreeWidget(h unsafe.Pointer, h_QTreeView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeWidget { + if h == nil { + return nil + } + + return &QTreeWidget{h: (*C.QTreeWidget)(h), + QTreeView: UnsafeNewQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTreeWidget constructs a new QTreeWidget object. func NewQTreeWidget(parent *QWidget) *QTreeWidget { - ret := C.QTreeWidget_new(parent.cPointer()) - return newQTreeWidget(ret) + var outptr_QTreeWidget *C.QTreeWidget = nil + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeWidget_new(parent.cPointer(), &outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTreeWidget2 constructs a new QTreeWidget object. func NewQTreeWidget2() *QTreeWidget { - ret := C.QTreeWidget_new2() - return newQTreeWidget(ret) + var outptr_QTreeWidget *C.QTreeWidget = nil + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeWidget_new2(&outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTreeWidget) MetaObject() *QMetaObject { @@ -768,7 +1023,7 @@ func (this *QTreeWidget) IsPersistentEditorOpen(item *QTreeWidgetItem) bool { } func (this *QTreeWidget) ItemWidget(item *QTreeWidgetItem, column int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column))), nil, nil) } func (this *QTreeWidget) SetItemWidget(item *QTreeWidgetItem, column int, widget *QWidget) { @@ -1145,9 +1400,1074 @@ func (this *QTreeWidget) ScrollToItem2(item *QTreeWidgetItem, hint QAbstractItem C.QTreeWidget_ScrollToItem2(this.h, item.cPointer(), (C.int)(hint)) } +func (this *QTreeWidget) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTreeWidget_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTreeWidget) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTreeWidget_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SetSelectionModel +func miqt_exec_callback_QTreeWidget_SetSelectionModel(self *C.QTreeWidget, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTreeWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTreeWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTreeWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_Event +func miqt_exec_callback_QTreeWidget_Event(self *C.QTreeWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QTreeWidget_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QTreeWidget) OnMimeTypes(slot func(super func() []string) []string) { + C.QTreeWidget_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MimeTypes +func miqt_exec_callback_QTreeWidget_MimeTypes(self *C.QTreeWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTreeWidget) callVirtualBase_MimeData(items []*QTreeWidgetItem) *QMimeData { + items_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.size_t(8 * len(items)))) + defer C.free(unsafe.Pointer(items_CArray)) + for i := range items { + items_CArray[i] = items[i].cPointer() + } + items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTreeWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)), nil) +} +func (this *QTreeWidget) OnMimeData(slot func(super func(items []*QTreeWidgetItem) *QMimeData, items []*QTreeWidgetItem) *QMimeData) { + C.QTreeWidget_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MimeData +func miqt_exec_callback_QTreeWidget_MimeData(self *C.QTreeWidget, cb C.intptr_t, items C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(items []*QTreeWidgetItem) *QMimeData, items []*QTreeWidgetItem) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var items_ma C.struct_miqt_array = items + items_ret := make([]*QTreeWidgetItem, int(items_ma.len)) + items_outCast := (*[0xffff]*C.QTreeWidgetItem)(unsafe.Pointer(items_ma.data)) // hey ya + for i := 0; i < int(items_ma.len); i++ { + items_ret[i] = UnsafeNewQTreeWidgetItem(unsafe.Pointer(items_outCast[i])) + } + slotval1 := items_ret + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_DropMimeData(parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool { + + return (bool)(C.QTreeWidget_virtualbase_DropMimeData(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(index), data.cPointer(), (C.int)(action))) + +} +func (this *QTreeWidget) OnDropMimeData(slot func(super func(parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool, parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool) { + C.QTreeWidget_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DropMimeData +func miqt_exec_callback_QTreeWidget_DropMimeData(self *C.QTreeWidget, cb C.intptr_t, parent *C.QTreeWidgetItem, index C.int, data *C.QMimeData, action C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool, parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTreeWidgetItem(unsafe.Pointer(parent)) + slotval2 := (int)(index) + + slotval3 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval4 := (DropAction)(action) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QTreeWidget_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QTreeWidget) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QTreeWidget_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SupportedDropActions +func miqt_exec_callback_QTreeWidget_SupportedDropActions(self *C.QTreeWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTreeWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTreeWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DropEvent +func miqt_exec_callback_QTreeWidget_DropEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTreeWidget_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTreeWidget) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTreeWidget_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SetRootIndex +func miqt_exec_callback_QTreeWidget_SetRootIndex(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QTreeWidget_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QTreeWidget) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QTreeWidget_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_KeyboardSearch +func miqt_exec_callback_QTreeWidget_KeyboardSearch(self *C.QTreeWidget, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QTreeWidget{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTreeWidget_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTreeWidget_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VisualRect +func miqt_exec_callback_QTreeWidget_VisualRect(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTreeWidget_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTreeWidget) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTreeWidget_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ScrollTo +func miqt_exec_callback_QTreeWidget_ScrollTo(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTreeWidget) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTreeWidget_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTreeWidget_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_IndexAt +func miqt_exec_callback_QTreeWidget_IndexAt(self *C.QTreeWidget, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_DoItemsLayout() { + + C.QTreeWidget_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnDoItemsLayout(slot func(super func())) { + C.QTreeWidget_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DoItemsLayout +func miqt_exec_callback_QTreeWidget_DoItemsLayout(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTreeWidget) callVirtualBase_Reset() { + + C.QTreeWidget_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnReset(slot func(super func())) { + C.QTreeWidget_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_Reset +func miqt_exec_callback_QTreeWidget_Reset(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_Reset) + +} + +func (this *QTreeWidget) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QTreeWidget_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QTreeWidget) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QTreeWidget_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DataChanged +func miqt_exec_callback_QTreeWidget_DataChanged(self *C.QTreeWidget, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_SelectAll() { + + C.QTreeWidget_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnSelectAll(slot func(super func())) { + C.QTreeWidget_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SelectAll +func miqt_exec_callback_QTreeWidget_SelectAll(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QTreeWidget) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QTreeWidget_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTreeWidget) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTreeWidget_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VerticalScrollbarValueChanged +func miqt_exec_callback_QTreeWidget_VerticalScrollbarValueChanged(self *C.QTreeWidget, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTreeWidget_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTreeWidget) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTreeWidget_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ScrollContentsBy +func miqt_exec_callback_QTreeWidget_ScrollContentsBy(self *C.QTreeWidget, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTreeWidget) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QTreeWidget_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeWidget) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeWidget_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_RowsInserted +func miqt_exec_callback_QTreeWidget_RowsInserted(self *C.QTreeWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QTreeWidget_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeWidget) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeWidget_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_RowsAboutToBeRemoved +func miqt_exec_callback_QTreeWidget_RowsAboutToBeRemoved(self *C.QTreeWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTreeWidget_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTreeWidget_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MoveCursor +func miqt_exec_callback_QTreeWidget_MoveCursor(self *C.QTreeWidget, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTreeWidget_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeWidget) OnHorizontalOffset(slot func(super func() int) int) { + C.QTreeWidget_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_HorizontalOffset +func miqt_exec_callback_QTreeWidget_HorizontalOffset(self *C.QTreeWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTreeWidget_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeWidget) OnVerticalOffset(slot func(super func() int) int) { + C.QTreeWidget_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VerticalOffset +func miqt_exec_callback_QTreeWidget_VerticalOffset(self *C.QTreeWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTreeWidget_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTreeWidget) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTreeWidget_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SetSelection +func miqt_exec_callback_QTreeWidget_SetSelection(self *C.QTreeWidget, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTreeWidget) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTreeWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTreeWidget) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTreeWidget_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SelectedIndexes +func miqt_exec_callback_QTreeWidget_SelectedIndexes(self *C.QTreeWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTreeWidget) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTreeWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTreeWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_TimerEvent +func miqt_exec_callback_QTreeWidget_TimerEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QTreeWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QTreeWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_PaintEvent +func miqt_exec_callback_QTreeWidget_PaintEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_DrawRow(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex) { + + C.QTreeWidget_virtualbase_DrawRow(unsafe.Pointer(this.h), painter.cPointer(), options.cPointer(), index.cPointer()) + +} +func (this *QTreeWidget) OnDrawRow(slot func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) { + C.QTreeWidget_override_virtual_DrawRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DrawRow +func miqt_exec_callback_QTreeWidget_DrawRow(self *C.QTreeWidget, cb C.intptr_t, painter *C.QPainter, options *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(options), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DrawRow, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_DrawBranches(painter *QPainter, rect *QRect, index *QModelIndex) { + + C.QTreeWidget_virtualbase_DrawBranches(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), index.cPointer()) + +} +func (this *QTreeWidget) OnDrawBranches(slot func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) { + C.QTreeWidget_override_virtual_DrawBranches(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DrawBranches +func miqt_exec_callback_QTreeWidget_DrawBranches(self *C.QTreeWidget, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DrawBranches, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MousePressEvent +func miqt_exec_callback_QTreeWidget_MousePressEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MouseReleaseEvent +func miqt_exec_callback_QTreeWidget_MouseReleaseEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent +func miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MouseMoveEvent +func miqt_exec_callback_QTreeWidget_MouseMoveEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTreeWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTreeWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_KeyPressEvent +func miqt_exec_callback_QTreeWidget_KeyPressEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTreeWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTreeWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DragMoveEvent +func miqt_exec_callback_QTreeWidget_DragMoveEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QTreeWidget_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTreeWidget) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTreeWidget_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ViewportEvent +func miqt_exec_callback_QTreeWidget_ViewportEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_UpdateGeometries() { + + C.QTreeWidget_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnUpdateGeometries(slot func(super func())) { + C.QTreeWidget_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_UpdateGeometries +func miqt_exec_callback_QTreeWidget_UpdateGeometries(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTreeWidget) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTreeWidget_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTreeWidget_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ViewportSizeHint +func miqt_exec_callback_QTreeWidget_ViewportSizeHint(self *C.QTreeWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTreeWidget_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTreeWidget) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTreeWidget_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SizeHintForColumn +func miqt_exec_callback_QTreeWidget_SizeHintForColumn(self *C.QTreeWidget, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTreeWidget_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTreeWidget) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTreeWidget_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_HorizontalScrollbarAction +func miqt_exec_callback_QTreeWidget_HorizontalScrollbarAction(self *C.QTreeWidget, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTreeWidget_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTreeWidget) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTreeWidget_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_IsIndexHidden +func miqt_exec_callback_QTreeWidget_IsIndexHidden(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTreeWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTreeWidget) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTreeWidget_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_CurrentChanged +func miqt_exec_callback_QTreeWidget_CurrentChanged(self *C.QTreeWidget, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QTreeWidget) Delete() { - C.QTreeWidget_Delete(this.h) + C.QTreeWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtreewidget.h b/qt/gen_qtreewidget.h index 2875f4a0..4177e555 100644 --- a/qt/gen_qtreewidget.h +++ b/qt/gen_qtreewidget.h @@ -15,54 +15,88 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; class QBrush; class QColor; class QDataStream; +class QDragMoveEvent; +class QDropEvent; +class QEvent; class QFont; +class QFrame; class QIcon; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; +class QMimeData; +class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPainter; class QPoint; class QRect; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QTreeView; class QTreeWidget; class QTreeWidgetItem; class QVariant; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QDataStream QDataStream; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QTreeView QTreeView; typedef struct QTreeWidget QTreeWidget; typedef struct QTreeWidgetItem QTreeWidgetItem; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTreeWidgetItem* QTreeWidgetItem_new(); -QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings); -QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview); -QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings); -QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after); -QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent); -QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings); -QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after); -QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other); -QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal); +void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self); QTreeWidget* QTreeWidgetItem_TreeWidget(const QTreeWidgetItem* self); void QTreeWidgetItem_SetSelected(QTreeWidgetItem* self, bool selectVal); @@ -125,10 +159,22 @@ void QTreeWidgetItem_InsertChildren(QTreeWidgetItem* self, int index, struct miq struct miqt_array /* of QTreeWidgetItem* */ QTreeWidgetItem_TakeChildren(QTreeWidgetItem* self); int QTreeWidgetItem_Type(const QTreeWidgetItem* self); void QTreeWidgetItem_SortChildren(QTreeWidgetItem* self, int column, int order); -void QTreeWidgetItem_Delete(QTreeWidgetItem* self); +void QTreeWidgetItem_override_virtual_Clone(void* self, intptr_t slot); +QTreeWidgetItem* QTreeWidgetItem_virtualbase_Clone(const void* self); +void QTreeWidgetItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QTreeWidgetItem_virtualbase_Data(const void* self, int column, int role); +void QTreeWidgetItem_override_virtual_SetData(void* self, intptr_t slot); +void QTreeWidgetItem_virtualbase_SetData(void* self, int column, int role, QVariant* value); +void QTreeWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QTreeWidgetItem_virtualbase_OperatorLesser(const void* self, QTreeWidgetItem* other); +void QTreeWidgetItem_override_virtual_Read(void* self, intptr_t slot); +void QTreeWidgetItem_virtualbase_Read(void* self, QDataStream* in); +void QTreeWidgetItem_override_virtual_Write(void* self, intptr_t slot); +void QTreeWidgetItem_virtualbase_Write(const void* self, QDataStream* out); +void QTreeWidgetItem_Delete(QTreeWidgetItem* self, bool isSubclass); -QTreeWidget* QTreeWidget_new(QWidget* parent); -QTreeWidget* QTreeWidget_new2(); +void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self); void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1); struct miqt_string QTreeWidget_Tr(const char* s); @@ -202,6 +248,12 @@ void QTreeWidget_CurrentItemChanged(QTreeWidget* self, QTreeWidgetItem* current, void QTreeWidget_connect_CurrentItemChanged(QTreeWidget* self, intptr_t slot); void QTreeWidget_ItemSelectionChanged(QTreeWidget* self); void QTreeWidget_connect_ItemSelectionChanged(QTreeWidget* self, intptr_t slot); +bool QTreeWidget_Event(QTreeWidget* self, QEvent* e); +struct miqt_array /* of struct miqt_string */ QTreeWidget_MimeTypes(const QTreeWidget* self); +QMimeData* QTreeWidget_MimeData(const QTreeWidget* self, struct miqt_array /* of QTreeWidgetItem* */ items); +bool QTreeWidget_DropMimeData(QTreeWidget* self, QTreeWidgetItem* parent, int index, QMimeData* data, int action); +int QTreeWidget_SupportedDropActions(const QTreeWidget* self); +void QTreeWidget_DropEvent(QTreeWidget* self, QDropEvent* event); struct miqt_string QTreeWidget_Tr2(const char* s, const char* c); struct miqt_string QTreeWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QTreeWidget_TrUtf82(const char* s, const char* c); @@ -212,7 +264,91 @@ void QTreeWidget_ClosePersistentEditor2(QTreeWidget* self, QTreeWidgetItem* item bool QTreeWidget_IsPersistentEditorOpen2(const QTreeWidget* self, QTreeWidgetItem* item, int column); struct miqt_array /* of QTreeWidgetItem* */ QTreeWidget_FindItems3(const QTreeWidget* self, struct miqt_string text, int flags, int column); void QTreeWidget_ScrollToItem2(QTreeWidget* self, QTreeWidgetItem* item, int hint); -void QTreeWidget_Delete(QTreeWidget* self); +void QTreeWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTreeWidget_override_virtual_Event(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_Event(void* self, QEvent* e); +void QTreeWidget_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QTreeWidget_virtualbase_MimeTypes(const void* self); +void QTreeWidget_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QTreeWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTreeWidgetItem* */ items); +void QTreeWidget_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_DropMimeData(void* self, QTreeWidgetItem* parent, int index, QMimeData* data, int action); +void QTreeWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QTreeWidget_virtualbase_SupportedDropActions(const void* self); +void QTreeWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTreeWidget_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTreeWidget_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QTreeWidget_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QTreeWidget_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTreeWidget_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTreeWidget_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTreeWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTreeWidget_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTreeWidget_virtualbase_IndexAt(const void* self, QPoint* p); +void QTreeWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DoItemsLayout(void* self); +void QTreeWidget_override_virtual_Reset(void* self, intptr_t slot); +void QTreeWidget_virtualbase_Reset(void* self); +void QTreeWidget_override_virtual_DataChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QTreeWidget_override_virtual_SelectAll(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SelectAll(void* self); +void QTreeWidget_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QTreeWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTreeWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTreeWidget_override_virtual_RowsInserted(void* self, intptr_t slot); +void QTreeWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QTreeWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QTreeWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QTreeWidget_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTreeWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTreeWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTreeWidget_virtualbase_HorizontalOffset(const void* self); +void QTreeWidget_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTreeWidget_virtualbase_VerticalOffset(const void* self); +void QTreeWidget_override_virtual_SetSelection(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTreeWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTreeWidget_virtualbase_SelectedIndexes(const void* self); +void QTreeWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTreeWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QTreeWidget_override_virtual_DrawRow(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index); +void QTreeWidget_override_virtual_DrawBranches(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index); +void QTreeWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTreeWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTreeWidget_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_ViewportEvent(void* self, QEvent* event); +void QTreeWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTreeWidget_virtualbase_UpdateGeometries(void* self); +void QTreeWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTreeWidget_virtualbase_ViewportSizeHint(const void* self); +void QTreeWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTreeWidget_virtualbase_SizeHintForColumn(const void* self, int column); +void QTreeWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTreeWidget_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTreeWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTreeWidget_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTreeWidget_Delete(QTreeWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qtreewidgetitemiterator.cpp b/qt/gen_qtreewidgetitemiterator.cpp index 03cda8d7..e0f1499c 100644 --- a/qt/gen_qtreewidgetitemiterator.cpp +++ b/qt/gen_qtreewidgetitemiterator.cpp @@ -5,24 +5,29 @@ #include "gen_qtreewidgetitemiterator.h" #include "_cgo_export.h" -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it) { - return new QTreeWidgetItemIterator(*it); +void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(*it); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget) { - return new QTreeWidgetItemIterator(widget); +void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item) { - return new QTreeWidgetItemIterator(item); +void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags) { - return new QTreeWidgetItemIterator(widget, static_cast(flags)); +void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget, static_cast(flags)); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags) { - return new QTreeWidgetItemIterator(item, static_cast(flags)); +void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item, static_cast(flags)); + *outptr_QTreeWidgetItemIterator = ret; } void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it) { @@ -65,7 +70,11 @@ QTreeWidgetItem* QTreeWidgetItemIterator_OperatorMultiply(const QTreeWidgetItemI return self->operator*(); } -void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self) { - delete self; +void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qtreewidgetitemiterator.go b/qt/gen_qtreewidgetitemiterator.go index 6a4a86c5..3a068463 100644 --- a/qt/gen_qtreewidgetitemiterator.go +++ b/qt/gen_qtreewidgetitemiterator.go @@ -39,7 +39,8 @@ const ( ) type QTreeWidgetItemIterator struct { - h *C.QTreeWidgetItemIterator + h *C.QTreeWidgetItemIterator + isSubclass bool } func (this *QTreeWidgetItemIterator) cPointer() *C.QTreeWidgetItemIterator { @@ -56,6 +57,7 @@ func (this *QTreeWidgetItemIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTreeWidgetItemIterator constructs the type using only CGO pointers. func newQTreeWidgetItemIterator(h *C.QTreeWidgetItemIterator) *QTreeWidgetItemIterator { if h == nil { return nil @@ -63,38 +65,63 @@ func newQTreeWidgetItemIterator(h *C.QTreeWidgetItemIterator) *QTreeWidgetItemIt return &QTreeWidgetItemIterator{h: h} } +// UnsafeNewQTreeWidgetItemIterator constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItemIterator(h unsafe.Pointer) *QTreeWidgetItemIterator { - return newQTreeWidgetItemIterator((*C.QTreeWidgetItemIterator)(h)) + if h == nil { + return nil + } + + return &QTreeWidgetItemIterator{h: (*C.QTreeWidgetItemIterator)(h)} } // NewQTreeWidgetItemIterator constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator(it *QTreeWidgetItemIterator) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new(it.cPointer()) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new(it.cPointer(), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator2 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator2(widget *QTreeWidget) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new2(widget.cPointer()) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new2(widget.cPointer(), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator3 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator3(item *QTreeWidgetItem) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new3(item.cPointer()) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new3(item.cPointer(), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator4 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator4(widget *QTreeWidget, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags)) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator5 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator5(item *QTreeWidgetItem, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags)) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } func (this *QTreeWidgetItemIterator) OperatorAssign(it *QTreeWidgetItemIterator) { @@ -137,7 +164,7 @@ func (this *QTreeWidgetItemIterator) OperatorMultiply() *QTreeWidgetItem { // Delete this object from C++ memory. func (this *QTreeWidgetItemIterator) Delete() { - C.QTreeWidgetItemIterator_Delete(this.h) + C.QTreeWidgetItemIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qtreewidgetitemiterator.h b/qt/gen_qtreewidgetitemiterator.h index 572e9e22..02d8a5e9 100644 --- a/qt/gen_qtreewidgetitemiterator.h +++ b/qt/gen_qtreewidgetitemiterator.h @@ -24,11 +24,11 @@ typedef struct QTreeWidgetItem QTreeWidgetItem; typedef struct QTreeWidgetItemIterator QTreeWidgetItemIterator; #endif -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags); +void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlus(QTreeWidgetItemIterator* self); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlusWithInt(QTreeWidgetItemIterator* self, int param1); @@ -37,7 +37,7 @@ QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorMinusMinus(QTreeWidgetI QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorMinusMinusWithInt(QTreeWidgetItemIterator* self, int param1); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorMinusAssign(QTreeWidgetItemIterator* self, int n); QTreeWidgetItem* QTreeWidgetItemIterator_OperatorMultiply(const QTreeWidgetItemIterator* self); -void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self); +void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qundogroup.cpp b/qt/gen_qundogroup.cpp index a236b489..0b004d98 100644 --- a/qt/gen_qundogroup.cpp +++ b/qt/gen_qundogroup.cpp @@ -1,22 +1,211 @@ #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qundogroup.h" #include "_cgo_export.h" -QUndoGroup* QUndoGroup_new() { - return new QUndoGroup(); +class MiqtVirtualQUndoGroup : public virtual QUndoGroup { +public: + + MiqtVirtualQUndoGroup(): QUndoGroup() {}; + MiqtVirtualQUndoGroup(QObject* parent): QUndoGroup(parent) {}; + + virtual ~MiqtVirtualQUndoGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QUndoGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QUndoGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QUndoGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QUndoGroup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QUndoGroup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QUndoGroup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QUndoGroup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QUndoGroup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QUndoGroup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QUndoGroup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QUndoGroup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QUndoGroup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QUndoGroup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QUndoGroup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QUndoGroup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QUndoGroup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoGroup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QUndoGroup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QUndoGroup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoGroup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QUndoGroup::disconnectNotify(*signal); + + } + +}; + +void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { + MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(); + *outptr_QUndoGroup = ret; + *outptr_QObject = static_cast(ret); } -QUndoGroup* QUndoGroup_new2(QObject* parent) { - return new QUndoGroup(parent); +void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { + MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(parent); + *outptr_QUndoGroup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self) { @@ -133,7 +322,7 @@ void QUndoGroup_ActiveStackChanged(QUndoGroup* self, QUndoStack* stack) { } void QUndoGroup_connect_ActiveStackChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::activeStackChanged), self, [=](QUndoStack* stack) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::activeStackChanged), self, [=](QUndoStack* stack) { QUndoStack* sigval1 = stack; miqt_exec_callback_QUndoGroup_ActiveStackChanged(slot, sigval1); }); @@ -144,7 +333,7 @@ void QUndoGroup_IndexChanged(QUndoGroup* self, int idx) { } void QUndoGroup_connect_IndexChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::indexChanged), self, [=](int idx) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::indexChanged), self, [=](int idx) { int sigval1 = idx; miqt_exec_callback_QUndoGroup_IndexChanged(slot, sigval1); }); @@ -155,7 +344,7 @@ void QUndoGroup_CleanChanged(QUndoGroup* self, bool clean) { } void QUndoGroup_connect_CleanChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::cleanChanged), self, [=](bool clean) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::cleanChanged), self, [=](bool clean) { bool sigval1 = clean; miqt_exec_callback_QUndoGroup_CleanChanged(slot, sigval1); }); @@ -166,7 +355,7 @@ void QUndoGroup_CanUndoChanged(QUndoGroup* self, bool canUndo) { } void QUndoGroup_connect_CanUndoChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::canUndoChanged), self, [=](bool canUndo) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::canUndoChanged), self, [=](bool canUndo) { bool sigval1 = canUndo; miqt_exec_callback_QUndoGroup_CanUndoChanged(slot, sigval1); }); @@ -177,7 +366,7 @@ void QUndoGroup_CanRedoChanged(QUndoGroup* self, bool canRedo) { } void QUndoGroup_connect_CanRedoChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::canRedoChanged), self, [=](bool canRedo) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::canRedoChanged), self, [=](bool canRedo) { bool sigval1 = canRedo; miqt_exec_callback_QUndoGroup_CanRedoChanged(slot, sigval1); }); @@ -189,7 +378,7 @@ void QUndoGroup_UndoTextChanged(QUndoGroup* self, struct miqt_string undoText) { } void QUndoGroup_connect_UndoTextChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::undoTextChanged), self, [=](const QString& undoText) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::undoTextChanged), self, [=](const QString& undoText) { const QString undoText_ret = undoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray undoText_b = undoText_ret.toUtf8(); @@ -208,7 +397,7 @@ void QUndoGroup_RedoTextChanged(QUndoGroup* self, struct miqt_string redoText) { } void QUndoGroup_connect_RedoTextChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::redoTextChanged), self, [=](const QString& redoText) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::redoTextChanged), self, [=](const QString& redoText) { const QString redoText_ret = redoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray redoText_b = redoText_ret.toUtf8(); @@ -275,7 +464,67 @@ QAction* QUndoGroup_CreateRedoAction2(const QUndoGroup* self, QObject* parent, s return self->createRedoAction(parent, prefix_QString); } -void QUndoGroup_Delete(QUndoGroup* self) { - delete self; +void QUndoGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__Event = slot; +} + +bool QUndoGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_Event(event); +} + +void QUndoGroup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__EventFilter = slot; +} + +bool QUndoGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QUndoGroup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__TimerEvent = slot; +} + +void QUndoGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_TimerEvent(event); +} + +void QUndoGroup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__ChildEvent = slot; +} + +void QUndoGroup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_ChildEvent(event); +} + +void QUndoGroup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__CustomEvent = slot; +} + +void QUndoGroup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_CustomEvent(event); +} + +void QUndoGroup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__ConnectNotify = slot; +} + +void QUndoGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QUndoGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__DisconnectNotify = slot; +} + +void QUndoGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QUndoGroup_Delete(QUndoGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qundogroup.go b/qt/gen_qundogroup.go index 58b11ec1..ec394f4a 100644 --- a/qt/gen_qundogroup.go +++ b/qt/gen_qundogroup.go @@ -15,7 +15,8 @@ import ( ) type QUndoGroup struct { - h *C.QUndoGroup + h *C.QUndoGroup + isSubclass bool *QObject } @@ -33,27 +34,45 @@ func (this *QUndoGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUndoGroup(h *C.QUndoGroup) *QUndoGroup { +// newQUndoGroup constructs the type using only CGO pointers. +func newQUndoGroup(h *C.QUndoGroup, h_QObject *C.QObject) *QUndoGroup { if h == nil { return nil } - return &QUndoGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QUndoGroup{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQUndoGroup(h unsafe.Pointer) *QUndoGroup { - return newQUndoGroup((*C.QUndoGroup)(h)) +// UnsafeNewQUndoGroup constructs the type using only unsafe pointers. +func UnsafeNewQUndoGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoGroup { + if h == nil { + return nil + } + + return &QUndoGroup{h: (*C.QUndoGroup)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQUndoGroup constructs a new QUndoGroup object. func NewQUndoGroup() *QUndoGroup { - ret := C.QUndoGroup_new() - return newQUndoGroup(ret) + var outptr_QUndoGroup *C.QUndoGroup = nil + var outptr_QObject *C.QObject = nil + + C.QUndoGroup_new(&outptr_QUndoGroup, &outptr_QObject) + ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQUndoGroup2 constructs a new QUndoGroup object. func NewQUndoGroup2(parent *QObject) *QUndoGroup { - ret := C.QUndoGroup_new2(parent.cPointer()) - return newQUndoGroup(ret) + var outptr_QUndoGroup *C.QUndoGroup = nil + var outptr_QObject *C.QObject = nil + + C.QUndoGroup_new2(parent.cPointer(), &outptr_QUndoGroup, &outptr_QObject) + ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QUndoGroup) MetaObject() *QMetaObject { @@ -97,21 +116,21 @@ func (this *QUndoGroup) Stacks() []*QUndoStack { _ret := make([]*QUndoStack, int(_ma.len)) _outCast := (*[0xffff]*C.QUndoStack)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQUndoStack(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQUndoStack(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QUndoGroup) ActiveStack() *QUndoStack { - return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoGroup_ActiveStack(this.h))) + return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoGroup_ActiveStack(this.h)), nil) } func (this *QUndoGroup) CreateUndoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer())), nil) } func (this *QUndoGroup) CreateRedoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer())), nil) } func (this *QUndoGroup) CanUndo() bool { @@ -167,7 +186,7 @@ func miqt_exec_callback_QUndoGroup_ActiveStackChanged(cb C.intptr_t, stack *C.QU } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQUndoStack(unsafe.Pointer(stack)) + slotval1 := UnsafeNewQUndoStack(unsafe.Pointer(stack), nil) gofunc(slotval1) } @@ -355,7 +374,7 @@ func (this *QUndoGroup) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)), nil) } func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -363,12 +382,178 @@ func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)), nil) +} + +func (this *QUndoGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QUndoGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QUndoGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QUndoGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_Event +func miqt_exec_callback_QUndoGroup_Event(self *C.QUndoGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoGroup) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QUndoGroup_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QUndoGroup) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QUndoGroup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_EventFilter +func miqt_exec_callback_QUndoGroup_EventFilter(self *C.QUndoGroup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoGroup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoGroup) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QUndoGroup_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoGroup) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QUndoGroup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_TimerEvent +func miqt_exec_callback_QUndoGroup_TimerEvent(self *C.QUndoGroup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QUndoGroup_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoGroup) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QUndoGroup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_ChildEvent +func miqt_exec_callback_QUndoGroup_ChildEvent(self *C.QUndoGroup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_CustomEvent(event *QEvent) { + + C.QUndoGroup_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoGroup) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QUndoGroup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_CustomEvent +func miqt_exec_callback_QUndoGroup_CustomEvent(self *C.QUndoGroup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QUndoGroup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoGroup) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoGroup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_ConnectNotify +func miqt_exec_callback_QUndoGroup_ConnectNotify(self *C.QUndoGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QUndoGroup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoGroup) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoGroup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_DisconnectNotify +func miqt_exec_callback_QUndoGroup_DisconnectNotify(self *C.QUndoGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + } // Delete this object from C++ memory. func (this *QUndoGroup) Delete() { - C.QUndoGroup_Delete(this.h) + C.QUndoGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qundogroup.h b/qt/gen_qundogroup.h index 212f3894..683141d6 100644 --- a/qt/gen_qundogroup.h +++ b/qt/gen_qundogroup.h @@ -16,20 +16,28 @@ extern "C" { #ifdef __cplusplus class QAction; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUndoGroup; class QUndoStack; #else typedef struct QAction QAction; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUndoGroup QUndoGroup; typedef struct QUndoStack QUndoStack; #endif -QUndoGroup* QUndoGroup_new(); -QUndoGroup* QUndoGroup_new2(QObject* parent); +void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); +void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self); void* QUndoGroup_Metacast(QUndoGroup* self, const char* param1); struct miqt_string QUndoGroup_Tr(const char* s); @@ -68,7 +76,21 @@ struct miqt_string QUndoGroup_TrUtf82(const char* s, const char* c); struct miqt_string QUndoGroup_TrUtf83(const char* s, const char* c, int n); QAction* QUndoGroup_CreateUndoAction2(const QUndoGroup* self, QObject* parent, struct miqt_string prefix); QAction* QUndoGroup_CreateRedoAction2(const QUndoGroup* self, QObject* parent, struct miqt_string prefix); -void QUndoGroup_Delete(QUndoGroup* self); +void QUndoGroup_override_virtual_Event(void* self, intptr_t slot); +bool QUndoGroup_virtualbase_Event(void* self, QEvent* event); +void QUndoGroup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QUndoGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QUndoGroup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QUndoGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QUndoGroup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QUndoGroup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QUndoGroup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QUndoGroup_virtualbase_CustomEvent(void* self, QEvent* event); +void QUndoGroup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QUndoGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QUndoGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QUndoGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QUndoGroup_Delete(QUndoGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qundostack.cpp b/qt/gen_qundostack.cpp index 98f17b81..6596ada3 100644 --- a/qt/gen_qundostack.cpp +++ b/qt/gen_qundostack.cpp @@ -1,31 +1,142 @@ #include +#include +#include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qundostack.h" #include "_cgo_export.h" -QUndoCommand* QUndoCommand_new() { - return new QUndoCommand(); +class MiqtVirtualQUndoCommand : public virtual QUndoCommand { +public: + + MiqtVirtualQUndoCommand(): QUndoCommand() {}; + MiqtVirtualQUndoCommand(const QString& text): QUndoCommand(text) {}; + MiqtVirtualQUndoCommand(QUndoCommand* parent): QUndoCommand(parent) {}; + MiqtVirtualQUndoCommand(const QString& text, QUndoCommand* parent): QUndoCommand(text, parent) {}; + + virtual ~MiqtVirtualQUndoCommand() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Undo = 0; + + // Subclass to allow providing a Go implementation + virtual void undo() override { + if (handle__Undo == 0) { + QUndoCommand::undo(); + return; + } + + + miqt_exec_callback_QUndoCommand_Undo(this, handle__Undo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Undo() { + + QUndoCommand::undo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redo = 0; + + // Subclass to allow providing a Go implementation + virtual void redo() override { + if (handle__Redo == 0) { + QUndoCommand::redo(); + return; + } + + + miqt_exec_callback_QUndoCommand_Redo(this, handle__Redo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Redo() { + + QUndoCommand::redo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Id = 0; + + // Subclass to allow providing a Go implementation + virtual int id() const override { + if (handle__Id == 0) { + return QUndoCommand::id(); + } + + + int callback_return_value = miqt_exec_callback_QUndoCommand_Id(const_cast(this), handle__Id); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Id() const { + + return QUndoCommand::id(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MergeWith = 0; + + // Subclass to allow providing a Go implementation + virtual bool mergeWith(const QUndoCommand* other) override { + if (handle__MergeWith == 0) { + return QUndoCommand::mergeWith(other); + } + + QUndoCommand* sigval1 = (QUndoCommand*) other; + + bool callback_return_value = miqt_exec_callback_QUndoCommand_MergeWith(this, handle__MergeWith, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MergeWith(QUndoCommand* other) { + + return QUndoCommand::mergeWith(other); + + } + +}; + +void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand) { + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(); + *outptr_QUndoCommand = ret; } -QUndoCommand* QUndoCommand_new2(struct miqt_string text) { +void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QUndoCommand(text_QString); + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString); + *outptr_QUndoCommand = ret; } -QUndoCommand* QUndoCommand_new3(QUndoCommand* parent) { - return new QUndoCommand(parent); +void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(parent); + *outptr_QUndoCommand = ret; } -QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent) { +void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QUndoCommand(text_QString, parent); + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString, parent); + *outptr_QUndoCommand = ret; } void QUndoCommand_Undo(QUndoCommand* self) { @@ -87,16 +198,237 @@ QUndoCommand* QUndoCommand_Child(const QUndoCommand* self, int index) { return (QUndoCommand*) self->child(static_cast(index)); } -void QUndoCommand_Delete(QUndoCommand* self) { - delete self; +void QUndoCommand_override_virtual_Undo(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__Undo = slot; } -QUndoStack* QUndoStack_new() { - return new QUndoStack(); +void QUndoCommand_virtualbase_Undo(void* self) { + ( (MiqtVirtualQUndoCommand*)(self) )->virtualbase_Undo(); } -QUndoStack* QUndoStack_new2(QObject* parent) { - return new QUndoStack(parent); +void QUndoCommand_override_virtual_Redo(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__Redo = slot; +} + +void QUndoCommand_virtualbase_Redo(void* self) { + ( (MiqtVirtualQUndoCommand*)(self) )->virtualbase_Redo(); +} + +void QUndoCommand_override_virtual_Id(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__Id = slot; +} + +int QUndoCommand_virtualbase_Id(const void* self) { + return ( (const MiqtVirtualQUndoCommand*)(self) )->virtualbase_Id(); +} + +void QUndoCommand_override_virtual_MergeWith(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__MergeWith = slot; +} + +bool QUndoCommand_virtualbase_MergeWith(void* self, QUndoCommand* other) { + return ( (MiqtVirtualQUndoCommand*)(self) )->virtualbase_MergeWith(other); +} + +void QUndoCommand_Delete(QUndoCommand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQUndoStack : public virtual QUndoStack { +public: + + MiqtVirtualQUndoStack(): QUndoStack() {}; + MiqtVirtualQUndoStack(QObject* parent): QUndoStack(parent) {}; + + virtual ~MiqtVirtualQUndoStack() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QUndoStack::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QUndoStack_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QUndoStack::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QUndoStack::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QUndoStack_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QUndoStack::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QUndoStack::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QUndoStack_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QUndoStack::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QUndoStack::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QUndoStack_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QUndoStack::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QUndoStack::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QUndoStack_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QUndoStack::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QUndoStack::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoStack_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QUndoStack::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QUndoStack::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoStack_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QUndoStack::disconnectNotify(*signal); + + } + +}; + +void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { + MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(); + *outptr_QUndoStack = ret; + *outptr_QObject = static_cast(ret); +} + +void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { + MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(parent); + *outptr_QUndoStack = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QUndoStack_MetaObject(const QUndoStack* self) { @@ -256,7 +588,7 @@ void QUndoStack_IndexChanged(QUndoStack* self, int idx) { } void QUndoStack_connect_IndexChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::indexChanged), self, [=](int idx) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::indexChanged), self, [=](int idx) { int sigval1 = idx; miqt_exec_callback_QUndoStack_IndexChanged(slot, sigval1); }); @@ -267,7 +599,7 @@ void QUndoStack_CleanChanged(QUndoStack* self, bool clean) { } void QUndoStack_connect_CleanChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::cleanChanged), self, [=](bool clean) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::cleanChanged), self, [=](bool clean) { bool sigval1 = clean; miqt_exec_callback_QUndoStack_CleanChanged(slot, sigval1); }); @@ -278,7 +610,7 @@ void QUndoStack_CanUndoChanged(QUndoStack* self, bool canUndo) { } void QUndoStack_connect_CanUndoChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::canUndoChanged), self, [=](bool canUndo) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::canUndoChanged), self, [=](bool canUndo) { bool sigval1 = canUndo; miqt_exec_callback_QUndoStack_CanUndoChanged(slot, sigval1); }); @@ -289,7 +621,7 @@ void QUndoStack_CanRedoChanged(QUndoStack* self, bool canRedo) { } void QUndoStack_connect_CanRedoChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::canRedoChanged), self, [=](bool canRedo) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::canRedoChanged), self, [=](bool canRedo) { bool sigval1 = canRedo; miqt_exec_callback_QUndoStack_CanRedoChanged(slot, sigval1); }); @@ -301,7 +633,7 @@ void QUndoStack_UndoTextChanged(QUndoStack* self, struct miqt_string undoText) { } void QUndoStack_connect_UndoTextChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::undoTextChanged), self, [=](const QString& undoText) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::undoTextChanged), self, [=](const QString& undoText) { const QString undoText_ret = undoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray undoText_b = undoText_ret.toUtf8(); @@ -320,7 +652,7 @@ void QUndoStack_RedoTextChanged(QUndoStack* self, struct miqt_string redoText) { } void QUndoStack_connect_RedoTextChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::redoTextChanged), self, [=](const QString& redoText) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::redoTextChanged), self, [=](const QString& redoText) { const QString redoText_ret = redoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray redoText_b = redoText_ret.toUtf8(); @@ -391,7 +723,67 @@ void QUndoStack_SetActive1(QUndoStack* self, bool active) { self->setActive(active); } -void QUndoStack_Delete(QUndoStack* self) { - delete self; +void QUndoStack_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__Event = slot; +} + +bool QUndoStack_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_Event(event); +} + +void QUndoStack_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__EventFilter = slot; +} + +bool QUndoStack_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QUndoStack_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__TimerEvent = slot; +} + +void QUndoStack_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_TimerEvent(event); +} + +void QUndoStack_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__ChildEvent = slot; +} + +void QUndoStack_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_ChildEvent(event); +} + +void QUndoStack_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__CustomEvent = slot; +} + +void QUndoStack_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_CustomEvent(event); +} + +void QUndoStack_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__ConnectNotify = slot; +} + +void QUndoStack_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QUndoStack_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__DisconnectNotify = slot; +} + +void QUndoStack_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QUndoStack_Delete(QUndoStack* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qundostack.go b/qt/gen_qundostack.go index 0c74a35d..cd23b3c5 100644 --- a/qt/gen_qundostack.go +++ b/qt/gen_qundostack.go @@ -15,7 +15,8 @@ import ( ) type QUndoCommand struct { - h *C.QUndoCommand + h *C.QUndoCommand + isSubclass bool } func (this *QUndoCommand) cPointer() *C.QUndoCommand { @@ -32,6 +33,7 @@ func (this *QUndoCommand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUndoCommand constructs the type using only CGO pointers. func newQUndoCommand(h *C.QUndoCommand) *QUndoCommand { if h == nil { return nil @@ -39,14 +41,23 @@ func newQUndoCommand(h *C.QUndoCommand) *QUndoCommand { return &QUndoCommand{h: h} } +// UnsafeNewQUndoCommand constructs the type using only unsafe pointers. func UnsafeNewQUndoCommand(h unsafe.Pointer) *QUndoCommand { - return newQUndoCommand((*C.QUndoCommand)(h)) + if h == nil { + return nil + } + + return &QUndoCommand{h: (*C.QUndoCommand)(h)} } // NewQUndoCommand constructs a new QUndoCommand object. func NewQUndoCommand() *QUndoCommand { - ret := C.QUndoCommand_new() - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new(&outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } // NewQUndoCommand2 constructs a new QUndoCommand object. @@ -55,14 +66,22 @@ func NewQUndoCommand2(text string) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QUndoCommand_new2(text_ms) - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new2(text_ms, &outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } // NewQUndoCommand3 constructs a new QUndoCommand object. func NewQUndoCommand3(parent *QUndoCommand) *QUndoCommand { - ret := C.QUndoCommand_new3(parent.cPointer()) - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new3(parent.cPointer(), &outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } // NewQUndoCommand4 constructs a new QUndoCommand object. @@ -71,8 +90,12 @@ func NewQUndoCommand4(text string, parent *QUndoCommand) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QUndoCommand_new4(text_ms, parent.cPointer()) - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new4(text_ms, parent.cPointer(), &outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } func (this *QUndoCommand) Undo() { @@ -129,9 +152,96 @@ func (this *QUndoCommand) Child(index int) *QUndoCommand { return UnsafeNewQUndoCommand(unsafe.Pointer(C.QUndoCommand_Child(this.h, (C.int)(index)))) } +func (this *QUndoCommand) callVirtualBase_Undo() { + + C.QUndoCommand_virtualbase_Undo(unsafe.Pointer(this.h)) + +} +func (this *QUndoCommand) OnUndo(slot func(super func())) { + C.QUndoCommand_override_virtual_Undo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_Undo +func miqt_exec_callback_QUndoCommand_Undo(self *C.QUndoCommand, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoCommand{h: self}).callVirtualBase_Undo) + +} + +func (this *QUndoCommand) callVirtualBase_Redo() { + + C.QUndoCommand_virtualbase_Redo(unsafe.Pointer(this.h)) + +} +func (this *QUndoCommand) OnRedo(slot func(super func())) { + C.QUndoCommand_override_virtual_Redo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_Redo +func miqt_exec_callback_QUndoCommand_Redo(self *C.QUndoCommand, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoCommand{h: self}).callVirtualBase_Redo) + +} + +func (this *QUndoCommand) callVirtualBase_Id() int { + + return (int)(C.QUndoCommand_virtualbase_Id(unsafe.Pointer(this.h))) + +} +func (this *QUndoCommand) OnId(slot func(super func() int) int) { + C.QUndoCommand_override_virtual_Id(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_Id +func miqt_exec_callback_QUndoCommand_Id(self *C.QUndoCommand, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoCommand{h: self}).callVirtualBase_Id) + + return (C.int)(virtualReturn) + +} + +func (this *QUndoCommand) callVirtualBase_MergeWith(other *QUndoCommand) bool { + + return (bool)(C.QUndoCommand_virtualbase_MergeWith(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QUndoCommand) OnMergeWith(slot func(super func(other *QUndoCommand) bool, other *QUndoCommand) bool) { + C.QUndoCommand_override_virtual_MergeWith(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_MergeWith +func miqt_exec_callback_QUndoCommand_MergeWith(self *C.QUndoCommand, cb C.intptr_t, other *C.QUndoCommand) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QUndoCommand) bool, other *QUndoCommand) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQUndoCommand(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QUndoCommand{h: self}).callVirtualBase_MergeWith, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QUndoCommand) Delete() { - C.QUndoCommand_Delete(this.h) + C.QUndoCommand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -144,7 +254,8 @@ func (this *QUndoCommand) GoGC() { } type QUndoStack struct { - h *C.QUndoStack + h *C.QUndoStack + isSubclass bool *QObject } @@ -162,27 +273,45 @@ func (this *QUndoStack) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUndoStack(h *C.QUndoStack) *QUndoStack { +// newQUndoStack constructs the type using only CGO pointers. +func newQUndoStack(h *C.QUndoStack, h_QObject *C.QObject) *QUndoStack { if h == nil { return nil } - return &QUndoStack{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QUndoStack{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQUndoStack(h unsafe.Pointer) *QUndoStack { - return newQUndoStack((*C.QUndoStack)(h)) +// UnsafeNewQUndoStack constructs the type using only unsafe pointers. +func UnsafeNewQUndoStack(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoStack { + if h == nil { + return nil + } + + return &QUndoStack{h: (*C.QUndoStack)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQUndoStack constructs a new QUndoStack object. func NewQUndoStack() *QUndoStack { - ret := C.QUndoStack_new() - return newQUndoStack(ret) + var outptr_QUndoStack *C.QUndoStack = nil + var outptr_QObject *C.QObject = nil + + C.QUndoStack_new(&outptr_QUndoStack, &outptr_QObject) + ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret.isSubclass = true + return ret } // NewQUndoStack2 constructs a new QUndoStack object. func NewQUndoStack2(parent *QObject) *QUndoStack { - ret := C.QUndoStack_new2(parent.cPointer()) - return newQUndoStack(ret) + var outptr_QUndoStack *C.QUndoStack = nil + var outptr_QObject *C.QObject = nil + + C.QUndoStack_new2(parent.cPointer(), &outptr_QUndoStack, &outptr_QObject) + ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QUndoStack) MetaObject() *QMetaObject { @@ -259,11 +388,11 @@ func (this *QUndoStack) Text(idx int) string { } func (this *QUndoStack) CreateUndoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer())), nil) } func (this *QUndoStack) CreateRedoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer())), nil) } func (this *QUndoStack) IsActive() bool { @@ -509,7 +638,7 @@ func (this *QUndoStack) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)), nil) } func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -517,16 +646,182 @@ func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)), nil) } func (this *QUndoStack) SetActive1(active bool) { C.QUndoStack_SetActive1(this.h, (C.bool)(active)) } +func (this *QUndoStack) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QUndoStack_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QUndoStack) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QUndoStack_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_Event +func miqt_exec_callback_QUndoStack_Event(self *C.QUndoStack, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoStack{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoStack) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QUndoStack_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QUndoStack) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QUndoStack_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_EventFilter +func miqt_exec_callback_QUndoStack_EventFilter(self *C.QUndoStack, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoStack{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoStack) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QUndoStack_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoStack) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QUndoStack_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_TimerEvent +func miqt_exec_callback_QUndoStack_TimerEvent(self *C.QUndoStack, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoStack{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QUndoStack_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoStack) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QUndoStack_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_ChildEvent +func miqt_exec_callback_QUndoStack_ChildEvent(self *C.QUndoStack, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoStack{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_CustomEvent(event *QEvent) { + + C.QUndoStack_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoStack) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QUndoStack_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_CustomEvent +func miqt_exec_callback_QUndoStack_CustomEvent(self *C.QUndoStack, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QUndoStack{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QUndoStack_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoStack) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoStack_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_ConnectNotify +func miqt_exec_callback_QUndoStack_ConnectNotify(self *C.QUndoStack, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoStack{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QUndoStack_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoStack) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoStack_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_DisconnectNotify +func miqt_exec_callback_QUndoStack_DisconnectNotify(self *C.QUndoStack, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoStack{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QUndoStack) Delete() { - C.QUndoStack_Delete(this.h) + C.QUndoStack_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qundostack.h b/qt/gen_qundostack.h index 9a19144d..a52b9b13 100644 --- a/qt/gen_qundostack.h +++ b/qt/gen_qundostack.h @@ -16,22 +16,30 @@ extern "C" { #ifdef __cplusplus class QAction; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUndoCommand; class QUndoStack; #else typedef struct QAction QAction; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUndoCommand QUndoCommand; typedef struct QUndoStack QUndoStack; #endif -QUndoCommand* QUndoCommand_new(); -QUndoCommand* QUndoCommand_new2(struct miqt_string text); -QUndoCommand* QUndoCommand_new3(QUndoCommand* parent); -QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent); +void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand); +void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand); +void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); +void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); void QUndoCommand_Undo(QUndoCommand* self); void QUndoCommand_Redo(QUndoCommand* self); struct miqt_string QUndoCommand_Text(const QUndoCommand* self); @@ -43,10 +51,18 @@ int QUndoCommand_Id(const QUndoCommand* self); bool QUndoCommand_MergeWith(QUndoCommand* self, QUndoCommand* other); int QUndoCommand_ChildCount(const QUndoCommand* self); QUndoCommand* QUndoCommand_Child(const QUndoCommand* self, int index); -void QUndoCommand_Delete(QUndoCommand* self); +void QUndoCommand_override_virtual_Undo(void* self, intptr_t slot); +void QUndoCommand_virtualbase_Undo(void* self); +void QUndoCommand_override_virtual_Redo(void* self, intptr_t slot); +void QUndoCommand_virtualbase_Redo(void* self); +void QUndoCommand_override_virtual_Id(void* self, intptr_t slot); +int QUndoCommand_virtualbase_Id(const void* self); +void QUndoCommand_override_virtual_MergeWith(void* self, intptr_t slot); +bool QUndoCommand_virtualbase_MergeWith(void* self, QUndoCommand* other); +void QUndoCommand_Delete(QUndoCommand* self, bool isSubclass); -QUndoStack* QUndoStack_new(); -QUndoStack* QUndoStack_new2(QObject* parent); +void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); +void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); QMetaObject* QUndoStack_MetaObject(const QUndoStack* self); void* QUndoStack_Metacast(QUndoStack* self, const char* param1); struct miqt_string QUndoStack_Tr(const char* s); @@ -95,7 +111,21 @@ struct miqt_string QUndoStack_TrUtf83(const char* s, const char* c, int n); QAction* QUndoStack_CreateUndoAction2(const QUndoStack* self, QObject* parent, struct miqt_string prefix); QAction* QUndoStack_CreateRedoAction2(const QUndoStack* self, QObject* parent, struct miqt_string prefix); void QUndoStack_SetActive1(QUndoStack* self, bool active); -void QUndoStack_Delete(QUndoStack* self); +void QUndoStack_override_virtual_Event(void* self, intptr_t slot); +bool QUndoStack_virtualbase_Event(void* self, QEvent* event); +void QUndoStack_override_virtual_EventFilter(void* self, intptr_t slot); +bool QUndoStack_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QUndoStack_override_virtual_TimerEvent(void* self, intptr_t slot); +void QUndoStack_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QUndoStack_override_virtual_ChildEvent(void* self, intptr_t slot); +void QUndoStack_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QUndoStack_override_virtual_CustomEvent(void* self, intptr_t slot); +void QUndoStack_virtualbase_CustomEvent(void* self, QEvent* event); +void QUndoStack_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QUndoStack_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QUndoStack_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QUndoStack_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QUndoStack_Delete(QUndoStack* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qundoview.cpp b/qt/gen_qundoview.cpp index e81f6479..0a8c4207 100644 --- a/qt/gen_qundoview.cpp +++ b/qt/gen_qundoview.cpp @@ -1,38 +1,917 @@ +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include #include +#include #include #include #include "gen_qundoview.h" #include "_cgo_export.h" -QUndoView* QUndoView_new(QWidget* parent) { - return new QUndoView(parent); +class MiqtVirtualQUndoView : public virtual QUndoView { +public: + + MiqtVirtualQUndoView(QWidget* parent): QUndoView(parent) {}; + MiqtVirtualQUndoView(): QUndoView() {}; + MiqtVirtualQUndoView(QUndoStack* stack): QUndoView(stack) {}; + MiqtVirtualQUndoView(QUndoGroup* group): QUndoView(group) {}; + MiqtVirtualQUndoView(QUndoStack* stack, QWidget* parent): QUndoView(stack, parent) {}; + MiqtVirtualQUndoView(QUndoGroup* group, QWidget* parent): QUndoView(group, parent) {}; + + virtual ~MiqtVirtualQUndoView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QUndoView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QUndoView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QUndoView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QUndoView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QUndoView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QUndoView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QUndoView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QUndoView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QUndoView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QUndoView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QUndoView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QUndoView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QUndoView::reset(); + return; + } + + + miqt_exec_callback_QUndoView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QUndoView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QUndoView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QUndoView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QUndoView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QUndoView::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QUndoView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QUndoView::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QUndoView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QUndoView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QUndoView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) override { + if (handle__DataChanged == 0) { + QUndoView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QVector& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QUndoView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QVector roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QUndoView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QUndoView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QUndoView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QUndoView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QUndoView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QUndoView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QUndoView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QUndoView::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QUndoView::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QUndoView::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QUndoView::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QUndoView::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QUndoView::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QUndoView::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QUndoView::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QUndoView::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QUndoView::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QUndoView::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QUndoView::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QUndoView::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QUndoView::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QUndoView::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QUndoView::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QUndoView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QUndoView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QUndoView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewOptions = 0; + + // Subclass to allow providing a Go implementation + virtual QStyleOptionViewItem viewOptions() const override { + if (handle__ViewOptions == 0) { + return QUndoView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QUndoView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QUndoView::viewOptions()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QUndoView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QUndoView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QUndoView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QUndoView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QUndoView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QUndoView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QUndoView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QUndoView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QUndoView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QUndoView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QUndoView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QUndoView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QUndoView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QUndoView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QUndoView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QUndoView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QUndoView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QUndoView::updateGeometries(); + return; + } + + + miqt_exec_callback_QUndoView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QUndoView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QUndoView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QUndoView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QUndoView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QUndoView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QUndoView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QUndoView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QUndoView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QUndoView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QUndoView::viewportSizeHint()); + + } + +}; + +void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(parent); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new2() { - return new QUndoView(); +void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new3(QUndoStack* stack) { - return new QUndoView(stack); +void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new4(QUndoGroup* group) { - return new QUndoView(group); +void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent) { - return new QUndoView(stack, parent); +void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack, parent); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent) { - return new QUndoView(group, parent); +void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group, parent); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QUndoView_MetaObject(const QUndoView* self) { @@ -149,7 +1028,259 @@ struct miqt_string QUndoView_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QUndoView_Delete(QUndoView* self) { - delete self; +void QUndoView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__VisualRect = slot; +} + +QRect* QUndoView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_VisualRect(index); +} + +void QUndoView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ScrollTo = slot; +} + +void QUndoView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QUndoView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QUndoView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_IndexAt(p); +} + +void QUndoView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DoItemsLayout = slot; +} + +void QUndoView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QUndoView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__Reset = slot; +} + +void QUndoView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_Reset(); +} + +void QUndoView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SetRootIndex = slot; +} + +void QUndoView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QUndoView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__Event = slot; +} + +bool QUndoView_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQUndoView*)(self) )->virtualbase_Event(e); +} + +void QUndoView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QUndoView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QUndoView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DataChanged = slot; +} + +void QUndoView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QUndoView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__RowsInserted = slot; +} + +void QUndoView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QUndoView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QUndoView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QUndoView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QUndoView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QUndoView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QUndoView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QUndoView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__WheelEvent = slot; +} + +void QUndoView_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_WheelEvent(e); +} + +void QUndoView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__TimerEvent = slot; +} + +void QUndoView_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_TimerEvent(e); +} + +void QUndoView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ResizeEvent = slot; +} + +void QUndoView_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_ResizeEvent(e); +} + +void QUndoView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DragMoveEvent = slot; +} + +void QUndoView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QUndoView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QUndoView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QUndoView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DropEvent = slot; +} + +void QUndoView_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DropEvent(e); +} + +void QUndoView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__StartDrag = slot; +} + +void QUndoView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QUndoView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QUndoView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_ViewOptions(); +} + +void QUndoView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__PaintEvent = slot; +} + +void QUndoView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_PaintEvent(e); +} + +void QUndoView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__HorizontalOffset = slot; +} + +int QUndoView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QUndoView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__VerticalOffset = slot; +} + +int QUndoView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_VerticalOffset(); +} + +void QUndoView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QUndoView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQUndoView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QUndoView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SetSelection = slot; +} + +void QUndoView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QUndoView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QUndoView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QUndoView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__UpdateGeometries = slot; +} + +void QUndoView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QUndoView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QUndoView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QUndoView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__CurrentChanged = slot; +} + +void QUndoView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QUndoView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QUndoView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QUndoView_Delete(QUndoView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qundoview.go b/qt/gen_qundoview.go index c42e6033..21a4613a 100644 --- a/qt/gen_qundoview.go +++ b/qt/gen_qundoview.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QUndoView struct { - h *C.QUndoView + h *C.QUndoView + isSubclass bool *QListView } @@ -32,51 +34,125 @@ func (this *QUndoView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUndoView(h *C.QUndoView) *QUndoView { +// newQUndoView constructs the type using only CGO pointers. +func newQUndoView(h *C.QUndoView, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QUndoView { if h == nil { return nil } - return &QUndoView{h: h, QListView: UnsafeNewQListView(unsafe.Pointer(h))} + return &QUndoView{h: h, + QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQUndoView(h unsafe.Pointer) *QUndoView { - return newQUndoView((*C.QUndoView)(h)) +// UnsafeNewQUndoView constructs the type using only unsafe pointers. +func UnsafeNewQUndoView(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QUndoView { + if h == nil { + return nil + } + + return &QUndoView{h: (*C.QUndoView)(h), + QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQUndoView constructs a new QUndoView object. func NewQUndoView(parent *QWidget) *QUndoView { - ret := C.QUndoView_new(parent.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new(parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView2 constructs a new QUndoView object. func NewQUndoView2() *QUndoView { - ret := C.QUndoView_new2() - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new2(&outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView3 constructs a new QUndoView object. func NewQUndoView3(stack *QUndoStack) *QUndoView { - ret := C.QUndoView_new3(stack.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new3(stack.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView4 constructs a new QUndoView object. func NewQUndoView4(group *QUndoGroup) *QUndoView { - ret := C.QUndoView_new4(group.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new4(group.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView5 constructs a new QUndoView object. func NewQUndoView5(stack *QUndoStack, parent *QWidget) *QUndoView { - ret := C.QUndoView_new5(stack.cPointer(), parent.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new5(stack.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView6 constructs a new QUndoView object. func NewQUndoView6(group *QUndoGroup, parent *QWidget) *QUndoView { - ret := C.QUndoView_new6(group.cPointer(), parent.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new6(group.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QUndoView) MetaObject() *QMetaObject { @@ -108,11 +184,11 @@ func QUndoView_TrUtf8(s string) string { } func (this *QUndoView) Stack() *QUndoStack { - return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoView_Stack(this.h))) + return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoView_Stack(this.h)), nil) } func (this *QUndoView) Group() *QUndoGroup { - return UnsafeNewQUndoGroup(unsafe.Pointer(C.QUndoView_Group(this.h))) + return UnsafeNewQUndoGroup(unsafe.Pointer(C.QUndoView_Group(this.h)), nil) } func (this *QUndoView) SetEmptyLabel(label string) { @@ -193,9 +269,775 @@ func QUndoView_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QUndoView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QUndoView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QUndoView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_VisualRect +func miqt_exec_callback_QUndoView_VisualRect(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QUndoView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QUndoView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QUndoView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ScrollTo +func miqt_exec_callback_QUndoView_ScrollTo(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QUndoView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QUndoView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QUndoView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_IndexAt +func miqt_exec_callback_QUndoView_IndexAt(self *C.QUndoView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_DoItemsLayout() { + + C.QUndoView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QUndoView) OnDoItemsLayout(slot func(super func())) { + C.QUndoView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DoItemsLayout +func miqt_exec_callback_QUndoView_DoItemsLayout(self *C.QUndoView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QUndoView) callVirtualBase_Reset() { + + C.QUndoView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QUndoView) OnReset(slot func(super func())) { + C.QUndoView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_Reset +func miqt_exec_callback_QUndoView_Reset(self *C.QUndoView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoView{h: self}).callVirtualBase_Reset) + +} + +func (this *QUndoView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QUndoView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QUndoView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QUndoView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SetRootIndex +func miqt_exec_callback_QUndoView_SetRootIndex(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QUndoView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QUndoView) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QUndoView_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QUndoView) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QUndoView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_Event +func miqt_exec_callback_QUndoView_Event(self *C.QUndoView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QUndoView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QUndoView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QUndoView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ScrollContentsBy +func miqt_exec_callback_QUndoView_ScrollContentsBy(self *C.QUndoView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QUndoView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QUndoView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QUndoView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QUndoView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DataChanged +func miqt_exec_callback_QUndoView_DataChanged(self *C.QUndoView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QUndoView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QUndoView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QUndoView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QUndoView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QUndoView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_RowsInserted +func miqt_exec_callback_QUndoView_RowsInserted(self *C.QUndoView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QUndoView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QUndoView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QUndoView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QUndoView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QUndoView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_RowsAboutToBeRemoved +func miqt_exec_callback_QUndoView_RowsAboutToBeRemoved(self *C.QUndoView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QUndoView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QUndoView) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QUndoView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QUndoView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_MouseMoveEvent +func miqt_exec_callback_QUndoView_MouseMoveEvent(self *C.QUndoView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QUndoView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QUndoView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_MouseReleaseEvent +func miqt_exec_callback_QUndoView_MouseReleaseEvent(self *C.QUndoView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QUndoView_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QUndoView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_WheelEvent +func miqt_exec_callback_QUndoView_WheelEvent(self *C.QUndoView, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QUndoView_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QUndoView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_TimerEvent +func miqt_exec_callback_QUndoView_TimerEvent(self *C.QUndoView, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QUndoView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QUndoView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ResizeEvent +func miqt_exec_callback_QUndoView_ResizeEvent(self *C.QUndoView, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QUndoView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QUndoView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DragMoveEvent +func miqt_exec_callback_QUndoView_DragMoveEvent(self *C.QUndoView, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QUndoView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QUndoView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DragLeaveEvent +func miqt_exec_callback_QUndoView_DragLeaveEvent(self *C.QUndoView, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QUndoView_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QUndoView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DropEvent +func miqt_exec_callback_QUndoView_DropEvent(self *C.QUndoView, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QUndoView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QUndoView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QUndoView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_StartDrag +func miqt_exec_callback_QUndoView_StartDrag(self *C.QUndoView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QUndoView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QUndoView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QUndoView_virtualbase_ViewOptions(unsafe.Pointer(this.h)) + _goptr := newQStyleOptionViewItem(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QUndoView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ViewOptions +func miqt_exec_callback_QUndoView_ViewOptions(self *C.QUndoView, cb C.intptr_t) *C.QStyleOptionViewItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QUndoView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QUndoView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_PaintEvent +func miqt_exec_callback_QUndoView_PaintEvent(self *C.QUndoView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QUndoView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QUndoView) OnHorizontalOffset(slot func(super func() int) int) { + C.QUndoView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_HorizontalOffset +func miqt_exec_callback_QUndoView_HorizontalOffset(self *C.QUndoView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QUndoView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QUndoView) OnVerticalOffset(slot func(super func() int) int) { + C.QUndoView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_VerticalOffset +func miqt_exec_callback_QUndoView_VerticalOffset(self *C.QUndoView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QUndoView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QUndoView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_MoveCursor +func miqt_exec_callback_QUndoView_MoveCursor(self *C.QUndoView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QUndoView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QUndoView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QUndoView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SetSelection +func miqt_exec_callback_QUndoView_SetSelection(self *C.QUndoView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QUndoView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QUndoView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QUndoView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QUndoView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SelectedIndexes +func miqt_exec_callback_QUndoView_SelectedIndexes(self *C.QUndoView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QUndoView) callVirtualBase_UpdateGeometries() { + + C.QUndoView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QUndoView) OnUpdateGeometries(slot func(super func())) { + C.QUndoView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_UpdateGeometries +func miqt_exec_callback_QUndoView_UpdateGeometries(self *C.QUndoView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QUndoView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QUndoView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QUndoView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QUndoView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_IsIndexHidden +func miqt_exec_callback_QUndoView_IsIndexHidden(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QUndoView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QUndoView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QUndoView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_CurrentChanged +func miqt_exec_callback_QUndoView_CurrentChanged(self *C.QUndoView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QUndoView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QUndoView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QUndoView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ViewportSizeHint +func miqt_exec_callback_QUndoView_ViewportSizeHint(self *C.QUndoView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QUndoView) Delete() { - C.QUndoView_Delete(this.h) + C.QUndoView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qundoview.h b/qt/gen_qundoview.h index 405de00a..18f501a8 100644 --- a/qt/gen_qundoview.h +++ b/qt/gen_qundoview.h @@ -15,27 +15,67 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; class QIcon; +class QListView; class QMetaObject; +class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; +class QRect; +class QResizeEvent; +class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QUndoGroup; class QUndoStack; class QUndoView; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QListView QListView; typedef struct QMetaObject QMetaObject; +typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QUndoGroup QUndoGroup; typedef struct QUndoStack QUndoStack; typedef struct QUndoView QUndoView; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QUndoView* QUndoView_new(QWidget* parent); -QUndoView* QUndoView_new2(); -QUndoView* QUndoView_new3(QUndoStack* stack); -QUndoView* QUndoView_new4(QUndoGroup* group); -QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent); -QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent); +void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QUndoView_MetaObject(const QUndoView* self); void* QUndoView_Metacast(QUndoView* self, const char* param1); struct miqt_string QUndoView_Tr(const char* s); @@ -52,7 +92,69 @@ struct miqt_string QUndoView_Tr2(const char* s, const char* c); struct miqt_string QUndoView_Tr3(const char* s, const char* c, int n); struct miqt_string QUndoView_TrUtf82(const char* s, const char* c); struct miqt_string QUndoView_TrUtf83(const char* s, const char* c, int n); -void QUndoView_Delete(QUndoView* self); +void QUndoView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QUndoView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QUndoView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QUndoView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QUndoView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QUndoView_virtualbase_IndexAt(const void* self, QPoint* p); +void QUndoView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QUndoView_virtualbase_DoItemsLayout(void* self); +void QUndoView_override_virtual_Reset(void* self, intptr_t slot); +void QUndoView_virtualbase_Reset(void* self); +void QUndoView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QUndoView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QUndoView_override_virtual_Event(void* self, intptr_t slot); +bool QUndoView_virtualbase_Event(void* self, QEvent* e); +void QUndoView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QUndoView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QUndoView_override_virtual_DataChanged(void* self, intptr_t slot); +void QUndoView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QUndoView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QUndoView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QUndoView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QUndoView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QUndoView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QUndoView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QUndoView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QUndoView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QUndoView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QUndoView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QUndoView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QUndoView_override_virtual_DropEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_DropEvent(void* self, QDropEvent* e); +void QUndoView_override_virtual_StartDrag(void* self, intptr_t slot); +void QUndoView_virtualbase_StartDrag(void* self, int supportedActions); +void QUndoView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QUndoView_virtualbase_ViewOptions(const void* self); +void QUndoView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QUndoView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QUndoView_virtualbase_HorizontalOffset(const void* self); +void QUndoView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QUndoView_virtualbase_VerticalOffset(const void* self); +void QUndoView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QUndoView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QUndoView_override_virtual_SetSelection(void* self, intptr_t slot); +void QUndoView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QUndoView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QUndoView_virtualbase_SelectedIndexes(const void* self); +void QUndoView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QUndoView_virtualbase_UpdateGeometries(void* self); +void QUndoView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QUndoView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QUndoView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QUndoView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QUndoView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QUndoView_virtualbase_ViewportSizeHint(const void* self); +void QUndoView_Delete(QUndoView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qurl.cpp b/qt/gen_qurl.cpp index 258ad5a8..9c397fd5 100644 --- a/qt/gen_qurl.cpp +++ b/qt/gen_qurl.cpp @@ -9,22 +9,26 @@ #include "gen_qurl.h" #include "_cgo_export.h" -QUrl* QUrl_new() { - return new QUrl(); +void QUrl_new(QUrl** outptr_QUrl) { + QUrl* ret = new QUrl(); + *outptr_QUrl = ret; } -QUrl* QUrl_new2(QUrl* copyVal) { - return new QUrl(*copyVal); +void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl) { + QUrl* ret = new QUrl(*copyVal); + *outptr_QUrl = ret; } -QUrl* QUrl_new3(struct miqt_string url) { +void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl) { QString url_QString = QString::fromUtf8(url.data, url.len); - return new QUrl(url_QString); + QUrl* ret = new QUrl(url_QString); + *outptr_QUrl = ret; } -QUrl* QUrl_new4(struct miqt_string url, int mode) { +void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl) { QString url_QString = QString::fromUtf8(url.data, url.len); - return new QUrl(url_QString, static_cast(mode)); + QUrl* ret = new QUrl(url_QString, static_cast(mode)); + *outptr_QUrl = ret; } void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal) { @@ -698,7 +702,11 @@ struct miqt_array /* of QUrl* */ QUrl_FromStringList2(struct miqt_array /* of s return _out; } -void QUrl_Delete(QUrl* self) { - delete self; +void QUrl_Delete(QUrl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qurl.go b/qt/gen_qurl.go index 6009fc77..8efeb168 100644 --- a/qt/gen_qurl.go +++ b/qt/gen_qurl.go @@ -60,7 +60,8 @@ const ( ) type QUrl struct { - h *C.QUrl + h *C.QUrl + isSubclass bool } func (this *QUrl) cPointer() *C.QUrl { @@ -77,6 +78,7 @@ func (this *QUrl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUrl constructs the type using only CGO pointers. func newQUrl(h *C.QUrl) *QUrl { if h == nil { return nil @@ -84,20 +86,33 @@ func newQUrl(h *C.QUrl) *QUrl { return &QUrl{h: h} } +// UnsafeNewQUrl constructs the type using only unsafe pointers. func UnsafeNewQUrl(h unsafe.Pointer) *QUrl { - return newQUrl((*C.QUrl)(h)) + if h == nil { + return nil + } + + return &QUrl{h: (*C.QUrl)(h)} } // NewQUrl constructs a new QUrl object. func NewQUrl() *QUrl { - ret := C.QUrl_new() - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new(&outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } // NewQUrl2 constructs a new QUrl object. func NewQUrl2(copyVal *QUrl) *QUrl { - ret := C.QUrl_new2(copyVal.cPointer()) - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new2(copyVal.cPointer(), &outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } // NewQUrl3 constructs a new QUrl object. @@ -106,8 +121,12 @@ func NewQUrl3(url string) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - ret := C.QUrl_new3(url_ms) - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new3(url_ms, &outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } // NewQUrl4 constructs a new QUrl object. @@ -116,8 +135,12 @@ func NewQUrl4(url string, mode QUrl__ParsingMode) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - ret := C.QUrl_new4(url_ms, (C.int)(mode)) - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new4(url_ms, (C.int)(mode), &outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } func (this *QUrl) OperatorAssign(copyVal *QUrl) { @@ -791,7 +814,7 @@ func QUrl_FromStringList2(uris []string, mode QUrl__ParsingMode) []QUrl { // Delete this object from C++ memory. func (this *QUrl) Delete() { - C.QUrl_Delete(this.h) + C.QUrl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qurl.h b/qt/gen_qurl.h index 22ce55dc..1f22c509 100644 --- a/qt/gen_qurl.h +++ b/qt/gen_qurl.h @@ -24,10 +24,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -QUrl* QUrl_new(); -QUrl* QUrl_new2(QUrl* copyVal); -QUrl* QUrl_new3(struct miqt_string url); -QUrl* QUrl_new4(struct miqt_string url, int mode); +void QUrl_new(QUrl** outptr_QUrl); +void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl); +void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl); +void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl); void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal); void QUrl_OperatorAssignWithUrl(QUrl* self, struct miqt_string url); void QUrl_Swap(QUrl* self, QUrl* other); @@ -112,7 +112,7 @@ void QUrl_SetFragment2(QUrl* self, struct miqt_string fragment, int mode); struct miqt_string QUrl_ToPercentEncoding2(struct miqt_string param1, struct miqt_string exclude); struct miqt_string QUrl_ToPercentEncoding3(struct miqt_string param1, struct miqt_string exclude, struct miqt_string include); struct miqt_array /* of QUrl* */ QUrl_FromStringList2(struct miqt_array /* of struct miqt_string */ uris, int mode); -void QUrl_Delete(QUrl* self); +void QUrl_Delete(QUrl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qurlquery.cpp b/qt/gen_qurlquery.cpp index e1b6edc1..93d1d204 100644 --- a/qt/gen_qurlquery.cpp +++ b/qt/gen_qurlquery.cpp @@ -9,21 +9,25 @@ #include "gen_qurlquery.h" #include "_cgo_export.h" -QUrlQuery* QUrlQuery_new() { - return new QUrlQuery(); +void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery) { + QUrlQuery* ret = new QUrlQuery(); + *outptr_QUrlQuery = ret; } -QUrlQuery* QUrlQuery_new2(QUrl* url) { - return new QUrlQuery(*url); +void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery) { + QUrlQuery* ret = new QUrlQuery(*url); + *outptr_QUrlQuery = ret; } -QUrlQuery* QUrlQuery_new3(struct miqt_string queryString) { +void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery) { QString queryString_QString = QString::fromUtf8(queryString.data, queryString.len); - return new QUrlQuery(queryString_QString); + QUrlQuery* ret = new QUrlQuery(queryString_QString); + *outptr_QUrlQuery = ret; } -QUrlQuery* QUrlQuery_new4(QUrlQuery* other) { - return new QUrlQuery(*other); +void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery) { + QUrlQuery* ret = new QUrlQuery(*other); + *outptr_QUrlQuery = ret; } void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other) { @@ -301,7 +305,11 @@ struct miqt_array /* of struct miqt_string */ QUrlQuery_AllQueryItemValues2(con return _out; } -void QUrlQuery_Delete(QUrlQuery* self) { - delete self; +void QUrlQuery_Delete(QUrlQuery* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qurlquery.go b/qt/gen_qurlquery.go index 8795671a..4a88675b 100644 --- a/qt/gen_qurlquery.go +++ b/qt/gen_qurlquery.go @@ -14,7 +14,8 @@ import ( ) type QUrlQuery struct { - h *C.QUrlQuery + h *C.QUrlQuery + isSubclass bool } func (this *QUrlQuery) cPointer() *C.QUrlQuery { @@ -31,6 +32,7 @@ func (this *QUrlQuery) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUrlQuery constructs the type using only CGO pointers. func newQUrlQuery(h *C.QUrlQuery) *QUrlQuery { if h == nil { return nil @@ -38,20 +40,33 @@ func newQUrlQuery(h *C.QUrlQuery) *QUrlQuery { return &QUrlQuery{h: h} } +// UnsafeNewQUrlQuery constructs the type using only unsafe pointers. func UnsafeNewQUrlQuery(h unsafe.Pointer) *QUrlQuery { - return newQUrlQuery((*C.QUrlQuery)(h)) + if h == nil { + return nil + } + + return &QUrlQuery{h: (*C.QUrlQuery)(h)} } // NewQUrlQuery constructs a new QUrlQuery object. func NewQUrlQuery() *QUrlQuery { - ret := C.QUrlQuery_new() - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new(&outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } // NewQUrlQuery2 constructs a new QUrlQuery object. func NewQUrlQuery2(url *QUrl) *QUrlQuery { - ret := C.QUrlQuery_new2(url.cPointer()) - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new2(url.cPointer(), &outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } // NewQUrlQuery3 constructs a new QUrlQuery object. @@ -60,14 +75,22 @@ func NewQUrlQuery3(queryString string) *QUrlQuery { queryString_ms.data = C.CString(queryString) queryString_ms.len = C.size_t(len(queryString)) defer C.free(unsafe.Pointer(queryString_ms.data)) - ret := C.QUrlQuery_new3(queryString_ms) - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new3(queryString_ms, &outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } // NewQUrlQuery4 constructs a new QUrlQuery object. func NewQUrlQuery4(other *QUrlQuery) *QUrlQuery { - ret := C.QUrlQuery_new4(other.cPointer()) - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new4(other.cPointer(), &outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } func (this *QUrlQuery) OperatorAssign(other *QUrlQuery) { @@ -352,7 +375,7 @@ func (this *QUrlQuery) AllQueryItemValues2(key string, encoding QUrl__ComponentF // Delete this object from C++ memory. func (this *QUrlQuery) Delete() { - C.QUrlQuery_Delete(this.h) + C.QUrlQuery_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qurlquery.h b/qt/gen_qurlquery.h index 75e1df65..9dfda84e 100644 --- a/qt/gen_qurlquery.h +++ b/qt/gen_qurlquery.h @@ -24,10 +24,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -QUrlQuery* QUrlQuery_new(); -QUrlQuery* QUrlQuery_new2(QUrl* url); -QUrlQuery* QUrlQuery_new3(struct miqt_string queryString); -QUrlQuery* QUrlQuery_new4(QUrlQuery* other); +void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery); +void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery); +void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery); +void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery); void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorEqual(const QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorNotEqual(const QUrlQuery* self, QUrlQuery* other); @@ -56,7 +56,7 @@ struct miqt_string QUrlQuery_ToString1(const QUrlQuery* self, int encoding); struct miqt_array /* of struct miqt_map tuple of struct miqt_string and struct miqt_string */ QUrlQuery_QueryItems1(const QUrlQuery* self, int encoding); struct miqt_string QUrlQuery_QueryItemValue2(const QUrlQuery* self, struct miqt_string key, int encoding); struct miqt_array /* of struct miqt_string */ QUrlQuery_AllQueryItemValues2(const QUrlQuery* self, struct miqt_string key, int encoding); -void QUrlQuery_Delete(QUrlQuery* self); +void QUrlQuery_Delete(QUrlQuery* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_quuid.cpp b/qt/gen_quuid.cpp index e2adc5bd..3ce96c4d 100644 --- a/qt/gen_quuid.cpp +++ b/qt/gen_quuid.cpp @@ -7,30 +7,36 @@ #include "gen_quuid.h" #include "_cgo_export.h" -QUuid* QUuid_new() { - return new QUuid(); +void QUuid_new(QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(); + *outptr_QUuid = ret; } -QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8) { - return new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); +void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); + *outptr_QUuid = ret; } -QUuid* QUuid_new3(struct miqt_string param1) { +void QUuid_new3(struct miqt_string param1, QUuid** outptr_QUuid) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - return new QUuid(param1_QString); + QUuid* ret = new QUuid(param1_QString); + *outptr_QUuid = ret; } -QUuid* QUuid_new4(const char* param1) { - return new QUuid(param1); +void QUuid_new4(const char* param1, QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(param1); + *outptr_QUuid = ret; } -QUuid* QUuid_new5(struct miqt_string param1) { +void QUuid_new5(struct miqt_string param1, QUuid** outptr_QUuid) { QByteArray param1_QByteArray(param1.data, param1.len); - return new QUuid(param1_QByteArray); + QUuid* ret = new QUuid(param1_QByteArray); + *outptr_QUuid = ret; } -QUuid* QUuid_new6(QUuid* param1) { - return new QUuid(*param1); +void QUuid_new6(QUuid* param1, QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(*param1); + *outptr_QUuid = ret; } struct miqt_string QUuid_ToString(const QUuid* self) { @@ -141,7 +147,11 @@ int QUuid_Version(const QUuid* self) { return static_cast(_ret); } -void QUuid_Delete(QUuid* self) { - delete self; +void QUuid_Delete(QUuid* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_quuid.go b/qt/gen_quuid.go index 3735a292..8c0270e5 100644 --- a/qt/gen_quuid.go +++ b/qt/gen_quuid.go @@ -44,7 +44,8 @@ const ( ) type QUuid struct { - h *C.QUuid + h *C.QUuid + isSubclass bool } func (this *QUuid) cPointer() *C.QUuid { @@ -61,6 +62,7 @@ func (this *QUuid) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUuid constructs the type using only CGO pointers. func newQUuid(h *C.QUuid) *QUuid { if h == nil { return nil @@ -68,20 +70,33 @@ func newQUuid(h *C.QUuid) *QUuid { return &QUuid{h: h} } +// UnsafeNewQUuid constructs the type using only unsafe pointers. func UnsafeNewQUuid(h unsafe.Pointer) *QUuid { - return newQUuid((*C.QUuid)(h)) + if h == nil { + return nil + } + + return &QUuid{h: (*C.QUuid)(h)} } // NewQUuid constructs a new QUuid object. func NewQUuid() *QUuid { - ret := C.QUuid_new() - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new(&outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid2 constructs a new QUuid object. func NewQUuid2(l uint, w1 uint16, w2 uint16, b1 byte, b2 byte, b3 byte, b4 byte, b5 byte, b6 byte, b7 byte, b8 byte) *QUuid { - ret := C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8)) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8), &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid3 constructs a new QUuid object. @@ -90,16 +105,24 @@ func NewQUuid3(param1 string) *QUuid { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - ret := C.QUuid_new3(param1_ms) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new3(param1_ms, &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid4 constructs a new QUuid object. func NewQUuid4(param1 string) *QUuid { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) - ret := C.QUuid_new4(param1_Cstring) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new4(param1_Cstring, &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid5 constructs a new QUuid object. @@ -107,14 +130,22 @@ func NewQUuid5(param1 []byte) *QUuid { param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - ret := C.QUuid_new5(param1_alias) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new5(param1_alias, &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid6 constructs a new QUuid object. func NewQUuid6(param1 *QUuid) *QUuid { - ret := C.QUuid_new6(param1.cPointer()) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new6(param1.cPointer(), &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } func (this *QUuid) ToString() string { @@ -241,7 +272,7 @@ func (this *QUuid) Version() QUuid__Version { // Delete this object from C++ memory. func (this *QUuid) Delete() { - C.QUuid_Delete(this.h) + C.QUuid_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_quuid.h b/qt/gen_quuid.h index 816ce9d9..e5a1216c 100644 --- a/qt/gen_quuid.h +++ b/qt/gen_quuid.h @@ -22,12 +22,12 @@ typedef struct QByteArray QByteArray; typedef struct QUuid QUuid; #endif -QUuid* QUuid_new(); -QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8); -QUuid* QUuid_new3(struct miqt_string param1); -QUuid* QUuid_new4(const char* param1); -QUuid* QUuid_new5(struct miqt_string param1); -QUuid* QUuid_new6(QUuid* param1); +void QUuid_new(QUuid** outptr_QUuid); +void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid); +void QUuid_new3(struct miqt_string param1, QUuid** outptr_QUuid); +void QUuid_new4(const char* param1, QUuid** outptr_QUuid); +void QUuid_new5(struct miqt_string param1, QUuid** outptr_QUuid); +void QUuid_new6(QUuid* param1, QUuid** outptr_QUuid); struct miqt_string QUuid_ToString(const QUuid* self); struct miqt_string QUuid_ToStringWithMode(const QUuid* self, int mode); struct miqt_string QUuid_ToByteArray(const QUuid* self); @@ -46,7 +46,7 @@ QUuid* QUuid_CreateUuidV32(QUuid* ns, struct miqt_string baseData); QUuid* QUuid_CreateUuidV52(QUuid* ns, struct miqt_string baseData); int QUuid_Variant(const QUuid* self); int QUuid_Version(const QUuid* self); -void QUuid_Delete(QUuid* self); +void QUuid_Delete(QUuid* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qvalidator.cpp b/qt/gen_qvalidator.cpp index dc097006..c27a0895 100644 --- a/qt/gen_qvalidator.cpp +++ b/qt/gen_qvalidator.cpp @@ -118,24 +118,142 @@ struct miqt_string QValidator_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QValidator_Delete(QValidator* self) { - delete self; -} +void QValidator_Delete(QValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQIntValidator : public virtual QIntValidator { +public: + + MiqtVirtualQIntValidator(): QIntValidator() {}; + MiqtVirtualQIntValidator(int bottom, int top): QIntValidator(bottom, top) {}; + MiqtVirtualQIntValidator(QObject* parent): QIntValidator(parent) {}; + MiqtVirtualQIntValidator(int bottom, int top, QObject* parent): QIntValidator(bottom, top, parent) {}; + + virtual ~MiqtVirtualQIntValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& param1, int& param2) const override { + if (handle__Validate == 0) { + return QIntValidator::validate(param1, param2); + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + int* sigval2 = ¶m2; + + int callback_return_value = miqt_exec_callback_QIntValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string param1, int* param2) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QValidator::State _ret = QIntValidator::validate(param1_QString, static_cast(*param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QIntValidator::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QIntValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QIntValidator::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRange = 0; + + // Subclass to allow providing a Go implementation + virtual void setRange(int bottom, int top) override { + if (handle__SetRange == 0) { + QIntValidator::setRange(bottom, top); + return; + } + + int sigval1 = bottom; + int sigval2 = top; + + miqt_exec_callback_QIntValidator_SetRange(this, handle__SetRange, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRange(int bottom, int top) { + + QIntValidator::setRange(static_cast(bottom), static_cast(top)); + + } -QIntValidator* QIntValidator_new() { - return new QIntValidator(); +}; + +void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIntValidator* QIntValidator_new2(int bottom, int top) { - return new QIntValidator(static_cast(bottom), static_cast(top)); +void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top)); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIntValidator* QIntValidator_new3(QObject* parent) { - return new QIntValidator(parent); +void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(parent); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent) { - return new QIntValidator(static_cast(bottom), static_cast(top), parent); +void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top), parent); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QIntValidator_MetaObject(const QIntValidator* self) { @@ -204,7 +322,7 @@ void QIntValidator_BottomChanged(QIntValidator* self, int bottom) { } void QIntValidator_connect_BottomChanged(QIntValidator* self, intptr_t slot) { - QIntValidator::connect(self, static_cast(&QIntValidator::bottomChanged), self, [=](int bottom) { + MiqtVirtualQIntValidator::connect(self, static_cast(&QIntValidator::bottomChanged), self, [=](int bottom) { int sigval1 = bottom; miqt_exec_callback_QIntValidator_BottomChanged(slot, sigval1); }); @@ -215,7 +333,7 @@ void QIntValidator_TopChanged(QIntValidator* self, int top) { } void QIntValidator_connect_TopChanged(QIntValidator* self, intptr_t slot) { - QIntValidator::connect(self, static_cast(&QIntValidator::topChanged), self, [=](int top) { + MiqtVirtualQIntValidator::connect(self, static_cast(&QIntValidator::topChanged), self, [=](int top) { int sigval1 = top; miqt_exec_callback_QIntValidator_TopChanged(slot, sigval1); }); @@ -265,24 +383,167 @@ struct miqt_string QIntValidator_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QIntValidator_Delete(QIntValidator* self) { - delete self; +void QIntValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QIntValidator*)(self) )->handle__Validate = slot; +} + +int QIntValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2) { + return ( (const MiqtVirtualQIntValidator*)(self) )->virtualbase_Validate(param1, param2); } -QDoubleValidator* QDoubleValidator_new() { - return new QDoubleValidator(); +void QIntValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QIntValidator*)(self) )->handle__Fixup = slot; } -QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals) { - return new QDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); +void QIntValidator_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQIntValidator*)(self) )->virtualbase_Fixup(input); } -QDoubleValidator* QDoubleValidator_new3(QObject* parent) { - return new QDoubleValidator(parent); +void QIntValidator_override_virtual_SetRange(void* self, intptr_t slot) { + dynamic_cast( (QIntValidator*)(self) )->handle__SetRange = slot; } -QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent) { - return new QDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); +void QIntValidator_virtualbase_SetRange(void* self, int bottom, int top) { + ( (MiqtVirtualQIntValidator*)(self) )->virtualbase_SetRange(bottom, top); +} + +void QIntValidator_Delete(QIntValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDoubleValidator : public virtual QDoubleValidator { +public: + + MiqtVirtualQDoubleValidator(): QDoubleValidator() {}; + MiqtVirtualQDoubleValidator(double bottom, double top, int decimals): QDoubleValidator(bottom, top, decimals) {}; + MiqtVirtualQDoubleValidator(QObject* parent): QDoubleValidator(parent) {}; + MiqtVirtualQDoubleValidator(double bottom, double top, int decimals, QObject* parent): QDoubleValidator(bottom, top, decimals, parent) {}; + + virtual ~MiqtVirtualQDoubleValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& param1, int& param2) const override { + if (handle__Validate == 0) { + return QDoubleValidator::validate(param1, param2); + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + int* sigval2 = ¶m2; + + int callback_return_value = miqt_exec_callback_QDoubleValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string param1, int* param2) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QValidator::State _ret = QDoubleValidator::validate(param1_QString, static_cast(*param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRange = 0; + + // Subclass to allow providing a Go implementation + virtual void setRange(double bottom, double top, int decimals) override { + if (handle__SetRange == 0) { + QDoubleValidator::setRange(bottom, top, decimals); + return; + } + + double sigval1 = bottom; + double sigval2 = top; + int sigval3 = decimals; + + miqt_exec_callback_QDoubleValidator_SetRange(this, handle__SetRange, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRange(double bottom, double top, int decimals) { + + QDoubleValidator::setRange(static_cast(bottom), static_cast(top), static_cast(decimals)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& param1) const override { + if (handle__Fixup == 0) { + QDoubleValidator::fixup(param1); + return; + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + + miqt_exec_callback_QDoubleValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string param1) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QDoubleValidator::fixup(param1_QString); + + } + +}; + +void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(parent); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self) { @@ -321,8 +582,8 @@ int QDoubleValidator_Validate(const QDoubleValidator* self, struct miqt_string p return static_cast(_ret); } -void QDoubleValidator_SetRange(QDoubleValidator* self, double bottom, double top) { - self->setRange(static_cast(bottom), static_cast(top)); +void QDoubleValidator_SetRange(QDoubleValidator* self, double bottom, double top, int decimals) { + self->setRange(static_cast(bottom), static_cast(top), static_cast(decimals)); } void QDoubleValidator_SetBottom(QDoubleValidator* self, double bottom) { @@ -363,7 +624,7 @@ void QDoubleValidator_BottomChanged(QDoubleValidator* self, double bottom) { } void QDoubleValidator_connect_BottomChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::bottomChanged), self, [=](double bottom) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::bottomChanged), self, [=](double bottom) { double sigval1 = bottom; miqt_exec_callback_QDoubleValidator_BottomChanged(slot, sigval1); }); @@ -374,7 +635,7 @@ void QDoubleValidator_TopChanged(QDoubleValidator* self, double top) { } void QDoubleValidator_connect_TopChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::topChanged), self, [=](double top) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::topChanged), self, [=](double top) { double sigval1 = top; miqt_exec_callback_QDoubleValidator_TopChanged(slot, sigval1); }); @@ -385,7 +646,7 @@ void QDoubleValidator_DecimalsChanged(QDoubleValidator* self, int decimals) { } void QDoubleValidator_connect_DecimalsChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::decimalsChanged), self, [=](int decimals) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::decimalsChanged), self, [=](int decimals) { int sigval1 = decimals; miqt_exec_callback_QDoubleValidator_DecimalsChanged(slot, sigval1); }); @@ -396,7 +657,7 @@ void QDoubleValidator_NotationChanged(QDoubleValidator* self, int notation) { } void QDoubleValidator_connect_NotationChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::notationChanged), self, [=](QDoubleValidator::Notation notation) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::notationChanged), self, [=](QDoubleValidator::Notation notation) { QDoubleValidator::Notation notation_ret = notation; int sigval1 = static_cast(notation_ret); miqt_exec_callback_QDoubleValidator_NotationChanged(slot, sigval1); @@ -447,28 +708,141 @@ struct miqt_string QDoubleValidator_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QDoubleValidator_SetRange3(QDoubleValidator* self, double bottom, double top, int decimals) { - self->setRange(static_cast(bottom), static_cast(top), static_cast(decimals)); +void QDoubleValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDoubleValidator*)(self) )->handle__Validate = slot; +} + +int QDoubleValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2) { + return ( (const MiqtVirtualQDoubleValidator*)(self) )->virtualbase_Validate(param1, param2); +} + +void QDoubleValidator_override_virtual_SetRange(void* self, intptr_t slot) { + dynamic_cast( (QDoubleValidator*)(self) )->handle__SetRange = slot; +} + +void QDoubleValidator_virtualbase_SetRange(void* self, double bottom, double top, int decimals) { + ( (MiqtVirtualQDoubleValidator*)(self) )->virtualbase_SetRange(bottom, top, decimals); +} + +void QDoubleValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDoubleValidator*)(self) )->handle__Fixup = slot; +} + +void QDoubleValidator_virtualbase_Fixup(const void* self, struct miqt_string param1) { + ( (const MiqtVirtualQDoubleValidator*)(self) )->virtualbase_Fixup(param1); } -void QDoubleValidator_Delete(QDoubleValidator* self) { - delete self; +void QDoubleValidator_Delete(QDoubleValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRegExpValidator* QRegExpValidator_new() { - return new QRegExpValidator(); +class MiqtVirtualQRegExpValidator : public virtual QRegExpValidator { +public: + + MiqtVirtualQRegExpValidator(): QRegExpValidator() {}; + MiqtVirtualQRegExpValidator(const QRegExp& rx): QRegExpValidator(rx) {}; + MiqtVirtualQRegExpValidator(QObject* parent): QRegExpValidator(parent) {}; + MiqtVirtualQRegExpValidator(const QRegExp& rx, QObject* parent): QRegExpValidator(rx, parent) {}; + + virtual ~MiqtVirtualQRegExpValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QRegExpValidator::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QRegExpValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QRegExpValidator::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& param1) const override { + if (handle__Fixup == 0) { + QRegExpValidator::fixup(param1); + return; + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + + miqt_exec_callback_QRegExpValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string param1) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QRegExpValidator::fixup(param1_QString); + + } + +}; + +void QRegExpValidator_new(QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(); + *outptr_QRegExpValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRegExpValidator* QRegExpValidator_new2(QRegExp* rx) { - return new QRegExpValidator(*rx); +void QRegExpValidator_new2(QRegExp* rx, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(*rx); + *outptr_QRegExpValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRegExpValidator* QRegExpValidator_new3(QObject* parent) { - return new QRegExpValidator(parent); +void QRegExpValidator_new3(QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(parent); + *outptr_QRegExpValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRegExpValidator* QRegExpValidator_new4(QRegExp* rx, QObject* parent) { - return new QRegExpValidator(*rx, parent); +void QRegExpValidator_new4(QRegExp* rx, QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(*rx, parent); + *outptr_QRegExpValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QRegExpValidator_MetaObject(const QRegExpValidator* self) { @@ -522,7 +896,7 @@ void QRegExpValidator_RegExpChanged(QRegExpValidator* self, QRegExp* regExp) { } void QRegExpValidator_connect_RegExpChanged(QRegExpValidator* self, intptr_t slot) { - QRegExpValidator::connect(self, static_cast(&QRegExpValidator::regExpChanged), self, [=](const QRegExp& regExp) { + MiqtVirtualQRegExpValidator::connect(self, static_cast(&QRegExpValidator::regExpChanged), self, [=](const QRegExp& regExp) { const QRegExp& regExp_ret = regExp; // Cast returned reference into pointer QRegExp* sigval1 = const_cast(®Exp_ret); @@ -574,24 +948,133 @@ struct miqt_string QRegExpValidator_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QRegExpValidator_Delete(QRegExpValidator* self) { - delete self; +void QRegExpValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QRegExpValidator*)(self) )->handle__Validate = slot; } -QRegularExpressionValidator* QRegularExpressionValidator_new() { - return new QRegularExpressionValidator(); +int QRegExpValidator_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQRegExpValidator*)(self) )->virtualbase_Validate(input, pos); } -QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re) { - return new QRegularExpressionValidator(*re); +void QRegExpValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QRegExpValidator*)(self) )->handle__Fixup = slot; } -QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent) { - return new QRegularExpressionValidator(parent); +void QRegExpValidator_virtualbase_Fixup(const void* self, struct miqt_string param1) { + ( (const MiqtVirtualQRegExpValidator*)(self) )->virtualbase_Fixup(param1); } -QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent) { - return new QRegularExpressionValidator(*re, parent); +void QRegExpValidator_Delete(QRegExpValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQRegularExpressionValidator : public virtual QRegularExpressionValidator { +public: + + MiqtVirtualQRegularExpressionValidator(): QRegularExpressionValidator() {}; + MiqtVirtualQRegularExpressionValidator(const QRegularExpression& re): QRegularExpressionValidator(re) {}; + MiqtVirtualQRegularExpressionValidator(QObject* parent): QRegularExpressionValidator(parent) {}; + MiqtVirtualQRegularExpressionValidator(const QRegularExpression& re, QObject* parent): QRegularExpressionValidator(re, parent) {}; + + virtual ~MiqtVirtualQRegularExpressionValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QRegularExpressionValidator::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QRegularExpressionValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QRegularExpressionValidator::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& param1) const override { + if (handle__Fixup == 0) { + QRegularExpressionValidator::fixup(param1); + return; + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + + miqt_exec_callback_QRegularExpressionValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string param1) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QRegularExpressionValidator::fixup(param1_QString); + + } + +}; + +void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(parent); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re, parent); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self) { @@ -643,7 +1126,7 @@ void QRegularExpressionValidator_RegularExpressionChanged(QRegularExpressionVali } void QRegularExpressionValidator_connect_RegularExpressionChanged(QRegularExpressionValidator* self, intptr_t slot) { - QRegularExpressionValidator::connect(self, static_cast(&QRegularExpressionValidator::regularExpressionChanged), self, [=](const QRegularExpression& re) { + MiqtVirtualQRegularExpressionValidator::connect(self, static_cast(&QRegularExpressionValidator::regularExpressionChanged), self, [=](const QRegularExpression& re) { const QRegularExpression& re_ret = re; // Cast returned reference into pointer QRegularExpression* sigval1 = const_cast(&re_ret); @@ -695,7 +1178,27 @@ struct miqt_string QRegularExpressionValidator_TrUtf83(const char* s, const char return _ms; } -void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self) { - delete self; +void QRegularExpressionValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QRegularExpressionValidator*)(self) )->handle__Validate = slot; +} + +int QRegularExpressionValidator_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQRegularExpressionValidator*)(self) )->virtualbase_Validate(input, pos); +} + +void QRegularExpressionValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QRegularExpressionValidator*)(self) )->handle__Fixup = slot; +} + +void QRegularExpressionValidator_virtualbase_Fixup(const void* self, struct miqt_string param1) { + ( (const MiqtVirtualQRegularExpressionValidator*)(self) )->virtualbase_Fixup(param1); +} + +void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qvalidator.go b/qt/gen_qvalidator.go index 2329c3b3..36282c38 100644 --- a/qt/gen_qvalidator.go +++ b/qt/gen_qvalidator.go @@ -30,7 +30,8 @@ const ( ) type QValidator struct { - h *C.QValidator + h *C.QValidator + isSubclass bool *QObject } @@ -48,15 +49,23 @@ func (this *QValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQValidator(h *C.QValidator) *QValidator { +// newQValidator constructs the type using only CGO pointers. +func newQValidator(h *C.QValidator, h_QObject *C.QObject) *QValidator { if h == nil { return nil } - return &QValidator{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QValidator{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQValidator(h unsafe.Pointer) *QValidator { - return newQValidator((*C.QValidator)(h)) +// UnsafeNewQValidator constructs the type using only unsafe pointers. +func UnsafeNewQValidator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QValidator { + if h == nil { + return nil + } + + return &QValidator{h: (*C.QValidator)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QValidator) MetaObject() *QMetaObject { @@ -177,7 +186,7 @@ func QValidator_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QValidator) Delete() { - C.QValidator_Delete(this.h) + C.QValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -190,7 +199,8 @@ func (this *QValidator) GoGC() { } type QIntValidator struct { - h *C.QIntValidator + h *C.QIntValidator + isSubclass bool *QValidator } @@ -208,39 +218,71 @@ func (this *QIntValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIntValidator(h *C.QIntValidator) *QIntValidator { +// newQIntValidator constructs the type using only CGO pointers. +func newQIntValidator(h *C.QIntValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QIntValidator { if h == nil { return nil } - return &QIntValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QIntValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQIntValidator(h unsafe.Pointer) *QIntValidator { - return newQIntValidator((*C.QIntValidator)(h)) +// UnsafeNewQIntValidator constructs the type using only unsafe pointers. +func UnsafeNewQIntValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QIntValidator { + if h == nil { + return nil + } + + return &QIntValidator{h: (*C.QIntValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQIntValidator constructs a new QIntValidator object. func NewQIntValidator() *QIntValidator { - ret := C.QIntValidator_new() - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new(&outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIntValidator2 constructs a new QIntValidator object. func NewQIntValidator2(bottom int, top int) *QIntValidator { - ret := C.QIntValidator_new2((C.int)(bottom), (C.int)(top)) - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new2((C.int)(bottom), (C.int)(top), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIntValidator3 constructs a new QIntValidator object. func NewQIntValidator3(parent *QObject) *QIntValidator { - ret := C.QIntValidator_new3(parent.cPointer()) - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new3(parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIntValidator4 constructs a new QIntValidator object. func NewQIntValidator4(bottom int, top int, parent *QObject) *QIntValidator { - ret := C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer()) - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QIntValidator) MetaObject() *QMetaObject { @@ -391,9 +433,97 @@ func QIntValidator_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QIntValidator) callVirtualBase_Validate(param1 string, param2 *int) QValidator__State { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + return (QValidator__State)(C.QIntValidator_virtualbase_Validate(unsafe.Pointer(this.h), param1_ms, (*C.int)(unsafe.Pointer(param2)))) + +} +func (this *QIntValidator) OnValidate(slot func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) { + C.QIntValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIntValidator_Validate +func miqt_exec_callback_QIntValidator_Validate(self *C.QIntValidator, cb C.intptr_t, param1 C.struct_miqt_string, param2 *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + slotval2 := (*int)(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QIntValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QIntValidator) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QIntValidator_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QIntValidator) OnFixup(slot func(super func(input string), input string)) { + C.QIntValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIntValidator_Fixup +func miqt_exec_callback_QIntValidator_Fixup(self *C.QIntValidator, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QIntValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QIntValidator) callVirtualBase_SetRange(bottom int, top int) { + + C.QIntValidator_virtualbase_SetRange(unsafe.Pointer(this.h), (C.int)(bottom), (C.int)(top)) + +} +func (this *QIntValidator) OnSetRange(slot func(super func(bottom int, top int), bottom int, top int)) { + C.QIntValidator_override_virtual_SetRange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIntValidator_SetRange +func miqt_exec_callback_QIntValidator_SetRange(self *C.QIntValidator, cb C.intptr_t, bottom C.int, top C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(bottom int, top int), bottom int, top int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(bottom) + + slotval2 := (int)(top) + + gofunc((&QIntValidator{h: self}).callVirtualBase_SetRange, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QIntValidator) Delete() { - C.QIntValidator_Delete(this.h) + C.QIntValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -406,7 +536,8 @@ func (this *QIntValidator) GoGC() { } type QDoubleValidator struct { - h *C.QDoubleValidator + h *C.QDoubleValidator + isSubclass bool *QValidator } @@ -424,39 +555,71 @@ func (this *QDoubleValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDoubleValidator(h *C.QDoubleValidator) *QDoubleValidator { +// newQDoubleValidator constructs the type using only CGO pointers. +func newQDoubleValidator(h *C.QDoubleValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QDoubleValidator { if h == nil { return nil } - return &QDoubleValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QDoubleValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQDoubleValidator(h unsafe.Pointer) *QDoubleValidator { - return newQDoubleValidator((*C.QDoubleValidator)(h)) +// UnsafeNewQDoubleValidator constructs the type using only unsafe pointers. +func UnsafeNewQDoubleValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QDoubleValidator { + if h == nil { + return nil + } + + return &QDoubleValidator{h: (*C.QDoubleValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQDoubleValidator constructs a new QDoubleValidator object. func NewQDoubleValidator() *QDoubleValidator { - ret := C.QDoubleValidator_new() - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new(&outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDoubleValidator2 constructs a new QDoubleValidator object. func NewQDoubleValidator2(bottom float64, top float64, decimals int) *QDoubleValidator { - ret := C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals)) - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDoubleValidator3 constructs a new QDoubleValidator object. func NewQDoubleValidator3(parent *QObject) *QDoubleValidator { - ret := C.QDoubleValidator_new3(parent.cPointer()) - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new3(parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDoubleValidator4 constructs a new QDoubleValidator object. func NewQDoubleValidator4(bottom float64, top float64, decimals int, parent *QObject) *QDoubleValidator { - ret := C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer()) - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDoubleValidator) MetaObject() *QMetaObject { @@ -495,8 +658,8 @@ func (this *QDoubleValidator) Validate(param1 string, param2 *int) QValidator__S return (QValidator__State)(C.QDoubleValidator_Validate(this.h, param1_ms, (*C.int)(unsafe.Pointer(param2)))) } -func (this *QDoubleValidator) SetRange(bottom float64, top float64) { - C.QDoubleValidator_SetRange(this.h, (C.double)(bottom), (C.double)(top)) +func (this *QDoubleValidator) SetRange(bottom float64, top float64, decimals int) { + C.QDoubleValidator_SetRange(this.h, (C.double)(bottom), (C.double)(top), (C.int)(decimals)) } func (this *QDoubleValidator) SetBottom(bottom float64) { @@ -655,13 +818,99 @@ func QDoubleValidator_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QDoubleValidator) SetRange3(bottom float64, top float64, decimals int) { - C.QDoubleValidator_SetRange3(this.h, (C.double)(bottom), (C.double)(top), (C.int)(decimals)) +func (this *QDoubleValidator) callVirtualBase_Validate(param1 string, param2 *int) QValidator__State { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + return (QValidator__State)(C.QDoubleValidator_virtualbase_Validate(unsafe.Pointer(this.h), param1_ms, (*C.int)(unsafe.Pointer(param2)))) + +} +func (this *QDoubleValidator) OnValidate(slot func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) { + C.QDoubleValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleValidator_Validate +func miqt_exec_callback_QDoubleValidator_Validate(self *C.QDoubleValidator, cb C.intptr_t, param1 C.struct_miqt_string, param2 *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + slotval2 := (*int)(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QDoubleValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QDoubleValidator) callVirtualBase_SetRange(bottom float64, top float64, decimals int) { + + C.QDoubleValidator_virtualbase_SetRange(unsafe.Pointer(this.h), (C.double)(bottom), (C.double)(top), (C.int)(decimals)) + +} +func (this *QDoubleValidator) OnSetRange(slot func(super func(bottom float64, top float64, decimals int), bottom float64, top float64, decimals int)) { + C.QDoubleValidator_override_virtual_SetRange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleValidator_SetRange +func miqt_exec_callback_QDoubleValidator_SetRange(self *C.QDoubleValidator, cb C.intptr_t, bottom C.double, top C.double, decimals C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(bottom float64, top float64, decimals int), bottom float64, top float64, decimals int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(bottom) + + slotval2 := (float64)(top) + + slotval3 := (int)(decimals) + + gofunc((&QDoubleValidator{h: self}).callVirtualBase_SetRange, slotval1, slotval2, slotval3) + +} + +func (this *QDoubleValidator) callVirtualBase_Fixup(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + C.QDoubleValidator_virtualbase_Fixup(unsafe.Pointer(this.h), param1_ms) + +} +func (this *QDoubleValidator) OnFixup(slot func(super func(param1 string), param1 string)) { + C.QDoubleValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleValidator_Fixup +func miqt_exec_callback_QDoubleValidator_Fixup(self *C.QDoubleValidator, cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string), param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc((&QDoubleValidator{h: self}).callVirtualBase_Fixup, slotval1) + } // Delete this object from C++ memory. func (this *QDoubleValidator) Delete() { - C.QDoubleValidator_Delete(this.h) + C.QDoubleValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -674,7 +923,8 @@ func (this *QDoubleValidator) GoGC() { } type QRegExpValidator struct { - h *C.QRegExpValidator + h *C.QRegExpValidator + isSubclass bool *QValidator } @@ -692,39 +942,71 @@ func (this *QRegExpValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRegExpValidator(h *C.QRegExpValidator) *QRegExpValidator { +// newQRegExpValidator constructs the type using only CGO pointers. +func newQRegExpValidator(h *C.QRegExpValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QRegExpValidator { if h == nil { return nil } - return &QRegExpValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QRegExpValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQRegExpValidator(h unsafe.Pointer) *QRegExpValidator { - return newQRegExpValidator((*C.QRegExpValidator)(h)) +// UnsafeNewQRegExpValidator constructs the type using only unsafe pointers. +func UnsafeNewQRegExpValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QRegExpValidator { + if h == nil { + return nil + } + + return &QRegExpValidator{h: (*C.QRegExpValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQRegExpValidator constructs a new QRegExpValidator object. func NewQRegExpValidator() *QRegExpValidator { - ret := C.QRegExpValidator_new() - return newQRegExpValidator(ret) + var outptr_QRegExpValidator *C.QRegExpValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegExpValidator_new(&outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegExpValidator2 constructs a new QRegExpValidator object. func NewQRegExpValidator2(rx *QRegExp) *QRegExpValidator { - ret := C.QRegExpValidator_new2(rx.cPointer()) - return newQRegExpValidator(ret) + var outptr_QRegExpValidator *C.QRegExpValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegExpValidator_new2(rx.cPointer(), &outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegExpValidator3 constructs a new QRegExpValidator object. func NewQRegExpValidator3(parent *QObject) *QRegExpValidator { - ret := C.QRegExpValidator_new3(parent.cPointer()) - return newQRegExpValidator(ret) + var outptr_QRegExpValidator *C.QRegExpValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegExpValidator_new3(parent.cPointer(), &outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegExpValidator4 constructs a new QRegExpValidator object. func NewQRegExpValidator4(rx *QRegExp, parent *QObject) *QRegExpValidator { - ret := C.QRegExpValidator_new4(rx.cPointer(), parent.cPointer()) - return newQRegExpValidator(ret) + var outptr_QRegExpValidator *C.QRegExpValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegExpValidator_new4(rx.cPointer(), parent.cPointer(), &outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QRegExpValidator) MetaObject() *QMetaObject { @@ -835,9 +1117,72 @@ func QRegExpValidator_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QRegExpValidator) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QRegExpValidator_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QRegExpValidator) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QRegExpValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRegExpValidator_Validate +func miqt_exec_callback_QRegExpValidator_Validate(self *C.QRegExpValidator, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QRegExpValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QRegExpValidator) callVirtualBase_Fixup(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + C.QRegExpValidator_virtualbase_Fixup(unsafe.Pointer(this.h), param1_ms) + +} +func (this *QRegExpValidator) OnFixup(slot func(super func(param1 string), param1 string)) { + C.QRegExpValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRegExpValidator_Fixup +func miqt_exec_callback_QRegExpValidator_Fixup(self *C.QRegExpValidator, cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string), param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc((&QRegExpValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + // Delete this object from C++ memory. func (this *QRegExpValidator) Delete() { - C.QRegExpValidator_Delete(this.h) + C.QRegExpValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -850,7 +1195,8 @@ func (this *QRegExpValidator) GoGC() { } type QRegularExpressionValidator struct { - h *C.QRegularExpressionValidator + h *C.QRegularExpressionValidator + isSubclass bool *QValidator } @@ -868,39 +1214,71 @@ func (this *QRegularExpressionValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRegularExpressionValidator(h *C.QRegularExpressionValidator) *QRegularExpressionValidator { +// newQRegularExpressionValidator constructs the type using only CGO pointers. +func newQRegularExpressionValidator(h *C.QRegularExpressionValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QRegularExpressionValidator { if h == nil { return nil } - return &QRegularExpressionValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QRegularExpressionValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer) *QRegularExpressionValidator { - return newQRegularExpressionValidator((*C.QRegularExpressionValidator)(h)) +// UnsafeNewQRegularExpressionValidator constructs the type using only unsafe pointers. +func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QRegularExpressionValidator { + if h == nil { + return nil + } + + return &QRegularExpressionValidator{h: (*C.QRegularExpressionValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQRegularExpressionValidator constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator() *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new() - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new(&outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegularExpressionValidator2 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator2(re *QRegularExpression) *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new2(re.cPointer()) - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new2(re.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegularExpressionValidator3 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator3(parent *QObject) *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new3(parent.cPointer()) - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new3(parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegularExpressionValidator4 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator4(re *QRegularExpression, parent *QObject) *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer()) - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QRegularExpressionValidator) MetaObject() *QMetaObject { @@ -1014,9 +1392,72 @@ func QRegularExpressionValidator_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QRegularExpressionValidator) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QRegularExpressionValidator_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QRegularExpressionValidator) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QRegularExpressionValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRegularExpressionValidator_Validate +func miqt_exec_callback_QRegularExpressionValidator_Validate(self *C.QRegularExpressionValidator, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QRegularExpressionValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QRegularExpressionValidator) callVirtualBase_Fixup(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + C.QRegularExpressionValidator_virtualbase_Fixup(unsafe.Pointer(this.h), param1_ms) + +} +func (this *QRegularExpressionValidator) OnFixup(slot func(super func(param1 string), param1 string)) { + C.QRegularExpressionValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRegularExpressionValidator_Fixup +func miqt_exec_callback_QRegularExpressionValidator_Fixup(self *C.QRegularExpressionValidator, cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string), param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc((&QRegularExpressionValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + // Delete this object from C++ memory. func (this *QRegularExpressionValidator) Delete() { - C.QRegularExpressionValidator_Delete(this.h) + C.QRegularExpressionValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qvalidator.h b/qt/gen_qvalidator.h index 78285a9c..fb3da01b 100644 --- a/qt/gen_qvalidator.h +++ b/qt/gen_qvalidator.h @@ -52,12 +52,12 @@ struct miqt_string QValidator_Tr2(const char* s, const char* c); struct miqt_string QValidator_Tr3(const char* s, const char* c, int n); struct miqt_string QValidator_TrUtf82(const char* s, const char* c); struct miqt_string QValidator_TrUtf83(const char* s, const char* c, int n); -void QValidator_Delete(QValidator* self); +void QValidator_Delete(QValidator* self, bool isSubclass); -QIntValidator* QIntValidator_new(); -QIntValidator* QIntValidator_new2(int bottom, int top); -QIntValidator* QIntValidator_new3(QObject* parent); -QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent); +void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QIntValidator_MetaObject(const QIntValidator* self); void* QIntValidator_Metacast(QIntValidator* self, const char* param1); struct miqt_string QIntValidator_Tr(const char* s); @@ -77,18 +77,24 @@ struct miqt_string QIntValidator_Tr2(const char* s, const char* c); struct miqt_string QIntValidator_Tr3(const char* s, const char* c, int n); struct miqt_string QIntValidator_TrUtf82(const char* s, const char* c); struct miqt_string QIntValidator_TrUtf83(const char* s, const char* c, int n); -void QIntValidator_Delete(QIntValidator* self); +void QIntValidator_override_virtual_Validate(void* self, intptr_t slot); +int QIntValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2); +void QIntValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QIntValidator_virtualbase_Fixup(const void* self, struct miqt_string input); +void QIntValidator_override_virtual_SetRange(void* self, intptr_t slot); +void QIntValidator_virtualbase_SetRange(void* self, int bottom, int top); +void QIntValidator_Delete(QIntValidator* self, bool isSubclass); -QDoubleValidator* QDoubleValidator_new(); -QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals); -QDoubleValidator* QDoubleValidator_new3(QObject* parent); -QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent); +void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self); void* QDoubleValidator_Metacast(QDoubleValidator* self, const char* param1); struct miqt_string QDoubleValidator_Tr(const char* s); struct miqt_string QDoubleValidator_TrUtf8(const char* s); int QDoubleValidator_Validate(const QDoubleValidator* self, struct miqt_string param1, int* param2); -void QDoubleValidator_SetRange(QDoubleValidator* self, double bottom, double top); +void QDoubleValidator_SetRange(QDoubleValidator* self, double bottom, double top, int decimals); void QDoubleValidator_SetBottom(QDoubleValidator* self, double bottom); void QDoubleValidator_SetTop(QDoubleValidator* self, double top); void QDoubleValidator_SetDecimals(QDoubleValidator* self, int decimals); @@ -109,13 +115,18 @@ struct miqt_string QDoubleValidator_Tr2(const char* s, const char* c); struct miqt_string QDoubleValidator_Tr3(const char* s, const char* c, int n); struct miqt_string QDoubleValidator_TrUtf82(const char* s, const char* c); struct miqt_string QDoubleValidator_TrUtf83(const char* s, const char* c, int n); -void QDoubleValidator_SetRange3(QDoubleValidator* self, double bottom, double top, int decimals); -void QDoubleValidator_Delete(QDoubleValidator* self); +void QDoubleValidator_override_virtual_Validate(void* self, intptr_t slot); +int QDoubleValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2); +void QDoubleValidator_override_virtual_SetRange(void* self, intptr_t slot); +void QDoubleValidator_virtualbase_SetRange(void* self, double bottom, double top, int decimals); +void QDoubleValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QDoubleValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); +void QDoubleValidator_Delete(QDoubleValidator* self, bool isSubclass); -QRegExpValidator* QRegExpValidator_new(); -QRegExpValidator* QRegExpValidator_new2(QRegExp* rx); -QRegExpValidator* QRegExpValidator_new3(QObject* parent); -QRegExpValidator* QRegExpValidator_new4(QRegExp* rx, QObject* parent); +void QRegExpValidator_new(QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegExpValidator_new2(QRegExp* rx, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegExpValidator_new3(QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegExpValidator_new4(QRegExp* rx, QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QRegExpValidator_MetaObject(const QRegExpValidator* self); void* QRegExpValidator_Metacast(QRegExpValidator* self, const char* param1); struct miqt_string QRegExpValidator_Tr(const char* s); @@ -129,12 +140,16 @@ struct miqt_string QRegExpValidator_Tr2(const char* s, const char* c); struct miqt_string QRegExpValidator_Tr3(const char* s, const char* c, int n); struct miqt_string QRegExpValidator_TrUtf82(const char* s, const char* c); struct miqt_string QRegExpValidator_TrUtf83(const char* s, const char* c, int n); -void QRegExpValidator_Delete(QRegExpValidator* self); +void QRegExpValidator_override_virtual_Validate(void* self, intptr_t slot); +int QRegExpValidator_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QRegExpValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QRegExpValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); +void QRegExpValidator_Delete(QRegExpValidator* self, bool isSubclass); -QRegularExpressionValidator* QRegularExpressionValidator_new(); -QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re); -QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent); -QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent); +void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self); void* QRegularExpressionValidator_Metacast(QRegularExpressionValidator* self, const char* param1); struct miqt_string QRegularExpressionValidator_Tr(const char* s); @@ -148,7 +163,11 @@ struct miqt_string QRegularExpressionValidator_Tr2(const char* s, const char* c) struct miqt_string QRegularExpressionValidator_Tr3(const char* s, const char* c, int n); struct miqt_string QRegularExpressionValidator_TrUtf82(const char* s, const char* c); struct miqt_string QRegularExpressionValidator_TrUtf83(const char* s, const char* c, int n); -void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self); +void QRegularExpressionValidator_override_virtual_Validate(void* self, intptr_t slot); +int QRegularExpressionValidator_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QRegularExpressionValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QRegularExpressionValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); +void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qvariant.cpp b/qt/gen_qvariant.cpp index d6bbc8dc..c340f5fc 100644 --- a/qt/gen_qvariant.cpp +++ b/qt/gen_qvariant.cpp @@ -40,77 +40,94 @@ #include "gen_qvariant.h" #include "_cgo_export.h" -QVariant* QVariant_new() { - return new QVariant(); +void QVariant_new(QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(); + *outptr_QVariant = ret; } -QVariant* QVariant_new2(int typeVal) { - return new QVariant(static_cast(typeVal)); +void QVariant_new2(int typeVal, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(typeVal)); + *outptr_QVariant = ret; } -QVariant* QVariant_new3(int typeId, const void* copyVal) { - return new QVariant(static_cast(typeId), copyVal); +void QVariant_new3(int typeId, const void* copyVal, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(typeId), copyVal); + *outptr_QVariant = ret; } -QVariant* QVariant_new4(int typeId, const void* copyVal, unsigned int flags) { - return new QVariant(static_cast(typeId), copyVal, static_cast(flags)); +void QVariant_new4(int typeId, const void* copyVal, unsigned int flags, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(typeId), copyVal, static_cast(flags)); + *outptr_QVariant = ret; } -QVariant* QVariant_new5(QVariant* other) { - return new QVariant(*other); +void QVariant_new5(QVariant* other, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*other); + *outptr_QVariant = ret; } -QVariant* QVariant_new6(QDataStream* s) { - return new QVariant(*s); +void QVariant_new6(QDataStream* s, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*s); + *outptr_QVariant = ret; } -QVariant* QVariant_new7(int i) { - return new QVariant(static_cast(i)); +void QVariant_new7(int i, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(i)); + *outptr_QVariant = ret; } -QVariant* QVariant_new8(unsigned int ui) { - return new QVariant(static_cast(ui)); +void QVariant_new8(unsigned int ui, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(ui)); + *outptr_QVariant = ret; } -QVariant* QVariant_new9(long long ll) { - return new QVariant(static_cast(ll)); +void QVariant_new9(long long ll, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(ll)); + *outptr_QVariant = ret; } -QVariant* QVariant_new10(unsigned long long ull) { - return new QVariant(static_cast(ull)); +void QVariant_new10(unsigned long long ull, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(ull)); + *outptr_QVariant = ret; } -QVariant* QVariant_new11(bool b) { - return new QVariant(b); +void QVariant_new11(bool b, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(b); + *outptr_QVariant = ret; } -QVariant* QVariant_new12(double d) { - return new QVariant(static_cast(d)); +void QVariant_new12(double d, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(d)); + *outptr_QVariant = ret; } -QVariant* QVariant_new13(float f) { - return new QVariant(static_cast(f)); +void QVariant_new13(float f, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(f)); + *outptr_QVariant = ret; } -QVariant* QVariant_new14(const char* str) { - return new QVariant(str); +void QVariant_new14(const char* str, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(str); + *outptr_QVariant = ret; } -QVariant* QVariant_new15(struct miqt_string bytearray) { +void QVariant_new15(struct miqt_string bytearray, QVariant** outptr_QVariant) { QByteArray bytearray_QByteArray(bytearray.data, bytearray.len); - return new QVariant(bytearray_QByteArray); + QVariant* ret = new QVariant(bytearray_QByteArray); + *outptr_QVariant = ret; } -QVariant* QVariant_new16(QBitArray* bitarray) { - return new QVariant(*bitarray); +void QVariant_new16(QBitArray* bitarray, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*bitarray); + *outptr_QVariant = ret; } -QVariant* QVariant_new17(struct miqt_string stringVal) { +void QVariant_new17(struct miqt_string stringVal, QVariant** outptr_QVariant) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - return new QVariant(stringVal_QString); + QVariant* ret = new QVariant(stringVal_QString); + *outptr_QVariant = ret; } -QVariant* QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist) { +void QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant) { QStringList stringlist_QList; stringlist_QList.reserve(stringlist.len); struct miqt_string* stringlist_arr = static_cast(stringlist.data); @@ -118,26 +135,31 @@ QVariant* QVariant_new18(struct miqt_array /* of struct miqt_string */ stringli QString stringlist_arr_i_QString = QString::fromUtf8(stringlist_arr[i].data, stringlist_arr[i].len); stringlist_QList.push_back(stringlist_arr_i_QString); } - return new QVariant(stringlist_QList); + QVariant* ret = new QVariant(stringlist_QList); + *outptr_QVariant = ret; } -QVariant* QVariant_new19(QChar* qchar) { - return new QVariant(*qchar); +void QVariant_new19(QChar* qchar, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*qchar); + *outptr_QVariant = ret; } -QVariant* QVariant_new20(QDate* date) { - return new QVariant(*date); +void QVariant_new20(QDate* date, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*date); + *outptr_QVariant = ret; } -QVariant* QVariant_new21(QTime* time) { - return new QVariant(*time); +void QVariant_new21(QTime* time, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*time); + *outptr_QVariant = ret; } -QVariant* QVariant_new22(QDateTime* datetime) { - return new QVariant(*datetime); +void QVariant_new22(QDateTime* datetime, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*datetime); + *outptr_QVariant = ret; } -QVariant* QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) { +void QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant) { QMap mapVal_QMap; struct miqt_string* mapVal_karr = static_cast(mapVal.keys); QVariant** mapVal_varr = static_cast(mapVal.values); @@ -145,10 +167,11 @@ QVariant* QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* * QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len); mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]); } - return new QVariant(mapVal_QMap); + QVariant* ret = new QVariant(mapVal_QMap); + *outptr_QVariant = ret; } -QVariant* QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash) { +void QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant) { QHash hash_QMap; hash_QMap.reserve(hash.len); struct miqt_string* hash_karr = static_cast(hash.keys); @@ -157,87 +180,108 @@ QVariant* QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* * QString hash_karr_i_QString = QString::fromUtf8(hash_karr[i].data, hash_karr[i].len); hash_QMap[hash_karr_i_QString] = *(hash_varr[i]); } - return new QVariant(hash_QMap); + QVariant* ret = new QVariant(hash_QMap); + *outptr_QVariant = ret; } -QVariant* QVariant_new25(QSize* size) { - return new QVariant(*size); +void QVariant_new25(QSize* size, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*size); + *outptr_QVariant = ret; } -QVariant* QVariant_new26(QSizeF* size) { - return new QVariant(*size); +void QVariant_new26(QSizeF* size, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*size); + *outptr_QVariant = ret; } -QVariant* QVariant_new27(QPoint* pt) { - return new QVariant(*pt); +void QVariant_new27(QPoint* pt, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*pt); + *outptr_QVariant = ret; } -QVariant* QVariant_new28(QPointF* pt) { - return new QVariant(*pt); +void QVariant_new28(QPointF* pt, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*pt); + *outptr_QVariant = ret; } -QVariant* QVariant_new29(QLine* line) { - return new QVariant(*line); +void QVariant_new29(QLine* line, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*line); + *outptr_QVariant = ret; } -QVariant* QVariant_new30(QLineF* line) { - return new QVariant(*line); +void QVariant_new30(QLineF* line, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*line); + *outptr_QVariant = ret; } -QVariant* QVariant_new31(QRect* rect) { - return new QVariant(*rect); +void QVariant_new31(QRect* rect, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*rect); + *outptr_QVariant = ret; } -QVariant* QVariant_new32(QRectF* rect) { - return new QVariant(*rect); +void QVariant_new32(QRectF* rect, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*rect); + *outptr_QVariant = ret; } -QVariant* QVariant_new33(QLocale* locale) { - return new QVariant(*locale); +void QVariant_new33(QLocale* locale, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*locale); + *outptr_QVariant = ret; } -QVariant* QVariant_new34(QRegExp* regExp) { - return new QVariant(*regExp); +void QVariant_new34(QRegExp* regExp, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*regExp); + *outptr_QVariant = ret; } -QVariant* QVariant_new35(QRegularExpression* re) { - return new QVariant(*re); +void QVariant_new35(QRegularExpression* re, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*re); + *outptr_QVariant = ret; } -QVariant* QVariant_new36(QEasingCurve* easing) { - return new QVariant(*easing); +void QVariant_new36(QEasingCurve* easing, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*easing); + *outptr_QVariant = ret; } -QVariant* QVariant_new37(QUuid* uuid) { - return new QVariant(*uuid); +void QVariant_new37(QUuid* uuid, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*uuid); + *outptr_QVariant = ret; } -QVariant* QVariant_new38(QUrl* url) { - return new QVariant(*url); +void QVariant_new38(QUrl* url, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*url); + *outptr_QVariant = ret; } -QVariant* QVariant_new39(QJsonValue* jsonValue) { - return new QVariant(*jsonValue); +void QVariant_new39(QJsonValue* jsonValue, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonValue); + *outptr_QVariant = ret; } -QVariant* QVariant_new40(QJsonObject* jsonObject) { - return new QVariant(*jsonObject); +void QVariant_new40(QJsonObject* jsonObject, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonObject); + *outptr_QVariant = ret; } -QVariant* QVariant_new41(QJsonArray* jsonArray) { - return new QVariant(*jsonArray); +void QVariant_new41(QJsonArray* jsonArray, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonArray); + *outptr_QVariant = ret; } -QVariant* QVariant_new42(QJsonDocument* jsonDocument) { - return new QVariant(*jsonDocument); +void QVariant_new42(QJsonDocument* jsonDocument, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonDocument); + *outptr_QVariant = ret; } -QVariant* QVariant_new43(QModelIndex* modelIndex) { - return new QVariant(*modelIndex); +void QVariant_new43(QModelIndex* modelIndex, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*modelIndex); + *outptr_QVariant = ret; } -QVariant* QVariant_new44(QPersistentModelIndex* modelIndex) { - return new QVariant(*modelIndex); +void QVariant_new44(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*modelIndex); + *outptr_QVariant = ret; } void QVariant_OperatorAssign(QVariant* self, QVariant* other) { @@ -600,44 +644,65 @@ double QVariant_ToReal1(const QVariant* self, bool* ok) { return static_cast(_ret); } -void QVariant_Delete(QVariant* self) { - delete self; +void QVariant_Delete(QVariant* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QVariantComparisonHelper* QVariantComparisonHelper_new(QVariant* varVal) { - return new QVariantComparisonHelper(*varVal); +void QVariantComparisonHelper_new(QVariant* varVal, QVariantComparisonHelper** outptr_QVariantComparisonHelper) { + QVariantComparisonHelper* ret = new QVariantComparisonHelper(*varVal); + *outptr_QVariantComparisonHelper = ret; } -QVariantComparisonHelper* QVariantComparisonHelper_new2(QVariantComparisonHelper* param1) { - return new QVariantComparisonHelper(*param1); +void QVariantComparisonHelper_new2(QVariantComparisonHelper* param1, QVariantComparisonHelper** outptr_QVariantComparisonHelper) { + QVariantComparisonHelper* ret = new QVariantComparisonHelper(*param1); + *outptr_QVariantComparisonHelper = ret; } -void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self) { - delete self; +void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QVariant__Private__Data* QVariant__Private__Data_new() { - return new QVariant::Private::Data(); +void QVariant__Private__Data_new(QVariant__Private__Data** outptr_QVariant__Private__Data) { + QVariant::Private::Data* ret = new QVariant::Private::Data(); + *outptr_QVariant__Private__Data = ret; } -QVariant__Private__Data* QVariant__Private__Data_new2(QVariant__Private__Data* param1) { - return new QVariant::Private::Data(*param1); +void QVariant__Private__Data_new2(QVariant__Private__Data* param1, QVariant__Private__Data** outptr_QVariant__Private__Data) { + QVariant::Private::Data* ret = new QVariant::Private::Data(*param1); + *outptr_QVariant__Private__Data = ret; } void QVariant__Private__Data_OperatorAssign(QVariant__Private__Data* self, QVariant__Private__Data* param1) { self->operator=(*param1); } -void QVariant__Private__Data_Delete(QVariant__Private__Data* self) { - delete self; +void QVariant__Private__Data_Delete(QVariant__Private__Data* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QVariant__Handler_Delete(QVariant__Handler* self) { - delete self; +void QVariant__Handler_Delete(QVariant__Handler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other) { - return new QSequentialIterable::const_iterator(*other); +void QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other, QSequentialIterable__const_iterator** outptr_QSequentialIterable__const_iterator) { + QSequentialIterable::const_iterator* ret = new QSequentialIterable::const_iterator(*other); + *outptr_QSequentialIterable__const_iterator = ret; } void QSequentialIterable__const_iterator_OperatorAssign(QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* other) { @@ -696,12 +761,17 @@ QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_Operato return new QSequentialIterable::const_iterator(self->operator-(static_cast(j))); } -void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self) { - delete self; +void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other) { - return new QAssociativeIterable::const_iterator(*other); +void QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other, QAssociativeIterable__const_iterator** outptr_QAssociativeIterable__const_iterator) { + QAssociativeIterable::const_iterator* ret = new QAssociativeIterable::const_iterator(*other); + *outptr_QAssociativeIterable__const_iterator = ret; } void QAssociativeIterable__const_iterator_OperatorAssign(QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* other) { @@ -768,7 +838,11 @@ QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_Opera return new QAssociativeIterable::const_iterator(self->operator-(static_cast(j))); } -void QAssociativeIterable__const_iterator_Delete(QAssociativeIterable__const_iterator* self) { - delete self; +void QAssociativeIterable__const_iterator_Delete(QAssociativeIterable__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qvariant.go b/qt/gen_qvariant.go index 0453a096..a7fb8ed5 100644 --- a/qt/gen_qvariant.go +++ b/qt/gen_qvariant.go @@ -81,7 +81,8 @@ const ( ) type QVariant struct { - h *C.QVariant + h *C.QVariant + isSubclass bool } func (this *QVariant) cPointer() *C.QVariant { @@ -98,6 +99,7 @@ func (this *QVariant) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVariant constructs the type using only CGO pointers. func newQVariant(h *C.QVariant) *QVariant { if h == nil { return nil @@ -105,94 +107,155 @@ func newQVariant(h *C.QVariant) *QVariant { return &QVariant{h: h} } +// UnsafeNewQVariant constructs the type using only unsafe pointers. func UnsafeNewQVariant(h unsafe.Pointer) *QVariant { - return newQVariant((*C.QVariant)(h)) + if h == nil { + return nil + } + + return &QVariant{h: (*C.QVariant)(h)} } // NewQVariant constructs a new QVariant object. func NewQVariant() *QVariant { - ret := C.QVariant_new() - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new(&outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant2 constructs a new QVariant object. func NewQVariant2(typeVal QVariant__Type) *QVariant { - ret := C.QVariant_new2((C.int)(typeVal)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new2((C.int)(typeVal), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant3 constructs a new QVariant object. func NewQVariant3(typeId int, copyVal unsafe.Pointer) *QVariant { - ret := C.QVariant_new3((C.int)(typeId), copyVal) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new3((C.int)(typeId), copyVal, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant4 constructs a new QVariant object. func NewQVariant4(typeId int, copyVal unsafe.Pointer, flags uint) *QVariant { - ret := C.QVariant_new4((C.int)(typeId), copyVal, (C.uint)(flags)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new4((C.int)(typeId), copyVal, (C.uint)(flags), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant5 constructs a new QVariant object. func NewQVariant5(other *QVariant) *QVariant { - ret := C.QVariant_new5(other.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new5(other.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant6 constructs a new QVariant object. func NewQVariant6(s *QDataStream) *QVariant { - ret := C.QVariant_new6(s.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new6(s.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant7 constructs a new QVariant object. func NewQVariant7(i int) *QVariant { - ret := C.QVariant_new7((C.int)(i)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new7((C.int)(i), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant8 constructs a new QVariant object. func NewQVariant8(ui uint) *QVariant { - ret := C.QVariant_new8((C.uint)(ui)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new8((C.uint)(ui), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant9 constructs a new QVariant object. func NewQVariant9(ll int64) *QVariant { - ret := C.QVariant_new9((C.longlong)(ll)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new9((C.longlong)(ll), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant10 constructs a new QVariant object. func NewQVariant10(ull uint64) *QVariant { - ret := C.QVariant_new10((C.ulonglong)(ull)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new10((C.ulonglong)(ull), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant11 constructs a new QVariant object. func NewQVariant11(b bool) *QVariant { - ret := C.QVariant_new11((C.bool)(b)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new11((C.bool)(b), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant12 constructs a new QVariant object. func NewQVariant12(d float64) *QVariant { - ret := C.QVariant_new12((C.double)(d)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new12((C.double)(d), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant13 constructs a new QVariant object. func NewQVariant13(f float32) *QVariant { - ret := C.QVariant_new13((C.float)(f)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new13((C.float)(f), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant14 constructs a new QVariant object. func NewQVariant14(str string) *QVariant { str_Cstring := C.CString(str) defer C.free(unsafe.Pointer(str_Cstring)) - ret := C.QVariant_new14(str_Cstring) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new14(str_Cstring, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant15 constructs a new QVariant object. @@ -200,14 +263,22 @@ func NewQVariant15(bytearray []byte) *QVariant { bytearray_alias := C.struct_miqt_string{} bytearray_alias.data = (*C.char)(unsafe.Pointer(&bytearray[0])) bytearray_alias.len = C.size_t(len(bytearray)) - ret := C.QVariant_new15(bytearray_alias) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new15(bytearray_alias, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant16 constructs a new QVariant object. func NewQVariant16(bitarray *QBitArray) *QVariant { - ret := C.QVariant_new16(bitarray.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new16(bitarray.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant17 constructs a new QVariant object. @@ -216,8 +287,12 @@ func NewQVariant17(stringVal string) *QVariant { stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - ret := C.QVariant_new17(stringVal_ms) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new17(stringVal_ms, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant18 constructs a new QVariant object. @@ -232,32 +307,52 @@ func NewQVariant18(stringlist []string) *QVariant { stringlist_CArray[i] = stringlist_i_ms } stringlist_ma := C.struct_miqt_array{len: C.size_t(len(stringlist)), data: unsafe.Pointer(stringlist_CArray)} - ret := C.QVariant_new18(stringlist_ma) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new18(stringlist_ma, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant19 constructs a new QVariant object. func NewQVariant19(qchar QChar) *QVariant { - ret := C.QVariant_new19(qchar.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new19(qchar.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant20 constructs a new QVariant object. func NewQVariant20(date *QDate) *QVariant { - ret := C.QVariant_new20(date.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new20(date.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant21 constructs a new QVariant object. func NewQVariant21(time *QTime) *QVariant { - ret := C.QVariant_new21(time.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new21(time.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant22 constructs a new QVariant object. func NewQVariant22(datetime *QDateTime) *QVariant { - ret := C.QVariant_new22(datetime.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new22(datetime.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant23 constructs a new QVariant object. @@ -281,8 +376,12 @@ func NewQVariant23(mapVal map[string]QVariant) *QVariant { keys: unsafe.Pointer(mapVal_Keys_CArray), values: unsafe.Pointer(mapVal_Values_CArray), } - ret := C.QVariant_new23(mapVal_mm) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new23(mapVal_mm, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant24 constructs a new QVariant object. @@ -306,128 +405,212 @@ func NewQVariant24(hash map[string]QVariant) *QVariant { keys: unsafe.Pointer(hash_Keys_CArray), values: unsafe.Pointer(hash_Values_CArray), } - ret := C.QVariant_new24(hash_mm) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new24(hash_mm, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant25 constructs a new QVariant object. func NewQVariant25(size *QSize) *QVariant { - ret := C.QVariant_new25(size.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new25(size.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant26 constructs a new QVariant object. func NewQVariant26(size *QSizeF) *QVariant { - ret := C.QVariant_new26(size.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new26(size.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant27 constructs a new QVariant object. func NewQVariant27(pt *QPoint) *QVariant { - ret := C.QVariant_new27(pt.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new27(pt.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant28 constructs a new QVariant object. func NewQVariant28(pt *QPointF) *QVariant { - ret := C.QVariant_new28(pt.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new28(pt.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant29 constructs a new QVariant object. func NewQVariant29(line *QLine) *QVariant { - ret := C.QVariant_new29(line.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new29(line.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant30 constructs a new QVariant object. func NewQVariant30(line *QLineF) *QVariant { - ret := C.QVariant_new30(line.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new30(line.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant31 constructs a new QVariant object. func NewQVariant31(rect *QRect) *QVariant { - ret := C.QVariant_new31(rect.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new31(rect.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant32 constructs a new QVariant object. func NewQVariant32(rect *QRectF) *QVariant { - ret := C.QVariant_new32(rect.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new32(rect.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant33 constructs a new QVariant object. func NewQVariant33(locale *QLocale) *QVariant { - ret := C.QVariant_new33(locale.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new33(locale.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant34 constructs a new QVariant object. func NewQVariant34(regExp *QRegExp) *QVariant { - ret := C.QVariant_new34(regExp.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new34(regExp.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant35 constructs a new QVariant object. func NewQVariant35(re *QRegularExpression) *QVariant { - ret := C.QVariant_new35(re.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new35(re.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant36 constructs a new QVariant object. func NewQVariant36(easing *QEasingCurve) *QVariant { - ret := C.QVariant_new36(easing.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new36(easing.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant37 constructs a new QVariant object. func NewQVariant37(uuid *QUuid) *QVariant { - ret := C.QVariant_new37(uuid.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new37(uuid.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant38 constructs a new QVariant object. func NewQVariant38(url *QUrl) *QVariant { - ret := C.QVariant_new38(url.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new38(url.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant39 constructs a new QVariant object. func NewQVariant39(jsonValue *QJsonValue) *QVariant { - ret := C.QVariant_new39(jsonValue.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new39(jsonValue.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant40 constructs a new QVariant object. func NewQVariant40(jsonObject *QJsonObject) *QVariant { - ret := C.QVariant_new40(jsonObject.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new40(jsonObject.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant41 constructs a new QVariant object. func NewQVariant41(jsonArray *QJsonArray) *QVariant { - ret := C.QVariant_new41(jsonArray.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new41(jsonArray.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant42 constructs a new QVariant object. func NewQVariant42(jsonDocument *QJsonDocument) *QVariant { - ret := C.QVariant_new42(jsonDocument.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new42(jsonDocument.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant43 constructs a new QVariant object. func NewQVariant43(modelIndex *QModelIndex) *QVariant { - ret := C.QVariant_new43(modelIndex.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new43(modelIndex.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant44 constructs a new QVariant object. func NewQVariant44(modelIndex *QPersistentModelIndex) *QVariant { - ret := C.QVariant_new44(modelIndex.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new44(modelIndex.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } func (this *QVariant) OperatorAssign(other *QVariant) { @@ -838,7 +1021,7 @@ func (this *QVariant) ToReal1(ok *bool) float64 { // Delete this object from C++ memory. func (this *QVariant) Delete() { - C.QVariant_Delete(this.h) + C.QVariant_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -851,7 +1034,8 @@ func (this *QVariant) GoGC() { } type QVariantComparisonHelper struct { - h *C.QVariantComparisonHelper + h *C.QVariantComparisonHelper + isSubclass bool } func (this *QVariantComparisonHelper) cPointer() *C.QVariantComparisonHelper { @@ -868,6 +1052,7 @@ func (this *QVariantComparisonHelper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVariantComparisonHelper constructs the type using only CGO pointers. func newQVariantComparisonHelper(h *C.QVariantComparisonHelper) *QVariantComparisonHelper { if h == nil { return nil @@ -875,25 +1060,38 @@ func newQVariantComparisonHelper(h *C.QVariantComparisonHelper) *QVariantCompari return &QVariantComparisonHelper{h: h} } +// UnsafeNewQVariantComparisonHelper constructs the type using only unsafe pointers. func UnsafeNewQVariantComparisonHelper(h unsafe.Pointer) *QVariantComparisonHelper { - return newQVariantComparisonHelper((*C.QVariantComparisonHelper)(h)) + if h == nil { + return nil + } + + return &QVariantComparisonHelper{h: (*C.QVariantComparisonHelper)(h)} } // NewQVariantComparisonHelper constructs a new QVariantComparisonHelper object. func NewQVariantComparisonHelper(varVal *QVariant) *QVariantComparisonHelper { - ret := C.QVariantComparisonHelper_new(varVal.cPointer()) - return newQVariantComparisonHelper(ret) + var outptr_QVariantComparisonHelper *C.QVariantComparisonHelper = nil + + C.QVariantComparisonHelper_new(varVal.cPointer(), &outptr_QVariantComparisonHelper) + ret := newQVariantComparisonHelper(outptr_QVariantComparisonHelper) + ret.isSubclass = true + return ret } // NewQVariantComparisonHelper2 constructs a new QVariantComparisonHelper object. func NewQVariantComparisonHelper2(param1 *QVariantComparisonHelper) *QVariantComparisonHelper { - ret := C.QVariantComparisonHelper_new2(param1.cPointer()) - return newQVariantComparisonHelper(ret) + var outptr_QVariantComparisonHelper *C.QVariantComparisonHelper = nil + + C.QVariantComparisonHelper_new2(param1.cPointer(), &outptr_QVariantComparisonHelper) + ret := newQVariantComparisonHelper(outptr_QVariantComparisonHelper) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QVariantComparisonHelper) Delete() { - C.QVariantComparisonHelper_Delete(this.h) + C.QVariantComparisonHelper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -906,7 +1104,8 @@ func (this *QVariantComparisonHelper) GoGC() { } type QVariant__Private__Data struct { - h *C.QVariant__Private__Data + h *C.QVariant__Private__Data + isSubclass bool } func (this *QVariant__Private__Data) cPointer() *C.QVariant__Private__Data { @@ -923,6 +1122,7 @@ func (this *QVariant__Private__Data) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVariant__Private__Data constructs the type using only CGO pointers. func newQVariant__Private__Data(h *C.QVariant__Private__Data) *QVariant__Private__Data { if h == nil { return nil @@ -930,20 +1130,33 @@ func newQVariant__Private__Data(h *C.QVariant__Private__Data) *QVariant__Private return &QVariant__Private__Data{h: h} } +// UnsafeNewQVariant__Private__Data constructs the type using only unsafe pointers. func UnsafeNewQVariant__Private__Data(h unsafe.Pointer) *QVariant__Private__Data { - return newQVariant__Private__Data((*C.QVariant__Private__Data)(h)) + if h == nil { + return nil + } + + return &QVariant__Private__Data{h: (*C.QVariant__Private__Data)(h)} } // NewQVariant__Private__Data constructs a new QVariant::Private::Data object. func NewQVariant__Private__Data() *QVariant__Private__Data { - ret := C.QVariant__Private__Data_new() - return newQVariant__Private__Data(ret) + var outptr_QVariant__Private__Data *C.QVariant__Private__Data = nil + + C.QVariant__Private__Data_new(&outptr_QVariant__Private__Data) + ret := newQVariant__Private__Data(outptr_QVariant__Private__Data) + ret.isSubclass = true + return ret } // NewQVariant__Private__Data2 constructs a new QVariant::Private::Data object. func NewQVariant__Private__Data2(param1 *QVariant__Private__Data) *QVariant__Private__Data { - ret := C.QVariant__Private__Data_new2(param1.cPointer()) - return newQVariant__Private__Data(ret) + var outptr_QVariant__Private__Data *C.QVariant__Private__Data = nil + + C.QVariant__Private__Data_new2(param1.cPointer(), &outptr_QVariant__Private__Data) + ret := newQVariant__Private__Data(outptr_QVariant__Private__Data) + ret.isSubclass = true + return ret } func (this *QVariant__Private__Data) OperatorAssign(param1 *QVariant__Private__Data) { @@ -952,7 +1165,7 @@ func (this *QVariant__Private__Data) OperatorAssign(param1 *QVariant__Private__D // Delete this object from C++ memory. func (this *QVariant__Private__Data) Delete() { - C.QVariant__Private__Data_Delete(this.h) + C.QVariant__Private__Data_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -965,7 +1178,8 @@ func (this *QVariant__Private__Data) GoGC() { } type QVariant__Handler struct { - h *C.QVariant__Handler + h *C.QVariant__Handler + isSubclass bool } func (this *QVariant__Handler) cPointer() *C.QVariant__Handler { @@ -982,6 +1196,7 @@ func (this *QVariant__Handler) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVariant__Handler constructs the type using only CGO pointers. func newQVariant__Handler(h *C.QVariant__Handler) *QVariant__Handler { if h == nil { return nil @@ -989,13 +1204,18 @@ func newQVariant__Handler(h *C.QVariant__Handler) *QVariant__Handler { return &QVariant__Handler{h: h} } +// UnsafeNewQVariant__Handler constructs the type using only unsafe pointers. func UnsafeNewQVariant__Handler(h unsafe.Pointer) *QVariant__Handler { - return newQVariant__Handler((*C.QVariant__Handler)(h)) + if h == nil { + return nil + } + + return &QVariant__Handler{h: (*C.QVariant__Handler)(h)} } // Delete this object from C++ memory. func (this *QVariant__Handler) Delete() { - C.QVariant__Handler_Delete(this.h) + C.QVariant__Handler_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1008,7 +1228,8 @@ func (this *QVariant__Handler) GoGC() { } type QSequentialIterable__const_iterator struct { - h *C.QSequentialIterable__const_iterator + h *C.QSequentialIterable__const_iterator + isSubclass bool } func (this *QSequentialIterable__const_iterator) cPointer() *C.QSequentialIterable__const_iterator { @@ -1025,6 +1246,7 @@ func (this *QSequentialIterable__const_iterator) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQSequentialIterable__const_iterator constructs the type using only CGO pointers. func newQSequentialIterable__const_iterator(h *C.QSequentialIterable__const_iterator) *QSequentialIterable__const_iterator { if h == nil { return nil @@ -1032,14 +1254,23 @@ func newQSequentialIterable__const_iterator(h *C.QSequentialIterable__const_iter return &QSequentialIterable__const_iterator{h: h} } +// UnsafeNewQSequentialIterable__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQSequentialIterable__const_iterator(h unsafe.Pointer) *QSequentialIterable__const_iterator { - return newQSequentialIterable__const_iterator((*C.QSequentialIterable__const_iterator)(h)) + if h == nil { + return nil + } + + return &QSequentialIterable__const_iterator{h: (*C.QSequentialIterable__const_iterator)(h)} } // NewQSequentialIterable__const_iterator constructs a new QSequentialIterable::const_iterator object. func NewQSequentialIterable__const_iterator(other *QSequentialIterable__const_iterator) *QSequentialIterable__const_iterator { - ret := C.QSequentialIterable__const_iterator_new(other.cPointer()) - return newQSequentialIterable__const_iterator(ret) + var outptr_QSequentialIterable__const_iterator *C.QSequentialIterable__const_iterator = nil + + C.QSequentialIterable__const_iterator_new(other.cPointer(), &outptr_QSequentialIterable__const_iterator) + ret := newQSequentialIterable__const_iterator(outptr_QSequentialIterable__const_iterator) + ret.isSubclass = true + return ret } func (this *QSequentialIterable__const_iterator) OperatorAssign(other *QSequentialIterable__const_iterator) { @@ -1107,7 +1338,7 @@ func (this *QSequentialIterable__const_iterator) OperatorMinus(j int) *QSequenti // Delete this object from C++ memory. func (this *QSequentialIterable__const_iterator) Delete() { - C.QSequentialIterable__const_iterator_Delete(this.h) + C.QSequentialIterable__const_iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1120,7 +1351,8 @@ func (this *QSequentialIterable__const_iterator) GoGC() { } type QAssociativeIterable__const_iterator struct { - h *C.QAssociativeIterable__const_iterator + h *C.QAssociativeIterable__const_iterator + isSubclass bool } func (this *QAssociativeIterable__const_iterator) cPointer() *C.QAssociativeIterable__const_iterator { @@ -1137,6 +1369,7 @@ func (this *QAssociativeIterable__const_iterator) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQAssociativeIterable__const_iterator constructs the type using only CGO pointers. func newQAssociativeIterable__const_iterator(h *C.QAssociativeIterable__const_iterator) *QAssociativeIterable__const_iterator { if h == nil { return nil @@ -1144,14 +1377,23 @@ func newQAssociativeIterable__const_iterator(h *C.QAssociativeIterable__const_it return &QAssociativeIterable__const_iterator{h: h} } +// UnsafeNewQAssociativeIterable__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQAssociativeIterable__const_iterator(h unsafe.Pointer) *QAssociativeIterable__const_iterator { - return newQAssociativeIterable__const_iterator((*C.QAssociativeIterable__const_iterator)(h)) + if h == nil { + return nil + } + + return &QAssociativeIterable__const_iterator{h: (*C.QAssociativeIterable__const_iterator)(h)} } // NewQAssociativeIterable__const_iterator constructs a new QAssociativeIterable::const_iterator object. func NewQAssociativeIterable__const_iterator(other *QAssociativeIterable__const_iterator) *QAssociativeIterable__const_iterator { - ret := C.QAssociativeIterable__const_iterator_new(other.cPointer()) - return newQAssociativeIterable__const_iterator(ret) + var outptr_QAssociativeIterable__const_iterator *C.QAssociativeIterable__const_iterator = nil + + C.QAssociativeIterable__const_iterator_new(other.cPointer(), &outptr_QAssociativeIterable__const_iterator) + ret := newQAssociativeIterable__const_iterator(outptr_QAssociativeIterable__const_iterator) + ret.isSubclass = true + return ret } func (this *QAssociativeIterable__const_iterator) OperatorAssign(other *QAssociativeIterable__const_iterator) { @@ -1233,7 +1475,7 @@ func (this *QAssociativeIterable__const_iterator) OperatorMinus(j int) *QAssocia // Delete this object from C++ memory. func (this *QAssociativeIterable__const_iterator) Delete() { - C.QAssociativeIterable__const_iterator_Delete(this.h) + C.QAssociativeIterable__const_iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qvariant.h b/qt/gen_qvariant.h index 295621f0..576a5436 100644 --- a/qt/gen_qvariant.h +++ b/qt/gen_qvariant.h @@ -100,50 +100,50 @@ typedef struct QVariant__Private__Data QVariant__Private__Data; typedef struct QVariantComparisonHelper QVariantComparisonHelper; #endif -QVariant* QVariant_new(); -QVariant* QVariant_new2(int typeVal); -QVariant* QVariant_new3(int typeId, const void* copyVal); -QVariant* QVariant_new4(int typeId, const void* copyVal, unsigned int flags); -QVariant* QVariant_new5(QVariant* other); -QVariant* QVariant_new6(QDataStream* s); -QVariant* QVariant_new7(int i); -QVariant* QVariant_new8(unsigned int ui); -QVariant* QVariant_new9(long long ll); -QVariant* QVariant_new10(unsigned long long ull); -QVariant* QVariant_new11(bool b); -QVariant* QVariant_new12(double d); -QVariant* QVariant_new13(float f); -QVariant* QVariant_new14(const char* str); -QVariant* QVariant_new15(struct miqt_string bytearray); -QVariant* QVariant_new16(QBitArray* bitarray); -QVariant* QVariant_new17(struct miqt_string stringVal); -QVariant* QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist); -QVariant* QVariant_new19(QChar* qchar); -QVariant* QVariant_new20(QDate* date); -QVariant* QVariant_new21(QTime* time); -QVariant* QVariant_new22(QDateTime* datetime); -QVariant* QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); -QVariant* QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash); -QVariant* QVariant_new25(QSize* size); -QVariant* QVariant_new26(QSizeF* size); -QVariant* QVariant_new27(QPoint* pt); -QVariant* QVariant_new28(QPointF* pt); -QVariant* QVariant_new29(QLine* line); -QVariant* QVariant_new30(QLineF* line); -QVariant* QVariant_new31(QRect* rect); -QVariant* QVariant_new32(QRectF* rect); -QVariant* QVariant_new33(QLocale* locale); -QVariant* QVariant_new34(QRegExp* regExp); -QVariant* QVariant_new35(QRegularExpression* re); -QVariant* QVariant_new36(QEasingCurve* easing); -QVariant* QVariant_new37(QUuid* uuid); -QVariant* QVariant_new38(QUrl* url); -QVariant* QVariant_new39(QJsonValue* jsonValue); -QVariant* QVariant_new40(QJsonObject* jsonObject); -QVariant* QVariant_new41(QJsonArray* jsonArray); -QVariant* QVariant_new42(QJsonDocument* jsonDocument); -QVariant* QVariant_new43(QModelIndex* modelIndex); -QVariant* QVariant_new44(QPersistentModelIndex* modelIndex); +void QVariant_new(QVariant** outptr_QVariant); +void QVariant_new2(int typeVal, QVariant** outptr_QVariant); +void QVariant_new3(int typeId, const void* copyVal, QVariant** outptr_QVariant); +void QVariant_new4(int typeId, const void* copyVal, unsigned int flags, QVariant** outptr_QVariant); +void QVariant_new5(QVariant* other, QVariant** outptr_QVariant); +void QVariant_new6(QDataStream* s, QVariant** outptr_QVariant); +void QVariant_new7(int i, QVariant** outptr_QVariant); +void QVariant_new8(unsigned int ui, QVariant** outptr_QVariant); +void QVariant_new9(long long ll, QVariant** outptr_QVariant); +void QVariant_new10(unsigned long long ull, QVariant** outptr_QVariant); +void QVariant_new11(bool b, QVariant** outptr_QVariant); +void QVariant_new12(double d, QVariant** outptr_QVariant); +void QVariant_new13(float f, QVariant** outptr_QVariant); +void QVariant_new14(const char* str, QVariant** outptr_QVariant); +void QVariant_new15(struct miqt_string bytearray, QVariant** outptr_QVariant); +void QVariant_new16(QBitArray* bitarray, QVariant** outptr_QVariant); +void QVariant_new17(struct miqt_string stringVal, QVariant** outptr_QVariant); +void QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant); +void QVariant_new19(QChar* qchar, QVariant** outptr_QVariant); +void QVariant_new20(QDate* date, QVariant** outptr_QVariant); +void QVariant_new21(QTime* time, QVariant** outptr_QVariant); +void QVariant_new22(QDateTime* datetime, QVariant** outptr_QVariant); +void QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant); +void QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant); +void QVariant_new25(QSize* size, QVariant** outptr_QVariant); +void QVariant_new26(QSizeF* size, QVariant** outptr_QVariant); +void QVariant_new27(QPoint* pt, QVariant** outptr_QVariant); +void QVariant_new28(QPointF* pt, QVariant** outptr_QVariant); +void QVariant_new29(QLine* line, QVariant** outptr_QVariant); +void QVariant_new30(QLineF* line, QVariant** outptr_QVariant); +void QVariant_new31(QRect* rect, QVariant** outptr_QVariant); +void QVariant_new32(QRectF* rect, QVariant** outptr_QVariant); +void QVariant_new33(QLocale* locale, QVariant** outptr_QVariant); +void QVariant_new34(QRegExp* regExp, QVariant** outptr_QVariant); +void QVariant_new35(QRegularExpression* re, QVariant** outptr_QVariant); +void QVariant_new36(QEasingCurve* easing, QVariant** outptr_QVariant); +void QVariant_new37(QUuid* uuid, QVariant** outptr_QVariant); +void QVariant_new38(QUrl* url, QVariant** outptr_QVariant); +void QVariant_new39(QJsonValue* jsonValue, QVariant** outptr_QVariant); +void QVariant_new40(QJsonObject* jsonObject, QVariant** outptr_QVariant); +void QVariant_new41(QJsonArray* jsonArray, QVariant** outptr_QVariant); +void QVariant_new42(QJsonDocument* jsonDocument, QVariant** outptr_QVariant); +void QVariant_new43(QModelIndex* modelIndex, QVariant** outptr_QVariant); +void QVariant_new44(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant); void QVariant_OperatorAssign(QVariant* self, QVariant* other); void QVariant_Swap(QVariant* self, QVariant* other); int QVariant_Type(const QVariant* self); @@ -214,20 +214,20 @@ unsigned long long QVariant_ToULongLong1(const QVariant* self, bool* ok); double QVariant_ToDouble1(const QVariant* self, bool* ok); float QVariant_ToFloat1(const QVariant* self, bool* ok); double QVariant_ToReal1(const QVariant* self, bool* ok); -void QVariant_Delete(QVariant* self); +void QVariant_Delete(QVariant* self, bool isSubclass); -QVariantComparisonHelper* QVariantComparisonHelper_new(QVariant* varVal); -QVariantComparisonHelper* QVariantComparisonHelper_new2(QVariantComparisonHelper* param1); -void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self); +void QVariantComparisonHelper_new(QVariant* varVal, QVariantComparisonHelper** outptr_QVariantComparisonHelper); +void QVariantComparisonHelper_new2(QVariantComparisonHelper* param1, QVariantComparisonHelper** outptr_QVariantComparisonHelper); +void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self, bool isSubclass); -QVariant__Private__Data* QVariant__Private__Data_new(); -QVariant__Private__Data* QVariant__Private__Data_new2(QVariant__Private__Data* param1); +void QVariant__Private__Data_new(QVariant__Private__Data** outptr_QVariant__Private__Data); +void QVariant__Private__Data_new2(QVariant__Private__Data* param1, QVariant__Private__Data** outptr_QVariant__Private__Data); void QVariant__Private__Data_OperatorAssign(QVariant__Private__Data* self, QVariant__Private__Data* param1); -void QVariant__Private__Data_Delete(QVariant__Private__Data* self); +void QVariant__Private__Data_Delete(QVariant__Private__Data* self, bool isSubclass); -void QVariant__Handler_Delete(QVariant__Handler* self); +void QVariant__Handler_Delete(QVariant__Handler* self, bool isSubclass); -QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other); +void QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other, QSequentialIterable__const_iterator** outptr_QSequentialIterable__const_iterator); void QSequentialIterable__const_iterator_OperatorAssign(QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* other); QVariant* QSequentialIterable__const_iterator_OperatorMultiply(const QSequentialIterable__const_iterator* self); bool QSequentialIterable__const_iterator_OperatorEqual(const QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* o); @@ -240,9 +240,9 @@ QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_Operato QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusAssign(QSequentialIterable__const_iterator* self, int j); QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlus(const QSequentialIterable__const_iterator* self, int j); QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinus(const QSequentialIterable__const_iterator* self, int j); -void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self); +void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self, bool isSubclass); -QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other); +void QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other, QAssociativeIterable__const_iterator** outptr_QAssociativeIterable__const_iterator); void QAssociativeIterable__const_iterator_OperatorAssign(QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* other); QVariant* QAssociativeIterable__const_iterator_Key(const QAssociativeIterable__const_iterator* self); QVariant* QAssociativeIterable__const_iterator_Value(const QAssociativeIterable__const_iterator* self); @@ -257,7 +257,7 @@ QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_Opera QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusAssign(QAssociativeIterable__const_iterator* self, int j); QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlus(const QAssociativeIterable__const_iterator* self, int j); QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinus(const QAssociativeIterable__const_iterator* self, int j); -void QAssociativeIterable__const_iterator_Delete(QAssociativeIterable__const_iterator* self); +void QAssociativeIterable__const_iterator_Delete(QAssociativeIterable__const_iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qvariantanimation.cpp b/qt/gen_qvariantanimation.cpp index 775f0732..721b1c36 100644 --- a/qt/gen_qvariantanimation.cpp +++ b/qt/gen_qvariantanimation.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -11,12 +13,205 @@ #include "gen_qvariantanimation.h" #include "_cgo_export.h" -QVariantAnimation* QVariantAnimation_new() { - return new QVariantAnimation(); +class MiqtVirtualQVariantAnimation : public virtual QVariantAnimation { +public: + + MiqtVirtualQVariantAnimation(): QVariantAnimation() {}; + MiqtVirtualQVariantAnimation(QObject* parent): QVariantAnimation(parent) {}; + + virtual ~MiqtVirtualQVariantAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QVariantAnimation::duration(); + } + + + int callback_return_value = miqt_exec_callback_QVariantAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QVariantAnimation::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QVariantAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QVariantAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QVariantAnimation::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QVariantAnimation::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QVariantAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QVariantAnimation::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QVariantAnimation::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QVariantAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QVariantAnimation::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentValue = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentValue(const QVariant& value) override { + if (handle__UpdateCurrentValue == 0) { + QVariantAnimation::updateCurrentValue(value); + return; + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + + miqt_exec_callback_QVariantAnimation_UpdateCurrentValue(this, handle__UpdateCurrentValue, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentValue(QVariant* value) { + + QVariantAnimation::updateCurrentValue(*value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Interpolated = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant interpolated(const QVariant& from, const QVariant& to, qreal progress) const override { + if (handle__Interpolated == 0) { + return QVariantAnimation::interpolated(from, to, progress); + } + + const QVariant& from_ret = from; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&from_ret); + const QVariant& to_ret = to; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&to_ret); + qreal progress_ret = progress; + double sigval3 = static_cast(progress_ret); + + QVariant* callback_return_value = miqt_exec_callback_QVariantAnimation_Interpolated(const_cast(this), handle__Interpolated, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Interpolated(QVariant* from, QVariant* to, double progress) const { + + return new QVariant(QVariantAnimation::interpolated(*from, *to, static_cast(progress))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QVariantAnimation::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QVariantAnimation_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QVariantAnimation::updateDirection(static_cast(direction)); + + } + +}; + +void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(); + *outptr_QVariantAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QVariantAnimation* QVariantAnimation_new2(QObject* parent) { - return new QVariantAnimation(parent); +void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(parent); + *outptr_QVariantAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self) { @@ -136,7 +331,7 @@ void QVariantAnimation_ValueChanged(QVariantAnimation* self, QVariant* value) { } void QVariantAnimation_connect_ValueChanged(QVariantAnimation* self, intptr_t slot) { - QVariantAnimation::connect(self, static_cast(&QVariantAnimation::valueChanged), self, [=](const QVariant& value) { + MiqtVirtualQVariantAnimation::connect(self, static_cast(&QVariantAnimation::valueChanged), self, [=](const QVariant& value) { const QVariant& value_ret = value; // Cast returned reference into pointer QVariant* sigval1 = const_cast(&value_ret); @@ -188,7 +383,67 @@ struct miqt_string QVariantAnimation_TrUtf83(const char* s, const char* c, int n return _ms; } -void QVariantAnimation_Delete(QVariantAnimation* self) { - delete self; +void QVariantAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__Duration = slot; +} + +int QVariantAnimation_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQVariantAnimation*)(self) )->virtualbase_Duration(); +} + +void QVariantAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__Event = slot; +} + +bool QVariantAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_Event(event); +} + +void QVariantAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QVariantAnimation_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QVariantAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateState = slot; +} + +void QVariantAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QVariantAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateCurrentValue = slot; +} + +void QVariantAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateCurrentValue(value); +} + +void QVariantAnimation_override_virtual_Interpolated(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__Interpolated = slot; +} + +QVariant* QVariantAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress) { + return ( (const MiqtVirtualQVariantAnimation*)(self) )->virtualbase_Interpolated(from, to, progress); +} + +void QVariantAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateDirection = slot; +} + +void QVariantAnimation_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QVariantAnimation_Delete(QVariantAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qvariantanimation.go b/qt/gen_qvariantanimation.go index 48fa3d49..48f241b9 100644 --- a/qt/gen_qvariantanimation.go +++ b/qt/gen_qvariantanimation.go @@ -15,7 +15,8 @@ import ( ) type QVariantAnimation struct { - h *C.QVariantAnimation + h *C.QVariantAnimation + isSubclass bool *QAbstractAnimation } @@ -33,27 +34,47 @@ func (this *QVariantAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVariantAnimation(h *C.QVariantAnimation) *QVariantAnimation { +// newQVariantAnimation constructs the type using only CGO pointers. +func newQVariantAnimation(h *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QVariantAnimation { if h == nil { return nil } - return &QVariantAnimation{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))} + return &QVariantAnimation{h: h, + QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQVariantAnimation(h unsafe.Pointer) *QVariantAnimation { - return newQVariantAnimation((*C.QVariantAnimation)(h)) +// UnsafeNewQVariantAnimation constructs the type using only unsafe pointers. +func UnsafeNewQVariantAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QVariantAnimation { + if h == nil { + return nil + } + + return &QVariantAnimation{h: (*C.QVariantAnimation)(h), + QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } // NewQVariantAnimation constructs a new QVariantAnimation object. func NewQVariantAnimation() *QVariantAnimation { - ret := C.QVariantAnimation_new() - return newQVariantAnimation(ret) + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QVariantAnimation_new(&outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQVariantAnimation2 constructs a new QVariantAnimation object. func NewQVariantAnimation2(parent *QObject) *QVariantAnimation { - ret := C.QVariantAnimation_new2(parent.cPointer()) - return newQVariantAnimation(ret) + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QVariantAnimation_new2(parent.cPointer(), &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QVariantAnimation) MetaObject() *QMetaObject { @@ -260,9 +281,180 @@ func QVariantAnimation_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QVariantAnimation) callVirtualBase_Duration() int { + + return (int)(C.QVariantAnimation_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QVariantAnimation) OnDuration(slot func(super func() int) int) { + C.QVariantAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_Duration +func miqt_exec_callback_QVariantAnimation_Duration(self *C.QVariantAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVariantAnimation{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QVariantAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QVariantAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QVariantAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QVariantAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_Event +func miqt_exec_callback_QVariantAnimation_Event(self *C.QVariantAnimation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVariantAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QVariantAnimation_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QVariantAnimation) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QVariantAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateCurrentTime +func miqt_exec_callback_QVariantAnimation_UpdateCurrentTime(self *C.QVariantAnimation, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QVariantAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QVariantAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QVariantAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateState +func miqt_exec_callback_QVariantAnimation_UpdateState(self *C.QVariantAnimation, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateCurrentValue(value *QVariant) { + + C.QVariantAnimation_virtualbase_UpdateCurrentValue(unsafe.Pointer(this.h), value.cPointer()) + +} +func (this *QVariantAnimation) OnUpdateCurrentValue(slot func(super func(value *QVariant), value *QVariant)) { + C.QVariantAnimation_override_virtual_UpdateCurrentValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateCurrentValue +func miqt_exec_callback_QVariantAnimation_UpdateCurrentValue(self *C.QVariantAnimation, cb C.intptr_t, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant), value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateCurrentValue, slotval1) + +} + +func (this *QVariantAnimation) callVirtualBase_Interpolated(from *QVariant, to *QVariant, progress float64) *QVariant { + + _ret := C.QVariantAnimation_virtualbase_Interpolated(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.double)(progress)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVariantAnimation) OnInterpolated(slot func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) { + C.QVariantAnimation_override_virtual_Interpolated(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_Interpolated +func miqt_exec_callback_QVariantAnimation_Interpolated(self *C.QVariantAnimation, cb C.intptr_t, from *C.QVariant, to *C.QVariant, progress C.double) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(from)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(to)) + slotval3 := (float64)(progress) + + virtualReturn := gofunc((&QVariantAnimation{h: self}).callVirtualBase_Interpolated, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QVariantAnimation_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QVariantAnimation) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QVariantAnimation_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateDirection +func miqt_exec_callback_QVariantAnimation_UpdateDirection(self *C.QVariantAnimation, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QVariantAnimation) Delete() { - C.QVariantAnimation_Delete(this.h) + C.QVariantAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qvariantanimation.h b/qt/gen_qvariantanimation.h index d6534118..620601cf 100644 --- a/qt/gen_qvariantanimation.h +++ b/qt/gen_qvariantanimation.h @@ -15,21 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; class QEasingCurve; +class QEvent; class QMetaObject; class QObject; class QVariant; class QVariantAnimation; #else +typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QEasingCurve QEasingCurve; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QVariant QVariant; typedef struct QVariantAnimation QVariantAnimation; #endif -QVariantAnimation* QVariantAnimation_new(); -QVariantAnimation* QVariantAnimation_new2(QObject* parent); +void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self); void* QVariantAnimation_Metacast(QVariantAnimation* self, const char* param1); struct miqt_string QVariantAnimation_Tr(const char* s); @@ -49,11 +53,30 @@ QEasingCurve* QVariantAnimation_EasingCurve(const QVariantAnimation* self); void QVariantAnimation_SetEasingCurve(QVariantAnimation* self, QEasingCurve* easing); void QVariantAnimation_ValueChanged(QVariantAnimation* self, QVariant* value); void QVariantAnimation_connect_ValueChanged(QVariantAnimation* self, intptr_t slot); +bool QVariantAnimation_Event(QVariantAnimation* self, QEvent* event); +void QVariantAnimation_UpdateCurrentTime(QVariantAnimation* self, int param1); +void QVariantAnimation_UpdateState(QVariantAnimation* self, int newState, int oldState); +void QVariantAnimation_UpdateCurrentValue(QVariantAnimation* self, QVariant* value); +QVariant* QVariantAnimation_Interpolated(const QVariantAnimation* self, QVariant* from, QVariant* to, double progress); struct miqt_string QVariantAnimation_Tr2(const char* s, const char* c); struct miqt_string QVariantAnimation_Tr3(const char* s, const char* c, int n); struct miqt_string QVariantAnimation_TrUtf82(const char* s, const char* c); struct miqt_string QVariantAnimation_TrUtf83(const char* s, const char* c, int n); -void QVariantAnimation_Delete(QVariantAnimation* self); +void QVariantAnimation_override_virtual_Duration(void* self, intptr_t slot); +int QVariantAnimation_virtualbase_Duration(const void* self); +void QVariantAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QVariantAnimation_virtualbase_Event(void* self, QEvent* event); +void QVariantAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateCurrentTime(void* self, int param1); +void QVariantAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QVariantAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value); +void QVariantAnimation_override_virtual_Interpolated(void* self, intptr_t slot); +QVariant* QVariantAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress); +void QVariantAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateDirection(void* self, int direction); +void QVariantAnimation_Delete(QVariantAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qvector2d.cpp b/qt/gen_qvector2d.cpp index e8a92a38..19d2ac86 100644 --- a/qt/gen_qvector2d.cpp +++ b/qt/gen_qvector2d.cpp @@ -7,36 +7,44 @@ #include "gen_qvector2d.h" #include "_cgo_export.h" -QVector2D* QVector2D_new() { - return new QVector2D(); +void QVector2D_new(QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new2(int param1) { - return new QVector2D(static_cast(param1)); +void QVector2D_new2(int param1, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(static_cast(param1)); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new3(float xpos, float ypos) { - return new QVector2D(static_cast(xpos), static_cast(ypos)); +void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(static_cast(xpos), static_cast(ypos)); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new4(QPoint* point) { - return new QVector2D(*point); +void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*point); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new5(QPointF* point) { - return new QVector2D(*point); +void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*point); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new6(QVector3D* vector) { - return new QVector2D(*vector); +void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*vector); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new7(QVector4D* vector) { - return new QVector2D(*vector); +void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*vector); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new8(QVector2D* param1) { - return new QVector2D(*param1); +void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*param1); + *outptr_QVector2D = ret; } bool QVector2D_IsNull(const QVector2D* self) { @@ -143,7 +151,11 @@ QPointF* QVector2D_ToPointF(const QVector2D* self) { return new QPointF(self->toPointF()); } -void QVector2D_Delete(QVector2D* self) { - delete self; +void QVector2D_Delete(QVector2D* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qvector2d.go b/qt/gen_qvector2d.go index b6a8e26a..5987eb66 100644 --- a/qt/gen_qvector2d.go +++ b/qt/gen_qvector2d.go @@ -14,7 +14,8 @@ import ( ) type QVector2D struct { - h *C.QVector2D + h *C.QVector2D + isSubclass bool } func (this *QVector2D) cPointer() *C.QVector2D { @@ -31,6 +32,7 @@ func (this *QVector2D) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVector2D constructs the type using only CGO pointers. func newQVector2D(h *C.QVector2D) *QVector2D { if h == nil { return nil @@ -38,56 +40,93 @@ func newQVector2D(h *C.QVector2D) *QVector2D { return &QVector2D{h: h} } +// UnsafeNewQVector2D constructs the type using only unsafe pointers. func UnsafeNewQVector2D(h unsafe.Pointer) *QVector2D { - return newQVector2D((*C.QVector2D)(h)) + if h == nil { + return nil + } + + return &QVector2D{h: (*C.QVector2D)(h)} } // NewQVector2D constructs a new QVector2D object. func NewQVector2D() *QVector2D { - ret := C.QVector2D_new() - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new(&outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D2 constructs a new QVector2D object. func NewQVector2D2(param1 Initialization) *QVector2D { - ret := C.QVector2D_new2((C.int)(param1)) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new2((C.int)(param1), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D3 constructs a new QVector2D object. func NewQVector2D3(xpos float32, ypos float32) *QVector2D { - ret := C.QVector2D_new3((C.float)(xpos), (C.float)(ypos)) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new3((C.float)(xpos), (C.float)(ypos), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D4 constructs a new QVector2D object. func NewQVector2D4(point *QPoint) *QVector2D { - ret := C.QVector2D_new4(point.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new4(point.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D5 constructs a new QVector2D object. func NewQVector2D5(point *QPointF) *QVector2D { - ret := C.QVector2D_new5(point.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new5(point.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D6 constructs a new QVector2D object. func NewQVector2D6(vector *QVector3D) *QVector2D { - ret := C.QVector2D_new6(vector.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new6(vector.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D7 constructs a new QVector2D object. func NewQVector2D7(vector *QVector4D) *QVector2D { - ret := C.QVector2D_new7(vector.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new7(vector.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D8 constructs a new QVector2D object. func NewQVector2D8(param1 *QVector2D) *QVector2D { - ret := C.QVector2D_new8(param1.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new8(param1.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } func (this *QVector2D) IsNull() bool { @@ -199,7 +238,7 @@ func (this *QVector2D) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QVector2D) Delete() { - C.QVector2D_Delete(this.h) + C.QVector2D_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qvector2d.h b/qt/gen_qvector2d.h index eab07434..341249ea 100644 --- a/qt/gen_qvector2d.h +++ b/qt/gen_qvector2d.h @@ -28,14 +28,14 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QVector2D* QVector2D_new(); -QVector2D* QVector2D_new2(int param1); -QVector2D* QVector2D_new3(float xpos, float ypos); -QVector2D* QVector2D_new4(QPoint* point); -QVector2D* QVector2D_new5(QPointF* point); -QVector2D* QVector2D_new6(QVector3D* vector); -QVector2D* QVector2D_new7(QVector4D* vector); -QVector2D* QVector2D_new8(QVector2D* param1); +void QVector2D_new(QVector2D** outptr_QVector2D); +void QVector2D_new2(int param1, QVector2D** outptr_QVector2D); +void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D); +void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D); +void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D); +void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D); +void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D); +void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D); bool QVector2D_IsNull(const QVector2D* self); float QVector2D_X(const QVector2D* self); float QVector2D_Y(const QVector2D* self); @@ -59,7 +59,7 @@ QVector3D* QVector2D_ToVector3D(const QVector2D* self); QVector4D* QVector2D_ToVector4D(const QVector2D* self); QPoint* QVector2D_ToPoint(const QVector2D* self); QPointF* QVector2D_ToPointF(const QVector2D* self); -void QVector2D_Delete(QVector2D* self); +void QVector2D_Delete(QVector2D* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qvector3d.cpp b/qt/gen_qvector3d.cpp index 8d351454..ce4e379e 100644 --- a/qt/gen_qvector3d.cpp +++ b/qt/gen_qvector3d.cpp @@ -9,40 +9,49 @@ #include "gen_qvector3d.h" #include "_cgo_export.h" -QVector3D* QVector3D_new() { - return new QVector3D(); +void QVector3D_new(QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new2(int param1) { - return new QVector3D(static_cast(param1)); +void QVector3D_new2(int param1, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(static_cast(param1)); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new3(float xpos, float ypos, float zpos) { - return new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); +void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new4(QPoint* point) { - return new QVector3D(*point); +void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*point); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new5(QPointF* point) { - return new QVector3D(*point); +void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*point); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new6(QVector2D* vector) { - return new QVector3D(*vector); +void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*vector); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new7(QVector2D* vector, float zpos) { - return new QVector3D(*vector, static_cast(zpos)); +void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*vector, static_cast(zpos)); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new8(QVector4D* vector) { - return new QVector3D(*vector); +void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*vector); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new9(QVector3D* param1) { - return new QVector3D(*param1); +void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*param1); + *outptr_QVector3D = ret; } bool QVector3D_IsNull(const QVector3D* self) { @@ -185,7 +194,11 @@ QPointF* QVector3D_ToPointF(const QVector3D* self) { return new QPointF(self->toPointF()); } -void QVector3D_Delete(QVector3D* self) { - delete self; +void QVector3D_Delete(QVector3D* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qvector3d.go b/qt/gen_qvector3d.go index 8df03dd7..af105abf 100644 --- a/qt/gen_qvector3d.go +++ b/qt/gen_qvector3d.go @@ -14,7 +14,8 @@ import ( ) type QVector3D struct { - h *C.QVector3D + h *C.QVector3D + isSubclass bool } func (this *QVector3D) cPointer() *C.QVector3D { @@ -31,6 +32,7 @@ func (this *QVector3D) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVector3D constructs the type using only CGO pointers. func newQVector3D(h *C.QVector3D) *QVector3D { if h == nil { return nil @@ -38,62 +40,103 @@ func newQVector3D(h *C.QVector3D) *QVector3D { return &QVector3D{h: h} } +// UnsafeNewQVector3D constructs the type using only unsafe pointers. func UnsafeNewQVector3D(h unsafe.Pointer) *QVector3D { - return newQVector3D((*C.QVector3D)(h)) + if h == nil { + return nil + } + + return &QVector3D{h: (*C.QVector3D)(h)} } // NewQVector3D constructs a new QVector3D object. func NewQVector3D() *QVector3D { - ret := C.QVector3D_new() - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new(&outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D2 constructs a new QVector3D object. func NewQVector3D2(param1 Initialization) *QVector3D { - ret := C.QVector3D_new2((C.int)(param1)) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new2((C.int)(param1), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D3 constructs a new QVector3D object. func NewQVector3D3(xpos float32, ypos float32, zpos float32) *QVector3D { - ret := C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos)) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D4 constructs a new QVector3D object. func NewQVector3D4(point *QPoint) *QVector3D { - ret := C.QVector3D_new4(point.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new4(point.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D5 constructs a new QVector3D object. func NewQVector3D5(point *QPointF) *QVector3D { - ret := C.QVector3D_new5(point.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new5(point.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D6 constructs a new QVector3D object. func NewQVector3D6(vector *QVector2D) *QVector3D { - ret := C.QVector3D_new6(vector.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new6(vector.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D7 constructs a new QVector3D object. func NewQVector3D7(vector *QVector2D, zpos float32) *QVector3D { - ret := C.QVector3D_new7(vector.cPointer(), (C.float)(zpos)) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new7(vector.cPointer(), (C.float)(zpos), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D8 constructs a new QVector3D object. func NewQVector3D8(vector *QVector4D) *QVector3D { - ret := C.QVector3D_new8(vector.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new8(vector.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D9 constructs a new QVector3D object. func NewQVector3D9(param1 *QVector3D) *QVector3D { - ret := C.QVector3D_new9(param1.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new9(param1.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } func (this *QVector3D) IsNull() bool { @@ -256,7 +299,7 @@ func (this *QVector3D) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QVector3D) Delete() { - C.QVector3D_Delete(this.h) + C.QVector3D_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qvector3d.h b/qt/gen_qvector3d.h index 12fa5637..751d7052 100644 --- a/qt/gen_qvector3d.h +++ b/qt/gen_qvector3d.h @@ -32,15 +32,15 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QVector3D* QVector3D_new(); -QVector3D* QVector3D_new2(int param1); -QVector3D* QVector3D_new3(float xpos, float ypos, float zpos); -QVector3D* QVector3D_new4(QPoint* point); -QVector3D* QVector3D_new5(QPointF* point); -QVector3D* QVector3D_new6(QVector2D* vector); -QVector3D* QVector3D_new7(QVector2D* vector, float zpos); -QVector3D* QVector3D_new8(QVector4D* vector); -QVector3D* QVector3D_new9(QVector3D* param1); +void QVector3D_new(QVector3D** outptr_QVector3D); +void QVector3D_new2(int param1, QVector3D** outptr_QVector3D); +void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D); +void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D); +void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D); +void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D); +void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D); +void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D); +void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D); bool QVector3D_IsNull(const QVector3D* self); float QVector3D_X(const QVector3D* self); float QVector3D_Y(const QVector3D* self); @@ -73,7 +73,7 @@ QVector2D* QVector3D_ToVector2D(const QVector3D* self); QVector4D* QVector3D_ToVector4D(const QVector3D* self); QPoint* QVector3D_ToPoint(const QVector3D* self); QPointF* QVector3D_ToPointF(const QVector3D* self); -void QVector3D_Delete(QVector3D* self); +void QVector3D_Delete(QVector3D* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qvector4d.cpp b/qt/gen_qvector4d.cpp index edca8c12..191e3fa6 100644 --- a/qt/gen_qvector4d.cpp +++ b/qt/gen_qvector4d.cpp @@ -7,44 +7,54 @@ #include "gen_qvector4d.h" #include "_cgo_export.h" -QVector4D* QVector4D_new() { - return new QVector4D(); +void QVector4D_new(QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new2(int param1) { - return new QVector4D(static_cast(param1)); +void QVector4D_new2(int param1, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(static_cast(param1)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos) { - return new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); +void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new4(QPoint* point) { - return new QVector4D(*point); +void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*point); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new5(QPointF* point) { - return new QVector4D(*point); +void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*point); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new6(QVector2D* vector) { - return new QVector4D(*vector); +void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos) { - return new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); +void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new8(QVector3D* vector) { - return new QVector4D(*vector); +void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new9(QVector3D* vector, float wpos) { - return new QVector4D(*vector, static_cast(wpos)); +void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector, static_cast(wpos)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new10(QVector4D* param1) { - return new QVector4D(*param1); +void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*param1); + *outptr_QVector4D = ret; } bool QVector4D_IsNull(const QVector4D* self) { @@ -167,7 +177,11 @@ QPointF* QVector4D_ToPointF(const QVector4D* self) { return new QPointF(self->toPointF()); } -void QVector4D_Delete(QVector4D* self) { - delete self; +void QVector4D_Delete(QVector4D* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qvector4d.go b/qt/gen_qvector4d.go index 1d7566ef..bd5bebe2 100644 --- a/qt/gen_qvector4d.go +++ b/qt/gen_qvector4d.go @@ -14,7 +14,8 @@ import ( ) type QVector4D struct { - h *C.QVector4D + h *C.QVector4D + isSubclass bool } func (this *QVector4D) cPointer() *C.QVector4D { @@ -31,6 +32,7 @@ func (this *QVector4D) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVector4D constructs the type using only CGO pointers. func newQVector4D(h *C.QVector4D) *QVector4D { if h == nil { return nil @@ -38,68 +40,113 @@ func newQVector4D(h *C.QVector4D) *QVector4D { return &QVector4D{h: h} } +// UnsafeNewQVector4D constructs the type using only unsafe pointers. func UnsafeNewQVector4D(h unsafe.Pointer) *QVector4D { - return newQVector4D((*C.QVector4D)(h)) + if h == nil { + return nil + } + + return &QVector4D{h: (*C.QVector4D)(h)} } // NewQVector4D constructs a new QVector4D object. func NewQVector4D() *QVector4D { - ret := C.QVector4D_new() - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new(&outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D2 constructs a new QVector4D object. func NewQVector4D2(param1 Initialization) *QVector4D { - ret := C.QVector4D_new2((C.int)(param1)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new2((C.int)(param1), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D3 constructs a new QVector4D object. func NewQVector4D3(xpos float32, ypos float32, zpos float32, wpos float32) *QVector4D { - ret := C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D4 constructs a new QVector4D object. func NewQVector4D4(point *QPoint) *QVector4D { - ret := C.QVector4D_new4(point.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new4(point.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D5 constructs a new QVector4D object. func NewQVector4D5(point *QPointF) *QVector4D { - ret := C.QVector4D_new5(point.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new5(point.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D6 constructs a new QVector4D object. func NewQVector4D6(vector *QVector2D) *QVector4D { - ret := C.QVector4D_new6(vector.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new6(vector.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D7 constructs a new QVector4D object. func NewQVector4D7(vector *QVector2D, zpos float32, wpos float32) *QVector4D { - ret := C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D8 constructs a new QVector4D object. func NewQVector4D8(vector *QVector3D) *QVector4D { - ret := C.QVector4D_new8(vector.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new8(vector.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D9 constructs a new QVector4D object. func NewQVector4D9(vector *QVector3D, wpos float32) *QVector4D { - ret := C.QVector4D_new9(vector.cPointer(), (C.float)(wpos)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new9(vector.cPointer(), (C.float)(wpos), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D10 constructs a new QVector4D object. func NewQVector4D10(param1 *QVector4D) *QVector4D { - ret := C.QVector4D_new10(param1.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new10(param1.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } func (this *QVector4D) IsNull() bool { @@ -233,7 +280,7 @@ func (this *QVector4D) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QVector4D) Delete() { - C.QVector4D_Delete(this.h) + C.QVector4D_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qvector4d.h b/qt/gen_qvector4d.h index 1912a936..1bfef5d8 100644 --- a/qt/gen_qvector4d.h +++ b/qt/gen_qvector4d.h @@ -28,16 +28,16 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QVector4D* QVector4D_new(); -QVector4D* QVector4D_new2(int param1); -QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos); -QVector4D* QVector4D_new4(QPoint* point); -QVector4D* QVector4D_new5(QPointF* point); -QVector4D* QVector4D_new6(QVector2D* vector); -QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos); -QVector4D* QVector4D_new8(QVector3D* vector); -QVector4D* QVector4D_new9(QVector3D* vector, float wpos); -QVector4D* QVector4D_new10(QVector4D* param1); +void QVector4D_new(QVector4D** outptr_QVector4D); +void QVector4D_new2(int param1, QVector4D** outptr_QVector4D); +void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D); +void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D); +void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D); +void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D); +void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D); +void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D); +void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D); +void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D); bool QVector4D_IsNull(const QVector4D* self); float QVector4D_X(const QVector4D* self); float QVector4D_Y(const QVector4D* self); @@ -65,7 +65,7 @@ QVector3D* QVector4D_ToVector3D(const QVector4D* self); QVector3D* QVector4D_ToVector3DAffine(const QVector4D* self); QPoint* QVector4D_ToPoint(const QVector4D* self); QPointF* QVector4D_ToPointF(const QVector4D* self); -void QVector4D_Delete(QVector4D* self); +void QVector4D_Delete(QVector4D* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qversionnumber.cpp b/qt/gen_qversionnumber.cpp index 28a00d27..bb704c38 100644 --- a/qt/gen_qversionnumber.cpp +++ b/qt/gen_qversionnumber.cpp @@ -7,30 +7,35 @@ #include "gen_qversionnumber.h" #include "_cgo_export.h" -QVersionNumber* QVersionNumber_new() { - return new QVersionNumber(); +void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg) { +void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber) { QVector seg_QList; seg_QList.reserve(seg.len); int* seg_arr = static_cast(seg.data); for(size_t i = 0; i < seg.len; ++i) { seg_QList.push_back(static_cast(seg_arr[i])); } - return new QVersionNumber(seg_QList); + QVersionNumber* ret = new QVersionNumber(seg_QList); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new3(int maj) { - return new QVersionNumber(static_cast(maj)); +void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(static_cast(maj)); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new4(int maj, int min) { - return new QVersionNumber(static_cast(maj), static_cast(min)); +void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min)); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new5(int maj, int min, int mic) { - return new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); +void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); + *outptr_QVersionNumber = ret; } bool QVersionNumber_IsNull(const QVersionNumber* self) { @@ -111,7 +116,11 @@ QVersionNumber* QVersionNumber_FromString22(struct miqt_string stringVal, int* s return new QVersionNumber(QVersionNumber::fromString(stringVal_QString, static_cast(suffixIndex))); } -void QVersionNumber_Delete(QVersionNumber* self) { - delete self; +void QVersionNumber_Delete(QVersionNumber* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qversionnumber.go b/qt/gen_qversionnumber.go index d01e2386..372dab53 100644 --- a/qt/gen_qversionnumber.go +++ b/qt/gen_qversionnumber.go @@ -14,7 +14,8 @@ import ( ) type QVersionNumber struct { - h *C.QVersionNumber + h *C.QVersionNumber + isSubclass bool } func (this *QVersionNumber) cPointer() *C.QVersionNumber { @@ -31,6 +32,7 @@ func (this *QVersionNumber) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVersionNumber constructs the type using only CGO pointers. func newQVersionNumber(h *C.QVersionNumber) *QVersionNumber { if h == nil { return nil @@ -38,14 +40,23 @@ func newQVersionNumber(h *C.QVersionNumber) *QVersionNumber { return &QVersionNumber{h: h} } +// UnsafeNewQVersionNumber constructs the type using only unsafe pointers. func UnsafeNewQVersionNumber(h unsafe.Pointer) *QVersionNumber { - return newQVersionNumber((*C.QVersionNumber)(h)) + if h == nil { + return nil + } + + return &QVersionNumber{h: (*C.QVersionNumber)(h)} } // NewQVersionNumber constructs a new QVersionNumber object. func NewQVersionNumber() *QVersionNumber { - ret := C.QVersionNumber_new() - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new(&outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber2 constructs a new QVersionNumber object. @@ -56,26 +67,42 @@ func NewQVersionNumber2(seg []int) *QVersionNumber { seg_CArray[i] = (C.int)(seg[i]) } seg_ma := C.struct_miqt_array{len: C.size_t(len(seg)), data: unsafe.Pointer(seg_CArray)} - ret := C.QVersionNumber_new2(seg_ma) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new2(seg_ma, &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber3 constructs a new QVersionNumber object. func NewQVersionNumber3(maj int) *QVersionNumber { - ret := C.QVersionNumber_new3((C.int)(maj)) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new3((C.int)(maj), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber4 constructs a new QVersionNumber object. func NewQVersionNumber4(maj int, min int) *QVersionNumber { - ret := C.QVersionNumber_new4((C.int)(maj), (C.int)(min)) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new4((C.int)(maj), (C.int)(min), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber5 constructs a new QVersionNumber object. func NewQVersionNumber5(maj int, min int, mic int) *QVersionNumber { - ret := C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic)) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } func (this *QVersionNumber) IsNull() bool { @@ -169,7 +196,7 @@ func QVersionNumber_FromString22(stringVal string, suffixIndex *int) *QVersionNu // Delete this object from C++ memory. func (this *QVersionNumber) Delete() { - C.QVersionNumber_Delete(this.h) + C.QVersionNumber_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qversionnumber.h b/qt/gen_qversionnumber.h index cedddfe5..08e80a15 100644 --- a/qt/gen_qversionnumber.h +++ b/qt/gen_qversionnumber.h @@ -20,11 +20,11 @@ class QVersionNumber; typedef struct QVersionNumber QVersionNumber; #endif -QVersionNumber* QVersionNumber_new(); -QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg); -QVersionNumber* QVersionNumber_new3(int maj); -QVersionNumber* QVersionNumber_new4(int maj, int min); -QVersionNumber* QVersionNumber_new5(int maj, int min, int mic); +void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber); bool QVersionNumber_IsNull(const QVersionNumber* self); bool QVersionNumber_IsNormalized(const QVersionNumber* self); int QVersionNumber_MajorVersion(const QVersionNumber* self); @@ -40,7 +40,7 @@ QVersionNumber* QVersionNumber_CommonPrefix(QVersionNumber* v1, QVersionNumber* struct miqt_string QVersionNumber_ToString(const QVersionNumber* self); QVersionNumber* QVersionNumber_FromString(struct miqt_string stringVal); QVersionNumber* QVersionNumber_FromString22(struct miqt_string stringVal, int* suffixIndex); -void QVersionNumber_Delete(QVersionNumber* self); +void QVersionNumber_Delete(QVersionNumber* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qwaitcondition.cpp b/qt/gen_qwaitcondition.cpp index ad79b27d..180ef11e 100644 --- a/qt/gen_qwaitcondition.cpp +++ b/qt/gen_qwaitcondition.cpp @@ -6,8 +6,9 @@ #include "gen_qwaitcondition.h" #include "_cgo_export.h" -QWaitCondition* QWaitCondition_new() { - return new QWaitCondition(); +void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition) { + QWaitCondition* ret = new QWaitCondition(); + *outptr_QWaitCondition = ret; } bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex) { @@ -50,7 +51,11 @@ bool QWaitCondition_Wait23(QWaitCondition* self, QReadWriteLock* lockedReadWrite return self->wait(lockedReadWriteLock, *deadline); } -void QWaitCondition_Delete(QWaitCondition* self) { - delete self; +void QWaitCondition_Delete(QWaitCondition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qwaitcondition.go b/qt/gen_qwaitcondition.go index cb77317a..7a8e823f 100644 --- a/qt/gen_qwaitcondition.go +++ b/qt/gen_qwaitcondition.go @@ -14,7 +14,8 @@ import ( ) type QWaitCondition struct { - h *C.QWaitCondition + h *C.QWaitCondition + isSubclass bool } func (this *QWaitCondition) cPointer() *C.QWaitCondition { @@ -31,6 +32,7 @@ func (this *QWaitCondition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWaitCondition constructs the type using only CGO pointers. func newQWaitCondition(h *C.QWaitCondition) *QWaitCondition { if h == nil { return nil @@ -38,14 +40,23 @@ func newQWaitCondition(h *C.QWaitCondition) *QWaitCondition { return &QWaitCondition{h: h} } +// UnsafeNewQWaitCondition constructs the type using only unsafe pointers. func UnsafeNewQWaitCondition(h unsafe.Pointer) *QWaitCondition { - return newQWaitCondition((*C.QWaitCondition)(h)) + if h == nil { + return nil + } + + return &QWaitCondition{h: (*C.QWaitCondition)(h)} } // NewQWaitCondition constructs a new QWaitCondition object. func NewQWaitCondition() *QWaitCondition { - ret := C.QWaitCondition_new() - return newQWaitCondition(ret) + var outptr_QWaitCondition *C.QWaitCondition = nil + + C.QWaitCondition_new(&outptr_QWaitCondition) + ret := newQWaitCondition(outptr_QWaitCondition) + ret.isSubclass = true + return ret } func (this *QWaitCondition) Wait(lockedMutex *QMutex) bool { @@ -90,7 +101,7 @@ func (this *QWaitCondition) Wait23(lockedReadWriteLock *QReadWriteLock, deadline // Delete this object from C++ memory. func (this *QWaitCondition) Delete() { - C.QWaitCondition_Delete(this.h) + C.QWaitCondition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qwaitcondition.h b/qt/gen_qwaitcondition.h index 5abaaf5b..e551de64 100644 --- a/qt/gen_qwaitcondition.h +++ b/qt/gen_qwaitcondition.h @@ -26,7 +26,7 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWaitCondition QWaitCondition; #endif -QWaitCondition* QWaitCondition_new(); +void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition); bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex); bool QWaitCondition_Wait2(QWaitCondition* self, QMutex* lockedMutex, unsigned long time); bool QWaitCondition_WaitWithLockedReadWriteLock(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock); @@ -37,7 +37,7 @@ void QWaitCondition_NotifyOne(QWaitCondition* self); void QWaitCondition_NotifyAll(QWaitCondition* self); bool QWaitCondition_Wait22(QWaitCondition* self, QMutex* lockedMutex, QDeadlineTimer* deadline); bool QWaitCondition_Wait23(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock, QDeadlineTimer* deadline); -void QWaitCondition_Delete(QWaitCondition* self); +void QWaitCondition_Delete(QWaitCondition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qwhatsthis.cpp b/qt/gen_qwhatsthis.cpp index c7501669..770e04c2 100644 --- a/qt/gen_qwhatsthis.cpp +++ b/qt/gen_qwhatsthis.cpp @@ -44,7 +44,11 @@ QAction* QWhatsThis_CreateAction1(QObject* parent) { return QWhatsThis::createAction(parent); } -void QWhatsThis_Delete(QWhatsThis* self) { - delete self; +void QWhatsThis_Delete(QWhatsThis* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qwhatsthis.go b/qt/gen_qwhatsthis.go index 5a8529da..3174de95 100644 --- a/qt/gen_qwhatsthis.go +++ b/qt/gen_qwhatsthis.go @@ -14,7 +14,8 @@ import ( ) type QWhatsThis struct { - h *C.QWhatsThis + h *C.QWhatsThis + isSubclass bool } func (this *QWhatsThis) cPointer() *C.QWhatsThis { @@ -31,6 +32,7 @@ func (this *QWhatsThis) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWhatsThis constructs the type using only CGO pointers. func newQWhatsThis(h *C.QWhatsThis) *QWhatsThis { if h == nil { return nil @@ -38,8 +40,13 @@ func newQWhatsThis(h *C.QWhatsThis) *QWhatsThis { return &QWhatsThis{h: h} } +// UnsafeNewQWhatsThis constructs the type using only unsafe pointers. func UnsafeNewQWhatsThis(h unsafe.Pointer) *QWhatsThis { - return newQWhatsThis((*C.QWhatsThis)(h)) + if h == nil { + return nil + } + + return &QWhatsThis{h: (*C.QWhatsThis)(h)} } func QWhatsThis_EnterWhatsThisMode() { @@ -67,7 +74,7 @@ func QWhatsThis_HideText() { } func QWhatsThis_CreateAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction())) + return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction()), nil) } func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { @@ -79,12 +86,12 @@ func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { } func QWhatsThis_CreateAction1(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction1(parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction1(parent.cPointer())), nil) } // Delete this object from C++ memory. func (this *QWhatsThis) Delete() { - C.QWhatsThis_Delete(this.h) + C.QWhatsThis_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qwhatsthis.h b/qt/gen_qwhatsthis.h index 0ed60fdd..698e1e18 100644 --- a/qt/gen_qwhatsthis.h +++ b/qt/gen_qwhatsthis.h @@ -36,7 +36,7 @@ void QWhatsThis_HideText(); QAction* QWhatsThis_CreateAction(); void QWhatsThis_ShowText3(QPoint* pos, struct miqt_string text, QWidget* w); QAction* QWhatsThis_CreateAction1(QObject* parent); -void QWhatsThis_Delete(QWhatsThis* self); +void QWhatsThis_Delete(QWhatsThis* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qwidget.cpp b/qt/gen_qwidget.cpp index 6ccc078b..f4255539 100644 --- a/qt/gen_qwidget.cpp +++ b/qt/gen_qwidget.cpp @@ -1,36 +1,59 @@ #include +#include #include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include #include #include +#include #include +#include +#include +#include #include #include +#include #include #include #include #include #include #include +#include #include +#include #include #include #include #include #include #include +#include +#include #include +#include #include #include #include @@ -38,28 +61,1176 @@ #include "gen_qwidget.h" #include "_cgo_export.h" -QWidgetData* QWidgetData_new(QWidgetData* param1) { - return new QWidgetData(*param1); +void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData) { + QWidgetData* ret = new QWidgetData(*param1); + *outptr_QWidgetData = ret; } void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1) { self->operator=(*param1); } -void QWidgetData_Delete(QWidgetData* self) { - delete self; +void QWidgetData_Delete(QWidgetData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWidget* QWidget_new(QWidget* parent) { - return new QWidget(parent); +class MiqtVirtualQWidget : public virtual QWidget { +public: + + MiqtVirtualQWidget(QWidget* parent): QWidget(parent) {}; + MiqtVirtualQWidget(): QWidget() {}; + MiqtVirtualQWidget(QWidget* parent, Qt::WindowFlags f): QWidget(parent, f) {}; + + virtual ~MiqtVirtualQWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWidget::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWidget::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWidget_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWidget::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWidget::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWidget::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWidget::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWidget::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWidget::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWidget_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWidget::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWidget::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWidget_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWidget::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWidget::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWidget_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWidget::disconnectNotify(*signal); + + } + +}; + +void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent); + *outptr_QWidget = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWidget* QWidget_new2() { - return new QWidget(); +void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(); + *outptr_QWidget = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWidget* QWidget_new3(QWidget* parent, int f) { - return new QWidget(parent, static_cast(f)); +void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent, static_cast(f)); + *outptr_QWidget = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QWidget_MetaObject(const QWidget* self) { @@ -1200,7 +2371,7 @@ void QWidget_WindowTitleChanged(QWidget* self, struct miqt_string title) { } void QWidget_connect_WindowTitleChanged(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::windowTitleChanged), self, [=](const QString& title) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::windowTitleChanged), self, [=](const QString& title) { const QString title_ret = title; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray title_b = title_ret.toUtf8(); @@ -1218,7 +2389,7 @@ void QWidget_WindowIconChanged(QWidget* self, QIcon* icon) { } void QWidget_connect_WindowIconChanged(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::windowIconChanged), self, [=](const QIcon& icon) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::windowIconChanged), self, [=](const QIcon& icon) { const QIcon& icon_ret = icon; // Cast returned reference into pointer QIcon* sigval1 = const_cast(&icon_ret); @@ -1232,7 +2403,7 @@ void QWidget_WindowIconTextChanged(QWidget* self, struct miqt_string iconText) { } void QWidget_connect_WindowIconTextChanged(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::windowIconTextChanged), self, [=](const QString& iconText) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::windowIconTextChanged), self, [=](const QString& iconText) { const QString iconText_ret = iconText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray iconText_b = iconText_ret.toUtf8(); @@ -1250,7 +2421,7 @@ void QWidget_CustomContextMenuRequested(QWidget* self, QPoint* pos) { } void QWidget_connect_CustomContextMenuRequested(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::customContextMenuRequested), self, [=](const QPoint& pos) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::customContextMenuRequested), self, [=](const QPoint& pos) { const QPoint& pos_ret = pos; // Cast returned reference into pointer QPoint* sigval1 = const_cast(&pos_ret); @@ -1375,7 +2546,387 @@ QWidget* QWidget_CreateWindowContainer3(QWindow* window, QWidget* parent, int fl return QWidget::createWindowContainer(window, parent, static_cast(flags)); } -void QWidget_Delete(QWidget* self) { - delete self; +void QWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DevType = slot; +} + +int QWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_DevType(); +} + +void QWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__SetVisible = slot; +} + +void QWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_SizeHint(); +} + +void QWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__Event = slot; +} + +bool QWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_Event(event); +} + +void QWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__WheelEvent = slot; +} + +void QWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__EnterEvent = slot; +} + +void QWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__PaintEvent = slot; +} + +void QWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MoveEvent = slot; +} + +void QWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__CloseEvent = slot; +} + +void QWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__TabletEvent = slot; +} + +void QWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ActionEvent = slot; +} + +void QWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DropEvent = slot; +} + +void QWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ShowEvent = slot; +} + +void QWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__HideEvent = slot; +} + +void QWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__Metric = slot; +} + +int QWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_Metric(param1); +} + +void QWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__InitPainter = slot; +} + +void QWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWidget_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__EventFilter = slot; +} + +bool QWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__TimerEvent = slot; +} + +void QWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_TimerEvent(event); +} + +void QWidget_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ChildEvent = slot; +} + +void QWidget_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ChildEvent(event); +} + +void QWidget_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__CustomEvent = slot; +} + +void QWidget_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_CustomEvent(event); +} + +void QWidget_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ConnectNotify = slot; +} + +void QWidget_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWidget_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DisconnectNotify = slot; +} + +void QWidget_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWidget_Delete(QWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qwidget.go b/qt/gen_qwidget.go index c5caeac7..06bc7d94 100644 --- a/qt/gen_qwidget.go +++ b/qt/gen_qwidget.go @@ -23,7 +23,8 @@ const ( ) type QWidgetData struct { - h *C.QWidgetData + h *C.QWidgetData + isSubclass bool } func (this *QWidgetData) cPointer() *C.QWidgetData { @@ -40,6 +41,7 @@ func (this *QWidgetData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWidgetData constructs the type using only CGO pointers. func newQWidgetData(h *C.QWidgetData) *QWidgetData { if h == nil { return nil @@ -47,14 +49,23 @@ func newQWidgetData(h *C.QWidgetData) *QWidgetData { return &QWidgetData{h: h} } +// UnsafeNewQWidgetData constructs the type using only unsafe pointers. func UnsafeNewQWidgetData(h unsafe.Pointer) *QWidgetData { - return newQWidgetData((*C.QWidgetData)(h)) + if h == nil { + return nil + } + + return &QWidgetData{h: (*C.QWidgetData)(h)} } // NewQWidgetData constructs a new QWidgetData object. func NewQWidgetData(param1 *QWidgetData) *QWidgetData { - ret := C.QWidgetData_new(param1.cPointer()) - return newQWidgetData(ret) + var outptr_QWidgetData *C.QWidgetData = nil + + C.QWidgetData_new(param1.cPointer(), &outptr_QWidgetData) + ret := newQWidgetData(outptr_QWidgetData) + ret.isSubclass = true + return ret } func (this *QWidgetData) OperatorAssign(param1 *QWidgetData) { @@ -63,7 +74,7 @@ func (this *QWidgetData) OperatorAssign(param1 *QWidgetData) { // Delete this object from C++ memory. func (this *QWidgetData) Delete() { - C.QWidgetData_Delete(this.h) + C.QWidgetData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -76,7 +87,8 @@ func (this *QWidgetData) GoGC() { } type QWidget struct { - h *C.QWidget + h *C.QWidget + isSubclass bool *QObject *QPaintDevice } @@ -95,33 +107,61 @@ func (this *QWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidget(h *C.QWidget) *QWidget { +// newQWidget constructs the type using only CGO pointers. +func newQWidget(h *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWidget { if h == nil { return nil } - return &QWidget{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QWidget{h: h, + QObject: newQObject(h_QObject), + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQWidget(h unsafe.Pointer) *QWidget { - return newQWidget((*C.QWidget)(h)) +// UnsafeNewQWidget constructs the type using only unsafe pointers. +func UnsafeNewQWidget(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWidget { + if h == nil { + return nil + } + + return &QWidget{h: (*C.QWidget)(h), + QObject: UnsafeNewQObject(h_QObject), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQWidget constructs a new QWidget object. func NewQWidget(parent *QWidget) *QWidget { - ret := C.QWidget_new(parent.cPointer()) - return newQWidget(ret) + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWidget_new(parent.cPointer(), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWidget2 constructs a new QWidget object. func NewQWidget2() *QWidget { - ret := C.QWidget_new2() - return newQWidget(ret) + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWidget_new2(&outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWidget3 constructs a new QWidget object. func NewQWidget3(parent *QWidget, f WindowType) *QWidget { - ret := C.QWidget_new3(parent.cPointer(), (C.int)(f)) - return newQWidget(ret) + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWidget_new3(parent.cPointer(), (C.int)(f), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QWidget) MetaObject() *QMetaObject { @@ -173,7 +213,7 @@ func (this *QWidget) EffectiveWinId() uintptr { } func (this *QWidget) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QWidget_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QWidget_Style(this.h)), nil) } func (this *QWidget) SetStyle(style *QStyle) { @@ -451,15 +491,15 @@ func (this *QWidget) MapFrom(param1 *QWidget, param2 *QPoint) *QPoint { } func (this *QWidget) Window() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Window(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Window(this.h)), nil, nil) } func (this *QWidget) NativeParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NativeParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NativeParentWidget(this.h)), nil, nil) } func (this *QWidget) TopLevelWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_TopLevelWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_TopLevelWidget(this.h)), nil, nil) } func (this *QWidget) Palette() *QPalette { @@ -572,13 +612,13 @@ func (this *QWidget) RenderWithPainter(painter *QPainter) { func (this *QWidget) Grab() *QPixmap { _ret := C.QWidget_Grab(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QWidget) GraphicsEffect() *QGraphicsEffect { - return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QWidget_GraphicsEffect(this.h))) + return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QWidget_GraphicsEffect(this.h)), nil) } func (this *QWidget) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -850,7 +890,7 @@ func (this *QWidget) SetFocusProxy(focusProxy *QWidget) { } func (this *QWidget) FocusProxy() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusProxy(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusProxy(this.h)), nil, nil) } func (this *QWidget) ContextMenuPolicy() ContextMenuPolicy { @@ -898,11 +938,11 @@ func (this *QWidget) SetShortcutAutoRepeat(id int) { } func QWidget_MouseGrabber() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_MouseGrabber())) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_MouseGrabber()), nil, nil) } func QWidget_KeyboardGrabber() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_KeyboardGrabber())) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_KeyboardGrabber()), nil, nil) } func (this *QWidget) UpdatesEnabled() bool { @@ -914,7 +954,7 @@ func (this *QWidget) SetUpdatesEnabled(enable bool) { } func (this *QWidget) GraphicsProxyWidget() *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QWidget_GraphicsProxyWidget(this.h))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QWidget_GraphicsProxyWidget(this.h)), nil, nil, nil, nil, nil) } func (this *QWidget) Update() { @@ -1146,7 +1186,7 @@ func (this *QWidget) ContentsRect() *QRect { } func (this *QWidget) Layout() *QLayout { - return UnsafeNewQLayout(unsafe.Pointer(C.QWidget_Layout(this.h))) + return UnsafeNewQLayout(unsafe.Pointer(C.QWidget_Layout(this.h)), nil, nil) } func (this *QWidget) SetLayout(layout *QLayout) { @@ -1174,15 +1214,15 @@ func (this *QWidget) Scroll2(dx int, dy int, param3 *QRect) { } func (this *QWidget) FocusWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusWidget(this.h)), nil, nil) } func (this *QWidget) NextInFocusChain() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NextInFocusChain(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NextInFocusChain(this.h)), nil, nil) } func (this *QWidget) PreviousInFocusChain() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_PreviousInFocusChain(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_PreviousInFocusChain(this.h)), nil, nil) } func (this *QWidget) AcceptDrops() bool { @@ -1230,13 +1270,13 @@ func (this *QWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QWidget) ParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ParentWidget(this.h)), nil, nil) } func (this *QWidget) SetWindowFlags(typeVal WindowType) { @@ -1260,15 +1300,15 @@ func (this *QWidget) WindowType() WindowType { } func QWidget_Find(param1 uintptr) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Find((C.uintptr_t)(param1)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Find((C.uintptr_t)(param1))), nil, nil) } func (this *QWidget) ChildAt(x int, y int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y))), nil, nil) } func (this *QWidget) ChildAtWithQPoint(p *QPoint) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer())), nil, nil) } func (this *QWidget) SetAttribute(param1 WidgetAttribute) { @@ -1304,15 +1344,15 @@ func (this *QWidget) BackingStore() *QBackingStore { } func (this *QWidget) WindowHandle() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWidget_WindowHandle(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWidget_WindowHandle(this.h)), nil, nil) } func (this *QWidget) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QWidget_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QWidget_Screen(this.h)), nil) } func QWidget_CreateWindowContainer(window *QWindow) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer(window.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer(window.cPointer())), nil, nil) } func (this *QWidget) WindowTitleChanged(title string) { @@ -1494,7 +1534,7 @@ func (this *QWidget) Render42(painter *QPainter, targetOffset *QPoint, sourceReg func (this *QWidget) Grab1(rectangle *QRect) *QPixmap { _ret := C.QWidget_Grab1(this.h, rectangle.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1524,16 +1564,1123 @@ func (this *QWidget) SetAttribute2(param1 WidgetAttribute, on bool) { } func QWidget_CreateWindowContainer2(window *QWindow, parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer())), nil, nil) } func QWidget_CreateWindowContainer3(window *QWindow, parent *QWidget, flags WindowType) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags))), nil, nil) +} + +func (this *QWidget) callVirtualBase_DevType() int { + + return (int)(C.QWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWidget) OnDevType(slot func(super func() int) int) { + C.QWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DevType +func miqt_exec_callback_QWidget_DevType(self *C.QWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_SetVisible(visible bool) { + + C.QWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_SetVisible +func miqt_exec_callback_QWidget_SetVisible(self *C.QWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_SizeHint +func miqt_exec_callback_QWidget_SizeHint(self *C.QWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MinimumSizeHint +func miqt_exec_callback_QWidget_MinimumSizeHint(self *C.QWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_HeightForWidth +func miqt_exec_callback_QWidget_HeightForWidth(self *C.QWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_HasHeightForWidth +func miqt_exec_callback_QWidget_HasHeightForWidth(self *C.QWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_PaintEngine +func miqt_exec_callback_QWidget_PaintEngine(self *C.QWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_Event +func miqt_exec_callback_QWidget_Event(self *C.QWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MousePressEvent +func miqt_exec_callback_QWidget_MousePressEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MouseReleaseEvent +func miqt_exec_callback_QWidget_MouseReleaseEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MouseDoubleClickEvent +func miqt_exec_callback_QWidget_MouseDoubleClickEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MouseMoveEvent +func miqt_exec_callback_QWidget_MouseMoveEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_WheelEvent +func miqt_exec_callback_QWidget_WheelEvent(self *C.QWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_KeyPressEvent +func miqt_exec_callback_QWidget_KeyPressEvent(self *C.QWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_KeyReleaseEvent +func miqt_exec_callback_QWidget_KeyReleaseEvent(self *C.QWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_FocusInEvent +func miqt_exec_callback_QWidget_FocusInEvent(self *C.QWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_FocusOutEvent +func miqt_exec_callback_QWidget_FocusOutEvent(self *C.QWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_EnterEvent(event *QEvent) { + + C.QWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_EnterEvent +func miqt_exec_callback_QWidget_EnterEvent(self *C.QWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_LeaveEvent +func miqt_exec_callback_QWidget_LeaveEvent(self *C.QWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_PaintEvent +func miqt_exec_callback_QWidget_PaintEvent(self *C.QWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MoveEvent +func miqt_exec_callback_QWidget_MoveEvent(self *C.QWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ResizeEvent +func miqt_exec_callback_QWidget_ResizeEvent(self *C.QWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_CloseEvent +func miqt_exec_callback_QWidget_CloseEvent(self *C.QWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ContextMenuEvent +func miqt_exec_callback_QWidget_ContextMenuEvent(self *C.QWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_TabletEvent +func miqt_exec_callback_QWidget_TabletEvent(self *C.QWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ActionEvent +func miqt_exec_callback_QWidget_ActionEvent(self *C.QWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DragEnterEvent +func miqt_exec_callback_QWidget_DragEnterEvent(self *C.QWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DragMoveEvent +func miqt_exec_callback_QWidget_DragMoveEvent(self *C.QWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DragLeaveEvent +func miqt_exec_callback_QWidget_DragLeaveEvent(self *C.QWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DropEvent +func miqt_exec_callback_QWidget_DropEvent(self *C.QWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ShowEvent +func miqt_exec_callback_QWidget_ShowEvent(self *C.QWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_HideEvent +func miqt_exec_callback_QWidget_HideEvent(self *C.QWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_NativeEvent +func miqt_exec_callback_QWidget_NativeEvent(self *C.QWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ChangeEvent +func miqt_exec_callback_QWidget_ChangeEvent(self *C.QWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_Metric +func miqt_exec_callback_QWidget_Metric(self *C.QWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_InitPainter +func miqt_exec_callback_QWidget_InitPainter(self *C.QWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_Redirected +func miqt_exec_callback_QWidget_Redirected(self *C.QWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_SharedPainter +func miqt_exec_callback_QWidget_SharedPainter(self *C.QWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_InputMethodEvent +func miqt_exec_callback_QWidget_InputMethodEvent(self *C.QWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_InputMethodQuery +func miqt_exec_callback_QWidget_InputMethodQuery(self *C.QWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_FocusNextPrevChild +func miqt_exec_callback_QWidget_FocusNextPrevChild(self *C.QWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QWidget_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QWidget) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QWidget_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_EventFilter +func miqt_exec_callback_QWidget_EventFilter(self *C.QWidget, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_TimerEvent +func miqt_exec_callback_QWidget_TimerEvent(self *C.QWidget, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QWidget_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QWidget_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ChildEvent +func miqt_exec_callback_QWidget_ChildEvent(self *C.QWidget, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_CustomEvent(event *QEvent) { + + C.QWidget_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWidget_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_CustomEvent +func miqt_exec_callback_QWidget_CustomEvent(self *C.QWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWidget{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QWidget_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWidget) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWidget_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ConnectNotify +func miqt_exec_callback_QWidget_ConnectNotify(self *C.QWidget, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWidget{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWidget) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QWidget_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWidget) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWidget_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DisconnectNotify +func miqt_exec_callback_QWidget_DisconnectNotify(self *C.QWidget, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWidget{h: self}).callVirtualBase_DisconnectNotify, slotval1) + } // Delete this object from C++ memory. func (this *QWidget) Delete() { - C.QWidget_Delete(this.h) + C.QWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qwidget.h b/qt/gen_qwidget.h index 27af310d..de4c4fdd 100644 --- a/qt/gen_qwidget.h +++ b/qt/gen_qwidget.h @@ -16,79 +16,125 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; class QBackingStore; class QBitmap; class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; class QCursor; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFont; class QFontInfo; class QFontMetrics; class QGraphicsEffect; class QGraphicsProxyWidget; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QKeySequence; class QLayout; class QLocale; class QMargins; +class QMetaMethod; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; class QPaintDevice; class QPaintEngine; +class QPaintEvent; class QPainter; class QPalette; class QPixmap; class QPoint; class QRect; class QRegion; +class QResizeEvent; class QScreen; +class QShowEvent; class QSize; class QSizePolicy; class QStyle; +class QTabletEvent; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; class QWidgetData; class QWindow; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; typedef struct QBackingStore QBackingStore; typedef struct QBitmap QBitmap; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QCursor QCursor; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QFontInfo QFontInfo; typedef struct QFontMetrics QFontMetrics; typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsProxyWidget QGraphicsProxyWidget; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QKeySequence QKeySequence; typedef struct QLayout QLayout; typedef struct QLocale QLocale; typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QResizeEvent QResizeEvent; typedef struct QScreen QScreen; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QSizePolicy QSizePolicy; typedef struct QStyle QStyle; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QWidgetData QWidgetData; typedef struct QWindow QWindow; #endif -QWidgetData* QWidgetData_new(QWidgetData* param1); +void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData); void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1); -void QWidgetData_Delete(QWidgetData* self); +void QWidgetData_Delete(QWidgetData* self, bool isSubclass); -QWidget* QWidget_new(QWidget* parent); -QWidget* QWidget_new2(); -QWidget* QWidget_new3(QWidget* parent, int f); +void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWidget_MetaObject(const QWidget* self); void* QWidget_Metacast(QWidget* self, const char* param1); struct miqt_string QWidget_Tr(const char* s); @@ -345,9 +391,42 @@ void QWidget_WindowIconTextChanged(QWidget* self, struct miqt_string iconText); void QWidget_connect_WindowIconTextChanged(QWidget* self, intptr_t slot); void QWidget_CustomContextMenuRequested(QWidget* self, QPoint* pos); void QWidget_connect_CustomContextMenuRequested(QWidget* self, intptr_t slot); +bool QWidget_Event(QWidget* self, QEvent* event); +void QWidget_MousePressEvent(QWidget* self, QMouseEvent* event); +void QWidget_MouseReleaseEvent(QWidget* self, QMouseEvent* event); +void QWidget_MouseDoubleClickEvent(QWidget* self, QMouseEvent* event); +void QWidget_MouseMoveEvent(QWidget* self, QMouseEvent* event); +void QWidget_WheelEvent(QWidget* self, QWheelEvent* event); +void QWidget_KeyPressEvent(QWidget* self, QKeyEvent* event); +void QWidget_KeyReleaseEvent(QWidget* self, QKeyEvent* event); +void QWidget_FocusInEvent(QWidget* self, QFocusEvent* event); +void QWidget_FocusOutEvent(QWidget* self, QFocusEvent* event); +void QWidget_EnterEvent(QWidget* self, QEvent* event); +void QWidget_LeaveEvent(QWidget* self, QEvent* event); +void QWidget_PaintEvent(QWidget* self, QPaintEvent* event); +void QWidget_MoveEvent(QWidget* self, QMoveEvent* event); +void QWidget_ResizeEvent(QWidget* self, QResizeEvent* event); +void QWidget_CloseEvent(QWidget* self, QCloseEvent* event); +void QWidget_ContextMenuEvent(QWidget* self, QContextMenuEvent* event); +void QWidget_TabletEvent(QWidget* self, QTabletEvent* event); +void QWidget_ActionEvent(QWidget* self, QActionEvent* event); +void QWidget_DragEnterEvent(QWidget* self, QDragEnterEvent* event); +void QWidget_DragMoveEvent(QWidget* self, QDragMoveEvent* event); +void QWidget_DragLeaveEvent(QWidget* self, QDragLeaveEvent* event); +void QWidget_DropEvent(QWidget* self, QDropEvent* event); +void QWidget_ShowEvent(QWidget* self, QShowEvent* event); +void QWidget_HideEvent(QWidget* self, QHideEvent* event); +bool QWidget_NativeEvent(QWidget* self, struct miqt_string eventType, void* message, long* result); +void QWidget_ChangeEvent(QWidget* self, QEvent* param1); +int QWidget_Metric(const QWidget* self, int param1); +void QWidget_InitPainter(const QWidget* self, QPainter* painter); +QPaintDevice* QWidget_Redirected(const QWidget* self, QPoint* offset); +QPainter* QWidget_SharedPainter(const QWidget* self); +void QWidget_InputMethodEvent(QWidget* self, QInputMethodEvent* param1); QVariant* QWidget_InputMethodQuery(const QWidget* self, int param1); int QWidget_InputMethodHints(const QWidget* self); void QWidget_SetInputMethodHints(QWidget* self, int hints); +bool QWidget_FocusNextPrevChild(QWidget* self, bool next); struct miqt_string QWidget_Tr2(const char* s, const char* c); struct miqt_string QWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QWidget_TrUtf82(const char* s, const char* c); @@ -367,7 +446,101 @@ void QWidget_SetWindowFlag2(QWidget* self, int param1, bool on); void QWidget_SetAttribute2(QWidget* self, int param1, bool on); QWidget* QWidget_CreateWindowContainer2(QWindow* window, QWidget* parent); QWidget* QWidget_CreateWindowContainer3(QWindow* window, QWidget* parent, int flags); -void QWidget_Delete(QWidget* self); +void QWidget_override_virtual_DevType(void* self, intptr_t slot); +int QWidget_virtualbase_DevType(const void* self); +void QWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QWidget_virtualbase_SetVisible(void* self, bool visible); +void QWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWidget_virtualbase_SizeHint(const void* self); +void QWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWidget_virtualbase_MinimumSizeHint(const void* self); +void QWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWidget_virtualbase_HasHeightForWidth(const void* self); +void QWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWidget_virtualbase_PaintEngine(const void* self); +void QWidget_override_virtual_Event(void* self, intptr_t slot); +bool QWidget_virtualbase_Event(void* self, QEvent* event); +void QWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWidget_override_virtual_Metric(void* self, intptr_t slot); +int QWidget_virtualbase_Metric(const void* self, int param1); +void QWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWidget_virtualbase_SharedPainter(const void* self); +void QWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWidget_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWidget_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWidget_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWidget_virtualbase_CustomEvent(void* self, QEvent* event); +void QWidget_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWidget_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWidget_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWidget_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWidget_Delete(QWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qwidgetaction.cpp b/qt/gen_qwidgetaction.cpp index dac90601..e9516537 100644 --- a/qt/gen_qwidgetaction.cpp +++ b/qt/gen_qwidgetaction.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -9,8 +11,114 @@ #include "gen_qwidgetaction.h" #include "_cgo_export.h" -QWidgetAction* QWidgetAction_new(QObject* parent) { - return new QWidgetAction(parent); +class MiqtVirtualQWidgetAction : public virtual QWidgetAction { +public: + + MiqtVirtualQWidgetAction(QObject* parent): QWidgetAction(parent) {}; + + virtual ~MiqtVirtualQWidgetAction() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWidgetAction::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWidgetAction_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWidgetAction::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QWidgetAction::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QWidgetAction_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QWidgetAction::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWidget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createWidget(QWidget* parent) override { + if (handle__CreateWidget == 0) { + return QWidgetAction::createWidget(parent); + } + + QWidget* sigval1 = parent; + + QWidget* callback_return_value = miqt_exec_callback_QWidgetAction_CreateWidget(this, handle__CreateWidget, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateWidget(QWidget* parent) { + + return QWidgetAction::createWidget(parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DeleteWidget = 0; + + // Subclass to allow providing a Go implementation + virtual void deleteWidget(QWidget* widget) override { + if (handle__DeleteWidget == 0) { + QWidgetAction::deleteWidget(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QWidgetAction_DeleteWidget(this, handle__DeleteWidget, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DeleteWidget(QWidget* widget) { + + QWidgetAction::deleteWidget(widget); + + } + +}; + +void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject) { + MiqtVirtualQWidgetAction* ret = new MiqtVirtualQWidgetAction(parent); + *outptr_QWidgetAction = ret; + *outptr_QAction = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self) { @@ -103,7 +211,43 @@ struct miqt_string QWidgetAction_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QWidgetAction_Delete(QWidgetAction* self) { - delete self; +void QWidgetAction_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__Event = slot; +} + +bool QWidgetAction_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_Event(param1); +} + +void QWidgetAction_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__EventFilter = slot; +} + +bool QWidgetAction_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QWidgetAction_override_virtual_CreateWidget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__CreateWidget = slot; +} + +QWidget* QWidgetAction_virtualbase_CreateWidget(void* self, QWidget* parent) { + return ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_CreateWidget(parent); +} + +void QWidgetAction_override_virtual_DeleteWidget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__DeleteWidget = slot; +} + +void QWidgetAction_virtualbase_DeleteWidget(void* self, QWidget* widget) { + ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_DeleteWidget(widget); +} + +void QWidgetAction_Delete(QWidgetAction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qwidgetaction.go b/qt/gen_qwidgetaction.go index 62b4ff10..c8945ce4 100644 --- a/qt/gen_qwidgetaction.go +++ b/qt/gen_qwidgetaction.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QWidgetAction struct { - h *C.QWidgetAction + h *C.QWidgetAction + isSubclass bool *QAction } @@ -32,21 +34,35 @@ func (this *QWidgetAction) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidgetAction(h *C.QWidgetAction) *QWidgetAction { +// newQWidgetAction constructs the type using only CGO pointers. +func newQWidgetAction(h *C.QWidgetAction, h_QAction *C.QAction, h_QObject *C.QObject) *QWidgetAction { if h == nil { return nil } - return &QWidgetAction{h: h, QAction: UnsafeNewQAction(unsafe.Pointer(h))} + return &QWidgetAction{h: h, + QAction: newQAction(h_QAction, h_QObject)} } -func UnsafeNewQWidgetAction(h unsafe.Pointer) *QWidgetAction { - return newQWidgetAction((*C.QWidgetAction)(h)) +// UnsafeNewQWidgetAction constructs the type using only unsafe pointers. +func UnsafeNewQWidgetAction(h unsafe.Pointer, h_QAction unsafe.Pointer, h_QObject unsafe.Pointer) *QWidgetAction { + if h == nil { + return nil + } + + return &QWidgetAction{h: (*C.QWidgetAction)(h), + QAction: UnsafeNewQAction(h_QAction, h_QObject)} } // NewQWidgetAction constructs a new QWidgetAction object. func NewQWidgetAction(parent *QObject) *QWidgetAction { - ret := C.QWidgetAction_new(parent.cPointer()) - return newQWidgetAction(ret) + var outptr_QWidgetAction *C.QWidgetAction = nil + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QWidgetAction_new(parent.cPointer(), &outptr_QWidgetAction, &outptr_QAction, &outptr_QObject) + ret := newQWidgetAction(outptr_QWidgetAction, outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QWidgetAction) MetaObject() *QMetaObject { @@ -82,11 +98,11 @@ func (this *QWidgetAction) SetDefaultWidget(w *QWidget) { } func (this *QWidgetAction) DefaultWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_DefaultWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_DefaultWidget(this.h)), nil, nil) } func (this *QWidgetAction) RequestWidget(parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_RequestWidget(this.h, parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_RequestWidget(this.h, parent.cPointer())), nil, nil) } func (this *QWidgetAction) ReleaseWidget(widget *QWidget) { @@ -137,9 +153,107 @@ func QWidgetAction_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QWidgetAction) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QWidgetAction_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QWidgetAction) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QWidgetAction_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_Event +func miqt_exec_callback_QWidgetAction_Event(self *C.QWidgetAction, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetAction) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QWidgetAction_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QWidgetAction) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QWidgetAction_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_EventFilter +func miqt_exec_callback_QWidgetAction_EventFilter(self *C.QWidgetAction, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetAction) callVirtualBase_CreateWidget(parent *QWidget) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_virtualbase_CreateWidget(unsafe.Pointer(this.h), parent.cPointer())), nil, nil) +} +func (this *QWidgetAction) OnCreateWidget(slot func(super func(parent *QWidget) *QWidget, parent *QWidget) *QWidget) { + C.QWidgetAction_override_virtual_CreateWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_CreateWidget +func miqt_exec_callback_QWidgetAction_CreateWidget(self *C.QWidgetAction, cb C.intptr_t, parent *C.QWidget) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QWidget) *QWidget, parent *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + + virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_CreateWidget, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetAction) callVirtualBase_DeleteWidget(widget *QWidget) { + + C.QWidgetAction_virtualbase_DeleteWidget(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QWidgetAction) OnDeleteWidget(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QWidgetAction_override_virtual_DeleteWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_DeleteWidget +func miqt_exec_callback_QWidgetAction_DeleteWidget(self *C.QWidgetAction, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QWidgetAction{h: self}).callVirtualBase_DeleteWidget, slotval1) + +} + // Delete this object from C++ memory. func (this *QWidgetAction) Delete() { - C.QWidgetAction_Delete(this.h) + C.QWidgetAction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qwidgetaction.h b/qt/gen_qwidgetaction.h index e54602e2..ab4401a5 100644 --- a/qt/gen_qwidgetaction.h +++ b/qt/gen_qwidgetaction.h @@ -15,18 +15,22 @@ extern "C" { #endif #ifdef __cplusplus +class QAction; +class QEvent; class QMetaObject; class QObject; class QWidget; class QWidgetAction; #else +typedef struct QAction QAction; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QWidget QWidget; typedef struct QWidgetAction QWidgetAction; #endif -QWidgetAction* QWidgetAction_new(QObject* parent); +void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject); QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self); void* QWidgetAction_Metacast(QWidgetAction* self, const char* param1); struct miqt_string QWidgetAction_Tr(const char* s); @@ -35,11 +39,23 @@ void QWidgetAction_SetDefaultWidget(QWidgetAction* self, QWidget* w); QWidget* QWidgetAction_DefaultWidget(const QWidgetAction* self); QWidget* QWidgetAction_RequestWidget(QWidgetAction* self, QWidget* parent); void QWidgetAction_ReleaseWidget(QWidgetAction* self, QWidget* widget); +bool QWidgetAction_Event(QWidgetAction* self, QEvent* param1); +bool QWidgetAction_EventFilter(QWidgetAction* self, QObject* param1, QEvent* param2); +QWidget* QWidgetAction_CreateWidget(QWidgetAction* self, QWidget* parent); +void QWidgetAction_DeleteWidget(QWidgetAction* self, QWidget* widget); struct miqt_string QWidgetAction_Tr2(const char* s, const char* c); struct miqt_string QWidgetAction_Tr3(const char* s, const char* c, int n); struct miqt_string QWidgetAction_TrUtf82(const char* s, const char* c); struct miqt_string QWidgetAction_TrUtf83(const char* s, const char* c, int n); -void QWidgetAction_Delete(QWidgetAction* self); +void QWidgetAction_override_virtual_Event(void* self, intptr_t slot); +bool QWidgetAction_virtualbase_Event(void* self, QEvent* param1); +void QWidgetAction_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWidgetAction_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QWidgetAction_override_virtual_CreateWidget(void* self, intptr_t slot); +QWidget* QWidgetAction_virtualbase_CreateWidget(void* self, QWidget* parent); +void QWidgetAction_override_virtual_DeleteWidget(void* self, intptr_t slot); +void QWidgetAction_virtualbase_DeleteWidget(void* self, QWidget* widget); +void QWidgetAction_Delete(QWidgetAction* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qwindow.cpp b/qt/gen_qwindow.cpp index d2077dd3..4bbd76e2 100644 --- a/qt/gen_qwindow.cpp +++ b/qt/gen_qwindow.cpp @@ -1,33 +1,767 @@ #include +#include +#include #include +#include +#include +#include +#include #include +#include #include +#include #include +#include +#include #include #include #include #include +#include #include +#include #include #include #include #include +#include #include +#include +#include +#include +#include #include #include #include "gen_qwindow.h" #include "_cgo_export.h" -QWindow* QWindow_new() { - return new QWindow(); +class MiqtVirtualQWindow : public virtual QWindow { +public: + + MiqtVirtualQWindow(): QWindow() {}; + MiqtVirtualQWindow(QWindow* parent): QWindow(parent) {}; + MiqtVirtualQWindow(QScreen* screen): QWindow(screen) {}; + + virtual ~MiqtVirtualQWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SurfaceType = 0; + + // Subclass to allow providing a Go implementation + virtual QSurface::SurfaceType surfaceType() const override { + if (handle__SurfaceType == 0) { + return QWindow::surfaceType(); + } + + + int callback_return_value = miqt_exec_callback_QWindow_SurfaceType(const_cast(this), handle__SurfaceType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SurfaceType() const { + + QSurface::SurfaceType _ret = QWindow::surfaceType(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Format = 0; + + // Subclass to allow providing a Go implementation + virtual QSurfaceFormat format() const override { + if (handle__Format == 0) { + return QWindow::format(); + } + + + QSurfaceFormat* callback_return_value = miqt_exec_callback_QWindow_Format(const_cast(this), handle__Format); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSurfaceFormat* virtualbase_Format() const { + + return new QSurfaceFormat(QWindow::format()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual QSize size() const override { + if (handle__Size == 0) { + return QWindow::size(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWindow_Size(const_cast(this), handle__Size); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Size() const { + + return new QSize(QWindow::size()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleRoot = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleRoot() const override { + if (handle__AccessibleRoot == 0) { + return QWindow::accessibleRoot(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QWindow_AccessibleRoot(const_cast(this), handle__AccessibleRoot); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleRoot() const { + + return QWindow::accessibleRoot(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusObject = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* focusObject() const override { + if (handle__FocusObject == 0) { + return QWindow::focusObject(); + } + + + QObject* callback_return_value = miqt_exec_callback_QWindow_FocusObject(const_cast(this), handle__FocusObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QObject* virtualbase_FocusObject() const { + + return QWindow::focusObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExposeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void exposeEvent(QExposeEvent* param1) override { + if (handle__ExposeEvent == 0) { + QWindow::exposeEvent(param1); + return; + } + + QExposeEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_ExposeEvent(this, handle__ExposeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ExposeEvent(QExposeEvent* param1) { + + QWindow::exposeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QWindow::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QWindow::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* param1) override { + if (handle__MoveEvent == 0) { + QWindow::moveEvent(param1); + return; + } + + QMoveEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* param1) { + + QWindow::moveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QWindow::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QWindow::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QWindow::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QWindow::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QWindow::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QWindow::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QWindow::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QWindow::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWindow::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWindow::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QWindow::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QWindow::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QWindow::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QWindow::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QWindow::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QWindow::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QWindow::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QWindow::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QWindow::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QWindow::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QWindow::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QWindow::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QWindow::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QWindow::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TouchEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void touchEvent(QTouchEvent* param1) override { + if (handle__TouchEvent == 0) { + QWindow::touchEvent(param1); + return; + } + + QTouchEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_TouchEvent(this, handle__TouchEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TouchEvent(QTouchEvent* param1) { + + QWindow::touchEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* param1) override { + if (handle__TabletEvent == 0) { + QWindow::tabletEvent(param1); + return; + } + + QTabletEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* param1) { + + QWindow::tabletEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QWindow::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWindow::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWindow::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWindow_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWindow::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWindow::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWindow_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWindow::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWindow::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWindow_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWindow::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWindow::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWindow_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWindow::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWindow::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWindow_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWindow::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWindow::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWindow_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWindow::disconnectNotify(*signal); + + } + +}; + +void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(); + *outptr_QWindow = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QWindow* QWindow_new2(QWindow* parent) { - return new QWindow(parent); +void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(parent); + *outptr_QWindow = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QWindow* QWindow_new3(QScreen* screen) { - return new QWindow(screen); +void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(screen); + *outptr_QWindow = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } QMetaObject* QWindow_MetaObject(const QWindow* self) { @@ -524,7 +1258,7 @@ void QWindow_ScreenChanged(QWindow* self, QScreen* screen) { } void QWindow_connect_ScreenChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::screenChanged), self, [=](QScreen* screen) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::screenChanged), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QWindow_ScreenChanged(slot, sigval1); }); @@ -535,7 +1269,7 @@ void QWindow_ModalityChanged(QWindow* self, int modality) { } void QWindow_connect_ModalityChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::modalityChanged), self, [=](Qt::WindowModality modality) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::modalityChanged), self, [=](Qt::WindowModality modality) { Qt::WindowModality modality_ret = modality; int sigval1 = static_cast(modality_ret); miqt_exec_callback_QWindow_ModalityChanged(slot, sigval1); @@ -547,7 +1281,7 @@ void QWindow_WindowStateChanged(QWindow* self, int windowState) { } void QWindow_connect_WindowStateChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::windowStateChanged), self, [=](Qt::WindowState windowState) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::windowStateChanged), self, [=](Qt::WindowState windowState) { Qt::WindowState windowState_ret = windowState; int sigval1 = static_cast(windowState_ret); miqt_exec_callback_QWindow_WindowStateChanged(slot, sigval1); @@ -560,7 +1294,7 @@ void QWindow_WindowTitleChanged(QWindow* self, struct miqt_string title) { } void QWindow_connect_WindowTitleChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::windowTitleChanged), self, [=](const QString& title) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::windowTitleChanged), self, [=](const QString& title) { const QString title_ret = title; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray title_b = title_ret.toUtf8(); @@ -578,7 +1312,7 @@ void QWindow_XChanged(QWindow* self, int arg) { } void QWindow_connect_XChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::xChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::xChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_XChanged(slot, sigval1); }); @@ -589,7 +1323,7 @@ void QWindow_YChanged(QWindow* self, int arg) { } void QWindow_connect_YChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::yChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::yChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_YChanged(slot, sigval1); }); @@ -600,7 +1334,7 @@ void QWindow_WidthChanged(QWindow* self, int arg) { } void QWindow_connect_WidthChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::widthChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::widthChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_WidthChanged(slot, sigval1); }); @@ -611,7 +1345,7 @@ void QWindow_HeightChanged(QWindow* self, int arg) { } void QWindow_connect_HeightChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::heightChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::heightChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_HeightChanged(slot, sigval1); }); @@ -622,7 +1356,7 @@ void QWindow_MinimumWidthChanged(QWindow* self, int arg) { } void QWindow_connect_MinimumWidthChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::minimumWidthChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::minimumWidthChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MinimumWidthChanged(slot, sigval1); }); @@ -633,7 +1367,7 @@ void QWindow_MinimumHeightChanged(QWindow* self, int arg) { } void QWindow_connect_MinimumHeightChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::minimumHeightChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::minimumHeightChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MinimumHeightChanged(slot, sigval1); }); @@ -644,7 +1378,7 @@ void QWindow_MaximumWidthChanged(QWindow* self, int arg) { } void QWindow_connect_MaximumWidthChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::maximumWidthChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::maximumWidthChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MaximumWidthChanged(slot, sigval1); }); @@ -655,7 +1389,7 @@ void QWindow_MaximumHeightChanged(QWindow* self, int arg) { } void QWindow_connect_MaximumHeightChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::maximumHeightChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::maximumHeightChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MaximumHeightChanged(slot, sigval1); }); @@ -666,7 +1400,7 @@ void QWindow_VisibleChanged(QWindow* self, bool arg) { } void QWindow_connect_VisibleChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::visibleChanged), self, [=](bool arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::visibleChanged), self, [=](bool arg) { bool sigval1 = arg; miqt_exec_callback_QWindow_VisibleChanged(slot, sigval1); }); @@ -677,7 +1411,7 @@ void QWindow_VisibilityChanged(QWindow* self, int visibility) { } void QWindow_connect_VisibilityChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::visibilityChanged), self, [=](QWindow::Visibility visibility) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::visibilityChanged), self, [=](QWindow::Visibility visibility) { QWindow::Visibility visibility_ret = visibility; int sigval1 = static_cast(visibility_ret); miqt_exec_callback_QWindow_VisibilityChanged(slot, sigval1); @@ -689,7 +1423,7 @@ void QWindow_ActiveChanged(QWindow* self) { } void QWindow_connect_ActiveChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::activeChanged), self, [=]() { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::activeChanged), self, [=]() { miqt_exec_callback_QWindow_ActiveChanged(slot); }); } @@ -699,7 +1433,7 @@ void QWindow_ContentOrientationChanged(QWindow* self, int orientation) { } void QWindow_connect_ContentOrientationChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::contentOrientationChanged), self, [=](Qt::ScreenOrientation orientation) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::contentOrientationChanged), self, [=](Qt::ScreenOrientation orientation) { Qt::ScreenOrientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); miqt_exec_callback_QWindow_ContentOrientationChanged(slot, sigval1); @@ -711,7 +1445,7 @@ void QWindow_FocusObjectChanged(QWindow* self, QObject* object) { } void QWindow_connect_FocusObjectChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::focusObjectChanged), self, [=](QObject* object) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::focusObjectChanged), self, [=](QObject* object) { QObject* sigval1 = object; miqt_exec_callback_QWindow_FocusObjectChanged(slot, sigval1); }); @@ -722,7 +1456,7 @@ void QWindow_OpacityChanged(QWindow* self, double opacity) { } void QWindow_connect_OpacityChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::opacityChanged), self, [=](qreal opacity) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::opacityChanged), self, [=](qreal opacity) { qreal opacity_ret = opacity; double sigval1 = static_cast(opacity_ret); miqt_exec_callback_QWindow_OpacityChanged(slot, sigval1); @@ -734,7 +1468,7 @@ void QWindow_TransientParentChanged(QWindow* self, QWindow* transientParent) { } void QWindow_connect_TransientParentChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::transientParentChanged), self, [=](QWindow* transientParent) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::transientParentChanged), self, [=](QWindow* transientParent) { QWindow* sigval1 = transientParent; miqt_exec_callback_QWindow_TransientParentChanged(slot, sigval1); }); @@ -792,7 +1526,243 @@ bool QWindow_IsAncestorOf2(const QWindow* self, QWindow* child, int mode) { return self->isAncestorOf(child, static_cast(mode)); } -void QWindow_Delete(QWindow* self) { - delete self; +void QWindow_override_virtual_SurfaceType(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__SurfaceType = slot; +} + +int QWindow_virtualbase_SurfaceType(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_SurfaceType(); +} + +void QWindow_override_virtual_Format(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__Format = slot; +} + +QSurfaceFormat* QWindow_virtualbase_Format(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_Format(); +} + +void QWindow_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__Size = slot; +} + +QSize* QWindow_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_Size(); +} + +void QWindow_override_virtual_AccessibleRoot(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__AccessibleRoot = slot; +} + +QAccessibleInterface* QWindow_virtualbase_AccessibleRoot(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_AccessibleRoot(); +} + +void QWindow_override_virtual_FocusObject(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__FocusObject = slot; +} + +QObject* QWindow_virtualbase_FocusObject(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_FocusObject(); +} + +void QWindow_override_virtual_ExposeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ExposeEvent = slot; +} + +void QWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ExposeEvent(param1); +} + +void QWindow_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ResizeEvent = slot; +} + +void QWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QWindow_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MoveEvent = slot; +} + +void QWindow_virtualbase_MoveEvent(void* self, QMoveEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MoveEvent(param1); +} + +void QWindow_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__FocusInEvent = slot; +} + +void QWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__FocusOutEvent = slot; +} + +void QWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QWindow_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ShowEvent = slot; +} + +void QWindow_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ShowEvent(param1); +} + +void QWindow_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__HideEvent = slot; +} + +void QWindow_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_HideEvent(param1); +} + +void QWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__Event = slot; +} + +bool QWindow_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWindow*)(self) )->virtualbase_Event(param1); +} + +void QWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__KeyPressEvent = slot; +} + +void QWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QWindow_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MousePressEvent = slot; +} + +void QWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QWindow_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__WheelEvent = slot; +} + +void QWindow_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_WheelEvent(param1); +} + +void QWindow_override_virtual_TouchEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__TouchEvent = slot; +} + +void QWindow_virtualbase_TouchEvent(void* self, QTouchEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_TouchEvent(param1); +} + +void QWindow_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__TabletEvent = slot; +} + +void QWindow_virtualbase_TabletEvent(void* self, QTabletEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_TabletEvent(param1); +} + +void QWindow_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__NativeEvent = slot; +} + +bool QWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQWindow*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWindow_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__EventFilter = slot; +} + +bool QWindow_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWindow*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWindow_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__TimerEvent = slot; +} + +void QWindow_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_TimerEvent(event); +} + +void QWindow_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ChildEvent = slot; +} + +void QWindow_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ChildEvent(event); +} + +void QWindow_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__CustomEvent = slot; +} + +void QWindow_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_CustomEvent(event); +} + +void QWindow_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ConnectNotify = slot; +} + +void QWindow_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWindow_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__DisconnectNotify = slot; +} + +void QWindow_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWindow_Delete(QWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qwindow.go b/qt/gen_qwindow.go index 5ac2657b..365b0276 100644 --- a/qt/gen_qwindow.go +++ b/qt/gen_qwindow.go @@ -33,7 +33,8 @@ const ( ) type QWindow struct { - h *C.QWindow + h *C.QWindow + isSubclass bool *QObject *QSurface } @@ -52,33 +53,61 @@ func (this *QWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWindow(h *C.QWindow) *QWindow { +// newQWindow constructs the type using only CGO pointers. +func newQWindow(h *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface) *QWindow { if h == nil { return nil } - return &QWindow{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QSurface: UnsafeNewQSurface(unsafe.Pointer(h))} + return &QWindow{h: h, + QObject: newQObject(h_QObject), + QSurface: newQSurface(h_QSurface)} } -func UnsafeNewQWindow(h unsafe.Pointer) *QWindow { - return newQWindow((*C.QWindow)(h)) +// UnsafeNewQWindow constructs the type using only unsafe pointers. +func UnsafeNewQWindow(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QWindow { + if h == nil { + return nil + } + + return &QWindow{h: (*C.QWindow)(h), + QObject: UnsafeNewQObject(h_QObject), + QSurface: UnsafeNewQSurface(h_QSurface)} } // NewQWindow constructs a new QWindow object. func NewQWindow() *QWindow { - ret := C.QWindow_new() - return newQWindow(ret) + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QWindow_new(&outptr_QWindow, &outptr_QObject, &outptr_QSurface) + ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQWindow2 constructs a new QWindow object. func NewQWindow2(parent *QWindow) *QWindow { - ret := C.QWindow_new2(parent.cPointer()) - return newQWindow(ret) + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QWindow_new2(parent.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) + ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQWindow3 constructs a new QWindow object. func NewQWindow3(screen *QScreen) *QWindow { - ret := C.QWindow_new3(screen.cPointer()) - return newQWindow(ret) + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QWindow_new3(screen.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) + ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } func (this *QWindow) MetaObject() *QMetaObject { @@ -138,11 +167,11 @@ func (this *QWindow) WinId() uintptr { } func (this *QWindow) Parent(mode QWindow__AncestorMode) *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent(this.h, (C.int)(mode)))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent(this.h, (C.int)(mode))), nil, nil) } func (this *QWindow) Parent2() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent2(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent2(this.h)), nil, nil) } func (this *QWindow) SetParent(parent *QWindow) { @@ -262,7 +291,7 @@ func (this *QWindow) SetTransientParent(parent *QWindow) { } func (this *QWindow) TransientParent() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_TransientParent(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_TransientParent(this.h)), nil, nil) } func (this *QWindow) IsAncestorOf(child *QWindow) bool { @@ -450,7 +479,7 @@ func (this *QWindow) SetMouseGrabEnabled(grab bool) bool { } func (this *QWindow) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QWindow_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QWindow_Screen(this.h)), nil) } func (this *QWindow) SetScreen(screen *QScreen) { @@ -495,7 +524,7 @@ func (this *QWindow) UnsetCursor() { } func QWindow_FromWinId(id uintptr) *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_FromWinId((C.uintptr_t)(id)))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_FromWinId((C.uintptr_t)(id))), nil, nil) } func (this *QWindow) RequestActivate() { @@ -621,7 +650,7 @@ func miqt_exec_callback_QWindow_ScreenChanged(cb C.intptr_t, screen *C.QScreen) } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -985,7 +1014,7 @@ func miqt_exec_callback_QWindow_TransientParentChanged(cb C.intptr_t, transientP } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWindow(unsafe.Pointer(transientParent)) + slotval1 := UnsafeNewQWindow(unsafe.Pointer(transientParent), nil, nil) gofunc(slotval1) } @@ -1042,9 +1071,691 @@ func (this *QWindow) IsAncestorOf2(child *QWindow, mode QWindow__AncestorMode) b return (bool)(C.QWindow_IsAncestorOf2(this.h, child.cPointer(), (C.int)(mode))) } +func (this *QWindow) callVirtualBase_SurfaceType() QSurface__SurfaceType { + + return (QSurface__SurfaceType)(C.QWindow_virtualbase_SurfaceType(unsafe.Pointer(this.h))) + +} +func (this *QWindow) OnSurfaceType(slot func(super func() QSurface__SurfaceType) QSurface__SurfaceType) { + C.QWindow_override_virtual_SurfaceType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_SurfaceType +func miqt_exec_callback_QWindow_SurfaceType(self *C.QWindow, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSurface__SurfaceType) QSurface__SurfaceType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_SurfaceType) + + return (C.int)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_Format() *QSurfaceFormat { + + _ret := C.QWindow_virtualbase_Format(unsafe.Pointer(this.h)) + _goptr := newQSurfaceFormat(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWindow) OnFormat(slot func(super func() *QSurfaceFormat) *QSurfaceFormat) { + C.QWindow_override_virtual_Format(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_Format +func miqt_exec_callback_QWindow_Format(self *C.QWindow, cb C.intptr_t) *C.QSurfaceFormat { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSurfaceFormat) *QSurfaceFormat) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_Format) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_Size() *QSize { + + _ret := C.QWindow_virtualbase_Size(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWindow) OnSize(slot func(super func() *QSize) *QSize) { + C.QWindow_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_Size +func miqt_exec_callback_QWindow_Size(self *C.QWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_Size) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_AccessibleRoot() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QWindow_virtualbase_AccessibleRoot(unsafe.Pointer(this.h)))) +} +func (this *QWindow) OnAccessibleRoot(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QWindow_override_virtual_AccessibleRoot(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_AccessibleRoot +func miqt_exec_callback_QWindow_AccessibleRoot(self *C.QWindow, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_AccessibleRoot) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_FocusObject() *QObject { + + return UnsafeNewQObject(unsafe.Pointer(C.QWindow_virtualbase_FocusObject(unsafe.Pointer(this.h)))) +} +func (this *QWindow) OnFocusObject(slot func(super func() *QObject) *QObject) { + C.QWindow_override_virtual_FocusObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_FocusObject +func miqt_exec_callback_QWindow_FocusObject(self *C.QWindow, cb C.intptr_t) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QObject) *QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_FocusObject) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_ExposeEvent(param1 *QExposeEvent) { + + C.QWindow_virtualbase_ExposeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnExposeEvent(slot func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) { + C.QWindow_override_virtual_ExposeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ExposeEvent +func miqt_exec_callback_QWindow_ExposeEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QExposeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQExposeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QWindow_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QWindow_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ResizeEvent +func miqt_exec_callback_QWindow_ResizeEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MoveEvent(param1 *QMoveEvent) { + + C.QWindow_virtualbase_MoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMoveEvent(slot func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) { + C.QWindow_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MoveEvent +func miqt_exec_callback_QWindow_MoveEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QWindow_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QWindow_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_FocusInEvent +func miqt_exec_callback_QWindow_FocusInEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QWindow_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QWindow_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_FocusOutEvent +func miqt_exec_callback_QWindow_FocusOutEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QWindow_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QWindow_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ShowEvent +func miqt_exec_callback_QWindow_ShowEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QWindow_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QWindow_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_HideEvent +func miqt_exec_callback_QWindow_HideEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QWindow_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QWindow) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_Event +func miqt_exec_callback_QWindow_Event(self *C.QWindow, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QWindow_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QWindow_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_KeyPressEvent +func miqt_exec_callback_QWindow_KeyPressEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_KeyReleaseEvent(param1 *QKeyEvent) { + + C.QWindow_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnKeyReleaseEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QWindow_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_KeyReleaseEvent +func miqt_exec_callback_QWindow_KeyReleaseEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MousePressEvent +func miqt_exec_callback_QWindow_MousePressEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MouseReleaseEvent +func miqt_exec_callback_QWindow_MouseReleaseEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MouseDoubleClickEvent +func miqt_exec_callback_QWindow_MouseDoubleClickEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MouseMoveEvent +func miqt_exec_callback_QWindow_MouseMoveEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QWindow_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QWindow_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_WheelEvent +func miqt_exec_callback_QWindow_WheelEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_TouchEvent(param1 *QTouchEvent) { + + C.QWindow_virtualbase_TouchEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnTouchEvent(slot func(super func(param1 *QTouchEvent), param1 *QTouchEvent)) { + C.QWindow_override_virtual_TouchEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_TouchEvent +func miqt_exec_callback_QWindow_TouchEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QTouchEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTouchEvent), param1 *QTouchEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTouchEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_TouchEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_TabletEvent(param1 *QTabletEvent) { + + C.QWindow_virtualbase_TabletEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnTabletEvent(slot func(super func(param1 *QTabletEvent), param1 *QTabletEvent)) { + C.QWindow_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_TabletEvent +func miqt_exec_callback_QWindow_TabletEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTabletEvent), param1 *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWindow_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QWindow) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QWindow_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_NativeEvent +func miqt_exec_callback_QWindow_NativeEvent(self *C.QWindow, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QWindow_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QWindow) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QWindow_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_EventFilter +func miqt_exec_callback_QWindow_EventFilter(self *C.QWindow, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QWindow_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWindow) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QWindow_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_TimerEvent +func miqt_exec_callback_QWindow_TimerEvent(self *C.QWindow, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QWindow_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWindow) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QWindow_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ChildEvent +func miqt_exec_callback_QWindow_ChildEvent(self *C.QWindow, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_CustomEvent(event *QEvent) { + + C.QWindow_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWindow) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWindow_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_CustomEvent +func miqt_exec_callback_QWindow_CustomEvent(self *C.QWindow, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWindow{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QWindow_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWindow) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWindow_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ConnectNotify +func miqt_exec_callback_QWindow_ConnectNotify(self *C.QWindow, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWindow{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWindow) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QWindow_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWindow) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWindow_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_DisconnectNotify +func miqt_exec_callback_QWindow_DisconnectNotify(self *C.QWindow, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWindow{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QWindow) Delete() { - C.QWindow_Delete(this.h) + C.QWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qwindow.h b/qt/gen_qwindow.h index 341bca59..e5e8d55c 100644 --- a/qt/gen_qwindow.h +++ b/qt/gen_qwindow.h @@ -16,37 +16,71 @@ extern "C" { #ifdef __cplusplus class QAccessibleInterface; +class QByteArray; +class QChildEvent; class QCursor; +class QEvent; +class QExposeEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QKeyEvent; class QMargins; +class QMetaMethod; class QMetaObject; +class QMouseEvent; +class QMoveEvent; class QObject; class QPoint; class QRect; class QRegion; +class QResizeEvent; class QScreen; +class QShowEvent; class QSize; +class QSurface; class QSurfaceFormat; +class QTabletEvent; +class QTimerEvent; +class QTouchEvent; +class QWheelEvent; class QWindow; #else typedef struct QAccessibleInterface QAccessibleInterface; +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QCursor QCursor; +typedef struct QEvent QEvent; +typedef struct QExposeEvent QExposeEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QKeyEvent QKeyEvent; typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; typedef struct QObject QObject; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QResizeEvent QResizeEvent; typedef struct QScreen QScreen; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QSurface QSurface; typedef struct QSurfaceFormat QSurfaceFormat; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QTouchEvent QTouchEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWindow QWindow; #endif -QWindow* QWindow_new(); -QWindow* QWindow_new2(QWindow* parent); -QWindow* QWindow_new3(QScreen* screen); +void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QWindow_MetaObject(const QWindow* self); void* QWindow_Metacast(QWindow* self, const char* param1); struct miqt_string QWindow_Tr(const char* s); @@ -197,13 +231,89 @@ void QWindow_OpacityChanged(QWindow* self, double opacity); void QWindow_connect_OpacityChanged(QWindow* self, intptr_t slot); void QWindow_TransientParentChanged(QWindow* self, QWindow* transientParent); void QWindow_connect_TransientParentChanged(QWindow* self, intptr_t slot); +void QWindow_ExposeEvent(QWindow* self, QExposeEvent* param1); +void QWindow_ResizeEvent(QWindow* self, QResizeEvent* param1); +void QWindow_MoveEvent(QWindow* self, QMoveEvent* param1); +void QWindow_FocusInEvent(QWindow* self, QFocusEvent* param1); +void QWindow_FocusOutEvent(QWindow* self, QFocusEvent* param1); +void QWindow_ShowEvent(QWindow* self, QShowEvent* param1); +void QWindow_HideEvent(QWindow* self, QHideEvent* param1); +bool QWindow_Event(QWindow* self, QEvent* param1); +void QWindow_KeyPressEvent(QWindow* self, QKeyEvent* param1); +void QWindow_KeyReleaseEvent(QWindow* self, QKeyEvent* param1); +void QWindow_MousePressEvent(QWindow* self, QMouseEvent* param1); +void QWindow_MouseReleaseEvent(QWindow* self, QMouseEvent* param1); +void QWindow_MouseDoubleClickEvent(QWindow* self, QMouseEvent* param1); +void QWindow_MouseMoveEvent(QWindow* self, QMouseEvent* param1); +void QWindow_WheelEvent(QWindow* self, QWheelEvent* param1); +void QWindow_TouchEvent(QWindow* self, QTouchEvent* param1); +void QWindow_TabletEvent(QWindow* self, QTabletEvent* param1); +bool QWindow_NativeEvent(QWindow* self, struct miqt_string eventType, void* message, long* result); struct miqt_string QWindow_Tr2(const char* s, const char* c); struct miqt_string QWindow_Tr3(const char* s, const char* c, int n); struct miqt_string QWindow_TrUtf82(const char* s, const char* c); struct miqt_string QWindow_TrUtf83(const char* s, const char* c, int n); void QWindow_SetFlag2(QWindow* self, int param1, bool on); bool QWindow_IsAncestorOf2(const QWindow* self, QWindow* child, int mode); -void QWindow_Delete(QWindow* self); +void QWindow_override_virtual_SurfaceType(void* self, intptr_t slot); +int QWindow_virtualbase_SurfaceType(const void* self); +void QWindow_override_virtual_Format(void* self, intptr_t slot); +QSurfaceFormat* QWindow_virtualbase_Format(const void* self); +void QWindow_override_virtual_Size(void* self, intptr_t slot); +QSize* QWindow_virtualbase_Size(const void* self); +void QWindow_override_virtual_AccessibleRoot(void* self, intptr_t slot); +QAccessibleInterface* QWindow_virtualbase_AccessibleRoot(const void* self); +void QWindow_override_virtual_FocusObject(void* self, intptr_t slot); +QObject* QWindow_virtualbase_FocusObject(const void* self); +void QWindow_override_virtual_ExposeEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1); +void QWindow_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QWindow_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MoveEvent(void* self, QMoveEvent* param1); +void QWindow_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QWindow_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QWindow_override_virtual_HideEvent(void* self, intptr_t slot); +void QWindow_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QWindow_override_virtual_Event(void* self, intptr_t slot); +bool QWindow_virtualbase_Event(void* self, QEvent* param1); +void QWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QWindow_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWindow_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QWindow_override_virtual_TouchEvent(void* self, intptr_t slot); +void QWindow_virtualbase_TouchEvent(void* self, QTouchEvent* param1); +void QWindow_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWindow_virtualbase_TabletEvent(void* self, QTabletEvent* param1); +void QWindow_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QWindow_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWindow_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWindow_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWindow_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWindow_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWindow_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWindow_virtualbase_CustomEvent(void* self, QEvent* event); +void QWindow_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWindow_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWindow_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWindow_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWindow_Delete(QWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qwizard.cpp b/qt/gen_qwizard.cpp index 415a3c59..7e62a924 100644 --- a/qt/gen_qwizard.cpp +++ b/qt/gen_qwizard.cpp @@ -1,12 +1,38 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include #include +#include #include +#include #include #include #include @@ -14,16 +40,508 @@ #include "gen_qwizard.h" #include "_cgo_export.h" -QWizard* QWizard_new(QWidget* parent) { - return new QWizard(parent); +class MiqtVirtualQWizard : public virtual QWizard { +public: + + MiqtVirtualQWizard(QWidget* parent): QWizard(parent) {}; + MiqtVirtualQWizard(): QWizard() {}; + MiqtVirtualQWizard(QWidget* parent, Qt::WindowFlags flags): QWizard(parent, flags) {}; + + virtual ~MiqtVirtualQWizard() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValidateCurrentPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool validateCurrentPage() override { + if (handle__ValidateCurrentPage == 0) { + return QWizard::validateCurrentPage(); + } + + + bool callback_return_value = miqt_exec_callback_QWizard_ValidateCurrentPage(this, handle__ValidateCurrentPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ValidateCurrentPage() { + + return QWizard::validateCurrentPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextId = 0; + + // Subclass to allow providing a Go implementation + virtual int nextId() const override { + if (handle__NextId == 0) { + return QWizard::nextId(); + } + + + int callback_return_value = miqt_exec_callback_QWizard_NextId(const_cast(this), handle__NextId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_NextId() const { + + return QWizard::nextId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWizard::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWizard_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWizard::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWizard::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizard_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWizard::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWizard::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWizard_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWizard::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWizard::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWizard_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWizard::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWizard::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWizard_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWizard::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QWizard::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QWizard_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QWizard::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitializePage = 0; + + // Subclass to allow providing a Go implementation + virtual void initializePage(int id) override { + if (handle__InitializePage == 0) { + QWizard::initializePage(id); + return; + } + + int sigval1 = id; + + miqt_exec_callback_QWizard_InitializePage(this, handle__InitializePage, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitializePage(int id) { + + QWizard::initializePage(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CleanupPage = 0; + + // Subclass to allow providing a Go implementation + virtual void cleanupPage(int id) override { + if (handle__CleanupPage == 0) { + QWizard::cleanupPage(id); + return; + } + + int sigval1 = id; + + miqt_exec_callback_QWizard_CleanupPage(this, handle__CleanupPage, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CleanupPage(int id) { + + QWizard::cleanupPage(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWizard::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizard_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWizard::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QWizard::open(); + return; + } + + + miqt_exec_callback_QWizard_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QWizard::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QWizard::exec(); + } + + + int callback_return_value = miqt_exec_callback_QWizard_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QWizard::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QWizard::accept(); + return; + } + + + miqt_exec_callback_QWizard_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QWizard::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QWizard::reject(); + return; + } + + + miqt_exec_callback_QWizard_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QWizard::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QWizard::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QWizard::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QWizard::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QWizard::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QWizard::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QWizard::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QWizard::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QWizard::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QWizard::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QWizard_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QWizard::eventFilter(param1, param2); + + } + +}; + +void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent); + *outptr_QWizard = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWizard* QWizard_new2() { - return new QWizard(); +void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(); + *outptr_QWizard = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWizard* QWizard_new3(QWidget* parent, int flags) { - return new QWizard(parent, static_cast(flags)); +void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent, static_cast(flags)); + *outptr_QWizard = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QWizard_MetaObject(const QWizard* self) { @@ -260,7 +778,7 @@ void QWizard_CurrentIdChanged(QWizard* self, int id) { } void QWizard_connect_CurrentIdChanged(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::currentIdChanged), self, [=](int id) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::currentIdChanged), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QWizard_CurrentIdChanged(slot, sigval1); }); @@ -271,7 +789,7 @@ void QWizard_HelpRequested(QWizard* self) { } void QWizard_connect_HelpRequested(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::helpRequested), self, [=]() { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::helpRequested), self, [=]() { miqt_exec_callback_QWizard_HelpRequested(slot); }); } @@ -281,7 +799,7 @@ void QWizard_CustomButtonClicked(QWizard* self, int which) { } void QWizard_connect_CustomButtonClicked(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::customButtonClicked), self, [=](int which) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::customButtonClicked), self, [=](int which) { int sigval1 = which; miqt_exec_callback_QWizard_CustomButtonClicked(slot, sigval1); }); @@ -292,7 +810,7 @@ void QWizard_PageAdded(QWizard* self, int id) { } void QWizard_connect_PageAdded(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::pageAdded), self, [=](int id) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::pageAdded), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QWizard_PageAdded(slot, sigval1); }); @@ -303,7 +821,7 @@ void QWizard_PageRemoved(QWizard* self, int id) { } void QWizard_connect_PageRemoved(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::pageRemoved), self, [=](int id) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::pageRemoved), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QWizard_PageRemoved(slot, sigval1); }); @@ -369,117 +887,1386 @@ void QWizard_SetOption2(QWizard* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QWizard_Delete(QWizard* self) { - delete self; +void QWizard_override_virtual_ValidateCurrentPage(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ValidateCurrentPage = slot; } -QWizardPage* QWizardPage_new(QWidget* parent) { - return new QWizardPage(parent); +bool QWizard_virtualbase_ValidateCurrentPage(void* self) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_ValidateCurrentPage(); } -QWizardPage* QWizardPage_new2() { - return new QWizardPage(); +void QWizard_override_virtual_NextId(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__NextId = slot; } -QMetaObject* QWizardPage_MetaObject(const QWizardPage* self) { - return (QMetaObject*) self->metaObject(); +int QWizard_virtualbase_NextId(const void* self) { + return ( (const MiqtVirtualQWizard*)(self) )->virtualbase_NextId(); } -void* QWizardPage_Metacast(QWizardPage* self, const char* param1) { - return self->qt_metacast(param1); +void QWizard_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__SetVisible = slot; } -struct miqt_string QWizardPage_Tr(const char* s) { - QString _ret = QWizardPage::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QWizard_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_SetVisible(visible); } -struct miqt_string QWizardPage_TrUtf8(const char* s) { - QString _ret = QWizardPage::trUtf8(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QWizard_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__SizeHint = slot; } -void QWizardPage_SetTitle(QWizardPage* self, struct miqt_string title) { - QString title_QString = QString::fromUtf8(title.data, title.len); - self->setTitle(title_QString); +QSize* QWizard_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWizard*)(self) )->virtualbase_SizeHint(); } -struct miqt_string QWizardPage_Title(const QWizardPage* self) { - QString _ret = self->title(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QWizard_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Event = slot; } -void QWizardPage_SetSubTitle(QWizardPage* self, struct miqt_string subTitle) { - QString subTitle_QString = QString::fromUtf8(subTitle.data, subTitle.len); - self->setSubTitle(subTitle_QString); +bool QWizard_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_Event(event); } -struct miqt_string QWizardPage_SubTitle(const QWizardPage* self) { - QString _ret = self->subTitle(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QWizard_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ResizeEvent = slot; } -void QWizardPage_SetPixmap(QWizardPage* self, int which, QPixmap* pixmap) { - self->setPixmap(static_cast(which), *pixmap); +void QWizard_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_ResizeEvent(event); } -QPixmap* QWizardPage_Pixmap(const QWizardPage* self, int which) { - return new QPixmap(self->pixmap(static_cast(which))); +void QWizard_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__PaintEvent = slot; } -void QWizardPage_SetFinalPage(QWizardPage* self, bool finalPage) { - self->setFinalPage(finalPage); +void QWizard_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_PaintEvent(event); } -bool QWizardPage_IsFinalPage(const QWizardPage* self) { - return self->isFinalPage(); +void QWizard_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Done = slot; } -void QWizardPage_SetCommitPage(QWizardPage* self, bool commitPage) { - self->setCommitPage(commitPage); +void QWizard_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Done(result); } -bool QWizardPage_IsCommitPage(const QWizardPage* self) { - return self->isCommitPage(); +void QWizard_override_virtual_InitializePage(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__InitializePage = slot; } -void QWizardPage_SetButtonText(QWizardPage* self, int which, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setButtonText(static_cast(which), text_QString); +void QWizard_virtualbase_InitializePage(void* self, int id) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_InitializePage(id); } -struct miqt_string QWizardPage_ButtonText(const QWizardPage* self, int which) { - QString _ret = self->buttonText(static_cast(which)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); +void QWizard_override_virtual_CleanupPage(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__CleanupPage = slot; +} + +void QWizard_virtualbase_CleanupPage(void* self, int id) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_CleanupPage(id); +} + +void QWizard_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWizard_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWizard*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWizard_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Open = slot; +} + +void QWizard_virtualbase_Open(void* self) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Open(); +} + +void QWizard_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Exec = slot; +} + +int QWizard_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_Exec(); +} + +void QWizard_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Accept = slot; +} + +void QWizard_virtualbase_Accept(void* self) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Accept(); +} + +void QWizard_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Reject = slot; +} + +void QWizard_virtualbase_Reject(void* self) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Reject(); +} + +void QWizard_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__KeyPressEvent = slot; +} + +void QWizard_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QWizard_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__CloseEvent = slot; +} + +void QWizard_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_CloseEvent(param1); +} + +void QWizard_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ShowEvent = slot; +} + +void QWizard_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_ShowEvent(param1); +} + +void QWizard_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWizard_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QWizard_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__EventFilter = slot; +} + +bool QWizard_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QWizard_Delete(QWizard* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWizardPage : public virtual QWizardPage { +public: + + MiqtVirtualQWizardPage(QWidget* parent): QWizardPage(parent) {}; + MiqtVirtualQWizardPage(): QWizardPage() {}; + + virtual ~MiqtVirtualQWizardPage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitializePage = 0; + + // Subclass to allow providing a Go implementation + virtual void initializePage() override { + if (handle__InitializePage == 0) { + QWizardPage::initializePage(); + return; + } + + + miqt_exec_callback_QWizardPage_InitializePage(this, handle__InitializePage); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitializePage() { + + QWizardPage::initializePage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CleanupPage = 0; + + // Subclass to allow providing a Go implementation + virtual void cleanupPage() override { + if (handle__CleanupPage == 0) { + QWizardPage::cleanupPage(); + return; + } + + + miqt_exec_callback_QWizardPage_CleanupPage(this, handle__CleanupPage); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CleanupPage() { + + QWizardPage::cleanupPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValidatePage = 0; + + // Subclass to allow providing a Go implementation + virtual bool validatePage() override { + if (handle__ValidatePage == 0) { + return QWizardPage::validatePage(); + } + + + bool callback_return_value = miqt_exec_callback_QWizardPage_ValidatePage(this, handle__ValidatePage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ValidatePage() { + + return QWizardPage::validatePage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsComplete = 0; + + // Subclass to allow providing a Go implementation + virtual bool isComplete() const override { + if (handle__IsComplete == 0) { + return QWizardPage::isComplete(); + } + + + bool callback_return_value = miqt_exec_callback_QWizardPage_IsComplete(const_cast(this), handle__IsComplete); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsComplete() const { + + return QWizardPage::isComplete(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextId = 0; + + // Subclass to allow providing a Go implementation + virtual int nextId() const override { + if (handle__NextId == 0) { + return QWizardPage::nextId(); + } + + + int callback_return_value = miqt_exec_callback_QWizardPage_NextId(const_cast(this), handle__NextId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_NextId() const { + + return QWizardPage::nextId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWizardPage::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWizardPage_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWizardPage::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWizardPage::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWizardPage_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWizardPage::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWizardPage::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizardPage_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWizardPage::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWizardPage::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizardPage_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWizardPage::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWizardPage::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWizardPage_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWizardPage::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWizardPage::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWizardPage_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWizardPage::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QWizardPage::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWizardPage_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWizardPage::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWizardPage::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWizardPage_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWizardPage::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWizardPage::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWizardPage::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWizardPage::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWizardPage::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QWizardPage::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWizardPage::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWizardPage::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWizardPage::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWizardPage::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWizardPage::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWizardPage::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWizardPage::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QWizardPage::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWizardPage::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWizardPage::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWizardPage::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QWizardPage::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWizardPage::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QWizardPage::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QWizardPage::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QWizardPage::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWizardPage::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWizardPage::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWizardPage::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWizardPage::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWizardPage::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWizardPage::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWizardPage::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QWizardPage::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QWizardPage::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QWizardPage::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QWizardPage::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWizardPage::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWizardPage::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QWizardPage::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWizardPage::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QWizardPage::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QWizardPage::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QWizardPage::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QWizardPage::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QWizardPage::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QWizardPage::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QWizardPage::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QWizardPage::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QWizardPage::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QWizardPage::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QWizardPage::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QWizardPage::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QWizardPage::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QWizardPage_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWizardPage::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWizardPage::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWizardPage_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWizardPage::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWizardPage::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWizardPage_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QWizardPage::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QWizardPage::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWizardPage_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWizardPage::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QWizardPage::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWizardPage_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWizardPage::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QWizardPage::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWizardPage_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWizardPage::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWizardPage::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWizardPage_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWizardPage::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QWizardPage::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWizardPage_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QWizardPage::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWizardPage::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWizardPage_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWizardPage::focusNextPrevChild(next); + + } + +}; + +void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(parent); + *outptr_QWizardPage = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(); + *outptr_QWizardPage = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QWizardPage_MetaObject(const QWizardPage* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWizardPage_Metacast(QWizardPage* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWizardPage_Tr(const char* s) { + QString _ret = QWizardPage::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWizardPage_TrUtf8(const char* s) { + QString _ret = QWizardPage::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_SetTitle(QWizardPage* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->setTitle(title_QString); +} + +struct miqt_string QWizardPage_Title(const QWizardPage* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_SetSubTitle(QWizardPage* self, struct miqt_string subTitle) { + QString subTitle_QString = QString::fromUtf8(subTitle.data, subTitle.len); + self->setSubTitle(subTitle_QString); +} + +struct miqt_string QWizardPage_SubTitle(const QWizardPage* self) { + QString _ret = self->subTitle(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_SetPixmap(QWizardPage* self, int which, QPixmap* pixmap) { + self->setPixmap(static_cast(which), *pixmap); +} + +QPixmap* QWizardPage_Pixmap(const QWizardPage* self, int which) { + return new QPixmap(self->pixmap(static_cast(which))); +} + +void QWizardPage_SetFinalPage(QWizardPage* self, bool finalPage) { + self->setFinalPage(finalPage); +} + +bool QWizardPage_IsFinalPage(const QWizardPage* self) { + return self->isFinalPage(); +} + +void QWizardPage_SetCommitPage(QWizardPage* self, bool commitPage) { + self->setCommitPage(commitPage); +} + +bool QWizardPage_IsCommitPage(const QWizardPage* self) { + return self->isCommitPage(); +} + +void QWizardPage_SetButtonText(QWizardPage* self, int which, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setButtonText(static_cast(which), text_QString); +} + +struct miqt_string QWizardPage_ButtonText(const QWizardPage* self, int which) { + QString _ret = self->buttonText(static_cast(which)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); return _ms; } @@ -508,7 +2295,7 @@ void QWizardPage_CompleteChanged(QWizardPage* self) { } void QWizardPage_connect_CompleteChanged(QWizardPage* self, intptr_t slot) { - QWizardPage::connect(self, static_cast(&QWizardPage::completeChanged), self, [=]() { + MiqtVirtualQWizardPage::connect(self, static_cast(&QWizardPage::completeChanged), self, [=]() { miqt_exec_callback_QWizardPage_CompleteChanged(slot); }); } @@ -557,7 +2344,379 @@ struct miqt_string QWizardPage_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QWizardPage_Delete(QWizardPage* self) { - delete self; +void QWizardPage_override_virtual_InitializePage(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InitializePage = slot; +} + +void QWizardPage_virtualbase_InitializePage(void* self) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_InitializePage(); +} + +void QWizardPage_override_virtual_CleanupPage(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__CleanupPage = slot; +} + +void QWizardPage_virtualbase_CleanupPage(void* self) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_CleanupPage(); +} + +void QWizardPage_override_virtual_ValidatePage(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ValidatePage = slot; +} + +bool QWizardPage_virtualbase_ValidatePage(void* self) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ValidatePage(); +} + +void QWizardPage_override_virtual_IsComplete(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__IsComplete = slot; +} + +bool QWizardPage_virtualbase_IsComplete(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_IsComplete(); +} + +void QWizardPage_override_virtual_NextId(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__NextId = slot; +} + +int QWizardPage_virtualbase_NextId(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_NextId(); +} + +void QWizardPage_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DevType = slot; +} + +int QWizardPage_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_DevType(); +} + +void QWizardPage_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__SetVisible = slot; +} + +void QWizardPage_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_SetVisible(visible); +} + +void QWizardPage_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__SizeHint = slot; +} + +QSize* QWizardPage_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_SizeHint(); +} + +void QWizardPage_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWizardPage_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWizardPage_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__HeightForWidth = slot; +} + +int QWizardPage_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWizardPage_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWizardPage_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWizardPage_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWizardPage_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_PaintEngine(); +} + +void QWizardPage_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__Event = slot; +} + +bool QWizardPage_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_Event(event); +} + +void QWizardPage_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MousePressEvent = slot; +} + +void QWizardPage_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWizardPage_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWizardPage_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWizardPage_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWizardPage_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWizardPage_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWizardPage_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWizardPage_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__WheelEvent = slot; +} + +void QWizardPage_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_WheelEvent(event); +} + +void QWizardPage_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__KeyPressEvent = slot; +} + +void QWizardPage_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWizardPage_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWizardPage_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWizardPage_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__FocusInEvent = slot; +} + +void QWizardPage_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWizardPage_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__FocusOutEvent = slot; +} + +void QWizardPage_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWizardPage_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__EnterEvent = slot; +} + +void QWizardPage_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_EnterEvent(event); +} + +void QWizardPage_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__LeaveEvent = slot; +} + +void QWizardPage_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWizardPage_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__PaintEvent = slot; +} + +void QWizardPage_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_PaintEvent(event); +} + +void QWizardPage_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MoveEvent = slot; +} + +void QWizardPage_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MoveEvent(event); +} + +void QWizardPage_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ResizeEvent = slot; +} + +void QWizardPage_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWizardPage_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__CloseEvent = slot; +} + +void QWizardPage_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_CloseEvent(event); +} + +void QWizardPage_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWizardPage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QWizardPage_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__TabletEvent = slot; +} + +void QWizardPage_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_TabletEvent(event); +} + +void QWizardPage_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ActionEvent = slot; +} + +void QWizardPage_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ActionEvent(event); +} + +void QWizardPage_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DragEnterEvent = slot; +} + +void QWizardPage_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QWizardPage_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DragMoveEvent = slot; +} + +void QWizardPage_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QWizardPage_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWizardPage_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QWizardPage_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DropEvent = slot; +} + +void QWizardPage_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DropEvent(event); +} + +void QWizardPage_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ShowEvent = slot; +} + +void QWizardPage_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ShowEvent(event); +} + +void QWizardPage_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__HideEvent = slot; +} + +void QWizardPage_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_HideEvent(event); +} + +void QWizardPage_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__NativeEvent = slot; +} + +bool QWizardPage_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWizardPage_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ChangeEvent = slot; +} + +void QWizardPage_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWizardPage_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__Metric = slot; +} + +int QWizardPage_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_Metric(param1); +} + +void QWizardPage_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InitPainter = slot; +} + +void QWizardPage_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_InitPainter(painter); +} + +void QWizardPage_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWizardPage_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_Redirected(offset); +} + +void QWizardPage_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWizardPage_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_SharedPainter(); +} + +void QWizardPage_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InputMethodEvent = slot; +} + +void QWizardPage_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWizardPage_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWizardPage_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWizardPage_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWizardPage_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWizardPage_Delete(QWizardPage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qwizard.go b/qt/gen_qwizard.go index 01912958..7e365de6 100644 --- a/qt/gen_qwizard.go +++ b/qt/gen_qwizard.go @@ -75,7 +75,8 @@ const ( ) type QWizard struct { - h *C.QWizard + h *C.QWizard + isSubclass bool *QDialog } @@ -93,33 +94,65 @@ func (this *QWizard) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWizard(h *C.QWizard) *QWizard { +// newQWizard constructs the type using only CGO pointers. +func newQWizard(h *C.QWizard, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizard { if h == nil { return nil } - return &QWizard{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QWizard{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQWizard(h unsafe.Pointer) *QWizard { - return newQWizard((*C.QWizard)(h)) +// UnsafeNewQWizard constructs the type using only unsafe pointers. +func UnsafeNewQWizard(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizard { + if h == nil { + return nil + } + + return &QWizard{h: (*C.QWizard)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQWizard constructs a new QWizard object. func NewQWizard(parent *QWidget) *QWizard { - ret := C.QWizard_new(parent.cPointer()) - return newQWizard(ret) + var outptr_QWizard *C.QWizard = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizard_new(parent.cPointer(), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWizard2 constructs a new QWizard object. func NewQWizard2() *QWizard { - ret := C.QWizard_new2() - return newQWizard(ret) + var outptr_QWizard *C.QWizard = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizard_new2(&outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWizard3 constructs a new QWizard object. func NewQWizard3(parent *QWidget, flags WindowType) *QWizard { - ret := C.QWizard_new3(parent.cPointer(), (C.int)(flags)) - return newQWizard(ret) + var outptr_QWizard *C.QWizard = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizard_new3(parent.cPointer(), (C.int)(flags), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QWizard) MetaObject() *QMetaObject { @@ -163,7 +196,7 @@ func (this *QWizard) RemovePage(id int) { } func (this *QWizard) Page(id int) *QWizardPage { - return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_Page(this.h, (C.int)(id)))) + return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_Page(this.h, (C.int)(id))), nil, nil, nil) } func (this *QWizard) HasVisitedPage(id int) bool { @@ -209,7 +242,7 @@ func (this *QWizard) StartId() int { } func (this *QWizard) CurrentPage() *QWizardPage { - return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_CurrentPage(this.h))) + return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_CurrentPage(this.h)), nil, nil, nil) } func (this *QWizard) CurrentId() int { @@ -297,7 +330,7 @@ func (this *QWizard) SetButton(which QWizard__WizardButton, button *QAbstractBut } func (this *QWizard) Button(which QWizard__WizardButton) *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QWizard_Button(this.h, (C.int)(which)))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QWizard_Button(this.h, (C.int)(which))), nil, nil, nil) } func (this *QWizard) SetTitleFormat(format TextFormat) { @@ -322,7 +355,7 @@ func (this *QWizard) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { func (this *QWizard) Pixmap(which QWizard__WizardPixmap) *QPixmap { _ret := C.QWizard_Pixmap(this.h, (C.int)(which)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -332,7 +365,7 @@ func (this *QWizard) SetSideWidget(widget *QWidget) { } func (this *QWizard) SideWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWizard_SideWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWizard_SideWidget(this.h)), nil, nil) } func (this *QWizard) SetDefaultProperty(className string, property string, changedSignal string) { @@ -513,246 +546,1798 @@ func (this *QWizard) SetOption2(option QWizard__WizardOption, on bool) { C.QWizard_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } -// Delete this object from C++ memory. -func (this *QWizard) Delete() { - C.QWizard_Delete(this.h) +func (this *QWizard) callVirtualBase_ValidateCurrentPage() bool { + + return (bool)(C.QWizard_virtualbase_ValidateCurrentPage(unsafe.Pointer(this.h))) + +} +func (this *QWizard) OnValidateCurrentPage(slot func(super func() bool) bool) { + C.QWizard_override_virtual_ValidateCurrentPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QWizard) GoGC() { - runtime.SetFinalizer(this, func(this *QWizard) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QWizard_ValidateCurrentPage +func miqt_exec_callback_QWizard_ValidateCurrentPage(self *C.QWizard, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_ValidateCurrentPage) + + return (C.bool)(virtualReturn) + } -type QWizardPage struct { - h *C.QWizardPage - *QWidget +func (this *QWizard) callVirtualBase_NextId() int { + + return (int)(C.QWizard_virtualbase_NextId(unsafe.Pointer(this.h))) + +} +func (this *QWizard) OnNextId(slot func(super func() int) int) { + C.QWizard_override_virtual_NextId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) cPointer() *C.QWizardPage { - if this == nil { - return nil +//export miqt_exec_callback_QWizard_NextId +func miqt_exec_callback_QWizard_NextId(self *C.QWizard, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_NextId) + + return (C.int)(virtualReturn) + } -func (this *QWizardPage) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QWizard) callVirtualBase_SetVisible(visible bool) { + + C.QWizard_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWizard) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWizard_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_SetVisible +func miqt_exec_callback_QWizard_SetVisible(self *C.QWizard, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWizard{h: self}).callVirtualBase_SetVisible, slotval1) + } -func newQWizardPage(h *C.QWizardPage) *QWizardPage { - if h == nil { - return nil +func (this *QWizard) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWizard_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizard) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizard_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_SizeHint +func miqt_exec_callback_QWizard_SizeHint(self *C.QWizard, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QWizardPage{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func UnsafeNewQWizardPage(h unsafe.Pointer) *QWizardPage { - return newQWizardPage((*C.QWizardPage)(h)) +func (this *QWizard) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QWizard_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QWizard) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QWizard_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQWizardPage constructs a new QWizardPage object. -func NewQWizardPage(parent *QWidget) *QWizardPage { - ret := C.QWizardPage_new(parent.cPointer()) - return newQWizardPage(ret) +//export miqt_exec_callback_QWizard_Event +func miqt_exec_callback_QWizard_Event(self *C.QWizard, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -// NewQWizardPage2 constructs a new QWizardPage object. -func NewQWizardPage2() *QWizardPage { - ret := C.QWizardPage_new2() - return newQWizardPage(ret) +func (this *QWizard) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QWizard_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizard) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QWizard_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QWizardPage_MetaObject(this.h))) +//export miqt_exec_callback_QWizard_ResizeEvent +func miqt_exec_callback_QWizard_ResizeEvent(self *C.QWizard, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_ResizeEvent, slotval1) + } -func (this *QWizardPage) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QWizardPage_Metacast(this.h, param1_Cstring)) +func (this *QWizard) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QWizard_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizard) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QWizard_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QWizardPage_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QWizard_PaintEvent +func miqt_exec_callback_QWizard_PaintEvent(self *C.QWizard, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_PaintEvent, slotval1) + } -func QWizardPage_TrUtf8(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_TrUtf8(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_Done(result int) { + + C.QWizard_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QWizard) OnDone(slot func(super func(result int), result int)) { + C.QWizard_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetTitle(title string) { - title_ms := C.struct_miqt_string{} - title_ms.data = C.CString(title) - title_ms.len = C.size_t(len(title)) - defer C.free(unsafe.Pointer(title_ms.data)) - C.QWizardPage_SetTitle(this.h, title_ms) +//export miqt_exec_callback_QWizard_Done +func miqt_exec_callback_QWizard_Done(self *C.QWizard, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QWizard{h: self}).callVirtualBase_Done, slotval1) + } -func (this *QWizardPage) Title() string { - var _ms C.struct_miqt_string = C.QWizardPage_Title(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_InitializePage(id int) { + + C.QWizard_virtualbase_InitializePage(unsafe.Pointer(this.h), (C.int)(id)) + +} +func (this *QWizard) OnInitializePage(slot func(super func(id int), id int)) { + C.QWizard_override_virtual_InitializePage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetSubTitle(subTitle string) { - subTitle_ms := C.struct_miqt_string{} - subTitle_ms.data = C.CString(subTitle) - subTitle_ms.len = C.size_t(len(subTitle)) - defer C.free(unsafe.Pointer(subTitle_ms.data)) - C.QWizardPage_SetSubTitle(this.h, subTitle_ms) +//export miqt_exec_callback_QWizard_InitializePage +func miqt_exec_callback_QWizard_InitializePage(self *C.QWizard, cb C.intptr_t, id C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int), id int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(id) + + gofunc((&QWizard{h: self}).callVirtualBase_InitializePage, slotval1) + } -func (this *QWizardPage) SubTitle() string { - var _ms C.struct_miqt_string = C.QWizardPage_SubTitle(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_CleanupPage(id int) { + + C.QWizard_virtualbase_CleanupPage(unsafe.Pointer(this.h), (C.int)(id)) + +} +func (this *QWizard) OnCleanupPage(slot func(super func(id int), id int)) { + C.QWizard_override_virtual_CleanupPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { - C.QWizardPage_SetPixmap(this.h, (C.int)(which), pixmap.cPointer()) +//export miqt_exec_callback_QWizard_CleanupPage +func miqt_exec_callback_QWizard_CleanupPage(self *C.QWizard, cb C.intptr_t, id C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int), id int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(id) + + gofunc((&QWizard{h: self}).callVirtualBase_CleanupPage, slotval1) + } -func (this *QWizardPage) Pixmap(which QWizard__WizardPixmap) *QPixmap { - _ret := C.QWizardPage_Pixmap(this.h, (C.int)(which)) - _goptr := newQPixmap(_ret) +func (this *QWizard) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QWizard_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QWizardPage) SetFinalPage(finalPage bool) { - C.QWizardPage_SetFinalPage(this.h, (C.bool)(finalPage)) } - -func (this *QWizardPage) IsFinalPage() bool { - return (bool)(C.QWizardPage_IsFinalPage(this.h)) +func (this *QWizard) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizard_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetCommitPage(commitPage bool) { - C.QWizardPage_SetCommitPage(this.h, (C.bool)(commitPage)) -} +//export miqt_exec_callback_QWizard_MinimumSizeHint +func miqt_exec_callback_QWizard_MinimumSizeHint(self *C.QWizard, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QWizardPage) IsCommitPage() bool { - return (bool)(C.QWizardPage_IsCommitPage(this.h)) -} + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_MinimumSizeHint) -func (this *QWizardPage) SetButtonText(which QWizard__WizardButton, text string) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QWizardPage_SetButtonText(this.h, (C.int)(which), text_ms) -} + return virtualReturn.cPointer() -func (this *QWizardPage) ButtonText(which QWizard__WizardButton) string { - var _ms C.struct_miqt_string = C.QWizardPage_ButtonText(this.h, (C.int)(which)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func (this *QWizardPage) InitializePage() { - C.QWizardPage_InitializePage(this.h) -} +func (this *QWizard) callVirtualBase_Open() { -func (this *QWizardPage) CleanupPage() { - C.QWizardPage_CleanupPage(this.h) -} + C.QWizard_virtualbase_Open(unsafe.Pointer(this.h)) -func (this *QWizardPage) ValidatePage() bool { - return (bool)(C.QWizardPage_ValidatePage(this.h)) } - -func (this *QWizardPage) IsComplete() bool { - return (bool)(C.QWizardPage_IsComplete(this.h)) +func (this *QWizard) OnOpen(slot func(super func())) { + C.QWizard_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) NextId() int { - return (int)(C.QWizardPage_NextId(this.h)) +//export miqt_exec_callback_QWizard_Open +func miqt_exec_callback_QWizard_Open(self *C.QWizard, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizard{h: self}).callVirtualBase_Open) + } -func (this *QWizardPage) CompleteChanged() { - C.QWizardPage_CompleteChanged(this.h) +func (this *QWizard) callVirtualBase_Exec() int { + + return (int)(C.QWizard_virtualbase_Exec(unsafe.Pointer(this.h))) + } -func (this *QWizardPage) OnCompleteChanged(slot func()) { - C.QWizardPage_connect_CompleteChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QWizard) OnExec(slot func(super func() int) int) { + C.QWizard_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QWizardPage_CompleteChanged -func miqt_exec_callback_QWizardPage_CompleteChanged(cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) +//export miqt_exec_callback_QWizard_Exec +func miqt_exec_callback_QWizard_Exec(self *C.QWizard, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - gofunc() + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + } -func QWizardPage_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_Accept() { + + C.QWizard_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QWizard) OnAccept(slot func(super func())) { + C.QWizard_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QWizardPage_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) +//export miqt_exec_callback_QWizard_Accept +func miqt_exec_callback_QWizard_Accept(self *C.QWizard, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizard{h: self}).callVirtualBase_Accept) + +} + +func (this *QWizard) callVirtualBase_Reject() { + + C.QWizard_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QWizard) OnReject(slot func(super func())) { + C.QWizard_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_Reject +func miqt_exec_callback_QWizard_Reject(self *C.QWizard, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizard{h: self}).callVirtualBase_Reject) + +} + +func (this *QWizard) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QWizard_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QWizard_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_KeyPressEvent +func miqt_exec_callback_QWizard_KeyPressEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWizard{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QWizard_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QWizard_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_CloseEvent +func miqt_exec_callback_QWizard_CloseEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QWizard_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QWizard_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_ShowEvent +func miqt_exec_callback_QWizard_ShowEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QWizard_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QWizard_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_ContextMenuEvent +func miqt_exec_callback_QWizard_ContextMenuEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWizard{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QWizard_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QWizard) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QWizard_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_EventFilter +func miqt_exec_callback_QWizard_EventFilter(self *C.QWizard, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QWizard) Delete() { + C.QWizard_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWizard) GoGC() { + runtime.SetFinalizer(this, func(this *QWizard) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWizardPage struct { + h *C.QWizardPage + isSubclass bool + *QWidget +} + +func (this *QWizardPage) cPointer() *C.QWizardPage { + if this == nil { + return nil + } + return this.h +} + +func (this *QWizardPage) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWizardPage constructs the type using only CGO pointers. +func newQWizardPage(h *C.QWizardPage, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizardPage { + if h == nil { + return nil + } + return &QWizardPage{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQWizardPage constructs the type using only unsafe pointers. +func UnsafeNewQWizardPage(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizardPage { + if h == nil { + return nil + } + + return &QWizardPage{h: (*C.QWizardPage)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQWizardPage constructs a new QWizardPage object. +func NewQWizardPage(parent *QWidget) *QWizardPage { + var outptr_QWizardPage *C.QWizardPage = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizardPage_new(parent.cPointer(), &outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWizardPage2 constructs a new QWizardPage object. +func NewQWizardPage2() *QWizardPage { + var outptr_QWizardPage *C.QWizardPage = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizardPage_new2(&outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QWizardPage) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QWizardPage_MetaObject(this.h))) +} + +func (this *QWizardPage) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWizardPage_Metacast(this.h, param1_Cstring)) +} + +func QWizardPage_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_Tr(s_Cstring) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } -func QWizardPage_TrUtf82(s string, c string) string { +func QWizardPage_TrUtf8(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_TrUtf82(s_Cstring, c_Cstring) + var _ms C.struct_miqt_string = C.QWizardPage_TrUtf8(s_Cstring) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } -func QWizardPage_TrUtf83(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) +func (this *QWizardPage) SetTitle(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWizardPage_SetTitle(this.h, title_ms) +} + +func (this *QWizardPage) Title() string { + var _ms C.struct_miqt_string = C.QWizardPage_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) SetSubTitle(subTitle string) { + subTitle_ms := C.struct_miqt_string{} + subTitle_ms.data = C.CString(subTitle) + subTitle_ms.len = C.size_t(len(subTitle)) + defer C.free(unsafe.Pointer(subTitle_ms.data)) + C.QWizardPage_SetSubTitle(this.h, subTitle_ms) +} + +func (this *QWizardPage) SubTitle() string { + var _ms C.struct_miqt_string = C.QWizardPage_SubTitle(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { + C.QWizardPage_SetPixmap(this.h, (C.int)(which), pixmap.cPointer()) +} + +func (this *QWizardPage) Pixmap(which QWizard__WizardPixmap) *QPixmap { + _ret := C.QWizardPage_Pixmap(this.h, (C.int)(which)) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWizardPage) SetFinalPage(finalPage bool) { + C.QWizardPage_SetFinalPage(this.h, (C.bool)(finalPage)) +} + +func (this *QWizardPage) IsFinalPage() bool { + return (bool)(C.QWizardPage_IsFinalPage(this.h)) +} + +func (this *QWizardPage) SetCommitPage(commitPage bool) { + C.QWizardPage_SetCommitPage(this.h, (C.bool)(commitPage)) +} + +func (this *QWizardPage) IsCommitPage() bool { + return (bool)(C.QWizardPage_IsCommitPage(this.h)) +} + +func (this *QWizardPage) SetButtonText(which QWizard__WizardButton, text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QWizardPage_SetButtonText(this.h, (C.int)(which), text_ms) +} + +func (this *QWizardPage) ButtonText(which QWizard__WizardButton) string { + var _ms C.struct_miqt_string = C.QWizardPage_ButtonText(this.h, (C.int)(which)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QWizardPage) InitializePage() { + C.QWizardPage_InitializePage(this.h) +} + +func (this *QWizardPage) CleanupPage() { + C.QWizardPage_CleanupPage(this.h) +} + +func (this *QWizardPage) ValidatePage() bool { + return (bool)(C.QWizardPage_ValidatePage(this.h)) +} + +func (this *QWizardPage) IsComplete() bool { + return (bool)(C.QWizardPage_IsComplete(this.h)) +} + +func (this *QWizardPage) NextId() int { + return (int)(C.QWizardPage_NextId(this.h)) +} + +func (this *QWizardPage) CompleteChanged() { + C.QWizardPage_CompleteChanged(this.h) +} +func (this *QWizardPage) OnCompleteChanged(slot func()) { + C.QWizardPage_connect_CompleteChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_CompleteChanged +func miqt_exec_callback_QWizardPage_CompleteChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWizardPage_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWizardPage_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWizardPage_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWizardPage_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) callVirtualBase_InitializePage() { + + C.QWizardPage_virtualbase_InitializePage(unsafe.Pointer(this.h)) + +} +func (this *QWizardPage) OnInitializePage(slot func(super func())) { + C.QWizardPage_override_virtual_InitializePage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InitializePage +func miqt_exec_callback_QWizardPage_InitializePage(self *C.QWizardPage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizardPage{h: self}).callVirtualBase_InitializePage) + +} + +func (this *QWizardPage) callVirtualBase_CleanupPage() { + + C.QWizardPage_virtualbase_CleanupPage(unsafe.Pointer(this.h)) + +} +func (this *QWizardPage) OnCleanupPage(slot func(super func())) { + C.QWizardPage_override_virtual_CleanupPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_CleanupPage +func miqt_exec_callback_QWizardPage_CleanupPage(self *C.QWizardPage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizardPage{h: self}).callVirtualBase_CleanupPage) + +} + +func (this *QWizardPage) callVirtualBase_ValidatePage() bool { + + return (bool)(C.QWizardPage_virtualbase_ValidatePage(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnValidatePage(slot func(super func() bool) bool) { + C.QWizardPage_override_virtual_ValidatePage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ValidatePage +func miqt_exec_callback_QWizardPage_ValidatePage(self *C.QWizardPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_ValidatePage) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_IsComplete() bool { + + return (bool)(C.QWizardPage_virtualbase_IsComplete(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnIsComplete(slot func(super func() bool) bool) { + C.QWizardPage_override_virtual_IsComplete(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_IsComplete +func miqt_exec_callback_QWizardPage_IsComplete(self *C.QWizardPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_IsComplete) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_NextId() int { + + return (int)(C.QWizardPage_virtualbase_NextId(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnNextId(slot func(super func() int) int) { + C.QWizardPage_override_virtual_NextId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_NextId +func miqt_exec_callback_QWizardPage_NextId(self *C.QWizardPage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_NextId) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_DevType() int { + + return (int)(C.QWizardPage_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnDevType(slot func(super func() int) int) { + C.QWizardPage_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DevType +func miqt_exec_callback_QWizardPage_DevType(self *C.QWizardPage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_SetVisible(visible bool) { + + C.QWizardPage_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWizardPage) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWizardPage_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_SetVisible +func miqt_exec_callback_QWizardPage_SetVisible(self *C.QWizardPage, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWizardPage{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWizardPage_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizardPage) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizardPage_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_SizeHint +func miqt_exec_callback_QWizardPage_SizeHint(self *C.QWizardPage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QWizardPage_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizardPage) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizardPage_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MinimumSizeHint +func miqt_exec_callback_QWizardPage_MinimumSizeHint(self *C.QWizardPage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWizardPage_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWizardPage) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWizardPage_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_HeightForWidth +func miqt_exec_callback_QWizardPage_HeightForWidth(self *C.QWizardPage, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWizardPage_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWizardPage_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_HasHeightForWidth +func miqt_exec_callback_QWizardPage_HasHeightForWidth(self *C.QWizardPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QWizardPage_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWizardPage) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QWizardPage_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_PaintEngine +func miqt_exec_callback_QWizardPage_PaintEngine(self *C.QWizardPage, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QWizardPage_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QWizardPage) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QWizardPage_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_Event +func miqt_exec_callback_QWizardPage_Event(self *C.QWizardPage, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MousePressEvent +func miqt_exec_callback_QWizardPage_MousePressEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MouseReleaseEvent +func miqt_exec_callback_QWizardPage_MouseReleaseEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MouseDoubleClickEvent +func miqt_exec_callback_QWizardPage_MouseDoubleClickEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MouseMoveEvent +func miqt_exec_callback_QWizardPage_MouseMoveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QWizardPage_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QWizardPage_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_WheelEvent +func miqt_exec_callback_QWizardPage_WheelEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QWizardPage_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWizardPage_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_KeyPressEvent +func miqt_exec_callback_QWizardPage_KeyPressEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QWizardPage_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWizardPage_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_KeyReleaseEvent +func miqt_exec_callback_QWizardPage_KeyReleaseEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QWizardPage_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWizardPage_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_FocusInEvent +func miqt_exec_callback_QWizardPage_FocusInEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QWizardPage_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWizardPage_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_FocusOutEvent +func miqt_exec_callback_QWizardPage_FocusOutEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_EnterEvent(event *QEvent) { + + C.QWizardPage_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWizardPage_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_EnterEvent +func miqt_exec_callback_QWizardPage_EnterEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QWizardPage_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWizardPage_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_LeaveEvent +func miqt_exec_callback_QWizardPage_LeaveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QWizardPage_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QWizardPage_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_PaintEvent +func miqt_exec_callback_QWizardPage_PaintEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QWizardPage_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QWizardPage_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MoveEvent +func miqt_exec_callback_QWizardPage_MoveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QWizardPage_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QWizardPage_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ResizeEvent +func miqt_exec_callback_QWizardPage_ResizeEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QWizardPage_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QWizardPage_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_CloseEvent +func miqt_exec_callback_QWizardPage_CloseEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QWizardPage_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QWizardPage_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ContextMenuEvent +func miqt_exec_callback_QWizardPage_ContextMenuEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QWizardPage_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QWizardPage_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_TabletEvent +func miqt_exec_callback_QWizardPage_TabletEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QWizardPage_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QWizardPage_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ActionEvent +func miqt_exec_callback_QWizardPage_ActionEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QWizardPage_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QWizardPage_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DragEnterEvent +func miqt_exec_callback_QWizardPage_DragEnterEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QWizardPage_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QWizardPage_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DragMoveEvent +func miqt_exec_callback_QWizardPage_DragMoveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QWizardPage_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QWizardPage_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DragLeaveEvent +func miqt_exec_callback_QWizardPage_DragLeaveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QWizardPage_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QWizardPage_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DropEvent +func miqt_exec_callback_QWizardPage_DropEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QWizardPage_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QWizardPage_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ShowEvent +func miqt_exec_callback_QWizardPage_ShowEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QWizardPage_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QWizardPage_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_HideEvent +func miqt_exec_callback_QWizardPage_HideEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWizardPage_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QWizardPage) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QWizardPage_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_NativeEvent +func miqt_exec_callback_QWizardPage_NativeEvent(self *C.QWizardPage, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QWizardPage_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizardPage) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QWizardPage_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ChangeEvent +func miqt_exec_callback_QWizardPage_ChangeEvent(self *C.QWizardPage, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWizardPage_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWizardPage) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QWizardPage_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_Metric +func miqt_exec_callback_QWizardPage_Metric(self *C.QWizardPage, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_InitPainter(painter *QPainter) { + + C.QWizardPage_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QWizardPage) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QWizardPage_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InitPainter +func miqt_exec_callback_QWizardPage_InitPainter(self *C.QWizardPage, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QWizardPage_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QWizardPage) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QWizardPage_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_Redirected +func miqt_exec_callback_QWizardPage_Redirected(self *C.QWizardPage, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QWizardPage_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWizardPage) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QWizardPage_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_SharedPainter +func miqt_exec_callback_QWizardPage_SharedPainter(self *C.QWizardPage, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QWizardPage_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizardPage) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QWizardPage_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InputMethodEvent +func miqt_exec_callback_QWizardPage_InputMethodEvent(self *C.QWizardPage, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QWizardPage_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizardPage) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QWizardPage_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InputMethodQuery +func miqt_exec_callback_QWizardPage_InputMethodQuery(self *C.QWizardPage, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWizardPage_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWizardPage) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWizardPage_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_FocusNextPrevChild +func miqt_exec_callback_QWizardPage_FocusNextPrevChild(self *C.QWizardPage, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QWizardPage) Delete() { - C.QWizardPage_Delete(this.h) + C.QWizardPage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qwizard.h b/qt/gen_qwizard.h index eb1a31d4..d65f15fe 100644 --- a/qt/gen_qwizard.h +++ b/qt/gen_qwizard.h @@ -16,27 +16,79 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPixmap; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QVariant; +class QWheelEvent; class QWidget; class QWizard; class QWizardPage; #else typedef struct QAbstractButton QAbstractButton; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QWizard QWizard; typedef struct QWizardPage QWizardPage; #endif -QWizard* QWizard_new(QWidget* parent); -QWizard* QWizard_new2(); -QWizard* QWizard_new3(QWidget* parent, int flags); +void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWizard_MetaObject(const QWizard* self); void* QWizard_Metacast(QWizard* self, const char* param1); struct miqt_string QWizard_Tr(const char* s); @@ -92,15 +144,61 @@ void QWizard_connect_PageRemoved(QWizard* self, intptr_t slot); void QWizard_Back(QWizard* self); void QWizard_Next(QWizard* self); void QWizard_Restart(QWizard* self); +bool QWizard_Event(QWizard* self, QEvent* event); +void QWizard_ResizeEvent(QWizard* self, QResizeEvent* event); +void QWizard_PaintEvent(QWizard* self, QPaintEvent* event); +void QWizard_Done(QWizard* self, int result); +void QWizard_InitializePage(QWizard* self, int id); +void QWizard_CleanupPage(QWizard* self, int id); struct miqt_string QWizard_Tr2(const char* s, const char* c); struct miqt_string QWizard_Tr3(const char* s, const char* c, int n); struct miqt_string QWizard_TrUtf82(const char* s, const char* c); struct miqt_string QWizard_TrUtf83(const char* s, const char* c, int n); void QWizard_SetOption2(QWizard* self, int option, bool on); -void QWizard_Delete(QWizard* self); +void QWizard_override_virtual_ValidateCurrentPage(void* self, intptr_t slot); +bool QWizard_virtualbase_ValidateCurrentPage(void* self); +void QWizard_override_virtual_NextId(void* self, intptr_t slot); +int QWizard_virtualbase_NextId(const void* self); +void QWizard_override_virtual_SetVisible(void* self, intptr_t slot); +void QWizard_virtualbase_SetVisible(void* self, bool visible); +void QWizard_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWizard_virtualbase_SizeHint(const void* self); +void QWizard_override_virtual_Event(void* self, intptr_t slot); +bool QWizard_virtualbase_Event(void* self, QEvent* event); +void QWizard_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWizard_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWizard_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWizard_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWizard_override_virtual_Done(void* self, intptr_t slot); +void QWizard_virtualbase_Done(void* self, int result); +void QWizard_override_virtual_InitializePage(void* self, intptr_t slot); +void QWizard_virtualbase_InitializePage(void* self, int id); +void QWizard_override_virtual_CleanupPage(void* self, intptr_t slot); +void QWizard_virtualbase_CleanupPage(void* self, int id); +void QWizard_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWizard_virtualbase_MinimumSizeHint(const void* self); +void QWizard_override_virtual_Open(void* self, intptr_t slot); +void QWizard_virtualbase_Open(void* self); +void QWizard_override_virtual_Exec(void* self, intptr_t slot); +int QWizard_virtualbase_Exec(void* self); +void QWizard_override_virtual_Accept(void* self, intptr_t slot); +void QWizard_virtualbase_Accept(void* self); +void QWizard_override_virtual_Reject(void* self, intptr_t slot); +void QWizard_virtualbase_Reject(void* self); +void QWizard_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWizard_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QWizard_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWizard_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QWizard_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWizard_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QWizard_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWizard_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QWizard_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWizard_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QWizard_Delete(QWizard* self, bool isSubclass); -QWizardPage* QWizardPage_new(QWidget* parent); -QWizardPage* QWizardPage_new2(); +void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWizardPage_MetaObject(const QWizardPage* self); void* QWizardPage_Metacast(QWizardPage* self, const char* param1); struct miqt_string QWizardPage_Tr(const char* s); @@ -128,7 +226,99 @@ struct miqt_string QWizardPage_Tr2(const char* s, const char* c); struct miqt_string QWizardPage_Tr3(const char* s, const char* c, int n); struct miqt_string QWizardPage_TrUtf82(const char* s, const char* c); struct miqt_string QWizardPage_TrUtf83(const char* s, const char* c, int n); -void QWizardPage_Delete(QWizardPage* self); +void QWizardPage_override_virtual_InitializePage(void* self, intptr_t slot); +void QWizardPage_virtualbase_InitializePage(void* self); +void QWizardPage_override_virtual_CleanupPage(void* self, intptr_t slot); +void QWizardPage_virtualbase_CleanupPage(void* self); +void QWizardPage_override_virtual_ValidatePage(void* self, intptr_t slot); +bool QWizardPage_virtualbase_ValidatePage(void* self); +void QWizardPage_override_virtual_IsComplete(void* self, intptr_t slot); +bool QWizardPage_virtualbase_IsComplete(const void* self); +void QWizardPage_override_virtual_NextId(void* self, intptr_t slot); +int QWizardPage_virtualbase_NextId(const void* self); +void QWizardPage_override_virtual_DevType(void* self, intptr_t slot); +int QWizardPage_virtualbase_DevType(const void* self); +void QWizardPage_override_virtual_SetVisible(void* self, intptr_t slot); +void QWizardPage_virtualbase_SetVisible(void* self, bool visible); +void QWizardPage_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWizardPage_virtualbase_SizeHint(const void* self); +void QWizardPage_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWizardPage_virtualbase_MinimumSizeHint(const void* self); +void QWizardPage_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWizardPage_virtualbase_HeightForWidth(const void* self, int param1); +void QWizardPage_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWizardPage_virtualbase_HasHeightForWidth(const void* self); +void QWizardPage_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWizardPage_virtualbase_PaintEngine(const void* self); +void QWizardPage_override_virtual_Event(void* self, intptr_t slot); +bool QWizardPage_virtualbase_Event(void* self, QEvent* event); +void QWizardPage_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWizardPage_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWizardPage_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWizardPage_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWizardPage_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWizardPage_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_EnterEvent(void* self, QEvent* event); +void QWizardPage_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWizardPage_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWizardPage_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWizardPage_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWizardPage_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QWizardPage_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QWizardPage_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWizardPage_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWizardPage_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QWizardPage_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QWizardPage_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QWizardPage_override_virtual_DropEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DropEvent(void* self, QDropEvent* event); +void QWizardPage_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QWizardPage_override_virtual_HideEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_HideEvent(void* self, QHideEvent* event); +void QWizardPage_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWizardPage_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QWizardPage_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWizardPage_override_virtual_Metric(void* self, intptr_t slot); +int QWizardPage_virtualbase_Metric(const void* self, int param1); +void QWizardPage_override_virtual_InitPainter(void* self, intptr_t slot); +void QWizardPage_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWizardPage_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWizardPage_virtualbase_Redirected(const void* self, QPoint* offset); +void QWizardPage_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWizardPage_virtualbase_SharedPainter(const void* self); +void QWizardPage_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWizardPage_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWizardPage_virtualbase_InputMethodQuery(const void* self, int param1); +void QWizardPage_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWizardPage_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWizardPage_Delete(QWizardPage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/gen_qxmlstream.cpp b/qt/gen_qxmlstream.cpp index 92b39c07..11564e3d 100644 --- a/qt/gen_qxmlstream.cpp +++ b/qt/gen_qxmlstream.cpp @@ -17,17 +17,20 @@ #include "gen_qxmlstream.h" #include "_cgo_export.h" -QXmlStreamStringRef* QXmlStreamStringRef_new() { - return new QXmlStreamStringRef(); +void QXmlStreamStringRef_new(QXmlStreamStringRef** outptr_QXmlStreamStringRef) { + QXmlStreamStringRef* ret = new QXmlStreamStringRef(); + *outptr_QXmlStreamStringRef = ret; } -QXmlStreamStringRef* QXmlStreamStringRef_new2(struct miqt_string aString) { +void QXmlStreamStringRef_new2(struct miqt_string aString, QXmlStreamStringRef** outptr_QXmlStreamStringRef) { QString aString_QString = QString::fromUtf8(aString.data, aString.len); - return new QXmlStreamStringRef(aString_QString); + QXmlStreamStringRef* ret = new QXmlStreamStringRef(aString_QString); + *outptr_QXmlStreamStringRef = ret; } -QXmlStreamStringRef* QXmlStreamStringRef_new3(QXmlStreamStringRef* other) { - return new QXmlStreamStringRef(*other); +void QXmlStreamStringRef_new3(QXmlStreamStringRef* other, QXmlStreamStringRef** outptr_QXmlStreamStringRef) { + QXmlStreamStringRef* ret = new QXmlStreamStringRef(*other); + *outptr_QXmlStreamStringRef = ret; } void QXmlStreamStringRef_OperatorAssign(QXmlStreamStringRef* self, QXmlStreamStringRef* other) { @@ -61,29 +64,37 @@ int QXmlStreamStringRef_Size(const QXmlStreamStringRef* self) { return self->size(); } -void QXmlStreamStringRef_Delete(QXmlStreamStringRef* self) { - delete self; +void QXmlStreamStringRef_Delete(QXmlStreamStringRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamAttribute* QXmlStreamAttribute_new() { - return new QXmlStreamAttribute(); +void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute) { + QXmlStreamAttribute* ret = new QXmlStreamAttribute(); + *outptr_QXmlStreamAttribute = ret; } -QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value) { +void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { QString qualifiedName_QString = QString::fromUtf8(qualifiedName.data, qualifiedName.len); QString value_QString = QString::fromUtf8(value.data, value.len); - return new QXmlStreamAttribute(qualifiedName_QString, value_QString); + QXmlStreamAttribute* ret = new QXmlStreamAttribute(qualifiedName_QString, value_QString); + *outptr_QXmlStreamAttribute = ret; } -QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value) { +void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString value_QString = QString::fromUtf8(value.data, value.len); - return new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); + QXmlStreamAttribute* ret = new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); + *outptr_QXmlStreamAttribute = ret; } -QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1) { - return new QXmlStreamAttribute(*param1); +void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { + QXmlStreamAttribute* ret = new QXmlStreamAttribute(*param1); + *outptr_QXmlStreamAttribute = ret; } void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAttribute* param1) { @@ -102,22 +113,29 @@ bool QXmlStreamAttribute_OperatorNotEqual(const QXmlStreamAttribute* self, QXmlS return self->operator!=(*other); } -void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self) { - delete self; +void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new() { - return new QXmlStreamNamespaceDeclaration(); +void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { + QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(); + *outptr_QXmlStreamNamespaceDeclaration = ret; } -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri) { +void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); - return new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); + QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); + *outptr_QXmlStreamNamespaceDeclaration = ret; } -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1) { - return new QXmlStreamNamespaceDeclaration(*param1); +void QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { + QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(*param1); + *outptr_QXmlStreamNamespaceDeclaration = ret; } void QXmlStreamNamespaceDeclaration_OperatorAssign(QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* param1) { @@ -132,16 +150,22 @@ bool QXmlStreamNamespaceDeclaration_OperatorNotEqual(const QXmlStreamNamespaceDe return self->operator!=(*other); } -void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self) { - delete self; +void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new() { - return new QXmlStreamNotationDeclaration(); +void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration) { + QXmlStreamNotationDeclaration* ret = new QXmlStreamNotationDeclaration(); + *outptr_QXmlStreamNotationDeclaration = ret; } -QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1) { - return new QXmlStreamNotationDeclaration(*param1); +void QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1, QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration) { + QXmlStreamNotationDeclaration* ret = new QXmlStreamNotationDeclaration(*param1); + *outptr_QXmlStreamNotationDeclaration = ret; } void QXmlStreamNotationDeclaration_OperatorAssign(QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* param1) { @@ -156,16 +180,22 @@ bool QXmlStreamNotationDeclaration_OperatorNotEqual(const QXmlStreamNotationDecl return self->operator!=(*other); } -void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self) { - delete self; +void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new() { - return new QXmlStreamEntityDeclaration(); +void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration) { + QXmlStreamEntityDeclaration* ret = new QXmlStreamEntityDeclaration(); + *outptr_QXmlStreamEntityDeclaration = ret; } -QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1) { - return new QXmlStreamEntityDeclaration(*param1); +void QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1, QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration) { + QXmlStreamEntityDeclaration* ret = new QXmlStreamEntityDeclaration(*param1); + *outptr_QXmlStreamEntityDeclaration = ret; } void QXmlStreamEntityDeclaration_OperatorAssign(QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* param1) { @@ -180,8 +210,12 @@ bool QXmlStreamEntityDeclaration_OperatorNotEqual(const QXmlStreamEntityDeclarat return self->operator!=(*other); } -void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self) { - delete self; +void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QXmlStreamEntityResolver_ResolveEntity(QXmlStreamEntityResolver* self, struct miqt_string publicId, struct miqt_string systemId) { @@ -213,30 +247,39 @@ void QXmlStreamEntityResolver_OperatorAssign(QXmlStreamEntityResolver* self, QXm self->operator=(*param1); } -void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self) { - delete self; +void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamReader* QXmlStreamReader_new() { - return new QXmlStreamReader(); +void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader) { + QXmlStreamReader* ret = new QXmlStreamReader(); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device) { - return new QXmlStreamReader(device); +void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader) { + QXmlStreamReader* ret = new QXmlStreamReader(device); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data) { +void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { QByteArray data_QByteArray(data.data, data.len); - return new QXmlStreamReader(data_QByteArray); + QXmlStreamReader* ret = new QXmlStreamReader(data_QByteArray); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data) { +void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { QString data_QString = QString::fromUtf8(data.data, data.len); - return new QXmlStreamReader(data_QString); + QXmlStreamReader* ret = new QXmlStreamReader(data_QString); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new5(const char* data) { - return new QXmlStreamReader(data); +void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader) { + QXmlStreamReader* ret = new QXmlStreamReader(data); + *outptr_QXmlStreamReader = ret; } void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device) { @@ -489,16 +532,22 @@ void QXmlStreamReader_RaiseError1(QXmlStreamReader* self, struct miqt_string mes self->raiseError(message_QString); } -void QXmlStreamReader_Delete(QXmlStreamReader* self) { - delete self; +void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamWriter* QXmlStreamWriter_new() { - return new QXmlStreamWriter(); +void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter) { + QXmlStreamWriter* ret = new QXmlStreamWriter(); + *outptr_QXmlStreamWriter = ret; } -QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device) { - return new QXmlStreamWriter(device); +void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter) { + QXmlStreamWriter* ret = new QXmlStreamWriter(device); + *outptr_QXmlStreamWriter = ret; } void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device) { @@ -671,7 +720,11 @@ void QXmlStreamWriter_WriteProcessingInstruction2(QXmlStreamWriter* self, struct self->writeProcessingInstruction(target_QString, data_QString); } -void QXmlStreamWriter_Delete(QXmlStreamWriter* self) { - delete self; +void QXmlStreamWriter_Delete(QXmlStreamWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/gen_qxmlstream.go b/qt/gen_qxmlstream.go index 1b2f2e2c..f6bb220c 100644 --- a/qt/gen_qxmlstream.go +++ b/qt/gen_qxmlstream.go @@ -48,7 +48,8 @@ const ( ) type QXmlStreamStringRef struct { - h *C.QXmlStreamStringRef + h *C.QXmlStreamStringRef + isSubclass bool } func (this *QXmlStreamStringRef) cPointer() *C.QXmlStreamStringRef { @@ -65,6 +66,7 @@ func (this *QXmlStreamStringRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamStringRef constructs the type using only CGO pointers. func newQXmlStreamStringRef(h *C.QXmlStreamStringRef) *QXmlStreamStringRef { if h == nil { return nil @@ -72,14 +74,23 @@ func newQXmlStreamStringRef(h *C.QXmlStreamStringRef) *QXmlStreamStringRef { return &QXmlStreamStringRef{h: h} } +// UnsafeNewQXmlStreamStringRef constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamStringRef(h unsafe.Pointer) *QXmlStreamStringRef { - return newQXmlStreamStringRef((*C.QXmlStreamStringRef)(h)) + if h == nil { + return nil + } + + return &QXmlStreamStringRef{h: (*C.QXmlStreamStringRef)(h)} } // NewQXmlStreamStringRef constructs a new QXmlStreamStringRef object. func NewQXmlStreamStringRef() *QXmlStreamStringRef { - ret := C.QXmlStreamStringRef_new() - return newQXmlStreamStringRef(ret) + var outptr_QXmlStreamStringRef *C.QXmlStreamStringRef = nil + + C.QXmlStreamStringRef_new(&outptr_QXmlStreamStringRef) + ret := newQXmlStreamStringRef(outptr_QXmlStreamStringRef) + ret.isSubclass = true + return ret } // NewQXmlStreamStringRef2 constructs a new QXmlStreamStringRef object. @@ -88,14 +99,22 @@ func NewQXmlStreamStringRef2(aString string) *QXmlStreamStringRef { aString_ms.data = C.CString(aString) aString_ms.len = C.size_t(len(aString)) defer C.free(unsafe.Pointer(aString_ms.data)) - ret := C.QXmlStreamStringRef_new2(aString_ms) - return newQXmlStreamStringRef(ret) + var outptr_QXmlStreamStringRef *C.QXmlStreamStringRef = nil + + C.QXmlStreamStringRef_new2(aString_ms, &outptr_QXmlStreamStringRef) + ret := newQXmlStreamStringRef(outptr_QXmlStreamStringRef) + ret.isSubclass = true + return ret } // NewQXmlStreamStringRef3 constructs a new QXmlStreamStringRef object. func NewQXmlStreamStringRef3(other *QXmlStreamStringRef) *QXmlStreamStringRef { - ret := C.QXmlStreamStringRef_new3(other.cPointer()) - return newQXmlStreamStringRef(ret) + var outptr_QXmlStreamStringRef *C.QXmlStreamStringRef = nil + + C.QXmlStreamStringRef_new3(other.cPointer(), &outptr_QXmlStreamStringRef) + ret := newQXmlStreamStringRef(outptr_QXmlStreamStringRef) + ret.isSubclass = true + return ret } func (this *QXmlStreamStringRef) OperatorAssign(other *QXmlStreamStringRef) { @@ -127,7 +146,7 @@ func (this *QXmlStreamStringRef) Size() int { // Delete this object from C++ memory. func (this *QXmlStreamStringRef) Delete() { - C.QXmlStreamStringRef_Delete(this.h) + C.QXmlStreamStringRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -140,7 +159,8 @@ func (this *QXmlStreamStringRef) GoGC() { } type QXmlStreamAttribute struct { - h *C.QXmlStreamAttribute + h *C.QXmlStreamAttribute + isSubclass bool } func (this *QXmlStreamAttribute) cPointer() *C.QXmlStreamAttribute { @@ -157,6 +177,7 @@ func (this *QXmlStreamAttribute) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamAttribute constructs the type using only CGO pointers. func newQXmlStreamAttribute(h *C.QXmlStreamAttribute) *QXmlStreamAttribute { if h == nil { return nil @@ -164,14 +185,23 @@ func newQXmlStreamAttribute(h *C.QXmlStreamAttribute) *QXmlStreamAttribute { return &QXmlStreamAttribute{h: h} } +// UnsafeNewQXmlStreamAttribute constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamAttribute(h unsafe.Pointer) *QXmlStreamAttribute { - return newQXmlStreamAttribute((*C.QXmlStreamAttribute)(h)) + if h == nil { + return nil + } + + return &QXmlStreamAttribute{h: (*C.QXmlStreamAttribute)(h)} } // NewQXmlStreamAttribute constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute() *QXmlStreamAttribute { - ret := C.QXmlStreamAttribute_new() - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new(&outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } // NewQXmlStreamAttribute2 constructs a new QXmlStreamAttribute object. @@ -184,8 +214,12 @@ func NewQXmlStreamAttribute2(qualifiedName string, value string) *QXmlStreamAttr value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - ret := C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms) - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms, &outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } // NewQXmlStreamAttribute3 constructs a new QXmlStreamAttribute object. @@ -202,14 +236,22 @@ func NewQXmlStreamAttribute3(namespaceUri string, name string, value string) *QX value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - ret := C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms) - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms, &outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } // NewQXmlStreamAttribute4 constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute4(param1 *QXmlStreamAttribute) *QXmlStreamAttribute { - ret := C.QXmlStreamAttribute_new4(param1.cPointer()) - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new4(param1.cPointer(), &outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } func (this *QXmlStreamAttribute) OperatorAssign(param1 *QXmlStreamAttribute) { @@ -230,7 +272,7 @@ func (this *QXmlStreamAttribute) OperatorNotEqual(other *QXmlStreamAttribute) bo // Delete this object from C++ memory. func (this *QXmlStreamAttribute) Delete() { - C.QXmlStreamAttribute_Delete(this.h) + C.QXmlStreamAttribute_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -243,7 +285,8 @@ func (this *QXmlStreamAttribute) GoGC() { } type QXmlStreamNamespaceDeclaration struct { - h *C.QXmlStreamNamespaceDeclaration + h *C.QXmlStreamNamespaceDeclaration + isSubclass bool } func (this *QXmlStreamNamespaceDeclaration) cPointer() *C.QXmlStreamNamespaceDeclaration { @@ -260,6 +303,7 @@ func (this *QXmlStreamNamespaceDeclaration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamNamespaceDeclaration constructs the type using only CGO pointers. func newQXmlStreamNamespaceDeclaration(h *C.QXmlStreamNamespaceDeclaration) *QXmlStreamNamespaceDeclaration { if h == nil { return nil @@ -267,14 +311,23 @@ func newQXmlStreamNamespaceDeclaration(h *C.QXmlStreamNamespaceDeclaration) *QXm return &QXmlStreamNamespaceDeclaration{h: h} } +// UnsafeNewQXmlStreamNamespaceDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNamespaceDeclaration(h unsafe.Pointer) *QXmlStreamNamespaceDeclaration { - return newQXmlStreamNamespaceDeclaration((*C.QXmlStreamNamespaceDeclaration)(h)) + if h == nil { + return nil + } + + return &QXmlStreamNamespaceDeclaration{h: (*C.QXmlStreamNamespaceDeclaration)(h)} } // NewQXmlStreamNamespaceDeclaration constructs a new QXmlStreamNamespaceDeclaration object. func NewQXmlStreamNamespaceDeclaration() *QXmlStreamNamespaceDeclaration { - ret := C.QXmlStreamNamespaceDeclaration_new() - return newQXmlStreamNamespaceDeclaration(ret) + var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil + + C.QXmlStreamNamespaceDeclaration_new(&outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret.isSubclass = true + return ret } // NewQXmlStreamNamespaceDeclaration2 constructs a new QXmlStreamNamespaceDeclaration object. @@ -287,14 +340,22 @@ func NewQXmlStreamNamespaceDeclaration2(prefix string, namespaceUri string) *QXm namespaceUri_ms.data = C.CString(namespaceUri) namespaceUri_ms.len = C.size_t(len(namespaceUri)) defer C.free(unsafe.Pointer(namespaceUri_ms.data)) - ret := C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms) - return newQXmlStreamNamespaceDeclaration(ret) + var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil + + C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms, &outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret.isSubclass = true + return ret } // NewQXmlStreamNamespaceDeclaration3 constructs a new QXmlStreamNamespaceDeclaration object. func NewQXmlStreamNamespaceDeclaration3(param1 *QXmlStreamNamespaceDeclaration) *QXmlStreamNamespaceDeclaration { - ret := C.QXmlStreamNamespaceDeclaration_new3(param1.cPointer()) - return newQXmlStreamNamespaceDeclaration(ret) + var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil + + C.QXmlStreamNamespaceDeclaration_new3(param1.cPointer(), &outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret.isSubclass = true + return ret } func (this *QXmlStreamNamespaceDeclaration) OperatorAssign(param1 *QXmlStreamNamespaceDeclaration) { @@ -311,7 +372,7 @@ func (this *QXmlStreamNamespaceDeclaration) OperatorNotEqual(other *QXmlStreamNa // Delete this object from C++ memory. func (this *QXmlStreamNamespaceDeclaration) Delete() { - C.QXmlStreamNamespaceDeclaration_Delete(this.h) + C.QXmlStreamNamespaceDeclaration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -324,7 +385,8 @@ func (this *QXmlStreamNamespaceDeclaration) GoGC() { } type QXmlStreamNotationDeclaration struct { - h *C.QXmlStreamNotationDeclaration + h *C.QXmlStreamNotationDeclaration + isSubclass bool } func (this *QXmlStreamNotationDeclaration) cPointer() *C.QXmlStreamNotationDeclaration { @@ -341,6 +403,7 @@ func (this *QXmlStreamNotationDeclaration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamNotationDeclaration constructs the type using only CGO pointers. func newQXmlStreamNotationDeclaration(h *C.QXmlStreamNotationDeclaration) *QXmlStreamNotationDeclaration { if h == nil { return nil @@ -348,20 +411,33 @@ func newQXmlStreamNotationDeclaration(h *C.QXmlStreamNotationDeclaration) *QXmlS return &QXmlStreamNotationDeclaration{h: h} } +// UnsafeNewQXmlStreamNotationDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNotationDeclaration(h unsafe.Pointer) *QXmlStreamNotationDeclaration { - return newQXmlStreamNotationDeclaration((*C.QXmlStreamNotationDeclaration)(h)) + if h == nil { + return nil + } + + return &QXmlStreamNotationDeclaration{h: (*C.QXmlStreamNotationDeclaration)(h)} } // NewQXmlStreamNotationDeclaration constructs a new QXmlStreamNotationDeclaration object. func NewQXmlStreamNotationDeclaration() *QXmlStreamNotationDeclaration { - ret := C.QXmlStreamNotationDeclaration_new() - return newQXmlStreamNotationDeclaration(ret) + var outptr_QXmlStreamNotationDeclaration *C.QXmlStreamNotationDeclaration = nil + + C.QXmlStreamNotationDeclaration_new(&outptr_QXmlStreamNotationDeclaration) + ret := newQXmlStreamNotationDeclaration(outptr_QXmlStreamNotationDeclaration) + ret.isSubclass = true + return ret } // NewQXmlStreamNotationDeclaration2 constructs a new QXmlStreamNotationDeclaration object. func NewQXmlStreamNotationDeclaration2(param1 *QXmlStreamNotationDeclaration) *QXmlStreamNotationDeclaration { - ret := C.QXmlStreamNotationDeclaration_new2(param1.cPointer()) - return newQXmlStreamNotationDeclaration(ret) + var outptr_QXmlStreamNotationDeclaration *C.QXmlStreamNotationDeclaration = nil + + C.QXmlStreamNotationDeclaration_new2(param1.cPointer(), &outptr_QXmlStreamNotationDeclaration) + ret := newQXmlStreamNotationDeclaration(outptr_QXmlStreamNotationDeclaration) + ret.isSubclass = true + return ret } func (this *QXmlStreamNotationDeclaration) OperatorAssign(param1 *QXmlStreamNotationDeclaration) { @@ -378,7 +454,7 @@ func (this *QXmlStreamNotationDeclaration) OperatorNotEqual(other *QXmlStreamNot // Delete this object from C++ memory. func (this *QXmlStreamNotationDeclaration) Delete() { - C.QXmlStreamNotationDeclaration_Delete(this.h) + C.QXmlStreamNotationDeclaration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -391,7 +467,8 @@ func (this *QXmlStreamNotationDeclaration) GoGC() { } type QXmlStreamEntityDeclaration struct { - h *C.QXmlStreamEntityDeclaration + h *C.QXmlStreamEntityDeclaration + isSubclass bool } func (this *QXmlStreamEntityDeclaration) cPointer() *C.QXmlStreamEntityDeclaration { @@ -408,6 +485,7 @@ func (this *QXmlStreamEntityDeclaration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamEntityDeclaration constructs the type using only CGO pointers. func newQXmlStreamEntityDeclaration(h *C.QXmlStreamEntityDeclaration) *QXmlStreamEntityDeclaration { if h == nil { return nil @@ -415,20 +493,33 @@ func newQXmlStreamEntityDeclaration(h *C.QXmlStreamEntityDeclaration) *QXmlStrea return &QXmlStreamEntityDeclaration{h: h} } +// UnsafeNewQXmlStreamEntityDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityDeclaration(h unsafe.Pointer) *QXmlStreamEntityDeclaration { - return newQXmlStreamEntityDeclaration((*C.QXmlStreamEntityDeclaration)(h)) + if h == nil { + return nil + } + + return &QXmlStreamEntityDeclaration{h: (*C.QXmlStreamEntityDeclaration)(h)} } // NewQXmlStreamEntityDeclaration constructs a new QXmlStreamEntityDeclaration object. func NewQXmlStreamEntityDeclaration() *QXmlStreamEntityDeclaration { - ret := C.QXmlStreamEntityDeclaration_new() - return newQXmlStreamEntityDeclaration(ret) + var outptr_QXmlStreamEntityDeclaration *C.QXmlStreamEntityDeclaration = nil + + C.QXmlStreamEntityDeclaration_new(&outptr_QXmlStreamEntityDeclaration) + ret := newQXmlStreamEntityDeclaration(outptr_QXmlStreamEntityDeclaration) + ret.isSubclass = true + return ret } // NewQXmlStreamEntityDeclaration2 constructs a new QXmlStreamEntityDeclaration object. func NewQXmlStreamEntityDeclaration2(param1 *QXmlStreamEntityDeclaration) *QXmlStreamEntityDeclaration { - ret := C.QXmlStreamEntityDeclaration_new2(param1.cPointer()) - return newQXmlStreamEntityDeclaration(ret) + var outptr_QXmlStreamEntityDeclaration *C.QXmlStreamEntityDeclaration = nil + + C.QXmlStreamEntityDeclaration_new2(param1.cPointer(), &outptr_QXmlStreamEntityDeclaration) + ret := newQXmlStreamEntityDeclaration(outptr_QXmlStreamEntityDeclaration) + ret.isSubclass = true + return ret } func (this *QXmlStreamEntityDeclaration) OperatorAssign(param1 *QXmlStreamEntityDeclaration) { @@ -445,7 +536,7 @@ func (this *QXmlStreamEntityDeclaration) OperatorNotEqual(other *QXmlStreamEntit // Delete this object from C++ memory. func (this *QXmlStreamEntityDeclaration) Delete() { - C.QXmlStreamEntityDeclaration_Delete(this.h) + C.QXmlStreamEntityDeclaration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -458,7 +549,8 @@ func (this *QXmlStreamEntityDeclaration) GoGC() { } type QXmlStreamEntityResolver struct { - h *C.QXmlStreamEntityResolver + h *C.QXmlStreamEntityResolver + isSubclass bool } func (this *QXmlStreamEntityResolver) cPointer() *C.QXmlStreamEntityResolver { @@ -475,6 +567,7 @@ func (this *QXmlStreamEntityResolver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamEntityResolver constructs the type using only CGO pointers. func newQXmlStreamEntityResolver(h *C.QXmlStreamEntityResolver) *QXmlStreamEntityResolver { if h == nil { return nil @@ -482,8 +575,13 @@ func newQXmlStreamEntityResolver(h *C.QXmlStreamEntityResolver) *QXmlStreamEntit return &QXmlStreamEntityResolver{h: h} } +// UnsafeNewQXmlStreamEntityResolver constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityResolver(h unsafe.Pointer) *QXmlStreamEntityResolver { - return newQXmlStreamEntityResolver((*C.QXmlStreamEntityResolver)(h)) + if h == nil { + return nil + } + + return &QXmlStreamEntityResolver{h: (*C.QXmlStreamEntityResolver)(h)} } func (this *QXmlStreamEntityResolver) ResolveEntity(publicId string, systemId string) string { @@ -518,7 +616,7 @@ func (this *QXmlStreamEntityResolver) OperatorAssign(param1 *QXmlStreamEntityRes // Delete this object from C++ memory. func (this *QXmlStreamEntityResolver) Delete() { - C.QXmlStreamEntityResolver_Delete(this.h) + C.QXmlStreamEntityResolver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -531,7 +629,8 @@ func (this *QXmlStreamEntityResolver) GoGC() { } type QXmlStreamReader struct { - h *C.QXmlStreamReader + h *C.QXmlStreamReader + isSubclass bool } func (this *QXmlStreamReader) cPointer() *C.QXmlStreamReader { @@ -548,6 +647,7 @@ func (this *QXmlStreamReader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamReader constructs the type using only CGO pointers. func newQXmlStreamReader(h *C.QXmlStreamReader) *QXmlStreamReader { if h == nil { return nil @@ -555,20 +655,33 @@ func newQXmlStreamReader(h *C.QXmlStreamReader) *QXmlStreamReader { return &QXmlStreamReader{h: h} } +// UnsafeNewQXmlStreamReader constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamReader(h unsafe.Pointer) *QXmlStreamReader { - return newQXmlStreamReader((*C.QXmlStreamReader)(h)) + if h == nil { + return nil + } + + return &QXmlStreamReader{h: (*C.QXmlStreamReader)(h)} } // NewQXmlStreamReader constructs a new QXmlStreamReader object. func NewQXmlStreamReader() *QXmlStreamReader { - ret := C.QXmlStreamReader_new() - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new(&outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader2 constructs a new QXmlStreamReader object. func NewQXmlStreamReader2(device *QIODevice) *QXmlStreamReader { - ret := C.QXmlStreamReader_new2(device.cPointer()) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new2(device.cPointer(), &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader3 constructs a new QXmlStreamReader object. @@ -576,8 +689,12 @@ func NewQXmlStreamReader3(data []byte) *QXmlStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QXmlStreamReader_new3(data_alias) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new3(data_alias, &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader4 constructs a new QXmlStreamReader object. @@ -586,16 +703,24 @@ func NewQXmlStreamReader4(data string) *QXmlStreamReader { data_ms.data = C.CString(data) data_ms.len = C.size_t(len(data)) defer C.free(unsafe.Pointer(data_ms.data)) - ret := C.QXmlStreamReader_new4(data_ms) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new4(data_ms, &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader5 constructs a new QXmlStreamReader object. func NewQXmlStreamReader5(data string) *QXmlStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - ret := C.QXmlStreamReader_new5(data_Cstring) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new5(data_Cstring, &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } func (this *QXmlStreamReader) SetDevice(device *QIODevice) { @@ -603,7 +728,7 @@ func (this *QXmlStreamReader) SetDevice(device *QIODevice) { } func (this *QXmlStreamReader) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamReader_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamReader_Device(this.h)), nil) } func (this *QXmlStreamReader) AddData(data []byte) { @@ -838,7 +963,7 @@ func (this *QXmlStreamReader) RaiseError1(message string) { // Delete this object from C++ memory. func (this *QXmlStreamReader) Delete() { - C.QXmlStreamReader_Delete(this.h) + C.QXmlStreamReader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -851,7 +976,8 @@ func (this *QXmlStreamReader) GoGC() { } type QXmlStreamWriter struct { - h *C.QXmlStreamWriter + h *C.QXmlStreamWriter + isSubclass bool } func (this *QXmlStreamWriter) cPointer() *C.QXmlStreamWriter { @@ -868,6 +994,7 @@ func (this *QXmlStreamWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamWriter constructs the type using only CGO pointers. func newQXmlStreamWriter(h *C.QXmlStreamWriter) *QXmlStreamWriter { if h == nil { return nil @@ -875,20 +1002,33 @@ func newQXmlStreamWriter(h *C.QXmlStreamWriter) *QXmlStreamWriter { return &QXmlStreamWriter{h: h} } +// UnsafeNewQXmlStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamWriter(h unsafe.Pointer) *QXmlStreamWriter { - return newQXmlStreamWriter((*C.QXmlStreamWriter)(h)) + if h == nil { + return nil + } + + return &QXmlStreamWriter{h: (*C.QXmlStreamWriter)(h)} } // NewQXmlStreamWriter constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter() *QXmlStreamWriter { - ret := C.QXmlStreamWriter_new() - return newQXmlStreamWriter(ret) + var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil + + C.QXmlStreamWriter_new(&outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret.isSubclass = true + return ret } // NewQXmlStreamWriter2 constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter2(device *QIODevice) *QXmlStreamWriter { - ret := C.QXmlStreamWriter_new2(device.cPointer()) - return newQXmlStreamWriter(ret) + var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil + + C.QXmlStreamWriter_new2(device.cPointer(), &outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret.isSubclass = true + return ret } func (this *QXmlStreamWriter) SetDevice(device *QIODevice) { @@ -896,7 +1036,7 @@ func (this *QXmlStreamWriter) SetDevice(device *QIODevice) { } func (this *QXmlStreamWriter) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamWriter_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamWriter_Device(this.h)), nil) } func (this *QXmlStreamWriter) SetCodec(codec *QTextCodec) { @@ -1155,7 +1295,7 @@ func (this *QXmlStreamWriter) WriteProcessingInstruction2(target string, data st // Delete this object from C++ memory. func (this *QXmlStreamWriter) Delete() { - C.QXmlStreamWriter_Delete(this.h) + C.QXmlStreamWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/gen_qxmlstream.h b/qt/gen_qxmlstream.h index 5df522d7..0fe5fd1d 100644 --- a/qt/gen_qxmlstream.h +++ b/qt/gen_qxmlstream.h @@ -40,59 +40,59 @@ typedef struct QXmlStreamStringRef QXmlStreamStringRef; typedef struct QXmlStreamWriter QXmlStreamWriter; #endif -QXmlStreamStringRef* QXmlStreamStringRef_new(); -QXmlStreamStringRef* QXmlStreamStringRef_new2(struct miqt_string aString); -QXmlStreamStringRef* QXmlStreamStringRef_new3(QXmlStreamStringRef* other); +void QXmlStreamStringRef_new(QXmlStreamStringRef** outptr_QXmlStreamStringRef); +void QXmlStreamStringRef_new2(struct miqt_string aString, QXmlStreamStringRef** outptr_QXmlStreamStringRef); +void QXmlStreamStringRef_new3(QXmlStreamStringRef* other, QXmlStreamStringRef** outptr_QXmlStreamStringRef); void QXmlStreamStringRef_OperatorAssign(QXmlStreamStringRef* self, QXmlStreamStringRef* other); void QXmlStreamStringRef_Swap(QXmlStreamStringRef* self, QXmlStreamStringRef* other); void QXmlStreamStringRef_Clear(QXmlStreamStringRef* self); struct miqt_string QXmlStreamStringRef_String(const QXmlStreamStringRef* self); int QXmlStreamStringRef_Position(const QXmlStreamStringRef* self); int QXmlStreamStringRef_Size(const QXmlStreamStringRef* self); -void QXmlStreamStringRef_Delete(QXmlStreamStringRef* self); +void QXmlStreamStringRef_Delete(QXmlStreamStringRef* self, bool isSubclass); -QXmlStreamAttribute* QXmlStreamAttribute_new(); -QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value); -QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value); -QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1); +void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute); +void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); +void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); +void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute); void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAttribute* param1); bool QXmlStreamAttribute_IsDefault(const QXmlStreamAttribute* self); bool QXmlStreamAttribute_OperatorEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); bool QXmlStreamAttribute_OperatorNotEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); -void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self); +void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass); -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new(); -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri); -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1); +void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); +void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); +void QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); void QXmlStreamNamespaceDeclaration_OperatorAssign(QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* param1); bool QXmlStreamNamespaceDeclaration_OperatorEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); bool QXmlStreamNamespaceDeclaration_OperatorNotEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); -void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self); +void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, bool isSubclass); -QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new(); -QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1); +void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration); +void QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1, QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration); void QXmlStreamNotationDeclaration_OperatorAssign(QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* param1); bool QXmlStreamNotationDeclaration_OperatorEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); bool QXmlStreamNotationDeclaration_OperatorNotEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); -void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self); +void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, bool isSubclass); -QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new(); -QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1); +void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration); +void QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1, QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration); void QXmlStreamEntityDeclaration_OperatorAssign(QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* param1); bool QXmlStreamEntityDeclaration_OperatorEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); bool QXmlStreamEntityDeclaration_OperatorNotEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); -void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self); +void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self, bool isSubclass); struct miqt_string QXmlStreamEntityResolver_ResolveEntity(QXmlStreamEntityResolver* self, struct miqt_string publicId, struct miqt_string systemId); struct miqt_string QXmlStreamEntityResolver_ResolveUndeclaredEntity(QXmlStreamEntityResolver* self, struct miqt_string name); void QXmlStreamEntityResolver_OperatorAssign(QXmlStreamEntityResolver* self, QXmlStreamEntityResolver* param1); -void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self); +void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubclass); -QXmlStreamReader* QXmlStreamReader_new(); -QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device); -QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data); -QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data); -QXmlStreamReader* QXmlStreamReader_new5(const char* data); +void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader); void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device); QIODevice* QXmlStreamReader_Device(const QXmlStreamReader* self); void QXmlStreamReader_AddData(QXmlStreamReader* self, struct miqt_string data); @@ -138,10 +138,10 @@ void QXmlStreamReader_SetEntityResolver(QXmlStreamReader* self, QXmlStreamEntity QXmlStreamEntityResolver* QXmlStreamReader_EntityResolver(const QXmlStreamReader* self); struct miqt_string QXmlStreamReader_ReadElementText1(QXmlStreamReader* self, int behaviour); void QXmlStreamReader_RaiseError1(QXmlStreamReader* self, struct miqt_string message); -void QXmlStreamReader_Delete(QXmlStreamReader* self); +void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass); -QXmlStreamWriter* QXmlStreamWriter_new(); -QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device); +void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter); +void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter); void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device); QIODevice* QXmlStreamWriter_Device(const QXmlStreamWriter* self); void QXmlStreamWriter_SetCodec(QXmlStreamWriter* self, QTextCodec* codec); @@ -177,7 +177,7 @@ void QXmlStreamWriter_WriteCurrentToken(QXmlStreamWriter* self, QXmlStreamReader bool QXmlStreamWriter_HasError(const QXmlStreamWriter* self); void QXmlStreamWriter_WriteNamespace2(QXmlStreamWriter* self, struct miqt_string namespaceUri, struct miqt_string prefix); void QXmlStreamWriter_WriteProcessingInstruction2(QXmlStreamWriter* self, struct miqt_string target, struct miqt_string data); -void QXmlStreamWriter_Delete(QXmlStreamWriter* self); +void QXmlStreamWriter_Delete(QXmlStreamWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qabstractvideobuffer.cpp b/qt/multimedia/gen_qabstractvideobuffer.cpp index 2e888088..6470c03e 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.cpp +++ b/qt/multimedia/gen_qabstractvideobuffer.cpp @@ -32,8 +32,12 @@ QVariant* QAbstractVideoBuffer_Handle(const QAbstractVideoBuffer* self) { return new QVariant(self->handle()); } -void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self) { - delete self; +void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine) { @@ -41,7 +45,11 @@ unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, return static_cast(_ret); } -void QAbstractPlanarVideoBuffer_Delete(QAbstractPlanarVideoBuffer* self) { - delete self; +void QAbstractPlanarVideoBuffer_Delete(QAbstractPlanarVideoBuffer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qabstractvideobuffer.go b/qt/multimedia/gen_qabstractvideobuffer.go index 60caa35d..6d084955 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.go +++ b/qt/multimedia/gen_qabstractvideobuffer.go @@ -37,7 +37,8 @@ const ( ) type QAbstractVideoBuffer struct { - h *C.QAbstractVideoBuffer + h *C.QAbstractVideoBuffer + isSubclass bool } func (this *QAbstractVideoBuffer) cPointer() *C.QAbstractVideoBuffer { @@ -54,6 +55,7 @@ func (this *QAbstractVideoBuffer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractVideoBuffer constructs the type using only CGO pointers. func newQAbstractVideoBuffer(h *C.QAbstractVideoBuffer) *QAbstractVideoBuffer { if h == nil { return nil @@ -61,8 +63,13 @@ func newQAbstractVideoBuffer(h *C.QAbstractVideoBuffer) *QAbstractVideoBuffer { return &QAbstractVideoBuffer{h: h} } +// UnsafeNewQAbstractVideoBuffer constructs the type using only unsafe pointers. func UnsafeNewQAbstractVideoBuffer(h unsafe.Pointer) *QAbstractVideoBuffer { - return newQAbstractVideoBuffer((*C.QAbstractVideoBuffer)(h)) + if h == nil { + return nil + } + + return &QAbstractVideoBuffer{h: (*C.QAbstractVideoBuffer)(h)} } func (this *QAbstractVideoBuffer) Release() { @@ -94,7 +101,7 @@ func (this *QAbstractVideoBuffer) Handle() *qt.QVariant { // Delete this object from C++ memory. func (this *QAbstractVideoBuffer) Delete() { - C.QAbstractVideoBuffer_Delete(this.h) + C.QAbstractVideoBuffer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -107,7 +114,8 @@ func (this *QAbstractVideoBuffer) GoGC() { } type QAbstractPlanarVideoBuffer struct { - h *C.QAbstractPlanarVideoBuffer + h *C.QAbstractPlanarVideoBuffer + isSubclass bool *QAbstractVideoBuffer } @@ -125,15 +133,23 @@ func (this *QAbstractPlanarVideoBuffer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractPlanarVideoBuffer(h *C.QAbstractPlanarVideoBuffer) *QAbstractPlanarVideoBuffer { +// newQAbstractPlanarVideoBuffer constructs the type using only CGO pointers. +func newQAbstractPlanarVideoBuffer(h *C.QAbstractPlanarVideoBuffer, h_QAbstractVideoBuffer *C.QAbstractVideoBuffer) *QAbstractPlanarVideoBuffer { if h == nil { return nil } - return &QAbstractPlanarVideoBuffer{h: h, QAbstractVideoBuffer: UnsafeNewQAbstractVideoBuffer(unsafe.Pointer(h))} + return &QAbstractPlanarVideoBuffer{h: h, + QAbstractVideoBuffer: newQAbstractVideoBuffer(h_QAbstractVideoBuffer)} } -func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer) *QAbstractPlanarVideoBuffer { - return newQAbstractPlanarVideoBuffer((*C.QAbstractPlanarVideoBuffer)(h)) +// UnsafeNewQAbstractPlanarVideoBuffer constructs the type using only unsafe pointers. +func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer, h_QAbstractVideoBuffer unsafe.Pointer) *QAbstractPlanarVideoBuffer { + if h == nil { + return nil + } + + return &QAbstractPlanarVideoBuffer{h: (*C.QAbstractPlanarVideoBuffer)(h), + QAbstractVideoBuffer: UnsafeNewQAbstractVideoBuffer(h_QAbstractVideoBuffer)} } func (this *QAbstractPlanarVideoBuffer) Map(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte { @@ -142,7 +158,7 @@ func (this *QAbstractPlanarVideoBuffer) Map(mode QAbstractVideoBuffer__MapMode, // Delete this object from C++ memory. func (this *QAbstractPlanarVideoBuffer) Delete() { - C.QAbstractPlanarVideoBuffer_Delete(this.h) + C.QAbstractPlanarVideoBuffer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qabstractvideobuffer.h b/qt/multimedia/gen_qabstractvideobuffer.h index 4a056529..6478b590 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.h +++ b/qt/multimedia/gen_qabstractvideobuffer.h @@ -30,10 +30,10 @@ int QAbstractVideoBuffer_MapMode(const QAbstractVideoBuffer* self); unsigned char* QAbstractVideoBuffer_Map(QAbstractVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine); void QAbstractVideoBuffer_Unmap(QAbstractVideoBuffer* self); QVariant* QAbstractVideoBuffer_Handle(const QAbstractVideoBuffer* self); -void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self); +void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self, bool isSubclass); unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine); -void QAbstractPlanarVideoBuffer_Delete(QAbstractPlanarVideoBuffer* self); +void QAbstractPlanarVideoBuffer_Delete(QAbstractPlanarVideoBuffer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qabstractvideofilter.cpp b/qt/multimedia/gen_qabstractvideofilter.cpp index 89446849..a4c6ccca 100644 --- a/qt/multimedia/gen_qabstractvideofilter.cpp +++ b/qt/multimedia/gen_qabstractvideofilter.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -18,8 +19,12 @@ void QVideoFilterRunnable_OperatorAssign(QVideoFilterRunnable* self, QVideoFilte self->operator=(*param1); } -void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self) { - delete self; +void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractVideoFilter_MetaObject(const QAbstractVideoFilter* self) { @@ -118,7 +123,11 @@ struct miqt_string QAbstractVideoFilter_TrUtf83(const char* s, const char* c, in return _ms; } -void QAbstractVideoFilter_Delete(QAbstractVideoFilter* self) { - delete self; +void QAbstractVideoFilter_Delete(QAbstractVideoFilter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qabstractvideofilter.go b/qt/multimedia/gen_qabstractvideofilter.go index f023d7b8..9e7c5418 100644 --- a/qt/multimedia/gen_qabstractvideofilter.go +++ b/qt/multimedia/gen_qabstractvideofilter.go @@ -22,7 +22,8 @@ const ( ) type QVideoFilterRunnable struct { - h *C.QVideoFilterRunnable + h *C.QVideoFilterRunnable + isSubclass bool } func (this *QVideoFilterRunnable) cPointer() *C.QVideoFilterRunnable { @@ -39,6 +40,7 @@ func (this *QVideoFilterRunnable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoFilterRunnable constructs the type using only CGO pointers. func newQVideoFilterRunnable(h *C.QVideoFilterRunnable) *QVideoFilterRunnable { if h == nil { return nil @@ -46,8 +48,13 @@ func newQVideoFilterRunnable(h *C.QVideoFilterRunnable) *QVideoFilterRunnable { return &QVideoFilterRunnable{h: h} } +// UnsafeNewQVideoFilterRunnable constructs the type using only unsafe pointers. func UnsafeNewQVideoFilterRunnable(h unsafe.Pointer) *QVideoFilterRunnable { - return newQVideoFilterRunnable((*C.QVideoFilterRunnable)(h)) + if h == nil { + return nil + } + + return &QVideoFilterRunnable{h: (*C.QVideoFilterRunnable)(h)} } func (this *QVideoFilterRunnable) Run(input *QVideoFrame, surfaceFormat *QVideoSurfaceFormat, flags QVideoFilterRunnable__RunFlag) *QVideoFrame { @@ -63,7 +70,7 @@ func (this *QVideoFilterRunnable) OperatorAssign(param1 *QVideoFilterRunnable) { // Delete this object from C++ memory. func (this *QVideoFilterRunnable) Delete() { - C.QVideoFilterRunnable_Delete(this.h) + C.QVideoFilterRunnable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -76,7 +83,8 @@ func (this *QVideoFilterRunnable) GoGC() { } type QAbstractVideoFilter struct { - h *C.QAbstractVideoFilter + h *C.QAbstractVideoFilter + isSubclass bool *qt.QObject } @@ -94,15 +102,23 @@ func (this *QAbstractVideoFilter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractVideoFilter(h *C.QAbstractVideoFilter) *QAbstractVideoFilter { +// newQAbstractVideoFilter constructs the type using only CGO pointers. +func newQAbstractVideoFilter(h *C.QAbstractVideoFilter, h_QObject *C.QObject) *QAbstractVideoFilter { if h == nil { return nil } - return &QAbstractVideoFilter{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractVideoFilter{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractVideoFilter(h unsafe.Pointer) *QAbstractVideoFilter { - return newQAbstractVideoFilter((*C.QAbstractVideoFilter)(h)) +// UnsafeNewQAbstractVideoFilter constructs the type using only unsafe pointers. +func UnsafeNewQAbstractVideoFilter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractVideoFilter { + if h == nil { + return nil + } + + return &QAbstractVideoFilter{h: (*C.QAbstractVideoFilter)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QAbstractVideoFilter) MetaObject() *qt.QMetaObject { @@ -208,7 +224,7 @@ func QAbstractVideoFilter_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractVideoFilter) Delete() { - C.QAbstractVideoFilter_Delete(this.h) + C.QAbstractVideoFilter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qabstractvideofilter.h b/qt/multimedia/gen_qabstractvideofilter.h index 3f5ad51f..f76420b3 100644 --- a/qt/multimedia/gen_qabstractvideofilter.h +++ b/qt/multimedia/gen_qabstractvideofilter.h @@ -17,12 +17,14 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoFilter; class QMetaObject; +class QObject; class QVideoFilterRunnable; class QVideoFrame; class QVideoSurfaceFormat; #else typedef struct QAbstractVideoFilter QAbstractVideoFilter; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVideoFilterRunnable QVideoFilterRunnable; typedef struct QVideoFrame QVideoFrame; typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; @@ -30,7 +32,7 @@ typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; QVideoFrame* QVideoFilterRunnable_Run(QVideoFilterRunnable* self, QVideoFrame* input, QVideoSurfaceFormat* surfaceFormat, int flags); void QVideoFilterRunnable_OperatorAssign(QVideoFilterRunnable* self, QVideoFilterRunnable* param1); -void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self); +void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self, bool isSubclass); QMetaObject* QAbstractVideoFilter_MetaObject(const QAbstractVideoFilter* self); void* QAbstractVideoFilter_Metacast(QAbstractVideoFilter* self, const char* param1); @@ -45,7 +47,7 @@ struct miqt_string QAbstractVideoFilter_Tr2(const char* s, const char* c); struct miqt_string QAbstractVideoFilter_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractVideoFilter_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractVideoFilter_TrUtf83(const char* s, const char* c, int n); -void QAbstractVideoFilter_Delete(QAbstractVideoFilter* self); +void QAbstractVideoFilter_Delete(QAbstractVideoFilter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qabstractvideosurface.cpp b/qt/multimedia/gen_qabstractvideosurface.cpp index 93e9a116..44141759 100644 --- a/qt/multimedia/gen_qabstractvideosurface.cpp +++ b/qt/multimedia/gen_qabstractvideosurface.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -41,8 +42,8 @@ struct miqt_string QAbstractVideoSurface_TrUtf8(const char* s) { return _ms; } -struct miqt_array /* of int */ QAbstractVideoSurface_SupportedPixelFormats(const QAbstractVideoSurface* self) { - QList _ret = self->supportedPixelFormats(); +struct miqt_array /* of int */ QAbstractVideoSurface_SupportedPixelFormats(const QAbstractVideoSurface* self, int typeVal) { + QList _ret = self->supportedPixelFormats(static_cast(typeVal)); // Convert QList<> from C++ memory to manually-managed C memory int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -183,21 +184,11 @@ struct miqt_string QAbstractVideoSurface_TrUtf83(const char* s, const char* c, i return _ms; } -struct miqt_array /* of int */ QAbstractVideoSurface_SupportedPixelFormats1(const QAbstractVideoSurface* self, int typeVal) { - QList _ret = self->supportedPixelFormats(static_cast(typeVal)); - // Convert QList<> from C++ memory to manually-managed C memory - int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QVideoFrame::PixelFormat _lv_ret = _ret[i]; - _arr[i] = static_cast(_lv_ret); +void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self) { - delete self; } diff --git a/qt/multimedia/gen_qabstractvideosurface.go b/qt/multimedia/gen_qabstractvideosurface.go index 7430067f..cfa0493c 100644 --- a/qt/multimedia/gen_qabstractvideosurface.go +++ b/qt/multimedia/gen_qabstractvideosurface.go @@ -26,7 +26,8 @@ const ( ) type QAbstractVideoSurface struct { - h *C.QAbstractVideoSurface + h *C.QAbstractVideoSurface + isSubclass bool *qt.QObject } @@ -44,15 +45,23 @@ func (this *QAbstractVideoSurface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractVideoSurface(h *C.QAbstractVideoSurface) *QAbstractVideoSurface { +// newQAbstractVideoSurface constructs the type using only CGO pointers. +func newQAbstractVideoSurface(h *C.QAbstractVideoSurface, h_QObject *C.QObject) *QAbstractVideoSurface { if h == nil { return nil } - return &QAbstractVideoSurface{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractVideoSurface{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractVideoSurface(h unsafe.Pointer) *QAbstractVideoSurface { - return newQAbstractVideoSurface((*C.QAbstractVideoSurface)(h)) +// UnsafeNewQAbstractVideoSurface constructs the type using only unsafe pointers. +func UnsafeNewQAbstractVideoSurface(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractVideoSurface { + if h == nil { + return nil + } + + return &QAbstractVideoSurface{h: (*C.QAbstractVideoSurface)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QAbstractVideoSurface) MetaObject() *qt.QMetaObject { @@ -83,8 +92,8 @@ func QAbstractVideoSurface_TrUtf8(s string) string { return _ret } -func (this *QAbstractVideoSurface) SupportedPixelFormats() []QVideoFrame__PixelFormat { - var _ma C.struct_miqt_array = C.QAbstractVideoSurface_SupportedPixelFormats(this.h) +func (this *QAbstractVideoSurface) SupportedPixelFormats(typeVal QAbstractVideoBuffer__HandleType) []QVideoFrame__PixelFormat { + var _ma C.struct_miqt_array = C.QAbstractVideoSurface_SupportedPixelFormats(this.h, (C.int)(typeVal)) _ret := make([]QVideoFrame__PixelFormat, int(_ma.len)) _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -259,19 +268,9 @@ func QAbstractVideoSurface_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QAbstractVideoSurface) SupportedPixelFormats1(typeVal QAbstractVideoBuffer__HandleType) []QVideoFrame__PixelFormat { - var _ma C.struct_miqt_array = C.QAbstractVideoSurface_SupportedPixelFormats1(this.h, (C.int)(typeVal)) - _ret := make([]QVideoFrame__PixelFormat, int(_ma.len)) - _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _ret[i] = (QVideoFrame__PixelFormat)(_outCast[i]) - } - return _ret -} - // Delete this object from C++ memory. func (this *QAbstractVideoSurface) Delete() { - C.QAbstractVideoSurface_Delete(this.h) + C.QAbstractVideoSurface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qabstractvideosurface.h b/qt/multimedia/gen_qabstractvideosurface.h index 1e9f0fa3..e082260e 100644 --- a/qt/multimedia/gen_qabstractvideosurface.h +++ b/qt/multimedia/gen_qabstractvideosurface.h @@ -17,12 +17,14 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; class QMetaObject; +class QObject; class QSize; class QVideoFrame; class QVideoSurfaceFormat; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSize QSize; typedef struct QVideoFrame QVideoFrame; typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; @@ -32,7 +34,7 @@ QMetaObject* QAbstractVideoSurface_MetaObject(const QAbstractVideoSurface* self) void* QAbstractVideoSurface_Metacast(QAbstractVideoSurface* self, const char* param1); struct miqt_string QAbstractVideoSurface_Tr(const char* s); struct miqt_string QAbstractVideoSurface_TrUtf8(const char* s); -struct miqt_array /* of int */ QAbstractVideoSurface_SupportedPixelFormats(const QAbstractVideoSurface* self); +struct miqt_array /* of int */ QAbstractVideoSurface_SupportedPixelFormats(const QAbstractVideoSurface* self, int typeVal); bool QAbstractVideoSurface_IsFormatSupported(const QAbstractVideoSurface* self, QVideoSurfaceFormat* format); QVideoSurfaceFormat* QAbstractVideoSurface_NearestFormat(const QAbstractVideoSurface* self, QVideoSurfaceFormat* format); QVideoSurfaceFormat* QAbstractVideoSurface_SurfaceFormat(const QAbstractVideoSurface* self); @@ -54,8 +56,7 @@ struct miqt_string QAbstractVideoSurface_Tr2(const char* s, const char* c); struct miqt_string QAbstractVideoSurface_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractVideoSurface_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractVideoSurface_TrUtf83(const char* s, const char* c, int n); -struct miqt_array /* of int */ QAbstractVideoSurface_SupportedPixelFormats1(const QAbstractVideoSurface* self, int typeVal); -void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self); +void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiobuffer.cpp b/qt/multimedia/gen_qaudiobuffer.cpp index 37fcf103..075a6cb5 100644 --- a/qt/multimedia/gen_qaudiobuffer.cpp +++ b/qt/multimedia/gen_qaudiobuffer.cpp @@ -5,30 +5,36 @@ #include "gen_qaudiobuffer.h" #include "_cgo_export.h" -QAudioBuffer* QAudioBuffer_new() { - return new QAudioBuffer(); +void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other) { - return new QAudioBuffer(*other); +void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(*other); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format) { +void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { QByteArray data_QByteArray(data.data, data.len); - return new QAudioBuffer(data_QByteArray, *format); + QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format) { - return new QAudioBuffer(static_cast(numFrames), *format); +void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime) { +void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { QByteArray data_QByteArray(data.data, data.len); - return new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); + QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime) { - return new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); +void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); + *outptr_QAudioBuffer = ret; } void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other) { @@ -77,7 +83,11 @@ void* QAudioBuffer_Data2(QAudioBuffer* self) { return self->data(); } -void QAudioBuffer_Delete(QAudioBuffer* self) { - delete self; +void QAudioBuffer_Delete(QAudioBuffer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiobuffer.go b/qt/multimedia/gen_qaudiobuffer.go index 7e88ce15..91cbbe18 100644 --- a/qt/multimedia/gen_qaudiobuffer.go +++ b/qt/multimedia/gen_qaudiobuffer.go @@ -14,7 +14,8 @@ import ( ) type QAudioBuffer struct { - h *C.QAudioBuffer + h *C.QAudioBuffer + isSubclass bool } func (this *QAudioBuffer) cPointer() *C.QAudioBuffer { @@ -31,6 +32,7 @@ func (this *QAudioBuffer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioBuffer constructs the type using only CGO pointers. func newQAudioBuffer(h *C.QAudioBuffer) *QAudioBuffer { if h == nil { return nil @@ -38,20 +40,33 @@ func newQAudioBuffer(h *C.QAudioBuffer) *QAudioBuffer { return &QAudioBuffer{h: h} } +// UnsafeNewQAudioBuffer constructs the type using only unsafe pointers. func UnsafeNewQAudioBuffer(h unsafe.Pointer) *QAudioBuffer { - return newQAudioBuffer((*C.QAudioBuffer)(h)) + if h == nil { + return nil + } + + return &QAudioBuffer{h: (*C.QAudioBuffer)(h)} } // NewQAudioBuffer constructs a new QAudioBuffer object. func NewQAudioBuffer() *QAudioBuffer { - ret := C.QAudioBuffer_new() - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new(&outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer2 constructs a new QAudioBuffer object. func NewQAudioBuffer2(other *QAudioBuffer) *QAudioBuffer { - ret := C.QAudioBuffer_new2(other.cPointer()) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new2(other.cPointer(), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer3 constructs a new QAudioBuffer object. @@ -59,14 +74,22 @@ func NewQAudioBuffer3(data []byte, format *QAudioFormat) *QAudioBuffer { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QAudioBuffer_new3(data_alias, format.cPointer()) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new3(data_alias, format.cPointer(), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer4 constructs a new QAudioBuffer object. func NewQAudioBuffer4(numFrames int, format *QAudioFormat) *QAudioBuffer { - ret := C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer()) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer(), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer5 constructs a new QAudioBuffer object. @@ -74,14 +97,22 @@ func NewQAudioBuffer5(data []byte, format *QAudioFormat, startTime int64) *QAudi data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime)) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer6 constructs a new QAudioBuffer object. func NewQAudioBuffer6(numFrames int, format *QAudioFormat, startTime int64) *QAudioBuffer { - ret := C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime)) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } func (this *QAudioBuffer) OperatorAssign(other *QAudioBuffer) { @@ -133,7 +164,7 @@ func (this *QAudioBuffer) Data2() unsafe.Pointer { // Delete this object from C++ memory. func (this *QAudioBuffer) Delete() { - C.QAudioBuffer_Delete(this.h) + C.QAudioBuffer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiobuffer.h b/qt/multimedia/gen_qaudiobuffer.h index f8f914a7..a88daa5f 100644 --- a/qt/multimedia/gen_qaudiobuffer.h +++ b/qt/multimedia/gen_qaudiobuffer.h @@ -24,12 +24,12 @@ typedef struct QAudioFormat QAudioFormat; typedef struct QByteArray QByteArray; #endif -QAudioBuffer* QAudioBuffer_new(); -QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other); -QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format); -QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format); -QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime); -QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime); +void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other); bool QAudioBuffer_IsValid(const QAudioBuffer* self); QAudioFormat* QAudioBuffer_Format(const QAudioBuffer* self); @@ -41,7 +41,7 @@ long long QAudioBuffer_StartTime(const QAudioBuffer* self); const void* QAudioBuffer_ConstData(const QAudioBuffer* self); const void* QAudioBuffer_Data(const QAudioBuffer* self); void* QAudioBuffer_Data2(QAudioBuffer* self); -void QAudioBuffer_Delete(QAudioBuffer* self); +void QAudioBuffer_Delete(QAudioBuffer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiodecoder.cpp b/qt/multimedia/gen_qaudiodecoder.cpp index f7cc9870..cdbb8e3b 100644 --- a/qt/multimedia/gen_qaudiodecoder.cpp +++ b/qt/multimedia/gen_qaudiodecoder.cpp @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include #include #include @@ -12,12 +14,142 @@ #include "gen_qaudiodecoder.h" #include "_cgo_export.h" -QAudioDecoder* QAudioDecoder_new() { - return new QAudioDecoder(); +class MiqtVirtualQAudioDecoder : public virtual QAudioDecoder { +public: + + MiqtVirtualQAudioDecoder(): QAudioDecoder() {}; + MiqtVirtualQAudioDecoder(QObject* parent): QAudioDecoder(parent) {}; + + virtual ~MiqtVirtualQAudioDecoder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(QObject* param1) override { + if (handle__Bind == 0) { + return QAudioDecoder::bind(param1); + } + + QObject* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAudioDecoder_Bind(this, handle__Bind, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QObject* param1) { + + return QAudioDecoder::bind(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unbind = 0; + + // Subclass to allow providing a Go implementation + virtual void unbind(QObject* param1) override { + if (handle__Unbind == 0) { + QAudioDecoder::unbind(param1); + return; + } + + QObject* sigval1 = param1; + + miqt_exec_callback_QAudioDecoder_Unbind(this, handle__Unbind, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unbind(QObject* param1) { + + QAudioDecoder::unbind(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual bool isAvailable() const override { + if (handle__IsAvailable == 0) { + return QAudioDecoder::isAvailable(); + } + + + bool callback_return_value = miqt_exec_callback_QAudioDecoder_IsAvailable(const_cast(this), handle__IsAvailable); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsAvailable() const { + + return QAudioDecoder::isAvailable(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Availability = 0; + + // Subclass to allow providing a Go implementation + virtual QMultimedia::AvailabilityStatus availability() const override { + if (handle__Availability == 0) { + return QAudioDecoder::availability(); + } + + + int callback_return_value = miqt_exec_callback_QAudioDecoder_Availability(const_cast(this), handle__Availability); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Availability() const { + + QMultimedia::AvailabilityStatus _ret = QAudioDecoder::availability(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Service = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaService* service() const override { + if (handle__Service == 0) { + return QAudioDecoder::service(); + } + + + QMediaService* callback_return_value = miqt_exec_callback_QAudioDecoder_Service(const_cast(this), handle__Service); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaService* virtualbase_Service() const { + + return QAudioDecoder::service(); + + } + +}; + +void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(); + *outptr_QAudioDecoder = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QAudioDecoder* QAudioDecoder_new2(QObject* parent) { - return new QAudioDecoder(parent); +void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(parent); + *outptr_QAudioDecoder = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self) { @@ -140,7 +272,7 @@ void QAudioDecoder_BufferAvailableChanged(QAudioDecoder* self, bool param1) { } void QAudioDecoder_connect_BufferAvailableChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferAvailableChanged), self, [=](bool param1) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferAvailableChanged), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QAudioDecoder_BufferAvailableChanged(slot, sigval1); }); @@ -151,7 +283,7 @@ void QAudioDecoder_BufferReady(QAudioDecoder* self) { } void QAudioDecoder_connect_BufferReady(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferReady), self, [=]() { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferReady), self, [=]() { miqt_exec_callback_QAudioDecoder_BufferReady(slot); }); } @@ -161,7 +293,7 @@ void QAudioDecoder_Finished(QAudioDecoder* self) { } void QAudioDecoder_connect_Finished(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::finished), self, [=]() { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::finished), self, [=]() { miqt_exec_callback_QAudioDecoder_Finished(slot); }); } @@ -171,7 +303,7 @@ void QAudioDecoder_StateChanged(QAudioDecoder* self, int newState) { } void QAudioDecoder_connect_StateChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::stateChanged), self, [=](QAudioDecoder::State newState) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::stateChanged), self, [=](QAudioDecoder::State newState) { QAudioDecoder::State newState_ret = newState; int sigval1 = static_cast(newState_ret); miqt_exec_callback_QAudioDecoder_StateChanged(slot, sigval1); @@ -183,7 +315,7 @@ void QAudioDecoder_FormatChanged(QAudioDecoder* self, QAudioFormat* format) { } void QAudioDecoder_connect_FormatChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::formatChanged), self, [=](const QAudioFormat& format) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::formatChanged), self, [=](const QAudioFormat& format) { const QAudioFormat& format_ret = format; // Cast returned reference into pointer QAudioFormat* sigval1 = const_cast(&format_ret); @@ -196,7 +328,7 @@ void QAudioDecoder_ErrorWithError(QAudioDecoder* self, int error) { } void QAudioDecoder_connect_ErrorWithError(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::error), self, [=](QAudioDecoder::Error error) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::error), self, [=](QAudioDecoder::Error error) { QAudioDecoder::Error error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QAudioDecoder_ErrorWithError(slot, sigval1); @@ -208,7 +340,7 @@ void QAudioDecoder_SourceChanged(QAudioDecoder* self) { } void QAudioDecoder_connect_SourceChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::sourceChanged), self, [=]() { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::sourceChanged), self, [=]() { miqt_exec_callback_QAudioDecoder_SourceChanged(slot); }); } @@ -218,7 +350,7 @@ void QAudioDecoder_PositionChanged(QAudioDecoder* self, long long position) { } void QAudioDecoder_connect_PositionChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::positionChanged), self, [=](qint64 position) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::positionChanged), self, [=](qint64 position) { qint64 position_ret = position; long long sigval1 = static_cast(position_ret); miqt_exec_callback_QAudioDecoder_PositionChanged(slot, sigval1); @@ -230,7 +362,7 @@ void QAudioDecoder_DurationChanged(QAudioDecoder* self, long long duration) { } void QAudioDecoder_connect_DurationChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::durationChanged), self, [=](qint64 duration) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::durationChanged), self, [=](qint64 duration) { qint64 duration_ret = duration; long long sigval1 = static_cast(duration_ret); miqt_exec_callback_QAudioDecoder_DurationChanged(slot, sigval1); @@ -302,7 +434,51 @@ int QAudioDecoder_HasSupport2(struct miqt_string mimeType, struct miqt_array /* return static_cast(_ret); } -void QAudioDecoder_Delete(QAudioDecoder* self) { - delete self; +void QAudioDecoder_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__Bind = slot; +} + +bool QAudioDecoder_virtualbase_Bind(void* self, QObject* param1) { + return ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_Bind(param1); +} + +void QAudioDecoder_override_virtual_Unbind(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__Unbind = slot; +} + +void QAudioDecoder_virtualbase_Unbind(void* self, QObject* param1) { + ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_Unbind(param1); +} + +void QAudioDecoder_override_virtual_IsAvailable(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__IsAvailable = slot; +} + +bool QAudioDecoder_virtualbase_IsAvailable(const void* self) { + return ( (const MiqtVirtualQAudioDecoder*)(self) )->virtualbase_IsAvailable(); +} + +void QAudioDecoder_override_virtual_Availability(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__Availability = slot; +} + +int QAudioDecoder_virtualbase_Availability(const void* self) { + return ( (const MiqtVirtualQAudioDecoder*)(self) )->virtualbase_Availability(); +} + +void QAudioDecoder_override_virtual_Service(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__Service = slot; +} + +QMediaService* QAudioDecoder_virtualbase_Service(const void* self) { + return ( (const MiqtVirtualQAudioDecoder*)(self) )->virtualbase_Service(); +} + +void QAudioDecoder_Delete(QAudioDecoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiodecoder.go b/qt/multimedia/gen_qaudiodecoder.go index 11d5d148..9c08b389 100644 --- a/qt/multimedia/gen_qaudiodecoder.go +++ b/qt/multimedia/gen_qaudiodecoder.go @@ -33,7 +33,8 @@ const ( ) type QAudioDecoder struct { - h *C.QAudioDecoder + h *C.QAudioDecoder + isSubclass bool *QMediaObject } @@ -51,27 +52,47 @@ func (this *QAudioDecoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioDecoder(h *C.QAudioDecoder) *QAudioDecoder { +// newQAudioDecoder constructs the type using only CGO pointers. +func newQAudioDecoder(h *C.QAudioDecoder, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QAudioDecoder { if h == nil { return nil } - return &QAudioDecoder{h: h, QMediaObject: UnsafeNewQMediaObject(unsafe.Pointer(h))} + return &QAudioDecoder{h: h, + QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} } -func UnsafeNewQAudioDecoder(h unsafe.Pointer) *QAudioDecoder { - return newQAudioDecoder((*C.QAudioDecoder)(h)) +// UnsafeNewQAudioDecoder constructs the type using only unsafe pointers. +func UnsafeNewQAudioDecoder(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioDecoder { + if h == nil { + return nil + } + + return &QAudioDecoder{h: (*C.QAudioDecoder)(h), + QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} } // NewQAudioDecoder constructs a new QAudioDecoder object. func NewQAudioDecoder() *QAudioDecoder { - ret := C.QAudioDecoder_new() - return newQAudioDecoder(ret) + var outptr_QAudioDecoder *C.QAudioDecoder = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QAudioDecoder_new(&outptr_QAudioDecoder, &outptr_QMediaObject, &outptr_QObject) + ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioDecoder2 constructs a new QAudioDecoder object. func NewQAudioDecoder2(parent *qt.QObject) *QAudioDecoder { - ret := C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer())) - return newQAudioDecoder(ret) + var outptr_QAudioDecoder *C.QAudioDecoder = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioDecoder, &outptr_QMediaObject, &outptr_QObject) + ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioDecoder) MetaObject() *qt.QMetaObject { @@ -130,7 +151,7 @@ func (this *QAudioDecoder) SetSourceFilename(fileName string) { } func (this *QAudioDecoder) SourceDevice() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h)), nil) } func (this *QAudioDecoder) SetSourceDevice(device *qt.QIODevice) { @@ -427,9 +448,122 @@ func QAudioDecoder_HasSupport2(mimeType string, codecs []string) QMultimedia__Su return (QMultimedia__SupportEstimate)(C.QAudioDecoder_HasSupport2(mimeType_ms, codecs_ma)) } +func (this *QAudioDecoder) callVirtualBase_Bind(param1 *qt.QObject) bool { + + return (bool)(C.QAudioDecoder_virtualbase_Bind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()))) + +} +func (this *QAudioDecoder) OnBind(slot func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) { + C.QAudioDecoder_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_Bind +func miqt_exec_callback_QAudioDecoder_Bind(self *C.QAudioDecoder, cb C.intptr_t, param1 *C.QObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAudioDecoder{h: self}).callVirtualBase_Bind, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioDecoder) callVirtualBase_Unbind(param1 *qt.QObject) { + + C.QAudioDecoder_virtualbase_Unbind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer())) + +} +func (this *QAudioDecoder) OnUnbind(slot func(super func(param1 *qt.QObject), param1 *qt.QObject)) { + C.QAudioDecoder_override_virtual_Unbind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_Unbind +func miqt_exec_callback_QAudioDecoder_Unbind(self *C.QAudioDecoder, cb C.intptr_t, param1 *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject), param1 *qt.QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + gofunc((&QAudioDecoder{h: self}).callVirtualBase_Unbind, slotval1) + +} + +func (this *QAudioDecoder) callVirtualBase_IsAvailable() bool { + + return (bool)(C.QAudioDecoder_virtualbase_IsAvailable(unsafe.Pointer(this.h))) + +} +func (this *QAudioDecoder) OnIsAvailable(slot func(super func() bool) bool) { + C.QAudioDecoder_override_virtual_IsAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_IsAvailable +func miqt_exec_callback_QAudioDecoder_IsAvailable(self *C.QAudioDecoder, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAudioDecoder{h: self}).callVirtualBase_IsAvailable) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioDecoder) callVirtualBase_Availability() QMultimedia__AvailabilityStatus { + + return (QMultimedia__AvailabilityStatus)(C.QAudioDecoder_virtualbase_Availability(unsafe.Pointer(this.h))) + +} +func (this *QAudioDecoder) OnAvailability(slot func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) { + C.QAudioDecoder_override_virtual_Availability(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_Availability +func miqt_exec_callback_QAudioDecoder_Availability(self *C.QAudioDecoder, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAudioDecoder{h: self}).callVirtualBase_Availability) + + return (C.int)(virtualReturn) + +} + +func (this *QAudioDecoder) callVirtualBase_Service() *QMediaService { + + return UnsafeNewQMediaService(unsafe.Pointer(C.QAudioDecoder_virtualbase_Service(unsafe.Pointer(this.h))), nil) +} +func (this *QAudioDecoder) OnService(slot func(super func() *QMediaService) *QMediaService) { + C.QAudioDecoder_override_virtual_Service(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_Service +func miqt_exec_callback_QAudioDecoder_Service(self *C.QAudioDecoder, cb C.intptr_t) *C.QMediaService { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaService) *QMediaService) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAudioDecoder{h: self}).callVirtualBase_Service) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAudioDecoder) Delete() { - C.QAudioDecoder_Delete(this.h) + C.QAudioDecoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiodecoder.h b/qt/multimedia/gen_qaudiodecoder.h index 5392b5b4..2b40f9e1 100644 --- a/qt/multimedia/gen_qaudiodecoder.h +++ b/qt/multimedia/gen_qaudiodecoder.h @@ -19,6 +19,8 @@ class QAudioBuffer; class QAudioDecoder; class QAudioFormat; class QIODevice; +class QMediaObject; +class QMediaService; class QMetaObject; class QObject; #else @@ -26,12 +28,14 @@ typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioDecoder QAudioDecoder; typedef struct QAudioFormat QAudioFormat; typedef struct QIODevice QIODevice; +typedef struct QMediaObject QMediaObject; +typedef struct QMediaService QMediaService; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QAudioDecoder* QAudioDecoder_new(); -QAudioDecoder* QAudioDecoder_new2(QObject* parent); +void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self); void* QAudioDecoder_Metacast(QAudioDecoder* self, const char* param1); struct miqt_string QAudioDecoder_Tr(const char* s); @@ -77,7 +81,17 @@ struct miqt_string QAudioDecoder_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioDecoder_TrUtf82(const char* s, const char* c); struct miqt_string QAudioDecoder_TrUtf83(const char* s, const char* c, int n); int QAudioDecoder_HasSupport2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs); -void QAudioDecoder_Delete(QAudioDecoder* self); +void QAudioDecoder_override_virtual_Bind(void* self, intptr_t slot); +bool QAudioDecoder_virtualbase_Bind(void* self, QObject* param1); +void QAudioDecoder_override_virtual_Unbind(void* self, intptr_t slot); +void QAudioDecoder_virtualbase_Unbind(void* self, QObject* param1); +void QAudioDecoder_override_virtual_IsAvailable(void* self, intptr_t slot); +bool QAudioDecoder_virtualbase_IsAvailable(const void* self); +void QAudioDecoder_override_virtual_Availability(void* self, intptr_t slot); +int QAudioDecoder_virtualbase_Availability(const void* self); +void QAudioDecoder_override_virtual_Service(void* self, intptr_t slot); +QMediaService* QAudioDecoder_virtualbase_Service(const void* self); +void QAudioDecoder_Delete(QAudioDecoder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiodecodercontrol.cpp b/qt/multimedia/gen_qaudiodecodercontrol.cpp index a8978b4b..574c020f 100644 --- a/qt/multimedia/gen_qaudiodecodercontrol.cpp +++ b/qt/multimedia/gen_qaudiodecodercontrol.cpp @@ -2,7 +2,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -257,7 +259,11 @@ struct miqt_string QAudioDecoderControl_TrUtf83(const char* s, const char* c, in return _ms; } -void QAudioDecoderControl_Delete(QAudioDecoderControl* self) { - delete self; +void QAudioDecoderControl_Delete(QAudioDecoderControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiodecodercontrol.go b/qt/multimedia/gen_qaudiodecodercontrol.go index 71fdddb6..b2abdbf0 100644 --- a/qt/multimedia/gen_qaudiodecodercontrol.go +++ b/qt/multimedia/gen_qaudiodecodercontrol.go @@ -16,7 +16,8 @@ import ( ) type QAudioDecoderControl struct { - h *C.QAudioDecoderControl + h *C.QAudioDecoderControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QAudioDecoderControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioDecoderControl(h *C.QAudioDecoderControl) *QAudioDecoderControl { +// newQAudioDecoderControl constructs the type using only CGO pointers. +func newQAudioDecoderControl(h *C.QAudioDecoderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioDecoderControl { if h == nil { return nil } - return &QAudioDecoderControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QAudioDecoderControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQAudioDecoderControl(h unsafe.Pointer) *QAudioDecoderControl { - return newQAudioDecoderControl((*C.QAudioDecoderControl)(h)) +// UnsafeNewQAudioDecoderControl constructs the type using only unsafe pointers. +func UnsafeNewQAudioDecoderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioDecoderControl { + if h == nil { + return nil + } + + return &QAudioDecoderControl{h: (*C.QAudioDecoderControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QAudioDecoderControl) MetaObject() *qt.QMetaObject { @@ -93,7 +102,7 @@ func (this *QAudioDecoderControl) SetSourceFilename(fileName string) { } func (this *QAudioDecoderControl) SourceDevice() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoderControl_SourceDevice(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoderControl_SourceDevice(this.h)), nil) } func (this *QAudioDecoderControl) SetSourceDevice(device *qt.QIODevice) { @@ -364,7 +373,7 @@ func QAudioDecoderControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAudioDecoderControl) Delete() { - C.QAudioDecoderControl_Delete(this.h) + C.QAudioDecoderControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiodecodercontrol.h b/qt/multimedia/gen_qaudiodecodercontrol.h index 37cdfbc0..86088cd4 100644 --- a/qt/multimedia/gen_qaudiodecodercontrol.h +++ b/qt/multimedia/gen_qaudiodecodercontrol.h @@ -19,13 +19,17 @@ class QAudioBuffer; class QAudioDecoderControl; class QAudioFormat; class QIODevice; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioDecoderControl QAudioDecoderControl; typedef struct QAudioFormat QAudioFormat; typedef struct QIODevice QIODevice; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAudioDecoderControl_MetaObject(const QAudioDecoderControl* self); @@ -67,7 +71,7 @@ struct miqt_string QAudioDecoderControl_Tr2(const char* s, const char* c); struct miqt_string QAudioDecoderControl_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioDecoderControl_TrUtf82(const char* s, const char* c); struct miqt_string QAudioDecoderControl_TrUtf83(const char* s, const char* c, int n); -void QAudioDecoderControl_Delete(QAudioDecoderControl* self); +void QAudioDecoderControl_Delete(QAudioDecoderControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiodeviceinfo.cpp b/qt/multimedia/gen_qaudiodeviceinfo.cpp index 4e804ff2..ad0c33f2 100644 --- a/qt/multimedia/gen_qaudiodeviceinfo.cpp +++ b/qt/multimedia/gen_qaudiodeviceinfo.cpp @@ -8,12 +8,14 @@ #include "gen_qaudiodeviceinfo.h" #include "_cgo_export.h" -QAudioDeviceInfo* QAudioDeviceInfo_new() { - return new QAudioDeviceInfo(); +void QAudioDeviceInfo_new(QAudioDeviceInfo** outptr_QAudioDeviceInfo) { + QAudioDeviceInfo* ret = new QAudioDeviceInfo(); + *outptr_QAudioDeviceInfo = ret; } -QAudioDeviceInfo* QAudioDeviceInfo_new2(QAudioDeviceInfo* other) { - return new QAudioDeviceInfo(*other); +void QAudioDeviceInfo_new2(QAudioDeviceInfo* other, QAudioDeviceInfo** outptr_QAudioDeviceInfo) { + QAudioDeviceInfo* ret = new QAudioDeviceInfo(*other); + *outptr_QAudioDeviceInfo = ret; } void QAudioDeviceInfo_OperatorAssign(QAudioDeviceInfo* self, QAudioDeviceInfo* other) { @@ -174,7 +176,11 @@ struct miqt_array /* of QAudioDeviceInfo* */ QAudioDeviceInfo_AvailableDevices( return _out; } -void QAudioDeviceInfo_Delete(QAudioDeviceInfo* self) { - delete self; +void QAudioDeviceInfo_Delete(QAudioDeviceInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiodeviceinfo.go b/qt/multimedia/gen_qaudiodeviceinfo.go index 8e6fce4a..565ab57e 100644 --- a/qt/multimedia/gen_qaudiodeviceinfo.go +++ b/qt/multimedia/gen_qaudiodeviceinfo.go @@ -14,7 +14,8 @@ import ( ) type QAudioDeviceInfo struct { - h *C.QAudioDeviceInfo + h *C.QAudioDeviceInfo + isSubclass bool } func (this *QAudioDeviceInfo) cPointer() *C.QAudioDeviceInfo { @@ -31,6 +32,7 @@ func (this *QAudioDeviceInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioDeviceInfo constructs the type using only CGO pointers. func newQAudioDeviceInfo(h *C.QAudioDeviceInfo) *QAudioDeviceInfo { if h == nil { return nil @@ -38,20 +40,33 @@ func newQAudioDeviceInfo(h *C.QAudioDeviceInfo) *QAudioDeviceInfo { return &QAudioDeviceInfo{h: h} } +// UnsafeNewQAudioDeviceInfo constructs the type using only unsafe pointers. func UnsafeNewQAudioDeviceInfo(h unsafe.Pointer) *QAudioDeviceInfo { - return newQAudioDeviceInfo((*C.QAudioDeviceInfo)(h)) + if h == nil { + return nil + } + + return &QAudioDeviceInfo{h: (*C.QAudioDeviceInfo)(h)} } // NewQAudioDeviceInfo constructs a new QAudioDeviceInfo object. func NewQAudioDeviceInfo() *QAudioDeviceInfo { - ret := C.QAudioDeviceInfo_new() - return newQAudioDeviceInfo(ret) + var outptr_QAudioDeviceInfo *C.QAudioDeviceInfo = nil + + C.QAudioDeviceInfo_new(&outptr_QAudioDeviceInfo) + ret := newQAudioDeviceInfo(outptr_QAudioDeviceInfo) + ret.isSubclass = true + return ret } // NewQAudioDeviceInfo2 constructs a new QAudioDeviceInfo object. func NewQAudioDeviceInfo2(other *QAudioDeviceInfo) *QAudioDeviceInfo { - ret := C.QAudioDeviceInfo_new2(other.cPointer()) - return newQAudioDeviceInfo(ret) + var outptr_QAudioDeviceInfo *C.QAudioDeviceInfo = nil + + C.QAudioDeviceInfo_new2(other.cPointer(), &outptr_QAudioDeviceInfo) + ret := newQAudioDeviceInfo(outptr_QAudioDeviceInfo) + ret.isSubclass = true + return ret } func (this *QAudioDeviceInfo) OperatorAssign(other *QAudioDeviceInfo) { @@ -194,7 +209,7 @@ func QAudioDeviceInfo_AvailableDevices(mode QAudio__Mode) []QAudioDeviceInfo { // Delete this object from C++ memory. func (this *QAudioDeviceInfo) Delete() { - C.QAudioDeviceInfo_Delete(this.h) + C.QAudioDeviceInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiodeviceinfo.h b/qt/multimedia/gen_qaudiodeviceinfo.h index d83ab0c0..6ff1bcb8 100644 --- a/qt/multimedia/gen_qaudiodeviceinfo.h +++ b/qt/multimedia/gen_qaudiodeviceinfo.h @@ -22,8 +22,8 @@ typedef struct QAudioDeviceInfo QAudioDeviceInfo; typedef struct QAudioFormat QAudioFormat; #endif -QAudioDeviceInfo* QAudioDeviceInfo_new(); -QAudioDeviceInfo* QAudioDeviceInfo_new2(QAudioDeviceInfo* other); +void QAudioDeviceInfo_new(QAudioDeviceInfo** outptr_QAudioDeviceInfo); +void QAudioDeviceInfo_new2(QAudioDeviceInfo* other, QAudioDeviceInfo** outptr_QAudioDeviceInfo); void QAudioDeviceInfo_OperatorAssign(QAudioDeviceInfo* self, QAudioDeviceInfo* other); bool QAudioDeviceInfo_OperatorEqual(const QAudioDeviceInfo* self, QAudioDeviceInfo* other); bool QAudioDeviceInfo_OperatorNotEqual(const QAudioDeviceInfo* self, QAudioDeviceInfo* other); @@ -42,7 +42,7 @@ struct miqt_string QAudioDeviceInfo_Realm(const QAudioDeviceInfo* self); QAudioDeviceInfo* QAudioDeviceInfo_DefaultInputDevice(); QAudioDeviceInfo* QAudioDeviceInfo_DefaultOutputDevice(); struct miqt_array /* of QAudioDeviceInfo* */ QAudioDeviceInfo_AvailableDevices(int mode); -void QAudioDeviceInfo_Delete(QAudioDeviceInfo* self); +void QAudioDeviceInfo_Delete(QAudioDeviceInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudioencodersettingscontrol.cpp b/qt/multimedia/gen_qaudioencodersettingscontrol.cpp index 9978f16c..fb234e1f 100644 --- a/qt/multimedia/gen_qaudioencodersettingscontrol.cpp +++ b/qt/multimedia/gen_qaudioencodersettingscontrol.cpp @@ -1,7 +1,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -71,8 +73,8 @@ struct miqt_string QAudioEncoderSettingsControl_CodecDescription(const QAudioEnc return _ms; } -struct miqt_array /* of int */ QAudioEncoderSettingsControl_SupportedSampleRates(const QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings) { - QList _ret = self->supportedSampleRates(*settings); +struct miqt_array /* of int */ QAudioEncoderSettingsControl_SupportedSampleRates(const QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings, bool* continuous) { + QList _ret = self->supportedSampleRates(*settings, continuous); // Convert QList<> from C++ memory to manually-managed C memory int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -136,20 +138,11 @@ struct miqt_string QAudioEncoderSettingsControl_TrUtf83(const char* s, const cha return _ms; } -struct miqt_array /* of int */ QAudioEncoderSettingsControl_SupportedSampleRates2(const QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings, bool* continuous) { - QList _ret = self->supportedSampleRates(*settings, continuous); - // Convert QList<> from C++ memory to manually-managed C memory - int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; +void QAudioEncoderSettingsControl_Delete(QAudioEncoderSettingsControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -void QAudioEncoderSettingsControl_Delete(QAudioEncoderSettingsControl* self) { - delete self; } diff --git a/qt/multimedia/gen_qaudioencodersettingscontrol.go b/qt/multimedia/gen_qaudioencodersettingscontrol.go index 6bcc0929..3fccc70a 100644 --- a/qt/multimedia/gen_qaudioencodersettingscontrol.go +++ b/qt/multimedia/gen_qaudioencodersettingscontrol.go @@ -15,7 +15,8 @@ import ( ) type QAudioEncoderSettingsControl struct { - h *C.QAudioEncoderSettingsControl + h *C.QAudioEncoderSettingsControl + isSubclass bool *QMediaControl } @@ -33,15 +34,23 @@ func (this *QAudioEncoderSettingsControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioEncoderSettingsControl(h *C.QAudioEncoderSettingsControl) *QAudioEncoderSettingsControl { +// newQAudioEncoderSettingsControl constructs the type using only CGO pointers. +func newQAudioEncoderSettingsControl(h *C.QAudioEncoderSettingsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioEncoderSettingsControl { if h == nil { return nil } - return &QAudioEncoderSettingsControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QAudioEncoderSettingsControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQAudioEncoderSettingsControl(h unsafe.Pointer) *QAudioEncoderSettingsControl { - return newQAudioEncoderSettingsControl((*C.QAudioEncoderSettingsControl)(h)) +// UnsafeNewQAudioEncoderSettingsControl constructs the type using only unsafe pointers. +func UnsafeNewQAudioEncoderSettingsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioEncoderSettingsControl { + if h == nil { + return nil + } + + return &QAudioEncoderSettingsControl{h: (*C.QAudioEncoderSettingsControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QAudioEncoderSettingsControl) MetaObject() *qt.QMetaObject { @@ -96,8 +105,8 @@ func (this *QAudioEncoderSettingsControl) CodecDescription(codecName string) str return _ret } -func (this *QAudioEncoderSettingsControl) SupportedSampleRates(settings *QAudioEncoderSettings) []int { - var _ma C.struct_miqt_array = C.QAudioEncoderSettingsControl_SupportedSampleRates(this.h, settings.cPointer()) +func (this *QAudioEncoderSettingsControl) SupportedSampleRates(settings *QAudioEncoderSettings, continuous *bool) []int { + var _ma C.struct_miqt_array = C.QAudioEncoderSettingsControl_SupportedSampleRates(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) _ret := make([]int, int(_ma.len)) _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -161,19 +170,9 @@ func QAudioEncoderSettingsControl_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QAudioEncoderSettingsControl) SupportedSampleRates2(settings *QAudioEncoderSettings, continuous *bool) []int { - var _ma C.struct_miqt_array = C.QAudioEncoderSettingsControl_SupportedSampleRates2(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) - _ret := make([]int, int(_ma.len)) - _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _ret[i] = (int)(_outCast[i]) - } - return _ret -} - // Delete this object from C++ memory. func (this *QAudioEncoderSettingsControl) Delete() { - C.QAudioEncoderSettingsControl_Delete(this.h) + C.QAudioEncoderSettingsControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudioencodersettingscontrol.h b/qt/multimedia/gen_qaudioencodersettingscontrol.h index 23c699d1..fe514b49 100644 --- a/qt/multimedia/gen_qaudioencodersettingscontrol.h +++ b/qt/multimedia/gen_qaudioencodersettingscontrol.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QAudioEncoderSettings; class QAudioEncoderSettingsControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QAudioEncoderSettings QAudioEncoderSettings; typedef struct QAudioEncoderSettingsControl QAudioEncoderSettingsControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAudioEncoderSettingsControl_MetaObject(const QAudioEncoderSettingsControl* self); @@ -30,15 +34,14 @@ struct miqt_string QAudioEncoderSettingsControl_Tr(const char* s); struct miqt_string QAudioEncoderSettingsControl_TrUtf8(const char* s); struct miqt_array /* of struct miqt_string */ QAudioEncoderSettingsControl_SupportedAudioCodecs(const QAudioEncoderSettingsControl* self); struct miqt_string QAudioEncoderSettingsControl_CodecDescription(const QAudioEncoderSettingsControl* self, struct miqt_string codecName); -struct miqt_array /* of int */ QAudioEncoderSettingsControl_SupportedSampleRates(const QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings); +struct miqt_array /* of int */ QAudioEncoderSettingsControl_SupportedSampleRates(const QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings, bool* continuous); QAudioEncoderSettings* QAudioEncoderSettingsControl_AudioSettings(const QAudioEncoderSettingsControl* self); void QAudioEncoderSettingsControl_SetAudioSettings(QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings); struct miqt_string QAudioEncoderSettingsControl_Tr2(const char* s, const char* c); struct miqt_string QAudioEncoderSettingsControl_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioEncoderSettingsControl_TrUtf82(const char* s, const char* c); struct miqt_string QAudioEncoderSettingsControl_TrUtf83(const char* s, const char* c, int n); -struct miqt_array /* of int */ QAudioEncoderSettingsControl_SupportedSampleRates2(const QAudioEncoderSettingsControl* self, QAudioEncoderSettings* settings, bool* continuous); -void QAudioEncoderSettingsControl_Delete(QAudioEncoderSettingsControl* self); +void QAudioEncoderSettingsControl_Delete(QAudioEncoderSettingsControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudioformat.cpp b/qt/multimedia/gen_qaudioformat.cpp index 636351c9..d0ddd4ab 100644 --- a/qt/multimedia/gen_qaudioformat.cpp +++ b/qt/multimedia/gen_qaudioformat.cpp @@ -6,12 +6,14 @@ #include "gen_qaudioformat.h" #include "_cgo_export.h" -QAudioFormat* QAudioFormat_new() { - return new QAudioFormat(); +void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat) { + QAudioFormat* ret = new QAudioFormat(); + *outptr_QAudioFormat = ret; } -QAudioFormat* QAudioFormat_new2(QAudioFormat* other) { - return new QAudioFormat(*other); +void QAudioFormat_new2(QAudioFormat* other, QAudioFormat** outptr_QAudioFormat) { + QAudioFormat* ret = new QAudioFormat(*other); + *outptr_QAudioFormat = ret; } void QAudioFormat_OperatorAssign(QAudioFormat* self, QAudioFormat* other) { @@ -122,7 +124,11 @@ int QAudioFormat_BytesPerFrame(const QAudioFormat* self) { return self->bytesPerFrame(); } -void QAudioFormat_Delete(QAudioFormat* self) { - delete self; +void QAudioFormat_Delete(QAudioFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudioformat.go b/qt/multimedia/gen_qaudioformat.go index 91ebccd5..e8cb73bd 100644 --- a/qt/multimedia/gen_qaudioformat.go +++ b/qt/multimedia/gen_qaudioformat.go @@ -30,7 +30,8 @@ const ( ) type QAudioFormat struct { - h *C.QAudioFormat + h *C.QAudioFormat + isSubclass bool } func (this *QAudioFormat) cPointer() *C.QAudioFormat { @@ -47,6 +48,7 @@ func (this *QAudioFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioFormat constructs the type using only CGO pointers. func newQAudioFormat(h *C.QAudioFormat) *QAudioFormat { if h == nil { return nil @@ -54,20 +56,33 @@ func newQAudioFormat(h *C.QAudioFormat) *QAudioFormat { return &QAudioFormat{h: h} } +// UnsafeNewQAudioFormat constructs the type using only unsafe pointers. func UnsafeNewQAudioFormat(h unsafe.Pointer) *QAudioFormat { - return newQAudioFormat((*C.QAudioFormat)(h)) + if h == nil { + return nil + } + + return &QAudioFormat{h: (*C.QAudioFormat)(h)} } // NewQAudioFormat constructs a new QAudioFormat object. func NewQAudioFormat() *QAudioFormat { - ret := C.QAudioFormat_new() - return newQAudioFormat(ret) + var outptr_QAudioFormat *C.QAudioFormat = nil + + C.QAudioFormat_new(&outptr_QAudioFormat) + ret := newQAudioFormat(outptr_QAudioFormat) + ret.isSubclass = true + return ret } // NewQAudioFormat2 constructs a new QAudioFormat object. func NewQAudioFormat2(other *QAudioFormat) *QAudioFormat { - ret := C.QAudioFormat_new2(other.cPointer()) - return newQAudioFormat(ret) + var outptr_QAudioFormat *C.QAudioFormat = nil + + C.QAudioFormat_new2(other.cPointer(), &outptr_QAudioFormat) + ret := newQAudioFormat(outptr_QAudioFormat) + ret.isSubclass = true + return ret } func (this *QAudioFormat) OperatorAssign(other *QAudioFormat) { @@ -171,7 +186,7 @@ func (this *QAudioFormat) BytesPerFrame() int { // Delete this object from C++ memory. func (this *QAudioFormat) Delete() { - C.QAudioFormat_Delete(this.h) + C.QAudioFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudioformat.h b/qt/multimedia/gen_qaudioformat.h index f0203455..d6457e0e 100644 --- a/qt/multimedia/gen_qaudioformat.h +++ b/qt/multimedia/gen_qaudioformat.h @@ -20,8 +20,8 @@ class QAudioFormat; typedef struct QAudioFormat QAudioFormat; #endif -QAudioFormat* QAudioFormat_new(); -QAudioFormat* QAudioFormat_new2(QAudioFormat* other); +void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat); +void QAudioFormat_new2(QAudioFormat* other, QAudioFormat** outptr_QAudioFormat); void QAudioFormat_OperatorAssign(QAudioFormat* self, QAudioFormat* other); bool QAudioFormat_OperatorEqual(const QAudioFormat* self, QAudioFormat* other); bool QAudioFormat_OperatorNotEqual(const QAudioFormat* self, QAudioFormat* other); @@ -45,7 +45,7 @@ int QAudioFormat_FramesForBytes(const QAudioFormat* self, int byteCount); int QAudioFormat_FramesForDuration(const QAudioFormat* self, long long duration); long long QAudioFormat_DurationForFrames(const QAudioFormat* self, int frameCount); int QAudioFormat_BytesPerFrame(const QAudioFormat* self); -void QAudioFormat_Delete(QAudioFormat* self); +void QAudioFormat_Delete(QAudioFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudioinput.cpp b/qt/multimedia/gen_qaudioinput.cpp index d077b2f7..c2717940 100644 --- a/qt/multimedia/gen_qaudioinput.cpp +++ b/qt/multimedia/gen_qaudioinput.cpp @@ -1,38 +1,239 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qaudioinput.h" #include "_cgo_export.h" -QAudioInput* QAudioInput_new() { - return new QAudioInput(); +class MiqtVirtualQAudioInput : public virtual QAudioInput { +public: + + MiqtVirtualQAudioInput(): QAudioInput() {}; + MiqtVirtualQAudioInput(const QAudioDeviceInfo& audioDeviceInfo): QAudioInput(audioDeviceInfo) {}; + MiqtVirtualQAudioInput(const QAudioFormat& format): QAudioInput(format) {}; + MiqtVirtualQAudioInput(const QAudioFormat& format, QObject* parent): QAudioInput(format, parent) {}; + MiqtVirtualQAudioInput(const QAudioDeviceInfo& audioDeviceInfo, const QAudioFormat& format): QAudioInput(audioDeviceInfo, format) {}; + MiqtVirtualQAudioInput(const QAudioDeviceInfo& audioDeviceInfo, const QAudioFormat& format, QObject* parent): QAudioInput(audioDeviceInfo, format, parent) {}; + + virtual ~MiqtVirtualQAudioInput() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioInput::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioInput_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioInput::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioInput::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioInput_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioInput::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioInput::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioInput_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioInput::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioInput::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioInput_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioInput::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioInput::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioInput_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioInput::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioInput::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioInput_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioInput::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioInput::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioInput_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioInput::disconnectNotify(*signal); + + } + +}; + +void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo) { - return new QAudioInput(*audioDeviceInfo); +void QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*audioDeviceInfo); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new3(QAudioFormat* format) { - return new QAudioInput(*format); +void QAudioInput_new3(QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*format); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new4(QAudioFormat* format, QObject* parent) { - return new QAudioInput(*format, parent); +void QAudioInput_new4(QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*format, parent); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format) { - return new QAudioInput(*audioDeviceInfo, *format); +void QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*audioDeviceInfo, *format); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent) { - return new QAudioInput(*audioDeviceInfo, *format, parent); +void QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*audioDeviceInfo, *format, parent); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioInput_MetaObject(const QAudioInput* self) { @@ -151,7 +352,7 @@ void QAudioInput_StateChanged(QAudioInput* self, int state) { } void QAudioInput_connect_StateChanged(QAudioInput* self, intptr_t slot) { - QAudioInput::connect(self, static_cast(&QAudioInput::stateChanged), self, [=](QAudio::State state) { + MiqtVirtualQAudioInput::connect(self, static_cast(&QAudioInput::stateChanged), self, [=](QAudio::State state) { QAudio::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QAudioInput_StateChanged(slot, sigval1); @@ -163,7 +364,7 @@ void QAudioInput_Notify(QAudioInput* self) { } void QAudioInput_connect_Notify(QAudioInput* self, intptr_t slot) { - QAudioInput::connect(self, static_cast(&QAudioInput::notify), self, [=]() { + MiqtVirtualQAudioInput::connect(self, static_cast(&QAudioInput::notify), self, [=]() { miqt_exec_callback_QAudioInput_Notify(slot); }); } @@ -212,7 +413,67 @@ struct miqt_string QAudioInput_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QAudioInput_Delete(QAudioInput* self) { - delete self; +void QAudioInput_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__Event = slot; +} + +bool QAudioInput_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_Event(event); +} + +void QAudioInput_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__EventFilter = slot; +} + +bool QAudioInput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioInput_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__TimerEvent = slot; +} + +void QAudioInput_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioInput_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__ChildEvent = slot; +} + +void QAudioInput_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioInput_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__CustomEvent = slot; +} + +void QAudioInput_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioInput_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioInput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioInput_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioInput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioInput_Delete(QAudioInput* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudioinput.go b/qt/multimedia/gen_qaudioinput.go index 658cacb0..e84d0612 100644 --- a/qt/multimedia/gen_qaudioinput.go +++ b/qt/multimedia/gen_qaudioinput.go @@ -16,7 +16,8 @@ import ( ) type QAudioInput struct { - h *C.QAudioInput + h *C.QAudioInput + isSubclass bool *qt.QObject } @@ -34,51 +35,89 @@ func (this *QAudioInput) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioInput(h *C.QAudioInput) *QAudioInput { +// newQAudioInput constructs the type using only CGO pointers. +func newQAudioInput(h *C.QAudioInput, h_QObject *C.QObject) *QAudioInput { if h == nil { return nil } - return &QAudioInput{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioInput{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioInput(h unsafe.Pointer) *QAudioInput { - return newQAudioInput((*C.QAudioInput)(h)) +// UnsafeNewQAudioInput constructs the type using only unsafe pointers. +func UnsafeNewQAudioInput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioInput { + if h == nil { + return nil + } + + return &QAudioInput{h: (*C.QAudioInput)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQAudioInput constructs a new QAudioInput object. func NewQAudioInput() *QAudioInput { - ret := C.QAudioInput_new() - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new(&outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput2 constructs a new QAudioInput object. func NewQAudioInput2(audioDeviceInfo *QAudioDeviceInfo) *QAudioInput { - ret := C.QAudioInput_new2(audioDeviceInfo.cPointer()) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new2(audioDeviceInfo.cPointer(), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput3 constructs a new QAudioInput object. func NewQAudioInput3(format *QAudioFormat) *QAudioInput { - ret := C.QAudioInput_new3(format.cPointer()) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new3(format.cPointer(), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput4 constructs a new QAudioInput object. func NewQAudioInput4(format *QAudioFormat, parent *qt.QObject) *QAudioInput { - ret := C.QAudioInput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput5 constructs a new QAudioInput object. func NewQAudioInput5(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat) *QAudioInput { - ret := C.QAudioInput_new5(audioDeviceInfo.cPointer(), format.cPointer()) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput6 constructs a new QAudioInput object. func NewQAudioInput6(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat, parent *qt.QObject) *QAudioInput { - ret := C.QAudioInput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioInput) MetaObject() *qt.QMetaObject { @@ -121,7 +160,7 @@ func (this *QAudioInput) Start(device *qt.QIODevice) { } func (this *QAudioInput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioInput_Start2(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioInput_Start2(this.h)), nil) } func (this *QAudioInput) Stop() { @@ -269,9 +308,175 @@ func QAudioInput_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAudioInput) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QAudioInput_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioInput) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QAudioInput_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_Event +func miqt_exec_callback_QAudioInput_Event(self *C.QAudioInput, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioInput{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioInput) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QAudioInput_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioInput) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QAudioInput_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_EventFilter +func miqt_exec_callback_QAudioInput_EventFilter(self *C.QAudioInput, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioInput{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioInput) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QAudioInput_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioInput) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QAudioInput_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_TimerEvent +func miqt_exec_callback_QAudioInput_TimerEvent(self *C.QAudioInput, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioInput{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QAudioInput_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioInput) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QAudioInput_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_ChildEvent +func miqt_exec_callback_QAudioInput_ChildEvent(self *C.QAudioInput, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioInput{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QAudioInput_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioInput) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QAudioInput_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_CustomEvent +func miqt_exec_callback_QAudioInput_CustomEvent(self *C.QAudioInput, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioInput{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QAudioInput_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioInput) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioInput_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_ConnectNotify +func miqt_exec_callback_QAudioInput_ConnectNotify(self *C.QAudioInput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioInput{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QAudioInput_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioInput) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioInput_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_DisconnectNotify +func miqt_exec_callback_QAudioInput_DisconnectNotify(self *C.QAudioInput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioInput{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioInput) Delete() { - C.QAudioInput_Delete(this.h) + C.QAudioInput_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudioinput.h b/qt/multimedia/gen_qaudioinput.h index c8e73455..e625e159 100644 --- a/qt/multimedia/gen_qaudioinput.h +++ b/qt/multimedia/gen_qaudioinput.h @@ -18,24 +18,32 @@ extern "C" { class QAudioDeviceInfo; class QAudioFormat; class QAudioInput; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDeviceInfo QAudioDeviceInfo; typedef struct QAudioFormat QAudioFormat; typedef struct QAudioInput QAudioInput; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioInput* QAudioInput_new(); -QAudioInput* QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo); -QAudioInput* QAudioInput_new3(QAudioFormat* format); -QAudioInput* QAudioInput_new4(QAudioFormat* format, QObject* parent); -QAudioInput* QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format); -QAudioInput* QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new3(QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new4(QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); QMetaObject* QAudioInput_MetaObject(const QAudioInput* self); void* QAudioInput_Metacast(QAudioInput* self, const char* param1); struct miqt_string QAudioInput_Tr(const char* s); @@ -67,7 +75,21 @@ struct miqt_string QAudioInput_Tr2(const char* s, const char* c); struct miqt_string QAudioInput_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioInput_TrUtf82(const char* s, const char* c); struct miqt_string QAudioInput_TrUtf83(const char* s, const char* c, int n); -void QAudioInput_Delete(QAudioInput* self); +void QAudioInput_override_virtual_Event(void* self, intptr_t slot); +bool QAudioInput_virtualbase_Event(void* self, QEvent* event); +void QAudioInput_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioInput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioInput_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioInput_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioInput_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioInput_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioInput_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioInput_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioInput_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioInput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioInput_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioInput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioInput_Delete(QAudioInput* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudioinputselectorcontrol.cpp b/qt/multimedia/gen_qaudioinputselectorcontrol.cpp index 699d0f85..1de45243 100644 --- a/qt/multimedia/gen_qaudioinputselectorcontrol.cpp +++ b/qt/multimedia/gen_qaudioinputselectorcontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -170,7 +172,11 @@ struct miqt_string QAudioInputSelectorControl_TrUtf83(const char* s, const char* return _ms; } -void QAudioInputSelectorControl_Delete(QAudioInputSelectorControl* self) { - delete self; +void QAudioInputSelectorControl_Delete(QAudioInputSelectorControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudioinputselectorcontrol.go b/qt/multimedia/gen_qaudioinputselectorcontrol.go index 6278cd72..e2a79ad1 100644 --- a/qt/multimedia/gen_qaudioinputselectorcontrol.go +++ b/qt/multimedia/gen_qaudioinputselectorcontrol.go @@ -16,7 +16,8 @@ import ( ) type QAudioInputSelectorControl struct { - h *C.QAudioInputSelectorControl + h *C.QAudioInputSelectorControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QAudioInputSelectorControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioInputSelectorControl(h *C.QAudioInputSelectorControl) *QAudioInputSelectorControl { +// newQAudioInputSelectorControl constructs the type using only CGO pointers. +func newQAudioInputSelectorControl(h *C.QAudioInputSelectorControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioInputSelectorControl { if h == nil { return nil } - return &QAudioInputSelectorControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QAudioInputSelectorControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQAudioInputSelectorControl(h unsafe.Pointer) *QAudioInputSelectorControl { - return newQAudioInputSelectorControl((*C.QAudioInputSelectorControl)(h)) +// UnsafeNewQAudioInputSelectorControl constructs the type using only unsafe pointers. +func UnsafeNewQAudioInputSelectorControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioInputSelectorControl { + if h == nil { + return nil + } + + return &QAudioInputSelectorControl{h: (*C.QAudioInputSelectorControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QAudioInputSelectorControl) MetaObject() *qt.QMetaObject { @@ -209,7 +218,7 @@ func QAudioInputSelectorControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAudioInputSelectorControl) Delete() { - C.QAudioInputSelectorControl_Delete(this.h) + C.QAudioInputSelectorControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudioinputselectorcontrol.h b/qt/multimedia/gen_qaudioinputselectorcontrol.h index 8ef137a5..0f4d07a8 100644 --- a/qt/multimedia/gen_qaudioinputselectorcontrol.h +++ b/qt/multimedia/gen_qaudioinputselectorcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QAudioInputSelectorControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QAudioInputSelectorControl QAudioInputSelectorControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAudioInputSelectorControl_MetaObject(const QAudioInputSelectorControl* self); @@ -39,7 +43,7 @@ struct miqt_string QAudioInputSelectorControl_Tr2(const char* s, const char* c); struct miqt_string QAudioInputSelectorControl_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioInputSelectorControl_TrUtf82(const char* s, const char* c); struct miqt_string QAudioInputSelectorControl_TrUtf83(const char* s, const char* c, int n); -void QAudioInputSelectorControl_Delete(QAudioInputSelectorControl* self); +void QAudioInputSelectorControl_Delete(QAudioInputSelectorControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiooutput.cpp b/qt/multimedia/gen_qaudiooutput.cpp index cab94b8f..52fc7a05 100644 --- a/qt/multimedia/gen_qaudiooutput.cpp +++ b/qt/multimedia/gen_qaudiooutput.cpp @@ -1,38 +1,239 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qaudiooutput.h" #include "_cgo_export.h" -QAudioOutput* QAudioOutput_new() { - return new QAudioOutput(); +class MiqtVirtualQAudioOutput : public virtual QAudioOutput { +public: + + MiqtVirtualQAudioOutput(): QAudioOutput() {}; + MiqtVirtualQAudioOutput(const QAudioDeviceInfo& audioDeviceInfo): QAudioOutput(audioDeviceInfo) {}; + MiqtVirtualQAudioOutput(const QAudioFormat& format): QAudioOutput(format) {}; + MiqtVirtualQAudioOutput(const QAudioFormat& format, QObject* parent): QAudioOutput(format, parent) {}; + MiqtVirtualQAudioOutput(const QAudioDeviceInfo& audioDeviceInfo, const QAudioFormat& format): QAudioOutput(audioDeviceInfo, format) {}; + MiqtVirtualQAudioOutput(const QAudioDeviceInfo& audioDeviceInfo, const QAudioFormat& format, QObject* parent): QAudioOutput(audioDeviceInfo, format, parent) {}; + + virtual ~MiqtVirtualQAudioOutput() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioOutput::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioOutput_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioOutput::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioOutput::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioOutput_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioOutput::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioOutput::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioOutput_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioOutput::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioOutput::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioOutput_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioOutput::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioOutput::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioOutput_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioOutput::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioOutput::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioOutput_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioOutput::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioOutput::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioOutput_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioOutput::disconnectNotify(*signal); + + } + +}; + +void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo) { - return new QAudioOutput(*audioDeviceInfo); +void QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*audioDeviceInfo); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new3(QAudioFormat* format) { - return new QAudioOutput(*format); +void QAudioOutput_new3(QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*format); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new4(QAudioFormat* format, QObject* parent) { - return new QAudioOutput(*format, parent); +void QAudioOutput_new4(QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*format, parent); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format) { - return new QAudioOutput(*audioDeviceInfo, *format); +void QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*audioDeviceInfo, *format); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent) { - return new QAudioOutput(*audioDeviceInfo, *format, parent); +void QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*audioDeviceInfo, *format, parent); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self) { @@ -167,7 +368,7 @@ void QAudioOutput_StateChanged(QAudioOutput* self, int state) { } void QAudioOutput_connect_StateChanged(QAudioOutput* self, intptr_t slot) { - QAudioOutput::connect(self, static_cast(&QAudioOutput::stateChanged), self, [=](QAudio::State state) { + MiqtVirtualQAudioOutput::connect(self, static_cast(&QAudioOutput::stateChanged), self, [=](QAudio::State state) { QAudio::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QAudioOutput_StateChanged(slot, sigval1); @@ -179,7 +380,7 @@ void QAudioOutput_Notify(QAudioOutput* self) { } void QAudioOutput_connect_Notify(QAudioOutput* self, intptr_t slot) { - QAudioOutput::connect(self, static_cast(&QAudioOutput::notify), self, [=]() { + MiqtVirtualQAudioOutput::connect(self, static_cast(&QAudioOutput::notify), self, [=]() { miqt_exec_callback_QAudioOutput_Notify(slot); }); } @@ -228,7 +429,67 @@ struct miqt_string QAudioOutput_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QAudioOutput_Delete(QAudioOutput* self) { - delete self; +void QAudioOutput_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__Event = slot; +} + +bool QAudioOutput_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_Event(event); +} + +void QAudioOutput_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__EventFilter = slot; +} + +bool QAudioOutput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioOutput_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__TimerEvent = slot; +} + +void QAudioOutput_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioOutput_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__ChildEvent = slot; +} + +void QAudioOutput_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioOutput_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__CustomEvent = slot; +} + +void QAudioOutput_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioOutput_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioOutput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioOutput_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioOutput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioOutput_Delete(QAudioOutput* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiooutput.go b/qt/multimedia/gen_qaudiooutput.go index 31703d8a..ba812c39 100644 --- a/qt/multimedia/gen_qaudiooutput.go +++ b/qt/multimedia/gen_qaudiooutput.go @@ -16,7 +16,8 @@ import ( ) type QAudioOutput struct { - h *C.QAudioOutput + h *C.QAudioOutput + isSubclass bool *qt.QObject } @@ -34,51 +35,89 @@ func (this *QAudioOutput) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioOutput(h *C.QAudioOutput) *QAudioOutput { +// newQAudioOutput constructs the type using only CGO pointers. +func newQAudioOutput(h *C.QAudioOutput, h_QObject *C.QObject) *QAudioOutput { if h == nil { return nil } - return &QAudioOutput{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioOutput{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioOutput(h unsafe.Pointer) *QAudioOutput { - return newQAudioOutput((*C.QAudioOutput)(h)) +// UnsafeNewQAudioOutput constructs the type using only unsafe pointers. +func UnsafeNewQAudioOutput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioOutput { + if h == nil { + return nil + } + + return &QAudioOutput{h: (*C.QAudioOutput)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQAudioOutput constructs a new QAudioOutput object. func NewQAudioOutput() *QAudioOutput { - ret := C.QAudioOutput_new() - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new(&outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput2 constructs a new QAudioOutput object. func NewQAudioOutput2(audioDeviceInfo *QAudioDeviceInfo) *QAudioOutput { - ret := C.QAudioOutput_new2(audioDeviceInfo.cPointer()) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new2(audioDeviceInfo.cPointer(), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput3 constructs a new QAudioOutput object. func NewQAudioOutput3(format *QAudioFormat) *QAudioOutput { - ret := C.QAudioOutput_new3(format.cPointer()) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new3(format.cPointer(), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput4 constructs a new QAudioOutput object. func NewQAudioOutput4(format *QAudioFormat, parent *qt.QObject) *QAudioOutput { - ret := C.QAudioOutput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput5 constructs a new QAudioOutput object. func NewQAudioOutput5(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat) *QAudioOutput { - ret := C.QAudioOutput_new5(audioDeviceInfo.cPointer(), format.cPointer()) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput6 constructs a new QAudioOutput object. func NewQAudioOutput6(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat, parent *qt.QObject) *QAudioOutput { - ret := C.QAudioOutput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioOutput) MetaObject() *qt.QMetaObject { @@ -121,7 +160,7 @@ func (this *QAudioOutput) Start(device *qt.QIODevice) { } func (this *QAudioOutput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioOutput_Start2(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioOutput_Start2(this.h)), nil) } func (this *QAudioOutput) Stop() { @@ -284,9 +323,175 @@ func QAudioOutput_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAudioOutput) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QAudioOutput_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioOutput) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QAudioOutput_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_Event +func miqt_exec_callback_QAudioOutput_Event(self *C.QAudioOutput, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioOutput{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioOutput) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QAudioOutput_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioOutput) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QAudioOutput_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_EventFilter +func miqt_exec_callback_QAudioOutput_EventFilter(self *C.QAudioOutput, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioOutput{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioOutput) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QAudioOutput_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioOutput) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QAudioOutput_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_TimerEvent +func miqt_exec_callback_QAudioOutput_TimerEvent(self *C.QAudioOutput, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QAudioOutput_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioOutput) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QAudioOutput_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_ChildEvent +func miqt_exec_callback_QAudioOutput_ChildEvent(self *C.QAudioOutput, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QAudioOutput_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioOutput) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QAudioOutput_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_CustomEvent +func miqt_exec_callback_QAudioOutput_CustomEvent(self *C.QAudioOutput, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QAudioOutput_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioOutput) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioOutput_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_ConnectNotify +func miqt_exec_callback_QAudioOutput_ConnectNotify(self *C.QAudioOutput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QAudioOutput_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioOutput) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioOutput_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_DisconnectNotify +func miqt_exec_callback_QAudioOutput_DisconnectNotify(self *C.QAudioOutput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioOutput) Delete() { - C.QAudioOutput_Delete(this.h) + C.QAudioOutput_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiooutput.h b/qt/multimedia/gen_qaudiooutput.h index 0556b550..07ad903b 100644 --- a/qt/multimedia/gen_qaudiooutput.h +++ b/qt/multimedia/gen_qaudiooutput.h @@ -18,24 +18,32 @@ extern "C" { class QAudioDeviceInfo; class QAudioFormat; class QAudioOutput; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDeviceInfo QAudioDeviceInfo; typedef struct QAudioFormat QAudioFormat; typedef struct QAudioOutput QAudioOutput; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioOutput* QAudioOutput_new(); -QAudioOutput* QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo); -QAudioOutput* QAudioOutput_new3(QAudioFormat* format); -QAudioOutput* QAudioOutput_new4(QAudioFormat* format, QObject* parent); -QAudioOutput* QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format); -QAudioOutput* QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new3(QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new4(QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self); void* QAudioOutput_Metacast(QAudioOutput* self, const char* param1); struct miqt_string QAudioOutput_Tr(const char* s); @@ -69,7 +77,21 @@ struct miqt_string QAudioOutput_Tr2(const char* s, const char* c); struct miqt_string QAudioOutput_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioOutput_TrUtf82(const char* s, const char* c); struct miqt_string QAudioOutput_TrUtf83(const char* s, const char* c, int n); -void QAudioOutput_Delete(QAudioOutput* self); +void QAudioOutput_override_virtual_Event(void* self, intptr_t slot); +bool QAudioOutput_virtualbase_Event(void* self, QEvent* event); +void QAudioOutput_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioOutput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioOutput_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioOutput_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioOutput_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioOutput_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioOutput_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioOutput_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioOutput_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioOutput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioOutput_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioOutput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioOutput_Delete(QAudioOutput* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp b/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp index 7af3fdb5..9639cf27 100644 --- a/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp +++ b/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -170,7 +172,11 @@ struct miqt_string QAudioOutputSelectorControl_TrUtf83(const char* s, const char return _ms; } -void QAudioOutputSelectorControl_Delete(QAudioOutputSelectorControl* self) { - delete self; +void QAudioOutputSelectorControl_Delete(QAudioOutputSelectorControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiooutputselectorcontrol.go b/qt/multimedia/gen_qaudiooutputselectorcontrol.go index 37b000e0..eeeb6011 100644 --- a/qt/multimedia/gen_qaudiooutputselectorcontrol.go +++ b/qt/multimedia/gen_qaudiooutputselectorcontrol.go @@ -16,7 +16,8 @@ import ( ) type QAudioOutputSelectorControl struct { - h *C.QAudioOutputSelectorControl + h *C.QAudioOutputSelectorControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QAudioOutputSelectorControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioOutputSelectorControl(h *C.QAudioOutputSelectorControl) *QAudioOutputSelectorControl { +// newQAudioOutputSelectorControl constructs the type using only CGO pointers. +func newQAudioOutputSelectorControl(h *C.QAudioOutputSelectorControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioOutputSelectorControl { if h == nil { return nil } - return &QAudioOutputSelectorControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QAudioOutputSelectorControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQAudioOutputSelectorControl(h unsafe.Pointer) *QAudioOutputSelectorControl { - return newQAudioOutputSelectorControl((*C.QAudioOutputSelectorControl)(h)) +// UnsafeNewQAudioOutputSelectorControl constructs the type using only unsafe pointers. +func UnsafeNewQAudioOutputSelectorControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioOutputSelectorControl { + if h == nil { + return nil + } + + return &QAudioOutputSelectorControl{h: (*C.QAudioOutputSelectorControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QAudioOutputSelectorControl) MetaObject() *qt.QMetaObject { @@ -209,7 +218,7 @@ func QAudioOutputSelectorControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAudioOutputSelectorControl) Delete() { - C.QAudioOutputSelectorControl_Delete(this.h) + C.QAudioOutputSelectorControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiooutputselectorcontrol.h b/qt/multimedia/gen_qaudiooutputselectorcontrol.h index 9f0b834d..6496cadb 100644 --- a/qt/multimedia/gen_qaudiooutputselectorcontrol.h +++ b/qt/multimedia/gen_qaudiooutputselectorcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QAudioOutputSelectorControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QAudioOutputSelectorControl QAudioOutputSelectorControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAudioOutputSelectorControl_MetaObject(const QAudioOutputSelectorControl* self); @@ -39,7 +43,7 @@ struct miqt_string QAudioOutputSelectorControl_Tr2(const char* s, const char* c) struct miqt_string QAudioOutputSelectorControl_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioOutputSelectorControl_TrUtf82(const char* s, const char* c); struct miqt_string QAudioOutputSelectorControl_TrUtf83(const char* s, const char* c, int n); -void QAudioOutputSelectorControl_Delete(QAudioOutputSelectorControl* self); +void QAudioOutputSelectorControl_Delete(QAudioOutputSelectorControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudioprobe.cpp b/qt/multimedia/gen_qaudioprobe.cpp index b68d8f34..91f079dc 100644 --- a/qt/multimedia/gen_qaudioprobe.cpp +++ b/qt/multimedia/gen_qaudioprobe.cpp @@ -1,22 +1,211 @@ #include #include +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qaudioprobe.h" #include "_cgo_export.h" -QAudioProbe* QAudioProbe_new() { - return new QAudioProbe(); +class MiqtVirtualQAudioProbe : public virtual QAudioProbe { +public: + + MiqtVirtualQAudioProbe(): QAudioProbe() {}; + MiqtVirtualQAudioProbe(QObject* parent): QAudioProbe(parent) {}; + + virtual ~MiqtVirtualQAudioProbe() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioProbe::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioProbe_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioProbe::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioProbe::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioProbe_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioProbe::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioProbe::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioProbe_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioProbe::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioProbe::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioProbe_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioProbe::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioProbe::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioProbe_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioProbe::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioProbe::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioProbe_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioProbe::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioProbe::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioProbe_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioProbe::disconnectNotify(*signal); + + } + +}; + +void QAudioProbe_new(QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject) { + MiqtVirtualQAudioProbe* ret = new MiqtVirtualQAudioProbe(); + *outptr_QAudioProbe = ret; + *outptr_QObject = static_cast(ret); } -QAudioProbe* QAudioProbe_new2(QObject* parent) { - return new QAudioProbe(parent); +void QAudioProbe_new2(QObject* parent, QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject) { + MiqtVirtualQAudioProbe* ret = new MiqtVirtualQAudioProbe(parent); + *outptr_QAudioProbe = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioProbe_MetaObject(const QAudioProbe* self) { @@ -66,7 +255,7 @@ void QAudioProbe_AudioBufferProbed(QAudioProbe* self, QAudioBuffer* buffer) { } void QAudioProbe_connect_AudioBufferProbed(QAudioProbe* self, intptr_t slot) { - QAudioProbe::connect(self, static_cast(&QAudioProbe::audioBufferProbed), self, [=](const QAudioBuffer& buffer) { + MiqtVirtualQAudioProbe::connect(self, static_cast(&QAudioProbe::audioBufferProbed), self, [=](const QAudioBuffer& buffer) { const QAudioBuffer& buffer_ret = buffer; // Cast returned reference into pointer QAudioBuffer* sigval1 = const_cast(&buffer_ret); @@ -79,7 +268,7 @@ void QAudioProbe_Flush(QAudioProbe* self) { } void QAudioProbe_connect_Flush(QAudioProbe* self, intptr_t slot) { - QAudioProbe::connect(self, static_cast(&QAudioProbe::flush), self, [=]() { + MiqtVirtualQAudioProbe::connect(self, static_cast(&QAudioProbe::flush), self, [=]() { miqt_exec_callback_QAudioProbe_Flush(slot); }); } @@ -128,7 +317,67 @@ struct miqt_string QAudioProbe_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QAudioProbe_Delete(QAudioProbe* self) { - delete self; +void QAudioProbe_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__Event = slot; +} + +bool QAudioProbe_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_Event(event); +} + +void QAudioProbe_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__EventFilter = slot; +} + +bool QAudioProbe_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioProbe_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__TimerEvent = slot; +} + +void QAudioProbe_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioProbe_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__ChildEvent = slot; +} + +void QAudioProbe_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioProbe_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__CustomEvent = slot; +} + +void QAudioProbe_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioProbe_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioProbe_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioProbe_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioProbe*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioProbe_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioProbe*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioProbe_Delete(QAudioProbe* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudioprobe.go b/qt/multimedia/gen_qaudioprobe.go index b68c6c21..0bfeceb2 100644 --- a/qt/multimedia/gen_qaudioprobe.go +++ b/qt/multimedia/gen_qaudioprobe.go @@ -16,7 +16,8 @@ import ( ) type QAudioProbe struct { - h *C.QAudioProbe + h *C.QAudioProbe + isSubclass bool *qt.QObject } @@ -34,27 +35,45 @@ func (this *QAudioProbe) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioProbe(h *C.QAudioProbe) *QAudioProbe { +// newQAudioProbe constructs the type using only CGO pointers. +func newQAudioProbe(h *C.QAudioProbe, h_QObject *C.QObject) *QAudioProbe { if h == nil { return nil } - return &QAudioProbe{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioProbe{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioProbe(h unsafe.Pointer) *QAudioProbe { - return newQAudioProbe((*C.QAudioProbe)(h)) +// UnsafeNewQAudioProbe constructs the type using only unsafe pointers. +func UnsafeNewQAudioProbe(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioProbe { + if h == nil { + return nil + } + + return &QAudioProbe{h: (*C.QAudioProbe)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQAudioProbe constructs a new QAudioProbe object. func NewQAudioProbe() *QAudioProbe { - ret := C.QAudioProbe_new() - return newQAudioProbe(ret) + var outptr_QAudioProbe *C.QAudioProbe = nil + var outptr_QObject *C.QObject = nil + + C.QAudioProbe_new(&outptr_QAudioProbe, &outptr_QObject) + ret := newQAudioProbe(outptr_QAudioProbe, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioProbe2 constructs a new QAudioProbe object. func NewQAudioProbe2(parent *qt.QObject) *QAudioProbe { - ret := C.QAudioProbe_new2((*C.QObject)(parent.UnsafePointer())) - return newQAudioProbe(ret) + var outptr_QAudioProbe *C.QAudioProbe = nil + var outptr_QObject *C.QObject = nil + + C.QAudioProbe_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioProbe, &outptr_QObject) + ret := newQAudioProbe(outptr_QAudioProbe, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioProbe) MetaObject() *qt.QMetaObject { @@ -178,9 +197,175 @@ func QAudioProbe_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAudioProbe) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QAudioProbe_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioProbe) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QAudioProbe_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_Event +func miqt_exec_callback_QAudioProbe_Event(self *C.QAudioProbe, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioProbe{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioProbe) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QAudioProbe_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioProbe) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QAudioProbe_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_EventFilter +func miqt_exec_callback_QAudioProbe_EventFilter(self *C.QAudioProbe, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioProbe{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioProbe) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QAudioProbe_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioProbe) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QAudioProbe_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_TimerEvent +func miqt_exec_callback_QAudioProbe_TimerEvent(self *C.QAudioProbe, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioProbe{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioProbe) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QAudioProbe_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioProbe) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QAudioProbe_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_ChildEvent +func miqt_exec_callback_QAudioProbe_ChildEvent(self *C.QAudioProbe, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioProbe{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioProbe) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QAudioProbe_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioProbe) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QAudioProbe_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_CustomEvent +func miqt_exec_callback_QAudioProbe_CustomEvent(self *C.QAudioProbe, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioProbe{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioProbe) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QAudioProbe_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioProbe) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioProbe_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_ConnectNotify +func miqt_exec_callback_QAudioProbe_ConnectNotify(self *C.QAudioProbe, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioProbe{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioProbe) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QAudioProbe_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioProbe) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioProbe_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioProbe_DisconnectNotify +func miqt_exec_callback_QAudioProbe_DisconnectNotify(self *C.QAudioProbe, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioProbe{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioProbe) Delete() { - C.QAudioProbe_Delete(this.h) + C.QAudioProbe_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudioprobe.h b/qt/multimedia/gen_qaudioprobe.h index 5c88fea5..9cc21123 100644 --- a/qt/multimedia/gen_qaudioprobe.h +++ b/qt/multimedia/gen_qaudioprobe.h @@ -17,21 +17,29 @@ extern "C" { #ifdef __cplusplus class QAudioBuffer; class QAudioProbe; +class QChildEvent; +class QEvent; class QMediaObject; class QMediaRecorder; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioProbe QAudioProbe; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QMediaObject QMediaObject; typedef struct QMediaRecorder QMediaRecorder; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioProbe* QAudioProbe_new(); -QAudioProbe* QAudioProbe_new2(QObject* parent); +void QAudioProbe_new(QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject); +void QAudioProbe_new2(QObject* parent, QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject); QMetaObject* QAudioProbe_MetaObject(const QAudioProbe* self); void* QAudioProbe_Metacast(QAudioProbe* self, const char* param1); struct miqt_string QAudioProbe_Tr(const char* s); @@ -47,7 +55,21 @@ struct miqt_string QAudioProbe_Tr2(const char* s, const char* c); struct miqt_string QAudioProbe_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioProbe_TrUtf82(const char* s, const char* c); struct miqt_string QAudioProbe_TrUtf83(const char* s, const char* c, int n); -void QAudioProbe_Delete(QAudioProbe* self); +void QAudioProbe_override_virtual_Event(void* self, intptr_t slot); +bool QAudioProbe_virtualbase_Event(void* self, QEvent* event); +void QAudioProbe_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioProbe_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioProbe_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioProbe_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioProbe_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioProbe_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioProbe_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioProbe_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioProbe_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioProbe_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioProbe_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioProbe_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioProbe_Delete(QAudioProbe* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiorecorder.cpp b/qt/multimedia/gen_qaudiorecorder.cpp index d0d06e4e..54c8e999 100644 --- a/qt/multimedia/gen_qaudiorecorder.cpp +++ b/qt/multimedia/gen_qaudiorecorder.cpp @@ -1,5 +1,8 @@ #include #include +#include +#include +#include #include #include #include @@ -9,12 +12,75 @@ #include "gen_qaudiorecorder.h" #include "_cgo_export.h" -QAudioRecorder* QAudioRecorder_new() { - return new QAudioRecorder(); +class MiqtVirtualQAudioRecorder : public virtual QAudioRecorder { +public: + + MiqtVirtualQAudioRecorder(): QAudioRecorder() {}; + MiqtVirtualQAudioRecorder(QObject* parent): QAudioRecorder(parent) {}; + + virtual ~MiqtVirtualQAudioRecorder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QAudioRecorder::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QAudioRecorder_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QAudioRecorder::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* object) override { + if (handle__SetMediaObject == 0) { + return QAudioRecorder::setMediaObject(object); + } + + QMediaObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QAudioRecorder_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* object) { + + return QAudioRecorder::setMediaObject(object); + + } + +}; + +void QAudioRecorder_new(QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQAudioRecorder* ret = new MiqtVirtualQAudioRecorder(); + *outptr_QAudioRecorder = ret; + *outptr_QMediaRecorder = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QAudioRecorder* QAudioRecorder_new2(QObject* parent) { - return new QAudioRecorder(parent); +void QAudioRecorder_new2(QObject* parent, QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQAudioRecorder* ret = new MiqtVirtualQAudioRecorder(parent); + *outptr_QAudioRecorder = ret; + *outptr_QMediaRecorder = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QAudioRecorder_MetaObject(const QAudioRecorder* self) { @@ -112,7 +178,7 @@ void QAudioRecorder_AudioInputChanged(QAudioRecorder* self, struct miqt_string n } void QAudioRecorder_connect_AudioInputChanged(QAudioRecorder* self, intptr_t slot) { - QAudioRecorder::connect(self, static_cast(&QAudioRecorder::audioInputChanged), self, [=](const QString& name) { + MiqtVirtualQAudioRecorder::connect(self, static_cast(&QAudioRecorder::audioInputChanged), self, [=](const QString& name) { const QString name_ret = name; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray name_b = name_ret.toUtf8(); @@ -130,7 +196,7 @@ void QAudioRecorder_AvailableAudioInputsChanged(QAudioRecorder* self) { } void QAudioRecorder_connect_AvailableAudioInputsChanged(QAudioRecorder* self, intptr_t slot) { - QAudioRecorder::connect(self, static_cast(&QAudioRecorder::availableAudioInputsChanged), self, [=]() { + MiqtVirtualQAudioRecorder::connect(self, static_cast(&QAudioRecorder::availableAudioInputsChanged), self, [=]() { miqt_exec_callback_QAudioRecorder_AvailableAudioInputsChanged(slot); }); } @@ -179,7 +245,27 @@ struct miqt_string QAudioRecorder_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QAudioRecorder_Delete(QAudioRecorder* self) { - delete self; +void QAudioRecorder_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QAudioRecorder*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QAudioRecorder_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQAudioRecorder*)(self) )->virtualbase_MediaObject(); +} + +void QAudioRecorder_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QAudioRecorder*)(self) )->handle__SetMediaObject = slot; +} + +bool QAudioRecorder_virtualbase_SetMediaObject(void* self, QMediaObject* object) { + return ( (MiqtVirtualQAudioRecorder*)(self) )->virtualbase_SetMediaObject(object); +} + +void QAudioRecorder_Delete(QAudioRecorder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiorecorder.go b/qt/multimedia/gen_qaudiorecorder.go index abae7d87..7945c6d2 100644 --- a/qt/multimedia/gen_qaudiorecorder.go +++ b/qt/multimedia/gen_qaudiorecorder.go @@ -16,7 +16,8 @@ import ( ) type QAudioRecorder struct { - h *C.QAudioRecorder + h *C.QAudioRecorder + isSubclass bool *QMediaRecorder } @@ -34,27 +35,49 @@ func (this *QAudioRecorder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioRecorder(h *C.QAudioRecorder) *QAudioRecorder { +// newQAudioRecorder constructs the type using only CGO pointers. +func newQAudioRecorder(h *C.QAudioRecorder, h_QMediaRecorder *C.QMediaRecorder, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QAudioRecorder { if h == nil { return nil } - return &QAudioRecorder{h: h, QMediaRecorder: UnsafeNewQMediaRecorder(unsafe.Pointer(h))} + return &QAudioRecorder{h: h, + QMediaRecorder: newQMediaRecorder(h_QMediaRecorder, h_QObject, h_QMediaBindableInterface)} } -func UnsafeNewQAudioRecorder(h unsafe.Pointer) *QAudioRecorder { - return newQAudioRecorder((*C.QAudioRecorder)(h)) +// UnsafeNewQAudioRecorder constructs the type using only unsafe pointers. +func UnsafeNewQAudioRecorder(h unsafe.Pointer, h_QMediaRecorder unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QAudioRecorder { + if h == nil { + return nil + } + + return &QAudioRecorder{h: (*C.QAudioRecorder)(h), + QMediaRecorder: UnsafeNewQMediaRecorder(h_QMediaRecorder, h_QObject, h_QMediaBindableInterface)} } // NewQAudioRecorder constructs a new QAudioRecorder object. func NewQAudioRecorder() *QAudioRecorder { - ret := C.QAudioRecorder_new() - return newQAudioRecorder(ret) + var outptr_QAudioRecorder *C.QAudioRecorder = nil + var outptr_QMediaRecorder *C.QMediaRecorder = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QAudioRecorder_new(&outptr_QAudioRecorder, &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQAudioRecorder(outptr_QAudioRecorder, outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQAudioRecorder2 constructs a new QAudioRecorder object. func NewQAudioRecorder2(parent *qt.QObject) *QAudioRecorder { - ret := C.QAudioRecorder_new2((*C.QObject)(parent.UnsafePointer())) - return newQAudioRecorder(ret) + var outptr_QAudioRecorder *C.QAudioRecorder = nil + var outptr_QMediaRecorder *C.QMediaRecorder = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QAudioRecorder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioRecorder, &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQAudioRecorder(outptr_QAudioRecorder, outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QAudioRecorder) MetaObject() *qt.QMetaObject { @@ -219,9 +242,55 @@ func QAudioRecorder_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAudioRecorder) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QAudioRecorder_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QAudioRecorder) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QAudioRecorder_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRecorder_MediaObject +func miqt_exec_callback_QAudioRecorder_MediaObject(self *C.QAudioRecorder, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAudioRecorder{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QAudioRecorder) callVirtualBase_SetMediaObject(object *QMediaObject) bool { + + return (bool)(C.QAudioRecorder_virtualbase_SetMediaObject(unsafe.Pointer(this.h), object.cPointer())) + +} +func (this *QAudioRecorder) OnSetMediaObject(slot func(super func(object *QMediaObject) bool, object *QMediaObject) bool) { + C.QAudioRecorder_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRecorder_SetMediaObject +func miqt_exec_callback_QAudioRecorder_SetMediaObject(self *C.QAudioRecorder, cb C.intptr_t, object *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QMediaObject) bool, object *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(object), nil) + + virtualReturn := gofunc((&QAudioRecorder{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAudioRecorder) Delete() { - C.QAudioRecorder_Delete(this.h) + C.QAudioRecorder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiorecorder.h b/qt/multimedia/gen_qaudiorecorder.h index 1b04a8ee..f203e218 100644 --- a/qt/multimedia/gen_qaudiorecorder.h +++ b/qt/multimedia/gen_qaudiorecorder.h @@ -16,16 +16,22 @@ extern "C" { #ifdef __cplusplus class QAudioRecorder; +class QMediaBindableInterface; +class QMediaObject; +class QMediaRecorder; class QMetaObject; class QObject; #else typedef struct QAudioRecorder QAudioRecorder; +typedef struct QMediaBindableInterface QMediaBindableInterface; +typedef struct QMediaObject QMediaObject; +typedef struct QMediaRecorder QMediaRecorder; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QAudioRecorder* QAudioRecorder_new(); -QAudioRecorder* QAudioRecorder_new2(QObject* parent); +void QAudioRecorder_new(QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QAudioRecorder_new2(QObject* parent, QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QAudioRecorder_MetaObject(const QAudioRecorder* self); void* QAudioRecorder_Metacast(QAudioRecorder* self, const char* param1); struct miqt_string QAudioRecorder_Tr(const char* s); @@ -43,7 +49,11 @@ struct miqt_string QAudioRecorder_Tr2(const char* s, const char* c); struct miqt_string QAudioRecorder_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioRecorder_TrUtf82(const char* s, const char* c); struct miqt_string QAudioRecorder_TrUtf83(const char* s, const char* c, int n); -void QAudioRecorder_Delete(QAudioRecorder* self); +void QAudioRecorder_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QAudioRecorder_virtualbase_MediaObject(const void* self); +void QAudioRecorder_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QAudioRecorder_virtualbase_SetMediaObject(void* self, QMediaObject* object); +void QAudioRecorder_Delete(QAudioRecorder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiorolecontrol.cpp b/qt/multimedia/gen_qaudiorolecontrol.cpp index 3e5bd3da..dd6ca81e 100644 --- a/qt/multimedia/gen_qaudiorolecontrol.cpp +++ b/qt/multimedia/gen_qaudiorolecontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -117,7 +119,11 @@ struct miqt_string QAudioRoleControl_TrUtf83(const char* s, const char* c, int n return _ms; } -void QAudioRoleControl_Delete(QAudioRoleControl* self) { - delete self; +void QAudioRoleControl_Delete(QAudioRoleControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiorolecontrol.go b/qt/multimedia/gen_qaudiorolecontrol.go index ea4c193a..ad00a674 100644 --- a/qt/multimedia/gen_qaudiorolecontrol.go +++ b/qt/multimedia/gen_qaudiorolecontrol.go @@ -16,7 +16,8 @@ import ( ) type QAudioRoleControl struct { - h *C.QAudioRoleControl + h *C.QAudioRoleControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QAudioRoleControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioRoleControl(h *C.QAudioRoleControl) *QAudioRoleControl { +// newQAudioRoleControl constructs the type using only CGO pointers. +func newQAudioRoleControl(h *C.QAudioRoleControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioRoleControl { if h == nil { return nil } - return &QAudioRoleControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QAudioRoleControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQAudioRoleControl(h unsafe.Pointer) *QAudioRoleControl { - return newQAudioRoleControl((*C.QAudioRoleControl)(h)) +// UnsafeNewQAudioRoleControl constructs the type using only unsafe pointers. +func UnsafeNewQAudioRoleControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioRoleControl { + if h == nil { + return nil + } + + return &QAudioRoleControl{h: (*C.QAudioRoleControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QAudioRoleControl) MetaObject() *qt.QMetaObject { @@ -157,7 +166,7 @@ func QAudioRoleControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAudioRoleControl) Delete() { - C.QAudioRoleControl_Delete(this.h) + C.QAudioRoleControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiorolecontrol.h b/qt/multimedia/gen_qaudiorolecontrol.h index eff19a63..f34097ba 100644 --- a/qt/multimedia/gen_qaudiorolecontrol.h +++ b/qt/multimedia/gen_qaudiorolecontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QAudioRoleControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QAudioRoleControl QAudioRoleControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAudioRoleControl_MetaObject(const QAudioRoleControl* self); @@ -35,7 +39,7 @@ struct miqt_string QAudioRoleControl_Tr2(const char* s, const char* c); struct miqt_string QAudioRoleControl_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioRoleControl_TrUtf82(const char* s, const char* c); struct miqt_string QAudioRoleControl_TrUtf83(const char* s, const char* c, int n); -void QAudioRoleControl_Delete(QAudioRoleControl* self); +void QAudioRoleControl_Delete(QAudioRoleControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiosystem.cpp b/qt/multimedia/gen_qaudiosystem.cpp index 477e3c7a..fd4f3ed7 100644 --- a/qt/multimedia/gen_qaudiosystem.cpp +++ b/qt/multimedia/gen_qaudiosystem.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -192,8 +193,12 @@ struct miqt_string QAbstractAudioDeviceInfo_TrUtf83(const char* s, const char* c return _ms; } -void QAbstractAudioDeviceInfo_Delete(QAbstractAudioDeviceInfo* self) { - delete self; +void QAbstractAudioDeviceInfo_Delete(QAbstractAudioDeviceInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractAudioOutput_MetaObject(const QAbstractAudioOutput* self) { @@ -405,8 +410,12 @@ struct miqt_string QAbstractAudioOutput_TrUtf83(const char* s, const char* c, in return _ms; } -void QAbstractAudioOutput_Delete(QAbstractAudioOutput* self) { - delete self; +void QAbstractAudioOutput_Delete(QAbstractAudioOutput* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractAudioInput_MetaObject(const QAbstractAudioInput* self) { @@ -602,7 +611,11 @@ struct miqt_string QAbstractAudioInput_TrUtf83(const char* s, const char* c, int return _ms; } -void QAbstractAudioInput_Delete(QAbstractAudioInput* self) { - delete self; +void QAbstractAudioInput_Delete(QAbstractAudioInput* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiosystem.go b/qt/multimedia/gen_qaudiosystem.go index 3099a06f..1bdea03e 100644 --- a/qt/multimedia/gen_qaudiosystem.go +++ b/qt/multimedia/gen_qaudiosystem.go @@ -16,7 +16,8 @@ import ( ) type QAbstractAudioDeviceInfo struct { - h *C.QAbstractAudioDeviceInfo + h *C.QAbstractAudioDeviceInfo + isSubclass bool *qt.QObject } @@ -34,15 +35,23 @@ func (this *QAbstractAudioDeviceInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractAudioDeviceInfo(h *C.QAbstractAudioDeviceInfo) *QAbstractAudioDeviceInfo { +// newQAbstractAudioDeviceInfo constructs the type using only CGO pointers. +func newQAbstractAudioDeviceInfo(h *C.QAbstractAudioDeviceInfo, h_QObject *C.QObject) *QAbstractAudioDeviceInfo { if h == nil { return nil } - return &QAbstractAudioDeviceInfo{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractAudioDeviceInfo{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractAudioDeviceInfo(h unsafe.Pointer) *QAbstractAudioDeviceInfo { - return newQAbstractAudioDeviceInfo((*C.QAbstractAudioDeviceInfo)(h)) +// UnsafeNewQAbstractAudioDeviceInfo constructs the type using only unsafe pointers. +func UnsafeNewQAbstractAudioDeviceInfo(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAudioDeviceInfo { + if h == nil { + return nil + } + + return &QAbstractAudioDeviceInfo{h: (*C.QAbstractAudioDeviceInfo)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QAbstractAudioDeviceInfo) MetaObject() *qt.QMetaObject { @@ -200,7 +209,7 @@ func QAbstractAudioDeviceInfo_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractAudioDeviceInfo) Delete() { - C.QAbstractAudioDeviceInfo_Delete(this.h) + C.QAbstractAudioDeviceInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -213,7 +222,8 @@ func (this *QAbstractAudioDeviceInfo) GoGC() { } type QAbstractAudioOutput struct { - h *C.QAbstractAudioOutput + h *C.QAbstractAudioOutput + isSubclass bool *qt.QObject } @@ -231,15 +241,23 @@ func (this *QAbstractAudioOutput) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractAudioOutput(h *C.QAbstractAudioOutput) *QAbstractAudioOutput { +// newQAbstractAudioOutput constructs the type using only CGO pointers. +func newQAbstractAudioOutput(h *C.QAbstractAudioOutput, h_QObject *C.QObject) *QAbstractAudioOutput { if h == nil { return nil } - return &QAbstractAudioOutput{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractAudioOutput{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractAudioOutput(h unsafe.Pointer) *QAbstractAudioOutput { - return newQAbstractAudioOutput((*C.QAbstractAudioOutput)(h)) +// UnsafeNewQAbstractAudioOutput constructs the type using only unsafe pointers. +func UnsafeNewQAbstractAudioOutput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAudioOutput { + if h == nil { + return nil + } + + return &QAbstractAudioOutput{h: (*C.QAbstractAudioOutput)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QAbstractAudioOutput) MetaObject() *qt.QMetaObject { @@ -275,7 +293,7 @@ func (this *QAbstractAudioOutput) Start(device *qt.QIODevice) { } func (this *QAbstractAudioOutput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioOutput_Start2(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioOutput_Start2(this.h)), nil) } func (this *QAbstractAudioOutput) Stop() { @@ -471,7 +489,7 @@ func QAbstractAudioOutput_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractAudioOutput) Delete() { - C.QAbstractAudioOutput_Delete(this.h) + C.QAbstractAudioOutput_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -484,7 +502,8 @@ func (this *QAbstractAudioOutput) GoGC() { } type QAbstractAudioInput struct { - h *C.QAbstractAudioInput + h *C.QAbstractAudioInput + isSubclass bool *qt.QObject } @@ -502,15 +521,23 @@ func (this *QAbstractAudioInput) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractAudioInput(h *C.QAbstractAudioInput) *QAbstractAudioInput { +// newQAbstractAudioInput constructs the type using only CGO pointers. +func newQAbstractAudioInput(h *C.QAbstractAudioInput, h_QObject *C.QObject) *QAbstractAudioInput { if h == nil { return nil } - return &QAbstractAudioInput{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractAudioInput{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractAudioInput(h unsafe.Pointer) *QAbstractAudioInput { - return newQAbstractAudioInput((*C.QAbstractAudioInput)(h)) +// UnsafeNewQAbstractAudioInput constructs the type using only unsafe pointers. +func UnsafeNewQAbstractAudioInput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAudioInput { + if h == nil { + return nil + } + + return &QAbstractAudioInput{h: (*C.QAbstractAudioInput)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QAbstractAudioInput) MetaObject() *qt.QMetaObject { @@ -546,7 +573,7 @@ func (this *QAbstractAudioInput) Start(device *qt.QIODevice) { } func (this *QAbstractAudioInput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioInput_Start2(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioInput_Start2(this.h)), nil) } func (this *QAbstractAudioInput) Stop() { @@ -727,7 +754,7 @@ func QAbstractAudioInput_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractAudioInput) Delete() { - C.QAbstractAudioInput_Delete(this.h) + C.QAbstractAudioInput_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiosystem.h b/qt/multimedia/gen_qaudiosystem.h index 091764f9..e7af74bd 100644 --- a/qt/multimedia/gen_qaudiosystem.h +++ b/qt/multimedia/gen_qaudiosystem.h @@ -21,6 +21,7 @@ class QAbstractAudioOutput; class QAudioFormat; class QIODevice; class QMetaObject; +class QObject; #else typedef struct QAbstractAudioDeviceInfo QAbstractAudioDeviceInfo; typedef struct QAbstractAudioInput QAbstractAudioInput; @@ -28,6 +29,7 @@ typedef struct QAbstractAudioOutput QAbstractAudioOutput; typedef struct QAudioFormat QAudioFormat; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAbstractAudioDeviceInfo_MetaObject(const QAbstractAudioDeviceInfo* self); @@ -47,7 +49,7 @@ struct miqt_string QAbstractAudioDeviceInfo_Tr2(const char* s, const char* c); struct miqt_string QAbstractAudioDeviceInfo_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractAudioDeviceInfo_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractAudioDeviceInfo_TrUtf83(const char* s, const char* c, int n); -void QAbstractAudioDeviceInfo_Delete(QAbstractAudioDeviceInfo* self); +void QAbstractAudioDeviceInfo_Delete(QAbstractAudioDeviceInfo* self, bool isSubclass); QMetaObject* QAbstractAudioOutput_MetaObject(const QAbstractAudioOutput* self); void* QAbstractAudioOutput_Metacast(QAbstractAudioOutput* self, const char* param1); @@ -85,7 +87,7 @@ struct miqt_string QAbstractAudioOutput_Tr2(const char* s, const char* c); struct miqt_string QAbstractAudioOutput_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractAudioOutput_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractAudioOutput_TrUtf83(const char* s, const char* c, int n); -void QAbstractAudioOutput_Delete(QAbstractAudioOutput* self); +void QAbstractAudioOutput_Delete(QAbstractAudioOutput* self, bool isSubclass); QMetaObject* QAbstractAudioInput_MetaObject(const QAbstractAudioInput* self); void* QAbstractAudioInput_Metacast(QAbstractAudioInput* self, const char* param1); @@ -121,7 +123,7 @@ struct miqt_string QAbstractAudioInput_Tr2(const char* s, const char* c); struct miqt_string QAbstractAudioInput_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractAudioInput_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractAudioInput_TrUtf83(const char* s, const char* c, int n); -void QAbstractAudioInput_Delete(QAbstractAudioInput* self); +void QAbstractAudioInput_Delete(QAbstractAudioInput* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qaudiosystemplugin.cpp b/qt/multimedia/gen_qaudiosystemplugin.cpp index e652eaf3..2604b642 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.cpp +++ b/qt/multimedia/gen_qaudiosystemplugin.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -50,8 +51,12 @@ void QAudioSystemFactoryInterface_OperatorAssign(QAudioSystemFactoryInterface* s self->operator=(*param1); } -void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self) { - delete self; +void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAudioSystemPlugin_MetaObject(const QAudioSystemPlugin* self) { @@ -161,7 +166,11 @@ struct miqt_string QAudioSystemPlugin_TrUtf83(const char* s, const char* c, int return _ms; } -void QAudioSystemPlugin_Delete(QAudioSystemPlugin* self) { - delete self; +void QAudioSystemPlugin_Delete(QAudioSystemPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qaudiosystemplugin.go b/qt/multimedia/gen_qaudiosystemplugin.go index df0471bd..fdeacb76 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.go +++ b/qt/multimedia/gen_qaudiosystemplugin.go @@ -15,7 +15,8 @@ import ( ) type QAudioSystemFactoryInterface struct { - h *C.QAudioSystemFactoryInterface + h *C.QAudioSystemFactoryInterface + isSubclass bool } func (this *QAudioSystemFactoryInterface) cPointer() *C.QAudioSystemFactoryInterface { @@ -32,6 +33,7 @@ func (this *QAudioSystemFactoryInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioSystemFactoryInterface constructs the type using only CGO pointers. func newQAudioSystemFactoryInterface(h *C.QAudioSystemFactoryInterface) *QAudioSystemFactoryInterface { if h == nil { return nil @@ -39,8 +41,13 @@ func newQAudioSystemFactoryInterface(h *C.QAudioSystemFactoryInterface) *QAudioS return &QAudioSystemFactoryInterface{h: h} } +// UnsafeNewQAudioSystemFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQAudioSystemFactoryInterface(h unsafe.Pointer) *QAudioSystemFactoryInterface { - return newQAudioSystemFactoryInterface((*C.QAudioSystemFactoryInterface)(h)) + if h == nil { + return nil + } + + return &QAudioSystemFactoryInterface{h: (*C.QAudioSystemFactoryInterface)(h)} } func (this *QAudioSystemFactoryInterface) AvailableDevices(param1 QAudio__Mode) [][]byte { @@ -60,21 +67,21 @@ func (this *QAudioSystemFactoryInterface) CreateInput(device []byte) *QAbstractA device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return UnsafeNewQAbstractAudioInput(unsafe.Pointer(C.QAudioSystemFactoryInterface_CreateInput(this.h, device_alias))) + return UnsafeNewQAbstractAudioInput(unsafe.Pointer(C.QAudioSystemFactoryInterface_CreateInput(this.h, device_alias)), nil) } func (this *QAudioSystemFactoryInterface) CreateOutput(device []byte) *QAbstractAudioOutput { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return UnsafeNewQAbstractAudioOutput(unsafe.Pointer(C.QAudioSystemFactoryInterface_CreateOutput(this.h, device_alias))) + return UnsafeNewQAbstractAudioOutput(unsafe.Pointer(C.QAudioSystemFactoryInterface_CreateOutput(this.h, device_alias)), nil) } func (this *QAudioSystemFactoryInterface) CreateDeviceInfo(device []byte, mode QAudio__Mode) *QAbstractAudioDeviceInfo { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return UnsafeNewQAbstractAudioDeviceInfo(unsafe.Pointer(C.QAudioSystemFactoryInterface_CreateDeviceInfo(this.h, device_alias, (C.int)(mode)))) + return UnsafeNewQAbstractAudioDeviceInfo(unsafe.Pointer(C.QAudioSystemFactoryInterface_CreateDeviceInfo(this.h, device_alias, (C.int)(mode))), nil) } func (this *QAudioSystemFactoryInterface) OperatorAssign(param1 *QAudioSystemFactoryInterface) { @@ -83,7 +90,7 @@ func (this *QAudioSystemFactoryInterface) OperatorAssign(param1 *QAudioSystemFac // Delete this object from C++ memory. func (this *QAudioSystemFactoryInterface) Delete() { - C.QAudioSystemFactoryInterface_Delete(this.h) + C.QAudioSystemFactoryInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -96,7 +103,8 @@ func (this *QAudioSystemFactoryInterface) GoGC() { } type QAudioSystemPlugin struct { - h *C.QAudioSystemPlugin + h *C.QAudioSystemPlugin + isSubclass bool *qt.QObject *QAudioSystemFactoryInterface } @@ -115,15 +123,25 @@ func (this *QAudioSystemPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioSystemPlugin(h *C.QAudioSystemPlugin) *QAudioSystemPlugin { +// newQAudioSystemPlugin constructs the type using only CGO pointers. +func newQAudioSystemPlugin(h *C.QAudioSystemPlugin, h_QObject *C.QObject, h_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface) *QAudioSystemPlugin { if h == nil { return nil } - return &QAudioSystemPlugin{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h)), QAudioSystemFactoryInterface: UnsafeNewQAudioSystemFactoryInterface(unsafe.Pointer(h))} + return &QAudioSystemPlugin{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QAudioSystemFactoryInterface: newQAudioSystemFactoryInterface(h_QAudioSystemFactoryInterface)} } -func UnsafeNewQAudioSystemPlugin(h unsafe.Pointer) *QAudioSystemPlugin { - return newQAudioSystemPlugin((*C.QAudioSystemPlugin)(h)) +// UnsafeNewQAudioSystemPlugin constructs the type using only unsafe pointers. +func UnsafeNewQAudioSystemPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QAudioSystemFactoryInterface unsafe.Pointer) *QAudioSystemPlugin { + if h == nil { + return nil + } + + return &QAudioSystemPlugin{h: (*C.QAudioSystemPlugin)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QAudioSystemFactoryInterface: UnsafeNewQAudioSystemFactoryInterface(h_QAudioSystemFactoryInterface)} } func (this *QAudioSystemPlugin) MetaObject() *qt.QMetaObject { @@ -171,21 +189,21 @@ func (this *QAudioSystemPlugin) CreateInput(device []byte) *QAbstractAudioInput device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return UnsafeNewQAbstractAudioInput(unsafe.Pointer(C.QAudioSystemPlugin_CreateInput(this.h, device_alias))) + return UnsafeNewQAbstractAudioInput(unsafe.Pointer(C.QAudioSystemPlugin_CreateInput(this.h, device_alias)), nil) } func (this *QAudioSystemPlugin) CreateOutput(device []byte) *QAbstractAudioOutput { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return UnsafeNewQAbstractAudioOutput(unsafe.Pointer(C.QAudioSystemPlugin_CreateOutput(this.h, device_alias))) + return UnsafeNewQAbstractAudioOutput(unsafe.Pointer(C.QAudioSystemPlugin_CreateOutput(this.h, device_alias)), nil) } func (this *QAudioSystemPlugin) CreateDeviceInfo(device []byte, mode QAudio__Mode) *QAbstractAudioDeviceInfo { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return UnsafeNewQAbstractAudioDeviceInfo(unsafe.Pointer(C.QAudioSystemPlugin_CreateDeviceInfo(this.h, device_alias, (C.int)(mode)))) + return UnsafeNewQAbstractAudioDeviceInfo(unsafe.Pointer(C.QAudioSystemPlugin_CreateDeviceInfo(this.h, device_alias, (C.int)(mode))), nil) } func QAudioSystemPlugin_Tr2(s string, c string) string { @@ -234,7 +252,7 @@ func QAudioSystemPlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAudioSystemPlugin) Delete() { - C.QAudioSystemPlugin_Delete(this.h) + C.QAudioSystemPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qaudiosystemplugin.h b/qt/multimedia/gen_qaudiosystemplugin.h index 63706611..6d29a6df 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.h +++ b/qt/multimedia/gen_qaudiosystemplugin.h @@ -22,6 +22,7 @@ class QAudioSystemFactoryInterface; class QAudioSystemPlugin; class QByteArray; class QMetaObject; +class QObject; #else typedef struct QAbstractAudioDeviceInfo QAbstractAudioDeviceInfo; typedef struct QAbstractAudioInput QAbstractAudioInput; @@ -30,6 +31,7 @@ typedef struct QAudioSystemFactoryInterface QAudioSystemFactoryInterface; typedef struct QAudioSystemPlugin QAudioSystemPlugin; typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif struct miqt_array /* of struct miqt_string */ QAudioSystemFactoryInterface_AvailableDevices(const QAudioSystemFactoryInterface* self, int param1); @@ -37,7 +39,7 @@ QAbstractAudioInput* QAudioSystemFactoryInterface_CreateInput(QAudioSystemFactor QAbstractAudioOutput* QAudioSystemFactoryInterface_CreateOutput(QAudioSystemFactoryInterface* self, struct miqt_string device); QAbstractAudioDeviceInfo* QAudioSystemFactoryInterface_CreateDeviceInfo(QAudioSystemFactoryInterface* self, struct miqt_string device, int mode); void QAudioSystemFactoryInterface_OperatorAssign(QAudioSystemFactoryInterface* self, QAudioSystemFactoryInterface* param1); -void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self); +void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self, bool isSubclass); QMetaObject* QAudioSystemPlugin_MetaObject(const QAudioSystemPlugin* self); void* QAudioSystemPlugin_Metacast(QAudioSystemPlugin* self, const char* param1); @@ -51,7 +53,7 @@ struct miqt_string QAudioSystemPlugin_Tr2(const char* s, const char* c); struct miqt_string QAudioSystemPlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QAudioSystemPlugin_TrUtf82(const char* s, const char* c); struct miqt_string QAudioSystemPlugin_TrUtf83(const char* s, const char* c, int n); -void QAudioSystemPlugin_Delete(QAudioSystemPlugin* self); +void QAudioSystemPlugin_Delete(QAudioSystemPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcamera.cpp b/qt/multimedia/gen_qcamera.cpp index ba050b3c..702e4fb8 100644 --- a/qt/multimedia/gen_qcamera.cpp +++ b/qt/multimedia/gen_qcamera.cpp @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -20,38 +22,192 @@ #include "gen_qcamera.h" #include "_cgo_export.h" -QCamera* QCamera_new() { - return new QCamera(); +class MiqtVirtualQCamera : public virtual QCamera { +public: + + MiqtVirtualQCamera(): QCamera() {}; + MiqtVirtualQCamera(const QByteArray& deviceName): QCamera(deviceName) {}; + MiqtVirtualQCamera(const QCameraInfo& cameraInfo): QCamera(cameraInfo) {}; + MiqtVirtualQCamera(QCamera::Position position): QCamera(position) {}; + MiqtVirtualQCamera(QObject* parent): QCamera(parent) {}; + MiqtVirtualQCamera(const QByteArray& deviceName, QObject* parent): QCamera(deviceName, parent) {}; + MiqtVirtualQCamera(const QCameraInfo& cameraInfo, QObject* parent): QCamera(cameraInfo, parent) {}; + MiqtVirtualQCamera(QCamera::Position position, QObject* parent): QCamera(position, parent) {}; + + virtual ~MiqtVirtualQCamera() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Availability = 0; + + // Subclass to allow providing a Go implementation + virtual QMultimedia::AvailabilityStatus availability() const override { + if (handle__Availability == 0) { + return QCamera::availability(); + } + + + int callback_return_value = miqt_exec_callback_QCamera_Availability(const_cast(this), handle__Availability); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Availability() const { + + QMultimedia::AvailabilityStatus _ret = QCamera::availability(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual bool isAvailable() const override { + if (handle__IsAvailable == 0) { + return QCamera::isAvailable(); + } + + + bool callback_return_value = miqt_exec_callback_QCamera_IsAvailable(const_cast(this), handle__IsAvailable); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsAvailable() const { + + return QCamera::isAvailable(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Service = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaService* service() const override { + if (handle__Service == 0) { + return QCamera::service(); + } + + + QMediaService* callback_return_value = miqt_exec_callback_QCamera_Service(const_cast(this), handle__Service); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaService* virtualbase_Service() const { + + return QCamera::service(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(QObject* param1) override { + if (handle__Bind == 0) { + return QCamera::bind(param1); + } + + QObject* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QCamera_Bind(this, handle__Bind, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QObject* param1) { + + return QCamera::bind(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unbind = 0; + + // Subclass to allow providing a Go implementation + virtual void unbind(QObject* param1) override { + if (handle__Unbind == 0) { + QCamera::unbind(param1); + return; + } + + QObject* sigval1 = param1; + + miqt_exec_callback_QCamera_Unbind(this, handle__Unbind, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unbind(QObject* param1) { + + QCamera::unbind(param1); + + } + +}; + +void QCamera_new(QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new2(struct miqt_string deviceName) { +void QCamera_new2(struct miqt_string deviceName, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { QByteArray deviceName_QByteArray(deviceName.data, deviceName.len); - return new QCamera(deviceName_QByteArray); + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(deviceName_QByteArray); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new3(QCameraInfo* cameraInfo) { - return new QCamera(*cameraInfo); +void QCamera_new3(QCameraInfo* cameraInfo, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraInfo); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new4(int position) { - return new QCamera(static_cast(position)); +void QCamera_new4(int position, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position)); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new5(QObject* parent) { - return new QCamera(parent); +void QCamera_new5(QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(parent); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new6(struct miqt_string deviceName, QObject* parent) { +void QCamera_new6(struct miqt_string deviceName, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { QByteArray deviceName_QByteArray(deviceName.data, deviceName.len); - return new QCamera(deviceName_QByteArray, parent); + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(deviceName_QByteArray, parent); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new7(QCameraInfo* cameraInfo, QObject* parent) { - return new QCamera(*cameraInfo, parent); +void QCamera_new7(QCameraInfo* cameraInfo, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraInfo, parent); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new8(int position, QObject* parent) { - return new QCamera(static_cast(position), parent); +void QCamera_new8(int position, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position), parent); + *outptr_QCamera = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QCamera_MetaObject(const QCamera* self) { @@ -300,7 +456,7 @@ void QCamera_StateChanged(QCamera* self, int state) { } void QCamera_connect_StateChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::stateChanged), self, [=](QCamera::State state) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::stateChanged), self, [=](QCamera::State state) { QCamera::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QCamera_StateChanged(slot, sigval1); @@ -312,7 +468,7 @@ void QCamera_CaptureModeChanged(QCamera* self, int param1) { } void QCamera_connect_CaptureModeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::captureModeChanged), self, [=](QCamera::CaptureModes param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::captureModeChanged), self, [=](QCamera::CaptureModes param1) { QCamera::CaptureModes param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QCamera_CaptureModeChanged(slot, sigval1); @@ -324,7 +480,7 @@ void QCamera_StatusChanged(QCamera* self, int status) { } void QCamera_connect_StatusChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::statusChanged), self, [=](QCamera::Status status) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::statusChanged), self, [=](QCamera::Status status) { QCamera::Status status_ret = status; int sigval1 = static_cast(status_ret); miqt_exec_callback_QCamera_StatusChanged(slot, sigval1); @@ -336,7 +492,7 @@ void QCamera_Locked(QCamera* self) { } void QCamera_connect_Locked(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::locked), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::locked), self, [=]() { miqt_exec_callback_QCamera_Locked(slot); }); } @@ -346,7 +502,7 @@ void QCamera_LockFailed(QCamera* self) { } void QCamera_connect_LockFailed(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::lockFailed), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::lockFailed), self, [=]() { miqt_exec_callback_QCamera_LockFailed(slot); }); } @@ -356,7 +512,7 @@ void QCamera_LockStatusChanged(QCamera* self, int status, int reason) { } void QCamera_connect_LockStatusChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::lockStatusChanged), self, [=](QCamera::LockStatus status, QCamera::LockChangeReason reason) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::lockStatusChanged), self, [=](QCamera::LockStatus status, QCamera::LockChangeReason reason) { QCamera::LockStatus status_ret = status; int sigval1 = static_cast(status_ret); QCamera::LockChangeReason reason_ret = reason; @@ -370,7 +526,7 @@ void QCamera_LockStatusChanged2(QCamera* self, int lock, int status, int reason) } void QCamera_connect_LockStatusChanged2(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::lockStatusChanged), self, [=](QCamera::LockType lock, QCamera::LockStatus status, QCamera::LockChangeReason reason) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::lockStatusChanged), self, [=](QCamera::LockType lock, QCamera::LockStatus status, QCamera::LockChangeReason reason) { QCamera::LockType lock_ret = lock; int sigval1 = static_cast(lock_ret); QCamera::LockStatus status_ret = status; @@ -386,7 +542,7 @@ void QCamera_ErrorWithQCameraError(QCamera* self, int param1) { } void QCamera_connect_ErrorWithQCameraError(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::error), self, [=](QCamera::Error param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::error), self, [=](QCamera::Error param1) { QCamera::Error param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QCamera_ErrorWithQCameraError(slot, sigval1); @@ -398,7 +554,7 @@ void QCamera_ErrorOccurred(QCamera* self, int param1) { } void QCamera_connect_ErrorOccurred(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::errorOccurred), self, [=](QCamera::Error param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::errorOccurred), self, [=](QCamera::Error param1) { QCamera::Error param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QCamera_ErrorOccurred(slot, sigval1); @@ -502,23 +658,74 @@ struct miqt_array /* of int */ QCamera_SupportedViewfinderPixelFormats1(const Q return _out; } -void QCamera_Delete(QCamera* self) { - delete self; +void QCamera_override_virtual_Availability(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__Availability = slot; } -QCamera__FrameRateRange* QCamera__FrameRateRange_new() { - return new QCamera::FrameRateRange(); +int QCamera_virtualbase_Availability(const void* self) { + return ( (const MiqtVirtualQCamera*)(self) )->virtualbase_Availability(); } -QCamera__FrameRateRange* QCamera__FrameRateRange_new2(double minimum, double maximum) { - return new QCamera::FrameRateRange(static_cast(minimum), static_cast(maximum)); +void QCamera_override_virtual_IsAvailable(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__IsAvailable = slot; } -QCamera__FrameRateRange* QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1) { - return new QCamera::FrameRateRange(*param1); +bool QCamera_virtualbase_IsAvailable(const void* self) { + return ( (const MiqtVirtualQCamera*)(self) )->virtualbase_IsAvailable(); } -void QCamera__FrameRateRange_Delete(QCamera__FrameRateRange* self) { - delete self; +void QCamera_override_virtual_Service(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__Service = slot; +} + +QMediaService* QCamera_virtualbase_Service(const void* self) { + return ( (const MiqtVirtualQCamera*)(self) )->virtualbase_Service(); +} + +void QCamera_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__Bind = slot; +} + +bool QCamera_virtualbase_Bind(void* self, QObject* param1) { + return ( (MiqtVirtualQCamera*)(self) )->virtualbase_Bind(param1); +} + +void QCamera_override_virtual_Unbind(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__Unbind = slot; +} + +void QCamera_virtualbase_Unbind(void* self, QObject* param1) { + ( (MiqtVirtualQCamera*)(self) )->virtualbase_Unbind(param1); +} + +void QCamera_Delete(QCamera* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QCamera__FrameRateRange_new(QCamera__FrameRateRange** outptr_QCamera__FrameRateRange) { + QCamera::FrameRateRange* ret = new QCamera::FrameRateRange(); + *outptr_QCamera__FrameRateRange = ret; +} + +void QCamera__FrameRateRange_new2(double minimum, double maximum, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange) { + QCamera::FrameRateRange* ret = new QCamera::FrameRateRange(static_cast(minimum), static_cast(maximum)); + *outptr_QCamera__FrameRateRange = ret; +} + +void QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange) { + QCamera::FrameRateRange* ret = new QCamera::FrameRateRange(*param1); + *outptr_QCamera__FrameRateRange = ret; +} + +void QCamera__FrameRateRange_Delete(QCamera__FrameRateRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcamera.go b/qt/multimedia/gen_qcamera.go index 4da99935..57317659 100644 --- a/qt/multimedia/gen_qcamera.go +++ b/qt/multimedia/gen_qcamera.go @@ -91,7 +91,8 @@ const ( ) type QCamera struct { - h *C.QCamera + h *C.QCamera + isSubclass bool *QMediaObject } @@ -109,21 +110,35 @@ func (this *QCamera) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCamera(h *C.QCamera) *QCamera { +// newQCamera constructs the type using only CGO pointers. +func newQCamera(h *C.QCamera, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QCamera { if h == nil { return nil } - return &QCamera{h: h, QMediaObject: UnsafeNewQMediaObject(unsafe.Pointer(h))} + return &QCamera{h: h, + QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} } -func UnsafeNewQCamera(h unsafe.Pointer) *QCamera { - return newQCamera((*C.QCamera)(h)) +// UnsafeNewQCamera constructs the type using only unsafe pointers. +func UnsafeNewQCamera(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QCamera { + if h == nil { + return nil + } + + return &QCamera{h: (*C.QCamera)(h), + QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} } // NewQCamera constructs a new QCamera object. func NewQCamera() *QCamera { - ret := C.QCamera_new() - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new(&outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera2 constructs a new QCamera object. @@ -131,26 +146,50 @@ func NewQCamera2(deviceName []byte) *QCamera { deviceName_alias := C.struct_miqt_string{} deviceName_alias.data = (*C.char)(unsafe.Pointer(&deviceName[0])) deviceName_alias.len = C.size_t(len(deviceName)) - ret := C.QCamera_new2(deviceName_alias) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new2(deviceName_alias, &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera3 constructs a new QCamera object. func NewQCamera3(cameraInfo *QCameraInfo) *QCamera { - ret := C.QCamera_new3(cameraInfo.cPointer()) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new3(cameraInfo.cPointer(), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera4 constructs a new QCamera object. func NewQCamera4(position QCamera__Position) *QCamera { - ret := C.QCamera_new4((C.int)(position)) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new4((C.int)(position), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera5 constructs a new QCamera object. func NewQCamera5(parent *qt.QObject) *QCamera { - ret := C.QCamera_new5((*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new5((*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera6 constructs a new QCamera object. @@ -158,20 +197,38 @@ func NewQCamera6(deviceName []byte, parent *qt.QObject) *QCamera { deviceName_alias := C.struct_miqt_string{} deviceName_alias.data = (*C.char)(unsafe.Pointer(&deviceName[0])) deviceName_alias.len = C.size_t(len(deviceName)) - ret := C.QCamera_new6(deviceName_alias, (*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new6(deviceName_alias, (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera7 constructs a new QCamera object. func NewQCamera7(cameraInfo *QCameraInfo, parent *qt.QObject) *QCamera { - ret := C.QCamera_new7(cameraInfo.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new7(cameraInfo.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera8 constructs a new QCamera object. func NewQCamera8(position QCamera__Position, parent *qt.QObject) *QCamera { - ret := C.QCamera_new8((C.int)(position), (*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new8((C.int)(position), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCamera) MetaObject() *qt.QMetaObject { @@ -246,15 +303,15 @@ func (this *QCamera) IsCaptureModeSupported(mode QCamera__CaptureMode) bool { } func (this *QCamera) Exposure() *QCameraExposure { - return UnsafeNewQCameraExposure(unsafe.Pointer(C.QCamera_Exposure(this.h))) + return UnsafeNewQCameraExposure(unsafe.Pointer(C.QCamera_Exposure(this.h)), nil) } func (this *QCamera) Focus() *QCameraFocus { - return UnsafeNewQCameraFocus(unsafe.Pointer(C.QCamera_Focus(this.h))) + return UnsafeNewQCameraFocus(unsafe.Pointer(C.QCamera_Focus(this.h)), nil) } func (this *QCamera) ImageProcessing() *QCameraImageProcessing { - return UnsafeNewQCameraImageProcessing(unsafe.Pointer(C.QCamera_ImageProcessing(this.h))) + return UnsafeNewQCameraImageProcessing(unsafe.Pointer(C.QCamera_ImageProcessing(this.h)), nil) } func (this *QCamera) SetViewfinder(viewfinder *QVideoWidget) { @@ -665,9 +722,122 @@ func (this *QCamera) SupportedViewfinderPixelFormats1(settings *QCameraViewfinde return _ret } +func (this *QCamera) callVirtualBase_Availability() QMultimedia__AvailabilityStatus { + + return (QMultimedia__AvailabilityStatus)(C.QCamera_virtualbase_Availability(unsafe.Pointer(this.h))) + +} +func (this *QCamera) OnAvailability(slot func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) { + C.QCamera_override_virtual_Availability(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_Availability +func miqt_exec_callback_QCamera_Availability(self *C.QCamera, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCamera{h: self}).callVirtualBase_Availability) + + return (C.int)(virtualReturn) + +} + +func (this *QCamera) callVirtualBase_IsAvailable() bool { + + return (bool)(C.QCamera_virtualbase_IsAvailable(unsafe.Pointer(this.h))) + +} +func (this *QCamera) OnIsAvailable(slot func(super func() bool) bool) { + C.QCamera_override_virtual_IsAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_IsAvailable +func miqt_exec_callback_QCamera_IsAvailable(self *C.QCamera, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCamera{h: self}).callVirtualBase_IsAvailable) + + return (C.bool)(virtualReturn) + +} + +func (this *QCamera) callVirtualBase_Service() *QMediaService { + + return UnsafeNewQMediaService(unsafe.Pointer(C.QCamera_virtualbase_Service(unsafe.Pointer(this.h))), nil) +} +func (this *QCamera) OnService(slot func(super func() *QMediaService) *QMediaService) { + C.QCamera_override_virtual_Service(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_Service +func miqt_exec_callback_QCamera_Service(self *C.QCamera, cb C.intptr_t) *C.QMediaService { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaService) *QMediaService) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCamera{h: self}).callVirtualBase_Service) + + return virtualReturn.cPointer() + +} + +func (this *QCamera) callVirtualBase_Bind(param1 *qt.QObject) bool { + + return (bool)(C.QCamera_virtualbase_Bind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()))) + +} +func (this *QCamera) OnBind(slot func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) { + C.QCamera_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_Bind +func miqt_exec_callback_QCamera_Bind(self *C.QCamera, cb C.intptr_t, param1 *C.QObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QCamera{h: self}).callVirtualBase_Bind, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCamera) callVirtualBase_Unbind(param1 *qt.QObject) { + + C.QCamera_virtualbase_Unbind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer())) + +} +func (this *QCamera) OnUnbind(slot func(super func(param1 *qt.QObject), param1 *qt.QObject)) { + C.QCamera_override_virtual_Unbind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_Unbind +func miqt_exec_callback_QCamera_Unbind(self *C.QCamera, cb C.intptr_t, param1 *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject), param1 *qt.QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + gofunc((&QCamera{h: self}).callVirtualBase_Unbind, slotval1) + +} + // Delete this object from C++ memory. func (this *QCamera) Delete() { - C.QCamera_Delete(this.h) + C.QCamera_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -680,7 +850,8 @@ func (this *QCamera) GoGC() { } type QCamera__FrameRateRange struct { - h *C.QCamera__FrameRateRange + h *C.QCamera__FrameRateRange + isSubclass bool } func (this *QCamera__FrameRateRange) cPointer() *C.QCamera__FrameRateRange { @@ -697,6 +868,7 @@ func (this *QCamera__FrameRateRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCamera__FrameRateRange constructs the type using only CGO pointers. func newQCamera__FrameRateRange(h *C.QCamera__FrameRateRange) *QCamera__FrameRateRange { if h == nil { return nil @@ -704,31 +876,48 @@ func newQCamera__FrameRateRange(h *C.QCamera__FrameRateRange) *QCamera__FrameRat return &QCamera__FrameRateRange{h: h} } +// UnsafeNewQCamera__FrameRateRange constructs the type using only unsafe pointers. func UnsafeNewQCamera__FrameRateRange(h unsafe.Pointer) *QCamera__FrameRateRange { - return newQCamera__FrameRateRange((*C.QCamera__FrameRateRange)(h)) + if h == nil { + return nil + } + + return &QCamera__FrameRateRange{h: (*C.QCamera__FrameRateRange)(h)} } // NewQCamera__FrameRateRange constructs a new QCamera::FrameRateRange object. func NewQCamera__FrameRateRange() *QCamera__FrameRateRange { - ret := C.QCamera__FrameRateRange_new() - return newQCamera__FrameRateRange(ret) + var outptr_QCamera__FrameRateRange *C.QCamera__FrameRateRange = nil + + C.QCamera__FrameRateRange_new(&outptr_QCamera__FrameRateRange) + ret := newQCamera__FrameRateRange(outptr_QCamera__FrameRateRange) + ret.isSubclass = true + return ret } // NewQCamera__FrameRateRange2 constructs a new QCamera::FrameRateRange object. func NewQCamera__FrameRateRange2(minimum float64, maximum float64) *QCamera__FrameRateRange { - ret := C.QCamera__FrameRateRange_new2((C.double)(minimum), (C.double)(maximum)) - return newQCamera__FrameRateRange(ret) + var outptr_QCamera__FrameRateRange *C.QCamera__FrameRateRange = nil + + C.QCamera__FrameRateRange_new2((C.double)(minimum), (C.double)(maximum), &outptr_QCamera__FrameRateRange) + ret := newQCamera__FrameRateRange(outptr_QCamera__FrameRateRange) + ret.isSubclass = true + return ret } // NewQCamera__FrameRateRange3 constructs a new QCamera::FrameRateRange object. func NewQCamera__FrameRateRange3(param1 *QCamera__FrameRateRange) *QCamera__FrameRateRange { - ret := C.QCamera__FrameRateRange_new3(param1.cPointer()) - return newQCamera__FrameRateRange(ret) + var outptr_QCamera__FrameRateRange *C.QCamera__FrameRateRange = nil + + C.QCamera__FrameRateRange_new3(param1.cPointer(), &outptr_QCamera__FrameRateRange) + ret := newQCamera__FrameRateRange(outptr_QCamera__FrameRateRange) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QCamera__FrameRateRange) Delete() { - C.QCamera__FrameRateRange_Delete(this.h) + C.QCamera__FrameRateRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcamera.h b/qt/multimedia/gen_qcamera.h index 48dc1ede..37126e09 100644 --- a/qt/multimedia/gen_qcamera.h +++ b/qt/multimedia/gen_qcamera.h @@ -29,6 +29,8 @@ class QCameraImageProcessing; class QCameraInfo; class QCameraViewfinderSettings; class QGraphicsVideoItem; +class QMediaObject; +class QMediaService; class QMetaObject; class QObject; class QSize; @@ -44,20 +46,22 @@ typedef struct QCameraImageProcessing QCameraImageProcessing; typedef struct QCameraInfo QCameraInfo; typedef struct QCameraViewfinderSettings QCameraViewfinderSettings; typedef struct QGraphicsVideoItem QGraphicsVideoItem; +typedef struct QMediaObject QMediaObject; +typedef struct QMediaService QMediaService; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSize QSize; typedef struct QVideoWidget QVideoWidget; #endif -QCamera* QCamera_new(); -QCamera* QCamera_new2(struct miqt_string deviceName); -QCamera* QCamera_new3(QCameraInfo* cameraInfo); -QCamera* QCamera_new4(int position); -QCamera* QCamera_new5(QObject* parent); -QCamera* QCamera_new6(struct miqt_string deviceName, QObject* parent); -QCamera* QCamera_new7(QCameraInfo* cameraInfo, QObject* parent); -QCamera* QCamera_new8(int position, QObject* parent); +void QCamera_new(QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new2(struct miqt_string deviceName, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new3(QCameraInfo* cameraInfo, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new4(int position, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new5(QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new6(struct miqt_string deviceName, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new7(QCameraInfo* cameraInfo, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QCamera_new8(int position, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); QMetaObject* QCamera_MetaObject(const QCamera* self); void* QCamera_Metacast(QCamera* self, const char* param1); struct miqt_string QCamera_Tr(const char* s); @@ -122,12 +126,22 @@ struct miqt_array /* of QCameraViewfinderSettings* */ QCamera_SupportedViewfind struct miqt_array /* of QSize* */ QCamera_SupportedViewfinderResolutions1(const QCamera* self, QCameraViewfinderSettings* settings); struct miqt_array /* of QCamera__FrameRateRange* */ QCamera_SupportedViewfinderFrameRateRanges1(const QCamera* self, QCameraViewfinderSettings* settings); struct miqt_array /* of int */ QCamera_SupportedViewfinderPixelFormats1(const QCamera* self, QCameraViewfinderSettings* settings); -void QCamera_Delete(QCamera* self); +void QCamera_override_virtual_Availability(void* self, intptr_t slot); +int QCamera_virtualbase_Availability(const void* self); +void QCamera_override_virtual_IsAvailable(void* self, intptr_t slot); +bool QCamera_virtualbase_IsAvailable(const void* self); +void QCamera_override_virtual_Service(void* self, intptr_t slot); +QMediaService* QCamera_virtualbase_Service(const void* self); +void QCamera_override_virtual_Bind(void* self, intptr_t slot); +bool QCamera_virtualbase_Bind(void* self, QObject* param1); +void QCamera_override_virtual_Unbind(void* self, intptr_t slot); +void QCamera_virtualbase_Unbind(void* self, QObject* param1); +void QCamera_Delete(QCamera* self, bool isSubclass); -QCamera__FrameRateRange* QCamera__FrameRateRange_new(); -QCamera__FrameRateRange* QCamera__FrameRateRange_new2(double minimum, double maximum); -QCamera__FrameRateRange* QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1); -void QCamera__FrameRateRange_Delete(QCamera__FrameRateRange* self); +void QCamera__FrameRateRange_new(QCamera__FrameRateRange** outptr_QCamera__FrameRateRange); +void QCamera__FrameRateRange_new2(double minimum, double maximum, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange); +void QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange); +void QCamera__FrameRateRange_Delete(QCamera__FrameRateRange* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp b/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp index 3ce6a2b4..f959480d 100644 --- a/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp +++ b/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -117,7 +119,11 @@ struct miqt_string QCameraCaptureBufferFormatControl_TrUtf83(const char* s, cons return _ms; } -void QCameraCaptureBufferFormatControl_Delete(QCameraCaptureBufferFormatControl* self) { - delete self; +void QCameraCaptureBufferFormatControl_Delete(QCameraCaptureBufferFormatControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameracapturebufferformatcontrol.go b/qt/multimedia/gen_qcameracapturebufferformatcontrol.go index db9b8022..b6307c1e 100644 --- a/qt/multimedia/gen_qcameracapturebufferformatcontrol.go +++ b/qt/multimedia/gen_qcameracapturebufferformatcontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraCaptureBufferFormatControl struct { - h *C.QCameraCaptureBufferFormatControl + h *C.QCameraCaptureBufferFormatControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraCaptureBufferFormatControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraCaptureBufferFormatControl(h *C.QCameraCaptureBufferFormatControl) *QCameraCaptureBufferFormatControl { +// newQCameraCaptureBufferFormatControl constructs the type using only CGO pointers. +func newQCameraCaptureBufferFormatControl(h *C.QCameraCaptureBufferFormatControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraCaptureBufferFormatControl { if h == nil { return nil } - return &QCameraCaptureBufferFormatControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraCaptureBufferFormatControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraCaptureBufferFormatControl(h unsafe.Pointer) *QCameraCaptureBufferFormatControl { - return newQCameraCaptureBufferFormatControl((*C.QCameraCaptureBufferFormatControl)(h)) +// UnsafeNewQCameraCaptureBufferFormatControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraCaptureBufferFormatControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraCaptureBufferFormatControl { + if h == nil { + return nil + } + + return &QCameraCaptureBufferFormatControl{h: (*C.QCameraCaptureBufferFormatControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraCaptureBufferFormatControl) MetaObject() *qt.QMetaObject { @@ -157,7 +166,7 @@ func QCameraCaptureBufferFormatControl_TrUtf83(s string, c string, n int) string // Delete this object from C++ memory. func (this *QCameraCaptureBufferFormatControl) Delete() { - C.QCameraCaptureBufferFormatControl_Delete(this.h) + C.QCameraCaptureBufferFormatControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameracapturebufferformatcontrol.h b/qt/multimedia/gen_qcameracapturebufferformatcontrol.h index 5e67135b..e5377b6f 100644 --- a/qt/multimedia/gen_qcameracapturebufferformatcontrol.h +++ b/qt/multimedia/gen_qcameracapturebufferformatcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraCaptureBufferFormatControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraCaptureBufferFormatControl QCameraCaptureBufferFormatControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraCaptureBufferFormatControl_MetaObject(const QCameraCaptureBufferFormatControl* self); @@ -35,7 +39,7 @@ struct miqt_string QCameraCaptureBufferFormatControl_Tr2(const char* s, const ch struct miqt_string QCameraCaptureBufferFormatControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraCaptureBufferFormatControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraCaptureBufferFormatControl_TrUtf83(const char* s, const char* c, int n); -void QCameraCaptureBufferFormatControl_Delete(QCameraCaptureBufferFormatControl* self); +void QCameraCaptureBufferFormatControl_Delete(QCameraCaptureBufferFormatControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp b/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp index 589a0cfe..b3da2fd1 100644 --- a/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp +++ b/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -106,7 +108,11 @@ struct miqt_string QCameraCaptureDestinationControl_TrUtf83(const char* s, const return _ms; } -void QCameraCaptureDestinationControl_Delete(QCameraCaptureDestinationControl* self) { - delete self; +void QCameraCaptureDestinationControl_Delete(QCameraCaptureDestinationControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameracapturedestinationcontrol.go b/qt/multimedia/gen_qcameracapturedestinationcontrol.go index 07adf4c5..dc97fa81 100644 --- a/qt/multimedia/gen_qcameracapturedestinationcontrol.go +++ b/qt/multimedia/gen_qcameracapturedestinationcontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraCaptureDestinationControl struct { - h *C.QCameraCaptureDestinationControl + h *C.QCameraCaptureDestinationControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraCaptureDestinationControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraCaptureDestinationControl(h *C.QCameraCaptureDestinationControl) *QCameraCaptureDestinationControl { +// newQCameraCaptureDestinationControl constructs the type using only CGO pointers. +func newQCameraCaptureDestinationControl(h *C.QCameraCaptureDestinationControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraCaptureDestinationControl { if h == nil { return nil } - return &QCameraCaptureDestinationControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraCaptureDestinationControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraCaptureDestinationControl(h unsafe.Pointer) *QCameraCaptureDestinationControl { - return newQCameraCaptureDestinationControl((*C.QCameraCaptureDestinationControl)(h)) +// UnsafeNewQCameraCaptureDestinationControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraCaptureDestinationControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraCaptureDestinationControl { + if h == nil { + return nil + } + + return &QCameraCaptureDestinationControl{h: (*C.QCameraCaptureDestinationControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraCaptureDestinationControl) MetaObject() *qt.QMetaObject { @@ -151,7 +160,7 @@ func QCameraCaptureDestinationControl_TrUtf83(s string, c string, n int) string // Delete this object from C++ memory. func (this *QCameraCaptureDestinationControl) Delete() { - C.QCameraCaptureDestinationControl_Delete(this.h) + C.QCameraCaptureDestinationControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameracapturedestinationcontrol.h b/qt/multimedia/gen_qcameracapturedestinationcontrol.h index 3a608a3c..6e4926bb 100644 --- a/qt/multimedia/gen_qcameracapturedestinationcontrol.h +++ b/qt/multimedia/gen_qcameracapturedestinationcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraCaptureDestinationControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraCaptureDestinationControl QCameraCaptureDestinationControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraCaptureDestinationControl_MetaObject(const QCameraCaptureDestinationControl* self); @@ -35,7 +39,7 @@ struct miqt_string QCameraCaptureDestinationControl_Tr2(const char* s, const cha struct miqt_string QCameraCaptureDestinationControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraCaptureDestinationControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraCaptureDestinationControl_TrUtf83(const char* s, const char* c, int n); -void QCameraCaptureDestinationControl_Delete(QCameraCaptureDestinationControl* self); +void QCameraCaptureDestinationControl_Delete(QCameraCaptureDestinationControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameracontrol.cpp b/qt/multimedia/gen_qcameracontrol.cpp index f8c707df..9ba9d951 100644 --- a/qt/multimedia/gen_qcameracontrol.cpp +++ b/qt/multimedia/gen_qcameracontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -168,7 +170,11 @@ struct miqt_string QCameraControl_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QCameraControl_Delete(QCameraControl* self) { - delete self; +void QCameraControl_Delete(QCameraControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameracontrol.go b/qt/multimedia/gen_qcameracontrol.go index 59a3a84c..e7e01e7f 100644 --- a/qt/multimedia/gen_qcameracontrol.go +++ b/qt/multimedia/gen_qcameracontrol.go @@ -26,7 +26,8 @@ const ( ) type QCameraControl struct { - h *C.QCameraControl + h *C.QCameraControl + isSubclass bool *QMediaControl } @@ -44,15 +45,23 @@ func (this *QCameraControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraControl(h *C.QCameraControl) *QCameraControl { +// newQCameraControl constructs the type using only CGO pointers. +func newQCameraControl(h *C.QCameraControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraControl { if h == nil { return nil } - return &QCameraControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraControl(h unsafe.Pointer) *QCameraControl { - return newQCameraControl((*C.QCameraControl)(h)) +// UnsafeNewQCameraControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraControl { + if h == nil { + return nil + } + + return &QCameraControl{h: (*C.QCameraControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraControl) MetaObject() *qt.QMetaObject { @@ -246,7 +255,7 @@ func QCameraControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraControl) Delete() { - C.QCameraControl_Delete(this.h) + C.QCameraControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameracontrol.h b/qt/multimedia/gen_qcameracontrol.h index bd9f437d..6b167b2c 100644 --- a/qt/multimedia/gen_qcameracontrol.h +++ b/qt/multimedia/gen_qcameracontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraControl QCameraControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraControl_MetaObject(const QCameraControl* self); @@ -45,7 +49,7 @@ struct miqt_string QCameraControl_Tr2(const char* s, const char* c); struct miqt_string QCameraControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraControl_TrUtf83(const char* s, const char* c, int n); -void QCameraControl_Delete(QCameraControl* self); +void QCameraControl_Delete(QCameraControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraexposure.cpp b/qt/multimedia/gen_qcameraexposure.cpp index 2d8f6219..2df53f9e 100644 --- a/qt/multimedia/gen_qcameraexposure.cpp +++ b/qt/multimedia/gen_qcameraexposure.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/multimedia/gen_qcameraexposure.go b/qt/multimedia/gen_qcameraexposure.go index 12262304..b0f47e06 100644 --- a/qt/multimedia/gen_qcameraexposure.go +++ b/qt/multimedia/gen_qcameraexposure.go @@ -65,7 +65,8 @@ const ( ) type QCameraExposure struct { - h *C.QCameraExposure + h *C.QCameraExposure + isSubclass bool *qt.QObject } @@ -83,15 +84,23 @@ func (this *QCameraExposure) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraExposure(h *C.QCameraExposure) *QCameraExposure { +// newQCameraExposure constructs the type using only CGO pointers. +func newQCameraExposure(h *C.QCameraExposure, h_QObject *C.QObject) *QCameraExposure { if h == nil { return nil } - return &QCameraExposure{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QCameraExposure{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQCameraExposure(h unsafe.Pointer) *QCameraExposure { - return newQCameraExposure((*C.QCameraExposure)(h)) +// UnsafeNewQCameraExposure constructs the type using only unsafe pointers. +func UnsafeNewQCameraExposure(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraExposure { + if h == nil { + return nil + } + + return &QCameraExposure{h: (*C.QCameraExposure)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QCameraExposure) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraexposure.h b/qt/multimedia/gen_qcameraexposure.h index 3c70d4fc..cea55878 100644 --- a/qt/multimedia/gen_qcameraexposure.h +++ b/qt/multimedia/gen_qcameraexposure.h @@ -17,10 +17,12 @@ extern "C" { #ifdef __cplusplus class QCameraExposure; class QMetaObject; +class QObject; class QPointF; #else typedef struct QCameraExposure QCameraExposure; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPointF QPointF; #endif diff --git a/qt/multimedia/gen_qcameraexposurecontrol.cpp b/qt/multimedia/gen_qcameraexposurecontrol.cpp index 4d55c0ab..c12406aa 100644 --- a/qt/multimedia/gen_qcameraexposurecontrol.cpp +++ b/qt/multimedia/gen_qcameraexposurecontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -131,7 +133,11 @@ struct miqt_string QCameraExposureControl_TrUtf83(const char* s, const char* c, return _ms; } -void QCameraExposureControl_Delete(QCameraExposureControl* self) { - delete self; +void QCameraExposureControl_Delete(QCameraExposureControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraexposurecontrol.go b/qt/multimedia/gen_qcameraexposurecontrol.go index cb716ce0..4cf83f9d 100644 --- a/qt/multimedia/gen_qcameraexposurecontrol.go +++ b/qt/multimedia/gen_qcameraexposurecontrol.go @@ -32,7 +32,8 @@ const ( ) type QCameraExposureControl struct { - h *C.QCameraExposureControl + h *C.QCameraExposureControl + isSubclass bool *QMediaControl } @@ -50,15 +51,23 @@ func (this *QCameraExposureControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraExposureControl(h *C.QCameraExposureControl) *QCameraExposureControl { +// newQCameraExposureControl constructs the type using only CGO pointers. +func newQCameraExposureControl(h *C.QCameraExposureControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraExposureControl { if h == nil { return nil } - return &QCameraExposureControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraExposureControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraExposureControl(h unsafe.Pointer) *QCameraExposureControl { - return newQCameraExposureControl((*C.QCameraExposureControl)(h)) +// UnsafeNewQCameraExposureControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraExposureControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraExposureControl { + if h == nil { + return nil + } + + return &QCameraExposureControl{h: (*C.QCameraExposureControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraExposureControl) MetaObject() *qt.QMetaObject { @@ -217,7 +226,7 @@ func QCameraExposureControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraExposureControl) Delete() { - C.QCameraExposureControl_Delete(this.h) + C.QCameraExposureControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraexposurecontrol.h b/qt/multimedia/gen_qcameraexposurecontrol.h index 4dad2e18..ceee65f2 100644 --- a/qt/multimedia/gen_qcameraexposurecontrol.h +++ b/qt/multimedia/gen_qcameraexposurecontrol.h @@ -16,11 +16,15 @@ extern "C" { #ifdef __cplusplus class QCameraExposureControl; +class QMediaControl; class QMetaObject; +class QObject; class QVariant; #else typedef struct QCameraExposureControl QCameraExposureControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; #endif @@ -42,7 +46,7 @@ struct miqt_string QCameraExposureControl_Tr2(const char* s, const char* c); struct miqt_string QCameraExposureControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraExposureControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraExposureControl_TrUtf83(const char* s, const char* c, int n); -void QCameraExposureControl_Delete(QCameraExposureControl* self); +void QCameraExposureControl_Delete(QCameraExposureControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcamerafeedbackcontrol.cpp b/qt/multimedia/gen_qcamerafeedbackcontrol.cpp index 8f52649a..e02d1493 100644 --- a/qt/multimedia/gen_qcamerafeedbackcontrol.cpp +++ b/qt/multimedia/gen_qcamerafeedbackcontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -102,7 +104,11 @@ struct miqt_string QCameraFeedbackControl_TrUtf83(const char* s, const char* c, return _ms; } -void QCameraFeedbackControl_Delete(QCameraFeedbackControl* self) { - delete self; +void QCameraFeedbackControl_Delete(QCameraFeedbackControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcamerafeedbackcontrol.go b/qt/multimedia/gen_qcamerafeedbackcontrol.go index ad1eb536..12773622 100644 --- a/qt/multimedia/gen_qcamerafeedbackcontrol.go +++ b/qt/multimedia/gen_qcamerafeedbackcontrol.go @@ -31,7 +31,8 @@ const ( ) type QCameraFeedbackControl struct { - h *C.QCameraFeedbackControl + h *C.QCameraFeedbackControl + isSubclass bool *QMediaControl } @@ -49,15 +50,23 @@ func (this *QCameraFeedbackControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraFeedbackControl(h *C.QCameraFeedbackControl) *QCameraFeedbackControl { +// newQCameraFeedbackControl constructs the type using only CGO pointers. +func newQCameraFeedbackControl(h *C.QCameraFeedbackControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraFeedbackControl { if h == nil { return nil } - return &QCameraFeedbackControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraFeedbackControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraFeedbackControl(h unsafe.Pointer) *QCameraFeedbackControl { - return newQCameraFeedbackControl((*C.QCameraFeedbackControl)(h)) +// UnsafeNewQCameraFeedbackControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraFeedbackControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFeedbackControl { + if h == nil { + return nil + } + + return &QCameraFeedbackControl{h: (*C.QCameraFeedbackControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraFeedbackControl) MetaObject() *qt.QMetaObject { @@ -158,7 +167,7 @@ func QCameraFeedbackControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraFeedbackControl) Delete() { - C.QCameraFeedbackControl_Delete(this.h) + C.QCameraFeedbackControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcamerafeedbackcontrol.h b/qt/multimedia/gen_qcamerafeedbackcontrol.h index abdb8227..07124a54 100644 --- a/qt/multimedia/gen_qcamerafeedbackcontrol.h +++ b/qt/multimedia/gen_qcamerafeedbackcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraFeedbackControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraFeedbackControl QCameraFeedbackControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraFeedbackControl_MetaObject(const QCameraFeedbackControl* self); @@ -35,7 +39,7 @@ struct miqt_string QCameraFeedbackControl_Tr2(const char* s, const char* c); struct miqt_string QCameraFeedbackControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraFeedbackControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraFeedbackControl_TrUtf83(const char* s, const char* c, int n); -void QCameraFeedbackControl_Delete(QCameraFeedbackControl* self); +void QCameraFeedbackControl_Delete(QCameraFeedbackControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraflashcontrol.cpp b/qt/multimedia/gen_qcameraflashcontrol.cpp index effb8975..5f563202 100644 --- a/qt/multimedia/gen_qcameraflashcontrol.cpp +++ b/qt/multimedia/gen_qcameraflashcontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -109,7 +111,11 @@ struct miqt_string QCameraFlashControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QCameraFlashControl_Delete(QCameraFlashControl* self) { - delete self; +void QCameraFlashControl_Delete(QCameraFlashControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraflashcontrol.go b/qt/multimedia/gen_qcameraflashcontrol.go index b29824f8..6dfd93e4 100644 --- a/qt/multimedia/gen_qcameraflashcontrol.go +++ b/qt/multimedia/gen_qcameraflashcontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraFlashControl struct { - h *C.QCameraFlashControl + h *C.QCameraFlashControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraFlashControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraFlashControl(h *C.QCameraFlashControl) *QCameraFlashControl { +// newQCameraFlashControl constructs the type using only CGO pointers. +func newQCameraFlashControl(h *C.QCameraFlashControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraFlashControl { if h == nil { return nil } - return &QCameraFlashControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraFlashControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraFlashControl(h unsafe.Pointer) *QCameraFlashControl { - return newQCameraFlashControl((*C.QCameraFlashControl)(h)) +// UnsafeNewQCameraFlashControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraFlashControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFlashControl { + if h == nil { + return nil + } + + return &QCameraFlashControl{h: (*C.QCameraFlashControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraFlashControl) MetaObject() *qt.QMetaObject { @@ -155,7 +164,7 @@ func QCameraFlashControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraFlashControl) Delete() { - C.QCameraFlashControl_Delete(this.h) + C.QCameraFlashControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraflashcontrol.h b/qt/multimedia/gen_qcameraflashcontrol.h index 80acfecd..2a60b3e9 100644 --- a/qt/multimedia/gen_qcameraflashcontrol.h +++ b/qt/multimedia/gen_qcameraflashcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraFlashControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraFlashControl QCameraFlashControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraFlashControl_MetaObject(const QCameraFlashControl* self); @@ -36,7 +40,7 @@ struct miqt_string QCameraFlashControl_Tr2(const char* s, const char* c); struct miqt_string QCameraFlashControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraFlashControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraFlashControl_TrUtf83(const char* s, const char* c, int n); -void QCameraFlashControl_Delete(QCameraFlashControl* self); +void QCameraFlashControl_Delete(QCameraFlashControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcamerafocus.cpp b/qt/multimedia/gen_qcamerafocus.cpp index 5e66c2dd..72d80ce4 100644 --- a/qt/multimedia/gen_qcamerafocus.cpp +++ b/qt/multimedia/gen_qcamerafocus.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -11,20 +12,24 @@ #include "gen_qcamerafocus.h" #include "_cgo_export.h" -QCameraFocusZone* QCameraFocusZone_new() { - return new QCameraFocusZone(); +void QCameraFocusZone_new(QCameraFocusZone** outptr_QCameraFocusZone) { + QCameraFocusZone* ret = new QCameraFocusZone(); + *outptr_QCameraFocusZone = ret; } -QCameraFocusZone* QCameraFocusZone_new2(QRectF* area) { - return new QCameraFocusZone(*area); +void QCameraFocusZone_new2(QRectF* area, QCameraFocusZone** outptr_QCameraFocusZone) { + QCameraFocusZone* ret = new QCameraFocusZone(*area); + *outptr_QCameraFocusZone = ret; } -QCameraFocusZone* QCameraFocusZone_new3(QCameraFocusZone* other) { - return new QCameraFocusZone(*other); +void QCameraFocusZone_new3(QCameraFocusZone* other, QCameraFocusZone** outptr_QCameraFocusZone) { + QCameraFocusZone* ret = new QCameraFocusZone(*other); + *outptr_QCameraFocusZone = ret; } -QCameraFocusZone* QCameraFocusZone_new4(QRectF* area, int status) { - return new QCameraFocusZone(*area, static_cast(status)); +void QCameraFocusZone_new4(QRectF* area, int status, QCameraFocusZone** outptr_QCameraFocusZone) { + QCameraFocusZone* ret = new QCameraFocusZone(*area, static_cast(status)); + *outptr_QCameraFocusZone = ret; } void QCameraFocusZone_OperatorAssign(QCameraFocusZone* self, QCameraFocusZone* other) { @@ -56,8 +61,12 @@ void QCameraFocusZone_SetStatus(QCameraFocusZone* self, int status) { self->setStatus(static_cast(status)); } -void QCameraFocusZone_Delete(QCameraFocusZone* self) { - delete self; +void QCameraFocusZone_Delete(QCameraFocusZone* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QCameraFocus_MetaObject(const QCameraFocus* self) { diff --git a/qt/multimedia/gen_qcamerafocus.go b/qt/multimedia/gen_qcamerafocus.go index ea21bb0d..4851b971 100644 --- a/qt/multimedia/gen_qcamerafocus.go +++ b/qt/multimedia/gen_qcamerafocus.go @@ -45,7 +45,8 @@ const ( ) type QCameraFocusZone struct { - h *C.QCameraFocusZone + h *C.QCameraFocusZone + isSubclass bool } func (this *QCameraFocusZone) cPointer() *C.QCameraFocusZone { @@ -62,6 +63,7 @@ func (this *QCameraFocusZone) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCameraFocusZone constructs the type using only CGO pointers. func newQCameraFocusZone(h *C.QCameraFocusZone) *QCameraFocusZone { if h == nil { return nil @@ -69,32 +71,53 @@ func newQCameraFocusZone(h *C.QCameraFocusZone) *QCameraFocusZone { return &QCameraFocusZone{h: h} } +// UnsafeNewQCameraFocusZone constructs the type using only unsafe pointers. func UnsafeNewQCameraFocusZone(h unsafe.Pointer) *QCameraFocusZone { - return newQCameraFocusZone((*C.QCameraFocusZone)(h)) + if h == nil { + return nil + } + + return &QCameraFocusZone{h: (*C.QCameraFocusZone)(h)} } // NewQCameraFocusZone constructs a new QCameraFocusZone object. func NewQCameraFocusZone() *QCameraFocusZone { - ret := C.QCameraFocusZone_new() - return newQCameraFocusZone(ret) + var outptr_QCameraFocusZone *C.QCameraFocusZone = nil + + C.QCameraFocusZone_new(&outptr_QCameraFocusZone) + ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret.isSubclass = true + return ret } // NewQCameraFocusZone2 constructs a new QCameraFocusZone object. func NewQCameraFocusZone2(area *qt.QRectF) *QCameraFocusZone { - ret := C.QCameraFocusZone_new2((*C.QRectF)(area.UnsafePointer())) - return newQCameraFocusZone(ret) + var outptr_QCameraFocusZone *C.QCameraFocusZone = nil + + C.QCameraFocusZone_new2((*C.QRectF)(area.UnsafePointer()), &outptr_QCameraFocusZone) + ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret.isSubclass = true + return ret } // NewQCameraFocusZone3 constructs a new QCameraFocusZone object. func NewQCameraFocusZone3(other *QCameraFocusZone) *QCameraFocusZone { - ret := C.QCameraFocusZone_new3(other.cPointer()) - return newQCameraFocusZone(ret) + var outptr_QCameraFocusZone *C.QCameraFocusZone = nil + + C.QCameraFocusZone_new3(other.cPointer(), &outptr_QCameraFocusZone) + ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret.isSubclass = true + return ret } // NewQCameraFocusZone4 constructs a new QCameraFocusZone object. func NewQCameraFocusZone4(area *qt.QRectF, status QCameraFocusZone__FocusZoneStatus) *QCameraFocusZone { - ret := C.QCameraFocusZone_new4((*C.QRectF)(area.UnsafePointer()), (C.int)(status)) - return newQCameraFocusZone(ret) + var outptr_QCameraFocusZone *C.QCameraFocusZone = nil + + C.QCameraFocusZone_new4((*C.QRectF)(area.UnsafePointer()), (C.int)(status), &outptr_QCameraFocusZone) + ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret.isSubclass = true + return ret } func (this *QCameraFocusZone) OperatorAssign(other *QCameraFocusZone) { @@ -130,7 +153,7 @@ func (this *QCameraFocusZone) SetStatus(status QCameraFocusZone__FocusZoneStatus // Delete this object from C++ memory. func (this *QCameraFocusZone) Delete() { - C.QCameraFocusZone_Delete(this.h) + C.QCameraFocusZone_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -143,7 +166,8 @@ func (this *QCameraFocusZone) GoGC() { } type QCameraFocus struct { - h *C.QCameraFocus + h *C.QCameraFocus + isSubclass bool *qt.QObject } @@ -161,15 +185,23 @@ func (this *QCameraFocus) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraFocus(h *C.QCameraFocus) *QCameraFocus { +// newQCameraFocus constructs the type using only CGO pointers. +func newQCameraFocus(h *C.QCameraFocus, h_QObject *C.QObject) *QCameraFocus { if h == nil { return nil } - return &QCameraFocus{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QCameraFocus{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQCameraFocus(h unsafe.Pointer) *QCameraFocus { - return newQCameraFocus((*C.QCameraFocus)(h)) +// UnsafeNewQCameraFocus constructs the type using only unsafe pointers. +func UnsafeNewQCameraFocus(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFocus { + if h == nil { + return nil + } + + return &QCameraFocus{h: (*C.QCameraFocus)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QCameraFocus) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcamerafocus.h b/qt/multimedia/gen_qcamerafocus.h index e4396178..c0145696 100644 --- a/qt/multimedia/gen_qcamerafocus.h +++ b/qt/multimedia/gen_qcamerafocus.h @@ -18,20 +18,22 @@ extern "C" { class QCameraFocus; class QCameraFocusZone; class QMetaObject; +class QObject; class QPointF; class QRectF; #else typedef struct QCameraFocus QCameraFocus; typedef struct QCameraFocusZone QCameraFocusZone; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPointF QPointF; typedef struct QRectF QRectF; #endif -QCameraFocusZone* QCameraFocusZone_new(); -QCameraFocusZone* QCameraFocusZone_new2(QRectF* area); -QCameraFocusZone* QCameraFocusZone_new3(QCameraFocusZone* other); -QCameraFocusZone* QCameraFocusZone_new4(QRectF* area, int status); +void QCameraFocusZone_new(QCameraFocusZone** outptr_QCameraFocusZone); +void QCameraFocusZone_new2(QRectF* area, QCameraFocusZone** outptr_QCameraFocusZone); +void QCameraFocusZone_new3(QCameraFocusZone* other, QCameraFocusZone** outptr_QCameraFocusZone); +void QCameraFocusZone_new4(QRectF* area, int status, QCameraFocusZone** outptr_QCameraFocusZone); void QCameraFocusZone_OperatorAssign(QCameraFocusZone* self, QCameraFocusZone* other); bool QCameraFocusZone_OperatorEqual(const QCameraFocusZone* self, QCameraFocusZone* other); bool QCameraFocusZone_OperatorNotEqual(const QCameraFocusZone* self, QCameraFocusZone* other); @@ -39,7 +41,7 @@ bool QCameraFocusZone_IsValid(const QCameraFocusZone* self); QRectF* QCameraFocusZone_Area(const QCameraFocusZone* self); int QCameraFocusZone_Status(const QCameraFocusZone* self); void QCameraFocusZone_SetStatus(QCameraFocusZone* self, int status); -void QCameraFocusZone_Delete(QCameraFocusZone* self); +void QCameraFocusZone_Delete(QCameraFocusZone* self, bool isSubclass); QMetaObject* QCameraFocus_MetaObject(const QCameraFocus* self); void* QCameraFocus_Metacast(QCameraFocus* self, const char* param1); diff --git a/qt/multimedia/gen_qcamerafocuscontrol.cpp b/qt/multimedia/gen_qcamerafocuscontrol.cpp index 6b60023b..f0a2c2e4 100644 --- a/qt/multimedia/gen_qcamerafocuscontrol.cpp +++ b/qt/multimedia/gen_qcamerafocuscontrol.cpp @@ -1,7 +1,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -178,7 +180,11 @@ struct miqt_string QCameraFocusControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QCameraFocusControl_Delete(QCameraFocusControl* self) { - delete self; +void QCameraFocusControl_Delete(QCameraFocusControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcamerafocuscontrol.go b/qt/multimedia/gen_qcamerafocuscontrol.go index ec23ca7d..8201a3d4 100644 --- a/qt/multimedia/gen_qcamerafocuscontrol.go +++ b/qt/multimedia/gen_qcamerafocuscontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraFocusControl struct { - h *C.QCameraFocusControl + h *C.QCameraFocusControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraFocusControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraFocusControl(h *C.QCameraFocusControl) *QCameraFocusControl { +// newQCameraFocusControl constructs the type using only CGO pointers. +func newQCameraFocusControl(h *C.QCameraFocusControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraFocusControl { if h == nil { return nil } - return &QCameraFocusControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraFocusControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraFocusControl(h unsafe.Pointer) *QCameraFocusControl { - return newQCameraFocusControl((*C.QCameraFocusControl)(h)) +// UnsafeNewQCameraFocusControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraFocusControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFocusControl { + if h == nil { + return nil + } + + return &QCameraFocusControl{h: (*C.QCameraFocusControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraFocusControl) MetaObject() *qt.QMetaObject { @@ -244,7 +253,7 @@ func QCameraFocusControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraFocusControl) Delete() { - C.QCameraFocusControl_Delete(this.h) + C.QCameraFocusControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcamerafocuscontrol.h b/qt/multimedia/gen_qcamerafocuscontrol.h index 55229fe3..bd3056dc 100644 --- a/qt/multimedia/gen_qcamerafocuscontrol.h +++ b/qt/multimedia/gen_qcamerafocuscontrol.h @@ -17,12 +17,16 @@ extern "C" { #ifdef __cplusplus class QCameraFocusControl; class QCameraFocusZone; +class QMediaControl; class QMetaObject; +class QObject; class QPointF; #else typedef struct QCameraFocusControl QCameraFocusControl; typedef struct QCameraFocusZone QCameraFocusZone; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPointF QPointF; #endif @@ -51,7 +55,7 @@ struct miqt_string QCameraFocusControl_Tr2(const char* s, const char* c); struct miqt_string QCameraFocusControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraFocusControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraFocusControl_TrUtf83(const char* s, const char* c, int n); -void QCameraFocusControl_Delete(QCameraFocusControl* self); +void QCameraFocusControl_Delete(QCameraFocusControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraimagecapture.cpp b/qt/multimedia/gen_qcameraimagecapture.cpp index 3cf5a923..a80e83c0 100644 --- a/qt/multimedia/gen_qcameraimagecapture.cpp +++ b/qt/multimedia/gen_qcameraimagecapture.cpp @@ -1,26 +1,263 @@ #include +#include +#include #include #include #include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include #include "gen_qcameraimagecapture.h" #include "_cgo_export.h" -QCameraImageCapture* QCameraImageCapture_new(QMediaObject* mediaObject) { - return new QCameraImageCapture(mediaObject); +class MiqtVirtualQCameraImageCapture : public virtual QCameraImageCapture { +public: + + MiqtVirtualQCameraImageCapture(QMediaObject* mediaObject): QCameraImageCapture(mediaObject) {}; + MiqtVirtualQCameraImageCapture(QMediaObject* mediaObject, QObject* parent): QCameraImageCapture(mediaObject, parent) {}; + + virtual ~MiqtVirtualQCameraImageCapture() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QCameraImageCapture::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QCameraImageCapture_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QCameraImageCapture::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* mediaObject) override { + if (handle__SetMediaObject == 0) { + return QCameraImageCapture::setMediaObject(mediaObject); + } + + QMediaObject* sigval1 = mediaObject; + + bool callback_return_value = miqt_exec_callback_QCameraImageCapture_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* mediaObject) { + + return QCameraImageCapture::setMediaObject(mediaObject); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QCameraImageCapture::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QCameraImageCapture_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QCameraImageCapture::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QCameraImageCapture::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QCameraImageCapture_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QCameraImageCapture::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QCameraImageCapture::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QCameraImageCapture_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QCameraImageCapture::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QCameraImageCapture::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QCameraImageCapture_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QCameraImageCapture::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QCameraImageCapture::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCameraImageCapture_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QCameraImageCapture::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QCameraImageCapture::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCameraImageCapture_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QCameraImageCapture::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QCameraImageCapture::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCameraImageCapture_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QCameraImageCapture::disconnectNotify(*signal); + + } + +}; + +void QCameraImageCapture_new(QMediaObject* mediaObject, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQCameraImageCapture* ret = new MiqtVirtualQCameraImageCapture(mediaObject); + *outptr_QCameraImageCapture = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QCameraImageCapture* QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent) { - return new QCameraImageCapture(mediaObject, parent); +void QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQCameraImageCapture* ret = new MiqtVirtualQCameraImageCapture(mediaObject, parent); + *outptr_QCameraImageCapture = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QCameraImageCapture_MetaObject(const QCameraImageCapture* self) { @@ -189,7 +426,7 @@ void QCameraImageCapture_Error2(QCameraImageCapture* self, int id, int error, st } void QCameraImageCapture_connect_Error2(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::error), self, [=](int id, QCameraImageCapture::Error error, const QString& errorString) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::error), self, [=](int id, QCameraImageCapture::Error error, const QString& errorString) { int sigval1 = id; QCameraImageCapture::Error error_ret = error; int sigval2 = static_cast(error_ret); @@ -210,7 +447,7 @@ void QCameraImageCapture_ReadyForCaptureChanged(QCameraImageCapture* self, bool } void QCameraImageCapture_connect_ReadyForCaptureChanged(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::readyForCaptureChanged), self, [=](bool ready) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::readyForCaptureChanged), self, [=](bool ready) { bool sigval1 = ready; miqt_exec_callback_QCameraImageCapture_ReadyForCaptureChanged(slot, sigval1); }); @@ -221,7 +458,7 @@ void QCameraImageCapture_BufferFormatChanged(QCameraImageCapture* self, int form } void QCameraImageCapture_connect_BufferFormatChanged(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::bufferFormatChanged), self, [=](QVideoFrame::PixelFormat format) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::bufferFormatChanged), self, [=](QVideoFrame::PixelFormat format) { QVideoFrame::PixelFormat format_ret = format; int sigval1 = static_cast(format_ret); miqt_exec_callback_QCameraImageCapture_BufferFormatChanged(slot, sigval1); @@ -233,7 +470,7 @@ void QCameraImageCapture_CaptureDestinationChanged(QCameraImageCapture* self, in } void QCameraImageCapture_connect_CaptureDestinationChanged(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::captureDestinationChanged), self, [=](QCameraImageCapture::CaptureDestinations destination) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::captureDestinationChanged), self, [=](QCameraImageCapture::CaptureDestinations destination) { QCameraImageCapture::CaptureDestinations destination_ret = destination; int sigval1 = static_cast(destination_ret); miqt_exec_callback_QCameraImageCapture_CaptureDestinationChanged(slot, sigval1); @@ -245,7 +482,7 @@ void QCameraImageCapture_ImageExposed(QCameraImageCapture* self, int id) { } void QCameraImageCapture_connect_ImageExposed(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageExposed), self, [=](int id) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageExposed), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QCameraImageCapture_ImageExposed(slot, sigval1); }); @@ -256,7 +493,7 @@ void QCameraImageCapture_ImageCaptured(QCameraImageCapture* self, int id, QImage } void QCameraImageCapture_connect_ImageCaptured(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageCaptured), self, [=](int id, const QImage& preview) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageCaptured), self, [=](int id, const QImage& preview) { int sigval1 = id; const QImage& preview_ret = preview; // Cast returned reference into pointer @@ -271,7 +508,7 @@ void QCameraImageCapture_ImageMetadataAvailable(QCameraImageCapture* self, int i } void QCameraImageCapture_connect_ImageMetadataAvailable(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageMetadataAvailable), self, [=](int id, const QString& key, const QVariant& value) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageMetadataAvailable), self, [=](int id, const QString& key, const QVariant& value) { int sigval1 = id; const QString key_ret = key; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory @@ -293,7 +530,7 @@ void QCameraImageCapture_ImageAvailable(QCameraImageCapture* self, int id, QVide } void QCameraImageCapture_connect_ImageAvailable(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageAvailable), self, [=](int id, const QVideoFrame& frame) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageAvailable), self, [=](int id, const QVideoFrame& frame) { int sigval1 = id; const QVideoFrame& frame_ret = frame; // Cast returned reference into pointer @@ -308,7 +545,7 @@ void QCameraImageCapture_ImageSaved(QCameraImageCapture* self, int id, struct mi } void QCameraImageCapture_connect_ImageSaved(QCameraImageCapture* self, intptr_t slot) { - QCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageSaved), self, [=](int id, const QString& fileName) { + MiqtVirtualQCameraImageCapture::connect(self, static_cast(&QCameraImageCapture::imageSaved), self, [=](int id, const QString& fileName) { int sigval1 = id; const QString fileName_ret = fileName; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory @@ -397,7 +634,83 @@ int QCameraImageCapture_Capture1(QCameraImageCapture* self, struct miqt_string l return self->capture(location_QString); } -void QCameraImageCapture_Delete(QCameraImageCapture* self) { - delete self; +void QCameraImageCapture_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QCameraImageCapture_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_MediaObject(); +} + +void QCameraImageCapture_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__SetMediaObject = slot; +} + +bool QCameraImageCapture_virtualbase_SetMediaObject(void* self, QMediaObject* mediaObject) { + return ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_SetMediaObject(mediaObject); +} + +void QCameraImageCapture_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__Event = slot; +} + +bool QCameraImageCapture_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_Event(event); +} + +void QCameraImageCapture_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__EventFilter = slot; +} + +bool QCameraImageCapture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QCameraImageCapture_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__TimerEvent = slot; +} + +void QCameraImageCapture_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_TimerEvent(event); +} + +void QCameraImageCapture_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__ChildEvent = slot; +} + +void QCameraImageCapture_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_ChildEvent(event); +} + +void QCameraImageCapture_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__CustomEvent = slot; +} + +void QCameraImageCapture_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_CustomEvent(event); +} + +void QCameraImageCapture_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__ConnectNotify = slot; +} + +void QCameraImageCapture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QCameraImageCapture_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCameraImageCapture*)(self) )->handle__DisconnectNotify = slot; +} + +void QCameraImageCapture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCameraImageCapture*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QCameraImageCapture_Delete(QCameraImageCapture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraimagecapture.go b/qt/multimedia/gen_qcameraimagecapture.go index 4379cae0..6622c204 100644 --- a/qt/multimedia/gen_qcameraimagecapture.go +++ b/qt/multimedia/gen_qcameraimagecapture.go @@ -40,7 +40,8 @@ const ( ) type QCameraImageCapture struct { - h *C.QCameraImageCapture + h *C.QCameraImageCapture + isSubclass bool *qt.QObject *QMediaBindableInterface } @@ -59,27 +60,49 @@ func (this *QCameraImageCapture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraImageCapture(h *C.QCameraImageCapture) *QCameraImageCapture { +// newQCameraImageCapture constructs the type using only CGO pointers. +func newQCameraImageCapture(h *C.QCameraImageCapture, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QCameraImageCapture { if h == nil { return nil } - return &QCameraImageCapture{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h)), QMediaBindableInterface: UnsafeNewQMediaBindableInterface(unsafe.Pointer(h))} + return &QCameraImageCapture{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} } -func UnsafeNewQCameraImageCapture(h unsafe.Pointer) *QCameraImageCapture { - return newQCameraImageCapture((*C.QCameraImageCapture)(h)) +// UnsafeNewQCameraImageCapture constructs the type using only unsafe pointers. +func UnsafeNewQCameraImageCapture(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QCameraImageCapture { + if h == nil { + return nil + } + + return &QCameraImageCapture{h: (*C.QCameraImageCapture)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} } // NewQCameraImageCapture constructs a new QCameraImageCapture object. func NewQCameraImageCapture(mediaObject *QMediaObject) *QCameraImageCapture { - ret := C.QCameraImageCapture_new(mediaObject.cPointer()) - return newQCameraImageCapture(ret) + var outptr_QCameraImageCapture *C.QCameraImageCapture = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QCameraImageCapture_new(mediaObject.cPointer(), &outptr_QCameraImageCapture, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQCameraImageCapture(outptr_QCameraImageCapture, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQCameraImageCapture2 constructs a new QCameraImageCapture object. func NewQCameraImageCapture2(mediaObject *QMediaObject, parent *qt.QObject) *QCameraImageCapture { - ret := C.QCameraImageCapture_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQCameraImageCapture(ret) + var outptr_QCameraImageCapture *C.QCameraImageCapture = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QCameraImageCapture_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QCameraImageCapture, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQCameraImageCapture(outptr_QCameraImageCapture, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QCameraImageCapture) MetaObject() *qt.QMetaObject { @@ -119,7 +142,7 @@ func (this *QCameraImageCapture) Availability() QMultimedia__AvailabilityStatus } func (this *QCameraImageCapture) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QCameraImageCapture_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QCameraImageCapture_MediaObject(this.h)), nil) } func (this *QCameraImageCapture) Error() QCameraImageCapture__Error { @@ -351,7 +374,7 @@ func miqt_exec_callback_QCameraImageCapture_ImageCaptured(cb C.intptr_t, id C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(id) - slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview)) + slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview), nil) gofunc(slotval1, slotval2) } @@ -515,9 +538,221 @@ func (this *QCameraImageCapture) Capture1(location string) int { return (int)(C.QCameraImageCapture_Capture1(this.h, location_ms)) } +func (this *QCameraImageCapture) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QCameraImageCapture_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QCameraImageCapture) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QCameraImageCapture_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_MediaObject +func miqt_exec_callback_QCameraImageCapture_MediaObject(self *C.QCameraImageCapture, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCameraImageCapture{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QCameraImageCapture) callVirtualBase_SetMediaObject(mediaObject *QMediaObject) bool { + + return (bool)(C.QCameraImageCapture_virtualbase_SetMediaObject(unsafe.Pointer(this.h), mediaObject.cPointer())) + +} +func (this *QCameraImageCapture) OnSetMediaObject(slot func(super func(mediaObject *QMediaObject) bool, mediaObject *QMediaObject) bool) { + C.QCameraImageCapture_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_SetMediaObject +func miqt_exec_callback_QCameraImageCapture_SetMediaObject(self *C.QCameraImageCapture, cb C.intptr_t, mediaObject *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mediaObject *QMediaObject) bool, mediaObject *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(mediaObject), nil) + + virtualReturn := gofunc((&QCameraImageCapture{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCameraImageCapture) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QCameraImageCapture_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QCameraImageCapture) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QCameraImageCapture_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_Event +func miqt_exec_callback_QCameraImageCapture_Event(self *C.QCameraImageCapture, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCameraImageCapture{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCameraImageCapture) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QCameraImageCapture_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QCameraImageCapture) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QCameraImageCapture_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_EventFilter +func miqt_exec_callback_QCameraImageCapture_EventFilter(self *C.QCameraImageCapture, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCameraImageCapture{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCameraImageCapture) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QCameraImageCapture_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QCameraImageCapture) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QCameraImageCapture_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_TimerEvent +func miqt_exec_callback_QCameraImageCapture_TimerEvent(self *C.QCameraImageCapture, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraImageCapture{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QCameraImageCapture) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QCameraImageCapture_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QCameraImageCapture) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QCameraImageCapture_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_ChildEvent +func miqt_exec_callback_QCameraImageCapture_ChildEvent(self *C.QCameraImageCapture, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraImageCapture{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QCameraImageCapture) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QCameraImageCapture_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QCameraImageCapture) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QCameraImageCapture_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_CustomEvent +func miqt_exec_callback_QCameraImageCapture_CustomEvent(self *C.QCameraImageCapture, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCameraImageCapture{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QCameraImageCapture) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QCameraImageCapture_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QCameraImageCapture) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QCameraImageCapture_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_ConnectNotify +func miqt_exec_callback_QCameraImageCapture_ConnectNotify(self *C.QCameraImageCapture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCameraImageCapture{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QCameraImageCapture) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QCameraImageCapture_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QCameraImageCapture) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QCameraImageCapture_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraImageCapture_DisconnectNotify +func miqt_exec_callback_QCameraImageCapture_DisconnectNotify(self *C.QCameraImageCapture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCameraImageCapture{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QCameraImageCapture) Delete() { - C.QCameraImageCapture_Delete(this.h) + C.QCameraImageCapture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraimagecapture.h b/qt/multimedia/gen_qcameraimagecapture.h index 123e3659..f95797ca 100644 --- a/qt/multimedia/gen_qcameraimagecapture.h +++ b/qt/multimedia/gen_qcameraimagecapture.h @@ -16,28 +16,38 @@ extern "C" { #ifdef __cplusplus class QCameraImageCapture; +class QChildEvent; +class QEvent; class QImage; class QImageEncoderSettings; +class QMediaBindableInterface; class QMediaObject; +class QMetaMethod; class QMetaObject; class QObject; class QSize; +class QTimerEvent; class QVariant; class QVideoFrame; #else typedef struct QCameraImageCapture QCameraImageCapture; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QImage QImage; typedef struct QImageEncoderSettings QImageEncoderSettings; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaObject QMediaObject; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; typedef struct QVideoFrame QVideoFrame; #endif -QCameraImageCapture* QCameraImageCapture_new(QMediaObject* mediaObject); -QCameraImageCapture* QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent); +void QCameraImageCapture_new(QMediaObject* mediaObject, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QCameraImageCapture_MetaObject(const QCameraImageCapture* self); void* QCameraImageCapture_Metacast(QCameraImageCapture* self, const char* param1); struct miqt_string QCameraImageCapture_Tr(const char* s); @@ -79,6 +89,7 @@ void QCameraImageCapture_ImageAvailable(QCameraImageCapture* self, int id, QVide void QCameraImageCapture_connect_ImageAvailable(QCameraImageCapture* self, intptr_t slot); void QCameraImageCapture_ImageSaved(QCameraImageCapture* self, int id, struct miqt_string fileName); void QCameraImageCapture_connect_ImageSaved(QCameraImageCapture* self, intptr_t slot); +bool QCameraImageCapture_SetMediaObject(QCameraImageCapture* self, QMediaObject* mediaObject); struct miqt_string QCameraImageCapture_Tr2(const char* s, const char* c); struct miqt_string QCameraImageCapture_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraImageCapture_TrUtf82(const char* s, const char* c); @@ -86,7 +97,25 @@ struct miqt_string QCameraImageCapture_TrUtf83(const char* s, const char* c, int struct miqt_array /* of QSize* */ QCameraImageCapture_SupportedResolutions1(const QCameraImageCapture* self, QImageEncoderSettings* settings); struct miqt_array /* of QSize* */ QCameraImageCapture_SupportedResolutions2(const QCameraImageCapture* self, QImageEncoderSettings* settings, bool* continuous); int QCameraImageCapture_Capture1(QCameraImageCapture* self, struct miqt_string location); -void QCameraImageCapture_Delete(QCameraImageCapture* self); +void QCameraImageCapture_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QCameraImageCapture_virtualbase_MediaObject(const void* self); +void QCameraImageCapture_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QCameraImageCapture_virtualbase_SetMediaObject(void* self, QMediaObject* mediaObject); +void QCameraImageCapture_override_virtual_Event(void* self, intptr_t slot); +bool QCameraImageCapture_virtualbase_Event(void* self, QEvent* event); +void QCameraImageCapture_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCameraImageCapture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QCameraImageCapture_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCameraImageCapture_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QCameraImageCapture_override_virtual_ChildEvent(void* self, intptr_t slot); +void QCameraImageCapture_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QCameraImageCapture_override_virtual_CustomEvent(void* self, intptr_t slot); +void QCameraImageCapture_virtualbase_CustomEvent(void* self, QEvent* event); +void QCameraImageCapture_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QCameraImageCapture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QCameraImageCapture_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QCameraImageCapture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QCameraImageCapture_Delete(QCameraImageCapture* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraimagecapturecontrol.cpp b/qt/multimedia/gen_qcameraimagecapturecontrol.cpp index b2a615ce..011925ec 100644 --- a/qt/multimedia/gen_qcameraimagecapturecontrol.cpp +++ b/qt/multimedia/gen_qcameraimagecapturecontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -220,7 +222,11 @@ struct miqt_string QCameraImageCaptureControl_TrUtf83(const char* s, const char* return _ms; } -void QCameraImageCaptureControl_Delete(QCameraImageCaptureControl* self) { - delete self; +void QCameraImageCaptureControl_Delete(QCameraImageCaptureControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraimagecapturecontrol.go b/qt/multimedia/gen_qcameraimagecapturecontrol.go index b2ebbd74..36e3d477 100644 --- a/qt/multimedia/gen_qcameraimagecapturecontrol.go +++ b/qt/multimedia/gen_qcameraimagecapturecontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraImageCaptureControl struct { - h *C.QCameraImageCaptureControl + h *C.QCameraImageCaptureControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraImageCaptureControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraImageCaptureControl(h *C.QCameraImageCaptureControl) *QCameraImageCaptureControl { +// newQCameraImageCaptureControl constructs the type using only CGO pointers. +func newQCameraImageCaptureControl(h *C.QCameraImageCaptureControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraImageCaptureControl { if h == nil { return nil } - return &QCameraImageCaptureControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraImageCaptureControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraImageCaptureControl(h unsafe.Pointer) *QCameraImageCaptureControl { - return newQCameraImageCaptureControl((*C.QCameraImageCaptureControl)(h)) +// UnsafeNewQCameraImageCaptureControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraImageCaptureControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraImageCaptureControl { + if h == nil { + return nil + } + + return &QCameraImageCaptureControl{h: (*C.QCameraImageCaptureControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraImageCaptureControl) MetaObject() *qt.QMetaObject { @@ -154,7 +163,7 @@ func miqt_exec_callback_QCameraImageCaptureControl_ImageCaptured(cb C.intptr_t, // Convert all CABI parameters to Go parameters slotval1 := (int)(requestId) - slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview)) + slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview), nil) gofunc(slotval1, slotval2) } @@ -317,7 +326,7 @@ func QCameraImageCaptureControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraImageCaptureControl) Delete() { - C.QCameraImageCaptureControl_Delete(this.h) + C.QCameraImageCaptureControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraimagecapturecontrol.h b/qt/multimedia/gen_qcameraimagecapturecontrol.h index 8800eef0..1a5ac541 100644 --- a/qt/multimedia/gen_qcameraimagecapturecontrol.h +++ b/qt/multimedia/gen_qcameraimagecapturecontrol.h @@ -17,13 +17,17 @@ extern "C" { #ifdef __cplusplus class QCameraImageCaptureControl; class QImage; +class QMediaControl; class QMetaObject; +class QObject; class QVariant; class QVideoFrame; #else typedef struct QCameraImageCaptureControl QCameraImageCaptureControl; typedef struct QImage QImage; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; typedef struct QVideoFrame QVideoFrame; #endif @@ -55,7 +59,7 @@ struct miqt_string QCameraImageCaptureControl_Tr2(const char* s, const char* c); struct miqt_string QCameraImageCaptureControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraImageCaptureControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraImageCaptureControl_TrUtf83(const char* s, const char* c, int n); -void QCameraImageCaptureControl_Delete(QCameraImageCaptureControl* self); +void QCameraImageCaptureControl_Delete(QCameraImageCaptureControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraimageprocessing.cpp b/qt/multimedia/gen_qcameraimageprocessing.cpp index 9f2d3492..d51831f0 100644 --- a/qt/multimedia/gen_qcameraimageprocessing.cpp +++ b/qt/multimedia/gen_qcameraimageprocessing.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt/multimedia/gen_qcameraimageprocessing.go b/qt/multimedia/gen_qcameraimageprocessing.go index fc6b9692..9a2c40f3 100644 --- a/qt/multimedia/gen_qcameraimageprocessing.go +++ b/qt/multimedia/gen_qcameraimageprocessing.go @@ -44,7 +44,8 @@ const ( ) type QCameraImageProcessing struct { - h *C.QCameraImageProcessing + h *C.QCameraImageProcessing + isSubclass bool *qt.QObject } @@ -62,15 +63,23 @@ func (this *QCameraImageProcessing) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraImageProcessing(h *C.QCameraImageProcessing) *QCameraImageProcessing { +// newQCameraImageProcessing constructs the type using only CGO pointers. +func newQCameraImageProcessing(h *C.QCameraImageProcessing, h_QObject *C.QObject) *QCameraImageProcessing { if h == nil { return nil } - return &QCameraImageProcessing{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QCameraImageProcessing{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQCameraImageProcessing(h unsafe.Pointer) *QCameraImageProcessing { - return newQCameraImageProcessing((*C.QCameraImageProcessing)(h)) +// UnsafeNewQCameraImageProcessing constructs the type using only unsafe pointers. +func UnsafeNewQCameraImageProcessing(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraImageProcessing { + if h == nil { + return nil + } + + return &QCameraImageProcessing{h: (*C.QCameraImageProcessing)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QCameraImageProcessing) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraimageprocessing.h b/qt/multimedia/gen_qcameraimageprocessing.h index 05cbdf99..5a2ead99 100644 --- a/qt/multimedia/gen_qcameraimageprocessing.h +++ b/qt/multimedia/gen_qcameraimageprocessing.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QCameraImageProcessing; class QMetaObject; +class QObject; #else typedef struct QCameraImageProcessing QCameraImageProcessing; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraImageProcessing_MetaObject(const QCameraImageProcessing* self); diff --git a/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp b/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp index 956f7231..280a72c4 100644 --- a/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp +++ b/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -98,7 +100,11 @@ struct miqt_string QCameraImageProcessingControl_TrUtf83(const char* s, const ch return _ms; } -void QCameraImageProcessingControl_Delete(QCameraImageProcessingControl* self) { - delete self; +void QCameraImageProcessingControl_Delete(QCameraImageProcessingControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraimageprocessingcontrol.go b/qt/multimedia/gen_qcameraimageprocessingcontrol.go index 28a95a47..35c2fc21 100644 --- a/qt/multimedia/gen_qcameraimageprocessingcontrol.go +++ b/qt/multimedia/gen_qcameraimageprocessingcontrol.go @@ -34,7 +34,8 @@ const ( ) type QCameraImageProcessingControl struct { - h *C.QCameraImageProcessingControl + h *C.QCameraImageProcessingControl + isSubclass bool *QMediaControl } @@ -52,15 +53,23 @@ func (this *QCameraImageProcessingControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraImageProcessingControl(h *C.QCameraImageProcessingControl) *QCameraImageProcessingControl { +// newQCameraImageProcessingControl constructs the type using only CGO pointers. +func newQCameraImageProcessingControl(h *C.QCameraImageProcessingControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraImageProcessingControl { if h == nil { return nil } - return &QCameraImageProcessingControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraImageProcessingControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraImageProcessingControl(h unsafe.Pointer) *QCameraImageProcessingControl { - return newQCameraImageProcessingControl((*C.QCameraImageProcessingControl)(h)) +// UnsafeNewQCameraImageProcessingControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraImageProcessingControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraImageProcessingControl { + if h == nil { + return nil + } + + return &QCameraImageProcessingControl{h: (*C.QCameraImageProcessingControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraImageProcessingControl) MetaObject() *qt.QMetaObject { @@ -156,7 +165,7 @@ func QCameraImageProcessingControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraImageProcessingControl) Delete() { - C.QCameraImageProcessingControl_Delete(this.h) + C.QCameraImageProcessingControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraimageprocessingcontrol.h b/qt/multimedia/gen_qcameraimageprocessingcontrol.h index 608d2609..89565bec 100644 --- a/qt/multimedia/gen_qcameraimageprocessingcontrol.h +++ b/qt/multimedia/gen_qcameraimageprocessingcontrol.h @@ -16,11 +16,15 @@ extern "C" { #ifdef __cplusplus class QCameraImageProcessingControl; +class QMediaControl; class QMetaObject; +class QObject; class QVariant; #else typedef struct QCameraImageProcessingControl QCameraImageProcessingControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; #endif @@ -36,7 +40,7 @@ struct miqt_string QCameraImageProcessingControl_Tr2(const char* s, const char* struct miqt_string QCameraImageProcessingControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraImageProcessingControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraImageProcessingControl_TrUtf83(const char* s, const char* c, int n); -void QCameraImageProcessingControl_Delete(QCameraImageProcessingControl* self); +void QCameraImageProcessingControl_Delete(QCameraImageProcessingControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcamerainfo.cpp b/qt/multimedia/gen_qcamerainfo.cpp index e10efba6..cf1cd455 100644 --- a/qt/multimedia/gen_qcamerainfo.cpp +++ b/qt/multimedia/gen_qcamerainfo.cpp @@ -9,21 +9,25 @@ #include "gen_qcamerainfo.h" #include "_cgo_export.h" -QCameraInfo* QCameraInfo_new() { - return new QCameraInfo(); +void QCameraInfo_new(QCameraInfo** outptr_QCameraInfo) { + QCameraInfo* ret = new QCameraInfo(); + *outptr_QCameraInfo = ret; } -QCameraInfo* QCameraInfo_new2(QCamera* camera) { - return new QCameraInfo(*camera); +void QCameraInfo_new2(QCamera* camera, QCameraInfo** outptr_QCameraInfo) { + QCameraInfo* ret = new QCameraInfo(*camera); + *outptr_QCameraInfo = ret; } -QCameraInfo* QCameraInfo_new3(QCameraInfo* other) { - return new QCameraInfo(*other); +void QCameraInfo_new3(QCameraInfo* other, QCameraInfo** outptr_QCameraInfo) { + QCameraInfo* ret = new QCameraInfo(*other); + *outptr_QCameraInfo = ret; } -QCameraInfo* QCameraInfo_new4(struct miqt_string name) { +void QCameraInfo_new4(struct miqt_string name, QCameraInfo** outptr_QCameraInfo) { QByteArray name_QByteArray(name.data, name.len); - return new QCameraInfo(name_QByteArray); + QCameraInfo* ret = new QCameraInfo(name_QByteArray); + *outptr_QCameraInfo = ret; } void QCameraInfo_OperatorAssign(QCameraInfo* self, QCameraInfo* other) { @@ -103,7 +107,11 @@ struct miqt_array /* of QCameraInfo* */ QCameraInfo_AvailableCameras1(int posit return _out; } -void QCameraInfo_Delete(QCameraInfo* self) { - delete self; +void QCameraInfo_Delete(QCameraInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcamerainfo.go b/qt/multimedia/gen_qcamerainfo.go index c63242a7..23a9291f 100644 --- a/qt/multimedia/gen_qcamerainfo.go +++ b/qt/multimedia/gen_qcamerainfo.go @@ -14,7 +14,8 @@ import ( ) type QCameraInfo struct { - h *C.QCameraInfo + h *C.QCameraInfo + isSubclass bool } func (this *QCameraInfo) cPointer() *C.QCameraInfo { @@ -31,6 +32,7 @@ func (this *QCameraInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCameraInfo constructs the type using only CGO pointers. func newQCameraInfo(h *C.QCameraInfo) *QCameraInfo { if h == nil { return nil @@ -38,26 +40,43 @@ func newQCameraInfo(h *C.QCameraInfo) *QCameraInfo { return &QCameraInfo{h: h} } +// UnsafeNewQCameraInfo constructs the type using only unsafe pointers. func UnsafeNewQCameraInfo(h unsafe.Pointer) *QCameraInfo { - return newQCameraInfo((*C.QCameraInfo)(h)) + if h == nil { + return nil + } + + return &QCameraInfo{h: (*C.QCameraInfo)(h)} } // NewQCameraInfo constructs a new QCameraInfo object. func NewQCameraInfo() *QCameraInfo { - ret := C.QCameraInfo_new() - return newQCameraInfo(ret) + var outptr_QCameraInfo *C.QCameraInfo = nil + + C.QCameraInfo_new(&outptr_QCameraInfo) + ret := newQCameraInfo(outptr_QCameraInfo) + ret.isSubclass = true + return ret } // NewQCameraInfo2 constructs a new QCameraInfo object. func NewQCameraInfo2(camera *QCamera) *QCameraInfo { - ret := C.QCameraInfo_new2(camera.cPointer()) - return newQCameraInfo(ret) + var outptr_QCameraInfo *C.QCameraInfo = nil + + C.QCameraInfo_new2(camera.cPointer(), &outptr_QCameraInfo) + ret := newQCameraInfo(outptr_QCameraInfo) + ret.isSubclass = true + return ret } // NewQCameraInfo3 constructs a new QCameraInfo object. func NewQCameraInfo3(other *QCameraInfo) *QCameraInfo { - ret := C.QCameraInfo_new3(other.cPointer()) - return newQCameraInfo(ret) + var outptr_QCameraInfo *C.QCameraInfo = nil + + C.QCameraInfo_new3(other.cPointer(), &outptr_QCameraInfo) + ret := newQCameraInfo(outptr_QCameraInfo) + ret.isSubclass = true + return ret } // NewQCameraInfo4 constructs a new QCameraInfo object. @@ -65,8 +84,12 @@ func NewQCameraInfo4(name []byte) *QCameraInfo { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - ret := C.QCameraInfo_new4(name_alias) - return newQCameraInfo(ret) + var outptr_QCameraInfo *C.QCameraInfo = nil + + C.QCameraInfo_new4(name_alias, &outptr_QCameraInfo) + ret := newQCameraInfo(outptr_QCameraInfo) + ret.isSubclass = true + return ret } func (this *QCameraInfo) OperatorAssign(other *QCameraInfo) { @@ -142,7 +165,7 @@ func QCameraInfo_AvailableCameras1(position QCamera__Position) []QCameraInfo { // Delete this object from C++ memory. func (this *QCameraInfo) Delete() { - C.QCameraInfo_Delete(this.h) + C.QCameraInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcamerainfo.h b/qt/multimedia/gen_qcamerainfo.h index 828f17ca..668db4d3 100644 --- a/qt/multimedia/gen_qcamerainfo.h +++ b/qt/multimedia/gen_qcamerainfo.h @@ -24,10 +24,10 @@ typedef struct QCamera QCamera; typedef struct QCameraInfo QCameraInfo; #endif -QCameraInfo* QCameraInfo_new(); -QCameraInfo* QCameraInfo_new2(QCamera* camera); -QCameraInfo* QCameraInfo_new3(QCameraInfo* other); -QCameraInfo* QCameraInfo_new4(struct miqt_string name); +void QCameraInfo_new(QCameraInfo** outptr_QCameraInfo); +void QCameraInfo_new2(QCamera* camera, QCameraInfo** outptr_QCameraInfo); +void QCameraInfo_new3(QCameraInfo* other, QCameraInfo** outptr_QCameraInfo); +void QCameraInfo_new4(struct miqt_string name, QCameraInfo** outptr_QCameraInfo); void QCameraInfo_OperatorAssign(QCameraInfo* self, QCameraInfo* other); bool QCameraInfo_OperatorEqual(const QCameraInfo* self, QCameraInfo* other); bool QCameraInfo_OperatorNotEqual(const QCameraInfo* self, QCameraInfo* other); @@ -39,7 +39,7 @@ int QCameraInfo_Orientation(const QCameraInfo* self); QCameraInfo* QCameraInfo_DefaultCamera(); struct miqt_array /* of QCameraInfo* */ QCameraInfo_AvailableCameras(); struct miqt_array /* of QCameraInfo* */ QCameraInfo_AvailableCameras1(int position); -void QCameraInfo_Delete(QCameraInfo* self); +void QCameraInfo_Delete(QCameraInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcamerainfocontrol.cpp b/qt/multimedia/gen_qcamerainfocontrol.cpp index 3d3508c3..86a1ce74 100644 --- a/qt/multimedia/gen_qcamerainfocontrol.cpp +++ b/qt/multimedia/gen_qcamerainfocontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -92,7 +94,11 @@ struct miqt_string QCameraInfoControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QCameraInfoControl_Delete(QCameraInfoControl* self) { - delete self; +void QCameraInfoControl_Delete(QCameraInfoControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcamerainfocontrol.go b/qt/multimedia/gen_qcamerainfocontrol.go index 31e0bc2b..47ac80eb 100644 --- a/qt/multimedia/gen_qcamerainfocontrol.go +++ b/qt/multimedia/gen_qcamerainfocontrol.go @@ -15,7 +15,8 @@ import ( ) type QCameraInfoControl struct { - h *C.QCameraInfoControl + h *C.QCameraInfoControl + isSubclass bool *QMediaControl } @@ -33,15 +34,23 @@ func (this *QCameraInfoControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraInfoControl(h *C.QCameraInfoControl) *QCameraInfoControl { +// newQCameraInfoControl constructs the type using only CGO pointers. +func newQCameraInfoControl(h *C.QCameraInfoControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraInfoControl { if h == nil { return nil } - return &QCameraInfoControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraInfoControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraInfoControl(h unsafe.Pointer) *QCameraInfoControl { - return newQCameraInfoControl((*C.QCameraInfoControl)(h)) +// UnsafeNewQCameraInfoControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraInfoControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraInfoControl { + if h == nil { + return nil + } + + return &QCameraInfoControl{h: (*C.QCameraInfoControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraInfoControl) MetaObject() *qt.QMetaObject { @@ -134,7 +143,7 @@ func QCameraInfoControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraInfoControl) Delete() { - C.QCameraInfoControl_Delete(this.h) + C.QCameraInfoControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcamerainfocontrol.h b/qt/multimedia/gen_qcamerainfocontrol.h index a4458e72..75b59e58 100644 --- a/qt/multimedia/gen_qcamerainfocontrol.h +++ b/qt/multimedia/gen_qcamerainfocontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraInfoControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraInfoControl QCameraInfoControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraInfoControl_MetaObject(const QCameraInfoControl* self); @@ -32,7 +36,7 @@ struct miqt_string QCameraInfoControl_Tr2(const char* s, const char* c); struct miqt_string QCameraInfoControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraInfoControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraInfoControl_TrUtf83(const char* s, const char* c, int n); -void QCameraInfoControl_Delete(QCameraInfoControl* self); +void QCameraInfoControl_Delete(QCameraInfoControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameralockscontrol.cpp b/qt/multimedia/gen_qcameralockscontrol.cpp index 93bbff92..17b536d5 100644 --- a/qt/multimedia/gen_qcameralockscontrol.cpp +++ b/qt/multimedia/gen_qcameralockscontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -115,7 +117,11 @@ struct miqt_string QCameraLocksControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QCameraLocksControl_Delete(QCameraLocksControl* self) { - delete self; +void QCameraLocksControl_Delete(QCameraLocksControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameralockscontrol.go b/qt/multimedia/gen_qcameralockscontrol.go index 31bb9923..eaeb9ff3 100644 --- a/qt/multimedia/gen_qcameralockscontrol.go +++ b/qt/multimedia/gen_qcameralockscontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraLocksControl struct { - h *C.QCameraLocksControl + h *C.QCameraLocksControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraLocksControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraLocksControl(h *C.QCameraLocksControl) *QCameraLocksControl { +// newQCameraLocksControl constructs the type using only CGO pointers. +func newQCameraLocksControl(h *C.QCameraLocksControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraLocksControl { if h == nil { return nil } - return &QCameraLocksControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraLocksControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraLocksControl(h unsafe.Pointer) *QCameraLocksControl { - return newQCameraLocksControl((*C.QCameraLocksControl)(h)) +// UnsafeNewQCameraLocksControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraLocksControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraLocksControl { + if h == nil { + return nil + } + + return &QCameraLocksControl{h: (*C.QCameraLocksControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraLocksControl) MetaObject() *qt.QMetaObject { @@ -159,7 +168,7 @@ func QCameraLocksControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraLocksControl) Delete() { - C.QCameraLocksControl_Delete(this.h) + C.QCameraLocksControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameralockscontrol.h b/qt/multimedia/gen_qcameralockscontrol.h index 4c20c0dd..52ed03d6 100644 --- a/qt/multimedia/gen_qcameralockscontrol.h +++ b/qt/multimedia/gen_qcameralockscontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraLocksControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraLocksControl QCameraLocksControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraLocksControl_MetaObject(const QCameraLocksControl* self); @@ -36,7 +40,7 @@ struct miqt_string QCameraLocksControl_Tr2(const char* s, const char* c); struct miqt_string QCameraLocksControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraLocksControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraLocksControl_TrUtf83(const char* s, const char* c, int n); -void QCameraLocksControl_Delete(QCameraLocksControl* self); +void QCameraLocksControl_Delete(QCameraLocksControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraviewfinder.cpp b/qt/multimedia/gen_qcameraviewfinder.cpp index 3387c475..f4778e1a 100644 --- a/qt/multimedia/gen_qcameraviewfinder.cpp +++ b/qt/multimedia/gen_qcameraviewfinder.cpp @@ -1,20 +1,263 @@ #include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include #include #include #include "gen_qcameraviewfinder.h" #include "_cgo_export.h" -QCameraViewfinder* QCameraViewfinder_new(QWidget* parent) { - return new QCameraViewfinder(parent); +class MiqtVirtualQCameraViewfinder : public virtual QCameraViewfinder { +public: + + MiqtVirtualQCameraViewfinder(QWidget* parent): QCameraViewfinder(parent) {}; + MiqtVirtualQCameraViewfinder(): QCameraViewfinder() {}; + + virtual ~MiqtVirtualQCameraViewfinder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QCameraViewfinder::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QCameraViewfinder_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QCameraViewfinder::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* object) override { + if (handle__SetMediaObject == 0) { + return QCameraViewfinder::setMediaObject(object); + } + + QMediaObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QCameraViewfinder_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* object) { + + return QCameraViewfinder::setMediaObject(object); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCameraViewfinder::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCameraViewfinder_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCameraViewfinder::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QCameraViewfinder::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QCameraViewfinder_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QCameraViewfinder::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QCameraViewfinder::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QCameraViewfinder_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QCameraViewfinder::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QCameraViewfinder::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QCameraViewfinder_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QCameraViewfinder::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QCameraViewfinder::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QCameraViewfinder_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QCameraViewfinder::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QCameraViewfinder::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QCameraViewfinder_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QCameraViewfinder::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QCameraViewfinder::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QCameraViewfinder_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QCameraViewfinder::paintEvent(event); + + } + +}; + +void QCameraViewfinder_new(QWidget* parent, QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQCameraViewfinder* ret = new MiqtVirtualQCameraViewfinder(parent); + *outptr_QCameraViewfinder = ret; + *outptr_QVideoWidget = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QCameraViewfinder* QCameraViewfinder_new2() { - return new QCameraViewfinder(); +void QCameraViewfinder_new2(QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQCameraViewfinder* ret = new MiqtVirtualQCameraViewfinder(); + *outptr_QCameraViewfinder = ret; + *outptr_QVideoWidget = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QCameraViewfinder_MetaObject(const QCameraViewfinder* self) { @@ -95,7 +338,83 @@ struct miqt_string QCameraViewfinder_TrUtf83(const char* s, const char* c, int n return _ms; } -void QCameraViewfinder_Delete(QCameraViewfinder* self) { - delete self; +void QCameraViewfinder_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QCameraViewfinder_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_MediaObject(); +} + +void QCameraViewfinder_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__SetMediaObject = slot; +} + +bool QCameraViewfinder_virtualbase_SetMediaObject(void* self, QMediaObject* object) { + return ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_SetMediaObject(object); +} + +void QCameraViewfinder_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__SizeHint = slot; +} + +QSize* QCameraViewfinder_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_SizeHint(); +} + +void QCameraViewfinder_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__Event = slot; +} + +bool QCameraViewfinder_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_Event(event); +} + +void QCameraViewfinder_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__ShowEvent = slot; +} + +void QCameraViewfinder_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_ShowEvent(event); +} + +void QCameraViewfinder_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__HideEvent = slot; +} + +void QCameraViewfinder_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_HideEvent(event); +} + +void QCameraViewfinder_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__ResizeEvent = slot; +} + +void QCameraViewfinder_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_ResizeEvent(event); +} + +void QCameraViewfinder_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__MoveEvent = slot; +} + +void QCameraViewfinder_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_MoveEvent(event); +} + +void QCameraViewfinder_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCameraViewfinder*)(self) )->handle__PaintEvent = slot; +} + +void QCameraViewfinder_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQCameraViewfinder*)(self) )->virtualbase_PaintEvent(event); +} + +void QCameraViewfinder_Delete(QCameraViewfinder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraviewfinder.go b/qt/multimedia/gen_qcameraviewfinder.go index 4d816ed2..46e05aaa 100644 --- a/qt/multimedia/gen_qcameraviewfinder.go +++ b/qt/multimedia/gen_qcameraviewfinder.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QCameraViewfinder struct { - h *C.QCameraViewfinder + h *C.QCameraViewfinder + isSubclass bool *QVideoWidget } @@ -33,27 +35,53 @@ func (this *QCameraViewfinder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraViewfinder(h *C.QCameraViewfinder) *QCameraViewfinder { +// newQCameraViewfinder constructs the type using only CGO pointers. +func newQCameraViewfinder(h *C.QCameraViewfinder, h_QVideoWidget *C.QVideoWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice, h_QMediaBindableInterface *C.QMediaBindableInterface) *QCameraViewfinder { if h == nil { return nil } - return &QCameraViewfinder{h: h, QVideoWidget: UnsafeNewQVideoWidget(unsafe.Pointer(h))} + return &QCameraViewfinder{h: h, + QVideoWidget: newQVideoWidget(h_QVideoWidget, h_QWidget, h_QObject, h_QPaintDevice, h_QMediaBindableInterface)} } -func UnsafeNewQCameraViewfinder(h unsafe.Pointer) *QCameraViewfinder { - return newQCameraViewfinder((*C.QCameraViewfinder)(h)) +// UnsafeNewQCameraViewfinder constructs the type using only unsafe pointers. +func UnsafeNewQCameraViewfinder(h unsafe.Pointer, h_QVideoWidget unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QCameraViewfinder { + if h == nil { + return nil + } + + return &QCameraViewfinder{h: (*C.QCameraViewfinder)(h), + QVideoWidget: UnsafeNewQVideoWidget(h_QVideoWidget, h_QWidget, h_QObject, h_QPaintDevice, h_QMediaBindableInterface)} } // NewQCameraViewfinder constructs a new QCameraViewfinder object. func NewQCameraViewfinder(parent *qt.QWidget) *QCameraViewfinder { - ret := C.QCameraViewfinder_new((*C.QWidget)(parent.UnsafePointer())) - return newQCameraViewfinder(ret) + var outptr_QCameraViewfinder *C.QCameraViewfinder = nil + var outptr_QVideoWidget *C.QVideoWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QCameraViewfinder_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QCameraViewfinder, &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) + ret := newQCameraViewfinder(outptr_QCameraViewfinder, outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQCameraViewfinder2 constructs a new QCameraViewfinder object. func NewQCameraViewfinder2() *QCameraViewfinder { - ret := C.QCameraViewfinder_new2() - return newQCameraViewfinder(ret) + var outptr_QCameraViewfinder *C.QCameraViewfinder = nil + var outptr_QVideoWidget *C.QVideoWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QCameraViewfinder_new2(&outptr_QCameraViewfinder, &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) + ret := newQCameraViewfinder(outptr_QCameraViewfinder, outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QCameraViewfinder) MetaObject() *qt.QMetaObject { @@ -85,7 +113,7 @@ func QCameraViewfinder_TrUtf8(s string) string { } func (this *QCameraViewfinder) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QCameraViewfinder_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QCameraViewfinder_MediaObject(this.h)), nil) } func QCameraViewfinder_Tr2(s string, c string) string { @@ -132,9 +160,220 @@ func QCameraViewfinder_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QCameraViewfinder) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QCameraViewfinder_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QCameraViewfinder) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QCameraViewfinder_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_MediaObject +func miqt_exec_callback_QCameraViewfinder_MediaObject(self *C.QCameraViewfinder, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCameraViewfinder{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QCameraViewfinder) callVirtualBase_SetMediaObject(object *QMediaObject) bool { + + return (bool)(C.QCameraViewfinder_virtualbase_SetMediaObject(unsafe.Pointer(this.h), object.cPointer())) + +} +func (this *QCameraViewfinder) OnSetMediaObject(slot func(super func(object *QMediaObject) bool, object *QMediaObject) bool) { + C.QCameraViewfinder_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_SetMediaObject +func miqt_exec_callback_QCameraViewfinder_SetMediaObject(self *C.QCameraViewfinder, cb C.intptr_t, object *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QMediaObject) bool, object *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(object), nil) + + virtualReturn := gofunc((&QCameraViewfinder{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCameraViewfinder) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QCameraViewfinder_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCameraViewfinder) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QCameraViewfinder_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_SizeHint +func miqt_exec_callback_QCameraViewfinder_SizeHint(self *C.QCameraViewfinder, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCameraViewfinder{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QCameraViewfinder) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QCameraViewfinder_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QCameraViewfinder) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QCameraViewfinder_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_Event +func miqt_exec_callback_QCameraViewfinder_Event(self *C.QCameraViewfinder, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCameraViewfinder{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCameraViewfinder) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QCameraViewfinder_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QCameraViewfinder) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QCameraViewfinder_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_ShowEvent +func miqt_exec_callback_QCameraViewfinder_ShowEvent(self *C.QCameraViewfinder, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraViewfinder{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QCameraViewfinder) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QCameraViewfinder_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QCameraViewfinder) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QCameraViewfinder_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_HideEvent +func miqt_exec_callback_QCameraViewfinder_HideEvent(self *C.QCameraViewfinder, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraViewfinder{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QCameraViewfinder) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QCameraViewfinder_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QCameraViewfinder) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.QCameraViewfinder_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_ResizeEvent +func miqt_exec_callback_QCameraViewfinder_ResizeEvent(self *C.QCameraViewfinder, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraViewfinder{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QCameraViewfinder) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QCameraViewfinder_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QCameraViewfinder) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QCameraViewfinder_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_MoveEvent +func miqt_exec_callback_QCameraViewfinder_MoveEvent(self *C.QCameraViewfinder, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraViewfinder{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QCameraViewfinder) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QCameraViewfinder_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QCameraViewfinder) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.QCameraViewfinder_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCameraViewfinder_PaintEvent +func miqt_exec_callback_QCameraViewfinder_PaintEvent(self *C.QCameraViewfinder, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QCameraViewfinder{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QCameraViewfinder) Delete() { - C.QCameraViewfinder_Delete(this.h) + C.QCameraViewfinder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraviewfinder.h b/qt/multimedia/gen_qcameraviewfinder.h index aa5e8f62..c7cadd85 100644 --- a/qt/multimedia/gen_qcameraviewfinder.h +++ b/qt/multimedia/gen_qcameraviewfinder.h @@ -16,28 +16,69 @@ extern "C" { #ifdef __cplusplus class QCameraViewfinder; +class QEvent; +class QHideEvent; +class QMediaBindableInterface; class QMediaObject; class QMetaObject; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; +class QSize; +class QVideoWidget; class QWidget; #else typedef struct QCameraViewfinder QCameraViewfinder; +typedef struct QEvent QEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaObject QMediaObject; typedef struct QMetaObject QMetaObject; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QVideoWidget QVideoWidget; typedef struct QWidget QWidget; #endif -QCameraViewfinder* QCameraViewfinder_new(QWidget* parent); -QCameraViewfinder* QCameraViewfinder_new2(); +void QCameraViewfinder_new(QWidget* parent, QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QCameraViewfinder_new2(QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QCameraViewfinder_MetaObject(const QCameraViewfinder* self); void* QCameraViewfinder_Metacast(QCameraViewfinder* self, const char* param1); struct miqt_string QCameraViewfinder_Tr(const char* s); struct miqt_string QCameraViewfinder_TrUtf8(const char* s); QMediaObject* QCameraViewfinder_MediaObject(const QCameraViewfinder* self); +bool QCameraViewfinder_SetMediaObject(QCameraViewfinder* self, QMediaObject* object); struct miqt_string QCameraViewfinder_Tr2(const char* s, const char* c); struct miqt_string QCameraViewfinder_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraViewfinder_TrUtf82(const char* s, const char* c); struct miqt_string QCameraViewfinder_TrUtf83(const char* s, const char* c, int n); -void QCameraViewfinder_Delete(QCameraViewfinder* self); +void QCameraViewfinder_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QCameraViewfinder_virtualbase_MediaObject(const void* self); +void QCameraViewfinder_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QCameraViewfinder_virtualbase_SetMediaObject(void* self, QMediaObject* object); +void QCameraViewfinder_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCameraViewfinder_virtualbase_SizeHint(const void* self); +void QCameraViewfinder_override_virtual_Event(void* self, intptr_t slot); +bool QCameraViewfinder_virtualbase_Event(void* self, QEvent* event); +void QCameraViewfinder_override_virtual_ShowEvent(void* self, intptr_t slot); +void QCameraViewfinder_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QCameraViewfinder_override_virtual_HideEvent(void* self, intptr_t slot); +void QCameraViewfinder_virtualbase_HideEvent(void* self, QHideEvent* event); +void QCameraViewfinder_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QCameraViewfinder_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QCameraViewfinder_override_virtual_MoveEvent(void* self, intptr_t slot); +void QCameraViewfinder_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QCameraViewfinder_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCameraViewfinder_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QCameraViewfinder_Delete(QCameraViewfinder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraviewfindersettings.cpp b/qt/multimedia/gen_qcameraviewfindersettings.cpp index 8beb2b1e..e0241021 100644 --- a/qt/multimedia/gen_qcameraviewfindersettings.cpp +++ b/qt/multimedia/gen_qcameraviewfindersettings.cpp @@ -4,12 +4,14 @@ #include "gen_qcameraviewfindersettings.h" #include "_cgo_export.h" -QCameraViewfinderSettings* QCameraViewfinderSettings_new() { - return new QCameraViewfinderSettings(); +void QCameraViewfinderSettings_new(QCameraViewfinderSettings** outptr_QCameraViewfinderSettings) { + QCameraViewfinderSettings* ret = new QCameraViewfinderSettings(); + *outptr_QCameraViewfinderSettings = ret; } -QCameraViewfinderSettings* QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other) { - return new QCameraViewfinderSettings(*other); +void QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other, QCameraViewfinderSettings** outptr_QCameraViewfinderSettings) { + QCameraViewfinderSettings* ret = new QCameraViewfinderSettings(*other); + *outptr_QCameraViewfinderSettings = ret; } void QCameraViewfinderSettings_OperatorAssign(QCameraViewfinderSettings* self, QCameraViewfinderSettings* other) { @@ -75,7 +77,11 @@ void QCameraViewfinderSettings_SetPixelAspectRatio2(QCameraViewfinderSettings* s self->setPixelAspectRatio(static_cast(horizontal), static_cast(vertical)); } -void QCameraViewfinderSettings_Delete(QCameraViewfinderSettings* self) { - delete self; +void QCameraViewfinderSettings_Delete(QCameraViewfinderSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraviewfindersettings.go b/qt/multimedia/gen_qcameraviewfindersettings.go index 509ef0e4..c9e971b1 100644 --- a/qt/multimedia/gen_qcameraviewfindersettings.go +++ b/qt/multimedia/gen_qcameraviewfindersettings.go @@ -15,7 +15,8 @@ import ( ) type QCameraViewfinderSettings struct { - h *C.QCameraViewfinderSettings + h *C.QCameraViewfinderSettings + isSubclass bool } func (this *QCameraViewfinderSettings) cPointer() *C.QCameraViewfinderSettings { @@ -32,6 +33,7 @@ func (this *QCameraViewfinderSettings) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCameraViewfinderSettings constructs the type using only CGO pointers. func newQCameraViewfinderSettings(h *C.QCameraViewfinderSettings) *QCameraViewfinderSettings { if h == nil { return nil @@ -39,20 +41,33 @@ func newQCameraViewfinderSettings(h *C.QCameraViewfinderSettings) *QCameraViewfi return &QCameraViewfinderSettings{h: h} } +// UnsafeNewQCameraViewfinderSettings constructs the type using only unsafe pointers. func UnsafeNewQCameraViewfinderSettings(h unsafe.Pointer) *QCameraViewfinderSettings { - return newQCameraViewfinderSettings((*C.QCameraViewfinderSettings)(h)) + if h == nil { + return nil + } + + return &QCameraViewfinderSettings{h: (*C.QCameraViewfinderSettings)(h)} } // NewQCameraViewfinderSettings constructs a new QCameraViewfinderSettings object. func NewQCameraViewfinderSettings() *QCameraViewfinderSettings { - ret := C.QCameraViewfinderSettings_new() - return newQCameraViewfinderSettings(ret) + var outptr_QCameraViewfinderSettings *C.QCameraViewfinderSettings = nil + + C.QCameraViewfinderSettings_new(&outptr_QCameraViewfinderSettings) + ret := newQCameraViewfinderSettings(outptr_QCameraViewfinderSettings) + ret.isSubclass = true + return ret } // NewQCameraViewfinderSettings2 constructs a new QCameraViewfinderSettings object. func NewQCameraViewfinderSettings2(other *QCameraViewfinderSettings) *QCameraViewfinderSettings { - ret := C.QCameraViewfinderSettings_new2(other.cPointer()) - return newQCameraViewfinderSettings(ret) + var outptr_QCameraViewfinderSettings *C.QCameraViewfinderSettings = nil + + C.QCameraViewfinderSettings_new2(other.cPointer(), &outptr_QCameraViewfinderSettings) + ret := newQCameraViewfinderSettings(outptr_QCameraViewfinderSettings) + ret.isSubclass = true + return ret } func (this *QCameraViewfinderSettings) OperatorAssign(other *QCameraViewfinderSettings) { @@ -123,7 +138,7 @@ func (this *QCameraViewfinderSettings) SetPixelAspectRatio2(horizontal int, vert // Delete this object from C++ memory. func (this *QCameraViewfinderSettings) Delete() { - C.QCameraViewfinderSettings_Delete(this.h) + C.QCameraViewfinderSettings_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraviewfindersettings.h b/qt/multimedia/gen_qcameraviewfindersettings.h index 46266176..78868e28 100644 --- a/qt/multimedia/gen_qcameraviewfindersettings.h +++ b/qt/multimedia/gen_qcameraviewfindersettings.h @@ -22,8 +22,8 @@ typedef struct QCameraViewfinderSettings QCameraViewfinderSettings; typedef struct QSize QSize; #endif -QCameraViewfinderSettings* QCameraViewfinderSettings_new(); -QCameraViewfinderSettings* QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other); +void QCameraViewfinderSettings_new(QCameraViewfinderSettings** outptr_QCameraViewfinderSettings); +void QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other, QCameraViewfinderSettings** outptr_QCameraViewfinderSettings); void QCameraViewfinderSettings_OperatorAssign(QCameraViewfinderSettings* self, QCameraViewfinderSettings* other); void QCameraViewfinderSettings_Swap(QCameraViewfinderSettings* self, QCameraViewfinderSettings* other); bool QCameraViewfinderSettings_IsNull(const QCameraViewfinderSettings* self); @@ -39,7 +39,7 @@ void QCameraViewfinderSettings_SetPixelFormat(QCameraViewfinderSettings* self, i QSize* QCameraViewfinderSettings_PixelAspectRatio(const QCameraViewfinderSettings* self); void QCameraViewfinderSettings_SetPixelAspectRatio(QCameraViewfinderSettings* self, QSize* ratio); void QCameraViewfinderSettings_SetPixelAspectRatio2(QCameraViewfinderSettings* self, int horizontal, int vertical); -void QCameraViewfinderSettings_Delete(QCameraViewfinderSettings* self); +void QCameraViewfinderSettings_Delete(QCameraViewfinderSettings* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp b/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp index 49693b38..06fed1c9 100644 --- a/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp +++ b/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp @@ -2,7 +2,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -97,8 +99,12 @@ struct miqt_string QCameraViewfinderSettingsControl_TrUtf83(const char* s, const return _ms; } -void QCameraViewfinderSettingsControl_Delete(QCameraViewfinderSettingsControl* self) { - delete self; +void QCameraViewfinderSettingsControl_Delete(QCameraViewfinderSettingsControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QCameraViewfinderSettingsControl2_MetaObject(const QCameraViewfinderSettingsControl2* self) { @@ -196,7 +202,11 @@ struct miqt_string QCameraViewfinderSettingsControl2_TrUtf83(const char* s, cons return _ms; } -void QCameraViewfinderSettingsControl2_Delete(QCameraViewfinderSettingsControl2* self) { - delete self; +void QCameraViewfinderSettingsControl2_Delete(QCameraViewfinderSettingsControl2* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcameraviewfindersettingscontrol.go b/qt/multimedia/gen_qcameraviewfindersettingscontrol.go index 745e4a4b..730f6a86 100644 --- a/qt/multimedia/gen_qcameraviewfindersettingscontrol.go +++ b/qt/multimedia/gen_qcameraviewfindersettingscontrol.go @@ -26,7 +26,8 @@ const ( ) type QCameraViewfinderSettingsControl struct { - h *C.QCameraViewfinderSettingsControl + h *C.QCameraViewfinderSettingsControl + isSubclass bool *QMediaControl } @@ -44,15 +45,23 @@ func (this *QCameraViewfinderSettingsControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraViewfinderSettingsControl(h *C.QCameraViewfinderSettingsControl) *QCameraViewfinderSettingsControl { +// newQCameraViewfinderSettingsControl constructs the type using only CGO pointers. +func newQCameraViewfinderSettingsControl(h *C.QCameraViewfinderSettingsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraViewfinderSettingsControl { if h == nil { return nil } - return &QCameraViewfinderSettingsControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraViewfinderSettingsControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraViewfinderSettingsControl(h unsafe.Pointer) *QCameraViewfinderSettingsControl { - return newQCameraViewfinderSettingsControl((*C.QCameraViewfinderSettingsControl)(h)) +// UnsafeNewQCameraViewfinderSettingsControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraViewfinderSettingsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraViewfinderSettingsControl { + if h == nil { + return nil + } + + return &QCameraViewfinderSettingsControl{h: (*C.QCameraViewfinderSettingsControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraViewfinderSettingsControl) MetaObject() *qt.QMetaObject { @@ -144,7 +153,7 @@ func QCameraViewfinderSettingsControl_TrUtf83(s string, c string, n int) string // Delete this object from C++ memory. func (this *QCameraViewfinderSettingsControl) Delete() { - C.QCameraViewfinderSettingsControl_Delete(this.h) + C.QCameraViewfinderSettingsControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -157,7 +166,8 @@ func (this *QCameraViewfinderSettingsControl) GoGC() { } type QCameraViewfinderSettingsControl2 struct { - h *C.QCameraViewfinderSettingsControl2 + h *C.QCameraViewfinderSettingsControl2 + isSubclass bool *QMediaControl } @@ -175,15 +185,23 @@ func (this *QCameraViewfinderSettingsControl2) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraViewfinderSettingsControl2(h *C.QCameraViewfinderSettingsControl2) *QCameraViewfinderSettingsControl2 { +// newQCameraViewfinderSettingsControl2 constructs the type using only CGO pointers. +func newQCameraViewfinderSettingsControl2(h *C.QCameraViewfinderSettingsControl2, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraViewfinderSettingsControl2 { if h == nil { return nil } - return &QCameraViewfinderSettingsControl2{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraViewfinderSettingsControl2{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraViewfinderSettingsControl2(h unsafe.Pointer) *QCameraViewfinderSettingsControl2 { - return newQCameraViewfinderSettingsControl2((*C.QCameraViewfinderSettingsControl2)(h)) +// UnsafeNewQCameraViewfinderSettingsControl2 constructs the type using only unsafe pointers. +func UnsafeNewQCameraViewfinderSettingsControl2(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraViewfinderSettingsControl2 { + if h == nil { + return nil + } + + return &QCameraViewfinderSettingsControl2{h: (*C.QCameraViewfinderSettingsControl2)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraViewfinderSettingsControl2) MetaObject() *qt.QMetaObject { @@ -284,7 +302,7 @@ func QCameraViewfinderSettingsControl2_TrUtf83(s string, c string, n int) string // Delete this object from C++ memory. func (this *QCameraViewfinderSettingsControl2) Delete() { - C.QCameraViewfinderSettingsControl2_Delete(this.h) + C.QCameraViewfinderSettingsControl2_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcameraviewfindersettingscontrol.h b/qt/multimedia/gen_qcameraviewfindersettingscontrol.h index 540de906..491e21d0 100644 --- a/qt/multimedia/gen_qcameraviewfindersettingscontrol.h +++ b/qt/multimedia/gen_qcameraviewfindersettingscontrol.h @@ -18,13 +18,17 @@ extern "C" { class QCameraViewfinderSettings; class QCameraViewfinderSettingsControl; class QCameraViewfinderSettingsControl2; +class QMediaControl; class QMetaObject; +class QObject; class QVariant; #else typedef struct QCameraViewfinderSettings QCameraViewfinderSettings; typedef struct QCameraViewfinderSettingsControl QCameraViewfinderSettingsControl; typedef struct QCameraViewfinderSettingsControl2 QCameraViewfinderSettingsControl2; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; #endif @@ -39,7 +43,7 @@ struct miqt_string QCameraViewfinderSettingsControl_Tr2(const char* s, const cha struct miqt_string QCameraViewfinderSettingsControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraViewfinderSettingsControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraViewfinderSettingsControl_TrUtf83(const char* s, const char* c, int n); -void QCameraViewfinderSettingsControl_Delete(QCameraViewfinderSettingsControl* self); +void QCameraViewfinderSettingsControl_Delete(QCameraViewfinderSettingsControl* self, bool isSubclass); QMetaObject* QCameraViewfinderSettingsControl2_MetaObject(const QCameraViewfinderSettingsControl2* self); void* QCameraViewfinderSettingsControl2_Metacast(QCameraViewfinderSettingsControl2* self, const char* param1); @@ -52,7 +56,7 @@ struct miqt_string QCameraViewfinderSettingsControl2_Tr2(const char* s, const ch struct miqt_string QCameraViewfinderSettingsControl2_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraViewfinderSettingsControl2_TrUtf82(const char* s, const char* c); struct miqt_string QCameraViewfinderSettingsControl2_TrUtf83(const char* s, const char* c, int n); -void QCameraViewfinderSettingsControl2_Delete(QCameraViewfinderSettingsControl2* self); +void QCameraViewfinderSettingsControl2_Delete(QCameraViewfinderSettingsControl2* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcamerazoomcontrol.cpp b/qt/multimedia/gen_qcamerazoomcontrol.cpp index af46fe48..1f27a155 100644 --- a/qt/multimedia/gen_qcamerazoomcontrol.cpp +++ b/qt/multimedia/gen_qcamerazoomcontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -187,7 +189,11 @@ struct miqt_string QCameraZoomControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QCameraZoomControl_Delete(QCameraZoomControl* self) { - delete self; +void QCameraZoomControl_Delete(QCameraZoomControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcamerazoomcontrol.go b/qt/multimedia/gen_qcamerazoomcontrol.go index 3dbd6551..ac691ae7 100644 --- a/qt/multimedia/gen_qcamerazoomcontrol.go +++ b/qt/multimedia/gen_qcamerazoomcontrol.go @@ -16,7 +16,8 @@ import ( ) type QCameraZoomControl struct { - h *C.QCameraZoomControl + h *C.QCameraZoomControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCameraZoomControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCameraZoomControl(h *C.QCameraZoomControl) *QCameraZoomControl { +// newQCameraZoomControl constructs the type using only CGO pointers. +func newQCameraZoomControl(h *C.QCameraZoomControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraZoomControl { if h == nil { return nil } - return &QCameraZoomControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCameraZoomControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCameraZoomControl(h unsafe.Pointer) *QCameraZoomControl { - return newQCameraZoomControl((*C.QCameraZoomControl)(h)) +// UnsafeNewQCameraZoomControl constructs the type using only unsafe pointers. +func UnsafeNewQCameraZoomControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraZoomControl { + if h == nil { + return nil + } + + return &QCameraZoomControl{h: (*C.QCameraZoomControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCameraZoomControl) MetaObject() *qt.QMetaObject { @@ -267,7 +276,7 @@ func QCameraZoomControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCameraZoomControl) Delete() { - C.QCameraZoomControl_Delete(this.h) + C.QCameraZoomControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcamerazoomcontrol.h b/qt/multimedia/gen_qcamerazoomcontrol.h index c680a400..083384b7 100644 --- a/qt/multimedia/gen_qcamerazoomcontrol.h +++ b/qt/multimedia/gen_qcamerazoomcontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCameraZoomControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCameraZoomControl QCameraZoomControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCameraZoomControl_MetaObject(const QCameraZoomControl* self); @@ -49,7 +53,7 @@ struct miqt_string QCameraZoomControl_Tr2(const char* s, const char* c); struct miqt_string QCameraZoomControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCameraZoomControl_TrUtf82(const char* s, const char* c); struct miqt_string QCameraZoomControl_TrUtf83(const char* s, const char* c, int n); -void QCameraZoomControl_Delete(QCameraZoomControl* self); +void QCameraZoomControl_Delete(QCameraZoomControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qcustomaudiorolecontrol.cpp b/qt/multimedia/gen_qcustomaudiorolecontrol.cpp index 50d75c9b..f02af956 100644 --- a/qt/multimedia/gen_qcustomaudiorolecontrol.cpp +++ b/qt/multimedia/gen_qcustomaudiorolecontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -137,7 +139,11 @@ struct miqt_string QCustomAudioRoleControl_TrUtf83(const char* s, const char* c, return _ms; } -void QCustomAudioRoleControl_Delete(QCustomAudioRoleControl* self) { - delete self; +void QCustomAudioRoleControl_Delete(QCustomAudioRoleControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qcustomaudiorolecontrol.go b/qt/multimedia/gen_qcustomaudiorolecontrol.go index 03b2616d..f14a1c89 100644 --- a/qt/multimedia/gen_qcustomaudiorolecontrol.go +++ b/qt/multimedia/gen_qcustomaudiorolecontrol.go @@ -16,7 +16,8 @@ import ( ) type QCustomAudioRoleControl struct { - h *C.QCustomAudioRoleControl + h *C.QCustomAudioRoleControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QCustomAudioRoleControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCustomAudioRoleControl(h *C.QCustomAudioRoleControl) *QCustomAudioRoleControl { +// newQCustomAudioRoleControl constructs the type using only CGO pointers. +func newQCustomAudioRoleControl(h *C.QCustomAudioRoleControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCustomAudioRoleControl { if h == nil { return nil } - return &QCustomAudioRoleControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QCustomAudioRoleControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQCustomAudioRoleControl(h unsafe.Pointer) *QCustomAudioRoleControl { - return newQCustomAudioRoleControl((*C.QCustomAudioRoleControl)(h)) +// UnsafeNewQCustomAudioRoleControl constructs the type using only unsafe pointers. +func UnsafeNewQCustomAudioRoleControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCustomAudioRoleControl { + if h == nil { + return nil + } + + return &QCustomAudioRoleControl{h: (*C.QCustomAudioRoleControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QCustomAudioRoleControl) MetaObject() *qt.QMetaObject { @@ -174,7 +183,7 @@ func QCustomAudioRoleControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QCustomAudioRoleControl) Delete() { - C.QCustomAudioRoleControl_Delete(this.h) + C.QCustomAudioRoleControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qcustomaudiorolecontrol.h b/qt/multimedia/gen_qcustomaudiorolecontrol.h index 27db964a..7025d9d7 100644 --- a/qt/multimedia/gen_qcustomaudiorolecontrol.h +++ b/qt/multimedia/gen_qcustomaudiorolecontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QCustomAudioRoleControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QCustomAudioRoleControl QCustomAudioRoleControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QCustomAudioRoleControl_MetaObject(const QCustomAudioRoleControl* self); @@ -35,7 +39,7 @@ struct miqt_string QCustomAudioRoleControl_Tr2(const char* s, const char* c); struct miqt_string QCustomAudioRoleControl_Tr3(const char* s, const char* c, int n); struct miqt_string QCustomAudioRoleControl_TrUtf82(const char* s, const char* c); struct miqt_string QCustomAudioRoleControl_TrUtf83(const char* s, const char* c, int n); -void QCustomAudioRoleControl_Delete(QCustomAudioRoleControl* self); +void QCustomAudioRoleControl_Delete(QCustomAudioRoleControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qgraphicsvideoitem.cpp b/qt/multimedia/gen_qgraphicsvideoitem.cpp index defb9819..0769f7da 100644 --- a/qt/multimedia/gen_qgraphicsvideoitem.cpp +++ b/qt/multimedia/gen_qgraphicsvideoitem.cpp @@ -1,8 +1,12 @@ #include +#include #include +#include #include +#include #include #include +#include #include #include #include @@ -11,17 +15,206 @@ #include #include #include +#include +#include #include #include #include "gen_qgraphicsvideoitem.h" #include "_cgo_export.h" -QGraphicsVideoItem* QGraphicsVideoItem_new() { - return new QGraphicsVideoItem(); +class MiqtVirtualQGraphicsVideoItem : public virtual QGraphicsVideoItem { +public: + + MiqtVirtualQGraphicsVideoItem(): QGraphicsVideoItem() {}; + MiqtVirtualQGraphicsVideoItem(QGraphicsItem* parent): QGraphicsVideoItem(parent) {}; + + virtual ~MiqtVirtualQGraphicsVideoItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QGraphicsVideoItem::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QGraphicsVideoItem_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QGraphicsVideoItem::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsVideoItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsVideoItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsVideoItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsVideoItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsVideoItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsVideoItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGraphicsVideoItem::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsVideoItem_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsVideoItem::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsVideoItem::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsVideoItem_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsVideoItem::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* object) override { + if (handle__SetMediaObject == 0) { + return QGraphicsVideoItem::setMediaObject(object); + } + + QMediaObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QGraphicsVideoItem_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* object) { + + return QGraphicsVideoItem::setMediaObject(object); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* ev) override { + if (handle__Event == 0) { + return QGraphicsVideoItem::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsVideoItem_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsVideoItem::event(ev); + + } + +}; + +void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(); + *outptr_QGraphicsVideoItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent) { - return new QGraphicsVideoItem(parent); +void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(parent); + *outptr_QGraphicsVideoItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self) { @@ -95,8 +288,8 @@ QRectF* QGraphicsVideoItem_BoundingRect(const QGraphicsVideoItem* self) { return new QRectF(self->boundingRect()); } -void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } void QGraphicsVideoItem_NativeSizeChanged(QGraphicsVideoItem* self, QSizeF* size) { @@ -104,7 +297,7 @@ void QGraphicsVideoItem_NativeSizeChanged(QGraphicsVideoItem* self, QSizeF* size } void QGraphicsVideoItem_connect_NativeSizeChanged(QGraphicsVideoItem* self, intptr_t slot) { - QGraphicsVideoItem::connect(self, static_cast(&QGraphicsVideoItem::nativeSizeChanged), self, [=](const QSizeF& size) { + MiqtVirtualQGraphicsVideoItem::connect(self, static_cast(&QGraphicsVideoItem::nativeSizeChanged), self, [=](const QSizeF& size) { const QSizeF& size_ret = size; // Cast returned reference into pointer QSizeF* sigval1 = const_cast(&size_ret); @@ -156,11 +349,67 @@ struct miqt_string QGraphicsVideoItem_TrUtf83(const char* s, const char* c, int return _ms; } -void QGraphicsVideoItem_Paint3(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsVideoItem_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QGraphicsVideoItem_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_MediaObject(); +} + +void QGraphicsVideoItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsVideoItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsVideoItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsVideoItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsVideoItem_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsVideoItem_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsVideoItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsVideoItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsVideoItem_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__SetMediaObject = slot; +} + +bool QGraphicsVideoItem_virtualbase_SetMediaObject(void* self, QMediaObject* object) { + return ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_SetMediaObject(object); +} + +void QGraphicsVideoItem_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__Event = slot; +} + +bool QGraphicsVideoItem_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_Event(ev); } -void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self) { - delete self; +void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qgraphicsvideoitem.go b/qt/multimedia/gen_qgraphicsvideoitem.go index 713b600e..6dea1819 100644 --- a/qt/multimedia/gen_qgraphicsvideoitem.go +++ b/qt/multimedia/gen_qgraphicsvideoitem.go @@ -16,7 +16,8 @@ import ( ) type QGraphicsVideoItem struct { - h *C.QGraphicsVideoItem + h *C.QGraphicsVideoItem + isSubclass bool *qt.QGraphicsObject *QMediaBindableInterface } @@ -35,27 +36,53 @@ func (this *QGraphicsVideoItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsVideoItem(h *C.QGraphicsVideoItem) *QGraphicsVideoItem { +// newQGraphicsVideoItem constructs the type using only CGO pointers. +func newQGraphicsVideoItem(h *C.QGraphicsVideoItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QMediaBindableInterface *C.QMediaBindableInterface) *QGraphicsVideoItem { if h == nil { return nil } - return &QGraphicsVideoItem{h: h, QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(h)), QMediaBindableInterface: UnsafeNewQMediaBindableInterface(unsafe.Pointer(h))} + return &QGraphicsVideoItem{h: h, + QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem)), + QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} } -func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer) *QGraphicsVideoItem { - return newQGraphicsVideoItem((*C.QGraphicsVideoItem)(h)) +// UnsafeNewQGraphicsVideoItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QGraphicsVideoItem { + if h == nil { + return nil + } + + return &QGraphicsVideoItem{h: (*C.QGraphicsVideoItem)(h), + QGraphicsObject: qt.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), + QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} } // NewQGraphicsVideoItem constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem() *QGraphicsVideoItem { - ret := C.QGraphicsVideoItem_new() - return newQGraphicsVideoItem(ret) + var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QGraphicsVideoItem_new(&outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QMediaBindableInterface) + ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQGraphicsVideoItem2 constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem2(parent *qt.QGraphicsItem) *QGraphicsVideoItem { - ret := C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer())) - return newQGraphicsVideoItem(ret) + var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer()), &outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QMediaBindableInterface) + ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QGraphicsVideoItem) MetaObject() *qt.QMetaObject { @@ -87,11 +114,11 @@ func QGraphicsVideoItem_TrUtf8(s string) string { } func (this *QGraphicsVideoItem) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QGraphicsVideoItem_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QGraphicsVideoItem_MediaObject(this.h)), nil) } func (this *QGraphicsVideoItem) VideoSurface() *QAbstractVideoSurface { - return UnsafeNewQAbstractVideoSurface(unsafe.Pointer(C.QGraphicsVideoItem_VideoSurface(this.h))) + return UnsafeNewQAbstractVideoSurface(unsafe.Pointer(C.QGraphicsVideoItem_VideoSurface(this.h)), nil) } func (this *QGraphicsVideoItem) AspectRatioMode() qt.AspectRatioMode { @@ -138,8 +165,8 @@ func (this *QGraphicsVideoItem) BoundingRect() *qt.QRectF { return _goptr } -func (this *QGraphicsVideoItem) Paint(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem) { - C.QGraphicsVideoItem_Paint(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer())) +func (this *QGraphicsVideoItem) Paint(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + C.QGraphicsVideoItem_Paint(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) } func (this *QGraphicsVideoItem) NativeSizeChanged(size *qt.QSizeF) { @@ -206,13 +233,183 @@ func QGraphicsVideoItem_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QGraphicsVideoItem) Paint3(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { - C.QGraphicsVideoItem_Paint3(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) +func (this *QGraphicsVideoItem) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QGraphicsVideoItem_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QGraphicsVideoItem) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QGraphicsVideoItem_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_MediaObject +func miqt_exec_callback_QGraphicsVideoItem_MediaObject(self *C.QGraphicsVideoItem, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsVideoItem) callVirtualBase_BoundingRect() *qt.QRectF { + + _ret := C.QGraphicsVideoItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsVideoItem) OnBoundingRect(slot func(super func() *qt.QRectF) *qt.QRectF) { + C.QGraphicsVideoItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_BoundingRect +func miqt_exec_callback_QGraphicsVideoItem_BoundingRect(self *C.QGraphicsVideoItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QRectF) *qt.QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_BoundingRect) + + return (*C.QRectF)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_Paint(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + + C.QGraphicsVideoItem_virtualbase_Paint(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) + +} +func (this *QGraphicsVideoItem) OnPaint(slot func(super func(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) { + C.QGraphicsVideoItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_Paint +func miqt_exec_callback_QGraphicsVideoItem_Paint(self *C.QGraphicsVideoItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QGraphicsVideoItem_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsVideoItem) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QGraphicsVideoItem_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_TimerEvent +func miqt_exec_callback_QGraphicsVideoItem_TimerEvent(self *C.QGraphicsVideoItem, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_ItemChange(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant { + + _ret := C.QGraphicsVideoItem_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), (*C.QVariant)(value.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsVideoItem) OnItemChange(slot func(super func(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant, change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant) { + C.QGraphicsVideoItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_ItemChange +func miqt_exec_callback_QGraphicsVideoItem_ItemChange(self *C.QGraphicsVideoItem, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant, change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_SetMediaObject(object *QMediaObject) bool { + + return (bool)(C.QGraphicsVideoItem_virtualbase_SetMediaObject(unsafe.Pointer(this.h), object.cPointer())) + +} +func (this *QGraphicsVideoItem) OnSetMediaObject(slot func(super func(object *QMediaObject) bool, object *QMediaObject) bool) { + C.QGraphicsVideoItem_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_SetMediaObject +func miqt_exec_callback_QGraphicsVideoItem_SetMediaObject(self *C.QGraphicsVideoItem, cb C.intptr_t, object *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QMediaObject) bool, object *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(object), nil) + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_Event(ev *qt.QEvent) bool { + + return (bool)(C.QGraphicsVideoItem_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(ev.UnsafePointer()))) + +} +func (this *QGraphicsVideoItem) OnEvent(slot func(super func(ev *qt.QEvent) bool, ev *qt.QEvent) bool) { + C.QGraphicsVideoItem_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_Event +func miqt_exec_callback_QGraphicsVideoItem_Event(self *C.QGraphicsVideoItem, cb C.intptr_t, ev *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *qt.QEvent) bool, ev *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(ev)) + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QGraphicsVideoItem) Delete() { - C.QGraphicsVideoItem_Delete(this.h) + C.QGraphicsVideoItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qgraphicsvideoitem.h b/qt/multimedia/gen_qgraphicsvideoitem.h index 8af7094a..0dea1dd3 100644 --- a/qt/multimedia/gen_qgraphicsvideoitem.h +++ b/qt/multimedia/gen_qgraphicsvideoitem.h @@ -16,32 +16,44 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; +class QEvent; class QGraphicsItem; +class QGraphicsObject; class QGraphicsVideoItem; +class QMediaBindableInterface; class QMediaObject; class QMetaObject; +class QObject; class QPainter; class QPointF; class QRectF; class QSizeF; class QStyleOptionGraphicsItem; +class QTimerEvent; +class QVariant; class QWidget; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; +typedef struct QEvent QEvent; typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsObject QGraphicsObject; typedef struct QGraphicsVideoItem QGraphicsVideoItem; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaObject QMediaObject; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPointF QPointF; typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsVideoItem* QGraphicsVideoItem_new(); -QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent); +void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self); void* QGraphicsVideoItem_Metacast(QGraphicsVideoItem* self, const char* param1); struct miqt_string QGraphicsVideoItem_Tr(const char* s); @@ -56,15 +68,31 @@ QSizeF* QGraphicsVideoItem_Size(const QGraphicsVideoItem* self); void QGraphicsVideoItem_SetSize(QGraphicsVideoItem* self, QSizeF* size); QSizeF* QGraphicsVideoItem_NativeSize(const QGraphicsVideoItem* self); QRectF* QGraphicsVideoItem_BoundingRect(const QGraphicsVideoItem* self); -void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); void QGraphicsVideoItem_NativeSizeChanged(QGraphicsVideoItem* self, QSizeF* size); void QGraphicsVideoItem_connect_NativeSizeChanged(QGraphicsVideoItem* self, intptr_t slot); +void QGraphicsVideoItem_TimerEvent(QGraphicsVideoItem* self, QTimerEvent* event); +QVariant* QGraphicsVideoItem_ItemChange(QGraphicsVideoItem* self, int change, QVariant* value); +bool QGraphicsVideoItem_SetMediaObject(QGraphicsVideoItem* self, QMediaObject* object); struct miqt_string QGraphicsVideoItem_Tr2(const char* s, const char* c); struct miqt_string QGraphicsVideoItem_Tr3(const char* s, const char* c, int n); struct miqt_string QGraphicsVideoItem_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsVideoItem_TrUtf83(const char* s, const char* c, int n); -void QGraphicsVideoItem_Paint3(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self); +void QGraphicsVideoItem_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QGraphicsVideoItem_virtualbase_MediaObject(const void* self); +void QGraphicsVideoItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsVideoItem_virtualbase_BoundingRect(const void* self); +void QGraphicsVideoItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsVideoItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsVideoItem_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsVideoItem_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsVideoItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsVideoItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsVideoItem_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QGraphicsVideoItem_virtualbase_SetMediaObject(void* self, QMediaObject* object); +void QGraphicsVideoItem_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsVideoItem_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qimageencodercontrol.cpp b/qt/multimedia/gen_qimageencodercontrol.cpp index ba19ce42..81d58307 100644 --- a/qt/multimedia/gen_qimageencodercontrol.cpp +++ b/qt/multimedia/gen_qimageencodercontrol.cpp @@ -1,7 +1,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -72,8 +74,8 @@ struct miqt_string QImageEncoderControl_ImageCodecDescription(const QImageEncode return _ms; } -struct miqt_array /* of QSize* */ QImageEncoderControl_SupportedResolutions(const QImageEncoderControl* self, QImageEncoderSettings* settings) { - QList _ret = self->supportedResolutions(*settings); +struct miqt_array /* of QSize* */ QImageEncoderControl_SupportedResolutions(const QImageEncoderControl* self, QImageEncoderSettings* settings, bool* continuous) { + QList _ret = self->supportedResolutions(*settings, continuous); // Convert QList<> from C++ memory to manually-managed C memory QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -137,20 +139,11 @@ struct miqt_string QImageEncoderControl_TrUtf83(const char* s, const char* c, in return _ms; } -struct miqt_array /* of QSize* */ QImageEncoderControl_SupportedResolutions2(const QImageEncoderControl* self, QImageEncoderSettings* settings, bool* continuous) { - QList _ret = self->supportedResolutions(*settings, continuous); - // Convert QList<> from C++ memory to manually-managed C memory - QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QSize(_ret[i]); +void QImageEncoderControl_Delete(QImageEncoderControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -void QImageEncoderControl_Delete(QImageEncoderControl* self) { - delete self; } diff --git a/qt/multimedia/gen_qimageencodercontrol.go b/qt/multimedia/gen_qimageencodercontrol.go index b8577983..3f3e5fa6 100644 --- a/qt/multimedia/gen_qimageencodercontrol.go +++ b/qt/multimedia/gen_qimageencodercontrol.go @@ -15,7 +15,8 @@ import ( ) type QImageEncoderControl struct { - h *C.QImageEncoderControl + h *C.QImageEncoderControl + isSubclass bool *QMediaControl } @@ -33,15 +34,23 @@ func (this *QImageEncoderControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQImageEncoderControl(h *C.QImageEncoderControl) *QImageEncoderControl { +// newQImageEncoderControl constructs the type using only CGO pointers. +func newQImageEncoderControl(h *C.QImageEncoderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QImageEncoderControl { if h == nil { return nil } - return &QImageEncoderControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QImageEncoderControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQImageEncoderControl(h unsafe.Pointer) *QImageEncoderControl { - return newQImageEncoderControl((*C.QImageEncoderControl)(h)) +// UnsafeNewQImageEncoderControl constructs the type using only unsafe pointers. +func UnsafeNewQImageEncoderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QImageEncoderControl { + if h == nil { + return nil + } + + return &QImageEncoderControl{h: (*C.QImageEncoderControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QImageEncoderControl) MetaObject() *qt.QMetaObject { @@ -96,8 +105,8 @@ func (this *QImageEncoderControl) ImageCodecDescription(codec string) string { return _ret } -func (this *QImageEncoderControl) SupportedResolutions(settings *QImageEncoderSettings) []qt.QSize { - var _ma C.struct_miqt_array = C.QImageEncoderControl_SupportedResolutions(this.h, settings.cPointer()) +func (this *QImageEncoderControl) SupportedResolutions(settings *QImageEncoderSettings, continuous *bool) []qt.QSize { + var _ma C.struct_miqt_array = C.QImageEncoderControl_SupportedResolutions(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) _ret := make([]qt.QSize, int(_ma.len)) _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -164,22 +173,9 @@ func QImageEncoderControl_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QImageEncoderControl) SupportedResolutions2(settings *QImageEncoderSettings, continuous *bool) []qt.QSize { - var _ma C.struct_miqt_array = C.QImageEncoderControl_SupportedResolutions2(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) - _ret := make([]qt.QSize, int(_ma.len)) - _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := qt.UnsafeNewQSize(unsafe.Pointer(_lv_ret)) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - // Delete this object from C++ memory. func (this *QImageEncoderControl) Delete() { - C.QImageEncoderControl_Delete(this.h) + C.QImageEncoderControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qimageencodercontrol.h b/qt/multimedia/gen_qimageencodercontrol.h index c45691c1..606eac4d 100644 --- a/qt/multimedia/gen_qimageencodercontrol.h +++ b/qt/multimedia/gen_qimageencodercontrol.h @@ -17,12 +17,16 @@ extern "C" { #ifdef __cplusplus class QImageEncoderControl; class QImageEncoderSettings; +class QMediaControl; class QMetaObject; +class QObject; class QSize; #else typedef struct QImageEncoderControl QImageEncoderControl; typedef struct QImageEncoderSettings QImageEncoderSettings; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSize QSize; #endif @@ -32,15 +36,14 @@ struct miqt_string QImageEncoderControl_Tr(const char* s); struct miqt_string QImageEncoderControl_TrUtf8(const char* s); struct miqt_array /* of struct miqt_string */ QImageEncoderControl_SupportedImageCodecs(const QImageEncoderControl* self); struct miqt_string QImageEncoderControl_ImageCodecDescription(const QImageEncoderControl* self, struct miqt_string codec); -struct miqt_array /* of QSize* */ QImageEncoderControl_SupportedResolutions(const QImageEncoderControl* self, QImageEncoderSettings* settings); +struct miqt_array /* of QSize* */ QImageEncoderControl_SupportedResolutions(const QImageEncoderControl* self, QImageEncoderSettings* settings, bool* continuous); QImageEncoderSettings* QImageEncoderControl_ImageSettings(const QImageEncoderControl* self); void QImageEncoderControl_SetImageSettings(QImageEncoderControl* self, QImageEncoderSettings* settings); struct miqt_string QImageEncoderControl_Tr2(const char* s, const char* c); struct miqt_string QImageEncoderControl_Tr3(const char* s, const char* c, int n); struct miqt_string QImageEncoderControl_TrUtf82(const char* s, const char* c); struct miqt_string QImageEncoderControl_TrUtf83(const char* s, const char* c, int n); -struct miqt_array /* of QSize* */ QImageEncoderControl_SupportedResolutions2(const QImageEncoderControl* self, QImageEncoderSettings* settings, bool* continuous); -void QImageEncoderControl_Delete(QImageEncoderControl* self); +void QImageEncoderControl_Delete(QImageEncoderControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaaudioprobecontrol.cpp b/qt/multimedia/gen_qmediaaudioprobecontrol.cpp index edd679ed..44baf0b0 100644 --- a/qt/multimedia/gen_qmediaaudioprobecontrol.cpp +++ b/qt/multimedia/gen_qmediaaudioprobecontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -105,7 +107,11 @@ struct miqt_string QMediaAudioProbeControl_TrUtf83(const char* s, const char* c, return _ms; } -void QMediaAudioProbeControl_Delete(QMediaAudioProbeControl* self) { - delete self; +void QMediaAudioProbeControl_Delete(QMediaAudioProbeControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaaudioprobecontrol.go b/qt/multimedia/gen_qmediaaudioprobecontrol.go index b10a2c36..53e9e1a5 100644 --- a/qt/multimedia/gen_qmediaaudioprobecontrol.go +++ b/qt/multimedia/gen_qmediaaudioprobecontrol.go @@ -16,7 +16,8 @@ import ( ) type QMediaAudioProbeControl struct { - h *C.QMediaAudioProbeControl + h *C.QMediaAudioProbeControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMediaAudioProbeControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaAudioProbeControl(h *C.QMediaAudioProbeControl) *QMediaAudioProbeControl { +// newQMediaAudioProbeControl constructs the type using only CGO pointers. +func newQMediaAudioProbeControl(h *C.QMediaAudioProbeControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaAudioProbeControl { if h == nil { return nil } - return &QMediaAudioProbeControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaAudioProbeControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaAudioProbeControl(h unsafe.Pointer) *QMediaAudioProbeControl { - return newQMediaAudioProbeControl((*C.QMediaAudioProbeControl)(h)) +// UnsafeNewQMediaAudioProbeControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaAudioProbeControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaAudioProbeControl { + if h == nil { + return nil + } + + return &QMediaAudioProbeControl{h: (*C.QMediaAudioProbeControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaAudioProbeControl) MetaObject() *qt.QMetaObject { @@ -156,7 +165,7 @@ func QMediaAudioProbeControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaAudioProbeControl) Delete() { - C.QMediaAudioProbeControl_Delete(this.h) + C.QMediaAudioProbeControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaaudioprobecontrol.h b/qt/multimedia/gen_qmediaaudioprobecontrol.h index 98d5a19f..28933fba 100644 --- a/qt/multimedia/gen_qmediaaudioprobecontrol.h +++ b/qt/multimedia/gen_qmediaaudioprobecontrol.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QAudioBuffer; class QMediaAudioProbeControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QAudioBuffer QAudioBuffer; typedef struct QMediaAudioProbeControl QMediaAudioProbeControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaAudioProbeControl_MetaObject(const QMediaAudioProbeControl* self); @@ -36,7 +40,7 @@ struct miqt_string QMediaAudioProbeControl_Tr2(const char* s, const char* c); struct miqt_string QMediaAudioProbeControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaAudioProbeControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaAudioProbeControl_TrUtf83(const char* s, const char* c, int n); -void QMediaAudioProbeControl_Delete(QMediaAudioProbeControl* self); +void QMediaAudioProbeControl_Delete(QMediaAudioProbeControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaavailabilitycontrol.cpp b/qt/multimedia/gen_qmediaavailabilitycontrol.cpp index abc8d8b2..ddc48a54 100644 --- a/qt/multimedia/gen_qmediaavailabilitycontrol.cpp +++ b/qt/multimedia/gen_qmediaavailabilitycontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -98,7 +100,11 @@ struct miqt_string QMediaAvailabilityControl_TrUtf83(const char* s, const char* return _ms; } -void QMediaAvailabilityControl_Delete(QMediaAvailabilityControl* self) { - delete self; +void QMediaAvailabilityControl_Delete(QMediaAvailabilityControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaavailabilitycontrol.go b/qt/multimedia/gen_qmediaavailabilitycontrol.go index aa1b9d6b..014410c1 100644 --- a/qt/multimedia/gen_qmediaavailabilitycontrol.go +++ b/qt/multimedia/gen_qmediaavailabilitycontrol.go @@ -16,7 +16,8 @@ import ( ) type QMediaAvailabilityControl struct { - h *C.QMediaAvailabilityControl + h *C.QMediaAvailabilityControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMediaAvailabilityControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaAvailabilityControl(h *C.QMediaAvailabilityControl) *QMediaAvailabilityControl { +// newQMediaAvailabilityControl constructs the type using only CGO pointers. +func newQMediaAvailabilityControl(h *C.QMediaAvailabilityControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaAvailabilityControl { if h == nil { return nil } - return &QMediaAvailabilityControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaAvailabilityControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaAvailabilityControl(h unsafe.Pointer) *QMediaAvailabilityControl { - return newQMediaAvailabilityControl((*C.QMediaAvailabilityControl)(h)) +// UnsafeNewQMediaAvailabilityControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaAvailabilityControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaAvailabilityControl { + if h == nil { + return nil + } + + return &QMediaAvailabilityControl{h: (*C.QMediaAvailabilityControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaAvailabilityControl) MetaObject() *qt.QMetaObject { @@ -143,7 +152,7 @@ func QMediaAvailabilityControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaAvailabilityControl) Delete() { - C.QMediaAvailabilityControl_Delete(this.h) + C.QMediaAvailabilityControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaavailabilitycontrol.h b/qt/multimedia/gen_qmediaavailabilitycontrol.h index 8ca5d175..28149a09 100644 --- a/qt/multimedia/gen_qmediaavailabilitycontrol.h +++ b/qt/multimedia/gen_qmediaavailabilitycontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QMediaAvailabilityControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QMediaAvailabilityControl QMediaAvailabilityControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaAvailabilityControl_MetaObject(const QMediaAvailabilityControl* self); @@ -33,7 +37,7 @@ struct miqt_string QMediaAvailabilityControl_Tr2(const char* s, const char* c); struct miqt_string QMediaAvailabilityControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaAvailabilityControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaAvailabilityControl_TrUtf83(const char* s, const char* c, int n); -void QMediaAvailabilityControl_Delete(QMediaAvailabilityControl* self); +void QMediaAvailabilityControl_Delete(QMediaAvailabilityControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediabindableinterface.cpp b/qt/multimedia/gen_qmediabindableinterface.cpp index 0747c936..57624ef4 100644 --- a/qt/multimedia/gen_qmediabindableinterface.cpp +++ b/qt/multimedia/gen_qmediabindableinterface.cpp @@ -8,7 +8,11 @@ QMediaObject* QMediaBindableInterface_MediaObject(const QMediaBindableInterface* return self->mediaObject(); } -void QMediaBindableInterface_Delete(QMediaBindableInterface* self) { - delete self; +void QMediaBindableInterface_Delete(QMediaBindableInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediabindableinterface.go b/qt/multimedia/gen_qmediabindableinterface.go index 2f01143e..777cb714 100644 --- a/qt/multimedia/gen_qmediabindableinterface.go +++ b/qt/multimedia/gen_qmediabindableinterface.go @@ -14,7 +14,8 @@ import ( ) type QMediaBindableInterface struct { - h *C.QMediaBindableInterface + h *C.QMediaBindableInterface + isSubclass bool } func (this *QMediaBindableInterface) cPointer() *C.QMediaBindableInterface { @@ -31,6 +32,7 @@ func (this *QMediaBindableInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaBindableInterface constructs the type using only CGO pointers. func newQMediaBindableInterface(h *C.QMediaBindableInterface) *QMediaBindableInterface { if h == nil { return nil @@ -38,17 +40,22 @@ func newQMediaBindableInterface(h *C.QMediaBindableInterface) *QMediaBindableInt return &QMediaBindableInterface{h: h} } +// UnsafeNewQMediaBindableInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaBindableInterface(h unsafe.Pointer) *QMediaBindableInterface { - return newQMediaBindableInterface((*C.QMediaBindableInterface)(h)) + if h == nil { + return nil + } + + return &QMediaBindableInterface{h: (*C.QMediaBindableInterface)(h)} } func (this *QMediaBindableInterface) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaBindableInterface_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaBindableInterface_MediaObject(this.h)), nil) } // Delete this object from C++ memory. func (this *QMediaBindableInterface) Delete() { - C.QMediaBindableInterface_Delete(this.h) + C.QMediaBindableInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediabindableinterface.h b/qt/multimedia/gen_qmediabindableinterface.h index c855c4eb..83aa54cd 100644 --- a/qt/multimedia/gen_qmediabindableinterface.h +++ b/qt/multimedia/gen_qmediabindableinterface.h @@ -23,7 +23,8 @@ typedef struct QMediaObject QMediaObject; #endif QMediaObject* QMediaBindableInterface_MediaObject(const QMediaBindableInterface* self); -void QMediaBindableInterface_Delete(QMediaBindableInterface* self); +bool QMediaBindableInterface_SetMediaObject(QMediaBindableInterface* self, QMediaObject* object); +void QMediaBindableInterface_Delete(QMediaBindableInterface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediacontainercontrol.cpp b/qt/multimedia/gen_qmediacontainercontrol.cpp index c9efbe90..c2c916eb 100644 --- a/qt/multimedia/gen_qmediacontainercontrol.cpp +++ b/qt/multimedia/gen_qmediacontainercontrol.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -130,7 +132,11 @@ struct miqt_string QMediaContainerControl_TrUtf83(const char* s, const char* c, return _ms; } -void QMediaContainerControl_Delete(QMediaContainerControl* self) { - delete self; +void QMediaContainerControl_Delete(QMediaContainerControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediacontainercontrol.go b/qt/multimedia/gen_qmediacontainercontrol.go index 5dc3eb7d..170ad9b9 100644 --- a/qt/multimedia/gen_qmediacontainercontrol.go +++ b/qt/multimedia/gen_qmediacontainercontrol.go @@ -15,7 +15,8 @@ import ( ) type QMediaContainerControl struct { - h *C.QMediaContainerControl + h *C.QMediaContainerControl + isSubclass bool *QMediaControl } @@ -33,15 +34,23 @@ func (this *QMediaContainerControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaContainerControl(h *C.QMediaContainerControl) *QMediaContainerControl { +// newQMediaContainerControl constructs the type using only CGO pointers. +func newQMediaContainerControl(h *C.QMediaContainerControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaContainerControl { if h == nil { return nil } - return &QMediaContainerControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaContainerControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaContainerControl(h unsafe.Pointer) *QMediaContainerControl { - return newQMediaContainerControl((*C.QMediaContainerControl)(h)) +// UnsafeNewQMediaContainerControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaContainerControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaContainerControl { + if h == nil { + return nil + } + + return &QMediaContainerControl{h: (*C.QMediaContainerControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaContainerControl) MetaObject() *qt.QMetaObject { @@ -157,7 +166,7 @@ func QMediaContainerControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaContainerControl) Delete() { - C.QMediaContainerControl_Delete(this.h) + C.QMediaContainerControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediacontainercontrol.h b/qt/multimedia/gen_qmediacontainercontrol.h index 4e5917e9..ce75e4b7 100644 --- a/qt/multimedia/gen_qmediacontainercontrol.h +++ b/qt/multimedia/gen_qmediacontainercontrol.h @@ -16,10 +16,14 @@ extern "C" { #ifdef __cplusplus class QMediaContainerControl; +class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QMediaContainerControl QMediaContainerControl; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaContainerControl_MetaObject(const QMediaContainerControl* self); @@ -34,7 +38,7 @@ struct miqt_string QMediaContainerControl_Tr2(const char* s, const char* c); struct miqt_string QMediaContainerControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaContainerControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaContainerControl_TrUtf83(const char* s, const char* c, int n); -void QMediaContainerControl_Delete(QMediaContainerControl* self); +void QMediaContainerControl_Delete(QMediaContainerControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediacontent.cpp b/qt/multimedia/gen_qmediacontent.cpp index fd7414eb..6429e46f 100644 --- a/qt/multimedia/gen_qmediacontent.cpp +++ b/qt/multimedia/gen_qmediacontent.cpp @@ -8,46 +8,55 @@ #include "gen_qmediacontent.h" #include "_cgo_export.h" -QMediaContent* QMediaContent_new() { - return new QMediaContent(); +void QMediaContent_new(QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new2(QUrl* contentUrl) { - return new QMediaContent(*contentUrl); +void QMediaContent_new2(QUrl* contentUrl, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(*contentUrl); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new3(QNetworkRequest* contentRequest) { - return new QMediaContent(*contentRequest); +void QMediaContent_new3(QNetworkRequest* contentRequest, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(*contentRequest); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new4(QMediaResource* contentResource) { - return new QMediaContent(*contentResource); +void QMediaContent_new4(QMediaResource* contentResource, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(*contentResource); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources) { +void QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources, QMediaContent** outptr_QMediaContent) { QMediaResourceList resources_QList; resources_QList.reserve(resources.len); QMediaResource** resources_arr = static_cast(resources.data); for(size_t i = 0; i < resources.len; ++i) { resources_QList.push_back(*(resources_arr[i])); } - return new QMediaContent(resources_QList); + QMediaContent* ret = new QMediaContent(resources_QList); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new6(QMediaContent* other) { - return new QMediaContent(*other); +void QMediaContent_new6(QMediaContent* other, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(*other); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new7(QMediaPlaylist* playlist) { - return new QMediaContent(playlist); +void QMediaContent_new7(QMediaPlaylist* playlist, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(playlist); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl) { - return new QMediaContent(playlist, *contentUrl); +void QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(playlist, *contentUrl); + *outptr_QMediaContent = ret; } -QMediaContent* QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership) { - return new QMediaContent(playlist, *contentUrl, takeOwnership); +void QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership, QMediaContent** outptr_QMediaContent) { + QMediaContent* ret = new QMediaContent(playlist, *contentUrl, takeOwnership); + *outptr_QMediaContent = ret; } void QMediaContent_OperatorAssign(QMediaContent* self, QMediaContent* other) { @@ -99,7 +108,11 @@ QMediaPlaylist* QMediaContent_Playlist(const QMediaContent* self) { return self->playlist(); } -void QMediaContent_Delete(QMediaContent* self) { - delete self; +void QMediaContent_Delete(QMediaContent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediacontent.go b/qt/multimedia/gen_qmediacontent.go index 986f0a8a..2d8a7e52 100644 --- a/qt/multimedia/gen_qmediacontent.go +++ b/qt/multimedia/gen_qmediacontent.go @@ -16,7 +16,8 @@ import ( ) type QMediaContent struct { - h *C.QMediaContent + h *C.QMediaContent + isSubclass bool } func (this *QMediaContent) cPointer() *C.QMediaContent { @@ -33,6 +34,7 @@ func (this *QMediaContent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaContent constructs the type using only CGO pointers. func newQMediaContent(h *C.QMediaContent) *QMediaContent { if h == nil { return nil @@ -40,32 +42,53 @@ func newQMediaContent(h *C.QMediaContent) *QMediaContent { return &QMediaContent{h: h} } +// UnsafeNewQMediaContent constructs the type using only unsafe pointers. func UnsafeNewQMediaContent(h unsafe.Pointer) *QMediaContent { - return newQMediaContent((*C.QMediaContent)(h)) + if h == nil { + return nil + } + + return &QMediaContent{h: (*C.QMediaContent)(h)} } // NewQMediaContent constructs a new QMediaContent object. func NewQMediaContent() *QMediaContent { - ret := C.QMediaContent_new() - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new(&outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent2 constructs a new QMediaContent object. func NewQMediaContent2(contentUrl *qt.QUrl) *QMediaContent { - ret := C.QMediaContent_new2((*C.QUrl)(contentUrl.UnsafePointer())) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new2((*C.QUrl)(contentUrl.UnsafePointer()), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent3 constructs a new QMediaContent object. func NewQMediaContent3(contentRequest *network.QNetworkRequest) *QMediaContent { - ret := C.QMediaContent_new3((*C.QNetworkRequest)(contentRequest.UnsafePointer())) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new3((*C.QNetworkRequest)(contentRequest.UnsafePointer()), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent4 constructs a new QMediaContent object. func NewQMediaContent4(contentResource *QMediaResource) *QMediaContent { - ret := C.QMediaContent_new4(contentResource.cPointer()) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new4(contentResource.cPointer(), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent5 constructs a new QMediaContent object. @@ -76,32 +99,52 @@ func NewQMediaContent5(resources []QMediaResource) *QMediaContent { resources_CArray[i] = resources[i].cPointer() } resources_ma := C.struct_miqt_array{len: C.size_t(len(resources)), data: unsafe.Pointer(resources_CArray)} - ret := C.QMediaContent_new5(resources_ma) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new5(resources_ma, &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent6 constructs a new QMediaContent object. func NewQMediaContent6(other *QMediaContent) *QMediaContent { - ret := C.QMediaContent_new6(other.cPointer()) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new6(other.cPointer(), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent7 constructs a new QMediaContent object. func NewQMediaContent7(playlist *QMediaPlaylist) *QMediaContent { - ret := C.QMediaContent_new7(playlist.cPointer()) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new7(playlist.cPointer(), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent8 constructs a new QMediaContent object. func NewQMediaContent8(playlist *QMediaPlaylist, contentUrl *qt.QUrl) *QMediaContent { - ret := C.QMediaContent_new8(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer())) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new8(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } // NewQMediaContent9 constructs a new QMediaContent object. func NewQMediaContent9(playlist *QMediaPlaylist, contentUrl *qt.QUrl, takeOwnership bool) *QMediaContent { - ret := C.QMediaContent_new9(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()), (C.bool)(takeOwnership)) - return newQMediaContent(ret) + var outptr_QMediaContent *C.QMediaContent = nil + + C.QMediaContent_new9(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()), (C.bool)(takeOwnership), &outptr_QMediaContent) + ret := newQMediaContent(outptr_QMediaContent) + ret.isSubclass = true + return ret } func (this *QMediaContent) OperatorAssign(other *QMediaContent) { @@ -162,12 +205,12 @@ func (this *QMediaContent) Resources() []QMediaResource { } func (this *QMediaContent) Playlist() *QMediaPlaylist { - return UnsafeNewQMediaPlaylist(unsafe.Pointer(C.QMediaContent_Playlist(this.h))) + return UnsafeNewQMediaPlaylist(unsafe.Pointer(C.QMediaContent_Playlist(this.h)), nil, nil) } // Delete this object from C++ memory. func (this *QMediaContent) Delete() { - C.QMediaContent_Delete(this.h) + C.QMediaContent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediacontent.h b/qt/multimedia/gen_qmediacontent.h index 036321f5..d8a125e6 100644 --- a/qt/multimedia/gen_qmediacontent.h +++ b/qt/multimedia/gen_qmediacontent.h @@ -28,15 +28,15 @@ typedef struct QNetworkRequest QNetworkRequest; typedef struct QUrl QUrl; #endif -QMediaContent* QMediaContent_new(); -QMediaContent* QMediaContent_new2(QUrl* contentUrl); -QMediaContent* QMediaContent_new3(QNetworkRequest* contentRequest); -QMediaContent* QMediaContent_new4(QMediaResource* contentResource); -QMediaContent* QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources); -QMediaContent* QMediaContent_new6(QMediaContent* other); -QMediaContent* QMediaContent_new7(QMediaPlaylist* playlist); -QMediaContent* QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl); -QMediaContent* QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership); +void QMediaContent_new(QMediaContent** outptr_QMediaContent); +void QMediaContent_new2(QUrl* contentUrl, QMediaContent** outptr_QMediaContent); +void QMediaContent_new3(QNetworkRequest* contentRequest, QMediaContent** outptr_QMediaContent); +void QMediaContent_new4(QMediaResource* contentResource, QMediaContent** outptr_QMediaContent); +void QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources, QMediaContent** outptr_QMediaContent); +void QMediaContent_new6(QMediaContent* other, QMediaContent** outptr_QMediaContent); +void QMediaContent_new7(QMediaPlaylist* playlist, QMediaContent** outptr_QMediaContent); +void QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl, QMediaContent** outptr_QMediaContent); +void QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership, QMediaContent** outptr_QMediaContent); void QMediaContent_OperatorAssign(QMediaContent* self, QMediaContent* other); bool QMediaContent_OperatorEqual(const QMediaContent* self, QMediaContent* other); bool QMediaContent_OperatorNotEqual(const QMediaContent* self, QMediaContent* other); @@ -47,7 +47,7 @@ QNetworkRequest* QMediaContent_CanonicalRequest(const QMediaContent* self); QMediaResource* QMediaContent_CanonicalResource(const QMediaContent* self); struct miqt_array /* of QMediaResource* */ QMediaContent_Resources(const QMediaContent* self); QMediaPlaylist* QMediaContent_Playlist(const QMediaContent* self); -void QMediaContent_Delete(QMediaContent* self); +void QMediaContent_Delete(QMediaContent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediacontrol.cpp b/qt/multimedia/gen_qmediacontrol.cpp index 0540f3f7..36841055 100644 --- a/qt/multimedia/gen_qmediacontrol.cpp +++ b/qt/multimedia/gen_qmediacontrol.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -81,7 +82,11 @@ struct miqt_string QMediaControl_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QMediaControl_Delete(QMediaControl* self) { - delete self; +void QMediaControl_Delete(QMediaControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediacontrol.go b/qt/multimedia/gen_qmediacontrol.go index 2cab93bc..069e8ac1 100644 --- a/qt/multimedia/gen_qmediacontrol.go +++ b/qt/multimedia/gen_qmediacontrol.go @@ -15,7 +15,8 @@ import ( ) type QMediaControl struct { - h *C.QMediaControl + h *C.QMediaControl + isSubclass bool *qt.QObject } @@ -33,15 +34,23 @@ func (this *QMediaControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaControl(h *C.QMediaControl) *QMediaControl { +// newQMediaControl constructs the type using only CGO pointers. +func newQMediaControl(h *C.QMediaControl, h_QObject *C.QObject) *QMediaControl { if h == nil { return nil } - return &QMediaControl{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaControl{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaControl(h unsafe.Pointer) *QMediaControl { - return newQMediaControl((*C.QMediaControl)(h)) +// UnsafeNewQMediaControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaControl(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaControl { + if h == nil { + return nil + } + + return &QMediaControl{h: (*C.QMediaControl)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QMediaControl) MetaObject() *qt.QMetaObject { @@ -118,7 +127,7 @@ func QMediaControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaControl) Delete() { - C.QMediaControl_Delete(this.h) + C.QMediaControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediacontrol.h b/qt/multimedia/gen_qmediacontrol.h index 10da5cdf..8bc9d6c2 100644 --- a/qt/multimedia/gen_qmediacontrol.h +++ b/qt/multimedia/gen_qmediacontrol.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QMediaControl; class QMetaObject; +class QObject; #else typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaControl_MetaObject(const QMediaControl* self); @@ -30,7 +32,7 @@ struct miqt_string QMediaControl_Tr2(const char* s, const char* c); struct miqt_string QMediaControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaControl_TrUtf83(const char* s, const char* c, int n); -void QMediaControl_Delete(QMediaControl* self); +void QMediaControl_Delete(QMediaControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaencodersettings.cpp b/qt/multimedia/gen_qmediaencodersettings.cpp index cfa98e72..a9dcd2da 100644 --- a/qt/multimedia/gen_qmediaencodersettings.cpp +++ b/qt/multimedia/gen_qmediaencodersettings.cpp @@ -11,12 +11,14 @@ #include "gen_qmediaencodersettings.h" #include "_cgo_export.h" -QAudioEncoderSettings* QAudioEncoderSettings_new() { - return new QAudioEncoderSettings(); +void QAudioEncoderSettings_new(QAudioEncoderSettings** outptr_QAudioEncoderSettings) { + QAudioEncoderSettings* ret = new QAudioEncoderSettings(); + *outptr_QAudioEncoderSettings = ret; } -QAudioEncoderSettings* QAudioEncoderSettings_new2(QAudioEncoderSettings* other) { - return new QAudioEncoderSettings(*other); +void QAudioEncoderSettings_new2(QAudioEncoderSettings* other, QAudioEncoderSettings** outptr_QAudioEncoderSettings) { + QAudioEncoderSettings* ret = new QAudioEncoderSettings(*other); + *outptr_QAudioEncoderSettings = ret; } void QAudioEncoderSettings_OperatorAssign(QAudioEncoderSettings* self, QAudioEncoderSettings* other) { @@ -139,16 +141,22 @@ void QAudioEncoderSettings_SetEncodingOptions(QAudioEncoderSettings* self, struc self->setEncodingOptions(options_QMap); } -void QAudioEncoderSettings_Delete(QAudioEncoderSettings* self) { - delete self; +void QAudioEncoderSettings_Delete(QAudioEncoderSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QVideoEncoderSettings* QVideoEncoderSettings_new() { - return new QVideoEncoderSettings(); +void QVideoEncoderSettings_new(QVideoEncoderSettings** outptr_QVideoEncoderSettings) { + QVideoEncoderSettings* ret = new QVideoEncoderSettings(); + *outptr_QVideoEncoderSettings = ret; } -QVideoEncoderSettings* QVideoEncoderSettings_new2(QVideoEncoderSettings* other) { - return new QVideoEncoderSettings(*other); +void QVideoEncoderSettings_new2(QVideoEncoderSettings* other, QVideoEncoderSettings** outptr_QVideoEncoderSettings) { + QVideoEncoderSettings* ret = new QVideoEncoderSettings(*other); + *outptr_QVideoEncoderSettings = ret; } void QVideoEncoderSettings_OperatorAssign(QVideoEncoderSettings* self, QVideoEncoderSettings* other) { @@ -276,16 +284,22 @@ void QVideoEncoderSettings_SetEncodingOptions(QVideoEncoderSettings* self, struc self->setEncodingOptions(options_QMap); } -void QVideoEncoderSettings_Delete(QVideoEncoderSettings* self) { - delete self; +void QVideoEncoderSettings_Delete(QVideoEncoderSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QImageEncoderSettings* QImageEncoderSettings_new() { - return new QImageEncoderSettings(); +void QImageEncoderSettings_new(QImageEncoderSettings** outptr_QImageEncoderSettings) { + QImageEncoderSettings* ret = new QImageEncoderSettings(); + *outptr_QImageEncoderSettings = ret; } -QImageEncoderSettings* QImageEncoderSettings_new2(QImageEncoderSettings* other) { - return new QImageEncoderSettings(*other); +void QImageEncoderSettings_new2(QImageEncoderSettings* other, QImageEncoderSettings** outptr_QImageEncoderSettings) { + QImageEncoderSettings* ret = new QImageEncoderSettings(*other); + *outptr_QImageEncoderSettings = ret; } void QImageEncoderSettings_OperatorAssign(QImageEncoderSettings* self, QImageEncoderSettings* other) { @@ -387,7 +401,11 @@ void QImageEncoderSettings_SetEncodingOptions(QImageEncoderSettings* self, struc self->setEncodingOptions(options_QMap); } -void QImageEncoderSettings_Delete(QImageEncoderSettings* self) { - delete self; +void QImageEncoderSettings_Delete(QImageEncoderSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaencodersettings.go b/qt/multimedia/gen_qmediaencodersettings.go index 55c19c36..b8a7b556 100644 --- a/qt/multimedia/gen_qmediaencodersettings.go +++ b/qt/multimedia/gen_qmediaencodersettings.go @@ -15,7 +15,8 @@ import ( ) type QAudioEncoderSettings struct { - h *C.QAudioEncoderSettings + h *C.QAudioEncoderSettings + isSubclass bool } func (this *QAudioEncoderSettings) cPointer() *C.QAudioEncoderSettings { @@ -32,6 +33,7 @@ func (this *QAudioEncoderSettings) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioEncoderSettings constructs the type using only CGO pointers. func newQAudioEncoderSettings(h *C.QAudioEncoderSettings) *QAudioEncoderSettings { if h == nil { return nil @@ -39,20 +41,33 @@ func newQAudioEncoderSettings(h *C.QAudioEncoderSettings) *QAudioEncoderSettings return &QAudioEncoderSettings{h: h} } +// UnsafeNewQAudioEncoderSettings constructs the type using only unsafe pointers. func UnsafeNewQAudioEncoderSettings(h unsafe.Pointer) *QAudioEncoderSettings { - return newQAudioEncoderSettings((*C.QAudioEncoderSettings)(h)) + if h == nil { + return nil + } + + return &QAudioEncoderSettings{h: (*C.QAudioEncoderSettings)(h)} } // NewQAudioEncoderSettings constructs a new QAudioEncoderSettings object. func NewQAudioEncoderSettings() *QAudioEncoderSettings { - ret := C.QAudioEncoderSettings_new() - return newQAudioEncoderSettings(ret) + var outptr_QAudioEncoderSettings *C.QAudioEncoderSettings = nil + + C.QAudioEncoderSettings_new(&outptr_QAudioEncoderSettings) + ret := newQAudioEncoderSettings(outptr_QAudioEncoderSettings) + ret.isSubclass = true + return ret } // NewQAudioEncoderSettings2 constructs a new QAudioEncoderSettings object. func NewQAudioEncoderSettings2(other *QAudioEncoderSettings) *QAudioEncoderSettings { - ret := C.QAudioEncoderSettings_new2(other.cPointer()) - return newQAudioEncoderSettings(ret) + var outptr_QAudioEncoderSettings *C.QAudioEncoderSettings = nil + + C.QAudioEncoderSettings_new2(other.cPointer(), &outptr_QAudioEncoderSettings) + ret := newQAudioEncoderSettings(outptr_QAudioEncoderSettings) + ret.isSubclass = true + return ret } func (this *QAudioEncoderSettings) OperatorAssign(other *QAudioEncoderSettings) { @@ -190,7 +205,7 @@ func (this *QAudioEncoderSettings) SetEncodingOptions(options map[string]qt.QVar // Delete this object from C++ memory. func (this *QAudioEncoderSettings) Delete() { - C.QAudioEncoderSettings_Delete(this.h) + C.QAudioEncoderSettings_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -203,7 +218,8 @@ func (this *QAudioEncoderSettings) GoGC() { } type QVideoEncoderSettings struct { - h *C.QVideoEncoderSettings + h *C.QVideoEncoderSettings + isSubclass bool } func (this *QVideoEncoderSettings) cPointer() *C.QVideoEncoderSettings { @@ -220,6 +236,7 @@ func (this *QVideoEncoderSettings) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoEncoderSettings constructs the type using only CGO pointers. func newQVideoEncoderSettings(h *C.QVideoEncoderSettings) *QVideoEncoderSettings { if h == nil { return nil @@ -227,20 +244,33 @@ func newQVideoEncoderSettings(h *C.QVideoEncoderSettings) *QVideoEncoderSettings return &QVideoEncoderSettings{h: h} } +// UnsafeNewQVideoEncoderSettings constructs the type using only unsafe pointers. func UnsafeNewQVideoEncoderSettings(h unsafe.Pointer) *QVideoEncoderSettings { - return newQVideoEncoderSettings((*C.QVideoEncoderSettings)(h)) + if h == nil { + return nil + } + + return &QVideoEncoderSettings{h: (*C.QVideoEncoderSettings)(h)} } // NewQVideoEncoderSettings constructs a new QVideoEncoderSettings object. func NewQVideoEncoderSettings() *QVideoEncoderSettings { - ret := C.QVideoEncoderSettings_new() - return newQVideoEncoderSettings(ret) + var outptr_QVideoEncoderSettings *C.QVideoEncoderSettings = nil + + C.QVideoEncoderSettings_new(&outptr_QVideoEncoderSettings) + ret := newQVideoEncoderSettings(outptr_QVideoEncoderSettings) + ret.isSubclass = true + return ret } // NewQVideoEncoderSettings2 constructs a new QVideoEncoderSettings object. func NewQVideoEncoderSettings2(other *QVideoEncoderSettings) *QVideoEncoderSettings { - ret := C.QVideoEncoderSettings_new2(other.cPointer()) - return newQVideoEncoderSettings(ret) + var outptr_QVideoEncoderSettings *C.QVideoEncoderSettings = nil + + C.QVideoEncoderSettings_new2(other.cPointer(), &outptr_QVideoEncoderSettings) + ret := newQVideoEncoderSettings(outptr_QVideoEncoderSettings) + ret.isSubclass = true + return ret } func (this *QVideoEncoderSettings) OperatorAssign(other *QVideoEncoderSettings) { @@ -385,7 +415,7 @@ func (this *QVideoEncoderSettings) SetEncodingOptions(options map[string]qt.QVar // Delete this object from C++ memory. func (this *QVideoEncoderSettings) Delete() { - C.QVideoEncoderSettings_Delete(this.h) + C.QVideoEncoderSettings_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -398,7 +428,8 @@ func (this *QVideoEncoderSettings) GoGC() { } type QImageEncoderSettings struct { - h *C.QImageEncoderSettings + h *C.QImageEncoderSettings + isSubclass bool } func (this *QImageEncoderSettings) cPointer() *C.QImageEncoderSettings { @@ -415,6 +446,7 @@ func (this *QImageEncoderSettings) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageEncoderSettings constructs the type using only CGO pointers. func newQImageEncoderSettings(h *C.QImageEncoderSettings) *QImageEncoderSettings { if h == nil { return nil @@ -422,20 +454,33 @@ func newQImageEncoderSettings(h *C.QImageEncoderSettings) *QImageEncoderSettings return &QImageEncoderSettings{h: h} } +// UnsafeNewQImageEncoderSettings constructs the type using only unsafe pointers. func UnsafeNewQImageEncoderSettings(h unsafe.Pointer) *QImageEncoderSettings { - return newQImageEncoderSettings((*C.QImageEncoderSettings)(h)) + if h == nil { + return nil + } + + return &QImageEncoderSettings{h: (*C.QImageEncoderSettings)(h)} } // NewQImageEncoderSettings constructs a new QImageEncoderSettings object. func NewQImageEncoderSettings() *QImageEncoderSettings { - ret := C.QImageEncoderSettings_new() - return newQImageEncoderSettings(ret) + var outptr_QImageEncoderSettings *C.QImageEncoderSettings = nil + + C.QImageEncoderSettings_new(&outptr_QImageEncoderSettings) + ret := newQImageEncoderSettings(outptr_QImageEncoderSettings) + ret.isSubclass = true + return ret } // NewQImageEncoderSettings2 constructs a new QImageEncoderSettings object. func NewQImageEncoderSettings2(other *QImageEncoderSettings) *QImageEncoderSettings { - ret := C.QImageEncoderSettings_new2(other.cPointer()) - return newQImageEncoderSettings(ret) + var outptr_QImageEncoderSettings *C.QImageEncoderSettings = nil + + C.QImageEncoderSettings_new2(other.cPointer(), &outptr_QImageEncoderSettings) + ret := newQImageEncoderSettings(outptr_QImageEncoderSettings) + ret.isSubclass = true + return ret } func (this *QImageEncoderSettings) OperatorAssign(other *QImageEncoderSettings) { @@ -556,7 +601,7 @@ func (this *QImageEncoderSettings) SetEncodingOptions(options map[string]qt.QVar // Delete this object from C++ memory. func (this *QImageEncoderSettings) Delete() { - C.QImageEncoderSettings_Delete(this.h) + C.QImageEncoderSettings_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaencodersettings.h b/qt/multimedia/gen_qmediaencodersettings.h index cacab251..0188e9be 100644 --- a/qt/multimedia/gen_qmediaencodersettings.h +++ b/qt/multimedia/gen_qmediaencodersettings.h @@ -28,8 +28,8 @@ typedef struct QVariant QVariant; typedef struct QVideoEncoderSettings QVideoEncoderSettings; #endif -QAudioEncoderSettings* QAudioEncoderSettings_new(); -QAudioEncoderSettings* QAudioEncoderSettings_new2(QAudioEncoderSettings* other); +void QAudioEncoderSettings_new(QAudioEncoderSettings** outptr_QAudioEncoderSettings); +void QAudioEncoderSettings_new2(QAudioEncoderSettings* other, QAudioEncoderSettings** outptr_QAudioEncoderSettings); void QAudioEncoderSettings_OperatorAssign(QAudioEncoderSettings* self, QAudioEncoderSettings* other); bool QAudioEncoderSettings_OperatorEqual(const QAudioEncoderSettings* self, QAudioEncoderSettings* other); bool QAudioEncoderSettings_OperatorNotEqual(const QAudioEncoderSettings* self, QAudioEncoderSettings* other); @@ -50,10 +50,10 @@ QVariant* QAudioEncoderSettings_EncodingOption(const QAudioEncoderSettings* self struct miqt_map /* of struct miqt_string to QVariant* */ QAudioEncoderSettings_EncodingOptions(const QAudioEncoderSettings* self); void QAudioEncoderSettings_SetEncodingOption(QAudioEncoderSettings* self, struct miqt_string option, QVariant* value); void QAudioEncoderSettings_SetEncodingOptions(QAudioEncoderSettings* self, struct miqt_map /* of struct miqt_string to QVariant* */ options); -void QAudioEncoderSettings_Delete(QAudioEncoderSettings* self); +void QAudioEncoderSettings_Delete(QAudioEncoderSettings* self, bool isSubclass); -QVideoEncoderSettings* QVideoEncoderSettings_new(); -QVideoEncoderSettings* QVideoEncoderSettings_new2(QVideoEncoderSettings* other); +void QVideoEncoderSettings_new(QVideoEncoderSettings** outptr_QVideoEncoderSettings); +void QVideoEncoderSettings_new2(QVideoEncoderSettings* other, QVideoEncoderSettings** outptr_QVideoEncoderSettings); void QVideoEncoderSettings_OperatorAssign(QVideoEncoderSettings* self, QVideoEncoderSettings* other); bool QVideoEncoderSettings_OperatorEqual(const QVideoEncoderSettings* self, QVideoEncoderSettings* other); bool QVideoEncoderSettings_OperatorNotEqual(const QVideoEncoderSettings* self, QVideoEncoderSettings* other); @@ -75,10 +75,10 @@ QVariant* QVideoEncoderSettings_EncodingOption(const QVideoEncoderSettings* self struct miqt_map /* of struct miqt_string to QVariant* */ QVideoEncoderSettings_EncodingOptions(const QVideoEncoderSettings* self); void QVideoEncoderSettings_SetEncodingOption(QVideoEncoderSettings* self, struct miqt_string option, QVariant* value); void QVideoEncoderSettings_SetEncodingOptions(QVideoEncoderSettings* self, struct miqt_map /* of struct miqt_string to QVariant* */ options); -void QVideoEncoderSettings_Delete(QVideoEncoderSettings* self); +void QVideoEncoderSettings_Delete(QVideoEncoderSettings* self, bool isSubclass); -QImageEncoderSettings* QImageEncoderSettings_new(); -QImageEncoderSettings* QImageEncoderSettings_new2(QImageEncoderSettings* other); +void QImageEncoderSettings_new(QImageEncoderSettings** outptr_QImageEncoderSettings); +void QImageEncoderSettings_new2(QImageEncoderSettings* other, QImageEncoderSettings** outptr_QImageEncoderSettings); void QImageEncoderSettings_OperatorAssign(QImageEncoderSettings* self, QImageEncoderSettings* other); bool QImageEncoderSettings_OperatorEqual(const QImageEncoderSettings* self, QImageEncoderSettings* other); bool QImageEncoderSettings_OperatorNotEqual(const QImageEncoderSettings* self, QImageEncoderSettings* other); @@ -94,7 +94,7 @@ QVariant* QImageEncoderSettings_EncodingOption(const QImageEncoderSettings* self struct miqt_map /* of struct miqt_string to QVariant* */ QImageEncoderSettings_EncodingOptions(const QImageEncoderSettings* self); void QImageEncoderSettings_SetEncodingOption(QImageEncoderSettings* self, struct miqt_string option, QVariant* value); void QImageEncoderSettings_SetEncodingOptions(QImageEncoderSettings* self, struct miqt_map /* of struct miqt_string to QVariant* */ options); -void QImageEncoderSettings_Delete(QImageEncoderSettings* self); +void QImageEncoderSettings_Delete(QImageEncoderSettings* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp b/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp index 2473f3b7..325f2cdb 100644 --- a/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp +++ b/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp @@ -1,6 +1,8 @@ #include +#include #include #include +#include #include #include #include @@ -138,7 +140,11 @@ struct miqt_string QMediaGaplessPlaybackControl_TrUtf83(const char* s, const cha return _ms; } -void QMediaGaplessPlaybackControl_Delete(QMediaGaplessPlaybackControl* self) { - delete self; +void QMediaGaplessPlaybackControl_Delete(QMediaGaplessPlaybackControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediagaplessplaybackcontrol.go b/qt/multimedia/gen_qmediagaplessplaybackcontrol.go index a9dfc49d..c4a2ae0a 100644 --- a/qt/multimedia/gen_qmediagaplessplaybackcontrol.go +++ b/qt/multimedia/gen_qmediagaplessplaybackcontrol.go @@ -16,7 +16,8 @@ import ( ) type QMediaGaplessPlaybackControl struct { - h *C.QMediaGaplessPlaybackControl + h *C.QMediaGaplessPlaybackControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMediaGaplessPlaybackControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaGaplessPlaybackControl(h *C.QMediaGaplessPlaybackControl) *QMediaGaplessPlaybackControl { +// newQMediaGaplessPlaybackControl constructs the type using only CGO pointers. +func newQMediaGaplessPlaybackControl(h *C.QMediaGaplessPlaybackControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaGaplessPlaybackControl { if h == nil { return nil } - return &QMediaGaplessPlaybackControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaGaplessPlaybackControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaGaplessPlaybackControl(h unsafe.Pointer) *QMediaGaplessPlaybackControl { - return newQMediaGaplessPlaybackControl((*C.QMediaGaplessPlaybackControl)(h)) +// UnsafeNewQMediaGaplessPlaybackControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaGaplessPlaybackControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaGaplessPlaybackControl { + if h == nil { + return nil + } + + return &QMediaGaplessPlaybackControl{h: (*C.QMediaGaplessPlaybackControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaGaplessPlaybackControl) MetaObject() *qt.QMetaObject { @@ -199,7 +208,7 @@ func QMediaGaplessPlaybackControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaGaplessPlaybackControl) Delete() { - C.QMediaGaplessPlaybackControl_Delete(this.h) + C.QMediaGaplessPlaybackControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediagaplessplaybackcontrol.h b/qt/multimedia/gen_qmediagaplessplaybackcontrol.h index 7e40bb0e..f9f85e93 100644 --- a/qt/multimedia/gen_qmediagaplessplaybackcontrol.h +++ b/qt/multimedia/gen_qmediagaplessplaybackcontrol.h @@ -16,12 +16,16 @@ extern "C" { #ifdef __cplusplus class QMediaContent; +class QMediaControl; class QMediaGaplessPlaybackControl; class QMetaObject; +class QObject; #else typedef struct QMediaContent QMediaContent; +typedef struct QMediaControl QMediaControl; typedef struct QMediaGaplessPlaybackControl QMediaGaplessPlaybackControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaGaplessPlaybackControl_MetaObject(const QMediaGaplessPlaybackControl* self); @@ -43,7 +47,7 @@ struct miqt_string QMediaGaplessPlaybackControl_Tr2(const char* s, const char* c struct miqt_string QMediaGaplessPlaybackControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaGaplessPlaybackControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaGaplessPlaybackControl_TrUtf83(const char* s, const char* c, int n); -void QMediaGaplessPlaybackControl_Delete(QMediaGaplessPlaybackControl* self); +void QMediaGaplessPlaybackControl_Delete(QMediaGaplessPlaybackControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp b/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp index bb51a338..2bfca777 100644 --- a/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp +++ b/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp @@ -1,7 +1,9 @@ #include +#include #include #include #include +#include #include #include #include @@ -110,7 +112,11 @@ struct miqt_string QMediaNetworkAccessControl_TrUtf83(const char* s, const char* return _ms; } -void QMediaNetworkAccessControl_Delete(QMediaNetworkAccessControl* self) { - delete self; +void QMediaNetworkAccessControl_Delete(QMediaNetworkAccessControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmedianetworkaccesscontrol.go b/qt/multimedia/gen_qmedianetworkaccesscontrol.go index f22a1bf4..98459cd8 100644 --- a/qt/multimedia/gen_qmedianetworkaccesscontrol.go +++ b/qt/multimedia/gen_qmedianetworkaccesscontrol.go @@ -17,7 +17,8 @@ import ( ) type QMediaNetworkAccessControl struct { - h *C.QMediaNetworkAccessControl + h *C.QMediaNetworkAccessControl + isSubclass bool *QMediaControl } @@ -35,15 +36,23 @@ func (this *QMediaNetworkAccessControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaNetworkAccessControl(h *C.QMediaNetworkAccessControl) *QMediaNetworkAccessControl { +// newQMediaNetworkAccessControl constructs the type using only CGO pointers. +func newQMediaNetworkAccessControl(h *C.QMediaNetworkAccessControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaNetworkAccessControl { if h == nil { return nil } - return &QMediaNetworkAccessControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaNetworkAccessControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaNetworkAccessControl(h unsafe.Pointer) *QMediaNetworkAccessControl { - return newQMediaNetworkAccessControl((*C.QMediaNetworkAccessControl)(h)) +// UnsafeNewQMediaNetworkAccessControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaNetworkAccessControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaNetworkAccessControl { + if h == nil { + return nil + } + + return &QMediaNetworkAccessControl{h: (*C.QMediaNetworkAccessControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaNetworkAccessControl) MetaObject() *qt.QMetaObject { @@ -157,7 +166,7 @@ func QMediaNetworkAccessControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaNetworkAccessControl) Delete() { - C.QMediaNetworkAccessControl_Delete(this.h) + C.QMediaNetworkAccessControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmedianetworkaccesscontrol.h b/qt/multimedia/gen_qmedianetworkaccesscontrol.h index 6783e44e..55692b5c 100644 --- a/qt/multimedia/gen_qmedianetworkaccesscontrol.h +++ b/qt/multimedia/gen_qmedianetworkaccesscontrol.h @@ -15,13 +15,17 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMediaNetworkAccessControl; class QMetaObject; class QNetworkConfiguration; +class QObject; #else +typedef struct QMediaControl QMediaControl; typedef struct QMediaNetworkAccessControl QMediaNetworkAccessControl; typedef struct QMetaObject QMetaObject; typedef struct QNetworkConfiguration QNetworkConfiguration; +typedef struct QObject QObject; #endif QMetaObject* QMediaNetworkAccessControl_MetaObject(const QMediaNetworkAccessControl* self); @@ -36,7 +40,7 @@ struct miqt_string QMediaNetworkAccessControl_Tr2(const char* s, const char* c); struct miqt_string QMediaNetworkAccessControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaNetworkAccessControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaNetworkAccessControl_TrUtf83(const char* s, const char* c, int n); -void QMediaNetworkAccessControl_Delete(QMediaNetworkAccessControl* self); +void QMediaNetworkAccessControl_Delete(QMediaNetworkAccessControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaobject.cpp b/qt/multimedia/gen_qmediaobject.cpp index 56855a37..41a515a0 100644 --- a/qt/multimedia/gen_qmediaobject.cpp +++ b/qt/multimedia/gen_qmediaobject.cpp @@ -220,7 +220,11 @@ struct miqt_string QMediaObject_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QMediaObject_Delete(QMediaObject* self) { - delete self; +void QMediaObject_Delete(QMediaObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaobject.go b/qt/multimedia/gen_qmediaobject.go index a48b3645..91c20b7b 100644 --- a/qt/multimedia/gen_qmediaobject.go +++ b/qt/multimedia/gen_qmediaobject.go @@ -16,7 +16,8 @@ import ( ) type QMediaObject struct { - h *C.QMediaObject + h *C.QMediaObject + isSubclass bool *qt.QObject } @@ -34,15 +35,23 @@ func (this *QMediaObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaObject(h *C.QMediaObject) *QMediaObject { +// newQMediaObject constructs the type using only CGO pointers. +func newQMediaObject(h *C.QMediaObject, h_QObject *C.QObject) *QMediaObject { if h == nil { return nil } - return &QMediaObject{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaObject{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaObject(h unsafe.Pointer) *QMediaObject { - return newQMediaObject((*C.QMediaObject)(h)) +// UnsafeNewQMediaObject constructs the type using only unsafe pointers. +func UnsafeNewQMediaObject(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaObject { + if h == nil { + return nil + } + + return &QMediaObject{h: (*C.QMediaObject)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QMediaObject) MetaObject() *qt.QMetaObject { @@ -82,7 +91,7 @@ func (this *QMediaObject) Availability() QMultimedia__AvailabilityStatus { } func (this *QMediaObject) Service() *QMediaService { - return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaObject_Service(this.h))) + return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaObject_Service(this.h)), nil) } func (this *QMediaObject) NotifyInterval() int { @@ -300,7 +309,7 @@ func QMediaObject_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaObject) Delete() { - C.QMediaObject_Delete(this.h) + C.QMediaObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaobject.h b/qt/multimedia/gen_qmediaobject.h index e2a324da..fc88dbf6 100644 --- a/qt/multimedia/gen_qmediaobject.h +++ b/qt/multimedia/gen_qmediaobject.h @@ -58,7 +58,7 @@ struct miqt_string QMediaObject_Tr2(const char* s, const char* c); struct miqt_string QMediaObject_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaObject_TrUtf82(const char* s, const char* c); struct miqt_string QMediaObject_TrUtf83(const char* s, const char* c, int n); -void QMediaObject_Delete(QMediaObject* self); +void QMediaObject_Delete(QMediaObject* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaplayer.cpp b/qt/multimedia/gen_qmediaplayer.cpp index 708fdff1..27d13d4b 100644 --- a/qt/multimedia/gen_qmediaplayer.cpp +++ b/qt/multimedia/gen_qmediaplayer.cpp @@ -3,8 +3,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -16,16 +18,150 @@ #include "gen_qmediaplayer.h" #include "_cgo_export.h" -QMediaPlayer* QMediaPlayer_new() { - return new QMediaPlayer(); +class MiqtVirtualQMediaPlayer : public virtual QMediaPlayer { +public: + + MiqtVirtualQMediaPlayer(): QMediaPlayer() {}; + MiqtVirtualQMediaPlayer(QObject* parent): QMediaPlayer(parent) {}; + MiqtVirtualQMediaPlayer(QObject* parent, QMediaPlayer::Flags flags): QMediaPlayer(parent, flags) {}; + + virtual ~MiqtVirtualQMediaPlayer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Availability = 0; + + // Subclass to allow providing a Go implementation + virtual QMultimedia::AvailabilityStatus availability() const override { + if (handle__Availability == 0) { + return QMediaPlayer::availability(); + } + + + int callback_return_value = miqt_exec_callback_QMediaPlayer_Availability(const_cast(this), handle__Availability); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Availability() const { + + QMultimedia::AvailabilityStatus _ret = QMediaPlayer::availability(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(QObject* param1) override { + if (handle__Bind == 0) { + return QMediaPlayer::bind(param1); + } + + QObject* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QMediaPlayer_Bind(this, handle__Bind, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QObject* param1) { + + return QMediaPlayer::bind(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unbind = 0; + + // Subclass to allow providing a Go implementation + virtual void unbind(QObject* param1) override { + if (handle__Unbind == 0) { + QMediaPlayer::unbind(param1); + return; + } + + QObject* sigval1 = param1; + + miqt_exec_callback_QMediaPlayer_Unbind(this, handle__Unbind, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unbind(QObject* param1) { + + QMediaPlayer::unbind(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual bool isAvailable() const override { + if (handle__IsAvailable == 0) { + return QMediaPlayer::isAvailable(); + } + + + bool callback_return_value = miqt_exec_callback_QMediaPlayer_IsAvailable(const_cast(this), handle__IsAvailable); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsAvailable() const { + + return QMediaPlayer::isAvailable(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Service = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaService* service() const override { + if (handle__Service == 0) { + return QMediaPlayer::service(); + } + + + QMediaService* callback_return_value = miqt_exec_callback_QMediaPlayer_Service(const_cast(this), handle__Service); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaService* virtualbase_Service() const { + + return QMediaPlayer::service(); + + } + +}; + +void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(); + *outptr_QMediaPlayer = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QMediaPlayer* QMediaPlayer_new2(QObject* parent) { - return new QMediaPlayer(parent); +void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(parent); + *outptr_QMediaPlayer = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QMediaPlayer* QMediaPlayer_new3(QObject* parent, int flags) { - return new QMediaPlayer(parent, static_cast(flags)); +void QMediaPlayer_new3(QObject* parent, int flags, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(parent, static_cast(flags)); + *outptr_QMediaPlayer = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self) { @@ -306,7 +442,7 @@ void QMediaPlayer_MediaChanged(QMediaPlayer* self, QMediaContent* media) { } void QMediaPlayer_connect_MediaChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::mediaChanged), self, [=](const QMediaContent& media) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::mediaChanged), self, [=](const QMediaContent& media) { const QMediaContent& media_ret = media; // Cast returned reference into pointer QMediaContent* sigval1 = const_cast(&media_ret); @@ -319,7 +455,7 @@ void QMediaPlayer_CurrentMediaChanged(QMediaPlayer* self, QMediaContent* media) } void QMediaPlayer_connect_CurrentMediaChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::currentMediaChanged), self, [=](const QMediaContent& media) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::currentMediaChanged), self, [=](const QMediaContent& media) { const QMediaContent& media_ret = media; // Cast returned reference into pointer QMediaContent* sigval1 = const_cast(&media_ret); @@ -332,7 +468,7 @@ void QMediaPlayer_StateChanged(QMediaPlayer* self, int newState) { } void QMediaPlayer_connect_StateChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::stateChanged), self, [=](QMediaPlayer::State newState) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::stateChanged), self, [=](QMediaPlayer::State newState) { QMediaPlayer::State newState_ret = newState; int sigval1 = static_cast(newState_ret); miqt_exec_callback_QMediaPlayer_StateChanged(slot, sigval1); @@ -344,7 +480,7 @@ void QMediaPlayer_MediaStatusChanged(QMediaPlayer* self, int status) { } void QMediaPlayer_connect_MediaStatusChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::mediaStatusChanged), self, [=](QMediaPlayer::MediaStatus status) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::mediaStatusChanged), self, [=](QMediaPlayer::MediaStatus status) { QMediaPlayer::MediaStatus status_ret = status; int sigval1 = static_cast(status_ret); miqt_exec_callback_QMediaPlayer_MediaStatusChanged(slot, sigval1); @@ -356,7 +492,7 @@ void QMediaPlayer_DurationChanged(QMediaPlayer* self, long long duration) { } void QMediaPlayer_connect_DurationChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::durationChanged), self, [=](qint64 duration) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::durationChanged), self, [=](qint64 duration) { qint64 duration_ret = duration; long long sigval1 = static_cast(duration_ret); miqt_exec_callback_QMediaPlayer_DurationChanged(slot, sigval1); @@ -368,7 +504,7 @@ void QMediaPlayer_PositionChanged(QMediaPlayer* self, long long position) { } void QMediaPlayer_connect_PositionChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::positionChanged), self, [=](qint64 position) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::positionChanged), self, [=](qint64 position) { qint64 position_ret = position; long long sigval1 = static_cast(position_ret); miqt_exec_callback_QMediaPlayer_PositionChanged(slot, sigval1); @@ -380,7 +516,7 @@ void QMediaPlayer_VolumeChanged(QMediaPlayer* self, int volume) { } void QMediaPlayer_connect_VolumeChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::volumeChanged), self, [=](int volume) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::volumeChanged), self, [=](int volume) { int sigval1 = volume; miqt_exec_callback_QMediaPlayer_VolumeChanged(slot, sigval1); }); @@ -391,7 +527,7 @@ void QMediaPlayer_MutedChanged(QMediaPlayer* self, bool muted) { } void QMediaPlayer_connect_MutedChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::mutedChanged), self, [=](bool muted) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::mutedChanged), self, [=](bool muted) { bool sigval1 = muted; miqt_exec_callback_QMediaPlayer_MutedChanged(slot, sigval1); }); @@ -402,7 +538,7 @@ void QMediaPlayer_AudioAvailableChanged(QMediaPlayer* self, bool available) { } void QMediaPlayer_connect_AudioAvailableChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::audioAvailableChanged), self, [=](bool available) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::audioAvailableChanged), self, [=](bool available) { bool sigval1 = available; miqt_exec_callback_QMediaPlayer_AudioAvailableChanged(slot, sigval1); }); @@ -413,7 +549,7 @@ void QMediaPlayer_VideoAvailableChanged(QMediaPlayer* self, bool videoAvailable) } void QMediaPlayer_connect_VideoAvailableChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::videoAvailableChanged), self, [=](bool videoAvailable) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::videoAvailableChanged), self, [=](bool videoAvailable) { bool sigval1 = videoAvailable; miqt_exec_callback_QMediaPlayer_VideoAvailableChanged(slot, sigval1); }); @@ -424,7 +560,7 @@ void QMediaPlayer_BufferStatusChanged(QMediaPlayer* self, int percentFilled) { } void QMediaPlayer_connect_BufferStatusChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::bufferStatusChanged), self, [=](int percentFilled) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::bufferStatusChanged), self, [=](int percentFilled) { int sigval1 = percentFilled; miqt_exec_callback_QMediaPlayer_BufferStatusChanged(slot, sigval1); }); @@ -435,7 +571,7 @@ void QMediaPlayer_SeekableChanged(QMediaPlayer* self, bool seekable) { } void QMediaPlayer_connect_SeekableChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::seekableChanged), self, [=](bool seekable) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::seekableChanged), self, [=](bool seekable) { bool sigval1 = seekable; miqt_exec_callback_QMediaPlayer_SeekableChanged(slot, sigval1); }); @@ -446,7 +582,7 @@ void QMediaPlayer_PlaybackRateChanged(QMediaPlayer* self, double rate) { } void QMediaPlayer_connect_PlaybackRateChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::playbackRateChanged), self, [=](qreal rate) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::playbackRateChanged), self, [=](qreal rate) { qreal rate_ret = rate; double sigval1 = static_cast(rate_ret); miqt_exec_callback_QMediaPlayer_PlaybackRateChanged(slot, sigval1); @@ -458,7 +594,7 @@ void QMediaPlayer_AudioRoleChanged(QMediaPlayer* self, int role) { } void QMediaPlayer_connect_AudioRoleChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::audioRoleChanged), self, [=](QAudio::Role role) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::audioRoleChanged), self, [=](QAudio::Role role) { QAudio::Role role_ret = role; int sigval1 = static_cast(role_ret); miqt_exec_callback_QMediaPlayer_AudioRoleChanged(slot, sigval1); @@ -471,7 +607,7 @@ void QMediaPlayer_CustomAudioRoleChanged(QMediaPlayer* self, struct miqt_string } void QMediaPlayer_connect_CustomAudioRoleChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::customAudioRoleChanged), self, [=](const QString& role) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::customAudioRoleChanged), self, [=](const QString& role) { const QString role_ret = role; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray role_b = role_ret.toUtf8(); @@ -489,7 +625,7 @@ void QMediaPlayer_ErrorWithError(QMediaPlayer* self, int error) { } void QMediaPlayer_connect_ErrorWithError(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::error), self, [=](QMediaPlayer::Error error) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::error), self, [=](QMediaPlayer::Error error) { QMediaPlayer::Error error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QMediaPlayer_ErrorWithError(slot, sigval1); @@ -501,7 +637,7 @@ void QMediaPlayer_NetworkConfigurationChanged(QMediaPlayer* self, QNetworkConfig } void QMediaPlayer_connect_NetworkConfigurationChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::networkConfigurationChanged), self, [=](const QNetworkConfiguration& configuration) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::networkConfigurationChanged), self, [=](const QNetworkConfiguration& configuration) { const QNetworkConfiguration& configuration_ret = configuration; // Cast returned reference into pointer QNetworkConfiguration* sigval1 = const_cast(&configuration_ret); @@ -611,7 +747,51 @@ void QMediaPlayer_SetMedia2(QMediaPlayer* self, QMediaContent* media, QIODevice* self->setMedia(*media, stream); } -void QMediaPlayer_Delete(QMediaPlayer* self) { - delete self; +void QMediaPlayer_override_virtual_Availability(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__Availability = slot; +} + +int QMediaPlayer_virtualbase_Availability(const void* self) { + return ( (const MiqtVirtualQMediaPlayer*)(self) )->virtualbase_Availability(); +} + +void QMediaPlayer_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__Bind = slot; +} + +bool QMediaPlayer_virtualbase_Bind(void* self, QObject* param1) { + return ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_Bind(param1); +} + +void QMediaPlayer_override_virtual_Unbind(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__Unbind = slot; +} + +void QMediaPlayer_virtualbase_Unbind(void* self, QObject* param1) { + ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_Unbind(param1); +} + +void QMediaPlayer_override_virtual_IsAvailable(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__IsAvailable = slot; +} + +bool QMediaPlayer_virtualbase_IsAvailable(const void* self) { + return ( (const MiqtVirtualQMediaPlayer*)(self) )->virtualbase_IsAvailable(); +} + +void QMediaPlayer_override_virtual_Service(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__Service = slot; +} + +QMediaService* QMediaPlayer_virtualbase_Service(const void* self) { + return ( (const MiqtVirtualQMediaPlayer*)(self) )->virtualbase_Service(); +} + +void QMediaPlayer_Delete(QMediaPlayer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaplayer.go b/qt/multimedia/gen_qmediaplayer.go index 60cf484d..c6abba1c 100644 --- a/qt/multimedia/gen_qmediaplayer.go +++ b/qt/multimedia/gen_qmediaplayer.go @@ -59,7 +59,8 @@ const ( ) type QMediaPlayer struct { - h *C.QMediaPlayer + h *C.QMediaPlayer + isSubclass bool *QMediaObject } @@ -77,33 +78,59 @@ func (this *QMediaPlayer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaPlayer(h *C.QMediaPlayer) *QMediaPlayer { +// newQMediaPlayer constructs the type using only CGO pointers. +func newQMediaPlayer(h *C.QMediaPlayer, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QMediaPlayer { if h == nil { return nil } - return &QMediaPlayer{h: h, QMediaObject: UnsafeNewQMediaObject(unsafe.Pointer(h))} + return &QMediaPlayer{h: h, + QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} } -func UnsafeNewQMediaPlayer(h unsafe.Pointer) *QMediaPlayer { - return newQMediaPlayer((*C.QMediaPlayer)(h)) +// UnsafeNewQMediaPlayer constructs the type using only unsafe pointers. +func UnsafeNewQMediaPlayer(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaPlayer { + if h == nil { + return nil + } + + return &QMediaPlayer{h: (*C.QMediaPlayer)(h), + QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} } // NewQMediaPlayer constructs a new QMediaPlayer object. func NewQMediaPlayer() *QMediaPlayer { - ret := C.QMediaPlayer_new() - return newQMediaPlayer(ret) + var outptr_QMediaPlayer *C.QMediaPlayer = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QMediaPlayer_new(&outptr_QMediaPlayer, &outptr_QMediaObject, &outptr_QObject) + ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMediaPlayer2 constructs a new QMediaPlayer object. func NewQMediaPlayer2(parent *qt.QObject) *QMediaPlayer { - ret := C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer())) - return newQMediaPlayer(ret) + var outptr_QMediaPlayer *C.QMediaPlayer = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaPlayer, &outptr_QMediaObject, &outptr_QObject) + ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMediaPlayer3 constructs a new QMediaPlayer object. func NewQMediaPlayer3(parent *qt.QObject, flags QMediaPlayer__Flag) *QMediaPlayer { - ret := C.QMediaPlayer_new3((*C.QObject)(parent.UnsafePointer()), (C.int)(flags)) - return newQMediaPlayer(ret) + var outptr_QMediaPlayer *C.QMediaPlayer = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QMediaPlayer_new3((*C.QObject)(parent.UnsafePointer()), (C.int)(flags), &outptr_QMediaPlayer, &outptr_QMediaObject, &outptr_QObject) + ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMediaPlayer) MetaObject() *qt.QMetaObject { @@ -185,11 +212,11 @@ func (this *QMediaPlayer) Media() *QMediaContent { } func (this *QMediaPlayer) MediaStream() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_MediaStream(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_MediaStream(this.h)), nil) } func (this *QMediaPlayer) Playlist() *QMediaPlaylist { - return UnsafeNewQMediaPlaylist(unsafe.Pointer(C.QMediaPlayer_Playlist(this.h))) + return UnsafeNewQMediaPlaylist(unsafe.Pointer(C.QMediaPlayer_Playlist(this.h)), nil, nil) } func (this *QMediaPlayer) CurrentMedia() *QMediaContent { @@ -809,9 +836,122 @@ func (this *QMediaPlayer) SetMedia2(media *QMediaContent, stream *qt.QIODevice) C.QMediaPlayer_SetMedia2(this.h, media.cPointer(), (*C.QIODevice)(stream.UnsafePointer())) } +func (this *QMediaPlayer) callVirtualBase_Availability() QMultimedia__AvailabilityStatus { + + return (QMultimedia__AvailabilityStatus)(C.QMediaPlayer_virtualbase_Availability(unsafe.Pointer(this.h))) + +} +func (this *QMediaPlayer) OnAvailability(slot func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) { + C.QMediaPlayer_override_virtual_Availability(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_Availability +func miqt_exec_callback_QMediaPlayer_Availability(self *C.QMediaPlayer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMediaPlayer{h: self}).callVirtualBase_Availability) + + return (C.int)(virtualReturn) + +} + +func (this *QMediaPlayer) callVirtualBase_Bind(param1 *qt.QObject) bool { + + return (bool)(C.QMediaPlayer_virtualbase_Bind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()))) + +} +func (this *QMediaPlayer) OnBind(slot func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) { + C.QMediaPlayer_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_Bind +func miqt_exec_callback_QMediaPlayer_Bind(self *C.QMediaPlayer, cb C.intptr_t, param1 *C.QObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QMediaPlayer{h: self}).callVirtualBase_Bind, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlayer) callVirtualBase_Unbind(param1 *qt.QObject) { + + C.QMediaPlayer_virtualbase_Unbind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer())) + +} +func (this *QMediaPlayer) OnUnbind(slot func(super func(param1 *qt.QObject), param1 *qt.QObject)) { + C.QMediaPlayer_override_virtual_Unbind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_Unbind +func miqt_exec_callback_QMediaPlayer_Unbind(self *C.QMediaPlayer, cb C.intptr_t, param1 *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject), param1 *qt.QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + gofunc((&QMediaPlayer{h: self}).callVirtualBase_Unbind, slotval1) + +} + +func (this *QMediaPlayer) callVirtualBase_IsAvailable() bool { + + return (bool)(C.QMediaPlayer_virtualbase_IsAvailable(unsafe.Pointer(this.h))) + +} +func (this *QMediaPlayer) OnIsAvailable(slot func(super func() bool) bool) { + C.QMediaPlayer_override_virtual_IsAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_IsAvailable +func miqt_exec_callback_QMediaPlayer_IsAvailable(self *C.QMediaPlayer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMediaPlayer{h: self}).callVirtualBase_IsAvailable) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlayer) callVirtualBase_Service() *QMediaService { + + return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaPlayer_virtualbase_Service(unsafe.Pointer(this.h))), nil) +} +func (this *QMediaPlayer) OnService(slot func(super func() *QMediaService) *QMediaService) { + C.QMediaPlayer_override_virtual_Service(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_Service +func miqt_exec_callback_QMediaPlayer_Service(self *C.QMediaPlayer, cb C.intptr_t) *C.QMediaService { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaService) *QMediaService) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMediaPlayer{h: self}).callVirtualBase_Service) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QMediaPlayer) Delete() { - C.QMediaPlayer_Delete(this.h) + C.QMediaPlayer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaplayer.h b/qt/multimedia/gen_qmediaplayer.h index 672a3753..6ec40513 100644 --- a/qt/multimedia/gen_qmediaplayer.h +++ b/qt/multimedia/gen_qmediaplayer.h @@ -19,8 +19,10 @@ class QAbstractVideoSurface; class QGraphicsVideoItem; class QIODevice; class QMediaContent; +class QMediaObject; class QMediaPlayer; class QMediaPlaylist; +class QMediaService; class QMetaObject; class QNetworkConfiguration; class QObject; @@ -30,17 +32,19 @@ typedef struct QAbstractVideoSurface QAbstractVideoSurface; typedef struct QGraphicsVideoItem QGraphicsVideoItem; typedef struct QIODevice QIODevice; typedef struct QMediaContent QMediaContent; +typedef struct QMediaObject QMediaObject; typedef struct QMediaPlayer QMediaPlayer; typedef struct QMediaPlaylist QMediaPlaylist; +typedef struct QMediaService QMediaService; typedef struct QMetaObject QMetaObject; typedef struct QNetworkConfiguration QNetworkConfiguration; typedef struct QObject QObject; typedef struct QVideoWidget QVideoWidget; #endif -QMediaPlayer* QMediaPlayer_new(); -QMediaPlayer* QMediaPlayer_new2(QObject* parent); -QMediaPlayer* QMediaPlayer_new3(QObject* parent, int flags); +void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QMediaPlayer_new3(QObject* parent, int flags, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self); void* QMediaPlayer_Metacast(QMediaPlayer* self, const char* param1); struct miqt_string QMediaPlayer_Tr(const char* s); @@ -130,7 +134,17 @@ int QMediaPlayer_HasSupport2(struct miqt_string mimeType, struct miqt_array /* o int QMediaPlayer_HasSupport3(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs, int flags); struct miqt_array /* of struct miqt_string */ QMediaPlayer_SupportedMimeTypes1(int flags); void QMediaPlayer_SetMedia2(QMediaPlayer* self, QMediaContent* media, QIODevice* stream); -void QMediaPlayer_Delete(QMediaPlayer* self); +void QMediaPlayer_override_virtual_Availability(void* self, intptr_t slot); +int QMediaPlayer_virtualbase_Availability(const void* self); +void QMediaPlayer_override_virtual_Bind(void* self, intptr_t slot); +bool QMediaPlayer_virtualbase_Bind(void* self, QObject* param1); +void QMediaPlayer_override_virtual_Unbind(void* self, intptr_t slot); +void QMediaPlayer_virtualbase_Unbind(void* self, QObject* param1); +void QMediaPlayer_override_virtual_IsAvailable(void* self, intptr_t slot); +bool QMediaPlayer_virtualbase_IsAvailable(const void* self); +void QMediaPlayer_override_virtual_Service(void* self, intptr_t slot); +QMediaService* QMediaPlayer_virtualbase_Service(const void* self); +void QMediaPlayer_Delete(QMediaPlayer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaplayercontrol.cpp b/qt/multimedia/gen_qmediaplayercontrol.cpp index 50738008..e5222b83 100644 --- a/qt/multimedia/gen_qmediaplayercontrol.cpp +++ b/qt/multimedia/gen_qmediaplayercontrol.cpp @@ -1,8 +1,10 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -349,7 +351,11 @@ struct miqt_string QMediaPlayerControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QMediaPlayerControl_Delete(QMediaPlayerControl* self) { - delete self; +void QMediaPlayerControl_Delete(QMediaPlayerControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaplayercontrol.go b/qt/multimedia/gen_qmediaplayercontrol.go index be32fb75..b216b962 100644 --- a/qt/multimedia/gen_qmediaplayercontrol.go +++ b/qt/multimedia/gen_qmediaplayercontrol.go @@ -16,7 +16,8 @@ import ( ) type QMediaPlayerControl struct { - h *C.QMediaPlayerControl + h *C.QMediaPlayerControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMediaPlayerControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaPlayerControl(h *C.QMediaPlayerControl) *QMediaPlayerControl { +// newQMediaPlayerControl constructs the type using only CGO pointers. +func newQMediaPlayerControl(h *C.QMediaPlayerControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaPlayerControl { if h == nil { return nil } - return &QMediaPlayerControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaPlayerControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaPlayerControl(h unsafe.Pointer) *QMediaPlayerControl { - return newQMediaPlayerControl((*C.QMediaPlayerControl)(h)) +// UnsafeNewQMediaPlayerControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaPlayerControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaPlayerControl { + if h == nil { + return nil + } + + return &QMediaPlayerControl{h: (*C.QMediaPlayerControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaPlayerControl) MetaObject() *qt.QMetaObject { @@ -148,7 +157,7 @@ func (this *QMediaPlayerControl) Media() *QMediaContent { } func (this *QMediaPlayerControl) MediaStream() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayerControl_MediaStream(this.h))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayerControl_MediaStream(this.h)), nil) } func (this *QMediaPlayerControl) SetMedia(media *QMediaContent, stream *qt.QIODevice) { @@ -502,7 +511,7 @@ func QMediaPlayerControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaPlayerControl) Delete() { - C.QMediaPlayerControl_Delete(this.h) + C.QMediaPlayerControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaplayercontrol.h b/qt/multimedia/gen_qmediaplayercontrol.h index 0f64be43..8f64c43f 100644 --- a/qt/multimedia/gen_qmediaplayercontrol.h +++ b/qt/multimedia/gen_qmediaplayercontrol.h @@ -17,15 +17,19 @@ extern "C" { #ifdef __cplusplus class QIODevice; class QMediaContent; +class QMediaControl; class QMediaPlayerControl; class QMediaTimeRange; class QMetaObject; +class QObject; #else typedef struct QIODevice QIODevice; typedef struct QMediaContent QMediaContent; +typedef struct QMediaControl QMediaControl; typedef struct QMediaPlayerControl QMediaPlayerControl; typedef struct QMediaTimeRange QMediaTimeRange; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaPlayerControl_MetaObject(const QMediaPlayerControl* self); @@ -86,7 +90,7 @@ struct miqt_string QMediaPlayerControl_Tr2(const char* s, const char* c); struct miqt_string QMediaPlayerControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaPlayerControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaPlayerControl_TrUtf83(const char* s, const char* c, int n); -void QMediaPlayerControl_Delete(QMediaPlayerControl* self); +void QMediaPlayerControl_Delete(QMediaPlayerControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaplaylist.cpp b/qt/multimedia/gen_qmediaplaylist.cpp index 90f52f91..ffd1cde0 100644 --- a/qt/multimedia/gen_qmediaplaylist.cpp +++ b/qt/multimedia/gen_qmediaplaylist.cpp @@ -1,25 +1,262 @@ +#include +#include #include #include +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qmediaplaylist.h" #include "_cgo_export.h" -QMediaPlaylist* QMediaPlaylist_new() { - return new QMediaPlaylist(); +class MiqtVirtualQMediaPlaylist : public virtual QMediaPlaylist { +public: + + MiqtVirtualQMediaPlaylist(): QMediaPlaylist() {}; + MiqtVirtualQMediaPlaylist(QObject* parent): QMediaPlaylist(parent) {}; + + virtual ~MiqtVirtualQMediaPlaylist() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QMediaPlaylist::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QMediaPlaylist_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QMediaPlaylist::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* object) override { + if (handle__SetMediaObject == 0) { + return QMediaPlaylist::setMediaObject(object); + } + + QMediaObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QMediaPlaylist_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* object) { + + return QMediaPlaylist::setMediaObject(object); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMediaPlaylist::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMediaPlaylist_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMediaPlaylist::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMediaPlaylist::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMediaPlaylist_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMediaPlaylist::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMediaPlaylist::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMediaPlaylist_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMediaPlaylist::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMediaPlaylist::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMediaPlaylist_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMediaPlaylist::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMediaPlaylist::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMediaPlaylist_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMediaPlaylist::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMediaPlaylist::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaPlaylist_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMediaPlaylist::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMediaPlaylist::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaPlaylist_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMediaPlaylist::disconnectNotify(*signal); + + } + +}; + +void QMediaPlaylist_new(QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQMediaPlaylist* ret = new MiqtVirtualQMediaPlaylist(); + *outptr_QMediaPlaylist = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QMediaPlaylist* QMediaPlaylist_new2(QObject* parent) { - return new QMediaPlaylist(parent); +void QMediaPlaylist_new2(QObject* parent, QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQMediaPlaylist* ret = new MiqtVirtualQMediaPlaylist(parent); + *outptr_QMediaPlaylist = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QMediaPlaylist_MetaObject(const QMediaPlaylist* self) { @@ -198,7 +435,7 @@ void QMediaPlaylist_CurrentIndexChanged(QMediaPlaylist* self, int index) { } void QMediaPlaylist_connect_CurrentIndexChanged(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::currentIndexChanged), self, [=](int index) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::currentIndexChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QMediaPlaylist_CurrentIndexChanged(slot, sigval1); }); @@ -209,7 +446,7 @@ void QMediaPlaylist_PlaybackModeChanged(QMediaPlaylist* self, int mode) { } void QMediaPlaylist_connect_PlaybackModeChanged(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::playbackModeChanged), self, [=](QMediaPlaylist::PlaybackMode mode) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::playbackModeChanged), self, [=](QMediaPlaylist::PlaybackMode mode) { QMediaPlaylist::PlaybackMode mode_ret = mode; int sigval1 = static_cast(mode_ret); miqt_exec_callback_QMediaPlaylist_PlaybackModeChanged(slot, sigval1); @@ -221,7 +458,7 @@ void QMediaPlaylist_CurrentMediaChanged(QMediaPlaylist* self, QMediaContent* par } void QMediaPlaylist_connect_CurrentMediaChanged(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::currentMediaChanged), self, [=](const QMediaContent& param1) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::currentMediaChanged), self, [=](const QMediaContent& param1) { const QMediaContent& param1_ret = param1; // Cast returned reference into pointer QMediaContent* sigval1 = const_cast(¶m1_ret); @@ -234,7 +471,7 @@ void QMediaPlaylist_MediaAboutToBeInserted(QMediaPlaylist* self, int start, int } void QMediaPlaylist_connect_MediaAboutToBeInserted(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaAboutToBeInserted), self, [=](int start, int end) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaAboutToBeInserted), self, [=](int start, int end) { int sigval1 = start; int sigval2 = end; miqt_exec_callback_QMediaPlaylist_MediaAboutToBeInserted(slot, sigval1, sigval2); @@ -246,7 +483,7 @@ void QMediaPlaylist_MediaInserted(QMediaPlaylist* self, int start, int end) { } void QMediaPlaylist_connect_MediaInserted(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaInserted), self, [=](int start, int end) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaInserted), self, [=](int start, int end) { int sigval1 = start; int sigval2 = end; miqt_exec_callback_QMediaPlaylist_MediaInserted(slot, sigval1, sigval2); @@ -258,7 +495,7 @@ void QMediaPlaylist_MediaAboutToBeRemoved(QMediaPlaylist* self, int start, int e } void QMediaPlaylist_connect_MediaAboutToBeRemoved(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaAboutToBeRemoved), self, [=](int start, int end) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaAboutToBeRemoved), self, [=](int start, int end) { int sigval1 = start; int sigval2 = end; miqt_exec_callback_QMediaPlaylist_MediaAboutToBeRemoved(slot, sigval1, sigval2); @@ -270,7 +507,7 @@ void QMediaPlaylist_MediaRemoved(QMediaPlaylist* self, int start, int end) { } void QMediaPlaylist_connect_MediaRemoved(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaRemoved), self, [=](int start, int end) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaRemoved), self, [=](int start, int end) { int sigval1 = start; int sigval2 = end; miqt_exec_callback_QMediaPlaylist_MediaRemoved(slot, sigval1, sigval2); @@ -282,7 +519,7 @@ void QMediaPlaylist_MediaChanged(QMediaPlaylist* self, int start, int end) { } void QMediaPlaylist_connect_MediaChanged(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaChanged), self, [=](int start, int end) { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::mediaChanged), self, [=](int start, int end) { int sigval1 = start; int sigval2 = end; miqt_exec_callback_QMediaPlaylist_MediaChanged(slot, sigval1, sigval2); @@ -294,7 +531,7 @@ void QMediaPlaylist_Loaded(QMediaPlaylist* self) { } void QMediaPlaylist_connect_Loaded(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::loaded), self, [=]() { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::loaded), self, [=]() { miqt_exec_callback_QMediaPlaylist_Loaded(slot); }); } @@ -304,7 +541,7 @@ void QMediaPlaylist_LoadFailed(QMediaPlaylist* self) { } void QMediaPlaylist_connect_LoadFailed(QMediaPlaylist* self, intptr_t slot) { - QMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::loadFailed), self, [=]() { + MiqtVirtualQMediaPlaylist::connect(self, static_cast(&QMediaPlaylist::loadFailed), self, [=]() { miqt_exec_callback_QMediaPlaylist_LoadFailed(slot); }); } @@ -377,7 +614,83 @@ bool QMediaPlaylist_Save22(QMediaPlaylist* self, QUrl* location, const char* for return self->save(*location, format); } -void QMediaPlaylist_Delete(QMediaPlaylist* self) { - delete self; +void QMediaPlaylist_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QMediaPlaylist_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_MediaObject(); +} + +void QMediaPlaylist_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__SetMediaObject = slot; +} + +bool QMediaPlaylist_virtualbase_SetMediaObject(void* self, QMediaObject* object) { + return ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_SetMediaObject(object); +} + +void QMediaPlaylist_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__Event = slot; +} + +bool QMediaPlaylist_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_Event(event); +} + +void QMediaPlaylist_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__EventFilter = slot; +} + +bool QMediaPlaylist_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMediaPlaylist_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__TimerEvent = slot; +} + +void QMediaPlaylist_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_TimerEvent(event); +} + +void QMediaPlaylist_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__ChildEvent = slot; +} + +void QMediaPlaylist_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_ChildEvent(event); +} + +void QMediaPlaylist_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__CustomEvent = slot; +} + +void QMediaPlaylist_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_CustomEvent(event); +} + +void QMediaPlaylist_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__ConnectNotify = slot; +} + +void QMediaPlaylist_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMediaPlaylist_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlaylist*)(self) )->handle__DisconnectNotify = slot; +} + +void QMediaPlaylist_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaPlaylist*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMediaPlaylist_Delete(QMediaPlaylist* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaplaylist.go b/qt/multimedia/gen_qmediaplaylist.go index c23c4619..eae22b2b 100644 --- a/qt/multimedia/gen_qmediaplaylist.go +++ b/qt/multimedia/gen_qmediaplaylist.go @@ -37,7 +37,8 @@ const ( ) type QMediaPlaylist struct { - h *C.QMediaPlaylist + h *C.QMediaPlaylist + isSubclass bool *qt.QObject *QMediaBindableInterface } @@ -56,27 +57,49 @@ func (this *QMediaPlaylist) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaPlaylist(h *C.QMediaPlaylist) *QMediaPlaylist { +// newQMediaPlaylist constructs the type using only CGO pointers. +func newQMediaPlaylist(h *C.QMediaPlaylist, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QMediaPlaylist { if h == nil { return nil } - return &QMediaPlaylist{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h)), QMediaBindableInterface: UnsafeNewQMediaBindableInterface(unsafe.Pointer(h))} + return &QMediaPlaylist{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} } -func UnsafeNewQMediaPlaylist(h unsafe.Pointer) *QMediaPlaylist { - return newQMediaPlaylist((*C.QMediaPlaylist)(h)) +// UnsafeNewQMediaPlaylist constructs the type using only unsafe pointers. +func UnsafeNewQMediaPlaylist(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QMediaPlaylist { + if h == nil { + return nil + } + + return &QMediaPlaylist{h: (*C.QMediaPlaylist)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} } // NewQMediaPlaylist constructs a new QMediaPlaylist object. func NewQMediaPlaylist() *QMediaPlaylist { - ret := C.QMediaPlaylist_new() - return newQMediaPlaylist(ret) + var outptr_QMediaPlaylist *C.QMediaPlaylist = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QMediaPlaylist_new(&outptr_QMediaPlaylist, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQMediaPlaylist(outptr_QMediaPlaylist, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQMediaPlaylist2 constructs a new QMediaPlaylist object. func NewQMediaPlaylist2(parent *qt.QObject) *QMediaPlaylist { - ret := C.QMediaPlaylist_new2((*C.QObject)(parent.UnsafePointer())) - return newQMediaPlaylist(ret) + var outptr_QMediaPlaylist *C.QMediaPlaylist = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QMediaPlaylist_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaPlaylist, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQMediaPlaylist(outptr_QMediaPlaylist, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QMediaPlaylist) MetaObject() *qt.QMetaObject { @@ -108,7 +131,7 @@ func QMediaPlaylist_TrUtf8(s string) string { } func (this *QMediaPlaylist) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaPlaylist_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaPlaylist_MediaObject(this.h)), nil) } func (this *QMediaPlaylist) PlaybackMode() QMediaPlaylist__PlaybackMode { @@ -530,9 +553,221 @@ func (this *QMediaPlaylist) Save22(location *qt.QUrl, format string) bool { return (bool)(C.QMediaPlaylist_Save22(this.h, (*C.QUrl)(location.UnsafePointer()), format_Cstring)) } +func (this *QMediaPlaylist) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaPlaylist_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QMediaPlaylist) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QMediaPlaylist_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_MediaObject +func miqt_exec_callback_QMediaPlaylist_MediaObject(self *C.QMediaPlaylist, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMediaPlaylist{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QMediaPlaylist) callVirtualBase_SetMediaObject(object *QMediaObject) bool { + + return (bool)(C.QMediaPlaylist_virtualbase_SetMediaObject(unsafe.Pointer(this.h), object.cPointer())) + +} +func (this *QMediaPlaylist) OnSetMediaObject(slot func(super func(object *QMediaObject) bool, object *QMediaObject) bool) { + C.QMediaPlaylist_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_SetMediaObject +func miqt_exec_callback_QMediaPlaylist_SetMediaObject(self *C.QMediaPlaylist, cb C.intptr_t, object *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QMediaObject) bool, object *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(object), nil) + + virtualReturn := gofunc((&QMediaPlaylist{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlaylist) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QMediaPlaylist_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaPlaylist) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QMediaPlaylist_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_Event +func miqt_exec_callback_QMediaPlaylist_Event(self *C.QMediaPlaylist, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaPlaylist{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlaylist) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QMediaPlaylist_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaPlaylist) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QMediaPlaylist_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_EventFilter +func miqt_exec_callback_QMediaPlaylist_EventFilter(self *C.QMediaPlaylist, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaPlaylist{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlaylist) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QMediaPlaylist_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QMediaPlaylist) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QMediaPlaylist_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_TimerEvent +func miqt_exec_callback_QMediaPlaylist_TimerEvent(self *C.QMediaPlaylist, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaPlaylist{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMediaPlaylist) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QMediaPlaylist_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QMediaPlaylist) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QMediaPlaylist_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_ChildEvent +func miqt_exec_callback_QMediaPlaylist_ChildEvent(self *C.QMediaPlaylist, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaPlaylist{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMediaPlaylist) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QMediaPlaylist_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QMediaPlaylist) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QMediaPlaylist_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_CustomEvent +func miqt_exec_callback_QMediaPlaylist_CustomEvent(self *C.QMediaPlaylist, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMediaPlaylist{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMediaPlaylist) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QMediaPlaylist_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaPlaylist) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QMediaPlaylist_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_ConnectNotify +func miqt_exec_callback_QMediaPlaylist_ConnectNotify(self *C.QMediaPlaylist, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaPlaylist{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMediaPlaylist) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QMediaPlaylist_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaPlaylist) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QMediaPlaylist_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlaylist_DisconnectNotify +func miqt_exec_callback_QMediaPlaylist_DisconnectNotify(self *C.QMediaPlaylist, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaPlaylist{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMediaPlaylist) Delete() { - C.QMediaPlaylist_Delete(this.h) + C.QMediaPlaylist_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaplaylist.h b/qt/multimedia/gen_qmediaplaylist.h index c063dd85..51febd9f 100644 --- a/qt/multimedia/gen_qmediaplaylist.h +++ b/qt/multimedia/gen_qmediaplaylist.h @@ -15,27 +15,37 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QIODevice; +class QMediaBindableInterface; class QMediaContent; class QMediaObject; class QMediaPlaylist; +class QMetaMethod; class QMetaObject; class QNetworkRequest; class QObject; +class QTimerEvent; class QUrl; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaContent QMediaContent; typedef struct QMediaObject QMediaObject; typedef struct QMediaPlaylist QMediaPlaylist; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkRequest QNetworkRequest; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QMediaPlaylist* QMediaPlaylist_new(); -QMediaPlaylist* QMediaPlaylist_new2(QObject* parent); +void QMediaPlaylist_new(QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QMediaPlaylist_new2(QObject* parent, QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QMediaPlaylist_MetaObject(const QMediaPlaylist* self); void* QMediaPlaylist_Metacast(QMediaPlaylist* self, const char* param1); struct miqt_string QMediaPlaylist_Tr(const char* s); @@ -90,6 +100,7 @@ void QMediaPlaylist_Loaded(QMediaPlaylist* self); void QMediaPlaylist_connect_Loaded(QMediaPlaylist* self, intptr_t slot); void QMediaPlaylist_LoadFailed(QMediaPlaylist* self); void QMediaPlaylist_connect_LoadFailed(QMediaPlaylist* self, intptr_t slot); +bool QMediaPlaylist_SetMediaObject(QMediaPlaylist* self, QMediaObject* object); struct miqt_string QMediaPlaylist_Tr2(const char* s, const char* c); struct miqt_string QMediaPlaylist_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaPlaylist_TrUtf82(const char* s, const char* c); @@ -100,7 +111,25 @@ void QMediaPlaylist_Load2(QMediaPlaylist* self, QNetworkRequest* request, const void QMediaPlaylist_Load22(QMediaPlaylist* self, QUrl* location, const char* format); void QMediaPlaylist_Load23(QMediaPlaylist* self, QIODevice* device, const char* format); bool QMediaPlaylist_Save22(QMediaPlaylist* self, QUrl* location, const char* format); -void QMediaPlaylist_Delete(QMediaPlaylist* self); +void QMediaPlaylist_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QMediaPlaylist_virtualbase_MediaObject(const void* self); +void QMediaPlaylist_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QMediaPlaylist_virtualbase_SetMediaObject(void* self, QMediaObject* object); +void QMediaPlaylist_override_virtual_Event(void* self, intptr_t slot); +bool QMediaPlaylist_virtualbase_Event(void* self, QEvent* event); +void QMediaPlaylist_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMediaPlaylist_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMediaPlaylist_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMediaPlaylist_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMediaPlaylist_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMediaPlaylist_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMediaPlaylist_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMediaPlaylist_virtualbase_CustomEvent(void* self, QEvent* event); +void QMediaPlaylist_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMediaPlaylist_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMediaPlaylist_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMediaPlaylist_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMediaPlaylist_Delete(QMediaPlaylist* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediarecorder.cpp b/qt/multimedia/gen_qmediarecorder.cpp index 7ec0d668..2964941f 100644 --- a/qt/multimedia/gen_qmediarecorder.cpp +++ b/qt/multimedia/gen_qmediarecorder.cpp @@ -1,13 +1,18 @@ #include +#include +#include #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -15,12 +20,244 @@ #include "gen_qmediarecorder.h" #include "_cgo_export.h" -QMediaRecorder* QMediaRecorder_new(QMediaObject* mediaObject) { - return new QMediaRecorder(mediaObject); +class MiqtVirtualQMediaRecorder : public virtual QMediaRecorder { +public: + + MiqtVirtualQMediaRecorder(QMediaObject* mediaObject): QMediaRecorder(mediaObject) {}; + MiqtVirtualQMediaRecorder(QMediaObject* mediaObject, QObject* parent): QMediaRecorder(mediaObject, parent) {}; + + virtual ~MiqtVirtualQMediaRecorder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QMediaRecorder::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QMediaRecorder_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QMediaRecorder::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* object) override { + if (handle__SetMediaObject == 0) { + return QMediaRecorder::setMediaObject(object); + } + + QMediaObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QMediaRecorder_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* object) { + + return QMediaRecorder::setMediaObject(object); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMediaRecorder::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMediaRecorder_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMediaRecorder::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMediaRecorder::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMediaRecorder_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMediaRecorder::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMediaRecorder::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMediaRecorder_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMediaRecorder::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMediaRecorder::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMediaRecorder_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMediaRecorder::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMediaRecorder::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMediaRecorder_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMediaRecorder::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMediaRecorder::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaRecorder_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMediaRecorder::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMediaRecorder::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaRecorder_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMediaRecorder::disconnectNotify(*signal); + + } + +}; + +void QMediaRecorder_new(QMediaObject* mediaObject, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(mediaObject); + *outptr_QMediaRecorder = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QMediaRecorder* QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent) { - return new QMediaRecorder(mediaObject, parent); +void QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(mediaObject, parent); + *outptr_QMediaRecorder = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self) { @@ -352,7 +589,7 @@ void QMediaRecorder_StateChanged(QMediaRecorder* self, int state) { } void QMediaRecorder_connect_StateChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::stateChanged), self, [=](QMediaRecorder::State state) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::stateChanged), self, [=](QMediaRecorder::State state) { QMediaRecorder::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QMediaRecorder_StateChanged(slot, sigval1); @@ -364,7 +601,7 @@ void QMediaRecorder_StatusChanged(QMediaRecorder* self, int status) { } void QMediaRecorder_connect_StatusChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::statusChanged), self, [=](QMediaRecorder::Status status) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::statusChanged), self, [=](QMediaRecorder::Status status) { QMediaRecorder::Status status_ret = status; int sigval1 = static_cast(status_ret); miqt_exec_callback_QMediaRecorder_StatusChanged(slot, sigval1); @@ -376,7 +613,7 @@ void QMediaRecorder_DurationChanged(QMediaRecorder* self, long long duration) { } void QMediaRecorder_connect_DurationChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::durationChanged), self, [=](qint64 duration) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::durationChanged), self, [=](qint64 duration) { qint64 duration_ret = duration; long long sigval1 = static_cast(duration_ret); miqt_exec_callback_QMediaRecorder_DurationChanged(slot, sigval1); @@ -388,7 +625,7 @@ void QMediaRecorder_MutedChanged(QMediaRecorder* self, bool muted) { } void QMediaRecorder_connect_MutedChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::mutedChanged), self, [=](bool muted) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::mutedChanged), self, [=](bool muted) { bool sigval1 = muted; miqt_exec_callback_QMediaRecorder_MutedChanged(slot, sigval1); }); @@ -399,7 +636,7 @@ void QMediaRecorder_VolumeChanged(QMediaRecorder* self, double volume) { } void QMediaRecorder_connect_VolumeChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::volumeChanged), self, [=](qreal volume) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::volumeChanged), self, [=](qreal volume) { qreal volume_ret = volume; double sigval1 = static_cast(volume_ret); miqt_exec_callback_QMediaRecorder_VolumeChanged(slot, sigval1); @@ -411,7 +648,7 @@ void QMediaRecorder_ActualLocationChanged(QMediaRecorder* self, QUrl* location) } void QMediaRecorder_connect_ActualLocationChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::actualLocationChanged), self, [=](const QUrl& location) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::actualLocationChanged), self, [=](const QUrl& location) { const QUrl& location_ret = location; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&location_ret); @@ -424,7 +661,7 @@ void QMediaRecorder_ErrorWithError(QMediaRecorder* self, int error) { } void QMediaRecorder_connect_ErrorWithError(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::error), self, [=](QMediaRecorder::Error error) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::error), self, [=](QMediaRecorder::Error error) { QMediaRecorder::Error error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QMediaRecorder_ErrorWithError(slot, sigval1); @@ -436,7 +673,7 @@ void QMediaRecorder_MetaDataAvailableChanged(QMediaRecorder* self, bool availabl } void QMediaRecorder_connect_MetaDataAvailableChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataAvailableChanged), self, [=](bool available) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataAvailableChanged), self, [=](bool available) { bool sigval1 = available; miqt_exec_callback_QMediaRecorder_MetaDataAvailableChanged(slot, sigval1); }); @@ -447,7 +684,7 @@ void QMediaRecorder_MetaDataWritableChanged(QMediaRecorder* self, bool writable) } void QMediaRecorder_connect_MetaDataWritableChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataWritableChanged), self, [=](bool writable) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataWritableChanged), self, [=](bool writable) { bool sigval1 = writable; miqt_exec_callback_QMediaRecorder_MetaDataWritableChanged(slot, sigval1); }); @@ -458,7 +695,7 @@ void QMediaRecorder_MetaDataChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_MetaDataChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_MetaDataChanged(slot); }); } @@ -469,7 +706,7 @@ void QMediaRecorder_MetaDataChanged2(QMediaRecorder* self, struct miqt_string ke } void QMediaRecorder_connect_MetaDataChanged2(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataChanged), self, [=](const QString& key, const QVariant& value) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataChanged), self, [=](const QString& key, const QVariant& value) { const QString key_ret = key; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray key_b = key_ret.toUtf8(); @@ -490,7 +727,7 @@ void QMediaRecorder_AvailabilityChanged(QMediaRecorder* self, bool available) { } void QMediaRecorder_connect_AvailabilityChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::availabilityChanged), self, [=](bool available) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::availabilityChanged), self, [=](bool available) { bool sigval1 = available; miqt_exec_callback_QMediaRecorder_AvailabilityChanged(slot, sigval1); }); @@ -501,7 +738,7 @@ void QMediaRecorder_AvailabilityChangedWithAvailability(QMediaRecorder* self, in } void QMediaRecorder_connect_AvailabilityChangedWithAvailability(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::availabilityChanged), self, [=](QMultimedia::AvailabilityStatus availability) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::availabilityChanged), self, [=](QMultimedia::AvailabilityStatus availability) { QMultimedia::AvailabilityStatus availability_ret = availability; int sigval1 = static_cast(availability_ret); miqt_exec_callback_QMediaRecorder_AvailabilityChangedWithAvailability(slot, sigval1); @@ -639,7 +876,83 @@ void QMediaRecorder_SetEncodingSettings3(QMediaRecorder* self, QAudioEncoderSett self->setEncodingSettings(*audioSettings, *videoSettings, containerMimeType_QString); } -void QMediaRecorder_Delete(QMediaRecorder* self) { - delete self; +void QMediaRecorder_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QMediaRecorder_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQMediaRecorder*)(self) )->virtualbase_MediaObject(); +} + +void QMediaRecorder_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__SetMediaObject = slot; +} + +bool QMediaRecorder_virtualbase_SetMediaObject(void* self, QMediaObject* object) { + return ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_SetMediaObject(object); +} + +void QMediaRecorder_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__Event = slot; +} + +bool QMediaRecorder_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_Event(event); +} + +void QMediaRecorder_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__EventFilter = slot; +} + +bool QMediaRecorder_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMediaRecorder_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__TimerEvent = slot; +} + +void QMediaRecorder_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_TimerEvent(event); +} + +void QMediaRecorder_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__ChildEvent = slot; +} + +void QMediaRecorder_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_ChildEvent(event); +} + +void QMediaRecorder_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__CustomEvent = slot; +} + +void QMediaRecorder_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_CustomEvent(event); +} + +void QMediaRecorder_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__ConnectNotify = slot; +} + +void QMediaRecorder_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMediaRecorder_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__DisconnectNotify = slot; +} + +void QMediaRecorder_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMediaRecorder_Delete(QMediaRecorder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediarecorder.go b/qt/multimedia/gen_qmediarecorder.go index 7c13a329..e1f75d58 100644 --- a/qt/multimedia/gen_qmediarecorder.go +++ b/qt/multimedia/gen_qmediarecorder.go @@ -46,7 +46,8 @@ const ( ) type QMediaRecorder struct { - h *C.QMediaRecorder + h *C.QMediaRecorder + isSubclass bool *qt.QObject *QMediaBindableInterface } @@ -65,27 +66,49 @@ func (this *QMediaRecorder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaRecorder(h *C.QMediaRecorder) *QMediaRecorder { +// newQMediaRecorder constructs the type using only CGO pointers. +func newQMediaRecorder(h *C.QMediaRecorder, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QMediaRecorder { if h == nil { return nil } - return &QMediaRecorder{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h)), QMediaBindableInterface: UnsafeNewQMediaBindableInterface(unsafe.Pointer(h))} + return &QMediaRecorder{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} } -func UnsafeNewQMediaRecorder(h unsafe.Pointer) *QMediaRecorder { - return newQMediaRecorder((*C.QMediaRecorder)(h)) +// UnsafeNewQMediaRecorder constructs the type using only unsafe pointers. +func UnsafeNewQMediaRecorder(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QMediaRecorder { + if h == nil { + return nil + } + + return &QMediaRecorder{h: (*C.QMediaRecorder)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} } // NewQMediaRecorder constructs a new QMediaRecorder object. func NewQMediaRecorder(mediaObject *QMediaObject) *QMediaRecorder { - ret := C.QMediaRecorder_new(mediaObject.cPointer()) - return newQMediaRecorder(ret) + var outptr_QMediaRecorder *C.QMediaRecorder = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QMediaRecorder_new(mediaObject.cPointer(), &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQMediaRecorder2 constructs a new QMediaRecorder object. func NewQMediaRecorder2(mediaObject *QMediaObject, parent *qt.QObject) *QMediaRecorder { - ret := C.QMediaRecorder_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQMediaRecorder(ret) + var outptr_QMediaRecorder *C.QMediaRecorder = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QMediaRecorder_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QMediaRecorder) MetaObject() *qt.QMetaObject { @@ -117,7 +140,7 @@ func QMediaRecorder_TrUtf8(s string) string { } func (this *QMediaRecorder) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaRecorder_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaRecorder_MediaObject(this.h)), nil) } func (this *QMediaRecorder) IsAvailable() bool { @@ -770,9 +793,221 @@ func (this *QMediaRecorder) SetEncodingSettings3(audioSettings *QAudioEncoderSet C.QMediaRecorder_SetEncodingSettings3(this.h, audioSettings.cPointer(), videoSettings.cPointer(), containerMimeType_ms) } +func (this *QMediaRecorder) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaRecorder_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QMediaRecorder) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QMediaRecorder_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_MediaObject +func miqt_exec_callback_QMediaRecorder_MediaObject(self *C.QMediaRecorder, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QMediaRecorder) callVirtualBase_SetMediaObject(object *QMediaObject) bool { + + return (bool)(C.QMediaRecorder_virtualbase_SetMediaObject(unsafe.Pointer(this.h), object.cPointer())) + +} +func (this *QMediaRecorder) OnSetMediaObject(slot func(super func(object *QMediaObject) bool, object *QMediaObject) bool) { + C.QMediaRecorder_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_SetMediaObject +func miqt_exec_callback_QMediaRecorder_SetMediaObject(self *C.QMediaRecorder, cb C.intptr_t, object *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QMediaObject) bool, object *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(object), nil) + + virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaRecorder) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QMediaRecorder_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaRecorder) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QMediaRecorder_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_Event +func miqt_exec_callback_QMediaRecorder_Event(self *C.QMediaRecorder, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaRecorder) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QMediaRecorder_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaRecorder) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QMediaRecorder_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_EventFilter +func miqt_exec_callback_QMediaRecorder_EventFilter(self *C.QMediaRecorder, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaRecorder) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QMediaRecorder_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QMediaRecorder) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QMediaRecorder_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_TimerEvent +func miqt_exec_callback_QMediaRecorder_TimerEvent(self *C.QMediaRecorder, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QMediaRecorder_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QMediaRecorder) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QMediaRecorder_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_ChildEvent +func miqt_exec_callback_QMediaRecorder_ChildEvent(self *C.QMediaRecorder, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QMediaRecorder_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QMediaRecorder) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QMediaRecorder_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_CustomEvent +func miqt_exec_callback_QMediaRecorder_CustomEvent(self *C.QMediaRecorder, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QMediaRecorder_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaRecorder) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QMediaRecorder_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_ConnectNotify +func miqt_exec_callback_QMediaRecorder_ConnectNotify(self *C.QMediaRecorder, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QMediaRecorder_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaRecorder) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QMediaRecorder_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_DisconnectNotify +func miqt_exec_callback_QMediaRecorder_DisconnectNotify(self *C.QMediaRecorder, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMediaRecorder) Delete() { - C.QMediaRecorder_Delete(this.h) + C.QMediaRecorder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediarecorder.h b/qt/multimedia/gen_qmediarecorder.h index 080f74be..f668aaa1 100644 --- a/qt/multimedia/gen_qmediarecorder.h +++ b/qt/multimedia/gen_qmediarecorder.h @@ -16,28 +16,38 @@ extern "C" { #ifdef __cplusplus class QAudioEncoderSettings; +class QChildEvent; +class QEvent; +class QMediaBindableInterface; class QMediaObject; class QMediaRecorder; +class QMetaMethod; class QMetaObject; class QObject; class QSize; +class QTimerEvent; class QUrl; class QVariant; class QVideoEncoderSettings; #else typedef struct QAudioEncoderSettings QAudioEncoderSettings; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaObject QMediaObject; typedef struct QMediaRecorder QMediaRecorder; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; typedef struct QVideoEncoderSettings QVideoEncoderSettings; #endif -QMediaRecorder* QMediaRecorder_new(QMediaObject* mediaObject); -QMediaRecorder* QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent); +void QMediaRecorder_new(QMediaObject* mediaObject, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self); void* QMediaRecorder_Metacast(QMediaRecorder* self, const char* param1); struct miqt_string QMediaRecorder_Tr(const char* s); @@ -107,6 +117,7 @@ void QMediaRecorder_AvailabilityChanged(QMediaRecorder* self, bool available); void QMediaRecorder_connect_AvailabilityChanged(QMediaRecorder* self, intptr_t slot); void QMediaRecorder_AvailabilityChangedWithAvailability(QMediaRecorder* self, int availability); void QMediaRecorder_connect_AvailabilityChangedWithAvailability(QMediaRecorder* self, intptr_t slot); +bool QMediaRecorder_SetMediaObject(QMediaRecorder* self, QMediaObject* object); struct miqt_string QMediaRecorder_Tr2(const char* s, const char* c); struct miqt_string QMediaRecorder_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaRecorder_TrUtf82(const char* s, const char* c); @@ -119,7 +130,25 @@ struct miqt_array /* of double */ QMediaRecorder_SupportedFrameRates1(const QMe struct miqt_array /* of double */ QMediaRecorder_SupportedFrameRates2(const QMediaRecorder* self, QVideoEncoderSettings* settings, bool* continuous); void QMediaRecorder_SetEncodingSettings2(QMediaRecorder* self, QAudioEncoderSettings* audioSettings, QVideoEncoderSettings* videoSettings); void QMediaRecorder_SetEncodingSettings3(QMediaRecorder* self, QAudioEncoderSettings* audioSettings, QVideoEncoderSettings* videoSettings, struct miqt_string containerMimeType); -void QMediaRecorder_Delete(QMediaRecorder* self); +void QMediaRecorder_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QMediaRecorder_virtualbase_MediaObject(const void* self); +void QMediaRecorder_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QMediaRecorder_virtualbase_SetMediaObject(void* self, QMediaObject* object); +void QMediaRecorder_override_virtual_Event(void* self, intptr_t slot); +bool QMediaRecorder_virtualbase_Event(void* self, QEvent* event); +void QMediaRecorder_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMediaRecorder_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMediaRecorder_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMediaRecorder_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMediaRecorder_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_CustomEvent(void* self, QEvent* event); +void QMediaRecorder_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMediaRecorder_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMediaRecorder_Delete(QMediaRecorder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediarecordercontrol.cpp b/qt/multimedia/gen_qmediarecordercontrol.cpp index 16731a6f..9bb9e508 100644 --- a/qt/multimedia/gen_qmediarecordercontrol.cpp +++ b/qt/multimedia/gen_qmediarecordercontrol.cpp @@ -1,5 +1,7 @@ +#include #include #include +#include #include #include #include @@ -222,7 +224,11 @@ struct miqt_string QMediaRecorderControl_TrUtf83(const char* s, const char* c, i return _ms; } -void QMediaRecorderControl_Delete(QMediaRecorderControl* self) { - delete self; +void QMediaRecorderControl_Delete(QMediaRecorderControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediarecordercontrol.go b/qt/multimedia/gen_qmediarecordercontrol.go index c45d2bf6..adf2e8bb 100644 --- a/qt/multimedia/gen_qmediarecordercontrol.go +++ b/qt/multimedia/gen_qmediarecordercontrol.go @@ -16,7 +16,8 @@ import ( ) type QMediaRecorderControl struct { - h *C.QMediaRecorderControl + h *C.QMediaRecorderControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMediaRecorderControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaRecorderControl(h *C.QMediaRecorderControl) *QMediaRecorderControl { +// newQMediaRecorderControl constructs the type using only CGO pointers. +func newQMediaRecorderControl(h *C.QMediaRecorderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaRecorderControl { if h == nil { return nil } - return &QMediaRecorderControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaRecorderControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaRecorderControl(h unsafe.Pointer) *QMediaRecorderControl { - return newQMediaRecorderControl((*C.QMediaRecorderControl)(h)) +// UnsafeNewQMediaRecorderControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaRecorderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaRecorderControl { + if h == nil { + return nil + } + + return &QMediaRecorderControl{h: (*C.QMediaRecorderControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaRecorderControl) MetaObject() *qt.QMetaObject { @@ -315,7 +324,7 @@ func QMediaRecorderControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaRecorderControl) Delete() { - C.QMediaRecorderControl_Delete(this.h) + C.QMediaRecorderControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediarecordercontrol.h b/qt/multimedia/gen_qmediarecordercontrol.h index 519e0faa..59f67a0b 100644 --- a/qt/multimedia/gen_qmediarecordercontrol.h +++ b/qt/multimedia/gen_qmediarecordercontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMediaRecorderControl; class QMetaObject; +class QObject; class QUrl; #else +typedef struct QMediaControl QMediaControl; typedef struct QMediaRecorderControl QMediaRecorderControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QUrl QUrl; #endif @@ -57,7 +61,7 @@ struct miqt_string QMediaRecorderControl_Tr2(const char* s, const char* c); struct miqt_string QMediaRecorderControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaRecorderControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaRecorderControl_TrUtf83(const char* s, const char* c, int n); -void QMediaRecorderControl_Delete(QMediaRecorderControl* self); +void QMediaRecorderControl_Delete(QMediaRecorderControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaresource.cpp b/qt/multimedia/gen_qmediaresource.cpp index 46c53a5c..dc154001 100644 --- a/qt/multimedia/gen_qmediaresource.cpp +++ b/qt/multimedia/gen_qmediaresource.cpp @@ -9,30 +9,36 @@ #include "gen_qmediaresource.h" #include "_cgo_export.h" -QMediaResource* QMediaResource_new() { - return new QMediaResource(); +void QMediaResource_new(QMediaResource** outptr_QMediaResource) { + QMediaResource* ret = new QMediaResource(); + *outptr_QMediaResource = ret; } -QMediaResource* QMediaResource_new2(QUrl* url) { - return new QMediaResource(*url); +void QMediaResource_new2(QUrl* url, QMediaResource** outptr_QMediaResource) { + QMediaResource* ret = new QMediaResource(*url); + *outptr_QMediaResource = ret; } -QMediaResource* QMediaResource_new3(QNetworkRequest* request) { - return new QMediaResource(*request); +void QMediaResource_new3(QNetworkRequest* request, QMediaResource** outptr_QMediaResource) { + QMediaResource* ret = new QMediaResource(*request); + *outptr_QMediaResource = ret; } -QMediaResource* QMediaResource_new4(QMediaResource* other) { - return new QMediaResource(*other); +void QMediaResource_new4(QMediaResource* other, QMediaResource** outptr_QMediaResource) { + QMediaResource* ret = new QMediaResource(*other); + *outptr_QMediaResource = ret; } -QMediaResource* QMediaResource_new5(QUrl* url, struct miqt_string mimeType) { +void QMediaResource_new5(QUrl* url, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource) { QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); - return new QMediaResource(*url, mimeType_QString); + QMediaResource* ret = new QMediaResource(*url, mimeType_QString); + *outptr_QMediaResource = ret; } -QMediaResource* QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType) { +void QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource) { QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); - return new QMediaResource(*request, mimeType_QString); + QMediaResource* ret = new QMediaResource(*request, mimeType_QString); + *outptr_QMediaResource = ret; } void QMediaResource_OperatorAssign(QMediaResource* self, QMediaResource* other) { @@ -171,7 +177,11 @@ void QMediaResource_SetResolution2(QMediaResource* self, int width, int height) self->setResolution(static_cast(width), static_cast(height)); } -void QMediaResource_Delete(QMediaResource* self) { - delete self; +void QMediaResource_Delete(QMediaResource* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaresource.go b/qt/multimedia/gen_qmediaresource.go index ea4495e4..5beef5a4 100644 --- a/qt/multimedia/gen_qmediaresource.go +++ b/qt/multimedia/gen_qmediaresource.go @@ -16,7 +16,8 @@ import ( ) type QMediaResource struct { - h *C.QMediaResource + h *C.QMediaResource + isSubclass bool } func (this *QMediaResource) cPointer() *C.QMediaResource { @@ -33,6 +34,7 @@ func (this *QMediaResource) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaResource constructs the type using only CGO pointers. func newQMediaResource(h *C.QMediaResource) *QMediaResource { if h == nil { return nil @@ -40,32 +42,53 @@ func newQMediaResource(h *C.QMediaResource) *QMediaResource { return &QMediaResource{h: h} } +// UnsafeNewQMediaResource constructs the type using only unsafe pointers. func UnsafeNewQMediaResource(h unsafe.Pointer) *QMediaResource { - return newQMediaResource((*C.QMediaResource)(h)) + if h == nil { + return nil + } + + return &QMediaResource{h: (*C.QMediaResource)(h)} } // NewQMediaResource constructs a new QMediaResource object. func NewQMediaResource() *QMediaResource { - ret := C.QMediaResource_new() - return newQMediaResource(ret) + var outptr_QMediaResource *C.QMediaResource = nil + + C.QMediaResource_new(&outptr_QMediaResource) + ret := newQMediaResource(outptr_QMediaResource) + ret.isSubclass = true + return ret } // NewQMediaResource2 constructs a new QMediaResource object. func NewQMediaResource2(url *qt.QUrl) *QMediaResource { - ret := C.QMediaResource_new2((*C.QUrl)(url.UnsafePointer())) - return newQMediaResource(ret) + var outptr_QMediaResource *C.QMediaResource = nil + + C.QMediaResource_new2((*C.QUrl)(url.UnsafePointer()), &outptr_QMediaResource) + ret := newQMediaResource(outptr_QMediaResource) + ret.isSubclass = true + return ret } // NewQMediaResource3 constructs a new QMediaResource object. func NewQMediaResource3(request *network.QNetworkRequest) *QMediaResource { - ret := C.QMediaResource_new3((*C.QNetworkRequest)(request.UnsafePointer())) - return newQMediaResource(ret) + var outptr_QMediaResource *C.QMediaResource = nil + + C.QMediaResource_new3((*C.QNetworkRequest)(request.UnsafePointer()), &outptr_QMediaResource) + ret := newQMediaResource(outptr_QMediaResource) + ret.isSubclass = true + return ret } // NewQMediaResource4 constructs a new QMediaResource object. func NewQMediaResource4(other *QMediaResource) *QMediaResource { - ret := C.QMediaResource_new4(other.cPointer()) - return newQMediaResource(ret) + var outptr_QMediaResource *C.QMediaResource = nil + + C.QMediaResource_new4(other.cPointer(), &outptr_QMediaResource) + ret := newQMediaResource(outptr_QMediaResource) + ret.isSubclass = true + return ret } // NewQMediaResource5 constructs a new QMediaResource object. @@ -74,8 +97,12 @@ func NewQMediaResource5(url *qt.QUrl, mimeType string) *QMediaResource { mimeType_ms.data = C.CString(mimeType) mimeType_ms.len = C.size_t(len(mimeType)) defer C.free(unsafe.Pointer(mimeType_ms.data)) - ret := C.QMediaResource_new5((*C.QUrl)(url.UnsafePointer()), mimeType_ms) - return newQMediaResource(ret) + var outptr_QMediaResource *C.QMediaResource = nil + + C.QMediaResource_new5((*C.QUrl)(url.UnsafePointer()), mimeType_ms, &outptr_QMediaResource) + ret := newQMediaResource(outptr_QMediaResource) + ret.isSubclass = true + return ret } // NewQMediaResource6 constructs a new QMediaResource object. @@ -84,8 +111,12 @@ func NewQMediaResource6(request *network.QNetworkRequest, mimeType string) *QMed mimeType_ms.data = C.CString(mimeType) mimeType_ms.len = C.size_t(len(mimeType)) defer C.free(unsafe.Pointer(mimeType_ms.data)) - ret := C.QMediaResource_new6((*C.QNetworkRequest)(request.UnsafePointer()), mimeType_ms) - return newQMediaResource(ret) + var outptr_QMediaResource *C.QMediaResource = nil + + C.QMediaResource_new6((*C.QNetworkRequest)(request.UnsafePointer()), mimeType_ms, &outptr_QMediaResource) + ret := newQMediaResource(outptr_QMediaResource) + ret.isSubclass = true + return ret } func (this *QMediaResource) OperatorAssign(other *QMediaResource) { @@ -227,7 +258,7 @@ func (this *QMediaResource) SetResolution2(width int, height int) { // Delete this object from C++ memory. func (this *QMediaResource) Delete() { - C.QMediaResource_Delete(this.h) + C.QMediaResource_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaresource.h b/qt/multimedia/gen_qmediaresource.h index b1cb9e39..48bbcd38 100644 --- a/qt/multimedia/gen_qmediaresource.h +++ b/qt/multimedia/gen_qmediaresource.h @@ -26,12 +26,12 @@ typedef struct QSize QSize; typedef struct QUrl QUrl; #endif -QMediaResource* QMediaResource_new(); -QMediaResource* QMediaResource_new2(QUrl* url); -QMediaResource* QMediaResource_new3(QNetworkRequest* request); -QMediaResource* QMediaResource_new4(QMediaResource* other); -QMediaResource* QMediaResource_new5(QUrl* url, struct miqt_string mimeType); -QMediaResource* QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType); +void QMediaResource_new(QMediaResource** outptr_QMediaResource); +void QMediaResource_new2(QUrl* url, QMediaResource** outptr_QMediaResource); +void QMediaResource_new3(QNetworkRequest* request, QMediaResource** outptr_QMediaResource); +void QMediaResource_new4(QMediaResource* other, QMediaResource** outptr_QMediaResource); +void QMediaResource_new5(QUrl* url, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource); +void QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource); void QMediaResource_OperatorAssign(QMediaResource* self, QMediaResource* other); bool QMediaResource_IsNull(const QMediaResource* self); bool QMediaResource_OperatorEqual(const QMediaResource* self, QMediaResource* other); @@ -58,7 +58,7 @@ void QMediaResource_SetVideoBitRate(QMediaResource* self, int rate); QSize* QMediaResource_Resolution(const QMediaResource* self); void QMediaResource_SetResolution(QMediaResource* self, QSize* resolution); void QMediaResource_SetResolution2(QMediaResource* self, int width, int height); -void QMediaResource_Delete(QMediaResource* self); +void QMediaResource_Delete(QMediaResource* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaservice.cpp b/qt/multimedia/gen_qmediaservice.cpp index 880b33d3..512c1d31 100644 --- a/qt/multimedia/gen_qmediaservice.cpp +++ b/qt/multimedia/gen_qmediaservice.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,11 @@ struct miqt_string QMediaService_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QMediaService_Delete(QMediaService* self) { - delete self; +void QMediaService_Delete(QMediaService* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaservice.go b/qt/multimedia/gen_qmediaservice.go index dc328072..68d4cc00 100644 --- a/qt/multimedia/gen_qmediaservice.go +++ b/qt/multimedia/gen_qmediaservice.go @@ -15,7 +15,8 @@ import ( ) type QMediaService struct { - h *C.QMediaService + h *C.QMediaService + isSubclass bool *qt.QObject } @@ -33,15 +34,23 @@ func (this *QMediaService) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaService(h *C.QMediaService) *QMediaService { +// newQMediaService constructs the type using only CGO pointers. +func newQMediaService(h *C.QMediaService, h_QObject *C.QObject) *QMediaService { if h == nil { return nil } - return &QMediaService{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaService{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaService(h unsafe.Pointer) *QMediaService { - return newQMediaService((*C.QMediaService)(h)) +// UnsafeNewQMediaService constructs the type using only unsafe pointers. +func UnsafeNewQMediaService(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaService { + if h == nil { + return nil + } + + return &QMediaService{h: (*C.QMediaService)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QMediaService) MetaObject() *qt.QMetaObject { @@ -75,7 +84,7 @@ func QMediaService_TrUtf8(s string) string { func (this *QMediaService) RequestControl(name string) *QMediaControl { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - return UnsafeNewQMediaControl(unsafe.Pointer(C.QMediaService_RequestControl(this.h, name_Cstring))) + return UnsafeNewQMediaControl(unsafe.Pointer(C.QMediaService_RequestControl(this.h, name_Cstring)), nil) } func (this *QMediaService) ReleaseControl(control *QMediaControl) { @@ -128,7 +137,7 @@ func QMediaService_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaService) Delete() { - C.QMediaService_Delete(this.h) + C.QMediaService_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaservice.h b/qt/multimedia/gen_qmediaservice.h index 1383e6ca..e9306ae4 100644 --- a/qt/multimedia/gen_qmediaservice.h +++ b/qt/multimedia/gen_qmediaservice.h @@ -18,10 +18,12 @@ extern "C" { class QMediaControl; class QMediaService; class QMetaObject; +class QObject; #else typedef struct QMediaControl QMediaControl; typedef struct QMediaService QMediaService; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QMediaService_MetaObject(const QMediaService* self); @@ -34,7 +36,7 @@ struct miqt_string QMediaService_Tr2(const char* s, const char* c); struct miqt_string QMediaService_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaService_TrUtf82(const char* s, const char* c); struct miqt_string QMediaService_TrUtf83(const char* s, const char* c, int n); -void QMediaService_Delete(QMediaService* self); +void QMediaService_Delete(QMediaService* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.cpp b/qt/multimedia/gen_qmediaserviceproviderplugin.cpp index 253a366a..c834f4da 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.cpp +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -17,11 +18,12 @@ #include "gen_qmediaserviceproviderplugin.h" #include "_cgo_export.h" -QMediaServiceProviderHint* QMediaServiceProviderHint_new() { - return new QMediaServiceProviderHint(); +void QMediaServiceProviderHint_new(QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { + QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(); + *outptr_QMediaServiceProviderHint = ret; } -QMediaServiceProviderHint* QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs) { +void QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); QStringList codecs_QList; codecs_QList.reserve(codecs.len); @@ -30,24 +32,29 @@ QMediaServiceProviderHint* QMediaServiceProviderHint_new2(struct miqt_string mim QString codecs_arr_i_QString = QString::fromUtf8(codecs_arr[i].data, codecs_arr[i].len); codecs_QList.push_back(codecs_arr_i_QString); } - return new QMediaServiceProviderHint(mimeType_QString, codecs_QList); + QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(mimeType_QString, codecs_QList); + *outptr_QMediaServiceProviderHint = ret; } -QMediaServiceProviderHint* QMediaServiceProviderHint_new3(struct miqt_string device) { +void QMediaServiceProviderHint_new3(struct miqt_string device, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { QByteArray device_QByteArray(device.data, device.len); - return new QMediaServiceProviderHint(device_QByteArray); + QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(device_QByteArray); + *outptr_QMediaServiceProviderHint = ret; } -QMediaServiceProviderHint* QMediaServiceProviderHint_new4(int position) { - return new QMediaServiceProviderHint(static_cast(position)); +void QMediaServiceProviderHint_new4(int position, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { + QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(static_cast(position)); + *outptr_QMediaServiceProviderHint = ret; } -QMediaServiceProviderHint* QMediaServiceProviderHint_new5(int features) { - return new QMediaServiceProviderHint(static_cast(features)); +void QMediaServiceProviderHint_new5(int features, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { + QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(static_cast(features)); + *outptr_QMediaServiceProviderHint = ret; } -QMediaServiceProviderHint* QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other) { - return new QMediaServiceProviderHint(*other); +void QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { + QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(*other); + *outptr_QMediaServiceProviderHint = ret; } void QMediaServiceProviderHint_OperatorAssign(QMediaServiceProviderHint* self, QMediaServiceProviderHint* other) { @@ -121,8 +128,12 @@ int QMediaServiceProviderHint_Features(const QMediaServiceProviderHint* self) { return static_cast(_ret); } -void QMediaServiceProviderHint_Delete(QMediaServiceProviderHint* self) { - delete self; +void QMediaServiceProviderHint_Delete(QMediaServiceProviderHint* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMediaService* QMediaServiceProviderFactoryInterface_Create(QMediaServiceProviderFactoryInterface* self, struct miqt_string key) { @@ -138,8 +149,12 @@ void QMediaServiceProviderFactoryInterface_OperatorAssign(QMediaServiceProviderF self->operator=(*param1); } -void QMediaServiceProviderFactoryInterface_Delete(QMediaServiceProviderFactoryInterface* self) { - delete self; +void QMediaServiceProviderFactoryInterface_Delete(QMediaServiceProviderFactoryInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } int QMediaServiceSupportedFormatsInterface_HasSupport(const QMediaServiceSupportedFormatsInterface* self, struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs) { @@ -179,8 +194,12 @@ void QMediaServiceSupportedFormatsInterface_OperatorAssign(QMediaServiceSupporte self->operator=(*param1); } -void QMediaServiceSupportedFormatsInterface_Delete(QMediaServiceSupportedFormatsInterface* self) { - delete self; +void QMediaServiceSupportedFormatsInterface_Delete(QMediaServiceSupportedFormatsInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_array /* of struct miqt_string */ QMediaServiceSupportedDevicesInterface_Devices(const QMediaServiceSupportedDevicesInterface* self, struct miqt_string service) { @@ -219,8 +238,12 @@ void QMediaServiceSupportedDevicesInterface_OperatorAssign(QMediaServiceSupporte self->operator=(*param1); } -void QMediaServiceSupportedDevicesInterface_Delete(QMediaServiceSupportedDevicesInterface* self) { - delete self; +void QMediaServiceSupportedDevicesInterface_Delete(QMediaServiceSupportedDevicesInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QMediaServiceDefaultDeviceInterface_DefaultDevice(const QMediaServiceDefaultDeviceInterface* self, struct miqt_string service) { @@ -237,8 +260,12 @@ void QMediaServiceDefaultDeviceInterface_OperatorAssign(QMediaServiceDefaultDevi self->operator=(*param1); } -void QMediaServiceDefaultDeviceInterface_Delete(QMediaServiceDefaultDeviceInterface* self) { - delete self; +void QMediaServiceDefaultDeviceInterface_Delete(QMediaServiceDefaultDeviceInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } int QMediaServiceCameraInfoInterface_CameraPosition(const QMediaServiceCameraInfoInterface* self, struct miqt_string device) { @@ -256,8 +283,12 @@ void QMediaServiceCameraInfoInterface_OperatorAssign(QMediaServiceCameraInfoInte self->operator=(*param1); } -void QMediaServiceCameraInfoInterface_Delete(QMediaServiceCameraInfoInterface* self) { - delete self; +void QMediaServiceCameraInfoInterface_Delete(QMediaServiceCameraInfoInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } int QMediaServiceFeaturesInterface_SupportedFeatures(const QMediaServiceFeaturesInterface* self, struct miqt_string service) { @@ -270,8 +301,12 @@ void QMediaServiceFeaturesInterface_OperatorAssign(QMediaServiceFeaturesInterfac self->operator=(*param1); } -void QMediaServiceFeaturesInterface_Delete(QMediaServiceFeaturesInterface* self) { - delete self; +void QMediaServiceFeaturesInterface_Delete(QMediaServiceFeaturesInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QMediaServiceProviderPlugin_MetaObject(const QMediaServiceProviderPlugin* self) { @@ -357,7 +392,11 @@ struct miqt_string QMediaServiceProviderPlugin_TrUtf83(const char* s, const char return _ms; } -void QMediaServiceProviderPlugin_Delete(QMediaServiceProviderPlugin* self) { - delete self; +void QMediaServiceProviderPlugin_Delete(QMediaServiceProviderPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.go b/qt/multimedia/gen_qmediaserviceproviderplugin.go index 6ad81840..64b3a0b9 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.go +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.go @@ -34,7 +34,8 @@ const ( ) type QMediaServiceProviderHint struct { - h *C.QMediaServiceProviderHint + h *C.QMediaServiceProviderHint + isSubclass bool } func (this *QMediaServiceProviderHint) cPointer() *C.QMediaServiceProviderHint { @@ -51,6 +52,7 @@ func (this *QMediaServiceProviderHint) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaServiceProviderHint constructs the type using only CGO pointers. func newQMediaServiceProviderHint(h *C.QMediaServiceProviderHint) *QMediaServiceProviderHint { if h == nil { return nil @@ -58,14 +60,23 @@ func newQMediaServiceProviderHint(h *C.QMediaServiceProviderHint) *QMediaService return &QMediaServiceProviderHint{h: h} } +// UnsafeNewQMediaServiceProviderHint constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceProviderHint(h unsafe.Pointer) *QMediaServiceProviderHint { - return newQMediaServiceProviderHint((*C.QMediaServiceProviderHint)(h)) + if h == nil { + return nil + } + + return &QMediaServiceProviderHint{h: (*C.QMediaServiceProviderHint)(h)} } // NewQMediaServiceProviderHint constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint() *QMediaServiceProviderHint { - ret := C.QMediaServiceProviderHint_new() - return newQMediaServiceProviderHint(ret) + var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil + + C.QMediaServiceProviderHint_new(&outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret.isSubclass = true + return ret } // NewQMediaServiceProviderHint2 constructs a new QMediaServiceProviderHint object. @@ -84,8 +95,12 @@ func NewQMediaServiceProviderHint2(mimeType string, codecs []string) *QMediaServ codecs_CArray[i] = codecs_i_ms } codecs_ma := C.struct_miqt_array{len: C.size_t(len(codecs)), data: unsafe.Pointer(codecs_CArray)} - ret := C.QMediaServiceProviderHint_new2(mimeType_ms, codecs_ma) - return newQMediaServiceProviderHint(ret) + var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil + + C.QMediaServiceProviderHint_new2(mimeType_ms, codecs_ma, &outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret.isSubclass = true + return ret } // NewQMediaServiceProviderHint3 constructs a new QMediaServiceProviderHint object. @@ -93,26 +108,42 @@ func NewQMediaServiceProviderHint3(device []byte) *QMediaServiceProviderHint { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - ret := C.QMediaServiceProviderHint_new3(device_alias) - return newQMediaServiceProviderHint(ret) + var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil + + C.QMediaServiceProviderHint_new3(device_alias, &outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret.isSubclass = true + return ret } // NewQMediaServiceProviderHint4 constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint4(position QCamera__Position) *QMediaServiceProviderHint { - ret := C.QMediaServiceProviderHint_new4((C.int)(position)) - return newQMediaServiceProviderHint(ret) + var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil + + C.QMediaServiceProviderHint_new4((C.int)(position), &outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret.isSubclass = true + return ret } // NewQMediaServiceProviderHint5 constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint5(features QMediaServiceProviderHint__Feature) *QMediaServiceProviderHint { - ret := C.QMediaServiceProviderHint_new5((C.int)(features)) - return newQMediaServiceProviderHint(ret) + var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil + + C.QMediaServiceProviderHint_new5((C.int)(features), &outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret.isSubclass = true + return ret } // NewQMediaServiceProviderHint6 constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint6(other *QMediaServiceProviderHint) *QMediaServiceProviderHint { - ret := C.QMediaServiceProviderHint_new6(other.cPointer()) - return newQMediaServiceProviderHint(ret) + var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil + + C.QMediaServiceProviderHint_new6(other.cPointer(), &outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret.isSubclass = true + return ret } func (this *QMediaServiceProviderHint) OperatorAssign(other *QMediaServiceProviderHint) { @@ -172,7 +203,7 @@ func (this *QMediaServiceProviderHint) Features() QMediaServiceProviderHint__Fea // Delete this object from C++ memory. func (this *QMediaServiceProviderHint) Delete() { - C.QMediaServiceProviderHint_Delete(this.h) + C.QMediaServiceProviderHint_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -185,7 +216,8 @@ func (this *QMediaServiceProviderHint) GoGC() { } type QMediaServiceProviderFactoryInterface struct { - h *C.QMediaServiceProviderFactoryInterface + h *C.QMediaServiceProviderFactoryInterface + isSubclass bool } func (this *QMediaServiceProviderFactoryInterface) cPointer() *C.QMediaServiceProviderFactoryInterface { @@ -202,6 +234,7 @@ func (this *QMediaServiceProviderFactoryInterface) UnsafePointer() unsafe.Pointe return unsafe.Pointer(this.h) } +// newQMediaServiceProviderFactoryInterface constructs the type using only CGO pointers. func newQMediaServiceProviderFactoryInterface(h *C.QMediaServiceProviderFactoryInterface) *QMediaServiceProviderFactoryInterface { if h == nil { return nil @@ -209,8 +242,13 @@ func newQMediaServiceProviderFactoryInterface(h *C.QMediaServiceProviderFactoryI return &QMediaServiceProviderFactoryInterface{h: h} } +// UnsafeNewQMediaServiceProviderFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceProviderFactoryInterface(h unsafe.Pointer) *QMediaServiceProviderFactoryInterface { - return newQMediaServiceProviderFactoryInterface((*C.QMediaServiceProviderFactoryInterface)(h)) + if h == nil { + return nil + } + + return &QMediaServiceProviderFactoryInterface{h: (*C.QMediaServiceProviderFactoryInterface)(h)} } func (this *QMediaServiceProviderFactoryInterface) Create(key string) *QMediaService { @@ -218,7 +256,7 @@ func (this *QMediaServiceProviderFactoryInterface) Create(key string) *QMediaSer key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaServiceProviderFactoryInterface_Create(this.h, key_ms))) + return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaServiceProviderFactoryInterface_Create(this.h, key_ms)), nil) } func (this *QMediaServiceProviderFactoryInterface) Release(service *QMediaService) { @@ -231,7 +269,7 @@ func (this *QMediaServiceProviderFactoryInterface) OperatorAssign(param1 *QMedia // Delete this object from C++ memory. func (this *QMediaServiceProviderFactoryInterface) Delete() { - C.QMediaServiceProviderFactoryInterface_Delete(this.h) + C.QMediaServiceProviderFactoryInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -244,7 +282,8 @@ func (this *QMediaServiceProviderFactoryInterface) GoGC() { } type QMediaServiceSupportedFormatsInterface struct { - h *C.QMediaServiceSupportedFormatsInterface + h *C.QMediaServiceSupportedFormatsInterface + isSubclass bool } func (this *QMediaServiceSupportedFormatsInterface) cPointer() *C.QMediaServiceSupportedFormatsInterface { @@ -261,6 +300,7 @@ func (this *QMediaServiceSupportedFormatsInterface) UnsafePointer() unsafe.Point return unsafe.Pointer(this.h) } +// newQMediaServiceSupportedFormatsInterface constructs the type using only CGO pointers. func newQMediaServiceSupportedFormatsInterface(h *C.QMediaServiceSupportedFormatsInterface) *QMediaServiceSupportedFormatsInterface { if h == nil { return nil @@ -268,8 +308,13 @@ func newQMediaServiceSupportedFormatsInterface(h *C.QMediaServiceSupportedFormat return &QMediaServiceSupportedFormatsInterface{h: h} } +// UnsafeNewQMediaServiceSupportedFormatsInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceSupportedFormatsInterface(h unsafe.Pointer) *QMediaServiceSupportedFormatsInterface { - return newQMediaServiceSupportedFormatsInterface((*C.QMediaServiceSupportedFormatsInterface)(h)) + if h == nil { + return nil + } + + return &QMediaServiceSupportedFormatsInterface{h: (*C.QMediaServiceSupportedFormatsInterface)(h)} } func (this *QMediaServiceSupportedFormatsInterface) HasSupport(mimeType string, codecs []string) QMultimedia__SupportEstimate { @@ -309,7 +354,7 @@ func (this *QMediaServiceSupportedFormatsInterface) OperatorAssign(param1 *QMedi // Delete this object from C++ memory. func (this *QMediaServiceSupportedFormatsInterface) Delete() { - C.QMediaServiceSupportedFormatsInterface_Delete(this.h) + C.QMediaServiceSupportedFormatsInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -322,7 +367,8 @@ func (this *QMediaServiceSupportedFormatsInterface) GoGC() { } type QMediaServiceSupportedDevicesInterface struct { - h *C.QMediaServiceSupportedDevicesInterface + h *C.QMediaServiceSupportedDevicesInterface + isSubclass bool } func (this *QMediaServiceSupportedDevicesInterface) cPointer() *C.QMediaServiceSupportedDevicesInterface { @@ -339,6 +385,7 @@ func (this *QMediaServiceSupportedDevicesInterface) UnsafePointer() unsafe.Point return unsafe.Pointer(this.h) } +// newQMediaServiceSupportedDevicesInterface constructs the type using only CGO pointers. func newQMediaServiceSupportedDevicesInterface(h *C.QMediaServiceSupportedDevicesInterface) *QMediaServiceSupportedDevicesInterface { if h == nil { return nil @@ -346,8 +393,13 @@ func newQMediaServiceSupportedDevicesInterface(h *C.QMediaServiceSupportedDevice return &QMediaServiceSupportedDevicesInterface{h: h} } +// UnsafeNewQMediaServiceSupportedDevicesInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceSupportedDevicesInterface(h unsafe.Pointer) *QMediaServiceSupportedDevicesInterface { - return newQMediaServiceSupportedDevicesInterface((*C.QMediaServiceSupportedDevicesInterface)(h)) + if h == nil { + return nil + } + + return &QMediaServiceSupportedDevicesInterface{h: (*C.QMediaServiceSupportedDevicesInterface)(h)} } func (this *QMediaServiceSupportedDevicesInterface) Devices(service []byte) [][]byte { @@ -385,7 +437,7 @@ func (this *QMediaServiceSupportedDevicesInterface) OperatorAssign(param1 *QMedi // Delete this object from C++ memory. func (this *QMediaServiceSupportedDevicesInterface) Delete() { - C.QMediaServiceSupportedDevicesInterface_Delete(this.h) + C.QMediaServiceSupportedDevicesInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -398,7 +450,8 @@ func (this *QMediaServiceSupportedDevicesInterface) GoGC() { } type QMediaServiceDefaultDeviceInterface struct { - h *C.QMediaServiceDefaultDeviceInterface + h *C.QMediaServiceDefaultDeviceInterface + isSubclass bool } func (this *QMediaServiceDefaultDeviceInterface) cPointer() *C.QMediaServiceDefaultDeviceInterface { @@ -415,6 +468,7 @@ func (this *QMediaServiceDefaultDeviceInterface) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQMediaServiceDefaultDeviceInterface constructs the type using only CGO pointers. func newQMediaServiceDefaultDeviceInterface(h *C.QMediaServiceDefaultDeviceInterface) *QMediaServiceDefaultDeviceInterface { if h == nil { return nil @@ -422,8 +476,13 @@ func newQMediaServiceDefaultDeviceInterface(h *C.QMediaServiceDefaultDeviceInter return &QMediaServiceDefaultDeviceInterface{h: h} } +// UnsafeNewQMediaServiceDefaultDeviceInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceDefaultDeviceInterface(h unsafe.Pointer) *QMediaServiceDefaultDeviceInterface { - return newQMediaServiceDefaultDeviceInterface((*C.QMediaServiceDefaultDeviceInterface)(h)) + if h == nil { + return nil + } + + return &QMediaServiceDefaultDeviceInterface{h: (*C.QMediaServiceDefaultDeviceInterface)(h)} } func (this *QMediaServiceDefaultDeviceInterface) DefaultDevice(service []byte) []byte { @@ -442,7 +501,7 @@ func (this *QMediaServiceDefaultDeviceInterface) OperatorAssign(param1 *QMediaSe // Delete this object from C++ memory. func (this *QMediaServiceDefaultDeviceInterface) Delete() { - C.QMediaServiceDefaultDeviceInterface_Delete(this.h) + C.QMediaServiceDefaultDeviceInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -455,7 +514,8 @@ func (this *QMediaServiceDefaultDeviceInterface) GoGC() { } type QMediaServiceCameraInfoInterface struct { - h *C.QMediaServiceCameraInfoInterface + h *C.QMediaServiceCameraInfoInterface + isSubclass bool } func (this *QMediaServiceCameraInfoInterface) cPointer() *C.QMediaServiceCameraInfoInterface { @@ -472,6 +532,7 @@ func (this *QMediaServiceCameraInfoInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaServiceCameraInfoInterface constructs the type using only CGO pointers. func newQMediaServiceCameraInfoInterface(h *C.QMediaServiceCameraInfoInterface) *QMediaServiceCameraInfoInterface { if h == nil { return nil @@ -479,8 +540,13 @@ func newQMediaServiceCameraInfoInterface(h *C.QMediaServiceCameraInfoInterface) return &QMediaServiceCameraInfoInterface{h: h} } +// UnsafeNewQMediaServiceCameraInfoInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceCameraInfoInterface(h unsafe.Pointer) *QMediaServiceCameraInfoInterface { - return newQMediaServiceCameraInfoInterface((*C.QMediaServiceCameraInfoInterface)(h)) + if h == nil { + return nil + } + + return &QMediaServiceCameraInfoInterface{h: (*C.QMediaServiceCameraInfoInterface)(h)} } func (this *QMediaServiceCameraInfoInterface) CameraPosition(device []byte) QCamera__Position { @@ -503,7 +569,7 @@ func (this *QMediaServiceCameraInfoInterface) OperatorAssign(param1 *QMediaServi // Delete this object from C++ memory. func (this *QMediaServiceCameraInfoInterface) Delete() { - C.QMediaServiceCameraInfoInterface_Delete(this.h) + C.QMediaServiceCameraInfoInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -516,7 +582,8 @@ func (this *QMediaServiceCameraInfoInterface) GoGC() { } type QMediaServiceFeaturesInterface struct { - h *C.QMediaServiceFeaturesInterface + h *C.QMediaServiceFeaturesInterface + isSubclass bool } func (this *QMediaServiceFeaturesInterface) cPointer() *C.QMediaServiceFeaturesInterface { @@ -533,6 +600,7 @@ func (this *QMediaServiceFeaturesInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaServiceFeaturesInterface constructs the type using only CGO pointers. func newQMediaServiceFeaturesInterface(h *C.QMediaServiceFeaturesInterface) *QMediaServiceFeaturesInterface { if h == nil { return nil @@ -540,8 +608,13 @@ func newQMediaServiceFeaturesInterface(h *C.QMediaServiceFeaturesInterface) *QMe return &QMediaServiceFeaturesInterface{h: h} } +// UnsafeNewQMediaServiceFeaturesInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceFeaturesInterface(h unsafe.Pointer) *QMediaServiceFeaturesInterface { - return newQMediaServiceFeaturesInterface((*C.QMediaServiceFeaturesInterface)(h)) + if h == nil { + return nil + } + + return &QMediaServiceFeaturesInterface{h: (*C.QMediaServiceFeaturesInterface)(h)} } func (this *QMediaServiceFeaturesInterface) SupportedFeatures(service []byte) QMediaServiceProviderHint__Feature { @@ -557,7 +630,7 @@ func (this *QMediaServiceFeaturesInterface) OperatorAssign(param1 *QMediaService // Delete this object from C++ memory. func (this *QMediaServiceFeaturesInterface) Delete() { - C.QMediaServiceFeaturesInterface_Delete(this.h) + C.QMediaServiceFeaturesInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -570,7 +643,8 @@ func (this *QMediaServiceFeaturesInterface) GoGC() { } type QMediaServiceProviderPlugin struct { - h *C.QMediaServiceProviderPlugin + h *C.QMediaServiceProviderPlugin + isSubclass bool *qt.QObject *QMediaServiceProviderFactoryInterface } @@ -589,15 +663,25 @@ func (this *QMediaServiceProviderPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaServiceProviderPlugin(h *C.QMediaServiceProviderPlugin) *QMediaServiceProviderPlugin { +// newQMediaServiceProviderPlugin constructs the type using only CGO pointers. +func newQMediaServiceProviderPlugin(h *C.QMediaServiceProviderPlugin, h_QObject *C.QObject, h_QMediaServiceProviderFactoryInterface *C.QMediaServiceProviderFactoryInterface) *QMediaServiceProviderPlugin { if h == nil { return nil } - return &QMediaServiceProviderPlugin{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h)), QMediaServiceProviderFactoryInterface: UnsafeNewQMediaServiceProviderFactoryInterface(unsafe.Pointer(h))} + return &QMediaServiceProviderPlugin{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QMediaServiceProviderFactoryInterface: newQMediaServiceProviderFactoryInterface(h_QMediaServiceProviderFactoryInterface)} } -func UnsafeNewQMediaServiceProviderPlugin(h unsafe.Pointer) *QMediaServiceProviderPlugin { - return newQMediaServiceProviderPlugin((*C.QMediaServiceProviderPlugin)(h)) +// UnsafeNewQMediaServiceProviderPlugin constructs the type using only unsafe pointers. +func UnsafeNewQMediaServiceProviderPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaServiceProviderFactoryInterface unsafe.Pointer) *QMediaServiceProviderPlugin { + if h == nil { + return nil + } + + return &QMediaServiceProviderPlugin{h: (*C.QMediaServiceProviderPlugin)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QMediaServiceProviderFactoryInterface: UnsafeNewQMediaServiceProviderFactoryInterface(h_QMediaServiceProviderFactoryInterface)} } func (this *QMediaServiceProviderPlugin) MetaObject() *qt.QMetaObject { @@ -633,7 +717,7 @@ func (this *QMediaServiceProviderPlugin) Create(key string) *QMediaService { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaServiceProviderPlugin_Create(this.h, key_ms))) + return UnsafeNewQMediaService(unsafe.Pointer(C.QMediaServiceProviderPlugin_Create(this.h, key_ms)), nil) } func (this *QMediaServiceProviderPlugin) Release(service *QMediaService) { @@ -686,7 +770,7 @@ func QMediaServiceProviderPlugin_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaServiceProviderPlugin) Delete() { - C.QMediaServiceProviderPlugin_Delete(this.h) + C.QMediaServiceProviderPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.h b/qt/multimedia/gen_qmediaserviceproviderplugin.h index 2b6d2670..a1ef878c 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.h +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.h @@ -26,6 +26,7 @@ class QMediaServiceProviderPlugin; class QMediaServiceSupportedDevicesInterface; class QMediaServiceSupportedFormatsInterface; class QMetaObject; +class QObject; #else typedef struct QByteArray QByteArray; typedef struct QMediaService QMediaService; @@ -38,14 +39,15 @@ typedef struct QMediaServiceProviderPlugin QMediaServiceProviderPlugin; typedef struct QMediaServiceSupportedDevicesInterface QMediaServiceSupportedDevicesInterface; typedef struct QMediaServiceSupportedFormatsInterface QMediaServiceSupportedFormatsInterface; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif -QMediaServiceProviderHint* QMediaServiceProviderHint_new(); -QMediaServiceProviderHint* QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs); -QMediaServiceProviderHint* QMediaServiceProviderHint_new3(struct miqt_string device); -QMediaServiceProviderHint* QMediaServiceProviderHint_new4(int position); -QMediaServiceProviderHint* QMediaServiceProviderHint_new5(int features); -QMediaServiceProviderHint* QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other); +void QMediaServiceProviderHint_new(QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); +void QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); +void QMediaServiceProviderHint_new3(struct miqt_string device, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); +void QMediaServiceProviderHint_new4(int position, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); +void QMediaServiceProviderHint_new5(int features, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); +void QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); void QMediaServiceProviderHint_OperatorAssign(QMediaServiceProviderHint* self, QMediaServiceProviderHint* other); bool QMediaServiceProviderHint_OperatorEqual(const QMediaServiceProviderHint* self, QMediaServiceProviderHint* other); bool QMediaServiceProviderHint_OperatorNotEqual(const QMediaServiceProviderHint* self, QMediaServiceProviderHint* other); @@ -56,35 +58,35 @@ struct miqt_array /* of struct miqt_string */ QMediaServiceProviderHint_Codecs( struct miqt_string QMediaServiceProviderHint_Device(const QMediaServiceProviderHint* self); int QMediaServiceProviderHint_CameraPosition(const QMediaServiceProviderHint* self); int QMediaServiceProviderHint_Features(const QMediaServiceProviderHint* self); -void QMediaServiceProviderHint_Delete(QMediaServiceProviderHint* self); +void QMediaServiceProviderHint_Delete(QMediaServiceProviderHint* self, bool isSubclass); QMediaService* QMediaServiceProviderFactoryInterface_Create(QMediaServiceProviderFactoryInterface* self, struct miqt_string key); void QMediaServiceProviderFactoryInterface_Release(QMediaServiceProviderFactoryInterface* self, QMediaService* service); void QMediaServiceProviderFactoryInterface_OperatorAssign(QMediaServiceProviderFactoryInterface* self, QMediaServiceProviderFactoryInterface* param1); -void QMediaServiceProviderFactoryInterface_Delete(QMediaServiceProviderFactoryInterface* self); +void QMediaServiceProviderFactoryInterface_Delete(QMediaServiceProviderFactoryInterface* self, bool isSubclass); int QMediaServiceSupportedFormatsInterface_HasSupport(const QMediaServiceSupportedFormatsInterface* self, struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs); struct miqt_array /* of struct miqt_string */ QMediaServiceSupportedFormatsInterface_SupportedMimeTypes(const QMediaServiceSupportedFormatsInterface* self); void QMediaServiceSupportedFormatsInterface_OperatorAssign(QMediaServiceSupportedFormatsInterface* self, QMediaServiceSupportedFormatsInterface* param1); -void QMediaServiceSupportedFormatsInterface_Delete(QMediaServiceSupportedFormatsInterface* self); +void QMediaServiceSupportedFormatsInterface_Delete(QMediaServiceSupportedFormatsInterface* self, bool isSubclass); struct miqt_array /* of struct miqt_string */ QMediaServiceSupportedDevicesInterface_Devices(const QMediaServiceSupportedDevicesInterface* self, struct miqt_string service); struct miqt_string QMediaServiceSupportedDevicesInterface_DeviceDescription(QMediaServiceSupportedDevicesInterface* self, struct miqt_string service, struct miqt_string device); void QMediaServiceSupportedDevicesInterface_OperatorAssign(QMediaServiceSupportedDevicesInterface* self, QMediaServiceSupportedDevicesInterface* param1); -void QMediaServiceSupportedDevicesInterface_Delete(QMediaServiceSupportedDevicesInterface* self); +void QMediaServiceSupportedDevicesInterface_Delete(QMediaServiceSupportedDevicesInterface* self, bool isSubclass); struct miqt_string QMediaServiceDefaultDeviceInterface_DefaultDevice(const QMediaServiceDefaultDeviceInterface* self, struct miqt_string service); void QMediaServiceDefaultDeviceInterface_OperatorAssign(QMediaServiceDefaultDeviceInterface* self, QMediaServiceDefaultDeviceInterface* param1); -void QMediaServiceDefaultDeviceInterface_Delete(QMediaServiceDefaultDeviceInterface* self); +void QMediaServiceDefaultDeviceInterface_Delete(QMediaServiceDefaultDeviceInterface* self, bool isSubclass); int QMediaServiceCameraInfoInterface_CameraPosition(const QMediaServiceCameraInfoInterface* self, struct miqt_string device); int QMediaServiceCameraInfoInterface_CameraOrientation(const QMediaServiceCameraInfoInterface* self, struct miqt_string device); void QMediaServiceCameraInfoInterface_OperatorAssign(QMediaServiceCameraInfoInterface* self, QMediaServiceCameraInfoInterface* param1); -void QMediaServiceCameraInfoInterface_Delete(QMediaServiceCameraInfoInterface* self); +void QMediaServiceCameraInfoInterface_Delete(QMediaServiceCameraInfoInterface* self, bool isSubclass); int QMediaServiceFeaturesInterface_SupportedFeatures(const QMediaServiceFeaturesInterface* self, struct miqt_string service); void QMediaServiceFeaturesInterface_OperatorAssign(QMediaServiceFeaturesInterface* self, QMediaServiceFeaturesInterface* param1); -void QMediaServiceFeaturesInterface_Delete(QMediaServiceFeaturesInterface* self); +void QMediaServiceFeaturesInterface_Delete(QMediaServiceFeaturesInterface* self, bool isSubclass); QMetaObject* QMediaServiceProviderPlugin_MetaObject(const QMediaServiceProviderPlugin* self); void* QMediaServiceProviderPlugin_Metacast(QMediaServiceProviderPlugin* self, const char* param1); @@ -96,7 +98,7 @@ struct miqt_string QMediaServiceProviderPlugin_Tr2(const char* s, const char* c) struct miqt_string QMediaServiceProviderPlugin_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaServiceProviderPlugin_TrUtf82(const char* s, const char* c); struct miqt_string QMediaServiceProviderPlugin_TrUtf83(const char* s, const char* c, int n); -void QMediaServiceProviderPlugin_Delete(QMediaServiceProviderPlugin* self); +void QMediaServiceProviderPlugin_Delete(QMediaServiceProviderPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediastreamscontrol.cpp b/qt/multimedia/gen_qmediastreamscontrol.cpp index 27ac31a1..c1dd5ef1 100644 --- a/qt/multimedia/gen_qmediastreamscontrol.cpp +++ b/qt/multimedia/gen_qmediastreamscontrol.cpp @@ -1,5 +1,7 @@ +#include #include #include +#include #include #include #include @@ -124,7 +126,11 @@ struct miqt_string QMediaStreamsControl_TrUtf83(const char* s, const char* c, in return _ms; } -void QMediaStreamsControl_Delete(QMediaStreamsControl* self) { - delete self; +void QMediaStreamsControl_Delete(QMediaStreamsControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediastreamscontrol.go b/qt/multimedia/gen_qmediastreamscontrol.go index 4cad132e..d115c30f 100644 --- a/qt/multimedia/gen_qmediastreamscontrol.go +++ b/qt/multimedia/gen_qmediastreamscontrol.go @@ -26,7 +26,8 @@ const ( ) type QMediaStreamsControl struct { - h *C.QMediaStreamsControl + h *C.QMediaStreamsControl + isSubclass bool *QMediaControl } @@ -44,15 +45,23 @@ func (this *QMediaStreamsControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaStreamsControl(h *C.QMediaStreamsControl) *QMediaStreamsControl { +// newQMediaStreamsControl constructs the type using only CGO pointers. +func newQMediaStreamsControl(h *C.QMediaStreamsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaStreamsControl { if h == nil { return nil } - return &QMediaStreamsControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaStreamsControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaStreamsControl(h unsafe.Pointer) *QMediaStreamsControl { - return newQMediaStreamsControl((*C.QMediaStreamsControl)(h)) +// UnsafeNewQMediaStreamsControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaStreamsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaStreamsControl { + if h == nil { + return nil + } + + return &QMediaStreamsControl{h: (*C.QMediaStreamsControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaStreamsControl) MetaObject() *qt.QMetaObject { @@ -190,7 +199,7 @@ func QMediaStreamsControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaStreamsControl) Delete() { - C.QMediaStreamsControl_Delete(this.h) + C.QMediaStreamsControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediastreamscontrol.h b/qt/multimedia/gen_qmediastreamscontrol.h index 5bdaff4c..b843da37 100644 --- a/qt/multimedia/gen_qmediastreamscontrol.h +++ b/qt/multimedia/gen_qmediastreamscontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMediaStreamsControl; class QMetaObject; +class QObject; class QVariant; #else +typedef struct QMediaControl QMediaControl; typedef struct QMediaStreamsControl QMediaStreamsControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; #endif @@ -41,7 +45,7 @@ struct miqt_string QMediaStreamsControl_Tr2(const char* s, const char* c); struct miqt_string QMediaStreamsControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaStreamsControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaStreamsControl_TrUtf83(const char* s, const char* c, int n); -void QMediaStreamsControl_Delete(QMediaStreamsControl* self); +void QMediaStreamsControl_Delete(QMediaStreamsControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediatimerange.cpp b/qt/multimedia/gen_qmediatimerange.cpp index 495bcb56..e301492e 100644 --- a/qt/multimedia/gen_qmediatimerange.cpp +++ b/qt/multimedia/gen_qmediatimerange.cpp @@ -5,16 +5,19 @@ #include "gen_qmediatimerange.h" #include "_cgo_export.h" -QMediaTimeInterval* QMediaTimeInterval_new() { - return new QMediaTimeInterval(); +void QMediaTimeInterval_new(QMediaTimeInterval** outptr_QMediaTimeInterval) { + QMediaTimeInterval* ret = new QMediaTimeInterval(); + *outptr_QMediaTimeInterval = ret; } -QMediaTimeInterval* QMediaTimeInterval_new2(long long start, long long end) { - return new QMediaTimeInterval(static_cast(start), static_cast(end)); +void QMediaTimeInterval_new2(long long start, long long end, QMediaTimeInterval** outptr_QMediaTimeInterval) { + QMediaTimeInterval* ret = new QMediaTimeInterval(static_cast(start), static_cast(end)); + *outptr_QMediaTimeInterval = ret; } -QMediaTimeInterval* QMediaTimeInterval_new3(QMediaTimeInterval* param1) { - return new QMediaTimeInterval(*param1); +void QMediaTimeInterval_new3(QMediaTimeInterval* param1, QMediaTimeInterval** outptr_QMediaTimeInterval) { + QMediaTimeInterval* ret = new QMediaTimeInterval(*param1); + *outptr_QMediaTimeInterval = ret; } void QMediaTimeInterval_OperatorAssign(QMediaTimeInterval* self, QMediaTimeInterval* param1) { @@ -47,24 +50,32 @@ QMediaTimeInterval* QMediaTimeInterval_Translated(const QMediaTimeInterval* self return new QMediaTimeInterval(self->translated(static_cast(offset))); } -void QMediaTimeInterval_Delete(QMediaTimeInterval* self) { - delete self; +void QMediaTimeInterval_Delete(QMediaTimeInterval* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMediaTimeRange* QMediaTimeRange_new() { - return new QMediaTimeRange(); +void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(); + *outptr_QMediaTimeRange = ret; } -QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end) { - return new QMediaTimeRange(static_cast(start), static_cast(end)); +void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(static_cast(start), static_cast(end)); + *outptr_QMediaTimeRange = ret; } -QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeInterval* param1) { - return new QMediaTimeRange(*param1); +void QMediaTimeRange_new3(QMediaTimeInterval* param1, QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(*param1); + *outptr_QMediaTimeRange = ret; } -QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal) { - return new QMediaTimeRange(*rangeVal); +void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(*rangeVal); + *outptr_QMediaTimeRange = ret; } void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1) { @@ -162,7 +173,11 @@ void QMediaTimeRange_Clear(QMediaTimeRange* self) { self->clear(); } -void QMediaTimeRange_Delete(QMediaTimeRange* self) { - delete self; +void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediatimerange.go b/qt/multimedia/gen_qmediatimerange.go index 2e27667a..754fbf40 100644 --- a/qt/multimedia/gen_qmediatimerange.go +++ b/qt/multimedia/gen_qmediatimerange.go @@ -14,7 +14,8 @@ import ( ) type QMediaTimeInterval struct { - h *C.QMediaTimeInterval + h *C.QMediaTimeInterval + isSubclass bool } func (this *QMediaTimeInterval) cPointer() *C.QMediaTimeInterval { @@ -31,6 +32,7 @@ func (this *QMediaTimeInterval) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaTimeInterval constructs the type using only CGO pointers. func newQMediaTimeInterval(h *C.QMediaTimeInterval) *QMediaTimeInterval { if h == nil { return nil @@ -38,26 +40,43 @@ func newQMediaTimeInterval(h *C.QMediaTimeInterval) *QMediaTimeInterval { return &QMediaTimeInterval{h: h} } +// UnsafeNewQMediaTimeInterval constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeInterval(h unsafe.Pointer) *QMediaTimeInterval { - return newQMediaTimeInterval((*C.QMediaTimeInterval)(h)) + if h == nil { + return nil + } + + return &QMediaTimeInterval{h: (*C.QMediaTimeInterval)(h)} } // NewQMediaTimeInterval constructs a new QMediaTimeInterval object. func NewQMediaTimeInterval() *QMediaTimeInterval { - ret := C.QMediaTimeInterval_new() - return newQMediaTimeInterval(ret) + var outptr_QMediaTimeInterval *C.QMediaTimeInterval = nil + + C.QMediaTimeInterval_new(&outptr_QMediaTimeInterval) + ret := newQMediaTimeInterval(outptr_QMediaTimeInterval) + ret.isSubclass = true + return ret } // NewQMediaTimeInterval2 constructs a new QMediaTimeInterval object. func NewQMediaTimeInterval2(start int64, end int64) *QMediaTimeInterval { - ret := C.QMediaTimeInterval_new2((C.longlong)(start), (C.longlong)(end)) - return newQMediaTimeInterval(ret) + var outptr_QMediaTimeInterval *C.QMediaTimeInterval = nil + + C.QMediaTimeInterval_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeInterval) + ret := newQMediaTimeInterval(outptr_QMediaTimeInterval) + ret.isSubclass = true + return ret } // NewQMediaTimeInterval3 constructs a new QMediaTimeInterval object. func NewQMediaTimeInterval3(param1 *QMediaTimeInterval) *QMediaTimeInterval { - ret := C.QMediaTimeInterval_new3(param1.cPointer()) - return newQMediaTimeInterval(ret) + var outptr_QMediaTimeInterval *C.QMediaTimeInterval = nil + + C.QMediaTimeInterval_new3(param1.cPointer(), &outptr_QMediaTimeInterval) + ret := newQMediaTimeInterval(outptr_QMediaTimeInterval) + ret.isSubclass = true + return ret } func (this *QMediaTimeInterval) OperatorAssign(param1 *QMediaTimeInterval) { @@ -96,7 +115,7 @@ func (this *QMediaTimeInterval) Translated(offset int64) *QMediaTimeInterval { // Delete this object from C++ memory. func (this *QMediaTimeInterval) Delete() { - C.QMediaTimeInterval_Delete(this.h) + C.QMediaTimeInterval_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -109,7 +128,8 @@ func (this *QMediaTimeInterval) GoGC() { } type QMediaTimeRange struct { - h *C.QMediaTimeRange + h *C.QMediaTimeRange + isSubclass bool } func (this *QMediaTimeRange) cPointer() *C.QMediaTimeRange { @@ -126,6 +146,7 @@ func (this *QMediaTimeRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaTimeRange constructs the type using only CGO pointers. func newQMediaTimeRange(h *C.QMediaTimeRange) *QMediaTimeRange { if h == nil { return nil @@ -133,32 +154,53 @@ func newQMediaTimeRange(h *C.QMediaTimeRange) *QMediaTimeRange { return &QMediaTimeRange{h: h} } +// UnsafeNewQMediaTimeRange constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeRange(h unsafe.Pointer) *QMediaTimeRange { - return newQMediaTimeRange((*C.QMediaTimeRange)(h)) + if h == nil { + return nil + } + + return &QMediaTimeRange{h: (*C.QMediaTimeRange)(h)} } // NewQMediaTimeRange constructs a new QMediaTimeRange object. func NewQMediaTimeRange() *QMediaTimeRange { - ret := C.QMediaTimeRange_new() - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new(&outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } // NewQMediaTimeRange2 constructs a new QMediaTimeRange object. func NewQMediaTimeRange2(start int64, end int64) *QMediaTimeRange { - ret := C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end)) - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } // NewQMediaTimeRange3 constructs a new QMediaTimeRange object. func NewQMediaTimeRange3(param1 *QMediaTimeInterval) *QMediaTimeRange { - ret := C.QMediaTimeRange_new3(param1.cPointer()) - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new3(param1.cPointer(), &outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } // NewQMediaTimeRange4 constructs a new QMediaTimeRange object. func NewQMediaTimeRange4(rangeVal *QMediaTimeRange) *QMediaTimeRange { - ret := C.QMediaTimeRange_new4(rangeVal.cPointer()) - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new4(rangeVal.cPointer(), &outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } func (this *QMediaTimeRange) OperatorAssign(param1 *QMediaTimeRange) { @@ -248,7 +290,7 @@ func (this *QMediaTimeRange) Clear() { // Delete this object from C++ memory. func (this *QMediaTimeRange) Delete() { - C.QMediaTimeRange_Delete(this.h) + C.QMediaTimeRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediatimerange.h b/qt/multimedia/gen_qmediatimerange.h index 0c710781..6b25e4f4 100644 --- a/qt/multimedia/gen_qmediatimerange.h +++ b/qt/multimedia/gen_qmediatimerange.h @@ -22,9 +22,9 @@ typedef struct QMediaTimeInterval QMediaTimeInterval; typedef struct QMediaTimeRange QMediaTimeRange; #endif -QMediaTimeInterval* QMediaTimeInterval_new(); -QMediaTimeInterval* QMediaTimeInterval_new2(long long start, long long end); -QMediaTimeInterval* QMediaTimeInterval_new3(QMediaTimeInterval* param1); +void QMediaTimeInterval_new(QMediaTimeInterval** outptr_QMediaTimeInterval); +void QMediaTimeInterval_new2(long long start, long long end, QMediaTimeInterval** outptr_QMediaTimeInterval); +void QMediaTimeInterval_new3(QMediaTimeInterval* param1, QMediaTimeInterval** outptr_QMediaTimeInterval); void QMediaTimeInterval_OperatorAssign(QMediaTimeInterval* self, QMediaTimeInterval* param1); long long QMediaTimeInterval_Start(const QMediaTimeInterval* self); long long QMediaTimeInterval_End(const QMediaTimeInterval* self); @@ -32,12 +32,12 @@ bool QMediaTimeInterval_Contains(const QMediaTimeInterval* self, long long time) bool QMediaTimeInterval_IsNormal(const QMediaTimeInterval* self); QMediaTimeInterval* QMediaTimeInterval_Normalized(const QMediaTimeInterval* self); QMediaTimeInterval* QMediaTimeInterval_Translated(const QMediaTimeInterval* self, long long offset); -void QMediaTimeInterval_Delete(QMediaTimeInterval* self); +void QMediaTimeInterval_Delete(QMediaTimeInterval* self, bool isSubclass); -QMediaTimeRange* QMediaTimeRange_new(); -QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end); -QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeInterval* param1); -QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal); +void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange); +void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange); +void QMediaTimeRange_new3(QMediaTimeInterval* param1, QMediaTimeRange** outptr_QMediaTimeRange); +void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange); void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1); void QMediaTimeRange_OperatorAssignWithQMediaTimeInterval(QMediaTimeRange* self, QMediaTimeInterval* param1); long long QMediaTimeRange_EarliestTime(const QMediaTimeRange* self); @@ -57,7 +57,7 @@ QMediaTimeRange* QMediaTimeRange_OperatorPlusAssignWithQMediaTimeInterval(QMedia QMediaTimeRange* QMediaTimeRange_OperatorMinusAssign(QMediaTimeRange* self, QMediaTimeRange* param1); QMediaTimeRange* QMediaTimeRange_OperatorMinusAssignWithQMediaTimeInterval(QMediaTimeRange* self, QMediaTimeInterval* param1); void QMediaTimeRange_Clear(QMediaTimeRange* self); -void QMediaTimeRange_Delete(QMediaTimeRange* self); +void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmediavideoprobecontrol.cpp b/qt/multimedia/gen_qmediavideoprobecontrol.cpp index 080f0c13..20e72366 100644 --- a/qt/multimedia/gen_qmediavideoprobecontrol.cpp +++ b/qt/multimedia/gen_qmediavideoprobecontrol.cpp @@ -1,5 +1,7 @@ +#include #include #include +#include #include #include #include @@ -105,7 +107,11 @@ struct miqt_string QMediaVideoProbeControl_TrUtf83(const char* s, const char* c, return _ms; } -void QMediaVideoProbeControl_Delete(QMediaVideoProbeControl* self) { - delete self; +void QMediaVideoProbeControl_Delete(QMediaVideoProbeControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmediavideoprobecontrol.go b/qt/multimedia/gen_qmediavideoprobecontrol.go index c8bdf930..665a0322 100644 --- a/qt/multimedia/gen_qmediavideoprobecontrol.go +++ b/qt/multimedia/gen_qmediavideoprobecontrol.go @@ -16,7 +16,8 @@ import ( ) type QMediaVideoProbeControl struct { - h *C.QMediaVideoProbeControl + h *C.QMediaVideoProbeControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMediaVideoProbeControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaVideoProbeControl(h *C.QMediaVideoProbeControl) *QMediaVideoProbeControl { +// newQMediaVideoProbeControl constructs the type using only CGO pointers. +func newQMediaVideoProbeControl(h *C.QMediaVideoProbeControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaVideoProbeControl { if h == nil { return nil } - return &QMediaVideoProbeControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMediaVideoProbeControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMediaVideoProbeControl(h unsafe.Pointer) *QMediaVideoProbeControl { - return newQMediaVideoProbeControl((*C.QMediaVideoProbeControl)(h)) +// UnsafeNewQMediaVideoProbeControl constructs the type using only unsafe pointers. +func UnsafeNewQMediaVideoProbeControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaVideoProbeControl { + if h == nil { + return nil + } + + return &QMediaVideoProbeControl{h: (*C.QMediaVideoProbeControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMediaVideoProbeControl) MetaObject() *qt.QMetaObject { @@ -156,7 +165,7 @@ func QMediaVideoProbeControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMediaVideoProbeControl) Delete() { - C.QMediaVideoProbeControl_Delete(this.h) + C.QMediaVideoProbeControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmediavideoprobecontrol.h b/qt/multimedia/gen_qmediavideoprobecontrol.h index f29084ee..5ed3e54a 100644 --- a/qt/multimedia/gen_qmediavideoprobecontrol.h +++ b/qt/multimedia/gen_qmediavideoprobecontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMediaVideoProbeControl; class QMetaObject; +class QObject; class QVideoFrame; #else +typedef struct QMediaControl QMediaControl; typedef struct QMediaVideoProbeControl QMediaVideoProbeControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVideoFrame QVideoFrame; #endif @@ -36,7 +40,7 @@ struct miqt_string QMediaVideoProbeControl_Tr2(const char* s, const char* c); struct miqt_string QMediaVideoProbeControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMediaVideoProbeControl_TrUtf82(const char* s, const char* c); struct miqt_string QMediaVideoProbeControl_TrUtf83(const char* s, const char* c, int n); -void QMediaVideoProbeControl_Delete(QMediaVideoProbeControl* self); +void QMediaVideoProbeControl_Delete(QMediaVideoProbeControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmetadatareadercontrol.cpp b/qt/multimedia/gen_qmetadatareadercontrol.cpp index 06b88e3e..64637306 100644 --- a/qt/multimedia/gen_qmetadatareadercontrol.cpp +++ b/qt/multimedia/gen_qmetadatareadercontrol.cpp @@ -1,6 +1,8 @@ #include +#include #include #include +#include #include #include #include @@ -155,7 +157,11 @@ struct miqt_string QMetaDataReaderControl_TrUtf83(const char* s, const char* c, return _ms; } -void QMetaDataReaderControl_Delete(QMetaDataReaderControl* self) { - delete self; +void QMetaDataReaderControl_Delete(QMetaDataReaderControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmetadatareadercontrol.go b/qt/multimedia/gen_qmetadatareadercontrol.go index 4e1e51ce..6d0d2db3 100644 --- a/qt/multimedia/gen_qmetadatareadercontrol.go +++ b/qt/multimedia/gen_qmetadatareadercontrol.go @@ -16,7 +16,8 @@ import ( ) type QMetaDataReaderControl struct { - h *C.QMetaDataReaderControl + h *C.QMetaDataReaderControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMetaDataReaderControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMetaDataReaderControl(h *C.QMetaDataReaderControl) *QMetaDataReaderControl { +// newQMetaDataReaderControl constructs the type using only CGO pointers. +func newQMetaDataReaderControl(h *C.QMetaDataReaderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMetaDataReaderControl { if h == nil { return nil } - return &QMetaDataReaderControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMetaDataReaderControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMetaDataReaderControl(h unsafe.Pointer) *QMetaDataReaderControl { - return newQMetaDataReaderControl((*C.QMetaDataReaderControl)(h)) +// UnsafeNewQMetaDataReaderControl constructs the type using only unsafe pointers. +func UnsafeNewQMetaDataReaderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMetaDataReaderControl { + if h == nil { + return nil + } + + return &QMetaDataReaderControl{h: (*C.QMetaDataReaderControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMetaDataReaderControl) MetaObject() *qt.QMetaObject { @@ -212,7 +221,7 @@ func QMetaDataReaderControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMetaDataReaderControl) Delete() { - C.QMetaDataReaderControl_Delete(this.h) + C.QMetaDataReaderControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmetadatareadercontrol.h b/qt/multimedia/gen_qmetadatareadercontrol.h index e690c89d..82946b90 100644 --- a/qt/multimedia/gen_qmetadatareadercontrol.h +++ b/qt/multimedia/gen_qmetadatareadercontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaDataReaderControl; class QMetaObject; +class QObject; class QVariant; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaDataReaderControl QMetaDataReaderControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; #endif @@ -41,7 +45,7 @@ struct miqt_string QMetaDataReaderControl_Tr2(const char* s, const char* c); struct miqt_string QMetaDataReaderControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMetaDataReaderControl_TrUtf82(const char* s, const char* c); struct miqt_string QMetaDataReaderControl_TrUtf83(const char* s, const char* c, int n); -void QMetaDataReaderControl_Delete(QMetaDataReaderControl* self); +void QMetaDataReaderControl_Delete(QMetaDataReaderControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qmetadatawritercontrol.cpp b/qt/multimedia/gen_qmetadatawritercontrol.cpp index 72e06aad..8392f1cc 100644 --- a/qt/multimedia/gen_qmetadatawritercontrol.cpp +++ b/qt/multimedia/gen_qmetadatawritercontrol.cpp @@ -1,6 +1,8 @@ #include +#include #include #include +#include #include #include #include @@ -175,7 +177,11 @@ struct miqt_string QMetaDataWriterControl_TrUtf83(const char* s, const char* c, return _ms; } -void QMetaDataWriterControl_Delete(QMetaDataWriterControl* self) { - delete self; +void QMetaDataWriterControl_Delete(QMetaDataWriterControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qmetadatawritercontrol.go b/qt/multimedia/gen_qmetadatawritercontrol.go index 09e3925a..4801ce4d 100644 --- a/qt/multimedia/gen_qmetadatawritercontrol.go +++ b/qt/multimedia/gen_qmetadatawritercontrol.go @@ -16,7 +16,8 @@ import ( ) type QMetaDataWriterControl struct { - h *C.QMetaDataWriterControl + h *C.QMetaDataWriterControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QMetaDataWriterControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMetaDataWriterControl(h *C.QMetaDataWriterControl) *QMetaDataWriterControl { +// newQMetaDataWriterControl constructs the type using only CGO pointers. +func newQMetaDataWriterControl(h *C.QMetaDataWriterControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMetaDataWriterControl { if h == nil { return nil } - return &QMetaDataWriterControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QMetaDataWriterControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQMetaDataWriterControl(h unsafe.Pointer) *QMetaDataWriterControl { - return newQMetaDataWriterControl((*C.QMetaDataWriterControl)(h)) +// UnsafeNewQMetaDataWriterControl constructs the type using only unsafe pointers. +func UnsafeNewQMetaDataWriterControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMetaDataWriterControl { + if h == nil { + return nil + } + + return &QMetaDataWriterControl{h: (*C.QMetaDataWriterControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QMetaDataWriterControl) MetaObject() *qt.QMetaObject { @@ -244,7 +253,7 @@ func QMetaDataWriterControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QMetaDataWriterControl) Delete() { - C.QMetaDataWriterControl_Delete(this.h) + C.QMetaDataWriterControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qmetadatawritercontrol.h b/qt/multimedia/gen_qmetadatawritercontrol.h index cdbd0aef..2faf2006 100644 --- a/qt/multimedia/gen_qmetadatawritercontrol.h +++ b/qt/multimedia/gen_qmetadatawritercontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaDataWriterControl; class QMetaObject; +class QObject; class QVariant; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaDataWriterControl QMetaDataWriterControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVariant QVariant; #endif @@ -45,7 +49,7 @@ struct miqt_string QMetaDataWriterControl_Tr2(const char* s, const char* c); struct miqt_string QMetaDataWriterControl_Tr3(const char* s, const char* c, int n); struct miqt_string QMetaDataWriterControl_TrUtf82(const char* s, const char* c); struct miqt_string QMetaDataWriterControl_TrUtf83(const char* s, const char* c, int n); -void QMetaDataWriterControl_Delete(QMetaDataWriterControl* self); +void QMetaDataWriterControl_Delete(QMetaDataWriterControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qradiodata.cpp b/qt/multimedia/gen_qradiodata.cpp index 45897bac..7e0e5ed5 100644 --- a/qt/multimedia/gen_qradiodata.cpp +++ b/qt/multimedia/gen_qradiodata.cpp @@ -1,20 +1,257 @@ +#include +#include +#include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qradiodata.h" #include "_cgo_export.h" -QRadioData* QRadioData_new(QMediaObject* mediaObject) { - return new QRadioData(mediaObject); +class MiqtVirtualQRadioData : public virtual QRadioData { +public: + + MiqtVirtualQRadioData(QMediaObject* mediaObject): QRadioData(mediaObject) {}; + MiqtVirtualQRadioData(QMediaObject* mediaObject, QObject* parent): QRadioData(mediaObject, parent) {}; + + virtual ~MiqtVirtualQRadioData() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QRadioData::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QRadioData_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QRadioData::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* mediaObject) override { + if (handle__SetMediaObject == 0) { + return QRadioData::setMediaObject(mediaObject); + } + + QMediaObject* sigval1 = mediaObject; + + bool callback_return_value = miqt_exec_callback_QRadioData_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* mediaObject) { + + return QRadioData::setMediaObject(mediaObject); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QRadioData::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QRadioData_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QRadioData::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QRadioData::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QRadioData_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QRadioData::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QRadioData::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QRadioData_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QRadioData::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QRadioData::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QRadioData_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QRadioData::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QRadioData::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QRadioData_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QRadioData::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QRadioData::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QRadioData_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QRadioData::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QRadioData::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QRadioData_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QRadioData::disconnectNotify(*signal); + + } + +}; + +void QRadioData_new(QMediaObject* mediaObject, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQRadioData* ret = new MiqtVirtualQRadioData(mediaObject); + *outptr_QRadioData = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QRadioData* QRadioData_new2(QMediaObject* mediaObject, QObject* parent) { - return new QRadioData(mediaObject, parent); +void QRadioData_new2(QMediaObject* mediaObject, QObject* parent, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQRadioData* ret = new MiqtVirtualQRadioData(mediaObject, parent); + *outptr_QRadioData = ret; + *outptr_QObject = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QRadioData_MetaObject(const QRadioData* self) { @@ -135,7 +372,7 @@ void QRadioData_StationIdChanged(QRadioData* self, struct miqt_string stationId) } void QRadioData_connect_StationIdChanged(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::stationIdChanged), self, [=](QString stationId) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::stationIdChanged), self, [=](QString stationId) { QString stationId_ret = stationId; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray stationId_b = stationId_ret.toUtf8(); @@ -153,7 +390,7 @@ void QRadioData_ProgramTypeChanged(QRadioData* self, int programType) { } void QRadioData_connect_ProgramTypeChanged(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::programTypeChanged), self, [=](QRadioData::ProgramType programType) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::programTypeChanged), self, [=](QRadioData::ProgramType programType) { QRadioData::ProgramType programType_ret = programType; int sigval1 = static_cast(programType_ret); miqt_exec_callback_QRadioData_ProgramTypeChanged(slot, sigval1); @@ -166,7 +403,7 @@ void QRadioData_ProgramTypeNameChanged(QRadioData* self, struct miqt_string prog } void QRadioData_connect_ProgramTypeNameChanged(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::programTypeNameChanged), self, [=](QString programTypeName) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::programTypeNameChanged), self, [=](QString programTypeName) { QString programTypeName_ret = programTypeName; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray programTypeName_b = programTypeName_ret.toUtf8(); @@ -185,7 +422,7 @@ void QRadioData_StationNameChanged(QRadioData* self, struct miqt_string stationN } void QRadioData_connect_StationNameChanged(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::stationNameChanged), self, [=](QString stationName) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::stationNameChanged), self, [=](QString stationName) { QString stationName_ret = stationName; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray stationName_b = stationName_ret.toUtf8(); @@ -204,7 +441,7 @@ void QRadioData_RadioTextChanged(QRadioData* self, struct miqt_string radioText) } void QRadioData_connect_RadioTextChanged(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::radioTextChanged), self, [=](QString radioText) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::radioTextChanged), self, [=](QString radioText) { QString radioText_ret = radioText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray radioText_b = radioText_ret.toUtf8(); @@ -222,7 +459,7 @@ void QRadioData_AlternativeFrequenciesEnabledChanged(QRadioData* self, bool enab } void QRadioData_connect_AlternativeFrequenciesEnabledChanged(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::alternativeFrequenciesEnabledChanged), self, [=](bool enabled) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::alternativeFrequenciesEnabledChanged), self, [=](bool enabled) { bool sigval1 = enabled; miqt_exec_callback_QRadioData_AlternativeFrequenciesEnabledChanged(slot, sigval1); }); @@ -233,7 +470,7 @@ void QRadioData_ErrorWithError(QRadioData* self, int error) { } void QRadioData_connect_ErrorWithError(QRadioData* self, intptr_t slot) { - QRadioData::connect(self, static_cast(&QRadioData::error), self, [=](QRadioData::Error error) { + MiqtVirtualQRadioData::connect(self, static_cast(&QRadioData::error), self, [=](QRadioData::Error error) { QRadioData::Error error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QRadioData_ErrorWithError(slot, sigval1); @@ -284,7 +521,83 @@ struct miqt_string QRadioData_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QRadioData_Delete(QRadioData* self) { - delete self; +void QRadioData_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QRadioData_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQRadioData*)(self) )->virtualbase_MediaObject(); +} + +void QRadioData_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__SetMediaObject = slot; +} + +bool QRadioData_virtualbase_SetMediaObject(void* self, QMediaObject* mediaObject) { + return ( (MiqtVirtualQRadioData*)(self) )->virtualbase_SetMediaObject(mediaObject); +} + +void QRadioData_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__Event = slot; +} + +bool QRadioData_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQRadioData*)(self) )->virtualbase_Event(event); +} + +void QRadioData_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__EventFilter = slot; +} + +bool QRadioData_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQRadioData*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QRadioData_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__TimerEvent = slot; +} + +void QRadioData_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQRadioData*)(self) )->virtualbase_TimerEvent(event); +} + +void QRadioData_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__ChildEvent = slot; +} + +void QRadioData_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQRadioData*)(self) )->virtualbase_ChildEvent(event); +} + +void QRadioData_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__CustomEvent = slot; +} + +void QRadioData_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQRadioData*)(self) )->virtualbase_CustomEvent(event); +} + +void QRadioData_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__ConnectNotify = slot; +} + +void QRadioData_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQRadioData*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QRadioData_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QRadioData*)(self) )->handle__DisconnectNotify = slot; +} + +void QRadioData_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQRadioData*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QRadioData_Delete(QRadioData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qradiodata.go b/qt/multimedia/gen_qradiodata.go index 7caa63a3..f5915efe 100644 --- a/qt/multimedia/gen_qradiodata.go +++ b/qt/multimedia/gen_qradiodata.go @@ -78,7 +78,8 @@ const ( ) type QRadioData struct { - h *C.QRadioData + h *C.QRadioData + isSubclass bool *qt.QObject *QMediaBindableInterface } @@ -97,27 +98,49 @@ func (this *QRadioData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadioData(h *C.QRadioData) *QRadioData { +// newQRadioData constructs the type using only CGO pointers. +func newQRadioData(h *C.QRadioData, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QRadioData { if h == nil { return nil } - return &QRadioData{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h)), QMediaBindableInterface: UnsafeNewQMediaBindableInterface(unsafe.Pointer(h))} + return &QRadioData{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} } -func UnsafeNewQRadioData(h unsafe.Pointer) *QRadioData { - return newQRadioData((*C.QRadioData)(h)) +// UnsafeNewQRadioData constructs the type using only unsafe pointers. +func UnsafeNewQRadioData(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QRadioData { + if h == nil { + return nil + } + + return &QRadioData{h: (*C.QRadioData)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} } // NewQRadioData constructs a new QRadioData object. func NewQRadioData(mediaObject *QMediaObject) *QRadioData { - ret := C.QRadioData_new(mediaObject.cPointer()) - return newQRadioData(ret) + var outptr_QRadioData *C.QRadioData = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QRadioData_new(mediaObject.cPointer(), &outptr_QRadioData, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQRadioData(outptr_QRadioData, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQRadioData2 constructs a new QRadioData object. func NewQRadioData2(mediaObject *QMediaObject, parent *qt.QObject) *QRadioData { - ret := C.QRadioData_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQRadioData(ret) + var outptr_QRadioData *C.QRadioData = nil + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QRadioData_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QRadioData, &outptr_QObject, &outptr_QMediaBindableInterface) + ret := newQRadioData(outptr_QRadioData, outptr_QObject, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QRadioData) MetaObject() *qt.QMetaObject { @@ -153,7 +176,7 @@ func (this *QRadioData) Availability() QMultimedia__AvailabilityStatus { } func (this *QRadioData) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QRadioData_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QRadioData_MediaObject(this.h)), nil) } func (this *QRadioData) StationId() string { @@ -419,9 +442,221 @@ func QRadioData_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QRadioData) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QRadioData_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QRadioData) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QRadioData_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_MediaObject +func miqt_exec_callback_QRadioData_MediaObject(self *C.QRadioData, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioData{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QRadioData) callVirtualBase_SetMediaObject(mediaObject *QMediaObject) bool { + + return (bool)(C.QRadioData_virtualbase_SetMediaObject(unsafe.Pointer(this.h), mediaObject.cPointer())) + +} +func (this *QRadioData) OnSetMediaObject(slot func(super func(mediaObject *QMediaObject) bool, mediaObject *QMediaObject) bool) { + C.QRadioData_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_SetMediaObject +func miqt_exec_callback_QRadioData_SetMediaObject(self *C.QRadioData, cb C.intptr_t, mediaObject *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mediaObject *QMediaObject) bool, mediaObject *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(mediaObject), nil) + + virtualReturn := gofunc((&QRadioData{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioData) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QRadioData_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QRadioData) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QRadioData_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_Event +func miqt_exec_callback_QRadioData_Event(self *C.QRadioData, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QRadioData{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioData) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QRadioData_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QRadioData) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QRadioData_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_EventFilter +func miqt_exec_callback_QRadioData_EventFilter(self *C.QRadioData, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QRadioData{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioData) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QRadioData_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QRadioData) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QRadioData_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_TimerEvent +func miqt_exec_callback_QRadioData_TimerEvent(self *C.QRadioData, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QRadioData{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QRadioData) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QRadioData_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QRadioData) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QRadioData_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_ChildEvent +func miqt_exec_callback_QRadioData_ChildEvent(self *C.QRadioData, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QRadioData{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QRadioData) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QRadioData_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QRadioData) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QRadioData_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_CustomEvent +func miqt_exec_callback_QRadioData_CustomEvent(self *C.QRadioData, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QRadioData{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QRadioData) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QRadioData_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QRadioData) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QRadioData_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_ConnectNotify +func miqt_exec_callback_QRadioData_ConnectNotify(self *C.QRadioData, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QRadioData{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QRadioData) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QRadioData_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QRadioData) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QRadioData_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioData_DisconnectNotify +func miqt_exec_callback_QRadioData_DisconnectNotify(self *C.QRadioData, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QRadioData{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QRadioData) Delete() { - C.QRadioData_Delete(this.h) + C.QRadioData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qradiodata.h b/qt/multimedia/gen_qradiodata.h index 20419de1..d1549cac 100644 --- a/qt/multimedia/gen_qradiodata.h +++ b/qt/multimedia/gen_qradiodata.h @@ -15,19 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMediaBindableInterface; class QMediaObject; +class QMetaMethod; class QMetaObject; class QObject; class QRadioData; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaObject QMediaObject; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRadioData QRadioData; +typedef struct QTimerEvent QTimerEvent; #endif -QRadioData* QRadioData_new(QMediaObject* mediaObject); -QRadioData* QRadioData_new2(QMediaObject* mediaObject, QObject* parent); +void QRadioData_new(QMediaObject* mediaObject, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QRadioData_new2(QMediaObject* mediaObject, QObject* parent, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QRadioData_MetaObject(const QRadioData* self); void* QRadioData_Metacast(QRadioData* self, const char* param1); struct miqt_string QRadioData_Tr(const char* s); @@ -57,11 +67,30 @@ void QRadioData_AlternativeFrequenciesEnabledChanged(QRadioData* self, bool enab void QRadioData_connect_AlternativeFrequenciesEnabledChanged(QRadioData* self, intptr_t slot); void QRadioData_ErrorWithError(QRadioData* self, int error); void QRadioData_connect_ErrorWithError(QRadioData* self, intptr_t slot); +bool QRadioData_SetMediaObject(QRadioData* self, QMediaObject* mediaObject); struct miqt_string QRadioData_Tr2(const char* s, const char* c); struct miqt_string QRadioData_Tr3(const char* s, const char* c, int n); struct miqt_string QRadioData_TrUtf82(const char* s, const char* c); struct miqt_string QRadioData_TrUtf83(const char* s, const char* c, int n); -void QRadioData_Delete(QRadioData* self); +void QRadioData_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QRadioData_virtualbase_MediaObject(const void* self); +void QRadioData_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QRadioData_virtualbase_SetMediaObject(void* self, QMediaObject* mediaObject); +void QRadioData_override_virtual_Event(void* self, intptr_t slot); +bool QRadioData_virtualbase_Event(void* self, QEvent* event); +void QRadioData_override_virtual_EventFilter(void* self, intptr_t slot); +bool QRadioData_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QRadioData_override_virtual_TimerEvent(void* self, intptr_t slot); +void QRadioData_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QRadioData_override_virtual_ChildEvent(void* self, intptr_t slot); +void QRadioData_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QRadioData_override_virtual_CustomEvent(void* self, intptr_t slot); +void QRadioData_virtualbase_CustomEvent(void* self, QEvent* event); +void QRadioData_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QRadioData_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QRadioData_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QRadioData_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QRadioData_Delete(QRadioData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qradiodatacontrol.cpp b/qt/multimedia/gen_qradiodatacontrol.cpp index f8bc15b5..172284e4 100644 --- a/qt/multimedia/gen_qradiodatacontrol.cpp +++ b/qt/multimedia/gen_qradiodatacontrol.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -265,7 +267,11 @@ struct miqt_string QRadioDataControl_TrUtf83(const char* s, const char* c, int n return _ms; } -void QRadioDataControl_Delete(QRadioDataControl* self) { - delete self; +void QRadioDataControl_Delete(QRadioDataControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qradiodatacontrol.go b/qt/multimedia/gen_qradiodatacontrol.go index 56b39724..43de812e 100644 --- a/qt/multimedia/gen_qradiodatacontrol.go +++ b/qt/multimedia/gen_qradiodatacontrol.go @@ -16,7 +16,8 @@ import ( ) type QRadioDataControl struct { - h *C.QRadioDataControl + h *C.QRadioDataControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QRadioDataControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadioDataControl(h *C.QRadioDataControl) *QRadioDataControl { +// newQRadioDataControl constructs the type using only CGO pointers. +func newQRadioDataControl(h *C.QRadioDataControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QRadioDataControl { if h == nil { return nil } - return &QRadioDataControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QRadioDataControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQRadioDataControl(h unsafe.Pointer) *QRadioDataControl { - return newQRadioDataControl((*C.QRadioDataControl)(h)) +// UnsafeNewQRadioDataControl constructs the type using only unsafe pointers. +func UnsafeNewQRadioDataControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QRadioDataControl { + if h == nil { + return nil + } + + return &QRadioDataControl{h: (*C.QRadioDataControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QRadioDataControl) MetaObject() *qt.QMetaObject { @@ -338,7 +347,7 @@ func QRadioDataControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QRadioDataControl) Delete() { - C.QRadioDataControl_Delete(this.h) + C.QRadioDataControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qradiodatacontrol.h b/qt/multimedia/gen_qradiodatacontrol.h index 50024dcf..a8729f9a 100644 --- a/qt/multimedia/gen_qradiodatacontrol.h +++ b/qt/multimedia/gen_qradiodatacontrol.h @@ -15,10 +15,14 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaObject; +class QObject; class QRadioDataControl; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRadioDataControl QRadioDataControl; #endif @@ -53,7 +57,7 @@ struct miqt_string QRadioDataControl_Tr2(const char* s, const char* c); struct miqt_string QRadioDataControl_Tr3(const char* s, const char* c, int n); struct miqt_string QRadioDataControl_TrUtf82(const char* s, const char* c); struct miqt_string QRadioDataControl_TrUtf83(const char* s, const char* c, int n); -void QRadioDataControl_Delete(QRadioDataControl* self); +void QRadioDataControl_Delete(QRadioDataControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qradiotuner.cpp b/qt/multimedia/gen_qradiotuner.cpp index 250c30f8..bc728801 100644 --- a/qt/multimedia/gen_qradiotuner.cpp +++ b/qt/multimedia/gen_qradiotuner.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -9,12 +11,142 @@ #include "gen_qradiotuner.h" #include "_cgo_export.h" -QRadioTuner* QRadioTuner_new() { - return new QRadioTuner(); +class MiqtVirtualQRadioTuner : public virtual QRadioTuner { +public: + + MiqtVirtualQRadioTuner(): QRadioTuner() {}; + MiqtVirtualQRadioTuner(QObject* parent): QRadioTuner(parent) {}; + + virtual ~MiqtVirtualQRadioTuner() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Availability = 0; + + // Subclass to allow providing a Go implementation + virtual QMultimedia::AvailabilityStatus availability() const override { + if (handle__Availability == 0) { + return QRadioTuner::availability(); + } + + + int callback_return_value = miqt_exec_callback_QRadioTuner_Availability(const_cast(this), handle__Availability); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Availability() const { + + QMultimedia::AvailabilityStatus _ret = QRadioTuner::availability(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual bool isAvailable() const override { + if (handle__IsAvailable == 0) { + return QRadioTuner::isAvailable(); + } + + + bool callback_return_value = miqt_exec_callback_QRadioTuner_IsAvailable(const_cast(this), handle__IsAvailable); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsAvailable() const { + + return QRadioTuner::isAvailable(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Service = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaService* service() const override { + if (handle__Service == 0) { + return QRadioTuner::service(); + } + + + QMediaService* callback_return_value = miqt_exec_callback_QRadioTuner_Service(const_cast(this), handle__Service); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaService* virtualbase_Service() const { + + return QRadioTuner::service(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(QObject* param1) override { + if (handle__Bind == 0) { + return QRadioTuner::bind(param1); + } + + QObject* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QRadioTuner_Bind(this, handle__Bind, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QObject* param1) { + + return QRadioTuner::bind(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unbind = 0; + + // Subclass to allow providing a Go implementation + virtual void unbind(QObject* param1) override { + if (handle__Unbind == 0) { + QRadioTuner::unbind(param1); + return; + } + + QObject* sigval1 = param1; + + miqt_exec_callback_QRadioTuner_Unbind(this, handle__Unbind, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unbind(QObject* param1) { + + QRadioTuner::unbind(param1); + + } + +}; + +void QRadioTuner_new(QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQRadioTuner* ret = new MiqtVirtualQRadioTuner(); + *outptr_QRadioTuner = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRadioTuner* QRadioTuner_new2(QObject* parent) { - return new QRadioTuner(parent); +void QRadioTuner_new2(QObject* parent, QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { + MiqtVirtualQRadioTuner* ret = new MiqtVirtualQRadioTuner(parent); + *outptr_QRadioTuner = ret; + *outptr_QMediaObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QRadioTuner_MetaObject(const QRadioTuner* self) { @@ -186,7 +318,7 @@ void QRadioTuner_StateChanged(QRadioTuner* self, int state) { } void QRadioTuner_connect_StateChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::stateChanged), self, [=](QRadioTuner::State state) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::stateChanged), self, [=](QRadioTuner::State state) { QRadioTuner::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QRadioTuner_StateChanged(slot, sigval1); @@ -198,7 +330,7 @@ void QRadioTuner_BandChanged(QRadioTuner* self, int band) { } void QRadioTuner_connect_BandChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::bandChanged), self, [=](QRadioTuner::Band band) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::bandChanged), self, [=](QRadioTuner::Band band) { QRadioTuner::Band band_ret = band; int sigval1 = static_cast(band_ret); miqt_exec_callback_QRadioTuner_BandChanged(slot, sigval1); @@ -210,7 +342,7 @@ void QRadioTuner_FrequencyChanged(QRadioTuner* self, int frequency) { } void QRadioTuner_connect_FrequencyChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::frequencyChanged), self, [=](int frequency) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::frequencyChanged), self, [=](int frequency) { int sigval1 = frequency; miqt_exec_callback_QRadioTuner_FrequencyChanged(slot, sigval1); }); @@ -221,7 +353,7 @@ void QRadioTuner_StereoStatusChanged(QRadioTuner* self, bool stereo) { } void QRadioTuner_connect_StereoStatusChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::stereoStatusChanged), self, [=](bool stereo) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::stereoStatusChanged), self, [=](bool stereo) { bool sigval1 = stereo; miqt_exec_callback_QRadioTuner_StereoStatusChanged(slot, sigval1); }); @@ -232,7 +364,7 @@ void QRadioTuner_SearchingChanged(QRadioTuner* self, bool searching) { } void QRadioTuner_connect_SearchingChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::searchingChanged), self, [=](bool searching) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::searchingChanged), self, [=](bool searching) { bool sigval1 = searching; miqt_exec_callback_QRadioTuner_SearchingChanged(slot, sigval1); }); @@ -243,7 +375,7 @@ void QRadioTuner_SignalStrengthChanged(QRadioTuner* self, int signalStrength) { } void QRadioTuner_connect_SignalStrengthChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::signalStrengthChanged), self, [=](int signalStrength) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::signalStrengthChanged), self, [=](int signalStrength) { int sigval1 = signalStrength; miqt_exec_callback_QRadioTuner_SignalStrengthChanged(slot, sigval1); }); @@ -254,7 +386,7 @@ void QRadioTuner_VolumeChanged(QRadioTuner* self, int volume) { } void QRadioTuner_connect_VolumeChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::volumeChanged), self, [=](int volume) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::volumeChanged), self, [=](int volume) { int sigval1 = volume; miqt_exec_callback_QRadioTuner_VolumeChanged(slot, sigval1); }); @@ -265,7 +397,7 @@ void QRadioTuner_MutedChanged(QRadioTuner* self, bool muted) { } void QRadioTuner_connect_MutedChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::mutedChanged), self, [=](bool muted) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::mutedChanged), self, [=](bool muted) { bool sigval1 = muted; miqt_exec_callback_QRadioTuner_MutedChanged(slot, sigval1); }); @@ -277,7 +409,7 @@ void QRadioTuner_StationFound(QRadioTuner* self, int frequency, struct miqt_stri } void QRadioTuner_connect_StationFound(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::stationFound), self, [=](int frequency, QString stationId) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::stationFound), self, [=](int frequency, QString stationId) { int sigval1 = frequency; QString stationId_ret = stationId; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory @@ -296,7 +428,7 @@ void QRadioTuner_AntennaConnectedChanged(QRadioTuner* self, bool connectionStatu } void QRadioTuner_connect_AntennaConnectedChanged(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::antennaConnectedChanged), self, [=](bool connectionStatus) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::antennaConnectedChanged), self, [=](bool connectionStatus) { bool sigval1 = connectionStatus; miqt_exec_callback_QRadioTuner_AntennaConnectedChanged(slot, sigval1); }); @@ -307,7 +439,7 @@ void QRadioTuner_ErrorWithError(QRadioTuner* self, int error) { } void QRadioTuner_connect_ErrorWithError(QRadioTuner* self, intptr_t slot) { - QRadioTuner::connect(self, static_cast(&QRadioTuner::error), self, [=](QRadioTuner::Error error) { + MiqtVirtualQRadioTuner::connect(self, static_cast(&QRadioTuner::error), self, [=](QRadioTuner::Error error) { QRadioTuner::Error error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QRadioTuner_ErrorWithError(slot, sigval1); @@ -362,7 +494,51 @@ void QRadioTuner_SearchAllStations1(QRadioTuner* self, int searchMode) { self->searchAllStations(static_cast(searchMode)); } -void QRadioTuner_Delete(QRadioTuner* self) { - delete self; +void QRadioTuner_override_virtual_Availability(void* self, intptr_t slot) { + dynamic_cast( (QRadioTuner*)(self) )->handle__Availability = slot; +} + +int QRadioTuner_virtualbase_Availability(const void* self) { + return ( (const MiqtVirtualQRadioTuner*)(self) )->virtualbase_Availability(); +} + +void QRadioTuner_override_virtual_IsAvailable(void* self, intptr_t slot) { + dynamic_cast( (QRadioTuner*)(self) )->handle__IsAvailable = slot; +} + +bool QRadioTuner_virtualbase_IsAvailable(const void* self) { + return ( (const MiqtVirtualQRadioTuner*)(self) )->virtualbase_IsAvailable(); +} + +void QRadioTuner_override_virtual_Service(void* self, intptr_t slot) { + dynamic_cast( (QRadioTuner*)(self) )->handle__Service = slot; +} + +QMediaService* QRadioTuner_virtualbase_Service(const void* self) { + return ( (const MiqtVirtualQRadioTuner*)(self) )->virtualbase_Service(); +} + +void QRadioTuner_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QRadioTuner*)(self) )->handle__Bind = slot; +} + +bool QRadioTuner_virtualbase_Bind(void* self, QObject* param1) { + return ( (MiqtVirtualQRadioTuner*)(self) )->virtualbase_Bind(param1); +} + +void QRadioTuner_override_virtual_Unbind(void* self, intptr_t slot) { + dynamic_cast( (QRadioTuner*)(self) )->handle__Unbind = slot; +} + +void QRadioTuner_virtualbase_Unbind(void* self, QObject* param1) { + ( (MiqtVirtualQRadioTuner*)(self) )->virtualbase_Unbind(param1); +} + +void QRadioTuner_Delete(QRadioTuner* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qradiotuner.go b/qt/multimedia/gen_qradiotuner.go index d9af12b1..dee48a9d 100644 --- a/qt/multimedia/gen_qradiotuner.go +++ b/qt/multimedia/gen_qradiotuner.go @@ -57,7 +57,8 @@ const ( ) type QRadioTuner struct { - h *C.QRadioTuner + h *C.QRadioTuner + isSubclass bool *QMediaObject } @@ -75,27 +76,47 @@ func (this *QRadioTuner) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadioTuner(h *C.QRadioTuner) *QRadioTuner { +// newQRadioTuner constructs the type using only CGO pointers. +func newQRadioTuner(h *C.QRadioTuner, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QRadioTuner { if h == nil { return nil } - return &QRadioTuner{h: h, QMediaObject: UnsafeNewQMediaObject(unsafe.Pointer(h))} + return &QRadioTuner{h: h, + QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} } -func UnsafeNewQRadioTuner(h unsafe.Pointer) *QRadioTuner { - return newQRadioTuner((*C.QRadioTuner)(h)) +// UnsafeNewQRadioTuner constructs the type using only unsafe pointers. +func UnsafeNewQRadioTuner(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QRadioTuner { + if h == nil { + return nil + } + + return &QRadioTuner{h: (*C.QRadioTuner)(h), + QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} } // NewQRadioTuner constructs a new QRadioTuner object. func NewQRadioTuner() *QRadioTuner { - ret := C.QRadioTuner_new() - return newQRadioTuner(ret) + var outptr_QRadioTuner *C.QRadioTuner = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QRadioTuner_new(&outptr_QRadioTuner, &outptr_QMediaObject, &outptr_QObject) + ret := newQRadioTuner(outptr_QRadioTuner, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRadioTuner2 constructs a new QRadioTuner object. func NewQRadioTuner2(parent *qt.QObject) *QRadioTuner { - ret := C.QRadioTuner_new2((*C.QObject)(parent.UnsafePointer())) - return newQRadioTuner(ret) + var outptr_QRadioTuner *C.QRadioTuner = nil + var outptr_QMediaObject *C.QMediaObject = nil + var outptr_QObject *C.QObject = nil + + C.QRadioTuner_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QRadioTuner, &outptr_QMediaObject, &outptr_QObject) + ret := newQRadioTuner(outptr_QRadioTuner, outptr_QMediaObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QRadioTuner) MetaObject() *qt.QMetaObject { @@ -211,7 +232,7 @@ func (this *QRadioTuner) ErrorString() string { } func (this *QRadioTuner) RadioData() *QRadioData { - return UnsafeNewQRadioData(unsafe.Pointer(C.QRadioTuner_RadioData(this.h))) + return UnsafeNewQRadioData(unsafe.Pointer(C.QRadioTuner_RadioData(this.h)), nil, nil) } func (this *QRadioTuner) SearchForward() { @@ -531,9 +552,122 @@ func (this *QRadioTuner) SearchAllStations1(searchMode QRadioTuner__SearchMode) C.QRadioTuner_SearchAllStations1(this.h, (C.int)(searchMode)) } +func (this *QRadioTuner) callVirtualBase_Availability() QMultimedia__AvailabilityStatus { + + return (QMultimedia__AvailabilityStatus)(C.QRadioTuner_virtualbase_Availability(unsafe.Pointer(this.h))) + +} +func (this *QRadioTuner) OnAvailability(slot func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) { + C.QRadioTuner_override_virtual_Availability(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioTuner_Availability +func miqt_exec_callback_QRadioTuner_Availability(self *C.QRadioTuner, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QMultimedia__AvailabilityStatus) QMultimedia__AvailabilityStatus) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Availability) + + return (C.int)(virtualReturn) + +} + +func (this *QRadioTuner) callVirtualBase_IsAvailable() bool { + + return (bool)(C.QRadioTuner_virtualbase_IsAvailable(unsafe.Pointer(this.h))) + +} +func (this *QRadioTuner) OnIsAvailable(slot func(super func() bool) bool) { + C.QRadioTuner_override_virtual_IsAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioTuner_IsAvailable +func miqt_exec_callback_QRadioTuner_IsAvailable(self *C.QRadioTuner, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_IsAvailable) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioTuner) callVirtualBase_Service() *QMediaService { + + return UnsafeNewQMediaService(unsafe.Pointer(C.QRadioTuner_virtualbase_Service(unsafe.Pointer(this.h))), nil) +} +func (this *QRadioTuner) OnService(slot func(super func() *QMediaService) *QMediaService) { + C.QRadioTuner_override_virtual_Service(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioTuner_Service +func miqt_exec_callback_QRadioTuner_Service(self *C.QRadioTuner, cb C.intptr_t) *C.QMediaService { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaService) *QMediaService) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Service) + + return virtualReturn.cPointer() + +} + +func (this *QRadioTuner) callVirtualBase_Bind(param1 *qt.QObject) bool { + + return (bool)(C.QRadioTuner_virtualbase_Bind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()))) + +} +func (this *QRadioTuner) OnBind(slot func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) { + C.QRadioTuner_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioTuner_Bind +func miqt_exec_callback_QRadioTuner_Bind(self *C.QRadioTuner, cb C.intptr_t, param1 *C.QObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject) bool, param1 *qt.QObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QRadioTuner{h: self}).callVirtualBase_Bind, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioTuner) callVirtualBase_Unbind(param1 *qt.QObject) { + + C.QRadioTuner_virtualbase_Unbind(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer())) + +} +func (this *QRadioTuner) OnUnbind(slot func(super func(param1 *qt.QObject), param1 *qt.QObject)) { + C.QRadioTuner_override_virtual_Unbind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioTuner_Unbind +func miqt_exec_callback_QRadioTuner_Unbind(self *C.QRadioTuner, cb C.intptr_t, param1 *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject), param1 *qt.QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + gofunc((&QRadioTuner{h: self}).callVirtualBase_Unbind, slotval1) + +} + // Delete this object from C++ memory. func (this *QRadioTuner) Delete() { - C.QRadioTuner_Delete(this.h) + C.QRadioTuner_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qradiotuner.h b/qt/multimedia/gen_qradiotuner.h index 7296db29..93e41ea6 100644 --- a/qt/multimedia/gen_qradiotuner.h +++ b/qt/multimedia/gen_qradiotuner.h @@ -15,19 +15,23 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaObject; +class QMediaService; class QMetaObject; class QObject; class QRadioData; class QRadioTuner; #else +typedef struct QMediaObject QMediaObject; +typedef struct QMediaService QMediaService; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRadioData QRadioData; typedef struct QRadioTuner QRadioTuner; #endif -QRadioTuner* QRadioTuner_new(); -QRadioTuner* QRadioTuner_new2(QObject* parent); +void QRadioTuner_new(QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +void QRadioTuner_new2(QObject* parent, QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); QMetaObject* QRadioTuner_MetaObject(const QRadioTuner* self); void* QRadioTuner_Metacast(QRadioTuner* self, const char* param1); struct miqt_string QRadioTuner_Tr(const char* s); @@ -87,7 +91,17 @@ struct miqt_string QRadioTuner_Tr3(const char* s, const char* c, int n); struct miqt_string QRadioTuner_TrUtf82(const char* s, const char* c); struct miqt_string QRadioTuner_TrUtf83(const char* s, const char* c, int n); void QRadioTuner_SearchAllStations1(QRadioTuner* self, int searchMode); -void QRadioTuner_Delete(QRadioTuner* self); +void QRadioTuner_override_virtual_Availability(void* self, intptr_t slot); +int QRadioTuner_virtualbase_Availability(const void* self); +void QRadioTuner_override_virtual_IsAvailable(void* self, intptr_t slot); +bool QRadioTuner_virtualbase_IsAvailable(const void* self); +void QRadioTuner_override_virtual_Service(void* self, intptr_t slot); +QMediaService* QRadioTuner_virtualbase_Service(const void* self); +void QRadioTuner_override_virtual_Bind(void* self, intptr_t slot); +bool QRadioTuner_virtualbase_Bind(void* self, QObject* param1); +void QRadioTuner_override_virtual_Unbind(void* self, intptr_t slot); +void QRadioTuner_virtualbase_Unbind(void* self, QObject* param1); +void QRadioTuner_Delete(QRadioTuner* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qradiotunercontrol.cpp b/qt/multimedia/gen_qradiotunercontrol.cpp index 6638a3cd..f1e91eda 100644 --- a/qt/multimedia/gen_qradiotunercontrol.cpp +++ b/qt/multimedia/gen_qradiotunercontrol.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -130,8 +132,8 @@ void QRadioTunerControl_SearchBackward(QRadioTunerControl* self) { self->searchBackward(); } -void QRadioTunerControl_SearchAllStations(QRadioTunerControl* self) { - self->searchAllStations(); +void QRadioTunerControl_SearchAllStations(QRadioTunerControl* self, int searchMode) { + self->searchAllStations(static_cast(searchMode)); } void QRadioTunerControl_CancelSearch(QRadioTunerControl* self) { @@ -339,11 +341,11 @@ struct miqt_string QRadioTunerControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QRadioTunerControl_SearchAllStations1(QRadioTunerControl* self, int searchMode) { - self->searchAllStations(static_cast(searchMode)); -} - -void QRadioTunerControl_Delete(QRadioTunerControl* self) { - delete self; +void QRadioTunerControl_Delete(QRadioTunerControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qradiotunercontrol.go b/qt/multimedia/gen_qradiotunercontrol.go index 0ec74df2..650482f8 100644 --- a/qt/multimedia/gen_qradiotunercontrol.go +++ b/qt/multimedia/gen_qradiotunercontrol.go @@ -16,7 +16,8 @@ import ( ) type QRadioTunerControl struct { - h *C.QRadioTunerControl + h *C.QRadioTunerControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QRadioTunerControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadioTunerControl(h *C.QRadioTunerControl) *QRadioTunerControl { +// newQRadioTunerControl constructs the type using only CGO pointers. +func newQRadioTunerControl(h *C.QRadioTunerControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QRadioTunerControl { if h == nil { return nil } - return &QRadioTunerControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QRadioTunerControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQRadioTunerControl(h unsafe.Pointer) *QRadioTunerControl { - return newQRadioTunerControl((*C.QRadioTunerControl)(h)) +// UnsafeNewQRadioTunerControl constructs the type using only unsafe pointers. +func UnsafeNewQRadioTunerControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QRadioTunerControl { + if h == nil { + return nil + } + + return &QRadioTunerControl{h: (*C.QRadioTunerControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QRadioTunerControl) MetaObject() *qt.QMetaObject { @@ -166,8 +175,8 @@ func (this *QRadioTunerControl) SearchBackward() { C.QRadioTunerControl_SearchBackward(this.h) } -func (this *QRadioTunerControl) SearchAllStations() { - C.QRadioTunerControl_SearchAllStations(this.h) +func (this *QRadioTunerControl) SearchAllStations(searchMode QRadioTuner__SearchMode) { + C.QRadioTunerControl_SearchAllStations(this.h, (C.int)(searchMode)) } func (this *QRadioTunerControl) CancelSearch() { @@ -466,13 +475,9 @@ func QRadioTunerControl_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QRadioTunerControl) SearchAllStations1(searchMode QRadioTuner__SearchMode) { - C.QRadioTunerControl_SearchAllStations1(this.h, (C.int)(searchMode)) -} - // Delete this object from C++ memory. func (this *QRadioTunerControl) Delete() { - C.QRadioTunerControl_Delete(this.h) + C.QRadioTunerControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qradiotunercontrol.h b/qt/multimedia/gen_qradiotunercontrol.h index a23afd1d..a0d99f69 100644 --- a/qt/multimedia/gen_qradiotunercontrol.h +++ b/qt/multimedia/gen_qradiotunercontrol.h @@ -15,10 +15,14 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaObject; +class QObject; class QRadioTunerControl; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRadioTunerControl QRadioTunerControl; #endif @@ -46,7 +50,7 @@ bool QRadioTunerControl_IsSearching(const QRadioTunerControl* self); bool QRadioTunerControl_IsAntennaConnected(const QRadioTunerControl* self); void QRadioTunerControl_SearchForward(QRadioTunerControl* self); void QRadioTunerControl_SearchBackward(QRadioTunerControl* self); -void QRadioTunerControl_SearchAllStations(QRadioTunerControl* self); +void QRadioTunerControl_SearchAllStations(QRadioTunerControl* self, int searchMode); void QRadioTunerControl_CancelSearch(QRadioTunerControl* self); void QRadioTunerControl_Start(QRadioTunerControl* self); void QRadioTunerControl_Stop(QRadioTunerControl* self); @@ -78,8 +82,7 @@ struct miqt_string QRadioTunerControl_Tr2(const char* s, const char* c); struct miqt_string QRadioTunerControl_Tr3(const char* s, const char* c, int n); struct miqt_string QRadioTunerControl_TrUtf82(const char* s, const char* c); struct miqt_string QRadioTunerControl_TrUtf83(const char* s, const char* c, int n); -void QRadioTunerControl_SearchAllStations1(QRadioTunerControl* self, int searchMode); -void QRadioTunerControl_Delete(QRadioTunerControl* self); +void QRadioTunerControl_Delete(QRadioTunerControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qsound.cpp b/qt/multimedia/gen_qsound.cpp index 6b4a2ec6..f234306a 100644 --- a/qt/multimedia/gen_qsound.cpp +++ b/qt/multimedia/gen_qsound.cpp @@ -1,21 +1,210 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qsound.h" #include "_cgo_export.h" -QSound* QSound_new(struct miqt_string filename) { +class MiqtVirtualQSound : public virtual QSound { +public: + + MiqtVirtualQSound(const QString& filename): QSound(filename) {}; + MiqtVirtualQSound(const QString& filename, QObject* parent): QSound(filename, parent) {}; + + virtual ~MiqtVirtualQSound() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSound::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSound_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSound::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSound::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSound_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSound::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSound::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSound_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSound::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSound::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSound_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSound::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSound::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSound_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSound::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSound::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSound_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSound::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSound::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSound_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSound::disconnectNotify(*signal); + + } + +}; + +void QSound_new(struct miqt_string filename, QSound** outptr_QSound, QObject** outptr_QObject) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - return new QSound(filename_QString); + MiqtVirtualQSound* ret = new MiqtVirtualQSound(filename_QString); + *outptr_QSound = ret; + *outptr_QObject = static_cast(ret); } -QSound* QSound_new2(struct miqt_string filename, QObject* parent) { +void QSound_new2(struct miqt_string filename, QObject* parent, QSound** outptr_QSound, QObject** outptr_QObject) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - return new QSound(filename_QString, parent); + MiqtVirtualQSound* ret = new MiqtVirtualQSound(filename_QString, parent); + *outptr_QSound = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSound_MetaObject(const QSound* self) { @@ -132,7 +321,67 @@ struct miqt_string QSound_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSound_Delete(QSound* self) { - delete self; +void QSound_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__Event = slot; +} + +bool QSound_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSound*)(self) )->virtualbase_Event(event); +} + +void QSound_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__EventFilter = slot; +} + +bool QSound_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSound*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSound_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__TimerEvent = slot; +} + +void QSound_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSound*)(self) )->virtualbase_TimerEvent(event); +} + +void QSound_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__ChildEvent = slot; +} + +void QSound_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSound*)(self) )->virtualbase_ChildEvent(event); +} + +void QSound_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__CustomEvent = slot; +} + +void QSound_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSound*)(self) )->virtualbase_CustomEvent(event); +} + +void QSound_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__ConnectNotify = slot; +} + +void QSound_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSound*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSound_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSound*)(self) )->handle__DisconnectNotify = slot; +} + +void QSound_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSound*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSound_Delete(QSound* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qsound.go b/qt/multimedia/gen_qsound.go index c8b3b630..4f10cf80 100644 --- a/qt/multimedia/gen_qsound.go +++ b/qt/multimedia/gen_qsound.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -21,7 +22,8 @@ const ( ) type QSound struct { - h *C.QSound + h *C.QSound + isSubclass bool *qt.QObject } @@ -39,15 +41,23 @@ func (this *QSound) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSound(h *C.QSound) *QSound { +// newQSound constructs the type using only CGO pointers. +func newQSound(h *C.QSound, h_QObject *C.QObject) *QSound { if h == nil { return nil } - return &QSound{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QSound{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQSound(h unsafe.Pointer) *QSound { - return newQSound((*C.QSound)(h)) +// UnsafeNewQSound constructs the type using only unsafe pointers. +func UnsafeNewQSound(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSound { + if h == nil { + return nil + } + + return &QSound{h: (*C.QSound)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQSound constructs a new QSound object. @@ -56,8 +66,13 @@ func NewQSound(filename string) *QSound { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - ret := C.QSound_new(filename_ms) - return newQSound(ret) + var outptr_QSound *C.QSound = nil + var outptr_QObject *C.QObject = nil + + C.QSound_new(filename_ms, &outptr_QSound, &outptr_QObject) + ret := newQSound(outptr_QSound, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSound2 constructs a new QSound object. @@ -66,8 +81,13 @@ func NewQSound2(filename string, parent *qt.QObject) *QSound { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - ret := C.QSound_new2(filename_ms, (*C.QObject)(parent.UnsafePointer())) - return newQSound(ret) + var outptr_QSound *C.QSound = nil + var outptr_QObject *C.QObject = nil + + C.QSound_new2(filename_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QSound, &outptr_QObject) + ret := newQSound(outptr_QSound, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSound) MetaObject() *qt.QMetaObject { @@ -181,9 +201,175 @@ func QSound_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSound) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QSound_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSound) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QSound_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_Event +func miqt_exec_callback_QSound_Event(self *C.QSound, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSound{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSound) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QSound_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSound) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QSound_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_EventFilter +func miqt_exec_callback_QSound_EventFilter(self *C.QSound, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSound{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSound) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QSound_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QSound) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QSound_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_TimerEvent +func miqt_exec_callback_QSound_TimerEvent(self *C.QSound, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSound{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSound) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QSound_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QSound) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QSound_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_ChildEvent +func miqt_exec_callback_QSound_ChildEvent(self *C.QSound, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSound{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSound) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QSound_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSound) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QSound_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_CustomEvent +func miqt_exec_callback_QSound_CustomEvent(self *C.QSound, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSound{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSound) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QSound_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSound) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QSound_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_ConnectNotify +func miqt_exec_callback_QSound_ConnectNotify(self *C.QSound, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSound{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSound) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QSound_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSound) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QSound_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSound_DisconnectNotify +func miqt_exec_callback_QSound_DisconnectNotify(self *C.QSound, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSound{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSound) Delete() { - C.QSound_Delete(this.h) + C.QSound_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qsound.h b/qt/multimedia/gen_qsound.h index 18f13c53..6b7db5df 100644 --- a/qt/multimedia/gen_qsound.h +++ b/qt/multimedia/gen_qsound.h @@ -15,17 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSound; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSound QSound; +typedef struct QTimerEvent QTimerEvent; #endif -QSound* QSound_new(struct miqt_string filename); -QSound* QSound_new2(struct miqt_string filename, QObject* parent); +void QSound_new(struct miqt_string filename, QSound** outptr_QSound, QObject** outptr_QObject); +void QSound_new2(struct miqt_string filename, QObject* parent, QSound** outptr_QSound, QObject** outptr_QObject); QMetaObject* QSound_MetaObject(const QSound* self); void* QSound_Metacast(QSound* self, const char* param1); struct miqt_string QSound_Tr(const char* s); @@ -42,7 +50,21 @@ struct miqt_string QSound_Tr2(const char* s, const char* c); struct miqt_string QSound_Tr3(const char* s, const char* c, int n); struct miqt_string QSound_TrUtf82(const char* s, const char* c); struct miqt_string QSound_TrUtf83(const char* s, const char* c, int n); -void QSound_Delete(QSound* self); +void QSound_override_virtual_Event(void* self, intptr_t slot); +bool QSound_virtualbase_Event(void* self, QEvent* event); +void QSound_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSound_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSound_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSound_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSound_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSound_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSound_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSound_virtualbase_CustomEvent(void* self, QEvent* event); +void QSound_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSound_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSound_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSound_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSound_Delete(QSound* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qsoundeffect.cpp b/qt/multimedia/gen_qsoundeffect.cpp index 1860dced..693c8ecf 100644 --- a/qt/multimedia/gen_qsoundeffect.cpp +++ b/qt/multimedia/gen_qsoundeffect.cpp @@ -1,30 +1,225 @@ #include +#include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qsoundeffect.h" #include "_cgo_export.h" -QSoundEffect* QSoundEffect_new() { - return new QSoundEffect(); +class MiqtVirtualQSoundEffect : public virtual QSoundEffect { +public: + + MiqtVirtualQSoundEffect(): QSoundEffect() {}; + MiqtVirtualQSoundEffect(const QAudioDeviceInfo& audioDevice): QSoundEffect(audioDevice) {}; + MiqtVirtualQSoundEffect(QObject* parent): QSoundEffect(parent) {}; + MiqtVirtualQSoundEffect(const QAudioDeviceInfo& audioDevice, QObject* parent): QSoundEffect(audioDevice, parent) {}; + + virtual ~MiqtVirtualQSoundEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSoundEffect::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSoundEffect_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSoundEffect::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSoundEffect::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSoundEffect_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSoundEffect::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSoundEffect::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSoundEffect_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSoundEffect::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSoundEffect::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSoundEffect_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSoundEffect::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSoundEffect::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSoundEffect_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSoundEffect::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSoundEffect::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSoundEffect_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSoundEffect::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSoundEffect::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSoundEffect_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSoundEffect::disconnectNotify(*signal); + + } + +}; + +void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } -QSoundEffect* QSoundEffect_new2(QAudioDeviceInfo* audioDevice) { - return new QSoundEffect(*audioDevice); +void QSoundEffect_new2(QAudioDeviceInfo* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } -QSoundEffect* QSoundEffect_new3(QObject* parent) { - return new QSoundEffect(parent); +void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(parent); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } -QSoundEffect* QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent) { - return new QSoundEffect(*audioDevice, parent); +void QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice, parent); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self) { @@ -148,7 +343,7 @@ void QSoundEffect_SourceChanged(QSoundEffect* self) { } void QSoundEffect_connect_SourceChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::sourceChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::sourceChanged), self, [=]() { miqt_exec_callback_QSoundEffect_SourceChanged(slot); }); } @@ -158,7 +353,7 @@ void QSoundEffect_LoopCountChanged(QSoundEffect* self) { } void QSoundEffect_connect_LoopCountChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::loopCountChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::loopCountChanged), self, [=]() { miqt_exec_callback_QSoundEffect_LoopCountChanged(slot); }); } @@ -168,7 +363,7 @@ void QSoundEffect_LoopsRemainingChanged(QSoundEffect* self) { } void QSoundEffect_connect_LoopsRemainingChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::loopsRemainingChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::loopsRemainingChanged), self, [=]() { miqt_exec_callback_QSoundEffect_LoopsRemainingChanged(slot); }); } @@ -178,7 +373,7 @@ void QSoundEffect_VolumeChanged(QSoundEffect* self) { } void QSoundEffect_connect_VolumeChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::volumeChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::volumeChanged), self, [=]() { miqt_exec_callback_QSoundEffect_VolumeChanged(slot); }); } @@ -188,7 +383,7 @@ void QSoundEffect_MutedChanged(QSoundEffect* self) { } void QSoundEffect_connect_MutedChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::mutedChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::mutedChanged), self, [=]() { miqt_exec_callback_QSoundEffect_MutedChanged(slot); }); } @@ -198,7 +393,7 @@ void QSoundEffect_LoadedChanged(QSoundEffect* self) { } void QSoundEffect_connect_LoadedChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::loadedChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::loadedChanged), self, [=]() { miqt_exec_callback_QSoundEffect_LoadedChanged(slot); }); } @@ -208,7 +403,7 @@ void QSoundEffect_PlayingChanged(QSoundEffect* self) { } void QSoundEffect_connect_PlayingChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::playingChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::playingChanged), self, [=]() { miqt_exec_callback_QSoundEffect_PlayingChanged(slot); }); } @@ -218,7 +413,7 @@ void QSoundEffect_StatusChanged(QSoundEffect* self) { } void QSoundEffect_connect_StatusChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::statusChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::statusChanged), self, [=]() { miqt_exec_callback_QSoundEffect_StatusChanged(slot); }); } @@ -228,7 +423,7 @@ void QSoundEffect_CategoryChanged(QSoundEffect* self) { } void QSoundEffect_connect_CategoryChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::categoryChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::categoryChanged), self, [=]() { miqt_exec_callback_QSoundEffect_CategoryChanged(slot); }); } @@ -285,7 +480,67 @@ struct miqt_string QSoundEffect_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QSoundEffect_Delete(QSoundEffect* self) { - delete self; +void QSoundEffect_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__Event = slot; +} + +bool QSoundEffect_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_Event(event); +} + +void QSoundEffect_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__EventFilter = slot; +} + +bool QSoundEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSoundEffect_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__TimerEvent = slot; +} + +void QSoundEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_TimerEvent(event); +} + +void QSoundEffect_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__ChildEvent = slot; +} + +void QSoundEffect_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_ChildEvent(event); +} + +void QSoundEffect_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__CustomEvent = slot; +} + +void QSoundEffect_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_CustomEvent(event); +} + +void QSoundEffect_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__ConnectNotify = slot; +} + +void QSoundEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSoundEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__DisconnectNotify = slot; +} + +void QSoundEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSoundEffect_Delete(QSoundEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qsoundeffect.go b/qt/multimedia/gen_qsoundeffect.go index b0435bf7..00b5b782 100644 --- a/qt/multimedia/gen_qsoundeffect.go +++ b/qt/multimedia/gen_qsoundeffect.go @@ -31,7 +31,8 @@ const ( ) type QSoundEffect struct { - h *C.QSoundEffect + h *C.QSoundEffect + isSubclass bool *qt.QObject } @@ -49,39 +50,67 @@ func (this *QSoundEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSoundEffect(h *C.QSoundEffect) *QSoundEffect { +// newQSoundEffect constructs the type using only CGO pointers. +func newQSoundEffect(h *C.QSoundEffect, h_QObject *C.QObject) *QSoundEffect { if h == nil { return nil } - return &QSoundEffect{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QSoundEffect{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQSoundEffect(h unsafe.Pointer) *QSoundEffect { - return newQSoundEffect((*C.QSoundEffect)(h)) +// UnsafeNewQSoundEffect constructs the type using only unsafe pointers. +func UnsafeNewQSoundEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSoundEffect { + if h == nil { + return nil + } + + return &QSoundEffect{h: (*C.QSoundEffect)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQSoundEffect constructs a new QSoundEffect object. func NewQSoundEffect() *QSoundEffect { - ret := C.QSoundEffect_new() - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new(&outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSoundEffect2 constructs a new QSoundEffect object. func NewQSoundEffect2(audioDevice *QAudioDeviceInfo) *QSoundEffect { - ret := C.QSoundEffect_new2(audioDevice.cPointer()) - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new2(audioDevice.cPointer(), &outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSoundEffect3 constructs a new QSoundEffect object. func NewQSoundEffect3(parent *qt.QObject) *QSoundEffect { - ret := C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer())) - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSoundEffect4 constructs a new QSoundEffect object. func NewQSoundEffect4(audioDevice *QAudioDeviceInfo, parent *qt.QObject) *QSoundEffect { - ret := C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSoundEffect) MetaObject() *qt.QMetaObject { @@ -396,9 +425,175 @@ func QSoundEffect_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QSoundEffect) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QSoundEffect_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSoundEffect) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QSoundEffect_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_Event +func miqt_exec_callback_QSoundEffect_Event(self *C.QSoundEffect, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSoundEffect{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSoundEffect) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QSoundEffect_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSoundEffect) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QSoundEffect_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_EventFilter +func miqt_exec_callback_QSoundEffect_EventFilter(self *C.QSoundEffect, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSoundEffect{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSoundEffect) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QSoundEffect_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QSoundEffect) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QSoundEffect_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_TimerEvent +func miqt_exec_callback_QSoundEffect_TimerEvent(self *C.QSoundEffect, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QSoundEffect_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QSoundEffect) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QSoundEffect_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_ChildEvent +func miqt_exec_callback_QSoundEffect_ChildEvent(self *C.QSoundEffect, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QSoundEffect_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSoundEffect) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QSoundEffect_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_CustomEvent +func miqt_exec_callback_QSoundEffect_CustomEvent(self *C.QSoundEffect, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QSoundEffect_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSoundEffect) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QSoundEffect_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_ConnectNotify +func miqt_exec_callback_QSoundEffect_ConnectNotify(self *C.QSoundEffect, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QSoundEffect_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSoundEffect) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QSoundEffect_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_DisconnectNotify +func miqt_exec_callback_QSoundEffect_DisconnectNotify(self *C.QSoundEffect, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSoundEffect) Delete() { - C.QSoundEffect_Delete(this.h) + C.QSoundEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qsoundeffect.h b/qt/multimedia/gen_qsoundeffect.h index 686d1041..e8fd0688 100644 --- a/qt/multimedia/gen_qsoundeffect.h +++ b/qt/multimedia/gen_qsoundeffect.h @@ -16,22 +16,30 @@ extern "C" { #ifdef __cplusplus class QAudioDeviceInfo; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSoundEffect; +class QTimerEvent; class QUrl; #else typedef struct QAudioDeviceInfo QAudioDeviceInfo; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSoundEffect QSoundEffect; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QSoundEffect* QSoundEffect_new(); -QSoundEffect* QSoundEffect_new2(QAudioDeviceInfo* audioDevice); -QSoundEffect* QSoundEffect_new3(QObject* parent); -QSoundEffect* QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent); +void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +void QSoundEffect_new2(QAudioDeviceInfo* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +void QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self); void* QSoundEffect_Metacast(QSoundEffect* self, const char* param1); struct miqt_string QSoundEffect_Tr(const char* s); @@ -75,7 +83,21 @@ struct miqt_string QSoundEffect_Tr2(const char* s, const char* c); struct miqt_string QSoundEffect_Tr3(const char* s, const char* c, int n); struct miqt_string QSoundEffect_TrUtf82(const char* s, const char* c); struct miqt_string QSoundEffect_TrUtf83(const char* s, const char* c, int n); -void QSoundEffect_Delete(QSoundEffect* self); +void QSoundEffect_override_virtual_Event(void* self, intptr_t slot); +bool QSoundEffect_virtualbase_Event(void* self, QEvent* event); +void QSoundEffect_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSoundEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSoundEffect_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSoundEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSoundEffect_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSoundEffect_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSoundEffect_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSoundEffect_virtualbase_CustomEvent(void* self, QEvent* event); +void QSoundEffect_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSoundEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSoundEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSoundEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSoundEffect_Delete(QSoundEffect* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp b/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp index 123fc7f0..4318af4f 100644 --- a/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp +++ b/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -159,7 +161,11 @@ struct miqt_string QVideoDeviceSelectorControl_TrUtf83(const char* s, const char return _ms; } -void QVideoDeviceSelectorControl_Delete(QVideoDeviceSelectorControl* self) { - delete self; +void QVideoDeviceSelectorControl_Delete(QVideoDeviceSelectorControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideodeviceselectorcontrol.go b/qt/multimedia/gen_qvideodeviceselectorcontrol.go index 74140399..9e08dfe5 100644 --- a/qt/multimedia/gen_qvideodeviceselectorcontrol.go +++ b/qt/multimedia/gen_qvideodeviceselectorcontrol.go @@ -16,7 +16,8 @@ import ( ) type QVideoDeviceSelectorControl struct { - h *C.QVideoDeviceSelectorControl + h *C.QVideoDeviceSelectorControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QVideoDeviceSelectorControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoDeviceSelectorControl(h *C.QVideoDeviceSelectorControl) *QVideoDeviceSelectorControl { +// newQVideoDeviceSelectorControl constructs the type using only CGO pointers. +func newQVideoDeviceSelectorControl(h *C.QVideoDeviceSelectorControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoDeviceSelectorControl { if h == nil { return nil } - return &QVideoDeviceSelectorControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QVideoDeviceSelectorControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQVideoDeviceSelectorControl(h unsafe.Pointer) *QVideoDeviceSelectorControl { - return newQVideoDeviceSelectorControl((*C.QVideoDeviceSelectorControl)(h)) +// UnsafeNewQVideoDeviceSelectorControl constructs the type using only unsafe pointers. +func UnsafeNewQVideoDeviceSelectorControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoDeviceSelectorControl { + if h == nil { + return nil + } + + return &QVideoDeviceSelectorControl{h: (*C.QVideoDeviceSelectorControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QVideoDeviceSelectorControl) MetaObject() *qt.QMetaObject { @@ -213,7 +222,7 @@ func QVideoDeviceSelectorControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QVideoDeviceSelectorControl) Delete() { - C.QVideoDeviceSelectorControl_Delete(this.h) + C.QVideoDeviceSelectorControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideodeviceselectorcontrol.h b/qt/multimedia/gen_qvideodeviceselectorcontrol.h index cc979b40..daecfed4 100644 --- a/qt/multimedia/gen_qvideodeviceselectorcontrol.h +++ b/qt/multimedia/gen_qvideodeviceselectorcontrol.h @@ -15,10 +15,14 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaObject; +class QObject; class QVideoDeviceSelectorControl; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVideoDeviceSelectorControl QVideoDeviceSelectorControl; #endif @@ -42,7 +46,7 @@ struct miqt_string QVideoDeviceSelectorControl_Tr2(const char* s, const char* c) struct miqt_string QVideoDeviceSelectorControl_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoDeviceSelectorControl_TrUtf82(const char* s, const char* c); struct miqt_string QVideoDeviceSelectorControl_TrUtf83(const char* s, const char* c, int n); -void QVideoDeviceSelectorControl_Delete(QVideoDeviceSelectorControl* self); +void QVideoDeviceSelectorControl_Delete(QVideoDeviceSelectorControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideoencodersettingscontrol.cpp b/qt/multimedia/gen_qvideoencodersettingscontrol.cpp index e83bc44a..623d3328 100644 --- a/qt/multimedia/gen_qvideoencodersettingscontrol.cpp +++ b/qt/multimedia/gen_qvideoencodersettingscontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -40,8 +42,8 @@ struct miqt_string QVideoEncoderSettingsControl_TrUtf8(const char* s) { return _ms; } -struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings) { - QList _ret = self->supportedResolutions(*settings); +struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous) { + QList _ret = self->supportedResolutions(*settings, continuous); // Convert QList<> from C++ memory to manually-managed C memory QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -53,8 +55,8 @@ struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolut return _out; } -struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings) { - QList _ret = self->supportedFrameRates(*settings); +struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous) { + QList _ret = self->supportedFrameRates(*settings, continuous); // Convert QList<> from C++ memory to manually-managed C memory double* _arr = static_cast(malloc(sizeof(double) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -150,33 +152,11 @@ struct miqt_string QVideoEncoderSettingsControl_TrUtf83(const char* s, const cha return _ms; } -struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions2(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous) { - QList _ret = self->supportedResolutions(*settings, continuous); - // Convert QList<> from C++ memory to manually-managed C memory - QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QSize(_ret[i]); +void QVideoEncoderSettingsControl_Delete(QVideoEncoderSettingsControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates2(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous) { - QList _ret = self->supportedFrameRates(*settings, continuous); - // Convert QList<> from C++ memory to manually-managed C memory - double* _arr = static_cast(malloc(sizeof(double) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -void QVideoEncoderSettingsControl_Delete(QVideoEncoderSettingsControl* self) { - delete self; } diff --git a/qt/multimedia/gen_qvideoencodersettingscontrol.go b/qt/multimedia/gen_qvideoencodersettingscontrol.go index 7ef5d48f..276c8a1b 100644 --- a/qt/multimedia/gen_qvideoencodersettingscontrol.go +++ b/qt/multimedia/gen_qvideoencodersettingscontrol.go @@ -15,7 +15,8 @@ import ( ) type QVideoEncoderSettingsControl struct { - h *C.QVideoEncoderSettingsControl + h *C.QVideoEncoderSettingsControl + isSubclass bool *QMediaControl } @@ -33,15 +34,23 @@ func (this *QVideoEncoderSettingsControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoEncoderSettingsControl(h *C.QVideoEncoderSettingsControl) *QVideoEncoderSettingsControl { +// newQVideoEncoderSettingsControl constructs the type using only CGO pointers. +func newQVideoEncoderSettingsControl(h *C.QVideoEncoderSettingsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoEncoderSettingsControl { if h == nil { return nil } - return &QVideoEncoderSettingsControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QVideoEncoderSettingsControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQVideoEncoderSettingsControl(h unsafe.Pointer) *QVideoEncoderSettingsControl { - return newQVideoEncoderSettingsControl((*C.QVideoEncoderSettingsControl)(h)) +// UnsafeNewQVideoEncoderSettingsControl constructs the type using only unsafe pointers. +func UnsafeNewQVideoEncoderSettingsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoEncoderSettingsControl { + if h == nil { + return nil + } + + return &QVideoEncoderSettingsControl{h: (*C.QVideoEncoderSettingsControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QVideoEncoderSettingsControl) MetaObject() *qt.QMetaObject { @@ -72,8 +81,8 @@ func QVideoEncoderSettingsControl_TrUtf8(s string) string { return _ret } -func (this *QVideoEncoderSettingsControl) SupportedResolutions(settings *QVideoEncoderSettings) []qt.QSize { - var _ma C.struct_miqt_array = C.QVideoEncoderSettingsControl_SupportedResolutions(this.h, settings.cPointer()) +func (this *QVideoEncoderSettingsControl) SupportedResolutions(settings *QVideoEncoderSettings, continuous *bool) []qt.QSize { + var _ma C.struct_miqt_array = C.QVideoEncoderSettingsControl_SupportedResolutions(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) _ret := make([]qt.QSize, int(_ma.len)) _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -85,8 +94,8 @@ func (this *QVideoEncoderSettingsControl) SupportedResolutions(settings *QVideoE return _ret } -func (this *QVideoEncoderSettingsControl) SupportedFrameRates(settings *QVideoEncoderSettings) []float64 { - var _ma C.struct_miqt_array = C.QVideoEncoderSettingsControl_SupportedFrameRates(this.h, settings.cPointer()) +func (this *QVideoEncoderSettingsControl) SupportedFrameRates(settings *QVideoEncoderSettings, continuous *bool) []float64 { + var _ma C.struct_miqt_array = C.QVideoEncoderSettingsControl_SupportedFrameRates(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) _ret := make([]float64, int(_ma.len)) _outCast := (*[0xffff]C.double)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -174,32 +183,9 @@ func QVideoEncoderSettingsControl_TrUtf83(s string, c string, n int) string { return _ret } -func (this *QVideoEncoderSettingsControl) SupportedResolutions2(settings *QVideoEncoderSettings, continuous *bool) []qt.QSize { - var _ma C.struct_miqt_array = C.QVideoEncoderSettingsControl_SupportedResolutions2(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) - _ret := make([]qt.QSize, int(_ma.len)) - _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := qt.UnsafeNewQSize(unsafe.Pointer(_lv_ret)) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - -func (this *QVideoEncoderSettingsControl) SupportedFrameRates2(settings *QVideoEncoderSettings, continuous *bool) []float64 { - var _ma C.struct_miqt_array = C.QVideoEncoderSettingsControl_SupportedFrameRates2(this.h, settings.cPointer(), (*C.bool)(unsafe.Pointer(continuous))) - _ret := make([]float64, int(_ma.len)) - _outCast := (*[0xffff]C.double)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _ret[i] = (float64)(_outCast[i]) - } - return _ret -} - // Delete this object from C++ memory. func (this *QVideoEncoderSettingsControl) Delete() { - C.QVideoEncoderSettingsControl_Delete(this.h) + C.QVideoEncoderSettingsControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideoencodersettingscontrol.h b/qt/multimedia/gen_qvideoencodersettingscontrol.h index 4edcfcce..3dd1fe1a 100644 --- a/qt/multimedia/gen_qvideoencodersettingscontrol.h +++ b/qt/multimedia/gen_qvideoencodersettingscontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaObject; +class QObject; class QSize; class QVideoEncoderSettings; class QVideoEncoderSettingsControl; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSize QSize; typedef struct QVideoEncoderSettings QVideoEncoderSettings; typedef struct QVideoEncoderSettingsControl QVideoEncoderSettingsControl; @@ -30,8 +34,8 @@ QMetaObject* QVideoEncoderSettingsControl_MetaObject(const QVideoEncoderSettings void* QVideoEncoderSettingsControl_Metacast(QVideoEncoderSettingsControl* self, const char* param1); struct miqt_string QVideoEncoderSettingsControl_Tr(const char* s); struct miqt_string QVideoEncoderSettingsControl_TrUtf8(const char* s); -struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings); -struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings); +struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous); +struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous); struct miqt_array /* of struct miqt_string */ QVideoEncoderSettingsControl_SupportedVideoCodecs(const QVideoEncoderSettingsControl* self); struct miqt_string QVideoEncoderSettingsControl_VideoCodecDescription(const QVideoEncoderSettingsControl* self, struct miqt_string codec); QVideoEncoderSettings* QVideoEncoderSettingsControl_VideoSettings(const QVideoEncoderSettingsControl* self); @@ -40,9 +44,7 @@ struct miqt_string QVideoEncoderSettingsControl_Tr2(const char* s, const char* c struct miqt_string QVideoEncoderSettingsControl_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoEncoderSettingsControl_TrUtf82(const char* s, const char* c); struct miqt_string QVideoEncoderSettingsControl_TrUtf83(const char* s, const char* c, int n); -struct miqt_array /* of QSize* */ QVideoEncoderSettingsControl_SupportedResolutions2(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous); -struct miqt_array /* of double */ QVideoEncoderSettingsControl_SupportedFrameRates2(const QVideoEncoderSettingsControl* self, QVideoEncoderSettings* settings, bool* continuous); -void QVideoEncoderSettingsControl_Delete(QVideoEncoderSettingsControl* self); +void QVideoEncoderSettingsControl_Delete(QVideoEncoderSettingsControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideoframe.cpp b/qt/multimedia/gen_qvideoframe.cpp index 8d5ec1f5..40a0a3d5 100644 --- a/qt/multimedia/gen_qvideoframe.cpp +++ b/qt/multimedia/gen_qvideoframe.cpp @@ -10,20 +10,24 @@ #include "gen_qvideoframe.h" #include "_cgo_export.h" -QVideoFrame* QVideoFrame_new() { - return new QVideoFrame(); +void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(); + *outptr_QVideoFrame = ret; } -QVideoFrame* QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format) { - return new QVideoFrame(static_cast(bytes), *size, static_cast(bytesPerLine), static_cast(format)); +void QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format, QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(static_cast(bytes), *size, static_cast(bytesPerLine), static_cast(format)); + *outptr_QVideoFrame = ret; } -QVideoFrame* QVideoFrame_new3(QImage* image) { - return new QVideoFrame(*image); +void QVideoFrame_new3(QImage* image, QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(*image); + *outptr_QVideoFrame = ret; } -QVideoFrame* QVideoFrame_new4(QVideoFrame* other) { - return new QVideoFrame(*other); +void QVideoFrame_new4(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(*other); + *outptr_QVideoFrame = ret; } void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other) { @@ -205,7 +209,11 @@ int QVideoFrame_ImageFormatFromPixelFormat(int format) { return static_cast(_ret); } -void QVideoFrame_Delete(QVideoFrame* self) { - delete self; +void QVideoFrame_Delete(QVideoFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideoframe.go b/qt/multimedia/gen_qvideoframe.go index ba45e795..a125bd27 100644 --- a/qt/multimedia/gen_qvideoframe.go +++ b/qt/multimedia/gen_qvideoframe.go @@ -66,7 +66,8 @@ const ( ) type QVideoFrame struct { - h *C.QVideoFrame + h *C.QVideoFrame + isSubclass bool } func (this *QVideoFrame) cPointer() *C.QVideoFrame { @@ -83,6 +84,7 @@ func (this *QVideoFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoFrame constructs the type using only CGO pointers. func newQVideoFrame(h *C.QVideoFrame) *QVideoFrame { if h == nil { return nil @@ -90,32 +92,53 @@ func newQVideoFrame(h *C.QVideoFrame) *QVideoFrame { return &QVideoFrame{h: h} } +// UnsafeNewQVideoFrame constructs the type using only unsafe pointers. func UnsafeNewQVideoFrame(h unsafe.Pointer) *QVideoFrame { - return newQVideoFrame((*C.QVideoFrame)(h)) + if h == nil { + return nil + } + + return &QVideoFrame{h: (*C.QVideoFrame)(h)} } // NewQVideoFrame constructs a new QVideoFrame object. func NewQVideoFrame() *QVideoFrame { - ret := C.QVideoFrame_new() - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new(&outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } // NewQVideoFrame2 constructs a new QVideoFrame object. func NewQVideoFrame2(bytes int, size *qt.QSize, bytesPerLine int, format QVideoFrame__PixelFormat) *QVideoFrame { - ret := C.QVideoFrame_new2((C.int)(bytes), (*C.QSize)(size.UnsafePointer()), (C.int)(bytesPerLine), (C.int)(format)) - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new2((C.int)(bytes), (*C.QSize)(size.UnsafePointer()), (C.int)(bytesPerLine), (C.int)(format), &outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } // NewQVideoFrame3 constructs a new QVideoFrame object. func NewQVideoFrame3(image *qt.QImage) *QVideoFrame { - ret := C.QVideoFrame_new3((*C.QImage)(image.UnsafePointer())) - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new3((*C.QImage)(image.UnsafePointer()), &outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } // NewQVideoFrame4 constructs a new QVideoFrame object. func NewQVideoFrame4(other *QVideoFrame) *QVideoFrame { - ret := C.QVideoFrame_new4(other.cPointer()) - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new4(other.cPointer(), &outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } func (this *QVideoFrame) OperatorAssign(other *QVideoFrame) { @@ -285,7 +308,7 @@ func (this *QVideoFrame) SetMetaData(key string, value *qt.QVariant) { func (this *QVideoFrame) Image() *qt.QImage { _ret := C.QVideoFrame_Image(this.h) - _goptr := qt.UnsafeNewQImage(unsafe.Pointer(_ret)) + _goptr := qt.UnsafeNewQImage(unsafe.Pointer(_ret), nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -300,7 +323,7 @@ func QVideoFrame_ImageFormatFromPixelFormat(format QVideoFrame__PixelFormat) qt. // Delete this object from C++ memory. func (this *QVideoFrame) Delete() { - C.QVideoFrame_Delete(this.h) + C.QVideoFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideoframe.h b/qt/multimedia/gen_qvideoframe.h index 0e4ff924..120d70a6 100644 --- a/qt/multimedia/gen_qvideoframe.h +++ b/qt/multimedia/gen_qvideoframe.h @@ -26,10 +26,10 @@ typedef struct QVariant QVariant; typedef struct QVideoFrame QVideoFrame; #endif -QVideoFrame* QVideoFrame_new(); -QVideoFrame* QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format); -QVideoFrame* QVideoFrame_new3(QImage* image); -QVideoFrame* QVideoFrame_new4(QVideoFrame* other); +void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame); +void QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format, QVideoFrame** outptr_QVideoFrame); +void QVideoFrame_new3(QImage* image, QVideoFrame** outptr_QVideoFrame); +void QVideoFrame_new4(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame); void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other); bool QVideoFrame_OperatorEqual(const QVideoFrame* self, QVideoFrame* other); bool QVideoFrame_OperatorNotEqual(const QVideoFrame* self, QVideoFrame* other); @@ -66,7 +66,7 @@ void QVideoFrame_SetMetaData(QVideoFrame* self, struct miqt_string key, QVariant QImage* QVideoFrame_Image(const QVideoFrame* self); int QVideoFrame_PixelFormatFromImageFormat(int format); int QVideoFrame_ImageFormatFromPixelFormat(int format); -void QVideoFrame_Delete(QVideoFrame* self); +void QVideoFrame_Delete(QVideoFrame* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideoprobe.cpp b/qt/multimedia/gen_qvideoprobe.cpp index a0a40847..40305635 100644 --- a/qt/multimedia/gen_qvideoprobe.cpp +++ b/qt/multimedia/gen_qvideoprobe.cpp @@ -1,22 +1,211 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qvideoprobe.h" #include "_cgo_export.h" -QVideoProbe* QVideoProbe_new() { - return new QVideoProbe(); +class MiqtVirtualQVideoProbe : public virtual QVideoProbe { +public: + + MiqtVirtualQVideoProbe(): QVideoProbe() {}; + MiqtVirtualQVideoProbe(QObject* parent): QVideoProbe(parent) {}; + + virtual ~MiqtVirtualQVideoProbe() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QVideoProbe::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QVideoProbe_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QVideoProbe::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QVideoProbe::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QVideoProbe_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QVideoProbe::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QVideoProbe::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QVideoProbe_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QVideoProbe::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QVideoProbe::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QVideoProbe_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QVideoProbe::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QVideoProbe::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QVideoProbe_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QVideoProbe::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QVideoProbe::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QVideoProbe_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QVideoProbe::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QVideoProbe::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QVideoProbe_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QVideoProbe::disconnectNotify(*signal); + + } + +}; + +void QVideoProbe_new(QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject) { + MiqtVirtualQVideoProbe* ret = new MiqtVirtualQVideoProbe(); + *outptr_QVideoProbe = ret; + *outptr_QObject = static_cast(ret); } -QVideoProbe* QVideoProbe_new2(QObject* parent) { - return new QVideoProbe(parent); +void QVideoProbe_new2(QObject* parent, QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject) { + MiqtVirtualQVideoProbe* ret = new MiqtVirtualQVideoProbe(parent); + *outptr_QVideoProbe = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QVideoProbe_MetaObject(const QVideoProbe* self) { @@ -66,7 +255,7 @@ void QVideoProbe_VideoFrameProbed(QVideoProbe* self, QVideoFrame* frame) { } void QVideoProbe_connect_VideoFrameProbed(QVideoProbe* self, intptr_t slot) { - QVideoProbe::connect(self, static_cast(&QVideoProbe::videoFrameProbed), self, [=](const QVideoFrame& frame) { + MiqtVirtualQVideoProbe::connect(self, static_cast(&QVideoProbe::videoFrameProbed), self, [=](const QVideoFrame& frame) { const QVideoFrame& frame_ret = frame; // Cast returned reference into pointer QVideoFrame* sigval1 = const_cast(&frame_ret); @@ -79,7 +268,7 @@ void QVideoProbe_Flush(QVideoProbe* self) { } void QVideoProbe_connect_Flush(QVideoProbe* self, intptr_t slot) { - QVideoProbe::connect(self, static_cast(&QVideoProbe::flush), self, [=]() { + MiqtVirtualQVideoProbe::connect(self, static_cast(&QVideoProbe::flush), self, [=]() { miqt_exec_callback_QVideoProbe_Flush(slot); }); } @@ -128,7 +317,67 @@ struct miqt_string QVideoProbe_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QVideoProbe_Delete(QVideoProbe* self) { - delete self; +void QVideoProbe_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__Event = slot; +} + +bool QVideoProbe_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_Event(event); +} + +void QVideoProbe_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__EventFilter = slot; +} + +bool QVideoProbe_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QVideoProbe_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__TimerEvent = slot; +} + +void QVideoProbe_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_TimerEvent(event); +} + +void QVideoProbe_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__ChildEvent = slot; +} + +void QVideoProbe_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_ChildEvent(event); +} + +void QVideoProbe_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__CustomEvent = slot; +} + +void QVideoProbe_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_CustomEvent(event); +} + +void QVideoProbe_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__ConnectNotify = slot; +} + +void QVideoProbe_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QVideoProbe_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QVideoProbe*)(self) )->handle__DisconnectNotify = slot; +} + +void QVideoProbe_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQVideoProbe*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QVideoProbe_Delete(QVideoProbe* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideoprobe.go b/qt/multimedia/gen_qvideoprobe.go index f1d5fc6d..d14d197d 100644 --- a/qt/multimedia/gen_qvideoprobe.go +++ b/qt/multimedia/gen_qvideoprobe.go @@ -16,7 +16,8 @@ import ( ) type QVideoProbe struct { - h *C.QVideoProbe + h *C.QVideoProbe + isSubclass bool *qt.QObject } @@ -34,27 +35,45 @@ func (this *QVideoProbe) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoProbe(h *C.QVideoProbe) *QVideoProbe { +// newQVideoProbe constructs the type using only CGO pointers. +func newQVideoProbe(h *C.QVideoProbe, h_QObject *C.QObject) *QVideoProbe { if h == nil { return nil } - return &QVideoProbe{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QVideoProbe{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQVideoProbe(h unsafe.Pointer) *QVideoProbe { - return newQVideoProbe((*C.QVideoProbe)(h)) +// UnsafeNewQVideoProbe constructs the type using only unsafe pointers. +func UnsafeNewQVideoProbe(h unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoProbe { + if h == nil { + return nil + } + + return &QVideoProbe{h: (*C.QVideoProbe)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQVideoProbe constructs a new QVideoProbe object. func NewQVideoProbe() *QVideoProbe { - ret := C.QVideoProbe_new() - return newQVideoProbe(ret) + var outptr_QVideoProbe *C.QVideoProbe = nil + var outptr_QObject *C.QObject = nil + + C.QVideoProbe_new(&outptr_QVideoProbe, &outptr_QObject) + ret := newQVideoProbe(outptr_QVideoProbe, outptr_QObject) + ret.isSubclass = true + return ret } // NewQVideoProbe2 constructs a new QVideoProbe object. func NewQVideoProbe2(parent *qt.QObject) *QVideoProbe { - ret := C.QVideoProbe_new2((*C.QObject)(parent.UnsafePointer())) - return newQVideoProbe(ret) + var outptr_QVideoProbe *C.QVideoProbe = nil + var outptr_QObject *C.QObject = nil + + C.QVideoProbe_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QVideoProbe, &outptr_QObject) + ret := newQVideoProbe(outptr_QVideoProbe, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QVideoProbe) MetaObject() *qt.QMetaObject { @@ -178,9 +197,175 @@ func QVideoProbe_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QVideoProbe) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QVideoProbe_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QVideoProbe) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QVideoProbe_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_Event +func miqt_exec_callback_QVideoProbe_Event(self *C.QVideoProbe, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVideoProbe{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoProbe) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QVideoProbe_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QVideoProbe) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QVideoProbe_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_EventFilter +func miqt_exec_callback_QVideoProbe_EventFilter(self *C.QVideoProbe, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVideoProbe{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoProbe) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QVideoProbe_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QVideoProbe) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QVideoProbe_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_TimerEvent +func miqt_exec_callback_QVideoProbe_TimerEvent(self *C.QVideoProbe, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoProbe{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QVideoProbe) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QVideoProbe_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QVideoProbe) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QVideoProbe_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_ChildEvent +func miqt_exec_callback_QVideoProbe_ChildEvent(self *C.QVideoProbe, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoProbe{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QVideoProbe) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QVideoProbe_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QVideoProbe) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QVideoProbe_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_CustomEvent +func miqt_exec_callback_QVideoProbe_CustomEvent(self *C.QVideoProbe, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QVideoProbe{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QVideoProbe) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QVideoProbe_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QVideoProbe) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QVideoProbe_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_ConnectNotify +func miqt_exec_callback_QVideoProbe_ConnectNotify(self *C.QVideoProbe, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QVideoProbe{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QVideoProbe) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QVideoProbe_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QVideoProbe) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QVideoProbe_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoProbe_DisconnectNotify +func miqt_exec_callback_QVideoProbe_DisconnectNotify(self *C.QVideoProbe, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QVideoProbe{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QVideoProbe) Delete() { - C.QVideoProbe_Delete(this.h) + C.QVideoProbe_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideoprobe.h b/qt/multimedia/gen_qvideoprobe.h index cbef9f57..6a5f5d1a 100644 --- a/qt/multimedia/gen_qvideoprobe.h +++ b/qt/multimedia/gen_qvideoprobe.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QMediaObject; class QMediaRecorder; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVideoFrame; class QVideoProbe; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QMediaObject QMediaObject; typedef struct QMediaRecorder QMediaRecorder; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVideoFrame QVideoFrame; typedef struct QVideoProbe QVideoProbe; #endif -QVideoProbe* QVideoProbe_new(); -QVideoProbe* QVideoProbe_new2(QObject* parent); +void QVideoProbe_new(QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject); +void QVideoProbe_new2(QObject* parent, QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject); QMetaObject* QVideoProbe_MetaObject(const QVideoProbe* self); void* QVideoProbe_Metacast(QVideoProbe* self, const char* param1); struct miqt_string QVideoProbe_Tr(const char* s); @@ -47,7 +55,21 @@ struct miqt_string QVideoProbe_Tr2(const char* s, const char* c); struct miqt_string QVideoProbe_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoProbe_TrUtf82(const char* s, const char* c); struct miqt_string QVideoProbe_TrUtf83(const char* s, const char* c, int n); -void QVideoProbe_Delete(QVideoProbe* self); +void QVideoProbe_override_virtual_Event(void* self, intptr_t slot); +bool QVideoProbe_virtualbase_Event(void* self, QEvent* event); +void QVideoProbe_override_virtual_EventFilter(void* self, intptr_t slot); +bool QVideoProbe_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QVideoProbe_override_virtual_TimerEvent(void* self, intptr_t slot); +void QVideoProbe_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QVideoProbe_override_virtual_ChildEvent(void* self, intptr_t slot); +void QVideoProbe_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QVideoProbe_override_virtual_CustomEvent(void* self, intptr_t slot); +void QVideoProbe_virtualbase_CustomEvent(void* self, QEvent* event); +void QVideoProbe_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QVideoProbe_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QVideoProbe_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QVideoProbe_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QVideoProbe_Delete(QVideoProbe* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideorenderercontrol.cpp b/qt/multimedia/gen_qvideorenderercontrol.cpp index a2f7ba17..9066c1fb 100644 --- a/qt/multimedia/gen_qvideorenderercontrol.cpp +++ b/qt/multimedia/gen_qvideorenderercontrol.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -90,7 +92,11 @@ struct miqt_string QVideoRendererControl_TrUtf83(const char* s, const char* c, i return _ms; } -void QVideoRendererControl_Delete(QVideoRendererControl* self) { - delete self; +void QVideoRendererControl_Delete(QVideoRendererControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideorenderercontrol.go b/qt/multimedia/gen_qvideorenderercontrol.go index a64e64f6..d0135a60 100644 --- a/qt/multimedia/gen_qvideorenderercontrol.go +++ b/qt/multimedia/gen_qvideorenderercontrol.go @@ -15,7 +15,8 @@ import ( ) type QVideoRendererControl struct { - h *C.QVideoRendererControl + h *C.QVideoRendererControl + isSubclass bool *QMediaControl } @@ -33,15 +34,23 @@ func (this *QVideoRendererControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoRendererControl(h *C.QVideoRendererControl) *QVideoRendererControl { +// newQVideoRendererControl constructs the type using only CGO pointers. +func newQVideoRendererControl(h *C.QVideoRendererControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoRendererControl { if h == nil { return nil } - return &QVideoRendererControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QVideoRendererControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQVideoRendererControl(h unsafe.Pointer) *QVideoRendererControl { - return newQVideoRendererControl((*C.QVideoRendererControl)(h)) +// UnsafeNewQVideoRendererControl constructs the type using only unsafe pointers. +func UnsafeNewQVideoRendererControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoRendererControl { + if h == nil { + return nil + } + + return &QVideoRendererControl{h: (*C.QVideoRendererControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QVideoRendererControl) MetaObject() *qt.QMetaObject { @@ -73,7 +82,7 @@ func QVideoRendererControl_TrUtf8(s string) string { } func (this *QVideoRendererControl) Surface() *QAbstractVideoSurface { - return UnsafeNewQAbstractVideoSurface(unsafe.Pointer(C.QVideoRendererControl_Surface(this.h))) + return UnsafeNewQAbstractVideoSurface(unsafe.Pointer(C.QVideoRendererControl_Surface(this.h)), nil) } func (this *QVideoRendererControl) SetSurface(surface *QAbstractVideoSurface) { @@ -126,7 +135,7 @@ func QVideoRendererControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QVideoRendererControl) Delete() { - C.QVideoRendererControl_Delete(this.h) + C.QVideoRendererControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideorenderercontrol.h b/qt/multimedia/gen_qvideorenderercontrol.h index 0f454e98..22dc2885 100644 --- a/qt/multimedia/gen_qvideorenderercontrol.h +++ b/qt/multimedia/gen_qvideorenderercontrol.h @@ -16,11 +16,15 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; +class QMediaControl; class QMetaObject; +class QObject; class QVideoRendererControl; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVideoRendererControl QVideoRendererControl; #endif @@ -34,7 +38,7 @@ struct miqt_string QVideoRendererControl_Tr2(const char* s, const char* c); struct miqt_string QVideoRendererControl_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoRendererControl_TrUtf82(const char* s, const char* c); struct miqt_string QVideoRendererControl_TrUtf83(const char* s, const char* c, int n); -void QVideoRendererControl_Delete(QVideoRendererControl* self); +void QVideoRendererControl_Delete(QVideoRendererControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideosurfaceformat.cpp b/qt/multimedia/gen_qvideosurfaceformat.cpp index dca4c276..78f25afb 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.cpp +++ b/qt/multimedia/gen_qvideosurfaceformat.cpp @@ -8,20 +8,24 @@ #include "gen_qvideosurfaceformat.h" #include "_cgo_export.h" -QVideoSurfaceFormat* QVideoSurfaceFormat_new() { - return new QVideoSurfaceFormat(); +void QVideoSurfaceFormat_new(QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { + QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(); + *outptr_QVideoSurfaceFormat = ret; } -QVideoSurfaceFormat* QVideoSurfaceFormat_new2(QSize* size, int pixelFormat) { - return new QVideoSurfaceFormat(*size, static_cast(pixelFormat)); +void QVideoSurfaceFormat_new2(QSize* size, int pixelFormat, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { + QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(*size, static_cast(pixelFormat)); + *outptr_QVideoSurfaceFormat = ret; } -QVideoSurfaceFormat* QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format) { - return new QVideoSurfaceFormat(*format); +void QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { + QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(*format); + *outptr_QVideoSurfaceFormat = ret; } -QVideoSurfaceFormat* QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType) { - return new QVideoSurfaceFormat(*size, static_cast(pixelFormat), static_cast(handleType)); +void QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { + QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(*size, static_cast(pixelFormat), static_cast(handleType)); + *outptr_QVideoSurfaceFormat = ret; } void QVideoSurfaceFormat_OperatorAssign(QVideoSurfaceFormat* self, QVideoSurfaceFormat* format) { @@ -155,7 +159,11 @@ void QVideoSurfaceFormat_SetProperty(QVideoSurfaceFormat* self, const char* name self->setProperty(name, *value); } -void QVideoSurfaceFormat_Delete(QVideoSurfaceFormat* self) { - delete self; +void QVideoSurfaceFormat_Delete(QVideoSurfaceFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideosurfaceformat.go b/qt/multimedia/gen_qvideosurfaceformat.go index 12353927..21420a55 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.go +++ b/qt/multimedia/gen_qvideosurfaceformat.go @@ -34,7 +34,8 @@ const ( ) type QVideoSurfaceFormat struct { - h *C.QVideoSurfaceFormat + h *C.QVideoSurfaceFormat + isSubclass bool } func (this *QVideoSurfaceFormat) cPointer() *C.QVideoSurfaceFormat { @@ -51,6 +52,7 @@ func (this *QVideoSurfaceFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoSurfaceFormat constructs the type using only CGO pointers. func newQVideoSurfaceFormat(h *C.QVideoSurfaceFormat) *QVideoSurfaceFormat { if h == nil { return nil @@ -58,32 +60,53 @@ func newQVideoSurfaceFormat(h *C.QVideoSurfaceFormat) *QVideoSurfaceFormat { return &QVideoSurfaceFormat{h: h} } +// UnsafeNewQVideoSurfaceFormat constructs the type using only unsafe pointers. func UnsafeNewQVideoSurfaceFormat(h unsafe.Pointer) *QVideoSurfaceFormat { - return newQVideoSurfaceFormat((*C.QVideoSurfaceFormat)(h)) + if h == nil { + return nil + } + + return &QVideoSurfaceFormat{h: (*C.QVideoSurfaceFormat)(h)} } // NewQVideoSurfaceFormat constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat() *QVideoSurfaceFormat { - ret := C.QVideoSurfaceFormat_new() - return newQVideoSurfaceFormat(ret) + var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil + + C.QVideoSurfaceFormat_new(&outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret.isSubclass = true + return ret } // NewQVideoSurfaceFormat2 constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat2(size *qt.QSize, pixelFormat QVideoFrame__PixelFormat) *QVideoSurfaceFormat { - ret := C.QVideoSurfaceFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat)) - return newQVideoSurfaceFormat(ret) + var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil + + C.QVideoSurfaceFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), &outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret.isSubclass = true + return ret } // NewQVideoSurfaceFormat3 constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat3(format *QVideoSurfaceFormat) *QVideoSurfaceFormat { - ret := C.QVideoSurfaceFormat_new3(format.cPointer()) - return newQVideoSurfaceFormat(ret) + var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil + + C.QVideoSurfaceFormat_new3(format.cPointer(), &outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret.isSubclass = true + return ret } // NewQVideoSurfaceFormat4 constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat4(size *qt.QSize, pixelFormat QVideoFrame__PixelFormat, handleType QAbstractVideoBuffer__HandleType) *QVideoSurfaceFormat { - ret := C.QVideoSurfaceFormat_new4((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), (C.int)(handleType)) - return newQVideoSurfaceFormat(ret) + var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil + + C.QVideoSurfaceFormat_new4((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), (C.int)(handleType), &outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret.isSubclass = true + return ret } func (this *QVideoSurfaceFormat) OperatorAssign(format *QVideoSurfaceFormat) { @@ -228,7 +251,7 @@ func (this *QVideoSurfaceFormat) SetProperty(name string, value *qt.QVariant) { // Delete this object from C++ memory. func (this *QVideoSurfaceFormat) Delete() { - C.QVideoSurfaceFormat_Delete(this.h) + C.QVideoSurfaceFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideosurfaceformat.h b/qt/multimedia/gen_qvideosurfaceformat.h index 1ad50062..3fed0658 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.h +++ b/qt/multimedia/gen_qvideosurfaceformat.h @@ -28,10 +28,10 @@ typedef struct QVariant QVariant; typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; #endif -QVideoSurfaceFormat* QVideoSurfaceFormat_new(); -QVideoSurfaceFormat* QVideoSurfaceFormat_new2(QSize* size, int pixelFormat); -QVideoSurfaceFormat* QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format); -QVideoSurfaceFormat* QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType); +void QVideoSurfaceFormat_new(QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); +void QVideoSurfaceFormat_new2(QSize* size, int pixelFormat, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); +void QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); +void QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); void QVideoSurfaceFormat_OperatorAssign(QVideoSurfaceFormat* self, QVideoSurfaceFormat* format); bool QVideoSurfaceFormat_OperatorEqual(const QVideoSurfaceFormat* self, QVideoSurfaceFormat* format); bool QVideoSurfaceFormat_OperatorNotEqual(const QVideoSurfaceFormat* self, QVideoSurfaceFormat* format); @@ -60,7 +60,7 @@ QSize* QVideoSurfaceFormat_SizeHint(const QVideoSurfaceFormat* self); struct miqt_array /* of struct miqt_string */ QVideoSurfaceFormat_PropertyNames(const QVideoSurfaceFormat* self); QVariant* QVideoSurfaceFormat_Property(const QVideoSurfaceFormat* self, const char* name); void QVideoSurfaceFormat_SetProperty(QVideoSurfaceFormat* self, const char* name, QVariant* value); -void QVideoSurfaceFormat_Delete(QVideoSurfaceFormat* self); +void QVideoSurfaceFormat_Delete(QVideoSurfaceFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideowidget.cpp b/qt/multimedia/gen_qvideowidget.cpp index b81b1445..a757b6eb 100644 --- a/qt/multimedia/gen_qvideowidget.cpp +++ b/qt/multimedia/gen_qvideowidget.cpp @@ -1,22 +1,1089 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include +#include #include #include #include "gen_qvideowidget.h" #include "_cgo_export.h" -QVideoWidget* QVideoWidget_new(QWidget* parent) { - return new QVideoWidget(parent); +class MiqtVirtualQVideoWidget : public virtual QVideoWidget { +public: + + MiqtVirtualQVideoWidget(QWidget* parent): QVideoWidget(parent) {}; + MiqtVirtualQVideoWidget(): QVideoWidget() {}; + + virtual ~MiqtVirtualQVideoWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual QMediaObject* mediaObject() const override { + if (handle__MediaObject == 0) { + return QVideoWidget::mediaObject(); + } + + + QMediaObject* callback_return_value = miqt_exec_callback_QVideoWidget_MediaObject(const_cast(this), handle__MediaObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMediaObject* virtualbase_MediaObject() const { + + return QVideoWidget::mediaObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QVideoWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVideoWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QVideoWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QVideoWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QVideoWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QVideoWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QVideoWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QVideoWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QVideoWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QVideoWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QVideoWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QVideoWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QVideoWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QVideoWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QVideoWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QVideoWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMediaObject = 0; + + // Subclass to allow providing a Go implementation + virtual bool setMediaObject(QMediaObject* object) override { + if (handle__SetMediaObject == 0) { + return QVideoWidget::setMediaObject(object); + } + + QMediaObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QVideoWidget_SetMediaObject(this, handle__SetMediaObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetMediaObject(QMediaObject* object) { + + return QVideoWidget::setMediaObject(object); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QVideoWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QVideoWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QVideoWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QVideoWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QVideoWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QVideoWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QVideoWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVideoWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QVideoWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QVideoWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QVideoWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QVideoWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QVideoWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QVideoWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QVideoWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QVideoWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QVideoWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QVideoWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QVideoWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QVideoWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QVideoWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QVideoWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QVideoWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QVideoWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QVideoWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QVideoWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QVideoWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QVideoWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QVideoWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QVideoWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QVideoWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QVideoWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QVideoWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QVideoWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QVideoWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QVideoWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QVideoWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QVideoWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QVideoWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QVideoWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QVideoWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QVideoWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QVideoWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QVideoWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QVideoWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QVideoWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QVideoWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QVideoWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QVideoWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QVideoWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QVideoWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QVideoWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QVideoWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QVideoWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QVideoWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QVideoWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QVideoWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QVideoWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QVideoWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QVideoWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QVideoWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QVideoWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QVideoWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QVideoWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QVideoWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QVideoWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QVideoWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QVideoWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QVideoWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QVideoWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QVideoWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QVideoWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QVideoWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QVideoWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QVideoWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QVideoWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QVideoWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QVideoWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QVideoWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QVideoWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QVideoWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QVideoWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QVideoWidget::focusNextPrevChild(next); + + } + +}; + +void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(parent); + *outptr_QVideoWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } -QVideoWidget* QVideoWidget_new2() { - return new QVideoWidget(); +void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { + MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(); + *outptr_QVideoWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); + *outptr_QMediaBindableInterface = static_cast(ret); } QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self) { @@ -111,7 +1178,7 @@ void QVideoWidget_FullScreenChanged(QVideoWidget* self, bool fullScreen) { } void QVideoWidget_connect_FullScreenChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::fullScreenChanged), self, [=](bool fullScreen) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::fullScreenChanged), self, [=](bool fullScreen) { bool sigval1 = fullScreen; miqt_exec_callback_QVideoWidget_FullScreenChanged(slot, sigval1); }); @@ -122,7 +1189,7 @@ void QVideoWidget_BrightnessChanged(QVideoWidget* self, int brightness) { } void QVideoWidget_connect_BrightnessChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::brightnessChanged), self, [=](int brightness) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::brightnessChanged), self, [=](int brightness) { int sigval1 = brightness; miqt_exec_callback_QVideoWidget_BrightnessChanged(slot, sigval1); }); @@ -133,7 +1200,7 @@ void QVideoWidget_ContrastChanged(QVideoWidget* self, int contrast) { } void QVideoWidget_connect_ContrastChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::contrastChanged), self, [=](int contrast) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::contrastChanged), self, [=](int contrast) { int sigval1 = contrast; miqt_exec_callback_QVideoWidget_ContrastChanged(slot, sigval1); }); @@ -144,7 +1211,7 @@ void QVideoWidget_HueChanged(QVideoWidget* self, int hue) { } void QVideoWidget_connect_HueChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::hueChanged), self, [=](int hue) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::hueChanged), self, [=](int hue) { int sigval1 = hue; miqt_exec_callback_QVideoWidget_HueChanged(slot, sigval1); }); @@ -155,7 +1222,7 @@ void QVideoWidget_SaturationChanged(QVideoWidget* self, int saturation) { } void QVideoWidget_connect_SaturationChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::saturationChanged), self, [=](int saturation) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::saturationChanged), self, [=](int saturation) { int sigval1 = saturation; miqt_exec_callback_QVideoWidget_SaturationChanged(slot, sigval1); }); @@ -205,7 +1272,355 @@ struct miqt_string QVideoWidget_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QVideoWidget_Delete(QVideoWidget* self) { - delete self; +void QVideoWidget_override_virtual_MediaObject(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MediaObject = slot; +} + +QMediaObject* QVideoWidget_virtualbase_MediaObject(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_MediaObject(); +} + +void QVideoWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QVideoWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_SizeHint(); +} + +void QVideoWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__Event = slot; +} + +bool QVideoWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_Event(event); +} + +void QVideoWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ShowEvent = slot; +} + +void QVideoWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QVideoWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__HideEvent = slot; +} + +void QVideoWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QVideoWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QVideoWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QVideoWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MoveEvent = slot; +} + +void QVideoWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QVideoWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__PaintEvent = slot; +} + +void QVideoWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QVideoWidget_override_virtual_SetMediaObject(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SetMediaObject = slot; +} + +bool QVideoWidget_virtualbase_SetMediaObject(void* self, QMediaObject* object) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_SetMediaObject(object); +} + +void QVideoWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DevType = slot; +} + +int QVideoWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_DevType(); +} + +void QVideoWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SetVisible = slot; +} + +void QVideoWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QVideoWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QVideoWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QVideoWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QVideoWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QVideoWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QVideoWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QVideoWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QVideoWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QVideoWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QVideoWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QVideoWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QVideoWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QVideoWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QVideoWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QVideoWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QVideoWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QVideoWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__WheelEvent = slot; +} + +void QVideoWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QVideoWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QVideoWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QVideoWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QVideoWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QVideoWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QVideoWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QVideoWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QVideoWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QVideoWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__EnterEvent = slot; +} + +void QVideoWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QVideoWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QVideoWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QVideoWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__CloseEvent = slot; +} + +void QVideoWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QVideoWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QVideoWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QVideoWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__TabletEvent = slot; +} + +void QVideoWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QVideoWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ActionEvent = slot; +} + +void QVideoWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QVideoWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QVideoWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QVideoWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QVideoWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QVideoWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QVideoWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QVideoWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DropEvent = slot; +} + +void QVideoWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QVideoWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QVideoWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QVideoWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QVideoWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QVideoWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__Metric = slot; +} + +int QVideoWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_Metric(param1); +} + +void QVideoWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__InitPainter = slot; +} + +void QVideoWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QVideoWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QVideoWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QVideoWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QVideoWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QVideoWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QVideoWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QVideoWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QVideoWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QVideoWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QVideoWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QVideoWidget_Delete(QVideoWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideowidget.go b/qt/multimedia/gen_qvideowidget.go index d7b503b4..5ab6949e 100644 --- a/qt/multimedia/gen_qvideowidget.go +++ b/qt/multimedia/gen_qvideowidget.go @@ -16,7 +16,8 @@ import ( ) type QVideoWidget struct { - h *C.QVideoWidget + h *C.QVideoWidget + isSubclass bool *qt.QWidget *QMediaBindableInterface } @@ -35,27 +36,53 @@ func (this *QVideoWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoWidget(h *C.QVideoWidget) *QVideoWidget { +// newQVideoWidget constructs the type using only CGO pointers. +func newQVideoWidget(h *C.QVideoWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice, h_QMediaBindableInterface *C.QMediaBindableInterface) *QVideoWidget { if h == nil { return nil } - return &QVideoWidget{h: h, QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h)), QMediaBindableInterface: UnsafeNewQMediaBindableInterface(unsafe.Pointer(h))} + return &QVideoWidget{h: h, + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice)), + QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} } -func UnsafeNewQVideoWidget(h unsafe.Pointer) *QVideoWidget { - return newQVideoWidget((*C.QVideoWidget)(h)) +// UnsafeNewQVideoWidget constructs the type using only unsafe pointers. +func UnsafeNewQVideoWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QVideoWidget { + if h == nil { + return nil + } + + return &QVideoWidget{h: (*C.QVideoWidget)(h), + QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice), + QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} } // NewQVideoWidget constructs a new QVideoWidget object. func NewQVideoWidget(parent *qt.QWidget) *QVideoWidget { - ret := C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer())) - return newQVideoWidget(ret) + var outptr_QVideoWidget *C.QVideoWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) + ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } // NewQVideoWidget2 constructs a new QVideoWidget object. func NewQVideoWidget2() *QVideoWidget { - ret := C.QVideoWidget_new2() - return newQVideoWidget(ret) + var outptr_QVideoWidget *C.QVideoWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + + C.QVideoWidget_new2(&outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) + ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret.isSubclass = true + return ret } func (this *QVideoWidget) MetaObject() *qt.QMetaObject { @@ -87,11 +114,11 @@ func QVideoWidget_TrUtf8(s string) string { } func (this *QVideoWidget) MediaObject() *QMediaObject { - return UnsafeNewQMediaObject(unsafe.Pointer(C.QVideoWidget_MediaObject(this.h))) + return UnsafeNewQMediaObject(unsafe.Pointer(C.QVideoWidget_MediaObject(this.h)), nil) } func (this *QVideoWidget) VideoSurface() *QAbstractVideoSurface { - return UnsafeNewQAbstractVideoSurface(unsafe.Pointer(C.QVideoWidget_VideoSurface(this.h))) + return UnsafeNewQAbstractVideoSurface(unsafe.Pointer(C.QVideoWidget_VideoSurface(this.h)), nil) } func (this *QVideoWidget) AspectRatioMode() qt.AspectRatioMode { @@ -289,9 +316,1021 @@ func QVideoWidget_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QVideoWidget) callVirtualBase_MediaObject() *QMediaObject { + + return UnsafeNewQMediaObject(unsafe.Pointer(C.QVideoWidget_virtualbase_MediaObject(unsafe.Pointer(this.h))), nil) +} +func (this *QVideoWidget) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { + C.QVideoWidget_override_virtual_MediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MediaObject +func miqt_exec_callback_QVideoWidget_MediaObject(self *C.QVideoWidget, cb C.intptr_t) *C.QMediaObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMediaObject) *QMediaObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_MediaObject) + + return virtualReturn.cPointer() + +} + +func (this *QVideoWidget) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QVideoWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVideoWidget) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QVideoWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SizeHint +func miqt_exec_callback_QVideoWidget_SizeHint(self *C.QVideoWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QVideoWidget_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QVideoWidget) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QVideoWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_Event +func miqt_exec_callback_QVideoWidget_Event(self *C.QVideoWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QVideoWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QVideoWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ShowEvent +func miqt_exec_callback_QVideoWidget_ShowEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QVideoWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QVideoWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_HideEvent +func miqt_exec_callback_QVideoWidget_HideEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QVideoWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.QVideoWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ResizeEvent +func miqt_exec_callback_QVideoWidget_ResizeEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QVideoWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QVideoWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MoveEvent +func miqt_exec_callback_QVideoWidget_MoveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QVideoWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.QVideoWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_PaintEvent +func miqt_exec_callback_QVideoWidget_PaintEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_SetMediaObject(object *QMediaObject) bool { + + return (bool)(C.QVideoWidget_virtualbase_SetMediaObject(unsafe.Pointer(this.h), object.cPointer())) + +} +func (this *QVideoWidget) OnSetMediaObject(slot func(super func(object *QMediaObject) bool, object *QMediaObject) bool) { + C.QVideoWidget_override_virtual_SetMediaObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SetMediaObject +func miqt_exec_callback_QVideoWidget_SetMediaObject(self *C.QVideoWidget, cb C.intptr_t, object *C.QMediaObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QMediaObject) bool, object *QMediaObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMediaObject(unsafe.Pointer(object), nil) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_SetMediaObject, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_DevType() int { + + return (int)(C.QVideoWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QVideoWidget) OnDevType(slot func(super func() int) int) { + C.QVideoWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DevType +func miqt_exec_callback_QVideoWidget_DevType(self *C.QVideoWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_SetVisible(visible bool) { + + C.QVideoWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QVideoWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QVideoWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SetVisible +func miqt_exec_callback_QVideoWidget_SetVisible(self *C.QVideoWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QVideoWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVideoWidget) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QVideoWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MinimumSizeHint +func miqt_exec_callback_QVideoWidget_MinimumSizeHint(self *C.QVideoWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QVideoWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVideoWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QVideoWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_HeightForWidth +func miqt_exec_callback_QVideoWidget_HeightForWidth(self *C.QVideoWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QVideoWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QVideoWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QVideoWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_HasHeightForWidth +func miqt_exec_callback_QVideoWidget_HasHeightForWidth(self *C.QVideoWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QVideoWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QVideoWidget) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QVideoWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_PaintEngine +func miqt_exec_callback_QVideoWidget_PaintEngine(self *C.QVideoWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.QVideoWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QVideoWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MousePressEvent +func miqt_exec_callback_QVideoWidget_MousePressEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { + + C.QVideoWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QVideoWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MouseReleaseEvent +func miqt_exec_callback_QVideoWidget_MouseReleaseEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.QVideoWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QVideoWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent +func miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { + + C.QVideoWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QVideoWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MouseMoveEvent +func miqt_exec_callback_QVideoWidget_MouseMoveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { + + C.QVideoWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.QVideoWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_WheelEvent +func miqt_exec_callback_QVideoWidget_WheelEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.QVideoWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QVideoWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_KeyPressEvent +func miqt_exec_callback_QVideoWidget_KeyPressEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_KeyReleaseEvent(event *qt.QKeyEvent) { + + C.QVideoWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnKeyReleaseEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QVideoWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_KeyReleaseEvent +func miqt_exec_callback_QVideoWidget_KeyReleaseEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.QVideoWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QVideoWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_FocusInEvent +func miqt_exec_callback_QVideoWidget_FocusInEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.QVideoWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QVideoWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_FocusOutEvent +func miqt_exec_callback_QVideoWidget_FocusOutEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QVideoWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QVideoWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_EnterEvent +func miqt_exec_callback_QVideoWidget_EnterEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QVideoWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QVideoWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_LeaveEvent +func miqt_exec_callback_QVideoWidget_LeaveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QVideoWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + C.QVideoWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_CloseEvent +func miqt_exec_callback_QVideoWidget_CloseEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_ContextMenuEvent(event *qt.QContextMenuEvent) { + + C.QVideoWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnContextMenuEvent(slot func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) { + C.QVideoWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ContextMenuEvent +func miqt_exec_callback_QVideoWidget_ContextMenuEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QVideoWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + C.QVideoWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_TabletEvent +func miqt_exec_callback_QVideoWidget_TabletEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QVideoWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + C.QVideoWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ActionEvent +func miqt_exec_callback_QVideoWidget_ActionEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DragEnterEvent(event *qt.QDragEnterEvent) { + + C.QVideoWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDragEnterEvent(slot func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) { + C.QVideoWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DragEnterEvent +func miqt_exec_callback_QVideoWidget_DragEnterEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DragMoveEvent(event *qt.QDragMoveEvent) { + + C.QVideoWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDragMoveEvent(slot func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) { + C.QVideoWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DragMoveEvent +func miqt_exec_callback_QVideoWidget_DragMoveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DragLeaveEvent(event *qt.QDragLeaveEvent) { + + C.QVideoWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDragLeaveEvent(slot func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) { + C.QVideoWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DragLeaveEvent +func miqt_exec_callback_QVideoWidget_DragLeaveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DropEvent(event *qt.QDropEvent) { + + C.QVideoWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDropEvent(slot func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) { + C.QVideoWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DropEvent +func miqt_exec_callback_QVideoWidget_DropEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QVideoWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QVideoWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QVideoWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_NativeEvent +func miqt_exec_callback_QVideoWidget_NativeEvent(self *C.QVideoWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QVideoWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QVideoWidget) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + C.QVideoWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ChangeEvent +func miqt_exec_callback_QVideoWidget_ChangeEvent(self *C.QVideoWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QVideoWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVideoWidget) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QVideoWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_Metric +func miqt_exec_callback_QVideoWidget_Metric(self *C.QVideoWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QVideoWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QVideoWidget) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QVideoWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_InitPainter +func miqt_exec_callback_QVideoWidget_InitPainter(self *C.QVideoWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QVideoWidget_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QVideoWidget) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QVideoWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_Redirected +func miqt_exec_callback_QVideoWidget_Redirected(self *C.QVideoWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QVideoWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QVideoWidget) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QVideoWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SharedPainter +func miqt_exec_callback_QVideoWidget_SharedPainter(self *C.QVideoWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QVideoWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QVideoWidget) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QVideoWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_InputMethodEvent +func miqt_exec_callback_QVideoWidget_InputMethodEvent(self *C.QVideoWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_InputMethodQuery(param1 qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QVideoWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVideoWidget) OnInputMethodQuery(slot func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) { + C.QVideoWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_InputMethodQuery +func miqt_exec_callback_QVideoWidget_InputMethodQuery(self *C.QVideoWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QVideoWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QVideoWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QVideoWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_FocusNextPrevChild +func miqt_exec_callback_QVideoWidget_FocusNextPrevChild(self *C.QVideoWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QVideoWidget) Delete() { - C.QVideoWidget_Delete(this.h) + C.QVideoWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideowidget.h b/qt/multimedia/gen_qvideowidget.h index 4b59461f..66e56c2b 100644 --- a/qt/multimedia/gen_qvideowidget.h +++ b/qt/multimedia/gen_qvideowidget.h @@ -16,22 +16,76 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; +class QMediaBindableInterface; class QMediaObject; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; class QVideoWidget; +class QWheelEvent; class QWidget; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMediaBindableInterface QMediaBindableInterface; typedef struct QMediaObject QMediaObject; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; typedef struct QVideoWidget QVideoWidget; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QVideoWidget* QVideoWidget_new(QWidget* parent); -QVideoWidget* QVideoWidget_new2(); +void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); +void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self); void* QVideoWidget_Metacast(QVideoWidget* self, const char* param1); struct miqt_string QVideoWidget_Tr(const char* s); @@ -60,11 +114,104 @@ void QVideoWidget_HueChanged(QVideoWidget* self, int hue); void QVideoWidget_connect_HueChanged(QVideoWidget* self, intptr_t slot); void QVideoWidget_SaturationChanged(QVideoWidget* self, int saturation); void QVideoWidget_connect_SaturationChanged(QVideoWidget* self, intptr_t slot); +bool QVideoWidget_Event(QVideoWidget* self, QEvent* event); +void QVideoWidget_ShowEvent(QVideoWidget* self, QShowEvent* event); +void QVideoWidget_HideEvent(QVideoWidget* self, QHideEvent* event); +void QVideoWidget_ResizeEvent(QVideoWidget* self, QResizeEvent* event); +void QVideoWidget_MoveEvent(QVideoWidget* self, QMoveEvent* event); +void QVideoWidget_PaintEvent(QVideoWidget* self, QPaintEvent* event); +bool QVideoWidget_SetMediaObject(QVideoWidget* self, QMediaObject* object); struct miqt_string QVideoWidget_Tr2(const char* s, const char* c); struct miqt_string QVideoWidget_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoWidget_TrUtf82(const char* s, const char* c); struct miqt_string QVideoWidget_TrUtf83(const char* s, const char* c, int n); -void QVideoWidget_Delete(QVideoWidget* self); +void QVideoWidget_override_virtual_MediaObject(void* self, intptr_t slot); +QMediaObject* QVideoWidget_virtualbase_MediaObject(const void* self); +void QVideoWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QVideoWidget_virtualbase_SizeHint(const void* self); +void QVideoWidget_override_virtual_Event(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_Event(void* self, QEvent* event); +void QVideoWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QVideoWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QVideoWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QVideoWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QVideoWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QVideoWidget_override_virtual_SetMediaObject(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_SetMediaObject(void* self, QMediaObject* object); +void QVideoWidget_override_virtual_DevType(void* self, intptr_t slot); +int QVideoWidget_virtualbase_DevType(const void* self); +void QVideoWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QVideoWidget_virtualbase_SetVisible(void* self, bool visible); +void QVideoWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QVideoWidget_virtualbase_MinimumSizeHint(const void* self); +void QVideoWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QVideoWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QVideoWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_HasHeightForWidth(const void* self); +void QVideoWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QVideoWidget_virtualbase_PaintEngine(const void* self); +void QVideoWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QVideoWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QVideoWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QVideoWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QVideoWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QVideoWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QVideoWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QVideoWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QVideoWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QVideoWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QVideoWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QVideoWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QVideoWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QVideoWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QVideoWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QVideoWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QVideoWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QVideoWidget_override_virtual_Metric(void* self, intptr_t slot); +int QVideoWidget_virtualbase_Metric(const void* self, int param1); +void QVideoWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QVideoWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QVideoWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QVideoWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QVideoWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QVideoWidget_virtualbase_SharedPainter(const void* self); +void QVideoWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QVideoWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QVideoWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QVideoWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QVideoWidget_Delete(QVideoWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideowidgetcontrol.cpp b/qt/multimedia/gen_qvideowidgetcontrol.cpp index 010d5214..085a88e9 100644 --- a/qt/multimedia/gen_qvideowidgetcontrol.cpp +++ b/qt/multimedia/gen_qvideowidgetcontrol.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -190,7 +192,11 @@ struct miqt_string QVideoWidgetControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QVideoWidgetControl_Delete(QVideoWidgetControl* self) { - delete self; +void QVideoWidgetControl_Delete(QVideoWidgetControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideowidgetcontrol.go b/qt/multimedia/gen_qvideowidgetcontrol.go index b663071b..923f3993 100644 --- a/qt/multimedia/gen_qvideowidgetcontrol.go +++ b/qt/multimedia/gen_qvideowidgetcontrol.go @@ -16,7 +16,8 @@ import ( ) type QVideoWidgetControl struct { - h *C.QVideoWidgetControl + h *C.QVideoWidgetControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QVideoWidgetControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoWidgetControl(h *C.QVideoWidgetControl) *QVideoWidgetControl { +// newQVideoWidgetControl constructs the type using only CGO pointers. +func newQVideoWidgetControl(h *C.QVideoWidgetControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoWidgetControl { if h == nil { return nil } - return &QVideoWidgetControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QVideoWidgetControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQVideoWidgetControl(h unsafe.Pointer) *QVideoWidgetControl { - return newQVideoWidgetControl((*C.QVideoWidgetControl)(h)) +// UnsafeNewQVideoWidgetControl constructs the type using only unsafe pointers. +func UnsafeNewQVideoWidgetControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoWidgetControl { + if h == nil { + return nil + } + + return &QVideoWidgetControl{h: (*C.QVideoWidgetControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QVideoWidgetControl) MetaObject() *qt.QMetaObject { @@ -74,7 +83,7 @@ func QVideoWidgetControl_TrUtf8(s string) string { } func (this *QVideoWidgetControl) VideoWidget() *qt.QWidget { - return qt.UnsafeNewQWidget(unsafe.Pointer(C.QVideoWidgetControl_VideoWidget(this.h))) + return qt.UnsafeNewQWidget(unsafe.Pointer(C.QVideoWidgetControl_VideoWidget(this.h)), nil, nil) } func (this *QVideoWidgetControl) AspectRatioMode() qt.AspectRatioMode { @@ -271,7 +280,7 @@ func QVideoWidgetControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QVideoWidgetControl) Delete() { - C.QVideoWidgetControl_Delete(this.h) + C.QVideoWidgetControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideowidgetcontrol.h b/qt/multimedia/gen_qvideowidgetcontrol.h index cce8eb71..3995a25c 100644 --- a/qt/multimedia/gen_qvideowidgetcontrol.h +++ b/qt/multimedia/gen_qvideowidgetcontrol.h @@ -15,11 +15,15 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaObject; +class QObject; class QVideoWidgetControl; class QWidget; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QVideoWidgetControl QVideoWidgetControl; typedef struct QWidget QWidget; #endif @@ -55,7 +59,7 @@ struct miqt_string QVideoWidgetControl_Tr2(const char* s, const char* c); struct miqt_string QVideoWidgetControl_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoWidgetControl_TrUtf82(const char* s, const char* c); struct miqt_string QVideoWidgetControl_TrUtf83(const char* s, const char* c, int n); -void QVideoWidgetControl_Delete(QVideoWidgetControl* self); +void QVideoWidgetControl_Delete(QVideoWidgetControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/multimedia/gen_qvideowindowcontrol.cpp b/qt/multimedia/gen_qvideowindowcontrol.cpp index 893986c1..65c7e378 100644 --- a/qt/multimedia/gen_qvideowindowcontrol.cpp +++ b/qt/multimedia/gen_qvideowindowcontrol.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -222,7 +224,11 @@ struct miqt_string QVideoWindowControl_TrUtf83(const char* s, const char* c, int return _ms; } -void QVideoWindowControl_Delete(QVideoWindowControl* self) { - delete self; +void QVideoWindowControl_Delete(QVideoWindowControl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/multimedia/gen_qvideowindowcontrol.go b/qt/multimedia/gen_qvideowindowcontrol.go index f4577be8..6d075bc0 100644 --- a/qt/multimedia/gen_qvideowindowcontrol.go +++ b/qt/multimedia/gen_qvideowindowcontrol.go @@ -16,7 +16,8 @@ import ( ) type QVideoWindowControl struct { - h *C.QVideoWindowControl + h *C.QVideoWindowControl + isSubclass bool *QMediaControl } @@ -34,15 +35,23 @@ func (this *QVideoWindowControl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoWindowControl(h *C.QVideoWindowControl) *QVideoWindowControl { +// newQVideoWindowControl constructs the type using only CGO pointers. +func newQVideoWindowControl(h *C.QVideoWindowControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoWindowControl { if h == nil { return nil } - return &QVideoWindowControl{h: h, QMediaControl: UnsafeNewQMediaControl(unsafe.Pointer(h))} + return &QVideoWindowControl{h: h, + QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} } -func UnsafeNewQVideoWindowControl(h unsafe.Pointer) *QVideoWindowControl { - return newQVideoWindowControl((*C.QVideoWindowControl)(h)) +// UnsafeNewQVideoWindowControl constructs the type using only unsafe pointers. +func UnsafeNewQVideoWindowControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoWindowControl { + if h == nil { + return nil + } + + return &QVideoWindowControl{h: (*C.QVideoWindowControl)(h), + QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} } func (this *QVideoWindowControl) MetaObject() *qt.QMetaObject { @@ -314,7 +323,7 @@ func QVideoWindowControl_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QVideoWindowControl) Delete() { - C.QVideoWindowControl_Delete(this.h) + C.QVideoWindowControl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/multimedia/gen_qvideowindowcontrol.h b/qt/multimedia/gen_qvideowindowcontrol.h index b4378b47..c61fa99f 100644 --- a/qt/multimedia/gen_qvideowindowcontrol.h +++ b/qt/multimedia/gen_qvideowindowcontrol.h @@ -15,12 +15,16 @@ extern "C" { #endif #ifdef __cplusplus +class QMediaControl; class QMetaObject; +class QObject; class QRect; class QSize; class QVideoWindowControl; #else +typedef struct QMediaControl QMediaControl; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QVideoWindowControl QVideoWindowControl; @@ -64,7 +68,7 @@ struct miqt_string QVideoWindowControl_Tr2(const char* s, const char* c); struct miqt_string QVideoWindowControl_Tr3(const char* s, const char* c, int n); struct miqt_string QVideoWindowControl_TrUtf82(const char* s, const char* c); struct miqt_string QVideoWindowControl_TrUtf83(const char* s, const char* c, int n); -void QVideoWindowControl_Delete(QVideoWindowControl* self); +void QVideoWindowControl_Delete(QVideoWindowControl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qabstractnetworkcache.cpp b/qt/network/gen_qabstractnetworkcache.cpp index 80e58a83..e9709867 100644 --- a/qt/network/gen_qabstractnetworkcache.cpp +++ b/qt/network/gen_qabstractnetworkcache.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -14,12 +15,14 @@ #include "gen_qabstractnetworkcache.h" #include "_cgo_export.h" -QNetworkCacheMetaData* QNetworkCacheMetaData_new() { - return new QNetworkCacheMetaData(); +void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { + QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(); + *outptr_QNetworkCacheMetaData = ret; } -QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other) { - return new QNetworkCacheMetaData(*other); +void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { + QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(*other); + *outptr_QNetworkCacheMetaData = ret; } void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other) { @@ -154,8 +157,12 @@ void QNetworkCacheMetaData_SetAttributes(QNetworkCacheMetaData* self, struct miq self->setAttributes(attributes_QMap); } -void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self) { - delete self; +void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self) { @@ -265,7 +272,11 @@ struct miqt_string QAbstractNetworkCache_TrUtf83(const char* s, const char* c, i return _ms; } -void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self) { - delete self; +void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qabstractnetworkcache.go b/qt/network/gen_qabstractnetworkcache.go index 0480994f..aed91dd7 100644 --- a/qt/network/gen_qabstractnetworkcache.go +++ b/qt/network/gen_qabstractnetworkcache.go @@ -15,7 +15,8 @@ import ( ) type QNetworkCacheMetaData struct { - h *C.QNetworkCacheMetaData + h *C.QNetworkCacheMetaData + isSubclass bool } func (this *QNetworkCacheMetaData) cPointer() *C.QNetworkCacheMetaData { @@ -32,6 +33,7 @@ func (this *QNetworkCacheMetaData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkCacheMetaData constructs the type using only CGO pointers. func newQNetworkCacheMetaData(h *C.QNetworkCacheMetaData) *QNetworkCacheMetaData { if h == nil { return nil @@ -39,20 +41,33 @@ func newQNetworkCacheMetaData(h *C.QNetworkCacheMetaData) *QNetworkCacheMetaData return &QNetworkCacheMetaData{h: h} } +// UnsafeNewQNetworkCacheMetaData constructs the type using only unsafe pointers. func UnsafeNewQNetworkCacheMetaData(h unsafe.Pointer) *QNetworkCacheMetaData { - return newQNetworkCacheMetaData((*C.QNetworkCacheMetaData)(h)) + if h == nil { + return nil + } + + return &QNetworkCacheMetaData{h: (*C.QNetworkCacheMetaData)(h)} } // NewQNetworkCacheMetaData constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData() *QNetworkCacheMetaData { - ret := C.QNetworkCacheMetaData_new() - return newQNetworkCacheMetaData(ret) + var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil + + C.QNetworkCacheMetaData_new(&outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret.isSubclass = true + return ret } // NewQNetworkCacheMetaData2 constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData2(other *QNetworkCacheMetaData) *QNetworkCacheMetaData { - ret := C.QNetworkCacheMetaData_new2(other.cPointer()) - return newQNetworkCacheMetaData(ret) + var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil + + C.QNetworkCacheMetaData_new2(other.cPointer(), &outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret.isSubclass = true + return ret } func (this *QNetworkCacheMetaData) OperatorAssign(other *QNetworkCacheMetaData) { @@ -215,7 +230,7 @@ func (this *QNetworkCacheMetaData) SetAttributes(attributes map[QNetworkRequest_ // Delete this object from C++ memory. func (this *QNetworkCacheMetaData) Delete() { - C.QNetworkCacheMetaData_Delete(this.h) + C.QNetworkCacheMetaData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -228,7 +243,8 @@ func (this *QNetworkCacheMetaData) GoGC() { } type QAbstractNetworkCache struct { - h *C.QAbstractNetworkCache + h *C.QAbstractNetworkCache + isSubclass bool *qt.QObject } @@ -246,15 +262,23 @@ func (this *QAbstractNetworkCache) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractNetworkCache(h *C.QAbstractNetworkCache) *QAbstractNetworkCache { +// newQAbstractNetworkCache constructs the type using only CGO pointers. +func newQAbstractNetworkCache(h *C.QAbstractNetworkCache, h_QObject *C.QObject) *QAbstractNetworkCache { if h == nil { return nil } - return &QAbstractNetworkCache{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractNetworkCache{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer) *QAbstractNetworkCache { - return newQAbstractNetworkCache((*C.QAbstractNetworkCache)(h)) +// UnsafeNewQAbstractNetworkCache constructs the type using only unsafe pointers. +func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractNetworkCache { + if h == nil { + return nil + } + + return &QAbstractNetworkCache{h: (*C.QAbstractNetworkCache)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } func (this *QAbstractNetworkCache) MetaObject() *qt.QMetaObject { @@ -297,7 +321,7 @@ func (this *QAbstractNetworkCache) UpdateMetaData(metaData *QNetworkCacheMetaDat } func (this *QAbstractNetworkCache) Data(url *qt.QUrl) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil) } func (this *QAbstractNetworkCache) Remove(url *qt.QUrl) bool { @@ -309,7 +333,7 @@ func (this *QAbstractNetworkCache) CacheSize() int64 { } func (this *QAbstractNetworkCache) Prepare(metaData *QNetworkCacheMetaData) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer()))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer())), nil) } func (this *QAbstractNetworkCache) Insert(device *qt.QIODevice) { @@ -366,7 +390,7 @@ func QAbstractNetworkCache_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractNetworkCache) Delete() { - C.QAbstractNetworkCache_Delete(this.h) + C.QAbstractNetworkCache_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qabstractnetworkcache.h b/qt/network/gen_qabstractnetworkcache.h index 3ef18e95..6643d34c 100644 --- a/qt/network/gen_qabstractnetworkcache.h +++ b/qt/network/gen_qabstractnetworkcache.h @@ -20,6 +20,7 @@ class QDateTime; class QIODevice; class QMetaObject; class QNetworkCacheMetaData; +class QObject; class QUrl; class QVariant; #else @@ -28,12 +29,13 @@ typedef struct QDateTime QDateTime; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkCacheMetaData QNetworkCacheMetaData; +typedef struct QObject QObject; typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QNetworkCacheMetaData* QNetworkCacheMetaData_new(); -QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other); +void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); +void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); void QNetworkCacheMetaData_Swap(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); bool QNetworkCacheMetaData_OperatorEqual(const QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); @@ -51,7 +53,7 @@ bool QNetworkCacheMetaData_SaveToDisk(const QNetworkCacheMetaData* self); void QNetworkCacheMetaData_SetSaveToDisk(QNetworkCacheMetaData* self, bool allow); struct miqt_map /* of int to QVariant* */ QNetworkCacheMetaData_Attributes(const QNetworkCacheMetaData* self); void QNetworkCacheMetaData_SetAttributes(QNetworkCacheMetaData* self, struct miqt_map /* of int to QVariant* */ attributes); -void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self); +void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass); QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self); void* QAbstractNetworkCache_Metacast(QAbstractNetworkCache* self, const char* param1); @@ -69,7 +71,7 @@ struct miqt_string QAbstractNetworkCache_Tr2(const char* s, const char* c); struct miqt_string QAbstractNetworkCache_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractNetworkCache_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractNetworkCache_TrUtf83(const char* s, const char* c, int n); -void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self); +void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qabstractsocket.cpp b/qt/network/gen_qabstractsocket.cpp index 33eff4b6..4359b832 100644 --- a/qt/network/gen_qabstractsocket.cpp +++ b/qt/network/gen_qabstractsocket.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -12,8 +13,683 @@ #include "gen_qabstractsocket.h" #include "_cgo_export.h" -QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent) { - return new QAbstractSocket(static_cast(socketType), parent); +class MiqtVirtualQAbstractSocket : public virtual QAbstractSocket { +public: + + MiqtVirtualQAbstractSocket(QAbstractSocket::SocketType socketType, QObject* parent): QAbstractSocket(socketType, parent) {}; + + virtual ~MiqtVirtualQAbstractSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QAbstractSocket::resume(); + return; + } + + + miqt_exec_callback_QAbstractSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QAbstractSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QAbstractSocket::connectToHost(hostName, port, mode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODevice::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QAbstractSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QAbstractSocket::connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost2 = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QHostAddress& address, quint16 port, QIODevice::OpenMode mode) override { + if (handle__ConnectToHost2 == 0) { + QAbstractSocket::connectToHost(address, port, mode); + return; + } + + const QHostAddress& address_ret = address; + // Cast returned reference into pointer + QHostAddress* sigval1 = const_cast(&address_ret); + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODevice::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + miqt_exec_callback_QAbstractSocket_ConnectToHost2(this, handle__ConnectToHost2, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost2(QHostAddress* address, uint16_t port, int mode) { + + QAbstractSocket::connectToHost(*address, static_cast(port), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QAbstractSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QAbstractSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QAbstractSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QAbstractSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QAbstractSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QAbstractSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QAbstractSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QAbstractSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QAbstractSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QAbstractSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QAbstractSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QAbstractSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual qintptr socketDescriptor() const override { + if (handle__SocketDescriptor == 0) { + return QAbstractSocket::socketDescriptor(); + } + + + intptr_t callback_return_value = miqt_exec_callback_QAbstractSocket_SocketDescriptor(const_cast(this), handle__SocketDescriptor); + + return (qintptr)(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_SocketDescriptor() const { + + qintptr _ret = QAbstractSocket::socketDescriptor(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODevice::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QAbstractSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODevice::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QAbstractSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QAbstractSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QAbstractSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QAbstractSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QAbstractSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QAbstractSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QAbstractSocket::close(); + return; + } + + + miqt_exec_callback_QAbstractSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QAbstractSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QAbstractSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QAbstractSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QAbstractSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QAbstractSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QAbstractSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QAbstractSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QAbstractSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QAbstractSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QAbstractSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QAbstractSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QAbstractSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QAbstractSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QAbstractSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QAbstractSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QAbstractSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QAbstractSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QAbstractSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QAbstractSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode mode) override { + if (handle__Open == 0) { + return QAbstractSocket::open(mode); + } + + QIODevice::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QAbstractSocket::open(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QAbstractSocket::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QAbstractSocket::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QAbstractSocket::size(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QAbstractSocket::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QAbstractSocket::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QAbstractSocket::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QAbstractSocket::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QAbstractSocket::reset(); + + } + +}; + +void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQAbstractSocket* ret = new MiqtVirtualQAbstractSocket(static_cast(socketType), parent); + *outptr_QAbstractSocket = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self) { @@ -67,13 +743,13 @@ bool QAbstractSocket_Bind2(QAbstractSocket* self) { return self->bind(); } -void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port) { +void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port)); + self->connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); } -void QAbstractSocket_ConnectToHost2(QAbstractSocket* self, QHostAddress* address, uint16_t port) { - self->connectToHost(*address, static_cast(port)); +void QAbstractSocket_ConnectToHost2(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode) { + self->connectToHost(*address, static_cast(port), static_cast(mode)); } void QAbstractSocket_DisconnectFromHost(QAbstractSocket* self) { @@ -145,8 +821,8 @@ intptr_t QAbstractSocket_SocketDescriptor(const QAbstractSocket* self) { return static_cast(_ret); } -bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor) { - return self->setSocketDescriptor((qintptr)(socketDescriptor)); +bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode) { + return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); } void QAbstractSocket_SetSocketOption(QAbstractSocket* self, int option, QVariant* value) { @@ -188,20 +864,20 @@ bool QAbstractSocket_Flush(QAbstractSocket* self) { return self->flush(); } -bool QAbstractSocket_WaitForConnected(QAbstractSocket* self) { - return self->waitForConnected(); +bool QAbstractSocket_WaitForConnected(QAbstractSocket* self, int msecs) { + return self->waitForConnected(static_cast(msecs)); } -bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self) { - return self->waitForReadyRead(); +bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } -bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self) { - return self->waitForBytesWritten(); +bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } -bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self) { - return self->waitForDisconnected(); +bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self, int msecs) { + return self->waitForDisconnected(static_cast(msecs)); } void QAbstractSocket_SetProxy(QAbstractSocket* self, QNetworkProxy* networkProxy) { @@ -233,7 +909,7 @@ void QAbstractSocket_HostFound(QAbstractSocket* self) { } void QAbstractSocket_connect_HostFound(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::hostFound), self, [=]() { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::hostFound), self, [=]() { miqt_exec_callback_QAbstractSocket_HostFound(slot); }); } @@ -243,7 +919,7 @@ void QAbstractSocket_Connected(QAbstractSocket* self) { } void QAbstractSocket_connect_Connected(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::connected), self, [=]() { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::connected), self, [=]() { miqt_exec_callback_QAbstractSocket_Connected(slot); }); } @@ -253,7 +929,7 @@ void QAbstractSocket_Disconnected(QAbstractSocket* self) { } void QAbstractSocket_connect_Disconnected(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::disconnected), self, [=]() { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::disconnected), self, [=]() { miqt_exec_callback_QAbstractSocket_Disconnected(slot); }); } @@ -263,7 +939,7 @@ void QAbstractSocket_StateChanged(QAbstractSocket* self, int param1) { } void QAbstractSocket_connect_StateChanged(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::stateChanged), self, [=](QAbstractSocket::SocketState param1) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::stateChanged), self, [=](QAbstractSocket::SocketState param1) { QAbstractSocket::SocketState param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractSocket_StateChanged(slot, sigval1); @@ -275,7 +951,7 @@ void QAbstractSocket_ErrorWithQAbstractSocketSocketError(QAbstractSocket* self, } void QAbstractSocket_connect_ErrorWithQAbstractSocketSocketError(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::error), self, [=](QAbstractSocket::SocketError param1) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::error), self, [=](QAbstractSocket::SocketError param1) { QAbstractSocket::SocketError param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractSocket_ErrorWithQAbstractSocketSocketError(slot, sigval1); @@ -287,7 +963,7 @@ void QAbstractSocket_ErrorOccurred(QAbstractSocket* self, int param1) { } void QAbstractSocket_connect_ErrorOccurred(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::errorOccurred), self, [=](QAbstractSocket::SocketError param1) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::errorOccurred), self, [=](QAbstractSocket::SocketError param1) { QAbstractSocket::SocketError param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractSocket_ErrorOccurred(slot, sigval1); @@ -299,7 +975,7 @@ void QAbstractSocket_ProxyAuthenticationRequired(QAbstractSocket* self, QNetwork } void QAbstractSocket_connect_ProxyAuthenticationRequired(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { const QNetworkProxy& proxy_ret = proxy; // Cast returned reference into pointer QNetworkProxy* sigval1 = const_cast(&proxy_ret); @@ -368,45 +1044,227 @@ bool QAbstractSocket_Bind23(QAbstractSocket* self, uint16_t port, int mode) { return self->bind(static_cast(port), static_cast(mode)); } -void QAbstractSocket_ConnectToHost3(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(mode)); +void QAbstractSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Resume = slot; } -void QAbstractSocket_ConnectToHost4(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); +void QAbstractSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Resume(); } -void QAbstractSocket_ConnectToHost32(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode) { - self->connectToHost(*address, static_cast(port), static_cast(mode)); +void QAbstractSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ConnectToHost = slot; } -bool QAbstractSocket_SetSocketDescriptor2(QAbstractSocket* self, intptr_t socketDescriptor, int state) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state)); +void QAbstractSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, mode, protocol); } -bool QAbstractSocket_SetSocketDescriptor3(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); +void QAbstractSocket_override_virtual_ConnectToHost2(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ConnectToHost2 = slot; } -bool QAbstractSocket_WaitForConnected1(QAbstractSocket* self, int msecs) { - return self->waitForConnected(static_cast(msecs)); +void QAbstractSocket_virtualbase_ConnectToHost2(void* self, QHostAddress* address, uint16_t port, int mode) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ConnectToHost2(address, port, mode); } -bool QAbstractSocket_WaitForReadyRead1(QAbstractSocket* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); +void QAbstractSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__DisconnectFromHost = slot; } -bool QAbstractSocket_WaitForBytesWritten1(QAbstractSocket* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); +void QAbstractSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_DisconnectFromHost(); } -bool QAbstractSocket_WaitForDisconnected1(QAbstractSocket* self, int msecs) { - return self->waitForDisconnected(static_cast(msecs)); +void QAbstractSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QAbstractSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QAbstractSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QAbstractSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QAbstractSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QAbstractSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QAbstractSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QAbstractSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QAbstractSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SocketDescriptor = slot; +} + +intptr_t QAbstractSocket_virtualbase_SocketDescriptor(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SocketDescriptor(); +} + +void QAbstractSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QAbstractSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QAbstractSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QAbstractSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QAbstractSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QAbstractSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QAbstractSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Close = slot; +} + +void QAbstractSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Close(); +} + +void QAbstractSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__IsSequential = slot; +} + +bool QAbstractSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_IsSequential(); +} + +void QAbstractSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__AtEnd = slot; +} + +bool QAbstractSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_AtEnd(); +} + +void QAbstractSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QAbstractSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QAbstractSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QAbstractSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QAbstractSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QAbstractSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QAbstractSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QAbstractSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QAbstractSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ReadData = slot; +} + +long long QAbstractSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QAbstractSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QAbstractSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QAbstractSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WriteData = slot; +} + +long long QAbstractSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QAbstractSocket_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Open = slot; +} + +bool QAbstractSocket_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Open(mode); +} + +void QAbstractSocket_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Pos = slot; +} + +long long QAbstractSocket_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Pos(); +} + +void QAbstractSocket_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Size = slot; +} + +long long QAbstractSocket_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Size(); +} + +void QAbstractSocket_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Seek = slot; +} + +bool QAbstractSocket_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Seek(pos); +} + +void QAbstractSocket_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Reset = slot; +} + +bool QAbstractSocket_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Reset(); } -void QAbstractSocket_Delete(QAbstractSocket* self) { - delete self; +void QAbstractSocket_Delete(QAbstractSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qabstractsocket.go b/qt/network/gen_qabstractsocket.go index 27ae05dc..2a28b9fe 100644 --- a/qt/network/gen_qabstractsocket.go +++ b/qt/network/gen_qabstractsocket.go @@ -104,7 +104,8 @@ const ( ) type QAbstractSocket struct { - h *C.QAbstractSocket + h *C.QAbstractSocket + isSubclass bool *qt.QIODevice } @@ -122,21 +123,35 @@ func (this *QAbstractSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractSocket(h *C.QAbstractSocket) *QAbstractSocket { +// newQAbstractSocket constructs the type using only CGO pointers. +func newQAbstractSocket(h *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QAbstractSocket { if h == nil { return nil } - return &QAbstractSocket{h: h, QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QAbstractSocket{h: h, + QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractSocket(h unsafe.Pointer) *QAbstractSocket { - return newQAbstractSocket((*C.QAbstractSocket)(h)) +// UnsafeNewQAbstractSocket constructs the type using only unsafe pointers. +func UnsafeNewQAbstractSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractSocket { + if h == nil { + return nil + } + + return &QAbstractSocket{h: (*C.QAbstractSocket)(h), + QIODevice: qt.UnsafeNewQIODevice(h_QIODevice, h_QObject)} } // NewQAbstractSocket constructs a new QAbstractSocket object. func NewQAbstractSocket(socketType QAbstractSocket__SocketType, parent *qt.QObject) *QAbstractSocket { - ret := C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer())) - return newQAbstractSocket(ret) + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQAbstractSocket(outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAbstractSocket) MetaObject() *qt.QMetaObject { @@ -187,16 +202,16 @@ func (this *QAbstractSocket) Bind2() bool { return (bool)(C.QAbstractSocket_Bind2(this.h)) } -func (this *QAbstractSocket) ConnectToHost(hostName string, port uint16) { +func (this *QAbstractSocket) ConnectToHost(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { hostName_ms := C.struct_miqt_string{} hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QAbstractSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port)) + C.QAbstractSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) } -func (this *QAbstractSocket) ConnectToHost2(address *QHostAddress, port uint16) { - C.QAbstractSocket_ConnectToHost2(this.h, address.cPointer(), (C.uint16_t)(port)) +func (this *QAbstractSocket) ConnectToHost2(address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag) { + C.QAbstractSocket_ConnectToHost2(this.h, address.cPointer(), (C.uint16_t)(port), (C.int)(mode)) } func (this *QAbstractSocket) DisconnectFromHost() { @@ -264,8 +279,8 @@ func (this *QAbstractSocket) SocketDescriptor() uintptr { return (uintptr)(C.QAbstractSocket_SocketDescriptor(this.h)) } -func (this *QAbstractSocket) SetSocketDescriptor(socketDescriptor uintptr) bool { - return (bool)(C.QAbstractSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor))) +func (this *QAbstractSocket) SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { + return (bool)(C.QAbstractSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) } func (this *QAbstractSocket) SetSocketOption(option QAbstractSocket__SocketOption, value *qt.QVariant) { @@ -307,20 +322,20 @@ func (this *QAbstractSocket) Flush() bool { return (bool)(C.QAbstractSocket_Flush(this.h)) } -func (this *QAbstractSocket) WaitForConnected() bool { - return (bool)(C.QAbstractSocket_WaitForConnected(this.h)) +func (this *QAbstractSocket) WaitForConnected(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForConnected(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForReadyRead() bool { - return (bool)(C.QAbstractSocket_WaitForReadyRead(this.h)) +func (this *QAbstractSocket) WaitForReadyRead(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForReadyRead(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForBytesWritten() bool { - return (bool)(C.QAbstractSocket_WaitForBytesWritten(this.h)) +func (this *QAbstractSocket) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForBytesWritten(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForDisconnected() bool { - return (bool)(C.QAbstractSocket_WaitForDisconnected(this.h)) +func (this *QAbstractSocket) WaitForDisconnected(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForDisconnected(this.h, (C.int)(msecs))) } func (this *QAbstractSocket) SetProxy(networkProxy *QNetworkProxy) { @@ -541,53 +556,673 @@ func (this *QAbstractSocket) Bind23(port uint16, mode QAbstractSocket__BindFlag) return (bool)(C.QAbstractSocket_Bind23(this.h, (C.uint16_t)(port), (C.int)(mode))) } -func (this *QAbstractSocket) ConnectToHost3(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag) { - hostName_ms := C.struct_miqt_string{} - hostName_ms.data = C.CString(hostName) - hostName_ms.len = C.size_t(len(hostName)) - defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QAbstractSocket_ConnectToHost3(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(mode)) +func (this *QAbstractSocket) callVirtualBase_Resume() { + + C.QAbstractSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSocket) OnResume(slot func(super func())) { + C.QAbstractSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QAbstractSocket) ConnectToHost4(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { +//export miqt_exec_callback_QAbstractSocket_Resume +func miqt_exec_callback_QAbstractSocket_Resume(self *C.QAbstractSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QAbstractSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { hostName_ms := C.struct_miqt_string{} hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QAbstractSocket_ConnectToHost4(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + + C.QAbstractSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + } +func (this *QAbstractSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QAbstractSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ConnectToHost +func miqt_exec_callback_QAbstractSocket_ConnectToHost(self *C.QAbstractSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, mode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt.QIODevice__OpenModeFlag)(mode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) -func (this *QAbstractSocket) ConnectToHost32(address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag) { - C.QAbstractSocket_ConnectToHost32(this.h, address.cPointer(), (C.uint16_t)(port), (C.int)(mode)) } -func (this *QAbstractSocket) SetSocketDescriptor2(socketDescriptor uintptr, state QAbstractSocket__SocketState) bool { - return (bool)(C.QAbstractSocket_SetSocketDescriptor2(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state))) +func (this *QAbstractSocket) callVirtualBase_ConnectToHost2(address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag) { + + C.QAbstractSocket_virtualbase_ConnectToHost2(unsafe.Pointer(this.h), address.cPointer(), (C.uint16_t)(port), (C.int)(mode)) + } +func (this *QAbstractSocket) OnConnectToHost2(slot func(super func(address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag), address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag)) { + C.QAbstractSocket_override_virtual_ConnectToHost2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ConnectToHost2 +func miqt_exec_callback_QAbstractSocket_ConnectToHost2(self *C.QAbstractSocket, cb C.intptr_t, address *C.QHostAddress, port C.uint16_t, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag), address *QHostAddress, port uint16, mode qt.QIODevice__OpenModeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHostAddress(unsafe.Pointer(address)) + slotval2 := (uint16)(port) + + slotval3 := (qt.QIODevice__OpenModeFlag)(mode) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_ConnectToHost2, slotval1, slotval2, slotval3) -func (this *QAbstractSocket) SetSocketDescriptor3(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { - return (bool)(C.QAbstractSocket_SetSocketDescriptor3(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) } -func (this *QAbstractSocket) WaitForConnected1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForConnected1(this.h, (C.int)(msecs))) +func (this *QAbstractSocket) callVirtualBase_DisconnectFromHost() { + + C.QAbstractSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSocket) OnDisconnectFromHost(slot func(super func())) { + C.QAbstractSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QAbstractSocket) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForReadyRead1(this.h, (C.int)(msecs))) +//export miqt_exec_callback_QAbstractSocket_DisconnectFromHost +func miqt_exec_callback_QAbstractSocket_DisconnectFromHost(self *C.QAbstractSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QAbstractSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_BytesAvailable +func miqt_exec_callback_QAbstractSocket_BytesAvailable(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QAbstractSocket) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForBytesWritten1(this.h, (C.int)(msecs))) +//export miqt_exec_callback_QAbstractSocket_BytesToWrite +func miqt_exec_callback_QAbstractSocket_BytesToWrite(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QAbstractSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_CanReadLine +func miqt_exec_callback_QAbstractSocket_CanReadLine(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QAbstractSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QAbstractSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QAbstractSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SetReadBufferSize +func miqt_exec_callback_QAbstractSocket_SetReadBufferSize(self *C.QAbstractSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QAbstractSocket) callVirtualBase_SocketDescriptor() uintptr { + + return (uintptr)(C.QAbstractSocket_virtualbase_SocketDescriptor(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnSocketDescriptor(slot func(super func() uintptr) uintptr) { + C.QAbstractSocket_override_virtual_SocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SocketDescriptor +func miqt_exec_callback_QAbstractSocket_SocketDescriptor(self *C.QAbstractSocket, cb C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SocketDescriptor) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { + + return (bool)(C.QAbstractSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QAbstractSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) { + C.QAbstractSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SetSocketDescriptor +func miqt_exec_callback_QAbstractSocket_SetSocketDescriptor(self *C.QAbstractSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt.QIODevice__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt.QVariant) { + + C.QAbstractSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QAbstractSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) { + C.QAbstractSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SetSocketOption +func miqt_exec_callback_QAbstractSocket_SetSocketOption(self *C.QAbstractSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QAbstractSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt.QVariant { + + _ret := C.QAbstractSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) { + C.QAbstractSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SocketOption +func miqt_exec_callback_QAbstractSocket_SocketOption(self *C.QAbstractSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QAbstractSocket) callVirtualBase_Close() { + + C.QAbstractSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSocket) OnClose(slot func(super func())) { + C.QAbstractSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Close +func miqt_exec_callback_QAbstractSocket_Close(self *C.QAbstractSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QAbstractSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QAbstractSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_IsSequential +func miqt_exec_callback_QAbstractSocket_IsSequential(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + } -func (this *QAbstractSocket) WaitForDisconnected1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForDisconnected1(this.h, (C.int)(msecs))) +func (this *QAbstractSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QAbstractSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_AtEnd +func miqt_exec_callback_QAbstractSocket_AtEnd(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForConnected +func miqt_exec_callback_QAbstractSocket_WaitForConnected(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForReadyRead +func miqt_exec_callback_QAbstractSocket_WaitForReadyRead(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForBytesWritten +func miqt_exec_callback_QAbstractSocket_WaitForBytesWritten(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForDisconnected +func miqt_exec_callback_QAbstractSocket_WaitForDisconnected(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QAbstractSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QAbstractSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QAbstractSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ReadData +func miqt_exec_callback_QAbstractSocket_ReadData(self *C.QAbstractSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QAbstractSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QAbstractSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QAbstractSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ReadLineData +func miqt_exec_callback_QAbstractSocket_ReadLineData(self *C.QAbstractSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QAbstractSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QAbstractSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QAbstractSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WriteData +func miqt_exec_callback_QAbstractSocket_WriteData(self *C.QAbstractSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Open(mode qt.QIODevice__OpenModeFlag) bool { + + return (bool)(C.QAbstractSocket_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QAbstractSocket) OnOpen(slot func(super func(mode qt.QIODevice__OpenModeFlag) bool, mode qt.QIODevice__OpenModeFlag) bool) { + C.QAbstractSocket_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Open +func miqt_exec_callback_QAbstractSocket_Open(self *C.QAbstractSocket, cb C.intptr_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode qt.QIODevice__OpenModeFlag) bool, mode qt.QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QIODevice__OpenModeFlag)(mode) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Pos() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnPos(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Pos +func miqt_exec_callback_QAbstractSocket_Pos(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Size() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnSize(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Size +func miqt_exec_callback_QAbstractSocket_Size(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QAbstractSocket_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QAbstractSocket) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QAbstractSocket_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Seek +func miqt_exec_callback_QAbstractSocket_Seek(self *C.QAbstractSocket, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Reset() bool { + + return (bool)(C.QAbstractSocket_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnReset(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Reset +func miqt_exec_callback_QAbstractSocket_Reset(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QAbstractSocket) Delete() { - C.QAbstractSocket_Delete(this.h) + C.QAbstractSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qabstractsocket.h b/qt/network/gen_qabstractsocket.h index 0be39193..6464ad51 100644 --- a/qt/network/gen_qabstractsocket.h +++ b/qt/network/gen_qabstractsocket.h @@ -18,6 +18,7 @@ extern "C" { class QAbstractSocket; class QAuthenticator; class QHostAddress; +class QIODevice; class QMetaObject; class QNetworkProxy; class QObject; @@ -26,13 +27,14 @@ class QVariant; typedef struct QAbstractSocket QAbstractSocket; typedef struct QAuthenticator QAuthenticator; typedef struct QHostAddress QHostAddress; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkProxy QNetworkProxy; typedef struct QObject QObject; typedef struct QVariant QVariant; #endif -QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent); +void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self); void* QAbstractSocket_Metacast(QAbstractSocket* self, const char* param1); struct miqt_string QAbstractSocket_Tr(const char* s); @@ -42,8 +44,8 @@ int QAbstractSocket_PauseMode(const QAbstractSocket* self); void QAbstractSocket_SetPauseMode(QAbstractSocket* self, int pauseMode); bool QAbstractSocket_Bind(QAbstractSocket* self, QHostAddress* address); bool QAbstractSocket_Bind2(QAbstractSocket* self); -void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port); -void QAbstractSocket_ConnectToHost2(QAbstractSocket* self, QHostAddress* address, uint16_t port); +void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QAbstractSocket_ConnectToHost2(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); void QAbstractSocket_DisconnectFromHost(QAbstractSocket* self); bool QAbstractSocket_IsValid(const QAbstractSocket* self); long long QAbstractSocket_BytesAvailable(const QAbstractSocket* self); @@ -58,7 +60,7 @@ long long QAbstractSocket_ReadBufferSize(const QAbstractSocket* self); void QAbstractSocket_SetReadBufferSize(QAbstractSocket* self, long long size); void QAbstractSocket_Abort(QAbstractSocket* self); intptr_t QAbstractSocket_SocketDescriptor(const QAbstractSocket* self); -bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor); +bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode); void QAbstractSocket_SetSocketOption(QAbstractSocket* self, int option, QVariant* value); QVariant* QAbstractSocket_SocketOption(QAbstractSocket* self, int option); int QAbstractSocket_SocketType(const QAbstractSocket* self); @@ -68,10 +70,10 @@ void QAbstractSocket_Close(QAbstractSocket* self); bool QAbstractSocket_IsSequential(const QAbstractSocket* self); bool QAbstractSocket_AtEnd(const QAbstractSocket* self); bool QAbstractSocket_Flush(QAbstractSocket* self); -bool QAbstractSocket_WaitForConnected(QAbstractSocket* self); -bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self); -bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self); -bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self); +bool QAbstractSocket_WaitForConnected(QAbstractSocket* self, int msecs); +bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self, int msecs); +bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self, int msecs); +bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self, int msecs); void QAbstractSocket_SetProxy(QAbstractSocket* self, QNetworkProxy* networkProxy); QNetworkProxy* QAbstractSocket_Proxy(const QAbstractSocket* self); struct miqt_string QAbstractSocket_ProtocolTag(const QAbstractSocket* self); @@ -90,6 +92,9 @@ void QAbstractSocket_ErrorOccurred(QAbstractSocket* self, int param1); void QAbstractSocket_connect_ErrorOccurred(QAbstractSocket* self, intptr_t slot); void QAbstractSocket_ProxyAuthenticationRequired(QAbstractSocket* self, QNetworkProxy* proxy, QAuthenticator* authenticator); void QAbstractSocket_connect_ProxyAuthenticationRequired(QAbstractSocket* self, intptr_t slot); +long long QAbstractSocket_ReadData(QAbstractSocket* self, char* data, long long maxlen); +long long QAbstractSocket_ReadLineData(QAbstractSocket* self, char* data, long long maxlen); +long long QAbstractSocket_WriteData(QAbstractSocket* self, const char* data, long long lenVal); struct miqt_string QAbstractSocket_Tr2(const char* s, const char* c); struct miqt_string QAbstractSocket_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractSocket_TrUtf82(const char* s, const char* c); @@ -98,16 +103,61 @@ bool QAbstractSocket_Bind22(QAbstractSocket* self, QHostAddress* address, uint16 bool QAbstractSocket_Bind3(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); bool QAbstractSocket_Bind1(QAbstractSocket* self, uint16_t port); bool QAbstractSocket_Bind23(QAbstractSocket* self, uint16_t port, int mode); -void QAbstractSocket_ConnectToHost3(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode); -void QAbstractSocket_ConnectToHost4(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); -void QAbstractSocket_ConnectToHost32(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); -bool QAbstractSocket_SetSocketDescriptor2(QAbstractSocket* self, intptr_t socketDescriptor, int state); -bool QAbstractSocket_SetSocketDescriptor3(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode); -bool QAbstractSocket_WaitForConnected1(QAbstractSocket* self, int msecs); -bool QAbstractSocket_WaitForReadyRead1(QAbstractSocket* self, int msecs); -bool QAbstractSocket_WaitForBytesWritten1(QAbstractSocket* self, int msecs); -bool QAbstractSocket_WaitForDisconnected1(QAbstractSocket* self, int msecs); -void QAbstractSocket_Delete(QAbstractSocket* self); +void QAbstractSocket_override_virtual_Resume(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_Resume(void* self); +void QAbstractSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QAbstractSocket_override_virtual_ConnectToHost2(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_ConnectToHost2(void* self, QHostAddress* address, uint16_t port, int mode); +void QAbstractSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_DisconnectFromHost(void* self); +void QAbstractSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_BytesAvailable(const void* self); +void QAbstractSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_BytesToWrite(const void* self); +void QAbstractSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_CanReadLine(const void* self); +void QAbstractSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QAbstractSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot); +intptr_t QAbstractSocket_virtualbase_SocketDescriptor(const void* self); +void QAbstractSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QAbstractSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QAbstractSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QAbstractSocket_virtualbase_SocketOption(void* self, int option); +void QAbstractSocket_override_virtual_Close(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_Close(void* self); +void QAbstractSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_IsSequential(const void* self); +void QAbstractSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_AtEnd(const void* self); +void QAbstractSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QAbstractSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QAbstractSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QAbstractSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QAbstractSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QAbstractSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QAbstractSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QAbstractSocket_override_virtual_Open(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Open(void* self, int mode); +void QAbstractSocket_override_virtual_Pos(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_Pos(const void* self); +void QAbstractSocket_override_virtual_Size(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_Size(const void* self); +void QAbstractSocket_override_virtual_Seek(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Seek(void* self, long long pos); +void QAbstractSocket_override_virtual_Reset(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Reset(void* self); +void QAbstractSocket_Delete(QAbstractSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qauthenticator.cpp b/qt/network/gen_qauthenticator.cpp index 7561038f..d079a9d4 100644 --- a/qt/network/gen_qauthenticator.cpp +++ b/qt/network/gen_qauthenticator.cpp @@ -8,12 +8,14 @@ #include "gen_qauthenticator.h" #include "_cgo_export.h" -QAuthenticator* QAuthenticator_new() { - return new QAuthenticator(); +void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator) { + QAuthenticator* ret = new QAuthenticator(); + *outptr_QAuthenticator = ret; } -QAuthenticator* QAuthenticator_new2(QAuthenticator* other) { - return new QAuthenticator(*other); +void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator) { + QAuthenticator* ret = new QAuthenticator(*other); + *outptr_QAuthenticator = ret; } void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other) { @@ -119,7 +121,11 @@ void QAuthenticator_Detach(QAuthenticator* self) { self->detach(); } -void QAuthenticator_Delete(QAuthenticator* self) { - delete self; +void QAuthenticator_Delete(QAuthenticator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qauthenticator.go b/qt/network/gen_qauthenticator.go index b97f78e9..1cfb92e6 100644 --- a/qt/network/gen_qauthenticator.go +++ b/qt/network/gen_qauthenticator.go @@ -15,7 +15,8 @@ import ( ) type QAuthenticator struct { - h *C.QAuthenticator + h *C.QAuthenticator + isSubclass bool } func (this *QAuthenticator) cPointer() *C.QAuthenticator { @@ -32,6 +33,7 @@ func (this *QAuthenticator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAuthenticator constructs the type using only CGO pointers. func newQAuthenticator(h *C.QAuthenticator) *QAuthenticator { if h == nil { return nil @@ -39,20 +41,33 @@ func newQAuthenticator(h *C.QAuthenticator) *QAuthenticator { return &QAuthenticator{h: h} } +// UnsafeNewQAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQAuthenticator(h unsafe.Pointer) *QAuthenticator { - return newQAuthenticator((*C.QAuthenticator)(h)) + if h == nil { + return nil + } + + return &QAuthenticator{h: (*C.QAuthenticator)(h)} } // NewQAuthenticator constructs a new QAuthenticator object. func NewQAuthenticator() *QAuthenticator { - ret := C.QAuthenticator_new() - return newQAuthenticator(ret) + var outptr_QAuthenticator *C.QAuthenticator = nil + + C.QAuthenticator_new(&outptr_QAuthenticator) + ret := newQAuthenticator(outptr_QAuthenticator) + ret.isSubclass = true + return ret } // NewQAuthenticator2 constructs a new QAuthenticator object. func NewQAuthenticator2(other *QAuthenticator) *QAuthenticator { - ret := C.QAuthenticator_new2(other.cPointer()) - return newQAuthenticator(ret) + var outptr_QAuthenticator *C.QAuthenticator = nil + + C.QAuthenticator_new2(other.cPointer(), &outptr_QAuthenticator) + ret := newQAuthenticator(outptr_QAuthenticator) + ret.isSubclass = true + return ret } func (this *QAuthenticator) OperatorAssign(other *QAuthenticator) { @@ -161,7 +176,7 @@ func (this *QAuthenticator) Detach() { // Delete this object from C++ memory. func (this *QAuthenticator) Delete() { - C.QAuthenticator_Delete(this.h) + C.QAuthenticator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qauthenticator.h b/qt/network/gen_qauthenticator.h index 3fb382e2..83f96c15 100644 --- a/qt/network/gen_qauthenticator.h +++ b/qt/network/gen_qauthenticator.h @@ -22,8 +22,8 @@ typedef struct QAuthenticator QAuthenticator; typedef struct QVariant QVariant; #endif -QAuthenticator* QAuthenticator_new(); -QAuthenticator* QAuthenticator_new2(QAuthenticator* other); +void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator); +void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator); void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorEqual(const QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorNotEqual(const QAuthenticator* self, QAuthenticator* other); @@ -38,7 +38,7 @@ struct miqt_map /* of struct miqt_string to QVariant* */ QAuthenticator_Options void QAuthenticator_SetOption(QAuthenticator* self, struct miqt_string opt, QVariant* value); bool QAuthenticator_IsNull(const QAuthenticator* self); void QAuthenticator_Detach(QAuthenticator* self); -void QAuthenticator_Delete(QAuthenticator* self); +void QAuthenticator_Delete(QAuthenticator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qdnslookup.cpp b/qt/network/gen_qdnslookup.cpp index 7fc26fd5..30b9fb67 100644 --- a/qt/network/gen_qdnslookup.cpp +++ b/qt/network/gen_qdnslookup.cpp @@ -1,27 +1,33 @@ #include +#include #include #include #include #include #include #include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qdnslookup.h" #include "_cgo_export.h" -QDnsDomainNameRecord* QDnsDomainNameRecord_new() { - return new QDnsDomainNameRecord(); +void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { + QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(); + *outptr_QDnsDomainNameRecord = ret; } -QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other) { - return new QDnsDomainNameRecord(*other); +void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { + QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(*other); + *outptr_QDnsDomainNameRecord = ret; } void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other) { @@ -59,16 +65,22 @@ struct miqt_string QDnsDomainNameRecord_Value(const QDnsDomainNameRecord* self) return _ms; } -void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self) { - delete self; +void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsHostAddressRecord* QDnsHostAddressRecord_new() { - return new QDnsHostAddressRecord(); +void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { + QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(); + *outptr_QDnsHostAddressRecord = ret; } -QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other) { - return new QDnsHostAddressRecord(*other); +void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { + QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(*other); + *outptr_QDnsHostAddressRecord = ret; } void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other) { @@ -99,16 +111,22 @@ QHostAddress* QDnsHostAddressRecord_Value(const QDnsHostAddressRecord* self) { return new QHostAddress(self->value()); } -void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self) { - delete self; +void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new() { - return new QDnsMailExchangeRecord(); +void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { + QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(); + *outptr_QDnsMailExchangeRecord = ret; } -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other) { - return new QDnsMailExchangeRecord(*other); +void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { + QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(*other); + *outptr_QDnsMailExchangeRecord = ret; } void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other) { @@ -151,16 +169,22 @@ unsigned int QDnsMailExchangeRecord_TimeToLive(const QDnsMailExchangeRecord* sel return static_cast(_ret); } -void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self) { - delete self; +void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsServiceRecord* QDnsServiceRecord_new() { - return new QDnsServiceRecord(); +void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord) { + QDnsServiceRecord* ret = new QDnsServiceRecord(); + *outptr_QDnsServiceRecord = ret; } -QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other) { - return new QDnsServiceRecord(*other); +void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord) { + QDnsServiceRecord* ret = new QDnsServiceRecord(*other); + *outptr_QDnsServiceRecord = ret; } void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other) { @@ -213,16 +237,22 @@ uint16_t QDnsServiceRecord_Weight(const QDnsServiceRecord* self) { return static_cast(_ret); } -void QDnsServiceRecord_Delete(QDnsServiceRecord* self) { - delete self; +void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsTextRecord* QDnsTextRecord_new() { - return new QDnsTextRecord(); +void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord) { + QDnsTextRecord* ret = new QDnsTextRecord(); + *outptr_QDnsTextRecord = ret; } -QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other) { - return new QDnsTextRecord(*other); +void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord) { + QDnsTextRecord* ret = new QDnsTextRecord(*other); + *outptr_QDnsTextRecord = ret; } void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other) { @@ -267,36 +297,237 @@ struct miqt_array /* of struct miqt_string */ QDnsTextRecord_Values(const QDnsT return _out; } -void QDnsTextRecord_Delete(QDnsTextRecord* self) { - delete self; +void QDnsTextRecord_Delete(QDnsTextRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsLookup* QDnsLookup_new() { - return new QDnsLookup(); +class MiqtVirtualQDnsLookup : public virtual QDnsLookup { +public: + + MiqtVirtualQDnsLookup(): QDnsLookup() {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name): QDnsLookup(typeVal, name) {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name, const QHostAddress& nameserver): QDnsLookup(typeVal, name, nameserver) {}; + MiqtVirtualQDnsLookup(QObject* parent): QDnsLookup(parent) {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name, QObject* parent): QDnsLookup(typeVal, name, parent) {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name, const QHostAddress& nameserver, QObject* parent): QDnsLookup(typeVal, name, nameserver, parent) {}; + + virtual ~MiqtVirtualQDnsLookup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDnsLookup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDnsLookup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDnsLookup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDnsLookup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDnsLookup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDnsLookup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDnsLookup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDnsLookup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDnsLookup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDnsLookup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDnsLookup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDnsLookup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDnsLookup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDnsLookup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDnsLookup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDnsLookup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDnsLookup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDnsLookup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDnsLookup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDnsLookup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDnsLookup::disconnectNotify(*signal); + + } + +}; + +void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name) { +void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver) { +void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString, *nameserver); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new4(QObject* parent) { - return new QDnsLookup(parent); +void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(parent); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent) { +void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString, parent); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, parent); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent) { +void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self) { @@ -486,7 +717,7 @@ void QDnsLookup_Finished(QDnsLookup* self) { } void QDnsLookup_connect_Finished(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::finished), self, [=]() { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::finished), self, [=]() { miqt_exec_callback_QDnsLookup_Finished(slot); }); } @@ -497,7 +728,7 @@ void QDnsLookup_NameChanged(QDnsLookup* self, struct miqt_string name) { } void QDnsLookup_connect_NameChanged(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::nameChanged), self, [=](const QString& name) { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::nameChanged), self, [=](const QString& name) { const QString name_ret = name; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray name_b = name_ret.toUtf8(); @@ -515,7 +746,7 @@ void QDnsLookup_TypeChanged(QDnsLookup* self, int typeVal) { } void QDnsLookup_connect_TypeChanged(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::typeChanged), self, [=](QDnsLookup::Type typeVal) { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::typeChanged), self, [=](QDnsLookup::Type typeVal) { QDnsLookup::Type typeVal_ret = typeVal; int sigval1 = static_cast(typeVal_ret); miqt_exec_callback_QDnsLookup_TypeChanged(slot, sigval1); @@ -527,7 +758,7 @@ void QDnsLookup_NameserverChanged(QDnsLookup* self, QHostAddress* nameserver) { } void QDnsLookup_connect_NameserverChanged(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::nameserverChanged), self, [=](const QHostAddress& nameserver) { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::nameserverChanged), self, [=](const QHostAddress& nameserver) { const QHostAddress& nameserver_ret = nameserver; // Cast returned reference into pointer QHostAddress* sigval1 = const_cast(&nameserver_ret); @@ -579,7 +810,67 @@ struct miqt_string QDnsLookup_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QDnsLookup_Delete(QDnsLookup* self) { - delete self; +void QDnsLookup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__Event = slot; +} + +bool QDnsLookup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_Event(event); +} + +void QDnsLookup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__EventFilter = slot; +} + +bool QDnsLookup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QDnsLookup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__TimerEvent = slot; +} + +void QDnsLookup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_TimerEvent(event); +} + +void QDnsLookup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__ChildEvent = slot; +} + +void QDnsLookup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_ChildEvent(event); +} + +void QDnsLookup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__CustomEvent = slot; +} + +void QDnsLookup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_CustomEvent(event); +} + +void QDnsLookup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__ConnectNotify = slot; +} + +void QDnsLookup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDnsLookup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__DisconnectNotify = slot; +} + +void QDnsLookup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDnsLookup_Delete(QDnsLookup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qdnslookup.go b/qt/network/gen_qdnslookup.go index 7a7cfe39..b0fa37a8 100644 --- a/qt/network/gen_qdnslookup.go +++ b/qt/network/gen_qdnslookup.go @@ -43,7 +43,8 @@ const ( ) type QDnsDomainNameRecord struct { - h *C.QDnsDomainNameRecord + h *C.QDnsDomainNameRecord + isSubclass bool } func (this *QDnsDomainNameRecord) cPointer() *C.QDnsDomainNameRecord { @@ -60,6 +61,7 @@ func (this *QDnsDomainNameRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsDomainNameRecord constructs the type using only CGO pointers. func newQDnsDomainNameRecord(h *C.QDnsDomainNameRecord) *QDnsDomainNameRecord { if h == nil { return nil @@ -67,20 +69,33 @@ func newQDnsDomainNameRecord(h *C.QDnsDomainNameRecord) *QDnsDomainNameRecord { return &QDnsDomainNameRecord{h: h} } +// UnsafeNewQDnsDomainNameRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsDomainNameRecord(h unsafe.Pointer) *QDnsDomainNameRecord { - return newQDnsDomainNameRecord((*C.QDnsDomainNameRecord)(h)) + if h == nil { + return nil + } + + return &QDnsDomainNameRecord{h: (*C.QDnsDomainNameRecord)(h)} } // NewQDnsDomainNameRecord constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord() *QDnsDomainNameRecord { - ret := C.QDnsDomainNameRecord_new() - return newQDnsDomainNameRecord(ret) + var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil + + C.QDnsDomainNameRecord_new(&outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret.isSubclass = true + return ret } // NewQDnsDomainNameRecord2 constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord2(other *QDnsDomainNameRecord) *QDnsDomainNameRecord { - ret := C.QDnsDomainNameRecord_new2(other.cPointer()) - return newQDnsDomainNameRecord(ret) + var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil + + C.QDnsDomainNameRecord_new2(other.cPointer(), &outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret.isSubclass = true + return ret } func (this *QDnsDomainNameRecord) OperatorAssign(other *QDnsDomainNameRecord) { @@ -111,7 +126,7 @@ func (this *QDnsDomainNameRecord) Value() string { // Delete this object from C++ memory. func (this *QDnsDomainNameRecord) Delete() { - C.QDnsDomainNameRecord_Delete(this.h) + C.QDnsDomainNameRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -124,7 +139,8 @@ func (this *QDnsDomainNameRecord) GoGC() { } type QDnsHostAddressRecord struct { - h *C.QDnsHostAddressRecord + h *C.QDnsHostAddressRecord + isSubclass bool } func (this *QDnsHostAddressRecord) cPointer() *C.QDnsHostAddressRecord { @@ -141,6 +157,7 @@ func (this *QDnsHostAddressRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsHostAddressRecord constructs the type using only CGO pointers. func newQDnsHostAddressRecord(h *C.QDnsHostAddressRecord) *QDnsHostAddressRecord { if h == nil { return nil @@ -148,20 +165,33 @@ func newQDnsHostAddressRecord(h *C.QDnsHostAddressRecord) *QDnsHostAddressRecord return &QDnsHostAddressRecord{h: h} } +// UnsafeNewQDnsHostAddressRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsHostAddressRecord(h unsafe.Pointer) *QDnsHostAddressRecord { - return newQDnsHostAddressRecord((*C.QDnsHostAddressRecord)(h)) + if h == nil { + return nil + } + + return &QDnsHostAddressRecord{h: (*C.QDnsHostAddressRecord)(h)} } // NewQDnsHostAddressRecord constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord() *QDnsHostAddressRecord { - ret := C.QDnsHostAddressRecord_new() - return newQDnsHostAddressRecord(ret) + var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil + + C.QDnsHostAddressRecord_new(&outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret.isSubclass = true + return ret } // NewQDnsHostAddressRecord2 constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord2(other *QDnsHostAddressRecord) *QDnsHostAddressRecord { - ret := C.QDnsHostAddressRecord_new2(other.cPointer()) - return newQDnsHostAddressRecord(ret) + var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil + + C.QDnsHostAddressRecord_new2(other.cPointer(), &outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret.isSubclass = true + return ret } func (this *QDnsHostAddressRecord) OperatorAssign(other *QDnsHostAddressRecord) { @@ -192,7 +222,7 @@ func (this *QDnsHostAddressRecord) Value() *QHostAddress { // Delete this object from C++ memory. func (this *QDnsHostAddressRecord) Delete() { - C.QDnsHostAddressRecord_Delete(this.h) + C.QDnsHostAddressRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -205,7 +235,8 @@ func (this *QDnsHostAddressRecord) GoGC() { } type QDnsMailExchangeRecord struct { - h *C.QDnsMailExchangeRecord + h *C.QDnsMailExchangeRecord + isSubclass bool } func (this *QDnsMailExchangeRecord) cPointer() *C.QDnsMailExchangeRecord { @@ -222,6 +253,7 @@ func (this *QDnsMailExchangeRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsMailExchangeRecord constructs the type using only CGO pointers. func newQDnsMailExchangeRecord(h *C.QDnsMailExchangeRecord) *QDnsMailExchangeRecord { if h == nil { return nil @@ -229,20 +261,33 @@ func newQDnsMailExchangeRecord(h *C.QDnsMailExchangeRecord) *QDnsMailExchangeRec return &QDnsMailExchangeRecord{h: h} } +// UnsafeNewQDnsMailExchangeRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsMailExchangeRecord(h unsafe.Pointer) *QDnsMailExchangeRecord { - return newQDnsMailExchangeRecord((*C.QDnsMailExchangeRecord)(h)) + if h == nil { + return nil + } + + return &QDnsMailExchangeRecord{h: (*C.QDnsMailExchangeRecord)(h)} } // NewQDnsMailExchangeRecord constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord() *QDnsMailExchangeRecord { - ret := C.QDnsMailExchangeRecord_new() - return newQDnsMailExchangeRecord(ret) + var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil + + C.QDnsMailExchangeRecord_new(&outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret.isSubclass = true + return ret } // NewQDnsMailExchangeRecord2 constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord2(other *QDnsMailExchangeRecord) *QDnsMailExchangeRecord { - ret := C.QDnsMailExchangeRecord_new2(other.cPointer()) - return newQDnsMailExchangeRecord(ret) + var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil + + C.QDnsMailExchangeRecord_new2(other.cPointer(), &outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret.isSubclass = true + return ret } func (this *QDnsMailExchangeRecord) OperatorAssign(other *QDnsMailExchangeRecord) { @@ -277,7 +322,7 @@ func (this *QDnsMailExchangeRecord) TimeToLive() uint { // Delete this object from C++ memory. func (this *QDnsMailExchangeRecord) Delete() { - C.QDnsMailExchangeRecord_Delete(this.h) + C.QDnsMailExchangeRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -290,7 +335,8 @@ func (this *QDnsMailExchangeRecord) GoGC() { } type QDnsServiceRecord struct { - h *C.QDnsServiceRecord + h *C.QDnsServiceRecord + isSubclass bool } func (this *QDnsServiceRecord) cPointer() *C.QDnsServiceRecord { @@ -307,6 +353,7 @@ func (this *QDnsServiceRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsServiceRecord constructs the type using only CGO pointers. func newQDnsServiceRecord(h *C.QDnsServiceRecord) *QDnsServiceRecord { if h == nil { return nil @@ -314,20 +361,33 @@ func newQDnsServiceRecord(h *C.QDnsServiceRecord) *QDnsServiceRecord { return &QDnsServiceRecord{h: h} } +// UnsafeNewQDnsServiceRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsServiceRecord(h unsafe.Pointer) *QDnsServiceRecord { - return newQDnsServiceRecord((*C.QDnsServiceRecord)(h)) + if h == nil { + return nil + } + + return &QDnsServiceRecord{h: (*C.QDnsServiceRecord)(h)} } // NewQDnsServiceRecord constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord() *QDnsServiceRecord { - ret := C.QDnsServiceRecord_new() - return newQDnsServiceRecord(ret) + var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil + + C.QDnsServiceRecord_new(&outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret.isSubclass = true + return ret } // NewQDnsServiceRecord2 constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord2(other *QDnsServiceRecord) *QDnsServiceRecord { - ret := C.QDnsServiceRecord_new2(other.cPointer()) - return newQDnsServiceRecord(ret) + var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil + + C.QDnsServiceRecord_new2(other.cPointer(), &outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret.isSubclass = true + return ret } func (this *QDnsServiceRecord) OperatorAssign(other *QDnsServiceRecord) { @@ -370,7 +430,7 @@ func (this *QDnsServiceRecord) Weight() uint16 { // Delete this object from C++ memory. func (this *QDnsServiceRecord) Delete() { - C.QDnsServiceRecord_Delete(this.h) + C.QDnsServiceRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -383,7 +443,8 @@ func (this *QDnsServiceRecord) GoGC() { } type QDnsTextRecord struct { - h *C.QDnsTextRecord + h *C.QDnsTextRecord + isSubclass bool } func (this *QDnsTextRecord) cPointer() *C.QDnsTextRecord { @@ -400,6 +461,7 @@ func (this *QDnsTextRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsTextRecord constructs the type using only CGO pointers. func newQDnsTextRecord(h *C.QDnsTextRecord) *QDnsTextRecord { if h == nil { return nil @@ -407,20 +469,33 @@ func newQDnsTextRecord(h *C.QDnsTextRecord) *QDnsTextRecord { return &QDnsTextRecord{h: h} } +// UnsafeNewQDnsTextRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsTextRecord(h unsafe.Pointer) *QDnsTextRecord { - return newQDnsTextRecord((*C.QDnsTextRecord)(h)) + if h == nil { + return nil + } + + return &QDnsTextRecord{h: (*C.QDnsTextRecord)(h)} } // NewQDnsTextRecord constructs a new QDnsTextRecord object. func NewQDnsTextRecord() *QDnsTextRecord { - ret := C.QDnsTextRecord_new() - return newQDnsTextRecord(ret) + var outptr_QDnsTextRecord *C.QDnsTextRecord = nil + + C.QDnsTextRecord_new(&outptr_QDnsTextRecord) + ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret.isSubclass = true + return ret } // NewQDnsTextRecord2 constructs a new QDnsTextRecord object. func NewQDnsTextRecord2(other *QDnsTextRecord) *QDnsTextRecord { - ret := C.QDnsTextRecord_new2(other.cPointer()) - return newQDnsTextRecord(ret) + var outptr_QDnsTextRecord *C.QDnsTextRecord = nil + + C.QDnsTextRecord_new2(other.cPointer(), &outptr_QDnsTextRecord) + ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret.isSubclass = true + return ret } func (this *QDnsTextRecord) OperatorAssign(other *QDnsTextRecord) { @@ -457,7 +532,7 @@ func (this *QDnsTextRecord) Values() [][]byte { // Delete this object from C++ memory. func (this *QDnsTextRecord) Delete() { - C.QDnsTextRecord_Delete(this.h) + C.QDnsTextRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -470,7 +545,8 @@ func (this *QDnsTextRecord) GoGC() { } type QDnsLookup struct { - h *C.QDnsLookup + h *C.QDnsLookup + isSubclass bool *qt.QObject } @@ -488,21 +564,34 @@ func (this *QDnsLookup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDnsLookup(h *C.QDnsLookup) *QDnsLookup { +// newQDnsLookup constructs the type using only CGO pointers. +func newQDnsLookup(h *C.QDnsLookup, h_QObject *C.QObject) *QDnsLookup { if h == nil { return nil } - return &QDnsLookup{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QDnsLookup{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQDnsLookup(h unsafe.Pointer) *QDnsLookup { - return newQDnsLookup((*C.QDnsLookup)(h)) +// UnsafeNewQDnsLookup constructs the type using only unsafe pointers. +func UnsafeNewQDnsLookup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDnsLookup { + if h == nil { + return nil + } + + return &QDnsLookup{h: (*C.QDnsLookup)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQDnsLookup constructs a new QDnsLookup object. func NewQDnsLookup() *QDnsLookup { - ret := C.QDnsLookup_new() - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new(&outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup2 constructs a new QDnsLookup object. @@ -511,8 +600,13 @@ func NewQDnsLookup2(typeVal QDnsLookup__Type, name string) *QDnsLookup { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new2((C.int)(typeVal), name_ms) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new2((C.int)(typeVal), name_ms, &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup3 constructs a new QDnsLookup object. @@ -521,14 +615,24 @@ func NewQDnsLookup3(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer()) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer(), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup4 constructs a new QDnsLookup object. func NewQDnsLookup4(parent *qt.QObject) *QDnsLookup { - ret := C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer())) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup5 constructs a new QDnsLookup object. @@ -537,8 +641,13 @@ func NewQDnsLookup5(typeVal QDnsLookup__Type, name string, parent *qt.QObject) * name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer())) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup6 constructs a new QDnsLookup object. @@ -547,8 +656,13 @@ func NewQDnsLookup6(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDnsLookup) MetaObject() *qt.QMetaObject { @@ -855,9 +969,175 @@ func QDnsLookup_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDnsLookup) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QDnsLookup_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDnsLookup) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QDnsLookup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_Event +func miqt_exec_callback_QDnsLookup_Event(self *C.QDnsLookup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDnsLookup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDnsLookup) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QDnsLookup_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDnsLookup) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QDnsLookup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_EventFilter +func miqt_exec_callback_QDnsLookup_EventFilter(self *C.QDnsLookup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDnsLookup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDnsLookup) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QDnsLookup_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QDnsLookup) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QDnsLookup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_TimerEvent +func miqt_exec_callback_QDnsLookup_TimerEvent(self *C.QDnsLookup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QDnsLookup_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QDnsLookup) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QDnsLookup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_ChildEvent +func miqt_exec_callback_QDnsLookup_ChildEvent(self *C.QDnsLookup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QDnsLookup_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QDnsLookup) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QDnsLookup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_CustomEvent +func miqt_exec_callback_QDnsLookup_CustomEvent(self *C.QDnsLookup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QDnsLookup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDnsLookup) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QDnsLookup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_ConnectNotify +func miqt_exec_callback_QDnsLookup_ConnectNotify(self *C.QDnsLookup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QDnsLookup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDnsLookup) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QDnsLookup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_DisconnectNotify +func miqt_exec_callback_QDnsLookup_DisconnectNotify(self *C.QDnsLookup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDnsLookup) Delete() { - C.QDnsLookup_Delete(this.h) + C.QDnsLookup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qdnslookup.h b/qt/network/gen_qdnslookup.h index f8174692..4de12867 100644 --- a/qt/network/gen_qdnslookup.h +++ b/qt/network/gen_qdnslookup.h @@ -16,58 +16,66 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QDnsDomainNameRecord; class QDnsHostAddressRecord; class QDnsLookup; class QDnsMailExchangeRecord; class QDnsServiceRecord; class QDnsTextRecord; +class QEvent; class QHostAddress; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QDnsDomainNameRecord QDnsDomainNameRecord; typedef struct QDnsHostAddressRecord QDnsHostAddressRecord; typedef struct QDnsLookup QDnsLookup; typedef struct QDnsMailExchangeRecord QDnsMailExchangeRecord; typedef struct QDnsServiceRecord QDnsServiceRecord; typedef struct QDnsTextRecord QDnsTextRecord; +typedef struct QEvent QEvent; typedef struct QHostAddress QHostAddress; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QDnsDomainNameRecord* QDnsDomainNameRecord_new(); -QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other); +void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); +void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); void QDnsDomainNameRecord_Swap(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); struct miqt_string QDnsDomainNameRecord_Name(const QDnsDomainNameRecord* self); unsigned int QDnsDomainNameRecord_TimeToLive(const QDnsDomainNameRecord* self); struct miqt_string QDnsDomainNameRecord_Value(const QDnsDomainNameRecord* self); -void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self); +void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass); -QDnsHostAddressRecord* QDnsHostAddressRecord_new(); -QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other); +void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); +void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); void QDnsHostAddressRecord_Swap(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); struct miqt_string QDnsHostAddressRecord_Name(const QDnsHostAddressRecord* self); unsigned int QDnsHostAddressRecord_TimeToLive(const QDnsHostAddressRecord* self); QHostAddress* QDnsHostAddressRecord_Value(const QDnsHostAddressRecord* self); -void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self); +void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass); -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new(); -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other); +void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); +void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); void QDnsMailExchangeRecord_Swap(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); struct miqt_string QDnsMailExchangeRecord_Exchange(const QDnsMailExchangeRecord* self); struct miqt_string QDnsMailExchangeRecord_Name(const QDnsMailExchangeRecord* self); uint16_t QDnsMailExchangeRecord_Preference(const QDnsMailExchangeRecord* self); unsigned int QDnsMailExchangeRecord_TimeToLive(const QDnsMailExchangeRecord* self); -void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self); +void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass); -QDnsServiceRecord* QDnsServiceRecord_new(); -QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other); +void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord); +void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord); void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other); void QDnsServiceRecord_Swap(QDnsServiceRecord* self, QDnsServiceRecord* other); struct miqt_string QDnsServiceRecord_Name(const QDnsServiceRecord* self); @@ -76,23 +84,23 @@ uint16_t QDnsServiceRecord_Priority(const QDnsServiceRecord* self); struct miqt_string QDnsServiceRecord_Target(const QDnsServiceRecord* self); unsigned int QDnsServiceRecord_TimeToLive(const QDnsServiceRecord* self); uint16_t QDnsServiceRecord_Weight(const QDnsServiceRecord* self); -void QDnsServiceRecord_Delete(QDnsServiceRecord* self); +void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass); -QDnsTextRecord* QDnsTextRecord_new(); -QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other); +void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord); +void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord); void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other); void QDnsTextRecord_Swap(QDnsTextRecord* self, QDnsTextRecord* other); struct miqt_string QDnsTextRecord_Name(const QDnsTextRecord* self); unsigned int QDnsTextRecord_TimeToLive(const QDnsTextRecord* self); struct miqt_array /* of struct miqt_string */ QDnsTextRecord_Values(const QDnsTextRecord* self); -void QDnsTextRecord_Delete(QDnsTextRecord* self); +void QDnsTextRecord_Delete(QDnsTextRecord* self, bool isSubclass); -QDnsLookup* QDnsLookup_new(); -QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name); -QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver); -QDnsLookup* QDnsLookup_new4(QObject* parent); -QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent); -QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent); +void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self); void* QDnsLookup_Metacast(QDnsLookup* self, const char* param1); struct miqt_string QDnsLookup_Tr(const char* s); @@ -127,7 +135,21 @@ struct miqt_string QDnsLookup_Tr2(const char* s, const char* c); struct miqt_string QDnsLookup_Tr3(const char* s, const char* c, int n); struct miqt_string QDnsLookup_TrUtf82(const char* s, const char* c); struct miqt_string QDnsLookup_TrUtf83(const char* s, const char* c, int n); -void QDnsLookup_Delete(QDnsLookup* self); +void QDnsLookup_override_virtual_Event(void* self, intptr_t slot); +bool QDnsLookup_virtualbase_Event(void* self, QEvent* event); +void QDnsLookup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDnsLookup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDnsLookup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDnsLookup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDnsLookup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDnsLookup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDnsLookup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDnsLookup_virtualbase_CustomEvent(void* self, QEvent* event); +void QDnsLookup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDnsLookup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDnsLookup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDnsLookup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDnsLookup_Delete(QDnsLookup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qdtls.cpp b/qt/network/gen_qdtls.cpp index 541a3657..438e80da 100644 --- a/qt/network/gen_qdtls.cpp +++ b/qt/network/gen_qdtls.cpp @@ -1,9 +1,12 @@ #include +#include #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QDtlsClientVerifier__GeneratorParameters +#include #include #include +#include #include #include #include @@ -13,17 +16,203 @@ #include #include #include +#include #include #include #include "gen_qdtls.h" #include "_cgo_export.h" -QDtlsClientVerifier* QDtlsClientVerifier_new() { - return new QDtlsClientVerifier(); +class MiqtVirtualQDtlsClientVerifier : public virtual QDtlsClientVerifier { +public: + + MiqtVirtualQDtlsClientVerifier(): QDtlsClientVerifier() {}; + MiqtVirtualQDtlsClientVerifier(QObject* parent): QDtlsClientVerifier(parent) {}; + + virtual ~MiqtVirtualQDtlsClientVerifier() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDtlsClientVerifier::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDtlsClientVerifier_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDtlsClientVerifier::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDtlsClientVerifier::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDtlsClientVerifier_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDtlsClientVerifier::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDtlsClientVerifier::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDtlsClientVerifier_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDtlsClientVerifier::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDtlsClientVerifier::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDtlsClientVerifier_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDtlsClientVerifier::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDtlsClientVerifier::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDtlsClientVerifier_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDtlsClientVerifier::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDtlsClientVerifier::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtlsClientVerifier_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDtlsClientVerifier::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDtlsClientVerifier::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtlsClientVerifier_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDtlsClientVerifier::disconnectNotify(*signal); + + } + +}; + +void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { + MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(); + *outptr_QDtlsClientVerifier = ret; + *outptr_QObject = static_cast(ret); } -QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent) { - return new QDtlsClientVerifier(parent); +void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { + MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(parent); + *outptr_QDtlsClientVerifier = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self) { @@ -138,16 +327,261 @@ struct miqt_string QDtlsClientVerifier_TrUtf83(const char* s, const char* c, int return _ms; } -void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self) { - delete self; +void QDtlsClientVerifier_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__Event = slot; +} + +bool QDtlsClientVerifier_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_Event(event); +} + +void QDtlsClientVerifier_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__EventFilter = slot; +} + +bool QDtlsClientVerifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_EventFilter(watched, event); } -QDtls* QDtls_new(int mode) { - return new QDtls(static_cast(mode)); +void QDtlsClientVerifier_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__TimerEvent = slot; } -QDtls* QDtls_new2(int mode, QObject* parent) { - return new QDtls(static_cast(mode), parent); +void QDtlsClientVerifier_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_TimerEvent(event); +} + +void QDtlsClientVerifier_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__ChildEvent = slot; +} + +void QDtlsClientVerifier_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_ChildEvent(event); +} + +void QDtlsClientVerifier_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__CustomEvent = slot; +} + +void QDtlsClientVerifier_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_CustomEvent(event); +} + +void QDtlsClientVerifier_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__ConnectNotify = slot; +} + +void QDtlsClientVerifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDtlsClientVerifier_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__DisconnectNotify = slot; +} + +void QDtlsClientVerifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDtls : public virtual QDtls { +public: + + MiqtVirtualQDtls(QSslSocket::SslMode mode): QDtls(mode) {}; + MiqtVirtualQDtls(QSslSocket::SslMode mode, QObject* parent): QDtls(mode, parent) {}; + + virtual ~MiqtVirtualQDtls() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDtls::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDtls_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDtls::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDtls::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDtls_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDtls::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDtls::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDtls_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDtls::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDtls::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDtls_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDtls::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDtls::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDtls_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDtls::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDtls::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtls_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDtls::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDtls::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtls_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDtls::disconnectNotify(*signal); + + } + +}; + +void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject) { + MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode)); + *outptr_QDtls = ret; + *outptr_QObject = static_cast(ret); +} + +void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject) { + MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode), parent); + *outptr_QDtls = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDtls_MetaObject(const QDtls* self) { @@ -337,7 +771,7 @@ void QDtls_PskRequired(QDtls* self, QSslPreSharedKeyAuthenticator* authenticator } void QDtls_connect_PskRequired(QDtls* self, intptr_t slot) { - QDtls::connect(self, static_cast(&QDtls::pskRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQDtls::connect(self, static_cast(&QDtls::pskRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { QSslPreSharedKeyAuthenticator* sigval1 = authenticator; miqt_exec_callback_QDtls_PskRequired(slot, sigval1); }); @@ -348,7 +782,7 @@ void QDtls_HandshakeTimeout(QDtls* self) { } void QDtls_connect_HandshakeTimeout(QDtls* self, intptr_t slot) { - QDtls::connect(self, static_cast(&QDtls::handshakeTimeout), self, [=]() { + MiqtVirtualQDtls::connect(self, static_cast(&QDtls::handshakeTimeout), self, [=]() { miqt_exec_callback_QDtls_HandshakeTimeout(slot); }); } @@ -407,28 +841,95 @@ bool QDtls_DoHandshake2(QDtls* self, QUdpSocket* socket, struct miqt_string dgra return self->doHandshake(socket, dgram_QByteArray); } -void QDtls_Delete(QDtls* self) { - delete self; +void QDtls_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__Event = slot; +} + +bool QDtls_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDtls*)(self) )->virtualbase_Event(event); +} + +void QDtls_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__EventFilter = slot; +} + +bool QDtls_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDtls*)(self) )->virtualbase_EventFilter(watched, event); } -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new() { - return new QDtlsClientVerifier::GeneratorParameters(); +void QDtls_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__TimerEvent = slot; } -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s) { +void QDtls_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_TimerEvent(event); +} + +void QDtls_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__ChildEvent = slot; +} + +void QDtls_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_ChildEvent(event); +} + +void QDtls_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__CustomEvent = slot; +} + +void QDtls_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_CustomEvent(event); +} + +void QDtls_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__ConnectNotify = slot; +} + +void QDtls_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDtls_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__DisconnectNotify = slot; +} + +void QDtls_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDtls_Delete(QDtls* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { + QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(); + *outptr_QDtlsClientVerifier__GeneratorParameters = ret; +} + +void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { QByteArray s_QByteArray(s.data, s.len); - return new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); + QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); + *outptr_QDtlsClientVerifier__GeneratorParameters = ret; } -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1) { - return new QDtlsClientVerifier::GeneratorParameters(*param1); +void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { + QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(*param1); + *outptr_QDtlsClientVerifier__GeneratorParameters = ret; } void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1) { self->operator=(*param1); } -void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self) { - delete self; +void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qdtls.go b/qt/network/gen_qdtls.go index 34950f6c..f1ec18b7 100644 --- a/qt/network/gen_qdtls.go +++ b/qt/network/gen_qdtls.go @@ -39,7 +39,8 @@ const ( ) type QDtlsClientVerifier struct { - h *C.QDtlsClientVerifier + h *C.QDtlsClientVerifier + isSubclass bool *qt.QObject } @@ -57,27 +58,45 @@ func (this *QDtlsClientVerifier) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDtlsClientVerifier(h *C.QDtlsClientVerifier) *QDtlsClientVerifier { +// newQDtlsClientVerifier constructs the type using only CGO pointers. +func newQDtlsClientVerifier(h *C.QDtlsClientVerifier, h_QObject *C.QObject) *QDtlsClientVerifier { if h == nil { return nil } - return &QDtlsClientVerifier{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QDtlsClientVerifier{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer) *QDtlsClientVerifier { - return newQDtlsClientVerifier((*C.QDtlsClientVerifier)(h)) +// UnsafeNewQDtlsClientVerifier constructs the type using only unsafe pointers. +func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtlsClientVerifier { + if h == nil { + return nil + } + + return &QDtlsClientVerifier{h: (*C.QDtlsClientVerifier)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQDtlsClientVerifier constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier() *QDtlsClientVerifier { - ret := C.QDtlsClientVerifier_new() - return newQDtlsClientVerifier(ret) + var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil + var outptr_QObject *C.QObject = nil + + C.QDtlsClientVerifier_new(&outptr_QDtlsClientVerifier, &outptr_QObject) + ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDtlsClientVerifier2 constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier2(parent *qt.QObject) *QDtlsClientVerifier { - ret := C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer())) - return newQDtlsClientVerifier(ret) + var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil + var outptr_QObject *C.QObject = nil + + C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QDtlsClientVerifier, &outptr_QObject) + ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDtlsClientVerifier) MetaObject() *qt.QMetaObject { @@ -188,9 +207,175 @@ func QDtlsClientVerifier_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QDtlsClientVerifier) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QDtlsClientVerifier_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtlsClientVerifier) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QDtlsClientVerifier_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_Event +func miqt_exec_callback_QDtlsClientVerifier_Event(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QDtlsClientVerifier_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtlsClientVerifier) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QDtlsClientVerifier_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_EventFilter +func miqt_exec_callback_QDtlsClientVerifier_EventFilter(self *C.QDtlsClientVerifier, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QDtlsClientVerifier_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QDtlsClientVerifier_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_TimerEvent +func miqt_exec_callback_QDtlsClientVerifier_TimerEvent(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QDtlsClientVerifier_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QDtlsClientVerifier_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_ChildEvent +func miqt_exec_callback_QDtlsClientVerifier_ChildEvent(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QDtlsClientVerifier_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QDtlsClientVerifier_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_CustomEvent +func miqt_exec_callback_QDtlsClientVerifier_CustomEvent(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QDtlsClientVerifier_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QDtlsClientVerifier_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_ConnectNotify +func miqt_exec_callback_QDtlsClientVerifier_ConnectNotify(self *C.QDtlsClientVerifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QDtlsClientVerifier_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QDtlsClientVerifier_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_DisconnectNotify +func miqt_exec_callback_QDtlsClientVerifier_DisconnectNotify(self *C.QDtlsClientVerifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDtlsClientVerifier) Delete() { - C.QDtlsClientVerifier_Delete(this.h) + C.QDtlsClientVerifier_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -203,7 +388,8 @@ func (this *QDtlsClientVerifier) GoGC() { } type QDtls struct { - h *C.QDtls + h *C.QDtls + isSubclass bool *qt.QObject } @@ -221,27 +407,45 @@ func (this *QDtls) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDtls(h *C.QDtls) *QDtls { +// newQDtls constructs the type using only CGO pointers. +func newQDtls(h *C.QDtls, h_QObject *C.QObject) *QDtls { if h == nil { return nil } - return &QDtls{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QDtls{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQDtls(h unsafe.Pointer) *QDtls { - return newQDtls((*C.QDtls)(h)) +// UnsafeNewQDtls constructs the type using only unsafe pointers. +func UnsafeNewQDtls(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtls { + if h == nil { + return nil + } + + return &QDtls{h: (*C.QDtls)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQDtls constructs a new QDtls object. func NewQDtls(mode QSslSocket__SslMode) *QDtls { - ret := C.QDtls_new((C.int)(mode)) - return newQDtls(ret) + var outptr_QDtls *C.QDtls = nil + var outptr_QObject *C.QObject = nil + + C.QDtls_new((C.int)(mode), &outptr_QDtls, &outptr_QObject) + ret := newQDtls(outptr_QDtls, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDtls2 constructs a new QDtls object. func NewQDtls2(mode QSslSocket__SslMode, parent *qt.QObject) *QDtls { - ret := C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer())) - return newQDtls(ret) + var outptr_QDtls *C.QDtls = nil + var outptr_QObject *C.QObject = nil + + C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer()), &outptr_QDtls, &outptr_QObject) + ret := newQDtls(outptr_QDtls, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDtls) MetaObject() *qt.QMetaObject { @@ -522,9 +726,175 @@ func (this *QDtls) DoHandshake2(socket *QUdpSocket, dgram []byte) bool { return (bool)(C.QDtls_DoHandshake2(this.h, socket.cPointer(), dgram_alias)) } +func (this *QDtls) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QDtls_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtls) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QDtls_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_Event +func miqt_exec_callback_QDtls_Event(self *C.QDtls, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtls{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtls) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QDtls_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtls) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QDtls_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_EventFilter +func miqt_exec_callback_QDtls_EventFilter(self *C.QDtls, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtls{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtls) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QDtls_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QDtls) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QDtls_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_TimerEvent +func miqt_exec_callback_QDtls_TimerEvent(self *C.QDtls, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtls{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDtls) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QDtls_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QDtls) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QDtls_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_ChildEvent +func miqt_exec_callback_QDtls_ChildEvent(self *C.QDtls, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtls{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDtls) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QDtls_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QDtls) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QDtls_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_CustomEvent +func miqt_exec_callback_QDtls_CustomEvent(self *C.QDtls, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDtls{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDtls) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QDtls_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtls) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QDtls_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_ConnectNotify +func miqt_exec_callback_QDtls_ConnectNotify(self *C.QDtls, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtls{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDtls) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QDtls_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtls) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QDtls_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_DisconnectNotify +func miqt_exec_callback_QDtls_DisconnectNotify(self *C.QDtls, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtls{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDtls) Delete() { - C.QDtls_Delete(this.h) + C.QDtls_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -537,7 +907,8 @@ func (this *QDtls) GoGC() { } type QDtlsClientVerifier__GeneratorParameters struct { - h *C.QDtlsClientVerifier__GeneratorParameters + h *C.QDtlsClientVerifier__GeneratorParameters + isSubclass bool } func (this *QDtlsClientVerifier__GeneratorParameters) cPointer() *C.QDtlsClientVerifier__GeneratorParameters { @@ -554,6 +925,7 @@ func (this *QDtlsClientVerifier__GeneratorParameters) UnsafePointer() unsafe.Poi return unsafe.Pointer(this.h) } +// newQDtlsClientVerifier__GeneratorParameters constructs the type using only CGO pointers. func newQDtlsClientVerifier__GeneratorParameters(h *C.QDtlsClientVerifier__GeneratorParameters) *QDtlsClientVerifier__GeneratorParameters { if h == nil { return nil @@ -561,14 +933,23 @@ func newQDtlsClientVerifier__GeneratorParameters(h *C.QDtlsClientVerifier__Gener return &QDtlsClientVerifier__GeneratorParameters{h: h} } +// UnsafeNewQDtlsClientVerifier__GeneratorParameters constructs the type using only unsafe pointers. func UnsafeNewQDtlsClientVerifier__GeneratorParameters(h unsafe.Pointer) *QDtlsClientVerifier__GeneratorParameters { - return newQDtlsClientVerifier__GeneratorParameters((*C.QDtlsClientVerifier__GeneratorParameters)(h)) + if h == nil { + return nil + } + + return &QDtlsClientVerifier__GeneratorParameters{h: (*C.QDtlsClientVerifier__GeneratorParameters)(h)} } // NewQDtlsClientVerifier__GeneratorParameters constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters() *QDtlsClientVerifier__GeneratorParameters { - ret := C.QDtlsClientVerifier__GeneratorParameters_new() - return newQDtlsClientVerifier__GeneratorParameters(ret) + var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil + + C.QDtlsClientVerifier__GeneratorParameters_new(&outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret.isSubclass = true + return ret } // NewQDtlsClientVerifier__GeneratorParameters2 constructs a new QDtlsClientVerifier::GeneratorParameters object. @@ -576,14 +957,22 @@ func NewQDtlsClientVerifier__GeneratorParameters2(a qt.QCryptographicHash__Algor s_alias := C.struct_miqt_string{} s_alias.data = (*C.char)(unsafe.Pointer(&s[0])) s_alias.len = C.size_t(len(s)) - ret := C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias) - return newQDtlsClientVerifier__GeneratorParameters(ret) + var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil + + C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias, &outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret.isSubclass = true + return ret } // NewQDtlsClientVerifier__GeneratorParameters3 constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters3(param1 *QDtlsClientVerifier__GeneratorParameters) *QDtlsClientVerifier__GeneratorParameters { - ret := C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer()) - return newQDtlsClientVerifier__GeneratorParameters(ret) + var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil + + C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer(), &outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret.isSubclass = true + return ret } func (this *QDtlsClientVerifier__GeneratorParameters) OperatorAssign(param1 *QDtlsClientVerifier__GeneratorParameters) { @@ -592,7 +981,7 @@ func (this *QDtlsClientVerifier__GeneratorParameters) OperatorAssign(param1 *QDt // Delete this object from C++ memory. func (this *QDtlsClientVerifier__GeneratorParameters) Delete() { - C.QDtlsClientVerifier__GeneratorParameters_Delete(this.h) + C.QDtlsClientVerifier__GeneratorParameters_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qdtls.h b/qt/network/gen_qdtls.h index 71e05879..06bad90c 100644 --- a/qt/network/gen_qdtls.h +++ b/qt/network/gen_qdtls.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QDtls; class QDtlsClientVerifier; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QDtlsClientVerifier__GeneratorParameters) @@ -23,31 +24,38 @@ typedef QDtlsClientVerifier::GeneratorParameters QDtlsClientVerifier__GeneratorP #else class QDtlsClientVerifier__GeneratorParameters; #endif +class QEvent; class QHostAddress; +class QMetaMethod; class QMetaObject; class QObject; class QSslCipher; class QSslConfiguration; class QSslError; class QSslPreSharedKeyAuthenticator; +class QTimerEvent; class QUdpSocket; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QDtls QDtls; typedef struct QDtlsClientVerifier QDtlsClientVerifier; typedef struct QDtlsClientVerifier__GeneratorParameters QDtlsClientVerifier__GeneratorParameters; +typedef struct QEvent QEvent; typedef struct QHostAddress QHostAddress; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSslCipher QSslCipher; typedef struct QSslConfiguration QSslConfiguration; typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; +typedef struct QTimerEvent QTimerEvent; typedef struct QUdpSocket QUdpSocket; #endif -QDtlsClientVerifier* QDtlsClientVerifier_new(); -QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent); +void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); +void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self); void* QDtlsClientVerifier_Metacast(QDtlsClientVerifier* self, const char* param1); struct miqt_string QDtlsClientVerifier_Tr(const char* s); @@ -62,10 +70,24 @@ struct miqt_string QDtlsClientVerifier_Tr2(const char* s, const char* c); struct miqt_string QDtlsClientVerifier_Tr3(const char* s, const char* c, int n); struct miqt_string QDtlsClientVerifier_TrUtf82(const char* s, const char* c); struct miqt_string QDtlsClientVerifier_TrUtf83(const char* s, const char* c, int n); -void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self); +void QDtlsClientVerifier_override_virtual_Event(void* self, intptr_t slot); +bool QDtlsClientVerifier_virtualbase_Event(void* self, QEvent* event); +void QDtlsClientVerifier_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDtlsClientVerifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDtlsClientVerifier_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDtlsClientVerifier_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDtlsClientVerifier_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_CustomEvent(void* self, QEvent* event); +void QDtlsClientVerifier_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDtlsClientVerifier_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self, bool isSubclass); -QDtls* QDtls_new(int mode); -QDtls* QDtls_new2(int mode, QObject* parent); +void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject); +void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject); QMetaObject* QDtls_MetaObject(const QDtls* self); void* QDtls_Metacast(QDtls* self, const char* param1); struct miqt_string QDtls_Tr(const char* s); @@ -107,13 +129,27 @@ struct miqt_string QDtls_TrUtf82(const char* s, const char* c); struct miqt_string QDtls_TrUtf83(const char* s, const char* c, int n); bool QDtls_SetPeer3(QDtls* self, QHostAddress* address, uint16_t port, struct miqt_string verificationName); bool QDtls_DoHandshake2(QDtls* self, QUdpSocket* socket, struct miqt_string dgram); -void QDtls_Delete(QDtls* self); +void QDtls_override_virtual_Event(void* self, intptr_t slot); +bool QDtls_virtualbase_Event(void* self, QEvent* event); +void QDtls_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDtls_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDtls_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDtls_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDtls_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDtls_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDtls_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDtls_virtualbase_CustomEvent(void* self, QEvent* event); +void QDtls_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDtls_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDtls_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDtls_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDtls_Delete(QDtls* self, bool isSubclass); -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new(); -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s); -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1); +void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); +void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); +void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1); -void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self); +void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qhostaddress.cpp b/qt/network/gen_qhostaddress.cpp index 9cd44f10..1643bb2d 100644 --- a/qt/network/gen_qhostaddress.cpp +++ b/qt/network/gen_qhostaddress.cpp @@ -12,41 +12,53 @@ unsigned char QIPv6Address_OperatorSubscript(const QIPv6Address* self, int index return static_cast(_ret); } -void QIPv6Address_Delete(QIPv6Address* self) { - delete self; +void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHostAddress* QHostAddress_new() { - return new QHostAddress(); +void QHostAddress_new(QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new2(unsigned int ip4Addr) { - return new QHostAddress(static_cast(ip4Addr)); +void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(ip4Addr)); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new3(unsigned char* ip6Addr) { - return new QHostAddress(static_cast(ip6Addr)); +void QHostAddress_new3(unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(ip6Addr)); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new4(const unsigned char* ip6Addr) { - return new QHostAddress(static_cast(ip6Addr)); +void QHostAddress_new4(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(ip6Addr)); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new5(QIPv6Address* ip6Addr) { - return new QHostAddress(*ip6Addr); +void QHostAddress_new5(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(*ip6Addr); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new6(struct miqt_string address) { +void QHostAddress_new6(struct miqt_string address, QHostAddress** outptr_QHostAddress) { QString address_QString = QString::fromUtf8(address.data, address.len); - return new QHostAddress(address_QString); + QHostAddress* ret = new QHostAddress(address_QString); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new7(QHostAddress* copyVal) { - return new QHostAddress(*copyVal); +void QHostAddress_new7(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(*copyVal); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new8(int address) { - return new QHostAddress(static_cast(address)); +void QHostAddress_new8(int address, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(address)); + *outptr_QHostAddress = ret; } void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other) { @@ -225,7 +237,11 @@ bool QHostAddress_IsEqual2(const QHostAddress* self, QHostAddress* address, int return self->isEqual(*address, static_cast(mode)); } -void QHostAddress_Delete(QHostAddress* self) { - delete self; +void QHostAddress_Delete(QHostAddress* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qhostaddress.go b/qt/network/gen_qhostaddress.go index 1bbf3e7e..3075bce3 100644 --- a/qt/network/gen_qhostaddress.go +++ b/qt/network/gen_qhostaddress.go @@ -37,7 +37,8 @@ const ( ) type QIPv6Address struct { - h *C.QIPv6Address + h *C.QIPv6Address + isSubclass bool } func (this *QIPv6Address) cPointer() *C.QIPv6Address { @@ -54,6 +55,7 @@ func (this *QIPv6Address) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIPv6Address constructs the type using only CGO pointers. func newQIPv6Address(h *C.QIPv6Address) *QIPv6Address { if h == nil { return nil @@ -61,8 +63,13 @@ func newQIPv6Address(h *C.QIPv6Address) *QIPv6Address { return &QIPv6Address{h: h} } +// UnsafeNewQIPv6Address constructs the type using only unsafe pointers. func UnsafeNewQIPv6Address(h unsafe.Pointer) *QIPv6Address { - return newQIPv6Address((*C.QIPv6Address)(h)) + if h == nil { + return nil + } + + return &QIPv6Address{h: (*C.QIPv6Address)(h)} } func (this *QIPv6Address) OperatorSubscript(index int) byte { @@ -71,7 +78,7 @@ func (this *QIPv6Address) OperatorSubscript(index int) byte { // Delete this object from C++ memory. func (this *QIPv6Address) Delete() { - C.QIPv6Address_Delete(this.h) + C.QIPv6Address_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -84,7 +91,8 @@ func (this *QIPv6Address) GoGC() { } type QHostAddress struct { - h *C.QHostAddress + h *C.QHostAddress + isSubclass bool } func (this *QHostAddress) cPointer() *C.QHostAddress { @@ -101,6 +109,7 @@ func (this *QHostAddress) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHostAddress constructs the type using only CGO pointers. func newQHostAddress(h *C.QHostAddress) *QHostAddress { if h == nil { return nil @@ -108,38 +117,63 @@ func newQHostAddress(h *C.QHostAddress) *QHostAddress { return &QHostAddress{h: h} } +// UnsafeNewQHostAddress constructs the type using only unsafe pointers. func UnsafeNewQHostAddress(h unsafe.Pointer) *QHostAddress { - return newQHostAddress((*C.QHostAddress)(h)) + if h == nil { + return nil + } + + return &QHostAddress{h: (*C.QHostAddress)(h)} } // NewQHostAddress constructs a new QHostAddress object. func NewQHostAddress() *QHostAddress { - ret := C.QHostAddress_new() - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new(&outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress2 constructs a new QHostAddress object. func NewQHostAddress2(ip4Addr uint) *QHostAddress { - ret := C.QHostAddress_new2((C.uint)(ip4Addr)) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new2((C.uint)(ip4Addr), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress3 constructs a new QHostAddress object. func NewQHostAddress3(ip6Addr *byte) *QHostAddress { - ret := C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr))) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr)), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress4 constructs a new QHostAddress object. func NewQHostAddress4(ip6Addr *byte) *QHostAddress { - ret := C.QHostAddress_new4((*C.uchar)(unsafe.Pointer(ip6Addr))) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new4((*C.uchar)(unsafe.Pointer(ip6Addr)), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress5 constructs a new QHostAddress object. func NewQHostAddress5(ip6Addr *QIPv6Address) *QHostAddress { - ret := C.QHostAddress_new5(ip6Addr.cPointer()) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new5(ip6Addr.cPointer(), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress6 constructs a new QHostAddress object. @@ -148,20 +182,32 @@ func NewQHostAddress6(address string) *QHostAddress { address_ms.data = C.CString(address) address_ms.len = C.size_t(len(address)) defer C.free(unsafe.Pointer(address_ms.data)) - ret := C.QHostAddress_new6(address_ms) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new6(address_ms, &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress7 constructs a new QHostAddress object. func NewQHostAddress7(copyVal *QHostAddress) *QHostAddress { - ret := C.QHostAddress_new7(copyVal.cPointer()) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new7(copyVal.cPointer(), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress8 constructs a new QHostAddress object. func NewQHostAddress8(address QHostAddress__SpecialAddress) *QHostAddress { - ret := C.QHostAddress_new8((C.int)(address)) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new8((C.int)(address), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } func (this *QHostAddress) OperatorAssign(other *QHostAddress) { @@ -361,7 +407,7 @@ func (this *QHostAddress) IsEqual2(address *QHostAddress, mode QHostAddress__Con // Delete this object from C++ memory. func (this *QHostAddress) Delete() { - C.QHostAddress_Delete(this.h) + C.QHostAddress_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qhostaddress.h b/qt/network/gen_qhostaddress.h index fd8f31e7..6bb953e9 100644 --- a/qt/network/gen_qhostaddress.h +++ b/qt/network/gen_qhostaddress.h @@ -23,16 +23,16 @@ typedef struct QIPv6Address QIPv6Address; #endif unsigned char QIPv6Address_OperatorSubscript(const QIPv6Address* self, int index); -void QIPv6Address_Delete(QIPv6Address* self); +void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass); -QHostAddress* QHostAddress_new(); -QHostAddress* QHostAddress_new2(unsigned int ip4Addr); -QHostAddress* QHostAddress_new3(unsigned char* ip6Addr); -QHostAddress* QHostAddress_new4(const unsigned char* ip6Addr); -QHostAddress* QHostAddress_new5(QIPv6Address* ip6Addr); -QHostAddress* QHostAddress_new6(struct miqt_string address); -QHostAddress* QHostAddress_new7(QHostAddress* copyVal); -QHostAddress* QHostAddress_new8(int address); +void QHostAddress_new(QHostAddress** outptr_QHostAddress); +void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new3(unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new4(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new5(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new6(struct miqt_string address, QHostAddress** outptr_QHostAddress); +void QHostAddress_new7(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress); +void QHostAddress_new8(int address, QHostAddress** outptr_QHostAddress); void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other); void QHostAddress_OperatorAssignWithAddress(QHostAddress* self, struct miqt_string address); void QHostAddress_OperatorAssign2(QHostAddress* self, int address); @@ -68,7 +68,7 @@ bool QHostAddress_IsMulticast(const QHostAddress* self); bool QHostAddress_IsBroadcast(const QHostAddress* self); struct miqt_map /* tuple of QHostAddress* and int */ QHostAddress_ParseSubnet(struct miqt_string subnet); bool QHostAddress_IsEqual2(const QHostAddress* self, QHostAddress* address, int mode); -void QHostAddress_Delete(QHostAddress* self); +void QHostAddress_Delete(QHostAddress* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qhostinfo.cpp b/qt/network/gen_qhostinfo.cpp index 428a71ba..b614b348 100644 --- a/qt/network/gen_qhostinfo.cpp +++ b/qt/network/gen_qhostinfo.cpp @@ -8,16 +8,19 @@ #include "gen_qhostinfo.h" #include "_cgo_export.h" -QHostInfo* QHostInfo_new() { - return new QHostInfo(); +void QHostInfo_new(QHostInfo** outptr_QHostInfo) { + QHostInfo* ret = new QHostInfo(); + *outptr_QHostInfo = ret; } -QHostInfo* QHostInfo_new2(QHostInfo* d) { - return new QHostInfo(*d); +void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo) { + QHostInfo* ret = new QHostInfo(*d); + *outptr_QHostInfo = ret; } -QHostInfo* QHostInfo_new3(int lookupId) { - return new QHostInfo(static_cast(lookupId)); +void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo) { + QHostInfo* ret = new QHostInfo(static_cast(lookupId)); + *outptr_QHostInfo = ret; } void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d) { @@ -131,7 +134,11 @@ struct miqt_string QHostInfo_LocalDomainName() { return _ms; } -void QHostInfo_Delete(QHostInfo* self) { - delete self; +void QHostInfo_Delete(QHostInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qhostinfo.go b/qt/network/gen_qhostinfo.go index 4ae03c78..8487abce 100644 --- a/qt/network/gen_qhostinfo.go +++ b/qt/network/gen_qhostinfo.go @@ -22,7 +22,8 @@ const ( ) type QHostInfo struct { - h *C.QHostInfo + h *C.QHostInfo + isSubclass bool } func (this *QHostInfo) cPointer() *C.QHostInfo { @@ -39,6 +40,7 @@ func (this *QHostInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHostInfo constructs the type using only CGO pointers. func newQHostInfo(h *C.QHostInfo) *QHostInfo { if h == nil { return nil @@ -46,26 +48,43 @@ func newQHostInfo(h *C.QHostInfo) *QHostInfo { return &QHostInfo{h: h} } +// UnsafeNewQHostInfo constructs the type using only unsafe pointers. func UnsafeNewQHostInfo(h unsafe.Pointer) *QHostInfo { - return newQHostInfo((*C.QHostInfo)(h)) + if h == nil { + return nil + } + + return &QHostInfo{h: (*C.QHostInfo)(h)} } // NewQHostInfo constructs a new QHostInfo object. func NewQHostInfo() *QHostInfo { - ret := C.QHostInfo_new() - return newQHostInfo(ret) + var outptr_QHostInfo *C.QHostInfo = nil + + C.QHostInfo_new(&outptr_QHostInfo) + ret := newQHostInfo(outptr_QHostInfo) + ret.isSubclass = true + return ret } // NewQHostInfo2 constructs a new QHostInfo object. func NewQHostInfo2(d *QHostInfo) *QHostInfo { - ret := C.QHostInfo_new2(d.cPointer()) - return newQHostInfo(ret) + var outptr_QHostInfo *C.QHostInfo = nil + + C.QHostInfo_new2(d.cPointer(), &outptr_QHostInfo) + ret := newQHostInfo(outptr_QHostInfo) + ret.isSubclass = true + return ret } // NewQHostInfo3 constructs a new QHostInfo object. func NewQHostInfo3(lookupId int) *QHostInfo { - ret := C.QHostInfo_new3((C.int)(lookupId)) - return newQHostInfo(ret) + var outptr_QHostInfo *C.QHostInfo = nil + + C.QHostInfo_new3((C.int)(lookupId), &outptr_QHostInfo) + ret := newQHostInfo(outptr_QHostInfo) + ret.isSubclass = true + return ret } func (this *QHostInfo) OperatorAssign(d *QHostInfo) { @@ -176,7 +195,7 @@ func QHostInfo_LocalDomainName() string { // Delete this object from C++ memory. func (this *QHostInfo) Delete() { - C.QHostInfo_Delete(this.h) + C.QHostInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qhostinfo.h b/qt/network/gen_qhostinfo.h index 7a141104..ea3c4cf2 100644 --- a/qt/network/gen_qhostinfo.h +++ b/qt/network/gen_qhostinfo.h @@ -22,9 +22,9 @@ typedef struct QHostAddress QHostAddress; typedef struct QHostInfo QHostInfo; #endif -QHostInfo* QHostInfo_new(); -QHostInfo* QHostInfo_new2(QHostInfo* d); -QHostInfo* QHostInfo_new3(int lookupId); +void QHostInfo_new(QHostInfo** outptr_QHostInfo); +void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo); +void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo); void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d); void QHostInfo_Swap(QHostInfo* self, QHostInfo* other); struct miqt_string QHostInfo_HostName(const QHostInfo* self); @@ -41,7 +41,7 @@ void QHostInfo_AbortHostLookup(int lookupId); QHostInfo* QHostInfo_FromName(struct miqt_string name); struct miqt_string QHostInfo_LocalHostName(); struct miqt_string QHostInfo_LocalDomainName(); -void QHostInfo_Delete(QHostInfo* self); +void QHostInfo_Delete(QHostInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qhstspolicy.cpp b/qt/network/gen_qhstspolicy.cpp index 21685894..3e78e096 100644 --- a/qt/network/gen_qhstspolicy.cpp +++ b/qt/network/gen_qhstspolicy.cpp @@ -7,22 +7,26 @@ #include "gen_qhstspolicy.h" #include "_cgo_export.h" -QHstsPolicy* QHstsPolicy_new() { - return new QHstsPolicy(); +void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy) { + QHstsPolicy* ret = new QHstsPolicy(); + *outptr_QHstsPolicy = ret; } -QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host) { +void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy) { QString host_QString = QString::fromUtf8(host.data, host.len); - return new QHstsPolicy(*expiry, static_cast(flags), host_QString); + QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString); + *outptr_QHstsPolicy = ret; } -QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs) { - return new QHstsPolicy(*rhs); +void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy) { + QHstsPolicy* ret = new QHstsPolicy(*rhs); + *outptr_QHstsPolicy = ret; } -QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode) { +void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy) { QString host_QString = QString::fromUtf8(host.data, host.len); - return new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); + QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); + *outptr_QHstsPolicy = ret; } void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs) { @@ -85,7 +89,11 @@ struct miqt_string QHstsPolicy_Host1(const QHstsPolicy* self, int options) { return _ms; } -void QHstsPolicy_Delete(QHstsPolicy* self) { - delete self; +void QHstsPolicy_Delete(QHstsPolicy* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qhstspolicy.go b/qt/network/gen_qhstspolicy.go index a26b3b43..be590521 100644 --- a/qt/network/gen_qhstspolicy.go +++ b/qt/network/gen_qhstspolicy.go @@ -21,7 +21,8 @@ const ( ) type QHstsPolicy struct { - h *C.QHstsPolicy + h *C.QHstsPolicy + isSubclass bool } func (this *QHstsPolicy) cPointer() *C.QHstsPolicy { @@ -38,6 +39,7 @@ func (this *QHstsPolicy) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHstsPolicy constructs the type using only CGO pointers. func newQHstsPolicy(h *C.QHstsPolicy) *QHstsPolicy { if h == nil { return nil @@ -45,14 +47,23 @@ func newQHstsPolicy(h *C.QHstsPolicy) *QHstsPolicy { return &QHstsPolicy{h: h} } +// UnsafeNewQHstsPolicy constructs the type using only unsafe pointers. func UnsafeNewQHstsPolicy(h unsafe.Pointer) *QHstsPolicy { - return newQHstsPolicy((*C.QHstsPolicy)(h)) + if h == nil { + return nil + } + + return &QHstsPolicy{h: (*C.QHstsPolicy)(h)} } // NewQHstsPolicy constructs a new QHstsPolicy object. func NewQHstsPolicy() *QHstsPolicy { - ret := C.QHstsPolicy_new() - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new(&outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } // NewQHstsPolicy2 constructs a new QHstsPolicy object. @@ -61,14 +72,22 @@ func NewQHstsPolicy2(expiry *qt.QDateTime, flags QHstsPolicy__PolicyFlag, host s host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - ret := C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms) - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, &outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } // NewQHstsPolicy3 constructs a new QHstsPolicy object. func NewQHstsPolicy3(rhs *QHstsPolicy) *QHstsPolicy { - ret := C.QHstsPolicy_new3(rhs.cPointer()) - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new3(rhs.cPointer(), &outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } // NewQHstsPolicy4 constructs a new QHstsPolicy object. @@ -77,8 +96,12 @@ func NewQHstsPolicy4(expiry *qt.QDateTime, flags QHstsPolicy__PolicyFlag, host s host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - ret := C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode)) - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode), &outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } func (this *QHstsPolicy) OperatorAssign(rhs *QHstsPolicy) { @@ -144,7 +167,7 @@ func (this *QHstsPolicy) Host1(options qt.QUrl__ComponentFormattingOption) strin // Delete this object from C++ memory. func (this *QHstsPolicy) Delete() { - C.QHstsPolicy_Delete(this.h) + C.QHstsPolicy_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qhstspolicy.h b/qt/network/gen_qhstspolicy.h index 3de04e38..3d1d2e0a 100644 --- a/qt/network/gen_qhstspolicy.h +++ b/qt/network/gen_qhstspolicy.h @@ -22,10 +22,10 @@ typedef struct QDateTime QDateTime; typedef struct QHstsPolicy QHstsPolicy; #endif -QHstsPolicy* QHstsPolicy_new(); -QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host); -QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs); -QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode); +void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy); +void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy); +void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy); +void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy); void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs); void QHstsPolicy_Swap(QHstsPolicy* self, QHstsPolicy* other); void QHstsPolicy_SetHost(QHstsPolicy* self, struct miqt_string host); @@ -37,7 +37,7 @@ bool QHstsPolicy_IncludesSubDomains(const QHstsPolicy* self); bool QHstsPolicy_IsExpired(const QHstsPolicy* self); void QHstsPolicy_SetHost2(QHstsPolicy* self, struct miqt_string host, int mode); struct miqt_string QHstsPolicy_Host1(const QHstsPolicy* self, int options); -void QHstsPolicy_Delete(QHstsPolicy* self); +void QHstsPolicy_Delete(QHstsPolicy* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qhttp2configuration.cpp b/qt/network/gen_qhttp2configuration.cpp index 715c08a3..f5f34f85 100644 --- a/qt/network/gen_qhttp2configuration.cpp +++ b/qt/network/gen_qhttp2configuration.cpp @@ -3,12 +3,14 @@ #include "gen_qhttp2configuration.h" #include "_cgo_export.h" -QHttp2Configuration* QHttp2Configuration_new() { - return new QHttp2Configuration(); +void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration) { + QHttp2Configuration* ret = new QHttp2Configuration(); + *outptr_QHttp2Configuration = ret; } -QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other) { - return new QHttp2Configuration(*other); +void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration) { + QHttp2Configuration* ret = new QHttp2Configuration(*other); + *outptr_QHttp2Configuration = ret; } void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other) { @@ -59,7 +61,11 @@ void QHttp2Configuration_Swap(QHttp2Configuration* self, QHttp2Configuration* ot self->swap(*other); } -void QHttp2Configuration_Delete(QHttp2Configuration* self) { - delete self; +void QHttp2Configuration_Delete(QHttp2Configuration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qhttp2configuration.go b/qt/network/gen_qhttp2configuration.go index 2e98e1d2..6610f15d 100644 --- a/qt/network/gen_qhttp2configuration.go +++ b/qt/network/gen_qhttp2configuration.go @@ -14,7 +14,8 @@ import ( ) type QHttp2Configuration struct { - h *C.QHttp2Configuration + h *C.QHttp2Configuration + isSubclass bool } func (this *QHttp2Configuration) cPointer() *C.QHttp2Configuration { @@ -31,6 +32,7 @@ func (this *QHttp2Configuration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHttp2Configuration constructs the type using only CGO pointers. func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration { if h == nil { return nil @@ -38,20 +40,33 @@ func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration { return &QHttp2Configuration{h: h} } +// UnsafeNewQHttp2Configuration constructs the type using only unsafe pointers. func UnsafeNewQHttp2Configuration(h unsafe.Pointer) *QHttp2Configuration { - return newQHttp2Configuration((*C.QHttp2Configuration)(h)) + if h == nil { + return nil + } + + return &QHttp2Configuration{h: (*C.QHttp2Configuration)(h)} } // NewQHttp2Configuration constructs a new QHttp2Configuration object. func NewQHttp2Configuration() *QHttp2Configuration { - ret := C.QHttp2Configuration_new() - return newQHttp2Configuration(ret) + var outptr_QHttp2Configuration *C.QHttp2Configuration = nil + + C.QHttp2Configuration_new(&outptr_QHttp2Configuration) + ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret.isSubclass = true + return ret } // NewQHttp2Configuration2 constructs a new QHttp2Configuration object. func NewQHttp2Configuration2(other *QHttp2Configuration) *QHttp2Configuration { - ret := C.QHttp2Configuration_new2(other.cPointer()) - return newQHttp2Configuration(ret) + var outptr_QHttp2Configuration *C.QHttp2Configuration = nil + + C.QHttp2Configuration_new2(other.cPointer(), &outptr_QHttp2Configuration) + ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret.isSubclass = true + return ret } func (this *QHttp2Configuration) OperatorAssign(other *QHttp2Configuration) { @@ -104,7 +119,7 @@ func (this *QHttp2Configuration) Swap(other *QHttp2Configuration) { // Delete this object from C++ memory. func (this *QHttp2Configuration) Delete() { - C.QHttp2Configuration_Delete(this.h) + C.QHttp2Configuration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qhttp2configuration.h b/qt/network/gen_qhttp2configuration.h index 0897d4fc..4060867a 100644 --- a/qt/network/gen_qhttp2configuration.h +++ b/qt/network/gen_qhttp2configuration.h @@ -20,8 +20,8 @@ class QHttp2Configuration; typedef struct QHttp2Configuration QHttp2Configuration; #endif -QHttp2Configuration* QHttp2Configuration_new(); -QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other); +void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration); +void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration); void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other); void QHttp2Configuration_SetServerPushEnabled(QHttp2Configuration* self, bool enable); bool QHttp2Configuration_ServerPushEnabled(const QHttp2Configuration* self); @@ -34,7 +34,7 @@ unsigned int QHttp2Configuration_StreamReceiveWindowSize(const QHttp2Configurati bool QHttp2Configuration_SetMaxFrameSize(QHttp2Configuration* self, unsigned int size); unsigned int QHttp2Configuration_MaxFrameSize(const QHttp2Configuration* self); void QHttp2Configuration_Swap(QHttp2Configuration* self, QHttp2Configuration* other); -void QHttp2Configuration_Delete(QHttp2Configuration* self); +void QHttp2Configuration_Delete(QHttp2Configuration* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qhttpmultipart.cpp b/qt/network/gen_qhttpmultipart.cpp index 509ed82c..5b5511ad 100644 --- a/qt/network/gen_qhttpmultipart.cpp +++ b/qt/network/gen_qhttpmultipart.cpp @@ -1,23 +1,29 @@ #include +#include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qhttpmultipart.h" #include "_cgo_export.h" -QHttpPart* QHttpPart_new() { - return new QHttpPart(); +void QHttpPart_new(QHttpPart** outptr_QHttpPart) { + QHttpPart* ret = new QHttpPart(); + *outptr_QHttpPart = ret; } -QHttpPart* QHttpPart_new2(QHttpPart* other) { - return new QHttpPart(*other); +void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart) { + QHttpPart* ret = new QHttpPart(*other); + *outptr_QHttpPart = ret; } void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other) { @@ -55,24 +61,219 @@ void QHttpPart_SetBodyDevice(QHttpPart* self, QIODevice* device) { self->setBodyDevice(device); } -void QHttpPart_Delete(QHttpPart* self) { - delete self; +void QHttpPart_Delete(QHttpPart* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHttpMultiPart* QHttpMultiPart_new() { - return new QHttpMultiPart(); +class MiqtVirtualQHttpMultiPart : public virtual QHttpMultiPart { +public: + + MiqtVirtualQHttpMultiPart(): QHttpMultiPart() {}; + MiqtVirtualQHttpMultiPart(QHttpMultiPart::ContentType contentType): QHttpMultiPart(contentType) {}; + MiqtVirtualQHttpMultiPart(QObject* parent): QHttpMultiPart(parent) {}; + MiqtVirtualQHttpMultiPart(QHttpMultiPart::ContentType contentType, QObject* parent): QHttpMultiPart(contentType, parent) {}; + + virtual ~MiqtVirtualQHttpMultiPart() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QHttpMultiPart::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QHttpMultiPart_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QHttpMultiPart::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QHttpMultiPart::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QHttpMultiPart_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QHttpMultiPart::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QHttpMultiPart::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QHttpMultiPart_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QHttpMultiPart::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QHttpMultiPart::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QHttpMultiPart_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QHttpMultiPart::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QHttpMultiPart::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QHttpMultiPart_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QHttpMultiPart::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QHttpMultiPart::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QHttpMultiPart_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QHttpMultiPart::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QHttpMultiPart::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QHttpMultiPart_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QHttpMultiPart::disconnectNotify(*signal); + + } + +}; + +void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } -QHttpMultiPart* QHttpMultiPart_new2(int contentType) { - return new QHttpMultiPart(static_cast(contentType)); +void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType)); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } -QHttpMultiPart* QHttpMultiPart_new3(QObject* parent) { - return new QHttpMultiPart(parent); +void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(parent); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } -QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent) { - return new QHttpMultiPart(static_cast(contentType), parent); +void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType), parent); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self) { @@ -171,7 +372,67 @@ struct miqt_string QHttpMultiPart_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QHttpMultiPart_Delete(QHttpMultiPart* self) { - delete self; +void QHttpMultiPart_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__Event = slot; +} + +bool QHttpMultiPart_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_Event(event); +} + +void QHttpMultiPart_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__EventFilter = slot; +} + +bool QHttpMultiPart_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QHttpMultiPart_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__TimerEvent = slot; +} + +void QHttpMultiPart_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_TimerEvent(event); +} + +void QHttpMultiPart_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__ChildEvent = slot; +} + +void QHttpMultiPart_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_ChildEvent(event); +} + +void QHttpMultiPart_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__CustomEvent = slot; +} + +void QHttpMultiPart_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_CustomEvent(event); +} + +void QHttpMultiPart_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__ConnectNotify = slot; +} + +void QHttpMultiPart_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QHttpMultiPart_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__DisconnectNotify = slot; +} + +void QHttpMultiPart_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QHttpMultiPart_Delete(QHttpMultiPart* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qhttpmultipart.go b/qt/network/gen_qhttpmultipart.go index 6c1a93e6..55b79c63 100644 --- a/qt/network/gen_qhttpmultipart.go +++ b/qt/network/gen_qhttpmultipart.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -24,7 +25,8 @@ const ( ) type QHttpPart struct { - h *C.QHttpPart + h *C.QHttpPart + isSubclass bool } func (this *QHttpPart) cPointer() *C.QHttpPart { @@ -41,6 +43,7 @@ func (this *QHttpPart) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHttpPart constructs the type using only CGO pointers. func newQHttpPart(h *C.QHttpPart) *QHttpPart { if h == nil { return nil @@ -48,20 +51,33 @@ func newQHttpPart(h *C.QHttpPart) *QHttpPart { return &QHttpPart{h: h} } +// UnsafeNewQHttpPart constructs the type using only unsafe pointers. func UnsafeNewQHttpPart(h unsafe.Pointer) *QHttpPart { - return newQHttpPart((*C.QHttpPart)(h)) + if h == nil { + return nil + } + + return &QHttpPart{h: (*C.QHttpPart)(h)} } // NewQHttpPart constructs a new QHttpPart object. func NewQHttpPart() *QHttpPart { - ret := C.QHttpPart_new() - return newQHttpPart(ret) + var outptr_QHttpPart *C.QHttpPart = nil + + C.QHttpPart_new(&outptr_QHttpPart) + ret := newQHttpPart(outptr_QHttpPart) + ret.isSubclass = true + return ret } // NewQHttpPart2 constructs a new QHttpPart object. func NewQHttpPart2(other *QHttpPart) *QHttpPart { - ret := C.QHttpPart_new2(other.cPointer()) - return newQHttpPart(ret) + var outptr_QHttpPart *C.QHttpPart = nil + + C.QHttpPart_new2(other.cPointer(), &outptr_QHttpPart) + ret := newQHttpPart(outptr_QHttpPart) + ret.isSubclass = true + return ret } func (this *QHttpPart) OperatorAssign(other *QHttpPart) { @@ -107,7 +123,7 @@ func (this *QHttpPart) SetBodyDevice(device *qt.QIODevice) { // Delete this object from C++ memory. func (this *QHttpPart) Delete() { - C.QHttpPart_Delete(this.h) + C.QHttpPart_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -120,7 +136,8 @@ func (this *QHttpPart) GoGC() { } type QHttpMultiPart struct { - h *C.QHttpMultiPart + h *C.QHttpMultiPart + isSubclass bool *qt.QObject } @@ -138,39 +155,67 @@ func (this *QHttpMultiPart) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHttpMultiPart(h *C.QHttpMultiPart) *QHttpMultiPart { +// newQHttpMultiPart constructs the type using only CGO pointers. +func newQHttpMultiPart(h *C.QHttpMultiPart, h_QObject *C.QObject) *QHttpMultiPart { if h == nil { return nil } - return &QHttpMultiPart{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QHttpMultiPart{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQHttpMultiPart(h unsafe.Pointer) *QHttpMultiPart { - return newQHttpMultiPart((*C.QHttpMultiPart)(h)) +// UnsafeNewQHttpMultiPart constructs the type using only unsafe pointers. +func UnsafeNewQHttpMultiPart(h unsafe.Pointer, h_QObject unsafe.Pointer) *QHttpMultiPart { + if h == nil { + return nil + } + + return &QHttpMultiPart{h: (*C.QHttpMultiPart)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQHttpMultiPart constructs a new QHttpMultiPart object. func NewQHttpMultiPart() *QHttpMultiPart { - ret := C.QHttpMultiPart_new() - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new(&outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHttpMultiPart2 constructs a new QHttpMultiPart object. func NewQHttpMultiPart2(contentType QHttpMultiPart__ContentType) *QHttpMultiPart { - ret := C.QHttpMultiPart_new2((C.int)(contentType)) - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new2((C.int)(contentType), &outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHttpMultiPart3 constructs a new QHttpMultiPart object. func NewQHttpMultiPart3(parent *qt.QObject) *QHttpMultiPart { - ret := C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer())) - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHttpMultiPart4 constructs a new QHttpMultiPart object. func NewQHttpMultiPart4(contentType QHttpMultiPart__ContentType, parent *qt.QObject) *QHttpMultiPart { - ret := C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer())) - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QHttpMultiPart) MetaObject() *qt.QMetaObject { @@ -267,9 +312,175 @@ func QHttpMultiPart_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QHttpMultiPart) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QHttpMultiPart_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QHttpMultiPart) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QHttpMultiPart_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_Event +func miqt_exec_callback_QHttpMultiPart_Event(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHttpMultiPart{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHttpMultiPart) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QHttpMultiPart_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QHttpMultiPart) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QHttpMultiPart_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_EventFilter +func miqt_exec_callback_QHttpMultiPart_EventFilter(self *C.QHttpMultiPart, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHttpMultiPart{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QHttpMultiPart) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QHttpMultiPart_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QHttpMultiPart_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_TimerEvent +func miqt_exec_callback_QHttpMultiPart_TimerEvent(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QHttpMultiPart_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QHttpMultiPart_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_ChildEvent +func miqt_exec_callback_QHttpMultiPart_ChildEvent(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QHttpMultiPart_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QHttpMultiPart_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_CustomEvent +func miqt_exec_callback_QHttpMultiPart_CustomEvent(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QHttpMultiPart_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QHttpMultiPart_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_ConnectNotify +func miqt_exec_callback_QHttpMultiPart_ConnectNotify(self *C.QHttpMultiPart, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QHttpMultiPart_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QHttpMultiPart_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_DisconnectNotify +func miqt_exec_callback_QHttpMultiPart_DisconnectNotify(self *C.QHttpMultiPart, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QHttpMultiPart) Delete() { - C.QHttpMultiPart_Delete(this.h) + C.QHttpMultiPart_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qhttpmultipart.h b/qt/network/gen_qhttpmultipart.h index 394049e2..34fae476 100644 --- a/qt/network/gen_qhttpmultipart.h +++ b/qt/network/gen_qhttpmultipart.h @@ -16,24 +16,32 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QHttpMultiPart; class QHttpPart; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QHttpMultiPart QHttpMultiPart; typedef struct QHttpPart QHttpPart; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QHttpPart* QHttpPart_new(); -QHttpPart* QHttpPart_new2(QHttpPart* other); +void QHttpPart_new(QHttpPart** outptr_QHttpPart); +void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart); void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other); void QHttpPart_Swap(QHttpPart* self, QHttpPart* other); bool QHttpPart_OperatorEqual(const QHttpPart* self, QHttpPart* other); @@ -42,12 +50,12 @@ void QHttpPart_SetHeader(QHttpPart* self, int header, QVariant* value); void QHttpPart_SetRawHeader(QHttpPart* self, struct miqt_string headerName, struct miqt_string headerValue); void QHttpPart_SetBody(QHttpPart* self, struct miqt_string body); void QHttpPart_SetBodyDevice(QHttpPart* self, QIODevice* device); -void QHttpPart_Delete(QHttpPart* self); +void QHttpPart_Delete(QHttpPart* self, bool isSubclass); -QHttpMultiPart* QHttpMultiPart_new(); -QHttpMultiPart* QHttpMultiPart_new2(int contentType); -QHttpMultiPart* QHttpMultiPart_new3(QObject* parent); -QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent); +void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self); void* QHttpMultiPart_Metacast(QHttpMultiPart* self, const char* param1); struct miqt_string QHttpMultiPart_Tr(const char* s); @@ -60,7 +68,21 @@ struct miqt_string QHttpMultiPart_Tr2(const char* s, const char* c); struct miqt_string QHttpMultiPart_Tr3(const char* s, const char* c, int n); struct miqt_string QHttpMultiPart_TrUtf82(const char* s, const char* c); struct miqt_string QHttpMultiPart_TrUtf83(const char* s, const char* c, int n); -void QHttpMultiPart_Delete(QHttpMultiPart* self); +void QHttpMultiPart_override_virtual_Event(void* self, intptr_t slot); +bool QHttpMultiPart_virtualbase_Event(void* self, QEvent* event); +void QHttpMultiPart_override_virtual_EventFilter(void* self, intptr_t slot); +bool QHttpMultiPart_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QHttpMultiPart_override_virtual_TimerEvent(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QHttpMultiPart_override_virtual_ChildEvent(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QHttpMultiPart_override_virtual_CustomEvent(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_CustomEvent(void* self, QEvent* event); +void QHttpMultiPart_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QHttpMultiPart_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QHttpMultiPart_Delete(QHttpMultiPart* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qlocalserver.cpp b/qt/network/gen_qlocalserver.cpp index 424f6d64..35b1623c 100644 --- a/qt/network/gen_qlocalserver.cpp +++ b/qt/network/gen_qlocalserver.cpp @@ -1,20 +1,278 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qlocalserver.h" #include "_cgo_export.h" -QLocalServer* QLocalServer_new() { - return new QLocalServer(); +class MiqtVirtualQLocalServer : public virtual QLocalServer { +public: + + MiqtVirtualQLocalServer(): QLocalServer() {}; + MiqtVirtualQLocalServer(QObject* parent): QLocalServer(parent) {}; + + virtual ~MiqtVirtualQLocalServer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingConnections = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingConnections() const override { + if (handle__HasPendingConnections == 0) { + return QLocalServer::hasPendingConnections(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalServer_HasPendingConnections(const_cast(this), handle__HasPendingConnections); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasPendingConnections() const { + + return QLocalServer::hasPendingConnections(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextPendingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual QLocalSocket* nextPendingConnection() override { + if (handle__NextPendingConnection == 0) { + return QLocalServer::nextPendingConnection(); + } + + + QLocalSocket* callback_return_value = miqt_exec_callback_QLocalServer_NextPendingConnection(this, handle__NextPendingConnection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLocalSocket* virtualbase_NextPendingConnection() { + + return QLocalServer::nextPendingConnection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IncomingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual void incomingConnection(quintptr socketDescriptor) override { + if (handle__IncomingConnection == 0) { + QLocalServer::incomingConnection(socketDescriptor); + return; + } + + quintptr socketDescriptor_ret = socketDescriptor; + uintptr_t sigval1 = static_cast(socketDescriptor_ret); + + miqt_exec_callback_QLocalServer_IncomingConnection(this, handle__IncomingConnection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_IncomingConnection(uintptr_t socketDescriptor) { + + QLocalServer::incomingConnection(static_cast(socketDescriptor)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QLocalServer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QLocalServer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QLocalServer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QLocalServer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QLocalServer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QLocalServer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QLocalServer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QLocalServer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QLocalServer::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QLocalServer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QLocalServer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QLocalServer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QLocalServer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLocalServer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QLocalServer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QLocalServer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLocalServer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QLocalServer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QLocalServer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLocalServer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QLocalServer::disconnectNotify(*signal); + + } + +}; + +void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { + MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(); + *outptr_QLocalServer = ret; + *outptr_QObject = static_cast(ret); } -QLocalServer* QLocalServer_new2(QObject* parent) { - return new QLocalServer(parent); +void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { + MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(parent); + *outptr_QLocalServer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QLocalServer_MetaObject(const QLocalServer* self) { @@ -52,7 +310,7 @@ void QLocalServer_NewConnection(QLocalServer* self) { } void QLocalServer_connect_NewConnection(QLocalServer* self, intptr_t slot) { - QLocalServer::connect(self, static_cast(&QLocalServer::newConnection), self, [=]() { + MiqtVirtualQLocalServer::connect(self, static_cast(&QLocalServer::newConnection), self, [=]() { miqt_exec_callback_QLocalServer_NewConnection(slot); }); } @@ -203,7 +461,91 @@ bool QLocalServer_WaitForNewConnection2(QLocalServer* self, int msec, bool* time return self->waitForNewConnection(static_cast(msec), timedOut); } -void QLocalServer_Delete(QLocalServer* self) { - delete self; +void QLocalServer_override_virtual_HasPendingConnections(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__HasPendingConnections = slot; +} + +bool QLocalServer_virtualbase_HasPendingConnections(const void* self) { + return ( (const MiqtVirtualQLocalServer*)(self) )->virtualbase_HasPendingConnections(); +} + +void QLocalServer_override_virtual_NextPendingConnection(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__NextPendingConnection = slot; +} + +QLocalSocket* QLocalServer_virtualbase_NextPendingConnection(void* self) { + return ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_NextPendingConnection(); +} + +void QLocalServer_override_virtual_IncomingConnection(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__IncomingConnection = slot; +} + +void QLocalServer_virtualbase_IncomingConnection(void* self, uintptr_t socketDescriptor) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_IncomingConnection(socketDescriptor); +} + +void QLocalServer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__Event = slot; +} + +bool QLocalServer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_Event(event); +} + +void QLocalServer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__EventFilter = slot; +} + +bool QLocalServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QLocalServer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__TimerEvent = slot; +} + +void QLocalServer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_TimerEvent(event); +} + +void QLocalServer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__ChildEvent = slot; +} + +void QLocalServer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_ChildEvent(event); +} + +void QLocalServer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__CustomEvent = slot; +} + +void QLocalServer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_CustomEvent(event); +} + +void QLocalServer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__ConnectNotify = slot; +} + +void QLocalServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QLocalServer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__DisconnectNotify = slot; +} + +void QLocalServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QLocalServer_Delete(QLocalServer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qlocalserver.go b/qt/network/gen_qlocalserver.go index 0c36c0f8..321a7004 100644 --- a/qt/network/gen_qlocalserver.go +++ b/qt/network/gen_qlocalserver.go @@ -26,7 +26,8 @@ const ( ) type QLocalServer struct { - h *C.QLocalServer + h *C.QLocalServer + isSubclass bool *qt.QObject } @@ -44,27 +45,45 @@ func (this *QLocalServer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLocalServer(h *C.QLocalServer) *QLocalServer { +// newQLocalServer constructs the type using only CGO pointers. +func newQLocalServer(h *C.QLocalServer, h_QObject *C.QObject) *QLocalServer { if h == nil { return nil } - return &QLocalServer{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QLocalServer{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQLocalServer(h unsafe.Pointer) *QLocalServer { - return newQLocalServer((*C.QLocalServer)(h)) +// UnsafeNewQLocalServer constructs the type using only unsafe pointers. +func UnsafeNewQLocalServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLocalServer { + if h == nil { + return nil + } + + return &QLocalServer{h: (*C.QLocalServer)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQLocalServer constructs a new QLocalServer object. func NewQLocalServer() *QLocalServer { - ret := C.QLocalServer_new() - return newQLocalServer(ret) + var outptr_QLocalServer *C.QLocalServer = nil + var outptr_QObject *C.QObject = nil + + C.QLocalServer_new(&outptr_QLocalServer, &outptr_QObject) + ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLocalServer2 constructs a new QLocalServer object. func NewQLocalServer2(parent *qt.QObject) *QLocalServer { - ret := C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer())) - return newQLocalServer(ret) + var outptr_QLocalServer *C.QLocalServer = nil + var outptr_QObject *C.QObject = nil + + C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalServer, &outptr_QObject) + ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QLocalServer) MetaObject() *qt.QMetaObject { @@ -148,7 +167,7 @@ func (this *QLocalServer) MaxPendingConnections() int { } func (this *QLocalServer) NextPendingConnection() *QLocalSocket { - return UnsafeNewQLocalSocket(unsafe.Pointer(C.QLocalServer_NextPendingConnection(this.h))) + return UnsafeNewQLocalSocket(unsafe.Pointer(C.QLocalServer_NextPendingConnection(this.h)), nil, nil) } func (this *QLocalServer) ServerName() string { @@ -249,9 +268,241 @@ func (this *QLocalServer) WaitForNewConnection2(msec int, timedOut *bool) bool { return (bool)(C.QLocalServer_WaitForNewConnection2(this.h, (C.int)(msec), (*C.bool)(unsafe.Pointer(timedOut)))) } +func (this *QLocalServer) callVirtualBase_HasPendingConnections() bool { + + return (bool)(C.QLocalServer_virtualbase_HasPendingConnections(unsafe.Pointer(this.h))) + +} +func (this *QLocalServer) OnHasPendingConnections(slot func(super func() bool) bool) { + C.QLocalServer_override_virtual_HasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_HasPendingConnections +func miqt_exec_callback_QLocalServer_HasPendingConnections(self *C.QLocalServer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_HasPendingConnections) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalServer) callVirtualBase_NextPendingConnection() *QLocalSocket { + + return UnsafeNewQLocalSocket(unsafe.Pointer(C.QLocalServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLocalServer) OnNextPendingConnection(slot func(super func() *QLocalSocket) *QLocalSocket) { + C.QLocalServer_override_virtual_NextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_NextPendingConnection +func miqt_exec_callback_QLocalServer_NextPendingConnection(self *C.QLocalServer, cb C.intptr_t) *C.QLocalSocket { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLocalSocket) *QLocalSocket) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_NextPendingConnection) + + return virtualReturn.cPointer() + +} + +func (this *QLocalServer) callVirtualBase_IncomingConnection(socketDescriptor uintptr) { + + C.QLocalServer_virtualbase_IncomingConnection(unsafe.Pointer(this.h), (C.uintptr_t)(socketDescriptor)) + +} +func (this *QLocalServer) OnIncomingConnection(slot func(super func(socketDescriptor uintptr), socketDescriptor uintptr)) { + C.QLocalServer_override_virtual_IncomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_IncomingConnection +func miqt_exec_callback_QLocalServer_IncomingConnection(self *C.QLocalServer, cb C.intptr_t, socketDescriptor C.uintptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr), socketDescriptor uintptr)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + gofunc((&QLocalServer{h: self}).callVirtualBase_IncomingConnection, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QLocalServer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QLocalServer) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QLocalServer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_Event +func miqt_exec_callback_QLocalServer_Event(self *C.QLocalServer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalServer) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QLocalServer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QLocalServer) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QLocalServer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_EventFilter +func miqt_exec_callback_QLocalServer_EventFilter(self *C.QLocalServer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalServer) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QLocalServer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QLocalServer) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QLocalServer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_TimerEvent +func miqt_exec_callback_QLocalServer_TimerEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QLocalServer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QLocalServer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QLocalServer) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QLocalServer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_ChildEvent +func miqt_exec_callback_QLocalServer_ChildEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QLocalServer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QLocalServer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QLocalServer) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QLocalServer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_CustomEvent +func miqt_exec_callback_QLocalServer_CustomEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLocalServer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QLocalServer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QLocalServer) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QLocalServer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_ConnectNotify +func miqt_exec_callback_QLocalServer_ConnectNotify(self *C.QLocalServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLocalServer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QLocalServer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QLocalServer) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QLocalServer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_DisconnectNotify +func miqt_exec_callback_QLocalServer_DisconnectNotify(self *C.QLocalServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLocalServer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QLocalServer) Delete() { - C.QLocalServer_Delete(this.h) + C.QLocalServer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qlocalserver.h b/qt/network/gen_qlocalserver.h index f4b480ca..a0859c11 100644 --- a/qt/network/gen_qlocalserver.h +++ b/qt/network/gen_qlocalserver.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QLocalServer; class QLocalSocket; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLocalServer QLocalServer; typedef struct QLocalSocket QLocalSocket; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QLocalServer* QLocalServer_new(); -QLocalServer* QLocalServer_new2(QObject* parent); +void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); +void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); QMetaObject* QLocalServer_MetaObject(const QLocalServer* self); void* QLocalServer_Metacast(QLocalServer* self, const char* param1); struct miqt_string QLocalServer_Tr(const char* s); @@ -51,13 +59,34 @@ bool QLocalServer_WaitForNewConnection(QLocalServer* self); void QLocalServer_SetSocketOptions(QLocalServer* self, int options); int QLocalServer_SocketOptions(const QLocalServer* self); intptr_t QLocalServer_SocketDescriptor(const QLocalServer* self); +void QLocalServer_IncomingConnection(QLocalServer* self, uintptr_t socketDescriptor); struct miqt_string QLocalServer_Tr2(const char* s, const char* c); struct miqt_string QLocalServer_Tr3(const char* s, const char* c, int n); struct miqt_string QLocalServer_TrUtf82(const char* s, const char* c); struct miqt_string QLocalServer_TrUtf83(const char* s, const char* c, int n); bool QLocalServer_WaitForNewConnection1(QLocalServer* self, int msec); bool QLocalServer_WaitForNewConnection2(QLocalServer* self, int msec, bool* timedOut); -void QLocalServer_Delete(QLocalServer* self); +void QLocalServer_override_virtual_HasPendingConnections(void* self, intptr_t slot); +bool QLocalServer_virtualbase_HasPendingConnections(const void* self); +void QLocalServer_override_virtual_NextPendingConnection(void* self, intptr_t slot); +QLocalSocket* QLocalServer_virtualbase_NextPendingConnection(void* self); +void QLocalServer_override_virtual_IncomingConnection(void* self, intptr_t slot); +void QLocalServer_virtualbase_IncomingConnection(void* self, uintptr_t socketDescriptor); +void QLocalServer_override_virtual_Event(void* self, intptr_t slot); +bool QLocalServer_virtualbase_Event(void* self, QEvent* event); +void QLocalServer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QLocalServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QLocalServer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLocalServer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QLocalServer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QLocalServer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QLocalServer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QLocalServer_virtualbase_CustomEvent(void* self, QEvent* event); +void QLocalServer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QLocalServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QLocalServer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QLocalServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QLocalServer_Delete(QLocalServer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qlocalsocket.cpp b/qt/network/gen_qlocalsocket.cpp index ac43b02b..d23309c0 100644 --- a/qt/network/gen_qlocalsocket.cpp +++ b/qt/network/gen_qlocalsocket.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -8,12 +9,403 @@ #include "gen_qlocalsocket.h" #include "_cgo_export.h" -QLocalSocket* QLocalSocket_new() { - return new QLocalSocket(); +class MiqtVirtualQLocalSocket : public virtual QLocalSocket { +public: + + MiqtVirtualQLocalSocket(): QLocalSocket() {}; + MiqtVirtualQLocalSocket(QObject* parent): QLocalSocket(parent) {}; + + virtual ~MiqtVirtualQLocalSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QLocalSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QLocalSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QLocalSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QLocalSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QLocalSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QLocalSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QLocalSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QLocalSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode openMode) override { + if (handle__Open == 0) { + return QLocalSocket::open(openMode); + } + + QIODevice::OpenMode openMode_ret = openMode; + int sigval1 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QLocalSocket_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int openMode) { + + return QLocalSocket::open(static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QLocalSocket::close(); + return; + } + + + miqt_exec_callback_QLocalSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QLocalSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QLocalSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QLocalSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QLocalSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QLocalSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QLocalSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QLocalSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* param1, qint64 param2) override { + if (handle__ReadData == 0) { + return QLocalSocket::readData(param1, param2); + } + + char* sigval1 = param1; + qint64 param2_ret = param2; + long long sigval2 = static_cast(param2_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* param1, long long param2) { + + qint64 _ret = QLocalSocket::readData(param1, static_cast(param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* param1, qint64 param2) override { + if (handle__WriteData == 0) { + return QLocalSocket::writeData(param1, param2); + } + + const char* sigval1 = (const char*) param1; + qint64 param2_ret = param2; + long long sigval2 = static_cast(param2_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* param1, long long param2) { + + qint64 _ret = QLocalSocket::writeData(param1, static_cast(param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QLocalSocket::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QLocalSocket::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QLocalSocket::size(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QLocalSocket::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QLocalSocket::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QLocalSocket_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QLocalSocket::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QLocalSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QLocalSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QLocalSocket::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QLocalSocket::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QLocalSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QLocalSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(); + *outptr_QLocalSocket = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QLocalSocket* QLocalSocket_new2(QObject* parent) { - return new QLocalSocket(parent); +void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(parent); + *outptr_QLocalSocket = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self) { @@ -108,8 +500,8 @@ bool QLocalSocket_CanReadLine(const QLocalSocket* self) { return self->canReadLine(); } -bool QLocalSocket_Open(QLocalSocket* self) { - return self->open(); +bool QLocalSocket_Open(QLocalSocket* self, int openMode) { + return self->open(static_cast(openMode)); } void QLocalSocket_Close(QLocalSocket* self) { @@ -152,8 +544,8 @@ int QLocalSocket_State(const QLocalSocket* self) { return static_cast(_ret); } -bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self) { - return self->waitForBytesWritten(); +bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } bool QLocalSocket_WaitForConnected(QLocalSocket* self) { @@ -164,8 +556,8 @@ bool QLocalSocket_WaitForDisconnected(QLocalSocket* self) { return self->waitForDisconnected(); } -bool QLocalSocket_WaitForReadyRead(QLocalSocket* self) { - return self->waitForReadyRead(); +bool QLocalSocket_WaitForReadyRead(QLocalSocket* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } void QLocalSocket_Connected(QLocalSocket* self) { @@ -173,7 +565,7 @@ void QLocalSocket_Connected(QLocalSocket* self) { } void QLocalSocket_connect_Connected(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::connected), self, [=]() { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::connected), self, [=]() { miqt_exec_callback_QLocalSocket_Connected(slot); }); } @@ -183,7 +575,7 @@ void QLocalSocket_Disconnected(QLocalSocket* self) { } void QLocalSocket_connect_Disconnected(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::disconnected), self, [=]() { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::disconnected), self, [=]() { miqt_exec_callback_QLocalSocket_Disconnected(slot); }); } @@ -193,7 +585,7 @@ void QLocalSocket_ErrorWithSocketError(QLocalSocket* self, int socketError) { } void QLocalSocket_connect_ErrorWithSocketError(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::error), self, [=](QLocalSocket::LocalSocketError socketError) { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::error), self, [=](QLocalSocket::LocalSocketError socketError) { QLocalSocket::LocalSocketError socketError_ret = socketError; int sigval1 = static_cast(socketError_ret); miqt_exec_callback_QLocalSocket_ErrorWithSocketError(slot, sigval1); @@ -205,7 +597,7 @@ void QLocalSocket_ErrorOccurred(QLocalSocket* self, int socketError) { } void QLocalSocket_connect_ErrorOccurred(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::errorOccurred), self, [=](QLocalSocket::LocalSocketError socketError) { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::errorOccurred), self, [=](QLocalSocket::LocalSocketError socketError) { QLocalSocket::LocalSocketError socketError_ret = socketError; int sigval1 = static_cast(socketError_ret); miqt_exec_callback_QLocalSocket_ErrorOccurred(slot, sigval1); @@ -217,7 +609,7 @@ void QLocalSocket_StateChanged(QLocalSocket* self, int socketState) { } void QLocalSocket_connect_StateChanged(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::stateChanged), self, [=](QLocalSocket::LocalSocketState socketState) { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::stateChanged), self, [=](QLocalSocket::LocalSocketState socketState) { QLocalSocket::LocalSocketState socketState_ret = socketState; int sigval1 = static_cast(socketState_ret); miqt_exec_callback_QLocalSocket_StateChanged(slot, sigval1); @@ -277,10 +669,6 @@ void QLocalSocket_ConnectToServer2(QLocalSocket* self, struct miqt_string name, self->connectToServer(name_QString, static_cast(openMode)); } -bool QLocalSocket_Open1(QLocalSocket* self, int openMode) { - return self->open(static_cast(openMode)); -} - bool QLocalSocket_SetSocketDescriptor2(QLocalSocket* self, intptr_t socketDescriptor, int socketState) { return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(socketState)); } @@ -289,10 +677,6 @@ bool QLocalSocket_SetSocketDescriptor3(QLocalSocket* self, intptr_t socketDescri return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(socketState), static_cast(openMode)); } -bool QLocalSocket_WaitForBytesWritten1(QLocalSocket* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); -} - bool QLocalSocket_WaitForConnected1(QLocalSocket* self, int msecs) { return self->waitForConnected(static_cast(msecs)); } @@ -301,11 +685,139 @@ bool QLocalSocket_WaitForDisconnected1(QLocalSocket* self, int msecs) { return self->waitForDisconnected(static_cast(msecs)); } -bool QLocalSocket_WaitForReadyRead1(QLocalSocket* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); +void QLocalSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__IsSequential = slot; +} + +bool QLocalSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_IsSequential(); +} + +void QLocalSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QLocalSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QLocalSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QLocalSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QLocalSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QLocalSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QLocalSocket_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Open = slot; +} + +bool QLocalSocket_virtualbase_Open(void* self, int openMode) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Open(openMode); +} + +void QLocalSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Close = slot; +} + +void QLocalSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Close(); +} + +void QLocalSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QLocalSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QLocalSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QLocalSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QLocalSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__ReadData = slot; +} + +long long QLocalSocket_virtualbase_ReadData(void* self, char* param1, long long param2) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_ReadData(param1, param2); +} + +void QLocalSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__WriteData = slot; +} + +long long QLocalSocket_virtualbase_WriteData(void* self, const char* param1, long long param2) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_WriteData(param1, param2); +} + +void QLocalSocket_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Pos = slot; +} + +long long QLocalSocket_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_Pos(); +} + +void QLocalSocket_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Size = slot; +} + +long long QLocalSocket_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_Size(); +} + +void QLocalSocket_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Seek = slot; +} + +bool QLocalSocket_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Seek(pos); +} + +void QLocalSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__AtEnd = slot; +} + +bool QLocalSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_AtEnd(); +} + +void QLocalSocket_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Reset = slot; +} + +bool QLocalSocket_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Reset(); +} + +void QLocalSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QLocalSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); } -void QLocalSocket_Delete(QLocalSocket* self) { - delete self; +void QLocalSocket_Delete(QLocalSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qlocalsocket.go b/qt/network/gen_qlocalsocket.go index 9c82bbc2..f6953d32 100644 --- a/qt/network/gen_qlocalsocket.go +++ b/qt/network/gen_qlocalsocket.go @@ -41,7 +41,8 @@ const ( ) type QLocalSocket struct { - h *C.QLocalSocket + h *C.QLocalSocket + isSubclass bool *qt.QIODevice } @@ -59,27 +60,47 @@ func (this *QLocalSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLocalSocket(h *C.QLocalSocket) *QLocalSocket { +// newQLocalSocket constructs the type using only CGO pointers. +func newQLocalSocket(h *C.QLocalSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QLocalSocket { if h == nil { return nil } - return &QLocalSocket{h: h, QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QLocalSocket{h: h, + QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject))} } -func UnsafeNewQLocalSocket(h unsafe.Pointer) *QLocalSocket { - return newQLocalSocket((*C.QLocalSocket)(h)) +// UnsafeNewQLocalSocket constructs the type using only unsafe pointers. +func UnsafeNewQLocalSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QLocalSocket { + if h == nil { + return nil + } + + return &QLocalSocket{h: (*C.QLocalSocket)(h), + QIODevice: qt.UnsafeNewQIODevice(h_QIODevice, h_QObject)} } // NewQLocalSocket constructs a new QLocalSocket object. func NewQLocalSocket() *QLocalSocket { - ret := C.QLocalSocket_new() - return newQLocalSocket(ret) + var outptr_QLocalSocket *C.QLocalSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QLocalSocket_new(&outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLocalSocket2 constructs a new QLocalSocket object. func NewQLocalSocket2(parent *qt.QObject) *QLocalSocket { - ret := C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQLocalSocket(ret) + var outptr_QLocalSocket *C.QLocalSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QLocalSocket) MetaObject() *qt.QMetaObject { @@ -168,8 +189,8 @@ func (this *QLocalSocket) CanReadLine() bool { return (bool)(C.QLocalSocket_CanReadLine(this.h)) } -func (this *QLocalSocket) Open() bool { - return (bool)(C.QLocalSocket_Open(this.h)) +func (this *QLocalSocket) Open(openMode qt.QIODevice__OpenModeFlag) bool { + return (bool)(C.QLocalSocket_Open(this.h, (C.int)(openMode))) } func (this *QLocalSocket) Close() { @@ -208,8 +229,8 @@ func (this *QLocalSocket) State() QLocalSocket__LocalSocketState { return (QLocalSocket__LocalSocketState)(C.QLocalSocket_State(this.h)) } -func (this *QLocalSocket) WaitForBytesWritten() bool { - return (bool)(C.QLocalSocket_WaitForBytesWritten(this.h)) +func (this *QLocalSocket) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QLocalSocket_WaitForBytesWritten(this.h, (C.int)(msecs))) } func (this *QLocalSocket) WaitForConnected() bool { @@ -220,8 +241,8 @@ func (this *QLocalSocket) WaitForDisconnected() bool { return (bool)(C.QLocalSocket_WaitForDisconnected(this.h)) } -func (this *QLocalSocket) WaitForReadyRead() bool { - return (bool)(C.QLocalSocket_WaitForReadyRead(this.h)) +func (this *QLocalSocket) WaitForReadyRead(msecs int) bool { + return (bool)(C.QLocalSocket_WaitForReadyRead(this.h, (C.int)(msecs))) } func (this *QLocalSocket) Connected() { @@ -374,10 +395,6 @@ func (this *QLocalSocket) ConnectToServer2(name string, openMode qt.QIODevice__O C.QLocalSocket_ConnectToServer2(this.h, name_ms, (C.int)(openMode)) } -func (this *QLocalSocket) Open1(openMode qt.QIODevice__OpenModeFlag) bool { - return (bool)(C.QLocalSocket_Open1(this.h, (C.int)(openMode))) -} - func (this *QLocalSocket) SetSocketDescriptor2(socketDescriptor uintptr, socketState QLocalSocket__LocalSocketState) bool { return (bool)(C.QLocalSocket_SetSocketDescriptor2(this.h, (C.intptr_t)(socketDescriptor), (C.int)(socketState))) } @@ -386,10 +403,6 @@ func (this *QLocalSocket) SetSocketDescriptor3(socketDescriptor uintptr, socketS return (bool)(C.QLocalSocket_SetSocketDescriptor3(this.h, (C.intptr_t)(socketDescriptor), (C.int)(socketState), (C.int)(openMode))) } -func (this *QLocalSocket) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QLocalSocket_WaitForBytesWritten1(this.h, (C.int)(msecs))) -} - func (this *QLocalSocket) WaitForConnected1(msecs int) bool { return (bool)(C.QLocalSocket_WaitForConnected1(this.h, (C.int)(msecs))) } @@ -398,13 +411,395 @@ func (this *QLocalSocket) WaitForDisconnected1(msecs int) bool { return (bool)(C.QLocalSocket_WaitForDisconnected1(this.h, (C.int)(msecs))) } -func (this *QLocalSocket) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QLocalSocket_WaitForReadyRead1(this.h, (C.int)(msecs))) +func (this *QLocalSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QLocalSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_IsSequential +func miqt_exec_callback_QLocalSocket_IsSequential(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QLocalSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_BytesAvailable +func miqt_exec_callback_QLocalSocket_BytesAvailable(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QLocalSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_BytesToWrite +func miqt_exec_callback_QLocalSocket_BytesToWrite(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QLocalSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_CanReadLine +func miqt_exec_callback_QLocalSocket_CanReadLine(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Open(openMode qt.QIODevice__OpenModeFlag) bool { + + return (bool)(C.QLocalSocket_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(openMode))) + +} +func (this *QLocalSocket) OnOpen(slot func(super func(openMode qt.QIODevice__OpenModeFlag) bool, openMode qt.QIODevice__OpenModeFlag) bool) { + C.QLocalSocket_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Open +func miqt_exec_callback_QLocalSocket_Open(self *C.QLocalSocket, cb C.intptr_t, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(openMode qt.QIODevice__OpenModeFlag) bool, openMode qt.QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QIODevice__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Close() { + + C.QLocalSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QLocalSocket) OnClose(slot func(super func())) { + C.QLocalSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Close +func miqt_exec_callback_QLocalSocket_Close(self *C.QLocalSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QLocalSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QLocalSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QLocalSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QLocalSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QLocalSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_WaitForBytesWritten +func miqt_exec_callback_QLocalSocket_WaitForBytesWritten(self *C.QLocalSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QLocalSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QLocalSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QLocalSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_WaitForReadyRead +func miqt_exec_callback_QLocalSocket_WaitForReadyRead(self *C.QLocalSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_ReadData(param1 string, param2 int64) int64 { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + + return (int64)(C.QLocalSocket_virtualbase_ReadData(unsafe.Pointer(this.h), param1_Cstring, (C.longlong)(param2))) + +} +func (this *QLocalSocket) OnReadData(slot func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) { + C.QLocalSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_ReadData +func miqt_exec_callback_QLocalSocket_ReadData(self *C.QLocalSocket, cb C.intptr_t, param1 *C.char, param2 C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + param1_ret := param1 + slotval1 := C.GoString(param1_ret) + + slotval2 := (int64)(param2) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_WriteData(param1 string, param2 int64) int64 { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + + return (int64)(C.QLocalSocket_virtualbase_WriteData(unsafe.Pointer(this.h), param1_Cstring, (C.longlong)(param2))) + +} +func (this *QLocalSocket) OnWriteData(slot func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) { + C.QLocalSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_WriteData +func miqt_exec_callback_QLocalSocket_WriteData(self *C.QLocalSocket, cb C.intptr_t, param1 *C.const_char, param2 C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + param1_ret := param1 + slotval1 := C.GoString(param1_ret) + + slotval2 := (int64)(param2) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Pos() int64 { + + return (int64)(C.QLocalSocket_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnPos(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Pos +func miqt_exec_callback_QLocalSocket_Pos(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Size() int64 { + + return (int64)(C.QLocalSocket_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnSize(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Size +func miqt_exec_callback_QLocalSocket_Size(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QLocalSocket_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QLocalSocket) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QLocalSocket_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Seek +func miqt_exec_callback_QLocalSocket_Seek(self *C.QLocalSocket, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QLocalSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_AtEnd +func miqt_exec_callback_QLocalSocket_AtEnd(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Reset() bool { + + return (bool)(C.QLocalSocket_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnReset(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Reset +func miqt_exec_callback_QLocalSocket_Reset(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QLocalSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QLocalSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QLocalSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_ReadLineData +func miqt_exec_callback_QLocalSocket_ReadLineData(self *C.QLocalSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + } // Delete this object from C++ memory. func (this *QLocalSocket) Delete() { - C.QLocalSocket_Delete(this.h) + C.QLocalSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qlocalsocket.h b/qt/network/gen_qlocalsocket.h index 9403123b..e6e9d854 100644 --- a/qt/network/gen_qlocalsocket.h +++ b/qt/network/gen_qlocalsocket.h @@ -15,17 +15,19 @@ extern "C" { #endif #ifdef __cplusplus +class QIODevice; class QLocalSocket; class QMetaObject; class QObject; #else +typedef struct QIODevice QIODevice; typedef struct QLocalSocket QLocalSocket; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QLocalSocket* QLocalSocket_new(); -QLocalSocket* QLocalSocket_new2(QObject* parent); +void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self); void* QLocalSocket_Metacast(QLocalSocket* self, const char* param1); struct miqt_string QLocalSocket_Tr(const char* s); @@ -41,7 +43,7 @@ bool QLocalSocket_IsSequential(const QLocalSocket* self); long long QLocalSocket_BytesAvailable(const QLocalSocket* self); long long QLocalSocket_BytesToWrite(const QLocalSocket* self); bool QLocalSocket_CanReadLine(const QLocalSocket* self); -bool QLocalSocket_Open(QLocalSocket* self); +bool QLocalSocket_Open(QLocalSocket* self, int openMode); void QLocalSocket_Close(QLocalSocket* self); int QLocalSocket_Error(const QLocalSocket* self); bool QLocalSocket_Flush(QLocalSocket* self); @@ -51,10 +53,10 @@ void QLocalSocket_SetReadBufferSize(QLocalSocket* self, long long size); bool QLocalSocket_SetSocketDescriptor(QLocalSocket* self, intptr_t socketDescriptor); intptr_t QLocalSocket_SocketDescriptor(const QLocalSocket* self); int QLocalSocket_State(const QLocalSocket* self); -bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self); +bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self, int msecs); bool QLocalSocket_WaitForConnected(QLocalSocket* self); bool QLocalSocket_WaitForDisconnected(QLocalSocket* self); -bool QLocalSocket_WaitForReadyRead(QLocalSocket* self); +bool QLocalSocket_WaitForReadyRead(QLocalSocket* self, int msecs); void QLocalSocket_Connected(QLocalSocket* self); void QLocalSocket_connect_Connected(QLocalSocket* self, intptr_t slot); void QLocalSocket_Disconnected(QLocalSocket* self); @@ -65,20 +67,51 @@ void QLocalSocket_ErrorOccurred(QLocalSocket* self, int socketError); void QLocalSocket_connect_ErrorOccurred(QLocalSocket* self, intptr_t slot); void QLocalSocket_StateChanged(QLocalSocket* self, int socketState); void QLocalSocket_connect_StateChanged(QLocalSocket* self, intptr_t slot); +long long QLocalSocket_ReadData(QLocalSocket* self, char* param1, long long param2); +long long QLocalSocket_WriteData(QLocalSocket* self, const char* param1, long long param2); struct miqt_string QLocalSocket_Tr2(const char* s, const char* c); struct miqt_string QLocalSocket_Tr3(const char* s, const char* c, int n); struct miqt_string QLocalSocket_TrUtf82(const char* s, const char* c); struct miqt_string QLocalSocket_TrUtf83(const char* s, const char* c, int n); void QLocalSocket_ConnectToServer1(QLocalSocket* self, int openMode); void QLocalSocket_ConnectToServer2(QLocalSocket* self, struct miqt_string name, int openMode); -bool QLocalSocket_Open1(QLocalSocket* self, int openMode); bool QLocalSocket_SetSocketDescriptor2(QLocalSocket* self, intptr_t socketDescriptor, int socketState); bool QLocalSocket_SetSocketDescriptor3(QLocalSocket* self, intptr_t socketDescriptor, int socketState, int openMode); -bool QLocalSocket_WaitForBytesWritten1(QLocalSocket* self, int msecs); bool QLocalSocket_WaitForConnected1(QLocalSocket* self, int msecs); bool QLocalSocket_WaitForDisconnected1(QLocalSocket* self, int msecs); -bool QLocalSocket_WaitForReadyRead1(QLocalSocket* self, int msecs); -void QLocalSocket_Delete(QLocalSocket* self); +void QLocalSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_IsSequential(const void* self); +void QLocalSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_BytesAvailable(const void* self); +void QLocalSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_BytesToWrite(const void* self); +void QLocalSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_CanReadLine(const void* self); +void QLocalSocket_override_virtual_Open(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_Open(void* self, int openMode); +void QLocalSocket_override_virtual_Close(void* self, intptr_t slot); +void QLocalSocket_virtualbase_Close(void* self); +void QLocalSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QLocalSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QLocalSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_ReadData(void* self, char* param1, long long param2); +void QLocalSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_WriteData(void* self, const char* param1, long long param2); +void QLocalSocket_override_virtual_Pos(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_Pos(const void* self); +void QLocalSocket_override_virtual_Size(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_Size(const void* self); +void QLocalSocket_override_virtual_Seek(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_Seek(void* self, long long pos); +void QLocalSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_AtEnd(const void* self); +void QLocalSocket_override_virtual_Reset(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_Reset(void* self); +void QLocalSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QLocalSocket_Delete(QLocalSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkaccessmanager.cpp b/qt/network/gen_qnetworkaccessmanager.cpp index b363bfd1..7bb31a3b 100644 --- a/qt/network/gen_qnetworkaccessmanager.cpp +++ b/qt/network/gen_qnetworkaccessmanager.cpp @@ -1,10 +1,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -20,16 +23,230 @@ #include #include #include +#include #include #include "gen_qnetworkaccessmanager.h" #include "_cgo_export.h" -QNetworkAccessManager* QNetworkAccessManager_new() { - return new QNetworkAccessManager(); +class MiqtVirtualQNetworkAccessManager : public virtual QNetworkAccessManager { +public: + + MiqtVirtualQNetworkAccessManager(): QNetworkAccessManager() {}; + MiqtVirtualQNetworkAccessManager(QObject* parent): QNetworkAccessManager(parent) {}; + + virtual ~MiqtVirtualQNetworkAccessManager() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateRequest = 0; + + // Subclass to allow providing a Go implementation + virtual QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData) override { + if (handle__CreateRequest == 0) { + return QNetworkAccessManager::createRequest(op, request, outgoingData); + } + + QNetworkAccessManager::Operation op_ret = op; + int sigval1 = static_cast(op_ret); + const QNetworkRequest& request_ret = request; + // Cast returned reference into pointer + QNetworkRequest* sigval2 = const_cast(&request_ret); + QIODevice* sigval3 = outgoingData; + + QNetworkReply* callback_return_value = miqt_exec_callback_QNetworkAccessManager_CreateRequest(this, handle__CreateRequest, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QNetworkReply* virtualbase_CreateRequest(int op, QNetworkRequest* request, QIODevice* outgoingData) { + + return QNetworkAccessManager::createRequest(static_cast(op), *request, outgoingData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QNetworkAccessManager::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkAccessManager_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QNetworkAccessManager::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QNetworkAccessManager::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkAccessManager_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QNetworkAccessManager::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QNetworkAccessManager::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QNetworkAccessManager_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QNetworkAccessManager::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QNetworkAccessManager::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QNetworkAccessManager_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QNetworkAccessManager::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QNetworkAccessManager::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QNetworkAccessManager_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QNetworkAccessManager::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QNetworkAccessManager::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkAccessManager_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QNetworkAccessManager::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QNetworkAccessManager::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkAccessManager_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QNetworkAccessManager::disconnectNotify(*signal); + + } + +}; + +void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { + MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(); + *outptr_QNetworkAccessManager = ret; + *outptr_QObject = static_cast(ret); } -QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent) { - return new QNetworkAccessManager(parent); +void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { + MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(parent); + *outptr_QNetworkAccessManager = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self) { @@ -282,7 +499,7 @@ void QNetworkAccessManager_ProxyAuthenticationRequired(QNetworkAccessManager* se } void QNetworkAccessManager_connect_ProxyAuthenticationRequired(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { const QNetworkProxy& proxy_ret = proxy; // Cast returned reference into pointer QNetworkProxy* sigval1 = const_cast(&proxy_ret); @@ -296,7 +513,7 @@ void QNetworkAccessManager_AuthenticationRequired(QNetworkAccessManager* self, Q } void QNetworkAccessManager_connect_AuthenticationRequired(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::authenticationRequired), self, [=](QNetworkReply* reply, QAuthenticator* authenticator) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::authenticationRequired), self, [=](QNetworkReply* reply, QAuthenticator* authenticator) { QNetworkReply* sigval1 = reply; QAuthenticator* sigval2 = authenticator; miqt_exec_callback_QNetworkAccessManager_AuthenticationRequired(slot, sigval1, sigval2); @@ -308,7 +525,7 @@ void QNetworkAccessManager_Finished(QNetworkAccessManager* self, QNetworkReply* } void QNetworkAccessManager_connect_Finished(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::finished), self, [=](QNetworkReply* reply) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::finished), self, [=](QNetworkReply* reply) { QNetworkReply* sigval1 = reply; miqt_exec_callback_QNetworkAccessManager_Finished(slot, sigval1); }); @@ -319,7 +536,7 @@ void QNetworkAccessManager_Encrypted(QNetworkAccessManager* self, QNetworkReply* } void QNetworkAccessManager_connect_Encrypted(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::encrypted), self, [=](QNetworkReply* reply) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::encrypted), self, [=](QNetworkReply* reply) { QNetworkReply* sigval1 = reply; miqt_exec_callback_QNetworkAccessManager_Encrypted(slot, sigval1); }); @@ -336,7 +553,7 @@ void QNetworkAccessManager_SslErrors(QNetworkAccessManager* self, QNetworkReply* } void QNetworkAccessManager_connect_SslErrors(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast&)>(&QNetworkAccessManager::sslErrors), self, [=](QNetworkReply* reply, const QList& errors) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast&)>(&QNetworkAccessManager::sslErrors), self, [=](QNetworkReply* reply, const QList& errors) { QNetworkReply* sigval1 = reply; const QList& errors_ret = errors; // Convert QList<> from C++ memory to manually-managed C memory @@ -357,7 +574,7 @@ void QNetworkAccessManager_PreSharedKeyAuthenticationRequired(QNetworkAccessMana } void QNetworkAccessManager_connect_PreSharedKeyAuthenticationRequired(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::preSharedKeyAuthenticationRequired), self, [=](QNetworkReply* reply, QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::preSharedKeyAuthenticationRequired), self, [=](QNetworkReply* reply, QSslPreSharedKeyAuthenticator* authenticator) { QNetworkReply* sigval1 = reply; QSslPreSharedKeyAuthenticator* sigval2 = authenticator; miqt_exec_callback_QNetworkAccessManager_PreSharedKeyAuthenticationRequired(slot, sigval1, sigval2); @@ -369,7 +586,7 @@ void QNetworkAccessManager_NetworkSessionConnected(QNetworkAccessManager* self) } void QNetworkAccessManager_connect_NetworkSessionConnected(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::networkSessionConnected), self, [=]() { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::networkSessionConnected), self, [=]() { miqt_exec_callback_QNetworkAccessManager_NetworkSessionConnected(slot); }); } @@ -379,7 +596,7 @@ void QNetworkAccessManager_NetworkAccessibleChanged(QNetworkAccessManager* self, } void QNetworkAccessManager_connect_NetworkAccessibleChanged(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::networkAccessibleChanged), self, [=](QNetworkAccessManager::NetworkAccessibility accessible) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::networkAccessibleChanged), self, [=](QNetworkAccessManager::NetworkAccessibility accessible) { QNetworkAccessManager::NetworkAccessibility accessible_ret = accessible; int sigval1 = static_cast(accessible_ret); miqt_exec_callback_QNetworkAccessManager_NetworkAccessibleChanged(slot, sigval1); @@ -459,7 +676,75 @@ void QNetworkAccessManager_SetTransferTimeout1(QNetworkAccessManager* self, int self->setTransferTimeout(static_cast(timeout)); } -void QNetworkAccessManager_Delete(QNetworkAccessManager* self) { - delete self; +void QNetworkAccessManager_override_virtual_CreateRequest(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__CreateRequest = slot; +} + +QNetworkReply* QNetworkAccessManager_virtualbase_CreateRequest(void* self, int op, QNetworkRequest* request, QIODevice* outgoingData) { + return ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_CreateRequest(op, request, outgoingData); +} + +void QNetworkAccessManager_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__Event = slot; +} + +bool QNetworkAccessManager_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_Event(event); +} + +void QNetworkAccessManager_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__EventFilter = slot; +} + +bool QNetworkAccessManager_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QNetworkAccessManager_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__TimerEvent = slot; +} + +void QNetworkAccessManager_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_TimerEvent(event); +} + +void QNetworkAccessManager_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__ChildEvent = slot; +} + +void QNetworkAccessManager_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_ChildEvent(event); +} + +void QNetworkAccessManager_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__CustomEvent = slot; +} + +void QNetworkAccessManager_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_CustomEvent(event); +} + +void QNetworkAccessManager_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__ConnectNotify = slot; +} + +void QNetworkAccessManager_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QNetworkAccessManager_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__DisconnectNotify = slot; +} + +void QNetworkAccessManager_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QNetworkAccessManager_Delete(QNetworkAccessManager* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkaccessmanager.go b/qt/network/gen_qnetworkaccessmanager.go index 12303fa6..80b6363f 100644 --- a/qt/network/gen_qnetworkaccessmanager.go +++ b/qt/network/gen_qnetworkaccessmanager.go @@ -36,7 +36,8 @@ const ( ) type QNetworkAccessManager struct { - h *C.QNetworkAccessManager + h *C.QNetworkAccessManager + isSubclass bool *qt.QObject } @@ -54,27 +55,45 @@ func (this *QNetworkAccessManager) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkAccessManager(h *C.QNetworkAccessManager) *QNetworkAccessManager { +// newQNetworkAccessManager constructs the type using only CGO pointers. +func newQNetworkAccessManager(h *C.QNetworkAccessManager, h_QObject *C.QObject) *QNetworkAccessManager { if h == nil { return nil } - return &QNetworkAccessManager{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkAccessManager{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkAccessManager(h unsafe.Pointer) *QNetworkAccessManager { - return newQNetworkAccessManager((*C.QNetworkAccessManager)(h)) +// UnsafeNewQNetworkAccessManager constructs the type using only unsafe pointers. +func UnsafeNewQNetworkAccessManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkAccessManager { + if h == nil { + return nil + } + + return &QNetworkAccessManager{h: (*C.QNetworkAccessManager)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQNetworkAccessManager constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager() *QNetworkAccessManager { - ret := C.QNetworkAccessManager_new() - return newQNetworkAccessManager(ret) + var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkAccessManager_new(&outptr_QNetworkAccessManager, &outptr_QObject) + ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkAccessManager2 constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager2(parent *qt.QObject) *QNetworkAccessManager { - ret := C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkAccessManager(ret) + var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkAccessManager, &outptr_QObject) + ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkAccessManager) MetaObject() *qt.QMetaObject { @@ -146,7 +165,7 @@ func (this *QNetworkAccessManager) SetProxyFactory(factory *QNetworkProxyFactory } func (this *QNetworkAccessManager) Cache() *QAbstractNetworkCache { - return UnsafeNewQAbstractNetworkCache(unsafe.Pointer(C.QNetworkAccessManager_Cache(this.h))) + return UnsafeNewQAbstractNetworkCache(unsafe.Pointer(C.QNetworkAccessManager_Cache(this.h)), nil) } func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { @@ -154,7 +173,7 @@ func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { } func (this *QNetworkAccessManager) CookieJar() *QNetworkCookieJar { - return UnsafeNewQNetworkCookieJar(unsafe.Pointer(C.QNetworkAccessManager_CookieJar(this.h))) + return UnsafeNewQNetworkCookieJar(unsafe.Pointer(C.QNetworkAccessManager_CookieJar(this.h)), nil) } func (this *QNetworkAccessManager) SetCookieJar(cookieJar *QNetworkCookieJar) { @@ -201,44 +220,44 @@ func (this *QNetworkAccessManager) StrictTransportSecurityHosts() []QHstsPolicy } func (this *QNetworkAccessManager) Head(request *QNetworkRequest) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Head(this.h, request.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Head(this.h, request.cPointer())), nil, nil) } func (this *QNetworkAccessManager) Get(request *QNetworkRequest) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Get(this.h, request.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Get(this.h, request.cPointer())), nil, nil) } func (this *QNetworkAccessManager) Post(request *QNetworkRequest, data *qt.QIODevice) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))), nil, nil) } func (this *QNetworkAccessManager) Post2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias)), nil, nil) } func (this *QNetworkAccessManager) Put(request *QNetworkRequest, data *qt.QIODevice) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))), nil, nil) } func (this *QNetworkAccessManager) Put2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias)), nil, nil) } func (this *QNetworkAccessManager) DeleteResource(request *QNetworkRequest) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer())), nil, nil) } func (this *QNetworkAccessManager) SendCustomRequest(request *QNetworkRequest, verb []byte) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias)), nil, nil) } func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, verb []byte, data []byte) *QNetworkReply { @@ -248,22 +267,22 @@ func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias)), nil, nil) } func (this *QNetworkAccessManager) Post3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer())), nil, nil) } func (this *QNetworkAccessManager) Put3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer())), nil, nil) } func (this *QNetworkAccessManager) SendCustomRequest3(request *QNetworkRequest, verb []byte, multiPart *QHttpMultiPart) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer())), nil, nil) } func (this *QNetworkAccessManager) SetConfiguration(config *QNetworkConfiguration) { @@ -380,7 +399,7 @@ func miqt_exec_callback_QNetworkAccessManager_AuthenticationRequired(cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) slotval2 := UnsafeNewQAuthenticator(unsafe.Pointer(authenticator)) gofunc(slotval1, slotval2) @@ -401,7 +420,7 @@ func miqt_exec_callback_QNetworkAccessManager_Finished(cb C.intptr_t, reply *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) gofunc(slotval1) } @@ -421,7 +440,7 @@ func miqt_exec_callback_QNetworkAccessManager_Encrypted(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) gofunc(slotval1) } @@ -447,7 +466,7 @@ func miqt_exec_callback_QNetworkAccessManager_SslErrors(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) var errors_ma C.struct_miqt_array = errors errors_ret := make([]QSslError, int(errors_ma.len)) errors_outCast := (*[0xffff]*C.QSslError)(unsafe.Pointer(errors_ma.data)) // hey ya @@ -477,7 +496,7 @@ func miqt_exec_callback_QNetworkAccessManager_PreSharedKeyAuthenticationRequired } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) slotval2 := UnsafeNewQSslPreSharedKeyAuthenticator(unsafe.Pointer(authenticator)) gofunc(slotval1, slotval2) @@ -576,7 +595,7 @@ func (this *QNetworkAccessManager) SendCustomRequest32(request *QNetworkRequest, verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer())))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer()))), nil, nil) } func (this *QNetworkAccessManager) ConnectToHostEncrypted22(hostName string, port uint16) { @@ -607,9 +626,202 @@ func (this *QNetworkAccessManager) SetTransferTimeout1(timeout int) { C.QNetworkAccessManager_SetTransferTimeout1(this.h, (C.int)(timeout)) } +func (this *QNetworkAccessManager) callVirtualBase_CreateRequest(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply { + + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_virtualbase_CreateRequest(unsafe.Pointer(this.h), (C.int)(op), request.cPointer(), (*C.QIODevice)(outgoingData.UnsafePointer()))), nil, nil) +} +func (this *QNetworkAccessManager) OnCreateRequest(slot func(super func(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply, op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply) { + C.QNetworkAccessManager_override_virtual_CreateRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_CreateRequest +func miqt_exec_callback_QNetworkAccessManager_CreateRequest(self *C.QNetworkAccessManager, cb C.intptr_t, op C.int, request *C.QNetworkRequest, outgoingData *C.QIODevice) *C.QNetworkReply { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply, op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QNetworkAccessManager__Operation)(op) + + slotval2 := UnsafeNewQNetworkRequest(unsafe.Pointer(request)) + slotval3 := qt.UnsafeNewQIODevice(unsafe.Pointer(outgoingData), nil) + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_CreateRequest, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QNetworkAccessManager) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QNetworkAccessManager_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkAccessManager) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QNetworkAccessManager_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_Event +func miqt_exec_callback_QNetworkAccessManager_Event(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkAccessManager) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QNetworkAccessManager_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkAccessManager) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QNetworkAccessManager_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_EventFilter +func miqt_exec_callback_QNetworkAccessManager_EventFilter(self *C.QNetworkAccessManager, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkAccessManager) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QNetworkAccessManager_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QNetworkAccessManager_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_TimerEvent +func miqt_exec_callback_QNetworkAccessManager_TimerEvent(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QNetworkAccessManager_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QNetworkAccessManager_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_ChildEvent +func miqt_exec_callback_QNetworkAccessManager_ChildEvent(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QNetworkAccessManager_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QNetworkAccessManager_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_CustomEvent +func miqt_exec_callback_QNetworkAccessManager_CustomEvent(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkAccessManager_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkAccessManager_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_ConnectNotify +func miqt_exec_callback_QNetworkAccessManager_ConnectNotify(self *C.QNetworkAccessManager, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkAccessManager_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkAccessManager_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_DisconnectNotify +func miqt_exec_callback_QNetworkAccessManager_DisconnectNotify(self *C.QNetworkAccessManager, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QNetworkAccessManager) Delete() { - C.QNetworkAccessManager_Delete(this.h) + C.QNetworkAccessManager_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkaccessmanager.h b/qt/network/gen_qnetworkaccessmanager.h index 39e3e233..d7984a8d 100644 --- a/qt/network/gen_qnetworkaccessmanager.h +++ b/qt/network/gen_qnetworkaccessmanager.h @@ -18,9 +18,12 @@ extern "C" { class QAbstractNetworkCache; class QAuthenticator; class QByteArray; +class QChildEvent; +class QEvent; class QHstsPolicy; class QHttpMultiPart; class QIODevice; +class QMetaMethod; class QMetaObject; class QNetworkAccessManager; class QNetworkConfiguration; @@ -33,13 +36,17 @@ class QObject; class QSslConfiguration; class QSslError; class QSslPreSharedKeyAuthenticator; +class QTimerEvent; #else typedef struct QAbstractNetworkCache QAbstractNetworkCache; typedef struct QAuthenticator QAuthenticator; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QHstsPolicy QHstsPolicy; typedef struct QHttpMultiPart QHttpMultiPart; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkAccessManager QNetworkAccessManager; typedef struct QNetworkConfiguration QNetworkConfiguration; @@ -52,10 +59,11 @@ typedef struct QObject QObject; typedef struct QSslConfiguration QSslConfiguration; typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; +typedef struct QTimerEvent QTimerEvent; #endif -QNetworkAccessManager* QNetworkAccessManager_new(); -QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent); +void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); +void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self); void* QNetworkAccessManager_Metacast(QNetworkAccessManager* self, const char* param1); struct miqt_string QNetworkAccessManager_Tr(const char* s); @@ -119,6 +127,7 @@ void QNetworkAccessManager_NetworkSessionConnected(QNetworkAccessManager* self); void QNetworkAccessManager_connect_NetworkSessionConnected(QNetworkAccessManager* self, intptr_t slot); void QNetworkAccessManager_NetworkAccessibleChanged(QNetworkAccessManager* self, int accessible); void QNetworkAccessManager_connect_NetworkAccessibleChanged(QNetworkAccessManager* self, intptr_t slot); +QNetworkReply* QNetworkAccessManager_CreateRequest(QNetworkAccessManager* self, int op, QNetworkRequest* request, QIODevice* outgoingData); struct miqt_string QNetworkAccessManager_Tr2(const char* s, const char* c); struct miqt_string QNetworkAccessManager_Tr3(const char* s, const char* c, int n); struct miqt_string QNetworkAccessManager_TrUtf82(const char* s, const char* c); @@ -129,7 +138,23 @@ void QNetworkAccessManager_ConnectToHostEncrypted22(QNetworkAccessManager* self, void QNetworkAccessManager_ConnectToHostEncrypted3(QNetworkAccessManager* self, struct miqt_string hostName, uint16_t port, QSslConfiguration* sslConfiguration); void QNetworkAccessManager_ConnectToHost2(QNetworkAccessManager* self, struct miqt_string hostName, uint16_t port); void QNetworkAccessManager_SetTransferTimeout1(QNetworkAccessManager* self, int timeout); -void QNetworkAccessManager_Delete(QNetworkAccessManager* self); +void QNetworkAccessManager_override_virtual_CreateRequest(void* self, intptr_t slot); +QNetworkReply* QNetworkAccessManager_virtualbase_CreateRequest(void* self, int op, QNetworkRequest* request, QIODevice* outgoingData); +void QNetworkAccessManager_override_virtual_Event(void* self, intptr_t slot); +bool QNetworkAccessManager_virtualbase_Event(void* self, QEvent* event); +void QNetworkAccessManager_override_virtual_EventFilter(void* self, intptr_t slot); +bool QNetworkAccessManager_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QNetworkAccessManager_override_virtual_TimerEvent(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QNetworkAccessManager_override_virtual_ChildEvent(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QNetworkAccessManager_override_virtual_CustomEvent(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_CustomEvent(void* self, QEvent* event); +void QNetworkAccessManager_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QNetworkAccessManager_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QNetworkAccessManager_Delete(QNetworkAccessManager* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkconfigmanager.cpp b/qt/network/gen_qnetworkconfigmanager.cpp index ac9a4d3d..c4170ebb 100644 --- a/qt/network/gen_qnetworkconfigmanager.cpp +++ b/qt/network/gen_qnetworkconfigmanager.cpp @@ -1,4 +1,7 @@ +#include +#include #include +#include #include #include #include @@ -6,16 +9,202 @@ #include #include #include +#include #include #include "gen_qnetworkconfigmanager.h" #include "_cgo_export.h" -QNetworkConfigurationManager* QNetworkConfigurationManager_new() { - return new QNetworkConfigurationManager(); +class MiqtVirtualQNetworkConfigurationManager : public virtual QNetworkConfigurationManager { +public: + + MiqtVirtualQNetworkConfigurationManager(): QNetworkConfigurationManager() {}; + MiqtVirtualQNetworkConfigurationManager(QObject* parent): QNetworkConfigurationManager(parent) {}; + + virtual ~MiqtVirtualQNetworkConfigurationManager() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QNetworkConfigurationManager::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkConfigurationManager_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QNetworkConfigurationManager::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QNetworkConfigurationManager::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkConfigurationManager_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QNetworkConfigurationManager::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QNetworkConfigurationManager::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QNetworkConfigurationManager_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QNetworkConfigurationManager::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QNetworkConfigurationManager::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QNetworkConfigurationManager_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QNetworkConfigurationManager::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QNetworkConfigurationManager::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QNetworkConfigurationManager_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QNetworkConfigurationManager::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QNetworkConfigurationManager::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkConfigurationManager_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QNetworkConfigurationManager::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QNetworkConfigurationManager::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkConfigurationManager_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QNetworkConfigurationManager::disconnectNotify(*signal); + + } + +}; + +void QNetworkConfigurationManager_new(QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject) { + MiqtVirtualQNetworkConfigurationManager* ret = new MiqtVirtualQNetworkConfigurationManager(); + *outptr_QNetworkConfigurationManager = ret; + *outptr_QObject = static_cast(ret); } -QNetworkConfigurationManager* QNetworkConfigurationManager_new2(QObject* parent) { - return new QNetworkConfigurationManager(parent); +void QNetworkConfigurationManager_new2(QObject* parent, QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject) { + MiqtVirtualQNetworkConfigurationManager* ret = new MiqtVirtualQNetworkConfigurationManager(parent); + *outptr_QNetworkConfigurationManager = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkConfigurationManager_MetaObject(const QNetworkConfigurationManager* self) { @@ -88,7 +277,7 @@ void QNetworkConfigurationManager_ConfigurationAdded(QNetworkConfigurationManage } void QNetworkConfigurationManager_connect_ConfigurationAdded(QNetworkConfigurationManager* self, intptr_t slot) { - QNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::configurationAdded), self, [=](const QNetworkConfiguration& config) { + MiqtVirtualQNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::configurationAdded), self, [=](const QNetworkConfiguration& config) { const QNetworkConfiguration& config_ret = config; // Cast returned reference into pointer QNetworkConfiguration* sigval1 = const_cast(&config_ret); @@ -101,7 +290,7 @@ void QNetworkConfigurationManager_ConfigurationRemoved(QNetworkConfigurationMana } void QNetworkConfigurationManager_connect_ConfigurationRemoved(QNetworkConfigurationManager* self, intptr_t slot) { - QNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::configurationRemoved), self, [=](const QNetworkConfiguration& config) { + MiqtVirtualQNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::configurationRemoved), self, [=](const QNetworkConfiguration& config) { const QNetworkConfiguration& config_ret = config; // Cast returned reference into pointer QNetworkConfiguration* sigval1 = const_cast(&config_ret); @@ -114,7 +303,7 @@ void QNetworkConfigurationManager_ConfigurationChanged(QNetworkConfigurationMana } void QNetworkConfigurationManager_connect_ConfigurationChanged(QNetworkConfigurationManager* self, intptr_t slot) { - QNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::configurationChanged), self, [=](const QNetworkConfiguration& config) { + MiqtVirtualQNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::configurationChanged), self, [=](const QNetworkConfiguration& config) { const QNetworkConfiguration& config_ret = config; // Cast returned reference into pointer QNetworkConfiguration* sigval1 = const_cast(&config_ret); @@ -127,7 +316,7 @@ void QNetworkConfigurationManager_OnlineStateChanged(QNetworkConfigurationManage } void QNetworkConfigurationManager_connect_OnlineStateChanged(QNetworkConfigurationManager* self, intptr_t slot) { - QNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::onlineStateChanged), self, [=](bool isOnline) { + MiqtVirtualQNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::onlineStateChanged), self, [=](bool isOnline) { bool sigval1 = isOnline; miqt_exec_callback_QNetworkConfigurationManager_OnlineStateChanged(slot, sigval1); }); @@ -138,7 +327,7 @@ void QNetworkConfigurationManager_UpdateCompleted(QNetworkConfigurationManager* } void QNetworkConfigurationManager_connect_UpdateCompleted(QNetworkConfigurationManager* self, intptr_t slot) { - QNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::updateCompleted), self, [=]() { + MiqtVirtualQNetworkConfigurationManager::connect(self, static_cast(&QNetworkConfigurationManager::updateCompleted), self, [=]() { miqt_exec_callback_QNetworkConfigurationManager_UpdateCompleted(slot); }); } @@ -200,7 +389,67 @@ struct miqt_array /* of QNetworkConfiguration* */ QNetworkConfigurationManager_ return _out; } -void QNetworkConfigurationManager_Delete(QNetworkConfigurationManager* self) { - delete self; +void QNetworkConfigurationManager_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__Event = slot; +} + +bool QNetworkConfigurationManager_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_Event(event); +} + +void QNetworkConfigurationManager_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__EventFilter = slot; +} + +bool QNetworkConfigurationManager_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QNetworkConfigurationManager_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__TimerEvent = slot; +} + +void QNetworkConfigurationManager_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_TimerEvent(event); +} + +void QNetworkConfigurationManager_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__ChildEvent = slot; +} + +void QNetworkConfigurationManager_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_ChildEvent(event); +} + +void QNetworkConfigurationManager_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__CustomEvent = slot; +} + +void QNetworkConfigurationManager_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_CustomEvent(event); +} + +void QNetworkConfigurationManager_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__ConnectNotify = slot; +} + +void QNetworkConfigurationManager_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QNetworkConfigurationManager_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkConfigurationManager*)(self) )->handle__DisconnectNotify = slot; +} + +void QNetworkConfigurationManager_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkConfigurationManager*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QNetworkConfigurationManager_Delete(QNetworkConfigurationManager* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkconfigmanager.go b/qt/network/gen_qnetworkconfigmanager.go index 8b6b8977..88cbac54 100644 --- a/qt/network/gen_qnetworkconfigmanager.go +++ b/qt/network/gen_qnetworkconfigmanager.go @@ -28,7 +28,8 @@ const ( ) type QNetworkConfigurationManager struct { - h *C.QNetworkConfigurationManager + h *C.QNetworkConfigurationManager + isSubclass bool *qt.QObject } @@ -46,27 +47,45 @@ func (this *QNetworkConfigurationManager) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkConfigurationManager(h *C.QNetworkConfigurationManager) *QNetworkConfigurationManager { +// newQNetworkConfigurationManager constructs the type using only CGO pointers. +func newQNetworkConfigurationManager(h *C.QNetworkConfigurationManager, h_QObject *C.QObject) *QNetworkConfigurationManager { if h == nil { return nil } - return &QNetworkConfigurationManager{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkConfigurationManager{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkConfigurationManager(h unsafe.Pointer) *QNetworkConfigurationManager { - return newQNetworkConfigurationManager((*C.QNetworkConfigurationManager)(h)) +// UnsafeNewQNetworkConfigurationManager constructs the type using only unsafe pointers. +func UnsafeNewQNetworkConfigurationManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkConfigurationManager { + if h == nil { + return nil + } + + return &QNetworkConfigurationManager{h: (*C.QNetworkConfigurationManager)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQNetworkConfigurationManager constructs a new QNetworkConfigurationManager object. func NewQNetworkConfigurationManager() *QNetworkConfigurationManager { - ret := C.QNetworkConfigurationManager_new() - return newQNetworkConfigurationManager(ret) + var outptr_QNetworkConfigurationManager *C.QNetworkConfigurationManager = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkConfigurationManager_new(&outptr_QNetworkConfigurationManager, &outptr_QObject) + ret := newQNetworkConfigurationManager(outptr_QNetworkConfigurationManager, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkConfigurationManager2 constructs a new QNetworkConfigurationManager object. func NewQNetworkConfigurationManager2(parent *qt.QObject) *QNetworkConfigurationManager { - ret := C.QNetworkConfigurationManager_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkConfigurationManager(ret) + var outptr_QNetworkConfigurationManager *C.QNetworkConfigurationManager = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkConfigurationManager_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkConfigurationManager, &outptr_QObject) + ret := newQNetworkConfigurationManager(outptr_QNetworkConfigurationManager, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkConfigurationManager) MetaObject() *qt.QMetaObject { @@ -294,9 +313,175 @@ func (this *QNetworkConfigurationManager) AllConfigurations1(flags QNetworkConfi return _ret } +func (this *QNetworkConfigurationManager) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QNetworkConfigurationManager_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkConfigurationManager) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QNetworkConfigurationManager_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_Event +func miqt_exec_callback_QNetworkConfigurationManager_Event(self *C.QNetworkConfigurationManager, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkConfigurationManager) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QNetworkConfigurationManager_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkConfigurationManager) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QNetworkConfigurationManager_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_EventFilter +func miqt_exec_callback_QNetworkConfigurationManager_EventFilter(self *C.QNetworkConfigurationManager, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkConfigurationManager) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QNetworkConfigurationManager_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QNetworkConfigurationManager) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QNetworkConfigurationManager_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_TimerEvent +func miqt_exec_callback_QNetworkConfigurationManager_TimerEvent(self *C.QNetworkConfigurationManager, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QNetworkConfigurationManager) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QNetworkConfigurationManager_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QNetworkConfigurationManager) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QNetworkConfigurationManager_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_ChildEvent +func miqt_exec_callback_QNetworkConfigurationManager_ChildEvent(self *C.QNetworkConfigurationManager, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QNetworkConfigurationManager) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QNetworkConfigurationManager_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QNetworkConfigurationManager) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QNetworkConfigurationManager_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_CustomEvent +func miqt_exec_callback_QNetworkConfigurationManager_CustomEvent(self *C.QNetworkConfigurationManager, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QNetworkConfigurationManager) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkConfigurationManager_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkConfigurationManager) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkConfigurationManager_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_ConnectNotify +func miqt_exec_callback_QNetworkConfigurationManager_ConnectNotify(self *C.QNetworkConfigurationManager, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QNetworkConfigurationManager) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkConfigurationManager_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkConfigurationManager) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkConfigurationManager_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkConfigurationManager_DisconnectNotify +func miqt_exec_callback_QNetworkConfigurationManager_DisconnectNotify(self *C.QNetworkConfigurationManager, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QNetworkConfigurationManager) Delete() { - C.QNetworkConfigurationManager_Delete(this.h) + C.QNetworkConfigurationManager_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkconfigmanager.h b/qt/network/gen_qnetworkconfigmanager.h index 548f46f8..e0fcbceb 100644 --- a/qt/network/gen_qnetworkconfigmanager.h +++ b/qt/network/gen_qnetworkconfigmanager.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QNetworkConfiguration; class QNetworkConfigurationManager; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkConfiguration QNetworkConfiguration; typedef struct QNetworkConfigurationManager QNetworkConfigurationManager; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QNetworkConfigurationManager* QNetworkConfigurationManager_new(); -QNetworkConfigurationManager* QNetworkConfigurationManager_new2(QObject* parent); +void QNetworkConfigurationManager_new(QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject); +void QNetworkConfigurationManager_new2(QObject* parent, QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject); QMetaObject* QNetworkConfigurationManager_MetaObject(const QNetworkConfigurationManager* self); void* QNetworkConfigurationManager_Metacast(QNetworkConfigurationManager* self, const char* param1); struct miqt_string QNetworkConfigurationManager_Tr(const char* s); @@ -53,7 +61,21 @@ struct miqt_string QNetworkConfigurationManager_Tr3(const char* s, const char* c struct miqt_string QNetworkConfigurationManager_TrUtf82(const char* s, const char* c); struct miqt_string QNetworkConfigurationManager_TrUtf83(const char* s, const char* c, int n); struct miqt_array /* of QNetworkConfiguration* */ QNetworkConfigurationManager_AllConfigurations1(const QNetworkConfigurationManager* self, int flags); -void QNetworkConfigurationManager_Delete(QNetworkConfigurationManager* self); +void QNetworkConfigurationManager_override_virtual_Event(void* self, intptr_t slot); +bool QNetworkConfigurationManager_virtualbase_Event(void* self, QEvent* event); +void QNetworkConfigurationManager_override_virtual_EventFilter(void* self, intptr_t slot); +bool QNetworkConfigurationManager_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QNetworkConfigurationManager_override_virtual_TimerEvent(void* self, intptr_t slot); +void QNetworkConfigurationManager_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QNetworkConfigurationManager_override_virtual_ChildEvent(void* self, intptr_t slot); +void QNetworkConfigurationManager_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QNetworkConfigurationManager_override_virtual_CustomEvent(void* self, intptr_t slot); +void QNetworkConfigurationManager_virtualbase_CustomEvent(void* self, QEvent* event); +void QNetworkConfigurationManager_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QNetworkConfigurationManager_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QNetworkConfigurationManager_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QNetworkConfigurationManager_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QNetworkConfigurationManager_Delete(QNetworkConfigurationManager* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkconfiguration.cpp b/qt/network/gen_qnetworkconfiguration.cpp index 4e9360f0..42c28158 100644 --- a/qt/network/gen_qnetworkconfiguration.cpp +++ b/qt/network/gen_qnetworkconfiguration.cpp @@ -7,12 +7,14 @@ #include "gen_qnetworkconfiguration.h" #include "_cgo_export.h" -QNetworkConfiguration* QNetworkConfiguration_new() { - return new QNetworkConfiguration(); +void QNetworkConfiguration_new(QNetworkConfiguration** outptr_QNetworkConfiguration) { + QNetworkConfiguration* ret = new QNetworkConfiguration(); + *outptr_QNetworkConfiguration = ret; } -QNetworkConfiguration* QNetworkConfiguration_new2(QNetworkConfiguration* other) { - return new QNetworkConfiguration(*other); +void QNetworkConfiguration_new2(QNetworkConfiguration* other, QNetworkConfiguration** outptr_QNetworkConfiguration) { + QNetworkConfiguration* ret = new QNetworkConfiguration(*other); + *outptr_QNetworkConfiguration = ret; } void QNetworkConfiguration_OperatorAssign(QNetworkConfiguration* self, QNetworkConfiguration* other) { @@ -118,7 +120,11 @@ bool QNetworkConfiguration_SetConnectTimeout(QNetworkConfiguration* self, int ti return self->setConnectTimeout(static_cast(timeout)); } -void QNetworkConfiguration_Delete(QNetworkConfiguration* self) { - delete self; +void QNetworkConfiguration_Delete(QNetworkConfiguration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkconfiguration.go b/qt/network/gen_qnetworkconfiguration.go index faa70429..dcae2aae 100644 --- a/qt/network/gen_qnetworkconfiguration.go +++ b/qt/network/gen_qnetworkconfiguration.go @@ -59,7 +59,8 @@ const ( ) type QNetworkConfiguration struct { - h *C.QNetworkConfiguration + h *C.QNetworkConfiguration + isSubclass bool } func (this *QNetworkConfiguration) cPointer() *C.QNetworkConfiguration { @@ -76,6 +77,7 @@ func (this *QNetworkConfiguration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkConfiguration constructs the type using only CGO pointers. func newQNetworkConfiguration(h *C.QNetworkConfiguration) *QNetworkConfiguration { if h == nil { return nil @@ -83,20 +85,33 @@ func newQNetworkConfiguration(h *C.QNetworkConfiguration) *QNetworkConfiguration return &QNetworkConfiguration{h: h} } +// UnsafeNewQNetworkConfiguration constructs the type using only unsafe pointers. func UnsafeNewQNetworkConfiguration(h unsafe.Pointer) *QNetworkConfiguration { - return newQNetworkConfiguration((*C.QNetworkConfiguration)(h)) + if h == nil { + return nil + } + + return &QNetworkConfiguration{h: (*C.QNetworkConfiguration)(h)} } // NewQNetworkConfiguration constructs a new QNetworkConfiguration object. func NewQNetworkConfiguration() *QNetworkConfiguration { - ret := C.QNetworkConfiguration_new() - return newQNetworkConfiguration(ret) + var outptr_QNetworkConfiguration *C.QNetworkConfiguration = nil + + C.QNetworkConfiguration_new(&outptr_QNetworkConfiguration) + ret := newQNetworkConfiguration(outptr_QNetworkConfiguration) + ret.isSubclass = true + return ret } // NewQNetworkConfiguration2 constructs a new QNetworkConfiguration object. func NewQNetworkConfiguration2(other *QNetworkConfiguration) *QNetworkConfiguration { - ret := C.QNetworkConfiguration_new2(other.cPointer()) - return newQNetworkConfiguration(ret) + var outptr_QNetworkConfiguration *C.QNetworkConfiguration = nil + + C.QNetworkConfiguration_new2(other.cPointer(), &outptr_QNetworkConfiguration) + ret := newQNetworkConfiguration(outptr_QNetworkConfiguration) + ret.isSubclass = true + return ret } func (this *QNetworkConfiguration) OperatorAssign(other *QNetworkConfiguration) { @@ -187,7 +202,7 @@ func (this *QNetworkConfiguration) SetConnectTimeout(timeout int) bool { // Delete this object from C++ memory. func (this *QNetworkConfiguration) Delete() { - C.QNetworkConfiguration_Delete(this.h) + C.QNetworkConfiguration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkconfiguration.h b/qt/network/gen_qnetworkconfiguration.h index a54fbe1c..dcd4c8ea 100644 --- a/qt/network/gen_qnetworkconfiguration.h +++ b/qt/network/gen_qnetworkconfiguration.h @@ -20,8 +20,8 @@ class QNetworkConfiguration; typedef struct QNetworkConfiguration QNetworkConfiguration; #endif -QNetworkConfiguration* QNetworkConfiguration_new(); -QNetworkConfiguration* QNetworkConfiguration_new2(QNetworkConfiguration* other); +void QNetworkConfiguration_new(QNetworkConfiguration** outptr_QNetworkConfiguration); +void QNetworkConfiguration_new2(QNetworkConfiguration* other, QNetworkConfiguration** outptr_QNetworkConfiguration); void QNetworkConfiguration_OperatorAssign(QNetworkConfiguration* self, QNetworkConfiguration* other); void QNetworkConfiguration_Swap(QNetworkConfiguration* self, QNetworkConfiguration* other); bool QNetworkConfiguration_OperatorEqual(const QNetworkConfiguration* self, QNetworkConfiguration* other); @@ -39,7 +39,7 @@ struct miqt_string QNetworkConfiguration_Name(const QNetworkConfiguration* self) bool QNetworkConfiguration_IsValid(const QNetworkConfiguration* self); int QNetworkConfiguration_ConnectTimeout(const QNetworkConfiguration* self); bool QNetworkConfiguration_SetConnectTimeout(QNetworkConfiguration* self, int timeout); -void QNetworkConfiguration_Delete(QNetworkConfiguration* self); +void QNetworkConfiguration_Delete(QNetworkConfiguration* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkcookie.cpp b/qt/network/gen_qnetworkcookie.cpp index 715c4e0b..822a868c 100644 --- a/qt/network/gen_qnetworkcookie.cpp +++ b/qt/network/gen_qnetworkcookie.cpp @@ -10,23 +10,27 @@ #include "gen_qnetworkcookie.h" #include "_cgo_export.h" -QNetworkCookie* QNetworkCookie_new() { - return new QNetworkCookie(); +void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie) { + QNetworkCookie* ret = new QNetworkCookie(); + *outptr_QNetworkCookie = ret; } -QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other) { - return new QNetworkCookie(*other); +void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie) { + QNetworkCookie* ret = new QNetworkCookie(*other); + *outptr_QNetworkCookie = ret; } -QNetworkCookie* QNetworkCookie_new3(struct miqt_string name) { +void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie) { QByteArray name_QByteArray(name.data, name.len); - return new QNetworkCookie(name_QByteArray); + QNetworkCookie* ret = new QNetworkCookie(name_QByteArray); + *outptr_QNetworkCookie = ret; } -QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value) { +void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie) { QByteArray name_QByteArray(name.data, name.len); QByteArray value_QByteArray(value.data, value.len); - return new QNetworkCookie(name_QByteArray, value_QByteArray); + QNetworkCookie* ret = new QNetworkCookie(name_QByteArray, value_QByteArray); + *outptr_QNetworkCookie = ret; } void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other) { @@ -173,7 +177,11 @@ struct miqt_string QNetworkCookie_ToRawForm1(const QNetworkCookie* self, int for return _ms; } -void QNetworkCookie_Delete(QNetworkCookie* self) { - delete self; +void QNetworkCookie_Delete(QNetworkCookie* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkcookie.go b/qt/network/gen_qnetworkcookie.go index 228c9c14..70571168 100644 --- a/qt/network/gen_qnetworkcookie.go +++ b/qt/network/gen_qnetworkcookie.go @@ -22,7 +22,8 @@ const ( ) type QNetworkCookie struct { - h *C.QNetworkCookie + h *C.QNetworkCookie + isSubclass bool } func (this *QNetworkCookie) cPointer() *C.QNetworkCookie { @@ -39,6 +40,7 @@ func (this *QNetworkCookie) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkCookie constructs the type using only CGO pointers. func newQNetworkCookie(h *C.QNetworkCookie) *QNetworkCookie { if h == nil { return nil @@ -46,20 +48,33 @@ func newQNetworkCookie(h *C.QNetworkCookie) *QNetworkCookie { return &QNetworkCookie{h: h} } +// UnsafeNewQNetworkCookie constructs the type using only unsafe pointers. func UnsafeNewQNetworkCookie(h unsafe.Pointer) *QNetworkCookie { - return newQNetworkCookie((*C.QNetworkCookie)(h)) + if h == nil { + return nil + } + + return &QNetworkCookie{h: (*C.QNetworkCookie)(h)} } // NewQNetworkCookie constructs a new QNetworkCookie object. func NewQNetworkCookie() *QNetworkCookie { - ret := C.QNetworkCookie_new() - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new(&outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } // NewQNetworkCookie2 constructs a new QNetworkCookie object. func NewQNetworkCookie2(other *QNetworkCookie) *QNetworkCookie { - ret := C.QNetworkCookie_new2(other.cPointer()) - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new2(other.cPointer(), &outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } // NewQNetworkCookie3 constructs a new QNetworkCookie object. @@ -67,8 +82,12 @@ func NewQNetworkCookie3(name []byte) *QNetworkCookie { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - ret := C.QNetworkCookie_new3(name_alias) - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new3(name_alias, &outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } // NewQNetworkCookie4 constructs a new QNetworkCookie object. @@ -79,8 +98,12 @@ func NewQNetworkCookie4(name []byte, value []byte) *QNetworkCookie { value_alias := C.struct_miqt_string{} value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) value_alias.len = C.size_t(len(value)) - ret := C.QNetworkCookie_new4(name_alias, value_alias) - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new4(name_alias, value_alias, &outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } func (this *QNetworkCookie) OperatorAssign(other *QNetworkCookie) { @@ -228,7 +251,7 @@ func (this *QNetworkCookie) ToRawForm1(form QNetworkCookie__RawForm) []byte { // Delete this object from C++ memory. func (this *QNetworkCookie) Delete() { - C.QNetworkCookie_Delete(this.h) + C.QNetworkCookie_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkcookie.h b/qt/network/gen_qnetworkcookie.h index 21440468..a9b9260b 100644 --- a/qt/network/gen_qnetworkcookie.h +++ b/qt/network/gen_qnetworkcookie.h @@ -26,10 +26,10 @@ typedef struct QNetworkCookie QNetworkCookie; typedef struct QUrl QUrl; #endif -QNetworkCookie* QNetworkCookie_new(); -QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other); -QNetworkCookie* QNetworkCookie_new3(struct miqt_string name); -QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value); +void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie); +void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie); +void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie); +void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie); void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other); void QNetworkCookie_Swap(QNetworkCookie* self, QNetworkCookie* other); bool QNetworkCookie_OperatorEqual(const QNetworkCookie* self, QNetworkCookie* other); @@ -54,7 +54,7 @@ bool QNetworkCookie_HasSameIdentifier(const QNetworkCookie* self, QNetworkCookie void QNetworkCookie_Normalize(QNetworkCookie* self, QUrl* url); struct miqt_array /* of QNetworkCookie* */ QNetworkCookie_ParseCookies(struct miqt_string cookieString); struct miqt_string QNetworkCookie_ToRawForm1(const QNetworkCookie* self, int form); -void QNetworkCookie_Delete(QNetworkCookie* self); +void QNetworkCookie_Delete(QNetworkCookie* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkcookiejar.cpp b/qt/network/gen_qnetworkcookiejar.cpp index 0f684aab..8e621d9c 100644 --- a/qt/network/gen_qnetworkcookiejar.cpp +++ b/qt/network/gen_qnetworkcookiejar.cpp @@ -1,4 +1,7 @@ +#include +#include #include +#include #include #include #include @@ -6,17 +9,387 @@ #include #include #include +#include #include #include #include "gen_qnetworkcookiejar.h" #include "_cgo_export.h" -QNetworkCookieJar* QNetworkCookieJar_new() { - return new QNetworkCookieJar(); +class MiqtVirtualQNetworkCookieJar : public virtual QNetworkCookieJar { +public: + + MiqtVirtualQNetworkCookieJar(): QNetworkCookieJar() {}; + MiqtVirtualQNetworkCookieJar(QObject* parent): QNetworkCookieJar(parent) {}; + + virtual ~MiqtVirtualQNetworkCookieJar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CookiesForUrl = 0; + + // Subclass to allow providing a Go implementation + virtual QList cookiesForUrl(const QUrl& url) const override { + if (handle__CookiesForUrl == 0) { + return QNetworkCookieJar::cookiesForUrl(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + struct miqt_array /* of QNetworkCookie* */ callback_return_value = miqt_exec_callback_QNetworkCookieJar_CookiesForUrl(const_cast(this), handle__CookiesForUrl, sigval1); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QNetworkCookie** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QNetworkCookie* */ virtualbase_CookiesForUrl(QUrl* url) const { + + QList _ret = QNetworkCookieJar::cookiesForUrl(*url); + // Convert QList<> from C++ memory to manually-managed C memory + QNetworkCookie** _arr = static_cast(malloc(sizeof(QNetworkCookie*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QNetworkCookie(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCookiesFromUrl = 0; + + // Subclass to allow providing a Go implementation + virtual bool setCookiesFromUrl(const QList& cookieList, const QUrl& url) override { + if (handle__SetCookiesFromUrl == 0) { + return QNetworkCookieJar::setCookiesFromUrl(cookieList, url); + } + + const QList& cookieList_ret = cookieList; + // Convert QList<> from C++ memory to manually-managed C memory + QNetworkCookie** cookieList_arr = static_cast(malloc(sizeof(QNetworkCookie*) * cookieList_ret.length())); + for (size_t i = 0, e = cookieList_ret.length(); i < e; ++i) { + cookieList_arr[i] = new QNetworkCookie(cookieList_ret[i]); + } + struct miqt_array cookieList_out; + cookieList_out.len = cookieList_ret.length(); + cookieList_out.data = static_cast(cookieList_arr); + struct miqt_array /* of QNetworkCookie* */ sigval1 = cookieList_out; + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&url_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_SetCookiesFromUrl(this, handle__SetCookiesFromUrl, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetCookiesFromUrl(struct miqt_array /* of QNetworkCookie* */ cookieList, QUrl* url) { + QList cookieList_QList; + cookieList_QList.reserve(cookieList.len); + QNetworkCookie** cookieList_arr = static_cast(cookieList.data); + for(size_t i = 0; i < cookieList.len; ++i) { + cookieList_QList.push_back(*(cookieList_arr[i])); + } + + return QNetworkCookieJar::setCookiesFromUrl(cookieList_QList, *url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertCookie(const QNetworkCookie& cookie) override { + if (handle__InsertCookie == 0) { + return QNetworkCookieJar::insertCookie(cookie); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_InsertCookie(this, handle__InsertCookie, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertCookie(QNetworkCookie* cookie) { + + return QNetworkCookieJar::insertCookie(*cookie); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool updateCookie(const QNetworkCookie& cookie) override { + if (handle__UpdateCookie == 0) { + return QNetworkCookieJar::updateCookie(cookie); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_UpdateCookie(this, handle__UpdateCookie, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_UpdateCookie(QNetworkCookie* cookie) { + + return QNetworkCookieJar::updateCookie(*cookie); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DeleteCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool deleteCookie(const QNetworkCookie& cookie) override { + if (handle__DeleteCookie == 0) { + return QNetworkCookieJar::deleteCookie(cookie); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_DeleteCookie(this, handle__DeleteCookie, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DeleteCookie(QNetworkCookie* cookie) { + + return QNetworkCookieJar::deleteCookie(*cookie); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValidateCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool validateCookie(const QNetworkCookie& cookie, const QUrl& url) const override { + if (handle__ValidateCookie == 0) { + return QNetworkCookieJar::validateCookie(cookie, url); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&url_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_ValidateCookie(const_cast(this), handle__ValidateCookie, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ValidateCookie(QNetworkCookie* cookie, QUrl* url) const { + + return QNetworkCookieJar::validateCookie(*cookie, *url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QNetworkCookieJar::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QNetworkCookieJar::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QNetworkCookieJar::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QNetworkCookieJar::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QNetworkCookieJar::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QNetworkCookieJar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QNetworkCookieJar::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QNetworkCookieJar::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QNetworkCookieJar_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QNetworkCookieJar::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QNetworkCookieJar::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QNetworkCookieJar_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QNetworkCookieJar::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QNetworkCookieJar::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkCookieJar_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QNetworkCookieJar::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QNetworkCookieJar::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkCookieJar_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QNetworkCookieJar::disconnectNotify(*signal); + + } + +}; + +void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { + MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(); + *outptr_QNetworkCookieJar = ret; + *outptr_QObject = static_cast(ret); } -QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent) { - return new QNetworkCookieJar(parent); +void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { + MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(parent); + *outptr_QNetworkCookieJar = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self) { @@ -128,7 +501,115 @@ struct miqt_string QNetworkCookieJar_TrUtf83(const char* s, const char* c, int n return _ms; } -void QNetworkCookieJar_Delete(QNetworkCookieJar* self) { - delete self; +void QNetworkCookieJar_override_virtual_CookiesForUrl(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__CookiesForUrl = slot; +} + +struct miqt_array /* of QNetworkCookie* */ QNetworkCookieJar_virtualbase_CookiesForUrl(const void* self, QUrl* url) { + return ( (const MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_CookiesForUrl(url); +} + +void QNetworkCookieJar_override_virtual_SetCookiesFromUrl(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__SetCookiesFromUrl = slot; +} + +bool QNetworkCookieJar_virtualbase_SetCookiesFromUrl(void* self, struct miqt_array /* of QNetworkCookie* */ cookieList, QUrl* url) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_SetCookiesFromUrl(cookieList, url); +} + +void QNetworkCookieJar_override_virtual_InsertCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__InsertCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_InsertCookie(void* self, QNetworkCookie* cookie) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_InsertCookie(cookie); +} + +void QNetworkCookieJar_override_virtual_UpdateCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__UpdateCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_UpdateCookie(void* self, QNetworkCookie* cookie) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_UpdateCookie(cookie); +} + +void QNetworkCookieJar_override_virtual_DeleteCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__DeleteCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_DeleteCookie(void* self, QNetworkCookie* cookie) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_DeleteCookie(cookie); +} + +void QNetworkCookieJar_override_virtual_ValidateCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__ValidateCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_ValidateCookie(const void* self, QNetworkCookie* cookie, QUrl* url) { + return ( (const MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_ValidateCookie(cookie, url); +} + +void QNetworkCookieJar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__Event = slot; +} + +bool QNetworkCookieJar_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_Event(event); +} + +void QNetworkCookieJar_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__EventFilter = slot; +} + +bool QNetworkCookieJar_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QNetworkCookieJar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__TimerEvent = slot; +} + +void QNetworkCookieJar_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_TimerEvent(event); +} + +void QNetworkCookieJar_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__ChildEvent = slot; +} + +void QNetworkCookieJar_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_ChildEvent(event); +} + +void QNetworkCookieJar_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__CustomEvent = slot; +} + +void QNetworkCookieJar_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_CustomEvent(event); +} + +void QNetworkCookieJar_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__ConnectNotify = slot; +} + +void QNetworkCookieJar_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QNetworkCookieJar_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__DisconnectNotify = slot; +} + +void QNetworkCookieJar_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QNetworkCookieJar_Delete(QNetworkCookieJar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkcookiejar.go b/qt/network/gen_qnetworkcookiejar.go index 015e0145..6622f24b 100644 --- a/qt/network/gen_qnetworkcookiejar.go +++ b/qt/network/gen_qnetworkcookiejar.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QNetworkCookieJar struct { - h *C.QNetworkCookieJar + h *C.QNetworkCookieJar + isSubclass bool *qt.QObject } @@ -33,27 +35,45 @@ func (this *QNetworkCookieJar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkCookieJar(h *C.QNetworkCookieJar) *QNetworkCookieJar { +// newQNetworkCookieJar constructs the type using only CGO pointers. +func newQNetworkCookieJar(h *C.QNetworkCookieJar, h_QObject *C.QObject) *QNetworkCookieJar { if h == nil { return nil } - return &QNetworkCookieJar{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkCookieJar{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkCookieJar(h unsafe.Pointer) *QNetworkCookieJar { - return newQNetworkCookieJar((*C.QNetworkCookieJar)(h)) +// UnsafeNewQNetworkCookieJar constructs the type using only unsafe pointers. +func UnsafeNewQNetworkCookieJar(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkCookieJar { + if h == nil { + return nil + } + + return &QNetworkCookieJar{h: (*C.QNetworkCookieJar)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQNetworkCookieJar constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar() *QNetworkCookieJar { - ret := C.QNetworkCookieJar_new() - return newQNetworkCookieJar(ret) + var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkCookieJar_new(&outptr_QNetworkCookieJar, &outptr_QObject) + ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkCookieJar2 constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar2(parent *qt.QObject) *QNetworkCookieJar { - ret := C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkCookieJar(ret) + var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkCookieJar, &outptr_QObject) + ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkCookieJar) MetaObject() *qt.QMetaObject { @@ -163,9 +183,358 @@ func QNetworkCookieJar_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QNetworkCookieJar) callVirtualBase_CookiesForUrl(url *qt.QUrl) []QNetworkCookie { + + var _ma C.struct_miqt_array = C.QNetworkCookieJar_virtualbase_CookiesForUrl(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())) + _ret := make([]QNetworkCookie, int(_ma.len)) + _outCast := (*[0xffff]*C.QNetworkCookie)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQNetworkCookie(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QNetworkCookieJar) OnCookiesForUrl(slot func(super func(url *qt.QUrl) []QNetworkCookie, url *qt.QUrl) []QNetworkCookie) { + C.QNetworkCookieJar_override_virtual_CookiesForUrl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_CookiesForUrl +func miqt_exec_callback_QNetworkCookieJar_CookiesForUrl(self *C.QNetworkCookieJar, cb C.intptr_t, url *C.QUrl) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt.QUrl) []QNetworkCookie, url *qt.QUrl) []QNetworkCookie) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_CookiesForUrl, slotval1) + virtualReturn_CArray := (*[0xffff]*C.QNetworkCookie)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QNetworkCookieJar) callVirtualBase_SetCookiesFromUrl(cookieList []QNetworkCookie, url *qt.QUrl) bool { + cookieList_CArray := (*[0xffff]*C.QNetworkCookie)(C.malloc(C.size_t(8 * len(cookieList)))) + defer C.free(unsafe.Pointer(cookieList_CArray)) + for i := range cookieList { + cookieList_CArray[i] = cookieList[i].cPointer() + } + cookieList_ma := C.struct_miqt_array{len: C.size_t(len(cookieList)), data: unsafe.Pointer(cookieList_CArray)} + + return (bool)(C.QNetworkCookieJar_virtualbase_SetCookiesFromUrl(unsafe.Pointer(this.h), cookieList_ma, (*C.QUrl)(url.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnSetCookiesFromUrl(slot func(super func(cookieList []QNetworkCookie, url *qt.QUrl) bool, cookieList []QNetworkCookie, url *qt.QUrl) bool) { + C.QNetworkCookieJar_override_virtual_SetCookiesFromUrl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_SetCookiesFromUrl +func miqt_exec_callback_QNetworkCookieJar_SetCookiesFromUrl(self *C.QNetworkCookieJar, cb C.intptr_t, cookieList C.struct_miqt_array, url *C.QUrl) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookieList []QNetworkCookie, url *qt.QUrl) bool, cookieList []QNetworkCookie, url *qt.QUrl) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var cookieList_ma C.struct_miqt_array = cookieList + cookieList_ret := make([]QNetworkCookie, int(cookieList_ma.len)) + cookieList_outCast := (*[0xffff]*C.QNetworkCookie)(unsafe.Pointer(cookieList_ma.data)) // hey ya + for i := 0; i < int(cookieList_ma.len); i++ { + cookieList_lv_ret := cookieList_outCast[i] + cookieList_lv_goptr := newQNetworkCookie(cookieList_lv_ret) + cookieList_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + cookieList_ret[i] = *cookieList_lv_goptr + } + slotval1 := cookieList_ret + + slotval2 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_SetCookiesFromUrl, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_InsertCookie(cookie *QNetworkCookie) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_InsertCookie(unsafe.Pointer(this.h), cookie.cPointer())) + +} +func (this *QNetworkCookieJar) OnInsertCookie(slot func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) { + C.QNetworkCookieJar_override_virtual_InsertCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_InsertCookie +func miqt_exec_callback_QNetworkCookieJar_InsertCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_InsertCookie, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_UpdateCookie(cookie *QNetworkCookie) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_UpdateCookie(unsafe.Pointer(this.h), cookie.cPointer())) + +} +func (this *QNetworkCookieJar) OnUpdateCookie(slot func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) { + C.QNetworkCookieJar_override_virtual_UpdateCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_UpdateCookie +func miqt_exec_callback_QNetworkCookieJar_UpdateCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_UpdateCookie, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_DeleteCookie(cookie *QNetworkCookie) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_DeleteCookie(unsafe.Pointer(this.h), cookie.cPointer())) + +} +func (this *QNetworkCookieJar) OnDeleteCookie(slot func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) { + C.QNetworkCookieJar_override_virtual_DeleteCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_DeleteCookie +func miqt_exec_callback_QNetworkCookieJar_DeleteCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_DeleteCookie, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_ValidateCookie(cookie *QNetworkCookie, url *qt.QUrl) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_ValidateCookie(unsafe.Pointer(this.h), cookie.cPointer(), (*C.QUrl)(url.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnValidateCookie(slot func(super func(cookie *QNetworkCookie, url *qt.QUrl) bool, cookie *QNetworkCookie, url *qt.QUrl) bool) { + C.QNetworkCookieJar_override_virtual_ValidateCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_ValidateCookie +func miqt_exec_callback_QNetworkCookieJar_ValidateCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie, url *C.QUrl) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie, url *qt.QUrl) bool, cookie *QNetworkCookie, url *qt.QUrl) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + slotval2 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ValidateCookie, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QNetworkCookieJar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_Event +func miqt_exec_callback_QNetworkCookieJar_Event(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QNetworkCookieJar_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_EventFilter +func miqt_exec_callback_QNetworkCookieJar_EventFilter(self *C.QNetworkCookieJar, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QNetworkCookieJar_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QNetworkCookieJar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_TimerEvent +func miqt_exec_callback_QNetworkCookieJar_TimerEvent(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QNetworkCookieJar_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QNetworkCookieJar_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_ChildEvent +func miqt_exec_callback_QNetworkCookieJar_ChildEvent(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QNetworkCookieJar_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QNetworkCookieJar_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_CustomEvent +func miqt_exec_callback_QNetworkCookieJar_CustomEvent(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkCookieJar_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkCookieJar_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_ConnectNotify +func miqt_exec_callback_QNetworkCookieJar_ConnectNotify(self *C.QNetworkCookieJar, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkCookieJar_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkCookieJar_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_DisconnectNotify +func miqt_exec_callback_QNetworkCookieJar_DisconnectNotify(self *C.QNetworkCookieJar, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QNetworkCookieJar) Delete() { - C.QNetworkCookieJar_Delete(this.h) + C.QNetworkCookieJar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkcookiejar.h b/qt/network/gen_qnetworkcookiejar.h index 1f2b39d7..fa471b03 100644 --- a/qt/network/gen_qnetworkcookiejar.h +++ b/qt/network/gen_qnetworkcookiejar.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QNetworkCookie; class QNetworkCookieJar; class QObject; +class QTimerEvent; class QUrl; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkCookie QNetworkCookie; typedef struct QNetworkCookieJar QNetworkCookieJar; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QNetworkCookieJar* QNetworkCookieJar_new(); -QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent); +void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); +void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self); void* QNetworkCookieJar_Metacast(QNetworkCookieJar* self, const char* param1); struct miqt_string QNetworkCookieJar_Tr(const char* s); @@ -39,11 +47,38 @@ bool QNetworkCookieJar_SetCookiesFromUrl(QNetworkCookieJar* self, struct miqt_ar bool QNetworkCookieJar_InsertCookie(QNetworkCookieJar* self, QNetworkCookie* cookie); bool QNetworkCookieJar_UpdateCookie(QNetworkCookieJar* self, QNetworkCookie* cookie); bool QNetworkCookieJar_DeleteCookie(QNetworkCookieJar* self, QNetworkCookie* cookie); +bool QNetworkCookieJar_ValidateCookie(const QNetworkCookieJar* self, QNetworkCookie* cookie, QUrl* url); struct miqt_string QNetworkCookieJar_Tr2(const char* s, const char* c); struct miqt_string QNetworkCookieJar_Tr3(const char* s, const char* c, int n); struct miqt_string QNetworkCookieJar_TrUtf82(const char* s, const char* c); struct miqt_string QNetworkCookieJar_TrUtf83(const char* s, const char* c, int n); -void QNetworkCookieJar_Delete(QNetworkCookieJar* self); +void QNetworkCookieJar_override_virtual_CookiesForUrl(void* self, intptr_t slot); +struct miqt_array /* of QNetworkCookie* */ QNetworkCookieJar_virtualbase_CookiesForUrl(const void* self, QUrl* url); +void QNetworkCookieJar_override_virtual_SetCookiesFromUrl(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_SetCookiesFromUrl(void* self, struct miqt_array /* of QNetworkCookie* */ cookieList, QUrl* url); +void QNetworkCookieJar_override_virtual_InsertCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_InsertCookie(void* self, QNetworkCookie* cookie); +void QNetworkCookieJar_override_virtual_UpdateCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_UpdateCookie(void* self, QNetworkCookie* cookie); +void QNetworkCookieJar_override_virtual_DeleteCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_DeleteCookie(void* self, QNetworkCookie* cookie); +void QNetworkCookieJar_override_virtual_ValidateCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_ValidateCookie(const void* self, QNetworkCookie* cookie, QUrl* url); +void QNetworkCookieJar_override_virtual_Event(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_Event(void* self, QEvent* event); +void QNetworkCookieJar_override_virtual_EventFilter(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QNetworkCookieJar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QNetworkCookieJar_override_virtual_ChildEvent(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QNetworkCookieJar_override_virtual_CustomEvent(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_CustomEvent(void* self, QEvent* event); +void QNetworkCookieJar_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QNetworkCookieJar_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QNetworkCookieJar_Delete(QNetworkCookieJar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkdatagram.cpp b/qt/network/gen_qnetworkdatagram.cpp index 8c324f9a..76678bbc 100644 --- a/qt/network/gen_qnetworkdatagram.cpp +++ b/qt/network/gen_qnetworkdatagram.cpp @@ -5,27 +5,32 @@ #include "gen_qnetworkdatagram.h" #include "_cgo_export.h" -QNetworkDatagram* QNetworkDatagram_new() { - return new QNetworkDatagram(); +void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram) { + QNetworkDatagram* ret = new QNetworkDatagram(); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data) { +void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram) { QByteArray data_QByteArray(data.data, data.len); - return new QNetworkDatagram(data_QByteArray); + QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other) { - return new QNetworkDatagram(*other); +void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram) { + QNetworkDatagram* ret = new QNetworkDatagram(*other); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress) { +void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram) { QByteArray data_QByteArray(data.data, data.len); - return new QNetworkDatagram(data_QByteArray, *destinationAddress); + QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port) { +void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram) { QByteArray data_QByteArray(data.data, data.len); - return new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); + QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); + *outptr_QNetworkDatagram = ret; } void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other) { @@ -112,7 +117,11 @@ void QNetworkDatagram_SetSender2(QNetworkDatagram* self, QHostAddress* address, self->setSender(*address, static_cast(port)); } -void QNetworkDatagram_Delete(QNetworkDatagram* self) { - delete self; +void QNetworkDatagram_Delete(QNetworkDatagram* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkdatagram.go b/qt/network/gen_qnetworkdatagram.go index b6fd6bc8..e3be4d86 100644 --- a/qt/network/gen_qnetworkdatagram.go +++ b/qt/network/gen_qnetworkdatagram.go @@ -14,7 +14,8 @@ import ( ) type QNetworkDatagram struct { - h *C.QNetworkDatagram + h *C.QNetworkDatagram + isSubclass bool } func (this *QNetworkDatagram) cPointer() *C.QNetworkDatagram { @@ -31,6 +32,7 @@ func (this *QNetworkDatagram) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkDatagram constructs the type using only CGO pointers. func newQNetworkDatagram(h *C.QNetworkDatagram) *QNetworkDatagram { if h == nil { return nil @@ -38,14 +40,23 @@ func newQNetworkDatagram(h *C.QNetworkDatagram) *QNetworkDatagram { return &QNetworkDatagram{h: h} } +// UnsafeNewQNetworkDatagram constructs the type using only unsafe pointers. func UnsafeNewQNetworkDatagram(h unsafe.Pointer) *QNetworkDatagram { - return newQNetworkDatagram((*C.QNetworkDatagram)(h)) + if h == nil { + return nil + } + + return &QNetworkDatagram{h: (*C.QNetworkDatagram)(h)} } // NewQNetworkDatagram constructs a new QNetworkDatagram object. func NewQNetworkDatagram() *QNetworkDatagram { - ret := C.QNetworkDatagram_new() - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new(&outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram2 constructs a new QNetworkDatagram object. @@ -53,14 +64,22 @@ func NewQNetworkDatagram2(data []byte) *QNetworkDatagram { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QNetworkDatagram_new2(data_alias) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new2(data_alias, &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram3 constructs a new QNetworkDatagram object. func NewQNetworkDatagram3(other *QNetworkDatagram) *QNetworkDatagram { - ret := C.QNetworkDatagram_new3(other.cPointer()) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new3(other.cPointer(), &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram4 constructs a new QNetworkDatagram object. @@ -68,8 +87,12 @@ func NewQNetworkDatagram4(data []byte, destinationAddress *QHostAddress) *QNetwo data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer()) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer(), &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram5 constructs a new QNetworkDatagram object. @@ -77,8 +100,12 @@ func NewQNetworkDatagram5(data []byte, destinationAddress *QHostAddress, port ui data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port)) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port), &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } func (this *QNetworkDatagram) OperatorAssign(other *QNetworkDatagram) { @@ -177,7 +204,7 @@ func (this *QNetworkDatagram) SetSender2(address *QHostAddress, port uint16) { // Delete this object from C++ memory. func (this *QNetworkDatagram) Delete() { - C.QNetworkDatagram_Delete(this.h) + C.QNetworkDatagram_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkdatagram.h b/qt/network/gen_qnetworkdatagram.h index dd404fe8..9dfd7dcd 100644 --- a/qt/network/gen_qnetworkdatagram.h +++ b/qt/network/gen_qnetworkdatagram.h @@ -24,11 +24,11 @@ typedef struct QHostAddress QHostAddress; typedef struct QNetworkDatagram QNetworkDatagram; #endif -QNetworkDatagram* QNetworkDatagram_new(); -QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data); -QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other); -QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress); -QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port); +void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram); void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Swap(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Clear(QNetworkDatagram* self); @@ -48,7 +48,7 @@ struct miqt_string QNetworkDatagram_Data(const QNetworkDatagram* self); void QNetworkDatagram_SetData(QNetworkDatagram* self, struct miqt_string data); QNetworkDatagram* QNetworkDatagram_MakeReply(const QNetworkDatagram* self, struct miqt_string payload); void QNetworkDatagram_SetSender2(QNetworkDatagram* self, QHostAddress* address, uint16_t port); -void QNetworkDatagram_Delete(QNetworkDatagram* self); +void QNetworkDatagram_Delete(QNetworkDatagram* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkdiskcache.cpp b/qt/network/gen_qnetworkdiskcache.cpp index 7c717905..79e1f2f8 100644 --- a/qt/network/gen_qnetworkdiskcache.cpp +++ b/qt/network/gen_qnetworkdiskcache.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -11,12 +12,247 @@ #include "gen_qnetworkdiskcache.h" #include "_cgo_export.h" -QNetworkDiskCache* QNetworkDiskCache_new() { - return new QNetworkDiskCache(); +class MiqtVirtualQNetworkDiskCache : public virtual QNetworkDiskCache { +public: + + MiqtVirtualQNetworkDiskCache(): QNetworkDiskCache() {}; + MiqtVirtualQNetworkDiskCache(QObject* parent): QNetworkDiskCache(parent) {}; + + virtual ~MiqtVirtualQNetworkDiskCache() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CacheSize = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 cacheSize() const override { + if (handle__CacheSize == 0) { + return QNetworkDiskCache::cacheSize(); + } + + + long long callback_return_value = miqt_exec_callback_QNetworkDiskCache_CacheSize(const_cast(this), handle__CacheSize); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_CacheSize() const { + + qint64 _ret = QNetworkDiskCache::cacheSize(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MetaData = 0; + + // Subclass to allow providing a Go implementation + virtual QNetworkCacheMetaData metaData(const QUrl& url) override { + if (handle__MetaData == 0) { + return QNetworkDiskCache::metaData(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + QNetworkCacheMetaData* callback_return_value = miqt_exec_callback_QNetworkDiskCache_MetaData(this, handle__MetaData, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QNetworkCacheMetaData* virtualbase_MetaData(QUrl* url) { + + return new QNetworkCacheMetaData(QNetworkDiskCache::metaData(*url)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateMetaData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateMetaData(const QNetworkCacheMetaData& metaData) override { + if (handle__UpdateMetaData == 0) { + QNetworkDiskCache::updateMetaData(metaData); + return; + } + + const QNetworkCacheMetaData& metaData_ret = metaData; + // Cast returned reference into pointer + QNetworkCacheMetaData* sigval1 = const_cast(&metaData_ret); + + miqt_exec_callback_QNetworkDiskCache_UpdateMetaData(this, handle__UpdateMetaData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateMetaData(QNetworkCacheMetaData* metaData) { + + QNetworkDiskCache::updateMetaData(*metaData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QIODevice* data(const QUrl& url) override { + if (handle__Data == 0) { + return QNetworkDiskCache::data(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + QIODevice* callback_return_value = miqt_exec_callback_QNetworkDiskCache_Data(this, handle__Data, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QIODevice* virtualbase_Data(QUrl* url) { + + return QNetworkDiskCache::data(*url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Remove = 0; + + // Subclass to allow providing a Go implementation + virtual bool remove(const QUrl& url) override { + if (handle__Remove == 0) { + return QNetworkDiskCache::remove(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkDiskCache_Remove(this, handle__Remove, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Remove(QUrl* url) { + + return QNetworkDiskCache::remove(*url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Prepare = 0; + + // Subclass to allow providing a Go implementation + virtual QIODevice* prepare(const QNetworkCacheMetaData& metaData) override { + if (handle__Prepare == 0) { + return QNetworkDiskCache::prepare(metaData); + } + + const QNetworkCacheMetaData& metaData_ret = metaData; + // Cast returned reference into pointer + QNetworkCacheMetaData* sigval1 = const_cast(&metaData_ret); + + QIODevice* callback_return_value = miqt_exec_callback_QNetworkDiskCache_Prepare(this, handle__Prepare, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QIODevice* virtualbase_Prepare(QNetworkCacheMetaData* metaData) { + + return QNetworkDiskCache::prepare(*metaData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Insert = 0; + + // Subclass to allow providing a Go implementation + virtual void insert(QIODevice* device) override { + if (handle__Insert == 0) { + QNetworkDiskCache::insert(device); + return; + } + + QIODevice* sigval1 = device; + + miqt_exec_callback_QNetworkDiskCache_Insert(this, handle__Insert, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Insert(QIODevice* device) { + + QNetworkDiskCache::insert(device); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QNetworkDiskCache::clear(); + return; + } + + + miqt_exec_callback_QNetworkDiskCache_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QNetworkDiskCache::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Expire = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 expire() override { + if (handle__Expire == 0) { + return QNetworkDiskCache::expire(); + } + + + long long callback_return_value = miqt_exec_callback_QNetworkDiskCache_Expire(this, handle__Expire); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Expire() { + + qint64 _ret = QNetworkDiskCache::expire(); + return static_cast(_ret); + + } + +}; + +void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { + MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(); + *outptr_QNetworkDiskCache = ret; + *outptr_QAbstractNetworkCache = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent) { - return new QNetworkDiskCache(parent); +void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { + MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(parent); + *outptr_QNetworkDiskCache = ret; + *outptr_QAbstractNetworkCache = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self) { @@ -156,7 +392,83 @@ struct miqt_string QNetworkDiskCache_TrUtf83(const char* s, const char* c, int n return _ms; } -void QNetworkDiskCache_Delete(QNetworkDiskCache* self) { - delete self; +void QNetworkDiskCache_override_virtual_CacheSize(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__CacheSize = slot; +} + +long long QNetworkDiskCache_virtualbase_CacheSize(const void* self) { + return ( (const MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_CacheSize(); +} + +void QNetworkDiskCache_override_virtual_MetaData(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__MetaData = slot; +} + +QNetworkCacheMetaData* QNetworkDiskCache_virtualbase_MetaData(void* self, QUrl* url) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_MetaData(url); +} + +void QNetworkDiskCache_override_virtual_UpdateMetaData(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__UpdateMetaData = slot; +} + +void QNetworkDiskCache_virtualbase_UpdateMetaData(void* self, QNetworkCacheMetaData* metaData) { + ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_UpdateMetaData(metaData); +} + +void QNetworkDiskCache_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Data = slot; +} + +QIODevice* QNetworkDiskCache_virtualbase_Data(void* self, QUrl* url) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Data(url); +} + +void QNetworkDiskCache_override_virtual_Remove(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Remove = slot; +} + +bool QNetworkDiskCache_virtualbase_Remove(void* self, QUrl* url) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Remove(url); +} + +void QNetworkDiskCache_override_virtual_Prepare(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Prepare = slot; +} + +QIODevice* QNetworkDiskCache_virtualbase_Prepare(void* self, QNetworkCacheMetaData* metaData) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Prepare(metaData); +} + +void QNetworkDiskCache_override_virtual_Insert(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Insert = slot; +} + +void QNetworkDiskCache_virtualbase_Insert(void* self, QIODevice* device) { + ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Insert(device); +} + +void QNetworkDiskCache_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Clear = slot; +} + +void QNetworkDiskCache_virtualbase_Clear(void* self) { + ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Clear(); +} + +void QNetworkDiskCache_override_virtual_Expire(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Expire = slot; +} + +long long QNetworkDiskCache_virtualbase_Expire(void* self) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Expire(); +} + +void QNetworkDiskCache_Delete(QNetworkDiskCache* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkdiskcache.go b/qt/network/gen_qnetworkdiskcache.go index cca9ac66..17b87827 100644 --- a/qt/network/gen_qnetworkdiskcache.go +++ b/qt/network/gen_qnetworkdiskcache.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QNetworkDiskCache struct { - h *C.QNetworkDiskCache + h *C.QNetworkDiskCache + isSubclass bool *QAbstractNetworkCache } @@ -33,27 +35,47 @@ func (this *QNetworkDiskCache) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkDiskCache(h *C.QNetworkDiskCache) *QNetworkDiskCache { +// newQNetworkDiskCache constructs the type using only CGO pointers. +func newQNetworkDiskCache(h *C.QNetworkDiskCache, h_QAbstractNetworkCache *C.QAbstractNetworkCache, h_QObject *C.QObject) *QNetworkDiskCache { if h == nil { return nil } - return &QNetworkDiskCache{h: h, QAbstractNetworkCache: UnsafeNewQAbstractNetworkCache(unsafe.Pointer(h))} + return &QNetworkDiskCache{h: h, + QAbstractNetworkCache: newQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} } -func UnsafeNewQNetworkDiskCache(h unsafe.Pointer) *QNetworkDiskCache { - return newQNetworkDiskCache((*C.QNetworkDiskCache)(h)) +// UnsafeNewQNetworkDiskCache constructs the type using only unsafe pointers. +func UnsafeNewQNetworkDiskCache(h unsafe.Pointer, h_QAbstractNetworkCache unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkDiskCache { + if h == nil { + return nil + } + + return &QNetworkDiskCache{h: (*C.QNetworkDiskCache)(h), + QAbstractNetworkCache: UnsafeNewQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} } // NewQNetworkDiskCache constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache() *QNetworkDiskCache { - ret := C.QNetworkDiskCache_new() - return newQNetworkDiskCache(ret) + var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil + var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkDiskCache_new(&outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) + ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkDiskCache2 constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache2(parent *qt.QObject) *QNetworkDiskCache { - ret := C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkDiskCache(ret) + var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil + var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) + ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkDiskCache) MetaObject() *qt.QMetaObject { @@ -123,7 +145,7 @@ func (this *QNetworkDiskCache) UpdateMetaData(metaData *QNetworkCacheMetaData) { } func (this *QNetworkDiskCache) Data(url *qt.QUrl) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil) } func (this *QNetworkDiskCache) Remove(url *qt.QUrl) bool { @@ -131,7 +153,7 @@ func (this *QNetworkDiskCache) Remove(url *qt.QUrl) bool { } func (this *QNetworkDiskCache) Prepare(metaData *QNetworkCacheMetaData) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer()))) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer())), nil) } func (this *QNetworkDiskCache) Insert(device *qt.QIODevice) { @@ -197,9 +219,220 @@ func QNetworkDiskCache_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QNetworkDiskCache) callVirtualBase_CacheSize() int64 { + + return (int64)(C.QNetworkDiskCache_virtualbase_CacheSize(unsafe.Pointer(this.h))) + +} +func (this *QNetworkDiskCache) OnCacheSize(slot func(super func() int64) int64) { + C.QNetworkDiskCache_override_virtual_CacheSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_CacheSize +func miqt_exec_callback_QNetworkDiskCache_CacheSize(self *C.QNetworkDiskCache, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_CacheSize) + + return (C.longlong)(virtualReturn) + +} + +func (this *QNetworkDiskCache) callVirtualBase_MetaData(url *qt.QUrl) *QNetworkCacheMetaData { + + _ret := C.QNetworkDiskCache_virtualbase_MetaData(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())) + _goptr := newQNetworkCacheMetaData(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QNetworkDiskCache) OnMetaData(slot func(super func(url *qt.QUrl) *QNetworkCacheMetaData, url *qt.QUrl) *QNetworkCacheMetaData) { + C.QNetworkDiskCache_override_virtual_MetaData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_MetaData +func miqt_exec_callback_QNetworkDiskCache_MetaData(self *C.QNetworkDiskCache, cb C.intptr_t, url *C.QUrl) *C.QNetworkCacheMetaData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt.QUrl) *QNetworkCacheMetaData, url *qt.QUrl) *QNetworkCacheMetaData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_MetaData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QNetworkDiskCache) callVirtualBase_UpdateMetaData(metaData *QNetworkCacheMetaData) { + + C.QNetworkDiskCache_virtualbase_UpdateMetaData(unsafe.Pointer(this.h), metaData.cPointer()) + +} +func (this *QNetworkDiskCache) OnUpdateMetaData(slot func(super func(metaData *QNetworkCacheMetaData), metaData *QNetworkCacheMetaData)) { + C.QNetworkDiskCache_override_virtual_UpdateMetaData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_UpdateMetaData +func miqt_exec_callback_QNetworkDiskCache_UpdateMetaData(self *C.QNetworkDiskCache, cb C.intptr_t, metaData *C.QNetworkCacheMetaData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metaData *QNetworkCacheMetaData), metaData *QNetworkCacheMetaData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCacheMetaData(unsafe.Pointer(metaData)) + + gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_UpdateMetaData, slotval1) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Data(url *qt.QUrl) *qt.QIODevice { + + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Data(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()))), nil) +} +func (this *QNetworkDiskCache) OnData(slot func(super func(url *qt.QUrl) *qt.QIODevice, url *qt.QUrl) *qt.QIODevice) { + C.QNetworkDiskCache_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Data +func miqt_exec_callback_QNetworkDiskCache_Data(self *C.QNetworkDiskCache, cb C.intptr_t, url *C.QUrl) *C.QIODevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt.QUrl) *qt.QIODevice, url *qt.QUrl) *qt.QIODevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Data, slotval1) + + return (*C.QIODevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Remove(url *qt.QUrl) bool { + + return (bool)(C.QNetworkDiskCache_virtualbase_Remove(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()))) + +} +func (this *QNetworkDiskCache) OnRemove(slot func(super func(url *qt.QUrl) bool, url *qt.QUrl) bool) { + C.QNetworkDiskCache_override_virtual_Remove(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Remove +func miqt_exec_callback_QNetworkDiskCache_Remove(self *C.QNetworkDiskCache, cb C.intptr_t, url *C.QUrl) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt.QUrl) bool, url *qt.QUrl) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Remove, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Prepare(metaData *QNetworkCacheMetaData) *qt.QIODevice { + + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Prepare(unsafe.Pointer(this.h), metaData.cPointer())), nil) +} +func (this *QNetworkDiskCache) OnPrepare(slot func(super func(metaData *QNetworkCacheMetaData) *qt.QIODevice, metaData *QNetworkCacheMetaData) *qt.QIODevice) { + C.QNetworkDiskCache_override_virtual_Prepare(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Prepare +func miqt_exec_callback_QNetworkDiskCache_Prepare(self *C.QNetworkDiskCache, cb C.intptr_t, metaData *C.QNetworkCacheMetaData) *C.QIODevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metaData *QNetworkCacheMetaData) *qt.QIODevice, metaData *QNetworkCacheMetaData) *qt.QIODevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCacheMetaData(unsafe.Pointer(metaData)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Prepare, slotval1) + + return (*C.QIODevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Insert(device *qt.QIODevice) { + + C.QNetworkDiskCache_virtualbase_Insert(unsafe.Pointer(this.h), (*C.QIODevice)(device.UnsafePointer())) + +} +func (this *QNetworkDiskCache) OnInsert(slot func(super func(device *qt.QIODevice), device *qt.QIODevice)) { + C.QNetworkDiskCache_override_virtual_Insert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Insert +func miqt_exec_callback_QNetworkDiskCache_Insert(self *C.QNetworkDiskCache, cb C.intptr_t, device *C.QIODevice) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(device *qt.QIODevice), device *qt.QIODevice)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQIODevice(unsafe.Pointer(device), nil) + + gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Insert, slotval1) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Clear() { + + C.QNetworkDiskCache_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QNetworkDiskCache) OnClear(slot func(super func())) { + C.QNetworkDiskCache_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Clear +func miqt_exec_callback_QNetworkDiskCache_Clear(self *C.QNetworkDiskCache, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Clear) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Expire() int64 { + + return (int64)(C.QNetworkDiskCache_virtualbase_Expire(unsafe.Pointer(this.h))) + +} +func (this *QNetworkDiskCache) OnExpire(slot func(super func() int64) int64) { + C.QNetworkDiskCache_override_virtual_Expire(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Expire +func miqt_exec_callback_QNetworkDiskCache_Expire(self *C.QNetworkDiskCache, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Expire) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QNetworkDiskCache) Delete() { - C.QNetworkDiskCache_Delete(this.h) + C.QNetworkDiskCache_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkdiskcache.h b/qt/network/gen_qnetworkdiskcache.h index 2f17022c..52433976 100644 --- a/qt/network/gen_qnetworkdiskcache.h +++ b/qt/network/gen_qnetworkdiskcache.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractNetworkCache; class QIODevice; class QMetaObject; class QNetworkCacheMetaData; @@ -22,6 +23,7 @@ class QNetworkDiskCache; class QObject; class QUrl; #else +typedef struct QAbstractNetworkCache QAbstractNetworkCache; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkCacheMetaData QNetworkCacheMetaData; @@ -30,8 +32,8 @@ typedef struct QObject QObject; typedef struct QUrl QUrl; #endif -QNetworkDiskCache* QNetworkDiskCache_new(); -QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent); +void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); +void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self); void* QNetworkDiskCache_Metacast(QNetworkDiskCache* self, const char* param1); struct miqt_string QNetworkDiskCache_Tr(const char* s); @@ -49,11 +51,30 @@ QIODevice* QNetworkDiskCache_Prepare(QNetworkDiskCache* self, QNetworkCacheMetaD void QNetworkDiskCache_Insert(QNetworkDiskCache* self, QIODevice* device); QNetworkCacheMetaData* QNetworkDiskCache_FileMetaData(const QNetworkDiskCache* self, struct miqt_string fileName); void QNetworkDiskCache_Clear(QNetworkDiskCache* self); +long long QNetworkDiskCache_Expire(QNetworkDiskCache* self); struct miqt_string QNetworkDiskCache_Tr2(const char* s, const char* c); struct miqt_string QNetworkDiskCache_Tr3(const char* s, const char* c, int n); struct miqt_string QNetworkDiskCache_TrUtf82(const char* s, const char* c); struct miqt_string QNetworkDiskCache_TrUtf83(const char* s, const char* c, int n); -void QNetworkDiskCache_Delete(QNetworkDiskCache* self); +void QNetworkDiskCache_override_virtual_CacheSize(void* self, intptr_t slot); +long long QNetworkDiskCache_virtualbase_CacheSize(const void* self); +void QNetworkDiskCache_override_virtual_MetaData(void* self, intptr_t slot); +QNetworkCacheMetaData* QNetworkDiskCache_virtualbase_MetaData(void* self, QUrl* url); +void QNetworkDiskCache_override_virtual_UpdateMetaData(void* self, intptr_t slot); +void QNetworkDiskCache_virtualbase_UpdateMetaData(void* self, QNetworkCacheMetaData* metaData); +void QNetworkDiskCache_override_virtual_Data(void* self, intptr_t slot); +QIODevice* QNetworkDiskCache_virtualbase_Data(void* self, QUrl* url); +void QNetworkDiskCache_override_virtual_Remove(void* self, intptr_t slot); +bool QNetworkDiskCache_virtualbase_Remove(void* self, QUrl* url); +void QNetworkDiskCache_override_virtual_Prepare(void* self, intptr_t slot); +QIODevice* QNetworkDiskCache_virtualbase_Prepare(void* self, QNetworkCacheMetaData* metaData); +void QNetworkDiskCache_override_virtual_Insert(void* self, intptr_t slot); +void QNetworkDiskCache_virtualbase_Insert(void* self, QIODevice* device); +void QNetworkDiskCache_override_virtual_Clear(void* self, intptr_t slot); +void QNetworkDiskCache_virtualbase_Clear(void* self); +void QNetworkDiskCache_override_virtual_Expire(void* self, intptr_t slot); +long long QNetworkDiskCache_virtualbase_Expire(void* self); +void QNetworkDiskCache_Delete(QNetworkDiskCache* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkinterface.cpp b/qt/network/gen_qnetworkinterface.cpp index 66734515..d1607c3d 100644 --- a/qt/network/gen_qnetworkinterface.cpp +++ b/qt/network/gen_qnetworkinterface.cpp @@ -10,12 +10,14 @@ #include "gen_qnetworkinterface.h" #include "_cgo_export.h" -QNetworkAddressEntry* QNetworkAddressEntry_new() { - return new QNetworkAddressEntry(); +void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry) { + QNetworkAddressEntry* ret = new QNetworkAddressEntry(); + *outptr_QNetworkAddressEntry = ret; } -QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other) { - return new QNetworkAddressEntry(*other); +void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry) { + QNetworkAddressEntry* ret = new QNetworkAddressEntry(*other); + *outptr_QNetworkAddressEntry = ret; } void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other) { @@ -103,16 +105,22 @@ bool QNetworkAddressEntry_IsTemporary(const QNetworkAddressEntry* self) { return self->isTemporary(); } -void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self) { - delete self; +void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QNetworkInterface* QNetworkInterface_new() { - return new QNetworkInterface(); +void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface) { + QNetworkInterface* ret = new QNetworkInterface(); + *outptr_QNetworkInterface = ret; } -QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other) { - return new QNetworkInterface(*other); +void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface) { + QNetworkInterface* ret = new QNetworkInterface(*other); + *outptr_QNetworkInterface = ret; } void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other) { @@ -242,7 +250,11 @@ struct miqt_array /* of QHostAddress* */ QNetworkInterface_AllAddresses() { return _out; } -void QNetworkInterface_Delete(QNetworkInterface* self) { - delete self; +void QNetworkInterface_Delete(QNetworkInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkinterface.go b/qt/network/gen_qnetworkinterface.go index 504c55bb..5865d896 100644 --- a/qt/network/gen_qnetworkinterface.go +++ b/qt/network/gen_qnetworkinterface.go @@ -54,7 +54,8 @@ const ( ) type QNetworkAddressEntry struct { - h *C.QNetworkAddressEntry + h *C.QNetworkAddressEntry + isSubclass bool } func (this *QNetworkAddressEntry) cPointer() *C.QNetworkAddressEntry { @@ -71,6 +72,7 @@ func (this *QNetworkAddressEntry) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkAddressEntry constructs the type using only CGO pointers. func newQNetworkAddressEntry(h *C.QNetworkAddressEntry) *QNetworkAddressEntry { if h == nil { return nil @@ -78,20 +80,33 @@ func newQNetworkAddressEntry(h *C.QNetworkAddressEntry) *QNetworkAddressEntry { return &QNetworkAddressEntry{h: h} } +// UnsafeNewQNetworkAddressEntry constructs the type using only unsafe pointers. func UnsafeNewQNetworkAddressEntry(h unsafe.Pointer) *QNetworkAddressEntry { - return newQNetworkAddressEntry((*C.QNetworkAddressEntry)(h)) + if h == nil { + return nil + } + + return &QNetworkAddressEntry{h: (*C.QNetworkAddressEntry)(h)} } // NewQNetworkAddressEntry constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry() *QNetworkAddressEntry { - ret := C.QNetworkAddressEntry_new() - return newQNetworkAddressEntry(ret) + var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil + + C.QNetworkAddressEntry_new(&outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret.isSubclass = true + return ret } // NewQNetworkAddressEntry2 constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry2(other *QNetworkAddressEntry) *QNetworkAddressEntry { - ret := C.QNetworkAddressEntry_new2(other.cPointer()) - return newQNetworkAddressEntry(ret) + var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil + + C.QNetworkAddressEntry_new2(other.cPointer(), &outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret.isSubclass = true + return ret } func (this *QNetworkAddressEntry) OperatorAssign(other *QNetworkAddressEntry) { @@ -195,7 +210,7 @@ func (this *QNetworkAddressEntry) IsTemporary() bool { // Delete this object from C++ memory. func (this *QNetworkAddressEntry) Delete() { - C.QNetworkAddressEntry_Delete(this.h) + C.QNetworkAddressEntry_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -208,7 +223,8 @@ func (this *QNetworkAddressEntry) GoGC() { } type QNetworkInterface struct { - h *C.QNetworkInterface + h *C.QNetworkInterface + isSubclass bool } func (this *QNetworkInterface) cPointer() *C.QNetworkInterface { @@ -225,6 +241,7 @@ func (this *QNetworkInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkInterface constructs the type using only CGO pointers. func newQNetworkInterface(h *C.QNetworkInterface) *QNetworkInterface { if h == nil { return nil @@ -232,20 +249,33 @@ func newQNetworkInterface(h *C.QNetworkInterface) *QNetworkInterface { return &QNetworkInterface{h: h} } +// UnsafeNewQNetworkInterface constructs the type using only unsafe pointers. func UnsafeNewQNetworkInterface(h unsafe.Pointer) *QNetworkInterface { - return newQNetworkInterface((*C.QNetworkInterface)(h)) + if h == nil { + return nil + } + + return &QNetworkInterface{h: (*C.QNetworkInterface)(h)} } // NewQNetworkInterface constructs a new QNetworkInterface object. func NewQNetworkInterface() *QNetworkInterface { - ret := C.QNetworkInterface_new() - return newQNetworkInterface(ret) + var outptr_QNetworkInterface *C.QNetworkInterface = nil + + C.QNetworkInterface_new(&outptr_QNetworkInterface) + ret := newQNetworkInterface(outptr_QNetworkInterface) + ret.isSubclass = true + return ret } // NewQNetworkInterface2 constructs a new QNetworkInterface object. func NewQNetworkInterface2(other *QNetworkInterface) *QNetworkInterface { - ret := C.QNetworkInterface_new2(other.cPointer()) - return newQNetworkInterface(ret) + var outptr_QNetworkInterface *C.QNetworkInterface = nil + + C.QNetworkInterface_new2(other.cPointer(), &outptr_QNetworkInterface) + ret := newQNetworkInterface(outptr_QNetworkInterface) + ret.isSubclass = true + return ret } func (this *QNetworkInterface) OperatorAssign(other *QNetworkInterface) { @@ -371,7 +401,7 @@ func QNetworkInterface_AllAddresses() []QHostAddress { // Delete this object from C++ memory. func (this *QNetworkInterface) Delete() { - C.QNetworkInterface_Delete(this.h) + C.QNetworkInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkinterface.h b/qt/network/gen_qnetworkinterface.h index 825ac90e..63d2c311 100644 --- a/qt/network/gen_qnetworkinterface.h +++ b/qt/network/gen_qnetworkinterface.h @@ -26,8 +26,8 @@ typedef struct QNetworkAddressEntry QNetworkAddressEntry; typedef struct QNetworkInterface QNetworkInterface; #endif -QNetworkAddressEntry* QNetworkAddressEntry_new(); -QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other); +void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry); +void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry); void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other); void QNetworkAddressEntry_Swap(QNetworkAddressEntry* self, QNetworkAddressEntry* other); bool QNetworkAddressEntry_OperatorEqual(const QNetworkAddressEntry* self, QNetworkAddressEntry* other); @@ -49,10 +49,10 @@ void QNetworkAddressEntry_SetAddressLifetime(QNetworkAddressEntry* self, QDeadli void QNetworkAddressEntry_ClearAddressLifetime(QNetworkAddressEntry* self); bool QNetworkAddressEntry_IsPermanent(const QNetworkAddressEntry* self); bool QNetworkAddressEntry_IsTemporary(const QNetworkAddressEntry* self); -void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self); +void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass); -QNetworkInterface* QNetworkInterface_new(); -QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other); +void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface); +void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface); void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other); void QNetworkInterface_Swap(QNetworkInterface* self, QNetworkInterface* other); bool QNetworkInterface_IsValid(const QNetworkInterface* self); @@ -70,7 +70,7 @@ QNetworkInterface* QNetworkInterface_InterfaceFromIndex(int index); struct miqt_string QNetworkInterface_InterfaceNameFromIndex(int index); struct miqt_array /* of QNetworkInterface* */ QNetworkInterface_AllInterfaces(); struct miqt_array /* of QHostAddress* */ QNetworkInterface_AllAddresses(); -void QNetworkInterface_Delete(QNetworkInterface* self); +void QNetworkInterface_Delete(QNetworkInterface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkproxy.cpp b/qt/network/gen_qnetworkproxy.cpp index 50c20552..b2df650a 100644 --- a/qt/network/gen_qnetworkproxy.cpp +++ b/qt/network/gen_qnetworkproxy.cpp @@ -13,90 +13,108 @@ #include "gen_qnetworkproxy.h" #include "_cgo_export.h" -QNetworkProxyQuery* QNetworkProxyQuery_new() { - return new QNetworkProxyQuery(); +void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl) { - return new QNetworkProxyQuery(*requestUrl); +void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port) { +void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); - return new QNetworkProxyQuery(hostname_QString, static_cast(port)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort) { - return new QNetworkProxyQuery(static_cast(bindPort)); +void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl) { - return new QNetworkProxyQuery(*networkConfiguration, *requestUrl); +void QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, *requestUrl); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port) { +void QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); - return new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort) { - return new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort)); +void QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new8(QNetworkProxyQuery* other) { - return new QNetworkProxyQuery(*other); +void QNetworkProxyQuery_new8(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*other); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType) { - return new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); +void QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag) { +void QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType) { +void QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag) { +void QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType) { +void QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType) { - return new QNetworkProxyQuery(*networkConfiguration, *requestUrl, static_cast(queryType)); +void QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, *requestUrl, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag) { +void QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType) { +void QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag) { +void QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType) { +void QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString, static_cast(queryType)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other) { @@ -188,43 +206,54 @@ void QNetworkProxyQuery_SetNetworkConfiguration(QNetworkProxyQuery* self, QNetwo self->setNetworkConfiguration(*networkConfiguration); } -void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self) { - delete self; +void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QNetworkProxy* QNetworkProxy_new() { - return new QNetworkProxy(); +void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy) { + QNetworkProxy* ret = new QNetworkProxy(); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new2(int typeVal) { - return new QNetworkProxy(static_cast(typeVal)); +void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy) { + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal)); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other) { - return new QNetworkProxy(*other); +void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy) { + QNetworkProxy* ret = new QNetworkProxy(*other); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName) { +void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port) { +void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user) { +void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password) { +void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); QString password_QString = QString::fromUtf8(password.data, password.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); + *outptr_QNetworkProxy = ret; } void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other) { @@ -381,12 +410,16 @@ void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerNa self->setRawHeader(headerName_QByteArray, value_QByteArray); } -void QNetworkProxy_Delete(QNetworkProxy* self) { - delete self; +void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self) { - QList _ret = self->queryProxy(); +struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query) { + QList _ret = self->queryProxy(*query); // Convert QList<> from C++ memory to manually-managed C memory QNetworkProxy** _arr = static_cast(malloc(sizeof(QNetworkProxy*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -440,19 +473,6 @@ void QNetworkProxyFactory_OperatorAssign(QNetworkProxyFactory* self, QNetworkPro self->operator=(*param1); } -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy1(QNetworkProxyFactory* self, QNetworkProxyQuery* query) { - QList _ret = self->queryProxy(*query); - // Convert QList<> from C++ memory to manually-managed C memory - QNetworkProxy** _arr = static_cast(malloc(sizeof(QNetworkProxy*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QNetworkProxy(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery1(QNetworkProxyQuery* query) { QList _ret = QNetworkProxyFactory::systemProxyForQuery(*query); // Convert QList<> from C++ memory to manually-managed C memory @@ -466,7 +486,11 @@ struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQu return _out; } -void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self) { - delete self; +void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkproxy.go b/qt/network/gen_qnetworkproxy.go index f8bb8f87..ed728b2f 100644 --- a/qt/network/gen_qnetworkproxy.go +++ b/qt/network/gen_qnetworkproxy.go @@ -49,7 +49,8 @@ const ( ) type QNetworkProxyQuery struct { - h *C.QNetworkProxyQuery + h *C.QNetworkProxyQuery + isSubclass bool } func (this *QNetworkProxyQuery) cPointer() *C.QNetworkProxyQuery { @@ -66,6 +67,7 @@ func (this *QNetworkProxyQuery) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkProxyQuery constructs the type using only CGO pointers. func newQNetworkProxyQuery(h *C.QNetworkProxyQuery) *QNetworkProxyQuery { if h == nil { return nil @@ -73,20 +75,33 @@ func newQNetworkProxyQuery(h *C.QNetworkProxyQuery) *QNetworkProxyQuery { return &QNetworkProxyQuery{h: h} } +// UnsafeNewQNetworkProxyQuery constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyQuery(h unsafe.Pointer) *QNetworkProxyQuery { - return newQNetworkProxyQuery((*C.QNetworkProxyQuery)(h)) + if h == nil { + return nil + } + + return &QNetworkProxyQuery{h: (*C.QNetworkProxyQuery)(h)} } // NewQNetworkProxyQuery constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery() *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new() - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new(&outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery2 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery2(requestUrl *qt.QUrl) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer())) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer()), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery3 constructs a new QNetworkProxyQuery object. @@ -95,20 +110,32 @@ func NewQNetworkProxyQuery3(hostname string, port int) *QNetworkProxyQuery { hostname_ms.data = C.CString(hostname) hostname_ms.len = C.size_t(len(hostname)) defer C.free(unsafe.Pointer(hostname_ms.data)) - ret := C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery4 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery4(bindPort uint16) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery5 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery5(networkConfiguration *QNetworkConfiguration, requestUrl *qt.QUrl) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new5(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer())) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new5(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery6 constructs a new QNetworkProxyQuery object. @@ -117,26 +144,42 @@ func NewQNetworkProxyQuery6(networkConfiguration *QNetworkConfiguration, hostnam hostname_ms.data = C.CString(hostname) hostname_ms.len = C.size_t(len(hostname)) defer C.free(unsafe.Pointer(hostname_ms.data)) - ret := C.QNetworkProxyQuery_new6(networkConfiguration.cPointer(), hostname_ms, (C.int)(port)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new6(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery7 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery7(networkConfiguration *QNetworkConfiguration, bindPort uint16) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new7(networkConfiguration.cPointer(), (C.uint16_t)(bindPort)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new7(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery8 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery8(other *QNetworkProxyQuery) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new8(other.cPointer()) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new8(other.cPointer(), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery9 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery9(requestUrl *qt.QUrl, queryType QNetworkProxyQuery__QueryType) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new9((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new9((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery10 constructs a new QNetworkProxyQuery object. @@ -149,8 +192,12 @@ func NewQNetworkProxyQuery10(hostname string, port int, protocolTag string) *QNe protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new10(hostname_ms, (C.int)(port), protocolTag_ms) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new10(hostname_ms, (C.int)(port), protocolTag_ms, &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery11 constructs a new QNetworkProxyQuery object. @@ -163,8 +210,12 @@ func NewQNetworkProxyQuery11(hostname string, port int, protocolTag string, quer protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new11(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new11(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery12 constructs a new QNetworkProxyQuery object. @@ -173,8 +224,12 @@ func NewQNetworkProxyQuery12(bindPort uint16, protocolTag string) *QNetworkProxy protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new12((C.uint16_t)(bindPort), protocolTag_ms) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new12((C.uint16_t)(bindPort), protocolTag_ms, &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery13 constructs a new QNetworkProxyQuery object. @@ -183,14 +238,22 @@ func NewQNetworkProxyQuery13(bindPort uint16, protocolTag string, queryType QNet protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new13((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new13((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery14 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery14(networkConfiguration *QNetworkConfiguration, requestUrl *qt.QUrl, queryType QNetworkProxyQuery__QueryType) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new14(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new14(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery15 constructs a new QNetworkProxyQuery object. @@ -203,8 +266,12 @@ func NewQNetworkProxyQuery15(networkConfiguration *QNetworkConfiguration, hostna protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new15(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new15(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms, &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery16 constructs a new QNetworkProxyQuery object. @@ -217,8 +284,12 @@ func NewQNetworkProxyQuery16(networkConfiguration *QNetworkConfiguration, hostna protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new16(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new16(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery17 constructs a new QNetworkProxyQuery object. @@ -227,8 +298,12 @@ func NewQNetworkProxyQuery17(networkConfiguration *QNetworkConfiguration, bindPo protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new17(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new17(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms, &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery18 constructs a new QNetworkProxyQuery object. @@ -237,8 +312,12 @@ func NewQNetworkProxyQuery18(networkConfiguration *QNetworkConfiguration, bindPo protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new18(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new18(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } func (this *QNetworkProxyQuery) OperatorAssign(other *QNetworkProxyQuery) { @@ -335,7 +414,7 @@ func (this *QNetworkProxyQuery) SetNetworkConfiguration(networkConfiguration *QN // Delete this object from C++ memory. func (this *QNetworkProxyQuery) Delete() { - C.QNetworkProxyQuery_Delete(this.h) + C.QNetworkProxyQuery_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -348,7 +427,8 @@ func (this *QNetworkProxyQuery) GoGC() { } type QNetworkProxy struct { - h *C.QNetworkProxy + h *C.QNetworkProxy + isSubclass bool } func (this *QNetworkProxy) cPointer() *C.QNetworkProxy { @@ -365,6 +445,7 @@ func (this *QNetworkProxy) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkProxy constructs the type using only CGO pointers. func newQNetworkProxy(h *C.QNetworkProxy) *QNetworkProxy { if h == nil { return nil @@ -372,26 +453,43 @@ func newQNetworkProxy(h *C.QNetworkProxy) *QNetworkProxy { return &QNetworkProxy{h: h} } +// UnsafeNewQNetworkProxy constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxy(h unsafe.Pointer) *QNetworkProxy { - return newQNetworkProxy((*C.QNetworkProxy)(h)) + if h == nil { + return nil + } + + return &QNetworkProxy{h: (*C.QNetworkProxy)(h)} } // NewQNetworkProxy constructs a new QNetworkProxy object. func NewQNetworkProxy() *QNetworkProxy { - ret := C.QNetworkProxy_new() - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new(&outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy2 constructs a new QNetworkProxy object. func NewQNetworkProxy2(typeVal QNetworkProxy__ProxyType) *QNetworkProxy { - ret := C.QNetworkProxy_new2((C.int)(typeVal)) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new2((C.int)(typeVal), &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy3 constructs a new QNetworkProxy object. func NewQNetworkProxy3(other *QNetworkProxy) *QNetworkProxy { - ret := C.QNetworkProxy_new3(other.cPointer()) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new3(other.cPointer(), &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy4 constructs a new QNetworkProxy object. @@ -400,8 +498,12 @@ func NewQNetworkProxy4(typeVal QNetworkProxy__ProxyType, hostName string) *QNetw hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - ret := C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms, &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy5 constructs a new QNetworkProxy object. @@ -410,8 +512,12 @@ func NewQNetworkProxy5(typeVal QNetworkProxy__ProxyType, hostName string, port u hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - ret := C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port)) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy6 constructs a new QNetworkProxy object. @@ -424,8 +530,12 @@ func NewQNetworkProxy6(typeVal QNetworkProxy__ProxyType, hostName string, port u user_ms.data = C.CString(user) user_ms.len = C.size_t(len(user)) defer C.free(unsafe.Pointer(user_ms.data)) - ret := C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy7 constructs a new QNetworkProxy object. @@ -442,8 +552,12 @@ func NewQNetworkProxy7(typeVal QNetworkProxy__ProxyType, hostName string, port u password_ms.data = C.CString(password) password_ms.len = C.size_t(len(password)) defer C.free(unsafe.Pointer(password_ms.data)) - ret := C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms, &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } func (this *QNetworkProxy) OperatorAssign(other *QNetworkProxy) { @@ -603,7 +717,7 @@ func (this *QNetworkProxy) SetRawHeader(headerName []byte, value []byte) { // Delete this object from C++ memory. func (this *QNetworkProxy) Delete() { - C.QNetworkProxy_Delete(this.h) + C.QNetworkProxy_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -616,7 +730,8 @@ func (this *QNetworkProxy) GoGC() { } type QNetworkProxyFactory struct { - h *C.QNetworkProxyFactory + h *C.QNetworkProxyFactory + isSubclass bool } func (this *QNetworkProxyFactory) cPointer() *C.QNetworkProxyFactory { @@ -633,6 +748,7 @@ func (this *QNetworkProxyFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkProxyFactory constructs the type using only CGO pointers. func newQNetworkProxyFactory(h *C.QNetworkProxyFactory) *QNetworkProxyFactory { if h == nil { return nil @@ -640,12 +756,17 @@ func newQNetworkProxyFactory(h *C.QNetworkProxyFactory) *QNetworkProxyFactory { return &QNetworkProxyFactory{h: h} } +// UnsafeNewQNetworkProxyFactory constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyFactory(h unsafe.Pointer) *QNetworkProxyFactory { - return newQNetworkProxyFactory((*C.QNetworkProxyFactory)(h)) + if h == nil { + return nil + } + + return &QNetworkProxyFactory{h: (*C.QNetworkProxyFactory)(h)} } -func (this *QNetworkProxyFactory) QueryProxy() []QNetworkProxy { - var _ma C.struct_miqt_array = C.QNetworkProxyFactory_QueryProxy(this.h) +func (this *QNetworkProxyFactory) QueryProxy(query *QNetworkProxyQuery) []QNetworkProxy { + var _ma C.struct_miqt_array = C.QNetworkProxyFactory_QueryProxy(this.h, query.cPointer()) _ret := make([]QNetworkProxy, int(_ma.len)) _outCast := (*[0xffff]*C.QNetworkProxy)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -699,19 +820,6 @@ func (this *QNetworkProxyFactory) OperatorAssign(param1 *QNetworkProxyFactory) { C.QNetworkProxyFactory_OperatorAssign(this.h, param1.cPointer()) } -func (this *QNetworkProxyFactory) QueryProxy1(query *QNetworkProxyQuery) []QNetworkProxy { - var _ma C.struct_miqt_array = C.QNetworkProxyFactory_QueryProxy1(this.h, query.cPointer()) - _ret := make([]QNetworkProxy, int(_ma.len)) - _outCast := (*[0xffff]*C.QNetworkProxy)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQNetworkProxy(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - func QNetworkProxyFactory_SystemProxyForQuery1(query *QNetworkProxyQuery) []QNetworkProxy { var _ma C.struct_miqt_array = C.QNetworkProxyFactory_SystemProxyForQuery1(query.cPointer()) _ret := make([]QNetworkProxy, int(_ma.len)) @@ -727,7 +835,7 @@ func QNetworkProxyFactory_SystemProxyForQuery1(query *QNetworkProxyQuery) []QNet // Delete this object from C++ memory. func (this *QNetworkProxyFactory) Delete() { - C.QNetworkProxyFactory_Delete(this.h) + C.QNetworkProxyFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkproxy.h b/qt/network/gen_qnetworkproxy.h index cf52e425..e4be2f5d 100644 --- a/qt/network/gen_qnetworkproxy.h +++ b/qt/network/gen_qnetworkproxy.h @@ -32,24 +32,24 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QNetworkProxyQuery* QNetworkProxyQuery_new(); -QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl); -QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port); -QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort); -QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl); -QNetworkProxyQuery* QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port); -QNetworkProxyQuery* QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort); -QNetworkProxyQuery* QNetworkProxyQuery_new8(QNetworkProxyQuery* other); -QNetworkProxyQuery* QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag); -QNetworkProxyQuery* QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag); -QNetworkProxyQuery* QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag); -QNetworkProxyQuery* QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag); -QNetworkProxyQuery* QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType); +void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new8(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other); void QNetworkProxyQuery_Swap(QNetworkProxyQuery* self, QNetworkProxyQuery* other); bool QNetworkProxyQuery_OperatorEqual(const QNetworkProxyQuery* self, QNetworkProxyQuery* other); @@ -68,15 +68,15 @@ QUrl* QNetworkProxyQuery_Url(const QNetworkProxyQuery* self); void QNetworkProxyQuery_SetUrl(QNetworkProxyQuery* self, QUrl* url); QNetworkConfiguration* QNetworkProxyQuery_NetworkConfiguration(const QNetworkProxyQuery* self); void QNetworkProxyQuery_SetNetworkConfiguration(QNetworkProxyQuery* self, QNetworkConfiguration* networkConfiguration); -void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self); +void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass); -QNetworkProxy* QNetworkProxy_new(); -QNetworkProxy* QNetworkProxy_new2(int typeVal); -QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other); -QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName); -QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port); -QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user); -QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password); +void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy); void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other); void QNetworkProxy_Swap(QNetworkProxy* self, QNetworkProxy* other); bool QNetworkProxy_OperatorEqual(const QNetworkProxy* self, QNetworkProxy* other); @@ -103,18 +103,17 @@ bool QNetworkProxy_HasRawHeader(const QNetworkProxy* self, struct miqt_string he struct miqt_array /* of struct miqt_string */ QNetworkProxy_RawHeaderList(const QNetworkProxy* self); struct miqt_string QNetworkProxy_RawHeader(const QNetworkProxy* self, struct miqt_string headerName); void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerName, struct miqt_string value); -void QNetworkProxy_Delete(QNetworkProxy* self); +void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass); -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self); +struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query); bool QNetworkProxyFactory_UsesSystemConfiguration(); void QNetworkProxyFactory_SetUseSystemConfiguration(bool enable); void QNetworkProxyFactory_SetApplicationProxyFactory(QNetworkProxyFactory* factory); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_ProxyForQuery(QNetworkProxyQuery* query); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery(); void QNetworkProxyFactory_OperatorAssign(QNetworkProxyFactory* self, QNetworkProxyFactory* param1); -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy1(QNetworkProxyFactory* self, QNetworkProxyQuery* query); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery1(QNetworkProxyQuery* query); -void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self); +void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkreply.cpp b/qt/network/gen_qnetworkreply.cpp index 7e568bf5..71070493 100644 --- a/qt/network/gen_qnetworkreply.cpp +++ b/qt/network/gen_qnetworkreply.cpp @@ -1,9 +1,11 @@ #include +#include #include #include #include #include #include +#include #include #include #include @@ -379,7 +381,11 @@ struct miqt_string QNetworkReply_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QNetworkReply_Delete(QNetworkReply* self) { - delete self; +void QNetworkReply_Delete(QNetworkReply* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkreply.go b/qt/network/gen_qnetworkreply.go index c474a9a9..f145b52b 100644 --- a/qt/network/gen_qnetworkreply.go +++ b/qt/network/gen_qnetworkreply.go @@ -55,7 +55,8 @@ const ( ) type QNetworkReply struct { - h *C.QNetworkReply + h *C.QNetworkReply + isSubclass bool *qt.QIODevice } @@ -73,15 +74,23 @@ func (this *QNetworkReply) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkReply(h *C.QNetworkReply) *QNetworkReply { +// newQNetworkReply constructs the type using only CGO pointers. +func newQNetworkReply(h *C.QNetworkReply, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QNetworkReply { if h == nil { return nil } - return &QNetworkReply{h: h, QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QNetworkReply{h: h, + QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkReply(h unsafe.Pointer) *QNetworkReply { - return newQNetworkReply((*C.QNetworkReply)(h)) +// UnsafeNewQNetworkReply constructs the type using only unsafe pointers. +func UnsafeNewQNetworkReply(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkReply { + if h == nil { + return nil + } + + return &QNetworkReply{h: (*C.QNetworkReply)(h), + QIODevice: qt.UnsafeNewQIODevice(h_QIODevice, h_QObject)} } func (this *QNetworkReply) MetaObject() *qt.QMetaObject { @@ -129,7 +138,7 @@ func (this *QNetworkReply) SetReadBufferSize(size int64) { } func (this *QNetworkReply) Manager() *QNetworkAccessManager { - return UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QNetworkReply_Manager(this.h))) + return UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QNetworkReply_Manager(this.h)), nil) } func (this *QNetworkReply) Operation() QNetworkAccessManager__Operation { @@ -538,7 +547,7 @@ func QNetworkReply_TrUtf83(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QNetworkReply) Delete() { - C.QNetworkReply_Delete(this.h) + C.QNetworkReply_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkreply.h b/qt/network/gen_qnetworkreply.h index f9424883..22d7404f 100644 --- a/qt/network/gen_qnetworkreply.h +++ b/qt/network/gen_qnetworkreply.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QIODevice; class QMetaObject; class QNetworkAccessManager; class QNetworkReply; class QNetworkRequest; +class QObject; class QSslConfiguration; class QSslError; class QSslPreSharedKeyAuthenticator; @@ -27,10 +29,12 @@ class QUrl; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkAccessManager QNetworkAccessManager; typedef struct QNetworkReply QNetworkReply; typedef struct QNetworkRequest QNetworkRequest; +typedef struct QObject QObject; typedef struct QSslConfiguration QSslConfiguration; typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; @@ -86,11 +90,15 @@ void QNetworkReply_UploadProgress(QNetworkReply* self, long long bytesSent, long void QNetworkReply_connect_UploadProgress(QNetworkReply* self, intptr_t slot); void QNetworkReply_DownloadProgress(QNetworkReply* self, long long bytesReceived, long long bytesTotal); void QNetworkReply_connect_DownloadProgress(QNetworkReply* self, intptr_t slot); +long long QNetworkReply_WriteData(QNetworkReply* self, const char* data, long long lenVal); +void QNetworkReply_SslConfigurationImplementation(const QNetworkReply* self, QSslConfiguration* param1); +void QNetworkReply_SetSslConfigurationImplementation(QNetworkReply* self, QSslConfiguration* sslConfigurationImplementation); +void QNetworkReply_IgnoreSslErrorsImplementation(QNetworkReply* self, struct miqt_array /* of QSslError* */ param1); struct miqt_string QNetworkReply_Tr2(const char* s, const char* c); struct miqt_string QNetworkReply_Tr3(const char* s, const char* c, int n); struct miqt_string QNetworkReply_TrUtf82(const char* s, const char* c); struct miqt_string QNetworkReply_TrUtf83(const char* s, const char* c, int n); -void QNetworkReply_Delete(QNetworkReply* self); +void QNetworkReply_Delete(QNetworkReply* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworkrequest.cpp b/qt/network/gen_qnetworkrequest.cpp index 4274bcfb..71012e8b 100644 --- a/qt/network/gen_qnetworkrequest.cpp +++ b/qt/network/gen_qnetworkrequest.cpp @@ -13,16 +13,19 @@ #include "gen_qnetworkrequest.h" #include "_cgo_export.h" -QNetworkRequest* QNetworkRequest_new() { - return new QNetworkRequest(); +void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest) { + QNetworkRequest* ret = new QNetworkRequest(); + *outptr_QNetworkRequest = ret; } -QNetworkRequest* QNetworkRequest_new2(QUrl* url) { - return new QNetworkRequest(*url); +void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest) { + QNetworkRequest* ret = new QNetworkRequest(*url); + *outptr_QNetworkRequest = ret; } -QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other) { - return new QNetworkRequest(*other); +void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest) { + QNetworkRequest* ret = new QNetworkRequest(*other); + *outptr_QNetworkRequest = ret; } void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other) { @@ -177,7 +180,11 @@ void QNetworkRequest_SetTransferTimeout1(QNetworkRequest* self, int timeout) { self->setTransferTimeout(static_cast(timeout)); } -void QNetworkRequest_Delete(QNetworkRequest* self) { - delete self; +void QNetworkRequest_Delete(QNetworkRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworkrequest.go b/qt/network/gen_qnetworkrequest.go index 08471d18..d3766732 100644 --- a/qt/network/gen_qnetworkrequest.go +++ b/qt/network/gen_qnetworkrequest.go @@ -110,7 +110,8 @@ const ( ) type QNetworkRequest struct { - h *C.QNetworkRequest + h *C.QNetworkRequest + isSubclass bool } func (this *QNetworkRequest) cPointer() *C.QNetworkRequest { @@ -127,6 +128,7 @@ func (this *QNetworkRequest) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkRequest constructs the type using only CGO pointers. func newQNetworkRequest(h *C.QNetworkRequest) *QNetworkRequest { if h == nil { return nil @@ -134,26 +136,43 @@ func newQNetworkRequest(h *C.QNetworkRequest) *QNetworkRequest { return &QNetworkRequest{h: h} } +// UnsafeNewQNetworkRequest constructs the type using only unsafe pointers. func UnsafeNewQNetworkRequest(h unsafe.Pointer) *QNetworkRequest { - return newQNetworkRequest((*C.QNetworkRequest)(h)) + if h == nil { + return nil + } + + return &QNetworkRequest{h: (*C.QNetworkRequest)(h)} } // NewQNetworkRequest constructs a new QNetworkRequest object. func NewQNetworkRequest() *QNetworkRequest { - ret := C.QNetworkRequest_new() - return newQNetworkRequest(ret) + var outptr_QNetworkRequest *C.QNetworkRequest = nil + + C.QNetworkRequest_new(&outptr_QNetworkRequest) + ret := newQNetworkRequest(outptr_QNetworkRequest) + ret.isSubclass = true + return ret } // NewQNetworkRequest2 constructs a new QNetworkRequest object. func NewQNetworkRequest2(url *qt.QUrl) *QNetworkRequest { - ret := C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer())) - return newQNetworkRequest(ret) + var outptr_QNetworkRequest *C.QNetworkRequest = nil + + C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer()), &outptr_QNetworkRequest) + ret := newQNetworkRequest(outptr_QNetworkRequest) + ret.isSubclass = true + return ret } // NewQNetworkRequest3 constructs a new QNetworkRequest object. func NewQNetworkRequest3(other *QNetworkRequest) *QNetworkRequest { - ret := C.QNetworkRequest_new3(other.cPointer()) - return newQNetworkRequest(ret) + var outptr_QNetworkRequest *C.QNetworkRequest = nil + + C.QNetworkRequest_new3(other.cPointer(), &outptr_QNetworkRequest) + ret := newQNetworkRequest(outptr_QNetworkRequest) + ret.isSubclass = true + return ret } func (this *QNetworkRequest) OperatorAssign(other *QNetworkRequest) { @@ -327,7 +346,7 @@ func (this *QNetworkRequest) SetTransferTimeout1(timeout int) { // Delete this object from C++ memory. func (this *QNetworkRequest) Delete() { - C.QNetworkRequest_Delete(this.h) + C.QNetworkRequest_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworkrequest.h b/qt/network/gen_qnetworkrequest.h index 4f2a583c..bcae9f07 100644 --- a/qt/network/gen_qnetworkrequest.h +++ b/qt/network/gen_qnetworkrequest.h @@ -32,9 +32,9 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QNetworkRequest* QNetworkRequest_new(); -QNetworkRequest* QNetworkRequest_new2(QUrl* url); -QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other); +void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest); +void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest); +void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest); void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other); void QNetworkRequest_Swap(QNetworkRequest* self, QNetworkRequest* other); bool QNetworkRequest_OperatorEqual(const QNetworkRequest* self, QNetworkRequest* other); @@ -65,7 +65,7 @@ int QNetworkRequest_TransferTimeout(const QNetworkRequest* self); void QNetworkRequest_SetTransferTimeout(QNetworkRequest* self); QVariant* QNetworkRequest_Attribute2(const QNetworkRequest* self, int code, QVariant* defaultValue); void QNetworkRequest_SetTransferTimeout1(QNetworkRequest* self, int timeout); -void QNetworkRequest_Delete(QNetworkRequest* self); +void QNetworkRequest_Delete(QNetworkRequest* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qnetworksession.cpp b/qt/network/gen_qnetworksession.cpp index 076b0489..edfb6f62 100644 --- a/qt/network/gen_qnetworksession.cpp +++ b/qt/network/gen_qnetworksession.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,17 +9,203 @@ #include #include #include +#include #include #include #include "gen_qnetworksession.h" #include "_cgo_export.h" -QNetworkSession* QNetworkSession_new(QNetworkConfiguration* connConfig) { - return new QNetworkSession(*connConfig); +class MiqtVirtualQNetworkSession : public virtual QNetworkSession { +public: + + MiqtVirtualQNetworkSession(const QNetworkConfiguration& connConfig): QNetworkSession(connConfig) {}; + MiqtVirtualQNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent): QNetworkSession(connConfig, parent) {}; + + virtual ~MiqtVirtualQNetworkSession() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QNetworkSession::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkSession_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QNetworkSession::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QNetworkSession::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkSession_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QNetworkSession::disconnectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QNetworkSession::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkSession_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QNetworkSession::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QNetworkSession::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkSession_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QNetworkSession::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QNetworkSession::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QNetworkSession_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QNetworkSession::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QNetworkSession::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QNetworkSession_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QNetworkSession::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QNetworkSession::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QNetworkSession_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QNetworkSession::customEvent(event); + + } + +}; + +void QNetworkSession_new(QNetworkConfiguration* connConfig, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject) { + MiqtVirtualQNetworkSession* ret = new MiqtVirtualQNetworkSession(*connConfig); + *outptr_QNetworkSession = ret; + *outptr_QObject = static_cast(ret); } -QNetworkSession* QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent) { - return new QNetworkSession(*connConfig, parent); +void QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject) { + MiqtVirtualQNetworkSession* ret = new MiqtVirtualQNetworkSession(*connConfig, parent); + *outptr_QNetworkSession = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkSession_MetaObject(const QNetworkSession* self) { @@ -149,7 +338,7 @@ void QNetworkSession_StateChanged(QNetworkSession* self, int param1) { } void QNetworkSession_connect_StateChanged(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::stateChanged), self, [=](QNetworkSession::State param1) { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::stateChanged), self, [=](QNetworkSession::State param1) { QNetworkSession::State param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QNetworkSession_StateChanged(slot, sigval1); @@ -161,7 +350,7 @@ void QNetworkSession_Opened(QNetworkSession* self) { } void QNetworkSession_connect_Opened(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::opened), self, [=]() { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::opened), self, [=]() { miqt_exec_callback_QNetworkSession_Opened(slot); }); } @@ -171,7 +360,7 @@ void QNetworkSession_Closed(QNetworkSession* self) { } void QNetworkSession_connect_Closed(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::closed), self, [=]() { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::closed), self, [=]() { miqt_exec_callback_QNetworkSession_Closed(slot); }); } @@ -181,7 +370,7 @@ void QNetworkSession_ErrorWithQNetworkSessionSessionError(QNetworkSession* self, } void QNetworkSession_connect_ErrorWithQNetworkSessionSessionError(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::error), self, [=](QNetworkSession::SessionError param1) { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::error), self, [=](QNetworkSession::SessionError param1) { QNetworkSession::SessionError param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QNetworkSession_ErrorWithQNetworkSessionSessionError(slot, sigval1); @@ -193,7 +382,7 @@ void QNetworkSession_PreferredConfigurationChanged(QNetworkSession* self, QNetwo } void QNetworkSession_connect_PreferredConfigurationChanged(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::preferredConfigurationChanged), self, [=](const QNetworkConfiguration& config, bool isSeamless) { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::preferredConfigurationChanged), self, [=](const QNetworkConfiguration& config, bool isSeamless) { const QNetworkConfiguration& config_ret = config; // Cast returned reference into pointer QNetworkConfiguration* sigval1 = const_cast(&config_ret); @@ -207,7 +396,7 @@ void QNetworkSession_NewConfigurationActivated(QNetworkSession* self) { } void QNetworkSession_connect_NewConfigurationActivated(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::newConfigurationActivated), self, [=]() { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::newConfigurationActivated), self, [=]() { miqt_exec_callback_QNetworkSession_NewConfigurationActivated(slot); }); } @@ -217,7 +406,7 @@ void QNetworkSession_UsagePoliciesChanged(QNetworkSession* self, int usagePolici } void QNetworkSession_connect_UsagePoliciesChanged(QNetworkSession* self, intptr_t slot) { - QNetworkSession::connect(self, static_cast(&QNetworkSession::usagePoliciesChanged), self, [=](QNetworkSession::UsagePolicies usagePolicies) { + MiqtVirtualQNetworkSession::connect(self, static_cast(&QNetworkSession::usagePoliciesChanged), self, [=](QNetworkSession::UsagePolicies usagePolicies) { QNetworkSession::UsagePolicies usagePolicies_ret = usagePolicies; int sigval1 = static_cast(usagePolicies_ret); miqt_exec_callback_QNetworkSession_UsagePoliciesChanged(slot, sigval1); @@ -272,7 +461,67 @@ bool QNetworkSession_WaitForOpened1(QNetworkSession* self, int msecs) { return self->waitForOpened(static_cast(msecs)); } -void QNetworkSession_Delete(QNetworkSession* self) { - delete self; +void QNetworkSession_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__ConnectNotify = slot; +} + +void QNetworkSession_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QNetworkSession_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__DisconnectNotify = slot; +} + +void QNetworkSession_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QNetworkSession_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__Event = slot; +} + +bool QNetworkSession_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_Event(event); +} + +void QNetworkSession_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__EventFilter = slot; +} + +bool QNetworkSession_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QNetworkSession_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__TimerEvent = slot; +} + +void QNetworkSession_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_TimerEvent(event); +} + +void QNetworkSession_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__ChildEvent = slot; +} + +void QNetworkSession_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_ChildEvent(event); +} + +void QNetworkSession_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkSession*)(self) )->handle__CustomEvent = slot; +} + +void QNetworkSession_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQNetworkSession*)(self) )->virtualbase_CustomEvent(event); +} + +void QNetworkSession_Delete(QNetworkSession* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qnetworksession.go b/qt/network/gen_qnetworksession.go index b3bc5291..e14f1fa7 100644 --- a/qt/network/gen_qnetworksession.go +++ b/qt/network/gen_qnetworksession.go @@ -45,7 +45,8 @@ const ( ) type QNetworkSession struct { - h *C.QNetworkSession + h *C.QNetworkSession + isSubclass bool *qt.QObject } @@ -63,27 +64,45 @@ func (this *QNetworkSession) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkSession(h *C.QNetworkSession) *QNetworkSession { +// newQNetworkSession constructs the type using only CGO pointers. +func newQNetworkSession(h *C.QNetworkSession, h_QObject *C.QObject) *QNetworkSession { if h == nil { return nil } - return &QNetworkSession{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkSession{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkSession(h unsafe.Pointer) *QNetworkSession { - return newQNetworkSession((*C.QNetworkSession)(h)) +// UnsafeNewQNetworkSession constructs the type using only unsafe pointers. +func UnsafeNewQNetworkSession(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkSession { + if h == nil { + return nil + } + + return &QNetworkSession{h: (*C.QNetworkSession)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQNetworkSession constructs a new QNetworkSession object. func NewQNetworkSession(connConfig *QNetworkConfiguration) *QNetworkSession { - ret := C.QNetworkSession_new(connConfig.cPointer()) - return newQNetworkSession(ret) + var outptr_QNetworkSession *C.QNetworkSession = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkSession_new(connConfig.cPointer(), &outptr_QNetworkSession, &outptr_QObject) + ret := newQNetworkSession(outptr_QNetworkSession, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkSession2 constructs a new QNetworkSession object. func NewQNetworkSession2(connConfig *QNetworkConfiguration, parent *qt.QObject) *QNetworkSession { - ret := C.QNetworkSession_new2(connConfig.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQNetworkSession(ret) + var outptr_QNetworkSession *C.QNetworkSession = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkSession_new2(connConfig.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkSession, &outptr_QObject) + ret := newQNetworkSession(outptr_QNetworkSession, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkSession) MetaObject() *qt.QMetaObject { @@ -394,9 +413,175 @@ func (this *QNetworkSession) WaitForOpened1(msecs int) bool { return (bool)(C.QNetworkSession_WaitForOpened1(this.h, (C.int)(msecs))) } +func (this *QNetworkSession) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkSession_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkSession) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkSession_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_ConnectNotify +func miqt_exec_callback_QNetworkSession_ConnectNotify(self *C.QNetworkSession, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkSession{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QNetworkSession) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QNetworkSession_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkSession) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QNetworkSession_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_DisconnectNotify +func miqt_exec_callback_QNetworkSession_DisconnectNotify(self *C.QNetworkSession, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkSession{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +func (this *QNetworkSession) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QNetworkSession_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkSession) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QNetworkSession_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_Event +func miqt_exec_callback_QNetworkSession_Event(self *C.QNetworkSession, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkSession{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkSession) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QNetworkSession_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkSession) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QNetworkSession_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_EventFilter +func miqt_exec_callback_QNetworkSession_EventFilter(self *C.QNetworkSession, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkSession{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkSession) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QNetworkSession_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QNetworkSession) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QNetworkSession_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_TimerEvent +func miqt_exec_callback_QNetworkSession_TimerEvent(self *C.QNetworkSession, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkSession{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QNetworkSession) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QNetworkSession_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QNetworkSession) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QNetworkSession_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_ChildEvent +func miqt_exec_callback_QNetworkSession_ChildEvent(self *C.QNetworkSession, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkSession{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QNetworkSession) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QNetworkSession_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QNetworkSession) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QNetworkSession_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkSession_CustomEvent +func miqt_exec_callback_QNetworkSession_CustomEvent(self *C.QNetworkSession, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QNetworkSession{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QNetworkSession) Delete() { - C.QNetworkSession_Delete(this.h) + C.QNetworkSession_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qnetworksession.h b/qt/network/gen_qnetworksession.h index 3f794579..10f737da 100644 --- a/qt/network/gen_qnetworksession.h +++ b/qt/network/gen_qnetworksession.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QNetworkConfiguration; class QNetworkInterface; class QNetworkSession; class QObject; +class QTimerEvent; class QVariant; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkConfiguration QNetworkConfiguration; typedef struct QNetworkInterface QNetworkInterface; typedef struct QNetworkSession QNetworkSession; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QNetworkSession* QNetworkSession_new(QNetworkConfiguration* connConfig); -QNetworkSession* QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent); +void QNetworkSession_new(QNetworkConfiguration* connConfig, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject); +void QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject); QMetaObject* QNetworkSession_MetaObject(const QNetworkSession* self); void* QNetworkSession_Metacast(QNetworkSession* self, const char* param1); struct miqt_string QNetworkSession_Tr(const char* s); @@ -70,12 +78,28 @@ void QNetworkSession_NewConfigurationActivated(QNetworkSession* self); void QNetworkSession_connect_NewConfigurationActivated(QNetworkSession* self, intptr_t slot); void QNetworkSession_UsagePoliciesChanged(QNetworkSession* self, int usagePolicies); void QNetworkSession_connect_UsagePoliciesChanged(QNetworkSession* self, intptr_t slot); +void QNetworkSession_ConnectNotify(QNetworkSession* self, QMetaMethod* signal); +void QNetworkSession_DisconnectNotify(QNetworkSession* self, QMetaMethod* signal); struct miqt_string QNetworkSession_Tr2(const char* s, const char* c); struct miqt_string QNetworkSession_Tr3(const char* s, const char* c, int n); struct miqt_string QNetworkSession_TrUtf82(const char* s, const char* c); struct miqt_string QNetworkSession_TrUtf83(const char* s, const char* c, int n); bool QNetworkSession_WaitForOpened1(QNetworkSession* self, int msecs); -void QNetworkSession_Delete(QNetworkSession* self); +void QNetworkSession_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QNetworkSession_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QNetworkSession_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QNetworkSession_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QNetworkSession_override_virtual_Event(void* self, intptr_t slot); +bool QNetworkSession_virtualbase_Event(void* self, QEvent* event); +void QNetworkSession_override_virtual_EventFilter(void* self, intptr_t slot); +bool QNetworkSession_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QNetworkSession_override_virtual_TimerEvent(void* self, intptr_t slot); +void QNetworkSession_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QNetworkSession_override_virtual_ChildEvent(void* self, intptr_t slot); +void QNetworkSession_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QNetworkSession_override_virtual_CustomEvent(void* self, intptr_t slot); +void QNetworkSession_virtualbase_CustomEvent(void* self, QEvent* event); +void QNetworkSession_Delete(QNetworkSession* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qocspresponse.cpp b/qt/network/gen_qocspresponse.cpp index 4c46a035..c6133b28 100644 --- a/qt/network/gen_qocspresponse.cpp +++ b/qt/network/gen_qocspresponse.cpp @@ -4,12 +4,14 @@ #include "gen_qocspresponse.h" #include "_cgo_export.h" -QOcspResponse* QOcspResponse_new() { - return new QOcspResponse(); +void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse) { + QOcspResponse* ret = new QOcspResponse(); + *outptr_QOcspResponse = ret; } -QOcspResponse* QOcspResponse_new2(QOcspResponse* other) { - return new QOcspResponse(*other); +void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse) { + QOcspResponse* ret = new QOcspResponse(*other); + *outptr_QOcspResponse = ret; } void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other) { @@ -38,7 +40,11 @@ void QOcspResponse_Swap(QOcspResponse* self, QOcspResponse* other) { self->swap(*other); } -void QOcspResponse_Delete(QOcspResponse* self) { - delete self; +void QOcspResponse_Delete(QOcspResponse* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qocspresponse.go b/qt/network/gen_qocspresponse.go index 5f84859d..8d40495f 100644 --- a/qt/network/gen_qocspresponse.go +++ b/qt/network/gen_qocspresponse.go @@ -36,7 +36,8 @@ const ( ) type QOcspResponse struct { - h *C.QOcspResponse + h *C.QOcspResponse + isSubclass bool } func (this *QOcspResponse) cPointer() *C.QOcspResponse { @@ -53,6 +54,7 @@ func (this *QOcspResponse) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQOcspResponse constructs the type using only CGO pointers. func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse { if h == nil { return nil @@ -60,20 +62,33 @@ func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse { return &QOcspResponse{h: h} } +// UnsafeNewQOcspResponse constructs the type using only unsafe pointers. func UnsafeNewQOcspResponse(h unsafe.Pointer) *QOcspResponse { - return newQOcspResponse((*C.QOcspResponse)(h)) + if h == nil { + return nil + } + + return &QOcspResponse{h: (*C.QOcspResponse)(h)} } // NewQOcspResponse constructs a new QOcspResponse object. func NewQOcspResponse() *QOcspResponse { - ret := C.QOcspResponse_new() - return newQOcspResponse(ret) + var outptr_QOcspResponse *C.QOcspResponse = nil + + C.QOcspResponse_new(&outptr_QOcspResponse) + ret := newQOcspResponse(outptr_QOcspResponse) + ret.isSubclass = true + return ret } // NewQOcspResponse2 constructs a new QOcspResponse object. func NewQOcspResponse2(other *QOcspResponse) *QOcspResponse { - ret := C.QOcspResponse_new2(other.cPointer()) - return newQOcspResponse(ret) + var outptr_QOcspResponse *C.QOcspResponse = nil + + C.QOcspResponse_new2(other.cPointer(), &outptr_QOcspResponse) + ret := newQOcspResponse(outptr_QOcspResponse) + ret.isSubclass = true + return ret } func (this *QOcspResponse) OperatorAssign(other *QOcspResponse) { @@ -108,7 +123,7 @@ func (this *QOcspResponse) Swap(other *QOcspResponse) { // Delete this object from C++ memory. func (this *QOcspResponse) Delete() { - C.QOcspResponse_Delete(this.h) + C.QOcspResponse_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qocspresponse.h b/qt/network/gen_qocspresponse.h index 2b4d3400..cef90fab 100644 --- a/qt/network/gen_qocspresponse.h +++ b/qt/network/gen_qocspresponse.h @@ -22,15 +22,15 @@ typedef struct QOcspResponse QOcspResponse; typedef struct QSslCertificate QSslCertificate; #endif -QOcspResponse* QOcspResponse_new(); -QOcspResponse* QOcspResponse_new2(QOcspResponse* other); +void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse); +void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse); void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other); int QOcspResponse_CertificateStatus(const QOcspResponse* self); int QOcspResponse_RevocationReason(const QOcspResponse* self); QSslCertificate* QOcspResponse_Responder(const QOcspResponse* self); QSslCertificate* QOcspResponse_Subject(const QOcspResponse* self); void QOcspResponse_Swap(QOcspResponse* self, QOcspResponse* other); -void QOcspResponse_Delete(QOcspResponse* self); +void QOcspResponse_Delete(QOcspResponse* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslcertificate.cpp b/qt/network/gen_qsslcertificate.cpp index 07cdf2e6..ab3b27b6 100644 --- a/qt/network/gen_qsslcertificate.cpp +++ b/qt/network/gen_qsslcertificate.cpp @@ -13,30 +13,36 @@ #include "gen_qsslcertificate.h" #include "_cgo_export.h" -QSslCertificate* QSslCertificate_new(QIODevice* device) { - return new QSslCertificate(device); +void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(device); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new2() { - return new QSslCertificate(); +void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new3(QSslCertificate* other) { - return new QSslCertificate(*other); +void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(*other); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new4(QIODevice* device, int format) { - return new QSslCertificate(device, static_cast(format)); +void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(device, static_cast(format)); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new5(struct miqt_string data) { +void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate) { QByteArray data_QByteArray(data.data, data.len); - return new QSslCertificate(data_QByteArray); + QSslCertificate* ret = new QSslCertificate(data_QByteArray); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format) { +void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate) { QByteArray data_QByteArray(data.data, data.len); - return new QSslCertificate(data_QByteArray, static_cast(format)); + QSslCertificate* ret = new QSslCertificate(data_QByteArray, static_cast(format)); + *outptr_QSslCertificate = ret; } void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other) { @@ -480,7 +486,11 @@ bool QSslCertificate_ImportPkcs125(QIODevice* device, QSslKey* key, QSslCertific return QSslCertificate::importPkcs12(device, key, cert, &caCertificates_QList, passPhrase_QByteArray); } -void QSslCertificate_Delete(QSslCertificate* self) { - delete self; +void QSslCertificate_Delete(QSslCertificate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslcertificate.go b/qt/network/gen_qsslcertificate.go index 362b015e..ae83ca83 100644 --- a/qt/network/gen_qsslcertificate.go +++ b/qt/network/gen_qsslcertificate.go @@ -37,7 +37,8 @@ const ( ) type QSslCertificate struct { - h *C.QSslCertificate + h *C.QSslCertificate + isSubclass bool } func (this *QSslCertificate) cPointer() *C.QSslCertificate { @@ -54,6 +55,7 @@ func (this *QSslCertificate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslCertificate constructs the type using only CGO pointers. func newQSslCertificate(h *C.QSslCertificate) *QSslCertificate { if h == nil { return nil @@ -61,32 +63,53 @@ func newQSslCertificate(h *C.QSslCertificate) *QSslCertificate { return &QSslCertificate{h: h} } +// UnsafeNewQSslCertificate constructs the type using only unsafe pointers. func UnsafeNewQSslCertificate(h unsafe.Pointer) *QSslCertificate { - return newQSslCertificate((*C.QSslCertificate)(h)) + if h == nil { + return nil + } + + return &QSslCertificate{h: (*C.QSslCertificate)(h)} } // NewQSslCertificate constructs a new QSslCertificate object. func NewQSslCertificate(device *qt.QIODevice) *QSslCertificate { - ret := C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer())) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate2 constructs a new QSslCertificate object. func NewQSslCertificate2() *QSslCertificate { - ret := C.QSslCertificate_new2() - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new2(&outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate3 constructs a new QSslCertificate object. func NewQSslCertificate3(other *QSslCertificate) *QSslCertificate { - ret := C.QSslCertificate_new3(other.cPointer()) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new3(other.cPointer(), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate4 constructs a new QSslCertificate object. func NewQSslCertificate4(device *qt.QIODevice, format QSsl__EncodingFormat) *QSslCertificate { - ret := C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format)) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate5 constructs a new QSslCertificate object. @@ -94,8 +117,12 @@ func NewQSslCertificate5(data []byte) *QSslCertificate { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QSslCertificate_new5(data_alias) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new5(data_alias, &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate6 constructs a new QSslCertificate object. @@ -103,8 +130,12 @@ func NewQSslCertificate6(data []byte, format QSsl__EncodingFormat) *QSslCertific data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QSslCertificate_new6(data_alias, (C.int)(format)) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new6(data_alias, (C.int)(format), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } func (this *QSslCertificate) OperatorAssign(other *QSslCertificate) { @@ -521,7 +552,7 @@ func QSslCertificate_ImportPkcs125(device *qt.QIODevice, key *QSslKey, cert *QSs // Delete this object from C++ memory. func (this *QSslCertificate) Delete() { - C.QSslCertificate_Delete(this.h) + C.QSslCertificate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslcertificate.h b/qt/network/gen_qsslcertificate.h index 2f35b003..c3a48903 100644 --- a/qt/network/gen_qsslcertificate.h +++ b/qt/network/gen_qsslcertificate.h @@ -32,12 +32,12 @@ typedef struct QSslError QSslError; typedef struct QSslKey QSslKey; #endif -QSslCertificate* QSslCertificate_new(QIODevice* device); -QSslCertificate* QSslCertificate_new2(); -QSslCertificate* QSslCertificate_new3(QSslCertificate* other); -QSslCertificate* QSslCertificate_new4(QIODevice* device, int format); -QSslCertificate* QSslCertificate_new5(struct miqt_string data); -QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format); +void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate); void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other); void QSslCertificate_Swap(QSslCertificate* self, QSslCertificate* other); bool QSslCertificate_OperatorEqual(const QSslCertificate* self, QSslCertificate* other); @@ -79,7 +79,7 @@ struct miqt_array /* of QSslCertificate* */ QSslCertificate_FromData2(struct mi struct miqt_array /* of QSslError* */ QSslCertificate_Verify2(struct miqt_array /* of QSslCertificate* */ certificateChain, struct miqt_string hostName); bool QSslCertificate_ImportPkcs124(QIODevice* device, QSslKey* key, QSslCertificate* cert, struct miqt_array /* of QSslCertificate* */ caCertificates); bool QSslCertificate_ImportPkcs125(QIODevice* device, QSslKey* key, QSslCertificate* cert, struct miqt_array /* of QSslCertificate* */ caCertificates, struct miqt_string passPhrase); -void QSslCertificate_Delete(QSslCertificate* self); +void QSslCertificate_Delete(QSslCertificate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslcertificateextension.cpp b/qt/network/gen_qsslcertificateextension.cpp index 0bb9b367..7c04db42 100644 --- a/qt/network/gen_qsslcertificateextension.cpp +++ b/qt/network/gen_qsslcertificateextension.cpp @@ -7,12 +7,14 @@ #include "gen_qsslcertificateextension.h" #include "_cgo_export.h" -QSslCertificateExtension* QSslCertificateExtension_new() { - return new QSslCertificateExtension(); +void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension) { + QSslCertificateExtension* ret = new QSslCertificateExtension(); + *outptr_QSslCertificateExtension = ret; } -QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other) { - return new QSslCertificateExtension(*other); +void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension) { + QSslCertificateExtension* ret = new QSslCertificateExtension(*other); + *outptr_QSslCertificateExtension = ret; } void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other) { @@ -57,7 +59,11 @@ bool QSslCertificateExtension_IsSupported(const QSslCertificateExtension* self) return self->isSupported(); } -void QSslCertificateExtension_Delete(QSslCertificateExtension* self) { - delete self; +void QSslCertificateExtension_Delete(QSslCertificateExtension* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslcertificateextension.go b/qt/network/gen_qsslcertificateextension.go index fbe7e0a8..4b8b0d48 100644 --- a/qt/network/gen_qsslcertificateextension.go +++ b/qt/network/gen_qsslcertificateextension.go @@ -15,7 +15,8 @@ import ( ) type QSslCertificateExtension struct { - h *C.QSslCertificateExtension + h *C.QSslCertificateExtension + isSubclass bool } func (this *QSslCertificateExtension) cPointer() *C.QSslCertificateExtension { @@ -32,6 +33,7 @@ func (this *QSslCertificateExtension) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslCertificateExtension constructs the type using only CGO pointers. func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificateExtension { if h == nil { return nil @@ -39,20 +41,33 @@ func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificate return &QSslCertificateExtension{h: h} } +// UnsafeNewQSslCertificateExtension constructs the type using only unsafe pointers. func UnsafeNewQSslCertificateExtension(h unsafe.Pointer) *QSslCertificateExtension { - return newQSslCertificateExtension((*C.QSslCertificateExtension)(h)) + if h == nil { + return nil + } + + return &QSslCertificateExtension{h: (*C.QSslCertificateExtension)(h)} } // NewQSslCertificateExtension constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension() *QSslCertificateExtension { - ret := C.QSslCertificateExtension_new() - return newQSslCertificateExtension(ret) + var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil + + C.QSslCertificateExtension_new(&outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret.isSubclass = true + return ret } // NewQSslCertificateExtension2 constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension2(other *QSslCertificateExtension) *QSslCertificateExtension { - ret := C.QSslCertificateExtension_new2(other.cPointer()) - return newQSslCertificateExtension(ret) + var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil + + C.QSslCertificateExtension_new2(other.cPointer(), &outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret.isSubclass = true + return ret } func (this *QSslCertificateExtension) OperatorAssign(other *QSslCertificateExtension) { @@ -94,7 +109,7 @@ func (this *QSslCertificateExtension) IsSupported() bool { // Delete this object from C++ memory. func (this *QSslCertificateExtension) Delete() { - C.QSslCertificateExtension_Delete(this.h) + C.QSslCertificateExtension_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslcertificateextension.h b/qt/network/gen_qsslcertificateextension.h index 05ba4303..721b487f 100644 --- a/qt/network/gen_qsslcertificateextension.h +++ b/qt/network/gen_qsslcertificateextension.h @@ -22,8 +22,8 @@ typedef struct QSslCertificateExtension QSslCertificateExtension; typedef struct QVariant QVariant; #endif -QSslCertificateExtension* QSslCertificateExtension_new(); -QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other); +void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension); +void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension); void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other); void QSslCertificateExtension_Swap(QSslCertificateExtension* self, QSslCertificateExtension* other); struct miqt_string QSslCertificateExtension_Oid(const QSslCertificateExtension* self); @@ -31,7 +31,7 @@ struct miqt_string QSslCertificateExtension_Name(const QSslCertificateExtension* QVariant* QSslCertificateExtension_Value(const QSslCertificateExtension* self); bool QSslCertificateExtension_IsCritical(const QSslCertificateExtension* self); bool QSslCertificateExtension_IsSupported(const QSslCertificateExtension* self); -void QSslCertificateExtension_Delete(QSslCertificateExtension* self); +void QSslCertificateExtension_Delete(QSslCertificateExtension* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslcipher.cpp b/qt/network/gen_qsslcipher.cpp index 0833bd9d..302398a0 100644 --- a/qt/network/gen_qsslcipher.cpp +++ b/qt/network/gen_qsslcipher.cpp @@ -6,22 +6,26 @@ #include "gen_qsslcipher.h" #include "_cgo_export.h" -QSslCipher* QSslCipher_new() { - return new QSslCipher(); +void QSslCipher_new(QSslCipher** outptr_QSslCipher) { + QSslCipher* ret = new QSslCipher(); + *outptr_QSslCipher = ret; } -QSslCipher* QSslCipher_new2(struct miqt_string name) { +void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSslCipher(name_QString); + QSslCipher* ret = new QSslCipher(name_QString); + *outptr_QSslCipher = ret; } -QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol) { +void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSslCipher(name_QString, static_cast(protocol)); + QSslCipher* ret = new QSslCipher(name_QString, static_cast(protocol)); + *outptr_QSslCipher = ret; } -QSslCipher* QSslCipher_new4(QSslCipher* other) { - return new QSslCipher(*other); +void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher) { + QSslCipher* ret = new QSslCipher(*other); + *outptr_QSslCipher = ret; } void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other) { @@ -112,7 +116,11 @@ int QSslCipher_Protocol(const QSslCipher* self) { return static_cast(_ret); } -void QSslCipher_Delete(QSslCipher* self) { - delete self; +void QSslCipher_Delete(QSslCipher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslcipher.go b/qt/network/gen_qsslcipher.go index 2d05a799..433b60dc 100644 --- a/qt/network/gen_qsslcipher.go +++ b/qt/network/gen_qsslcipher.go @@ -14,7 +14,8 @@ import ( ) type QSslCipher struct { - h *C.QSslCipher + h *C.QSslCipher + isSubclass bool } func (this *QSslCipher) cPointer() *C.QSslCipher { @@ -31,6 +32,7 @@ func (this *QSslCipher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslCipher constructs the type using only CGO pointers. func newQSslCipher(h *C.QSslCipher) *QSslCipher { if h == nil { return nil @@ -38,14 +40,23 @@ func newQSslCipher(h *C.QSslCipher) *QSslCipher { return &QSslCipher{h: h} } +// UnsafeNewQSslCipher constructs the type using only unsafe pointers. func UnsafeNewQSslCipher(h unsafe.Pointer) *QSslCipher { - return newQSslCipher((*C.QSslCipher)(h)) + if h == nil { + return nil + } + + return &QSslCipher{h: (*C.QSslCipher)(h)} } // NewQSslCipher constructs a new QSslCipher object. func NewQSslCipher() *QSslCipher { - ret := C.QSslCipher_new() - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new(&outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } // NewQSslCipher2 constructs a new QSslCipher object. @@ -54,8 +65,12 @@ func NewQSslCipher2(name string) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSslCipher_new2(name_ms) - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new2(name_ms, &outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } // NewQSslCipher3 constructs a new QSslCipher object. @@ -64,14 +79,22 @@ func NewQSslCipher3(name string, protocol QSsl__SslProtocol) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSslCipher_new3(name_ms, (C.int)(protocol)) - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new3(name_ms, (C.int)(protocol), &outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } // NewQSslCipher4 constructs a new QSslCipher object. func NewQSslCipher4(other *QSslCipher) *QSslCipher { - ret := C.QSslCipher_new4(other.cPointer()) - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new4(other.cPointer(), &outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } func (this *QSslCipher) OperatorAssign(other *QSslCipher) { @@ -143,7 +166,7 @@ func (this *QSslCipher) Protocol() QSsl__SslProtocol { // Delete this object from C++ memory. func (this *QSslCipher) Delete() { - C.QSslCipher_Delete(this.h) + C.QSslCipher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslcipher.h b/qt/network/gen_qsslcipher.h index fce571ea..c0378c3d 100644 --- a/qt/network/gen_qsslcipher.h +++ b/qt/network/gen_qsslcipher.h @@ -20,10 +20,10 @@ class QSslCipher; typedef struct QSslCipher QSslCipher; #endif -QSslCipher* QSslCipher_new(); -QSslCipher* QSslCipher_new2(struct miqt_string name); -QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol); -QSslCipher* QSslCipher_new4(QSslCipher* other); +void QSslCipher_new(QSslCipher** outptr_QSslCipher); +void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher); +void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher); +void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher); void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other); void QSslCipher_Swap(QSslCipher* self, QSslCipher* other); bool QSslCipher_OperatorEqual(const QSslCipher* self, QSslCipher* other); @@ -37,7 +37,7 @@ struct miqt_string QSslCipher_AuthenticationMethod(const QSslCipher* self); struct miqt_string QSslCipher_EncryptionMethod(const QSslCipher* self); struct miqt_string QSslCipher_ProtocolString(const QSslCipher* self); int QSslCipher_Protocol(const QSslCipher* self); -void QSslCipher_Delete(QSslCipher* self); +void QSslCipher_Delete(QSslCipher* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslconfiguration.cpp b/qt/network/gen_qsslconfiguration.cpp index d4a54848..4864fcbf 100644 --- a/qt/network/gen_qsslconfiguration.cpp +++ b/qt/network/gen_qsslconfiguration.cpp @@ -14,12 +14,14 @@ #include "gen_qsslconfiguration.h" #include "_cgo_export.h" -QSslConfiguration* QSslConfiguration_new() { - return new QSslConfiguration(); +void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration) { + QSslConfiguration* ret = new QSslConfiguration(); + *outptr_QSslConfiguration = ret; } -QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other) { - return new QSslConfiguration(*other); +void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration) { + QSslConfiguration* ret = new QSslConfiguration(*other); + *outptr_QSslConfiguration = ret; } void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other) { @@ -406,7 +408,11 @@ bool QSslConfiguration_AddCaCertificates3(QSslConfiguration* self, struct miqt_s return self->addCaCertificates(path_QString, static_cast(format), static_cast(syntax)); } -void QSslConfiguration_Delete(QSslConfiguration* self) { - delete self; +void QSslConfiguration_Delete(QSslConfiguration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslconfiguration.go b/qt/network/gen_qsslconfiguration.go index f08fa0e6..62f10265 100644 --- a/qt/network/gen_qsslconfiguration.go +++ b/qt/network/gen_qsslconfiguration.go @@ -23,7 +23,8 @@ const ( ) type QSslConfiguration struct { - h *C.QSslConfiguration + h *C.QSslConfiguration + isSubclass bool } func (this *QSslConfiguration) cPointer() *C.QSslConfiguration { @@ -40,6 +41,7 @@ func (this *QSslConfiguration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslConfiguration constructs the type using only CGO pointers. func newQSslConfiguration(h *C.QSslConfiguration) *QSslConfiguration { if h == nil { return nil @@ -47,20 +49,33 @@ func newQSslConfiguration(h *C.QSslConfiguration) *QSslConfiguration { return &QSslConfiguration{h: h} } +// UnsafeNewQSslConfiguration constructs the type using only unsafe pointers. func UnsafeNewQSslConfiguration(h unsafe.Pointer) *QSslConfiguration { - return newQSslConfiguration((*C.QSslConfiguration)(h)) + if h == nil { + return nil + } + + return &QSslConfiguration{h: (*C.QSslConfiguration)(h)} } // NewQSslConfiguration constructs a new QSslConfiguration object. func NewQSslConfiguration() *QSslConfiguration { - ret := C.QSslConfiguration_new() - return newQSslConfiguration(ret) + var outptr_QSslConfiguration *C.QSslConfiguration = nil + + C.QSslConfiguration_new(&outptr_QSslConfiguration) + ret := newQSslConfiguration(outptr_QSslConfiguration) + ret.isSubclass = true + return ret } // NewQSslConfiguration2 constructs a new QSslConfiguration object. func NewQSslConfiguration2(other *QSslConfiguration) *QSslConfiguration { - ret := C.QSslConfiguration_new2(other.cPointer()) - return newQSslConfiguration(ret) + var outptr_QSslConfiguration *C.QSslConfiguration = nil + + C.QSslConfiguration_new2(other.cPointer(), &outptr_QSslConfiguration) + ret := newQSslConfiguration(outptr_QSslConfiguration) + ret.isSubclass = true + return ret } func (this *QSslConfiguration) OperatorAssign(other *QSslConfiguration) { @@ -475,7 +490,7 @@ func (this *QSslConfiguration) AddCaCertificates3(path string, format QSsl__Enco // Delete this object from C++ memory. func (this *QSslConfiguration) Delete() { - C.QSslConfiguration_Delete(this.h) + C.QSslConfiguration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslconfiguration.h b/qt/network/gen_qsslconfiguration.h index 5ec14dc2..707a73b9 100644 --- a/qt/network/gen_qsslconfiguration.h +++ b/qt/network/gen_qsslconfiguration.h @@ -34,8 +34,8 @@ typedef struct QSslKey QSslKey; typedef struct QVariant QVariant; #endif -QSslConfiguration* QSslConfiguration_new(); -QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other); +void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration); +void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration); void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other); void QSslConfiguration_Swap(QSslConfiguration* self, QSslConfiguration* other); bool QSslConfiguration_OperatorEqual(const QSslConfiguration* self, QSslConfiguration* other); @@ -95,7 +95,7 @@ struct miqt_string QSslConfiguration_NextNegotiatedProtocol(const QSslConfigurat int QSslConfiguration_NextProtocolNegotiationStatus(const QSslConfiguration* self); bool QSslConfiguration_AddCaCertificates2(QSslConfiguration* self, struct miqt_string path, int format); bool QSslConfiguration_AddCaCertificates3(QSslConfiguration* self, struct miqt_string path, int format, int syntax); -void QSslConfiguration_Delete(QSslConfiguration* self); +void QSslConfiguration_Delete(QSslConfiguration* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qssldiffiehellmanparameters.cpp b/qt/network/gen_qssldiffiehellmanparameters.cpp index fea655af..a6e3761f 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.cpp +++ b/qt/network/gen_qssldiffiehellmanparameters.cpp @@ -8,12 +8,14 @@ #include "gen_qssldiffiehellmanparameters.h" #include "_cgo_export.h" -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new() { - return new QSslDiffieHellmanParameters(); +void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { + QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(); + *outptr_QSslDiffieHellmanParameters = ret; } -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other) { - return new QSslDiffieHellmanParameters(*other); +void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { + QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(*other); + *outptr_QSslDiffieHellmanParameters = ret; } QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters() { @@ -70,7 +72,11 @@ QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_FromEncoded22(QIODevice return new QSslDiffieHellmanParameters(QSslDiffieHellmanParameters::fromEncoded(device, static_cast(format))); } -void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self) { - delete self; +void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qssldiffiehellmanparameters.go b/qt/network/gen_qssldiffiehellmanparameters.go index c51fbe75..dcef3234 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.go +++ b/qt/network/gen_qssldiffiehellmanparameters.go @@ -23,7 +23,8 @@ const ( ) type QSslDiffieHellmanParameters struct { - h *C.QSslDiffieHellmanParameters + h *C.QSslDiffieHellmanParameters + isSubclass bool } func (this *QSslDiffieHellmanParameters) cPointer() *C.QSslDiffieHellmanParameters { @@ -40,6 +41,7 @@ func (this *QSslDiffieHellmanParameters) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslDiffieHellmanParameters constructs the type using only CGO pointers. func newQSslDiffieHellmanParameters(h *C.QSslDiffieHellmanParameters) *QSslDiffieHellmanParameters { if h == nil { return nil @@ -47,20 +49,33 @@ func newQSslDiffieHellmanParameters(h *C.QSslDiffieHellmanParameters) *QSslDiffi return &QSslDiffieHellmanParameters{h: h} } +// UnsafeNewQSslDiffieHellmanParameters constructs the type using only unsafe pointers. func UnsafeNewQSslDiffieHellmanParameters(h unsafe.Pointer) *QSslDiffieHellmanParameters { - return newQSslDiffieHellmanParameters((*C.QSslDiffieHellmanParameters)(h)) + if h == nil { + return nil + } + + return &QSslDiffieHellmanParameters{h: (*C.QSslDiffieHellmanParameters)(h)} } // NewQSslDiffieHellmanParameters constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters() *QSslDiffieHellmanParameters { - ret := C.QSslDiffieHellmanParameters_new() - return newQSslDiffieHellmanParameters(ret) + var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil + + C.QSslDiffieHellmanParameters_new(&outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret.isSubclass = true + return ret } // NewQSslDiffieHellmanParameters2 constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters2(other *QSslDiffieHellmanParameters) *QSslDiffieHellmanParameters { - ret := C.QSslDiffieHellmanParameters_new2(other.cPointer()) - return newQSslDiffieHellmanParameters(ret) + var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil + + C.QSslDiffieHellmanParameters_new2(other.cPointer(), &outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret.isSubclass = true + return ret } func QSslDiffieHellmanParameters_DefaultParameters() *QSslDiffieHellmanParameters { @@ -133,7 +148,7 @@ func QSslDiffieHellmanParameters_FromEncoded22(device *qt.QIODevice, format QSsl // Delete this object from C++ memory. func (this *QSslDiffieHellmanParameters) Delete() { - C.QSslDiffieHellmanParameters_Delete(this.h) + C.QSslDiffieHellmanParameters_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qssldiffiehellmanparameters.h b/qt/network/gen_qssldiffiehellmanparameters.h index fa44be92..42cc2d31 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.h +++ b/qt/network/gen_qssldiffiehellmanparameters.h @@ -24,8 +24,8 @@ typedef struct QIODevice QIODevice; typedef struct QSslDiffieHellmanParameters QSslDiffieHellmanParameters; #endif -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new(); -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other); +void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); +void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters(); void QSslDiffieHellmanParameters_OperatorAssign(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); void QSslDiffieHellmanParameters_Swap(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); @@ -37,7 +37,7 @@ int QSslDiffieHellmanParameters_Error(const QSslDiffieHellmanParameters* self); struct miqt_string QSslDiffieHellmanParameters_ErrorString(const QSslDiffieHellmanParameters* self); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_FromEncoded2(struct miqt_string encoded, int format); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_FromEncoded22(QIODevice* device, int format); -void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self); +void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslellipticcurve.cpp b/qt/network/gen_qsslellipticcurve.cpp index 1c1bd626..ba03eb46 100644 --- a/qt/network/gen_qsslellipticcurve.cpp +++ b/qt/network/gen_qsslellipticcurve.cpp @@ -6,12 +6,14 @@ #include "gen_qsslellipticcurve.h" #include "_cgo_export.h" -QSslEllipticCurve* QSslEllipticCurve_new() { - return new QSslEllipticCurve(); +void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve) { + QSslEllipticCurve* ret = new QSslEllipticCurve(); + *outptr_QSslEllipticCurve = ret; } -QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1) { - return new QSslEllipticCurve(*param1); +void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve) { + QSslEllipticCurve* ret = new QSslEllipticCurve(*param1); + *outptr_QSslEllipticCurve = ret; } QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name) { @@ -54,7 +56,11 @@ bool QSslEllipticCurve_IsTlsNamedCurve(const QSslEllipticCurve* self) { return self->isTlsNamedCurve(); } -void QSslEllipticCurve_Delete(QSslEllipticCurve* self) { - delete self; +void QSslEllipticCurve_Delete(QSslEllipticCurve* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslellipticcurve.go b/qt/network/gen_qsslellipticcurve.go index 939a990e..99e0bdfc 100644 --- a/qt/network/gen_qsslellipticcurve.go +++ b/qt/network/gen_qsslellipticcurve.go @@ -14,7 +14,8 @@ import ( ) type QSslEllipticCurve struct { - h *C.QSslEllipticCurve + h *C.QSslEllipticCurve + isSubclass bool } func (this *QSslEllipticCurve) cPointer() *C.QSslEllipticCurve { @@ -31,6 +32,7 @@ func (this *QSslEllipticCurve) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslEllipticCurve constructs the type using only CGO pointers. func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve { if h == nil { return nil @@ -38,20 +40,33 @@ func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve { return &QSslEllipticCurve{h: h} } +// UnsafeNewQSslEllipticCurve constructs the type using only unsafe pointers. func UnsafeNewQSslEllipticCurve(h unsafe.Pointer) *QSslEllipticCurve { - return newQSslEllipticCurve((*C.QSslEllipticCurve)(h)) + if h == nil { + return nil + } + + return &QSslEllipticCurve{h: (*C.QSslEllipticCurve)(h)} } // NewQSslEllipticCurve constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve() *QSslEllipticCurve { - ret := C.QSslEllipticCurve_new() - return newQSslEllipticCurve(ret) + var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil + + C.QSslEllipticCurve_new(&outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret.isSubclass = true + return ret } // NewQSslEllipticCurve2 constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve2(param1 *QSslEllipticCurve) *QSslEllipticCurve { - ret := C.QSslEllipticCurve_new2(param1.cPointer()) - return newQSslEllipticCurve(ret) + var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil + + C.QSslEllipticCurve_new2(param1.cPointer(), &outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret.isSubclass = true + return ret } func QSslEllipticCurve_FromShortName(name string) *QSslEllipticCurve { @@ -100,7 +115,7 @@ func (this *QSslEllipticCurve) IsTlsNamedCurve() bool { // Delete this object from C++ memory. func (this *QSslEllipticCurve) Delete() { - C.QSslEllipticCurve_Delete(this.h) + C.QSslEllipticCurve_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslellipticcurve.h b/qt/network/gen_qsslellipticcurve.h index 1e872b03..f0e26994 100644 --- a/qt/network/gen_qsslellipticcurve.h +++ b/qt/network/gen_qsslellipticcurve.h @@ -20,15 +20,15 @@ class QSslEllipticCurve; typedef struct QSslEllipticCurve QSslEllipticCurve; #endif -QSslEllipticCurve* QSslEllipticCurve_new(); -QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1); +void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve); +void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve); QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name); QSslEllipticCurve* QSslEllipticCurve_FromLongName(struct miqt_string name); struct miqt_string QSslEllipticCurve_ShortName(const QSslEllipticCurve* self); struct miqt_string QSslEllipticCurve_LongName(const QSslEllipticCurve* self); bool QSslEllipticCurve_IsValid(const QSslEllipticCurve* self); bool QSslEllipticCurve_IsTlsNamedCurve(const QSslEllipticCurve* self); -void QSslEllipticCurve_Delete(QSslEllipticCurve* self); +void QSslEllipticCurve_Delete(QSslEllipticCurve* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslerror.cpp b/qt/network/gen_qsslerror.cpp index 05d531fe..eefa2eff 100644 --- a/qt/network/gen_qsslerror.cpp +++ b/qt/network/gen_qsslerror.cpp @@ -7,20 +7,24 @@ #include "gen_qsslerror.h" #include "_cgo_export.h" -QSslError* QSslError_new() { - return new QSslError(); +void QSslError_new(QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(); + *outptr_QSslError = ret; } -QSslError* QSslError_new2(int error) { - return new QSslError(static_cast(error)); +void QSslError_new2(int error, QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(static_cast(error)); + *outptr_QSslError = ret; } -QSslError* QSslError_new3(int error, QSslCertificate* certificate) { - return new QSslError(static_cast(error), *certificate); +void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(static_cast(error), *certificate); + *outptr_QSslError = ret; } -QSslError* QSslError_new4(QSslError* other) { - return new QSslError(*other); +void QSslError_new4(QSslError* other, QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(*other); + *outptr_QSslError = ret; } void QSslError_Swap(QSslError* self, QSslError* other) { @@ -59,7 +63,11 @@ QSslCertificate* QSslError_Certificate(const QSslError* self) { return new QSslCertificate(self->certificate()); } -void QSslError_Delete(QSslError* self) { - delete self; +void QSslError_Delete(QSslError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslerror.go b/qt/network/gen_qsslerror.go index 69ba5cff..fe237ef2 100644 --- a/qt/network/gen_qsslerror.go +++ b/qt/network/gen_qsslerror.go @@ -57,7 +57,8 @@ const ( ) type QSslError struct { - h *C.QSslError + h *C.QSslError + isSubclass bool } func (this *QSslError) cPointer() *C.QSslError { @@ -74,6 +75,7 @@ func (this *QSslError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslError constructs the type using only CGO pointers. func newQSslError(h *C.QSslError) *QSslError { if h == nil { return nil @@ -81,32 +83,53 @@ func newQSslError(h *C.QSslError) *QSslError { return &QSslError{h: h} } +// UnsafeNewQSslError constructs the type using only unsafe pointers. func UnsafeNewQSslError(h unsafe.Pointer) *QSslError { - return newQSslError((*C.QSslError)(h)) + if h == nil { + return nil + } + + return &QSslError{h: (*C.QSslError)(h)} } // NewQSslError constructs a new QSslError object. func NewQSslError() *QSslError { - ret := C.QSslError_new() - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new(&outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } // NewQSslError2 constructs a new QSslError object. func NewQSslError2(error QSslError__SslError) *QSslError { - ret := C.QSslError_new2((C.int)(error)) - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new2((C.int)(error), &outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } // NewQSslError3 constructs a new QSslError object. func NewQSslError3(error QSslError__SslError, certificate *QSslCertificate) *QSslError { - ret := C.QSslError_new3((C.int)(error), certificate.cPointer()) - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new3((C.int)(error), certificate.cPointer(), &outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } // NewQSslError4 constructs a new QSslError object. func NewQSslError4(other *QSslError) *QSslError { - ret := C.QSslError_new4(other.cPointer()) - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new4(other.cPointer(), &outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } func (this *QSslError) Swap(other *QSslError) { @@ -145,7 +168,7 @@ func (this *QSslError) Certificate() *QSslCertificate { // Delete this object from C++ memory. func (this *QSslError) Delete() { - C.QSslError_Delete(this.h) + C.QSslError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslerror.h b/qt/network/gen_qsslerror.h index a18f1580..b14a30e7 100644 --- a/qt/network/gen_qsslerror.h +++ b/qt/network/gen_qsslerror.h @@ -22,10 +22,10 @@ typedef struct QSslCertificate QSslCertificate; typedef struct QSslError QSslError; #endif -QSslError* QSslError_new(); -QSslError* QSslError_new2(int error); -QSslError* QSslError_new3(int error, QSslCertificate* certificate); -QSslError* QSslError_new4(QSslError* other); +void QSslError_new(QSslError** outptr_QSslError); +void QSslError_new2(int error, QSslError** outptr_QSslError); +void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError); +void QSslError_new4(QSslError* other, QSslError** outptr_QSslError); void QSslError_Swap(QSslError* self, QSslError* other); void QSslError_OperatorAssign(QSslError* self, QSslError* other); bool QSslError_OperatorEqual(const QSslError* self, QSslError* other); @@ -33,7 +33,7 @@ bool QSslError_OperatorNotEqual(const QSslError* self, QSslError* other); int QSslError_Error(const QSslError* self); struct miqt_string QSslError_ErrorString(const QSslError* self); QSslCertificate* QSslError_Certificate(const QSslError* self); -void QSslError_Delete(QSslError* self); +void QSslError_Delete(QSslError* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslkey.cpp b/qt/network/gen_qsslkey.cpp index 0f5bcdca..a68718f6 100644 --- a/qt/network/gen_qsslkey.cpp +++ b/qt/network/gen_qsslkey.cpp @@ -5,58 +5,70 @@ #include "gen_qsslkey.h" #include "_cgo_export.h" -QSslKey* QSslKey_new() { - return new QSslKey(); +void QSslKey_new(QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm) { +void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm)); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new3(QIODevice* device, int algorithm) { - return new QSslKey(device, static_cast(algorithm)); +void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(device, static_cast(algorithm)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new4(void* handle) { - return new QSslKey(handle); +void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(handle); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new5(QSslKey* other) { - return new QSslKey(*other); +void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(*other); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format) { +void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal) { +void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { +void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format) { - return new QSslKey(device, static_cast(algorithm), static_cast(format)); +void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal) { - return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); +void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { +void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new12(void* handle, int typeVal) { - return new QSslKey(handle, static_cast(typeVal)); +void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(handle, static_cast(typeVal)); + *outptr_QSslKey = ret; } void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other) { @@ -140,7 +152,11 @@ struct miqt_string QSslKey_ToDer1(const QSslKey* self, struct miqt_string passPh return _ms; } -void QSslKey_Delete(QSslKey* self) { - delete self; +void QSslKey_Delete(QSslKey* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslkey.go b/qt/network/gen_qsslkey.go index 755f8372..4890eff6 100644 --- a/qt/network/gen_qsslkey.go +++ b/qt/network/gen_qsslkey.go @@ -15,7 +15,8 @@ import ( ) type QSslKey struct { - h *C.QSslKey + h *C.QSslKey + isSubclass bool } func (this *QSslKey) cPointer() *C.QSslKey { @@ -32,6 +33,7 @@ func (this *QSslKey) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslKey constructs the type using only CGO pointers. func newQSslKey(h *C.QSslKey) *QSslKey { if h == nil { return nil @@ -39,14 +41,23 @@ func newQSslKey(h *C.QSslKey) *QSslKey { return &QSslKey{h: h} } +// UnsafeNewQSslKey constructs the type using only unsafe pointers. func UnsafeNewQSslKey(h unsafe.Pointer) *QSslKey { - return newQSslKey((*C.QSslKey)(h)) + if h == nil { + return nil + } + + return &QSslKey{h: (*C.QSslKey)(h)} } // NewQSslKey constructs a new QSslKey object. func NewQSslKey() *QSslKey { - ret := C.QSslKey_new() - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new(&outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey2 constructs a new QSslKey object. @@ -54,26 +65,42 @@ func NewQSslKey2(encoded []byte, algorithm QSsl__KeyAlgorithm) *QSslKey { encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - ret := C.QSslKey_new2(encoded_alias, (C.int)(algorithm)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new2(encoded_alias, (C.int)(algorithm), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey3 constructs a new QSslKey object. func NewQSslKey3(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm) *QSslKey { - ret := C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey4 constructs a new QSslKey object. func NewQSslKey4(handle unsafe.Pointer) *QSslKey { - ret := C.QSslKey_new4(handle) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new4(handle, &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey5 constructs a new QSslKey object. func NewQSslKey5(other *QSslKey) *QSslKey { - ret := C.QSslKey_new5(other.cPointer()) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new5(other.cPointer(), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey6 constructs a new QSslKey object. @@ -81,8 +108,12 @@ func NewQSslKey6(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - ret := C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey7 constructs a new QSslKey object. @@ -90,8 +121,12 @@ func NewQSslKey7(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - ret := C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey8 constructs a new QSslKey object. @@ -102,20 +137,32 @@ func NewQSslKey8(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - ret := C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey9 constructs a new QSslKey object. func NewQSslKey9(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat) *QSslKey { - ret := C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey10 constructs a new QSslKey object. func NewQSslKey10(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat, typeVal QSsl__KeyType) *QSslKey { - ret := C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey11 constructs a new QSslKey object. @@ -123,14 +170,22 @@ func NewQSslKey11(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm, format QSs passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - ret := C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey12 constructs a new QSslKey object. func NewQSslKey12(handle unsafe.Pointer, typeVal QSsl__KeyType) *QSslKey { - ret := C.QSslKey_new12(handle, (C.int)(typeVal)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new12(handle, (C.int)(typeVal), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } func (this *QSslKey) OperatorAssign(other *QSslKey) { @@ -209,7 +264,7 @@ func (this *QSslKey) ToDer1(passPhrase []byte) []byte { // Delete this object from C++ memory. func (this *QSslKey) Delete() { - C.QSslKey_Delete(this.h) + C.QSslKey_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslkey.h b/qt/network/gen_qsslkey.h index e4aa7ec7..a5060efd 100644 --- a/qt/network/gen_qsslkey.h +++ b/qt/network/gen_qsslkey.h @@ -24,18 +24,18 @@ typedef struct QIODevice QIODevice; typedef struct QSslKey QSslKey; #endif -QSslKey* QSslKey_new(); -QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm); -QSslKey* QSslKey_new3(QIODevice* device, int algorithm); -QSslKey* QSslKey_new4(void* handle); -QSslKey* QSslKey_new5(QSslKey* other); -QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format); -QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal); -QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase); -QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format); -QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal); -QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase); -QSslKey* QSslKey_new12(void* handle, int typeVal); +void QSslKey_new(QSslKey** outptr_QSslKey); +void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey); +void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey); +void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey); +void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey); +void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey); +void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); +void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); +void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey); +void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); +void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); +void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey); void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other); void QSslKey_Swap(QSslKey* self, QSslKey* other); bool QSslKey_IsNull(const QSslKey* self); @@ -50,7 +50,7 @@ bool QSslKey_OperatorEqual(const QSslKey* self, QSslKey* key); bool QSslKey_OperatorNotEqual(const QSslKey* self, QSslKey* key); struct miqt_string QSslKey_ToPem1(const QSslKey* self, struct miqt_string passPhrase); struct miqt_string QSslKey_ToDer1(const QSslKey* self, struct miqt_string passPhrase); -void QSslKey_Delete(QSslKey* self); +void QSslKey_Delete(QSslKey* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.cpp b/qt/network/gen_qsslpresharedkeyauthenticator.cpp index 7a60ec68..b54b3773 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.cpp +++ b/qt/network/gen_qsslpresharedkeyauthenticator.cpp @@ -4,12 +4,14 @@ #include "gen_qsslpresharedkeyauthenticator.h" #include "_cgo_export.h" -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new() { - return new QSslPreSharedKeyAuthenticator(); +void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { + QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(); + *outptr_QSslPreSharedKeyAuthenticator = ret; } -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator) { - return new QSslPreSharedKeyAuthenticator(*authenticator); +void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { + QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(*authenticator); + *outptr_QSslPreSharedKeyAuthenticator = ret; } void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator) { @@ -65,7 +67,11 @@ int QSslPreSharedKeyAuthenticator_MaximumPreSharedKeyLength(const QSslPreSharedK return self->maximumPreSharedKeyLength(); } -void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self) { - delete self; +void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.go b/qt/network/gen_qsslpresharedkeyauthenticator.go index 8d263cab..1f542514 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.go +++ b/qt/network/gen_qsslpresharedkeyauthenticator.go @@ -14,7 +14,8 @@ import ( ) type QSslPreSharedKeyAuthenticator struct { - h *C.QSslPreSharedKeyAuthenticator + h *C.QSslPreSharedKeyAuthenticator + isSubclass bool } func (this *QSslPreSharedKeyAuthenticator) cPointer() *C.QSslPreSharedKeyAuthenticator { @@ -31,6 +32,7 @@ func (this *QSslPreSharedKeyAuthenticator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslPreSharedKeyAuthenticator constructs the type using only CGO pointers. func newQSslPreSharedKeyAuthenticator(h *C.QSslPreSharedKeyAuthenticator) *QSslPreSharedKeyAuthenticator { if h == nil { return nil @@ -38,20 +40,33 @@ func newQSslPreSharedKeyAuthenticator(h *C.QSslPreSharedKeyAuthenticator) *QSslP return &QSslPreSharedKeyAuthenticator{h: h} } +// UnsafeNewQSslPreSharedKeyAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQSslPreSharedKeyAuthenticator(h unsafe.Pointer) *QSslPreSharedKeyAuthenticator { - return newQSslPreSharedKeyAuthenticator((*C.QSslPreSharedKeyAuthenticator)(h)) + if h == nil { + return nil + } + + return &QSslPreSharedKeyAuthenticator{h: (*C.QSslPreSharedKeyAuthenticator)(h)} } // NewQSslPreSharedKeyAuthenticator constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator() *QSslPreSharedKeyAuthenticator { - ret := C.QSslPreSharedKeyAuthenticator_new() - return newQSslPreSharedKeyAuthenticator(ret) + var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil + + C.QSslPreSharedKeyAuthenticator_new(&outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret.isSubclass = true + return ret } // NewQSslPreSharedKeyAuthenticator2 constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator2(authenticator *QSslPreSharedKeyAuthenticator) *QSslPreSharedKeyAuthenticator { - ret := C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer()) - return newQSslPreSharedKeyAuthenticator(ret) + var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil + + C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer(), &outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret.isSubclass = true + return ret } func (this *QSslPreSharedKeyAuthenticator) OperatorAssign(authenticator *QSslPreSharedKeyAuthenticator) { @@ -107,7 +122,7 @@ func (this *QSslPreSharedKeyAuthenticator) MaximumPreSharedKeyLength() int { // Delete this object from C++ memory. func (this *QSslPreSharedKeyAuthenticator) Delete() { - C.QSslPreSharedKeyAuthenticator_Delete(this.h) + C.QSslPreSharedKeyAuthenticator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.h b/qt/network/gen_qsslpresharedkeyauthenticator.h index 6d7b2729..789e09b9 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.h +++ b/qt/network/gen_qsslpresharedkeyauthenticator.h @@ -22,8 +22,8 @@ typedef struct QByteArray QByteArray; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; #endif -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new(); -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator); +void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); +void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator); void QSslPreSharedKeyAuthenticator_Swap(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* other); struct miqt_string QSslPreSharedKeyAuthenticator_IdentityHint(const QSslPreSharedKeyAuthenticator* self); @@ -33,7 +33,7 @@ int QSslPreSharedKeyAuthenticator_MaximumIdentityLength(const QSslPreSharedKeyAu void QSslPreSharedKeyAuthenticator_SetPreSharedKey(QSslPreSharedKeyAuthenticator* self, struct miqt_string preSharedKey); struct miqt_string QSslPreSharedKeyAuthenticator_PreSharedKey(const QSslPreSharedKeyAuthenticator* self); int QSslPreSharedKeyAuthenticator_MaximumPreSharedKeyLength(const QSslPreSharedKeyAuthenticator* self); -void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self); +void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qsslsocket.cpp b/qt/network/gen_qsslsocket.cpp index 6f6008b5..95f0e396 100644 --- a/qt/network/gen_qsslsocket.cpp +++ b/qt/network/gen_qsslsocket.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -13,17 +15,484 @@ #include #include #include +#include #include #include #include "gen_qsslsocket.h" #include "_cgo_export.h" -QSslSocket* QSslSocket_new() { - return new QSslSocket(); +class MiqtVirtualQSslSocket : public virtual QSslSocket { +public: + + MiqtVirtualQSslSocket(): QSslSocket() {}; + MiqtVirtualQSslSocket(QObject* parent): QSslSocket(parent) {}; + + virtual ~MiqtVirtualQSslSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QSslSocket::resume(); + return; + } + + + miqt_exec_callback_QSslSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QSslSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODevice::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QSslSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODevice::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QSslSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QSslSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODevice::OpenMode openMode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QSslSocket::connectToHost(hostName, port, openMode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODevice::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QSslSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int openMode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QSslSocket::connectToHost(hostName_QString, static_cast(port), static_cast(openMode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QSslSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QSslSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QSslSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QSslSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QSslSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QSslSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QSslSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSslSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QSslSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QSslSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QSslSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QSslSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QSslSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QSslSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QSslSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QSslSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QSslSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QSslSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QSslSocket::close(); + return; + } + + + miqt_exec_callback_QSslSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QSslSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QSslSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QSslSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QSslSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QSslSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QSslSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QSslSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QSslSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QSslSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QSslSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QSslSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QSslSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QSslSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QSslSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QSslSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QSslSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSslSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QSslSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QSslSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QSslSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QSslSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + +}; + +void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(); + *outptr_QSslSocket = ret; + *outptr_QTcpSocket = static_cast(ret); + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSslSocket* QSslSocket_new2(QObject* parent) { - return new QSslSocket(parent); +void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(parent); + *outptr_QSslSocket = ret; + *outptr_QTcpSocket = static_cast(ret); + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSslSocket_MetaObject(const QSslSocket* self) { @@ -71,13 +540,13 @@ void QSslSocket_ConnectToHostEncrypted2(QSslSocket* self, struct miqt_string hos self->connectToHostEncrypted(hostName_QString, static_cast(port), sslPeerName_QString); } -bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor) { - return self->setSocketDescriptor((qintptr)(socketDescriptor)); +bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode) { + return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); } -void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port) { +void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port)); + self->connectToHost(hostName_QString, static_cast(port), static_cast(openMode), static_cast(protocol)); } void QSslSocket_DisconnectFromHost(QSslSocket* self) { @@ -444,24 +913,24 @@ struct miqt_array /* of QSslCertificate* */ QSslSocket_SystemCaCertificates() { return _out; } -bool QSslSocket_WaitForConnected(QSslSocket* self) { - return self->waitForConnected(); +bool QSslSocket_WaitForConnected(QSslSocket* self, int msecs) { + return self->waitForConnected(static_cast(msecs)); } bool QSslSocket_WaitForEncrypted(QSslSocket* self) { return self->waitForEncrypted(); } -bool QSslSocket_WaitForReadyRead(QSslSocket* self) { - return self->waitForReadyRead(); +bool QSslSocket_WaitForReadyRead(QSslSocket* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } -bool QSslSocket_WaitForBytesWritten(QSslSocket* self) { - return self->waitForBytesWritten(); +bool QSslSocket_WaitForBytesWritten(QSslSocket* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } -bool QSslSocket_WaitForDisconnected(QSslSocket* self) { - return self->waitForDisconnected(); +bool QSslSocket_WaitForDisconnected(QSslSocket* self, int msecs) { + return self->waitForDisconnected(static_cast(msecs)); } struct miqt_array /* of QSslError* */ QSslSocket_SslErrors(const QSslSocket* self) { @@ -551,7 +1020,7 @@ void QSslSocket_Encrypted(QSslSocket* self) { } void QSslSocket_connect_Encrypted(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::encrypted), self, [=]() { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::encrypted), self, [=]() { miqt_exec_callback_QSslSocket_Encrypted(slot); }); } @@ -561,7 +1030,7 @@ void QSslSocket_PeerVerifyError(QSslSocket* self, QSslError* error) { } void QSslSocket_connect_PeerVerifyError(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::peerVerifyError), self, [=](const QSslError& error) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::peerVerifyError), self, [=](const QSslError& error) { const QSslError& error_ret = error; // Cast returned reference into pointer QSslError* sigval1 = const_cast(&error_ret); @@ -580,7 +1049,7 @@ void QSslSocket_SslErrorsWithErrors(QSslSocket* self, struct miqt_array /* of QS } void QSslSocket_connect_SslErrorsWithErrors(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast&)>(&QSslSocket::sslErrors), self, [=](const QList& errors) { + MiqtVirtualQSslSocket::connect(self, static_cast&)>(&QSslSocket::sslErrors), self, [=](const QList& errors) { const QList& errors_ret = errors; // Convert QList<> from C++ memory to manually-managed C memory QSslError** errors_arr = static_cast(malloc(sizeof(QSslError*) * errors_ret.length())); @@ -600,7 +1069,7 @@ void QSslSocket_ModeChanged(QSslSocket* self, int newMode) { } void QSslSocket_connect_ModeChanged(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::modeChanged), self, [=](QSslSocket::SslMode newMode) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::modeChanged), self, [=](QSslSocket::SslMode newMode) { QSslSocket::SslMode newMode_ret = newMode; int sigval1 = static_cast(newMode_ret); miqt_exec_callback_QSslSocket_ModeChanged(slot, sigval1); @@ -612,7 +1081,7 @@ void QSslSocket_EncryptedBytesWritten(QSslSocket* self, long long totalBytes) { } void QSslSocket_connect_EncryptedBytesWritten(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::encryptedBytesWritten), self, [=](qint64 totalBytes) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::encryptedBytesWritten), self, [=](qint64 totalBytes) { qint64 totalBytes_ret = totalBytes; long long sigval1 = static_cast(totalBytes_ret); miqt_exec_callback_QSslSocket_EncryptedBytesWritten(slot, sigval1); @@ -624,7 +1093,7 @@ void QSslSocket_PreSharedKeyAuthenticationRequired(QSslSocket* self, QSslPreShar } void QSslSocket_connect_PreSharedKeyAuthenticationRequired(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::preSharedKeyAuthenticationRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::preSharedKeyAuthenticationRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { QSslPreSharedKeyAuthenticator* sigval1 = authenticator; miqt_exec_callback_QSslSocket_PreSharedKeyAuthenticationRequired(slot, sigval1); }); @@ -635,7 +1104,7 @@ void QSslSocket_NewSessionTicketReceived(QSslSocket* self) { } void QSslSocket_connect_NewSessionTicketReceived(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::newSessionTicketReceived), self, [=]() { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::newSessionTicketReceived), self, [=]() { miqt_exec_callback_QSslSocket_NewSessionTicketReceived(slot); }); } @@ -706,24 +1175,6 @@ void QSslSocket_ConnectToHostEncrypted5(QSslSocket* self, struct miqt_string hos self->connectToHostEncrypted(hostName_QString, static_cast(port), sslPeerName_QString, static_cast(mode), static_cast(protocol)); } -bool QSslSocket_SetSocketDescriptor2(QSslSocket* self, intptr_t socketDescriptor, int state) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state)); -} - -bool QSslSocket_SetSocketDescriptor3(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); -} - -void QSslSocket_ConnectToHost3(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(openMode)); -} - -void QSslSocket_ConnectToHost4(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(openMode), static_cast(protocol)); -} - void QSslSocket_SetLocalCertificate2(QSslSocket* self, struct miqt_string fileName, int format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); self->setLocalCertificate(fileName_QString, static_cast(format)); @@ -765,27 +1216,159 @@ bool QSslSocket_AddDefaultCaCertificates3(struct miqt_string path, int format, i return QSslSocket::addDefaultCaCertificates(path_QString, static_cast(format), static_cast(syntax)); } -bool QSslSocket_WaitForConnected1(QSslSocket* self, int msecs) { - return self->waitForConnected(static_cast(msecs)); -} - bool QSslSocket_WaitForEncrypted1(QSslSocket* self, int msecs) { return self->waitForEncrypted(static_cast(msecs)); } -bool QSslSocket_WaitForReadyRead1(QSslSocket* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); +void QSslSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__Resume = slot; } -bool QSslSocket_WaitForBytesWritten1(QSslSocket* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); +void QSslSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_Resume(); } -bool QSslSocket_WaitForDisconnected1(QSslSocket* self, int msecs) { - return self->waitForDisconnected(static_cast(msecs)); +void QSslSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QSslSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QSslSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__ConnectToHost = slot; +} + +void QSslSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, openMode, protocol); +} + +void QSslSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QSslSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QSslSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QSslSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QSslSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QSslSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QSslSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QSslSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QSslSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QSslSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QSslSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QSslSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QSslSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__Close = slot; +} + +void QSslSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_Close(); +} + +void QSslSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__AtEnd = slot; +} + +bool QSslSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_AtEnd(); +} + +void QSslSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QSslSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QSslSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QSslSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QSslSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QSslSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); } -void QSslSocket_Delete(QSslSocket* self) { - delete self; +void QSslSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QSslSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QSslSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QSslSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QSslSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__ReadData = slot; +} + +long long QSslSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QSslSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WriteData = slot; +} + +long long QSslSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QSslSocket_Delete(QSslSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qsslsocket.go b/qt/network/gen_qsslsocket.go index 0c18f029..09efda8f 100644 --- a/qt/network/gen_qsslsocket.go +++ b/qt/network/gen_qsslsocket.go @@ -33,7 +33,8 @@ const ( ) type QSslSocket struct { - h *C.QSslSocket + h *C.QSslSocket + isSubclass bool *QTcpSocket } @@ -51,27 +52,51 @@ func (this *QSslSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSslSocket(h *C.QSslSocket) *QSslSocket { +// newQSslSocket constructs the type using only CGO pointers. +func newQSslSocket(h *C.QSslSocket, h_QTcpSocket *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QSslSocket { if h == nil { return nil } - return &QSslSocket{h: h, QTcpSocket: UnsafeNewQTcpSocket(unsafe.Pointer(h))} + return &QSslSocket{h: h, + QTcpSocket: newQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject)} } -func UnsafeNewQSslSocket(h unsafe.Pointer) *QSslSocket { - return newQSslSocket((*C.QSslSocket)(h)) +// UnsafeNewQSslSocket constructs the type using only unsafe pointers. +func UnsafeNewQSslSocket(h unsafe.Pointer, h_QTcpSocket unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QSslSocket { + if h == nil { + return nil + } + + return &QSslSocket{h: (*C.QSslSocket)(h), + QTcpSocket: UnsafeNewQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject)} } // NewQSslSocket constructs a new QSslSocket object. func NewQSslSocket() *QSslSocket { - ret := C.QSslSocket_new() - return newQSslSocket(ret) + var outptr_QSslSocket *C.QSslSocket = nil + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QSslSocket_new(&outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSslSocket2 constructs a new QSslSocket object. func NewQSslSocket2(parent *qt.QObject) *QSslSocket { - ret := C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQSslSocket(ret) + var outptr_QSslSocket *C.QSslSocket = nil + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSslSocket) MetaObject() *qt.QMetaObject { @@ -126,16 +151,16 @@ func (this *QSslSocket) ConnectToHostEncrypted2(hostName string, port uint16, ss C.QSslSocket_ConnectToHostEncrypted2(this.h, hostName_ms, (C.uint16_t)(port), sslPeerName_ms) } -func (this *QSslSocket) SetSocketDescriptor(socketDescriptor uintptr) bool { - return (bool)(C.QSslSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor))) +func (this *QSslSocket) SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { + return (bool)(C.QSslSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) } -func (this *QSslSocket) ConnectToHost(hostName string, port uint16) { +func (this *QSslSocket) ConnectToHost(hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { hostName_ms := C.struct_miqt_string{} hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QSslSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port)) + C.QSslSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(openMode), (C.int)(protocol)) } func (this *QSslSocket) DisconnectFromHost() { @@ -526,24 +551,24 @@ func QSslSocket_SystemCaCertificates() []QSslCertificate { return _ret } -func (this *QSslSocket) WaitForConnected() bool { - return (bool)(C.QSslSocket_WaitForConnected(this.h)) +func (this *QSslSocket) WaitForConnected(msecs int) bool { + return (bool)(C.QSslSocket_WaitForConnected(this.h, (C.int)(msecs))) } func (this *QSslSocket) WaitForEncrypted() bool { return (bool)(C.QSslSocket_WaitForEncrypted(this.h)) } -func (this *QSslSocket) WaitForReadyRead() bool { - return (bool)(C.QSslSocket_WaitForReadyRead(this.h)) +func (this *QSslSocket) WaitForReadyRead(msecs int) bool { + return (bool)(C.QSslSocket_WaitForReadyRead(this.h, (C.int)(msecs))) } -func (this *QSslSocket) WaitForBytesWritten() bool { - return (bool)(C.QSslSocket_WaitForBytesWritten(this.h)) +func (this *QSslSocket) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QSslSocket_WaitForBytesWritten(this.h, (C.int)(msecs))) } -func (this *QSslSocket) WaitForDisconnected() bool { - return (bool)(C.QSslSocket_WaitForDisconnected(this.h)) +func (this *QSslSocket) WaitForDisconnected(msecs int) bool { + return (bool)(C.QSslSocket_WaitForDisconnected(this.h, (C.int)(msecs))) } func (this *QSslSocket) SslErrors() []QSslError { @@ -853,30 +878,6 @@ func (this *QSslSocket) ConnectToHostEncrypted5(hostName string, port uint16, ss C.QSslSocket_ConnectToHostEncrypted5(this.h, hostName_ms, (C.uint16_t)(port), sslPeerName_ms, (C.int)(mode), (C.int)(protocol)) } -func (this *QSslSocket) SetSocketDescriptor2(socketDescriptor uintptr, state QAbstractSocket__SocketState) bool { - return (bool)(C.QSslSocket_SetSocketDescriptor2(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state))) -} - -func (this *QSslSocket) SetSocketDescriptor3(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { - return (bool)(C.QSslSocket_SetSocketDescriptor3(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) -} - -func (this *QSslSocket) ConnectToHost3(hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag) { - hostName_ms := C.struct_miqt_string{} - hostName_ms.data = C.CString(hostName) - hostName_ms.len = C.size_t(len(hostName)) - defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QSslSocket_ConnectToHost3(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(openMode)) -} - -func (this *QSslSocket) ConnectToHost4(hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { - hostName_ms := C.struct_miqt_string{} - hostName_ms.data = C.CString(hostName) - hostName_ms.len = C.size_t(len(hostName)) - defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QSslSocket_ConnectToHost4(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(openMode), (C.int)(protocol)) -} - func (this *QSslSocket) SetLocalCertificate2(fileName string, format QSsl__EncodingFormat) { fileName_ms := C.struct_miqt_string{} fileName_ms.data = C.CString(fileName) @@ -944,29 +945,461 @@ func QSslSocket_AddDefaultCaCertificates3(path string, format QSsl__EncodingForm return (bool)(C.QSslSocket_AddDefaultCaCertificates3(path_ms, (C.int)(format), (C.int)(syntax))) } -func (this *QSslSocket) WaitForConnected1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForConnected1(this.h, (C.int)(msecs))) -} - func (this *QSslSocket) WaitForEncrypted1(msecs int) bool { return (bool)(C.QSslSocket_WaitForEncrypted1(this.h, (C.int)(msecs))) } -func (this *QSslSocket) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForReadyRead1(this.h, (C.int)(msecs))) +func (this *QSslSocket) callVirtualBase_Resume() { + + C.QSslSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QSslSocket) OnResume(slot func(super func())) { + C.QSslSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_Resume +func miqt_exec_callback_QSslSocket_Resume(self *C.QSslSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSslSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QSslSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { + + return (bool)(C.QSslSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QSslSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) { + C.QSslSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SetSocketDescriptor +func miqt_exec_callback_QSslSocket_SetSocketDescriptor(self *C.QSslSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt.QIODevice__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + hostName_ms := C.struct_miqt_string{} + hostName_ms.data = C.CString(hostName) + hostName_ms.len = C.size_t(len(hostName)) + defer C.free(unsafe.Pointer(hostName_ms.data)) + + C.QSslSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(openMode), (C.int)(protocol)) + +} +func (this *QSslSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QSslSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_ConnectToHost +func miqt_exec_callback_QSslSocket_ConnectToHost(self *C.QSslSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, openMode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, openMode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt.QIODevice__OpenModeFlag)(openMode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QSslSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QSslSocket) callVirtualBase_DisconnectFromHost() { + + C.QSslSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QSslSocket) OnDisconnectFromHost(slot func(super func())) { + C.QSslSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_DisconnectFromHost +func miqt_exec_callback_QSslSocket_DisconnectFromHost(self *C.QSslSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSslSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QSslSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt.QVariant) { + + C.QSslSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QSslSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) { + C.QSslSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SetSocketOption +func miqt_exec_callback_QSslSocket_SetSocketOption(self *C.QSslSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QSslSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QSslSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt.QVariant { + + _ret := C.QSslSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSslSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) { + C.QSslSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SocketOption +func miqt_exec_callback_QSslSocket_SocketOption(self *C.QSslSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QSslSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QSslSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QSslSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_BytesAvailable +func miqt_exec_callback_QSslSocket_BytesAvailable(self *C.QSslSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QSslSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QSslSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_BytesToWrite +func miqt_exec_callback_QSslSocket_BytesToWrite(self *C.QSslSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QSslSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QSslSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_CanReadLine +func miqt_exec_callback_QSslSocket_CanReadLine(self *C.QSslSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_Close() { + + C.QSslSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QSslSocket) OnClose(slot func(super func())) { + C.QSslSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_Close +func miqt_exec_callback_QSslSocket_Close(self *C.QSslSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSslSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QSslSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QSslSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + } +func (this *QSslSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QSslSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_AtEnd +func miqt_exec_callback_QSslSocket_AtEnd(self *C.QSslSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_AtEnd) -func (this *QSslSocket) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForBytesWritten1(this.h, (C.int)(msecs))) + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QSslSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QSslSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QSslSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SetReadBufferSize +func miqt_exec_callback_QSslSocket_SetReadBufferSize(self *C.QSslSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QSslSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QSslSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForConnected +func miqt_exec_callback_QSslSocket_WaitForConnected(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSslSocket) WaitForDisconnected1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForDisconnected1(this.h, (C.int)(msecs))) +//export miqt_exec_callback_QSslSocket_WaitForReadyRead +func miqt_exec_callback_QSslSocket_WaitForReadyRead(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForBytesWritten +func miqt_exec_callback_QSslSocket_WaitForBytesWritten(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForDisconnected +func miqt_exec_callback_QSslSocket_WaitForDisconnected(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSslSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSslSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSslSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_ReadData +func miqt_exec_callback_QSslSocket_ReadData(self *C.QSslSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSslSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QSslSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QSslSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WriteData +func miqt_exec_callback_QSslSocket_WriteData(self *C.QSslSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + } // Delete this object from C++ memory. func (this *QSslSocket) Delete() { - C.QSslSocket_Delete(this.h) + C.QSslSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qsslsocket.h b/qt/network/gen_qsslsocket.h index c031e219..f3f92545 100644 --- a/qt/network/gen_qsslsocket.h +++ b/qt/network/gen_qsslsocket.h @@ -15,7 +15,9 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; class QByteArray; +class QIODevice; class QMetaObject; class QObject; class QOcspResponse; @@ -26,9 +28,12 @@ class QSslError; class QSslKey; class QSslPreSharedKeyAuthenticator; class QSslSocket; +class QTcpSocket; class QVariant; #else +typedef struct QAbstractSocket QAbstractSocket; typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QOcspResponse QOcspResponse; @@ -39,11 +44,12 @@ typedef struct QSslError QSslError; typedef struct QSslKey QSslKey; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; typedef struct QSslSocket QSslSocket; +typedef struct QTcpSocket QTcpSocket; typedef struct QVariant QVariant; #endif -QSslSocket* QSslSocket_new(); -QSslSocket* QSslSocket_new2(QObject* parent); +void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QSslSocket_MetaObject(const QSslSocket* self); void* QSslSocket_Metacast(QSslSocket* self, const char* param1); struct miqt_string QSslSocket_Tr(const char* s); @@ -51,8 +57,8 @@ struct miqt_string QSslSocket_TrUtf8(const char* s); void QSslSocket_Resume(QSslSocket* self); void QSslSocket_ConnectToHostEncrypted(QSslSocket* self, struct miqt_string hostName, uint16_t port); void QSslSocket_ConnectToHostEncrypted2(QSslSocket* self, struct miqt_string hostName, uint16_t port, struct miqt_string sslPeerName); -bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor); -void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port); +bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode); +void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol); void QSslSocket_DisconnectFromHost(QSslSocket* self); void QSslSocket_SetSocketOption(QSslSocket* self, int option, QVariant* value); QVariant* QSslSocket_SocketOption(QSslSocket* self, int option); @@ -108,11 +114,11 @@ void QSslSocket_AddDefaultCaCertificatesWithCertificates(struct miqt_array /* of void QSslSocket_SetDefaultCaCertificates(struct miqt_array /* of QSslCertificate* */ certificates); struct miqt_array /* of QSslCertificate* */ QSslSocket_DefaultCaCertificates(); struct miqt_array /* of QSslCertificate* */ QSslSocket_SystemCaCertificates(); -bool QSslSocket_WaitForConnected(QSslSocket* self); +bool QSslSocket_WaitForConnected(QSslSocket* self, int msecs); bool QSslSocket_WaitForEncrypted(QSslSocket* self); -bool QSslSocket_WaitForReadyRead(QSslSocket* self); -bool QSslSocket_WaitForBytesWritten(QSslSocket* self); -bool QSslSocket_WaitForDisconnected(QSslSocket* self); +bool QSslSocket_WaitForReadyRead(QSslSocket* self, int msecs); +bool QSslSocket_WaitForBytesWritten(QSslSocket* self, int msecs); +bool QSslSocket_WaitForDisconnected(QSslSocket* self, int msecs); struct miqt_array /* of QSslError* */ QSslSocket_SslErrors(const QSslSocket* self); struct miqt_array /* of QSslError* */ QSslSocket_SslHandshakeErrors(const QSslSocket* self); bool QSslSocket_SupportsSsl(); @@ -138,6 +144,8 @@ void QSslSocket_PreSharedKeyAuthenticationRequired(QSslSocket* self, QSslPreShar void QSslSocket_connect_PreSharedKeyAuthenticationRequired(QSslSocket* self, intptr_t slot); void QSslSocket_NewSessionTicketReceived(QSslSocket* self); void QSslSocket_connect_NewSessionTicketReceived(QSslSocket* self, intptr_t slot); +long long QSslSocket_ReadData(QSslSocket* self, char* data, long long maxlen); +long long QSslSocket_WriteData(QSslSocket* self, const char* data, long long lenVal); struct miqt_string QSslSocket_Tr2(const char* s, const char* c); struct miqt_string QSslSocket_Tr3(const char* s, const char* c, int n); struct miqt_string QSslSocket_TrUtf82(const char* s, const char* c); @@ -146,10 +154,6 @@ void QSslSocket_ConnectToHostEncrypted3(QSslSocket* self, struct miqt_string hos void QSslSocket_ConnectToHostEncrypted4(QSslSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); void QSslSocket_ConnectToHostEncrypted42(QSslSocket* self, struct miqt_string hostName, uint16_t port, struct miqt_string sslPeerName, int mode); void QSslSocket_ConnectToHostEncrypted5(QSslSocket* self, struct miqt_string hostName, uint16_t port, struct miqt_string sslPeerName, int mode, int protocol); -bool QSslSocket_SetSocketDescriptor2(QSslSocket* self, intptr_t socketDescriptor, int state); -bool QSslSocket_SetSocketDescriptor3(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode); -void QSslSocket_ConnectToHost3(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode); -void QSslSocket_ConnectToHost4(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol); void QSslSocket_SetLocalCertificate2(QSslSocket* self, struct miqt_string fileName, int format); void QSslSocket_SetPrivateKey2(QSslSocket* self, struct miqt_string fileName, int algorithm); void QSslSocket_SetPrivateKey3(QSslSocket* self, struct miqt_string fileName, int algorithm, int format); @@ -158,12 +162,44 @@ bool QSslSocket_AddCaCertificates2(QSslSocket* self, struct miqt_string path, in bool QSslSocket_AddCaCertificates3(QSslSocket* self, struct miqt_string path, int format, int syntax); bool QSslSocket_AddDefaultCaCertificates2(struct miqt_string path, int format); bool QSslSocket_AddDefaultCaCertificates3(struct miqt_string path, int format, int syntax); -bool QSslSocket_WaitForConnected1(QSslSocket* self, int msecs); bool QSslSocket_WaitForEncrypted1(QSslSocket* self, int msecs); -bool QSslSocket_WaitForReadyRead1(QSslSocket* self, int msecs); -bool QSslSocket_WaitForBytesWritten1(QSslSocket* self, int msecs); -bool QSslSocket_WaitForDisconnected1(QSslSocket* self, int msecs); -void QSslSocket_Delete(QSslSocket* self); +void QSslSocket_override_virtual_Resume(void* self, intptr_t slot); +void QSslSocket_virtualbase_Resume(void* self); +void QSslSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QSslSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QSslSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QSslSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol); +void QSslSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QSslSocket_virtualbase_DisconnectFromHost(void* self); +void QSslSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QSslSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QSslSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QSslSocket_virtualbase_SocketOption(void* self, int option); +void QSslSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QSslSocket_virtualbase_BytesAvailable(const void* self); +void QSslSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QSslSocket_virtualbase_BytesToWrite(const void* self); +void QSslSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QSslSocket_virtualbase_CanReadLine(const void* self); +void QSslSocket_override_virtual_Close(void* self, intptr_t slot); +void QSslSocket_virtualbase_Close(void* self); +void QSslSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QSslSocket_virtualbase_AtEnd(const void* self); +void QSslSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QSslSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QSslSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QSslSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QSslSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QSslSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QSslSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QSslSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QSslSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QSslSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QSslSocket_Delete(QSslSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qtcpserver.cpp b/qt/network/gen_qtcpserver.cpp index ed5cb7cb..447998ab 100644 --- a/qt/network/gen_qtcpserver.cpp +++ b/qt/network/gen_qtcpserver.cpp @@ -1,4 +1,7 @@ +#include +#include #include +#include #include #include #include @@ -7,16 +10,271 @@ #include #include #include +#include #include #include "gen_qtcpserver.h" #include "_cgo_export.h" -QTcpServer* QTcpServer_new() { - return new QTcpServer(); +class MiqtVirtualQTcpServer : public virtual QTcpServer { +public: + + MiqtVirtualQTcpServer(): QTcpServer() {}; + MiqtVirtualQTcpServer(QObject* parent): QTcpServer(parent) {}; + + virtual ~MiqtVirtualQTcpServer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingConnections = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingConnections() const override { + if (handle__HasPendingConnections == 0) { + return QTcpServer::hasPendingConnections(); + } + + + bool callback_return_value = miqt_exec_callback_QTcpServer_HasPendingConnections(const_cast(this), handle__HasPendingConnections); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasPendingConnections() const { + + return QTcpServer::hasPendingConnections(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextPendingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual QTcpSocket* nextPendingConnection() override { + if (handle__NextPendingConnection == 0) { + return QTcpServer::nextPendingConnection(); + } + + + QTcpSocket* callback_return_value = miqt_exec_callback_QTcpServer_NextPendingConnection(this, handle__NextPendingConnection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTcpSocket* virtualbase_NextPendingConnection() { + + return QTcpServer::nextPendingConnection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IncomingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual void incomingConnection(qintptr handle) override { + if (handle__IncomingConnection == 0) { + QTcpServer::incomingConnection(handle); + return; + } + + qintptr handle_ret = handle; + intptr_t sigval1 = static_cast(handle_ret); + + miqt_exec_callback_QTcpServer_IncomingConnection(this, handle__IncomingConnection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_IncomingConnection(intptr_t handle) { + + QTcpServer::incomingConnection((qintptr)(handle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTcpServer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTcpServer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTcpServer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTcpServer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTcpServer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTcpServer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTcpServer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTcpServer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTcpServer::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTcpServer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTcpServer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTcpServer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTcpServer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTcpServer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTcpServer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTcpServer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTcpServer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTcpServer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTcpServer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTcpServer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTcpServer::disconnectNotify(*signal); + + } + +}; + +void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(); + *outptr_QTcpServer = ret; + *outptr_QObject = static_cast(ret); } -QTcpServer* QTcpServer_new2(QObject* parent) { - return new QTcpServer(parent); +void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(parent); + *outptr_QTcpServer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTcpServer_MetaObject(const QTcpServer* self) { @@ -136,7 +394,7 @@ void QTcpServer_NewConnection(QTcpServer* self) { } void QTcpServer_connect_NewConnection(QTcpServer* self, intptr_t slot) { - QTcpServer::connect(self, static_cast(&QTcpServer::newConnection), self, [=]() { + MiqtVirtualQTcpServer::connect(self, static_cast(&QTcpServer::newConnection), self, [=]() { miqt_exec_callback_QTcpServer_NewConnection(slot); }); } @@ -146,7 +404,7 @@ void QTcpServer_AcceptError(QTcpServer* self, int socketError) { } void QTcpServer_connect_AcceptError(QTcpServer* self, intptr_t slot) { - QTcpServer::connect(self, static_cast(&QTcpServer::acceptError), self, [=](QAbstractSocket::SocketError socketError) { + MiqtVirtualQTcpServer::connect(self, static_cast(&QTcpServer::acceptError), self, [=](QAbstractSocket::SocketError socketError) { QAbstractSocket::SocketError socketError_ret = socketError; int sigval1 = static_cast(socketError_ret); miqt_exec_callback_QTcpServer_AcceptError(slot, sigval1); @@ -213,7 +471,91 @@ bool QTcpServer_WaitForNewConnection2(QTcpServer* self, int msec, bool* timedOut return self->waitForNewConnection(static_cast(msec), timedOut); } -void QTcpServer_Delete(QTcpServer* self) { - delete self; +void QTcpServer_override_virtual_HasPendingConnections(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__HasPendingConnections = slot; +} + +bool QTcpServer_virtualbase_HasPendingConnections(const void* self) { + return ( (const MiqtVirtualQTcpServer*)(self) )->virtualbase_HasPendingConnections(); +} + +void QTcpServer_override_virtual_NextPendingConnection(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__NextPendingConnection = slot; +} + +QTcpSocket* QTcpServer_virtualbase_NextPendingConnection(void* self) { + return ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_NextPendingConnection(); +} + +void QTcpServer_override_virtual_IncomingConnection(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__IncomingConnection = slot; +} + +void QTcpServer_virtualbase_IncomingConnection(void* self, intptr_t handle) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_IncomingConnection(handle); +} + +void QTcpServer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__Event = slot; +} + +bool QTcpServer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_Event(event); +} + +void QTcpServer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__EventFilter = slot; +} + +bool QTcpServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTcpServer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__TimerEvent = slot; +} + +void QTcpServer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_TimerEvent(event); +} + +void QTcpServer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__ChildEvent = slot; +} + +void QTcpServer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_ChildEvent(event); +} + +void QTcpServer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__CustomEvent = slot; +} + +void QTcpServer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_CustomEvent(event); +} + +void QTcpServer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__ConnectNotify = slot; +} + +void QTcpServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTcpServer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__DisconnectNotify = slot; +} + +void QTcpServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTcpServer_Delete(QTcpServer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qtcpserver.go b/qt/network/gen_qtcpserver.go index c9e609cf..b1e2c4b1 100644 --- a/qt/network/gen_qtcpserver.go +++ b/qt/network/gen_qtcpserver.go @@ -16,7 +16,8 @@ import ( ) type QTcpServer struct { - h *C.QTcpServer + h *C.QTcpServer + isSubclass bool *qt.QObject } @@ -34,27 +35,45 @@ func (this *QTcpServer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTcpServer(h *C.QTcpServer) *QTcpServer { +// newQTcpServer constructs the type using only CGO pointers. +func newQTcpServer(h *C.QTcpServer, h_QObject *C.QObject) *QTcpServer { if h == nil { return nil } - return &QTcpServer{h: h, QObject: qt.UnsafeNewQObject(unsafe.Pointer(h))} + return &QTcpServer{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQTcpServer(h unsafe.Pointer) *QTcpServer { - return newQTcpServer((*C.QTcpServer)(h)) +// UnsafeNewQTcpServer constructs the type using only unsafe pointers. +func UnsafeNewQTcpServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTcpServer { + if h == nil { + return nil + } + + return &QTcpServer{h: (*C.QTcpServer)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} } // NewQTcpServer constructs a new QTcpServer object. func NewQTcpServer() *QTcpServer { - ret := C.QTcpServer_new() - return newQTcpServer(ret) + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QTcpServer_new(&outptr_QTcpServer, &outptr_QObject) + ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTcpServer2 constructs a new QTcpServer object. func NewQTcpServer2(parent *qt.QObject) *QTcpServer { - ret := C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer())) - return newQTcpServer(ret) + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpServer, &outptr_QObject) + ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTcpServer) MetaObject() *qt.QMetaObject { @@ -133,7 +152,7 @@ func (this *QTcpServer) HasPendingConnections() bool { } func (this *QTcpServer) NextPendingConnection() *QTcpSocket { - return UnsafeNewQTcpSocket(unsafe.Pointer(C.QTcpServer_NextPendingConnection(this.h))) + return UnsafeNewQTcpSocket(unsafe.Pointer(C.QTcpServer_NextPendingConnection(this.h)), nil, nil, nil) } func (this *QTcpServer) ServerError() QAbstractSocket__SocketError { @@ -263,9 +282,241 @@ func (this *QTcpServer) WaitForNewConnection2(msec int, timedOut *bool) bool { return (bool)(C.QTcpServer_WaitForNewConnection2(this.h, (C.int)(msec), (*C.bool)(unsafe.Pointer(timedOut)))) } +func (this *QTcpServer) callVirtualBase_HasPendingConnections() bool { + + return (bool)(C.QTcpServer_virtualbase_HasPendingConnections(unsafe.Pointer(this.h))) + +} +func (this *QTcpServer) OnHasPendingConnections(slot func(super func() bool) bool) { + C.QTcpServer_override_virtual_HasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_HasPendingConnections +func miqt_exec_callback_QTcpServer_HasPendingConnections(self *C.QTcpServer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_HasPendingConnections) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpServer) callVirtualBase_NextPendingConnection() *QTcpSocket { + + return UnsafeNewQTcpSocket(unsafe.Pointer(C.QTcpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QTcpServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { + C.QTcpServer_override_virtual_NextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_NextPendingConnection +func miqt_exec_callback_QTcpServer_NextPendingConnection(self *C.QTcpServer, cb C.intptr_t) *C.QTcpSocket { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTcpSocket) *QTcpSocket) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_NextPendingConnection) + + return virtualReturn.cPointer() + +} + +func (this *QTcpServer) callVirtualBase_IncomingConnection(handle uintptr) { + + C.QTcpServer_virtualbase_IncomingConnection(unsafe.Pointer(this.h), (C.intptr_t)(handle)) + +} +func (this *QTcpServer) OnIncomingConnection(slot func(super func(handle uintptr), handle uintptr)) { + C.QTcpServer_override_virtual_IncomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_IncomingConnection +func miqt_exec_callback_QTcpServer_IncomingConnection(self *C.QTcpServer, cb C.intptr_t, handle C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(handle uintptr), handle uintptr)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(handle) + + gofunc((&QTcpServer{h: self}).callVirtualBase_IncomingConnection, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QTcpServer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QTcpServer) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QTcpServer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_Event +func miqt_exec_callback_QTcpServer_Event(self *C.QTcpServer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpServer) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QTcpServer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QTcpServer) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QTcpServer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_EventFilter +func miqt_exec_callback_QTcpServer_EventFilter(self *C.QTcpServer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpServer) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QTcpServer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QTcpServer) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QTcpServer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_TimerEvent +func miqt_exec_callback_QTcpServer_TimerEvent(self *C.QTcpServer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTcpServer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QTcpServer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QTcpServer) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QTcpServer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_ChildEvent +func miqt_exec_callback_QTcpServer_ChildEvent(self *C.QTcpServer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTcpServer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QTcpServer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QTcpServer) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QTcpServer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_CustomEvent +func miqt_exec_callback_QTcpServer_CustomEvent(self *C.QTcpServer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTcpServer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QTcpServer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QTcpServer) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QTcpServer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_ConnectNotify +func miqt_exec_callback_QTcpServer_ConnectNotify(self *C.QTcpServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTcpServer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QTcpServer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QTcpServer) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QTcpServer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_DisconnectNotify +func miqt_exec_callback_QTcpServer_DisconnectNotify(self *C.QTcpServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTcpServer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTcpServer) Delete() { - C.QTcpServer_Delete(this.h) + C.QTcpServer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qtcpserver.h b/qt/network/gen_qtcpserver.h index c6b5d6a8..7990b98c 100644 --- a/qt/network/gen_qtcpserver.h +++ b/qt/network/gen_qtcpserver.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QHostAddress; +class QMetaMethod; class QMetaObject; class QNetworkProxy; class QObject; class QTcpServer; class QTcpSocket; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QHostAddress QHostAddress; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkProxy QNetworkProxy; typedef struct QObject QObject; typedef struct QTcpServer QTcpServer; typedef struct QTcpSocket QTcpSocket; +typedef struct QTimerEvent QTimerEvent; #endif -QTcpServer* QTcpServer_new(); -QTcpServer* QTcpServer_new2(QObject* parent); +void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); QMetaObject* QTcpServer_MetaObject(const QTcpServer* self); void* QTcpServer_Metacast(QTcpServer* self, const char* param1); struct miqt_string QTcpServer_Tr(const char* s); @@ -54,6 +62,7 @@ void QTcpServer_PauseAccepting(QTcpServer* self); void QTcpServer_ResumeAccepting(QTcpServer* self); void QTcpServer_SetProxy(QTcpServer* self, QNetworkProxy* networkProxy); QNetworkProxy* QTcpServer_Proxy(const QTcpServer* self); +void QTcpServer_IncomingConnection(QTcpServer* self, intptr_t handle); void QTcpServer_NewConnection(QTcpServer* self); void QTcpServer_connect_NewConnection(QTcpServer* self, intptr_t slot); void QTcpServer_AcceptError(QTcpServer* self, int socketError); @@ -66,7 +75,27 @@ bool QTcpServer_Listen1(QTcpServer* self, QHostAddress* address); bool QTcpServer_Listen2(QTcpServer* self, QHostAddress* address, uint16_t port); bool QTcpServer_WaitForNewConnection1(QTcpServer* self, int msec); bool QTcpServer_WaitForNewConnection2(QTcpServer* self, int msec, bool* timedOut); -void QTcpServer_Delete(QTcpServer* self); +void QTcpServer_override_virtual_HasPendingConnections(void* self, intptr_t slot); +bool QTcpServer_virtualbase_HasPendingConnections(const void* self); +void QTcpServer_override_virtual_NextPendingConnection(void* self, intptr_t slot); +QTcpSocket* QTcpServer_virtualbase_NextPendingConnection(void* self); +void QTcpServer_override_virtual_IncomingConnection(void* self, intptr_t slot); +void QTcpServer_virtualbase_IncomingConnection(void* self, intptr_t handle); +void QTcpServer_override_virtual_Event(void* self, intptr_t slot); +bool QTcpServer_virtualbase_Event(void* self, QEvent* event); +void QTcpServer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTcpServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTcpServer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTcpServer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTcpServer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTcpServer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTcpServer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTcpServer_virtualbase_CustomEvent(void* self, QEvent* event); +void QTcpServer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTcpServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTcpServer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTcpServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTcpServer_Delete(QTcpServer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qtcpsocket.cpp b/qt/network/gen_qtcpsocket.cpp index 04348f68..59956002 100644 --- a/qt/network/gen_qtcpsocket.cpp +++ b/qt/network/gen_qtcpsocket.cpp @@ -1,19 +1,557 @@ +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qtcpsocket.h" #include "_cgo_export.h" -QTcpSocket* QTcpSocket_new() { - return new QTcpSocket(); +class MiqtVirtualQTcpSocket : public virtual QTcpSocket { +public: + + MiqtVirtualQTcpSocket(): QTcpSocket() {}; + MiqtVirtualQTcpSocket(QObject* parent): QTcpSocket(parent) {}; + + virtual ~MiqtVirtualQTcpSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QTcpSocket::resume(); + return; + } + + + miqt_exec_callback_QTcpSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QTcpSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QTcpSocket::connectToHost(hostName, port, mode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODevice::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QTcpSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QTcpSocket::connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QTcpSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QTcpSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QTcpSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QTcpSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QTcpSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QTcpSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QTcpSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QTcpSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QTcpSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QTcpSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QTcpSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QTcpSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QTcpSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QTcpSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QTcpSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual qintptr socketDescriptor() const override { + if (handle__SocketDescriptor == 0) { + return QTcpSocket::socketDescriptor(); + } + + + intptr_t callback_return_value = miqt_exec_callback_QTcpSocket_SocketDescriptor(const_cast(this), handle__SocketDescriptor); + + return (qintptr)(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_SocketDescriptor() const { + + qintptr _ret = QTcpSocket::socketDescriptor(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODevice::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QTcpSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODevice::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QTcpSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QTcpSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QTcpSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QTcpSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QTcpSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QTcpSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTcpSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QTcpSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QTcpSocket::close(); + return; + } + + + miqt_exec_callback_QTcpSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QTcpSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QTcpSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QTcpSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QTcpSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QTcpSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QTcpSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QTcpSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QTcpSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QTcpSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QTcpSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QTcpSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QTcpSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QTcpSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QTcpSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QTcpSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QTcpSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QTcpSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QTcpSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QTcpSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QTcpSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QTcpSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + +}; + +void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(); + *outptr_QTcpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTcpSocket* QTcpSocket_new2(QObject* parent) { - return new QTcpSocket(parent); +void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(parent); + *outptr_QTcpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self) { @@ -90,7 +628,179 @@ struct miqt_string QTcpSocket_TrUtf83(const char* s, const char* c, int n) { return _ms; } -void QTcpSocket_Delete(QTcpSocket* self) { - delete self; +void QTcpSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__Resume = slot; +} + +void QTcpSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_Resume(); +} + +void QTcpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__ConnectToHost = slot; +} + +void QTcpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, mode, protocol); +} + +void QTcpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QTcpSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QTcpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QTcpSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QTcpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QTcpSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QTcpSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QTcpSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QTcpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QTcpSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QTcpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SocketDescriptor = slot; +} + +intptr_t QTcpSocket_virtualbase_SocketDescriptor(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_SocketDescriptor(); +} + +void QTcpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QTcpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QTcpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QTcpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QTcpSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QTcpSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QTcpSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__Close = slot; +} + +void QTcpSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_Close(); +} + +void QTcpSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__IsSequential = slot; +} + +bool QTcpSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_IsSequential(); +} + +void QTcpSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__AtEnd = slot; +} + +bool QTcpSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_AtEnd(); +} + +void QTcpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QTcpSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QTcpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QTcpSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QTcpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QTcpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QTcpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QTcpSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QTcpSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__ReadData = slot; +} + +long long QTcpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QTcpSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QTcpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QTcpSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WriteData = slot; +} + +long long QTcpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QTcpSocket_Delete(QTcpSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qtcpsocket.go b/qt/network/gen_qtcpsocket.go index 05df0277..014e9127 100644 --- a/qt/network/gen_qtcpsocket.go +++ b/qt/network/gen_qtcpsocket.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QTcpSocket struct { - h *C.QTcpSocket + h *C.QTcpSocket + isSubclass bool *QAbstractSocket } @@ -33,27 +35,49 @@ func (this *QTcpSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTcpSocket(h *C.QTcpSocket) *QTcpSocket { +// newQTcpSocket constructs the type using only CGO pointers. +func newQTcpSocket(h *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QTcpSocket { if h == nil { return nil } - return &QTcpSocket{h: h, QAbstractSocket: UnsafeNewQAbstractSocket(unsafe.Pointer(h))} + return &QTcpSocket{h: h, + QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} } -func UnsafeNewQTcpSocket(h unsafe.Pointer) *QTcpSocket { - return newQTcpSocket((*C.QTcpSocket)(h)) +// UnsafeNewQTcpSocket constructs the type using only unsafe pointers. +func UnsafeNewQTcpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QTcpSocket { + if h == nil { + return nil + } + + return &QTcpSocket{h: (*C.QTcpSocket)(h), + QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} } // NewQTcpSocket constructs a new QTcpSocket object. func NewQTcpSocket() *QTcpSocket { - ret := C.QTcpSocket_new() - return newQTcpSocket(ret) + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QTcpSocket_new(&outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTcpSocket2 constructs a new QTcpSocket object. func NewQTcpSocket2(parent *qt.QObject) *QTcpSocket { - ret := C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQTcpSocket(ret) + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTcpSocket) MetaObject() *qt.QMetaObject { @@ -128,9 +152,531 @@ func QTcpSocket_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QTcpSocket) callVirtualBase_Resume() { + + C.QTcpSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QTcpSocket) OnResume(slot func(super func())) { + C.QTcpSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_Resume +func miqt_exec_callback_QTcpSocket_Resume(self *C.QTcpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTcpSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QTcpSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + hostName_ms := C.struct_miqt_string{} + hostName_ms.data = C.CString(hostName) + hostName_ms.len = C.size_t(len(hostName)) + defer C.free(unsafe.Pointer(hostName_ms.data)) + + C.QTcpSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + +} +func (this *QTcpSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QTcpSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_ConnectToHost +func miqt_exec_callback_QTcpSocket_ConnectToHost(self *C.QTcpSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, mode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt.QIODevice__OpenModeFlag)(mode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QTcpSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QTcpSocket) callVirtualBase_DisconnectFromHost() { + + C.QTcpSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QTcpSocket) OnDisconnectFromHost(slot func(super func())) { + C.QTcpSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_DisconnectFromHost +func miqt_exec_callback_QTcpSocket_DisconnectFromHost(self *C.QTcpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTcpSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QTcpSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QTcpSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QTcpSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_BytesAvailable +func miqt_exec_callback_QTcpSocket_BytesAvailable(self *C.QTcpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QTcpSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QTcpSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_BytesToWrite +func miqt_exec_callback_QTcpSocket_BytesToWrite(self *C.QTcpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QTcpSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QTcpSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_CanReadLine +func miqt_exec_callback_QTcpSocket_CanReadLine(self *C.QTcpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QTcpSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QTcpSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QTcpSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SetReadBufferSize +func miqt_exec_callback_QTcpSocket_SetReadBufferSize(self *C.QTcpSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QTcpSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QTcpSocket) callVirtualBase_SocketDescriptor() uintptr { + + return (uintptr)(C.QTcpSocket_virtualbase_SocketDescriptor(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnSocketDescriptor(slot func(super func() uintptr) uintptr) { + C.QTcpSocket_override_virtual_SocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SocketDescriptor +func miqt_exec_callback_QTcpSocket_SocketDescriptor(self *C.QTcpSocket, cb C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SocketDescriptor) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { + + return (bool)(C.QTcpSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QTcpSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) { + C.QTcpSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SetSocketDescriptor +func miqt_exec_callback_QTcpSocket_SetSocketDescriptor(self *C.QTcpSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt.QIODevice__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt.QVariant) { + + C.QTcpSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QTcpSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) { + C.QTcpSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SetSocketOption +func miqt_exec_callback_QTcpSocket_SetSocketOption(self *C.QTcpSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QTcpSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QTcpSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt.QVariant { + + _ret := C.QTcpSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTcpSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) { + C.QTcpSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SocketOption +func miqt_exec_callback_QTcpSocket_SocketOption(self *C.QTcpSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QTcpSocket) callVirtualBase_Close() { + + C.QTcpSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QTcpSocket) OnClose(slot func(super func())) { + C.QTcpSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_Close +func miqt_exec_callback_QTcpSocket_Close(self *C.QTcpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTcpSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QTcpSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QTcpSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QTcpSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_IsSequential +func miqt_exec_callback_QTcpSocket_IsSequential(self *C.QTcpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QTcpSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QTcpSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_AtEnd +func miqt_exec_callback_QTcpSocket_AtEnd(self *C.QTcpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForConnected +func miqt_exec_callback_QTcpSocket_WaitForConnected(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForReadyRead +func miqt_exec_callback_QTcpSocket_WaitForReadyRead(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForBytesWritten +func miqt_exec_callback_QTcpSocket_WaitForBytesWritten(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForDisconnected +func miqt_exec_callback_QTcpSocket_WaitForDisconnected(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QTcpSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QTcpSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QTcpSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_ReadData +func miqt_exec_callback_QTcpSocket_ReadData(self *C.QTcpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QTcpSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QTcpSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QTcpSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_ReadLineData +func miqt_exec_callback_QTcpSocket_ReadLineData(self *C.QTcpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QTcpSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QTcpSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QTcpSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WriteData +func miqt_exec_callback_QTcpSocket_WriteData(self *C.QTcpSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTcpSocket) Delete() { - C.QTcpSocket_Delete(this.h) + C.QTcpSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qtcpsocket.h b/qt/network/gen_qtcpsocket.h index 273f76b6..d900b147 100644 --- a/qt/network/gen_qtcpsocket.h +++ b/qt/network/gen_qtcpsocket.h @@ -15,17 +15,23 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; +class QIODevice; class QMetaObject; class QObject; class QTcpSocket; +class QVariant; #else +typedef struct QAbstractSocket QAbstractSocket; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTcpSocket QTcpSocket; +typedef struct QVariant QVariant; #endif -QTcpSocket* QTcpSocket_new(); -QTcpSocket* QTcpSocket_new2(QObject* parent); +void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self); void* QTcpSocket_Metacast(QTcpSocket* self, const char* param1); struct miqt_string QTcpSocket_Tr(const char* s); @@ -34,7 +40,49 @@ struct miqt_string QTcpSocket_Tr2(const char* s, const char* c); struct miqt_string QTcpSocket_Tr3(const char* s, const char* c, int n); struct miqt_string QTcpSocket_TrUtf82(const char* s, const char* c); struct miqt_string QTcpSocket_TrUtf83(const char* s, const char* c, int n); -void QTcpSocket_Delete(QTcpSocket* self); +void QTcpSocket_override_virtual_Resume(void* self, intptr_t slot); +void QTcpSocket_virtualbase_Resume(void* self); +void QTcpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QTcpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QTcpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QTcpSocket_virtualbase_DisconnectFromHost(void* self); +void QTcpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_BytesAvailable(const void* self); +void QTcpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_BytesToWrite(const void* self); +void QTcpSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_CanReadLine(const void* self); +void QTcpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QTcpSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QTcpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot); +intptr_t QTcpSocket_virtualbase_SocketDescriptor(const void* self); +void QTcpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QTcpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QTcpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QTcpSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QTcpSocket_virtualbase_SocketOption(void* self, int option); +void QTcpSocket_override_virtual_Close(void* self, intptr_t slot); +void QTcpSocket_virtualbase_Close(void* self); +void QTcpSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_IsSequential(const void* self); +void QTcpSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_AtEnd(const void* self); +void QTcpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QTcpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QTcpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QTcpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QTcpSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QTcpSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QTcpSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QTcpSocket_Delete(QTcpSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/network/gen_qudpsocket.cpp b/qt/network/gen_qudpsocket.cpp index 18cf374d..6879d761 100644 --- a/qt/network/gen_qudpsocket.cpp +++ b/qt/network/gen_qudpsocket.cpp @@ -1,5 +1,7 @@ +#include #include #include +#include #include #include #include @@ -8,16 +10,552 @@ #include #include #include +#include #include #include "gen_qudpsocket.h" #include "_cgo_export.h" -QUdpSocket* QUdpSocket_new() { - return new QUdpSocket(); +class MiqtVirtualQUdpSocket : public virtual QUdpSocket { +public: + + MiqtVirtualQUdpSocket(): QUdpSocket() {}; + MiqtVirtualQUdpSocket(QObject* parent): QUdpSocket(parent) {}; + + virtual ~MiqtVirtualQUdpSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QUdpSocket::resume(); + return; + } + + + miqt_exec_callback_QUdpSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QUdpSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QUdpSocket::connectToHost(hostName, port, mode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODevice::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QUdpSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QUdpSocket::connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QUdpSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QUdpSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QUdpSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QUdpSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QUdpSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QUdpSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QUdpSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QUdpSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QUdpSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QUdpSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QUdpSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QUdpSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QUdpSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QUdpSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QUdpSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual qintptr socketDescriptor() const override { + if (handle__SocketDescriptor == 0) { + return QUdpSocket::socketDescriptor(); + } + + + intptr_t callback_return_value = miqt_exec_callback_QUdpSocket_SocketDescriptor(const_cast(this), handle__SocketDescriptor); + + return (qintptr)(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_SocketDescriptor() const { + + qintptr _ret = QUdpSocket::socketDescriptor(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODevice::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QUdpSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODevice::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QUdpSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QUdpSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QUdpSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QUdpSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QUdpSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QUdpSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QUdpSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QUdpSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QUdpSocket::close(); + return; + } + + + miqt_exec_callback_QUdpSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QUdpSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QUdpSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QUdpSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QUdpSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QUdpSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QUdpSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QUdpSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QUdpSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QUdpSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QUdpSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QUdpSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QUdpSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QUdpSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QUdpSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QUdpSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QUdpSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QUdpSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QUdpSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QUdpSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QUdpSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QUdpSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + +}; + +void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(); + *outptr_QUdpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QUdpSocket* QUdpSocket_new2(QObject* parent) { - return new QUdpSocket(parent); +void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(parent); + *outptr_QUdpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self) { @@ -166,7 +704,179 @@ long long QUdpSocket_ReadDatagram4(QUdpSocket* self, char* data, long long maxle return static_cast(_ret); } -void QUdpSocket_Delete(QUdpSocket* self) { - delete self; +void QUdpSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__Resume = slot; +} + +void QUdpSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_Resume(); +} + +void QUdpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__ConnectToHost = slot; +} + +void QUdpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, mode, protocol); +} + +void QUdpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QUdpSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QUdpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QUdpSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QUdpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QUdpSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QUdpSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QUdpSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QUdpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QUdpSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QUdpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SocketDescriptor = slot; +} + +intptr_t QUdpSocket_virtualbase_SocketDescriptor(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_SocketDescriptor(); +} + +void QUdpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QUdpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QUdpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QUdpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QUdpSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QUdpSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QUdpSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__Close = slot; +} + +void QUdpSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_Close(); +} + +void QUdpSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__IsSequential = slot; +} + +bool QUdpSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_IsSequential(); +} + +void QUdpSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__AtEnd = slot; +} + +bool QUdpSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_AtEnd(); +} + +void QUdpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QUdpSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QUdpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QUdpSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QUdpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QUdpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QUdpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QUdpSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QUdpSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__ReadData = slot; +} + +long long QUdpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QUdpSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QUdpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QUdpSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WriteData = slot; +} + +long long QUdpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QUdpSocket_Delete(QUdpSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/network/gen_qudpsocket.go b/qt/network/gen_qudpsocket.go index ceb8a663..50c455f7 100644 --- a/qt/network/gen_qudpsocket.go +++ b/qt/network/gen_qudpsocket.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QUdpSocket struct { - h *C.QUdpSocket + h *C.QUdpSocket + isSubclass bool *QAbstractSocket } @@ -33,27 +35,49 @@ func (this *QUdpSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUdpSocket(h *C.QUdpSocket) *QUdpSocket { +// newQUdpSocket constructs the type using only CGO pointers. +func newQUdpSocket(h *C.QUdpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QUdpSocket { if h == nil { return nil } - return &QUdpSocket{h: h, QAbstractSocket: UnsafeNewQAbstractSocket(unsafe.Pointer(h))} + return &QUdpSocket{h: h, + QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} } -func UnsafeNewQUdpSocket(h unsafe.Pointer) *QUdpSocket { - return newQUdpSocket((*C.QUdpSocket)(h)) +// UnsafeNewQUdpSocket constructs the type using only unsafe pointers. +func UnsafeNewQUdpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QUdpSocket { + if h == nil { + return nil + } + + return &QUdpSocket{h: (*C.QUdpSocket)(h), + QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} } // NewQUdpSocket constructs a new QUdpSocket object. func NewQUdpSocket() *QUdpSocket { - ret := C.QUdpSocket_new() - return newQUdpSocket(ret) + var outptr_QUdpSocket *C.QUdpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QUdpSocket_new(&outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQUdpSocket2 constructs a new QUdpSocket object. func NewQUdpSocket2(parent *qt.QObject) *QUdpSocket { - ret := C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQUdpSocket(ret) + var outptr_QUdpSocket *C.QUdpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) + ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QUdpSocket) MetaObject() *qt.QMetaObject { @@ -212,9 +236,531 @@ func (this *QUdpSocket) ReadDatagram4(data string, maxlen int64, host *QHostAddr return (int64)(C.QUdpSocket_ReadDatagram4(this.h, data_Cstring, (C.longlong)(maxlen), host.cPointer(), (*C.uint16_t)(unsafe.Pointer(port)))) } +func (this *QUdpSocket) callVirtualBase_Resume() { + + C.QUdpSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QUdpSocket) OnResume(slot func(super func())) { + C.QUdpSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_Resume +func miqt_exec_callback_QUdpSocket_Resume(self *C.QUdpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUdpSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QUdpSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + hostName_ms := C.struct_miqt_string{} + hostName_ms.data = C.CString(hostName) + hostName_ms.len = C.size_t(len(hostName)) + defer C.free(unsafe.Pointer(hostName_ms.data)) + + C.QUdpSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + +} +func (this *QUdpSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QUdpSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_ConnectToHost +func miqt_exec_callback_QUdpSocket_ConnectToHost(self *C.QUdpSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, mode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt.QIODevice__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt.QIODevice__OpenModeFlag)(mode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QUdpSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QUdpSocket) callVirtualBase_DisconnectFromHost() { + + C.QUdpSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QUdpSocket) OnDisconnectFromHost(slot func(super func())) { + C.QUdpSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_DisconnectFromHost +func miqt_exec_callback_QUdpSocket_DisconnectFromHost(self *C.QUdpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUdpSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QUdpSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QUdpSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QUdpSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_BytesAvailable +func miqt_exec_callback_QUdpSocket_BytesAvailable(self *C.QUdpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QUdpSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QUdpSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_BytesToWrite +func miqt_exec_callback_QUdpSocket_BytesToWrite(self *C.QUdpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QUdpSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QUdpSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_CanReadLine +func miqt_exec_callback_QUdpSocket_CanReadLine(self *C.QUdpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QUdpSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QUdpSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QUdpSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SetReadBufferSize +func miqt_exec_callback_QUdpSocket_SetReadBufferSize(self *C.QUdpSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QUdpSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QUdpSocket) callVirtualBase_SocketDescriptor() uintptr { + + return (uintptr)(C.QUdpSocket_virtualbase_SocketDescriptor(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnSocketDescriptor(slot func(super func() uintptr) uintptr) { + C.QUdpSocket_override_virtual_SocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SocketDescriptor +func miqt_exec_callback_QUdpSocket_SocketDescriptor(self *C.QUdpSocket, cb C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SocketDescriptor) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool { + + return (bool)(C.QUdpSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QUdpSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) { + C.QUdpSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SetSocketDescriptor +func miqt_exec_callback_QUdpSocket_SetSocketDescriptor(self *C.QUdpSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt.QIODevice__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt.QIODevice__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt.QVariant) { + + C.QUdpSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QUdpSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) { + C.QUdpSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SetSocketOption +func miqt_exec_callback_QUdpSocket_SetSocketOption(self *C.QUdpSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt.QVariant), option QAbstractSocket__SocketOption, value *qt.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QUdpSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QUdpSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt.QVariant { + + _ret := C.QUdpSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUdpSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) { + C.QUdpSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SocketOption +func miqt_exec_callback_QUdpSocket_SocketOption(self *C.QUdpSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt.QVariant, option QAbstractSocket__SocketOption) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QUdpSocket) callVirtualBase_Close() { + + C.QUdpSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QUdpSocket) OnClose(slot func(super func())) { + C.QUdpSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_Close +func miqt_exec_callback_QUdpSocket_Close(self *C.QUdpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUdpSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QUdpSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QUdpSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QUdpSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_IsSequential +func miqt_exec_callback_QUdpSocket_IsSequential(self *C.QUdpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QUdpSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QUdpSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_AtEnd +func miqt_exec_callback_QUdpSocket_AtEnd(self *C.QUdpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForConnected +func miqt_exec_callback_QUdpSocket_WaitForConnected(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForReadyRead +func miqt_exec_callback_QUdpSocket_WaitForReadyRead(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForBytesWritten +func miqt_exec_callback_QUdpSocket_WaitForBytesWritten(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForDisconnected +func miqt_exec_callback_QUdpSocket_WaitForDisconnected(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QUdpSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QUdpSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QUdpSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_ReadData +func miqt_exec_callback_QUdpSocket_ReadData(self *C.QUdpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QUdpSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QUdpSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QUdpSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_ReadLineData +func miqt_exec_callback_QUdpSocket_ReadLineData(self *C.QUdpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QUdpSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QUdpSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QUdpSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WriteData +func miqt_exec_callback_QUdpSocket_WriteData(self *C.QUdpSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QUdpSocket) Delete() { - C.QUdpSocket_Delete(this.h) + C.QUdpSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/network/gen_qudpsocket.h b/qt/network/gen_qudpsocket.h index 0399a7d3..ba407722 100644 --- a/qt/network/gen_qudpsocket.h +++ b/qt/network/gen_qudpsocket.h @@ -15,25 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; class QByteArray; class QHostAddress; +class QIODevice; class QMetaObject; class QNetworkDatagram; class QNetworkInterface; class QObject; class QUdpSocket; +class QVariant; #else +typedef struct QAbstractSocket QAbstractSocket; typedef struct QByteArray QByteArray; typedef struct QHostAddress QHostAddress; +typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkDatagram QNetworkDatagram; typedef struct QNetworkInterface QNetworkInterface; typedef struct QObject QObject; typedef struct QUdpSocket QUdpSocket; +typedef struct QVariant QVariant; #endif -QUdpSocket* QUdpSocket_new(); -QUdpSocket* QUdpSocket_new2(QObject* parent); +void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self); void* QUdpSocket_Metacast(QUdpSocket* self, const char* param1); struct miqt_string QUdpSocket_Tr(const char* s); @@ -58,7 +64,49 @@ struct miqt_string QUdpSocket_TrUtf83(const char* s, const char* c, int n); QNetworkDatagram* QUdpSocket_ReceiveDatagram1(QUdpSocket* self, long long maxSize); long long QUdpSocket_ReadDatagram3(QUdpSocket* self, char* data, long long maxlen, QHostAddress* host); long long QUdpSocket_ReadDatagram4(QUdpSocket* self, char* data, long long maxlen, QHostAddress* host, uint16_t* port); -void QUdpSocket_Delete(QUdpSocket* self); +void QUdpSocket_override_virtual_Resume(void* self, intptr_t slot); +void QUdpSocket_virtualbase_Resume(void* self); +void QUdpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QUdpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QUdpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QUdpSocket_virtualbase_DisconnectFromHost(void* self); +void QUdpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_BytesAvailable(const void* self); +void QUdpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_BytesToWrite(const void* self); +void QUdpSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_CanReadLine(const void* self); +void QUdpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QUdpSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QUdpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot); +intptr_t QUdpSocket_virtualbase_SocketDescriptor(const void* self); +void QUdpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QUdpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QUdpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QUdpSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QUdpSocket_virtualbase_SocketOption(void* self, int option); +void QUdpSocket_override_virtual_Close(void* self, intptr_t slot); +void QUdpSocket_virtualbase_Close(void* self); +void QUdpSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_IsSequential(const void* self); +void QUdpSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_AtEnd(const void* self); +void QUdpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QUdpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QUdpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QUdpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QUdpSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QUdpSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QUdpSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QUdpSocket_Delete(QUdpSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qabstractprintdialog.cpp b/qt/printsupport/gen_qabstractprintdialog.cpp index 5be06d65..fa17df9f 100644 --- a/qt/printsupport/gen_qabstractprintdialog.cpp +++ b/qt/printsupport/gen_qabstractprintdialog.cpp @@ -1,7 +1,17 @@ #include +#include +#include +#include +#include +#include #include #include +#include +#include #include +#include +#include +#include #include #include #include @@ -10,12 +20,359 @@ #include "gen_qabstractprintdialog.h" #include "_cgo_export.h" -QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer) { - return new QAbstractPrintDialog(printer); +class MiqtVirtualQAbstractPrintDialog : public virtual QAbstractPrintDialog { +public: + + MiqtVirtualQAbstractPrintDialog(QPrinter* printer): QAbstractPrintDialog(printer) {}; + MiqtVirtualQAbstractPrintDialog(QPrinter* printer, QWidget* parent): QAbstractPrintDialog(printer, parent) {}; + + virtual ~MiqtVirtualQAbstractPrintDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QAbstractPrintDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractPrintDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractPrintDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractPrintDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractPrintDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractPrintDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractPrintDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractPrintDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractPrintDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QAbstractPrintDialog::open(); + return; + } + + + miqt_exec_callback_QAbstractPrintDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QAbstractPrintDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QAbstractPrintDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractPrintDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QAbstractPrintDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QAbstractPrintDialog::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QAbstractPrintDialog::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QAbstractPrintDialog::accept(); + return; + } + + + miqt_exec_callback_QAbstractPrintDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QAbstractPrintDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QAbstractPrintDialog::reject(); + return; + } + + + miqt_exec_callback_QAbstractPrintDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QAbstractPrintDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QAbstractPrintDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QAbstractPrintDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QAbstractPrintDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QAbstractPrintDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QAbstractPrintDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QAbstractPrintDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QAbstractPrintDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QAbstractPrintDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QAbstractPrintDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QAbstractPrintDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QAbstractPrintDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QAbstractPrintDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QAbstractPrintDialog::eventFilter(param1, param2); + + } + +}; + +void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer); + *outptr_QAbstractPrintDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent) { - return new QAbstractPrintDialog(printer, parent); +void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer, parent); + *outptr_QAbstractPrintDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self) { @@ -156,7 +513,123 @@ struct miqt_string QAbstractPrintDialog_TrUtf83(const char* s, const char* c, in return _ms; } -void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self) { - delete self; +void QAbstractPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__SetVisible = slot; +} + +void QAbstractPrintDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractPrintDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractPrintDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractPrintDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractPrintDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractPrintDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Open = slot; +} + +void QAbstractPrintDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Open(); +} + +void QAbstractPrintDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Exec = slot; +} + +int QAbstractPrintDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Exec(); +} + +void QAbstractPrintDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Done = slot; +} + +void QAbstractPrintDialog_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Done(param1); +} + +void QAbstractPrintDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Accept = slot; +} + +void QAbstractPrintDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Accept(); +} + +void QAbstractPrintDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Reject = slot; +} + +void QAbstractPrintDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Reject(); +} + +void QAbstractPrintDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractPrintDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qabstractprintdialog.go b/qt/printsupport/gen_qabstractprintdialog.go index fb0f3d05..c2fb45f4 100644 --- a/qt/printsupport/gen_qabstractprintdialog.go +++ b/qt/printsupport/gen_qabstractprintdialog.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -37,7 +38,8 @@ const ( ) type QAbstractPrintDialog struct { - h *C.QAbstractPrintDialog + h *C.QAbstractPrintDialog + isSubclass bool *qt.QDialog } @@ -55,27 +57,51 @@ func (this *QAbstractPrintDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractPrintDialog(h *C.QAbstractPrintDialog) *QAbstractPrintDialog { +// newQAbstractPrintDialog constructs the type using only CGO pointers. +func newQAbstractPrintDialog(h *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractPrintDialog { if h == nil { return nil } - return &QAbstractPrintDialog{h: h, QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h))} + return &QAbstractPrintDialog{h: h, + QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer) *QAbstractPrintDialog { - return newQAbstractPrintDialog((*C.QAbstractPrintDialog)(h)) +// UnsafeNewQAbstractPrintDialog constructs the type using only unsafe pointers. +func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractPrintDialog { + if h == nil { + return nil + } + + return &QAbstractPrintDialog{h: (*C.QAbstractPrintDialog)(h), + QDialog: qt.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractPrintDialog constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog(printer *QPrinter) *QAbstractPrintDialog { - ret := C.QAbstractPrintDialog_new(printer.cPointer()) - return newQAbstractPrintDialog(ret) + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractPrintDialog_new(printer.cPointer(), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractPrintDialog2 constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog2(printer *QPrinter, parent *qt.QWidget) *QAbstractPrintDialog { - ret := C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQAbstractPrintDialog(ret) + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractPrintDialog) MetaObject() *qt.QMetaObject { @@ -165,7 +191,7 @@ func (this *QAbstractPrintDialog) ToPage() int { } func (this *QAbstractPrintDialog) Printer() *QPrinter { - return UnsafeNewQPrinter(unsafe.Pointer(C.QAbstractPrintDialog_Printer(this.h))) + return UnsafeNewQPrinter(unsafe.Pointer(C.QAbstractPrintDialog_Printer(this.h)), nil, nil) } func QAbstractPrintDialog_Tr2(s string, c string) string { @@ -212,9 +238,328 @@ func QAbstractPrintDialog_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractPrintDialog) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractPrintDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractPrintDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractPrintDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_SetVisible +func miqt_exec_callback_QAbstractPrintDialog_SetVisible(self *C.QAbstractPrintDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QAbstractPrintDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractPrintDialog) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QAbstractPrintDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_SizeHint +func miqt_exec_callback_QAbstractPrintDialog_SizeHint(self *C.QAbstractPrintDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QAbstractPrintDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractPrintDialog) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QAbstractPrintDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_MinimumSizeHint +func miqt_exec_callback_QAbstractPrintDialog_MinimumSizeHint(self *C.QAbstractPrintDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Open() { + + C.QAbstractPrintDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPrintDialog) OnOpen(slot func(super func())) { + C.QAbstractPrintDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Open +func miqt_exec_callback_QAbstractPrintDialog_Open(self *C.QAbstractPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Exec() int { + + return (int)(C.QAbstractPrintDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QAbstractPrintDialog) OnExec(slot func(super func() int) int) { + C.QAbstractPrintDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Exec +func miqt_exec_callback_QAbstractPrintDialog_Exec(self *C.QAbstractPrintDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Done(param1 int) { + + C.QAbstractPrintDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QAbstractPrintDialog) OnDone(slot func(super func(param1 int), param1 int)) { + C.QAbstractPrintDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Done +func miqt_exec_callback_QAbstractPrintDialog_Done(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Accept() { + + C.QAbstractPrintDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPrintDialog) OnAccept(slot func(super func())) { + C.QAbstractPrintDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Accept +func miqt_exec_callback_QAbstractPrintDialog_Accept(self *C.QAbstractPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Reject() { + + C.QAbstractPrintDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPrintDialog) OnReject(slot func(super func())) { + C.QAbstractPrintDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Reject +func miqt_exec_callback_QAbstractPrintDialog_Reject(self *C.QAbstractPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_KeyPressEvent(param1 *qt.QKeyEvent) { + + C.QAbstractPrintDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnKeyPressEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QAbstractPrintDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent +func miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_CloseEvent(param1 *qt.QCloseEvent) { + + C.QAbstractPrintDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnCloseEvent(slot func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) { + C.QAbstractPrintDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_CloseEvent +func miqt_exec_callback_QAbstractPrintDialog_CloseEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_ShowEvent(param1 *qt.QShowEvent) { + + C.QAbstractPrintDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnShowEvent(slot func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) { + C.QAbstractPrintDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_ShowEvent +func miqt_exec_callback_QAbstractPrintDialog_ShowEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_ResizeEvent(param1 *qt.QResizeEvent) { + + C.QAbstractPrintDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnResizeEvent(slot func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) { + C.QAbstractPrintDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_ResizeEvent +func miqt_exec_callback_QAbstractPrintDialog_ResizeEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_ContextMenuEvent(param1 *qt.QContextMenuEvent) { + + C.QAbstractPrintDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnContextMenuEvent(slot func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) { + C.QAbstractPrintDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent +func miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_EventFilter(param1 *qt.QObject, param2 *qt.QEvent) bool { + + return (bool)(C.QAbstractPrintDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QAbstractPrintDialog) OnEventFilter(slot func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) { + C.QAbstractPrintDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_EventFilter +func miqt_exec_callback_QAbstractPrintDialog_EventFilter(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractPrintDialog) Delete() { - C.QAbstractPrintDialog_Delete(this.h) + C.QAbstractPrintDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qabstractprintdialog.h b/qt/printsupport/gen_qabstractprintdialog.h index dbf407e4..7ebdfee0 100644 --- a/qt/printsupport/gen_qabstractprintdialog.h +++ b/qt/printsupport/gen_qabstractprintdialog.h @@ -16,18 +16,38 @@ extern "C" { #ifdef __cplusplus class QAbstractPrintDialog; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else typedef struct QAbstractPrintDialog QAbstractPrintDialog; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer); -QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent); +void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self); void* QAbstractPrintDialog_Metacast(QAbstractPrintDialog* self, const char* param1); struct miqt_string QAbstractPrintDialog_Tr(const char* s); @@ -50,7 +70,35 @@ struct miqt_string QAbstractPrintDialog_Tr2(const char* s, const char* c); struct miqt_string QAbstractPrintDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QAbstractPrintDialog_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractPrintDialog_TrUtf83(const char* s, const char* c, int n); -void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self); +void QAbstractPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_SetVisible(void* self, bool visible); +void QAbstractPrintDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractPrintDialog_virtualbase_SizeHint(const void* self); +void QAbstractPrintDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractPrintDialog_virtualbase_MinimumSizeHint(const void* self); +void QAbstractPrintDialog_override_virtual_Open(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Open(void* self); +void QAbstractPrintDialog_override_virtual_Exec(void* self, intptr_t slot); +int QAbstractPrintDialog_virtualbase_Exec(void* self); +void QAbstractPrintDialog_override_virtual_Done(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Done(void* self, int param1); +void QAbstractPrintDialog_override_virtual_Accept(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Accept(void* self); +void QAbstractPrintDialog_override_virtual_Reject(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Reject(void* self); +void QAbstractPrintDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QAbstractPrintDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QAbstractPrintDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QAbstractPrintDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QAbstractPrintDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QAbstractPrintDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractPrintDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qpagesetupdialog.cpp b/qt/printsupport/gen_qpagesetupdialog.cpp index 93482070..8135347f 100644 --- a/qt/printsupport/gen_qpagesetupdialog.cpp +++ b/qt/printsupport/gen_qpagesetupdialog.cpp @@ -1,6 +1,16 @@ +#include +#include +#include +#include +#include #include +#include #include +#include #include +#include +#include +#include #include #include #include @@ -9,20 +19,379 @@ #include "gen_qpagesetupdialog.h" #include "_cgo_export.h" -QPageSetupDialog* QPageSetupDialog_new(QWidget* parent) { - return new QPageSetupDialog(parent); +class MiqtVirtualQPageSetupDialog : public virtual QPageSetupDialog { +public: + + MiqtVirtualQPageSetupDialog(QWidget* parent): QPageSetupDialog(parent) {}; + MiqtVirtualQPageSetupDialog(QPrinter* printer): QPageSetupDialog(printer) {}; + MiqtVirtualQPageSetupDialog(): QPageSetupDialog() {}; + MiqtVirtualQPageSetupDialog(QPrinter* printer, QWidget* parent): QPageSetupDialog(printer, parent) {}; + + virtual ~MiqtVirtualQPageSetupDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QPageSetupDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QPageSetupDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QPageSetupDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QPageSetupDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QPageSetupDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QPageSetupDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPageSetupDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPageSetupDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPageSetupDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPageSetupDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPageSetupDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPageSetupDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPageSetupDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPageSetupDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPageSetupDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QPageSetupDialog::open(); + return; + } + + + miqt_exec_callback_QPageSetupDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QPageSetupDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QPageSetupDialog::accept(); + return; + } + + + miqt_exec_callback_QPageSetupDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QPageSetupDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QPageSetupDialog::reject(); + return; + } + + + miqt_exec_callback_QPageSetupDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QPageSetupDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QPageSetupDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QPageSetupDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QPageSetupDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QPageSetupDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QPageSetupDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QPageSetupDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QPageSetupDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QPageSetupDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QPageSetupDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QPageSetupDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QPageSetupDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPageSetupDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QPageSetupDialog::eventFilter(param1, param2); + + } + +}; + +void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(parent); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer) { - return new QPageSetupDialog(printer); +void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPageSetupDialog* QPageSetupDialog_new3() { - return new QPageSetupDialog(); +void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent) { - return new QPageSetupDialog(printer, parent); +void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer, parent); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self) { @@ -111,7 +480,123 @@ struct miqt_string QPageSetupDialog_TrUtf83(const char* s, const char* c, int n) return _ms; } -void QPageSetupDialog_Delete(QPageSetupDialog* self) { - delete self; +void QPageSetupDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Exec = slot; +} + +int QPageSetupDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Exec(); +} + +void QPageSetupDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Done = slot; +} + +void QPageSetupDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Done(result); +} + +void QPageSetupDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__SetVisible = slot; +} + +void QPageSetupDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QPageSetupDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QPageSetupDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_SizeHint(); +} + +void QPageSetupDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPageSetupDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPageSetupDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Open = slot; +} + +void QPageSetupDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Open(); +} + +void QPageSetupDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Accept = slot; +} + +void QPageSetupDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Accept(); +} + +void QPageSetupDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Reject = slot; +} + +void QPageSetupDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Reject(); +} + +void QPageSetupDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QPageSetupDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QPageSetupDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__CloseEvent = slot; +} + +void QPageSetupDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QPageSetupDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__ShowEvent = slot; +} + +void QPageSetupDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QPageSetupDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QPageSetupDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QPageSetupDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPageSetupDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QPageSetupDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__EventFilter = slot; +} + +bool QPageSetupDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QPageSetupDialog_Delete(QPageSetupDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qpagesetupdialog.go b/qt/printsupport/gen_qpagesetupdialog.go index 6c36f179..6ffbc761 100644 --- a/qt/printsupport/gen_qpagesetupdialog.go +++ b/qt/printsupport/gen_qpagesetupdialog.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) type QPageSetupDialog struct { - h *C.QPageSetupDialog + h *C.QPageSetupDialog + isSubclass bool *qt.QDialog } @@ -33,39 +35,79 @@ func (this *QPageSetupDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPageSetupDialog(h *C.QPageSetupDialog) *QPageSetupDialog { +// newQPageSetupDialog constructs the type using only CGO pointers. +func newQPageSetupDialog(h *C.QPageSetupDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPageSetupDialog { if h == nil { return nil } - return &QPageSetupDialog{h: h, QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h))} + return &QPageSetupDialog{h: h, + QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPageSetupDialog(h unsafe.Pointer) *QPageSetupDialog { - return newQPageSetupDialog((*C.QPageSetupDialog)(h)) +// UnsafeNewQPageSetupDialog constructs the type using only unsafe pointers. +func UnsafeNewQPageSetupDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPageSetupDialog { + if h == nil { + return nil + } + + return &QPageSetupDialog{h: (*C.QPageSetupDialog)(h), + QDialog: qt.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPageSetupDialog constructs a new QPageSetupDialog object. func NewQPageSetupDialog(parent *qt.QWidget) *QPageSetupDialog { - ret := C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer())) - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPageSetupDialog2 constructs a new QPageSetupDialog object. func NewQPageSetupDialog2(printer *QPrinter) *QPageSetupDialog { - ret := C.QPageSetupDialog_new2(printer.cPointer()) - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new2(printer.cPointer(), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPageSetupDialog3 constructs a new QPageSetupDialog object. func NewQPageSetupDialog3() *QPageSetupDialog { - ret := C.QPageSetupDialog_new3() - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new3(&outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPageSetupDialog4 constructs a new QPageSetupDialog object. func NewQPageSetupDialog4(printer *QPrinter, parent *qt.QWidget) *QPageSetupDialog { - ret := C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPageSetupDialog) MetaObject() *qt.QMetaObject { @@ -105,7 +147,7 @@ func (this *QPageSetupDialog) Done(result int) { } func (this *QPageSetupDialog) Printer() *QPrinter { - return UnsafeNewQPrinter(unsafe.Pointer(C.QPageSetupDialog_Printer(this.h))) + return UnsafeNewQPrinter(unsafe.Pointer(C.QPageSetupDialog_Printer(this.h)), nil, nil) } func QPageSetupDialog_Tr2(s string, c string) string { @@ -152,9 +194,328 @@ func QPageSetupDialog_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPageSetupDialog) callVirtualBase_Exec() int { + + return (int)(C.QPageSetupDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QPageSetupDialog) OnExec(slot func(super func() int) int) { + C.QPageSetupDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Exec +func miqt_exec_callback_QPageSetupDialog_Exec(self *C.QPageSetupDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QPageSetupDialog) callVirtualBase_Done(result int) { + + C.QPageSetupDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QPageSetupDialog) OnDone(slot func(super func(result int), result int)) { + C.QPageSetupDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Done +func miqt_exec_callback_QPageSetupDialog_Done(self *C.QPageSetupDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_SetVisible(visible bool) { + + C.QPageSetupDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPageSetupDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPageSetupDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_SetVisible +func miqt_exec_callback_QPageSetupDialog_SetVisible(self *C.QPageSetupDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QPageSetupDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPageSetupDialog) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QPageSetupDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_SizeHint +func miqt_exec_callback_QPageSetupDialog_SizeHint(self *C.QPageSetupDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPageSetupDialog) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QPageSetupDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPageSetupDialog) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QPageSetupDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_MinimumSizeHint +func miqt_exec_callback_QPageSetupDialog_MinimumSizeHint(self *C.QPageSetupDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPageSetupDialog) callVirtualBase_Open() { + + C.QPageSetupDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QPageSetupDialog) OnOpen(slot func(super func())) { + C.QPageSetupDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Open +func miqt_exec_callback_QPageSetupDialog_Open(self *C.QPageSetupDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QPageSetupDialog) callVirtualBase_Accept() { + + C.QPageSetupDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QPageSetupDialog) OnAccept(slot func(super func())) { + C.QPageSetupDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Accept +func miqt_exec_callback_QPageSetupDialog_Accept(self *C.QPageSetupDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QPageSetupDialog) callVirtualBase_Reject() { + + C.QPageSetupDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QPageSetupDialog) OnReject(slot func(super func())) { + C.QPageSetupDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Reject +func miqt_exec_callback_QPageSetupDialog_Reject(self *C.QPageSetupDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QPageSetupDialog) callVirtualBase_KeyPressEvent(param1 *qt.QKeyEvent) { + + C.QPageSetupDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnKeyPressEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QPageSetupDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_KeyPressEvent +func miqt_exec_callback_QPageSetupDialog_KeyPressEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_CloseEvent(param1 *qt.QCloseEvent) { + + C.QPageSetupDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnCloseEvent(slot func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) { + C.QPageSetupDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_CloseEvent +func miqt_exec_callback_QPageSetupDialog_CloseEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_ShowEvent(param1 *qt.QShowEvent) { + + C.QPageSetupDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnShowEvent(slot func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) { + C.QPageSetupDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_ShowEvent +func miqt_exec_callback_QPageSetupDialog_ShowEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_ResizeEvent(param1 *qt.QResizeEvent) { + + C.QPageSetupDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnResizeEvent(slot func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) { + C.QPageSetupDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_ResizeEvent +func miqt_exec_callback_QPageSetupDialog_ResizeEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_ContextMenuEvent(param1 *qt.QContextMenuEvent) { + + C.QPageSetupDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnContextMenuEvent(slot func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) { + C.QPageSetupDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_ContextMenuEvent +func miqt_exec_callback_QPageSetupDialog_ContextMenuEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_EventFilter(param1 *qt.QObject, param2 *qt.QEvent) bool { + + return (bool)(C.QPageSetupDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QPageSetupDialog) OnEventFilter(slot func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) { + C.QPageSetupDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_EventFilter +func miqt_exec_callback_QPageSetupDialog_EventFilter(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPageSetupDialog) Delete() { - C.QPageSetupDialog_Delete(this.h) + C.QPageSetupDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qpagesetupdialog.h b/qt/printsupport/gen_qpagesetupdialog.h index 2d421764..2e4af89a 100644 --- a/qt/printsupport/gen_qpagesetupdialog.h +++ b/qt/printsupport/gen_qpagesetupdialog.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; class QPageSetupDialog; +class QPaintDevice; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPageSetupDialog QPageSetupDialog; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QPageSetupDialog* QPageSetupDialog_new(QWidget* parent); -QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer); -QPageSetupDialog* QPageSetupDialog_new3(); -QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent); +void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self); void* QPageSetupDialog_Metacast(QPageSetupDialog* self, const char* param1); struct miqt_string QPageSetupDialog_Tr(const char* s); @@ -41,7 +61,35 @@ struct miqt_string QPageSetupDialog_Tr2(const char* s, const char* c); struct miqt_string QPageSetupDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QPageSetupDialog_TrUtf82(const char* s, const char* c); struct miqt_string QPageSetupDialog_TrUtf83(const char* s, const char* c, int n); -void QPageSetupDialog_Delete(QPageSetupDialog* self); +void QPageSetupDialog_override_virtual_Exec(void* self, intptr_t slot); +int QPageSetupDialog_virtualbase_Exec(void* self); +void QPageSetupDialog_override_virtual_Done(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Done(void* self, int result); +void QPageSetupDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_SetVisible(void* self, bool visible); +void QPageSetupDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPageSetupDialog_virtualbase_SizeHint(const void* self); +void QPageSetupDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPageSetupDialog_virtualbase_MinimumSizeHint(const void* self); +void QPageSetupDialog_override_virtual_Open(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Open(void* self); +void QPageSetupDialog_override_virtual_Accept(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Accept(void* self); +void QPageSetupDialog_override_virtual_Reject(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Reject(void* self); +void QPageSetupDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QPageSetupDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QPageSetupDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QPageSetupDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QPageSetupDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QPageSetupDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPageSetupDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QPageSetupDialog_Delete(QPageSetupDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qprintdialog.cpp b/qt/printsupport/gen_qprintdialog.cpp index 7f8e0b66..1cd8d67b 100644 --- a/qt/printsupport/gen_qprintdialog.cpp +++ b/qt/printsupport/gen_qprintdialog.cpp @@ -1,4 +1,8 @@ +#include +#include #include +#include +#include #include #include #include @@ -9,20 +13,149 @@ #include "gen_qprintdialog.h" #include "_cgo_export.h" -QPrintDialog* QPrintDialog_new(QWidget* parent) { - return new QPrintDialog(parent); +class MiqtVirtualQPrintDialog : public virtual QPrintDialog { +public: + + MiqtVirtualQPrintDialog(QWidget* parent): QPrintDialog(parent) {}; + MiqtVirtualQPrintDialog(QPrinter* printer): QPrintDialog(printer) {}; + MiqtVirtualQPrintDialog(): QPrintDialog() {}; + MiqtVirtualQPrintDialog(QPrinter* printer, QWidget* parent): QPrintDialog(printer, parent) {}; + + virtual ~MiqtVirtualQPrintDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QPrintDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QPrintDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QPrintDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QPrintDialog::accept(); + return; + } + + + miqt_exec_callback_QPrintDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QPrintDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QPrintDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QPrintDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QPrintDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPrintDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPrintDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPrintDialog::setVisible(visible); + + } + +}; + +void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(parent); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintDialog* QPrintDialog_new2(QPrinter* printer) { - return new QPrintDialog(printer); +void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintDialog* QPrintDialog_new3() { - return new QPrintDialog(); +void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent) { - return new QPrintDialog(printer, parent); +void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer, parent); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self) { @@ -93,7 +226,7 @@ void QPrintDialog_Accepted(QPrintDialog* self, QPrinter* printer) { } void QPrintDialog_connect_Accepted(QPrintDialog* self, intptr_t slot) { - QPrintDialog::connect(self, static_cast(&QPrintDialog::accepted), self, [=](QPrinter* printer) { + MiqtVirtualQPrintDialog::connect(self, static_cast(&QPrintDialog::accepted), self, [=](QPrinter* printer) { QPrinter* sigval1 = printer; miqt_exec_callback_QPrintDialog_Accepted(slot, sigval1); }); @@ -147,7 +280,43 @@ void QPrintDialog_SetOption2(QPrintDialog* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QPrintDialog_Delete(QPrintDialog* self) { - delete self; +void QPrintDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__Exec = slot; +} + +int QPrintDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_Exec(); +} + +void QPrintDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__Accept = slot; +} + +void QPrintDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_Accept(); +} + +void QPrintDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__Done = slot; +} + +void QPrintDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_Done(result); +} + +void QPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__SetVisible = slot; +} + +void QPrintDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QPrintDialog_Delete(QPrintDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qprintdialog.go b/qt/printsupport/gen_qprintdialog.go index df6623e9..f06046a0 100644 --- a/qt/printsupport/gen_qprintdialog.go +++ b/qt/printsupport/gen_qprintdialog.go @@ -16,7 +16,8 @@ import ( ) type QPrintDialog struct { - h *C.QPrintDialog + h *C.QPrintDialog + isSubclass bool *QAbstractPrintDialog } @@ -34,39 +35,83 @@ func (this *QPrintDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrintDialog(h *C.QPrintDialog) *QPrintDialog { +// newQPrintDialog constructs the type using only CGO pointers. +func newQPrintDialog(h *C.QPrintDialog, h_QAbstractPrintDialog *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintDialog { if h == nil { return nil } - return &QPrintDialog{h: h, QAbstractPrintDialog: UnsafeNewQAbstractPrintDialog(unsafe.Pointer(h))} + return &QPrintDialog{h: h, + QAbstractPrintDialog: newQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQPrintDialog(h unsafe.Pointer) *QPrintDialog { - return newQPrintDialog((*C.QPrintDialog)(h)) +// UnsafeNewQPrintDialog constructs the type using only unsafe pointers. +func UnsafeNewQPrintDialog(h unsafe.Pointer, h_QAbstractPrintDialog unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintDialog { + if h == nil { + return nil + } + + return &QPrintDialog{h: (*C.QPrintDialog)(h), + QAbstractPrintDialog: UnsafeNewQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPrintDialog constructs a new QPrintDialog object. func NewQPrintDialog(parent *qt.QWidget) *QPrintDialog { - ret := C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer())) - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintDialog2 constructs a new QPrintDialog object. func NewQPrintDialog2(printer *QPrinter) *QPrintDialog { - ret := C.QPrintDialog_new2(printer.cPointer()) - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new2(printer.cPointer(), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintDialog3 constructs a new QPrintDialog object. func NewQPrintDialog3() *QPrintDialog { - ret := C.QPrintDialog_new3() - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new3(&outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintDialog4 constructs a new QPrintDialog object. func NewQPrintDialog4(printer *QPrinter, parent *qt.QWidget) *QPrintDialog { - ret := C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrintDialog) MetaObject() *qt.QMetaObject { @@ -144,7 +189,7 @@ func miqt_exec_callback_QPrintDialog_Accepted(cb C.intptr_t, printer *C.QPrinter } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer)) + slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer), nil, nil) gofunc(slotval1) } @@ -197,9 +242,97 @@ func (this *QPrintDialog) SetOption2(option QAbstractPrintDialog__PrintDialogOpt C.QPrintDialog_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } +func (this *QPrintDialog) callVirtualBase_Exec() int { + + return (int)(C.QPrintDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QPrintDialog) OnExec(slot func(super func() int) int) { + C.QPrintDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_Exec +func miqt_exec_callback_QPrintDialog_Exec(self *C.QPrintDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintDialog) callVirtualBase_Accept() { + + C.QPrintDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QPrintDialog) OnAccept(slot func(super func())) { + C.QPrintDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_Accept +func miqt_exec_callback_QPrintDialog_Accept(self *C.QPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QPrintDialog) callVirtualBase_Done(result int) { + + C.QPrintDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QPrintDialog) OnDone(slot func(super func(result int), result int)) { + C.QPrintDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_Done +func miqt_exec_callback_QPrintDialog_Done(self *C.QPrintDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QPrintDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QPrintDialog) callVirtualBase_SetVisible(visible bool) { + + C.QPrintDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPrintDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPrintDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_SetVisible +func miqt_exec_callback_QPrintDialog_SetVisible(self *C.QPrintDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPrintDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + // Delete this object from C++ memory. func (this *QPrintDialog) Delete() { - C.QPrintDialog_Delete(this.h) + C.QPrintDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qprintdialog.h b/qt/printsupport/gen_qprintdialog.h index ee800cdd..02b93712 100644 --- a/qt/printsupport/gen_qprintdialog.h +++ b/qt/printsupport/gen_qprintdialog.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractPrintDialog; +class QDialog; class QMetaObject; +class QObject; +class QPaintDevice; class QPrintDialog; class QPrinter; class QWidget; #else +typedef struct QAbstractPrintDialog QAbstractPrintDialog; +typedef struct QDialog QDialog; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrintDialog QPrintDialog; typedef struct QPrinter QPrinter; typedef struct QWidget QWidget; #endif -QPrintDialog* QPrintDialog_new(QWidget* parent); -QPrintDialog* QPrintDialog_new2(QPrinter* printer); -QPrintDialog* QPrintDialog_new3(); -QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent); +void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self); void* QPrintDialog_Metacast(QPrintDialog* self, const char* param1); struct miqt_string QPrintDialog_Tr(const char* s); @@ -49,7 +57,15 @@ struct miqt_string QPrintDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QPrintDialog_TrUtf82(const char* s, const char* c); struct miqt_string QPrintDialog_TrUtf83(const char* s, const char* c, int n); void QPrintDialog_SetOption2(QPrintDialog* self, int option, bool on); -void QPrintDialog_Delete(QPrintDialog* self); +void QPrintDialog_override_virtual_Exec(void* self, intptr_t slot); +int QPrintDialog_virtualbase_Exec(void* self); +void QPrintDialog_override_virtual_Accept(void* self, intptr_t slot); +void QPrintDialog_virtualbase_Accept(void* self); +void QPrintDialog_override_virtual_Done(void* self, intptr_t slot); +void QPrintDialog_virtualbase_Done(void* self, int result); +void QPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QPrintDialog_virtualbase_SetVisible(void* self, bool visible); +void QPrintDialog_Delete(QPrintDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qprintengine.cpp b/qt/printsupport/gen_qprintengine.cpp index c4f4ea21..5eb5615c 100644 --- a/qt/printsupport/gen_qprintengine.cpp +++ b/qt/printsupport/gen_qprintengine.cpp @@ -33,7 +33,11 @@ void QPrintEngine_OperatorAssign(QPrintEngine* self, QPrintEngine* param1) { self->operator=(*param1); } -void QPrintEngine_Delete(QPrintEngine* self) { - delete self; +void QPrintEngine_Delete(QPrintEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qprintengine.go b/qt/printsupport/gen_qprintengine.go index b1156d11..9d991113 100644 --- a/qt/printsupport/gen_qprintengine.go +++ b/qt/printsupport/gen_qprintengine.go @@ -52,7 +52,8 @@ const ( ) type QPrintEngine struct { - h *C.QPrintEngine + h *C.QPrintEngine + isSubclass bool } func (this *QPrintEngine) cPointer() *C.QPrintEngine { @@ -69,6 +70,7 @@ func (this *QPrintEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPrintEngine constructs the type using only CGO pointers. func newQPrintEngine(h *C.QPrintEngine) *QPrintEngine { if h == nil { return nil @@ -76,8 +78,13 @@ func newQPrintEngine(h *C.QPrintEngine) *QPrintEngine { return &QPrintEngine{h: h} } +// UnsafeNewQPrintEngine constructs the type using only unsafe pointers. func UnsafeNewQPrintEngine(h unsafe.Pointer) *QPrintEngine { - return newQPrintEngine((*C.QPrintEngine)(h)) + if h == nil { + return nil + } + + return &QPrintEngine{h: (*C.QPrintEngine)(h)} } func (this *QPrintEngine) SetProperty(key QPrintEngine__PrintEnginePropertyKey, value *qt.QVariant) { @@ -113,7 +120,7 @@ func (this *QPrintEngine) OperatorAssign(param1 *QPrintEngine) { // Delete this object from C++ memory. func (this *QPrintEngine) Delete() { - C.QPrintEngine_Delete(this.h) + C.QPrintEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qprintengine.h b/qt/printsupport/gen_qprintengine.h index 4d741e49..14e3e65d 100644 --- a/qt/printsupport/gen_qprintengine.h +++ b/qt/printsupport/gen_qprintengine.h @@ -29,7 +29,7 @@ bool QPrintEngine_Abort(QPrintEngine* self); int QPrintEngine_Metric(const QPrintEngine* self, int param1); int QPrintEngine_PrinterState(const QPrintEngine* self); void QPrintEngine_OperatorAssign(QPrintEngine* self, QPrintEngine* param1); -void QPrintEngine_Delete(QPrintEngine* self); +void QPrintEngine_Delete(QPrintEngine* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qprinter.cpp b/qt/printsupport/gen_qprinter.cpp index 99d6063d..4d98ff81 100644 --- a/qt/printsupport/gen_qprinter.cpp +++ b/qt/printsupport/gen_qprinter.cpp @@ -1,5 +1,7 @@ #include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins +#include #include #include #include @@ -14,20 +16,211 @@ #include "gen_qprinter.h" #include "_cgo_export.h" -QPrinter* QPrinter_new() { - return new QPrinter(); +class MiqtVirtualQPrinter : public virtual QPrinter { +public: + + MiqtVirtualQPrinter(): QPrinter() {}; + MiqtVirtualQPrinter(const QPrinterInfo& printer): QPrinter(printer) {}; + MiqtVirtualQPrinter(QPrinter::PrinterMode mode): QPrinter(mode) {}; + MiqtVirtualQPrinter(const QPrinterInfo& printer, QPrinter::PrinterMode mode): QPrinter(printer, mode) {}; + + virtual ~MiqtVirtualQPrinter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPrinter::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPrinter_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPrinter::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSize(QPagedPaintDevice::PageSize pageSize) override { + if (handle__SetPageSize == 0) { + QPrinter::setPageSize(pageSize); + return; + } + + QPagedPaintDevice::PageSize pageSize_ret = pageSize; + int sigval1 = static_cast(pageSize_ret); + + miqt_exec_callback_QPrinter_SetPageSize(this, handle__SetPageSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSize(int pageSize) { + + QPrinter::setPageSize(static_cast(pageSize)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSizeMM = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSizeMM(const QSizeF& size) override { + if (handle__SetPageSizeMM == 0) { + QPrinter::setPageSizeMM(size); + return; + } + + const QSizeF& size_ret = size; + // Cast returned reference into pointer + QSizeF* sigval1 = const_cast(&size_ret); + + miqt_exec_callback_QPrinter_SetPageSizeMM(this, handle__SetPageSizeMM, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSizeMM(QSizeF* size) { + + QPrinter::setPageSizeMM(*size); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool newPage() override { + if (handle__NewPage == 0) { + return QPrinter::newPage(); + } + + + bool callback_return_value = miqt_exec_callback_QPrinter_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NewPage() { + + return QPrinter::newPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPrinter::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPrinter_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPrinter::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void setMargins(const QPagedPaintDevice::Margins& m) override { + if (handle__SetMargins == 0) { + QPrinter::setMargins(m); + return; + } + + const QPagedPaintDevice::Margins& m_ret = m; + // Cast returned reference into pointer + QPagedPaintDevice__Margins* sigval1 = const_cast(&m_ret); + + miqt_exec_callback_QPrinter_SetMargins(this, handle__SetMargins, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMargins(QPagedPaintDevice__Margins* m) { + + QPrinter::setMargins(*m); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QPrinter::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPrinter_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QPrinter::metric(static_cast(param1)); + + } + +}; + +void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrinter* QPrinter_new2(QPrinterInfo* printer) { - return new QPrinter(*printer); +void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrinter* QPrinter_new3(int mode) { - return new QPrinter(static_cast(mode)); +void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(static_cast(mode)); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode) { - return new QPrinter(*printer, static_cast(mode)); +void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer, static_cast(mode)); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } int QPrinter_DevType(const QPrinter* self) { @@ -398,7 +591,67 @@ void QPrinter_GetPageMargins(const QPrinter* self, double* left, double* top, do self->getPageMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom), static_cast(unit)); } -void QPrinter_Delete(QPrinter* self) { - delete self; +void QPrinter_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__DevType = slot; +} + +int QPrinter_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPrinter*)(self) )->virtualbase_DevType(); +} + +void QPrinter_override_virtual_SetPageSize(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageSize = slot; +} + +void QPrinter_virtualbase_SetPageSize(void* self, int pageSize) { + ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageSize(pageSize); +} + +void QPrinter_override_virtual_SetPageSizeMM(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageSizeMM = slot; +} + +void QPrinter_virtualbase_SetPageSizeMM(void* self, QSizeF* size) { + ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageSizeMM(size); +} + +void QPrinter_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__NewPage = slot; +} + +bool QPrinter_virtualbase_NewPage(void* self) { + return ( (MiqtVirtualQPrinter*)(self) )->virtualbase_NewPage(); +} + +void QPrinter_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPrinter_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPrinter*)(self) )->virtualbase_PaintEngine(); +} + +void QPrinter_override_virtual_SetMargins(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetMargins = slot; +} + +void QPrinter_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* m) { + ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetMargins(m); +} + +void QPrinter_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__Metric = slot; +} + +int QPrinter_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQPrinter*)(self) )->virtualbase_Metric(param1); +} + +void QPrinter_Delete(QPrinter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qprinter.go b/qt/printsupport/gen_qprinter.go index 1d844c4b..5631fcaf 100644 --- a/qt/printsupport/gen_qprinter.go +++ b/qt/printsupport/gen_qprinter.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -112,7 +113,8 @@ const ( ) type QPrinter struct { - h *C.QPrinter + h *C.QPrinter + isSubclass bool *qt.QPagedPaintDevice } @@ -130,39 +132,71 @@ func (this *QPrinter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrinter(h *C.QPrinter) *QPrinter { +// newQPrinter constructs the type using only CGO pointers. +func newQPrinter(h *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPrinter { if h == nil { return nil } - return &QPrinter{h: h, QPagedPaintDevice: qt.UnsafeNewQPagedPaintDevice(unsafe.Pointer(h))} + return &QPrinter{h: h, + QPagedPaintDevice: qt.UnsafeNewQPagedPaintDevice(unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPrinter(h unsafe.Pointer) *QPrinter { - return newQPrinter((*C.QPrinter)(h)) +// UnsafeNewQPrinter constructs the type using only unsafe pointers. +func UnsafeNewQPrinter(h unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrinter { + if h == nil { + return nil + } + + return &QPrinter{h: (*C.QPrinter)(h), + QPagedPaintDevice: qt.UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} } // NewQPrinter constructs a new QPrinter object. func NewQPrinter() *QPrinter { - ret := C.QPrinter_new() - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new(&outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrinter2 constructs a new QPrinter object. func NewQPrinter2(printer *QPrinterInfo) *QPrinter { - ret := C.QPrinter_new2(printer.cPointer()) - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new2(printer.cPointer(), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrinter3 constructs a new QPrinter object. func NewQPrinter3(mode QPrinter__PrinterMode) *QPrinter { - ret := C.QPrinter_new3((C.int)(mode)) - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new3((C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrinter4 constructs a new QPrinter object. func NewQPrinter4(printer *QPrinterInfo, mode QPrinter__PrinterMode) *QPrinter { - ret := C.QPrinter_new4(printer.cPointer(), (C.int)(mode)) - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new4(printer.cPointer(), (C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrinter) DevType() int { @@ -527,9 +561,168 @@ func (this *QPrinter) GetPageMargins(left *float64, top *float64, right *float64 C.QPrinter_GetPageMargins(this.h, (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom)), (C.int)(unit)) } +func (this *QPrinter) callVirtualBase_DevType() int { + + return (int)(C.QPrinter_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPrinter) OnDevType(slot func(super func() int) int) { + C.QPrinter_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_DevType +func miqt_exec_callback_QPrinter_DevType(self *C.QPrinter, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_SetPageSize(pageSize qt.QPagedPaintDevice__PageSize) { + + C.QPrinter_virtualbase_SetPageSize(unsafe.Pointer(this.h), (C.int)(pageSize)) + +} +func (this *QPrinter) OnSetPageSize(slot func(super func(pageSize qt.QPagedPaintDevice__PageSize), pageSize qt.QPagedPaintDevice__PageSize)) { + C.QPrinter_override_virtual_SetPageSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageSize +func miqt_exec_callback_QPrinter_SetPageSize(self *C.QPrinter, cb C.intptr_t, pageSize C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pageSize qt.QPagedPaintDevice__PageSize), pageSize qt.QPagedPaintDevice__PageSize)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPagedPaintDevice__PageSize)(pageSize) + + gofunc((&QPrinter{h: self}).callVirtualBase_SetPageSize, slotval1) + +} + +func (this *QPrinter) callVirtualBase_SetPageSizeMM(size *qt.QSizeF) { + + C.QPrinter_virtualbase_SetPageSizeMM(unsafe.Pointer(this.h), (*C.QSizeF)(size.UnsafePointer())) + +} +func (this *QPrinter) OnSetPageSizeMM(slot func(super func(size *qt.QSizeF), size *qt.QSizeF)) { + C.QPrinter_override_virtual_SetPageSizeMM(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageSizeMM +func miqt_exec_callback_QPrinter_SetPageSizeMM(self *C.QPrinter, cb C.intptr_t, size *C.QSizeF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *qt.QSizeF), size *qt.QSizeF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSizeF(unsafe.Pointer(size)) + + gofunc((&QPrinter{h: self}).callVirtualBase_SetPageSizeMM, slotval1) + +} + +func (this *QPrinter) callVirtualBase_NewPage() bool { + + return (bool)(C.QPrinter_virtualbase_NewPage(unsafe.Pointer(this.h))) + +} +func (this *QPrinter) OnNewPage(slot func(super func() bool) bool) { + C.QPrinter_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_NewPage +func miqt_exec_callback_QPrinter_NewPage(self *C.QPrinter, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_NewPage) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QPrinter_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPrinter) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QPrinter_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_PaintEngine +func miqt_exec_callback_QPrinter_PaintEngine(self *C.QPrinter, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrinter) callVirtualBase_SetMargins(m *qt.QPagedPaintDevice__Margins) { + + C.QPrinter_virtualbase_SetMargins(unsafe.Pointer(this.h), (*C.QPagedPaintDevice__Margins)(m.UnsafePointer())) + +} +func (this *QPrinter) OnSetMargins(slot func(super func(m *qt.QPagedPaintDevice__Margins), m *qt.QPagedPaintDevice__Margins)) { + C.QPrinter_override_virtual_SetMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetMargins +func miqt_exec_callback_QPrinter_SetMargins(self *C.QPrinter, cb C.intptr_t, m *C.QPagedPaintDevice__Margins) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m *qt.QPagedPaintDevice__Margins), m *qt.QPagedPaintDevice__Margins)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPagedPaintDevice__Margins(unsafe.Pointer(m)) + + gofunc((&QPrinter{h: self}).callVirtualBase_SetMargins, slotval1) + +} + +func (this *QPrinter) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPrinter_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPrinter) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QPrinter_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_Metric +func miqt_exec_callback_QPrinter_Metric(self *C.QPrinter, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPrinter) Delete() { - C.QPrinter_Delete(this.h) + C.QPrinter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qprinter.h b/qt/printsupport/gen_qprinter.h index a758c4e9..bebe1d85 100644 --- a/qt/printsupport/gen_qprinter.h +++ b/qt/printsupport/gen_qprinter.h @@ -15,11 +15,13 @@ extern "C" { #endif #ifdef __cplusplus +class QPagedPaintDevice; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins) typedef QPagedPaintDevice::Margins QPagedPaintDevice__Margins; #else class QPagedPaintDevice__Margins; #endif +class QPaintDevice; class QPaintEngine; class QPrintEngine; class QPrinter; @@ -28,7 +30,9 @@ class QRect; class QRectF; class QSizeF; #else +typedef struct QPagedPaintDevice QPagedPaintDevice; typedef struct QPagedPaintDevice__Margins QPagedPaintDevice__Margins; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; typedef struct QPrintEngine QPrintEngine; typedef struct QPrinter QPrinter; @@ -38,10 +42,10 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -QPrinter* QPrinter_new(); -QPrinter* QPrinter_new2(QPrinterInfo* printer); -QPrinter* QPrinter_new3(int mode); -QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode); +void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); int QPrinter_DevType(const QPrinter* self); void QPrinter_SetOutputFormat(QPrinter* self, int format); int QPrinter_OutputFormat(const QPrinter* self); @@ -115,7 +119,22 @@ int QPrinter_PrintRange(const QPrinter* self); void QPrinter_SetMargins(QPrinter* self, QPagedPaintDevice__Margins* m); void QPrinter_SetPageMargins(QPrinter* self, double left, double top, double right, double bottom, int unit); void QPrinter_GetPageMargins(const QPrinter* self, double* left, double* top, double* right, double* bottom, int unit); -void QPrinter_Delete(QPrinter* self); +int QPrinter_Metric(const QPrinter* self, int param1); +void QPrinter_override_virtual_DevType(void* self, intptr_t slot); +int QPrinter_virtualbase_DevType(const void* self); +void QPrinter_override_virtual_SetPageSize(void* self, intptr_t slot); +void QPrinter_virtualbase_SetPageSize(void* self, int pageSize); +void QPrinter_override_virtual_SetPageSizeMM(void* self, intptr_t slot); +void QPrinter_virtualbase_SetPageSizeMM(void* self, QSizeF* size); +void QPrinter_override_virtual_NewPage(void* self, intptr_t slot); +bool QPrinter_virtualbase_NewPage(void* self); +void QPrinter_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPrinter_virtualbase_PaintEngine(const void* self); +void QPrinter_override_virtual_SetMargins(void* self, intptr_t slot); +void QPrinter_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* m); +void QPrinter_override_virtual_Metric(void* self, intptr_t slot); +int QPrinter_virtualbase_Metric(const void* self, int param1); +void QPrinter_Delete(QPrinter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qprinterinfo.cpp b/qt/printsupport/gen_qprinterinfo.cpp index a9f35a26..b3875583 100644 --- a/qt/printsupport/gen_qprinterinfo.cpp +++ b/qt/printsupport/gen_qprinterinfo.cpp @@ -9,16 +9,19 @@ #include "gen_qprinterinfo.h" #include "_cgo_export.h" -QPrinterInfo* QPrinterInfo_new() { - return new QPrinterInfo(); +void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo) { + QPrinterInfo* ret = new QPrinterInfo(); + *outptr_QPrinterInfo = ret; } -QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other) { - return new QPrinterInfo(*other); +void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo) { + QPrinterInfo* ret = new QPrinterInfo(*other); + *outptr_QPrinterInfo = ret; } -QPrinterInfo* QPrinterInfo_new3(QPrinter* printer) { - return new QPrinterInfo(*printer); +void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo) { + QPrinterInfo* ret = new QPrinterInfo(*printer); + *outptr_QPrinterInfo = ret; } void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other) { @@ -263,7 +266,11 @@ QPrinterInfo* QPrinterInfo_PrinterInfo(struct miqt_string printerName) { return new QPrinterInfo(QPrinterInfo::printerInfo(printerName_QString)); } -void QPrinterInfo_Delete(QPrinterInfo* self) { - delete self; +void QPrinterInfo_Delete(QPrinterInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qprinterinfo.go b/qt/printsupport/gen_qprinterinfo.go index 82e8624e..7da22f26 100644 --- a/qt/printsupport/gen_qprinterinfo.go +++ b/qt/printsupport/gen_qprinterinfo.go @@ -15,7 +15,8 @@ import ( ) type QPrinterInfo struct { - h *C.QPrinterInfo + h *C.QPrinterInfo + isSubclass bool } func (this *QPrinterInfo) cPointer() *C.QPrinterInfo { @@ -32,6 +33,7 @@ func (this *QPrinterInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPrinterInfo constructs the type using only CGO pointers. func newQPrinterInfo(h *C.QPrinterInfo) *QPrinterInfo { if h == nil { return nil @@ -39,26 +41,43 @@ func newQPrinterInfo(h *C.QPrinterInfo) *QPrinterInfo { return &QPrinterInfo{h: h} } +// UnsafeNewQPrinterInfo constructs the type using only unsafe pointers. func UnsafeNewQPrinterInfo(h unsafe.Pointer) *QPrinterInfo { - return newQPrinterInfo((*C.QPrinterInfo)(h)) + if h == nil { + return nil + } + + return &QPrinterInfo{h: (*C.QPrinterInfo)(h)} } // NewQPrinterInfo constructs a new QPrinterInfo object. func NewQPrinterInfo() *QPrinterInfo { - ret := C.QPrinterInfo_new() - return newQPrinterInfo(ret) + var outptr_QPrinterInfo *C.QPrinterInfo = nil + + C.QPrinterInfo_new(&outptr_QPrinterInfo) + ret := newQPrinterInfo(outptr_QPrinterInfo) + ret.isSubclass = true + return ret } // NewQPrinterInfo2 constructs a new QPrinterInfo object. func NewQPrinterInfo2(other *QPrinterInfo) *QPrinterInfo { - ret := C.QPrinterInfo_new2(other.cPointer()) - return newQPrinterInfo(ret) + var outptr_QPrinterInfo *C.QPrinterInfo = nil + + C.QPrinterInfo_new2(other.cPointer(), &outptr_QPrinterInfo) + ret := newQPrinterInfo(outptr_QPrinterInfo) + ret.isSubclass = true + return ret } // NewQPrinterInfo3 constructs a new QPrinterInfo object. func NewQPrinterInfo3(printer *QPrinter) *QPrinterInfo { - ret := C.QPrinterInfo_new3(printer.cPointer()) - return newQPrinterInfo(ret) + var outptr_QPrinterInfo *C.QPrinterInfo = nil + + C.QPrinterInfo_new3(printer.cPointer(), &outptr_QPrinterInfo) + ret := newQPrinterInfo(outptr_QPrinterInfo) + ret.isSubclass = true + return ret } func (this *QPrinterInfo) OperatorAssign(other *QPrinterInfo) { @@ -279,7 +298,7 @@ func QPrinterInfo_PrinterInfo(printerName string) *QPrinterInfo { // Delete this object from C++ memory. func (this *QPrinterInfo) Delete() { - C.QPrinterInfo_Delete(this.h) + C.QPrinterInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qprinterinfo.h b/qt/printsupport/gen_qprinterinfo.h index 0547c43b..7f1e7cf8 100644 --- a/qt/printsupport/gen_qprinterinfo.h +++ b/qt/printsupport/gen_qprinterinfo.h @@ -24,9 +24,9 @@ typedef struct QPrinter QPrinter; typedef struct QPrinterInfo QPrinterInfo; #endif -QPrinterInfo* QPrinterInfo_new(); -QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other); -QPrinterInfo* QPrinterInfo_new3(QPrinter* printer); +void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo); +void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo); +void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo); void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other); struct miqt_string QPrinterInfo_PrinterName(const QPrinterInfo* self); struct miqt_string QPrinterInfo_Description(const QPrinterInfo* self); @@ -53,7 +53,7 @@ struct miqt_array /* of QPrinterInfo* */ QPrinterInfo_AvailablePrinters(); struct miqt_string QPrinterInfo_DefaultPrinterName(); QPrinterInfo* QPrinterInfo_DefaultPrinter(); QPrinterInfo* QPrinterInfo_PrinterInfo(struct miqt_string printerName); -void QPrinterInfo_Delete(QPrinterInfo* self); +void QPrinterInfo_Delete(QPrinterInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qprintpreviewdialog.cpp b/qt/printsupport/gen_qprintpreviewdialog.cpp index b5f6e32a..2aaa0296 100644 --- a/qt/printsupport/gen_qprintpreviewdialog.cpp +++ b/qt/printsupport/gen_qprintpreviewdialog.cpp @@ -1,6 +1,16 @@ +#include +#include +#include +#include +#include #include +#include +#include #include #include +#include +#include +#include #include #include #include @@ -9,28 +19,399 @@ #include "gen_qprintpreviewdialog.h" #include "_cgo_export.h" -QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent) { - return new QPrintPreviewDialog(parent); +class MiqtVirtualQPrintPreviewDialog : public virtual QPrintPreviewDialog { +public: + + MiqtVirtualQPrintPreviewDialog(QWidget* parent): QPrintPreviewDialog(parent) {}; + MiqtVirtualQPrintPreviewDialog(): QPrintPreviewDialog() {}; + MiqtVirtualQPrintPreviewDialog(QPrinter* printer): QPrintPreviewDialog(printer) {}; + MiqtVirtualQPrintPreviewDialog(QWidget* parent, Qt::WindowFlags flags): QPrintPreviewDialog(parent, flags) {}; + MiqtVirtualQPrintPreviewDialog(QPrinter* printer, QWidget* parent): QPrintPreviewDialog(printer, parent) {}; + MiqtVirtualQPrintPreviewDialog(QPrinter* printer, QWidget* parent, Qt::WindowFlags flags): QPrintPreviewDialog(printer, parent, flags) {}; + + virtual ~MiqtVirtualQPrintPreviewDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPrintPreviewDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPrintPreviewDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPrintPreviewDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QPrintPreviewDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QPrintPreviewDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QPrintPreviewDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPrintPreviewDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPrintPreviewDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPrintPreviewDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPrintPreviewDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QPrintPreviewDialog::open(); + return; + } + + + miqt_exec_callback_QPrintPreviewDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QPrintPreviewDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QPrintPreviewDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QPrintPreviewDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QPrintPreviewDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QPrintPreviewDialog::accept(); + return; + } + + + miqt_exec_callback_QPrintPreviewDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QPrintPreviewDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QPrintPreviewDialog::reject(); + return; + } + + + miqt_exec_callback_QPrintPreviewDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QPrintPreviewDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QPrintPreviewDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QPrintPreviewDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QPrintPreviewDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QPrintPreviewDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QPrintPreviewDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QPrintPreviewDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QPrintPreviewDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QPrintPreviewDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QPrintPreviewDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QPrintPreviewDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QPrintPreviewDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QPrintPreviewDialog::eventFilter(param1, param2); + + } + +}; + +void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new2() { - return new QPrintPreviewDialog(); +void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer) { - return new QPrintPreviewDialog(printer); +void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags) { - return new QPrintPreviewDialog(parent, static_cast(flags)); +void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent, static_cast(flags)); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent) { - return new QPrintPreviewDialog(printer, parent); +void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags) { - return new QPrintPreviewDialog(printer, parent, static_cast(flags)); +void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent, static_cast(flags)); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self) { @@ -80,7 +461,7 @@ void QPrintPreviewDialog_PaintRequested(QPrintPreviewDialog* self, QPrinter* pri } void QPrintPreviewDialog_connect_PaintRequested(QPrintPreviewDialog* self, intptr_t slot) { - QPrintPreviewDialog::connect(self, static_cast(&QPrintPreviewDialog::paintRequested), self, [=](QPrinter* printer) { + MiqtVirtualQPrintPreviewDialog::connect(self, static_cast(&QPrintPreviewDialog::paintRequested), self, [=](QPrinter* printer) { QPrinter* sigval1 = printer; miqt_exec_callback_QPrintPreviewDialog_PaintRequested(slot, sigval1); }); @@ -130,7 +511,123 @@ struct miqt_string QPrintPreviewDialog_TrUtf83(const char* s, const char* c, int return _ms; } -void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self) { - delete self; +void QPrintPreviewDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__SetVisible = slot; +} + +void QPrintPreviewDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QPrintPreviewDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Done = slot; +} + +void QPrintPreviewDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Done(result); +} + +void QPrintPreviewDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QPrintPreviewDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_SizeHint(); +} + +void QPrintPreviewDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPrintPreviewDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPrintPreviewDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Open = slot; +} + +void QPrintPreviewDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Open(); +} + +void QPrintPreviewDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Exec = slot; +} + +int QPrintPreviewDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Exec(); +} + +void QPrintPreviewDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Accept = slot; +} + +void QPrintPreviewDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Accept(); +} + +void QPrintPreviewDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Reject = slot; +} + +void QPrintPreviewDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Reject(); +} + +void QPrintPreviewDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__CloseEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__ShowEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__EventFilter = slot; +} + +bool QPrintPreviewDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qprintpreviewdialog.go b/qt/printsupport/gen_qprintpreviewdialog.go index a2517195..957dd4c2 100644 --- a/qt/printsupport/gen_qprintpreviewdialog.go +++ b/qt/printsupport/gen_qprintpreviewdialog.go @@ -16,7 +16,8 @@ import ( ) type QPrintPreviewDialog struct { - h *C.QPrintPreviewDialog + h *C.QPrintPreviewDialog + isSubclass bool *qt.QDialog } @@ -34,51 +35,107 @@ func (this *QPrintPreviewDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrintPreviewDialog(h *C.QPrintPreviewDialog) *QPrintPreviewDialog { +// newQPrintPreviewDialog constructs the type using only CGO pointers. +func newQPrintPreviewDialog(h *C.QPrintPreviewDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewDialog { if h == nil { return nil } - return &QPrintPreviewDialog{h: h, QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h))} + return &QPrintPreviewDialog{h: h, + QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer) *QPrintPreviewDialog { - return newQPrintPreviewDialog((*C.QPrintPreviewDialog)(h)) +// UnsafeNewQPrintPreviewDialog constructs the type using only unsafe pointers. +func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewDialog { + if h == nil { + return nil + } + + return &QPrintPreviewDialog{h: (*C.QPrintPreviewDialog)(h), + QDialog: qt.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPrintPreviewDialog constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog(parent *qt.QWidget) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog2 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog2() *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new2() - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new2(&outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog3 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog3(printer *QPrinter) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new3(printer.cPointer()) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new3(printer.cPointer(), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog4 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog4(parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog5 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog5(printer *QPrinter, parent *qt.QWidget) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog6 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog6(printer *QPrinter, parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrintPreviewDialog) MetaObject() *qt.QMetaObject { @@ -110,7 +167,7 @@ func QPrintPreviewDialog_TrUtf8(s string) string { } func (this *QPrintPreviewDialog) Printer() *QPrinter { - return UnsafeNewQPrinter(unsafe.Pointer(C.QPrintPreviewDialog_Printer(this.h))) + return UnsafeNewQPrinter(unsafe.Pointer(C.QPrintPreviewDialog_Printer(this.h)), nil, nil) } func (this *QPrintPreviewDialog) SetVisible(visible bool) { @@ -136,7 +193,7 @@ func miqt_exec_callback_QPrintPreviewDialog_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer)) + slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer), nil, nil) gofunc(slotval1) } @@ -185,9 +242,328 @@ func QPrintPreviewDialog_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPrintPreviewDialog) callVirtualBase_SetVisible(visible bool) { + + C.QPrintPreviewDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPrintPreviewDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPrintPreviewDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_SetVisible +func miqt_exec_callback_QPrintPreviewDialog_SetVisible(self *C.QPrintPreviewDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Done(result int) { + + C.QPrintPreviewDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QPrintPreviewDialog) OnDone(slot func(super func(result int), result int)) { + C.QPrintPreviewDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Done +func miqt_exec_callback_QPrintPreviewDialog_Done(self *C.QPrintPreviewDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QPrintPreviewDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewDialog) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QPrintPreviewDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_SizeHint +func miqt_exec_callback_QPrintPreviewDialog_SizeHint(self *C.QPrintPreviewDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QPrintPreviewDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewDialog) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QPrintPreviewDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_MinimumSizeHint +func miqt_exec_callback_QPrintPreviewDialog_MinimumSizeHint(self *C.QPrintPreviewDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Open() { + + C.QPrintPreviewDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QPrintPreviewDialog) OnOpen(slot func(super func())) { + C.QPrintPreviewDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Open +func miqt_exec_callback_QPrintPreviewDialog_Open(self *C.QPrintPreviewDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Exec() int { + + return (int)(C.QPrintPreviewDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QPrintPreviewDialog) OnExec(slot func(super func() int) int) { + C.QPrintPreviewDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Exec +func miqt_exec_callback_QPrintPreviewDialog_Exec(self *C.QPrintPreviewDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Accept() { + + C.QPrintPreviewDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QPrintPreviewDialog) OnAccept(slot func(super func())) { + C.QPrintPreviewDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Accept +func miqt_exec_callback_QPrintPreviewDialog_Accept(self *C.QPrintPreviewDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Reject() { + + C.QPrintPreviewDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QPrintPreviewDialog) OnReject(slot func(super func())) { + C.QPrintPreviewDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Reject +func miqt_exec_callback_QPrintPreviewDialog_Reject(self *C.QPrintPreviewDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_KeyPressEvent(param1 *qt.QKeyEvent) { + + C.QPrintPreviewDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnKeyPressEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QPrintPreviewDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent +func miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_CloseEvent(param1 *qt.QCloseEvent) { + + C.QPrintPreviewDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnCloseEvent(slot func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) { + C.QPrintPreviewDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_CloseEvent +func miqt_exec_callback_QPrintPreviewDialog_CloseEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_ShowEvent(param1 *qt.QShowEvent) { + + C.QPrintPreviewDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnShowEvent(slot func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) { + C.QPrintPreviewDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_ShowEvent +func miqt_exec_callback_QPrintPreviewDialog_ShowEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_ResizeEvent(param1 *qt.QResizeEvent) { + + C.QPrintPreviewDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnResizeEvent(slot func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) { + C.QPrintPreviewDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_ResizeEvent +func miqt_exec_callback_QPrintPreviewDialog_ResizeEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_ContextMenuEvent(param1 *qt.QContextMenuEvent) { + + C.QPrintPreviewDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnContextMenuEvent(slot func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) { + C.QPrintPreviewDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent +func miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_EventFilter(param1 *qt.QObject, param2 *qt.QEvent) bool { + + return (bool)(C.QPrintPreviewDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QPrintPreviewDialog) OnEventFilter(slot func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) { + C.QPrintPreviewDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_EventFilter +func miqt_exec_callback_QPrintPreviewDialog_EventFilter(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPrintPreviewDialog) Delete() { - C.QPrintPreviewDialog_Delete(this.h) + C.QPrintPreviewDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qprintpreviewdialog.h b/qt/printsupport/gen_qprintpreviewdialog.h index cbb10122..86c97f5f 100644 --- a/qt/printsupport/gen_qprintpreviewdialog.h +++ b/qt/printsupport/gen_qprintpreviewdialog.h @@ -15,23 +15,43 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; class QPrintPreviewDialog; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrintPreviewDialog QPrintPreviewDialog; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent); -QPrintPreviewDialog* QPrintPreviewDialog_new2(); -QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer); -QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags); -QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent); -QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags); +void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self); void* QPrintPreviewDialog_Metacast(QPrintPreviewDialog* self, const char* param1); struct miqt_string QPrintPreviewDialog_Tr(const char* s); @@ -45,7 +65,35 @@ struct miqt_string QPrintPreviewDialog_Tr2(const char* s, const char* c); struct miqt_string QPrintPreviewDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QPrintPreviewDialog_TrUtf82(const char* s, const char* c); struct miqt_string QPrintPreviewDialog_TrUtf83(const char* s, const char* c, int n); -void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self); +void QPrintPreviewDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_SetVisible(void* self, bool visible); +void QPrintPreviewDialog_override_virtual_Done(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Done(void* self, int result); +void QPrintPreviewDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewDialog_virtualbase_SizeHint(const void* self); +void QPrintPreviewDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewDialog_virtualbase_MinimumSizeHint(const void* self); +void QPrintPreviewDialog_override_virtual_Open(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Open(void* self); +void QPrintPreviewDialog_override_virtual_Exec(void* self, intptr_t slot); +int QPrintPreviewDialog_virtualbase_Exec(void* self); +void QPrintPreviewDialog_override_virtual_Accept(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Accept(void* self); +void QPrintPreviewDialog_override_virtual_Reject(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Reject(void* self); +void QPrintPreviewDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QPrintPreviewDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QPrintPreviewDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QPrintPreviewDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QPrintPreviewDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QPrintPreviewDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPrintPreviewDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt/printsupport/gen_qprintpreviewwidget.cpp b/qt/printsupport/gen_qprintpreviewwidget.cpp index 351a7847..e3f13f1c 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.cpp +++ b/qt/printsupport/gen_qprintpreviewwidget.cpp @@ -1,36 +1,1076 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qprintpreviewwidget.h" #include "_cgo_export.h" -QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent) { - return new QPrintPreviewWidget(parent); +class MiqtVirtualQPrintPreviewWidget : public virtual QPrintPreviewWidget { +public: + + MiqtVirtualQPrintPreviewWidget(QWidget* parent): QPrintPreviewWidget(parent) {}; + MiqtVirtualQPrintPreviewWidget(QPrinter* printer): QPrintPreviewWidget(printer) {}; + MiqtVirtualQPrintPreviewWidget(): QPrintPreviewWidget() {}; + MiqtVirtualQPrintPreviewWidget(QPrinter* printer, QWidget* parent): QPrintPreviewWidget(printer, parent) {}; + MiqtVirtualQPrintPreviewWidget(QPrinter* printer, QWidget* parent, Qt::WindowFlags flags): QPrintPreviewWidget(printer, parent, flags) {}; + MiqtVirtualQPrintPreviewWidget(QWidget* parent, Qt::WindowFlags flags): QPrintPreviewWidget(parent, flags) {}; + + virtual ~MiqtVirtualQPrintPreviewWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPrintPreviewWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPrintPreviewWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPrintPreviewWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPrintPreviewWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPrintPreviewWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPrintPreviewWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPrintPreviewWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPrintPreviewWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPrintPreviewWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPrintPreviewWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QPrintPreviewWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QPrintPreviewWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QPrintPreviewWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QPrintPreviewWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QPrintPreviewWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPrintPreviewWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPrintPreviewWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPrintPreviewWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPrintPreviewWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QPrintPreviewWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QPrintPreviewWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QPrintPreviewWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QPrintPreviewWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QPrintPreviewWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QPrintPreviewWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QPrintPreviewWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QPrintPreviewWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QPrintPreviewWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QPrintPreviewWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QPrintPreviewWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QPrintPreviewWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QPrintPreviewWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QPrintPreviewWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QPrintPreviewWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QPrintPreviewWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QPrintPreviewWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QPrintPreviewWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QPrintPreviewWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QPrintPreviewWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QPrintPreviewWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QPrintPreviewWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QPrintPreviewWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QPrintPreviewWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QPrintPreviewWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QPrintPreviewWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QPrintPreviewWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QPrintPreviewWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QPrintPreviewWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QPrintPreviewWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QPrintPreviewWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QPrintPreviewWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QPrintPreviewWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QPrintPreviewWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QPrintPreviewWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QPrintPreviewWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QPrintPreviewWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QPrintPreviewWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QPrintPreviewWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QPrintPreviewWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QPrintPreviewWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QPrintPreviewWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QPrintPreviewWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QPrintPreviewWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QPrintPreviewWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QPrintPreviewWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QPrintPreviewWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QPrintPreviewWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QPrintPreviewWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPrintPreviewWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QPrintPreviewWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QPrintPreviewWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPrintPreviewWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPrintPreviewWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QPrintPreviewWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPrintPreviewWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QPrintPreviewWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPrintPreviewWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QPrintPreviewWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QPrintPreviewWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QPrintPreviewWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QPrintPreviewWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QPrintPreviewWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QPrintPreviewWidget::focusNextPrevChild(next); + + } + +}; + +void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer) { - return new QPrintPreviewWidget(printer); +void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new3() { - return new QPrintPreviewWidget(); +void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent) { - return new QPrintPreviewWidget(printer, parent); +void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags) { - return new QPrintPreviewWidget(printer, parent, static_cast(flags)); +void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent, static_cast(flags)); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags) { - return new QPrintPreviewWidget(parent, static_cast(flags)); +void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent, static_cast(flags)); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self) { @@ -164,7 +1204,7 @@ void QPrintPreviewWidget_PaintRequested(QPrintPreviewWidget* self, QPrinter* pri } void QPrintPreviewWidget_connect_PaintRequested(QPrintPreviewWidget* self, intptr_t slot) { - QPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::paintRequested), self, [=](QPrinter* printer) { + MiqtVirtualQPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::paintRequested), self, [=](QPrinter* printer) { QPrinter* sigval1 = printer; miqt_exec_callback_QPrintPreviewWidget_PaintRequested(slot, sigval1); }); @@ -175,7 +1215,7 @@ void QPrintPreviewWidget_PreviewChanged(QPrintPreviewWidget* self) { } void QPrintPreviewWidget_connect_PreviewChanged(QPrintPreviewWidget* self, intptr_t slot) { - QPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::previewChanged), self, [=]() { + MiqtVirtualQPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::previewChanged), self, [=]() { miqt_exec_callback_QPrintPreviewWidget_PreviewChanged(slot); }); } @@ -232,7 +1272,339 @@ void QPrintPreviewWidget_ZoomOut1(QPrintPreviewWidget* self, double zoom) { self->zoomOut(static_cast(zoom)); } -void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self) { - delete self; +void QPrintPreviewWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__SetVisible = slot; +} + +void QPrintPreviewWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QPrintPreviewWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DevType = slot; +} + +int QPrintPreviewWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DevType(); +} + +void QPrintPreviewWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QPrintPreviewWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_SizeHint(); +} + +void QPrintPreviewWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPrintPreviewWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPrintPreviewWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QPrintPreviewWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QPrintPreviewWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QPrintPreviewWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QPrintPreviewWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPrintPreviewWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QPrintPreviewWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__Event = slot; +} + +bool QPrintPreviewWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_Event(event); +} + +void QPrintPreviewWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__WheelEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QPrintPreviewWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QPrintPreviewWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QPrintPreviewWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QPrintPreviewWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QPrintPreviewWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__EnterEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QPrintPreviewWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__PaintEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MoveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QPrintPreviewWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__CloseEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QPrintPreviewWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__TabletEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ActionEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DropEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ShowEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QPrintPreviewWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__HideEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QPrintPreviewWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QPrintPreviewWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QPrintPreviewWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QPrintPreviewWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__Metric = slot; +} + +int QPrintPreviewWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_Metric(param1); +} + +void QPrintPreviewWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__InitPainter = slot; +} + +void QPrintPreviewWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QPrintPreviewWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPrintPreviewWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QPrintPreviewWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPrintPreviewWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QPrintPreviewWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QPrintPreviewWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QPrintPreviewWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QPrintPreviewWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QPrintPreviewWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt/printsupport/gen_qprintpreviewwidget.go b/qt/printsupport/gen_qprintpreviewwidget.go index dae5d9eb..3c95e5a8 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.go +++ b/qt/printsupport/gen_qprintpreviewwidget.go @@ -32,7 +32,8 @@ const ( ) type QPrintPreviewWidget struct { - h *C.QPrintPreviewWidget + h *C.QPrintPreviewWidget + isSubclass bool *qt.QWidget } @@ -50,51 +51,101 @@ func (this *QPrintPreviewWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrintPreviewWidget(h *C.QPrintPreviewWidget) *QPrintPreviewWidget { +// newQPrintPreviewWidget constructs the type using only CGO pointers. +func newQPrintPreviewWidget(h *C.QPrintPreviewWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewWidget { if h == nil { return nil } - return &QPrintPreviewWidget{h: h, QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h))} + return &QPrintPreviewWidget{h: h, + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer) *QPrintPreviewWidget { - return newQPrintPreviewWidget((*C.QPrintPreviewWidget)(h)) +// UnsafeNewQPrintPreviewWidget constructs the type using only unsafe pointers. +func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewWidget { + if h == nil { + return nil + } + + return &QPrintPreviewWidget{h: (*C.QPrintPreviewWidget)(h), + QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPrintPreviewWidget constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget(parent *qt.QWidget) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget2 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget2(printer *QPrinter) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new2(printer.cPointer()) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new2(printer.cPointer(), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget3 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget3() *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new3() - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new3(&outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget4 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget4(printer *QPrinter, parent *qt.QWidget) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget5 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget5(printer *QPrinter, parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget6 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget6(parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrintPreviewWidget) MetaObject() *qt.QMetaObject { @@ -232,7 +283,7 @@ func miqt_exec_callback_QPrintPreviewWidget_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer)) + slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer), nil, nil) gofunc(slotval1) } @@ -306,9 +357,975 @@ func (this *QPrintPreviewWidget) ZoomOut1(zoom float64) { C.QPrintPreviewWidget_ZoomOut1(this.h, (C.double)(zoom)) } +func (this *QPrintPreviewWidget) callVirtualBase_SetVisible(visible bool) { + + C.QPrintPreviewWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPrintPreviewWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPrintPreviewWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_SetVisible +func miqt_exec_callback_QPrintPreviewWidget_SetVisible(self *C.QPrintPreviewWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DevType() int { + + return (int)(C.QPrintPreviewWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPrintPreviewWidget) OnDevType(slot func(super func() int) int) { + C.QPrintPreviewWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DevType +func miqt_exec_callback_QPrintPreviewWidget_DevType(self *C.QPrintPreviewWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QPrintPreviewWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewWidget) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QPrintPreviewWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_SizeHint +func miqt_exec_callback_QPrintPreviewWidget_SizeHint(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QPrintPreviewWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewWidget) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QPrintPreviewWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MinimumSizeHint +func miqt_exec_callback_QPrintPreviewWidget_MinimumSizeHint(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QPrintPreviewWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPrintPreviewWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QPrintPreviewWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_HeightForWidth +func miqt_exec_callback_QPrintPreviewWidget_HeightForWidth(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QPrintPreviewWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QPrintPreviewWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QPrintPreviewWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_HasHeightForWidth +func miqt_exec_callback_QPrintPreviewWidget_HasHeightForWidth(self *C.QPrintPreviewWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QPrintPreviewWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPrintPreviewWidget) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QPrintPreviewWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_PaintEngine +func miqt_exec_callback_QPrintPreviewWidget_PaintEngine(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QPrintPreviewWidget_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPrintPreviewWidget) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QPrintPreviewWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_Event +func miqt_exec_callback_QPrintPreviewWidget_Event(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MousePressEvent +func miqt_exec_callback_QPrintPreviewWidget_MousePressEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent +func miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent +func miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent +func miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { + + C.QPrintPreviewWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.QPrintPreviewWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_WheelEvent +func miqt_exec_callback_QPrintPreviewWidget_WheelEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.QPrintPreviewWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QPrintPreviewWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent +func miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_KeyReleaseEvent(event *qt.QKeyEvent) { + + C.QPrintPreviewWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnKeyReleaseEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QPrintPreviewWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent +func miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.QPrintPreviewWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QPrintPreviewWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_FocusInEvent +func miqt_exec_callback_QPrintPreviewWidget_FocusInEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.QPrintPreviewWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QPrintPreviewWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent +func miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QPrintPreviewWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QPrintPreviewWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_EnterEvent +func miqt_exec_callback_QPrintPreviewWidget_EnterEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QPrintPreviewWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QPrintPreviewWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_LeaveEvent +func miqt_exec_callback_QPrintPreviewWidget_LeaveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QPrintPreviewWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.QPrintPreviewWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_PaintEvent +func miqt_exec_callback_QPrintPreviewWidget_PaintEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QPrintPreviewWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QPrintPreviewWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MoveEvent +func miqt_exec_callback_QPrintPreviewWidget_MoveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QPrintPreviewWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.QPrintPreviewWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ResizeEvent +func miqt_exec_callback_QPrintPreviewWidget_ResizeEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QPrintPreviewWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + C.QPrintPreviewWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_CloseEvent +func miqt_exec_callback_QPrintPreviewWidget_CloseEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ContextMenuEvent(event *qt.QContextMenuEvent) { + + C.QPrintPreviewWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnContextMenuEvent(slot func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) { + C.QPrintPreviewWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent +func miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QPrintPreviewWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + C.QPrintPreviewWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_TabletEvent +func miqt_exec_callback_QPrintPreviewWidget_TabletEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QPrintPreviewWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + C.QPrintPreviewWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ActionEvent +func miqt_exec_callback_QPrintPreviewWidget_ActionEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DragEnterEvent(event *qt.QDragEnterEvent) { + + C.QPrintPreviewWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDragEnterEvent(slot func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) { + C.QPrintPreviewWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent +func miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DragMoveEvent(event *qt.QDragMoveEvent) { + + C.QPrintPreviewWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDragMoveEvent(slot func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) { + C.QPrintPreviewWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent +func miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DragLeaveEvent(event *qt.QDragLeaveEvent) { + + C.QPrintPreviewWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDragLeaveEvent(slot func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) { + C.QPrintPreviewWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent +func miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DropEvent(event *qt.QDropEvent) { + + C.QPrintPreviewWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDropEvent(slot func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) { + C.QPrintPreviewWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DropEvent +func miqt_exec_callback_QPrintPreviewWidget_DropEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QPrintPreviewWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QPrintPreviewWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ShowEvent +func miqt_exec_callback_QPrintPreviewWidget_ShowEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QPrintPreviewWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QPrintPreviewWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_HideEvent +func miqt_exec_callback_QPrintPreviewWidget_HideEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QPrintPreviewWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QPrintPreviewWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QPrintPreviewWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_NativeEvent +func miqt_exec_callback_QPrintPreviewWidget_NativeEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QPrintPreviewWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + C.QPrintPreviewWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ChangeEvent +func miqt_exec_callback_QPrintPreviewWidget_ChangeEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPrintPreviewWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPrintPreviewWidget) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QPrintPreviewWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_Metric +func miqt_exec_callback_QPrintPreviewWidget_Metric(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QPrintPreviewWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QPrintPreviewWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_InitPainter +func miqt_exec_callback_QPrintPreviewWidget_InitPainter(self *C.QPrintPreviewWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QPrintPreviewWidget_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QPrintPreviewWidget) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QPrintPreviewWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_Redirected +func miqt_exec_callback_QPrintPreviewWidget_Redirected(self *C.QPrintPreviewWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QPrintPreviewWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPrintPreviewWidget) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QPrintPreviewWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_SharedPainter +func miqt_exec_callback_QPrintPreviewWidget_SharedPainter(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QPrintPreviewWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QPrintPreviewWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent +func miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_InputMethodQuery(param1 qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QPrintPreviewWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewWidget) OnInputMethodQuery(slot func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) { + C.QPrintPreviewWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_InputMethodQuery +func miqt_exec_callback_QPrintPreviewWidget_InputMethodQuery(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QPrintPreviewWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QPrintPreviewWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QPrintPreviewWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_FocusNextPrevChild +func miqt_exec_callback_QPrintPreviewWidget_FocusNextPrevChild(self *C.QPrintPreviewWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPrintPreviewWidget) Delete() { - C.QPrintPreviewWidget_Delete(this.h) + C.QPrintPreviewWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt/printsupport/gen_qprintpreviewwidget.h b/qt/printsupport/gen_qprintpreviewwidget.h index 182f80b0..c7f141b4 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.h +++ b/qt/printsupport/gen_qprintpreviewwidget.h @@ -15,23 +15,77 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QPrintPreviewWidget; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QPrintPreviewWidget QPrintPreviewWidget; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent); -QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer); -QPrintPreviewWidget* QPrintPreviewWidget_new3(); -QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent); -QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags); -QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags); +void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self); void* QPrintPreviewWidget_Metacast(QPrintPreviewWidget* self, const char* param1); struct miqt_string QPrintPreviewWidget_Tr(const char* s); @@ -69,7 +123,89 @@ struct miqt_string QPrintPreviewWidget_TrUtf82(const char* s, const char* c); struct miqt_string QPrintPreviewWidget_TrUtf83(const char* s, const char* c, int n); void QPrintPreviewWidget_ZoomIn1(QPrintPreviewWidget* self, double zoom); void QPrintPreviewWidget_ZoomOut1(QPrintPreviewWidget* self, double zoom); -void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self); +void QPrintPreviewWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_SetVisible(void* self, bool visible); +void QPrintPreviewWidget_override_virtual_DevType(void* self, intptr_t slot); +int QPrintPreviewWidget_virtualbase_DevType(const void* self); +void QPrintPreviewWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewWidget_virtualbase_SizeHint(const void* self); +void QPrintPreviewWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewWidget_virtualbase_MinimumSizeHint(const void* self); +void QPrintPreviewWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QPrintPreviewWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QPrintPreviewWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_HasHeightForWidth(const void* self); +void QPrintPreviewWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPrintPreviewWidget_virtualbase_PaintEngine(const void* self); +void QPrintPreviewWidget_override_virtual_Event(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_Event(void* self, QEvent* event); +void QPrintPreviewWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QPrintPreviewWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QPrintPreviewWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QPrintPreviewWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QPrintPreviewWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QPrintPreviewWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QPrintPreviewWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QPrintPreviewWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QPrintPreviewWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QPrintPreviewWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QPrintPreviewWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QPrintPreviewWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QPrintPreviewWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QPrintPreviewWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QPrintPreviewWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QPrintPreviewWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QPrintPreviewWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QPrintPreviewWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QPrintPreviewWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QPrintPreviewWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QPrintPreviewWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QPrintPreviewWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QPrintPreviewWidget_override_virtual_Metric(void* self, intptr_t slot); +int QPrintPreviewWidget_virtualbase_Metric(const void* self, int param1); +void QPrintPreviewWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPrintPreviewWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPrintPreviewWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QPrintPreviewWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPrintPreviewWidget_virtualbase_SharedPainter(const void* self); +void QPrintPreviewWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QPrintPreviewWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QPrintPreviewWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QPrintPreviewWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/cbor/gen_qcborarray.cpp b/qt6/cbor/gen_qcborarray.cpp index dd23072e..ccbb9117 100644 --- a/qt6/cbor/gen_qcborarray.cpp +++ b/qt6/cbor/gen_qcborarray.cpp @@ -13,12 +13,14 @@ #include "gen_qcborarray.h" #include "_cgo_export.h" -QCborArray* QCborArray_new() { - return new QCborArray(); +void QCborArray_new(QCborArray** outptr_QCborArray) { + QCborArray* ret = new QCborArray(); + *outptr_QCborArray = ret; } -QCborArray* QCborArray_new2(QCborArray* other) { - return new QCborArray(*other); +void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray) { + QCborArray* ret = new QCborArray(*other); + *outptr_QCborArray = ret; } void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other) { @@ -241,16 +243,22 @@ QJsonArray* QCborArray_ToJsonArray(const QCborArray* self) { return new QJsonArray(self->toJsonArray()); } -void QCborArray_Delete(QCborArray* self) { - delete self; +void QCborArray_Delete(QCborArray* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborArray__Iterator* QCborArray__Iterator_new() { - return new QCborArray::Iterator(); +void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator) { + QCborArray::Iterator* ret = new QCborArray::Iterator(); + *outptr_QCborArray__Iterator = ret; } -QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1) { - return new QCborArray::Iterator(*param1); +void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator) { + QCborArray::Iterator* ret = new QCborArray::Iterator(*param1); + *outptr_QCborArray__Iterator = ret; } void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other) { @@ -366,16 +374,22 @@ ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborAr return static_cast(_ret); } -void QCborArray__Iterator_Delete(QCborArray__Iterator* self) { - delete self; +void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborArray__ConstIterator* QCborArray__ConstIterator_new() { - return new QCborArray::ConstIterator(); +void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { + QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(); + *outptr_QCborArray__ConstIterator = ret; } -QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1) { - return new QCborArray::ConstIterator(*param1); +void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { + QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(*param1); + *outptr_QCborArray__ConstIterator = ret; } void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other) { @@ -487,7 +501,11 @@ ptrdiff_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(con return static_cast(_ret); } -void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self) { - delete self; +void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/cbor/gen_qcborarray.go b/qt6/cbor/gen_qcborarray.go index 012bff7b..e5458a85 100644 --- a/qt6/cbor/gen_qcborarray.go +++ b/qt6/cbor/gen_qcborarray.go @@ -15,7 +15,8 @@ import ( ) type QCborArray struct { - h *C.QCborArray + h *C.QCborArray + isSubclass bool } func (this *QCborArray) cPointer() *C.QCborArray { @@ -32,6 +33,7 @@ func (this *QCborArray) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborArray constructs the type using only CGO pointers. func newQCborArray(h *C.QCborArray) *QCborArray { if h == nil { return nil @@ -39,20 +41,33 @@ func newQCborArray(h *C.QCborArray) *QCborArray { return &QCborArray{h: h} } +// UnsafeNewQCborArray constructs the type using only unsafe pointers. func UnsafeNewQCborArray(h unsafe.Pointer) *QCborArray { - return newQCborArray((*C.QCborArray)(h)) + if h == nil { + return nil + } + + return &QCborArray{h: (*C.QCborArray)(h)} } // NewQCborArray constructs a new QCborArray object. func NewQCborArray() *QCborArray { - ret := C.QCborArray_new() - return newQCborArray(ret) + var outptr_QCborArray *C.QCborArray = nil + + C.QCborArray_new(&outptr_QCborArray) + ret := newQCborArray(outptr_QCborArray) + ret.isSubclass = true + return ret } // NewQCborArray2 constructs a new QCborArray object. func NewQCborArray2(other *QCborArray) *QCborArray { - ret := C.QCborArray_new2(other.cPointer()) - return newQCborArray(ret) + var outptr_QCborArray *C.QCborArray = nil + + C.QCborArray_new2(other.cPointer(), &outptr_QCborArray) + ret := newQCborArray(outptr_QCborArray) + ret.isSubclass = true + return ret } func (this *QCborArray) OperatorAssign(other *QCborArray) { @@ -112,21 +127,21 @@ func (this *QCborArray) OperatorSubscript(i int64) *QCborValue { func (this *QCborArray) First2() *QCborValueRef { _ret := C.QCborArray_First2(this.h) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborArray) Last2() *QCborValueRef { _ret := C.QCborArray_Last2(this.h) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborArray) OperatorSubscriptWithQsizetype(i int64) *QCborValueRef { _ret := C.QCborArray_OperatorSubscriptWithQsizetype(this.h, (C.ptrdiff_t)(i)) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -362,7 +377,7 @@ func (this *QCborArray) ToJsonArray() *qt6.QJsonArray { // Delete this object from C++ memory. func (this *QCborArray) Delete() { - C.QCborArray_Delete(this.h) + C.QCborArray_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -375,7 +390,8 @@ func (this *QCborArray) GoGC() { } type QCborArray__Iterator struct { - h *C.QCborArray__Iterator + h *C.QCborArray__Iterator + isSubclass bool } func (this *QCborArray__Iterator) cPointer() *C.QCborArray__Iterator { @@ -392,6 +408,7 @@ func (this *QCborArray__Iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborArray__Iterator constructs the type using only CGO pointers. func newQCborArray__Iterator(h *C.QCborArray__Iterator) *QCborArray__Iterator { if h == nil { return nil @@ -399,20 +416,33 @@ func newQCborArray__Iterator(h *C.QCborArray__Iterator) *QCborArray__Iterator { return &QCborArray__Iterator{h: h} } +// UnsafeNewQCborArray__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__Iterator(h unsafe.Pointer) *QCborArray__Iterator { - return newQCborArray__Iterator((*C.QCborArray__Iterator)(h)) + if h == nil { + return nil + } + + return &QCborArray__Iterator{h: (*C.QCborArray__Iterator)(h)} } // NewQCborArray__Iterator constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator() *QCborArray__Iterator { - ret := C.QCborArray__Iterator_new() - return newQCborArray__Iterator(ret) + var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil + + C.QCborArray__Iterator_new(&outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret.isSubclass = true + return ret } // NewQCborArray__Iterator2 constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator2(param1 *QCborArray__Iterator) *QCborArray__Iterator { - ret := C.QCborArray__Iterator_new2(param1.cPointer()) - return newQCborArray__Iterator(ret) + var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil + + C.QCborArray__Iterator_new2(param1.cPointer(), &outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret.isSubclass = true + return ret } func (this *QCborArray__Iterator) OperatorAssign(other *QCborArray__Iterator) { @@ -421,13 +451,13 @@ func (this *QCborArray__Iterator) OperatorAssign(other *QCborArray__Iterator) { func (this *QCborArray__Iterator) OperatorMultiply() *QCborValueRef { _ret := C.QCborArray__Iterator_OperatorMultiply(this.h) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborArray__Iterator) OperatorMinusGreater() *QCborValueRef { - return UnsafeNewQCborValueRef(unsafe.Pointer(C.QCborArray__Iterator_OperatorMinusGreater(this.h))) + return UnsafeNewQCborValueRef(unsafe.Pointer(C.QCborArray__Iterator_OperatorMinusGreater(this.h)), nil) } func (this *QCborArray__Iterator) OperatorMinusGreater2() *QCborValueConstRef { @@ -436,7 +466,7 @@ func (this *QCborArray__Iterator) OperatorMinusGreater2() *QCborValueConstRef { func (this *QCborArray__Iterator) OperatorSubscript(j int64) *QCborValueRef { _ret := C.QCborArray__Iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j)) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -539,7 +569,7 @@ func (this *QCborArray__Iterator) OperatorMinusWithQCborArrayIterator(j QCborArr // Delete this object from C++ memory. func (this *QCborArray__Iterator) Delete() { - C.QCborArray__Iterator_Delete(this.h) + C.QCborArray__Iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -552,7 +582,8 @@ func (this *QCborArray__Iterator) GoGC() { } type QCborArray__ConstIterator struct { - h *C.QCborArray__ConstIterator + h *C.QCborArray__ConstIterator + isSubclass bool } func (this *QCborArray__ConstIterator) cPointer() *C.QCborArray__ConstIterator { @@ -569,6 +600,7 @@ func (this *QCborArray__ConstIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborArray__ConstIterator constructs the type using only CGO pointers. func newQCborArray__ConstIterator(h *C.QCborArray__ConstIterator) *QCborArray__ConstIterator { if h == nil { return nil @@ -576,20 +608,33 @@ func newQCborArray__ConstIterator(h *C.QCborArray__ConstIterator) *QCborArray__C return &QCborArray__ConstIterator{h: h} } +// UnsafeNewQCborArray__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__ConstIterator(h unsafe.Pointer) *QCborArray__ConstIterator { - return newQCborArray__ConstIterator((*C.QCborArray__ConstIterator)(h)) + if h == nil { + return nil + } + + return &QCborArray__ConstIterator{h: (*C.QCborArray__ConstIterator)(h)} } // NewQCborArray__ConstIterator constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator() *QCborArray__ConstIterator { - ret := C.QCborArray__ConstIterator_new() - return newQCborArray__ConstIterator(ret) + var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil + + C.QCborArray__ConstIterator_new(&outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret.isSubclass = true + return ret } // NewQCborArray__ConstIterator2 constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator2(param1 *QCborArray__ConstIterator) *QCborArray__ConstIterator { - ret := C.QCborArray__ConstIterator_new2(param1.cPointer()) - return newQCborArray__ConstIterator(ret) + var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil + + C.QCborArray__ConstIterator_new2(param1.cPointer(), &outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret.isSubclass = true + return ret } func (this *QCborArray__ConstIterator) OperatorAssign(other *QCborArray__ConstIterator) { @@ -712,7 +757,7 @@ func (this *QCborArray__ConstIterator) OperatorMinusWithQCborArrayConstIterator( // Delete this object from C++ memory. func (this *QCborArray__ConstIterator) Delete() { - C.QCborArray__ConstIterator_Delete(this.h) + C.QCborArray__ConstIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/cbor/gen_qcborarray.h b/qt6/cbor/gen_qcborarray.h index eff255f0..827f4b1f 100644 --- a/qt6/cbor/gen_qcborarray.h +++ b/qt6/cbor/gen_qcborarray.h @@ -40,8 +40,8 @@ typedef struct QCborValueRef QCborValueRef; typedef struct QJsonArray QJsonArray; #endif -QCborArray* QCborArray_new(); -QCborArray* QCborArray_new2(QCborArray* other); +void QCborArray_new(QCborArray** outptr_QCborArray); +void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray); void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other); void QCborArray_Swap(QCborArray* self, QCborArray* other); QCborValue* QCborArray_ToCborValue(const QCborArray* self); @@ -94,10 +94,10 @@ QCborArray* QCborArray_OperatorShiftLeft(QCborArray* self, QCborValue* v); QCborArray* QCborArray_FromStringList(struct miqt_array /* of struct miqt_string */ list); QCborArray* QCborArray_FromJsonArray(QJsonArray* array); QJsonArray* QCborArray_ToJsonArray(const QCborArray* self); -void QCborArray_Delete(QCborArray* self); +void QCborArray_Delete(QCborArray* self, bool isSubclass); -QCborArray__Iterator* QCborArray__Iterator_new(); -QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1); +void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator); +void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator); void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other); QCborValueRef* QCborArray__Iterator_OperatorMultiply(const QCborArray__Iterator* self); QCborValueRef* QCborArray__Iterator_OperatorMinusGreater(QCborArray__Iterator* self); @@ -124,10 +124,10 @@ QCborArray__Iterator* QCborArray__Iterator_OperatorMinusAssign(QCborArray__Itera QCborArray__Iterator* QCborArray__Iterator_OperatorPlus(const QCborArray__Iterator* self, ptrdiff_t j); QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Iterator* self, ptrdiff_t j); ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j); -void QCborArray__Iterator_Delete(QCborArray__Iterator* self); +void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass); -QCborArray__ConstIterator* QCborArray__ConstIterator_new(); -QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1); +void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); +void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other); QCborValueConstRef* QCborArray__ConstIterator_OperatorMultiply(const QCborArray__ConstIterator* self); QCborValueConstRef* QCborArray__ConstIterator_OperatorMinusGreater(const QCborArray__ConstIterator* self); @@ -153,7 +153,7 @@ QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusAssign(QCborAr QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlus(const QCborArray__ConstIterator* self, ptrdiff_t j); QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinus(const QCborArray__ConstIterator* self, ptrdiff_t j); ptrdiff_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(const QCborArray__ConstIterator* self, QCborArray__ConstIterator* j); -void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self); +void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/cbor/gen_qcborcommon.cpp b/qt6/cbor/gen_qcborcommon.cpp index 8224dc8e..354b359d 100644 --- a/qt6/cbor/gen_qcborcommon.cpp +++ b/qt6/cbor/gen_qcborcommon.cpp @@ -17,7 +17,11 @@ struct miqt_string QCborError_ToString(const QCborError* self) { return _ms; } -void QCborError_Delete(QCborError* self) { - delete self; +void QCborError_Delete(QCborError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/cbor/gen_qcborcommon.go b/qt6/cbor/gen_qcborcommon.go index e1e52613..0d415e35 100644 --- a/qt6/cbor/gen_qcborcommon.go +++ b/qt6/cbor/gen_qcborcommon.go @@ -75,7 +75,8 @@ const ( ) type QCborError struct { - h *C.QCborError + h *C.QCborError + isSubclass bool } func (this *QCborError) cPointer() *C.QCborError { @@ -92,6 +93,7 @@ func (this *QCborError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborError constructs the type using only CGO pointers. func newQCborError(h *C.QCborError) *QCborError { if h == nil { return nil @@ -99,8 +101,13 @@ func newQCborError(h *C.QCborError) *QCborError { return &QCborError{h: h} } +// UnsafeNewQCborError constructs the type using only unsafe pointers. func UnsafeNewQCborError(h unsafe.Pointer) *QCborError { - return newQCborError((*C.QCborError)(h)) + if h == nil { + return nil + } + + return &QCborError{h: (*C.QCborError)(h)} } func (this *QCborError) ToString() string { @@ -112,7 +119,7 @@ func (this *QCborError) ToString() string { // Delete this object from C++ memory. func (this *QCborError) Delete() { - C.QCborError_Delete(this.h) + C.QCborError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/cbor/gen_qcborcommon.h b/qt6/cbor/gen_qcborcommon.h index 3237ee4b..15d1c03f 100644 --- a/qt6/cbor/gen_qcborcommon.h +++ b/qt6/cbor/gen_qcborcommon.h @@ -21,7 +21,7 @@ typedef struct QCborError QCborError; #endif struct miqt_string QCborError_ToString(const QCborError* self); -void QCborError_Delete(QCborError* self); +void QCborError_Delete(QCborError* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/cbor/gen_qcbormap.cpp b/qt6/cbor/gen_qcbormap.cpp index d42a42ed..e0c0854a 100644 --- a/qt6/cbor/gen_qcbormap.cpp +++ b/qt6/cbor/gen_qcbormap.cpp @@ -15,12 +15,14 @@ #include "gen_qcbormap.h" #include "_cgo_export.h" -QCborMap* QCborMap_new() { - return new QCborMap(); +void QCborMap_new(QCborMap** outptr_QCborMap) { + QCborMap* ret = new QCborMap(); + *outptr_QCborMap = ret; } -QCborMap* QCborMap_new2(QCborMap* other) { - return new QCborMap(*other); +void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap) { + QCborMap* ret = new QCborMap(*other); + *outptr_QCborMap = ret; } void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other) { @@ -349,16 +351,22 @@ QJsonObject* QCborMap_ToJsonObject(const QCborMap* self) { return new QJsonObject(self->toJsonObject()); } -void QCborMap_Delete(QCborMap* self) { - delete self; +void QCborMap_Delete(QCborMap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborMap__Iterator* QCborMap__Iterator_new() { - return new QCborMap::Iterator(); +void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator) { + QCborMap::Iterator* ret = new QCborMap::Iterator(); + *outptr_QCborMap__Iterator = ret; } -QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1) { - return new QCborMap::Iterator(*param1); +void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator) { + QCborMap::Iterator* ret = new QCborMap::Iterator(*param1); + *outptr_QCborMap__Iterator = ret; } void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other) { @@ -502,16 +510,22 @@ ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__I return static_cast(_ret); } -void QCborMap__Iterator_Delete(QCborMap__Iterator* self) { - delete self; +void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborMap__ConstIterator* QCborMap__ConstIterator_new() { - return new QCborMap::ConstIterator(); +void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { + QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(); + *outptr_QCborMap__ConstIterator = ret; } -QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1) { - return new QCborMap::ConstIterator(*param1); +void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { + QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(*param1); + *outptr_QCborMap__ConstIterator = ret; } void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other) { @@ -651,7 +665,11 @@ ptrdiff_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const Q return static_cast(_ret); } -void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self) { - delete self; +void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/cbor/gen_qcbormap.go b/qt6/cbor/gen_qcbormap.go index c21f4120..7decf841 100644 --- a/qt6/cbor/gen_qcbormap.go +++ b/qt6/cbor/gen_qcbormap.go @@ -15,7 +15,8 @@ import ( ) type QCborMap struct { - h *C.QCborMap + h *C.QCborMap + isSubclass bool } func (this *QCborMap) cPointer() *C.QCborMap { @@ -32,6 +33,7 @@ func (this *QCborMap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborMap constructs the type using only CGO pointers. func newQCborMap(h *C.QCborMap) *QCborMap { if h == nil { return nil @@ -39,20 +41,33 @@ func newQCborMap(h *C.QCborMap) *QCborMap { return &QCborMap{h: h} } +// UnsafeNewQCborMap constructs the type using only unsafe pointers. func UnsafeNewQCborMap(h unsafe.Pointer) *QCborMap { - return newQCborMap((*C.QCborMap)(h)) + if h == nil { + return nil + } + + return &QCborMap{h: (*C.QCborMap)(h)} } // NewQCborMap constructs a new QCborMap object. func NewQCborMap() *QCborMap { - ret := C.QCborMap_new() - return newQCborMap(ret) + var outptr_QCborMap *C.QCborMap = nil + + C.QCborMap_new(&outptr_QCborMap) + ret := newQCborMap(outptr_QCborMap) + ret.isSubclass = true + return ret } // NewQCborMap2 constructs a new QCborMap object. func NewQCborMap2(other *QCborMap) *QCborMap { - ret := C.QCborMap_new2(other.cPointer()) - return newQCborMap(ret) + var outptr_QCborMap *C.QCborMap = nil + + C.QCborMap_new2(other.cPointer(), &outptr_QCborMap) + ret := newQCborMap(outptr_QCborMap) + ret.isSubclass = true + return ret } func (this *QCborMap) OperatorAssign(other *QCborMap) { @@ -147,7 +162,7 @@ func (this *QCborMap) OperatorSubscript3(key *QCborValue) *QCborValue { func (this *QCborMap) OperatorSubscript4(key int64) *QCborValueRef { _ret := C.QCborMap_OperatorSubscript4(this.h, (C.longlong)(key)) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -158,14 +173,14 @@ func (this *QCborMap) OperatorSubscript6(key string) *QCborValueRef { key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) _ret := C.QCborMap_OperatorSubscript6(this.h, key_ms) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborMap) OperatorSubscript7(key *QCborValue) *QCborValueRef { _ret := C.QCborMap_OperatorSubscript7(this.h, key.cPointer()) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -560,7 +575,7 @@ func (this *QCborMap) ToJsonObject() *qt6.QJsonObject { // Delete this object from C++ memory. func (this *QCborMap) Delete() { - C.QCborMap_Delete(this.h) + C.QCborMap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -573,7 +588,8 @@ func (this *QCborMap) GoGC() { } type QCborMap__Iterator struct { - h *C.QCborMap__Iterator + h *C.QCborMap__Iterator + isSubclass bool } func (this *QCborMap__Iterator) cPointer() *C.QCborMap__Iterator { @@ -590,6 +606,7 @@ func (this *QCborMap__Iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborMap__Iterator constructs the type using only CGO pointers. func newQCborMap__Iterator(h *C.QCborMap__Iterator) *QCborMap__Iterator { if h == nil { return nil @@ -597,20 +614,33 @@ func newQCborMap__Iterator(h *C.QCborMap__Iterator) *QCborMap__Iterator { return &QCborMap__Iterator{h: h} } +// UnsafeNewQCborMap__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__Iterator(h unsafe.Pointer) *QCborMap__Iterator { - return newQCborMap__Iterator((*C.QCborMap__Iterator)(h)) + if h == nil { + return nil + } + + return &QCborMap__Iterator{h: (*C.QCborMap__Iterator)(h)} } // NewQCborMap__Iterator constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator() *QCborMap__Iterator { - ret := C.QCborMap__Iterator_new() - return newQCborMap__Iterator(ret) + var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil + + C.QCborMap__Iterator_new(&outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret.isSubclass = true + return ret } // NewQCborMap__Iterator2 constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator2(param1 *QCborMap__Iterator) *QCborMap__Iterator { - ret := C.QCborMap__Iterator_new2(param1.cPointer()) - return newQCborMap__Iterator(ret) + var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil + + C.QCborMap__Iterator_new2(param1.cPointer(), &outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret.isSubclass = true + return ret } func (this *QCborMap__Iterator) OperatorAssign(other *QCborMap__Iterator) { @@ -630,7 +660,7 @@ func (this *QCborMap__Iterator) OperatorMultiply() struct { _entry_First := *_first_goptr _second_ret := _Second_CArray[0] - _second_goptr := newQCborValueRef(_second_ret) + _second_goptr := newQCborValueRef(_second_ret, nil) _second_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Second := *_second_goptr @@ -653,7 +683,7 @@ func (this *QCborMap__Iterator) OperatorSubscript(j int64) struct { _entry_First := *_first_goptr _second_ret := _Second_CArray[0] - _second_goptr := newQCborValueRef(_second_ret) + _second_goptr := newQCborValueRef(_second_ret, nil) _second_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Second := *_second_goptr @@ -664,7 +694,7 @@ func (this *QCborMap__Iterator) OperatorSubscript(j int64) struct { } func (this *QCborMap__Iterator) OperatorMinusGreater() *QCborValueRef { - return UnsafeNewQCborValueRef(unsafe.Pointer(C.QCborMap__Iterator_OperatorMinusGreater(this.h))) + return UnsafeNewQCborValueRef(unsafe.Pointer(C.QCborMap__Iterator_OperatorMinusGreater(this.h)), nil) } func (this *QCborMap__Iterator) OperatorMinusGreater2() *QCborValueConstRef { @@ -680,7 +710,7 @@ func (this *QCborMap__Iterator) Key() *QCborValue { func (this *QCborMap__Iterator) Value() *QCborValueRef { _ret := C.QCborMap__Iterator_Value(this.h) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -783,7 +813,7 @@ func (this *QCborMap__Iterator) OperatorMinusWithQCborMapIterator(j QCborMap__It // Delete this object from C++ memory. func (this *QCborMap__Iterator) Delete() { - C.QCborMap__Iterator_Delete(this.h) + C.QCborMap__Iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -796,7 +826,8 @@ func (this *QCborMap__Iterator) GoGC() { } type QCborMap__ConstIterator struct { - h *C.QCborMap__ConstIterator + h *C.QCborMap__ConstIterator + isSubclass bool } func (this *QCborMap__ConstIterator) cPointer() *C.QCborMap__ConstIterator { @@ -813,6 +844,7 @@ func (this *QCborMap__ConstIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborMap__ConstIterator constructs the type using only CGO pointers. func newQCborMap__ConstIterator(h *C.QCborMap__ConstIterator) *QCborMap__ConstIterator { if h == nil { return nil @@ -820,20 +852,33 @@ func newQCborMap__ConstIterator(h *C.QCborMap__ConstIterator) *QCborMap__ConstIt return &QCborMap__ConstIterator{h: h} } +// UnsafeNewQCborMap__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__ConstIterator(h unsafe.Pointer) *QCborMap__ConstIterator { - return newQCborMap__ConstIterator((*C.QCborMap__ConstIterator)(h)) + if h == nil { + return nil + } + + return &QCborMap__ConstIterator{h: (*C.QCborMap__ConstIterator)(h)} } // NewQCborMap__ConstIterator constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator() *QCborMap__ConstIterator { - ret := C.QCborMap__ConstIterator_new() - return newQCborMap__ConstIterator(ret) + var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil + + C.QCborMap__ConstIterator_new(&outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret.isSubclass = true + return ret } // NewQCborMap__ConstIterator2 constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator2(param1 *QCborMap__ConstIterator) *QCborMap__ConstIterator { - ret := C.QCborMap__ConstIterator_new2(param1.cPointer()) - return newQCborMap__ConstIterator(ret) + var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil + + C.QCborMap__ConstIterator_new2(param1.cPointer(), &outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret.isSubclass = true + return ret } func (this *QCborMap__ConstIterator) OperatorAssign(other *QCborMap__ConstIterator) { @@ -1002,7 +1047,7 @@ func (this *QCborMap__ConstIterator) OperatorMinusWithQCborMapConstIterator(j QC // Delete this object from C++ memory. func (this *QCborMap__ConstIterator) Delete() { - C.QCborMap__ConstIterator_Delete(this.h) + C.QCborMap__ConstIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/cbor/gen_qcbormap.h b/qt6/cbor/gen_qcbormap.h index f3ae3138..c6a81582 100644 --- a/qt6/cbor/gen_qcbormap.h +++ b/qt6/cbor/gen_qcbormap.h @@ -42,8 +42,8 @@ typedef struct QJsonObject QJsonObject; typedef struct QVariant QVariant; #endif -QCborMap* QCborMap_new(); -QCborMap* QCborMap_new2(QCborMap* other); +void QCborMap_new(QCborMap** outptr_QCborMap); +void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap); void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other); void QCborMap_Swap(QCborMap* self, QCborMap* other); QCborValue* QCborMap_ToCborValue(const QCborMap* self); @@ -105,10 +105,10 @@ QCborMap* QCborMap_FromJsonObject(QJsonObject* o); struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_ToVariantMap(const QCborMap* self); struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_ToVariantHash(const QCborMap* self); QJsonObject* QCborMap_ToJsonObject(const QCborMap* self); -void QCborMap_Delete(QCborMap* self); +void QCborMap_Delete(QCborMap* self, bool isSubclass); -QCborMap__Iterator* QCborMap__Iterator_new(); -QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1); +void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator); +void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator); void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueRef* */ QCborMap__Iterator_OperatorMultiply(const QCborMap__Iterator* self); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueRef* */ QCborMap__Iterator_OperatorSubscript(const QCborMap__Iterator* self, ptrdiff_t j); @@ -137,10 +137,10 @@ QCborMap__Iterator* QCborMap__Iterator_OperatorMinusAssign(QCborMap__Iterator* s QCborMap__Iterator* QCborMap__Iterator_OperatorPlus(const QCborMap__Iterator* self, ptrdiff_t j); QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* self, ptrdiff_t j); ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j); -void QCborMap__Iterator_Delete(QCborMap__Iterator* self); +void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass); -QCborMap__ConstIterator* QCborMap__ConstIterator_new(); -QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1); +void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); +void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueConstRef* */ QCborMap__ConstIterator_OperatorMultiply(const QCborMap__ConstIterator* self); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueConstRef* */ QCborMap__ConstIterator_OperatorSubscript(const QCborMap__ConstIterator* self, ptrdiff_t j); @@ -168,7 +168,7 @@ QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusAssign(QCborMap__C QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlus(const QCborMap__ConstIterator* self, ptrdiff_t j); QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinus(const QCborMap__ConstIterator* self, ptrdiff_t j); ptrdiff_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const QCborMap__ConstIterator* self, QCborMap__ConstIterator* j); -void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self); +void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/cbor/gen_qcborstreamreader.cpp b/qt6/cbor/gen_qcborstreamreader.cpp index c42bf290..d60e7de0 100644 --- a/qt6/cbor/gen_qcborstreamreader.cpp +++ b/qt6/cbor/gen_qcborstreamreader.cpp @@ -6,25 +6,30 @@ #include "gen_qcborstreamreader.h" #include "_cgo_export.h" -QCborStreamReader* QCborStreamReader_new() { - return new QCborStreamReader(); +void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal) { - return new QCborStreamReader(data, (qsizetype)(lenVal)); +void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(data, (qsizetype)(lenVal)); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal) { - return new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); +void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new4(struct miqt_string data) { +void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader) { QByteArray data_QByteArray(data.data, data.len); - return new QCborStreamReader(data_QByteArray); + QCborStreamReader* ret = new QCborStreamReader(data_QByteArray); + *outptr_QCborStreamReader = ret; } -QCborStreamReader* QCborStreamReader_new5(QIODevice* device) { - return new QCborStreamReader(device); +void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader) { + QCborStreamReader* ret = new QCborStreamReader(device); + *outptr_QCborStreamReader = ret; } void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device) { @@ -238,7 +243,11 @@ bool QCborStreamReader_Next1(QCborStreamReader* self, int maxRecursion) { return self->next(static_cast(maxRecursion)); } -void QCborStreamReader_Delete(QCborStreamReader* self) { - delete self; +void QCborStreamReader_Delete(QCborStreamReader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/cbor/gen_qcborstreamreader.go b/qt6/cbor/gen_qcborstreamreader.go index 136f135a..99cbbdef 100644 --- a/qt6/cbor/gen_qcborstreamreader.go +++ b/qt6/cbor/gen_qcborstreamreader.go @@ -43,7 +43,8 @@ const ( ) type QCborStreamReader struct { - h *C.QCborStreamReader + h *C.QCborStreamReader + isSubclass bool } func (this *QCborStreamReader) cPointer() *C.QCborStreamReader { @@ -60,6 +61,7 @@ func (this *QCborStreamReader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborStreamReader constructs the type using only CGO pointers. func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { if h == nil { return nil @@ -67,28 +69,45 @@ func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { return &QCborStreamReader{h: h} } +// UnsafeNewQCborStreamReader constructs the type using only unsafe pointers. func UnsafeNewQCborStreamReader(h unsafe.Pointer) *QCborStreamReader { - return newQCborStreamReader((*C.QCborStreamReader)(h)) + if h == nil { + return nil + } + + return &QCborStreamReader{h: (*C.QCborStreamReader)(h)} } // NewQCborStreamReader constructs a new QCborStreamReader object. func NewQCborStreamReader() *QCborStreamReader { - ret := C.QCborStreamReader_new() - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new(&outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader2 constructs a new QCborStreamReader object. func NewQCborStreamReader2(data string, lenVal int64) *QCborStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - ret := C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal)) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader3 constructs a new QCborStreamReader object. func NewQCborStreamReader3(data *byte, lenVal int64) *QCborStreamReader { - ret := C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal)) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader4 constructs a new QCborStreamReader object. @@ -96,14 +115,22 @@ func NewQCborStreamReader4(data []byte) *QCborStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QCborStreamReader_new4(data_alias) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new4(data_alias, &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } // NewQCborStreamReader5 constructs a new QCborStreamReader object. func NewQCborStreamReader5(device *qt6.QIODevice) *QCborStreamReader { - ret := C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer())) - return newQCborStreamReader(ret) + var outptr_QCborStreamReader *C.QCborStreamReader = nil + + C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamReader) + ret := newQCborStreamReader(outptr_QCborStreamReader) + ret.isSubclass = true + return ret } func (this *QCborStreamReader) SetDevice(device *qt6.QIODevice) { @@ -111,7 +138,7 @@ func (this *QCborStreamReader) SetDevice(device *qt6.QIODevice) { } func (this *QCborStreamReader) Device() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h)), nil, nil) } func (this *QCborStreamReader) AddData(data []byte) { @@ -316,7 +343,7 @@ func (this *QCborStreamReader) Next1(maxRecursion int) bool { // Delete this object from C++ memory. func (this *QCborStreamReader) Delete() { - C.QCborStreamReader_Delete(this.h) + C.QCborStreamReader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/cbor/gen_qcborstreamreader.h b/qt6/cbor/gen_qcborstreamreader.h index 9a5f24d8..f2237ad1 100644 --- a/qt6/cbor/gen_qcborstreamreader.h +++ b/qt6/cbor/gen_qcborstreamreader.h @@ -26,11 +26,11 @@ typedef struct QCborStreamReader QCborStreamReader; typedef struct QIODevice QIODevice; #endif -QCborStreamReader* QCborStreamReader_new(); -QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal); -QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal); -QCborStreamReader* QCborStreamReader_new4(struct miqt_string data); -QCborStreamReader* QCborStreamReader_new5(QIODevice* device); +void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader); +void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader); void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device); QIODevice* QCborStreamReader_Device(const QCborStreamReader* self); void QCborStreamReader_AddData(QCborStreamReader* self, struct miqt_string data); @@ -81,7 +81,7 @@ float QCborStreamReader_ToFloat(const QCborStreamReader* self); double QCborStreamReader_ToDouble(const QCborStreamReader* self); long long QCborStreamReader_ToInteger(const QCborStreamReader* self); bool QCborStreamReader_Next1(QCborStreamReader* self, int maxRecursion); -void QCborStreamReader_Delete(QCborStreamReader* self); +void QCborStreamReader_Delete(QCborStreamReader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/cbor/gen_qcborstreamwriter.cpp b/qt6/cbor/gen_qcborstreamwriter.cpp index cabb533b..a629cd9c 100644 --- a/qt6/cbor/gen_qcborstreamwriter.cpp +++ b/qt6/cbor/gen_qcborstreamwriter.cpp @@ -5,8 +5,9 @@ #include "gen_qcborstreamwriter.h" #include "_cgo_export.h" -QCborStreamWriter* QCborStreamWriter_new(QIODevice* device) { - return new QCborStreamWriter(device); +void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter) { + QCborStreamWriter* ret = new QCborStreamWriter(device); + *outptr_QCborStreamWriter = ret; } void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device) { @@ -114,7 +115,11 @@ void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, ptrdif self->append(str, (qsizetype)(size)); } -void QCborStreamWriter_Delete(QCborStreamWriter* self) { - delete self; +void QCborStreamWriter_Delete(QCborStreamWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/cbor/gen_qcborstreamwriter.go b/qt6/cbor/gen_qcborstreamwriter.go index e0137a4c..2ff6a16f 100644 --- a/qt6/cbor/gen_qcborstreamwriter.go +++ b/qt6/cbor/gen_qcborstreamwriter.go @@ -15,7 +15,8 @@ import ( ) type QCborStreamWriter struct { - h *C.QCborStreamWriter + h *C.QCborStreamWriter + isSubclass bool } func (this *QCborStreamWriter) cPointer() *C.QCborStreamWriter { @@ -32,6 +33,7 @@ func (this *QCborStreamWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborStreamWriter constructs the type using only CGO pointers. func newQCborStreamWriter(h *C.QCborStreamWriter) *QCborStreamWriter { if h == nil { return nil @@ -39,14 +41,23 @@ func newQCborStreamWriter(h *C.QCborStreamWriter) *QCborStreamWriter { return &QCborStreamWriter{h: h} } +// UnsafeNewQCborStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQCborStreamWriter(h unsafe.Pointer) *QCborStreamWriter { - return newQCborStreamWriter((*C.QCborStreamWriter)(h)) + if h == nil { + return nil + } + + return &QCborStreamWriter{h: (*C.QCborStreamWriter)(h)} } // NewQCborStreamWriter constructs a new QCborStreamWriter object. func NewQCborStreamWriter(device *qt6.QIODevice) *QCborStreamWriter { - ret := C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer())) - return newQCborStreamWriter(ret) + var outptr_QCborStreamWriter *C.QCborStreamWriter = nil + + C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamWriter) + ret := newQCborStreamWriter(outptr_QCborStreamWriter) + ret.isSubclass = true + return ret } func (this *QCborStreamWriter) SetDevice(device *qt6.QIODevice) { @@ -54,7 +65,7 @@ func (this *QCborStreamWriter) SetDevice(device *qt6.QIODevice) { } func (this *QCborStreamWriter) Device() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h)), nil, nil) } func (this *QCborStreamWriter) Append(u uint64) { @@ -166,7 +177,7 @@ func (this *QCborStreamWriter) Append22(str string, size int64) { // Delete this object from C++ memory. func (this *QCborStreamWriter) Delete() { - C.QCborStreamWriter_Delete(this.h) + C.QCborStreamWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/cbor/gen_qcborstreamwriter.h b/qt6/cbor/gen_qcborstreamwriter.h index 0189156d..3dc62e47 100644 --- a/qt6/cbor/gen_qcborstreamwriter.h +++ b/qt6/cbor/gen_qcborstreamwriter.h @@ -24,7 +24,7 @@ typedef struct QCborStreamWriter QCborStreamWriter; typedef struct QIODevice QIODevice; #endif -QCborStreamWriter* QCborStreamWriter_new(QIODevice* device); +void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter); void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device); QIODevice* QCborStreamWriter_Device(const QCborStreamWriter* self); void QCborStreamWriter_Append(QCborStreamWriter* self, unsigned long long u); @@ -51,7 +51,7 @@ void QCborStreamWriter_StartMap(QCborStreamWriter* self); void QCborStreamWriter_StartMapWithCount(QCborStreamWriter* self, unsigned long long count); bool QCborStreamWriter_EndMap(QCborStreamWriter* self); void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, ptrdiff_t size); -void QCborStreamWriter_Delete(QCborStreamWriter* self); +void QCborStreamWriter_Delete(QCborStreamWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/cbor/gen_qcborvalue.cpp b/qt6/cbor/gen_qcborvalue.cpp index 78ee74d7..d661a9e3 100644 --- a/qt6/cbor/gen_qcborvalue.cpp +++ b/qt6/cbor/gen_qcborvalue.cpp @@ -31,98 +31,124 @@ struct miqt_string QCborParserError_ErrorString(const QCborParserError* self) { return _ms; } -void QCborParserError_Delete(QCborParserError* self) { - delete self; +void QCborParserError_Delete(QCborParserError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborValue* QCborValue_new() { - return new QCborValue(); +void QCborValue_new(QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new2(int t_) { - return new QCborValue(static_cast(t_)); +void QCborValue_new2(int t_, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(t_)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new3(bool b_) { - return new QCborValue(b_); +void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(b_); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new4(int i) { - return new QCborValue(static_cast(i)); +void QCborValue_new4(int i, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(i)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new5(unsigned int u) { - return new QCborValue(static_cast(u)); +void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(u)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new6(long long i) { - return new QCborValue(static_cast(i)); +void QCborValue_new6(long long i, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(i)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new7(double v) { - return new QCborValue(static_cast(v)); +void QCborValue_new7(double v, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(v)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new8(uint8_t st) { - return new QCborValue(static_cast(st)); +void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(st)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new9(struct miqt_string ba) { +void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue) { QByteArray ba_QByteArray(ba.data, ba.len); - return new QCborValue(ba_QByteArray); + QCborValue* ret = new QCborValue(ba_QByteArray); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new10(struct miqt_string s) { +void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue) { QString s_QString = QString::fromUtf8(s.data, s.len); - return new QCborValue(s_QString); + QCborValue* ret = new QCborValue(s_QString); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new11(const char* s) { - return new QCborValue(s); +void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(s); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new12(QCborArray* a) { - return new QCborValue(*a); +void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*a); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new13(QCborMap* m) { - return new QCborValue(*m); +void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*m); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new14(uint64_t tag) { - return new QCborValue(static_cast(tag)); +void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(tag)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new15(int t_) { - return new QCborValue(static_cast(t_)); +void QCborValue_new15(int t_, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(t_)); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new16(QDateTime* dt) { - return new QCborValue(*dt); +void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*dt); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new17(QUrl* url) { - return new QCborValue(*url); +void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*url); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new18(QRegularExpression* rx) { - return new QCborValue(*rx); +void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*rx); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new19(QUuid* uuid) { - return new QCborValue(*uuid); +void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*uuid); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new20(QCborValue* other) { - return new QCborValue(*other); +void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(*other); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue) { - return new QCborValue(static_cast(tag), *taggedValue); +void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(tag), *taggedValue); + *outptr_QCborValue = ret; } -QCborValue* QCborValue_new22(int t_, QCborValue* tv) { - return new QCborValue(static_cast(t_), *tv); +void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue) { + QCborValue* ret = new QCborValue(static_cast(t_), *tv); + *outptr_QCborValue = ret; } void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other) { @@ -490,12 +516,17 @@ struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int return _ms; } -void QCborValue_Delete(QCborValue* self) { - delete self; +void QCborValue_Delete(QCborValue* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1) { - return new QCborValueConstRef(*param1); +void QCborValueConstRef_new(QCborValueConstRef* param1, QCborValueConstRef** outptr_QCborValueConstRef) { + QCborValueConstRef* ret = new QCborValueConstRef(*param1); + *outptr_QCborValueConstRef = ret; } int QCborValueConstRef_Type(const QCborValueConstRef* self) { @@ -808,12 +839,18 @@ struct miqt_string QCborValueConstRef_ToDiagnosticNotation1(const QCborValueCons return _ms; } -void QCborValueConstRef_Delete(QCborValueConstRef* self) { - delete self; +void QCborValueConstRef_Delete(QCborValueConstRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCborValueRef* QCborValueRef_new(QCborValueRef* param1) { - return new QCborValueRef(*param1); +void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef, QCborValueConstRef** outptr_QCborValueConstRef) { + QCborValueRef* ret = new QCborValueRef(*param1); + *outptr_QCborValueRef = ret; + *outptr_QCborValueConstRef = static_cast(ret); } void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other) { @@ -1143,7 +1180,11 @@ struct miqt_string QCborValueRef_ToDiagnosticNotation1(QCborValueRef* self, int return _ms; } -void QCborValueRef_Delete(QCborValueRef* self) { - delete self; +void QCborValueRef_Delete(QCborValueRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/cbor/gen_qcborvalue.go b/qt6/cbor/gen_qcborvalue.go index 4891d483..8d89fa0b 100644 --- a/qt6/cbor/gen_qcborvalue.go +++ b/qt6/cbor/gen_qcborvalue.go @@ -55,7 +55,8 @@ const ( ) type QCborParserError struct { - h *C.QCborParserError + h *C.QCborParserError + isSubclass bool } func (this *QCborParserError) cPointer() *C.QCborParserError { @@ -72,6 +73,7 @@ func (this *QCborParserError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborParserError constructs the type using only CGO pointers. func newQCborParserError(h *C.QCborParserError) *QCborParserError { if h == nil { return nil @@ -79,8 +81,13 @@ func newQCborParserError(h *C.QCborParserError) *QCborParserError { return &QCborParserError{h: h} } +// UnsafeNewQCborParserError constructs the type using only unsafe pointers. func UnsafeNewQCborParserError(h unsafe.Pointer) *QCborParserError { - return newQCborParserError((*C.QCborParserError)(h)) + if h == nil { + return nil + } + + return &QCborParserError{h: (*C.QCborParserError)(h)} } func (this *QCborParserError) ErrorString() string { @@ -92,7 +99,7 @@ func (this *QCborParserError) ErrorString() string { // Delete this object from C++ memory. func (this *QCborParserError) Delete() { - C.QCborParserError_Delete(this.h) + C.QCborParserError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -105,7 +112,8 @@ func (this *QCborParserError) GoGC() { } type QCborValue struct { - h *C.QCborValue + h *C.QCborValue + isSubclass bool } func (this *QCborValue) cPointer() *C.QCborValue { @@ -122,6 +130,7 @@ func (this *QCborValue) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborValue constructs the type using only CGO pointers. func newQCborValue(h *C.QCborValue) *QCborValue { if h == nil { return nil @@ -129,56 +138,93 @@ func newQCborValue(h *C.QCborValue) *QCborValue { return &QCborValue{h: h} } +// UnsafeNewQCborValue constructs the type using only unsafe pointers. func UnsafeNewQCborValue(h unsafe.Pointer) *QCborValue { - return newQCborValue((*C.QCborValue)(h)) + if h == nil { + return nil + } + + return &QCborValue{h: (*C.QCborValue)(h)} } // NewQCborValue constructs a new QCborValue object. func NewQCborValue() *QCborValue { - ret := C.QCborValue_new() - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new(&outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue2 constructs a new QCborValue object. func NewQCborValue2(t_ QCborValue__Type) *QCborValue { - ret := C.QCborValue_new2((C.int)(t_)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new2((C.int)(t_), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue3 constructs a new QCborValue object. func NewQCborValue3(b_ bool) *QCborValue { - ret := C.QCborValue_new3((C.bool)(b_)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new3((C.bool)(b_), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue4 constructs a new QCborValue object. func NewQCborValue4(i int) *QCborValue { - ret := C.QCborValue_new4((C.int)(i)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new4((C.int)(i), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue5 constructs a new QCborValue object. func NewQCborValue5(u uint) *QCborValue { - ret := C.QCborValue_new5((C.uint)(u)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new5((C.uint)(u), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue6 constructs a new QCborValue object. func NewQCborValue6(i int64) *QCborValue { - ret := C.QCborValue_new6((C.longlong)(i)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new6((C.longlong)(i), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue7 constructs a new QCborValue object. func NewQCborValue7(v float64) *QCborValue { - ret := C.QCborValue_new7((C.double)(v)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new7((C.double)(v), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue8 constructs a new QCborValue object. func NewQCborValue8(st QCborSimpleType) *QCborValue { - ret := C.QCborValue_new8((C.uint8_t)(st)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new8((C.uint8_t)(st), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue9 constructs a new QCborValue object. @@ -186,8 +232,12 @@ func NewQCborValue9(ba []byte) *QCborValue { ba_alias := C.struct_miqt_string{} ba_alias.data = (*C.char)(unsafe.Pointer(&ba[0])) ba_alias.len = C.size_t(len(ba)) - ret := C.QCborValue_new9(ba_alias) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new9(ba_alias, &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue10 constructs a new QCborValue object. @@ -196,82 +246,134 @@ func NewQCborValue10(s string) *QCborValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - ret := C.QCborValue_new10(s_ms) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new10(s_ms, &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue11 constructs a new QCborValue object. func NewQCborValue11(s string) *QCborValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - ret := C.QCborValue_new11(s_Cstring) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new11(s_Cstring, &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue12 constructs a new QCborValue object. func NewQCborValue12(a *QCborArray) *QCborValue { - ret := C.QCborValue_new12(a.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new12(a.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue13 constructs a new QCborValue object. func NewQCborValue13(m *QCborMap) *QCborValue { - ret := C.QCborValue_new13(m.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new13(m.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue14 constructs a new QCborValue object. func NewQCborValue14(tag QCborTag) *QCborValue { - ret := C.QCborValue_new14((C.uint64_t)(tag)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new14((C.uint64_t)(tag), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue15 constructs a new QCborValue object. func NewQCborValue15(t_ QCborKnownTags) *QCborValue { - ret := C.QCborValue_new15((C.int)(t_)) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new15((C.int)(t_), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue16 constructs a new QCborValue object. func NewQCborValue16(dt *qt6.QDateTime) *QCborValue { - ret := C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue17 constructs a new QCborValue object. func NewQCborValue17(url *qt6.QUrl) *QCborValue { - ret := C.QCborValue_new17((*C.QUrl)(url.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new17((*C.QUrl)(url.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue18 constructs a new QCborValue object. func NewQCborValue18(rx *qt6.QRegularExpression) *QCborValue { - ret := C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue19 constructs a new QCborValue object. func NewQCborValue19(uuid *qt6.QUuid) *QCborValue { - ret := C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer())) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer()), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue20 constructs a new QCborValue object. func NewQCborValue20(other *QCborValue) *QCborValue { - ret := C.QCborValue_new20(other.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new20(other.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue21 constructs a new QCborValue object. func NewQCborValue21(tag QCborTag, taggedValue *QCborValue) *QCborValue { - ret := C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } // NewQCborValue22 constructs a new QCborValue object. func NewQCborValue22(t_ QCborKnownTags, tv *QCborValue) *QCborValue { - ret := C.QCborValue_new22((C.int)(t_), tv.cPointer()) - return newQCborValue(ret) + var outptr_QCborValue *C.QCborValue = nil + + C.QCborValue_new22((C.int)(t_), tv.cPointer(), &outptr_QCborValue) + ret := newQCborValue(outptr_QCborValue) + ret.isSubclass = true + return ret } func (this *QCborValue) OperatorAssign(other *QCborValue) { @@ -483,7 +585,7 @@ func (this *QCborValue) OperatorSubscript2(key int64) *QCborValue { func (this *QCborValue) OperatorSubscript3(key int64) *QCborValueRef { _ret := C.QCborValue_OperatorSubscript3(this.h, (C.longlong)(key)) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -494,7 +596,7 @@ func (this *QCborValue) OperatorSubscript5(key string) *QCborValueRef { key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) _ret := C.QCborValue_OperatorSubscript5(this.h, key_ms) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -716,7 +818,7 @@ func (this *QCborValue) ToDiagnosticNotation1(opts QCborValue__DiagnosticNotatio // Delete this object from C++ memory. func (this *QCborValue) Delete() { - C.QCborValue_Delete(this.h) + C.QCborValue_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -729,7 +831,8 @@ func (this *QCborValue) GoGC() { } type QCborValueConstRef struct { - h *C.QCborValueConstRef + h *C.QCborValueConstRef + isSubclass bool } func (this *QCborValueConstRef) cPointer() *C.QCborValueConstRef { @@ -746,6 +849,7 @@ func (this *QCborValueConstRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCborValueConstRef constructs the type using only CGO pointers. func newQCborValueConstRef(h *C.QCborValueConstRef) *QCborValueConstRef { if h == nil { return nil @@ -753,14 +857,23 @@ func newQCborValueConstRef(h *C.QCborValueConstRef) *QCborValueConstRef { return &QCborValueConstRef{h: h} } +// UnsafeNewQCborValueConstRef constructs the type using only unsafe pointers. func UnsafeNewQCborValueConstRef(h unsafe.Pointer) *QCborValueConstRef { - return newQCborValueConstRef((*C.QCborValueConstRef)(h)) + if h == nil { + return nil + } + + return &QCborValueConstRef{h: (*C.QCborValueConstRef)(h)} } // NewQCborValueConstRef constructs a new QCborValueConstRef object. func NewQCborValueConstRef(param1 *QCborValueConstRef) *QCborValueConstRef { - ret := C.QCborValueConstRef_new(param1.cPointer()) - return newQCborValueConstRef(ret) + var outptr_QCborValueConstRef *C.QCborValueConstRef = nil + + C.QCborValueConstRef_new(param1.cPointer(), &outptr_QCborValueConstRef) + ret := newQCborValueConstRef(outptr_QCborValueConstRef) + ret.isSubclass = true + return ret } func (this *QCborValueConstRef) Type() QCborValue__Type { @@ -1106,7 +1219,7 @@ func (this *QCborValueConstRef) ToDiagnosticNotation1(opt QCborValue__Diagnostic // Delete this object from C++ memory. func (this *QCborValueConstRef) Delete() { - C.QCborValueConstRef_Delete(this.h) + C.QCborValueConstRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1119,7 +1232,8 @@ func (this *QCborValueConstRef) GoGC() { } type QCborValueRef struct { - h *C.QCborValueRef + h *C.QCborValueRef + isSubclass bool *QCborValueConstRef } @@ -1137,21 +1251,34 @@ func (this *QCborValueRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCborValueRef(h *C.QCborValueRef) *QCborValueRef { +// newQCborValueRef constructs the type using only CGO pointers. +func newQCborValueRef(h *C.QCborValueRef, h_QCborValueConstRef *C.QCborValueConstRef) *QCborValueRef { if h == nil { return nil } - return &QCborValueRef{h: h, QCborValueConstRef: UnsafeNewQCborValueConstRef(unsafe.Pointer(h))} + return &QCborValueRef{h: h, + QCborValueConstRef: newQCborValueConstRef(h_QCborValueConstRef)} } -func UnsafeNewQCborValueRef(h unsafe.Pointer) *QCborValueRef { - return newQCborValueRef((*C.QCborValueRef)(h)) +// UnsafeNewQCborValueRef constructs the type using only unsafe pointers. +func UnsafeNewQCborValueRef(h unsafe.Pointer, h_QCborValueConstRef unsafe.Pointer) *QCborValueRef { + if h == nil { + return nil + } + + return &QCborValueRef{h: (*C.QCborValueRef)(h), + QCborValueConstRef: UnsafeNewQCborValueConstRef(h_QCborValueConstRef)} } // NewQCborValueRef constructs a new QCborValueRef object. func NewQCborValueRef(param1 *QCborValueRef) *QCborValueRef { - ret := C.QCborValueRef_new(param1.cPointer()) - return newQCborValueRef(ret) + var outptr_QCborValueRef *C.QCborValueRef = nil + var outptr_QCborValueConstRef *C.QCborValueConstRef = nil + + C.QCborValueRef_new(param1.cPointer(), &outptr_QCborValueRef, &outptr_QCborValueConstRef) + ret := newQCborValueRef(outptr_QCborValueRef, outptr_QCborValueConstRef) + ret.isSubclass = true + return ret } func (this *QCborValueRef) OperatorAssign(other *QCborValue) { @@ -1164,7 +1291,7 @@ func (this *QCborValueRef) OperatorAssignWithOther(other *QCborValueRef) { func (this *QCborValueRef) OperatorSubscript(key int64) *QCborValueRef { _ret := C.QCborValueRef_OperatorSubscript(this.h, (C.longlong)(key)) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1175,7 +1302,7 @@ func (this *QCborValueRef) OperatorSubscript2(key string) *QCborValueRef { key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) _ret := C.QCborValueRef_OperatorSubscript2(this.h, key_ms) - _goptr := newQCborValueRef(_ret) + _goptr := newQCborValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1523,7 +1650,7 @@ func (this *QCborValueRef) ToDiagnosticNotation1(opt QCborValue__DiagnosticNotat // Delete this object from C++ memory. func (this *QCborValueRef) Delete() { - C.QCborValueRef_Delete(this.h) + C.QCborValueRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/cbor/gen_qcborvalue.h b/qt6/cbor/gen_qcborvalue.h index fe811b46..309fa147 100644 --- a/qt6/cbor/gen_qcborvalue.h +++ b/qt6/cbor/gen_qcborvalue.h @@ -49,30 +49,30 @@ typedef struct QVariant QVariant; #endif struct miqt_string QCborParserError_ErrorString(const QCborParserError* self); -void QCborParserError_Delete(QCborParserError* self); +void QCborParserError_Delete(QCborParserError* self, bool isSubclass); -QCborValue* QCborValue_new(); -QCborValue* QCborValue_new2(int t_); -QCborValue* QCborValue_new3(bool b_); -QCborValue* QCborValue_new4(int i); -QCborValue* QCborValue_new5(unsigned int u); -QCborValue* QCborValue_new6(long long i); -QCborValue* QCborValue_new7(double v); -QCborValue* QCborValue_new8(uint8_t st); -QCborValue* QCborValue_new9(struct miqt_string ba); -QCborValue* QCborValue_new10(struct miqt_string s); -QCborValue* QCborValue_new11(const char* s); -QCborValue* QCborValue_new12(QCborArray* a); -QCborValue* QCborValue_new13(QCborMap* m); -QCborValue* QCborValue_new14(uint64_t tag); -QCborValue* QCborValue_new15(int t_); -QCborValue* QCborValue_new16(QDateTime* dt); -QCborValue* QCborValue_new17(QUrl* url); -QCborValue* QCborValue_new18(QRegularExpression* rx); -QCborValue* QCborValue_new19(QUuid* uuid); -QCborValue* QCborValue_new20(QCborValue* other); -QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue); -QCborValue* QCborValue_new22(int t_, QCborValue* tv); +void QCborValue_new(QCborValue** outptr_QCborValue); +void QCborValue_new2(int t_, QCborValue** outptr_QCborValue); +void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue); +void QCborValue_new4(int i, QCborValue** outptr_QCborValue); +void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue); +void QCborValue_new6(long long i, QCborValue** outptr_QCborValue); +void QCborValue_new7(double v, QCborValue** outptr_QCborValue); +void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue); +void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue); +void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue); +void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue); +void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue); +void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue); +void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue); +void QCborValue_new15(int t_, QCborValue** outptr_QCborValue); +void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue); +void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue); +void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue); +void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue); +void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue); +void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue); +void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue); void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other); void QCborValue_Swap(QCborValue* self, QCborValue* other); int QCborValue_Type(const QCborValue* self); @@ -149,9 +149,9 @@ QCborValue* QCborValue_FromCbor33(const unsigned char* data, ptrdiff_t lenVal, Q struct miqt_string QCborValue_ToCbor1(const QCborValue* self, int opt); void QCborValue_ToCbor2(const QCborValue* self, QCborStreamWriter* writer, int opt); struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int opts); -void QCborValue_Delete(QCborValue* self); +void QCborValue_Delete(QCborValue* self, bool isSubclass); -QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1); +void QCborValueConstRef_new(QCborValueConstRef* param1, QCborValueConstRef** outptr_QCborValueConstRef); int QCborValueConstRef_Type(const QCborValueConstRef* self); bool QCborValueConstRef_IsInteger(const QCborValueConstRef* self); bool QCborValueConstRef_IsByteArray(const QCborValueConstRef* self); @@ -215,9 +215,9 @@ QUuid* QCborValueConstRef_ToUuid1(const QCborValueConstRef* self, QUuid* default struct miqt_string QCborValueConstRef_ToCbor1(const QCborValueConstRef* self, int opt); void QCborValueConstRef_ToCbor2(const QCborValueConstRef* self, QCborStreamWriter* writer, int opt); struct miqt_string QCborValueConstRef_ToDiagnosticNotation1(const QCborValueConstRef* self, int opt); -void QCborValueConstRef_Delete(QCborValueConstRef* self); +void QCborValueConstRef_Delete(QCborValueConstRef* self, bool isSubclass); -QCborValueRef* QCborValueRef_new(QCborValueRef* param1); +void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef, QCborValueConstRef** outptr_QCborValueConstRef); void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other); void QCborValueRef_OperatorAssignWithOther(QCborValueRef* self, QCborValueRef* other); QCborValueRef* QCborValueRef_OperatorSubscript(QCborValueRef* self, long long key); @@ -285,7 +285,7 @@ QUuid* QCborValueRef_ToUuid1(const QCborValueRef* self, QUuid* defaultValue); struct miqt_string QCborValueRef_ToCbor1(QCborValueRef* self, int opt); void QCborValueRef_ToCbor2(QCborValueRef* self, QCborStreamWriter* writer, int opt); struct miqt_string QCborValueRef_ToDiagnosticNotation1(QCborValueRef* self, int opt); -void QCborValueRef_Delete(QCborValueRef* self); +void QCborValueRef_Delete(QCborValueRef* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractanimation.cpp b/qt6/gen_qabstractanimation.cpp index 16814ca6..d2aecd3d 100644 --- a/qt6/gen_qabstractanimation.cpp +++ b/qt6/gen_qabstractanimation.cpp @@ -1,11 +1,15 @@ #include #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qabstractanimation.h" #include "_cgo_export.h" @@ -172,16 +176,297 @@ void QAbstractAnimation_Start1(QAbstractAnimation* self, int policy) { self->start(static_cast(policy)); } -void QAbstractAnimation_Delete(QAbstractAnimation* self) { - delete self; +void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAnimationDriver* QAnimationDriver_new() { - return new QAnimationDriver(); +class MiqtVirtualQAnimationDriver : public virtual QAnimationDriver { +public: + + MiqtVirtualQAnimationDriver(): QAnimationDriver() {}; + MiqtVirtualQAnimationDriver(QObject* parent): QAnimationDriver(parent) {}; + + virtual ~MiqtVirtualQAnimationDriver() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance() override { + if (handle__Advance == 0) { + QAnimationDriver::advance(); + return; + } + + + miqt_exec_callback_QAnimationDriver_Advance(this, handle__Advance); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance() { + + QAnimationDriver::advance(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Elapsed = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 elapsed() const override { + if (handle__Elapsed == 0) { + return QAnimationDriver::elapsed(); + } + + + long long callback_return_value = miqt_exec_callback_QAnimationDriver_Elapsed(const_cast(this), handle__Elapsed); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Elapsed() const { + + qint64 _ret = QAnimationDriver::elapsed(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Start = 0; + + // Subclass to allow providing a Go implementation + virtual void start() override { + if (handle__Start == 0) { + QAnimationDriver::start(); + return; + } + + + miqt_exec_callback_QAnimationDriver_Start(this, handle__Start); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Start() { + + QAnimationDriver::start(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Stop = 0; + + // Subclass to allow providing a Go implementation + virtual void stop() override { + if (handle__Stop == 0) { + QAnimationDriver::stop(); + return; + } + + + miqt_exec_callback_QAnimationDriver_Stop(this, handle__Stop); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Stop() { + + QAnimationDriver::stop(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAnimationDriver::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAnimationDriver_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAnimationDriver::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAnimationDriver::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAnimationDriver_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAnimationDriver::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAnimationDriver::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAnimationDriver_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAnimationDriver::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAnimationDriver::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAnimationDriver_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAnimationDriver::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAnimationDriver::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAnimationDriver_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAnimationDriver::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAnimationDriver::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAnimationDriver_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAnimationDriver::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAnimationDriver::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAnimationDriver_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAnimationDriver::disconnectNotify(*signal); + + } + +}; + +void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { + MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(); + *outptr_QAnimationDriver = ret; + *outptr_QObject = static_cast(ret); } -QAnimationDriver* QAnimationDriver_new2(QObject* parent) { - return new QAnimationDriver(parent); +void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { + MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(parent); + *outptr_QAnimationDriver = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self) { @@ -229,7 +514,7 @@ void QAnimationDriver_Started(QAnimationDriver* self) { } void QAnimationDriver_connect_Started(QAnimationDriver* self, intptr_t slot) { - QAnimationDriver::connect(self, static_cast(&QAnimationDriver::started), self, [=]() { + MiqtVirtualQAnimationDriver::connect(self, static_cast(&QAnimationDriver::started), self, [=]() { miqt_exec_callback_QAnimationDriver_Started(slot); }); } @@ -239,7 +524,7 @@ void QAnimationDriver_Stopped(QAnimationDriver* self) { } void QAnimationDriver_connect_Stopped(QAnimationDriver* self, intptr_t slot) { - QAnimationDriver::connect(self, static_cast(&QAnimationDriver::stopped), self, [=]() { + MiqtVirtualQAnimationDriver::connect(self, static_cast(&QAnimationDriver::stopped), self, [=]() { miqt_exec_callback_QAnimationDriver_Stopped(slot); }); } @@ -266,7 +551,99 @@ struct miqt_string QAnimationDriver_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAnimationDriver_Delete(QAnimationDriver* self) { - delete self; +void QAnimationDriver_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Advance = slot; +} + +void QAnimationDriver_virtualbase_Advance(void* self) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Advance(); +} + +void QAnimationDriver_override_virtual_Elapsed(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Elapsed = slot; +} + +long long QAnimationDriver_virtualbase_Elapsed(const void* self) { + return ( (const MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Elapsed(); +} + +void QAnimationDriver_override_virtual_Start(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Start = slot; +} + +void QAnimationDriver_virtualbase_Start(void* self) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Start(); +} + +void QAnimationDriver_override_virtual_Stop(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Stop = slot; +} + +void QAnimationDriver_virtualbase_Stop(void* self) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Stop(); +} + +void QAnimationDriver_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__Event = slot; +} + +bool QAnimationDriver_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_Event(event); +} + +void QAnimationDriver_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__EventFilter = slot; +} + +bool QAnimationDriver_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAnimationDriver_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__TimerEvent = slot; +} + +void QAnimationDriver_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_TimerEvent(event); +} + +void QAnimationDriver_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__ChildEvent = slot; +} + +void QAnimationDriver_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_ChildEvent(event); +} + +void QAnimationDriver_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__CustomEvent = slot; +} + +void QAnimationDriver_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_CustomEvent(event); +} + +void QAnimationDriver_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__ConnectNotify = slot; +} + +void QAnimationDriver_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAnimationDriver_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAnimationDriver*)(self) )->handle__DisconnectNotify = slot; +} + +void QAnimationDriver_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAnimationDriver*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAnimationDriver_Delete(QAnimationDriver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractanimation.go b/qt6/gen_qabstractanimation.go index 874a1e4e..496e764b 100644 --- a/qt6/gen_qabstractanimation.go +++ b/qt6/gen_qabstractanimation.go @@ -37,7 +37,8 @@ const ( ) type QAbstractAnimation struct { - h *C.QAbstractAnimation + h *C.QAbstractAnimation + isSubclass bool *QObject } @@ -55,15 +56,23 @@ func (this *QAbstractAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractAnimation(h *C.QAbstractAnimation) *QAbstractAnimation { +// newQAbstractAnimation constructs the type using only CGO pointers. +func newQAbstractAnimation(h *C.QAbstractAnimation, h_QObject *C.QObject) *QAbstractAnimation { if h == nil { return nil } - return &QAbstractAnimation{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractAnimation{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractAnimation(h unsafe.Pointer) *QAbstractAnimation { - return newQAbstractAnimation((*C.QAbstractAnimation)(h)) +// UnsafeNewQAbstractAnimation constructs the type using only unsafe pointers. +func UnsafeNewQAbstractAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAnimation { + if h == nil { + return nil + } + + return &QAbstractAnimation{h: (*C.QAbstractAnimation)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractAnimation) MetaObject() *QMetaObject { @@ -90,7 +99,7 @@ func (this *QAbstractAnimation) State() QAbstractAnimation__State { } func (this *QAbstractAnimation) Group() *QAnimationGroup { - return UnsafeNewQAnimationGroup(unsafe.Pointer(C.QAbstractAnimation_Group(this.h))) + return UnsafeNewQAnimationGroup(unsafe.Pointer(C.QAbstractAnimation_Group(this.h)), nil, nil) } func (this *QAbstractAnimation) Direction() QAbstractAnimation__Direction { @@ -260,7 +269,7 @@ func (this *QAbstractAnimation) Start1(policy QAbstractAnimation__DeletionPolicy // Delete this object from C++ memory. func (this *QAbstractAnimation) Delete() { - C.QAbstractAnimation_Delete(this.h) + C.QAbstractAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -273,7 +282,8 @@ func (this *QAbstractAnimation) GoGC() { } type QAnimationDriver struct { - h *C.QAnimationDriver + h *C.QAnimationDriver + isSubclass bool *QObject } @@ -291,27 +301,45 @@ func (this *QAnimationDriver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAnimationDriver(h *C.QAnimationDriver) *QAnimationDriver { +// newQAnimationDriver constructs the type using only CGO pointers. +func newQAnimationDriver(h *C.QAnimationDriver, h_QObject *C.QObject) *QAnimationDriver { if h == nil { return nil } - return &QAnimationDriver{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAnimationDriver{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAnimationDriver(h unsafe.Pointer) *QAnimationDriver { - return newQAnimationDriver((*C.QAnimationDriver)(h)) +// UnsafeNewQAnimationDriver constructs the type using only unsafe pointers. +func UnsafeNewQAnimationDriver(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationDriver { + if h == nil { + return nil + } + + return &QAnimationDriver{h: (*C.QAnimationDriver)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQAnimationDriver constructs a new QAnimationDriver object. func NewQAnimationDriver() *QAnimationDriver { - ret := C.QAnimationDriver_new() - return newQAnimationDriver(ret) + var outptr_QAnimationDriver *C.QAnimationDriver = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationDriver_new(&outptr_QAnimationDriver, &outptr_QObject) + ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAnimationDriver2 constructs a new QAnimationDriver object. func NewQAnimationDriver2(parent *QObject) *QAnimationDriver { - ret := C.QAnimationDriver_new2(parent.cPointer()) - return newQAnimationDriver(ret) + var outptr_QAnimationDriver *C.QAnimationDriver = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationDriver_new2(parent.cPointer(), &outptr_QAnimationDriver, &outptr_QObject) + ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAnimationDriver) MetaObject() *QMetaObject { @@ -409,9 +437,257 @@ func QAnimationDriver_Tr3(s string, c string, n int) string { return _ret } +func (this *QAnimationDriver) callVirtualBase_Advance() { + + C.QAnimationDriver_virtualbase_Advance(unsafe.Pointer(this.h)) + +} +func (this *QAnimationDriver) OnAdvance(slot func(super func())) { + C.QAnimationDriver_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Advance +func miqt_exec_callback_QAnimationDriver_Advance(self *C.QAnimationDriver, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_Advance) + +} + +func (this *QAnimationDriver) callVirtualBase_Elapsed() int64 { + + return (int64)(C.QAnimationDriver_virtualbase_Elapsed(unsafe.Pointer(this.h))) + +} +func (this *QAnimationDriver) OnElapsed(slot func(super func() int64) int64) { + C.QAnimationDriver_override_virtual_Elapsed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Elapsed +func miqt_exec_callback_QAnimationDriver_Elapsed(self *C.QAnimationDriver, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAnimationDriver{h: self}).callVirtualBase_Elapsed) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAnimationDriver) callVirtualBase_Start() { + + C.QAnimationDriver_virtualbase_Start(unsafe.Pointer(this.h)) + +} +func (this *QAnimationDriver) OnStart(slot func(super func())) { + C.QAnimationDriver_override_virtual_Start(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Start +func miqt_exec_callback_QAnimationDriver_Start(self *C.QAnimationDriver, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_Start) + +} + +func (this *QAnimationDriver) callVirtualBase_Stop() { + + C.QAnimationDriver_virtualbase_Stop(unsafe.Pointer(this.h)) + +} +func (this *QAnimationDriver) OnStop(slot func(super func())) { + C.QAnimationDriver_override_virtual_Stop(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Stop +func miqt_exec_callback_QAnimationDriver_Stop(self *C.QAnimationDriver, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_Stop) + +} + +func (this *QAnimationDriver) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAnimationDriver_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAnimationDriver) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAnimationDriver_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_Event +func miqt_exec_callback_QAnimationDriver_Event(self *C.QAnimationDriver, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAnimationDriver{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAnimationDriver) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAnimationDriver_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAnimationDriver) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAnimationDriver_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_EventFilter +func miqt_exec_callback_QAnimationDriver_EventFilter(self *C.QAnimationDriver, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAnimationDriver{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAnimationDriver) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAnimationDriver_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAnimationDriver) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAnimationDriver_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_TimerEvent +func miqt_exec_callback_QAnimationDriver_TimerEvent(self *C.QAnimationDriver, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAnimationDriver_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAnimationDriver) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAnimationDriver_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_ChildEvent +func miqt_exec_callback_QAnimationDriver_ChildEvent(self *C.QAnimationDriver, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAnimationDriver_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAnimationDriver) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAnimationDriver_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_CustomEvent +func miqt_exec_callback_QAnimationDriver_CustomEvent(self *C.QAnimationDriver, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAnimationDriver_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAnimationDriver) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAnimationDriver_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_ConnectNotify +func miqt_exec_callback_QAnimationDriver_ConnectNotify(self *C.QAnimationDriver, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAnimationDriver) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAnimationDriver_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAnimationDriver) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAnimationDriver_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationDriver_DisconnectNotify +func miqt_exec_callback_QAnimationDriver_DisconnectNotify(self *C.QAnimationDriver, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAnimationDriver{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAnimationDriver) Delete() { - C.QAnimationDriver_Delete(this.h) + C.QAnimationDriver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractanimation.h b/qt6/gen_qabstractanimation.h index 20c6940e..b8582a64 100644 --- a/qt6/gen_qabstractanimation.h +++ b/qt6/gen_qabstractanimation.h @@ -18,14 +18,22 @@ extern "C" { class QAbstractAnimation; class QAnimationDriver; class QAnimationGroup; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QAnimationDriver QAnimationDriver; typedef struct QAnimationGroup QAnimationGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self); @@ -56,13 +64,17 @@ void QAbstractAnimation_Resume(QAbstractAnimation* self); void QAbstractAnimation_SetPaused(QAbstractAnimation* self, bool paused); void QAbstractAnimation_Stop(QAbstractAnimation* self); void QAbstractAnimation_SetCurrentTime(QAbstractAnimation* self, int msecs); +bool QAbstractAnimation_Event(QAbstractAnimation* self, QEvent* event); +void QAbstractAnimation_UpdateCurrentTime(QAbstractAnimation* self, int currentTime); +void QAbstractAnimation_UpdateState(QAbstractAnimation* self, int newState, int oldState); +void QAbstractAnimation_UpdateDirection(QAbstractAnimation* self, int direction); struct miqt_string QAbstractAnimation_Tr2(const char* s, const char* c); struct miqt_string QAbstractAnimation_Tr3(const char* s, const char* c, int n); void QAbstractAnimation_Start1(QAbstractAnimation* self, int policy); -void QAbstractAnimation_Delete(QAbstractAnimation* self); +void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass); -QAnimationDriver* QAnimationDriver_new(); -QAnimationDriver* QAnimationDriver_new2(QObject* parent); +void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); +void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self); void* QAnimationDriver_Metacast(QAnimationDriver* self, const char* param1); struct miqt_string QAnimationDriver_Tr(const char* s); @@ -75,9 +87,33 @@ void QAnimationDriver_Started(QAnimationDriver* self); void QAnimationDriver_connect_Started(QAnimationDriver* self, intptr_t slot); void QAnimationDriver_Stopped(QAnimationDriver* self); void QAnimationDriver_connect_Stopped(QAnimationDriver* self, intptr_t slot); +void QAnimationDriver_Start(QAnimationDriver* self); +void QAnimationDriver_Stop(QAnimationDriver* self); struct miqt_string QAnimationDriver_Tr2(const char* s, const char* c); struct miqt_string QAnimationDriver_Tr3(const char* s, const char* c, int n); -void QAnimationDriver_Delete(QAnimationDriver* self); +void QAnimationDriver_override_virtual_Advance(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_Advance(void* self); +void QAnimationDriver_override_virtual_Elapsed(void* self, intptr_t slot); +long long QAnimationDriver_virtualbase_Elapsed(const void* self); +void QAnimationDriver_override_virtual_Start(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_Start(void* self); +void QAnimationDriver_override_virtual_Stop(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_Stop(void* self); +void QAnimationDriver_override_virtual_Event(void* self, intptr_t slot); +bool QAnimationDriver_virtualbase_Event(void* self, QEvent* event); +void QAnimationDriver_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAnimationDriver_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAnimationDriver_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAnimationDriver_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAnimationDriver_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_CustomEvent(void* self, QEvent* event); +void QAnimationDriver_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAnimationDriver_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAnimationDriver_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAnimationDriver_Delete(QAnimationDriver* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractbutton.cpp b/qt6/gen_qabstractbutton.cpp index 8613159c..402958b7 100644 --- a/qt6/gen_qabstractbutton.cpp +++ b/qt6/gen_qabstractbutton.cpp @@ -1,12 +1,22 @@ #include #include +#include +#include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include "gen_qabstractbutton.h" #include "_cgo_export.h" @@ -216,7 +226,11 @@ void QAbstractButton_connect_Clicked1(QAbstractButton* self, intptr_t slot) { }); } -void QAbstractButton_Delete(QAbstractButton* self) { - delete self; +void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractbutton.go b/qt6/gen_qabstractbutton.go index 09441812..8fb9f799 100644 --- a/qt6/gen_qabstractbutton.go +++ b/qt6/gen_qabstractbutton.go @@ -15,7 +15,8 @@ import ( ) type QAbstractButton struct { - h *C.QAbstractButton + h *C.QAbstractButton + isSubclass bool *QWidget } @@ -33,15 +34,23 @@ func (this *QAbstractButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractButton(h *C.QAbstractButton) *QAbstractButton { +// newQAbstractButton constructs the type using only CGO pointers. +func newQAbstractButton(h *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractButton { if h == nil { return nil } - return &QAbstractButton{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QAbstractButton{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractButton(h unsafe.Pointer) *QAbstractButton { - return newQAbstractButton((*C.QAbstractButton)(h)) +// UnsafeNewQAbstractButton constructs the type using only unsafe pointers. +func UnsafeNewQAbstractButton(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractButton { + if h == nil { + return nil + } + + return &QAbstractButton{h: (*C.QAbstractButton)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } func (this *QAbstractButton) MetaObject() *QMetaObject { @@ -160,7 +169,7 @@ func (this *QAbstractButton) AutoExclusive() bool { } func (this *QAbstractButton) Group() *QButtonGroup { - return UnsafeNewQButtonGroup(unsafe.Pointer(C.QAbstractButton_Group(this.h))) + return UnsafeNewQButtonGroup(unsafe.Pointer(C.QAbstractButton_Group(this.h)), nil) } func (this *QAbstractButton) SetIconSize(size *QSize) { @@ -298,7 +307,7 @@ func miqt_exec_callback_QAbstractButton_Clicked1(cb C.intptr_t, checked C.bool) // Delete this object from C++ memory. func (this *QAbstractButton) Delete() { - C.QAbstractButton_Delete(this.h) + C.QAbstractButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractbutton.h b/qt6/gen_qabstractbutton.h index 0188c90c..03295d86 100644 --- a/qt6/gen_qabstractbutton.h +++ b/qt6/gen_qabstractbutton.h @@ -17,17 +17,37 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QButtonGroup; +class QEvent; +class QFocusEvent; class QIcon; +class QKeyEvent; class QKeySequence; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QSize; +class QTimerEvent; +class QWidget; #else typedef struct QAbstractButton QAbstractButton; typedef struct QButtonGroup QButtonGroup; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QIcon QIcon; +typedef struct QKeyEvent QKeyEvent; typedef struct QKeySequence QKeySequence; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWidget QWidget; #endif QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self); @@ -67,11 +87,25 @@ void QAbstractButton_Clicked(QAbstractButton* self); void QAbstractButton_connect_Clicked(QAbstractButton* self, intptr_t slot); void QAbstractButton_Toggled(QAbstractButton* self, bool checked); void QAbstractButton_connect_Toggled(QAbstractButton* self, intptr_t slot); +void QAbstractButton_PaintEvent(QAbstractButton* self, QPaintEvent* e); +bool QAbstractButton_HitButton(const QAbstractButton* self, QPoint* pos); +void QAbstractButton_CheckStateSet(QAbstractButton* self); +void QAbstractButton_NextCheckState(QAbstractButton* self); +bool QAbstractButton_Event(QAbstractButton* self, QEvent* e); +void QAbstractButton_KeyPressEvent(QAbstractButton* self, QKeyEvent* e); +void QAbstractButton_KeyReleaseEvent(QAbstractButton* self, QKeyEvent* e); +void QAbstractButton_MousePressEvent(QAbstractButton* self, QMouseEvent* e); +void QAbstractButton_MouseReleaseEvent(QAbstractButton* self, QMouseEvent* e); +void QAbstractButton_MouseMoveEvent(QAbstractButton* self, QMouseEvent* e); +void QAbstractButton_FocusInEvent(QAbstractButton* self, QFocusEvent* e); +void QAbstractButton_FocusOutEvent(QAbstractButton* self, QFocusEvent* e); +void QAbstractButton_ChangeEvent(QAbstractButton* self, QEvent* e); +void QAbstractButton_TimerEvent(QAbstractButton* self, QTimerEvent* e); struct miqt_string QAbstractButton_Tr2(const char* s, const char* c); struct miqt_string QAbstractButton_Tr3(const char* s, const char* c, int n); void QAbstractButton_Clicked1(QAbstractButton* self, bool checked); void QAbstractButton_connect_Clicked1(QAbstractButton* self, intptr_t slot); -void QAbstractButton_Delete(QAbstractButton* self); +void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstracteventdispatcher.cpp b/qt6/gen_qabstracteventdispatcher.cpp index 93f9f0ef..86e8893c 100644 --- a/qt6/gen_qabstracteventdispatcher.cpp +++ b/qt6/gen_qabstracteventdispatcher.cpp @@ -157,15 +157,24 @@ QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } -void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self) { - delete self; +void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t) { - return new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); +void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo) { + QAbstractEventDispatcher::TimerInfo* ret = new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); + *outptr_QAbstractEventDispatcher__TimerInfo = ret; } -void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self) { - delete self; +void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstracteventdispatcher.go b/qt6/gen_qabstracteventdispatcher.go index a6eae42b..2b19cfd9 100644 --- a/qt6/gen_qabstracteventdispatcher.go +++ b/qt6/gen_qabstracteventdispatcher.go @@ -15,7 +15,8 @@ import ( ) type QAbstractEventDispatcher struct { - h *C.QAbstractEventDispatcher + h *C.QAbstractEventDispatcher + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QAbstractEventDispatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher) *QAbstractEventDispatcher { +// newQAbstractEventDispatcher constructs the type using only CGO pointers. +func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher, h_QObject *C.QObject) *QAbstractEventDispatcher { if h == nil { return nil } - return &QAbstractEventDispatcher{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractEventDispatcher{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer) *QAbstractEventDispatcher { - return newQAbstractEventDispatcher((*C.QAbstractEventDispatcher)(h)) +// UnsafeNewQAbstractEventDispatcher constructs the type using only unsafe pointers. +func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractEventDispatcher { + if h == nil { + return nil + } + + return &QAbstractEventDispatcher{h: (*C.QAbstractEventDispatcher)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { @@ -64,7 +73,7 @@ func QAbstractEventDispatcher_Tr(s string) string { } func QAbstractEventDispatcher_Instance() *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance())) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance()), nil) } func (this *QAbstractEventDispatcher) ProcessEvents(flags QEventLoop__ProcessEventsFlag) bool { @@ -200,12 +209,12 @@ func QAbstractEventDispatcher_Tr3(s string, c string, n int) string { } func QAbstractEventDispatcher_Instance1(thread *QThread) *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance1(thread.cPointer()))) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QAbstractEventDispatcher_Instance1(thread.cPointer())), nil) } // Delete this object from C++ memory. func (this *QAbstractEventDispatcher) Delete() { - C.QAbstractEventDispatcher_Delete(this.h) + C.QAbstractEventDispatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -218,7 +227,8 @@ func (this *QAbstractEventDispatcher) GoGC() { } type QAbstractEventDispatcher__TimerInfo struct { - h *C.QAbstractEventDispatcher__TimerInfo + h *C.QAbstractEventDispatcher__TimerInfo + isSubclass bool } func (this *QAbstractEventDispatcher__TimerInfo) cPointer() *C.QAbstractEventDispatcher__TimerInfo { @@ -235,6 +245,7 @@ func (this *QAbstractEventDispatcher__TimerInfo) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQAbstractEventDispatcher__TimerInfo constructs the type using only CGO pointers. func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__TimerInfo) *QAbstractEventDispatcher__TimerInfo { if h == nil { return nil @@ -242,19 +253,28 @@ func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__Timer return &QAbstractEventDispatcher__TimerInfo{h: h} } +// UnsafeNewQAbstractEventDispatcher__TimerInfo constructs the type using only unsafe pointers. func UnsafeNewQAbstractEventDispatcher__TimerInfo(h unsafe.Pointer) *QAbstractEventDispatcher__TimerInfo { - return newQAbstractEventDispatcher__TimerInfo((*C.QAbstractEventDispatcher__TimerInfo)(h)) + if h == nil { + return nil + } + + return &QAbstractEventDispatcher__TimerInfo{h: (*C.QAbstractEventDispatcher__TimerInfo)(h)} } // NewQAbstractEventDispatcher__TimerInfo constructs a new QAbstractEventDispatcher::TimerInfo object. func NewQAbstractEventDispatcher__TimerInfo(id int, i int, t TimerType) *QAbstractEventDispatcher__TimerInfo { - ret := C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t)) - return newQAbstractEventDispatcher__TimerInfo(ret) + var outptr_QAbstractEventDispatcher__TimerInfo *C.QAbstractEventDispatcher__TimerInfo = nil + + C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t), &outptr_QAbstractEventDispatcher__TimerInfo) + ret := newQAbstractEventDispatcher__TimerInfo(outptr_QAbstractEventDispatcher__TimerInfo) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QAbstractEventDispatcher__TimerInfo) Delete() { - C.QAbstractEventDispatcher__TimerInfo_Delete(this.h) + C.QAbstractEventDispatcher__TimerInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstracteventdispatcher.h b/qt6/gen_qabstracteventdispatcher.h index 3cdcd034..7e1f541e 100644 --- a/qt6/gen_qabstracteventdispatcher.h +++ b/qt6/gen_qabstracteventdispatcher.h @@ -65,10 +65,10 @@ void QAbstractEventDispatcher_connect_Awake(QAbstractEventDispatcher* self, intp struct miqt_string QAbstractEventDispatcher_Tr2(const char* s, const char* c); struct miqt_string QAbstractEventDispatcher_Tr3(const char* s, const char* c, int n); QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread); -void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self); +void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); -QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t); -void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self); +void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); +void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractfileiconprovider.cpp b/qt6/gen_qabstractfileiconprovider.cpp index f5a96c4c..49dcfcc0 100644 --- a/qt6/gen_qabstractfileiconprovider.cpp +++ b/qt6/gen_qabstractfileiconprovider.cpp @@ -8,8 +8,148 @@ #include "gen_qabstractfileiconprovider.h" #include "_cgo_export.h" -QAbstractFileIconProvider* QAbstractFileIconProvider_new() { - return new QAbstractFileIconProvider(); +class MiqtVirtualQAbstractFileIconProvider : public virtual QAbstractFileIconProvider { +public: + + MiqtVirtualQAbstractFileIconProvider(): QAbstractFileIconProvider() {}; + + virtual ~MiqtVirtualQAbstractFileIconProvider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Icon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon icon(QAbstractFileIconProvider::IconType param1) const override { + if (handle__Icon == 0) { + return QAbstractFileIconProvider::icon(param1); + } + + QAbstractFileIconProvider::IconType param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QIcon* callback_return_value = miqt_exec_callback_QAbstractFileIconProvider_Icon(const_cast(this), handle__Icon, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_Icon(int param1) const { + + return new QIcon(QAbstractFileIconProvider::icon(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IconWithQFileInfo = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon icon(const QFileInfo& param1) const override { + if (handle__IconWithQFileInfo == 0) { + return QAbstractFileIconProvider::icon(param1); + } + + const QFileInfo& param1_ret = param1; + // Cast returned reference into pointer + QFileInfo* sigval1 = const_cast(¶m1_ret); + + QIcon* callback_return_value = miqt_exec_callback_QAbstractFileIconProvider_IconWithQFileInfo(const_cast(this), handle__IconWithQFileInfo, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_IconWithQFileInfo(QFileInfo* param1) const { + + return new QIcon(QAbstractFileIconProvider::icon(*param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual QString type(const QFileInfo& param1) const override { + if (handle__Type == 0) { + return QAbstractFileIconProvider::type(param1); + } + + const QFileInfo& param1_ret = param1; + // Cast returned reference into pointer + QFileInfo* sigval1 = const_cast(¶m1_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QAbstractFileIconProvider_Type(const_cast(this), handle__Type, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Type(QFileInfo* param1) const { + + QString _ret = QAbstractFileIconProvider::type(*param1); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetOptions = 0; + + // Subclass to allow providing a Go implementation + virtual void setOptions(QAbstractFileIconProvider::Options options) override { + if (handle__SetOptions == 0) { + QAbstractFileIconProvider::setOptions(options); + return; + } + + QAbstractFileIconProvider::Options options_ret = options; + int sigval1 = static_cast(options_ret); + + miqt_exec_callback_QAbstractFileIconProvider_SetOptions(this, handle__SetOptions, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetOptions(int options) { + + QAbstractFileIconProvider::setOptions(static_cast(options)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Options = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractFileIconProvider::Options options() const override { + if (handle__Options == 0) { + return QAbstractFileIconProvider::options(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractFileIconProvider_Options(const_cast(this), handle__Options); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Options() const { + + QAbstractFileIconProvider::Options _ret = QAbstractFileIconProvider::options(); + return static_cast(_ret); + + } + +}; + +void QAbstractFileIconProvider_new(QAbstractFileIconProvider** outptr_QAbstractFileIconProvider) { + MiqtVirtualQAbstractFileIconProvider* ret = new MiqtVirtualQAbstractFileIconProvider(); + *outptr_QAbstractFileIconProvider = ret; } QIcon* QAbstractFileIconProvider_Icon(const QAbstractFileIconProvider* self, int param1) { @@ -40,7 +180,51 @@ int QAbstractFileIconProvider_Options(const QAbstractFileIconProvider* self) { return static_cast(_ret); } -void QAbstractFileIconProvider_Delete(QAbstractFileIconProvider* self) { - delete self; +void QAbstractFileIconProvider_override_virtual_Icon(void* self, intptr_t slot) { + dynamic_cast( (QAbstractFileIconProvider*)(self) )->handle__Icon = slot; +} + +QIcon* QAbstractFileIconProvider_virtualbase_Icon(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractFileIconProvider*)(self) )->virtualbase_Icon(param1); +} + +void QAbstractFileIconProvider_override_virtual_IconWithQFileInfo(void* self, intptr_t slot) { + dynamic_cast( (QAbstractFileIconProvider*)(self) )->handle__IconWithQFileInfo = slot; +} + +QIcon* QAbstractFileIconProvider_virtualbase_IconWithQFileInfo(const void* self, QFileInfo* param1) { + return ( (const MiqtVirtualQAbstractFileIconProvider*)(self) )->virtualbase_IconWithQFileInfo(param1); +} + +void QAbstractFileIconProvider_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QAbstractFileIconProvider*)(self) )->handle__Type = slot; +} + +struct miqt_string QAbstractFileIconProvider_virtualbase_Type(const void* self, QFileInfo* param1) { + return ( (const MiqtVirtualQAbstractFileIconProvider*)(self) )->virtualbase_Type(param1); +} + +void QAbstractFileIconProvider_override_virtual_SetOptions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractFileIconProvider*)(self) )->handle__SetOptions = slot; +} + +void QAbstractFileIconProvider_virtualbase_SetOptions(void* self, int options) { + ( (MiqtVirtualQAbstractFileIconProvider*)(self) )->virtualbase_SetOptions(options); +} + +void QAbstractFileIconProvider_override_virtual_Options(void* self, intptr_t slot) { + dynamic_cast( (QAbstractFileIconProvider*)(self) )->handle__Options = slot; +} + +int QAbstractFileIconProvider_virtualbase_Options(const void* self) { + return ( (const MiqtVirtualQAbstractFileIconProvider*)(self) )->virtualbase_Options(); +} + +void QAbstractFileIconProvider_Delete(QAbstractFileIconProvider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractfileiconprovider.go b/qt6/gen_qabstractfileiconprovider.go index 67929fa5..48715c67 100644 --- a/qt6/gen_qabstractfileiconprovider.go +++ b/qt6/gen_qabstractfileiconprovider.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -32,7 +33,8 @@ const ( ) type QAbstractFileIconProvider struct { - h *C.QAbstractFileIconProvider + h *C.QAbstractFileIconProvider + isSubclass bool } func (this *QAbstractFileIconProvider) cPointer() *C.QAbstractFileIconProvider { @@ -49,6 +51,7 @@ func (this *QAbstractFileIconProvider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractFileIconProvider constructs the type using only CGO pointers. func newQAbstractFileIconProvider(h *C.QAbstractFileIconProvider) *QAbstractFileIconProvider { if h == nil { return nil @@ -56,14 +59,23 @@ func newQAbstractFileIconProvider(h *C.QAbstractFileIconProvider) *QAbstractFile return &QAbstractFileIconProvider{h: h} } +// UnsafeNewQAbstractFileIconProvider constructs the type using only unsafe pointers. func UnsafeNewQAbstractFileIconProvider(h unsafe.Pointer) *QAbstractFileIconProvider { - return newQAbstractFileIconProvider((*C.QAbstractFileIconProvider)(h)) + if h == nil { + return nil + } + + return &QAbstractFileIconProvider{h: (*C.QAbstractFileIconProvider)(h)} } // NewQAbstractFileIconProvider constructs a new QAbstractFileIconProvider object. func NewQAbstractFileIconProvider() *QAbstractFileIconProvider { - ret := C.QAbstractFileIconProvider_new() - return newQAbstractFileIconProvider(ret) + var outptr_QAbstractFileIconProvider *C.QAbstractFileIconProvider = nil + + C.QAbstractFileIconProvider_new(&outptr_QAbstractFileIconProvider) + ret := newQAbstractFileIconProvider(outptr_QAbstractFileIconProvider) + ret.isSubclass = true + return ret } func (this *QAbstractFileIconProvider) Icon(param1 QAbstractFileIconProvider__IconType) *QIcon { @@ -95,9 +107,141 @@ func (this *QAbstractFileIconProvider) Options() QAbstractFileIconProvider__Opti return (QAbstractFileIconProvider__Option)(C.QAbstractFileIconProvider_Options(this.h)) } +func (this *QAbstractFileIconProvider) callVirtualBase_Icon(param1 QAbstractFileIconProvider__IconType) *QIcon { + + _ret := C.QAbstractFileIconProvider_virtualbase_Icon(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQIcon(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractFileIconProvider) OnIcon(slot func(super func(param1 QAbstractFileIconProvider__IconType) *QIcon, param1 QAbstractFileIconProvider__IconType) *QIcon) { + C.QAbstractFileIconProvider_override_virtual_Icon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractFileIconProvider_Icon +func miqt_exec_callback_QAbstractFileIconProvider_Icon(self *C.QAbstractFileIconProvider, cb C.intptr_t, param1 C.int) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QAbstractFileIconProvider__IconType) *QIcon, param1 QAbstractFileIconProvider__IconType) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractFileIconProvider__IconType)(param1) + + virtualReturn := gofunc((&QAbstractFileIconProvider{h: self}).callVirtualBase_Icon, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractFileIconProvider) callVirtualBase_IconWithQFileInfo(param1 *QFileInfo) *QIcon { + + _ret := C.QAbstractFileIconProvider_virtualbase_IconWithQFileInfo(unsafe.Pointer(this.h), param1.cPointer()) + _goptr := newQIcon(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractFileIconProvider) OnIconWithQFileInfo(slot func(super func(param1 *QFileInfo) *QIcon, param1 *QFileInfo) *QIcon) { + C.QAbstractFileIconProvider_override_virtual_IconWithQFileInfo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractFileIconProvider_IconWithQFileInfo +func miqt_exec_callback_QAbstractFileIconProvider_IconWithQFileInfo(self *C.QAbstractFileIconProvider, cb C.intptr_t, param1 *C.QFileInfo) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFileInfo) *QIcon, param1 *QFileInfo) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFileInfo(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAbstractFileIconProvider{h: self}).callVirtualBase_IconWithQFileInfo, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractFileIconProvider) callVirtualBase_Type(param1 *QFileInfo) string { + + var _ms C.struct_miqt_string = C.QAbstractFileIconProvider_virtualbase_Type(unsafe.Pointer(this.h), param1.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QAbstractFileIconProvider) OnType(slot func(super func(param1 *QFileInfo) string, param1 *QFileInfo) string) { + C.QAbstractFileIconProvider_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractFileIconProvider_Type +func miqt_exec_callback_QAbstractFileIconProvider_Type(self *C.QAbstractFileIconProvider, cb C.intptr_t, param1 *C.QFileInfo) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFileInfo) string, param1 *QFileInfo) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFileInfo(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAbstractFileIconProvider{h: self}).callVirtualBase_Type, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QAbstractFileIconProvider) callVirtualBase_SetOptions(options QAbstractFileIconProvider__Option) { + + C.QAbstractFileIconProvider_virtualbase_SetOptions(unsafe.Pointer(this.h), (C.int)(options)) + +} +func (this *QAbstractFileIconProvider) OnSetOptions(slot func(super func(options QAbstractFileIconProvider__Option), options QAbstractFileIconProvider__Option)) { + C.QAbstractFileIconProvider_override_virtual_SetOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractFileIconProvider_SetOptions +func miqt_exec_callback_QAbstractFileIconProvider_SetOptions(self *C.QAbstractFileIconProvider, cb C.intptr_t, options C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(options QAbstractFileIconProvider__Option), options QAbstractFileIconProvider__Option)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractFileIconProvider__Option)(options) + + gofunc((&QAbstractFileIconProvider{h: self}).callVirtualBase_SetOptions, slotval1) + +} + +func (this *QAbstractFileIconProvider) callVirtualBase_Options() QAbstractFileIconProvider__Option { + + return (QAbstractFileIconProvider__Option)(C.QAbstractFileIconProvider_virtualbase_Options(unsafe.Pointer(this.h))) + +} +func (this *QAbstractFileIconProvider) OnOptions(slot func(super func() QAbstractFileIconProvider__Option) QAbstractFileIconProvider__Option) { + C.QAbstractFileIconProvider_override_virtual_Options(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractFileIconProvider_Options +func miqt_exec_callback_QAbstractFileIconProvider_Options(self *C.QAbstractFileIconProvider, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractFileIconProvider__Option) QAbstractFileIconProvider__Option) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractFileIconProvider{h: self}).callVirtualBase_Options) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractFileIconProvider) Delete() { - C.QAbstractFileIconProvider_Delete(this.h) + C.QAbstractFileIconProvider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractfileiconprovider.h b/qt6/gen_qabstractfileiconprovider.h index 3ab77370..29e37821 100644 --- a/qt6/gen_qabstractfileiconprovider.h +++ b/qt6/gen_qabstractfileiconprovider.h @@ -24,13 +24,23 @@ typedef struct QFileInfo QFileInfo; typedef struct QIcon QIcon; #endif -QAbstractFileIconProvider* QAbstractFileIconProvider_new(); +void QAbstractFileIconProvider_new(QAbstractFileIconProvider** outptr_QAbstractFileIconProvider); QIcon* QAbstractFileIconProvider_Icon(const QAbstractFileIconProvider* self, int param1); QIcon* QAbstractFileIconProvider_IconWithQFileInfo(const QAbstractFileIconProvider* self, QFileInfo* param1); struct miqt_string QAbstractFileIconProvider_Type(const QAbstractFileIconProvider* self, QFileInfo* param1); void QAbstractFileIconProvider_SetOptions(QAbstractFileIconProvider* self, int options); int QAbstractFileIconProvider_Options(const QAbstractFileIconProvider* self); -void QAbstractFileIconProvider_Delete(QAbstractFileIconProvider* self); +void QAbstractFileIconProvider_override_virtual_Icon(void* self, intptr_t slot); +QIcon* QAbstractFileIconProvider_virtualbase_Icon(const void* self, int param1); +void QAbstractFileIconProvider_override_virtual_IconWithQFileInfo(void* self, intptr_t slot); +QIcon* QAbstractFileIconProvider_virtualbase_IconWithQFileInfo(const void* self, QFileInfo* param1); +void QAbstractFileIconProvider_override_virtual_Type(void* self, intptr_t slot); +struct miqt_string QAbstractFileIconProvider_virtualbase_Type(const void* self, QFileInfo* param1); +void QAbstractFileIconProvider_override_virtual_SetOptions(void* self, intptr_t slot); +void QAbstractFileIconProvider_virtualbase_SetOptions(void* self, int options); +void QAbstractFileIconProvider_override_virtual_Options(void* self, intptr_t slot); +int QAbstractFileIconProvider_virtualbase_Options(const void* self); +void QAbstractFileIconProvider_Delete(QAbstractFileIconProvider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractitemdelegate.cpp b/qt6/gen_qabstractitemdelegate.cpp index 75a03001..f48182ac 100644 --- a/qt6/gen_qabstractitemdelegate.cpp +++ b/qt6/gen_qabstractitemdelegate.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -155,7 +156,11 @@ void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, int }); } -void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self) { - delete self; +void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractitemdelegate.go b/qt6/gen_qabstractitemdelegate.go index 0a45ab80..636caf15 100644 --- a/qt6/gen_qabstractitemdelegate.go +++ b/qt6/gen_qabstractitemdelegate.go @@ -25,7 +25,8 @@ const ( ) type QAbstractItemDelegate struct { - h *C.QAbstractItemDelegate + h *C.QAbstractItemDelegate + isSubclass bool *QObject } @@ -43,15 +44,23 @@ func (this *QAbstractItemDelegate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractItemDelegate(h *C.QAbstractItemDelegate) *QAbstractItemDelegate { +// newQAbstractItemDelegate constructs the type using only CGO pointers. +func newQAbstractItemDelegate(h *C.QAbstractItemDelegate, h_QObject *C.QObject) *QAbstractItemDelegate { if h == nil { return nil } - return &QAbstractItemDelegate{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractItemDelegate{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer) *QAbstractItemDelegate { - return newQAbstractItemDelegate((*C.QAbstractItemDelegate)(h)) +// UnsafeNewQAbstractItemDelegate constructs the type using only unsafe pointers. +func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemDelegate { + if h == nil { + return nil + } + + return &QAbstractItemDelegate{h: (*C.QAbstractItemDelegate)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractItemDelegate) MetaObject() *QMetaObject { @@ -85,7 +94,7 @@ func (this *QAbstractItemDelegate) SizeHint(option *QStyleOptionViewItem, index } func (this *QAbstractItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) } func (this *QAbstractItemDelegate) DestroyEditor(editor *QWidget, index *QModelIndex) { @@ -137,7 +146,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CommitData(cb C.intptr_t, editor * } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) gofunc(slotval1) } @@ -157,7 +166,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) gofunc(slotval1) } @@ -219,7 +228,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) gofunc(slotval1, slotval2) @@ -227,7 +236,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor // Delete this object from C++ memory. func (this *QAbstractItemDelegate) Delete() { - C.QAbstractItemDelegate_Delete(this.h) + C.QAbstractItemDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractitemdelegate.h b/qt6/gen_qabstractitemdelegate.h index 27fe1a35..ddc07f95 100644 --- a/qt6/gen_qabstractitemdelegate.h +++ b/qt6/gen_qabstractitemdelegate.h @@ -22,6 +22,7 @@ class QEvent; class QHelpEvent; class QMetaObject; class QModelIndex; +class QObject; class QPainter; class QSize; class QStyleOptionViewItem; @@ -34,6 +35,7 @@ typedef struct QEvent QEvent; typedef struct QHelpEvent QHelpEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -63,7 +65,7 @@ struct miqt_string QAbstractItemDelegate_Tr2(const char* s, const char* c); struct miqt_string QAbstractItemDelegate_Tr3(const char* s, const char* c, int n); void QAbstractItemDelegate_CloseEditor2(QAbstractItemDelegate* self, QWidget* editor, int hint); void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, intptr_t slot); -void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self); +void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractitemmodel.cpp b/qt6/gen_qabstractitemmodel.cpp index 1960bb38..dd251771 100644 --- a/qt6/gen_qabstractitemmodel.cpp +++ b/qt6/gen_qabstractitemmodel.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -19,12 +20,14 @@ #include "gen_qabstractitemmodel.h" #include "_cgo_export.h" -QModelRoleData* QModelRoleData_new(int role) { - return new QModelRoleData(static_cast(role)); +void QModelRoleData_new(int role, QModelRoleData** outptr_QModelRoleData) { + QModelRoleData* ret = new QModelRoleData(static_cast(role)); + *outptr_QModelRoleData = ret; } -QModelRoleData* QModelRoleData_new2(QModelRoleData* param1) { - return new QModelRoleData(*param1); +void QModelRoleData_new2(QModelRoleData* param1, QModelRoleData** outptr_QModelRoleData) { + QModelRoleData* ret = new QModelRoleData(*param1); + *outptr_QModelRoleData = ret; } int QModelRoleData_Role(const QModelRoleData* self) { @@ -51,24 +54,32 @@ void QModelRoleData_OperatorAssign(QModelRoleData* self, QModelRoleData* param1) self->operator=(*param1); } -void QModelRoleData_Delete(QModelRoleData* self) { - delete self; +void QModelRoleData_Delete(QModelRoleData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QModelRoleDataSpan* QModelRoleDataSpan_new() { - return new QModelRoleDataSpan(); +void QModelRoleDataSpan_new(QModelRoleDataSpan** outptr_QModelRoleDataSpan) { + QModelRoleDataSpan* ret = new QModelRoleDataSpan(); + *outptr_QModelRoleDataSpan = ret; } -QModelRoleDataSpan* QModelRoleDataSpan_new2(QModelRoleData* modelRoleData) { - return new QModelRoleDataSpan(*modelRoleData); +void QModelRoleDataSpan_new2(QModelRoleData* modelRoleData, QModelRoleDataSpan** outptr_QModelRoleDataSpan) { + QModelRoleDataSpan* ret = new QModelRoleDataSpan(*modelRoleData); + *outptr_QModelRoleDataSpan = ret; } -QModelRoleDataSpan* QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal) { - return new QModelRoleDataSpan(modelRoleData, (qsizetype)(lenVal)); +void QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal, QModelRoleDataSpan** outptr_QModelRoleDataSpan) { + QModelRoleDataSpan* ret = new QModelRoleDataSpan(modelRoleData, (qsizetype)(lenVal)); + *outptr_QModelRoleDataSpan = ret; } -QModelRoleDataSpan* QModelRoleDataSpan_new4(QModelRoleDataSpan* param1) { - return new QModelRoleDataSpan(*param1); +void QModelRoleDataSpan_new4(QModelRoleDataSpan* param1, QModelRoleDataSpan** outptr_QModelRoleDataSpan) { + QModelRoleDataSpan* ret = new QModelRoleDataSpan(*param1); + *outptr_QModelRoleDataSpan = ret; } ptrdiff_t QModelRoleDataSpan_Size(const QModelRoleDataSpan* self) { @@ -103,16 +114,22 @@ QVariant* QModelRoleDataSpan_DataForRole(const QModelRoleDataSpan* self, int rol return self->dataForRole(static_cast(role)); } -void QModelRoleDataSpan_Delete(QModelRoleDataSpan* self) { - delete self; +void QModelRoleDataSpan_Delete(QModelRoleDataSpan* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QModelIndex* QModelIndex_new() { - return new QModelIndex(); +void QModelIndex_new(QModelIndex** outptr_QModelIndex) { + QModelIndex* ret = new QModelIndex(); + *outptr_QModelIndex = ret; } -QModelIndex* QModelIndex_new2(QModelIndex* param1) { - return new QModelIndex(*param1); +void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex) { + QModelIndex* ret = new QModelIndex(*param1); + *outptr_QModelIndex = ret; } int QModelIndex_Row(const QModelIndex* self) { @@ -189,20 +206,27 @@ QVariant* QModelIndex_Data1(const QModelIndex* self, int role) { return new QVariant(self->data(static_cast(role))); } -void QModelIndex_Delete(QModelIndex* self) { - delete self; +void QModelIndex_Delete(QModelIndex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPersistentModelIndex* QPersistentModelIndex_new() { - return new QPersistentModelIndex(); +void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex) { + QPersistentModelIndex* ret = new QPersistentModelIndex(); + *outptr_QPersistentModelIndex = ret; } -QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index) { - return new QPersistentModelIndex(*index); +void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex) { + QPersistentModelIndex* ret = new QPersistentModelIndex(*index); + *outptr_QPersistentModelIndex = ret; } -QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other) { - return new QPersistentModelIndex(*other); +void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex) { + QPersistentModelIndex* ret = new QPersistentModelIndex(*other); + *outptr_QPersistentModelIndex = ret; } bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other) { @@ -291,8 +315,12 @@ QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int rol return new QVariant(self->data(static_cast(role))); } -void QPersistentModelIndex_Delete(QPersistentModelIndex* self) { - delete self; +void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { @@ -318,8 +346,8 @@ bool QAbstractItemModel_HasIndex(const QAbstractItemModel* self, int row, int co return self->hasIndex(static_cast(row), static_cast(column)); } -QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractItemModel_Parent(const QAbstractItemModel* self, QModelIndex* child) { @@ -330,32 +358,32 @@ QModelIndex* QAbstractItemModel_Sibling(const QAbstractItemModel* self, int row, return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -int QAbstractItemModel_RowCount(const QAbstractItemModel* self) { - return self->rowCount(); +int QAbstractItemModel_RowCount(const QAbstractItemModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self) { - return self->columnCount(); +int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self) { - return self->hasChildren(); +bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } -QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } struct miqt_map /* of int to QVariant* */ QAbstractItemModel_ItemData(const QAbstractItemModel* self, QModelIndex* index) { @@ -438,20 +466,20 @@ int QAbstractItemModel_SupportedDragActions(const QAbstractItemModel* self) { return static_cast(_ret); } -bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } -bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } bool QAbstractItemModel_MoveRows(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { @@ -499,16 +527,16 @@ int QAbstractItemModel_Flags(const QAbstractItemModel* self, QModelIndex* index) return static_cast(_ret); } -void QAbstractItemModel_Sort(QAbstractItemModel* self, int column) { - self->sort(static_cast(column)); +void QAbstractItemModel_Sort(QAbstractItemModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelIndex* index) { return new QModelIndex(self->buddy(*index)); } -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value); +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -639,54 +667,6 @@ bool QAbstractItemModel_HasIndex3(const QAbstractItemModel* self, int row, int c return self->hasIndex(static_cast(row), static_cast(column), *parent); } -QModelIndex* QAbstractItemModel_Index3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -int QAbstractItemModel_RowCount1(const QAbstractItemModel* self, QModelIndex* parent) { - return self->rowCount(*parent); -} - -int QAbstractItemModel_ColumnCount1(const QAbstractItemModel* self, QModelIndex* parent) { - return self->columnCount(*parent); -} - -bool QAbstractItemModel_HasChildren1(const QAbstractItemModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); -} - -QVariant* QAbstractItemModel_Data2(const QAbstractItemModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); -} - -bool QAbstractItemModel_SetData3(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); -} - -QVariant* QAbstractItemModel_HeaderData3(const QAbstractItemModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); -} - -bool QAbstractItemModel_SetHeaderData4(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); -} - -bool QAbstractItemModel_InsertRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); -} - -bool QAbstractItemModel_InsertColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); -} - -bool QAbstractItemModel_RemoveRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); -} - -bool QAbstractItemModel_RemoveColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); -} - bool QAbstractItemModel_InsertRow2(QAbstractItemModel* self, int row, QModelIndex* parent) { return self->insertRow(static_cast(row), *parent); } @@ -703,36 +683,6 @@ bool QAbstractItemModel_RemoveColumn2(QAbstractItemModel* self, int column, QMod return self->removeColumn(static_cast(column), *parent); } -void QAbstractItemModel_Sort2(QAbstractItemModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); -} - -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex* index, int options) { return self->checkIndex(*index, static_cast(options)); } @@ -877,8 +827,12 @@ void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self }); } -void QAbstractItemModel_Delete(QAbstractItemModel* self) { - delete self; +void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { @@ -900,8 +854,8 @@ struct miqt_string QAbstractTableModel_Tr(const char* s) { return _ms; } -QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractTableModel_Sibling(const QAbstractTableModel* self, int row, int column, QModelIndex* idx) { @@ -939,12 +893,12 @@ struct miqt_string QAbstractTableModel_Tr3(const char* s, const char* c, int n) return _ms; } -QModelIndex* QAbstractTableModel_Index3(const QAbstractTableModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -void QAbstractTableModel_Delete(QAbstractTableModel* self) { - delete self; +void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { @@ -966,8 +920,8 @@ struct miqt_string QAbstractListModel_Tr(const char* s) { return _ms; } -QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row) { - return new QModelIndex(self->index(static_cast(row))); +QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QAbstractListModel_Sibling(const QAbstractListModel* self, int row, int column, QModelIndex* idx) { @@ -1005,15 +959,11 @@ struct miqt_string QAbstractListModel_Tr3(const char* s, const char* c, int n) { return _ms; } -QModelIndex* QAbstractListModel_Index2(const QAbstractListModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); -} - -QModelIndex* QAbstractListModel_Index3(const QAbstractListModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -void QAbstractListModel_Delete(QAbstractListModel* self) { - delete self; +void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractitemmodel.go b/qt6/gen_qabstractitemmodel.go index 0749fe4e..29befec4 100644 --- a/qt6/gen_qabstractitemmodel.go +++ b/qt6/gen_qabstractitemmodel.go @@ -32,7 +32,8 @@ const ( ) type QModelRoleData struct { - h *C.QModelRoleData + h *C.QModelRoleData + isSubclass bool } func (this *QModelRoleData) cPointer() *C.QModelRoleData { @@ -49,6 +50,7 @@ func (this *QModelRoleData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQModelRoleData constructs the type using only CGO pointers. func newQModelRoleData(h *C.QModelRoleData) *QModelRoleData { if h == nil { return nil @@ -56,20 +58,33 @@ func newQModelRoleData(h *C.QModelRoleData) *QModelRoleData { return &QModelRoleData{h: h} } +// UnsafeNewQModelRoleData constructs the type using only unsafe pointers. func UnsafeNewQModelRoleData(h unsafe.Pointer) *QModelRoleData { - return newQModelRoleData((*C.QModelRoleData)(h)) + if h == nil { + return nil + } + + return &QModelRoleData{h: (*C.QModelRoleData)(h)} } // NewQModelRoleData constructs a new QModelRoleData object. func NewQModelRoleData(role int) *QModelRoleData { - ret := C.QModelRoleData_new((C.int)(role)) - return newQModelRoleData(ret) + var outptr_QModelRoleData *C.QModelRoleData = nil + + C.QModelRoleData_new((C.int)(role), &outptr_QModelRoleData) + ret := newQModelRoleData(outptr_QModelRoleData) + ret.isSubclass = true + return ret } // NewQModelRoleData2 constructs a new QModelRoleData object. func NewQModelRoleData2(param1 *QModelRoleData) *QModelRoleData { - ret := C.QModelRoleData_new2(param1.cPointer()) - return newQModelRoleData(ret) + var outptr_QModelRoleData *C.QModelRoleData = nil + + C.QModelRoleData_new2(param1.cPointer(), &outptr_QModelRoleData) + ret := newQModelRoleData(outptr_QModelRoleData) + ret.isSubclass = true + return ret } func (this *QModelRoleData) Role() int { @@ -94,7 +109,7 @@ func (this *QModelRoleData) OperatorAssign(param1 *QModelRoleData) { // Delete this object from C++ memory. func (this *QModelRoleData) Delete() { - C.QModelRoleData_Delete(this.h) + C.QModelRoleData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -107,7 +122,8 @@ func (this *QModelRoleData) GoGC() { } type QModelRoleDataSpan struct { - h *C.QModelRoleDataSpan + h *C.QModelRoleDataSpan + isSubclass bool } func (this *QModelRoleDataSpan) cPointer() *C.QModelRoleDataSpan { @@ -124,6 +140,7 @@ func (this *QModelRoleDataSpan) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQModelRoleDataSpan constructs the type using only CGO pointers. func newQModelRoleDataSpan(h *C.QModelRoleDataSpan) *QModelRoleDataSpan { if h == nil { return nil @@ -131,32 +148,53 @@ func newQModelRoleDataSpan(h *C.QModelRoleDataSpan) *QModelRoleDataSpan { return &QModelRoleDataSpan{h: h} } +// UnsafeNewQModelRoleDataSpan constructs the type using only unsafe pointers. func UnsafeNewQModelRoleDataSpan(h unsafe.Pointer) *QModelRoleDataSpan { - return newQModelRoleDataSpan((*C.QModelRoleDataSpan)(h)) + if h == nil { + return nil + } + + return &QModelRoleDataSpan{h: (*C.QModelRoleDataSpan)(h)} } // NewQModelRoleDataSpan constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan() *QModelRoleDataSpan { - ret := C.QModelRoleDataSpan_new() - return newQModelRoleDataSpan(ret) + var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil + + C.QModelRoleDataSpan_new(&outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret.isSubclass = true + return ret } // NewQModelRoleDataSpan2 constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan2(modelRoleData *QModelRoleData) *QModelRoleDataSpan { - ret := C.QModelRoleDataSpan_new2(modelRoleData.cPointer()) - return newQModelRoleDataSpan(ret) + var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil + + C.QModelRoleDataSpan_new2(modelRoleData.cPointer(), &outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret.isSubclass = true + return ret } // NewQModelRoleDataSpan3 constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan3(modelRoleData *QModelRoleData, lenVal int64) *QModelRoleDataSpan { - ret := C.QModelRoleDataSpan_new3(modelRoleData.cPointer(), (C.ptrdiff_t)(lenVal)) - return newQModelRoleDataSpan(ret) + var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil + + C.QModelRoleDataSpan_new3(modelRoleData.cPointer(), (C.ptrdiff_t)(lenVal), &outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret.isSubclass = true + return ret } // NewQModelRoleDataSpan4 constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan4(param1 *QModelRoleDataSpan) *QModelRoleDataSpan { - ret := C.QModelRoleDataSpan_new4(param1.cPointer()) - return newQModelRoleDataSpan(ret) + var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil + + C.QModelRoleDataSpan_new4(param1.cPointer(), &outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret.isSubclass = true + return ret } func (this *QModelRoleDataSpan) Size() int64 { @@ -189,7 +227,7 @@ func (this *QModelRoleDataSpan) DataForRole(role int) *QVariant { // Delete this object from C++ memory. func (this *QModelRoleDataSpan) Delete() { - C.QModelRoleDataSpan_Delete(this.h) + C.QModelRoleDataSpan_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -202,7 +240,8 @@ func (this *QModelRoleDataSpan) GoGC() { } type QModelIndex struct { - h *C.QModelIndex + h *C.QModelIndex + isSubclass bool } func (this *QModelIndex) cPointer() *C.QModelIndex { @@ -219,6 +258,7 @@ func (this *QModelIndex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQModelIndex constructs the type using only CGO pointers. func newQModelIndex(h *C.QModelIndex) *QModelIndex { if h == nil { return nil @@ -226,20 +266,33 @@ func newQModelIndex(h *C.QModelIndex) *QModelIndex { return &QModelIndex{h: h} } +// UnsafeNewQModelIndex constructs the type using only unsafe pointers. func UnsafeNewQModelIndex(h unsafe.Pointer) *QModelIndex { - return newQModelIndex((*C.QModelIndex)(h)) + if h == nil { + return nil + } + + return &QModelIndex{h: (*C.QModelIndex)(h)} } // NewQModelIndex constructs a new QModelIndex object. func NewQModelIndex() *QModelIndex { - ret := C.QModelIndex_new() - return newQModelIndex(ret) + var outptr_QModelIndex *C.QModelIndex = nil + + C.QModelIndex_new(&outptr_QModelIndex) + ret := newQModelIndex(outptr_QModelIndex) + ret.isSubclass = true + return ret } // NewQModelIndex2 constructs a new QModelIndex object. func NewQModelIndex2(param1 *QModelIndex) *QModelIndex { - ret := C.QModelIndex_new2(param1.cPointer()) - return newQModelIndex(ret) + var outptr_QModelIndex *C.QModelIndex = nil + + C.QModelIndex_new2(param1.cPointer(), &outptr_QModelIndex) + ret := newQModelIndex(outptr_QModelIndex) + ret.isSubclass = true + return ret } func (this *QModelIndex) Row() int { @@ -306,7 +359,7 @@ func (this *QModelIndex) Flags() ItemFlag { } func (this *QModelIndex) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QModelIndex_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QModelIndex_Model(this.h)), nil) } func (this *QModelIndex) IsValid() bool { @@ -334,7 +387,7 @@ func (this *QModelIndex) Data1(role int) *QVariant { // Delete this object from C++ memory. func (this *QModelIndex) Delete() { - C.QModelIndex_Delete(this.h) + C.QModelIndex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -347,7 +400,8 @@ func (this *QModelIndex) GoGC() { } type QPersistentModelIndex struct { - h *C.QPersistentModelIndex + h *C.QPersistentModelIndex + isSubclass bool } func (this *QPersistentModelIndex) cPointer() *C.QPersistentModelIndex { @@ -364,6 +418,7 @@ func (this *QPersistentModelIndex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPersistentModelIndex constructs the type using only CGO pointers. func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex { if h == nil { return nil @@ -371,26 +426,43 @@ func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex return &QPersistentModelIndex{h: h} } +// UnsafeNewQPersistentModelIndex constructs the type using only unsafe pointers. func UnsafeNewQPersistentModelIndex(h unsafe.Pointer) *QPersistentModelIndex { - return newQPersistentModelIndex((*C.QPersistentModelIndex)(h)) + if h == nil { + return nil + } + + return &QPersistentModelIndex{h: (*C.QPersistentModelIndex)(h)} } // NewQPersistentModelIndex constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex() *QPersistentModelIndex { - ret := C.QPersistentModelIndex_new() - return newQPersistentModelIndex(ret) + var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil + + C.QPersistentModelIndex_new(&outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret.isSubclass = true + return ret } // NewQPersistentModelIndex2 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex2(index *QModelIndex) *QPersistentModelIndex { - ret := C.QPersistentModelIndex_new2(index.cPointer()) - return newQPersistentModelIndex(ret) + var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil + + C.QPersistentModelIndex_new2(index.cPointer(), &outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret.isSubclass = true + return ret } // NewQPersistentModelIndex3 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex3(other *QPersistentModelIndex) *QPersistentModelIndex { - ret := C.QPersistentModelIndex_new3(other.cPointer()) - return newQPersistentModelIndex(ret) + var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil + + C.QPersistentModelIndex_new3(other.cPointer(), &outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret.isSubclass = true + return ret } func (this *QPersistentModelIndex) OperatorLesser(other *QPersistentModelIndex) bool { @@ -475,7 +547,7 @@ func (this *QPersistentModelIndex) Flags() ItemFlag { } func (this *QPersistentModelIndex) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QPersistentModelIndex_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QPersistentModelIndex_Model(this.h)), nil) } func (this *QPersistentModelIndex) IsValid() bool { @@ -491,7 +563,7 @@ func (this *QPersistentModelIndex) Data1(role int) *QVariant { // Delete this object from C++ memory. func (this *QPersistentModelIndex) Delete() { - C.QPersistentModelIndex_Delete(this.h) + C.QPersistentModelIndex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -504,7 +576,8 @@ func (this *QPersistentModelIndex) GoGC() { } type QAbstractItemModel struct { - h *C.QAbstractItemModel + h *C.QAbstractItemModel + isSubclass bool *QObject } @@ -522,15 +595,23 @@ func (this *QAbstractItemModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractItemModel(h *C.QAbstractItemModel) *QAbstractItemModel { +// newQAbstractItemModel constructs the type using only CGO pointers. +func newQAbstractItemModel(h *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractItemModel { if h == nil { return nil } - return &QAbstractItemModel{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractItemModel{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractItemModel(h unsafe.Pointer) *QAbstractItemModel { - return newQAbstractItemModel((*C.QAbstractItemModel)(h)) +// UnsafeNewQAbstractItemModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractItemModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemModel { + if h == nil { + return nil + } + + return &QAbstractItemModel{h: (*C.QAbstractItemModel)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractItemModel) MetaObject() *QMetaObject { @@ -556,8 +637,8 @@ func (this *QAbstractItemModel) HasIndex(row int, column int) bool { return (bool)(C.QAbstractItemModel_HasIndex(this.h, (C.int)(row), (C.int)(column))) } -func (this *QAbstractItemModel) Index(row int, column int) *QModelIndex { - _ret := C.QAbstractItemModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QAbstractItemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QAbstractItemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -577,38 +658,38 @@ func (this *QAbstractItemModel) Sibling(row int, column int, idx *QModelIndex) * return _goptr } -func (this *QAbstractItemModel) RowCount() int { - return (int)(C.QAbstractItemModel_RowCount(this.h)) +func (this *QAbstractItemModel) RowCount(parent *QModelIndex) int { + return (int)(C.QAbstractItemModel_RowCount(this.h, parent.cPointer())) } -func (this *QAbstractItemModel) ColumnCount() int { - return (int)(C.QAbstractItemModel_ColumnCount(this.h)) +func (this *QAbstractItemModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QAbstractItemModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QAbstractItemModel) HasChildren() bool { - return (bool)(C.QAbstractItemModel_HasChildren(this.h)) +func (this *QAbstractItemModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_HasChildren(this.h, parent.cPointer())) } -func (this *QAbstractItemModel) Data(index *QModelIndex) *QVariant { - _ret := C.QAbstractItemModel_Data(this.h, index.cPointer()) +func (this *QAbstractItemModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QAbstractItemModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QAbstractItemModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QAbstractItemModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QAbstractItemModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QAbstractItemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QAbstractItemModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QAbstractItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QAbstractItemModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QAbstractItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QAbstractItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QAbstractItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QAbstractItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QAbstractItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QAbstractItemModel) ItemData(index *QModelIndex) map[int]QVariant { @@ -672,7 +753,7 @@ func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractItemModel_MimeData(this.h, indexes_ma)), nil) } func (this *QAbstractItemModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -691,20 +772,20 @@ func (this *QAbstractItemModel) SupportedDragActions() DropAction { return (DropAction)(C.QAbstractItemModel_SupportedDragActions(this.h)) } -func (this *QAbstractItemModel) InsertRows(row int, count int) bool { - return (bool)(C.QAbstractItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QAbstractItemModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QAbstractItemModel) InsertColumns(column int, count int) bool { - return (bool)(C.QAbstractItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QAbstractItemModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QAbstractItemModel) RemoveRows(row int, count int) bool { - return (bool)(C.QAbstractItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QAbstractItemModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QAbstractItemModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QAbstractItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QAbstractItemModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QAbstractItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QAbstractItemModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { @@ -751,8 +832,8 @@ func (this *QAbstractItemModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QAbstractItemModel_Flags(this.h, index.cPointer())) } -func (this *QAbstractItemModel) Sort(column int) { - C.QAbstractItemModel_Sort(this.h, (C.int)(column)) +func (this *QAbstractItemModel) Sort(column int, order SortOrder) { + C.QAbstractItemModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QAbstractItemModel) Buddy(index *QModelIndex) *QModelIndex { @@ -762,8 +843,8 @@ func (this *QAbstractItemModel) Buddy(index *QModelIndex) *QModelIndex { return _goptr } -func (this *QAbstractItemModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex { - var _ma C.struct_miqt_array = C.QAbstractItemModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer()) +func (this *QAbstractItemModel) Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + var _ma C.struct_miqt_array = C.QAbstractItemModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -920,63 +1001,6 @@ func (this *QAbstractItemModel) HasIndex3(row int, column int, parent *QModelInd return (bool)(C.QAbstractItemModel_HasIndex3(this.h, (C.int)(row), (C.int)(column), parent.cPointer())) } -func (this *QAbstractItemModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QAbstractItemModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractItemModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QAbstractItemModel_RowCount1(this.h, parent.cPointer())) -} - -func (this *QAbstractItemModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QAbstractItemModel_ColumnCount1(this.h, parent.cPointer())) -} - -func (this *QAbstractItemModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_HasChildren1(this.h, parent.cPointer())) -} - -func (this *QAbstractItemModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QAbstractItemModel_Data2(this.h, index.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractItemModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QAbstractItemModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractItemModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QAbstractItemModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractItemModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QAbstractItemModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractItemModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QAbstractItemModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - -func (this *QAbstractItemModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QAbstractItemModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QAbstractItemModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - func (this *QAbstractItemModel) InsertRow2(row int, parent *QModelIndex) bool { return (bool)(C.QAbstractItemModel_InsertRow2(this.h, (C.int)(row), parent.cPointer())) } @@ -993,36 +1017,6 @@ func (this *QAbstractItemModel) RemoveColumn2(column int, parent *QModelIndex) b return (bool)(C.QAbstractItemModel_RemoveColumn2(this.h, (C.int)(column), parent.cPointer())) } -func (this *QAbstractItemModel) Sort2(column int, order SortOrder) { - C.QAbstractItemModel_Sort2(this.h, (C.int)(column), (C.int)(order)) -} - -func (this *QAbstractItemModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex { - var _ma C.struct_miqt_array = C.QAbstractItemModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - -func (this *QAbstractItemModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { - var _ma C.struct_miqt_array = C.QAbstractItemModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - func (this *QAbstractItemModel) CheckIndex2(index *QModelIndex, options QAbstractItemModel__CheckIndexOption) bool { return (bool)(C.QAbstractItemModel_CheckIndex2(this.h, index.cPointer(), (C.int)(options))) } @@ -1207,7 +1201,7 @@ func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t // Delete this object from C++ memory. func (this *QAbstractItemModel) Delete() { - C.QAbstractItemModel_Delete(this.h) + C.QAbstractItemModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1220,7 +1214,8 @@ func (this *QAbstractItemModel) GoGC() { } type QAbstractTableModel struct { - h *C.QAbstractTableModel + h *C.QAbstractTableModel + isSubclass bool *QAbstractItemModel } @@ -1238,15 +1233,23 @@ func (this *QAbstractTableModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractTableModel(h *C.QAbstractTableModel) *QAbstractTableModel { +// newQAbstractTableModel constructs the type using only CGO pointers. +func newQAbstractTableModel(h *C.QAbstractTableModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractTableModel { if h == nil { return nil } - return &QAbstractTableModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QAbstractTableModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQAbstractTableModel(h unsafe.Pointer) *QAbstractTableModel { - return newQAbstractTableModel((*C.QAbstractTableModel)(h)) +// UnsafeNewQAbstractTableModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractTableModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTableModel { + if h == nil { + return nil + } + + return &QAbstractTableModel{h: (*C.QAbstractTableModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } func (this *QAbstractTableModel) MetaObject() *QMetaObject { @@ -1268,8 +1271,8 @@ func QAbstractTableModel_Tr(s string) string { return _ret } -func (this *QAbstractTableModel) Index(row int, column int) *QModelIndex { - _ret := C.QAbstractTableModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QAbstractTableModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QAbstractTableModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1312,16 +1315,9 @@ func QAbstractTableModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QAbstractTableModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QAbstractTableModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - // Delete this object from C++ memory. func (this *QAbstractTableModel) Delete() { - C.QAbstractTableModel_Delete(this.h) + C.QAbstractTableModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1334,7 +1330,8 @@ func (this *QAbstractTableModel) GoGC() { } type QAbstractListModel struct { - h *C.QAbstractListModel + h *C.QAbstractListModel + isSubclass bool *QAbstractItemModel } @@ -1352,15 +1349,23 @@ func (this *QAbstractListModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractListModel(h *C.QAbstractListModel) *QAbstractListModel { +// newQAbstractListModel constructs the type using only CGO pointers. +func newQAbstractListModel(h *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractListModel { if h == nil { return nil } - return &QAbstractListModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QAbstractListModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQAbstractListModel(h unsafe.Pointer) *QAbstractListModel { - return newQAbstractListModel((*C.QAbstractListModel)(h)) +// UnsafeNewQAbstractListModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractListModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractListModel { + if h == nil { + return nil + } + + return &QAbstractListModel{h: (*C.QAbstractListModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } func (this *QAbstractListModel) MetaObject() *QMetaObject { @@ -1382,8 +1387,8 @@ func QAbstractListModel_Tr(s string) string { return _ret } -func (this *QAbstractListModel) Index(row int) *QModelIndex { - _ret := C.QAbstractListModel_Index(this.h, (C.int)(row)) +func (this *QAbstractListModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QAbstractListModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1426,23 +1431,9 @@ func QAbstractListModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QAbstractListModel) Index2(row int, column int) *QModelIndex { - _ret := C.QAbstractListModel_Index2(this.h, (C.int)(row), (C.int)(column)) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractListModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QAbstractListModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - // Delete this object from C++ memory. func (this *QAbstractListModel) Delete() { - C.QAbstractListModel_Delete(this.h) + C.QAbstractListModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractitemmodel.h b/qt6/gen_qabstractitemmodel.h index 634045d2..398504e6 100644 --- a/qt6/gen_qabstractitemmodel.h +++ b/qt6/gen_qabstractitemmodel.h @@ -24,6 +24,7 @@ class QMimeData; class QModelIndex; class QModelRoleData; class QModelRoleDataSpan; +class QObject; class QPersistentModelIndex; class QSize; class QVariant; @@ -37,24 +38,25 @@ typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QModelRoleData QModelRoleData; typedef struct QModelRoleDataSpan QModelRoleDataSpan; +typedef struct QObject QObject; typedef struct QPersistentModelIndex QPersistentModelIndex; typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QModelRoleData* QModelRoleData_new(int role); -QModelRoleData* QModelRoleData_new2(QModelRoleData* param1); +void QModelRoleData_new(int role, QModelRoleData** outptr_QModelRoleData); +void QModelRoleData_new2(QModelRoleData* param1, QModelRoleData** outptr_QModelRoleData); int QModelRoleData_Role(const QModelRoleData* self); QVariant* QModelRoleData_Data(QModelRoleData* self); QVariant* QModelRoleData_Data2(const QModelRoleData* self); void QModelRoleData_ClearData(QModelRoleData* self); void QModelRoleData_OperatorAssign(QModelRoleData* self, QModelRoleData* param1); -void QModelRoleData_Delete(QModelRoleData* self); +void QModelRoleData_Delete(QModelRoleData* self, bool isSubclass); -QModelRoleDataSpan* QModelRoleDataSpan_new(); -QModelRoleDataSpan* QModelRoleDataSpan_new2(QModelRoleData* modelRoleData); -QModelRoleDataSpan* QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal); -QModelRoleDataSpan* QModelRoleDataSpan_new4(QModelRoleDataSpan* param1); +void QModelRoleDataSpan_new(QModelRoleDataSpan** outptr_QModelRoleDataSpan); +void QModelRoleDataSpan_new2(QModelRoleData* modelRoleData, QModelRoleDataSpan** outptr_QModelRoleDataSpan); +void QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal, QModelRoleDataSpan** outptr_QModelRoleDataSpan); +void QModelRoleDataSpan_new4(QModelRoleDataSpan* param1, QModelRoleDataSpan** outptr_QModelRoleDataSpan); ptrdiff_t QModelRoleDataSpan_Size(const QModelRoleDataSpan* self); ptrdiff_t QModelRoleDataSpan_Length(const QModelRoleDataSpan* self); QModelRoleData* QModelRoleDataSpan_Data(const QModelRoleDataSpan* self); @@ -62,10 +64,10 @@ QModelRoleData* QModelRoleDataSpan_Begin(const QModelRoleDataSpan* self); QModelRoleData* QModelRoleDataSpan_End(const QModelRoleDataSpan* self); QModelRoleData* QModelRoleDataSpan_OperatorSubscript(const QModelRoleDataSpan* self, ptrdiff_t index); QVariant* QModelRoleDataSpan_DataForRole(const QModelRoleDataSpan* self, int role); -void QModelRoleDataSpan_Delete(QModelRoleDataSpan* self); +void QModelRoleDataSpan_Delete(QModelRoleDataSpan* self, bool isSubclass); -QModelIndex* QModelIndex_new(); -QModelIndex* QModelIndex_new2(QModelIndex* param1); +void QModelIndex_new(QModelIndex** outptr_QModelIndex); +void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex); int QModelIndex_Row(const QModelIndex* self); int QModelIndex_Column(const QModelIndex* self); uintptr_t QModelIndex_InternalId(const QModelIndex* self); @@ -84,11 +86,11 @@ bool QModelIndex_OperatorEqual(const QModelIndex* self, QModelIndex* other); bool QModelIndex_OperatorNotEqual(const QModelIndex* self, QModelIndex* other); bool QModelIndex_OperatorLesser(const QModelIndex* self, QModelIndex* other); QVariant* QModelIndex_Data1(const QModelIndex* self, int role); -void QModelIndex_Delete(QModelIndex* self); +void QModelIndex_Delete(QModelIndex* self, bool isSubclass); -QPersistentModelIndex* QPersistentModelIndex_new(); -QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index); -QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other); +void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex); +void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex); +void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex); bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorNotEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); @@ -110,22 +112,22 @@ int QPersistentModelIndex_Flags(const QPersistentModelIndex* self); QAbstractItemModel* QPersistentModelIndex_Model(const QPersistentModelIndex* self); bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self); QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role); -void QPersistentModelIndex_Delete(QPersistentModelIndex* self); +void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass); QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self); void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1); struct miqt_string QAbstractItemModel_Tr(const char* s); bool QAbstractItemModel_HasIndex(const QAbstractItemModel* self, int row, int column); -QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column); +QModelIndex* QAbstractItemModel_Index(const QAbstractItemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QAbstractItemModel_Parent(const QAbstractItemModel* self, QModelIndex* child); QModelIndex* QAbstractItemModel_Sibling(const QAbstractItemModel* self, int row, int column, QModelIndex* idx); -int QAbstractItemModel_RowCount(const QAbstractItemModel* self); -int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self); -bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self); -QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index); -bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value); -QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation); -bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value); +int QAbstractItemModel_RowCount(const QAbstractItemModel* self, QModelIndex* parent); +int QAbstractItemModel_ColumnCount(const QAbstractItemModel* self, QModelIndex* parent); +bool QAbstractItemModel_HasChildren(const QAbstractItemModel* self, QModelIndex* parent); +QVariant* QAbstractItemModel_Data(const QAbstractItemModel* self, QModelIndex* index, int role); +bool QAbstractItemModel_SetData(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QAbstractItemModel_HeaderData(const QAbstractItemModel* self, int section, int orientation, int role); +bool QAbstractItemModel_SetHeaderData(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role); struct miqt_map /* of int to QVariant* */ QAbstractItemModel_ItemData(const QAbstractItemModel* self, QModelIndex* index); bool QAbstractItemModel_SetItemData(QAbstractItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); bool QAbstractItemModel_ClearItemData(QAbstractItemModel* self, QModelIndex* index); @@ -135,10 +137,10 @@ bool QAbstractItemModel_CanDropMimeData(const QAbstractItemModel* self, QMimeDat bool QAbstractItemModel_DropMimeData(QAbstractItemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); int QAbstractItemModel_SupportedDropActions(const QAbstractItemModel* self); int QAbstractItemModel_SupportedDragActions(const QAbstractItemModel* self); -bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count); -bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count); -bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count); -bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count); +bool QAbstractItemModel_InsertRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent); +bool QAbstractItemModel_InsertColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent); +bool QAbstractItemModel_RemoveRows(QAbstractItemModel* self, int row, int count, QModelIndex* parent); +bool QAbstractItemModel_RemoveColumns(QAbstractItemModel* self, int column, int count, QModelIndex* parent); bool QAbstractItemModel_MoveRows(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); bool QAbstractItemModel_MoveColumns(QAbstractItemModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); bool QAbstractItemModel_InsertRow(QAbstractItemModel* self, int row); @@ -150,9 +152,9 @@ bool QAbstractItemModel_MoveColumn(QAbstractItemModel* self, QModelIndex* source void QAbstractItemModel_FetchMore(QAbstractItemModel* self, QModelIndex* parent); bool QAbstractItemModel_CanFetchMore(const QAbstractItemModel* self, QModelIndex* parent); int QAbstractItemModel_Flags(const QAbstractItemModel* self, QModelIndex* index); -void QAbstractItemModel_Sort(QAbstractItemModel* self, int column); +void QAbstractItemModel_Sort(QAbstractItemModel* self, int column, int order); QModelIndex* QAbstractItemModel_Buddy(const QAbstractItemModel* self, QModelIndex* index); -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value); +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); QSize* QAbstractItemModel_Span(const QAbstractItemModel* self, QModelIndex* index); struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_RoleNames(const QAbstractItemModel* self); bool QAbstractItemModel_CheckIndex(const QAbstractItemModel* self, QModelIndex* index); @@ -167,28 +169,14 @@ void QAbstractItemModel_LayoutAboutToBeChanged(QAbstractItemModel* self); void QAbstractItemModel_connect_LayoutAboutToBeChanged(QAbstractItemModel* self, intptr_t slot); bool QAbstractItemModel_Submit(QAbstractItemModel* self); void QAbstractItemModel_Revert(QAbstractItemModel* self); +void QAbstractItemModel_ResetInternalData(QAbstractItemModel* self); struct miqt_string QAbstractItemModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractItemModel_Tr3(const char* s, const char* c, int n); bool QAbstractItemModel_HasIndex3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent); -QModelIndex* QAbstractItemModel_Index3(const QAbstractItemModel* self, int row, int column, QModelIndex* parent); -int QAbstractItemModel_RowCount1(const QAbstractItemModel* self, QModelIndex* parent); -int QAbstractItemModel_ColumnCount1(const QAbstractItemModel* self, QModelIndex* parent); -bool QAbstractItemModel_HasChildren1(const QAbstractItemModel* self, QModelIndex* parent); -QVariant* QAbstractItemModel_Data2(const QAbstractItemModel* self, QModelIndex* index, int role); -bool QAbstractItemModel_SetData3(QAbstractItemModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QAbstractItemModel_HeaderData3(const QAbstractItemModel* self, int section, int orientation, int role); -bool QAbstractItemModel_SetHeaderData4(QAbstractItemModel* self, int section, int orientation, QVariant* value, int role); -bool QAbstractItemModel_InsertRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent); -bool QAbstractItemModel_InsertColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent); -bool QAbstractItemModel_RemoveRows3(QAbstractItemModel* self, int row, int count, QModelIndex* parent); -bool QAbstractItemModel_RemoveColumns3(QAbstractItemModel* self, int column, int count, QModelIndex* parent); bool QAbstractItemModel_InsertRow2(QAbstractItemModel* self, int row, QModelIndex* parent); bool QAbstractItemModel_InsertColumn2(QAbstractItemModel* self, int column, QModelIndex* parent); bool QAbstractItemModel_RemoveRow2(QAbstractItemModel* self, int row, QModelIndex* parent); bool QAbstractItemModel_RemoveColumn2(QAbstractItemModel* self, int column, QModelIndex* parent); -void QAbstractItemModel_Sort2(QAbstractItemModel* self, int column, int order); -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match4(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits); -struct miqt_array /* of QModelIndex* */ QAbstractItemModel_Match5(const QAbstractItemModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); bool QAbstractItemModel_CheckIndex2(const QAbstractItemModel* self, QModelIndex* index, int options); void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t slot); @@ -200,32 +188,29 @@ void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self, intptr_t slot); void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct miqt_array /* of QPersistentModelIndex* */ parents, int hint); void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self, intptr_t slot); -void QAbstractItemModel_Delete(QAbstractItemModel* self); +void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass); QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self); void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1); struct miqt_string QAbstractTableModel_Tr(const char* s); -QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column); +QModelIndex* QAbstractTableModel_Index(const QAbstractTableModel* self, int row, int column, QModelIndex* parent); QModelIndex* QAbstractTableModel_Sibling(const QAbstractTableModel* self, int row, int column, QModelIndex* idx); bool QAbstractTableModel_DropMimeData(QAbstractTableModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); int QAbstractTableModel_Flags(const QAbstractTableModel* self, QModelIndex* index); struct miqt_string QAbstractTableModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractTableModel_Tr3(const char* s, const char* c, int n); -QModelIndex* QAbstractTableModel_Index3(const QAbstractTableModel* self, int row, int column, QModelIndex* parent); -void QAbstractTableModel_Delete(QAbstractTableModel* self); +void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass); QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self); void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1); struct miqt_string QAbstractListModel_Tr(const char* s); -QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row); +QModelIndex* QAbstractListModel_Index(const QAbstractListModel* self, int row, int column, QModelIndex* parent); QModelIndex* QAbstractListModel_Sibling(const QAbstractListModel* self, int row, int column, QModelIndex* idx); bool QAbstractListModel_DropMimeData(QAbstractListModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); int QAbstractListModel_Flags(const QAbstractListModel* self, QModelIndex* index); struct miqt_string QAbstractListModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractListModel_Tr3(const char* s, const char* c, int n); -QModelIndex* QAbstractListModel_Index2(const QAbstractListModel* self, int row, int column); -QModelIndex* QAbstractListModel_Index3(const QAbstractListModel* self, int row, int column, QModelIndex* parent); -void QAbstractListModel_Delete(QAbstractListModel* self); +void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractitemview.cpp b/qt6/gen_qabstractitemview.cpp index 1f4b6c0b..c64d0635 100644 --- a/qt6/gen_qabstractitemview.cpp +++ b/qt6/gen_qabstractitemview.cpp @@ -1,15 +1,32 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -220,8 +237,8 @@ QRect* QAbstractItemView_VisualRect(const QAbstractItemView* self, QModelIndex* return new QRect(self->visualRect(*index)); } -void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index) { - self->scrollTo(*index); +void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QModelIndex* QAbstractItemView_IndexAt(const QAbstractItemView* self, QPoint* point) { @@ -438,11 +455,11 @@ struct miqt_string QAbstractItemView_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAbstractItemView_ScrollTo2(QAbstractItemView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); -} - -void QAbstractItemView_Delete(QAbstractItemView* self) { - delete self; +void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractitemview.go b/qt6/gen_qabstractitemview.go index 18ef6e46..64865728 100644 --- a/qt6/gen_qabstractitemview.go +++ b/qt6/gen_qabstractitemview.go @@ -70,8 +70,45 @@ const ( QAbstractItemView__InternalMove QAbstractItemView__DragDropMode = 4 ) +type QAbstractItemView__CursorAction int + +const ( + QAbstractItemView__MoveUp QAbstractItemView__CursorAction = 0 + QAbstractItemView__MoveDown QAbstractItemView__CursorAction = 1 + QAbstractItemView__MoveLeft QAbstractItemView__CursorAction = 2 + QAbstractItemView__MoveRight QAbstractItemView__CursorAction = 3 + QAbstractItemView__MoveHome QAbstractItemView__CursorAction = 4 + QAbstractItemView__MoveEnd QAbstractItemView__CursorAction = 5 + QAbstractItemView__MovePageUp QAbstractItemView__CursorAction = 6 + QAbstractItemView__MovePageDown QAbstractItemView__CursorAction = 7 + QAbstractItemView__MoveNext QAbstractItemView__CursorAction = 8 + QAbstractItemView__MovePrevious QAbstractItemView__CursorAction = 9 +) + +type QAbstractItemView__State int + +const ( + QAbstractItemView__NoState QAbstractItemView__State = 0 + QAbstractItemView__DraggingState QAbstractItemView__State = 1 + QAbstractItemView__DragSelectingState QAbstractItemView__State = 2 + QAbstractItemView__EditingState QAbstractItemView__State = 3 + QAbstractItemView__ExpandingState QAbstractItemView__State = 4 + QAbstractItemView__CollapsingState QAbstractItemView__State = 5 + QAbstractItemView__AnimatingState QAbstractItemView__State = 6 +) + +type QAbstractItemView__DropIndicatorPosition int + +const ( + QAbstractItemView__OnItem QAbstractItemView__DropIndicatorPosition = 0 + QAbstractItemView__AboveItem QAbstractItemView__DropIndicatorPosition = 1 + QAbstractItemView__BelowItem QAbstractItemView__DropIndicatorPosition = 2 + QAbstractItemView__OnViewport QAbstractItemView__DropIndicatorPosition = 3 +) + type QAbstractItemView struct { - h *C.QAbstractItemView + h *C.QAbstractItemView + isSubclass bool *QAbstractScrollArea } @@ -89,15 +126,23 @@ func (this *QAbstractItemView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractItemView(h *C.QAbstractItemView) *QAbstractItemView { +// newQAbstractItemView constructs the type using only CGO pointers. +func newQAbstractItemView(h *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractItemView { if h == nil { return nil } - return &QAbstractItemView{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QAbstractItemView{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractItemView(h unsafe.Pointer) *QAbstractItemView { - return newQAbstractItemView((*C.QAbstractItemView)(h)) +// UnsafeNewQAbstractItemView constructs the type using only unsafe pointers. +func UnsafeNewQAbstractItemView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractItemView { + if h == nil { + return nil + } + + return &QAbstractItemView{h: (*C.QAbstractItemView)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } func (this *QAbstractItemView) MetaObject() *QMetaObject { @@ -124,7 +169,7 @@ func (this *QAbstractItemView) SetModel(model *QAbstractItemModel) { } func (this *QAbstractItemView) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractItemView_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractItemView_Model(this.h)), nil) } func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionModel) { @@ -132,7 +177,7 @@ func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionM } func (this *QAbstractItemView) SelectionModel() *QItemSelectionModel { - return UnsafeNewQItemSelectionModel(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h))) + return UnsafeNewQItemSelectionModel(unsafe.Pointer(C.QAbstractItemView_SelectionModel(this.h)), nil) } func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -140,7 +185,7 @@ func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QAbstractItemView) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegate(this.h)), nil) } func (this *QAbstractItemView) SetSelectionMode(mode QAbstractItemView__SelectionMode) { @@ -311,8 +356,8 @@ func (this *QAbstractItemView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QAbstractItemView) ScrollTo(index *QModelIndex) { - C.QAbstractItemView_ScrollTo(this.h, index.cPointer()) +func (this *QAbstractItemView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QAbstractItemView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QAbstractItemView) IndexAt(point *QPoint) *QModelIndex { @@ -354,7 +399,7 @@ func (this *QAbstractItemView) SetIndexWidget(index *QModelIndex, widget *QWidge } func (this *QAbstractItemView) IndexWidget(index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())), nil, nil) } func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstractItemDelegate) { @@ -362,7 +407,7 @@ func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstrac } func (this *QAbstractItemView) ItemDelegateForRow(row int) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row)))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))), nil) } func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QAbstractItemDelegate) { @@ -370,15 +415,15 @@ func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QA } func (this *QAbstractItemView) ItemDelegateForColumn(column int) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column)))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))), nil) } func (this *QAbstractItemView) ItemDelegateWithIndex(index *QModelIndex) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer()))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())), nil) } func (this *QAbstractItemView) ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForIndex(this.h, index.cPointer()))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_ItemDelegateForIndex(this.h, index.cPointer())), nil) } func (this *QAbstractItemView) InputMethodQuery(query InputMethodQuery) *QVariant { @@ -587,13 +632,9 @@ func QAbstractItemView_Tr3(s string, c string, n int) string { return _ret } -func (this *QAbstractItemView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QAbstractItemView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) -} - // Delete this object from C++ memory. func (this *QAbstractItemView) Delete() { - C.QAbstractItemView_Delete(this.h) + C.QAbstractItemView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractitemview.h b/qt6/gen_qabstractitemview.h index 67cec95c..377d9ba1 100644 --- a/qt6/gen_qabstractitemview.h +++ b/qt6/gen_qabstractitemview.h @@ -18,24 +18,56 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QVariant; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif @@ -87,7 +119,7 @@ void QAbstractItemView_SetTextElideMode(QAbstractItemView* self, int mode); int QAbstractItemView_TextElideMode(const QAbstractItemView* self); void QAbstractItemView_KeyboardSearch(QAbstractItemView* self, struct miqt_string search); QRect* QAbstractItemView_VisualRect(const QAbstractItemView* self, QModelIndex* index); -void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index); +void QAbstractItemView_ScrollTo(QAbstractItemView* self, QModelIndex* index, int hint); QModelIndex* QAbstractItemView_IndexAt(const QAbstractItemView* self, QPoint* point); QSize* QAbstractItemView_SizeHintForIndex(const QAbstractItemView* self, QModelIndex* index); int QAbstractItemView_SizeHintForRow(const QAbstractItemView* self, int row); @@ -114,6 +146,20 @@ void QAbstractItemView_SetCurrentIndex(QAbstractItemView* self, QModelIndex* ind void QAbstractItemView_ScrollToTop(QAbstractItemView* self); void QAbstractItemView_ScrollToBottom(QAbstractItemView* self); void QAbstractItemView_Update(QAbstractItemView* self, QModelIndex* index); +void QAbstractItemView_DataChanged(QAbstractItemView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QAbstractItemView_RowsInserted(QAbstractItemView* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_RowsAboutToBeRemoved(QAbstractItemView* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_CurrentChanged(QAbstractItemView* self, QModelIndex* current, QModelIndex* previous); +void QAbstractItemView_UpdateEditorData(QAbstractItemView* self); +void QAbstractItemView_UpdateEditorGeometries(QAbstractItemView* self); +void QAbstractItemView_UpdateGeometries(QAbstractItemView* self); +void QAbstractItemView_VerticalScrollbarAction(QAbstractItemView* self, int action); +void QAbstractItemView_HorizontalScrollbarAction(QAbstractItemView* self, int action); +void QAbstractItemView_VerticalScrollbarValueChanged(QAbstractItemView* self, int value); +void QAbstractItemView_HorizontalScrollbarValueChanged(QAbstractItemView* self, int value); +void QAbstractItemView_CloseEditor(QAbstractItemView* self, QWidget* editor, int hint); +void QAbstractItemView_CommitData(QAbstractItemView* self, QWidget* editor); +void QAbstractItemView_EditorDestroyed(QAbstractItemView* self, QObject* editor); void QAbstractItemView_Pressed(QAbstractItemView* self, QModelIndex* index); void QAbstractItemView_connect_Pressed(QAbstractItemView* self, intptr_t slot); void QAbstractItemView_Clicked(QAbstractItemView* self, QModelIndex* index); @@ -128,10 +174,38 @@ void QAbstractItemView_ViewportEntered(QAbstractItemView* self); void QAbstractItemView_connect_ViewportEntered(QAbstractItemView* self, intptr_t slot); void QAbstractItemView_IconSizeChanged(QAbstractItemView* self, QSize* size); void QAbstractItemView_connect_IconSizeChanged(QAbstractItemView* self, intptr_t slot); +QModelIndex* QAbstractItemView_MoveCursor(QAbstractItemView* self, int cursorAction, int modifiers); +int QAbstractItemView_HorizontalOffset(const QAbstractItemView* self); +int QAbstractItemView_VerticalOffset(const QAbstractItemView* self); +bool QAbstractItemView_IsIndexHidden(const QAbstractItemView* self, QModelIndex* index); +void QAbstractItemView_SetSelection(QAbstractItemView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QAbstractItemView_SelectedIndexes(const QAbstractItemView* self); +bool QAbstractItemView_Edit2(QAbstractItemView* self, QModelIndex* index, int trigger, QEvent* event); +int QAbstractItemView_SelectionCommand(const QAbstractItemView* self, QModelIndex* index, QEvent* event); +void QAbstractItemView_StartDrag(QAbstractItemView* self, int supportedActions); +void QAbstractItemView_InitViewItemOption(const QAbstractItemView* self, QStyleOptionViewItem* option); +bool QAbstractItemView_FocusNextPrevChild(QAbstractItemView* self, bool next); +bool QAbstractItemView_Event(QAbstractItemView* self, QEvent* event); +bool QAbstractItemView_ViewportEvent(QAbstractItemView* self, QEvent* event); +void QAbstractItemView_MousePressEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_MouseMoveEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_MouseReleaseEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_MouseDoubleClickEvent(QAbstractItemView* self, QMouseEvent* event); +void QAbstractItemView_DragEnterEvent(QAbstractItemView* self, QDragEnterEvent* event); +void QAbstractItemView_DragMoveEvent(QAbstractItemView* self, QDragMoveEvent* event); +void QAbstractItemView_DragLeaveEvent(QAbstractItemView* self, QDragLeaveEvent* event); +void QAbstractItemView_DropEvent(QAbstractItemView* self, QDropEvent* event); +void QAbstractItemView_FocusInEvent(QAbstractItemView* self, QFocusEvent* event); +void QAbstractItemView_FocusOutEvent(QAbstractItemView* self, QFocusEvent* event); +void QAbstractItemView_KeyPressEvent(QAbstractItemView* self, QKeyEvent* event); +void QAbstractItemView_ResizeEvent(QAbstractItemView* self, QResizeEvent* event); +void QAbstractItemView_TimerEvent(QAbstractItemView* self, QTimerEvent* event); +void QAbstractItemView_InputMethodEvent(QAbstractItemView* self, QInputMethodEvent* event); +bool QAbstractItemView_EventFilter(QAbstractItemView* self, QObject* object, QEvent* event); +QSize* QAbstractItemView_ViewportSizeHint(const QAbstractItemView* self); struct miqt_string QAbstractItemView_Tr2(const char* s, const char* c); struct miqt_string QAbstractItemView_Tr3(const char* s, const char* c, int n); -void QAbstractItemView_ScrollTo2(QAbstractItemView* self, QModelIndex* index, int hint); -void QAbstractItemView_Delete(QAbstractItemView* self); +void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractnativeeventfilter.cpp b/qt6/gen_qabstractnativeeventfilter.cpp index f40c96e3..299e7fd1 100644 --- a/qt6/gen_qabstractnativeeventfilter.cpp +++ b/qt6/gen_qabstractnativeeventfilter.cpp @@ -9,7 +9,11 @@ bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* se return self->nativeEventFilter(eventType_QByteArray, message, (qintptr*)(result)); } -void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self) { - delete self; +void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractnativeeventfilter.go b/qt6/gen_qabstractnativeeventfilter.go index 84b0c237..a52ace08 100644 --- a/qt6/gen_qabstractnativeeventfilter.go +++ b/qt6/gen_qabstractnativeeventfilter.go @@ -14,7 +14,8 @@ import ( ) type QAbstractNativeEventFilter struct { - h *C.QAbstractNativeEventFilter + h *C.QAbstractNativeEventFilter + isSubclass bool } func (this *QAbstractNativeEventFilter) cPointer() *C.QAbstractNativeEventFilter { @@ -31,6 +32,7 @@ func (this *QAbstractNativeEventFilter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractNativeEventFilter constructs the type using only CGO pointers. func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNativeEventFilter { if h == nil { return nil @@ -38,8 +40,13 @@ func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNa return &QAbstractNativeEventFilter{h: h} } +// UnsafeNewQAbstractNativeEventFilter constructs the type using only unsafe pointers. func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEventFilter { - return newQAbstractNativeEventFilter((*C.QAbstractNativeEventFilter)(h)) + if h == nil { + return nil + } + + return &QAbstractNativeEventFilter{h: (*C.QAbstractNativeEventFilter)(h)} } func (this *QAbstractNativeEventFilter) NativeEventFilter(eventType []byte, message unsafe.Pointer, result *uintptr) bool { @@ -51,7 +58,7 @@ func (this *QAbstractNativeEventFilter) NativeEventFilter(eventType []byte, mess // Delete this object from C++ memory. func (this *QAbstractNativeEventFilter) Delete() { - C.QAbstractNativeEventFilter_Delete(this.h) + C.QAbstractNativeEventFilter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractnativeeventfilter.h b/qt6/gen_qabstractnativeeventfilter.h index 36dcc74e..758800f1 100644 --- a/qt6/gen_qabstractnativeeventfilter.h +++ b/qt6/gen_qabstractnativeeventfilter.h @@ -23,7 +23,7 @@ typedef struct QByteArray QByteArray; #endif bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, intptr_t* result); -void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self); +void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractproxymodel.cpp b/qt6/gen_qabstractproxymodel.cpp index 721c21eb..f19bcedd 100644 --- a/qt6/gen_qabstractproxymodel.cpp +++ b/qt6/gen_qabstractproxymodel.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -58,12 +59,12 @@ void QAbstractProxyModel_Revert(QAbstractProxyModel* self) { self->revert(); } -QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex) { - return new QVariant(self->data(*proxyIndex)); +QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role) { + return new QVariant(self->data(*proxyIndex, static_cast(role))); } -QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_ItemData(const QAbstractProxyModel* self, QModelIndex* index) { @@ -89,8 +90,8 @@ int QAbstractProxyModel_Flags(const QAbstractProxyModel* self, QModelIndex* inde return static_cast(_ret); } -bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } bool QAbstractProxyModel_SetItemData(QAbstractProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { @@ -103,8 +104,8 @@ bool QAbstractProxyModel_SetItemData(QAbstractProxyModel* self, QModelIndex* ind return self->setItemData(*index, roles_QMap); } -bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } bool QAbstractProxyModel_ClearItemData(QAbstractProxyModel* self, QModelIndex* index) { @@ -123,16 +124,16 @@ void QAbstractProxyModel_FetchMore(QAbstractProxyModel* self, QModelIndex* paren self->fetchMore(*parent); } -void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column) { - self->sort(static_cast(column)); +void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } QSize* QAbstractProxyModel_Span(const QAbstractProxyModel* self, QModelIndex* index) { return new QSize(self->span(*index)); } -bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self) { - return self->hasChildren(); +bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int row, int column, QModelIndex* idx) { @@ -232,31 +233,11 @@ struct miqt_string QAbstractProxyModel_Tr3(const char* s, const char* c, int n) return _ms; } -QVariant* QAbstractProxyModel_Data2(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role) { - return new QVariant(self->data(*proxyIndex, static_cast(role))); -} - -QVariant* QAbstractProxyModel_HeaderData3(const QAbstractProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); -} - -bool QAbstractProxyModel_SetData3(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); -} - -bool QAbstractProxyModel_SetHeaderData4(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); -} - -void QAbstractProxyModel_Sort2(QAbstractProxyModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); -} - -bool QAbstractProxyModel_HasChildren1(const QAbstractProxyModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); -} - -void QAbstractProxyModel_Delete(QAbstractProxyModel* self) { - delete self; +void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractproxymodel.go b/qt6/gen_qabstractproxymodel.go index 1e5a6a2e..d8da4232 100644 --- a/qt6/gen_qabstractproxymodel.go +++ b/qt6/gen_qabstractproxymodel.go @@ -14,7 +14,8 @@ import ( ) type QAbstractProxyModel struct { - h *C.QAbstractProxyModel + h *C.QAbstractProxyModel + isSubclass bool *QAbstractItemModel } @@ -32,15 +33,23 @@ func (this *QAbstractProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractProxyModel(h *C.QAbstractProxyModel) *QAbstractProxyModel { +// newQAbstractProxyModel constructs the type using only CGO pointers. +func newQAbstractProxyModel(h *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractProxyModel { if h == nil { return nil } - return &QAbstractProxyModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QAbstractProxyModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQAbstractProxyModel(h unsafe.Pointer) *QAbstractProxyModel { - return newQAbstractProxyModel((*C.QAbstractProxyModel)(h)) +// UnsafeNewQAbstractProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQAbstractProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractProxyModel { + if h == nil { + return nil + } + + return &QAbstractProxyModel{h: (*C.QAbstractProxyModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } func (this *QAbstractProxyModel) MetaObject() *QMetaObject { @@ -67,7 +76,7 @@ func (this *QAbstractProxyModel) SetSourceModel(sourceModel *QAbstractItemModel) } func (this *QAbstractProxyModel) SourceModel() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractProxyModel_SourceModel(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QAbstractProxyModel_SourceModel(this.h)), nil) } func (this *QAbstractProxyModel) MapToSource(proxyIndex *QModelIndex) *QModelIndex { @@ -92,15 +101,15 @@ func (this *QAbstractProxyModel) Revert() { C.QAbstractProxyModel_Revert(this.h) } -func (this *QAbstractProxyModel) Data(proxyIndex *QModelIndex) *QVariant { - _ret := C.QAbstractProxyModel_Data(this.h, proxyIndex.cPointer()) +func (this *QAbstractProxyModel) Data(proxyIndex *QModelIndex, role int) *QVariant { + _ret := C.QAbstractProxyModel_Data(this.h, proxyIndex.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QAbstractProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QAbstractProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QAbstractProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QAbstractProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -128,8 +137,8 @@ func (this *QAbstractProxyModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QAbstractProxyModel_Flags(this.h, index.cPointer())) } -func (this *QAbstractProxyModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QAbstractProxyModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QAbstractProxyModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QAbstractProxyModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QAbstractProxyModel) SetItemData(index *QModelIndex, roles map[int]QVariant) bool { @@ -151,8 +160,8 @@ func (this *QAbstractProxyModel) SetItemData(index *QModelIndex, roles map[int]Q return (bool)(C.QAbstractProxyModel_SetItemData(this.h, index.cPointer(), roles_mm)) } -func (this *QAbstractProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QAbstractProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QAbstractProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QAbstractProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QAbstractProxyModel) ClearItemData(index *QModelIndex) bool { @@ -174,8 +183,8 @@ func (this *QAbstractProxyModel) FetchMore(parent *QModelIndex) { C.QAbstractProxyModel_FetchMore(this.h, parent.cPointer()) } -func (this *QAbstractProxyModel) Sort(column int) { - C.QAbstractProxyModel_Sort(this.h, (C.int)(column)) +func (this *QAbstractProxyModel) Sort(column int, order SortOrder) { + C.QAbstractProxyModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QAbstractProxyModel) Span(index *QModelIndex) *QSize { @@ -185,8 +194,8 @@ func (this *QAbstractProxyModel) Span(index *QModelIndex) *QSize { return _goptr } -func (this *QAbstractProxyModel) HasChildren() bool { - return (bool)(C.QAbstractProxyModel_HasChildren(this.h)) +func (this *QAbstractProxyModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QAbstractProxyModel_HasChildren(this.h, parent.cPointer())) } func (this *QAbstractProxyModel) Sibling(row int, column int, idx *QModelIndex) *QModelIndex { @@ -203,7 +212,7 @@ func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)), nil) } func (this *QAbstractProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -274,39 +283,9 @@ func QAbstractProxyModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QAbstractProxyModel) Data2(proxyIndex *QModelIndex, role int) *QVariant { - _ret := C.QAbstractProxyModel_Data2(this.h, proxyIndex.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QAbstractProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QAbstractProxyModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QAbstractProxyModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QAbstractProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) -} - -func (this *QAbstractProxyModel) Sort2(column int, order SortOrder) { - C.QAbstractProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order)) -} - -func (this *QAbstractProxyModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QAbstractProxyModel_HasChildren1(this.h, parent.cPointer())) -} - // Delete this object from C++ memory. func (this *QAbstractProxyModel) Delete() { - C.QAbstractProxyModel_Delete(this.h) + C.QAbstractProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractproxymodel.h b/qt6/gen_qabstractproxymodel.h index 627c2998..841b6979 100644 --- a/qt6/gen_qabstractproxymodel.h +++ b/qt6/gen_qabstractproxymodel.h @@ -21,6 +21,7 @@ class QByteArray; class QMetaObject; class QMimeData; class QModelIndex; +class QObject; class QSize; class QVariant; #else @@ -30,6 +31,7 @@ typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; typedef struct QSize QSize; typedef struct QVariant QVariant; #endif @@ -43,20 +45,20 @@ QModelIndex* QAbstractProxyModel_MapToSource(const QAbstractProxyModel* self, QM QModelIndex* QAbstractProxyModel_MapFromSource(const QAbstractProxyModel* self, QModelIndex* sourceIndex); bool QAbstractProxyModel_Submit(QAbstractProxyModel* self); void QAbstractProxyModel_Revert(QAbstractProxyModel* self); -QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex); -QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation); +QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role); +QVariant* QAbstractProxyModel_HeaderData(const QAbstractProxyModel* self, int section, int orientation, int role); struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_ItemData(const QAbstractProxyModel* self, QModelIndex* index); int QAbstractProxyModel_Flags(const QAbstractProxyModel* self, QModelIndex* index); -bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value); +bool QAbstractProxyModel_SetData(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role); bool QAbstractProxyModel_SetItemData(QAbstractProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); -bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value); +bool QAbstractProxyModel_SetHeaderData(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role); bool QAbstractProxyModel_ClearItemData(QAbstractProxyModel* self, QModelIndex* index); QModelIndex* QAbstractProxyModel_Buddy(const QAbstractProxyModel* self, QModelIndex* index); bool QAbstractProxyModel_CanFetchMore(const QAbstractProxyModel* self, QModelIndex* parent); void QAbstractProxyModel_FetchMore(QAbstractProxyModel* self, QModelIndex* parent); -void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column); +void QAbstractProxyModel_Sort(QAbstractProxyModel* self, int column, int order); QSize* QAbstractProxyModel_Span(const QAbstractProxyModel* self, QModelIndex* index); -bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self); +bool QAbstractProxyModel_HasChildren(const QAbstractProxyModel* self, QModelIndex* parent); QModelIndex* QAbstractProxyModel_Sibling(const QAbstractProxyModel* self, int row, int column, QModelIndex* idx); QMimeData* QAbstractProxyModel_MimeData(const QAbstractProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QAbstractProxyModel_CanDropMimeData(const QAbstractProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -67,13 +69,7 @@ int QAbstractProxyModel_SupportedDropActions(const QAbstractProxyModel* self); struct miqt_map /* of int to struct miqt_string */ QAbstractProxyModel_RoleNames(const QAbstractProxyModel* self); struct miqt_string QAbstractProxyModel_Tr2(const char* s, const char* c); struct miqt_string QAbstractProxyModel_Tr3(const char* s, const char* c, int n); -QVariant* QAbstractProxyModel_Data2(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role); -QVariant* QAbstractProxyModel_HeaderData3(const QAbstractProxyModel* self, int section, int orientation, int role); -bool QAbstractProxyModel_SetData3(QAbstractProxyModel* self, QModelIndex* index, QVariant* value, int role); -bool QAbstractProxyModel_SetHeaderData4(QAbstractProxyModel* self, int section, int orientation, QVariant* value, int role); -void QAbstractProxyModel_Sort2(QAbstractProxyModel* self, int column, int order); -bool QAbstractProxyModel_HasChildren1(const QAbstractProxyModel* self, QModelIndex* parent); -void QAbstractProxyModel_Delete(QAbstractProxyModel* self); +void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractscrollarea.cpp b/qt6/gen_qabstractscrollarea.cpp index ff560ce4..9b28e688 100644 --- a/qt6/gen_qabstractscrollarea.cpp +++ b/qt6/gen_qabstractscrollarea.cpp @@ -1,22 +1,602 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include #include #include #include "gen_qabstractscrollarea.h" #include "_cgo_export.h" -QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent) { - return new QAbstractScrollArea(parent); +class MiqtVirtualQAbstractScrollArea : public virtual QAbstractScrollArea { +public: + + MiqtVirtualQAbstractScrollArea(QWidget* parent): QAbstractScrollArea(parent) {}; + MiqtVirtualQAbstractScrollArea(): QAbstractScrollArea() {}; + + virtual ~MiqtVirtualQAbstractScrollArea() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractScrollArea::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractScrollArea_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractScrollArea::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractScrollArea::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractScrollArea_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractScrollArea::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QAbstractScrollArea::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QAbstractScrollArea_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QAbstractScrollArea::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QAbstractScrollArea::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QAbstractScrollArea_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QAbstractScrollArea::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QAbstractScrollArea::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAbstractScrollArea_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QAbstractScrollArea::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QAbstractScrollArea::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAbstractScrollArea_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QAbstractScrollArea::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QAbstractScrollArea::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QAbstractScrollArea::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QAbstractScrollArea::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QAbstractScrollArea::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QAbstractScrollArea::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QAbstractScrollArea::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QAbstractScrollArea::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QAbstractScrollArea::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QAbstractScrollArea::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QAbstractScrollArea::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QAbstractScrollArea::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QAbstractScrollArea::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QAbstractScrollArea::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QAbstractScrollArea::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QAbstractScrollArea::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QAbstractScrollArea::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QAbstractScrollArea::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QAbstractScrollArea::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QAbstractScrollArea::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QAbstractScrollArea::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QAbstractScrollArea::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QAbstractScrollArea::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QAbstractScrollArea::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QAbstractScrollArea::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QAbstractScrollArea_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QAbstractScrollArea::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QAbstractScrollArea::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractScrollArea_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QAbstractScrollArea::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QAbstractScrollArea::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractScrollArea_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QAbstractScrollArea::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QAbstractScrollArea::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QAbstractScrollArea_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QAbstractScrollArea::initStyleOption(option); + + } + +}; + +void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(parent); + *outptr_QAbstractScrollArea = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractScrollArea* QAbstractScrollArea_new2() { - return new QAbstractScrollArea(); +void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(); + *outptr_QAbstractScrollArea = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self) { @@ -152,7 +732,195 @@ struct miqt_string QAbstractScrollArea_Tr3(const char* s, const char* c, int n) return _ms; } -void QAbstractScrollArea_Delete(QAbstractScrollArea* self) { - delete self; +void QAbstractScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractScrollArea_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractScrollArea_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractScrollArea_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__SetupViewport = slot; +} + +void QAbstractScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QAbstractScrollArea_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QAbstractScrollArea_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__Event = slot; +} + +bool QAbstractScrollArea_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_Event(param1); +} + +void QAbstractScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ViewportEvent = slot; +} + +bool QAbstractScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QAbstractScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QAbstractScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_PaintEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QAbstractScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QAbstractScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_WheelEvent(param1); +} + +void QAbstractScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QAbstractScrollArea_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__DropEvent = slot; +} + +void QAbstractScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_DropEvent(param1); +} + +void QAbstractScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QAbstractScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ScrollContentsBy = slot; +} + +void QAbstractScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QAbstractScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QAbstractScrollArea_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QAbstractScrollArea_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractScrollArea_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QAbstractScrollArea_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractScrollArea*)(self) )->handle__InitStyleOption = slot; +} + +void QAbstractScrollArea_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQAbstractScrollArea*)(self) )->virtualbase_InitStyleOption(option); +} + +void QAbstractScrollArea_Delete(QAbstractScrollArea* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractscrollarea.go b/qt6/gen_qabstractscrollarea.go index 55481c62..c273bb29 100644 --- a/qt6/gen_qabstractscrollarea.go +++ b/qt6/gen_qabstractscrollarea.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -22,7 +23,8 @@ const ( ) type QAbstractScrollArea struct { - h *C.QAbstractScrollArea + h *C.QAbstractScrollArea + isSubclass bool *QFrame } @@ -40,27 +42,51 @@ func (this *QAbstractScrollArea) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractScrollArea(h *C.QAbstractScrollArea) *QAbstractScrollArea { +// newQAbstractScrollArea constructs the type using only CGO pointers. +func newQAbstractScrollArea(h *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractScrollArea { if h == nil { return nil } - return &QAbstractScrollArea{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QAbstractScrollArea{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractScrollArea(h unsafe.Pointer) *QAbstractScrollArea { - return newQAbstractScrollArea((*C.QAbstractScrollArea)(h)) +// UnsafeNewQAbstractScrollArea constructs the type using only unsafe pointers. +func UnsafeNewQAbstractScrollArea(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractScrollArea { + if h == nil { + return nil + } + + return &QAbstractScrollArea{h: (*C.QAbstractScrollArea)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractScrollArea constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea(parent *QWidget) *QAbstractScrollArea { - ret := C.QAbstractScrollArea_new(parent.cPointer()) - return newQAbstractScrollArea(ret) + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractScrollArea_new(parent.cPointer(), &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractScrollArea2 constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea2() *QAbstractScrollArea { - ret := C.QAbstractScrollArea_new2() - return newQAbstractScrollArea(ret) + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractScrollArea_new2(&outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractScrollArea) MetaObject() *QMetaObject { @@ -91,7 +117,7 @@ func (this *QAbstractScrollArea) SetVerticalScrollBarPolicy(verticalScrollBarPol } func (this *QAbstractScrollArea) VerticalScrollBar() *QScrollBar { - return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h))) + return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h)), nil, nil, nil, nil) } func (this *QAbstractScrollArea) SetVerticalScrollBar(scrollbar *QScrollBar) { @@ -107,7 +133,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBarPolicy(horizontalScrollBa } func (this *QAbstractScrollArea) HorizontalScrollBar() *QScrollBar { - return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h))) + return UnsafeNewQScrollBar(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h)), nil, nil, nil, nil) } func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { @@ -115,7 +141,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { } func (this *QAbstractScrollArea) CornerWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h)), nil, nil) } func (this *QAbstractScrollArea) SetCornerWidget(widget *QWidget) { @@ -131,13 +157,13 @@ func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QW _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func (this *QAbstractScrollArea) Viewport() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h)), nil, nil) } func (this *QAbstractScrollArea) SetViewport(widget *QWidget) { @@ -199,9 +225,553 @@ func QAbstractScrollArea_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractScrollArea) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractScrollArea_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractScrollArea) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractScrollArea_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MinimumSizeHint +func miqt_exec_callback_QAbstractScrollArea_MinimumSizeHint(self *C.QAbstractScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractScrollArea) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractScrollArea_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractScrollArea) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractScrollArea_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_SizeHint +func miqt_exec_callback_QAbstractScrollArea_SizeHint(self *C.QAbstractScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractScrollArea) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QAbstractScrollArea_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QAbstractScrollArea) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QAbstractScrollArea_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_SetupViewport +func miqt_exec_callback_QAbstractScrollArea_SetupViewport(self *C.QAbstractScrollArea, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QAbstractScrollArea_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QAbstractScrollArea) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QAbstractScrollArea_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_EventFilter +func miqt_exec_callback_QAbstractScrollArea_EventFilter(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractScrollArea) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QAbstractScrollArea_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAbstractScrollArea) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QAbstractScrollArea_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_Event +func miqt_exec_callback_QAbstractScrollArea_Event(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QAbstractScrollArea_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAbstractScrollArea) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QAbstractScrollArea_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ViewportEvent +func miqt_exec_callback_QAbstractScrollArea_ViewportEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QAbstractScrollArea_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QAbstractScrollArea_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ResizeEvent +func miqt_exec_callback_QAbstractScrollArea_ResizeEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QAbstractScrollArea_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QAbstractScrollArea_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_PaintEvent +func miqt_exec_callback_QAbstractScrollArea_PaintEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MousePressEvent +func miqt_exec_callback_QAbstractScrollArea_MousePressEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent +func miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QAbstractScrollArea_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QAbstractScrollArea_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent +func miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QAbstractScrollArea_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QAbstractScrollArea_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_WheelEvent +func miqt_exec_callback_QAbstractScrollArea_WheelEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QAbstractScrollArea_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QAbstractScrollArea_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent +func miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QAbstractScrollArea_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QAbstractScrollArea_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DragEnterEvent +func miqt_exec_callback_QAbstractScrollArea_DragEnterEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DragMoveEvent(param1 *QDragMoveEvent) { + + C.QAbstractScrollArea_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDragMoveEvent(slot func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) { + C.QAbstractScrollArea_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DragMoveEvent +func miqt_exec_callback_QAbstractScrollArea_DragMoveEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DragLeaveEvent(param1 *QDragLeaveEvent) { + + C.QAbstractScrollArea_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDragLeaveEvent(slot func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) { + C.QAbstractScrollArea_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent +func miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QAbstractScrollArea_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QAbstractScrollArea_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_DropEvent +func miqt_exec_callback_QAbstractScrollArea_DropEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QAbstractScrollArea_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QAbstractScrollArea_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_KeyPressEvent +func miqt_exec_callback_QAbstractScrollArea_KeyPressEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QAbstractScrollArea_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QAbstractScrollArea) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QAbstractScrollArea_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ScrollContentsBy +func miqt_exec_callback_QAbstractScrollArea_ScrollContentsBy(self *C.QAbstractScrollArea, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QAbstractScrollArea) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QAbstractScrollArea_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractScrollArea) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractScrollArea_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ViewportSizeHint +func miqt_exec_callback_QAbstractScrollArea_ViewportSizeHint(self *C.QAbstractScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractScrollArea) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QAbstractScrollArea_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractScrollArea) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QAbstractScrollArea_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_ChangeEvent +func miqt_exec_callback_QAbstractScrollArea_ChangeEvent(self *C.QAbstractScrollArea, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractScrollArea) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QAbstractScrollArea_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QAbstractScrollArea) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QAbstractScrollArea_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractScrollArea_InitStyleOption +func miqt_exec_callback_QAbstractScrollArea_InitStyleOption(self *C.QAbstractScrollArea, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractScrollArea) Delete() { - C.QAbstractScrollArea_Delete(this.h) + C.QAbstractScrollArea_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractscrollarea.h b/qt6/gen_qabstractscrollarea.h index 76cfbdfd..20a329be 100644 --- a/qt6/gen_qabstractscrollarea.h +++ b/qt6/gen_qabstractscrollarea.h @@ -16,20 +16,50 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; class QScrollBar; class QSize; +class QStyleOptionFrame; +class QWheelEvent; class QWidget; #else typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; typedef struct QScrollBar QScrollBar; typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent); -QAbstractScrollArea* QAbstractScrollArea_new2(); +void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self); void* QAbstractScrollArea_Metacast(QAbstractScrollArea* self, const char* param1); struct miqt_string QAbstractScrollArea_Tr(const char* s); @@ -53,9 +83,73 @@ QSize* QAbstractScrollArea_SizeHint(const QAbstractScrollArea* self); void QAbstractScrollArea_SetupViewport(QAbstractScrollArea* self, QWidget* viewport); int QAbstractScrollArea_SizeAdjustPolicy(const QAbstractScrollArea* self); void QAbstractScrollArea_SetSizeAdjustPolicy(QAbstractScrollArea* self, int policy); +bool QAbstractScrollArea_EventFilter(QAbstractScrollArea* self, QObject* param1, QEvent* param2); +bool QAbstractScrollArea_Event(QAbstractScrollArea* self, QEvent* param1); +bool QAbstractScrollArea_ViewportEvent(QAbstractScrollArea* self, QEvent* param1); +void QAbstractScrollArea_ResizeEvent(QAbstractScrollArea* self, QResizeEvent* param1); +void QAbstractScrollArea_PaintEvent(QAbstractScrollArea* self, QPaintEvent* param1); +void QAbstractScrollArea_MousePressEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_MouseReleaseEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_MouseDoubleClickEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_MouseMoveEvent(QAbstractScrollArea* self, QMouseEvent* param1); +void QAbstractScrollArea_WheelEvent(QAbstractScrollArea* self, QWheelEvent* param1); +void QAbstractScrollArea_ContextMenuEvent(QAbstractScrollArea* self, QContextMenuEvent* param1); +void QAbstractScrollArea_DragEnterEvent(QAbstractScrollArea* self, QDragEnterEvent* param1); +void QAbstractScrollArea_DragMoveEvent(QAbstractScrollArea* self, QDragMoveEvent* param1); +void QAbstractScrollArea_DragLeaveEvent(QAbstractScrollArea* self, QDragLeaveEvent* param1); +void QAbstractScrollArea_DropEvent(QAbstractScrollArea* self, QDropEvent* param1); +void QAbstractScrollArea_KeyPressEvent(QAbstractScrollArea* self, QKeyEvent* param1); +void QAbstractScrollArea_ScrollContentsBy(QAbstractScrollArea* self, int dx, int dy); +QSize* QAbstractScrollArea_ViewportSizeHint(const QAbstractScrollArea* self); struct miqt_string QAbstractScrollArea_Tr2(const char* s, const char* c); struct miqt_string QAbstractScrollArea_Tr3(const char* s, const char* c, int n); -void QAbstractScrollArea_Delete(QAbstractScrollArea* self); +void QAbstractScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractScrollArea_virtualbase_MinimumSizeHint(const void* self); +void QAbstractScrollArea_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractScrollArea_virtualbase_SizeHint(const void* self); +void QAbstractScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QAbstractScrollArea_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QAbstractScrollArea_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractScrollArea_virtualbase_Event(void* self, QEvent* param1); +void QAbstractScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QAbstractScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QAbstractScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QAbstractScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QAbstractScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QAbstractScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QAbstractScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QAbstractScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QAbstractScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QAbstractScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QAbstractScrollArea_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QAbstractScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QAbstractScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QAbstractScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QAbstractScrollArea_virtualbase_ViewportSizeHint(const void* self); +void QAbstractScrollArea_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QAbstractScrollArea_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QAbstractScrollArea_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QAbstractScrollArea_Delete(QAbstractScrollArea* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractslider.cpp b/qt6/gen_qabstractslider.cpp index 09423416..37941421 100644 --- a/qt6/gen_qabstractslider.cpp +++ b/qt6/gen_qabstractslider.cpp @@ -1,19 +1,1091 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qabstractslider.h" #include "_cgo_export.h" -QAbstractSlider* QAbstractSlider_new(QWidget* parent) { - return new QAbstractSlider(parent); +class MiqtVirtualQAbstractSlider : public virtual QAbstractSlider { +public: + + MiqtVirtualQAbstractSlider(QWidget* parent): QAbstractSlider(parent) {}; + MiqtVirtualQAbstractSlider(): QAbstractSlider() {}; + + virtual ~MiqtVirtualQAbstractSlider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QAbstractSlider::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QAbstractSlider::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QAbstractSlider::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QAbstractSlider_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QAbstractSlider::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QAbstractSlider::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QAbstractSlider_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QAbstractSlider::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QAbstractSlider::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractSlider_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QAbstractSlider::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QAbstractSlider::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QAbstractSlider_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QAbstractSlider::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QAbstractSlider::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QAbstractSlider_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QAbstractSlider::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QAbstractSlider::devType(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractSlider_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QAbstractSlider::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QAbstractSlider::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractSlider_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractSlider::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractSlider::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSlider_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractSlider::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractSlider::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSlider_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractSlider::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QAbstractSlider::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QAbstractSlider_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QAbstractSlider::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QAbstractSlider::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QAbstractSlider::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QAbstractSlider::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QAbstractSlider_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QAbstractSlider::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QAbstractSlider::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QAbstractSlider::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QAbstractSlider::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QAbstractSlider::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QAbstractSlider::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractSlider::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QAbstractSlider::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QAbstractSlider::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QAbstractSlider::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QAbstractSlider::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QAbstractSlider::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractSlider::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QAbstractSlider::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractSlider::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QAbstractSlider::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QAbstractSlider::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QAbstractSlider::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QAbstractSlider::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QAbstractSlider::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QAbstractSlider::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QAbstractSlider::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QAbstractSlider::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QAbstractSlider::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractSlider::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QAbstractSlider::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QAbstractSlider::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QAbstractSlider::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QAbstractSlider::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QAbstractSlider::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QAbstractSlider::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QAbstractSlider::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QAbstractSlider::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QAbstractSlider::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractSlider::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QAbstractSlider::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractSlider::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QAbstractSlider::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractSlider::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QAbstractSlider::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractSlider::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QAbstractSlider::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QAbstractSlider::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QAbstractSlider::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSlider_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QAbstractSlider::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QAbstractSlider::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QAbstractSlider::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QAbstractSlider::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QAbstractSlider_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QAbstractSlider::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QAbstractSlider::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QAbstractSlider_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QAbstractSlider::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QAbstractSlider::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QAbstractSlider_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QAbstractSlider::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QAbstractSlider::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QAbstractSlider_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QAbstractSlider::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QAbstractSlider::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractSlider_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QAbstractSlider::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QAbstractSlider::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractSlider_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QAbstractSlider::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QAbstractSlider::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractSlider_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractSlider::focusNextPrevChild(next); + + } + +}; + +void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(parent); + *outptr_QAbstractSlider = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractSlider* QAbstractSlider_new2() { - return new QAbstractSlider(); +void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(); + *outptr_QAbstractSlider = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self) { @@ -137,7 +1209,7 @@ void QAbstractSlider_ValueChanged(QAbstractSlider* self, int value) { } void QAbstractSlider_connect_ValueChanged(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::valueChanged), self, [=](int value) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::valueChanged), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QAbstractSlider_ValueChanged(slot, sigval1); }); @@ -148,7 +1220,7 @@ void QAbstractSlider_SliderPressed(QAbstractSlider* self) { } void QAbstractSlider_connect_SliderPressed(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderPressed), self, [=]() { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderPressed), self, [=]() { miqt_exec_callback_QAbstractSlider_SliderPressed(slot); }); } @@ -158,7 +1230,7 @@ void QAbstractSlider_SliderMoved(QAbstractSlider* self, int position) { } void QAbstractSlider_connect_SliderMoved(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderMoved), self, [=](int position) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderMoved), self, [=](int position) { int sigval1 = position; miqt_exec_callback_QAbstractSlider_SliderMoved(slot, sigval1); }); @@ -169,7 +1241,7 @@ void QAbstractSlider_SliderReleased(QAbstractSlider* self) { } void QAbstractSlider_connect_SliderReleased(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderReleased), self, [=]() { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::sliderReleased), self, [=]() { miqt_exec_callback_QAbstractSlider_SliderReleased(slot); }); } @@ -179,7 +1251,7 @@ void QAbstractSlider_RangeChanged(QAbstractSlider* self, int min, int max) { } void QAbstractSlider_connect_RangeChanged(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::rangeChanged), self, [=](int min, int max) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::rangeChanged), self, [=](int min, int max) { int sigval1 = min; int sigval2 = max; miqt_exec_callback_QAbstractSlider_RangeChanged(slot, sigval1, sigval2); @@ -191,7 +1263,7 @@ void QAbstractSlider_ActionTriggered(QAbstractSlider* self, int action) { } void QAbstractSlider_connect_ActionTriggered(QAbstractSlider* self, intptr_t slot) { - QAbstractSlider::connect(self, static_cast(&QAbstractSlider::actionTriggered), self, [=](int action) { + MiqtVirtualQAbstractSlider::connect(self, static_cast(&QAbstractSlider::actionTriggered), self, [=](int action) { int sigval1 = action; miqt_exec_callback_QAbstractSlider_ActionTriggered(slot, sigval1); }); @@ -219,7 +1291,355 @@ struct miqt_string QAbstractSlider_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAbstractSlider_Delete(QAbstractSlider* self) { - delete self; +void QAbstractSlider_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__Event = slot; +} + +bool QAbstractSlider_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_Event(e); +} + +void QAbstractSlider_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SliderChange = slot; +} + +void QAbstractSlider_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SliderChange(change); +} + +void QAbstractSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QAbstractSlider_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_TimerEvent(param1); +} + +void QAbstractSlider_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_WheelEvent(e); +} + +void QAbstractSlider_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractSlider_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ChangeEvent(e); +} + +void QAbstractSlider_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DevType = slot; +} + +int QAbstractSlider_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DevType(); +} + +void QAbstractSlider_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SetVisible = slot; +} + +void QAbstractSlider_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractSlider_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractSlider_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractSlider_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractSlider_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__HeightForWidth = slot; +} + +int QAbstractSlider_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QAbstractSlider_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QAbstractSlider_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QAbstractSlider_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QAbstractSlider_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_PaintEngine(); +} + +void QAbstractSlider_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractSlider_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractSlider_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractSlider_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractSlider_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QAbstractSlider_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractSlider_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractSlider_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractSlider_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractSlider_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__EnterEvent = slot; +} + +void QAbstractSlider_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_EnterEvent(event); +} + +void QAbstractSlider_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__LeaveEvent = slot; +} + +void QAbstractSlider_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_LeaveEvent(event); +} + +void QAbstractSlider_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractSlider_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_PaintEvent(event); +} + +void QAbstractSlider_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__MoveEvent = slot; +} + +void QAbstractSlider_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_MoveEvent(event); +} + +void QAbstractSlider_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractSlider_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractSlider_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractSlider_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_CloseEvent(event); +} + +void QAbstractSlider_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractSlider_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractSlider_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__TabletEvent = slot; +} + +void QAbstractSlider_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_TabletEvent(event); +} + +void QAbstractSlider_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ActionEvent = slot; +} + +void QAbstractSlider_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ActionEvent(event); +} + +void QAbstractSlider_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractSlider_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractSlider_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractSlider_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractSlider_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractSlider_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractSlider_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__DropEvent = slot; +} + +void QAbstractSlider_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractSlider_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractSlider_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_ShowEvent(event); +} + +void QAbstractSlider_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__HideEvent = slot; +} + +void QAbstractSlider_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_HideEvent(event); +} + +void QAbstractSlider_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__NativeEvent = slot; +} + +bool QAbstractSlider_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QAbstractSlider_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__Metric = slot; +} + +int QAbstractSlider_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_Metric(param1); +} + +void QAbstractSlider_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__InitPainter = slot; +} + +void QAbstractSlider_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_InitPainter(painter); +} + +void QAbstractSlider_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QAbstractSlider_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_Redirected(offset); +} + +void QAbstractSlider_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QAbstractSlider_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_SharedPainter(); +} + +void QAbstractSlider_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractSlider_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QAbstractSlider_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractSlider_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSlider*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QAbstractSlider_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSlider*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractSlider_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractSlider*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QAbstractSlider_Delete(QAbstractSlider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractslider.go b/qt6/gen_qabstractslider.go index 0fc6a2a6..6ee0274c 100644 --- a/qt6/gen_qabstractslider.go +++ b/qt6/gen_qabstractslider.go @@ -27,8 +27,18 @@ const ( QAbstractSlider__SliderMove QAbstractSlider__SliderAction = 7 ) +type QAbstractSlider__SliderChange int + +const ( + QAbstractSlider__SliderRangeChange QAbstractSlider__SliderChange = 0 + QAbstractSlider__SliderOrientationChange QAbstractSlider__SliderChange = 1 + QAbstractSlider__SliderStepsChange QAbstractSlider__SliderChange = 2 + QAbstractSlider__SliderValueChange QAbstractSlider__SliderChange = 3 +) + type QAbstractSlider struct { - h *C.QAbstractSlider + h *C.QAbstractSlider + isSubclass bool *QWidget } @@ -46,27 +56,49 @@ func (this *QAbstractSlider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractSlider(h *C.QAbstractSlider) *QAbstractSlider { +// newQAbstractSlider constructs the type using only CGO pointers. +func newQAbstractSlider(h *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSlider { if h == nil { return nil } - return &QAbstractSlider{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QAbstractSlider{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractSlider(h unsafe.Pointer) *QAbstractSlider { - return newQAbstractSlider((*C.QAbstractSlider)(h)) +// UnsafeNewQAbstractSlider constructs the type using only unsafe pointers. +func UnsafeNewQAbstractSlider(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSlider { + if h == nil { + return nil + } + + return &QAbstractSlider{h: (*C.QAbstractSlider)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractSlider constructs a new QAbstractSlider object. func NewQAbstractSlider(parent *QWidget) *QAbstractSlider { - ret := C.QAbstractSlider_new(parent.cPointer()) - return newQAbstractSlider(ret) + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSlider_new(parent.cPointer(), &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractSlider2 constructs a new QAbstractSlider object. func NewQAbstractSlider2() *QAbstractSlider { - ret := C.QAbstractSlider_new2() - return newQAbstractSlider(ret) + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSlider_new2(&outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractSlider) MetaObject() *QMetaObject { @@ -322,9 +354,1021 @@ func QAbstractSlider_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractSlider) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QAbstractSlider_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QAbstractSlider) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QAbstractSlider_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_Event +func miqt_exec_callback_QAbstractSlider_Event(self *C.QAbstractSlider, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QAbstractSlider_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QAbstractSlider) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QAbstractSlider_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SliderChange +func miqt_exec_callback_QAbstractSlider_SliderChange(self *C.QAbstractSlider, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QAbstractSlider_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QAbstractSlider) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QAbstractSlider_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_KeyPressEvent +func miqt_exec_callback_QAbstractSlider_KeyPressEvent(self *C.QAbstractSlider, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QAbstractSlider_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractSlider) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QAbstractSlider_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_TimerEvent +func miqt_exec_callback_QAbstractSlider_TimerEvent(self *C.QAbstractSlider, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QAbstractSlider_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractSlider) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QAbstractSlider_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_WheelEvent +func miqt_exec_callback_QAbstractSlider_WheelEvent(self *C.QAbstractSlider, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QAbstractSlider_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractSlider) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QAbstractSlider_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ChangeEvent +func miqt_exec_callback_QAbstractSlider_ChangeEvent(self *C.QAbstractSlider, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DevType() int { + + return (int)(C.QAbstractSlider_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSlider) OnDevType(slot func(super func() int) int) { + C.QAbstractSlider_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DevType +func miqt_exec_callback_QAbstractSlider_DevType(self *C.QAbstractSlider, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractSlider_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractSlider) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractSlider_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SetVisible +func miqt_exec_callback_QAbstractSlider_SetVisible(self *C.QAbstractSlider, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractSlider_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSlider) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSlider_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SizeHint +func miqt_exec_callback_QAbstractSlider_SizeHint(self *C.QAbstractSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractSlider_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSlider) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSlider_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MinimumSizeHint +func miqt_exec_callback_QAbstractSlider_MinimumSizeHint(self *C.QAbstractSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QAbstractSlider_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSlider) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QAbstractSlider_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_HeightForWidth +func miqt_exec_callback_QAbstractSlider_HeightForWidth(self *C.QAbstractSlider, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QAbstractSlider_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSlider) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QAbstractSlider_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_HasHeightForWidth +func miqt_exec_callback_QAbstractSlider_HasHeightForWidth(self *C.QAbstractSlider, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QAbstractSlider_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSlider) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QAbstractSlider_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_PaintEngine +func miqt_exec_callback_QAbstractSlider_PaintEngine(self *C.QAbstractSlider, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MousePressEvent +func miqt_exec_callback_QAbstractSlider_MousePressEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MouseReleaseEvent +func miqt_exec_callback_QAbstractSlider_MouseReleaseEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QAbstractSlider_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSlider_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MouseMoveEvent +func miqt_exec_callback_QAbstractSlider_MouseMoveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QAbstractSlider_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractSlider_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_KeyReleaseEvent +func miqt_exec_callback_QAbstractSlider_KeyReleaseEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractSlider_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSlider_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_FocusInEvent +func miqt_exec_callback_QAbstractSlider_FocusInEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractSlider_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSlider_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_FocusOutEvent +func miqt_exec_callback_QAbstractSlider_FocusOutEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QAbstractSlider_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QAbstractSlider_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_EnterEvent +func miqt_exec_callback_QAbstractSlider_EnterEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QAbstractSlider_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSlider_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_LeaveEvent +func miqt_exec_callback_QAbstractSlider_LeaveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QAbstractSlider_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QAbstractSlider_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_PaintEvent +func miqt_exec_callback_QAbstractSlider_PaintEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QAbstractSlider_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QAbstractSlider_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_MoveEvent +func miqt_exec_callback_QAbstractSlider_MoveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractSlider_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractSlider_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ResizeEvent +func miqt_exec_callback_QAbstractSlider_ResizeEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QAbstractSlider_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QAbstractSlider_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_CloseEvent +func miqt_exec_callback_QAbstractSlider_CloseEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QAbstractSlider_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QAbstractSlider_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ContextMenuEvent +func miqt_exec_callback_QAbstractSlider_ContextMenuEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QAbstractSlider_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QAbstractSlider_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_TabletEvent +func miqt_exec_callback_QAbstractSlider_TabletEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QAbstractSlider_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QAbstractSlider_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ActionEvent +func miqt_exec_callback_QAbstractSlider_ActionEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractSlider_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractSlider_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DragEnterEvent +func miqt_exec_callback_QAbstractSlider_DragEnterEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractSlider_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractSlider_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DragMoveEvent +func miqt_exec_callback_QAbstractSlider_DragMoveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractSlider_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractSlider_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DragLeaveEvent +func miqt_exec_callback_QAbstractSlider_DragLeaveEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractSlider_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractSlider_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_DropEvent +func miqt_exec_callback_QAbstractSlider_DropEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QAbstractSlider_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QAbstractSlider_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_ShowEvent +func miqt_exec_callback_QAbstractSlider_ShowEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QAbstractSlider_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSlider) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QAbstractSlider_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_HideEvent +func miqt_exec_callback_QAbstractSlider_HideEvent(self *C.QAbstractSlider, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QAbstractSlider_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QAbstractSlider) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QAbstractSlider_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_NativeEvent +func miqt_exec_callback_QAbstractSlider_NativeEvent(self *C.QAbstractSlider, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QAbstractSlider_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSlider) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QAbstractSlider_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_Metric +func miqt_exec_callback_QAbstractSlider_Metric(self *C.QAbstractSlider, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSlider) callVirtualBase_InitPainter(painter *QPainter) { + + C.QAbstractSlider_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QAbstractSlider) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QAbstractSlider_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_InitPainter +func miqt_exec_callback_QAbstractSlider_InitPainter(self *C.QAbstractSlider, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractSlider_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QAbstractSlider) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QAbstractSlider_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_Redirected +func miqt_exec_callback_QAbstractSlider_Redirected(self *C.QAbstractSlider, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QAbstractSlider_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSlider) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QAbstractSlider_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_SharedPainter +func miqt_exec_callback_QAbstractSlider_SharedPainter(self *C.QAbstractSlider, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QAbstractSlider_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractSlider) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QAbstractSlider_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_InputMethodEvent +func miqt_exec_callback_QAbstractSlider_InputMethodEvent(self *C.QAbstractSlider, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractSlider{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractSlider) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QAbstractSlider_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSlider) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QAbstractSlider_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_InputMethodQuery +func miqt_exec_callback_QAbstractSlider_InputMethodQuery(self *C.QAbstractSlider, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSlider) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractSlider_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractSlider) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractSlider_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSlider_FocusNextPrevChild +func miqt_exec_callback_QAbstractSlider_FocusNextPrevChild(self *C.QAbstractSlider, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractSlider) Delete() { - C.QAbstractSlider_Delete(this.h) + C.QAbstractSlider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractslider.h b/qt6/gen_qabstractslider.h index ba223444..d2010310 100644 --- a/qt6/gen_qabstractslider.h +++ b/qt6/gen_qabstractslider.h @@ -16,16 +16,74 @@ extern "C" { #ifdef __cplusplus class QAbstractSlider; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractSlider QAbstractSlider; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QAbstractSlider* QAbstractSlider_new(QWidget* parent); -QAbstractSlider* QAbstractSlider_new2(); +void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self); void* QAbstractSlider_Metacast(QAbstractSlider* self, const char* param1); struct miqt_string QAbstractSlider_Tr(const char* s); @@ -65,9 +123,101 @@ void QAbstractSlider_RangeChanged(QAbstractSlider* self, int min, int max); void QAbstractSlider_connect_RangeChanged(QAbstractSlider* self, intptr_t slot); void QAbstractSlider_ActionTriggered(QAbstractSlider* self, int action); void QAbstractSlider_connect_ActionTriggered(QAbstractSlider* self, intptr_t slot); +bool QAbstractSlider_Event(QAbstractSlider* self, QEvent* e); +void QAbstractSlider_SliderChange(QAbstractSlider* self, int change); +void QAbstractSlider_KeyPressEvent(QAbstractSlider* self, QKeyEvent* ev); +void QAbstractSlider_TimerEvent(QAbstractSlider* self, QTimerEvent* param1); +void QAbstractSlider_WheelEvent(QAbstractSlider* self, QWheelEvent* e); +void QAbstractSlider_ChangeEvent(QAbstractSlider* self, QEvent* e); struct miqt_string QAbstractSlider_Tr2(const char* s, const char* c); struct miqt_string QAbstractSlider_Tr3(const char* s, const char* c, int n); -void QAbstractSlider_Delete(QAbstractSlider* self); +void QAbstractSlider_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_Event(void* self, QEvent* e); +void QAbstractSlider_override_virtual_SliderChange(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_SliderChange(void* self, int change); +void QAbstractSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QAbstractSlider_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QAbstractSlider_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QAbstractSlider_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ChangeEvent(void* self, QEvent* e); +void QAbstractSlider_override_virtual_DevType(void* self, intptr_t slot); +int QAbstractSlider_virtualbase_DevType(const void* self); +void QAbstractSlider_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_SetVisible(void* self, bool visible); +void QAbstractSlider_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractSlider_virtualbase_SizeHint(const void* self); +void QAbstractSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractSlider_virtualbase_MinimumSizeHint(const void* self); +void QAbstractSlider_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QAbstractSlider_virtualbase_HeightForWidth(const void* self, int param1); +void QAbstractSlider_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_HasHeightForWidth(const void* self); +void QAbstractSlider_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QAbstractSlider_virtualbase_PaintEngine(const void* self); +void QAbstractSlider_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QAbstractSlider_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QAbstractSlider_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractSlider_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractSlider_override_virtual_EnterEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QAbstractSlider_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_LeaveEvent(void* self, QEvent* event); +void QAbstractSlider_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QAbstractSlider_override_virtual_MoveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QAbstractSlider_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractSlider_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QAbstractSlider_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QAbstractSlider_override_virtual_TabletEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QAbstractSlider_override_virtual_ActionEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QAbstractSlider_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractSlider_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractSlider_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractSlider_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractSlider_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QAbstractSlider_override_virtual_HideEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_HideEvent(void* self, QHideEvent* event); +void QAbstractSlider_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QAbstractSlider_override_virtual_Metric(void* self, intptr_t slot); +int QAbstractSlider_virtualbase_Metric(const void* self, int param1); +void QAbstractSlider_override_virtual_InitPainter(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_InitPainter(const void* self, QPainter* painter); +void QAbstractSlider_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QAbstractSlider_virtualbase_Redirected(const void* self, QPoint* offset); +void QAbstractSlider_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QAbstractSlider_virtualbase_SharedPainter(const void* self); +void QAbstractSlider_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractSlider_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QAbstractSlider_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractSlider_virtualbase_InputMethodQuery(const void* self, int param1); +void QAbstractSlider_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractSlider_virtualbase_FocusNextPrevChild(void* self, bool next); +void QAbstractSlider_Delete(QAbstractSlider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstractspinbox.cpp b/qt6/gen_qabstractspinbox.cpp index 219d0bb3..2c87408a 100644 --- a/qt6/gen_qabstractspinbox.cpp +++ b/qt6/gen_qabstractspinbox.cpp @@ -1,22 +1,1226 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include +#include #include #include #include "gen_qabstractspinbox.h" #include "_cgo_export.h" -QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent) { - return new QAbstractSpinBox(parent); +class MiqtVirtualQAbstractSpinBox : public virtual QAbstractSpinBox { +public: + + MiqtVirtualQAbstractSpinBox(QWidget* parent): QAbstractSpinBox(parent) {}; + MiqtVirtualQAbstractSpinBox(): QAbstractSpinBox() {}; + + virtual ~MiqtVirtualQAbstractSpinBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractSpinBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSpinBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractSpinBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractSpinBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractSpinBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractSpinBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAbstractSpinBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractSpinBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QAbstractSpinBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractSpinBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QAbstractSpinBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QAbstractSpinBox::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QAbstractSpinBox::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QAbstractSpinBox::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QAbstractSpinBox_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QAbstractSpinBox::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QAbstractSpinBox::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QAbstractSpinBox_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QAbstractSpinBox::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QAbstractSpinBox::clear(); + return; + } + + + miqt_exec_callback_QAbstractSpinBox_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QAbstractSpinBox::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QAbstractSpinBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractSpinBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QAbstractSpinBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QAbstractSpinBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QAbstractSpinBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QAbstractSpinBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QAbstractSpinBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QAbstractSpinBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QAbstractSpinBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractSpinBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QAbstractSpinBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractSpinBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QAbstractSpinBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QAbstractSpinBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QAbstractSpinBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QAbstractSpinBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QAbstractSpinBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QAbstractSpinBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QAbstractSpinBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QAbstractSpinBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QAbstractSpinBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QAbstractSpinBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QAbstractSpinBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QAbstractSpinBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QAbstractSpinBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QAbstractSpinBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAbstractSpinBox::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractSpinBox::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QAbstractSpinBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QAbstractSpinBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QAbstractSpinBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QAbstractSpinBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSpinBox* option) const override { + if (handle__InitStyleOption == 0) { + QAbstractSpinBox::initStyleOption(option); + return; + } + + QStyleOptionSpinBox* sigval1 = option; + + miqt_exec_callback_QAbstractSpinBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSpinBox* option) const { + + QAbstractSpinBox::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QAbstractSpinBox::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QAbstractSpinBox::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QAbstractSpinBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QAbstractSpinBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QAbstractSpinBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractSpinBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractSpinBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QAbstractSpinBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QAbstractSpinBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QAbstractSpinBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QAbstractSpinBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QAbstractSpinBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QAbstractSpinBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QAbstractSpinBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QAbstractSpinBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractSpinBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QAbstractSpinBox::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QAbstractSpinBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QAbstractSpinBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QAbstractSpinBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QAbstractSpinBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QAbstractSpinBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QAbstractSpinBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QAbstractSpinBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QAbstractSpinBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QAbstractSpinBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QAbstractSpinBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractSpinBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QAbstractSpinBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractSpinBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QAbstractSpinBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractSpinBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QAbstractSpinBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractSpinBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractSpinBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QAbstractSpinBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QAbstractSpinBox::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QAbstractSpinBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QAbstractSpinBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QAbstractSpinBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QAbstractSpinBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QAbstractSpinBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QAbstractSpinBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QAbstractSpinBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QAbstractSpinBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QAbstractSpinBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QAbstractSpinBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QAbstractSpinBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QAbstractSpinBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QAbstractSpinBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractSpinBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QAbstractSpinBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QAbstractSpinBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractSpinBox::focusNextPrevChild(next); + + } + +}; + +void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(parent); + *outptr_QAbstractSpinBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractSpinBox* QAbstractSpinBox_new2() { - return new QAbstractSpinBox(); +void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(); + *outptr_QAbstractSpinBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self) { @@ -200,7 +1404,7 @@ void QAbstractSpinBox_EditingFinished(QAbstractSpinBox* self) { } void QAbstractSpinBox_connect_EditingFinished(QAbstractSpinBox* self, intptr_t slot) { - QAbstractSpinBox::connect(self, static_cast(&QAbstractSpinBox::editingFinished), self, [=]() { + MiqtVirtualQAbstractSpinBox::connect(self, static_cast(&QAbstractSpinBox::editingFinished), self, [=]() { miqt_exec_callback_QAbstractSpinBox_EditingFinished(slot); }); } @@ -227,7 +1431,395 @@ struct miqt_string QAbstractSpinBox_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAbstractSpinBox_Delete(QAbstractSpinBox* self) { - delete self; +void QAbstractSpinBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractSpinBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractSpinBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractSpinBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Event = slot; +} + +bool QAbstractSpinBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Event(event); +} + +void QAbstractSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractSpinBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QAbstractSpinBox_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Validate = slot; +} + +int QAbstractSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Validate(input, pos); +} + +void QAbstractSpinBox_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Fixup = slot; +} + +void QAbstractSpinBox_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Fixup(input); +} + +void QAbstractSpinBox_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__StepBy = slot; +} + +void QAbstractSpinBox_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_StepBy(steps); +} + +void QAbstractSpinBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Clear = slot; +} + +void QAbstractSpinBox_virtualbase_Clear(void* self) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Clear(); +} + +void QAbstractSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QAbstractSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QAbstractSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QAbstractSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QAbstractSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QAbstractSpinBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__HideEvent = slot; +} + +void QAbstractSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_HideEvent(event); +} + +void QAbstractSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QAbstractSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QAbstractSpinBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InitStyleOption = slot; +} + +void QAbstractSpinBox_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option) { + ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QAbstractSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__StepEnabled = slot; +} + +int QAbstractSpinBox_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_StepEnabled(); +} + +void QAbstractSpinBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DevType = slot; +} + +int QAbstractSpinBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DevType(); +} + +void QAbstractSpinBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__SetVisible = slot; +} + +void QAbstractSpinBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractSpinBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__HeightForWidth = slot; +} + +int QAbstractSpinBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QAbstractSpinBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QAbstractSpinBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QAbstractSpinBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QAbstractSpinBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_PaintEngine(); +} + +void QAbstractSpinBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractSpinBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__EnterEvent = slot; +} + +void QAbstractSpinBox_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QAbstractSpinBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__LeaveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QAbstractSpinBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__MoveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QAbstractSpinBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__TabletEvent = slot; +} + +void QAbstractSpinBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QAbstractSpinBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__ActionEvent = slot; +} + +void QAbstractSpinBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QAbstractSpinBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractSpinBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractSpinBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractSpinBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__DropEvent = slot; +} + +void QAbstractSpinBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractSpinBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__NativeEvent = slot; +} + +bool QAbstractSpinBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QAbstractSpinBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Metric = slot; +} + +int QAbstractSpinBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Metric(param1); +} + +void QAbstractSpinBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InitPainter = slot; +} + +void QAbstractSpinBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QAbstractSpinBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QAbstractSpinBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_Redirected(offset); +} + +void QAbstractSpinBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QAbstractSpinBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_SharedPainter(); +} + +void QAbstractSpinBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractSpinBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QAbstractSpinBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSpinBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractSpinBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractSpinBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QAbstractSpinBox_Delete(QAbstractSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstractspinbox.go b/qt6/gen_qabstractspinbox.go index a6707bc3..e1aa5f07 100644 --- a/qt6/gen_qabstractspinbox.go +++ b/qt6/gen_qabstractspinbox.go @@ -45,7 +45,8 @@ const ( ) type QAbstractSpinBox struct { - h *C.QAbstractSpinBox + h *C.QAbstractSpinBox + isSubclass bool *QWidget } @@ -63,27 +64,49 @@ func (this *QAbstractSpinBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractSpinBox(h *C.QAbstractSpinBox) *QAbstractSpinBox { +// newQAbstractSpinBox constructs the type using only CGO pointers. +func newQAbstractSpinBox(h *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSpinBox { if h == nil { return nil } - return &QAbstractSpinBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QAbstractSpinBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQAbstractSpinBox(h unsafe.Pointer) *QAbstractSpinBox { - return newQAbstractSpinBox((*C.QAbstractSpinBox)(h)) +// UnsafeNewQAbstractSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQAbstractSpinBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSpinBox { + if h == nil { + return nil + } + + return &QAbstractSpinBox{h: (*C.QAbstractSpinBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractSpinBox constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox(parent *QWidget) *QAbstractSpinBox { - ret := C.QAbstractSpinBox_new(parent.cPointer()) - return newQAbstractSpinBox(ret) + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSpinBox_new(parent.cPointer(), &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractSpinBox2 constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox2() *QAbstractSpinBox { - ret := C.QAbstractSpinBox_new2() - return newQAbstractSpinBox(ret) + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractSpinBox_new2(&outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractSpinBox) MetaObject() *QMetaObject { @@ -307,9 +330,1149 @@ func QAbstractSpinBox_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractSpinBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractSpinBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSpinBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSpinBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_SizeHint +func miqt_exec_callback_QAbstractSpinBox_SizeHint(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractSpinBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSpinBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractSpinBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MinimumSizeHint +func miqt_exec_callback_QAbstractSpinBox_MinimumSizeHint(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractSpinBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractSpinBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractSpinBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Event +func miqt_exec_callback_QAbstractSpinBox_Event(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QAbstractSpinBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSpinBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QAbstractSpinBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InputMethodQuery +func miqt_exec_callback_QAbstractSpinBox_InputMethodQuery(self *C.QAbstractSpinBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QAbstractSpinBox_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QAbstractSpinBox) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QAbstractSpinBox_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Validate +func miqt_exec_callback_QAbstractSpinBox_Validate(self *C.QAbstractSpinBox, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QAbstractSpinBox_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QAbstractSpinBox) OnFixup(slot func(super func(input string), input string)) { + C.QAbstractSpinBox_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Fixup +func miqt_exec_callback_QAbstractSpinBox_Fixup(self *C.QAbstractSpinBox, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_StepBy(steps int) { + + C.QAbstractSpinBox_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QAbstractSpinBox) OnStepBy(slot func(super func(steps int), steps int)) { + C.QAbstractSpinBox_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_StepBy +func miqt_exec_callback_QAbstractSpinBox_StepBy(self *C.QAbstractSpinBox, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Clear() { + + C.QAbstractSpinBox_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSpinBox) OnClear(slot func(super func())) { + C.QAbstractSpinBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Clear +func miqt_exec_callback_QAbstractSpinBox_Clear(self *C.QAbstractSpinBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Clear) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractSpinBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractSpinBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ResizeEvent +func miqt_exec_callback_QAbstractSpinBox_ResizeEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QAbstractSpinBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractSpinBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_KeyPressEvent +func miqt_exec_callback_QAbstractSpinBox_KeyPressEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QAbstractSpinBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractSpinBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent +func miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QAbstractSpinBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QAbstractSpinBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_WheelEvent +func miqt_exec_callback_QAbstractSpinBox_WheelEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractSpinBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSpinBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_FocusInEvent +func miqt_exec_callback_QAbstractSpinBox_FocusInEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractSpinBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractSpinBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_FocusOutEvent +func miqt_exec_callback_QAbstractSpinBox_FocusOutEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QAbstractSpinBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QAbstractSpinBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent +func miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QAbstractSpinBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSpinBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ChangeEvent +func miqt_exec_callback_QAbstractSpinBox_ChangeEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QAbstractSpinBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QAbstractSpinBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_CloseEvent +func miqt_exec_callback_QAbstractSpinBox_CloseEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QAbstractSpinBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QAbstractSpinBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_HideEvent +func miqt_exec_callback_QAbstractSpinBox_HideEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MousePressEvent +func miqt_exec_callback_QAbstractSpinBox_MousePressEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent +func miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent +func miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractSpinBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractSpinBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_TimerEvent +func miqt_exec_callback_QAbstractSpinBox_TimerEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QAbstractSpinBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QAbstractSpinBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_PaintEvent +func miqt_exec_callback_QAbstractSpinBox_PaintEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QAbstractSpinBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QAbstractSpinBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ShowEvent +func miqt_exec_callback_QAbstractSpinBox_ShowEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_InitStyleOption(option *QStyleOptionSpinBox) { + + C.QAbstractSpinBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QAbstractSpinBox) OnInitStyleOption(slot func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) { + C.QAbstractSpinBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InitStyleOption +func miqt_exec_callback_QAbstractSpinBox_InitStyleOption(self *C.QAbstractSpinBox, cb C.intptr_t, option *C.QStyleOptionSpinBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSpinBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QAbstractSpinBox_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSpinBox) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QAbstractSpinBox_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_StepEnabled +func miqt_exec_callback_QAbstractSpinBox_StepEnabled(self *C.QAbstractSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DevType() int { + + return (int)(C.QAbstractSpinBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSpinBox) OnDevType(slot func(super func() int) int) { + C.QAbstractSpinBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DevType +func miqt_exec_callback_QAbstractSpinBox_DevType(self *C.QAbstractSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractSpinBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractSpinBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractSpinBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_SetVisible +func miqt_exec_callback_QAbstractSpinBox_SetVisible(self *C.QAbstractSpinBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QAbstractSpinBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSpinBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QAbstractSpinBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_HeightForWidth +func miqt_exec_callback_QAbstractSpinBox_HeightForWidth(self *C.QAbstractSpinBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QAbstractSpinBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSpinBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QAbstractSpinBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_HasHeightForWidth +func miqt_exec_callback_QAbstractSpinBox_HasHeightForWidth(self *C.QAbstractSpinBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QAbstractSpinBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSpinBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QAbstractSpinBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_PaintEngine +func miqt_exec_callback_QAbstractSpinBox_PaintEngine(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractSpinBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractSpinBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QAbstractSpinBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QAbstractSpinBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_EnterEvent +func miqt_exec_callback_QAbstractSpinBox_EnterEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QAbstractSpinBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractSpinBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_LeaveEvent +func miqt_exec_callback_QAbstractSpinBox_LeaveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QAbstractSpinBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QAbstractSpinBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_MoveEvent +func miqt_exec_callback_QAbstractSpinBox_MoveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QAbstractSpinBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QAbstractSpinBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_TabletEvent +func miqt_exec_callback_QAbstractSpinBox_TabletEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QAbstractSpinBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QAbstractSpinBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_ActionEvent +func miqt_exec_callback_QAbstractSpinBox_ActionEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractSpinBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractSpinBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DragEnterEvent +func miqt_exec_callback_QAbstractSpinBox_DragEnterEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractSpinBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractSpinBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DragMoveEvent +func miqt_exec_callback_QAbstractSpinBox_DragMoveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractSpinBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractSpinBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent +func miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractSpinBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractSpinBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractSpinBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_DropEvent +func miqt_exec_callback_QAbstractSpinBox_DropEvent(self *C.QAbstractSpinBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QAbstractSpinBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QAbstractSpinBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QAbstractSpinBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_NativeEvent +func miqt_exec_callback_QAbstractSpinBox_NativeEvent(self *C.QAbstractSpinBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QAbstractSpinBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractSpinBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QAbstractSpinBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Metric +func miqt_exec_callback_QAbstractSpinBox_Metric(self *C.QAbstractSpinBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractSpinBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QAbstractSpinBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QAbstractSpinBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QAbstractSpinBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InitPainter +func miqt_exec_callback_QAbstractSpinBox_InitPainter(self *C.QAbstractSpinBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractSpinBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QAbstractSpinBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QAbstractSpinBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_Redirected +func miqt_exec_callback_QAbstractSpinBox_Redirected(self *C.QAbstractSpinBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QAbstractSpinBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QAbstractSpinBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QAbstractSpinBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_SharedPainter +func miqt_exec_callback_QAbstractSpinBox_SharedPainter(self *C.QAbstractSpinBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractSpinBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QAbstractSpinBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractSpinBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QAbstractSpinBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_InputMethodEvent +func miqt_exec_callback_QAbstractSpinBox_InputMethodEvent(self *C.QAbstractSpinBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractSpinBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractSpinBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractSpinBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractSpinBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSpinBox_FocusNextPrevChild +func miqt_exec_callback_QAbstractSpinBox_FocusNextPrevChild(self *C.QAbstractSpinBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractSpinBox) Delete() { - C.QAbstractSpinBox_Delete(this.h) + C.QAbstractSpinBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstractspinbox.h b/qt6/gen_qabstractspinbox.h index 32cd0e0d..8e297f88 100644 --- a/qt6/gen_qabstractspinbox.h +++ b/qt6/gen_qabstractspinbox.h @@ -16,22 +16,76 @@ extern "C" { #ifdef __cplusplus class QAbstractSpinBox; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionSpinBox; +class QTabletEvent; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractSpinBox QAbstractSpinBox; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionSpinBox QStyleOptionSpinBox; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent); -QAbstractSpinBox* QAbstractSpinBox_new2(); +void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self); void* QAbstractSpinBox_Metacast(QAbstractSpinBox* self, const char* param1); struct miqt_string QAbstractSpinBox_Tr(const char* s); @@ -69,11 +123,125 @@ void QAbstractSpinBox_StepUp(QAbstractSpinBox* self); void QAbstractSpinBox_StepDown(QAbstractSpinBox* self); void QAbstractSpinBox_SelectAll(QAbstractSpinBox* self); void QAbstractSpinBox_Clear(QAbstractSpinBox* self); +void QAbstractSpinBox_ResizeEvent(QAbstractSpinBox* self, QResizeEvent* event); +void QAbstractSpinBox_KeyPressEvent(QAbstractSpinBox* self, QKeyEvent* event); +void QAbstractSpinBox_KeyReleaseEvent(QAbstractSpinBox* self, QKeyEvent* event); +void QAbstractSpinBox_WheelEvent(QAbstractSpinBox* self, QWheelEvent* event); +void QAbstractSpinBox_FocusInEvent(QAbstractSpinBox* self, QFocusEvent* event); +void QAbstractSpinBox_FocusOutEvent(QAbstractSpinBox* self, QFocusEvent* event); +void QAbstractSpinBox_ContextMenuEvent(QAbstractSpinBox* self, QContextMenuEvent* event); +void QAbstractSpinBox_ChangeEvent(QAbstractSpinBox* self, QEvent* event); +void QAbstractSpinBox_CloseEvent(QAbstractSpinBox* self, QCloseEvent* event); +void QAbstractSpinBox_HideEvent(QAbstractSpinBox* self, QHideEvent* event); +void QAbstractSpinBox_MousePressEvent(QAbstractSpinBox* self, QMouseEvent* event); +void QAbstractSpinBox_MouseReleaseEvent(QAbstractSpinBox* self, QMouseEvent* event); +void QAbstractSpinBox_MouseMoveEvent(QAbstractSpinBox* self, QMouseEvent* event); +void QAbstractSpinBox_TimerEvent(QAbstractSpinBox* self, QTimerEvent* event); +void QAbstractSpinBox_PaintEvent(QAbstractSpinBox* self, QPaintEvent* event); +void QAbstractSpinBox_ShowEvent(QAbstractSpinBox* self, QShowEvent* event); +void QAbstractSpinBox_InitStyleOption(const QAbstractSpinBox* self, QStyleOptionSpinBox* option); +int QAbstractSpinBox_StepEnabled(const QAbstractSpinBox* self); void QAbstractSpinBox_EditingFinished(QAbstractSpinBox* self); void QAbstractSpinBox_connect_EditingFinished(QAbstractSpinBox* self, intptr_t slot); struct miqt_string QAbstractSpinBox_Tr2(const char* s, const char* c); struct miqt_string QAbstractSpinBox_Tr3(const char* s, const char* c, int n); -void QAbstractSpinBox_Delete(QAbstractSpinBox* self); +void QAbstractSpinBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractSpinBox_virtualbase_SizeHint(const void* self); +void QAbstractSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractSpinBox_virtualbase_MinimumSizeHint(const void* self); +void QAbstractSpinBox_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_Event(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractSpinBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QAbstractSpinBox_override_virtual_Validate(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QAbstractSpinBox_override_virtual_Fixup(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_Fixup(const void* self, struct miqt_string input); +void QAbstractSpinBox_override_virtual_StepBy(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_StepBy(void* self, int steps); +void QAbstractSpinBox_override_virtual_Clear(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_Clear(void* self); +void QAbstractSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QAbstractSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QAbstractSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QAbstractSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QAbstractSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QAbstractSpinBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QAbstractSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QAbstractSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QAbstractSpinBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); +void QAbstractSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_StepEnabled(const void* self); +void QAbstractSpinBox_override_virtual_DevType(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_DevType(const void* self); +void QAbstractSpinBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_SetVisible(void* self, bool visible); +void QAbstractSpinBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_HeightForWidth(const void* self, int param1); +void QAbstractSpinBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_HasHeightForWidth(const void* self); +void QAbstractSpinBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QAbstractSpinBox_virtualbase_PaintEngine(const void* self); +void QAbstractSpinBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractSpinBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QAbstractSpinBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QAbstractSpinBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QAbstractSpinBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QAbstractSpinBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QAbstractSpinBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractSpinBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractSpinBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractSpinBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractSpinBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QAbstractSpinBox_override_virtual_Metric(void* self, intptr_t slot); +int QAbstractSpinBox_virtualbase_Metric(const void* self, int param1); +void QAbstractSpinBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QAbstractSpinBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QAbstractSpinBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QAbstractSpinBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QAbstractSpinBox_virtualbase_SharedPainter(const void* self); +void QAbstractSpinBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractSpinBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QAbstractSpinBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractSpinBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QAbstractSpinBox_Delete(QAbstractSpinBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qabstracttextdocumentlayout.cpp b/qt6/gen_qabstracttextdocumentlayout.cpp index 2ba63ed5..4665d1a2 100644 --- a/qt6/gen_qabstracttextdocumentlayout.cpp +++ b/qt6/gen_qabstracttextdocumentlayout.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include "gen_qabstracttextdocumentlayout.h" @@ -203,8 +204,12 @@ void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* se }); } -void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self) { - delete self; +void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format) { @@ -219,35 +224,50 @@ void QTextObjectInterface_OperatorAssign(QTextObjectInterface* self, QTextObject self->operator=(*param1); } -void QTextObjectInterface_Delete(QTextObjectInterface* self) { - delete self; +void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1) { - return new QAbstractTextDocumentLayout::Selection(*param1); +void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection) { + QAbstractTextDocumentLayout::Selection* ret = new QAbstractTextDocumentLayout::Selection(*param1); + *outptr_QAbstractTextDocumentLayout__Selection = ret; } void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1) { self->operator=(*param1); } -void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self) { - delete self; +void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new() { - return new QAbstractTextDocumentLayout::PaintContext(); +void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { + QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(); + *outptr_QAbstractTextDocumentLayout__PaintContext = ret; } -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1) { - return new QAbstractTextDocumentLayout::PaintContext(*param1); +void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { + QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(*param1); + *outptr_QAbstractTextDocumentLayout__PaintContext = ret; } void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1) { self->operator=(*param1); } -void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self) { - delete self; +void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qabstracttextdocumentlayout.go b/qt6/gen_qabstracttextdocumentlayout.go index f0825833..28b312d0 100644 --- a/qt6/gen_qabstracttextdocumentlayout.go +++ b/qt6/gen_qabstracttextdocumentlayout.go @@ -15,7 +15,8 @@ import ( ) type QAbstractTextDocumentLayout struct { - h *C.QAbstractTextDocumentLayout + h *C.QAbstractTextDocumentLayout + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QAbstractTextDocumentLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout) *QAbstractTextDocumentLayout { +// newQAbstractTextDocumentLayout constructs the type using only CGO pointers. +func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QAbstractTextDocumentLayout { if h == nil { return nil } - return &QAbstractTextDocumentLayout{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractTextDocumentLayout{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer) *QAbstractTextDocumentLayout { - return newQAbstractTextDocumentLayout((*C.QAbstractTextDocumentLayout)(h)) +// UnsafeNewQAbstractTextDocumentLayout constructs the type using only unsafe pointers. +func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTextDocumentLayout { + if h == nil { + return nil + } + + return &QAbstractTextDocumentLayout{h: (*C.QAbstractTextDocumentLayout)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAbstractTextDocumentLayout) MetaObject() *QMetaObject { @@ -133,7 +142,7 @@ func (this *QAbstractTextDocumentLayout) PaintDevice() *QPaintDevice { } func (this *QAbstractTextDocumentLayout) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QAbstractTextDocumentLayout_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QAbstractTextDocumentLayout_Document(this.h)), nil) } func (this *QAbstractTextDocumentLayout) RegisterHandler(objectType int, component *QObject) { @@ -273,7 +282,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_Update1(cb C.intptr_t, param // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout) Delete() { - C.QAbstractTextDocumentLayout_Delete(this.h) + C.QAbstractTextDocumentLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -286,7 +295,8 @@ func (this *QAbstractTextDocumentLayout) GoGC() { } type QTextObjectInterface struct { - h *C.QTextObjectInterface + h *C.QTextObjectInterface + isSubclass bool } func (this *QTextObjectInterface) cPointer() *C.QTextObjectInterface { @@ -303,6 +313,7 @@ func (this *QTextObjectInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextObjectInterface constructs the type using only CGO pointers. func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface { if h == nil { return nil @@ -310,8 +321,13 @@ func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface { return &QTextObjectInterface{h: h} } +// UnsafeNewQTextObjectInterface constructs the type using only unsafe pointers. func UnsafeNewQTextObjectInterface(h unsafe.Pointer) *QTextObjectInterface { - return newQTextObjectInterface((*C.QTextObjectInterface)(h)) + if h == nil { + return nil + } + + return &QTextObjectInterface{h: (*C.QTextObjectInterface)(h)} } func (this *QTextObjectInterface) IntrinsicSize(doc *QTextDocument, posInDocument int, format *QTextFormat) *QSizeF { @@ -331,7 +347,7 @@ func (this *QTextObjectInterface) OperatorAssign(param1 *QTextObjectInterface) { // Delete this object from C++ memory. func (this *QTextObjectInterface) Delete() { - C.QTextObjectInterface_Delete(this.h) + C.QTextObjectInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -344,7 +360,8 @@ func (this *QTextObjectInterface) GoGC() { } type QAbstractTextDocumentLayout__Selection struct { - h *C.QAbstractTextDocumentLayout__Selection + h *C.QAbstractTextDocumentLayout__Selection + isSubclass bool } func (this *QAbstractTextDocumentLayout__Selection) cPointer() *C.QAbstractTextDocumentLayout__Selection { @@ -361,6 +378,7 @@ func (this *QAbstractTextDocumentLayout__Selection) UnsafePointer() unsafe.Point return unsafe.Pointer(this.h) } +// newQAbstractTextDocumentLayout__Selection constructs the type using only CGO pointers. func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection { if h == nil { return nil @@ -368,14 +386,23 @@ func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout_ return &QAbstractTextDocumentLayout__Selection{h: h} } +// UnsafeNewQAbstractTextDocumentLayout__Selection constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__Selection(h unsafe.Pointer) *QAbstractTextDocumentLayout__Selection { - return newQAbstractTextDocumentLayout__Selection((*C.QAbstractTextDocumentLayout__Selection)(h)) + if h == nil { + return nil + } + + return &QAbstractTextDocumentLayout__Selection{h: (*C.QAbstractTextDocumentLayout__Selection)(h)} } // NewQAbstractTextDocumentLayout__Selection constructs a new QAbstractTextDocumentLayout::Selection object. func NewQAbstractTextDocumentLayout__Selection(param1 *QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection { - ret := C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer()) - return newQAbstractTextDocumentLayout__Selection(ret) + var outptr_QAbstractTextDocumentLayout__Selection *C.QAbstractTextDocumentLayout__Selection = nil + + C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__Selection) + ret := newQAbstractTextDocumentLayout__Selection(outptr_QAbstractTextDocumentLayout__Selection) + ret.isSubclass = true + return ret } func (this *QAbstractTextDocumentLayout__Selection) OperatorAssign(param1 *QAbstractTextDocumentLayout__Selection) { @@ -384,7 +411,7 @@ func (this *QAbstractTextDocumentLayout__Selection) OperatorAssign(param1 *QAbst // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout__Selection) Delete() { - C.QAbstractTextDocumentLayout__Selection_Delete(this.h) + C.QAbstractTextDocumentLayout__Selection_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -397,7 +424,8 @@ func (this *QAbstractTextDocumentLayout__Selection) GoGC() { } type QAbstractTextDocumentLayout__PaintContext struct { - h *C.QAbstractTextDocumentLayout__PaintContext + h *C.QAbstractTextDocumentLayout__PaintContext + isSubclass bool } func (this *QAbstractTextDocumentLayout__PaintContext) cPointer() *C.QAbstractTextDocumentLayout__PaintContext { @@ -414,6 +442,7 @@ func (this *QAbstractTextDocumentLayout__PaintContext) UnsafePointer() unsafe.Po return unsafe.Pointer(this.h) } +// newQAbstractTextDocumentLayout__PaintContext constructs the type using only CGO pointers. func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext { if h == nil { return nil @@ -421,20 +450,33 @@ func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayo return &QAbstractTextDocumentLayout__PaintContext{h: h} } +// UnsafeNewQAbstractTextDocumentLayout__PaintContext constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__PaintContext(h unsafe.Pointer) *QAbstractTextDocumentLayout__PaintContext { - return newQAbstractTextDocumentLayout__PaintContext((*C.QAbstractTextDocumentLayout__PaintContext)(h)) + if h == nil { + return nil + } + + return &QAbstractTextDocumentLayout__PaintContext{h: (*C.QAbstractTextDocumentLayout__PaintContext)(h)} } // NewQAbstractTextDocumentLayout__PaintContext constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext() *QAbstractTextDocumentLayout__PaintContext { - ret := C.QAbstractTextDocumentLayout__PaintContext_new() - return newQAbstractTextDocumentLayout__PaintContext(ret) + var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil + + C.QAbstractTextDocumentLayout__PaintContext_new(&outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret.isSubclass = true + return ret } // NewQAbstractTextDocumentLayout__PaintContext2 constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext2(param1 *QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext { - ret := C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer()) - return newQAbstractTextDocumentLayout__PaintContext(ret) + var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil + + C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret.isSubclass = true + return ret } func (this *QAbstractTextDocumentLayout__PaintContext) OperatorAssign(param1 *QAbstractTextDocumentLayout__PaintContext) { @@ -443,7 +485,7 @@ func (this *QAbstractTextDocumentLayout__PaintContext) OperatorAssign(param1 *QA // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout__PaintContext) Delete() { - C.QAbstractTextDocumentLayout__PaintContext_Delete(this.h) + C.QAbstractTextDocumentLayout__PaintContext_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qabstracttextdocumentlayout.h b/qt6/gen_qabstracttextdocumentlayout.h index 27e30ff7..b3d12bab 100644 --- a/qt6/gen_qabstracttextdocumentlayout.h +++ b/qt6/gen_qabstracttextdocumentlayout.h @@ -37,6 +37,7 @@ class QTextBlock; class QTextDocument; class QTextFormat; class QTextFrame; +class QTextInlineObject; class QTextObjectInterface; #else typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; @@ -53,6 +54,7 @@ typedef struct QTextBlock QTextBlock; typedef struct QTextDocument QTextDocument; typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; +typedef struct QTextInlineObject QTextInlineObject; typedef struct QTextObjectInterface QTextObjectInterface; #endif @@ -83,26 +85,30 @@ void QAbstractTextDocumentLayout_DocumentSizeChanged(QAbstractTextDocumentLayout void QAbstractTextDocumentLayout_connect_DocumentSizeChanged(QAbstractTextDocumentLayout* self, intptr_t slot); void QAbstractTextDocumentLayout_PageCountChanged(QAbstractTextDocumentLayout* self, int newPages); void QAbstractTextDocumentLayout_connect_PageCountChanged(QAbstractTextDocumentLayout* self, intptr_t slot); +void QAbstractTextDocumentLayout_DocumentChanged(QAbstractTextDocumentLayout* self, int from, int charsRemoved, int charsAdded); +void QAbstractTextDocumentLayout_ResizeInlineObject(QAbstractTextDocumentLayout* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_PositionInlineObject(QAbstractTextDocumentLayout* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_DrawInlineObject(QAbstractTextDocumentLayout* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format); struct miqt_string QAbstractTextDocumentLayout_Tr2(const char* s, const char* c); struct miqt_string QAbstractTextDocumentLayout_Tr3(const char* s, const char* c, int n); void QAbstractTextDocumentLayout_UnregisterHandler2(QAbstractTextDocumentLayout* self, int objectType, QObject* component); void QAbstractTextDocumentLayout_Update1(QAbstractTextDocumentLayout* self, QRectF* param1); void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* self, intptr_t slot); -void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self); +void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass); QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format); void QTextObjectInterface_DrawObject(QTextObjectInterface* self, QPainter* painter, QRectF* rect, QTextDocument* doc, int posInDocument, QTextFormat* format); void QTextObjectInterface_OperatorAssign(QTextObjectInterface* self, QTextObjectInterface* param1); -void QTextObjectInterface_Delete(QTextObjectInterface* self); +void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass); -QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1); +void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection); void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1); -void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self); +void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self, bool isSubclass); -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new(); -QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1); +void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); +void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1); -void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self); +void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaccessible.cpp b/qt6/gen_qaccessible.cpp index 95e2cd63..84d2629b 100644 --- a/qt6/gen_qaccessible.cpp +++ b/qt6/gen_qaccessible.cpp @@ -44,8 +44,8 @@ QWindow* QAccessibleInterface_Window(const QAccessibleInterface* self) { return self->window(); } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self) { - QList> _ret = self->relations(); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self, int match) { + QList> _ret = self->relations(static_cast(match)); // Convert QList<> from C++ memory to manually-managed C memory struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -169,30 +169,6 @@ void* QAccessibleInterface_InterfaceCast(QAccessibleInterface* self, int param1) return self->interface_cast(static_cast(param1)); } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations1(const QAccessibleInterface* self, int match) { - QList> _ret = self->relations(static_cast(match)); - // Convert QList<> from C++ memory to manually-managed C memory - struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QPair> _lv_ret = _ret[i]; - // Convert QPair<> from C++ memory to manually-managed C memory - QAccessibleInterface** _lv_first_arr = static_cast(malloc(sizeof(QAccessibleInterface*))); - int* _lv_second_arr = static_cast(malloc(sizeof(int))); - _lv_first_arr[0] = _lv_ret.first; - QFlags _lv_second_ret = _lv_ret.second; - _lv_second_arr[0] = static_cast(_lv_second_ret); - struct miqt_map _lv_out; - _lv_out.len = 1; - _lv_out.keys = static_cast(_lv_first_arr); - _lv_out.values = static_cast(_lv_second_arr); - _arr[i] = _lv_out; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - void QAccessibleTextInterface_Selection(const QAccessibleTextInterface* self, int selectionIndex, int* startOffset, int* endOffset) { self->selection(static_cast(selectionIndex), static_cast(startOffset), static_cast(endOffset)); } @@ -296,8 +272,12 @@ void QAccessibleTextInterface_OperatorAssign(QAccessibleTextInterface* self, QAc self->operator=(*param1); } -void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self) { - delete self; +void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void QAccessibleEditableTextInterface_DeleteText(QAccessibleEditableTextInterface* self, int startOffset, int endOffset) { @@ -318,8 +298,12 @@ void QAccessibleEditableTextInterface_OperatorAssign(QAccessibleEditableTextInte self->operator=(*param1); } -void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self) { - delete self; +void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QVariant* QAccessibleValueInterface_CurrentValue(const QAccessibleValueInterface* self) { @@ -346,8 +330,12 @@ void QAccessibleValueInterface_OperatorAssign(QAccessibleValueInterface* self, Q self->operator=(*param1); } -void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self) { - delete self; +void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QAccessibleTableCellInterface_IsSelected(const QAccessibleTableCellInterface* self) { @@ -404,8 +392,12 @@ void QAccessibleTableCellInterface_OperatorAssign(QAccessibleTableCellInterface* self->operator=(*param1); } -void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self) { - delete self; +void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QAccessibleInterface* QAccessibleTableInterface_Caption(const QAccessibleTableInterface* self) { @@ -529,8 +521,12 @@ void QAccessibleTableInterface_ModelChange(QAccessibleTableInterface* self, QAcc self->modelChange(event); } -void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self) { - delete self; +void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QAccessibleActionInterface_Tr(const char* sourceText) { @@ -772,8 +768,12 @@ struct miqt_string QAccessibleActionInterface_Tr3(const char* sourceText, const return _ms; } -void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self) { - delete self; +void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QAccessibleImageInterface_ImageDescription(const QAccessibleImageInterface* self) { @@ -799,8 +799,12 @@ void QAccessibleImageInterface_OperatorAssign(QAccessibleImageInterface* self, Q self->operator=(*param1); } -void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self) { - delete self; +void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QAccessibleHyperlinkInterface_Anchor(const QAccessibleHyperlinkInterface* self) { @@ -841,16 +845,54 @@ void QAccessibleHyperlinkInterface_OperatorAssign(QAccessibleHyperlinkInterface* self->operator=(*param1); } -void QAccessibleHyperlinkInterface_Delete(QAccessibleHyperlinkInterface* self) { - delete self; +void QAccessibleHyperlinkInterface_Delete(QAccessibleHyperlinkInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ) { - return new QAccessibleEvent(obj, static_cast(typ)); +class MiqtVirtualQAccessibleEvent : public virtual QAccessibleEvent { +public: + + MiqtVirtualQAccessibleEvent(QObject* obj, QAccessible::Event typ): QAccessibleEvent(obj, typ) {}; + MiqtVirtualQAccessibleEvent(QAccessibleInterface* iface, QAccessible::Event typ): QAccessibleEvent(iface, typ) {}; + + virtual ~MiqtVirtualQAccessibleEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleEvent::accessibleInterface(); + + } + +}; + +void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(obj, static_cast(typ)); + *outptr_QAccessibleEvent = ret; } -QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ) { - return new QAccessibleEvent(iface, static_cast(typ)); +void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(iface, static_cast(typ)); + *outptr_QAccessibleEvent = ret; } int QAccessibleEvent_Type(const QAccessibleEvent* self) { @@ -879,32 +921,128 @@ QAccessibleInterface* QAccessibleEvent_AccessibleInterface(const QAccessibleEven return self->accessibleInterface(); } -void QAccessibleEvent_Delete(QAccessibleEvent* self) { - delete self; +void QAccessibleEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleEvent*)(self) )->virtualbase_AccessibleInterface(); } -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state) { - return new QAccessibleStateChangeEvent(obj, *state); +void QAccessibleEvent_Delete(QAccessibleEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQAccessibleStateChangeEvent : public virtual QAccessibleStateChangeEvent { +public: + + MiqtVirtualQAccessibleStateChangeEvent(QObject* obj, QAccessible::State state): QAccessibleStateChangeEvent(obj, state) {}; + MiqtVirtualQAccessibleStateChangeEvent(QAccessibleInterface* iface, QAccessible::State state): QAccessibleStateChangeEvent(iface, state) {}; + + virtual ~MiqtVirtualQAccessibleStateChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleStateChangeEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleStateChangeEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleStateChangeEvent::accessibleInterface(); + + } + +}; + +void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(obj, *state); + *outptr_QAccessibleStateChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state) { - return new QAccessibleStateChangeEvent(iface, *state); +void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(iface, *state); + *outptr_QAccessibleStateChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self) { return new QAccessible::State(self->changedStates()); } -void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self) { - delete self; +void QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleStateChangeEvent*)(self) )->handle__AccessibleInterface = slot; } -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos) { - return new QAccessibleTextCursorEvent(obj, static_cast(cursorPos)); +QAccessibleInterface* QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleStateChangeEvent*)(self) )->virtualbase_AccessibleInterface(); } -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos) { - return new QAccessibleTextCursorEvent(iface, static_cast(cursorPos)); +void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQAccessibleTextCursorEvent : public virtual QAccessibleTextCursorEvent { +public: + + MiqtVirtualQAccessibleTextCursorEvent(QObject* obj, int cursorPos): QAccessibleTextCursorEvent(obj, cursorPos) {}; + MiqtVirtualQAccessibleTextCursorEvent(QAccessibleInterface* iface, int cursorPos): QAccessibleTextCursorEvent(iface, cursorPos) {}; + + virtual ~MiqtVirtualQAccessibleTextCursorEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleTextCursorEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleTextCursorEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleTextCursorEvent::accessibleInterface(); + + } + +}; + +void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(obj, static_cast(cursorPos)); + *outptr_QAccessibleTextCursorEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); +} + +void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(iface, static_cast(cursorPos)); + *outptr_QAccessibleTextCursorEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position) { @@ -915,16 +1053,34 @@ int QAccessibleTextCursorEvent_CursorPosition(const QAccessibleTextCursorEvent* return self->cursorPosition(); } -void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self) { - delete self; +void QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleTextCursorEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleTextCursorEvent*)(self) )->virtualbase_AccessibleInterface(); } -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end) { - return new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); +void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); + *outptr_QAccessibleTextSelectionEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end) { - return new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); +void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); + *outptr_QAccessibleTextSelectionEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end) { @@ -939,18 +1095,28 @@ int QAccessibleTextSelectionEvent_SelectionEnd(const QAccessibleTextSelectionEve return self->selectionEnd(); } -void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self) { - delete self; +void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text) { +void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); + QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); + *outptr_QAccessibleTextInsertEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { +void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); + QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); + *outptr_QAccessibleTextInsertEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self) { @@ -968,18 +1134,28 @@ int QAccessibleTextInsertEvent_ChangePosition(const QAccessibleTextInsertEvent* return self->changePosition(); } -void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self) { - delete self; +void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text) { +void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); + QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); + *outptr_QAccessibleTextRemoveEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { +void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); + QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); + *outptr_QAccessibleTextRemoveEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self) { @@ -997,20 +1173,30 @@ int QAccessibleTextRemoveEvent_ChangePosition(const QAccessibleTextRemoveEvent* return self->changePosition(); } -void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self) { - delete self; +void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text) { +void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); + QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); + *outptr_QAccessibleTextUpdateEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text) { +void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); + QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); + *outptr_QAccessibleTextUpdateEvent = ret; + *outptr_QAccessibleTextCursorEvent = static_cast(ret); + *outptr_QAccessibleEvent = static_cast(ret); } struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self) { @@ -1039,16 +1225,56 @@ int QAccessibleTextUpdateEvent_ChangePosition(const QAccessibleTextUpdateEvent* return self->changePosition(); } -void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self) { - delete self; +void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val) { - return new QAccessibleValueChangeEvent(obj, *val); +class MiqtVirtualQAccessibleValueChangeEvent : public virtual QAccessibleValueChangeEvent { +public: + + MiqtVirtualQAccessibleValueChangeEvent(QObject* obj, const QVariant& val): QAccessibleValueChangeEvent(obj, val) {}; + MiqtVirtualQAccessibleValueChangeEvent(QAccessibleInterface* iface, const QVariant& val): QAccessibleValueChangeEvent(iface, val) {}; + + virtual ~MiqtVirtualQAccessibleValueChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleValueChangeEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleValueChangeEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleValueChangeEvent::accessibleInterface(); + + } + +}; + +void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(obj, *val); + *outptr_QAccessibleValueChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val) { - return new QAccessibleValueChangeEvent(iface, *val); +void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(iface, *val); + *outptr_QAccessibleValueChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val) { @@ -1059,16 +1285,64 @@ QVariant* QAccessibleValueChangeEvent_Value(const QAccessibleValueChangeEvent* s return new QVariant(self->value()); } -void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self) { - delete self; +void QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleValueChangeEvent*)(self) )->handle__AccessibleInterface = slot; } -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType) { - return new QAccessibleTableModelChangeEvent(obj, static_cast(changeType)); +QAccessibleInterface* QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleValueChangeEvent*)(self) )->virtualbase_AccessibleInterface(); } -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType) { - return new QAccessibleTableModelChangeEvent(iface, static_cast(changeType)); +void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQAccessibleTableModelChangeEvent : public virtual QAccessibleTableModelChangeEvent { +public: + + MiqtVirtualQAccessibleTableModelChangeEvent(QObject* obj, QAccessibleTableModelChangeEvent::ModelChangeType changeType): QAccessibleTableModelChangeEvent(obj, changeType) {}; + MiqtVirtualQAccessibleTableModelChangeEvent(QAccessibleInterface* iface, QAccessibleTableModelChangeEvent::ModelChangeType changeType): QAccessibleTableModelChangeEvent(iface, changeType) {}; + + virtual ~MiqtVirtualQAccessibleTableModelChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleInterface = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleInterface() const override { + if (handle__AccessibleInterface == 0) { + return QAccessibleTableModelChangeEvent::accessibleInterface(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleTableModelChangeEvent_AccessibleInterface(const_cast(this), handle__AccessibleInterface); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleInterface() const { + + return QAccessibleTableModelChangeEvent::accessibleInterface(); + + } + +}; + +void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(obj, static_cast(changeType)); + *outptr_QAccessibleTableModelChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); +} + +void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { + MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(iface, static_cast(changeType)); + *outptr_QAccessibleTableModelChangeEvent = ret; + *outptr_QAccessibleEvent = static_cast(ret); } void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType) { @@ -1112,7 +1386,19 @@ int QAccessibleTableModelChangeEvent_LastColumn(const QAccessibleTableModelChang return self->lastColumn(); } -void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self) { - delete self; +void QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleTableModelChangeEvent*)(self) )->handle__AccessibleInterface = slot; +} + +QAccessibleInterface* QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(const void* self) { + return ( (const MiqtVirtualQAccessibleTableModelChangeEvent*)(self) )->virtualbase_AccessibleInterface(); +} + +void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qaccessible.go b/qt6/gen_qaccessible.go index 2623e7c8..3aa1e667 100644 --- a/qt6/gen_qaccessible.go +++ b/qt6/gen_qaccessible.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -25,7 +26,8 @@ const ( ) type QAccessibleInterface struct { - h *C.QAccessibleInterface + h *C.QAccessibleInterface + isSubclass bool } func (this *QAccessibleInterface) cPointer() *C.QAccessibleInterface { @@ -42,6 +44,7 @@ func (this *QAccessibleInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleInterface constructs the type using only CGO pointers. func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface { if h == nil { return nil @@ -49,8 +52,13 @@ func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface { return &QAccessibleInterface{h: h} } +// UnsafeNewQAccessibleInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleInterface(h unsafe.Pointer) *QAccessibleInterface { - return newQAccessibleInterface((*C.QAccessibleInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleInterface{h: (*C.QAccessibleInterface)(h)} } func (this *QAccessibleInterface) IsValid() bool { @@ -62,14 +70,14 @@ func (this *QAccessibleInterface) Object() *QObject { } func (this *QAccessibleInterface) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleInterface_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleInterface_Window(this.h)), nil, nil) } -func (this *QAccessibleInterface) Relations() []struct { +func (this *QAccessibleInterface) Relations(match QAccessible__RelationFlag) []struct { First *QAccessibleInterface Second QAccessible__RelationFlag } { - var _ma C.struct_miqt_array = C.QAccessibleInterface_Relations(this.h) + var _ma C.struct_miqt_array = C.QAccessibleInterface_Relations(this.h, (C.int)(match)) _ret := make([]struct { First *QAccessibleInterface Second QAccessible__RelationFlag @@ -201,33 +209,9 @@ func (this *QAccessibleInterface) InterfaceCast(param1 QAccessible__InterfaceTyp return (unsafe.Pointer)(C.QAccessibleInterface_InterfaceCast(this.h, (C.int)(param1))) } -func (this *QAccessibleInterface) Relations1(match QAccessible__RelationFlag) []struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag -} { - var _ma C.struct_miqt_array = C.QAccessibleInterface_Relations1(this.h, (C.int)(match)) - _ret := make([]struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }, int(_ma.len)) - _outCast := (*[0xffff]C.struct_miqt_map)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - var _lv_mm C.struct_miqt_map = _outCast[i] - _lv_First_CArray := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_lv_mm.keys)) - _lv_Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_lv_mm.values)) - _lv_entry_First := UnsafeNewQAccessibleInterface(unsafe.Pointer(_lv_First_CArray[0])) - _lv_entry_Second := (QAccessible__RelationFlag)(_lv_Second_CArray[0]) - - _ret[i] = struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }{First: _lv_entry_First, Second: _lv_entry_Second} - } - return _ret -} - type QAccessibleTextInterface struct { - h *C.QAccessibleTextInterface + h *C.QAccessibleTextInterface + isSubclass bool } func (this *QAccessibleTextInterface) cPointer() *C.QAccessibleTextInterface { @@ -244,6 +228,7 @@ func (this *QAccessibleTextInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleTextInterface constructs the type using only CGO pointers. func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleTextInterface { if h == nil { return nil @@ -251,8 +236,13 @@ func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleText return &QAccessibleTextInterface{h: h} } +// UnsafeNewQAccessibleTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTextInterface(h unsafe.Pointer) *QAccessibleTextInterface { - return newQAccessibleTextInterface((*C.QAccessibleTextInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleTextInterface{h: (*C.QAccessibleTextInterface)(h)} } func (this *QAccessibleTextInterface) Selection(selectionIndex int, startOffset *int, endOffset *int) { @@ -343,7 +333,7 @@ func (this *QAccessibleTextInterface) OperatorAssign(param1 *QAccessibleTextInte // Delete this object from C++ memory. func (this *QAccessibleTextInterface) Delete() { - C.QAccessibleTextInterface_Delete(this.h) + C.QAccessibleTextInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -356,7 +346,8 @@ func (this *QAccessibleTextInterface) GoGC() { } type QAccessibleEditableTextInterface struct { - h *C.QAccessibleEditableTextInterface + h *C.QAccessibleEditableTextInterface + isSubclass bool } func (this *QAccessibleEditableTextInterface) cPointer() *C.QAccessibleEditableTextInterface { @@ -373,6 +364,7 @@ func (this *QAccessibleEditableTextInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleEditableTextInterface constructs the type using only CGO pointers. func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) *QAccessibleEditableTextInterface { if h == nil { return nil @@ -380,8 +372,13 @@ func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) return &QAccessibleEditableTextInterface{h: h} } +// UnsafeNewQAccessibleEditableTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEditableTextInterface(h unsafe.Pointer) *QAccessibleEditableTextInterface { - return newQAccessibleEditableTextInterface((*C.QAccessibleEditableTextInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleEditableTextInterface{h: (*C.QAccessibleEditableTextInterface)(h)} } func (this *QAccessibleEditableTextInterface) DeleteText(startOffset int, endOffset int) { @@ -410,7 +407,7 @@ func (this *QAccessibleEditableTextInterface) OperatorAssign(param1 *QAccessible // Delete this object from C++ memory. func (this *QAccessibleEditableTextInterface) Delete() { - C.QAccessibleEditableTextInterface_Delete(this.h) + C.QAccessibleEditableTextInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -423,7 +420,8 @@ func (this *QAccessibleEditableTextInterface) GoGC() { } type QAccessibleValueInterface struct { - h *C.QAccessibleValueInterface + h *C.QAccessibleValueInterface + isSubclass bool } func (this *QAccessibleValueInterface) cPointer() *C.QAccessibleValueInterface { @@ -440,6 +438,7 @@ func (this *QAccessibleValueInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleValueInterface constructs the type using only CGO pointers. func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleValueInterface { if h == nil { return nil @@ -447,8 +446,13 @@ func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleVa return &QAccessibleValueInterface{h: h} } +// UnsafeNewQAccessibleValueInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleValueInterface(h unsafe.Pointer) *QAccessibleValueInterface { - return newQAccessibleValueInterface((*C.QAccessibleValueInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleValueInterface{h: (*C.QAccessibleValueInterface)(h)} } func (this *QAccessibleValueInterface) CurrentValue() *QVariant { @@ -489,7 +493,7 @@ func (this *QAccessibleValueInterface) OperatorAssign(param1 *QAccessibleValueIn // Delete this object from C++ memory. func (this *QAccessibleValueInterface) Delete() { - C.QAccessibleValueInterface_Delete(this.h) + C.QAccessibleValueInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -502,7 +506,8 @@ func (this *QAccessibleValueInterface) GoGC() { } type QAccessibleTableCellInterface struct { - h *C.QAccessibleTableCellInterface + h *C.QAccessibleTableCellInterface + isSubclass bool } func (this *QAccessibleTableCellInterface) cPointer() *C.QAccessibleTableCellInterface { @@ -519,6 +524,7 @@ func (this *QAccessibleTableCellInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleTableCellInterface constructs the type using only CGO pointers. func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAccessibleTableCellInterface { if h == nil { return nil @@ -526,8 +532,13 @@ func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAcce return &QAccessibleTableCellInterface{h: h} } +// UnsafeNewQAccessibleTableCellInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableCellInterface(h unsafe.Pointer) *QAccessibleTableCellInterface { - return newQAccessibleTableCellInterface((*C.QAccessibleTableCellInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleTableCellInterface{h: (*C.QAccessibleTableCellInterface)(h)} } func (this *QAccessibleTableCellInterface) IsSelected() bool { @@ -580,7 +591,7 @@ func (this *QAccessibleTableCellInterface) OperatorAssign(param1 *QAccessibleTab // Delete this object from C++ memory. func (this *QAccessibleTableCellInterface) Delete() { - C.QAccessibleTableCellInterface_Delete(this.h) + C.QAccessibleTableCellInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -593,7 +604,8 @@ func (this *QAccessibleTableCellInterface) GoGC() { } type QAccessibleTableInterface struct { - h *C.QAccessibleTableInterface + h *C.QAccessibleTableInterface + isSubclass bool } func (this *QAccessibleTableInterface) cPointer() *C.QAccessibleTableInterface { @@ -610,6 +622,7 @@ func (this *QAccessibleTableInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleTableInterface constructs the type using only CGO pointers. func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTableInterface { if h == nil { return nil @@ -617,8 +630,13 @@ func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTa return &QAccessibleTableInterface{h: h} } +// UnsafeNewQAccessibleTableInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableInterface(h unsafe.Pointer) *QAccessibleTableInterface { - return newQAccessibleTableInterface((*C.QAccessibleTableInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleTableInterface{h: (*C.QAccessibleTableInterface)(h)} } func (this *QAccessibleTableInterface) Caption() *QAccessibleInterface { @@ -727,7 +745,7 @@ func (this *QAccessibleTableInterface) ModelChange(event *QAccessibleTableModelC // Delete this object from C++ memory. func (this *QAccessibleTableInterface) Delete() { - C.QAccessibleTableInterface_Delete(this.h) + C.QAccessibleTableInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -740,7 +758,8 @@ func (this *QAccessibleTableInterface) GoGC() { } type QAccessibleActionInterface struct { - h *C.QAccessibleActionInterface + h *C.QAccessibleActionInterface + isSubclass bool } func (this *QAccessibleActionInterface) cPointer() *C.QAccessibleActionInterface { @@ -757,6 +776,7 @@ func (this *QAccessibleActionInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleActionInterface constructs the type using only CGO pointers. func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessibleActionInterface { if h == nil { return nil @@ -764,8 +784,13 @@ func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessible return &QAccessibleActionInterface{h: h} } +// UnsafeNewQAccessibleActionInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleActionInterface(h unsafe.Pointer) *QAccessibleActionInterface { - return newQAccessibleActionInterface((*C.QAccessibleActionInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleActionInterface{h: (*C.QAccessibleActionInterface)(h)} } func QAccessibleActionInterface_Tr(sourceText string) string { @@ -949,7 +974,7 @@ func QAccessibleActionInterface_Tr3(sourceText string, disambiguation string, n // Delete this object from C++ memory. func (this *QAccessibleActionInterface) Delete() { - C.QAccessibleActionInterface_Delete(this.h) + C.QAccessibleActionInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -962,7 +987,8 @@ func (this *QAccessibleActionInterface) GoGC() { } type QAccessibleImageInterface struct { - h *C.QAccessibleImageInterface + h *C.QAccessibleImageInterface + isSubclass bool } func (this *QAccessibleImageInterface) cPointer() *C.QAccessibleImageInterface { @@ -979,6 +1005,7 @@ func (this *QAccessibleImageInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleImageInterface constructs the type using only CGO pointers. func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleImageInterface { if h == nil { return nil @@ -986,8 +1013,13 @@ func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleIm return &QAccessibleImageInterface{h: h} } +// UnsafeNewQAccessibleImageInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleImageInterface(h unsafe.Pointer) *QAccessibleImageInterface { - return newQAccessibleImageInterface((*C.QAccessibleImageInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleImageInterface{h: (*C.QAccessibleImageInterface)(h)} } func (this *QAccessibleImageInterface) ImageDescription() string { @@ -1017,7 +1049,7 @@ func (this *QAccessibleImageInterface) OperatorAssign(param1 *QAccessibleImageIn // Delete this object from C++ memory. func (this *QAccessibleImageInterface) Delete() { - C.QAccessibleImageInterface_Delete(this.h) + C.QAccessibleImageInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1030,7 +1062,8 @@ func (this *QAccessibleImageInterface) GoGC() { } type QAccessibleHyperlinkInterface struct { - h *C.QAccessibleHyperlinkInterface + h *C.QAccessibleHyperlinkInterface + isSubclass bool } func (this *QAccessibleHyperlinkInterface) cPointer() *C.QAccessibleHyperlinkInterface { @@ -1047,6 +1080,7 @@ func (this *QAccessibleHyperlinkInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleHyperlinkInterface constructs the type using only CGO pointers. func newQAccessibleHyperlinkInterface(h *C.QAccessibleHyperlinkInterface) *QAccessibleHyperlinkInterface { if h == nil { return nil @@ -1054,8 +1088,13 @@ func newQAccessibleHyperlinkInterface(h *C.QAccessibleHyperlinkInterface) *QAcce return &QAccessibleHyperlinkInterface{h: h} } +// UnsafeNewQAccessibleHyperlinkInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleHyperlinkInterface(h unsafe.Pointer) *QAccessibleHyperlinkInterface { - return newQAccessibleHyperlinkInterface((*C.QAccessibleHyperlinkInterface)(h)) + if h == nil { + return nil + } + + return &QAccessibleHyperlinkInterface{h: (*C.QAccessibleHyperlinkInterface)(h)} } func (this *QAccessibleHyperlinkInterface) Anchor() string { @@ -1090,7 +1129,7 @@ func (this *QAccessibleHyperlinkInterface) OperatorAssign(param1 *QAccessibleHyp // Delete this object from C++ memory. func (this *QAccessibleHyperlinkInterface) Delete() { - C.QAccessibleHyperlinkInterface_Delete(this.h) + C.QAccessibleHyperlinkInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1103,7 +1142,8 @@ func (this *QAccessibleHyperlinkInterface) GoGC() { } type QAccessibleEvent struct { - h *C.QAccessibleEvent + h *C.QAccessibleEvent + isSubclass bool } func (this *QAccessibleEvent) cPointer() *C.QAccessibleEvent { @@ -1120,6 +1160,7 @@ func (this *QAccessibleEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleEvent constructs the type using only CGO pointers. func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent { if h == nil { return nil @@ -1127,20 +1168,33 @@ func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent { return &QAccessibleEvent{h: h} } +// UnsafeNewQAccessibleEvent constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEvent(h unsafe.Pointer) *QAccessibleEvent { - return newQAccessibleEvent((*C.QAccessibleEvent)(h)) + if h == nil { + return nil + } + + return &QAccessibleEvent{h: (*C.QAccessibleEvent)(h)} } // NewQAccessibleEvent constructs a new QAccessibleEvent object. func NewQAccessibleEvent(obj *QObject, typ QAccessible__Event) *QAccessibleEvent { - ret := C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ)) - return newQAccessibleEvent(ret) + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) + ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleEvent2 constructs a new QAccessibleEvent object. func NewQAccessibleEvent2(iface *QAccessibleInterface, typ QAccessible__Event) *QAccessibleEvent { - ret := C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ)) - return newQAccessibleEvent(ret) + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) + ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleEvent) Type() QAccessible__Event { @@ -1167,9 +1221,30 @@ func (this *QAccessibleEvent) AccessibleInterface() *QAccessibleInterface { return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleEvent_AccessibleInterface(this.h))) } +func (this *QAccessibleEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleEvent_AccessibleInterface(self *C.QAccessibleEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleEvent) Delete() { - C.QAccessibleEvent_Delete(this.h) + C.QAccessibleEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1182,7 +1257,8 @@ func (this *QAccessibleEvent) GoGC() { } type QAccessibleStateChangeEvent struct { - h *C.QAccessibleStateChangeEvent + h *C.QAccessibleStateChangeEvent + isSubclass bool *QAccessibleEvent } @@ -1200,27 +1276,45 @@ func (this *QAccessibleStateChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent) *QAccessibleStateChangeEvent { +// newQAccessibleStateChangeEvent constructs the type using only CGO pointers. +func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleStateChangeEvent { if h == nil { return nil } - return &QAccessibleStateChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleStateChangeEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer) *QAccessibleStateChangeEvent { - return newQAccessibleStateChangeEvent((*C.QAccessibleStateChangeEvent)(h)) +// UnsafeNewQAccessibleStateChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleStateChangeEvent { + if h == nil { + return nil + } + + return &QAccessibleStateChangeEvent{h: (*C.QAccessibleStateChangeEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleStateChangeEvent constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent(obj *QObject, state QAccessible__State) *QAccessibleStateChangeEvent { - ret := C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer()) - return newQAccessibleStateChangeEvent(ret) + var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleStateChangeEvent2 constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent2(iface *QAccessibleInterface, state QAccessible__State) *QAccessibleStateChangeEvent { - ret := C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer()) - return newQAccessibleStateChangeEvent(ret) + var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleStateChangeEvent) ChangedStates() *QAccessible__State { @@ -1230,9 +1324,30 @@ func (this *QAccessibleStateChangeEvent) ChangedStates() *QAccessible__State { return _goptr } +func (this *QAccessibleStateChangeEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleStateChangeEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleStateChangeEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleStateChangeEvent_AccessibleInterface(self *C.QAccessibleStateChangeEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleStateChangeEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleStateChangeEvent) Delete() { - C.QAccessibleStateChangeEvent_Delete(this.h) + C.QAccessibleStateChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1245,7 +1360,8 @@ func (this *QAccessibleStateChangeEvent) GoGC() { } type QAccessibleTextCursorEvent struct { - h *C.QAccessibleTextCursorEvent + h *C.QAccessibleTextCursorEvent + isSubclass bool *QAccessibleEvent } @@ -1263,27 +1379,45 @@ func (this *QAccessibleTextCursorEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent) *QAccessibleTextCursorEvent { +// newQAccessibleTextCursorEvent constructs the type using only CGO pointers. +func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextCursorEvent { if h == nil { return nil } - return &QAccessibleTextCursorEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleTextCursorEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer) *QAccessibleTextCursorEvent { - return newQAccessibleTextCursorEvent((*C.QAccessibleTextCursorEvent)(h)) +// UnsafeNewQAccessibleTextCursorEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextCursorEvent { + if h == nil { + return nil + } + + return &QAccessibleTextCursorEvent{h: (*C.QAccessibleTextCursorEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleTextCursorEvent constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent(obj *QObject, cursorPos int) *QAccessibleTextCursorEvent { - ret := C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos)) - return newQAccessibleTextCursorEvent(ret) + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextCursorEvent2 constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent2(iface *QAccessibleInterface, cursorPos int) *QAccessibleTextCursorEvent { - ret := C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos)) - return newQAccessibleTextCursorEvent(ret) + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextCursorEvent) SetCursorPosition(position int) { @@ -1294,9 +1428,30 @@ func (this *QAccessibleTextCursorEvent) CursorPosition() int { return (int)(C.QAccessibleTextCursorEvent_CursorPosition(this.h)) } +func (this *QAccessibleTextCursorEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleTextCursorEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleTextCursorEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleTextCursorEvent_AccessibleInterface(self *C.QAccessibleTextCursorEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleTextCursorEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleTextCursorEvent) Delete() { - C.QAccessibleTextCursorEvent_Delete(this.h) + C.QAccessibleTextCursorEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1309,7 +1464,8 @@ func (this *QAccessibleTextCursorEvent) GoGC() { } type QAccessibleTextSelectionEvent struct { - h *C.QAccessibleTextSelectionEvent + h *C.QAccessibleTextSelectionEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1327,27 +1483,47 @@ func (this *QAccessibleTextSelectionEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent) *QAccessibleTextSelectionEvent { +// newQAccessibleTextSelectionEvent constructs the type using only CGO pointers. +func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextSelectionEvent { if h == nil { return nil } - return &QAccessibleTextSelectionEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextSelectionEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer) *QAccessibleTextSelectionEvent { - return newQAccessibleTextSelectionEvent((*C.QAccessibleTextSelectionEvent)(h)) +// UnsafeNewQAccessibleTextSelectionEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextSelectionEvent { + if h == nil { + return nil + } + + return &QAccessibleTextSelectionEvent{h: (*C.QAccessibleTextSelectionEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextSelectionEvent constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent(obj *QObject, start int, end int) *QAccessibleTextSelectionEvent { - ret := C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end)) - return newQAccessibleTextSelectionEvent(ret) + var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextSelectionEvent2 constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent2(iface *QAccessibleInterface, start int, end int) *QAccessibleTextSelectionEvent { - ret := C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end)) - return newQAccessibleTextSelectionEvent(ret) + var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextSelectionEvent) SetSelection(start int, end int) { @@ -1364,7 +1540,7 @@ func (this *QAccessibleTextSelectionEvent) SelectionEnd() int { // Delete this object from C++ memory. func (this *QAccessibleTextSelectionEvent) Delete() { - C.QAccessibleTextSelectionEvent_Delete(this.h) + C.QAccessibleTextSelectionEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1377,7 +1553,8 @@ func (this *QAccessibleTextSelectionEvent) GoGC() { } type QAccessibleTextInsertEvent struct { - h *C.QAccessibleTextInsertEvent + h *C.QAccessibleTextInsertEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1395,15 +1572,23 @@ func (this *QAccessibleTextInsertEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent) *QAccessibleTextInsertEvent { +// newQAccessibleTextInsertEvent constructs the type using only CGO pointers. +func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextInsertEvent { if h == nil { return nil } - return &QAccessibleTextInsertEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextInsertEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer) *QAccessibleTextInsertEvent { - return newQAccessibleTextInsertEvent((*C.QAccessibleTextInsertEvent)(h)) +// UnsafeNewQAccessibleTextInsertEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextInsertEvent { + if h == nil { + return nil + } + + return &QAccessibleTextInsertEvent{h: (*C.QAccessibleTextInsertEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextInsertEvent constructs a new QAccessibleTextInsertEvent object. @@ -1412,8 +1597,14 @@ func NewQAccessibleTextInsertEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextInsertEvent(ret) + var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextInsertEvent2 constructs a new QAccessibleTextInsertEvent object. @@ -1422,8 +1613,14 @@ func NewQAccessibleTextInsertEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextInsertEvent(ret) + var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextInsertEvent) TextInserted() string { @@ -1439,7 +1636,7 @@ func (this *QAccessibleTextInsertEvent) ChangePosition() int { // Delete this object from C++ memory. func (this *QAccessibleTextInsertEvent) Delete() { - C.QAccessibleTextInsertEvent_Delete(this.h) + C.QAccessibleTextInsertEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1452,7 +1649,8 @@ func (this *QAccessibleTextInsertEvent) GoGC() { } type QAccessibleTextRemoveEvent struct { - h *C.QAccessibleTextRemoveEvent + h *C.QAccessibleTextRemoveEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1470,15 +1668,23 @@ func (this *QAccessibleTextRemoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent) *QAccessibleTextRemoveEvent { +// newQAccessibleTextRemoveEvent constructs the type using only CGO pointers. +func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextRemoveEvent { if h == nil { return nil } - return &QAccessibleTextRemoveEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextRemoveEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer) *QAccessibleTextRemoveEvent { - return newQAccessibleTextRemoveEvent((*C.QAccessibleTextRemoveEvent)(h)) +// UnsafeNewQAccessibleTextRemoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextRemoveEvent { + if h == nil { + return nil + } + + return &QAccessibleTextRemoveEvent{h: (*C.QAccessibleTextRemoveEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextRemoveEvent constructs a new QAccessibleTextRemoveEvent object. @@ -1487,8 +1693,14 @@ func NewQAccessibleTextRemoveEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextRemoveEvent(ret) + var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextRemoveEvent2 constructs a new QAccessibleTextRemoveEvent object. @@ -1497,8 +1709,14 @@ func NewQAccessibleTextRemoveEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms) - return newQAccessibleTextRemoveEvent(ret) + var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextRemoveEvent) TextRemoved() string { @@ -1514,7 +1732,7 @@ func (this *QAccessibleTextRemoveEvent) ChangePosition() int { // Delete this object from C++ memory. func (this *QAccessibleTextRemoveEvent) Delete() { - C.QAccessibleTextRemoveEvent_Delete(this.h) + C.QAccessibleTextRemoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1527,7 +1745,8 @@ func (this *QAccessibleTextRemoveEvent) GoGC() { } type QAccessibleTextUpdateEvent struct { - h *C.QAccessibleTextUpdateEvent + h *C.QAccessibleTextUpdateEvent + isSubclass bool *QAccessibleTextCursorEvent } @@ -1545,15 +1764,23 @@ func (this *QAccessibleTextUpdateEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent) *QAccessibleTextUpdateEvent { +// newQAccessibleTextUpdateEvent constructs the type using only CGO pointers. +func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextUpdateEvent { if h == nil { return nil } - return &QAccessibleTextUpdateEvent{h: h, QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(unsafe.Pointer(h))} + return &QAccessibleTextUpdateEvent{h: h, + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer) *QAccessibleTextUpdateEvent { - return newQAccessibleTextUpdateEvent((*C.QAccessibleTextUpdateEvent)(h)) +// UnsafeNewQAccessibleTextUpdateEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextUpdateEvent { + if h == nil { + return nil + } + + return &QAccessibleTextUpdateEvent{h: (*C.QAccessibleTextUpdateEvent)(h), + QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} } // NewQAccessibleTextUpdateEvent constructs a new QAccessibleTextUpdateEvent object. @@ -1566,8 +1793,14 @@ func NewQAccessibleTextUpdateEvent(obj *QObject, position int, oldText string, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms) - return newQAccessibleTextUpdateEvent(ret) + var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTextUpdateEvent2 constructs a new QAccessibleTextUpdateEvent object. @@ -1580,8 +1813,14 @@ func NewQAccessibleTextUpdateEvent2(iface *QAccessibleInterface, position int, o text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms) - return newQAccessibleTextUpdateEvent(ret) + var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTextUpdateEvent) TextRemoved() string { @@ -1604,7 +1843,7 @@ func (this *QAccessibleTextUpdateEvent) ChangePosition() int { // Delete this object from C++ memory. func (this *QAccessibleTextUpdateEvent) Delete() { - C.QAccessibleTextUpdateEvent_Delete(this.h) + C.QAccessibleTextUpdateEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1617,7 +1856,8 @@ func (this *QAccessibleTextUpdateEvent) GoGC() { } type QAccessibleValueChangeEvent struct { - h *C.QAccessibleValueChangeEvent + h *C.QAccessibleValueChangeEvent + isSubclass bool *QAccessibleEvent } @@ -1635,27 +1875,45 @@ func (this *QAccessibleValueChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent) *QAccessibleValueChangeEvent { +// newQAccessibleValueChangeEvent constructs the type using only CGO pointers. +func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleValueChangeEvent { if h == nil { return nil } - return &QAccessibleValueChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleValueChangeEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer) *QAccessibleValueChangeEvent { - return newQAccessibleValueChangeEvent((*C.QAccessibleValueChangeEvent)(h)) +// UnsafeNewQAccessibleValueChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleValueChangeEvent { + if h == nil { + return nil + } + + return &QAccessibleValueChangeEvent{h: (*C.QAccessibleValueChangeEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleValueChangeEvent constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent(obj *QObject, val *QVariant) *QAccessibleValueChangeEvent { - ret := C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer()) - return newQAccessibleValueChangeEvent(ret) + var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleValueChangeEvent2 constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent2(iface *QAccessibleInterface, val *QVariant) *QAccessibleValueChangeEvent { - ret := C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer()) - return newQAccessibleValueChangeEvent(ret) + var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleValueChangeEvent) SetValue(val *QVariant) { @@ -1669,9 +1927,30 @@ func (this *QAccessibleValueChangeEvent) Value() *QVariant { return _goptr } +func (this *QAccessibleValueChangeEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleValueChangeEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleValueChangeEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleValueChangeEvent_AccessibleInterface(self *C.QAccessibleValueChangeEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleValueChangeEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleValueChangeEvent) Delete() { - C.QAccessibleValueChangeEvent_Delete(this.h) + C.QAccessibleValueChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1684,7 +1963,8 @@ func (this *QAccessibleValueChangeEvent) GoGC() { } type QAccessibleTableModelChangeEvent struct { - h *C.QAccessibleTableModelChangeEvent + h *C.QAccessibleTableModelChangeEvent + isSubclass bool *QAccessibleEvent } @@ -1702,27 +1982,45 @@ func (this *QAccessibleTableModelChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent) *QAccessibleTableModelChangeEvent { +// newQAccessibleTableModelChangeEvent constructs the type using only CGO pointers. +func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTableModelChangeEvent { if h == nil { return nil } - return &QAccessibleTableModelChangeEvent{h: h, QAccessibleEvent: UnsafeNewQAccessibleEvent(unsafe.Pointer(h))} + return &QAccessibleTableModelChangeEvent{h: h, + QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} } -func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer) *QAccessibleTableModelChangeEvent { - return newQAccessibleTableModelChangeEvent((*C.QAccessibleTableModelChangeEvent)(h)) +// UnsafeNewQAccessibleTableModelChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTableModelChangeEvent { + if h == nil { + return nil + } + + return &QAccessibleTableModelChangeEvent{h: (*C.QAccessibleTableModelChangeEvent)(h), + QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} } // NewQAccessibleTableModelChangeEvent constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent(obj *QObject, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - ret := C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType)) - return newQAccessibleTableModelChangeEvent(ret) + var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } // NewQAccessibleTableModelChangeEvent2 constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent2(iface *QAccessibleInterface, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - ret := C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType)) - return newQAccessibleTableModelChangeEvent(ret) + var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + + C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret.isSubclass = true + return ret } func (this *QAccessibleTableModelChangeEvent) SetModelChangeType(changeType QAccessibleTableModelChangeEvent__ModelChangeType) { @@ -1765,9 +2063,30 @@ func (this *QAccessibleTableModelChangeEvent) LastColumn() int { return (int)(C.QAccessibleTableModelChangeEvent_LastColumn(this.h)) } +func (this *QAccessibleTableModelChangeEvent) callVirtualBase_AccessibleInterface() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleTableModelChangeEvent) OnAccessibleInterface(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleTableModelChangeEvent_AccessibleInterface +func miqt_exec_callback_QAccessibleTableModelChangeEvent_AccessibleInterface(self *C.QAccessibleTableModelChangeEvent, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleTableModelChangeEvent{h: self}).callVirtualBase_AccessibleInterface) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleTableModelChangeEvent) Delete() { - C.QAccessibleTableModelChangeEvent_Delete(this.h) + C.QAccessibleTableModelChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qaccessible.h b/qt6/gen_qaccessible.h index 0a6b3687..c90738d9 100644 --- a/qt6/gen_qaccessible.h +++ b/qt6/gen_qaccessible.h @@ -77,7 +77,7 @@ typedef struct QWindow QWindow; bool QAccessibleInterface_IsValid(const QAccessibleInterface* self); QObject* QAccessibleInterface_Object(const QAccessibleInterface* self); QWindow* QAccessibleInterface_Window(const QAccessibleInterface* self); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations(const QAccessibleInterface* self, int match); QAccessibleInterface* QAccessibleInterface_FocusChild(const QAccessibleInterface* self); QAccessibleInterface* QAccessibleInterface_ChildAt(const QAccessibleInterface* self, int x, int y); QAccessibleInterface* QAccessibleInterface_Parent(const QAccessibleInterface* self); @@ -101,7 +101,6 @@ QAccessibleTableCellInterface* QAccessibleInterface_TableCellInterface(QAccessib QAccessibleHyperlinkInterface* QAccessibleInterface_HyperlinkInterface(QAccessibleInterface* self); void QAccessibleInterface_VirtualHook(QAccessibleInterface* self, int id, void* data); void* QAccessibleInterface_InterfaceCast(QAccessibleInterface* self, int param1); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleInterface_Relations1(const QAccessibleInterface* self, int match); void QAccessibleTextInterface_Selection(const QAccessibleTextInterface* self, int selectionIndex, int* startOffset, int* endOffset); int QAccessibleTextInterface_SelectionCount(const QAccessibleTextInterface* self); @@ -120,13 +119,13 @@ int QAccessibleTextInterface_OffsetAtPoint(const QAccessibleTextInterface* self, void QAccessibleTextInterface_ScrollToSubstring(QAccessibleTextInterface* self, int startIndex, int endIndex); struct miqt_string QAccessibleTextInterface_Attributes(const QAccessibleTextInterface* self, int offset, int* startOffset, int* endOffset); void QAccessibleTextInterface_OperatorAssign(QAccessibleTextInterface* self, QAccessibleTextInterface* param1); -void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self); +void QAccessibleTextInterface_Delete(QAccessibleTextInterface* self, bool isSubclass); void QAccessibleEditableTextInterface_DeleteText(QAccessibleEditableTextInterface* self, int startOffset, int endOffset); void QAccessibleEditableTextInterface_InsertText(QAccessibleEditableTextInterface* self, int offset, struct miqt_string text); void QAccessibleEditableTextInterface_ReplaceText(QAccessibleEditableTextInterface* self, int startOffset, int endOffset, struct miqt_string text); void QAccessibleEditableTextInterface_OperatorAssign(QAccessibleEditableTextInterface* self, QAccessibleEditableTextInterface* param1); -void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self); +void QAccessibleEditableTextInterface_Delete(QAccessibleEditableTextInterface* self, bool isSubclass); QVariant* QAccessibleValueInterface_CurrentValue(const QAccessibleValueInterface* self); void QAccessibleValueInterface_SetCurrentValue(QAccessibleValueInterface* self, QVariant* value); @@ -134,7 +133,7 @@ QVariant* QAccessibleValueInterface_MaximumValue(const QAccessibleValueInterface QVariant* QAccessibleValueInterface_MinimumValue(const QAccessibleValueInterface* self); QVariant* QAccessibleValueInterface_MinimumStepSize(const QAccessibleValueInterface* self); void QAccessibleValueInterface_OperatorAssign(QAccessibleValueInterface* self, QAccessibleValueInterface* param1); -void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self); +void QAccessibleValueInterface_Delete(QAccessibleValueInterface* self, bool isSubclass); bool QAccessibleTableCellInterface_IsSelected(const QAccessibleTableCellInterface* self); struct miqt_array /* of QAccessibleInterface* */ QAccessibleTableCellInterface_ColumnHeaderCells(const QAccessibleTableCellInterface* self); @@ -145,7 +144,7 @@ int QAccessibleTableCellInterface_ColumnExtent(const QAccessibleTableCellInterfa int QAccessibleTableCellInterface_RowExtent(const QAccessibleTableCellInterface* self); QAccessibleInterface* QAccessibleTableCellInterface_Table(const QAccessibleTableCellInterface* self); void QAccessibleTableCellInterface_OperatorAssign(QAccessibleTableCellInterface* self, QAccessibleTableCellInterface* param1); -void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self); +void QAccessibleTableCellInterface_Delete(QAccessibleTableCellInterface* self, bool isSubclass); QAccessibleInterface* QAccessibleTableInterface_Caption(const QAccessibleTableInterface* self); QAccessibleInterface* QAccessibleTableInterface_Summary(const QAccessibleTableInterface* self); @@ -167,7 +166,7 @@ bool QAccessibleTableInterface_SelectColumn(QAccessibleTableInterface* self, int bool QAccessibleTableInterface_UnselectRow(QAccessibleTableInterface* self, int row); bool QAccessibleTableInterface_UnselectColumn(QAccessibleTableInterface* self, int column); void QAccessibleTableInterface_ModelChange(QAccessibleTableInterface* self, QAccessibleTableModelChangeEvent* event); -void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self); +void QAccessibleTableInterface_Delete(QAccessibleTableInterface* self, bool isSubclass); struct miqt_string QAccessibleActionInterface_Tr(const char* sourceText); struct miqt_array /* of struct miqt_string */ QAccessibleActionInterface_ActionNames(const QAccessibleActionInterface* self); @@ -190,13 +189,13 @@ struct miqt_string QAccessibleActionInterface_PreviousPageAction(); void QAccessibleActionInterface_OperatorAssign(QAccessibleActionInterface* self, QAccessibleActionInterface* param1); struct miqt_string QAccessibleActionInterface_Tr2(const char* sourceText, const char* disambiguation); struct miqt_string QAccessibleActionInterface_Tr3(const char* sourceText, const char* disambiguation, int n); -void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self); +void QAccessibleActionInterface_Delete(QAccessibleActionInterface* self, bool isSubclass); struct miqt_string QAccessibleImageInterface_ImageDescription(const QAccessibleImageInterface* self); QSize* QAccessibleImageInterface_ImageSize(const QAccessibleImageInterface* self); QPoint* QAccessibleImageInterface_ImagePosition(const QAccessibleImageInterface* self); void QAccessibleImageInterface_OperatorAssign(QAccessibleImageInterface* self, QAccessibleImageInterface* param1); -void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self); +void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self, bool isSubclass); struct miqt_string QAccessibleHyperlinkInterface_Anchor(const QAccessibleHyperlinkInterface* self); struct miqt_string QAccessibleHyperlinkInterface_AnchorTarget(const QAccessibleHyperlinkInterface* self); @@ -204,63 +203,71 @@ int QAccessibleHyperlinkInterface_StartIndex(const QAccessibleHyperlinkInterface int QAccessibleHyperlinkInterface_EndIndex(const QAccessibleHyperlinkInterface* self); bool QAccessibleHyperlinkInterface_IsValid(const QAccessibleHyperlinkInterface* self); void QAccessibleHyperlinkInterface_OperatorAssign(QAccessibleHyperlinkInterface* self, QAccessibleHyperlinkInterface* param1); -void QAccessibleHyperlinkInterface_Delete(QAccessibleHyperlinkInterface* self); +void QAccessibleHyperlinkInterface_Delete(QAccessibleHyperlinkInterface* self, bool isSubclass); -QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ); -QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ); +void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent); int QAccessibleEvent_Type(const QAccessibleEvent* self); QObject* QAccessibleEvent_Object(const QAccessibleEvent* self); unsigned int QAccessibleEvent_UniqueId(const QAccessibleEvent* self); void QAccessibleEvent_SetChild(QAccessibleEvent* self, int chld); int QAccessibleEvent_Child(const QAccessibleEvent* self); QAccessibleInterface* QAccessibleEvent_AccessibleInterface(const QAccessibleEvent* self); -void QAccessibleEvent_Delete(QAccessibleEvent* self); +void QAccessibleEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleEvent_Delete(QAccessibleEvent* self, bool isSubclass); -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state); -QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state); +void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self); -void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self); +void QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self, bool isSubclass); -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos); -QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos); +void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position); int QAccessibleTextCursorEvent_CursorPosition(const QAccessibleTextCursorEvent* self); -void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self); +void QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool isSubclass); -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end); -QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end); +void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end); int QAccessibleTextSelectionEvent_SelectionStart(const QAccessibleTextSelectionEvent* self); int QAccessibleTextSelectionEvent_SelectionEnd(const QAccessibleTextSelectionEvent* self); -void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self); +void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, bool isSubclass); -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text); -QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self); int QAccessibleTextInsertEvent_ChangePosition(const QAccessibleTextInsertEvent* self); -void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self); +void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool isSubclass); -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text); -QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self); int QAccessibleTextRemoveEvent_ChangePosition(const QAccessibleTextRemoveEvent* self); -void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self); +void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool isSubclass); -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text); -QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text); +void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self); struct miqt_string QAccessibleTextUpdateEvent_TextInserted(const QAccessibleTextUpdateEvent* self); int QAccessibleTextUpdateEvent_ChangePosition(const QAccessibleTextUpdateEvent* self); -void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self); +void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self, bool isSubclass); -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val); -QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val); +void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val); QVariant* QAccessibleValueChangeEvent_Value(const QAccessibleValueChangeEvent* self); -void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self); +void QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self, bool isSubclass); -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType); -QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType); +void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType); int QAccessibleTableModelChangeEvent_ModelChangeType(const QAccessibleTableModelChangeEvent* self); void QAccessibleTableModelChangeEvent_SetFirstRow(QAccessibleTableModelChangeEvent* self, int row); @@ -271,7 +278,9 @@ int QAccessibleTableModelChangeEvent_FirstRow(const QAccessibleTableModelChangeE int QAccessibleTableModelChangeEvent_FirstColumn(const QAccessibleTableModelChangeEvent* self); int QAccessibleTableModelChangeEvent_LastRow(const QAccessibleTableModelChangeEvent* self); int QAccessibleTableModelChangeEvent_LastColumn(const QAccessibleTableModelChangeEvent* self); -void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self); +void QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(const void* self); +void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaccessible_base.cpp b/qt6/gen_qaccessible_base.cpp index 80f4836b..f39c2ca3 100644 --- a/qt6/gen_qaccessible_base.cpp +++ b/qt6/gen_qaccessible_base.cpp @@ -73,16 +73,25 @@ struct miqt_map /* tuple of int and int */ QAccessible_QAccessibleTextBoundaryH return _out; } -void QAccessible_Delete(QAccessible* self) { - delete self; +void QAccessible_Delete(QAccessible* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAccessible__State* QAccessible__State_new() { - return new QAccessible::State(); +void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State) { + QAccessible::State* ret = new QAccessible::State(); + *outptr_QAccessible__State = ret; } -void QAccessible__State_Delete(QAccessible__State* self) { - delete self; +void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void QAccessible__ActivationObserver_AccessibilityActiveChanged(QAccessible__ActivationObserver* self, bool active) { @@ -93,7 +102,11 @@ void QAccessible__ActivationObserver_OperatorAssign(QAccessible__ActivationObser self->operator=(*param1); } -void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self) { - delete self; +void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qaccessible_base.go b/qt6/gen_qaccessible_base.go index 019245a1..17f034fc 100644 --- a/qt6/gen_qaccessible_base.go +++ b/qt6/gen_qaccessible_base.go @@ -216,7 +216,8 @@ const ( ) type QAccessible struct { - h *C.QAccessible + h *C.QAccessible + isSubclass bool } func (this *QAccessible) cPointer() *C.QAccessible { @@ -233,6 +234,7 @@ func (this *QAccessible) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessible constructs the type using only CGO pointers. func newQAccessible(h *C.QAccessible) *QAccessible { if h == nil { return nil @@ -240,8 +242,13 @@ func newQAccessible(h *C.QAccessible) *QAccessible { return &QAccessible{h: h} } +// UnsafeNewQAccessible constructs the type using only unsafe pointers. func UnsafeNewQAccessible(h unsafe.Pointer) *QAccessible { - return newQAccessible((*C.QAccessible)(h)) + if h == nil { + return nil + } + + return &QAccessible{h: (*C.QAccessible)(h)} } func QAccessible_InstallActivationObserver(param1 *QAccessible__ActivationObserver) { @@ -311,7 +318,7 @@ func QAccessible_QAccessibleTextBoundaryHelper(cursor *QTextCursor, boundaryType // Delete this object from C++ memory. func (this *QAccessible) Delete() { - C.QAccessible_Delete(this.h) + C.QAccessible_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -324,7 +331,8 @@ func (this *QAccessible) GoGC() { } type QAccessible__State struct { - h *C.QAccessible__State + h *C.QAccessible__State + isSubclass bool } func (this *QAccessible__State) cPointer() *C.QAccessible__State { @@ -341,6 +349,7 @@ func (this *QAccessible__State) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessible__State constructs the type using only CGO pointers. func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State { if h == nil { return nil @@ -348,19 +357,28 @@ func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State { return &QAccessible__State{h: h} } +// UnsafeNewQAccessible__State constructs the type using only unsafe pointers. func UnsafeNewQAccessible__State(h unsafe.Pointer) *QAccessible__State { - return newQAccessible__State((*C.QAccessible__State)(h)) + if h == nil { + return nil + } + + return &QAccessible__State{h: (*C.QAccessible__State)(h)} } // NewQAccessible__State constructs a new QAccessible::State object. func NewQAccessible__State() *QAccessible__State { - ret := C.QAccessible__State_new() - return newQAccessible__State(ret) + var outptr_QAccessible__State *C.QAccessible__State = nil + + C.QAccessible__State_new(&outptr_QAccessible__State) + ret := newQAccessible__State(outptr_QAccessible__State) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QAccessible__State) Delete() { - C.QAccessible__State_Delete(this.h) + C.QAccessible__State_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -373,7 +391,8 @@ func (this *QAccessible__State) GoGC() { } type QAccessible__ActivationObserver struct { - h *C.QAccessible__ActivationObserver + h *C.QAccessible__ActivationObserver + isSubclass bool } func (this *QAccessible__ActivationObserver) cPointer() *C.QAccessible__ActivationObserver { @@ -390,6 +409,7 @@ func (this *QAccessible__ActivationObserver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessible__ActivationObserver constructs the type using only CGO pointers. func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *QAccessible__ActivationObserver { if h == nil { return nil @@ -397,8 +417,13 @@ func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *Q return &QAccessible__ActivationObserver{h: h} } +// UnsafeNewQAccessible__ActivationObserver constructs the type using only unsafe pointers. func UnsafeNewQAccessible__ActivationObserver(h unsafe.Pointer) *QAccessible__ActivationObserver { - return newQAccessible__ActivationObserver((*C.QAccessible__ActivationObserver)(h)) + if h == nil { + return nil + } + + return &QAccessible__ActivationObserver{h: (*C.QAccessible__ActivationObserver)(h)} } func (this *QAccessible__ActivationObserver) AccessibilityActiveChanged(active bool) { @@ -411,7 +436,7 @@ func (this *QAccessible__ActivationObserver) OperatorAssign(param1 *QAccessible_ // Delete this object from C++ memory. func (this *QAccessible__ActivationObserver) Delete() { - C.QAccessible__ActivationObserver_Delete(this.h) + C.QAccessible__ActivationObserver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qaccessible_base.h b/qt6/gen_qaccessible_base.h index c38a0962..fd179265 100644 --- a/qt6/gen_qaccessible_base.h +++ b/qt6/gen_qaccessible_base.h @@ -53,14 +53,14 @@ void QAccessible_SetActive(bool active); void QAccessible_SetRootObject(QObject* object); void QAccessible_Cleanup(); struct miqt_map /* tuple of int and int */ QAccessible_QAccessibleTextBoundaryHelper(QTextCursor* cursor, int boundaryType); -void QAccessible_Delete(QAccessible* self); +void QAccessible_Delete(QAccessible* self, bool isSubclass); -QAccessible__State* QAccessible__State_new(); -void QAccessible__State_Delete(QAccessible__State* self); +void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State); +void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass); void QAccessible__ActivationObserver_AccessibilityActiveChanged(QAccessible__ActivationObserver* self, bool active); void QAccessible__ActivationObserver_OperatorAssign(QAccessible__ActivationObserver* self, QAccessible__ActivationObserver* param1); -void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self); +void QAccessible__ActivationObserver_Delete(QAccessible__ActivationObserver* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaccessiblebridge.cpp b/qt6/gen_qaccessiblebridge.cpp index e38379ca..be0cd144 100644 --- a/qt6/gen_qaccessiblebridge.cpp +++ b/qt6/gen_qaccessiblebridge.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -22,8 +23,12 @@ void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge self->operator=(*param1); } -void QAccessibleBridge_Delete(QAccessibleBridge* self) { - delete self; +void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self) { @@ -72,7 +77,11 @@ struct miqt_string QAccessibleBridgePlugin_Tr3(const char* s, const char* c, int return _ms; } -void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self) { - delete self; +void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qaccessiblebridge.go b/qt6/gen_qaccessiblebridge.go index 89097bcd..829d6d10 100644 --- a/qt6/gen_qaccessiblebridge.go +++ b/qt6/gen_qaccessiblebridge.go @@ -14,7 +14,8 @@ import ( ) type QAccessibleBridge struct { - h *C.QAccessibleBridge + h *C.QAccessibleBridge + isSubclass bool } func (this *QAccessibleBridge) cPointer() *C.QAccessibleBridge { @@ -31,6 +32,7 @@ func (this *QAccessibleBridge) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAccessibleBridge constructs the type using only CGO pointers. func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge { if h == nil { return nil @@ -38,8 +40,13 @@ func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge { return &QAccessibleBridge{h: h} } +// UnsafeNewQAccessibleBridge constructs the type using only unsafe pointers. func UnsafeNewQAccessibleBridge(h unsafe.Pointer) *QAccessibleBridge { - return newQAccessibleBridge((*C.QAccessibleBridge)(h)) + if h == nil { + return nil + } + + return &QAccessibleBridge{h: (*C.QAccessibleBridge)(h)} } func (this *QAccessibleBridge) SetRootObject(rootObject *QAccessibleInterface) { @@ -56,7 +63,7 @@ func (this *QAccessibleBridge) OperatorAssign(param1 *QAccessibleBridge) { // Delete this object from C++ memory. func (this *QAccessibleBridge) Delete() { - C.QAccessibleBridge_Delete(this.h) + C.QAccessibleBridge_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -69,7 +76,8 @@ func (this *QAccessibleBridge) GoGC() { } type QAccessibleBridgePlugin struct { - h *C.QAccessibleBridgePlugin + h *C.QAccessibleBridgePlugin + isSubclass bool *QObject } @@ -87,15 +95,23 @@ func (this *QAccessibleBridgePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin) *QAccessibleBridgePlugin { +// newQAccessibleBridgePlugin constructs the type using only CGO pointers. +func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin, h_QObject *C.QObject) *QAccessibleBridgePlugin { if h == nil { return nil } - return &QAccessibleBridgePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAccessibleBridgePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer) *QAccessibleBridgePlugin { - return newQAccessibleBridgePlugin((*C.QAccessibleBridgePlugin)(h)) +// UnsafeNewQAccessibleBridgePlugin constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessibleBridgePlugin { + if h == nil { + return nil + } + + return &QAccessibleBridgePlugin{h: (*C.QAccessibleBridgePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAccessibleBridgePlugin) MetaObject() *QMetaObject { @@ -149,7 +165,7 @@ func QAccessibleBridgePlugin_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAccessibleBridgePlugin) Delete() { - C.QAccessibleBridgePlugin_Delete(this.h) + C.QAccessibleBridgePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qaccessiblebridge.h b/qt6/gen_qaccessiblebridge.h index b0956113..ecb1af41 100644 --- a/qt6/gen_qaccessiblebridge.h +++ b/qt6/gen_qaccessiblebridge.h @@ -20,18 +20,20 @@ class QAccessibleBridgePlugin; class QAccessibleEvent; class QAccessibleInterface; class QMetaObject; +class QObject; #else typedef struct QAccessibleBridge QAccessibleBridge; typedef struct QAccessibleBridgePlugin QAccessibleBridgePlugin; typedef struct QAccessibleEvent QAccessibleEvent; typedef struct QAccessibleInterface QAccessibleInterface; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif void QAccessibleBridge_SetRootObject(QAccessibleBridge* self, QAccessibleInterface* rootObject); void QAccessibleBridge_NotifyAccessibilityUpdate(QAccessibleBridge* self, QAccessibleEvent* event); void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge* param1); -void QAccessibleBridge_Delete(QAccessibleBridge* self); +void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass); QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self); void* QAccessibleBridgePlugin_Metacast(QAccessibleBridgePlugin* self, const char* param1); @@ -39,7 +41,7 @@ struct miqt_string QAccessibleBridgePlugin_Tr(const char* s); QAccessibleBridge* QAccessibleBridgePlugin_Create(QAccessibleBridgePlugin* self, struct miqt_string key); struct miqt_string QAccessibleBridgePlugin_Tr2(const char* s, const char* c); struct miqt_string QAccessibleBridgePlugin_Tr3(const char* s, const char* c, int n); -void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self); +void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaccessibleobject.cpp b/qt6/gen_qaccessibleobject.cpp index 4b2abecf..b948ed6d 100644 --- a/qt6/gen_qaccessibleobject.cpp +++ b/qt6/gen_qaccessibleobject.cpp @@ -33,8 +33,355 @@ QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, i return self->childAt(static_cast(x), static_cast(y)); } -QAccessibleApplication* QAccessibleApplication_new() { - return new QAccessibleApplication(); +class MiqtVirtualQAccessibleApplication : public virtual QAccessibleApplication { +public: + + MiqtVirtualQAccessibleApplication(): QAccessibleApplication() {}; + + virtual ~MiqtVirtualQAccessibleApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Window = 0; + + // Subclass to allow providing a Go implementation + virtual QWindow* window() const override { + if (handle__Window == 0) { + return QAccessibleApplication::window(); + } + + + QWindow* callback_return_value = miqt_exec_callback_QAccessibleApplication_Window(const_cast(this), handle__Window); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWindow* virtualbase_Window() const { + + return QAccessibleApplication::window(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildCount = 0; + + // Subclass to allow providing a Go implementation + virtual int childCount() const override { + if (handle__ChildCount == 0) { + return QAccessibleApplication::childCount(); + } + + + int callback_return_value = miqt_exec_callback_QAccessibleApplication_ChildCount(const_cast(this), handle__ChildCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ChildCount() const { + + return QAccessibleApplication::childCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOfChild = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOfChild(const QAccessibleInterface* param1) const override { + if (handle__IndexOfChild == 0) { + return QAccessibleApplication::indexOfChild(param1); + } + + QAccessibleInterface* sigval1 = (QAccessibleInterface*) param1; + + int callback_return_value = miqt_exec_callback_QAccessibleApplication_IndexOfChild(const_cast(this), handle__IndexOfChild, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOfChild(QAccessibleInterface* param1) const { + + return QAccessibleApplication::indexOfChild(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusChild = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* focusChild() const override { + if (handle__FocusChild == 0) { + return QAccessibleApplication::focusChild(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_FocusChild(const_cast(this), handle__FocusChild); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_FocusChild() const { + + return QAccessibleApplication::focusChild(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* parent() const override { + if (handle__Parent == 0) { + return QAccessibleApplication::parent(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_Parent(const_cast(this), handle__Parent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_Parent() const { + + return QAccessibleApplication::parent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Child = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* child(int index) const override { + if (handle__Child == 0) { + return QAccessibleApplication::child(index); + } + + int sigval1 = index; + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_Child(const_cast(this), handle__Child, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_Child(int index) const { + + return QAccessibleApplication::child(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Text = 0; + + // Subclass to allow providing a Go implementation + virtual QString text(QAccessible::Text t) const override { + if (handle__Text == 0) { + return QAccessibleApplication::text(t); + } + + QAccessible::Text t_ret = t; + int sigval1 = static_cast(t_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QAccessibleApplication_Text(const_cast(this), handle__Text, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Text(int t) const { + + QString _ret = QAccessibleApplication::text(static_cast(t)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Role = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessible::Role role() const override { + if (handle__Role == 0) { + return QAccessibleApplication::role(); + } + + + int callback_return_value = miqt_exec_callback_QAccessibleApplication_Role(const_cast(this), handle__Role); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Role() const { + + QAccessible::Role _ret = QAccessibleApplication::role(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__State = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessible::State state() const override { + if (handle__State == 0) { + return QAccessibleApplication::state(); + } + + + QAccessible__State* callback_return_value = miqt_exec_callback_QAccessibleApplication_State(const_cast(this), handle__State); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessible__State* virtualbase_State() const { + + return new QAccessible::State(QAccessibleApplication::state()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsValid = 0; + + // Subclass to allow providing a Go implementation + virtual bool isValid() const override { + if (handle__IsValid == 0) { + return QAccessibleApplication::isValid(); + } + + + bool callback_return_value = miqt_exec_callback_QAccessibleApplication_IsValid(const_cast(this), handle__IsValid); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsValid() const { + + return QAccessibleApplication::isValid(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Object = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* object() const override { + if (handle__Object == 0) { + return QAccessibleApplication::object(); + } + + + QObject* callback_return_value = miqt_exec_callback_QAccessibleApplication_Object(const_cast(this), handle__Object); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QObject* virtualbase_Object() const { + + return QAccessibleApplication::object(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Rect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect rect() const override { + if (handle__Rect == 0) { + return QAccessibleApplication::rect(); + } + + + QRect* callback_return_value = miqt_exec_callback_QAccessibleApplication_Rect(const_cast(this), handle__Rect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Rect() const { + + return new QRect(QAccessibleApplication::rect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetText = 0; + + // Subclass to allow providing a Go implementation + virtual void setText(QAccessible::Text t, const QString& text) override { + if (handle__SetText == 0) { + QAccessibleApplication::setText(t, text); + return; + } + + QAccessible::Text t_ret = t; + int sigval1 = static_cast(t_ret); + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval2 = text_ms; + + miqt_exec_callback_QAccessibleApplication_SetText(this, handle__SetText, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetText(int t, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QAccessibleApplication::setText(static_cast(t), text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildAt = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* childAt(int x, int y) const override { + if (handle__ChildAt == 0) { + return QAccessibleApplication::childAt(x, y); + } + + int sigval1 = x; + int sigval2 = y; + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessibleApplication_ChildAt(const_cast(this), handle__ChildAt, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_ChildAt(int x, int y) const { + + return QAccessibleApplication::childAt(static_cast(x), static_cast(y)); + + } + +}; + +void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface) { + MiqtVirtualQAccessibleApplication* ret = new MiqtVirtualQAccessibleApplication(); + *outptr_QAccessibleApplication = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); } QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self) { @@ -81,7 +428,123 @@ QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* s return new QAccessible::State(self->state()); } -void QAccessibleApplication_Delete(QAccessibleApplication* self) { - delete self; +void QAccessibleApplication_override_virtual_Window(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Window = slot; +} + +QWindow* QAccessibleApplication_virtualbase_Window(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Window(); +} + +void QAccessibleApplication_override_virtual_ChildCount(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__ChildCount = slot; +} + +int QAccessibleApplication_virtualbase_ChildCount(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_ChildCount(); +} + +void QAccessibleApplication_override_virtual_IndexOfChild(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__IndexOfChild = slot; +} + +int QAccessibleApplication_virtualbase_IndexOfChild(const void* self, QAccessibleInterface* param1) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_IndexOfChild(param1); +} + +void QAccessibleApplication_override_virtual_FocusChild(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__FocusChild = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_FocusChild(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_FocusChild(); +} + +void QAccessibleApplication_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Parent = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_Parent(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Parent(); +} + +void QAccessibleApplication_override_virtual_Child(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Child = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_Child(const void* self, int index) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Child(index); +} + +void QAccessibleApplication_override_virtual_Text(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Text = slot; +} + +struct miqt_string QAccessibleApplication_virtualbase_Text(const void* self, int t) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Text(t); +} + +void QAccessibleApplication_override_virtual_Role(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Role = slot; +} + +int QAccessibleApplication_virtualbase_Role(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Role(); +} + +void QAccessibleApplication_override_virtual_State(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__State = slot; +} + +QAccessible__State* QAccessibleApplication_virtualbase_State(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_State(); +} + +void QAccessibleApplication_override_virtual_IsValid(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__IsValid = slot; +} + +bool QAccessibleApplication_virtualbase_IsValid(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_IsValid(); +} + +void QAccessibleApplication_override_virtual_Object(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Object = slot; +} + +QObject* QAccessibleApplication_virtualbase_Object(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Object(); +} + +void QAccessibleApplication_override_virtual_Rect(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__Rect = slot; +} + +QRect* QAccessibleApplication_virtualbase_Rect(const void* self) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_Rect(); +} + +void QAccessibleApplication_override_virtual_SetText(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__SetText = slot; +} + +void QAccessibleApplication_virtualbase_SetText(void* self, int t, struct miqt_string text) { + ( (MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_SetText(t, text); +} + +void QAccessibleApplication_override_virtual_ChildAt(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleApplication*)(self) )->handle__ChildAt = slot; +} + +QAccessibleInterface* QAccessibleApplication_virtualbase_ChildAt(const void* self, int x, int y) { + return ( (const MiqtVirtualQAccessibleApplication*)(self) )->virtualbase_ChildAt(x, y); +} + +void QAccessibleApplication_Delete(QAccessibleApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qaccessibleobject.go b/qt6/gen_qaccessibleobject.go index 4937a9d3..43e4a38f 100644 --- a/qt6/gen_qaccessibleobject.go +++ b/qt6/gen_qaccessibleobject.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QAccessibleObject struct { - h *C.QAccessibleObject + h *C.QAccessibleObject + isSubclass bool *QAccessibleInterface } @@ -32,15 +34,23 @@ func (this *QAccessibleObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleObject(h *C.QAccessibleObject) *QAccessibleObject { +// newQAccessibleObject constructs the type using only CGO pointers. +func newQAccessibleObject(h *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleObject { if h == nil { return nil } - return &QAccessibleObject{h: h, QAccessibleInterface: UnsafeNewQAccessibleInterface(unsafe.Pointer(h))} + return &QAccessibleObject{h: h, + QAccessibleInterface: newQAccessibleInterface(h_QAccessibleInterface)} } -func UnsafeNewQAccessibleObject(h unsafe.Pointer) *QAccessibleObject { - return newQAccessibleObject((*C.QAccessibleObject)(h)) +// UnsafeNewQAccessibleObject constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleObject(h unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleObject { + if h == nil { + return nil + } + + return &QAccessibleObject{h: (*C.QAccessibleObject)(h), + QAccessibleInterface: UnsafeNewQAccessibleInterface(h_QAccessibleInterface)} } func (this *QAccessibleObject) IsValid() bool { @@ -71,7 +81,8 @@ func (this *QAccessibleObject) ChildAt(x int, y int) *QAccessibleInterface { } type QAccessibleApplication struct { - h *C.QAccessibleApplication + h *C.QAccessibleApplication + isSubclass bool *QAccessibleObject } @@ -89,25 +100,39 @@ func (this *QAccessibleApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleApplication(h *C.QAccessibleApplication) *QAccessibleApplication { +// newQAccessibleApplication constructs the type using only CGO pointers. +func newQAccessibleApplication(h *C.QAccessibleApplication, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleApplication { if h == nil { return nil } - return &QAccessibleApplication{h: h, QAccessibleObject: UnsafeNewQAccessibleObject(unsafe.Pointer(h))} + return &QAccessibleApplication{h: h, + QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} } -func UnsafeNewQAccessibleApplication(h unsafe.Pointer) *QAccessibleApplication { - return newQAccessibleApplication((*C.QAccessibleApplication)(h)) +// UnsafeNewQAccessibleApplication constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleApplication(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleApplication { + if h == nil { + return nil + } + + return &QAccessibleApplication{h: (*C.QAccessibleApplication)(h), + QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} } // NewQAccessibleApplication constructs a new QAccessibleApplication object. func NewQAccessibleApplication() *QAccessibleApplication { - ret := C.QAccessibleApplication_new() - return newQAccessibleApplication(ret) + var outptr_QAccessibleApplication *C.QAccessibleApplication = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + + C.QAccessibleApplication_new(&outptr_QAccessibleApplication, &outptr_QAccessibleObject, &outptr_QAccessibleInterface) + ret := newQAccessibleApplication(outptr_QAccessibleApplication, outptr_QAccessibleObject, outptr_QAccessibleInterface) + ret.isSubclass = true + return ret } func (this *QAccessibleApplication) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_Window(this.h)), nil, nil) } func (this *QAccessibleApplication) ChildCount() int { @@ -148,9 +173,347 @@ func (this *QAccessibleApplication) State() *QAccessible__State { return _goptr } +func (this *QAccessibleApplication) callVirtualBase_Window() *QWindow { + + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Window(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QAccessibleApplication) OnWindow(slot func(super func() *QWindow) *QWindow) { + C.QAccessibleApplication_override_virtual_Window(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Window +func miqt_exec_callback_QAccessibleApplication_Window(self *C.QAccessibleApplication, cb C.intptr_t) *C.QWindow { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWindow) *QWindow) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Window) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_ChildCount() int { + + return (int)(C.QAccessibleApplication_virtualbase_ChildCount(unsafe.Pointer(this.h))) + +} +func (this *QAccessibleApplication) OnChildCount(slot func(super func() int) int) { + C.QAccessibleApplication_override_virtual_ChildCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_ChildCount +func miqt_exec_callback_QAccessibleApplication_ChildCount(self *C.QAccessibleApplication, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_ChildCount) + + return (C.int)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_IndexOfChild(param1 *QAccessibleInterface) int { + + return (int)(C.QAccessibleApplication_virtualbase_IndexOfChild(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAccessibleApplication) OnIndexOfChild(slot func(super func(param1 *QAccessibleInterface) int, param1 *QAccessibleInterface) int) { + C.QAccessibleApplication_override_virtual_IndexOfChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_IndexOfChild +func miqt_exec_callback_QAccessibleApplication_IndexOfChild(self *C.QAccessibleApplication, cb C.intptr_t, param1 *C.QAccessibleInterface) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QAccessibleInterface) int, param1 *QAccessibleInterface) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAccessibleInterface(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_IndexOfChild, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_FocusChild() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_FocusChild(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleApplication) OnFocusChild(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_FocusChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_FocusChild +func miqt_exec_callback_QAccessibleApplication_FocusChild(self *C.QAccessibleApplication, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_FocusChild) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Parent() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Parent(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleApplication) OnParent(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Parent +func miqt_exec_callback_QAccessibleApplication_Parent(self *C.QAccessibleApplication, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Parent) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Child(index int) *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Child(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QAccessibleApplication) OnChild(slot func(super func(index int) *QAccessibleInterface, index int) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_Child(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Child +func miqt_exec_callback_QAccessibleApplication_Child(self *C.QAccessibleApplication, cb C.intptr_t, index C.int) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QAccessibleInterface, index int) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Child, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Text(t QAccessible__Text) string { + + var _ms C.struct_miqt_string = C.QAccessibleApplication_virtualbase_Text(unsafe.Pointer(this.h), (C.int)(t)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QAccessibleApplication) OnText(slot func(super func(t QAccessible__Text) string, t QAccessible__Text) string) { + C.QAccessibleApplication_override_virtual_Text(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Text +func miqt_exec_callback_QAccessibleApplication_Text(self *C.QAccessibleApplication, cb C.intptr_t, t C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(t QAccessible__Text) string, t QAccessible__Text) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAccessible__Text)(t) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Text, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QAccessibleApplication) callVirtualBase_Role() QAccessible__Role { + + return (QAccessible__Role)(C.QAccessibleApplication_virtualbase_Role(unsafe.Pointer(this.h))) + +} +func (this *QAccessibleApplication) OnRole(slot func(super func() QAccessible__Role) QAccessible__Role) { + C.QAccessibleApplication_override_virtual_Role(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Role +func miqt_exec_callback_QAccessibleApplication_Role(self *C.QAccessibleApplication, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAccessible__Role) QAccessible__Role) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Role) + + return (C.int)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_State() *QAccessible__State { + + _ret := C.QAccessibleApplication_virtualbase_State(unsafe.Pointer(this.h)) + _goptr := newQAccessible__State(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAccessibleApplication) OnState(slot func(super func() *QAccessible__State) *QAccessible__State) { + C.QAccessibleApplication_override_virtual_State(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_State +func miqt_exec_callback_QAccessibleApplication_State(self *C.QAccessibleApplication, cb C.intptr_t) *C.QAccessible__State { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessible__State) *QAccessible__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_State) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_IsValid() bool { + + return (bool)(C.QAccessibleApplication_virtualbase_IsValid(unsafe.Pointer(this.h))) + +} +func (this *QAccessibleApplication) OnIsValid(slot func(super func() bool) bool) { + C.QAccessibleApplication_override_virtual_IsValid(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_IsValid +func miqt_exec_callback_QAccessibleApplication_IsValid(self *C.QAccessibleApplication, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_IsValid) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessibleApplication) callVirtualBase_Object() *QObject { + + return UnsafeNewQObject(unsafe.Pointer(C.QAccessibleApplication_virtualbase_Object(unsafe.Pointer(this.h)))) +} +func (this *QAccessibleApplication) OnObject(slot func(super func() *QObject) *QObject) { + C.QAccessibleApplication_override_virtual_Object(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Object +func miqt_exec_callback_QAccessibleApplication_Object(self *C.QAccessibleApplication, cb C.intptr_t) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QObject) *QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Object) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_Rect() *QRect { + + _ret := C.QAccessibleApplication_virtualbase_Rect(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAccessibleApplication) OnRect(slot func(super func() *QRect) *QRect) { + C.QAccessibleApplication_override_virtual_Rect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_Rect +func miqt_exec_callback_QAccessibleApplication_Rect(self *C.QAccessibleApplication, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_Rect) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleApplication) callVirtualBase_SetText(t QAccessible__Text, text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QAccessibleApplication_virtualbase_SetText(unsafe.Pointer(this.h), (C.int)(t), text_ms) + +} +func (this *QAccessibleApplication) OnSetText(slot func(super func(t QAccessible__Text, text string), t QAccessible__Text, text string)) { + C.QAccessibleApplication_override_virtual_SetText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_SetText +func miqt_exec_callback_QAccessibleApplication_SetText(self *C.QAccessibleApplication, cb C.intptr_t, t C.int, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(t QAccessible__Text, text string), t QAccessible__Text, text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAccessible__Text)(t) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval2 := text_ret + + gofunc((&QAccessibleApplication{h: self}).callVirtualBase_SetText, slotval1, slotval2) + +} + +func (this *QAccessibleApplication) callVirtualBase_ChildAt(x int, y int) *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QAccessibleApplication_virtualbase_ChildAt(unsafe.Pointer(this.h), (C.int)(x), (C.int)(y)))) +} +func (this *QAccessibleApplication) OnChildAt(slot func(super func(x int, y int) *QAccessibleInterface, x int, y int) *QAccessibleInterface) { + C.QAccessibleApplication_override_virtual_ChildAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleApplication_ChildAt +func miqt_exec_callback_QAccessibleApplication_ChildAt(self *C.QAccessibleApplication, cb C.intptr_t, x C.int, y C.int) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(x int, y int) *QAccessibleInterface, x int, y int) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(x) + + slotval2 := (int)(y) + + virtualReturn := gofunc((&QAccessibleApplication{h: self}).callVirtualBase_ChildAt, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAccessibleApplication) Delete() { - C.QAccessibleApplication_Delete(this.h) + C.QAccessibleApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qaccessibleobject.h b/qt6/gen_qaccessibleobject.h index 7333491d..e4baa807 100644 --- a/qt6/gen_qaccessibleobject.h +++ b/qt6/gen_qaccessibleobject.h @@ -42,7 +42,7 @@ QRect* QAccessibleObject_Rect(const QAccessibleObject* self); void QAccessibleObject_SetText(QAccessibleObject* self, int t, struct miqt_string text); QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, int x, int y); -QAccessibleApplication* QAccessibleApplication_new(); +void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface); QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self); int QAccessibleApplication_ChildCount(const QAccessibleApplication* self); int QAccessibleApplication_IndexOfChild(const QAccessibleApplication* self, QAccessibleInterface* param1); @@ -52,7 +52,35 @@ QAccessibleInterface* QAccessibleApplication_Child(const QAccessibleApplication* struct miqt_string QAccessibleApplication_Text(const QAccessibleApplication* self, int t); int QAccessibleApplication_Role(const QAccessibleApplication* self); QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* self); -void QAccessibleApplication_Delete(QAccessibleApplication* self); +void QAccessibleApplication_override_virtual_Window(void* self, intptr_t slot); +QWindow* QAccessibleApplication_virtualbase_Window(const void* self); +void QAccessibleApplication_override_virtual_ChildCount(void* self, intptr_t slot); +int QAccessibleApplication_virtualbase_ChildCount(const void* self); +void QAccessibleApplication_override_virtual_IndexOfChild(void* self, intptr_t slot); +int QAccessibleApplication_virtualbase_IndexOfChild(const void* self, QAccessibleInterface* param1); +void QAccessibleApplication_override_virtual_FocusChild(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_FocusChild(const void* self); +void QAccessibleApplication_override_virtual_Parent(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_Parent(const void* self); +void QAccessibleApplication_override_virtual_Child(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_Child(const void* self, int index); +void QAccessibleApplication_override_virtual_Text(void* self, intptr_t slot); +struct miqt_string QAccessibleApplication_virtualbase_Text(const void* self, int t); +void QAccessibleApplication_override_virtual_Role(void* self, intptr_t slot); +int QAccessibleApplication_virtualbase_Role(const void* self); +void QAccessibleApplication_override_virtual_State(void* self, intptr_t slot); +QAccessible__State* QAccessibleApplication_virtualbase_State(const void* self); +void QAccessibleApplication_override_virtual_IsValid(void* self, intptr_t slot); +bool QAccessibleApplication_virtualbase_IsValid(const void* self); +void QAccessibleApplication_override_virtual_Object(void* self, intptr_t slot); +QObject* QAccessibleApplication_virtualbase_Object(const void* self); +void QAccessibleApplication_override_virtual_Rect(void* self, intptr_t slot); +QRect* QAccessibleApplication_virtualbase_Rect(const void* self); +void QAccessibleApplication_override_virtual_SetText(void* self, intptr_t slot); +void QAccessibleApplication_virtualbase_SetText(void* self, int t, struct miqt_string text); +void QAccessibleApplication_override_virtual_ChildAt(void* self, intptr_t slot); +QAccessibleInterface* QAccessibleApplication_virtualbase_ChildAt(const void* self, int x, int y); +void QAccessibleApplication_Delete(QAccessibleApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaccessibleplugin.cpp b/qt6/gen_qaccessibleplugin.cpp index 97b4db7c..0bebff96 100644 --- a/qt6/gen_qaccessibleplugin.cpp +++ b/qt6/gen_qaccessibleplugin.cpp @@ -55,7 +55,11 @@ struct miqt_string QAccessiblePlugin_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAccessiblePlugin_Delete(QAccessiblePlugin* self) { - delete self; +void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qaccessibleplugin.go b/qt6/gen_qaccessibleplugin.go index 230e0016..8b414383 100644 --- a/qt6/gen_qaccessibleplugin.go +++ b/qt6/gen_qaccessibleplugin.go @@ -14,7 +14,8 @@ import ( ) type QAccessiblePlugin struct { - h *C.QAccessiblePlugin + h *C.QAccessiblePlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QAccessiblePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessiblePlugin(h *C.QAccessiblePlugin) *QAccessiblePlugin { +// newQAccessiblePlugin constructs the type using only CGO pointers. +func newQAccessiblePlugin(h *C.QAccessiblePlugin, h_QObject *C.QObject) *QAccessiblePlugin { if h == nil { return nil } - return &QAccessiblePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAccessiblePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAccessiblePlugin(h unsafe.Pointer) *QAccessiblePlugin { - return newQAccessiblePlugin((*C.QAccessiblePlugin)(h)) +// UnsafeNewQAccessiblePlugin constructs the type using only unsafe pointers. +func UnsafeNewQAccessiblePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessiblePlugin { + if h == nil { + return nil + } + + return &QAccessiblePlugin{h: (*C.QAccessiblePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QAccessiblePlugin) MetaObject() *QMetaObject { @@ -94,7 +103,7 @@ func QAccessiblePlugin_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAccessiblePlugin) Delete() { - C.QAccessiblePlugin_Delete(this.h) + C.QAccessiblePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qaccessibleplugin.h b/qt6/gen_qaccessibleplugin.h index 2b843a88..7dda9e4f 100644 --- a/qt6/gen_qaccessibleplugin.h +++ b/qt6/gen_qaccessibleplugin.h @@ -32,7 +32,7 @@ struct miqt_string QAccessiblePlugin_Tr(const char* s); QAccessibleInterface* QAccessiblePlugin_Create(QAccessiblePlugin* self, struct miqt_string key, QObject* object); struct miqt_string QAccessiblePlugin_Tr2(const char* s, const char* c); struct miqt_string QAccessiblePlugin_Tr3(const char* s, const char* c, int n); -void QAccessiblePlugin_Delete(QAccessiblePlugin* self); +void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaccessiblewidget.cpp b/qt6/gen_qaccessiblewidget.cpp index 4a0b37b3..487aface 100644 --- a/qt6/gen_qaccessiblewidget.cpp +++ b/qt6/gen_qaccessiblewidget.cpp @@ -1,5 +1,7 @@ #define WORKAROUND_INNER_CLASS_DEFINITION_QAccessible__State +#include #include +#include #include #include #include @@ -13,17 +15,29 @@ #include "gen_qaccessiblewidget.h" #include "_cgo_export.h" -QAccessibleWidget* QAccessibleWidget_new(QWidget* o) { - return new QAccessibleWidget(o); +void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { + QAccessibleWidget* ret = new QAccessibleWidget(o); + *outptr_QAccessibleWidget = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); + *outptr_QAccessibleActionInterface = static_cast(ret); } -QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r) { - return new QAccessibleWidget(o, static_cast(r)); +void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { + QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r)); + *outptr_QAccessibleWidget = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); + *outptr_QAccessibleActionInterface = static_cast(ret); } -QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name) { +void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QAccessibleWidget(o, static_cast(r), name_QString); + QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r), name_QString); + *outptr_QAccessibleWidget = ret; + *outptr_QAccessibleObject = static_cast(ret); + *outptr_QAccessibleInterface = static_cast(ret); + *outptr_QAccessibleActionInterface = static_cast(ret); } bool QAccessibleWidget_IsValid(const QAccessibleWidget* self) { @@ -42,8 +56,8 @@ int QAccessibleWidget_IndexOfChild(const QAccessibleWidget* self, QAccessibleInt return self->indexOfChild(child); } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self) { - QList> _ret = self->relations(); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self, int match) { + QList> _ret = self->relations(static_cast(match)); // Convert QList<> from C++ memory to manually-managed C memory struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -160,27 +174,3 @@ struct miqt_array /* of struct miqt_string */ QAccessibleWidget_KeyBindingsForA return _out; } -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations1(const QAccessibleWidget* self, int match) { - QList> _ret = self->relations(static_cast(match)); - // Convert QList<> from C++ memory to manually-managed C memory - struct miqt_map /* tuple of QAccessibleInterface* and int */ * _arr = static_cast(malloc(sizeof(struct miqt_map /* tuple of QAccessibleInterface* and int */ ) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - QPair> _lv_ret = _ret[i]; - // Convert QPair<> from C++ memory to manually-managed C memory - QAccessibleInterface** _lv_first_arr = static_cast(malloc(sizeof(QAccessibleInterface*))); - int* _lv_second_arr = static_cast(malloc(sizeof(int))); - _lv_first_arr[0] = _lv_ret.first; - QFlags _lv_second_ret = _lv_ret.second; - _lv_second_arr[0] = static_cast(_lv_second_ret); - struct miqt_map _lv_out; - _lv_out.len = 1; - _lv_out.keys = static_cast(_lv_first_arr); - _lv_out.values = static_cast(_lv_second_arr); - _arr[i] = _lv_out; - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - diff --git a/qt6/gen_qaccessiblewidget.go b/qt6/gen_qaccessiblewidget.go index b5a173d9..49594d21 100644 --- a/qt6/gen_qaccessiblewidget.go +++ b/qt6/gen_qaccessiblewidget.go @@ -13,7 +13,8 @@ import ( ) type QAccessibleWidget struct { - h *C.QAccessibleWidget + h *C.QAccessibleWidget + isSubclass bool *QAccessibleObject *QAccessibleActionInterface } @@ -32,27 +33,51 @@ func (this *QAccessibleWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget { +// newQAccessibleWidget constructs the type using only CGO pointers. +func newQAccessibleWidget(h *C.QAccessibleWidget, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface, h_QAccessibleActionInterface *C.QAccessibleActionInterface) *QAccessibleWidget { if h == nil { return nil } - return &QAccessibleWidget{h: h, QAccessibleObject: UnsafeNewQAccessibleObject(unsafe.Pointer(h)), QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(unsafe.Pointer(h))} + return &QAccessibleWidget{h: h, + QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), + QAccessibleActionInterface: newQAccessibleActionInterface(h_QAccessibleActionInterface)} } -func UnsafeNewQAccessibleWidget(h unsafe.Pointer) *QAccessibleWidget { - return newQAccessibleWidget((*C.QAccessibleWidget)(h)) +// UnsafeNewQAccessibleWidget constructs the type using only unsafe pointers. +func UnsafeNewQAccessibleWidget(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer, h_QAccessibleActionInterface unsafe.Pointer) *QAccessibleWidget { + if h == nil { + return nil + } + + return &QAccessibleWidget{h: (*C.QAccessibleWidget)(h), + QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), + QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(h_QAccessibleActionInterface)} } // NewQAccessibleWidget constructs a new QAccessibleWidget object. func NewQAccessibleWidget(o *QWidget) *QAccessibleWidget { - ret := C.QAccessibleWidget_new(o.cPointer()) - return newQAccessibleWidget(ret) + var outptr_QAccessibleWidget *C.QAccessibleWidget = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + + C.QAccessibleWidget_new(o.cPointer(), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret.isSubclass = true + return ret } // NewQAccessibleWidget2 constructs a new QAccessibleWidget object. func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget { - ret := C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r)) - return newQAccessibleWidget(ret) + var outptr_QAccessibleWidget *C.QAccessibleWidget = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + + C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret.isSubclass = true + return ret } // NewQAccessibleWidget3 constructs a new QAccessibleWidget object. @@ -61,8 +86,15 @@ func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAcces name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms) - return newQAccessibleWidget(ret) + var outptr_QAccessibleWidget *C.QAccessibleWidget = nil + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + + C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms, &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret.isSubclass = true + return ret } func (this *QAccessibleWidget) IsValid() bool { @@ -70,7 +102,7 @@ func (this *QAccessibleWidget) IsValid() bool { } func (this *QAccessibleWidget) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleWidget_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QAccessibleWidget_Window(this.h)), nil, nil) } func (this *QAccessibleWidget) ChildCount() int { @@ -81,11 +113,11 @@ func (this *QAccessibleWidget) IndexOfChild(child *QAccessibleInterface) int { return (int)(C.QAccessibleWidget_IndexOfChild(this.h, child.cPointer())) } -func (this *QAccessibleWidget) Relations() []struct { +func (this *QAccessibleWidget) Relations(match QAccessible__RelationFlag) []struct { First *QAccessibleInterface Second QAccessible__RelationFlag } { - var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations(this.h) + var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations(this.h, (C.int)(match)) _ret := make([]struct { First *QAccessibleInterface Second QAccessible__RelationFlag @@ -198,28 +230,3 @@ func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string } return _ret } - -func (this *QAccessibleWidget) Relations1(match QAccessible__RelationFlag) []struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag -} { - var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations1(this.h, (C.int)(match)) - _ret := make([]struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }, int(_ma.len)) - _outCast := (*[0xffff]C.struct_miqt_map)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - var _lv_mm C.struct_miqt_map = _outCast[i] - _lv_First_CArray := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_lv_mm.keys)) - _lv_Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_lv_mm.values)) - _lv_entry_First := UnsafeNewQAccessibleInterface(unsafe.Pointer(_lv_First_CArray[0])) - _lv_entry_Second := (QAccessible__RelationFlag)(_lv_Second_CArray[0]) - - _ret[i] = struct { - First *QAccessibleInterface - Second QAccessible__RelationFlag - }{First: _lv_entry_First, Second: _lv_entry_Second} - } - return _ret -} diff --git a/qt6/gen_qaccessiblewidget.h b/qt6/gen_qaccessiblewidget.h index c56eb8b0..dc112a25 100644 --- a/qt6/gen_qaccessiblewidget.h +++ b/qt6/gen_qaccessiblewidget.h @@ -20,7 +20,9 @@ typedef QAccessible::State QAccessible__State; #else class QAccessible__State; #endif +class QAccessibleActionInterface; class QAccessibleInterface; +class QAccessibleObject; class QAccessibleWidget; class QColor; class QRect; @@ -28,7 +30,9 @@ class QWidget; class QWindow; #else typedef struct QAccessible__State QAccessible__State; +typedef struct QAccessibleActionInterface QAccessibleActionInterface; typedef struct QAccessibleInterface QAccessibleInterface; +typedef struct QAccessibleObject QAccessibleObject; typedef struct QAccessibleWidget QAccessibleWidget; typedef struct QColor QColor; typedef struct QRect QRect; @@ -36,14 +40,14 @@ typedef struct QWidget QWidget; typedef struct QWindow QWindow; #endif -QAccessibleWidget* QAccessibleWidget_new(QWidget* o); -QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r); -QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name); +void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); +void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); +void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); bool QAccessibleWidget_IsValid(const QAccessibleWidget* self); QWindow* QAccessibleWidget_Window(const QAccessibleWidget* self); int QAccessibleWidget_ChildCount(const QAccessibleWidget* self); int QAccessibleWidget_IndexOfChild(const QAccessibleWidget* self, QAccessibleInterface* child); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self); +struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations(const QAccessibleWidget* self, int match); QAccessibleInterface* QAccessibleWidget_FocusChild(const QAccessibleWidget* self); QRect* QAccessibleWidget_Rect(const QAccessibleWidget* self); QAccessibleInterface* QAccessibleWidget_Parent(const QAccessibleWidget* self); @@ -57,7 +61,6 @@ void* QAccessibleWidget_InterfaceCast(QAccessibleWidget* self, int t); struct miqt_array /* of struct miqt_string */ QAccessibleWidget_ActionNames(const QAccessibleWidget* self); void QAccessibleWidget_DoAction(QAccessibleWidget* self, struct miqt_string actionName); struct miqt_array /* of struct miqt_string */ QAccessibleWidget_KeyBindingsForAction(const QAccessibleWidget* self, struct miqt_string actionName); -struct miqt_array /* of struct miqt_map tuple of QAccessibleInterface* and int */ QAccessibleWidget_Relations1(const QAccessibleWidget* self, int match); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qaction.cpp b/qt6/gen_qaction.cpp index af416541..42b4bdf9 100644 --- a/qt6/gen_qaction.cpp +++ b/qt6/gen_qaction.cpp @@ -1,45 +1,246 @@ #include #include +#include +#include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qaction.h" #include "_cgo_export.h" -QAction* QAction_new() { - return new QAction(); +class MiqtVirtualQAction : public virtual QAction { +public: + + MiqtVirtualQAction(): QAction() {}; + MiqtVirtualQAction(const QString& text): QAction(text) {}; + MiqtVirtualQAction(const QIcon& icon, const QString& text): QAction(icon, text) {}; + MiqtVirtualQAction(QObject* parent): QAction(parent) {}; + MiqtVirtualQAction(const QString& text, QObject* parent): QAction(text, parent) {}; + MiqtVirtualQAction(const QIcon& icon, const QString& text, QObject* parent): QAction(icon, text, parent) {}; + + virtual ~MiqtVirtualQAction() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QAction::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QAction_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QAction::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAction::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAction_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAction::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAction::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAction_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAction::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAction::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAction_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAction::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAction::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAction_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAction::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAction::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAction_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAction::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAction::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAction_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAction::disconnectNotify(*signal); + + } + +}; + +void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject) { + MiqtVirtualQAction* ret = new MiqtVirtualQAction(); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new2(struct miqt_string text) { +void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(text_QString); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new3(QIcon* icon, struct miqt_string text) { +void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(*icon, text_QString); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new4(QObject* parent) { - return new QAction(parent); +void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { + MiqtVirtualQAction* ret = new MiqtVirtualQAction(parent); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new5(struct miqt_string text, QObject* parent) { +void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(text_QString, parent); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString, parent); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } -QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent) { +void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QAction(*icon, text_QString, parent); + MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString, parent); + *outptr_QAction = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAction_MetaObject(const QAction* self) { @@ -345,7 +546,7 @@ void QAction_Changed(QAction* self) { } void QAction_connect_Changed(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::changed), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::changed), self, [=]() { miqt_exec_callback_QAction_Changed(slot); }); } @@ -355,7 +556,7 @@ void QAction_EnabledChanged(QAction* self, bool enabled) { } void QAction_connect_EnabledChanged(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::enabledChanged), self, [=](bool enabled) { + MiqtVirtualQAction::connect(self, static_cast(&QAction::enabledChanged), self, [=](bool enabled) { bool sigval1 = enabled; miqt_exec_callback_QAction_EnabledChanged(slot, sigval1); }); @@ -366,7 +567,7 @@ void QAction_CheckableChanged(QAction* self, bool checkable) { } void QAction_connect_CheckableChanged(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::checkableChanged), self, [=](bool checkable) { + MiqtVirtualQAction::connect(self, static_cast(&QAction::checkableChanged), self, [=](bool checkable) { bool sigval1 = checkable; miqt_exec_callback_QAction_CheckableChanged(slot, sigval1); }); @@ -377,7 +578,7 @@ void QAction_VisibleChanged(QAction* self) { } void QAction_connect_VisibleChanged(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::visibleChanged), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::visibleChanged), self, [=]() { miqt_exec_callback_QAction_VisibleChanged(slot); }); } @@ -387,7 +588,7 @@ void QAction_Triggered(QAction* self) { } void QAction_connect_Triggered(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::triggered), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::triggered), self, [=]() { miqt_exec_callback_QAction_Triggered(slot); }); } @@ -397,7 +598,7 @@ void QAction_Hovered(QAction* self) { } void QAction_connect_Hovered(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::hovered), self, [=]() { + MiqtVirtualQAction::connect(self, static_cast(&QAction::hovered), self, [=]() { miqt_exec_callback_QAction_Hovered(slot); }); } @@ -407,7 +608,7 @@ void QAction_Toggled(QAction* self, bool param1) { } void QAction_connect_Toggled(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::toggled), self, [=](bool param1) { + MiqtVirtualQAction::connect(self, static_cast(&QAction::toggled), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QAction_Toggled(slot, sigval1); }); @@ -444,13 +645,73 @@ void QAction_Triggered1(QAction* self, bool checked) { } void QAction_connect_Triggered1(QAction* self, intptr_t slot) { - QAction::connect(self, static_cast(&QAction::triggered), self, [=](bool checked) { + MiqtVirtualQAction::connect(self, static_cast(&QAction::triggered), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QAction_Triggered1(slot, sigval1); }); } -void QAction_Delete(QAction* self) { - delete self; +void QAction_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__Event = slot; +} + +bool QAction_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQAction*)(self) )->virtualbase_Event(param1); +} + +void QAction_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__EventFilter = slot; +} + +bool QAction_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAction*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAction_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__TimerEvent = slot; +} + +void QAction_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_TimerEvent(event); +} + +void QAction_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__ChildEvent = slot; +} + +void QAction_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_ChildEvent(event); +} + +void QAction_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__CustomEvent = slot; +} + +void QAction_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_CustomEvent(event); +} + +void QAction_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__ConnectNotify = slot; +} + +void QAction_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAction_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAction*)(self) )->handle__DisconnectNotify = slot; +} + +void QAction_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAction*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAction_Delete(QAction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qaction.go b/qt6/gen_qaction.go index 12656536..60e65cef 100644 --- a/qt6/gen_qaction.go +++ b/qt6/gen_qaction.go @@ -42,7 +42,8 @@ const ( ) type QAction struct { - h *C.QAction + h *C.QAction + isSubclass bool *QObject } @@ -60,21 +61,34 @@ func (this *QAction) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAction(h *C.QAction) *QAction { +// newQAction constructs the type using only CGO pointers. +func newQAction(h *C.QAction, h_QObject *C.QObject) *QAction { if h == nil { return nil } - return &QAction{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QAction{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQAction(h unsafe.Pointer) *QAction { - return newQAction((*C.QAction)(h)) +// UnsafeNewQAction constructs the type using only unsafe pointers. +func UnsafeNewQAction(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAction { + if h == nil { + return nil + } + + return &QAction{h: (*C.QAction)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQAction constructs a new QAction object. func NewQAction() *QAction { - ret := C.QAction_new() - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new(&outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction2 constructs a new QAction object. @@ -83,8 +97,13 @@ func NewQAction2(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new2(text_ms) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new2(text_ms, &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction3 constructs a new QAction object. @@ -93,14 +112,24 @@ func NewQAction3(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new3(icon.cPointer(), text_ms) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new3(icon.cPointer(), text_ms, &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction4 constructs a new QAction object. func NewQAction4(parent *QObject) *QAction { - ret := C.QAction_new4(parent.cPointer()) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new4(parent.cPointer(), &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction5 constructs a new QAction object. @@ -109,8 +138,13 @@ func NewQAction5(text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new5(text_ms, parent.cPointer()) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new5(text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAction6 constructs a new QAction object. @@ -119,8 +153,13 @@ func NewQAction6(icon *QIcon, text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer()) - return newQAction(ret) + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) + ret := newQAction(outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAction) MetaObject() *QMetaObject { @@ -157,7 +196,7 @@ func (this *QAction) SetActionGroup(group *QActionGroup) { } func (this *QAction) ActionGroup() *QActionGroup { - return UnsafeNewQActionGroup(unsafe.Pointer(C.QAction_ActionGroup(this.h))) + return UnsafeNewQActionGroup(unsafe.Pointer(C.QAction_ActionGroup(this.h)), nil) } func (this *QAction) SetIcon(icon *QIcon) { @@ -596,9 +635,175 @@ func miqt_exec_callback_QAction_Triggered1(cb C.intptr_t, checked C.bool) { gofunc(slotval1) } +func (this *QAction) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QAction_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QAction) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QAction_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_Event +func miqt_exec_callback_QAction_Event(self *C.QAction, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QAction{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAction) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAction_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAction) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAction_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_EventFilter +func miqt_exec_callback_QAction_EventFilter(self *C.QAction, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAction{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAction) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAction_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAction) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAction_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_TimerEvent +func miqt_exec_callback_QAction_TimerEvent(self *C.QAction, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAction{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAction) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAction_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAction) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAction_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_ChildEvent +func miqt_exec_callback_QAction_ChildEvent(self *C.QAction, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAction{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAction) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAction_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAction) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAction_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_CustomEvent +func miqt_exec_callback_QAction_CustomEvent(self *C.QAction, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAction{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAction) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAction_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAction) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAction_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_ConnectNotify +func miqt_exec_callback_QAction_ConnectNotify(self *C.QAction, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAction{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAction) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAction_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAction) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAction_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAction_DisconnectNotify +func miqt_exec_callback_QAction_DisconnectNotify(self *C.QAction, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAction{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAction) Delete() { - C.QAction_Delete(this.h) + C.QAction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qaction.h b/qt6/gen_qaction.h index 8b0abba4..19bec3d2 100644 --- a/qt6/gen_qaction.h +++ b/qt6/gen_qaction.h @@ -17,29 +17,37 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionGroup; +class QChildEvent; +class QEvent; class QFont; class QIcon; class QKeySequence; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVariant; #else typedef struct QAction QAction; typedef struct QActionGroup QActionGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QIcon QIcon; typedef struct QKeySequence QKeySequence; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QAction* QAction_new(); -QAction* QAction_new2(struct miqt_string text); -QAction* QAction_new3(QIcon* icon, struct miqt_string text); -QAction* QAction_new4(QObject* parent); -QAction* QAction_new5(struct miqt_string text, QObject* parent); -QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent); +void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); +void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); QMetaObject* QAction_MetaObject(const QAction* self); void* QAction_Metacast(QAction* self, const char* param1); struct miqt_string QAction_Tr(const char* s); @@ -88,6 +96,7 @@ bool QAction_IsIconVisibleInMenu(const QAction* self); void QAction_SetShortcutVisibleInContextMenu(QAction* self, bool show); bool QAction_IsShortcutVisibleInContextMenu(const QAction* self); bool QAction_ShowStatusText(QAction* self); +bool QAction_Event(QAction* self, QEvent* param1); void QAction_Trigger(QAction* self); void QAction_Hover(QAction* self); void QAction_SetChecked(QAction* self, bool checked); @@ -115,7 +124,21 @@ struct miqt_string QAction_Tr3(const char* s, const char* c, int n); bool QAction_ShowStatusText1(QAction* self, QObject* object); void QAction_Triggered1(QAction* self, bool checked); void QAction_connect_Triggered1(QAction* self, intptr_t slot); -void QAction_Delete(QAction* self); +void QAction_override_virtual_Event(void* self, intptr_t slot); +bool QAction_virtualbase_Event(void* self, QEvent* param1); +void QAction_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAction_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAction_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAction_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAction_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAction_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAction_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAction_virtualbase_CustomEvent(void* self, QEvent* event); +void QAction_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAction_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAction_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAction_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAction_Delete(QAction* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qactiongroup.cpp b/qt6/gen_qactiongroup.cpp index 0434990a..8428e76d 100644 --- a/qt6/gen_qactiongroup.cpp +++ b/qt6/gen_qactiongroup.cpp @@ -1,18 +1,204 @@ #include #include +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qactiongroup.h" #include "_cgo_export.h" -QActionGroup* QActionGroup_new(QObject* parent) { - return new QActionGroup(parent); +class MiqtVirtualQActionGroup : public virtual QActionGroup { +public: + + MiqtVirtualQActionGroup(QObject* parent): QActionGroup(parent) {}; + + virtual ~MiqtVirtualQActionGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QActionGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QActionGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QActionGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QActionGroup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QActionGroup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QActionGroup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QActionGroup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QActionGroup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QActionGroup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QActionGroup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QActionGroup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QActionGroup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QActionGroup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QActionGroup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QActionGroup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QActionGroup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QActionGroup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QActionGroup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QActionGroup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QActionGroup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QActionGroup::disconnectNotify(*signal); + + } + +}; + +void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject) { + MiqtVirtualQActionGroup* ret = new MiqtVirtualQActionGroup(parent); + *outptr_QActionGroup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QActionGroup_MetaObject(const QActionGroup* self) { @@ -111,7 +297,7 @@ void QActionGroup_Triggered(QActionGroup* self, QAction* param1) { } void QActionGroup_connect_Triggered(QActionGroup* self, intptr_t slot) { - QActionGroup::connect(self, static_cast(&QActionGroup::triggered), self, [=](QAction* param1) { + MiqtVirtualQActionGroup::connect(self, static_cast(&QActionGroup::triggered), self, [=](QAction* param1) { QAction* sigval1 = param1; miqt_exec_callback_QActionGroup_Triggered(slot, sigval1); }); @@ -122,7 +308,7 @@ void QActionGroup_Hovered(QActionGroup* self, QAction* param1) { } void QActionGroup_connect_Hovered(QActionGroup* self, intptr_t slot) { - QActionGroup::connect(self, static_cast(&QActionGroup::hovered), self, [=](QAction* param1) { + MiqtVirtualQActionGroup::connect(self, static_cast(&QActionGroup::hovered), self, [=](QAction* param1) { QAction* sigval1 = param1; miqt_exec_callback_QActionGroup_Hovered(slot, sigval1); }); @@ -150,7 +336,67 @@ struct miqt_string QActionGroup_Tr3(const char* s, const char* c, int n) { return _ms; } -void QActionGroup_Delete(QActionGroup* self) { - delete self; +void QActionGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__Event = slot; +} + +bool QActionGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_Event(event); +} + +void QActionGroup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__EventFilter = slot; +} + +bool QActionGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QActionGroup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__TimerEvent = slot; +} + +void QActionGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_TimerEvent(event); +} + +void QActionGroup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__ChildEvent = slot; +} + +void QActionGroup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_ChildEvent(event); +} + +void QActionGroup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__CustomEvent = slot; +} + +void QActionGroup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_CustomEvent(event); +} + +void QActionGroup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__ConnectNotify = slot; +} + +void QActionGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QActionGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QActionGroup*)(self) )->handle__DisconnectNotify = slot; +} + +void QActionGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQActionGroup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QActionGroup_Delete(QActionGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qactiongroup.go b/qt6/gen_qactiongroup.go index 08475bee..855fc08b 100644 --- a/qt6/gen_qactiongroup.go +++ b/qt6/gen_qactiongroup.go @@ -23,7 +23,8 @@ const ( ) type QActionGroup struct { - h *C.QActionGroup + h *C.QActionGroup + isSubclass bool *QObject } @@ -41,21 +42,34 @@ func (this *QActionGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQActionGroup(h *C.QActionGroup) *QActionGroup { +// newQActionGroup constructs the type using only CGO pointers. +func newQActionGroup(h *C.QActionGroup, h_QObject *C.QObject) *QActionGroup { if h == nil { return nil } - return &QActionGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QActionGroup{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQActionGroup(h unsafe.Pointer) *QActionGroup { - return newQActionGroup((*C.QActionGroup)(h)) +// UnsafeNewQActionGroup constructs the type using only unsafe pointers. +func UnsafeNewQActionGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QActionGroup { + if h == nil { + return nil + } + + return &QActionGroup{h: (*C.QActionGroup)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQActionGroup constructs a new QActionGroup object. func NewQActionGroup(parent *QObject) *QActionGroup { - ret := C.QActionGroup_new(parent.cPointer()) - return newQActionGroup(ret) + var outptr_QActionGroup *C.QActionGroup = nil + var outptr_QObject *C.QObject = nil + + C.QActionGroup_new(parent.cPointer(), &outptr_QActionGroup, &outptr_QObject) + ret := newQActionGroup(outptr_QActionGroup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QActionGroup) MetaObject() *QMetaObject { @@ -78,7 +92,7 @@ func QActionGroup_Tr(s string) string { } func (this *QActionGroup) AddAction(a *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction(this.h, a.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction(this.h, a.cPointer())), nil) } func (this *QActionGroup) AddActionWithText(text string) *QAction { @@ -86,7 +100,7 @@ func (this *QActionGroup) AddActionWithText(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddActionWithText(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddActionWithText(this.h, text_ms)), nil) } func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { @@ -94,7 +108,7 @@ func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QActionGroup) RemoveAction(a *QAction) { @@ -106,13 +120,13 @@ func (this *QActionGroup) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QActionGroup) CheckedAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_CheckedAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionGroup_CheckedAction(this.h)), nil) } func (this *QActionGroup) IsExclusive() bool { @@ -166,7 +180,7 @@ func miqt_exec_callback_QActionGroup_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(param1), nil) gofunc(slotval1) } @@ -186,7 +200,7 @@ func miqt_exec_callback_QActionGroup_Hovered(cb C.intptr_t, param1 *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(param1), nil) gofunc(slotval1) } @@ -213,9 +227,175 @@ func QActionGroup_Tr3(s string, c string, n int) string { return _ret } +func (this *QActionGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QActionGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QActionGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QActionGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_Event +func miqt_exec_callback_QActionGroup_Event(self *C.QActionGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QActionGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QActionGroup) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QActionGroup_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QActionGroup) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QActionGroup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_EventFilter +func miqt_exec_callback_QActionGroup_EventFilter(self *C.QActionGroup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QActionGroup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QActionGroup) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QActionGroup_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QActionGroup) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QActionGroup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_TimerEvent +func miqt_exec_callback_QActionGroup_TimerEvent(self *C.QActionGroup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QActionGroup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QActionGroup_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QActionGroup) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QActionGroup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_ChildEvent +func miqt_exec_callback_QActionGroup_ChildEvent(self *C.QActionGroup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QActionGroup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_CustomEvent(event *QEvent) { + + C.QActionGroup_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QActionGroup) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QActionGroup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_CustomEvent +func miqt_exec_callback_QActionGroup_CustomEvent(self *C.QActionGroup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QActionGroup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QActionGroup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QActionGroup) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QActionGroup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_ConnectNotify +func miqt_exec_callback_QActionGroup_ConnectNotify(self *C.QActionGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QActionGroup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QActionGroup) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QActionGroup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QActionGroup) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QActionGroup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionGroup_DisconnectNotify +func miqt_exec_callback_QActionGroup_DisconnectNotify(self *C.QActionGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QActionGroup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QActionGroup) Delete() { - C.QActionGroup_Delete(this.h) + C.QActionGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qactiongroup.h b/qt6/gen_qactiongroup.h index 912bebc1..c205f8ee 100644 --- a/qt6/gen_qactiongroup.h +++ b/qt6/gen_qactiongroup.h @@ -17,18 +17,26 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionGroup; +class QChildEvent; +class QEvent; class QIcon; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAction QAction; typedef struct QActionGroup QActionGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIcon QIcon; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QActionGroup* QActionGroup_new(QObject* parent); +void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject); QMetaObject* QActionGroup_MetaObject(const QActionGroup* self); void* QActionGroup_Metacast(QActionGroup* self, const char* param1); struct miqt_string QActionGroup_Tr(const char* s); @@ -53,7 +61,21 @@ void QActionGroup_Hovered(QActionGroup* self, QAction* param1); void QActionGroup_connect_Hovered(QActionGroup* self, intptr_t slot); struct miqt_string QActionGroup_Tr2(const char* s, const char* c); struct miqt_string QActionGroup_Tr3(const char* s, const char* c, int n); -void QActionGroup_Delete(QActionGroup* self); +void QActionGroup_override_virtual_Event(void* self, intptr_t slot); +bool QActionGroup_virtualbase_Event(void* self, QEvent* event); +void QActionGroup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QActionGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QActionGroup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QActionGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QActionGroup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QActionGroup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QActionGroup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QActionGroup_virtualbase_CustomEvent(void* self, QEvent* event); +void QActionGroup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QActionGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QActionGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QActionGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QActionGroup_Delete(QActionGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qanimationgroup.cpp b/qt6/gen_qanimationgroup.cpp index 02f77fe8..1495fb1b 100644 --- a/qt6/gen_qanimationgroup.cpp +++ b/qt6/gen_qanimationgroup.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -81,7 +83,11 @@ struct miqt_string QAnimationGroup_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAnimationGroup_Delete(QAnimationGroup* self) { - delete self; +void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qanimationgroup.go b/qt6/gen_qanimationgroup.go index 39fa339a..e631c61c 100644 --- a/qt6/gen_qanimationgroup.go +++ b/qt6/gen_qanimationgroup.go @@ -14,7 +14,8 @@ import ( ) type QAnimationGroup struct { - h *C.QAnimationGroup + h *C.QAnimationGroup + isSubclass bool *QAbstractAnimation } @@ -32,15 +33,23 @@ func (this *QAnimationGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAnimationGroup(h *C.QAnimationGroup) *QAnimationGroup { +// newQAnimationGroup constructs the type using only CGO pointers. +func newQAnimationGroup(h *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QAnimationGroup { if h == nil { return nil } - return &QAnimationGroup{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))} + return &QAnimationGroup{h: h, + QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQAnimationGroup(h unsafe.Pointer) *QAnimationGroup { - return newQAnimationGroup((*C.QAnimationGroup)(h)) +// UnsafeNewQAnimationGroup constructs the type using only unsafe pointers. +func UnsafeNewQAnimationGroup(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationGroup { + if h == nil { + return nil + } + + return &QAnimationGroup{h: (*C.QAnimationGroup)(h), + QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } func (this *QAnimationGroup) MetaObject() *QMetaObject { @@ -63,7 +72,7 @@ func QAnimationGroup_Tr(s string) string { } func (this *QAnimationGroup) AnimationAt(index int) *QAbstractAnimation { - return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index)))) + return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index))), nil) } func (this *QAnimationGroup) AnimationCount() int { @@ -87,7 +96,7 @@ func (this *QAnimationGroup) RemoveAnimation(animation *QAbstractAnimation) { } func (this *QAnimationGroup) TakeAnimation(index int) *QAbstractAnimation { - return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index)))) + return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index))), nil) } func (this *QAnimationGroup) Clear() { @@ -118,7 +127,7 @@ func QAnimationGroup_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAnimationGroup) Delete() { - C.QAnimationGroup_Delete(this.h) + C.QAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qanimationgroup.h b/qt6/gen_qanimationgroup.h index 83cadb49..7a57f0e9 100644 --- a/qt6/gen_qanimationgroup.h +++ b/qt6/gen_qanimationgroup.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QAbstractAnimation; class QAnimationGroup; +class QEvent; class QMetaObject; +class QObject; #else typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QAnimationGroup QAnimationGroup; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self); @@ -35,9 +39,10 @@ void QAnimationGroup_InsertAnimation(QAnimationGroup* self, int index, QAbstract void QAnimationGroup_RemoveAnimation(QAnimationGroup* self, QAbstractAnimation* animation); QAbstractAnimation* QAnimationGroup_TakeAnimation(QAnimationGroup* self, int index); void QAnimationGroup_Clear(QAnimationGroup* self); +bool QAnimationGroup_Event(QAnimationGroup* self, QEvent* event); struct miqt_string QAnimationGroup_Tr2(const char* s, const char* c); struct miqt_string QAnimationGroup_Tr3(const char* s, const char* c, int n); -void QAnimationGroup_Delete(QAnimationGroup* self); +void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qanystringview.cpp b/qt6/gen_qanystringview.cpp index b1cde6e4..26227ecf 100644 --- a/qt6/gen_qanystringview.cpp +++ b/qt6/gen_qanystringview.cpp @@ -8,26 +8,31 @@ #include "gen_qanystringview.h" #include "_cgo_export.h" -QAnyStringView* QAnyStringView_new() { - return new QAnyStringView(); +void QAnyStringView_new(QAnyStringView** outptr_QAnyStringView) { + QAnyStringView* ret = new QAnyStringView(); + *outptr_QAnyStringView = ret; } -QAnyStringView* QAnyStringView_new2(struct miqt_string str) { +void QAnyStringView_new2(struct miqt_string str, QAnyStringView** outptr_QAnyStringView) { QByteArray str_QByteArray(str.data, str.len); - return new QAnyStringView(str_QByteArray); + QAnyStringView* ret = new QAnyStringView(str_QByteArray); + *outptr_QAnyStringView = ret; } -QAnyStringView* QAnyStringView_new3(struct miqt_string str) { +void QAnyStringView_new3(struct miqt_string str, QAnyStringView** outptr_QAnyStringView) { QString str_QString = QString::fromUtf8(str.data, str.len); - return new QAnyStringView(str_QString); + QAnyStringView* ret = new QAnyStringView(str_QString); + *outptr_QAnyStringView = ret; } -QAnyStringView* QAnyStringView_new4(QChar* c) { - return new QAnyStringView(*c); +void QAnyStringView_new4(QChar* c, QAnyStringView** outptr_QAnyStringView) { + QAnyStringView* ret = new QAnyStringView(*c); + *outptr_QAnyStringView = ret; } -QAnyStringView* QAnyStringView_new5(QAnyStringView* param1) { - return new QAnyStringView(*param1); +void QAnyStringView_new5(QAnyStringView* param1, QAnyStringView** outptr_QAnyStringView) { + QAnyStringView* ret = new QAnyStringView(*param1); + *outptr_QAnyStringView = ret; } struct miqt_string QAnyStringView_ToString(const QAnyStringView* self) { @@ -92,7 +97,11 @@ int QAnyStringView_Compare3(QAnyStringView* lhs, QAnyStringView* rhs, int cs) { return QAnyStringView::compare(*lhs, *rhs, static_cast(cs)); } -void QAnyStringView_Delete(QAnyStringView* self) { - delete self; +void QAnyStringView_Delete(QAnyStringView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qanystringview.go b/qt6/gen_qanystringview.go index 9d7c48d2..cefd7dba 100644 --- a/qt6/gen_qanystringview.go +++ b/qt6/gen_qanystringview.go @@ -14,7 +14,8 @@ import ( ) type QAnyStringView struct { - h *C.QAnyStringView + h *C.QAnyStringView + isSubclass bool } func (this *QAnyStringView) cPointer() *C.QAnyStringView { @@ -31,6 +32,7 @@ func (this *QAnyStringView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAnyStringView constructs the type using only CGO pointers. func newQAnyStringView(h *C.QAnyStringView) *QAnyStringView { if h == nil { return nil @@ -38,14 +40,23 @@ func newQAnyStringView(h *C.QAnyStringView) *QAnyStringView { return &QAnyStringView{h: h} } +// UnsafeNewQAnyStringView constructs the type using only unsafe pointers. func UnsafeNewQAnyStringView(h unsafe.Pointer) *QAnyStringView { - return newQAnyStringView((*C.QAnyStringView)(h)) + if h == nil { + return nil + } + + return &QAnyStringView{h: (*C.QAnyStringView)(h)} } // NewQAnyStringView constructs a new QAnyStringView object. func NewQAnyStringView() *QAnyStringView { - ret := C.QAnyStringView_new() - return newQAnyStringView(ret) + var outptr_QAnyStringView *C.QAnyStringView = nil + + C.QAnyStringView_new(&outptr_QAnyStringView) + ret := newQAnyStringView(outptr_QAnyStringView) + ret.isSubclass = true + return ret } // NewQAnyStringView2 constructs a new QAnyStringView object. @@ -53,8 +64,12 @@ func NewQAnyStringView2(str []byte) *QAnyStringView { str_alias := C.struct_miqt_string{} str_alias.data = (*C.char)(unsafe.Pointer(&str[0])) str_alias.len = C.size_t(len(str)) - ret := C.QAnyStringView_new2(str_alias) - return newQAnyStringView(ret) + var outptr_QAnyStringView *C.QAnyStringView = nil + + C.QAnyStringView_new2(str_alias, &outptr_QAnyStringView) + ret := newQAnyStringView(outptr_QAnyStringView) + ret.isSubclass = true + return ret } // NewQAnyStringView3 constructs a new QAnyStringView object. @@ -63,20 +78,32 @@ func NewQAnyStringView3(str string) *QAnyStringView { str_ms.data = C.CString(str) str_ms.len = C.size_t(len(str)) defer C.free(unsafe.Pointer(str_ms.data)) - ret := C.QAnyStringView_new3(str_ms) - return newQAnyStringView(ret) + var outptr_QAnyStringView *C.QAnyStringView = nil + + C.QAnyStringView_new3(str_ms, &outptr_QAnyStringView) + ret := newQAnyStringView(outptr_QAnyStringView) + ret.isSubclass = true + return ret } // NewQAnyStringView4 constructs a new QAnyStringView object. func NewQAnyStringView4(c *QChar) *QAnyStringView { - ret := C.QAnyStringView_new4(c.cPointer()) - return newQAnyStringView(ret) + var outptr_QAnyStringView *C.QAnyStringView = nil + + C.QAnyStringView_new4(c.cPointer(), &outptr_QAnyStringView) + ret := newQAnyStringView(outptr_QAnyStringView) + ret.isSubclass = true + return ret } // NewQAnyStringView5 constructs a new QAnyStringView object. func NewQAnyStringView5(param1 *QAnyStringView) *QAnyStringView { - ret := C.QAnyStringView_new5(param1.cPointer()) - return newQAnyStringView(ret) + var outptr_QAnyStringView *C.QAnyStringView = nil + + C.QAnyStringView_new5(param1.cPointer(), &outptr_QAnyStringView) + ret := newQAnyStringView(outptr_QAnyStringView) + ret.isSubclass = true + return ret } func (this *QAnyStringView) ToString() string { @@ -142,7 +169,7 @@ func QAnyStringView_Compare3(lhs QAnyStringView, rhs QAnyStringView, cs CaseSens // Delete this object from C++ memory. func (this *QAnyStringView) Delete() { - C.QAnyStringView_Delete(this.h) + C.QAnyStringView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qanystringview.h b/qt6/gen_qanystringview.h index 662bd372..d339db73 100644 --- a/qt6/gen_qanystringview.h +++ b/qt6/gen_qanystringview.h @@ -24,11 +24,11 @@ typedef struct QByteArray QByteArray; typedef struct QChar QChar; #endif -QAnyStringView* QAnyStringView_new(); -QAnyStringView* QAnyStringView_new2(struct miqt_string str); -QAnyStringView* QAnyStringView_new3(struct miqt_string str); -QAnyStringView* QAnyStringView_new4(QChar* c); -QAnyStringView* QAnyStringView_new5(QAnyStringView* param1); +void QAnyStringView_new(QAnyStringView** outptr_QAnyStringView); +void QAnyStringView_new2(struct miqt_string str, QAnyStringView** outptr_QAnyStringView); +void QAnyStringView_new3(struct miqt_string str, QAnyStringView** outptr_QAnyStringView); +void QAnyStringView_new4(QChar* c, QAnyStringView** outptr_QAnyStringView); +void QAnyStringView_new5(QAnyStringView* param1, QAnyStringView** outptr_QAnyStringView); struct miqt_string QAnyStringView_ToString(const QAnyStringView* self); ptrdiff_t QAnyStringView_Size(const QAnyStringView* self); const void* QAnyStringView_Data(const QAnyStringView* self); @@ -42,7 +42,7 @@ bool QAnyStringView_IsNull(const QAnyStringView* self); bool QAnyStringView_IsEmpty(const QAnyStringView* self); ptrdiff_t QAnyStringView_Length(const QAnyStringView* self); int QAnyStringView_Compare3(QAnyStringView* lhs, QAnyStringView* rhs, int cs); -void QAnyStringView_Delete(QAnyStringView* self); +void QAnyStringView_Delete(QAnyStringView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qapplication.cpp b/qt6/gen_qapplication.cpp index 478c051d..409e2be4 100644 --- a/qt6/gen_qapplication.cpp +++ b/qt6/gen_qapplication.cpp @@ -1,7 +1,9 @@ #include +#include #include #include #include +#include #include #include #include @@ -16,12 +18,77 @@ #include "gen_qapplication.h" #include "_cgo_export.h" -QApplication* QApplication_new(int* argc, char** argv) { - return new QApplication(static_cast(*argc), argv); +class MiqtVirtualQApplication : public virtual QApplication { +public: + + MiqtVirtualQApplication(int& argc, char** argv): QApplication(argc, argv) {}; + MiqtVirtualQApplication(int& argc, char** argv, int param3): QApplication(argc, argv, param3) {}; + + virtual ~MiqtVirtualQApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Notify = 0; + + // Subclass to allow providing a Go implementation + virtual bool notify(QObject* param1, QEvent* param2) override { + if (handle__Notify == 0) { + return QApplication::notify(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QApplication_Notify(this, handle__Notify, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Notify(QObject* param1, QEvent* param2) { + + return QApplication::notify(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QApplication::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QApplication_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QApplication::event(param1); + + } + +}; + +void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv); + *outptr_QApplication = ret; + *outptr_QGuiApplication = static_cast(ret); + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QApplication* QApplication_new2(int* argc, char** argv, int param3) { - return new QApplication(static_cast(*argc), argv, static_cast(param3)); +void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv, static_cast(param3)); + *outptr_QApplication = ret; + *outptr_QGuiApplication = static_cast(ret); + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QApplication_MetaObject(const QApplication* self) { @@ -227,7 +294,7 @@ void QApplication_FocusChanged(QApplication* self, QWidget* old, QWidget* now) { } void QApplication_connect_FocusChanged(QApplication* self, intptr_t slot) { - QApplication::connect(self, static_cast(&QApplication::focusChanged), self, [=](QWidget* old, QWidget* now) { + MiqtVirtualQApplication::connect(self, static_cast(&QApplication::focusChanged), self, [=](QWidget* old, QWidget* now) { QWidget* sigval1 = old; QWidget* sigval2 = now; miqt_exec_callback_QApplication_FocusChanged(slot, sigval1, sigval2); @@ -304,7 +371,27 @@ void QApplication_SetEffectEnabled2(int param1, bool enable) { QApplication::setEffectEnabled(static_cast(param1), enable); } -void QApplication_Delete(QApplication* self) { - delete self; +void QApplication_override_virtual_Notify(void* self, intptr_t slot) { + dynamic_cast( (QApplication*)(self) )->handle__Notify = slot; +} + +bool QApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQApplication*)(self) )->virtualbase_Notify(param1, param2); +} + +void QApplication_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QApplication*)(self) )->handle__Event = slot; +} + +bool QApplication_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQApplication*)(self) )->virtualbase_Event(param1); +} + +void QApplication_Delete(QApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qapplication.go b/qt6/gen_qapplication.go index 345a7bba..491c1836 100644 --- a/qt6/gen_qapplication.go +++ b/qt6/gen_qapplication.go @@ -15,7 +15,8 @@ import ( ) type QApplication struct { - h *C.QApplication + h *C.QApplication + isSubclass bool *QGuiApplication } @@ -33,15 +34,23 @@ func (this *QApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQApplication(h *C.QApplication) *QApplication { +// newQApplication constructs the type using only CGO pointers. +func newQApplication(h *C.QApplication, h_QGuiApplication *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QApplication { if h == nil { return nil } - return &QApplication{h: h, QGuiApplication: UnsafeNewQGuiApplication(unsafe.Pointer(h))} + return &QApplication{h: h, + QGuiApplication: newQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} } -func UnsafeNewQApplication(h unsafe.Pointer) *QApplication { - return newQApplication((*C.QApplication)(h)) +// UnsafeNewQApplication constructs the type using only unsafe pointers. +func UnsafeNewQApplication(h unsafe.Pointer, h_QGuiApplication unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QApplication { + if h == nil { + return nil + } + + return &QApplication{h: (*C.QApplication)(h), + QGuiApplication: UnsafeNewQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} } // NewQApplication constructs a new QApplication object. @@ -56,8 +65,15 @@ func NewQApplication(args []string) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QApplication_new(argc, &argv[0]) - return newQApplication(ret) + var outptr_QApplication *C.QApplication = nil + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QApplication_new(argc, &argv[0], &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } // NewQApplication2 constructs a new QApplication object. @@ -72,8 +88,15 @@ func NewQApplication2(args []string, param3 int) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QApplication_new2(argc, &argv[0], (C.int)(param3)) - return newQApplication(ret) + var outptr_QApplication *C.QApplication = nil + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QApplication) MetaObject() *QMetaObject { @@ -96,7 +119,7 @@ func QApplication_Tr(s string) string { } func QApplication_Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_Style())) + return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_Style()), nil) } func QApplication_SetStyle(style *QStyle) { @@ -108,7 +131,7 @@ func QApplication_SetStyleWithStyle(style string) *QStyle { style_ms.data = C.CString(style) style_ms.len = C.size_t(len(style)) defer C.free(unsafe.Pointer(style_ms.data)) - return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_SetStyleWithStyle(style_ms))) + return UnsafeNewQStyle(unsafe.Pointer(C.QApplication_SetStyleWithStyle(style_ms)), nil) } func QApplication_Palette(param1 *QWidget) *QPalette { @@ -170,7 +193,7 @@ func QApplication_AllWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } @@ -180,25 +203,25 @@ func QApplication_TopLevelWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWidget(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func QApplication_ActivePopupWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActivePopupWidget())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActivePopupWidget()), nil, nil) } func QApplication_ActiveModalWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveModalWidget())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveModalWidget()), nil, nil) } func QApplication_FocusWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_FocusWidget())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_FocusWidget()), nil, nil) } func QApplication_ActiveWindow() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveWindow())) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_ActiveWindow()), nil, nil) } func QApplication_SetActiveWindow(act *QWidget) { @@ -206,19 +229,19 @@ func QApplication_SetActiveWindow(act *QWidget) { } func QApplication_WidgetAt(p *QPoint) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt(p.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt(p.cPointer())), nil, nil) } func QApplication_WidgetAt2(x int, y int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y))), nil, nil) } func QApplication_TopLevelAt(p *QPoint) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt(p.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt(p.cPointer())), nil, nil) } func QApplication_TopLevelAt2(x int, y int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y))), nil, nil) } func QApplication_Beep() { @@ -308,8 +331,8 @@ func miqt_exec_callback_QApplication_FocusChanged(cb C.intptr_t, old *C.QWidget, } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWidget(unsafe.Pointer(old)) - slotval2 := UnsafeNewQWidget(unsafe.Pointer(now)) + slotval1 := UnsafeNewQWidget(unsafe.Pointer(old), nil, nil) + slotval2 := UnsafeNewQWidget(unsafe.Pointer(now), nil, nil) gofunc(slotval1, slotval2) } @@ -387,9 +410,60 @@ func QApplication_SetEffectEnabled2(param1 UIEffect, enable bool) { C.QApplication_SetEffectEnabled2((C.int)(param1), (C.bool)(enable)) } +func (this *QApplication) callVirtualBase_Notify(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QApplication_virtualbase_Notify(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QApplication) OnNotify(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QApplication_override_virtual_Notify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QApplication_Notify +func miqt_exec_callback_QApplication_Notify(self *C.QApplication, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QApplication{h: self}).callVirtualBase_Notify, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QApplication) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QApplication_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QApplication) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QApplication_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QApplication_Event +func miqt_exec_callback_QApplication_Event(self *C.QApplication, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QApplication{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QApplication) Delete() { - C.QApplication_Delete(this.h) + C.QApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qapplication.h b/qt6/gen_qapplication.h index 2058eb93..c5620dad 100644 --- a/qt6/gen_qapplication.h +++ b/qt6/gen_qapplication.h @@ -16,9 +16,11 @@ extern "C" { #ifdef __cplusplus class QApplication; +class QCoreApplication; class QEvent; class QFont; class QFontMetrics; +class QGuiApplication; class QMetaObject; class QObject; class QPalette; @@ -27,9 +29,11 @@ class QStyle; class QWidget; #else typedef struct QApplication QApplication; +typedef struct QCoreApplication QCoreApplication; typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFontMetrics QFontMetrics; +typedef struct QGuiApplication QGuiApplication; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPalette QPalette; @@ -38,8 +42,8 @@ typedef struct QStyle QStyle; typedef struct QWidget QWidget; #endif -QApplication* QApplication_new(int* argc, char** argv); -QApplication* QApplication_new2(int* argc, char** argv, int param3); +void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); QMetaObject* QApplication_MetaObject(const QApplication* self); void* QApplication_Metacast(QApplication* self, const char* param1); struct miqt_string QApplication_Tr(const char* s); @@ -91,13 +95,18 @@ void QApplication_SetAutoSipEnabled(QApplication* self, const bool enabled); bool QApplication_AutoSipEnabled(const QApplication* self); void QApplication_CloseAllWindows(); void QApplication_AboutQt(); +bool QApplication_Event(QApplication* self, QEvent* param1); struct miqt_string QApplication_Tr2(const char* s, const char* c); struct miqt_string QApplication_Tr3(const char* s, const char* c, int n); void QApplication_SetPalette2(QPalette* param1, const char* className); void QApplication_SetFont2(QFont* param1, const char* className); void QApplication_Alert2(QWidget* widget, int duration); void QApplication_SetEffectEnabled2(int param1, bool enable); -void QApplication_Delete(QApplication* self); +void QApplication_override_virtual_Notify(void* self, intptr_t slot); +bool QApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2); +void QApplication_override_virtual_Event(void* self, intptr_t slot); +bool QApplication_virtualbase_Event(void* self, QEvent* param1); +void QApplication_Delete(QApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qarraydata.cpp b/qt6/gen_qarraydata.cpp index e9598c8e..e65fe4a8 100644 --- a/qt6/gen_qarraydata.cpp +++ b/qt6/gen_qarraydata.cpp @@ -59,11 +59,19 @@ void QArrayData_Deallocate(QArrayData* data, ptrdiff_t objectSize, ptrdiff_t ali QArrayData::deallocate(data, (qsizetype)(objectSize), (qsizetype)(alignment)); } -void QArrayData_Delete(QArrayData* self) { - delete self; +void QArrayData_Delete(QArrayData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self) { - delete self; +void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qarraydata.go b/qt6/gen_qarraydata.go index f4c0e899..c2c0b032 100644 --- a/qt6/gen_qarraydata.go +++ b/qt6/gen_qarraydata.go @@ -44,7 +44,8 @@ const ( ) type QArrayData struct { - h *C.QArrayData + h *C.QArrayData + isSubclass bool } func (this *QArrayData) cPointer() *C.QArrayData { @@ -61,6 +62,7 @@ func (this *QArrayData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQArrayData constructs the type using only CGO pointers. func newQArrayData(h *C.QArrayData) *QArrayData { if h == nil { return nil @@ -68,8 +70,13 @@ func newQArrayData(h *C.QArrayData) *QArrayData { return &QArrayData{h: h} } +// UnsafeNewQArrayData constructs the type using only unsafe pointers. func UnsafeNewQArrayData(h unsafe.Pointer) *QArrayData { - return newQArrayData((*C.QArrayData)(h)) + if h == nil { + return nil + } + + return &QArrayData{h: (*C.QArrayData)(h)} } func (this *QArrayData) AllocatedCapacity() int64 { @@ -122,7 +129,7 @@ func QArrayData_Deallocate(data *QArrayData, objectSize int64, alignment int64) // Delete this object from C++ memory. func (this *QArrayData) Delete() { - C.QArrayData_Delete(this.h) + C.QArrayData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -135,7 +142,8 @@ func (this *QArrayData) GoGC() { } type QtPrivate__QContainerImplHelper struct { - h *C.QtPrivate__QContainerImplHelper + h *C.QtPrivate__QContainerImplHelper + isSubclass bool } func (this *QtPrivate__QContainerImplHelper) cPointer() *C.QtPrivate__QContainerImplHelper { @@ -152,6 +160,7 @@ func (this *QtPrivate__QContainerImplHelper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QContainerImplHelper constructs the type using only CGO pointers. func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *QtPrivate__QContainerImplHelper { if h == nil { return nil @@ -159,13 +168,18 @@ func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *Q return &QtPrivate__QContainerImplHelper{h: h} } +// UnsafeNewQtPrivate__QContainerImplHelper constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QContainerImplHelper(h unsafe.Pointer) *QtPrivate__QContainerImplHelper { - return newQtPrivate__QContainerImplHelper((*C.QtPrivate__QContainerImplHelper)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QContainerImplHelper{h: (*C.QtPrivate__QContainerImplHelper)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__QContainerImplHelper) Delete() { - C.QtPrivate__QContainerImplHelper_Delete(this.h) + C.QtPrivate__QContainerImplHelper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qarraydata.h b/qt6/gen_qarraydata.h index a14d427e..7389b889 100644 --- a/qt6/gen_qarraydata.h +++ b/qt6/gen_qarraydata.h @@ -35,9 +35,9 @@ bool QArrayData_NeedsDetach(const QArrayData* self); ptrdiff_t QArrayData_DetachCapacity(const QArrayData* self, ptrdiff_t newSize); struct miqt_map /* tuple of QArrayData* and void* */ QArrayData_ReallocateUnaligned(QArrayData* data, void* dataPointer, ptrdiff_t objectSize, ptrdiff_t newCapacity, int option); void QArrayData_Deallocate(QArrayData* data, ptrdiff_t objectSize, ptrdiff_t alignment); -void QArrayData_Delete(QArrayData* self); +void QArrayData_Delete(QArrayData* self, bool isSubclass); -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self); +void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbackingstore.cpp b/qt6/gen_qbackingstore.cpp index 8aff21b2..6383eba6 100644 --- a/qt6/gen_qbackingstore.cpp +++ b/qt6/gen_qbackingstore.cpp @@ -8,8 +8,9 @@ #include "gen_qbackingstore.h" #include "_cgo_export.h" -QBackingStore* QBackingStore_new(QWindow* window) { - return new QBackingStore(window); +void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore) { + QBackingStore* ret = new QBackingStore(window); + *outptr_QBackingStore = ret; } QWindow* QBackingStore_Window(const QBackingStore* self) { @@ -64,7 +65,11 @@ void QBackingStore_Flush3(QBackingStore* self, QRegion* region, QWindow* window, self->flush(*region, window, *offset); } -void QBackingStore_Delete(QBackingStore* self) { - delete self; +void QBackingStore_Delete(QBackingStore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbackingstore.go b/qt6/gen_qbackingstore.go index 2510b396..75ae6c88 100644 --- a/qt6/gen_qbackingstore.go +++ b/qt6/gen_qbackingstore.go @@ -14,7 +14,8 @@ import ( ) type QBackingStore struct { - h *C.QBackingStore + h *C.QBackingStore + isSubclass bool } func (this *QBackingStore) cPointer() *C.QBackingStore { @@ -31,6 +32,7 @@ func (this *QBackingStore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBackingStore constructs the type using only CGO pointers. func newQBackingStore(h *C.QBackingStore) *QBackingStore { if h == nil { return nil @@ -38,18 +40,27 @@ func newQBackingStore(h *C.QBackingStore) *QBackingStore { return &QBackingStore{h: h} } +// UnsafeNewQBackingStore constructs the type using only unsafe pointers. func UnsafeNewQBackingStore(h unsafe.Pointer) *QBackingStore { - return newQBackingStore((*C.QBackingStore)(h)) + if h == nil { + return nil + } + + return &QBackingStore{h: (*C.QBackingStore)(h)} } // NewQBackingStore constructs a new QBackingStore object. func NewQBackingStore(window *QWindow) *QBackingStore { - ret := C.QBackingStore_new(window.cPointer()) - return newQBackingStore(ret) + var outptr_QBackingStore *C.QBackingStore = nil + + C.QBackingStore_new(window.cPointer(), &outptr_QBackingStore) + ret := newQBackingStore(outptr_QBackingStore) + ret.isSubclass = true + return ret } func (this *QBackingStore) Window() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QBackingStore_Window(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QBackingStore_Window(this.h)), nil, nil) } func (this *QBackingStore) PaintDevice() *QPaintDevice { @@ -108,7 +119,7 @@ func (this *QBackingStore) Flush3(region *QRegion, window *QWindow, offset *QPoi // Delete this object from C++ memory. func (this *QBackingStore) Delete() { - C.QBackingStore_Delete(this.h) + C.QBackingStore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbackingstore.h b/qt6/gen_qbackingstore.h index 0b649e07..5dfe99b0 100644 --- a/qt6/gen_qbackingstore.h +++ b/qt6/gen_qbackingstore.h @@ -30,7 +30,7 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -QBackingStore* QBackingStore_new(QWindow* window); +void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore); QWindow* QBackingStore_Window(const QBackingStore* self); QPaintDevice* QBackingStore_PaintDevice(QBackingStore* self); void QBackingStore_Flush(QBackingStore* self, QRegion* region); @@ -44,7 +44,7 @@ QRegion* QBackingStore_StaticContents(const QBackingStore* self); bool QBackingStore_HasStaticContents(const QBackingStore* self); void QBackingStore_Flush2(QBackingStore* self, QRegion* region, QWindow* window); void QBackingStore_Flush3(QBackingStore* self, QRegion* region, QWindow* window, QPoint* offset); -void QBackingStore_Delete(QBackingStore* self); +void QBackingStore_Delete(QBackingStore* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbasictimer.cpp b/qt6/gen_qbasictimer.cpp index ae4688b2..052a7b21 100644 --- a/qt6/gen_qbasictimer.cpp +++ b/qt6/gen_qbasictimer.cpp @@ -4,8 +4,9 @@ #include "gen_qbasictimer.h" #include "_cgo_export.h" -QBasicTimer* QBasicTimer_new() { - return new QBasicTimer(); +void QBasicTimer_new(QBasicTimer** outptr_QBasicTimer) { + QBasicTimer* ret = new QBasicTimer(); + *outptr_QBasicTimer = ret; } void QBasicTimer_Swap(QBasicTimer* self, QBasicTimer* other) { @@ -32,7 +33,11 @@ void QBasicTimer_Stop(QBasicTimer* self) { self->stop(); } -void QBasicTimer_Delete(QBasicTimer* self) { - delete self; +void QBasicTimer_Delete(QBasicTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbasictimer.go b/qt6/gen_qbasictimer.go index f36c1532..307f9def 100644 --- a/qt6/gen_qbasictimer.go +++ b/qt6/gen_qbasictimer.go @@ -14,7 +14,8 @@ import ( ) type QBasicTimer struct { - h *C.QBasicTimer + h *C.QBasicTimer + isSubclass bool } func (this *QBasicTimer) cPointer() *C.QBasicTimer { @@ -31,6 +32,7 @@ func (this *QBasicTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBasicTimer constructs the type using only CGO pointers. func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer { if h == nil { return nil @@ -38,14 +40,23 @@ func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer { return &QBasicTimer{h: h} } +// UnsafeNewQBasicTimer constructs the type using only unsafe pointers. func UnsafeNewQBasicTimer(h unsafe.Pointer) *QBasicTimer { - return newQBasicTimer((*C.QBasicTimer)(h)) + if h == nil { + return nil + } + + return &QBasicTimer{h: (*C.QBasicTimer)(h)} } // NewQBasicTimer constructs a new QBasicTimer object. func NewQBasicTimer() *QBasicTimer { - ret := C.QBasicTimer_new() - return newQBasicTimer(ret) + var outptr_QBasicTimer *C.QBasicTimer = nil + + C.QBasicTimer_new(&outptr_QBasicTimer) + ret := newQBasicTimer(outptr_QBasicTimer) + ret.isSubclass = true + return ret } func (this *QBasicTimer) Swap(other *QBasicTimer) { @@ -74,7 +85,7 @@ func (this *QBasicTimer) Stop() { // Delete this object from C++ memory. func (this *QBasicTimer) Delete() { - C.QBasicTimer_Delete(this.h) + C.QBasicTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbasictimer.h b/qt6/gen_qbasictimer.h index 5c49a336..31819d27 100644 --- a/qt6/gen_qbasictimer.h +++ b/qt6/gen_qbasictimer.h @@ -22,14 +22,14 @@ typedef struct QBasicTimer QBasicTimer; typedef struct QObject QObject; #endif -QBasicTimer* QBasicTimer_new(); +void QBasicTimer_new(QBasicTimer** outptr_QBasicTimer); void QBasicTimer_Swap(QBasicTimer* self, QBasicTimer* other); bool QBasicTimer_IsActive(const QBasicTimer* self); int QBasicTimer_TimerId(const QBasicTimer* self); void QBasicTimer_Start(QBasicTimer* self, int msec, QObject* obj); void QBasicTimer_Start2(QBasicTimer* self, int msec, int timerType, QObject* obj); void QBasicTimer_Stop(QBasicTimer* self); -void QBasicTimer_Delete(QBasicTimer* self); +void QBasicTimer_Delete(QBasicTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbindingstorage.cpp b/qt6/gen_qbindingstorage.cpp index c82d6707..7c417195 100644 --- a/qt6/gen_qbindingstorage.cpp +++ b/qt6/gen_qbindingstorage.cpp @@ -5,12 +5,17 @@ #include "gen_qbindingstorage.h" #include "_cgo_export.h" -void QBindingStatus_Delete(QBindingStatus* self) { - delete self; +void QBindingStatus_Delete(QBindingStatus* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QBindingStorage* QBindingStorage_new() { - return new QBindingStorage(); +void QBindingStorage_new(QBindingStorage** outptr_QBindingStorage) { + QBindingStorage* ret = new QBindingStorage(); + *outptr_QBindingStorage = ret; } bool QBindingStorage_IsEmpty(QBindingStorage* self) { @@ -25,7 +30,11 @@ void QBindingStorage_RegisterDependency(const QBindingStorage* self, QUntypedPro self->registerDependency(data); } -void QBindingStorage_Delete(QBindingStorage* self) { - delete self; +void QBindingStorage_Delete(QBindingStorage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbindingstorage.go b/qt6/gen_qbindingstorage.go index 32d64b27..9d814e8a 100644 --- a/qt6/gen_qbindingstorage.go +++ b/qt6/gen_qbindingstorage.go @@ -14,7 +14,8 @@ import ( ) type QBindingStatus struct { - h *C.QBindingStatus + h *C.QBindingStatus + isSubclass bool } func (this *QBindingStatus) cPointer() *C.QBindingStatus { @@ -31,6 +32,7 @@ func (this *QBindingStatus) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBindingStatus constructs the type using only CGO pointers. func newQBindingStatus(h *C.QBindingStatus) *QBindingStatus { if h == nil { return nil @@ -38,13 +40,18 @@ func newQBindingStatus(h *C.QBindingStatus) *QBindingStatus { return &QBindingStatus{h: h} } +// UnsafeNewQBindingStatus constructs the type using only unsafe pointers. func UnsafeNewQBindingStatus(h unsafe.Pointer) *QBindingStatus { - return newQBindingStatus((*C.QBindingStatus)(h)) + if h == nil { + return nil + } + + return &QBindingStatus{h: (*C.QBindingStatus)(h)} } // Delete this object from C++ memory. func (this *QBindingStatus) Delete() { - C.QBindingStatus_Delete(this.h) + C.QBindingStatus_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -57,7 +64,8 @@ func (this *QBindingStatus) GoGC() { } type QBindingStorage struct { - h *C.QBindingStorage + h *C.QBindingStorage + isSubclass bool } func (this *QBindingStorage) cPointer() *C.QBindingStorage { @@ -74,6 +82,7 @@ func (this *QBindingStorage) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBindingStorage constructs the type using only CGO pointers. func newQBindingStorage(h *C.QBindingStorage) *QBindingStorage { if h == nil { return nil @@ -81,14 +90,23 @@ func newQBindingStorage(h *C.QBindingStorage) *QBindingStorage { return &QBindingStorage{h: h} } +// UnsafeNewQBindingStorage constructs the type using only unsafe pointers. func UnsafeNewQBindingStorage(h unsafe.Pointer) *QBindingStorage { - return newQBindingStorage((*C.QBindingStorage)(h)) + if h == nil { + return nil + } + + return &QBindingStorage{h: (*C.QBindingStorage)(h)} } // NewQBindingStorage constructs a new QBindingStorage object. func NewQBindingStorage() *QBindingStorage { - ret := C.QBindingStorage_new() - return newQBindingStorage(ret) + var outptr_QBindingStorage *C.QBindingStorage = nil + + C.QBindingStorage_new(&outptr_QBindingStorage) + ret := newQBindingStorage(outptr_QBindingStorage) + ret.isSubclass = true + return ret } func (this *QBindingStorage) IsEmpty() bool { @@ -105,7 +123,7 @@ func (this *QBindingStorage) RegisterDependency(data *QUntypedPropertyData) { // Delete this object from C++ memory. func (this *QBindingStorage) Delete() { - C.QBindingStorage_Delete(this.h) + C.QBindingStorage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbindingstorage.h b/qt6/gen_qbindingstorage.h index c1aa4903..b3639349 100644 --- a/qt6/gen_qbindingstorage.h +++ b/qt6/gen_qbindingstorage.h @@ -24,13 +24,13 @@ typedef struct QBindingStorage QBindingStorage; typedef struct QUntypedPropertyData QUntypedPropertyData; #endif -void QBindingStatus_Delete(QBindingStatus* self); +void QBindingStatus_Delete(QBindingStatus* self, bool isSubclass); -QBindingStorage* QBindingStorage_new(); +void QBindingStorage_new(QBindingStorage** outptr_QBindingStorage); bool QBindingStorage_IsEmpty(QBindingStorage* self); bool QBindingStorage_IsValid(const QBindingStorage* self); void QBindingStorage_RegisterDependency(const QBindingStorage* self, QUntypedPropertyData* data); -void QBindingStorage_Delete(QBindingStorage* self); +void QBindingStorage_Delete(QBindingStorage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbitarray.cpp b/qt6/gen_qbitarray.cpp index c9fa0fd2..009eac2b 100644 --- a/qt6/gen_qbitarray.cpp +++ b/qt6/gen_qbitarray.cpp @@ -4,20 +4,24 @@ #include "gen_qbitarray.h" #include "_cgo_export.h" -QBitArray* QBitArray_new() { - return new QBitArray(); +void QBitArray_new(QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray(); + *outptr_QBitArray = ret; } -QBitArray* QBitArray_new2(ptrdiff_t size) { - return new QBitArray((qsizetype)(size)); +void QBitArray_new2(ptrdiff_t size, QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray((qsizetype)(size)); + *outptr_QBitArray = ret; } -QBitArray* QBitArray_new3(QBitArray* other) { - return new QBitArray(*other); +void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray(*other); + *outptr_QBitArray = ret; } -QBitArray* QBitArray_new4(ptrdiff_t size, bool val) { - return new QBitArray((qsizetype)(size), val); +void QBitArray_new4(ptrdiff_t size, bool val, QBitArray** outptr_QBitArray) { + QBitArray* ret = new QBitArray((qsizetype)(size), val); + *outptr_QBitArray = ret; } void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other) { @@ -153,12 +157,17 @@ unsigned int QBitArray_ToUInt322(const QBitArray* self, int endianness, bool* ok return static_cast(_ret); } -void QBitArray_Delete(QBitArray* self) { - delete self; +void QBitArray_Delete(QBitArray* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QBitRef* QBitRef_new(QBitRef* param1) { - return new QBitRef(*param1); +void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef) { + QBitRef* ret = new QBitRef(*param1); + *outptr_QBitRef = ret; } bool QBitRef_OperatorNot(const QBitRef* self) { @@ -173,7 +182,11 @@ void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val) { self->operator=(val); } -void QBitRef_Delete(QBitRef* self) { - delete self; +void QBitRef_Delete(QBitRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbitarray.go b/qt6/gen_qbitarray.go index 55c927f7..b21c8cc7 100644 --- a/qt6/gen_qbitarray.go +++ b/qt6/gen_qbitarray.go @@ -14,7 +14,8 @@ import ( ) type QBitArray struct { - h *C.QBitArray + h *C.QBitArray + isSubclass bool } func (this *QBitArray) cPointer() *C.QBitArray { @@ -31,6 +32,7 @@ func (this *QBitArray) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBitArray constructs the type using only CGO pointers. func newQBitArray(h *C.QBitArray) *QBitArray { if h == nil { return nil @@ -38,32 +40,53 @@ func newQBitArray(h *C.QBitArray) *QBitArray { return &QBitArray{h: h} } +// UnsafeNewQBitArray constructs the type using only unsafe pointers. func UnsafeNewQBitArray(h unsafe.Pointer) *QBitArray { - return newQBitArray((*C.QBitArray)(h)) + if h == nil { + return nil + } + + return &QBitArray{h: (*C.QBitArray)(h)} } // NewQBitArray constructs a new QBitArray object. func NewQBitArray() *QBitArray { - ret := C.QBitArray_new() - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new(&outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } // NewQBitArray2 constructs a new QBitArray object. func NewQBitArray2(size int64) *QBitArray { - ret := C.QBitArray_new2((C.ptrdiff_t)(size)) - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new2((C.ptrdiff_t)(size), &outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } // NewQBitArray3 constructs a new QBitArray object. func NewQBitArray3(other *QBitArray) *QBitArray { - ret := C.QBitArray_new3(other.cPointer()) - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new3(other.cPointer(), &outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } // NewQBitArray4 constructs a new QBitArray object. func NewQBitArray4(size int64, val bool) *QBitArray { - ret := C.QBitArray_new4((C.ptrdiff_t)(size), (C.bool)(val)) - return newQBitArray(ret) + var outptr_QBitArray *C.QBitArray = nil + + C.QBitArray_new4((C.ptrdiff_t)(size), (C.bool)(val), &outptr_QBitArray) + ret := newQBitArray(outptr_QBitArray) + ret.isSubclass = true + return ret } func (this *QBitArray) OperatorAssign(other *QBitArray) { @@ -205,7 +228,7 @@ func (this *QBitArray) ToUInt322(endianness QSysInfo__Endian, ok *bool) uint { // Delete this object from C++ memory. func (this *QBitArray) Delete() { - C.QBitArray_Delete(this.h) + C.QBitArray_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -218,7 +241,8 @@ func (this *QBitArray) GoGC() { } type QBitRef struct { - h *C.QBitRef + h *C.QBitRef + isSubclass bool } func (this *QBitRef) cPointer() *C.QBitRef { @@ -235,6 +259,7 @@ func (this *QBitRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBitRef constructs the type using only CGO pointers. func newQBitRef(h *C.QBitRef) *QBitRef { if h == nil { return nil @@ -242,14 +267,23 @@ func newQBitRef(h *C.QBitRef) *QBitRef { return &QBitRef{h: h} } +// UnsafeNewQBitRef constructs the type using only unsafe pointers. func UnsafeNewQBitRef(h unsafe.Pointer) *QBitRef { - return newQBitRef((*C.QBitRef)(h)) + if h == nil { + return nil + } + + return &QBitRef{h: (*C.QBitRef)(h)} } // NewQBitRef constructs a new QBitRef object. func NewQBitRef(param1 *QBitRef) *QBitRef { - ret := C.QBitRef_new(param1.cPointer()) - return newQBitRef(ret) + var outptr_QBitRef *C.QBitRef = nil + + C.QBitRef_new(param1.cPointer(), &outptr_QBitRef) + ret := newQBitRef(outptr_QBitRef) + ret.isSubclass = true + return ret } func (this *QBitRef) OperatorNot() bool { @@ -266,7 +300,7 @@ func (this *QBitRef) OperatorAssignWithVal(val bool) { // Delete this object from C++ memory. func (this *QBitRef) Delete() { - C.QBitRef_Delete(this.h) + C.QBitRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbitarray.h b/qt6/gen_qbitarray.h index 6af4a577..412ab3b6 100644 --- a/qt6/gen_qbitarray.h +++ b/qt6/gen_qbitarray.h @@ -22,10 +22,10 @@ typedef struct QBitArray QBitArray; typedef struct QBitRef QBitRef; #endif -QBitArray* QBitArray_new(); -QBitArray* QBitArray_new2(ptrdiff_t size); -QBitArray* QBitArray_new3(QBitArray* other); -QBitArray* QBitArray_new4(ptrdiff_t size, bool val); +void QBitArray_new(QBitArray** outptr_QBitArray); +void QBitArray_new2(ptrdiff_t size, QBitArray** outptr_QBitArray); +void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray); +void QBitArray_new4(ptrdiff_t size, bool val, QBitArray** outptr_QBitArray); void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other); void QBitArray_Swap(QBitArray* self, QBitArray* other); ptrdiff_t QBitArray_Size(const QBitArray* self); @@ -58,13 +58,13 @@ QBitArray* QBitArray_FromBits(const char* data, ptrdiff_t lenVal); unsigned int QBitArray_ToUInt32(const QBitArray* self, int endianness); bool QBitArray_Fill22(QBitArray* self, bool val, ptrdiff_t size); unsigned int QBitArray_ToUInt322(const QBitArray* self, int endianness, bool* ok); -void QBitArray_Delete(QBitArray* self); +void QBitArray_Delete(QBitArray* self, bool isSubclass); -QBitRef* QBitRef_new(QBitRef* param1); +void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef); bool QBitRef_OperatorNot(const QBitRef* self); void QBitRef_OperatorAssign(QBitRef* self, QBitRef* val); void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val); -void QBitRef_Delete(QBitRef* self); +void QBitRef_Delete(QBitRef* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbitmap.cpp b/qt6/gen_qbitmap.cpp index 8b794077..01394e8e 100644 --- a/qt6/gen_qbitmap.cpp +++ b/qt6/gen_qbitmap.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include @@ -10,34 +12,138 @@ #include "gen_qbitmap.h" #include "_cgo_export.h" -QBitmap* QBitmap_new() { - return new QBitmap(); +class MiqtVirtualQBitmap : public virtual QBitmap { +public: + + MiqtVirtualQBitmap(): QBitmap() {}; + MiqtVirtualQBitmap(const QPixmap& param1): QBitmap(param1) {}; + MiqtVirtualQBitmap(int w, int h): QBitmap(w, h) {}; + MiqtVirtualQBitmap(const QSize& param1): QBitmap(param1) {}; + MiqtVirtualQBitmap(const QString& fileName): QBitmap(fileName) {}; + MiqtVirtualQBitmap(const QBitmap& param1): QBitmap(param1) {}; + MiqtVirtualQBitmap(const QString& fileName, const char* format): QBitmap(fileName, format) {}; + + virtual ~MiqtVirtualQBitmap() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QBitmap::devType(); + } + + + int callback_return_value = miqt_exec_callback_QBitmap_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QBitmap::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QBitmap::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QBitmap_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QBitmap::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QBitmap::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QBitmap_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QBitmap::metric(static_cast(param1)); + + } + +}; + +void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new2(QPixmap* param1) { - return new QBitmap(*param1); +void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new3(int w, int h) { - return new QBitmap(static_cast(w), static_cast(h)); +void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(static_cast(w), static_cast(h)); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new4(QSize* param1) { - return new QBitmap(*param1); +void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new5(struct miqt_string fileName) { +void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QBitmap(fileName_QString); + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new6(QBitmap* param1) { - return new QBitmap(*param1); +void QBitmap_new6(QBitmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format) { +void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QBitmap(fileName_QString, format); + MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString, format); + *outptr_QBitmap = ret; + *outptr_QPixmap = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } void QBitmap_OperatorAssign(QBitmap* self, QPixmap* param1) { @@ -80,7 +186,35 @@ QBitmap* QBitmap_FromData3(QSize* size, const unsigned char* bits, int monoForma return new QBitmap(QBitmap::fromData(*size, static_cast(bits), static_cast(monoFormat))); } -void QBitmap_Delete(QBitmap* self) { - delete self; +void QBitmap_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QBitmap*)(self) )->handle__DevType = slot; +} + +int QBitmap_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_DevType(); +} + +void QBitmap_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QBitmap*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QBitmap_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_PaintEngine(); +} + +void QBitmap_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QBitmap*)(self) )->handle__Metric = slot; +} + +int QBitmap_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_Metric(param1); +} + +void QBitmap_Delete(QBitmap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbitmap.go b/qt6/gen_qbitmap.go index 51e1b27e..5bccb07e 100644 --- a/qt6/gen_qbitmap.go +++ b/qt6/gen_qbitmap.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QBitmap struct { - h *C.QBitmap + h *C.QBitmap + isSubclass bool *QPixmap } @@ -32,39 +34,71 @@ func (this *QBitmap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQBitmap(h *C.QBitmap) *QBitmap { +// newQBitmap constructs the type using only CGO pointers. +func newQBitmap(h *C.QBitmap, h_QPixmap *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QBitmap { if h == nil { return nil } - return &QBitmap{h: h, QPixmap: UnsafeNewQPixmap(unsafe.Pointer(h))} + return &QBitmap{h: h, + QPixmap: newQPixmap(h_QPixmap, h_QPaintDevice)} } -func UnsafeNewQBitmap(h unsafe.Pointer) *QBitmap { - return newQBitmap((*C.QBitmap)(h)) +// UnsafeNewQBitmap constructs the type using only unsafe pointers. +func UnsafeNewQBitmap(h unsafe.Pointer, h_QPixmap unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QBitmap { + if h == nil { + return nil + } + + return &QBitmap{h: (*C.QBitmap)(h), + QPixmap: UnsafeNewQPixmap(h_QPixmap, h_QPaintDevice)} } // NewQBitmap constructs a new QBitmap object. func NewQBitmap() *QBitmap { - ret := C.QBitmap_new() - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new(&outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap2 constructs a new QBitmap object. func NewQBitmap2(param1 *QPixmap) *QBitmap { - ret := C.QBitmap_new2(param1.cPointer()) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new2(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap3 constructs a new QBitmap object. func NewQBitmap3(w int, h int) *QBitmap { - ret := C.QBitmap_new3((C.int)(w), (C.int)(h)) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new3((C.int)(w), (C.int)(h), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap4 constructs a new QBitmap object. func NewQBitmap4(param1 *QSize) *QBitmap { - ret := C.QBitmap_new4(param1.cPointer()) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new4(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap5 constructs a new QBitmap object. @@ -73,14 +107,26 @@ func NewQBitmap5(fileName string) *QBitmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QBitmap_new5(fileName_ms) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new5(fileName_ms, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap6 constructs a new QBitmap object. func NewQBitmap6(param1 *QBitmap) *QBitmap { - ret := C.QBitmap_new6(param1.cPointer()) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new6(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQBitmap7 constructs a new QBitmap object. @@ -91,8 +137,14 @@ func NewQBitmap7(fileName string, format string) *QBitmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QBitmap_new7(fileName_ms, format_Cstring) - return newQBitmap(ret) + var outptr_QBitmap *C.QBitmap = nil + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QBitmap_new7(fileName_ms, format_Cstring, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QBitmap) OperatorAssign(param1 *QPixmap) { @@ -109,28 +161,28 @@ func (this *QBitmap) Clear() { func QBitmap_FromImage(image *QImage) *QBitmap { _ret := C.QBitmap_FromImage(image.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData(size *QSize, bits *byte) *QBitmap { _ret := C.QBitmap_FromData(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits))) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromPixmap(pixmap *QPixmap) *QBitmap { _ret := C.QBitmap_FromPixmap(pixmap.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QBitmap) Transformed(matrix *QTransform) *QBitmap { _ret := C.QBitmap_Transformed(this.h, matrix.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -141,21 +193,89 @@ func (this *QBitmap) OperatorAssignWithQBitmap(param1 *QBitmap) { func QBitmap_FromImage2(image *QImage, flags ImageConversionFlag) *QBitmap { _ret := C.QBitmap_FromImage2(image.cPointer(), (C.int)(flags)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData3(size *QSize, bits *byte, monoFormat QImage__Format) *QBitmap { _ret := C.QBitmap_FromData3(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)), (C.int)(monoFormat)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } +func (this *QBitmap) callVirtualBase_DevType() int { + + return (int)(C.QBitmap_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QBitmap) OnDevType(slot func(super func() int) int) { + C.QBitmap_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBitmap_DevType +func miqt_exec_callback_QBitmap_DevType(self *C.QBitmap, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBitmap{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QBitmap) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QBitmap_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QBitmap) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QBitmap_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBitmap_PaintEngine +func miqt_exec_callback_QBitmap_PaintEngine(self *C.QBitmap, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBitmap{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QBitmap) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QBitmap_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QBitmap) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QBitmap_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBitmap_Metric +func miqt_exec_callback_QBitmap_Metric(self *C.QBitmap, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QBitmap{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QBitmap) Delete() { - C.QBitmap_Delete(this.h) + C.QBitmap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbitmap.h b/qt6/gen_qbitmap.h index 0445c351..6387f792 100644 --- a/qt6/gen_qbitmap.h +++ b/qt6/gen_qbitmap.h @@ -17,24 +17,28 @@ extern "C" { #ifdef __cplusplus class QBitmap; class QImage; +class QPaintDevice; +class QPaintEngine; class QPixmap; class QSize; class QTransform; #else typedef struct QBitmap QBitmap; typedef struct QImage QImage; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; typedef struct QPixmap QPixmap; typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -QBitmap* QBitmap_new(); -QBitmap* QBitmap_new2(QPixmap* param1); -QBitmap* QBitmap_new3(int w, int h); -QBitmap* QBitmap_new4(QSize* param1); -QBitmap* QBitmap_new5(struct miqt_string fileName); -QBitmap* QBitmap_new6(QBitmap* param1); -QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format); +void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new6(QBitmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); void QBitmap_OperatorAssign(QBitmap* self, QPixmap* param1); void QBitmap_Swap(QBitmap* self, QBitmap* other); void QBitmap_Clear(QBitmap* self); @@ -45,7 +49,13 @@ QBitmap* QBitmap_Transformed(const QBitmap* self, QTransform* matrix); void QBitmap_OperatorAssignWithQBitmap(QBitmap* self, QBitmap* param1); QBitmap* QBitmap_FromImage2(QImage* image, int flags); QBitmap* QBitmap_FromData3(QSize* size, const unsigned char* bits, int monoFormat); -void QBitmap_Delete(QBitmap* self); +void QBitmap_override_virtual_DevType(void* self, intptr_t slot); +int QBitmap_virtualbase_DevType(const void* self); +void QBitmap_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QBitmap_virtualbase_PaintEngine(const void* self); +void QBitmap_override_virtual_Metric(void* self, intptr_t slot); +int QBitmap_virtualbase_Metric(const void* self, int param1); +void QBitmap_Delete(QBitmap* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qboxlayout.cpp b/qt6/gen_qboxlayout.cpp index 34ba53f8..18c1ef56 100644 --- a/qt6/gen_qboxlayout.cpp +++ b/qt6/gen_qboxlayout.cpp @@ -1,8 +1,10 @@ #include +#include #include #include #include #include +#include #include #include #include @@ -15,12 +17,536 @@ #include "gen_qboxlayout.h" #include "_cgo_export.h" -QBoxLayout* QBoxLayout_new(int param1) { - return new QBoxLayout(static_cast(param1)); +class MiqtVirtualQBoxLayout : public virtual QBoxLayout { +public: + + MiqtVirtualQBoxLayout(QBoxLayout::Direction param1): QBoxLayout(param1) {}; + MiqtVirtualQBoxLayout(QBoxLayout::Direction param1, QWidget* parent): QBoxLayout(param1, parent) {}; + + virtual ~MiqtVirtualQBoxLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItem == 0) { + QBoxLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QBoxLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* param1) { + + QBoxLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Spacing = 0; + + // Subclass to allow providing a Go implementation + virtual int spacing() const override { + if (handle__Spacing == 0) { + return QBoxLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QBoxLayout::spacing(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual void setSpacing(int spacing) override { + if (handle__SetSpacing == 0) { + QBoxLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QBoxLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QBoxLayout::setSpacing(static_cast(spacing)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QBoxLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QBoxLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QBoxLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QBoxLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QBoxLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QBoxLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QBoxLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QBoxLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QBoxLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QBoxLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QBoxLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QBoxLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QBoxLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QBoxLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QBoxLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QBoxLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QBoxLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QBoxLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QBoxLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QBoxLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QBoxLayout::invalidate(); + return; + } + + + miqt_exec_callback_QBoxLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QBoxLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QBoxLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QBoxLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QBoxLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QBoxLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QBoxLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QBoxLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QBoxLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QBoxLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QBoxLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QBoxLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QBoxLayout::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QBoxLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QBoxLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QBoxLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(const QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QBoxLayout::indexOf(param1); + } + + QWidget* sigval1 = (QWidget*) param1; + + int callback_return_value = miqt_exec_callback_QBoxLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QBoxLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QBoxLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QBoxLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QBoxLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QBoxLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QBoxLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QBoxLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReplaceWidget = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* replaceWidget(QWidget* from, QWidget* to, Qt::FindChildOptions options) override { + if (handle__ReplaceWidget == 0) { + return QBoxLayout::replaceWidget(from, to, options); + } + + QWidget* sigval1 = from; + QWidget* sigval2 = to; + Qt::FindChildOptions options_ret = options; + int sigval3 = static_cast(options_ret); + + QLayoutItem* callback_return_value = miqt_exec_callback_QBoxLayout_ReplaceWidget(this, handle__ReplaceWidget, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ReplaceWidget(QWidget* from, QWidget* to, int options) { + + return QBoxLayout::replaceWidget(from, to, static_cast(options)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QBoxLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QBoxLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QBoxLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QBoxLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QBoxLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QBoxLayout::childEvent(e); + + } + +}; + +void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1)); + *outptr_QBoxLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent) { - return new QBoxLayout(static_cast(param1), parent); +void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1), parent); + *outptr_QBoxLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self) { @@ -230,113 +756,1269 @@ void QBoxLayout_InsertLayout3(QBoxLayout* self, int index, QLayout* layout, int self->insertLayout(static_cast(index), layout, static_cast(stretch)); } -void QBoxLayout_Delete(QBoxLayout* self) { - delete self; +void QBoxLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__AddItem = slot; } -QHBoxLayout* QHBoxLayout_new(QWidget* parent) { - return new QHBoxLayout(parent); +void QBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_AddItem(param1); } -QHBoxLayout* QHBoxLayout_new2() { - return new QHBoxLayout(); +void QBoxLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Spacing = slot; } -QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self) { - return (QMetaObject*) self->metaObject(); +int QBoxLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_Spacing(); } -void* QHBoxLayout_Metacast(QHBoxLayout* self, const char* param1) { - return self->qt_metacast(param1); +void QBoxLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__SetSpacing = slot; } -struct miqt_string QHBoxLayout_Tr(const char* s) { - QString _ret = QHBoxLayout::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QBoxLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_SetSpacing(spacing); } -struct miqt_string QHBoxLayout_Tr2(const char* s, const char* c) { - QString _ret = QHBoxLayout::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__SizeHint = slot; } -struct miqt_string QHBoxLayout_Tr3(const char* s, const char* c, int n) { - QString _ret = QHBoxLayout::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QSize* QBoxLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_SizeHint(); } -void QHBoxLayout_Delete(QHBoxLayout* self) { - delete self; +void QBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__MinimumSize = slot; } -QVBoxLayout* QVBoxLayout_new(QWidget* parent) { - return new QVBoxLayout(parent); +QSize* QBoxLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_MinimumSize(); } -QVBoxLayout* QVBoxLayout_new2() { - return new QVBoxLayout(); +void QBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__MaximumSize = slot; } -QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self) { - return (QMetaObject*) self->metaObject(); +QSize* QBoxLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_MaximumSize(); } -void* QVBoxLayout_Metacast(QVBoxLayout* self, const char* param1) { - return self->qt_metacast(param1); +void QBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__HasHeightForWidth = slot; } -struct miqt_string QVBoxLayout_Tr(const char* s) { - QString _ret = QVBoxLayout::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QBoxLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_HasHeightForWidth(); } -struct miqt_string QVBoxLayout_Tr2(const char* s, const char* c) { - QString _ret = QVBoxLayout::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__HeightForWidth = slot; } -struct miqt_string QVBoxLayout_Tr3(const char* s, const char* c, int n) { - QString _ret = QVBoxLayout::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +int QBoxLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QBoxLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Invalidate = slot; +} + +void QBoxLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_Invalidate(); +} + +void QBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QBoxLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QBoxLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QBoxLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Count = slot; +} + +int QBoxLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_Count(); +} + +void QBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__SetGeometry = slot; +} + +void QBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QBoxLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QBoxLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_Geometry(); +} + +void QBoxLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__IndexOf = slot; +} + +int QBoxLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QBoxLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QBoxLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QBoxLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ControlTypes = slot; +} + +int QBoxLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQBoxLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QBoxLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ReplaceWidget = slot; +} + +QLayoutItem* QBoxLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options) { + return ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_ReplaceWidget(from, to, options); +} + +void QBoxLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QBoxLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_Layout(); +} + +void QBoxLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QBoxLayout*)(self) )->handle__ChildEvent = slot; +} + +void QBoxLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQBoxLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QBoxLayout_Delete(QBoxLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQHBoxLayout : public virtual QHBoxLayout { +public: + + MiqtVirtualQHBoxLayout(QWidget* parent): QHBoxLayout(parent) {}; + MiqtVirtualQHBoxLayout(): QHBoxLayout() {}; + + virtual ~MiqtVirtualQHBoxLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItem == 0) { + QHBoxLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QHBoxLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* param1) { + + QHBoxLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Spacing = 0; + + // Subclass to allow providing a Go implementation + virtual int spacing() const override { + if (handle__Spacing == 0) { + return QHBoxLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QHBoxLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QHBoxLayout::spacing(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual void setSpacing(int spacing) override { + if (handle__SetSpacing == 0) { + QHBoxLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QHBoxLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QHBoxLayout::setSpacing(static_cast(spacing)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QHBoxLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHBoxLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QHBoxLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QHBoxLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHBoxLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QHBoxLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QHBoxLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHBoxLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QHBoxLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QHBoxLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QHBoxLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QHBoxLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QHBoxLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QHBoxLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QHBoxLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QHBoxLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QHBoxLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QHBoxLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QHBoxLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QHBoxLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QHBoxLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QHBoxLayout::invalidate(); + return; + } + + + miqt_exec_callback_QHBoxLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QHBoxLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QHBoxLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QHBoxLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QHBoxLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QHBoxLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QHBoxLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QHBoxLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QHBoxLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QHBoxLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QHBoxLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QHBoxLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QHBoxLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QHBoxLayout::setGeometry(*geometry); + + } + +}; + +void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(parent); + *outptr_QHBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(); + *outptr_QHBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QHBoxLayout_Metacast(QHBoxLayout* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QHBoxLayout_Tr(const char* s) { + QString _ret = QHBoxLayout::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QHBoxLayout_Tr2(const char* s, const char* c) { + QString _ret = QHBoxLayout::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QHBoxLayout_Tr3(const char* s, const char* c, int n) { + QString _ret = QHBoxLayout::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QHBoxLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__AddItem = slot; +} + +void QHBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_AddItem(param1); +} + +void QHBoxLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__Spacing = slot; +} + +int QHBoxLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_Spacing(); +} + +void QHBoxLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__SetSpacing = slot; +} + +void QHBoxLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_SetSpacing(spacing); +} + +void QHBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QHBoxLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_SizeHint(); +} + +void QHBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QHBoxLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QHBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QHBoxLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QHBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QHBoxLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QHBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QHBoxLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QHBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QHBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QHBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QHBoxLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QHBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__Invalidate = slot; +} + +void QHBoxLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_Invalidate(); +} + +void QHBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QHBoxLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QHBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QHBoxLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QHBoxLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__Count = slot; +} + +int QHBoxLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQHBoxLayout*)(self) )->virtualbase_Count(); +} + +void QHBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QHBoxLayout*)(self) )->handle__SetGeometry = slot; +} + +void QHBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQHBoxLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QHBoxLayout_Delete(QHBoxLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQVBoxLayout : public virtual QVBoxLayout { +public: + + MiqtVirtualQVBoxLayout(QWidget* parent): QVBoxLayout(parent) {}; + MiqtVirtualQVBoxLayout(): QVBoxLayout() {}; + + virtual ~MiqtVirtualQVBoxLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItem == 0) { + QVBoxLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QVBoxLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* param1) { + + QVBoxLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Spacing = 0; + + // Subclass to allow providing a Go implementation + virtual int spacing() const override { + if (handle__Spacing == 0) { + return QVBoxLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QVBoxLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QVBoxLayout::spacing(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual void setSpacing(int spacing) override { + if (handle__SetSpacing == 0) { + QVBoxLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QVBoxLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QVBoxLayout::setSpacing(static_cast(spacing)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QVBoxLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVBoxLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QVBoxLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QVBoxLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVBoxLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QVBoxLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QVBoxLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVBoxLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QVBoxLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QVBoxLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QVBoxLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QVBoxLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QVBoxLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QVBoxLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QVBoxLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QVBoxLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QVBoxLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QVBoxLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QVBoxLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QVBoxLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QVBoxLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QVBoxLayout::invalidate(); + return; + } + + + miqt_exec_callback_QVBoxLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QVBoxLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QVBoxLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QVBoxLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QVBoxLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QVBoxLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QVBoxLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QVBoxLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QVBoxLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QVBoxLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QVBoxLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QVBoxLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QVBoxLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QVBoxLayout::setGeometry(*geometry); + + } + +}; + +void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(parent); + *outptr_QVBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(); + *outptr_QVBoxLayout = ret; + *outptr_QBoxLayout = static_cast(ret); + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QVBoxLayout_Metacast(QVBoxLayout* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QVBoxLayout_Tr(const char* s) { + QString _ret = QVBoxLayout::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QVBoxLayout_Tr2(const char* s, const char* c) { + QString _ret = QVBoxLayout::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QVBoxLayout_Tr3(const char* s, const char* c, int n) { + QString _ret = QVBoxLayout::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QVBoxLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__AddItem = slot; +} + +void QVBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_AddItem(param1); +} + +void QVBoxLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__Spacing = slot; +} + +int QVBoxLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_Spacing(); +} + +void QVBoxLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__SetSpacing = slot; +} + +void QVBoxLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_SetSpacing(spacing); +} + +void QVBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QVBoxLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_SizeHint(); +} + +void QVBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QVBoxLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QVBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QVBoxLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QVBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QVBoxLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QVBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QVBoxLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QVBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QVBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QVBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QVBoxLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QVBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__Invalidate = slot; +} + +void QVBoxLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_Invalidate(); +} + +void QVBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QVBoxLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QVBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QVBoxLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QVBoxLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__Count = slot; +} + +int QVBoxLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQVBoxLayout*)(self) )->virtualbase_Count(); +} + +void QVBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QVBoxLayout*)(self) )->handle__SetGeometry = slot; +} + +void QVBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQVBoxLayout*)(self) )->virtualbase_SetGeometry(geometry); } -void QVBoxLayout_Delete(QVBoxLayout* self) { - delete self; +void QVBoxLayout_Delete(QVBoxLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qboxlayout.go b/qt6/gen_qboxlayout.go index b1ca9d14..823a174e 100644 --- a/qt6/gen_qboxlayout.go +++ b/qt6/gen_qboxlayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -25,7 +26,8 @@ const ( ) type QBoxLayout struct { - h *C.QBoxLayout + h *C.QBoxLayout + isSubclass bool *QLayout } @@ -43,27 +45,49 @@ func (this *QBoxLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQBoxLayout(h *C.QBoxLayout) *QBoxLayout { +// newQBoxLayout constructs the type using only CGO pointers. +func newQBoxLayout(h *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QBoxLayout { if h == nil { return nil } - return &QBoxLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QBoxLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQBoxLayout(h unsafe.Pointer) *QBoxLayout { - return newQBoxLayout((*C.QBoxLayout)(h)) +// UnsafeNewQBoxLayout constructs the type using only unsafe pointers. +func UnsafeNewQBoxLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QBoxLayout { + if h == nil { + return nil + } + + return &QBoxLayout{h: (*C.QBoxLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQBoxLayout constructs a new QBoxLayout object. func NewQBoxLayout(param1 QBoxLayout__Direction) *QBoxLayout { - ret := C.QBoxLayout_new((C.int)(param1)) - return newQBoxLayout(ret) + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QBoxLayout_new((C.int)(param1), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQBoxLayout2 constructs a new QBoxLayout object. func NewQBoxLayout2(param1 QBoxLayout__Direction, parent *QWidget) *QBoxLayout { - ret := C.QBoxLayout_new2((C.int)(param1), parent.cPointer()) - return newQBoxLayout(ret) + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QBoxLayout_new2((C.int)(param1), parent.cPointer(), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QBoxLayout) MetaObject() *QMetaObject { @@ -280,203 +304,1467 @@ func (this *QBoxLayout) InsertLayout3(index int, layout *QLayout, stretch int) { C.QBoxLayout_InsertLayout3(this.h, (C.int)(index), layout.cPointer(), (C.int)(stretch)) } -// Delete this object from C++ memory. -func (this *QBoxLayout) Delete() { - C.QBoxLayout_Delete(this.h) +func (this *QBoxLayout) callVirtualBase_AddItem(param1 *QLayoutItem) { + + C.QBoxLayout_virtualbase_AddItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QBoxLayout) OnAddItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QBoxLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QBoxLayout) GoGC() { - runtime.SetFinalizer(this, func(this *QBoxLayout) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QBoxLayout_AddItem +func miqt_exec_callback_QBoxLayout_AddItem(self *C.QBoxLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_AddItem, slotval1) + } -type QHBoxLayout struct { - h *C.QHBoxLayout - *QBoxLayout +func (this *QBoxLayout) callVirtualBase_Spacing() int { + + return (int)(C.QBoxLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnSpacing(slot func(super func() int) int) { + C.QBoxLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QHBoxLayout) cPointer() *C.QHBoxLayout { - if this == nil { - return nil +//export miqt_exec_callback_QBoxLayout_Spacing +func miqt_exec_callback_QBoxLayout_Spacing(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + } -func (this *QHBoxLayout) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QBoxLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QBoxLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QBoxLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QBoxLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_SetSpacing +func miqt_exec_callback_QBoxLayout_SetSpacing(self *C.QBoxLayout, cb C.intptr_t, spacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(spacing int), spacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(spacing) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + } -func newQHBoxLayout(h *C.QHBoxLayout) *QHBoxLayout { - if h == nil { - return nil +func (this *QBoxLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QBoxLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QBoxLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_SizeHint +func miqt_exec_callback_QBoxLayout_SizeHint(self *C.QBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QHBoxLayout{h: h, QBoxLayout: UnsafeNewQBoxLayout(unsafe.Pointer(h))} + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func UnsafeNewQHBoxLayout(h unsafe.Pointer) *QHBoxLayout { - return newQHBoxLayout((*C.QHBoxLayout)(h)) +func (this *QBoxLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QBoxLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QBoxLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQHBoxLayout constructs a new QHBoxLayout object. -func NewQHBoxLayout(parent *QWidget) *QHBoxLayout { - ret := C.QHBoxLayout_new(parent.cPointer()) - return newQHBoxLayout(ret) +//export miqt_exec_callback_QBoxLayout_MinimumSize +func miqt_exec_callback_QBoxLayout_MinimumSize(self *C.QBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + } -// NewQHBoxLayout2 constructs a new QHBoxLayout object. -func NewQHBoxLayout2() *QHBoxLayout { - ret := C.QHBoxLayout_new2() - return newQHBoxLayout(ret) +func (this *QBoxLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QBoxLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QBoxLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QHBoxLayout) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QHBoxLayout_MetaObject(this.h))) +//export miqt_exec_callback_QBoxLayout_MaximumSize +func miqt_exec_callback_QBoxLayout_MaximumSize(self *C.QBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + } -func (this *QHBoxLayout) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QHBoxLayout_Metacast(this.h, param1_Cstring)) +func (this *QBoxLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QBoxLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QBoxLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QHBoxLayout_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QHBoxLayout_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QBoxLayout_HasHeightForWidth +func miqt_exec_callback_QBoxLayout_HasHeightForWidth(self *C.QBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + } -func QHBoxLayout_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QHBoxLayout_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QBoxLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QBoxLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QBoxLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QBoxLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QHBoxLayout_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QHBoxLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QBoxLayout_HeightForWidth +func miqt_exec_callback_QBoxLayout_HeightForWidth(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + } -// Delete this object from C++ memory. -func (this *QHBoxLayout) Delete() { - C.QHBoxLayout_Delete(this.h) +func (this *QBoxLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QBoxLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QBoxLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QBoxLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QHBoxLayout) GoGC() { - runtime.SetFinalizer(this, func(this *QHBoxLayout) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QBoxLayout_MinimumHeightForWidth +func miqt_exec_callback_QBoxLayout_MinimumHeightForWidth(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + } -type QVBoxLayout struct { - h *C.QVBoxLayout - *QBoxLayout +func (this *QBoxLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QBoxLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QBoxLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QVBoxLayout) cPointer() *C.QVBoxLayout { - if this == nil { - return nil +//export miqt_exec_callback_QBoxLayout_ExpandingDirections +func miqt_exec_callback_QBoxLayout_ExpandingDirections(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + } -func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QBoxLayout) callVirtualBase_Invalidate() { + + C.QBoxLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QBoxLayout) OnInvalidate(slot func(super func())) { + C.QBoxLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_Invalidate +func miqt_exec_callback_QBoxLayout_Invalidate(self *C.QBoxLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_Invalidate) + } -func newQVBoxLayout(h *C.QVBoxLayout) *QVBoxLayout { - if h == nil { - return nil +func (this *QBoxLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QBoxLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QBoxLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ItemAt +func miqt_exec_callback_QBoxLayout_ItemAt(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QVBoxLayout{h: h, QBoxLayout: UnsafeNewQBoxLayout(unsafe.Pointer(h))} + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + } -func UnsafeNewQVBoxLayout(h unsafe.Pointer) *QVBoxLayout { - return newQVBoxLayout((*C.QVBoxLayout)(h)) +func (this *QBoxLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QBoxLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QBoxLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQVBoxLayout constructs a new QVBoxLayout object. -func NewQVBoxLayout(parent *QWidget) *QVBoxLayout { - ret := C.QVBoxLayout_new(parent.cPointer()) - return newQVBoxLayout(ret) +//export miqt_exec_callback_QBoxLayout_TakeAt +func miqt_exec_callback_QBoxLayout_TakeAt(self *C.QBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + } -// NewQVBoxLayout2 constructs a new QVBoxLayout object. -func NewQVBoxLayout2() *QVBoxLayout { - ret := C.QVBoxLayout_new2() - return newQVBoxLayout(ret) +func (this *QBoxLayout) callVirtualBase_Count() int { + + return (int)(C.QBoxLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnCount(slot func(super func() int) int) { + C.QBoxLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QVBoxLayout) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QVBoxLayout_MetaObject(this.h))) +//export miqt_exec_callback_QBoxLayout_Count +func miqt_exec_callback_QBoxLayout_Count(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + } -func (this *QVBoxLayout) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QVBoxLayout_Metacast(this.h, param1_Cstring)) +func (this *QBoxLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QBoxLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QBoxLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QBoxLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QVBoxLayout_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QVBoxLayout_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QBoxLayout_SetGeometry +func miqt_exec_callback_QBoxLayout_SetGeometry(self *C.QBoxLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + } -func QVBoxLayout_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QVBoxLayout_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QBoxLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QBoxLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QBoxLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QBoxLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QVBoxLayout_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QVBoxLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QBoxLayout_Geometry +func miqt_exec_callback_QBoxLayout_Geometry(self *C.QBoxLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QBoxLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QBoxLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QBoxLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_IndexOf +func miqt_exec_callback_QBoxLayout_IndexOf(self *C.QBoxLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QBoxLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QBoxLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_IsEmpty +func miqt_exec_callback_QBoxLayout_IsEmpty(self *C.QBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QBoxLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QBoxLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QBoxLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ControlTypes +func miqt_exec_callback_QBoxLayout_ControlTypes(self *C.QBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QBoxLayout) callVirtualBase_ReplaceWidget(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QBoxLayout_virtualbase_ReplaceWidget(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.int)(options)))) +} +func (this *QBoxLayout) OnReplaceWidget(slot func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) { + C.QBoxLayout_override_virtual_ReplaceWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ReplaceWidget +func miqt_exec_callback_QBoxLayout_ReplaceWidget(self *C.QBoxLayout, cb C.intptr_t, from *C.QWidget, to *C.QWidget, options C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(from), nil, nil) + slotval2 := UnsafeNewQWidget(unsafe.Pointer(to), nil, nil) + slotval3 := (FindChildOption)(options) + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_ReplaceWidget, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QBoxLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QBoxLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QBoxLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_Layout +func miqt_exec_callback_QBoxLayout_Layout(self *C.QBoxLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QBoxLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QBoxLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QBoxLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QBoxLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBoxLayout_ChildEvent +func miqt_exec_callback_QBoxLayout_ChildEvent(self *C.QBoxLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QBoxLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QBoxLayout) Delete() { + C.QBoxLayout_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QBoxLayout) GoGC() { + runtime.SetFinalizer(this, func(this *QBoxLayout) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QHBoxLayout struct { + h *C.QHBoxLayout + isSubclass bool + *QBoxLayout +} + +func (this *QHBoxLayout) cPointer() *C.QHBoxLayout { + if this == nil { + return nil + } + return this.h +} + +func (this *QHBoxLayout) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQHBoxLayout constructs the type using only CGO pointers. +func newQHBoxLayout(h *C.QHBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QHBoxLayout { + if h == nil { + return nil + } + return &QHBoxLayout{h: h, + QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +} + +// UnsafeNewQHBoxLayout constructs the type using only unsafe pointers. +func UnsafeNewQHBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QHBoxLayout { + if h == nil { + return nil + } + + return &QHBoxLayout{h: (*C.QHBoxLayout)(h), + QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +} + +// NewQHBoxLayout constructs a new QHBoxLayout object. +func NewQHBoxLayout(parent *QWidget) *QHBoxLayout { + var outptr_QHBoxLayout *C.QHBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QHBoxLayout_new(parent.cPointer(), &outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQHBoxLayout2 constructs a new QHBoxLayout object. +func NewQHBoxLayout2() *QHBoxLayout { + var outptr_QHBoxLayout *C.QHBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QHBoxLayout_new2(&outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +func (this *QHBoxLayout) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QHBoxLayout_MetaObject(this.h))) +} + +func (this *QHBoxLayout) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QHBoxLayout_Metacast(this.h, param1_Cstring)) +} + +func QHBoxLayout_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QHBoxLayout_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QHBoxLayout_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QHBoxLayout_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QHBoxLayout_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QHBoxLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QHBoxLayout) callVirtualBase_AddItem(param1 *QLayoutItem) { + + C.QHBoxLayout_virtualbase_AddItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QHBoxLayout) OnAddItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QHBoxLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_AddItem +func miqt_exec_callback_QHBoxLayout_AddItem(self *C.QHBoxLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QHBoxLayout) callVirtualBase_Spacing() int { + + return (int)(C.QHBoxLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnSpacing(slot func(super func() int) int) { + C.QHBoxLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_Spacing +func miqt_exec_callback_QHBoxLayout_Spacing(self *C.QHBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QHBoxLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QHBoxLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QHBoxLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_SetSpacing +func miqt_exec_callback_QHBoxLayout_SetSpacing(self *C.QHBoxLayout, cb C.intptr_t, spacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(spacing int), spacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(spacing) + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + +} + +func (this *QHBoxLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QHBoxLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHBoxLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QHBoxLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_SizeHint +func miqt_exec_callback_QHBoxLayout_SizeHint(self *C.QHBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QHBoxLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHBoxLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QHBoxLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_MinimumSize +func miqt_exec_callback_QHBoxLayout_MinimumSize(self *C.QHBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QHBoxLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHBoxLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QHBoxLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_MaximumSize +func miqt_exec_callback_QHBoxLayout_MaximumSize(self *C.QHBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QHBoxLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QHBoxLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_HasHeightForWidth +func miqt_exec_callback_QHBoxLayout_HasHeightForWidth(self *C.QHBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QHBoxLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QHBoxLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QHBoxLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_HeightForWidth +func miqt_exec_callback_QHBoxLayout_HeightForWidth(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QHBoxLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QHBoxLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QHBoxLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_MinimumHeightForWidth +func miqt_exec_callback_QHBoxLayout_MinimumHeightForWidth(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QHBoxLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QHBoxLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_ExpandingDirections +func miqt_exec_callback_QHBoxLayout_ExpandingDirections(self *C.QHBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_Invalidate() { + + C.QHBoxLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QHBoxLayout) OnInvalidate(slot func(super func())) { + C.QHBoxLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_Invalidate +func miqt_exec_callback_QHBoxLayout_Invalidate(self *C.QHBoxLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QHBoxLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QHBoxLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QHBoxLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QHBoxLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_ItemAt +func miqt_exec_callback_QHBoxLayout_ItemAt(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QHBoxLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QHBoxLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QHBoxLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_TakeAt +func miqt_exec_callback_QHBoxLayout_TakeAt(self *C.QHBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHBoxLayout) callVirtualBase_Count() int { + + return (int)(C.QHBoxLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QHBoxLayout) OnCount(slot func(super func() int) int) { + C.QHBoxLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_Count +func miqt_exec_callback_QHBoxLayout_Count(self *C.QHBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHBoxLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QHBoxLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QHBoxLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QHBoxLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QHBoxLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHBoxLayout_SetGeometry +func miqt_exec_callback_QHBoxLayout_SetGeometry(self *C.QHBoxLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QHBoxLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QHBoxLayout) Delete() { + C.QHBoxLayout_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QHBoxLayout) GoGC() { + runtime.SetFinalizer(this, func(this *QHBoxLayout) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QVBoxLayout struct { + h *C.QVBoxLayout + isSubclass bool + *QBoxLayout +} + +func (this *QVBoxLayout) cPointer() *C.QVBoxLayout { + if this == nil { + return nil + } + return this.h +} + +func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQVBoxLayout constructs the type using only CGO pointers. +func newQVBoxLayout(h *C.QVBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QVBoxLayout { + if h == nil { + return nil + } + return &QVBoxLayout{h: h, + QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +} + +// UnsafeNewQVBoxLayout constructs the type using only unsafe pointers. +func UnsafeNewQVBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QVBoxLayout { + if h == nil { + return nil + } + + return &QVBoxLayout{h: (*C.QVBoxLayout)(h), + QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +} + +// NewQVBoxLayout constructs a new QVBoxLayout object. +func NewQVBoxLayout(parent *QWidget) *QVBoxLayout { + var outptr_QVBoxLayout *C.QVBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QVBoxLayout_new(parent.cPointer(), &outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQVBoxLayout2 constructs a new QVBoxLayout object. +func NewQVBoxLayout2() *QVBoxLayout { + var outptr_QVBoxLayout *C.QVBoxLayout = nil + var outptr_QBoxLayout *C.QBoxLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QVBoxLayout_new2(&outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +func (this *QVBoxLayout) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QVBoxLayout_MetaObject(this.h))) +} + +func (this *QVBoxLayout) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QVBoxLayout_Metacast(this.h, param1_Cstring)) +} + +func QVBoxLayout_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QVBoxLayout_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QVBoxLayout_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QVBoxLayout_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QVBoxLayout_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QVBoxLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QVBoxLayout) callVirtualBase_AddItem(param1 *QLayoutItem) { + + C.QVBoxLayout_virtualbase_AddItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QVBoxLayout) OnAddItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QVBoxLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_AddItem +func miqt_exec_callback_QVBoxLayout_AddItem(self *C.QVBoxLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QVBoxLayout) callVirtualBase_Spacing() int { + + return (int)(C.QVBoxLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnSpacing(slot func(super func() int) int) { + C.QVBoxLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_Spacing +func miqt_exec_callback_QVBoxLayout_Spacing(self *C.QVBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QVBoxLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QVBoxLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QVBoxLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_SetSpacing +func miqt_exec_callback_QVBoxLayout_SetSpacing(self *C.QVBoxLayout, cb C.intptr_t, spacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(spacing int), spacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(spacing) + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + +} + +func (this *QVBoxLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QVBoxLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVBoxLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QVBoxLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_SizeHint +func miqt_exec_callback_QVBoxLayout_SizeHint(self *C.QVBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QVBoxLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVBoxLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QVBoxLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_MinimumSize +func miqt_exec_callback_QVBoxLayout_MinimumSize(self *C.QVBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QVBoxLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVBoxLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QVBoxLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_MaximumSize +func miqt_exec_callback_QVBoxLayout_MaximumSize(self *C.QVBoxLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QVBoxLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QVBoxLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_HasHeightForWidth +func miqt_exec_callback_QVBoxLayout_HasHeightForWidth(self *C.QVBoxLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QVBoxLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVBoxLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QVBoxLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_HeightForWidth +func miqt_exec_callback_QVBoxLayout_HeightForWidth(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QVBoxLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVBoxLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QVBoxLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_MinimumHeightForWidth +func miqt_exec_callback_QVBoxLayout_MinimumHeightForWidth(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QVBoxLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QVBoxLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_ExpandingDirections +func miqt_exec_callback_QVBoxLayout_ExpandingDirections(self *C.QVBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_Invalidate() { + + C.QVBoxLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QVBoxLayout) OnInvalidate(slot func(super func())) { + C.QVBoxLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_Invalidate +func miqt_exec_callback_QVBoxLayout_Invalidate(self *C.QVBoxLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QVBoxLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QVBoxLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QVBoxLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QVBoxLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_ItemAt +func miqt_exec_callback_QVBoxLayout_ItemAt(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QVBoxLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QVBoxLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QVBoxLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_TakeAt +func miqt_exec_callback_QVBoxLayout_TakeAt(self *C.QVBoxLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QVBoxLayout) callVirtualBase_Count() int { + + return (int)(C.QVBoxLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QVBoxLayout) OnCount(slot func(super func() int) int) { + C.QVBoxLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_Count +func miqt_exec_callback_QVBoxLayout_Count(self *C.QVBoxLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVBoxLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QVBoxLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QVBoxLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QVBoxLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QVBoxLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVBoxLayout_SetGeometry +func miqt_exec_callback_QVBoxLayout_SetGeometry(self *C.QVBoxLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QVBoxLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + } // Delete this object from C++ memory. func (this *QVBoxLayout) Delete() { - C.QVBoxLayout_Delete(this.h) + C.QVBoxLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qboxlayout.h b/qt6/gen_qboxlayout.h index 8a553fb5..03263ee5 100644 --- a/qt6/gen_qboxlayout.h +++ b/qt6/gen_qboxlayout.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QBoxLayout; +class QChildEvent; class QHBoxLayout; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QSpacerItem; @@ -27,10 +29,12 @@ class QVBoxLayout; class QWidget; #else typedef struct QBoxLayout QBoxLayout; +typedef struct QChildEvent QChildEvent; typedef struct QHBoxLayout QHBoxLayout; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QSpacerItem QSpacerItem; @@ -38,8 +42,8 @@ typedef struct QVBoxLayout QVBoxLayout; typedef struct QWidget QWidget; #endif -QBoxLayout* QBoxLayout_new(int param1); -QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent); +void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self); void* QBoxLayout_Metacast(QBoxLayout* self, const char* param1); struct miqt_string QBoxLayout_Tr(const char* s); @@ -86,25 +90,129 @@ void QBoxLayout_InsertStretch2(QBoxLayout* self, int index, int stretch); void QBoxLayout_InsertWidget3(QBoxLayout* self, int index, QWidget* widget, int stretch); void QBoxLayout_InsertWidget4(QBoxLayout* self, int index, QWidget* widget, int stretch, int alignment); void QBoxLayout_InsertLayout3(QBoxLayout* self, int index, QLayout* layout, int stretch); -void QBoxLayout_Delete(QBoxLayout* self); +void QBoxLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QBoxLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QBoxLayout_virtualbase_Spacing(const void* self); +void QBoxLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QBoxLayout_virtualbase_SetSpacing(void* self, int spacing); +void QBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QBoxLayout_virtualbase_SizeHint(const void* self); +void QBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QBoxLayout_virtualbase_MinimumSize(const void* self); +void QBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QBoxLayout_virtualbase_MaximumSize(const void* self); +void QBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QBoxLayout_virtualbase_HasHeightForWidth(const void* self); +void QBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QBoxLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QBoxLayout_virtualbase_ExpandingDirections(const void* self); +void QBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QBoxLayout_virtualbase_Invalidate(void* self); +void QBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QBoxLayout_virtualbase_ItemAt(const void* self, int param1); +void QBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QBoxLayout_virtualbase_TakeAt(void* self, int param1); +void QBoxLayout_override_virtual_Count(void* self, intptr_t slot); +int QBoxLayout_virtualbase_Count(const void* self); +void QBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QBoxLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QBoxLayout_virtualbase_Geometry(const void* self); +void QBoxLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QBoxLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QBoxLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QBoxLayout_virtualbase_IsEmpty(const void* self); +void QBoxLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QBoxLayout_virtualbase_ControlTypes(const void* self); +void QBoxLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot); +QLayoutItem* QBoxLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options); +void QBoxLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QBoxLayout_virtualbase_Layout(void* self); +void QBoxLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QBoxLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QBoxLayout_Delete(QBoxLayout* self, bool isSubclass); -QHBoxLayout* QHBoxLayout_new(QWidget* parent); -QHBoxLayout* QHBoxLayout_new2(); +void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self); void* QHBoxLayout_Metacast(QHBoxLayout* self, const char* param1); struct miqt_string QHBoxLayout_Tr(const char* s); struct miqt_string QHBoxLayout_Tr2(const char* s, const char* c); struct miqt_string QHBoxLayout_Tr3(const char* s, const char* c, int n); -void QHBoxLayout_Delete(QHBoxLayout* self); +void QHBoxLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QHBoxLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_Spacing(const void* self); +void QHBoxLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_SetSpacing(void* self, int spacing); +void QHBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QHBoxLayout_virtualbase_SizeHint(const void* self); +void QHBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QHBoxLayout_virtualbase_MinimumSize(const void* self); +void QHBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QHBoxLayout_virtualbase_MaximumSize(const void* self); +void QHBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QHBoxLayout_virtualbase_HasHeightForWidth(const void* self); +void QHBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QHBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QHBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_ExpandingDirections(const void* self); +void QHBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_Invalidate(void* self); +void QHBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QHBoxLayout_virtualbase_ItemAt(const void* self, int param1); +void QHBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QHBoxLayout_virtualbase_TakeAt(void* self, int param1); +void QHBoxLayout_override_virtual_Count(void* self, intptr_t slot); +int QHBoxLayout_virtualbase_Count(const void* self); +void QHBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QHBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QHBoxLayout_Delete(QHBoxLayout* self, bool isSubclass); -QVBoxLayout* QVBoxLayout_new(QWidget* parent); -QVBoxLayout* QVBoxLayout_new2(); +void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self); void* QVBoxLayout_Metacast(QVBoxLayout* self, const char* param1); struct miqt_string QVBoxLayout_Tr(const char* s); struct miqt_string QVBoxLayout_Tr2(const char* s, const char* c); struct miqt_string QVBoxLayout_Tr3(const char* s, const char* c, int n); -void QVBoxLayout_Delete(QVBoxLayout* self); +void QVBoxLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QVBoxLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_Spacing(const void* self); +void QVBoxLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_SetSpacing(void* self, int spacing); +void QVBoxLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QVBoxLayout_virtualbase_SizeHint(const void* self); +void QVBoxLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QVBoxLayout_virtualbase_MinimumSize(const void* self); +void QVBoxLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QVBoxLayout_virtualbase_MaximumSize(const void* self); +void QVBoxLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QVBoxLayout_virtualbase_HasHeightForWidth(const void* self); +void QVBoxLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QVBoxLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QVBoxLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_ExpandingDirections(const void* self); +void QVBoxLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_Invalidate(void* self); +void QVBoxLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QVBoxLayout_virtualbase_ItemAt(const void* self, int param1); +void QVBoxLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QVBoxLayout_virtualbase_TakeAt(void* self, int param1); +void QVBoxLayout_override_virtual_Count(void* self, intptr_t slot); +int QVBoxLayout_virtualbase_Count(const void* self); +void QVBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QVBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QVBoxLayout_Delete(QVBoxLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbrush.cpp b/qt6/gen_qbrush.cpp index 6208b1a9..85e354b0 100644 --- a/qt6/gen_qbrush.cpp +++ b/qt6/gen_qbrush.cpp @@ -15,52 +15,64 @@ #include "gen_qbrush.h" #include "_cgo_export.h" -QBrush* QBrush_new() { - return new QBrush(); +void QBrush_new(QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(); + *outptr_QBrush = ret; } -QBrush* QBrush_new2(int bs) { - return new QBrush(static_cast(bs)); +void QBrush_new2(int bs, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(bs)); + *outptr_QBrush = ret; } -QBrush* QBrush_new3(QColor* color) { - return new QBrush(*color); +void QBrush_new3(QColor* color, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*color); + *outptr_QBrush = ret; } -QBrush* QBrush_new4(int color) { - return new QBrush(static_cast(color)); +void QBrush_new4(int color, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(color)); + *outptr_QBrush = ret; } -QBrush* QBrush_new5(QColor* color, QPixmap* pixmap) { - return new QBrush(*color, *pixmap); +void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*color, *pixmap); + *outptr_QBrush = ret; } -QBrush* QBrush_new6(int color, QPixmap* pixmap) { - return new QBrush(static_cast(color), *pixmap); +void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(color), *pixmap); + *outptr_QBrush = ret; } -QBrush* QBrush_new7(QPixmap* pixmap) { - return new QBrush(*pixmap); +void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*pixmap); + *outptr_QBrush = ret; } -QBrush* QBrush_new8(QImage* image) { - return new QBrush(*image); +void QBrush_new8(QImage* image, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*image); + *outptr_QBrush = ret; } -QBrush* QBrush_new9(QBrush* brush) { - return new QBrush(*brush); +void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*brush); + *outptr_QBrush = ret; } -QBrush* QBrush_new10(QGradient* gradient) { - return new QBrush(*gradient); +void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*gradient); + *outptr_QBrush = ret; } -QBrush* QBrush_new11(QColor* color, int bs) { - return new QBrush(*color, static_cast(bs)); +void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(*color, static_cast(bs)); + *outptr_QBrush = ret; } -QBrush* QBrush_new12(int color, int bs) { - return new QBrush(static_cast(color), static_cast(bs)); +void QBrush_new12(int color, int bs, QBrush** outptr_QBrush) { + QBrush* ret = new QBrush(static_cast(color), static_cast(bs)); + *outptr_QBrush = ret; } void QBrush_OperatorAssign(QBrush* self, QBrush* brush) { @@ -138,32 +150,44 @@ bool QBrush_IsDetached(const QBrush* self) { return self->isDetached(); } -void QBrush_Delete(QBrush* self) { - delete self; +void QBrush_Delete(QBrush* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QBrushData* QBrushData_new(QBrushData* param1) { - return new QBrushData(*param1); +void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData) { + QBrushData* ret = new QBrushData(*param1); + *outptr_QBrushData = ret; } void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1) { self->operator=(*param1); } -void QBrushData_Delete(QBrushData* self) { - delete self; +void QBrushData_Delete(QBrushData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGradient* QGradient_new() { - return new QGradient(); +void QGradient_new(QGradient** outptr_QGradient) { + QGradient* ret = new QGradient(); + *outptr_QGradient = ret; } -QGradient* QGradient_new2(int param1) { - return new QGradient(static_cast(param1)); +void QGradient_new2(int param1, QGradient** outptr_QGradient) { + QGradient* ret = new QGradient(static_cast(param1)); + *outptr_QGradient = ret; } -QGradient* QGradient_new3(QGradient* param1) { - return new QGradient(*param1); +void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient) { + QGradient* ret = new QGradient(*param1); + *outptr_QGradient = ret; } int QGradient_Type(const QGradient* self) { @@ -248,24 +272,36 @@ bool QGradient_OperatorNotEqual(const QGradient* self, QGradient* other) { return self->operator!=(*other); } -void QGradient_Delete(QGradient* self) { - delete self; +void QGradient_Delete(QGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QLinearGradient* QLinearGradient_new() { - return new QLinearGradient(); +void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } -QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop) { - return new QLinearGradient(*start, *finalStop); +void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(*start, *finalStop); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } -QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop) { - return new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); +void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } -QLinearGradient* QLinearGradient_new4(QLinearGradient* param1) { - return new QLinearGradient(*param1); +void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { + QLinearGradient* ret = new QLinearGradient(*param1); + *outptr_QLinearGradient = ret; + *outptr_QGradient = static_cast(ret); } QPointF* QLinearGradient_Start(const QLinearGradient* self) { @@ -292,40 +328,60 @@ void QLinearGradient_SetFinalStop2(QLinearGradient* self, double x, double y) { self->setFinalStop(static_cast(x), static_cast(y)); } -void QLinearGradient_Delete(QLinearGradient* self) { - delete self; +void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRadialGradient* QRadialGradient_new() { - return new QRadialGradient(); +void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint) { - return new QRadialGradient(*center, static_cast(radius), *focalPoint); +void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius), *focalPoint); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy) { - return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); +void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new4(QPointF* center, double radius) { - return new QRadialGradient(*center, static_cast(radius)); +void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius) { - return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); +void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius) { - return new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); +void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius) { - return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); +void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } -QRadialGradient* QRadialGradient_new8(QRadialGradient* param1) { - return new QRadialGradient(*param1); +void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { + QRadialGradient* ret = new QRadialGradient(*param1); + *outptr_QRadialGradient = ret; + *outptr_QGradient = static_cast(ret); } QPointF* QRadialGradient_Center(const QRadialGradient* self) { @@ -379,24 +435,36 @@ void QRadialGradient_SetFocalRadius(QRadialGradient* self, double radius) { self->setFocalRadius(static_cast(radius)); } -void QRadialGradient_Delete(QRadialGradient* self) { - delete self; +void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QConicalGradient* QConicalGradient_new() { - return new QConicalGradient(); +void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } -QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle) { - return new QConicalGradient(*center, static_cast(startAngle)); +void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(*center, static_cast(startAngle)); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } -QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle) { - return new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); +void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } -QConicalGradient* QConicalGradient_new4(QConicalGradient* param1) { - return new QConicalGradient(*param1); +void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { + QConicalGradient* ret = new QConicalGradient(*param1); + *outptr_QConicalGradient = ret; + *outptr_QGradient = static_cast(ret); } QPointF* QConicalGradient_Center(const QConicalGradient* self) { @@ -420,15 +488,24 @@ void QConicalGradient_SetAngle(QConicalGradient* self, double angle) { self->setAngle(static_cast(angle)); } -void QConicalGradient_Delete(QConicalGradient* self) { - delete self; +void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1) { - return new QGradient::QGradientData(*param1); +void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData) { + QGradient::QGradientData* ret = new QGradient::QGradientData(*param1); + *outptr_QGradient__QGradientData = ret; } -void QGradient__QGradientData_Delete(QGradient__QGradientData* self) { - delete self; +void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbrush.go b/qt6/gen_qbrush.go index 5588519a..7ae8963f 100644 --- a/qt6/gen_qbrush.go +++ b/qt6/gen_qbrush.go @@ -221,7 +221,8 @@ const ( ) type QBrush struct { - h *C.QBrush + h *C.QBrush + isSubclass bool } func (this *QBrush) cPointer() *C.QBrush { @@ -238,6 +239,7 @@ func (this *QBrush) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBrush constructs the type using only CGO pointers. func newQBrush(h *C.QBrush) *QBrush { if h == nil { return nil @@ -245,80 +247,133 @@ func newQBrush(h *C.QBrush) *QBrush { return &QBrush{h: h} } +// UnsafeNewQBrush constructs the type using only unsafe pointers. func UnsafeNewQBrush(h unsafe.Pointer) *QBrush { - return newQBrush((*C.QBrush)(h)) + if h == nil { + return nil + } + + return &QBrush{h: (*C.QBrush)(h)} } // NewQBrush constructs a new QBrush object. func NewQBrush() *QBrush { - ret := C.QBrush_new() - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new(&outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush2 constructs a new QBrush object. func NewQBrush2(bs BrushStyle) *QBrush { - ret := C.QBrush_new2((C.int)(bs)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new2((C.int)(bs), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush3 constructs a new QBrush object. func NewQBrush3(color *QColor) *QBrush { - ret := C.QBrush_new3(color.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new3(color.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush4 constructs a new QBrush object. func NewQBrush4(color GlobalColor) *QBrush { - ret := C.QBrush_new4((C.int)(color)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new4((C.int)(color), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush5 constructs a new QBrush object. func NewQBrush5(color *QColor, pixmap *QPixmap) *QBrush { - ret := C.QBrush_new5(color.cPointer(), pixmap.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new5(color.cPointer(), pixmap.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush6 constructs a new QBrush object. func NewQBrush6(color GlobalColor, pixmap *QPixmap) *QBrush { - ret := C.QBrush_new6((C.int)(color), pixmap.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new6((C.int)(color), pixmap.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush7 constructs a new QBrush object. func NewQBrush7(pixmap *QPixmap) *QBrush { - ret := C.QBrush_new7(pixmap.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new7(pixmap.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush8 constructs a new QBrush object. func NewQBrush8(image *QImage) *QBrush { - ret := C.QBrush_new8(image.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new8(image.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush9 constructs a new QBrush object. func NewQBrush9(brush *QBrush) *QBrush { - ret := C.QBrush_new9(brush.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new9(brush.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush10 constructs a new QBrush object. func NewQBrush10(gradient *QGradient) *QBrush { - ret := C.QBrush_new10(gradient.cPointer()) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new10(gradient.cPointer(), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush11 constructs a new QBrush object. func NewQBrush11(color *QColor, bs BrushStyle) *QBrush { - ret := C.QBrush_new11(color.cPointer(), (C.int)(bs)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new11(color.cPointer(), (C.int)(bs), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } // NewQBrush12 constructs a new QBrush object. func NewQBrush12(color GlobalColor, bs BrushStyle) *QBrush { - ret := C.QBrush_new12((C.int)(color), (C.int)(bs)) - return newQBrush(ret) + var outptr_QBrush *C.QBrush = nil + + C.QBrush_new12((C.int)(color), (C.int)(bs), &outptr_QBrush) + ret := newQBrush(outptr_QBrush) + ret.isSubclass = true + return ret } func (this *QBrush) OperatorAssign(brush *QBrush) { @@ -350,7 +405,7 @@ func (this *QBrush) SetTransform(transform *QTransform) { func (this *QBrush) Texture() *QPixmap { _ret := C.QBrush_Texture(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -361,7 +416,7 @@ func (this *QBrush) SetTexture(pixmap *QPixmap) { func (this *QBrush) TextureImage() *QImage { _ret := C.QBrush_TextureImage(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -404,7 +459,7 @@ func (this *QBrush) IsDetached() bool { // Delete this object from C++ memory. func (this *QBrush) Delete() { - C.QBrush_Delete(this.h) + C.QBrush_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -417,7 +472,8 @@ func (this *QBrush) GoGC() { } type QBrushData struct { - h *C.QBrushData + h *C.QBrushData + isSubclass bool } func (this *QBrushData) cPointer() *C.QBrushData { @@ -434,6 +490,7 @@ func (this *QBrushData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBrushData constructs the type using only CGO pointers. func newQBrushData(h *C.QBrushData) *QBrushData { if h == nil { return nil @@ -441,14 +498,23 @@ func newQBrushData(h *C.QBrushData) *QBrushData { return &QBrushData{h: h} } +// UnsafeNewQBrushData constructs the type using only unsafe pointers. func UnsafeNewQBrushData(h unsafe.Pointer) *QBrushData { - return newQBrushData((*C.QBrushData)(h)) + if h == nil { + return nil + } + + return &QBrushData{h: (*C.QBrushData)(h)} } // NewQBrushData constructs a new QBrushData object. func NewQBrushData(param1 *QBrushData) *QBrushData { - ret := C.QBrushData_new(param1.cPointer()) - return newQBrushData(ret) + var outptr_QBrushData *C.QBrushData = nil + + C.QBrushData_new(param1.cPointer(), &outptr_QBrushData) + ret := newQBrushData(outptr_QBrushData) + ret.isSubclass = true + return ret } func (this *QBrushData) OperatorAssign(param1 *QBrushData) { @@ -457,7 +523,7 @@ func (this *QBrushData) OperatorAssign(param1 *QBrushData) { // Delete this object from C++ memory. func (this *QBrushData) Delete() { - C.QBrushData_Delete(this.h) + C.QBrushData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -470,7 +536,8 @@ func (this *QBrushData) GoGC() { } type QGradient struct { - h *C.QGradient + h *C.QGradient + isSubclass bool } func (this *QGradient) cPointer() *C.QGradient { @@ -487,6 +554,7 @@ func (this *QGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGradient constructs the type using only CGO pointers. func newQGradient(h *C.QGradient) *QGradient { if h == nil { return nil @@ -494,26 +562,43 @@ func newQGradient(h *C.QGradient) *QGradient { return &QGradient{h: h} } +// UnsafeNewQGradient constructs the type using only unsafe pointers. func UnsafeNewQGradient(h unsafe.Pointer) *QGradient { - return newQGradient((*C.QGradient)(h)) + if h == nil { + return nil + } + + return &QGradient{h: (*C.QGradient)(h)} } // NewQGradient constructs a new QGradient object. func NewQGradient() *QGradient { - ret := C.QGradient_new() - return newQGradient(ret) + var outptr_QGradient *C.QGradient = nil + + C.QGradient_new(&outptr_QGradient) + ret := newQGradient(outptr_QGradient) + ret.isSubclass = true + return ret } // NewQGradient2 constructs a new QGradient object. func NewQGradient2(param1 QGradient__Preset) *QGradient { - ret := C.QGradient_new2((C.int)(param1)) - return newQGradient(ret) + var outptr_QGradient *C.QGradient = nil + + C.QGradient_new2((C.int)(param1), &outptr_QGradient) + ret := newQGradient(outptr_QGradient) + ret.isSubclass = true + return ret } // NewQGradient3 constructs a new QGradient object. func NewQGradient3(param1 *QGradient) *QGradient { - ret := C.QGradient_new3(param1.cPointer()) - return newQGradient(ret) + var outptr_QGradient *C.QGradient = nil + + C.QGradient_new3(param1.cPointer(), &outptr_QGradient) + ret := newQGradient(outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QGradient) Type() QGradient__Type { @@ -611,7 +696,7 @@ func (this *QGradient) OperatorNotEqual(other *QGradient) bool { // Delete this object from C++ memory. func (this *QGradient) Delete() { - C.QGradient_Delete(this.h) + C.QGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -624,7 +709,8 @@ func (this *QGradient) GoGC() { } type QLinearGradient struct { - h *C.QLinearGradient + h *C.QLinearGradient + isSubclass bool *QGradient } @@ -642,39 +728,67 @@ func (this *QLinearGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLinearGradient(h *C.QLinearGradient) *QLinearGradient { +// newQLinearGradient constructs the type using only CGO pointers. +func newQLinearGradient(h *C.QLinearGradient, h_QGradient *C.QGradient) *QLinearGradient { if h == nil { return nil } - return &QLinearGradient{h: h, QGradient: UnsafeNewQGradient(unsafe.Pointer(h))} + return &QLinearGradient{h: h, + QGradient: newQGradient(h_QGradient)} } -func UnsafeNewQLinearGradient(h unsafe.Pointer) *QLinearGradient { - return newQLinearGradient((*C.QLinearGradient)(h)) +// UnsafeNewQLinearGradient constructs the type using only unsafe pointers. +func UnsafeNewQLinearGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QLinearGradient { + if h == nil { + return nil + } + + return &QLinearGradient{h: (*C.QLinearGradient)(h), + QGradient: UnsafeNewQGradient(h_QGradient)} } // NewQLinearGradient constructs a new QLinearGradient object. func NewQLinearGradient() *QLinearGradient { - ret := C.QLinearGradient_new() - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new(&outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQLinearGradient2 constructs a new QLinearGradient object. func NewQLinearGradient2(start *QPointF, finalStop *QPointF) *QLinearGradient { - ret := C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer()) - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQLinearGradient3 constructs a new QLinearGradient object. func NewQLinearGradient3(xStart float64, yStart float64, xFinalStop float64, yFinalStop float64) *QLinearGradient { - ret := C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop)) - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop), &outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQLinearGradient4 constructs a new QLinearGradient object. func NewQLinearGradient4(param1 *QLinearGradient) *QLinearGradient { - ret := C.QLinearGradient_new4(param1.cPointer()) - return newQLinearGradient(ret) + var outptr_QLinearGradient *C.QLinearGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QLinearGradient_new4(param1.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) + ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QLinearGradient) Start() *QPointF { @@ -709,7 +823,7 @@ func (this *QLinearGradient) SetFinalStop2(x float64, y float64) { // Delete this object from C++ memory. func (this *QLinearGradient) Delete() { - C.QLinearGradient_Delete(this.h) + C.QLinearGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -722,7 +836,8 @@ func (this *QLinearGradient) GoGC() { } type QRadialGradient struct { - h *C.QRadialGradient + h *C.QRadialGradient + isSubclass bool *QGradient } @@ -740,63 +855,111 @@ func (this *QRadialGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadialGradient(h *C.QRadialGradient) *QRadialGradient { +// newQRadialGradient constructs the type using only CGO pointers. +func newQRadialGradient(h *C.QRadialGradient, h_QGradient *C.QGradient) *QRadialGradient { if h == nil { return nil } - return &QRadialGradient{h: h, QGradient: UnsafeNewQGradient(unsafe.Pointer(h))} + return &QRadialGradient{h: h, + QGradient: newQGradient(h_QGradient)} } -func UnsafeNewQRadialGradient(h unsafe.Pointer) *QRadialGradient { - return newQRadialGradient((*C.QRadialGradient)(h)) +// UnsafeNewQRadialGradient constructs the type using only unsafe pointers. +func UnsafeNewQRadialGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QRadialGradient { + if h == nil { + return nil + } + + return &QRadialGradient{h: (*C.QRadialGradient)(h), + QGradient: UnsafeNewQGradient(h_QGradient)} } // NewQRadialGradient constructs a new QRadialGradient object. func NewQRadialGradient() *QRadialGradient { - ret := C.QRadialGradient_new() - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new(&outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient2 constructs a new QRadialGradient object. func NewQRadialGradient2(center *QPointF, radius float64, focalPoint *QPointF) *QRadialGradient { - ret := C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer()) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient3 constructs a new QRadialGradient object. func NewQRadialGradient3(cx float64, cy float64, radius float64, fx float64, fy float64) *QRadialGradient { - ret := C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient4 constructs a new QRadialGradient object. func NewQRadialGradient4(center *QPointF, radius float64) *QRadialGradient { - ret := C.QRadialGradient_new4(center.cPointer(), (C.double)(radius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new4(center.cPointer(), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient5 constructs a new QRadialGradient object. func NewQRadialGradient5(cx float64, cy float64, radius float64) *QRadialGradient { - ret := C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient6 constructs a new QRadialGradient object. func NewQRadialGradient6(center *QPointF, centerRadius float64, focalPoint *QPointF, focalRadius float64) *QRadialGradient { - ret := C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient7 constructs a new QRadialGradient object. func NewQRadialGradient7(cx float64, cy float64, centerRadius float64, fx float64, fy float64, focalRadius float64) *QRadialGradient { - ret := C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius)) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQRadialGradient8 constructs a new QRadialGradient object. func NewQRadialGradient8(param1 *QRadialGradient) *QRadialGradient { - ret := C.QRadialGradient_new8(param1.cPointer()) - return newQRadialGradient(ret) + var outptr_QRadialGradient *C.QRadialGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QRadialGradient_new8(param1.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) + ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QRadialGradient) Center() *QPointF { @@ -855,7 +1018,7 @@ func (this *QRadialGradient) SetFocalRadius(radius float64) { // Delete this object from C++ memory. func (this *QRadialGradient) Delete() { - C.QRadialGradient_Delete(this.h) + C.QRadialGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -868,7 +1031,8 @@ func (this *QRadialGradient) GoGC() { } type QConicalGradient struct { - h *C.QConicalGradient + h *C.QConicalGradient + isSubclass bool *QGradient } @@ -886,39 +1050,67 @@ func (this *QConicalGradient) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQConicalGradient(h *C.QConicalGradient) *QConicalGradient { +// newQConicalGradient constructs the type using only CGO pointers. +func newQConicalGradient(h *C.QConicalGradient, h_QGradient *C.QGradient) *QConicalGradient { if h == nil { return nil } - return &QConicalGradient{h: h, QGradient: UnsafeNewQGradient(unsafe.Pointer(h))} + return &QConicalGradient{h: h, + QGradient: newQGradient(h_QGradient)} } -func UnsafeNewQConicalGradient(h unsafe.Pointer) *QConicalGradient { - return newQConicalGradient((*C.QConicalGradient)(h)) +// UnsafeNewQConicalGradient constructs the type using only unsafe pointers. +func UnsafeNewQConicalGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QConicalGradient { + if h == nil { + return nil + } + + return &QConicalGradient{h: (*C.QConicalGradient)(h), + QGradient: UnsafeNewQGradient(h_QGradient)} } // NewQConicalGradient constructs a new QConicalGradient object. func NewQConicalGradient() *QConicalGradient { - ret := C.QConicalGradient_new() - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new(&outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQConicalGradient2 constructs a new QConicalGradient object. func NewQConicalGradient2(center *QPointF, startAngle float64) *QConicalGradient { - ret := C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle)) - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQConicalGradient3 constructs a new QConicalGradient object. func NewQConicalGradient3(cx float64, cy float64, startAngle float64) *QConicalGradient { - ret := C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle)) - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } // NewQConicalGradient4 constructs a new QConicalGradient object. func NewQConicalGradient4(param1 *QConicalGradient) *QConicalGradient { - ret := C.QConicalGradient_new4(param1.cPointer()) - return newQConicalGradient(ret) + var outptr_QConicalGradient *C.QConicalGradient = nil + var outptr_QGradient *C.QGradient = nil + + C.QConicalGradient_new4(param1.cPointer(), &outptr_QConicalGradient, &outptr_QGradient) + ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret.isSubclass = true + return ret } func (this *QConicalGradient) Center() *QPointF { @@ -946,7 +1138,7 @@ func (this *QConicalGradient) SetAngle(angle float64) { // Delete this object from C++ memory. func (this *QConicalGradient) Delete() { - C.QConicalGradient_Delete(this.h) + C.QConicalGradient_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -959,7 +1151,8 @@ func (this *QConicalGradient) GoGC() { } type QGradient__QGradientData struct { - h *C.QGradient__QGradientData + h *C.QGradient__QGradientData + isSubclass bool } func (this *QGradient__QGradientData) cPointer() *C.QGradient__QGradientData { @@ -976,6 +1169,7 @@ func (this *QGradient__QGradientData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGradient__QGradientData constructs the type using only CGO pointers. func newQGradient__QGradientData(h *C.QGradient__QGradientData) *QGradient__QGradientData { if h == nil { return nil @@ -983,19 +1177,28 @@ func newQGradient__QGradientData(h *C.QGradient__QGradientData) *QGradient__QGra return &QGradient__QGradientData{h: h} } +// UnsafeNewQGradient__QGradientData constructs the type using only unsafe pointers. func UnsafeNewQGradient__QGradientData(h unsafe.Pointer) *QGradient__QGradientData { - return newQGradient__QGradientData((*C.QGradient__QGradientData)(h)) + if h == nil { + return nil + } + + return &QGradient__QGradientData{h: (*C.QGradient__QGradientData)(h)} } // NewQGradient__QGradientData constructs a new QGradient::QGradientData object. func NewQGradient__QGradientData(param1 *QGradient__QGradientData) *QGradient__QGradientData { - ret := C.QGradient__QGradientData_new(param1.cPointer()) - return newQGradient__QGradientData(ret) + var outptr_QGradient__QGradientData *C.QGradient__QGradientData = nil + + C.QGradient__QGradientData_new(param1.cPointer(), &outptr_QGradient__QGradientData) + ret := newQGradient__QGradientData(outptr_QGradient__QGradientData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QGradient__QGradientData) Delete() { - C.QGradient__QGradientData_Delete(this.h) + C.QGradient__QGradientData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbrush.h b/qt6/gen_qbrush.h index 40d92ee9..aa426676 100644 --- a/qt6/gen_qbrush.h +++ b/qt6/gen_qbrush.h @@ -46,18 +46,18 @@ typedef struct QRadialGradient QRadialGradient; typedef struct QTransform QTransform; #endif -QBrush* QBrush_new(); -QBrush* QBrush_new2(int bs); -QBrush* QBrush_new3(QColor* color); -QBrush* QBrush_new4(int color); -QBrush* QBrush_new5(QColor* color, QPixmap* pixmap); -QBrush* QBrush_new6(int color, QPixmap* pixmap); -QBrush* QBrush_new7(QPixmap* pixmap); -QBrush* QBrush_new8(QImage* image); -QBrush* QBrush_new9(QBrush* brush); -QBrush* QBrush_new10(QGradient* gradient); -QBrush* QBrush_new11(QColor* color, int bs); -QBrush* QBrush_new12(int color, int bs); +void QBrush_new(QBrush** outptr_QBrush); +void QBrush_new2(int bs, QBrush** outptr_QBrush); +void QBrush_new3(QColor* color, QBrush** outptr_QBrush); +void QBrush_new4(int color, QBrush** outptr_QBrush); +void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush); +void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush); +void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush); +void QBrush_new8(QImage* image, QBrush** outptr_QBrush); +void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush); +void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush); +void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush); +void QBrush_new12(int color, int bs, QBrush** outptr_QBrush); void QBrush_OperatorAssign(QBrush* self, QBrush* brush); void QBrush_Swap(QBrush* self, QBrush* other); int QBrush_Style(const QBrush* self); @@ -76,15 +76,15 @@ bool QBrush_IsOpaque(const QBrush* self); bool QBrush_OperatorEqual(const QBrush* self, QBrush* b); bool QBrush_OperatorNotEqual(const QBrush* self, QBrush* b); bool QBrush_IsDetached(const QBrush* self); -void QBrush_Delete(QBrush* self); +void QBrush_Delete(QBrush* self, bool isSubclass); -QBrushData* QBrushData_new(QBrushData* param1); +void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData); void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1); -void QBrushData_Delete(QBrushData* self); +void QBrushData_Delete(QBrushData* self, bool isSubclass); -QGradient* QGradient_new(); -QGradient* QGradient_new2(int param1); -QGradient* QGradient_new3(QGradient* param1); +void QGradient_new(QGradient** outptr_QGradient); +void QGradient_new2(int param1, QGradient** outptr_QGradient); +void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient); int QGradient_Type(const QGradient* self); void QGradient_SetSpread(QGradient* self, int spread); int QGradient_Spread(const QGradient* self); @@ -97,28 +97,28 @@ int QGradient_InterpolationMode(const QGradient* self); void QGradient_SetInterpolationMode(QGradient* self, int mode); bool QGradient_OperatorEqual(const QGradient* self, QGradient* gradient); bool QGradient_OperatorNotEqual(const QGradient* self, QGradient* other); -void QGradient_Delete(QGradient* self); +void QGradient_Delete(QGradient* self, bool isSubclass); -QLinearGradient* QLinearGradient_new(); -QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop); -QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop); -QLinearGradient* QLinearGradient_new4(QLinearGradient* param1); +void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); QPointF* QLinearGradient_Start(const QLinearGradient* self); void QLinearGradient_SetStart(QLinearGradient* self, QPointF* start); void QLinearGradient_SetStart2(QLinearGradient* self, double x, double y); QPointF* QLinearGradient_FinalStop(const QLinearGradient* self); void QLinearGradient_SetFinalStop(QLinearGradient* self, QPointF* stop); void QLinearGradient_SetFinalStop2(QLinearGradient* self, double x, double y); -void QLinearGradient_Delete(QLinearGradient* self); +void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass); -QRadialGradient* QRadialGradient_new(); -QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint); -QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy); -QRadialGradient* QRadialGradient_new4(QPointF* center, double radius); -QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius); -QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius); -QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius); -QRadialGradient* QRadialGradient_new8(QRadialGradient* param1); +void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); QPointF* QRadialGradient_Center(const QRadialGradient* self); void QRadialGradient_SetCenter(QRadialGradient* self, QPointF* center); void QRadialGradient_SetCenter2(QRadialGradient* self, double x, double y); @@ -131,21 +131,21 @@ double QRadialGradient_CenterRadius(const QRadialGradient* self); void QRadialGradient_SetCenterRadius(QRadialGradient* self, double radius); double QRadialGradient_FocalRadius(const QRadialGradient* self); void QRadialGradient_SetFocalRadius(QRadialGradient* self, double radius); -void QRadialGradient_Delete(QRadialGradient* self); +void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass); -QConicalGradient* QConicalGradient_new(); -QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle); -QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle); -QConicalGradient* QConicalGradient_new4(QConicalGradient* param1); +void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); QPointF* QConicalGradient_Center(const QConicalGradient* self); void QConicalGradient_SetCenter(QConicalGradient* self, QPointF* center); void QConicalGradient_SetCenter2(QConicalGradient* self, double x, double y); double QConicalGradient_Angle(const QConicalGradient* self); void QConicalGradient_SetAngle(QConicalGradient* self, double angle); -void QConicalGradient_Delete(QConicalGradient* self); +void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass); -QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1); -void QGradient__QGradientData_Delete(QGradient__QGradientData* self); +void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData); +void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbuffer.cpp b/qt6/gen_qbuffer.cpp index 37653f2d..529c2586 100644 --- a/qt6/gen_qbuffer.cpp +++ b/qt6/gen_qbuffer.cpp @@ -1,5 +1,8 @@ #include #include +#include +#include +#include #include #include #include @@ -9,12 +12,482 @@ #include "gen_qbuffer.h" #include "_cgo_export.h" -QBuffer* QBuffer_new() { - return new QBuffer(); +class MiqtVirtualQBuffer : public virtual QBuffer { +public: + + MiqtVirtualQBuffer(): QBuffer() {}; + MiqtVirtualQBuffer(QObject* parent): QBuffer(parent) {}; + + virtual ~MiqtVirtualQBuffer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode openMode) override { + if (handle__Open == 0) { + return QBuffer::open(openMode); + } + + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval1 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QBuffer_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int openMode) { + + return QBuffer::open(static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QBuffer::close(); + return; + } + + + miqt_exec_callback_QBuffer_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QBuffer::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QBuffer::size(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QBuffer::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QBuffer::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QBuffer::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 off) override { + if (handle__Seek == 0) { + return QBuffer::seek(off); + } + + qint64 off_ret = off; + long long sigval1 = static_cast(off_ret); + + bool callback_return_value = miqt_exec_callback_QBuffer_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long off) { + + return QBuffer::seek(static_cast(off)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QBuffer::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QBuffer::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QBuffer::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QBuffer::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& param1) override { + if (handle__ConnectNotify == 0) { + QBuffer::connectNotify(param1); + return; + } + + const QMetaMethod& param1_ret = param1; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(¶m1_ret); + + miqt_exec_callback_QBuffer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* param1) { + + QBuffer::connectNotify(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& param1) override { + if (handle__DisconnectNotify == 0) { + QBuffer::disconnectNotify(param1); + return; + } + + const QMetaMethod& param1_ret = param1; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(¶m1_ret); + + miqt_exec_callback_QBuffer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* param1) { + + QBuffer::disconnectNotify(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QBuffer::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QBuffer::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QBuffer::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QBuffer::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QBuffer::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QBuffer::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QBuffer::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QBuffer_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QBuffer::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QBuffer::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QBuffer::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QBuffer::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QBuffer_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QBuffer::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QBuffer::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QBuffer_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QBuffer::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QBuffer::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QBuffer_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QBuffer::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QBuffer::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QBuffer::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QBuffer::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QBuffer_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QBuffer::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + +}; + +void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(); + *outptr_QBuffer = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QBuffer* QBuffer_new2(QObject* parent) { - return new QBuffer(parent); +void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(parent); + *outptr_QBuffer = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QBuffer_MetaObject(const QBuffer* self) { @@ -124,7 +597,163 @@ struct miqt_string QBuffer_Tr3(const char* s, const char* c, int n) { return _ms; } -void QBuffer_Delete(QBuffer* self) { - delete self; +void QBuffer_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Open = slot; +} + +bool QBuffer_virtualbase_Open(void* self, int openMode) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Open(openMode); +} + +void QBuffer_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Close = slot; +} + +void QBuffer_virtualbase_Close(void* self) { + ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Close(); +} + +void QBuffer_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Size = slot; +} + +long long QBuffer_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_Size(); +} + +void QBuffer_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Pos = slot; +} + +long long QBuffer_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_Pos(); +} + +void QBuffer_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Seek = slot; +} + +bool QBuffer_virtualbase_Seek(void* self, long long off) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Seek(off); +} + +void QBuffer_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__AtEnd = slot; +} + +bool QBuffer_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_AtEnd(); +} + +void QBuffer_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__CanReadLine = slot; +} + +bool QBuffer_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_CanReadLine(); +} + +void QBuffer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__ConnectNotify = slot; +} + +void QBuffer_virtualbase_ConnectNotify(void* self, QMetaMethod* param1) { + ( (MiqtVirtualQBuffer*)(self) )->virtualbase_ConnectNotify(param1); +} + +void QBuffer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__DisconnectNotify = slot; +} + +void QBuffer_virtualbase_DisconnectNotify(void* self, QMetaMethod* param1) { + ( (MiqtVirtualQBuffer*)(self) )->virtualbase_DisconnectNotify(param1); +} + +void QBuffer_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__ReadData = slot; +} + +long long QBuffer_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QBuffer_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__WriteData = slot; +} + +long long QBuffer_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QBuffer_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__IsSequential = slot; +} + +bool QBuffer_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_IsSequential(); +} + +void QBuffer_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__Reset = slot; +} + +bool QBuffer_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_Reset(); +} + +void QBuffer_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__BytesAvailable = slot; +} + +long long QBuffer_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_BytesAvailable(); +} + +void QBuffer_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__BytesToWrite = slot; +} + +long long QBuffer_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQBuffer*)(self) )->virtualbase_BytesToWrite(); +} + +void QBuffer_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QBuffer_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QBuffer_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QBuffer_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QBuffer_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__ReadLineData = slot; +} + +long long QBuffer_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QBuffer_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QBuffer*)(self) )->handle__SkipData = slot; +} + +long long QBuffer_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQBuffer*)(self) )->virtualbase_SkipData(maxSize); +} + +void QBuffer_Delete(QBuffer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbuffer.go b/qt6/gen_qbuffer.go index 7dd0ae66..bcb2afe3 100644 --- a/qt6/gen_qbuffer.go +++ b/qt6/gen_qbuffer.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QBuffer struct { - h *C.QBuffer + h *C.QBuffer + isSubclass bool *QIODevice } @@ -32,27 +34,49 @@ func (this *QBuffer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQBuffer(h *C.QBuffer) *QBuffer { +// newQBuffer constructs the type using only CGO pointers. +func newQBuffer(h *C.QBuffer, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QBuffer { if h == nil { return nil } - return &QBuffer{h: h, QIODevice: UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QBuffer{h: h, + QIODevice: newQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQBuffer(h unsafe.Pointer) *QBuffer { - return newQBuffer((*C.QBuffer)(h)) +// UnsafeNewQBuffer constructs the type using only unsafe pointers. +func UnsafeNewQBuffer(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QBuffer { + if h == nil { + return nil + } + + return &QBuffer{h: (*C.QBuffer)(h), + QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQBuffer constructs a new QBuffer object. func NewQBuffer() *QBuffer { - ret := C.QBuffer_new() - return newQBuffer(ret) + var outptr_QBuffer *C.QBuffer = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QBuffer_new(&outptr_QBuffer, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQBuffer2 constructs a new QBuffer object. func NewQBuffer2(parent *QObject) *QBuffer { - ret := C.QBuffer_new2(parent.cPointer()) - return newQBuffer(ret) + var outptr_QBuffer *C.QBuffer = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QBuffer_new2(parent.cPointer(), &outptr_QBuffer, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QBuffer) MetaObject() *QMetaObject { @@ -158,9 +182,466 @@ func QBuffer_Tr3(s string, c string, n int) string { return _ret } +func (this *QBuffer) callVirtualBase_Open(openMode QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QBuffer_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(openMode))) + +} +func (this *QBuffer) OnOpen(slot func(super func(openMode QIODeviceBase__OpenModeFlag) bool, openMode QIODeviceBase__OpenModeFlag) bool) { + C.QBuffer_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Open +func miqt_exec_callback_QBuffer_Open(self *C.QBuffer, cb C.intptr_t, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(openMode QIODeviceBase__OpenModeFlag) bool, openMode QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODeviceBase__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Close() { + + C.QBuffer_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QBuffer) OnClose(slot func(super func())) { + C.QBuffer_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Close +func miqt_exec_callback_QBuffer_Close(self *C.QBuffer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QBuffer{h: self}).callVirtualBase_Close) + +} + +func (this *QBuffer) callVirtualBase_Size() int64 { + + return (int64)(C.QBuffer_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnSize(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Size +func miqt_exec_callback_QBuffer_Size(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Pos() int64 { + + return (int64)(C.QBuffer_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnPos(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Pos +func miqt_exec_callback_QBuffer_Pos(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Seek(off int64) bool { + + return (bool)(C.QBuffer_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(off))) + +} +func (this *QBuffer) OnSeek(slot func(super func(off int64) bool, off int64) bool) { + C.QBuffer_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Seek +func miqt_exec_callback_QBuffer_Seek(self *C.QBuffer, cb C.intptr_t, off C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(off int64) bool, off int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(off) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_AtEnd() bool { + + return (bool)(C.QBuffer_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnAtEnd(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_AtEnd +func miqt_exec_callback_QBuffer_AtEnd(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QBuffer_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnCanReadLine(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_CanReadLine +func miqt_exec_callback_QBuffer_CanReadLine(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_ConnectNotify(param1 *QMetaMethod) { + + C.QBuffer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QBuffer) OnConnectNotify(slot func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) { + C.QBuffer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_ConnectNotify +func miqt_exec_callback_QBuffer_ConnectNotify(self *C.QBuffer, cb C.intptr_t, param1 *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(param1)) + + gofunc((&QBuffer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QBuffer) callVirtualBase_DisconnectNotify(param1 *QMetaMethod) { + + C.QBuffer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QBuffer) OnDisconnectNotify(slot func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) { + C.QBuffer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_DisconnectNotify +func miqt_exec_callback_QBuffer_DisconnectNotify(self *C.QBuffer, cb C.intptr_t, param1 *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMetaMethod), param1 *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(param1)) + + gofunc((&QBuffer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +func (this *QBuffer) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QBuffer_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QBuffer) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QBuffer_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_ReadData +func miqt_exec_callback_QBuffer_ReadData(self *C.QBuffer, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QBuffer_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QBuffer) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QBuffer_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_WriteData +func miqt_exec_callback_QBuffer_WriteData(self *C.QBuffer, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_IsSequential() bool { + + return (bool)(C.QBuffer_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnIsSequential(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_IsSequential +func miqt_exec_callback_QBuffer_IsSequential(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_Reset() bool { + + return (bool)(C.QBuffer_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnReset(slot func(super func() bool) bool) { + C.QBuffer_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_Reset +func miqt_exec_callback_QBuffer_Reset(self *C.QBuffer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QBuffer_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnBytesAvailable(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_BytesAvailable +func miqt_exec_callback_QBuffer_BytesAvailable(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QBuffer_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QBuffer) OnBytesToWrite(slot func(super func() int64) int64) { + C.QBuffer_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_BytesToWrite +func miqt_exec_callback_QBuffer_BytesToWrite(self *C.QBuffer, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QBuffer_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QBuffer) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QBuffer_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_WaitForReadyRead +func miqt_exec_callback_QBuffer_WaitForReadyRead(self *C.QBuffer, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QBuffer_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QBuffer) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QBuffer_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_WaitForBytesWritten +func miqt_exec_callback_QBuffer_WaitForBytesWritten(self *C.QBuffer, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QBuffer_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QBuffer) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QBuffer_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_ReadLineData +func miqt_exec_callback_QBuffer_ReadLineData(self *C.QBuffer, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QBuffer) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QBuffer_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QBuffer) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QBuffer_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QBuffer_SkipData +func miqt_exec_callback_QBuffer_SkipData(self *C.QBuffer, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QBuffer{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QBuffer) Delete() { - C.QBuffer_Delete(this.h) + C.QBuffer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbuffer.h b/qt6/gen_qbuffer.h index 2bfbf0d6..a42e0b4e 100644 --- a/qt6/gen_qbuffer.h +++ b/qt6/gen_qbuffer.h @@ -17,17 +17,23 @@ extern "C" { #ifdef __cplusplus class QBuffer; class QByteArray; +class QIODevice; +class QIODeviceBase; +class QMetaMethod; class QMetaObject; class QObject; #else typedef struct QBuffer QBuffer; typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QBuffer* QBuffer_new(); -QBuffer* QBuffer_new2(QObject* parent); +void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QBuffer_MetaObject(const QBuffer* self); void* QBuffer_Metacast(QBuffer* self, const char* param1); struct miqt_string QBuffer_Tr(const char* s); @@ -43,9 +49,51 @@ long long QBuffer_Pos(const QBuffer* self); bool QBuffer_Seek(QBuffer* self, long long off); bool QBuffer_AtEnd(const QBuffer* self); bool QBuffer_CanReadLine(const QBuffer* self); +void QBuffer_ConnectNotify(QBuffer* self, QMetaMethod* param1); +void QBuffer_DisconnectNotify(QBuffer* self, QMetaMethod* param1); +long long QBuffer_ReadData(QBuffer* self, char* data, long long maxlen); +long long QBuffer_WriteData(QBuffer* self, const char* data, long long lenVal); struct miqt_string QBuffer_Tr2(const char* s, const char* c); struct miqt_string QBuffer_Tr3(const char* s, const char* c, int n); -void QBuffer_Delete(QBuffer* self); +void QBuffer_override_virtual_Open(void* self, intptr_t slot); +bool QBuffer_virtualbase_Open(void* self, int openMode); +void QBuffer_override_virtual_Close(void* self, intptr_t slot); +void QBuffer_virtualbase_Close(void* self); +void QBuffer_override_virtual_Size(void* self, intptr_t slot); +long long QBuffer_virtualbase_Size(const void* self); +void QBuffer_override_virtual_Pos(void* self, intptr_t slot); +long long QBuffer_virtualbase_Pos(const void* self); +void QBuffer_override_virtual_Seek(void* self, intptr_t slot); +bool QBuffer_virtualbase_Seek(void* self, long long off); +void QBuffer_override_virtual_AtEnd(void* self, intptr_t slot); +bool QBuffer_virtualbase_AtEnd(const void* self); +void QBuffer_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QBuffer_virtualbase_CanReadLine(const void* self); +void QBuffer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QBuffer_virtualbase_ConnectNotify(void* self, QMetaMethod* param1); +void QBuffer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QBuffer_virtualbase_DisconnectNotify(void* self, QMetaMethod* param1); +void QBuffer_override_virtual_ReadData(void* self, intptr_t slot); +long long QBuffer_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QBuffer_override_virtual_WriteData(void* self, intptr_t slot); +long long QBuffer_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QBuffer_override_virtual_IsSequential(void* self, intptr_t slot); +bool QBuffer_virtualbase_IsSequential(const void* self); +void QBuffer_override_virtual_Reset(void* self, intptr_t slot); +bool QBuffer_virtualbase_Reset(void* self); +void QBuffer_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QBuffer_virtualbase_BytesAvailable(const void* self); +void QBuffer_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QBuffer_virtualbase_BytesToWrite(const void* self); +void QBuffer_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QBuffer_virtualbase_WaitForReadyRead(void* self, int msecs); +void QBuffer_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QBuffer_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QBuffer_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QBuffer_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QBuffer_override_virtual_SkipData(void* self, intptr_t slot); +long long QBuffer_virtualbase_SkipData(void* self, long long maxSize); +void QBuffer_Delete(QBuffer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbuttongroup.cpp b/qt6/gen_qbuttongroup.cpp index 3c736ec7..58137e94 100644 --- a/qt6/gen_qbuttongroup.cpp +++ b/qt6/gen_qbuttongroup.cpp @@ -1,21 +1,210 @@ #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qbuttongroup.h" #include "_cgo_export.h" -QButtonGroup* QButtonGroup_new() { - return new QButtonGroup(); +class MiqtVirtualQButtonGroup : public virtual QButtonGroup { +public: + + MiqtVirtualQButtonGroup(): QButtonGroup() {}; + MiqtVirtualQButtonGroup(QObject* parent): QButtonGroup(parent) {}; + + virtual ~MiqtVirtualQButtonGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QButtonGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QButtonGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QButtonGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QButtonGroup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QButtonGroup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QButtonGroup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QButtonGroup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QButtonGroup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QButtonGroup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QButtonGroup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QButtonGroup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QButtonGroup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QButtonGroup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QButtonGroup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QButtonGroup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QButtonGroup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QButtonGroup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QButtonGroup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QButtonGroup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QButtonGroup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QButtonGroup::disconnectNotify(*signal); + + } + +}; + +void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { + MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(); + *outptr_QButtonGroup = ret; + *outptr_QObject = static_cast(ret); } -QButtonGroup* QButtonGroup_new2(QObject* parent) { - return new QButtonGroup(parent); +void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { + MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(parent); + *outptr_QButtonGroup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self) { @@ -91,7 +280,7 @@ void QButtonGroup_ButtonClicked(QButtonGroup* self, QAbstractButton* param1) { } void QButtonGroup_connect_ButtonClicked(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonClicked), self, [=](QAbstractButton* param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonClicked), self, [=](QAbstractButton* param1) { QAbstractButton* sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonClicked(slot, sigval1); }); @@ -102,7 +291,7 @@ void QButtonGroup_ButtonPressed(QButtonGroup* self, QAbstractButton* param1) { } void QButtonGroup_connect_ButtonPressed(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonPressed), self, [=](QAbstractButton* param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonPressed), self, [=](QAbstractButton* param1) { QAbstractButton* sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonPressed(slot, sigval1); }); @@ -113,7 +302,7 @@ void QButtonGroup_ButtonReleased(QButtonGroup* self, QAbstractButton* param1) { } void QButtonGroup_connect_ButtonReleased(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonReleased), self, [=](QAbstractButton* param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonReleased), self, [=](QAbstractButton* param1) { QAbstractButton* sigval1 = param1; miqt_exec_callback_QButtonGroup_ButtonReleased(slot, sigval1); }); @@ -124,7 +313,7 @@ void QButtonGroup_ButtonToggled(QButtonGroup* self, QAbstractButton* param1, boo } void QButtonGroup_connect_ButtonToggled(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::buttonToggled), self, [=](QAbstractButton* param1, bool param2) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::buttonToggled), self, [=](QAbstractButton* param1, bool param2) { QAbstractButton* sigval1 = param1; bool sigval2 = param2; miqt_exec_callback_QButtonGroup_ButtonToggled(slot, sigval1, sigval2); @@ -136,7 +325,7 @@ void QButtonGroup_IdClicked(QButtonGroup* self, int param1) { } void QButtonGroup_connect_IdClicked(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idClicked), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idClicked), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_IdClicked(slot, sigval1); }); @@ -147,7 +336,7 @@ void QButtonGroup_IdPressed(QButtonGroup* self, int param1) { } void QButtonGroup_connect_IdPressed(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idPressed), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idPressed), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_IdPressed(slot, sigval1); }); @@ -158,7 +347,7 @@ void QButtonGroup_IdReleased(QButtonGroup* self, int param1) { } void QButtonGroup_connect_IdReleased(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idReleased), self, [=](int param1) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idReleased), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QButtonGroup_IdReleased(slot, sigval1); }); @@ -169,7 +358,7 @@ void QButtonGroup_IdToggled(QButtonGroup* self, int param1, bool param2) { } void QButtonGroup_connect_IdToggled(QButtonGroup* self, intptr_t slot) { - QButtonGroup::connect(self, static_cast(&QButtonGroup::idToggled), self, [=](int param1, bool param2) { + MiqtVirtualQButtonGroup::connect(self, static_cast(&QButtonGroup::idToggled), self, [=](int param1, bool param2) { int sigval1 = param1; bool sigval2 = param2; miqt_exec_callback_QButtonGroup_IdToggled(slot, sigval1, sigval2); @@ -202,7 +391,67 @@ void QButtonGroup_AddButton2(QButtonGroup* self, QAbstractButton* param1, int id self->addButton(param1, static_cast(id)); } -void QButtonGroup_Delete(QButtonGroup* self) { - delete self; +void QButtonGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__Event = slot; +} + +bool QButtonGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_Event(event); +} + +void QButtonGroup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__EventFilter = slot; +} + +bool QButtonGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QButtonGroup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__TimerEvent = slot; +} + +void QButtonGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_TimerEvent(event); +} + +void QButtonGroup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__ChildEvent = slot; +} + +void QButtonGroup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_ChildEvent(event); +} + +void QButtonGroup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__CustomEvent = slot; +} + +void QButtonGroup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_CustomEvent(event); +} + +void QButtonGroup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__ConnectNotify = slot; +} + +void QButtonGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QButtonGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QButtonGroup*)(self) )->handle__DisconnectNotify = slot; +} + +void QButtonGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQButtonGroup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QButtonGroup_Delete(QButtonGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbuttongroup.go b/qt6/gen_qbuttongroup.go index 0a78e35e..c20bcafe 100644 --- a/qt6/gen_qbuttongroup.go +++ b/qt6/gen_qbuttongroup.go @@ -15,7 +15,8 @@ import ( ) type QButtonGroup struct { - h *C.QButtonGroup + h *C.QButtonGroup + isSubclass bool *QObject } @@ -33,27 +34,45 @@ func (this *QButtonGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQButtonGroup(h *C.QButtonGroup) *QButtonGroup { +// newQButtonGroup constructs the type using only CGO pointers. +func newQButtonGroup(h *C.QButtonGroup, h_QObject *C.QObject) *QButtonGroup { if h == nil { return nil } - return &QButtonGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QButtonGroup{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQButtonGroup(h unsafe.Pointer) *QButtonGroup { - return newQButtonGroup((*C.QButtonGroup)(h)) +// UnsafeNewQButtonGroup constructs the type using only unsafe pointers. +func UnsafeNewQButtonGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QButtonGroup { + if h == nil { + return nil + } + + return &QButtonGroup{h: (*C.QButtonGroup)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQButtonGroup constructs a new QButtonGroup object. func NewQButtonGroup() *QButtonGroup { - ret := C.QButtonGroup_new() - return newQButtonGroup(ret) + var outptr_QButtonGroup *C.QButtonGroup = nil + var outptr_QObject *C.QObject = nil + + C.QButtonGroup_new(&outptr_QButtonGroup, &outptr_QObject) + ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQButtonGroup2 constructs a new QButtonGroup object. func NewQButtonGroup2(parent *QObject) *QButtonGroup { - ret := C.QButtonGroup_new2(parent.cPointer()) - return newQButtonGroup(ret) + var outptr_QButtonGroup *C.QButtonGroup = nil + var outptr_QObject *C.QObject = nil + + C.QButtonGroup_new2(parent.cPointer(), &outptr_QButtonGroup, &outptr_QObject) + ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QButtonGroup) MetaObject() *QMetaObject { @@ -96,17 +115,17 @@ func (this *QButtonGroup) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } func (this *QButtonGroup) CheckedButton() *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_CheckedButton(this.h))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_CheckedButton(this.h)), nil, nil, nil) } func (this *QButtonGroup) Button(id int) *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_Button(this.h, (C.int)(id)))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QButtonGroup_Button(this.h, (C.int)(id))), nil, nil, nil) } func (this *QButtonGroup) SetId(button *QAbstractButton, id int) { @@ -136,7 +155,7 @@ func miqt_exec_callback_QButtonGroup_ButtonClicked(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -156,7 +175,7 @@ func miqt_exec_callback_QButtonGroup_ButtonPressed(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -176,7 +195,7 @@ func miqt_exec_callback_QButtonGroup_ButtonReleased(cb C.intptr_t, param1 *C.QAb } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -196,7 +215,7 @@ func miqt_exec_callback_QButtonGroup_ButtonToggled(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(param1), nil, nil, nil) slotval2 := (bool)(param2) gofunc(slotval1, slotval2) @@ -310,9 +329,175 @@ func (this *QButtonGroup) AddButton2(param1 *QAbstractButton, id int) { C.QButtonGroup_AddButton2(this.h, param1.cPointer(), (C.int)(id)) } +func (this *QButtonGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QButtonGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QButtonGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QButtonGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_Event +func miqt_exec_callback_QButtonGroup_Event(self *C.QButtonGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QButtonGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QButtonGroup) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QButtonGroup_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QButtonGroup) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QButtonGroup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_EventFilter +func miqt_exec_callback_QButtonGroup_EventFilter(self *C.QButtonGroup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QButtonGroup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QButtonGroup) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QButtonGroup_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QButtonGroup) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QButtonGroup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_TimerEvent +func miqt_exec_callback_QButtonGroup_TimerEvent(self *C.QButtonGroup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QButtonGroup_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QButtonGroup) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QButtonGroup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_ChildEvent +func miqt_exec_callback_QButtonGroup_ChildEvent(self *C.QButtonGroup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_CustomEvent(event *QEvent) { + + C.QButtonGroup_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QButtonGroup) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QButtonGroup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_CustomEvent +func miqt_exec_callback_QButtonGroup_CustomEvent(self *C.QButtonGroup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QButtonGroup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QButtonGroup) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QButtonGroup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_ConnectNotify +func miqt_exec_callback_QButtonGroup_ConnectNotify(self *C.QButtonGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QButtonGroup) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QButtonGroup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QButtonGroup) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QButtonGroup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QButtonGroup_DisconnectNotify +func miqt_exec_callback_QButtonGroup_DisconnectNotify(self *C.QButtonGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QButtonGroup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QButtonGroup) Delete() { - C.QButtonGroup_Delete(this.h) + C.QButtonGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbuttongroup.h b/qt6/gen_qbuttongroup.h index 98f7f6ca..36bf656a 100644 --- a/qt6/gen_qbuttongroup.h +++ b/qt6/gen_qbuttongroup.h @@ -17,17 +17,25 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QButtonGroup; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAbstractButton QAbstractButton; typedef struct QButtonGroup QButtonGroup; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QButtonGroup* QButtonGroup_new(); -QButtonGroup* QButtonGroup_new2(QObject* parent); +void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); +void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self); void* QButtonGroup_Metacast(QButtonGroup* self, const char* param1); struct miqt_string QButtonGroup_Tr(const char* s); @@ -60,7 +68,21 @@ void QButtonGroup_connect_IdToggled(QButtonGroup* self, intptr_t slot); struct miqt_string QButtonGroup_Tr2(const char* s, const char* c); struct miqt_string QButtonGroup_Tr3(const char* s, const char* c, int n); void QButtonGroup_AddButton2(QButtonGroup* self, QAbstractButton* param1, int id); -void QButtonGroup_Delete(QButtonGroup* self); +void QButtonGroup_override_virtual_Event(void* self, intptr_t slot); +bool QButtonGroup_virtualbase_Event(void* self, QEvent* event); +void QButtonGroup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QButtonGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QButtonGroup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QButtonGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QButtonGroup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QButtonGroup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QButtonGroup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QButtonGroup_virtualbase_CustomEvent(void* self, QEvent* event); +void QButtonGroup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QButtonGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QButtonGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QButtonGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QButtonGroup_Delete(QButtonGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qbytearraymatcher.cpp b/qt6/gen_qbytearraymatcher.cpp index 86d2aa73..72c131cf 100644 --- a/qt6/gen_qbytearraymatcher.cpp +++ b/qt6/gen_qbytearraymatcher.cpp @@ -6,29 +6,35 @@ #include "gen_qbytearraymatcher.h" #include "_cgo_export.h" -QByteArrayMatcher* QByteArrayMatcher_new() { - return new QByteArrayMatcher(); +void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern) { +void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { QByteArray pattern_QByteArray(pattern.data, pattern.len); - return new QByteArrayMatcher(pattern_QByteArray); + QByteArrayMatcher* ret = new QByteArrayMatcher(pattern_QByteArray); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new3(QByteArrayView* pattern) { - return new QByteArrayMatcher(*pattern); +void QByteArrayMatcher_new3(QByteArrayView* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(*pattern); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new4(const char* pattern) { - return new QByteArrayMatcher(pattern); +void QByteArrayMatcher_new4(const char* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(pattern); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new5(QByteArrayMatcher* other) { - return new QByteArrayMatcher(*other); +void QByteArrayMatcher_new5(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(*other); + *outptr_QByteArrayMatcher = ret; } -QByteArrayMatcher* QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length) { - return new QByteArrayMatcher(pattern, (qsizetype)(length)); +void QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length, QByteArrayMatcher** outptr_QByteArrayMatcher) { + QByteArrayMatcher* ret = new QByteArrayMatcher(pattern, (qsizetype)(length)); + *outptr_QByteArrayMatcher = ret; } void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other) { @@ -69,7 +75,11 @@ ptrdiff_t QByteArrayMatcher_IndexIn2(const QByteArrayMatcher* self, QByteArrayVi return static_cast(_ret); } -void QByteArrayMatcher_Delete(QByteArrayMatcher* self) { - delete self; +void QByteArrayMatcher_Delete(QByteArrayMatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbytearraymatcher.go b/qt6/gen_qbytearraymatcher.go index 8603938f..b66e6489 100644 --- a/qt6/gen_qbytearraymatcher.go +++ b/qt6/gen_qbytearraymatcher.go @@ -14,7 +14,8 @@ import ( ) type QByteArrayMatcher struct { - h *C.QByteArrayMatcher + h *C.QByteArrayMatcher + isSubclass bool } func (this *QByteArrayMatcher) cPointer() *C.QByteArrayMatcher { @@ -31,6 +32,7 @@ func (this *QByteArrayMatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQByteArrayMatcher constructs the type using only CGO pointers. func newQByteArrayMatcher(h *C.QByteArrayMatcher) *QByteArrayMatcher { if h == nil { return nil @@ -38,14 +40,23 @@ func newQByteArrayMatcher(h *C.QByteArrayMatcher) *QByteArrayMatcher { return &QByteArrayMatcher{h: h} } +// UnsafeNewQByteArrayMatcher constructs the type using only unsafe pointers. func UnsafeNewQByteArrayMatcher(h unsafe.Pointer) *QByteArrayMatcher { - return newQByteArrayMatcher((*C.QByteArrayMatcher)(h)) + if h == nil { + return nil + } + + return &QByteArrayMatcher{h: (*C.QByteArrayMatcher)(h)} } // NewQByteArrayMatcher constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher() *QByteArrayMatcher { - ret := C.QByteArrayMatcher_new() - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new(&outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher2 constructs a new QByteArrayMatcher object. @@ -53,36 +64,56 @@ func NewQByteArrayMatcher2(pattern []byte) *QByteArrayMatcher { pattern_alias := C.struct_miqt_string{} pattern_alias.data = (*C.char)(unsafe.Pointer(&pattern[0])) pattern_alias.len = C.size_t(len(pattern)) - ret := C.QByteArrayMatcher_new2(pattern_alias) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new2(pattern_alias, &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher3 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher3(pattern QByteArrayView) *QByteArrayMatcher { - ret := C.QByteArrayMatcher_new3(pattern.cPointer()) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new3(pattern.cPointer(), &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher4 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher4(pattern string) *QByteArrayMatcher { pattern_Cstring := C.CString(pattern) defer C.free(unsafe.Pointer(pattern_Cstring)) - ret := C.QByteArrayMatcher_new4(pattern_Cstring) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new4(pattern_Cstring, &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher5 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher5(other *QByteArrayMatcher) *QByteArrayMatcher { - ret := C.QByteArrayMatcher_new5(other.cPointer()) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new5(other.cPointer(), &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } // NewQByteArrayMatcher6 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher6(pattern string, length int64) *QByteArrayMatcher { pattern_Cstring := C.CString(pattern) defer C.free(unsafe.Pointer(pattern_Cstring)) - ret := C.QByteArrayMatcher_new6(pattern_Cstring, (C.ptrdiff_t)(length)) - return newQByteArrayMatcher(ret) + var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil + + C.QByteArrayMatcher_new6(pattern_Cstring, (C.ptrdiff_t)(length), &outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret.isSubclass = true + return ret } func (this *QByteArrayMatcher) OperatorAssign(other *QByteArrayMatcher) { @@ -125,7 +156,7 @@ func (this *QByteArrayMatcher) IndexIn2(data QByteArrayView, from int64) int64 { // Delete this object from C++ memory. func (this *QByteArrayMatcher) Delete() { - C.QByteArrayMatcher_Delete(this.h) + C.QByteArrayMatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -138,7 +169,8 @@ func (this *QByteArrayMatcher) GoGC() { } type QStaticByteArrayMatcherBase struct { - h *C.QStaticByteArrayMatcherBase + h *C.QStaticByteArrayMatcherBase + isSubclass bool } func (this *QStaticByteArrayMatcherBase) cPointer() *C.QStaticByteArrayMatcherBase { @@ -155,6 +187,7 @@ func (this *QStaticByteArrayMatcherBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStaticByteArrayMatcherBase constructs the type using only CGO pointers. func newQStaticByteArrayMatcherBase(h *C.QStaticByteArrayMatcherBase) *QStaticByteArrayMatcherBase { if h == nil { return nil @@ -162,6 +195,11 @@ func newQStaticByteArrayMatcherBase(h *C.QStaticByteArrayMatcherBase) *QStaticBy return &QStaticByteArrayMatcherBase{h: h} } +// UnsafeNewQStaticByteArrayMatcherBase constructs the type using only unsafe pointers. func UnsafeNewQStaticByteArrayMatcherBase(h unsafe.Pointer) *QStaticByteArrayMatcherBase { - return newQStaticByteArrayMatcherBase((*C.QStaticByteArrayMatcherBase)(h)) + if h == nil { + return nil + } + + return &QStaticByteArrayMatcherBase{h: (*C.QStaticByteArrayMatcherBase)(h)} } diff --git a/qt6/gen_qbytearraymatcher.h b/qt6/gen_qbytearraymatcher.h index 44e49c8c..55d5e376 100644 --- a/qt6/gen_qbytearraymatcher.h +++ b/qt6/gen_qbytearraymatcher.h @@ -26,12 +26,12 @@ typedef struct QByteArrayView QByteArrayView; typedef struct QStaticByteArrayMatcherBase QStaticByteArrayMatcherBase; #endif -QByteArrayMatcher* QByteArrayMatcher_new(); -QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern); -QByteArrayMatcher* QByteArrayMatcher_new3(QByteArrayView* pattern); -QByteArrayMatcher* QByteArrayMatcher_new4(const char* pattern); -QByteArrayMatcher* QByteArrayMatcher_new5(QByteArrayMatcher* other); -QByteArrayMatcher* QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length); +void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new3(QByteArrayView* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new4(const char* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new5(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher); +void QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length, QByteArrayMatcher** outptr_QByteArrayMatcher); void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other); void QByteArrayMatcher_SetPattern(QByteArrayMatcher* self, struct miqt_string pattern); ptrdiff_t QByteArrayMatcher_IndexIn(const QByteArrayMatcher* self, const char* str, ptrdiff_t lenVal); @@ -39,7 +39,7 @@ ptrdiff_t QByteArrayMatcher_IndexInWithData(const QByteArrayMatcher* self, QByte struct miqt_string QByteArrayMatcher_Pattern(const QByteArrayMatcher* self); ptrdiff_t QByteArrayMatcher_IndexIn3(const QByteArrayMatcher* self, const char* str, ptrdiff_t lenVal, ptrdiff_t from); ptrdiff_t QByteArrayMatcher_IndexIn2(const QByteArrayMatcher* self, QByteArrayView* data, ptrdiff_t from); -void QByteArrayMatcher_Delete(QByteArrayMatcher* self); +void QByteArrayMatcher_Delete(QByteArrayMatcher* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qbytearrayview.cpp b/qt6/gen_qbytearrayview.cpp index b9884423..e9991a30 100644 --- a/qt6/gen_qbytearrayview.cpp +++ b/qt6/gen_qbytearrayview.cpp @@ -4,12 +4,14 @@ #include "gen_qbytearrayview.h" #include "_cgo_export.h" -QByteArrayView* QByteArrayView_new() { - return new QByteArrayView(); +void QByteArrayView_new(QByteArrayView** outptr_QByteArrayView) { + QByteArrayView* ret = new QByteArrayView(); + *outptr_QByteArrayView = ret; } -QByteArrayView* QByteArrayView_new2(QByteArrayView* param1) { - return new QByteArrayView(*param1); +void QByteArrayView_new2(QByteArrayView* param1, QByteArrayView** outptr_QByteArrayView) { + QByteArrayView* ret = new QByteArrayView(*param1); + *outptr_QByteArrayView = ret; } struct miqt_string QByteArrayView_ToByteArray(const QByteArrayView* self) { @@ -342,7 +344,11 @@ int QByteArrayView_Compare2(const QByteArrayView* self, QByteArrayView* a, int c return self->compare(*a, static_cast(cs)); } -void QByteArrayView_Delete(QByteArrayView* self) { - delete self; +void QByteArrayView_Delete(QByteArrayView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qbytearrayview.go b/qt6/gen_qbytearrayview.go index 0d30648a..80827a1e 100644 --- a/qt6/gen_qbytearrayview.go +++ b/qt6/gen_qbytearrayview.go @@ -14,7 +14,8 @@ import ( ) type QByteArrayView struct { - h *C.QByteArrayView + h *C.QByteArrayView + isSubclass bool } func (this *QByteArrayView) cPointer() *C.QByteArrayView { @@ -31,6 +32,7 @@ func (this *QByteArrayView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQByteArrayView constructs the type using only CGO pointers. func newQByteArrayView(h *C.QByteArrayView) *QByteArrayView { if h == nil { return nil @@ -38,20 +40,33 @@ func newQByteArrayView(h *C.QByteArrayView) *QByteArrayView { return &QByteArrayView{h: h} } +// UnsafeNewQByteArrayView constructs the type using only unsafe pointers. func UnsafeNewQByteArrayView(h unsafe.Pointer) *QByteArrayView { - return newQByteArrayView((*C.QByteArrayView)(h)) + if h == nil { + return nil + } + + return &QByteArrayView{h: (*C.QByteArrayView)(h)} } // NewQByteArrayView constructs a new QByteArrayView object. func NewQByteArrayView() *QByteArrayView { - ret := C.QByteArrayView_new() - return newQByteArrayView(ret) + var outptr_QByteArrayView *C.QByteArrayView = nil + + C.QByteArrayView_new(&outptr_QByteArrayView) + ret := newQByteArrayView(outptr_QByteArrayView) + ret.isSubclass = true + return ret } // NewQByteArrayView2 constructs a new QByteArrayView object. func NewQByteArrayView2(param1 *QByteArrayView) *QByteArrayView { - ret := C.QByteArrayView_new2(param1.cPointer()) - return newQByteArrayView(ret) + var outptr_QByteArrayView *C.QByteArrayView = nil + + C.QByteArrayView_new2(param1.cPointer(), &outptr_QByteArrayView) + ret := newQByteArrayView(outptr_QByteArrayView) + ret.isSubclass = true + return ret } func (this *QByteArrayView) ToByteArray() []byte { @@ -375,7 +390,7 @@ func (this *QByteArrayView) Compare2(a QByteArrayView, cs CaseSensitivity) int { // Delete this object from C++ memory. func (this *QByteArrayView) Delete() { - C.QByteArrayView_Delete(this.h) + C.QByteArrayView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qbytearrayview.h b/qt6/gen_qbytearrayview.h index f6b7596b..b5adc3ec 100644 --- a/qt6/gen_qbytearrayview.h +++ b/qt6/gen_qbytearrayview.h @@ -22,8 +22,8 @@ typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; #endif -QByteArrayView* QByteArrayView_new(); -QByteArrayView* QByteArrayView_new2(QByteArrayView* param1); +void QByteArrayView_new(QByteArrayView** outptr_QByteArrayView); +void QByteArrayView_new2(QByteArrayView* param1, QByteArrayView** outptr_QByteArrayView); struct miqt_string QByteArrayView_ToByteArray(const QByteArrayView* self); ptrdiff_t QByteArrayView_Size(const QByteArrayView* self); const char* QByteArrayView_Data(const QByteArrayView* self); @@ -97,7 +97,7 @@ ptrdiff_t QByteArrayView_IndexOf2(const QByteArrayView* self, QByteArrayView* a, ptrdiff_t QByteArrayView_IndexOf22(const QByteArrayView* self, char ch, ptrdiff_t from); ptrdiff_t QByteArrayView_LastIndexOf22(const QByteArrayView* self, char ch, ptrdiff_t from); int QByteArrayView_Compare2(const QByteArrayView* self, QByteArrayView* a, int cs); -void QByteArrayView_Delete(QByteArrayView* self); +void QByteArrayView_Delete(QByteArrayView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcalendar.cpp b/qt6/gen_qcalendar.cpp index 3838a7c4..c01f4ec6 100644 --- a/qt6/gen_qcalendar.cpp +++ b/qt6/gen_qcalendar.cpp @@ -12,20 +12,24 @@ #include "gen_qcalendar.h" #include "_cgo_export.h" -QCalendar* QCalendar_new() { - return new QCalendar(); +void QCalendar_new(QCalendar** outptr_QCalendar) { + QCalendar* ret = new QCalendar(); + *outptr_QCalendar = ret; } -QCalendar* QCalendar_new2(int system) { - return new QCalendar(static_cast(system)); +void QCalendar_new2(int system, QCalendar** outptr_QCalendar) { + QCalendar* ret = new QCalendar(static_cast(system)); + *outptr_QCalendar = ret; } -QCalendar* QCalendar_new3(QAnyStringView* name) { - return new QCalendar(*name); +void QCalendar_new3(QAnyStringView* name, QCalendar** outptr_QCalendar) { + QCalendar* ret = new QCalendar(*name); + *outptr_QCalendar = ret; } -QCalendar* QCalendar_new4(QCalendar__SystemId* id) { - return new QCalendar(*id); +void QCalendar_new4(QCalendar__SystemId* id, QCalendar** outptr_QCalendar) { + QCalendar* ret = new QCalendar(*id); + *outptr_QCalendar = ret; } bool QCalendar_IsValid(const QCalendar* self) { @@ -249,36 +253,49 @@ struct miqt_string QCalendar_StandaloneWeekDayName3(const QCalendar* self, QLoca return _ms; } -void QCalendar_Delete(QCalendar* self) { - delete self; +void QCalendar_Delete(QCalendar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new() { - return new QCalendar::YearMonthDay(); +void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(); + *outptr_QCalendar__YearMonthDay = ret; } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y) { - return new QCalendar::YearMonthDay(static_cast(y)); +void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y)); + *outptr_QCalendar__YearMonthDay = ret; } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m) { - return new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); +void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); + *outptr_QCalendar__YearMonthDay = ret; } -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d) { - return new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); +void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { + QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); + *outptr_QCalendar__YearMonthDay = ret; } bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self) { return self->isValid(); } -void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self) { - delete self; +void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCalendar__SystemId* QCalendar__SystemId_new() { - return new QCalendar::SystemId(); +void QCalendar__SystemId_new(QCalendar__SystemId** outptr_QCalendar__SystemId) { + QCalendar::SystemId* ret = new QCalendar::SystemId(); + *outptr_QCalendar__SystemId = ret; } size_t QCalendar__SystemId_Index(const QCalendar__SystemId* self) { @@ -289,7 +306,11 @@ bool QCalendar__SystemId_IsValid(const QCalendar__SystemId* self) { return self->isValid(); } -void QCalendar__SystemId_Delete(QCalendar__SystemId* self) { - delete self; +void QCalendar__SystemId_Delete(QCalendar__SystemId* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcalendar.go b/qt6/gen_qcalendar.go index d9eb116e..eee0901a 100644 --- a/qt6/gen_qcalendar.go +++ b/qt6/gen_qcalendar.go @@ -32,7 +32,8 @@ const ( ) type QCalendar struct { - h *C.QCalendar + h *C.QCalendar + isSubclass bool } func (this *QCalendar) cPointer() *C.QCalendar { @@ -49,6 +50,7 @@ func (this *QCalendar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCalendar constructs the type using only CGO pointers. func newQCalendar(h *C.QCalendar) *QCalendar { if h == nil { return nil @@ -56,32 +58,53 @@ func newQCalendar(h *C.QCalendar) *QCalendar { return &QCalendar{h: h} } +// UnsafeNewQCalendar constructs the type using only unsafe pointers. func UnsafeNewQCalendar(h unsafe.Pointer) *QCalendar { - return newQCalendar((*C.QCalendar)(h)) + if h == nil { + return nil + } + + return &QCalendar{h: (*C.QCalendar)(h)} } // NewQCalendar constructs a new QCalendar object. func NewQCalendar() *QCalendar { - ret := C.QCalendar_new() - return newQCalendar(ret) + var outptr_QCalendar *C.QCalendar = nil + + C.QCalendar_new(&outptr_QCalendar) + ret := newQCalendar(outptr_QCalendar) + ret.isSubclass = true + return ret } // NewQCalendar2 constructs a new QCalendar object. func NewQCalendar2(system QCalendar__System) *QCalendar { - ret := C.QCalendar_new2((C.int)(system)) - return newQCalendar(ret) + var outptr_QCalendar *C.QCalendar = nil + + C.QCalendar_new2((C.int)(system), &outptr_QCalendar) + ret := newQCalendar(outptr_QCalendar) + ret.isSubclass = true + return ret } // NewQCalendar3 constructs a new QCalendar object. func NewQCalendar3(name QAnyStringView) *QCalendar { - ret := C.QCalendar_new3(name.cPointer()) - return newQCalendar(ret) + var outptr_QCalendar *C.QCalendar = nil + + C.QCalendar_new3(name.cPointer(), &outptr_QCalendar) + ret := newQCalendar(outptr_QCalendar) + ret.isSubclass = true + return ret } // NewQCalendar4 constructs a new QCalendar object. func NewQCalendar4(id QCalendar__SystemId) *QCalendar { - ret := C.QCalendar_new4(id.cPointer()) - return newQCalendar(ret) + var outptr_QCalendar *C.QCalendar = nil + + C.QCalendar_new4(id.cPointer(), &outptr_QCalendar) + ret := newQCalendar(outptr_QCalendar) + ret.isSubclass = true + return ret } func (this *QCalendar) IsValid() bool { @@ -265,7 +288,7 @@ func (this *QCalendar) StandaloneWeekDayName3(locale *QLocale, day int, format Q // Delete this object from C++ memory. func (this *QCalendar) Delete() { - C.QCalendar_Delete(this.h) + C.QCalendar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -278,7 +301,8 @@ func (this *QCalendar) GoGC() { } type QCalendar__YearMonthDay struct { - h *C.QCalendar__YearMonthDay + h *C.QCalendar__YearMonthDay + isSubclass bool } func (this *QCalendar__YearMonthDay) cPointer() *C.QCalendar__YearMonthDay { @@ -295,6 +319,7 @@ func (this *QCalendar__YearMonthDay) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCalendar__YearMonthDay constructs the type using only CGO pointers. func newQCalendar__YearMonthDay(h *C.QCalendar__YearMonthDay) *QCalendar__YearMonthDay { if h == nil { return nil @@ -302,32 +327,53 @@ func newQCalendar__YearMonthDay(h *C.QCalendar__YearMonthDay) *QCalendar__YearMo return &QCalendar__YearMonthDay{h: h} } +// UnsafeNewQCalendar__YearMonthDay constructs the type using only unsafe pointers. func UnsafeNewQCalendar__YearMonthDay(h unsafe.Pointer) *QCalendar__YearMonthDay { - return newQCalendar__YearMonthDay((*C.QCalendar__YearMonthDay)(h)) + if h == nil { + return nil + } + + return &QCalendar__YearMonthDay{h: (*C.QCalendar__YearMonthDay)(h)} } // NewQCalendar__YearMonthDay constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay() *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new() - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new(&outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } // NewQCalendar__YearMonthDay2 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay2(y int) *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new2((C.int)(y)) - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new2((C.int)(y), &outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } // NewQCalendar__YearMonthDay3 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay3(y int, m int) *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m)) - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m), &outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } // NewQCalendar__YearMonthDay4 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay4(y int, m int, d int) *QCalendar__YearMonthDay { - ret := C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d)) - return newQCalendar__YearMonthDay(ret) + var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil + + C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret.isSubclass = true + return ret } func (this *QCalendar__YearMonthDay) IsValid() bool { @@ -336,7 +382,7 @@ func (this *QCalendar__YearMonthDay) IsValid() bool { // Delete this object from C++ memory. func (this *QCalendar__YearMonthDay) Delete() { - C.QCalendar__YearMonthDay_Delete(this.h) + C.QCalendar__YearMonthDay_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -349,7 +395,8 @@ func (this *QCalendar__YearMonthDay) GoGC() { } type QCalendar__SystemId struct { - h *C.QCalendar__SystemId + h *C.QCalendar__SystemId + isSubclass bool } func (this *QCalendar__SystemId) cPointer() *C.QCalendar__SystemId { @@ -366,6 +413,7 @@ func (this *QCalendar__SystemId) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCalendar__SystemId constructs the type using only CGO pointers. func newQCalendar__SystemId(h *C.QCalendar__SystemId) *QCalendar__SystemId { if h == nil { return nil @@ -373,14 +421,23 @@ func newQCalendar__SystemId(h *C.QCalendar__SystemId) *QCalendar__SystemId { return &QCalendar__SystemId{h: h} } +// UnsafeNewQCalendar__SystemId constructs the type using only unsafe pointers. func UnsafeNewQCalendar__SystemId(h unsafe.Pointer) *QCalendar__SystemId { - return newQCalendar__SystemId((*C.QCalendar__SystemId)(h)) + if h == nil { + return nil + } + + return &QCalendar__SystemId{h: (*C.QCalendar__SystemId)(h)} } // NewQCalendar__SystemId constructs a new QCalendar::SystemId object. func NewQCalendar__SystemId() *QCalendar__SystemId { - ret := C.QCalendar__SystemId_new() - return newQCalendar__SystemId(ret) + var outptr_QCalendar__SystemId *C.QCalendar__SystemId = nil + + C.QCalendar__SystemId_new(&outptr_QCalendar__SystemId) + ret := newQCalendar__SystemId(outptr_QCalendar__SystemId) + ret.isSubclass = true + return ret } func (this *QCalendar__SystemId) Index() uint64 { @@ -393,7 +450,7 @@ func (this *QCalendar__SystemId) IsValid() bool { // Delete this object from C++ memory. func (this *QCalendar__SystemId) Delete() { - C.QCalendar__SystemId_Delete(this.h) + C.QCalendar__SystemId_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcalendar.h b/qt6/gen_qcalendar.h index ed30ce10..8a4760d6 100644 --- a/qt6/gen_qcalendar.h +++ b/qt6/gen_qcalendar.h @@ -38,10 +38,10 @@ typedef struct QDate QDate; typedef struct QLocale QLocale; #endif -QCalendar* QCalendar_new(); -QCalendar* QCalendar_new2(int system); -QCalendar* QCalendar_new3(QAnyStringView* name); -QCalendar* QCalendar_new4(QCalendar__SystemId* id); +void QCalendar_new(QCalendar** outptr_QCalendar); +void QCalendar_new2(int system, QCalendar** outptr_QCalendar); +void QCalendar_new3(QAnyStringView* name, QCalendar** outptr_QCalendar); +void QCalendar_new4(QCalendar__SystemId* id, QCalendar** outptr_QCalendar); bool QCalendar_IsValid(const QCalendar* self); int QCalendar_DaysInMonth(const QCalendar* self, int month); int QCalendar_DaysInYear(const QCalendar* self, int year); @@ -74,19 +74,19 @@ struct miqt_string QCalendar_StandaloneMonthName3(const QCalendar* self, QLocale struct miqt_string QCalendar_StandaloneMonthName4(const QCalendar* self, QLocale* locale, int month, int year, int format); struct miqt_string QCalendar_WeekDayName3(const QCalendar* self, QLocale* locale, int day, int format); struct miqt_string QCalendar_StandaloneWeekDayName3(const QCalendar* self, QLocale* locale, int day, int format); -void QCalendar_Delete(QCalendar* self); +void QCalendar_Delete(QCalendar* self, bool isSubclass); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new(); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m); -QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d); +void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self); -void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self); +void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubclass); -QCalendar__SystemId* QCalendar__SystemId_new(); +void QCalendar__SystemId_new(QCalendar__SystemId** outptr_QCalendar__SystemId); size_t QCalendar__SystemId_Index(const QCalendar__SystemId* self); bool QCalendar__SystemId_IsValid(const QCalendar__SystemId* self); -void QCalendar__SystemId_Delete(QCalendar__SystemId* self); +void QCalendar__SystemId_Delete(QCalendar__SystemId* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcalendarwidget.cpp b/qt6/gen_qcalendarwidget.cpp index 6dea6491..14f64e96 100644 --- a/qt6/gen_qcalendarwidget.cpp +++ b/qt6/gen_qcalendarwidget.cpp @@ -1,24 +1,1098 @@ +#include +#include #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include #include +#include +#include #include #include #include "gen_qcalendarwidget.h" #include "_cgo_export.h" -QCalendarWidget* QCalendarWidget_new(QWidget* parent) { - return new QCalendarWidget(parent); +class MiqtVirtualQCalendarWidget : public virtual QCalendarWidget { +public: + + MiqtVirtualQCalendarWidget(QWidget* parent): QCalendarWidget(parent) {}; + MiqtVirtualQCalendarWidget(): QCalendarWidget() {}; + + virtual ~MiqtVirtualQCalendarWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCalendarWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCalendarWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCalendarWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QCalendarWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCalendarWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QCalendarWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QCalendarWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QCalendarWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QCalendarWidget::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QCalendarWidget::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QCalendarWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QCalendarWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QCalendarWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QCalendarWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QCalendarWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QCalendarWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintCell = 0; + + // Subclass to allow providing a Go implementation + virtual void paintCell(QPainter* painter, const QRect& rect, QDate date) const override { + if (handle__PaintCell == 0) { + QCalendarWidget::paintCell(painter, rect, date); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + QDate* sigval3 = new QDate(date); + + miqt_exec_callback_QCalendarWidget_PaintCell(const_cast(this), handle__PaintCell, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintCell(QPainter* painter, QRect* rect, QDate* date) const { + + QCalendarWidget::paintCell(painter, *rect, *date); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QCalendarWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QCalendarWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QCalendarWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QCalendarWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QCalendarWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QCalendarWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QCalendarWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QCalendarWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QCalendarWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QCalendarWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QCalendarWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QCalendarWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QCalendarWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QCalendarWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QCalendarWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QCalendarWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QCalendarWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QCalendarWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QCalendarWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QCalendarWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QCalendarWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QCalendarWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QCalendarWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QCalendarWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QCalendarWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QCalendarWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QCalendarWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QCalendarWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QCalendarWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QCalendarWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QCalendarWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QCalendarWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QCalendarWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QCalendarWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QCalendarWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QCalendarWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QCalendarWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QCalendarWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QCalendarWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QCalendarWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QCalendarWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QCalendarWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QCalendarWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QCalendarWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QCalendarWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QCalendarWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QCalendarWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QCalendarWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QCalendarWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QCalendarWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QCalendarWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QCalendarWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QCalendarWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QCalendarWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QCalendarWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QCalendarWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QCalendarWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QCalendarWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QCalendarWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QCalendarWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QCalendarWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QCalendarWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QCalendarWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QCalendarWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QCalendarWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QCalendarWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QCalendarWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QCalendarWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QCalendarWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QCalendarWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QCalendarWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QCalendarWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QCalendarWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QCalendarWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QCalendarWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QCalendarWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QCalendarWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QCalendarWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QCalendarWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QCalendarWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QCalendarWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QCalendarWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QCalendarWidget::focusNextPrevChild(next); + + } + +}; + +void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(parent); + *outptr_QCalendarWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCalendarWidget* QCalendarWidget_new2() { - return new QCalendarWidget(); +void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(); + *outptr_QCalendarWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self) { @@ -235,7 +1309,7 @@ void QCalendarWidget_SelectionChanged(QCalendarWidget* self) { } void QCalendarWidget_connect_SelectionChanged(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::selectionChanged), self, [=]() { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::selectionChanged), self, [=]() { miqt_exec_callback_QCalendarWidget_SelectionChanged(slot); }); } @@ -245,7 +1319,7 @@ void QCalendarWidget_Clicked(QCalendarWidget* self, QDate* date) { } void QCalendarWidget_connect_Clicked(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::clicked), self, [=](QDate date) { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::clicked), self, [=](QDate date) { QDate* sigval1 = new QDate(date); miqt_exec_callback_QCalendarWidget_Clicked(slot, sigval1); }); @@ -256,7 +1330,7 @@ void QCalendarWidget_Activated(QCalendarWidget* self, QDate* date) { } void QCalendarWidget_connect_Activated(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::activated), self, [=](QDate date) { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::activated), self, [=](QDate date) { QDate* sigval1 = new QDate(date); miqt_exec_callback_QCalendarWidget_Activated(slot, sigval1); }); @@ -267,7 +1341,7 @@ void QCalendarWidget_CurrentPageChanged(QCalendarWidget* self, int year, int mon } void QCalendarWidget_connect_CurrentPageChanged(QCalendarWidget* self, intptr_t slot) { - QCalendarWidget::connect(self, static_cast(&QCalendarWidget::currentPageChanged), self, [=](int year, int month) { + MiqtVirtualQCalendarWidget::connect(self, static_cast(&QCalendarWidget::currentPageChanged), self, [=](int year, int month) { int sigval1 = year; int sigval2 = month; miqt_exec_callback_QCalendarWidget_CurrentPageChanged(slot, sigval1, sigval2); @@ -296,7 +1370,355 @@ struct miqt_string QCalendarWidget_Tr3(const char* s, const char* c, int n) { return _ms; } -void QCalendarWidget_Delete(QCalendarWidget* self) { - delete self; +void QCalendarWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QCalendarWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_SizeHint(); +} + +void QCalendarWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QCalendarWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QCalendarWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__Event = slot; +} + +bool QCalendarWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_Event(event); +} + +void QCalendarWidget_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__EventFilter = slot; +} + +bool QCalendarWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QCalendarWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QCalendarWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QCalendarWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QCalendarWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QCalendarWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QCalendarWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QCalendarWidget_override_virtual_PaintCell(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__PaintCell = slot; +} + +void QCalendarWidget_virtualbase_PaintCell(const void* self, QPainter* painter, QRect* rect, QDate* date) { + ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_PaintCell(painter, rect, date); +} + +void QCalendarWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DevType = slot; +} + +int QCalendarWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DevType(); +} + +void QCalendarWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__SetVisible = slot; +} + +void QCalendarWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QCalendarWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QCalendarWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QCalendarWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QCalendarWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QCalendarWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QCalendarWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QCalendarWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QCalendarWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QCalendarWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QCalendarWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QCalendarWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QCalendarWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QCalendarWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__WheelEvent = slot; +} + +void QCalendarWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QCalendarWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QCalendarWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QCalendarWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QCalendarWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QCalendarWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QCalendarWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QCalendarWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__EnterEvent = slot; +} + +void QCalendarWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QCalendarWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QCalendarWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QCalendarWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__PaintEvent = slot; +} + +void QCalendarWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QCalendarWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__MoveEvent = slot; +} + +void QCalendarWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QCalendarWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__CloseEvent = slot; +} + +void QCalendarWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QCalendarWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QCalendarWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QCalendarWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__TabletEvent = slot; +} + +void QCalendarWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QCalendarWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ActionEvent = slot; +} + +void QCalendarWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QCalendarWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QCalendarWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QCalendarWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QCalendarWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QCalendarWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QCalendarWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QCalendarWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__DropEvent = slot; +} + +void QCalendarWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QCalendarWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ShowEvent = slot; +} + +void QCalendarWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QCalendarWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__HideEvent = slot; +} + +void QCalendarWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QCalendarWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QCalendarWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QCalendarWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QCalendarWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QCalendarWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__Metric = slot; +} + +int QCalendarWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_Metric(param1); +} + +void QCalendarWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__InitPainter = slot; +} + +void QCalendarWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QCalendarWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QCalendarWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QCalendarWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QCalendarWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QCalendarWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QCalendarWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QCalendarWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QCalendarWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQCalendarWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QCalendarWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QCalendarWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QCalendarWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQCalendarWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QCalendarWidget_Delete(QCalendarWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcalendarwidget.go b/qt6/gen_qcalendarwidget.go index 9aff4a21..2c51a0f1 100644 --- a/qt6/gen_qcalendarwidget.go +++ b/qt6/gen_qcalendarwidget.go @@ -38,7 +38,8 @@ const ( ) type QCalendarWidget struct { - h *C.QCalendarWidget + h *C.QCalendarWidget + isSubclass bool *QWidget } @@ -56,27 +57,49 @@ func (this *QCalendarWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCalendarWidget(h *C.QCalendarWidget) *QCalendarWidget { +// newQCalendarWidget constructs the type using only CGO pointers. +func newQCalendarWidget(h *C.QCalendarWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCalendarWidget { if h == nil { return nil } - return &QCalendarWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QCalendarWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQCalendarWidget(h unsafe.Pointer) *QCalendarWidget { - return newQCalendarWidget((*C.QCalendarWidget)(h)) +// UnsafeNewQCalendarWidget constructs the type using only unsafe pointers. +func UnsafeNewQCalendarWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCalendarWidget { + if h == nil { + return nil + } + + return &QCalendarWidget{h: (*C.QCalendarWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQCalendarWidget constructs a new QCalendarWidget object. func NewQCalendarWidget(parent *QWidget) *QCalendarWidget { - ret := C.QCalendarWidget_new(parent.cPointer()) - return newQCalendarWidget(ret) + var outptr_QCalendarWidget *C.QCalendarWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCalendarWidget_new(parent.cPointer(), &outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCalendarWidget2 constructs a new QCalendarWidget object. func NewQCalendarWidget2() *QCalendarWidget { - ret := C.QCalendarWidget_new2() - return newQCalendarWidget(ret) + var outptr_QCalendarWidget *C.QCalendarWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCalendarWidget_new2(&outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QCalendarWidget) MetaObject() *QMetaObject { @@ -202,7 +225,7 @@ func (this *QCalendarWidget) SetVerticalHeaderFormat(format QCalendarWidget__Ver func (this *QCalendarWidget) HeaderTextFormat() *QTextCharFormat { _ret := C.QCalendarWidget_HeaderTextFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -213,7 +236,7 @@ func (this *QCalendarWidget) SetHeaderTextFormat(format *QTextCharFormat) { func (this *QCalendarWidget) WeekdayTextFormat(dayOfWeek DayOfWeek) *QTextCharFormat { _ret := C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek)) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -234,7 +257,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { _entry_Key := *_mapkey_goptr _mapval_ret := _Values[i] - _mapval_goptr := newQTextCharFormat(_mapval_ret) + _mapval_goptr := newQTextCharFormat(_mapval_ret, nil) _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Value := *_mapval_goptr @@ -245,7 +268,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { func (this *QCalendarWidget) DateTextFormatWithDate(date QDate) *QTextCharFormat { _ret := C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer()) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -421,9 +444,1029 @@ func QCalendarWidget_Tr3(s string, c string, n int) string { return _ret } +func (this *QCalendarWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QCalendarWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCalendarWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QCalendarWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_SizeHint +func miqt_exec_callback_QCalendarWidget_SizeHint(self *C.QCalendarWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QCalendarWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCalendarWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QCalendarWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MinimumSizeHint +func miqt_exec_callback_QCalendarWidget_MinimumSizeHint(self *C.QCalendarWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QCalendarWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QCalendarWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QCalendarWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_Event +func miqt_exec_callback_QCalendarWidget_Event(self *C.QCalendarWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QCalendarWidget_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QCalendarWidget) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QCalendarWidget_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_EventFilter +func miqt_exec_callback_QCalendarWidget_EventFilter(self *C.QCalendarWidget, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MousePressEvent +func miqt_exec_callback_QCalendarWidget_MousePressEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QCalendarWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QCalendarWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ResizeEvent +func miqt_exec_callback_QCalendarWidget_ResizeEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QCalendarWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QCalendarWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_KeyPressEvent +func miqt_exec_callback_QCalendarWidget_KeyPressEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_PaintCell(painter *QPainter, rect *QRect, date QDate) { + + C.QCalendarWidget_virtualbase_PaintCell(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), date.cPointer()) + +} +func (this *QCalendarWidget) OnPaintCell(slot func(super func(painter *QPainter, rect *QRect, date QDate), painter *QPainter, rect *QRect, date QDate)) { + C.QCalendarWidget_override_virtual_PaintCell(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_PaintCell +func miqt_exec_callback_QCalendarWidget_PaintCell(self *C.QCalendarWidget, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, date *C.QDate) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, date QDate), painter *QPainter, rect *QRect, date QDate)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + date_ret := date + date_goptr := newQDate(date_ret) + date_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *date_goptr + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintCell, slotval1, slotval2, slotval3) + +} + +func (this *QCalendarWidget) callVirtualBase_DevType() int { + + return (int)(C.QCalendarWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QCalendarWidget) OnDevType(slot func(super func() int) int) { + C.QCalendarWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DevType +func miqt_exec_callback_QCalendarWidget_DevType(self *C.QCalendarWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_SetVisible(visible bool) { + + C.QCalendarWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QCalendarWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QCalendarWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_SetVisible +func miqt_exec_callback_QCalendarWidget_SetVisible(self *C.QCalendarWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QCalendarWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QCalendarWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QCalendarWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_HeightForWidth +func miqt_exec_callback_QCalendarWidget_HeightForWidth(self *C.QCalendarWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QCalendarWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QCalendarWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QCalendarWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_HasHeightForWidth +func miqt_exec_callback_QCalendarWidget_HasHeightForWidth(self *C.QCalendarWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QCalendarWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QCalendarWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QCalendarWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_PaintEngine +func miqt_exec_callback_QCalendarWidget_PaintEngine(self *C.QCalendarWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MouseReleaseEvent +func miqt_exec_callback_QCalendarWidget_MouseReleaseEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent +func miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QCalendarWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QCalendarWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MouseMoveEvent +func miqt_exec_callback_QCalendarWidget_MouseMoveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QCalendarWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QCalendarWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_WheelEvent +func miqt_exec_callback_QCalendarWidget_WheelEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QCalendarWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QCalendarWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_KeyReleaseEvent +func miqt_exec_callback_QCalendarWidget_KeyReleaseEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QCalendarWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QCalendarWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_FocusInEvent +func miqt_exec_callback_QCalendarWidget_FocusInEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QCalendarWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QCalendarWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_FocusOutEvent +func miqt_exec_callback_QCalendarWidget_FocusOutEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QCalendarWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QCalendarWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_EnterEvent +func miqt_exec_callback_QCalendarWidget_EnterEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QCalendarWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCalendarWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_LeaveEvent +func miqt_exec_callback_QCalendarWidget_LeaveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QCalendarWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QCalendarWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_PaintEvent +func miqt_exec_callback_QCalendarWidget_PaintEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QCalendarWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QCalendarWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_MoveEvent +func miqt_exec_callback_QCalendarWidget_MoveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QCalendarWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QCalendarWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_CloseEvent +func miqt_exec_callback_QCalendarWidget_CloseEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QCalendarWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QCalendarWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ContextMenuEvent +func miqt_exec_callback_QCalendarWidget_ContextMenuEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QCalendarWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QCalendarWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_TabletEvent +func miqt_exec_callback_QCalendarWidget_TabletEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QCalendarWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QCalendarWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ActionEvent +func miqt_exec_callback_QCalendarWidget_ActionEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QCalendarWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QCalendarWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DragEnterEvent +func miqt_exec_callback_QCalendarWidget_DragEnterEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QCalendarWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QCalendarWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DragMoveEvent +func miqt_exec_callback_QCalendarWidget_DragMoveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QCalendarWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QCalendarWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DragLeaveEvent +func miqt_exec_callback_QCalendarWidget_DragLeaveEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QCalendarWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QCalendarWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_DropEvent +func miqt_exec_callback_QCalendarWidget_DropEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QCalendarWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QCalendarWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ShowEvent +func miqt_exec_callback_QCalendarWidget_ShowEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QCalendarWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCalendarWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QCalendarWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_HideEvent +func miqt_exec_callback_QCalendarWidget_HideEvent(self *C.QCalendarWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QCalendarWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QCalendarWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QCalendarWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_NativeEvent +func miqt_exec_callback_QCalendarWidget_NativeEvent(self *C.QCalendarWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QCalendarWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCalendarWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QCalendarWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_ChangeEvent +func miqt_exec_callback_QCalendarWidget_ChangeEvent(self *C.QCalendarWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QCalendarWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QCalendarWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QCalendarWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_Metric +func miqt_exec_callback_QCalendarWidget_Metric(self *C.QCalendarWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QCalendarWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QCalendarWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QCalendarWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QCalendarWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_InitPainter +func miqt_exec_callback_QCalendarWidget_InitPainter(self *C.QCalendarWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QCalendarWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QCalendarWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QCalendarWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_Redirected +func miqt_exec_callback_QCalendarWidget_Redirected(self *C.QCalendarWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QCalendarWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QCalendarWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QCalendarWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_SharedPainter +func miqt_exec_callback_QCalendarWidget_SharedPainter(self *C.QCalendarWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QCalendarWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCalendarWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QCalendarWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_InputMethodEvent +func miqt_exec_callback_QCalendarWidget_InputMethodEvent(self *C.QCalendarWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCalendarWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QCalendarWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QCalendarWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCalendarWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QCalendarWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_InputMethodQuery +func miqt_exec_callback_QCalendarWidget_InputMethodQuery(self *C.QCalendarWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QCalendarWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QCalendarWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QCalendarWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QCalendarWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCalendarWidget_FocusNextPrevChild +func miqt_exec_callback_QCalendarWidget_FocusNextPrevChild(self *C.QCalendarWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QCalendarWidget) Delete() { - C.QCalendarWidget_Delete(this.h) + C.QCalendarWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcalendarwidget.h b/qt6/gen_qcalendarwidget.h index dba56cb1..d35beebc 100644 --- a/qt6/gen_qcalendarwidget.h +++ b/qt6/gen_qcalendarwidget.h @@ -15,25 +15,81 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; class QCalendar; class QCalendarWidget; +class QCloseEvent; +class QContextMenuEvent; class QDate; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QTextCharFormat; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; typedef struct QCalendar QCalendar; typedef struct QCalendarWidget QCalendarWidget; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDate QDate; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QTextCharFormat QTextCharFormat; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QCalendarWidget* QCalendarWidget_new(QWidget* parent); -QCalendarWidget* QCalendarWidget_new2(); +void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self); void* QCalendarWidget_Metacast(QCalendarWidget* self, const char* param1); struct miqt_string QCalendarWidget_Tr(const char* s); @@ -69,6 +125,12 @@ bool QCalendarWidget_IsDateEditEnabled(const QCalendarWidget* self); void QCalendarWidget_SetDateEditEnabled(QCalendarWidget* self, bool enable); int QCalendarWidget_DateEditAcceptDelay(const QCalendarWidget* self); void QCalendarWidget_SetDateEditAcceptDelay(QCalendarWidget* self, int delay); +bool QCalendarWidget_Event(QCalendarWidget* self, QEvent* event); +bool QCalendarWidget_EventFilter(QCalendarWidget* self, QObject* watched, QEvent* event); +void QCalendarWidget_MousePressEvent(QCalendarWidget* self, QMouseEvent* event); +void QCalendarWidget_ResizeEvent(QCalendarWidget* self, QResizeEvent* event); +void QCalendarWidget_KeyPressEvent(QCalendarWidget* self, QKeyEvent* event); +void QCalendarWidget_PaintCell(const QCalendarWidget* self, QPainter* painter, QRect* rect, QDate* date); void QCalendarWidget_SetSelectedDate(QCalendarWidget* self, QDate* date); void QCalendarWidget_SetDateRange(QCalendarWidget* self, QDate* min, QDate* max); void QCalendarWidget_SetCurrentPage(QCalendarWidget* self, int year, int month); @@ -90,7 +152,93 @@ void QCalendarWidget_CurrentPageChanged(QCalendarWidget* self, int year, int mon void QCalendarWidget_connect_CurrentPageChanged(QCalendarWidget* self, intptr_t slot); struct miqt_string QCalendarWidget_Tr2(const char* s, const char* c); struct miqt_string QCalendarWidget_Tr3(const char* s, const char* c, int n); -void QCalendarWidget_Delete(QCalendarWidget* self); +void QCalendarWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCalendarWidget_virtualbase_SizeHint(const void* self); +void QCalendarWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QCalendarWidget_virtualbase_MinimumSizeHint(const void* self); +void QCalendarWidget_override_virtual_Event(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_Event(void* self, QEvent* event); +void QCalendarWidget_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QCalendarWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QCalendarWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QCalendarWidget_override_virtual_PaintCell(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_PaintCell(const void* self, QPainter* painter, QRect* rect, QDate* date); +void QCalendarWidget_override_virtual_DevType(void* self, intptr_t slot); +int QCalendarWidget_virtualbase_DevType(const void* self); +void QCalendarWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_SetVisible(void* self, bool visible); +void QCalendarWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QCalendarWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QCalendarWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_HasHeightForWidth(const void* self); +void QCalendarWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QCalendarWidget_virtualbase_PaintEngine(const void* self); +void QCalendarWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QCalendarWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QCalendarWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QCalendarWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QCalendarWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QCalendarWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QCalendarWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QCalendarWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QCalendarWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QCalendarWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QCalendarWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QCalendarWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QCalendarWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QCalendarWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QCalendarWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QCalendarWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QCalendarWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QCalendarWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QCalendarWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QCalendarWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QCalendarWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QCalendarWidget_override_virtual_Metric(void* self, intptr_t slot); +int QCalendarWidget_virtualbase_Metric(const void* self, int param1); +void QCalendarWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QCalendarWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QCalendarWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QCalendarWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QCalendarWidget_virtualbase_SharedPainter(const void* self); +void QCalendarWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QCalendarWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QCalendarWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QCalendarWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QCalendarWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QCalendarWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QCalendarWidget_Delete(QCalendarWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qchar.cpp b/qt6/gen_qchar.cpp index c478dcd9..07899e77 100644 --- a/qt6/gen_qchar.cpp +++ b/qt6/gen_qchar.cpp @@ -7,64 +7,81 @@ #include "gen_qchar.h" #include "_cgo_export.h" -QLatin1Char* QLatin1Char_new(char c) { - return new QLatin1Char(static_cast(c)); +void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char) { + QLatin1Char* ret = new QLatin1Char(static_cast(c)); + *outptr_QLatin1Char = ret; } -QLatin1Char* QLatin1Char_new2(QLatin1Char* param1) { - return new QLatin1Char(*param1); +void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char) { + QLatin1Char* ret = new QLatin1Char(*param1); + *outptr_QLatin1Char = ret; } char QLatin1Char_ToLatin1(const QLatin1Char* self) { return self->toLatin1(); } -void QLatin1Char_Delete(QLatin1Char* self) { - delete self; +void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QChar* QChar_new() { - return new QChar(); +void QChar_new(QChar** outptr_QChar) { + QChar* ret = new QChar(); + *outptr_QChar = ret; } -QChar* QChar_new2(uint16_t rc) { - return new QChar(static_cast(rc)); +void QChar_new2(uint16_t rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new3(unsigned char c, unsigned char r) { - return new QChar(static_cast(c), static_cast(r)); +void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(c), static_cast(r)); + *outptr_QChar = ret; } -QChar* QChar_new4(int16_t rc) { - return new QChar(static_cast(rc)); +void QChar_new4(int16_t rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new5(unsigned int rc) { - return new QChar(static_cast(rc)); +void QChar_new5(unsigned int rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new6(int rc) { - return new QChar(static_cast(rc)); +void QChar_new6(int rc, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(rc)); + *outptr_QChar = ret; } -QChar* QChar_new7(int s) { - return new QChar(static_cast(s)); +void QChar_new7(int s, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(s)); + *outptr_QChar = ret; } -QChar* QChar_new8(QLatin1Char* ch) { - return new QChar(*ch); +void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar) { + QChar* ret = new QChar(*ch); + *outptr_QChar = ret; } -QChar* QChar_new9(char c) { - return new QChar(static_cast(c)); +void QChar_new9(char c, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(c)); + *outptr_QChar = ret; } -QChar* QChar_new10(unsigned char c) { - return new QChar(static_cast(c)); +void QChar_new10(unsigned char c, QChar** outptr_QChar) { + QChar* ret = new QChar(static_cast(c)); + *outptr_QChar = ret; } -QChar* QChar_new11(QChar* param1) { - return new QChar(*param1); +void QChar_new11(QChar* param1, QChar** outptr_QChar) { + QChar* ret = new QChar(*param1); + *outptr_QChar = ret; } int QChar_Category(const QChar* self) { @@ -239,7 +256,11 @@ int QChar_CurrentUnicodeVersion() { return static_cast(_ret); } -void QChar_Delete(QChar* self) { - delete self; +void QChar_Delete(QChar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qchar.go b/qt6/gen_qchar.go index 573434bf..ca2c98ed 100644 --- a/qt6/gen_qchar.go +++ b/qt6/gen_qchar.go @@ -354,7 +354,8 @@ const ( ) type QLatin1Char struct { - h *C.QLatin1Char + h *C.QLatin1Char + isSubclass bool } func (this *QLatin1Char) cPointer() *C.QLatin1Char { @@ -371,6 +372,7 @@ func (this *QLatin1Char) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLatin1Char constructs the type using only CGO pointers. func newQLatin1Char(h *C.QLatin1Char) *QLatin1Char { if h == nil { return nil @@ -378,20 +380,33 @@ func newQLatin1Char(h *C.QLatin1Char) *QLatin1Char { return &QLatin1Char{h: h} } +// UnsafeNewQLatin1Char constructs the type using only unsafe pointers. func UnsafeNewQLatin1Char(h unsafe.Pointer) *QLatin1Char { - return newQLatin1Char((*C.QLatin1Char)(h)) + if h == nil { + return nil + } + + return &QLatin1Char{h: (*C.QLatin1Char)(h)} } // NewQLatin1Char constructs a new QLatin1Char object. func NewQLatin1Char(c int8) *QLatin1Char { - ret := C.QLatin1Char_new((C.char)(c)) - return newQLatin1Char(ret) + var outptr_QLatin1Char *C.QLatin1Char = nil + + C.QLatin1Char_new((C.char)(c), &outptr_QLatin1Char) + ret := newQLatin1Char(outptr_QLatin1Char) + ret.isSubclass = true + return ret } // NewQLatin1Char2 constructs a new QLatin1Char object. func NewQLatin1Char2(param1 *QLatin1Char) *QLatin1Char { - ret := C.QLatin1Char_new2(param1.cPointer()) - return newQLatin1Char(ret) + var outptr_QLatin1Char *C.QLatin1Char = nil + + C.QLatin1Char_new2(param1.cPointer(), &outptr_QLatin1Char) + ret := newQLatin1Char(outptr_QLatin1Char) + ret.isSubclass = true + return ret } func (this *QLatin1Char) ToLatin1() int8 { @@ -400,7 +415,7 @@ func (this *QLatin1Char) ToLatin1() int8 { // Delete this object from C++ memory. func (this *QLatin1Char) Delete() { - C.QLatin1Char_Delete(this.h) + C.QLatin1Char_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -413,7 +428,8 @@ func (this *QLatin1Char) GoGC() { } type QChar struct { - h *C.QChar + h *C.QChar + isSubclass bool } func (this *QChar) cPointer() *C.QChar { @@ -430,6 +446,7 @@ func (this *QChar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQChar constructs the type using only CGO pointers. func newQChar(h *C.QChar) *QChar { if h == nil { return nil @@ -437,74 +454,123 @@ func newQChar(h *C.QChar) *QChar { return &QChar{h: h} } +// UnsafeNewQChar constructs the type using only unsafe pointers. func UnsafeNewQChar(h unsafe.Pointer) *QChar { - return newQChar((*C.QChar)(h)) + if h == nil { + return nil + } + + return &QChar{h: (*C.QChar)(h)} } // NewQChar constructs a new QChar object. func NewQChar() *QChar { - ret := C.QChar_new() - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new(&outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar2 constructs a new QChar object. func NewQChar2(rc uint16) *QChar { - ret := C.QChar_new2((C.uint16_t)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new2((C.uint16_t)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar3 constructs a new QChar object. func NewQChar3(c byte, r byte) *QChar { - ret := C.QChar_new3((C.uchar)(c), (C.uchar)(r)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new3((C.uchar)(c), (C.uchar)(r), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar4 constructs a new QChar object. func NewQChar4(rc int16) *QChar { - ret := C.QChar_new4((C.int16_t)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new4((C.int16_t)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar5 constructs a new QChar object. func NewQChar5(rc uint) *QChar { - ret := C.QChar_new5((C.uint)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new5((C.uint)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar6 constructs a new QChar object. func NewQChar6(rc int) *QChar { - ret := C.QChar_new6((C.int)(rc)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new6((C.int)(rc), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar7 constructs a new QChar object. func NewQChar7(s QChar__SpecialCharacter) *QChar { - ret := C.QChar_new7((C.int)(s)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new7((C.int)(s), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar8 constructs a new QChar object. func NewQChar8(ch QLatin1Char) *QChar { - ret := C.QChar_new8(ch.cPointer()) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new8(ch.cPointer(), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar9 constructs a new QChar object. func NewQChar9(c int8) *QChar { - ret := C.QChar_new9((C.char)(c)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new9((C.char)(c), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar10 constructs a new QChar object. func NewQChar10(c byte) *QChar { - ret := C.QChar_new10((C.uchar)(c)) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new10((C.uchar)(c), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } // NewQChar11 constructs a new QChar object. func NewQChar11(param1 *QChar) *QChar { - ret := C.QChar_new11(param1.cPointer()) - return newQChar(ret) + var outptr_QChar *C.QChar = nil + + C.QChar_new11(param1.cPointer(), &outptr_QChar) + ret := newQChar(outptr_QChar) + ret.isSubclass = true + return ret } func (this *QChar) Category() QChar__Category { @@ -686,7 +752,7 @@ func QChar_CurrentUnicodeVersion() QChar__UnicodeVersion { // Delete this object from C++ memory. func (this *QChar) Delete() { - C.QChar_Delete(this.h) + C.QChar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qchar.h b/qt6/gen_qchar.h index bf927227..98927a2a 100644 --- a/qt6/gen_qchar.h +++ b/qt6/gen_qchar.h @@ -22,22 +22,22 @@ typedef struct QChar QChar; typedef struct QLatin1Char QLatin1Char; #endif -QLatin1Char* QLatin1Char_new(char c); -QLatin1Char* QLatin1Char_new2(QLatin1Char* param1); +void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char); +void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char); char QLatin1Char_ToLatin1(const QLatin1Char* self); -void QLatin1Char_Delete(QLatin1Char* self); +void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass); -QChar* QChar_new(); -QChar* QChar_new2(uint16_t rc); -QChar* QChar_new3(unsigned char c, unsigned char r); -QChar* QChar_new4(int16_t rc); -QChar* QChar_new5(unsigned int rc); -QChar* QChar_new6(int rc); -QChar* QChar_new7(int s); -QChar* QChar_new8(QLatin1Char* ch); -QChar* QChar_new9(char c); -QChar* QChar_new10(unsigned char c); -QChar* QChar_new11(QChar* param1); +void QChar_new(QChar** outptr_QChar); +void QChar_new2(uint16_t rc, QChar** outptr_QChar); +void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar); +void QChar_new4(int16_t rc, QChar** outptr_QChar); +void QChar_new5(unsigned int rc, QChar** outptr_QChar); +void QChar_new6(int rc, QChar** outptr_QChar); +void QChar_new7(int s, QChar** outptr_QChar); +void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar); +void QChar_new9(char c, QChar** outptr_QChar); +void QChar_new10(unsigned char c, QChar** outptr_QChar); +void QChar_new11(QChar* param1, QChar** outptr_QChar); int QChar_Category(const QChar* self); int QChar_Direction(const QChar* self); int QChar_JoiningType(const QChar* self); @@ -77,7 +77,7 @@ unsigned char QChar_Row(const QChar* self); void QChar_SetCell(QChar* self, unsigned char acell); void QChar_SetRow(QChar* self, unsigned char arow); int QChar_CurrentUnicodeVersion(); -void QChar_Delete(QChar* self); +void QChar_Delete(QChar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcheckbox.cpp b/qt6/gen_qcheckbox.cpp index 836c61d6..23798654 100644 --- a/qt6/gen_qcheckbox.cpp +++ b/qt6/gen_qcheckbox.cpp @@ -1,30 +1,475 @@ +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include "gen_qcheckbox.h" #include "_cgo_export.h" -QCheckBox* QCheckBox_new(QWidget* parent) { - return new QCheckBox(parent); +class MiqtVirtualQCheckBox : public virtual QCheckBox { +public: + + MiqtVirtualQCheckBox(QWidget* parent): QCheckBox(parent) {}; + MiqtVirtualQCheckBox(): QCheckBox() {}; + MiqtVirtualQCheckBox(const QString& text): QCheckBox(text) {}; + MiqtVirtualQCheckBox(const QString& text, QWidget* parent): QCheckBox(text, parent) {}; + + virtual ~MiqtVirtualQCheckBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCheckBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCheckBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCheckBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QCheckBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCheckBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QCheckBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QCheckBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QCheckBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QCheckBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QCheckBox::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QCheckBox_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QCheckBox::hitButton(*pos); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QCheckBox::checkStateSet(); + return; + } + + + miqt_exec_callback_QCheckBox_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QCheckBox::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QCheckBox::nextCheckState(); + return; + } + + + miqt_exec_callback_QCheckBox_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QCheckBox::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QCheckBox::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QCheckBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QCheckBox::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QCheckBox::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QCheckBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QCheckBox::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionButton* option) const override { + if (handle__InitStyleOption == 0) { + QCheckBox::initStyleOption(option); + return; + } + + QStyleOptionButton* sigval1 = option; + + miqt_exec_callback_QCheckBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionButton* option) const { + + QCheckBox::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QCheckBox::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QCheckBox::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QCheckBox::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QCheckBox::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QCheckBox::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QCheckBox::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QCheckBox::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QCheckBox::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QCheckBox::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QCheckBox::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QCheckBox::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QCheckBox::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QCheckBox::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QCheckBox::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QCheckBox::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QCheckBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QCheckBox::timerEvent(e); + + } + +}; + +void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(parent); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCheckBox* QCheckBox_new2() { - return new QCheckBox(); +void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCheckBox* QCheckBox_new3(struct miqt_string text) { +void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCheckBox(text_QString); + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent) { +void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCheckBox(text_QString, parent); + MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString, parent); + *outptr_QCheckBox = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QCheckBox_MetaObject(const QCheckBox* self) { @@ -76,7 +521,7 @@ void QCheckBox_StateChanged(QCheckBox* self, int param1) { } void QCheckBox_connect_StateChanged(QCheckBox* self, intptr_t slot) { - QCheckBox::connect(self, static_cast(&QCheckBox::stateChanged), self, [=](int param1) { + MiqtVirtualQCheckBox::connect(self, static_cast(&QCheckBox::stateChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QCheckBox_StateChanged(slot, sigval1); }); @@ -108,7 +553,147 @@ void QCheckBox_SetTristate1(QCheckBox* self, bool y) { self->setTristate(y); } -void QCheckBox_Delete(QCheckBox* self) { - delete self; +void QCheckBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QCheckBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_SizeHint(); +} + +void QCheckBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QCheckBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QCheckBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__Event = slot; +} + +bool QCheckBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_Event(e); +} + +void QCheckBox_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__HitButton = slot; +} + +bool QCheckBox_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_HitButton(pos); +} + +void QCheckBox_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__CheckStateSet = slot; +} + +void QCheckBox_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_CheckStateSet(); +} + +void QCheckBox_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__NextCheckState = slot; +} + +void QCheckBox_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_NextCheckState(); +} + +void QCheckBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__PaintEvent = slot; +} + +void QCheckBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_PaintEvent(param1); +} + +void QCheckBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QCheckBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QCheckBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__InitStyleOption = slot; +} + +void QCheckBox_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* option) { + ( (const MiqtVirtualQCheckBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QCheckBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QCheckBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QCheckBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QCheckBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QCheckBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MousePressEvent = slot; +} + +void QCheckBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_MousePressEvent(e); +} + +void QCheckBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QCheckBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QCheckBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__FocusInEvent = slot; +} + +void QCheckBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_FocusInEvent(e); +} + +void QCheckBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QCheckBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QCheckBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__ChangeEvent = slot; +} + +void QCheckBox_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_ChangeEvent(e); +} + +void QCheckBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCheckBox*)(self) )->handle__TimerEvent = slot; +} + +void QCheckBox_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQCheckBox*)(self) )->virtualbase_TimerEvent(e); +} + +void QCheckBox_Delete(QCheckBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcheckbox.go b/qt6/gen_qcheckbox.go index 9e2f1f1d..0b2a8453 100644 --- a/qt6/gen_qcheckbox.go +++ b/qt6/gen_qcheckbox.go @@ -15,7 +15,8 @@ import ( ) type QCheckBox struct { - h *C.QCheckBox + h *C.QCheckBox + isSubclass bool *QAbstractButton } @@ -33,27 +34,51 @@ func (this *QCheckBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCheckBox(h *C.QCheckBox) *QCheckBox { +// newQCheckBox constructs the type using only CGO pointers. +func newQCheckBox(h *C.QCheckBox, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCheckBox { if h == nil { return nil } - return &QCheckBox{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QCheckBox{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQCheckBox(h unsafe.Pointer) *QCheckBox { - return newQCheckBox((*C.QCheckBox)(h)) +// UnsafeNewQCheckBox constructs the type using only unsafe pointers. +func UnsafeNewQCheckBox(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCheckBox { + if h == nil { + return nil + } + + return &QCheckBox{h: (*C.QCheckBox)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQCheckBox constructs a new QCheckBox object. func NewQCheckBox(parent *QWidget) *QCheckBox { - ret := C.QCheckBox_new(parent.cPointer()) - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new(parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCheckBox2 constructs a new QCheckBox object. func NewQCheckBox2() *QCheckBox { - ret := C.QCheckBox_new2() - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new2(&outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCheckBox3 constructs a new QCheckBox object. @@ -62,8 +87,16 @@ func NewQCheckBox3(text string) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCheckBox_new3(text_ms) - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new3(text_ms, &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCheckBox4 constructs a new QCheckBox object. @@ -72,8 +105,16 @@ func NewQCheckBox4(text string, parent *QWidget) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCheckBox_new4(text_ms, parent.cPointer()) - return newQCheckBox(ret) + var outptr_QCheckBox *C.QCheckBox = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCheckBox_new4(text_ms, parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QCheckBox) MetaObject() *QMetaObject { @@ -171,9 +212,402 @@ func (this *QCheckBox) SetTristate1(y bool) { C.QCheckBox_SetTristate1(this.h, (C.bool)(y)) } +func (this *QCheckBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QCheckBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCheckBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QCheckBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_SizeHint +func miqt_exec_callback_QCheckBox_SizeHint(self *C.QCheckBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCheckBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QCheckBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCheckBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QCheckBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MinimumSizeHint +func miqt_exec_callback_QCheckBox_MinimumSizeHint(self *C.QCheckBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCheckBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QCheckBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QCheckBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QCheckBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_Event +func miqt_exec_callback_QCheckBox_Event(self *C.QCheckBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCheckBox) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QCheckBox_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QCheckBox) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QCheckBox_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_HitButton +func miqt_exec_callback_QCheckBox_HitButton(self *C.QCheckBox, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QCheckBox{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCheckBox) callVirtualBase_CheckStateSet() { + + C.QCheckBox_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QCheckBox) OnCheckStateSet(slot func(super func())) { + C.QCheckBox_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_CheckStateSet +func miqt_exec_callback_QCheckBox_CheckStateSet(self *C.QCheckBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QCheckBox{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QCheckBox) callVirtualBase_NextCheckState() { + + C.QCheckBox_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QCheckBox) OnNextCheckState(slot func(super func())) { + C.QCheckBox_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_NextCheckState +func miqt_exec_callback_QCheckBox_NextCheckState(self *C.QCheckBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QCheckBox{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QCheckBox) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QCheckBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCheckBox) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QCheckBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_PaintEvent +func miqt_exec_callback_QCheckBox_PaintEvent(self *C.QCheckBox, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QCheckBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCheckBox) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QCheckBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MouseMoveEvent +func miqt_exec_callback_QCheckBox_MouseMoveEvent(self *C.QCheckBox, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_InitStyleOption(option *QStyleOptionButton) { + + C.QCheckBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QCheckBox) OnInitStyleOption(slot func(super func(option *QStyleOptionButton), option *QStyleOptionButton)) { + C.QCheckBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_InitStyleOption +func miqt_exec_callback_QCheckBox_InitStyleOption(self *C.QCheckBox, cb C.intptr_t, option *C.QStyleOptionButton) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionButton), option *QStyleOptionButton)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionButton(unsafe.Pointer(option), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QCheckBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QCheckBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_KeyPressEvent +func miqt_exec_callback_QCheckBox_KeyPressEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QCheckBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QCheckBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_KeyReleaseEvent +func miqt_exec_callback_QCheckBox_KeyReleaseEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QCheckBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QCheckBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MousePressEvent +func miqt_exec_callback_QCheckBox_MousePressEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QCheckBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QCheckBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_MouseReleaseEvent +func miqt_exec_callback_QCheckBox_MouseReleaseEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QCheckBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QCheckBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_FocusInEvent +func miqt_exec_callback_QCheckBox_FocusInEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QCheckBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QCheckBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_FocusOutEvent +func miqt_exec_callback_QCheckBox_FocusOutEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QCheckBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QCheckBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_ChangeEvent +func miqt_exec_callback_QCheckBox_ChangeEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QCheckBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QCheckBox) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QCheckBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QCheckBox) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QCheckBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCheckBox_TimerEvent +func miqt_exec_callback_QCheckBox_TimerEvent(self *C.QCheckBox, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QCheckBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QCheckBox) Delete() { - C.QCheckBox_Delete(this.h) + C.QCheckBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcheckbox.h b/qt6/gen_qcheckbox.h index 472586b7..248891f8 100644 --- a/qt6/gen_qcheckbox.h +++ b/qt6/gen_qcheckbox.h @@ -15,21 +15,43 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; class QCheckBox; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QSize; +class QStyleOptionButton; +class QTimerEvent; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; typedef struct QCheckBox QCheckBox; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QSize QSize; +typedef struct QStyleOptionButton QStyleOptionButton; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QCheckBox* QCheckBox_new(QWidget* parent); -QCheckBox* QCheckBox_new2(); -QCheckBox* QCheckBox_new3(struct miqt_string text); -QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent); +void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QCheckBox_MetaObject(const QCheckBox* self); void* QCheckBox_Metacast(QCheckBox* self, const char* param1); struct miqt_string QCheckBox_Tr(const char* s); @@ -41,10 +63,51 @@ int QCheckBox_CheckState(const QCheckBox* self); void QCheckBox_SetCheckState(QCheckBox* self, int state); void QCheckBox_StateChanged(QCheckBox* self, int param1); void QCheckBox_connect_StateChanged(QCheckBox* self, intptr_t slot); +bool QCheckBox_Event(QCheckBox* self, QEvent* e); +bool QCheckBox_HitButton(const QCheckBox* self, QPoint* pos); +void QCheckBox_CheckStateSet(QCheckBox* self); +void QCheckBox_NextCheckState(QCheckBox* self); +void QCheckBox_PaintEvent(QCheckBox* self, QPaintEvent* param1); +void QCheckBox_MouseMoveEvent(QCheckBox* self, QMouseEvent* param1); +void QCheckBox_InitStyleOption(const QCheckBox* self, QStyleOptionButton* option); struct miqt_string QCheckBox_Tr2(const char* s, const char* c); struct miqt_string QCheckBox_Tr3(const char* s, const char* c, int n); void QCheckBox_SetTristate1(QCheckBox* self, bool y); -void QCheckBox_Delete(QCheckBox* self); +void QCheckBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCheckBox_virtualbase_SizeHint(const void* self); +void QCheckBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QCheckBox_virtualbase_MinimumSizeHint(const void* self); +void QCheckBox_override_virtual_Event(void* self, intptr_t slot); +bool QCheckBox_virtualbase_Event(void* self, QEvent* e); +void QCheckBox_override_virtual_HitButton(void* self, intptr_t slot); +bool QCheckBox_virtualbase_HitButton(const void* self, QPoint* pos); +void QCheckBox_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QCheckBox_virtualbase_CheckStateSet(void* self); +void QCheckBox_override_virtual_NextCheckState(void* self, intptr_t slot); +void QCheckBox_virtualbase_NextCheckState(void* self); +void QCheckBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QCheckBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QCheckBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QCheckBox_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* option); +void QCheckBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QCheckBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QCheckBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QCheckBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QCheckBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QCheckBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QCheckBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_ChangeEvent(void* self, QEvent* e); +void QCheckBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCheckBox_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QCheckBox_Delete(QCheckBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qclipboard.cpp b/qt6/gen_qclipboard.cpp index 6eba2343..c14fe1ea 100644 --- a/qt6/gen_qclipboard.cpp +++ b/qt6/gen_qclipboard.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qclipboard.go b/qt6/gen_qclipboard.go index 45e389e5..58dcc14a 100644 --- a/qt6/gen_qclipboard.go +++ b/qt6/gen_qclipboard.go @@ -23,7 +23,8 @@ const ( ) type QClipboard struct { - h *C.QClipboard + h *C.QClipboard + isSubclass bool *QObject } @@ -41,15 +42,23 @@ func (this *QClipboard) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQClipboard(h *C.QClipboard) *QClipboard { +// newQClipboard constructs the type using only CGO pointers. +func newQClipboard(h *C.QClipboard, h_QObject *C.QObject) *QClipboard { if h == nil { return nil } - return &QClipboard{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QClipboard{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQClipboard(h unsafe.Pointer) *QClipboard { - return newQClipboard((*C.QClipboard)(h)) +// UnsafeNewQClipboard constructs the type using only unsafe pointers. +func UnsafeNewQClipboard(h unsafe.Pointer, h_QObject unsafe.Pointer) *QClipboard { + if h == nil { + return nil + } + + return &QClipboard{h: (*C.QClipboard)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QClipboard) MetaObject() *QMetaObject { @@ -122,7 +131,7 @@ func (this *QClipboard) SetText(param1 string) { } func (this *QClipboard) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData(this.h)), nil) } func (this *QClipboard) SetMimeData(data *QMimeData) { @@ -131,14 +140,14 @@ func (this *QClipboard) SetMimeData(data *QMimeData) { func (this *QClipboard) Image() *QImage { _ret := C.QClipboard_Image(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap() *QPixmap { _ret := C.QClipboard_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -275,7 +284,7 @@ func (this *QClipboard) SetText2(param1 string, mode QClipboard__Mode) { } func (this *QClipboard) MimeData1(mode QClipboard__Mode) *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData1(this.h, (C.int)(mode)))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QClipboard_MimeData1(this.h, (C.int)(mode))), nil) } func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { @@ -284,14 +293,14 @@ func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { func (this *QClipboard) Image1(mode QClipboard__Mode) *QImage { _ret := C.QClipboard_Image1(this.h, (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap1(mode QClipboard__Mode) *QPixmap { _ret := C.QClipboard_Pixmap1(this.h, (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qclipboard.h b/qt6/gen_qclipboard.h index eebabc3d..48894915 100644 --- a/qt6/gen_qclipboard.h +++ b/qt6/gen_qclipboard.h @@ -19,12 +19,14 @@ class QClipboard; class QImage; class QMetaObject; class QMimeData; +class QObject; class QPixmap; #else typedef struct QClipboard QClipboard; typedef struct QImage QImage; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; +typedef struct QObject QObject; typedef struct QPixmap QPixmap; #endif diff --git a/qt6/gen_qcollator.cpp b/qt6/gen_qcollator.cpp index 5020a5c9..b99b6e38 100644 --- a/qt6/gen_qcollator.cpp +++ b/qt6/gen_qcollator.cpp @@ -9,8 +9,9 @@ #include "gen_qcollator.h" #include "_cgo_export.h" -QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other) { - return new QCollatorSortKey(*other); +void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey) { + QCollatorSortKey* ret = new QCollatorSortKey(*other); + *outptr_QCollatorSortKey = ret; } void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other) { @@ -25,20 +26,27 @@ int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key return self->compare(*key); } -void QCollatorSortKey_Delete(QCollatorSortKey* self) { - delete self; +void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCollator* QCollator_new() { - return new QCollator(); +void QCollator_new(QCollator** outptr_QCollator) { + QCollator* ret = new QCollator(); + *outptr_QCollator = ret; } -QCollator* QCollator_new2(QLocale* locale) { - return new QCollator(*locale); +void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator) { + QCollator* ret = new QCollator(*locale); + *outptr_QCollator = ret; } -QCollator* QCollator_new3(QCollator* param1) { - return new QCollator(*param1); +void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator) { + QCollator* ret = new QCollator(*param1); + *outptr_QCollator = ret; } void QCollator_OperatorAssign(QCollator* self, QCollator* param1) { @@ -103,7 +111,11 @@ QCollatorSortKey* QCollator_SortKey(const QCollator* self, struct miqt_string st return new QCollatorSortKey(self->sortKey(stringVal_QString)); } -void QCollator_Delete(QCollator* self) { - delete self; +void QCollator_Delete(QCollator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcollator.go b/qt6/gen_qcollator.go index 3ee9b753..3bf5ccf3 100644 --- a/qt6/gen_qcollator.go +++ b/qt6/gen_qcollator.go @@ -14,7 +14,8 @@ import ( ) type QCollatorSortKey struct { - h *C.QCollatorSortKey + h *C.QCollatorSortKey + isSubclass bool } func (this *QCollatorSortKey) cPointer() *C.QCollatorSortKey { @@ -31,6 +32,7 @@ func (this *QCollatorSortKey) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCollatorSortKey constructs the type using only CGO pointers. func newQCollatorSortKey(h *C.QCollatorSortKey) *QCollatorSortKey { if h == nil { return nil @@ -38,14 +40,23 @@ func newQCollatorSortKey(h *C.QCollatorSortKey) *QCollatorSortKey { return &QCollatorSortKey{h: h} } +// UnsafeNewQCollatorSortKey constructs the type using only unsafe pointers. func UnsafeNewQCollatorSortKey(h unsafe.Pointer) *QCollatorSortKey { - return newQCollatorSortKey((*C.QCollatorSortKey)(h)) + if h == nil { + return nil + } + + return &QCollatorSortKey{h: (*C.QCollatorSortKey)(h)} } // NewQCollatorSortKey constructs a new QCollatorSortKey object. func NewQCollatorSortKey(other *QCollatorSortKey) *QCollatorSortKey { - ret := C.QCollatorSortKey_new(other.cPointer()) - return newQCollatorSortKey(ret) + var outptr_QCollatorSortKey *C.QCollatorSortKey = nil + + C.QCollatorSortKey_new(other.cPointer(), &outptr_QCollatorSortKey) + ret := newQCollatorSortKey(outptr_QCollatorSortKey) + ret.isSubclass = true + return ret } func (this *QCollatorSortKey) OperatorAssign(other *QCollatorSortKey) { @@ -62,7 +73,7 @@ func (this *QCollatorSortKey) Compare(key *QCollatorSortKey) int { // Delete this object from C++ memory. func (this *QCollatorSortKey) Delete() { - C.QCollatorSortKey_Delete(this.h) + C.QCollatorSortKey_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -75,7 +86,8 @@ func (this *QCollatorSortKey) GoGC() { } type QCollator struct { - h *C.QCollator + h *C.QCollator + isSubclass bool } func (this *QCollator) cPointer() *C.QCollator { @@ -92,6 +104,7 @@ func (this *QCollator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCollator constructs the type using only CGO pointers. func newQCollator(h *C.QCollator) *QCollator { if h == nil { return nil @@ -99,26 +112,43 @@ func newQCollator(h *C.QCollator) *QCollator { return &QCollator{h: h} } +// UnsafeNewQCollator constructs the type using only unsafe pointers. func UnsafeNewQCollator(h unsafe.Pointer) *QCollator { - return newQCollator((*C.QCollator)(h)) + if h == nil { + return nil + } + + return &QCollator{h: (*C.QCollator)(h)} } // NewQCollator constructs a new QCollator object. func NewQCollator() *QCollator { - ret := C.QCollator_new() - return newQCollator(ret) + var outptr_QCollator *C.QCollator = nil + + C.QCollator_new(&outptr_QCollator) + ret := newQCollator(outptr_QCollator) + ret.isSubclass = true + return ret } // NewQCollator2 constructs a new QCollator object. func NewQCollator2(locale *QLocale) *QCollator { - ret := C.QCollator_new2(locale.cPointer()) - return newQCollator(ret) + var outptr_QCollator *C.QCollator = nil + + C.QCollator_new2(locale.cPointer(), &outptr_QCollator) + ret := newQCollator(outptr_QCollator) + ret.isSubclass = true + return ret } // NewQCollator3 constructs a new QCollator object. func NewQCollator3(param1 *QCollator) *QCollator { - ret := C.QCollator_new3(param1.cPointer()) - return newQCollator(ret) + var outptr_QCollator *C.QCollator = nil + + C.QCollator_new3(param1.cPointer(), &outptr_QCollator) + ret := newQCollator(outptr_QCollator) + ret.isSubclass = true + return ret } func (this *QCollator) OperatorAssign(param1 *QCollator) { @@ -205,7 +235,7 @@ func (this *QCollator) SortKey(stringVal string) *QCollatorSortKey { // Delete this object from C++ memory. func (this *QCollator) Delete() { - C.QCollator_Delete(this.h) + C.QCollator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcollator.h b/qt6/gen_qcollator.h index 59806cbe..8f6d8bfb 100644 --- a/qt6/gen_qcollator.h +++ b/qt6/gen_qcollator.h @@ -26,15 +26,15 @@ typedef struct QCollatorSortKey QCollatorSortKey; typedef struct QLocale QLocale; #endif -QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other); +void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey); void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other); void QCollatorSortKey_Swap(QCollatorSortKey* self, QCollatorSortKey* other); int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key); -void QCollatorSortKey_Delete(QCollatorSortKey* self); +void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass); -QCollator* QCollator_new(); -QCollator* QCollator_new2(QLocale* locale); -QCollator* QCollator_new3(QCollator* param1); +void QCollator_new(QCollator** outptr_QCollator); +void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator); +void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator); void QCollator_OperatorAssign(QCollator* self, QCollator* param1); void QCollator_Swap(QCollator* self, QCollator* other); void QCollator_SetLocale(QCollator* self, QLocale* locale); @@ -49,7 +49,7 @@ int QCollator_Compare(const QCollator* self, struct miqt_string s1, struct miqt_ int QCollator_Compare2(const QCollator* self, QChar* s1, ptrdiff_t len1, QChar* s2, ptrdiff_t len2); bool QCollator_OperatorCall(const QCollator* self, struct miqt_string s1, struct miqt_string s2); QCollatorSortKey* QCollator_SortKey(const QCollator* self, struct miqt_string stringVal); -void QCollator_Delete(QCollator* self); +void QCollator_Delete(QCollator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcolor.cpp b/qt6/gen_qcolor.cpp index 35ede54a..51fb8903 100644 --- a/qt6/gen_qcolor.cpp +++ b/qt6/gen_qcolor.cpp @@ -9,53 +9,65 @@ #include "gen_qcolor.h" #include "_cgo_export.h" -QColor* QColor_new() { - return new QColor(); +void QColor_new(QColor** outptr_QColor) { + QColor* ret = new QColor(); + *outptr_QColor = ret; } -QColor* QColor_new2(int color) { - return new QColor(static_cast(color)); +void QColor_new2(int color, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(color)); + *outptr_QColor = ret; } -QColor* QColor_new3(int r, int g, int b) { - return new QColor(static_cast(r), static_cast(g), static_cast(b)); +void QColor_new3(int r, int g, int b, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b)); + *outptr_QColor = ret; } -QColor* QColor_new4(unsigned int rgb) { - return new QColor(static_cast(rgb)); +void QColor_new4(unsigned int rgb, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(rgb)); + *outptr_QColor = ret; } -QColor* QColor_new5(QRgba64* rgba64) { - return new QColor(*rgba64); +void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor) { + QColor* ret = new QColor(*rgba64); + *outptr_QColor = ret; } -QColor* QColor_new6(struct miqt_string name) { +void QColor_new6(struct miqt_string name, QColor** outptr_QColor) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QColor(name_QString); + QColor* ret = new QColor(name_QString); + *outptr_QColor = ret; } -QColor* QColor_new7(const char* aname) { - return new QColor(aname); +void QColor_new7(const char* aname, QColor** outptr_QColor) { + QColor* ret = new QColor(aname); + *outptr_QColor = ret; } -QColor* QColor_new8(int spec) { - return new QColor(static_cast(spec)); +void QColor_new8(int spec, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(spec)); + *outptr_QColor = ret; } -QColor* QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4) { - return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); +void QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); + *outptr_QColor = ret; } -QColor* QColor_new10(QColor* param1) { - return new QColor(*param1); +void QColor_new10(QColor* param1, QColor** outptr_QColor) { + QColor* ret = new QColor(*param1); + *outptr_QColor = ret; } -QColor* QColor_new11(int r, int g, int b, int a) { - return new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); +void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); + *outptr_QColor = ret; } -QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5) { - return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); +void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor) { + QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); + *outptr_QColor = ret; } QColor* QColor_FromString(QAnyStringView* name) { @@ -577,7 +589,11 @@ QColor* QColor_Darker1(const QColor* self, int f) { return new QColor(self->darker(static_cast(f))); } -void QColor_Delete(QColor* self) { - delete self; +void QColor_Delete(QColor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcolor.go b/qt6/gen_qcolor.go index af66b639..89a7324a 100644 --- a/qt6/gen_qcolor.go +++ b/qt6/gen_qcolor.go @@ -32,7 +32,8 @@ const ( ) type QColor struct { - h *C.QColor + h *C.QColor + isSubclass bool } func (this *QColor) cPointer() *C.QColor { @@ -49,6 +50,7 @@ func (this *QColor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColor constructs the type using only CGO pointers. func newQColor(h *C.QColor) *QColor { if h == nil { return nil @@ -56,38 +58,63 @@ func newQColor(h *C.QColor) *QColor { return &QColor{h: h} } +// UnsafeNewQColor constructs the type using only unsafe pointers. func UnsafeNewQColor(h unsafe.Pointer) *QColor { - return newQColor((*C.QColor)(h)) + if h == nil { + return nil + } + + return &QColor{h: (*C.QColor)(h)} } // NewQColor constructs a new QColor object. func NewQColor() *QColor { - ret := C.QColor_new() - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new(&outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor2 constructs a new QColor object. func NewQColor2(color GlobalColor) *QColor { - ret := C.QColor_new2((C.int)(color)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new2((C.int)(color), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor3 constructs a new QColor object. func NewQColor3(r int, g int, b int) *QColor { - ret := C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor4 constructs a new QColor object. func NewQColor4(rgb uint) *QColor { - ret := C.QColor_new4((C.uint)(rgb)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new4((C.uint)(rgb), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor5 constructs a new QColor object. func NewQColor5(rgba64 QRgba64) *QColor { - ret := C.QColor_new5(rgba64.cPointer()) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new5(rgba64.cPointer(), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor6 constructs a new QColor object. @@ -96,46 +123,74 @@ func NewQColor6(name string) *QColor { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QColor_new6(name_ms) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new6(name_ms, &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor7 constructs a new QColor object. func NewQColor7(aname string) *QColor { aname_Cstring := C.CString(aname) defer C.free(unsafe.Pointer(aname_Cstring)) - ret := C.QColor_new7(aname_Cstring) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new7(aname_Cstring, &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor8 constructs a new QColor object. func NewQColor8(spec QColor__Spec) *QColor { - ret := C.QColor_new8((C.int)(spec)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new8((C.int)(spec), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor9 constructs a new QColor object. func NewQColor9(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16) *QColor { - ret := C.QColor_new9((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new9((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor10 constructs a new QColor object. func NewQColor10(param1 *QColor) *QColor { - ret := C.QColor_new10(param1.cPointer()) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new10(param1.cPointer(), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor11 constructs a new QColor object. func NewQColor11(r int, g int, b int, a int) *QColor { - ret := C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } // NewQColor12 constructs a new QColor object. func NewQColor12(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16, a5 uint16) *QColor { - ret := C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5)) - return newQColor(ret) + var outptr_QColor *C.QColor = nil + + C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5), &outptr_QColor) + ret := newQColor(outptr_QColor) + ret.isSubclass = true + return ret } func QColor_FromString(name QAnyStringView) *QColor { @@ -746,7 +801,7 @@ func (this *QColor) Darker1(f int) *QColor { // Delete this object from C++ memory. func (this *QColor) Delete() { - C.QColor_Delete(this.h) + C.QColor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcolor.h b/qt6/gen_qcolor.h index 004c1963..dfbd817a 100644 --- a/qt6/gen_qcolor.h +++ b/qt6/gen_qcolor.h @@ -24,18 +24,18 @@ typedef struct QColor QColor; typedef struct QRgba64 QRgba64; #endif -QColor* QColor_new(); -QColor* QColor_new2(int color); -QColor* QColor_new3(int r, int g, int b); -QColor* QColor_new4(unsigned int rgb); -QColor* QColor_new5(QRgba64* rgba64); -QColor* QColor_new6(struct miqt_string name); -QColor* QColor_new7(const char* aname); -QColor* QColor_new8(int spec); -QColor* QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4); -QColor* QColor_new10(QColor* param1); -QColor* QColor_new11(int r, int g, int b, int a); -QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5); +void QColor_new(QColor** outptr_QColor); +void QColor_new2(int color, QColor** outptr_QColor); +void QColor_new3(int r, int g, int b, QColor** outptr_QColor); +void QColor_new4(unsigned int rgb, QColor** outptr_QColor); +void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor); +void QColor_new6(struct miqt_string name, QColor** outptr_QColor); +void QColor_new7(const char* aname, QColor** outptr_QColor); +void QColor_new8(int spec, QColor** outptr_QColor); +void QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor); +void QColor_new10(QColor* param1, QColor** outptr_QColor); +void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor); +void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor); QColor* QColor_FromString(QAnyStringView* name); void QColor_OperatorAssign(QColor* self, int color); bool QColor_IsValid(const QColor* self); @@ -157,7 +157,7 @@ QColor* QColor_FromHsl4(int h, int s, int l, int a); QColor* QColor_FromHslF4(float h, float s, float l, float a); QColor* QColor_Lighter1(const QColor* self, int f); QColor* QColor_Darker1(const QColor* self, int f); -void QColor_Delete(QColor* self); +void QColor_Delete(QColor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcolordialog.cpp b/qt6/gen_qcolordialog.cpp index 0fe9cead..6b5059a6 100644 --- a/qt6/gen_qcolordialog.cpp +++ b/qt6/gen_qcolordialog.cpp @@ -1,6 +1,16 @@ +#include #include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -9,20 +19,403 @@ #include "gen_qcolordialog.h" #include "_cgo_export.h" -QColorDialog* QColorDialog_new(QWidget* parent) { - return new QColorDialog(parent); +class MiqtVirtualQColorDialog : public virtual QColorDialog { +public: + + MiqtVirtualQColorDialog(QWidget* parent): QColorDialog(parent) {}; + MiqtVirtualQColorDialog(): QColorDialog() {}; + MiqtVirtualQColorDialog(const QColor& initial): QColorDialog(initial) {}; + MiqtVirtualQColorDialog(const QColor& initial, QWidget* parent): QColorDialog(initial, parent) {}; + + virtual ~MiqtVirtualQColorDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QColorDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QColorDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QColorDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QColorDialog::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QColorDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QColorDialog::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QColorDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QColorDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QColorDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QColorDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColorDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QColorDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QColorDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColorDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QColorDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QColorDialog::open(); + return; + } + + + miqt_exec_callback_QColorDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QColorDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QColorDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QColorDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QColorDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QColorDialog::accept(); + return; + } + + + miqt_exec_callback_QColorDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QColorDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QColorDialog::reject(); + return; + } + + + miqt_exec_callback_QColorDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QColorDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QColorDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QColorDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QColorDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QColorDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QColorDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QColorDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QColorDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QColorDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QColorDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QColorDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QColorDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QColorDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QColorDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QColorDialog::eventFilter(param1, param2); + + } + +}; + +void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(parent); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColorDialog* QColorDialog_new2() { - return new QColorDialog(); +void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColorDialog* QColorDialog_new3(QColor* initial) { - return new QColorDialog(*initial); +void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent) { - return new QColorDialog(*initial, parent); +void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial, parent); + *outptr_QColorDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QColorDialog_MetaObject(const QColorDialog* self) { @@ -106,7 +499,7 @@ void QColorDialog_CurrentColorChanged(QColorDialog* self, QColor* color) { } void QColorDialog_connect_CurrentColorChanged(QColorDialog* self, intptr_t slot) { - QColorDialog::connect(self, static_cast(&QColorDialog::currentColorChanged), self, [=](const QColor& color) { + MiqtVirtualQColorDialog::connect(self, static_cast(&QColorDialog::currentColorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -119,7 +512,7 @@ void QColorDialog_ColorSelected(QColorDialog* self, QColor* color) { } void QColorDialog_connect_ColorSelected(QColorDialog* self, intptr_t slot) { - QColorDialog::connect(self, static_cast(&QColorDialog::colorSelected), self, [=](const QColor& color) { + MiqtVirtualQColorDialog::connect(self, static_cast(&QColorDialog::colorSelected), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -171,7 +564,131 @@ QColor* QColorDialog_GetColor4(QColor* initial, QWidget* parent, struct miqt_str return new QColor(QColorDialog::getColor(*initial, parent, title_QString, static_cast(options))); } -void QColorDialog_Delete(QColorDialog* self) { - delete self; +void QColorDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__SetVisible = slot; +} + +void QColorDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QColorDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QColorDialog_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ChangeEvent(event); +} + +void QColorDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Done = slot; +} + +void QColorDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Done(result); +} + +void QColorDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QColorDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQColorDialog*)(self) )->virtualbase_SizeHint(); +} + +void QColorDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QColorDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQColorDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QColorDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Open = slot; +} + +void QColorDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Open(); +} + +void QColorDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Exec = slot; +} + +int QColorDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Exec(); +} + +void QColorDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Accept = slot; +} + +void QColorDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Accept(); +} + +void QColorDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__Reject = slot; +} + +void QColorDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_Reject(); +} + +void QColorDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QColorDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QColorDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__CloseEvent = slot; +} + +void QColorDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QColorDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ShowEvent = slot; +} + +void QColorDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QColorDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QColorDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QColorDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QColorDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QColorDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QColorDialog*)(self) )->handle__EventFilter = slot; +} + +bool QColorDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQColorDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QColorDialog_Delete(QColorDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcolordialog.go b/qt6/gen_qcolordialog.go index d7df7241..35f16694 100644 --- a/qt6/gen_qcolordialog.go +++ b/qt6/gen_qcolordialog.go @@ -23,7 +23,8 @@ const ( ) type QColorDialog struct { - h *C.QColorDialog + h *C.QColorDialog + isSubclass bool *QDialog } @@ -41,39 +42,79 @@ func (this *QColorDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQColorDialog(h *C.QColorDialog) *QColorDialog { +// newQColorDialog constructs the type using only CGO pointers. +func newQColorDialog(h *C.QColorDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColorDialog { if h == nil { return nil } - return &QColorDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QColorDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQColorDialog(h unsafe.Pointer) *QColorDialog { - return newQColorDialog((*C.QColorDialog)(h)) +// UnsafeNewQColorDialog constructs the type using only unsafe pointers. +func UnsafeNewQColorDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColorDialog { + if h == nil { + return nil + } + + return &QColorDialog{h: (*C.QColorDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQColorDialog constructs a new QColorDialog object. func NewQColorDialog(parent *QWidget) *QColorDialog { - ret := C.QColorDialog_new(parent.cPointer()) - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new(parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColorDialog2 constructs a new QColorDialog object. func NewQColorDialog2() *QColorDialog { - ret := C.QColorDialog_new2() - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new2(&outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColorDialog3 constructs a new QColorDialog object. func NewQColorDialog3(initial *QColor) *QColorDialog { - ret := C.QColorDialog_new3(initial.cPointer()) - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new3(initial.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColorDialog4 constructs a new QColorDialog object. func NewQColorDialog4(initial *QColor, parent *QWidget) *QColorDialog { - ret := C.QColorDialog_new4(initial.cPointer(), parent.cPointer()) - return newQColorDialog(ret) + var outptr_QColorDialog *C.QColorDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColorDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QColorDialog) MetaObject() *QMetaObject { @@ -268,9 +309,351 @@ func QColorDialog_GetColor4(initial *QColor, parent *QWidget, title string, opti return _goptr } +func (this *QColorDialog) callVirtualBase_SetVisible(visible bool) { + + C.QColorDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QColorDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QColorDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_SetVisible +func miqt_exec_callback_QColorDialog_SetVisible(self *C.QColorDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QColorDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QColorDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColorDialog) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QColorDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ChangeEvent +func miqt_exec_callback_QColorDialog_ChangeEvent(self *C.QColorDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_Done(result int) { + + C.QColorDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QColorDialog) OnDone(slot func(super func(result int), result int)) { + C.QColorDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Done +func miqt_exec_callback_QColorDialog_Done(self *C.QColorDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QColorDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QColorDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColorDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QColorDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_SizeHint +func miqt_exec_callback_QColorDialog_SizeHint(self *C.QColorDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QColorDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QColorDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColorDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QColorDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_MinimumSizeHint +func miqt_exec_callback_QColorDialog_MinimumSizeHint(self *C.QColorDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QColorDialog) callVirtualBase_Open() { + + C.QColorDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QColorDialog) OnOpen(slot func(super func())) { + C.QColorDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Open +func miqt_exec_callback_QColorDialog_Open(self *C.QColorDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColorDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QColorDialog) callVirtualBase_Exec() int { + + return (int)(C.QColorDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QColorDialog) OnExec(slot func(super func() int) int) { + C.QColorDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Exec +func miqt_exec_callback_QColorDialog_Exec(self *C.QColorDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QColorDialog) callVirtualBase_Accept() { + + C.QColorDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QColorDialog) OnAccept(slot func(super func())) { + C.QColorDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Accept +func miqt_exec_callback_QColorDialog_Accept(self *C.QColorDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColorDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QColorDialog) callVirtualBase_Reject() { + + C.QColorDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QColorDialog) OnReject(slot func(super func())) { + C.QColorDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_Reject +func miqt_exec_callback_QColorDialog_Reject(self *C.QColorDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColorDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QColorDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QColorDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QColorDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_KeyPressEvent +func miqt_exec_callback_QColorDialog_KeyPressEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QColorDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QColorDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_CloseEvent +func miqt_exec_callback_QColorDialog_CloseEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QColorDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QColorDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ShowEvent +func miqt_exec_callback_QColorDialog_ShowEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QColorDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QColorDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ResizeEvent +func miqt_exec_callback_QColorDialog_ResizeEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QColorDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QColorDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QColorDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_ContextMenuEvent +func miqt_exec_callback_QColorDialog_ContextMenuEvent(self *C.QColorDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QColorDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QColorDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QColorDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QColorDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QColorDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColorDialog_EventFilter +func miqt_exec_callback_QColorDialog_EventFilter(self *C.QColorDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QColorDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QColorDialog) Delete() { - C.QColorDialog_Delete(this.h) + C.QColorDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcolordialog.h b/qt6/gen_qcolordialog.h index 85c8a54a..d37f249c 100644 --- a/qt6/gen_qcolordialog.h +++ b/qt6/gen_qcolordialog.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; class QColor; class QColorDialog; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; typedef struct QColorDialog QColorDialog; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QColorDialog* QColorDialog_new(QWidget* parent); -QColorDialog* QColorDialog_new2(); -QColorDialog* QColorDialog_new3(QColor* initial); -QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent); +void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QColorDialog_MetaObject(const QColorDialog* self); void* QColorDialog_Metacast(QColorDialog* self, const char* param1); struct miqt_string QColorDialog_Tr(const char* s); @@ -51,6 +71,8 @@ void QColorDialog_CurrentColorChanged(QColorDialog* self, QColor* color); void QColorDialog_connect_CurrentColorChanged(QColorDialog* self, intptr_t slot); void QColorDialog_ColorSelected(QColorDialog* self, QColor* color); void QColorDialog_connect_ColorSelected(QColorDialog* self, intptr_t slot); +void QColorDialog_ChangeEvent(QColorDialog* self, QEvent* event); +void QColorDialog_Done(QColorDialog* self, int result); struct miqt_string QColorDialog_Tr2(const char* s, const char* c); struct miqt_string QColorDialog_Tr3(const char* s, const char* c, int n); void QColorDialog_SetOption2(QColorDialog* self, int option, bool on); @@ -58,7 +80,37 @@ QColor* QColorDialog_GetColor1(QColor* initial); QColor* QColorDialog_GetColor2(QColor* initial, QWidget* parent); QColor* QColorDialog_GetColor3(QColor* initial, QWidget* parent, struct miqt_string title); QColor* QColorDialog_GetColor4(QColor* initial, QWidget* parent, struct miqt_string title, int options); -void QColorDialog_Delete(QColorDialog* self); +void QColorDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QColorDialog_virtualbase_SetVisible(void* self, bool visible); +void QColorDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ChangeEvent(void* self, QEvent* event); +void QColorDialog_override_virtual_Done(void* self, intptr_t slot); +void QColorDialog_virtualbase_Done(void* self, int result); +void QColorDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QColorDialog_virtualbase_SizeHint(const void* self); +void QColorDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QColorDialog_virtualbase_MinimumSizeHint(const void* self); +void QColorDialog_override_virtual_Open(void* self, intptr_t slot); +void QColorDialog_virtualbase_Open(void* self); +void QColorDialog_override_virtual_Exec(void* self, intptr_t slot); +int QColorDialog_virtualbase_Exec(void* self); +void QColorDialog_override_virtual_Accept(void* self, intptr_t slot); +void QColorDialog_virtualbase_Accept(void* self); +void QColorDialog_override_virtual_Reject(void* self, intptr_t slot); +void QColorDialog_virtualbase_Reject(void* self); +void QColorDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QColorDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QColorDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QColorDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QColorDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QColorDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QColorDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QColorDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QColorDialog_Delete(QColorDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcolormap.cpp b/qt6/gen_qcolormap.cpp index 45a536d0..73e31589 100644 --- a/qt6/gen_qcolormap.cpp +++ b/qt6/gen_qcolormap.cpp @@ -5,8 +5,9 @@ #include "gen_qcolormap.h" #include "_cgo_export.h" -QColormap* QColormap_new(QColormap* colormap) { - return new QColormap(*colormap); +void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap) { + QColormap* ret = new QColormap(*colormap); + *outptr_QColormap = ret; } void QColormap_Initialize() { @@ -64,7 +65,11 @@ QColormap* QColormap_Instance1(int screen) { return new QColormap(QColormap::instance(static_cast(screen))); } -void QColormap_Delete(QColormap* self) { - delete self; +void QColormap_Delete(QColormap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcolormap.go b/qt6/gen_qcolormap.go index 71d7f152..c8dd0948 100644 --- a/qt6/gen_qcolormap.go +++ b/qt6/gen_qcolormap.go @@ -22,7 +22,8 @@ const ( ) type QColormap struct { - h *C.QColormap + h *C.QColormap + isSubclass bool } func (this *QColormap) cPointer() *C.QColormap { @@ -39,6 +40,7 @@ func (this *QColormap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColormap constructs the type using only CGO pointers. func newQColormap(h *C.QColormap) *QColormap { if h == nil { return nil @@ -46,14 +48,23 @@ func newQColormap(h *C.QColormap) *QColormap { return &QColormap{h: h} } +// UnsafeNewQColormap constructs the type using only unsafe pointers. func UnsafeNewQColormap(h unsafe.Pointer) *QColormap { - return newQColormap((*C.QColormap)(h)) + if h == nil { + return nil + } + + return &QColormap{h: (*C.QColormap)(h)} } // NewQColormap constructs a new QColormap object. func NewQColormap(colormap *QColormap) *QColormap { - ret := C.QColormap_new(colormap.cPointer()) - return newQColormap(ret) + var outptr_QColormap *C.QColormap = nil + + C.QColormap_new(colormap.cPointer(), &outptr_QColormap) + ret := newQColormap(outptr_QColormap) + ret.isSubclass = true + return ret } func QColormap_Initialize() { @@ -120,7 +131,7 @@ func QColormap_Instance1(screen int) *QColormap { // Delete this object from C++ memory. func (this *QColormap) Delete() { - C.QColormap_Delete(this.h) + C.QColormap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcolormap.h b/qt6/gen_qcolormap.h index 4cebf57d..da4c4cd2 100644 --- a/qt6/gen_qcolormap.h +++ b/qt6/gen_qcolormap.h @@ -22,7 +22,7 @@ typedef struct QColor QColor; typedef struct QColormap QColormap; #endif -QColormap* QColormap_new(QColormap* colormap); +void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap); void QColormap_Initialize(); void QColormap_Cleanup(); QColormap* QColormap_Instance(); @@ -34,7 +34,7 @@ unsigned int QColormap_Pixel(const QColormap* self, QColor* color); QColor* QColormap_ColorAt(const QColormap* self, unsigned int pixel); struct miqt_array /* of QColor* */ QColormap_Colormap(const QColormap* self); QColormap* QColormap_Instance1(int screen); -void QColormap_Delete(QColormap* self); +void QColormap_Delete(QColormap* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcolorspace.cpp b/qt6/gen_qcolorspace.cpp index 08a8938a..91dd4f12 100644 --- a/qt6/gen_qcolorspace.cpp +++ b/qt6/gen_qcolorspace.cpp @@ -10,47 +10,54 @@ #include "gen_qcolorspace.h" #include "_cgo_export.h" -QColorSpace* QColorSpace_new() { - return new QColorSpace(); +void QColorSpace_new(QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new2(int namedColorSpace) { - return new QColorSpace(static_cast(namedColorSpace)); +void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(namedColorSpace)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new3(int primaries, int transferFunction) { - return new QColorSpace(static_cast(primaries), static_cast(transferFunction)); +void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new4(int primaries, float gamma) { - return new QColorSpace(static_cast(primaries), static_cast(gamma)); +void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(gamma)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable) { +void QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace) { QList transferFunctionTable_QList; transferFunctionTable_QList.reserve(transferFunctionTable.len); uint16_t* transferFunctionTable_arr = static_cast(transferFunctionTable.data); for(size_t i = 0; i < transferFunctionTable.len; ++i) { transferFunctionTable_QList.push_back(static_cast(transferFunctionTable_arr[i])); } - return new QColorSpace(static_cast(primaries), transferFunctionTable_QList); + QColorSpace* ret = new QColorSpace(static_cast(primaries), transferFunctionTable_QList); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction) { - return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); +void QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable) { +void QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace) { QList transferFunctionTable_QList; transferFunctionTable_QList.reserve(transferFunctionTable.len); uint16_t* transferFunctionTable_arr = static_cast(transferFunctionTable.data); for(size_t i = 0; i < transferFunctionTable.len; ++i) { transferFunctionTable_QList.push_back(static_cast(transferFunctionTable_arr[i])); } - return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, transferFunctionTable_QList); + QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, transferFunctionTable_QList); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable) { +void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable, QColorSpace** outptr_QColorSpace) { QList redTransferFunctionTable_QList; redTransferFunctionTable_QList.reserve(redTransferFunctionTable.len); uint16_t* redTransferFunctionTable_arr = static_cast(redTransferFunctionTable.data); @@ -69,19 +76,23 @@ QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* g for(size_t i = 0; i < blueTransferFunctionTable.len; ++i) { blueTransferFunctionTable_QList.push_back(static_cast(blueTransferFunctionTable_arr[i])); } - return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, redTransferFunctionTable_QList, greenTransferFunctionTable_QList, blueTransferFunctionTable_QList); + QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, redTransferFunctionTable_QList, greenTransferFunctionTable_QList, blueTransferFunctionTable_QList); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new9(QColorSpace* colorSpace) { - return new QColorSpace(*colorSpace); +void QColorSpace_new9(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(*colorSpace); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new10(int primaries, int transferFunction, float gamma) { - return new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); +void QColorSpace_new10(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); + *outptr_QColorSpace = ret; } -QColorSpace* QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma) { - return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); +void QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { + QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); + *outptr_QColorSpace = ret; } void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace) { @@ -236,7 +247,11 @@ QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int tran return new QColorSpace(self->withTransferFunction(static_cast(transferFunction), static_cast(gamma))); } -void QColorSpace_Delete(QColorSpace* self) { - delete self; +void QColorSpace_Delete(QColorSpace* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcolorspace.go b/qt6/gen_qcolorspace.go index 8432f8b7..d1d0861a 100644 --- a/qt6/gen_qcolorspace.go +++ b/qt6/gen_qcolorspace.go @@ -44,7 +44,8 @@ const ( ) type QColorSpace struct { - h *C.QColorSpace + h *C.QColorSpace + isSubclass bool } func (this *QColorSpace) cPointer() *C.QColorSpace { @@ -61,6 +62,7 @@ func (this *QColorSpace) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColorSpace constructs the type using only CGO pointers. func newQColorSpace(h *C.QColorSpace) *QColorSpace { if h == nil { return nil @@ -68,32 +70,53 @@ func newQColorSpace(h *C.QColorSpace) *QColorSpace { return &QColorSpace{h: h} } +// UnsafeNewQColorSpace constructs the type using only unsafe pointers. func UnsafeNewQColorSpace(h unsafe.Pointer) *QColorSpace { - return newQColorSpace((*C.QColorSpace)(h)) + if h == nil { + return nil + } + + return &QColorSpace{h: (*C.QColorSpace)(h)} } // NewQColorSpace constructs a new QColorSpace object. func NewQColorSpace() *QColorSpace { - ret := C.QColorSpace_new() - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new(&outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace2 constructs a new QColorSpace object. func NewQColorSpace2(namedColorSpace QColorSpace__NamedColorSpace) *QColorSpace { - ret := C.QColorSpace_new2((C.int)(namedColorSpace)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new2((C.int)(namedColorSpace), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace3 constructs a new QColorSpace object. func NewQColorSpace3(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction) *QColorSpace { - ret := C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace4 constructs a new QColorSpace object. func NewQColorSpace4(primaries QColorSpace__Primaries, gamma float32) *QColorSpace { - ret := C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace5 constructs a new QColorSpace object. @@ -104,14 +127,22 @@ func NewQColorSpace5(primaries QColorSpace__Primaries, transferFunctionTable []u transferFunctionTable_CArray[i] = (C.uint16_t)(transferFunctionTable[i]) } transferFunctionTable_ma := C.struct_miqt_array{len: C.size_t(len(transferFunctionTable)), data: unsafe.Pointer(transferFunctionTable_CArray)} - ret := C.QColorSpace_new5((C.int)(primaries), transferFunctionTable_ma) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new5((C.int)(primaries), transferFunctionTable_ma, &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace6 constructs a new QColorSpace object. func NewQColorSpace6(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction) *QColorSpace { - ret := C.QColorSpace_new6(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new6(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace7 constructs a new QColorSpace object. @@ -122,8 +153,12 @@ func NewQColorSpace7(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF transferFunctionTable_CArray[i] = (C.uint16_t)(transferFunctionTable[i]) } transferFunctionTable_ma := C.struct_miqt_array{len: C.size_t(len(transferFunctionTable)), data: unsafe.Pointer(transferFunctionTable_CArray)} - ret := C.QColorSpace_new7(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), transferFunctionTable_ma) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new7(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), transferFunctionTable_ma, &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace8 constructs a new QColorSpace object. @@ -146,26 +181,42 @@ func NewQColorSpace8(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF blueTransferFunctionTable_CArray[i] = (C.uint16_t)(blueTransferFunctionTable[i]) } blueTransferFunctionTable_ma := C.struct_miqt_array{len: C.size_t(len(blueTransferFunctionTable)), data: unsafe.Pointer(blueTransferFunctionTable_CArray)} - ret := C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), redTransferFunctionTable_ma, greenTransferFunctionTable_ma, blueTransferFunctionTable_ma) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), redTransferFunctionTable_ma, greenTransferFunctionTable_ma, blueTransferFunctionTable_ma, &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace9 constructs a new QColorSpace object. func NewQColorSpace9(colorSpace *QColorSpace) *QColorSpace { - ret := C.QColorSpace_new9(colorSpace.cPointer()) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new9(colorSpace.cPointer(), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace10 constructs a new QColorSpace object. func NewQColorSpace10(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - ret := C.QColorSpace_new10((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new10((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } // NewQColorSpace11 constructs a new QColorSpace object. func NewQColorSpace11(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - ret := C.QColorSpace_new11(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma)) - return newQColorSpace(ret) + var outptr_QColorSpace *C.QColorSpace = nil + + C.QColorSpace_new11(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) + ret := newQColorSpace(outptr_QColorSpace) + ret.isSubclass = true + return ret } func (this *QColorSpace) OperatorAssign(colorSpace *QColorSpace) { @@ -337,7 +388,7 @@ func (this *QColorSpace) WithTransferFunction2(transferFunction QColorSpace__Tra // Delete this object from C++ memory. func (this *QColorSpace) Delete() { - C.QColorSpace_Delete(this.h) + C.QColorSpace_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcolorspace.h b/qt6/gen_qcolorspace.h index dc00dd81..586e702a 100644 --- a/qt6/gen_qcolorspace.h +++ b/qt6/gen_qcolorspace.h @@ -26,17 +26,17 @@ typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; #endif -QColorSpace* QColorSpace_new(); -QColorSpace* QColorSpace_new2(int namedColorSpace); -QColorSpace* QColorSpace_new3(int primaries, int transferFunction); -QColorSpace* QColorSpace_new4(int primaries, float gamma); -QColorSpace* QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable); -QColorSpace* QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction); -QColorSpace* QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable); -QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable); -QColorSpace* QColorSpace_new9(QColorSpace* colorSpace); -QColorSpace* QColorSpace_new10(int primaries, int transferFunction, float gamma); -QColorSpace* QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma); +void QColorSpace_new(QColorSpace** outptr_QColorSpace); +void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace); +void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace); +void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace); +void QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace); +void QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace); +void QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace); +void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable, QColorSpace** outptr_QColorSpace); +void QColorSpace_new9(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace); +void QColorSpace_new10(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); +void QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace); void QColorSpace_Swap(QColorSpace* self, QColorSpace* colorSpace); int QColorSpace_Primaries(const QColorSpace* self); @@ -59,7 +59,7 @@ struct miqt_string QColorSpace_IccProfile(const QColorSpace* self); QColorTransform* QColorSpace_TransformationToColorSpace(const QColorSpace* self, QColorSpace* colorspace); void QColorSpace_SetTransferFunction2(QColorSpace* self, int transferFunction, float gamma); QColorSpace* QColorSpace_WithTransferFunction2(const QColorSpace* self, int transferFunction, float gamma); -void QColorSpace_Delete(QColorSpace* self); +void QColorSpace_Delete(QColorSpace* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcolortransform.cpp b/qt6/gen_qcolortransform.cpp index 4a575ee2..7da6bf96 100644 --- a/qt6/gen_qcolortransform.cpp +++ b/qt6/gen_qcolortransform.cpp @@ -5,12 +5,14 @@ #include "gen_qcolortransform.h" #include "_cgo_export.h" -QColorTransform* QColorTransform_new() { - return new QColorTransform(); +void QColorTransform_new(QColorTransform** outptr_QColorTransform) { + QColorTransform* ret = new QColorTransform(); + *outptr_QColorTransform = ret; } -QColorTransform* QColorTransform_new2(QColorTransform* colorTransform) { - return new QColorTransform(*colorTransform); +void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform) { + QColorTransform* ret = new QColorTransform(*colorTransform); + *outptr_QColorTransform = ret; } void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other) { @@ -38,7 +40,11 @@ QColor* QColorTransform_MapWithColor(const QColorTransform* self, QColor* color) return new QColor(self->map(*color)); } -void QColorTransform_Delete(QColorTransform* self) { - delete self; +void QColorTransform_Delete(QColorTransform* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcolortransform.go b/qt6/gen_qcolortransform.go index ee9a3baa..2b67b9f2 100644 --- a/qt6/gen_qcolortransform.go +++ b/qt6/gen_qcolortransform.go @@ -14,7 +14,8 @@ import ( ) type QColorTransform struct { - h *C.QColorTransform + h *C.QColorTransform + isSubclass bool } func (this *QColorTransform) cPointer() *C.QColorTransform { @@ -31,6 +32,7 @@ func (this *QColorTransform) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQColorTransform constructs the type using only CGO pointers. func newQColorTransform(h *C.QColorTransform) *QColorTransform { if h == nil { return nil @@ -38,20 +40,33 @@ func newQColorTransform(h *C.QColorTransform) *QColorTransform { return &QColorTransform{h: h} } +// UnsafeNewQColorTransform constructs the type using only unsafe pointers. func UnsafeNewQColorTransform(h unsafe.Pointer) *QColorTransform { - return newQColorTransform((*C.QColorTransform)(h)) + if h == nil { + return nil + } + + return &QColorTransform{h: (*C.QColorTransform)(h)} } // NewQColorTransform constructs a new QColorTransform object. func NewQColorTransform() *QColorTransform { - ret := C.QColorTransform_new() - return newQColorTransform(ret) + var outptr_QColorTransform *C.QColorTransform = nil + + C.QColorTransform_new(&outptr_QColorTransform) + ret := newQColorTransform(outptr_QColorTransform) + ret.isSubclass = true + return ret } // NewQColorTransform2 constructs a new QColorTransform object. func NewQColorTransform2(colorTransform *QColorTransform) *QColorTransform { - ret := C.QColorTransform_new2(colorTransform.cPointer()) - return newQColorTransform(ret) + var outptr_QColorTransform *C.QColorTransform = nil + + C.QColorTransform_new2(colorTransform.cPointer(), &outptr_QColorTransform) + ret := newQColorTransform(outptr_QColorTransform) + ret.isSubclass = true + return ret } func (this *QColorTransform) OperatorAssign(other *QColorTransform) { @@ -86,7 +101,7 @@ func (this *QColorTransform) MapWithColor(color *QColor) *QColor { // Delete this object from C++ memory. func (this *QColorTransform) Delete() { - C.QColorTransform_Delete(this.h) + C.QColorTransform_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcolortransform.h b/qt6/gen_qcolortransform.h index 8c102bfe..d0c92658 100644 --- a/qt6/gen_qcolortransform.h +++ b/qt6/gen_qcolortransform.h @@ -24,15 +24,15 @@ typedef struct QColorTransform QColorTransform; typedef struct QRgba64 QRgba64; #endif -QColorTransform* QColorTransform_new(); -QColorTransform* QColorTransform_new2(QColorTransform* colorTransform); +void QColorTransform_new(QColorTransform** outptr_QColorTransform); +void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform); void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other); void QColorTransform_Swap(QColorTransform* self, QColorTransform* other); bool QColorTransform_IsIdentity(const QColorTransform* self); unsigned int QColorTransform_Map(const QColorTransform* self, unsigned int argb); QRgba64* QColorTransform_MapWithRgba64(const QColorTransform* self, QRgba64* rgba64); QColor* QColorTransform_MapWithColor(const QColorTransform* self, QColor* color); -void QColorTransform_Delete(QColorTransform* self); +void QColorTransform_Delete(QColorTransform* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcolumnview.cpp b/qt6/gen_qcolumnview.cpp index 64fc1b6d..4e4705d1 100644 --- a/qt6/gen_qcolumnview.cpp +++ b/qt6/gen_qcolumnview.cpp @@ -1,26 +1,1573 @@ +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qcolumnview.h" #include "_cgo_export.h" -QColumnView* QColumnView_new(QWidget* parent) { - return new QColumnView(parent); +class MiqtVirtualQColumnView : public virtual QColumnView { +public: + + MiqtVirtualQColumnView(QWidget* parent): QColumnView(parent) {}; + MiqtVirtualQColumnView(): QColumnView() {}; + + virtual ~MiqtVirtualQColumnView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& point) const override { + if (handle__IndexAt == 0) { + return QColumnView::indexAt(point); + } + + const QPoint& point_ret = point; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&point_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QColumnView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* point) const { + + return new QModelIndex(QColumnView::indexAt(*point)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QColumnView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QColumnView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QColumnView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QColumnView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColumnView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QColumnView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QColumnView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QColumnView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QColumnView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QColumnView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QColumnView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QColumnView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QColumnView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QColumnView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QColumnView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QColumnView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QColumnView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QColumnView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QColumnView::selectAll(); + return; + } + + + miqt_exec_callback_QColumnView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QColumnView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QColumnView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QColumnView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QColumnView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QColumnView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QColumnView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QColumnView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QColumnView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QColumnView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QColumnView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QColumnView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QColumnView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QColumnView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QColumnView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QColumnView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QColumnView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QColumnView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QColumnView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QColumnView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QColumnView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QColumnView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QColumnView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QColumnView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QColumnView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QColumnView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QColumnView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QColumnView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateColumn = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemView* createColumn(const QModelIndex& rootIndex) override { + if (handle__CreateColumn == 0) { + return QColumnView::createColumn(rootIndex); + } + + const QModelIndex& rootIndex_ret = rootIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&rootIndex_ret); + + QAbstractItemView* callback_return_value = miqt_exec_callback_QColumnView_CreateColumn(this, handle__CreateColumn, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemView* virtualbase_CreateColumn(QModelIndex* rootIndex) { + + return QColumnView::createColumn(*rootIndex); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QColumnView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QColumnView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QColumnView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QColumnView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QColumnView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QColumnView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QColumnView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QColumnView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QColumnView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemDelegateForIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemDelegate* itemDelegateForIndex(const QModelIndex& index) const override { + if (handle__ItemDelegateForIndex == 0) { + return QColumnView::itemDelegateForIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QAbstractItemDelegate* callback_return_value = miqt_exec_callback_QColumnView_ItemDelegateForIndex(const_cast(this), handle__ItemDelegateForIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemDelegate* virtualbase_ItemDelegateForIndex(QModelIndex* index) const { + + return QColumnView::itemDelegateForIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QColumnView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QColumnView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QColumnView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QColumnView::reset(); + return; + } + + + miqt_exec_callback_QColumnView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QColumnView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QColumnView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QColumnView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QColumnView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QColumnView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QColumnView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QColumnView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QColumnView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QColumnView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QColumnView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QColumnView::updateEditorData(); + return; + } + + + miqt_exec_callback_QColumnView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QColumnView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QColumnView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QColumnView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QColumnView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QColumnView::updateGeometries(); + return; + } + + + miqt_exec_callback_QColumnView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QColumnView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QColumnView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QColumnView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QColumnView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QColumnView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QColumnView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QColumnView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QColumnView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QColumnView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QColumnView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QColumnView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QColumnView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QColumnView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QColumnView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QColumnView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QColumnView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QColumnView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QColumnView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QColumnView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QColumnView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QColumnView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QColumnView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QColumnView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QColumnView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QColumnView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QColumnView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QColumnView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QColumnView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QColumnView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QColumnView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QColumnView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QColumnView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QColumnView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QColumnView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QColumnView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QColumnView::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QColumnView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QColumnView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QColumnView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QColumnView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QColumnView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QColumnView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QColumnView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QColumnView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QColumnView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QColumnView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QColumnView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QColumnView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QColumnView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QColumnView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QColumnView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QColumnView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QColumnView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QColumnView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QColumnView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QColumnView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QColumnView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QColumnView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QColumnView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QColumnView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QColumnView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QColumnView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QColumnView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QColumnView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QColumnView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QColumnView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QColumnView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QColumnView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QColumnView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QColumnView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QColumnView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QColumnView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QColumnView::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QColumnView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QColumnView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QColumnView::viewportSizeHint()); + + } + +}; + +void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(parent); + *outptr_QColumnView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QColumnView* QColumnView_new2() { - return new QColumnView(); +void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(); + *outptr_QColumnView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QColumnView_MetaObject(const QColumnView* self) { @@ -47,7 +1594,7 @@ void QColumnView_UpdatePreviewWidget(QColumnView* self, QModelIndex* index) { } void QColumnView_connect_UpdatePreviewWidget(QColumnView* self, intptr_t slot) { - QColumnView::connect(self, static_cast(&QColumnView::updatePreviewWidget), self, [=](const QModelIndex& index) { + MiqtVirtualQColumnView::connect(self, static_cast(&QColumnView::updatePreviewWidget), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -59,8 +1606,8 @@ QModelIndex* QColumnView_IndexAt(const QColumnView* self, QPoint* point) { return new QModelIndex(self->indexAt(*point)); } -void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index) { - self->scrollTo(*index); +void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QSize* QColumnView_SizeHint(const QColumnView* self) { @@ -148,11 +1695,491 @@ struct miqt_string QColumnView_Tr3(const char* s, const char* c, int n) { return _ms; } -void QColumnView_ScrollTo2(QColumnView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QColumnView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QColumnView_virtualbase_IndexAt(const void* self, QPoint* point) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_IndexAt(point); +} + +void QColumnView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ScrollTo = slot; +} + +void QColumnView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QColumnView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SizeHint = slot; +} + +QSize* QColumnView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SizeHint(); +} + +void QColumnView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VisualRect = slot; +} + +QRect* QColumnView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_VisualRect(index); +} + +void QColumnView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetModel = slot; +} + +void QColumnView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetModel(model); +} + +void QColumnView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetSelectionModel = slot; +} + +void QColumnView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QColumnView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetRootIndex = slot; +} + +void QColumnView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QColumnView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectAll = slot; +} + +void QColumnView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SelectAll(); +} + +void QColumnView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QColumnView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QColumnView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QColumnView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QColumnView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ResizeEvent = slot; +} + +void QColumnView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QColumnView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SetSelection = slot; +} + +void QColumnView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QColumnView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__HorizontalOffset = slot; +} + +int QColumnView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QColumnView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VerticalOffset = slot; +} + +int QColumnView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_VerticalOffset(); +} + +void QColumnView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__RowsInserted = slot; +} + +void QColumnView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QColumnView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CurrentChanged = slot; +} + +void QColumnView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QColumnView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QColumnView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QColumnView_override_virtual_CreateColumn(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CreateColumn = slot; +} + +QAbstractItemView* QColumnView_virtualbase_CreateColumn(void* self, QModelIndex* rootIndex) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CreateColumn(rootIndex); +} + +void QColumnView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__KeyboardSearch = slot; +} + +void QColumnView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QColumnView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SizeHintForRow = slot; +} + +int QColumnView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QColumnView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QColumnView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QColumnView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ItemDelegateForIndex = slot; +} + +QAbstractItemDelegate* QColumnView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_ItemDelegateForIndex(index); +} + +void QColumnView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QColumnView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QColumnView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__Reset = slot; +} + +void QColumnView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_Reset(); +} + +void QColumnView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DoItemsLayout = slot; +} + +void QColumnView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QColumnView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DataChanged = slot; +} + +void QColumnView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QColumnView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QColumnView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QColumnView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__UpdateEditorData = slot; +} + +void QColumnView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QColumnView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QColumnView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QColumnView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__UpdateGeometries = slot; +} + +void QColumnView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QColumnView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QColumnView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QColumnView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QColumnView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QColumnView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QColumnView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QColumnView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QColumnView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QColumnView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CloseEditor = slot; +} + +void QColumnView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QColumnView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__CommitData = slot; +} + +void QColumnView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_CommitData(editor); +} + +void QColumnView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__EditorDestroyed = slot; +} + +void QColumnView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QColumnView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QColumnView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QColumnView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__Edit2 = slot; +} + +bool QColumnView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QColumnView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectionCommand = slot; +} + +int QColumnView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QColumnView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__StartDrag = slot; +} + +void QColumnView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QColumnView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__InitViewItemOption = slot; +} + +void QColumnView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QColumnView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QColumnView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QColumnView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__Event = slot; +} + +bool QColumnView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_Event(event); +} + +void QColumnView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ViewportEvent = slot; +} + +bool QColumnView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QColumnView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MousePressEvent = slot; +} + +void QColumnView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QColumnView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QColumnView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QColumnView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QColumnView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QColumnView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QColumnView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QColumnView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DragEnterEvent = slot; +} + +void QColumnView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QColumnView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DragMoveEvent = slot; +} + +void QColumnView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QColumnView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QColumnView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QColumnView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__DropEvent = slot; +} + +void QColumnView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_DropEvent(event); +} + +void QColumnView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__FocusInEvent = slot; +} + +void QColumnView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QColumnView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__FocusOutEvent = slot; +} + +void QColumnView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QColumnView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__KeyPressEvent = slot; +} + +void QColumnView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QColumnView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__TimerEvent = slot; +} + +void QColumnView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_TimerEvent(event); +} + +void QColumnView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__InputMethodEvent = slot; +} + +void QColumnView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QColumnView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__EventFilter = slot; +} + +bool QColumnView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQColumnView*)(self) )->virtualbase_EventFilter(object, event); +} + +void QColumnView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QColumnView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_ViewportSizeHint(); } -void QColumnView_Delete(QColumnView* self) { - delete self; +void QColumnView_Delete(QColumnView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcolumnview.go b/qt6/gen_qcolumnview.go index e6542969..3ec3c8a5 100644 --- a/qt6/gen_qcolumnview.go +++ b/qt6/gen_qcolumnview.go @@ -15,7 +15,8 @@ import ( ) type QColumnView struct { - h *C.QColumnView + h *C.QColumnView + isSubclass bool *QAbstractItemView } @@ -33,27 +34,55 @@ func (this *QColumnView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQColumnView(h *C.QColumnView) *QColumnView { +// newQColumnView constructs the type using only CGO pointers. +func newQColumnView(h *C.QColumnView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColumnView { if h == nil { return nil } - return &QColumnView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QColumnView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQColumnView(h unsafe.Pointer) *QColumnView { - return newQColumnView((*C.QColumnView)(h)) +// UnsafeNewQColumnView constructs the type using only unsafe pointers. +func UnsafeNewQColumnView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColumnView { + if h == nil { + return nil + } + + return &QColumnView{h: (*C.QColumnView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQColumnView constructs a new QColumnView object. func NewQColumnView(parent *QWidget) *QColumnView { - ret := C.QColumnView_new(parent.cPointer()) - return newQColumnView(ret) + var outptr_QColumnView *C.QColumnView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColumnView_new(parent.cPointer(), &outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQColumnView2 constructs a new QColumnView object. func NewQColumnView2() *QColumnView { - ret := C.QColumnView_new2() - return newQColumnView(ret) + var outptr_QColumnView *C.QColumnView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QColumnView_new2(&outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QColumnView) MetaObject() *QMetaObject { @@ -102,8 +131,8 @@ func (this *QColumnView) IndexAt(point *QPoint) *QModelIndex { return _goptr } -func (this *QColumnView) ScrollTo(index *QModelIndex) { - C.QColumnView_ScrollTo(this.h, index.cPointer()) +func (this *QColumnView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QColumnView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QColumnView) SizeHint() *QSize { @@ -145,7 +174,7 @@ func (this *QColumnView) ResizeGripsVisible() bool { } func (this *QColumnView) PreviewWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QColumnView_PreviewWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QColumnView_PreviewWidget(this.h)), nil, nil) } func (this *QColumnView) SetPreviewWidget(widget *QWidget) { @@ -194,13 +223,1467 @@ func QColumnView_Tr3(s string, c string, n int) string { return _ret } -func (this *QColumnView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QColumnView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QColumnView) callVirtualBase_IndexAt(point *QPoint) *QModelIndex { + + _ret := C.QColumnView_virtualbase_IndexAt(unsafe.Pointer(this.h), point.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnIndexAt(slot func(super func(point *QPoint) *QModelIndex, point *QPoint) *QModelIndex) { + C.QColumnView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_IndexAt +func miqt_exec_callback_QColumnView_IndexAt(self *C.QColumnView, cb C.intptr_t, point *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPoint) *QModelIndex, point *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QColumnView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QColumnView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QColumnView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ScrollTo +func miqt_exec_callback_QColumnView_ScrollTo(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QColumnView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QColumnView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QColumnView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SizeHint +func miqt_exec_callback_QColumnView_SizeHint(self *C.QColumnView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QColumnView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QColumnView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VisualRect +func miqt_exec_callback_QColumnView_VisualRect(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QColumnView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QColumnView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QColumnView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetModel +func miqt_exec_callback_QColumnView_SetModel(self *C.QColumnView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QColumnView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QColumnView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QColumnView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetSelectionModel +func miqt_exec_callback_QColumnView_SetSelectionModel(self *C.QColumnView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QColumnView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QColumnView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QColumnView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetRootIndex +func miqt_exec_callback_QColumnView_SetRootIndex(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SelectAll() { + + C.QColumnView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnSelectAll(slot func(super func())) { + C.QColumnView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectAll +func miqt_exec_callback_QColumnView_SelectAll(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QColumnView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QColumnView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QColumnView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QColumnView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_IsIndexHidden +func miqt_exec_callback_QColumnView_IsIndexHidden(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QColumnView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QColumnView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MoveCursor +func miqt_exec_callback_QColumnView_MoveCursor(self *C.QColumnView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QColumnView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QColumnView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ResizeEvent +func miqt_exec_callback_QColumnView_ResizeEvent(self *C.QColumnView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QColumnView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QColumnView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QColumnView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SetSelection +func miqt_exec_callback_QColumnView_SetSelection(self *C.QColumnView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QColumnView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QColumnView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QColumnView) OnHorizontalOffset(slot func(super func() int) int) { + C.QColumnView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_HorizontalOffset +func miqt_exec_callback_QColumnView_HorizontalOffset(self *C.QColumnView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QColumnView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QColumnView) OnVerticalOffset(slot func(super func() int) int) { + C.QColumnView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VerticalOffset +func miqt_exec_callback_QColumnView_VerticalOffset(self *C.QColumnView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QColumnView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QColumnView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QColumnView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_RowsInserted +func miqt_exec_callback_QColumnView_RowsInserted(self *C.QColumnView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QColumnView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QColumnView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QColumnView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QColumnView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QColumnView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CurrentChanged +func miqt_exec_callback_QColumnView_CurrentChanged(self *C.QColumnView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QColumnView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QColumnView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QColumnView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QColumnView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ScrollContentsBy +func miqt_exec_callback_QColumnView_ScrollContentsBy(self *C.QColumnView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QColumnView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_CreateColumn(rootIndex *QModelIndex) *QAbstractItemView { + + return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QColumnView_virtualbase_CreateColumn(unsafe.Pointer(this.h), rootIndex.cPointer())), nil, nil, nil, nil, nil) +} +func (this *QColumnView) OnCreateColumn(slot func(super func(rootIndex *QModelIndex) *QAbstractItemView, rootIndex *QModelIndex) *QAbstractItemView) { + C.QColumnView_override_virtual_CreateColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CreateColumn +func miqt_exec_callback_QColumnView_CreateColumn(self *C.QColumnView, cb C.intptr_t, rootIndex *C.QModelIndex) *C.QAbstractItemView { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rootIndex *QModelIndex) *QAbstractItemView, rootIndex *QModelIndex) *QAbstractItemView) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(rootIndex)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_CreateColumn, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QColumnView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QColumnView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QColumnView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_KeyboardSearch +func miqt_exec_callback_QColumnView_KeyboardSearch(self *C.QColumnView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QColumnView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QColumnView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QColumnView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QColumnView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SizeHintForRow +func miqt_exec_callback_QColumnView_SizeHintForRow(self *C.QColumnView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QColumnView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QColumnView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QColumnView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SizeHintForColumn +func miqt_exec_callback_QColumnView_SizeHintForColumn(self *C.QColumnView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { + + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QColumnView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())), nil) +} +func (this *QColumnView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { + C.QColumnView_override_virtual_ItemDelegateForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ItemDelegateForIndex +func miqt_exec_callback_QColumnView_ItemDelegateForIndex(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex) *C.QAbstractItemDelegate { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_ItemDelegateForIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QColumnView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QColumnView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_InputMethodQuery +func miqt_exec_callback_QColumnView_InputMethodQuery(self *C.QColumnView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QColumnView) callVirtualBase_Reset() { + + C.QColumnView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnReset(slot func(super func())) { + C.QColumnView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_Reset +func miqt_exec_callback_QColumnView_Reset(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_Reset) + +} + +func (this *QColumnView) callVirtualBase_DoItemsLayout() { + + C.QColumnView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnDoItemsLayout(slot func(super func())) { + C.QColumnView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DoItemsLayout +func miqt_exec_callback_QColumnView_DoItemsLayout(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QColumnView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QColumnView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QColumnView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QColumnView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DataChanged +func miqt_exec_callback_QColumnView_DataChanged(self *C.QColumnView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QColumnView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QColumnView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QColumnView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QColumnView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QColumnView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_RowsAboutToBeRemoved +func miqt_exec_callback_QColumnView_RowsAboutToBeRemoved(self *C.QColumnView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QColumnView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QColumnView) callVirtualBase_UpdateEditorData() { + + C.QColumnView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnUpdateEditorData(slot func(super func())) { + C.QColumnView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_UpdateEditorData +func miqt_exec_callback_QColumnView_UpdateEditorData(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QColumnView) callVirtualBase_UpdateEditorGeometries() { + + C.QColumnView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnUpdateEditorGeometries(slot func(super func())) { + C.QColumnView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_UpdateEditorGeometries +func miqt_exec_callback_QColumnView_UpdateEditorGeometries(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QColumnView) callVirtualBase_UpdateGeometries() { + + C.QColumnView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QColumnView) OnUpdateGeometries(slot func(super func())) { + C.QColumnView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_UpdateGeometries +func miqt_exec_callback_QColumnView_UpdateGeometries(self *C.QColumnView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QColumnView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QColumnView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QColumnView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QColumnView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QColumnView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VerticalScrollbarAction +func miqt_exec_callback_QColumnView_VerticalScrollbarAction(self *C.QColumnView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QColumnView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QColumnView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QColumnView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QColumnView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QColumnView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_HorizontalScrollbarAction +func miqt_exec_callback_QColumnView_HorizontalScrollbarAction(self *C.QColumnView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QColumnView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QColumnView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QColumnView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QColumnView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QColumnView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VerticalScrollbarValueChanged +func miqt_exec_callback_QColumnView_VerticalScrollbarValueChanged(self *C.QColumnView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QColumnView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QColumnView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QColumnView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QColumnView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QColumnView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QColumnView_HorizontalScrollbarValueChanged(self *C.QColumnView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QColumnView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QColumnView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QColumnView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QColumnView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QColumnView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CloseEditor +func miqt_exec_callback_QColumnView_CloseEditor(self *C.QColumnView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QColumnView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QColumnView) callVirtualBase_CommitData(editor *QWidget) { + + C.QColumnView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QColumnView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QColumnView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_CommitData +func miqt_exec_callback_QColumnView_CommitData(self *C.QColumnView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QColumnView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QColumnView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QColumnView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QColumnView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_EditorDestroyed +func miqt_exec_callback_QColumnView_EditorDestroyed(self *C.QColumnView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QColumnView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QColumnView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QColumnView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QColumnView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QColumnView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectedIndexes +func miqt_exec_callback_QColumnView_SelectedIndexes(self *C.QColumnView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QColumnView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QColumnView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QColumnView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_Edit2 +func miqt_exec_callback_QColumnView_Edit2(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QColumnView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QColumnView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QColumnView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectionCommand +func miqt_exec_callback_QColumnView_SelectionCommand(self *C.QColumnView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QColumnView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QColumnView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QColumnView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_StartDrag +func miqt_exec_callback_QColumnView_StartDrag(self *C.QColumnView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QColumnView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QColumnView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QColumnView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QColumnView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QColumnView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_InitViewItemOption +func miqt_exec_callback_QColumnView_InitViewItemOption(self *C.QColumnView, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QColumnView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QColumnView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QColumnView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QColumnView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_FocusNextPrevChild +func miqt_exec_callback_QColumnView_FocusNextPrevChild(self *C.QColumnView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QColumnView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QColumnView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_Event +func miqt_exec_callback_QColumnView_Event(self *C.QColumnView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QColumnView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QColumnView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ViewportEvent +func miqt_exec_callback_QColumnView_ViewportEvent(self *C.QColumnView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MousePressEvent +func miqt_exec_callback_QColumnView_MousePressEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MouseMoveEvent +func miqt_exec_callback_QColumnView_MouseMoveEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MouseReleaseEvent +func miqt_exec_callback_QColumnView_MouseReleaseEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QColumnView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QColumnView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_MouseDoubleClickEvent +func miqt_exec_callback_QColumnView_MouseDoubleClickEvent(self *C.QColumnView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QColumnView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QColumnView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DragEnterEvent +func miqt_exec_callback_QColumnView_DragEnterEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QColumnView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QColumnView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DragMoveEvent +func miqt_exec_callback_QColumnView_DragMoveEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QColumnView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QColumnView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DragLeaveEvent +func miqt_exec_callback_QColumnView_DragLeaveEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QColumnView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QColumnView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_DropEvent +func miqt_exec_callback_QColumnView_DropEvent(self *C.QColumnView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QColumnView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QColumnView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_FocusInEvent +func miqt_exec_callback_QColumnView_FocusInEvent(self *C.QColumnView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QColumnView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QColumnView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_FocusOutEvent +func miqt_exec_callback_QColumnView_FocusOutEvent(self *C.QColumnView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QColumnView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QColumnView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_KeyPressEvent +func miqt_exec_callback_QColumnView_KeyPressEvent(self *C.QColumnView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QColumnView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QColumnView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_TimerEvent +func miqt_exec_callback_QColumnView_TimerEvent(self *C.QColumnView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QColumnView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QColumnView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QColumnView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_InputMethodEvent +func miqt_exec_callback_QColumnView_InputMethodEvent(self *C.QColumnView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QColumnView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QColumnView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QColumnView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QColumnView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QColumnView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_EventFilter +func miqt_exec_callback_QColumnView_EventFilter(self *C.QColumnView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QColumnView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QColumnView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QColumnView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_ViewportSizeHint +func miqt_exec_callback_QColumnView_ViewportSizeHint(self *C.QColumnView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QColumnView) Delete() { - C.QColumnView_Delete(this.h) + C.QColumnView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcolumnview.h b/qt6/gen_qcolumnview.h index d4433bbe..0b95bac2 100644 --- a/qt6/gen_qcolumnview.h +++ b/qt6/gen_qcolumnview.h @@ -15,36 +15,74 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; class QColumnView; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QVariant; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QColumnView QColumnView; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QColumnView* QColumnView_new(QWidget* parent); -QColumnView* QColumnView_new2(); +void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QColumnView_MetaObject(const QColumnView* self); void* QColumnView_Metacast(QColumnView* self, const char* param1); struct miqt_string QColumnView_Tr(const char* s); void QColumnView_UpdatePreviewWidget(QColumnView* self, QModelIndex* index); void QColumnView_connect_UpdatePreviewWidget(QColumnView* self, intptr_t slot); QModelIndex* QColumnView_IndexAt(const QColumnView* self, QPoint* point); -void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index); +void QColumnView_ScrollTo(QColumnView* self, QModelIndex* index, int hint); QSize* QColumnView_SizeHint(const QColumnView* self); QRect* QColumnView_VisualRect(const QColumnView* self, QModelIndex* index); void QColumnView_SetModel(QColumnView* self, QAbstractItemModel* model); @@ -57,10 +95,139 @@ QWidget* QColumnView_PreviewWidget(const QColumnView* self); void QColumnView_SetPreviewWidget(QColumnView* self, QWidget* widget); void QColumnView_SetColumnWidths(QColumnView* self, struct miqt_array /* of int */ list); struct miqt_array /* of int */ QColumnView_ColumnWidths(const QColumnView* self); +bool QColumnView_IsIndexHidden(const QColumnView* self, QModelIndex* index); +QModelIndex* QColumnView_MoveCursor(QColumnView* self, int cursorAction, int modifiers); +void QColumnView_ResizeEvent(QColumnView* self, QResizeEvent* event); +void QColumnView_SetSelection(QColumnView* self, QRect* rect, int command); +int QColumnView_HorizontalOffset(const QColumnView* self); +int QColumnView_VerticalOffset(const QColumnView* self); +void QColumnView_RowsInserted(QColumnView* self, QModelIndex* parent, int start, int end); +void QColumnView_CurrentChanged(QColumnView* self, QModelIndex* current, QModelIndex* previous); +void QColumnView_ScrollContentsBy(QColumnView* self, int dx, int dy); +QAbstractItemView* QColumnView_CreateColumn(QColumnView* self, QModelIndex* rootIndex); struct miqt_string QColumnView_Tr2(const char* s, const char* c); struct miqt_string QColumnView_Tr3(const char* s, const char* c, int n); -void QColumnView_ScrollTo2(QColumnView* self, QModelIndex* index, int hint); -void QColumnView_Delete(QColumnView* self); +void QColumnView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QColumnView_virtualbase_IndexAt(const void* self, QPoint* point); +void QColumnView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QColumnView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QColumnView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QColumnView_virtualbase_SizeHint(const void* self); +void QColumnView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QColumnView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QColumnView_override_virtual_SetModel(void* self, intptr_t slot); +void QColumnView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QColumnView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QColumnView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QColumnView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QColumnView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QColumnView_override_virtual_SelectAll(void* self, intptr_t slot); +void QColumnView_virtualbase_SelectAll(void* self); +void QColumnView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QColumnView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QColumnView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QColumnView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QColumnView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QColumnView_override_virtual_SetSelection(void* self, intptr_t slot); +void QColumnView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QColumnView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QColumnView_virtualbase_HorizontalOffset(const void* self); +void QColumnView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QColumnView_virtualbase_VerticalOffset(const void* self); +void QColumnView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QColumnView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QColumnView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QColumnView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QColumnView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QColumnView_override_virtual_CreateColumn(void* self, intptr_t slot); +QAbstractItemView* QColumnView_virtualbase_CreateColumn(void* self, QModelIndex* rootIndex); +void QColumnView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QColumnView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QColumnView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QColumnView_virtualbase_SizeHintForRow(const void* self, int row); +void QColumnView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QColumnView_virtualbase_SizeHintForColumn(const void* self, int column); +void QColumnView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot); +QAbstractItemDelegate* QColumnView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index); +void QColumnView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QColumnView_virtualbase_InputMethodQuery(const void* self, int query); +void QColumnView_override_virtual_Reset(void* self, intptr_t slot); +void QColumnView_virtualbase_Reset(void* self); +void QColumnView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QColumnView_virtualbase_DoItemsLayout(void* self); +void QColumnView_override_virtual_DataChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QColumnView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QColumnView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QColumnView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QColumnView_virtualbase_UpdateEditorData(void* self); +void QColumnView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QColumnView_virtualbase_UpdateEditorGeometries(void* self); +void QColumnView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QColumnView_virtualbase_UpdateGeometries(void* self); +void QColumnView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QColumnView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QColumnView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QColumnView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QColumnView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QColumnView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QColumnView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QColumnView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QColumnView_override_virtual_CommitData(void* self, intptr_t slot); +void QColumnView_virtualbase_CommitData(void* self, QWidget* editor); +void QColumnView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QColumnView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QColumnView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QColumnView_virtualbase_SelectedIndexes(const void* self); +void QColumnView_override_virtual_Edit2(void* self, intptr_t slot); +bool QColumnView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QColumnView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QColumnView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QColumnView_override_virtual_StartDrag(void* self, intptr_t slot); +void QColumnView_virtualbase_StartDrag(void* self, int supportedActions); +void QColumnView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QColumnView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QColumnView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QColumnView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QColumnView_override_virtual_Event(void* self, intptr_t slot); +bool QColumnView_virtualbase_Event(void* self, QEvent* event); +void QColumnView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QColumnView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QColumnView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QColumnView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QColumnView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QColumnView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QColumnView_override_virtual_DropEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QColumnView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QColumnView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QColumnView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QColumnView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QColumnView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QColumnView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QColumnView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QColumnView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QColumnView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QColumnView_virtualbase_ViewportSizeHint(const void* self); +void QColumnView_Delete(QColumnView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcombobox.cpp b/qt6/gen_qcombobox.cpp index 915ec2ae..a6c8aba3 100644 --- a/qt6/gen_qcombobox.cpp +++ b/qt6/gen_qcombobox.cpp @@ -1,31 +1,1145 @@ #include #include #include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include +#include #include #include #include "gen_qcombobox.h" #include "_cgo_export.h" -QComboBox* QComboBox_new(QWidget* parent) { - return new QComboBox(parent); +class MiqtVirtualQComboBox : public virtual QComboBox { +public: + + MiqtVirtualQComboBox(QWidget* parent): QComboBox(parent) {}; + MiqtVirtualQComboBox(): QComboBox() {}; + + virtual ~MiqtVirtualQComboBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QComboBox::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QComboBox_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QComboBox::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QComboBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QComboBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QComboBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QComboBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QComboBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QComboBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowPopup = 0; + + // Subclass to allow providing a Go implementation + virtual void showPopup() override { + if (handle__ShowPopup == 0) { + QComboBox::showPopup(); + return; + } + + + miqt_exec_callback_QComboBox_ShowPopup(this, handle__ShowPopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowPopup() { + + QComboBox::showPopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HidePopup = 0; + + // Subclass to allow providing a Go implementation + virtual void hidePopup() override { + if (handle__HidePopup == 0) { + QComboBox::hidePopup(); + return; + } + + + miqt_exec_callback_QComboBox_HidePopup(this, handle__HidePopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HidePopup() { + + QComboBox::hidePopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QComboBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QComboBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QComboBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QComboBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QComboBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QComboBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QComboBox::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QComboBox::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QComboBox::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QComboBox::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QComboBox::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QComboBox::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QComboBox::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QComboBox::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QComboBox::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QComboBox::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* e) override { + if (handle__ShowEvent == 0) { + QComboBox::showEvent(e); + return; + } + + QShowEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* e) { + + QComboBox::showEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* e) override { + if (handle__HideEvent == 0) { + QComboBox::hideEvent(e); + return; + } + + QHideEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* e) { + + QComboBox::hideEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QComboBox::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QComboBox::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QComboBox::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QComboBox::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QComboBox::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QComboBox::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QComboBox::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QComboBox::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QComboBox::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QComboBox::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QComboBox::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QComboBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QComboBox::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QComboBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QComboBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QComboBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionComboBox* option) const override { + if (handle__InitStyleOption == 0) { + QComboBox::initStyleOption(option); + return; + } + + QStyleOptionComboBox* sigval1 = option; + + miqt_exec_callback_QComboBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionComboBox* option) const { + + QComboBox::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QComboBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QComboBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QComboBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QComboBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QComboBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QComboBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QComboBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QComboBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QComboBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QComboBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QComboBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QComboBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QComboBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QComboBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QComboBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QComboBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QComboBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QComboBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QComboBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QComboBox::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QComboBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QComboBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QComboBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QComboBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QComboBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QComboBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QComboBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QComboBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QComboBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QComboBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QComboBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QComboBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QComboBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QComboBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QComboBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QComboBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QComboBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QComboBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QComboBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QComboBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QComboBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QComboBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QComboBox::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QComboBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QComboBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QComboBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QComboBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QComboBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QComboBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QComboBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QComboBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QComboBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QComboBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QComboBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QComboBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QComboBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QComboBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QComboBox::focusNextPrevChild(next); + + } + +}; + +void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(parent); + *outptr_QComboBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QComboBox* QComboBox_new2() { - return new QComboBox(); +void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(); + *outptr_QComboBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QComboBox_MetaObject(const QComboBox* self) { @@ -371,7 +1485,7 @@ void QComboBox_EditTextChanged(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_EditTextChanged(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::editTextChanged), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::editTextChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -389,7 +1503,7 @@ void QComboBox_Activated(QComboBox* self, int index) { } void QComboBox_connect_Activated(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](int index) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::activated), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QComboBox_Activated(slot, sigval1); }); @@ -401,7 +1515,7 @@ void QComboBox_TextActivated(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_TextActivated(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::textActivated), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::textActivated), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -419,7 +1533,7 @@ void QComboBox_Highlighted(QComboBox* self, int index) { } void QComboBox_connect_Highlighted(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](int index) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::highlighted), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QComboBox_Highlighted(slot, sigval1); }); @@ -431,7 +1545,7 @@ void QComboBox_TextHighlighted(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_TextHighlighted(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::textHighlighted), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::textHighlighted), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -449,7 +1563,7 @@ void QComboBox_CurrentIndexChanged(QComboBox* self, int index) { } void QComboBox_connect_CurrentIndexChanged(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](int index) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::currentIndexChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QComboBox_CurrentIndexChanged(slot, sigval1); }); @@ -461,7 +1575,7 @@ void QComboBox_CurrentTextChanged(QComboBox* self, struct miqt_string param1) { } void QComboBox_connect_CurrentTextChanged(QComboBox* self, intptr_t slot) { - QComboBox::connect(self, static_cast(&QComboBox::currentTextChanged), self, [=](const QString& param1) { + MiqtVirtualQComboBox::connect(self, static_cast(&QComboBox::currentTextChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -541,7 +1655,371 @@ void QComboBox_SetItemData3(QComboBox* self, int index, QVariant* value, int rol self->setItemData(static_cast(index), *value, static_cast(role)); } -void QComboBox_Delete(QComboBox* self) { - delete self; +void QComboBox_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SetModel = slot; +} + +void QComboBox_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_SetModel(model); +} + +void QComboBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QComboBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_SizeHint(); +} + +void QComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QComboBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QComboBox_override_virtual_ShowPopup(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ShowPopup = slot; +} + +void QComboBox_virtualbase_ShowPopup(void* self) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ShowPopup(); +} + +void QComboBox_override_virtual_HidePopup(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HidePopup = slot; +} + +void QComboBox_virtualbase_HidePopup(void* self) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_HidePopup(); +} + +void QComboBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__Event = slot; +} + +bool QComboBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQComboBox*)(self) )->virtualbase_Event(event); +} + +void QComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QComboBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__FocusInEvent = slot; +} + +void QComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_FocusInEvent(e); +} + +void QComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ChangeEvent = slot; +} + +void QComboBox_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ChangeEvent(e); +} + +void QComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ResizeEvent = slot; +} + +void QComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ResizeEvent(e); +} + +void QComboBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__PaintEvent = slot; +} + +void QComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_PaintEvent(e); +} + +void QComboBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ShowEvent = slot; +} + +void QComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ShowEvent(e); +} + +void QComboBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HideEvent = slot; +} + +void QComboBox_virtualbase_HideEvent(void* self, QHideEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_HideEvent(e); +} + +void QComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MousePressEvent = slot; +} + +void QComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MousePressEvent(e); +} + +void QComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QComboBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__WheelEvent = slot; +} + +void QComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_WheelEvent(e); +} + +void QComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QComboBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InitStyleOption = slot; +} + +void QComboBox_virtualbase_InitStyleOption(const void* self, QStyleOptionComboBox* option) { + ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QComboBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DevType = slot; +} + +int QComboBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_DevType(); +} + +void QComboBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SetVisible = slot; +} + +void QComboBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QComboBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HeightForWidth = slot; +} + +int QComboBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QComboBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QComboBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QComboBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QComboBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_PaintEngine(); +} + +void QComboBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QComboBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QComboBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QComboBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QComboBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__EnterEvent = slot; +} + +void QComboBox_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QComboBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__LeaveEvent = slot; +} + +void QComboBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QComboBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__MoveEvent = slot; +} + +void QComboBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QComboBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__CloseEvent = slot; +} + +void QComboBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QComboBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__TabletEvent = slot; +} + +void QComboBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QComboBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__ActionEvent = slot; +} + +void QComboBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QComboBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QComboBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QComboBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QComboBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QComboBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QComboBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QComboBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__DropEvent = slot; +} + +void QComboBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQComboBox*)(self) )->virtualbase_DropEvent(event); +} + +void QComboBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__NativeEvent = slot; +} + +bool QComboBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQComboBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QComboBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__Metric = slot; +} + +int QComboBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_Metric(param1); +} + +void QComboBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__InitPainter = slot; +} + +void QComboBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QComboBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QComboBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_Redirected(offset); +} + +void QComboBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QComboBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQComboBox*)(self) )->virtualbase_SharedPainter(); +} + +void QComboBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QComboBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QComboBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQComboBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QComboBox_Delete(QComboBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcombobox.go b/qt6/gen_qcombobox.go index 47cb8fa4..0424fb2a 100644 --- a/qt6/gen_qcombobox.go +++ b/qt6/gen_qcombobox.go @@ -35,7 +35,8 @@ const ( ) type QComboBox struct { - h *C.QComboBox + h *C.QComboBox + isSubclass bool *QWidget } @@ -53,27 +54,49 @@ func (this *QComboBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQComboBox(h *C.QComboBox) *QComboBox { +// newQComboBox constructs the type using only CGO pointers. +func newQComboBox(h *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QComboBox { if h == nil { return nil } - return &QComboBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QComboBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQComboBox(h unsafe.Pointer) *QComboBox { - return newQComboBox((*C.QComboBox)(h)) +// UnsafeNewQComboBox constructs the type using only unsafe pointers. +func UnsafeNewQComboBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QComboBox { + if h == nil { + return nil + } + + return &QComboBox{h: (*C.QComboBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQComboBox constructs a new QComboBox object. func NewQComboBox(parent *QWidget) *QComboBox { - ret := C.QComboBox_new(parent.cPointer()) - return newQComboBox(ret) + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QComboBox_new(parent.cPointer(), &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQComboBox2 constructs a new QComboBox object. func NewQComboBox2() *QComboBox { - ret := C.QComboBox_new2() - return newQComboBox(ret) + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QComboBox_new2(&outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QComboBox) MetaObject() *QMetaObject { @@ -206,7 +229,7 @@ func (this *QComboBox) SetLineEdit(edit *QLineEdit) { } func (this *QComboBox) LineEdit() *QLineEdit { - return UnsafeNewQLineEdit(unsafe.Pointer(C.QComboBox_LineEdit(this.h))) + return UnsafeNewQLineEdit(unsafe.Pointer(C.QComboBox_LineEdit(this.h)), nil, nil, nil) } func (this *QComboBox) SetValidator(v *QValidator) { @@ -214,7 +237,7 @@ func (this *QComboBox) SetValidator(v *QValidator) { } func (this *QComboBox) Validator() *QValidator { - return UnsafeNewQValidator(unsafe.Pointer(C.QComboBox_Validator(this.h))) + return UnsafeNewQValidator(unsafe.Pointer(C.QComboBox_Validator(this.h)), nil) } func (this *QComboBox) SetCompleter(c *QCompleter) { @@ -222,11 +245,11 @@ func (this *QComboBox) SetCompleter(c *QCompleter) { } func (this *QComboBox) Completer() *QCompleter { - return UnsafeNewQCompleter(unsafe.Pointer(C.QComboBox_Completer(this.h))) + return UnsafeNewQCompleter(unsafe.Pointer(C.QComboBox_Completer(this.h)), nil) } func (this *QComboBox) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QComboBox_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QComboBox_ItemDelegate(this.h)), nil) } func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -234,7 +257,7 @@ func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QComboBox) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QComboBox_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QComboBox_Model(this.h)), nil) } func (this *QComboBox) SetModel(model *QAbstractItemModel) { @@ -384,7 +407,7 @@ func (this *QComboBox) SetItemData(index int, value *QVariant) { } func (this *QComboBox) View() *QAbstractItemView { - return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QComboBox_View(this.h))) + return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QComboBox_View(this.h)), nil, nil, nil, nil, nil) } func (this *QComboBox) SetView(itemView *QAbstractItemView) { @@ -715,9 +738,1061 @@ func (this *QComboBox) SetItemData3(index int, value *QVariant, role int) { C.QComboBox_SetItemData3(this.h, (C.int)(index), value.cPointer(), (C.int)(role)) } +func (this *QComboBox) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QComboBox_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QComboBox) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QComboBox_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SetModel +func miqt_exec_callback_QComboBox_SetModel(self *C.QComboBox, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QComboBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QComboBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QComboBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QComboBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SizeHint +func miqt_exec_callback_QComboBox_SizeHint(self *C.QComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QComboBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QComboBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QComboBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MinimumSizeHint +func miqt_exec_callback_QComboBox_MinimumSizeHint(self *C.QComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_ShowPopup() { + + C.QComboBox_virtualbase_ShowPopup(unsafe.Pointer(this.h)) + +} +func (this *QComboBox) OnShowPopup(slot func(super func())) { + C.QComboBox_override_virtual_ShowPopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ShowPopup +func miqt_exec_callback_QComboBox_ShowPopup(self *C.QComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QComboBox{h: self}).callVirtualBase_ShowPopup) + +} + +func (this *QComboBox) callVirtualBase_HidePopup() { + + C.QComboBox_virtualbase_HidePopup(unsafe.Pointer(this.h)) + +} +func (this *QComboBox) OnHidePopup(slot func(super func())) { + C.QComboBox_override_virtual_HidePopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HidePopup +func miqt_exec_callback_QComboBox_HidePopup(self *C.QComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QComboBox{h: self}).callVirtualBase_HidePopup) + +} + +func (this *QComboBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QComboBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QComboBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QComboBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_Event +func miqt_exec_callback_QComboBox_Event(self *C.QComboBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QComboBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QComboBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QComboBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InputMethodQuery +func miqt_exec_callback_QComboBox_InputMethodQuery(self *C.QComboBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QComboBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QComboBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_FocusInEvent +func miqt_exec_callback_QComboBox_FocusInEvent(self *C.QComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QComboBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QComboBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_FocusOutEvent +func miqt_exec_callback_QComboBox_FocusOutEvent(self *C.QComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QComboBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QComboBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ChangeEvent +func miqt_exec_callback_QComboBox_ChangeEvent(self *C.QComboBox, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QComboBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QComboBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QComboBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ResizeEvent +func miqt_exec_callback_QComboBox_ResizeEvent(self *C.QComboBox, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QComboBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QComboBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_PaintEvent +func miqt_exec_callback_QComboBox_PaintEvent(self *C.QComboBox, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ShowEvent(e *QShowEvent) { + + C.QComboBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnShowEvent(slot func(super func(e *QShowEvent), e *QShowEvent)) { + C.QComboBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ShowEvent +func miqt_exec_callback_QComboBox_ShowEvent(self *C.QComboBox, cb C.intptr_t, e *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QShowEvent), e *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_HideEvent(e *QHideEvent) { + + C.QComboBox_virtualbase_HideEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnHideEvent(slot func(super func(e *QHideEvent), e *QHideEvent)) { + C.QComboBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HideEvent +func miqt_exec_callback_QComboBox_HideEvent(self *C.QComboBox, cb C.intptr_t, e *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QHideEvent), e *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(e), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QComboBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QComboBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MousePressEvent +func miqt_exec_callback_QComboBox_MousePressEvent(self *C.QComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QComboBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QComboBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MouseReleaseEvent +func miqt_exec_callback_QComboBox_MouseReleaseEvent(self *C.QComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QComboBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QComboBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_KeyPressEvent +func miqt_exec_callback_QComboBox_KeyPressEvent(self *C.QComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QComboBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QComboBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_KeyReleaseEvent +func miqt_exec_callback_QComboBox_KeyReleaseEvent(self *C.QComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QComboBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QComboBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_WheelEvent +func miqt_exec_callback_QComboBox_WheelEvent(self *C.QComboBox, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QComboBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QComboBox) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QComboBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ContextMenuEvent +func miqt_exec_callback_QComboBox_ContextMenuEvent(self *C.QComboBox, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QComboBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QComboBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QComboBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InputMethodEvent +func miqt_exec_callback_QComboBox_InputMethodEvent(self *C.QComboBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_InitStyleOption(option *QStyleOptionComboBox) { + + C.QComboBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QComboBox) OnInitStyleOption(slot func(super func(option *QStyleOptionComboBox), option *QStyleOptionComboBox)) { + C.QComboBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InitStyleOption +func miqt_exec_callback_QComboBox_InitStyleOption(self *C.QComboBox, cb C.intptr_t, option *C.QStyleOptionComboBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionComboBox), option *QStyleOptionComboBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionComboBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DevType() int { + + return (int)(C.QComboBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QComboBox) OnDevType(slot func(super func() int) int) { + C.QComboBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DevType +func miqt_exec_callback_QComboBox_DevType(self *C.QComboBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_SetVisible(visible bool) { + + C.QComboBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QComboBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QComboBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SetVisible +func miqt_exec_callback_QComboBox_SetVisible(self *C.QComboBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QComboBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QComboBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QComboBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QComboBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QComboBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HeightForWidth +func miqt_exec_callback_QComboBox_HeightForWidth(self *C.QComboBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QComboBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QComboBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QComboBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_HasHeightForWidth +func miqt_exec_callback_QComboBox_HasHeightForWidth(self *C.QComboBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QComboBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QComboBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QComboBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_PaintEngine +func miqt_exec_callback_QComboBox_PaintEngine(self *C.QComboBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QComboBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QComboBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MouseDoubleClickEvent +func miqt_exec_callback_QComboBox_MouseDoubleClickEvent(self *C.QComboBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QComboBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QComboBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MouseMoveEvent +func miqt_exec_callback_QComboBox_MouseMoveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QComboBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QComboBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_EnterEvent +func miqt_exec_callback_QComboBox_EnterEvent(self *C.QComboBox, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QComboBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QComboBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_LeaveEvent +func miqt_exec_callback_QComboBox_LeaveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QComboBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QComboBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QComboBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_MoveEvent +func miqt_exec_callback_QComboBox_MoveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QComboBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QComboBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_CloseEvent +func miqt_exec_callback_QComboBox_CloseEvent(self *C.QComboBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QComboBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QComboBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_TabletEvent +func miqt_exec_callback_QComboBox_TabletEvent(self *C.QComboBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QComboBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QComboBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_ActionEvent +func miqt_exec_callback_QComboBox_ActionEvent(self *C.QComboBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QComboBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QComboBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DragEnterEvent +func miqt_exec_callback_QComboBox_DragEnterEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QComboBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QComboBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DragMoveEvent +func miqt_exec_callback_QComboBox_DragMoveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QComboBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QComboBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DragLeaveEvent +func miqt_exec_callback_QComboBox_DragLeaveEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QComboBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QComboBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QComboBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_DropEvent +func miqt_exec_callback_QComboBox_DropEvent(self *C.QComboBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QComboBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QComboBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QComboBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QComboBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QComboBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_NativeEvent +func miqt_exec_callback_QComboBox_NativeEvent(self *C.QComboBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QComboBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QComboBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QComboBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_Metric +func miqt_exec_callback_QComboBox_Metric(self *C.QComboBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QComboBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QComboBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QComboBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QComboBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_InitPainter +func miqt_exec_callback_QComboBox_InitPainter(self *C.QComboBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QComboBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QComboBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QComboBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QComboBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QComboBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_Redirected +func miqt_exec_callback_QComboBox_Redirected(self *C.QComboBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QComboBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QComboBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QComboBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_SharedPainter +func miqt_exec_callback_QComboBox_SharedPainter(self *C.QComboBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QComboBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QComboBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QComboBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QComboBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QComboBox_FocusNextPrevChild +func miqt_exec_callback_QComboBox_FocusNextPrevChild(self *C.QComboBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QComboBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QComboBox) Delete() { - C.QComboBox_Delete(this.h) + C.QComboBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcombobox.h b/qt6/gen_qcombobox.h index 6d0f6af6..ce2a57fb 100644 --- a/qt6/gen_qcombobox.h +++ b/qt6/gen_qcombobox.h @@ -18,36 +18,88 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; +class QActionEvent; +class QByteArray; +class QCloseEvent; class QComboBox; class QCompleter; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QLineEdit; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionComboBox; +class QTabletEvent; class QValidator; class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QComboBox QComboBox; typedef struct QCompleter QCompleter; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineEdit QLineEdit; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionComboBox QStyleOptionComboBox; +typedef struct QTabletEvent QTabletEvent; typedef struct QValidator QValidator; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QComboBox* QComboBox_new(QWidget* parent); -QComboBox* QComboBox_new2(); +void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QComboBox_MetaObject(const QComboBox* self); void* QComboBox_Metacast(QComboBox* self, const char* param1); struct miqt_string QComboBox_Tr(const char* s); @@ -133,6 +185,21 @@ void QComboBox_CurrentIndexChanged(QComboBox* self, int index); void QComboBox_connect_CurrentIndexChanged(QComboBox* self, intptr_t slot); void QComboBox_CurrentTextChanged(QComboBox* self, struct miqt_string param1); void QComboBox_connect_CurrentTextChanged(QComboBox* self, intptr_t slot); +void QComboBox_FocusInEvent(QComboBox* self, QFocusEvent* e); +void QComboBox_FocusOutEvent(QComboBox* self, QFocusEvent* e); +void QComboBox_ChangeEvent(QComboBox* self, QEvent* e); +void QComboBox_ResizeEvent(QComboBox* self, QResizeEvent* e); +void QComboBox_PaintEvent(QComboBox* self, QPaintEvent* e); +void QComboBox_ShowEvent(QComboBox* self, QShowEvent* e); +void QComboBox_HideEvent(QComboBox* self, QHideEvent* e); +void QComboBox_MousePressEvent(QComboBox* self, QMouseEvent* e); +void QComboBox_MouseReleaseEvent(QComboBox* self, QMouseEvent* e); +void QComboBox_KeyPressEvent(QComboBox* self, QKeyEvent* e); +void QComboBox_KeyReleaseEvent(QComboBox* self, QKeyEvent* e); +void QComboBox_WheelEvent(QComboBox* self, QWheelEvent* e); +void QComboBox_ContextMenuEvent(QComboBox* self, QContextMenuEvent* e); +void QComboBox_InputMethodEvent(QComboBox* self, QInputMethodEvent* param1); +void QComboBox_InitStyleOption(const QComboBox* self, QStyleOptionComboBox* option); struct miqt_string QComboBox_Tr2(const char* s, const char* c); struct miqt_string QComboBox_Tr3(const char* s, const char* c, int n); int QComboBox_FindText2(const QComboBox* self, struct miqt_string text, int flags); @@ -145,7 +212,97 @@ void QComboBox_AddItem3(QComboBox* self, QIcon* icon, struct miqt_string text, Q void QComboBox_InsertItem3(QComboBox* self, int index, struct miqt_string text, QVariant* userData); void QComboBox_InsertItem4(QComboBox* self, int index, QIcon* icon, struct miqt_string text, QVariant* userData); void QComboBox_SetItemData3(QComboBox* self, int index, QVariant* value, int role); -void QComboBox_Delete(QComboBox* self); +void QComboBox_override_virtual_SetModel(void* self, intptr_t slot); +void QComboBox_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QComboBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QComboBox_virtualbase_SizeHint(const void* self); +void QComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QComboBox_virtualbase_MinimumSizeHint(const void* self); +void QComboBox_override_virtual_ShowPopup(void* self, intptr_t slot); +void QComboBox_virtualbase_ShowPopup(void* self); +void QComboBox_override_virtual_HidePopup(void* self, intptr_t slot); +void QComboBox_virtualbase_HidePopup(void* self); +void QComboBox_override_virtual_Event(void* self, intptr_t slot); +bool QComboBox_virtualbase_Event(void* self, QEvent* event); +void QComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QComboBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ChangeEvent(void* self, QEvent* e); +void QComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QComboBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QComboBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e); +void QComboBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_HideEvent(void* self, QHideEvent* e); +void QComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QComboBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QComboBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QComboBox_virtualbase_InitStyleOption(const void* self, QStyleOptionComboBox* option); +void QComboBox_override_virtual_DevType(void* self, intptr_t slot); +int QComboBox_virtualbase_DevType(const void* self); +void QComboBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QComboBox_virtualbase_SetVisible(void* self, bool visible); +void QComboBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QComboBox_virtualbase_HeightForWidth(const void* self, int param1); +void QComboBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QComboBox_virtualbase_HasHeightForWidth(const void* self); +void QComboBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QComboBox_virtualbase_PaintEngine(const void* self); +void QComboBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QComboBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QComboBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QComboBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QComboBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QComboBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QComboBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QComboBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QComboBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QComboBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QComboBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QComboBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QComboBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QComboBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QComboBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QComboBox_override_virtual_Metric(void* self, intptr_t slot); +int QComboBox_virtualbase_Metric(const void* self, int param1); +void QComboBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QComboBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QComboBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QComboBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QComboBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QComboBox_virtualbase_SharedPainter(const void* self); +void QComboBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QComboBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QComboBox_Delete(QComboBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcommandlineoption.cpp b/qt6/gen_qcommandlineoption.cpp index 2f09058b..e5dbf8ce 100644 --- a/qt6/gen_qcommandlineoption.cpp +++ b/qt6/gen_qcommandlineoption.cpp @@ -7,12 +7,13 @@ #include "gen_qcommandlineoption.h" #include "_cgo_export.h" -QCommandLineOption* QCommandLineOption_new(struct miqt_string name) { +void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QCommandLineOption(name_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names) { +void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -20,16 +21,18 @@ QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_ QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len); names_QList.push_back(names_arr_i_QString); } - return new QCommandLineOption(names_QList); + QCommandLineOption* ret = new QCommandLineOption(names_QList); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description) { +void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLineOption(name_QString, description_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description) { +void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -38,29 +41,33 @@ QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_ names_QList.push_back(names_arr_i_QString); } QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLineOption(names_QList, description_QString); + QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other) { - return new QCommandLineOption(*other); +void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption) { + QCommandLineOption* ret = new QCommandLineOption(*other); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName) { +void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - return new QCommandLineOption(name_QString, description_QString, valueName_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { +void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - return new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); + QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName) { +void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -70,10 +77,11 @@ QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_ } QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - return new QCommandLineOption(names_QList, description_QString, valueName_QString); + QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString); + *outptr_QCommandLineOption = ret; } -QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { +void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -84,7 +92,8 @@ QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_ QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - return new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); + QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); + *outptr_QCommandLineOption = ret; } void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other) { @@ -192,7 +201,11 @@ void QCommandLineOption_SetFlags(QCommandLineOption* self, int aflags) { self->setFlags(static_cast(aflags)); } -void QCommandLineOption_Delete(QCommandLineOption* self) { - delete self; +void QCommandLineOption_Delete(QCommandLineOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcommandlineoption.go b/qt6/gen_qcommandlineoption.go index a11c89b2..1a9c307a 100644 --- a/qt6/gen_qcommandlineoption.go +++ b/qt6/gen_qcommandlineoption.go @@ -21,7 +21,8 @@ const ( ) type QCommandLineOption struct { - h *C.QCommandLineOption + h *C.QCommandLineOption + isSubclass bool } func (this *QCommandLineOption) cPointer() *C.QCommandLineOption { @@ -38,6 +39,7 @@ func (this *QCommandLineOption) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCommandLineOption constructs the type using only CGO pointers. func newQCommandLineOption(h *C.QCommandLineOption) *QCommandLineOption { if h == nil { return nil @@ -45,8 +47,13 @@ func newQCommandLineOption(h *C.QCommandLineOption) *QCommandLineOption { return &QCommandLineOption{h: h} } +// UnsafeNewQCommandLineOption constructs the type using only unsafe pointers. func UnsafeNewQCommandLineOption(h unsafe.Pointer) *QCommandLineOption { - return newQCommandLineOption((*C.QCommandLineOption)(h)) + if h == nil { + return nil + } + + return &QCommandLineOption{h: (*C.QCommandLineOption)(h)} } // NewQCommandLineOption constructs a new QCommandLineOption object. @@ -55,8 +62,12 @@ func NewQCommandLineOption(name string) *QCommandLineOption { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QCommandLineOption_new(name_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new(name_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption2 constructs a new QCommandLineOption object. @@ -71,8 +82,12 @@ func NewQCommandLineOption2(names []string) *QCommandLineOption { names_CArray[i] = names_i_ms } names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)} - ret := C.QCommandLineOption_new2(names_ma) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new2(names_ma, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption3 constructs a new QCommandLineOption object. @@ -85,8 +100,12 @@ func NewQCommandLineOption3(name string, description string) *QCommandLineOption description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLineOption_new3(name_ms, description_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new3(name_ms, description_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption4 constructs a new QCommandLineOption object. @@ -105,14 +124,22 @@ func NewQCommandLineOption4(names []string, description string) *QCommandLineOpt description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLineOption_new4(names_ma, description_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new4(names_ma, description_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption5 constructs a new QCommandLineOption object. func NewQCommandLineOption5(other *QCommandLineOption) *QCommandLineOption { - ret := C.QCommandLineOption_new5(other.cPointer()) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new5(other.cPointer(), &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption6 constructs a new QCommandLineOption object. @@ -129,8 +156,12 @@ func NewQCommandLineOption6(name string, description string, valueName string) * valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - ret := C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption7 constructs a new QCommandLineOption object. @@ -151,8 +182,12 @@ func NewQCommandLineOption7(name string, description string, valueName string, d defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - ret := C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption8 constructs a new QCommandLineOption object. @@ -175,8 +210,12 @@ func NewQCommandLineOption8(names []string, description string, valueName string valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - ret := C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } // NewQCommandLineOption9 constructs a new QCommandLineOption object. @@ -203,8 +242,12 @@ func NewQCommandLineOption9(names []string, description string, valueName string defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - ret := C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms) - return newQCommandLineOption(ret) + var outptr_QCommandLineOption *C.QCommandLineOption = nil + + C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) + ret := newQCommandLineOption(outptr_QCommandLineOption) + ret.isSubclass = true + return ret } func (this *QCommandLineOption) OperatorAssign(other *QCommandLineOption) { @@ -303,7 +346,7 @@ func (this *QCommandLineOption) SetFlags(aflags QCommandLineOption__Flag) { // Delete this object from C++ memory. func (this *QCommandLineOption) Delete() { - C.QCommandLineOption_Delete(this.h) + C.QCommandLineOption_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcommandlineoption.h b/qt6/gen_qcommandlineoption.h index d8457b78..b3a122d7 100644 --- a/qt6/gen_qcommandlineoption.h +++ b/qt6/gen_qcommandlineoption.h @@ -20,15 +20,15 @@ class QCommandLineOption; typedef struct QCommandLineOption QCommandLineOption; #endif -QCommandLineOption* QCommandLineOption_new(struct miqt_string name); -QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names); -QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description); -QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description); -QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other); -QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName); -QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); -QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName); -QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); +void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); +void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other); void QCommandLineOption_Swap(QCommandLineOption* self, QCommandLineOption* other); struct miqt_array /* of struct miqt_string */ QCommandLineOption_Names(const QCommandLineOption* self); @@ -41,7 +41,7 @@ void QCommandLineOption_SetDefaultValues(QCommandLineOption* self, struct miqt_a struct miqt_array /* of struct miqt_string */ QCommandLineOption_DefaultValues(const QCommandLineOption* self); int QCommandLineOption_Flags(const QCommandLineOption* self); void QCommandLineOption_SetFlags(QCommandLineOption* self, int aflags); -void QCommandLineOption_Delete(QCommandLineOption* self); +void QCommandLineOption_Delete(QCommandLineOption* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcommandlineparser.cpp b/qt6/gen_qcommandlineparser.cpp index f465b26d..4ce7a4c2 100644 --- a/qt6/gen_qcommandlineparser.cpp +++ b/qt6/gen_qcommandlineparser.cpp @@ -9,8 +9,9 @@ #include "gen_qcommandlineparser.h" #include "_cgo_export.h" -QCommandLineParser* QCommandLineParser_new() { - return new QCommandLineParser(); +void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser) { + QCommandLineParser* ret = new QCommandLineParser(); + *outptr_QCommandLineParser = ret; } struct miqt_string QCommandLineParser_Tr(const char* sourceText) { @@ -302,7 +303,11 @@ void QCommandLineParser_ShowHelp1(QCommandLineParser* self, int exitCode) { self->showHelp(static_cast(exitCode)); } -void QCommandLineParser_Delete(QCommandLineParser* self) { - delete self; +void QCommandLineParser_Delete(QCommandLineParser* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcommandlineparser.go b/qt6/gen_qcommandlineparser.go index eecd7178..91958abb 100644 --- a/qt6/gen_qcommandlineparser.go +++ b/qt6/gen_qcommandlineparser.go @@ -28,7 +28,8 @@ const ( ) type QCommandLineParser struct { - h *C.QCommandLineParser + h *C.QCommandLineParser + isSubclass bool } func (this *QCommandLineParser) cPointer() *C.QCommandLineParser { @@ -45,6 +46,7 @@ func (this *QCommandLineParser) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCommandLineParser constructs the type using only CGO pointers. func newQCommandLineParser(h *C.QCommandLineParser) *QCommandLineParser { if h == nil { return nil @@ -52,14 +54,23 @@ func newQCommandLineParser(h *C.QCommandLineParser) *QCommandLineParser { return &QCommandLineParser{h: h} } +// UnsafeNewQCommandLineParser constructs the type using only unsafe pointers. func UnsafeNewQCommandLineParser(h unsafe.Pointer) *QCommandLineParser { - return newQCommandLineParser((*C.QCommandLineParser)(h)) + if h == nil { + return nil + } + + return &QCommandLineParser{h: (*C.QCommandLineParser)(h)} } // NewQCommandLineParser constructs a new QCommandLineParser object. func NewQCommandLineParser() *QCommandLineParser { - ret := C.QCommandLineParser_new() - return newQCommandLineParser(ret) + var outptr_QCommandLineParser *C.QCommandLineParser = nil + + C.QCommandLineParser_new(&outptr_QCommandLineParser) + ret := newQCommandLineParser(outptr_QCommandLineParser) + ret.isSubclass = true + return ret } func QCommandLineParser_Tr(sourceText string) string { @@ -335,7 +346,7 @@ func (this *QCommandLineParser) ShowHelp1(exitCode int) { // Delete this object from C++ memory. func (this *QCommandLineParser) Delete() { - C.QCommandLineParser_Delete(this.h) + C.QCommandLineParser_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcommandlineparser.h b/qt6/gen_qcommandlineparser.h index 3172a4ce..f576cfe4 100644 --- a/qt6/gen_qcommandlineparser.h +++ b/qt6/gen_qcommandlineparser.h @@ -24,7 +24,7 @@ typedef struct QCommandLineParser QCommandLineParser; typedef struct QCoreApplication QCoreApplication; #endif -QCommandLineParser* QCommandLineParser_new(); +void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser); struct miqt_string QCommandLineParser_Tr(const char* sourceText); void QCommandLineParser_SetSingleDashWordOptionMode(QCommandLineParser* self, int parsingMode); void QCommandLineParser_SetOptionsAfterPositionalArgumentsMode(QCommandLineParser* self, int mode); @@ -56,7 +56,7 @@ struct miqt_string QCommandLineParser_Tr2(const char* sourceText, const char* di struct miqt_string QCommandLineParser_Tr3(const char* sourceText, const char* disambiguation, int n); void QCommandLineParser_AddPositionalArgument3(QCommandLineParser* self, struct miqt_string name, struct miqt_string description, struct miqt_string syntax); void QCommandLineParser_ShowHelp1(QCommandLineParser* self, int exitCode); -void QCommandLineParser_Delete(QCommandLineParser* self); +void QCommandLineParser_Delete(QCommandLineParser* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcommandlinkbutton.cpp b/qt6/gen_qcommandlinkbutton.cpp index 220ec3ac..529c280c 100644 --- a/qt6/gen_qcommandlinkbutton.cpp +++ b/qt6/gen_qcommandlinkbutton.cpp @@ -1,5 +1,15 @@ +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -10,34 +20,343 @@ #include "gen_qcommandlinkbutton.h" #include "_cgo_export.h" -QCommandLinkButton* QCommandLinkButton_new(QWidget* parent) { - return new QCommandLinkButton(parent); +class MiqtVirtualQCommandLinkButton : public virtual QCommandLinkButton { +public: + + MiqtVirtualQCommandLinkButton(QWidget* parent): QCommandLinkButton(parent) {}; + MiqtVirtualQCommandLinkButton(): QCommandLinkButton() {}; + MiqtVirtualQCommandLinkButton(const QString& text): QCommandLinkButton(text) {}; + MiqtVirtualQCommandLinkButton(const QString& text, const QString& description): QCommandLinkButton(text, description) {}; + MiqtVirtualQCommandLinkButton(const QString& text, QWidget* parent): QCommandLinkButton(text, parent) {}; + MiqtVirtualQCommandLinkButton(const QString& text, const QString& description, QWidget* parent): QCommandLinkButton(text, description, parent) {}; + + virtual ~MiqtVirtualQCommandLinkButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QCommandLinkButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCommandLinkButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QCommandLinkButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QCommandLinkButton::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QCommandLinkButton_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QCommandLinkButton::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QCommandLinkButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QCommandLinkButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QCommandLinkButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionButton* option) const override { + if (handle__InitStyleOption == 0) { + QCommandLinkButton::initStyleOption(option); + return; + } + + QStyleOptionButton* sigval1 = option; + + miqt_exec_callback_QCommandLinkButton_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionButton* option) const { + + QCommandLinkButton::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QCommandLinkButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QCommandLinkButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QCommandLinkButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QCommandLinkButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QCommandLinkButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QCommandLinkButton::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QCommandLinkButton::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QCommandLinkButton::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QCommandLinkButton::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QCommandLinkButton::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QCommandLinkButton::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QCommandLinkButton::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QCommandLinkButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QCommandLinkButton::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QCommandLinkButton::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QCommandLinkButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QCommandLinkButton::hitButton(*pos); + + } + +}; + +void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(parent); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new2() { - return new QCommandLinkButton(); +void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text) { +void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCommandLinkButton(text_QString); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description) { +void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLinkButton(text_QString, description_QString); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent) { +void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QCommandLinkButton(text_QString, parent); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, parent); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent) { +void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - return new QCommandLinkButton(text_QString, description_QString, parent); + MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString, parent); + *outptr_QCommandLinkButton = ret; + *outptr_QPushButton = static_cast(ret); + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self) { @@ -113,7 +432,99 @@ struct miqt_string QCommandLinkButton_Tr3(const char* s, const char* c, int n) { return _ms; } -void QCommandLinkButton_Delete(QCommandLinkButton* self) { - delete self; +void QCommandLinkButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QCommandLinkButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_SizeHint(); +} + +void QCommandLinkButton_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__HeightForWidth = slot; +} + +int QCommandLinkButton_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QCommandLinkButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QCommandLinkButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QCommandLinkButton_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__InitStyleOption = slot; +} + +void QCommandLinkButton_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* option) { + ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_InitStyleOption(option); +} + +void QCommandLinkButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__Event = slot; +} + +bool QCommandLinkButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_Event(e); +} + +void QCommandLinkButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__PaintEvent = slot; +} + +void QCommandLinkButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QCommandLinkButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QCommandLinkButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QCommandLinkButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__FocusInEvent = slot; +} + +void QCommandLinkButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QCommandLinkButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QCommandLinkButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QCommandLinkButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QCommandLinkButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QCommandLinkButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QCommandLinkButton*)(self) )->handle__HitButton = slot; +} + +bool QCommandLinkButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQCommandLinkButton*)(self) )->virtualbase_HitButton(pos); +} + +void QCommandLinkButton_Delete(QCommandLinkButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcommandlinkbutton.go b/qt6/gen_qcommandlinkbutton.go index 07a22201..01cba3bd 100644 --- a/qt6/gen_qcommandlinkbutton.go +++ b/qt6/gen_qcommandlinkbutton.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QCommandLinkButton struct { - h *C.QCommandLinkButton + h *C.QCommandLinkButton + isSubclass bool *QPushButton } @@ -32,27 +34,53 @@ func (this *QCommandLinkButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCommandLinkButton(h *C.QCommandLinkButton) *QCommandLinkButton { +// newQCommandLinkButton constructs the type using only CGO pointers. +func newQCommandLinkButton(h *C.QCommandLinkButton, h_QPushButton *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCommandLinkButton { if h == nil { return nil } - return &QCommandLinkButton{h: h, QPushButton: UnsafeNewQPushButton(unsafe.Pointer(h))} + return &QCommandLinkButton{h: h, + QPushButton: newQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQCommandLinkButton(h unsafe.Pointer) *QCommandLinkButton { - return newQCommandLinkButton((*C.QCommandLinkButton)(h)) +// UnsafeNewQCommandLinkButton constructs the type using only unsafe pointers. +func UnsafeNewQCommandLinkButton(h unsafe.Pointer, h_QPushButton unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCommandLinkButton { + if h == nil { + return nil + } + + return &QCommandLinkButton{h: (*C.QCommandLinkButton)(h), + QPushButton: UnsafeNewQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQCommandLinkButton constructs a new QCommandLinkButton object. func NewQCommandLinkButton(parent *QWidget) *QCommandLinkButton { - ret := C.QCommandLinkButton_new(parent.cPointer()) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new(parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton2 constructs a new QCommandLinkButton object. func NewQCommandLinkButton2() *QCommandLinkButton { - ret := C.QCommandLinkButton_new2() - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new2(&outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton3 constructs a new QCommandLinkButton object. @@ -61,8 +89,17 @@ func NewQCommandLinkButton3(text string) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCommandLinkButton_new3(text_ms) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new3(text_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton4 constructs a new QCommandLinkButton object. @@ -75,8 +112,17 @@ func NewQCommandLinkButton4(text string, description string) *QCommandLinkButton description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLinkButton_new4(text_ms, description_ms) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new4(text_ms, description_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton5 constructs a new QCommandLinkButton object. @@ -85,8 +131,17 @@ func NewQCommandLinkButton5(text string, parent *QWidget) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QCommandLinkButton_new5(text_ms, parent.cPointer()) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new5(text_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQCommandLinkButton6 constructs a new QCommandLinkButton object. @@ -99,8 +154,17 @@ func NewQCommandLinkButton6(text string, description string, parent *QWidget) *Q description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer()) - return newQCommandLinkButton(ret) + var outptr_QCommandLinkButton *C.QCommandLinkButton = nil + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QCommandLinkButton) MetaObject() *QMetaObject { @@ -181,9 +245,272 @@ func QCommandLinkButton_Tr3(s string, c string, n int) string { return _ret } +func (this *QCommandLinkButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QCommandLinkButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommandLinkButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QCommandLinkButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_SizeHint +func miqt_exec_callback_QCommandLinkButton_SizeHint(self *C.QCommandLinkButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCommandLinkButton) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QCommandLinkButton_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QCommandLinkButton) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QCommandLinkButton_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_HeightForWidth +func miqt_exec_callback_QCommandLinkButton_HeightForWidth(self *C.QCommandLinkButton, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QCommandLinkButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QCommandLinkButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommandLinkButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QCommandLinkButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_MinimumSizeHint +func miqt_exec_callback_QCommandLinkButton_MinimumSizeHint(self *C.QCommandLinkButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QCommandLinkButton) callVirtualBase_InitStyleOption(option *QStyleOptionButton) { + + C.QCommandLinkButton_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QCommandLinkButton) OnInitStyleOption(slot func(super func(option *QStyleOptionButton), option *QStyleOptionButton)) { + C.QCommandLinkButton_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_InitStyleOption +func miqt_exec_callback_QCommandLinkButton_InitStyleOption(self *C.QCommandLinkButton, cb C.intptr_t, option *C.QStyleOptionButton) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionButton), option *QStyleOptionButton)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionButton(unsafe.Pointer(option), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QCommandLinkButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QCommandLinkButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QCommandLinkButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_Event +func miqt_exec_callback_QCommandLinkButton_Event(self *C.QCommandLinkButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCommandLinkButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QCommandLinkButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QCommandLinkButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_PaintEvent +func miqt_exec_callback_QCommandLinkButton_PaintEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QCommandLinkButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QCommandLinkButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_KeyPressEvent +func miqt_exec_callback_QCommandLinkButton_KeyPressEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QCommandLinkButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QCommandLinkButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_FocusInEvent +func miqt_exec_callback_QCommandLinkButton_FocusInEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QCommandLinkButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QCommandLinkButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_FocusOutEvent +func miqt_exec_callback_QCommandLinkButton_FocusOutEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QCommandLinkButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommandLinkButton) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QCommandLinkButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_MouseMoveEvent +func miqt_exec_callback_QCommandLinkButton_MouseMoveEvent(self *C.QCommandLinkButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QCommandLinkButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QCommandLinkButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QCommandLinkButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QCommandLinkButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QCommandLinkButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommandLinkButton_HitButton +func miqt_exec_callback_QCommandLinkButton_HitButton(self *C.QCommandLinkButton, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QCommandLinkButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QCommandLinkButton) Delete() { - C.QCommandLinkButton_Delete(this.h) + C.QCommandLinkButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcommandlinkbutton.h b/qt6/gen_qcommandlinkbutton.h index d646ba16..b12da3fb 100644 --- a/qt6/gen_qcommandlinkbutton.h +++ b/qt6/gen_qcommandlinkbutton.h @@ -15,25 +15,45 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; class QCommandLinkButton; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; +class QPushButton; class QSize; class QStyleOptionButton; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; typedef struct QCommandLinkButton QCommandLinkButton; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; +typedef struct QPushButton QPushButton; typedef struct QSize QSize; typedef struct QStyleOptionButton QStyleOptionButton; typedef struct QWidget QWidget; #endif -QCommandLinkButton* QCommandLinkButton_new(QWidget* parent); -QCommandLinkButton* QCommandLinkButton_new2(); -QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text); -QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description); -QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent); -QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent); +void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self); void* QCommandLinkButton_Metacast(QCommandLinkButton* self, const char* param1); struct miqt_string QCommandLinkButton_Tr(const char* s); @@ -43,9 +63,33 @@ QSize* QCommandLinkButton_SizeHint(const QCommandLinkButton* self); int QCommandLinkButton_HeightForWidth(const QCommandLinkButton* self, int param1); QSize* QCommandLinkButton_MinimumSizeHint(const QCommandLinkButton* self); void QCommandLinkButton_InitStyleOption(const QCommandLinkButton* self, QStyleOptionButton* option); +bool QCommandLinkButton_Event(QCommandLinkButton* self, QEvent* e); +void QCommandLinkButton_PaintEvent(QCommandLinkButton* self, QPaintEvent* param1); struct miqt_string QCommandLinkButton_Tr2(const char* s, const char* c); struct miqt_string QCommandLinkButton_Tr3(const char* s, const char* c, int n); -void QCommandLinkButton_Delete(QCommandLinkButton* self); +void QCommandLinkButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QCommandLinkButton_virtualbase_SizeHint(const void* self); +void QCommandLinkButton_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QCommandLinkButton_virtualbase_HeightForWidth(const void* self, int param1); +void QCommandLinkButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QCommandLinkButton_virtualbase_MinimumSizeHint(const void* self); +void QCommandLinkButton_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* option); +void QCommandLinkButton_override_virtual_Event(void* self, intptr_t slot); +bool QCommandLinkButton_virtualbase_Event(void* self, QEvent* e); +void QCommandLinkButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QCommandLinkButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QCommandLinkButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QCommandLinkButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QCommandLinkButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QCommandLinkButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QCommandLinkButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QCommandLinkButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QCommandLinkButton_Delete(QCommandLinkButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcommonstyle.cpp b/qt6/gen_qcommonstyle.cpp index 5970a5d9..ad6fb464 100644 --- a/qt6/gen_qcommonstyle.cpp +++ b/qt6/gen_qcommonstyle.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include @@ -11,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -19,8 +22,666 @@ #include "gen_qcommonstyle.h" #include "_cgo_export.h" -QCommonStyle* QCommonStyle_new() { - return new QCommonStyle(); +class MiqtVirtualQCommonStyle : public virtual QCommonStyle { +public: + + MiqtVirtualQCommonStyle(): QCommonStyle() {}; + + virtual ~MiqtVirtualQCommonStyle() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPrimitive = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w) const override { + if (handle__DrawPrimitive == 0) { + QCommonStyle::drawPrimitive(pe, opt, p, w); + return; + } + + QStyle::PrimitiveElement pe_ret = pe; + int sigval1 = static_cast(pe_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) w; + + miqt_exec_callback_QCommonStyle_DrawPrimitive(const_cast(this), handle__DrawPrimitive, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPrimitive(int pe, QStyleOption* opt, QPainter* p, QWidget* w) const { + + QCommonStyle::drawPrimitive(static_cast(pe), opt, p, w); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w) const override { + if (handle__DrawControl == 0) { + QCommonStyle::drawControl(element, opt, p, w); + return; + } + + QStyle::ControlElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) w; + + miqt_exec_callback_QCommonStyle_DrawControl(const_cast(this), handle__DrawControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawControl(int element, QStyleOption* opt, QPainter* p, QWidget* w) const { + + QCommonStyle::drawControl(static_cast(element), opt, p, w); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubElementRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subElementRect(QStyle::SubElement r, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__SubElementRect == 0) { + return QCommonStyle::subElementRect(r, opt, widget); + } + + QStyle::SubElement r_ret = r; + int sigval1 = static_cast(r_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_SubElementRect(const_cast(this), handle__SubElementRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubElementRect(int r, QStyleOption* opt, QWidget* widget) const { + + return new QRect(QCommonStyle::subElementRect(static_cast(r), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* w) const override { + if (handle__DrawComplexControl == 0) { + QCommonStyle::drawComplexControl(cc, opt, p, w); + return; + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) w; + + miqt_exec_callback_QCommonStyle_DrawComplexControl(const_cast(this), handle__DrawComplexControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawComplexControl(int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) const { + + QCommonStyle::drawComplexControl(static_cast(cc), opt, p, w); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTestComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* w) const override { + if (handle__HitTestComplexControl == 0) { + return QCommonStyle::hitTestComplexControl(cc, opt, pt, w); + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + const QPoint& pt_ret = pt; + // Cast returned reference into pointer + QPoint* sigval3 = const_cast(&pt_ret); + QWidget* sigval4 = (QWidget*) w; + + int callback_return_value = miqt_exec_callback_QCommonStyle_HitTestComplexControl(const_cast(this), handle__HitTestComplexControl, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HitTestComplexControl(int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) const { + + QStyle::SubControl _ret = QCommonStyle::hitTestComplexControl(static_cast(cc), opt, *pt, w); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubControlRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* w) const override { + if (handle__SubControlRect == 0) { + return QCommonStyle::subControlRect(cc, opt, sc, w); + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QStyle::SubControl sc_ret = sc; + int sigval3 = static_cast(sc_ret); + QWidget* sigval4 = (QWidget*) w; + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_SubControlRect(const_cast(this), handle__SubControlRect, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubControlRect(int cc, QStyleOptionComplex* opt, int sc, QWidget* w) const { + + return new QRect(QCommonStyle::subControlRect(static_cast(cc), opt, static_cast(sc), w)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeFromContents = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* widget) const override { + if (handle__SizeFromContents == 0) { + return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); + } + + QStyle::ContentsType ct_ret = ct; + int sigval1 = static_cast(ct_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + const QSize& contentsSize_ret = contentsSize; + // Cast returned reference into pointer + QSize* sigval3 = const_cast(&contentsSize_ret); + QWidget* sigval4 = (QWidget*) widget; + + QSize* callback_return_value = miqt_exec_callback_QCommonStyle_SizeFromContents(const_cast(this), handle__SizeFromContents, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeFromContents(int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) const { + + return new QSize(QCommonStyle::sizeFromContents(static_cast(ct), opt, *contentsSize, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PixelMetric = 0; + + // Subclass to allow providing a Go implementation + virtual int pixelMetric(QStyle::PixelMetric m, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__PixelMetric == 0) { + return QCommonStyle::pixelMetric(m, opt, widget); + } + + QStyle::PixelMetric m_ret = m; + int sigval1 = static_cast(m_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QCommonStyle_PixelMetric(const_cast(this), handle__PixelMetric, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PixelMetric(int m, QStyleOption* opt, QWidget* widget) const { + + return QCommonStyle::pixelMetric(static_cast(m), opt, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleHint = 0; + + // Subclass to allow providing a Go implementation + virtual int styleHint(QStyle::StyleHint sh, const QStyleOption* opt, const QWidget* w, QStyleHintReturn* shret) const override { + if (handle__StyleHint == 0) { + return QCommonStyle::styleHint(sh, opt, w, shret); + } + + QStyle::StyleHint sh_ret = sh; + int sigval1 = static_cast(sh_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) w; + QStyleHintReturn* sigval4 = shret; + + int callback_return_value = miqt_exec_callback_QCommonStyle_StyleHint(const_cast(this), handle__StyleHint, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleHint(int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) const { + + return QCommonStyle::styleHint(static_cast(sh), opt, w, shret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardIcon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__StandardIcon == 0) { + return QCommonStyle::standardIcon(standardIcon, opt, widget); + } + + QStyle::StandardPixmap standardIcon_ret = standardIcon; + int sigval1 = static_cast(standardIcon_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QIcon* callback_return_value = miqt_exec_callback_QCommonStyle_StandardIcon(const_cast(this), handle__StandardIcon, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_StandardIcon(int standardIcon, QStyleOption* opt, QWidget* widget) const { + + return new QIcon(QCommonStyle::standardIcon(static_cast(standardIcon), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap standardPixmap(QStyle::StandardPixmap sp, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__StandardPixmap == 0) { + return QCommonStyle::standardPixmap(sp, opt, widget); + } + + QStyle::StandardPixmap sp_ret = sp; + int sigval1 = static_cast(sp_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QPixmap* callback_return_value = miqt_exec_callback_QCommonStyle_StandardPixmap(const_cast(this), handle__StandardPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_StandardPixmap(int sp, QStyleOption* opt, QWidget* widget) const { + + return new QPixmap(QCommonStyle::standardPixmap(static_cast(sp), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GeneratedIconPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const override { + if (handle__GeneratedIconPixmap == 0) { + return QCommonStyle::generatedIconPixmap(iconMode, pixmap, opt); + } + + QIcon::Mode iconMode_ret = iconMode; + int sigval1 = static_cast(iconMode_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pixmap_ret); + QStyleOption* sigval3 = (QStyleOption*) opt; + + QPixmap* callback_return_value = miqt_exec_callback_QCommonStyle_GeneratedIconPixmap(const_cast(this), handle__GeneratedIconPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_GeneratedIconPixmap(int iconMode, QPixmap* pixmap, QStyleOption* opt) const { + + return new QPixmap(QCommonStyle::generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LayoutSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const override { + if (handle__LayoutSpacing == 0) { + return QCommonStyle::layoutSpacing(control1, control2, orientation, option, widget); + } + + QSizePolicy::ControlType control1_ret = control1; + int sigval1 = static_cast(control1_ret); + QSizePolicy::ControlType control2_ret = control2; + int sigval2 = static_cast(control2_ret); + Qt::Orientation orientation_ret = orientation; + int sigval3 = static_cast(orientation_ret); + QStyleOption* sigval4 = (QStyleOption*) option; + QWidget* sigval5 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QCommonStyle_LayoutSpacing(const_cast(this), handle__LayoutSpacing, sigval1, sigval2, sigval3, sigval4, sigval5); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LayoutSpacing(int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) const { + + return QCommonStyle::layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Polish = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QPalette& param1) override { + if (handle__Polish == 0) { + QCommonStyle::polish(param1); + return; + } + + QPalette& param1_ret = param1; + // Cast returned reference into pointer + QPalette* sigval1 = ¶m1_ret; + + miqt_exec_callback_QCommonStyle_Polish(this, handle__Polish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Polish(QPalette* param1) { + + QCommonStyle::polish(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithApp = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QApplication* app) override { + if (handle__PolishWithApp == 0) { + QCommonStyle::polish(app); + return; + } + + QApplication* sigval1 = app; + + miqt_exec_callback_QCommonStyle_PolishWithApp(this, handle__PolishWithApp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithApp(QApplication* app) { + + QCommonStyle::polish(app); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithWidget = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QWidget* widget) override { + if (handle__PolishWithWidget == 0) { + QCommonStyle::polish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QCommonStyle_PolishWithWidget(this, handle__PolishWithWidget, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithWidget(QWidget* widget) { + + QCommonStyle::polish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unpolish = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QWidget* widget) override { + if (handle__Unpolish == 0) { + QCommonStyle::unpolish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QCommonStyle_Unpolish(this, handle__Unpolish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unpolish(QWidget* widget) { + + QCommonStyle::unpolish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnpolishWithApplication = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QApplication* application) override { + if (handle__UnpolishWithApplication == 0) { + QCommonStyle::unpolish(application); + return; + } + + QApplication* sigval1 = application; + + miqt_exec_callback_QCommonStyle_UnpolishWithApplication(this, handle__UnpolishWithApplication, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UnpolishWithApplication(QApplication* application) { + + QCommonStyle::unpolish(application); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemTextRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemTextRect(const QFontMetrics& fm, const QRect& r, int flags, bool enabled, const QString& text) const override { + if (handle__ItemTextRect == 0) { + return QCommonStyle::itemTextRect(fm, r, flags, enabled, text); + } + + const QFontMetrics& fm_ret = fm; + // Cast returned reference into pointer + QFontMetrics* sigval1 = const_cast(&fm_ret); + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&r_ret); + int sigval3 = flags; + bool sigval4 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval5 = text_ms; + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_ItemTextRect(const_cast(this), handle__ItemTextRect, sigval1, sigval2, sigval3, sigval4, sigval5); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemTextRect(QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QRect(QCommonStyle::itemTextRect(*fm, *r, static_cast(flags), enabled, text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemPixmapRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const override { + if (handle__ItemPixmapRect == 0) { + return QCommonStyle::itemPixmapRect(r, flags, pixmap); + } + + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&r_ret); + int sigval2 = flags; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval3 = const_cast(&pixmap_ret); + + QRect* callback_return_value = miqt_exec_callback_QCommonStyle_ItemPixmapRect(const_cast(this), handle__ItemPixmapRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemPixmapRect(QRect* r, int flags, QPixmap* pixmap) const { + + return new QRect(QCommonStyle::itemPixmapRect(*r, static_cast(flags), *pixmap)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemText = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const override { + if (handle__DrawItemText == 0) { + QCommonStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = flags; + const QPalette& pal_ret = pal; + // Cast returned reference into pointer + QPalette* sigval4 = const_cast(&pal_ret); + bool sigval5 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval6 = text_ms; + QPalette::ColorRole textRole_ret = textRole; + int sigval7 = static_cast(textRole_ret); + + miqt_exec_callback_QCommonStyle_DrawItemText(const_cast(this), handle__DrawItemText, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemText(QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QCommonStyle::drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const override { + if (handle__DrawItemPixmap == 0) { + QCommonStyle::drawItemPixmap(painter, rect, alignment, pixmap); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = alignment; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval4 = const_cast(&pixmap_ret); + + miqt_exec_callback_QCommonStyle_DrawItemPixmap(const_cast(this), handle__DrawItemPixmap, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemPixmap(QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) const { + + QCommonStyle::drawItemPixmap(painter, *rect, static_cast(alignment), *pixmap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPalette = 0; + + // Subclass to allow providing a Go implementation + virtual QPalette standardPalette() const override { + if (handle__StandardPalette == 0) { + return QCommonStyle::standardPalette(); + } + + + QPalette* callback_return_value = miqt_exec_callback_QCommonStyle_StandardPalette(const_cast(this), handle__StandardPalette); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPalette* virtualbase_StandardPalette() const { + + return new QPalette(QCommonStyle::standardPalette()); + + } + +}; + +void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQCommonStyle* ret = new MiqtVirtualQCommonStyle(); + *outptr_QCommonStyle = ret; + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self) { @@ -42,57 +703,57 @@ struct miqt_string QCommonStyle_Tr(const char* s) { return _ms; } -void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p) { - self->drawPrimitive(static_cast(pe), opt, p); +void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawPrimitive(static_cast(pe), opt, p, w); } -void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p) { - self->drawControl(static_cast(element), opt, p); +void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawControl(static_cast(element), opt, p, w); } -QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt) { - return new QRect(self->subElementRect(static_cast(r), opt)); +QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget) { + return new QRect(self->subElementRect(static_cast(r), opt, widget)); } -void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p) { - self->drawComplexControl(static_cast(cc), opt, p); +void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) { + self->drawComplexControl(static_cast(cc), opt, p, w); } -int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt); +int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) { + QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, w); return static_cast(_ret); } -QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc))); +QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w) { + return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), w)); } -QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize)); +QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) { + return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, widget)); } -int QCommonStyle_PixelMetric(const QCommonStyle* self, int m) { - return self->pixelMetric(static_cast(m)); +int QCommonStyle_PixelMetric(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget) { + return self->pixelMetric(static_cast(m), opt, widget); } -int QCommonStyle_StyleHint(const QCommonStyle* self, int sh) { - return self->styleHint(static_cast(sh)); +int QCommonStyle_StyleHint(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) { + return self->styleHint(static_cast(sh), opt, w, shret); } -QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon) { - return new QIcon(self->standardIcon(static_cast(standardIcon))); +QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget) { + return new QIcon(self->standardIcon(static_cast(standardIcon), opt, widget)); } -QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp) { - return new QPixmap(self->standardPixmap(static_cast(sp))); +QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget) { + return new QPixmap(self->standardPixmap(static_cast(sp), opt, widget)); } QPixmap* QCommonStyle_GeneratedIconPixmap(const QCommonStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { return new QPixmap(self->generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); } -int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); +int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } void QCommonStyle_Polish(QCommonStyle* self, QPalette* param1) { @@ -137,80 +798,195 @@ struct miqt_string QCommonStyle_Tr3(const char* s, const char* c, int n) { return _ms; } -void QCommonStyle_DrawPrimitive4(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawPrimitive(static_cast(pe), opt, p, w); +void QCommonStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawPrimitive = slot; } -void QCommonStyle_DrawControl4(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawControl(static_cast(element), opt, p, w); +void QCommonStyle_virtualbase_DrawPrimitive(const void* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawPrimitive(pe, opt, p, w); } -QRect* QCommonStyle_SubElementRect3(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget) { - return new QRect(self->subElementRect(static_cast(r), opt, widget)); +void QCommonStyle_override_virtual_DrawControl(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawControl = slot; } -void QCommonStyle_DrawComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) { - self->drawComplexControl(static_cast(cc), opt, p, w); +void QCommonStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawControl(element, opt, p, w); } -int QCommonStyle_HitTestComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, w); - return static_cast(_ret); +void QCommonStyle_override_virtual_SubElementRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__SubElementRect = slot; } -QRect* QCommonStyle_SubControlRect4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), w)); +QRect* QCommonStyle_virtualbase_SubElementRect(const void* self, int r, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_SubElementRect(r, opt, widget); } -QSize* QCommonStyle_SizeFromContents4(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, widget)); +void QCommonStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawComplexControl = slot; } -int QCommonStyle_PixelMetric2(const QCommonStyle* self, int m, QStyleOption* opt) { - return self->pixelMetric(static_cast(m), opt); +void QCommonStyle_virtualbase_DrawComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawComplexControl(cc, opt, p, w); } -int QCommonStyle_PixelMetric3(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget) { - return self->pixelMetric(static_cast(m), opt, widget); +void QCommonStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__HitTestComplexControl = slot; } -int QCommonStyle_StyleHint2(const QCommonStyle* self, int sh, QStyleOption* opt) { - return self->styleHint(static_cast(sh), opt); +int QCommonStyle_virtualbase_HitTestComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_HitTestComplexControl(cc, opt, pt, w); } -int QCommonStyle_StyleHint3(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w) { - return self->styleHint(static_cast(sh), opt, w); +void QCommonStyle_override_virtual_SubControlRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__SubControlRect = slot; } -int QCommonStyle_StyleHint4(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) { - return self->styleHint(static_cast(sh), opt, w, shret); +QRect* QCommonStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_SubControlRect(cc, opt, sc, w); } -QIcon* QCommonStyle_StandardIcon2(const QCommonStyle* self, int standardIcon, QStyleOption* opt) { - return new QIcon(self->standardIcon(static_cast(standardIcon), opt)); +void QCommonStyle_override_virtual_SizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__SizeFromContents = slot; } -QIcon* QCommonStyle_StandardIcon3(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget) { - return new QIcon(self->standardIcon(static_cast(standardIcon), opt, widget)); +QSize* QCommonStyle_virtualbase_SizeFromContents(const void* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_SizeFromContents(ct, opt, contentsSize, widget); } -QPixmap* QCommonStyle_StandardPixmap2(const QCommonStyle* self, int sp, QStyleOption* opt) { - return new QPixmap(self->standardPixmap(static_cast(sp), opt)); +void QCommonStyle_override_virtual_PixelMetric(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__PixelMetric = slot; } -QPixmap* QCommonStyle_StandardPixmap3(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget) { - return new QPixmap(self->standardPixmap(static_cast(sp), opt, widget)); +int QCommonStyle_virtualbase_PixelMetric(const void* self, int m, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_PixelMetric(m, opt, widget); } -int QCommonStyle_LayoutSpacing4(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); +void QCommonStyle_override_virtual_StyleHint(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StyleHint = slot; } -int QCommonStyle_LayoutSpacing5(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); +int QCommonStyle_virtualbase_StyleHint(const void* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StyleHint(sh, opt, w, shret); +} + +void QCommonStyle_override_virtual_StandardIcon(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StandardIcon = slot; +} + +QIcon* QCommonStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StandardIcon(standardIcon, opt, widget); +} + +void QCommonStyle_override_virtual_StandardPixmap(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StandardPixmap = slot; +} + +QPixmap* QCommonStyle_virtualbase_StandardPixmap(const void* self, int sp, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StandardPixmap(sp, opt, widget); +} + +void QCommonStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__GeneratedIconPixmap = slot; +} + +QPixmap* QCommonStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_GeneratedIconPixmap(iconMode, pixmap, opt); +} + +void QCommonStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__LayoutSpacing = slot; +} + +int QCommonStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_LayoutSpacing(control1, control2, orientation, option, widget); +} + +void QCommonStyle_override_virtual_Polish(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__Polish = slot; +} + +void QCommonStyle_virtualbase_Polish(void* self, QPalette* param1) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_Polish(param1); +} + +void QCommonStyle_override_virtual_PolishWithApp(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__PolishWithApp = slot; +} + +void QCommonStyle_virtualbase_PolishWithApp(void* self, QApplication* app) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_PolishWithApp(app); +} + +void QCommonStyle_override_virtual_PolishWithWidget(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__PolishWithWidget = slot; +} + +void QCommonStyle_virtualbase_PolishWithWidget(void* self, QWidget* widget) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_PolishWithWidget(widget); +} + +void QCommonStyle_override_virtual_Unpolish(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__Unpolish = slot; +} + +void QCommonStyle_virtualbase_Unpolish(void* self, QWidget* widget) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_Unpolish(widget); +} + +void QCommonStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__UnpolishWithApplication = slot; +} + +void QCommonStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application) { + ( (MiqtVirtualQCommonStyle*)(self) )->virtualbase_UnpolishWithApplication(application); +} + +void QCommonStyle_override_virtual_ItemTextRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__ItemTextRect = slot; +} + +QRect* QCommonStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_ItemTextRect(fm, r, flags, enabled, text); +} + +void QCommonStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__ItemPixmapRect = slot; +} + +QRect* QCommonStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_ItemPixmapRect(r, flags, pixmap); +} + +void QCommonStyle_override_virtual_DrawItemText(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawItemText = slot; +} + +void QCommonStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawItemText(painter, rect, flags, pal, enabled, text, textRole); +} + +void QCommonStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__DrawItemPixmap = slot; +} + +void QCommonStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { + ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_DrawItemPixmap(painter, rect, alignment, pixmap); +} + +void QCommonStyle_override_virtual_StandardPalette(void* self, intptr_t slot) { + dynamic_cast( (QCommonStyle*)(self) )->handle__StandardPalette = slot; +} + +QPalette* QCommonStyle_virtualbase_StandardPalette(const void* self) { + return ( (const MiqtVirtualQCommonStyle*)(self) )->virtualbase_StandardPalette(); } -void QCommonStyle_Delete(QCommonStyle* self) { - delete self; +void QCommonStyle_Delete(QCommonStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcommonstyle.go b/qt6/gen_qcommonstyle.go index 1440b027..dc708d4e 100644 --- a/qt6/gen_qcommonstyle.go +++ b/qt6/gen_qcommonstyle.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QCommonStyle struct { - h *C.QCommonStyle + h *C.QCommonStyle + isSubclass bool *QStyle } @@ -32,21 +34,35 @@ func (this *QCommonStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCommonStyle(h *C.QCommonStyle) *QCommonStyle { +// newQCommonStyle constructs the type using only CGO pointers. +func newQCommonStyle(h *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QCommonStyle { if h == nil { return nil } - return &QCommonStyle{h: h, QStyle: UnsafeNewQStyle(unsafe.Pointer(h))} + return &QCommonStyle{h: h, + QStyle: newQStyle(h_QStyle, h_QObject)} } -func UnsafeNewQCommonStyle(h unsafe.Pointer) *QCommonStyle { - return newQCommonStyle((*C.QCommonStyle)(h)) +// UnsafeNewQCommonStyle constructs the type using only unsafe pointers. +func UnsafeNewQCommonStyle(h unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QCommonStyle { + if h == nil { + return nil + } + + return &QCommonStyle{h: (*C.QCommonStyle)(h), + QStyle: UnsafeNewQStyle(h_QStyle, h_QObject)} } // NewQCommonStyle constructs a new QCommonStyle object. func NewQCommonStyle() *QCommonStyle { - ret := C.QCommonStyle_new() - return newQCommonStyle(ret) + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QCommonStyle_new(&outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQCommonStyle(outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCommonStyle) MetaObject() *QMetaObject { @@ -68,74 +84,74 @@ func QCommonStyle_Tr(s string) string { return _ret } -func (this *QCommonStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter) { - C.QCommonStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer()) +func (this *QCommonStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QCommonStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QCommonStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter) { - C.QCommonStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer()) +func (this *QCommonStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QCommonStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QCommonStyle) SubElementRect(r QStyle__SubElement, opt *QStyleOption) *QRect { - _ret := C.QCommonStyle_SubElementRect(this.h, (C.int)(r), opt.cPointer()) +func (this *QCommonStyle) SubElementRect(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect { + _ret := C.QCommonStyle_SubElementRect(this.h, (C.int)(r), opt.cPointer(), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter) { - C.QCommonStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer()) +func (this *QCommonStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget) { + C.QCommonStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QCommonStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint) QStyle__SubControl { - return (QStyle__SubControl)(C.QCommonStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer())) +func (this *QCommonStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl { + return (QStyle__SubControl)(C.QCommonStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), w.cPointer())) } -func (this *QCommonStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl) *QRect { - _ret := C.QCommonStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc)) +func (this *QCommonStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect { + _ret := C.QCommonStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), w.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize) *QSize { - _ret := C.QCommonStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer()) +func (this *QCommonStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize { + _ret := C.QCommonStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), widget.cPointer()) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) PixelMetric(m QStyle__PixelMetric) int { - return (int)(C.QCommonStyle_PixelMetric(this.h, (C.int)(m))) +func (this *QCommonStyle) PixelMetric(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int { + return (int)(C.QCommonStyle_PixelMetric(this.h, (C.int)(m), opt.cPointer(), widget.cPointer())) } -func (this *QCommonStyle) StyleHint(sh QStyle__StyleHint) int { - return (int)(C.QCommonStyle_StyleHint(this.h, (C.int)(sh))) +func (this *QCommonStyle) StyleHint(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int { + return (int)(C.QCommonStyle_StyleHint(this.h, (C.int)(sh), opt.cPointer(), w.cPointer(), shret.cPointer())) } -func (this *QCommonStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { - _ret := C.QCommonStyle_StandardIcon(this.h, (C.int)(standardIcon)) +func (this *QCommonStyle) StandardIcon(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon { + _ret := C.QCommonStyle_StandardIcon(this.h, (C.int)(standardIcon), opt.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) StandardPixmap(sp QStyle__StandardPixmap) *QPixmap { - _ret := C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp)) - _goptr := newQPixmap(_ret) +func (this *QCommonStyle) StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + _ret := C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCommonStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { _ret := C.QCommonStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QCommonStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int { - return (int)(C.QCommonStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation))) +func (this *QCommonStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + return (int)(C.QCommonStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } func (this *QCommonStyle) Polish(param1 *QPalette) { @@ -180,102 +196,674 @@ func QCommonStyle_Tr3(s string, c string, n int) string { return _ret } -func (this *QCommonStyle) DrawPrimitive4(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QCommonStyle_DrawPrimitive4(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) +func (this *QCommonStyle) callVirtualBase_DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { + + C.QCommonStyle_virtualbase_DrawPrimitive(unsafe.Pointer(this.h), (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) + +} +func (this *QCommonStyle) OnDrawPrimitive(slot func(super func(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget), pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QCommonStyle_override_virtual_DrawPrimitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) DrawControl4(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QCommonStyle_DrawControl4(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) +//export miqt_exec_callback_QCommonStyle_DrawPrimitive +func miqt_exec_callback_QCommonStyle_DrawPrimitive(self *C.QCommonStyle, cb C.intptr_t, pe C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget), pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PrimitiveElement)(pe) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(p)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) + } -func (this *QCommonStyle) SubElementRect3(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect { - _ret := C.QCommonStyle_SubElementRect3(this.h, (C.int)(r), opt.cPointer(), widget.cPointer()) +func (this *QCommonStyle) callVirtualBase_DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { + + C.QCommonStyle_virtualbase_DrawControl(unsafe.Pointer(this.h), (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) + +} +func (this *QCommonStyle) OnDrawControl(slot func(super func(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget), element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QCommonStyle_override_virtual_DrawControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawControl +func miqt_exec_callback_QCommonStyle_DrawControl(self *C.QCommonStyle, cb C.intptr_t, element C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget), element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ControlElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(p)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QCommonStyle) callVirtualBase_SubElementRect(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect { + + _ret := C.QCommonStyle_virtualbase_SubElementRect(unsafe.Pointer(this.h), (C.int)(r), opt.cPointer(), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnSubElementRect(slot func(super func(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect, r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect) { + C.QCommonStyle_override_virtual_SubElementRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_SubElementRect +func miqt_exec_callback_QCommonStyle_SubElementRect(self *C.QCommonStyle, cb C.intptr_t, r C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect, r QStyle__SubElement, opt *QStyleOption, widget *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__SubElement)(r) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QCommonStyle) DrawComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget) { - C.QCommonStyle_DrawComplexControl4(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), w.cPointer()) +func (this *QCommonStyle) callVirtualBase_DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget) { + + C.QCommonStyle_virtualbase_DrawComplexControl(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), p.cPointer(), w.cPointer()) + } +func (this *QCommonStyle) OnDrawComplexControl(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget), cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget)) { + C.QCommonStyle_override_virtual_DrawComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawComplexControl +func miqt_exec_callback_QCommonStyle_DrawComplexControl(self *C.QCommonStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget), cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, w *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(p)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QCommonStyle) callVirtualBase_HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl { + + return (QStyle__SubControl)(C.QCommonStyle_virtualbase_HitTestComplexControl(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), pt.cPointer(), w.cPointer())) -func (this *QCommonStyle) HitTestComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl { - return (QStyle__SubControl)(C.QCommonStyle_HitTestComplexControl4(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), w.cPointer())) +} +func (this *QCommonStyle) OnHitTestComplexControl(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl, cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl) { + C.QCommonStyle_override_virtual_HitTestComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) SubControlRect4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect { - _ret := C.QCommonStyle_SubControlRect4(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), w.cPointer()) +//export miqt_exec_callback_QCommonStyle_HitTestComplexControl +func miqt_exec_callback_QCommonStyle_HitTestComplexControl(self *C.QCommonStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, pt *C.QPoint, w *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl, cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, w *QWidget) QStyle__SubControl) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := UnsafeNewQPoint(unsafe.Pointer(pt)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QCommonStyle) callVirtualBase_SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect { + + _ret := C.QCommonStyle_virtualbase_SubControlRect(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), (C.int)(sc), w.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnSubControlRect(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect) { + C.QCommonStyle_override_virtual_SubControlRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_SubControlRect +func miqt_exec_callback_QCommonStyle_SubControlRect(self *C.QCommonStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, sc C.int, w *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, w *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := (QStyle__SubControl)(sc) + + slotval4 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + } -func (this *QCommonStyle) SizeFromContents4(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize { - _ret := C.QCommonStyle_SizeFromContents4(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), widget.cPointer()) +func (this *QCommonStyle) callVirtualBase_SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize { + + _ret := C.QCommonStyle_virtualbase_SizeFromContents(unsafe.Pointer(this.h), (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), widget.cPointer()) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QCommonStyle) OnSizeFromContents(slot func(super func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize, ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize) { + C.QCommonStyle_override_virtual_SizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_SizeFromContents +func miqt_exec_callback_QCommonStyle_SizeFromContents(self *C.QCommonStyle, cb C.intptr_t, ct C.int, opt *C.QStyleOption, contentsSize *C.QSize, widget *C.QWidget) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize, ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, widget *QWidget) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ContentsType)(ct) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQSize(unsafe.Pointer(contentsSize)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() -func (this *QCommonStyle) PixelMetric2(m QStyle__PixelMetric, opt *QStyleOption) int { - return (int)(C.QCommonStyle_PixelMetric2(this.h, (C.int)(m), opt.cPointer())) } -func (this *QCommonStyle) PixelMetric3(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int { - return (int)(C.QCommonStyle_PixelMetric3(this.h, (C.int)(m), opt.cPointer(), widget.cPointer())) +func (this *QCommonStyle) callVirtualBase_PixelMetric(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int { + + return (int)(C.QCommonStyle_virtualbase_PixelMetric(unsafe.Pointer(this.h), (C.int)(m), opt.cPointer(), widget.cPointer())) + +} +func (this *QCommonStyle) OnPixelMetric(slot func(super func(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int, m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int) { + C.QCommonStyle_override_virtual_PixelMetric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) StyleHint2(sh QStyle__StyleHint, opt *QStyleOption) int { - return (int)(C.QCommonStyle_StyleHint2(this.h, (C.int)(sh), opt.cPointer())) +//export miqt_exec_callback_QCommonStyle_PixelMetric +func miqt_exec_callback_QCommonStyle_PixelMetric(self *C.QCommonStyle, cb C.intptr_t, m C.int, opt *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int, m QStyle__PixelMetric, opt *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PixelMetric)(m) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + } -func (this *QCommonStyle) StyleHint3(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget) int { - return (int)(C.QCommonStyle_StyleHint3(this.h, (C.int)(sh), opt.cPointer(), w.cPointer())) +func (this *QCommonStyle) callVirtualBase_StyleHint(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int { + + return (int)(C.QCommonStyle_virtualbase_StyleHint(unsafe.Pointer(this.h), (C.int)(sh), opt.cPointer(), w.cPointer(), shret.cPointer())) + } +func (this *QCommonStyle) OnStyleHint(slot func(super func(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int, sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int) { + C.QCommonStyle_override_virtual_StyleHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_StyleHint +func miqt_exec_callback_QCommonStyle_StyleHint(self *C.QCommonStyle, cb C.intptr_t, sh C.int, opt *C.QStyleOption, w *C.QWidget, shret *C.QStyleHintReturn) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int, sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StyleHint)(sh) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(w), nil, nil) + slotval4 := UnsafeNewQStyleHintReturn(unsafe.Pointer(shret)) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StyleHint, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) -func (this *QCommonStyle) StyleHint4(sh QStyle__StyleHint, opt *QStyleOption, w *QWidget, shret *QStyleHintReturn) int { - return (int)(C.QCommonStyle_StyleHint4(this.h, (C.int)(sh), opt.cPointer(), w.cPointer(), shret.cPointer())) } -func (this *QCommonStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, opt *QStyleOption) *QIcon { - _ret := C.QCommonStyle_StandardIcon2(this.h, (C.int)(standardIcon), opt.cPointer()) +func (this *QCommonStyle) callVirtualBase_StandardIcon(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon { + + _ret := C.QCommonStyle_virtualbase_StandardIcon(unsafe.Pointer(this.h), (C.int)(standardIcon), opt.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnStandardIcon(slot func(super func(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon) { + C.QCommonStyle_override_virtual_StandardIcon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QCommonStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon { - _ret := C.QCommonStyle_StandardIcon3(this.h, (C.int)(standardIcon), opt.cPointer(), widget.cPointer()) - _goptr := newQIcon(_ret) +//export miqt_exec_callback_QCommonStyle_StandardIcon +func miqt_exec_callback_QCommonStyle_StandardIcon(self *C.QCommonStyle, cb C.intptr_t, standardIcon C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(standardIcon) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + + _ret := C.QCommonStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(sp), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QCommonStyle) OnStandardPixmap(slot func(super func(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) { + C.QCommonStyle_override_virtual_StandardPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_StandardPixmap +func miqt_exec_callback_QCommonStyle_StandardPixmap(self *C.QCommonStyle, cb C.intptr_t, sp C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(sp) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) -func (this *QCommonStyle) StandardPixmap2(sp QStyle__StandardPixmap, opt *QStyleOption) *QPixmap { - _ret := C.QCommonStyle_StandardPixmap2(this.h, (C.int)(sp), opt.cPointer()) - _goptr := newQPixmap(_ret) + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { + + _ret := C.QCommonStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QCommonStyle) OnGeneratedIconPixmap(slot func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) { + C.QCommonStyle_override_virtual_GeneratedIconPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_GeneratedIconPixmap +func miqt_exec_callback_QCommonStyle_GeneratedIconPixmap(self *C.QCommonStyle, cb C.intptr_t, iconMode C.int, pixmap *C.QPixmap, opt *C.QStyleOption) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIcon__Mode)(iconMode) + + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval3 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_GeneratedIconPixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QCommonStyle) StandardPixmap3(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _ret := C.QCommonStyle_StandardPixmap3(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer()) - _goptr := newQPixmap(_ret) +func (this *QCommonStyle) callVirtualBase_LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + + return (int)(C.QCommonStyle_virtualbase_LayoutSpacing(unsafe.Pointer(this.h), (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) + +} +func (this *QCommonStyle) OnLayoutSpacing(slot func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) { + C.QCommonStyle_override_virtual_LayoutSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_LayoutSpacing +func miqt_exec_callback_QCommonStyle_LayoutSpacing(self *C.QCommonStyle, cb C.intptr_t, control1 C.int, control2 C.int, orientation C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QSizePolicy__ControlType)(control1) + + slotval2 := (QSizePolicy__ControlType)(control2) + + slotval3 := (Orientation)(orientation) + + slotval4 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval5 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.int)(virtualReturn) + +} + +func (this *QCommonStyle) callVirtualBase_Polish(param1 *QPalette) { + + C.QCommonStyle_virtualbase_Polish(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QCommonStyle) OnPolish(slot func(super func(param1 *QPalette), param1 *QPalette)) { + C.QCommonStyle_override_virtual_Polish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_Polish +func miqt_exec_callback_QCommonStyle_Polish(self *C.QCommonStyle, cb C.intptr_t, param1 *C.QPalette) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPalette), param1 *QPalette)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPalette(unsafe.Pointer(param1)) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_Polish, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_PolishWithApp(app *QApplication) { + + C.QCommonStyle_virtualbase_PolishWithApp(unsafe.Pointer(this.h), app.cPointer()) + +} +func (this *QCommonStyle) OnPolishWithApp(slot func(super func(app *QApplication), app *QApplication)) { + C.QCommonStyle_override_virtual_PolishWithApp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_PolishWithApp +func miqt_exec_callback_QCommonStyle_PolishWithApp(self *C.QCommonStyle, cb C.intptr_t, app *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(app *QApplication), app *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(app), nil, nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_PolishWithWidget(widget *QWidget) { + + C.QCommonStyle_virtualbase_PolishWithWidget(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QCommonStyle) OnPolishWithWidget(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QCommonStyle_override_virtual_PolishWithWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_PolishWithWidget +func miqt_exec_callback_QCommonStyle_PolishWithWidget(self *C.QCommonStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithWidget, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_Unpolish(widget *QWidget) { + + C.QCommonStyle_virtualbase_Unpolish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QCommonStyle) OnUnpolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QCommonStyle_override_virtual_Unpolish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_Unpolish +func miqt_exec_callback_QCommonStyle_Unpolish(self *C.QCommonStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_Unpolish, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_UnpolishWithApplication(application *QApplication) { + + C.QCommonStyle_virtualbase_UnpolishWithApplication(unsafe.Pointer(this.h), application.cPointer()) + +} +func (this *QCommonStyle) OnUnpolishWithApplication(slot func(super func(application *QApplication), application *QApplication)) { + C.QCommonStyle_override_virtual_UnpolishWithApplication(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_UnpolishWithApplication +func miqt_exec_callback_QCommonStyle_UnpolishWithApplication(self *C.QCommonStyle, cb C.intptr_t, application *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(application *QApplication), application *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(application), nil, nil, nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) + +} + +func (this *QCommonStyle) callVirtualBase_ItemTextRect(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QCommonStyle_virtualbase_ItemTextRect(unsafe.Pointer(this.h), fm.cPointer(), r.cPointer(), (C.int)(flags), (C.bool)(enabled), text_ms) + _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QCommonStyle) OnItemTextRect(slot func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) { + C.QCommonStyle_override_virtual_ItemTextRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_ItemTextRect +func miqt_exec_callback_QCommonStyle_ItemTextRect(self *C.QCommonStyle, cb C.intptr_t, fm *C.QFontMetrics, r *C.QRect, flags C.int, enabled C.bool, text C.struct_miqt_string) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFontMetrics(unsafe.Pointer(fm)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval3 := (int)(flags) + + slotval4 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval5 := text_ret + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_ItemTextRect, slotval1, slotval2, slotval3, slotval4, slotval5) + + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect { + + _ret := C.QCommonStyle_virtualbase_ItemPixmapRect(unsafe.Pointer(this.h), r.cPointer(), (C.int)(flags), pixmap.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommonStyle) OnItemPixmapRect(slot func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) { + C.QCommonStyle_override_virtual_ItemPixmapRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_ItemPixmapRect +func miqt_exec_callback_QCommonStyle_ItemPixmapRect(self *C.QCommonStyle, cb C.intptr_t, r *C.QRect, flags C.int, pixmap *C.QPixmap) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval2 := (int)(flags) + + slotval3 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QCommonStyle) callVirtualBase_DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QCommonStyle_virtualbase_DrawItemText(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) -func (this *QCommonStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { - return (int)(C.QCommonStyle_LayoutSpacing4(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer())) } +func (this *QCommonStyle) OnDrawItemText(slot func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) { + C.QCommonStyle_override_virtual_DrawItemText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawItemText +func miqt_exec_callback_QCommonStyle_DrawItemText(self *C.QCommonStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, flags C.int, pal *C.QPalette, enabled C.bool, text C.struct_miqt_string, textRole C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(flags) + + slotval4 := UnsafeNewQPalette(unsafe.Pointer(pal)) + slotval5 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval6 := text_ret + slotval7 := (QPalette__ColorRole)(textRole) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawItemText, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7) + +} + +func (this *QCommonStyle) callVirtualBase_DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { + + C.QCommonStyle_virtualbase_DrawItemPixmap(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer()) + +} +func (this *QCommonStyle) OnDrawItemPixmap(slot func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) { + C.QCommonStyle_override_virtual_DrawItemPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_DrawItemPixmap +func miqt_exec_callback_QCommonStyle_DrawItemPixmap(self *C.QCommonStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, alignment C.int, pixmap *C.QPixmap) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(alignment) + + slotval4 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QCommonStyle) callVirtualBase_StandardPalette() *QPalette { + + _ret := C.QCommonStyle_virtualbase_StandardPalette(unsafe.Pointer(this.h)) + _goptr := newQPalette(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QCommonStyle) OnStandardPalette(slot func(super func() *QPalette) *QPalette) { + C.QCommonStyle_override_virtual_StandardPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCommonStyle_StandardPalette +func miqt_exec_callback_QCommonStyle_StandardPalette(self *C.QCommonStyle, cb C.intptr_t) *C.QPalette { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPalette) *QPalette) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardPalette) + + return virtualReturn.cPointer() -func (this *QCommonStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { - return (int)(C.QCommonStyle_LayoutSpacing5(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } // Delete this object from C++ memory. func (this *QCommonStyle) Delete() { - C.QCommonStyle_Delete(this.h) + C.QCommonStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcommonstyle.h b/qt6/gen_qcommonstyle.h index e4865028..9e1a472d 100644 --- a/qt6/gen_qcommonstyle.h +++ b/qt6/gen_qcommonstyle.h @@ -17,14 +17,17 @@ extern "C" { #ifdef __cplusplus class QApplication; class QCommonStyle; +class QFontMetrics; class QIcon; class QMetaObject; +class QObject; class QPainter; class QPalette; class QPixmap; class QPoint; class QRect; class QSize; +class QStyle; class QStyleHintReturn; class QStyleOption; class QStyleOptionComplex; @@ -32,37 +35,40 @@ class QWidget; #else typedef struct QApplication QApplication; typedef struct QCommonStyle QCommonStyle; +typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QStyle QStyle; typedef struct QStyleHintReturn QStyleHintReturn; typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -QCommonStyle* QCommonStyle_new(); +void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self); void* QCommonStyle_Metacast(QCommonStyle* self, const char* param1); struct miqt_string QCommonStyle_Tr(const char* s); -void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p); -void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p); -QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt); -void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p); -int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt); -QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc); -QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize); -int QCommonStyle_PixelMetric(const QCommonStyle* self, int m); -int QCommonStyle_StyleHint(const QCommonStyle* self, int sh); -QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon); -QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp); +void QCommonStyle_DrawPrimitive(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QCommonStyle_DrawControl(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +QRect* QCommonStyle_SubElementRect(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget); +void QCommonStyle_DrawComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w); +int QCommonStyle_HitTestComplexControl(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w); +QRect* QCommonStyle_SubControlRect(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w); +QSize* QCommonStyle_SizeFromContents(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget); +int QCommonStyle_PixelMetric(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget); +int QCommonStyle_StyleHint(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret); +QIcon* QCommonStyle_StandardIcon(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget); +QPixmap* QCommonStyle_StandardPixmap(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget); QPixmap* QCommonStyle_GeneratedIconPixmap(const QCommonStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); -int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation); +int QCommonStyle_LayoutSpacing(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); void QCommonStyle_Polish(QCommonStyle* self, QPalette* param1); void QCommonStyle_PolishWithApp(QCommonStyle* self, QApplication* app); void QCommonStyle_PolishWithWidget(QCommonStyle* self, QWidget* widget); @@ -70,25 +76,53 @@ void QCommonStyle_Unpolish(QCommonStyle* self, QWidget* widget); void QCommonStyle_UnpolishWithApplication(QCommonStyle* self, QApplication* application); struct miqt_string QCommonStyle_Tr2(const char* s, const char* c); struct miqt_string QCommonStyle_Tr3(const char* s, const char* c, int n); -void QCommonStyle_DrawPrimitive4(const QCommonStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); -void QCommonStyle_DrawControl4(const QCommonStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); -QRect* QCommonStyle_SubElementRect3(const QCommonStyle* self, int r, QStyleOption* opt, QWidget* widget); -void QCommonStyle_DrawComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w); -int QCommonStyle_HitTestComplexControl4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w); -QRect* QCommonStyle_SubControlRect4(const QCommonStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w); -QSize* QCommonStyle_SizeFromContents4(const QCommonStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget); -int QCommonStyle_PixelMetric2(const QCommonStyle* self, int m, QStyleOption* opt); -int QCommonStyle_PixelMetric3(const QCommonStyle* self, int m, QStyleOption* opt, QWidget* widget); -int QCommonStyle_StyleHint2(const QCommonStyle* self, int sh, QStyleOption* opt); -int QCommonStyle_StyleHint3(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w); -int QCommonStyle_StyleHint4(const QCommonStyle* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret); -QIcon* QCommonStyle_StandardIcon2(const QCommonStyle* self, int standardIcon, QStyleOption* opt); -QIcon* QCommonStyle_StandardIcon3(const QCommonStyle* self, int standardIcon, QStyleOption* opt, QWidget* widget); -QPixmap* QCommonStyle_StandardPixmap2(const QCommonStyle* self, int sp, QStyleOption* opt); -QPixmap* QCommonStyle_StandardPixmap3(const QCommonStyle* self, int sp, QStyleOption* opt, QWidget* widget); -int QCommonStyle_LayoutSpacing4(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option); -int QCommonStyle_LayoutSpacing5(const QCommonStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); -void QCommonStyle_Delete(QCommonStyle* self); +void QCommonStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawPrimitive(const void* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QCommonStyle_override_virtual_DrawControl(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +void QCommonStyle_override_virtual_SubElementRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_SubElementRect(const void* self, int r, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* w); +void QCommonStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot); +int QCommonStyle_virtualbase_HitTestComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* w); +void QCommonStyle_override_virtual_SubControlRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* w); +void QCommonStyle_override_virtual_SizeFromContents(void* self, intptr_t slot); +QSize* QCommonStyle_virtualbase_SizeFromContents(const void* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* widget); +void QCommonStyle_override_virtual_PixelMetric(void* self, intptr_t slot); +int QCommonStyle_virtualbase_PixelMetric(const void* self, int m, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_StyleHint(void* self, intptr_t slot); +int QCommonStyle_virtualbase_StyleHint(const void* self, int sh, QStyleOption* opt, QWidget* w, QStyleHintReturn* shret); +void QCommonStyle_override_virtual_StandardIcon(void* self, intptr_t slot); +QIcon* QCommonStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_StandardPixmap(void* self, intptr_t slot); +QPixmap* QCommonStyle_virtualbase_StandardPixmap(const void* self, int sp, QStyleOption* opt, QWidget* widget); +void QCommonStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot); +QPixmap* QCommonStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); +void QCommonStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot); +int QCommonStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +void QCommonStyle_override_virtual_Polish(void* self, intptr_t slot); +void QCommonStyle_virtualbase_Polish(void* self, QPalette* param1); +void QCommonStyle_override_virtual_PolishWithApp(void* self, intptr_t slot); +void QCommonStyle_virtualbase_PolishWithApp(void* self, QApplication* app); +void QCommonStyle_override_virtual_PolishWithWidget(void* self, intptr_t slot); +void QCommonStyle_virtualbase_PolishWithWidget(void* self, QWidget* widget); +void QCommonStyle_override_virtual_Unpolish(void* self, intptr_t slot); +void QCommonStyle_virtualbase_Unpolish(void* self, QWidget* widget); +void QCommonStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot); +void QCommonStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application); +void QCommonStyle_override_virtual_ItemTextRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); +void QCommonStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot); +QRect* QCommonStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap); +void QCommonStyle_override_virtual_DrawItemText(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); +void QCommonStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot); +void QCommonStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); +void QCommonStyle_override_virtual_StandardPalette(void* self, intptr_t slot); +QPalette* QCommonStyle_virtualbase_StandardPalette(const void* self); +void QCommonStyle_Delete(QCommonStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcompare.cpp b/qt6/gen_qcompare.cpp index 278e7786..c3b34575 100644 --- a/qt6/gen_qcompare.cpp +++ b/qt6/gen_qcompare.cpp @@ -3,11 +3,16 @@ #include "gen_qcompare.h" #include "_cgo_export.h" -QPartialOrdering* QPartialOrdering_new(QPartialOrdering* param1) { - return new QPartialOrdering(*param1); +void QPartialOrdering_new(QPartialOrdering* param1, QPartialOrdering** outptr_QPartialOrdering) { + QPartialOrdering* ret = new QPartialOrdering(*param1); + *outptr_QPartialOrdering = ret; } -void QPartialOrdering_Delete(QPartialOrdering* self) { - delete self; +void QPartialOrdering_Delete(QPartialOrdering* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcompare.go b/qt6/gen_qcompare.go index dfc37e3f..5348d938 100644 --- a/qt6/gen_qcompare.go +++ b/qt6/gen_qcompare.go @@ -29,7 +29,8 @@ const ( ) type QPartialOrdering struct { - h *C.QPartialOrdering + h *C.QPartialOrdering + isSubclass bool } func (this *QPartialOrdering) cPointer() *C.QPartialOrdering { @@ -46,6 +47,7 @@ func (this *QPartialOrdering) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPartialOrdering constructs the type using only CGO pointers. func newQPartialOrdering(h *C.QPartialOrdering) *QPartialOrdering { if h == nil { return nil @@ -53,19 +55,28 @@ func newQPartialOrdering(h *C.QPartialOrdering) *QPartialOrdering { return &QPartialOrdering{h: h} } +// UnsafeNewQPartialOrdering constructs the type using only unsafe pointers. func UnsafeNewQPartialOrdering(h unsafe.Pointer) *QPartialOrdering { - return newQPartialOrdering((*C.QPartialOrdering)(h)) + if h == nil { + return nil + } + + return &QPartialOrdering{h: (*C.QPartialOrdering)(h)} } // NewQPartialOrdering constructs a new QPartialOrdering object. func NewQPartialOrdering(param1 *QPartialOrdering) *QPartialOrdering { - ret := C.QPartialOrdering_new(param1.cPointer()) - return newQPartialOrdering(ret) + var outptr_QPartialOrdering *C.QPartialOrdering = nil + + C.QPartialOrdering_new(param1.cPointer(), &outptr_QPartialOrdering) + ret := newQPartialOrdering(outptr_QPartialOrdering) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPartialOrdering) Delete() { - C.QPartialOrdering_Delete(this.h) + C.QPartialOrdering_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcompare.h b/qt6/gen_qcompare.h index f37cd77d..c88564ee 100644 --- a/qt6/gen_qcompare.h +++ b/qt6/gen_qcompare.h @@ -20,8 +20,8 @@ class QPartialOrdering; typedef struct QPartialOrdering QPartialOrdering; #endif -QPartialOrdering* QPartialOrdering_new(QPartialOrdering* param1); -void QPartialOrdering_Delete(QPartialOrdering* self); +void QPartialOrdering_new(QPartialOrdering* param1, QPartialOrdering** outptr_QPartialOrdering); +void QPartialOrdering_Delete(QPartialOrdering* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcompleter.cpp b/qt6/gen_qcompleter.cpp index 7df13958..2c722dba 100644 --- a/qt6/gen_qcompleter.cpp +++ b/qt6/gen_qcompleter.cpp @@ -1,7 +1,10 @@ #include #include +#include #include +#include #include +#include #include #include #include @@ -9,20 +12,297 @@ #include #include #include +#include #include #include #include "gen_qcompleter.h" #include "_cgo_export.h" -QCompleter* QCompleter_new() { - return new QCompleter(); +class MiqtVirtualQCompleter : public virtual QCompleter { +public: + + MiqtVirtualQCompleter(): QCompleter() {}; + MiqtVirtualQCompleter(QAbstractItemModel* model): QCompleter(model) {}; + MiqtVirtualQCompleter(const QStringList& completions): QCompleter(completions) {}; + MiqtVirtualQCompleter(QObject* parent): QCompleter(parent) {}; + MiqtVirtualQCompleter(QAbstractItemModel* model, QObject* parent): QCompleter(model, parent) {}; + MiqtVirtualQCompleter(const QStringList& completions, QObject* parent): QCompleter(completions, parent) {}; + + virtual ~MiqtVirtualQCompleter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__PathFromIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QString pathFromIndex(const QModelIndex& index) const override { + if (handle__PathFromIndex == 0) { + return QCompleter::pathFromIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QCompleter_PathFromIndex(const_cast(this), handle__PathFromIndex, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_PathFromIndex(QModelIndex* index) const { + + QString _ret = QCompleter::pathFromIndex(*index); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SplitPath = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList splitPath(const QString& path) const override { + if (handle__SplitPath == 0) { + return QCompleter::splitPath(path); + } + + const QString path_ret = path; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray path_b = path_ret.toUtf8(); + struct miqt_string path_ms; + path_ms.len = path_b.length(); + path_ms.data = static_cast(malloc(path_ms.len)); + memcpy(path_ms.data, path_b.data(), path_ms.len); + struct miqt_string sigval1 = path_ms; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QCompleter_SplitPath(const_cast(this), handle__SplitPath, sigval1); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_SplitPath(struct miqt_string path) const { + QString path_QString = QString::fromUtf8(path.data, path.len); + + QStringList _ret = QCompleter::splitPath(path_QString); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* o, QEvent* e) override { + if (handle__EventFilter == 0) { + return QCompleter::eventFilter(o, e); + } + + QObject* sigval1 = o; + QEvent* sigval2 = e; + + bool callback_return_value = miqt_exec_callback_QCompleter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* o, QEvent* e) { + + return QCompleter::eventFilter(o, e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QCompleter::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QCompleter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QCompleter::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QCompleter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QCompleter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QCompleter::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QCompleter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QCompleter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QCompleter::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QCompleter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCompleter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QCompleter::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QCompleter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCompleter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QCompleter::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QCompleter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCompleter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QCompleter::disconnectNotify(*signal); + + } + +}; + +void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new2(QAbstractItemModel* model) { - return new QCompleter(model); +void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions) { +void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -30,18 +310,24 @@ QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ compl QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - return new QCompleter(completions_QList); + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new4(QObject* parent) { - return new QCompleter(parent); +void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(parent); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent) { - return new QCompleter(model, parent); +void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model, parent); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } -QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent) { +void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -49,7 +335,9 @@ QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ compl QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - return new QCompleter(completions_QList, parent); + MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList, parent); + *outptr_QCompleter = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QCompleter_MetaObject(const QCompleter* self) { @@ -252,7 +540,7 @@ void QCompleter_Activated(QCompleter* self, struct miqt_string text) { } void QCompleter_connect_Activated(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QString& text) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -270,7 +558,7 @@ void QCompleter_ActivatedWithIndex(QCompleter* self, QModelIndex* index) { } void QCompleter_connect_ActivatedWithIndex(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QModelIndex& index) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::activated), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -284,7 +572,7 @@ void QCompleter_Highlighted(QCompleter* self, struct miqt_string text) { } void QCompleter_connect_Highlighted(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QString& text) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -302,7 +590,7 @@ void QCompleter_HighlightedWithIndex(QCompleter* self, QModelIndex* index) { } void QCompleter_connect_HighlightedWithIndex(QCompleter* self, intptr_t slot) { - QCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QModelIndex& index) { + MiqtVirtualQCompleter::connect(self, static_cast(&QCompleter::highlighted), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -336,7 +624,83 @@ void QCompleter_Complete1(QCompleter* self, QRect* rect) { self->complete(*rect); } -void QCompleter_Delete(QCompleter* self) { - delete self; +void QCompleter_override_virtual_PathFromIndex(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__PathFromIndex = slot; +} + +struct miqt_string QCompleter_virtualbase_PathFromIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQCompleter*)(self) )->virtualbase_PathFromIndex(index); +} + +void QCompleter_override_virtual_SplitPath(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__SplitPath = slot; +} + +struct miqt_array /* of struct miqt_string */ QCompleter_virtualbase_SplitPath(const void* self, struct miqt_string path) { + return ( (const MiqtVirtualQCompleter*)(self) )->virtualbase_SplitPath(path); +} + +void QCompleter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__EventFilter = slot; +} + +bool QCompleter_virtualbase_EventFilter(void* self, QObject* o, QEvent* e) { + return ( (MiqtVirtualQCompleter*)(self) )->virtualbase_EventFilter(o, e); +} + +void QCompleter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__Event = slot; +} + +bool QCompleter_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQCompleter*)(self) )->virtualbase_Event(param1); +} + +void QCompleter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__TimerEvent = slot; +} + +void QCompleter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_TimerEvent(event); +} + +void QCompleter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__ChildEvent = slot; +} + +void QCompleter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_ChildEvent(event); +} + +void QCompleter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__CustomEvent = slot; +} + +void QCompleter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_CustomEvent(event); +} + +void QCompleter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__ConnectNotify = slot; +} + +void QCompleter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QCompleter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCompleter*)(self) )->handle__DisconnectNotify = slot; +} + +void QCompleter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCompleter*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QCompleter_Delete(QCompleter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcompleter.go b/qt6/gen_qcompleter.go index 0e997e6b..daadef6d 100644 --- a/qt6/gen_qcompleter.go +++ b/qt6/gen_qcompleter.go @@ -31,7 +31,8 @@ const ( ) type QCompleter struct { - h *C.QCompleter + h *C.QCompleter + isSubclass bool *QObject } @@ -49,27 +50,45 @@ func (this *QCompleter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCompleter(h *C.QCompleter) *QCompleter { +// newQCompleter constructs the type using only CGO pointers. +func newQCompleter(h *C.QCompleter, h_QObject *C.QObject) *QCompleter { if h == nil { return nil } - return &QCompleter{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QCompleter{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQCompleter(h unsafe.Pointer) *QCompleter { - return newQCompleter((*C.QCompleter)(h)) +// UnsafeNewQCompleter constructs the type using only unsafe pointers. +func UnsafeNewQCompleter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCompleter { + if h == nil { + return nil + } + + return &QCompleter{h: (*C.QCompleter)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQCompleter constructs a new QCompleter object. func NewQCompleter() *QCompleter { - ret := C.QCompleter_new() - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new(&outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter2 constructs a new QCompleter object. func NewQCompleter2(model *QAbstractItemModel) *QCompleter { - ret := C.QCompleter_new2(model.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new2(model.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter3 constructs a new QCompleter object. @@ -84,20 +103,35 @@ func NewQCompleter3(completions []string) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - ret := C.QCompleter_new3(completions_ma) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new3(completions_ma, &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter4 constructs a new QCompleter object. func NewQCompleter4(parent *QObject) *QCompleter { - ret := C.QCompleter_new4(parent.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new4(parent.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter5 constructs a new QCompleter object. func NewQCompleter5(model *QAbstractItemModel, parent *QObject) *QCompleter { - ret := C.QCompleter_new5(model.cPointer(), parent.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new5(model.cPointer(), parent.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCompleter6 constructs a new QCompleter object. @@ -112,8 +146,13 @@ func NewQCompleter6(completions []string, parent *QObject) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - ret := C.QCompleter_new6(completions_ma, parent.cPointer()) - return newQCompleter(ret) + var outptr_QCompleter *C.QCompleter = nil + var outptr_QObject *C.QObject = nil + + C.QCompleter_new6(completions_ma, parent.cPointer(), &outptr_QCompleter, &outptr_QObject) + ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCompleter) MetaObject() *QMetaObject { @@ -140,7 +179,7 @@ func (this *QCompleter) SetWidget(widget *QWidget) { } func (this *QCompleter) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QCompleter_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QCompleter_Widget(this.h)), nil, nil) } func (this *QCompleter) SetModel(c *QAbstractItemModel) { @@ -148,7 +187,7 @@ func (this *QCompleter) SetModel(c *QAbstractItemModel) { } func (this *QCompleter) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_Model(this.h)), nil) } func (this *QCompleter) SetCompletionMode(mode QCompleter__CompletionMode) { @@ -168,7 +207,7 @@ func (this *QCompleter) FilterMode() MatchFlag { } func (this *QCompleter) Popup() *QAbstractItemView { - return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QCompleter_Popup(this.h))) + return UnsafeNewQAbstractItemView(unsafe.Pointer(C.QCompleter_Popup(this.h)), nil, nil, nil, nil, nil) } func (this *QCompleter) SetPopup(popup *QAbstractItemView) { @@ -246,7 +285,7 @@ func (this *QCompleter) CurrentCompletion() string { } func (this *QCompleter) CompletionModel() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_CompletionModel(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QCompleter_CompletionModel(this.h)), nil) } func (this *QCompleter) CompletionPrefix() string { @@ -416,9 +455,257 @@ func (this *QCompleter) Complete1(rect *QRect) { C.QCompleter_Complete1(this.h, rect.cPointer()) } +func (this *QCompleter) callVirtualBase_PathFromIndex(index *QModelIndex) string { + + var _ms C.struct_miqt_string = C.QCompleter_virtualbase_PathFromIndex(unsafe.Pointer(this.h), index.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QCompleter) OnPathFromIndex(slot func(super func(index *QModelIndex) string, index *QModelIndex) string) { + C.QCompleter_override_virtual_PathFromIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_PathFromIndex +func miqt_exec_callback_QCompleter_PathFromIndex(self *C.QCompleter, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) string, index *QModelIndex) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_PathFromIndex, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QCompleter) callVirtualBase_SplitPath(path string) []string { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + + var _ma C.struct_miqt_array = C.QCompleter_virtualbase_SplitPath(unsafe.Pointer(this.h), path_ms) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QCompleter) OnSplitPath(slot func(super func(path string) []string, path string) []string) { + C.QCompleter_override_virtual_SplitPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_SplitPath +func miqt_exec_callback_QCompleter_SplitPath(self *C.QCompleter, cb C.intptr_t, path C.struct_miqt_string) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path string) []string, path string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var path_ms C.struct_miqt_string = path + path_ret := C.GoStringN(path_ms.data, C.int(int64(path_ms.len))) + C.free(unsafe.Pointer(path_ms.data)) + slotval1 := path_ret + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_SplitPath, slotval1) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QCompleter) callVirtualBase_EventFilter(o *QObject, e *QEvent) bool { + + return (bool)(C.QCompleter_virtualbase_EventFilter(unsafe.Pointer(this.h), o.cPointer(), e.cPointer())) + +} +func (this *QCompleter) OnEventFilter(slot func(super func(o *QObject, e *QEvent) bool, o *QObject, e *QEvent) bool) { + C.QCompleter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_EventFilter +func miqt_exec_callback_QCompleter_EventFilter(self *C.QCompleter, cb C.intptr_t, o *C.QObject, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(o *QObject, e *QEvent) bool, o *QObject, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(o)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCompleter) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QCompleter_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QCompleter) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QCompleter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_Event +func miqt_exec_callback_QCompleter_Event(self *C.QCompleter, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QCompleter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCompleter) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QCompleter_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCompleter) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QCompleter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_TimerEvent +func miqt_exec_callback_QCompleter_TimerEvent(self *C.QCompleter, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QCompleter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QCompleter) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QCompleter_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCompleter) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QCompleter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_ChildEvent +func miqt_exec_callback_QCompleter_ChildEvent(self *C.QCompleter, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QCompleter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QCompleter) callVirtualBase_CustomEvent(event *QEvent) { + + C.QCompleter_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCompleter) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCompleter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_CustomEvent +func miqt_exec_callback_QCompleter_CustomEvent(self *C.QCompleter, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCompleter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QCompleter) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QCompleter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCompleter) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCompleter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_ConnectNotify +func miqt_exec_callback_QCompleter_ConnectNotify(self *C.QCompleter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCompleter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QCompleter) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QCompleter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCompleter) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCompleter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCompleter_DisconnectNotify +func miqt_exec_callback_QCompleter_DisconnectNotify(self *C.QCompleter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCompleter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QCompleter) Delete() { - C.QCompleter_Delete(this.h) + C.QCompleter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcompleter.h b/qt6/gen_qcompleter.h index b878db8d..9c35db8d 100644 --- a/qt6/gen_qcompleter.h +++ b/qt6/gen_qcompleter.h @@ -17,29 +17,37 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractItemView; +class QChildEvent; class QCompleter; +class QEvent; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; class QRect; +class QTimerEvent; class QWidget; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QChildEvent QChildEvent; typedef struct QCompleter QCompleter; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QRect QRect; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QCompleter* QCompleter_new(); -QCompleter* QCompleter_new2(QAbstractItemModel* model); -QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions); -QCompleter* QCompleter_new4(QObject* parent); -QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent); -QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent); +void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); QMetaObject* QCompleter_MetaObject(const QCompleter* self); void* QCompleter_Metacast(QCompleter* self, const char* param1); struct miqt_string QCompleter_Tr(const char* s); @@ -76,6 +84,8 @@ void QCompleter_Complete(QCompleter* self); void QCompleter_SetWrapAround(QCompleter* self, bool wrap); struct miqt_string QCompleter_PathFromIndex(const QCompleter* self, QModelIndex* index); struct miqt_array /* of struct miqt_string */ QCompleter_SplitPath(const QCompleter* self, struct miqt_string path); +bool QCompleter_EventFilter(QCompleter* self, QObject* o, QEvent* e); +bool QCompleter_Event(QCompleter* self, QEvent* param1); void QCompleter_Activated(QCompleter* self, struct miqt_string text); void QCompleter_connect_Activated(QCompleter* self, intptr_t slot); void QCompleter_ActivatedWithIndex(QCompleter* self, QModelIndex* index); @@ -87,7 +97,25 @@ void QCompleter_connect_HighlightedWithIndex(QCompleter* self, intptr_t slot); struct miqt_string QCompleter_Tr2(const char* s, const char* c); struct miqt_string QCompleter_Tr3(const char* s, const char* c, int n); void QCompleter_Complete1(QCompleter* self, QRect* rect); -void QCompleter_Delete(QCompleter* self); +void QCompleter_override_virtual_PathFromIndex(void* self, intptr_t slot); +struct miqt_string QCompleter_virtualbase_PathFromIndex(const void* self, QModelIndex* index); +void QCompleter_override_virtual_SplitPath(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QCompleter_virtualbase_SplitPath(const void* self, struct miqt_string path); +void QCompleter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCompleter_virtualbase_EventFilter(void* self, QObject* o, QEvent* e); +void QCompleter_override_virtual_Event(void* self, intptr_t slot); +bool QCompleter_virtualbase_Event(void* self, QEvent* param1); +void QCompleter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCompleter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QCompleter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QCompleter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QCompleter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QCompleter_virtualbase_CustomEvent(void* self, QEvent* event); +void QCompleter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QCompleter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QCompleter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QCompleter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QCompleter_Delete(QCompleter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qconcatenatetablesproxymodel.cpp b/qt6/gen_qconcatenatetablesproxymodel.cpp index 30c71167..4f3cc6ba 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.cpp +++ b/qt6/gen_qconcatenatetablesproxymodel.cpp @@ -1,10 +1,12 @@ #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -15,12 +17,1111 @@ #include "gen_qconcatenatetablesproxymodel.h" #include "_cgo_export.h" -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new() { - return new QConcatenateTablesProxyModel(); +class MiqtVirtualQConcatenateTablesProxyModel : public virtual QConcatenateTablesProxyModel { +public: + + MiqtVirtualQConcatenateTablesProxyModel(): QConcatenateTablesProxyModel() {}; + MiqtVirtualQConcatenateTablesProxyModel(QObject* parent): QConcatenateTablesProxyModel(parent) {}; + + virtual ~MiqtVirtualQConcatenateTablesProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QConcatenateTablesProxyModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QConcatenateTablesProxyModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QConcatenateTablesProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QConcatenateTablesProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& proxyIndex) const override { + if (handle__ItemData == 0) { + return QConcatenateTablesProxyModel::itemData(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* proxyIndex) const { + + QMap _ret = QConcatenateTablesProxyModel::itemData(*proxyIndex); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QConcatenateTablesProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QConcatenateTablesProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QConcatenateTablesProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QConcatenateTablesProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QConcatenateTablesProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QConcatenateTablesProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& index) const override { + if (handle__Parent == 0) { + return QConcatenateTablesProxyModel::parent(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* index) const { + + return new QModelIndex(QConcatenateTablesProxyModel::parent(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QConcatenateTablesProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QConcatenateTablesProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QConcatenateTablesProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QConcatenateTablesProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QConcatenateTablesProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QConcatenateTablesProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QConcatenateTablesProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QConcatenateTablesProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QConcatenateTablesProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QConcatenateTablesProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QConcatenateTablesProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QConcatenateTablesProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QConcatenateTablesProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QConcatenateTablesProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QConcatenateTablesProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QConcatenateTablesProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QConcatenateTablesProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QConcatenateTablesProxyModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QConcatenateTablesProxyModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QConcatenateTablesProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QConcatenateTablesProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QConcatenateTablesProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QConcatenateTablesProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QConcatenateTablesProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QConcatenateTablesProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QConcatenateTablesProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QConcatenateTablesProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QConcatenateTablesProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QConcatenateTablesProxyModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QConcatenateTablesProxyModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QConcatenateTablesProxyModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QConcatenateTablesProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QConcatenateTablesProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QConcatenateTablesProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QConcatenateTablesProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QConcatenateTablesProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QConcatenateTablesProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QConcatenateTablesProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QConcatenateTablesProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QConcatenateTablesProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QConcatenateTablesProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QConcatenateTablesProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QConcatenateTablesProxyModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QConcatenateTablesProxyModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QConcatenateTablesProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QConcatenateTablesProxyModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MultiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(const QModelIndex& index, QModelRoleDataSpan roleDataSpan) const override { + if (handle__MultiData == 0) { + QConcatenateTablesProxyModel::multiData(index, roleDataSpan); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QModelRoleDataSpan* sigval2 = new QModelRoleDataSpan(roleDataSpan); + + miqt_exec_callback_QConcatenateTablesProxyModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QConcatenateTablesProxyModel::multiData(*index, *roleDataSpan); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QConcatenateTablesProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QConcatenateTablesProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QConcatenateTablesProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QConcatenateTablesProxyModel::revert(); + return; + } + + + miqt_exec_callback_QConcatenateTablesProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QConcatenateTablesProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetInternalData = 0; + + // Subclass to allow providing a Go implementation + virtual void resetInternalData() override { + if (handle__ResetInternalData == 0) { + QConcatenateTablesProxyModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QConcatenateTablesProxyModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QConcatenateTablesProxyModel::resetInternalData(); + + } + +}; + +void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(); + *outptr_QConcatenateTablesProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent) { - return new QConcatenateTablesProxyModel(parent); +void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(parent); + *outptr_QConcatenateTablesProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self) { @@ -71,12 +1172,12 @@ QModelIndex* QConcatenateTablesProxyModel_MapToSource(const QConcatenateTablesPr return new QModelIndex(self->mapToSource(*proxyIndex)); } -QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_ItemData(const QConcatenateTablesProxyModel* self, QModelIndex* proxyIndex) { @@ -112,24 +1213,24 @@ int QConcatenateTablesProxyModel_Flags(const QConcatenateTablesProxyModel* self, return static_cast(_ret); } -QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QConcatenateTablesProxyModel_Parent(const QConcatenateTablesProxyModel* self, QModelIndex* index) { return new QModelIndex(self->parent(*index)); } -int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self) { - return self->rowCount(); +int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self) { - return self->columnCount(); +int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_MimeTypes(const QConcatenateTablesProxyModel* self) { @@ -196,31 +1297,307 @@ struct miqt_string QConcatenateTablesProxyModel_Tr3(const char* s, const char* c return _ms; } -QVariant* QConcatenateTablesProxyModel_Data2(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +void QConcatenateTablesProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Data = slot; } -bool QConcatenateTablesProxyModel_SetData3(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +QVariant* QConcatenateTablesProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Data(index, role); } -QModelIndex* QConcatenateTablesProxyModel_Index3(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +void QConcatenateTablesProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SetData = slot; } -int QConcatenateTablesProxyModel_RowCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +bool QConcatenateTablesProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SetData(index, value, role); } -QVariant* QConcatenateTablesProxyModel_HeaderData3(const QConcatenateTablesProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QConcatenateTablesProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__ItemData = slot; } -int QConcatenateTablesProxyModel_ColumnCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_virtualbase_ItemData(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_ItemData(proxyIndex); +} + +void QConcatenateTablesProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QConcatenateTablesProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Flags = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QConcatenateTablesProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Parent(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Parent(index); } -void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self) { - delete self; +void QConcatenateTablesProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RowCount = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RowCount(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QConcatenateTablesProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QConcatenateTablesProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__ColumnCount = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QConcatenateTablesProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QConcatenateTablesProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QConcatenateTablesProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QConcatenateTablesProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Span(index); +} + +void QConcatenateTablesProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QConcatenateTablesProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QConcatenateTablesProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__ClearItemData = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QConcatenateTablesProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QConcatenateTablesProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QConcatenateTablesProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QConcatenateTablesProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QConcatenateTablesProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QConcatenateTablesProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QConcatenateTablesProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QConcatenateTablesProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Sort = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QConcatenateTablesProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QConcatenateTablesProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QConcatenateTablesProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QConcatenateTablesProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_RoleNames(); +} + +void QConcatenateTablesProxyModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__MultiData = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QConcatenateTablesProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Submit = slot; +} + +bool QConcatenateTablesProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Submit(); +} + +void QConcatenateTablesProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__Revert = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_Revert(); +} + +void QConcatenateTablesProxyModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QConcatenateTablesProxyModel*)(self) )->handle__ResetInternalData = slot; +} + +void QConcatenateTablesProxyModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQConcatenateTablesProxyModel*)(self) )->virtualbase_ResetInternalData(); +} + +void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qconcatenatetablesproxymodel.go b/qt6/gen_qconcatenatetablesproxymodel.go index c3261ebc..6704b8ac 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.go +++ b/qt6/gen_qconcatenatetablesproxymodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QConcatenateTablesProxyModel struct { - h *C.QConcatenateTablesProxyModel + h *C.QConcatenateTablesProxyModel + isSubclass bool *QAbstractItemModel } @@ -32,27 +34,47 @@ func (this *QConcatenateTablesProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel) *QConcatenateTablesProxyModel { +// newQConcatenateTablesProxyModel constructs the type using only CGO pointers. +func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QConcatenateTablesProxyModel { if h == nil { return nil } - return &QConcatenateTablesProxyModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QConcatenateTablesProxyModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer) *QConcatenateTablesProxyModel { - return newQConcatenateTablesProxyModel((*C.QConcatenateTablesProxyModel)(h)) +// UnsafeNewQConcatenateTablesProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QConcatenateTablesProxyModel { + if h == nil { + return nil + } + + return &QConcatenateTablesProxyModel{h: (*C.QConcatenateTablesProxyModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQConcatenateTablesProxyModel constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel() *QConcatenateTablesProxyModel { - ret := C.QConcatenateTablesProxyModel_new() - return newQConcatenateTablesProxyModel(ret) + var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QConcatenateTablesProxyModel_new(&outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQConcatenateTablesProxyModel2 constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel2(parent *QObject) *QConcatenateTablesProxyModel { - ret := C.QConcatenateTablesProxyModel_new2(parent.cPointer()) - return newQConcatenateTablesProxyModel(ret) + var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QConcatenateTablesProxyModel_new2(parent.cPointer(), &outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QConcatenateTablesProxyModel) MetaObject() *QMetaObject { @@ -79,7 +101,7 @@ func (this *QConcatenateTablesProxyModel) SourceModels() []*QAbstractItemModel { _ret := make([]*QAbstractItemModel, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractItemModel)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractItemModel(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractItemModel(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -106,15 +128,15 @@ func (this *QConcatenateTablesProxyModel) MapToSource(proxyIndex *QModelIndex) * return _goptr } -func (this *QConcatenateTablesProxyModel) Data(index *QModelIndex) *QVariant { - _ret := C.QConcatenateTablesProxyModel_Data(this.h, index.cPointer()) +func (this *QConcatenateTablesProxyModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QConcatenateTablesProxyModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QConcatenateTablesProxyModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QConcatenateTablesProxyModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QConcatenateTablesProxyModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QConcatenateTablesProxyModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QConcatenateTablesProxyModel) ItemData(proxyIndex *QModelIndex) map[int]QVariant { @@ -158,8 +180,8 @@ func (this *QConcatenateTablesProxyModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QConcatenateTablesProxyModel_Flags(this.h, index.cPointer())) } -func (this *QConcatenateTablesProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QConcatenateTablesProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QConcatenateTablesProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QConcatenateTablesProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -172,19 +194,19 @@ func (this *QConcatenateTablesProxyModel) Parent(index *QModelIndex) *QModelInde return _goptr } -func (this *QConcatenateTablesProxyModel) RowCount() int { - return (int)(C.QConcatenateTablesProxyModel_RowCount(this.h)) +func (this *QConcatenateTablesProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QConcatenateTablesProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QConcatenateTablesProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QConcatenateTablesProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QConcatenateTablesProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QConcatenateTablesProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QConcatenateTablesProxyModel) ColumnCount() int { - return (int)(C.QConcatenateTablesProxyModel_ColumnCount(this.h)) +func (this *QConcatenateTablesProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QConcatenateTablesProxyModel_ColumnCount(this.h, parent.cPointer())) } func (this *QConcatenateTablesProxyModel) MimeTypes() []string { @@ -207,7 +229,7 @@ func (this *QConcatenateTablesProxyModel) MimeData(indexes []QModelIndex) *QMime indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma)), nil) } func (this *QConcatenateTablesProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -247,42 +269,1136 @@ func QConcatenateTablesProxyModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QConcatenateTablesProxyModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QConcatenateTablesProxyModel_Data2(this.h, index.cPointer(), (C.int)(role)) +func (this *QConcatenateTablesProxyModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QConcatenateTablesProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Data +func miqt_exec_callback_QConcatenateTablesProxyModel_Data(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QConcatenateTablesProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SetData +func miqt_exec_callback_QConcatenateTablesProxyModel_SetData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_ItemData(proxyIndex *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QConcatenateTablesProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), proxyIndex.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnItemData(slot func(super func(proxyIndex *QModelIndex) map[int]QVariant, proxyIndex *QModelIndex) map[int]QVariant) { + C.QConcatenateTablesProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_ItemData +func miqt_exec_callback_QConcatenateTablesProxyModel_ItemData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) map[int]QVariant, proxyIndex *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QConcatenateTablesProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QConcatenateTablesProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SetItemData +func miqt_exec_callback_QConcatenateTablesProxyModel_SetItemData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QConcatenateTablesProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QConcatenateTablesProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Flags +func miqt_exec_callback_QConcatenateTablesProxyModel_Flags(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QConcatenateTablesProxyModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QConcatenateTablesProxyModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +//export miqt_exec_callback_QConcatenateTablesProxyModel_Index +func miqt_exec_callback_QConcatenateTablesProxyModel_Index(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QConcatenateTablesProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QConcatenateTablesProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QConcatenateTablesProxyModel) callVirtualBase_Parent(index *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), index.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnParent(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Parent +func miqt_exec_callback_QConcatenateTablesProxyModel_Parent(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QConcatenateTablesProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QConcatenateTablesProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QConcatenateTablesProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QConcatenateTablesProxyModel_RowCount1(this.h, parent.cPointer())) +//export miqt_exec_callback_QConcatenateTablesProxyModel_RowCount +func miqt_exec_callback_QConcatenateTablesProxyModel_RowCount(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QConcatenateTablesProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QConcatenateTablesProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QConcatenateTablesProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QConcatenateTablesProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_HeaderData +func miqt_exec_callback_QConcatenateTablesProxyModel_HeaderData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QConcatenateTablesProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QConcatenateTablesProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_ColumnCount +func miqt_exec_callback_QConcatenateTablesProxyModel_ColumnCount(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QConcatenateTablesProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QConcatenateTablesProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MimeTypes +func miqt_exec_callback_QConcatenateTablesProxyModel_MimeTypes(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QConcatenateTablesProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QConcatenateTablesProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QConcatenateTablesProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MimeData +func miqt_exec_callback_QConcatenateTablesProxyModel_MimeData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData +func miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData +func miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QConcatenateTablesProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Span +func miqt_exec_callback_QConcatenateTablesProxyModel_Span(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } +func (this *QConcatenateTablesProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Sibling +func miqt_exec_callback_QConcatenateTablesProxyModel_Sibling(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_HasChildren +func miqt_exec_callback_QConcatenateTablesProxyModel_HasChildren(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QConcatenateTablesProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SetHeaderData +func miqt_exec_callback_QConcatenateTablesProxyModel_SetHeaderData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_ClearItemData +func miqt_exec_callback_QConcatenateTablesProxyModel_ClearItemData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QConcatenateTablesProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QConcatenateTablesProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QConcatenateTablesProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDropActions +func miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDropActions(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QConcatenateTablesProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QConcatenateTablesProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QConcatenateTablesProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDragActions +func miqt_exec_callback_QConcatenateTablesProxyModel_SupportedDragActions(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_InsertRows +func miqt_exec_callback_QConcatenateTablesProxyModel_InsertRows(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_InsertColumns +func miqt_exec_callback_QConcatenateTablesProxyModel_InsertColumns(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RemoveRows +func miqt_exec_callback_QConcatenateTablesProxyModel_RemoveRows(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RemoveColumns +func miqt_exec_callback_QConcatenateTablesProxyModel_RemoveColumns(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QConcatenateTablesProxyModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MoveRows +func miqt_exec_callback_QConcatenateTablesProxyModel_MoveRows(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QConcatenateTablesProxyModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QConcatenateTablesProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MoveColumns +func miqt_exec_callback_QConcatenateTablesProxyModel_MoveColumns(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QConcatenateTablesProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QConcatenateTablesProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QConcatenateTablesProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_FetchMore +func miqt_exec_callback_QConcatenateTablesProxyModel_FetchMore(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QConcatenateTablesProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QConcatenateTablesProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_CanFetchMore +func miqt_exec_callback_QConcatenateTablesProxyModel_CanFetchMore(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QConcatenateTablesProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QConcatenateTablesProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QConcatenateTablesProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Sort +func miqt_exec_callback_QConcatenateTablesProxyModel_Sort(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QConcatenateTablesProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QConcatenateTablesProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Buddy +func miqt_exec_callback_QConcatenateTablesProxyModel_Buddy(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QConcatenateTablesProxyModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QConcatenateTablesProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Match +func miqt_exec_callback_QConcatenateTablesProxyModel_Match(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QConcatenateTablesProxyModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QConcatenateTablesProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QConcatenateTablesProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_RoleNames +func miqt_exec_callback_QConcatenateTablesProxyModel_RoleNames(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QConcatenateTablesProxyModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QConcatenateTablesProxyModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QConcatenateTablesProxyModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_MultiData +func miqt_exec_callback_QConcatenateTablesProxyModel_MultiData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t, index *C.QModelIndex, roleDataSpan *C.QModelRoleDataSpan) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + roleDataSpan_ret := roleDataSpan + roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan_ret) + roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *roleDataSpan_goptr + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QConcatenateTablesProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QConcatenateTablesProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QConcatenateTablesProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Submit +func miqt_exec_callback_QConcatenateTablesProxyModel_Submit(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_Revert() { + + C.QConcatenateTablesProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QConcatenateTablesProxyModel) OnRevert(slot func(super func())) { + C.QConcatenateTablesProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_Revert +func miqt_exec_callback_QConcatenateTablesProxyModel_Revert(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QConcatenateTablesProxyModel) callVirtualBase_ResetInternalData() { + + C.QConcatenateTablesProxyModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QConcatenateTablesProxyModel) OnResetInternalData(slot func(super func())) { + C.QConcatenateTablesProxyModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QConcatenateTablesProxyModel_ResetInternalData +func miqt_exec_callback_QConcatenateTablesProxyModel_ResetInternalData(self *C.QConcatenateTablesProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QConcatenateTablesProxyModel{h: self}).callVirtualBase_ResetInternalData) -func (this *QConcatenateTablesProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QConcatenateTablesProxyModel_ColumnCount1(this.h, parent.cPointer())) } // Delete this object from C++ memory. func (this *QConcatenateTablesProxyModel) Delete() { - C.QConcatenateTablesProxyModel_Delete(this.h) + C.QConcatenateTablesProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qconcatenatetablesproxymodel.h b/qt6/gen_qconcatenatetablesproxymodel.h index ddbcfb5e..d9578f33 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.h +++ b/qt6/gen_qconcatenatetablesproxymodel.h @@ -16,26 +16,30 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QByteArray; class QConcatenateTablesProxyModel; class QMetaObject; class QMimeData; class QModelIndex; +class QModelRoleDataSpan; class QObject; class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QByteArray QByteArray; typedef struct QConcatenateTablesProxyModel QConcatenateTablesProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QModelRoleDataSpan QModelRoleDataSpan; typedef struct QObject QObject; typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new(); -QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent); +void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self); void* QConcatenateTablesProxyModel_Metacast(QConcatenateTablesProxyModel* self, const char* param1); struct miqt_string QConcatenateTablesProxyModel_Tr(const char* s); @@ -44,16 +48,16 @@ void QConcatenateTablesProxyModel_AddSourceModel(QConcatenateTablesProxyModel* s void QConcatenateTablesProxyModel_RemoveSourceModel(QConcatenateTablesProxyModel* self, QAbstractItemModel* sourceModel); QModelIndex* QConcatenateTablesProxyModel_MapFromSource(const QConcatenateTablesProxyModel* self, QModelIndex* sourceIndex); QModelIndex* QConcatenateTablesProxyModel_MapToSource(const QConcatenateTablesProxyModel* self, QModelIndex* proxyIndex); -QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index); -bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value); +QVariant* QConcatenateTablesProxyModel_Data(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role); +bool QConcatenateTablesProxyModel_SetData(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role); struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_ItemData(const QConcatenateTablesProxyModel* self, QModelIndex* proxyIndex); bool QConcatenateTablesProxyModel_SetItemData(QConcatenateTablesProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); int QConcatenateTablesProxyModel_Flags(const QConcatenateTablesProxyModel* self, QModelIndex* index); -QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column); +QModelIndex* QConcatenateTablesProxyModel_Index(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent); QModelIndex* QConcatenateTablesProxyModel_Parent(const QConcatenateTablesProxyModel* self, QModelIndex* index); -int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self); -QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation); -int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self); +int QConcatenateTablesProxyModel_RowCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent); +QVariant* QConcatenateTablesProxyModel_HeaderData(const QConcatenateTablesProxyModel* self, int section, int orientation, int role); +int QConcatenateTablesProxyModel_ColumnCount(const QConcatenateTablesProxyModel* self, QModelIndex* parent); struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_MimeTypes(const QConcatenateTablesProxyModel* self); QMimeData* QConcatenateTablesProxyModel_MimeData(const QConcatenateTablesProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QConcatenateTablesProxyModel_CanDropMimeData(const QConcatenateTablesProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -61,13 +65,81 @@ bool QConcatenateTablesProxyModel_DropMimeData(QConcatenateTablesProxyModel* sel QSize* QConcatenateTablesProxyModel_Span(const QConcatenateTablesProxyModel* self, QModelIndex* index); struct miqt_string QConcatenateTablesProxyModel_Tr2(const char* s, const char* c); struct miqt_string QConcatenateTablesProxyModel_Tr3(const char* s, const char* c, int n); -QVariant* QConcatenateTablesProxyModel_Data2(const QConcatenateTablesProxyModel* self, QModelIndex* index, int role); -bool QConcatenateTablesProxyModel_SetData3(QConcatenateTablesProxyModel* self, QModelIndex* index, QVariant* value, int role); -QModelIndex* QConcatenateTablesProxyModel_Index3(const QConcatenateTablesProxyModel* self, int row, int column, QModelIndex* parent); -int QConcatenateTablesProxyModel_RowCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent); -QVariant* QConcatenateTablesProxyModel_HeaderData3(const QConcatenateTablesProxyModel* self, int section, int orientation, int role); -int QConcatenateTablesProxyModel_ColumnCount1(const QConcatenateTablesProxyModel* self, QModelIndex* parent); -void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self); +void QConcatenateTablesProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QConcatenateTablesProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QConcatenateTablesProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QConcatenateTablesProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QConcatenateTablesProxyModel_virtualbase_ItemData(const void* self, QModelIndex* proxyIndex); +void QConcatenateTablesProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QConcatenateTablesProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Parent(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QConcatenateTablesProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QConcatenateTablesProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_MimeTypes(const void* self); +void QConcatenateTablesProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QConcatenateTablesProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QConcatenateTablesProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QConcatenateTablesProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QConcatenateTablesProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QConcatenateTablesProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_SupportedDropActions(const void* self); +void QConcatenateTablesProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QConcatenateTablesProxyModel_virtualbase_SupportedDragActions(const void* self); +void QConcatenateTablesProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QConcatenateTablesProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QConcatenateTablesProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QConcatenateTablesProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_Sort(void* self, int column, int order); +void QConcatenateTablesProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QConcatenateTablesProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QConcatenateTablesProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QConcatenateTablesProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QConcatenateTablesProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QConcatenateTablesProxyModel_virtualbase_RoleNames(const void* self); +void QConcatenateTablesProxyModel_override_virtual_MultiData(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QConcatenateTablesProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QConcatenateTablesProxyModel_virtualbase_Submit(void* self); +void QConcatenateTablesProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_Revert(void* self); +void QConcatenateTablesProxyModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QConcatenateTablesProxyModel_virtualbase_ResetInternalData(void* self); +void QConcatenateTablesProxyModel_Delete(QConcatenateTablesProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcontiguouscache.cpp b/qt6/gen_qcontiguouscache.cpp index 5f841c76..9cddaa56 100644 --- a/qt6/gen_qcontiguouscache.cpp +++ b/qt6/gen_qcontiguouscache.cpp @@ -11,7 +11,11 @@ void QContiguousCacheData_FreeData(QContiguousCacheData* data) { QContiguousCacheData::freeData(data); } -void QContiguousCacheData_Delete(QContiguousCacheData* self) { - delete self; +void QContiguousCacheData_Delete(QContiguousCacheData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcontiguouscache.go b/qt6/gen_qcontiguouscache.go index 0e57fca9..01569ffb 100644 --- a/qt6/gen_qcontiguouscache.go +++ b/qt6/gen_qcontiguouscache.go @@ -14,7 +14,8 @@ import ( ) type QContiguousCacheData struct { - h *C.QContiguousCacheData + h *C.QContiguousCacheData + isSubclass bool } func (this *QContiguousCacheData) cPointer() *C.QContiguousCacheData { @@ -31,6 +32,7 @@ func (this *QContiguousCacheData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQContiguousCacheData constructs the type using only CGO pointers. func newQContiguousCacheData(h *C.QContiguousCacheData) *QContiguousCacheData { if h == nil { return nil @@ -38,8 +40,13 @@ func newQContiguousCacheData(h *C.QContiguousCacheData) *QContiguousCacheData { return &QContiguousCacheData{h: h} } +// UnsafeNewQContiguousCacheData constructs the type using only unsafe pointers. func UnsafeNewQContiguousCacheData(h unsafe.Pointer) *QContiguousCacheData { - return newQContiguousCacheData((*C.QContiguousCacheData)(h)) + if h == nil { + return nil + } + + return &QContiguousCacheData{h: (*C.QContiguousCacheData)(h)} } func QContiguousCacheData_AllocateData(size int64, alignment int64) *QContiguousCacheData { @@ -52,7 +59,7 @@ func QContiguousCacheData_FreeData(data *QContiguousCacheData) { // Delete this object from C++ memory. func (this *QContiguousCacheData) Delete() { - C.QContiguousCacheData_Delete(this.h) + C.QContiguousCacheData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcontiguouscache.h b/qt6/gen_qcontiguouscache.h index 5464e5f7..a62b9ce5 100644 --- a/qt6/gen_qcontiguouscache.h +++ b/qt6/gen_qcontiguouscache.h @@ -22,7 +22,7 @@ typedef struct QContiguousCacheData QContiguousCacheData; QContiguousCacheData* QContiguousCacheData_AllocateData(ptrdiff_t size, ptrdiff_t alignment); void QContiguousCacheData_FreeData(QContiguousCacheData* data); -void QContiguousCacheData_Delete(QContiguousCacheData* self); +void QContiguousCacheData_Delete(QContiguousCacheData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcoreapplication.cpp b/qt6/gen_qcoreapplication.cpp index b1586677..2416d03c 100644 --- a/qt6/gen_qcoreapplication.cpp +++ b/qt6/gen_qcoreapplication.cpp @@ -1,24 +1,236 @@ #include #include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qcoreapplication.h" #include "_cgo_export.h" -QCoreApplication* QCoreApplication_new(int* argc, char** argv) { - return new QCoreApplication(static_cast(*argc), argv); +class MiqtVirtualQCoreApplication : public virtual QCoreApplication { +public: + + MiqtVirtualQCoreApplication(int& argc, char** argv): QCoreApplication(argc, argv) {}; + MiqtVirtualQCoreApplication(int& argc, char** argv, int param3): QCoreApplication(argc, argv, param3) {}; + + virtual ~MiqtVirtualQCoreApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Notify = 0; + + // Subclass to allow providing a Go implementation + virtual bool notify(QObject* param1, QEvent* param2) override { + if (handle__Notify == 0) { + return QCoreApplication::notify(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QCoreApplication_Notify(this, handle__Notify, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Notify(QObject* param1, QEvent* param2) { + + return QCoreApplication::notify(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QCoreApplication::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QCoreApplication_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QCoreApplication::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QCoreApplication::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QCoreApplication_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QCoreApplication::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QCoreApplication::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QCoreApplication_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QCoreApplication::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QCoreApplication::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QCoreApplication_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QCoreApplication::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QCoreApplication::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCoreApplication_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QCoreApplication::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QCoreApplication::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCoreApplication_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QCoreApplication::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QCoreApplication::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCoreApplication_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QCoreApplication::disconnectNotify(*signal); + + } + +}; + +void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv); + *outptr_QCoreApplication = ret; + *outptr_QObject = static_cast(ret); } -QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3) { - return new QCoreApplication(static_cast(*argc), argv, static_cast(param3)); +void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv, static_cast(param3)); + *outptr_QCoreApplication = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self) { @@ -284,7 +496,7 @@ void QCoreApplication_InstallNativeEventFilter(QCoreApplication* self, QAbstract } void QCoreApplication_connect_InstallNativeEventFilter(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::installNativeEventFilter), self, [=](QAbstractNativeEventFilter* filterObj) { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::installNativeEventFilter), self, [=](QAbstractNativeEventFilter* filterObj) { QAbstractNativeEventFilter* sigval1 = filterObj; miqt_exec_callback_QCoreApplication_InstallNativeEventFilter(slot, sigval1); }); @@ -295,7 +507,7 @@ void QCoreApplication_RemoveNativeEventFilter(QCoreApplication* self, QAbstractN } void QCoreApplication_connect_RemoveNativeEventFilter(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::removeNativeEventFilter), self, [=](QAbstractNativeEventFilter* filterObj) { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::removeNativeEventFilter), self, [=](QAbstractNativeEventFilter* filterObj) { QAbstractNativeEventFilter* sigval1 = filterObj; miqt_exec_callback_QCoreApplication_RemoveNativeEventFilter(slot, sigval1); }); @@ -322,7 +534,7 @@ void QCoreApplication_OrganizationNameChanged(QCoreApplication* self) { } void QCoreApplication_connect_OrganizationNameChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::organizationNameChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::organizationNameChanged), self, [=]() { miqt_exec_callback_QCoreApplication_OrganizationNameChanged(slot); }); } @@ -332,7 +544,7 @@ void QCoreApplication_OrganizationDomainChanged(QCoreApplication* self) { } void QCoreApplication_connect_OrganizationDomainChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::organizationDomainChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::organizationDomainChanged), self, [=]() { miqt_exec_callback_QCoreApplication_OrganizationDomainChanged(slot); }); } @@ -342,7 +554,7 @@ void QCoreApplication_ApplicationNameChanged(QCoreApplication* self) { } void QCoreApplication_connect_ApplicationNameChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::applicationNameChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::applicationNameChanged), self, [=]() { miqt_exec_callback_QCoreApplication_ApplicationNameChanged(slot); }); } @@ -352,7 +564,7 @@ void QCoreApplication_ApplicationVersionChanged(QCoreApplication* self) { } void QCoreApplication_connect_ApplicationVersionChanged(QCoreApplication* self, intptr_t slot) { - QCoreApplication::connect(self, static_cast(&QCoreApplication::applicationVersionChanged), self, [=]() { + MiqtVirtualQCoreApplication::connect(self, static_cast(&QCoreApplication::applicationVersionChanged), self, [=]() { miqt_exec_callback_QCoreApplication_ApplicationVersionChanged(slot); }); } @@ -429,7 +641,75 @@ void QCoreApplication_Exit1(int retcode) { QCoreApplication::exit(static_cast(retcode)); } -void QCoreApplication_Delete(QCoreApplication* self) { - delete self; +void QCoreApplication_override_virtual_Notify(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__Notify = slot; +} + +bool QCoreApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_Notify(param1, param2); +} + +void QCoreApplication_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__Event = slot; +} + +bool QCoreApplication_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_Event(param1); +} + +void QCoreApplication_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__EventFilter = slot; +} + +bool QCoreApplication_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QCoreApplication_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__TimerEvent = slot; +} + +void QCoreApplication_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_TimerEvent(event); +} + +void QCoreApplication_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__ChildEvent = slot; +} + +void QCoreApplication_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_ChildEvent(event); +} + +void QCoreApplication_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__CustomEvent = slot; +} + +void QCoreApplication_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_CustomEvent(event); +} + +void QCoreApplication_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__ConnectNotify = slot; +} + +void QCoreApplication_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QCoreApplication_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCoreApplication*)(self) )->handle__DisconnectNotify = slot; +} + +void QCoreApplication_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCoreApplication*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QCoreApplication_Delete(QCoreApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcoreapplication.go b/qt6/gen_qcoreapplication.go index 833f6b54..25badc38 100644 --- a/qt6/gen_qcoreapplication.go +++ b/qt6/gen_qcoreapplication.go @@ -21,7 +21,8 @@ const ( ) type QCoreApplication struct { - h *C.QCoreApplication + h *C.QCoreApplication + isSubclass bool *QObject } @@ -39,15 +40,23 @@ func (this *QCoreApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCoreApplication(h *C.QCoreApplication) *QCoreApplication { +// newQCoreApplication constructs the type using only CGO pointers. +func newQCoreApplication(h *C.QCoreApplication, h_QObject *C.QObject) *QCoreApplication { if h == nil { return nil } - return &QCoreApplication{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QCoreApplication{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQCoreApplication(h unsafe.Pointer) *QCoreApplication { - return newQCoreApplication((*C.QCoreApplication)(h)) +// UnsafeNewQCoreApplication constructs the type using only unsafe pointers. +func UnsafeNewQCoreApplication(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCoreApplication { + if h == nil { + return nil + } + + return &QCoreApplication{h: (*C.QCoreApplication)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQCoreApplication constructs a new QCoreApplication object. @@ -62,8 +71,13 @@ func NewQCoreApplication(args []string) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QCoreApplication_new(argc, &argv[0]) - return newQCoreApplication(ret) + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QCoreApplication_new(argc, &argv[0], &outptr_QCoreApplication, &outptr_QObject) + ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCoreApplication2 constructs a new QCoreApplication object. @@ -78,8 +92,13 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3)) - return newQCoreApplication(ret) + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QCoreApplication, &outptr_QObject) + ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCoreApplication) MetaObject() *QMetaObject { @@ -191,7 +210,7 @@ func QCoreApplication_IsSetuidAllowed() bool { } func QCoreApplication_Instance() *QCoreApplication { - return UnsafeNewQCoreApplication(unsafe.Pointer(C.QCoreApplication_Instance())) + return UnsafeNewQCoreApplication(unsafe.Pointer(C.QCoreApplication_Instance()), nil) } func QCoreApplication_Exec() int { @@ -223,7 +242,7 @@ func QCoreApplication_RemovePostedEvents(receiver *QObject) { } func QCoreApplication_EventDispatcher() *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QCoreApplication_EventDispatcher())) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QCoreApplication_EventDispatcher()), nil) } func QCoreApplication_SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -522,9 +541,201 @@ func QCoreApplication_Exit1(retcode int) { C.QCoreApplication_Exit1((C.int)(retcode)) } +func (this *QCoreApplication) callVirtualBase_Notify(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QCoreApplication_virtualbase_Notify(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QCoreApplication) OnNotify(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QCoreApplication_override_virtual_Notify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_Notify +func miqt_exec_callback_QCoreApplication_Notify(self *C.QCoreApplication, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QCoreApplication{h: self}).callVirtualBase_Notify, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCoreApplication) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QCoreApplication_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QCoreApplication) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QCoreApplication_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_Event +func miqt_exec_callback_QCoreApplication_Event(self *C.QCoreApplication, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QCoreApplication{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCoreApplication) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QCoreApplication_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QCoreApplication) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QCoreApplication_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_EventFilter +func miqt_exec_callback_QCoreApplication_EventFilter(self *C.QCoreApplication, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCoreApplication{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCoreApplication) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QCoreApplication_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCoreApplication) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QCoreApplication_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_TimerEvent +func miqt_exec_callback_QCoreApplication_TimerEvent(self *C.QCoreApplication, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QCoreApplication_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCoreApplication) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QCoreApplication_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_ChildEvent +func miqt_exec_callback_QCoreApplication_ChildEvent(self *C.QCoreApplication, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_CustomEvent(event *QEvent) { + + C.QCoreApplication_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QCoreApplication) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QCoreApplication_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_CustomEvent +func miqt_exec_callback_QCoreApplication_CustomEvent(self *C.QCoreApplication, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QCoreApplication_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCoreApplication) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCoreApplication_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_ConnectNotify +func miqt_exec_callback_QCoreApplication_ConnectNotify(self *C.QCoreApplication, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QCoreApplication) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QCoreApplication_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QCoreApplication) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QCoreApplication_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCoreApplication_DisconnectNotify +func miqt_exec_callback_QCoreApplication_DisconnectNotify(self *C.QCoreApplication, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCoreApplication{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QCoreApplication) Delete() { - C.QCoreApplication_Delete(this.h) + C.QCoreApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcoreapplication.h b/qt6/gen_qcoreapplication.h index a92a6c26..8480ec48 100644 --- a/qt6/gen_qcoreapplication.h +++ b/qt6/gen_qcoreapplication.h @@ -17,23 +17,29 @@ extern "C" { #ifdef __cplusplus class QAbstractEventDispatcher; class QAbstractNativeEventFilter; +class QChildEvent; class QCoreApplication; class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QTranslator; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; +typedef struct QChildEvent QChildEvent; typedef struct QCoreApplication QCoreApplication; typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -QCoreApplication* QCoreApplication_new(int* argc, char** argv); -QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3); +void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self); void* QCoreApplication_Metacast(QCoreApplication* self, const char* param1); struct miqt_string QCoreApplication_Tr(const char* s); @@ -89,6 +95,7 @@ void QCoreApplication_ApplicationNameChanged(QCoreApplication* self); void QCoreApplication_connect_ApplicationNameChanged(QCoreApplication* self, intptr_t slot); void QCoreApplication_ApplicationVersionChanged(QCoreApplication* self); void QCoreApplication_connect_ApplicationVersionChanged(QCoreApplication* self, intptr_t slot); +bool QCoreApplication_Event(QCoreApplication* self, QEvent* param1); struct miqt_string QCoreApplication_Tr2(const char* s, const char* c); struct miqt_string QCoreApplication_Tr3(const char* s, const char* c, int n); void QCoreApplication_SetAttribute2(int attribute, bool on); @@ -100,7 +107,23 @@ void QCoreApplication_RemovePostedEvents2(QObject* receiver, int eventType); struct miqt_string QCoreApplication_Translate3(const char* context, const char* key, const char* disambiguation); struct miqt_string QCoreApplication_Translate4(const char* context, const char* key, const char* disambiguation, int n); void QCoreApplication_Exit1(int retcode); -void QCoreApplication_Delete(QCoreApplication* self); +void QCoreApplication_override_virtual_Notify(void* self, intptr_t slot); +bool QCoreApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2); +void QCoreApplication_override_virtual_Event(void* self, intptr_t slot); +bool QCoreApplication_virtualbase_Event(void* self, QEvent* param1); +void QCoreApplication_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCoreApplication_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QCoreApplication_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCoreApplication_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QCoreApplication_override_virtual_ChildEvent(void* self, intptr_t slot); +void QCoreApplication_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QCoreApplication_override_virtual_CustomEvent(void* self, intptr_t slot); +void QCoreApplication_virtualbase_CustomEvent(void* self, QEvent* event); +void QCoreApplication_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QCoreApplication_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QCoreApplication_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QCoreApplication_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QCoreApplication_Delete(QCoreApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcoreevent.cpp b/qt6/gen_qcoreevent.cpp index 280ebfa0..b21663a5 100644 --- a/qt6/gen_qcoreevent.cpp +++ b/qt6/gen_qcoreevent.cpp @@ -8,8 +8,64 @@ #include "gen_qcoreevent.h" #include "_cgo_export.h" -QEvent* QEvent_new(int typeVal) { - return new QEvent(static_cast(typeVal)); +class MiqtVirtualQEvent : public virtual QEvent { +public: + + MiqtVirtualQEvent(QEvent::Type typeVal): QEvent(typeVal) {}; + + virtual ~MiqtVirtualQEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QEvent::setAccepted(accepted); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QEvent* clone() const override { + if (handle__Clone == 0) { + return QEvent::clone(); + } + + + QEvent* callback_return_value = miqt_exec_callback_QEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QEvent* virtualbase_Clone() const { + + return QEvent::clone(); + + } + +}; + +void QEvent_new(int typeVal, QEvent** outptr_QEvent) { + MiqtVirtualQEvent* ret = new MiqtVirtualQEvent(static_cast(typeVal)); + *outptr_QEvent = ret; } int QEvent_Type(const QEvent* self) { @@ -61,12 +117,89 @@ int QEvent_RegisterEventType1(int hint) { return QEvent::registerEventType(static_cast(hint)); } -void QEvent_Delete(QEvent* self) { - delete self; +void QEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QEvent*)(self) )->handle__SetAccepted = slot; +} + +void QEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QEvent*)(self) )->handle__Clone = slot; +} + +QEvent* QEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQEvent*)(self) )->virtualbase_Clone(); +} + +void QEvent_Delete(QEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTimerEvent* QTimerEvent_new(int timerId) { - return new QTimerEvent(static_cast(timerId)); +class MiqtVirtualQTimerEvent : public virtual QTimerEvent { +public: + + MiqtVirtualQTimerEvent(int timerId): QTimerEvent(timerId) {}; + + virtual ~MiqtVirtualQTimerEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTimerEvent* clone() const override { + if (handle__Clone == 0) { + return QTimerEvent::clone(); + } + + + QTimerEvent* callback_return_value = miqt_exec_callback_QTimerEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTimerEvent* virtualbase_Clone() const { + + return QTimerEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QTimerEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QTimerEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QTimerEvent::setAccepted(accepted); + + } + +}; + +void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent) { + MiqtVirtualQTimerEvent* ret = new MiqtVirtualQTimerEvent(static_cast(timerId)); + *outptr_QTimerEvent = ret; + *outptr_QEvent = static_cast(ret); } QTimerEvent* QTimerEvent_Clone(const QTimerEvent* self) { @@ -77,12 +210,89 @@ int QTimerEvent_TimerId(const QTimerEvent* self) { return self->timerId(); } -void QTimerEvent_Delete(QTimerEvent* self) { - delete self; +void QTimerEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTimerEvent*)(self) )->handle__Clone = slot; +} + +QTimerEvent* QTimerEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTimerEvent*)(self) )->virtualbase_Clone(); +} + +void QTimerEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QTimerEvent*)(self) )->handle__SetAccepted = slot; +} + +void QTimerEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQTimerEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QChildEvent* QChildEvent_new(int typeVal, QObject* child) { - return new QChildEvent(static_cast(typeVal), child); +class MiqtVirtualQChildEvent : public virtual QChildEvent { +public: + + MiqtVirtualQChildEvent(QEvent::Type typeVal, QObject* child): QChildEvent(typeVal, child) {}; + + virtual ~MiqtVirtualQChildEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QChildEvent* clone() const override { + if (handle__Clone == 0) { + return QChildEvent::clone(); + } + + + QChildEvent* callback_return_value = miqt_exec_callback_QChildEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QChildEvent* virtualbase_Clone() const { + + return QChildEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QChildEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QChildEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QChildEvent::setAccepted(accepted); + + } + +}; + +void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent) { + MiqtVirtualQChildEvent* ret = new MiqtVirtualQChildEvent(static_cast(typeVal), child); + *outptr_QChildEvent = ret; + *outptr_QEvent = static_cast(ret); } QChildEvent* QChildEvent_Clone(const QChildEvent* self) { @@ -105,13 +315,90 @@ bool QChildEvent_Removed(const QChildEvent* self) { return self->removed(); } -void QChildEvent_Delete(QChildEvent* self) { - delete self; +void QChildEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QChildEvent*)(self) )->handle__Clone = slot; +} + +QChildEvent* QChildEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQChildEvent*)(self) )->virtualbase_Clone(); +} + +void QChildEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QChildEvent*)(self) )->handle__SetAccepted = slot; +} + +void QChildEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQChildEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QChildEvent_Delete(QChildEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name) { +class MiqtVirtualQDynamicPropertyChangeEvent : public virtual QDynamicPropertyChangeEvent { +public: + + MiqtVirtualQDynamicPropertyChangeEvent(const QByteArray& name): QDynamicPropertyChangeEvent(name) {}; + + virtual ~MiqtVirtualQDynamicPropertyChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QDynamicPropertyChangeEvent* clone() const override { + if (handle__Clone == 0) { + return QDynamicPropertyChangeEvent::clone(); + } + + + QDynamicPropertyChangeEvent* callback_return_value = miqt_exec_callback_QDynamicPropertyChangeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QDynamicPropertyChangeEvent* virtualbase_Clone() const { + + return QDynamicPropertyChangeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QDynamicPropertyChangeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QDynamicPropertyChangeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QDynamicPropertyChangeEvent::setAccepted(accepted); + + } + +}; + +void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent) { QByteArray name_QByteArray(name.data, name.len); - return new QDynamicPropertyChangeEvent(name_QByteArray); + MiqtVirtualQDynamicPropertyChangeEvent* ret = new MiqtVirtualQDynamicPropertyChangeEvent(name_QByteArray); + *outptr_QDynamicPropertyChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_Clone(const QDynamicPropertyChangeEvent* self) { @@ -127,7 +414,27 @@ struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicProper return _ms; } -void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self) { - delete self; +void QDynamicPropertyChangeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QDynamicPropertyChangeEvent*)(self) )->handle__Clone = slot; +} + +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQDynamicPropertyChangeEvent*)(self) )->virtualbase_Clone(); +} + +void QDynamicPropertyChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QDynamicPropertyChangeEvent*)(self) )->handle__SetAccepted = slot; +} + +void QDynamicPropertyChangeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQDynamicPropertyChangeEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcoreevent.go b/qt6/gen_qcoreevent.go index 5666b7ca..aefea6a3 100644 --- a/qt6/gen_qcoreevent.go +++ b/qt6/gen_qcoreevent.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -192,7 +193,8 @@ const ( ) type QEvent struct { - h *C.QEvent + h *C.QEvent + isSubclass bool } func (this *QEvent) cPointer() *C.QEvent { @@ -209,6 +211,7 @@ func (this *QEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEvent constructs the type using only CGO pointers. func newQEvent(h *C.QEvent) *QEvent { if h == nil { return nil @@ -216,14 +219,23 @@ func newQEvent(h *C.QEvent) *QEvent { return &QEvent{h: h} } +// UnsafeNewQEvent constructs the type using only unsafe pointers. func UnsafeNewQEvent(h unsafe.Pointer) *QEvent { - return newQEvent((*C.QEvent)(h)) + if h == nil { + return nil + } + + return &QEvent{h: (*C.QEvent)(h)} } // NewQEvent constructs a new QEvent object. func NewQEvent(typeVal QEvent__Type) *QEvent { - ret := C.QEvent_new((C.int)(typeVal)) - return newQEvent(ret) + var outptr_QEvent *C.QEvent = nil + + C.QEvent_new((C.int)(typeVal), &outptr_QEvent) + ret := newQEvent(outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QEvent) Type() QEvent__Type { @@ -274,9 +286,53 @@ func QEvent_RegisterEventType1(hint int) int { return (int)(C.QEvent_RegisterEventType1((C.int)(hint))) } +func (this *QEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEvent_SetAccepted +func miqt_exec_callback_QEvent_SetAccepted(self *C.QEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + +func (this *QEvent) callVirtualBase_Clone() *QEvent { + + return UnsafeNewQEvent(unsafe.Pointer(C.QEvent_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QEvent) OnClone(slot func(super func() *QEvent) *QEvent) { + C.QEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEvent_Clone +func miqt_exec_callback_QEvent_Clone(self *C.QEvent, cb C.intptr_t) *C.QEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QEvent) *QEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QEvent) Delete() { - C.QEvent_Delete(this.h) + C.QEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -289,7 +345,8 @@ func (this *QEvent) GoGC() { } type QTimerEvent struct { - h *C.QTimerEvent + h *C.QTimerEvent + isSubclass bool *QEvent } @@ -307,34 +364,91 @@ func (this *QTimerEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTimerEvent(h *C.QTimerEvent) *QTimerEvent { +// newQTimerEvent constructs the type using only CGO pointers. +func newQTimerEvent(h *C.QTimerEvent, h_QEvent *C.QEvent) *QTimerEvent { if h == nil { return nil } - return &QTimerEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QTimerEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQTimerEvent(h unsafe.Pointer) *QTimerEvent { - return newQTimerEvent((*C.QTimerEvent)(h)) +// UnsafeNewQTimerEvent constructs the type using only unsafe pointers. +func UnsafeNewQTimerEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QTimerEvent { + if h == nil { + return nil + } + + return &QTimerEvent{h: (*C.QTimerEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQTimerEvent constructs a new QTimerEvent object. func NewQTimerEvent(timerId int) *QTimerEvent { - ret := C.QTimerEvent_new((C.int)(timerId)) - return newQTimerEvent(ret) + var outptr_QTimerEvent *C.QTimerEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTimerEvent_new((C.int)(timerId), &outptr_QTimerEvent, &outptr_QEvent) + ret := newQTimerEvent(outptr_QTimerEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QTimerEvent) Clone() *QTimerEvent { - return UnsafeNewQTimerEvent(unsafe.Pointer(C.QTimerEvent_Clone(this.h))) + return UnsafeNewQTimerEvent(unsafe.Pointer(C.QTimerEvent_Clone(this.h)), nil) } func (this *QTimerEvent) TimerId() int { return (int)(C.QTimerEvent_TimerId(this.h)) } +func (this *QTimerEvent) callVirtualBase_Clone() *QTimerEvent { + + return UnsafeNewQTimerEvent(unsafe.Pointer(C.QTimerEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QTimerEvent) OnClone(slot func(super func() *QTimerEvent) *QTimerEvent) { + C.QTimerEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimerEvent_Clone +func miqt_exec_callback_QTimerEvent_Clone(self *C.QTimerEvent, cb C.intptr_t) *C.QTimerEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTimerEvent) *QTimerEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTimerEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTimerEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QTimerEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QTimerEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QTimerEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimerEvent_SetAccepted +func miqt_exec_callback_QTimerEvent_SetAccepted(self *C.QTimerEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QTimerEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QTimerEvent) Delete() { - C.QTimerEvent_Delete(this.h) + C.QTimerEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -347,7 +461,8 @@ func (this *QTimerEvent) GoGC() { } type QChildEvent struct { - h *C.QChildEvent + h *C.QChildEvent + isSubclass bool *QEvent } @@ -365,25 +480,38 @@ func (this *QChildEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQChildEvent(h *C.QChildEvent) *QChildEvent { +// newQChildEvent constructs the type using only CGO pointers. +func newQChildEvent(h *C.QChildEvent, h_QEvent *C.QEvent) *QChildEvent { if h == nil { return nil } - return &QChildEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QChildEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQChildEvent(h unsafe.Pointer) *QChildEvent { - return newQChildEvent((*C.QChildEvent)(h)) +// UnsafeNewQChildEvent constructs the type using only unsafe pointers. +func UnsafeNewQChildEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QChildEvent { + if h == nil { + return nil + } + + return &QChildEvent{h: (*C.QChildEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQChildEvent constructs a new QChildEvent object. func NewQChildEvent(typeVal QEvent__Type, child *QObject) *QChildEvent { - ret := C.QChildEvent_new((C.int)(typeVal), child.cPointer()) - return newQChildEvent(ret) + var outptr_QChildEvent *C.QChildEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QChildEvent_new((C.int)(typeVal), child.cPointer(), &outptr_QChildEvent, &outptr_QEvent) + ret := newQChildEvent(outptr_QChildEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QChildEvent) Clone() *QChildEvent { - return UnsafeNewQChildEvent(unsafe.Pointer(C.QChildEvent_Clone(this.h))) + return UnsafeNewQChildEvent(unsafe.Pointer(C.QChildEvent_Clone(this.h)), nil) } func (this *QChildEvent) Child() *QObject { @@ -402,9 +530,53 @@ func (this *QChildEvent) Removed() bool { return (bool)(C.QChildEvent_Removed(this.h)) } +func (this *QChildEvent) callVirtualBase_Clone() *QChildEvent { + + return UnsafeNewQChildEvent(unsafe.Pointer(C.QChildEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QChildEvent) OnClone(slot func(super func() *QChildEvent) *QChildEvent) { + C.QChildEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QChildEvent_Clone +func miqt_exec_callback_QChildEvent_Clone(self *C.QChildEvent, cb C.intptr_t) *C.QChildEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QChildEvent) *QChildEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QChildEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QChildEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QChildEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QChildEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QChildEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QChildEvent_SetAccepted +func miqt_exec_callback_QChildEvent_SetAccepted(self *C.QChildEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QChildEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QChildEvent) Delete() { - C.QChildEvent_Delete(this.h) + C.QChildEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -417,7 +589,8 @@ func (this *QChildEvent) GoGC() { } type QDynamicPropertyChangeEvent struct { - h *C.QDynamicPropertyChangeEvent + h *C.QDynamicPropertyChangeEvent + isSubclass bool *QEvent } @@ -435,15 +608,23 @@ func (this *QDynamicPropertyChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent { +// newQDynamicPropertyChangeEvent constructs the type using only CGO pointers. +func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent, h_QEvent *C.QEvent) *QDynamicPropertyChangeEvent { if h == nil { return nil } - return &QDynamicPropertyChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QDynamicPropertyChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer) *QDynamicPropertyChangeEvent { - return newQDynamicPropertyChangeEvent((*C.QDynamicPropertyChangeEvent)(h)) +// UnsafeNewQDynamicPropertyChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDynamicPropertyChangeEvent { + if h == nil { + return nil + } + + return &QDynamicPropertyChangeEvent{h: (*C.QDynamicPropertyChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQDynamicPropertyChangeEvent constructs a new QDynamicPropertyChangeEvent object. @@ -451,12 +632,17 @@ func NewQDynamicPropertyChangeEvent(name []byte) *QDynamicPropertyChangeEvent { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - ret := C.QDynamicPropertyChangeEvent_new(name_alias) - return newQDynamicPropertyChangeEvent(ret) + var outptr_QDynamicPropertyChangeEvent *C.QDynamicPropertyChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDynamicPropertyChangeEvent_new(name_alias, &outptr_QDynamicPropertyChangeEvent, &outptr_QEvent) + ret := newQDynamicPropertyChangeEvent(outptr_QDynamicPropertyChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDynamicPropertyChangeEvent) Clone() *QDynamicPropertyChangeEvent { - return UnsafeNewQDynamicPropertyChangeEvent(unsafe.Pointer(C.QDynamicPropertyChangeEvent_Clone(this.h))) + return UnsafeNewQDynamicPropertyChangeEvent(unsafe.Pointer(C.QDynamicPropertyChangeEvent_Clone(this.h)), nil) } func (this *QDynamicPropertyChangeEvent) PropertyName() []byte { @@ -466,9 +652,53 @@ func (this *QDynamicPropertyChangeEvent) PropertyName() []byte { return _ret } +func (this *QDynamicPropertyChangeEvent) callVirtualBase_Clone() *QDynamicPropertyChangeEvent { + + return UnsafeNewQDynamicPropertyChangeEvent(unsafe.Pointer(C.QDynamicPropertyChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QDynamicPropertyChangeEvent) OnClone(slot func(super func() *QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent) { + C.QDynamicPropertyChangeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDynamicPropertyChangeEvent_Clone +func miqt_exec_callback_QDynamicPropertyChangeEvent_Clone(self *C.QDynamicPropertyChangeEvent, cb C.intptr_t) *C.QDynamicPropertyChangeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDynamicPropertyChangeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QDynamicPropertyChangeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QDynamicPropertyChangeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QDynamicPropertyChangeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QDynamicPropertyChangeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDynamicPropertyChangeEvent_SetAccepted +func miqt_exec_callback_QDynamicPropertyChangeEvent_SetAccepted(self *C.QDynamicPropertyChangeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QDynamicPropertyChangeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QDynamicPropertyChangeEvent) Delete() { - C.QDynamicPropertyChangeEvent_Delete(this.h) + C.QDynamicPropertyChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcoreevent.h b/qt6/gen_qcoreevent.h index df5a8ddf..c8001bb4 100644 --- a/qt6/gen_qcoreevent.h +++ b/qt6/gen_qcoreevent.h @@ -30,7 +30,7 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -QEvent* QEvent_new(int typeVal); +void QEvent_new(int typeVal, QEvent** outptr_QEvent); int QEvent_Type(const QEvent* self); bool QEvent_Spontaneous(const QEvent* self); void QEvent_SetAccepted(QEvent* self, bool accepted); @@ -43,25 +43,41 @@ bool QEvent_IsSinglePointEvent(const QEvent* self); int QEvent_RegisterEventType(); QEvent* QEvent_Clone(const QEvent* self); int QEvent_RegisterEventType1(int hint); -void QEvent_Delete(QEvent* self); +void QEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QEvent_override_virtual_Clone(void* self, intptr_t slot); +QEvent* QEvent_virtualbase_Clone(const void* self); +void QEvent_Delete(QEvent* self, bool isSubclass); -QTimerEvent* QTimerEvent_new(int timerId); +void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent); QTimerEvent* QTimerEvent_Clone(const QTimerEvent* self); int QTimerEvent_TimerId(const QTimerEvent* self); -void QTimerEvent_Delete(QTimerEvent* self); +void QTimerEvent_override_virtual_Clone(void* self, intptr_t slot); +QTimerEvent* QTimerEvent_virtualbase_Clone(const void* self); +void QTimerEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QTimerEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass); -QChildEvent* QChildEvent_new(int typeVal, QObject* child); +void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent); QChildEvent* QChildEvent_Clone(const QChildEvent* self); QObject* QChildEvent_Child(const QChildEvent* self); bool QChildEvent_Added(const QChildEvent* self); bool QChildEvent_Polished(const QChildEvent* self); bool QChildEvent_Removed(const QChildEvent* self); -void QChildEvent_Delete(QChildEvent* self); +void QChildEvent_override_virtual_Clone(void* self, intptr_t slot); +QChildEvent* QChildEvent_virtualbase_Clone(const void* self); +void QChildEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QChildEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QChildEvent_Delete(QChildEvent* self, bool isSubclass); -QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name); +void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent); QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_Clone(const QDynamicPropertyChangeEvent* self); struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self); -void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self); +void QDynamicPropertyChangeEvent_override_virtual_Clone(void* self, intptr_t slot); +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_virtualbase_Clone(const void* self); +void QDynamicPropertyChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QDynamicPropertyChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcryptographichash.cpp b/qt6/gen_qcryptographichash.cpp index b5c4d8e8..b0b75af5 100644 --- a/qt6/gen_qcryptographichash.cpp +++ b/qt6/gen_qcryptographichash.cpp @@ -6,8 +6,9 @@ #include "gen_qcryptographichash.h" #include "_cgo_export.h" -QCryptographicHash* QCryptographicHash_new(int method) { - return new QCryptographicHash(static_cast(method)); +void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash) { + QCryptographicHash* ret = new QCryptographicHash(static_cast(method)); + *outptr_QCryptographicHash = ret; } void QCryptographicHash_Reset(QCryptographicHash* self) { @@ -52,7 +53,11 @@ int QCryptographicHash_HashLength(int method) { return QCryptographicHash::hashLength(static_cast(method)); } -void QCryptographicHash_Delete(QCryptographicHash* self) { - delete self; +void QCryptographicHash_Delete(QCryptographicHash* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcryptographichash.go b/qt6/gen_qcryptographichash.go index 479cd066..cb48bfa8 100644 --- a/qt6/gen_qcryptographichash.go +++ b/qt6/gen_qcryptographichash.go @@ -46,7 +46,8 @@ const ( ) type QCryptographicHash struct { - h *C.QCryptographicHash + h *C.QCryptographicHash + isSubclass bool } func (this *QCryptographicHash) cPointer() *C.QCryptographicHash { @@ -63,6 +64,7 @@ func (this *QCryptographicHash) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCryptographicHash constructs the type using only CGO pointers. func newQCryptographicHash(h *C.QCryptographicHash) *QCryptographicHash { if h == nil { return nil @@ -70,14 +72,23 @@ func newQCryptographicHash(h *C.QCryptographicHash) *QCryptographicHash { return &QCryptographicHash{h: h} } +// UnsafeNewQCryptographicHash constructs the type using only unsafe pointers. func UnsafeNewQCryptographicHash(h unsafe.Pointer) *QCryptographicHash { - return newQCryptographicHash((*C.QCryptographicHash)(h)) + if h == nil { + return nil + } + + return &QCryptographicHash{h: (*C.QCryptographicHash)(h)} } // NewQCryptographicHash constructs a new QCryptographicHash object. func NewQCryptographicHash(method QCryptographicHash__Algorithm) *QCryptographicHash { - ret := C.QCryptographicHash_new((C.int)(method)) - return newQCryptographicHash(ret) + var outptr_QCryptographicHash *C.QCryptographicHash = nil + + C.QCryptographicHash_new((C.int)(method), &outptr_QCryptographicHash) + ret := newQCryptographicHash(outptr_QCryptographicHash) + ret.isSubclass = true + return ret } func (this *QCryptographicHash) Reset() { @@ -125,7 +136,7 @@ func QCryptographicHash_HashLength(method QCryptographicHash__Algorithm) int { // Delete this object from C++ memory. func (this *QCryptographicHash) Delete() { - C.QCryptographicHash_Delete(this.h) + C.QCryptographicHash_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcryptographichash.h b/qt6/gen_qcryptographichash.h index 5bb0d5c9..84083f67 100644 --- a/qt6/gen_qcryptographichash.h +++ b/qt6/gen_qcryptographichash.h @@ -26,7 +26,7 @@ typedef struct QCryptographicHash QCryptographicHash; typedef struct QIODevice QIODevice; #endif -QCryptographicHash* QCryptographicHash_new(int method); +void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash); void QCryptographicHash_Reset(QCryptographicHash* self); void QCryptographicHash_AddData(QCryptographicHash* self, const char* data, ptrdiff_t length); void QCryptographicHash_AddDataWithData(QCryptographicHash* self, QByteArrayView* data); @@ -35,7 +35,7 @@ struct miqt_string QCryptographicHash_Result(const QCryptographicHash* self); QByteArrayView* QCryptographicHash_ResultView(const QCryptographicHash* self); struct miqt_string QCryptographicHash_Hash(QByteArrayView* data, int method); int QCryptographicHash_HashLength(int method); -void QCryptographicHash_Delete(QCryptographicHash* self); +void QCryptographicHash_Delete(QCryptographicHash* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qcursor.cpp b/qt6/gen_qcursor.cpp index 7e201e6a..0179d47d 100644 --- a/qt6/gen_qcursor.cpp +++ b/qt6/gen_qcursor.cpp @@ -7,40 +7,49 @@ #include "gen_qcursor.h" #include "_cgo_export.h" -QCursor* QCursor_new() { - return new QCursor(); +void QCursor_new(QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(); + *outptr_QCursor = ret; } -QCursor* QCursor_new2(int shape) { - return new QCursor(static_cast(shape)); +void QCursor_new2(int shape, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(static_cast(shape)); + *outptr_QCursor = ret; } -QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask) { - return new QCursor(*bitmap, *mask); +void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*bitmap, *mask); + *outptr_QCursor = ret; } -QCursor* QCursor_new4(QPixmap* pixmap) { - return new QCursor(*pixmap); +void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*pixmap); + *outptr_QCursor = ret; } -QCursor* QCursor_new5(QCursor* cursor) { - return new QCursor(*cursor); +void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*cursor); + *outptr_QCursor = ret; } -QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX) { - return new QCursor(*bitmap, *mask, static_cast(hotX)); +void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX)); + *outptr_QCursor = ret; } -QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY) { - return new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); +void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); + *outptr_QCursor = ret; } -QCursor* QCursor_new8(QPixmap* pixmap, int hotX) { - return new QCursor(*pixmap, static_cast(hotX)); +void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*pixmap, static_cast(hotX)); + *outptr_QCursor = ret; } -QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY) { - return new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); +void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor) { + QCursor* ret = new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); + *outptr_QCursor = ret; } void QCursor_OperatorAssign(QCursor* self, QCursor* cursor) { @@ -108,7 +117,11 @@ void QCursor_SetPos3(QScreen* screen, QPoint* p) { QCursor::setPos(screen, *p); } -void QCursor_Delete(QCursor* self) { - delete self; +void QCursor_Delete(QCursor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qcursor.go b/qt6/gen_qcursor.go index ac80b2d5..a6a5f5a6 100644 --- a/qt6/gen_qcursor.go +++ b/qt6/gen_qcursor.go @@ -14,7 +14,8 @@ import ( ) type QCursor struct { - h *C.QCursor + h *C.QCursor + isSubclass bool } func (this *QCursor) cPointer() *C.QCursor { @@ -31,6 +32,7 @@ func (this *QCursor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCursor constructs the type using only CGO pointers. func newQCursor(h *C.QCursor) *QCursor { if h == nil { return nil @@ -38,62 +40,103 @@ func newQCursor(h *C.QCursor) *QCursor { return &QCursor{h: h} } +// UnsafeNewQCursor constructs the type using only unsafe pointers. func UnsafeNewQCursor(h unsafe.Pointer) *QCursor { - return newQCursor((*C.QCursor)(h)) + if h == nil { + return nil + } + + return &QCursor{h: (*C.QCursor)(h)} } // NewQCursor constructs a new QCursor object. func NewQCursor() *QCursor { - ret := C.QCursor_new() - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new(&outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor2 constructs a new QCursor object. func NewQCursor2(shape CursorShape) *QCursor { - ret := C.QCursor_new2((C.int)(shape)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new2((C.int)(shape), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor3 constructs a new QCursor object. func NewQCursor3(bitmap *QBitmap, mask *QBitmap) *QCursor { - ret := C.QCursor_new3(bitmap.cPointer(), mask.cPointer()) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new3(bitmap.cPointer(), mask.cPointer(), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor4 constructs a new QCursor object. func NewQCursor4(pixmap *QPixmap) *QCursor { - ret := C.QCursor_new4(pixmap.cPointer()) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new4(pixmap.cPointer(), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor5 constructs a new QCursor object. func NewQCursor5(cursor *QCursor) *QCursor { - ret := C.QCursor_new5(cursor.cPointer()) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new5(cursor.cPointer(), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor6 constructs a new QCursor object. func NewQCursor6(bitmap *QBitmap, mask *QBitmap, hotX int) *QCursor { - ret := C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor7 constructs a new QCursor object. func NewQCursor7(bitmap *QBitmap, mask *QBitmap, hotX int, hotY int) *QCursor { - ret := C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor8 constructs a new QCursor object. func NewQCursor8(pixmap *QPixmap, hotX int) *QCursor { - ret := C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } // NewQCursor9 constructs a new QCursor object. func NewQCursor9(pixmap *QPixmap, hotX int, hotY int) *QCursor { - ret := C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY)) - return newQCursor(ret) + var outptr_QCursor *C.QCursor = nil + + C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) + ret := newQCursor(outptr_QCursor) + ret.isSubclass = true + return ret } func (this *QCursor) OperatorAssign(cursor *QCursor) { @@ -114,35 +157,35 @@ func (this *QCursor) SetShape(newShape CursorShape) { func (this *QCursor) Bitmap(param1 ReturnByValueConstant) *QBitmap { _ret := C.QCursor_Bitmap(this.h, (C.int)(param1)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Mask(param1 ReturnByValueConstant) *QBitmap { _ret := C.QCursor_Mask(this.h, (C.int)(param1)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Bitmap2() *QBitmap { _ret := C.QCursor_Bitmap2(this.h) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Mask2() *QBitmap { _ret := C.QCursor_Mask2(this.h) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Pixmap() *QPixmap { _ret := C.QCursor_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -186,7 +229,7 @@ func QCursor_SetPos3(screen *QScreen, p *QPoint) { // Delete this object from C++ memory. func (this *QCursor) Delete() { - C.QCursor_Delete(this.h) + C.QCursor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qcursor.h b/qt6/gen_qcursor.h index 06ce7cf7..6a20b723 100644 --- a/qt6/gen_qcursor.h +++ b/qt6/gen_qcursor.h @@ -28,15 +28,15 @@ typedef struct QPoint QPoint; typedef struct QScreen QScreen; #endif -QCursor* QCursor_new(); -QCursor* QCursor_new2(int shape); -QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask); -QCursor* QCursor_new4(QPixmap* pixmap); -QCursor* QCursor_new5(QCursor* cursor); -QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX); -QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY); -QCursor* QCursor_new8(QPixmap* pixmap, int hotX); -QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY); +void QCursor_new(QCursor** outptr_QCursor); +void QCursor_new2(int shape, QCursor** outptr_QCursor); +void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor); +void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor); +void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor); +void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor); +void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor); +void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor); +void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor); void QCursor_OperatorAssign(QCursor* self, QCursor* cursor); void QCursor_Swap(QCursor* self, QCursor* other); int QCursor_Shape(const QCursor* self); @@ -53,7 +53,7 @@ void QCursor_SetPos(int x, int y); void QCursor_SetPos2(QScreen* screen, int x, int y); void QCursor_SetPosWithQPoint(QPoint* p); void QCursor_SetPos3(QScreen* screen, QPoint* p); -void QCursor_Delete(QCursor* self); +void QCursor_Delete(QCursor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdatastream.cpp b/qt6/gen_qdatastream.cpp index 6fc74e82..0501fa3a 100644 --- a/qt6/gen_qdatastream.cpp +++ b/qt6/gen_qdatastream.cpp @@ -1,22 +1,29 @@ #include #include #include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver #include #include "gen_qdatastream.h" #include "_cgo_export.h" -QDataStream* QDataStream_new() { - return new QDataStream(); +void QDataStream_new(QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase) { + QDataStream* ret = new QDataStream(); + *outptr_QDataStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } -QDataStream* QDataStream_new2(QIODevice* param1) { - return new QDataStream(param1); +void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase) { + QDataStream* ret = new QDataStream(param1); + *outptr_QDataStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } -QDataStream* QDataStream_new3(struct miqt_string param1) { +void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase) { QByteArray param1_QByteArray(param1.data, param1.len); - return new QDataStream(param1_QByteArray); + QDataStream* ret = new QDataStream(param1_QByteArray); + *outptr_QDataStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } QIODevice* QDataStream_Device(const QDataStream* self) { @@ -216,15 +223,24 @@ bool QDataStream_IsDeviceTransactionStarted(const QDataStream* self) { return self->isDeviceTransactionStarted(); } -void QDataStream_Delete(QDataStream* self) { - delete self; +void QDataStream_Delete(QDataStream* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__StreamStateSaver* QtPrivate__StreamStateSaver_new(QDataStream* s) { - return new QtPrivate::StreamStateSaver(s); +void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver) { + QtPrivate::StreamStateSaver* ret = new QtPrivate::StreamStateSaver(s); + *outptr_QtPrivate__StreamStateSaver = ret; } -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self) { - delete self; +void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdatastream.go b/qt6/gen_qdatastream.go index 44592a42..15fd0410 100644 --- a/qt6/gen_qdatastream.go +++ b/qt6/gen_qdatastream.go @@ -80,7 +80,8 @@ const ( ) type QDataStream struct { - h *C.QDataStream + h *C.QDataStream + isSubclass bool *QIODeviceBase } @@ -98,27 +99,45 @@ func (this *QDataStream) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDataStream(h *C.QDataStream) *QDataStream { +// newQDataStream constructs the type using only CGO pointers. +func newQDataStream(h *C.QDataStream, h_QIODeviceBase *C.QIODeviceBase) *QDataStream { if h == nil { return nil } - return &QDataStream{h: h, QIODeviceBase: UnsafeNewQIODeviceBase(unsafe.Pointer(h))} + return &QDataStream{h: h, + QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} } -func UnsafeNewQDataStream(h unsafe.Pointer) *QDataStream { - return newQDataStream((*C.QDataStream)(h)) +// UnsafeNewQDataStream constructs the type using only unsafe pointers. +func UnsafeNewQDataStream(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QDataStream { + if h == nil { + return nil + } + + return &QDataStream{h: (*C.QDataStream)(h), + QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} } // NewQDataStream constructs a new QDataStream object. func NewQDataStream() *QDataStream { - ret := C.QDataStream_new() - return newQDataStream(ret) + var outptr_QDataStream *C.QDataStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QDataStream_new(&outptr_QDataStream, &outptr_QIODeviceBase) + ret := newQDataStream(outptr_QDataStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQDataStream2 constructs a new QDataStream object. func NewQDataStream2(param1 *QIODevice) *QDataStream { - ret := C.QDataStream_new2(param1.cPointer()) - return newQDataStream(ret) + var outptr_QDataStream *C.QDataStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QDataStream_new2(param1.cPointer(), &outptr_QDataStream, &outptr_QIODeviceBase) + ret := newQDataStream(outptr_QDataStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQDataStream3 constructs a new QDataStream object. @@ -126,12 +145,17 @@ func NewQDataStream3(param1 []byte) *QDataStream { param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - ret := C.QDataStream_new3(param1_alias) - return newQDataStream(ret) + var outptr_QDataStream *C.QDataStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QDataStream_new3(param1_alias, &outptr_QDataStream, &outptr_QIODeviceBase) + ret := newQDataStream(outptr_QDataStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QDataStream) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QDataStream_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QDataStream_Device(this.h)), nil, nil) } func (this *QDataStream) SetDevice(device *QIODevice) { @@ -289,7 +313,7 @@ func (this *QDataStream) OperatorShiftLeftWithStr(str string) { func (this *QDataStream) ReadBytes(param1 string, lenVal *uint) *QDataStream { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) - return UnsafeNewQDataStream(unsafe.Pointer(C.QDataStream_ReadBytes(this.h, param1_Cstring, (*C.uint)(unsafe.Pointer(lenVal))))) + return UnsafeNewQDataStream(unsafe.Pointer(C.QDataStream_ReadBytes(this.h, param1_Cstring, (*C.uint)(unsafe.Pointer(lenVal)))), nil) } func (this *QDataStream) ReadRawData(param1 string, lenVal int) int { @@ -336,7 +360,7 @@ func (this *QDataStream) IsDeviceTransactionStarted() bool { // Delete this object from C++ memory. func (this *QDataStream) Delete() { - C.QDataStream_Delete(this.h) + C.QDataStream_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -349,7 +373,8 @@ func (this *QDataStream) GoGC() { } type QtPrivate__StreamStateSaver struct { - h *C.QtPrivate__StreamStateSaver + h *C.QtPrivate__StreamStateSaver + isSubclass bool } func (this *QtPrivate__StreamStateSaver) cPointer() *C.QtPrivate__StreamStateSaver { @@ -366,6 +391,7 @@ func (this *QtPrivate__StreamStateSaver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__StreamStateSaver constructs the type using only CGO pointers. func newQtPrivate__StreamStateSaver(h *C.QtPrivate__StreamStateSaver) *QtPrivate__StreamStateSaver { if h == nil { return nil @@ -373,19 +399,28 @@ func newQtPrivate__StreamStateSaver(h *C.QtPrivate__StreamStateSaver) *QtPrivate return &QtPrivate__StreamStateSaver{h: h} } +// UnsafeNewQtPrivate__StreamStateSaver constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__StreamStateSaver(h unsafe.Pointer) *QtPrivate__StreamStateSaver { - return newQtPrivate__StreamStateSaver((*C.QtPrivate__StreamStateSaver)(h)) + if h == nil { + return nil + } + + return &QtPrivate__StreamStateSaver{h: (*C.QtPrivate__StreamStateSaver)(h)} } // NewQtPrivate__StreamStateSaver constructs a new QtPrivate::StreamStateSaver object. func NewQtPrivate__StreamStateSaver(s *QDataStream) *QtPrivate__StreamStateSaver { - ret := C.QtPrivate__StreamStateSaver_new(s.cPointer()) - return newQtPrivate__StreamStateSaver(ret) + var outptr_QtPrivate__StreamStateSaver *C.QtPrivate__StreamStateSaver = nil + + C.QtPrivate__StreamStateSaver_new(s.cPointer(), &outptr_QtPrivate__StreamStateSaver) + ret := newQtPrivate__StreamStateSaver(outptr_QtPrivate__StreamStateSaver) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__StreamStateSaver) Delete() { - C.QtPrivate__StreamStateSaver_Delete(this.h) + C.QtPrivate__StreamStateSaver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdatastream.h b/qt6/gen_qdatastream.h index 2ff910df..2a20f00e 100644 --- a/qt6/gen_qdatastream.h +++ b/qt6/gen_qdatastream.h @@ -18,6 +18,7 @@ extern "C" { class QByteArray; class QDataStream; class QIODevice; +class QIODeviceBase; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver) typedef QtPrivate::StreamStateSaver QtPrivate__StreamStateSaver; #else @@ -27,12 +28,13 @@ class QtPrivate__StreamStateSaver; typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QtPrivate__StreamStateSaver QtPrivate__StreamStateSaver; #endif -QDataStream* QDataStream_new(); -QDataStream* QDataStream_new2(QIODevice* param1); -QDataStream* QDataStream_new3(struct miqt_string param1); +void QDataStream_new(QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); +void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); +void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); QIODevice* QDataStream_Device(const QDataStream* self); void QDataStream_SetDevice(QDataStream* self, QIODevice* device); bool QDataStream_AtEnd(const QDataStream* self); @@ -81,10 +83,10 @@ bool QDataStream_CommitTransaction(QDataStream* self); void QDataStream_RollbackTransaction(QDataStream* self); void QDataStream_AbortTransaction(QDataStream* self); bool QDataStream_IsDeviceTransactionStarted(const QDataStream* self); -void QDataStream_Delete(QDataStream* self); +void QDataStream_Delete(QDataStream* self, bool isSubclass); -QtPrivate__StreamStateSaver* QtPrivate__StreamStateSaver_new(QDataStream* s); -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self); +void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver); +void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdatawidgetmapper.cpp b/qt6/gen_qdatawidgetmapper.cpp index 371f2d3b..45af3929 100644 --- a/qt6/gen_qdatawidgetmapper.cpp +++ b/qt6/gen_qdatawidgetmapper.cpp @@ -1,24 +1,237 @@ #include #include #include +#include #include +#include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qdatawidgetmapper.h" #include "_cgo_export.h" -QDataWidgetMapper* QDataWidgetMapper_new() { - return new QDataWidgetMapper(); +class MiqtVirtualQDataWidgetMapper : public virtual QDataWidgetMapper { +public: + + MiqtVirtualQDataWidgetMapper(): QDataWidgetMapper() {}; + MiqtVirtualQDataWidgetMapper(QObject* parent): QDataWidgetMapper(parent) {}; + + virtual ~MiqtVirtualQDataWidgetMapper() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCurrentIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setCurrentIndex(int index) override { + if (handle__SetCurrentIndex == 0) { + QDataWidgetMapper::setCurrentIndex(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QDataWidgetMapper_SetCurrentIndex(this, handle__SetCurrentIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCurrentIndex(int index) { + + QDataWidgetMapper::setCurrentIndex(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDataWidgetMapper::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDataWidgetMapper_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDataWidgetMapper::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDataWidgetMapper::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDataWidgetMapper_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDataWidgetMapper::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDataWidgetMapper::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDataWidgetMapper_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDataWidgetMapper::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDataWidgetMapper::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDataWidgetMapper_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDataWidgetMapper::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDataWidgetMapper::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDataWidgetMapper_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDataWidgetMapper::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDataWidgetMapper::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDataWidgetMapper_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDataWidgetMapper::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDataWidgetMapper::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDataWidgetMapper_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDataWidgetMapper::disconnectNotify(*signal); + + } + +}; + +void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { + MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(); + *outptr_QDataWidgetMapper = ret; + *outptr_QObject = static_cast(ret); } -QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent) { - return new QDataWidgetMapper(parent); +void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { + MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(parent); + *outptr_QDataWidgetMapper = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self) { @@ -157,7 +370,7 @@ void QDataWidgetMapper_CurrentIndexChanged(QDataWidgetMapper* self, int index) { } void QDataWidgetMapper_connect_CurrentIndexChanged(QDataWidgetMapper* self, intptr_t slot) { - QDataWidgetMapper::connect(self, static_cast(&QDataWidgetMapper::currentIndexChanged), self, [=](int index) { + MiqtVirtualQDataWidgetMapper::connect(self, static_cast(&QDataWidgetMapper::currentIndexChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QDataWidgetMapper_CurrentIndexChanged(slot, sigval1); }); @@ -185,7 +398,75 @@ struct miqt_string QDataWidgetMapper_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDataWidgetMapper_Delete(QDataWidgetMapper* self) { - delete self; +void QDataWidgetMapper_override_virtual_SetCurrentIndex(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__SetCurrentIndex = slot; +} + +void QDataWidgetMapper_virtualbase_SetCurrentIndex(void* self, int index) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_SetCurrentIndex(index); +} + +void QDataWidgetMapper_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__Event = slot; +} + +bool QDataWidgetMapper_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_Event(event); +} + +void QDataWidgetMapper_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__EventFilter = slot; +} + +bool QDataWidgetMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QDataWidgetMapper_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__TimerEvent = slot; +} + +void QDataWidgetMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_TimerEvent(event); +} + +void QDataWidgetMapper_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__ChildEvent = slot; +} + +void QDataWidgetMapper_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_ChildEvent(event); +} + +void QDataWidgetMapper_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__CustomEvent = slot; +} + +void QDataWidgetMapper_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_CustomEvent(event); +} + +void QDataWidgetMapper_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__ConnectNotify = slot; +} + +void QDataWidgetMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDataWidgetMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDataWidgetMapper*)(self) )->handle__DisconnectNotify = slot; +} + +void QDataWidgetMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDataWidgetMapper*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDataWidgetMapper_Delete(QDataWidgetMapper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdatawidgetmapper.go b/qt6/gen_qdatawidgetmapper.go index 433bdf66..98f2eaf0 100644 --- a/qt6/gen_qdatawidgetmapper.go +++ b/qt6/gen_qdatawidgetmapper.go @@ -22,7 +22,8 @@ const ( ) type QDataWidgetMapper struct { - h *C.QDataWidgetMapper + h *C.QDataWidgetMapper + isSubclass bool *QObject } @@ -40,27 +41,45 @@ func (this *QDataWidgetMapper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDataWidgetMapper(h *C.QDataWidgetMapper) *QDataWidgetMapper { +// newQDataWidgetMapper constructs the type using only CGO pointers. +func newQDataWidgetMapper(h *C.QDataWidgetMapper, h_QObject *C.QObject) *QDataWidgetMapper { if h == nil { return nil } - return &QDataWidgetMapper{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QDataWidgetMapper{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQDataWidgetMapper(h unsafe.Pointer) *QDataWidgetMapper { - return newQDataWidgetMapper((*C.QDataWidgetMapper)(h)) +// UnsafeNewQDataWidgetMapper constructs the type using only unsafe pointers. +func UnsafeNewQDataWidgetMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDataWidgetMapper { + if h == nil { + return nil + } + + return &QDataWidgetMapper{h: (*C.QDataWidgetMapper)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQDataWidgetMapper constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper() *QDataWidgetMapper { - ret := C.QDataWidgetMapper_new() - return newQDataWidgetMapper(ret) + var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil + var outptr_QObject *C.QObject = nil + + C.QDataWidgetMapper_new(&outptr_QDataWidgetMapper, &outptr_QObject) + ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDataWidgetMapper2 constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper2(parent *QObject) *QDataWidgetMapper { - ret := C.QDataWidgetMapper_new2(parent.cPointer()) - return newQDataWidgetMapper(ret) + var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil + var outptr_QObject *C.QObject = nil + + C.QDataWidgetMapper_new2(parent.cPointer(), &outptr_QDataWidgetMapper, &outptr_QObject) + ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDataWidgetMapper) MetaObject() *QMetaObject { @@ -87,7 +106,7 @@ func (this *QDataWidgetMapper) SetModel(model *QAbstractItemModel) { } func (this *QDataWidgetMapper) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QDataWidgetMapper_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QDataWidgetMapper_Model(this.h)), nil) } func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -95,7 +114,7 @@ func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QDataWidgetMapper) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QDataWidgetMapper_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QDataWidgetMapper_ItemDelegate(this.h)), nil) } func (this *QDataWidgetMapper) SetRootIndex(index *QModelIndex) { @@ -152,7 +171,7 @@ func (this *QDataWidgetMapper) MappedPropertyName(widget *QWidget) []byte { } func (this *QDataWidgetMapper) MappedWidgetAt(section int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section))), nil, nil) } func (this *QDataWidgetMapper) ClearMapping() { @@ -237,9 +256,198 @@ func QDataWidgetMapper_Tr3(s string, c string, n int) string { return _ret } +func (this *QDataWidgetMapper) callVirtualBase_SetCurrentIndex(index int) { + + C.QDataWidgetMapper_virtualbase_SetCurrentIndex(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QDataWidgetMapper) OnSetCurrentIndex(slot func(super func(index int), index int)) { + C.QDataWidgetMapper_override_virtual_SetCurrentIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_SetCurrentIndex +func miqt_exec_callback_QDataWidgetMapper_SetCurrentIndex(self *C.QDataWidgetMapper, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_SetCurrentIndex, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDataWidgetMapper_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDataWidgetMapper) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDataWidgetMapper_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_Event +func miqt_exec_callback_QDataWidgetMapper_Event(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDataWidgetMapper) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QDataWidgetMapper_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QDataWidgetMapper) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QDataWidgetMapper_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_EventFilter +func miqt_exec_callback_QDataWidgetMapper_EventFilter(self *C.QDataWidgetMapper, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDataWidgetMapper) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDataWidgetMapper_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDataWidgetMapper) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDataWidgetMapper_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_TimerEvent +func miqt_exec_callback_QDataWidgetMapper_TimerEvent(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QDataWidgetMapper_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDataWidgetMapper) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QDataWidgetMapper_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_ChildEvent +func miqt_exec_callback_QDataWidgetMapper_ChildEvent(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_CustomEvent(event *QEvent) { + + C.QDataWidgetMapper_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDataWidgetMapper) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDataWidgetMapper_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_CustomEvent +func miqt_exec_callback_QDataWidgetMapper_CustomEvent(self *C.QDataWidgetMapper, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QDataWidgetMapper_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDataWidgetMapper) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDataWidgetMapper_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_ConnectNotify +func miqt_exec_callback_QDataWidgetMapper_ConnectNotify(self *C.QDataWidgetMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDataWidgetMapper) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QDataWidgetMapper_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDataWidgetMapper) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDataWidgetMapper_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDataWidgetMapper_DisconnectNotify +func miqt_exec_callback_QDataWidgetMapper_DisconnectNotify(self *C.QDataWidgetMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDataWidgetMapper) Delete() { - C.QDataWidgetMapper_Delete(this.h) + C.QDataWidgetMapper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdatawidgetmapper.h b/qt6/gen_qdatawidgetmapper.h index c432f0ce..eb8e58d1 100644 --- a/qt6/gen_qdatawidgetmapper.h +++ b/qt6/gen_qdatawidgetmapper.h @@ -18,24 +18,32 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QByteArray; +class QChildEvent; class QDataWidgetMapper; +class QEvent; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; +class QTimerEvent; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QDataWidgetMapper QDataWidgetMapper; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QDataWidgetMapper* QDataWidgetMapper_new(); -QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent); +void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); +void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self); void* QDataWidgetMapper_Metacast(QDataWidgetMapper* self, const char* param1); struct miqt_string QDataWidgetMapper_Tr(const char* s); @@ -69,7 +77,23 @@ void QDataWidgetMapper_CurrentIndexChanged(QDataWidgetMapper* self, int index); void QDataWidgetMapper_connect_CurrentIndexChanged(QDataWidgetMapper* self, intptr_t slot); struct miqt_string QDataWidgetMapper_Tr2(const char* s, const char* c); struct miqt_string QDataWidgetMapper_Tr3(const char* s, const char* c, int n); -void QDataWidgetMapper_Delete(QDataWidgetMapper* self); +void QDataWidgetMapper_override_virtual_SetCurrentIndex(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_SetCurrentIndex(void* self, int index); +void QDataWidgetMapper_override_virtual_Event(void* self, intptr_t slot); +bool QDataWidgetMapper_virtualbase_Event(void* self, QEvent* event); +void QDataWidgetMapper_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDataWidgetMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDataWidgetMapper_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDataWidgetMapper_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDataWidgetMapper_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_CustomEvent(void* self, QEvent* event); +void QDataWidgetMapper_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDataWidgetMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDataWidgetMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDataWidgetMapper_Delete(QDataWidgetMapper* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdatetime.cpp b/qt6/gen_qdatetime.cpp index 860f2113..8848d983 100644 --- a/qt6/gen_qdatetime.cpp +++ b/qt6/gen_qdatetime.cpp @@ -10,20 +10,24 @@ #include "gen_qdatetime.h" #include "_cgo_export.h" -QDate* QDate_new() { - return new QDate(); +void QDate_new(QDate** outptr_QDate) { + QDate* ret = new QDate(); + *outptr_QDate = ret; } -QDate* QDate_new2(int y, int m, int d) { - return new QDate(static_cast(y), static_cast(m), static_cast(d)); +void QDate_new2(int y, int m, int d, QDate** outptr_QDate) { + QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d)); + *outptr_QDate = ret; } -QDate* QDate_new3(int y, int m, int d, QCalendar* cal) { - return new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); +void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate) { + QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); + *outptr_QDate = ret; } -QDate* QDate_new4(QDate* param1) { - return new QDate(*param1); +void QDate_new4(QDate* param1, QDate** outptr_QDate) { + QDate* ret = new QDate(*param1); + *outptr_QDate = ret; } bool QDate_IsNull(const QDate* self) { @@ -256,28 +260,37 @@ QDate* QDate_FromString34(struct miqt_string stringVal, struct miqt_string forma return new QDate(QDate::fromString(stringVal_QString, format_QString, *cal)); } -void QDate_Delete(QDate* self) { - delete self; +void QDate_Delete(QDate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTime* QTime_new() { - return new QTime(); +void QTime_new(QTime** outptr_QTime) { + QTime* ret = new QTime(); + *outptr_QTime = ret; } -QTime* QTime_new2(int h, int m) { - return new QTime(static_cast(h), static_cast(m)); +void QTime_new2(int h, int m, QTime** outptr_QTime) { + QTime* ret = new QTime(static_cast(h), static_cast(m)); + *outptr_QTime = ret; } -QTime* QTime_new3(QTime* param1) { - return new QTime(*param1); +void QTime_new3(QTime* param1, QTime** outptr_QTime) { + QTime* ret = new QTime(*param1); + *outptr_QTime = ret; } -QTime* QTime_new4(int h, int m, int s) { - return new QTime(static_cast(h), static_cast(m), static_cast(s)); +void QTime_new4(int h, int m, int s, QTime** outptr_QTime) { + QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s)); + *outptr_QTime = ret; } -QTime* QTime_new5(int h, int m, int s, int ms) { - return new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); +void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime) { + QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); + *outptr_QTime = ret; } bool QTime_IsNull(const QTime* self) { @@ -398,32 +411,42 @@ bool QTime_IsValid4(int h, int m, int s, int ms) { return QTime::isValid(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); } -void QTime_Delete(QTime* self) { - delete self; +void QTime_Delete(QTime* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDateTime* QDateTime_new() { - return new QDateTime(); +void QDateTime_new(QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new2(QDate* date, QTime* time) { - return new QDateTime(*date, *time); +void QDateTime_new2(QDate* date, QTime* time, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*date, *time); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone) { - return new QDateTime(*date, *time, *timeZone); +void QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*date, *time, *timeZone); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new4(QDateTime* other) { - return new QDateTime(*other); +void QDateTime_new4(QDateTime* other, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*other); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new5(QDate* date, QTime* time, int spec) { - return new QDateTime(*date, *time, static_cast(spec)); +void QDateTime_new5(QDate* date, QTime* time, int spec, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*date, *time, static_cast(spec)); + *outptr_QDateTime = ret; } -QDateTime* QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds) { - return new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); +void QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime) { + QDateTime* ret = new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); + *outptr_QDateTime = ret; } void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other) { @@ -689,7 +712,11 @@ QDateTime* QDateTime_FromSecsSinceEpoch3(long long secs, int spec, int offsetFro return new QDateTime(QDateTime::fromSecsSinceEpoch(static_cast(secs), static_cast(spec), static_cast(offsetFromUtc))); } -void QDateTime_Delete(QDateTime* self) { - delete self; +void QDateTime_Delete(QDateTime* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdatetime.go b/qt6/gen_qdatetime.go index 28191d2e..3d10cc90 100644 --- a/qt6/gen_qdatetime.go +++ b/qt6/gen_qdatetime.go @@ -21,7 +21,8 @@ const ( ) type QDate struct { - h *C.QDate + h *C.QDate + isSubclass bool } func (this *QDate) cPointer() *C.QDate { @@ -38,6 +39,7 @@ func (this *QDate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDate constructs the type using only CGO pointers. func newQDate(h *C.QDate) *QDate { if h == nil { return nil @@ -45,32 +47,53 @@ func newQDate(h *C.QDate) *QDate { return &QDate{h: h} } +// UnsafeNewQDate constructs the type using only unsafe pointers. func UnsafeNewQDate(h unsafe.Pointer) *QDate { - return newQDate((*C.QDate)(h)) + if h == nil { + return nil + } + + return &QDate{h: (*C.QDate)(h)} } // NewQDate constructs a new QDate object. func NewQDate() *QDate { - ret := C.QDate_new() - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new(&outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } // NewQDate2 constructs a new QDate object. func NewQDate2(y int, m int, d int) *QDate { - ret := C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d)) - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } // NewQDate3 constructs a new QDate object. func NewQDate3(y int, m int, d int, cal QCalendar) *QDate { - ret := C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer()) - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer(), &outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } // NewQDate4 constructs a new QDate object. func NewQDate4(param1 *QDate) *QDate { - ret := C.QDate_new4(param1.cPointer()) - return newQDate(ret) + var outptr_QDate *C.QDate = nil + + C.QDate_new4(param1.cPointer(), &outptr_QDate) + ret := newQDate(outptr_QDate) + ret.isSubclass = true + return ret } func (this *QDate) IsNull() bool { @@ -368,7 +391,7 @@ func QDate_FromString34(stringVal string, format string, cal QCalendar) *QDate { // Delete this object from C++ memory. func (this *QDate) Delete() { - C.QDate_Delete(this.h) + C.QDate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -381,7 +404,8 @@ func (this *QDate) GoGC() { } type QTime struct { - h *C.QTime + h *C.QTime + isSubclass bool } func (this *QTime) cPointer() *C.QTime { @@ -398,6 +422,7 @@ func (this *QTime) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTime constructs the type using only CGO pointers. func newQTime(h *C.QTime) *QTime { if h == nil { return nil @@ -405,38 +430,63 @@ func newQTime(h *C.QTime) *QTime { return &QTime{h: h} } +// UnsafeNewQTime constructs the type using only unsafe pointers. func UnsafeNewQTime(h unsafe.Pointer) *QTime { - return newQTime((*C.QTime)(h)) + if h == nil { + return nil + } + + return &QTime{h: (*C.QTime)(h)} } // NewQTime constructs a new QTime object. func NewQTime() *QTime { - ret := C.QTime_new() - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new(&outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime2 constructs a new QTime object. func NewQTime2(h int, m int) *QTime { - ret := C.QTime_new2((C.int)(h), (C.int)(m)) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new2((C.int)(h), (C.int)(m), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime3 constructs a new QTime object. func NewQTime3(param1 *QTime) *QTime { - ret := C.QTime_new3(param1.cPointer()) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new3(param1.cPointer(), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime4 constructs a new QTime object. func NewQTime4(h int, m int, s int) *QTime { - ret := C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s)) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } // NewQTime5 constructs a new QTime object. func NewQTime5(h int, m int, s int, ms int) *QTime { - ret := C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms)) - return newQTime(ret) + var outptr_QTime *C.QTime = nil + + C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms), &outptr_QTime) + ret := newQTime(outptr_QTime) + ret.isSubclass = true + return ret } func (this *QTime) IsNull() bool { @@ -583,7 +633,7 @@ func QTime_IsValid4(h int, m int, s int, ms int) bool { // Delete this object from C++ memory. func (this *QTime) Delete() { - C.QTime_Delete(this.h) + C.QTime_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -596,7 +646,8 @@ func (this *QTime) GoGC() { } type QDateTime struct { - h *C.QDateTime + h *C.QDateTime + isSubclass bool } func (this *QDateTime) cPointer() *C.QDateTime { @@ -613,6 +664,7 @@ func (this *QDateTime) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDateTime constructs the type using only CGO pointers. func newQDateTime(h *C.QDateTime) *QDateTime { if h == nil { return nil @@ -620,44 +672,73 @@ func newQDateTime(h *C.QDateTime) *QDateTime { return &QDateTime{h: h} } +// UnsafeNewQDateTime constructs the type using only unsafe pointers. func UnsafeNewQDateTime(h unsafe.Pointer) *QDateTime { - return newQDateTime((*C.QDateTime)(h)) + if h == nil { + return nil + } + + return &QDateTime{h: (*C.QDateTime)(h)} } // NewQDateTime constructs a new QDateTime object. func NewQDateTime() *QDateTime { - ret := C.QDateTime_new() - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new(&outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime2 constructs a new QDateTime object. func NewQDateTime2(date QDate, time QTime) *QDateTime { - ret := C.QDateTime_new2(date.cPointer(), time.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new2(date.cPointer(), time.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime3 constructs a new QDateTime object. func NewQDateTime3(date QDate, time QTime, timeZone *QTimeZone) *QDateTime { - ret := C.QDateTime_new3(date.cPointer(), time.cPointer(), timeZone.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new3(date.cPointer(), time.cPointer(), timeZone.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime4 constructs a new QDateTime object. func NewQDateTime4(other *QDateTime) *QDateTime { - ret := C.QDateTime_new4(other.cPointer()) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new4(other.cPointer(), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime5 constructs a new QDateTime object. func NewQDateTime5(date QDate, time QTime, spec TimeSpec) *QDateTime { - ret := C.QDateTime_new5(date.cPointer(), time.cPointer(), (C.int)(spec)) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new5(date.cPointer(), time.cPointer(), (C.int)(spec), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } // NewQDateTime6 constructs a new QDateTime object. func NewQDateTime6(date QDate, time QTime, spec TimeSpec, offsetSeconds int) *QDateTime { - ret := C.QDateTime_new6(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds)) - return newQDateTime(ret) + var outptr_QDateTime *C.QDateTime = nil + + C.QDateTime_new6(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds), &outptr_QDateTime) + ret := newQDateTime(outptr_QDateTime) + ret.isSubclass = true + return ret } func (this *QDateTime) OperatorAssign(other *QDateTime) { @@ -1002,7 +1083,7 @@ func QDateTime_FromSecsSinceEpoch3(secs int64, spec TimeSpec, offsetFromUtc int) // Delete this object from C++ memory. func (this *QDateTime) Delete() { - C.QDateTime_Delete(this.h) + C.QDateTime_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdatetime.h b/qt6/gen_qdatetime.h index d97a9821..d6a2742c 100644 --- a/qt6/gen_qdatetime.h +++ b/qt6/gen_qdatetime.h @@ -28,10 +28,10 @@ typedef struct QTime QTime; typedef struct QTimeZone QTimeZone; #endif -QDate* QDate_new(); -QDate* QDate_new2(int y, int m, int d); -QDate* QDate_new3(int y, int m, int d, QCalendar* cal); -QDate* QDate_new4(QDate* param1); +void QDate_new(QDate** outptr_QDate); +void QDate_new2(int y, int m, int d, QDate** outptr_QDate); +void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate); +void QDate_new4(QDate* param1, QDate** outptr_QDate); bool QDate_IsNull(const QDate* self); bool QDate_IsValid(const QDate* self); int QDate_Year(const QDate* self); @@ -80,13 +80,13 @@ struct miqt_string QDate_ToString1(const QDate* self, int format); struct miqt_string QDate_ToString22(const QDate* self, struct miqt_string format, QCalendar* cal); QDate* QDate_FromString23(struct miqt_string stringVal, int format); QDate* QDate_FromString34(struct miqt_string stringVal, struct miqt_string format, QCalendar* cal); -void QDate_Delete(QDate* self); +void QDate_Delete(QDate* self, bool isSubclass); -QTime* QTime_new(); -QTime* QTime_new2(int h, int m); -QTime* QTime_new3(QTime* param1); -QTime* QTime_new4(int h, int m, int s); -QTime* QTime_new5(int h, int m, int s, int ms); +void QTime_new(QTime** outptr_QTime); +void QTime_new2(int h, int m, QTime** outptr_QTime); +void QTime_new3(QTime* param1, QTime** outptr_QTime); +void QTime_new4(int h, int m, int s, QTime** outptr_QTime); +void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime); bool QTime_IsNull(const QTime* self); bool QTime_IsValid(const QTime* self); int QTime_Hour(const QTime* self); @@ -110,14 +110,14 @@ struct miqt_string QTime_ToString1(const QTime* self, int f); bool QTime_SetHMS4(QTime* self, int h, int m, int s, int ms); QTime* QTime_FromString23(struct miqt_string stringVal, int format); bool QTime_IsValid4(int h, int m, int s, int ms); -void QTime_Delete(QTime* self); +void QTime_Delete(QTime* self, bool isSubclass); -QDateTime* QDateTime_new(); -QDateTime* QDateTime_new2(QDate* date, QTime* time); -QDateTime* QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone); -QDateTime* QDateTime_new4(QDateTime* other); -QDateTime* QDateTime_new5(QDate* date, QTime* time, int spec); -QDateTime* QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds); +void QDateTime_new(QDateTime** outptr_QDateTime); +void QDateTime_new2(QDate* date, QTime* time, QDateTime** outptr_QDateTime); +void QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime); +void QDateTime_new4(QDateTime* other, QDateTime** outptr_QDateTime); +void QDateTime_new5(QDate* date, QTime* time, int spec, QDateTime** outptr_QDateTime); +void QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime); void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other); void QDateTime_Swap(QDateTime* self, QDateTime* other); bool QDateTime_IsNull(const QDateTime* self); @@ -171,7 +171,7 @@ QDateTime* QDateTime_FromMSecsSinceEpoch22(long long msecs, int spec); QDateTime* QDateTime_FromMSecsSinceEpoch3(long long msecs, int spec, int offsetFromUtc); QDateTime* QDateTime_FromSecsSinceEpoch22(long long secs, int spec); QDateTime* QDateTime_FromSecsSinceEpoch3(long long secs, int spec, int offsetFromUtc); -void QDateTime_Delete(QDateTime* self); +void QDateTime_Delete(QDateTime* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdatetimeedit.cpp b/qt6/gen_qdatetimeedit.cpp index c757397c..7fbe68f8 100644 --- a/qt6/gen_qdatetimeedit.cpp +++ b/qt6/gen_qdatetimeedit.cpp @@ -1,52 +1,845 @@ +#include #include #include +#include +#include #include #include #include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include +#include +#include +#include #include #include #include "gen_qdatetimeedit.h" #include "_cgo_export.h" -QDateTimeEdit* QDateTimeEdit_new(QWidget* parent) { - return new QDateTimeEdit(parent); +class MiqtVirtualQDateTimeEdit : public virtual QDateTimeEdit { +public: + + MiqtVirtualQDateTimeEdit(QWidget* parent): QDateTimeEdit(parent) {}; + MiqtVirtualQDateTimeEdit(): QDateTimeEdit() {}; + MiqtVirtualQDateTimeEdit(const QDateTime& dt): QDateTimeEdit(dt) {}; + MiqtVirtualQDateTimeEdit(QDate d): QDateTimeEdit(d) {}; + MiqtVirtualQDateTimeEdit(QTime t): QDateTimeEdit(t) {}; + MiqtVirtualQDateTimeEdit(const QDateTime& dt, QWidget* parent): QDateTimeEdit(dt, parent) {}; + MiqtVirtualQDateTimeEdit(QDate d, QWidget* parent): QDateTimeEdit(d, parent) {}; + MiqtVirtualQDateTimeEdit(QTime t, QWidget* parent): QDateTimeEdit(t, parent) {}; + + virtual ~MiqtVirtualQDateTimeEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDateTimeEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDateTimeEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDateTimeEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QDateTimeEdit::clear(); + return; + } + + + miqt_exec_callback_QDateTimeEdit_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QDateTimeEdit::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QDateTimeEdit::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QDateTimeEdit_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QDateTimeEdit::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDateTimeEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDateTimeEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDateTimeEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDateTimeEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDateTimeEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDateTimeEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDateTimeEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDateTimeEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDateTimeEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDateTimeEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDateTimeEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDateTimeEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QDateTimeEdit::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QDateTimeEdit_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QDateTimeEdit::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QDateTimeEdit::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QDateTimeEdit_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QDateTimeEdit::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DateTimeFromText = 0; + + // Subclass to allow providing a Go implementation + virtual QDateTime dateTimeFromText(const QString& text) const override { + if (handle__DateTimeFromText == 0) { + return QDateTimeEdit::dateTimeFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + QDateTime* callback_return_value = miqt_exec_callback_QDateTimeEdit_DateTimeFromText(const_cast(this), handle__DateTimeFromText, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QDateTime* virtualbase_DateTimeFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QDateTime(QDateTimeEdit::dateTimeFromText(text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromDateTime = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromDateTime(const QDateTime& dt) const override { + if (handle__TextFromDateTime == 0) { + return QDateTimeEdit::textFromDateTime(dt); + } + + const QDateTime& dt_ret = dt; + // Cast returned reference into pointer + QDateTime* sigval1 = const_cast(&dt_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QDateTimeEdit_TextFromDateTime(const_cast(this), handle__TextFromDateTime, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromDateTime(QDateTime* dt) const { + + QString _ret = QDateTimeEdit::textFromDateTime(*dt); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QDateTimeEdit::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QDateTimeEdit_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QDateTimeEdit::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDateTimeEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDateTimeEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDateTimeEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDateTimeEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSpinBox* option) const override { + if (handle__InitStyleOption == 0) { + QDateTimeEdit::initStyleOption(option); + return; + } + + QStyleOptionSpinBox* sigval1 = option; + + miqt_exec_callback_QDateTimeEdit_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSpinBox* option) const { + + QDateTimeEdit::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDateTimeEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDateTimeEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDateTimeEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDateTimeEdit::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDateTimeEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDateTimeEdit::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDateTimeEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDateTimeEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDateTimeEdit::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDateTimeEdit::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDateTimeEdit::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDateTimeEdit::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDateTimeEdit::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDateTimeEdit::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDateTimeEdit::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDateTimeEdit::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDateTimeEdit::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDateTimeEdit::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDateTimeEdit::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDateTimeEdit::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDateTimeEdit::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDateTimeEdit::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDateTimeEdit::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDateTimeEdit::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDateTimeEdit::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDateTimeEdit::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDateTimeEdit::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDateTimeEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDateTimeEdit::showEvent(event); + + } + +}; + +void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new2() { - return new QDateTimeEdit(); +void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt) { - return new QDateTimeEdit(*dt); +void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new4(QDate* d) { - return new QDateTimeEdit(*d); +void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new5(QTime* t) { - return new QDateTimeEdit(*t); +void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent) { - return new QDateTimeEdit(*dt, parent); +void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt, parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent) { - return new QDateTimeEdit(*d, parent); +void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d, parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent) { - return new QDateTimeEdit(*t, parent); +void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t, parent); + *outptr_QDateTimeEdit = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self) { @@ -280,7 +1073,7 @@ void QDateTimeEdit_DateTimeChanged(QDateTimeEdit* self, QDateTime* dateTime) { } void QDateTimeEdit_connect_DateTimeChanged(QDateTimeEdit* self, intptr_t slot) { - QDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateTimeChanged), self, [=](const QDateTime& dateTime) { + MiqtVirtualQDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateTimeChanged), self, [=](const QDateTime& dateTime) { const QDateTime& dateTime_ret = dateTime; // Cast returned reference into pointer QDateTime* sigval1 = const_cast(&dateTime_ret); @@ -293,7 +1086,7 @@ void QDateTimeEdit_TimeChanged(QDateTimeEdit* self, QTime* time) { } void QDateTimeEdit_connect_TimeChanged(QDateTimeEdit* self, intptr_t slot) { - QDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::timeChanged), self, [=](QTime time) { + MiqtVirtualQDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::timeChanged), self, [=](QTime time) { QTime* sigval1 = new QTime(time); miqt_exec_callback_QDateTimeEdit_TimeChanged(slot, sigval1); }); @@ -304,7 +1097,7 @@ void QDateTimeEdit_DateChanged(QDateTimeEdit* self, QDate* date) { } void QDateTimeEdit_connect_DateChanged(QDateTimeEdit* self, intptr_t slot) { - QDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateChanged), self, [=](QDate date) { + MiqtVirtualQDateTimeEdit::connect(self, static_cast(&QDateTimeEdit::dateChanged), self, [=](QDate date) { QDate* sigval1 = new QDate(date); miqt_exec_callback_QDateTimeEdit_DateChanged(slot, sigval1); }); @@ -344,135 +1137,1397 @@ struct miqt_string QDateTimeEdit_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDateTimeEdit_Delete(QDateTimeEdit* self) { - delete self; +void QDateTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__SizeHint = slot; } -QTimeEdit* QTimeEdit_new(QWidget* parent) { - return new QTimeEdit(parent); +QSize* QDateTimeEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_SizeHint(); } -QTimeEdit* QTimeEdit_new2() { - return new QTimeEdit(); +void QDateTimeEdit_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Clear = slot; } -QTimeEdit* QTimeEdit_new3(QTime* time) { - return new QTimeEdit(*time); +void QDateTimeEdit_virtualbase_Clear(void* self) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Clear(); } -QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent) { - return new QTimeEdit(*time, parent); +void QDateTimeEdit_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__StepBy = slot; } -QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self) { - return (QMetaObject*) self->metaObject(); +void QDateTimeEdit_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_StepBy(steps); } -void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1) { - return self->qt_metacast(param1); +void QDateTimeEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Event = slot; } -struct miqt_string QTimeEdit_Tr(const char* s) { - QString _ret = QTimeEdit::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QDateTimeEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Event(event); } -void QTimeEdit_UserTimeChanged(QTimeEdit* self, QTime* time) { - self->userTimeChanged(*time); +void QDateTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__KeyPressEvent = slot; } -void QTimeEdit_connect_UserTimeChanged(QTimeEdit* self, intptr_t slot) { - QTimeEdit::connect(self, static_cast(&QTimeEdit::userTimeChanged), self, [=](QTime time) { - QTime* sigval1 = new QTime(time); - miqt_exec_callback_QTimeEdit_UserTimeChanged(slot, sigval1); - }); +void QDateTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_KeyPressEvent(event); } -struct miqt_string QTimeEdit_Tr2(const char* s, const char* c) { - QString _ret = QTimeEdit::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__WheelEvent = slot; } -struct miqt_string QTimeEdit_Tr3(const char* s, const char* c, int n) { - QString _ret = QTimeEdit::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_WheelEvent(event); } -void QTimeEdit_Delete(QTimeEdit* self) { - delete self; +void QDateTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__FocusInEvent = slot; } -QDateEdit* QDateEdit_new(QWidget* parent) { - return new QDateEdit(parent); +void QDateTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_FocusInEvent(event); } -QDateEdit* QDateEdit_new2() { - return new QDateEdit(); +void QDateTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__FocusNextPrevChild = slot; } -QDateEdit* QDateEdit_new3(QDate* date) { - return new QDateEdit(*date); +bool QDateTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_FocusNextPrevChild(next); } -QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent) { - return new QDateEdit(*date, parent); +void QDateTimeEdit_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Validate = slot; } -QMetaObject* QDateEdit_MetaObject(const QDateEdit* self) { - return (QMetaObject*) self->metaObject(); +int QDateTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Validate(input, pos); } -void* QDateEdit_Metacast(QDateEdit* self, const char* param1) { - return self->qt_metacast(param1); +void QDateTimeEdit_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__Fixup = slot; } -struct miqt_string QDateEdit_Tr(const char* s) { - QString _ret = QDateEdit::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QDateTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_Fixup(input); } -void QDateEdit_UserDateChanged(QDateEdit* self, QDate* date) { - self->userDateChanged(*date); +void QDateTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__DateTimeFromText = slot; } -void QDateEdit_connect_UserDateChanged(QDateEdit* self, intptr_t slot) { - QDateEdit::connect(self, static_cast(&QDateEdit::userDateChanged), self, [=](QDate date) { - QDate* sigval1 = new QDate(date); - miqt_exec_callback_QDateEdit_UserDateChanged(slot, sigval1); - }); +QDateTime* QDateTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_DateTimeFromText(text); } -struct miqt_string QDateEdit_Tr2(const char* s, const char* c) { - QString _ret = QDateEdit::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); +void QDateTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__TextFromDateTime = slot; +} + +struct miqt_string QDateTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_TextFromDateTime(dt); +} + +void QDateTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__StepEnabled = slot; +} + +int QDateTimeEdit_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_StepEnabled(); +} + +void QDateTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QDateTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDateTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__PaintEvent = slot; +} + +void QDateTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QDateTimeEdit_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__InitStyleOption = slot; +} + +void QDateTimeEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option) { + ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_InitStyleOption(option); +} + +void QDateTimeEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDateTimeEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDateTimeEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDateTimeEdit_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDateTimeEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QDateTimeEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDateTimeEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDateTimeEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDateTimeEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QDateTimeEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDateTimeEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDateTimeEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDateTimeEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QDateTimeEdit_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDateTimeEdit_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__CloseEvent = slot; +} + +void QDateTimeEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_CloseEvent(event); +} + +void QDateTimeEdit_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__HideEvent = slot; +} + +void QDateTimeEdit_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_HideEvent(event); +} + +void QDateTimeEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDateTimeEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDateTimeEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDateTimeEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDateTimeEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__TimerEvent = slot; +} + +void QDateTimeEdit_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_TimerEvent(event); +} + +void QDateTimeEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateTimeEdit*)(self) )->handle__ShowEvent = slot; +} + +void QDateTimeEdit_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDateTimeEdit*)(self) )->virtualbase_ShowEvent(event); +} + +void QDateTimeEdit_Delete(QDateTimeEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQTimeEdit : public virtual QTimeEdit { +public: + + MiqtVirtualQTimeEdit(QWidget* parent): QTimeEdit(parent) {}; + MiqtVirtualQTimeEdit(): QTimeEdit() {}; + MiqtVirtualQTimeEdit(QTime time): QTimeEdit(time) {}; + MiqtVirtualQTimeEdit(QTime time, QWidget* parent): QTimeEdit(time, parent) {}; + + virtual ~MiqtVirtualQTimeEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTimeEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTimeEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTimeEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QTimeEdit::clear(); + return; + } + + + miqt_exec_callback_QTimeEdit_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QTimeEdit::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QTimeEdit::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QTimeEdit_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QTimeEdit::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTimeEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTimeEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTimeEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTimeEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTimeEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QTimeEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QTimeEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTimeEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTimeEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTimeEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTimeEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTimeEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QTimeEdit::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QTimeEdit_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QTimeEdit::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QTimeEdit::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QTimeEdit_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QTimeEdit::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DateTimeFromText = 0; + + // Subclass to allow providing a Go implementation + virtual QDateTime dateTimeFromText(const QString& text) const override { + if (handle__DateTimeFromText == 0) { + return QTimeEdit::dateTimeFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + QDateTime* callback_return_value = miqt_exec_callback_QTimeEdit_DateTimeFromText(const_cast(this), handle__DateTimeFromText, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QDateTime* virtualbase_DateTimeFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QDateTime(QTimeEdit::dateTimeFromText(text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromDateTime = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromDateTime(const QDateTime& dt) const override { + if (handle__TextFromDateTime == 0) { + return QTimeEdit::textFromDateTime(dt); + } + + const QDateTime& dt_ret = dt; + // Cast returned reference into pointer + QDateTime* sigval1 = const_cast(&dt_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QTimeEdit_TextFromDateTime(const_cast(this), handle__TextFromDateTime, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromDateTime(QDateTime* dt) const { + + QString _ret = QTimeEdit::textFromDateTime(*dt); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QTimeEdit::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QTimeEdit_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QTimeEdit::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTimeEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTimeEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QTimeEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QTimeEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QTimeEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSpinBox* option) const override { + if (handle__InitStyleOption == 0) { + QTimeEdit::initStyleOption(option); + return; + } + + QStyleOptionSpinBox* sigval1 = option; + + miqt_exec_callback_QTimeEdit_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSpinBox* option) const { + + QTimeEdit::initStyleOption(option); + + } + +}; + +void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(parent); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time, parent); + *outptr_QTimeEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QTimeEdit_Tr(const char* s) { + QString _ret = QTimeEdit::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTimeEdit_UserTimeChanged(QTimeEdit* self, QTime* time) { + self->userTimeChanged(*time); +} + +void QTimeEdit_connect_UserTimeChanged(QTimeEdit* self, intptr_t slot) { + MiqtVirtualQTimeEdit::connect(self, static_cast(&QTimeEdit::userTimeChanged), self, [=](QTime time) { + QTime* sigval1 = new QTime(time); + miqt_exec_callback_QTimeEdit_UserTimeChanged(slot, sigval1); + }); +} + +struct miqt_string QTimeEdit_Tr2(const char* s, const char* c) { + QString _ret = QTimeEdit::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTimeEdit_Tr3(const char* s, const char* c, int n) { + QString _ret = QTimeEdit::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QTimeEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_SizeHint(); +} + +void QTimeEdit_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Clear = slot; +} + +void QTimeEdit_virtualbase_Clear(void* self) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_Clear(); +} + +void QTimeEdit_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__StepBy = slot; +} + +void QTimeEdit_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_StepBy(steps); +} + +void QTimeEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Event = slot; +} + +bool QTimeEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_Event(event); +} + +void QTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__WheelEvent = slot; +} + +void QTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTimeEdit_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Validate = slot; +} + +int QTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_Validate(input, pos); +} + +void QTimeEdit_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__Fixup = slot; +} + +void QTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_Fixup(input); +} + +void QTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__DateTimeFromText = slot; +} + +QDateTime* QTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_DateTimeFromText(text); +} + +void QTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__TextFromDateTime = slot; +} + +struct miqt_string QTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_TextFromDateTime(dt); +} + +void QTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__StepEnabled = slot; +} + +int QTimeEdit_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_StepEnabled(); +} + +void QTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__PaintEvent = slot; +} + +void QTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQTimeEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QTimeEdit_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QTimeEdit*)(self) )->handle__InitStyleOption = slot; +} + +void QTimeEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option) { + ( (const MiqtVirtualQTimeEdit*)(self) )->virtualbase_InitStyleOption(option); +} + +void QTimeEdit_Delete(QTimeEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDateEdit : public virtual QDateEdit { +public: + + MiqtVirtualQDateEdit(QWidget* parent): QDateEdit(parent) {}; + MiqtVirtualQDateEdit(): QDateEdit() {}; + MiqtVirtualQDateEdit(QDate date): QDateEdit(date) {}; + MiqtVirtualQDateEdit(QDate date, QWidget* parent): QDateEdit(date, parent) {}; + + virtual ~MiqtVirtualQDateEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDateEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDateEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDateEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QDateEdit::clear(); + return; + } + + + miqt_exec_callback_QDateEdit_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QDateEdit::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QDateEdit::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QDateEdit_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QDateEdit::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDateEdit::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDateEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDateEdit::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDateEdit::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDateEdit::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDateEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDateEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDateEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDateEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDateEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDateEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDateEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QDateEdit::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QDateEdit_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QDateEdit::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QDateEdit::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QDateEdit_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QDateEdit::fixup(input_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DateTimeFromText = 0; + + // Subclass to allow providing a Go implementation + virtual QDateTime dateTimeFromText(const QString& text) const override { + if (handle__DateTimeFromText == 0) { + return QDateEdit::dateTimeFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + QDateTime* callback_return_value = miqt_exec_callback_QDateEdit_DateTimeFromText(const_cast(this), handle__DateTimeFromText, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QDateTime* virtualbase_DateTimeFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QDateTime(QDateEdit::dateTimeFromText(text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromDateTime = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromDateTime(const QDateTime& dt) const override { + if (handle__TextFromDateTime == 0) { + return QDateEdit::textFromDateTime(dt); + } + + const QDateTime& dt_ret = dt; + // Cast returned reference into pointer + QDateTime* sigval1 = const_cast(&dt_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QDateEdit_TextFromDateTime(const_cast(this), handle__TextFromDateTime, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromDateTime(QDateTime* dt) const { + + QString _ret = QDateEdit::textFromDateTime(*dt); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QDateEdit::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QDateEdit_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QDateEdit::stepEnabled(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDateEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDateEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDateEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDateEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDateEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSpinBox* option) const override { + if (handle__InitStyleOption == 0) { + QDateEdit::initStyleOption(option); + return; + } + + QStyleOptionSpinBox* sigval1 = option; + + miqt_exec_callback_QDateEdit_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSpinBox* option) const { + + QDateEdit::initStyleOption(option); + + } + +}; + +void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(parent); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date, parent); + *outptr_QDateEdit = ret; + *outptr_QDateTimeEdit = static_cast(ret); + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QDateEdit_MetaObject(const QDateEdit* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QDateEdit_Metacast(QDateEdit* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QDateEdit_Tr(const char* s) { + QString _ret = QDateEdit::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QDateEdit_UserDateChanged(QDateEdit* self, QDate* date) { + self->userDateChanged(*date); +} + +void QDateEdit_connect_UserDateChanged(QDateEdit* self, intptr_t slot) { + MiqtVirtualQDateEdit::connect(self, static_cast(&QDateEdit::userDateChanged), self, [=](QDate date) { + QDate* sigval1 = new QDate(date); + miqt_exec_callback_QDateEdit_UserDateChanged(slot, sigval1); + }); +} + +struct miqt_string QDateEdit_Tr2(const char* s, const char* c) { + QString _ret = QDateEdit::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } @@ -488,7 +2543,139 @@ struct miqt_string QDateEdit_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDateEdit_Delete(QDateEdit* self) { - delete self; +void QDateEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QDateEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_SizeHint(); +} + +void QDateEdit_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Clear = slot; +} + +void QDateEdit_virtualbase_Clear(void* self) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_Clear(); +} + +void QDateEdit_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__StepBy = slot; +} + +void QDateEdit_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_StepBy(steps); +} + +void QDateEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Event = slot; +} + +bool QDateEdit_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_Event(event); +} + +void QDateEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QDateEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDateEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__WheelEvent = slot; +} + +void QDateEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QDateEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QDateEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDateEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDateEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDateEdit_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Validate = slot; +} + +int QDateEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_Validate(input, pos); +} + +void QDateEdit_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__Fixup = slot; +} + +void QDateEdit_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_Fixup(input); +} + +void QDateEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__DateTimeFromText = slot; +} + +QDateTime* QDateEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_DateTimeFromText(text); +} + +void QDateEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__TextFromDateTime = slot; +} + +struct miqt_string QDateEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_TextFromDateTime(dt); +} + +void QDateEdit_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__StepEnabled = slot; +} + +int QDateEdit_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_StepEnabled(); +} + +void QDateEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QDateEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDateEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__PaintEvent = slot; +} + +void QDateEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDateEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QDateEdit_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QDateEdit*)(self) )->handle__InitStyleOption = slot; +} + +void QDateEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option) { + ( (const MiqtVirtualQDateEdit*)(self) )->virtualbase_InitStyleOption(option); +} + +void QDateEdit_Delete(QDateEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdatetimeedit.go b/qt6/gen_qdatetimeedit.go index 28b43f05..ea5f1e4a 100644 --- a/qt6/gen_qdatetimeedit.go +++ b/qt6/gen_qdatetimeedit.go @@ -31,7 +31,8 @@ const ( ) type QDateTimeEdit struct { - h *C.QDateTimeEdit + h *C.QDateTimeEdit + isSubclass bool *QAbstractSpinBox } @@ -49,63 +50,135 @@ func (this *QDateTimeEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDateTimeEdit(h *C.QDateTimeEdit) *QDateTimeEdit { +// newQDateTimeEdit constructs the type using only CGO pointers. +func newQDateTimeEdit(h *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateTimeEdit { if h == nil { return nil } - return &QDateTimeEdit{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))} + return &QDateTimeEdit{h: h, + QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDateTimeEdit(h unsafe.Pointer) *QDateTimeEdit { - return newQDateTimeEdit((*C.QDateTimeEdit)(h)) +// UnsafeNewQDateTimeEdit constructs the type using only unsafe pointers. +func UnsafeNewQDateTimeEdit(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateTimeEdit { + if h == nil { + return nil + } + + return &QDateTimeEdit{h: (*C.QDateTimeEdit)(h), + QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDateTimeEdit constructs a new QDateTimeEdit object. func NewQDateTimeEdit(parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new(parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new(parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit2 constructs a new QDateTimeEdit object. func NewQDateTimeEdit2() *QDateTimeEdit { - ret := C.QDateTimeEdit_new2() - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new2(&outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit3 constructs a new QDateTimeEdit object. func NewQDateTimeEdit3(dt *QDateTime) *QDateTimeEdit { - ret := C.QDateTimeEdit_new3(dt.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new3(dt.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit4 constructs a new QDateTimeEdit object. func NewQDateTimeEdit4(d QDate) *QDateTimeEdit { - ret := C.QDateTimeEdit_new4(d.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new4(d.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit5 constructs a new QDateTimeEdit object. func NewQDateTimeEdit5(t QTime) *QDateTimeEdit { - ret := C.QDateTimeEdit_new5(t.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new5(t.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit6 constructs a new QDateTimeEdit object. func NewQDateTimeEdit6(dt *QDateTime, parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit7 constructs a new QDateTimeEdit object. func NewQDateTimeEdit7(d QDate, parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDateTimeEdit8 constructs a new QDateTimeEdit object. func NewQDateTimeEdit8(t QTime, parent *QWidget) *QDateTimeEdit { - ret := C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer()) - return newQDateTimeEdit(ret) + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDateTimeEdit) MetaObject() *QMetaObject { @@ -286,7 +359,7 @@ func (this *QDateTimeEdit) SetCurrentSectionIndex(index int) { } func (this *QDateTimeEdit) CalendarWidget() *QCalendarWidget { - return UnsafeNewQCalendarWidget(unsafe.Pointer(C.QDateTimeEdit_CalendarWidget(this.h))) + return UnsafeNewQCalendarWidget(unsafe.Pointer(C.QDateTimeEdit_CalendarWidget(this.h)), nil, nil, nil) } func (this *QDateTimeEdit) SetCalendarWidget(calendarWidget *QCalendarWidget) { @@ -458,273 +531,1890 @@ func QDateTimeEdit_Tr3(s string, c string, n int) string { return _ret } -// Delete this object from C++ memory. -func (this *QDateTimeEdit) Delete() { - C.QDateTimeEdit_Delete(this.h) -} +func (this *QDateTimeEdit) callVirtualBase_SizeHint() *QSize { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QDateTimeEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QDateTimeEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + _ret := C.QDateTimeEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -type QTimeEdit struct { - h *C.QTimeEdit - *QDateTimeEdit +} +func (this *QDateTimeEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDateTimeEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTimeEdit) cPointer() *C.QTimeEdit { - if this == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_SizeHint +func miqt_exec_callback_QDateTimeEdit_SizeHint(self *C.QDateTimeEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func (this *QTimeEdit) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QDateTimeEdit) callVirtualBase_Clear() { + + C.QDateTimeEdit_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QDateTimeEdit) OnClear(slot func(super func())) { + C.QDateTimeEdit_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQTimeEdit(h *C.QTimeEdit) *QTimeEdit { - if h == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_Clear +func miqt_exec_callback_QDateTimeEdit_Clear(self *C.QDateTimeEdit, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QTimeEdit{h: h, QDateTimeEdit: UnsafeNewQDateTimeEdit(unsafe.Pointer(h))} -} -func UnsafeNewQTimeEdit(h unsafe.Pointer) *QTimeEdit { - return newQTimeEdit((*C.QTimeEdit)(h)) -} + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Clear) -// NewQTimeEdit constructs a new QTimeEdit object. -func NewQTimeEdit(parent *QWidget) *QTimeEdit { - ret := C.QTimeEdit_new(parent.cPointer()) - return newQTimeEdit(ret) } -// NewQTimeEdit2 constructs a new QTimeEdit object. -func NewQTimeEdit2() *QTimeEdit { - ret := C.QTimeEdit_new2() - return newQTimeEdit(ret) -} +func (this *QDateTimeEdit) callVirtualBase_StepBy(steps int) { -// NewQTimeEdit3 constructs a new QTimeEdit object. -func NewQTimeEdit3(time QTime) *QTimeEdit { - ret := C.QTimeEdit_new3(time.cPointer()) - return newQTimeEdit(ret) -} + C.QDateTimeEdit_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) -// NewQTimeEdit4 constructs a new QTimeEdit object. -func NewQTimeEdit4(time QTime, parent *QWidget) *QTimeEdit { - ret := C.QTimeEdit_new4(time.cPointer(), parent.cPointer()) - return newQTimeEdit(ret) } - -func (this *QTimeEdit) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QTimeEdit_MetaObject(this.h))) +func (this *QDateTimeEdit) OnStepBy(slot func(super func(steps int), steps int)) { + C.QDateTimeEdit_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTimeEdit) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QTimeEdit_Metacast(this.h, param1_Cstring)) -} +//export miqt_exec_callback_QDateTimeEdit_StepBy +func miqt_exec_callback_QDateTimeEdit_StepBy(self *C.QDateTimeEdit, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_StepBy, slotval1) -func QTimeEdit_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -func (this *QTimeEdit) UserTimeChanged(time QTime) { - C.QTimeEdit_UserTimeChanged(this.h, time.cPointer()) +func (this *QDateTimeEdit) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDateTimeEdit_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + } -func (this *QTimeEdit) OnUserTimeChanged(slot func(time QTime)) { - C.QTimeEdit_connect_UserTimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QDateTimeEdit) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDateTimeEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QTimeEdit_UserTimeChanged -func miqt_exec_callback_QTimeEdit_UserTimeChanged(cb C.intptr_t, time *C.QTime) { - gofunc, ok := cgo.Handle(cb).Value().(func(time QTime)) +//export miqt_exec_callback_QDateTimeEdit_Event +func miqt_exec_callback_QDateTimeEdit_Event(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - time_ret := time - time_goptr := newQTime(time_ret) - time_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *time_goptr + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) - gofunc(slotval1) -} + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Event, slotval1) -func QTimeEdit_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + return (C.bool)(virtualReturn) -func QTimeEdit_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QTimeEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } -// Delete this object from C++ memory. -func (this *QTimeEdit) Delete() { - C.QTimeEdit_Delete(this.h) -} +func (this *QDateTimeEdit) callVirtualBase_KeyPressEvent(event *QKeyEvent) { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QTimeEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QTimeEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + C.QDateTimeEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) -type QDateEdit struct { - h *C.QDateEdit - *QDateTimeEdit +} +func (this *QDateTimeEdit) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDateTimeEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDateEdit) cPointer() *C.QDateEdit { - if this == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_KeyPressEvent +func miqt_exec_callback_QDateTimeEdit_KeyPressEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + } -func (this *QDateEdit) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QDateTimeEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDateTimeEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDateTimeEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQDateEdit(h *C.QDateEdit) *QDateEdit { - if h == nil { - return nil +//export miqt_exec_callback_QDateTimeEdit_WheelEvent +func miqt_exec_callback_QDateTimeEdit_WheelEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QDateEdit{h: h, QDateTimeEdit: UnsafeNewQDateTimeEdit(unsafe.Pointer(h))} + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + } -func UnsafeNewQDateEdit(h unsafe.Pointer) *QDateEdit { - return newQDateEdit((*C.QDateEdit)(h)) +func (this *QDateTimeEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDateTimeEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDateTimeEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQDateEdit constructs a new QDateEdit object. -func NewQDateEdit(parent *QWidget) *QDateEdit { - ret := C.QDateEdit_new(parent.cPointer()) - return newQDateEdit(ret) +//export miqt_exec_callback_QDateTimeEdit_FocusInEvent +func miqt_exec_callback_QDateTimeEdit_FocusInEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + } -// NewQDateEdit2 constructs a new QDateEdit object. -func NewQDateEdit2() *QDateEdit { - ret := C.QDateEdit_new2() - return newQDateEdit(ret) +func (this *QDateTimeEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDateTimeEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDateTimeEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDateTimeEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQDateEdit3 constructs a new QDateEdit object. -func NewQDateEdit3(date QDate) *QDateEdit { - ret := C.QDateEdit_new3(date.cPointer()) - return newQDateEdit(ret) +//export miqt_exec_callback_QDateTimeEdit_FocusNextPrevChild +func miqt_exec_callback_QDateTimeEdit_FocusNextPrevChild(self *C.QDateTimeEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + } -// NewQDateEdit4 constructs a new QDateEdit object. -func NewQDateEdit4(date QDate, parent *QWidget) *QDateEdit { - ret := C.QDateEdit_new4(date.cPointer(), parent.cPointer()) - return newQDateEdit(ret) +func (this *QDateTimeEdit) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QDateTimeEdit_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QDateTimeEdit) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QDateTimeEdit_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDateEdit) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QDateEdit_MetaObject(this.h))) +//export miqt_exec_callback_QDateTimeEdit_Validate +func miqt_exec_callback_QDateTimeEdit_Validate(self *C.QDateTimeEdit, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + } -func (this *QDateEdit) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QDateEdit_Metacast(this.h, param1_Cstring)) +func (this *QDateTimeEdit) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QDateTimeEdit_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QDateTimeEdit) OnFixup(slot func(super func(input string), input string)) { + C.QDateTimeEdit_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QDateEdit_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QDateEdit_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QDateTimeEdit_Fixup +func miqt_exec_callback_QDateTimeEdit_Fixup(self *C.QDateTimeEdit, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_Fixup, slotval1) + } -func (this *QDateEdit) UserDateChanged(date QDate) { - C.QDateEdit_UserDateChanged(this.h, date.cPointer()) +func (this *QDateTimeEdit) callVirtualBase_DateTimeFromText(text string) *QDateTime { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QDateTimeEdit_virtualbase_DateTimeFromText(unsafe.Pointer(this.h), text_ms) + _goptr := newQDateTime(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + } -func (this *QDateEdit) OnUserDateChanged(slot func(date QDate)) { - C.QDateEdit_connect_UserDateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QDateTimeEdit) OnDateTimeFromText(slot func(super func(text string) *QDateTime, text string) *QDateTime) { + C.QDateTimeEdit_override_virtual_DateTimeFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDateEdit_UserDateChanged -func miqt_exec_callback_QDateEdit_UserDateChanged(cb C.intptr_t, date *C.QDate) { - gofunc, ok := cgo.Handle(cb).Value().(func(date QDate)) +//export miqt_exec_callback_QDateTimeEdit_DateTimeFromText +func miqt_exec_callback_QDateTimeEdit_DateTimeFromText(self *C.QDateTimeEdit, cb C.intptr_t, text C.struct_miqt_string) *C.QDateTime { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) *QDateTime, text string) *QDateTime) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - date_ret := date - date_goptr := newQDate(date_ret) - date_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - slotval1 := *date_goptr + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_DateTimeFromText, slotval1) + + return virtualReturn.cPointer() - gofunc(slotval1) } -func QDateEdit_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDateEdit_Tr2(s_Cstring, c_Cstring) +func (this *QDateTimeEdit) callVirtualBase_TextFromDateTime(dt *QDateTime) string { + + var _ms C.struct_miqt_string = C.QDateTimeEdit_virtualbase_TextFromDateTime(unsafe.Pointer(this.h), dt.cPointer()) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QDateTimeEdit) OnTextFromDateTime(slot func(super func(dt *QDateTime) string, dt *QDateTime) string) { + C.QDateTimeEdit_override_virtual_TextFromDateTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_TextFromDateTime +func miqt_exec_callback_QDateTimeEdit_TextFromDateTime(self *C.QDateTimeEdit, cb C.intptr_t, dt *C.QDateTime) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dt *QDateTime) string, dt *QDateTime) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dt)) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_TextFromDateTime, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QDateTimeEdit) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QDateTimeEdit_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QDateTimeEdit) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QDateTimeEdit_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_StepEnabled +func miqt_exec_callback_QDateTimeEdit_StepEnabled(self *C.QDateTimeEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QDateTimeEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDateTimeEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateTimeEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MousePressEvent +func miqt_exec_callback_QDateTimeEdit_MousePressEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDateTimeEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDateTimeEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_PaintEvent +func miqt_exec_callback_QDateTimeEdit_PaintEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_InitStyleOption(option *QStyleOptionSpinBox) { + + C.QDateTimeEdit_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QDateTimeEdit) OnInitStyleOption(slot func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) { + C.QDateTimeEdit_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_InitStyleOption +func miqt_exec_callback_QDateTimeEdit_InitStyleOption(self *C.QDateTimeEdit, cb C.intptr_t, option *C.QStyleOptionSpinBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSpinBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDateTimeEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateTimeEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDateTimeEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MinimumSizeHint +func miqt_exec_callback_QDateTimeEdit_MinimumSizeHint(self *C.QDateTimeEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDateTimeEdit) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDateTimeEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateTimeEdit) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDateTimeEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_InputMethodQuery +func miqt_exec_callback_QDateTimeEdit_InputMethodQuery(self *C.QDateTimeEdit, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDateTimeEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDateTimeEdit) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDateTimeEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDateTimeEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ResizeEvent +func miqt_exec_callback_QDateTimeEdit_ResizeEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDateTimeEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDateTimeEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent +func miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDateTimeEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDateTimeEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_FocusOutEvent +func miqt_exec_callback_QDateTimeEdit_FocusOutEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDateTimeEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDateTimeEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ContextMenuEvent +func miqt_exec_callback_QDateTimeEdit_ContextMenuEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDateTimeEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDateTimeEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ChangeEvent +func miqt_exec_callback_QDateTimeEdit_ChangeEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDateTimeEdit_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDateTimeEdit_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_CloseEvent +func miqt_exec_callback_QDateTimeEdit_CloseEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDateTimeEdit_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDateTimeEdit_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_HideEvent +func miqt_exec_callback_QDateTimeEdit_HideEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDateTimeEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateTimeEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent +func miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDateTimeEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateTimeEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_MouseMoveEvent +func miqt_exec_callback_QDateTimeEdit_MouseMoveEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDateTimeEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDateTimeEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_TimerEvent +func miqt_exec_callback_QDateTimeEdit_TimerEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDateTimeEdit) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDateTimeEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateTimeEdit) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDateTimeEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateTimeEdit_ShowEvent +func miqt_exec_callback_QDateTimeEdit_ShowEvent(self *C.QDateTimeEdit, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QDateTimeEdit) Delete() { + C.QDateTimeEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QDateTimeEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QDateTimeEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QTimeEdit struct { + h *C.QTimeEdit + isSubclass bool + *QDateTimeEdit +} + +func (this *QTimeEdit) cPointer() *C.QTimeEdit { + if this == nil { + return nil + } + return this.h +} + +func (this *QTimeEdit) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQTimeEdit constructs the type using only CGO pointers. +func newQTimeEdit(h *C.QTimeEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTimeEdit { + if h == nil { + return nil + } + return &QTimeEdit{h: h, + QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQTimeEdit constructs the type using only unsafe pointers. +func UnsafeNewQTimeEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTimeEdit { + if h == nil { + return nil + } + + return &QTimeEdit{h: (*C.QTimeEdit)(h), + QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQTimeEdit constructs a new QTimeEdit object. +func NewQTimeEdit(parent *QWidget) *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new(parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQTimeEdit2 constructs a new QTimeEdit object. +func NewQTimeEdit2() *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new2(&outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQTimeEdit3 constructs a new QTimeEdit object. +func NewQTimeEdit3(time QTime) *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new3(time.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQTimeEdit4 constructs a new QTimeEdit object. +func NewQTimeEdit4(time QTime, parent *QWidget) *QTimeEdit { + var outptr_QTimeEdit *C.QTimeEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTimeEdit_new4(time.cPointer(), parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QTimeEdit) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QTimeEdit_MetaObject(this.h))) +} + +func (this *QTimeEdit) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QTimeEdit_Metacast(this.h, param1_Cstring)) +} + +func QTimeEdit_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QTimeEdit) UserTimeChanged(time QTime) { + C.QTimeEdit_UserTimeChanged(this.h, time.cPointer()) +} +func (this *QTimeEdit) OnUserTimeChanged(slot func(time QTime)) { + C.QTimeEdit_connect_UserTimeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_UserTimeChanged +func miqt_exec_callback_QTimeEdit_UserTimeChanged(cb C.intptr_t, time *C.QTime) { + gofunc, ok := cgo.Handle(cb).Value().(func(time QTime)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + time_ret := time + time_goptr := newQTime(time_ret) + time_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *time_goptr + + gofunc(slotval1) +} + +func QTimeEdit_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QTimeEdit_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QTimeEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QTimeEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTimeEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTimeEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTimeEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_SizeHint +func miqt_exec_callback_QTimeEdit_SizeHint(self *C.QTimeEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTimeEdit) callVirtualBase_Clear() { + + C.QTimeEdit_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QTimeEdit) OnClear(slot func(super func())) { + C.QTimeEdit_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Clear +func miqt_exec_callback_QTimeEdit_Clear(self *C.QTimeEdit, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTimeEdit{h: self}).callVirtualBase_Clear) + +} + +func (this *QTimeEdit) callVirtualBase_StepBy(steps int) { + + C.QTimeEdit_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QTimeEdit) OnStepBy(slot func(super func(steps int), steps int)) { + C.QTimeEdit_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_StepBy +func miqt_exec_callback_QTimeEdit_StepBy(self *C.QTimeEdit, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTimeEdit_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTimeEdit) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTimeEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Event +func miqt_exec_callback_QTimeEdit_Event(self *C.QTimeEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTimeEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTimeEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_KeyPressEvent +func miqt_exec_callback_QTimeEdit_KeyPressEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QTimeEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QTimeEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_WheelEvent +func miqt_exec_callback_QTimeEdit_WheelEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTimeEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTimeEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_FocusInEvent +func miqt_exec_callback_QTimeEdit_FocusInEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTimeEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTimeEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTimeEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_FocusNextPrevChild +func miqt_exec_callback_QTimeEdit_FocusNextPrevChild(self *C.QTimeEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QTimeEdit_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QTimeEdit) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QTimeEdit_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Validate +func miqt_exec_callback_QTimeEdit_Validate(self *C.QTimeEdit, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QTimeEdit_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QTimeEdit) OnFixup(slot func(super func(input string), input string)) { + C.QTimeEdit_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_Fixup +func miqt_exec_callback_QTimeEdit_Fixup(self *C.QTimeEdit, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QTimeEdit{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_DateTimeFromText(text string) *QDateTime { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QTimeEdit_virtualbase_DateTimeFromText(unsafe.Pointer(this.h), text_ms) + _goptr := newQDateTime(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTimeEdit) OnDateTimeFromText(slot func(super func(text string) *QDateTime, text string) *QDateTime) { + C.QTimeEdit_override_virtual_DateTimeFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_DateTimeFromText +func miqt_exec_callback_QTimeEdit_DateTimeFromText(self *C.QTimeEdit, cb C.intptr_t, text C.struct_miqt_string) *C.QDateTime { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) *QDateTime, text string) *QDateTime) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_DateTimeFromText, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTimeEdit) callVirtualBase_TextFromDateTime(dt *QDateTime) string { + + var _ms C.struct_miqt_string = C.QTimeEdit_virtualbase_TextFromDateTime(unsafe.Pointer(this.h), dt.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QTimeEdit) OnTextFromDateTime(slot func(super func(dt *QDateTime) string, dt *QDateTime) string) { + C.QTimeEdit_override_virtual_TextFromDateTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_TextFromDateTime +func miqt_exec_callback_QTimeEdit_TextFromDateTime(self *C.QTimeEdit, cb C.intptr_t, dt *C.QDateTime) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dt *QDateTime) string, dt *QDateTime) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dt)) + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_TextFromDateTime, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QTimeEdit) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QTimeEdit_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QTimeEdit) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QTimeEdit_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_StepEnabled +func miqt_exec_callback_QTimeEdit_StepEnabled(self *C.QTimeEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTimeEdit{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QTimeEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTimeEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTimeEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_MousePressEvent +func miqt_exec_callback_QTimeEdit_MousePressEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QTimeEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QTimeEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_PaintEvent +func miqt_exec_callback_QTimeEdit_PaintEvent(self *C.QTimeEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTimeEdit) callVirtualBase_InitStyleOption(option *QStyleOptionSpinBox) { + + C.QTimeEdit_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QTimeEdit) OnInitStyleOption(slot func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) { + C.QTimeEdit_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeEdit_InitStyleOption +func miqt_exec_callback_QTimeEdit_InitStyleOption(self *C.QTimeEdit, cb C.intptr_t, option *C.QStyleOptionSpinBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSpinBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QTimeEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QTimeEdit) Delete() { + C.QTimeEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QTimeEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QTimeEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QDateEdit struct { + h *C.QDateEdit + isSubclass bool + *QDateTimeEdit +} + +func (this *QDateEdit) cPointer() *C.QDateEdit { + if this == nil { + return nil + } + return this.h +} + +func (this *QDateEdit) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQDateEdit constructs the type using only CGO pointers. +func newQDateEdit(h *C.QDateEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateEdit { + if h == nil { + return nil + } + return &QDateEdit{h: h, + QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQDateEdit constructs the type using only unsafe pointers. +func UnsafeNewQDateEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateEdit { + if h == nil { + return nil + } + + return &QDateEdit{h: (*C.QDateEdit)(h), + QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQDateEdit constructs a new QDateEdit object. +func NewQDateEdit(parent *QWidget) *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new(parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDateEdit2 constructs a new QDateEdit object. +func NewQDateEdit2() *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new2(&outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDateEdit3 constructs a new QDateEdit object. +func NewQDateEdit3(date QDate) *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new3(date.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDateEdit4 constructs a new QDateEdit object. +func NewQDateEdit4(date QDate, parent *QWidget) *QDateEdit { + var outptr_QDateEdit *C.QDateEdit = nil + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDateEdit_new4(date.cPointer(), parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QDateEdit) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QDateEdit_MetaObject(this.h))) +} + +func (this *QDateEdit) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QDateEdit_Metacast(this.h, param1_Cstring)) +} + +func QDateEdit_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QDateEdit_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDateEdit) UserDateChanged(date QDate) { + C.QDateEdit_UserDateChanged(this.h, date.cPointer()) +} +func (this *QDateEdit) OnUserDateChanged(slot func(date QDate)) { + C.QDateEdit_connect_UserDateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_UserDateChanged +func miqt_exec_callback_QDateEdit_UserDateChanged(cb C.intptr_t, date *C.QDate) { + gofunc, ok := cgo.Handle(cb).Value().(func(date QDate)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + date_ret := date + date_goptr := newQDate(date_ret) + date_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *date_goptr + + gofunc(slotval1) +} + +func QDateEdit_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDateEdit_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDateEdit_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDateEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDateEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDateEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDateEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_SizeHint +func miqt_exec_callback_QDateEdit_SizeHint(self *C.QDateEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDateEdit) callVirtualBase_Clear() { + + C.QDateEdit_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QDateEdit) OnClear(slot func(super func())) { + C.QDateEdit_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Clear +func miqt_exec_callback_QDateEdit_Clear(self *C.QDateEdit, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDateEdit{h: self}).callVirtualBase_Clear) + +} + +func (this *QDateEdit) callVirtualBase_StepBy(steps int) { + + C.QDateEdit_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QDateEdit) OnStepBy(slot func(super func(steps int), steps int)) { + C.QDateEdit_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_StepBy +func miqt_exec_callback_QDateEdit_StepBy(self *C.QDateEdit, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QDateEdit{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDateEdit_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDateEdit) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDateEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Event +func miqt_exec_callback_QDateEdit_Event(self *C.QDateEdit, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDateEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDateEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_KeyPressEvent +func miqt_exec_callback_QDateEdit_KeyPressEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDateEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDateEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_WheelEvent +func miqt_exec_callback_QDateEdit_WheelEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDateEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDateEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_FocusInEvent +func miqt_exec_callback_QDateEdit_FocusInEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDateEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDateEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDateEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_FocusNextPrevChild +func miqt_exec_callback_QDateEdit_FocusNextPrevChild(self *C.QDateEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QDateEdit_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QDateEdit) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QDateEdit_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Validate +func miqt_exec_callback_QDateEdit_Validate(self *C.QDateEdit, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QDateEdit_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QDateEdit) OnFixup(slot func(super func(input string), input string)) { + C.QDateEdit_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_Fixup +func miqt_exec_callback_QDateEdit_Fixup(self *C.QDateEdit, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QDateEdit{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_DateTimeFromText(text string) *QDateTime { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QDateEdit_virtualbase_DateTimeFromText(unsafe.Pointer(this.h), text_ms) + _goptr := newQDateTime(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDateEdit) OnDateTimeFromText(slot func(super func(text string) *QDateTime, text string) *QDateTime) { + C.QDateEdit_override_virtual_DateTimeFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_DateTimeFromText +func miqt_exec_callback_QDateEdit_DateTimeFromText(self *C.QDateEdit, cb C.intptr_t, text C.struct_miqt_string) *C.QDateTime { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) *QDateTime, text string) *QDateTime) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_DateTimeFromText, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDateEdit) callVirtualBase_TextFromDateTime(dt *QDateTime) string { + + var _ms C.struct_miqt_string = C.QDateEdit_virtualbase_TextFromDateTime(unsafe.Pointer(this.h), dt.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QDateEdit) OnTextFromDateTime(slot func(super func(dt *QDateTime) string, dt *QDateTime) string) { + C.QDateEdit_override_virtual_TextFromDateTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_TextFromDateTime +func miqt_exec_callback_QDateEdit_TextFromDateTime(self *C.QDateEdit, cb C.intptr_t, dt *C.QDateTime) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dt *QDateTime) string, dt *QDateTime) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDateTime(unsafe.Pointer(dt)) + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_TextFromDateTime, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QDateEdit) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QDateEdit_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QDateEdit) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QDateEdit_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_StepEnabled +func miqt_exec_callback_QDateEdit_StepEnabled(self *C.QDateEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDateEdit{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +func (this *QDateEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDateEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDateEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_MousePressEvent +func miqt_exec_callback_QDateEdit_MousePressEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDateEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDateEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDateEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_PaintEvent +func miqt_exec_callback_QDateEdit_PaintEvent(self *C.QDateEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDateEdit) callVirtualBase_InitStyleOption(option *QStyleOptionSpinBox) { + + C.QDateEdit_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QDateEdit) OnInitStyleOption(slot func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) { + C.QDateEdit_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDateEdit_InitStyleOption +func miqt_exec_callback_QDateEdit_InitStyleOption(self *C.QDateEdit, cb C.intptr_t, option *C.QStyleOptionSpinBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSpinBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QDateEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) -func QDateEdit_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDateEdit_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret } // Delete this object from C++ memory. func (this *QDateEdit) Delete() { - C.QDateEdit_Delete(this.h) + C.QDateEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdatetimeedit.h b/qt6/gen_qdatetimeedit.h index 79ba779c..daa685d2 100644 --- a/qt6/gen_qdatetimeedit.h +++ b/qt6/gen_qdatetimeedit.h @@ -15,41 +15,73 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSpinBox; class QCalendar; class QCalendarWidget; +class QCloseEvent; +class QContextMenuEvent; class QDate; class QDateEdit; class QDateTime; class QDateTimeEdit; class QEvent; +class QFocusEvent; +class QHideEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionSpinBox; class QTime; class QTimeEdit; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSpinBox QAbstractSpinBox; typedef struct QCalendar QCalendar; typedef struct QCalendarWidget QCalendarWidget; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDate QDate; typedef struct QDateEdit QDateEdit; typedef struct QDateTime QDateTime; typedef struct QDateTimeEdit QDateTimeEdit; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionSpinBox QStyleOptionSpinBox; typedef struct QTime QTime; typedef struct QTimeEdit QTimeEdit; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDateTimeEdit* QDateTimeEdit_new(QWidget* parent); -QDateTimeEdit* QDateTimeEdit_new2(); -QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt); -QDateTimeEdit* QDateTimeEdit_new4(QDate* d); -QDateTimeEdit* QDateTimeEdit_new5(QTime* t); -QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent); -QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent); -QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent); +void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self); void* QDateTimeEdit_Metacast(QDateTimeEdit* self, const char* param1); struct miqt_string QDateTimeEdit_Tr(const char* s); @@ -109,14 +141,84 @@ void QDateTimeEdit_connect_DateChanged(QDateTimeEdit* self, intptr_t slot); void QDateTimeEdit_SetDateTime(QDateTimeEdit* self, QDateTime* dateTime); void QDateTimeEdit_SetDate(QDateTimeEdit* self, QDate* date); void QDateTimeEdit_SetTime(QDateTimeEdit* self, QTime* time); +void QDateTimeEdit_KeyPressEvent(QDateTimeEdit* self, QKeyEvent* event); +void QDateTimeEdit_WheelEvent(QDateTimeEdit* self, QWheelEvent* event); +void QDateTimeEdit_FocusInEvent(QDateTimeEdit* self, QFocusEvent* event); +bool QDateTimeEdit_FocusNextPrevChild(QDateTimeEdit* self, bool next); +int QDateTimeEdit_Validate(const QDateTimeEdit* self, struct miqt_string input, int* pos); +void QDateTimeEdit_Fixup(const QDateTimeEdit* self, struct miqt_string input); +QDateTime* QDateTimeEdit_DateTimeFromText(const QDateTimeEdit* self, struct miqt_string text); +struct miqt_string QDateTimeEdit_TextFromDateTime(const QDateTimeEdit* self, QDateTime* dt); +int QDateTimeEdit_StepEnabled(const QDateTimeEdit* self); +void QDateTimeEdit_MousePressEvent(QDateTimeEdit* self, QMouseEvent* event); +void QDateTimeEdit_PaintEvent(QDateTimeEdit* self, QPaintEvent* event); +void QDateTimeEdit_InitStyleOption(const QDateTimeEdit* self, QStyleOptionSpinBox* option); struct miqt_string QDateTimeEdit_Tr2(const char* s, const char* c); struct miqt_string QDateTimeEdit_Tr3(const char* s, const char* c, int n); -void QDateTimeEdit_Delete(QDateTimeEdit* self); +void QDateTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDateTimeEdit_virtualbase_SizeHint(const void* self); +void QDateTimeEdit_override_virtual_Clear(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_Clear(void* self); +void QDateTimeEdit_override_virtual_StepBy(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_StepBy(void* self, int steps); +void QDateTimeEdit_override_virtual_Event(void* self, intptr_t slot); +bool QDateTimeEdit_virtualbase_Event(void* self, QEvent* event); +void QDateTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDateTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDateTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDateTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDateTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDateTimeEdit_override_virtual_Validate(void* self, intptr_t slot); +int QDateTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QDateTimeEdit_override_virtual_Fixup(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input); +void QDateTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot); +QDateTime* QDateTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text); +void QDateTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot); +struct miqt_string QDateTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt); +void QDateTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot); +int QDateTimeEdit_virtualbase_StepEnabled(const void* self); +void QDateTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDateTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDateTimeEdit_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); +void QDateTimeEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDateTimeEdit_virtualbase_MinimumSizeHint(const void* self); +void QDateTimeEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDateTimeEdit_virtualbase_InputMethodQuery(const void* self, int param1); +void QDateTimeEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDateTimeEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDateTimeEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDateTimeEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDateTimeEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDateTimeEdit_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDateTimeEdit_override_virtual_HideEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDateTimeEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDateTimeEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDateTimeEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDateTimeEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDateTimeEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDateTimeEdit_Delete(QDateTimeEdit* self, bool isSubclass); -QTimeEdit* QTimeEdit_new(QWidget* parent); -QTimeEdit* QTimeEdit_new2(); -QTimeEdit* QTimeEdit_new3(QTime* time); -QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent); +void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self); void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1); struct miqt_string QTimeEdit_Tr(const char* s); @@ -124,12 +226,44 @@ void QTimeEdit_UserTimeChanged(QTimeEdit* self, QTime* time); void QTimeEdit_connect_UserTimeChanged(QTimeEdit* self, intptr_t slot); struct miqt_string QTimeEdit_Tr2(const char* s, const char* c); struct miqt_string QTimeEdit_Tr3(const char* s, const char* c, int n); -void QTimeEdit_Delete(QTimeEdit* self); +void QTimeEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTimeEdit_virtualbase_SizeHint(const void* self); +void QTimeEdit_override_virtual_Clear(void* self, intptr_t slot); +void QTimeEdit_virtualbase_Clear(void* self); +void QTimeEdit_override_virtual_StepBy(void* self, intptr_t slot); +void QTimeEdit_virtualbase_StepBy(void* self, int steps); +void QTimeEdit_override_virtual_Event(void* self, intptr_t slot); +bool QTimeEdit_virtualbase_Event(void* self, QEvent* event); +void QTimeEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTimeEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QTimeEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTimeEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTimeEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTimeEdit_override_virtual_Validate(void* self, intptr_t slot); +int QTimeEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QTimeEdit_override_virtual_Fixup(void* self, intptr_t slot); +void QTimeEdit_virtualbase_Fixup(const void* self, struct miqt_string input); +void QTimeEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot); +QDateTime* QTimeEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text); +void QTimeEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot); +struct miqt_string QTimeEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt); +void QTimeEdit_override_virtual_StepEnabled(void* self, intptr_t slot); +int QTimeEdit_virtualbase_StepEnabled(const void* self); +void QTimeEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QTimeEdit_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QTimeEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); +void QTimeEdit_Delete(QTimeEdit* self, bool isSubclass); -QDateEdit* QDateEdit_new(QWidget* parent); -QDateEdit* QDateEdit_new2(); -QDateEdit* QDateEdit_new3(QDate* date); -QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent); +void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDateEdit_MetaObject(const QDateEdit* self); void* QDateEdit_Metacast(QDateEdit* self, const char* param1); struct miqt_string QDateEdit_Tr(const char* s); @@ -137,7 +271,39 @@ void QDateEdit_UserDateChanged(QDateEdit* self, QDate* date); void QDateEdit_connect_UserDateChanged(QDateEdit* self, intptr_t slot); struct miqt_string QDateEdit_Tr2(const char* s, const char* c); struct miqt_string QDateEdit_Tr3(const char* s, const char* c, int n); -void QDateEdit_Delete(QDateEdit* self); +void QDateEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDateEdit_virtualbase_SizeHint(const void* self); +void QDateEdit_override_virtual_Clear(void* self, intptr_t slot); +void QDateEdit_virtualbase_Clear(void* self); +void QDateEdit_override_virtual_StepBy(void* self, intptr_t slot); +void QDateEdit_virtualbase_StepBy(void* self, int steps); +void QDateEdit_override_virtual_Event(void* self, intptr_t slot); +bool QDateEdit_virtualbase_Event(void* self, QEvent* event); +void QDateEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDateEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDateEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDateEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDateEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDateEdit_override_virtual_Validate(void* self, intptr_t slot); +int QDateEdit_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QDateEdit_override_virtual_Fixup(void* self, intptr_t slot); +void QDateEdit_virtualbase_Fixup(const void* self, struct miqt_string input); +void QDateEdit_override_virtual_DateTimeFromText(void* self, intptr_t slot); +QDateTime* QDateEdit_virtualbase_DateTimeFromText(const void* self, struct miqt_string text); +void QDateEdit_override_virtual_TextFromDateTime(void* self, intptr_t slot); +struct miqt_string QDateEdit_virtualbase_TextFromDateTime(const void* self, QDateTime* dt); +void QDateEdit_override_virtual_StepEnabled(void* self, intptr_t slot); +int QDateEdit_virtualbase_StepEnabled(const void* self); +void QDateEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDateEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDateEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDateEdit_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QDateEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); +void QDateEdit_Delete(QDateEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdeadlinetimer.cpp b/qt6/gen_qdeadlinetimer.cpp index 2a93ec7b..ada9e2fe 100644 --- a/qt6/gen_qdeadlinetimer.cpp +++ b/qt6/gen_qdeadlinetimer.cpp @@ -3,32 +3,39 @@ #include "gen_qdeadlinetimer.h" #include "_cgo_export.h" -QDeadlineTimer* QDeadlineTimer_new() { - return new QDeadlineTimer(); +void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new2(int param1) { - return new QDeadlineTimer(static_cast(param1)); +void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new3(long long msecs) { - return new QDeadlineTimer(static_cast(msecs)); +void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1) { - return new QDeadlineTimer(*param1); +void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(*param1); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new5(int type_) { - return new QDeadlineTimer(static_cast(type_)); +void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(type_)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_) { - return new QDeadlineTimer(static_cast(param1), static_cast(type_)); +void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1), static_cast(type_)); + *outptr_QDeadlineTimer = ret; } -QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal) { - return new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); +void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer) { + QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); + *outptr_QDeadlineTimer = ret; } void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other) { @@ -140,7 +147,11 @@ QDeadlineTimer* QDeadlineTimer_Current1(int timerType) { return new QDeadlineTimer(QDeadlineTimer::current(static_cast(timerType))); } -void QDeadlineTimer_Delete(QDeadlineTimer* self) { - delete self; +void QDeadlineTimer_Delete(QDeadlineTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdeadlinetimer.go b/qt6/gen_qdeadlinetimer.go index 39f6bced..805e6faa 100644 --- a/qt6/gen_qdeadlinetimer.go +++ b/qt6/gen_qdeadlinetimer.go @@ -20,7 +20,8 @@ const ( ) type QDeadlineTimer struct { - h *C.QDeadlineTimer + h *C.QDeadlineTimer + isSubclass bool } func (this *QDeadlineTimer) cPointer() *C.QDeadlineTimer { @@ -37,6 +38,7 @@ func (this *QDeadlineTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDeadlineTimer constructs the type using only CGO pointers. func newQDeadlineTimer(h *C.QDeadlineTimer) *QDeadlineTimer { if h == nil { return nil @@ -44,50 +46,83 @@ func newQDeadlineTimer(h *C.QDeadlineTimer) *QDeadlineTimer { return &QDeadlineTimer{h: h} } +// UnsafeNewQDeadlineTimer constructs the type using only unsafe pointers. func UnsafeNewQDeadlineTimer(h unsafe.Pointer) *QDeadlineTimer { - return newQDeadlineTimer((*C.QDeadlineTimer)(h)) + if h == nil { + return nil + } + + return &QDeadlineTimer{h: (*C.QDeadlineTimer)(h)} } // NewQDeadlineTimer constructs a new QDeadlineTimer object. func NewQDeadlineTimer() *QDeadlineTimer { - ret := C.QDeadlineTimer_new() - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new(&outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer2 constructs a new QDeadlineTimer object. func NewQDeadlineTimer2(param1 QDeadlineTimer__ForeverConstant) *QDeadlineTimer { - ret := C.QDeadlineTimer_new2((C.int)(param1)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new2((C.int)(param1), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer3 constructs a new QDeadlineTimer object. func NewQDeadlineTimer3(msecs int64) *QDeadlineTimer { - ret := C.QDeadlineTimer_new3((C.longlong)(msecs)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new3((C.longlong)(msecs), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer4 constructs a new QDeadlineTimer object. func NewQDeadlineTimer4(param1 *QDeadlineTimer) *QDeadlineTimer { - ret := C.QDeadlineTimer_new4(param1.cPointer()) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new4(param1.cPointer(), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer5 constructs a new QDeadlineTimer object. func NewQDeadlineTimer5(type_ TimerType) *QDeadlineTimer { - ret := C.QDeadlineTimer_new5((C.int)(type_)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new5((C.int)(type_), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer6 constructs a new QDeadlineTimer object. func NewQDeadlineTimer6(param1 QDeadlineTimer__ForeverConstant, type_ TimerType) *QDeadlineTimer { - ret := C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } // NewQDeadlineTimer7 constructs a new QDeadlineTimer object. func NewQDeadlineTimer7(msecs int64, typeVal TimerType) *QDeadlineTimer { - ret := C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal)) - return newQDeadlineTimer(ret) + var outptr_QDeadlineTimer *C.QDeadlineTimer = nil + + C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal), &outptr_QDeadlineTimer) + ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret.isSubclass = true + return ret } func (this *QDeadlineTimer) Swap(other *QDeadlineTimer) { @@ -201,7 +236,7 @@ func QDeadlineTimer_Current1(timerType TimerType) *QDeadlineTimer { // Delete this object from C++ memory. func (this *QDeadlineTimer) Delete() { - C.QDeadlineTimer_Delete(this.h) + C.QDeadlineTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdeadlinetimer.h b/qt6/gen_qdeadlinetimer.h index ae4f8759..d8e28ab3 100644 --- a/qt6/gen_qdeadlinetimer.h +++ b/qt6/gen_qdeadlinetimer.h @@ -20,13 +20,13 @@ class QDeadlineTimer; typedef struct QDeadlineTimer QDeadlineTimer; #endif -QDeadlineTimer* QDeadlineTimer_new(); -QDeadlineTimer* QDeadlineTimer_new2(int param1); -QDeadlineTimer* QDeadlineTimer_new3(long long msecs); -QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1); -QDeadlineTimer* QDeadlineTimer_new5(int type_); -QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_); -QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal); +void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer); +void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer); void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other); bool QDeadlineTimer_IsForever(const QDeadlineTimer* self); bool QDeadlineTimer_HasExpired(const QDeadlineTimer* self); @@ -52,7 +52,7 @@ void QDeadlineTimer_SetDeadline2(QDeadlineTimer* self, long long msecs, int time void QDeadlineTimer_SetPreciseDeadline2(QDeadlineTimer* self, long long secs, long long nsecs); void QDeadlineTimer_SetPreciseDeadline3(QDeadlineTimer* self, long long secs, long long nsecs, int typeVal); QDeadlineTimer* QDeadlineTimer_Current1(int timerType); -void QDeadlineTimer_Delete(QDeadlineTimer* self); +void QDeadlineTimer_Delete(QDeadlineTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdebug.cpp b/qt6/gen_qdebug.cpp index b49eecf4..6d8ac25d 100644 --- a/qt6/gen_qdebug.cpp +++ b/qt6/gen_qdebug.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -12,12 +13,16 @@ #include "gen_qdebug.h" #include "_cgo_export.h" -QDebug* QDebug_new(QIODevice* device) { - return new QDebug(device); +void QDebug_new(QIODevice* device, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase) { + QDebug* ret = new QDebug(device); + *outptr_QDebug = ret; + *outptr_QIODeviceBase = static_cast(ret); } -QDebug* QDebug_new2(QDebug* o) { - return new QDebug(*o); +void QDebug_new2(QDebug* o, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase) { + QDebug* ret = new QDebug(*o); + *outptr_QDebug = ret; + *outptr_QIODeviceBase = static_cast(ret); } void QDebug_OperatorAssign(QDebug* self, QDebug* other) { @@ -208,16 +213,25 @@ QDebug* QDebug_MaybeQuote1(QDebug* self, char c) { return &_ret; } -void QDebug_Delete(QDebug* self) { - delete self; +void QDebug_Delete(QDebug* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg) { - return new QDebugStateSaver(*dbg); +void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver) { + QDebugStateSaver* ret = new QDebugStateSaver(*dbg); + *outptr_QDebugStateSaver = ret; } -void QDebugStateSaver_Delete(QDebugStateSaver* self) { - delete self; +void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QNoDebug* QNoDebug_Space(QNoDebug* self) { @@ -268,7 +282,11 @@ QNoDebug* QNoDebug_MaybeQuote1(QNoDebug* self, const char param1) { return &_ret; } -void QNoDebug_Delete(QNoDebug* self) { - delete self; +void QNoDebug_Delete(QNoDebug* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdebug.go b/qt6/gen_qdebug.go index 935dcf03..12513cdc 100644 --- a/qt6/gen_qdebug.go +++ b/qt6/gen_qdebug.go @@ -22,7 +22,8 @@ const ( ) type QDebug struct { - h *C.QDebug + h *C.QDebug + isSubclass bool *QIODeviceBase } @@ -40,27 +41,45 @@ func (this *QDebug) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDebug(h *C.QDebug) *QDebug { +// newQDebug constructs the type using only CGO pointers. +func newQDebug(h *C.QDebug, h_QIODeviceBase *C.QIODeviceBase) *QDebug { if h == nil { return nil } - return &QDebug{h: h, QIODeviceBase: UnsafeNewQIODeviceBase(unsafe.Pointer(h))} + return &QDebug{h: h, + QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} } -func UnsafeNewQDebug(h unsafe.Pointer) *QDebug { - return newQDebug((*C.QDebug)(h)) +// UnsafeNewQDebug constructs the type using only unsafe pointers. +func UnsafeNewQDebug(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QDebug { + if h == nil { + return nil + } + + return &QDebug{h: (*C.QDebug)(h), + QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} } // NewQDebug constructs a new QDebug object. func NewQDebug(device *QIODevice) *QDebug { - ret := C.QDebug_new(device.cPointer()) - return newQDebug(ret) + var outptr_QDebug *C.QDebug = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QDebug_new(device.cPointer(), &outptr_QDebug, &outptr_QIODeviceBase) + ret := newQDebug(outptr_QDebug, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQDebug2 constructs a new QDebug object. func NewQDebug2(o *QDebug) *QDebug { - ret := C.QDebug_new2(o.cPointer()) - return newQDebug(ret) + var outptr_QDebug *C.QDebug = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QDebug_new2(o.cPointer(), &outptr_QDebug, &outptr_QIODeviceBase) + ret := newQDebug(outptr_QDebug, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QDebug) OperatorAssign(other *QDebug) { @@ -72,23 +91,23 @@ func (this *QDebug) Swap(other *QDebug) { } func (this *QDebug) ResetFormat() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_ResetFormat(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_ResetFormat(this.h)), nil) } func (this *QDebug) Space() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Space(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Space(this.h)), nil) } func (this *QDebug) Nospace() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Nospace(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Nospace(this.h)), nil) } func (this *QDebug) MaybeSpace() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeSpace(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeSpace(this.h)), nil) } func (this *QDebug) Verbosity(verbosityLevel int) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Verbosity(this.h, (C.int)(verbosityLevel)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Verbosity(this.h, (C.int)(verbosityLevel))), nil) } func (this *QDebug) Verbosity2() int { @@ -108,73 +127,73 @@ func (this *QDebug) SetAutoInsertSpaces(b bool) { } func (this *QDebug) Quote() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Quote(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Quote(this.h)), nil) } func (this *QDebug) Noquote() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Noquote(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Noquote(this.h)), nil) } func (this *QDebug) MaybeQuote() *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeQuote(this.h))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeQuote(this.h)), nil) } func (this *QDebug) OperatorShiftLeft(t QChar) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeft(this.h, t.cPointer()))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeft(this.h, t.cPointer())), nil) } func (this *QDebug) OperatorShiftLeftWithBool(t bool) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithBool(this.h, (C.bool)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithBool(this.h, (C.bool)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithChar(t int8) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithChar(this.h, (C.char)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithChar(this.h, (C.char)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithShort(t int16) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithShort(this.h, (C.int16_t)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithShort(this.h, (C.int16_t)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithUnsignedshort(t uint16) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithInt(t int) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithInt(this.h, (C.int)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithInt(this.h, (C.int)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithUnsignedint(t uint) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithLong(t int64) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithLong(this.h, (C.long)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithLong(this.h, (C.long)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithUnsignedlong(t uint64) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithQint64(t int64) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQint64(this.h, (C.longlong)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQint64(this.h, (C.longlong)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithQuint64(t uint64) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQuint64(this.h, (C.ulonglong)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQuint64(this.h, (C.ulonglong)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithFloat(t float32) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithFloat(this.h, (C.float)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithFloat(this.h, (C.float)(t))), nil) } func (this *QDebug) OperatorShiftLeftWithDouble(t float64) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithDouble(this.h, (C.double)(t)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithDouble(this.h, (C.double)(t))), nil) } func (this *QDebug) OperatorShiftLeft2(t string) *QDebug { t_Cstring := C.CString(t) defer C.free(unsafe.Pointer(t_Cstring)) - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeft2(this.h, t_Cstring))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeft2(this.h, t_Cstring)), nil) } func (this *QDebug) OperatorShiftLeftWithQString(t string) *QDebug { @@ -182,31 +201,31 @@ func (this *QDebug) OperatorShiftLeftWithQString(t string) *QDebug { t_ms.data = C.CString(t) t_ms.len = C.size_t(len(t)) defer C.free(unsafe.Pointer(t_ms.data)) - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQString(this.h, t_ms))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQString(this.h, t_ms)), nil) } func (this *QDebug) OperatorShiftLeftWithQByteArray(t []byte) *QDebug { t_alias := C.struct_miqt_string{} t_alias.data = (*C.char)(unsafe.Pointer(&t[0])) t_alias.len = C.size_t(len(t)) - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQByteArray(this.h, t_alias))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQByteArray(this.h, t_alias)), nil) } func (this *QDebug) OperatorShiftLeftWithQByteArrayView(t QByteArrayView) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQByteArrayView(this.h, t.cPointer()))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQByteArrayView(this.h, t.cPointer())), nil) } func (this *QDebug) OperatorShiftLeftWithVoid(t unsafe.Pointer) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithVoid(this.h, t))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithVoid(this.h, t)), nil) } func (this *QDebug) MaybeQuote1(c int8) *QDebug { - return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeQuote1(this.h, (C.char)(c)))) + return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeQuote1(this.h, (C.char)(c))), nil) } // Delete this object from C++ memory. func (this *QDebug) Delete() { - C.QDebug_Delete(this.h) + C.QDebug_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -219,7 +238,8 @@ func (this *QDebug) GoGC() { } type QDebugStateSaver struct { - h *C.QDebugStateSaver + h *C.QDebugStateSaver + isSubclass bool } func (this *QDebugStateSaver) cPointer() *C.QDebugStateSaver { @@ -236,6 +256,7 @@ func (this *QDebugStateSaver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDebugStateSaver constructs the type using only CGO pointers. func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver { if h == nil { return nil @@ -243,19 +264,28 @@ func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver { return &QDebugStateSaver{h: h} } +// UnsafeNewQDebugStateSaver constructs the type using only unsafe pointers. func UnsafeNewQDebugStateSaver(h unsafe.Pointer) *QDebugStateSaver { - return newQDebugStateSaver((*C.QDebugStateSaver)(h)) + if h == nil { + return nil + } + + return &QDebugStateSaver{h: (*C.QDebugStateSaver)(h)} } // NewQDebugStateSaver constructs a new QDebugStateSaver object. func NewQDebugStateSaver(dbg *QDebug) *QDebugStateSaver { - ret := C.QDebugStateSaver_new(dbg.cPointer()) - return newQDebugStateSaver(ret) + var outptr_QDebugStateSaver *C.QDebugStateSaver = nil + + C.QDebugStateSaver_new(dbg.cPointer(), &outptr_QDebugStateSaver) + ret := newQDebugStateSaver(outptr_QDebugStateSaver) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QDebugStateSaver) Delete() { - C.QDebugStateSaver_Delete(this.h) + C.QDebugStateSaver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -268,7 +298,8 @@ func (this *QDebugStateSaver) GoGC() { } type QNoDebug struct { - h *C.QNoDebug + h *C.QNoDebug + isSubclass bool } func (this *QNoDebug) cPointer() *C.QNoDebug { @@ -285,6 +316,7 @@ func (this *QNoDebug) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNoDebug constructs the type using only CGO pointers. func newQNoDebug(h *C.QNoDebug) *QNoDebug { if h == nil { return nil @@ -292,8 +324,13 @@ func newQNoDebug(h *C.QNoDebug) *QNoDebug { return &QNoDebug{h: h} } +// UnsafeNewQNoDebug constructs the type using only unsafe pointers. func UnsafeNewQNoDebug(h unsafe.Pointer) *QNoDebug { - return newQNoDebug((*C.QNoDebug)(h)) + if h == nil { + return nil + } + + return &QNoDebug{h: (*C.QNoDebug)(h)} } func (this *QNoDebug) Space() *QNoDebug { @@ -330,7 +367,7 @@ func (this *QNoDebug) MaybeQuote1(param1 int8) *QNoDebug { // Delete this object from C++ memory. func (this *QNoDebug) Delete() { - C.QNoDebug_Delete(this.h) + C.QNoDebug_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdebug.h b/qt6/gen_qdebug.h index 7537991c..0bfbd415 100644 --- a/qt6/gen_qdebug.h +++ b/qt6/gen_qdebug.h @@ -21,6 +21,7 @@ class QChar; class QDebug; class QDebugStateSaver; class QIODevice; +class QIODeviceBase; class QNoDebug; #else typedef struct QByteArray QByteArray; @@ -29,11 +30,12 @@ typedef struct QChar QChar; typedef struct QDebug QDebug; typedef struct QDebugStateSaver QDebugStateSaver; typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QNoDebug QNoDebug; #endif -QDebug* QDebug_new(QIODevice* device); -QDebug* QDebug_new2(QDebug* o); +void QDebug_new(QIODevice* device, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase); +void QDebug_new2(QDebug* o, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase); void QDebug_OperatorAssign(QDebug* self, QDebug* other); void QDebug_Swap(QDebug* self, QDebug* other); QDebug* QDebug_ResetFormat(QDebug* self); @@ -67,10 +69,10 @@ QDebug* QDebug_OperatorShiftLeftWithQByteArray(QDebug* self, struct miqt_string QDebug* QDebug_OperatorShiftLeftWithQByteArrayView(QDebug* self, QByteArrayView* t); QDebug* QDebug_OperatorShiftLeftWithVoid(QDebug* self, const void* t); QDebug* QDebug_MaybeQuote1(QDebug* self, char c); -void QDebug_Delete(QDebug* self); +void QDebug_Delete(QDebug* self, bool isSubclass); -QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg); -void QDebugStateSaver_Delete(QDebugStateSaver* self); +void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver); +void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass); QNoDebug* QNoDebug_Space(QNoDebug* self); QNoDebug* QNoDebug_Nospace(QNoDebug* self); @@ -80,7 +82,7 @@ QNoDebug* QNoDebug_Noquote(QNoDebug* self); QNoDebug* QNoDebug_MaybeQuote(QNoDebug* self); QNoDebug* QNoDebug_Verbosity(QNoDebug* self, int param1); QNoDebug* QNoDebug_MaybeQuote1(QNoDebug* self, const char param1); -void QNoDebug_Delete(QNoDebug* self); +void QNoDebug_Delete(QNoDebug* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdesktopservices.cpp b/qt6/gen_qdesktopservices.cpp index 770279bb..760da276 100644 --- a/qt6/gen_qdesktopservices.cpp +++ b/qt6/gen_qdesktopservices.cpp @@ -22,7 +22,11 @@ void QDesktopServices_UnsetUrlHandler(struct miqt_string scheme) { QDesktopServices::unsetUrlHandler(scheme_QString); } -void QDesktopServices_Delete(QDesktopServices* self) { - delete self; +void QDesktopServices_Delete(QDesktopServices* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdesktopservices.go b/qt6/gen_qdesktopservices.go index 3f3fc1f0..7d42a467 100644 --- a/qt6/gen_qdesktopservices.go +++ b/qt6/gen_qdesktopservices.go @@ -14,7 +14,8 @@ import ( ) type QDesktopServices struct { - h *C.QDesktopServices + h *C.QDesktopServices + isSubclass bool } func (this *QDesktopServices) cPointer() *C.QDesktopServices { @@ -31,6 +32,7 @@ func (this *QDesktopServices) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDesktopServices constructs the type using only CGO pointers. func newQDesktopServices(h *C.QDesktopServices) *QDesktopServices { if h == nil { return nil @@ -38,8 +40,13 @@ func newQDesktopServices(h *C.QDesktopServices) *QDesktopServices { return &QDesktopServices{h: h} } +// UnsafeNewQDesktopServices constructs the type using only unsafe pointers. func UnsafeNewQDesktopServices(h unsafe.Pointer) *QDesktopServices { - return newQDesktopServices((*C.QDesktopServices)(h)) + if h == nil { + return nil + } + + return &QDesktopServices{h: (*C.QDesktopServices)(h)} } func QDesktopServices_OpenUrl(url *QUrl) bool { @@ -66,7 +73,7 @@ func QDesktopServices_UnsetUrlHandler(scheme string) { // Delete this object from C++ memory. func (this *QDesktopServices) Delete() { - C.QDesktopServices_Delete(this.h) + C.QDesktopServices_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdesktopservices.h b/qt6/gen_qdesktopservices.h index 837afd13..96ad11de 100644 --- a/qt6/gen_qdesktopservices.h +++ b/qt6/gen_qdesktopservices.h @@ -27,7 +27,7 @@ typedef struct QUrl QUrl; bool QDesktopServices_OpenUrl(QUrl* url); void QDesktopServices_SetUrlHandler(struct miqt_string scheme, QObject* receiver, const char* method); void QDesktopServices_UnsetUrlHandler(struct miqt_string scheme); -void QDesktopServices_Delete(QDesktopServices* self); +void QDesktopServices_Delete(QDesktopServices* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdial.cpp b/qt6/gen_qdial.cpp index 585a2380..ffafee95 100644 --- a/qt6/gen_qdial.cpp +++ b/qt6/gen_qdial.cpp @@ -1,20 +1,383 @@ +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qdial.h" #include "_cgo_export.h" -QDial* QDial_new(QWidget* parent) { - return new QDial(parent); +class MiqtVirtualQDial : public virtual QDial { +public: + + MiqtVirtualQDial(QWidget* parent): QDial(parent) {}; + MiqtVirtualQDial(): QDial() {}; + + virtual ~MiqtVirtualQDial() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDial::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDial_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDial::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDial::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDial_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDial::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QDial::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QDial_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QDial::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* re) override { + if (handle__ResizeEvent == 0) { + QDial::resizeEvent(re); + return; + } + + QResizeEvent* sigval1 = re; + + miqt_exec_callback_QDial_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* re) { + + QDial::resizeEvent(re); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* pe) override { + if (handle__PaintEvent == 0) { + QDial::paintEvent(pe); + return; + } + + QPaintEvent* sigval1 = pe; + + miqt_exec_callback_QDial_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* pe) { + + QDial::paintEvent(pe); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* me) override { + if (handle__MousePressEvent == 0) { + QDial::mousePressEvent(me); + return; + } + + QMouseEvent* sigval1 = me; + + miqt_exec_callback_QDial_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* me) { + + QDial::mousePressEvent(me); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* me) override { + if (handle__MouseReleaseEvent == 0) { + QDial::mouseReleaseEvent(me); + return; + } + + QMouseEvent* sigval1 = me; + + miqt_exec_callback_QDial_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* me) { + + QDial::mouseReleaseEvent(me); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* me) override { + if (handle__MouseMoveEvent == 0) { + QDial::mouseMoveEvent(me); + return; + } + + QMouseEvent* sigval1 = me; + + miqt_exec_callback_QDial_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* me) { + + QDial::mouseMoveEvent(me); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QDial::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QDial_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QDial::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSlider* option) const override { + if (handle__InitStyleOption == 0) { + QDial::initStyleOption(option); + return; + } + + QStyleOptionSlider* sigval1 = option; + + miqt_exec_callback_QDial_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSlider* option) const { + + QDial::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QDial::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QDial_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QDial::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QDial::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QDial_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QDial::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QDial::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QDial_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QDial::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QDial::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QDial_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QDial::changeEvent(e); + + } + +}; + +void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDial* ret = new MiqtVirtualQDial(parent); + *outptr_QDial = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDial* QDial_new2() { - return new QDial(); +void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDial* ret = new MiqtVirtualQDial(); + *outptr_QDial = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDial_MetaObject(const QDial* self) { @@ -95,7 +458,123 @@ struct miqt_string QDial_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDial_Delete(QDial* self) { - delete self; +void QDial_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__SizeHint = slot; +} + +QSize* QDial_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDial*)(self) )->virtualbase_SizeHint(); +} + +void QDial_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDial_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDial*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDial_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__Event = slot; +} + +bool QDial_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQDial*)(self) )->virtualbase_Event(e); +} + +void QDial_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__ResizeEvent = slot; +} + +void QDial_virtualbase_ResizeEvent(void* self, QResizeEvent* re) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_ResizeEvent(re); +} + +void QDial_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__PaintEvent = slot; +} + +void QDial_virtualbase_PaintEvent(void* self, QPaintEvent* pe) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_PaintEvent(pe); +} + +void QDial_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MousePressEvent = slot; +} + +void QDial_virtualbase_MousePressEvent(void* self, QMouseEvent* me) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_MousePressEvent(me); +} + +void QDial_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDial_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* me) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_MouseReleaseEvent(me); +} + +void QDial_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDial_virtualbase_MouseMoveEvent(void* self, QMouseEvent* me) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_MouseMoveEvent(me); +} + +void QDial_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__SliderChange = slot; +} + +void QDial_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_SliderChange(change); +} + +void QDial_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__InitStyleOption = slot; +} + +void QDial_virtualbase_InitStyleOption(const void* self, QStyleOptionSlider* option) { + ( (const MiqtVirtualQDial*)(self) )->virtualbase_InitStyleOption(option); +} + +void QDial_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__KeyPressEvent = slot; +} + +void QDial_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QDial_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__TimerEvent = slot; +} + +void QDial_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_TimerEvent(param1); +} + +void QDial_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__WheelEvent = slot; +} + +void QDial_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_WheelEvent(e); +} + +void QDial_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDial*)(self) )->handle__ChangeEvent = slot; +} + +void QDial_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQDial*)(self) )->virtualbase_ChangeEvent(e); +} + +void QDial_Delete(QDial* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdial.go b/qt6/gen_qdial.go index 7b2ceae2..a5650cb2 100644 --- a/qt6/gen_qdial.go +++ b/qt6/gen_qdial.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QDial struct { - h *C.QDial + h *C.QDial + isSubclass bool *QAbstractSlider } @@ -32,27 +34,51 @@ func (this *QDial) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDial(h *C.QDial) *QDial { +// newQDial constructs the type using only CGO pointers. +func newQDial(h *C.QDial, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDial { if h == nil { return nil } - return &QDial{h: h, QAbstractSlider: UnsafeNewQAbstractSlider(unsafe.Pointer(h))} + return &QDial{h: h, + QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDial(h unsafe.Pointer) *QDial { - return newQDial((*C.QDial)(h)) +// UnsafeNewQDial constructs the type using only unsafe pointers. +func UnsafeNewQDial(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDial { + if h == nil { + return nil + } + + return &QDial{h: (*C.QDial)(h), + QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDial constructs a new QDial object. func NewQDial(parent *QWidget) *QDial { - ret := C.QDial_new(parent.cPointer()) - return newQDial(ret) + var outptr_QDial *C.QDial = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDial_new(parent.cPointer(), &outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDial2 constructs a new QDial object. func NewQDial2() *QDial { - ret := C.QDial_new2() - return newQDial(ret) + var outptr_QDial *C.QDial = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDial_new2(&outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDial) MetaObject() *QMetaObject { @@ -138,9 +164,337 @@ func QDial_Tr3(s string, c string, n int) string { return _ret } +func (this *QDial) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDial_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDial) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDial_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_SizeHint +func miqt_exec_callback_QDial_SizeHint(self *C.QDial, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDial{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDial) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDial_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDial) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDial_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MinimumSizeHint +func miqt_exec_callback_QDial_MinimumSizeHint(self *C.QDial, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDial{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDial) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QDial_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QDial) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QDial_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_Event +func miqt_exec_callback_QDial_Event(self *C.QDial, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QDial{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDial) callVirtualBase_ResizeEvent(re *QResizeEvent) { + + C.QDial_virtualbase_ResizeEvent(unsafe.Pointer(this.h), re.cPointer()) + +} +func (this *QDial) OnResizeEvent(slot func(super func(re *QResizeEvent), re *QResizeEvent)) { + C.QDial_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_ResizeEvent +func miqt_exec_callback_QDial_ResizeEvent(self *C.QDial, cb C.intptr_t, re *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(re *QResizeEvent), re *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(re), nil) + + gofunc((&QDial{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_PaintEvent(pe *QPaintEvent) { + + C.QDial_virtualbase_PaintEvent(unsafe.Pointer(this.h), pe.cPointer()) + +} +func (this *QDial) OnPaintEvent(slot func(super func(pe *QPaintEvent), pe *QPaintEvent)) { + C.QDial_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_PaintEvent +func miqt_exec_callback_QDial_PaintEvent(self *C.QDial, cb C.intptr_t, pe *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pe *QPaintEvent), pe *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(pe), nil) + + gofunc((&QDial{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_MousePressEvent(me *QMouseEvent) { + + C.QDial_virtualbase_MousePressEvent(unsafe.Pointer(this.h), me.cPointer()) + +} +func (this *QDial) OnMousePressEvent(slot func(super func(me *QMouseEvent), me *QMouseEvent)) { + C.QDial_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MousePressEvent +func miqt_exec_callback_QDial_MousePressEvent(self *C.QDial, cb C.intptr_t, me *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(me *QMouseEvent), me *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(me), nil, nil, nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_MouseReleaseEvent(me *QMouseEvent) { + + C.QDial_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), me.cPointer()) + +} +func (this *QDial) OnMouseReleaseEvent(slot func(super func(me *QMouseEvent), me *QMouseEvent)) { + C.QDial_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MouseReleaseEvent +func miqt_exec_callback_QDial_MouseReleaseEvent(self *C.QDial, cb C.intptr_t, me *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(me *QMouseEvent), me *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(me), nil, nil, nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_MouseMoveEvent(me *QMouseEvent) { + + C.QDial_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), me.cPointer()) + +} +func (this *QDial) OnMouseMoveEvent(slot func(super func(me *QMouseEvent), me *QMouseEvent)) { + C.QDial_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_MouseMoveEvent +func miqt_exec_callback_QDial_MouseMoveEvent(self *C.QDial, cb C.intptr_t, me *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(me *QMouseEvent), me *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(me), nil, nil, nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QDial_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QDial) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QDial_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_SliderChange +func miqt_exec_callback_QDial_SliderChange(self *C.QDial, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QDial{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QDial) callVirtualBase_InitStyleOption(option *QStyleOptionSlider) { + + C.QDial_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QDial) OnInitStyleOption(slot func(super func(option *QStyleOptionSlider), option *QStyleOptionSlider)) { + C.QDial_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_InitStyleOption +func miqt_exec_callback_QDial_InitStyleOption(self *C.QDial, cb C.intptr_t, option *C.QStyleOptionSlider) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSlider), option *QStyleOptionSlider)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSlider(unsafe.Pointer(option), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QDial) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QDial_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QDial) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QDial_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_KeyPressEvent +func miqt_exec_callback_QDial_KeyPressEvent(self *C.QDial, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QDial_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDial) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QDial_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_TimerEvent +func miqt_exec_callback_QDial_TimerEvent(self *C.QDial, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDial{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QDial_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QDial) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QDial_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_WheelEvent +func miqt_exec_callback_QDial_WheelEvent(self *C.QDial, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QDial{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDial) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QDial_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QDial) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QDial_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDial_ChangeEvent +func miqt_exec_callback_QDial_ChangeEvent(self *C.QDial, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QDial{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QDial) Delete() { - C.QDial_Delete(this.h) + C.QDial_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdial.h b/qt6/gen_qdial.h index 00b030eb..0d912171 100644 --- a/qt6/gen_qdial.h +++ b/qt6/gen_qdial.h @@ -15,19 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSlider; class QDial; +class QEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; class QSize; +class QStyleOptionSlider; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSlider QAbstractSlider; typedef struct QDial QDial; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionSlider QStyleOptionSlider; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDial* QDial_new(QWidget* parent); -QDial* QDial_new2(); +void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDial_MetaObject(const QDial* self); void* QDial_Metacast(QDial* self, const char* param1); struct miqt_string QDial_Tr(const char* s); @@ -40,9 +62,45 @@ QSize* QDial_SizeHint(const QDial* self); QSize* QDial_MinimumSizeHint(const QDial* self); void QDial_SetNotchesVisible(QDial* self, bool visible); void QDial_SetWrapping(QDial* self, bool on); +bool QDial_Event(QDial* self, QEvent* e); +void QDial_ResizeEvent(QDial* self, QResizeEvent* re); +void QDial_PaintEvent(QDial* self, QPaintEvent* pe); +void QDial_MousePressEvent(QDial* self, QMouseEvent* me); +void QDial_MouseReleaseEvent(QDial* self, QMouseEvent* me); +void QDial_MouseMoveEvent(QDial* self, QMouseEvent* me); +void QDial_SliderChange(QDial* self, int change); +void QDial_InitStyleOption(const QDial* self, QStyleOptionSlider* option); struct miqt_string QDial_Tr2(const char* s, const char* c); struct miqt_string QDial_Tr3(const char* s, const char* c, int n); -void QDial_Delete(QDial* self); +void QDial_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDial_virtualbase_SizeHint(const void* self); +void QDial_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDial_virtualbase_MinimumSizeHint(const void* self); +void QDial_override_virtual_Event(void* self, intptr_t slot); +bool QDial_virtualbase_Event(void* self, QEvent* e); +void QDial_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDial_virtualbase_ResizeEvent(void* self, QResizeEvent* re); +void QDial_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDial_virtualbase_PaintEvent(void* self, QPaintEvent* pe); +void QDial_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDial_virtualbase_MousePressEvent(void* self, QMouseEvent* me); +void QDial_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDial_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* me); +void QDial_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDial_virtualbase_MouseMoveEvent(void* self, QMouseEvent* me); +void QDial_override_virtual_SliderChange(void* self, intptr_t slot); +void QDial_virtualbase_SliderChange(void* self, int change); +void QDial_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QDial_virtualbase_InitStyleOption(const void* self, QStyleOptionSlider* option); +void QDial_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDial_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QDial_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDial_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QDial_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDial_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QDial_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDial_virtualbase_ChangeEvent(void* self, QEvent* e); +void QDial_Delete(QDial* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdialog.cpp b/qt6/gen_qdialog.cpp index aabeb0a7..7a9d3adf 100644 --- a/qt6/gen_qdialog.cpp +++ b/qt6/gen_qdialog.cpp @@ -1,24 +1,1189 @@ +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qdialog.h" #include "_cgo_export.h" -QDialog* QDialog_new(QWidget* parent) { - return new QDialog(parent); +class MiqtVirtualQDialog : public virtual QDialog { +public: + + MiqtVirtualQDialog(QWidget* parent): QDialog(parent) {}; + MiqtVirtualQDialog(): QDialog() {}; + MiqtVirtualQDialog(QWidget* parent, Qt::WindowFlags f): QDialog(parent, f) {}; + + virtual ~MiqtVirtualQDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QDialog::open(); + return; + } + + + miqt_exec_callback_QDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QDialog::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QDialog::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QDialog::accept(); + return; + } + + + miqt_exec_callback_QDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QDialog::reject(); + return; + } + + + miqt_exec_callback_QDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QDialog::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDialog::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDialog_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDialog::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDialog::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDialog_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDialog::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDialog::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDialog_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDialog::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDialog::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDialog_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDialog::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDialog::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDialog_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDialog::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDialog::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDialog::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDialog::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDialog::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDialog::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDialog::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDialog::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDialog::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDialog::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDialog_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDialog::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDialog::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDialog_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDialog::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDialog::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialog_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDialog::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDialog::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialog_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDialog::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QDialog::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QDialog_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QDialog::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDialog::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialog_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDialog::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDialog::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDialog_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDialog::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDialog::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialog_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDialog::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDialog::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDialog_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDialog::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDialog::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDialog_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDialog::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDialog::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDialog::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDialog::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDialog::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDialog::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDialog::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDialog::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDialog_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDialog::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDialog::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDialog_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDialog::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QDialog::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QDialog_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDialog::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QDialog::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QDialog::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDialog::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDialog_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDialog::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDialog::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDialog_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDialog::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDialog::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDialog_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDialog::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDialog::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDialog_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDialog::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDialog::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDialog_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDialog::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDialog::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDialog_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDialog::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDialog::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDialog_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDialog::focusNextPrevChild(next); + + } + +}; + +void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent); + *outptr_QDialog = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialog* QDialog_new2() { - return new QDialog(); +void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(); + *outptr_QDialog = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialog* QDialog_new3(QWidget* parent, int f) { - return new QDialog(parent, static_cast(f)); +void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent, static_cast(f)); + *outptr_QDialog = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDialog_MetaObject(const QDialog* self) { @@ -77,7 +1242,7 @@ void QDialog_Finished(QDialog* self, int result) { } void QDialog_connect_Finished(QDialog* self, intptr_t slot) { - QDialog::connect(self, static_cast(&QDialog::finished), self, [=](int result) { + MiqtVirtualQDialog::connect(self, static_cast(&QDialog::finished), self, [=](int result) { int sigval1 = result; miqt_exec_callback_QDialog_Finished(slot, sigval1); }); @@ -88,7 +1253,7 @@ void QDialog_Accepted(QDialog* self) { } void QDialog_connect_Accepted(QDialog* self, intptr_t slot) { - QDialog::connect(self, static_cast(&QDialog::accepted), self, [=]() { + MiqtVirtualQDialog::connect(self, static_cast(&QDialog::accepted), self, [=]() { miqt_exec_callback_QDialog_Accepted(slot); }); } @@ -98,7 +1263,7 @@ void QDialog_Rejected(QDialog* self) { } void QDialog_connect_Rejected(QDialog* self, intptr_t slot) { - QDialog::connect(self, static_cast(&QDialog::rejected), self, [=]() { + MiqtVirtualQDialog::connect(self, static_cast(&QDialog::rejected), self, [=]() { miqt_exec_callback_QDialog_Rejected(slot); }); } @@ -145,7 +1310,387 @@ struct miqt_string QDialog_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDialog_Delete(QDialog* self) { - delete self; +void QDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__SetVisible = slot; +} + +void QDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_SizeHint(); +} + +void QDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Open = slot; +} + +void QDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Open(); +} + +void QDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Exec = slot; +} + +int QDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_Exec(); +} + +void QDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Done = slot; +} + +void QDialog_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Done(param1); +} + +void QDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Accept = slot; +} + +void QDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Accept(); +} + +void QDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Reject = slot; +} + +void QDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_Reject(); +} + +void QDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__CloseEvent = slot; +} + +void QDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ShowEvent = slot; +} + +void QDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__EventFilter = slot; +} + +bool QDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QDialog_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DevType = slot; +} + +int QDialog_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_DevType(); +} + +void QDialog_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__HeightForWidth = slot; +} + +int QDialog_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDialog_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDialog_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDialog_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDialog_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_PaintEngine(); +} + +void QDialog_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Event = slot; +} + +bool QDialog_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_Event(event); +} + +void QDialog_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MousePressEvent = slot; +} + +void QDialog_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDialog_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDialog_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDialog_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDialog_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDialog_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDialog_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDialog_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__WheelEvent = slot; +} + +void QDialog_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_WheelEvent(event); +} + +void QDialog_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDialog_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDialog_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__FocusInEvent = slot; +} + +void QDialog_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDialog_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__FocusOutEvent = slot; +} + +void QDialog_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDialog_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__EnterEvent = slot; +} + +void QDialog_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_EnterEvent(event); +} + +void QDialog_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__LeaveEvent = slot; +} + +void QDialog_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDialog_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__PaintEvent = slot; +} + +void QDialog_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_PaintEvent(event); +} + +void QDialog_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__MoveEvent = slot; +} + +void QDialog_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_MoveEvent(event); +} + +void QDialog_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__TabletEvent = slot; +} + +void QDialog_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_TabletEvent(event); +} + +void QDialog_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ActionEvent = slot; +} + +void QDialog_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ActionEvent(event); +} + +void QDialog_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DragEnterEvent = slot; +} + +void QDialog_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDialog_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DragMoveEvent = slot; +} + +void QDialog_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDialog_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDialog_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDialog_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__DropEvent = slot; +} + +void QDialog_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_DropEvent(event); +} + +void QDialog_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__HideEvent = slot; +} + +void QDialog_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_HideEvent(event); +} + +void QDialog_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__NativeEvent = slot; +} + +bool QDialog_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QDialog_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QDialog_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Metric = slot; +} + +int QDialog_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_Metric(param1); +} + +void QDialog_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__InitPainter = slot; +} + +void QDialog_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDialog*)(self) )->virtualbase_InitPainter(painter); +} + +void QDialog_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDialog_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_Redirected(offset); +} + +void QDialog_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDialog_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_SharedPainter(); +} + +void QDialog_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__InputMethodEvent = slot; +} + +void QDialog_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDialog*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDialog_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDialog_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDialog*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDialog_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDialog*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDialog_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDialog*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDialog_Delete(QDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdialog.go b/qt6/gen_qdialog.go index 32fcd4b3..5a38b2e8 100644 --- a/qt6/gen_qdialog.go +++ b/qt6/gen_qdialog.go @@ -22,7 +22,8 @@ const ( ) type QDialog struct { - h *C.QDialog + h *C.QDialog + isSubclass bool *QWidget } @@ -40,33 +41,62 @@ func (this *QDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDialog(h *C.QDialog) *QDialog { +// newQDialog constructs the type using only CGO pointers. +func newQDialog(h *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialog { if h == nil { return nil } - return &QDialog{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDialog{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDialog(h unsafe.Pointer) *QDialog { - return newQDialog((*C.QDialog)(h)) +// UnsafeNewQDialog constructs the type using only unsafe pointers. +func UnsafeNewQDialog(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialog { + if h == nil { + return nil + } + + return &QDialog{h: (*C.QDialog)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDialog constructs a new QDialog object. func NewQDialog(parent *QWidget) *QDialog { - ret := C.QDialog_new(parent.cPointer()) - return newQDialog(ret) + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialog_new(parent.cPointer(), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialog2 constructs a new QDialog object. func NewQDialog2() *QDialog { - ret := C.QDialog_new2() - return newQDialog(ret) + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialog_new2(&outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialog3 constructs a new QDialog object. func NewQDialog3(parent *QWidget, f WindowType) *QDialog { - ret := C.QDialog_new3(parent.cPointer(), (C.int)(f)) - return newQDialog(ret) + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialog_new3(parent.cPointer(), (C.int)(f), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDialog) MetaObject() *QMetaObject { @@ -222,9 +252,1106 @@ func QDialog_Tr3(s string, c string, n int) string { return _ret } +func (this *QDialog) callVirtualBase_SetVisible(visible bool) { + + C.QDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_SetVisible +func miqt_exec_callback_QDialog_SetVisible(self *C.QDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_SizeHint +func miqt_exec_callback_QDialog_SizeHint(self *C.QDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MinimumSizeHint +func miqt_exec_callback_QDialog_MinimumSizeHint(self *C.QDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_Open() { + + C.QDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QDialog) OnOpen(slot func(super func())) { + C.QDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Open +func miqt_exec_callback_QDialog_Open(self *C.QDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QDialog) callVirtualBase_Exec() int { + + return (int)(C.QDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QDialog) OnExec(slot func(super func() int) int) { + C.QDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Exec +func miqt_exec_callback_QDialog_Exec(self *C.QDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_Done(param1 int) { + + C.QDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QDialog) OnDone(slot func(super func(param1 int), param1 int)) { + C.QDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Done +func miqt_exec_callback_QDialog_Done(self *C.QDialog, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QDialog) callVirtualBase_Accept() { + + C.QDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QDialog) OnAccept(slot func(super func())) { + C.QDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Accept +func miqt_exec_callback_QDialog_Accept(self *C.QDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QDialog) callVirtualBase_Reject() { + + C.QDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QDialog) OnReject(slot func(super func())) { + C.QDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Reject +func miqt_exec_callback_QDialog_Reject(self *C.QDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_KeyPressEvent +func miqt_exec_callback_QDialog_KeyPressEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_CloseEvent +func miqt_exec_callback_QDialog_CloseEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ShowEvent +func miqt_exec_callback_QDialog_ShowEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ResizeEvent +func miqt_exec_callback_QDialog_ResizeEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ContextMenuEvent +func miqt_exec_callback_QDialog_ContextMenuEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_EventFilter +func miqt_exec_callback_QDialog_EventFilter(self *C.QDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_DevType() int { + + return (int)(C.QDialog_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDialog) OnDevType(slot func(super func() int) int) { + C.QDialog_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DevType +func miqt_exec_callback_QDialog_DevType(self *C.QDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDialog_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialog) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDialog_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_HeightForWidth +func miqt_exec_callback_QDialog_HeightForWidth(self *C.QDialog, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDialog_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDialog) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDialog_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_HasHeightForWidth +func miqt_exec_callback_QDialog_HasHeightForWidth(self *C.QDialog, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDialog_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDialog) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDialog_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_PaintEngine +func miqt_exec_callback_QDialog_PaintEngine(self *C.QDialog, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDialog_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDialog) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDialog_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Event +func miqt_exec_callback_QDialog_Event(self *C.QDialog, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MousePressEvent +func miqt_exec_callback_QDialog_MousePressEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MouseReleaseEvent +func miqt_exec_callback_QDialog_MouseReleaseEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MouseDoubleClickEvent +func miqt_exec_callback_QDialog_MouseDoubleClickEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDialog_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialog_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MouseMoveEvent +func miqt_exec_callback_QDialog_MouseMoveEvent(self *C.QDialog, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDialog_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDialog_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_WheelEvent +func miqt_exec_callback_QDialog_WheelEvent(self *C.QDialog, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDialog_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDialog_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_KeyReleaseEvent +func miqt_exec_callback_QDialog_KeyReleaseEvent(self *C.QDialog, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDialog_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialog_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_FocusInEvent +func miqt_exec_callback_QDialog_FocusInEvent(self *C.QDialog, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDialog_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialog_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_FocusOutEvent +func miqt_exec_callback_QDialog_FocusOutEvent(self *C.QDialog, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QDialog_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QDialog_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_EnterEvent +func miqt_exec_callback_QDialog_EnterEvent(self *C.QDialog, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDialog_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialog_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_LeaveEvent +func miqt_exec_callback_QDialog_LeaveEvent(self *C.QDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialog{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDialog_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDialog_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_PaintEvent +func miqt_exec_callback_QDialog_PaintEvent(self *C.QDialog, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDialog_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDialog_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_MoveEvent +func miqt_exec_callback_QDialog_MoveEvent(self *C.QDialog, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDialog_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDialog_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_TabletEvent +func miqt_exec_callback_QDialog_TabletEvent(self *C.QDialog, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDialog_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDialog_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ActionEvent +func miqt_exec_callback_QDialog_ActionEvent(self *C.QDialog, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDialog_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDialog_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DragEnterEvent +func miqt_exec_callback_QDialog_DragEnterEvent(self *C.QDialog, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDialog_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDialog_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DragMoveEvent +func miqt_exec_callback_QDialog_DragMoveEvent(self *C.QDialog, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDialog_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDialog_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DragLeaveEvent +func miqt_exec_callback_QDialog_DragLeaveEvent(self *C.QDialog, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDialog_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDialog_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_DropEvent +func miqt_exec_callback_QDialog_DropEvent(self *C.QDialog, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDialog_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialog) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDialog_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_HideEvent +func miqt_exec_callback_QDialog_HideEvent(self *C.QDialog, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDialog_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QDialog) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QDialog_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_NativeEvent +func miqt_exec_callback_QDialog_NativeEvent(self *C.QDialog, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_ChangeEvent +func miqt_exec_callback_QDialog_ChangeEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDialog_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialog) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDialog_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Metric +func miqt_exec_callback_QDialog_Metric(self *C.QDialog, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialog) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDialog_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDialog) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDialog_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_InitPainter +func miqt_exec_callback_QDialog_InitPainter(self *C.QDialog, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDialog{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDialog) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDialog_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDialog) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDialog_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_Redirected +func miqt_exec_callback_QDialog_Redirected(self *C.QDialog, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDialog_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDialog) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDialog_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_SharedPainter +func miqt_exec_callback_QDialog_SharedPainter(self *C.QDialog, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDialog_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialog) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDialog_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_InputMethodEvent +func miqt_exec_callback_QDialog_InputMethodEvent(self *C.QDialog, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialog{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDialog) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDialog_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialog) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDialog_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_InputMethodQuery +func miqt_exec_callback_QDialog_InputMethodQuery(self *C.QDialog, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialog) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDialog_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDialog) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDialog_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialog_FocusNextPrevChild +func miqt_exec_callback_QDialog_FocusNextPrevChild(self *C.QDialog, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDialog{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDialog) Delete() { - C.QDialog_Delete(this.h) + C.QDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdialog.h b/qt6/gen_qdialog.h index aab25420..c83da026 100644 --- a/qt6/gen_qdialog.h +++ b/qt6/gen_qdialog.h @@ -15,20 +15,74 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDialog; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDialog* QDialog_new(QWidget* parent); -QDialog* QDialog_new2(); -QDialog* QDialog_new3(QWidget* parent, int f); +void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDialog_MetaObject(const QDialog* self); void* QDialog_Metacast(QDialog* self, const char* param1); struct miqt_string QDialog_Tr(const char* s); @@ -51,9 +105,109 @@ int QDialog_Exec(QDialog* self); void QDialog_Done(QDialog* self, int param1); void QDialog_Accept(QDialog* self); void QDialog_Reject(QDialog* self); +void QDialog_KeyPressEvent(QDialog* self, QKeyEvent* param1); +void QDialog_CloseEvent(QDialog* self, QCloseEvent* param1); +void QDialog_ShowEvent(QDialog* self, QShowEvent* param1); +void QDialog_ResizeEvent(QDialog* self, QResizeEvent* param1); +void QDialog_ContextMenuEvent(QDialog* self, QContextMenuEvent* param1); +bool QDialog_EventFilter(QDialog* self, QObject* param1, QEvent* param2); struct miqt_string QDialog_Tr2(const char* s, const char* c); struct miqt_string QDialog_Tr3(const char* s, const char* c, int n); -void QDialog_Delete(QDialog* self); +void QDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QDialog_virtualbase_SetVisible(void* self, bool visible); +void QDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDialog_virtualbase_SizeHint(const void* self); +void QDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDialog_virtualbase_MinimumSizeHint(const void* self); +void QDialog_override_virtual_Open(void* self, intptr_t slot); +void QDialog_virtualbase_Open(void* self); +void QDialog_override_virtual_Exec(void* self, intptr_t slot); +int QDialog_virtualbase_Exec(void* self); +void QDialog_override_virtual_Done(void* self, intptr_t slot); +void QDialog_virtualbase_Done(void* self, int param1); +void QDialog_override_virtual_Accept(void* self, intptr_t slot); +void QDialog_virtualbase_Accept(void* self); +void QDialog_override_virtual_Reject(void* self, intptr_t slot); +void QDialog_virtualbase_Reject(void* self); +void QDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QDialog_override_virtual_DevType(void* self, intptr_t slot); +int QDialog_virtualbase_DevType(const void* self); +void QDialog_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDialog_virtualbase_HeightForWidth(const void* self, int param1); +void QDialog_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDialog_virtualbase_HasHeightForWidth(const void* self); +void QDialog_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDialog_virtualbase_PaintEngine(const void* self); +void QDialog_override_virtual_Event(void* self, intptr_t slot); +bool QDialog_virtualbase_Event(void* self, QEvent* event); +void QDialog_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDialog_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDialog_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDialog_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDialog_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDialog_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDialog_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDialog_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDialog_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDialog_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDialog_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QDialog_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDialog_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDialog_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDialog_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDialog_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDialog_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDialog_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDialog_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDialog_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDialog_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDialog_override_virtual_DropEvent(void* self, intptr_t slot); +void QDialog_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDialog_override_virtual_HideEvent(void* self, intptr_t slot); +void QDialog_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDialog_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDialog_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDialog_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QDialog_override_virtual_Metric(void* self, intptr_t slot); +int QDialog_virtualbase_Metric(const void* self, int param1); +void QDialog_override_virtual_InitPainter(void* self, intptr_t slot); +void QDialog_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDialog_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDialog_virtualbase_Redirected(const void* self, QPoint* offset); +void QDialog_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDialog_virtualbase_SharedPainter(const void* self); +void QDialog_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDialog_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDialog_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDialog_virtualbase_InputMethodQuery(const void* self, int param1); +void QDialog_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDialog_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDialog_Delete(QDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdialogbuttonbox.cpp b/qt6/gen_qdialogbuttonbox.cpp index 0f0914de..94f9e4b5 100644 --- a/qt6/gen_qdialogbuttonbox.cpp +++ b/qt6/gen_qdialogbuttonbox.cpp @@ -1,46 +1,1098 @@ #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qdialogbuttonbox.h" #include "_cgo_export.h" -QDialogButtonBox* QDialogButtonBox_new(QWidget* parent) { - return new QDialogButtonBox(parent); +class MiqtVirtualQDialogButtonBox : public virtual QDialogButtonBox { +public: + + MiqtVirtualQDialogButtonBox(QWidget* parent): QDialogButtonBox(parent) {}; + MiqtVirtualQDialogButtonBox(): QDialogButtonBox() {}; + MiqtVirtualQDialogButtonBox(Qt::Orientation orientation): QDialogButtonBox(orientation) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons): QDialogButtonBox(buttons) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation): QDialogButtonBox(buttons, orientation) {}; + MiqtVirtualQDialogButtonBox(Qt::Orientation orientation, QWidget* parent): QDialogButtonBox(orientation, parent) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons, QWidget* parent): QDialogButtonBox(buttons, parent) {}; + MiqtVirtualQDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation, QWidget* parent): QDialogButtonBox(buttons, orientation, parent) {}; + + virtual ~MiqtVirtualQDialogButtonBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDialogButtonBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDialogButtonBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDialogButtonBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDialogButtonBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDialogButtonBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDialogButtonBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDialogButtonBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDialogButtonBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDialogButtonBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDialogButtonBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDialogButtonBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialogButtonBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDialogButtonBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDialogButtonBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDialogButtonBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDialogButtonBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDialogButtonBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDialogButtonBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDialogButtonBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDialogButtonBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDialogButtonBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDialogButtonBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDialogButtonBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDialogButtonBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDialogButtonBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDialogButtonBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDialogButtonBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDialogButtonBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDialogButtonBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDialogButtonBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDialogButtonBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDialogButtonBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDialogButtonBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDialogButtonBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDialogButtonBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDialogButtonBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDialogButtonBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDialogButtonBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDialogButtonBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDialogButtonBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDialogButtonBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDialogButtonBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QDialogButtonBox::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QDialogButtonBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDialogButtonBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDialogButtonBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDialogButtonBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDialogButtonBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDialogButtonBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDialogButtonBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDialogButtonBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDialogButtonBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDialogButtonBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDialogButtonBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDialogButtonBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDialogButtonBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDialogButtonBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDialogButtonBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDialogButtonBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDialogButtonBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDialogButtonBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDialogButtonBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDialogButtonBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDialogButtonBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDialogButtonBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDialogButtonBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDialogButtonBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDialogButtonBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDialogButtonBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDialogButtonBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDialogButtonBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDialogButtonBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDialogButtonBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QDialogButtonBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDialogButtonBox::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDialogButtonBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDialogButtonBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDialogButtonBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDialogButtonBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDialogButtonBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDialogButtonBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDialogButtonBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDialogButtonBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDialogButtonBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDialogButtonBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDialogButtonBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDialogButtonBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDialogButtonBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDialogButtonBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDialogButtonBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDialogButtonBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDialogButtonBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDialogButtonBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDialogButtonBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDialogButtonBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDialogButtonBox::focusNextPrevChild(next); + + } + +}; + +void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new2() { - return new QDialogButtonBox(); +void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new3(int orientation) { - return new QDialogButtonBox(static_cast(orientation)); +void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation)); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new4(int buttons) { - return new QDialogButtonBox(static_cast(buttons)); +void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons)); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation) { - return new QDialogButtonBox(static_cast(buttons), static_cast(orientation)); +void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation)); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent) { - return new QDialogButtonBox(static_cast(orientation), parent); +void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation), parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent) { - return new QDialogButtonBox(static_cast(buttons), parent); +void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent) { - return new QDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); +void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); + *outptr_QDialogButtonBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self) { @@ -141,7 +1193,7 @@ void QDialogButtonBox_Clicked(QDialogButtonBox* self, QAbstractButton* button) { } void QDialogButtonBox_connect_Clicked(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::clicked), self, [=](QAbstractButton* button) { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::clicked), self, [=](QAbstractButton* button) { QAbstractButton* sigval1 = button; miqt_exec_callback_QDialogButtonBox_Clicked(slot, sigval1); }); @@ -152,7 +1204,7 @@ void QDialogButtonBox_Accepted(QDialogButtonBox* self) { } void QDialogButtonBox_connect_Accepted(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::accepted), self, [=]() { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::accepted), self, [=]() { miqt_exec_callback_QDialogButtonBox_Accepted(slot); }); } @@ -162,7 +1214,7 @@ void QDialogButtonBox_HelpRequested(QDialogButtonBox* self) { } void QDialogButtonBox_connect_HelpRequested(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::helpRequested), self, [=]() { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::helpRequested), self, [=]() { miqt_exec_callback_QDialogButtonBox_HelpRequested(slot); }); } @@ -172,7 +1224,7 @@ void QDialogButtonBox_Rejected(QDialogButtonBox* self) { } void QDialogButtonBox_connect_Rejected(QDialogButtonBox* self, intptr_t slot) { - QDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::rejected), self, [=]() { + MiqtVirtualQDialogButtonBox::connect(self, static_cast(&QDialogButtonBox::rejected), self, [=]() { miqt_exec_callback_QDialogButtonBox_Rejected(slot); }); } @@ -199,7 +1251,339 @@ struct miqt_string QDialogButtonBox_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDialogButtonBox_Delete(QDialogButtonBox* self) { - delete self; +void QDialogButtonBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ChangeEvent = slot; +} + +void QDialogButtonBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDialogButtonBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__Event = slot; +} + +bool QDialogButtonBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_Event(event); +} + +void QDialogButtonBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DevType = slot; +} + +int QDialogButtonBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DevType(); +} + +void QDialogButtonBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__SetVisible = slot; +} + +void QDialogButtonBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QDialogButtonBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QDialogButtonBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_SizeHint(); +} + +void QDialogButtonBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDialogButtonBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDialogButtonBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__HeightForWidth = slot; +} + +int QDialogButtonBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDialogButtonBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDialogButtonBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDialogButtonBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDialogButtonBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_PaintEngine(); +} + +void QDialogButtonBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MousePressEvent = slot; +} + +void QDialogButtonBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDialogButtonBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDialogButtonBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDialogButtonBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDialogButtonBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDialogButtonBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDialogButtonBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDialogButtonBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__WheelEvent = slot; +} + +void QDialogButtonBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QDialogButtonBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QDialogButtonBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDialogButtonBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDialogButtonBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDialogButtonBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__FocusInEvent = slot; +} + +void QDialogButtonBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDialogButtonBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QDialogButtonBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDialogButtonBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__EnterEvent = slot; +} + +void QDialogButtonBox_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QDialogButtonBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__LeaveEvent = slot; +} + +void QDialogButtonBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDialogButtonBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__PaintEvent = slot; +} + +void QDialogButtonBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QDialogButtonBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__MoveEvent = slot; +} + +void QDialogButtonBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QDialogButtonBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ResizeEvent = slot; +} + +void QDialogButtonBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDialogButtonBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__CloseEvent = slot; +} + +void QDialogButtonBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QDialogButtonBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDialogButtonBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDialogButtonBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__TabletEvent = slot; +} + +void QDialogButtonBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QDialogButtonBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ActionEvent = slot; +} + +void QDialogButtonBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QDialogButtonBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QDialogButtonBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDialogButtonBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QDialogButtonBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDialogButtonBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDialogButtonBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDialogButtonBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__DropEvent = slot; +} + +void QDialogButtonBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_DropEvent(event); +} + +void QDialogButtonBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__ShowEvent = slot; +} + +void QDialogButtonBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QDialogButtonBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__HideEvent = slot; +} + +void QDialogButtonBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_HideEvent(event); +} + +void QDialogButtonBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__NativeEvent = slot; +} + +bool QDialogButtonBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDialogButtonBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__Metric = slot; +} + +int QDialogButtonBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_Metric(param1); +} + +void QDialogButtonBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__InitPainter = slot; +} + +void QDialogButtonBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QDialogButtonBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDialogButtonBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_Redirected(offset); +} + +void QDialogButtonBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDialogButtonBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_SharedPainter(); +} + +void QDialogButtonBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QDialogButtonBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDialogButtonBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDialogButtonBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDialogButtonBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDialogButtonBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDialogButtonBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDialogButtonBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDialogButtonBox_Delete(QDialogButtonBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdialogbuttonbox.go b/qt6/gen_qdialogbuttonbox.go index ebbc8fc1..97568d3a 100644 --- a/qt6/gen_qdialogbuttonbox.go +++ b/qt6/gen_qdialogbuttonbox.go @@ -67,7 +67,8 @@ const ( ) type QDialogButtonBox struct { - h *C.QDialogButtonBox + h *C.QDialogButtonBox + isSubclass bool *QWidget } @@ -85,63 +86,127 @@ func (this *QDialogButtonBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDialogButtonBox(h *C.QDialogButtonBox) *QDialogButtonBox { +// newQDialogButtonBox constructs the type using only CGO pointers. +func newQDialogButtonBox(h *C.QDialogButtonBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialogButtonBox { if h == nil { return nil } - return &QDialogButtonBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDialogButtonBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDialogButtonBox(h unsafe.Pointer) *QDialogButtonBox { - return newQDialogButtonBox((*C.QDialogButtonBox)(h)) +// UnsafeNewQDialogButtonBox constructs the type using only unsafe pointers. +func UnsafeNewQDialogButtonBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialogButtonBox { + if h == nil { + return nil + } + + return &QDialogButtonBox{h: (*C.QDialogButtonBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDialogButtonBox constructs a new QDialogButtonBox object. func NewQDialogButtonBox(parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new(parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new(parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox2 constructs a new QDialogButtonBox object. func NewQDialogButtonBox2() *QDialogButtonBox { - ret := C.QDialogButtonBox_new2() - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new2(&outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox3 constructs a new QDialogButtonBox object. func NewQDialogButtonBox3(orientation Orientation) *QDialogButtonBox { - ret := C.QDialogButtonBox_new3((C.int)(orientation)) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new3((C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox4 constructs a new QDialogButtonBox object. func NewQDialogButtonBox4(buttons QDialogButtonBox__StandardButton) *QDialogButtonBox { - ret := C.QDialogButtonBox_new4((C.int)(buttons)) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new4((C.int)(buttons), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox5 constructs a new QDialogButtonBox object. func NewQDialogButtonBox5(buttons QDialogButtonBox__StandardButton, orientation Orientation) *QDialogButtonBox { - ret := C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation)) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox6 constructs a new QDialogButtonBox object. func NewQDialogButtonBox6(orientation Orientation, parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox7 constructs a new QDialogButtonBox object. func NewQDialogButtonBox7(buttons QDialogButtonBox__StandardButton, parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDialogButtonBox8 constructs a new QDialogButtonBox object. func NewQDialogButtonBox8(buttons QDialogButtonBox__StandardButton, orientation Orientation, parent *QWidget) *QDialogButtonBox { - ret := C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer()) - return newQDialogButtonBox(ret) + var outptr_QDialogButtonBox *C.QDialogButtonBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDialogButtonBox) MetaObject() *QMetaObject { @@ -180,11 +245,11 @@ func (this *QDialogButtonBox) AddButton2(text string, role QDialogButtonBox__But text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role))), nil, nil, nil, nil) } func (this *QDialogButtonBox) AddButtonWithButton(button QDialogButtonBox__StandardButton) *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button))), nil, nil, nil, nil) } func (this *QDialogButtonBox) RemoveButton(button *QAbstractButton) { @@ -200,7 +265,7 @@ func (this *QDialogButtonBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } @@ -222,7 +287,7 @@ func (this *QDialogButtonBox) StandardButton(button *QAbstractButton) QDialogBut } func (this *QDialogButtonBox) Button(which QDialogButtonBox__StandardButton) *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_Button(this.h, (C.int)(which)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QDialogButtonBox_Button(this.h, (C.int)(which))), nil, nil, nil, nil) } func (this *QDialogButtonBox) SetCenterButtons(center bool) { @@ -248,7 +313,7 @@ func miqt_exec_callback_QDialogButtonBox_Clicked(cb C.intptr_t, button *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button), nil, nil, nil) gofunc(slotval1) } @@ -326,9 +391,975 @@ func QDialogButtonBox_Tr3(s string, c string, n int) string { return _ret } +func (this *QDialogButtonBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDialogButtonBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialogButtonBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ChangeEvent +func miqt_exec_callback_QDialogButtonBox_ChangeEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDialogButtonBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDialogButtonBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDialogButtonBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_Event +func miqt_exec_callback_QDialogButtonBox_Event(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_DevType() int { + + return (int)(C.QDialogButtonBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDialogButtonBox) OnDevType(slot func(super func() int) int) { + C.QDialogButtonBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DevType +func miqt_exec_callback_QDialogButtonBox_DevType(self *C.QDialogButtonBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_SetVisible(visible bool) { + + C.QDialogButtonBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDialogButtonBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDialogButtonBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_SetVisible +func miqt_exec_callback_QDialogButtonBox_SetVisible(self *C.QDialogButtonBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDialogButtonBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialogButtonBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialogButtonBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_SizeHint +func miqt_exec_callback_QDialogButtonBox_SizeHint(self *C.QDialogButtonBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDialogButtonBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialogButtonBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDialogButtonBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MinimumSizeHint +func miqt_exec_callback_QDialogButtonBox_MinimumSizeHint(self *C.QDialogButtonBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDialogButtonBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialogButtonBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDialogButtonBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_HeightForWidth +func miqt_exec_callback_QDialogButtonBox_HeightForWidth(self *C.QDialogButtonBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDialogButtonBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDialogButtonBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDialogButtonBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_HasHeightForWidth +func miqt_exec_callback_QDialogButtonBox_HasHeightForWidth(self *C.QDialogButtonBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDialogButtonBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDialogButtonBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDialogButtonBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_PaintEngine +func miqt_exec_callback_QDialogButtonBox_PaintEngine(self *C.QDialogButtonBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MousePressEvent +func miqt_exec_callback_QDialogButtonBox_MousePressEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent +func miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent +func miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDialogButtonBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDialogButtonBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MouseMoveEvent +func miqt_exec_callback_QDialogButtonBox_MouseMoveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDialogButtonBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDialogButtonBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_WheelEvent +func miqt_exec_callback_QDialogButtonBox_WheelEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDialogButtonBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDialogButtonBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_KeyPressEvent +func miqt_exec_callback_QDialogButtonBox_KeyPressEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDialogButtonBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDialogButtonBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent +func miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDialogButtonBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialogButtonBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_FocusInEvent +func miqt_exec_callback_QDialogButtonBox_FocusInEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDialogButtonBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDialogButtonBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_FocusOutEvent +func miqt_exec_callback_QDialogButtonBox_FocusOutEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QDialogButtonBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QDialogButtonBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_EnterEvent +func miqt_exec_callback_QDialogButtonBox_EnterEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDialogButtonBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDialogButtonBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_LeaveEvent +func miqt_exec_callback_QDialogButtonBox_LeaveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDialogButtonBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDialogButtonBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_PaintEvent +func miqt_exec_callback_QDialogButtonBox_PaintEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDialogButtonBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDialogButtonBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_MoveEvent +func miqt_exec_callback_QDialogButtonBox_MoveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDialogButtonBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDialogButtonBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ResizeEvent +func miqt_exec_callback_QDialogButtonBox_ResizeEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDialogButtonBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDialogButtonBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_CloseEvent +func miqt_exec_callback_QDialogButtonBox_CloseEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDialogButtonBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDialogButtonBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ContextMenuEvent +func miqt_exec_callback_QDialogButtonBox_ContextMenuEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDialogButtonBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDialogButtonBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_TabletEvent +func miqt_exec_callback_QDialogButtonBox_TabletEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDialogButtonBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDialogButtonBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ActionEvent +func miqt_exec_callback_QDialogButtonBox_ActionEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDialogButtonBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDialogButtonBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DragEnterEvent +func miqt_exec_callback_QDialogButtonBox_DragEnterEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDialogButtonBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDialogButtonBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DragMoveEvent +func miqt_exec_callback_QDialogButtonBox_DragMoveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDialogButtonBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDialogButtonBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DragLeaveEvent +func miqt_exec_callback_QDialogButtonBox_DragLeaveEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDialogButtonBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDialogButtonBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_DropEvent +func miqt_exec_callback_QDialogButtonBox_DropEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDialogButtonBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDialogButtonBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_ShowEvent +func miqt_exec_callback_QDialogButtonBox_ShowEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDialogButtonBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDialogButtonBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDialogButtonBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_HideEvent +func miqt_exec_callback_QDialogButtonBox_HideEvent(self *C.QDialogButtonBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDialogButtonBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QDialogButtonBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QDialogButtonBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_NativeEvent +func miqt_exec_callback_QDialogButtonBox_NativeEvent(self *C.QDialogButtonBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDialogButtonBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDialogButtonBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDialogButtonBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_Metric +func miqt_exec_callback_QDialogButtonBox_Metric(self *C.QDialogButtonBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDialogButtonBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDialogButtonBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDialogButtonBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDialogButtonBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_InitPainter +func miqt_exec_callback_QDialogButtonBox_InitPainter(self *C.QDialogButtonBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDialogButtonBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDialogButtonBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDialogButtonBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_Redirected +func miqt_exec_callback_QDialogButtonBox_Redirected(self *C.QDialogButtonBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDialogButtonBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDialogButtonBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDialogButtonBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_SharedPainter +func miqt_exec_callback_QDialogButtonBox_SharedPainter(self *C.QDialogButtonBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDialogButtonBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDialogButtonBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDialogButtonBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_InputMethodEvent +func miqt_exec_callback_QDialogButtonBox_InputMethodEvent(self *C.QDialogButtonBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDialogButtonBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDialogButtonBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDialogButtonBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDialogButtonBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_InputMethodQuery +func miqt_exec_callback_QDialogButtonBox_InputMethodQuery(self *C.QDialogButtonBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDialogButtonBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDialogButtonBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDialogButtonBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDialogButtonBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDialogButtonBox_FocusNextPrevChild +func miqt_exec_callback_QDialogButtonBox_FocusNextPrevChild(self *C.QDialogButtonBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDialogButtonBox) Delete() { - C.QDialogButtonBox_Delete(this.h) + C.QDialogButtonBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdialogbuttonbox.h b/qt6/gen_qdialogbuttonbox.h index 2a8b7727..f6ad1481 100644 --- a/qt6/gen_qdialogbuttonbox.h +++ b/qt6/gen_qdialogbuttonbox.h @@ -16,26 +16,82 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDialogButtonBox; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QPushButton; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAbstractButton QAbstractButton; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialogButtonBox QDialogButtonBox; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QPushButton QPushButton; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDialogButtonBox* QDialogButtonBox_new(QWidget* parent); -QDialogButtonBox* QDialogButtonBox_new2(); -QDialogButtonBox* QDialogButtonBox_new3(int orientation); -QDialogButtonBox* QDialogButtonBox_new4(int buttons); -QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation); -QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent); -QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent); -QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent); +void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self); void* QDialogButtonBox_Metacast(QDialogButtonBox* self, const char* param1); struct miqt_string QDialogButtonBox_Tr(const char* s); @@ -62,9 +118,93 @@ void QDialogButtonBox_HelpRequested(QDialogButtonBox* self); void QDialogButtonBox_connect_HelpRequested(QDialogButtonBox* self, intptr_t slot); void QDialogButtonBox_Rejected(QDialogButtonBox* self); void QDialogButtonBox_connect_Rejected(QDialogButtonBox* self, intptr_t slot); +void QDialogButtonBox_ChangeEvent(QDialogButtonBox* self, QEvent* event); +bool QDialogButtonBox_Event(QDialogButtonBox* self, QEvent* event); struct miqt_string QDialogButtonBox_Tr2(const char* s, const char* c); struct miqt_string QDialogButtonBox_Tr3(const char* s, const char* c, int n); -void QDialogButtonBox_Delete(QDialogButtonBox* self); +void QDialogButtonBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_Event(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_Event(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_DevType(void* self, intptr_t slot); +int QDialogButtonBox_virtualbase_DevType(const void* self); +void QDialogButtonBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_SetVisible(void* self, bool visible); +void QDialogButtonBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDialogButtonBox_virtualbase_SizeHint(const void* self); +void QDialogButtonBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDialogButtonBox_virtualbase_MinimumSizeHint(const void* self); +void QDialogButtonBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDialogButtonBox_virtualbase_HeightForWidth(const void* self, int param1); +void QDialogButtonBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_HasHeightForWidth(const void* self); +void QDialogButtonBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDialogButtonBox_virtualbase_PaintEngine(const void* self); +void QDialogButtonBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDialogButtonBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDialogButtonBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDialogButtonBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDialogButtonBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDialogButtonBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDialogButtonBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QDialogButtonBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDialogButtonBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDialogButtonBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDialogButtonBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDialogButtonBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDialogButtonBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDialogButtonBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDialogButtonBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDialogButtonBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDialogButtonBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDialogButtonBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDialogButtonBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDialogButtonBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDialogButtonBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDialogButtonBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QDialogButtonBox_override_virtual_Metric(void* self, intptr_t slot); +int QDialogButtonBox_virtualbase_Metric(const void* self, int param1); +void QDialogButtonBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDialogButtonBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDialogButtonBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QDialogButtonBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDialogButtonBox_virtualbase_SharedPainter(const void* self); +void QDialogButtonBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDialogButtonBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDialogButtonBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDialogButtonBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QDialogButtonBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDialogButtonBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDialogButtonBox_Delete(QDialogButtonBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdir.cpp b/qt6/gen_qdir.cpp index f56b6b65..db38977a 100644 --- a/qt6/gen_qdir.cpp +++ b/qt6/gen_qdir.cpp @@ -9,35 +9,41 @@ #include "gen_qdir.h" #include "_cgo_export.h" -QDir* QDir_new(QDir* param1) { - return new QDir(*param1); +void QDir_new(QDir* param1, QDir** outptr_QDir) { + QDir* ret = new QDir(*param1); + *outptr_QDir = ret; } -QDir* QDir_new2() { - return new QDir(); +void QDir_new2(QDir** outptr_QDir) { + QDir* ret = new QDir(); + *outptr_QDir = ret; } -QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter) { +void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - return new QDir(path_QString, nameFilter_QString); + QDir* ret = new QDir(path_QString, nameFilter_QString); + *outptr_QDir = ret; } -QDir* QDir_new4(struct miqt_string path) { +void QDir_new4(struct miqt_string path, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDir(path_QString); + QDir* ret = new QDir(path_QString); + *outptr_QDir = ret; } -QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort) { +void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - return new QDir(path_QString, nameFilter_QString, static_cast(sort)); + QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort)); + *outptr_QDir = ret; } -QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter) { +void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - return new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); + QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); + *outptr_QDir = ret; } void QDir_OperatorAssign(QDir* self, QDir* param1) { @@ -746,7 +752,11 @@ struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList3(const QDir* self, str return _out; } -void QDir_Delete(QDir* self) { - delete self; +void QDir_Delete(QDir* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdir.go b/qt6/gen_qdir.go index 60d8be19..f2b0c380 100644 --- a/qt6/gen_qdir.go +++ b/qt6/gen_qdir.go @@ -56,7 +56,8 @@ const ( ) type QDir struct { - h *C.QDir + h *C.QDir + isSubclass bool } func (this *QDir) cPointer() *C.QDir { @@ -73,6 +74,7 @@ func (this *QDir) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDir constructs the type using only CGO pointers. func newQDir(h *C.QDir) *QDir { if h == nil { return nil @@ -80,20 +82,33 @@ func newQDir(h *C.QDir) *QDir { return &QDir{h: h} } +// UnsafeNewQDir constructs the type using only unsafe pointers. func UnsafeNewQDir(h unsafe.Pointer) *QDir { - return newQDir((*C.QDir)(h)) + if h == nil { + return nil + } + + return &QDir{h: (*C.QDir)(h)} } // NewQDir constructs a new QDir object. func NewQDir(param1 *QDir) *QDir { - ret := C.QDir_new(param1.cPointer()) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new(param1.cPointer(), &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir2 constructs a new QDir object. func NewQDir2() *QDir { - ret := C.QDir_new2() - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new2(&outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir3 constructs a new QDir object. @@ -106,8 +121,12 @@ func NewQDir3(path string, nameFilter string) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - ret := C.QDir_new3(path_ms, nameFilter_ms) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new3(path_ms, nameFilter_ms, &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir4 constructs a new QDir object. @@ -116,8 +135,12 @@ func NewQDir4(path string) *QDir { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDir_new4(path_ms) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new4(path_ms, &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir5 constructs a new QDir object. @@ -130,8 +153,12 @@ func NewQDir5(path string, nameFilter string, sort QDir__SortFlag) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - ret := C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort)) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort), &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } // NewQDir6 constructs a new QDir object. @@ -144,8 +171,12 @@ func NewQDir6(path string, nameFilter string, sort QDir__SortFlag, filter QDir__ nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - ret := C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter)) - return newQDir(ret) + var outptr_QDir *C.QDir = nil + + C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter), &outptr_QDir) + ret := newQDir(outptr_QDir) + ret.isSubclass = true + return ret } func (this *QDir) OperatorAssign(param1 *QDir) { @@ -859,7 +890,7 @@ func (this *QDir) EntryInfoList3(nameFilters []string, filters QDir__Filter, sor // Delete this object from C++ memory. func (this *QDir) Delete() { - C.QDir_Delete(this.h) + C.QDir_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdir.h b/qt6/gen_qdir.h index d80c8498..e90196ec 100644 --- a/qt6/gen_qdir.h +++ b/qt6/gen_qdir.h @@ -24,12 +24,12 @@ typedef struct QDir QDir; typedef struct QFileInfo QFileInfo; #endif -QDir* QDir_new(QDir* param1); -QDir* QDir_new2(); -QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter); -QDir* QDir_new4(struct miqt_string path); -QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort); -QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter); +void QDir_new(QDir* param1, QDir** outptr_QDir); +void QDir_new2(QDir** outptr_QDir); +void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir); +void QDir_new4(struct miqt_string path, QDir** outptr_QDir); +void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir); +void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir); void QDir_OperatorAssign(QDir* self, QDir* param1); void QDir_Swap(QDir* self, QDir* other); void QDir_SetPath(QDir* self, struct miqt_string path); @@ -105,7 +105,7 @@ struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList1(const QDir* self, int struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList2(const QDir* self, int filters, int sort); struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList22(const QDir* self, struct miqt_array /* of struct miqt_string */ nameFilters, int filters); struct miqt_array /* of QFileInfo* */ QDir_EntryInfoList3(const QDir* self, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort); -void QDir_Delete(QDir* self); +void QDir_Delete(QDir* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdiriterator.cpp b/qt6/gen_qdiriterator.cpp index 51dd46fa..c6e04b8f 100644 --- a/qt6/gen_qdiriterator.cpp +++ b/qt6/gen_qdiriterator.cpp @@ -9,21 +9,24 @@ #include "gen_qdiriterator.h" #include "_cgo_export.h" -QDirIterator* QDirIterator_new(QDir* dir) { - return new QDirIterator(*dir); +void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator) { + QDirIterator* ret = new QDirIterator(*dir); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new2(struct miqt_string path) { +void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString); + QDirIterator* ret = new QDirIterator(path_QString); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new3(struct miqt_string path, int filter) { +void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString, static_cast(filter)); + QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters) { +void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -32,24 +35,28 @@ QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirIterator(path_QString, nameFilters_QList); + QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new5(QDir* dir, int flags) { - return new QDirIterator(*dir, static_cast(flags)); +void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator) { + QDirIterator* ret = new QDirIterator(*dir, static_cast(flags)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new6(struct miqt_string path, int flags) { +void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString, static_cast(flags)); + QDirIterator* ret = new QDirIterator(path_QString, static_cast(flags)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags) { +void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); + QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters) { +void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -58,10 +65,11 @@ QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); + QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); + *outptr_QDirIterator = ret; } -QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags) { +void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -70,7 +78,8 @@ QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); + QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); + *outptr_QDirIterator = ret; } struct miqt_string QDirIterator_Next(QDirIterator* self) { @@ -129,7 +138,11 @@ struct miqt_string QDirIterator_Path(const QDirIterator* self) { return _ms; } -void QDirIterator_Delete(QDirIterator* self) { - delete self; +void QDirIterator_Delete(QDirIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdiriterator.go b/qt6/gen_qdiriterator.go index 95e9a97d..e2939dbb 100644 --- a/qt6/gen_qdiriterator.go +++ b/qt6/gen_qdiriterator.go @@ -22,7 +22,8 @@ const ( ) type QDirIterator struct { - h *C.QDirIterator + h *C.QDirIterator + isSubclass bool } func (this *QDirIterator) cPointer() *C.QDirIterator { @@ -39,6 +40,7 @@ func (this *QDirIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDirIterator constructs the type using only CGO pointers. func newQDirIterator(h *C.QDirIterator) *QDirIterator { if h == nil { return nil @@ -46,14 +48,23 @@ func newQDirIterator(h *C.QDirIterator) *QDirIterator { return &QDirIterator{h: h} } +// UnsafeNewQDirIterator constructs the type using only unsafe pointers. func UnsafeNewQDirIterator(h unsafe.Pointer) *QDirIterator { - return newQDirIterator((*C.QDirIterator)(h)) + if h == nil { + return nil + } + + return &QDirIterator{h: (*C.QDirIterator)(h)} } // NewQDirIterator constructs a new QDirIterator object. func NewQDirIterator(dir *QDir) *QDirIterator { - ret := C.QDirIterator_new(dir.cPointer()) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new(dir.cPointer(), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator2 constructs a new QDirIterator object. @@ -62,8 +73,12 @@ func NewQDirIterator2(path string) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new2(path_ms) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new2(path_ms, &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator3 constructs a new QDirIterator object. @@ -72,8 +87,12 @@ func NewQDirIterator3(path string, filter QDir__Filter) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new3(path_ms, (C.int)(filter)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new3(path_ms, (C.int)(filter), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator4 constructs a new QDirIterator object. @@ -92,14 +111,22 @@ func NewQDirIterator4(path string, nameFilters []string) *QDirIterator { nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirIterator_new4(path_ms, nameFilters_ma) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new4(path_ms, nameFilters_ma, &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator5 constructs a new QDirIterator object. func NewQDirIterator5(dir *QDir, flags QDirIterator__IteratorFlag) *QDirIterator { - ret := C.QDirIterator_new5(dir.cPointer(), (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new5(dir.cPointer(), (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator6 constructs a new QDirIterator object. @@ -108,8 +135,12 @@ func NewQDirIterator6(path string, flags QDirIterator__IteratorFlag) *QDirIterat path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new6(path_ms, (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new6(path_ms, (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator7 constructs a new QDirIterator object. @@ -118,8 +149,12 @@ func NewQDirIterator7(path string, filter QDir__Filter, flags QDirIterator__Iter path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator8 constructs a new QDirIterator object. @@ -138,8 +173,12 @@ func NewQDirIterator8(path string, nameFilters []string, filters QDir__Filter) * nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } // NewQDirIterator9 constructs a new QDirIterator object. @@ -158,8 +197,12 @@ func NewQDirIterator9(path string, nameFilters []string, filters QDir__Filter, f nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - ret := C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags)) - return newQDirIterator(ret) + var outptr_QDirIterator *C.QDirIterator = nil + + C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags), &outptr_QDirIterator) + ret := newQDirIterator(outptr_QDirIterator) + ret.isSubclass = true + return ret } func (this *QDirIterator) Next() string { @@ -210,7 +253,7 @@ func (this *QDirIterator) Path() string { // Delete this object from C++ memory. func (this *QDirIterator) Delete() { - C.QDirIterator_Delete(this.h) + C.QDirIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdiriterator.h b/qt6/gen_qdiriterator.h index d045826c..7f62d847 100644 --- a/qt6/gen_qdiriterator.h +++ b/qt6/gen_qdiriterator.h @@ -24,15 +24,15 @@ typedef struct QDirIterator QDirIterator; typedef struct QFileInfo QFileInfo; #endif -QDirIterator* QDirIterator_new(QDir* dir); -QDirIterator* QDirIterator_new2(struct miqt_string path); -QDirIterator* QDirIterator_new3(struct miqt_string path, int filter); -QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters); -QDirIterator* QDirIterator_new5(QDir* dir, int flags); -QDirIterator* QDirIterator_new6(struct miqt_string path, int flags); -QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags); -QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters); -QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags); +void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator); +void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator); +void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator); +void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator); +void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator); +void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator); +void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator); +void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator); +void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator); struct miqt_string QDirIterator_Next(QDirIterator* self); QFileInfo* QDirIterator_NextFileInfo(QDirIterator* self); bool QDirIterator_HasNext(const QDirIterator* self); @@ -40,7 +40,7 @@ struct miqt_string QDirIterator_FileName(const QDirIterator* self); struct miqt_string QDirIterator_FilePath(const QDirIterator* self); QFileInfo* QDirIterator_FileInfo(const QDirIterator* self); struct miqt_string QDirIterator_Path(const QDirIterator* self); -void QDirIterator_Delete(QDirIterator* self); +void QDirIterator_Delete(QDirIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdockwidget.cpp b/qt6/gen_qdockwidget.cpp index 9a6cfa48..3a33b620 100644 --- a/qt6/gen_qdockwidget.cpp +++ b/qt6/gen_qdockwidget.cpp @@ -1,39 +1,1106 @@ #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qdockwidget.h" #include "_cgo_export.h" -QDockWidget* QDockWidget_new(QWidget* parent) { - return new QDockWidget(parent); +class MiqtVirtualQDockWidget : public virtual QDockWidget { +public: + + MiqtVirtualQDockWidget(QWidget* parent): QDockWidget(parent) {}; + MiqtVirtualQDockWidget(const QString& title): QDockWidget(title) {}; + MiqtVirtualQDockWidget(): QDockWidget() {}; + MiqtVirtualQDockWidget(const QString& title, QWidget* parent): QDockWidget(title, parent) {}; + MiqtVirtualQDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags): QDockWidget(title, parent, flags) {}; + MiqtVirtualQDockWidget(QWidget* parent, Qt::WindowFlags flags): QDockWidget(parent, flags) {}; + + virtual ~MiqtVirtualQDockWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDockWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDockWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDockWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDockWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDockWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QDockWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDockWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDockWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDockWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionDockWidget* option) const override { + if (handle__InitStyleOption == 0) { + QDockWidget::initStyleOption(option); + return; + } + + QStyleOptionDockWidget* sigval1 = option; + + miqt_exec_callback_QDockWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionDockWidget* option) const { + + QDockWidget::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QDockWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QDockWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QDockWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QDockWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QDockWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QDockWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDockWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDockWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDockWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDockWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDockWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDockWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QDockWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QDockWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QDockWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QDockWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QDockWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QDockWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QDockWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QDockWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QDockWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDockWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDockWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDockWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDockWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QDockWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QDockWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDockWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDockWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDockWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDockWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDockWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDockWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDockWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDockWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDockWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDockWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDockWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDockWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QDockWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QDockWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QDockWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QDockWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QDockWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QDockWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDockWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDockWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDockWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDockWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QDockWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QDockWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QDockWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QDockWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QDockWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QDockWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QDockWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QDockWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QDockWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QDockWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QDockWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QDockWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDockWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QDockWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDockWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDockWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDockWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QDockWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QDockWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QDockWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QDockWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QDockWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QDockWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QDockWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QDockWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QDockWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QDockWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QDockWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QDockWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QDockWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QDockWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QDockWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QDockWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QDockWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QDockWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDockWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDockWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDockWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QDockWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QDockWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QDockWidget::focusNextPrevChild(next); + + } + +}; + +void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new2(struct miqt_string title) { +void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QDockWidget(title_QString); + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new3() { - return new QDockWidget(); +void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent) { +void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QDockWidget(title_QString, parent); + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags) { +void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QDockWidget(title_QString, parent, static_cast(flags)); + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent, static_cast(flags)); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDockWidget* QDockWidget_new6(QWidget* parent, int flags) { - return new QDockWidget(parent, static_cast(flags)); +void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent, static_cast(flags)); + *outptr_QDockWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDockWidget_MetaObject(const QDockWidget* self) { @@ -110,7 +1177,7 @@ void QDockWidget_FeaturesChanged(QDockWidget* self, int features) { } void QDockWidget_connect_FeaturesChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::featuresChanged), self, [=](QDockWidget::DockWidgetFeatures features) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::featuresChanged), self, [=](QDockWidget::DockWidgetFeatures features) { QDockWidget::DockWidgetFeatures features_ret = features; int sigval1 = static_cast(features_ret); miqt_exec_callback_QDockWidget_FeaturesChanged(slot, sigval1); @@ -122,7 +1189,7 @@ void QDockWidget_TopLevelChanged(QDockWidget* self, bool topLevel) { } void QDockWidget_connect_TopLevelChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::topLevelChanged), self, [=](bool topLevel) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::topLevelChanged), self, [=](bool topLevel) { bool sigval1 = topLevel; miqt_exec_callback_QDockWidget_TopLevelChanged(slot, sigval1); }); @@ -133,7 +1200,7 @@ void QDockWidget_AllowedAreasChanged(QDockWidget* self, int allowedAreas) { } void QDockWidget_connect_AllowedAreasChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::allowedAreasChanged), self, [=](Qt::DockWidgetAreas allowedAreas) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::allowedAreasChanged), self, [=](Qt::DockWidgetAreas allowedAreas) { Qt::DockWidgetAreas allowedAreas_ret = allowedAreas; int sigval1 = static_cast(allowedAreas_ret); miqt_exec_callback_QDockWidget_AllowedAreasChanged(slot, sigval1); @@ -145,7 +1212,7 @@ void QDockWidget_VisibilityChanged(QDockWidget* self, bool visible) { } void QDockWidget_connect_VisibilityChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::visibilityChanged), self, [=](bool visible) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::visibilityChanged), self, [=](bool visible) { bool sigval1 = visible; miqt_exec_callback_QDockWidget_VisibilityChanged(slot, sigval1); }); @@ -156,7 +1223,7 @@ void QDockWidget_DockLocationChanged(QDockWidget* self, int area) { } void QDockWidget_connect_DockLocationChanged(QDockWidget* self, intptr_t slot) { - QDockWidget::connect(self, static_cast(&QDockWidget::dockLocationChanged), self, [=](Qt::DockWidgetArea area) { + MiqtVirtualQDockWidget::connect(self, static_cast(&QDockWidget::dockLocationChanged), self, [=](Qt::DockWidgetArea area) { Qt::DockWidgetArea area_ret = area; int sigval1 = static_cast(area_ret); miqt_exec_callback_QDockWidget_DockLocationChanged(slot, sigval1); @@ -185,7 +1252,347 @@ struct miqt_string QDockWidget_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDockWidget_Delete(QDockWidget* self) { - delete self; +void QDockWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QDockWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDockWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__CloseEvent = slot; +} + +void QDockWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QDockWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__PaintEvent = slot; +} + +void QDockWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QDockWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__Event = slot; +} + +bool QDockWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_Event(event); +} + +void QDockWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QDockWidget_virtualbase_InitStyleOption(const void* self, QStyleOptionDockWidget* option) { + ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QDockWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DevType = slot; +} + +int QDockWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_DevType(); +} + +void QDockWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__SetVisible = slot; +} + +void QDockWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QDockWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QDockWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_SizeHint(); +} + +void QDockWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDockWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDockWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QDockWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QDockWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QDockWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QDockWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QDockWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QDockWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QDockWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDockWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDockWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDockWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QDockWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QDockWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDockWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDockWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__WheelEvent = slot; +} + +void QDockWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QDockWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QDockWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDockWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDockWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDockWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QDockWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDockWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QDockWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDockWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__EnterEvent = slot; +} + +void QDockWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QDockWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QDockWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QDockWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__MoveEvent = slot; +} + +void QDockWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QDockWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QDockWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDockWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDockWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDockWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__TabletEvent = slot; +} + +void QDockWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QDockWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ActionEvent = slot; +} + +void QDockWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QDockWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QDockWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QDockWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QDockWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QDockWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QDockWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QDockWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__DropEvent = slot; +} + +void QDockWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QDockWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__ShowEvent = slot; +} + +void QDockWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QDockWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__HideEvent = slot; +} + +void QDockWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QDockWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QDockWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QDockWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__Metric = slot; +} + +int QDockWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_Metric(param1); +} + +void QDockWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InitPainter = slot; +} + +void QDockWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QDockWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QDockWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QDockWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QDockWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QDockWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QDockWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QDockWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDockWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDockWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDockWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QDockWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QDockWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQDockWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QDockWidget_Delete(QDockWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdockwidget.go b/qt6/gen_qdockwidget.go index 6315929b..00fb8f30 100644 --- a/qt6/gen_qdockwidget.go +++ b/qt6/gen_qdockwidget.go @@ -27,7 +27,8 @@ const ( ) type QDockWidget struct { - h *C.QDockWidget + h *C.QDockWidget + isSubclass bool *QWidget } @@ -45,21 +46,36 @@ func (this *QDockWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDockWidget(h *C.QDockWidget) *QDockWidget { +// newQDockWidget constructs the type using only CGO pointers. +func newQDockWidget(h *C.QDockWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDockWidget { if h == nil { return nil } - return &QDockWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QDockWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQDockWidget(h unsafe.Pointer) *QDockWidget { - return newQDockWidget((*C.QDockWidget)(h)) +// UnsafeNewQDockWidget constructs the type using only unsafe pointers. +func UnsafeNewQDockWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDockWidget { + if h == nil { + return nil + } + + return &QDockWidget{h: (*C.QDockWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQDockWidget constructs a new QDockWidget object. func NewQDockWidget(parent *QWidget) *QDockWidget { - ret := C.QDockWidget_new(parent.cPointer()) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new(parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget2 constructs a new QDockWidget object. @@ -68,14 +84,28 @@ func NewQDockWidget2(title string) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QDockWidget_new2(title_ms) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new2(title_ms, &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget3 constructs a new QDockWidget object. func NewQDockWidget3() *QDockWidget { - ret := C.QDockWidget_new3() - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new3(&outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget4 constructs a new QDockWidget object. @@ -84,8 +114,15 @@ func NewQDockWidget4(title string, parent *QWidget) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QDockWidget_new4(title_ms, parent.cPointer()) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new4(title_ms, parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget5 constructs a new QDockWidget object. @@ -94,14 +131,28 @@ func NewQDockWidget5(title string, parent *QWidget, flags WindowType) *QDockWidg title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags)) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQDockWidget6 constructs a new QDockWidget object. func NewQDockWidget6(parent *QWidget, flags WindowType) *QDockWidget { - ret := C.QDockWidget_new6(parent.cPointer(), (C.int)(flags)) - return newQDockWidget(ret) + var outptr_QDockWidget *C.QDockWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDockWidget_new6(parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QDockWidget) MetaObject() *QMetaObject { @@ -124,7 +175,7 @@ func QDockWidget_Tr(s string) string { } func (this *QDockWidget) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_Widget(this.h)), nil, nil) } func (this *QDockWidget) SetWidget(widget *QWidget) { @@ -160,7 +211,7 @@ func (this *QDockWidget) SetTitleBarWidget(widget *QWidget) { } func (this *QDockWidget) TitleBarWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_TitleBarWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QDockWidget_TitleBarWidget(this.h)), nil, nil) } func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { @@ -168,7 +219,7 @@ func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { } func (this *QDockWidget) ToggleViewAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QDockWidget_ToggleViewAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QDockWidget_ToggleViewAction(this.h)), nil) } func (this *QDockWidget) FeaturesChanged(features QDockWidget__DockWidgetFeature) { @@ -293,9 +344,998 @@ func QDockWidget_Tr3(s string, c string, n int) string { return _ret } +func (this *QDockWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDockWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDockWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ChangeEvent +func miqt_exec_callback_QDockWidget_ChangeEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDockWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDockWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_CloseEvent +func miqt_exec_callback_QDockWidget_CloseEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDockWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDockWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_PaintEvent +func miqt_exec_callback_QDockWidget_PaintEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDockWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDockWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDockWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_Event +func miqt_exec_callback_QDockWidget_Event(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_InitStyleOption(option *QStyleOptionDockWidget) { + + C.QDockWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QDockWidget) OnInitStyleOption(slot func(super func(option *QStyleOptionDockWidget), option *QStyleOptionDockWidget)) { + C.QDockWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InitStyleOption +func miqt_exec_callback_QDockWidget_InitStyleOption(self *C.QDockWidget, cb C.intptr_t, option *C.QStyleOptionDockWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionDockWidget), option *QStyleOptionDockWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionDockWidget(unsafe.Pointer(option), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DevType() int { + + return (int)(C.QDockWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QDockWidget) OnDevType(slot func(super func() int) int) { + C.QDockWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DevType +func miqt_exec_callback_QDockWidget_DevType(self *C.QDockWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_SetVisible(visible bool) { + + C.QDockWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QDockWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QDockWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_SetVisible +func miqt_exec_callback_QDockWidget_SetVisible(self *C.QDockWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QDockWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDockWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDockWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDockWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_SizeHint +func miqt_exec_callback_QDockWidget_SizeHint(self *C.QDockWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDockWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDockWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDockWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MinimumSizeHint +func miqt_exec_callback_QDockWidget_MinimumSizeHint(self *C.QDockWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QDockWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDockWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QDockWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_HeightForWidth +func miqt_exec_callback_QDockWidget_HeightForWidth(self *C.QDockWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QDockWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QDockWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QDockWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_HasHeightForWidth +func miqt_exec_callback_QDockWidget_HasHeightForWidth(self *C.QDockWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QDockWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QDockWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QDockWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_PaintEngine +func miqt_exec_callback_QDockWidget_PaintEngine(self *C.QDockWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MousePressEvent +func miqt_exec_callback_QDockWidget_MousePressEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MouseReleaseEvent +func miqt_exec_callback_QDockWidget_MouseReleaseEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MouseDoubleClickEvent +func miqt_exec_callback_QDockWidget_MouseDoubleClickEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDockWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDockWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MouseMoveEvent +func miqt_exec_callback_QDockWidget_MouseMoveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDockWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDockWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_WheelEvent +func miqt_exec_callback_QDockWidget_WheelEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDockWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDockWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_KeyPressEvent +func miqt_exec_callback_QDockWidget_KeyPressEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDockWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDockWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_KeyReleaseEvent +func miqt_exec_callback_QDockWidget_KeyReleaseEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDockWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDockWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_FocusInEvent +func miqt_exec_callback_QDockWidget_FocusInEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDockWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDockWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_FocusOutEvent +func miqt_exec_callback_QDockWidget_FocusOutEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QDockWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QDockWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_EnterEvent +func miqt_exec_callback_QDockWidget_EnterEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QDockWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDockWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_LeaveEvent +func miqt_exec_callback_QDockWidget_LeaveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QDockWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QDockWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_MoveEvent +func miqt_exec_callback_QDockWidget_MoveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDockWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDockWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ResizeEvent +func miqt_exec_callback_QDockWidget_ResizeEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDockWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDockWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ContextMenuEvent +func miqt_exec_callback_QDockWidget_ContextMenuEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QDockWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QDockWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_TabletEvent +func miqt_exec_callback_QDockWidget_TabletEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QDockWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QDockWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ActionEvent +func miqt_exec_callback_QDockWidget_ActionEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QDockWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QDockWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DragEnterEvent +func miqt_exec_callback_QDockWidget_DragEnterEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QDockWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QDockWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DragMoveEvent +func miqt_exec_callback_QDockWidget_DragMoveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QDockWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QDockWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DragLeaveEvent +func miqt_exec_callback_QDockWidget_DragLeaveEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QDockWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QDockWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_DropEvent +func miqt_exec_callback_QDockWidget_DropEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDockWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDockWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_ShowEvent +func miqt_exec_callback_QDockWidget_ShowEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDockWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDockWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDockWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_HideEvent +func miqt_exec_callback_QDockWidget_HideEvent(self *C.QDockWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QDockWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QDockWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QDockWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_NativeEvent +func miqt_exec_callback_QDockWidget_NativeEvent(self *C.QDockWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QDockWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QDockWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QDockWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_Metric +func miqt_exec_callback_QDockWidget_Metric(self *C.QDockWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QDockWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QDockWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QDockWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QDockWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InitPainter +func miqt_exec_callback_QDockWidget_InitPainter(self *C.QDockWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QDockWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QDockWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QDockWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QDockWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_Redirected +func miqt_exec_callback_QDockWidget_Redirected(self *C.QDockWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QDockWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QDockWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QDockWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_SharedPainter +func miqt_exec_callback_QDockWidget_SharedPainter(self *C.QDockWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QDockWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QDockWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QDockWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InputMethodEvent +func miqt_exec_callback_QDockWidget_InputMethodEvent(self *C.QDockWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QDockWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QDockWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDockWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDockWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDockWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_InputMethodQuery +func miqt_exec_callback_QDockWidget_InputMethodQuery(self *C.QDockWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDockWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QDockWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QDockWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QDockWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDockWidget_FocusNextPrevChild +func miqt_exec_callback_QDockWidget_FocusNextPrevChild(self *C.QDockWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QDockWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDockWidget) Delete() { - C.QDockWidget_Delete(this.h) + C.QDockWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdockwidget.h b/qt6/gen_qdockwidget.h index 78fc2e5d..ec77a24f 100644 --- a/qt6/gen_qdockwidget.h +++ b/qt6/gen_qdockwidget.h @@ -16,22 +16,80 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDockWidget; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QStyleOptionDockWidget; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionDockWidget QStyleOptionDockWidget; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QDockWidget* QDockWidget_new(QWidget* parent); -QDockWidget* QDockWidget_new2(struct miqt_string title); -QDockWidget* QDockWidget_new3(); -QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent); -QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags); -QDockWidget* QDockWidget_new6(QWidget* parent, int flags); +void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDockWidget_MetaObject(const QDockWidget* self); void* QDockWidget_Metacast(QDockWidget* self, const char* param1); struct miqt_string QDockWidget_Tr(const char* s); @@ -57,9 +115,98 @@ void QDockWidget_VisibilityChanged(QDockWidget* self, bool visible); void QDockWidget_connect_VisibilityChanged(QDockWidget* self, intptr_t slot); void QDockWidget_DockLocationChanged(QDockWidget* self, int area); void QDockWidget_connect_DockLocationChanged(QDockWidget* self, intptr_t slot); +void QDockWidget_ChangeEvent(QDockWidget* self, QEvent* event); +void QDockWidget_CloseEvent(QDockWidget* self, QCloseEvent* event); +void QDockWidget_PaintEvent(QDockWidget* self, QPaintEvent* event); +bool QDockWidget_Event(QDockWidget* self, QEvent* event); +void QDockWidget_InitStyleOption(const QDockWidget* self, QStyleOptionDockWidget* option); struct miqt_string QDockWidget_Tr2(const char* s, const char* c); struct miqt_string QDockWidget_Tr3(const char* s, const char* c, int n); -void QDockWidget_Delete(QDockWidget* self); +void QDockWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDockWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDockWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDockWidget_override_virtual_Event(void* self, intptr_t slot); +bool QDockWidget_virtualbase_Event(void* self, QEvent* event); +void QDockWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QDockWidget_virtualbase_InitStyleOption(const void* self, QStyleOptionDockWidget* option); +void QDockWidget_override_virtual_DevType(void* self, intptr_t slot); +int QDockWidget_virtualbase_DevType(const void* self); +void QDockWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QDockWidget_virtualbase_SetVisible(void* self, bool visible); +void QDockWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDockWidget_virtualbase_SizeHint(const void* self); +void QDockWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDockWidget_virtualbase_MinimumSizeHint(const void* self); +void QDockWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QDockWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QDockWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QDockWidget_virtualbase_HasHeightForWidth(const void* self); +void QDockWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QDockWidget_virtualbase_PaintEngine(const void* self); +void QDockWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDockWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDockWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDockWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDockWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDockWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDockWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QDockWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QDockWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QDockWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDockWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDockWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QDockWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QDockWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QDockWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QDockWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QDockWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QDockWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDockWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDockWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QDockWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QDockWidget_override_virtual_Metric(void* self, intptr_t slot); +int QDockWidget_virtualbase_Metric(const void* self, int param1); +void QDockWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QDockWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QDockWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QDockWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QDockWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QDockWidget_virtualbase_SharedPainter(const void* self); +void QDockWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QDockWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QDockWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDockWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QDockWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QDockWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QDockWidget_Delete(QDockWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdrag.cpp b/qt6/gen_qdrag.cpp index d4ef4801..e79bd2ee 100644 --- a/qt6/gen_qdrag.cpp +++ b/qt6/gen_qdrag.cpp @@ -1,4 +1,7 @@ +#include #include +#include +#include #include #include #include @@ -7,12 +10,195 @@ #include #include #include +#include #include #include "gen_qdrag.h" #include "_cgo_export.h" -QDrag* QDrag_new(QObject* dragSource) { - return new QDrag(dragSource); +class MiqtVirtualQDrag : public virtual QDrag { +public: + + MiqtVirtualQDrag(QObject* dragSource): QDrag(dragSource) {}; + + virtual ~MiqtVirtualQDrag() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDrag::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDrag_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDrag::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDrag::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDrag_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDrag::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDrag::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDrag_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDrag::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDrag::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDrag_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDrag::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDrag::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDrag_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDrag::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDrag::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDrag_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDrag::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDrag::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDrag_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDrag::disconnectNotify(*signal); + + } + +}; + +void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject) { + MiqtVirtualQDrag* ret = new MiqtVirtualQDrag(dragSource); + *outptr_QDrag = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDrag_MetaObject(const QDrag* self) { @@ -103,7 +289,7 @@ void QDrag_ActionChanged(QDrag* self, int action) { } void QDrag_connect_ActionChanged(QDrag* self, intptr_t slot) { - QDrag::connect(self, static_cast(&QDrag::actionChanged), self, [=](Qt::DropAction action) { + MiqtVirtualQDrag::connect(self, static_cast(&QDrag::actionChanged), self, [=](Qt::DropAction action) { Qt::DropAction action_ret = action; int sigval1 = static_cast(action_ret); miqt_exec_callback_QDrag_ActionChanged(slot, sigval1); @@ -115,7 +301,7 @@ void QDrag_TargetChanged(QDrag* self, QObject* newTarget) { } void QDrag_connect_TargetChanged(QDrag* self, intptr_t slot) { - QDrag::connect(self, static_cast(&QDrag::targetChanged), self, [=](QObject* newTarget) { + MiqtVirtualQDrag::connect(self, static_cast(&QDrag::targetChanged), self, [=](QObject* newTarget) { QObject* sigval1 = newTarget; miqt_exec_callback_QDrag_TargetChanged(slot, sigval1); }); @@ -148,7 +334,67 @@ int QDrag_Exec1(QDrag* self, int supportedActions) { return static_cast(_ret); } -void QDrag_Delete(QDrag* self) { - delete self; +void QDrag_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__Event = slot; +} + +bool QDrag_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDrag*)(self) )->virtualbase_Event(event); +} + +void QDrag_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__EventFilter = slot; +} + +bool QDrag_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDrag*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QDrag_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__TimerEvent = slot; +} + +void QDrag_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_TimerEvent(event); +} + +void QDrag_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__ChildEvent = slot; +} + +void QDrag_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_ChildEvent(event); +} + +void QDrag_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__CustomEvent = slot; +} + +void QDrag_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_CustomEvent(event); +} + +void QDrag_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__ConnectNotify = slot; +} + +void QDrag_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDrag_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDrag*)(self) )->handle__DisconnectNotify = slot; +} + +void QDrag_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDrag*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDrag_Delete(QDrag* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdrag.go b/qt6/gen_qdrag.go index 098afa3d..cd91664c 100644 --- a/qt6/gen_qdrag.go +++ b/qt6/gen_qdrag.go @@ -15,7 +15,8 @@ import ( ) type QDrag struct { - h *C.QDrag + h *C.QDrag + isSubclass bool *QObject } @@ -33,21 +34,34 @@ func (this *QDrag) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDrag(h *C.QDrag) *QDrag { +// newQDrag constructs the type using only CGO pointers. +func newQDrag(h *C.QDrag, h_QObject *C.QObject) *QDrag { if h == nil { return nil } - return &QDrag{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QDrag{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQDrag(h unsafe.Pointer) *QDrag { - return newQDrag((*C.QDrag)(h)) +// UnsafeNewQDrag constructs the type using only unsafe pointers. +func UnsafeNewQDrag(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDrag { + if h == nil { + return nil + } + + return &QDrag{h: (*C.QDrag)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQDrag constructs a new QDrag object. func NewQDrag(dragSource *QObject) *QDrag { - ret := C.QDrag_new(dragSource.cPointer()) - return newQDrag(ret) + var outptr_QDrag *C.QDrag = nil + var outptr_QObject *C.QObject = nil + + C.QDrag_new(dragSource.cPointer(), &outptr_QDrag, &outptr_QObject) + ret := newQDrag(outptr_QDrag, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDrag) MetaObject() *QMetaObject { @@ -74,7 +88,7 @@ func (this *QDrag) SetMimeData(data *QMimeData) { } func (this *QDrag) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QDrag_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QDrag_MimeData(this.h)), nil) } func (this *QDrag) SetPixmap(pixmap *QPixmap) { @@ -83,7 +97,7 @@ func (this *QDrag) SetPixmap(pixmap *QPixmap) { func (this *QDrag) Pixmap() *QPixmap { _ret := C.QDrag_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -121,7 +135,7 @@ func (this *QDrag) SetDragCursor(cursor *QPixmap, action DropAction) { func (this *QDrag) DragCursor(action DropAction) *QPixmap { _ret := C.QDrag_DragCursor(this.h, (C.int)(action)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -204,9 +218,175 @@ func (this *QDrag) Exec1(supportedActions DropAction) DropAction { return (DropAction)(C.QDrag_Exec1(this.h, (C.int)(supportedActions))) } +func (this *QDrag) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDrag_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDrag) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDrag_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_Event +func miqt_exec_callback_QDrag_Event(self *C.QDrag, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDrag{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDrag) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QDrag_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QDrag) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QDrag_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_EventFilter +func miqt_exec_callback_QDrag_EventFilter(self *C.QDrag, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDrag{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDrag) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDrag_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDrag) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDrag_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_TimerEvent +func miqt_exec_callback_QDrag_TimerEvent(self *C.QDrag, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDrag{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDrag) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QDrag_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDrag) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QDrag_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_ChildEvent +func miqt_exec_callback_QDrag_ChildEvent(self *C.QDrag, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDrag{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDrag) callVirtualBase_CustomEvent(event *QEvent) { + + C.QDrag_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDrag) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDrag_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_CustomEvent +func miqt_exec_callback_QDrag_CustomEvent(self *C.QDrag, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDrag{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDrag) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QDrag_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDrag) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDrag_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_ConnectNotify +func miqt_exec_callback_QDrag_ConnectNotify(self *C.QDrag, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDrag{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDrag) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QDrag_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QDrag) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QDrag_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDrag_DisconnectNotify +func miqt_exec_callback_QDrag_DisconnectNotify(self *C.QDrag, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDrag{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDrag) Delete() { - C.QDrag_Delete(this.h) + C.QDrag_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdrag.h b/qt6/gen_qdrag.h index f5b2bd4b..b65ba851 100644 --- a/qt6/gen_qdrag.h +++ b/qt6/gen_qdrag.h @@ -15,22 +15,30 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QDrag; +class QEvent; +class QMetaMethod; class QMetaObject; class QMimeData; class QObject; class QPixmap; class QPoint; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; typedef struct QDrag QDrag; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QObject QObject; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; +typedef struct QTimerEvent QTimerEvent; #endif -QDrag* QDrag_new(QObject* dragSource); +void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject); QMetaObject* QDrag_MetaObject(const QDrag* self); void* QDrag_Metacast(QDrag* self, const char* param1); struct miqt_string QDrag_Tr(const char* s); @@ -56,7 +64,21 @@ void QDrag_connect_TargetChanged(QDrag* self, intptr_t slot); struct miqt_string QDrag_Tr2(const char* s, const char* c); struct miqt_string QDrag_Tr3(const char* s, const char* c, int n); int QDrag_Exec1(QDrag* self, int supportedActions); -void QDrag_Delete(QDrag* self); +void QDrag_override_virtual_Event(void* self, intptr_t slot); +bool QDrag_virtualbase_Event(void* self, QEvent* event); +void QDrag_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDrag_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDrag_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDrag_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDrag_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDrag_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDrag_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDrag_virtualbase_CustomEvent(void* self, QEvent* event); +void QDrag_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDrag_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDrag_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDrag_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDrag_Delete(QDrag* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qdrawutil.cpp b/qt6/gen_qdrawutil.cpp index f279b759..c07d5fb8 100644 --- a/qt6/gen_qdrawutil.cpp +++ b/qt6/gen_qdrawutil.cpp @@ -3,23 +3,31 @@ #include "gen_qdrawutil.h" #include "_cgo_export.h" -QTileRules* QTileRules_new(int horizontalRule, int verticalRule) { - return new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); +void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); + *outptr_QTileRules = ret; } -QTileRules* QTileRules_new2() { - return new QTileRules(); +void QTileRules_new2(QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(); + *outptr_QTileRules = ret; } -QTileRules* QTileRules_new3(QTileRules* param1) { - return new QTileRules(*param1); +void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(*param1); + *outptr_QTileRules = ret; } -QTileRules* QTileRules_new4(int rule) { - return new QTileRules(static_cast(rule)); +void QTileRules_new4(int rule, QTileRules** outptr_QTileRules) { + QTileRules* ret = new QTileRules(static_cast(rule)); + *outptr_QTileRules = ret; } -void QTileRules_Delete(QTileRules* self) { - delete self; +void QTileRules_Delete(QTileRules* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qdrawutil.go b/qt6/gen_qdrawutil.go index 5d74fc58..d58f54d6 100644 --- a/qt6/gen_qdrawutil.go +++ b/qt6/gen_qdrawutil.go @@ -32,7 +32,8 @@ const ( ) type QTileRules struct { - h *C.QTileRules + h *C.QTileRules + isSubclass bool } func (this *QTileRules) cPointer() *C.QTileRules { @@ -49,6 +50,7 @@ func (this *QTileRules) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTileRules constructs the type using only CGO pointers. func newQTileRules(h *C.QTileRules) *QTileRules { if h == nil { return nil @@ -56,37 +58,58 @@ func newQTileRules(h *C.QTileRules) *QTileRules { return &QTileRules{h: h} } +// UnsafeNewQTileRules constructs the type using only unsafe pointers. func UnsafeNewQTileRules(h unsafe.Pointer) *QTileRules { - return newQTileRules((*C.QTileRules)(h)) + if h == nil { + return nil + } + + return &QTileRules{h: (*C.QTileRules)(h)} } // NewQTileRules constructs a new QTileRules object. func NewQTileRules(horizontalRule TileRule, verticalRule TileRule) *QTileRules { - ret := C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule)) - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule), &outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // NewQTileRules2 constructs a new QTileRules object. func NewQTileRules2() *QTileRules { - ret := C.QTileRules_new2() - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new2(&outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // NewQTileRules3 constructs a new QTileRules object. func NewQTileRules3(param1 *QTileRules) *QTileRules { - ret := C.QTileRules_new3(param1.cPointer()) - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new3(param1.cPointer(), &outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // NewQTileRules4 constructs a new QTileRules object. func NewQTileRules4(rule TileRule) *QTileRules { - ret := C.QTileRules_new4((C.int)(rule)) - return newQTileRules(ret) + var outptr_QTileRules *C.QTileRules = nil + + C.QTileRules_new4((C.int)(rule), &outptr_QTileRules) + ret := newQTileRules(outptr_QTileRules) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QTileRules) Delete() { - C.QTileRules_Delete(this.h) + C.QTileRules_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qdrawutil.h b/qt6/gen_qdrawutil.h index 062edf80..1cda62ed 100644 --- a/qt6/gen_qdrawutil.h +++ b/qt6/gen_qdrawutil.h @@ -20,11 +20,11 @@ class QTileRules; typedef struct QTileRules QTileRules; #endif -QTileRules* QTileRules_new(int horizontalRule, int verticalRule); -QTileRules* QTileRules_new2(); -QTileRules* QTileRules_new3(QTileRules* param1); -QTileRules* QTileRules_new4(int rule); -void QTileRules_Delete(QTileRules* self); +void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules); +void QTileRules_new2(QTileRules** outptr_QTileRules); +void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules); +void QTileRules_new4(int rule, QTileRules** outptr_QTileRules); +void QTileRules_Delete(QTileRules* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qeasingcurve.cpp b/qt6/gen_qeasingcurve.cpp index 5d605619..f1d786da 100644 --- a/qt6/gen_qeasingcurve.cpp +++ b/qt6/gen_qeasingcurve.cpp @@ -5,16 +5,19 @@ #include "gen_qeasingcurve.h" #include "_cgo_export.h" -QEasingCurve* QEasingCurve_new() { - return new QEasingCurve(); +void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve) { + QEasingCurve* ret = new QEasingCurve(); + *outptr_QEasingCurve = ret; } -QEasingCurve* QEasingCurve_new2(QEasingCurve* other) { - return new QEasingCurve(*other); +void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve) { + QEasingCurve* ret = new QEasingCurve(*other); + *outptr_QEasingCurve = ret; } -QEasingCurve* QEasingCurve_new3(int typeVal) { - return new QEasingCurve(static_cast(typeVal)); +void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve) { + QEasingCurve* ret = new QEasingCurve(static_cast(typeVal)); + *outptr_QEasingCurve = ret; } void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other) { @@ -95,7 +98,11 @@ double QEasingCurve_ValueForProgress(const QEasingCurve* self, double progress) return static_cast(_ret); } -void QEasingCurve_Delete(QEasingCurve* self) { - delete self; +void QEasingCurve_Delete(QEasingCurve* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qeasingcurve.go b/qt6/gen_qeasingcurve.go index b6dd5f73..6cd0dd25 100644 --- a/qt6/gen_qeasingcurve.go +++ b/qt6/gen_qeasingcurve.go @@ -68,7 +68,8 @@ const ( ) type QEasingCurve struct { - h *C.QEasingCurve + h *C.QEasingCurve + isSubclass bool } func (this *QEasingCurve) cPointer() *C.QEasingCurve { @@ -85,6 +86,7 @@ func (this *QEasingCurve) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEasingCurve constructs the type using only CGO pointers. func newQEasingCurve(h *C.QEasingCurve) *QEasingCurve { if h == nil { return nil @@ -92,26 +94,43 @@ func newQEasingCurve(h *C.QEasingCurve) *QEasingCurve { return &QEasingCurve{h: h} } +// UnsafeNewQEasingCurve constructs the type using only unsafe pointers. func UnsafeNewQEasingCurve(h unsafe.Pointer) *QEasingCurve { - return newQEasingCurve((*C.QEasingCurve)(h)) + if h == nil { + return nil + } + + return &QEasingCurve{h: (*C.QEasingCurve)(h)} } // NewQEasingCurve constructs a new QEasingCurve object. func NewQEasingCurve() *QEasingCurve { - ret := C.QEasingCurve_new() - return newQEasingCurve(ret) + var outptr_QEasingCurve *C.QEasingCurve = nil + + C.QEasingCurve_new(&outptr_QEasingCurve) + ret := newQEasingCurve(outptr_QEasingCurve) + ret.isSubclass = true + return ret } // NewQEasingCurve2 constructs a new QEasingCurve object. func NewQEasingCurve2(other *QEasingCurve) *QEasingCurve { - ret := C.QEasingCurve_new2(other.cPointer()) - return newQEasingCurve(ret) + var outptr_QEasingCurve *C.QEasingCurve = nil + + C.QEasingCurve_new2(other.cPointer(), &outptr_QEasingCurve) + ret := newQEasingCurve(outptr_QEasingCurve) + ret.isSubclass = true + return ret } // NewQEasingCurve3 constructs a new QEasingCurve object. func NewQEasingCurve3(typeVal QEasingCurve__Type) *QEasingCurve { - ret := C.QEasingCurve_new3((C.int)(typeVal)) - return newQEasingCurve(ret) + var outptr_QEasingCurve *C.QEasingCurve = nil + + C.QEasingCurve_new3((C.int)(typeVal), &outptr_QEasingCurve) + ret := newQEasingCurve(outptr_QEasingCurve) + ret.isSubclass = true + return ret } func (this *QEasingCurve) OperatorAssign(other *QEasingCurve) { @@ -189,7 +208,7 @@ func (this *QEasingCurve) ValueForProgress(progress float64) float64 { // Delete this object from C++ memory. func (this *QEasingCurve) Delete() { - C.QEasingCurve_Delete(this.h) + C.QEasingCurve_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qeasingcurve.h b/qt6/gen_qeasingcurve.h index 01eb631b..2d2494d9 100644 --- a/qt6/gen_qeasingcurve.h +++ b/qt6/gen_qeasingcurve.h @@ -22,9 +22,9 @@ typedef struct QEasingCurve QEasingCurve; typedef struct QPointF QPointF; #endif -QEasingCurve* QEasingCurve_new(); -QEasingCurve* QEasingCurve_new2(QEasingCurve* other); -QEasingCurve* QEasingCurve_new3(int typeVal); +void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve); +void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve); +void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve); void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other); void QEasingCurve_Swap(QEasingCurve* self, QEasingCurve* other); bool QEasingCurve_OperatorEqual(const QEasingCurve* self, QEasingCurve* other); @@ -41,7 +41,7 @@ struct miqt_array /* of QPointF* */ QEasingCurve_ToCubicSpline(const QEasingCur int QEasingCurve_Type(const QEasingCurve* self); void QEasingCurve_SetType(QEasingCurve* self, int typeVal); double QEasingCurve_ValueForProgress(const QEasingCurve* self, double progress); -void QEasingCurve_Delete(QEasingCurve* self); +void QEasingCurve_Delete(QEasingCurve* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qelapsedtimer.cpp b/qt6/gen_qelapsedtimer.cpp index cf52941f..c4d3f68f 100644 --- a/qt6/gen_qelapsedtimer.cpp +++ b/qt6/gen_qelapsedtimer.cpp @@ -3,8 +3,9 @@ #include "gen_qelapsedtimer.h" #include "_cgo_export.h" -QElapsedTimer* QElapsedTimer_new() { - return new QElapsedTimer(); +void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer) { + QElapsedTimer* ret = new QElapsedTimer(); + *outptr_QElapsedTimer = ret; } int QElapsedTimer_ClockType() { @@ -62,7 +63,11 @@ long long QElapsedTimer_SecsTo(const QElapsedTimer* self, QElapsedTimer* other) return static_cast(_ret); } -void QElapsedTimer_Delete(QElapsedTimer* self) { - delete self; +void QElapsedTimer_Delete(QElapsedTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qelapsedtimer.go b/qt6/gen_qelapsedtimer.go index 15d9c9fd..e8a7fa39 100644 --- a/qt6/gen_qelapsedtimer.go +++ b/qt6/gen_qelapsedtimer.go @@ -23,7 +23,8 @@ const ( ) type QElapsedTimer struct { - h *C.QElapsedTimer + h *C.QElapsedTimer + isSubclass bool } func (this *QElapsedTimer) cPointer() *C.QElapsedTimer { @@ -40,6 +41,7 @@ func (this *QElapsedTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQElapsedTimer constructs the type using only CGO pointers. func newQElapsedTimer(h *C.QElapsedTimer) *QElapsedTimer { if h == nil { return nil @@ -47,14 +49,23 @@ func newQElapsedTimer(h *C.QElapsedTimer) *QElapsedTimer { return &QElapsedTimer{h: h} } +// UnsafeNewQElapsedTimer constructs the type using only unsafe pointers. func UnsafeNewQElapsedTimer(h unsafe.Pointer) *QElapsedTimer { - return newQElapsedTimer((*C.QElapsedTimer)(h)) + if h == nil { + return nil + } + + return &QElapsedTimer{h: (*C.QElapsedTimer)(h)} } // NewQElapsedTimer constructs a new QElapsedTimer object. func NewQElapsedTimer() *QElapsedTimer { - ret := C.QElapsedTimer_new() - return newQElapsedTimer(ret) + var outptr_QElapsedTimer *C.QElapsedTimer = nil + + C.QElapsedTimer_new(&outptr_QElapsedTimer) + ret := newQElapsedTimer(outptr_QElapsedTimer) + ret.isSubclass = true + return ret } func QElapsedTimer_ClockType() QElapsedTimer__ClockType { @@ -107,7 +118,7 @@ func (this *QElapsedTimer) SecsTo(other *QElapsedTimer) int64 { // Delete this object from C++ memory. func (this *QElapsedTimer) Delete() { - C.QElapsedTimer_Delete(this.h) + C.QElapsedTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qelapsedtimer.h b/qt6/gen_qelapsedtimer.h index fdbff2d2..1db3981f 100644 --- a/qt6/gen_qelapsedtimer.h +++ b/qt6/gen_qelapsedtimer.h @@ -20,7 +20,7 @@ class QElapsedTimer; typedef struct QElapsedTimer QElapsedTimer; #endif -QElapsedTimer* QElapsedTimer_new(); +void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer); int QElapsedTimer_ClockType(); bool QElapsedTimer_IsMonotonic(); void QElapsedTimer_Start(QElapsedTimer* self); @@ -33,7 +33,7 @@ bool QElapsedTimer_HasExpired(const QElapsedTimer* self, long long timeout); long long QElapsedTimer_MsecsSinceReference(const QElapsedTimer* self); long long QElapsedTimer_MsecsTo(const QElapsedTimer* self, QElapsedTimer* other); long long QElapsedTimer_SecsTo(const QElapsedTimer* self, QElapsedTimer* other); -void QElapsedTimer_Delete(QElapsedTimer* self); +void QElapsedTimer_Delete(QElapsedTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qerrormessage.cpp b/qt6/gen_qerrormessage.cpp index 8a324ba8..c5ffd6d4 100644 --- a/qt6/gen_qerrormessage.cpp +++ b/qt6/gen_qerrormessage.cpp @@ -1,5 +1,15 @@ +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -8,12 +18,383 @@ #include "gen_qerrormessage.h" #include "_cgo_export.h" -QErrorMessage* QErrorMessage_new(QWidget* parent) { - return new QErrorMessage(parent); +class MiqtVirtualQErrorMessage : public virtual QErrorMessage { +public: + + MiqtVirtualQErrorMessage(QWidget* parent): QErrorMessage(parent) {}; + MiqtVirtualQErrorMessage(): QErrorMessage() {}; + + virtual ~MiqtVirtualQErrorMessage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QErrorMessage::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QErrorMessage_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QErrorMessage::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QErrorMessage::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QErrorMessage_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QErrorMessage::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QErrorMessage::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QErrorMessage_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QErrorMessage::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QErrorMessage::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QErrorMessage_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QErrorMessage::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QErrorMessage::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QErrorMessage_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QErrorMessage::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QErrorMessage::open(); + return; + } + + + miqt_exec_callback_QErrorMessage_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QErrorMessage::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QErrorMessage::exec(); + } + + + int callback_return_value = miqt_exec_callback_QErrorMessage_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QErrorMessage::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QErrorMessage::accept(); + return; + } + + + miqt_exec_callback_QErrorMessage_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QErrorMessage::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QErrorMessage::reject(); + return; + } + + + miqt_exec_callback_QErrorMessage_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QErrorMessage::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QErrorMessage::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QErrorMessage::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QErrorMessage::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QErrorMessage::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QErrorMessage::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QErrorMessage::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QErrorMessage::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QErrorMessage::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QErrorMessage::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QErrorMessage_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QErrorMessage::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QErrorMessage::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QErrorMessage_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QErrorMessage::eventFilter(param1, param2); + + } + +}; + +void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(parent); + *outptr_QErrorMessage = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QErrorMessage* QErrorMessage_new2() { - return new QErrorMessage(); +void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(); + *outptr_QErrorMessage = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self) { @@ -72,7 +453,131 @@ struct miqt_string QErrorMessage_Tr3(const char* s, const char* c, int n) { return _ms; } -void QErrorMessage_Delete(QErrorMessage* self) { - delete self; +void QErrorMessage_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Done = slot; +} + +void QErrorMessage_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Done(param1); +} + +void QErrorMessage_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ChangeEvent = slot; +} + +void QErrorMessage_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ChangeEvent(e); +} + +void QErrorMessage_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__SetVisible = slot; +} + +void QErrorMessage_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_SetVisible(visible); +} + +void QErrorMessage_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__SizeHint = slot; +} + +QSize* QErrorMessage_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQErrorMessage*)(self) )->virtualbase_SizeHint(); +} + +void QErrorMessage_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QErrorMessage_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQErrorMessage*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QErrorMessage_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Open = slot; +} + +void QErrorMessage_virtualbase_Open(void* self) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Open(); +} + +void QErrorMessage_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Exec = slot; +} + +int QErrorMessage_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Exec(); +} + +void QErrorMessage_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Accept = slot; +} + +void QErrorMessage_virtualbase_Accept(void* self) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Accept(); +} + +void QErrorMessage_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__Reject = slot; +} + +void QErrorMessage_virtualbase_Reject(void* self) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_Reject(); +} + +void QErrorMessage_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__KeyPressEvent = slot; +} + +void QErrorMessage_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QErrorMessage_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__CloseEvent = slot; +} + +void QErrorMessage_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_CloseEvent(param1); +} + +void QErrorMessage_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ShowEvent = slot; +} + +void QErrorMessage_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ShowEvent(param1); +} + +void QErrorMessage_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ResizeEvent = slot; +} + +void QErrorMessage_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QErrorMessage_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__ContextMenuEvent = slot; +} + +void QErrorMessage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QErrorMessage_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QErrorMessage*)(self) )->handle__EventFilter = slot; +} + +bool QErrorMessage_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQErrorMessage*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QErrorMessage_Delete(QErrorMessage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qerrormessage.go b/qt6/gen_qerrormessage.go index 7449a8cf..8c96e099 100644 --- a/qt6/gen_qerrormessage.go +++ b/qt6/gen_qerrormessage.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QErrorMessage struct { - h *C.QErrorMessage + h *C.QErrorMessage + isSubclass bool *QDialog } @@ -32,27 +34,51 @@ func (this *QErrorMessage) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQErrorMessage(h *C.QErrorMessage) *QErrorMessage { +// newQErrorMessage constructs the type using only CGO pointers. +func newQErrorMessage(h *C.QErrorMessage, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QErrorMessage { if h == nil { return nil } - return &QErrorMessage{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QErrorMessage{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQErrorMessage(h unsafe.Pointer) *QErrorMessage { - return newQErrorMessage((*C.QErrorMessage)(h)) +// UnsafeNewQErrorMessage constructs the type using only unsafe pointers. +func UnsafeNewQErrorMessage(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QErrorMessage { + if h == nil { + return nil + } + + return &QErrorMessage{h: (*C.QErrorMessage)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQErrorMessage constructs a new QErrorMessage object. func NewQErrorMessage(parent *QWidget) *QErrorMessage { - ret := C.QErrorMessage_new(parent.cPointer()) - return newQErrorMessage(ret) + var outptr_QErrorMessage *C.QErrorMessage = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QErrorMessage_new(parent.cPointer(), &outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQErrorMessage2 constructs a new QErrorMessage object. func NewQErrorMessage2() *QErrorMessage { - ret := C.QErrorMessage_new2() - return newQErrorMessage(ret) + var outptr_QErrorMessage *C.QErrorMessage = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QErrorMessage_new2(&outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QErrorMessage) MetaObject() *QMetaObject { @@ -75,7 +101,7 @@ func QErrorMessage_Tr(s string) string { } func QErrorMessage_QtHandler() *QErrorMessage { - return UnsafeNewQErrorMessage(unsafe.Pointer(C.QErrorMessage_QtHandler())) + return UnsafeNewQErrorMessage(unsafe.Pointer(C.QErrorMessage_QtHandler()), nil, nil, nil, nil) } func (this *QErrorMessage) ShowMessage(message string) { @@ -120,9 +146,351 @@ func QErrorMessage_Tr3(s string, c string, n int) string { return _ret } +func (this *QErrorMessage) callVirtualBase_Done(param1 int) { + + C.QErrorMessage_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QErrorMessage) OnDone(slot func(super func(param1 int), param1 int)) { + C.QErrorMessage_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Done +func miqt_exec_callback_QErrorMessage_Done(self *C.QErrorMessage, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QErrorMessage_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QErrorMessage) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QErrorMessage_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ChangeEvent +func miqt_exec_callback_QErrorMessage_ChangeEvent(self *C.QErrorMessage, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_SetVisible(visible bool) { + + C.QErrorMessage_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QErrorMessage) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QErrorMessage_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_SetVisible +func miqt_exec_callback_QErrorMessage_SetVisible(self *C.QErrorMessage, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_SizeHint() *QSize { + + _ret := C.QErrorMessage_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QErrorMessage) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QErrorMessage_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_SizeHint +func miqt_exec_callback_QErrorMessage_SizeHint(self *C.QErrorMessage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QErrorMessage) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QErrorMessage_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QErrorMessage) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QErrorMessage_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_MinimumSizeHint +func miqt_exec_callback_QErrorMessage_MinimumSizeHint(self *C.QErrorMessage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QErrorMessage) callVirtualBase_Open() { + + C.QErrorMessage_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QErrorMessage) OnOpen(slot func(super func())) { + C.QErrorMessage_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Open +func miqt_exec_callback_QErrorMessage_Open(self *C.QErrorMessage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Open) + +} + +func (this *QErrorMessage) callVirtualBase_Exec() int { + + return (int)(C.QErrorMessage_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QErrorMessage) OnExec(slot func(super func() int) int) { + C.QErrorMessage_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Exec +func miqt_exec_callback_QErrorMessage_Exec(self *C.QErrorMessage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QErrorMessage) callVirtualBase_Accept() { + + C.QErrorMessage_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QErrorMessage) OnAccept(slot func(super func())) { + C.QErrorMessage_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Accept +func miqt_exec_callback_QErrorMessage_Accept(self *C.QErrorMessage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Accept) + +} + +func (this *QErrorMessage) callVirtualBase_Reject() { + + C.QErrorMessage_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QErrorMessage) OnReject(slot func(super func())) { + C.QErrorMessage_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_Reject +func miqt_exec_callback_QErrorMessage_Reject(self *C.QErrorMessage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QErrorMessage{h: self}).callVirtualBase_Reject) + +} + +func (this *QErrorMessage) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QErrorMessage_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QErrorMessage_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_KeyPressEvent +func miqt_exec_callback_QErrorMessage_KeyPressEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QErrorMessage_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QErrorMessage_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_CloseEvent +func miqt_exec_callback_QErrorMessage_CloseEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QErrorMessage_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QErrorMessage_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ShowEvent +func miqt_exec_callback_QErrorMessage_ShowEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QErrorMessage_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QErrorMessage_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ResizeEvent +func miqt_exec_callback_QErrorMessage_ResizeEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QErrorMessage_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QErrorMessage) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QErrorMessage_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_ContextMenuEvent +func miqt_exec_callback_QErrorMessage_ContextMenuEvent(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QErrorMessage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QErrorMessage) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QErrorMessage_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QErrorMessage) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QErrorMessage_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QErrorMessage_EventFilter +func miqt_exec_callback_QErrorMessage_EventFilter(self *C.QErrorMessage, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QErrorMessage{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QErrorMessage) Delete() { - C.QErrorMessage_Delete(this.h) + C.QErrorMessage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qerrormessage.h b/qt6/gen_qerrormessage.h index 9553072a..0adb9b26 100644 --- a/qt6/gen_qerrormessage.h +++ b/qt6/gen_qerrormessage.h @@ -15,26 +15,78 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; class QErrorMessage; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; typedef struct QErrorMessage QErrorMessage; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QErrorMessage* QErrorMessage_new(QWidget* parent); -QErrorMessage* QErrorMessage_new2(); +void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self); void* QErrorMessage_Metacast(QErrorMessage* self, const char* param1); struct miqt_string QErrorMessage_Tr(const char* s); QErrorMessage* QErrorMessage_QtHandler(); void QErrorMessage_ShowMessage(QErrorMessage* self, struct miqt_string message); void QErrorMessage_ShowMessage2(QErrorMessage* self, struct miqt_string message, struct miqt_string typeVal); +void QErrorMessage_Done(QErrorMessage* self, int param1); +void QErrorMessage_ChangeEvent(QErrorMessage* self, QEvent* e); struct miqt_string QErrorMessage_Tr2(const char* s, const char* c); struct miqt_string QErrorMessage_Tr3(const char* s, const char* c, int n); -void QErrorMessage_Delete(QErrorMessage* self); +void QErrorMessage_override_virtual_Done(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Done(void* self, int param1); +void QErrorMessage_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ChangeEvent(void* self, QEvent* e); +void QErrorMessage_override_virtual_SetVisible(void* self, intptr_t slot); +void QErrorMessage_virtualbase_SetVisible(void* self, bool visible); +void QErrorMessage_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QErrorMessage_virtualbase_SizeHint(const void* self); +void QErrorMessage_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QErrorMessage_virtualbase_MinimumSizeHint(const void* self); +void QErrorMessage_override_virtual_Open(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Open(void* self); +void QErrorMessage_override_virtual_Exec(void* self, intptr_t slot); +int QErrorMessage_virtualbase_Exec(void* self); +void QErrorMessage_override_virtual_Accept(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Accept(void* self); +void QErrorMessage_override_virtual_Reject(void* self, intptr_t slot); +void QErrorMessage_virtualbase_Reject(void* self); +void QErrorMessage_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QErrorMessage_override_virtual_CloseEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QErrorMessage_override_virtual_ShowEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QErrorMessage_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QErrorMessage_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QErrorMessage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QErrorMessage_override_virtual_EventFilter(void* self, intptr_t slot); +bool QErrorMessage_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QErrorMessage_Delete(QErrorMessage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qevent.cpp b/qt6/gen_qevent.cpp index 458c7c2b..3d973aa4 100644 --- a/qt6/gen_qevent.cpp +++ b/qt6/gen_qevent.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -65,12 +66,97 @@ #include "gen_qevent.h" #include "_cgo_export.h" -QInputEvent* QInputEvent_new(int typeVal, QInputDevice* m_dev) { - return new QInputEvent(static_cast(typeVal), m_dev); +class MiqtVirtualQInputEvent : public virtual QInputEvent { +public: + + MiqtVirtualQInputEvent(QEvent::Type typeVal, const QInputDevice* m_dev): QInputEvent(typeVal, m_dev) {}; + MiqtVirtualQInputEvent(QEvent::Type typeVal, const QInputDevice* m_dev, Qt::KeyboardModifiers modifiers): QInputEvent(typeVal, m_dev, modifiers) {}; + + virtual ~MiqtVirtualQInputEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QInputEvent* clone() const override { + if (handle__Clone == 0) { + return QInputEvent::clone(); + } + + + QInputEvent* callback_return_value = miqt_exec_callback_QInputEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QInputEvent* virtualbase_Clone() const { + + return QInputEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTimestamp = 0; + + // Subclass to allow providing a Go implementation + virtual void setTimestamp(quint64 timestamp) override { + if (handle__SetTimestamp == 0) { + QInputEvent::setTimestamp(timestamp); + return; + } + + quint64 timestamp_ret = timestamp; + unsigned long long sigval1 = static_cast(timestamp_ret); + + miqt_exec_callback_QInputEvent_SetTimestamp(this, handle__SetTimestamp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTimestamp(unsigned long long timestamp) { + + QInputEvent::setTimestamp(static_cast(timestamp)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QInputEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QInputEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QInputEvent::setAccepted(accepted); + + } + +}; + +void QInputEvent_new(int typeVal, QInputDevice* m_dev, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQInputEvent* ret = new MiqtVirtualQInputEvent(static_cast(typeVal), m_dev); + *outptr_QInputEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputEvent* QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers) { - return new QInputEvent(static_cast(typeVal), m_dev, static_cast(modifiers)); +void QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQInputEvent* ret = new MiqtVirtualQInputEvent(static_cast(typeVal), m_dev, static_cast(modifiers)); + *outptr_QInputEvent = ret; + *outptr_QEvent = static_cast(ret); } QInputEvent* QInputEvent_Clone(const QInputEvent* self) { @@ -104,26 +190,211 @@ void QInputEvent_SetTimestamp(QInputEvent* self, unsigned long long timestamp) { self->setTimestamp(static_cast(timestamp)); } -void QInputEvent_Delete(QInputEvent* self) { - delete self; +void QInputEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QInputEvent*)(self) )->handle__Clone = slot; +} + +QInputEvent* QInputEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQInputEvent*)(self) )->virtualbase_Clone(); +} + +void QInputEvent_override_virtual_SetTimestamp(void* self, intptr_t slot) { + dynamic_cast( (QInputEvent*)(self) )->handle__SetTimestamp = slot; +} + +void QInputEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp) { + ( (MiqtVirtualQInputEvent*)(self) )->virtualbase_SetTimestamp(timestamp); +} + +void QInputEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QInputEvent*)(self) )->handle__SetAccepted = slot; +} + +void QInputEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQInputEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QInputEvent_Delete(QInputEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPointerEvent* QPointerEvent_new(int typeVal, QPointingDevice* dev) { - return new QPointerEvent(static_cast(typeVal), dev); +class MiqtVirtualQPointerEvent : public virtual QPointerEvent { +public: + + MiqtVirtualQPointerEvent(QEvent::Type typeVal, const QPointingDevice* dev): QPointerEvent(typeVal, dev) {}; + MiqtVirtualQPointerEvent(QEvent::Type typeVal, const QPointingDevice* dev, Qt::KeyboardModifiers modifiers): QPointerEvent(typeVal, dev, modifiers) {}; + MiqtVirtualQPointerEvent(QEvent::Type typeVal, const QPointingDevice* dev, Qt::KeyboardModifiers modifiers, const QList& points): QPointerEvent(typeVal, dev, modifiers, points) {}; + + virtual ~MiqtVirtualQPointerEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QPointerEvent* clone() const override { + if (handle__Clone == 0) { + return QPointerEvent::clone(); + } + + + QPointerEvent* callback_return_value = miqt_exec_callback_QPointerEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPointerEvent* virtualbase_Clone() const { + + return QPointerEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTimestamp = 0; + + // Subclass to allow providing a Go implementation + virtual void setTimestamp(quint64 timestamp) override { + if (handle__SetTimestamp == 0) { + QPointerEvent::setTimestamp(timestamp); + return; + } + + quint64 timestamp_ret = timestamp; + unsigned long long sigval1 = static_cast(timestamp_ret); + + miqt_exec_callback_QPointerEvent_SetTimestamp(this, handle__SetTimestamp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTimestamp(unsigned long long timestamp) { + + QPointerEvent::setTimestamp(static_cast(timestamp)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QPointerEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QPointerEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QPointerEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QPointerEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QPointerEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QPointerEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QPointerEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QPointerEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QPointerEvent::isEndEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QPointerEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QPointerEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QPointerEvent::setAccepted(accepted); + + } + +}; + +void QPointerEvent_new(int typeVal, QPointingDevice* dev, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQPointerEvent* ret = new MiqtVirtualQPointerEvent(static_cast(typeVal), dev); + *outptr_QPointerEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QPointerEvent* QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers) { - return new QPointerEvent(static_cast(typeVal), dev, static_cast(modifiers)); +void QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQPointerEvent* ret = new MiqtVirtualQPointerEvent(static_cast(typeVal), dev, static_cast(modifiers)); + *outptr_QPointerEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QPointerEvent* QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points) { +void QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QList points_QList; points_QList.reserve(points.len); QEventPoint** points_arr = static_cast(points.data); for(size_t i = 0; i < points.len; ++i) { points_QList.push_back(*(points_arr[i])); } - return new QPointerEvent(static_cast(typeVal), dev, static_cast(modifiers), points_QList); + MiqtVirtualQPointerEvent* ret = new MiqtVirtualQPointerEvent(static_cast(typeVal), dev, static_cast(modifiers), points_QList); + *outptr_QPointerEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointerEvent* QPointerEvent_Clone(const QPointerEvent* self) { @@ -215,8 +486,60 @@ bool QPointerEvent_RemovePassiveGrabber(QPointerEvent* self, QEventPoint* point, return self->removePassiveGrabber(*point, grabber); } -void QPointerEvent_Delete(QPointerEvent* self) { - delete self; +void QPointerEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QPointerEvent*)(self) )->handle__Clone = slot; +} + +QPointerEvent* QPointerEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQPointerEvent*)(self) )->virtualbase_Clone(); +} + +void QPointerEvent_override_virtual_SetTimestamp(void* self, intptr_t slot) { + dynamic_cast( (QPointerEvent*)(self) )->handle__SetTimestamp = slot; +} + +void QPointerEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp) { + ( (MiqtVirtualQPointerEvent*)(self) )->virtualbase_SetTimestamp(timestamp); +} + +void QPointerEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QPointerEvent*)(self) )->handle__IsBeginEvent = slot; +} + +bool QPointerEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQPointerEvent*)(self) )->virtualbase_IsBeginEvent(); +} + +void QPointerEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QPointerEvent*)(self) )->handle__IsUpdateEvent = slot; +} + +bool QPointerEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQPointerEvent*)(self) )->virtualbase_IsUpdateEvent(); +} + +void QPointerEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QPointerEvent*)(self) )->handle__IsEndEvent = slot; +} + +bool QPointerEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQPointerEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QPointerEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QPointerEvent*)(self) )->handle__SetAccepted = slot; +} + +void QPointerEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQPointerEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QPointerEvent_Delete(QPointerEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QSinglePointEvent* QSinglePointEvent_Clone(const QSinglePointEvent* self) { @@ -265,16 +588,128 @@ void QSinglePointEvent_SetExclusivePointGrabber(QSinglePointEvent* self, QObject self->setExclusivePointGrabber(exclusiveGrabber); } -void QSinglePointEvent_Delete(QSinglePointEvent* self) { - delete self; +void QSinglePointEvent_Delete(QSinglePointEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos) { - return new QEnterEvent(*localPos, *scenePos, *globalPos); +class MiqtVirtualQEnterEvent : public virtual QEnterEvent { +public: + + MiqtVirtualQEnterEvent(const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos): QEnterEvent(localPos, scenePos, globalPos) {}; + MiqtVirtualQEnterEvent(const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, const QPointingDevice* device): QEnterEvent(localPos, scenePos, globalPos, device) {}; + + virtual ~MiqtVirtualQEnterEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QEnterEvent* clone() const override { + if (handle__Clone == 0) { + return QEnterEvent::clone(); + } + + + QEnterEvent* callback_return_value = miqt_exec_callback_QEnterEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QEnterEvent* virtualbase_Clone() const { + + return QEnterEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QEnterEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QEnterEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QEnterEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QEnterEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QEnterEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QEnterEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QEnterEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QEnterEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QEnterEvent::isEndEvent(); + + } + +}; + +void QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQEnterEvent* ret = new MiqtVirtualQEnterEvent(*localPos, *scenePos, *globalPos); + *outptr_QEnterEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QEnterEvent* QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device) { - return new QEnterEvent(*localPos, *scenePos, *globalPos, device); +void QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQEnterEvent* ret = new MiqtVirtualQEnterEvent(*localPos, *scenePos, *globalPos, device); + *outptr_QEnterEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QEnterEvent* QEnterEvent_Clone(const QEnterEvent* self) { @@ -317,40 +752,220 @@ QPointF* QEnterEvent_ScreenPos(const QEnterEvent* self) { return new QPointF(self->screenPos()); } -void QEnterEvent_Delete(QEnterEvent* self) { - delete self; +void QEnterEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QEnterEvent*)(self) )->handle__Clone = slot; +} + +QEnterEvent* QEnterEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQEnterEvent*)(self) )->virtualbase_Clone(); +} + +void QEnterEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QEnterEvent*)(self) )->handle__IsBeginEvent = slot; +} + +bool QEnterEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQEnterEvent*)(self) )->virtualbase_IsBeginEvent(); +} + +void QEnterEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QEnterEvent*)(self) )->handle__IsUpdateEvent = slot; } -QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers) { - return new QMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); +bool QEnterEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQEnterEvent*)(self) )->virtualbase_IsUpdateEvent(); +} + +void QEnterEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QEnterEvent*)(self) )->handle__IsEndEvent = slot; +} + +bool QEnterEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQEnterEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQMouseEvent : public virtual QMouseEvent { +public: + + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers): QMouseEvent(typeVal, localPos, button, buttons, modifiers) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, const QPointF& globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers): QMouseEvent(typeVal, localPos, globalPos, button, buttons, modifiers) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers): QMouseEvent(typeVal, localPos, scenePos, globalPos, button, buttons, modifiers) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source): QMouseEvent(typeVal, localPos, scenePos, globalPos, button, buttons, modifiers, source) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPointingDevice* device): QMouseEvent(typeVal, localPos, button, buttons, modifiers, device) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, const QPointF& globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPointingDevice* device): QMouseEvent(typeVal, localPos, globalPos, button, buttons, modifiers, device) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPointingDevice* device): QMouseEvent(typeVal, localPos, scenePos, globalPos, button, buttons, modifiers, device) {}; + MiqtVirtualQMouseEvent(QEvent::Type typeVal, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source, const QPointingDevice* device): QMouseEvent(typeVal, localPos, scenePos, globalPos, button, buttons, modifiers, source, device) {}; + + virtual ~MiqtVirtualQMouseEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QMouseEvent* clone() const override { + if (handle__Clone == 0) { + return QMouseEvent::clone(); + } + + + QMouseEvent* callback_return_value = miqt_exec_callback_QMouseEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMouseEvent* virtualbase_Clone() const { + + return QMouseEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QMouseEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QMouseEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QMouseEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QMouseEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QMouseEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QMouseEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QMouseEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QMouseEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QMouseEvent::isEndEvent(); + + } + +}; + +void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers) { - return new QMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); +void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers) { - return new QMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); +void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source) { - return new QMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); +void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device) { - return new QMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); +void QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device) { - return new QMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); +void QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device) { - return new QMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); +void QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QMouseEvent* QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device) { - return new QMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source), device); +void QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source), device); + *outptr_QMouseEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QMouseEvent* QMouseEvent_Clone(const QMouseEvent* self) { @@ -403,84 +1018,402 @@ int QMouseEvent_Flags(const QMouseEvent* self) { return static_cast(_ret); } -void QMouseEvent_Delete(QMouseEvent* self) { - delete self; +void QMouseEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QMouseEvent*)(self) )->handle__Clone = slot; } -QHoverEvent* QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos) { - return new QHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos); +QMouseEvent* QMouseEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQMouseEvent*)(self) )->virtualbase_Clone(); } -QHoverEvent* QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos) { - return new QHoverEvent(static_cast(typeVal), *pos, *oldPos); +void QMouseEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QMouseEvent*)(self) )->handle__IsBeginEvent = slot; } -QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers) { - return new QHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers)); +bool QMouseEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQMouseEvent*)(self) )->virtualbase_IsBeginEvent(); } -QHoverEvent* QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device) { - return new QHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers), device); +void QMouseEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QMouseEvent*)(self) )->handle__IsUpdateEvent = slot; } -QHoverEvent* QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers) { - return new QHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); +bool QMouseEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQMouseEvent*)(self) )->virtualbase_IsUpdateEvent(); } -QHoverEvent* QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device) { - return new QHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers), device); +void QMouseEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QMouseEvent*)(self) )->handle__IsEndEvent = slot; } -QHoverEvent* QHoverEvent_Clone(const QHoverEvent* self) { - return self->clone(); +bool QMouseEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQMouseEvent*)(self) )->virtualbase_IsEndEvent(); } -QPoint* QHoverEvent_Pos(const QHoverEvent* self) { - return new QPoint(self->pos()); +void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPointF* QHoverEvent_PosF(const QHoverEvent* self) { - return new QPointF(self->posF()); -} +class MiqtVirtualQHoverEvent : public virtual QHoverEvent { +public: -bool QHoverEvent_IsUpdateEvent(const QHoverEvent* self) { - return self->isUpdateEvent(); -} + MiqtVirtualQHoverEvent(QEvent::Type typeVal, const QPointF& scenePos, const QPointF& globalPos, const QPointF& oldPos): QHoverEvent(typeVal, scenePos, globalPos, oldPos) {}; + MiqtVirtualQHoverEvent(QEvent::Type typeVal, const QPointF& pos, const QPointF& oldPos): QHoverEvent(typeVal, pos, oldPos) {}; + MiqtVirtualQHoverEvent(QEvent::Type typeVal, const QPointF& scenePos, const QPointF& globalPos, const QPointF& oldPos, Qt::KeyboardModifiers modifiers): QHoverEvent(typeVal, scenePos, globalPos, oldPos, modifiers) {}; + MiqtVirtualQHoverEvent(QEvent::Type typeVal, const QPointF& scenePos, const QPointF& globalPos, const QPointF& oldPos, Qt::KeyboardModifiers modifiers, const QPointingDevice* device): QHoverEvent(typeVal, scenePos, globalPos, oldPos, modifiers, device) {}; + MiqtVirtualQHoverEvent(QEvent::Type typeVal, const QPointF& pos, const QPointF& oldPos, Qt::KeyboardModifiers modifiers): QHoverEvent(typeVal, pos, oldPos, modifiers) {}; + MiqtVirtualQHoverEvent(QEvent::Type typeVal, const QPointF& pos, const QPointF& oldPos, Qt::KeyboardModifiers modifiers, const QPointingDevice* device): QHoverEvent(typeVal, pos, oldPos, modifiers, device) {}; -QPoint* QHoverEvent_OldPos(const QHoverEvent* self) { - return new QPoint(self->oldPos()); -} + virtual ~MiqtVirtualQHoverEvent() = default; -QPointF* QHoverEvent_OldPosF(const QHoverEvent* self) { - return new QPointF(self->oldPosF()); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; -void QHoverEvent_Delete(QHoverEvent* self) { - delete self; -} + // Subclass to allow providing a Go implementation + virtual QHoverEvent* clone() const override { + if (handle__Clone == 0) { + return QHoverEvent::clone(); + } + -QWheelEvent* QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); -} + QHoverEvent* callback_return_value = miqt_exec_callback_QHoverEvent_Clone(const_cast(this), handle__Clone); -QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); -} + return callback_return_value; + } -QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device) { - return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source), device); -} + // Wrapper to allow calling protected method + QHoverEvent* virtualbase_Clone() const { -QWheelEvent* QWheelEvent_Clone(const QWheelEvent* self) { - return self->clone(); -} + return QHoverEvent::clone(); -QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self) { - return new QPoint(self->pixelDelta()); -} + } -QPoint* QWheelEvent_AngleDelta(const QWheelEvent* self) { - return new QPoint(self->angleDelta()); + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QHoverEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QHoverEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QHoverEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QHoverEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QHoverEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QHoverEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QHoverEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QHoverEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QHoverEvent::isEndEvent(); + + } + +}; + +void QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos); + *outptr_QHoverEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos); + *outptr_QHoverEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers)); + *outptr_QHoverEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers), device); + *outptr_QHoverEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); + *outptr_QHoverEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers), device); + *outptr_QHoverEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +QHoverEvent* QHoverEvent_Clone(const QHoverEvent* self) { + return self->clone(); +} + +QPoint* QHoverEvent_Pos(const QHoverEvent* self) { + return new QPoint(self->pos()); +} + +QPointF* QHoverEvent_PosF(const QHoverEvent* self) { + return new QPointF(self->posF()); +} + +bool QHoverEvent_IsUpdateEvent(const QHoverEvent* self) { + return self->isUpdateEvent(); +} + +QPoint* QHoverEvent_OldPos(const QHoverEvent* self) { + return new QPoint(self->oldPos()); +} + +QPointF* QHoverEvent_OldPosF(const QHoverEvent* self) { + return new QPointF(self->oldPosF()); +} + +void QHoverEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QHoverEvent*)(self) )->handle__Clone = slot; +} + +QHoverEvent* QHoverEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQHoverEvent*)(self) )->virtualbase_Clone(); +} + +void QHoverEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QHoverEvent*)(self) )->handle__IsUpdateEvent = slot; +} + +bool QHoverEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQHoverEvent*)(self) )->virtualbase_IsUpdateEvent(); +} + +void QHoverEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QHoverEvent*)(self) )->handle__IsBeginEvent = slot; +} + +bool QHoverEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQHoverEvent*)(self) )->virtualbase_IsBeginEvent(); +} + +void QHoverEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QHoverEvent*)(self) )->handle__IsEndEvent = slot; +} + +bool QHoverEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQHoverEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWheelEvent : public virtual QWheelEvent { +public: + + MiqtVirtualQWheelEvent(const QPointF& pos, const QPointF& globalPos, QPoint pixelDelta, QPoint angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, bool inverted): QWheelEvent(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, phase, inverted) {}; + MiqtVirtualQWheelEvent(const QPointF& pos, const QPointF& globalPos, QPoint pixelDelta, QPoint angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, bool inverted, Qt::MouseEventSource source): QWheelEvent(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, phase, inverted, source) {}; + MiqtVirtualQWheelEvent(const QPointF& pos, const QPointF& globalPos, QPoint pixelDelta, QPoint angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, bool inverted, Qt::MouseEventSource source, const QPointingDevice* device): QWheelEvent(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, phase, inverted, source, device) {}; + + virtual ~MiqtVirtualQWheelEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QWheelEvent* clone() const override { + if (handle__Clone == 0) { + return QWheelEvent::clone(); + } + + + QWheelEvent* callback_return_value = miqt_exec_callback_QWheelEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWheelEvent* virtualbase_Clone() const { + + return QWheelEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QWheelEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QWheelEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QWheelEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QWheelEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QWheelEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QWheelEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QWheelEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QWheelEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QWheelEvent::isEndEvent(); + + } + +}; + +void QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQWheelEvent* ret = new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); + *outptr_QWheelEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQWheelEvent* ret = new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); + *outptr_QWheelEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQWheelEvent* ret = new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source), device); + *outptr_QWheelEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +QWheelEvent* QWheelEvent_Clone(const QWheelEvent* self) { + return self->clone(); +} + +QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self) { + return new QPoint(self->pixelDelta()); +} + +QPoint* QWheelEvent_AngleDelta(const QWheelEvent* self) { + return new QPoint(self->angleDelta()); } int QWheelEvent_Phase(const QWheelEvent* self) { @@ -517,12 +1450,150 @@ int QWheelEvent_Source(const QWheelEvent* self) { return static_cast(_ret); } -void QWheelEvent_Delete(QWheelEvent* self) { - delete self; +void QWheelEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QWheelEvent*)(self) )->handle__Clone = slot; +} + +QWheelEvent* QWheelEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQWheelEvent*)(self) )->virtualbase_Clone(); +} + +void QWheelEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QWheelEvent*)(self) )->handle__IsBeginEvent = slot; +} + +bool QWheelEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQWheelEvent*)(self) )->virtualbase_IsBeginEvent(); +} + +void QWheelEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QWheelEvent*)(self) )->handle__IsUpdateEvent = slot; +} + +bool QWheelEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQWheelEvent*)(self) )->virtualbase_IsUpdateEvent(); +} + +void QWheelEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QWheelEvent*)(self) )->handle__IsEndEvent = slot; +} + +bool QWheelEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQWheelEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTabletEvent* QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons) { - return new QTabletEvent(static_cast(t), device, *pos, *globalPos, static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(button), static_cast(buttons)); +class MiqtVirtualQTabletEvent : public virtual QTabletEvent { +public: + + MiqtVirtualQTabletEvent(QEvent::Type t, const QPointingDevice* device, const QPointF& pos, const QPointF& globalPos, qreal pressure, float xTilt, float yTilt, float tangentialPressure, qreal rotation, float z, Qt::KeyboardModifiers keyState, Qt::MouseButton button, Qt::MouseButtons buttons): QTabletEvent(t, device, pos, globalPos, pressure, xTilt, yTilt, tangentialPressure, rotation, z, keyState, button, buttons) {}; + + virtual ~MiqtVirtualQTabletEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTabletEvent* clone() const override { + if (handle__Clone == 0) { + return QTabletEvent::clone(); + } + + + QTabletEvent* callback_return_value = miqt_exec_callback_QTabletEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTabletEvent* virtualbase_Clone() const { + + return QTabletEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QTabletEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QTabletEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QTabletEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QTabletEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QTabletEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QTabletEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QTabletEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QTabletEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QTabletEvent::isEndEvent(); + + } + +}; + +void QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQTabletEvent* ret = new MiqtVirtualQTabletEvent(static_cast(t), device, *pos, *globalPos, static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(button), static_cast(buttons)); + *outptr_QTabletEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QTabletEvent* QTabletEvent_Clone(const QTabletEvent* self) { @@ -606,20 +1677,170 @@ double QTabletEvent_YTilt(const QTabletEvent* self) { return static_cast(_ret); } -void QTabletEvent_Delete(QTabletEvent* self) { - delete self; +void QTabletEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTabletEvent*)(self) )->handle__Clone = slot; +} + +QTabletEvent* QTabletEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTabletEvent*)(self) )->virtualbase_Clone(); +} + +void QTabletEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabletEvent*)(self) )->handle__IsBeginEvent = slot; +} + +bool QTabletEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQTabletEvent*)(self) )->virtualbase_IsBeginEvent(); +} + +void QTabletEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabletEvent*)(self) )->handle__IsUpdateEvent = slot; +} + +bool QTabletEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQTabletEvent*)(self) )->virtualbase_IsUpdateEvent(); +} + +void QTabletEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabletEvent*)(self) )->handle__IsEndEvent = slot; } -QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument) { - return new QNativeGestureEvent(static_cast(typeVal), dev, *localPos, *scenePos, *globalPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); +bool QTabletEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQTabletEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQNativeGestureEvent : public virtual QNativeGestureEvent { +public: + + MiqtVirtualQNativeGestureEvent(Qt::NativeGestureType typeVal, const QPointingDevice* dev, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, qreal value, quint64 sequenceId, quint64 intArgument): QNativeGestureEvent(typeVal, dev, localPos, scenePos, globalPos, value, sequenceId, intArgument) {}; + MiqtVirtualQNativeGestureEvent(Qt::NativeGestureType typeVal, const QPointingDevice* dev, int fingerCount, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, qreal value, const QPointF& delta): QNativeGestureEvent(typeVal, dev, fingerCount, localPos, scenePos, globalPos, value, delta) {}; + MiqtVirtualQNativeGestureEvent(Qt::NativeGestureType typeVal, const QPointingDevice* dev, int fingerCount, const QPointF& localPos, const QPointF& scenePos, const QPointF& globalPos, qreal value, const QPointF& delta, quint64 sequenceId): QNativeGestureEvent(typeVal, dev, fingerCount, localPos, scenePos, globalPos, value, delta, sequenceId) {}; + + virtual ~MiqtVirtualQNativeGestureEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QNativeGestureEvent* clone() const override { + if (handle__Clone == 0) { + return QNativeGestureEvent::clone(); + } + + + QNativeGestureEvent* callback_return_value = miqt_exec_callback_QNativeGestureEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QNativeGestureEvent* virtualbase_Clone() const { + + return QNativeGestureEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QNativeGestureEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QNativeGestureEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QNativeGestureEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QNativeGestureEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QNativeGestureEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QNativeGestureEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QNativeGestureEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QNativeGestureEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QNativeGestureEvent::isEndEvent(); + + } + +}; + +void QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQNativeGestureEvent* ret = new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, *localPos, *scenePos, *globalPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); + *outptr_QNativeGestureEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta) { - return new QNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta); +void QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQNativeGestureEvent* ret = new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta); + *outptr_QNativeGestureEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QNativeGestureEvent* QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId) { - return new QNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta, static_cast(sequenceId)); +void QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQNativeGestureEvent* ret = new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta, static_cast(sequenceId)); + *outptr_QNativeGestureEvent = ret; + *outptr_QSinglePointEvent = static_cast(ret); + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QNativeGestureEvent* QNativeGestureEvent_Clone(const QNativeGestureEvent* self) { @@ -664,51 +1885,178 @@ QPointF* QNativeGestureEvent_ScreenPos(const QNativeGestureEvent* self) { return new QPointF(self->screenPos()); } -void QNativeGestureEvent_Delete(QNativeGestureEvent* self) { - delete self; +void QNativeGestureEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QNativeGestureEvent*)(self) )->handle__Clone = slot; } -QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers) { - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); +QNativeGestureEvent* QNativeGestureEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQNativeGestureEvent*)(self) )->virtualbase_Clone(); } -QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers) { - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); +void QNativeGestureEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QNativeGestureEvent*)(self) )->handle__IsBeginEvent = slot; } -QKeyEvent* QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); +bool QNativeGestureEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQNativeGestureEvent*)(self) )->virtualbase_IsBeginEvent(); } -QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); +void QNativeGestureEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QNativeGestureEvent*)(self) )->handle__IsUpdateEvent = slot; } -QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); +bool QNativeGestureEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQNativeGestureEvent*)(self) )->virtualbase_IsUpdateEvent(); } -QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text) { +void QNativeGestureEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QNativeGestureEvent*)(self) )->handle__IsEndEvent = slot; +} + +bool QNativeGestureEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQNativeGestureEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQKeyEvent : public virtual QKeyEvent { +public: + + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers): QKeyEvent(typeVal, key, modifiers) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers): QKeyEvent(typeVal, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, const QString& text): QKeyEvent(typeVal, key, modifiers, text) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, const QString& text, bool autorep): QKeyEvent(typeVal, key, modifiers, text, autorep) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, const QString& text, bool autorep, quint16 count): QKeyEvent(typeVal, key, modifiers, text, autorep, count) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text): QKeyEvent(typeVal, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text, bool autorep): QKeyEvent(typeVal, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text, bool autorep, quint16 count): QKeyEvent(typeVal, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count) {}; + MiqtVirtualQKeyEvent(QEvent::Type typeVal, int key, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString& text, bool autorep, quint16 count, const QInputDevice* device): QKeyEvent(typeVal, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count, device) {}; + + virtual ~MiqtVirtualQKeyEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QKeyEvent* clone() const override { + if (handle__Clone == 0) { + return QKeyEvent::clone(); + } + + + QKeyEvent* callback_return_value = miqt_exec_callback_QKeyEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QKeyEvent* virtualbase_Clone() const { + + return QKeyEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTimestamp = 0; + + // Subclass to allow providing a Go implementation + virtual void setTimestamp(quint64 timestamp) override { + if (handle__SetTimestamp == 0) { + QKeyEvent::setTimestamp(timestamp); + return; + } + + quint64 timestamp_ret = timestamp; + unsigned long long sigval1 = static_cast(timestamp_ret); + + miqt_exec_callback_QKeyEvent_SetTimestamp(this, handle__SetTimestamp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTimestamp(unsigned long long timestamp) { + + QKeyEvent::setTimestamp(static_cast(timestamp)); + + } + +}; + +void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep) { +void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count) { +void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device) { +void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count), device); + MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count), device); + *outptr_QKeyEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QKeyEvent* QKeyEvent_Clone(const QKeyEvent* self) { @@ -766,16 +2114,96 @@ unsigned int QKeyEvent_NativeModifiers(const QKeyEvent* self) { return static_cast(_ret); } -void QKeyEvent_Delete(QKeyEvent* self) { - delete self; +void QKeyEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QKeyEvent*)(self) )->handle__Clone = slot; +} + +QKeyEvent* QKeyEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQKeyEvent*)(self) )->virtualbase_Clone(); +} + +void QKeyEvent_override_virtual_SetTimestamp(void* self, intptr_t slot) { + dynamic_cast( (QKeyEvent*)(self) )->handle__SetTimestamp = slot; +} + +void QKeyEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp) { + ( (MiqtVirtualQKeyEvent*)(self) )->virtualbase_SetTimestamp(timestamp); } -QFocusEvent* QFocusEvent_new(int typeVal) { - return new QFocusEvent(static_cast(typeVal)); +void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQFocusEvent : public virtual QFocusEvent { +public: + + MiqtVirtualQFocusEvent(QEvent::Type typeVal): QFocusEvent(typeVal) {}; + MiqtVirtualQFocusEvent(QEvent::Type typeVal, Qt::FocusReason reason): QFocusEvent(typeVal, reason) {}; + + virtual ~MiqtVirtualQFocusEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QFocusEvent* clone() const override { + if (handle__Clone == 0) { + return QFocusEvent::clone(); + } + + + QFocusEvent* callback_return_value = miqt_exec_callback_QFocusEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QFocusEvent* virtualbase_Clone() const { + + return QFocusEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QFocusEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QFocusEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QFocusEvent::setAccepted(accepted); + + } + +}; + +void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { + MiqtVirtualQFocusEvent* ret = new MiqtVirtualQFocusEvent(static_cast(typeVal)); + *outptr_QFocusEvent = ret; + *outptr_QEvent = static_cast(ret); } -QFocusEvent* QFocusEvent_new2(int typeVal, int reason) { - return new QFocusEvent(static_cast(typeVal), static_cast(reason)); +void QFocusEvent_new2(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { + MiqtVirtualQFocusEvent* ret = new MiqtVirtualQFocusEvent(static_cast(typeVal), static_cast(reason)); + *outptr_QFocusEvent = ret; + *outptr_QEvent = static_cast(ret); } QFocusEvent* QFocusEvent_Clone(const QFocusEvent* self) { @@ -795,16 +2223,96 @@ int QFocusEvent_Reason(const QFocusEvent* self) { return static_cast(_ret); } -void QFocusEvent_Delete(QFocusEvent* self) { - delete self; +void QFocusEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QFocusEvent*)(self) )->handle__Clone = slot; +} + +QFocusEvent* QFocusEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQFocusEvent*)(self) )->virtualbase_Clone(); +} + +void QFocusEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QFocusEvent*)(self) )->handle__SetAccepted = slot; +} + +void QFocusEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQFocusEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPaintEvent* QPaintEvent_new(QRegion* paintRegion) { - return new QPaintEvent(*paintRegion); +class MiqtVirtualQPaintEvent : public virtual QPaintEvent { +public: + + MiqtVirtualQPaintEvent(const QRegion& paintRegion): QPaintEvent(paintRegion) {}; + MiqtVirtualQPaintEvent(const QRect& paintRect): QPaintEvent(paintRect) {}; + + virtual ~MiqtVirtualQPaintEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEvent* clone() const override { + if (handle__Clone == 0) { + return QPaintEvent::clone(); + } + + + QPaintEvent* callback_return_value = miqt_exec_callback_QPaintEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEvent* virtualbase_Clone() const { + + return QPaintEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QPaintEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QPaintEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QPaintEvent::setAccepted(accepted); + + } + +}; + +void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { + MiqtVirtualQPaintEvent* ret = new MiqtVirtualQPaintEvent(*paintRegion); + *outptr_QPaintEvent = ret; + *outptr_QEvent = static_cast(ret); } -QPaintEvent* QPaintEvent_new2(QRect* paintRect) { - return new QPaintEvent(*paintRect); +void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { + MiqtVirtualQPaintEvent* ret = new MiqtVirtualQPaintEvent(*paintRect); + *outptr_QPaintEvent = ret; + *outptr_QEvent = static_cast(ret); } QPaintEvent* QPaintEvent_Clone(const QPaintEvent* self) { @@ -823,12 +2331,89 @@ QRegion* QPaintEvent_Region(const QPaintEvent* self) { return const_cast(&_ret); } -void QPaintEvent_Delete(QPaintEvent* self) { - delete self; +void QPaintEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QPaintEvent*)(self) )->handle__Clone = slot; +} + +QPaintEvent* QPaintEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQPaintEvent*)(self) )->virtualbase_Clone(); +} + +void QPaintEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QPaintEvent*)(self) )->handle__SetAccepted = slot; +} + +void QPaintEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQPaintEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos) { - return new QMoveEvent(*pos, *oldPos); +class MiqtVirtualQMoveEvent : public virtual QMoveEvent { +public: + + MiqtVirtualQMoveEvent(const QPoint& pos, const QPoint& oldPos): QMoveEvent(pos, oldPos) {}; + + virtual ~MiqtVirtualQMoveEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QMoveEvent* clone() const override { + if (handle__Clone == 0) { + return QMoveEvent::clone(); + } + + + QMoveEvent* callback_return_value = miqt_exec_callback_QMoveEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMoveEvent* virtualbase_Clone() const { + + return QMoveEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QMoveEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QMoveEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QMoveEvent::setAccepted(accepted); + + } + +}; + +void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent) { + MiqtVirtualQMoveEvent* ret = new MiqtVirtualQMoveEvent(*pos, *oldPos); + *outptr_QMoveEvent = ret; + *outptr_QEvent = static_cast(ret); } QMoveEvent* QMoveEvent_Clone(const QMoveEvent* self) { @@ -847,12 +2432,89 @@ QPoint* QMoveEvent_OldPos(const QMoveEvent* self) { return const_cast(&_ret); } -void QMoveEvent_Delete(QMoveEvent* self) { - delete self; +void QMoveEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QMoveEvent*)(self) )->handle__Clone = slot; +} + +QMoveEvent* QMoveEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQMoveEvent*)(self) )->virtualbase_Clone(); +} + +void QMoveEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QMoveEvent*)(self) )->handle__SetAccepted = slot; +} + +void QMoveEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQMoveEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QExposeEvent* QExposeEvent_new(QRegion* m_region) { - return new QExposeEvent(*m_region); +class MiqtVirtualQExposeEvent : public virtual QExposeEvent { +public: + + MiqtVirtualQExposeEvent(const QRegion& m_region): QExposeEvent(m_region) {}; + + virtual ~MiqtVirtualQExposeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QExposeEvent* clone() const override { + if (handle__Clone == 0) { + return QExposeEvent::clone(); + } + + + QExposeEvent* callback_return_value = miqt_exec_callback_QExposeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QExposeEvent* virtualbase_Clone() const { + + return QExposeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QExposeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QExposeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QExposeEvent::setAccepted(accepted); + + } + +}; + +void QExposeEvent_new(QRegion* m_region, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQExposeEvent* ret = new MiqtVirtualQExposeEvent(*m_region); + *outptr_QExposeEvent = ret; + *outptr_QEvent = static_cast(ret); } QExposeEvent* QExposeEvent_Clone(const QExposeEvent* self) { @@ -865,12 +2527,89 @@ QRegion* QExposeEvent_Region(const QExposeEvent* self) { return const_cast(&_ret); } -void QExposeEvent_Delete(QExposeEvent* self) { - delete self; +void QExposeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QExposeEvent*)(self) )->handle__Clone = slot; +} + +QExposeEvent* QExposeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQExposeEvent*)(self) )->virtualbase_Clone(); } -QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType) { - return new QPlatformSurfaceEvent(static_cast(surfaceEventType)); +void QExposeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QExposeEvent*)(self) )->handle__SetAccepted = slot; +} + +void QExposeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQExposeEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQPlatformSurfaceEvent : public virtual QPlatformSurfaceEvent { +public: + + MiqtVirtualQPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType): QPlatformSurfaceEvent(surfaceEventType) {}; + + virtual ~MiqtVirtualQPlatformSurfaceEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QPlatformSurfaceEvent* clone() const override { + if (handle__Clone == 0) { + return QPlatformSurfaceEvent::clone(); + } + + + QPlatformSurfaceEvent* callback_return_value = miqt_exec_callback_QPlatformSurfaceEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPlatformSurfaceEvent* virtualbase_Clone() const { + + return QPlatformSurfaceEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QPlatformSurfaceEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QPlatformSurfaceEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QPlatformSurfaceEvent::setAccepted(accepted); + + } + +}; + +void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent) { + MiqtVirtualQPlatformSurfaceEvent* ret = new MiqtVirtualQPlatformSurfaceEvent(static_cast(surfaceEventType)); + *outptr_QPlatformSurfaceEvent = ret; + *outptr_QEvent = static_cast(ret); } QPlatformSurfaceEvent* QPlatformSurfaceEvent_Clone(const QPlatformSurfaceEvent* self) { @@ -882,12 +2621,89 @@ int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self) { return static_cast(_ret); } -void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self) { - delete self; +void QPlatformSurfaceEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QPlatformSurfaceEvent*)(self) )->handle__Clone = slot; +} + +QPlatformSurfaceEvent* QPlatformSurfaceEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQPlatformSurfaceEvent*)(self) )->virtualbase_Clone(); +} + +void QPlatformSurfaceEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QPlatformSurfaceEvent*)(self) )->handle__SetAccepted = slot; +} + +void QPlatformSurfaceEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQPlatformSurfaceEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize) { - return new QResizeEvent(*size, *oldSize); +class MiqtVirtualQResizeEvent : public virtual QResizeEvent { +public: + + MiqtVirtualQResizeEvent(const QSize& size, const QSize& oldSize): QResizeEvent(size, oldSize) {}; + + virtual ~MiqtVirtualQResizeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QResizeEvent* clone() const override { + if (handle__Clone == 0) { + return QResizeEvent::clone(); + } + + + QResizeEvent* callback_return_value = miqt_exec_callback_QResizeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QResizeEvent* virtualbase_Clone() const { + + return QResizeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QResizeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QResizeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QResizeEvent::setAccepted(accepted); + + } + +}; + +void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQResizeEvent* ret = new MiqtVirtualQResizeEvent(*size, *oldSize); + *outptr_QResizeEvent = ret; + *outptr_QEvent = static_cast(ret); } QResizeEvent* QResizeEvent_Clone(const QResizeEvent* self) { @@ -906,77 +2722,472 @@ QSize* QResizeEvent_OldSize(const QResizeEvent* self) { return const_cast(&_ret); } -void QResizeEvent_Delete(QResizeEvent* self) { - delete self; +void QResizeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QResizeEvent*)(self) )->handle__Clone = slot; } -QCloseEvent* QCloseEvent_new() { - return new QCloseEvent(); +QResizeEvent* QResizeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQResizeEvent*)(self) )->virtualbase_Clone(); } -QCloseEvent* QCloseEvent_Clone(const QCloseEvent* self) { - return self->clone(); +void QResizeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QResizeEvent*)(self) )->handle__SetAccepted = slot; } -void QCloseEvent_Delete(QCloseEvent* self) { - delete self; +void QResizeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQResizeEvent*)(self) )->virtualbase_SetAccepted(accepted); } -QIconDragEvent* QIconDragEvent_new() { - return new QIconDragEvent(); +void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QIconDragEvent* QIconDragEvent_Clone(const QIconDragEvent* self) { - return self->clone(); -} +class MiqtVirtualQCloseEvent : public virtual QCloseEvent { +public: -void QIconDragEvent_Delete(QIconDragEvent* self) { - delete self; -} + MiqtVirtualQCloseEvent(): QCloseEvent() {}; -QShowEvent* QShowEvent_new() { - return new QShowEvent(); -} + virtual ~MiqtVirtualQCloseEvent() = default; -QShowEvent* QShowEvent_Clone(const QShowEvent* self) { - return self->clone(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; -void QShowEvent_Delete(QShowEvent* self) { - delete self; -} + // Subclass to allow providing a Go implementation + virtual QCloseEvent* clone() const override { + if (handle__Clone == 0) { + return QCloseEvent::clone(); + } + -QHideEvent* QHideEvent_new() { - return new QHideEvent(); -} + QCloseEvent* callback_return_value = miqt_exec_callback_QCloseEvent_Clone(const_cast(this), handle__Clone); -QHideEvent* QHideEvent_Clone(const QHideEvent* self) { - return self->clone(); -} + return callback_return_value; + } -void QHideEvent_Delete(QHideEvent* self) { - delete self; -} + // Wrapper to allow calling protected method + QCloseEvent* virtualbase_Clone() const { -QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos) { - return new QContextMenuEvent(static_cast(reason), *pos, *globalPos); -} + return QCloseEvent::clone(); -QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos) { - return new QContextMenuEvent(static_cast(reason), *pos); -} + } -QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers) { - return new QContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; -QContextMenuEvent* QContextMenuEvent_Clone(const QContextMenuEvent* self) { - return self->clone(); -} + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QCloseEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; -int QContextMenuEvent_X(const QContextMenuEvent* self) { - return self->x(); -} + miqt_exec_callback_QCloseEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QCloseEvent::setAccepted(accepted); + + } + +}; + +void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent) { + MiqtVirtualQCloseEvent* ret = new MiqtVirtualQCloseEvent(); + *outptr_QCloseEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +QCloseEvent* QCloseEvent_Clone(const QCloseEvent* self) { + return self->clone(); +} + +void QCloseEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QCloseEvent*)(self) )->handle__Clone = slot; +} + +QCloseEvent* QCloseEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQCloseEvent*)(self) )->virtualbase_Clone(); +} + +void QCloseEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QCloseEvent*)(self) )->handle__SetAccepted = slot; +} + +void QCloseEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQCloseEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQIconDragEvent : public virtual QIconDragEvent { +public: + + MiqtVirtualQIconDragEvent(): QIconDragEvent() {}; + + virtual ~MiqtVirtualQIconDragEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QIconDragEvent* clone() const override { + if (handle__Clone == 0) { + return QIconDragEvent::clone(); + } + + + QIconDragEvent* callback_return_value = miqt_exec_callback_QIconDragEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QIconDragEvent* virtualbase_Clone() const { + + return QIconDragEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QIconDragEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QIconDragEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QIconDragEvent::setAccepted(accepted); + + } + +}; + +void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent) { + MiqtVirtualQIconDragEvent* ret = new MiqtVirtualQIconDragEvent(); + *outptr_QIconDragEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +QIconDragEvent* QIconDragEvent_Clone(const QIconDragEvent* self) { + return self->clone(); +} + +void QIconDragEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QIconDragEvent*)(self) )->handle__Clone = slot; +} + +QIconDragEvent* QIconDragEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQIconDragEvent*)(self) )->virtualbase_Clone(); +} + +void QIconDragEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QIconDragEvent*)(self) )->handle__SetAccepted = slot; +} + +void QIconDragEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQIconDragEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQShowEvent : public virtual QShowEvent { +public: + + MiqtVirtualQShowEvent(): QShowEvent() {}; + + virtual ~MiqtVirtualQShowEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QShowEvent* clone() const override { + if (handle__Clone == 0) { + return QShowEvent::clone(); + } + + + QShowEvent* callback_return_value = miqt_exec_callback_QShowEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QShowEvent* virtualbase_Clone() const { + + return QShowEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QShowEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QShowEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QShowEvent::setAccepted(accepted); + + } + +}; + +void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent) { + MiqtVirtualQShowEvent* ret = new MiqtVirtualQShowEvent(); + *outptr_QShowEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +QShowEvent* QShowEvent_Clone(const QShowEvent* self) { + return self->clone(); +} + +void QShowEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QShowEvent*)(self) )->handle__Clone = slot; +} + +QShowEvent* QShowEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQShowEvent*)(self) )->virtualbase_Clone(); +} + +void QShowEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QShowEvent*)(self) )->handle__SetAccepted = slot; +} + +void QShowEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQShowEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QShowEvent_Delete(QShowEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQHideEvent : public virtual QHideEvent { +public: + + MiqtVirtualQHideEvent(): QHideEvent() {}; + + virtual ~MiqtVirtualQHideEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QHideEvent* clone() const override { + if (handle__Clone == 0) { + return QHideEvent::clone(); + } + + + QHideEvent* callback_return_value = miqt_exec_callback_QHideEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QHideEvent* virtualbase_Clone() const { + + return QHideEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QHideEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QHideEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QHideEvent::setAccepted(accepted); + + } + +}; + +void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHideEvent* ret = new MiqtVirtualQHideEvent(); + *outptr_QHideEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +QHideEvent* QHideEvent_Clone(const QHideEvent* self) { + return self->clone(); +} + +void QHideEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QHideEvent*)(self) )->handle__Clone = slot; +} + +QHideEvent* QHideEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQHideEvent*)(self) )->virtualbase_Clone(); +} + +void QHideEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QHideEvent*)(self) )->handle__SetAccepted = slot; +} + +void QHideEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQHideEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QHideEvent_Delete(QHideEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQContextMenuEvent : public virtual QContextMenuEvent { +public: + + MiqtVirtualQContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos, const QPoint& globalPos): QContextMenuEvent(reason, pos, globalPos) {}; + MiqtVirtualQContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos): QContextMenuEvent(reason, pos) {}; + MiqtVirtualQContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos, const QPoint& globalPos, Qt::KeyboardModifiers modifiers): QContextMenuEvent(reason, pos, globalPos, modifiers) {}; + + virtual ~MiqtVirtualQContextMenuEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QContextMenuEvent* clone() const override { + if (handle__Clone == 0) { + return QContextMenuEvent::clone(); + } + + + QContextMenuEvent* callback_return_value = miqt_exec_callback_QContextMenuEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QContextMenuEvent* virtualbase_Clone() const { + + return QContextMenuEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTimestamp = 0; + + // Subclass to allow providing a Go implementation + virtual void setTimestamp(quint64 timestamp) override { + if (handle__SetTimestamp == 0) { + QContextMenuEvent::setTimestamp(timestamp); + return; + } + + quint64 timestamp_ret = timestamp; + unsigned long long sigval1 = static_cast(timestamp_ret); + + miqt_exec_callback_QContextMenuEvent_SetTimestamp(this, handle__SetTimestamp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTimestamp(unsigned long long timestamp) { + + QContextMenuEvent::setTimestamp(static_cast(timestamp)); + + } + +}; + +void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQContextMenuEvent* ret = new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos, *globalPos); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QContextMenuEvent_new2(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQContextMenuEvent* ret = new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQContextMenuEvent* ret = new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); + *outptr_QContextMenuEvent = ret; + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +QContextMenuEvent* QContextMenuEvent_Clone(const QContextMenuEvent* self) { + return self->clone(); +} + +int QContextMenuEvent_X(const QContextMenuEvent* self) { + return self->x(); +} int QContextMenuEvent_Y(const QContextMenuEvent* self) { return self->y(); @@ -1007,15 +3218,93 @@ int QContextMenuEvent_Reason(const QContextMenuEvent* self) { return static_cast(_ret); } -void QContextMenuEvent_Delete(QContextMenuEvent* self) { - delete self; +void QContextMenuEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QContextMenuEvent*)(self) )->handle__Clone = slot; +} + +QContextMenuEvent* QContextMenuEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQContextMenuEvent*)(self) )->virtualbase_Clone(); +} + +void QContextMenuEvent_override_virtual_SetTimestamp(void* self, intptr_t slot) { + dynamic_cast( (QContextMenuEvent*)(self) )->handle__SetTimestamp = slot; +} + +void QContextMenuEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp) { + ( (MiqtVirtualQContextMenuEvent*)(self) )->virtualbase_SetTimestamp(timestamp); } -QInputMethodEvent* QInputMethodEvent_new() { - return new QInputMethodEvent(); +void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQInputMethodEvent : public virtual QInputMethodEvent { +public: + + MiqtVirtualQInputMethodEvent(): QInputMethodEvent() {}; + MiqtVirtualQInputMethodEvent(const QString& preeditText, const QList& attributes): QInputMethodEvent(preeditText, attributes) {}; + + virtual ~MiqtVirtualQInputMethodEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QInputMethodEvent* clone() const override { + if (handle__Clone == 0) { + return QInputMethodEvent::clone(); + } + + + QInputMethodEvent* callback_return_value = miqt_exec_callback_QInputMethodEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QInputMethodEvent* virtualbase_Clone() const { + + return QInputMethodEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QInputMethodEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QInputMethodEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QInputMethodEvent::setAccepted(accepted); + + } + +}; + +void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { + MiqtVirtualQInputMethodEvent* ret = new MiqtVirtualQInputMethodEvent(); + *outptr_QInputMethodEvent = ret; + *outptr_QEvent = static_cast(ret); } -QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes) { +void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { QString preeditText_QString = QString::fromUtf8(preeditText.data, preeditText.len); QList attributes_QList; attributes_QList.reserve(attributes.len); @@ -1023,7 +3312,9 @@ QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct for(size_t i = 0; i < attributes.len; ++i) { attributes_QList.push_back(*(attributes_arr[i])); } - return new QInputMethodEvent(preeditText_QString, attributes_QList); + MiqtVirtualQInputMethodEvent* ret = new MiqtVirtualQInputMethodEvent(preeditText_QString, attributes_QList); + *outptr_QInputMethodEvent = ret; + *outptr_QEvent = static_cast(ret); } QInputMethodEvent* QInputMethodEvent_Clone(const QInputMethodEvent* self) { @@ -1088,12 +3379,89 @@ void QInputMethodEvent_SetCommitString3(QInputMethodEvent* self, struct miqt_str self->setCommitString(commitString_QString, static_cast(replaceFrom), static_cast(replaceLength)); } -void QInputMethodEvent_Delete(QInputMethodEvent* self) { - delete self; +void QInputMethodEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QInputMethodEvent*)(self) )->handle__Clone = slot; +} + +QInputMethodEvent* QInputMethodEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQInputMethodEvent*)(self) )->virtualbase_Clone(); +} + +void QInputMethodEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QInputMethodEvent*)(self) )->handle__SetAccepted = slot; } -QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries) { - return new QInputMethodQueryEvent(static_cast(queries)); +void QInputMethodEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQInputMethodEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQInputMethodQueryEvent : public virtual QInputMethodQueryEvent { +public: + + MiqtVirtualQInputMethodQueryEvent(Qt::InputMethodQueries queries): QInputMethodQueryEvent(queries) {}; + + virtual ~MiqtVirtualQInputMethodQueryEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QInputMethodQueryEvent* clone() const override { + if (handle__Clone == 0) { + return QInputMethodQueryEvent::clone(); + } + + + QInputMethodQueryEvent* callback_return_value = miqt_exec_callback_QInputMethodQueryEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QInputMethodQueryEvent* virtualbase_Clone() const { + + return QInputMethodQueryEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QInputMethodQueryEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QInputMethodQueryEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QInputMethodQueryEvent::setAccepted(accepted); + + } + +}; + +void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent) { + MiqtVirtualQInputMethodQueryEvent* ret = new MiqtVirtualQInputMethodQueryEvent(static_cast(queries)); + *outptr_QInputMethodQueryEvent = ret; + *outptr_QEvent = static_cast(ret); } QInputMethodQueryEvent* QInputMethodQueryEvent_Clone(const QInputMethodQueryEvent* self) { @@ -1113,16 +3481,96 @@ QVariant* QInputMethodQueryEvent_Value(const QInputMethodQueryEvent* self, int q return new QVariant(self->value(static_cast(query))); } -void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self) { - delete self; +void QInputMethodQueryEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QInputMethodQueryEvent*)(self) )->handle__Clone = slot; } -QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers) { - return new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); +QInputMethodQueryEvent* QInputMethodQueryEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQInputMethodQueryEvent*)(self) )->virtualbase_Clone(); } -QDropEvent* QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { - return new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +void QInputMethodQueryEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QInputMethodQueryEvent*)(self) )->handle__SetAccepted = slot; +} + +void QInputMethodQueryEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQInputMethodQueryEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDropEvent : public virtual QDropEvent { +public: + + MiqtVirtualQDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers): QDropEvent(pos, actions, data, buttons, modifiers) {}; + MiqtVirtualQDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type typeVal): QDropEvent(pos, actions, data, buttons, modifiers, typeVal) {}; + + virtual ~MiqtVirtualQDropEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QDropEvent* clone() const override { + if (handle__Clone == 0) { + return QDropEvent::clone(); + } + + + QDropEvent* callback_return_value = miqt_exec_callback_QDropEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QDropEvent* virtualbase_Clone() const { + + return QDropEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QDropEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QDropEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QDropEvent::setAccepted(accepted); + + } + +}; + +void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + MiqtVirtualQDropEvent* ret = new MiqtVirtualQDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); + *outptr_QDropEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +void QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + MiqtVirtualQDropEvent* ret = new MiqtVirtualQDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); + *outptr_QDropEvent = ret; + *outptr_QEvent = static_cast(ret); } QDropEvent* QDropEvent_Clone(const QDropEvent* self) { @@ -1151,113 +3599,364 @@ QPointF* QDropEvent_Position(const QDropEvent* self) { return new QPointF(self->position()); } -int QDropEvent_Buttons(const QDropEvent* self) { - Qt::MouseButtons _ret = self->buttons(); - return static_cast(_ret); +int QDropEvent_Buttons(const QDropEvent* self) { + Qt::MouseButtons _ret = self->buttons(); + return static_cast(_ret); +} + +int QDropEvent_Modifiers(const QDropEvent* self) { + Qt::KeyboardModifiers _ret = self->modifiers(); + return static_cast(_ret); +} + +int QDropEvent_PossibleActions(const QDropEvent* self) { + Qt::DropActions _ret = self->possibleActions(); + return static_cast(_ret); +} + +int QDropEvent_ProposedAction(const QDropEvent* self) { + Qt::DropAction _ret = self->proposedAction(); + return static_cast(_ret); +} + +void QDropEvent_AcceptProposedAction(QDropEvent* self) { + self->acceptProposedAction(); +} + +int QDropEvent_DropAction(const QDropEvent* self) { + Qt::DropAction _ret = self->dropAction(); + return static_cast(_ret); +} + +void QDropEvent_SetDropAction(QDropEvent* self, int action) { + self->setDropAction(static_cast(action)); +} + +QObject* QDropEvent_Source(const QDropEvent* self) { + return self->source(); +} + +QMimeData* QDropEvent_MimeData(const QDropEvent* self) { + return (QMimeData*) self->mimeData(); +} + +void QDropEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QDropEvent*)(self) )->handle__Clone = slot; +} + +QDropEvent* QDropEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQDropEvent*)(self) )->virtualbase_Clone(); +} + +void QDropEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QDropEvent*)(self) )->handle__SetAccepted = slot; +} + +void QDropEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQDropEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QDropEvent_Delete(QDropEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDragMoveEvent : public virtual QDragMoveEvent { +public: + + MiqtVirtualQDragMoveEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers): QDragMoveEvent(pos, actions, data, buttons, modifiers) {}; + MiqtVirtualQDragMoveEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type typeVal): QDragMoveEvent(pos, actions, data, buttons, modifiers, typeVal) {}; + + virtual ~MiqtVirtualQDragMoveEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QDragMoveEvent* clone() const override { + if (handle__Clone == 0) { + return QDragMoveEvent::clone(); + } + + + QDragMoveEvent* callback_return_value = miqt_exec_callback_QDragMoveEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QDragMoveEvent* virtualbase_Clone() const { + + return QDragMoveEvent::clone(); + + } + +}; + +void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + MiqtVirtualQDragMoveEvent* ret = new MiqtVirtualQDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); + *outptr_QDragMoveEvent = ret; + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +void QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + MiqtVirtualQDragMoveEvent* ret = new MiqtVirtualQDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); + *outptr_QDragMoveEvent = ret; + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +QDragMoveEvent* QDragMoveEvent_Clone(const QDragMoveEvent* self) { + return self->clone(); +} + +QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self) { + return new QRect(self->answerRect()); +} + +void QDragMoveEvent_Accept(QDragMoveEvent* self) { + self->accept(); +} + +void QDragMoveEvent_Ignore(QDragMoveEvent* self) { + self->ignore(); +} + +void QDragMoveEvent_AcceptWithQRect(QDragMoveEvent* self, QRect* r) { + self->accept(*r); +} + +void QDragMoveEvent_IgnoreWithQRect(QDragMoveEvent* self, QRect* r) { + self->ignore(*r); +} + +void QDragMoveEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QDragMoveEvent*)(self) )->handle__Clone = slot; +} + +QDragMoveEvent* QDragMoveEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQDragMoveEvent*)(self) )->virtualbase_Clone(); +} + +void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDragEnterEvent : public virtual QDragEnterEvent { +public: + + MiqtVirtualQDragEnterEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers): QDragEnterEvent(pos, actions, data, buttons, modifiers) {}; + + virtual ~MiqtVirtualQDragEnterEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QDragEnterEvent* clone() const override { + if (handle__Clone == 0) { + return QDragEnterEvent::clone(); + } + + + QDragEnterEvent* callback_return_value = miqt_exec_callback_QDragEnterEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QDragEnterEvent* virtualbase_Clone() const { + + return QDragEnterEvent::clone(); + + } + +}; + +void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { + MiqtVirtualQDragEnterEvent* ret = new MiqtVirtualQDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); + *outptr_QDragEnterEvent = ret; + *outptr_QDragMoveEvent = static_cast(ret); + *outptr_QDropEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); +} + +QDragEnterEvent* QDragEnterEvent_Clone(const QDragEnterEvent* self) { + return self->clone(); +} + +void QDragEnterEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QDragEnterEvent*)(self) )->handle__Clone = slot; +} + +QDragEnterEvent* QDragEnterEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQDragEnterEvent*)(self) )->virtualbase_Clone(); +} + +void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDragLeaveEvent : public virtual QDragLeaveEvent { +public: + + MiqtVirtualQDragLeaveEvent(): QDragLeaveEvent() {}; + + virtual ~MiqtVirtualQDragLeaveEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QDragLeaveEvent* clone() const override { + if (handle__Clone == 0) { + return QDragLeaveEvent::clone(); + } + + + QDragLeaveEvent* callback_return_value = miqt_exec_callback_QDragLeaveEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QDragLeaveEvent* virtualbase_Clone() const { + + return QDragLeaveEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QDragLeaveEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QDragLeaveEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QDragLeaveEvent::setAccepted(accepted); + + } + +}; + +void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent) { + MiqtVirtualQDragLeaveEvent* ret = new MiqtVirtualQDragLeaveEvent(); + *outptr_QDragLeaveEvent = ret; + *outptr_QEvent = static_cast(ret); } -int QDropEvent_Modifiers(const QDropEvent* self) { - Qt::KeyboardModifiers _ret = self->modifiers(); - return static_cast(_ret); +QDragLeaveEvent* QDragLeaveEvent_Clone(const QDragLeaveEvent* self) { + return self->clone(); } -int QDropEvent_PossibleActions(const QDropEvent* self) { - Qt::DropActions _ret = self->possibleActions(); - return static_cast(_ret); +void QDragLeaveEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QDragLeaveEvent*)(self) )->handle__Clone = slot; } -int QDropEvent_ProposedAction(const QDropEvent* self) { - Qt::DropAction _ret = self->proposedAction(); - return static_cast(_ret); +QDragLeaveEvent* QDragLeaveEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQDragLeaveEvent*)(self) )->virtualbase_Clone(); } -void QDropEvent_AcceptProposedAction(QDropEvent* self) { - self->acceptProposedAction(); +void QDragLeaveEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QDragLeaveEvent*)(self) )->handle__SetAccepted = slot; } -int QDropEvent_DropAction(const QDropEvent* self) { - Qt::DropAction _ret = self->dropAction(); - return static_cast(_ret); +void QDragLeaveEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQDragLeaveEvent*)(self) )->virtualbase_SetAccepted(accepted); } -void QDropEvent_SetDropAction(QDropEvent* self, int action) { - self->setDropAction(static_cast(action)); +void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QObject* QDropEvent_Source(const QDropEvent* self) { - return self->source(); -} +class MiqtVirtualQHelpEvent : public virtual QHelpEvent { +public: -QMimeData* QDropEvent_MimeData(const QDropEvent* self) { - return (QMimeData*) self->mimeData(); -} + MiqtVirtualQHelpEvent(QEvent::Type typeVal, const QPoint& pos, const QPoint& globalPos): QHelpEvent(typeVal, pos, globalPos) {}; -void QDropEvent_Delete(QDropEvent* self) { - delete self; -} + virtual ~MiqtVirtualQHelpEvent() = default; -QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { - return new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; -QDragMoveEvent* QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { - return new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); -} + // Subclass to allow providing a Go implementation + virtual QHelpEvent* clone() const override { + if (handle__Clone == 0) { + return QHelpEvent::clone(); + } + -QDragMoveEvent* QDragMoveEvent_Clone(const QDragMoveEvent* self) { - return self->clone(); -} + QHelpEvent* callback_return_value = miqt_exec_callback_QHelpEvent_Clone(const_cast(this), handle__Clone); -QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self) { - return new QRect(self->answerRect()); -} + return callback_return_value; + } -void QDragMoveEvent_Accept(QDragMoveEvent* self) { - self->accept(); -} + // Wrapper to allow calling protected method + QHelpEvent* virtualbase_Clone() const { -void QDragMoveEvent_Ignore(QDragMoveEvent* self) { - self->ignore(); -} + return QHelpEvent::clone(); -void QDragMoveEvent_AcceptWithQRect(QDragMoveEvent* self, QRect* r) { - self->accept(*r); -} + } -void QDragMoveEvent_IgnoreWithQRect(QDragMoveEvent* self, QRect* r) { - self->ignore(*r); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; -void QDragMoveEvent_Delete(QDragMoveEvent* self) { - delete self; -} + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QHelpEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; -QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { - return new QDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); -} + miqt_exec_callback_QHelpEvent_SetAccepted(this, handle__SetAccepted, sigval1); -QDragEnterEvent* QDragEnterEvent_Clone(const QDragEnterEvent* self) { - return self->clone(); -} + + } -void QDragEnterEvent_Delete(QDragEnterEvent* self) { - delete self; -} + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { -QDragLeaveEvent* QDragLeaveEvent_new() { - return new QDragLeaveEvent(); -} + QHelpEvent::setAccepted(accepted); -QDragLeaveEvent* QDragLeaveEvent_Clone(const QDragLeaveEvent* self) { - return self->clone(); -} + } -void QDragLeaveEvent_Delete(QDragLeaveEvent* self) { - delete self; -} +}; -QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos) { - return new QHelpEvent(static_cast(typeVal), *pos, *globalPos); +void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent) { + MiqtVirtualQHelpEvent* ret = new MiqtVirtualQHelpEvent(static_cast(typeVal), *pos, *globalPos); + *outptr_QHelpEvent = ret; + *outptr_QEvent = static_cast(ret); } QHelpEvent* QHelpEvent_Clone(const QHelpEvent* self) { @@ -1292,13 +3991,90 @@ QPoint* QHelpEvent_GlobalPos(const QHelpEvent* self) { return const_cast(&_ret); } -void QHelpEvent_Delete(QHelpEvent* self) { - delete self; +void QHelpEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QHelpEvent*)(self) )->handle__Clone = slot; } -QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip) { +QHelpEvent* QHelpEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQHelpEvent*)(self) )->virtualbase_Clone(); +} + +void QHelpEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QHelpEvent*)(self) )->handle__SetAccepted = slot; +} + +void QHelpEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQHelpEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQStatusTipEvent : public virtual QStatusTipEvent { +public: + + MiqtVirtualQStatusTipEvent(const QString& tip): QStatusTipEvent(tip) {}; + + virtual ~MiqtVirtualQStatusTipEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QStatusTipEvent* clone() const override { + if (handle__Clone == 0) { + return QStatusTipEvent::clone(); + } + + + QStatusTipEvent* callback_return_value = miqt_exec_callback_QStatusTipEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QStatusTipEvent* virtualbase_Clone() const { + + return QStatusTipEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QStatusTipEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QStatusTipEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QStatusTipEvent::setAccepted(accepted); + + } + +}; + +void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent) { QString tip_QString = QString::fromUtf8(tip.data, tip.len); - return new QStatusTipEvent(tip_QString); + MiqtVirtualQStatusTipEvent* ret = new MiqtVirtualQStatusTipEvent(tip_QString); + *outptr_QStatusTipEvent = ret; + *outptr_QEvent = static_cast(ret); } QStatusTipEvent* QStatusTipEvent_Clone(const QStatusTipEvent* self) { @@ -1316,13 +4092,90 @@ struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self) { return _ms; } -void QStatusTipEvent_Delete(QStatusTipEvent* self) { - delete self; +void QStatusTipEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QStatusTipEvent*)(self) )->handle__Clone = slot; +} + +QStatusTipEvent* QStatusTipEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQStatusTipEvent*)(self) )->virtualbase_Clone(); +} + +void QStatusTipEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QStatusTipEvent*)(self) )->handle__SetAccepted = slot; +} + +void QStatusTipEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQStatusTipEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href) { +class MiqtVirtualQWhatsThisClickedEvent : public virtual QWhatsThisClickedEvent { +public: + + MiqtVirtualQWhatsThisClickedEvent(const QString& href): QWhatsThisClickedEvent(href) {}; + + virtual ~MiqtVirtualQWhatsThisClickedEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QWhatsThisClickedEvent* clone() const override { + if (handle__Clone == 0) { + return QWhatsThisClickedEvent::clone(); + } + + + QWhatsThisClickedEvent* callback_return_value = miqt_exec_callback_QWhatsThisClickedEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWhatsThisClickedEvent* virtualbase_Clone() const { + + return QWhatsThisClickedEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QWhatsThisClickedEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QWhatsThisClickedEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QWhatsThisClickedEvent::setAccepted(accepted); + + } + +}; + +void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent) { QString href_QString = QString::fromUtf8(href.data, href.len); - return new QWhatsThisClickedEvent(href_QString); + MiqtVirtualQWhatsThisClickedEvent* ret = new MiqtVirtualQWhatsThisClickedEvent(href_QString); + *outptr_QWhatsThisClickedEvent = ret; + *outptr_QEvent = static_cast(ret); } QWhatsThisClickedEvent* QWhatsThisClickedEvent_Clone(const QWhatsThisClickedEvent* self) { @@ -1340,16 +4193,96 @@ struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* sel return _ms; } -void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self) { - delete self; +void QWhatsThisClickedEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QWhatsThisClickedEvent*)(self) )->handle__Clone = slot; +} + +QWhatsThisClickedEvent* QWhatsThisClickedEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQWhatsThisClickedEvent*)(self) )->virtualbase_Clone(); } -QActionEvent* QActionEvent_new(int typeVal, QAction* action) { - return new QActionEvent(static_cast(typeVal), action); +void QWhatsThisClickedEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QWhatsThisClickedEvent*)(self) )->handle__SetAccepted = slot; } -QActionEvent* QActionEvent_new2(int typeVal, QAction* action, QAction* before) { - return new QActionEvent(static_cast(typeVal), action, before); +void QWhatsThisClickedEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQWhatsThisClickedEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQActionEvent : public virtual QActionEvent { +public: + + MiqtVirtualQActionEvent(int typeVal, QAction* action): QActionEvent(typeVal, action) {}; + MiqtVirtualQActionEvent(int typeVal, QAction* action, QAction* before): QActionEvent(typeVal, action, before) {}; + + virtual ~MiqtVirtualQActionEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QActionEvent* clone() const override { + if (handle__Clone == 0) { + return QActionEvent::clone(); + } + + + QActionEvent* callback_return_value = miqt_exec_callback_QActionEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QActionEvent* virtualbase_Clone() const { + + return QActionEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QActionEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QActionEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QActionEvent::setAccepted(accepted); + + } + +}; + +void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { + MiqtVirtualQActionEvent* ret = new MiqtVirtualQActionEvent(static_cast(typeVal), action); + *outptr_QActionEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +void QActionEvent_new2(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { + MiqtVirtualQActionEvent* ret = new MiqtVirtualQActionEvent(static_cast(typeVal), action, before); + *outptr_QActionEvent = ret; + *outptr_QEvent = static_cast(ret); } QActionEvent* QActionEvent_Clone(const QActionEvent* self) { @@ -1364,17 +4297,97 @@ QAction* QActionEvent_Before(const QActionEvent* self) { return self->before(); } -void QActionEvent_Delete(QActionEvent* self) { - delete self; +void QActionEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QActionEvent*)(self) )->handle__Clone = slot; +} + +QActionEvent* QActionEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQActionEvent*)(self) )->virtualbase_Clone(); +} + +void QActionEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QActionEvent*)(self) )->handle__SetAccepted = slot; +} + +void QActionEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQActionEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QActionEvent_Delete(QActionEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file) { +class MiqtVirtualQFileOpenEvent : public virtual QFileOpenEvent { +public: + + MiqtVirtualQFileOpenEvent(const QString& file): QFileOpenEvent(file) {}; + MiqtVirtualQFileOpenEvent(const QUrl& url): QFileOpenEvent(url) {}; + + virtual ~MiqtVirtualQFileOpenEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QFileOpenEvent* clone() const override { + if (handle__Clone == 0) { + return QFileOpenEvent::clone(); + } + + + QFileOpenEvent* callback_return_value = miqt_exec_callback_QFileOpenEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QFileOpenEvent* virtualbase_Clone() const { + + return QFileOpenEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QFileOpenEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QFileOpenEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QFileOpenEvent::setAccepted(accepted); + + } + +}; + +void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QFileOpenEvent(file_QString); + MiqtVirtualQFileOpenEvent* ret = new MiqtVirtualQFileOpenEvent(file_QString); + *outptr_QFileOpenEvent = ret; + *outptr_QEvent = static_cast(ret); } -QFileOpenEvent* QFileOpenEvent_new2(QUrl* url) { - return new QFileOpenEvent(*url); +void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { + MiqtVirtualQFileOpenEvent* ret = new MiqtVirtualQFileOpenEvent(*url); + *outptr_QFileOpenEvent = ret; + *outptr_QEvent = static_cast(ret); } QFileOpenEvent* QFileOpenEvent_Clone(const QFileOpenEvent* self) { @@ -1400,32 +4413,189 @@ bool QFileOpenEvent_OpenFile(const QFileOpenEvent* self, QFile* file, int flags) return self->openFile(*file, static_cast(flags)); } -void QFileOpenEvent_Delete(QFileOpenEvent* self) { - delete self; +void QFileOpenEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QFileOpenEvent*)(self) )->handle__Clone = slot; +} + +QFileOpenEvent* QFileOpenEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQFileOpenEvent*)(self) )->virtualbase_Clone(); +} + +void QFileOpenEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QFileOpenEvent*)(self) )->handle__SetAccepted = slot; } -QToolBarChangeEvent* QToolBarChangeEvent_new(bool t) { - return new QToolBarChangeEvent(t); +void QFileOpenEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQFileOpenEvent*)(self) )->virtualbase_SetAccepted(accepted); } -QToolBarChangeEvent* QToolBarChangeEvent_Clone(const QToolBarChangeEvent* self) { - return self->clone(); -} +void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQToolBarChangeEvent : public virtual QToolBarChangeEvent { +public: + + MiqtVirtualQToolBarChangeEvent(bool t): QToolBarChangeEvent(t) {}; + + virtual ~MiqtVirtualQToolBarChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QToolBarChangeEvent* clone() const override { + if (handle__Clone == 0) { + return QToolBarChangeEvent::clone(); + } + + + QToolBarChangeEvent* callback_return_value = miqt_exec_callback_QToolBarChangeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QToolBarChangeEvent* virtualbase_Clone() const { + + return QToolBarChangeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QToolBarChangeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QToolBarChangeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QToolBarChangeEvent::setAccepted(accepted); + + } + +}; + +void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQToolBarChangeEvent* ret = new MiqtVirtualQToolBarChangeEvent(t); + *outptr_QToolBarChangeEvent = ret; + *outptr_QEvent = static_cast(ret); +} + +QToolBarChangeEvent* QToolBarChangeEvent_Clone(const QToolBarChangeEvent* self) { + return self->clone(); +} + +bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self) { + return self->toggle(); +} + +void QToolBarChangeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QToolBarChangeEvent*)(self) )->handle__Clone = slot; +} + +QToolBarChangeEvent* QToolBarChangeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQToolBarChangeEvent*)(self) )->virtualbase_Clone(); +} + +void QToolBarChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QToolBarChangeEvent*)(self) )->handle__SetAccepted = slot; +} + +void QToolBarChangeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQToolBarChangeEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQShortcutEvent : public virtual QShortcutEvent { +public: + + MiqtVirtualQShortcutEvent(const QKeySequence& key, int id): QShortcutEvent(key, id) {}; + MiqtVirtualQShortcutEvent(const QKeySequence& key, int id, bool ambiguous): QShortcutEvent(key, id, ambiguous) {}; + + virtual ~MiqtVirtualQShortcutEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QShortcutEvent* clone() const override { + if (handle__Clone == 0) { + return QShortcutEvent::clone(); + } + + + QShortcutEvent* callback_return_value = miqt_exec_callback_QShortcutEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QShortcutEvent* virtualbase_Clone() const { + + return QShortcutEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QShortcutEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QShortcutEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QShortcutEvent::setAccepted(accepted); -bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self) { - return self->toggle(); -} + } -void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self) { - delete self; -} +}; -QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id) { - return new QShortcutEvent(*key, static_cast(id)); +void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { + MiqtVirtualQShortcutEvent* ret = new MiqtVirtualQShortcutEvent(*key, static_cast(id)); + *outptr_QShortcutEvent = ret; + *outptr_QEvent = static_cast(ret); } -QShortcutEvent* QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous) { - return new QShortcutEvent(*key, static_cast(id), ambiguous); +void QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { + MiqtVirtualQShortcutEvent* ret = new MiqtVirtualQShortcutEvent(*key, static_cast(id), ambiguous); + *outptr_QShortcutEvent = ret; + *outptr_QEvent = static_cast(ret); } QShortcutEvent* QShortcutEvent_Clone(const QShortcutEvent* self) { @@ -1446,16 +4616,96 @@ bool QShortcutEvent_IsAmbiguous(const QShortcutEvent* self) { return self->isAmbiguous(); } -void QShortcutEvent_Delete(QShortcutEvent* self) { - delete self; +void QShortcutEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QShortcutEvent*)(self) )->handle__Clone = slot; +} + +QShortcutEvent* QShortcutEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQShortcutEvent*)(self) )->virtualbase_Clone(); +} + +void QShortcutEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QShortcutEvent*)(self) )->handle__SetAccepted = slot; +} + +void QShortcutEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQShortcutEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWindowStateChangeEvent* QWindowStateChangeEvent_new(int oldState) { - return new QWindowStateChangeEvent(static_cast(oldState)); +class MiqtVirtualQWindowStateChangeEvent : public virtual QWindowStateChangeEvent { +public: + + MiqtVirtualQWindowStateChangeEvent(Qt::WindowStates oldState): QWindowStateChangeEvent(oldState) {}; + MiqtVirtualQWindowStateChangeEvent(Qt::WindowStates oldState, bool isOverride): QWindowStateChangeEvent(oldState, isOverride) {}; + + virtual ~MiqtVirtualQWindowStateChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QWindowStateChangeEvent* clone() const override { + if (handle__Clone == 0) { + return QWindowStateChangeEvent::clone(); + } + + + QWindowStateChangeEvent* callback_return_value = miqt_exec_callback_QWindowStateChangeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWindowStateChangeEvent* virtualbase_Clone() const { + + return QWindowStateChangeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QWindowStateChangeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QWindowStateChangeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QWindowStateChangeEvent::setAccepted(accepted); + + } + +}; + +void QWindowStateChangeEvent_new(int oldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQWindowStateChangeEvent* ret = new MiqtVirtualQWindowStateChangeEvent(static_cast(oldState)); + *outptr_QWindowStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } -QWindowStateChangeEvent* QWindowStateChangeEvent_new2(int oldState, bool isOverride) { - return new QWindowStateChangeEvent(static_cast(oldState), isOverride); +void QWindowStateChangeEvent_new2(int oldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQWindowStateChangeEvent* ret = new MiqtVirtualQWindowStateChangeEvent(static_cast(oldState), isOverride); + *outptr_QWindowStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } QWindowStateChangeEvent* QWindowStateChangeEvent_Clone(const QWindowStateChangeEvent* self) { @@ -1471,44 +4721,239 @@ bool QWindowStateChangeEvent_IsOverride(const QWindowStateChangeEvent* self) { return self->isOverride(); } -void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self) { - delete self; +void QWindowStateChangeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QWindowStateChangeEvent*)(self) )->handle__Clone = slot; +} + +QWindowStateChangeEvent* QWindowStateChangeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQWindowStateChangeEvent*)(self) )->virtualbase_Clone(); +} + +void QWindowStateChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QWindowStateChangeEvent*)(self) )->handle__SetAccepted = slot; +} + +void QWindowStateChangeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQWindowStateChangeEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTouchEvent* QTouchEvent_new(int eventType) { - return new QTouchEvent(static_cast(eventType)); +class MiqtVirtualQTouchEvent : public virtual QTouchEvent { +public: + + MiqtVirtualQTouchEvent(QEvent::Type eventType): QTouchEvent(eventType) {}; + MiqtVirtualQTouchEvent(QEvent::Type eventType, const QPointingDevice* device, Qt::KeyboardModifiers modifiers, QEventPoint::States touchPointStates): QTouchEvent(eventType, device, modifiers, touchPointStates) {}; + MiqtVirtualQTouchEvent(QEvent::Type eventType, const QPointingDevice* device): QTouchEvent(eventType, device) {}; + MiqtVirtualQTouchEvent(QEvent::Type eventType, const QPointingDevice* device, Qt::KeyboardModifiers modifiers): QTouchEvent(eventType, device, modifiers) {}; + MiqtVirtualQTouchEvent(QEvent::Type eventType, const QPointingDevice* device, Qt::KeyboardModifiers modifiers, const QList& touchPoints): QTouchEvent(eventType, device, modifiers, touchPoints) {}; + MiqtVirtualQTouchEvent(QEvent::Type eventType, const QPointingDevice* device, Qt::KeyboardModifiers modifiers, QEventPoint::States touchPointStates, const QList& touchPoints): QTouchEvent(eventType, device, modifiers, touchPointStates, touchPoints) {}; + + virtual ~MiqtVirtualQTouchEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTouchEvent* clone() const override { + if (handle__Clone == 0) { + return QTouchEvent::clone(); + } + + + QTouchEvent* callback_return_value = miqt_exec_callback_QTouchEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTouchEvent* virtualbase_Clone() const { + + return QTouchEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsBeginEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isBeginEvent() const override { + if (handle__IsBeginEvent == 0) { + return QTouchEvent::isBeginEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QTouchEvent_IsBeginEvent(const_cast(this), handle__IsBeginEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsBeginEvent() const { + + return QTouchEvent::isBeginEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsUpdateEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isUpdateEvent() const override { + if (handle__IsUpdateEvent == 0) { + return QTouchEvent::isUpdateEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QTouchEvent_IsUpdateEvent(const_cast(this), handle__IsUpdateEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsUpdateEvent() const { + + return QTouchEvent::isUpdateEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEndEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEndEvent() const override { + if (handle__IsEndEvent == 0) { + return QTouchEvent::isEndEvent(); + } + + + bool callback_return_value = miqt_exec_callback_QTouchEvent_IsEndEvent(const_cast(this), handle__IsEndEvent); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEndEvent() const { + + return QTouchEvent::isEndEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetTimestamp = 0; + + // Subclass to allow providing a Go implementation + virtual void setTimestamp(quint64 timestamp) override { + if (handle__SetTimestamp == 0) { + QTouchEvent::setTimestamp(timestamp); + return; + } + + quint64 timestamp_ret = timestamp; + unsigned long long sigval1 = static_cast(timestamp_ret); + + miqt_exec_callback_QTouchEvent_SetTimestamp(this, handle__SetTimestamp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetTimestamp(unsigned long long timestamp) { + + QTouchEvent::setTimestamp(static_cast(timestamp)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QTouchEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QTouchEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QTouchEvent::setAccepted(accepted); + + } + +}; + +void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType)); + *outptr_QTouchEvent = ret; + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates) { - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); +void QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); + *outptr_QTouchEvent = ret; + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new3(int eventType, QPointingDevice* device) { - return new QTouchEvent(static_cast(eventType), device); +void QTouchEvent_new3(int eventType, QPointingDevice* device, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device); + *outptr_QTouchEvent = ret; + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers) { - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers)); +void QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { + MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers)); + *outptr_QTouchEvent = ret; + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints) { +void QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QList touchPoints_QList; touchPoints_QList.reserve(touchPoints.len); QEventPoint** touchPoints_arr = static_cast(touchPoints.data); for(size_t i = 0; i < touchPoints.len; ++i) { touchPoints_QList.push_back(*(touchPoints_arr[i])); } - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), touchPoints_QList); + MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), touchPoints_QList); + *outptr_QTouchEvent = ret; + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QTouchEvent* QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints) { +void QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { QList touchPoints_QList; touchPoints_QList.reserve(touchPoints.len); QEventPoint** touchPoints_arr = static_cast(touchPoints.data); for(size_t i = 0; i < touchPoints.len; ++i) { touchPoints_QList.push_back(*(touchPoints_arr[i])); } - return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); + MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); + *outptr_QTouchEvent = ret; + *outptr_QPointerEvent = static_cast(ret); + *outptr_QInputEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QTouchEvent* QTouchEvent_Clone(const QTouchEvent* self) { @@ -1549,12 +4994,121 @@ bool QTouchEvent_IsEndEvent(const QTouchEvent* self) { return self->isEndEvent(); } -void QTouchEvent_Delete(QTouchEvent* self) { - delete self; +void QTouchEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTouchEvent*)(self) )->handle__Clone = slot; +} + +QTouchEvent* QTouchEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTouchEvent*)(self) )->virtualbase_Clone(); +} + +void QTouchEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot) { + dynamic_cast( (QTouchEvent*)(self) )->handle__IsBeginEvent = slot; +} + +bool QTouchEvent_virtualbase_IsBeginEvent(const void* self) { + return ( (const MiqtVirtualQTouchEvent*)(self) )->virtualbase_IsBeginEvent(); +} + +void QTouchEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot) { + dynamic_cast( (QTouchEvent*)(self) )->handle__IsUpdateEvent = slot; +} + +bool QTouchEvent_virtualbase_IsUpdateEvent(const void* self) { + return ( (const MiqtVirtualQTouchEvent*)(self) )->virtualbase_IsUpdateEvent(); +} + +void QTouchEvent_override_virtual_IsEndEvent(void* self, intptr_t slot) { + dynamic_cast( (QTouchEvent*)(self) )->handle__IsEndEvent = slot; +} + +bool QTouchEvent_virtualbase_IsEndEvent(const void* self) { + return ( (const MiqtVirtualQTouchEvent*)(self) )->virtualbase_IsEndEvent(); +} + +void QTouchEvent_override_virtual_SetTimestamp(void* self, intptr_t slot) { + dynamic_cast( (QTouchEvent*)(self) )->handle__SetTimestamp = slot; +} + +void QTouchEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp) { + ( (MiqtVirtualQTouchEvent*)(self) )->virtualbase_SetTimestamp(timestamp); +} + +void QTouchEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QTouchEvent*)(self) )->handle__SetAccepted = slot; +} + +void QTouchEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQTouchEvent*)(self) )->virtualbase_SetAccepted(accepted); } -QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos) { - return new QScrollPrepareEvent(*startPos); +void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQScrollPrepareEvent : public virtual QScrollPrepareEvent { +public: + + MiqtVirtualQScrollPrepareEvent(const QPointF& startPos): QScrollPrepareEvent(startPos) {}; + + virtual ~MiqtVirtualQScrollPrepareEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QScrollPrepareEvent* clone() const override { + if (handle__Clone == 0) { + return QScrollPrepareEvent::clone(); + } + + + QScrollPrepareEvent* callback_return_value = miqt_exec_callback_QScrollPrepareEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QScrollPrepareEvent* virtualbase_Clone() const { + + return QScrollPrepareEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QScrollPrepareEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QScrollPrepareEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QScrollPrepareEvent::setAccepted(accepted); + + } + +}; + +void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent) { + MiqtVirtualQScrollPrepareEvent* ret = new MiqtVirtualQScrollPrepareEvent(*startPos); + *outptr_QScrollPrepareEvent = ret; + *outptr_QEvent = static_cast(ret); } QScrollPrepareEvent* QScrollPrepareEvent_Clone(const QScrollPrepareEvent* self) { @@ -1589,12 +5143,89 @@ void QScrollPrepareEvent_SetContentPos(QScrollPrepareEvent* self, QPointF* pos) self->setContentPos(*pos); } -void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self) { - delete self; +void QScrollPrepareEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QScrollPrepareEvent*)(self) )->handle__Clone = slot; +} + +QScrollPrepareEvent* QScrollPrepareEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQScrollPrepareEvent*)(self) )->virtualbase_Clone(); +} + +void QScrollPrepareEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QScrollPrepareEvent*)(self) )->handle__SetAccepted = slot; +} + +void QScrollPrepareEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQScrollPrepareEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState) { - return new QScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); +class MiqtVirtualQScrollEvent : public virtual QScrollEvent { +public: + + MiqtVirtualQScrollEvent(const QPointF& contentPos, const QPointF& overshoot, QScrollEvent::ScrollState scrollState): QScrollEvent(contentPos, overshoot, scrollState) {}; + + virtual ~MiqtVirtualQScrollEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QScrollEvent* clone() const override { + if (handle__Clone == 0) { + return QScrollEvent::clone(); + } + + + QScrollEvent* callback_return_value = miqt_exec_callback_QScrollEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QScrollEvent* virtualbase_Clone() const { + + return QScrollEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QScrollEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QScrollEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QScrollEvent::setAccepted(accepted); + + } + +}; + +void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent) { + MiqtVirtualQScrollEvent* ret = new MiqtVirtualQScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); + *outptr_QScrollEvent = ret; + *outptr_QEvent = static_cast(ret); } QScrollEvent* QScrollEvent_Clone(const QScrollEvent* self) { @@ -1614,12 +5245,89 @@ int QScrollEvent_ScrollState(const QScrollEvent* self) { return static_cast(_ret); } -void QScrollEvent_Delete(QScrollEvent* self) { - delete self; +void QScrollEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QScrollEvent*)(self) )->handle__Clone = slot; +} + +QScrollEvent* QScrollEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQScrollEvent*)(self) )->virtualbase_Clone(); +} + +void QScrollEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QScrollEvent*)(self) )->handle__SetAccepted = slot; +} + +void QScrollEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQScrollEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation) { - return new QScreenOrientationChangeEvent(screen, static_cast(orientation)); +class MiqtVirtualQScreenOrientationChangeEvent : public virtual QScreenOrientationChangeEvent { +public: + + MiqtVirtualQScreenOrientationChangeEvent(QScreen* screen, Qt::ScreenOrientation orientation): QScreenOrientationChangeEvent(screen, orientation) {}; + + virtual ~MiqtVirtualQScreenOrientationChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QScreenOrientationChangeEvent* clone() const override { + if (handle__Clone == 0) { + return QScreenOrientationChangeEvent::clone(); + } + + + QScreenOrientationChangeEvent* callback_return_value = miqt_exec_callback_QScreenOrientationChangeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QScreenOrientationChangeEvent* virtualbase_Clone() const { + + return QScreenOrientationChangeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QScreenOrientationChangeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QScreenOrientationChangeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QScreenOrientationChangeEvent::setAccepted(accepted); + + } + +}; + +void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQScreenOrientationChangeEvent* ret = new MiqtVirtualQScreenOrientationChangeEvent(screen, static_cast(orientation)); + *outptr_QScreenOrientationChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_Clone(const QScreenOrientationChangeEvent* self) { @@ -1635,12 +5343,89 @@ int QScreenOrientationChangeEvent_Orientation(const QScreenOrientationChangeEven return static_cast(_ret); } -void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self) { - delete self; +void QScreenOrientationChangeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QScreenOrientationChangeEvent*)(self) )->handle__Clone = slot; +} + +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQScreenOrientationChangeEvent*)(self) )->virtualbase_Clone(); +} + +void QScreenOrientationChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QScreenOrientationChangeEvent*)(self) )->handle__SetAccepted = slot; +} + +void QScreenOrientationChangeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQScreenOrientationChangeEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state) { - return new QApplicationStateChangeEvent(static_cast(state)); +class MiqtVirtualQApplicationStateChangeEvent : public virtual QApplicationStateChangeEvent { +public: + + MiqtVirtualQApplicationStateChangeEvent(Qt::ApplicationState state): QApplicationStateChangeEvent(state) {}; + + virtual ~MiqtVirtualQApplicationStateChangeEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QApplicationStateChangeEvent* clone() const override { + if (handle__Clone == 0) { + return QApplicationStateChangeEvent::clone(); + } + + + QApplicationStateChangeEvent* callback_return_value = miqt_exec_callback_QApplicationStateChangeEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QApplicationStateChangeEvent* virtualbase_Clone() const { + + return QApplicationStateChangeEvent::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QApplicationStateChangeEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QApplicationStateChangeEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QApplicationStateChangeEvent::setAccepted(accepted); + + } + +}; + +void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent) { + MiqtVirtualQApplicationStateChangeEvent* ret = new MiqtVirtualQApplicationStateChangeEvent(static_cast(state)); + *outptr_QApplicationStateChangeEvent = ret; + *outptr_QEvent = static_cast(ret); } QApplicationStateChangeEvent* QApplicationStateChangeEvent_Clone(const QApplicationStateChangeEvent* self) { @@ -1652,27 +5437,54 @@ int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeE return static_cast(_ret); } -void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self) { - delete self; +void QApplicationStateChangeEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QApplicationStateChangeEvent*)(self) )->handle__Clone = slot; +} + +QApplicationStateChangeEvent* QApplicationStateChangeEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQApplicationStateChangeEvent*)(self) )->virtualbase_Clone(); } -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val) { - return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); +void QApplicationStateChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QApplicationStateChangeEvent*)(self) )->handle__SetAccepted = slot; } -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l) { - return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); +void QApplicationStateChangeEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQApplicationStateChangeEvent*)(self) )->virtualbase_SetAccepted(accepted); } -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1) { - return new QInputMethodEvent::Attribute(*param1); +void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { + QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); + *outptr_QInputMethodEvent__Attribute = ret; +} + +void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { + QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); + *outptr_QInputMethodEvent__Attribute = ret; +} + +void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { + QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(*param1); + *outptr_QInputMethodEvent__Attribute = ret; } void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1) { self->operator=(*param1); } -void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self) { - delete self; +void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qevent.go b/qt6/gen_qevent.go index 98dc1998..810a3c0f 100644 --- a/qt6/gen_qevent.go +++ b/qt6/gen_qevent.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -53,7 +54,8 @@ const ( ) type QInputEvent struct { - h *C.QInputEvent + h *C.QInputEvent + isSubclass bool *QEvent } @@ -71,35 +73,53 @@ func (this *QInputEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputEvent(h *C.QInputEvent) *QInputEvent { +// newQInputEvent constructs the type using only CGO pointers. +func newQInputEvent(h *C.QInputEvent, h_QEvent *C.QEvent) *QInputEvent { if h == nil { return nil } - return &QInputEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QInputEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQInputEvent(h unsafe.Pointer) *QInputEvent { - return newQInputEvent((*C.QInputEvent)(h)) +// UnsafeNewQInputEvent constructs the type using only unsafe pointers. +func UnsafeNewQInputEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputEvent { + if h == nil { + return nil + } + + return &QInputEvent{h: (*C.QInputEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQInputEvent constructs a new QInputEvent object. func NewQInputEvent(typeVal QEvent__Type, m_dev *QInputDevice) *QInputEvent { - ret := C.QInputEvent_new((C.int)(typeVal), m_dev.cPointer()) - return newQInputEvent(ret) + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputEvent_new((C.int)(typeVal), m_dev.cPointer(), &outptr_QInputEvent, &outptr_QEvent) + ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputEvent2 constructs a new QInputEvent object. func NewQInputEvent2(typeVal QEvent__Type, m_dev *QInputDevice, modifiers KeyboardModifier) *QInputEvent { - ret := C.QInputEvent_new2((C.int)(typeVal), m_dev.cPointer(), (C.int)(modifiers)) - return newQInputEvent(ret) + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputEvent_new2((C.int)(typeVal), m_dev.cPointer(), (C.int)(modifiers), &outptr_QInputEvent, &outptr_QEvent) + ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QInputEvent) Clone() *QInputEvent { - return UnsafeNewQInputEvent(unsafe.Pointer(C.QInputEvent_Clone(this.h))) + return UnsafeNewQInputEvent(unsafe.Pointer(C.QInputEvent_Clone(this.h)), nil) } func (this *QInputEvent) Device() *QInputDevice { - return UnsafeNewQInputDevice(unsafe.Pointer(C.QInputEvent_Device(this.h))) + return UnsafeNewQInputDevice(unsafe.Pointer(C.QInputEvent_Device(this.h)), nil) } func (this *QInputEvent) DeviceType() QInputDevice__DeviceType { @@ -122,9 +142,76 @@ func (this *QInputEvent) SetTimestamp(timestamp uint64) { C.QInputEvent_SetTimestamp(this.h, (C.ulonglong)(timestamp)) } +func (this *QInputEvent) callVirtualBase_Clone() *QInputEvent { + + return UnsafeNewQInputEvent(unsafe.Pointer(C.QInputEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QInputEvent) OnClone(slot func(super func() *QInputEvent) *QInputEvent) { + C.QInputEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputEvent_Clone +func miqt_exec_callback_QInputEvent_Clone(self *C.QInputEvent, cb C.intptr_t) *C.QInputEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QInputEvent) *QInputEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QInputEvent) callVirtualBase_SetTimestamp(timestamp uint64) { + + C.QInputEvent_virtualbase_SetTimestamp(unsafe.Pointer(this.h), (C.ulonglong)(timestamp)) + +} +func (this *QInputEvent) OnSetTimestamp(slot func(super func(timestamp uint64), timestamp uint64)) { + C.QInputEvent_override_virtual_SetTimestamp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputEvent_SetTimestamp +func miqt_exec_callback_QInputEvent_SetTimestamp(self *C.QInputEvent, cb C.intptr_t, timestamp C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timestamp uint64), timestamp uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint64)(timestamp) + + gofunc((&QInputEvent{h: self}).callVirtualBase_SetTimestamp, slotval1) + +} + +func (this *QInputEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QInputEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QInputEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QInputEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputEvent_SetAccepted +func miqt_exec_callback_QInputEvent_SetAccepted(self *C.QInputEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QInputEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QInputEvent) Delete() { - C.QInputEvent_Delete(this.h) + C.QInputEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -137,7 +224,8 @@ func (this *QInputEvent) GoGC() { } type QPointerEvent struct { - h *C.QPointerEvent + h *C.QPointerEvent + isSubclass bool *QInputEvent } @@ -155,27 +243,47 @@ func (this *QPointerEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPointerEvent(h *C.QPointerEvent) *QPointerEvent { +// newQPointerEvent constructs the type using only CGO pointers. +func newQPointerEvent(h *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QPointerEvent { if h == nil { return nil } - return &QPointerEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QPointerEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQPointerEvent(h unsafe.Pointer) *QPointerEvent { - return newQPointerEvent((*C.QPointerEvent)(h)) +// UnsafeNewQPointerEvent constructs the type using only unsafe pointers. +func UnsafeNewQPointerEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QPointerEvent { + if h == nil { + return nil + } + + return &QPointerEvent{h: (*C.QPointerEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQPointerEvent constructs a new QPointerEvent object. func NewQPointerEvent(typeVal QEvent__Type, dev *QPointingDevice) *QPointerEvent { - ret := C.QPointerEvent_new((C.int)(typeVal), dev.cPointer()) - return newQPointerEvent(ret) + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPointerEvent_new((C.int)(typeVal), dev.cPointer(), &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQPointerEvent(outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQPointerEvent2 constructs a new QPointerEvent object. func NewQPointerEvent2(typeVal QEvent__Type, dev *QPointingDevice, modifiers KeyboardModifier) *QPointerEvent { - ret := C.QPointerEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers)) - return newQPointerEvent(ret) + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPointerEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers), &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQPointerEvent(outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQPointerEvent3 constructs a new QPointerEvent object. @@ -186,16 +294,22 @@ func NewQPointerEvent3(typeVal QEvent__Type, dev *QPointingDevice, modifiers Key points_CArray[i] = points[i].cPointer() } points_ma := C.struct_miqt_array{len: C.size_t(len(points)), data: unsafe.Pointer(points_CArray)} - ret := C.QPointerEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers), points_ma) - return newQPointerEvent(ret) + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPointerEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers), points_ma, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQPointerEvent(outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QPointerEvent) Clone() *QPointerEvent { - return UnsafeNewQPointerEvent(unsafe.Pointer(C.QPointerEvent_Clone(this.h))) + return UnsafeNewQPointerEvent(unsafe.Pointer(C.QPointerEvent_Clone(this.h)), nil, nil) } func (this *QPointerEvent) PointingDevice() *QPointingDevice { - return UnsafeNewQPointingDevice(unsafe.Pointer(C.QPointerEvent_PointingDevice(this.h))) + return UnsafeNewQPointingDevice(unsafe.Pointer(C.QPointerEvent_PointingDevice(this.h)), nil, nil) } func (this *QPointerEvent) PointerType() QPointingDevice__PointerType { @@ -275,9 +389,142 @@ func (this *QPointerEvent) RemovePassiveGrabber(point *QEventPoint, grabber *QOb return (bool)(C.QPointerEvent_RemovePassiveGrabber(this.h, point.cPointer(), grabber.cPointer())) } +func (this *QPointerEvent) callVirtualBase_Clone() *QPointerEvent { + + return UnsafeNewQPointerEvent(unsafe.Pointer(C.QPointerEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QPointerEvent) OnClone(slot func(super func() *QPointerEvent) *QPointerEvent) { + C.QPointerEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPointerEvent_Clone +func miqt_exec_callback_QPointerEvent_Clone(self *C.QPointerEvent, cb C.intptr_t) *C.QPointerEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPointerEvent) *QPointerEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPointerEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QPointerEvent) callVirtualBase_SetTimestamp(timestamp uint64) { + + C.QPointerEvent_virtualbase_SetTimestamp(unsafe.Pointer(this.h), (C.ulonglong)(timestamp)) + +} +func (this *QPointerEvent) OnSetTimestamp(slot func(super func(timestamp uint64), timestamp uint64)) { + C.QPointerEvent_override_virtual_SetTimestamp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPointerEvent_SetTimestamp +func miqt_exec_callback_QPointerEvent_SetTimestamp(self *C.QPointerEvent, cb C.intptr_t, timestamp C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timestamp uint64), timestamp uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint64)(timestamp) + + gofunc((&QPointerEvent{h: self}).callVirtualBase_SetTimestamp, slotval1) + +} + +func (this *QPointerEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QPointerEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QPointerEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QPointerEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPointerEvent_IsBeginEvent +func miqt_exec_callback_QPointerEvent_IsBeginEvent(self *C.QPointerEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPointerEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QPointerEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QPointerEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QPointerEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QPointerEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPointerEvent_IsUpdateEvent +func miqt_exec_callback_QPointerEvent_IsUpdateEvent(self *C.QPointerEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPointerEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QPointerEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QPointerEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QPointerEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QPointerEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPointerEvent_IsEndEvent +func miqt_exec_callback_QPointerEvent_IsEndEvent(self *C.QPointerEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPointerEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QPointerEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QPointerEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QPointerEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QPointerEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPointerEvent_SetAccepted +func miqt_exec_callback_QPointerEvent_SetAccepted(self *C.QPointerEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QPointerEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QPointerEvent) Delete() { - C.QPointerEvent_Delete(this.h) + C.QPointerEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -290,7 +537,8 @@ func (this *QPointerEvent) GoGC() { } type QSinglePointEvent struct { - h *C.QSinglePointEvent + h *C.QSinglePointEvent + isSubclass bool *QPointerEvent } @@ -308,19 +556,27 @@ func (this *QSinglePointEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSinglePointEvent(h *C.QSinglePointEvent) *QSinglePointEvent { +// newQSinglePointEvent constructs the type using only CGO pointers. +func newQSinglePointEvent(h *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QSinglePointEvent { if h == nil { return nil } - return &QSinglePointEvent{h: h, QPointerEvent: UnsafeNewQPointerEvent(unsafe.Pointer(h))} + return &QSinglePointEvent{h: h, + QPointerEvent: newQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQSinglePointEvent(h unsafe.Pointer) *QSinglePointEvent { - return newQSinglePointEvent((*C.QSinglePointEvent)(h)) +// UnsafeNewQSinglePointEvent constructs the type using only unsafe pointers. +func UnsafeNewQSinglePointEvent(h unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QSinglePointEvent { + if h == nil { + return nil + } + + return &QSinglePointEvent{h: (*C.QSinglePointEvent)(h), + QPointerEvent: UnsafeNewQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} } func (this *QSinglePointEvent) Clone() *QSinglePointEvent { - return UnsafeNewQSinglePointEvent(unsafe.Pointer(C.QSinglePointEvent_Clone(this.h))) + return UnsafeNewQSinglePointEvent(unsafe.Pointer(C.QSinglePointEvent_Clone(this.h)), nil, nil, nil) } func (this *QSinglePointEvent) Button() MouseButton { @@ -374,7 +630,7 @@ func (this *QSinglePointEvent) SetExclusivePointGrabber(exclusiveGrabber *QObjec // Delete this object from C++ memory. func (this *QSinglePointEvent) Delete() { - C.QSinglePointEvent_Delete(this.h) + C.QSinglePointEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -387,7 +643,8 @@ func (this *QSinglePointEvent) GoGC() { } type QEnterEvent struct { - h *C.QEnterEvent + h *C.QEnterEvent + isSubclass bool *QSinglePointEvent } @@ -405,31 +662,55 @@ func (this *QEnterEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQEnterEvent(h *C.QEnterEvent) *QEnterEvent { +// newQEnterEvent constructs the type using only CGO pointers. +func newQEnterEvent(h *C.QEnterEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QEnterEvent { if h == nil { return nil } - return &QEnterEvent{h: h, QSinglePointEvent: UnsafeNewQSinglePointEvent(unsafe.Pointer(h))} + return &QEnterEvent{h: h, + QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQEnterEvent(h unsafe.Pointer) *QEnterEvent { - return newQEnterEvent((*C.QEnterEvent)(h)) +// UnsafeNewQEnterEvent constructs the type using only unsafe pointers. +func UnsafeNewQEnterEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QEnterEvent { + if h == nil { + return nil + } + + return &QEnterEvent{h: (*C.QEnterEvent)(h), + QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQEnterEvent constructs a new QEnterEvent object. func NewQEnterEvent(localPos *QPointF, scenePos *QPointF, globalPos *QPointF) *QEnterEvent { - ret := C.QEnterEvent_new(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer()) - return newQEnterEvent(ret) + var outptr_QEnterEvent *C.QEnterEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QEnterEvent_new(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), &outptr_QEnterEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQEnterEvent(outptr_QEnterEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQEnterEvent2 constructs a new QEnterEvent object. func NewQEnterEvent2(localPos *QPointF, scenePos *QPointF, globalPos *QPointF, device *QPointingDevice) *QEnterEvent { - ret := C.QEnterEvent_new2(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), device.cPointer()) - return newQEnterEvent(ret) + var outptr_QEnterEvent *C.QEnterEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QEnterEvent_new2(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), device.cPointer(), &outptr_QEnterEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQEnterEvent(outptr_QEnterEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QEnterEvent) Clone() *QEnterEvent { - return UnsafeNewQEnterEvent(unsafe.Pointer(C.QEnterEvent_Clone(this.h))) + return UnsafeNewQEnterEvent(unsafe.Pointer(C.QEnterEvent_Clone(this.h)), nil, nil, nil, nil) } func (this *QEnterEvent) Pos() *QPoint { @@ -483,9 +764,96 @@ func (this *QEnterEvent) ScreenPos() *QPointF { return _goptr } +func (this *QEnterEvent) callVirtualBase_Clone() *QEnterEvent { + + return UnsafeNewQEnterEvent(unsafe.Pointer(C.QEnterEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QEnterEvent) OnClone(slot func(super func() *QEnterEvent) *QEnterEvent) { + C.QEnterEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEnterEvent_Clone +func miqt_exec_callback_QEnterEvent_Clone(self *C.QEnterEvent, cb C.intptr_t) *C.QEnterEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QEnterEvent) *QEnterEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QEnterEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QEnterEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QEnterEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QEnterEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QEnterEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEnterEvent_IsBeginEvent +func miqt_exec_callback_QEnterEvent_IsBeginEvent(self *C.QEnterEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QEnterEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QEnterEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QEnterEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QEnterEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QEnterEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEnterEvent_IsUpdateEvent +func miqt_exec_callback_QEnterEvent_IsUpdateEvent(self *C.QEnterEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QEnterEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QEnterEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QEnterEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QEnterEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QEnterEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEnterEvent_IsEndEvent +func miqt_exec_callback_QEnterEvent_IsEndEvent(self *C.QEnterEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QEnterEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QEnterEvent) Delete() { - C.QEnterEvent_Delete(this.h) + C.QEnterEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -498,7 +866,8 @@ func (this *QEnterEvent) GoGC() { } type QMouseEvent struct { - h *C.QMouseEvent + h *C.QMouseEvent + isSubclass bool *QSinglePointEvent } @@ -516,67 +885,139 @@ func (this *QMouseEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMouseEvent(h *C.QMouseEvent) *QMouseEvent { +// newQMouseEvent constructs the type using only CGO pointers. +func newQMouseEvent(h *C.QMouseEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QMouseEvent { if h == nil { return nil } - return &QMouseEvent{h: h, QSinglePointEvent: UnsafeNewQSinglePointEvent(unsafe.Pointer(h))} + return &QMouseEvent{h: h, + QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQMouseEvent(h unsafe.Pointer) *QMouseEvent { - return newQMouseEvent((*C.QMouseEvent)(h)) +// UnsafeNewQMouseEvent constructs the type using only unsafe pointers. +func UnsafeNewQMouseEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QMouseEvent { + if h == nil { + return nil + } + + return &QMouseEvent{h: (*C.QMouseEvent)(h), + QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQMouseEvent constructs a new QMouseEvent object. func NewQMouseEvent(typeVal QEvent__Type, localPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - ret := C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent2 constructs a new QMouseEvent object. func NewQMouseEvent2(typeVal QEvent__Type, localPos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - ret := C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent3 constructs a new QMouseEvent object. func NewQMouseEvent3(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - ret := C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent4 constructs a new QMouseEvent object. func NewQMouseEvent4(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, source MouseEventSource) *QMouseEvent { - ret := C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source)) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent5 constructs a new QMouseEvent object. func NewQMouseEvent5(typeVal QEvent__Type, localPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, device *QPointingDevice) *QMouseEvent { - ret := C.QMouseEvent_new5((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer()) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new5((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent6 constructs a new QMouseEvent object. func NewQMouseEvent6(typeVal QEvent__Type, localPos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, device *QPointingDevice) *QMouseEvent { - ret := C.QMouseEvent_new6((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer()) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new6((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent7 constructs a new QMouseEvent object. func NewQMouseEvent7(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, device *QPointingDevice) *QMouseEvent { - ret := C.QMouseEvent_new7((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer()) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new7((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQMouseEvent8 constructs a new QMouseEvent object. func NewQMouseEvent8(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, source MouseEventSource, device *QPointingDevice) *QMouseEvent { - ret := C.QMouseEvent_new8((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), device.cPointer()) - return newQMouseEvent(ret) + var outptr_QMouseEvent *C.QMouseEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMouseEvent_new8((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QMouseEvent) Clone() *QMouseEvent { - return UnsafeNewQMouseEvent(unsafe.Pointer(C.QMouseEvent_Clone(this.h))) + return UnsafeNewQMouseEvent(unsafe.Pointer(C.QMouseEvent_Clone(this.h)), nil, nil, nil, nil) } func (this *QMouseEvent) Pos() *QPoint { @@ -638,9 +1079,96 @@ func (this *QMouseEvent) Flags() MouseEventFlag { return (MouseEventFlag)(C.QMouseEvent_Flags(this.h)) } +func (this *QMouseEvent) callVirtualBase_Clone() *QMouseEvent { + + return UnsafeNewQMouseEvent(unsafe.Pointer(C.QMouseEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QMouseEvent) OnClone(slot func(super func() *QMouseEvent) *QMouseEvent) { + C.QMouseEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEvent_Clone +func miqt_exec_callback_QMouseEvent_Clone(self *C.QMouseEvent, cb C.intptr_t) *C.QMouseEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMouseEvent) *QMouseEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMouseEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QMouseEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QMouseEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QMouseEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QMouseEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEvent_IsBeginEvent +func miqt_exec_callback_QMouseEvent_IsBeginEvent(self *C.QMouseEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMouseEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QMouseEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QMouseEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QMouseEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QMouseEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEvent_IsUpdateEvent +func miqt_exec_callback_QMouseEvent_IsUpdateEvent(self *C.QMouseEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMouseEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QMouseEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QMouseEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QMouseEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QMouseEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMouseEvent_IsEndEvent +func miqt_exec_callback_QMouseEvent_IsEndEvent(self *C.QMouseEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMouseEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMouseEvent) Delete() { - C.QMouseEvent_Delete(this.h) + C.QMouseEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -653,7 +1181,8 @@ func (this *QMouseEvent) GoGC() { } type QHoverEvent struct { - h *C.QHoverEvent + h *C.QHoverEvent + isSubclass bool *QSinglePointEvent } @@ -671,55 +1200,111 @@ func (this *QHoverEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHoverEvent(h *C.QHoverEvent) *QHoverEvent { +// newQHoverEvent constructs the type using only CGO pointers. +func newQHoverEvent(h *C.QHoverEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QHoverEvent { if h == nil { return nil } - return &QHoverEvent{h: h, QSinglePointEvent: UnsafeNewQSinglePointEvent(unsafe.Pointer(h))} + return &QHoverEvent{h: h, + QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQHoverEvent(h unsafe.Pointer) *QHoverEvent { - return newQHoverEvent((*C.QHoverEvent)(h)) +// UnsafeNewQHoverEvent constructs the type using only unsafe pointers. +func UnsafeNewQHoverEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QHoverEvent { + if h == nil { + return nil + } + + return &QHoverEvent{h: (*C.QHoverEvent)(h), + QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQHoverEvent constructs a new QHoverEvent object. func NewQHoverEvent(typeVal QEvent__Type, scenePos *QPointF, globalPos *QPointF, oldPos *QPointF) *QHoverEvent { - ret := C.QHoverEvent_new((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer()) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent2 constructs a new QHoverEvent object. func NewQHoverEvent2(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF) *QHoverEvent { - ret := C.QHoverEvent_new2((C.int)(typeVal), pos.cPointer(), oldPos.cPointer()) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new2((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent3 constructs a new QHoverEvent object. func NewQHoverEvent3(typeVal QEvent__Type, scenePos *QPointF, globalPos *QPointF, oldPos *QPointF, modifiers KeyboardModifier) *QHoverEvent { - ret := C.QHoverEvent_new3((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers)) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new3((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent4 constructs a new QHoverEvent object. func NewQHoverEvent4(typeVal QEvent__Type, scenePos *QPointF, globalPos *QPointF, oldPos *QPointF, modifiers KeyboardModifier, device *QPointingDevice) *QHoverEvent { - ret := C.QHoverEvent_new4((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer()) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new4((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent5 constructs a new QHoverEvent object. func NewQHoverEvent5(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF, modifiers KeyboardModifier) *QHoverEvent { - ret := C.QHoverEvent_new5((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers)) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new5((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQHoverEvent6 constructs a new QHoverEvent object. func NewQHoverEvent6(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF, modifiers KeyboardModifier, device *QPointingDevice) *QHoverEvent { - ret := C.QHoverEvent_new6((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer()) - return newQHoverEvent(ret) + var outptr_QHoverEvent *C.QHoverEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHoverEvent_new6((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QHoverEvent) Clone() *QHoverEvent { - return UnsafeNewQHoverEvent(unsafe.Pointer(C.QHoverEvent_Clone(this.h))) + return UnsafeNewQHoverEvent(unsafe.Pointer(C.QHoverEvent_Clone(this.h)), nil, nil, nil, nil) } func (this *QHoverEvent) Pos() *QPoint { @@ -754,70 +1339,190 @@ func (this *QHoverEvent) OldPosF() *QPointF { return _goptr } -// Delete this object from C++ memory. -func (this *QHoverEvent) Delete() { - C.QHoverEvent_Delete(this.h) -} +func (this *QHoverEvent) callVirtualBase_Clone() *QHoverEvent { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QHoverEvent) GoGC() { - runtime.SetFinalizer(this, func(this *QHoverEvent) { - this.Delete() - runtime.KeepAlive(this.h) - }) + return UnsafeNewQHoverEvent(unsafe.Pointer(C.QHoverEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil, nil) } - -type QWheelEvent struct { - h *C.QWheelEvent - *QSinglePointEvent +func (this *QHoverEvent) OnClone(slot func(super func() *QHoverEvent) *QHoverEvent) { + C.QHoverEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWheelEvent) cPointer() *C.QWheelEvent { - if this == nil { - return nil +//export miqt_exec_callback_QHoverEvent_Clone +func miqt_exec_callback_QHoverEvent_Clone(self *C.QHoverEvent, cb C.intptr_t) *C.QHoverEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QHoverEvent) *QHoverEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h -} -func (this *QWheelEvent) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} + virtualReturn := gofunc((&QHoverEvent{h: self}).callVirtualBase_Clone) -func newQWheelEvent(h *C.QWheelEvent) *QWheelEvent { - if h == nil { - return nil - } - return &QWheelEvent{h: h, QSinglePointEvent: UnsafeNewQSinglePointEvent(unsafe.Pointer(h))} -} + return virtualReturn.cPointer() -func UnsafeNewQWheelEvent(h unsafe.Pointer) *QWheelEvent { - return newQWheelEvent((*C.QWheelEvent)(h)) +} + +func (this *QHoverEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QHoverEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QHoverEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QHoverEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHoverEvent_IsUpdateEvent +func miqt_exec_callback_QHoverEvent_IsUpdateEvent(self *C.QHoverEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHoverEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QHoverEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QHoverEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QHoverEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QHoverEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHoverEvent_IsBeginEvent +func miqt_exec_callback_QHoverEvent_IsBeginEvent(self *C.QHoverEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHoverEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QHoverEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QHoverEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QHoverEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QHoverEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHoverEvent_IsEndEvent +func miqt_exec_callback_QHoverEvent_IsEndEvent(self *C.QHoverEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHoverEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QHoverEvent) Delete() { + C.QHoverEvent_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QHoverEvent) GoGC() { + runtime.SetFinalizer(this, func(this *QHoverEvent) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWheelEvent struct { + h *C.QWheelEvent + isSubclass bool + *QSinglePointEvent +} + +func (this *QWheelEvent) cPointer() *C.QWheelEvent { + if this == nil { + return nil + } + return this.h +} + +func (this *QWheelEvent) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWheelEvent constructs the type using only CGO pointers. +func newQWheelEvent(h *C.QWheelEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QWheelEvent { + if h == nil { + return nil + } + return &QWheelEvent{h: h, + QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +} + +// UnsafeNewQWheelEvent constructs the type using only unsafe pointers. +func UnsafeNewQWheelEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QWheelEvent { + if h == nil { + return nil + } + + return &QWheelEvent{h: (*C.QWheelEvent)(h), + QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQWheelEvent constructs a new QWheelEvent object. func NewQWheelEvent(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool) *QWheelEvent { - ret := C.QWheelEvent_new(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), &outptr_QWheelEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent2 constructs a new QWheelEvent object. func NewQWheelEvent2(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool, source MouseEventSource) *QWheelEvent { - ret := C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source)) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), &outptr_QWheelEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWheelEvent3 constructs a new QWheelEvent object. func NewQWheelEvent3(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool, source MouseEventSource, device *QPointingDevice) *QWheelEvent { - ret := C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), device.cPointer()) - return newQWheelEvent(ret) + var outptr_QWheelEvent *C.QWheelEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), device.cPointer(), &outptr_QWheelEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQWheelEvent(outptr_QWheelEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QWheelEvent) Clone() *QWheelEvent { - return UnsafeNewQWheelEvent(unsafe.Pointer(C.QWheelEvent_Clone(this.h))) + return UnsafeNewQWheelEvent(unsafe.Pointer(C.QWheelEvent_Clone(this.h)), nil, nil, nil, nil) } func (this *QWheelEvent) PixelDelta() *QPoint { @@ -866,9 +1571,96 @@ func (this *QWheelEvent) Source() MouseEventSource { return (MouseEventSource)(C.QWheelEvent_Source(this.h)) } +func (this *QWheelEvent) callVirtualBase_Clone() *QWheelEvent { + + return UnsafeNewQWheelEvent(unsafe.Pointer(C.QWheelEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QWheelEvent) OnClone(slot func(super func() *QWheelEvent) *QWheelEvent) { + C.QWheelEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWheelEvent_Clone +func miqt_exec_callback_QWheelEvent_Clone(self *C.QWheelEvent, cb C.intptr_t) *C.QWheelEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWheelEvent) *QWheelEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWheelEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QWheelEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QWheelEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QWheelEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QWheelEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWheelEvent_IsBeginEvent +func miqt_exec_callback_QWheelEvent_IsBeginEvent(self *C.QWheelEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWheelEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QWheelEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QWheelEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QWheelEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QWheelEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWheelEvent_IsUpdateEvent +func miqt_exec_callback_QWheelEvent_IsUpdateEvent(self *C.QWheelEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWheelEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QWheelEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QWheelEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QWheelEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QWheelEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWheelEvent_IsEndEvent +func miqt_exec_callback_QWheelEvent_IsEndEvent(self *C.QWheelEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWheelEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QWheelEvent) Delete() { - C.QWheelEvent_Delete(this.h) + C.QWheelEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -881,7 +1673,8 @@ func (this *QWheelEvent) GoGC() { } type QTabletEvent struct { - h *C.QTabletEvent + h *C.QTabletEvent + isSubclass bool *QSinglePointEvent } @@ -899,25 +1692,41 @@ func (this *QTabletEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTabletEvent(h *C.QTabletEvent) *QTabletEvent { +// newQTabletEvent constructs the type using only CGO pointers. +func newQTabletEvent(h *C.QTabletEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTabletEvent { if h == nil { return nil } - return &QTabletEvent{h: h, QSinglePointEvent: UnsafeNewQSinglePointEvent(unsafe.Pointer(h))} + return &QTabletEvent{h: h, + QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQTabletEvent(h unsafe.Pointer) *QTabletEvent { - return newQTabletEvent((*C.QTabletEvent)(h)) +// UnsafeNewQTabletEvent constructs the type using only unsafe pointers. +func UnsafeNewQTabletEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTabletEvent { + if h == nil { + return nil + } + + return &QTabletEvent{h: (*C.QTabletEvent)(h), + QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQTabletEvent constructs a new QTabletEvent object. func NewQTabletEvent(t QEvent__Type, device *QPointingDevice, pos *QPointF, globalPos *QPointF, pressure float64, xTilt float32, yTilt float32, tangentialPressure float32, rotation float64, z float32, keyState KeyboardModifier, button MouseButton, buttons MouseButton) *QTabletEvent { - ret := C.QTabletEvent_new((C.int)(t), device.cPointer(), pos.cPointer(), globalPos.cPointer(), (C.double)(pressure), (C.float)(xTilt), (C.float)(yTilt), (C.float)(tangentialPressure), (C.double)(rotation), (C.float)(z), (C.int)(keyState), (C.int)(button), (C.int)(buttons)) - return newQTabletEvent(ret) + var outptr_QTabletEvent *C.QTabletEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTabletEvent_new((C.int)(t), device.cPointer(), pos.cPointer(), globalPos.cPointer(), (C.double)(pressure), (C.float)(xTilt), (C.float)(yTilt), (C.float)(tangentialPressure), (C.double)(rotation), (C.float)(z), (C.int)(keyState), (C.int)(button), (C.int)(buttons), &outptr_QTabletEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTabletEvent(outptr_QTabletEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QTabletEvent) Clone() *QTabletEvent { - return UnsafeNewQTabletEvent(unsafe.Pointer(C.QTabletEvent_Clone(this.h))) + return UnsafeNewQTabletEvent(unsafe.Pointer(C.QTabletEvent_Clone(this.h)), nil, nil, nil, nil) } func (this *QTabletEvent) Pos() *QPoint { @@ -1000,9 +1809,96 @@ func (this *QTabletEvent) YTilt() float64 { return (float64)(C.QTabletEvent_YTilt(this.h)) } +func (this *QTabletEvent) callVirtualBase_Clone() *QTabletEvent { + + return UnsafeNewQTabletEvent(unsafe.Pointer(C.QTabletEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QTabletEvent) OnClone(slot func(super func() *QTabletEvent) *QTabletEvent) { + C.QTabletEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabletEvent_Clone +func miqt_exec_callback_QTabletEvent_Clone(self *C.QTabletEvent, cb C.intptr_t) *C.QTabletEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTabletEvent) *QTabletEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabletEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTabletEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QTabletEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QTabletEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QTabletEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabletEvent_IsBeginEvent +func miqt_exec_callback_QTabletEvent_IsBeginEvent(self *C.QTabletEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabletEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabletEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QTabletEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QTabletEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QTabletEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabletEvent_IsUpdateEvent +func miqt_exec_callback_QTabletEvent_IsUpdateEvent(self *C.QTabletEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabletEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabletEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QTabletEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QTabletEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QTabletEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabletEvent_IsEndEvent +func miqt_exec_callback_QTabletEvent_IsEndEvent(self *C.QTabletEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabletEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTabletEvent) Delete() { - C.QTabletEvent_Delete(this.h) + C.QTabletEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1015,7 +1911,8 @@ func (this *QTabletEvent) GoGC() { } type QNativeGestureEvent struct { - h *C.QNativeGestureEvent + h *C.QNativeGestureEvent + isSubclass bool *QSinglePointEvent } @@ -1033,37 +1930,69 @@ func (this *QNativeGestureEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNativeGestureEvent(h *C.QNativeGestureEvent) *QNativeGestureEvent { +// newQNativeGestureEvent constructs the type using only CGO pointers. +func newQNativeGestureEvent(h *C.QNativeGestureEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QNativeGestureEvent { if h == nil { return nil } - return &QNativeGestureEvent{h: h, QSinglePointEvent: UnsafeNewQSinglePointEvent(unsafe.Pointer(h))} + return &QNativeGestureEvent{h: h, + QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQNativeGestureEvent(h unsafe.Pointer) *QNativeGestureEvent { - return newQNativeGestureEvent((*C.QNativeGestureEvent)(h)) +// UnsafeNewQNativeGestureEvent constructs the type using only unsafe pointers. +func UnsafeNewQNativeGestureEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QNativeGestureEvent { + if h == nil { + return nil + } + + return &QNativeGestureEvent{h: (*C.QNativeGestureEvent)(h), + QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQNativeGestureEvent constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent(typeVal NativeGestureType, dev *QPointingDevice, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, value float64, sequenceId uint64, intArgument uint64) *QNativeGestureEvent { - ret := C.QNativeGestureEvent_new((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), (C.ulonglong)(sequenceId), (C.ulonglong)(intArgument)) - return newQNativeGestureEvent(ret) + var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QNativeGestureEvent_new((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), (C.ulonglong)(sequenceId), (C.ulonglong)(intArgument), &outptr_QNativeGestureEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQNativeGestureEvent2 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent2(typeVal NativeGestureType, dev *QPointingDevice, fingerCount int, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, value float64, delta *QPointF) *QNativeGestureEvent { - ret := C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer()) - return newQNativeGestureEvent(ret) + var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer(), &outptr_QNativeGestureEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQNativeGestureEvent3 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent3(typeVal NativeGestureType, dev *QPointingDevice, fingerCount int, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, value float64, delta *QPointF, sequenceId uint64) *QNativeGestureEvent { - ret := C.QNativeGestureEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer(), (C.ulonglong)(sequenceId)) - return newQNativeGestureEvent(ret) + var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QNativeGestureEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer(), (C.ulonglong)(sequenceId), &outptr_QNativeGestureEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QNativeGestureEvent) Clone() *QNativeGestureEvent { - return UnsafeNewQNativeGestureEvent(unsafe.Pointer(C.QNativeGestureEvent_Clone(this.h))) + return UnsafeNewQNativeGestureEvent(unsafe.Pointer(C.QNativeGestureEvent_Clone(this.h)), nil, nil, nil, nil) } func (this *QNativeGestureEvent) GestureType() NativeGestureType { @@ -1120,9 +2049,96 @@ func (this *QNativeGestureEvent) ScreenPos() *QPointF { return _goptr } +func (this *QNativeGestureEvent) callVirtualBase_Clone() *QNativeGestureEvent { + + return UnsafeNewQNativeGestureEvent(unsafe.Pointer(C.QNativeGestureEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QNativeGestureEvent) OnClone(slot func(super func() *QNativeGestureEvent) *QNativeGestureEvent) { + C.QNativeGestureEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNativeGestureEvent_Clone +func miqt_exec_callback_QNativeGestureEvent_Clone(self *C.QNativeGestureEvent, cb C.intptr_t) *C.QNativeGestureEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QNativeGestureEvent) *QNativeGestureEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNativeGestureEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QNativeGestureEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QNativeGestureEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QNativeGestureEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QNativeGestureEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNativeGestureEvent_IsBeginEvent +func miqt_exec_callback_QNativeGestureEvent_IsBeginEvent(self *C.QNativeGestureEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNativeGestureEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QNativeGestureEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QNativeGestureEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QNativeGestureEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QNativeGestureEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNativeGestureEvent_IsUpdateEvent +func miqt_exec_callback_QNativeGestureEvent_IsUpdateEvent(self *C.QNativeGestureEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNativeGestureEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QNativeGestureEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QNativeGestureEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QNativeGestureEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QNativeGestureEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNativeGestureEvent_IsEndEvent +func miqt_exec_callback_QNativeGestureEvent_IsEndEvent(self *C.QNativeGestureEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNativeGestureEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QNativeGestureEvent) Delete() { - C.QNativeGestureEvent_Delete(this.h) + C.QNativeGestureEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1135,7 +2151,8 @@ func (this *QNativeGestureEvent) GoGC() { } type QKeyEvent struct { - h *C.QKeyEvent + h *C.QKeyEvent + isSubclass bool *QInputEvent } @@ -1153,27 +2170,47 @@ func (this *QKeyEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQKeyEvent(h *C.QKeyEvent) *QKeyEvent { +// newQKeyEvent constructs the type using only CGO pointers. +func newQKeyEvent(h *C.QKeyEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QKeyEvent { if h == nil { return nil } - return &QKeyEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QKeyEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQKeyEvent(h unsafe.Pointer) *QKeyEvent { - return newQKeyEvent((*C.QKeyEvent)(h)) +// UnsafeNewQKeyEvent constructs the type using only unsafe pointers. +func UnsafeNewQKeyEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QKeyEvent { + if h == nil { + return nil + } + + return &QKeyEvent{h: (*C.QKeyEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQKeyEvent constructs a new QKeyEvent object. func NewQKeyEvent(typeVal QEvent__Type, key int, modifiers KeyboardModifier) *QKeyEvent { - ret := C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent2 constructs a new QKeyEvent object. func NewQKeyEvent2(typeVal QEvent__Type, key int, modifiers KeyboardModifier, nativeScanCode uint, nativeVirtualKey uint, nativeModifiers uint) *QKeyEvent { - ret := C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent3 constructs a new QKeyEvent object. @@ -1182,8 +2219,14 @@ func NewQKeyEvent3(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new3((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new3((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent4 constructs a new QKeyEvent object. @@ -1192,8 +2235,14 @@ func NewQKeyEvent4(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent5 constructs a new QKeyEvent object. @@ -1202,8 +2251,14 @@ func NewQKeyEvent5(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent6 constructs a new QKeyEvent object. @@ -1212,8 +2267,14 @@ func NewQKeyEvent6(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent7 constructs a new QKeyEvent object. @@ -1222,8 +2283,14 @@ func NewQKeyEvent7(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent8 constructs a new QKeyEvent object. @@ -1232,8 +2299,14 @@ func NewQKeyEvent8(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count)) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQKeyEvent9 constructs a new QKeyEvent object. @@ -1242,12 +2315,18 @@ func NewQKeyEvent9(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), device.cPointer()) - return newQKeyEvent(ret) + var outptr_QKeyEvent *C.QKeyEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), device.cPointer(), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QKeyEvent) Clone() *QKeyEvent { - return UnsafeNewQKeyEvent(unsafe.Pointer(C.QKeyEvent_Clone(this.h))) + return UnsafeNewQKeyEvent(unsafe.Pointer(C.QKeyEvent_Clone(this.h)), nil, nil) } func (this *QKeyEvent) Key() int { @@ -1296,9 +2375,53 @@ func (this *QKeyEvent) NativeModifiers() uint { return (uint)(C.QKeyEvent_NativeModifiers(this.h)) } +func (this *QKeyEvent) callVirtualBase_Clone() *QKeyEvent { + + return UnsafeNewQKeyEvent(unsafe.Pointer(C.QKeyEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QKeyEvent) OnClone(slot func(super func() *QKeyEvent) *QKeyEvent) { + C.QKeyEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeyEvent_Clone +func miqt_exec_callback_QKeyEvent_Clone(self *C.QKeyEvent, cb C.intptr_t) *C.QKeyEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QKeyEvent) *QKeyEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeyEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QKeyEvent) callVirtualBase_SetTimestamp(timestamp uint64) { + + C.QKeyEvent_virtualbase_SetTimestamp(unsafe.Pointer(this.h), (C.ulonglong)(timestamp)) + +} +func (this *QKeyEvent) OnSetTimestamp(slot func(super func(timestamp uint64), timestamp uint64)) { + C.QKeyEvent_override_virtual_SetTimestamp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeyEvent_SetTimestamp +func miqt_exec_callback_QKeyEvent_SetTimestamp(self *C.QKeyEvent, cb C.intptr_t, timestamp C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timestamp uint64), timestamp uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint64)(timestamp) + + gofunc((&QKeyEvent{h: self}).callVirtualBase_SetTimestamp, slotval1) + +} + // Delete this object from C++ memory. func (this *QKeyEvent) Delete() { - C.QKeyEvent_Delete(this.h) + C.QKeyEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1311,7 +2434,8 @@ func (this *QKeyEvent) GoGC() { } type QFocusEvent struct { - h *C.QFocusEvent + h *C.QFocusEvent + isSubclass bool *QEvent } @@ -1329,31 +2453,49 @@ func (this *QFocusEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFocusEvent(h *C.QFocusEvent) *QFocusEvent { +// newQFocusEvent constructs the type using only CGO pointers. +func newQFocusEvent(h *C.QFocusEvent, h_QEvent *C.QEvent) *QFocusEvent { if h == nil { return nil } - return &QFocusEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QFocusEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQFocusEvent(h unsafe.Pointer) *QFocusEvent { - return newQFocusEvent((*C.QFocusEvent)(h)) +// UnsafeNewQFocusEvent constructs the type using only unsafe pointers. +func UnsafeNewQFocusEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFocusEvent { + if h == nil { + return nil + } + + return &QFocusEvent{h: (*C.QFocusEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQFocusEvent constructs a new QFocusEvent object. func NewQFocusEvent(typeVal QEvent__Type) *QFocusEvent { - ret := C.QFocusEvent_new((C.int)(typeVal)) - return newQFocusEvent(ret) + var outptr_QFocusEvent *C.QFocusEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFocusEvent_new((C.int)(typeVal), &outptr_QFocusEvent, &outptr_QEvent) + ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQFocusEvent2 constructs a new QFocusEvent object. func NewQFocusEvent2(typeVal QEvent__Type, reason FocusReason) *QFocusEvent { - ret := C.QFocusEvent_new2((C.int)(typeVal), (C.int)(reason)) - return newQFocusEvent(ret) + var outptr_QFocusEvent *C.QFocusEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFocusEvent_new2((C.int)(typeVal), (C.int)(reason), &outptr_QFocusEvent, &outptr_QEvent) + ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QFocusEvent) Clone() *QFocusEvent { - return UnsafeNewQFocusEvent(unsafe.Pointer(C.QFocusEvent_Clone(this.h))) + return UnsafeNewQFocusEvent(unsafe.Pointer(C.QFocusEvent_Clone(this.h)), nil) } func (this *QFocusEvent) GotFocus() bool { @@ -1368,9 +2510,53 @@ func (this *QFocusEvent) Reason() FocusReason { return (FocusReason)(C.QFocusEvent_Reason(this.h)) } +func (this *QFocusEvent) callVirtualBase_Clone() *QFocusEvent { + + return UnsafeNewQFocusEvent(unsafe.Pointer(C.QFocusEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QFocusEvent) OnClone(slot func(super func() *QFocusEvent) *QFocusEvent) { + C.QFocusEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusEvent_Clone +func miqt_exec_callback_QFocusEvent_Clone(self *C.QFocusEvent, cb C.intptr_t) *C.QFocusEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QFocusEvent) *QFocusEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QFocusEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QFocusEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QFocusEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QFocusEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusEvent_SetAccepted +func miqt_exec_callback_QFocusEvent_SetAccepted(self *C.QFocusEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QFocusEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QFocusEvent) Delete() { - C.QFocusEvent_Delete(this.h) + C.QFocusEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1383,7 +2569,8 @@ func (this *QFocusEvent) GoGC() { } type QPaintEvent struct { - h *C.QPaintEvent + h *C.QPaintEvent + isSubclass bool *QEvent } @@ -1401,31 +2588,49 @@ func (this *QPaintEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPaintEvent(h *C.QPaintEvent) *QPaintEvent { +// newQPaintEvent constructs the type using only CGO pointers. +func newQPaintEvent(h *C.QPaintEvent, h_QEvent *C.QEvent) *QPaintEvent { if h == nil { return nil } - return &QPaintEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QPaintEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQPaintEvent(h unsafe.Pointer) *QPaintEvent { - return newQPaintEvent((*C.QPaintEvent)(h)) +// UnsafeNewQPaintEvent constructs the type using only unsafe pointers. +func UnsafeNewQPaintEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPaintEvent { + if h == nil { + return nil + } + + return &QPaintEvent{h: (*C.QPaintEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQPaintEvent constructs a new QPaintEvent object. func NewQPaintEvent(paintRegion *QRegion) *QPaintEvent { - ret := C.QPaintEvent_new(paintRegion.cPointer()) - return newQPaintEvent(ret) + var outptr_QPaintEvent *C.QPaintEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPaintEvent_new(paintRegion.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) + ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQPaintEvent2 constructs a new QPaintEvent object. func NewQPaintEvent2(paintRect *QRect) *QPaintEvent { - ret := C.QPaintEvent_new2(paintRect.cPointer()) - return newQPaintEvent(ret) + var outptr_QPaintEvent *C.QPaintEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPaintEvent_new2(paintRect.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) + ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QPaintEvent) Clone() *QPaintEvent { - return UnsafeNewQPaintEvent(unsafe.Pointer(C.QPaintEvent_Clone(this.h))) + return UnsafeNewQPaintEvent(unsafe.Pointer(C.QPaintEvent_Clone(this.h)), nil) } func (this *QPaintEvent) Rect() *QRect { @@ -1436,9 +2641,53 @@ func (this *QPaintEvent) Region() *QRegion { return UnsafeNewQRegion(unsafe.Pointer(C.QPaintEvent_Region(this.h))) } +func (this *QPaintEvent) callVirtualBase_Clone() *QPaintEvent { + + return UnsafeNewQPaintEvent(unsafe.Pointer(C.QPaintEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QPaintEvent) OnClone(slot func(super func() *QPaintEvent) *QPaintEvent) { + C.QPaintEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEvent_Clone +func miqt_exec_callback_QPaintEvent_Clone(self *C.QPaintEvent, cb C.intptr_t) *C.QPaintEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEvent) *QPaintEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPaintEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QPaintEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QPaintEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QPaintEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QPaintEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEvent_SetAccepted +func miqt_exec_callback_QPaintEvent_SetAccepted(self *C.QPaintEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QPaintEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QPaintEvent) Delete() { - C.QPaintEvent_Delete(this.h) + C.QPaintEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1451,7 +2700,8 @@ func (this *QPaintEvent) GoGC() { } type QMoveEvent struct { - h *C.QMoveEvent + h *C.QMoveEvent + isSubclass bool *QEvent } @@ -1469,25 +2719,38 @@ func (this *QMoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMoveEvent(h *C.QMoveEvent) *QMoveEvent { +// newQMoveEvent constructs the type using only CGO pointers. +func newQMoveEvent(h *C.QMoveEvent, h_QEvent *C.QEvent) *QMoveEvent { if h == nil { return nil } - return &QMoveEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QMoveEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQMoveEvent(h unsafe.Pointer) *QMoveEvent { - return newQMoveEvent((*C.QMoveEvent)(h)) +// UnsafeNewQMoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQMoveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QMoveEvent { + if h == nil { + return nil + } + + return &QMoveEvent{h: (*C.QMoveEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQMoveEvent constructs a new QMoveEvent object. func NewQMoveEvent(pos *QPoint, oldPos *QPoint) *QMoveEvent { - ret := C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer()) - return newQMoveEvent(ret) + var outptr_QMoveEvent *C.QMoveEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer(), &outptr_QMoveEvent, &outptr_QEvent) + ret := newQMoveEvent(outptr_QMoveEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QMoveEvent) Clone() *QMoveEvent { - return UnsafeNewQMoveEvent(unsafe.Pointer(C.QMoveEvent_Clone(this.h))) + return UnsafeNewQMoveEvent(unsafe.Pointer(C.QMoveEvent_Clone(this.h)), nil) } func (this *QMoveEvent) Pos() *QPoint { @@ -1498,9 +2761,53 @@ func (this *QMoveEvent) OldPos() *QPoint { return UnsafeNewQPoint(unsafe.Pointer(C.QMoveEvent_OldPos(this.h))) } +func (this *QMoveEvent) callVirtualBase_Clone() *QMoveEvent { + + return UnsafeNewQMoveEvent(unsafe.Pointer(C.QMoveEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QMoveEvent) OnClone(slot func(super func() *QMoveEvent) *QMoveEvent) { + C.QMoveEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMoveEvent_Clone +func miqt_exec_callback_QMoveEvent_Clone(self *C.QMoveEvent, cb C.intptr_t) *C.QMoveEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMoveEvent) *QMoveEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMoveEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QMoveEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QMoveEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QMoveEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QMoveEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMoveEvent_SetAccepted +func miqt_exec_callback_QMoveEvent_SetAccepted(self *C.QMoveEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QMoveEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QMoveEvent) Delete() { - C.QMoveEvent_Delete(this.h) + C.QMoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1513,7 +2820,8 @@ func (this *QMoveEvent) GoGC() { } type QExposeEvent struct { - h *C.QExposeEvent + h *C.QExposeEvent + isSubclass bool *QEvent } @@ -1531,34 +2839,91 @@ func (this *QExposeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQExposeEvent(h *C.QExposeEvent) *QExposeEvent { +// newQExposeEvent constructs the type using only CGO pointers. +func newQExposeEvent(h *C.QExposeEvent, h_QEvent *C.QEvent) *QExposeEvent { if h == nil { return nil } - return &QExposeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QExposeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQExposeEvent(h unsafe.Pointer) *QExposeEvent { - return newQExposeEvent((*C.QExposeEvent)(h)) +// UnsafeNewQExposeEvent constructs the type using only unsafe pointers. +func UnsafeNewQExposeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QExposeEvent { + if h == nil { + return nil + } + + return &QExposeEvent{h: (*C.QExposeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQExposeEvent constructs a new QExposeEvent object. func NewQExposeEvent(m_region *QRegion) *QExposeEvent { - ret := C.QExposeEvent_new(m_region.cPointer()) - return newQExposeEvent(ret) + var outptr_QExposeEvent *C.QExposeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QExposeEvent_new(m_region.cPointer(), &outptr_QExposeEvent, &outptr_QEvent) + ret := newQExposeEvent(outptr_QExposeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } -func (this *QExposeEvent) Clone() *QExposeEvent { - return UnsafeNewQExposeEvent(unsafe.Pointer(C.QExposeEvent_Clone(this.h))) -} +func (this *QExposeEvent) Clone() *QExposeEvent { + return UnsafeNewQExposeEvent(unsafe.Pointer(C.QExposeEvent_Clone(this.h)), nil) +} + +func (this *QExposeEvent) Region() *QRegion { + return UnsafeNewQRegion(unsafe.Pointer(C.QExposeEvent_Region(this.h))) +} + +func (this *QExposeEvent) callVirtualBase_Clone() *QExposeEvent { + + return UnsafeNewQExposeEvent(unsafe.Pointer(C.QExposeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QExposeEvent) OnClone(slot func(super func() *QExposeEvent) *QExposeEvent) { + C.QExposeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QExposeEvent_Clone +func miqt_exec_callback_QExposeEvent_Clone(self *C.QExposeEvent, cb C.intptr_t) *C.QExposeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QExposeEvent) *QExposeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QExposeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QExposeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QExposeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QExposeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QExposeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QExposeEvent_SetAccepted +func miqt_exec_callback_QExposeEvent_SetAccepted(self *C.QExposeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QExposeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) -func (this *QExposeEvent) Region() *QRegion { - return UnsafeNewQRegion(unsafe.Pointer(C.QExposeEvent_Region(this.h))) } // Delete this object from C++ memory. func (this *QExposeEvent) Delete() { - C.QExposeEvent_Delete(this.h) + C.QExposeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1571,7 +2936,8 @@ func (this *QExposeEvent) GoGC() { } type QPlatformSurfaceEvent struct { - h *C.QPlatformSurfaceEvent + h *C.QPlatformSurfaceEvent + isSubclass bool *QEvent } @@ -1589,34 +2955,91 @@ func (this *QPlatformSurfaceEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent) *QPlatformSurfaceEvent { +// newQPlatformSurfaceEvent constructs the type using only CGO pointers. +func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent, h_QEvent *C.QEvent) *QPlatformSurfaceEvent { if h == nil { return nil } - return &QPlatformSurfaceEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QPlatformSurfaceEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer) *QPlatformSurfaceEvent { - return newQPlatformSurfaceEvent((*C.QPlatformSurfaceEvent)(h)) +// UnsafeNewQPlatformSurfaceEvent constructs the type using only unsafe pointers. +func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPlatformSurfaceEvent { + if h == nil { + return nil + } + + return &QPlatformSurfaceEvent{h: (*C.QPlatformSurfaceEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQPlatformSurfaceEvent constructs a new QPlatformSurfaceEvent object. func NewQPlatformSurfaceEvent(surfaceEventType QPlatformSurfaceEvent__SurfaceEventType) *QPlatformSurfaceEvent { - ret := C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType)) - return newQPlatformSurfaceEvent(ret) + var outptr_QPlatformSurfaceEvent *C.QPlatformSurfaceEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType), &outptr_QPlatformSurfaceEvent, &outptr_QEvent) + ret := newQPlatformSurfaceEvent(outptr_QPlatformSurfaceEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QPlatformSurfaceEvent) Clone() *QPlatformSurfaceEvent { - return UnsafeNewQPlatformSurfaceEvent(unsafe.Pointer(C.QPlatformSurfaceEvent_Clone(this.h))) + return UnsafeNewQPlatformSurfaceEvent(unsafe.Pointer(C.QPlatformSurfaceEvent_Clone(this.h)), nil) } func (this *QPlatformSurfaceEvent) SurfaceEventType() QPlatformSurfaceEvent__SurfaceEventType { return (QPlatformSurfaceEvent__SurfaceEventType)(C.QPlatformSurfaceEvent_SurfaceEventType(this.h)) } +func (this *QPlatformSurfaceEvent) callVirtualBase_Clone() *QPlatformSurfaceEvent { + + return UnsafeNewQPlatformSurfaceEvent(unsafe.Pointer(C.QPlatformSurfaceEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QPlatformSurfaceEvent) OnClone(slot func(super func() *QPlatformSurfaceEvent) *QPlatformSurfaceEvent) { + C.QPlatformSurfaceEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlatformSurfaceEvent_Clone +func miqt_exec_callback_QPlatformSurfaceEvent_Clone(self *C.QPlatformSurfaceEvent, cb C.intptr_t) *C.QPlatformSurfaceEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPlatformSurfaceEvent) *QPlatformSurfaceEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlatformSurfaceEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QPlatformSurfaceEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QPlatformSurfaceEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QPlatformSurfaceEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QPlatformSurfaceEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlatformSurfaceEvent_SetAccepted +func miqt_exec_callback_QPlatformSurfaceEvent_SetAccepted(self *C.QPlatformSurfaceEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QPlatformSurfaceEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QPlatformSurfaceEvent) Delete() { - C.QPlatformSurfaceEvent_Delete(this.h) + C.QPlatformSurfaceEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1629,7 +3052,8 @@ func (this *QPlatformSurfaceEvent) GoGC() { } type QResizeEvent struct { - h *C.QResizeEvent + h *C.QResizeEvent + isSubclass bool *QEvent } @@ -1647,25 +3071,38 @@ func (this *QResizeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQResizeEvent(h *C.QResizeEvent) *QResizeEvent { +// newQResizeEvent constructs the type using only CGO pointers. +func newQResizeEvent(h *C.QResizeEvent, h_QEvent *C.QEvent) *QResizeEvent { if h == nil { return nil } - return &QResizeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QResizeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQResizeEvent(h unsafe.Pointer) *QResizeEvent { - return newQResizeEvent((*C.QResizeEvent)(h)) +// UnsafeNewQResizeEvent constructs the type using only unsafe pointers. +func UnsafeNewQResizeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QResizeEvent { + if h == nil { + return nil + } + + return &QResizeEvent{h: (*C.QResizeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQResizeEvent constructs a new QResizeEvent object. func NewQResizeEvent(size *QSize, oldSize *QSize) *QResizeEvent { - ret := C.QResizeEvent_new(size.cPointer(), oldSize.cPointer()) - return newQResizeEvent(ret) + var outptr_QResizeEvent *C.QResizeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QResizeEvent_new(size.cPointer(), oldSize.cPointer(), &outptr_QResizeEvent, &outptr_QEvent) + ret := newQResizeEvent(outptr_QResizeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QResizeEvent) Clone() *QResizeEvent { - return UnsafeNewQResizeEvent(unsafe.Pointer(C.QResizeEvent_Clone(this.h))) + return UnsafeNewQResizeEvent(unsafe.Pointer(C.QResizeEvent_Clone(this.h)), nil) } func (this *QResizeEvent) Size() *QSize { @@ -1676,9 +3113,53 @@ func (this *QResizeEvent) OldSize() *QSize { return UnsafeNewQSize(unsafe.Pointer(C.QResizeEvent_OldSize(this.h))) } +func (this *QResizeEvent) callVirtualBase_Clone() *QResizeEvent { + + return UnsafeNewQResizeEvent(unsafe.Pointer(C.QResizeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QResizeEvent) OnClone(slot func(super func() *QResizeEvent) *QResizeEvent) { + C.QResizeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QResizeEvent_Clone +func miqt_exec_callback_QResizeEvent_Clone(self *C.QResizeEvent, cb C.intptr_t) *C.QResizeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QResizeEvent) *QResizeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QResizeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QResizeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QResizeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QResizeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QResizeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QResizeEvent_SetAccepted +func miqt_exec_callback_QResizeEvent_SetAccepted(self *C.QResizeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QResizeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QResizeEvent) Delete() { - C.QResizeEvent_Delete(this.h) + C.QResizeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1691,7 +3172,8 @@ func (this *QResizeEvent) GoGC() { } type QCloseEvent struct { - h *C.QCloseEvent + h *C.QCloseEvent + isSubclass bool *QEvent } @@ -1709,30 +3191,87 @@ func (this *QCloseEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCloseEvent(h *C.QCloseEvent) *QCloseEvent { +// newQCloseEvent constructs the type using only CGO pointers. +func newQCloseEvent(h *C.QCloseEvent, h_QEvent *C.QEvent) *QCloseEvent { if h == nil { return nil } - return &QCloseEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QCloseEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQCloseEvent(h unsafe.Pointer) *QCloseEvent { - return newQCloseEvent((*C.QCloseEvent)(h)) +// UnsafeNewQCloseEvent constructs the type using only unsafe pointers. +func UnsafeNewQCloseEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QCloseEvent { + if h == nil { + return nil + } + + return &QCloseEvent{h: (*C.QCloseEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQCloseEvent constructs a new QCloseEvent object. func NewQCloseEvent() *QCloseEvent { - ret := C.QCloseEvent_new() - return newQCloseEvent(ret) + var outptr_QCloseEvent *C.QCloseEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QCloseEvent_new(&outptr_QCloseEvent, &outptr_QEvent) + ret := newQCloseEvent(outptr_QCloseEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QCloseEvent) Clone() *QCloseEvent { - return UnsafeNewQCloseEvent(unsafe.Pointer(C.QCloseEvent_Clone(this.h))) + return UnsafeNewQCloseEvent(unsafe.Pointer(C.QCloseEvent_Clone(this.h)), nil) +} + +func (this *QCloseEvent) callVirtualBase_Clone() *QCloseEvent { + + return UnsafeNewQCloseEvent(unsafe.Pointer(C.QCloseEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QCloseEvent) OnClone(slot func(super func() *QCloseEvent) *QCloseEvent) { + C.QCloseEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCloseEvent_Clone +func miqt_exec_callback_QCloseEvent_Clone(self *C.QCloseEvent, cb C.intptr_t) *C.QCloseEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QCloseEvent) *QCloseEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QCloseEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QCloseEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QCloseEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QCloseEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QCloseEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCloseEvent_SetAccepted +func miqt_exec_callback_QCloseEvent_SetAccepted(self *C.QCloseEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QCloseEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QCloseEvent) Delete() { - C.QCloseEvent_Delete(this.h) + C.QCloseEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1745,7 +3284,8 @@ func (this *QCloseEvent) GoGC() { } type QIconDragEvent struct { - h *C.QIconDragEvent + h *C.QIconDragEvent + isSubclass bool *QEvent } @@ -1763,30 +3303,87 @@ func (this *QIconDragEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIconDragEvent(h *C.QIconDragEvent) *QIconDragEvent { +// newQIconDragEvent constructs the type using only CGO pointers. +func newQIconDragEvent(h *C.QIconDragEvent, h_QEvent *C.QEvent) *QIconDragEvent { if h == nil { return nil } - return &QIconDragEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QIconDragEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQIconDragEvent(h unsafe.Pointer) *QIconDragEvent { - return newQIconDragEvent((*C.QIconDragEvent)(h)) +// UnsafeNewQIconDragEvent constructs the type using only unsafe pointers. +func UnsafeNewQIconDragEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QIconDragEvent { + if h == nil { + return nil + } + + return &QIconDragEvent{h: (*C.QIconDragEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQIconDragEvent constructs a new QIconDragEvent object. func NewQIconDragEvent() *QIconDragEvent { - ret := C.QIconDragEvent_new() - return newQIconDragEvent(ret) + var outptr_QIconDragEvent *C.QIconDragEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QIconDragEvent_new(&outptr_QIconDragEvent, &outptr_QEvent) + ret := newQIconDragEvent(outptr_QIconDragEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QIconDragEvent) Clone() *QIconDragEvent { - return UnsafeNewQIconDragEvent(unsafe.Pointer(C.QIconDragEvent_Clone(this.h))) + return UnsafeNewQIconDragEvent(unsafe.Pointer(C.QIconDragEvent_Clone(this.h)), nil) +} + +func (this *QIconDragEvent) callVirtualBase_Clone() *QIconDragEvent { + + return UnsafeNewQIconDragEvent(unsafe.Pointer(C.QIconDragEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QIconDragEvent) OnClone(slot func(super func() *QIconDragEvent) *QIconDragEvent) { + C.QIconDragEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconDragEvent_Clone +func miqt_exec_callback_QIconDragEvent_Clone(self *C.QIconDragEvent, cb C.intptr_t) *C.QIconDragEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QIconDragEvent) *QIconDragEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIconDragEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QIconDragEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QIconDragEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QIconDragEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QIconDragEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconDragEvent_SetAccepted +func miqt_exec_callback_QIconDragEvent_SetAccepted(self *C.QIconDragEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QIconDragEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QIconDragEvent) Delete() { - C.QIconDragEvent_Delete(this.h) + C.QIconDragEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1799,7 +3396,8 @@ func (this *QIconDragEvent) GoGC() { } type QShowEvent struct { - h *C.QShowEvent + h *C.QShowEvent + isSubclass bool *QEvent } @@ -1817,30 +3415,87 @@ func (this *QShowEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQShowEvent(h *C.QShowEvent) *QShowEvent { +// newQShowEvent constructs the type using only CGO pointers. +func newQShowEvent(h *C.QShowEvent, h_QEvent *C.QEvent) *QShowEvent { if h == nil { return nil } - return &QShowEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QShowEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQShowEvent(h unsafe.Pointer) *QShowEvent { - return newQShowEvent((*C.QShowEvent)(h)) +// UnsafeNewQShowEvent constructs the type using only unsafe pointers. +func UnsafeNewQShowEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShowEvent { + if h == nil { + return nil + } + + return &QShowEvent{h: (*C.QShowEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQShowEvent constructs a new QShowEvent object. func NewQShowEvent() *QShowEvent { - ret := C.QShowEvent_new() - return newQShowEvent(ret) + var outptr_QShowEvent *C.QShowEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShowEvent_new(&outptr_QShowEvent, &outptr_QEvent) + ret := newQShowEvent(outptr_QShowEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QShowEvent) Clone() *QShowEvent { - return UnsafeNewQShowEvent(unsafe.Pointer(C.QShowEvent_Clone(this.h))) + return UnsafeNewQShowEvent(unsafe.Pointer(C.QShowEvent_Clone(this.h)), nil) +} + +func (this *QShowEvent) callVirtualBase_Clone() *QShowEvent { + + return UnsafeNewQShowEvent(unsafe.Pointer(C.QShowEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QShowEvent) OnClone(slot func(super func() *QShowEvent) *QShowEvent) { + C.QShowEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShowEvent_Clone +func miqt_exec_callback_QShowEvent_Clone(self *C.QShowEvent, cb C.intptr_t) *C.QShowEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QShowEvent) *QShowEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QShowEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QShowEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QShowEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QShowEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QShowEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShowEvent_SetAccepted +func miqt_exec_callback_QShowEvent_SetAccepted(self *C.QShowEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QShowEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QShowEvent) Delete() { - C.QShowEvent_Delete(this.h) + C.QShowEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1853,7 +3508,8 @@ func (this *QShowEvent) GoGC() { } type QHideEvent struct { - h *C.QHideEvent + h *C.QHideEvent + isSubclass bool *QEvent } @@ -1871,30 +3527,87 @@ func (this *QHideEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHideEvent(h *C.QHideEvent) *QHideEvent { +// newQHideEvent constructs the type using only CGO pointers. +func newQHideEvent(h *C.QHideEvent, h_QEvent *C.QEvent) *QHideEvent { if h == nil { return nil } - return &QHideEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QHideEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQHideEvent(h unsafe.Pointer) *QHideEvent { - return newQHideEvent((*C.QHideEvent)(h)) +// UnsafeNewQHideEvent constructs the type using only unsafe pointers. +func UnsafeNewQHideEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHideEvent { + if h == nil { + return nil + } + + return &QHideEvent{h: (*C.QHideEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQHideEvent constructs a new QHideEvent object. func NewQHideEvent() *QHideEvent { - ret := C.QHideEvent_new() - return newQHideEvent(ret) + var outptr_QHideEvent *C.QHideEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHideEvent_new(&outptr_QHideEvent, &outptr_QEvent) + ret := newQHideEvent(outptr_QHideEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QHideEvent) Clone() *QHideEvent { - return UnsafeNewQHideEvent(unsafe.Pointer(C.QHideEvent_Clone(this.h))) + return UnsafeNewQHideEvent(unsafe.Pointer(C.QHideEvent_Clone(this.h)), nil) +} + +func (this *QHideEvent) callVirtualBase_Clone() *QHideEvent { + + return UnsafeNewQHideEvent(unsafe.Pointer(C.QHideEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QHideEvent) OnClone(slot func(super func() *QHideEvent) *QHideEvent) { + C.QHideEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHideEvent_Clone +func miqt_exec_callback_QHideEvent_Clone(self *C.QHideEvent, cb C.intptr_t) *C.QHideEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QHideEvent) *QHideEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHideEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QHideEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QHideEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QHideEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QHideEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHideEvent_SetAccepted +func miqt_exec_callback_QHideEvent_SetAccepted(self *C.QHideEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QHideEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QHideEvent) Delete() { - C.QHideEvent_Delete(this.h) + C.QHideEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1907,7 +3620,8 @@ func (this *QHideEvent) GoGC() { } type QContextMenuEvent struct { - h *C.QContextMenuEvent + h *C.QContextMenuEvent + isSubclass bool *QInputEvent } @@ -1925,37 +3639,63 @@ func (this *QContextMenuEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQContextMenuEvent(h *C.QContextMenuEvent) *QContextMenuEvent { +// newQContextMenuEvent constructs the type using only CGO pointers. +func newQContextMenuEvent(h *C.QContextMenuEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QContextMenuEvent { if h == nil { return nil } - return &QContextMenuEvent{h: h, QInputEvent: UnsafeNewQInputEvent(unsafe.Pointer(h))} + return &QContextMenuEvent{h: h, + QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} } -func UnsafeNewQContextMenuEvent(h unsafe.Pointer) *QContextMenuEvent { - return newQContextMenuEvent((*C.QContextMenuEvent)(h)) +// UnsafeNewQContextMenuEvent constructs the type using only unsafe pointers. +func UnsafeNewQContextMenuEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QContextMenuEvent { + if h == nil { + return nil + } + + return &QContextMenuEvent{h: (*C.QContextMenuEvent)(h), + QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} } // NewQContextMenuEvent constructs a new QContextMenuEvent object. func NewQContextMenuEvent(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint) *QContextMenuEvent { - ret := C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer()) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQContextMenuEvent2 constructs a new QContextMenuEvent object. func NewQContextMenuEvent2(reason QContextMenuEvent__Reason, pos *QPoint) *QContextMenuEvent { - ret := C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer()) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQContextMenuEvent3 constructs a new QContextMenuEvent object. func NewQContextMenuEvent3(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint, modifiers KeyboardModifier) *QContextMenuEvent { - ret := C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers)) - return newQContextMenuEvent(ret) + var outptr_QContextMenuEvent *C.QContextMenuEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QContextMenuEvent) Clone() *QContextMenuEvent { - return UnsafeNewQContextMenuEvent(unsafe.Pointer(C.QContextMenuEvent_Clone(this.h))) + return UnsafeNewQContextMenuEvent(unsafe.Pointer(C.QContextMenuEvent_Clone(this.h)), nil, nil) } func (this *QContextMenuEvent) X() int { @@ -1986,9 +3726,53 @@ func (this *QContextMenuEvent) Reason() QContextMenuEvent__Reason { return (QContextMenuEvent__Reason)(C.QContextMenuEvent_Reason(this.h)) } +func (this *QContextMenuEvent) callVirtualBase_Clone() *QContextMenuEvent { + + return UnsafeNewQContextMenuEvent(unsafe.Pointer(C.QContextMenuEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QContextMenuEvent) OnClone(slot func(super func() *QContextMenuEvent) *QContextMenuEvent) { + C.QContextMenuEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QContextMenuEvent_Clone +func miqt_exec_callback_QContextMenuEvent_Clone(self *C.QContextMenuEvent, cb C.intptr_t) *C.QContextMenuEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QContextMenuEvent) *QContextMenuEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QContextMenuEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QContextMenuEvent) callVirtualBase_SetTimestamp(timestamp uint64) { + + C.QContextMenuEvent_virtualbase_SetTimestamp(unsafe.Pointer(this.h), (C.ulonglong)(timestamp)) + +} +func (this *QContextMenuEvent) OnSetTimestamp(slot func(super func(timestamp uint64), timestamp uint64)) { + C.QContextMenuEvent_override_virtual_SetTimestamp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QContextMenuEvent_SetTimestamp +func miqt_exec_callback_QContextMenuEvent_SetTimestamp(self *C.QContextMenuEvent, cb C.intptr_t, timestamp C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timestamp uint64), timestamp uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint64)(timestamp) + + gofunc((&QContextMenuEvent{h: self}).callVirtualBase_SetTimestamp, slotval1) + +} + // Delete this object from C++ memory. func (this *QContextMenuEvent) Delete() { - C.QContextMenuEvent_Delete(this.h) + C.QContextMenuEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2001,7 +3785,8 @@ func (this *QContextMenuEvent) GoGC() { } type QInputMethodEvent struct { - h *C.QInputMethodEvent + h *C.QInputMethodEvent + isSubclass bool *QEvent } @@ -2019,21 +3804,34 @@ func (this *QInputMethodEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputMethodEvent(h *C.QInputMethodEvent) *QInputMethodEvent { +// newQInputMethodEvent constructs the type using only CGO pointers. +func newQInputMethodEvent(h *C.QInputMethodEvent, h_QEvent *C.QEvent) *QInputMethodEvent { if h == nil { return nil } - return &QInputMethodEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QInputMethodEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQInputMethodEvent(h unsafe.Pointer) *QInputMethodEvent { - return newQInputMethodEvent((*C.QInputMethodEvent)(h)) +// UnsafeNewQInputMethodEvent constructs the type using only unsafe pointers. +func UnsafeNewQInputMethodEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodEvent { + if h == nil { + return nil + } + + return &QInputMethodEvent{h: (*C.QInputMethodEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQInputMethodEvent constructs a new QInputMethodEvent object. func NewQInputMethodEvent() *QInputMethodEvent { - ret := C.QInputMethodEvent_new() - return newQInputMethodEvent(ret) + var outptr_QInputMethodEvent *C.QInputMethodEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodEvent_new(&outptr_QInputMethodEvent, &outptr_QEvent) + ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQInputMethodEvent2 constructs a new QInputMethodEvent object. @@ -2048,12 +3846,17 @@ func NewQInputMethodEvent2(preeditText string, attributes []QInputMethodEvent__A attributes_CArray[i] = attributes[i].cPointer() } attributes_ma := C.struct_miqt_array{len: C.size_t(len(attributes)), data: unsafe.Pointer(attributes_CArray)} - ret := C.QInputMethodEvent_new2(preeditText_ms, attributes_ma) - return newQInputMethodEvent(ret) + var outptr_QInputMethodEvent *C.QInputMethodEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodEvent_new2(preeditText_ms, attributes_ma, &outptr_QInputMethodEvent, &outptr_QEvent) + ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QInputMethodEvent) Clone() *QInputMethodEvent { - return UnsafeNewQInputMethodEvent(unsafe.Pointer(C.QInputMethodEvent_Clone(this.h))) + return UnsafeNewQInputMethodEvent(unsafe.Pointer(C.QInputMethodEvent_Clone(this.h)), nil) } func (this *QInputMethodEvent) SetCommitString(commitString string) { @@ -2115,9 +3918,53 @@ func (this *QInputMethodEvent) SetCommitString3(commitString string, replaceFrom C.QInputMethodEvent_SetCommitString3(this.h, commitString_ms, (C.int)(replaceFrom), (C.int)(replaceLength)) } +func (this *QInputMethodEvent) callVirtualBase_Clone() *QInputMethodEvent { + + return UnsafeNewQInputMethodEvent(unsafe.Pointer(C.QInputMethodEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QInputMethodEvent) OnClone(slot func(super func() *QInputMethodEvent) *QInputMethodEvent) { + C.QInputMethodEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputMethodEvent_Clone +func miqt_exec_callback_QInputMethodEvent_Clone(self *C.QInputMethodEvent, cb C.intptr_t) *C.QInputMethodEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QInputMethodEvent) *QInputMethodEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputMethodEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QInputMethodEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QInputMethodEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QInputMethodEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QInputMethodEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputMethodEvent_SetAccepted +func miqt_exec_callback_QInputMethodEvent_SetAccepted(self *C.QInputMethodEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QInputMethodEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QInputMethodEvent) Delete() { - C.QInputMethodEvent_Delete(this.h) + C.QInputMethodEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2130,7 +3977,8 @@ func (this *QInputMethodEvent) GoGC() { } type QInputMethodQueryEvent struct { - h *C.QInputMethodQueryEvent + h *C.QInputMethodQueryEvent + isSubclass bool *QEvent } @@ -2148,45 +3996,102 @@ func (this *QInputMethodQueryEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent) *QInputMethodQueryEvent { +// newQInputMethodQueryEvent constructs the type using only CGO pointers. +func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent, h_QEvent *C.QEvent) *QInputMethodQueryEvent { if h == nil { return nil } - return &QInputMethodQueryEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QInputMethodQueryEvent{h: h, + QEvent: newQEvent(h_QEvent)} +} + +// UnsafeNewQInputMethodQueryEvent constructs the type using only unsafe pointers. +func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodQueryEvent { + if h == nil { + return nil + } + + return &QInputMethodQueryEvent{h: (*C.QInputMethodQueryEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} +} + +// NewQInputMethodQueryEvent constructs a new QInputMethodQueryEvent object. +func NewQInputMethodQueryEvent(queries InputMethodQuery) *QInputMethodQueryEvent { + var outptr_QInputMethodQueryEvent *C.QInputMethodQueryEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QInputMethodQueryEvent_new((C.int)(queries), &outptr_QInputMethodQueryEvent, &outptr_QEvent) + ret := newQInputMethodQueryEvent(outptr_QInputMethodQueryEvent, outptr_QEvent) + ret.isSubclass = true + return ret +} + +func (this *QInputMethodQueryEvent) Clone() *QInputMethodQueryEvent { + return UnsafeNewQInputMethodQueryEvent(unsafe.Pointer(C.QInputMethodQueryEvent_Clone(this.h)), nil) +} + +func (this *QInputMethodQueryEvent) Queries() InputMethodQuery { + return (InputMethodQuery)(C.QInputMethodQueryEvent_Queries(this.h)) +} + +func (this *QInputMethodQueryEvent) SetValue(query InputMethodQuery, value *QVariant) { + C.QInputMethodQueryEvent_SetValue(this.h, (C.int)(query), value.cPointer()) +} + +func (this *QInputMethodQueryEvent) Value(query InputMethodQuery) *QVariant { + _ret := C.QInputMethodQueryEvent_Value(this.h, (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QInputMethodQueryEvent) callVirtualBase_Clone() *QInputMethodQueryEvent { + + return UnsafeNewQInputMethodQueryEvent(unsafe.Pointer(C.QInputMethodQueryEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QInputMethodQueryEvent) OnClone(slot func(super func() *QInputMethodQueryEvent) *QInputMethodQueryEvent) { + C.QInputMethodQueryEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputMethodQueryEvent_Clone +func miqt_exec_callback_QInputMethodQueryEvent_Clone(self *C.QInputMethodQueryEvent, cb C.intptr_t) *C.QInputMethodQueryEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QInputMethodQueryEvent) *QInputMethodQueryEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputMethodQueryEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + } -func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer) *QInputMethodQueryEvent { - return newQInputMethodQueryEvent((*C.QInputMethodQueryEvent)(h)) -} +func (this *QInputMethodQueryEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QInputMethodQueryEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) -// NewQInputMethodQueryEvent constructs a new QInputMethodQueryEvent object. -func NewQInputMethodQueryEvent(queries InputMethodQuery) *QInputMethodQueryEvent { - ret := C.QInputMethodQueryEvent_new((C.int)(queries)) - return newQInputMethodQueryEvent(ret) } - -func (this *QInputMethodQueryEvent) Clone() *QInputMethodQueryEvent { - return UnsafeNewQInputMethodQueryEvent(unsafe.Pointer(C.QInputMethodQueryEvent_Clone(this.h))) +func (this *QInputMethodQueryEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QInputMethodQueryEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QInputMethodQueryEvent) Queries() InputMethodQuery { - return (InputMethodQuery)(C.QInputMethodQueryEvent_Queries(this.h)) -} +//export miqt_exec_callback_QInputMethodQueryEvent_SetAccepted +func miqt_exec_callback_QInputMethodQueryEvent_SetAccepted(self *C.QInputMethodQueryEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QInputMethodQueryEvent) SetValue(query InputMethodQuery, value *QVariant) { - C.QInputMethodQueryEvent_SetValue(this.h, (C.int)(query), value.cPointer()) -} + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QInputMethodQueryEvent{h: self}).callVirtualBase_SetAccepted, slotval1) -func (this *QInputMethodQueryEvent) Value(query InputMethodQuery) *QVariant { - _ret := C.QInputMethodQueryEvent_Value(this.h, (C.int)(query)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } // Delete this object from C++ memory. func (this *QInputMethodQueryEvent) Delete() { - C.QInputMethodQueryEvent_Delete(this.h) + C.QInputMethodQueryEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2199,7 +4104,8 @@ func (this *QInputMethodQueryEvent) GoGC() { } type QDropEvent struct { - h *C.QDropEvent + h *C.QDropEvent + isSubclass bool *QEvent } @@ -2217,31 +4123,49 @@ func (this *QDropEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDropEvent(h *C.QDropEvent) *QDropEvent { +// newQDropEvent constructs the type using only CGO pointers. +func newQDropEvent(h *C.QDropEvent, h_QEvent *C.QEvent) *QDropEvent { if h == nil { return nil } - return &QDropEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QDropEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQDropEvent(h unsafe.Pointer) *QDropEvent { - return newQDropEvent((*C.QDropEvent)(h)) +// UnsafeNewQDropEvent constructs the type using only unsafe pointers. +func UnsafeNewQDropEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDropEvent { + if h == nil { + return nil + } + + return &QDropEvent{h: (*C.QDropEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQDropEvent constructs a new QDropEvent object. func NewQDropEvent(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDropEvent { - ret := C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers)) - return newQDropEvent(ret) + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDropEvent, &outptr_QEvent) + ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDropEvent2 constructs a new QDropEvent object. func NewQDropEvent2(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDropEvent { - ret := C.QDropEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal)) - return newQDropEvent(ret) + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDropEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDropEvent, &outptr_QEvent) + ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDropEvent) Clone() *QDropEvent { - return UnsafeNewQDropEvent(unsafe.Pointer(C.QDropEvent_Clone(this.h))) + return UnsafeNewQDropEvent(unsafe.Pointer(C.QDropEvent_Clone(this.h)), nil) } func (this *QDropEvent) Pos() *QPoint { @@ -2306,12 +4230,56 @@ func (this *QDropEvent) Source() *QObject { } func (this *QDropEvent) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QDropEvent_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QDropEvent_MimeData(this.h)), nil) +} + +func (this *QDropEvent) callVirtualBase_Clone() *QDropEvent { + + return UnsafeNewQDropEvent(unsafe.Pointer(C.QDropEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QDropEvent) OnClone(slot func(super func() *QDropEvent) *QDropEvent) { + C.QDropEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDropEvent_Clone +func miqt_exec_callback_QDropEvent_Clone(self *C.QDropEvent, cb C.intptr_t) *C.QDropEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QDropEvent) *QDropEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDropEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QDropEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QDropEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QDropEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QDropEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDropEvent_SetAccepted +func miqt_exec_callback_QDropEvent_SetAccepted(self *C.QDropEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QDropEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QDropEvent) Delete() { - C.QDropEvent_Delete(this.h) + C.QDropEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2324,7 +4292,8 @@ func (this *QDropEvent) GoGC() { } type QDragMoveEvent struct { - h *C.QDragMoveEvent + h *C.QDragMoveEvent + isSubclass bool *QDropEvent } @@ -2342,31 +4311,51 @@ func (this *QDragMoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDragMoveEvent(h *C.QDragMoveEvent) *QDragMoveEvent { +// newQDragMoveEvent constructs the type using only CGO pointers. +func newQDragMoveEvent(h *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragMoveEvent { if h == nil { return nil } - return &QDragMoveEvent{h: h, QDropEvent: UnsafeNewQDropEvent(unsafe.Pointer(h))} + return &QDragMoveEvent{h: h, + QDropEvent: newQDropEvent(h_QDropEvent, h_QEvent)} } -func UnsafeNewQDragMoveEvent(h unsafe.Pointer) *QDragMoveEvent { - return newQDragMoveEvent((*C.QDragMoveEvent)(h)) +// UnsafeNewQDragMoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQDragMoveEvent(h unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragMoveEvent { + if h == nil { + return nil + } + + return &QDragMoveEvent{h: (*C.QDragMoveEvent)(h), + QDropEvent: UnsafeNewQDropEvent(h_QDropEvent, h_QEvent)} } // NewQDragMoveEvent constructs a new QDragMoveEvent object. func NewQDragMoveEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragMoveEvent { - ret := C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers)) - return newQDragMoveEvent(ret) + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQDragMoveEvent2 constructs a new QDragMoveEvent object. func NewQDragMoveEvent2(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDragMoveEvent { - ret := C.QDragMoveEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal)) - return newQDragMoveEvent(ret) + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragMoveEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDragMoveEvent) Clone() *QDragMoveEvent { - return UnsafeNewQDragMoveEvent(unsafe.Pointer(C.QDragMoveEvent_Clone(this.h))) + return UnsafeNewQDragMoveEvent(unsafe.Pointer(C.QDragMoveEvent_Clone(this.h)), nil, nil) } func (this *QDragMoveEvent) AnswerRect() *QRect { @@ -2392,9 +4381,30 @@ func (this *QDragMoveEvent) IgnoreWithQRect(r *QRect) { C.QDragMoveEvent_IgnoreWithQRect(this.h, r.cPointer()) } +func (this *QDragMoveEvent) callVirtualBase_Clone() *QDragMoveEvent { + + return UnsafeNewQDragMoveEvent(unsafe.Pointer(C.QDragMoveEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QDragMoveEvent) OnClone(slot func(super func() *QDragMoveEvent) *QDragMoveEvent) { + C.QDragMoveEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDragMoveEvent_Clone +func miqt_exec_callback_QDragMoveEvent_Clone(self *C.QDragMoveEvent, cb C.intptr_t) *C.QDragMoveEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QDragMoveEvent) *QDragMoveEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDragMoveEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QDragMoveEvent) Delete() { - C.QDragMoveEvent_Delete(this.h) + C.QDragMoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2407,7 +4417,8 @@ func (this *QDragMoveEvent) GoGC() { } type QDragEnterEvent struct { - h *C.QDragEnterEvent + h *C.QDragEnterEvent + isSubclass bool *QDragMoveEvent } @@ -2425,30 +4436,66 @@ func (this *QDragEnterEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDragEnterEvent(h *C.QDragEnterEvent) *QDragEnterEvent { +// newQDragEnterEvent constructs the type using only CGO pointers. +func newQDragEnterEvent(h *C.QDragEnterEvent, h_QDragMoveEvent *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragEnterEvent { if h == nil { return nil } - return &QDragEnterEvent{h: h, QDragMoveEvent: UnsafeNewQDragMoveEvent(unsafe.Pointer(h))} + return &QDragEnterEvent{h: h, + QDragMoveEvent: newQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} } -func UnsafeNewQDragEnterEvent(h unsafe.Pointer) *QDragEnterEvent { - return newQDragEnterEvent((*C.QDragEnterEvent)(h)) +// UnsafeNewQDragEnterEvent constructs the type using only unsafe pointers. +func UnsafeNewQDragEnterEvent(h unsafe.Pointer, h_QDragMoveEvent unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragEnterEvent { + if h == nil { + return nil + } + + return &QDragEnterEvent{h: (*C.QDragEnterEvent)(h), + QDragMoveEvent: UnsafeNewQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} } // NewQDragEnterEvent constructs a new QDragEnterEvent object. func NewQDragEnterEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragEnterEvent { - ret := C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers)) - return newQDragEnterEvent(ret) + var outptr_QDragEnterEvent *C.QDragEnterEvent = nil + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + var outptr_QDropEvent *C.QDropEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragEnterEvent, &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) + ret := newQDragEnterEvent(outptr_QDragEnterEvent, outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDragEnterEvent) Clone() *QDragEnterEvent { - return UnsafeNewQDragEnterEvent(unsafe.Pointer(C.QDragEnterEvent_Clone(this.h))) + return UnsafeNewQDragEnterEvent(unsafe.Pointer(C.QDragEnterEvent_Clone(this.h)), nil, nil, nil) +} + +func (this *QDragEnterEvent) callVirtualBase_Clone() *QDragEnterEvent { + + return UnsafeNewQDragEnterEvent(unsafe.Pointer(C.QDragEnterEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QDragEnterEvent) OnClone(slot func(super func() *QDragEnterEvent) *QDragEnterEvent) { + C.QDragEnterEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDragEnterEvent_Clone +func miqt_exec_callback_QDragEnterEvent_Clone(self *C.QDragEnterEvent, cb C.intptr_t) *C.QDragEnterEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QDragEnterEvent) *QDragEnterEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDragEnterEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QDragEnterEvent) Delete() { - C.QDragEnterEvent_Delete(this.h) + C.QDragEnterEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2461,7 +4508,8 @@ func (this *QDragEnterEvent) GoGC() { } type QDragLeaveEvent struct { - h *C.QDragLeaveEvent + h *C.QDragLeaveEvent + isSubclass bool *QEvent } @@ -2479,30 +4527,87 @@ func (this *QDragLeaveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDragLeaveEvent(h *C.QDragLeaveEvent) *QDragLeaveEvent { +// newQDragLeaveEvent constructs the type using only CGO pointers. +func newQDragLeaveEvent(h *C.QDragLeaveEvent, h_QEvent *C.QEvent) *QDragLeaveEvent { if h == nil { return nil } - return &QDragLeaveEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QDragLeaveEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQDragLeaveEvent(h unsafe.Pointer) *QDragLeaveEvent { - return newQDragLeaveEvent((*C.QDragLeaveEvent)(h)) +// UnsafeNewQDragLeaveEvent constructs the type using only unsafe pointers. +func UnsafeNewQDragLeaveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragLeaveEvent { + if h == nil { + return nil + } + + return &QDragLeaveEvent{h: (*C.QDragLeaveEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQDragLeaveEvent constructs a new QDragLeaveEvent object. func NewQDragLeaveEvent() *QDragLeaveEvent { - ret := C.QDragLeaveEvent_new() - return newQDragLeaveEvent(ret) + var outptr_QDragLeaveEvent *C.QDragLeaveEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QDragLeaveEvent_new(&outptr_QDragLeaveEvent, &outptr_QEvent) + ret := newQDragLeaveEvent(outptr_QDragLeaveEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QDragLeaveEvent) Clone() *QDragLeaveEvent { - return UnsafeNewQDragLeaveEvent(unsafe.Pointer(C.QDragLeaveEvent_Clone(this.h))) + return UnsafeNewQDragLeaveEvent(unsafe.Pointer(C.QDragLeaveEvent_Clone(this.h)), nil) +} + +func (this *QDragLeaveEvent) callVirtualBase_Clone() *QDragLeaveEvent { + + return UnsafeNewQDragLeaveEvent(unsafe.Pointer(C.QDragLeaveEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QDragLeaveEvent) OnClone(slot func(super func() *QDragLeaveEvent) *QDragLeaveEvent) { + C.QDragLeaveEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDragLeaveEvent_Clone +func miqt_exec_callback_QDragLeaveEvent_Clone(self *C.QDragLeaveEvent, cb C.intptr_t) *C.QDragLeaveEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QDragLeaveEvent) *QDragLeaveEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDragLeaveEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QDragLeaveEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QDragLeaveEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QDragLeaveEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QDragLeaveEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDragLeaveEvent_SetAccepted +func miqt_exec_callback_QDragLeaveEvent_SetAccepted(self *C.QDragLeaveEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QDragLeaveEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QDragLeaveEvent) Delete() { - C.QDragLeaveEvent_Delete(this.h) + C.QDragLeaveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2515,7 +4620,8 @@ func (this *QDragLeaveEvent) GoGC() { } type QHelpEvent struct { - h *C.QHelpEvent + h *C.QHelpEvent + isSubclass bool *QEvent } @@ -2533,25 +4639,38 @@ func (this *QHelpEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHelpEvent(h *C.QHelpEvent) *QHelpEvent { +// newQHelpEvent constructs the type using only CGO pointers. +func newQHelpEvent(h *C.QHelpEvent, h_QEvent *C.QEvent) *QHelpEvent { if h == nil { return nil } - return &QHelpEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QHelpEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQHelpEvent(h unsafe.Pointer) *QHelpEvent { - return newQHelpEvent((*C.QHelpEvent)(h)) +// UnsafeNewQHelpEvent constructs the type using only unsafe pointers. +func UnsafeNewQHelpEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHelpEvent { + if h == nil { + return nil + } + + return &QHelpEvent{h: (*C.QHelpEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQHelpEvent constructs a new QHelpEvent object. func NewQHelpEvent(typeVal QEvent__Type, pos *QPoint, globalPos *QPoint) *QHelpEvent { - ret := C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer()) - return newQHelpEvent(ret) + var outptr_QHelpEvent *C.QHelpEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer(), &outptr_QHelpEvent, &outptr_QEvent) + ret := newQHelpEvent(outptr_QHelpEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QHelpEvent) Clone() *QHelpEvent { - return UnsafeNewQHelpEvent(unsafe.Pointer(C.QHelpEvent_Clone(this.h))) + return UnsafeNewQHelpEvent(unsafe.Pointer(C.QHelpEvent_Clone(this.h)), nil) } func (this *QHelpEvent) X() int { @@ -2578,9 +4697,53 @@ func (this *QHelpEvent) GlobalPos() *QPoint { return UnsafeNewQPoint(unsafe.Pointer(C.QHelpEvent_GlobalPos(this.h))) } +func (this *QHelpEvent) callVirtualBase_Clone() *QHelpEvent { + + return UnsafeNewQHelpEvent(unsafe.Pointer(C.QHelpEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QHelpEvent) OnClone(slot func(super func() *QHelpEvent) *QHelpEvent) { + C.QHelpEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHelpEvent_Clone +func miqt_exec_callback_QHelpEvent_Clone(self *C.QHelpEvent, cb C.intptr_t) *C.QHelpEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QHelpEvent) *QHelpEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHelpEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QHelpEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QHelpEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QHelpEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QHelpEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHelpEvent_SetAccepted +func miqt_exec_callback_QHelpEvent_SetAccepted(self *C.QHelpEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QHelpEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QHelpEvent) Delete() { - C.QHelpEvent_Delete(this.h) + C.QHelpEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2593,7 +4756,8 @@ func (this *QHelpEvent) GoGC() { } type QStatusTipEvent struct { - h *C.QStatusTipEvent + h *C.QStatusTipEvent + isSubclass bool *QEvent } @@ -2611,15 +4775,23 @@ func (this *QStatusTipEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStatusTipEvent(h *C.QStatusTipEvent) *QStatusTipEvent { +// newQStatusTipEvent constructs the type using only CGO pointers. +func newQStatusTipEvent(h *C.QStatusTipEvent, h_QEvent *C.QEvent) *QStatusTipEvent { if h == nil { return nil } - return &QStatusTipEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QStatusTipEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQStatusTipEvent(h unsafe.Pointer) *QStatusTipEvent { - return newQStatusTipEvent((*C.QStatusTipEvent)(h)) +// UnsafeNewQStatusTipEvent constructs the type using only unsafe pointers. +func UnsafeNewQStatusTipEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStatusTipEvent { + if h == nil { + return nil + } + + return &QStatusTipEvent{h: (*C.QStatusTipEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQStatusTipEvent constructs a new QStatusTipEvent object. @@ -2628,12 +4800,17 @@ func NewQStatusTipEvent(tip string) *QStatusTipEvent { tip_ms.data = C.CString(tip) tip_ms.len = C.size_t(len(tip)) defer C.free(unsafe.Pointer(tip_ms.data)) - ret := C.QStatusTipEvent_new(tip_ms) - return newQStatusTipEvent(ret) + var outptr_QStatusTipEvent *C.QStatusTipEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QStatusTipEvent_new(tip_ms, &outptr_QStatusTipEvent, &outptr_QEvent) + ret := newQStatusTipEvent(outptr_QStatusTipEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QStatusTipEvent) Clone() *QStatusTipEvent { - return UnsafeNewQStatusTipEvent(unsafe.Pointer(C.QStatusTipEvent_Clone(this.h))) + return UnsafeNewQStatusTipEvent(unsafe.Pointer(C.QStatusTipEvent_Clone(this.h)), nil) } func (this *QStatusTipEvent) Tip() string { @@ -2643,9 +4820,53 @@ func (this *QStatusTipEvent) Tip() string { return _ret } +func (this *QStatusTipEvent) callVirtualBase_Clone() *QStatusTipEvent { + + return UnsafeNewQStatusTipEvent(unsafe.Pointer(C.QStatusTipEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QStatusTipEvent) OnClone(slot func(super func() *QStatusTipEvent) *QStatusTipEvent) { + C.QStatusTipEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusTipEvent_Clone +func miqt_exec_callback_QStatusTipEvent_Clone(self *C.QStatusTipEvent, cb C.intptr_t) *C.QStatusTipEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStatusTipEvent) *QStatusTipEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusTipEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QStatusTipEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QStatusTipEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QStatusTipEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QStatusTipEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusTipEvent_SetAccepted +func miqt_exec_callback_QStatusTipEvent_SetAccepted(self *C.QStatusTipEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QStatusTipEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QStatusTipEvent) Delete() { - C.QStatusTipEvent_Delete(this.h) + C.QStatusTipEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2658,7 +4879,8 @@ func (this *QStatusTipEvent) GoGC() { } type QWhatsThisClickedEvent struct { - h *C.QWhatsThisClickedEvent + h *C.QWhatsThisClickedEvent + isSubclass bool *QEvent } @@ -2676,15 +4898,23 @@ func (this *QWhatsThisClickedEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent) *QWhatsThisClickedEvent { +// newQWhatsThisClickedEvent constructs the type using only CGO pointers. +func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent, h_QEvent *C.QEvent) *QWhatsThisClickedEvent { if h == nil { return nil } - return &QWhatsThisClickedEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QWhatsThisClickedEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer) *QWhatsThisClickedEvent { - return newQWhatsThisClickedEvent((*C.QWhatsThisClickedEvent)(h)) +// UnsafeNewQWhatsThisClickedEvent constructs the type using only unsafe pointers. +func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWhatsThisClickedEvent { + if h == nil { + return nil + } + + return &QWhatsThisClickedEvent{h: (*C.QWhatsThisClickedEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQWhatsThisClickedEvent constructs a new QWhatsThisClickedEvent object. @@ -2693,12 +4923,17 @@ func NewQWhatsThisClickedEvent(href string) *QWhatsThisClickedEvent { href_ms.data = C.CString(href) href_ms.len = C.size_t(len(href)) defer C.free(unsafe.Pointer(href_ms.data)) - ret := C.QWhatsThisClickedEvent_new(href_ms) - return newQWhatsThisClickedEvent(ret) + var outptr_QWhatsThisClickedEvent *C.QWhatsThisClickedEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWhatsThisClickedEvent_new(href_ms, &outptr_QWhatsThisClickedEvent, &outptr_QEvent) + ret := newQWhatsThisClickedEvent(outptr_QWhatsThisClickedEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QWhatsThisClickedEvent) Clone() *QWhatsThisClickedEvent { - return UnsafeNewQWhatsThisClickedEvent(unsafe.Pointer(C.QWhatsThisClickedEvent_Clone(this.h))) + return UnsafeNewQWhatsThisClickedEvent(unsafe.Pointer(C.QWhatsThisClickedEvent_Clone(this.h)), nil) } func (this *QWhatsThisClickedEvent) Href() string { @@ -2708,9 +4943,53 @@ func (this *QWhatsThisClickedEvent) Href() string { return _ret } +func (this *QWhatsThisClickedEvent) callVirtualBase_Clone() *QWhatsThisClickedEvent { + + return UnsafeNewQWhatsThisClickedEvent(unsafe.Pointer(C.QWhatsThisClickedEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QWhatsThisClickedEvent) OnClone(slot func(super func() *QWhatsThisClickedEvent) *QWhatsThisClickedEvent) { + C.QWhatsThisClickedEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWhatsThisClickedEvent_Clone +func miqt_exec_callback_QWhatsThisClickedEvent_Clone(self *C.QWhatsThisClickedEvent, cb C.intptr_t) *C.QWhatsThisClickedEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWhatsThisClickedEvent) *QWhatsThisClickedEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWhatsThisClickedEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QWhatsThisClickedEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QWhatsThisClickedEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QWhatsThisClickedEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QWhatsThisClickedEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWhatsThisClickedEvent_SetAccepted +func miqt_exec_callback_QWhatsThisClickedEvent_SetAccepted(self *C.QWhatsThisClickedEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QWhatsThisClickedEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QWhatsThisClickedEvent) Delete() { - C.QWhatsThisClickedEvent_Delete(this.h) + C.QWhatsThisClickedEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2723,7 +5002,8 @@ func (this *QWhatsThisClickedEvent) GoGC() { } type QActionEvent struct { - h *C.QActionEvent + h *C.QActionEvent + isSubclass bool *QEvent } @@ -2741,44 +5021,106 @@ func (this *QActionEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQActionEvent(h *C.QActionEvent) *QActionEvent { +// newQActionEvent constructs the type using only CGO pointers. +func newQActionEvent(h *C.QActionEvent, h_QEvent *C.QEvent) *QActionEvent { if h == nil { return nil } - return &QActionEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QActionEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQActionEvent(h unsafe.Pointer) *QActionEvent { - return newQActionEvent((*C.QActionEvent)(h)) +// UnsafeNewQActionEvent constructs the type using only unsafe pointers. +func UnsafeNewQActionEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QActionEvent { + if h == nil { + return nil + } + + return &QActionEvent{h: (*C.QActionEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQActionEvent constructs a new QActionEvent object. func NewQActionEvent(typeVal int, action *QAction) *QActionEvent { - ret := C.QActionEvent_new((C.int)(typeVal), action.cPointer()) - return newQActionEvent(ret) + var outptr_QActionEvent *C.QActionEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QActionEvent_new((C.int)(typeVal), action.cPointer(), &outptr_QActionEvent, &outptr_QEvent) + ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQActionEvent2 constructs a new QActionEvent object. func NewQActionEvent2(typeVal int, action *QAction, before *QAction) *QActionEvent { - ret := C.QActionEvent_new2((C.int)(typeVal), action.cPointer(), before.cPointer()) - return newQActionEvent(ret) + var outptr_QActionEvent *C.QActionEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QActionEvent_new2((C.int)(typeVal), action.cPointer(), before.cPointer(), &outptr_QActionEvent, &outptr_QEvent) + ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QActionEvent) Clone() *QActionEvent { - return UnsafeNewQActionEvent(unsafe.Pointer(C.QActionEvent_Clone(this.h))) + return UnsafeNewQActionEvent(unsafe.Pointer(C.QActionEvent_Clone(this.h)), nil) } func (this *QActionEvent) Action() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Action(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Action(this.h)), nil) } func (this *QActionEvent) Before() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Before(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QActionEvent_Before(this.h)), nil) +} + +func (this *QActionEvent) callVirtualBase_Clone() *QActionEvent { + + return UnsafeNewQActionEvent(unsafe.Pointer(C.QActionEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QActionEvent) OnClone(slot func(super func() *QActionEvent) *QActionEvent) { + C.QActionEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionEvent_Clone +func miqt_exec_callback_QActionEvent_Clone(self *C.QActionEvent, cb C.intptr_t) *C.QActionEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QActionEvent) *QActionEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QActionEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QActionEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QActionEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QActionEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QActionEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QActionEvent_SetAccepted +func miqt_exec_callback_QActionEvent_SetAccepted(self *C.QActionEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QActionEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QActionEvent) Delete() { - C.QActionEvent_Delete(this.h) + C.QActionEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2791,7 +5133,8 @@ func (this *QActionEvent) GoGC() { } type QFileOpenEvent struct { - h *C.QFileOpenEvent + h *C.QFileOpenEvent + isSubclass bool *QEvent } @@ -2809,15 +5152,23 @@ func (this *QFileOpenEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileOpenEvent(h *C.QFileOpenEvent) *QFileOpenEvent { +// newQFileOpenEvent constructs the type using only CGO pointers. +func newQFileOpenEvent(h *C.QFileOpenEvent, h_QEvent *C.QEvent) *QFileOpenEvent { if h == nil { return nil } - return &QFileOpenEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QFileOpenEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQFileOpenEvent(h unsafe.Pointer) *QFileOpenEvent { - return newQFileOpenEvent((*C.QFileOpenEvent)(h)) +// UnsafeNewQFileOpenEvent constructs the type using only unsafe pointers. +func UnsafeNewQFileOpenEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFileOpenEvent { + if h == nil { + return nil + } + + return &QFileOpenEvent{h: (*C.QFileOpenEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQFileOpenEvent constructs a new QFileOpenEvent object. @@ -2826,18 +5177,28 @@ func NewQFileOpenEvent(file string) *QFileOpenEvent { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QFileOpenEvent_new(file_ms) - return newQFileOpenEvent(ret) + var outptr_QFileOpenEvent *C.QFileOpenEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFileOpenEvent_new(file_ms, &outptr_QFileOpenEvent, &outptr_QEvent) + ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQFileOpenEvent2 constructs a new QFileOpenEvent object. func NewQFileOpenEvent2(url *QUrl) *QFileOpenEvent { - ret := C.QFileOpenEvent_new2(url.cPointer()) - return newQFileOpenEvent(ret) + var outptr_QFileOpenEvent *C.QFileOpenEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QFileOpenEvent_new2(url.cPointer(), &outptr_QFileOpenEvent, &outptr_QEvent) + ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QFileOpenEvent) Clone() *QFileOpenEvent { - return UnsafeNewQFileOpenEvent(unsafe.Pointer(C.QFileOpenEvent_Clone(this.h))) + return UnsafeNewQFileOpenEvent(unsafe.Pointer(C.QFileOpenEvent_Clone(this.h)), nil) } func (this *QFileOpenEvent) File() string { @@ -2858,9 +5219,53 @@ func (this *QFileOpenEvent) OpenFile(file *QFile, flags QIODeviceBase__OpenModeF return (bool)(C.QFileOpenEvent_OpenFile(this.h, file.cPointer(), (C.int)(flags))) } +func (this *QFileOpenEvent) callVirtualBase_Clone() *QFileOpenEvent { + + return UnsafeNewQFileOpenEvent(unsafe.Pointer(C.QFileOpenEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QFileOpenEvent) OnClone(slot func(super func() *QFileOpenEvent) *QFileOpenEvent) { + C.QFileOpenEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileOpenEvent_Clone +func miqt_exec_callback_QFileOpenEvent_Clone(self *C.QFileOpenEvent, cb C.intptr_t) *C.QFileOpenEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QFileOpenEvent) *QFileOpenEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileOpenEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QFileOpenEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QFileOpenEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QFileOpenEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QFileOpenEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileOpenEvent_SetAccepted +func miqt_exec_callback_QFileOpenEvent_SetAccepted(self *C.QFileOpenEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QFileOpenEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QFileOpenEvent) Delete() { - C.QFileOpenEvent_Delete(this.h) + C.QFileOpenEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2873,7 +5278,8 @@ func (this *QFileOpenEvent) GoGC() { } type QToolBarChangeEvent struct { - h *C.QToolBarChangeEvent + h *C.QToolBarChangeEvent + isSubclass bool *QEvent } @@ -2891,34 +5297,91 @@ func (this *QToolBarChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolBarChangeEvent(h *C.QToolBarChangeEvent) *QToolBarChangeEvent { +// newQToolBarChangeEvent constructs the type using only CGO pointers. +func newQToolBarChangeEvent(h *C.QToolBarChangeEvent, h_QEvent *C.QEvent) *QToolBarChangeEvent { + if h == nil { + return nil + } + return &QToolBarChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} +} + +// UnsafeNewQToolBarChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QToolBarChangeEvent { if h == nil { return nil } - return &QToolBarChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + + return &QToolBarChangeEvent{h: (*C.QToolBarChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} +} + +// NewQToolBarChangeEvent constructs a new QToolBarChangeEvent object. +func NewQToolBarChangeEvent(t bool) *QToolBarChangeEvent { + var outptr_QToolBarChangeEvent *C.QToolBarChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QToolBarChangeEvent_new((C.bool)(t), &outptr_QToolBarChangeEvent, &outptr_QEvent) + ret := newQToolBarChangeEvent(outptr_QToolBarChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret +} + +func (this *QToolBarChangeEvent) Clone() *QToolBarChangeEvent { + return UnsafeNewQToolBarChangeEvent(unsafe.Pointer(C.QToolBarChangeEvent_Clone(this.h)), nil) +} + +func (this *QToolBarChangeEvent) Toggle() bool { + return (bool)(C.QToolBarChangeEvent_Toggle(this.h)) +} + +func (this *QToolBarChangeEvent) callVirtualBase_Clone() *QToolBarChangeEvent { + + return UnsafeNewQToolBarChangeEvent(unsafe.Pointer(C.QToolBarChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QToolBarChangeEvent) OnClone(slot func(super func() *QToolBarChangeEvent) *QToolBarChangeEvent) { + C.QToolBarChangeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer) *QToolBarChangeEvent { - return newQToolBarChangeEvent((*C.QToolBarChangeEvent)(h)) -} +//export miqt_exec_callback_QToolBarChangeEvent_Clone +func miqt_exec_callback_QToolBarChangeEvent_Clone(self *C.QToolBarChangeEvent, cb C.intptr_t) *C.QToolBarChangeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QToolBarChangeEvent) *QToolBarChangeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBarChangeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() -// NewQToolBarChangeEvent constructs a new QToolBarChangeEvent object. -func NewQToolBarChangeEvent(t bool) *QToolBarChangeEvent { - ret := C.QToolBarChangeEvent_new((C.bool)(t)) - return newQToolBarChangeEvent(ret) } -func (this *QToolBarChangeEvent) Clone() *QToolBarChangeEvent { - return UnsafeNewQToolBarChangeEvent(unsafe.Pointer(C.QToolBarChangeEvent_Clone(this.h))) +func (this *QToolBarChangeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QToolBarChangeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QToolBarChangeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QToolBarChangeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QToolBarChangeEvent) Toggle() bool { - return (bool)(C.QToolBarChangeEvent_Toggle(this.h)) +//export miqt_exec_callback_QToolBarChangeEvent_SetAccepted +func miqt_exec_callback_QToolBarChangeEvent_SetAccepted(self *C.QToolBarChangeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QToolBarChangeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + } // Delete this object from C++ memory. func (this *QToolBarChangeEvent) Delete() { - C.QToolBarChangeEvent_Delete(this.h) + C.QToolBarChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2931,7 +5394,8 @@ func (this *QToolBarChangeEvent) GoGC() { } type QShortcutEvent struct { - h *C.QShortcutEvent + h *C.QShortcutEvent + isSubclass bool *QEvent } @@ -2949,31 +5413,49 @@ func (this *QShortcutEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQShortcutEvent(h *C.QShortcutEvent) *QShortcutEvent { +// newQShortcutEvent constructs the type using only CGO pointers. +func newQShortcutEvent(h *C.QShortcutEvent, h_QEvent *C.QEvent) *QShortcutEvent { if h == nil { return nil } - return &QShortcutEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QShortcutEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQShortcutEvent(h unsafe.Pointer) *QShortcutEvent { - return newQShortcutEvent((*C.QShortcutEvent)(h)) +// UnsafeNewQShortcutEvent constructs the type using only unsafe pointers. +func UnsafeNewQShortcutEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShortcutEvent { + if h == nil { + return nil + } + + return &QShortcutEvent{h: (*C.QShortcutEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQShortcutEvent constructs a new QShortcutEvent object. func NewQShortcutEvent(key *QKeySequence, id int) *QShortcutEvent { - ret := C.QShortcutEvent_new(key.cPointer(), (C.int)(id)) - return newQShortcutEvent(ret) + var outptr_QShortcutEvent *C.QShortcutEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShortcutEvent_new(key.cPointer(), (C.int)(id), &outptr_QShortcutEvent, &outptr_QEvent) + ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQShortcutEvent2 constructs a new QShortcutEvent object. func NewQShortcutEvent2(key *QKeySequence, id int, ambiguous bool) *QShortcutEvent { - ret := C.QShortcutEvent_new2(key.cPointer(), (C.int)(id), (C.bool)(ambiguous)) - return newQShortcutEvent(ret) + var outptr_QShortcutEvent *C.QShortcutEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QShortcutEvent_new2(key.cPointer(), (C.int)(id), (C.bool)(ambiguous), &outptr_QShortcutEvent, &outptr_QEvent) + ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QShortcutEvent) Clone() *QShortcutEvent { - return UnsafeNewQShortcutEvent(unsafe.Pointer(C.QShortcutEvent_Clone(this.h))) + return UnsafeNewQShortcutEvent(unsafe.Pointer(C.QShortcutEvent_Clone(this.h)), nil) } func (this *QShortcutEvent) Key() *QKeySequence { @@ -2988,9 +5470,53 @@ func (this *QShortcutEvent) IsAmbiguous() bool { return (bool)(C.QShortcutEvent_IsAmbiguous(this.h)) } +func (this *QShortcutEvent) callVirtualBase_Clone() *QShortcutEvent { + + return UnsafeNewQShortcutEvent(unsafe.Pointer(C.QShortcutEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QShortcutEvent) OnClone(slot func(super func() *QShortcutEvent) *QShortcutEvent) { + C.QShortcutEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcutEvent_Clone +func miqt_exec_callback_QShortcutEvent_Clone(self *C.QShortcutEvent, cb C.intptr_t) *C.QShortcutEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QShortcutEvent) *QShortcutEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QShortcutEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QShortcutEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QShortcutEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QShortcutEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QShortcutEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcutEvent_SetAccepted +func miqt_exec_callback_QShortcutEvent_SetAccepted(self *C.QShortcutEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QShortcutEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QShortcutEvent) Delete() { - C.QShortcutEvent_Delete(this.h) + C.QShortcutEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3003,7 +5529,8 @@ func (this *QShortcutEvent) GoGC() { } type QWindowStateChangeEvent struct { - h *C.QWindowStateChangeEvent + h *C.QWindowStateChangeEvent + isSubclass bool *QEvent } @@ -3021,31 +5548,49 @@ func (this *QWindowStateChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent) *QWindowStateChangeEvent { +// newQWindowStateChangeEvent constructs the type using only CGO pointers. +func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent, h_QEvent *C.QEvent) *QWindowStateChangeEvent { if h == nil { return nil } - return &QWindowStateChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QWindowStateChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer) *QWindowStateChangeEvent { - return newQWindowStateChangeEvent((*C.QWindowStateChangeEvent)(h)) +// UnsafeNewQWindowStateChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWindowStateChangeEvent { + if h == nil { + return nil + } + + return &QWindowStateChangeEvent{h: (*C.QWindowStateChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQWindowStateChangeEvent constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent(oldState WindowState) *QWindowStateChangeEvent { - ret := C.QWindowStateChangeEvent_new((C.int)(oldState)) - return newQWindowStateChangeEvent(ret) + var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWindowStateChangeEvent_new((C.int)(oldState), &outptr_QWindowStateChangeEvent, &outptr_QEvent) + ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQWindowStateChangeEvent2 constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent2(oldState WindowState, isOverride bool) *QWindowStateChangeEvent { - ret := C.QWindowStateChangeEvent_new2((C.int)(oldState), (C.bool)(isOverride)) - return newQWindowStateChangeEvent(ret) + var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QWindowStateChangeEvent_new2((C.int)(oldState), (C.bool)(isOverride), &outptr_QWindowStateChangeEvent, &outptr_QEvent) + ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QWindowStateChangeEvent) Clone() *QWindowStateChangeEvent { - return UnsafeNewQWindowStateChangeEvent(unsafe.Pointer(C.QWindowStateChangeEvent_Clone(this.h))) + return UnsafeNewQWindowStateChangeEvent(unsafe.Pointer(C.QWindowStateChangeEvent_Clone(this.h)), nil) } func (this *QWindowStateChangeEvent) OldState() WindowState { @@ -3056,9 +5601,53 @@ func (this *QWindowStateChangeEvent) IsOverride() bool { return (bool)(C.QWindowStateChangeEvent_IsOverride(this.h)) } +func (this *QWindowStateChangeEvent) callVirtualBase_Clone() *QWindowStateChangeEvent { + + return UnsafeNewQWindowStateChangeEvent(unsafe.Pointer(C.QWindowStateChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QWindowStateChangeEvent) OnClone(slot func(super func() *QWindowStateChangeEvent) *QWindowStateChangeEvent) { + C.QWindowStateChangeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindowStateChangeEvent_Clone +func miqt_exec_callback_QWindowStateChangeEvent_Clone(self *C.QWindowStateChangeEvent, cb C.intptr_t) *C.QWindowStateChangeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWindowStateChangeEvent) *QWindowStateChangeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindowStateChangeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QWindowStateChangeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QWindowStateChangeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QWindowStateChangeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QWindowStateChangeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindowStateChangeEvent_SetAccepted +func miqt_exec_callback_QWindowStateChangeEvent_SetAccepted(self *C.QWindowStateChangeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QWindowStateChangeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QWindowStateChangeEvent) Delete() { - C.QWindowStateChangeEvent_Delete(this.h) + C.QWindowStateChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3071,7 +5660,8 @@ func (this *QWindowStateChangeEvent) GoGC() { } type QTouchEvent struct { - h *C.QTouchEvent + h *C.QTouchEvent + isSubclass bool *QPointerEvent } @@ -3089,39 +5679,75 @@ func (this *QTouchEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTouchEvent(h *C.QTouchEvent) *QTouchEvent { +// newQTouchEvent constructs the type using only CGO pointers. +func newQTouchEvent(h *C.QTouchEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTouchEvent { if h == nil { return nil } - return &QTouchEvent{h: h, QPointerEvent: UnsafeNewQPointerEvent(unsafe.Pointer(h))} + return &QTouchEvent{h: h, + QPointerEvent: newQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} } -func UnsafeNewQTouchEvent(h unsafe.Pointer) *QTouchEvent { - return newQTouchEvent((*C.QTouchEvent)(h)) +// UnsafeNewQTouchEvent constructs the type using only unsafe pointers. +func UnsafeNewQTouchEvent(h unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTouchEvent { + if h == nil { + return nil + } + + return &QTouchEvent{h: (*C.QTouchEvent)(h), + QPointerEvent: UnsafeNewQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} } // NewQTouchEvent constructs a new QTouchEvent object. func NewQTouchEvent(eventType QEvent__Type) *QTouchEvent { - ret := C.QTouchEvent_new((C.int)(eventType)) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new((C.int)(eventType), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent2 constructs a new QTouchEvent object. func NewQTouchEvent2(eventType QEvent__Type, device *QPointingDevice, modifiers KeyboardModifier, touchPointStates QEventPoint__State) *QTouchEvent { - ret := C.QTouchEvent_new2((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates)) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new2((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent3 constructs a new QTouchEvent object. func NewQTouchEvent3(eventType QEvent__Type, device *QPointingDevice) *QTouchEvent { - ret := C.QTouchEvent_new3((C.int)(eventType), device.cPointer()) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new3((C.int)(eventType), device.cPointer(), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent4 constructs a new QTouchEvent object. func NewQTouchEvent4(eventType QEvent__Type, device *QPointingDevice, modifiers KeyboardModifier) *QTouchEvent { - ret := C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers)) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent5 constructs a new QTouchEvent object. @@ -3132,8 +5758,15 @@ func NewQTouchEvent5(eventType QEvent__Type, device *QPointingDevice, modifiers touchPoints_CArray[i] = touchPoints[i].cPointer() } touchPoints_ma := C.struct_miqt_array{len: C.size_t(len(touchPoints)), data: unsafe.Pointer(touchPoints_CArray)} - ret := C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), touchPoints_ma) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), touchPoints_ma, &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQTouchEvent6 constructs a new QTouchEvent object. @@ -3144,12 +5777,19 @@ func NewQTouchEvent6(eventType QEvent__Type, device *QPointingDevice, modifiers touchPoints_CArray[i] = touchPoints[i].cPointer() } touchPoints_ma := C.struct_miqt_array{len: C.size_t(len(touchPoints)), data: unsafe.Pointer(touchPoints_CArray)} - ret := C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates), touchPoints_ma) - return newQTouchEvent(ret) + var outptr_QTouchEvent *C.QTouchEvent = nil + var outptr_QPointerEvent *C.QPointerEvent = nil + var outptr_QInputEvent *C.QInputEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates), touchPoints_ma, &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) + ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QTouchEvent) Clone() *QTouchEvent { - return UnsafeNewQTouchEvent(unsafe.Pointer(C.QTouchEvent_Clone(this.h))) + return UnsafeNewQTouchEvent(unsafe.Pointer(C.QTouchEvent_Clone(this.h)), nil, nil, nil) } func (this *QTouchEvent) Target() *QObject { @@ -3185,9 +5825,142 @@ func (this *QTouchEvent) IsEndEvent() bool { return (bool)(C.QTouchEvent_IsEndEvent(this.h)) } +func (this *QTouchEvent) callVirtualBase_Clone() *QTouchEvent { + + return UnsafeNewQTouchEvent(unsafe.Pointer(C.QTouchEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QTouchEvent) OnClone(slot func(super func() *QTouchEvent) *QTouchEvent) { + C.QTouchEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTouchEvent_Clone +func miqt_exec_callback_QTouchEvent_Clone(self *C.QTouchEvent, cb C.intptr_t) *C.QTouchEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTouchEvent) *QTouchEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTouchEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTouchEvent) callVirtualBase_IsBeginEvent() bool { + + return (bool)(C.QTouchEvent_virtualbase_IsBeginEvent(unsafe.Pointer(this.h))) + +} +func (this *QTouchEvent) OnIsBeginEvent(slot func(super func() bool) bool) { + C.QTouchEvent_override_virtual_IsBeginEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTouchEvent_IsBeginEvent +func miqt_exec_callback_QTouchEvent_IsBeginEvent(self *C.QTouchEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTouchEvent{h: self}).callVirtualBase_IsBeginEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QTouchEvent) callVirtualBase_IsUpdateEvent() bool { + + return (bool)(C.QTouchEvent_virtualbase_IsUpdateEvent(unsafe.Pointer(this.h))) + +} +func (this *QTouchEvent) OnIsUpdateEvent(slot func(super func() bool) bool) { + C.QTouchEvent_override_virtual_IsUpdateEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTouchEvent_IsUpdateEvent +func miqt_exec_callback_QTouchEvent_IsUpdateEvent(self *C.QTouchEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTouchEvent{h: self}).callVirtualBase_IsUpdateEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QTouchEvent) callVirtualBase_IsEndEvent() bool { + + return (bool)(C.QTouchEvent_virtualbase_IsEndEvent(unsafe.Pointer(this.h))) + +} +func (this *QTouchEvent) OnIsEndEvent(slot func(super func() bool) bool) { + C.QTouchEvent_override_virtual_IsEndEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTouchEvent_IsEndEvent +func miqt_exec_callback_QTouchEvent_IsEndEvent(self *C.QTouchEvent, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTouchEvent{h: self}).callVirtualBase_IsEndEvent) + + return (C.bool)(virtualReturn) + +} + +func (this *QTouchEvent) callVirtualBase_SetTimestamp(timestamp uint64) { + + C.QTouchEvent_virtualbase_SetTimestamp(unsafe.Pointer(this.h), (C.ulonglong)(timestamp)) + +} +func (this *QTouchEvent) OnSetTimestamp(slot func(super func(timestamp uint64), timestamp uint64)) { + C.QTouchEvent_override_virtual_SetTimestamp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTouchEvent_SetTimestamp +func miqt_exec_callback_QTouchEvent_SetTimestamp(self *C.QTouchEvent, cb C.intptr_t, timestamp C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timestamp uint64), timestamp uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uint64)(timestamp) + + gofunc((&QTouchEvent{h: self}).callVirtualBase_SetTimestamp, slotval1) + +} + +func (this *QTouchEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QTouchEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QTouchEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QTouchEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTouchEvent_SetAccepted +func miqt_exec_callback_QTouchEvent_SetAccepted(self *C.QTouchEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QTouchEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QTouchEvent) Delete() { - C.QTouchEvent_Delete(this.h) + C.QTouchEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3200,7 +5973,8 @@ func (this *QTouchEvent) GoGC() { } type QScrollPrepareEvent struct { - h *C.QScrollPrepareEvent + h *C.QScrollPrepareEvent + isSubclass bool *QEvent } @@ -3218,25 +5992,38 @@ func (this *QScrollPrepareEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollPrepareEvent(h *C.QScrollPrepareEvent) *QScrollPrepareEvent { +// newQScrollPrepareEvent constructs the type using only CGO pointers. +func newQScrollPrepareEvent(h *C.QScrollPrepareEvent, h_QEvent *C.QEvent) *QScrollPrepareEvent { if h == nil { return nil } - return &QScrollPrepareEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QScrollPrepareEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer) *QScrollPrepareEvent { - return newQScrollPrepareEvent((*C.QScrollPrepareEvent)(h)) +// UnsafeNewQScrollPrepareEvent constructs the type using only unsafe pointers. +func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollPrepareEvent { + if h == nil { + return nil + } + + return &QScrollPrepareEvent{h: (*C.QScrollPrepareEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQScrollPrepareEvent constructs a new QScrollPrepareEvent object. func NewQScrollPrepareEvent(startPos *QPointF) *QScrollPrepareEvent { - ret := C.QScrollPrepareEvent_new(startPos.cPointer()) - return newQScrollPrepareEvent(ret) + var outptr_QScrollPrepareEvent *C.QScrollPrepareEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScrollPrepareEvent_new(startPos.cPointer(), &outptr_QScrollPrepareEvent, &outptr_QEvent) + ret := newQScrollPrepareEvent(outptr_QScrollPrepareEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QScrollPrepareEvent) Clone() *QScrollPrepareEvent { - return UnsafeNewQScrollPrepareEvent(unsafe.Pointer(C.QScrollPrepareEvent_Clone(this.h))) + return UnsafeNewQScrollPrepareEvent(unsafe.Pointer(C.QScrollPrepareEvent_Clone(this.h)), nil) } func (this *QScrollPrepareEvent) StartPos() *QPointF { @@ -3279,9 +6066,53 @@ func (this *QScrollPrepareEvent) SetContentPos(pos *QPointF) { C.QScrollPrepareEvent_SetContentPos(this.h, pos.cPointer()) } +func (this *QScrollPrepareEvent) callVirtualBase_Clone() *QScrollPrepareEvent { + + return UnsafeNewQScrollPrepareEvent(unsafe.Pointer(C.QScrollPrepareEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QScrollPrepareEvent) OnClone(slot func(super func() *QScrollPrepareEvent) *QScrollPrepareEvent) { + C.QScrollPrepareEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollPrepareEvent_Clone +func miqt_exec_callback_QScrollPrepareEvent_Clone(self *C.QScrollPrepareEvent, cb C.intptr_t) *C.QScrollPrepareEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QScrollPrepareEvent) *QScrollPrepareEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollPrepareEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QScrollPrepareEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QScrollPrepareEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QScrollPrepareEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QScrollPrepareEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollPrepareEvent_SetAccepted +func miqt_exec_callback_QScrollPrepareEvent_SetAccepted(self *C.QScrollPrepareEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QScrollPrepareEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QScrollPrepareEvent) Delete() { - C.QScrollPrepareEvent_Delete(this.h) + C.QScrollPrepareEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3294,7 +6125,8 @@ func (this *QScrollPrepareEvent) GoGC() { } type QScrollEvent struct { - h *C.QScrollEvent + h *C.QScrollEvent + isSubclass bool *QEvent } @@ -3312,25 +6144,38 @@ func (this *QScrollEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollEvent(h *C.QScrollEvent) *QScrollEvent { +// newQScrollEvent constructs the type using only CGO pointers. +func newQScrollEvent(h *C.QScrollEvent, h_QEvent *C.QEvent) *QScrollEvent { if h == nil { return nil } - return &QScrollEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QScrollEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQScrollEvent(h unsafe.Pointer) *QScrollEvent { - return newQScrollEvent((*C.QScrollEvent)(h)) +// UnsafeNewQScrollEvent constructs the type using only unsafe pointers. +func UnsafeNewQScrollEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollEvent { + if h == nil { + return nil + } + + return &QScrollEvent{h: (*C.QScrollEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQScrollEvent constructs a new QScrollEvent object. func NewQScrollEvent(contentPos *QPointF, overshoot *QPointF, scrollState QScrollEvent__ScrollState) *QScrollEvent { - ret := C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState)) - return newQScrollEvent(ret) + var outptr_QScrollEvent *C.QScrollEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState), &outptr_QScrollEvent, &outptr_QEvent) + ret := newQScrollEvent(outptr_QScrollEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QScrollEvent) Clone() *QScrollEvent { - return UnsafeNewQScrollEvent(unsafe.Pointer(C.QScrollEvent_Clone(this.h))) + return UnsafeNewQScrollEvent(unsafe.Pointer(C.QScrollEvent_Clone(this.h)), nil) } func (this *QScrollEvent) ContentPos() *QPointF { @@ -3351,9 +6196,53 @@ func (this *QScrollEvent) ScrollState() QScrollEvent__ScrollState { return (QScrollEvent__ScrollState)(C.QScrollEvent_ScrollState(this.h)) } +func (this *QScrollEvent) callVirtualBase_Clone() *QScrollEvent { + + return UnsafeNewQScrollEvent(unsafe.Pointer(C.QScrollEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QScrollEvent) OnClone(slot func(super func() *QScrollEvent) *QScrollEvent) { + C.QScrollEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollEvent_Clone +func miqt_exec_callback_QScrollEvent_Clone(self *C.QScrollEvent, cb C.intptr_t) *C.QScrollEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QScrollEvent) *QScrollEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QScrollEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QScrollEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QScrollEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QScrollEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollEvent_SetAccepted +func miqt_exec_callback_QScrollEvent_SetAccepted(self *C.QScrollEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QScrollEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QScrollEvent) Delete() { - C.QScrollEvent_Delete(this.h) + C.QScrollEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3366,7 +6255,8 @@ func (this *QScrollEvent) GoGC() { } type QScreenOrientationChangeEvent struct { - h *C.QScreenOrientationChangeEvent + h *C.QScreenOrientationChangeEvent + isSubclass bool *QEvent } @@ -3384,38 +6274,95 @@ func (this *QScreenOrientationChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent { +// newQScreenOrientationChangeEvent constructs the type using only CGO pointers. +func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent, h_QEvent *C.QEvent) *QScreenOrientationChangeEvent { if h == nil { return nil } - return &QScreenOrientationChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QScreenOrientationChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer) *QScreenOrientationChangeEvent { - return newQScreenOrientationChangeEvent((*C.QScreenOrientationChangeEvent)(h)) +// UnsafeNewQScreenOrientationChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScreenOrientationChangeEvent { + if h == nil { + return nil + } + + return &QScreenOrientationChangeEvent{h: (*C.QScreenOrientationChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQScreenOrientationChangeEvent constructs a new QScreenOrientationChangeEvent object. func NewQScreenOrientationChangeEvent(screen *QScreen, orientation ScreenOrientation) *QScreenOrientationChangeEvent { - ret := C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation)) - return newQScreenOrientationChangeEvent(ret) + var outptr_QScreenOrientationChangeEvent *C.QScreenOrientationChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation), &outptr_QScreenOrientationChangeEvent, &outptr_QEvent) + ret := newQScreenOrientationChangeEvent(outptr_QScreenOrientationChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QScreenOrientationChangeEvent) Clone() *QScreenOrientationChangeEvent { - return UnsafeNewQScreenOrientationChangeEvent(unsafe.Pointer(C.QScreenOrientationChangeEvent_Clone(this.h))) + return UnsafeNewQScreenOrientationChangeEvent(unsafe.Pointer(C.QScreenOrientationChangeEvent_Clone(this.h)), nil) } func (this *QScreenOrientationChangeEvent) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QScreenOrientationChangeEvent_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QScreenOrientationChangeEvent_Screen(this.h)), nil) } func (this *QScreenOrientationChangeEvent) Orientation() ScreenOrientation { return (ScreenOrientation)(C.QScreenOrientationChangeEvent_Orientation(this.h)) } +func (this *QScreenOrientationChangeEvent) callVirtualBase_Clone() *QScreenOrientationChangeEvent { + + return UnsafeNewQScreenOrientationChangeEvent(unsafe.Pointer(C.QScreenOrientationChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QScreenOrientationChangeEvent) OnClone(slot func(super func() *QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent) { + C.QScreenOrientationChangeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScreenOrientationChangeEvent_Clone +func miqt_exec_callback_QScreenOrientationChangeEvent_Clone(self *C.QScreenOrientationChangeEvent, cb C.intptr_t) *C.QScreenOrientationChangeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScreenOrientationChangeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QScreenOrientationChangeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QScreenOrientationChangeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QScreenOrientationChangeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QScreenOrientationChangeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScreenOrientationChangeEvent_SetAccepted +func miqt_exec_callback_QScreenOrientationChangeEvent_SetAccepted(self *C.QScreenOrientationChangeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QScreenOrientationChangeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QScreenOrientationChangeEvent) Delete() { - C.QScreenOrientationChangeEvent_Delete(this.h) + C.QScreenOrientationChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3428,7 +6375,8 @@ func (this *QScreenOrientationChangeEvent) GoGC() { } type QApplicationStateChangeEvent struct { - h *C.QApplicationStateChangeEvent + h *C.QApplicationStateChangeEvent + isSubclass bool *QEvent } @@ -3446,34 +6394,91 @@ func (this *QApplicationStateChangeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent) *QApplicationStateChangeEvent { +// newQApplicationStateChangeEvent constructs the type using only CGO pointers. +func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent, h_QEvent *C.QEvent) *QApplicationStateChangeEvent { if h == nil { return nil } - return &QApplicationStateChangeEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QApplicationStateChangeEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer) *QApplicationStateChangeEvent { - return newQApplicationStateChangeEvent((*C.QApplicationStateChangeEvent)(h)) +// UnsafeNewQApplicationStateChangeEvent constructs the type using only unsafe pointers. +func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QApplicationStateChangeEvent { + if h == nil { + return nil + } + + return &QApplicationStateChangeEvent{h: (*C.QApplicationStateChangeEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQApplicationStateChangeEvent constructs a new QApplicationStateChangeEvent object. func NewQApplicationStateChangeEvent(state ApplicationState) *QApplicationStateChangeEvent { - ret := C.QApplicationStateChangeEvent_new((C.int)(state)) - return newQApplicationStateChangeEvent(ret) + var outptr_QApplicationStateChangeEvent *C.QApplicationStateChangeEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QApplicationStateChangeEvent_new((C.int)(state), &outptr_QApplicationStateChangeEvent, &outptr_QEvent) + ret := newQApplicationStateChangeEvent(outptr_QApplicationStateChangeEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QApplicationStateChangeEvent) Clone() *QApplicationStateChangeEvent { - return UnsafeNewQApplicationStateChangeEvent(unsafe.Pointer(C.QApplicationStateChangeEvent_Clone(this.h))) + return UnsafeNewQApplicationStateChangeEvent(unsafe.Pointer(C.QApplicationStateChangeEvent_Clone(this.h)), nil) } func (this *QApplicationStateChangeEvent) ApplicationState() ApplicationState { return (ApplicationState)(C.QApplicationStateChangeEvent_ApplicationState(this.h)) } +func (this *QApplicationStateChangeEvent) callVirtualBase_Clone() *QApplicationStateChangeEvent { + + return UnsafeNewQApplicationStateChangeEvent(unsafe.Pointer(C.QApplicationStateChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))), nil) +} +func (this *QApplicationStateChangeEvent) OnClone(slot func(super func() *QApplicationStateChangeEvent) *QApplicationStateChangeEvent) { + C.QApplicationStateChangeEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QApplicationStateChangeEvent_Clone +func miqt_exec_callback_QApplicationStateChangeEvent_Clone(self *C.QApplicationStateChangeEvent, cb C.intptr_t) *C.QApplicationStateChangeEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QApplicationStateChangeEvent) *QApplicationStateChangeEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QApplicationStateChangeEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QApplicationStateChangeEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QApplicationStateChangeEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QApplicationStateChangeEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QApplicationStateChangeEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QApplicationStateChangeEvent_SetAccepted +func miqt_exec_callback_QApplicationStateChangeEvent_SetAccepted(self *C.QApplicationStateChangeEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QApplicationStateChangeEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + // Delete this object from C++ memory. func (this *QApplicationStateChangeEvent) Delete() { - C.QApplicationStateChangeEvent_Delete(this.h) + C.QApplicationStateChangeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -3486,7 +6491,8 @@ func (this *QApplicationStateChangeEvent) GoGC() { } type QInputMethodEvent__Attribute struct { - h *C.QInputMethodEvent__Attribute + h *C.QInputMethodEvent__Attribute + isSubclass bool } func (this *QInputMethodEvent__Attribute) cPointer() *C.QInputMethodEvent__Attribute { @@ -3503,6 +6509,7 @@ func (this *QInputMethodEvent__Attribute) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQInputMethodEvent__Attribute constructs the type using only CGO pointers. func newQInputMethodEvent__Attribute(h *C.QInputMethodEvent__Attribute) *QInputMethodEvent__Attribute { if h == nil { return nil @@ -3510,26 +6517,43 @@ func newQInputMethodEvent__Attribute(h *C.QInputMethodEvent__Attribute) *QInputM return &QInputMethodEvent__Attribute{h: h} } +// UnsafeNewQInputMethodEvent__Attribute constructs the type using only unsafe pointers. func UnsafeNewQInputMethodEvent__Attribute(h unsafe.Pointer) *QInputMethodEvent__Attribute { - return newQInputMethodEvent__Attribute((*C.QInputMethodEvent__Attribute)(h)) + if h == nil { + return nil + } + + return &QInputMethodEvent__Attribute{h: (*C.QInputMethodEvent__Attribute)(h)} } // NewQInputMethodEvent__Attribute constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute(typ QInputMethodEvent__AttributeType, s int, l int, val QVariant) *QInputMethodEvent__Attribute { - ret := C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer()) - return newQInputMethodEvent__Attribute(ret) + var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil + + C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer(), &outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret.isSubclass = true + return ret } // NewQInputMethodEvent__Attribute2 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute2(typ QInputMethodEvent__AttributeType, s int, l int) *QInputMethodEvent__Attribute { - ret := C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l)) - return newQInputMethodEvent__Attribute(ret) + var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil + + C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l), &outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret.isSubclass = true + return ret } // NewQInputMethodEvent__Attribute3 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute3(param1 *QInputMethodEvent__Attribute) *QInputMethodEvent__Attribute { - ret := C.QInputMethodEvent__Attribute_new3(param1.cPointer()) - return newQInputMethodEvent__Attribute(ret) + var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil + + C.QInputMethodEvent__Attribute_new3(param1.cPointer(), &outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret.isSubclass = true + return ret } func (this *QInputMethodEvent__Attribute) OperatorAssign(param1 *QInputMethodEvent__Attribute) { @@ -3538,7 +6562,7 @@ func (this *QInputMethodEvent__Attribute) OperatorAssign(param1 *QInputMethodEve // Delete this object from C++ memory. func (this *QInputMethodEvent__Attribute) Delete() { - C.QInputMethodEvent__Attribute_Delete(this.h) + C.QInputMethodEvent__Attribute_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qevent.h b/qt6/gen_qevent.h index 8ce4f20b..68198f77 100644 --- a/qt6/gen_qevent.h +++ b/qt6/gen_qevent.h @@ -25,6 +25,7 @@ class QDragLeaveEvent; class QDragMoveEvent; class QDropEvent; class QEnterEvent; +class QEvent; class QEventPoint; class QExposeEvent; class QFile; @@ -90,6 +91,7 @@ typedef struct QDragLeaveEvent QDragLeaveEvent; typedef struct QDragMoveEvent QDragMoveEvent; typedef struct QDropEvent QDropEvent; typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; typedef struct QEventPoint QEventPoint; typedef struct QExposeEvent QExposeEvent; typedef struct QFile QFile; @@ -142,8 +144,8 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWindowStateChangeEvent QWindowStateChangeEvent; #endif -QInputEvent* QInputEvent_new(int typeVal, QInputDevice* m_dev); -QInputEvent* QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers); +void QInputEvent_new(int typeVal, QInputDevice* m_dev, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QInputEvent* QInputEvent_Clone(const QInputEvent* self); QInputDevice* QInputEvent_Device(const QInputEvent* self); int QInputEvent_DeviceType(const QInputEvent* self); @@ -151,11 +153,17 @@ int QInputEvent_Modifiers(const QInputEvent* self); void QInputEvent_SetModifiers(QInputEvent* self, int modifiers); unsigned long long QInputEvent_Timestamp(const QInputEvent* self); void QInputEvent_SetTimestamp(QInputEvent* self, unsigned long long timestamp); -void QInputEvent_Delete(QInputEvent* self); - -QPointerEvent* QPointerEvent_new(int typeVal, QPointingDevice* dev); -QPointerEvent* QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers); -QPointerEvent* QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points); +void QInputEvent_override_virtual_Clone(void* self, intptr_t slot); +QInputEvent* QInputEvent_virtualbase_Clone(const void* self); +void QInputEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); +void QInputEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); +void QInputEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QInputEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QInputEvent_Delete(QInputEvent* self, bool isSubclass); + +void QPointerEvent_new(int typeVal, QPointingDevice* dev, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QPointerEvent* QPointerEvent_Clone(const QPointerEvent* self); QPointingDevice* QPointerEvent_PointingDevice(const QPointerEvent* self); int QPointerEvent_PointerType(const QPointerEvent* self); @@ -175,7 +183,19 @@ void QPointerEvent_SetExclusiveGrabber(QPointerEvent* self, QEventPoint* point, void QPointerEvent_ClearPassiveGrabbers(QPointerEvent* self, QEventPoint* point); bool QPointerEvent_AddPassiveGrabber(QPointerEvent* self, QEventPoint* point, QObject* grabber); bool QPointerEvent_RemovePassiveGrabber(QPointerEvent* self, QEventPoint* point, QObject* grabber); -void QPointerEvent_Delete(QPointerEvent* self); +void QPointerEvent_override_virtual_Clone(void* self, intptr_t slot); +QPointerEvent* QPointerEvent_virtualbase_Clone(const void* self); +void QPointerEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); +void QPointerEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); +void QPointerEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QPointerEvent_virtualbase_IsBeginEvent(const void* self); +void QPointerEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QPointerEvent_virtualbase_IsUpdateEvent(const void* self); +void QPointerEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QPointerEvent_virtualbase_IsEndEvent(const void* self); +void QPointerEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QPointerEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QPointerEvent_Delete(QPointerEvent* self, bool isSubclass); QSinglePointEvent* QSinglePointEvent_Clone(const QSinglePointEvent* self); int QSinglePointEvent_Button(const QSinglePointEvent* self); @@ -188,10 +208,10 @@ bool QSinglePointEvent_IsUpdateEvent(const QSinglePointEvent* self); bool QSinglePointEvent_IsEndEvent(const QSinglePointEvent* self); QObject* QSinglePointEvent_ExclusivePointGrabber(const QSinglePointEvent* self); void QSinglePointEvent_SetExclusivePointGrabber(QSinglePointEvent* self, QObject* exclusiveGrabber); -void QSinglePointEvent_Delete(QSinglePointEvent* self); +void QSinglePointEvent_Delete(QSinglePointEvent* self, bool isSubclass); -QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos); -QEnterEvent* QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device); +void QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QEnterEvent* QEnterEvent_Clone(const QEnterEvent* self); QPoint* QEnterEvent_Pos(const QEnterEvent* self); QPoint* QEnterEvent_GlobalPos(const QEnterEvent* self); @@ -202,16 +222,24 @@ int QEnterEvent_GlobalY(const QEnterEvent* self); QPointF* QEnterEvent_LocalPos(const QEnterEvent* self); QPointF* QEnterEvent_WindowPos(const QEnterEvent* self); QPointF* QEnterEvent_ScreenPos(const QEnterEvent* self); -void QEnterEvent_Delete(QEnterEvent* self); - -QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers); -QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers); -QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers); -QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source); -QMouseEvent* QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device); -QMouseEvent* QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device); -QMouseEvent* QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device); -QMouseEvent* QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device); +void QEnterEvent_override_virtual_Clone(void* self, intptr_t slot); +QEnterEvent* QEnterEvent_virtualbase_Clone(const void* self); +void QEnterEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QEnterEvent_virtualbase_IsBeginEvent(const void* self); +void QEnterEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QEnterEvent_virtualbase_IsUpdateEvent(const void* self); +void QEnterEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QEnterEvent_virtualbase_IsEndEvent(const void* self); +void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass); + +void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QMouseEvent* QMouseEvent_Clone(const QMouseEvent* self); QPoint* QMouseEvent_Pos(const QMouseEvent* self); QPoint* QMouseEvent_GlobalPos(const QMouseEvent* self); @@ -224,25 +252,41 @@ QPointF* QMouseEvent_WindowPos(const QMouseEvent* self); QPointF* QMouseEvent_ScreenPos(const QMouseEvent* self); int QMouseEvent_Source(const QMouseEvent* self); int QMouseEvent_Flags(const QMouseEvent* self); -void QMouseEvent_Delete(QMouseEvent* self); - -QHoverEvent* QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos); -QHoverEvent* QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos); -QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers); -QHoverEvent* QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device); -QHoverEvent* QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers); -QHoverEvent* QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device); +void QMouseEvent_override_virtual_Clone(void* self, intptr_t slot); +QMouseEvent* QMouseEvent_virtualbase_Clone(const void* self); +void QMouseEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QMouseEvent_virtualbase_IsBeginEvent(const void* self); +void QMouseEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QMouseEvent_virtualbase_IsUpdateEvent(const void* self); +void QMouseEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QMouseEvent_virtualbase_IsEndEvent(const void* self); +void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass); + +void QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QHoverEvent* QHoverEvent_Clone(const QHoverEvent* self); QPoint* QHoverEvent_Pos(const QHoverEvent* self); QPointF* QHoverEvent_PosF(const QHoverEvent* self); bool QHoverEvent_IsUpdateEvent(const QHoverEvent* self); QPoint* QHoverEvent_OldPos(const QHoverEvent* self); QPointF* QHoverEvent_OldPosF(const QHoverEvent* self); -void QHoverEvent_Delete(QHoverEvent* self); - -QWheelEvent* QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted); -QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source); -QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device); +void QHoverEvent_override_virtual_Clone(void* self, intptr_t slot); +QHoverEvent* QHoverEvent_virtualbase_Clone(const void* self); +void QHoverEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QHoverEvent_virtualbase_IsUpdateEvent(const void* self); +void QHoverEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QHoverEvent_virtualbase_IsBeginEvent(const void* self); +void QHoverEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QHoverEvent_virtualbase_IsEndEvent(const void* self); +void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass); + +void QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QWheelEvent* QWheelEvent_Clone(const QWheelEvent* self); QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self); QPoint* QWheelEvent_AngleDelta(const QWheelEvent* self); @@ -254,9 +298,17 @@ bool QWheelEvent_IsBeginEvent(const QWheelEvent* self); bool QWheelEvent_IsUpdateEvent(const QWheelEvent* self); bool QWheelEvent_IsEndEvent(const QWheelEvent* self); int QWheelEvent_Source(const QWheelEvent* self); -void QWheelEvent_Delete(QWheelEvent* self); - -QTabletEvent* QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons); +void QWheelEvent_override_virtual_Clone(void* self, intptr_t slot); +QWheelEvent* QWheelEvent_virtualbase_Clone(const void* self); +void QWheelEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QWheelEvent_virtualbase_IsBeginEvent(const void* self); +void QWheelEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QWheelEvent_virtualbase_IsUpdateEvent(const void* self); +void QWheelEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QWheelEvent_virtualbase_IsEndEvent(const void* self); +void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass); + +void QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QTabletEvent* QTabletEvent_Clone(const QTabletEvent* self); QPoint* QTabletEvent_Pos(const QTabletEvent* self); QPoint* QTabletEvent_GlobalPos(const QTabletEvent* self); @@ -275,11 +327,19 @@ double QTabletEvent_Z(const QTabletEvent* self); double QTabletEvent_TangentialPressure(const QTabletEvent* self); double QTabletEvent_XTilt(const QTabletEvent* self); double QTabletEvent_YTilt(const QTabletEvent* self); -void QTabletEvent_Delete(QTabletEvent* self); - -QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument); -QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta); -QNativeGestureEvent* QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId); +void QTabletEvent_override_virtual_Clone(void* self, intptr_t slot); +QTabletEvent* QTabletEvent_virtualbase_Clone(const void* self); +void QTabletEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QTabletEvent_virtualbase_IsBeginEvent(const void* self); +void QTabletEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QTabletEvent_virtualbase_IsUpdateEvent(const void* self); +void QTabletEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QTabletEvent_virtualbase_IsEndEvent(const void* self); +void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass); + +void QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QNativeGestureEvent* QNativeGestureEvent_Clone(const QNativeGestureEvent* self); int QNativeGestureEvent_GestureType(const QNativeGestureEvent* self); int QNativeGestureEvent_FingerCount(const QNativeGestureEvent* self); @@ -290,17 +350,25 @@ QPoint* QNativeGestureEvent_GlobalPos(const QNativeGestureEvent* self); QPointF* QNativeGestureEvent_LocalPos(const QNativeGestureEvent* self); QPointF* QNativeGestureEvent_WindowPos(const QNativeGestureEvent* self); QPointF* QNativeGestureEvent_ScreenPos(const QNativeGestureEvent* self); -void QNativeGestureEvent_Delete(QNativeGestureEvent* self); - -QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers); -QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers); -QKeyEvent* QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text); -QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep); -QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count); -QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text); -QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep); -QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count); -QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device); +void QNativeGestureEvent_override_virtual_Clone(void* self, intptr_t slot); +QNativeGestureEvent* QNativeGestureEvent_virtualbase_Clone(const void* self); +void QNativeGestureEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QNativeGestureEvent_virtualbase_IsBeginEvent(const void* self); +void QNativeGestureEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QNativeGestureEvent_virtualbase_IsUpdateEvent(const void* self); +void QNativeGestureEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QNativeGestureEvent_virtualbase_IsEndEvent(const void* self); +void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass); + +void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QKeyEvent* QKeyEvent_Clone(const QKeyEvent* self); int QKeyEvent_Key(const QKeyEvent* self); bool QKeyEvent_Matches(const QKeyEvent* self, int key); @@ -312,64 +380,108 @@ int QKeyEvent_Count(const QKeyEvent* self); unsigned int QKeyEvent_NativeScanCode(const QKeyEvent* self); unsigned int QKeyEvent_NativeVirtualKey(const QKeyEvent* self); unsigned int QKeyEvent_NativeModifiers(const QKeyEvent* self); -void QKeyEvent_Delete(QKeyEvent* self); - -QFocusEvent* QFocusEvent_new(int typeVal); -QFocusEvent* QFocusEvent_new2(int typeVal, int reason); +void QKeyEvent_override_virtual_Clone(void* self, intptr_t slot); +QKeyEvent* QKeyEvent_virtualbase_Clone(const void* self); +void QKeyEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); +void QKeyEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); +void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass); + +void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); +void QFocusEvent_new2(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); QFocusEvent* QFocusEvent_Clone(const QFocusEvent* self); bool QFocusEvent_GotFocus(const QFocusEvent* self); bool QFocusEvent_LostFocus(const QFocusEvent* self); int QFocusEvent_Reason(const QFocusEvent* self); -void QFocusEvent_Delete(QFocusEvent* self); - -QPaintEvent* QPaintEvent_new(QRegion* paintRegion); -QPaintEvent* QPaintEvent_new2(QRect* paintRect); +void QFocusEvent_override_virtual_Clone(void* self, intptr_t slot); +QFocusEvent* QFocusEvent_virtualbase_Clone(const void* self); +void QFocusEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QFocusEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass); + +void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); +void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); QPaintEvent* QPaintEvent_Clone(const QPaintEvent* self); QRect* QPaintEvent_Rect(const QPaintEvent* self); QRegion* QPaintEvent_Region(const QPaintEvent* self); -void QPaintEvent_Delete(QPaintEvent* self); +void QPaintEvent_override_virtual_Clone(void* self, intptr_t slot); +QPaintEvent* QPaintEvent_virtualbase_Clone(const void* self); +void QPaintEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QPaintEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass); -QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos); +void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent); QMoveEvent* QMoveEvent_Clone(const QMoveEvent* self); QPoint* QMoveEvent_Pos(const QMoveEvent* self); QPoint* QMoveEvent_OldPos(const QMoveEvent* self); -void QMoveEvent_Delete(QMoveEvent* self); +void QMoveEvent_override_virtual_Clone(void* self, intptr_t slot); +QMoveEvent* QMoveEvent_virtualbase_Clone(const void* self); +void QMoveEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QMoveEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass); -QExposeEvent* QExposeEvent_new(QRegion* m_region); +void QExposeEvent_new(QRegion* m_region, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent); QExposeEvent* QExposeEvent_Clone(const QExposeEvent* self); QRegion* QExposeEvent_Region(const QExposeEvent* self); -void QExposeEvent_Delete(QExposeEvent* self); +void QExposeEvent_override_virtual_Clone(void* self, intptr_t slot); +QExposeEvent* QExposeEvent_virtualbase_Clone(const void* self); +void QExposeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QExposeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass); -QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType); +void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent); QPlatformSurfaceEvent* QPlatformSurfaceEvent_Clone(const QPlatformSurfaceEvent* self); int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self); -void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self); +void QPlatformSurfaceEvent_override_virtual_Clone(void* self, intptr_t slot); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_virtualbase_Clone(const void* self); +void QPlatformSurfaceEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QPlatformSurfaceEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass); -QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize); +void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent); QResizeEvent* QResizeEvent_Clone(const QResizeEvent* self); QSize* QResizeEvent_Size(const QResizeEvent* self); QSize* QResizeEvent_OldSize(const QResizeEvent* self); -void QResizeEvent_Delete(QResizeEvent* self); +void QResizeEvent_override_virtual_Clone(void* self, intptr_t slot); +QResizeEvent* QResizeEvent_virtualbase_Clone(const void* self); +void QResizeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QResizeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass); -QCloseEvent* QCloseEvent_new(); +void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent); QCloseEvent* QCloseEvent_Clone(const QCloseEvent* self); -void QCloseEvent_Delete(QCloseEvent* self); +void QCloseEvent_override_virtual_Clone(void* self, intptr_t slot); +QCloseEvent* QCloseEvent_virtualbase_Clone(const void* self); +void QCloseEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QCloseEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass); -QIconDragEvent* QIconDragEvent_new(); +void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent); QIconDragEvent* QIconDragEvent_Clone(const QIconDragEvent* self); -void QIconDragEvent_Delete(QIconDragEvent* self); +void QIconDragEvent_override_virtual_Clone(void* self, intptr_t slot); +QIconDragEvent* QIconDragEvent_virtualbase_Clone(const void* self); +void QIconDragEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QIconDragEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass); -QShowEvent* QShowEvent_new(); +void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent); QShowEvent* QShowEvent_Clone(const QShowEvent* self); -void QShowEvent_Delete(QShowEvent* self); +void QShowEvent_override_virtual_Clone(void* self, intptr_t slot); +QShowEvent* QShowEvent_virtualbase_Clone(const void* self); +void QShowEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QShowEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QShowEvent_Delete(QShowEvent* self, bool isSubclass); -QHideEvent* QHideEvent_new(); +void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent); QHideEvent* QHideEvent_Clone(const QHideEvent* self); -void QHideEvent_Delete(QHideEvent* self); - -QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos); -QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos); -QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers); +void QHideEvent_override_virtual_Clone(void* self, intptr_t slot); +QHideEvent* QHideEvent_virtualbase_Clone(const void* self); +void QHideEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QHideEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QHideEvent_Delete(QHideEvent* self, bool isSubclass); + +void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QContextMenuEvent_new2(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QContextMenuEvent* QContextMenuEvent_Clone(const QContextMenuEvent* self); int QContextMenuEvent_X(const QContextMenuEvent* self); int QContextMenuEvent_Y(const QContextMenuEvent* self); @@ -378,10 +490,14 @@ int QContextMenuEvent_GlobalY(const QContextMenuEvent* self); QPoint* QContextMenuEvent_Pos(const QContextMenuEvent* self); QPoint* QContextMenuEvent_GlobalPos(const QContextMenuEvent* self); int QContextMenuEvent_Reason(const QContextMenuEvent* self); -void QContextMenuEvent_Delete(QContextMenuEvent* self); - -QInputMethodEvent* QInputMethodEvent_new(); -QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes); +void QContextMenuEvent_override_virtual_Clone(void* self, intptr_t slot); +QContextMenuEvent* QContextMenuEvent_virtualbase_Clone(const void* self); +void QContextMenuEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); +void QContextMenuEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); +void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass); + +void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); +void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); QInputMethodEvent* QInputMethodEvent_Clone(const QInputMethodEvent* self); void QInputMethodEvent_SetCommitString(QInputMethodEvent* self, struct miqt_string commitString); struct miqt_array /* of QInputMethodEvent__Attribute* */ QInputMethodEvent_Attributes(const QInputMethodEvent* self); @@ -391,17 +507,25 @@ int QInputMethodEvent_ReplacementStart(const QInputMethodEvent* self); int QInputMethodEvent_ReplacementLength(const QInputMethodEvent* self); void QInputMethodEvent_SetCommitString2(QInputMethodEvent* self, struct miqt_string commitString, int replaceFrom); void QInputMethodEvent_SetCommitString3(QInputMethodEvent* self, struct miqt_string commitString, int replaceFrom, int replaceLength); -void QInputMethodEvent_Delete(QInputMethodEvent* self); +void QInputMethodEvent_override_virtual_Clone(void* self, intptr_t slot); +QInputMethodEvent* QInputMethodEvent_virtualbase_Clone(const void* self); +void QInputMethodEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QInputMethodEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass); -QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries); +void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent); QInputMethodQueryEvent* QInputMethodQueryEvent_Clone(const QInputMethodQueryEvent* self); int QInputMethodQueryEvent_Queries(const QInputMethodQueryEvent* self); void QInputMethodQueryEvent_SetValue(QInputMethodQueryEvent* self, int query, QVariant* value); QVariant* QInputMethodQueryEvent_Value(const QInputMethodQueryEvent* self, int query); -void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self); - -QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers); -QDropEvent* QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QInputMethodQueryEvent_override_virtual_Clone(void* self, intptr_t slot); +QInputMethodQueryEvent* QInputMethodQueryEvent_virtualbase_Clone(const void* self); +void QInputMethodQueryEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QInputMethodQueryEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass); + +void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); QDropEvent* QDropEvent_Clone(const QDropEvent* self); QPoint* QDropEvent_Pos(const QDropEvent* self); QPointF* QDropEvent_PosF(const QDropEvent* self); @@ -417,27 +541,39 @@ int QDropEvent_DropAction(const QDropEvent* self); void QDropEvent_SetDropAction(QDropEvent* self, int action); QObject* QDropEvent_Source(const QDropEvent* self); QMimeData* QDropEvent_MimeData(const QDropEvent* self); -void QDropEvent_Delete(QDropEvent* self); - -QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); -QDragMoveEvent* QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDropEvent_override_virtual_Clone(void* self, intptr_t slot); +QDropEvent* QDropEvent_virtualbase_Clone(const void* self); +void QDropEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QDropEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QDropEvent_Delete(QDropEvent* self, bool isSubclass); + +void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +void QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); QDragMoveEvent* QDragMoveEvent_Clone(const QDragMoveEvent* self); QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self); void QDragMoveEvent_Accept(QDragMoveEvent* self); void QDragMoveEvent_Ignore(QDragMoveEvent* self); void QDragMoveEvent_AcceptWithQRect(QDragMoveEvent* self, QRect* r); void QDragMoveEvent_IgnoreWithQRect(QDragMoveEvent* self, QRect* r); -void QDragMoveEvent_Delete(QDragMoveEvent* self); +void QDragMoveEvent_override_virtual_Clone(void* self, intptr_t slot); +QDragMoveEvent* QDragMoveEvent_virtualbase_Clone(const void* self); +void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass); -QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); +void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); QDragEnterEvent* QDragEnterEvent_Clone(const QDragEnterEvent* self); -void QDragEnterEvent_Delete(QDragEnterEvent* self); +void QDragEnterEvent_override_virtual_Clone(void* self, intptr_t slot); +QDragEnterEvent* QDragEnterEvent_virtualbase_Clone(const void* self); +void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass); -QDragLeaveEvent* QDragLeaveEvent_new(); +void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent); QDragLeaveEvent* QDragLeaveEvent_Clone(const QDragLeaveEvent* self); -void QDragLeaveEvent_Delete(QDragLeaveEvent* self); +void QDragLeaveEvent_override_virtual_Clone(void* self, intptr_t slot); +QDragLeaveEvent* QDragLeaveEvent_virtualbase_Clone(const void* self); +void QDragLeaveEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QDragLeaveEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass); -QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos); +void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent); QHelpEvent* QHelpEvent_Clone(const QHelpEvent* self); int QHelpEvent_X(const QHelpEvent* self); int QHelpEvent_Y(const QHelpEvent* self); @@ -445,59 +581,91 @@ int QHelpEvent_GlobalX(const QHelpEvent* self); int QHelpEvent_GlobalY(const QHelpEvent* self); QPoint* QHelpEvent_Pos(const QHelpEvent* self); QPoint* QHelpEvent_GlobalPos(const QHelpEvent* self); -void QHelpEvent_Delete(QHelpEvent* self); +void QHelpEvent_override_virtual_Clone(void* self, intptr_t slot); +QHelpEvent* QHelpEvent_virtualbase_Clone(const void* self); +void QHelpEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QHelpEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass); -QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip); +void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent); QStatusTipEvent* QStatusTipEvent_Clone(const QStatusTipEvent* self); struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self); -void QStatusTipEvent_Delete(QStatusTipEvent* self); +void QStatusTipEvent_override_virtual_Clone(void* self, intptr_t slot); +QStatusTipEvent* QStatusTipEvent_virtualbase_Clone(const void* self); +void QStatusTipEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QStatusTipEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass); -QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href); +void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent); QWhatsThisClickedEvent* QWhatsThisClickedEvent_Clone(const QWhatsThisClickedEvent* self); struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* self); -void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self); - -QActionEvent* QActionEvent_new(int typeVal, QAction* action); -QActionEvent* QActionEvent_new2(int typeVal, QAction* action, QAction* before); +void QWhatsThisClickedEvent_override_virtual_Clone(void* self, intptr_t slot); +QWhatsThisClickedEvent* QWhatsThisClickedEvent_virtualbase_Clone(const void* self); +void QWhatsThisClickedEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QWhatsThisClickedEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass); + +void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); +void QActionEvent_new2(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); QActionEvent* QActionEvent_Clone(const QActionEvent* self); QAction* QActionEvent_Action(const QActionEvent* self); QAction* QActionEvent_Before(const QActionEvent* self); -void QActionEvent_Delete(QActionEvent* self); - -QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file); -QFileOpenEvent* QFileOpenEvent_new2(QUrl* url); +void QActionEvent_override_virtual_Clone(void* self, intptr_t slot); +QActionEvent* QActionEvent_virtualbase_Clone(const void* self); +void QActionEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QActionEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QActionEvent_Delete(QActionEvent* self, bool isSubclass); + +void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); +void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); QFileOpenEvent* QFileOpenEvent_Clone(const QFileOpenEvent* self); struct miqt_string QFileOpenEvent_File(const QFileOpenEvent* self); QUrl* QFileOpenEvent_Url(const QFileOpenEvent* self); bool QFileOpenEvent_OpenFile(const QFileOpenEvent* self, QFile* file, int flags); -void QFileOpenEvent_Delete(QFileOpenEvent* self); +void QFileOpenEvent_override_virtual_Clone(void* self, intptr_t slot); +QFileOpenEvent* QFileOpenEvent_virtualbase_Clone(const void* self); +void QFileOpenEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QFileOpenEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass); -QToolBarChangeEvent* QToolBarChangeEvent_new(bool t); +void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent); QToolBarChangeEvent* QToolBarChangeEvent_Clone(const QToolBarChangeEvent* self); bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self); -void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self); - -QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id); -QShortcutEvent* QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous); +void QToolBarChangeEvent_override_virtual_Clone(void* self, intptr_t slot); +QToolBarChangeEvent* QToolBarChangeEvent_virtualbase_Clone(const void* self); +void QToolBarChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QToolBarChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass); + +void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); +void QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); QShortcutEvent* QShortcutEvent_Clone(const QShortcutEvent* self); QKeySequence* QShortcutEvent_Key(const QShortcutEvent* self); int QShortcutEvent_ShortcutId(const QShortcutEvent* self); bool QShortcutEvent_IsAmbiguous(const QShortcutEvent* self); -void QShortcutEvent_Delete(QShortcutEvent* self); - -QWindowStateChangeEvent* QWindowStateChangeEvent_new(int oldState); -QWindowStateChangeEvent* QWindowStateChangeEvent_new2(int oldState, bool isOverride); +void QShortcutEvent_override_virtual_Clone(void* self, intptr_t slot); +QShortcutEvent* QShortcutEvent_virtualbase_Clone(const void* self); +void QShortcutEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QShortcutEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass); + +void QWindowStateChangeEvent_new(int oldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); +void QWindowStateChangeEvent_new2(int oldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); QWindowStateChangeEvent* QWindowStateChangeEvent_Clone(const QWindowStateChangeEvent* self); int QWindowStateChangeEvent_OldState(const QWindowStateChangeEvent* self); bool QWindowStateChangeEvent_IsOverride(const QWindowStateChangeEvent* self); -void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self); - -QTouchEvent* QTouchEvent_new(int eventType); -QTouchEvent* QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates); -QTouchEvent* QTouchEvent_new3(int eventType, QPointingDevice* device); -QTouchEvent* QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers); -QTouchEvent* QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints); -QTouchEvent* QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints); +void QWindowStateChangeEvent_override_virtual_Clone(void* self, intptr_t slot); +QWindowStateChangeEvent* QWindowStateChangeEvent_virtualbase_Clone(const void* self); +void QWindowStateChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QWindowStateChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubclass); + +void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new3(int eventType, QPointingDevice* device, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +void QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); QTouchEvent* QTouchEvent_Clone(const QTouchEvent* self); QObject* QTouchEvent_Target(const QTouchEvent* self); uint8_t QTouchEvent_TouchPointStates(const QTouchEvent* self); @@ -505,9 +673,21 @@ struct miqt_array /* of QEventPoint* */ QTouchEvent_TouchPoints(const QTouchEve bool QTouchEvent_IsBeginEvent(const QTouchEvent* self); bool QTouchEvent_IsUpdateEvent(const QTouchEvent* self); bool QTouchEvent_IsEndEvent(const QTouchEvent* self); -void QTouchEvent_Delete(QTouchEvent* self); - -QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos); +void QTouchEvent_override_virtual_Clone(void* self, intptr_t slot); +QTouchEvent* QTouchEvent_virtualbase_Clone(const void* self); +void QTouchEvent_override_virtual_IsBeginEvent(void* self, intptr_t slot); +bool QTouchEvent_virtualbase_IsBeginEvent(const void* self); +void QTouchEvent_override_virtual_IsUpdateEvent(void* self, intptr_t slot); +bool QTouchEvent_virtualbase_IsUpdateEvent(const void* self); +void QTouchEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); +bool QTouchEvent_virtualbase_IsEndEvent(const void* self); +void QTouchEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); +void QTouchEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); +void QTouchEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QTouchEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass); + +void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent); QScrollPrepareEvent* QScrollPrepareEvent_Clone(const QScrollPrepareEvent* self); QPointF* QScrollPrepareEvent_StartPos(const QScrollPrepareEvent* self); QSizeF* QScrollPrepareEvent_ViewportSize(const QScrollPrepareEvent* self); @@ -516,31 +696,47 @@ QPointF* QScrollPrepareEvent_ContentPos(const QScrollPrepareEvent* self); void QScrollPrepareEvent_SetViewportSize(QScrollPrepareEvent* self, QSizeF* size); void QScrollPrepareEvent_SetContentPosRange(QScrollPrepareEvent* self, QRectF* rect); void QScrollPrepareEvent_SetContentPos(QScrollPrepareEvent* self, QPointF* pos); -void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self); +void QScrollPrepareEvent_override_virtual_Clone(void* self, intptr_t slot); +QScrollPrepareEvent* QScrollPrepareEvent_virtualbase_Clone(const void* self); +void QScrollPrepareEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QScrollPrepareEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass); -QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState); +void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent); QScrollEvent* QScrollEvent_Clone(const QScrollEvent* self); QPointF* QScrollEvent_ContentPos(const QScrollEvent* self); QPointF* QScrollEvent_OvershootDistance(const QScrollEvent* self); int QScrollEvent_ScrollState(const QScrollEvent* self); -void QScrollEvent_Delete(QScrollEvent* self); +void QScrollEvent_override_virtual_Clone(void* self, intptr_t slot); +QScrollEvent* QScrollEvent_virtualbase_Clone(const void* self); +void QScrollEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QScrollEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass); -QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation); +void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent); QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_Clone(const QScreenOrientationChangeEvent* self); QScreen* QScreenOrientationChangeEvent_Screen(const QScreenOrientationChangeEvent* self); int QScreenOrientationChangeEvent_Orientation(const QScreenOrientationChangeEvent* self); -void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self); +void QScreenOrientationChangeEvent_override_virtual_Clone(void* self, intptr_t slot); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_virtualbase_Clone(const void* self); +void QScreenOrientationChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QScreenOrientationChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, bool isSubclass); -QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state); +void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent); QApplicationStateChangeEvent* QApplicationStateChangeEvent_Clone(const QApplicationStateChangeEvent* self); int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeEvent* self); -void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self); - -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val); -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l); -QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1); +void QApplicationStateChangeEvent_override_virtual_Clone(void* self, intptr_t slot); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_virtualbase_Clone(const void* self); +void QApplicationStateChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QApplicationStateChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, bool isSubclass); + +void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); +void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); +void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1); -void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self); +void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qeventloop.cpp b/qt6/gen_qeventloop.cpp index 293a8589..d8d028d3 100644 --- a/qt6/gen_qeventloop.cpp +++ b/qt6/gen_qeventloop.cpp @@ -1,22 +1,210 @@ +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qeventloop.h" #include "_cgo_export.h" -QEventLoop* QEventLoop_new() { - return new QEventLoop(); +class MiqtVirtualQEventLoop : public virtual QEventLoop { +public: + + MiqtVirtualQEventLoop(): QEventLoop() {}; + MiqtVirtualQEventLoop(QObject* parent): QEventLoop(parent) {}; + + virtual ~MiqtVirtualQEventLoop() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QEventLoop::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QEventLoop_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QEventLoop::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QEventLoop::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QEventLoop_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QEventLoop::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QEventLoop::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QEventLoop_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QEventLoop::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QEventLoop::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QEventLoop_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QEventLoop::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QEventLoop::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QEventLoop_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QEventLoop::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QEventLoop::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QEventLoop_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QEventLoop::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QEventLoop::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QEventLoop_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QEventLoop::disconnectNotify(*signal); + + } + +}; + +void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { + MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(); + *outptr_QEventLoop = ret; + *outptr_QObject = static_cast(ret); } -QEventLoop* QEventLoop_new2(QObject* parent) { - return new QEventLoop(parent); +void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { + MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(parent); + *outptr_QEventLoop = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QEventLoop_MetaObject(const QEventLoop* self) { @@ -104,23 +292,90 @@ void QEventLoop_Exit1(QEventLoop* self, int returnCode) { self->exit(static_cast(returnCode)); } -void QEventLoop_Delete(QEventLoop* self) { - delete self; +void QEventLoop_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__Event = slot; +} + +bool QEventLoop_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_Event(event); +} + +void QEventLoop_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__EventFilter = slot; +} + +bool QEventLoop_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QEventLoop_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__TimerEvent = slot; +} + +void QEventLoop_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_TimerEvent(event); +} + +void QEventLoop_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__ChildEvent = slot; +} + +void QEventLoop_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_ChildEvent(event); +} + +void QEventLoop_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__CustomEvent = slot; +} + +void QEventLoop_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_CustomEvent(event); +} + +void QEventLoop_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__ConnectNotify = slot; +} + +void QEventLoop_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QEventLoop_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QEventLoop*)(self) )->handle__DisconnectNotify = slot; +} + +void QEventLoop_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQEventLoop*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QEventLoop_Delete(QEventLoop* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QEventLoopLocker* QEventLoopLocker_new() { - return new QEventLoopLocker(); +void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker) { + QEventLoopLocker* ret = new QEventLoopLocker(); + *outptr_QEventLoopLocker = ret; } -QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop) { - return new QEventLoopLocker(loop); +void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker) { + QEventLoopLocker* ret = new QEventLoopLocker(loop); + *outptr_QEventLoopLocker = ret; } -QEventLoopLocker* QEventLoopLocker_new3(QThread* thread) { - return new QEventLoopLocker(thread); +void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker) { + QEventLoopLocker* ret = new QEventLoopLocker(thread); + *outptr_QEventLoopLocker = ret; } -void QEventLoopLocker_Delete(QEventLoopLocker* self) { - delete self; +void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qeventloop.go b/qt6/gen_qeventloop.go index 42b32b14..bd383510 100644 --- a/qt6/gen_qeventloop.go +++ b/qt6/gen_qeventloop.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -27,7 +28,8 @@ const ( ) type QEventLoop struct { - h *C.QEventLoop + h *C.QEventLoop + isSubclass bool *QObject } @@ -45,27 +47,45 @@ func (this *QEventLoop) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQEventLoop(h *C.QEventLoop) *QEventLoop { +// newQEventLoop constructs the type using only CGO pointers. +func newQEventLoop(h *C.QEventLoop, h_QObject *C.QObject) *QEventLoop { if h == nil { return nil } - return &QEventLoop{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QEventLoop{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQEventLoop(h unsafe.Pointer) *QEventLoop { - return newQEventLoop((*C.QEventLoop)(h)) +// UnsafeNewQEventLoop constructs the type using only unsafe pointers. +func UnsafeNewQEventLoop(h unsafe.Pointer, h_QObject unsafe.Pointer) *QEventLoop { + if h == nil { + return nil + } + + return &QEventLoop{h: (*C.QEventLoop)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQEventLoop constructs a new QEventLoop object. func NewQEventLoop() *QEventLoop { - ret := C.QEventLoop_new() - return newQEventLoop(ret) + var outptr_QEventLoop *C.QEventLoop = nil + var outptr_QObject *C.QObject = nil + + C.QEventLoop_new(&outptr_QEventLoop, &outptr_QObject) + ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret.isSubclass = true + return ret } // NewQEventLoop2 constructs a new QEventLoop object. func NewQEventLoop2(parent *QObject) *QEventLoop { - ret := C.QEventLoop_new2(parent.cPointer()) - return newQEventLoop(ret) + var outptr_QEventLoop *C.QEventLoop = nil + var outptr_QObject *C.QObject = nil + + C.QEventLoop_new2(parent.cPointer(), &outptr_QEventLoop, &outptr_QObject) + ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QEventLoop) MetaObject() *QMetaObject { @@ -153,9 +173,175 @@ func (this *QEventLoop) Exit1(returnCode int) { C.QEventLoop_Exit1(this.h, (C.int)(returnCode)) } +func (this *QEventLoop) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QEventLoop_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QEventLoop) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QEventLoop_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_Event +func miqt_exec_callback_QEventLoop_Event(self *C.QEventLoop, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QEventLoop{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QEventLoop) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QEventLoop_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QEventLoop) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QEventLoop_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_EventFilter +func miqt_exec_callback_QEventLoop_EventFilter(self *C.QEventLoop, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QEventLoop{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QEventLoop) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QEventLoop_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventLoop) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QEventLoop_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_TimerEvent +func miqt_exec_callback_QEventLoop_TimerEvent(self *C.QEventLoop, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QEventLoop{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QEventLoop_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventLoop) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QEventLoop_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_ChildEvent +func miqt_exec_callback_QEventLoop_ChildEvent(self *C.QEventLoop, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QEventLoop{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_CustomEvent(event *QEvent) { + + C.QEventLoop_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QEventLoop) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QEventLoop_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_CustomEvent +func miqt_exec_callback_QEventLoop_CustomEvent(self *C.QEventLoop, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QEventLoop{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QEventLoop_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QEventLoop) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QEventLoop_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_ConnectNotify +func miqt_exec_callback_QEventLoop_ConnectNotify(self *C.QEventLoop, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QEventLoop{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QEventLoop) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QEventLoop_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QEventLoop) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QEventLoop_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QEventLoop_DisconnectNotify +func miqt_exec_callback_QEventLoop_DisconnectNotify(self *C.QEventLoop, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QEventLoop{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QEventLoop) Delete() { - C.QEventLoop_Delete(this.h) + C.QEventLoop_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -168,7 +354,8 @@ func (this *QEventLoop) GoGC() { } type QEventLoopLocker struct { - h *C.QEventLoopLocker + h *C.QEventLoopLocker + isSubclass bool } func (this *QEventLoopLocker) cPointer() *C.QEventLoopLocker { @@ -185,6 +372,7 @@ func (this *QEventLoopLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEventLoopLocker constructs the type using only CGO pointers. func newQEventLoopLocker(h *C.QEventLoopLocker) *QEventLoopLocker { if h == nil { return nil @@ -192,31 +380,48 @@ func newQEventLoopLocker(h *C.QEventLoopLocker) *QEventLoopLocker { return &QEventLoopLocker{h: h} } +// UnsafeNewQEventLoopLocker constructs the type using only unsafe pointers. func UnsafeNewQEventLoopLocker(h unsafe.Pointer) *QEventLoopLocker { - return newQEventLoopLocker((*C.QEventLoopLocker)(h)) + if h == nil { + return nil + } + + return &QEventLoopLocker{h: (*C.QEventLoopLocker)(h)} } // NewQEventLoopLocker constructs a new QEventLoopLocker object. func NewQEventLoopLocker() *QEventLoopLocker { - ret := C.QEventLoopLocker_new() - return newQEventLoopLocker(ret) + var outptr_QEventLoopLocker *C.QEventLoopLocker = nil + + C.QEventLoopLocker_new(&outptr_QEventLoopLocker) + ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret.isSubclass = true + return ret } // NewQEventLoopLocker2 constructs a new QEventLoopLocker object. func NewQEventLoopLocker2(loop *QEventLoop) *QEventLoopLocker { - ret := C.QEventLoopLocker_new2(loop.cPointer()) - return newQEventLoopLocker(ret) + var outptr_QEventLoopLocker *C.QEventLoopLocker = nil + + C.QEventLoopLocker_new2(loop.cPointer(), &outptr_QEventLoopLocker) + ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret.isSubclass = true + return ret } // NewQEventLoopLocker3 constructs a new QEventLoopLocker object. func NewQEventLoopLocker3(thread *QThread) *QEventLoopLocker { - ret := C.QEventLoopLocker_new3(thread.cPointer()) - return newQEventLoopLocker(ret) + var outptr_QEventLoopLocker *C.QEventLoopLocker = nil + + C.QEventLoopLocker_new3(thread.cPointer(), &outptr_QEventLoopLocker) + ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QEventLoopLocker) Delete() { - C.QEventLoopLocker_Delete(this.h) + C.QEventLoopLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qeventloop.h b/qt6/gen_qeventloop.h index a8d2ab65..f72d2400 100644 --- a/qt6/gen_qeventloop.h +++ b/qt6/gen_qeventloop.h @@ -15,23 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QEvent; class QEventLoop; class QEventLoopLocker; +class QMetaMethod; class QMetaObject; class QObject; class QThread; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QEventLoop QEventLoop; typedef struct QEventLoopLocker QEventLoopLocker; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; #endif -QEventLoop* QEventLoop_new(); -QEventLoop* QEventLoop_new2(QObject* parent); +void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); +void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); QMetaObject* QEventLoop_MetaObject(const QEventLoop* self); void* QEventLoop_Metacast(QEventLoop* self, const char* param1); struct miqt_string QEventLoop_Tr(const char* s); @@ -48,12 +54,26 @@ struct miqt_string QEventLoop_Tr3(const char* s, const char* c, int n); bool QEventLoop_ProcessEvents1(QEventLoop* self, int flags); int QEventLoop_Exec1(QEventLoop* self, int flags); void QEventLoop_Exit1(QEventLoop* self, int returnCode); -void QEventLoop_Delete(QEventLoop* self); +void QEventLoop_override_virtual_Event(void* self, intptr_t slot); +bool QEventLoop_virtualbase_Event(void* self, QEvent* event); +void QEventLoop_override_virtual_EventFilter(void* self, intptr_t slot); +bool QEventLoop_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QEventLoop_override_virtual_TimerEvent(void* self, intptr_t slot); +void QEventLoop_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QEventLoop_override_virtual_ChildEvent(void* self, intptr_t slot); +void QEventLoop_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QEventLoop_override_virtual_CustomEvent(void* self, intptr_t slot); +void QEventLoop_virtualbase_CustomEvent(void* self, QEvent* event); +void QEventLoop_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QEventLoop_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QEventLoop_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QEventLoop_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QEventLoop_Delete(QEventLoop* self, bool isSubclass); -QEventLoopLocker* QEventLoopLocker_new(); -QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop); -QEventLoopLocker* QEventLoopLocker_new3(QThread* thread); -void QEventLoopLocker_Delete(QEventLoopLocker* self); +void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker); +void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker); +void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker); +void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qeventpoint.cpp b/qt6/gen_qeventpoint.cpp index 003ce5b8..4bb064bb 100644 --- a/qt6/gen_qeventpoint.cpp +++ b/qt6/gen_qeventpoint.cpp @@ -8,24 +8,29 @@ #include "gen_qeventpoint.h" #include "_cgo_export.h" -QEventPoint* QEventPoint_new() { - return new QEventPoint(); +void QEventPoint_new(QEventPoint** outptr_QEventPoint) { + QEventPoint* ret = new QEventPoint(); + *outptr_QEventPoint = ret; } -QEventPoint* QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition) { - return new QEventPoint(static_cast(pointId), static_cast(state), *scenePosition, *globalPosition); +void QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition, QEventPoint** outptr_QEventPoint) { + QEventPoint* ret = new QEventPoint(static_cast(pointId), static_cast(state), *scenePosition, *globalPosition); + *outptr_QEventPoint = ret; } -QEventPoint* QEventPoint_new3(QEventPoint* other) { - return new QEventPoint(*other); +void QEventPoint_new3(QEventPoint* other, QEventPoint** outptr_QEventPoint) { + QEventPoint* ret = new QEventPoint(*other); + *outptr_QEventPoint = ret; } -QEventPoint* QEventPoint_new4(int id) { - return new QEventPoint(static_cast(id)); +void QEventPoint_new4(int id, QEventPoint** outptr_QEventPoint) { + QEventPoint* ret = new QEventPoint(static_cast(id)); + *outptr_QEventPoint = ret; } -QEventPoint* QEventPoint_new5(int id, QPointingDevice* device) { - return new QEventPoint(static_cast(id), device); +void QEventPoint_new5(int id, QPointingDevice* device, QEventPoint** outptr_QEventPoint) { + QEventPoint* ret = new QEventPoint(static_cast(id), device); + *outptr_QEventPoint = ret; } void QEventPoint_OperatorAssign(QEventPoint* self, QEventPoint* other) { @@ -211,7 +216,11 @@ void QEventPoint_SetAccepted1(QEventPoint* self, bool accepted) { self->setAccepted(accepted); } -void QEventPoint_Delete(QEventPoint* self) { - delete self; +void QEventPoint_Delete(QEventPoint* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qeventpoint.go b/qt6/gen_qeventpoint.go index 3fb254ce..0b0b1933 100644 --- a/qt6/gen_qeventpoint.go +++ b/qt6/gen_qeventpoint.go @@ -24,7 +24,8 @@ const ( ) type QEventPoint struct { - h *C.QEventPoint + h *C.QEventPoint + isSubclass bool } func (this *QEventPoint) cPointer() *C.QEventPoint { @@ -41,6 +42,7 @@ func (this *QEventPoint) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQEventPoint constructs the type using only CGO pointers. func newQEventPoint(h *C.QEventPoint) *QEventPoint { if h == nil { return nil @@ -48,38 +50,63 @@ func newQEventPoint(h *C.QEventPoint) *QEventPoint { return &QEventPoint{h: h} } +// UnsafeNewQEventPoint constructs the type using only unsafe pointers. func UnsafeNewQEventPoint(h unsafe.Pointer) *QEventPoint { - return newQEventPoint((*C.QEventPoint)(h)) + if h == nil { + return nil + } + + return &QEventPoint{h: (*C.QEventPoint)(h)} } // NewQEventPoint constructs a new QEventPoint object. func NewQEventPoint() *QEventPoint { - ret := C.QEventPoint_new() - return newQEventPoint(ret) + var outptr_QEventPoint *C.QEventPoint = nil + + C.QEventPoint_new(&outptr_QEventPoint) + ret := newQEventPoint(outptr_QEventPoint) + ret.isSubclass = true + return ret } // NewQEventPoint2 constructs a new QEventPoint object. func NewQEventPoint2(pointId int, state QEventPoint__State, scenePosition *QPointF, globalPosition *QPointF) *QEventPoint { - ret := C.QEventPoint_new2((C.int)(pointId), (C.uint8_t)(state), scenePosition.cPointer(), globalPosition.cPointer()) - return newQEventPoint(ret) + var outptr_QEventPoint *C.QEventPoint = nil + + C.QEventPoint_new2((C.int)(pointId), (C.uint8_t)(state), scenePosition.cPointer(), globalPosition.cPointer(), &outptr_QEventPoint) + ret := newQEventPoint(outptr_QEventPoint) + ret.isSubclass = true + return ret } // NewQEventPoint3 constructs a new QEventPoint object. func NewQEventPoint3(other *QEventPoint) *QEventPoint { - ret := C.QEventPoint_new3(other.cPointer()) - return newQEventPoint(ret) + var outptr_QEventPoint *C.QEventPoint = nil + + C.QEventPoint_new3(other.cPointer(), &outptr_QEventPoint) + ret := newQEventPoint(outptr_QEventPoint) + ret.isSubclass = true + return ret } // NewQEventPoint4 constructs a new QEventPoint object. func NewQEventPoint4(id int) *QEventPoint { - ret := C.QEventPoint_new4((C.int)(id)) - return newQEventPoint(ret) + var outptr_QEventPoint *C.QEventPoint = nil + + C.QEventPoint_new4((C.int)(id), &outptr_QEventPoint) + ret := newQEventPoint(outptr_QEventPoint) + ret.isSubclass = true + return ret } // NewQEventPoint5 constructs a new QEventPoint object. func NewQEventPoint5(id int, device *QPointingDevice) *QEventPoint { - ret := C.QEventPoint_new5((C.int)(id), device.cPointer()) - return newQEventPoint(ret) + var outptr_QEventPoint *C.QEventPoint = nil + + C.QEventPoint_new5((C.int)(id), device.cPointer(), &outptr_QEventPoint) + ret := newQEventPoint(outptr_QEventPoint) + ret.isSubclass = true + return ret } func (this *QEventPoint) OperatorAssign(other *QEventPoint) { @@ -285,7 +312,7 @@ func (this *QEventPoint) State() QEventPoint__State { } func (this *QEventPoint) Device() *QPointingDevice { - return UnsafeNewQPointingDevice(unsafe.Pointer(C.QEventPoint_Device(this.h))) + return UnsafeNewQPointingDevice(unsafe.Pointer(C.QEventPoint_Device(this.h)), nil, nil) } func (this *QEventPoint) Id() int { @@ -344,7 +371,7 @@ func (this *QEventPoint) SetAccepted1(accepted bool) { // Delete this object from C++ memory. func (this *QEventPoint) Delete() { - C.QEventPoint_Delete(this.h) + C.QEventPoint_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qeventpoint.h b/qt6/gen_qeventpoint.h index daf2e35a..d44fed45 100644 --- a/qt6/gen_qeventpoint.h +++ b/qt6/gen_qeventpoint.h @@ -30,11 +30,11 @@ typedef struct QSizeF QSizeF; typedef struct QVector2D QVector2D; #endif -QEventPoint* QEventPoint_new(); -QEventPoint* QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition); -QEventPoint* QEventPoint_new3(QEventPoint* other); -QEventPoint* QEventPoint_new4(int id); -QEventPoint* QEventPoint_new5(int id, QPointingDevice* device); +void QEventPoint_new(QEventPoint** outptr_QEventPoint); +void QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition, QEventPoint** outptr_QEventPoint); +void QEventPoint_new3(QEventPoint* other, QEventPoint** outptr_QEventPoint); +void QEventPoint_new4(int id, QEventPoint** outptr_QEventPoint); +void QEventPoint_new5(int id, QPointingDevice* device, QEventPoint** outptr_QEventPoint); void QEventPoint_OperatorAssign(QEventPoint* self, QEventPoint* other); bool QEventPoint_OperatorEqual(const QEventPoint* self, QEventPoint* other); bool QEventPoint_OperatorNotEqual(const QEventPoint* self, QEventPoint* other); @@ -79,7 +79,7 @@ QSizeF* QEventPoint_EllipseDiameters(const QEventPoint* self); bool QEventPoint_IsAccepted(const QEventPoint* self); void QEventPoint_SetAccepted(QEventPoint* self); void QEventPoint_SetAccepted1(QEventPoint* self, bool accepted); -void QEventPoint_Delete(QEventPoint* self); +void QEventPoint_Delete(QEventPoint* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qexception.cpp b/qt6/gen_qexception.cpp index d8fef9fb..d96ea7be 100644 --- a/qt6/gen_qexception.cpp +++ b/qt6/gen_qexception.cpp @@ -15,7 +15,11 @@ void QtPrivate__ExceptionStore_RethrowException(const QtPrivate__ExceptionStore* self->rethrowException(); } -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self) { - delete self; +void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qexception.go b/qt6/gen_qexception.go index 5cfd01ed..60496899 100644 --- a/qt6/gen_qexception.go +++ b/qt6/gen_qexception.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__ExceptionStore struct { - h *C.QtPrivate__ExceptionStore + h *C.QtPrivate__ExceptionStore + isSubclass bool } func (this *QtPrivate__ExceptionStore) cPointer() *C.QtPrivate__ExceptionStore { @@ -31,6 +32,7 @@ func (this *QtPrivate__ExceptionStore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ExceptionStore constructs the type using only CGO pointers. func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__ExceptionStore { if h == nil { return nil @@ -38,8 +40,13 @@ func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__Ex return &QtPrivate__ExceptionStore{h: h} } +// UnsafeNewQtPrivate__ExceptionStore constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ExceptionStore(h unsafe.Pointer) *QtPrivate__ExceptionStore { - return newQtPrivate__ExceptionStore((*C.QtPrivate__ExceptionStore)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ExceptionStore{h: (*C.QtPrivate__ExceptionStore)(h)} } func (this *QtPrivate__ExceptionStore) HasException() bool { @@ -56,7 +63,7 @@ func (this *QtPrivate__ExceptionStore) RethrowException() { // Delete this object from C++ memory. func (this *QtPrivate__ExceptionStore) Delete() { - C.QtPrivate__ExceptionStore_Delete(this.h) + C.QtPrivate__ExceptionStore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qexception.h b/qt6/gen_qexception.h index a8501f3e..e4ae630f 100644 --- a/qt6/gen_qexception.h +++ b/qt6/gen_qexception.h @@ -27,7 +27,7 @@ typedef struct QtPrivate__ExceptionStore QtPrivate__ExceptionStore; bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self); void QtPrivate__ExceptionStore_ThrowPossibleException(QtPrivate__ExceptionStore* self); void QtPrivate__ExceptionStore_RethrowException(const QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self); +void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfactoryinterface.cpp b/qt6/gen_qfactoryinterface.cpp index 668f3c85..a8356a18 100644 --- a/qt6/gen_qfactoryinterface.cpp +++ b/qt6/gen_qfactoryinterface.cpp @@ -27,7 +27,11 @@ struct miqt_array /* of struct miqt_string */ QFactoryInterface_Keys(const QFac return _out; } -void QFactoryInterface_Delete(QFactoryInterface* self) { - delete self; +void QFactoryInterface_Delete(QFactoryInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfactoryinterface.go b/qt6/gen_qfactoryinterface.go index 91d5fe37..6254f310 100644 --- a/qt6/gen_qfactoryinterface.go +++ b/qt6/gen_qfactoryinterface.go @@ -14,7 +14,8 @@ import ( ) type QFactoryInterface struct { - h *C.QFactoryInterface + h *C.QFactoryInterface + isSubclass bool } func (this *QFactoryInterface) cPointer() *C.QFactoryInterface { @@ -31,6 +32,7 @@ func (this *QFactoryInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFactoryInterface constructs the type using only CGO pointers. func newQFactoryInterface(h *C.QFactoryInterface) *QFactoryInterface { if h == nil { return nil @@ -38,8 +40,13 @@ func newQFactoryInterface(h *C.QFactoryInterface) *QFactoryInterface { return &QFactoryInterface{h: h} } +// UnsafeNewQFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQFactoryInterface(h unsafe.Pointer) *QFactoryInterface { - return newQFactoryInterface((*C.QFactoryInterface)(h)) + if h == nil { + return nil + } + + return &QFactoryInterface{h: (*C.QFactoryInterface)(h)} } func (this *QFactoryInterface) Keys() []string { @@ -57,7 +64,7 @@ func (this *QFactoryInterface) Keys() []string { // Delete this object from C++ memory. func (this *QFactoryInterface) Delete() { - C.QFactoryInterface_Delete(this.h) + C.QFactoryInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfactoryinterface.h b/qt6/gen_qfactoryinterface.h index 3e6e302b..a68b8732 100644 --- a/qt6/gen_qfactoryinterface.h +++ b/qt6/gen_qfactoryinterface.h @@ -21,7 +21,7 @@ typedef struct QFactoryInterface QFactoryInterface; #endif struct miqt_array /* of struct miqt_string */ QFactoryInterface_Keys(const QFactoryInterface* self); -void QFactoryInterface_Delete(QFactoryInterface* self); +void QFactoryInterface_Delete(QFactoryInterface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfile.cpp b/qt6/gen_qfile.cpp index 803b87cf..7368732d 100644 --- a/qt6/gen_qfile.cpp +++ b/qt6/gen_qfile.cpp @@ -1,5 +1,8 @@ #include #include +#include +#include +#include #include #include #include @@ -9,22 +12,394 @@ #include "gen_qfile.h" #include "_cgo_export.h" -QFile* QFile_new() { - return new QFile(); +class MiqtVirtualQFile : public virtual QFile { +public: + + MiqtVirtualQFile(): QFile() {}; + MiqtVirtualQFile(const QString& name): QFile(name) {}; + MiqtVirtualQFile(QObject* parent): QFile(parent) {}; + MiqtVirtualQFile(const QString& name, QObject* parent): QFile(name, parent) {}; + + virtual ~MiqtVirtualQFile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FileName = 0; + + // Subclass to allow providing a Go implementation + virtual QString fileName() const override { + if (handle__FileName == 0) { + return QFile::fileName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QFile_FileName(const_cast(this), handle__FileName); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FileName() const { + + QString _ret = QFile::fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode flags) override { + if (handle__Open == 0) { + return QFile::open(flags); + } + + QIODeviceBase::OpenMode flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QFile_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int flags) { + + return QFile::open(static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QFile::size(); + } + + + long long callback_return_value = miqt_exec_callback_QFile_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QFile::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resize = 0; + + // Subclass to allow providing a Go implementation + virtual bool resize(qint64 sz) override { + if (handle__Resize == 0) { + return QFile::resize(sz); + } + + qint64 sz_ret = sz; + long long sigval1 = static_cast(sz_ret); + + bool callback_return_value = miqt_exec_callback_QFile_Resize(this, handle__Resize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Resize(long long sz) { + + return QFile::resize(static_cast(sz)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Permissions = 0; + + // Subclass to allow providing a Go implementation + virtual QFileDevice::Permissions permissions() const override { + if (handle__Permissions == 0) { + return QFile::permissions(); + } + + + int callback_return_value = miqt_exec_callback_QFile_Permissions(const_cast(this), handle__Permissions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Permissions() const { + + QFileDevice::Permissions _ret = QFile::permissions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPermissions = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPermissions(QFileDevice::Permissions permissionSpec) override { + if (handle__SetPermissions == 0) { + return QFile::setPermissions(permissionSpec); + } + + QFileDevice::Permissions permissionSpec_ret = permissionSpec; + int sigval1 = static_cast(permissionSpec_ret); + + bool callback_return_value = miqt_exec_callback_QFile_SetPermissions(this, handle__SetPermissions, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPermissions(int permissionSpec) { + + return QFile::setPermissions(static_cast(permissionSpec)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QFile::close(); + return; + } + + + miqt_exec_callback_QFile_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QFile::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QFile::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QFile_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QFile::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QFile::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QFile_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QFile::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 offset) override { + if (handle__Seek == 0) { + return QFile::seek(offset); + } + + qint64 offset_ret = offset; + long long sigval1 = static_cast(offset_ret); + + bool callback_return_value = miqt_exec_callback_QFile_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long offset) { + + return QFile::seek(static_cast(offset)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QFile::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QFile_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QFile::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QFile::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QFile_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QFile::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QFile::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QFile_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QFile::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QFile::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QFile_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QFile::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQFile* ret = new MiqtVirtualQFile(); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QFile* QFile_new2(struct miqt_string name) { +void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QFile(name_QString); + MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QFile* QFile_new3(QObject* parent) { - return new QFile(parent); +void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQFile* ret = new MiqtVirtualQFile(parent); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QFile* QFile_new4(struct miqt_string name, QObject* parent) { +void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QFile(name_QString, parent); + MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString, parent); + *outptr_QFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QFile_MetaObject(const QFile* self) { @@ -250,7 +625,123 @@ bool QFile_Open33(QFile* self, int fd, int ioFlags, int handleFlags) { return self->open(static_cast(fd), static_cast(ioFlags), static_cast(handleFlags)); } -void QFile_Delete(QFile* self) { - delete self; +void QFile_override_virtual_FileName(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__FileName = slot; +} + +struct miqt_string QFile_virtualbase_FileName(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_FileName(); +} + +void QFile_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Open = slot; +} + +bool QFile_virtualbase_Open(void* self, int flags) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_Open(flags); +} + +void QFile_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Size = slot; +} + +long long QFile_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_Size(); +} + +void QFile_override_virtual_Resize(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Resize = slot; +} + +bool QFile_virtualbase_Resize(void* self, long long sz) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_Resize(sz); +} + +void QFile_override_virtual_Permissions(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Permissions = slot; +} + +int QFile_virtualbase_Permissions(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_Permissions(); +} + +void QFile_override_virtual_SetPermissions(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__SetPermissions = slot; +} + +bool QFile_virtualbase_SetPermissions(void* self, int permissionSpec) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_SetPermissions(permissionSpec); +} + +void QFile_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Close = slot; +} + +void QFile_virtualbase_Close(void* self) { + ( (MiqtVirtualQFile*)(self) )->virtualbase_Close(); +} + +void QFile_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__IsSequential = slot; +} + +bool QFile_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_IsSequential(); +} + +void QFile_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Pos = slot; +} + +long long QFile_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_Pos(); +} + +void QFile_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__Seek = slot; +} + +bool QFile_virtualbase_Seek(void* self, long long offset) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_Seek(offset); +} + +void QFile_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__AtEnd = slot; +} + +bool QFile_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQFile*)(self) )->virtualbase_AtEnd(); +} + +void QFile_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__ReadData = slot; +} + +long long QFile_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QFile_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__WriteData = slot; +} + +long long QFile_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QFile_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QFile*)(self) )->handle__ReadLineData = slot; +} + +long long QFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQFile*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QFile_Delete(QFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfile.go b/qt6/gen_qfile.go index a601cbca..cc77700c 100644 --- a/qt6/gen_qfile.go +++ b/qt6/gen_qfile.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFile struct { - h *C.QFile + h *C.QFile + isSubclass bool *QFileDevice } @@ -32,21 +34,37 @@ func (this *QFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFile(h *C.QFile) *QFile { +// newQFile constructs the type using only CGO pointers. +func newQFile(h *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QFile { if h == nil { return nil } - return &QFile{h: h, QFileDevice: UnsafeNewQFileDevice(unsafe.Pointer(h))} + return &QFile{h: h, + QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQFile(h unsafe.Pointer) *QFile { - return newQFile((*C.QFile)(h)) +// UnsafeNewQFile constructs the type using only unsafe pointers. +func UnsafeNewQFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QFile { + if h == nil { + return nil + } + + return &QFile{h: (*C.QFile)(h), + QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQFile constructs a new QFile object. func NewQFile() *QFile { - ret := C.QFile_new() - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QFile_new(&outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQFile2 constructs a new QFile object. @@ -55,14 +73,30 @@ func NewQFile2(name string) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QFile_new2(name_ms) - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QFile_new2(name_ms, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQFile3 constructs a new QFile object. func NewQFile3(parent *QObject) *QFile { - ret := C.QFile_new3(parent.cPointer()) - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QFile_new3(parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQFile4 constructs a new QFile object. @@ -71,8 +105,16 @@ func NewQFile4(name string, parent *QObject) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QFile_new4(name_ms, parent.cPointer()) - return newQFile(ret) + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QFile_new4(name_ms, parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QFile) MetaObject() *QMetaObject { @@ -331,9 +373,357 @@ func (this *QFile) Open33(fd int, ioFlags QIODeviceBase__OpenModeFlag, handleFla return (bool)(C.QFile_Open33(this.h, (C.int)(fd), (C.int)(ioFlags), (C.int)(handleFlags))) } +func (this *QFile) callVirtualBase_FileName() string { + + var _ms C.struct_miqt_string = C.QFile_virtualbase_FileName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QFile) OnFileName(slot func(super func() string) string) { + C.QFile_override_virtual_FileName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_FileName +func miqt_exec_callback_QFile_FileName(self *C.QFile, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_FileName) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QFile) callVirtualBase_Open(flags QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QFile_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(flags))) + +} +func (this *QFile) OnOpen(slot func(super func(flags QIODeviceBase__OpenModeFlag) bool, flags QIODeviceBase__OpenModeFlag) bool) { + C.QFile_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Open +func miqt_exec_callback_QFile_Open(self *C.QFile, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QIODeviceBase__OpenModeFlag) bool, flags QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODeviceBase__OpenModeFlag)(flags) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Size() int64 { + + return (int64)(C.QFile_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnSize(slot func(super func() int64) int64) { + C.QFile_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Size +func miqt_exec_callback_QFile_Size(self *C.QFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Resize(sz int64) bool { + + return (bool)(C.QFile_virtualbase_Resize(unsafe.Pointer(this.h), (C.longlong)(sz))) + +} +func (this *QFile) OnResize(slot func(super func(sz int64) bool, sz int64) bool) { + C.QFile_override_virtual_Resize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Resize +func miqt_exec_callback_QFile_Resize(self *C.QFile, cb C.intptr_t, sz C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sz int64) bool, sz int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(sz) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Resize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Permissions() QFileDevice__Permission { + + return (QFileDevice__Permission)(C.QFile_virtualbase_Permissions(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnPermissions(slot func(super func() QFileDevice__Permission) QFileDevice__Permission) { + C.QFile_override_virtual_Permissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Permissions +func miqt_exec_callback_QFile_Permissions(self *C.QFile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QFileDevice__Permission) QFileDevice__Permission) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Permissions) + + return (C.int)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_SetPermissions(permissionSpec QFileDevice__Permission) bool { + + return (bool)(C.QFile_virtualbase_SetPermissions(unsafe.Pointer(this.h), (C.int)(permissionSpec))) + +} +func (this *QFile) OnSetPermissions(slot func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) { + C.QFile_override_virtual_SetPermissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_SetPermissions +func miqt_exec_callback_QFile_SetPermissions(self *C.QFile, cb C.intptr_t, permissionSpec C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileDevice__Permission)(permissionSpec) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_SetPermissions, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Close() { + + C.QFile_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QFile) OnClose(slot func(super func())) { + C.QFile_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Close +func miqt_exec_callback_QFile_Close(self *C.QFile, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFile{h: self}).callVirtualBase_Close) + +} + +func (this *QFile) callVirtualBase_IsSequential() bool { + + return (bool)(C.QFile_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnIsSequential(slot func(super func() bool) bool) { + C.QFile_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_IsSequential +func miqt_exec_callback_QFile_IsSequential(self *C.QFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Pos() int64 { + + return (int64)(C.QFile_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnPos(slot func(super func() int64) int64) { + C.QFile_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Pos +func miqt_exec_callback_QFile_Pos(self *C.QFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_Seek(offset int64) bool { + + return (bool)(C.QFile_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(offset))) + +} +func (this *QFile) OnSeek(slot func(super func(offset int64) bool, offset int64) bool) { + C.QFile_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_Seek +func miqt_exec_callback_QFile_Seek(self *C.QFile, cb C.intptr_t, offset C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset int64) bool, offset int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(offset) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_AtEnd() bool { + + return (bool)(C.QFile_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QFile) OnAtEnd(slot func(super func() bool) bool) { + C.QFile_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_AtEnd +func miqt_exec_callback_QFile_AtEnd(self *C.QFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QFile_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QFile) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QFile_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_ReadData +func miqt_exec_callback_QFile_ReadData(self *C.QFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QFile_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QFile) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QFile_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_WriteData +func miqt_exec_callback_QFile_WriteData(self *C.QFile, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QFile) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QFile_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QFile) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QFile_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFile_ReadLineData +func miqt_exec_callback_QFile_ReadLineData(self *C.QFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QFile{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFile) Delete() { - C.QFile_Delete(this.h) + C.QFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfile.h b/qt6/gen_qfile.h index d8cadba1..a9e89e3d 100644 --- a/qt6/gen_qfile.h +++ b/qt6/gen_qfile.h @@ -17,19 +17,25 @@ extern "C" { #ifdef __cplusplus class QByteArray; class QFile; +class QFileDevice; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; #else typedef struct QByteArray QByteArray; typedef struct QFile QFile; +typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QFile* QFile_new(); -QFile* QFile_new2(struct miqt_string name); -QFile* QFile_new3(QObject* parent); -QFile* QFile_new4(struct miqt_string name, QObject* parent); +void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QFile_MetaObject(const QFile* self); void* QFile_Metacast(QFile* self, const char* param1); struct miqt_string QFile_Tr(const char* s); @@ -65,7 +71,35 @@ bool QFile_SetPermissions2(struct miqt_string filename, int permissionSpec); struct miqt_string QFile_Tr2(const char* s, const char* c); struct miqt_string QFile_Tr3(const char* s, const char* c, int n); bool QFile_Open33(QFile* self, int fd, int ioFlags, int handleFlags); -void QFile_Delete(QFile* self); +void QFile_override_virtual_FileName(void* self, intptr_t slot); +struct miqt_string QFile_virtualbase_FileName(const void* self); +void QFile_override_virtual_Open(void* self, intptr_t slot); +bool QFile_virtualbase_Open(void* self, int flags); +void QFile_override_virtual_Size(void* self, intptr_t slot); +long long QFile_virtualbase_Size(const void* self); +void QFile_override_virtual_Resize(void* self, intptr_t slot); +bool QFile_virtualbase_Resize(void* self, long long sz); +void QFile_override_virtual_Permissions(void* self, intptr_t slot); +int QFile_virtualbase_Permissions(const void* self); +void QFile_override_virtual_SetPermissions(void* self, intptr_t slot); +bool QFile_virtualbase_SetPermissions(void* self, int permissionSpec); +void QFile_override_virtual_Close(void* self, intptr_t slot); +void QFile_virtualbase_Close(void* self); +void QFile_override_virtual_IsSequential(void* self, intptr_t slot); +bool QFile_virtualbase_IsSequential(const void* self); +void QFile_override_virtual_Pos(void* self, intptr_t slot); +long long QFile_virtualbase_Pos(const void* self); +void QFile_override_virtual_Seek(void* self, intptr_t slot); +bool QFile_virtualbase_Seek(void* self, long long offset); +void QFile_override_virtual_AtEnd(void* self, intptr_t slot); +bool QFile_virtualbase_AtEnd(const void* self); +void QFile_override_virtual_ReadData(void* self, intptr_t slot); +long long QFile_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QFile_override_virtual_WriteData(void* self, intptr_t slot); +long long QFile_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QFile_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QFile_Delete(QFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfiledevice.cpp b/qt6/gen_qfiledevice.cpp index feb182e3..90a80ac8 100644 --- a/qt6/gen_qfiledevice.cpp +++ b/qt6/gen_qfiledevice.cpp @@ -1,6 +1,9 @@ #include #include +#include +#include #include +#include #include #include #include @@ -138,7 +141,11 @@ unsigned char* QFileDevice_Map3(QFileDevice* self, long long offset, long long s return static_cast(_ret); } -void QFileDevice_Delete(QFileDevice* self) { - delete self; +void QFileDevice_Delete(QFileDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfiledevice.go b/qt6/gen_qfiledevice.go index 2c5664be..0dabadff 100644 --- a/qt6/gen_qfiledevice.go +++ b/qt6/gen_qfiledevice.go @@ -74,7 +74,8 @@ const ( ) type QFileDevice struct { - h *C.QFileDevice + h *C.QFileDevice + isSubclass bool *QIODevice } @@ -92,15 +93,23 @@ func (this *QFileDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileDevice(h *C.QFileDevice) *QFileDevice { +// newQFileDevice constructs the type using only CGO pointers. +func newQFileDevice(h *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QFileDevice { if h == nil { return nil } - return &QFileDevice{h: h, QIODevice: UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QFileDevice{h: h, + QIODevice: newQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQFileDevice(h unsafe.Pointer) *QFileDevice { - return newQFileDevice((*C.QFileDevice)(h)) +// UnsafeNewQFileDevice constructs the type using only unsafe pointers. +func UnsafeNewQFileDevice(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QFileDevice { + if h == nil { + return nil + } + + return &QFileDevice{h: (*C.QFileDevice)(h), + QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } func (this *QFileDevice) MetaObject() *QMetaObject { @@ -228,7 +237,7 @@ func (this *QFileDevice) Map3(offset int64, size int64, flags QFileDevice__Memor // Delete this object from C++ memory. func (this *QFileDevice) Delete() { - C.QFileDevice_Delete(this.h) + C.QFileDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfiledevice.h b/qt6/gen_qfiledevice.h index 0445be2c..530ffd52 100644 --- a/qt6/gen_qfiledevice.h +++ b/qt6/gen_qfiledevice.h @@ -17,11 +17,17 @@ extern "C" { #ifdef __cplusplus class QDateTime; class QFileDevice; +class QIODevice; +class QIODeviceBase; class QMetaObject; +class QObject; #else typedef struct QDateTime QDateTime; typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QFileDevice_MetaObject(const QFileDevice* self); @@ -45,10 +51,13 @@ unsigned char* QFileDevice_Map(QFileDevice* self, long long offset, long long si bool QFileDevice_Unmap(QFileDevice* self, unsigned char* address); QDateTime* QFileDevice_FileTime(const QFileDevice* self, int time); bool QFileDevice_SetFileTime(QFileDevice* self, QDateTime* newDate, int fileTime); +long long QFileDevice_ReadData(QFileDevice* self, char* data, long long maxlen); +long long QFileDevice_WriteData(QFileDevice* self, const char* data, long long lenVal); +long long QFileDevice_ReadLineData(QFileDevice* self, char* data, long long maxlen); struct miqt_string QFileDevice_Tr2(const char* s, const char* c); struct miqt_string QFileDevice_Tr3(const char* s, const char* c, int n); unsigned char* QFileDevice_Map3(QFileDevice* self, long long offset, long long size, int flags); -void QFileDevice_Delete(QFileDevice* self); +void QFileDevice_Delete(QFileDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfiledialog.cpp b/qt6/gen_qfiledialog.cpp index 2fcfafab..edd0cb77 100644 --- a/qt6/gen_qfiledialog.cpp +++ b/qt6/gen_qfiledialog.cpp @@ -2,10 +2,20 @@ #include #include #include +#include +#include +#include #include +#include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -15,34 +25,429 @@ #include "gen_qfiledialog.h" #include "_cgo_export.h" -QFileDialog* QFileDialog_new(QWidget* parent) { - return new QFileDialog(parent); +class MiqtVirtualQFileDialog : public virtual QFileDialog { +public: + + MiqtVirtualQFileDialog(QWidget* parent): QFileDialog(parent) {}; + MiqtVirtualQFileDialog(QWidget* parent, Qt::WindowFlags f): QFileDialog(parent, f) {}; + MiqtVirtualQFileDialog(): QFileDialog() {}; + MiqtVirtualQFileDialog(QWidget* parent, const QString& caption): QFileDialog(parent, caption) {}; + MiqtVirtualQFileDialog(QWidget* parent, const QString& caption, const QString& directory): QFileDialog(parent, caption, directory) {}; + MiqtVirtualQFileDialog(QWidget* parent, const QString& caption, const QString& directory, const QString& filter): QFileDialog(parent, caption, directory, filter) {}; + + virtual ~MiqtVirtualQFileDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFileDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFileDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFileDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QFileDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QFileDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QFileDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QFileDialog::accept(); + return; + } + + + miqt_exec_callback_QFileDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QFileDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QFileDialog::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QFileDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QFileDialog::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFileDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFileDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFileDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFileDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFileDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFileDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QFileDialog::open(); + return; + } + + + miqt_exec_callback_QFileDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QFileDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QFileDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QFileDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QFileDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QFileDialog::reject(); + return; + } + + + miqt_exec_callback_QFileDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QFileDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QFileDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QFileDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QFileDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QFileDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QFileDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QFileDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QFileDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QFileDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QFileDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QFileDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QFileDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QFileDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QFileDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QFileDialog::eventFilter(param1, param2); + + } + +}; + +void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new2(QWidget* parent, int f) { - return new QFileDialog(parent, static_cast(f)); +void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, static_cast(f)); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new3() { - return new QFileDialog(); +void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption) { +void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); - return new QFileDialog(parent, caption_QString); + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory) { +void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); - return new QFileDialog(parent, caption_QString, directory_QString); + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter) { +void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); QString filter_QString = QString::fromUtf8(filter.data, filter.len); - return new QFileDialog(parent, caption_QString, directory_QString, filter_QString); + MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString, filter_QString); + *outptr_QFileDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFileDialog_MetaObject(const QFileDialog* self) { @@ -444,7 +849,7 @@ void QFileDialog_FileSelected(QFileDialog* self, struct miqt_string file) { } void QFileDialog_connect_FileSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::fileSelected), self, [=](const QString& file) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::fileSelected), self, [=](const QString& file) { const QString file_ret = file; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray file_b = file_ret.toUtf8(); @@ -469,7 +874,7 @@ void QFileDialog_FilesSelected(QFileDialog* self, struct miqt_array /* of struct } void QFileDialog_connect_FilesSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::filesSelected), self, [=](const QStringList& files) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::filesSelected), self, [=](const QStringList& files) { const QStringList& files_ret = files; // Convert QList<> from C++ memory to manually-managed C memory struct miqt_string* files_arr = static_cast(malloc(sizeof(struct miqt_string) * files_ret.length())); @@ -497,7 +902,7 @@ void QFileDialog_CurrentChanged(QFileDialog* self, struct miqt_string path) { } void QFileDialog_connect_CurrentChanged(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::currentChanged), self, [=](const QString& path) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::currentChanged), self, [=](const QString& path) { const QString path_ret = path; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray path_b = path_ret.toUtf8(); @@ -516,7 +921,7 @@ void QFileDialog_DirectoryEntered(QFileDialog* self, struct miqt_string director } void QFileDialog_connect_DirectoryEntered(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::directoryEntered), self, [=](const QString& directory) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::directoryEntered), self, [=](const QString& directory) { const QString directory_ret = directory; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray directory_b = directory_ret.toUtf8(); @@ -534,7 +939,7 @@ void QFileDialog_UrlSelected(QFileDialog* self, QUrl* url) { } void QFileDialog_connect_UrlSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::urlSelected), self, [=](const QUrl& url) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::urlSelected), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -553,7 +958,7 @@ void QFileDialog_UrlsSelected(QFileDialog* self, struct miqt_array /* of QUrl* * } void QFileDialog_connect_UrlsSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast&)>(&QFileDialog::urlsSelected), self, [=](const QList& urls) { + MiqtVirtualQFileDialog::connect(self, static_cast&)>(&QFileDialog::urlsSelected), self, [=](const QList& urls) { const QList& urls_ret = urls; // Convert QList<> from C++ memory to manually-managed C memory QUrl** urls_arr = static_cast(malloc(sizeof(QUrl*) * urls_ret.length())); @@ -573,7 +978,7 @@ void QFileDialog_CurrentUrlChanged(QFileDialog* self, QUrl* url) { } void QFileDialog_connect_CurrentUrlChanged(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::currentUrlChanged), self, [=](const QUrl& url) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::currentUrlChanged), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -586,7 +991,7 @@ void QFileDialog_DirectoryUrlEntered(QFileDialog* self, QUrl* directory) { } void QFileDialog_connect_DirectoryUrlEntered(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::directoryUrlEntered), self, [=](const QUrl& directory) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::directoryUrlEntered), self, [=](const QUrl& directory) { const QUrl& directory_ret = directory; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&directory_ret); @@ -600,7 +1005,7 @@ void QFileDialog_FilterSelected(QFileDialog* self, struct miqt_string filter) { } void QFileDialog_connect_FilterSelected(QFileDialog* self, intptr_t slot) { - QFileDialog::connect(self, static_cast(&QFileDialog::filterSelected), self, [=](const QString& filter) { + MiqtVirtualQFileDialog::connect(self, static_cast(&QFileDialog::filterSelected), self, [=](const QString& filter) { const QString filter_ret = filter; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray filter_b = filter_ret.toUtf8(); @@ -1085,7 +1490,131 @@ struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls4(QWidget* parent, return _out; } -void QFileDialog_Delete(QFileDialog* self) { - delete self; +void QFileDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__SetVisible = slot; +} + +void QFileDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QFileDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Done = slot; +} + +void QFileDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Done(result); +} + +void QFileDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Accept = slot; +} + +void QFileDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Accept(); +} + +void QFileDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QFileDialog_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ChangeEvent(e); +} + +void QFileDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QFileDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFileDialog*)(self) )->virtualbase_SizeHint(); +} + +void QFileDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFileDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFileDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFileDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Open = slot; +} + +void QFileDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Open(); +} + +void QFileDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Exec = slot; +} + +int QFileDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Exec(); +} + +void QFileDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__Reject = slot; +} + +void QFileDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_Reject(); +} + +void QFileDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QFileDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QFileDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__CloseEvent = slot; +} + +void QFileDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QFileDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ShowEvent = slot; +} + +void QFileDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QFileDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QFileDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QFileDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFileDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QFileDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFileDialog*)(self) )->handle__EventFilter = slot; +} + +bool QFileDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQFileDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QFileDialog_Delete(QFileDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfiledialog.go b/qt6/gen_qfiledialog.go index 54cd9122..ca3c5acd 100644 --- a/qt6/gen_qfiledialog.go +++ b/qt6/gen_qfiledialog.go @@ -60,7 +60,8 @@ const ( ) type QFileDialog struct { - h *C.QFileDialog + h *C.QFileDialog + isSubclass bool *QDialog } @@ -78,33 +79,65 @@ func (this *QFileDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileDialog(h *C.QFileDialog) *QFileDialog { +// newQFileDialog constructs the type using only CGO pointers. +func newQFileDialog(h *C.QFileDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFileDialog { if h == nil { return nil } - return &QFileDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QFileDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFileDialog(h unsafe.Pointer) *QFileDialog { - return newQFileDialog((*C.QFileDialog)(h)) +// UnsafeNewQFileDialog constructs the type using only unsafe pointers. +func UnsafeNewQFileDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFileDialog { + if h == nil { + return nil + } + + return &QFileDialog{h: (*C.QFileDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFileDialog constructs a new QFileDialog object. func NewQFileDialog(parent *QWidget) *QFileDialog { - ret := C.QFileDialog_new(parent.cPointer()) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new(parent.cPointer(), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog2 constructs a new QFileDialog object. func NewQFileDialog2(parent *QWidget, f WindowType) *QFileDialog { - ret := C.QFileDialog_new2(parent.cPointer(), (C.int)(f)) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new2(parent.cPointer(), (C.int)(f), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog3 constructs a new QFileDialog object. func NewQFileDialog3() *QFileDialog { - ret := C.QFileDialog_new3() - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new3(&outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog4 constructs a new QFileDialog object. @@ -113,8 +146,16 @@ func NewQFileDialog4(parent *QWidget, caption string) *QFileDialog { caption_ms.data = C.CString(caption) caption_ms.len = C.size_t(len(caption)) defer C.free(unsafe.Pointer(caption_ms.data)) - ret := C.QFileDialog_new4(parent.cPointer(), caption_ms) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new4(parent.cPointer(), caption_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog5 constructs a new QFileDialog object. @@ -127,8 +168,16 @@ func NewQFileDialog5(parent *QWidget, caption string, directory string) *QFileDi directory_ms.data = C.CString(directory) directory_ms.len = C.size_t(len(directory)) defer C.free(unsafe.Pointer(directory_ms.data)) - ret := C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFileDialog6 constructs a new QFileDialog object. @@ -145,8 +194,16 @@ func NewQFileDialog6(parent *QWidget, caption string, directory string, filter s filter_ms.data = C.CString(filter) filter_ms.len = C.size_t(len(filter)) defer C.free(unsafe.Pointer(filter_ms.data)) - ret := C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms) - return newQFileDialog(ret) + var outptr_QFileDialog *C.QFileDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFileDialog) MetaObject() *QMetaObject { @@ -444,7 +501,7 @@ func (this *QFileDialog) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QFileDialog) ItemDelegate() *QAbstractItemDelegate { - return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QFileDialog_ItemDelegate(this.h))) + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QFileDialog_ItemDelegate(this.h)), nil) } func (this *QFileDialog) SetIconProvider(provider *QAbstractFileIconProvider) { @@ -502,7 +559,7 @@ func (this *QFileDialog) SetProxyModel(model *QAbstractProxyModel) { } func (this *QFileDialog) ProxyModel() *QAbstractProxyModel { - return UnsafeNewQAbstractProxyModel(unsafe.Pointer(C.QFileDialog_ProxyModel(this.h))) + return UnsafeNewQAbstractProxyModel(unsafe.Pointer(C.QFileDialog_ProxyModel(this.h)), nil, nil) } func (this *QFileDialog) SetOption(option QFileDialog__Option) { @@ -1317,9 +1374,351 @@ func QFileDialog_GetOpenFileUrls4(parent *QWidget, caption string, dir *QUrl, fi return _ret } +func (this *QFileDialog) callVirtualBase_SetVisible(visible bool) { + + C.QFileDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFileDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFileDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_SetVisible +func miqt_exec_callback_QFileDialog_SetVisible(self *C.QFileDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFileDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_Done(result int) { + + C.QFileDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QFileDialog) OnDone(slot func(super func(result int), result int)) { + C.QFileDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Done +func miqt_exec_callback_QFileDialog_Done(self *C.QFileDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QFileDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_Accept() { + + C.QFileDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QFileDialog) OnAccept(slot func(super func())) { + C.QFileDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Accept +func miqt_exec_callback_QFileDialog_Accept(self *C.QFileDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QFileDialog) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QFileDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFileDialog) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QFileDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ChangeEvent +func miqt_exec_callback_QFileDialog_ChangeEvent(self *C.QFileDialog, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFileDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFileDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_SizeHint +func miqt_exec_callback_QFileDialog_SizeHint(self *C.QFileDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFileDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFileDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFileDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_MinimumSizeHint +func miqt_exec_callback_QFileDialog_MinimumSizeHint(self *C.QFileDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFileDialog) callVirtualBase_Open() { + + C.QFileDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QFileDialog) OnOpen(slot func(super func())) { + C.QFileDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Open +func miqt_exec_callback_QFileDialog_Open(self *C.QFileDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QFileDialog) callVirtualBase_Exec() int { + + return (int)(C.QFileDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QFileDialog) OnExec(slot func(super func() int) int) { + C.QFileDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Exec +func miqt_exec_callback_QFileDialog_Exec(self *C.QFileDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QFileDialog) callVirtualBase_Reject() { + + C.QFileDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QFileDialog) OnReject(slot func(super func())) { + C.QFileDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_Reject +func miqt_exec_callback_QFileDialog_Reject(self *C.QFileDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QFileDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QFileDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QFileDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_KeyPressEvent +func miqt_exec_callback_QFileDialog_KeyPressEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QFileDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QFileDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_CloseEvent +func miqt_exec_callback_QFileDialog_CloseEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QFileDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QFileDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ShowEvent +func miqt_exec_callback_QFileDialog_ShowEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QFileDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QFileDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ResizeEvent +func miqt_exec_callback_QFileDialog_ResizeEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QFileDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFileDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QFileDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_ContextMenuEvent +func miqt_exec_callback_QFileDialog_ContextMenuEvent(self *C.QFileDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFileDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFileDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QFileDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QFileDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QFileDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileDialog_EventFilter +func miqt_exec_callback_QFileDialog_EventFilter(self *C.QFileDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QFileDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFileDialog) Delete() { - C.QFileDialog_Delete(this.h) + C.QFileDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfiledialog.h b/qt6/gen_qfiledialog.h index 31ff15ac..9f732cd5 100644 --- a/qt6/gen_qfiledialog.h +++ b/qt6/gen_qfiledialog.h @@ -19,9 +19,19 @@ class QAbstractFileIconProvider; class QAbstractItemDelegate; class QAbstractProxyModel; class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; class QDir; +class QEvent; class QFileDialog; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QUrl; class QWidget; #else @@ -29,19 +39,29 @@ typedef struct QAbstractFileIconProvider QAbstractFileIconProvider; typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; typedef struct QDir QDir; +typedef struct QEvent QEvent; typedef struct QFileDialog QFileDialog; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QUrl QUrl; typedef struct QWidget QWidget; #endif -QFileDialog* QFileDialog_new(QWidget* parent); -QFileDialog* QFileDialog_new2(QWidget* parent, int f); -QFileDialog* QFileDialog_new3(); -QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption); -QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory); -QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter); +void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFileDialog_MetaObject(const QFileDialog* self); void* QFileDialog_Metacast(QFileDialog* self, const char* param1); struct miqt_string QFileDialog_Tr(const char* s); @@ -121,6 +141,9 @@ QUrl* QFileDialog_GetExistingDirectoryUrl(); struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames(); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls(); void QFileDialog_SaveFileContent(struct miqt_string fileContent, struct miqt_string fileNameHint); +void QFileDialog_Done(QFileDialog* self, int result); +void QFileDialog_Accept(QFileDialog* self); +void QFileDialog_ChangeEvent(QFileDialog* self, QEvent* e); struct miqt_string QFileDialog_Tr2(const char* s, const char* c); struct miqt_string QFileDialog_Tr3(const char* s, const char* c, int n); void QFileDialog_SetOption2(QFileDialog* self, int option, bool on); @@ -157,7 +180,37 @@ struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls1(QWidget* parent); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls2(QWidget* parent, struct miqt_string caption); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls3(QWidget* parent, struct miqt_string caption, QUrl* dir); struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls4(QWidget* parent, struct miqt_string caption, QUrl* dir, struct miqt_string filter); -void QFileDialog_Delete(QFileDialog* self); +void QFileDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QFileDialog_virtualbase_SetVisible(void* self, bool visible); +void QFileDialog_override_virtual_Done(void* self, intptr_t slot); +void QFileDialog_virtualbase_Done(void* self, int result); +void QFileDialog_override_virtual_Accept(void* self, intptr_t slot); +void QFileDialog_virtualbase_Accept(void* self); +void QFileDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ChangeEvent(void* self, QEvent* e); +void QFileDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFileDialog_virtualbase_SizeHint(const void* self); +void QFileDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFileDialog_virtualbase_MinimumSizeHint(const void* self); +void QFileDialog_override_virtual_Open(void* self, intptr_t slot); +void QFileDialog_virtualbase_Open(void* self); +void QFileDialog_override_virtual_Exec(void* self, intptr_t slot); +int QFileDialog_virtualbase_Exec(void* self); +void QFileDialog_override_virtual_Reject(void* self, intptr_t slot); +void QFileDialog_virtualbase_Reject(void* self); +void QFileDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QFileDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QFileDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QFileDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QFileDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFileDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QFileDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFileDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QFileDialog_Delete(QFileDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfileiconprovider.cpp b/qt6/gen_qfileiconprovider.cpp index a1ce46f7..6eaed461 100644 --- a/qt6/gen_qfileiconprovider.cpp +++ b/qt6/gen_qfileiconprovider.cpp @@ -1,12 +1,157 @@ +#include #include #include #include +#include +#include +#include #include #include "gen_qfileiconprovider.h" #include "_cgo_export.h" -QFileIconProvider* QFileIconProvider_new() { - return new QFileIconProvider(); +class MiqtVirtualQFileIconProvider : public virtual QFileIconProvider { +public: + + MiqtVirtualQFileIconProvider(): QFileIconProvider() {}; + + virtual ~MiqtVirtualQFileIconProvider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Icon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon icon(QAbstractFileIconProvider::IconType typeVal) const override { + if (handle__Icon == 0) { + return QFileIconProvider::icon(typeVal); + } + + QAbstractFileIconProvider::IconType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QIcon* callback_return_value = miqt_exec_callback_QFileIconProvider_Icon(const_cast(this), handle__Icon, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_Icon(int typeVal) const { + + return new QIcon(QFileIconProvider::icon(static_cast(typeVal))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IconWithInfo = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon icon(const QFileInfo& info) const override { + if (handle__IconWithInfo == 0) { + return QFileIconProvider::icon(info); + } + + const QFileInfo& info_ret = info; + // Cast returned reference into pointer + QFileInfo* sigval1 = const_cast(&info_ret); + + QIcon* callback_return_value = miqt_exec_callback_QFileIconProvider_IconWithInfo(const_cast(this), handle__IconWithInfo, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_IconWithInfo(QFileInfo* info) const { + + return new QIcon(QFileIconProvider::icon(*info)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual QString type(const QFileInfo& param1) const override { + if (handle__Type == 0) { + return QFileIconProvider::type(param1); + } + + const QFileInfo& param1_ret = param1; + // Cast returned reference into pointer + QFileInfo* sigval1 = const_cast(¶m1_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QFileIconProvider_Type(const_cast(this), handle__Type, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Type(QFileInfo* param1) const { + + QString _ret = QFileIconProvider::type(*param1); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetOptions = 0; + + // Subclass to allow providing a Go implementation + virtual void setOptions(QAbstractFileIconProvider::Options options) override { + if (handle__SetOptions == 0) { + QFileIconProvider::setOptions(options); + return; + } + + QAbstractFileIconProvider::Options options_ret = options; + int sigval1 = static_cast(options_ret); + + miqt_exec_callback_QFileIconProvider_SetOptions(this, handle__SetOptions, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetOptions(int options) { + + QFileIconProvider::setOptions(static_cast(options)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Options = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractFileIconProvider::Options options() const override { + if (handle__Options == 0) { + return QFileIconProvider::options(); + } + + + int callback_return_value = miqt_exec_callback_QFileIconProvider_Options(const_cast(this), handle__Options); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Options() const { + + QAbstractFileIconProvider::Options _ret = QFileIconProvider::options(); + return static_cast(_ret); + + } + +}; + +void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider, QAbstractFileIconProvider** outptr_QAbstractFileIconProvider) { + MiqtVirtualQFileIconProvider* ret = new MiqtVirtualQFileIconProvider(); + *outptr_QFileIconProvider = ret; + *outptr_QAbstractFileIconProvider = static_cast(ret); } QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal) { @@ -17,7 +162,51 @@ QIcon* QFileIconProvider_IconWithInfo(const QFileIconProvider* self, QFileInfo* return new QIcon(self->icon(*info)); } -void QFileIconProvider_Delete(QFileIconProvider* self) { - delete self; +void QFileIconProvider_override_virtual_Icon(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__Icon = slot; +} + +QIcon* QFileIconProvider_virtualbase_Icon(const void* self, int typeVal) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_Icon(typeVal); +} + +void QFileIconProvider_override_virtual_IconWithInfo(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__IconWithInfo = slot; +} + +QIcon* QFileIconProvider_virtualbase_IconWithInfo(const void* self, QFileInfo* info) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_IconWithInfo(info); +} + +void QFileIconProvider_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__Type = slot; +} + +struct miqt_string QFileIconProvider_virtualbase_Type(const void* self, QFileInfo* param1) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_Type(param1); +} + +void QFileIconProvider_override_virtual_SetOptions(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__SetOptions = slot; +} + +void QFileIconProvider_virtualbase_SetOptions(void* self, int options) { + ( (MiqtVirtualQFileIconProvider*)(self) )->virtualbase_SetOptions(options); +} + +void QFileIconProvider_override_virtual_Options(void* self, intptr_t slot) { + dynamic_cast( (QFileIconProvider*)(self) )->handle__Options = slot; +} + +int QFileIconProvider_virtualbase_Options(const void* self) { + return ( (const MiqtVirtualQFileIconProvider*)(self) )->virtualbase_Options(); +} + +void QFileIconProvider_Delete(QFileIconProvider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfileiconprovider.go b/qt6/gen_qfileiconprovider.go index b1e42f7e..29647e40 100644 --- a/qt6/gen_qfileiconprovider.go +++ b/qt6/gen_qfileiconprovider.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFileIconProvider struct { - h *C.QFileIconProvider + h *C.QFileIconProvider + isSubclass bool *QAbstractFileIconProvider } @@ -32,21 +34,34 @@ func (this *QFileIconProvider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileIconProvider(h *C.QFileIconProvider) *QFileIconProvider { +// newQFileIconProvider constructs the type using only CGO pointers. +func newQFileIconProvider(h *C.QFileIconProvider, h_QAbstractFileIconProvider *C.QAbstractFileIconProvider) *QFileIconProvider { if h == nil { return nil } - return &QFileIconProvider{h: h, QAbstractFileIconProvider: UnsafeNewQAbstractFileIconProvider(unsafe.Pointer(h))} + return &QFileIconProvider{h: h, + QAbstractFileIconProvider: newQAbstractFileIconProvider(h_QAbstractFileIconProvider)} } -func UnsafeNewQFileIconProvider(h unsafe.Pointer) *QFileIconProvider { - return newQFileIconProvider((*C.QFileIconProvider)(h)) +// UnsafeNewQFileIconProvider constructs the type using only unsafe pointers. +func UnsafeNewQFileIconProvider(h unsafe.Pointer, h_QAbstractFileIconProvider unsafe.Pointer) *QFileIconProvider { + if h == nil { + return nil + } + + return &QFileIconProvider{h: (*C.QFileIconProvider)(h), + QAbstractFileIconProvider: UnsafeNewQAbstractFileIconProvider(h_QAbstractFileIconProvider)} } // NewQFileIconProvider constructs a new QFileIconProvider object. func NewQFileIconProvider() *QFileIconProvider { - ret := C.QFileIconProvider_new() - return newQFileIconProvider(ret) + var outptr_QFileIconProvider *C.QFileIconProvider = nil + var outptr_QAbstractFileIconProvider *C.QAbstractFileIconProvider = nil + + C.QFileIconProvider_new(&outptr_QFileIconProvider, &outptr_QAbstractFileIconProvider) + ret := newQFileIconProvider(outptr_QFileIconProvider, outptr_QAbstractFileIconProvider) + ret.isSubclass = true + return ret } func (this *QFileIconProvider) Icon(typeVal QAbstractFileIconProvider__IconType) *QIcon { @@ -63,9 +78,141 @@ func (this *QFileIconProvider) IconWithInfo(info *QFileInfo) *QIcon { return _goptr } +func (this *QFileIconProvider) callVirtualBase_Icon(typeVal QAbstractFileIconProvider__IconType) *QIcon { + + _ret := C.QFileIconProvider_virtualbase_Icon(unsafe.Pointer(this.h), (C.int)(typeVal)) + _goptr := newQIcon(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileIconProvider) OnIcon(slot func(super func(typeVal QAbstractFileIconProvider__IconType) *QIcon, typeVal QAbstractFileIconProvider__IconType) *QIcon) { + C.QFileIconProvider_override_virtual_Icon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_Icon +func miqt_exec_callback_QFileIconProvider_Icon(self *C.QFileIconProvider, cb C.intptr_t, typeVal C.int) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QAbstractFileIconProvider__IconType) *QIcon, typeVal QAbstractFileIconProvider__IconType) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractFileIconProvider__IconType)(typeVal) + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_Icon, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileIconProvider) callVirtualBase_IconWithInfo(info *QFileInfo) *QIcon { + + _ret := C.QFileIconProvider_virtualbase_IconWithInfo(unsafe.Pointer(this.h), info.cPointer()) + _goptr := newQIcon(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileIconProvider) OnIconWithInfo(slot func(super func(info *QFileInfo) *QIcon, info *QFileInfo) *QIcon) { + C.QFileIconProvider_override_virtual_IconWithInfo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_IconWithInfo +func miqt_exec_callback_QFileIconProvider_IconWithInfo(self *C.QFileIconProvider, cb C.intptr_t, info *C.QFileInfo) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(info *QFileInfo) *QIcon, info *QFileInfo) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFileInfo(unsafe.Pointer(info)) + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_IconWithInfo, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileIconProvider) callVirtualBase_Type(param1 *QFileInfo) string { + + var _ms C.struct_miqt_string = C.QFileIconProvider_virtualbase_Type(unsafe.Pointer(this.h), param1.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QFileIconProvider) OnType(slot func(super func(param1 *QFileInfo) string, param1 *QFileInfo) string) { + C.QFileIconProvider_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_Type +func miqt_exec_callback_QFileIconProvider_Type(self *C.QFileIconProvider, cb C.intptr_t, param1 *C.QFileInfo) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFileInfo) string, param1 *QFileInfo) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFileInfo(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_Type, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QFileIconProvider) callVirtualBase_SetOptions(options QAbstractFileIconProvider__Option) { + + C.QFileIconProvider_virtualbase_SetOptions(unsafe.Pointer(this.h), (C.int)(options)) + +} +func (this *QFileIconProvider) OnSetOptions(slot func(super func(options QAbstractFileIconProvider__Option), options QAbstractFileIconProvider__Option)) { + C.QFileIconProvider_override_virtual_SetOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_SetOptions +func miqt_exec_callback_QFileIconProvider_SetOptions(self *C.QFileIconProvider, cb C.intptr_t, options C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(options QAbstractFileIconProvider__Option), options QAbstractFileIconProvider__Option)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractFileIconProvider__Option)(options) + + gofunc((&QFileIconProvider{h: self}).callVirtualBase_SetOptions, slotval1) + +} + +func (this *QFileIconProvider) callVirtualBase_Options() QAbstractFileIconProvider__Option { + + return (QAbstractFileIconProvider__Option)(C.QFileIconProvider_virtualbase_Options(unsafe.Pointer(this.h))) + +} +func (this *QFileIconProvider) OnOptions(slot func(super func() QAbstractFileIconProvider__Option) QAbstractFileIconProvider__Option) { + C.QFileIconProvider_override_virtual_Options(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileIconProvider_Options +func miqt_exec_callback_QFileIconProvider_Options(self *C.QFileIconProvider, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractFileIconProvider__Option) QAbstractFileIconProvider__Option) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileIconProvider{h: self}).callVirtualBase_Options) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFileIconProvider) Delete() { - C.QFileIconProvider_Delete(this.h) + C.QFileIconProvider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfileiconprovider.h b/qt6/gen_qfileiconprovider.h index bdb0b9a5..fd383494 100644 --- a/qt6/gen_qfileiconprovider.h +++ b/qt6/gen_qfileiconprovider.h @@ -15,19 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractFileIconProvider; class QFileIconProvider; class QFileInfo; class QIcon; #else +typedef struct QAbstractFileIconProvider QAbstractFileIconProvider; typedef struct QFileIconProvider QFileIconProvider; typedef struct QFileInfo QFileInfo; typedef struct QIcon QIcon; #endif -QFileIconProvider* QFileIconProvider_new(); +void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider, QAbstractFileIconProvider** outptr_QAbstractFileIconProvider); QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal); QIcon* QFileIconProvider_IconWithInfo(const QFileIconProvider* self, QFileInfo* info); -void QFileIconProvider_Delete(QFileIconProvider* self); +void QFileIconProvider_override_virtual_Icon(void* self, intptr_t slot); +QIcon* QFileIconProvider_virtualbase_Icon(const void* self, int typeVal); +void QFileIconProvider_override_virtual_IconWithInfo(void* self, intptr_t slot); +QIcon* QFileIconProvider_virtualbase_IconWithInfo(const void* self, QFileInfo* info); +void QFileIconProvider_override_virtual_Type(void* self, intptr_t slot); +struct miqt_string QFileIconProvider_virtualbase_Type(const void* self, QFileInfo* param1); +void QFileIconProvider_override_virtual_SetOptions(void* self, intptr_t slot); +void QFileIconProvider_virtualbase_SetOptions(void* self, int options); +void QFileIconProvider_override_virtual_Options(void* self, intptr_t slot); +int QFileIconProvider_virtualbase_Options(const void* self); +void QFileIconProvider_Delete(QFileIconProvider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfileinfo.cpp b/qt6/gen_qfileinfo.cpp index ce9aa16c..4f8ce01f 100644 --- a/qt6/gen_qfileinfo.cpp +++ b/qt6/gen_qfileinfo.cpp @@ -9,26 +9,31 @@ #include "gen_qfileinfo.h" #include "_cgo_export.h" -QFileInfo* QFileInfo_new() { - return new QFileInfo(); +void QFileInfo_new(QFileInfo** outptr_QFileInfo) { + QFileInfo* ret = new QFileInfo(); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new2(struct miqt_string file) { +void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QFileInfo(file_QString); + QFileInfo* ret = new QFileInfo(file_QString); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new3(QFileDevice* file) { - return new QFileInfo(*file); +void QFileInfo_new3(QFileDevice* file, QFileInfo** outptr_QFileInfo) { + QFileInfo* ret = new QFileInfo(*file); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file) { +void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QFileInfo(*dir, file_QString); + QFileInfo* ret = new QFileInfo(*dir, file_QString); + *outptr_QFileInfo = ret; } -QFileInfo* QFileInfo_new5(QFileInfo* fileinfo) { - return new QFileInfo(*fileinfo); +void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo) { + QFileInfo* ret = new QFileInfo(*fileinfo); + *outptr_QFileInfo = ret; } void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo) { @@ -382,7 +387,11 @@ void QFileInfo_Stat(QFileInfo* self) { self->stat(); } -void QFileInfo_Delete(QFileInfo* self) { - delete self; +void QFileInfo_Delete(QFileInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfileinfo.go b/qt6/gen_qfileinfo.go index 083d5f8a..fb20f61a 100644 --- a/qt6/gen_qfileinfo.go +++ b/qt6/gen_qfileinfo.go @@ -14,7 +14,8 @@ import ( ) type QFileInfo struct { - h *C.QFileInfo + h *C.QFileInfo + isSubclass bool } func (this *QFileInfo) cPointer() *C.QFileInfo { @@ -31,6 +32,7 @@ func (this *QFileInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFileInfo constructs the type using only CGO pointers. func newQFileInfo(h *C.QFileInfo) *QFileInfo { if h == nil { return nil @@ -38,14 +40,23 @@ func newQFileInfo(h *C.QFileInfo) *QFileInfo { return &QFileInfo{h: h} } +// UnsafeNewQFileInfo constructs the type using only unsafe pointers. func UnsafeNewQFileInfo(h unsafe.Pointer) *QFileInfo { - return newQFileInfo((*C.QFileInfo)(h)) + if h == nil { + return nil + } + + return &QFileInfo{h: (*C.QFileInfo)(h)} } // NewQFileInfo constructs a new QFileInfo object. func NewQFileInfo() *QFileInfo { - ret := C.QFileInfo_new() - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new(&outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo2 constructs a new QFileInfo object. @@ -54,14 +65,22 @@ func NewQFileInfo2(file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QFileInfo_new2(file_ms) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new2(file_ms, &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo3 constructs a new QFileInfo object. func NewQFileInfo3(file *QFileDevice) *QFileInfo { - ret := C.QFileInfo_new3(file.cPointer()) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new3(file.cPointer(), &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo4 constructs a new QFileInfo object. @@ -70,14 +89,22 @@ func NewQFileInfo4(dir *QDir, file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QFileInfo_new4(dir.cPointer(), file_ms) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new4(dir.cPointer(), file_ms, &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } // NewQFileInfo5 constructs a new QFileInfo object. func NewQFileInfo5(fileinfo *QFileInfo) *QFileInfo { - ret := C.QFileInfo_new5(fileinfo.cPointer()) - return newQFileInfo(ret) + var outptr_QFileInfo *C.QFileInfo = nil + + C.QFileInfo_new5(fileinfo.cPointer(), &outptr_QFileInfo) + ret := newQFileInfo(outptr_QFileInfo) + ret.isSubclass = true + return ret } func (this *QFileInfo) OperatorAssign(fileinfo *QFileInfo) { @@ -395,7 +422,7 @@ func (this *QFileInfo) Stat() { // Delete this object from C++ memory. func (this *QFileInfo) Delete() { - C.QFileInfo_Delete(this.h) + C.QFileInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfileinfo.h b/qt6/gen_qfileinfo.h index 0e50d896..4492abbf 100644 --- a/qt6/gen_qfileinfo.h +++ b/qt6/gen_qfileinfo.h @@ -26,11 +26,11 @@ typedef struct QFileDevice QFileDevice; typedef struct QFileInfo QFileInfo; #endif -QFileInfo* QFileInfo_new(); -QFileInfo* QFileInfo_new2(struct miqt_string file); -QFileInfo* QFileInfo_new3(QFileDevice* file); -QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file); -QFileInfo* QFileInfo_new5(QFileInfo* fileinfo); +void QFileInfo_new(QFileInfo** outptr_QFileInfo); +void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo); +void QFileInfo_new3(QFileDevice* file, QFileInfo** outptr_QFileInfo); +void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo); +void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo); void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo); void QFileInfo_Swap(QFileInfo* self, QFileInfo* other); bool QFileInfo_OperatorEqual(const QFileInfo* self, QFileInfo* fileinfo); @@ -89,7 +89,7 @@ QDateTime* QFileInfo_FileTime(const QFileInfo* self, int time); bool QFileInfo_Caching(const QFileInfo* self); void QFileInfo_SetCaching(QFileInfo* self, bool on); void QFileInfo_Stat(QFileInfo* self); -void QFileInfo_Delete(QFileInfo* self); +void QFileInfo_Delete(QFileInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfileselector.cpp b/qt6/gen_qfileselector.cpp index e43136a7..74f8152a 100644 --- a/qt6/gen_qfileselector.cpp +++ b/qt6/gen_qfileselector.cpp @@ -1,21 +1,210 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qfileselector.h" #include "_cgo_export.h" -QFileSelector* QFileSelector_new() { - return new QFileSelector(); +class MiqtVirtualQFileSelector : public virtual QFileSelector { +public: + + MiqtVirtualQFileSelector(): QFileSelector() {}; + MiqtVirtualQFileSelector(QObject* parent): QFileSelector(parent) {}; + + virtual ~MiqtVirtualQFileSelector() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QFileSelector::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QFileSelector_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QFileSelector::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QFileSelector::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QFileSelector_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QFileSelector::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QFileSelector::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QFileSelector_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QFileSelector::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QFileSelector::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QFileSelector_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QFileSelector::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QFileSelector::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFileSelector_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QFileSelector::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QFileSelector::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSelector_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QFileSelector::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QFileSelector::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSelector_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QFileSelector::disconnectNotify(*signal); + + } + +}; + +void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { + MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(); + *outptr_QFileSelector = ret; + *outptr_QObject = static_cast(ret); } -QFileSelector* QFileSelector_new2(QObject* parent) { - return new QFileSelector(parent); +void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { + MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(parent); + *outptr_QFileSelector = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QFileSelector_MetaObject(const QFileSelector* self) { @@ -126,7 +315,67 @@ struct miqt_string QFileSelector_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFileSelector_Delete(QFileSelector* self) { - delete self; +void QFileSelector_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__Event = slot; +} + +bool QFileSelector_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_Event(event); +} + +void QFileSelector_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__EventFilter = slot; +} + +bool QFileSelector_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QFileSelector_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__TimerEvent = slot; +} + +void QFileSelector_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_TimerEvent(event); +} + +void QFileSelector_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__ChildEvent = slot; +} + +void QFileSelector_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_ChildEvent(event); +} + +void QFileSelector_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__CustomEvent = slot; +} + +void QFileSelector_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_CustomEvent(event); +} + +void QFileSelector_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__ConnectNotify = slot; +} + +void QFileSelector_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QFileSelector_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSelector*)(self) )->handle__DisconnectNotify = slot; +} + +void QFileSelector_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSelector*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QFileSelector_Delete(QFileSelector* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfileselector.go b/qt6/gen_qfileselector.go index 78f60d87..7efc70bb 100644 --- a/qt6/gen_qfileselector.go +++ b/qt6/gen_qfileselector.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFileSelector struct { - h *C.QFileSelector + h *C.QFileSelector + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QFileSelector) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileSelector(h *C.QFileSelector) *QFileSelector { +// newQFileSelector constructs the type using only CGO pointers. +func newQFileSelector(h *C.QFileSelector, h_QObject *C.QObject) *QFileSelector { if h == nil { return nil } - return &QFileSelector{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QFileSelector{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQFileSelector(h unsafe.Pointer) *QFileSelector { - return newQFileSelector((*C.QFileSelector)(h)) +// UnsafeNewQFileSelector constructs the type using only unsafe pointers. +func UnsafeNewQFileSelector(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSelector { + if h == nil { + return nil + } + + return &QFileSelector{h: (*C.QFileSelector)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQFileSelector constructs a new QFileSelector object. func NewQFileSelector() *QFileSelector { - ret := C.QFileSelector_new() - return newQFileSelector(ret) + var outptr_QFileSelector *C.QFileSelector = nil + var outptr_QObject *C.QObject = nil + + C.QFileSelector_new(&outptr_QFileSelector, &outptr_QObject) + ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSelector2 constructs a new QFileSelector object. func NewQFileSelector2(parent *QObject) *QFileSelector { - ret := C.QFileSelector_new2(parent.cPointer()) - return newQFileSelector(ret) + var outptr_QFileSelector *C.QFileSelector = nil + var outptr_QObject *C.QObject = nil + + C.QFileSelector_new2(parent.cPointer(), &outptr_QFileSelector, &outptr_QObject) + ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFileSelector) MetaObject() *QMetaObject { @@ -154,9 +174,175 @@ func QFileSelector_Tr3(s string, c string, n int) string { return _ret } +func (this *QFileSelector) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QFileSelector_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QFileSelector) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QFileSelector_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_Event +func miqt_exec_callback_QFileSelector_Event(self *C.QFileSelector, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSelector{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSelector) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QFileSelector_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QFileSelector) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QFileSelector_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_EventFilter +func miqt_exec_callback_QFileSelector_EventFilter(self *C.QFileSelector, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSelector{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSelector) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QFileSelector_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSelector) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QFileSelector_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_TimerEvent +func miqt_exec_callback_QFileSelector_TimerEvent(self *C.QFileSelector, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSelector{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QFileSelector_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSelector) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QFileSelector_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_ChildEvent +func miqt_exec_callback_QFileSelector_ChildEvent(self *C.QFileSelector, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSelector{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_CustomEvent(event *QEvent) { + + C.QFileSelector_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSelector) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFileSelector_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_CustomEvent +func miqt_exec_callback_QFileSelector_CustomEvent(self *C.QFileSelector, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFileSelector{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QFileSelector_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSelector) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSelector_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_ConnectNotify +func miqt_exec_callback_QFileSelector_ConnectNotify(self *C.QFileSelector, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSelector{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QFileSelector) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QFileSelector_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSelector) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSelector_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSelector_DisconnectNotify +func miqt_exec_callback_QFileSelector_DisconnectNotify(self *C.QFileSelector, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSelector{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QFileSelector) Delete() { - C.QFileSelector_Delete(this.h) + C.QFileSelector_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfileselector.h b/qt6/gen_qfileselector.h index c6949572..96a76b8d 100644 --- a/qt6/gen_qfileselector.h +++ b/qt6/gen_qfileselector.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QFileSelector; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUrl; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFileSelector QFileSelector; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QFileSelector* QFileSelector_new(); -QFileSelector* QFileSelector_new2(QObject* parent); +void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); +void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); QMetaObject* QFileSelector_MetaObject(const QFileSelector* self); void* QFileSelector_Metacast(QFileSelector* self, const char* param1); struct miqt_string QFileSelector_Tr(const char* s); @@ -38,7 +46,21 @@ void QFileSelector_SetExtraSelectors(QFileSelector* self, struct miqt_array /* o struct miqt_array /* of struct miqt_string */ QFileSelector_AllSelectors(const QFileSelector* self); struct miqt_string QFileSelector_Tr2(const char* s, const char* c); struct miqt_string QFileSelector_Tr3(const char* s, const char* c, int n); -void QFileSelector_Delete(QFileSelector* self); +void QFileSelector_override_virtual_Event(void* self, intptr_t slot); +bool QFileSelector_virtualbase_Event(void* self, QEvent* event); +void QFileSelector_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFileSelector_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QFileSelector_override_virtual_TimerEvent(void* self, intptr_t slot); +void QFileSelector_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QFileSelector_override_virtual_ChildEvent(void* self, intptr_t slot); +void QFileSelector_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QFileSelector_override_virtual_CustomEvent(void* self, intptr_t slot); +void QFileSelector_virtualbase_CustomEvent(void* self, QEvent* event); +void QFileSelector_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QFileSelector_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QFileSelector_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QFileSelector_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QFileSelector_Delete(QFileSelector* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfilesystemmodel.cpp b/qt6/gen_qfilesystemmodel.cpp index 0c02bd1a..42a67ec5 100644 --- a/qt6/gen_qfilesystemmodel.cpp +++ b/qt6/gen_qfilesystemmodel.cpp @@ -1,7 +1,9 @@ #include +#include #include #include #include +#include #include #include #include @@ -10,21 +12,1170 @@ #include #include #include +#include #include +#include #include #include #include +#include #include #include #include "gen_qfilesystemmodel.h" #include "_cgo_export.h" -QFileSystemModel* QFileSystemModel_new() { - return new QFileSystemModel(); +class MiqtVirtualQFileSystemModel : public virtual QFileSystemModel { +public: + + MiqtVirtualQFileSystemModel(): QFileSystemModel() {}; + MiqtVirtualQFileSystemModel(QObject* parent): QFileSystemModel(parent) {}; + + virtual ~MiqtVirtualQFileSystemModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QFileSystemModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QFileSystemModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QFileSystemModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QFileSystemModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QFileSystemModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QFileSystemModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QFileSystemModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QFileSystemModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QFileSystemModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QFileSystemModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QFileSystemModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QFileSystemModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QFileSystemModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QFileSystemModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QFileSystemModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QFileSystemModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QFileSystemModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QFileSystemModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QFileSystemModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QFileSystemModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QFileSystemModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QFileSystemModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QFileSystemModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QFileSystemModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QFileSystemModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QFileSystemModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QFileSystemModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QFileSystemModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QFileSystemModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QFileSystemModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QFileSystemModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QFileSystemModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QFileSystemModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QFileSystemModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QFileSystemModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QFileSystemModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QFileSystemModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QFileSystemModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QFileSystemModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QFileSystemModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QFileSystemModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QFileSystemModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QFileSystemModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QFileSystemModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QFileSystemModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QFileSystemModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QFileSystemModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QFileSystemModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemModel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QFileSystemModel::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QFileSystemModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QFileSystemModel::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QFileSystemModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QFileSystemModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QFileSystemModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QFileSystemModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QFileSystemModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QFileSystemModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QFileSystemModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QFileSystemModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QFileSystemModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QFileSystemModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QFileSystemModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QFileSystemModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QFileSystemModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QFileSystemModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QFileSystemModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QFileSystemModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QFileSystemModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QFileSystemModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QFileSystemModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QFileSystemModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QFileSystemModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QFileSystemModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QFileSystemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QFileSystemModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QFileSystemModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QFileSystemModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QFileSystemModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QFileSystemModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QFileSystemModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QFileSystemModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QFileSystemModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QFileSystemModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QFileSystemModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QFileSystemModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QFileSystemModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MultiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(const QModelIndex& index, QModelRoleDataSpan roleDataSpan) const override { + if (handle__MultiData == 0) { + QFileSystemModel::multiData(index, roleDataSpan); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QModelRoleDataSpan* sigval2 = new QModelRoleDataSpan(roleDataSpan); + + miqt_exec_callback_QFileSystemModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QFileSystemModel::multiData(*index, *roleDataSpan); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QFileSystemModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QFileSystemModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QFileSystemModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QFileSystemModel::revert(); + return; + } + + + miqt_exec_callback_QFileSystemModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QFileSystemModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetInternalData = 0; + + // Subclass to allow providing a Go implementation + virtual void resetInternalData() override { + if (handle__ResetInternalData == 0) { + QFileSystemModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QFileSystemModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QFileSystemModel::resetInternalData(); + + } + +}; + +void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(); + *outptr_QFileSystemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QFileSystemModel* QFileSystemModel_new2(QObject* parent) { - return new QFileSystemModel(parent); +void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(parent); + *outptr_QFileSystemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self) { @@ -52,7 +1203,7 @@ void QFileSystemModel_RootPathChanged(QFileSystemModel* self, struct miqt_string } void QFileSystemModel_connect_RootPathChanged(QFileSystemModel* self, intptr_t slot) { - QFileSystemModel::connect(self, static_cast(&QFileSystemModel::rootPathChanged), self, [=](const QString& newPath) { + MiqtVirtualQFileSystemModel::connect(self, static_cast(&QFileSystemModel::rootPathChanged), self, [=](const QString& newPath) { const QString newPath_ret = newPath; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray newPath_b = newPath_ret.toUtf8(); @@ -73,7 +1224,7 @@ void QFileSystemModel_FileRenamed(QFileSystemModel* self, struct miqt_string pat } void QFileSystemModel_connect_FileRenamed(QFileSystemModel* self, intptr_t slot) { - QFileSystemModel::connect(self, static_cast(&QFileSystemModel::fileRenamed), self, [=](const QString& path, const QString& oldName, const QString& newName) { + MiqtVirtualQFileSystemModel::connect(self, static_cast(&QFileSystemModel::fileRenamed), self, [=](const QString& path, const QString& oldName, const QString& newName) { const QString path_ret = path; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray path_b = path_ret.toUtf8(); @@ -108,7 +1259,7 @@ void QFileSystemModel_DirectoryLoaded(QFileSystemModel* self, struct miqt_string } void QFileSystemModel_connect_DirectoryLoaded(QFileSystemModel* self, intptr_t slot) { - QFileSystemModel::connect(self, static_cast(&QFileSystemModel::directoryLoaded), self, [=](const QString& path) { + MiqtVirtualQFileSystemModel::connect(self, static_cast(&QFileSystemModel::directoryLoaded), self, [=](const QString& path) { const QString path_ret = path; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray path_b = path_ret.toUtf8(); @@ -121,8 +1272,8 @@ void QFileSystemModel_connect_DirectoryLoaded(QFileSystemModel* self, intptr_t s }); } -QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QFileSystemModel_IndexWithPath(const QFileSystemModel* self, struct miqt_string path) { @@ -138,8 +1289,8 @@ QModelIndex* QFileSystemModel_Sibling(const QFileSystemModel* self, int row, int return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -bool QFileSystemModel_HasChildren(const QFileSystemModel* self) { - return self->hasChildren(); +bool QFileSystemModel_HasChildren(const QFileSystemModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } bool QFileSystemModel_CanFetchMore(const QFileSystemModel* self, QModelIndex* parent) { @@ -150,28 +1301,28 @@ void QFileSystemModel_FetchMore(QFileSystemModel* self, QModelIndex* parent) { self->fetchMore(*parent); } -int QFileSystemModel_RowCount(const QFileSystemModel* self) { - return self->rowCount(); +int QFileSystemModel_RowCount(const QFileSystemModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QFileSystemModel_ColumnCount(const QFileSystemModel* self) { - return self->columnCount(); +int QFileSystemModel_ColumnCount(const QFileSystemModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } QVariant* QFileSystemModel_MyComputer(const QFileSystemModel* self) { return new QVariant(self->myComputer()); } -QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } int QFileSystemModel_Flags(const QFileSystemModel* self, QModelIndex* index) { @@ -179,8 +1330,8 @@ int QFileSystemModel_Flags(const QFileSystemModel* self, QModelIndex* index) { return static_cast(_ret); } -void QFileSystemModel_Sort(QFileSystemModel* self, int column) { - self->sort(static_cast(column)); +void QFileSystemModel_Sort(QFileSystemModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QFileSystemModel_MimeTypes(const QFileSystemModel* self) { @@ -448,52 +1599,336 @@ struct miqt_string QFileSystemModel_Tr3(const char* s, const char* c, int n) { return _ms; } -QModelIndex* QFileSystemModel_Index3(const QFileSystemModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - QModelIndex* QFileSystemModel_Index2(const QFileSystemModel* self, struct miqt_string path, int column) { QString path_QString = QString::fromUtf8(path.data, path.len); return new QModelIndex(self->index(path_QString, static_cast(column))); } -bool QFileSystemModel_HasChildren1(const QFileSystemModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); +QVariant* QFileSystemModel_MyComputer1(const QFileSystemModel* self, int role) { + return new QVariant(self->myComputer(static_cast(role))); } -int QFileSystemModel_RowCount1(const QFileSystemModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QFileSystemModel_SetOption2(QFileSystemModel* self, int option, bool on) { + self->setOption(static_cast(option), on); } -int QFileSystemModel_ColumnCount1(const QFileSystemModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QFileSystemModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Index = slot; } -QVariant* QFileSystemModel_MyComputer1(const QFileSystemModel* self, int role) { - return new QVariant(self->myComputer(static_cast(role))); +QModelIndex* QFileSystemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Index(row, column, parent); } -QVariant* QFileSystemModel_Data2(const QFileSystemModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +void QFileSystemModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Parent = slot; } -bool QFileSystemModel_SetData3(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +QModelIndex* QFileSystemModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Parent(child); } -QVariant* QFileSystemModel_HeaderData3(const QFileSystemModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QFileSystemModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Sibling = slot; } -void QFileSystemModel_Sort2(QFileSystemModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +QModelIndex* QFileSystemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Sibling(row, column, idx); } -void QFileSystemModel_SetOption2(QFileSystemModel* self, int option, bool on) { - self->setOption(static_cast(option), on); +void QFileSystemModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__HasChildren = slot; +} + +bool QFileSystemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QFileSystemModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QFileSystemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QFileSystemModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__FetchMore = slot; +} + +void QFileSystemModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QFileSystemModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RowCount = slot; +} + +int QFileSystemModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RowCount(parent); +} + +void QFileSystemModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__ColumnCount = slot; +} + +int QFileSystemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QFileSystemModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Data = slot; +} + +QVariant* QFileSystemModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Data(index, role); } -void QFileSystemModel_Delete(QFileSystemModel* self) { - delete self; +void QFileSystemModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SetData = slot; +} + +bool QFileSystemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QFileSystemModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QFileSystemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QFileSystemModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Flags = slot; +} + +int QFileSystemModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Flags(index); +} + +void QFileSystemModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Sort = slot; +} + +void QFileSystemModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Sort(column, order); +} + +void QFileSystemModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QFileSystemModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MimeTypes(); +} + +void QFileSystemModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QFileSystemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QFileSystemModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__DropMimeData = slot; +} + +bool QFileSystemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QFileSystemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QFileSystemModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QFileSystemModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QFileSystemModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RoleNames(); +} + +void QFileSystemModel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__TimerEvent = slot; +} + +void QFileSystemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_TimerEvent(event); +} + +void QFileSystemModel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Event = slot; +} + +bool QFileSystemModel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Event(event); +} + +void QFileSystemModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QFileSystemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QFileSystemModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QFileSystemModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_ItemData(index); +} + +void QFileSystemModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SetItemData = slot; +} + +bool QFileSystemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QFileSystemModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__ClearItemData = slot; +} + +bool QFileSystemModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QFileSystemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QFileSystemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QFileSystemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QFileSystemModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QFileSystemModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__InsertRows = slot; +} + +bool QFileSystemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QFileSystemModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__InsertColumns = slot; +} + +bool QFileSystemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QFileSystemModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RemoveRows = slot; +} + +bool QFileSystemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QFileSystemModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QFileSystemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QFileSystemModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MoveRows = slot; +} + +bool QFileSystemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QFileSystemModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MoveColumns = slot; +} + +bool QFileSystemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QFileSystemModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QFileSystemModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Buddy(index); +} + +void QFileSystemModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QFileSystemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QFileSystemModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Span = slot; +} + +QSize* QFileSystemModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Span(index); +} + +void QFileSystemModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__MultiData = slot; +} + +void QFileSystemModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQFileSystemModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QFileSystemModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Submit = slot; +} + +bool QFileSystemModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Submit(); +} + +void QFileSystemModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__Revert = slot; +} + +void QFileSystemModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_Revert(); +} + +void QFileSystemModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemModel*)(self) )->handle__ResetInternalData = slot; +} + +void QFileSystemModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQFileSystemModel*)(self) )->virtualbase_ResetInternalData(); +} + +void QFileSystemModel_Delete(QFileSystemModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfilesystemmodel.go b/qt6/gen_qfilesystemmodel.go index 5c11079a..8bae25d8 100644 --- a/qt6/gen_qfilesystemmodel.go +++ b/qt6/gen_qfilesystemmodel.go @@ -32,7 +32,8 @@ const ( ) type QFileSystemModel struct { - h *C.QFileSystemModel + h *C.QFileSystemModel + isSubclass bool *QAbstractItemModel } @@ -50,27 +51,47 @@ func (this *QFileSystemModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileSystemModel(h *C.QFileSystemModel) *QFileSystemModel { +// newQFileSystemModel constructs the type using only CGO pointers. +func newQFileSystemModel(h *C.QFileSystemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QFileSystemModel { if h == nil { return nil } - return &QFileSystemModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QFileSystemModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQFileSystemModel(h unsafe.Pointer) *QFileSystemModel { - return newQFileSystemModel((*C.QFileSystemModel)(h)) +// UnsafeNewQFileSystemModel constructs the type using only unsafe pointers. +func UnsafeNewQFileSystemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemModel { + if h == nil { + return nil + } + + return &QFileSystemModel{h: (*C.QFileSystemModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQFileSystemModel constructs a new QFileSystemModel object. func NewQFileSystemModel() *QFileSystemModel { - ret := C.QFileSystemModel_new() - return newQFileSystemModel(ret) + var outptr_QFileSystemModel *C.QFileSystemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemModel_new(&outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemModel2 constructs a new QFileSystemModel object. func NewQFileSystemModel2(parent *QObject) *QFileSystemModel { - ret := C.QFileSystemModel_new2(parent.cPointer()) - return newQFileSystemModel(ret) + var outptr_QFileSystemModel *C.QFileSystemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemModel_new2(parent.cPointer(), &outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFileSystemModel) MetaObject() *QMetaObject { @@ -189,8 +210,8 @@ func miqt_exec_callback_QFileSystemModel_DirectoryLoaded(cb C.intptr_t, path C.s gofunc(slotval1) } -func (this *QFileSystemModel) Index(row int, column int) *QModelIndex { - _ret := C.QFileSystemModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QFileSystemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QFileSystemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -221,8 +242,8 @@ func (this *QFileSystemModel) Sibling(row int, column int, idx *QModelIndex) *QM return _goptr } -func (this *QFileSystemModel) HasChildren() bool { - return (bool)(C.QFileSystemModel_HasChildren(this.h)) +func (this *QFileSystemModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QFileSystemModel_HasChildren(this.h, parent.cPointer())) } func (this *QFileSystemModel) CanFetchMore(parent *QModelIndex) bool { @@ -233,12 +254,12 @@ func (this *QFileSystemModel) FetchMore(parent *QModelIndex) { C.QFileSystemModel_FetchMore(this.h, parent.cPointer()) } -func (this *QFileSystemModel) RowCount() int { - return (int)(C.QFileSystemModel_RowCount(this.h)) +func (this *QFileSystemModel) RowCount(parent *QModelIndex) int { + return (int)(C.QFileSystemModel_RowCount(this.h, parent.cPointer())) } -func (this *QFileSystemModel) ColumnCount() int { - return (int)(C.QFileSystemModel_ColumnCount(this.h)) +func (this *QFileSystemModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QFileSystemModel_ColumnCount(this.h, parent.cPointer())) } func (this *QFileSystemModel) MyComputer() *QVariant { @@ -248,19 +269,19 @@ func (this *QFileSystemModel) MyComputer() *QVariant { return _goptr } -func (this *QFileSystemModel) Data(index *QModelIndex) *QVariant { - _ret := C.QFileSystemModel_Data(this.h, index.cPointer()) +func (this *QFileSystemModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QFileSystemModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QFileSystemModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QFileSystemModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QFileSystemModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QFileSystemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QFileSystemModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QFileSystemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QFileSystemModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QFileSystemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -270,8 +291,8 @@ func (this *QFileSystemModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QFileSystemModel_Flags(this.h, index.cPointer())) } -func (this *QFileSystemModel) Sort(column int) { - C.QFileSystemModel_Sort(this.h, (C.int)(column)) +func (this *QFileSystemModel) Sort(column int, order SortOrder) { + C.QFileSystemModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QFileSystemModel) MimeTypes() []string { @@ -294,7 +315,7 @@ func (this *QFileSystemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QFileSystemModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QFileSystemModel_MimeData(this.h, indexes_ma)), nil) } func (this *QFileSystemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -525,13 +546,6 @@ func QFileSystemModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QFileSystemModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QFileSystemModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - func (this *QFileSystemModel) Index2(path string, column int) *QModelIndex { path_ms := C.struct_miqt_string{} path_ms.data = C.CString(path) @@ -543,54 +557,1195 @@ func (this *QFileSystemModel) Index2(path string, column int) *QModelIndex { return _goptr } -func (this *QFileSystemModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QFileSystemModel_HasChildren1(this.h, parent.cPointer())) +func (this *QFileSystemModel) MyComputer1(role int) *QVariant { + _ret := C.QFileSystemModel_MyComputer1(this.h, (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr } -func (this *QFileSystemModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QFileSystemModel_RowCount1(this.h, parent.cPointer())) +func (this *QFileSystemModel) SetOption2(option QFileSystemModel__Option, on bool) { + C.QFileSystemModel_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } -func (this *QFileSystemModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QFileSystemModel_ColumnCount1(this.h, parent.cPointer())) +func (this *QFileSystemModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QFileSystemModel) MyComputer1(role int) *QVariant { - _ret := C.QFileSystemModel_MyComputer1(this.h, (C.int)(role)) - _goptr := newQVariant(_ret) +//export miqt_exec_callback_QFileSystemModel_Index +func miqt_exec_callback_QFileSystemModel_Index(self *C.QFileSystemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Parent +func miqt_exec_callback_QFileSystemModel_Parent(self *C.QFileSystemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QFileSystemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Sibling +func miqt_exec_callback_QFileSystemModel_Sibling(self *C.QFileSystemModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_HasChildren +func miqt_exec_callback_QFileSystemModel_HasChildren(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_CanFetchMore +func miqt_exec_callback_QFileSystemModel_CanFetchMore(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QFileSystemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QFileSystemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QFileSystemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_FetchMore +func miqt_exec_callback_QFileSystemModel_FetchMore(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QFileSystemModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QFileSystemModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QFileSystemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RowCount +func miqt_exec_callback_QFileSystemModel_RowCount(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QFileSystemModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QFileSystemModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QFileSystemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_ColumnCount +func miqt_exec_callback_QFileSystemModel_ColumnCount(self *C.QFileSystemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QFileSystemModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QFileSystemModel_Data2(this.h, index.cPointer(), (C.int)(role)) +func (this *QFileSystemModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QFileSystemModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QFileSystemModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QFileSystemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Data +func miqt_exec_callback_QFileSystemModel_Data(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QFileSystemModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QFileSystemModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +func (this *QFileSystemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QFileSystemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QFileSystemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SetData +func miqt_exec_callback_QFileSystemModel_SetData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QFileSystemModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QFileSystemModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QFileSystemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QFileSystemModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QFileSystemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QFileSystemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QFileSystemModel) Sort2(column int, order SortOrder) { - C.QFileSystemModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +//export miqt_exec_callback_QFileSystemModel_HeaderData +func miqt_exec_callback_QFileSystemModel_HeaderData(self *C.QFileSystemModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QFileSystemModel) SetOption2(option QFileSystemModel__Option, on bool) { - C.QFileSystemModel_SetOption2(this.h, (C.int)(option), (C.bool)(on)) +func (this *QFileSystemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QFileSystemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QFileSystemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QFileSystemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Flags +func miqt_exec_callback_QFileSystemModel_Flags(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QFileSystemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QFileSystemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QFileSystemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Sort +func miqt_exec_callback_QFileSystemModel_Sort(self *C.QFileSystemModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QFileSystemModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QFileSystemModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QFileSystemModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QFileSystemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MimeTypes +func miqt_exec_callback_QFileSystemModel_MimeTypes(self *C.QFileSystemModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QFileSystemModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QFileSystemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QFileSystemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QFileSystemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MimeData +func miqt_exec_callback_QFileSystemModel_MimeData(self *C.QFileSystemModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QFileSystemModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_DropMimeData +func miqt_exec_callback_QFileSystemModel_DropMimeData(self *C.QFileSystemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QFileSystemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QFileSystemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QFileSystemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SupportedDropActions +func miqt_exec_callback_QFileSystemModel_SupportedDropActions(self *C.QFileSystemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QFileSystemModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QFileSystemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QFileSystemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RoleNames +func miqt_exec_callback_QFileSystemModel_RoleNames(self *C.QFileSystemModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QFileSystemModel) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QFileSystemModel_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemModel) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QFileSystemModel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_TimerEvent +func miqt_exec_callback_QFileSystemModel_TimerEvent(self *C.QFileSystemModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QFileSystemModel) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QFileSystemModel_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QFileSystemModel) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QFileSystemModel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Event +func miqt_exec_callback_QFileSystemModel_Event(self *C.QFileSystemModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QFileSystemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QFileSystemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SetHeaderData +func miqt_exec_callback_QFileSystemModel_SetHeaderData(self *C.QFileSystemModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QFileSystemModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QFileSystemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QFileSystemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_ItemData +func miqt_exec_callback_QFileSystemModel_ItemData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QFileSystemModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QFileSystemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QFileSystemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QFileSystemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SetItemData +func miqt_exec_callback_QFileSystemModel_SetItemData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QFileSystemModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_ClearItemData +func miqt_exec_callback_QFileSystemModel_ClearItemData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QFileSystemModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_CanDropMimeData +func miqt_exec_callback_QFileSystemModel_CanDropMimeData(self *C.QFileSystemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QFileSystemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QFileSystemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QFileSystemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_SupportedDragActions +func miqt_exec_callback_QFileSystemModel_SupportedDragActions(self *C.QFileSystemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_InsertRows +func miqt_exec_callback_QFileSystemModel_InsertRows(self *C.QFileSystemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_InsertColumns +func miqt_exec_callback_QFileSystemModel_InsertColumns(self *C.QFileSystemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RemoveRows +func miqt_exec_callback_QFileSystemModel_RemoveRows(self *C.QFileSystemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QFileSystemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QFileSystemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QFileSystemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_RemoveColumns +func miqt_exec_callback_QFileSystemModel_RemoveColumns(self *C.QFileSystemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QFileSystemModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QFileSystemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MoveRows +func miqt_exec_callback_QFileSystemModel_MoveRows(self *C.QFileSystemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QFileSystemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QFileSystemModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QFileSystemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MoveColumns +func miqt_exec_callback_QFileSystemModel_MoveColumns(self *C.QFileSystemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QFileSystemModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QFileSystemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Buddy +func miqt_exec_callback_QFileSystemModel_Buddy(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QFileSystemModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QFileSystemModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QFileSystemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Match +func miqt_exec_callback_QFileSystemModel_Match(self *C.QFileSystemModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QFileSystemModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QFileSystemModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFileSystemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QFileSystemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Span +func miqt_exec_callback_QFileSystemModel_Span(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFileSystemModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QFileSystemModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QFileSystemModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QFileSystemModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_MultiData +func miqt_exec_callback_QFileSystemModel_MultiData(self *C.QFileSystemModel, cb C.intptr_t, index *C.QModelIndex, roleDataSpan *C.QModelRoleDataSpan) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + roleDataSpan_ret := roleDataSpan + roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan_ret) + roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *roleDataSpan_goptr + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QFileSystemModel) callVirtualBase_Submit() bool { + + return (bool)(C.QFileSystemModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QFileSystemModel) OnSubmit(slot func(super func() bool) bool) { + C.QFileSystemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Submit +func miqt_exec_callback_QFileSystemModel_Submit(self *C.QFileSystemModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFileSystemModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemModel) callVirtualBase_Revert() { + + C.QFileSystemModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QFileSystemModel) OnRevert(slot func(super func())) { + C.QFileSystemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_Revert +func miqt_exec_callback_QFileSystemModel_Revert(self *C.QFileSystemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QFileSystemModel) callVirtualBase_ResetInternalData() { + + C.QFileSystemModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QFileSystemModel) OnResetInternalData(slot func(super func())) { + C.QFileSystemModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemModel_ResetInternalData +func miqt_exec_callback_QFileSystemModel_ResetInternalData(self *C.QFileSystemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFileSystemModel{h: self}).callVirtualBase_ResetInternalData) + } // Delete this object from C++ memory. func (this *QFileSystemModel) Delete() { - C.QFileSystemModel_Delete(this.h) + C.QFileSystemModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfilesystemmodel.h b/qt6/gen_qfilesystemmodel.h index 37222b40..13ea8465 100644 --- a/qt6/gen_qfilesystemmodel.h +++ b/qt6/gen_qfilesystemmodel.h @@ -16,34 +16,44 @@ extern "C" { #ifdef __cplusplus class QAbstractFileIconProvider; +class QAbstractItemModel; class QByteArray; class QDateTime; class QDir; +class QEvent; class QFileInfo; class QFileSystemModel; class QIcon; class QMetaObject; class QMimeData; class QModelIndex; +class QModelRoleDataSpan; class QObject; +class QSize; +class QTimerEvent; class QVariant; #else typedef struct QAbstractFileIconProvider QAbstractFileIconProvider; +typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QDir QDir; +typedef struct QEvent QEvent; typedef struct QFileInfo QFileInfo; typedef struct QFileSystemModel QFileSystemModel; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QModelRoleDataSpan QModelRoleDataSpan; typedef struct QObject QObject; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QFileSystemModel* QFileSystemModel_new(); -QFileSystemModel* QFileSystemModel_new2(QObject* parent); +void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self); void* QFileSystemModel_Metacast(QFileSystemModel* self, const char* param1); struct miqt_string QFileSystemModel_Tr(const char* s); @@ -53,21 +63,21 @@ void QFileSystemModel_FileRenamed(QFileSystemModel* self, struct miqt_string pat void QFileSystemModel_connect_FileRenamed(QFileSystemModel* self, intptr_t slot); void QFileSystemModel_DirectoryLoaded(QFileSystemModel* self, struct miqt_string path); void QFileSystemModel_connect_DirectoryLoaded(QFileSystemModel* self, intptr_t slot); -QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column); +QModelIndex* QFileSystemModel_Index(const QFileSystemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QFileSystemModel_IndexWithPath(const QFileSystemModel* self, struct miqt_string path); QModelIndex* QFileSystemModel_Parent(const QFileSystemModel* self, QModelIndex* child); QModelIndex* QFileSystemModel_Sibling(const QFileSystemModel* self, int row, int column, QModelIndex* idx); -bool QFileSystemModel_HasChildren(const QFileSystemModel* self); +bool QFileSystemModel_HasChildren(const QFileSystemModel* self, QModelIndex* parent); bool QFileSystemModel_CanFetchMore(const QFileSystemModel* self, QModelIndex* parent); void QFileSystemModel_FetchMore(QFileSystemModel* self, QModelIndex* parent); -int QFileSystemModel_RowCount(const QFileSystemModel* self); -int QFileSystemModel_ColumnCount(const QFileSystemModel* self); +int QFileSystemModel_RowCount(const QFileSystemModel* self, QModelIndex* parent); +int QFileSystemModel_ColumnCount(const QFileSystemModel* self, QModelIndex* parent); QVariant* QFileSystemModel_MyComputer(const QFileSystemModel* self); -QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index); -bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value); -QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation); +QVariant* QFileSystemModel_Data(const QFileSystemModel* self, QModelIndex* index, int role); +bool QFileSystemModel_SetData(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QFileSystemModel_HeaderData(const QFileSystemModel* self, int section, int orientation, int role); int QFileSystemModel_Flags(const QFileSystemModel* self, QModelIndex* index); -void QFileSystemModel_Sort(QFileSystemModel* self, int column); +void QFileSystemModel_Sort(QFileSystemModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QFileSystemModel_MimeTypes(const QFileSystemModel* self); QMimeData* QFileSystemModel_MimeData(const QFileSystemModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QFileSystemModel_DropMimeData(QFileSystemModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); @@ -104,20 +114,92 @@ QIcon* QFileSystemModel_FileIcon(const QFileSystemModel* self, QModelIndex* inde int QFileSystemModel_Permissions(const QFileSystemModel* self, QModelIndex* index); QFileInfo* QFileSystemModel_FileInfo(const QFileSystemModel* self, QModelIndex* index); bool QFileSystemModel_Remove(QFileSystemModel* self, QModelIndex* index); +void QFileSystemModel_TimerEvent(QFileSystemModel* self, QTimerEvent* event); +bool QFileSystemModel_Event(QFileSystemModel* self, QEvent* event); struct miqt_string QFileSystemModel_Tr2(const char* s, const char* c); struct miqt_string QFileSystemModel_Tr3(const char* s, const char* c, int n); -QModelIndex* QFileSystemModel_Index3(const QFileSystemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QFileSystemModel_Index2(const QFileSystemModel* self, struct miqt_string path, int column); -bool QFileSystemModel_HasChildren1(const QFileSystemModel* self, QModelIndex* parent); -int QFileSystemModel_RowCount1(const QFileSystemModel* self, QModelIndex* parent); -int QFileSystemModel_ColumnCount1(const QFileSystemModel* self, QModelIndex* parent); QVariant* QFileSystemModel_MyComputer1(const QFileSystemModel* self, int role); -QVariant* QFileSystemModel_Data2(const QFileSystemModel* self, QModelIndex* index, int role); -bool QFileSystemModel_SetData3(QFileSystemModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QFileSystemModel_HeaderData3(const QFileSystemModel* self, int section, int orientation, int role); -void QFileSystemModel_Sort2(QFileSystemModel* self, int column, int order); void QFileSystemModel_SetOption2(QFileSystemModel* self, int option, bool on); -void QFileSystemModel_Delete(QFileSystemModel* self); +void QFileSystemModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QFileSystemModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QFileSystemModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QFileSystemModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_RowCount(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QFileSystemModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QFileSystemModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QFileSystemModel_override_virtual_SetData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QFileSystemModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QFileSystemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QFileSystemModel_override_virtual_Flags(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_Sort(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_Sort(void* self, int column, int order); +void QFileSystemModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QFileSystemModel_virtualbase_MimeTypes(const void* self); +void QFileSystemModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QFileSystemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QFileSystemModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QFileSystemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_SupportedDropActions(const void* self); +void QFileSystemModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QFileSystemModel_virtualbase_RoleNames(const void* self); +void QFileSystemModel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QFileSystemModel_override_virtual_Event(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_Event(void* self, QEvent* event); +void QFileSystemModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QFileSystemModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QFileSystemModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QFileSystemModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QFileSystemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QFileSystemModel_virtualbase_SupportedDragActions(const void* self); +void QFileSystemModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QFileSystemModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QFileSystemModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QFileSystemModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QFileSystemModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QFileSystemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QFileSystemModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QFileSystemModel_virtualbase_Span(const void* self, QModelIndex* index); +void QFileSystemModel_override_virtual_MultiData(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QFileSystemModel_override_virtual_Submit(void* self, intptr_t slot); +bool QFileSystemModel_virtualbase_Submit(void* self); +void QFileSystemModel_override_virtual_Revert(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_Revert(void* self); +void QFileSystemModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QFileSystemModel_virtualbase_ResetInternalData(void* self); +void QFileSystemModel_Delete(QFileSystemModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfilesystemwatcher.cpp b/qt6/gen_qfilesystemwatcher.cpp index bb4d9549..8a848c96 100644 --- a/qt6/gen_qfilesystemwatcher.cpp +++ b/qt6/gen_qfilesystemwatcher.cpp @@ -1,19 +1,208 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qfilesystemwatcher.h" #include "_cgo_export.h" -QFileSystemWatcher* QFileSystemWatcher_new() { - return new QFileSystemWatcher(); +class MiqtVirtualQFileSystemWatcher : public virtual QFileSystemWatcher { +public: + + MiqtVirtualQFileSystemWatcher(): QFileSystemWatcher() {}; + MiqtVirtualQFileSystemWatcher(const QStringList& paths): QFileSystemWatcher(paths) {}; + MiqtVirtualQFileSystemWatcher(QObject* parent): QFileSystemWatcher(parent) {}; + MiqtVirtualQFileSystemWatcher(const QStringList& paths, QObject* parent): QFileSystemWatcher(paths, parent) {}; + + virtual ~MiqtVirtualQFileSystemWatcher() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QFileSystemWatcher::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QFileSystemWatcher_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QFileSystemWatcher::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QFileSystemWatcher::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QFileSystemWatcher_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QFileSystemWatcher::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QFileSystemWatcher::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemWatcher_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QFileSystemWatcher::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QFileSystemWatcher::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemWatcher_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QFileSystemWatcher::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QFileSystemWatcher::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFileSystemWatcher_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QFileSystemWatcher::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QFileSystemWatcher::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSystemWatcher_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QFileSystemWatcher::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QFileSystemWatcher::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QFileSystemWatcher_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QFileSystemWatcher::disconnectNotify(*signal); + + } + +}; + +void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } -QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths) { +void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -21,14 +210,18 @@ QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_ QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - return new QFileSystemWatcher(paths_QList); + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } -QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent) { - return new QFileSystemWatcher(parent); +void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(parent); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } -QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent) { +void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -36,7 +229,9 @@ QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_ QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - return new QFileSystemWatcher(paths_QList, parent); + MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList, parent); + *outptr_QFileSystemWatcher = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self) { @@ -184,7 +379,67 @@ struct miqt_string QFileSystemWatcher_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFileSystemWatcher_Delete(QFileSystemWatcher* self) { - delete self; +void QFileSystemWatcher_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__Event = slot; +} + +bool QFileSystemWatcher_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_Event(event); +} + +void QFileSystemWatcher_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__EventFilter = slot; +} + +bool QFileSystemWatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QFileSystemWatcher_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__TimerEvent = slot; +} + +void QFileSystemWatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_TimerEvent(event); +} + +void QFileSystemWatcher_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__ChildEvent = slot; +} + +void QFileSystemWatcher_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_ChildEvent(event); +} + +void QFileSystemWatcher_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__CustomEvent = slot; +} + +void QFileSystemWatcher_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_CustomEvent(event); +} + +void QFileSystemWatcher_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__ConnectNotify = slot; +} + +void QFileSystemWatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QFileSystemWatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QFileSystemWatcher*)(self) )->handle__DisconnectNotify = slot; +} + +void QFileSystemWatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQFileSystemWatcher*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QFileSystemWatcher_Delete(QFileSystemWatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfilesystemwatcher.go b/qt6/gen_qfilesystemwatcher.go index b7381c80..8e979dce 100644 --- a/qt6/gen_qfilesystemwatcher.go +++ b/qt6/gen_qfilesystemwatcher.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFileSystemWatcher struct { - h *C.QFileSystemWatcher + h *C.QFileSystemWatcher + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QFileSystemWatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFileSystemWatcher(h *C.QFileSystemWatcher) *QFileSystemWatcher { +// newQFileSystemWatcher constructs the type using only CGO pointers. +func newQFileSystemWatcher(h *C.QFileSystemWatcher, h_QObject *C.QObject) *QFileSystemWatcher { if h == nil { return nil } - return &QFileSystemWatcher{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QFileSystemWatcher{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQFileSystemWatcher(h unsafe.Pointer) *QFileSystemWatcher { - return newQFileSystemWatcher((*C.QFileSystemWatcher)(h)) +// UnsafeNewQFileSystemWatcher constructs the type using only unsafe pointers. +func UnsafeNewQFileSystemWatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemWatcher { + if h == nil { + return nil + } + + return &QFileSystemWatcher{h: (*C.QFileSystemWatcher)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQFileSystemWatcher constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher() *QFileSystemWatcher { - ret := C.QFileSystemWatcher_new() - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new(&outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemWatcher2 constructs a new QFileSystemWatcher object. @@ -61,14 +76,24 @@ func NewQFileSystemWatcher2(paths []string) *QFileSystemWatcher { paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - ret := C.QFileSystemWatcher_new2(paths_ma) - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new2(paths_ma, &outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemWatcher3 constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher3(parent *QObject) *QFileSystemWatcher { - ret := C.QFileSystemWatcher_new3(parent.cPointer()) - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new3(parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } // NewQFileSystemWatcher4 constructs a new QFileSystemWatcher object. @@ -83,8 +108,13 @@ func NewQFileSystemWatcher4(paths []string, parent *QObject) *QFileSystemWatcher paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - ret := C.QFileSystemWatcher_new4(paths_ma, parent.cPointer()) - return newQFileSystemWatcher(ret) + var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil + var outptr_QObject *C.QObject = nil + + C.QFileSystemWatcher_new4(paths_ma, parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) + ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QFileSystemWatcher) MetaObject() *QMetaObject { @@ -216,9 +246,175 @@ func QFileSystemWatcher_Tr3(s string, c string, n int) string { return _ret } +func (this *QFileSystemWatcher) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QFileSystemWatcher_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QFileSystemWatcher) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QFileSystemWatcher_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_Event +func miqt_exec_callback_QFileSystemWatcher_Event(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemWatcher) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QFileSystemWatcher_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QFileSystemWatcher) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QFileSystemWatcher_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_EventFilter +func miqt_exec_callback_QFileSystemWatcher_EventFilter(self *C.QFileSystemWatcher, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFileSystemWatcher) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QFileSystemWatcher_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemWatcher) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QFileSystemWatcher_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_TimerEvent +func miqt_exec_callback_QFileSystemWatcher_TimerEvent(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QFileSystemWatcher_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemWatcher) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QFileSystemWatcher_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_ChildEvent +func miqt_exec_callback_QFileSystemWatcher_ChildEvent(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_CustomEvent(event *QEvent) { + + C.QFileSystemWatcher_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFileSystemWatcher) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFileSystemWatcher_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_CustomEvent +func miqt_exec_callback_QFileSystemWatcher_CustomEvent(self *C.QFileSystemWatcher, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QFileSystemWatcher_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSystemWatcher) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSystemWatcher_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_ConnectNotify +func miqt_exec_callback_QFileSystemWatcher_ConnectNotify(self *C.QFileSystemWatcher, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QFileSystemWatcher) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QFileSystemWatcher_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QFileSystemWatcher) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QFileSystemWatcher_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFileSystemWatcher_DisconnectNotify +func miqt_exec_callback_QFileSystemWatcher_DisconnectNotify(self *C.QFileSystemWatcher, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QFileSystemWatcher) Delete() { - C.QFileSystemWatcher_Delete(this.h) + C.QFileSystemWatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfilesystemwatcher.h b/qt6/gen_qfilesystemwatcher.h index 323e5fc6..168edadf 100644 --- a/qt6/gen_qfilesystemwatcher.h +++ b/qt6/gen_qfilesystemwatcher.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QFileSystemWatcher; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFileSystemWatcher QFileSystemWatcher; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QFileSystemWatcher* QFileSystemWatcher_new(); -QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths); -QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent); -QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent); +void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self); void* QFileSystemWatcher_Metacast(QFileSystemWatcher* self, const char* param1); struct miqt_string QFileSystemWatcher_Tr(const char* s); @@ -39,7 +47,21 @@ struct miqt_array /* of struct miqt_string */ QFileSystemWatcher_Files(const QF struct miqt_array /* of struct miqt_string */ QFileSystemWatcher_Directories(const QFileSystemWatcher* self); struct miqt_string QFileSystemWatcher_Tr2(const char* s, const char* c); struct miqt_string QFileSystemWatcher_Tr3(const char* s, const char* c, int n); -void QFileSystemWatcher_Delete(QFileSystemWatcher* self); +void QFileSystemWatcher_override_virtual_Event(void* self, intptr_t slot); +bool QFileSystemWatcher_virtualbase_Event(void* self, QEvent* event); +void QFileSystemWatcher_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFileSystemWatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QFileSystemWatcher_override_virtual_TimerEvent(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QFileSystemWatcher_override_virtual_ChildEvent(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QFileSystemWatcher_override_virtual_CustomEvent(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_CustomEvent(void* self, QEvent* event); +void QFileSystemWatcher_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QFileSystemWatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QFileSystemWatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QFileSystemWatcher_Delete(QFileSystemWatcher* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfloat16.cpp b/qt6/gen_qfloat16.cpp index 329c90c9..03123caf 100644 --- a/qt6/gen_qfloat16.cpp +++ b/qt6/gen_qfloat16.cpp @@ -2,16 +2,19 @@ #include "gen_qfloat16.h" #include "_cgo_export.h" -qfloat16* qfloat16_new() { - return new qfloat16(); +void qfloat16_new(qfloat16** outptr_qfloat16) { + qfloat16* ret = new qfloat16(); + *outptr_qfloat16 = ret; } -qfloat16* qfloat16_new2(int param1) { - return new qfloat16(static_cast(param1)); +void qfloat16_new2(int param1, qfloat16** outptr_qfloat16) { + qfloat16* ret = new qfloat16(static_cast(param1)); + *outptr_qfloat16 = ret; } -qfloat16* qfloat16_new3(float f) { - return new qfloat16(static_cast(f)); +void qfloat16_new3(float f, qfloat16** outptr_qfloat16) { + qfloat16* ret = new qfloat16(static_cast(f)); + *outptr_qfloat16 = ret; } bool qfloat16_IsInf(const qfloat16* self) { @@ -34,7 +37,11 @@ bool qfloat16_IsNormal(const qfloat16* self) { return self->isNormal(); } -void qfloat16_Delete(qfloat16* self) { - delete self; +void qfloat16_Delete(qfloat16* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfloat16.go b/qt6/gen_qfloat16.go index 94c30589..7eb3cea8 100644 --- a/qt6/gen_qfloat16.go +++ b/qt6/gen_qfloat16.go @@ -14,7 +14,8 @@ import ( ) type qfloat16 struct { - h *C.qfloat16 + h *C.qfloat16 + isSubclass bool } func (this *qfloat16) cPointer() *C.qfloat16 { @@ -31,6 +32,7 @@ func (this *qfloat16) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newqfloat16 constructs the type using only CGO pointers. func newqfloat16(h *C.qfloat16) *qfloat16 { if h == nil { return nil @@ -38,26 +40,43 @@ func newqfloat16(h *C.qfloat16) *qfloat16 { return &qfloat16{h: h} } +// UnsafeNewqfloat16 constructs the type using only unsafe pointers. func UnsafeNewqfloat16(h unsafe.Pointer) *qfloat16 { - return newqfloat16((*C.qfloat16)(h)) + if h == nil { + return nil + } + + return &qfloat16{h: (*C.qfloat16)(h)} } // Newqfloat16 constructs a new qfloat16 object. func Newqfloat16() *qfloat16 { - ret := C.qfloat16_new() - return newqfloat16(ret) + var outptr_qfloat16 *C.qfloat16 = nil + + C.qfloat16_new(&outptr_qfloat16) + ret := newqfloat16(outptr_qfloat16) + ret.isSubclass = true + return ret } // Newqfloat162 constructs a new qfloat16 object. func Newqfloat162(param1 Initialization) *qfloat16 { - ret := C.qfloat16_new2((C.int)(param1)) - return newqfloat16(ret) + var outptr_qfloat16 *C.qfloat16 = nil + + C.qfloat16_new2((C.int)(param1), &outptr_qfloat16) + ret := newqfloat16(outptr_qfloat16) + ret.isSubclass = true + return ret } // Newqfloat163 constructs a new qfloat16 object. func Newqfloat163(f float32) *qfloat16 { - ret := C.qfloat16_new3((C.float)(f)) - return newqfloat16(ret) + var outptr_qfloat16 *C.qfloat16 = nil + + C.qfloat16_new3((C.float)(f), &outptr_qfloat16) + ret := newqfloat16(outptr_qfloat16) + ret.isSubclass = true + return ret } func (this *qfloat16) IsInf() bool { @@ -82,7 +101,7 @@ func (this *qfloat16) IsNormal() bool { // Delete this object from C++ memory. func (this *qfloat16) Delete() { - C.qfloat16_Delete(this.h) + C.qfloat16_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfloat16.h b/qt6/gen_qfloat16.h index d9da7ce1..3e14e53d 100644 --- a/qt6/gen_qfloat16.h +++ b/qt6/gen_qfloat16.h @@ -20,15 +20,15 @@ class qfloat16; typedef struct qfloat16 qfloat16; #endif -qfloat16* qfloat16_new(); -qfloat16* qfloat16_new2(int param1); -qfloat16* qfloat16_new3(float f); +void qfloat16_new(qfloat16** outptr_qfloat16); +void qfloat16_new2(int param1, qfloat16** outptr_qfloat16); +void qfloat16_new3(float f, qfloat16** outptr_qfloat16); bool qfloat16_IsInf(const qfloat16* self); bool qfloat16_IsNaN(const qfloat16* self); bool qfloat16_IsFinite(const qfloat16* self); int qfloat16_FpClassify(const qfloat16* self); bool qfloat16_IsNormal(const qfloat16* self); -void qfloat16_Delete(qfloat16* self); +void qfloat16_Delete(qfloat16* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfocusframe.cpp b/qt6/gen_qfocusframe.cpp index df30ac12..c6b0ebb9 100644 --- a/qt6/gen_qfocusframe.cpp +++ b/qt6/gen_qfocusframe.cpp @@ -1,19 +1,1090 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qfocusframe.h" #include "_cgo_export.h" -QFocusFrame* QFocusFrame_new(QWidget* parent) { - return new QFocusFrame(parent); +class MiqtVirtualQFocusFrame : public virtual QFocusFrame { +public: + + MiqtVirtualQFocusFrame(QWidget* parent): QFocusFrame(parent) {}; + MiqtVirtualQFocusFrame(): QFocusFrame() {}; + + virtual ~MiqtVirtualQFocusFrame() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFocusFrame::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFocusFrame::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QFocusFrame::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QFocusFrame::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QFocusFrame::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QFocusFrame_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QFocusFrame::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOption* option) const override { + if (handle__InitStyleOption == 0) { + QFocusFrame::initStyleOption(option); + return; + } + + QStyleOption* sigval1 = option; + + miqt_exec_callback_QFocusFrame_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOption* option) const { + + QFocusFrame::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QFocusFrame::devType(); + } + + + int callback_return_value = miqt_exec_callback_QFocusFrame_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QFocusFrame::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFocusFrame::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFocusFrame_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFocusFrame::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFocusFrame::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFocusFrame_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFocusFrame::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFocusFrame::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFocusFrame_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFocusFrame::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QFocusFrame::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QFocusFrame_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QFocusFrame::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QFocusFrame::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QFocusFrame_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QFocusFrame::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QFocusFrame::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QFocusFrame_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QFocusFrame::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QFocusFrame::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QFocusFrame::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QFocusFrame::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QFocusFrame::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QFocusFrame::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QFocusFrame::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QFocusFrame::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QFocusFrame::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QFocusFrame::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QFocusFrame::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QFocusFrame::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QFocusFrame::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QFocusFrame::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QFocusFrame::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QFocusFrame::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QFocusFrame::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QFocusFrame::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QFocusFrame::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QFocusFrame::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QFocusFrame::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QFocusFrame::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QFocusFrame::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QFocusFrame::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QFocusFrame::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QFocusFrame::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QFocusFrame::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QFocusFrame::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QFocusFrame::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QFocusFrame::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QFocusFrame::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QFocusFrame::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QFocusFrame::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QFocusFrame::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QFocusFrame::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QFocusFrame::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QFocusFrame::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QFocusFrame::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QFocusFrame::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QFocusFrame::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QFocusFrame::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QFocusFrame::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QFocusFrame::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QFocusFrame::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QFocusFrame::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QFocusFrame::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QFocusFrame_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QFocusFrame::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QFocusFrame::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QFocusFrame_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QFocusFrame::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QFocusFrame::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QFocusFrame_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QFocusFrame::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QFocusFrame::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QFocusFrame_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QFocusFrame::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QFocusFrame::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QFocusFrame_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QFocusFrame::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QFocusFrame::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QFocusFrame_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QFocusFrame::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QFocusFrame::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QFocusFrame_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QFocusFrame::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QFocusFrame::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QFocusFrame_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QFocusFrame::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QFocusFrame::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QFocusFrame_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QFocusFrame::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QFocusFrame::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QFocusFrame_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QFocusFrame::focusNextPrevChild(next); + + } + +}; + +void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(parent); + *outptr_QFocusFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFocusFrame* QFocusFrame_new2() { - return new QFocusFrame(); +void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(); + *outptr_QFocusFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self) { @@ -65,7 +1136,355 @@ struct miqt_string QFocusFrame_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFocusFrame_Delete(QFocusFrame* self) { - delete self; +void QFocusFrame_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__Event = slot; +} + +bool QFocusFrame_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_Event(e); +} + +void QFocusFrame_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__EventFilter = slot; +} + +bool QFocusFrame_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QFocusFrame_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__PaintEvent = slot; +} + +void QFocusFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_PaintEvent(param1); +} + +void QFocusFrame_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InitStyleOption = slot; +} + +void QFocusFrame_virtualbase_InitStyleOption(const void* self, QStyleOption* option) { + ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_InitStyleOption(option); +} + +void QFocusFrame_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DevType = slot; +} + +int QFocusFrame_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_DevType(); +} + +void QFocusFrame_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__SetVisible = slot; +} + +void QFocusFrame_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_SetVisible(visible); +} + +void QFocusFrame_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__SizeHint = slot; +} + +QSize* QFocusFrame_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_SizeHint(); +} + +void QFocusFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFocusFrame_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFocusFrame_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__HeightForWidth = slot; +} + +int QFocusFrame_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QFocusFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QFocusFrame_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QFocusFrame_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QFocusFrame_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_PaintEngine(); +} + +void QFocusFrame_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MousePressEvent = slot; +} + +void QFocusFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MousePressEvent(event); +} + +void QFocusFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QFocusFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QFocusFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QFocusFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QFocusFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MouseMoveEvent = slot; +} + +void QFocusFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QFocusFrame_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__WheelEvent = slot; +} + +void QFocusFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_WheelEvent(event); +} + +void QFocusFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__KeyPressEvent = slot; +} + +void QFocusFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QFocusFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QFocusFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QFocusFrame_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__FocusInEvent = slot; +} + +void QFocusFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_FocusInEvent(event); +} + +void QFocusFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__FocusOutEvent = slot; +} + +void QFocusFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QFocusFrame_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__EnterEvent = slot; +} + +void QFocusFrame_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_EnterEvent(event); +} + +void QFocusFrame_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__LeaveEvent = slot; +} + +void QFocusFrame_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_LeaveEvent(event); +} + +void QFocusFrame_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__MoveEvent = slot; +} + +void QFocusFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_MoveEvent(event); +} + +void QFocusFrame_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ResizeEvent = slot; +} + +void QFocusFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ResizeEvent(event); +} + +void QFocusFrame_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__CloseEvent = slot; +} + +void QFocusFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_CloseEvent(event); +} + +void QFocusFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFocusFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QFocusFrame_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__TabletEvent = slot; +} + +void QFocusFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_TabletEvent(event); +} + +void QFocusFrame_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ActionEvent = slot; +} + +void QFocusFrame_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ActionEvent(event); +} + +void QFocusFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DragEnterEvent = slot; +} + +void QFocusFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QFocusFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DragMoveEvent = slot; +} + +void QFocusFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QFocusFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DragLeaveEvent = slot; +} + +void QFocusFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QFocusFrame_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__DropEvent = slot; +} + +void QFocusFrame_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_DropEvent(event); +} + +void QFocusFrame_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ShowEvent = slot; +} + +void QFocusFrame_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ShowEvent(event); +} + +void QFocusFrame_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__HideEvent = slot; +} + +void QFocusFrame_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_HideEvent(event); +} + +void QFocusFrame_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__NativeEvent = slot; +} + +bool QFocusFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QFocusFrame_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__ChangeEvent = slot; +} + +void QFocusFrame_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QFocusFrame_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__Metric = slot; +} + +int QFocusFrame_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_Metric(param1); +} + +void QFocusFrame_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InitPainter = slot; +} + +void QFocusFrame_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_InitPainter(painter); +} + +void QFocusFrame_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QFocusFrame_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_Redirected(offset); +} + +void QFocusFrame_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QFocusFrame_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_SharedPainter(); +} + +void QFocusFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InputMethodEvent = slot; +} + +void QFocusFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QFocusFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QFocusFrame_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQFocusFrame*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QFocusFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QFocusFrame*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QFocusFrame_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQFocusFrame*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QFocusFrame_Delete(QFocusFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfocusframe.go b/qt6/gen_qfocusframe.go index b4134fae..d3272211 100644 --- a/qt6/gen_qfocusframe.go +++ b/qt6/gen_qfocusframe.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QFocusFrame struct { - h *C.QFocusFrame + h *C.QFocusFrame + isSubclass bool *QWidget } @@ -32,27 +34,49 @@ func (this *QFocusFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFocusFrame(h *C.QFocusFrame) *QFocusFrame { +// newQFocusFrame constructs the type using only CGO pointers. +func newQFocusFrame(h *C.QFocusFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFocusFrame { if h == nil { return nil } - return &QFocusFrame{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QFocusFrame{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFocusFrame(h unsafe.Pointer) *QFocusFrame { - return newQFocusFrame((*C.QFocusFrame)(h)) +// UnsafeNewQFocusFrame constructs the type using only unsafe pointers. +func UnsafeNewQFocusFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFocusFrame { + if h == nil { + return nil + } + + return &QFocusFrame{h: (*C.QFocusFrame)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFocusFrame constructs a new QFocusFrame object. func NewQFocusFrame(parent *QWidget) *QFocusFrame { - ret := C.QFocusFrame_new(parent.cPointer()) - return newQFocusFrame(ret) + var outptr_QFocusFrame *C.QFocusFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFocusFrame_new(parent.cPointer(), &outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFocusFrame2 constructs a new QFocusFrame object. func NewQFocusFrame2() *QFocusFrame { - ret := C.QFocusFrame_new2() - return newQFocusFrame(ret) + var outptr_QFocusFrame *C.QFocusFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFocusFrame_new2(&outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFocusFrame) MetaObject() *QMetaObject { @@ -79,7 +103,7 @@ func (this *QFocusFrame) SetWidget(widget *QWidget) { } func (this *QFocusFrame) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QFocusFrame_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QFocusFrame_Widget(this.h)), nil, nil) } func QFocusFrame_Tr2(s string, c string) string { @@ -104,9 +128,1024 @@ func QFocusFrame_Tr3(s string, c string, n int) string { return _ret } +func (this *QFocusFrame) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFocusFrame_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFocusFrame) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFocusFrame_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_Event +func miqt_exec_callback_QFocusFrame_Event(self *C.QFocusFrame, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QFocusFrame_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QFocusFrame) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QFocusFrame_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_EventFilter +func miqt_exec_callback_QFocusFrame_EventFilter(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QFocusFrame_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFocusFrame) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QFocusFrame_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_PaintEvent +func miqt_exec_callback_QFocusFrame_PaintEvent(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_InitStyleOption(option *QStyleOption) { + + C.QFocusFrame_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QFocusFrame) OnInitStyleOption(slot func(super func(option *QStyleOption), option *QStyleOption)) { + C.QFocusFrame_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InitStyleOption +func miqt_exec_callback_QFocusFrame_InitStyleOption(self *C.QFocusFrame, cb C.intptr_t, option *C.QStyleOption) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOption), option *QStyleOption)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DevType() int { + + return (int)(C.QFocusFrame_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QFocusFrame) OnDevType(slot func(super func() int) int) { + C.QFocusFrame_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DevType +func miqt_exec_callback_QFocusFrame_DevType(self *C.QFocusFrame, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_SetVisible(visible bool) { + + C.QFocusFrame_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFocusFrame) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFocusFrame_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_SetVisible +func miqt_exec_callback_QFocusFrame_SetVisible(self *C.QFocusFrame, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFocusFrame_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFocusFrame) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFocusFrame_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_SizeHint +func miqt_exec_callback_QFocusFrame_SizeHint(self *C.QFocusFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFocusFrame_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFocusFrame) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFocusFrame_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MinimumSizeHint +func miqt_exec_callback_QFocusFrame_MinimumSizeHint(self *C.QFocusFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QFocusFrame_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFocusFrame) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QFocusFrame_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_HeightForWidth +func miqt_exec_callback_QFocusFrame_HeightForWidth(self *C.QFocusFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QFocusFrame_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QFocusFrame) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QFocusFrame_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_HasHeightForWidth +func miqt_exec_callback_QFocusFrame_HasHeightForWidth(self *C.QFocusFrame, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QFocusFrame_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QFocusFrame) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QFocusFrame_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_PaintEngine +func miqt_exec_callback_QFocusFrame_PaintEngine(self *C.QFocusFrame, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MousePressEvent +func miqt_exec_callback_QFocusFrame_MousePressEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MouseReleaseEvent +func miqt_exec_callback_QFocusFrame_MouseReleaseEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent +func miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QFocusFrame_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFocusFrame_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MouseMoveEvent +func miqt_exec_callback_QFocusFrame_MouseMoveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QFocusFrame_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QFocusFrame_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_WheelEvent +func miqt_exec_callback_QFocusFrame_WheelEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QFocusFrame_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFocusFrame_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_KeyPressEvent +func miqt_exec_callback_QFocusFrame_KeyPressEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QFocusFrame_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFocusFrame_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_KeyReleaseEvent +func miqt_exec_callback_QFocusFrame_KeyReleaseEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QFocusFrame_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFocusFrame_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_FocusInEvent +func miqt_exec_callback_QFocusFrame_FocusInEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QFocusFrame_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFocusFrame_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_FocusOutEvent +func miqt_exec_callback_QFocusFrame_FocusOutEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QFocusFrame_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QFocusFrame_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_EnterEvent +func miqt_exec_callback_QFocusFrame_EnterEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QFocusFrame_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFocusFrame_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_LeaveEvent +func miqt_exec_callback_QFocusFrame_LeaveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QFocusFrame_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QFocusFrame_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_MoveEvent +func miqt_exec_callback_QFocusFrame_MoveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QFocusFrame_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QFocusFrame_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ResizeEvent +func miqt_exec_callback_QFocusFrame_ResizeEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QFocusFrame_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QFocusFrame_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_CloseEvent +func miqt_exec_callback_QFocusFrame_CloseEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QFocusFrame_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QFocusFrame_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ContextMenuEvent +func miqt_exec_callback_QFocusFrame_ContextMenuEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QFocusFrame_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QFocusFrame_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_TabletEvent +func miqt_exec_callback_QFocusFrame_TabletEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QFocusFrame_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QFocusFrame_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ActionEvent +func miqt_exec_callback_QFocusFrame_ActionEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QFocusFrame_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QFocusFrame_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DragEnterEvent +func miqt_exec_callback_QFocusFrame_DragEnterEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QFocusFrame_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QFocusFrame_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DragMoveEvent +func miqt_exec_callback_QFocusFrame_DragMoveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QFocusFrame_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QFocusFrame_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DragLeaveEvent +func miqt_exec_callback_QFocusFrame_DragLeaveEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QFocusFrame_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QFocusFrame_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_DropEvent +func miqt_exec_callback_QFocusFrame_DropEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QFocusFrame_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QFocusFrame_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ShowEvent +func miqt_exec_callback_QFocusFrame_ShowEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QFocusFrame_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFocusFrame) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QFocusFrame_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_HideEvent +func miqt_exec_callback_QFocusFrame_HideEvent(self *C.QFocusFrame, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QFocusFrame_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QFocusFrame) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QFocusFrame_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_NativeEvent +func miqt_exec_callback_QFocusFrame_NativeEvent(self *C.QFocusFrame, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QFocusFrame_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFocusFrame) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QFocusFrame_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_ChangeEvent +func miqt_exec_callback_QFocusFrame_ChangeEvent(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QFocusFrame_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFocusFrame) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QFocusFrame_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_Metric +func miqt_exec_callback_QFocusFrame_Metric(self *C.QFocusFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFocusFrame) callVirtualBase_InitPainter(painter *QPainter) { + + C.QFocusFrame_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QFocusFrame) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QFocusFrame_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InitPainter +func miqt_exec_callback_QFocusFrame_InitPainter(self *C.QFocusFrame, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QFocusFrame_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QFocusFrame) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QFocusFrame_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_Redirected +func miqt_exec_callback_QFocusFrame_Redirected(self *C.QFocusFrame, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QFocusFrame_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QFocusFrame) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QFocusFrame_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_SharedPainter +func miqt_exec_callback_QFocusFrame_SharedPainter(self *C.QFocusFrame, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QFocusFrame_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFocusFrame) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QFocusFrame_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InputMethodEvent +func miqt_exec_callback_QFocusFrame_InputMethodEvent(self *C.QFocusFrame, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFocusFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QFocusFrame) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QFocusFrame_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFocusFrame) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QFocusFrame_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_InputMethodQuery +func miqt_exec_callback_QFocusFrame_InputMethodQuery(self *C.QFocusFrame, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFocusFrame) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QFocusFrame_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QFocusFrame) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QFocusFrame_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFocusFrame_FocusNextPrevChild +func miqt_exec_callback_QFocusFrame_FocusNextPrevChild(self *C.QFocusFrame, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFocusFrame) Delete() { - C.QFocusFrame_Delete(this.h) + C.QFocusFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfocusframe.h b/qt6/gen_qfocusframe.h index edccf0ea..941e61ae 100644 --- a/qt6/gen_qfocusframe.h +++ b/qt6/gen_qfocusframe.h @@ -15,25 +15,173 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; class QFocusFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QStyleOption; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFocusFrame QFocusFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QStyleOption QStyleOption; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QFocusFrame* QFocusFrame_new(QWidget* parent); -QFocusFrame* QFocusFrame_new2(); +void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self); void* QFocusFrame_Metacast(QFocusFrame* self, const char* param1); struct miqt_string QFocusFrame_Tr(const char* s); void QFocusFrame_SetWidget(QFocusFrame* self, QWidget* widget); QWidget* QFocusFrame_Widget(const QFocusFrame* self); +bool QFocusFrame_Event(QFocusFrame* self, QEvent* e); +bool QFocusFrame_EventFilter(QFocusFrame* self, QObject* param1, QEvent* param2); +void QFocusFrame_PaintEvent(QFocusFrame* self, QPaintEvent* param1); +void QFocusFrame_InitStyleOption(const QFocusFrame* self, QStyleOption* option); struct miqt_string QFocusFrame_Tr2(const char* s, const char* c); struct miqt_string QFocusFrame_Tr3(const char* s, const char* c, int n); -void QFocusFrame_Delete(QFocusFrame* self); +void QFocusFrame_override_virtual_Event(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_Event(void* self, QEvent* e); +void QFocusFrame_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QFocusFrame_override_virtual_PaintEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QFocusFrame_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QFocusFrame_virtualbase_InitStyleOption(const void* self, QStyleOption* option); +void QFocusFrame_override_virtual_DevType(void* self, intptr_t slot); +int QFocusFrame_virtualbase_DevType(const void* self); +void QFocusFrame_override_virtual_SetVisible(void* self, intptr_t slot); +void QFocusFrame_virtualbase_SetVisible(void* self, bool visible); +void QFocusFrame_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFocusFrame_virtualbase_SizeHint(const void* self); +void QFocusFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFocusFrame_virtualbase_MinimumSizeHint(const void* self); +void QFocusFrame_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QFocusFrame_virtualbase_HeightForWidth(const void* self, int param1); +void QFocusFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_HasHeightForWidth(const void* self); +void QFocusFrame_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QFocusFrame_virtualbase_PaintEngine(const void* self); +void QFocusFrame_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QFocusFrame_override_virtual_WheelEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QFocusFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QFocusFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QFocusFrame_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QFocusFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QFocusFrame_override_virtual_EnterEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QFocusFrame_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_LeaveEvent(void* self, QEvent* event); +void QFocusFrame_override_virtual_MoveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QFocusFrame_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QFocusFrame_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QFocusFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QFocusFrame_override_virtual_TabletEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QFocusFrame_override_virtual_ActionEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QFocusFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QFocusFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QFocusFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QFocusFrame_override_virtual_DropEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_DropEvent(void* self, QDropEvent* event); +void QFocusFrame_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QFocusFrame_override_virtual_HideEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_HideEvent(void* self, QHideEvent* event); +void QFocusFrame_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QFocusFrame_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QFocusFrame_override_virtual_Metric(void* self, intptr_t slot); +int QFocusFrame_virtualbase_Metric(const void* self, int param1); +void QFocusFrame_override_virtual_InitPainter(void* self, intptr_t slot); +void QFocusFrame_virtualbase_InitPainter(const void* self, QPainter* painter); +void QFocusFrame_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QFocusFrame_virtualbase_Redirected(const void* self, QPoint* offset); +void QFocusFrame_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QFocusFrame_virtualbase_SharedPainter(const void* self); +void QFocusFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QFocusFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QFocusFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QFocusFrame_virtualbase_InputMethodQuery(const void* self, int param1); +void QFocusFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QFocusFrame_virtualbase_FocusNextPrevChild(void* self, bool next); +void QFocusFrame_Delete(QFocusFrame* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfont.cpp b/qt6/gen_qfont.cpp index 1e6b9a79..ea6db2fb 100644 --- a/qt6/gen_qfont.cpp +++ b/qt6/gen_qfont.cpp @@ -8,16 +8,18 @@ #include "gen_qfont.h" #include "_cgo_export.h" -QFont* QFont_new() { - return new QFont(); +void QFont_new(QFont** outptr_QFont) { + QFont* ret = new QFont(); + *outptr_QFont = ret; } -QFont* QFont_new2(struct miqt_string family) { +void QFont_new2(struct miqt_string family, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString); + QFont* ret = new QFont(family_QString); + *outptr_QFont = ret; } -QFont* QFont_new3(struct miqt_array /* of struct miqt_string */ families) { +void QFont_new3(struct miqt_array /* of struct miqt_string */ families, QFont** outptr_QFont) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -25,33 +27,39 @@ QFont* QFont_new3(struct miqt_array /* of struct miqt_string */ families) { QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - return new QFont(families_QList); + QFont* ret = new QFont(families_QList); + *outptr_QFont = ret; } -QFont* QFont_new4(QFont* font, QPaintDevice* pd) { - return new QFont(*font, pd); +void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont) { + QFont* ret = new QFont(*font, pd); + *outptr_QFont = ret; } -QFont* QFont_new5(QFont* font) { - return new QFont(*font); +void QFont_new5(QFont* font, QFont** outptr_QFont) { + QFont* ret = new QFont(*font); + *outptr_QFont = ret; } -QFont* QFont_new6(struct miqt_string family, int pointSize) { +void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString, static_cast(pointSize)); + QFont* ret = new QFont(family_QString, static_cast(pointSize)); + *outptr_QFont = ret; } -QFont* QFont_new7(struct miqt_string family, int pointSize, int weight) { +void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString, static_cast(pointSize), static_cast(weight)); + QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight)); + *outptr_QFont = ret; } -QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic) { +void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont) { QString family_QString = QString::fromUtf8(family.data, family.len); - return new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); + QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); + *outptr_QFont = ret; } -QFont* QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize) { +void QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize, QFont** outptr_QFont) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -59,10 +67,11 @@ QFont* QFont_new9(struct miqt_array /* of struct miqt_string */ families, int p QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - return new QFont(families_QList, static_cast(pointSize)); + QFont* ret = new QFont(families_QList, static_cast(pointSize)); + *outptr_QFont = ret; } -QFont* QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight) { +void QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, QFont** outptr_QFont) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -70,10 +79,11 @@ QFont* QFont_new10(struct miqt_array /* of struct miqt_string */ families, int QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - return new QFont(families_QList, static_cast(pointSize), static_cast(weight)); + QFont* ret = new QFont(families_QList, static_cast(pointSize), static_cast(weight)); + *outptr_QFont = ret; } -QFont* QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic) { +void QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic, QFont** outptr_QFont) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -81,7 +91,8 @@ QFont* QFont_new11(struct miqt_array /* of struct miqt_string */ families, int QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - return new QFont(families_QList, static_cast(pointSize), static_cast(weight), italic); + QFont* ret = new QFont(families_QList, static_cast(pointSize), static_cast(weight), italic); + *outptr_QFont = ret; } void QFont_Swap(QFont* self, QFont* other) { @@ -492,7 +503,11 @@ void QFont_SetStyleHint2(QFont* self, int param1, int param2) { self->setStyleHint(static_cast(param1), static_cast(param2)); } -void QFont_Delete(QFont* self) { - delete self; +void QFont_Delete(QFont* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfont.go b/qt6/gen_qfont.go index 47416bcb..0614dc43 100644 --- a/qt6/gen_qfont.go +++ b/qt6/gen_qfont.go @@ -137,7 +137,8 @@ const ( ) type QFont struct { - h *C.QFont + h *C.QFont + isSubclass bool } func (this *QFont) cPointer() *C.QFont { @@ -154,6 +155,7 @@ func (this *QFont) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFont constructs the type using only CGO pointers. func newQFont(h *C.QFont) *QFont { if h == nil { return nil @@ -161,14 +163,23 @@ func newQFont(h *C.QFont) *QFont { return &QFont{h: h} } +// UnsafeNewQFont constructs the type using only unsafe pointers. func UnsafeNewQFont(h unsafe.Pointer) *QFont { - return newQFont((*C.QFont)(h)) + if h == nil { + return nil + } + + return &QFont{h: (*C.QFont)(h)} } // NewQFont constructs a new QFont object. func NewQFont() *QFont { - ret := C.QFont_new() - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new(&outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont2 constructs a new QFont object. @@ -177,8 +188,12 @@ func NewQFont2(family string) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new2(family_ms) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new2(family_ms, &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont3 constructs a new QFont object. @@ -193,20 +208,32 @@ func NewQFont3(families []string) *QFont { families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - ret := C.QFont_new3(families_ma) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new3(families_ma, &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont4 constructs a new QFont object. func NewQFont4(font *QFont, pd *QPaintDevice) *QFont { - ret := C.QFont_new4(font.cPointer(), pd.cPointer()) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new4(font.cPointer(), pd.cPointer(), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont5 constructs a new QFont object. func NewQFont5(font *QFont) *QFont { - ret := C.QFont_new5(font.cPointer()) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new5(font.cPointer(), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont6 constructs a new QFont object. @@ -215,8 +242,12 @@ func NewQFont6(family string, pointSize int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new6(family_ms, (C.int)(pointSize)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new6(family_ms, (C.int)(pointSize), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont7 constructs a new QFont object. @@ -225,8 +256,12 @@ func NewQFont7(family string, pointSize int, weight int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont8 constructs a new QFont object. @@ -235,8 +270,12 @@ func NewQFont8(family string, pointSize int, weight int, italic bool) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - ret := C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont9 constructs a new QFont object. @@ -251,8 +290,12 @@ func NewQFont9(families []string, pointSize int) *QFont { families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - ret := C.QFont_new9(families_ma, (C.int)(pointSize)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new9(families_ma, (C.int)(pointSize), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont10 constructs a new QFont object. @@ -267,8 +310,12 @@ func NewQFont10(families []string, pointSize int, weight int) *QFont { families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - ret := C.QFont_new10(families_ma, (C.int)(pointSize), (C.int)(weight)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new10(families_ma, (C.int)(pointSize), (C.int)(weight), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } // NewQFont11 constructs a new QFont object. @@ -283,8 +330,12 @@ func NewQFont11(families []string, pointSize int, weight int, italic bool) *QFon families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - ret := C.QFont_new11(families_ma, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic)) - return newQFont(ret) + var outptr_QFont *C.QFont = nil + + C.QFont_new11(families_ma, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic), &outptr_QFont) + ret := newQFont(outptr_QFont) + ret.isSubclass = true + return ret } func (this *QFont) Swap(other *QFont) { @@ -677,7 +728,7 @@ func (this *QFont) SetStyleHint2(param1 QFont__StyleHint, param2 QFont__StyleStr // Delete this object from C++ memory. func (this *QFont) Delete() { - C.QFont_Delete(this.h) + C.QFont_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfont.h b/qt6/gen_qfont.h index c931d7d5..5a872f96 100644 --- a/qt6/gen_qfont.h +++ b/qt6/gen_qfont.h @@ -22,17 +22,17 @@ typedef struct QFont QFont; typedef struct QPaintDevice QPaintDevice; #endif -QFont* QFont_new(); -QFont* QFont_new2(struct miqt_string family); -QFont* QFont_new3(struct miqt_array /* of struct miqt_string */ families); -QFont* QFont_new4(QFont* font, QPaintDevice* pd); -QFont* QFont_new5(QFont* font); -QFont* QFont_new6(struct miqt_string family, int pointSize); -QFont* QFont_new7(struct miqt_string family, int pointSize, int weight); -QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic); -QFont* QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize); -QFont* QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight); -QFont* QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic); +void QFont_new(QFont** outptr_QFont); +void QFont_new2(struct miqt_string family, QFont** outptr_QFont); +void QFont_new3(struct miqt_array /* of struct miqt_string */ families, QFont** outptr_QFont); +void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont); +void QFont_new5(QFont* font, QFont** outptr_QFont); +void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont); +void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont); +void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont); +void QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize, QFont** outptr_QFont); +void QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, QFont** outptr_QFont); +void QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic, QFont** outptr_QFont); void QFont_Swap(QFont* self, QFont* other); struct miqt_string QFont_Family(const QFont* self); void QFont_SetFamily(QFont* self, struct miqt_string family); @@ -104,7 +104,7 @@ void QFont_SetResolveMask(QFont* self, unsigned int mask); void QFont_SetLegacyWeight(QFont* self, int legacyWeight); int QFont_LegacyWeight(const QFont* self); void QFont_SetStyleHint2(QFont* self, int param1, int param2); -void QFont_Delete(QFont* self); +void QFont_Delete(QFont* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfontcombobox.cpp b/qt6/gen_qfontcombobox.cpp index 359c7e86..25ee743c 100644 --- a/qt6/gen_qfontcombobox.cpp +++ b/qt6/gen_qfontcombobox.cpp @@ -1,21 +1,579 @@ +#include +#include +#include +#include +#include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qfontcombobox.h" #include "_cgo_export.h" -QFontComboBox* QFontComboBox_new(QWidget* parent) { - return new QFontComboBox(parent); +class MiqtVirtualQFontComboBox : public virtual QFontComboBox { +public: + + MiqtVirtualQFontComboBox(QWidget* parent): QFontComboBox(parent) {}; + MiqtVirtualQFontComboBox(): QFontComboBox() {}; + + virtual ~MiqtVirtualQFontComboBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFontComboBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontComboBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFontComboBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFontComboBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFontComboBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFontComboBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QFontComboBox::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QFontComboBox_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QFontComboBox::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFontComboBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontComboBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFontComboBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowPopup = 0; + + // Subclass to allow providing a Go implementation + virtual void showPopup() override { + if (handle__ShowPopup == 0) { + QFontComboBox::showPopup(); + return; + } + + + miqt_exec_callback_QFontComboBox_ShowPopup(this, handle__ShowPopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowPopup() { + + QFontComboBox::showPopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HidePopup = 0; + + // Subclass to allow providing a Go implementation + virtual void hidePopup() override { + if (handle__HidePopup == 0) { + QFontComboBox::hidePopup(); + return; + } + + + miqt_exec_callback_QFontComboBox_HidePopup(this, handle__HidePopup); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HidePopup() { + + QFontComboBox::hidePopup(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QFontComboBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QFontComboBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QFontComboBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QFontComboBox::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QFontComboBox::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QFontComboBox::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QFontComboBox::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QFontComboBox::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QFontComboBox::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QFontComboBox::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QFontComboBox::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QFontComboBox::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QFontComboBox::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* e) override { + if (handle__ShowEvent == 0) { + QFontComboBox::showEvent(e); + return; + } + + QShowEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* e) { + + QFontComboBox::showEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* e) override { + if (handle__HideEvent == 0) { + QFontComboBox::hideEvent(e); + return; + } + + QHideEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* e) { + + QFontComboBox::hideEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QFontComboBox::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QFontComboBox::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QFontComboBox::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QFontComboBox::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QFontComboBox::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QFontComboBox::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QFontComboBox::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QFontComboBox::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QFontComboBox::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QFontComboBox::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QFontComboBox::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QFontComboBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QFontComboBox::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QFontComboBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QFontComboBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QFontComboBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionComboBox* option) const override { + if (handle__InitStyleOption == 0) { + QFontComboBox::initStyleOption(option); + return; + } + + QStyleOptionComboBox* sigval1 = option; + + miqt_exec_callback_QFontComboBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionComboBox* option) const { + + QFontComboBox::initStyleOption(option); + + } + +}; + +void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(parent); + *outptr_QFontComboBox = ret; + *outptr_QComboBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontComboBox* QFontComboBox_new2() { - return new QFontComboBox(); +void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(); + *outptr_QFontComboBox = ret; + *outptr_QComboBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self) { @@ -111,7 +669,7 @@ void QFontComboBox_CurrentFontChanged(QFontComboBox* self, QFont* f) { } void QFontComboBox_connect_CurrentFontChanged(QFontComboBox* self, intptr_t slot) { - QFontComboBox::connect(self, static_cast(&QFontComboBox::currentFontChanged), self, [=](const QFont& f) { + MiqtVirtualQFontComboBox::connect(self, static_cast(&QFontComboBox::currentFontChanged), self, [=](const QFont& f) { const QFont& f_ret = f; // Cast returned reference into pointer QFont* sigval1 = const_cast(&f_ret); @@ -141,7 +699,187 @@ struct miqt_string QFontComboBox_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFontComboBox_Delete(QFontComboBox* self) { - delete self; +void QFontComboBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QFontComboBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_SizeHint(); +} + +void QFontComboBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__Event = slot; +} + +bool QFontComboBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_Event(e); +} + +void QFontComboBox_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__SetModel = slot; +} + +void QFontComboBox_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_SetModel(model); +} + +void QFontComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFontComboBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFontComboBox_override_virtual_ShowPopup(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ShowPopup = slot; +} + +void QFontComboBox_virtualbase_ShowPopup(void* self) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ShowPopup(); +} + +void QFontComboBox_override_virtual_HidePopup(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__HidePopup = slot; +} + +void QFontComboBox_virtualbase_HidePopup(void* self) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_HidePopup(); +} + +void QFontComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QFontComboBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QFontComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__FocusInEvent = slot; +} + +void QFontComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_FocusInEvent(e); +} + +void QFontComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QFontComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QFontComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ChangeEvent = slot; +} + +void QFontComboBox_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ChangeEvent(e); +} + +void QFontComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ResizeEvent = slot; +} + +void QFontComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ResizeEvent(e); +} + +void QFontComboBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__PaintEvent = slot; +} + +void QFontComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_PaintEvent(e); +} + +void QFontComboBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ShowEvent = slot; +} + +void QFontComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ShowEvent(e); +} + +void QFontComboBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__HideEvent = slot; +} + +void QFontComboBox_virtualbase_HideEvent(void* self, QHideEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_HideEvent(e); +} + +void QFontComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__MousePressEvent = slot; +} + +void QFontComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_MousePressEvent(e); +} + +void QFontComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QFontComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QFontComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QFontComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QFontComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QFontComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QFontComboBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__WheelEvent = slot; +} + +void QFontComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_WheelEvent(e); +} + +void QFontComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFontComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QFontComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QFontComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQFontComboBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QFontComboBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QFontComboBox*)(self) )->handle__InitStyleOption = slot; +} + +void QFontComboBox_virtualbase_InitStyleOption(const void* self, QStyleOptionComboBox* option) { + ( (const MiqtVirtualQFontComboBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QFontComboBox_Delete(QFontComboBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfontcombobox.go b/qt6/gen_qfontcombobox.go index 9e0da525..1a3a4f13 100644 --- a/qt6/gen_qfontcombobox.go +++ b/qt6/gen_qfontcombobox.go @@ -25,7 +25,8 @@ const ( ) type QFontComboBox struct { - h *C.QFontComboBox + h *C.QFontComboBox + isSubclass bool *QComboBox } @@ -43,27 +44,51 @@ func (this *QFontComboBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFontComboBox(h *C.QFontComboBox) *QFontComboBox { +// newQFontComboBox constructs the type using only CGO pointers. +func newQFontComboBox(h *C.QFontComboBox, h_QComboBox *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontComboBox { if h == nil { return nil } - return &QFontComboBox{h: h, QComboBox: UnsafeNewQComboBox(unsafe.Pointer(h))} + return &QFontComboBox{h: h, + QComboBox: newQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFontComboBox(h unsafe.Pointer) *QFontComboBox { - return newQFontComboBox((*C.QFontComboBox)(h)) +// UnsafeNewQFontComboBox constructs the type using only unsafe pointers. +func UnsafeNewQFontComboBox(h unsafe.Pointer, h_QComboBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontComboBox { + if h == nil { + return nil + } + + return &QFontComboBox{h: (*C.QFontComboBox)(h), + QComboBox: UnsafeNewQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFontComboBox constructs a new QFontComboBox object. func NewQFontComboBox(parent *QWidget) *QFontComboBox { - ret := C.QFontComboBox_new(parent.cPointer()) - return newQFontComboBox(ret) + var outptr_QFontComboBox *C.QFontComboBox = nil + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontComboBox_new(parent.cPointer(), &outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontComboBox2 constructs a new QFontComboBox object. func NewQFontComboBox2() *QFontComboBox { - ret := C.QFontComboBox_new2() - return newQFontComboBox(ret) + var outptr_QFontComboBox *C.QFontComboBox = nil + var outptr_QComboBox *C.QComboBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontComboBox_new2(&outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFontComboBox) MetaObject() *QMetaObject { @@ -207,9 +232,520 @@ func QFontComboBox_Tr3(s string, c string, n int) string { return _ret } +func (this *QFontComboBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFontComboBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontComboBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontComboBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_SizeHint +func miqt_exec_callback_QFontComboBox_SizeHint(self *C.QFontComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontComboBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFontComboBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFontComboBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFontComboBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_Event +func miqt_exec_callback_QFontComboBox_Event(self *C.QFontComboBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFontComboBox) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QFontComboBox_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QFontComboBox) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QFontComboBox_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_SetModel +func miqt_exec_callback_QFontComboBox_SetModel(self *C.QFontComboBox, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFontComboBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontComboBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontComboBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_MinimumSizeHint +func miqt_exec_callback_QFontComboBox_MinimumSizeHint(self *C.QFontComboBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontComboBox) callVirtualBase_ShowPopup() { + + C.QFontComboBox_virtualbase_ShowPopup(unsafe.Pointer(this.h)) + +} +func (this *QFontComboBox) OnShowPopup(slot func(super func())) { + C.QFontComboBox_override_virtual_ShowPopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ShowPopup +func miqt_exec_callback_QFontComboBox_ShowPopup(self *C.QFontComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ShowPopup) + +} + +func (this *QFontComboBox) callVirtualBase_HidePopup() { + + C.QFontComboBox_virtualbase_HidePopup(unsafe.Pointer(this.h)) + +} +func (this *QFontComboBox) OnHidePopup(slot func(super func())) { + C.QFontComboBox_override_virtual_HidePopup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_HidePopup +func miqt_exec_callback_QFontComboBox_HidePopup(self *C.QFontComboBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontComboBox{h: self}).callVirtualBase_HidePopup) + +} + +func (this *QFontComboBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QFontComboBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontComboBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QFontComboBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_InputMethodQuery +func miqt_exec_callback_QFontComboBox_InputMethodQuery(self *C.QFontComboBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QFontComboBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFontComboBox) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QFontComboBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QFontComboBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_FocusInEvent +func miqt_exec_callback_QFontComboBox_FocusInEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QFontComboBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QFontComboBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_FocusOutEvent +func miqt_exec_callback_QFontComboBox_FocusOutEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QFontComboBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QFontComboBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ChangeEvent +func miqt_exec_callback_QFontComboBox_ChangeEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QFontComboBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QFontComboBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ResizeEvent +func miqt_exec_callback_QFontComboBox_ResizeEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QFontComboBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QFontComboBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_PaintEvent +func miqt_exec_callback_QFontComboBox_PaintEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ShowEvent(e *QShowEvent) { + + C.QFontComboBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnShowEvent(slot func(super func(e *QShowEvent), e *QShowEvent)) { + C.QFontComboBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ShowEvent +func miqt_exec_callback_QFontComboBox_ShowEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QShowEvent), e *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_HideEvent(e *QHideEvent) { + + C.QFontComboBox_virtualbase_HideEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnHideEvent(slot func(super func(e *QHideEvent), e *QHideEvent)) { + C.QFontComboBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_HideEvent +func miqt_exec_callback_QFontComboBox_HideEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QHideEvent), e *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(e), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QFontComboBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QFontComboBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_MousePressEvent +func miqt_exec_callback_QFontComboBox_MousePressEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QFontComboBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QFontComboBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_MouseReleaseEvent +func miqt_exec_callback_QFontComboBox_MouseReleaseEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QFontComboBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QFontComboBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_KeyPressEvent +func miqt_exec_callback_QFontComboBox_KeyPressEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QFontComboBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QFontComboBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_KeyReleaseEvent +func miqt_exec_callback_QFontComboBox_KeyReleaseEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QFontComboBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QFontComboBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_WheelEvent +func miqt_exec_callback_QFontComboBox_WheelEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QFontComboBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFontComboBox) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QFontComboBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_ContextMenuEvent +func miqt_exec_callback_QFontComboBox_ContextMenuEvent(self *C.QFontComboBox, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QFontComboBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontComboBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QFontComboBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_InputMethodEvent +func miqt_exec_callback_QFontComboBox_InputMethodEvent(self *C.QFontComboBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QFontComboBox) callVirtualBase_InitStyleOption(option *QStyleOptionComboBox) { + + C.QFontComboBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QFontComboBox) OnInitStyleOption(slot func(super func(option *QStyleOptionComboBox), option *QStyleOptionComboBox)) { + C.QFontComboBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontComboBox_InitStyleOption +func miqt_exec_callback_QFontComboBox_InitStyleOption(self *C.QFontComboBox, cb C.intptr_t, option *C.QStyleOptionComboBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionComboBox), option *QStyleOptionComboBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionComboBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QFontComboBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QFontComboBox) Delete() { - C.QFontComboBox_Delete(this.h) + C.QFontComboBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfontcombobox.h b/qt6/gen_qfontcombobox.h index 43559a5b..511eee4c 100644 --- a/qt6/gen_qfontcombobox.h +++ b/qt6/gen_qfontcombobox.h @@ -15,21 +15,55 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; +class QComboBox; +class QContextMenuEvent; +class QEvent; +class QFocusEvent; class QFont; class QFontComboBox; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionComboBox; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QComboBox QComboBox; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QFontComboBox QFontComboBox; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionComboBox QStyleOptionComboBox; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QFontComboBox* QFontComboBox_new(QWidget* parent); -QFontComboBox* QFontComboBox_new2(); +void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self); void* QFontComboBox_Metacast(QFontComboBox* self, const char* param1); struct miqt_string QFontComboBox_Tr(const char* s); @@ -47,9 +81,54 @@ void QFontComboBox_SetDisplayFont(QFontComboBox* self, struct miqt_string fontFa void QFontComboBox_SetCurrentFont(QFontComboBox* self, QFont* f); void QFontComboBox_CurrentFontChanged(QFontComboBox* self, QFont* f); void QFontComboBox_connect_CurrentFontChanged(QFontComboBox* self, intptr_t slot); +bool QFontComboBox_Event(QFontComboBox* self, QEvent* e); struct miqt_string QFontComboBox_Tr2(const char* s, const char* c); struct miqt_string QFontComboBox_Tr3(const char* s, const char* c, int n); -void QFontComboBox_Delete(QFontComboBox* self); +void QFontComboBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFontComboBox_virtualbase_SizeHint(const void* self); +void QFontComboBox_override_virtual_Event(void* self, intptr_t slot); +bool QFontComboBox_virtualbase_Event(void* self, QEvent* e); +void QFontComboBox_override_virtual_SetModel(void* self, intptr_t slot); +void QFontComboBox_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QFontComboBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFontComboBox_virtualbase_MinimumSizeHint(const void* self); +void QFontComboBox_override_virtual_ShowPopup(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ShowPopup(void* self); +void QFontComboBox_override_virtual_HidePopup(void* self, intptr_t slot); +void QFontComboBox_virtualbase_HidePopup(void* self); +void QFontComboBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QFontComboBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QFontComboBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QFontComboBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QFontComboBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ChangeEvent(void* self, QEvent* e); +void QFontComboBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QFontComboBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QFontComboBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ShowEvent(void* self, QShowEvent* e); +void QFontComboBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_HideEvent(void* self, QHideEvent* e); +void QFontComboBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QFontComboBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QFontComboBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QFontComboBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QFontComboBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QFontComboBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QFontComboBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QFontComboBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QFontComboBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QFontComboBox_virtualbase_InitStyleOption(const void* self, QStyleOptionComboBox* option); +void QFontComboBox_Delete(QFontComboBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfontdatabase.cpp b/qt6/gen_qfontdatabase.cpp index 755b586e..74fb685e 100644 --- a/qt6/gen_qfontdatabase.cpp +++ b/qt6/gen_qfontdatabase.cpp @@ -10,8 +10,9 @@ #include "gen_qfontdatabase.h" #include "_cgo_export.h" -QFontDatabase* QFontDatabase_new() { - return new QFontDatabase(); +void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase) { + QFontDatabase* ret = new QFontDatabase(); + *outptr_QFontDatabase = ret; } struct miqt_array /* of int */ QFontDatabase_StandardSizes() { @@ -325,7 +326,11 @@ bool QFontDatabase_IsFixedPitch2(struct miqt_string family, struct miqt_string s return QFontDatabase::isFixedPitch(family_QString, style_QString); } -void QFontDatabase_Delete(QFontDatabase* self) { - delete self; +void QFontDatabase_Delete(QFontDatabase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfontdatabase.go b/qt6/gen_qfontdatabase.go index 2a58b8ba..e7720c33 100644 --- a/qt6/gen_qfontdatabase.go +++ b/qt6/gen_qfontdatabase.go @@ -64,7 +64,8 @@ const ( ) type QFontDatabase struct { - h *C.QFontDatabase + h *C.QFontDatabase + isSubclass bool } func (this *QFontDatabase) cPointer() *C.QFontDatabase { @@ -81,6 +82,7 @@ func (this *QFontDatabase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontDatabase constructs the type using only CGO pointers. func newQFontDatabase(h *C.QFontDatabase) *QFontDatabase { if h == nil { return nil @@ -88,14 +90,23 @@ func newQFontDatabase(h *C.QFontDatabase) *QFontDatabase { return &QFontDatabase{h: h} } +// UnsafeNewQFontDatabase constructs the type using only unsafe pointers. func UnsafeNewQFontDatabase(h unsafe.Pointer) *QFontDatabase { - return newQFontDatabase((*C.QFontDatabase)(h)) + if h == nil { + return nil + } + + return &QFontDatabase{h: (*C.QFontDatabase)(h)} } // NewQFontDatabase constructs a new QFontDatabase object. func NewQFontDatabase() *QFontDatabase { - ret := C.QFontDatabase_new() - return newQFontDatabase(ret) + var outptr_QFontDatabase *C.QFontDatabase = nil + + C.QFontDatabase_new(&outptr_QFontDatabase) + ret := newQFontDatabase(outptr_QFontDatabase) + ret.isSubclass = true + return ret } func QFontDatabase_StandardSizes() []int { @@ -445,7 +456,7 @@ func QFontDatabase_IsFixedPitch2(family string, style string) bool { // Delete this object from C++ memory. func (this *QFontDatabase) Delete() { - C.QFontDatabase_Delete(this.h) + C.QFontDatabase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfontdatabase.h b/qt6/gen_qfontdatabase.h index e220bed3..23167878 100644 --- a/qt6/gen_qfontdatabase.h +++ b/qt6/gen_qfontdatabase.h @@ -26,7 +26,7 @@ typedef struct QFontDatabase QFontDatabase; typedef struct QFontInfo QFontInfo; #endif -QFontDatabase* QFontDatabase_new(); +void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase); struct miqt_array /* of int */ QFontDatabase_StandardSizes(); struct miqt_array /* of int */ QFontDatabase_WritingSystems(); struct miqt_array /* of int */ QFontDatabase_WritingSystemsWithFamily(struct miqt_string family); @@ -60,7 +60,7 @@ bool QFontDatabase_IsBitmapScalable2(struct miqt_string family, struct miqt_stri bool QFontDatabase_IsSmoothlyScalable2(struct miqt_string family, struct miqt_string style); bool QFontDatabase_IsScalable2(struct miqt_string family, struct miqt_string style); bool QFontDatabase_IsFixedPitch2(struct miqt_string family, struct miqt_string style); -void QFontDatabase_Delete(QFontDatabase* self); +void QFontDatabase_Delete(QFontDatabase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfontdialog.cpp b/qt6/gen_qfontdialog.cpp index ee407856..42004b07 100644 --- a/qt6/gen_qfontdialog.cpp +++ b/qt6/gen_qfontdialog.cpp @@ -1,6 +1,16 @@ +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include +#include #include #include #include @@ -9,20 +19,403 @@ #include "gen_qfontdialog.h" #include "_cgo_export.h" -QFontDialog* QFontDialog_new(QWidget* parent) { - return new QFontDialog(parent); +class MiqtVirtualQFontDialog : public virtual QFontDialog { +public: + + MiqtVirtualQFontDialog(QWidget* parent): QFontDialog(parent) {}; + MiqtVirtualQFontDialog(): QFontDialog() {}; + MiqtVirtualQFontDialog(const QFont& initial): QFontDialog(initial) {}; + MiqtVirtualQFontDialog(const QFont& initial, QWidget* parent): QFontDialog(initial, parent) {}; + + virtual ~MiqtVirtualQFontDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFontDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFontDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFontDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QFontDialog::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFontDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QFontDialog::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QFontDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QFontDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QFontDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QFontDialog::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QFontDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QFontDialog::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFontDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFontDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFontDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFontDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFontDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QFontDialog::open(); + return; + } + + + miqt_exec_callback_QFontDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QFontDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QFontDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QFontDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QFontDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QFontDialog::accept(); + return; + } + + + miqt_exec_callback_QFontDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QFontDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QFontDialog::reject(); + return; + } + + + miqt_exec_callback_QFontDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QFontDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QFontDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QFontDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QFontDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QFontDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QFontDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QFontDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QFontDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QFontDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QFontDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QFontDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QFontDialog::contextMenuEvent(param1); + + } + +}; + +void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(parent); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontDialog* QFontDialog_new2() { - return new QFontDialog(); +void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontDialog* QFontDialog_new3(QFont* initial) { - return new QFontDialog(*initial); +void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent) { - return new QFontDialog(*initial, parent); +void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial, parent); + *outptr_QFontDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFontDialog_MetaObject(const QFontDialog* self) { @@ -90,7 +483,7 @@ void QFontDialog_CurrentFontChanged(QFontDialog* self, QFont* font) { } void QFontDialog_connect_CurrentFontChanged(QFontDialog* self, intptr_t slot) { - QFontDialog::connect(self, static_cast(&QFontDialog::currentFontChanged), self, [=](const QFont& font) { + MiqtVirtualQFontDialog::connect(self, static_cast(&QFontDialog::currentFontChanged), self, [=](const QFont& font) { const QFont& font_ret = font; // Cast returned reference into pointer QFont* sigval1 = const_cast(&font_ret); @@ -103,7 +496,7 @@ void QFontDialog_FontSelected(QFontDialog* self, QFont* font) { } void QFontDialog_connect_FontSelected(QFontDialog* self, intptr_t slot) { - QFontDialog::connect(self, static_cast(&QFontDialog::fontSelected), self, [=](const QFont& font) { + MiqtVirtualQFontDialog::connect(self, static_cast(&QFontDialog::fontSelected), self, [=](const QFont& font) { const QFont& font_ret = font; // Cast returned reference into pointer QFont* sigval1 = const_cast(&font_ret); @@ -155,7 +548,131 @@ QFont* QFontDialog_GetFont5(bool* ok, QFont* initial, QWidget* parent, struct mi return new QFont(QFontDialog::getFont(ok, *initial, parent, title_QString, static_cast(options))); } -void QFontDialog_Delete(QFontDialog* self) { - delete self; +void QFontDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__SetVisible = slot; +} + +void QFontDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QFontDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QFontDialog_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ChangeEvent(event); +} + +void QFontDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Done = slot; +} + +void QFontDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Done(result); +} + +void QFontDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__EventFilter = slot; +} + +bool QFontDialog_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_EventFilter(object, event); +} + +void QFontDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QFontDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFontDialog*)(self) )->virtualbase_SizeHint(); +} + +void QFontDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFontDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFontDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFontDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Open = slot; +} + +void QFontDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Open(); +} + +void QFontDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Exec = slot; +} + +int QFontDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Exec(); +} + +void QFontDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Accept = slot; +} + +void QFontDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Accept(); +} + +void QFontDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__Reject = slot; +} + +void QFontDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_Reject(); +} + +void QFontDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QFontDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QFontDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__CloseEvent = slot; +} + +void QFontDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QFontDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ShowEvent = slot; +} + +void QFontDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QFontDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QFontDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QFontDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFontDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFontDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQFontDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QFontDialog_Delete(QFontDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfontdialog.go b/qt6/gen_qfontdialog.go index eaa85cd8..321930a2 100644 --- a/qt6/gen_qfontdialog.go +++ b/qt6/gen_qfontdialog.go @@ -26,7 +26,8 @@ const ( ) type QFontDialog struct { - h *C.QFontDialog + h *C.QFontDialog + isSubclass bool *QDialog } @@ -44,39 +45,79 @@ func (this *QFontDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFontDialog(h *C.QFontDialog) *QFontDialog { +// newQFontDialog constructs the type using only CGO pointers. +func newQFontDialog(h *C.QFontDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontDialog { if h == nil { return nil } - return &QFontDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QFontDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFontDialog(h unsafe.Pointer) *QFontDialog { - return newQFontDialog((*C.QFontDialog)(h)) +// UnsafeNewQFontDialog constructs the type using only unsafe pointers. +func UnsafeNewQFontDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontDialog { + if h == nil { + return nil + } + + return &QFontDialog{h: (*C.QFontDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFontDialog constructs a new QFontDialog object. func NewQFontDialog(parent *QWidget) *QFontDialog { - ret := C.QFontDialog_new(parent.cPointer()) - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new(parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontDialog2 constructs a new QFontDialog object. func NewQFontDialog2() *QFontDialog { - ret := C.QFontDialog_new2() - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new2(&outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontDialog3 constructs a new QFontDialog object. func NewQFontDialog3(initial *QFont) *QFontDialog { - ret := C.QFontDialog_new3(initial.cPointer()) - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new3(initial.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFontDialog4 constructs a new QFontDialog object. func NewQFontDialog4(initial *QFont, parent *QWidget) *QFontDialog { - ret := C.QFontDialog_new4(initial.cPointer(), parent.cPointer()) - return newQFontDialog(ret) + var outptr_QFontDialog *C.QFontDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFontDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFontDialog) MetaObject() *QMetaObject { @@ -252,9 +293,351 @@ func QFontDialog_GetFont5(ok *bool, initial *QFont, parent *QWidget, title strin return _goptr } +func (this *QFontDialog) callVirtualBase_SetVisible(visible bool) { + + C.QFontDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFontDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFontDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_SetVisible +func miqt_exec_callback_QFontDialog_SetVisible(self *C.QFontDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFontDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QFontDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFontDialog) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFontDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ChangeEvent +func miqt_exec_callback_QFontDialog_ChangeEvent(self *C.QFontDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_Done(result int) { + + C.QFontDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QFontDialog) OnDone(slot func(super func(result int), result int)) { + C.QFontDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Done +func miqt_exec_callback_QFontDialog_Done(self *C.QFontDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QFontDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QFontDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QFontDialog) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QFontDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_EventFilter +func miqt_exec_callback_QFontDialog_EventFilter(self *C.QFontDialog, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QFontDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFontDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_SizeHint +func miqt_exec_callback_QFontDialog_SizeHint(self *C.QFontDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFontDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFontDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFontDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_MinimumSizeHint +func miqt_exec_callback_QFontDialog_MinimumSizeHint(self *C.QFontDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFontDialog) callVirtualBase_Open() { + + C.QFontDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QFontDialog) OnOpen(slot func(super func())) { + C.QFontDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Open +func miqt_exec_callback_QFontDialog_Open(self *C.QFontDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QFontDialog) callVirtualBase_Exec() int { + + return (int)(C.QFontDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QFontDialog) OnExec(slot func(super func() int) int) { + C.QFontDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Exec +func miqt_exec_callback_QFontDialog_Exec(self *C.QFontDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFontDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QFontDialog) callVirtualBase_Accept() { + + C.QFontDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QFontDialog) OnAccept(slot func(super func())) { + C.QFontDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Accept +func miqt_exec_callback_QFontDialog_Accept(self *C.QFontDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QFontDialog) callVirtualBase_Reject() { + + C.QFontDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QFontDialog) OnReject(slot func(super func())) { + C.QFontDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_Reject +func miqt_exec_callback_QFontDialog_Reject(self *C.QFontDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFontDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QFontDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QFontDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QFontDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_KeyPressEvent +func miqt_exec_callback_QFontDialog_KeyPressEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QFontDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QFontDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_CloseEvent +func miqt_exec_callback_QFontDialog_CloseEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QFontDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QFontDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ShowEvent +func miqt_exec_callback_QFontDialog_ShowEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QFontDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QFontDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ResizeEvent +func miqt_exec_callback_QFontDialog_ResizeEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFontDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QFontDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFontDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QFontDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFontDialog_ContextMenuEvent +func miqt_exec_callback_QFontDialog_ContextMenuEvent(self *C.QFontDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QFontDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QFontDialog) Delete() { - C.QFontDialog_Delete(this.h) + C.QFontDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfontdialog.h b/qt6/gen_qfontdialog.h index 072ce86f..30cfd766 100644 --- a/qt6/gen_qfontdialog.h +++ b/qt6/gen_qfontdialog.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; class QFont; class QFontDialog; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFontDialog QFontDialog; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QFontDialog* QFontDialog_new(QWidget* parent); -QFontDialog* QFontDialog_new2(); -QFontDialog* QFontDialog_new3(QFont* initial); -QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent); +void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFontDialog_MetaObject(const QFontDialog* self); void* QFontDialog_Metacast(QFontDialog* self, const char* param1); struct miqt_string QFontDialog_Tr(const char* s); @@ -47,6 +67,9 @@ void QFontDialog_CurrentFontChanged(QFontDialog* self, QFont* font); void QFontDialog_connect_CurrentFontChanged(QFontDialog* self, intptr_t slot); void QFontDialog_FontSelected(QFontDialog* self, QFont* font); void QFontDialog_connect_FontSelected(QFontDialog* self, intptr_t slot); +void QFontDialog_ChangeEvent(QFontDialog* self, QEvent* event); +void QFontDialog_Done(QFontDialog* self, int result); +bool QFontDialog_EventFilter(QFontDialog* self, QObject* object, QEvent* event); struct miqt_string QFontDialog_Tr2(const char* s, const char* c); struct miqt_string QFontDialog_Tr3(const char* s, const char* c, int n); void QFontDialog_SetOption2(QFontDialog* self, int option, bool on); @@ -54,7 +77,37 @@ QFont* QFontDialog_GetFont22(bool* ok, QWidget* parent); QFont* QFontDialog_GetFont3(bool* ok, QFont* initial, QWidget* parent); QFont* QFontDialog_GetFont4(bool* ok, QFont* initial, QWidget* parent, struct miqt_string title); QFont* QFontDialog_GetFont5(bool* ok, QFont* initial, QWidget* parent, struct miqt_string title, int options); -void QFontDialog_Delete(QFontDialog* self); +void QFontDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QFontDialog_virtualbase_SetVisible(void* self, bool visible); +void QFontDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ChangeEvent(void* self, QEvent* event); +void QFontDialog_override_virtual_Done(void* self, intptr_t slot); +void QFontDialog_virtualbase_Done(void* self, int result); +void QFontDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QFontDialog_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QFontDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFontDialog_virtualbase_SizeHint(const void* self); +void QFontDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFontDialog_virtualbase_MinimumSizeHint(const void* self); +void QFontDialog_override_virtual_Open(void* self, intptr_t slot); +void QFontDialog_virtualbase_Open(void* self); +void QFontDialog_override_virtual_Exec(void* self, intptr_t slot); +int QFontDialog_virtualbase_Exec(void* self); +void QFontDialog_override_virtual_Accept(void* self, intptr_t slot); +void QFontDialog_virtualbase_Accept(void* self); +void QFontDialog_override_virtual_Reject(void* self, intptr_t slot); +void QFontDialog_virtualbase_Reject(void* self); +void QFontDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QFontDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QFontDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QFontDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QFontDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFontDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QFontDialog_Delete(QFontDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfontinfo.cpp b/qt6/gen_qfontinfo.cpp index 22933dc7..e27367e3 100644 --- a/qt6/gen_qfontinfo.cpp +++ b/qt6/gen_qfontinfo.cpp @@ -7,12 +7,14 @@ #include "gen_qfontinfo.h" #include "_cgo_export.h" -QFontInfo* QFontInfo_new(QFont* param1) { - return new QFontInfo(*param1); +void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo) { + QFontInfo* ret = new QFontInfo(*param1); + *outptr_QFontInfo = ret; } -QFontInfo* QFontInfo_new2(QFontInfo* param1) { - return new QFontInfo(*param1); +void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo) { + QFontInfo* ret = new QFontInfo(*param1); + *outptr_QFontInfo = ret; } void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1) { @@ -104,7 +106,11 @@ bool QFontInfo_ExactMatch(const QFontInfo* self) { return self->exactMatch(); } -void QFontInfo_Delete(QFontInfo* self) { - delete self; +void QFontInfo_Delete(QFontInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfontinfo.go b/qt6/gen_qfontinfo.go index 9ae38bbf..240649f8 100644 --- a/qt6/gen_qfontinfo.go +++ b/qt6/gen_qfontinfo.go @@ -14,7 +14,8 @@ import ( ) type QFontInfo struct { - h *C.QFontInfo + h *C.QFontInfo + isSubclass bool } func (this *QFontInfo) cPointer() *C.QFontInfo { @@ -31,6 +32,7 @@ func (this *QFontInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontInfo constructs the type using only CGO pointers. func newQFontInfo(h *C.QFontInfo) *QFontInfo { if h == nil { return nil @@ -38,20 +40,33 @@ func newQFontInfo(h *C.QFontInfo) *QFontInfo { return &QFontInfo{h: h} } +// UnsafeNewQFontInfo constructs the type using only unsafe pointers. func UnsafeNewQFontInfo(h unsafe.Pointer) *QFontInfo { - return newQFontInfo((*C.QFontInfo)(h)) + if h == nil { + return nil + } + + return &QFontInfo{h: (*C.QFontInfo)(h)} } // NewQFontInfo constructs a new QFontInfo object. func NewQFontInfo(param1 *QFont) *QFontInfo { - ret := C.QFontInfo_new(param1.cPointer()) - return newQFontInfo(ret) + var outptr_QFontInfo *C.QFontInfo = nil + + C.QFontInfo_new(param1.cPointer(), &outptr_QFontInfo) + ret := newQFontInfo(outptr_QFontInfo) + ret.isSubclass = true + return ret } // NewQFontInfo2 constructs a new QFontInfo object. func NewQFontInfo2(param1 *QFontInfo) *QFontInfo { - ret := C.QFontInfo_new2(param1.cPointer()) - return newQFontInfo(ret) + var outptr_QFontInfo *C.QFontInfo = nil + + C.QFontInfo_new2(param1.cPointer(), &outptr_QFontInfo) + ret := newQFontInfo(outptr_QFontInfo) + ret.isSubclass = true + return ret } func (this *QFontInfo) OperatorAssign(param1 *QFontInfo) { @@ -134,7 +149,7 @@ func (this *QFontInfo) ExactMatch() bool { // Delete this object from C++ memory. func (this *QFontInfo) Delete() { - C.QFontInfo_Delete(this.h) + C.QFontInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfontinfo.h b/qt6/gen_qfontinfo.h index 0bf8e133..29b53760 100644 --- a/qt6/gen_qfontinfo.h +++ b/qt6/gen_qfontinfo.h @@ -22,8 +22,8 @@ typedef struct QFont QFont; typedef struct QFontInfo QFontInfo; #endif -QFontInfo* QFontInfo_new(QFont* param1); -QFontInfo* QFontInfo_new2(QFontInfo* param1); +void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo); +void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo); void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1); void QFontInfo_Swap(QFontInfo* self, QFontInfo* other); struct miqt_string QFontInfo_Family(const QFontInfo* self); @@ -42,7 +42,7 @@ bool QFontInfo_FixedPitch(const QFontInfo* self); int QFontInfo_StyleHint(const QFontInfo* self); int QFontInfo_LegacyWeight(const QFontInfo* self); bool QFontInfo_ExactMatch(const QFontInfo* self); -void QFontInfo_Delete(QFontInfo* self); +void QFontInfo_Delete(QFontInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfontmetrics.cpp b/qt6/gen_qfontmetrics.cpp index 03752f34..3bb550dc 100644 --- a/qt6/gen_qfontmetrics.cpp +++ b/qt6/gen_qfontmetrics.cpp @@ -15,16 +15,19 @@ #include "gen_qfontmetrics.h" #include "_cgo_export.h" -QFontMetrics* QFontMetrics_new(QFont* param1) { - return new QFontMetrics(*param1); +void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics) { + QFontMetrics* ret = new QFontMetrics(*param1); + *outptr_QFontMetrics = ret; } -QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd) { - return new QFontMetrics(*font, pd); +void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics) { + QFontMetrics* ret = new QFontMetrics(*font, pd); + *outptr_QFontMetrics = ret; } -QFontMetrics* QFontMetrics_new3(QFontMetrics* param1) { - return new QFontMetrics(*param1); +void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics) { + QFontMetrics* ret = new QFontMetrics(*param1); + *outptr_QFontMetrics = ret; } void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1) { @@ -236,24 +239,32 @@ struct miqt_string QFontMetrics_ElidedText4(const QFontMetrics* self, struct miq return _ms; } -void QFontMetrics_Delete(QFontMetrics* self) { - delete self; +void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QFontMetricsF* QFontMetricsF_new(QFont* font) { - return new QFontMetricsF(*font); +void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*font); + *outptr_QFontMetricsF = ret; } -QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd) { - return new QFontMetricsF(*font, pd); +void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*font, pd); + *outptr_QFontMetricsF = ret; } -QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1) { - return new QFontMetricsF(*param1); +void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*param1); + *outptr_QFontMetricsF = ret; } -QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1) { - return new QFontMetricsF(*param1); +void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF) { + QFontMetricsF* ret = new QFontMetricsF(*param1); + *outptr_QFontMetricsF = ret; } void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1) { @@ -475,7 +486,11 @@ struct miqt_string QFontMetricsF_ElidedText4(const QFontMetricsF* self, struct m return _ms; } -void QFontMetricsF_Delete(QFontMetricsF* self) { - delete self; +void QFontMetricsF_Delete(QFontMetricsF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfontmetrics.go b/qt6/gen_qfontmetrics.go index 82ce0dd2..eb24a790 100644 --- a/qt6/gen_qfontmetrics.go +++ b/qt6/gen_qfontmetrics.go @@ -14,7 +14,8 @@ import ( ) type QFontMetrics struct { - h *C.QFontMetrics + h *C.QFontMetrics + isSubclass bool } func (this *QFontMetrics) cPointer() *C.QFontMetrics { @@ -31,6 +32,7 @@ func (this *QFontMetrics) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontMetrics constructs the type using only CGO pointers. func newQFontMetrics(h *C.QFontMetrics) *QFontMetrics { if h == nil { return nil @@ -38,26 +40,43 @@ func newQFontMetrics(h *C.QFontMetrics) *QFontMetrics { return &QFontMetrics{h: h} } +// UnsafeNewQFontMetrics constructs the type using only unsafe pointers. func UnsafeNewQFontMetrics(h unsafe.Pointer) *QFontMetrics { - return newQFontMetrics((*C.QFontMetrics)(h)) + if h == nil { + return nil + } + + return &QFontMetrics{h: (*C.QFontMetrics)(h)} } // NewQFontMetrics constructs a new QFontMetrics object. func NewQFontMetrics(param1 *QFont) *QFontMetrics { - ret := C.QFontMetrics_new(param1.cPointer()) - return newQFontMetrics(ret) + var outptr_QFontMetrics *C.QFontMetrics = nil + + C.QFontMetrics_new(param1.cPointer(), &outptr_QFontMetrics) + ret := newQFontMetrics(outptr_QFontMetrics) + ret.isSubclass = true + return ret } // NewQFontMetrics2 constructs a new QFontMetrics object. func NewQFontMetrics2(font *QFont, pd *QPaintDevice) *QFontMetrics { - ret := C.QFontMetrics_new2(font.cPointer(), pd.cPointer()) - return newQFontMetrics(ret) + var outptr_QFontMetrics *C.QFontMetrics = nil + + C.QFontMetrics_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetrics) + ret := newQFontMetrics(outptr_QFontMetrics) + ret.isSubclass = true + return ret } // NewQFontMetrics3 constructs a new QFontMetrics object. func NewQFontMetrics3(param1 *QFontMetrics) *QFontMetrics { - ret := C.QFontMetrics_new3(param1.cPointer()) - return newQFontMetrics(ret) + var outptr_QFontMetrics *C.QFontMetrics = nil + + C.QFontMetrics_new3(param1.cPointer(), &outptr_QFontMetrics) + ret := newQFontMetrics(outptr_QFontMetrics) + ret.isSubclass = true + return ret } func (this *QFontMetrics) OperatorAssign(param1 *QFontMetrics) { @@ -358,7 +377,7 @@ func (this *QFontMetrics) ElidedText4(text string, mode TextElideMode, width int // Delete this object from C++ memory. func (this *QFontMetrics) Delete() { - C.QFontMetrics_Delete(this.h) + C.QFontMetrics_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -371,7 +390,8 @@ func (this *QFontMetrics) GoGC() { } type QFontMetricsF struct { - h *C.QFontMetricsF + h *C.QFontMetricsF + isSubclass bool } func (this *QFontMetricsF) cPointer() *C.QFontMetricsF { @@ -388,6 +408,7 @@ func (this *QFontMetricsF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFontMetricsF constructs the type using only CGO pointers. func newQFontMetricsF(h *C.QFontMetricsF) *QFontMetricsF { if h == nil { return nil @@ -395,32 +416,53 @@ func newQFontMetricsF(h *C.QFontMetricsF) *QFontMetricsF { return &QFontMetricsF{h: h} } +// UnsafeNewQFontMetricsF constructs the type using only unsafe pointers. func UnsafeNewQFontMetricsF(h unsafe.Pointer) *QFontMetricsF { - return newQFontMetricsF((*C.QFontMetricsF)(h)) + if h == nil { + return nil + } + + return &QFontMetricsF{h: (*C.QFontMetricsF)(h)} } // NewQFontMetricsF constructs a new QFontMetricsF object. func NewQFontMetricsF(font *QFont) *QFontMetricsF { - ret := C.QFontMetricsF_new(font.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new(font.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } // NewQFontMetricsF2 constructs a new QFontMetricsF object. func NewQFontMetricsF2(font *QFont, pd *QPaintDevice) *QFontMetricsF { - ret := C.QFontMetricsF_new2(font.cPointer(), pd.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } // NewQFontMetricsF3 constructs a new QFontMetricsF object. func NewQFontMetricsF3(param1 *QFontMetrics) *QFontMetricsF { - ret := C.QFontMetricsF_new3(param1.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new3(param1.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } // NewQFontMetricsF4 constructs a new QFontMetricsF object. func NewQFontMetricsF4(param1 *QFontMetricsF) *QFontMetricsF { - ret := C.QFontMetricsF_new4(param1.cPointer()) - return newQFontMetricsF(ret) + var outptr_QFontMetricsF *C.QFontMetricsF = nil + + C.QFontMetricsF_new4(param1.cPointer(), &outptr_QFontMetricsF) + ret := newQFontMetricsF(outptr_QFontMetricsF) + ret.isSubclass = true + return ret } func (this *QFontMetricsF) OperatorAssign(param1 *QFontMetricsF) { @@ -692,7 +734,7 @@ func (this *QFontMetricsF) ElidedText4(text string, mode TextElideMode, width fl // Delete this object from C++ memory. func (this *QFontMetricsF) Delete() { - C.QFontMetricsF_Delete(this.h) + C.QFontMetricsF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfontmetrics.h b/qt6/gen_qfontmetrics.h index edca46a8..8afd1768 100644 --- a/qt6/gen_qfontmetrics.h +++ b/qt6/gen_qfontmetrics.h @@ -38,9 +38,9 @@ typedef struct QSizeF QSizeF; typedef struct QTextOption QTextOption; #endif -QFontMetrics* QFontMetrics_new(QFont* param1); -QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd); -QFontMetrics* QFontMetrics_new3(QFontMetrics* param1); +void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics); +void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics); +void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics); void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1); void QFontMetrics_Swap(QFontMetrics* self, QFontMetrics* other); int QFontMetrics_Ascent(const QFontMetrics* self); @@ -85,12 +85,12 @@ QRect* QFontMetrics_BoundingRect8(const QFontMetrics* self, int x, int y, int w, QSize* QFontMetrics_Size3(const QFontMetrics* self, int flags, struct miqt_string str, int tabstops); QSize* QFontMetrics_Size4(const QFontMetrics* self, int flags, struct miqt_string str, int tabstops, int* tabarray); struct miqt_string QFontMetrics_ElidedText4(const QFontMetrics* self, struct miqt_string text, int mode, int width, int flags); -void QFontMetrics_Delete(QFontMetrics* self); +void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass); -QFontMetricsF* QFontMetricsF_new(QFont* font); -QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd); -QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1); -QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1); +void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF); +void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF); +void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF); +void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF); void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1); void QFontMetricsF_OperatorAssignWithQFontMetrics(QFontMetricsF* self, QFontMetrics* param1); void QFontMetricsF_Swap(QFontMetricsF* self, QFontMetricsF* other); @@ -133,7 +133,7 @@ QRectF* QFontMetricsF_BoundingRect5(const QFontMetricsF* self, QRectF* r, int fl QSizeF* QFontMetricsF_Size3(const QFontMetricsF* self, int flags, struct miqt_string str, int tabstops); QSizeF* QFontMetricsF_Size4(const QFontMetricsF* self, int flags, struct miqt_string str, int tabstops, int* tabarray); struct miqt_string QFontMetricsF_ElidedText4(const QFontMetricsF* self, struct miqt_string text, int mode, double width, int flags); -void QFontMetricsF_Delete(QFontMetricsF* self); +void QFontMetricsF_Delete(QFontMetricsF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qformlayout.cpp b/qt6/gen_qformlayout.cpp index c94f0891..1188a8db 100644 --- a/qt6/gen_qformlayout.cpp +++ b/qt6/gen_qformlayout.cpp @@ -1,8 +1,10 @@ +#include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QFormLayout__TakeRowResult #include #include #include +#include #include #include #include @@ -13,12 +15,513 @@ #include "gen_qformlayout.h" #include "_cgo_export.h" -QFormLayout* QFormLayout_new(QWidget* parent) { - return new QFormLayout(parent); +class MiqtVirtualQFormLayout : public virtual QFormLayout { +public: + + MiqtVirtualQFormLayout(QWidget* parent): QFormLayout(parent) {}; + MiqtVirtualQFormLayout(): QFormLayout() {}; + + virtual ~MiqtVirtualQFormLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Spacing = 0; + + // Subclass to allow providing a Go implementation + virtual int spacing() const override { + if (handle__Spacing == 0) { + return QFormLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QFormLayout::spacing(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual void setSpacing(int spacing) override { + if (handle__SetSpacing == 0) { + QFormLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QFormLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QFormLayout::setSpacing(static_cast(spacing)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* item) override { + if (handle__AddItem == 0) { + QFormLayout::addItem(item); + return; + } + + QLayoutItem* sigval1 = item; + + miqt_exec_callback_QFormLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* item) { + + QFormLayout::addItem(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAtWithIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int index) const override { + if (handle__ItemAtWithIndex == 0) { + return QFormLayout::itemAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QFormLayout_ItemAtWithIndex(const_cast(this), handle__ItemAtWithIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAtWithIndex(int index) const { + + return QFormLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int index) override { + if (handle__TakeAt == 0) { + return QFormLayout::takeAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QFormLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int index) { + + return QFormLayout::takeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& rect) override { + if (handle__SetGeometry == 0) { + QFormLayout::setGeometry(rect); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QFormLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* rect) { + + QFormLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QFormLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFormLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QFormLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFormLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFormLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFormLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QFormLayout::invalidate(); + return; + } + + + miqt_exec_callback_QFormLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QFormLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QFormLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QFormLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QFormLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QFormLayout::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QFormLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QFormLayout::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QFormLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QFormLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QFormLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QFormLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QFormLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QFormLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QFormLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QFormLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFormLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QFormLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(const QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QFormLayout::indexOf(param1); + } + + QWidget* sigval1 = (QWidget*) param1; + + int callback_return_value = miqt_exec_callback_QFormLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QFormLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QFormLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QFormLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QFormLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QFormLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QFormLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QFormLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReplaceWidget = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* replaceWidget(QWidget* from, QWidget* to, Qt::FindChildOptions options) override { + if (handle__ReplaceWidget == 0) { + return QFormLayout::replaceWidget(from, to, options); + } + + QWidget* sigval1 = from; + QWidget* sigval2 = to; + Qt::FindChildOptions options_ret = options; + int sigval3 = static_cast(options_ret); + + QLayoutItem* callback_return_value = miqt_exec_callback_QFormLayout_ReplaceWidget(this, handle__ReplaceWidget, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ReplaceWidget(QWidget* from, QWidget* to, int options) { + + return QFormLayout::replaceWidget(from, to, static_cast(options)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QFormLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QFormLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QFormLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QFormLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QFormLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QFormLayout::childEvent(e); + + } + +}; + +void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(parent); + *outptr_QFormLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QFormLayout* QFormLayout_new2() { - return new QFormLayout(); +void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(); + *outptr_QFormLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QFormLayout_MetaObject(const QFormLayout* self) { @@ -295,11 +798,187 @@ struct miqt_string QFormLayout_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFormLayout_Delete(QFormLayout* self) { - delete self; +void QFormLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Spacing = slot; +} + +int QFormLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_Spacing(); +} + +void QFormLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__SetSpacing = slot; +} + +void QFormLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_SetSpacing(spacing); +} + +void QFormLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__AddItem = slot; +} + +void QFormLayout_virtualbase_AddItem(void* self, QLayoutItem* item) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_AddItem(item); +} + +void QFormLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ItemAtWithIndex = slot; +} + +QLayoutItem* QFormLayout_virtualbase_ItemAtWithIndex(const void* self, int index) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_ItemAtWithIndex(index); +} + +void QFormLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QFormLayout_virtualbase_TakeAt(void* self, int index) { + return ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_TakeAt(index); +} + +void QFormLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__SetGeometry = slot; +} + +void QFormLayout_virtualbase_SetGeometry(void* self, QRect* rect) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QFormLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QFormLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QFormLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QFormLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_SizeHint(); +} + +void QFormLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Invalidate = slot; +} + +void QFormLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_Invalidate(); +} + +void QFormLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QFormLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QFormLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QFormLayout_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_HeightForWidth(width); +} + +void QFormLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QFormLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QFormLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Count = slot; +} + +int QFormLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_Count(); +} + +void QFormLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QFormLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_Geometry(); +} + +void QFormLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QFormLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QFormLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__IndexOf = slot; +} + +int QFormLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QFormLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QFormLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QFormLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ControlTypes = slot; +} + +int QFormLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQFormLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QFormLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ReplaceWidget = slot; +} + +QLayoutItem* QFormLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options) { + return ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_ReplaceWidget(from, to, options); +} + +void QFormLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QFormLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_Layout(); +} + +void QFormLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QFormLayout*)(self) )->handle__ChildEvent = slot; +} + +void QFormLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQFormLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QFormLayout_Delete(QFormLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self) { - delete self; +void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qformlayout.go b/qt6/gen_qformlayout.go index 8518d84b..305c6bd5 100644 --- a/qt6/gen_qformlayout.go +++ b/qt6/gen_qformlayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -38,7 +39,8 @@ const ( ) type QFormLayout struct { - h *C.QFormLayout + h *C.QFormLayout + isSubclass bool *QLayout } @@ -56,27 +58,49 @@ func (this *QFormLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFormLayout(h *C.QFormLayout) *QFormLayout { +// newQFormLayout constructs the type using only CGO pointers. +func newQFormLayout(h *C.QFormLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QFormLayout { if h == nil { return nil } - return &QFormLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QFormLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQFormLayout(h unsafe.Pointer) *QFormLayout { - return newQFormLayout((*C.QFormLayout)(h)) +// UnsafeNewQFormLayout constructs the type using only unsafe pointers. +func UnsafeNewQFormLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QFormLayout { + if h == nil { + return nil + } + + return &QFormLayout{h: (*C.QFormLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQFormLayout constructs a new QFormLayout object. func NewQFormLayout(parent *QWidget) *QFormLayout { - ret := C.QFormLayout_new(parent.cPointer()) - return newQFormLayout(ret) + var outptr_QFormLayout *C.QFormLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QFormLayout_new(parent.cPointer(), &outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQFormLayout2 constructs a new QFormLayout object. func NewQFormLayout2() *QFormLayout { - ret := C.QFormLayout_new2() - return newQFormLayout(ret) + var outptr_QFormLayout *C.QFormLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QFormLayout_new2(&outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QFormLayout) MetaObject() *QMetaObject { @@ -292,11 +316,11 @@ func (this *QFormLayout) ItemAt(row int, role QFormLayout__ItemRole) *QLayoutIte } func (this *QFormLayout) LabelForField(field *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForField(this.h, field.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForField(this.h, field.cPointer())), nil, nil) } func (this *QFormLayout) LabelForFieldWithField(field *QLayout) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer())), nil, nil) } func (this *QFormLayout) AddItem(item *QLayoutItem) { @@ -375,9 +399,498 @@ func QFormLayout_Tr3(s string, c string, n int) string { return _ret } +func (this *QFormLayout) callVirtualBase_Spacing() int { + + return (int)(C.QFormLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnSpacing(slot func(super func() int) int) { + C.QFormLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Spacing +func miqt_exec_callback_QFormLayout_Spacing(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QFormLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QFormLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QFormLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_SetSpacing +func miqt_exec_callback_QFormLayout_SetSpacing(self *C.QFormLayout, cb C.intptr_t, spacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(spacing int), spacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(spacing) + + gofunc((&QFormLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + +} + +func (this *QFormLayout) callVirtualBase_AddItem(item *QLayoutItem) { + + C.QFormLayout_virtualbase_AddItem(unsafe.Pointer(this.h), item.cPointer()) + +} +func (this *QFormLayout) OnAddItem(slot func(super func(item *QLayoutItem), item *QLayoutItem)) { + C.QFormLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_AddItem +func miqt_exec_callback_QFormLayout_AddItem(self *C.QFormLayout, cb C.intptr_t, item *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QLayoutItem), item *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(item)) + + gofunc((&QFormLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QFormLayout) callVirtualBase_ItemAtWithIndex(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QFormLayout_virtualbase_ItemAtWithIndex(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QFormLayout) OnItemAtWithIndex(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QFormLayout_override_virtual_ItemAtWithIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ItemAtWithIndex +func miqt_exec_callback_QFormLayout_ItemAtWithIndex(self *C.QFormLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ItemAtWithIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_TakeAt(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QFormLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QFormLayout) OnTakeAt(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QFormLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_TakeAt +func miqt_exec_callback_QFormLayout_TakeAt(self *C.QFormLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_SetGeometry(rect *QRect) { + + C.QFormLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QFormLayout) OnSetGeometry(slot func(super func(rect *QRect), rect *QRect)) { + C.QFormLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_SetGeometry +func miqt_exec_callback_QFormLayout_SetGeometry(self *C.QFormLayout, cb C.intptr_t, rect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect), rect *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + + gofunc((&QFormLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QFormLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QFormLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QFormLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_MinimumSize +func miqt_exec_callback_QFormLayout_MinimumSize(self *C.QFormLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFormLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFormLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_SizeHint +func miqt_exec_callback_QFormLayout_SizeHint(self *C.QFormLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_Invalidate() { + + C.QFormLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QFormLayout) OnInvalidate(slot func(super func())) { + C.QFormLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Invalidate +func miqt_exec_callback_QFormLayout_Invalidate(self *C.QFormLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QFormLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QFormLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QFormLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QFormLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_HasHeightForWidth +func miqt_exec_callback_QFormLayout_HasHeightForWidth(self *C.QFormLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QFormLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QFormLayout) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QFormLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_HeightForWidth +func miqt_exec_callback_QFormLayout_HeightForWidth(self *C.QFormLayout, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QFormLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QFormLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ExpandingDirections +func miqt_exec_callback_QFormLayout_ExpandingDirections(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_Count() int { + + return (int)(C.QFormLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnCount(slot func(super func() int) int) { + C.QFormLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Count +func miqt_exec_callback_QFormLayout_Count(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QFormLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QFormLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Geometry +func miqt_exec_callback_QFormLayout_Geometry(self *C.QFormLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QFormLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFormLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QFormLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_MaximumSize +func miqt_exec_callback_QFormLayout_MaximumSize(self *C.QFormLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QFormLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QFormLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QFormLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_IndexOf +func miqt_exec_callback_QFormLayout_IndexOf(self *C.QFormLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QFormLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QFormLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_IsEmpty +func miqt_exec_callback_QFormLayout_IsEmpty(self *C.QFormLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QFormLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QFormLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QFormLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ControlTypes +func miqt_exec_callback_QFormLayout_ControlTypes(self *C.QFormLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QFormLayout) callVirtualBase_ReplaceWidget(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QFormLayout_virtualbase_ReplaceWidget(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.int)(options)))) +} +func (this *QFormLayout) OnReplaceWidget(slot func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) { + C.QFormLayout_override_virtual_ReplaceWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ReplaceWidget +func miqt_exec_callback_QFormLayout_ReplaceWidget(self *C.QFormLayout, cb C.intptr_t, from *C.QWidget, to *C.QWidget, options C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(from), nil, nil) + slotval2 := UnsafeNewQWidget(unsafe.Pointer(to), nil, nil) + slotval3 := (FindChildOption)(options) + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_ReplaceWidget, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QFormLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QFormLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QFormLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_Layout +func miqt_exec_callback_QFormLayout_Layout(self *C.QFormLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QFormLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QFormLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QFormLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QFormLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFormLayout_ChildEvent +func miqt_exec_callback_QFormLayout_ChildEvent(self *C.QFormLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QFormLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QFormLayout) Delete() { - C.QFormLayout_Delete(this.h) + C.QFormLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -390,7 +903,8 @@ func (this *QFormLayout) GoGC() { } type QFormLayout__TakeRowResult struct { - h *C.QFormLayout__TakeRowResult + h *C.QFormLayout__TakeRowResult + isSubclass bool } func (this *QFormLayout__TakeRowResult) cPointer() *C.QFormLayout__TakeRowResult { @@ -407,6 +921,7 @@ func (this *QFormLayout__TakeRowResult) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFormLayout__TakeRowResult constructs the type using only CGO pointers. func newQFormLayout__TakeRowResult(h *C.QFormLayout__TakeRowResult) *QFormLayout__TakeRowResult { if h == nil { return nil @@ -414,13 +929,18 @@ func newQFormLayout__TakeRowResult(h *C.QFormLayout__TakeRowResult) *QFormLayout return &QFormLayout__TakeRowResult{h: h} } +// UnsafeNewQFormLayout__TakeRowResult constructs the type using only unsafe pointers. func UnsafeNewQFormLayout__TakeRowResult(h unsafe.Pointer) *QFormLayout__TakeRowResult { - return newQFormLayout__TakeRowResult((*C.QFormLayout__TakeRowResult)(h)) + if h == nil { + return nil + } + + return &QFormLayout__TakeRowResult{h: (*C.QFormLayout__TakeRowResult)(h)} } // Delete this object from C++ memory. func (this *QFormLayout__TakeRowResult) Delete() { - C.QFormLayout__TakeRowResult_Delete(this.h) + C.QFormLayout__TakeRowResult_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qformlayout.h b/qt6/gen_qformlayout.h index 44da01cd..61315492 100644 --- a/qt6/gen_qformlayout.h +++ b/qt6/gen_qformlayout.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QFormLayout; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QFormLayout__TakeRowResult) typedef QFormLayout::TakeRowResult QFormLayout__TakeRowResult; @@ -24,22 +25,25 @@ class QFormLayout__TakeRowResult; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QFormLayout QFormLayout; typedef struct QFormLayout__TakeRowResult QFormLayout__TakeRowResult; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QFormLayout* QFormLayout_new(QWidget* parent); -QFormLayout* QFormLayout_new2(); +void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QFormLayout_MetaObject(const QFormLayout* self); void* QFormLayout_Metacast(QFormLayout* self, const char* param1); struct miqt_string QFormLayout_Tr(const char* s); @@ -101,9 +105,51 @@ int QFormLayout_Count(const QFormLayout* self); int QFormLayout_RowCount(const QFormLayout* self); struct miqt_string QFormLayout_Tr2(const char* s, const char* c); struct miqt_string QFormLayout_Tr3(const char* s, const char* c, int n); -void QFormLayout_Delete(QFormLayout* self); +void QFormLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QFormLayout_virtualbase_Spacing(const void* self); +void QFormLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QFormLayout_virtualbase_SetSpacing(void* self, int spacing); +void QFormLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QFormLayout_virtualbase_AddItem(void* self, QLayoutItem* item); +void QFormLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot); +QLayoutItem* QFormLayout_virtualbase_ItemAtWithIndex(const void* self, int index); +void QFormLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QFormLayout_virtualbase_TakeAt(void* self, int index); +void QFormLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QFormLayout_virtualbase_SetGeometry(void* self, QRect* rect); +void QFormLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QFormLayout_virtualbase_MinimumSize(const void* self); +void QFormLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFormLayout_virtualbase_SizeHint(const void* self); +void QFormLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QFormLayout_virtualbase_Invalidate(void* self); +void QFormLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QFormLayout_virtualbase_HasHeightForWidth(const void* self); +void QFormLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QFormLayout_virtualbase_HeightForWidth(const void* self, int width); +void QFormLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QFormLayout_virtualbase_ExpandingDirections(const void* self); +void QFormLayout_override_virtual_Count(void* self, intptr_t slot); +int QFormLayout_virtualbase_Count(const void* self); +void QFormLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QFormLayout_virtualbase_Geometry(const void* self); +void QFormLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QFormLayout_virtualbase_MaximumSize(const void* self); +void QFormLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QFormLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QFormLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QFormLayout_virtualbase_IsEmpty(const void* self); +void QFormLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QFormLayout_virtualbase_ControlTypes(const void* self); +void QFormLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot); +QLayoutItem* QFormLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options); +void QFormLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QFormLayout_virtualbase_Layout(void* self); +void QFormLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QFormLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QFormLayout_Delete(QFormLayout* self, bool isSubclass); -void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self); +void QFormLayout__TakeRowResult_Delete(QFormLayout__TakeRowResult* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qframe.cpp b/qt6/gen_qframe.cpp index 77fc11d7..fe5dfe3e 100644 --- a/qt6/gen_qframe.cpp +++ b/qt6/gen_qframe.cpp @@ -1,25 +1,1076 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qframe.h" #include "_cgo_export.h" -QFrame* QFrame_new(QWidget* parent) { - return new QFrame(parent); +class MiqtVirtualQFrame : public virtual QFrame { +public: + + MiqtVirtualQFrame(QWidget* parent): QFrame(parent) {}; + MiqtVirtualQFrame(): QFrame() {}; + MiqtVirtualQFrame(QWidget* parent, Qt::WindowFlags f): QFrame(parent, f) {}; + + virtual ~MiqtVirtualQFrame() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QFrame::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFrame_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QFrame::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QFrame::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QFrame_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QFrame::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QFrame::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QFrame_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QFrame::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QFrame::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QFrame_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QFrame::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QFrame::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QFrame_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QFrame::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QFrame::devType(); + } + + + int callback_return_value = miqt_exec_callback_QFrame_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QFrame::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QFrame::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QFrame_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QFrame::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QFrame::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QFrame_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QFrame::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QFrame::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QFrame_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QFrame::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QFrame::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QFrame_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QFrame::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QFrame::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QFrame_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QFrame::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QFrame::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QFrame::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QFrame::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QFrame::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QFrame::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QFrame::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QFrame::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QFrame::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QFrame::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QFrame_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QFrame::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QFrame::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFrame_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QFrame::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QFrame::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QFrame_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QFrame::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QFrame::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFrame_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QFrame::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QFrame::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QFrame_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QFrame::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QFrame::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QFrame_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QFrame::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QFrame::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QFrame_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QFrame::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QFrame::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QFrame_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QFrame::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QFrame::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QFrame::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QFrame::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QFrame_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QFrame::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QFrame::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QFrame::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QFrame::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QFrame_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QFrame::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QFrame::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QFrame::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QFrame::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QFrame::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QFrame::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QFrame::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QFrame::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QFrame::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QFrame::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QFrame_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QFrame::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QFrame::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QFrame_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QFrame::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QFrame::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QFrame_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QFrame::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QFrame::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QFrame_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QFrame::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QFrame::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QFrame_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QFrame::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QFrame::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QFrame_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QFrame::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QFrame::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QFrame_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QFrame::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QFrame::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QFrame_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QFrame::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QFrame::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QFrame_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QFrame::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QFrame::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QFrame_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QFrame::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QFrame::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QFrame_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QFrame::focusNextPrevChild(next); + + } + +}; + +void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent); + *outptr_QFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFrame* QFrame_new2() { - return new QFrame(); +void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(); + *outptr_QFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QFrame* QFrame_new3(QWidget* parent, int f) { - return new QFrame(parent, static_cast(f)); +void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent, static_cast(f)); + *outptr_QFrame = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QFrame_MetaObject(const QFrame* self) { @@ -121,7 +1172,347 @@ struct miqt_string QFrame_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFrame_Delete(QFrame* self) { - delete self; +void QFrame_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__SizeHint = slot; +} + +QSize* QFrame_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_SizeHint(); +} + +void QFrame_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__Event = slot; +} + +bool QFrame_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQFrame*)(self) )->virtualbase_Event(e); +} + +void QFrame_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__PaintEvent = slot; +} + +void QFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_PaintEvent(param1); +} + +void QFrame_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ChangeEvent = slot; +} + +void QFrame_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QFrame_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InitStyleOption = slot; +} + +void QFrame_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQFrame*)(self) )->virtualbase_InitStyleOption(option); +} + +void QFrame_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DevType = slot; +} + +int QFrame_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_DevType(); +} + +void QFrame_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__SetVisible = slot; +} + +void QFrame_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_SetVisible(visible); +} + +void QFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QFrame_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QFrame_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__HeightForWidth = slot; +} + +int QFrame_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QFrame_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QFrame_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QFrame_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_PaintEngine(); +} + +void QFrame_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MousePressEvent = slot; +} + +void QFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MousePressEvent(event); +} + +void QFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MouseMoveEvent = slot; +} + +void QFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QFrame_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__WheelEvent = slot; +} + +void QFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_WheelEvent(event); +} + +void QFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__KeyPressEvent = slot; +} + +void QFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QFrame_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__FocusInEvent = slot; +} + +void QFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_FocusInEvent(event); +} + +void QFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__FocusOutEvent = slot; +} + +void QFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QFrame_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__EnterEvent = slot; +} + +void QFrame_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_EnterEvent(event); +} + +void QFrame_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__LeaveEvent = slot; +} + +void QFrame_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_LeaveEvent(event); +} + +void QFrame_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__MoveEvent = slot; +} + +void QFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_MoveEvent(event); +} + +void QFrame_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ResizeEvent = slot; +} + +void QFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ResizeEvent(event); +} + +void QFrame_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__CloseEvent = slot; +} + +void QFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_CloseEvent(event); +} + +void QFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ContextMenuEvent = slot; +} + +void QFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QFrame_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__TabletEvent = slot; +} + +void QFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_TabletEvent(event); +} + +void QFrame_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ActionEvent = slot; +} + +void QFrame_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ActionEvent(event); +} + +void QFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DragEnterEvent = slot; +} + +void QFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DragMoveEvent = slot; +} + +void QFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DragLeaveEvent = slot; +} + +void QFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QFrame_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__DropEvent = slot; +} + +void QFrame_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_DropEvent(event); +} + +void QFrame_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__ShowEvent = slot; +} + +void QFrame_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_ShowEvent(event); +} + +void QFrame_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__HideEvent = slot; +} + +void QFrame_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_HideEvent(event); +} + +void QFrame_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__NativeEvent = slot; +} + +bool QFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQFrame*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QFrame_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__Metric = slot; +} + +int QFrame_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_Metric(param1); +} + +void QFrame_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InitPainter = slot; +} + +void QFrame_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQFrame*)(self) )->virtualbase_InitPainter(painter); +} + +void QFrame_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QFrame_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_Redirected(offset); +} + +void QFrame_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QFrame_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_SharedPainter(); +} + +void QFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InputMethodEvent = slot; +} + +void QFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQFrame*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QFrame_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQFrame*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QFrame*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QFrame_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQFrame*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QFrame_Delete(QFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qframe.go b/qt6/gen_qframe.go index da0c65fe..9b997fac 100644 --- a/qt6/gen_qframe.go +++ b/qt6/gen_qframe.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -41,7 +42,8 @@ const ( ) type QFrame struct { - h *C.QFrame + h *C.QFrame + isSubclass bool *QWidget } @@ -59,33 +61,62 @@ func (this *QFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFrame(h *C.QFrame) *QFrame { +// newQFrame constructs the type using only CGO pointers. +func newQFrame(h *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFrame { if h == nil { return nil } - return &QFrame{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QFrame{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQFrame(h unsafe.Pointer) *QFrame { - return newQFrame((*C.QFrame)(h)) +// UnsafeNewQFrame constructs the type using only unsafe pointers. +func UnsafeNewQFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFrame { + if h == nil { + return nil + } + + return &QFrame{h: (*C.QFrame)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQFrame constructs a new QFrame object. func NewQFrame(parent *QWidget) *QFrame { - ret := C.QFrame_new(parent.cPointer()) - return newQFrame(ret) + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFrame_new(parent.cPointer(), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFrame2 constructs a new QFrame object. func NewQFrame2() *QFrame { - ret := C.QFrame_new2() - return newQFrame(ret) + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFrame_new2(&outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQFrame3 constructs a new QFrame object. func NewQFrame3(parent *QWidget, f WindowType) *QFrame { - ret := C.QFrame_new3(parent.cPointer(), (C.int)(f)) - return newQFrame(ret) + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QFrame_new3(parent.cPointer(), (C.int)(f), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QFrame) MetaObject() *QMetaObject { @@ -191,9 +222,998 @@ func QFrame_Tr3(s string, c string, n int) string { return _ret } +func (this *QFrame) callVirtualBase_SizeHint() *QSize { + + _ret := C.QFrame_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFrame) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QFrame_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_SizeHint +func miqt_exec_callback_QFrame_SizeHint(self *C.QFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QFrame_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QFrame) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QFrame_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_Event +func miqt_exec_callback_QFrame_Event(self *C.QFrame, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QFrame_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFrame) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QFrame_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_PaintEvent +func miqt_exec_callback_QFrame_PaintEvent(self *C.QFrame, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QFrame_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFrame) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QFrame_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ChangeEvent +func miqt_exec_callback_QFrame_ChangeEvent(self *C.QFrame, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QFrame{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QFrame_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QFrame) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QFrame_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InitStyleOption +func miqt_exec_callback_QFrame_InitStyleOption(self *C.QFrame, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QFrame) callVirtualBase_DevType() int { + + return (int)(C.QFrame_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QFrame) OnDevType(slot func(super func() int) int) { + C.QFrame_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DevType +func miqt_exec_callback_QFrame_DevType(self *C.QFrame, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_SetVisible(visible bool) { + + C.QFrame_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QFrame) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QFrame_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_SetVisible +func miqt_exec_callback_QFrame_SetVisible(self *C.QFrame, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QFrame{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QFrame) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QFrame_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFrame) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QFrame_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MinimumSizeHint +func miqt_exec_callback_QFrame_MinimumSizeHint(self *C.QFrame, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QFrame_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFrame) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QFrame_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_HeightForWidth +func miqt_exec_callback_QFrame_HeightForWidth(self *C.QFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QFrame_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QFrame) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QFrame_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_HasHeightForWidth +func miqt_exec_callback_QFrame_HasHeightForWidth(self *C.QFrame, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QFrame_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QFrame) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QFrame_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_PaintEngine +func miqt_exec_callback_QFrame_PaintEngine(self *C.QFrame, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MousePressEvent +func miqt_exec_callback_QFrame_MousePressEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MouseReleaseEvent +func miqt_exec_callback_QFrame_MouseReleaseEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MouseDoubleClickEvent +func miqt_exec_callback_QFrame_MouseDoubleClickEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QFrame_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QFrame_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MouseMoveEvent +func miqt_exec_callback_QFrame_MouseMoveEvent(self *C.QFrame, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QFrame_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QFrame_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_WheelEvent +func miqt_exec_callback_QFrame_WheelEvent(self *C.QFrame, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QFrame_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFrame_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_KeyPressEvent +func miqt_exec_callback_QFrame_KeyPressEvent(self *C.QFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QFrame_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QFrame_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_KeyReleaseEvent +func miqt_exec_callback_QFrame_KeyReleaseEvent(self *C.QFrame, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QFrame_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFrame_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_FocusInEvent +func miqt_exec_callback_QFrame_FocusInEvent(self *C.QFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QFrame_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QFrame_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_FocusOutEvent +func miqt_exec_callback_QFrame_FocusOutEvent(self *C.QFrame, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QFrame_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QFrame_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_EnterEvent +func miqt_exec_callback_QFrame_EnterEvent(self *C.QFrame, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QFrame_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QFrame_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_LeaveEvent +func miqt_exec_callback_QFrame_LeaveEvent(self *C.QFrame, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QFrame{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QFrame_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QFrame_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_MoveEvent +func miqt_exec_callback_QFrame_MoveEvent(self *C.QFrame, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QFrame_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QFrame_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ResizeEvent +func miqt_exec_callback_QFrame_ResizeEvent(self *C.QFrame, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QFrame_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QFrame_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_CloseEvent +func miqt_exec_callback_QFrame_CloseEvent(self *C.QFrame, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QFrame_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QFrame_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ContextMenuEvent +func miqt_exec_callback_QFrame_ContextMenuEvent(self *C.QFrame, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QFrame_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QFrame_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_TabletEvent +func miqt_exec_callback_QFrame_TabletEvent(self *C.QFrame, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QFrame_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QFrame_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ActionEvent +func miqt_exec_callback_QFrame_ActionEvent(self *C.QFrame, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QFrame_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QFrame_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DragEnterEvent +func miqt_exec_callback_QFrame_DragEnterEvent(self *C.QFrame, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QFrame_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QFrame_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DragMoveEvent +func miqt_exec_callback_QFrame_DragMoveEvent(self *C.QFrame, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QFrame_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QFrame_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DragLeaveEvent +func miqt_exec_callback_QFrame_DragLeaveEvent(self *C.QFrame, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QFrame_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QFrame_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_DropEvent +func miqt_exec_callback_QFrame_DropEvent(self *C.QFrame, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QFrame_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QFrame_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_ShowEvent +func miqt_exec_callback_QFrame_ShowEvent(self *C.QFrame, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QFrame_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QFrame) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QFrame_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_HideEvent +func miqt_exec_callback_QFrame_HideEvent(self *C.QFrame, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QFrame_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QFrame) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QFrame_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_NativeEvent +func miqt_exec_callback_QFrame_NativeEvent(self *C.QFrame, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QFrame_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QFrame) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QFrame_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_Metric +func miqt_exec_callback_QFrame_Metric(self *C.QFrame, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QFrame) callVirtualBase_InitPainter(painter *QPainter) { + + C.QFrame_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QFrame) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QFrame_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InitPainter +func miqt_exec_callback_QFrame_InitPainter(self *C.QFrame, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QFrame{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QFrame) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QFrame_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QFrame) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QFrame_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_Redirected +func miqt_exec_callback_QFrame_Redirected(self *C.QFrame, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QFrame_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QFrame) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QFrame_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_SharedPainter +func miqt_exec_callback_QFrame_SharedPainter(self *C.QFrame, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QFrame_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QFrame) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QFrame_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InputMethodEvent +func miqt_exec_callback_QFrame_InputMethodEvent(self *C.QFrame, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QFrame) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QFrame_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QFrame) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QFrame_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_InputMethodQuery +func miqt_exec_callback_QFrame_InputMethodQuery(self *C.QFrame, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QFrame) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QFrame_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QFrame) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QFrame_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QFrame_FocusNextPrevChild +func miqt_exec_callback_QFrame_FocusNextPrevChild(self *C.QFrame, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QFrame{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QFrame) Delete() { - C.QFrame_Delete(this.h) + C.QFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qframe.h b/qt6/gen_qframe.h index 19cbcfd8..6e33017a 100644 --- a/qt6/gen_qframe.h +++ b/qt6/gen_qframe.h @@ -15,22 +15,78 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; class QFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionFrame; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QFrame* QFrame_new(QWidget* parent); -QFrame* QFrame_new2(); -QFrame* QFrame_new3(QWidget* parent, int f); +void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QFrame_MetaObject(const QFrame* self); void* QFrame_Metacast(QFrame* self, const char* param1); struct miqt_string QFrame_Tr(const char* s); @@ -48,9 +104,97 @@ int QFrame_MidLineWidth(const QFrame* self); void QFrame_SetMidLineWidth(QFrame* self, int midLineWidth); QRect* QFrame_FrameRect(const QFrame* self); void QFrame_SetFrameRect(QFrame* self, QRect* frameRect); +bool QFrame_Event(QFrame* self, QEvent* e); +void QFrame_PaintEvent(QFrame* self, QPaintEvent* param1); +void QFrame_ChangeEvent(QFrame* self, QEvent* param1); +void QFrame_InitStyleOption(const QFrame* self, QStyleOptionFrame* option); struct miqt_string QFrame_Tr2(const char* s, const char* c); struct miqt_string QFrame_Tr3(const char* s, const char* c, int n); -void QFrame_Delete(QFrame* self); +void QFrame_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QFrame_virtualbase_SizeHint(const void* self); +void QFrame_override_virtual_Event(void* self, intptr_t slot); +bool QFrame_virtualbase_Event(void* self, QEvent* e); +void QFrame_override_virtual_PaintEvent(void* self, intptr_t slot); +void QFrame_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QFrame_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QFrame_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QFrame_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QFrame_override_virtual_DevType(void* self, intptr_t slot); +int QFrame_virtualbase_DevType(const void* self); +void QFrame_override_virtual_SetVisible(void* self, intptr_t slot); +void QFrame_virtualbase_SetVisible(void* self, bool visible); +void QFrame_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QFrame_virtualbase_MinimumSizeHint(const void* self); +void QFrame_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QFrame_virtualbase_HeightForWidth(const void* self, int param1); +void QFrame_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QFrame_virtualbase_HasHeightForWidth(const void* self); +void QFrame_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QFrame_virtualbase_PaintEngine(const void* self); +void QFrame_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QFrame_override_virtual_WheelEvent(void* self, intptr_t slot); +void QFrame_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QFrame_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QFrame_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QFrame_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QFrame_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QFrame_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QFrame_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QFrame_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QFrame_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QFrame_override_virtual_EnterEvent(void* self, intptr_t slot); +void QFrame_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QFrame_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_LeaveEvent(void* self, QEvent* event); +void QFrame_override_virtual_MoveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QFrame_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QFrame_override_virtual_CloseEvent(void* self, intptr_t slot); +void QFrame_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QFrame_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QFrame_override_virtual_TabletEvent(void* self, intptr_t slot); +void QFrame_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QFrame_override_virtual_ActionEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QFrame_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QFrame_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QFrame_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QFrame_override_virtual_DropEvent(void* self, intptr_t slot); +void QFrame_virtualbase_DropEvent(void* self, QDropEvent* event); +void QFrame_override_virtual_ShowEvent(void* self, intptr_t slot); +void QFrame_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QFrame_override_virtual_HideEvent(void* self, intptr_t slot); +void QFrame_virtualbase_HideEvent(void* self, QHideEvent* event); +void QFrame_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QFrame_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QFrame_override_virtual_Metric(void* self, intptr_t slot); +int QFrame_virtualbase_Metric(const void* self, int param1); +void QFrame_override_virtual_InitPainter(void* self, intptr_t slot); +void QFrame_virtualbase_InitPainter(const void* self, QPainter* painter); +void QFrame_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QFrame_virtualbase_Redirected(const void* self, QPoint* offset); +void QFrame_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QFrame_virtualbase_SharedPainter(const void* self); +void QFrame_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QFrame_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QFrame_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QFrame_virtualbase_InputMethodQuery(const void* self, int param1); +void QFrame_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QFrame_virtualbase_FocusNextPrevChild(void* self, bool next); +void QFrame_Delete(QFrame* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfutureinterface.cpp b/qt6/gen_qfutureinterface.cpp index b1cd43fc..95147050 100644 --- a/qt6/gen_qfutureinterface.cpp +++ b/qt6/gen_qfutureinterface.cpp @@ -9,16 +9,19 @@ #include "gen_qfutureinterface.h" #include "_cgo_export.h" -QFutureInterfaceBase* QFutureInterfaceBase_new() { - return new QFutureInterfaceBase(); +void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase) { + QFutureInterfaceBase* ret = new QFutureInterfaceBase(); + *outptr_QFutureInterfaceBase = ret; } -QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other) { - return new QFutureInterfaceBase(*other); +void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { + QFutureInterfaceBase* ret = new QFutureInterfaceBase(*other); + *outptr_QFutureInterfaceBase = ret; } -QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState) { - return new QFutureInterfaceBase(static_cast(initialState)); +void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { + QFutureInterfaceBase* ret = new QFutureInterfaceBase(static_cast(initialState)); + *outptr_QFutureInterfaceBase = ret; } void QFutureInterfaceBase_OperatorAssign(QFutureInterfaceBase* self, QFutureInterfaceBase* other) { @@ -235,7 +238,11 @@ bool QFutureInterfaceBase_IsChainCanceled(const QFutureInterfaceBase* self) { return self->isChainCanceled(); } -void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self) { - delete self; +void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfutureinterface.go b/qt6/gen_qfutureinterface.go index 17cb6b23..1c0f7584 100644 --- a/qt6/gen_qfutureinterface.go +++ b/qt6/gen_qfutureinterface.go @@ -27,8 +27,16 @@ const ( QFutureInterfaceBase__Pending QFutureInterfaceBase__State = 128 ) +type QFutureInterfaceBase__CancelMode int + +const ( + QFutureInterfaceBase__CancelOnly QFutureInterfaceBase__CancelMode = 0 + QFutureInterfaceBase__CancelAndFinish QFutureInterfaceBase__CancelMode = 1 +) + type QFutureInterfaceBase struct { - h *C.QFutureInterfaceBase + h *C.QFutureInterfaceBase + isSubclass bool } func (this *QFutureInterfaceBase) cPointer() *C.QFutureInterfaceBase { @@ -45,6 +53,7 @@ func (this *QFutureInterfaceBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQFutureInterfaceBase constructs the type using only CGO pointers. func newQFutureInterfaceBase(h *C.QFutureInterfaceBase) *QFutureInterfaceBase { if h == nil { return nil @@ -52,26 +61,43 @@ func newQFutureInterfaceBase(h *C.QFutureInterfaceBase) *QFutureInterfaceBase { return &QFutureInterfaceBase{h: h} } +// UnsafeNewQFutureInterfaceBase constructs the type using only unsafe pointers. func UnsafeNewQFutureInterfaceBase(h unsafe.Pointer) *QFutureInterfaceBase { - return newQFutureInterfaceBase((*C.QFutureInterfaceBase)(h)) + if h == nil { + return nil + } + + return &QFutureInterfaceBase{h: (*C.QFutureInterfaceBase)(h)} } // NewQFutureInterfaceBase constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase() *QFutureInterfaceBase { - ret := C.QFutureInterfaceBase_new() - return newQFutureInterfaceBase(ret) + var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil + + C.QFutureInterfaceBase_new(&outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret.isSubclass = true + return ret } // NewQFutureInterfaceBase2 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase2(other *QFutureInterfaceBase) *QFutureInterfaceBase { - ret := C.QFutureInterfaceBase_new2(other.cPointer()) - return newQFutureInterfaceBase(ret) + var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil + + C.QFutureInterfaceBase_new2(other.cPointer(), &outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret.isSubclass = true + return ret } // NewQFutureInterfaceBase3 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase3(initialState QFutureInterfaceBase__State) *QFutureInterfaceBase { - ret := C.QFutureInterfaceBase_new3((C.int)(initialState)) - return newQFutureInterfaceBase(ret) + var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil + + C.QFutureInterfaceBase_new3((C.int)(initialState), &outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret.isSubclass = true + return ret } func (this *QFutureInterfaceBase) OperatorAssign(other *QFutureInterfaceBase) { @@ -103,7 +129,7 @@ func (this *QFutureInterfaceBase) SetThreadPool(pool *QThreadPool) { } func (this *QFutureInterfaceBase) ThreadPool() *QThreadPool { - return UnsafeNewQThreadPool(unsafe.Pointer(C.QFutureInterfaceBase_ThreadPool(this.h))) + return UnsafeNewQThreadPool(unsafe.Pointer(C.QFutureInterfaceBase_ThreadPool(this.h)), nil) } func (this *QFutureInterfaceBase) SetFilterMode(enable bool) { @@ -262,7 +288,7 @@ func (this *QFutureInterfaceBase) SuspendIfRequested() { } func (this *QFutureInterfaceBase) Mutex() *QMutex { - return UnsafeNewQMutex(unsafe.Pointer(C.QFutureInterfaceBase_Mutex(this.h))) + return UnsafeNewQMutex(unsafe.Pointer(C.QFutureInterfaceBase_Mutex(this.h)), nil) } func (this *QFutureInterfaceBase) HasException() bool { @@ -287,7 +313,7 @@ func (this *QFutureInterfaceBase) IsChainCanceled() bool { // Delete this object from C++ memory. func (this *QFutureInterfaceBase) Delete() { - C.QFutureInterfaceBase_Delete(this.h) + C.QFutureInterfaceBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfutureinterface.h b/qt6/gen_qfutureinterface.h index aef73658..ae8d425a 100644 --- a/qt6/gen_qfutureinterface.h +++ b/qt6/gen_qfutureinterface.h @@ -26,9 +26,9 @@ typedef struct QRunnable QRunnable; typedef struct QThreadPool QThreadPool; #endif -QFutureInterfaceBase* QFutureInterfaceBase_new(); -QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other); -QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState); +void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase); +void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase); +void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase); void QFutureInterfaceBase_OperatorAssign(QFutureInterfaceBase* self, QFutureInterfaceBase* other); void QFutureInterfaceBase_ReportStarted(QFutureInterfaceBase* self); void QFutureInterfaceBase_ReportFinished(QFutureInterfaceBase* self); @@ -80,7 +80,7 @@ bool QFutureInterfaceBase_OperatorEqual(const QFutureInterfaceBase* self, QFutur bool QFutureInterfaceBase_OperatorNotEqual(const QFutureInterfaceBase* self, QFutureInterfaceBase* other); void QFutureInterfaceBase_Swap(QFutureInterfaceBase* self, QFutureInterfaceBase* other); bool QFutureInterfaceBase_IsChainCanceled(const QFutureInterfaceBase* self); -void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self); +void QFutureInterfaceBase_Delete(QFutureInterfaceBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qfuturewatcher.cpp b/qt6/gen_qfuturewatcher.cpp index 1af80757..28ffe774 100644 --- a/qt6/gen_qfuturewatcher.cpp +++ b/qt6/gen_qfuturewatcher.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -279,7 +281,11 @@ struct miqt_string QFutureWatcherBase_Tr3(const char* s, const char* c, int n) { return _ms; } -void QFutureWatcherBase_Delete(QFutureWatcherBase* self) { - delete self; +void QFutureWatcherBase_Delete(QFutureWatcherBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qfuturewatcher.go b/qt6/gen_qfuturewatcher.go index 83bed9e4..3e1eed84 100644 --- a/qt6/gen_qfuturewatcher.go +++ b/qt6/gen_qfuturewatcher.go @@ -15,7 +15,8 @@ import ( ) type QFutureWatcherBase struct { - h *C.QFutureWatcherBase + h *C.QFutureWatcherBase + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QFutureWatcherBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQFutureWatcherBase(h *C.QFutureWatcherBase) *QFutureWatcherBase { +// newQFutureWatcherBase constructs the type using only CGO pointers. +func newQFutureWatcherBase(h *C.QFutureWatcherBase, h_QObject *C.QObject) *QFutureWatcherBase { if h == nil { return nil } - return &QFutureWatcherBase{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QFutureWatcherBase{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQFutureWatcherBase(h unsafe.Pointer) *QFutureWatcherBase { - return newQFutureWatcherBase((*C.QFutureWatcherBase)(h)) +// UnsafeNewQFutureWatcherBase constructs the type using only unsafe pointers. +func UnsafeNewQFutureWatcherBase(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFutureWatcherBase { + if h == nil { + return nil + } + + return &QFutureWatcherBase{h: (*C.QFutureWatcherBase)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QFutureWatcherBase) MetaObject() *QMetaObject { @@ -408,7 +417,7 @@ func QFutureWatcherBase_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QFutureWatcherBase) Delete() { - C.QFutureWatcherBase_Delete(this.h) + C.QFutureWatcherBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qfuturewatcher.h b/qt6/gen_qfuturewatcher.h index 09649c9b..deacf871 100644 --- a/qt6/gen_qfuturewatcher.h +++ b/qt6/gen_qfuturewatcher.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QEvent; class QFutureWatcherBase; +class QMetaMethod; class QMetaObject; +class QObject; #else typedef struct QEvent QEvent; typedef struct QFutureWatcherBase QFutureWatcherBase; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self); @@ -73,9 +77,11 @@ void QFutureWatcherBase_ToggleSuspended(QFutureWatcherBase* self); void QFutureWatcherBase_SetPaused(QFutureWatcherBase* self, bool paused); void QFutureWatcherBase_Pause(QFutureWatcherBase* self); void QFutureWatcherBase_TogglePaused(QFutureWatcherBase* self); +void QFutureWatcherBase_ConnectNotify(QFutureWatcherBase* self, QMetaMethod* signal); +void QFutureWatcherBase_DisconnectNotify(QFutureWatcherBase* self, QMetaMethod* signal); struct miqt_string QFutureWatcherBase_Tr2(const char* s, const char* c); struct miqt_string QFutureWatcherBase_Tr3(const char* s, const char* c, int n); -void QFutureWatcherBase_Delete(QFutureWatcherBase* self); +void QFutureWatcherBase_Delete(QFutureWatcherBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgenericplugin.cpp b/qt6/gen_qgenericplugin.cpp index b609e423..e3337f89 100644 --- a/qt6/gen_qgenericplugin.cpp +++ b/qt6/gen_qgenericplugin.cpp @@ -55,7 +55,11 @@ struct miqt_string QGenericPlugin_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGenericPlugin_Delete(QGenericPlugin* self) { - delete self; +void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgenericplugin.go b/qt6/gen_qgenericplugin.go index f908c07a..647290f9 100644 --- a/qt6/gen_qgenericplugin.go +++ b/qt6/gen_qgenericplugin.go @@ -14,7 +14,8 @@ import ( ) type QGenericPlugin struct { - h *C.QGenericPlugin + h *C.QGenericPlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QGenericPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGenericPlugin(h *C.QGenericPlugin) *QGenericPlugin { +// newQGenericPlugin constructs the type using only CGO pointers. +func newQGenericPlugin(h *C.QGenericPlugin, h_QObject *C.QObject) *QGenericPlugin { if h == nil { return nil } - return &QGenericPlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGenericPlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGenericPlugin(h unsafe.Pointer) *QGenericPlugin { - return newQGenericPlugin((*C.QGenericPlugin)(h)) +// UnsafeNewQGenericPlugin constructs the type using only unsafe pointers. +func UnsafeNewQGenericPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGenericPlugin { + if h == nil { + return nil + } + + return &QGenericPlugin{h: (*C.QGenericPlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGenericPlugin) MetaObject() *QMetaObject { @@ -98,7 +107,7 @@ func QGenericPlugin_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGenericPlugin) Delete() { - C.QGenericPlugin_Delete(this.h) + C.QGenericPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgenericplugin.h b/qt6/gen_qgenericplugin.h index fc525251..bf647ff1 100644 --- a/qt6/gen_qgenericplugin.h +++ b/qt6/gen_qgenericplugin.h @@ -30,7 +30,7 @@ struct miqt_string QGenericPlugin_Tr(const char* s); QObject* QGenericPlugin_Create(QGenericPlugin* self, struct miqt_string name, struct miqt_string spec); struct miqt_string QGenericPlugin_Tr2(const char* s, const char* c); struct miqt_string QGenericPlugin_Tr3(const char* s, const char* c, int n); -void QGenericPlugin_Delete(QGenericPlugin* self); +void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgenericpluginfactory.cpp b/qt6/gen_qgenericpluginfactory.cpp index 2aa5ac9b..abe6c5a4 100644 --- a/qt6/gen_qgenericpluginfactory.cpp +++ b/qt6/gen_qgenericpluginfactory.cpp @@ -34,7 +34,11 @@ QObject* QGenericPluginFactory_Create(struct miqt_string param1, struct miqt_str return QGenericPluginFactory::create(param1_QString, param2_QString); } -void QGenericPluginFactory_Delete(QGenericPluginFactory* self) { - delete self; +void QGenericPluginFactory_Delete(QGenericPluginFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgenericpluginfactory.go b/qt6/gen_qgenericpluginfactory.go index caa7f9af..1363fc6d 100644 --- a/qt6/gen_qgenericpluginfactory.go +++ b/qt6/gen_qgenericpluginfactory.go @@ -14,7 +14,8 @@ import ( ) type QGenericPluginFactory struct { - h *C.QGenericPluginFactory + h *C.QGenericPluginFactory + isSubclass bool } func (this *QGenericPluginFactory) cPointer() *C.QGenericPluginFactory { @@ -31,6 +32,7 @@ func (this *QGenericPluginFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGenericPluginFactory constructs the type using only CGO pointers. func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory { if h == nil { return nil @@ -38,8 +40,13 @@ func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory return &QGenericPluginFactory{h: h} } +// UnsafeNewQGenericPluginFactory constructs the type using only unsafe pointers. func UnsafeNewQGenericPluginFactory(h unsafe.Pointer) *QGenericPluginFactory { - return newQGenericPluginFactory((*C.QGenericPluginFactory)(h)) + if h == nil { + return nil + } + + return &QGenericPluginFactory{h: (*C.QGenericPluginFactory)(h)} } func QGenericPluginFactory_Keys() []string { @@ -69,7 +76,7 @@ func QGenericPluginFactory_Create(param1 string, param2 string) *QObject { // Delete this object from C++ memory. func (this *QGenericPluginFactory) Delete() { - C.QGenericPluginFactory_Delete(this.h) + C.QGenericPluginFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgenericpluginfactory.h b/qt6/gen_qgenericpluginfactory.h index a0924b90..d6363be5 100644 --- a/qt6/gen_qgenericpluginfactory.h +++ b/qt6/gen_qgenericpluginfactory.h @@ -24,7 +24,7 @@ typedef struct QObject QObject; struct miqt_array /* of struct miqt_string */ QGenericPluginFactory_Keys(); QObject* QGenericPluginFactory_Create(struct miqt_string param1, struct miqt_string param2); -void QGenericPluginFactory_Delete(QGenericPluginFactory* self); +void QGenericPluginFactory_Delete(QGenericPluginFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgesture.cpp b/qt6/gen_qgesture.cpp index ababf41e..94ee8229 100644 --- a/qt6/gen_qgesture.cpp +++ b/qt6/gen_qgesture.cpp @@ -1,6 +1,9 @@ +#include +#include #include #include #include +#include #include #include #include @@ -12,17 +15,203 @@ #include #include #include +#include #include #include #include "gen_qgesture.h" #include "_cgo_export.h" -QGesture* QGesture_new() { - return new QGesture(); +class MiqtVirtualQGesture : public virtual QGesture { +public: + + MiqtVirtualQGesture(): QGesture() {}; + MiqtVirtualQGesture(QObject* parent): QGesture(parent) {}; + + virtual ~MiqtVirtualQGesture() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGesture::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGesture_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGesture::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGesture::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGesture_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGesture::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGesture::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGesture_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGesture::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGesture::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGesture_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGesture::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QGesture::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGesture_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGesture::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QGesture::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGesture_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGesture::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QGesture::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGesture_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGesture::disconnectNotify(*signal); + + } + +}; + +void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject) { + MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(); + *outptr_QGesture = ret; + *outptr_QObject = static_cast(ret); } -QGesture* QGesture_new2(QObject* parent) { - return new QGesture(parent); +void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject) { + MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(parent); + *outptr_QGesture = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QGesture_MetaObject(const QGesture* self) { @@ -101,16 +290,82 @@ struct miqt_string QGesture_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGesture_Delete(QGesture* self) { - delete self; +void QGesture_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__Event = slot; +} + +bool QGesture_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGesture*)(self) )->virtualbase_Event(event); +} + +void QGesture_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__EventFilter = slot; +} + +bool QGesture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGesture*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGesture_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__TimerEvent = slot; +} + +void QGesture_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_TimerEvent(event); +} + +void QGesture_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__ChildEvent = slot; +} + +void QGesture_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_ChildEvent(event); +} + +void QGesture_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__CustomEvent = slot; } -QPanGesture* QPanGesture_new() { - return new QPanGesture(); +void QGesture_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_CustomEvent(event); } -QPanGesture* QPanGesture_new2(QObject* parent) { - return new QPanGesture(parent); +void QGesture_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__ConnectNotify = slot; +} + +void QGesture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGesture_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGesture*)(self) )->handle__DisconnectNotify = slot; +} + +void QGesture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGesture*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGesture_Delete(QGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPanGesture* ret = new QPanGesture(); + *outptr_QPanGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPanGesture* ret = new QPanGesture(parent); + *outptr_QPanGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPanGesture_MetaObject(const QPanGesture* self) { @@ -183,16 +438,26 @@ struct miqt_string QPanGesture_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPanGesture_Delete(QPanGesture* self) { - delete self; +void QPanGesture_Delete(QPanGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPinchGesture* QPinchGesture_new() { - return new QPinchGesture(); +void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPinchGesture* ret = new QPinchGesture(); + *outptr_QPinchGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPinchGesture* QPinchGesture_new2(QObject* parent) { - return new QPinchGesture(parent); +void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QPinchGesture* ret = new QPinchGesture(parent); + *outptr_QPinchGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self) { @@ -332,16 +597,26 @@ struct miqt_string QPinchGesture_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPinchGesture_Delete(QPinchGesture* self) { - delete self; +void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSwipeGesture* QSwipeGesture_new() { - return new QSwipeGesture(); +void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QSwipeGesture* ret = new QSwipeGesture(); + *outptr_QSwipeGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSwipeGesture* QSwipeGesture_new2(QObject* parent) { - return new QSwipeGesture(parent); +void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QSwipeGesture* ret = new QSwipeGesture(parent); + *outptr_QSwipeGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self) { @@ -404,16 +679,26 @@ struct miqt_string QSwipeGesture_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSwipeGesture_Delete(QSwipeGesture* self) { - delete self; +void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTapGesture* QTapGesture_new() { - return new QTapGesture(); +void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapGesture* ret = new QTapGesture(); + *outptr_QTapGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTapGesture* QTapGesture_new2(QObject* parent) { - return new QTapGesture(parent); +void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapGesture* ret = new QTapGesture(parent); + *outptr_QTapGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTapGesture_MetaObject(const QTapGesture* self) { @@ -465,16 +750,26 @@ struct miqt_string QTapGesture_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTapGesture_Delete(QTapGesture* self) { - delete self; +void QTapGesture_Delete(QTapGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTapAndHoldGesture* QTapAndHoldGesture_new() { - return new QTapAndHoldGesture(); +void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapAndHoldGesture* ret = new QTapAndHoldGesture(); + *outptr_QTapAndHoldGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent) { - return new QTapAndHoldGesture(parent); +void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { + QTapAndHoldGesture* ret = new QTapAndHoldGesture(parent); + *outptr_QTapAndHoldGesture = ret; + *outptr_QGesture = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self) { @@ -534,22 +829,86 @@ struct miqt_string QTapAndHoldGesture_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self) { - delete self; +void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures) { +class MiqtVirtualQGestureEvent : public virtual QGestureEvent { +public: + + MiqtVirtualQGestureEvent(const QList& gestures): QGestureEvent(gestures) {}; + MiqtVirtualQGestureEvent(const QGestureEvent& param1): QGestureEvent(param1) {}; + + virtual ~MiqtVirtualQGestureEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QGestureEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QGestureEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QGestureEvent::setAccepted(accepted); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QEvent* clone() const override { + if (handle__Clone == 0) { + return QGestureEvent::clone(); + } + + + QEvent* callback_return_value = miqt_exec_callback_QGestureEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QEvent* virtualbase_Clone() const { + + return QGestureEvent::clone(); + + } + +}; + +void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { QList gestures_QList; gestures_QList.reserve(gestures.len); QGesture** gestures_arr = static_cast(gestures.data); for(size_t i = 0; i < gestures.len; ++i) { gestures_QList.push_back(gestures_arr[i]); } - return new QGestureEvent(gestures_QList); + MiqtVirtualQGestureEvent* ret = new MiqtVirtualQGestureEvent(gestures_QList); + *outptr_QGestureEvent = ret; + *outptr_QEvent = static_cast(ret); } -QGestureEvent* QGestureEvent_new2(QGestureEvent* param1) { - return new QGestureEvent(*param1); +void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { + MiqtVirtualQGestureEvent* ret = new MiqtVirtualQGestureEvent(*param1); + *outptr_QGestureEvent = ret; + *outptr_QEvent = static_cast(ret); } struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self) { @@ -639,7 +998,27 @@ QPointF* QGestureEvent_MapToGraphicsScene(const QGestureEvent* self, QPointF* ge return new QPointF(self->mapToGraphicsScene(*gesturePoint)); } -void QGestureEvent_Delete(QGestureEvent* self) { - delete self; +void QGestureEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QGestureEvent*)(self) )->handle__SetAccepted = slot; +} + +void QGestureEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQGestureEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QGestureEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QGestureEvent*)(self) )->handle__Clone = slot; +} + +QEvent* QGestureEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQGestureEvent*)(self) )->virtualbase_Clone(); +} + +void QGestureEvent_Delete(QGestureEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgesture.go b/qt6/gen_qgesture.go index 8022917d..9264317b 100644 --- a/qt6/gen_qgesture.go +++ b/qt6/gen_qgesture.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -39,7 +40,8 @@ const ( ) type QGesture struct { - h *C.QGesture + h *C.QGesture + isSubclass bool *QObject } @@ -57,27 +59,45 @@ func (this *QGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGesture(h *C.QGesture) *QGesture { +// newQGesture constructs the type using only CGO pointers. +func newQGesture(h *C.QGesture, h_QObject *C.QObject) *QGesture { if h == nil { return nil } - return &QGesture{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGesture{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGesture(h unsafe.Pointer) *QGesture { - return newQGesture((*C.QGesture)(h)) +// UnsafeNewQGesture constructs the type using only unsafe pointers. +func UnsafeNewQGesture(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGesture { + if h == nil { + return nil + } + + return &QGesture{h: (*C.QGesture)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQGesture constructs a new QGesture object. func NewQGesture() *QGesture { - ret := C.QGesture_new() - return newQGesture(ret) + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QGesture_new(&outptr_QGesture, &outptr_QObject) + ret := newQGesture(outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGesture2 constructs a new QGesture object. func NewQGesture2(parent *QObject) *QGesture { - ret := C.QGesture_new2(parent.cPointer()) - return newQGesture(ret) + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QGesture_new2(parent.cPointer(), &outptr_QGesture, &outptr_QObject) + ret := newQGesture(outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGesture) MetaObject() *QMetaObject { @@ -156,9 +176,175 @@ func QGesture_Tr3(s string, c string, n int) string { return _ret } +func (this *QGesture) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGesture_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGesture) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGesture_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_Event +func miqt_exec_callback_QGesture_Event(self *C.QGesture, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGesture{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGesture) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGesture_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGesture) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGesture_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_EventFilter +func miqt_exec_callback_QGesture_EventFilter(self *C.QGesture, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGesture{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGesture) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGesture_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGesture) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGesture_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_TimerEvent +func miqt_exec_callback_QGesture_TimerEvent(self *C.QGesture, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGesture{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGesture) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGesture_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGesture) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGesture_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_ChildEvent +func miqt_exec_callback_QGesture_ChildEvent(self *C.QGesture, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGesture{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGesture) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGesture_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGesture) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGesture_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_CustomEvent +func miqt_exec_callback_QGesture_CustomEvent(self *C.QGesture, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGesture{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGesture) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGesture_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGesture) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGesture_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_ConnectNotify +func miqt_exec_callback_QGesture_ConnectNotify(self *C.QGesture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGesture{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGesture) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGesture_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGesture) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGesture_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGesture_DisconnectNotify +func miqt_exec_callback_QGesture_DisconnectNotify(self *C.QGesture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGesture{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGesture) Delete() { - C.QGesture_Delete(this.h) + C.QGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -171,7 +357,8 @@ func (this *QGesture) GoGC() { } type QPanGesture struct { - h *C.QPanGesture + h *C.QPanGesture + isSubclass bool *QGesture } @@ -189,27 +376,47 @@ func (this *QPanGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPanGesture(h *C.QPanGesture) *QPanGesture { +// newQPanGesture constructs the type using only CGO pointers. +func newQPanGesture(h *C.QPanGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPanGesture { if h == nil { return nil } - return &QPanGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QPanGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQPanGesture(h unsafe.Pointer) *QPanGesture { - return newQPanGesture((*C.QPanGesture)(h)) +// UnsafeNewQPanGesture constructs the type using only unsafe pointers. +func UnsafeNewQPanGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPanGesture { + if h == nil { + return nil + } + + return &QPanGesture{h: (*C.QPanGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQPanGesture constructs a new QPanGesture object. func NewQPanGesture() *QPanGesture { - ret := C.QPanGesture_new() - return newQPanGesture(ret) + var outptr_QPanGesture *C.QPanGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPanGesture_new(&outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPanGesture2 constructs a new QPanGesture object. func NewQPanGesture2(parent *QObject) *QPanGesture { - ret := C.QPanGesture_new2(parent.cPointer()) - return newQPanGesture(ret) + var outptr_QPanGesture *C.QPanGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPanGesture_new2(parent.cPointer(), &outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPanGesture) MetaObject() *QMetaObject { @@ -292,7 +499,7 @@ func QPanGesture_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPanGesture) Delete() { - C.QPanGesture_Delete(this.h) + C.QPanGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -305,7 +512,8 @@ func (this *QPanGesture) GoGC() { } type QPinchGesture struct { - h *C.QPinchGesture + h *C.QPinchGesture + isSubclass bool *QGesture } @@ -323,27 +531,47 @@ func (this *QPinchGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPinchGesture(h *C.QPinchGesture) *QPinchGesture { +// newQPinchGesture constructs the type using only CGO pointers. +func newQPinchGesture(h *C.QPinchGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPinchGesture { if h == nil { return nil } - return &QPinchGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QPinchGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQPinchGesture(h unsafe.Pointer) *QPinchGesture { - return newQPinchGesture((*C.QPinchGesture)(h)) +// UnsafeNewQPinchGesture constructs the type using only unsafe pointers. +func UnsafeNewQPinchGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPinchGesture { + if h == nil { + return nil + } + + return &QPinchGesture{h: (*C.QPinchGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQPinchGesture constructs a new QPinchGesture object. func NewQPinchGesture() *QPinchGesture { - ret := C.QPinchGesture_new() - return newQPinchGesture(ret) + var outptr_QPinchGesture *C.QPinchGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPinchGesture_new(&outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPinchGesture2 constructs a new QPinchGesture object. func NewQPinchGesture2(parent *QObject) *QPinchGesture { - ret := C.QPinchGesture_new2(parent.cPointer()) - return newQPinchGesture(ret) + var outptr_QPinchGesture *C.QPinchGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QPinchGesture_new2(parent.cPointer(), &outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) + ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPinchGesture) MetaObject() *QMetaObject { @@ -486,7 +714,7 @@ func QPinchGesture_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPinchGesture) Delete() { - C.QPinchGesture_Delete(this.h) + C.QPinchGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -499,7 +727,8 @@ func (this *QPinchGesture) GoGC() { } type QSwipeGesture struct { - h *C.QSwipeGesture + h *C.QSwipeGesture + isSubclass bool *QGesture } @@ -517,27 +746,47 @@ func (this *QSwipeGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSwipeGesture(h *C.QSwipeGesture) *QSwipeGesture { +// newQSwipeGesture constructs the type using only CGO pointers. +func newQSwipeGesture(h *C.QSwipeGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QSwipeGesture { if h == nil { return nil } - return &QSwipeGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QSwipeGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQSwipeGesture(h unsafe.Pointer) *QSwipeGesture { - return newQSwipeGesture((*C.QSwipeGesture)(h)) +// UnsafeNewQSwipeGesture constructs the type using only unsafe pointers. +func UnsafeNewQSwipeGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QSwipeGesture { + if h == nil { + return nil + } + + return &QSwipeGesture{h: (*C.QSwipeGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQSwipeGesture constructs a new QSwipeGesture object. func NewQSwipeGesture() *QSwipeGesture { - ret := C.QSwipeGesture_new() - return newQSwipeGesture(ret) + var outptr_QSwipeGesture *C.QSwipeGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QSwipeGesture_new(&outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) + ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSwipeGesture2 constructs a new QSwipeGesture object. func NewQSwipeGesture2(parent *QObject) *QSwipeGesture { - ret := C.QSwipeGesture_new2(parent.cPointer()) - return newQSwipeGesture(ret) + var outptr_QSwipeGesture *C.QSwipeGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QSwipeGesture_new2(parent.cPointer(), &outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) + ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSwipeGesture) MetaObject() *QMetaObject { @@ -599,7 +848,7 @@ func QSwipeGesture_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QSwipeGesture) Delete() { - C.QSwipeGesture_Delete(this.h) + C.QSwipeGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -612,7 +861,8 @@ func (this *QSwipeGesture) GoGC() { } type QTapGesture struct { - h *C.QTapGesture + h *C.QTapGesture + isSubclass bool *QGesture } @@ -630,27 +880,47 @@ func (this *QTapGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTapGesture(h *C.QTapGesture) *QTapGesture { +// newQTapGesture constructs the type using only CGO pointers. +func newQTapGesture(h *C.QTapGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapGesture { if h == nil { return nil } - return &QTapGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QTapGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQTapGesture(h unsafe.Pointer) *QTapGesture { - return newQTapGesture((*C.QTapGesture)(h)) +// UnsafeNewQTapGesture constructs the type using only unsafe pointers. +func UnsafeNewQTapGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapGesture { + if h == nil { + return nil + } + + return &QTapGesture{h: (*C.QTapGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQTapGesture constructs a new QTapGesture object. func NewQTapGesture() *QTapGesture { - ret := C.QTapGesture_new() - return newQTapGesture(ret) + var outptr_QTapGesture *C.QTapGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapGesture_new(&outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTapGesture2 constructs a new QTapGesture object. func NewQTapGesture2(parent *QObject) *QTapGesture { - ret := C.QTapGesture_new2(parent.cPointer()) - return newQTapGesture(ret) + var outptr_QTapGesture *C.QTapGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapGesture_new2(parent.cPointer(), &outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTapGesture) MetaObject() *QMetaObject { @@ -707,7 +977,7 @@ func QTapGesture_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTapGesture) Delete() { - C.QTapGesture_Delete(this.h) + C.QTapGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -720,7 +990,8 @@ func (this *QTapGesture) GoGC() { } type QTapAndHoldGesture struct { - h *C.QTapAndHoldGesture + h *C.QTapAndHoldGesture + isSubclass bool *QGesture } @@ -738,27 +1009,47 @@ func (this *QTapAndHoldGesture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTapAndHoldGesture(h *C.QTapAndHoldGesture) *QTapAndHoldGesture { +// newQTapAndHoldGesture constructs the type using only CGO pointers. +func newQTapAndHoldGesture(h *C.QTapAndHoldGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapAndHoldGesture { if h == nil { return nil } - return &QTapAndHoldGesture{h: h, QGesture: UnsafeNewQGesture(unsafe.Pointer(h))} + return &QTapAndHoldGesture{h: h, + QGesture: newQGesture(h_QGesture, h_QObject)} } -func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer) *QTapAndHoldGesture { - return newQTapAndHoldGesture((*C.QTapAndHoldGesture)(h)) +// UnsafeNewQTapAndHoldGesture constructs the type using only unsafe pointers. +func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapAndHoldGesture { + if h == nil { + return nil + } + + return &QTapAndHoldGesture{h: (*C.QTapAndHoldGesture)(h), + QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} } // NewQTapAndHoldGesture constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture() *QTapAndHoldGesture { - ret := C.QTapAndHoldGesture_new() - return newQTapAndHoldGesture(ret) + var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapAndHoldGesture_new(&outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTapAndHoldGesture2 constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture2(parent *QObject) *QTapAndHoldGesture { - ret := C.QTapAndHoldGesture_new2(parent.cPointer()) - return newQTapAndHoldGesture(ret) + var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil + var outptr_QGesture *C.QGesture = nil + var outptr_QObject *C.QObject = nil + + C.QTapAndHoldGesture_new2(parent.cPointer(), &outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) + ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTapAndHoldGesture) MetaObject() *QMetaObject { @@ -823,7 +1114,7 @@ func QTapAndHoldGesture_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTapAndHoldGesture) Delete() { - C.QTapAndHoldGesture_Delete(this.h) + C.QTapAndHoldGesture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -836,7 +1127,8 @@ func (this *QTapAndHoldGesture) GoGC() { } type QGestureEvent struct { - h *C.QGestureEvent + h *C.QGestureEvent + isSubclass bool *QEvent } @@ -854,15 +1146,23 @@ func (this *QGestureEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGestureEvent(h *C.QGestureEvent) *QGestureEvent { +// newQGestureEvent constructs the type using only CGO pointers. +func newQGestureEvent(h *C.QGestureEvent, h_QEvent *C.QEvent) *QGestureEvent { if h == nil { return nil } - return &QGestureEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QGestureEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQGestureEvent(h unsafe.Pointer) *QGestureEvent { - return newQGestureEvent((*C.QGestureEvent)(h)) +// UnsafeNewQGestureEvent constructs the type using only unsafe pointers. +func UnsafeNewQGestureEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGestureEvent { + if h == nil { + return nil + } + + return &QGestureEvent{h: (*C.QGestureEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQGestureEvent constructs a new QGestureEvent object. @@ -873,14 +1173,24 @@ func NewQGestureEvent(gestures []*QGesture) *QGestureEvent { gestures_CArray[i] = gestures[i].cPointer() } gestures_ma := C.struct_miqt_array{len: C.size_t(len(gestures)), data: unsafe.Pointer(gestures_CArray)} - ret := C.QGestureEvent_new(gestures_ma) - return newQGestureEvent(ret) + var outptr_QGestureEvent *C.QGestureEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGestureEvent_new(gestures_ma, &outptr_QGestureEvent, &outptr_QEvent) + ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGestureEvent2 constructs a new QGestureEvent object. func NewQGestureEvent2(param1 *QGestureEvent) *QGestureEvent { - ret := C.QGestureEvent_new2(param1.cPointer()) - return newQGestureEvent(ret) + var outptr_QGestureEvent *C.QGestureEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGestureEvent_new2(param1.cPointer(), &outptr_QGestureEvent, &outptr_QEvent) + ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGestureEvent) Gestures() []*QGesture { @@ -888,13 +1198,13 @@ func (this *QGestureEvent) Gestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QGestureEvent) Gesture(typeVal GestureType) *QGesture { - return UnsafeNewQGesture(unsafe.Pointer(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal)))) + return UnsafeNewQGesture(unsafe.Pointer(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal))), nil) } func (this *QGestureEvent) ActiveGestures() []*QGesture { @@ -902,7 +1212,7 @@ func (this *QGestureEvent) ActiveGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -912,7 +1222,7 @@ func (this *QGestureEvent) CanceledGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGesture(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -954,7 +1264,7 @@ func (this *QGestureEvent) SetWidget(widget *QWidget) { } func (this *QGestureEvent) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGestureEvent_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGestureEvent_Widget(this.h)), nil, nil) } func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF { @@ -964,9 +1274,53 @@ func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF { return _goptr } +func (this *QGestureEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QGestureEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QGestureEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QGestureEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureEvent_SetAccepted +func miqt_exec_callback_QGestureEvent_SetAccepted(self *C.QGestureEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QGestureEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + +func (this *QGestureEvent) callVirtualBase_Clone() *QEvent { + + return UnsafeNewQEvent(unsafe.Pointer(C.QGestureEvent_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QGestureEvent) OnClone(slot func(super func() *QEvent) *QEvent) { + C.QGestureEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureEvent_Clone +func miqt_exec_callback_QGestureEvent_Clone(self *C.QGestureEvent, cb C.intptr_t) *C.QEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QEvent) *QEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGestureEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGestureEvent) Delete() { - C.QGestureEvent_Delete(this.h) + C.QGestureEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgesture.h b/qt6/gen_qgesture.h index 8846c9d4..29223587 100644 --- a/qt6/gen_qgesture.h +++ b/qt6/gen_qgesture.h @@ -15,8 +15,11 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGesture; class QGestureEvent; +class QMetaMethod; class QMetaObject; class QObject; class QPanGesture; @@ -25,10 +28,14 @@ class QPointF; class QSwipeGesture; class QTapAndHoldGesture; class QTapGesture; +class QTimerEvent; class QWidget; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGesture QGesture; typedef struct QGestureEvent QGestureEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPanGesture QPanGesture; @@ -37,11 +44,12 @@ typedef struct QPointF QPointF; typedef struct QSwipeGesture QSwipeGesture; typedef struct QTapAndHoldGesture QTapAndHoldGesture; typedef struct QTapGesture QTapGesture; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QGesture* QGesture_new(); -QGesture* QGesture_new2(QObject* parent); +void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject); +void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QGesture_MetaObject(const QGesture* self); void* QGesture_Metacast(QGesture* self, const char* param1); struct miqt_string QGesture_Tr(const char* s); @@ -55,10 +63,24 @@ void QGesture_SetGestureCancelPolicy(QGesture* self, int policy); int QGesture_GestureCancelPolicy(const QGesture* self); struct miqt_string QGesture_Tr2(const char* s, const char* c); struct miqt_string QGesture_Tr3(const char* s, const char* c, int n); -void QGesture_Delete(QGesture* self); +void QGesture_override_virtual_Event(void* self, intptr_t slot); +bool QGesture_virtualbase_Event(void* self, QEvent* event); +void QGesture_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGesture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGesture_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGesture_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGesture_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGesture_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGesture_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGesture_virtualbase_CustomEvent(void* self, QEvent* event); +void QGesture_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGesture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGesture_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGesture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGesture_Delete(QGesture* self, bool isSubclass); -QPanGesture* QPanGesture_new(); -QPanGesture* QPanGesture_new2(QObject* parent); +void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QPanGesture_MetaObject(const QPanGesture* self); void* QPanGesture_Metacast(QPanGesture* self, const char* param1); struct miqt_string QPanGesture_Tr(const char* s); @@ -71,10 +93,10 @@ void QPanGesture_SetOffset(QPanGesture* self, QPointF* value); void QPanGesture_SetAcceleration(QPanGesture* self, double value); struct miqt_string QPanGesture_Tr2(const char* s, const char* c); struct miqt_string QPanGesture_Tr3(const char* s, const char* c, int n); -void QPanGesture_Delete(QPanGesture* self); +void QPanGesture_Delete(QPanGesture* self, bool isSubclass); -QPinchGesture* QPinchGesture_new(); -QPinchGesture* QPinchGesture_new2(QObject* parent); +void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self); void* QPinchGesture_Metacast(QPinchGesture* self, const char* param1); struct miqt_string QPinchGesture_Tr(const char* s); @@ -102,10 +124,10 @@ void QPinchGesture_SetLastRotationAngle(QPinchGesture* self, double value); void QPinchGesture_SetRotationAngle(QPinchGesture* self, double value); struct miqt_string QPinchGesture_Tr2(const char* s, const char* c); struct miqt_string QPinchGesture_Tr3(const char* s, const char* c, int n); -void QPinchGesture_Delete(QPinchGesture* self); +void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass); -QSwipeGesture* QSwipeGesture_new(); -QSwipeGesture* QSwipeGesture_new2(QObject* parent); +void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self); void* QSwipeGesture_Metacast(QSwipeGesture* self, const char* param1); struct miqt_string QSwipeGesture_Tr(const char* s); @@ -115,10 +137,10 @@ double QSwipeGesture_SwipeAngle(const QSwipeGesture* self); void QSwipeGesture_SetSwipeAngle(QSwipeGesture* self, double value); struct miqt_string QSwipeGesture_Tr2(const char* s, const char* c); struct miqt_string QSwipeGesture_Tr3(const char* s, const char* c, int n); -void QSwipeGesture_Delete(QSwipeGesture* self); +void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass); -QTapGesture* QTapGesture_new(); -QTapGesture* QTapGesture_new2(QObject* parent); +void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QTapGesture_MetaObject(const QTapGesture* self); void* QTapGesture_Metacast(QTapGesture* self, const char* param1); struct miqt_string QTapGesture_Tr(const char* s); @@ -126,10 +148,10 @@ QPointF* QTapGesture_Position(const QTapGesture* self); void QTapGesture_SetPosition(QTapGesture* self, QPointF* pos); struct miqt_string QTapGesture_Tr2(const char* s, const char* c); struct miqt_string QTapGesture_Tr3(const char* s, const char* c, int n); -void QTapGesture_Delete(QTapGesture* self); +void QTapGesture_Delete(QTapGesture* self, bool isSubclass); -QTapAndHoldGesture* QTapAndHoldGesture_new(); -QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent); +void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self); void* QTapAndHoldGesture_Metacast(QTapAndHoldGesture* self, const char* param1); struct miqt_string QTapAndHoldGesture_Tr(const char* s); @@ -139,10 +161,10 @@ void QTapAndHoldGesture_SetTimeout(int msecs); int QTapAndHoldGesture_Timeout(); struct miqt_string QTapAndHoldGesture_Tr2(const char* s, const char* c); struct miqt_string QTapAndHoldGesture_Tr3(const char* s, const char* c, int n); -void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self); +void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass); -QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures); -QGestureEvent* QGestureEvent_new2(QGestureEvent* param1); +void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); +void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self); QGesture* QGestureEvent_Gesture(const QGestureEvent* self, int typeVal); struct miqt_array /* of QGesture* */ QGestureEvent_ActiveGestures(const QGestureEvent* self); @@ -158,7 +180,11 @@ bool QGestureEvent_IsAcceptedWithQtGestureType(const QGestureEvent* self, int pa void QGestureEvent_SetWidget(QGestureEvent* self, QWidget* widget); QWidget* QGestureEvent_Widget(const QGestureEvent* self); QPointF* QGestureEvent_MapToGraphicsScene(const QGestureEvent* self, QPointF* gesturePoint); -void QGestureEvent_Delete(QGestureEvent* self); +void QGestureEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QGestureEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QGestureEvent_override_virtual_Clone(void* self, intptr_t slot); +QEvent* QGestureEvent_virtualbase_Clone(const void* self); +void QGestureEvent_Delete(QGestureEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgesturerecognizer.cpp b/qt6/gen_qgesturerecognizer.cpp index 09b14c52..2e305523 100644 --- a/qt6/gen_qgesturerecognizer.cpp +++ b/qt6/gen_qgesturerecognizer.cpp @@ -32,7 +32,11 @@ void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecogni self->operator=(*param1); } -void QGestureRecognizer_Delete(QGestureRecognizer* self) { - delete self; +void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgesturerecognizer.go b/qt6/gen_qgesturerecognizer.go index f06dba9c..ca6e6544 100644 --- a/qt6/gen_qgesturerecognizer.go +++ b/qt6/gen_qgesturerecognizer.go @@ -27,7 +27,8 @@ const ( ) type QGestureRecognizer struct { - h *C.QGestureRecognizer + h *C.QGestureRecognizer + isSubclass bool } func (this *QGestureRecognizer) cPointer() *C.QGestureRecognizer { @@ -44,6 +45,7 @@ func (this *QGestureRecognizer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGestureRecognizer constructs the type using only CGO pointers. func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer { if h == nil { return nil @@ -51,12 +53,17 @@ func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer { return &QGestureRecognizer{h: h} } +// UnsafeNewQGestureRecognizer constructs the type using only unsafe pointers. func UnsafeNewQGestureRecognizer(h unsafe.Pointer) *QGestureRecognizer { - return newQGestureRecognizer((*C.QGestureRecognizer)(h)) + if h == nil { + return nil + } + + return &QGestureRecognizer{h: (*C.QGestureRecognizer)(h)} } func (this *QGestureRecognizer) Create(target *QObject) *QGesture { - return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_Create(this.h, target.cPointer()))) + return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_Create(this.h, target.cPointer())), nil) } func (this *QGestureRecognizer) Recognize(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag { @@ -81,7 +88,7 @@ func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) { // Delete this object from C++ memory. func (this *QGestureRecognizer) Delete() { - C.QGestureRecognizer_Delete(this.h) + C.QGestureRecognizer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgesturerecognizer.h b/qt6/gen_qgesturerecognizer.h index 43fa2c9c..62ec8d3e 100644 --- a/qt6/gen_qgesturerecognizer.h +++ b/qt6/gen_qgesturerecognizer.h @@ -32,7 +32,7 @@ void QGestureRecognizer_Reset(QGestureRecognizer* self, QGesture* state); int QGestureRecognizer_RegisterRecognizer(QGestureRecognizer* recognizer); void QGestureRecognizer_UnregisterRecognizer(int typeVal); void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecognizer* param1); -void QGestureRecognizer_Delete(QGestureRecognizer* self); +void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qglyphrun.cpp b/qt6/gen_qglyphrun.cpp index 808b7980..1b4fd4fc 100644 --- a/qt6/gen_qglyphrun.cpp +++ b/qt6/gen_qglyphrun.cpp @@ -7,12 +7,14 @@ #include "gen_qglyphrun.h" #include "_cgo_export.h" -QGlyphRun* QGlyphRun_new() { - return new QGlyphRun(); +void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun) { + QGlyphRun* ret = new QGlyphRun(); + *outptr_QGlyphRun = ret; } -QGlyphRun* QGlyphRun_new2(QGlyphRun* other) { - return new QGlyphRun(*other); +void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun) { + QGlyphRun* ret = new QGlyphRun(*other); + *outptr_QGlyphRun = ret; } void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other) { @@ -154,7 +156,11 @@ void QGlyphRun_SetFlag2(QGlyphRun* self, int flag, bool enabled) { self->setFlag(static_cast(flag), enabled); } -void QGlyphRun_Delete(QGlyphRun* self) { - delete self; +void QGlyphRun_Delete(QGlyphRun* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qglyphrun.go b/qt6/gen_qglyphrun.go index 6dc1ad91..e450600b 100644 --- a/qt6/gen_qglyphrun.go +++ b/qt6/gen_qglyphrun.go @@ -24,7 +24,8 @@ const ( ) type QGlyphRun struct { - h *C.QGlyphRun + h *C.QGlyphRun + isSubclass bool } func (this *QGlyphRun) cPointer() *C.QGlyphRun { @@ -41,6 +42,7 @@ func (this *QGlyphRun) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGlyphRun constructs the type using only CGO pointers. func newQGlyphRun(h *C.QGlyphRun) *QGlyphRun { if h == nil { return nil @@ -48,20 +50,33 @@ func newQGlyphRun(h *C.QGlyphRun) *QGlyphRun { return &QGlyphRun{h: h} } +// UnsafeNewQGlyphRun constructs the type using only unsafe pointers. func UnsafeNewQGlyphRun(h unsafe.Pointer) *QGlyphRun { - return newQGlyphRun((*C.QGlyphRun)(h)) + if h == nil { + return nil + } + + return &QGlyphRun{h: (*C.QGlyphRun)(h)} } // NewQGlyphRun constructs a new QGlyphRun object. func NewQGlyphRun() *QGlyphRun { - ret := C.QGlyphRun_new() - return newQGlyphRun(ret) + var outptr_QGlyphRun *C.QGlyphRun = nil + + C.QGlyphRun_new(&outptr_QGlyphRun) + ret := newQGlyphRun(outptr_QGlyphRun) + ret.isSubclass = true + return ret } // NewQGlyphRun2 constructs a new QGlyphRun object. func NewQGlyphRun2(other *QGlyphRun) *QGlyphRun { - ret := C.QGlyphRun_new2(other.cPointer()) - return newQGlyphRun(ret) + var outptr_QGlyphRun *C.QGlyphRun = nil + + C.QGlyphRun_new2(other.cPointer(), &outptr_QGlyphRun) + ret := newQGlyphRun(outptr_QGlyphRun) + ret.isSubclass = true + return ret } func (this *QGlyphRun) OperatorAssign(other *QGlyphRun) { @@ -207,7 +222,7 @@ func (this *QGlyphRun) SetFlag2(flag QGlyphRun__GlyphRunFlag, enabled bool) { // Delete this object from C++ memory. func (this *QGlyphRun) Delete() { - C.QGlyphRun_Delete(this.h) + C.QGlyphRun_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qglyphrun.h b/qt6/gen_qglyphrun.h index 0dd17409..22ab51c0 100644 --- a/qt6/gen_qglyphrun.h +++ b/qt6/gen_qglyphrun.h @@ -26,8 +26,8 @@ typedef struct QRawFont QRawFont; typedef struct QRectF QRectF; #endif -QGlyphRun* QGlyphRun_new(); -QGlyphRun* QGlyphRun_new2(QGlyphRun* other); +void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun); +void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun); void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other); void QGlyphRun_Swap(QGlyphRun* self, QGlyphRun* other); QRawFont* QGlyphRun_RawFont(const QGlyphRun* self); @@ -55,7 +55,7 @@ void QGlyphRun_SetBoundingRect(QGlyphRun* self, QRectF* boundingRect); QRectF* QGlyphRun_BoundingRect(const QGlyphRun* self); bool QGlyphRun_IsEmpty(const QGlyphRun* self); void QGlyphRun_SetFlag2(QGlyphRun* self, int flag, bool enabled); -void QGlyphRun_Delete(QGlyphRun* self); +void QGlyphRun_Delete(QGlyphRun* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsanchorlayout.cpp b/qt6/gen_qgraphicsanchorlayout.cpp index ac3dcc5e..40d556a5 100644 --- a/qt6/gen_qgraphicsanchorlayout.cpp +++ b/qt6/gen_qgraphicsanchorlayout.cpp @@ -1,8 +1,12 @@ +#include #include #include +#include #include #include +#include #include +#include #include #include #include @@ -73,16 +77,259 @@ struct miqt_string QGraphicsAnchor_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGraphicsAnchor_Delete(QGraphicsAnchor* self) { - delete self; +void QGraphicsAnchor_Delete(QGraphicsAnchor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new() { - return new QGraphicsAnchorLayout(); +class MiqtVirtualQGraphicsAnchorLayout : public virtual QGraphicsAnchorLayout { +public: + + MiqtVirtualQGraphicsAnchorLayout(): QGraphicsAnchorLayout() {}; + MiqtVirtualQGraphicsAnchorLayout(QGraphicsLayoutItem* parent): QGraphicsAnchorLayout(parent) {}; + + virtual ~MiqtVirtualQGraphicsAnchorLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveAt = 0; + + // Subclass to allow providing a Go implementation + virtual void removeAt(int index) override { + if (handle__RemoveAt == 0) { + QGraphicsAnchorLayout::removeAt(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsAnchorLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveAt(int index) { + + QGraphicsAnchorLayout::removeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsAnchorLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsAnchorLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsAnchorLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGraphicsAnchorLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsAnchorLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGraphicsAnchorLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int index) const override { + if (handle__ItemAt == 0) { + return QGraphicsAnchorLayout::itemAt(index); + } + + int sigval1 = index; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsAnchorLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGraphicsLayoutItem* virtualbase_ItemAt(int index) const { + + return QGraphicsAnchorLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGraphicsAnchorLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsAnchorLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsAnchorLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsAnchorLayout::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsAnchorLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsAnchorLayout::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsAnchorLayout::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsAnchorLayout_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsAnchorLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsAnchorLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsAnchorLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsAnchorLayout::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WidgetEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void widgetEvent(QEvent* e) override { + if (handle__WidgetEvent == 0) { + QGraphicsAnchorLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsAnchorLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsAnchorLayout::widgetEvent(e); + + } + +}; + +void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(); + *outptr_QGraphicsAnchorLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent) { - return new QGraphicsAnchorLayout(parent); +void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(parent); + *outptr_QGraphicsAnchorLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge) { @@ -147,7 +394,83 @@ void QGraphicsAnchorLayout_AddAnchors3(QGraphicsAnchorLayout* self, QGraphicsLay self->addAnchors(firstItem, secondItem, static_cast(orientations)); } -void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self) { - delete self; +void QGraphicsAnchorLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsAnchorLayout_virtualbase_RemoveAt(void* self, int index) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_RemoveAt(index); +} + +void QGraphicsAnchorLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsAnchorLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsAnchorLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__Count = slot; +} + +int QGraphicsAnchorLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_Count(); +} + +void QGraphicsAnchorLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__ItemAt = slot; +} + +QGraphicsLayoutItem* QGraphicsAnchorLayout_virtualbase_ItemAt(const void* self, int index) { + return ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_ItemAt(index); +} + +void QGraphicsAnchorLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsAnchorLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsAnchorLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsAnchorLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsAnchorLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsAnchorLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsAnchorLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsAnchorLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsAnchorLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsAnchorLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsAnchorLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsAnchorLayout*)(self) )->virtualbase_WidgetEvent(e); +} + +void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsanchorlayout.go b/qt6/gen_qgraphicsanchorlayout.go index f1c73f24..0c66f6f5 100644 --- a/qt6/gen_qgraphicsanchorlayout.go +++ b/qt6/gen_qgraphicsanchorlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsAnchor struct { - h *C.QGraphicsAnchor + h *C.QGraphicsAnchor + isSubclass bool *QObject } @@ -32,15 +34,23 @@ func (this *QGraphicsAnchor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsAnchor(h *C.QGraphicsAnchor) *QGraphicsAnchor { +// newQGraphicsAnchor constructs the type using only CGO pointers. +func newQGraphicsAnchor(h *C.QGraphicsAnchor, h_QObject *C.QObject) *QGraphicsAnchor { if h == nil { return nil } - return &QGraphicsAnchor{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsAnchor{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsAnchor(h unsafe.Pointer) *QGraphicsAnchor { - return newQGraphicsAnchor((*C.QGraphicsAnchor)(h)) +// UnsafeNewQGraphicsAnchor constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsAnchor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsAnchor { + if h == nil { + return nil + } + + return &QGraphicsAnchor{h: (*C.QGraphicsAnchor)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGraphicsAnchor) MetaObject() *QMetaObject { @@ -106,7 +116,7 @@ func QGraphicsAnchor_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGraphicsAnchor) Delete() { - C.QGraphicsAnchor_Delete(this.h) + C.QGraphicsAnchor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -119,7 +129,8 @@ func (this *QGraphicsAnchor) GoGC() { } type QGraphicsAnchorLayout struct { - h *C.QGraphicsAnchorLayout + h *C.QGraphicsAnchorLayout + isSubclass bool *QGraphicsLayout } @@ -137,35 +148,55 @@ func (this *QGraphicsAnchorLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout) *QGraphicsAnchorLayout { +// newQGraphicsAnchorLayout constructs the type using only CGO pointers. +func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsAnchorLayout { if h == nil { return nil } - return &QGraphicsAnchorLayout{h: h, QGraphicsLayout: UnsafeNewQGraphicsLayout(unsafe.Pointer(h))} + return &QGraphicsAnchorLayout{h: h, + QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer) *QGraphicsAnchorLayout { - return newQGraphicsAnchorLayout((*C.QGraphicsAnchorLayout)(h)) +// UnsafeNewQGraphicsAnchorLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsAnchorLayout { + if h == nil { + return nil + } + + return &QGraphicsAnchorLayout{h: (*C.QGraphicsAnchorLayout)(h), + QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } // NewQGraphicsAnchorLayout constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout() *QGraphicsAnchorLayout { - ret := C.QGraphicsAnchorLayout_new() - return newQGraphicsAnchorLayout(ret) + var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsAnchorLayout_new(&outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsAnchorLayout2 constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout2(parent *QGraphicsLayoutItem) *QGraphicsAnchorLayout { - ret := C.QGraphicsAnchorLayout_new2(parent.cPointer()) - return newQGraphicsAnchorLayout(ret) + var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsAnchorLayout_new2(parent.cPointer(), &outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsAnchorLayout) AddAnchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)))) + return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))), nil) } func (this *QGraphicsAnchorLayout) Anchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)))) + return UnsafeNewQGraphicsAnchor(unsafe.Pointer(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))), nil) } func (this *QGraphicsAnchorLayout) AddCornerAnchors(firstItem *QGraphicsLayoutItem, firstCorner Corner, secondItem *QGraphicsLayoutItem, secondCorner Corner) { @@ -220,9 +251,223 @@ func (this *QGraphicsAnchorLayout) AddAnchors3(firstItem *QGraphicsLayoutItem, s C.QGraphicsAnchorLayout_AddAnchors3(this.h, firstItem.cPointer(), secondItem.cPointer(), (C.int)(orientations)) } +func (this *QGraphicsAnchorLayout) callVirtualBase_RemoveAt(index int) { + + C.QGraphicsAnchorLayout_virtualbase_RemoveAt(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QGraphicsAnchorLayout) OnRemoveAt(slot func(super func(index int), index int)) { + C.QGraphicsAnchorLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_RemoveAt +func miqt_exec_callback_QGraphicsAnchorLayout_RemoveAt(self *C.QGraphicsAnchorLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_RemoveAt, slotval1) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsAnchorLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsAnchorLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsAnchorLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_SetGeometry +func miqt_exec_callback_QGraphicsAnchorLayout_SetGeometry(self *C.QGraphicsAnchorLayout, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_Count() int { + + return (int)(C.QGraphicsAnchorLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsAnchorLayout) OnCount(slot func(super func() int) int) { + C.QGraphicsAnchorLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_Count +func miqt_exec_callback_QGraphicsAnchorLayout_Count(self *C.QGraphicsAnchorLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_ItemAt(index int) *QGraphicsLayoutItem { + + return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsAnchorLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGraphicsAnchorLayout) OnItemAt(slot func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) { + C.QGraphicsAnchorLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_ItemAt +func miqt_exec_callback_QGraphicsAnchorLayout_ItemAt(self *C.QGraphicsAnchorLayout, cb C.intptr_t, index C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_Invalidate() { + + C.QGraphicsAnchorLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsAnchorLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsAnchorLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_Invalidate +func miqt_exec_callback_QGraphicsAnchorLayout_Invalidate(self *C.QGraphicsAnchorLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsAnchorLayout_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsAnchorLayout) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsAnchorLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_SizeHint +func miqt_exec_callback_QGraphicsAnchorLayout_SizeHint(self *C.QGraphicsAnchorLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsAnchorLayout_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsAnchorLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsAnchorLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsAnchorLayout_GetContentsMargins(self *C.QGraphicsAnchorLayout, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsAnchorLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsAnchorLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsAnchorLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsAnchorLayout_UpdateGeometry(self *C.QGraphicsAnchorLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsAnchorLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsAnchorLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsAnchorLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsAnchorLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsAnchorLayout_WidgetEvent +func miqt_exec_callback_QGraphicsAnchorLayout_WidgetEvent(self *C.QGraphicsAnchorLayout, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QGraphicsAnchorLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsAnchorLayout) Delete() { - C.QGraphicsAnchorLayout_Delete(this.h) + C.QGraphicsAnchorLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsanchorlayout.h b/qt6/gen_qgraphicsanchorlayout.h index 5d9b5bd2..4bacb3bc 100644 --- a/qt6/gen_qgraphicsanchorlayout.h +++ b/qt6/gen_qgraphicsanchorlayout.h @@ -15,17 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsAnchor; class QGraphicsAnchorLayout; +class QGraphicsLayout; class QGraphicsLayoutItem; class QMetaObject; +class QObject; class QRectF; +class QSizeF; #else +typedef struct QEvent QEvent; typedef struct QGraphicsAnchor QGraphicsAnchor; typedef struct QGraphicsAnchorLayout QGraphicsAnchorLayout; +typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRectF QRectF; +typedef struct QSizeF QSizeF; #endif QMetaObject* QGraphicsAnchor_MetaObject(const QGraphicsAnchor* self); @@ -38,10 +46,10 @@ void QGraphicsAnchor_SetSizePolicy(QGraphicsAnchor* self, int policy); int QGraphicsAnchor_SizePolicy(const QGraphicsAnchor* self); struct miqt_string QGraphicsAnchor_Tr2(const char* s, const char* c); struct miqt_string QGraphicsAnchor_Tr3(const char* s, const char* c, int n); -void QGraphicsAnchor_Delete(QGraphicsAnchor* self); +void QGraphicsAnchor_Delete(QGraphicsAnchor* self, bool isSubclass); -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new(); -QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); QGraphicsAnchor* QGraphicsAnchorLayout_Anchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); void QGraphicsAnchorLayout_AddCornerAnchors(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstCorner, QGraphicsLayoutItem* secondItem, int secondCorner); @@ -56,8 +64,27 @@ void QGraphicsAnchorLayout_SetGeometry(QGraphicsAnchorLayout* self, QRectF* rect int QGraphicsAnchorLayout_Count(const QGraphicsAnchorLayout* self); QGraphicsLayoutItem* QGraphicsAnchorLayout_ItemAt(const QGraphicsAnchorLayout* self, int index); void QGraphicsAnchorLayout_Invalidate(QGraphicsAnchorLayout* self); +QSizeF* QGraphicsAnchorLayout_SizeHint(const QGraphicsAnchorLayout* self, int which, QSizeF* constraint); void QGraphicsAnchorLayout_AddAnchors3(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, QGraphicsLayoutItem* secondItem, int orientations); -void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self); +void QGraphicsAnchorLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsAnchorLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsAnchorLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsAnchorLayout_virtualbase_Count(const void* self); +void QGraphicsAnchorLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsAnchorLayout_virtualbase_ItemAt(const void* self, int index); +void QGraphicsAnchorLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_Invalidate(void* self); +void QGraphicsAnchorLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsAnchorLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsAnchorLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsAnchorLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsAnchorLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsAnchorLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsAnchorLayout_Delete(QGraphicsAnchorLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicseffect.cpp b/qt6/gen_qgraphicseffect.cpp index fa3df196..8f1f7db1 100644 --- a/qt6/gen_qgraphicseffect.cpp +++ b/qt6/gen_qgraphicseffect.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -88,16 +89,110 @@ struct miqt_string QGraphicsEffect_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGraphicsEffect_Delete(QGraphicsEffect* self) { - delete self; +void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new() { - return new QGraphicsColorizeEffect(); +class MiqtVirtualQGraphicsColorizeEffect : public virtual QGraphicsColorizeEffect { +public: + + MiqtVirtualQGraphicsColorizeEffect(): QGraphicsColorizeEffect() {}; + MiqtVirtualQGraphicsColorizeEffect(QObject* parent): QGraphicsColorizeEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsColorizeEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsColorizeEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsColorizeEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsColorizeEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& sourceRect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsColorizeEffect::boundingRectFor(sourceRect); + } + + const QRectF& sourceRect_ret = sourceRect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&sourceRect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsColorizeEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* sourceRect) const { + + return new QRectF(QGraphicsColorizeEffect::boundingRectFor(*sourceRect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsColorizeEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsColorizeEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsColorizeEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(); + *outptr_QGraphicsColorizeEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent) { - return new QGraphicsColorizeEffect(parent); +void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(parent); + *outptr_QGraphicsColorizeEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self) { @@ -141,7 +236,7 @@ void QGraphicsColorizeEffect_ColorChanged(QGraphicsColorizeEffect* self, QColor* } void QGraphicsColorizeEffect_connect_ColorChanged(QGraphicsColorizeEffect* self, intptr_t slot) { - QGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::colorChanged), self, [=](const QColor& color) { + MiqtVirtualQGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::colorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -154,7 +249,7 @@ void QGraphicsColorizeEffect_StrengthChanged(QGraphicsColorizeEffect* self, doub } void QGraphicsColorizeEffect_connect_StrengthChanged(QGraphicsColorizeEffect* self, intptr_t slot) { - QGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::strengthChanged), self, [=](qreal strength) { + MiqtVirtualQGraphicsColorizeEffect::connect(self, static_cast(&QGraphicsColorizeEffect::strengthChanged), self, [=](qreal strength) { qreal strength_ret = strength; double sigval1 = static_cast(strength_ret); miqt_exec_callback_QGraphicsColorizeEffect_StrengthChanged(slot, sigval1); @@ -183,16 +278,134 @@ struct miqt_string QGraphicsColorizeEffect_Tr3(const char* s, const char* c, int return _ms; } -void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self) { - delete self; +void QGraphicsColorizeEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsColorizeEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsColorizeEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsColorizeEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsColorizeEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsColorizeEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsColorizeEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect) { + return ( (const MiqtVirtualQGraphicsColorizeEffect*)(self) )->virtualbase_BoundingRectFor(sourceRect); +} + +void QGraphicsColorizeEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsColorizeEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsColorizeEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsColorizeEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsBlurEffect* QGraphicsBlurEffect_new() { - return new QGraphicsBlurEffect(); +class MiqtVirtualQGraphicsBlurEffect : public virtual QGraphicsBlurEffect { +public: + + MiqtVirtualQGraphicsBlurEffect(): QGraphicsBlurEffect() {}; + MiqtVirtualQGraphicsBlurEffect(QObject* parent): QGraphicsBlurEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsBlurEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& rect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsBlurEffect::boundingRectFor(rect); + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsBlurEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* rect) const { + + return new QRectF(QGraphicsBlurEffect::boundingRectFor(*rect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsBlurEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsBlurEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsBlurEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsBlurEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsBlurEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsBlurEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(); + *outptr_QGraphicsBlurEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent) { - return new QGraphicsBlurEffect(parent); +void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(parent); + *outptr_QGraphicsBlurEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self) { @@ -241,7 +454,7 @@ void QGraphicsBlurEffect_BlurRadiusChanged(QGraphicsBlurEffect* self, double blu } void QGraphicsBlurEffect_connect_BlurRadiusChanged(QGraphicsBlurEffect* self, intptr_t slot) { - QGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurRadiusChanged), self, [=](qreal blurRadius) { + MiqtVirtualQGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurRadiusChanged), self, [=](qreal blurRadius) { qreal blurRadius_ret = blurRadius; double sigval1 = static_cast(blurRadius_ret); miqt_exec_callback_QGraphicsBlurEffect_BlurRadiusChanged(slot, sigval1); @@ -253,7 +466,7 @@ void QGraphicsBlurEffect_BlurHintsChanged(QGraphicsBlurEffect* self, int hints) } void QGraphicsBlurEffect_connect_BlurHintsChanged(QGraphicsBlurEffect* self, intptr_t slot) { - QGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurHintsChanged), self, [=](QGraphicsBlurEffect::BlurHints hints) { + MiqtVirtualQGraphicsBlurEffect::connect(self, static_cast(&QGraphicsBlurEffect::blurHintsChanged), self, [=](QGraphicsBlurEffect::BlurHints hints) { QGraphicsBlurEffect::BlurHints hints_ret = hints; int sigval1 = static_cast(hints_ret); miqt_exec_callback_QGraphicsBlurEffect_BlurHintsChanged(slot, sigval1); @@ -282,16 +495,134 @@ struct miqt_string QGraphicsBlurEffect_Tr3(const char* s, const char* c, int n) return _ms; } -void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self) { - delete self; +void QGraphicsBlurEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsBlurEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsBlurEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect) { + return ( (const MiqtVirtualQGraphicsBlurEffect*)(self) )->virtualbase_BoundingRectFor(rect); +} + +void QGraphicsBlurEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsBlurEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsBlurEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsBlurEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsBlurEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsBlurEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsBlurEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsBlurEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new() { - return new QGraphicsDropShadowEffect(); +class MiqtVirtualQGraphicsDropShadowEffect : public virtual QGraphicsDropShadowEffect { +public: + + MiqtVirtualQGraphicsDropShadowEffect(): QGraphicsDropShadowEffect() {}; + MiqtVirtualQGraphicsDropShadowEffect(QObject* parent): QGraphicsDropShadowEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsDropShadowEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& rect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsDropShadowEffect::boundingRectFor(rect); + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsDropShadowEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* rect) const { + + return new QRectF(QGraphicsDropShadowEffect::boundingRectFor(*rect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsDropShadowEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsDropShadowEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsDropShadowEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsDropShadowEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsDropShadowEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsDropShadowEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(); + *outptr_QGraphicsDropShadowEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent) { - return new QGraphicsDropShadowEffect(parent); +void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(parent); + *outptr_QGraphicsDropShadowEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self) { @@ -373,7 +704,7 @@ void QGraphicsDropShadowEffect_OffsetChanged(QGraphicsDropShadowEffect* self, QP } void QGraphicsDropShadowEffect_connect_OffsetChanged(QGraphicsDropShadowEffect* self, intptr_t slot) { - QGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::offsetChanged), self, [=](const QPointF& offset) { + MiqtVirtualQGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::offsetChanged), self, [=](const QPointF& offset) { const QPointF& offset_ret = offset; // Cast returned reference into pointer QPointF* sigval1 = const_cast(&offset_ret); @@ -386,7 +717,7 @@ void QGraphicsDropShadowEffect_BlurRadiusChanged(QGraphicsDropShadowEffect* self } void QGraphicsDropShadowEffect_connect_BlurRadiusChanged(QGraphicsDropShadowEffect* self, intptr_t slot) { - QGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::blurRadiusChanged), self, [=](qreal blurRadius) { + MiqtVirtualQGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::blurRadiusChanged), self, [=](qreal blurRadius) { qreal blurRadius_ret = blurRadius; double sigval1 = static_cast(blurRadius_ret); miqt_exec_callback_QGraphicsDropShadowEffect_BlurRadiusChanged(slot, sigval1); @@ -398,7 +729,7 @@ void QGraphicsDropShadowEffect_ColorChanged(QGraphicsDropShadowEffect* self, QCo } void QGraphicsDropShadowEffect_connect_ColorChanged(QGraphicsDropShadowEffect* self, intptr_t slot) { - QGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::colorChanged), self, [=](const QColor& color) { + MiqtVirtualQGraphicsDropShadowEffect::connect(self, static_cast(&QGraphicsDropShadowEffect::colorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); @@ -428,16 +759,134 @@ struct miqt_string QGraphicsDropShadowEffect_Tr3(const char* s, const char* c, i return _ms; } -void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self) { - delete self; +void QGraphicsDropShadowEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsDropShadowEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsDropShadowEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect) { + return ( (const MiqtVirtualQGraphicsDropShadowEffect*)(self) )->virtualbase_BoundingRectFor(rect); +} + +void QGraphicsDropShadowEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsDropShadowEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsDropShadowEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsDropShadowEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsDropShadowEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsDropShadowEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsDropShadowEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsDropShadowEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new() { - return new QGraphicsOpacityEffect(); +class MiqtVirtualQGraphicsOpacityEffect : public virtual QGraphicsOpacityEffect { +public: + + MiqtVirtualQGraphicsOpacityEffect(): QGraphicsOpacityEffect() {}; + MiqtVirtualQGraphicsOpacityEffect(QObject* parent): QGraphicsOpacityEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsOpacityEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter) override { + if (handle__Draw == 0) { + QGraphicsOpacityEffect::draw(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsOpacityEffect_Draw(this, handle__Draw, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* painter) { + + QGraphicsOpacityEffect::draw(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRectFor = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRectFor(const QRectF& sourceRect) const override { + if (handle__BoundingRectFor == 0) { + return QGraphicsOpacityEffect::boundingRectFor(sourceRect); + } + + const QRectF& sourceRect_ret = sourceRect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&sourceRect_ret); + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsOpacityEffect_BoundingRectFor(const_cast(this), handle__BoundingRectFor, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRectFor(QRectF* sourceRect) const { + + return new QRectF(QGraphicsOpacityEffect::boundingRectFor(*sourceRect)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SourceChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags) override { + if (handle__SourceChanged == 0) { + QGraphicsOpacityEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsOpacityEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsOpacityEffect::sourceChanged(static_cast(flags)); + + } + +}; + +void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(); + *outptr_QGraphicsOpacityEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent) { - return new QGraphicsOpacityEffect(parent); +void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(parent); + *outptr_QGraphicsOpacityEffect = ret; + *outptr_QGraphicsEffect = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self) { @@ -481,7 +930,7 @@ void QGraphicsOpacityEffect_OpacityChanged(QGraphicsOpacityEffect* self, double } void QGraphicsOpacityEffect_connect_OpacityChanged(QGraphicsOpacityEffect* self, intptr_t slot) { - QGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityChanged), self, [=](qreal opacity) { + MiqtVirtualQGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityChanged), self, [=](qreal opacity) { qreal opacity_ret = opacity; double sigval1 = static_cast(opacity_ret); miqt_exec_callback_QGraphicsOpacityEffect_OpacityChanged(slot, sigval1); @@ -493,7 +942,7 @@ void QGraphicsOpacityEffect_OpacityMaskChanged(QGraphicsOpacityEffect* self, QBr } void QGraphicsOpacityEffect_connect_OpacityMaskChanged(QGraphicsOpacityEffect* self, intptr_t slot) { - QGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityMaskChanged), self, [=](const QBrush& mask) { + MiqtVirtualQGraphicsOpacityEffect::connect(self, static_cast(&QGraphicsOpacityEffect::opacityMaskChanged), self, [=](const QBrush& mask) { const QBrush& mask_ret = mask; // Cast returned reference into pointer QBrush* sigval1 = const_cast(&mask_ret); @@ -523,7 +972,35 @@ struct miqt_string QGraphicsOpacityEffect_Tr3(const char* s, const char* c, int return _ms; } -void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self) { - delete self; +void QGraphicsOpacityEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsOpacityEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsOpacityEffect_virtualbase_Draw(void* self, QPainter* painter) { + ( (MiqtVirtualQGraphicsOpacityEffect*)(self) )->virtualbase_Draw(painter); +} + +void QGraphicsOpacityEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsOpacityEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsOpacityEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect) { + return ( (const MiqtVirtualQGraphicsOpacityEffect*)(self) )->virtualbase_BoundingRectFor(sourceRect); +} + +void QGraphicsOpacityEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsOpacityEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsOpacityEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsOpacityEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicseffect.go b/qt6/gen_qgraphicseffect.go index 3e7f1891..085efda6 100644 --- a/qt6/gen_qgraphicseffect.go +++ b/qt6/gen_qgraphicseffect.go @@ -40,7 +40,8 @@ const ( ) type QGraphicsEffect struct { - h *C.QGraphicsEffect + h *C.QGraphicsEffect + isSubclass bool *QObject } @@ -58,15 +59,23 @@ func (this *QGraphicsEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsEffect(h *C.QGraphicsEffect) *QGraphicsEffect { +// newQGraphicsEffect constructs the type using only CGO pointers. +func newQGraphicsEffect(h *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsEffect { if h == nil { return nil } - return &QGraphicsEffect{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsEffect{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsEffect(h unsafe.Pointer) *QGraphicsEffect { - return newQGraphicsEffect((*C.QGraphicsEffect)(h)) +// UnsafeNewQGraphicsEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsEffect { + if h == nil { + return nil + } + + return &QGraphicsEffect{h: (*C.QGraphicsEffect)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGraphicsEffect) MetaObject() *QMetaObject { @@ -158,7 +167,7 @@ func QGraphicsEffect_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGraphicsEffect) Delete() { - C.QGraphicsEffect_Delete(this.h) + C.QGraphicsEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -171,7 +180,8 @@ func (this *QGraphicsEffect) GoGC() { } type QGraphicsColorizeEffect struct { - h *C.QGraphicsColorizeEffect + h *C.QGraphicsColorizeEffect + isSubclass bool *QGraphicsEffect } @@ -189,27 +199,47 @@ func (this *QGraphicsColorizeEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect) *QGraphicsColorizeEffect { +// newQGraphicsColorizeEffect constructs the type using only CGO pointers. +func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsColorizeEffect { if h == nil { return nil } - return &QGraphicsColorizeEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsColorizeEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer) *QGraphicsColorizeEffect { - return newQGraphicsColorizeEffect((*C.QGraphicsColorizeEffect)(h)) +// UnsafeNewQGraphicsColorizeEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsColorizeEffect { + if h == nil { + return nil + } + + return &QGraphicsColorizeEffect{h: (*C.QGraphicsColorizeEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsColorizeEffect constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect() *QGraphicsColorizeEffect { - ret := C.QGraphicsColorizeEffect_new() - return newQGraphicsColorizeEffect(ret) + var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsColorizeEffect_new(&outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsColorizeEffect2 constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect2(parent *QObject) *QGraphicsColorizeEffect { - ret := C.QGraphicsColorizeEffect_new2(parent.cPointer()) - return newQGraphicsColorizeEffect(ret) + var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsColorizeEffect_new2(parent.cPointer(), &outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsColorizeEffect) MetaObject() *QMetaObject { @@ -312,9 +342,83 @@ func QGraphicsColorizeEffect_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsColorizeEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsColorizeEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsColorizeEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsColorizeEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsColorizeEffect_Draw +func miqt_exec_callback_QGraphicsColorizeEffect_Draw(self *C.QGraphicsColorizeEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsColorizeEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsColorizeEffect) callVirtualBase_BoundingRectFor(sourceRect *QRectF) *QRectF { + + _ret := C.QGraphicsColorizeEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), sourceRect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsColorizeEffect) OnBoundingRectFor(slot func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) { + C.QGraphicsColorizeEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsColorizeEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsColorizeEffect_BoundingRectFor(self *C.QGraphicsColorizeEffect, cb C.intptr_t, sourceRect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(sourceRect)) + + virtualReturn := gofunc((&QGraphicsColorizeEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsColorizeEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsColorizeEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsColorizeEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsColorizeEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsColorizeEffect_SourceChanged +func miqt_exec_callback_QGraphicsColorizeEffect_SourceChanged(self *C.QGraphicsColorizeEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsColorizeEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsColorizeEffect) Delete() { - C.QGraphicsColorizeEffect_Delete(this.h) + C.QGraphicsColorizeEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -327,7 +431,8 @@ func (this *QGraphicsColorizeEffect) GoGC() { } type QGraphicsBlurEffect struct { - h *C.QGraphicsBlurEffect + h *C.QGraphicsBlurEffect + isSubclass bool *QGraphicsEffect } @@ -345,27 +450,47 @@ func (this *QGraphicsBlurEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect) *QGraphicsBlurEffect { +// newQGraphicsBlurEffect constructs the type using only CGO pointers. +func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsBlurEffect { if h == nil { return nil } - return &QGraphicsBlurEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsBlurEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer) *QGraphicsBlurEffect { - return newQGraphicsBlurEffect((*C.QGraphicsBlurEffect)(h)) +// UnsafeNewQGraphicsBlurEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsBlurEffect { + if h == nil { + return nil + } + + return &QGraphicsBlurEffect{h: (*C.QGraphicsBlurEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsBlurEffect constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect() *QGraphicsBlurEffect { - ret := C.QGraphicsBlurEffect_new() - return newQGraphicsBlurEffect(ret) + var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsBlurEffect_new(&outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsBlurEffect2 constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect2(parent *QObject) *QGraphicsBlurEffect { - ret := C.QGraphicsBlurEffect_new2(parent.cPointer()) - return newQGraphicsBlurEffect(ret) + var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsBlurEffect_new2(parent.cPointer(), &outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsBlurEffect) MetaObject() *QMetaObject { @@ -472,9 +597,83 @@ func QGraphicsBlurEffect_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsBlurEffect) callVirtualBase_BoundingRectFor(rect *QRectF) *QRectF { + + _ret := C.QGraphicsBlurEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), rect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsBlurEffect) OnBoundingRectFor(slot func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) { + C.QGraphicsBlurEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsBlurEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsBlurEffect_BoundingRectFor(self *C.QGraphicsBlurEffect, cb C.intptr_t, rect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + virtualReturn := gofunc((&QGraphicsBlurEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsBlurEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsBlurEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsBlurEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsBlurEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsBlurEffect_Draw +func miqt_exec_callback_QGraphicsBlurEffect_Draw(self *C.QGraphicsBlurEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsBlurEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsBlurEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsBlurEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsBlurEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsBlurEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsBlurEffect_SourceChanged +func miqt_exec_callback_QGraphicsBlurEffect_SourceChanged(self *C.QGraphicsBlurEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsBlurEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsBlurEffect) Delete() { - C.QGraphicsBlurEffect_Delete(this.h) + C.QGraphicsBlurEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -487,7 +686,8 @@ func (this *QGraphicsBlurEffect) GoGC() { } type QGraphicsDropShadowEffect struct { - h *C.QGraphicsDropShadowEffect + h *C.QGraphicsDropShadowEffect + isSubclass bool *QGraphicsEffect } @@ -505,27 +705,47 @@ func (this *QGraphicsDropShadowEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect) *QGraphicsDropShadowEffect { +// newQGraphicsDropShadowEffect constructs the type using only CGO pointers. +func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsDropShadowEffect { if h == nil { return nil } - return &QGraphicsDropShadowEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsDropShadowEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer) *QGraphicsDropShadowEffect { - return newQGraphicsDropShadowEffect((*C.QGraphicsDropShadowEffect)(h)) +// UnsafeNewQGraphicsDropShadowEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsDropShadowEffect { + if h == nil { + return nil + } + + return &QGraphicsDropShadowEffect{h: (*C.QGraphicsDropShadowEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsDropShadowEffect constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect() *QGraphicsDropShadowEffect { - ret := C.QGraphicsDropShadowEffect_new() - return newQGraphicsDropShadowEffect(ret) + var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsDropShadowEffect_new(&outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsDropShadowEffect2 constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect2(parent *QObject) *QGraphicsDropShadowEffect { - ret := C.QGraphicsDropShadowEffect_new2(parent.cPointer()) - return newQGraphicsDropShadowEffect(ret) + var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsDropShadowEffect_new2(parent.cPointer(), &outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsDropShadowEffect) MetaObject() *QMetaObject { @@ -690,9 +910,83 @@ func QGraphicsDropShadowEffect_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsDropShadowEffect) callVirtualBase_BoundingRectFor(rect *QRectF) *QRectF { + + _ret := C.QGraphicsDropShadowEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), rect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsDropShadowEffect) OnBoundingRectFor(slot func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) { + C.QGraphicsDropShadowEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsDropShadowEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsDropShadowEffect_BoundingRectFor(self *C.QGraphicsDropShadowEffect, cb C.intptr_t, rect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF) *QRectF, rect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + virtualReturn := gofunc((&QGraphicsDropShadowEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsDropShadowEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsDropShadowEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsDropShadowEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsDropShadowEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsDropShadowEffect_Draw +func miqt_exec_callback_QGraphicsDropShadowEffect_Draw(self *C.QGraphicsDropShadowEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsDropShadowEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsDropShadowEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsDropShadowEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsDropShadowEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsDropShadowEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsDropShadowEffect_SourceChanged +func miqt_exec_callback_QGraphicsDropShadowEffect_SourceChanged(self *C.QGraphicsDropShadowEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsDropShadowEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsDropShadowEffect) Delete() { - C.QGraphicsDropShadowEffect_Delete(this.h) + C.QGraphicsDropShadowEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -705,7 +999,8 @@ func (this *QGraphicsDropShadowEffect) GoGC() { } type QGraphicsOpacityEffect struct { - h *C.QGraphicsOpacityEffect + h *C.QGraphicsOpacityEffect + isSubclass bool *QGraphicsEffect } @@ -723,27 +1018,47 @@ func (this *QGraphicsOpacityEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect) *QGraphicsOpacityEffect { +// newQGraphicsOpacityEffect constructs the type using only CGO pointers. +func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsOpacityEffect { if h == nil { return nil } - return &QGraphicsOpacityEffect{h: h, QGraphicsEffect: UnsafeNewQGraphicsEffect(unsafe.Pointer(h))} + return &QGraphicsOpacityEffect{h: h, + QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } -func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer) *QGraphicsOpacityEffect { - return newQGraphicsOpacityEffect((*C.QGraphicsOpacityEffect)(h)) +// UnsafeNewQGraphicsOpacityEffect constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsOpacityEffect { + if h == nil { + return nil + } + + return &QGraphicsOpacityEffect{h: (*C.QGraphicsOpacityEffect)(h), + QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} } // NewQGraphicsOpacityEffect constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect() *QGraphicsOpacityEffect { - ret := C.QGraphicsOpacityEffect_new() - return newQGraphicsOpacityEffect(ret) + var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsOpacityEffect_new(&outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsOpacityEffect2 constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect2(parent *QObject) *QGraphicsOpacityEffect { - ret := C.QGraphicsOpacityEffect_new2(parent.cPointer()) - return newQGraphicsOpacityEffect(ret) + var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsOpacityEffect_new2(parent.cPointer(), &outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsOpacityEffect) MetaObject() *QMetaObject { @@ -846,9 +1161,83 @@ func QGraphicsOpacityEffect_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsOpacityEffect) callVirtualBase_Draw(painter *QPainter) { + + C.QGraphicsOpacityEffect_virtualbase_Draw(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGraphicsOpacityEffect) OnDraw(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGraphicsOpacityEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsOpacityEffect_Draw +func miqt_exec_callback_QGraphicsOpacityEffect_Draw(self *C.QGraphicsOpacityEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGraphicsOpacityEffect{h: self}).callVirtualBase_Draw, slotval1) + +} + +func (this *QGraphicsOpacityEffect) callVirtualBase_BoundingRectFor(sourceRect *QRectF) *QRectF { + + _ret := C.QGraphicsOpacityEffect_virtualbase_BoundingRectFor(unsafe.Pointer(this.h), sourceRect.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsOpacityEffect) OnBoundingRectFor(slot func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) { + C.QGraphicsOpacityEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsOpacityEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsOpacityEffect_BoundingRectFor(self *C.QGraphicsOpacityEffect, cb C.intptr_t, sourceRect *C.QRectF) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(sourceRect)) + + virtualReturn := gofunc((&QGraphicsOpacityEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsOpacityEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsOpacityEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsOpacityEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsOpacityEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsOpacityEffect_SourceChanged +func miqt_exec_callback_QGraphicsOpacityEffect_SourceChanged(self *C.QGraphicsOpacityEffect, cb C.intptr_t, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsEffect__ChangeFlag)(flags) + + gofunc((&QGraphicsOpacityEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsOpacityEffect) Delete() { - C.QGraphicsOpacityEffect_Delete(this.h) + C.QGraphicsOpacityEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicseffect.h b/qt6/gen_qgraphicseffect.h index dc81ec42..b5e79137 100644 --- a/qt6/gen_qgraphicseffect.h +++ b/qt6/gen_qgraphicseffect.h @@ -24,6 +24,7 @@ class QGraphicsEffect; class QGraphicsOpacityEffect; class QMetaObject; class QObject; +class QPainter; class QPointF; class QRectF; #else @@ -36,6 +37,7 @@ typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsOpacityEffect QGraphicsOpacityEffect; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QPainter QPainter; typedef struct QPointF QPointF; typedef struct QRectF QRectF; #endif @@ -50,12 +52,14 @@ void QGraphicsEffect_SetEnabled(QGraphicsEffect* self, bool enable); void QGraphicsEffect_Update(QGraphicsEffect* self); void QGraphicsEffect_EnabledChanged(QGraphicsEffect* self, bool enabled); void QGraphicsEffect_connect_EnabledChanged(QGraphicsEffect* self, intptr_t slot); +void QGraphicsEffect_Draw(QGraphicsEffect* self, QPainter* painter); +void QGraphicsEffect_SourceChanged(QGraphicsEffect* self, int flags); struct miqt_string QGraphicsEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsEffect_Tr3(const char* s, const char* c, int n); -void QGraphicsEffect_Delete(QGraphicsEffect* self); +void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass); -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new(); -QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent); +void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self); void* QGraphicsColorizeEffect_Metacast(QGraphicsColorizeEffect* self, const char* param1); struct miqt_string QGraphicsColorizeEffect_Tr(const char* s); @@ -67,12 +71,19 @@ void QGraphicsColorizeEffect_ColorChanged(QGraphicsColorizeEffect* self, QColor* void QGraphicsColorizeEffect_connect_ColorChanged(QGraphicsColorizeEffect* self, intptr_t slot); void QGraphicsColorizeEffect_StrengthChanged(QGraphicsColorizeEffect* self, double strength); void QGraphicsColorizeEffect_connect_StrengthChanged(QGraphicsColorizeEffect* self, intptr_t slot); +void QGraphicsColorizeEffect_Draw(QGraphicsColorizeEffect* self, QPainter* painter); struct miqt_string QGraphicsColorizeEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsColorizeEffect_Tr3(const char* s, const char* c, int n); -void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self); +void QGraphicsColorizeEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsColorizeEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsColorizeEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsColorizeEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect); +void QGraphicsColorizeEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsColorizeEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self, bool isSubclass); -QGraphicsBlurEffect* QGraphicsBlurEffect_new(); -QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent); +void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self); void* QGraphicsBlurEffect_Metacast(QGraphicsBlurEffect* self, const char* param1); struct miqt_string QGraphicsBlurEffect_Tr(const char* s); @@ -85,12 +96,19 @@ void QGraphicsBlurEffect_BlurRadiusChanged(QGraphicsBlurEffect* self, double blu void QGraphicsBlurEffect_connect_BlurRadiusChanged(QGraphicsBlurEffect* self, intptr_t slot); void QGraphicsBlurEffect_BlurHintsChanged(QGraphicsBlurEffect* self, int hints); void QGraphicsBlurEffect_connect_BlurHintsChanged(QGraphicsBlurEffect* self, intptr_t slot); +void QGraphicsBlurEffect_Draw(QGraphicsBlurEffect* self, QPainter* painter); struct miqt_string QGraphicsBlurEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsBlurEffect_Tr3(const char* s, const char* c, int n); -void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self); +void QGraphicsBlurEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsBlurEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect); +void QGraphicsBlurEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsBlurEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsBlurEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsBlurEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self, bool isSubclass); -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new(); -QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent); +void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self); void* QGraphicsDropShadowEffect_Metacast(QGraphicsDropShadowEffect* self, const char* param1); struct miqt_string QGraphicsDropShadowEffect_Tr(const char* s); @@ -113,12 +131,19 @@ void QGraphicsDropShadowEffect_BlurRadiusChanged(QGraphicsDropShadowEffect* self void QGraphicsDropShadowEffect_connect_BlurRadiusChanged(QGraphicsDropShadowEffect* self, intptr_t slot); void QGraphicsDropShadowEffect_ColorChanged(QGraphicsDropShadowEffect* self, QColor* color); void QGraphicsDropShadowEffect_connect_ColorChanged(QGraphicsDropShadowEffect* self, intptr_t slot); +void QGraphicsDropShadowEffect_Draw(QGraphicsDropShadowEffect* self, QPainter* painter); struct miqt_string QGraphicsDropShadowEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsDropShadowEffect_Tr3(const char* s, const char* c, int n); -void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self); +void QGraphicsDropShadowEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsDropShadowEffect_virtualbase_BoundingRectFor(const void* self, QRectF* rect); +void QGraphicsDropShadowEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsDropShadowEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsDropShadowEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsDropShadowEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self, bool isSubclass); -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new(); -QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent); +void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self); void* QGraphicsOpacityEffect_Metacast(QGraphicsOpacityEffect* self, const char* param1); struct miqt_string QGraphicsOpacityEffect_Tr(const char* s); @@ -130,9 +155,16 @@ void QGraphicsOpacityEffect_OpacityChanged(QGraphicsOpacityEffect* self, double void QGraphicsOpacityEffect_connect_OpacityChanged(QGraphicsOpacityEffect* self, intptr_t slot); void QGraphicsOpacityEffect_OpacityMaskChanged(QGraphicsOpacityEffect* self, QBrush* mask); void QGraphicsOpacityEffect_connect_OpacityMaskChanged(QGraphicsOpacityEffect* self, intptr_t slot); +void QGraphicsOpacityEffect_Draw(QGraphicsOpacityEffect* self, QPainter* painter); struct miqt_string QGraphicsOpacityEffect_Tr2(const char* s, const char* c); struct miqt_string QGraphicsOpacityEffect_Tr3(const char* s, const char* c, int n); -void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self); +void QGraphicsOpacityEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsOpacityEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsOpacityEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsOpacityEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect); +void QGraphicsOpacityEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsOpacityEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsOpacityEffect_Delete(QGraphicsOpacityEffect* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsgridlayout.cpp b/qt6/gen_qgraphicsgridlayout.cpp index 794c88f4..2cd46db0 100644 --- a/qt6/gen_qgraphicsgridlayout.cpp +++ b/qt6/gen_qgraphicsgridlayout.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -6,12 +8,251 @@ #include "gen_qgraphicsgridlayout.h" #include "_cgo_export.h" -QGraphicsGridLayout* QGraphicsGridLayout_new() { - return new QGraphicsGridLayout(); +class MiqtVirtualQGraphicsGridLayout : public virtual QGraphicsGridLayout { +public: + + MiqtVirtualQGraphicsGridLayout(): QGraphicsGridLayout() {}; + MiqtVirtualQGraphicsGridLayout(QGraphicsLayoutItem* parent): QGraphicsGridLayout(parent) {}; + + virtual ~MiqtVirtualQGraphicsGridLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGraphicsGridLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsGridLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGraphicsGridLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAtWithIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int index) const override { + if (handle__ItemAtWithIndex == 0) { + return QGraphicsGridLayout::itemAt(index); + } + + int sigval1 = index; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsGridLayout_ItemAtWithIndex(const_cast(this), handle__ItemAtWithIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGraphicsLayoutItem* virtualbase_ItemAtWithIndex(int index) const { + + return QGraphicsGridLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveAt = 0; + + // Subclass to allow providing a Go implementation + virtual void removeAt(int index) override { + if (handle__RemoveAt == 0) { + QGraphicsGridLayout::removeAt(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsGridLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveAt(int index) { + + QGraphicsGridLayout::removeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGraphicsGridLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsGridLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsGridLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsGridLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsGridLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsGridLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsGridLayout::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsGridLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsGridLayout::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsGridLayout::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsGridLayout_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsGridLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsGridLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsGridLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsGridLayout::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WidgetEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void widgetEvent(QEvent* e) override { + if (handle__WidgetEvent == 0) { + QGraphicsGridLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsGridLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsGridLayout::widgetEvent(e); + + } + +}; + +void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(); + *outptr_QGraphicsGridLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent) { - return new QGraphicsGridLayout(parent); +void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(parent); + *outptr_QGraphicsGridLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan) { @@ -203,8 +444,8 @@ void QGraphicsGridLayout_SetGeometry(QGraphicsGridLayout* self, QRectF* rect) { self->setGeometry(*rect); } -QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which) { - return new QSizeF(self->sizeHint(static_cast(which))); +QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which, QSizeF* constraint) { + return new QSizeF(self->sizeHint(static_cast(which), *constraint)); } void QGraphicsGridLayout_AddItem6(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int alignment) { @@ -215,11 +456,83 @@ void QGraphicsGridLayout_AddItem4(QGraphicsGridLayout* self, QGraphicsLayoutItem self->addItem(item, static_cast(row), static_cast(column), static_cast(alignment)); } -QSizeF* QGraphicsGridLayout_SizeHint2(const QGraphicsGridLayout* self, int which, QSizeF* constraint) { - return new QSizeF(self->sizeHint(static_cast(which), *constraint)); +void QGraphicsGridLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__Count = slot; +} + +int QGraphicsGridLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_Count(); +} + +void QGraphicsGridLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__ItemAtWithIndex = slot; +} + +QGraphicsLayoutItem* QGraphicsGridLayout_virtualbase_ItemAtWithIndex(const void* self, int index) { + return ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_ItemAtWithIndex(index); +} + +void QGraphicsGridLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsGridLayout_virtualbase_RemoveAt(void* self, int index) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_RemoveAt(index); +} + +void QGraphicsGridLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsGridLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsGridLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsGridLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsGridLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsGridLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsGridLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsGridLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsGridLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsGridLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsGridLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsGridLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsGridLayout*)(self) )->virtualbase_WidgetEvent(e); } -void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self) { - delete self; +void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsgridlayout.go b/qt6/gen_qgraphicsgridlayout.go index d706888e..6ff6d084 100644 --- a/qt6/gen_qgraphicsgridlayout.go +++ b/qt6/gen_qgraphicsgridlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsGridLayout struct { - h *C.QGraphicsGridLayout + h *C.QGraphicsGridLayout + isSubclass bool *QGraphicsLayout } @@ -32,27 +34,47 @@ func (this *QGraphicsGridLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsGridLayout(h *C.QGraphicsGridLayout) *QGraphicsGridLayout { +// newQGraphicsGridLayout constructs the type using only CGO pointers. +func newQGraphicsGridLayout(h *C.QGraphicsGridLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsGridLayout { if h == nil { return nil } - return &QGraphicsGridLayout{h: h, QGraphicsLayout: UnsafeNewQGraphicsLayout(unsafe.Pointer(h))} + return &QGraphicsGridLayout{h: h, + QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer) *QGraphicsGridLayout { - return newQGraphicsGridLayout((*C.QGraphicsGridLayout)(h)) +// UnsafeNewQGraphicsGridLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsGridLayout { + if h == nil { + return nil + } + + return &QGraphicsGridLayout{h: (*C.QGraphicsGridLayout)(h), + QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } // NewQGraphicsGridLayout constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout() *QGraphicsGridLayout { - ret := C.QGraphicsGridLayout_new() - return newQGraphicsGridLayout(ret) + var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsGridLayout_new(&outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsGridLayout2 constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout2(parent *QGraphicsLayoutItem) *QGraphicsGridLayout { - ret := C.QGraphicsGridLayout_new2(parent.cPointer()) - return newQGraphicsGridLayout(ret) + var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsGridLayout_new2(parent.cPointer(), &outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsGridLayout) AddItem(item *QGraphicsLayoutItem, row int, column int, rowSpan int, columnSpan int) { @@ -231,8 +253,8 @@ func (this *QGraphicsGridLayout) SetGeometry(rect *QRectF) { C.QGraphicsGridLayout_SetGeometry(this.h, rect.cPointer()) } -func (this *QGraphicsGridLayout) SizeHint(which SizeHint) *QSizeF { - _ret := C.QGraphicsGridLayout_SizeHint(this.h, (C.int)(which)) +func (this *QGraphicsGridLayout) SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + _ret := C.QGraphicsGridLayout_SizeHint(this.h, (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -246,16 +268,223 @@ func (this *QGraphicsGridLayout) AddItem4(item *QGraphicsLayoutItem, row int, co C.QGraphicsGridLayout_AddItem4(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(alignment)) } -func (this *QGraphicsGridLayout) SizeHint2(which SizeHint, constraint *QSizeF) *QSizeF { - _ret := C.QGraphicsGridLayout_SizeHint2(this.h, (C.int)(which), constraint.cPointer()) +func (this *QGraphicsGridLayout) callVirtualBase_Count() int { + + return (int)(C.QGraphicsGridLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsGridLayout) OnCount(slot func(super func() int) int) { + C.QGraphicsGridLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_Count +func miqt_exec_callback_QGraphicsGridLayout_Count(self *C.QGraphicsGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_ItemAtWithIndex(index int) *QGraphicsLayoutItem { + + return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsGridLayout_virtualbase_ItemAtWithIndex(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGraphicsGridLayout) OnItemAtWithIndex(slot func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) { + C.QGraphicsGridLayout_override_virtual_ItemAtWithIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_ItemAtWithIndex +func miqt_exec_callback_QGraphicsGridLayout_ItemAtWithIndex(self *C.QGraphicsGridLayout, cb C.intptr_t, index C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_ItemAtWithIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsGridLayout) callVirtualBase_RemoveAt(index int) { + + C.QGraphicsGridLayout_virtualbase_RemoveAt(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QGraphicsGridLayout) OnRemoveAt(slot func(super func(index int), index int)) { + C.QGraphicsGridLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_RemoveAt +func miqt_exec_callback_QGraphicsGridLayout_RemoveAt(self *C.QGraphicsGridLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_RemoveAt, slotval1) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_Invalidate() { + + C.QGraphicsGridLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsGridLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsGridLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_Invalidate +func miqt_exec_callback_QGraphicsGridLayout_Invalidate(self *C.QGraphicsGridLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsGridLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsGridLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsGridLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_SetGeometry +func miqt_exec_callback_QGraphicsGridLayout_SetGeometry(self *C.QGraphicsGridLayout, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsGridLayout_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsGridLayout) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsGridLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_SizeHint +func miqt_exec_callback_QGraphicsGridLayout_SizeHint(self *C.QGraphicsGridLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsGridLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsGridLayout_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsGridLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsGridLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsGridLayout_GetContentsMargins(self *C.QGraphicsGridLayout, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsGridLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsGridLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsGridLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsGridLayout_UpdateGeometry(self *C.QGraphicsGridLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsGridLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsGridLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsGridLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsGridLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsGridLayout_WidgetEvent +func miqt_exec_callback_QGraphicsGridLayout_WidgetEvent(self *C.QGraphicsGridLayout, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QGraphicsGridLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + } // Delete this object from C++ memory. func (this *QGraphicsGridLayout) Delete() { - C.QGraphicsGridLayout_Delete(this.h) + C.QGraphicsGridLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsgridlayout.h b/qt6/gen_qgraphicsgridlayout.h index 1d9c4c61..f577b62c 100644 --- a/qt6/gen_qgraphicsgridlayout.h +++ b/qt6/gen_qgraphicsgridlayout.h @@ -15,19 +15,23 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsGridLayout; +class QGraphicsLayout; class QGraphicsLayoutItem; class QRectF; class QSizeF; #else +typedef struct QEvent QEvent; typedef struct QGraphicsGridLayout QGraphicsGridLayout; +typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -QGraphicsGridLayout* QGraphicsGridLayout_new(); -QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan); void QGraphicsGridLayout_AddItem2(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column); void QGraphicsGridLayout_SetHorizontalSpacing(QGraphicsGridLayout* self, double spacing); @@ -72,11 +76,28 @@ void QGraphicsGridLayout_RemoveAt(QGraphicsGridLayout* self, int index); void QGraphicsGridLayout_RemoveItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item); void QGraphicsGridLayout_Invalidate(QGraphicsGridLayout* self); void QGraphicsGridLayout_SetGeometry(QGraphicsGridLayout* self, QRectF* rect); -QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which); +QSizeF* QGraphicsGridLayout_SizeHint(const QGraphicsGridLayout* self, int which, QSizeF* constraint); void QGraphicsGridLayout_AddItem6(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int alignment); void QGraphicsGridLayout_AddItem4(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int alignment); -QSizeF* QGraphicsGridLayout_SizeHint2(const QGraphicsGridLayout* self, int which, QSizeF* constraint); -void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self); +void QGraphicsGridLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsGridLayout_virtualbase_Count(const void* self); +void QGraphicsGridLayout_override_virtual_ItemAtWithIndex(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsGridLayout_virtualbase_ItemAtWithIndex(const void* self, int index); +void QGraphicsGridLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsGridLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_Invalidate(void* self); +void QGraphicsGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsGridLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsGridLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsGridLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsGridLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsGridLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsGridLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsGridLayout_Delete(QGraphicsGridLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsitem.cpp b/qt6/gen_qgraphicsitem.cpp index 56a91dba..35c4181e 100644 --- a/qt6/gen_qgraphicsitem.cpp +++ b/qt6/gen_qgraphicsitem.cpp @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include #include #include @@ -14,13 +16,21 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include +#include #include #include #include @@ -513,12 +523,12 @@ bool QGraphicsItem_Contains(const QGraphicsItem* self, QPointF* point) { return self->contains(*point); } -bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other) { - return self->collidesWithItem(other); +bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other, int mode) { + return self->collidesWithItem(other, static_cast(mode)); } -bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path) { - return self->collidesWithPath(*path); +bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path, int mode) { + return self->collidesWithPath(*path, static_cast(mode)); } struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems(const QGraphicsItem* self) { @@ -563,8 +573,8 @@ void QGraphicsItem_SetBoundingRegionGranularity(QGraphicsItem* self, double gran self->setBoundingRegionGranularity(static_cast(granularity)); } -void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } void QGraphicsItem_Update(QGraphicsItem* self) { @@ -780,14 +790,6 @@ void QGraphicsItem_SetTransform2(QGraphicsItem* self, QTransform* matrix, bool c self->setTransform(*matrix, combine); } -bool QGraphicsItem_CollidesWithItem2(const QGraphicsItem* self, QGraphicsItem* other, int mode) { - return self->collidesWithItem(other, static_cast(mode)); -} - -bool QGraphicsItem_CollidesWithPath2(const QGraphicsItem* self, QPainterPath* path, int mode) { - return self->collidesWithPath(*path, static_cast(mode)); -} - struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems1(const QGraphicsItem* self, int mode) { QList _ret = self->collidingItems(static_cast(mode)); // Convert QList<> from C++ memory to manually-managed C memory @@ -805,10 +807,6 @@ bool QGraphicsItem_IsObscured1(const QGraphicsItem* self, QRectF* rect) { return self->isObscured(*rect); } -void QGraphicsItem_Paint3(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} - void QGraphicsItem_Update1(QGraphicsItem* self, QRectF* rect) { self->update(*rect); } @@ -817,8 +815,12 @@ void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* re self->scroll(static_cast(dx), static_cast(dy), *rect); } -void QGraphicsItem_Delete(QGraphicsItem* self) { - delete self; +void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self) { @@ -994,8 +996,12 @@ void QGraphicsObject_GrabGesture2(QGraphicsObject* self, int typeVal, int flags) self->grabGesture(static_cast(typeVal), static_cast(flags)); } -void QGraphicsObject_Delete(QGraphicsObject* self) { - delete self; +void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self) { @@ -1022,795 +1028,6954 @@ QPainterPath* QAbstractGraphicsShapeItem_OpaqueArea(const QAbstractGraphicsShape return new QPainterPath(self->opaqueArea()); } -void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self) { - delete self; -} - -QGraphicsPathItem* QGraphicsPathItem_new() { - return new QGraphicsPathItem(); -} - -QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path) { - return new QGraphicsPathItem(*path); +void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent) { - return new QGraphicsPathItem(parent); -} +class MiqtVirtualQGraphicsPathItem : public virtual QGraphicsPathItem { +public: -QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent) { - return new QGraphicsPathItem(*path, parent); -} + MiqtVirtualQGraphicsPathItem(): QGraphicsPathItem() {}; + MiqtVirtualQGraphicsPathItem(const QPainterPath& path): QGraphicsPathItem(path) {}; + MiqtVirtualQGraphicsPathItem(QGraphicsItem* parent): QGraphicsPathItem(parent) {}; + MiqtVirtualQGraphicsPathItem(const QPainterPath& path, QGraphicsItem* parent): QGraphicsPathItem(path, parent) {}; -QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self) { - return new QPainterPath(self->path()); -} + virtual ~MiqtVirtualQGraphicsPathItem() = default; -void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path) { - self->setPath(*path); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; -QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self) { - return new QRectF(self->boundingRect()); -} + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsPathItem::boundingRect(); + } + -QPainterPath* QGraphicsPathItem_Shape(const QGraphicsPathItem* self) { - return new QPainterPath(self->shape()); -} + QRectF* callback_return_value = miqt_exec_callback_QGraphicsPathItem_BoundingRect(const_cast(this), handle__BoundingRect); -bool QGraphicsPathItem_Contains(const QGraphicsPathItem* self, QPointF* point) { - return self->contains(*point); -} + return *callback_return_value; + } -void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { -bool QGraphicsPathItem_IsObscuredBy(const QGraphicsPathItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + return new QRectF(QGraphicsPathItem::boundingRect()); -QPainterPath* QGraphicsPathItem_OpaqueArea(const QGraphicsPathItem* self) { - return new QPainterPath(self->opaqueArea()); -} + } -int QGraphicsPathItem_Type(const QGraphicsPathItem* self) { - return self->type(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; -void QGraphicsPathItem_Paint3(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsPathItem::shape(); + } + -void QGraphicsPathItem_Delete(QGraphicsPathItem* self) { - delete self; -} + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPathItem_Shape(const_cast(this), handle__Shape); -QGraphicsRectItem* QGraphicsRectItem_new() { - return new QGraphicsRectItem(); -} + return *callback_return_value; + } -QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect) { - return new QGraphicsRectItem(*rect); -} + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { -QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h) { - return new QGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + return new QPainterPath(QGraphicsPathItem::shape()); -QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent) { - return new QGraphicsRectItem(parent); -} + } -QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent) { - return new QGraphicsRectItem(*rect, parent); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; -QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { - return new QGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); -} + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsPathItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); -QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self) { - return new QRectF(self->rect()); -} + bool callback_return_value = miqt_exec_callback_QGraphicsPathItem_Contains(const_cast(this), handle__Contains, sigval1); -void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect) { - self->setRect(*rect); -} + return callback_return_value; + } -void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h) { - self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { -QRectF* QGraphicsRectItem_BoundingRect(const QGraphicsRectItem* self) { - return new QRectF(self->boundingRect()); -} + return QGraphicsPathItem::contains(*point); -QPainterPath* QGraphicsRectItem_Shape(const QGraphicsRectItem* self) { - return new QPainterPath(self->shape()); -} + } -bool QGraphicsRectItem_Contains(const QGraphicsRectItem* self, QPointF* point) { - return self->contains(*point); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; -void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsPathItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; -bool QGraphicsRectItem_IsObscuredBy(const QGraphicsRectItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + miqt_exec_callback_QGraphicsPathItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); -QPainterPath* QGraphicsRectItem_OpaqueArea(const QGraphicsRectItem* self) { - return new QPainterPath(self->opaqueArea()); -} + + } -int QGraphicsRectItem_Type(const QGraphicsRectItem* self) { - return self->type(); -} + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { -void QGraphicsRectItem_Paint3(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + QGraphicsPathItem::paint(painter, option, widget); -void QGraphicsRectItem_Delete(QGraphicsRectItem* self) { - delete self; -} + } -QGraphicsEllipseItem* QGraphicsEllipseItem_new() { - return new QGraphicsEllipseItem(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; -QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect) { - return new QGraphicsEllipseItem(*rect); -} + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsPathItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; -QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h) { - return new QGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + bool callback_return_value = miqt_exec_callback_QGraphicsPathItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); -QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent) { - return new QGraphicsEllipseItem(parent); -} + return callback_return_value; + } -QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent) { - return new QGraphicsEllipseItem(*rect, parent); -} + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { -QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { - return new QGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); -} + return QGraphicsPathItem::isObscuredBy(item); -QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self) { - return new QRectF(self->rect()); -} + } -void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect) { - self->setRect(*rect); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; -void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h) { - self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); -} + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsPathItem::opaqueArea(); + } + -int QGraphicsEllipseItem_StartAngle(const QGraphicsEllipseItem* self) { - return self->startAngle(); -} + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPathItem_OpaqueArea(const_cast(this), handle__OpaqueArea); -void QGraphicsEllipseItem_SetStartAngle(QGraphicsEllipseItem* self, int angle) { - self->setStartAngle(static_cast(angle)); -} + return *callback_return_value; + } -int QGraphicsEllipseItem_SpanAngle(const QGraphicsEllipseItem* self) { - return self->spanAngle(); -} + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { -void QGraphicsEllipseItem_SetSpanAngle(QGraphicsEllipseItem* self, int angle) { - self->setSpanAngle(static_cast(angle)); -} + return new QPainterPath(QGraphicsPathItem::opaqueArea()); -QRectF* QGraphicsEllipseItem_BoundingRect(const QGraphicsEllipseItem* self) { - return new QRectF(self->boundingRect()); -} + } -QPainterPath* QGraphicsEllipseItem_Shape(const QGraphicsEllipseItem* self) { - return new QPainterPath(self->shape()); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; -bool QGraphicsEllipseItem_Contains(const QGraphicsEllipseItem* self, QPointF* point) { - return self->contains(*point); -} + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsPathItem::type(); + } + -void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + int callback_return_value = miqt_exec_callback_QGraphicsPathItem_Type(const_cast(this), handle__Type); -bool QGraphicsEllipseItem_IsObscuredBy(const QGraphicsEllipseItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + return static_cast(callback_return_value); + } -QPainterPath* QGraphicsEllipseItem_OpaqueArea(const QGraphicsEllipseItem* self) { - return new QPainterPath(self->opaqueArea()); -} + // Wrapper to allow calling protected method + int virtualbase_Type() const { -int QGraphicsEllipseItem_Type(const QGraphicsEllipseItem* self) { - return self->type(); -} + return QGraphicsPathItem::type(); -void QGraphicsEllipseItem_Paint3(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + } -void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self) { - delete self; -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; -QGraphicsPolygonItem* QGraphicsPolygonItem_new() { - return new QGraphicsPolygonItem(); -} + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsPathItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); -QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent) { - return new QGraphicsPolygonItem(parent); -} + bool callback_return_value = miqt_exec_callback_QGraphicsPathItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); -int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self) { - Qt::FillRule _ret = self->fillRule(); - return static_cast(_ret); -} + return callback_return_value; + } -void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule) { - self->setFillRule(static_cast(rule)); -} + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { -QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self) { - return new QRectF(self->boundingRect()); -} + return QGraphicsPathItem::supportsExtension(static_cast(extension)); -QPainterPath* QGraphicsPolygonItem_Shape(const QGraphicsPolygonItem* self) { - return new QPainterPath(self->shape()); -} + } -bool QGraphicsPolygonItem_Contains(const QGraphicsPolygonItem* self, QPointF* point) { - return self->contains(*point); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsPathItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsPathItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } -void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); -} + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { -bool QGraphicsPolygonItem_IsObscuredBy(const QGraphicsPolygonItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); -} + QGraphicsPathItem::setExtension(static_cast(extension), *variant); -QPainterPath* QGraphicsPolygonItem_OpaqueArea(const QGraphicsPolygonItem* self) { - return new QPainterPath(self->opaqueArea()); -} + } -int QGraphicsPolygonItem_Type(const QGraphicsPolygonItem* self) { - return self->type(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; -void QGraphicsPolygonItem_Paint3(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); -} + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsPathItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); -void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self) { - delete self; -} + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPathItem_Extension(const_cast(this), handle__Extension, sigval1); -QGraphicsLineItem* QGraphicsLineItem_new() { - return new QGraphicsLineItem(); -} + return *callback_return_value; + } -QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line) { - return new QGraphicsLineItem(*line); -} + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { -QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2) { - return new QGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); -} + return new QVariant(QGraphicsPathItem::extension(*variant)); -QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent) { - return new QGraphicsLineItem(parent); -} + } -QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent) { - return new QGraphicsLineItem(*line, parent); -} +}; -QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent) { - return new QGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); +void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self) { - return new QPen(self->pen()); +void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen) { - self->setPen(*pen); +void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(parent); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self) { - return new QLineF(self->line()); +void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path, parent); + *outptr_QGraphicsPathItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -void QGraphicsLineItem_SetLine(QGraphicsLineItem* self, QLineF* line) { - self->setLine(*line); +QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self) { + return new QPainterPath(self->path()); } -void QGraphicsLineItem_SetLine2(QGraphicsLineItem* self, double x1, double y1, double x2, double y2) { - self->setLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path) { + self->setPath(*path); } -QRectF* QGraphicsLineItem_BoundingRect(const QGraphicsLineItem* self) { +QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self) { return new QRectF(self->boundingRect()); } -QPainterPath* QGraphicsLineItem_Shape(const QGraphicsLineItem* self) { +QPainterPath* QGraphicsPathItem_Shape(const QGraphicsPathItem* self) { return new QPainterPath(self->shape()); } -bool QGraphicsLineItem_Contains(const QGraphicsLineItem* self, QPointF* point) { +bool QGraphicsPathItem_Contains(const QGraphicsPathItem* self, QPointF* point) { return self->contains(*point); } -void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } -bool QGraphicsLineItem_IsObscuredBy(const QGraphicsLineItem* self, QGraphicsItem* item) { +bool QGraphicsPathItem_IsObscuredBy(const QGraphicsPathItem* self, QGraphicsItem* item) { return self->isObscuredBy(item); } -QPainterPath* QGraphicsLineItem_OpaqueArea(const QGraphicsLineItem* self) { +QPainterPath* QGraphicsPathItem_OpaqueArea(const QGraphicsPathItem* self) { return new QPainterPath(self->opaqueArea()); } -int QGraphicsLineItem_Type(const QGraphicsLineItem* self) { +int QGraphicsPathItem_Type(const QGraphicsPathItem* self) { return self->type(); } -void QGraphicsLineItem_Paint3(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsPathItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__BoundingRect = slot; } -void QGraphicsLineItem_Delete(QGraphicsLineItem* self) { - delete self; +QRectF* QGraphicsPathItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_BoundingRect(); } -QGraphicsPixmapItem* QGraphicsPixmapItem_new() { - return new QGraphicsPixmapItem(); +void QGraphicsPathItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Shape = slot; } -QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap) { - return new QGraphicsPixmapItem(*pixmap); +QPainterPath* QGraphicsPathItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Shape(); } -QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent) { - return new QGraphicsPixmapItem(parent); +void QGraphicsPathItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Contains = slot; } -QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent) { - return new QGraphicsPixmapItem(*pixmap, parent); +bool QGraphicsPathItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Contains(point); } -QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self) { - return new QPixmap(self->pixmap()); +void QGraphicsPathItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Paint = slot; } -void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap) { - self->setPixmap(*pixmap); +void QGraphicsPathItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Paint(painter, option, widget); } -int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self) { - Qt::TransformationMode _ret = self->transformationMode(); - return static_cast(_ret); +void QGraphicsPathItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__IsObscuredBy = slot; } -void QGraphicsPixmapItem_SetTransformationMode(QGraphicsPixmapItem* self, int mode) { - self->setTransformationMode(static_cast(mode)); +bool QGraphicsPathItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_IsObscuredBy(item); } -QPointF* QGraphicsPixmapItem_Offset(const QGraphicsPixmapItem* self) { - return new QPointF(self->offset()); +void QGraphicsPathItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__OpaqueArea = slot; } -void QGraphicsPixmapItem_SetOffset(QGraphicsPixmapItem* self, QPointF* offset) { - self->setOffset(*offset); +QPainterPath* QGraphicsPathItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_OpaqueArea(); } -void QGraphicsPixmapItem_SetOffset2(QGraphicsPixmapItem* self, double x, double y) { - self->setOffset(static_cast(x), static_cast(y)); +void QGraphicsPathItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Type = slot; } -QRectF* QGraphicsPixmapItem_BoundingRect(const QGraphicsPixmapItem* self) { - return new QRectF(self->boundingRect()); +int QGraphicsPathItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Type(); } -QPainterPath* QGraphicsPixmapItem_Shape(const QGraphicsPixmapItem* self) { - return new QPainterPath(self->shape()); +void QGraphicsPathItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__SupportsExtension = slot; } -bool QGraphicsPixmapItem_Contains(const QGraphicsPixmapItem* self, QPointF* point) { - return self->contains(*point); +bool QGraphicsPathItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_SupportsExtension(extension); } -void QGraphicsPixmapItem_Paint(QGraphicsPixmapItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsPathItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__SetExtension = slot; } -bool QGraphicsPixmapItem_IsObscuredBy(const QGraphicsPixmapItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsPathItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_SetExtension(extension, variant); } -QPainterPath* QGraphicsPixmapItem_OpaqueArea(const QGraphicsPixmapItem* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsPathItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPathItem*)(self) )->handle__Extension = slot; } -int QGraphicsPixmapItem_Type(const QGraphicsPixmapItem* self) { - return self->type(); +QVariant* QGraphicsPathItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsPathItem*)(self) )->virtualbase_Extension(variant); } -int QGraphicsPixmapItem_ShapeMode(const QGraphicsPixmapItem* self) { - QGraphicsPixmapItem::ShapeMode _ret = self->shapeMode(); - return static_cast(_ret); +void QGraphicsPathItem_Delete(QGraphicsPathItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QGraphicsPixmapItem_SetShapeMode(QGraphicsPixmapItem* self, int mode) { - self->setShapeMode(static_cast(mode)); -} +class MiqtVirtualQGraphicsRectItem : public virtual QGraphicsRectItem { +public: -void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self) { - delete self; -} + MiqtVirtualQGraphicsRectItem(): QGraphicsRectItem() {}; + MiqtVirtualQGraphicsRectItem(const QRectF& rect): QGraphicsRectItem(rect) {}; + MiqtVirtualQGraphicsRectItem(qreal x, qreal y, qreal w, qreal h): QGraphicsRectItem(x, y, w, h) {}; + MiqtVirtualQGraphicsRectItem(QGraphicsItem* parent): QGraphicsRectItem(parent) {}; + MiqtVirtualQGraphicsRectItem(const QRectF& rect, QGraphicsItem* parent): QGraphicsRectItem(rect, parent) {}; + MiqtVirtualQGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent): QGraphicsRectItem(x, y, w, h, parent) {}; -QGraphicsTextItem* QGraphicsTextItem_new() { - return new QGraphicsTextItem(); + virtual ~MiqtVirtualQGraphicsRectItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsRectItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsRectItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsRectItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsRectItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsRectItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsRectItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsRectItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsRectItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsRectItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsRectItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsRectItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsRectItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsRectItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsRectItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsRectItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsRectItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsRectItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsRectItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsRectItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsRectItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsRectItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsRectItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsRectItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsRectItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsRectItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsRectItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsRectItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsRectItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsRectItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsRectItem::extension(*variant)); + + } + +}; + +void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(parent); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect, parent); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); + *outptr_QGraphicsRectItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self) { + return new QRectF(self->rect()); +} + +void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect) { + self->setRect(*rect); +} + +void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h) { + self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); +} + +QRectF* QGraphicsRectItem_BoundingRect(const QGraphicsRectItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsRectItem_Shape(const QGraphicsRectItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsRectItem_Contains(const QGraphicsRectItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsRectItem_IsObscuredBy(const QGraphicsRectItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsRectItem_OpaqueArea(const QGraphicsRectItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsRectItem_Type(const QGraphicsRectItem* self) { + return self->type(); +} + +void QGraphicsRectItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsRectItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsRectItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsRectItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsRectItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsRectItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsRectItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsRectItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsRectItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsRectItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsRectItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsRectItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsRectItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Type = slot; +} + +int QGraphicsRectItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsRectItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsRectItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsRectItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsRectItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsRectItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRectItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsRectItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsRectItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsRectItem_Delete(QGraphicsRectItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsEllipseItem : public virtual QGraphicsEllipseItem { +public: + + MiqtVirtualQGraphicsEllipseItem(): QGraphicsEllipseItem() {}; + MiqtVirtualQGraphicsEllipseItem(const QRectF& rect): QGraphicsEllipseItem(rect) {}; + MiqtVirtualQGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h): QGraphicsEllipseItem(x, y, w, h) {}; + MiqtVirtualQGraphicsEllipseItem(QGraphicsItem* parent): QGraphicsEllipseItem(parent) {}; + MiqtVirtualQGraphicsEllipseItem(const QRectF& rect, QGraphicsItem* parent): QGraphicsEllipseItem(rect, parent) {}; + MiqtVirtualQGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent): QGraphicsEllipseItem(x, y, w, h, parent) {}; + + virtual ~MiqtVirtualQGraphicsEllipseItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsEllipseItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsEllipseItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsEllipseItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsEllipseItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsEllipseItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsEllipseItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsEllipseItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsEllipseItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsEllipseItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsEllipseItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsEllipseItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsEllipseItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsEllipseItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsEllipseItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsEllipseItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsEllipseItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsEllipseItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsEllipseItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsEllipseItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsEllipseItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsEllipseItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsEllipseItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsEllipseItem::extension(*variant)); + + } + +}; + +void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(parent); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect, parent); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); + *outptr_QGraphicsEllipseItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self) { + return new QRectF(self->rect()); +} + +void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect) { + self->setRect(*rect); +} + +void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h) { + self->setRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); +} + +int QGraphicsEllipseItem_StartAngle(const QGraphicsEllipseItem* self) { + return self->startAngle(); +} + +void QGraphicsEllipseItem_SetStartAngle(QGraphicsEllipseItem* self, int angle) { + self->setStartAngle(static_cast(angle)); +} + +int QGraphicsEllipseItem_SpanAngle(const QGraphicsEllipseItem* self) { + return self->spanAngle(); +} + +void QGraphicsEllipseItem_SetSpanAngle(QGraphicsEllipseItem* self, int angle) { + self->setSpanAngle(static_cast(angle)); +} + +QRectF* QGraphicsEllipseItem_BoundingRect(const QGraphicsEllipseItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsEllipseItem_Shape(const QGraphicsEllipseItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsEllipseItem_Contains(const QGraphicsEllipseItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsEllipseItem_IsObscuredBy(const QGraphicsEllipseItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsEllipseItem_OpaqueArea(const QGraphicsEllipseItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsEllipseItem_Type(const QGraphicsEllipseItem* self) { + return self->type(); +} + +void QGraphicsEllipseItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsEllipseItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsEllipseItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsEllipseItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsEllipseItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsEllipseItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsEllipseItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsEllipseItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsEllipseItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsEllipseItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsEllipseItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsEllipseItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsEllipseItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Type = slot; +} + +int QGraphicsEllipseItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsEllipseItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsEllipseItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsEllipseItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsEllipseItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsEllipseItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEllipseItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsEllipseItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsEllipseItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsPolygonItem : public virtual QGraphicsPolygonItem { +public: + + MiqtVirtualQGraphicsPolygonItem(): QGraphicsPolygonItem() {}; + MiqtVirtualQGraphicsPolygonItem(QGraphicsItem* parent): QGraphicsPolygonItem(parent) {}; + + virtual ~MiqtVirtualQGraphicsPolygonItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsPolygonItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsPolygonItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsPolygonItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsPolygonItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsPolygonItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsPolygonItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsPolygonItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsPolygonItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsPolygonItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsPolygonItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsPolygonItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsPolygonItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsPolygonItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsPolygonItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsPolygonItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsPolygonItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsPolygonItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsPolygonItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsPolygonItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsPolygonItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsPolygonItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPolygonItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsPolygonItem::extension(*variant)); + + } + +}; + +void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(); + *outptr_QGraphicsPolygonItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(parent); + *outptr_QGraphicsPolygonItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self) { + Qt::FillRule _ret = self->fillRule(); + return static_cast(_ret); +} + +void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule) { + self->setFillRule(static_cast(rule)); +} + +QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsPolygonItem_Shape(const QGraphicsPolygonItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsPolygonItem_Contains(const QGraphicsPolygonItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsPolygonItem_IsObscuredBy(const QGraphicsPolygonItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsPolygonItem_OpaqueArea(const QGraphicsPolygonItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsPolygonItem_Type(const QGraphicsPolygonItem* self) { + return self->type(); +} + +void QGraphicsPolygonItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsPolygonItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsPolygonItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsPolygonItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsPolygonItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsPolygonItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsPolygonItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsPolygonItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsPolygonItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsPolygonItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsPolygonItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsPolygonItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsPolygonItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Type = slot; +} + +int QGraphicsPolygonItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsPolygonItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsPolygonItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsPolygonItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsPolygonItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsPolygonItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPolygonItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsPolygonItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsPolygonItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsLineItem : public virtual QGraphicsLineItem { +public: + + MiqtVirtualQGraphicsLineItem(): QGraphicsLineItem() {}; + MiqtVirtualQGraphicsLineItem(const QLineF& line): QGraphicsLineItem(line) {}; + MiqtVirtualQGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2): QGraphicsLineItem(x1, y1, x2, y2) {}; + MiqtVirtualQGraphicsLineItem(QGraphicsItem* parent): QGraphicsLineItem(parent) {}; + MiqtVirtualQGraphicsLineItem(const QLineF& line, QGraphicsItem* parent): QGraphicsLineItem(line, parent) {}; + MiqtVirtualQGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem* parent): QGraphicsLineItem(x1, y1, x2, y2, parent) {}; + + virtual ~MiqtVirtualQGraphicsLineItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsLineItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsLineItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsLineItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsLineItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsLineItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsLineItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsLineItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsLineItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsLineItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsLineItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsLineItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsLineItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsLineItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsLineItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsLineItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsLineItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsLineItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsLineItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsLineItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsLineItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsLineItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsLineItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsLineItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsLineItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsLineItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsLineItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsLineItem::extension(*variant)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance(int phase) override { + if (handle__Advance == 0) { + QGraphicsLineItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsLineItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsLineItem::advance(static_cast(phase)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithItem = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithItem == 0) { + return QGraphicsLineItem::collidesWithItem(other, mode); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) other; + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_CollidesWithItem(const_cast(this), handle__CollidesWithItem, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithItem(QGraphicsItem* other, int mode) const { + + return QGraphicsLineItem::collidesWithItem(other, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithPath = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithPath == 0) { + return QGraphicsLineItem::collidesWithPath(path, mode); + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_CollidesWithPath(const_cast(this), handle__CollidesWithPath, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithPath(QPainterPath* path, int mode) const { + + return QGraphicsLineItem::collidesWithPath(*path, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override { + if (handle__SceneEventFilter == 0) { + return QGraphicsLineItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsLineItem::sceneEventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsLineItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsLineItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsLineItem::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsLineItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsLineItem::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsLineItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsLineItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsLineItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsLineItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsLineItem::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsLineItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsLineItem::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsLineItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsLineItem::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsLineItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsLineItem::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsLineItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsLineItem::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsLineItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsLineItem::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsLineItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsLineItem::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsLineItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsLineItem::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsLineItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsLineItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsLineItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsLineItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsLineItem::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsLineItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsLineItem::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsLineItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsLineItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsLineItem::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsLineItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsLineItem_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsLineItem::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsLineItem::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsLineItem_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsLineItem::itemChange(static_cast(change), *value)); + + } + +}; + +void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(parent); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line, parent); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); + *outptr_QGraphicsLineItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self) { + return new QPen(self->pen()); +} + +void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen) { + self->setPen(*pen); +} + +QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self) { + return new QLineF(self->line()); +} + +void QGraphicsLineItem_SetLine(QGraphicsLineItem* self, QLineF* line) { + self->setLine(*line); +} + +void QGraphicsLineItem_SetLine2(QGraphicsLineItem* self, double x1, double y1, double x2, double y2) { + self->setLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +} + +QRectF* QGraphicsLineItem_BoundingRect(const QGraphicsLineItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsLineItem_Shape(const QGraphicsLineItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsLineItem_Contains(const QGraphicsLineItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsLineItem_IsObscuredBy(const QGraphicsLineItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsLineItem_OpaqueArea(const QGraphicsLineItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsLineItem_Type(const QGraphicsLineItem* self) { + return self->type(); +} + +void QGraphicsLineItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsLineItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsLineItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsLineItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsLineItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsLineItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsLineItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsLineItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsLineItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsLineItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsLineItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsLineItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsLineItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Type = slot; +} + +int QGraphicsLineItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsLineItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsLineItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsLineItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsLineItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsLineItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsLineItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsLineItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__Advance = slot; +} + +void QGraphicsLineItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsLineItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsLineItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsLineItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsLineItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsLineItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsLineItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsLineItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsLineItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsLineItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsLineItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsLineItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsLineItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsLineItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsLineItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsLineItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsLineItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsLineItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsLineItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsLineItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsLineItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsLineItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsLineItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsLineItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsLineItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsLineItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsLineItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsLineItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsLineItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsLineItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsLineItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsLineItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsLineItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsLineItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsLineItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsLineItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsLineItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsLineItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsLineItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsLineItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLineItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsLineItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsLineItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsLineItem_Delete(QGraphicsLineItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsPixmapItem : public virtual QGraphicsPixmapItem { +public: + + MiqtVirtualQGraphicsPixmapItem(): QGraphicsPixmapItem() {}; + MiqtVirtualQGraphicsPixmapItem(const QPixmap& pixmap): QGraphicsPixmapItem(pixmap) {}; + MiqtVirtualQGraphicsPixmapItem(QGraphicsItem* parent): QGraphicsPixmapItem(parent) {}; + MiqtVirtualQGraphicsPixmapItem(const QPixmap& pixmap, QGraphicsItem* parent): QGraphicsPixmapItem(pixmap, parent) {}; + + virtual ~MiqtVirtualQGraphicsPixmapItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsPixmapItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsPixmapItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsPixmapItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsPixmapItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsPixmapItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsPixmapItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsPixmapItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsPixmapItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsPixmapItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsPixmapItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsPixmapItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsPixmapItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsPixmapItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsPixmapItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsPixmapItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsPixmapItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsPixmapItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsPixmapItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsPixmapItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsPixmapItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsPixmapItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsPixmapItem::extension(*variant)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance(int phase) override { + if (handle__Advance == 0) { + QGraphicsPixmapItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsPixmapItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsPixmapItem::advance(static_cast(phase)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithItem = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithItem == 0) { + return QGraphicsPixmapItem::collidesWithItem(other, mode); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) other; + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_CollidesWithItem(const_cast(this), handle__CollidesWithItem, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithItem(QGraphicsItem* other, int mode) const { + + return QGraphicsPixmapItem::collidesWithItem(other, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithPath = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithPath == 0) { + return QGraphicsPixmapItem::collidesWithPath(path, mode); + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_CollidesWithPath(const_cast(this), handle__CollidesWithPath, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithPath(QPainterPath* path, int mode) const { + + return QGraphicsPixmapItem::collidesWithPath(*path, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override { + if (handle__SceneEventFilter == 0) { + return QGraphicsPixmapItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsPixmapItem::sceneEventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsPixmapItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsPixmapItem::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsPixmapItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsPixmapItem::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsPixmapItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsPixmapItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsPixmapItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsPixmapItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsPixmapItem::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsPixmapItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsPixmapItem::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsPixmapItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsPixmapItem::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsPixmapItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsPixmapItem::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsPixmapItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsPixmapItem::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsPixmapItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsPixmapItem::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsPixmapItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsPixmapItem::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsPixmapItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsPixmapItem::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsPixmapItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsPixmapItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsPixmapItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsPixmapItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsPixmapItem::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsPixmapItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsPixmapItem::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsPixmapItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsPixmapItem::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsPixmapItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsPixmapItem::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsPixmapItem::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsPixmapItem_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsPixmapItem::itemChange(static_cast(change), *value)); + + } + +}; + +void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(parent); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap, parent); + *outptr_QGraphicsPixmapItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self) { + return new QPixmap(self->pixmap()); +} + +void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap) { + self->setPixmap(*pixmap); +} + +int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self) { + Qt::TransformationMode _ret = self->transformationMode(); + return static_cast(_ret); +} + +void QGraphicsPixmapItem_SetTransformationMode(QGraphicsPixmapItem* self, int mode) { + self->setTransformationMode(static_cast(mode)); +} + +QPointF* QGraphicsPixmapItem_Offset(const QGraphicsPixmapItem* self) { + return new QPointF(self->offset()); +} + +void QGraphicsPixmapItem_SetOffset(QGraphicsPixmapItem* self, QPointF* offset) { + self->setOffset(*offset); +} + +void QGraphicsPixmapItem_SetOffset2(QGraphicsPixmapItem* self, double x, double y) { + self->setOffset(static_cast(x), static_cast(y)); +} + +QRectF* QGraphicsPixmapItem_BoundingRect(const QGraphicsPixmapItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsPixmapItem_Shape(const QGraphicsPixmapItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsPixmapItem_Contains(const QGraphicsPixmapItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsPixmapItem_Paint(QGraphicsPixmapItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsPixmapItem_IsObscuredBy(const QGraphicsPixmapItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsPixmapItem_OpaqueArea(const QGraphicsPixmapItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsPixmapItem_Type(const QGraphicsPixmapItem* self) { + return self->type(); +} + +int QGraphicsPixmapItem_ShapeMode(const QGraphicsPixmapItem* self) { + QGraphicsPixmapItem::ShapeMode _ret = self->shapeMode(); + return static_cast(_ret); +} + +void QGraphicsPixmapItem_SetShapeMode(QGraphicsPixmapItem* self, int mode) { + self->setShapeMode(static_cast(mode)); +} + +void QGraphicsPixmapItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsPixmapItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsPixmapItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsPixmapItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsPixmapItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsPixmapItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsPixmapItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsPixmapItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsPixmapItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsPixmapItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsPixmapItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsPixmapItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsPixmapItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Type = slot; +} + +int QGraphicsPixmapItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsPixmapItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsPixmapItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsPixmapItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsPixmapItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsPixmapItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsPixmapItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsPixmapItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__Advance = slot; +} + +void QGraphicsPixmapItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsPixmapItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsPixmapItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsPixmapItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsPixmapItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsPixmapItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsPixmapItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsPixmapItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsPixmapItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsPixmapItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsPixmapItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsPixmapItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsPixmapItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsPixmapItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsPixmapItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsPixmapItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsTextItem : public virtual QGraphicsTextItem { +public: + + MiqtVirtualQGraphicsTextItem(): QGraphicsTextItem() {}; + MiqtVirtualQGraphicsTextItem(const QString& text): QGraphicsTextItem(text) {}; + MiqtVirtualQGraphicsTextItem(QGraphicsItem* parent): QGraphicsTextItem(parent) {}; + MiqtVirtualQGraphicsTextItem(const QString& text, QGraphicsItem* parent): QGraphicsTextItem(text, parent) {}; + + virtual ~MiqtVirtualQGraphicsTextItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsTextItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsTextItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsTextItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsTextItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsTextItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsTextItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsTextItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsTextItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsTextItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsTextItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsTextItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsTextItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsTextItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsTextItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsTextItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsTextItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsTextItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsTextItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsTextItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsTextItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsTextItem::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsTextItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsTextItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsTextItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsTextItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsTextItem::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsTextItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsTextItem::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsTextItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsTextItem::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsTextItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsTextItem::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsTextItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsTextItem::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsTextItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsTextItem::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsTextItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsTextItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsTextItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsTextItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsTextItem::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsTextItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsTextItem::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsTextItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsTextItem::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsTextItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsTextItem::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsTextItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsTextItem::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsTextItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsTextItem_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsTextItem::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsTextItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsTextItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsTextItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsTextItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsTextItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsTextItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsTextItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsTextItem::extension(*variant)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* ev) override { + if (handle__Event == 0) { + return QGraphicsTextItem::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsTextItem_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsTextItem::event(ev); + + } + +}; + +void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(parent); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString, parent); + *outptr_QGraphicsTextItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QGraphicsTextItem_Tr(const char* s) { + QString _ret = QGraphicsTextItem::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_ToHtml(const QGraphicsTextItem* self) { + QString _ret = self->toHtml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsTextItem_SetHtml(QGraphicsTextItem* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +struct miqt_string QGraphicsTextItem_ToPlainText(const QGraphicsTextItem* self) { + QString _ret = self->toPlainText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsTextItem_SetPlainText(QGraphicsTextItem* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setPlainText(text_QString); +} + +QFont* QGraphicsTextItem_Font(const QGraphicsTextItem* self) { + return new QFont(self->font()); +} + +void QGraphicsTextItem_SetFont(QGraphicsTextItem* self, QFont* font) { + self->setFont(*font); +} + +void QGraphicsTextItem_SetDefaultTextColor(QGraphicsTextItem* self, QColor* c) { + self->setDefaultTextColor(*c); +} + +QColor* QGraphicsTextItem_DefaultTextColor(const QGraphicsTextItem* self) { + return new QColor(self->defaultTextColor()); +} + +QRectF* QGraphicsTextItem_BoundingRect(const QGraphicsTextItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsTextItem_Shape(const QGraphicsTextItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsTextItem_Contains(const QGraphicsTextItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsTextItem_Paint(QGraphicsTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsTextItem_IsObscuredBy(const QGraphicsTextItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsTextItem_OpaqueArea(const QGraphicsTextItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsTextItem_Type(const QGraphicsTextItem* self) { + return self->type(); +} + +void QGraphicsTextItem_SetTextWidth(QGraphicsTextItem* self, double width) { + self->setTextWidth(static_cast(width)); +} + +double QGraphicsTextItem_TextWidth(const QGraphicsTextItem* self) { + qreal _ret = self->textWidth(); + return static_cast(_ret); +} + +void QGraphicsTextItem_AdjustSize(QGraphicsTextItem* self) { + self->adjustSize(); +} + +void QGraphicsTextItem_SetDocument(QGraphicsTextItem* self, QTextDocument* document) { + self->setDocument(document); +} + +QTextDocument* QGraphicsTextItem_Document(const QGraphicsTextItem* self) { + return self->document(); +} + +void QGraphicsTextItem_SetTextInteractionFlags(QGraphicsTextItem* self, int flags) { + self->setTextInteractionFlags(static_cast(flags)); +} + +int QGraphicsTextItem_TextInteractionFlags(const QGraphicsTextItem* self) { + Qt::TextInteractionFlags _ret = self->textInteractionFlags(); + return static_cast(_ret); +} + +void QGraphicsTextItem_SetTabChangesFocus(QGraphicsTextItem* self, bool b) { + self->setTabChangesFocus(b); +} + +bool QGraphicsTextItem_TabChangesFocus(const QGraphicsTextItem* self) { + return self->tabChangesFocus(); +} + +void QGraphicsTextItem_SetOpenExternalLinks(QGraphicsTextItem* self, bool open) { + self->setOpenExternalLinks(open); +} + +bool QGraphicsTextItem_OpenExternalLinks(const QGraphicsTextItem* self) { + return self->openExternalLinks(); +} + +void QGraphicsTextItem_SetTextCursor(QGraphicsTextItem* self, QTextCursor* cursor) { + self->setTextCursor(*cursor); +} + +QTextCursor* QGraphicsTextItem_TextCursor(const QGraphicsTextItem* self) { + return new QTextCursor(self->textCursor()); +} + +void QGraphicsTextItem_LinkActivated(QGraphicsTextItem* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->linkActivated(param1_QString); +} + +void QGraphicsTextItem_connect_LinkActivated(QGraphicsTextItem* self, intptr_t slot) { + MiqtVirtualQGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkActivated), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QGraphicsTextItem_LinkActivated(slot, sigval1); + }); +} + +void QGraphicsTextItem_LinkHovered(QGraphicsTextItem* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->linkHovered(param1_QString); +} + +void QGraphicsTextItem_connect_LinkHovered(QGraphicsTextItem* self, intptr_t slot) { + MiqtVirtualQGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkHovered), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QGraphicsTextItem_LinkHovered(slot, sigval1); + }); +} + +struct miqt_string QGraphicsTextItem_Tr2(const char* s, const char* c) { + QString _ret = QGraphicsTextItem::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsTextItem_Tr3(const char* s, const char* c, int n) { + QString _ret = QGraphicsTextItem::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsTextItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsTextItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsTextItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsTextItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsTextItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsTextItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsTextItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsTextItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsTextItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Type = slot; +} + +int QGraphicsTextItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsTextItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsTextItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsTextItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsTextItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsTextItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsTextItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsTextItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsTextItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsTextItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsTextItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsTextItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsTextItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsTextItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsTextItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsTextItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsTextItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsTextItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsTextItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsTextItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsTextItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsTextItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsTextItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsTextItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsTextItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsTextItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsTextItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsTextItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsTextItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsTextItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsTextItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsTextItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsTextItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsTextItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsTextItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsTextItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsTextItem_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTextItem*)(self) )->handle__Event = slot; +} + +bool QGraphicsTextItem_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsTextItem*)(self) )->virtualbase_Event(ev); +} + +void QGraphicsTextItem_Delete(QGraphicsTextItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsSimpleTextItem : public virtual QGraphicsSimpleTextItem { +public: + + MiqtVirtualQGraphicsSimpleTextItem(): QGraphicsSimpleTextItem() {}; + MiqtVirtualQGraphicsSimpleTextItem(const QString& text): QGraphicsSimpleTextItem(text) {}; + MiqtVirtualQGraphicsSimpleTextItem(QGraphicsItem* parent): QGraphicsSimpleTextItem(parent) {}; + MiqtVirtualQGraphicsSimpleTextItem(const QString& text, QGraphicsItem* parent): QGraphicsSimpleTextItem(text, parent) {}; + + virtual ~MiqtVirtualQGraphicsSimpleTextItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsSimpleTextItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsSimpleTextItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsSimpleTextItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsSimpleTextItem::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsSimpleTextItem::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsSimpleTextItem::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsSimpleTextItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsSimpleTextItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsSimpleTextItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsSimpleTextItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsSimpleTextItem::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsSimpleTextItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsSimpleTextItem::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsSimpleTextItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsSimpleTextItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsSimpleTextItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsSimpleTextItem::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsSimpleTextItem::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsSimpleTextItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsSimpleTextItem::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsSimpleTextItem::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsSimpleTextItem_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsSimpleTextItem::extension(*variant)); + + } + +}; + +void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(parent); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + QString text_QString = QString::fromUtf8(text.data, text.len); + MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString, parent); + *outptr_QGraphicsSimpleTextItem = ret; + *outptr_QAbstractGraphicsShapeItem = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setText(text_QString); +} + +struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self) { + QString _ret = self->text(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font) { + self->setFont(*font); +} + +QFont* QGraphicsSimpleTextItem_Font(const QGraphicsSimpleTextItem* self) { + return new QFont(self->font()); +} + +QRectF* QGraphicsSimpleTextItem_BoundingRect(const QGraphicsSimpleTextItem* self) { + return new QRectF(self->boundingRect()); +} + +QPainterPath* QGraphicsSimpleTextItem_Shape(const QGraphicsSimpleTextItem* self) { + return new QPainterPath(self->shape()); +} + +bool QGraphicsSimpleTextItem_Contains(const QGraphicsSimpleTextItem* self, QPointF* point) { + return self->contains(*point); +} + +void QGraphicsSimpleTextItem_Paint(QGraphicsSimpleTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +bool QGraphicsSimpleTextItem_IsObscuredBy(const QGraphicsSimpleTextItem* self, QGraphicsItem* item) { + return self->isObscuredBy(item); +} + +QPainterPath* QGraphicsSimpleTextItem_OpaqueArea(const QGraphicsSimpleTextItem* self) { + return new QPainterPath(self->opaqueArea()); +} + +int QGraphicsSimpleTextItem_Type(const QGraphicsSimpleTextItem* self) { + return self->type(); +} + +void QGraphicsSimpleTextItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsSimpleTextItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsSimpleTextItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsSimpleTextItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsSimpleTextItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsSimpleTextItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsSimpleTextItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsSimpleTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsSimpleTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsSimpleTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsSimpleTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsSimpleTextItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsSimpleTextItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Type = slot; +} + +int QGraphicsSimpleTextItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsSimpleTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsSimpleTextItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsSimpleTextItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsSimpleTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsSimpleTextItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSimpleTextItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsSimpleTextItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsSimpleTextItem*)(self) )->virtualbase_Extension(variant); +} + +void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQGraphicsItemGroup : public virtual QGraphicsItemGroup { +public: + + MiqtVirtualQGraphicsItemGroup(): QGraphicsItemGroup() {}; + MiqtVirtualQGraphicsItemGroup(QGraphicsItem* parent): QGraphicsItemGroup(parent) {}; + + virtual ~MiqtVirtualQGraphicsItemGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsItemGroup::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsItemGroup::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsItemGroup::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsItemGroup_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsItemGroup::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsObscuredBy = 0; + + // Subclass to allow providing a Go implementation + virtual bool isObscuredBy(const QGraphicsItem* item) const override { + if (handle__IsObscuredBy == 0) { + return QGraphicsItemGroup::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsItemGroup::isObscuredBy(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpaqueArea = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath opaqueArea() const override { + if (handle__OpaqueArea == 0) { + return QGraphicsItemGroup::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsItemGroup::opaqueArea()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsItemGroup::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsItemGroup::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Advance = 0; + + // Subclass to allow providing a Go implementation + virtual void advance(int phase) override { + if (handle__Advance == 0) { + QGraphicsItemGroup::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsItemGroup_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsItemGroup::advance(static_cast(phase)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsItemGroup::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsItemGroup::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Contains = 0; + + // Subclass to allow providing a Go implementation + virtual bool contains(const QPointF& point) const override { + if (handle__Contains == 0) { + return QGraphicsItemGroup::contains(point); + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsItemGroup::contains(*point); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithItem = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithItem == 0) { + return QGraphicsItemGroup::collidesWithItem(other, mode); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) other; + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_CollidesWithItem(const_cast(this), handle__CollidesWithItem, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithItem(QGraphicsItem* other, int mode) const { + + return QGraphicsItemGroup::collidesWithItem(other, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CollidesWithPath = 0; + + // Subclass to allow providing a Go implementation + virtual bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const override { + if (handle__CollidesWithPath == 0) { + return QGraphicsItemGroup::collidesWithPath(path, mode); + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + Qt::ItemSelectionMode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_CollidesWithPath(const_cast(this), handle__CollidesWithPath, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CollidesWithPath(QPainterPath* path, int mode) const { + + return QGraphicsItemGroup::collidesWithPath(*path, static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override { + if (handle__SceneEventFilter == 0) { + return QGraphicsItemGroup::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsItemGroup::sceneEventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsItemGroup::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsItemGroup::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsItemGroup::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsItemGroup::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsItemGroup::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsItemGroup::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsItemGroup::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsItemGroup::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItemGroup::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsItemGroup::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsItemGroup::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsItemGroup::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsItemGroup::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsItemGroup::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItemGroup::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsItemGroup::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItemGroup::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsItemGroup::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItemGroup::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsItemGroup::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsItemGroup::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsItemGroup::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsItemGroup::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsItemGroup::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsItemGroup::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsItemGroup::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsItemGroup::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItemGroup::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsItemGroup::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsItemGroup::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsItemGroup::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsItemGroup::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsItemGroup::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsItemGroup::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsItemGroup::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsItemGroup::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QGraphicsItem::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QGraphicsItemGroup::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItemGroup_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsItemGroup::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetExtension = 0; + + // Subclass to allow providing a Go implementation + virtual void setExtension(QGraphicsItem::Extension extension, const QVariant& variant) override { + if (handle__SetExtension == 0) { + QGraphicsItemGroup::setExtension(extension, variant); + return; + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&variant_ret); + + miqt_exec_callback_QGraphicsItemGroup_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsItemGroup::setExtension(static_cast(extension), *variant); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(const QVariant& variant) const override { + if (handle__Extension == 0) { + return QGraphicsItemGroup::extension(variant); + } + + const QVariant& variant_ret = variant; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&variant_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItemGroup_Extension(const_cast(this), handle__Extension, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(QVariant* variant) const { + + return new QVariant(QGraphicsItemGroup::extension(*variant)); + + } + +}; + +void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(); + *outptr_QGraphicsItemGroup = ret; + *outptr_QGraphicsItem = static_cast(ret); } -QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsTextItem(text_QString); +void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(parent); + *outptr_QGraphicsItemGroup = ret; + *outptr_QGraphicsItem = static_cast(ret); } -QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent) { - return new QGraphicsTextItem(parent); +void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { + self->addToGroup(item); } -QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsTextItem(text_QString, parent); +void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { + self->removeFromGroup(item); } -QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self) { - return (QMetaObject*) self->metaObject(); +QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self) { + return new QRectF(self->boundingRect()); } -void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1) { - return self->qt_metacast(param1); +void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } -struct miqt_string QGraphicsTextItem_Tr(const char* s) { - QString _ret = QGraphicsTextItem::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QGraphicsItemGroup_IsObscuredBy(const QGraphicsItemGroup* self, QGraphicsItem* item) { + return self->isObscuredBy(item); } -struct miqt_string QGraphicsTextItem_ToHtml(const QGraphicsTextItem* self) { - QString _ret = self->toHtml(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QPainterPath* QGraphicsItemGroup_OpaqueArea(const QGraphicsItemGroup* self) { + return new QPainterPath(self->opaqueArea()); } -void QGraphicsTextItem_SetHtml(QGraphicsTextItem* self, struct miqt_string html) { - QString html_QString = QString::fromUtf8(html.data, html.len); - self->setHtml(html_QString); +int QGraphicsItemGroup_Type(const QGraphicsItemGroup* self) { + return self->type(); } -struct miqt_string QGraphicsTextItem_ToPlainText(const QGraphicsTextItem* self) { - QString _ret = self->toPlainText(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__BoundingRect = slot; } -void QGraphicsTextItem_SetPlainText(QGraphicsTextItem* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setPlainText(text_QString); +QRectF* QGraphicsItemGroup_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_BoundingRect(); } -QFont* QGraphicsTextItem_Font(const QGraphicsTextItem* self) { - return new QFont(self->font()); +void QGraphicsItemGroup_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Paint = slot; } -void QGraphicsTextItem_SetFont(QGraphicsTextItem* self, QFont* font) { - self->setFont(*font); +void QGraphicsItemGroup_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Paint(painter, option, widget); } -void QGraphicsTextItem_SetDefaultTextColor(QGraphicsTextItem* self, QColor* c) { - self->setDefaultTextColor(*c); +void QGraphicsItemGroup_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__IsObscuredBy = slot; } -QColor* QGraphicsTextItem_DefaultTextColor(const QGraphicsTextItem* self) { - return new QColor(self->defaultTextColor()); +bool QGraphicsItemGroup_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_IsObscuredBy(item); } -QRectF* QGraphicsTextItem_BoundingRect(const QGraphicsTextItem* self) { - return new QRectF(self->boundingRect()); +void QGraphicsItemGroup_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__OpaqueArea = slot; } -QPainterPath* QGraphicsTextItem_Shape(const QGraphicsTextItem* self) { - return new QPainterPath(self->shape()); +QPainterPath* QGraphicsItemGroup_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_OpaqueArea(); } -bool QGraphicsTextItem_Contains(const QGraphicsTextItem* self, QPointF* point) { - return self->contains(*point); +void QGraphicsItemGroup_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Type = slot; } -void QGraphicsTextItem_Paint(QGraphicsTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +int QGraphicsItemGroup_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Type(); } -bool QGraphicsTextItem_IsObscuredBy(const QGraphicsTextItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsItemGroup_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Advance = slot; } -QPainterPath* QGraphicsTextItem_OpaqueArea(const QGraphicsTextItem* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsItemGroup_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Advance(phase); } -int QGraphicsTextItem_Type(const QGraphicsTextItem* self) { - return self->type(); +void QGraphicsItemGroup_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Shape = slot; } -void QGraphicsTextItem_SetTextWidth(QGraphicsTextItem* self, double width) { - self->setTextWidth(static_cast(width)); +QPainterPath* QGraphicsItemGroup_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Shape(); } -double QGraphicsTextItem_TextWidth(const QGraphicsTextItem* self) { - qreal _ret = self->textWidth(); - return static_cast(_ret); +void QGraphicsItemGroup_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Contains = slot; } -void QGraphicsTextItem_AdjustSize(QGraphicsTextItem* self) { - self->adjustSize(); +bool QGraphicsItemGroup_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Contains(point); } -void QGraphicsTextItem_SetDocument(QGraphicsTextItem* self, QTextDocument* document) { - self->setDocument(document); +void QGraphicsItemGroup_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__CollidesWithItem = slot; } -QTextDocument* QGraphicsTextItem_Document(const QGraphicsTextItem* self) { - return self->document(); +bool QGraphicsItemGroup_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_CollidesWithItem(other, mode); } -void QGraphicsTextItem_SetTextInteractionFlags(QGraphicsTextItem* self, int flags) { - self->setTextInteractionFlags(static_cast(flags)); +void QGraphicsItemGroup_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__CollidesWithPath = slot; } -int QGraphicsTextItem_TextInteractionFlags(const QGraphicsTextItem* self) { - Qt::TextInteractionFlags _ret = self->textInteractionFlags(); - return static_cast(_ret); +bool QGraphicsItemGroup_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_CollidesWithPath(path, mode); } -void QGraphicsTextItem_SetTabChangesFocus(QGraphicsTextItem* self, bool b) { - self->setTabChangesFocus(b); +void QGraphicsItemGroup_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SceneEventFilter = slot; } -bool QGraphicsTextItem_TabChangesFocus(const QGraphicsTextItem* self) { - return self->tabChangesFocus(); +bool QGraphicsItemGroup_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SceneEventFilter(watched, event); } -void QGraphicsTextItem_SetOpenExternalLinks(QGraphicsTextItem* self, bool open) { - self->setOpenExternalLinks(open); +void QGraphicsItemGroup_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SceneEvent = slot; } -bool QGraphicsTextItem_OpenExternalLinks(const QGraphicsTextItem* self) { - return self->openExternalLinks(); +bool QGraphicsItemGroup_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SceneEvent(event); } -void QGraphicsTextItem_SetTextCursor(QGraphicsTextItem* self, QTextCursor* cursor) { - self->setTextCursor(*cursor); +void QGraphicsItemGroup_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__ContextMenuEvent = slot; } -QTextCursor* QGraphicsTextItem_TextCursor(const QGraphicsTextItem* self) { - return new QTextCursor(self->textCursor()); +void QGraphicsItemGroup_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_ContextMenuEvent(event); } -void QGraphicsTextItem_LinkActivated(QGraphicsTextItem* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->linkActivated(param1_QString); +void QGraphicsItemGroup_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DragEnterEvent = slot; } -void QGraphicsTextItem_connect_LinkActivated(QGraphicsTextItem* self, intptr_t slot) { - QGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkActivated), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QGraphicsTextItem_LinkActivated(slot, sigval1); - }); +void QGraphicsItemGroup_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DragEnterEvent(event); } -void QGraphicsTextItem_LinkHovered(QGraphicsTextItem* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->linkHovered(param1_QString); +void QGraphicsItemGroup_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DragLeaveEvent = slot; } -void QGraphicsTextItem_connect_LinkHovered(QGraphicsTextItem* self, intptr_t slot) { - QGraphicsTextItem::connect(self, static_cast(&QGraphicsTextItem::linkHovered), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QGraphicsTextItem_LinkHovered(slot, sigval1); - }); +void QGraphicsItemGroup_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DragLeaveEvent(event); } -struct miqt_string QGraphicsTextItem_Tr2(const char* s, const char* c) { - QString _ret = QGraphicsTextItem::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DragMoveEvent = slot; } -struct miqt_string QGraphicsTextItem_Tr3(const char* s, const char* c, int n) { - QString _ret = QGraphicsTextItem::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DragMoveEvent(event); } -void QGraphicsTextItem_Delete(QGraphicsTextItem* self) { - delete self; +void QGraphicsItemGroup_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__DropEvent = slot; } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new() { - return new QGraphicsSimpleTextItem(); +void QGraphicsItemGroup_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_DropEvent(event); } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsSimpleTextItem(text_QString); +void QGraphicsItemGroup_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__FocusInEvent = slot; } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent) { - return new QGraphicsSimpleTextItem(parent); +void QGraphicsItemGroup_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_FocusInEvent(event); } -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { - QString text_QString = QString::fromUtf8(text.data, text.len); - return new QGraphicsSimpleTextItem(text_QString, parent); +void QGraphicsItemGroup_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__FocusOutEvent = slot; } -void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setText(text_QString); +void QGraphicsItemGroup_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_FocusOutEvent(event); } -struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self) { - QString _ret = self->text(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QGraphicsItemGroup_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__HoverEnterEvent = slot; } -void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font) { - self->setFont(*font); +void QGraphicsItemGroup_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_HoverEnterEvent(event); } -QFont* QGraphicsSimpleTextItem_Font(const QGraphicsSimpleTextItem* self) { - return new QFont(self->font()); +void QGraphicsItemGroup_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__HoverMoveEvent = slot; } -QRectF* QGraphicsSimpleTextItem_BoundingRect(const QGraphicsSimpleTextItem* self) { - return new QRectF(self->boundingRect()); +void QGraphicsItemGroup_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_HoverMoveEvent(event); } -QPainterPath* QGraphicsSimpleTextItem_Shape(const QGraphicsSimpleTextItem* self) { - return new QPainterPath(self->shape()); +void QGraphicsItemGroup_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__HoverLeaveEvent = slot; } -bool QGraphicsSimpleTextItem_Contains(const QGraphicsSimpleTextItem* self, QPointF* point) { - return self->contains(*point); +void QGraphicsItemGroup_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_HoverLeaveEvent(event); } -void QGraphicsSimpleTextItem_Paint(QGraphicsSimpleTextItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsItemGroup_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__KeyPressEvent = slot; } -bool QGraphicsSimpleTextItem_IsObscuredBy(const QGraphicsSimpleTextItem* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsItemGroup_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_KeyPressEvent(event); } -QPainterPath* QGraphicsSimpleTextItem_OpaqueArea(const QGraphicsSimpleTextItem* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsItemGroup_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__KeyReleaseEvent = slot; } -int QGraphicsSimpleTextItem_Type(const QGraphicsSimpleTextItem* self) { - return self->type(); +void QGraphicsItemGroup_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_KeyReleaseEvent(event); } -void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self) { - delete self; +void QGraphicsItemGroup_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MousePressEvent = slot; } -QGraphicsItemGroup* QGraphicsItemGroup_new() { - return new QGraphicsItemGroup(); +void QGraphicsItemGroup_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MousePressEvent(event); } -QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent) { - return new QGraphicsItemGroup(parent); +void QGraphicsItemGroup_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MouseMoveEvent = slot; } -void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { - self->addToGroup(item); +void QGraphicsItemGroup_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MouseMoveEvent(event); } -void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { - self->removeFromGroup(item); +void QGraphicsItemGroup_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MouseReleaseEvent = slot; } -QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self) { - return new QRectF(self->boundingRect()); +void QGraphicsItemGroup_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MouseReleaseEvent(event); } -void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsItemGroup_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__MouseDoubleClickEvent = slot; } -bool QGraphicsItemGroup_IsObscuredBy(const QGraphicsItemGroup* self, QGraphicsItem* item) { - return self->isObscuredBy(item); +void QGraphicsItemGroup_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_MouseDoubleClickEvent(event); } -QPainterPath* QGraphicsItemGroup_OpaqueArea(const QGraphicsItemGroup* self) { - return new QPainterPath(self->opaqueArea()); +void QGraphicsItemGroup_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__WheelEvent = slot; } -int QGraphicsItemGroup_Type(const QGraphicsItemGroup* self) { - return self->type(); +void QGraphicsItemGroup_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_WheelEvent(event); } -void QGraphicsItemGroup_Paint3(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsItemGroup_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsItemGroup_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsItemGroup_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsItemGroup_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsItemGroup_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsItemGroup_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsItemGroup_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsItemGroup_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsItemGroup_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsItemGroup_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsItemGroup_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemGroup*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsItemGroup_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsItemGroup*)(self) )->virtualbase_Extension(variant); } -void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self) { - delete self; +void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsitem.go b/qt6/gen_qgraphicsitem.go index 68b82b61..1577b2f7 100644 --- a/qt6/gen_qgraphicsitem.go +++ b/qt6/gen_qgraphicsitem.go @@ -100,6 +100,12 @@ const ( QGraphicsItem__UserType QGraphicsItem__ = 65536 ) +type QGraphicsItem__Extension int + +const ( + QGraphicsItem__UserExtension QGraphicsItem__Extension = 2147483648 +) + type QGraphicsPathItem__ int const ( @@ -163,7 +169,8 @@ const ( ) type QGraphicsItem struct { - h *C.QGraphicsItem + h *C.QGraphicsItem + isSubclass bool } func (this *QGraphicsItem) cPointer() *C.QGraphicsItem { @@ -180,6 +187,7 @@ func (this *QGraphicsItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGraphicsItem constructs the type using only CGO pointers. func newQGraphicsItem(h *C.QGraphicsItem) *QGraphicsItem { if h == nil { return nil @@ -187,12 +195,17 @@ func newQGraphicsItem(h *C.QGraphicsItem) *QGraphicsItem { return &QGraphicsItem{h: h} } +// UnsafeNewQGraphicsItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsItem(h unsafe.Pointer) *QGraphicsItem { - return newQGraphicsItem((*C.QGraphicsItem)(h)) + if h == nil { + return nil + } + + return &QGraphicsItem{h: (*C.QGraphicsItem)(h)} } func (this *QGraphicsItem) Scene() *QGraphicsScene { - return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsItem_Scene(this.h))) + return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsItem_Scene(this.h)), nil) } func (this *QGraphicsItem) ParentItem() *QGraphicsItem { @@ -204,19 +217,19 @@ func (this *QGraphicsItem) TopLevelItem() *QGraphicsItem { } func (this *QGraphicsItem) ParentObject() *QGraphicsObject { - return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ParentObject(this.h))) + return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ParentObject(this.h)), nil, nil) } func (this *QGraphicsItem) ParentWidget() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_ParentWidget(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_ParentWidget(this.h)), nil, nil, nil, nil) } func (this *QGraphicsItem) TopLevelWidget() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_TopLevelWidget(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_TopLevelWidget(this.h)), nil, nil, nil, nil) } func (this *QGraphicsItem) Window() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_Window(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsItem_Window(this.h)), nil, nil, nil, nil) } func (this *QGraphicsItem) Panel() *QGraphicsItem { @@ -250,15 +263,15 @@ func (this *QGraphicsItem) IsPanel() bool { } func (this *QGraphicsItem) ToGraphicsObject() *QGraphicsObject { - return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject(this.h))) + return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject(this.h)), nil, nil) } func (this *QGraphicsItem) ToGraphicsObject2() *QGraphicsObject { - return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject2(this.h))) + return UnsafeNewQGraphicsObject(unsafe.Pointer(C.QGraphicsItem_ToGraphicsObject2(this.h)), nil, nil) } func (this *QGraphicsItem) Group() *QGraphicsItemGroup { - return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsItem_Group(this.h))) + return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsItem_Group(this.h)), nil) } func (this *QGraphicsItem) SetGroup(group *QGraphicsItemGroup) { @@ -388,7 +401,7 @@ func (this *QGraphicsItem) SetOpacity(opacity float64) { } func (this *QGraphicsItem) GraphicsEffect() *QGraphicsEffect { - return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QGraphicsItem_GraphicsEffect(this.h))) + return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QGraphicsItem_GraphicsEffect(this.h)), nil) } func (this *QGraphicsItem) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -594,7 +607,7 @@ func (this *QGraphicsItem) Transformations() []*QGraphicsTransform { _ret := make([]*QGraphicsTransform, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsTransform)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGraphicsTransform(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGraphicsTransform(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -683,12 +696,12 @@ func (this *QGraphicsItem) Contains(point *QPointF) bool { return (bool)(C.QGraphicsItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsItem) CollidesWithItem(other *QGraphicsItem) bool { - return (bool)(C.QGraphicsItem_CollidesWithItem(this.h, other.cPointer())) +func (this *QGraphicsItem) CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + return (bool)(C.QGraphicsItem_CollidesWithItem(this.h, other.cPointer(), (C.int)(mode))) } -func (this *QGraphicsItem) CollidesWithPath(path *QPainterPath) bool { - return (bool)(C.QGraphicsItem_CollidesWithPath(this.h, path.cPointer())) +func (this *QGraphicsItem) CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + return (bool)(C.QGraphicsItem_CollidesWithPath(this.h, path.cPointer(), (C.int)(mode))) } func (this *QGraphicsItem) CollidingItems() []*QGraphicsItem { @@ -735,8 +748,8 @@ func (this *QGraphicsItem) SetBoundingRegionGranularity(granularity float64) { C.QGraphicsItem_SetBoundingRegionGranularity(this.h, (C.double)(granularity)) } -func (this *QGraphicsItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsItem) Update() { @@ -1047,14 +1060,6 @@ func (this *QGraphicsItem) SetTransform2(matrix *QTransform, combine bool) { C.QGraphicsItem_SetTransform2(this.h, matrix.cPointer(), (C.bool)(combine)) } -func (this *QGraphicsItem) CollidesWithItem2(other *QGraphicsItem, mode ItemSelectionMode) bool { - return (bool)(C.QGraphicsItem_CollidesWithItem2(this.h, other.cPointer(), (C.int)(mode))) -} - -func (this *QGraphicsItem) CollidesWithPath2(path *QPainterPath, mode ItemSelectionMode) bool { - return (bool)(C.QGraphicsItem_CollidesWithPath2(this.h, path.cPointer(), (C.int)(mode))) -} - func (this *QGraphicsItem) CollidingItems1(mode ItemSelectionMode) []*QGraphicsItem { var _ma C.struct_miqt_array = C.QGraphicsItem_CollidingItems1(this.h, (C.int)(mode)) _ret := make([]*QGraphicsItem, int(_ma.len)) @@ -1069,10 +1074,6 @@ func (this *QGraphicsItem) IsObscured1(rect *QRectF) bool { return (bool)(C.QGraphicsItem_IsObscured1(this.h, rect.cPointer())) } -func (this *QGraphicsItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} - func (this *QGraphicsItem) Update1(rect *QRectF) { C.QGraphicsItem_Update1(this.h, rect.cPointer()) } @@ -1083,7 +1084,7 @@ func (this *QGraphicsItem) Scroll3(dx float64, dy float64, rect *QRectF) { // Delete this object from C++ memory. func (this *QGraphicsItem) Delete() { - C.QGraphicsItem_Delete(this.h) + C.QGraphicsItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1096,7 +1097,8 @@ func (this *QGraphicsItem) GoGC() { } type QGraphicsObject struct { - h *C.QGraphicsObject + h *C.QGraphicsObject + isSubclass bool *QObject *QGraphicsItem } @@ -1115,15 +1117,25 @@ func (this *QGraphicsObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsObject(h *C.QGraphicsObject) *QGraphicsObject { +// newQGraphicsObject constructs the type using only CGO pointers. +func newQGraphicsObject(h *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsObject { if h == nil { return nil } - return &QGraphicsObject{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + return &QGraphicsObject{h: h, + QObject: newQObject(h_QObject), + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} } -func UnsafeNewQGraphicsObject(h unsafe.Pointer) *QGraphicsObject { - return newQGraphicsObject((*C.QGraphicsObject)(h)) +// UnsafeNewQGraphicsObject constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsObject(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsObject { + if h == nil { + return nil + } + + return &QGraphicsObject{h: (*C.QGraphicsObject)(h), + QObject: UnsafeNewQObject(h_QObject), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } func (this *QGraphicsObject) MetaObject() *QMetaObject { @@ -1385,7 +1397,7 @@ func (this *QGraphicsObject) GrabGesture2(typeVal GestureType, flags GestureFlag // Delete this object from C++ memory. func (this *QGraphicsObject) Delete() { - C.QGraphicsObject_Delete(this.h) + C.QGraphicsObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1398,7 +1410,8 @@ func (this *QGraphicsObject) GoGC() { } type QAbstractGraphicsShapeItem struct { - h *C.QAbstractGraphicsShapeItem + h *C.QAbstractGraphicsShapeItem + isSubclass bool *QGraphicsItem } @@ -1416,15 +1429,23 @@ func (this *QAbstractGraphicsShapeItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem) *QAbstractGraphicsShapeItem { +// newQAbstractGraphicsShapeItem constructs the type using only CGO pointers. +func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QAbstractGraphicsShapeItem { if h == nil { return nil } - return &QAbstractGraphicsShapeItem{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + return &QAbstractGraphicsShapeItem{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} } -func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer) *QAbstractGraphicsShapeItem { - return newQAbstractGraphicsShapeItem((*C.QAbstractGraphicsShapeItem)(h)) +// UnsafeNewQAbstractGraphicsShapeItem constructs the type using only unsafe pointers. +func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QAbstractGraphicsShapeItem { + if h == nil { + return nil + } + + return &QAbstractGraphicsShapeItem{h: (*C.QAbstractGraphicsShapeItem)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } func (this *QAbstractGraphicsShapeItem) Pen() *QPen { @@ -1462,7 +1483,7 @@ func (this *QAbstractGraphicsShapeItem) OpaqueArea() *QPainterPath { // Delete this object from C++ memory. func (this *QAbstractGraphicsShapeItem) Delete() { - C.QAbstractGraphicsShapeItem_Delete(this.h) + C.QAbstractGraphicsShapeItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1475,7 +1496,8 @@ func (this *QAbstractGraphicsShapeItem) GoGC() { } type QGraphicsPathItem struct { - h *C.QGraphicsPathItem + h *C.QGraphicsPathItem + isSubclass bool *QAbstractGraphicsShapeItem } @@ -1493,39 +1515,71 @@ func (this *QGraphicsPathItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsPathItem(h *C.QGraphicsPathItem) *QGraphicsPathItem { +// newQGraphicsPathItem constructs the type using only CGO pointers. +func newQGraphicsPathItem(h *C.QGraphicsPathItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPathItem { if h == nil { return nil } - return &QGraphicsPathItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} + return &QGraphicsPathItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsPathItem(h unsafe.Pointer) *QGraphicsPathItem { - return newQGraphicsPathItem((*C.QGraphicsPathItem)(h)) +// UnsafeNewQGraphicsPathItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsPathItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPathItem { + if h == nil { + return nil + } + + return &QGraphicsPathItem{h: (*C.QGraphicsPathItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } // NewQGraphicsPathItem constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem() *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new() - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new(&outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsPathItem2 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem2(path *QPainterPath) *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new2(path.cPointer()) - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new2(path.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsPathItem3 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem3(parent *QGraphicsItem) *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new3(parent.cPointer()) - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new3(parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsPathItem4 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem4(path *QPainterPath, parent *QGraphicsItem) *QGraphicsPathItem { - ret := C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer()) - return newQGraphicsPathItem(ret) + var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } func (this *QGraphicsPathItem) Path() *QPainterPath { @@ -1557,8 +1611,8 @@ func (this *QGraphicsPathItem) Contains(point *QPointF) bool { return (bool)(C.QGraphicsPathItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsPathItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsPathItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsPathItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsPathItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsPathItem) IsObscuredBy(item *QGraphicsItem) bool { @@ -1576,13 +1630,259 @@ func (this *QGraphicsPathItem) Type() int { return (int)(C.QGraphicsPathItem_Type(this.h)) } -func (this *QGraphicsPathItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsPathItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsPathItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsPathItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsPathItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_BoundingRect +func miqt_exec_callback_QGraphicsPathItem_BoundingRect(self *C.QGraphicsPathItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPathItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsPathItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPathItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Shape +func miqt_exec_callback_QGraphicsPathItem_Shape(self *C.QGraphicsPathItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPathItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsPathItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsPathItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsPathItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Contains +func miqt_exec_callback_QGraphicsPathItem_Contains(self *C.QGraphicsPathItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsPathItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsPathItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsPathItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Paint +func miqt_exec_callback_QGraphicsPathItem_Paint(self *C.QGraphicsPathItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsPathItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsPathItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsPathItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsPathItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_IsObscuredBy +func miqt_exec_callback_QGraphicsPathItem_IsObscuredBy(self *C.QGraphicsPathItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsPathItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPathItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_OpaqueArea +func miqt_exec_callback_QGraphicsPathItem_OpaqueArea(self *C.QGraphicsPathItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPathItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsPathItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsPathItem) OnType(slot func(super func() int) int) { + C.QGraphicsPathItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Type +func miqt_exec_callback_QGraphicsPathItem_Type(self *C.QGraphicsPathItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsPathItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsPathItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsPathItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_SupportsExtension +func miqt_exec_callback_QGraphicsPathItem_SupportsExtension(self *C.QGraphicsPathItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPathItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsPathItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsPathItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsPathItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_SetExtension +func miqt_exec_callback_QGraphicsPathItem_SetExtension(self *C.QGraphicsPathItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsPathItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsPathItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPathItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsPathItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPathItem_Extension +func miqt_exec_callback_QGraphicsPathItem_Extension(self *C.QGraphicsPathItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QGraphicsPathItem) Delete() { - C.QGraphicsPathItem_Delete(this.h) + C.QGraphicsPathItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1595,7 +1895,8 @@ func (this *QGraphicsPathItem) GoGC() { } type QGraphicsRectItem struct { - h *C.QGraphicsRectItem + h *C.QGraphicsRectItem + isSubclass bool *QAbstractGraphicsShapeItem } @@ -1613,51 +1914,95 @@ func (this *QGraphicsRectItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsRectItem(h *C.QGraphicsRectItem) *QGraphicsRectItem { +// newQGraphicsRectItem constructs the type using only CGO pointers. +func newQGraphicsRectItem(h *C.QGraphicsRectItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsRectItem { if h == nil { return nil } - return &QGraphicsRectItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} + return &QGraphicsRectItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsRectItem(h unsafe.Pointer) *QGraphicsRectItem { - return newQGraphicsRectItem((*C.QGraphicsRectItem)(h)) +// UnsafeNewQGraphicsRectItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsRectItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsRectItem { + if h == nil { + return nil + } + + return &QGraphicsRectItem{h: (*C.QGraphicsRectItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } // NewQGraphicsRectItem constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem() *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new() - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new(&outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem2 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem2(rect *QRectF) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new2(rect.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new2(rect.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem3 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem3(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem4 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem4(parent *QGraphicsItem) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new4(parent.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new4(parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem5 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsRectItem6 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsRectItem { - ret := C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer()) - return newQGraphicsRectItem(ret) + var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } func (this *QGraphicsRectItem) Rect() *QRectF { @@ -1693,8 +2038,8 @@ func (this *QGraphicsRectItem) Contains(point *QPointF) bool { return (bool)(C.QGraphicsRectItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsRectItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsRectItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsRectItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsRectItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsRectItem) IsObscuredBy(item *QGraphicsItem) bool { @@ -1712,1112 +2057,5578 @@ func (this *QGraphicsRectItem) Type() int { return (int)(C.QGraphicsRectItem_Type(this.h)) } -func (this *QGraphicsRectItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsRectItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} +func (this *QGraphicsRectItem) callVirtualBase_BoundingRect() *QRectF { -// Delete this object from C++ memory. -func (this *QGraphicsRectItem) Delete() { - C.QGraphicsRectItem_Delete(this.h) -} + _ret := C.QGraphicsRectItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsRectItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsRectItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } - -type QGraphicsEllipseItem struct { - h *C.QGraphicsEllipseItem - *QAbstractGraphicsShapeItem +func (this *QGraphicsRectItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsRectItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) cPointer() *C.QGraphicsEllipseItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsRectItem_BoundingRect +func miqt_exec_callback_QGraphicsRectItem_BoundingRect(self *C.QGraphicsRectItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h -} -func (this *QGraphicsEllipseItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_BoundingRect) -func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem) *QGraphicsEllipseItem { - if h == nil { - return nil - } - return &QGraphicsEllipseItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} -} + return virtualReturn.cPointer() -func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem((*C.QGraphicsEllipseItem)(h)) } -// NewQGraphicsEllipseItem constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem() *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new() - return newQGraphicsEllipseItem(ret) -} +func (this *QGraphicsRectItem) callVirtualBase_Shape() *QPainterPath { -// NewQGraphicsEllipseItem2 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem2(rect *QRectF) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new2(rect.cPointer()) - return newQGraphicsEllipseItem(ret) -} + _ret := C.QGraphicsRectItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// NewQGraphicsEllipseItem3 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem3(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) - return newQGraphicsEllipseItem(ret) } - -// NewQGraphicsEllipseItem4 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem4(parent *QGraphicsItem) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new4(parent.cPointer()) - return newQGraphicsEllipseItem(ret) +func (this *QGraphicsRectItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsRectItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQGraphicsEllipseItem5 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer()) - return newQGraphicsEllipseItem(ret) -} +//export miqt_exec_callback_QGraphicsRectItem_Shape +func miqt_exec_callback_QGraphicsRectItem_Shape(self *C.QGraphicsRectItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -// NewQGraphicsEllipseItem6 constructs a new QGraphicsEllipseItem object. -func NewQGraphicsEllipseItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsEllipseItem { - ret := C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer()) - return newQGraphicsEllipseItem(ret) -} + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Shape) -func (this *QGraphicsEllipseItem) Rect() *QRectF { - _ret := C.QGraphicsEllipseItem_Rect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + return virtualReturn.cPointer() -func (this *QGraphicsEllipseItem) SetRect(rect *QRectF) { - C.QGraphicsEllipseItem_SetRect(this.h, rect.cPointer()) } -func (this *QGraphicsEllipseItem) SetRect2(x float64, y float64, w float64, h float64) { - C.QGraphicsEllipseItem_SetRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) -} +func (this *QGraphicsRectItem) callVirtualBase_Contains(point *QPointF) bool { -func (this *QGraphicsEllipseItem) StartAngle() int { - return (int)(C.QGraphicsEllipseItem_StartAngle(this.h)) -} + return (bool)(C.QGraphicsRectItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) -func (this *QGraphicsEllipseItem) SetStartAngle(angle int) { - C.QGraphicsEllipseItem_SetStartAngle(this.h, (C.int)(angle)) } - -func (this *QGraphicsEllipseItem) SpanAngle() int { - return (int)(C.QGraphicsEllipseItem_SpanAngle(this.h)) +func (this *QGraphicsRectItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsRectItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) SetSpanAngle(angle int) { - C.QGraphicsEllipseItem_SetSpanAngle(this.h, (C.int)(angle)) -} +//export miqt_exec_callback_QGraphicsRectItem_Contains +func miqt_exec_callback_QGraphicsRectItem_Contains(self *C.QGraphicsRectItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) -func (this *QGraphicsEllipseItem) BoundingRect() *QRectF { - _ret := C.QGraphicsEllipseItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } -func (this *QGraphicsEllipseItem) Shape() *QPainterPath { - _ret := C.QGraphicsEllipseItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsRectItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsRectItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsRectItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsRectItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsEllipseItem_Contains(this.h, point.cPointer())) +//export miqt_exec_callback_QGraphicsRectItem_Paint +func miqt_exec_callback_QGraphicsRectItem_Paint(self *C.QGraphicsRectItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + } -func (this *QGraphicsEllipseItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsEllipseItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsRectItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsRectItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsRectItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsRectItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsEllipseItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsEllipseItem_IsObscuredBy(this.h, item.cPointer())) +//export miqt_exec_callback_QGraphicsRectItem_IsObscuredBy +func miqt_exec_callback_QGraphicsRectItem_IsObscuredBy(self *C.QGraphicsRectItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsEllipseItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsEllipseItem_OpaqueArea(this.h) +func (this *QGraphicsRectItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsRectItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsEllipseItem) Type() int { - return (int)(C.QGraphicsEllipseItem_Type(this.h)) } - -func (this *QGraphicsEllipseItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsEllipseItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsRectItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsRectItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// Delete this object from C++ memory. -func (this *QGraphicsEllipseItem) Delete() { - C.QGraphicsEllipseItem_Delete(this.h) -} +//export miqt_exec_callback_QGraphicsRectItem_OpaqueArea +func miqt_exec_callback_QGraphicsRectItem_OpaqueArea(self *C.QGraphicsRectItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsEllipseItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsEllipseItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } -type QGraphicsPolygonItem struct { - h *C.QGraphicsPolygonItem - *QAbstractGraphicsShapeItem +func (this *QGraphicsRectItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsRectItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsRectItem) OnType(slot func(super func() int) int) { + C.QGraphicsRectItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPolygonItem) cPointer() *C.QGraphicsPolygonItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsRectItem_Type +func miqt_exec_callback_QGraphicsRectItem_Type(self *C.QGraphicsRectItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + } -func (this *QGraphicsPolygonItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QGraphicsRectItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsRectItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsRectItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsRectItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem) *QGraphicsPolygonItem { - if h == nil { - return nil +//export miqt_exec_callback_QGraphicsRectItem_SupportsExtension +func miqt_exec_callback_QGraphicsRectItem_SupportsExtension(self *C.QGraphicsRectItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QGraphicsPolygonItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} -} -func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer) *QGraphicsPolygonItem { - return newQGraphicsPolygonItem((*C.QGraphicsPolygonItem)(h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) -// NewQGraphicsPolygonItem constructs a new QGraphicsPolygonItem object. -func NewQGraphicsPolygonItem() *QGraphicsPolygonItem { - ret := C.QGraphicsPolygonItem_new() - return newQGraphicsPolygonItem(ret) -} + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_SupportsExtension, slotval1) -// NewQGraphicsPolygonItem2 constructs a new QGraphicsPolygonItem object. -func NewQGraphicsPolygonItem2(parent *QGraphicsItem) *QGraphicsPolygonItem { - ret := C.QGraphicsPolygonItem_new2(parent.cPointer()) - return newQGraphicsPolygonItem(ret) -} + return (C.bool)(virtualReturn) -func (this *QGraphicsPolygonItem) FillRule() FillRule { - return (FillRule)(C.QGraphicsPolygonItem_FillRule(this.h)) } -func (this *QGraphicsPolygonItem) SetFillRule(rule FillRule) { - C.QGraphicsPolygonItem_SetFillRule(this.h, (C.int)(rule)) -} +func (this *QGraphicsRectItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { -func (this *QGraphicsPolygonItem) BoundingRect() *QRectF { - _ret := C.QGraphicsPolygonItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} + C.QGraphicsRectItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) -func (this *QGraphicsPolygonItem) Shape() *QPainterPath { - _ret := C.QGraphicsPolygonItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } - -func (this *QGraphicsPolygonItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsPolygonItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsRectItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsRectItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPolygonItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsPolygonItem_Paint(this.h, painter.cPointer(), option.cPointer()) -} +//export miqt_exec_callback_QGraphicsRectItem_SetExtension +func miqt_exec_callback_QGraphicsRectItem_SetExtension(self *C.QGraphicsRectItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) -func (this *QGraphicsPolygonItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsPolygonItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsPolygonItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsPolygonItem_OpaqueArea(this.h) - _goptr := newQPainterPath(_ret) +func (this *QGraphicsRectItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsRectItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsPolygonItem) Type() int { - return (int)(C.QGraphicsPolygonItem_Type(this.h)) } +func (this *QGraphicsRectItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsRectItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsRectItem_Extension +func miqt_exec_callback_QGraphicsRectItem_Extension(self *C.QGraphicsRectItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() -func (this *QGraphicsPolygonItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsPolygonItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } // Delete this object from C++ memory. -func (this *QGraphicsPolygonItem) Delete() { - C.QGraphicsPolygonItem_Delete(this.h) +func (this *QGraphicsRectItem) Delete() { + C.QGraphicsRectItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsPolygonItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsPolygonItem) { +func (this *QGraphicsRectItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsRectItem) { this.Delete() runtime.KeepAlive(this.h) }) } -type QGraphicsLineItem struct { - h *C.QGraphicsLineItem - *QGraphicsItem +type QGraphicsEllipseItem struct { + h *C.QGraphicsEllipseItem + isSubclass bool + *QAbstractGraphicsShapeItem } -func (this *QGraphicsLineItem) cPointer() *C.QGraphicsLineItem { +func (this *QGraphicsEllipseItem) cPointer() *C.QGraphicsEllipseItem { if this == nil { return nil } return this.h } -func (this *QGraphicsLineItem) UnsafePointer() unsafe.Pointer { +func (this *QGraphicsEllipseItem) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQGraphicsLineItem(h *C.QGraphicsLineItem) *QGraphicsLineItem { +// newQGraphicsEllipseItem constructs the type using only CGO pointers. +func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsEllipseItem { if h == nil { return nil } - return &QGraphicsLineItem{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} + return &QGraphicsEllipseItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsLineItem(h unsafe.Pointer) *QGraphicsLineItem { - return newQGraphicsLineItem((*C.QGraphicsLineItem)(h)) +// UnsafeNewQGraphicsEllipseItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsEllipseItem { + if h == nil { + return nil + } + + return &QGraphicsEllipseItem{h: (*C.QGraphicsEllipseItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -// NewQGraphicsLineItem constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem() *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new() - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem() *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new(&outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem2 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem2(line *QLineF) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new2(line.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem2 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem2(rect *QRectF) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new2(rect.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem3 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem3(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem3 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem3(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem4 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem4(parent *QGraphicsItem) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new4(parent.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem4 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem4(parent *QGraphicsItem) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new4(parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem5 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem5(line *QLineF, parent *QGraphicsItem) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem5 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsLineItem6 constructs a new QGraphicsLineItem object. -func NewQGraphicsLineItem6(x1 float64, y1 float64, x2 float64, y2 float64, parent *QGraphicsItem) *QGraphicsLineItem { - ret := C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer()) - return newQGraphicsLineItem(ret) +// NewQGraphicsEllipseItem6 constructs a new QGraphicsEllipseItem object. +func NewQGraphicsEllipseItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsEllipseItem { + var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsLineItem) Pen() *QPen { - _ret := C.QGraphicsLineItem_Pen(this.h) - _goptr := newQPen(_ret) +func (this *QGraphicsEllipseItem) Rect() *QRectF { + _ret := C.QGraphicsEllipseItem_Rect(this.h) + _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) SetPen(pen *QPen) { - C.QGraphicsLineItem_SetPen(this.h, pen.cPointer()) +func (this *QGraphicsEllipseItem) SetRect(rect *QRectF) { + C.QGraphicsEllipseItem_SetRect(this.h, rect.cPointer()) } -func (this *QGraphicsLineItem) Line() *QLineF { - _ret := C.QGraphicsLineItem_Line(this.h) - _goptr := newQLineF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsEllipseItem) SetRect2(x float64, y float64, w float64, h float64) { + C.QGraphicsEllipseItem_SetRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)) } -func (this *QGraphicsLineItem) SetLine(line *QLineF) { - C.QGraphicsLineItem_SetLine(this.h, line.cPointer()) +func (this *QGraphicsEllipseItem) StartAngle() int { + return (int)(C.QGraphicsEllipseItem_StartAngle(this.h)) } -func (this *QGraphicsLineItem) SetLine2(x1 float64, y1 float64, x2 float64, y2 float64) { - C.QGraphicsLineItem_SetLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) +func (this *QGraphicsEllipseItem) SetStartAngle(angle int) { + C.QGraphicsEllipseItem_SetStartAngle(this.h, (C.int)(angle)) } -func (this *QGraphicsLineItem) BoundingRect() *QRectF { - _ret := C.QGraphicsLineItem_BoundingRect(this.h) +func (this *QGraphicsEllipseItem) SpanAngle() int { + return (int)(C.QGraphicsEllipseItem_SpanAngle(this.h)) +} + +func (this *QGraphicsEllipseItem) SetSpanAngle(angle int) { + C.QGraphicsEllipseItem_SetSpanAngle(this.h, (C.int)(angle)) +} + +func (this *QGraphicsEllipseItem) BoundingRect() *QRectF { + _ret := C.QGraphicsEllipseItem_BoundingRect(this.h) _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) Shape() *QPainterPath { - _ret := C.QGraphicsLineItem_Shape(this.h) +func (this *QGraphicsEllipseItem) Shape() *QPainterPath { + _ret := C.QGraphicsEllipseItem_Shape(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsLineItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsEllipseItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsEllipseItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsLineItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsLineItem_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsEllipseItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsEllipseItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsLineItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsLineItem_IsObscuredBy(this.h, item.cPointer())) +func (this *QGraphicsEllipseItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsEllipseItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsLineItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsLineItem_OpaqueArea(this.h) +func (this *QGraphicsEllipseItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsEllipseItem_OpaqueArea(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsLineItem) Type() int { - return (int)(C.QGraphicsLineItem_Type(this.h)) +func (this *QGraphicsEllipseItem) Type() int { + return (int)(C.QGraphicsEllipseItem_Type(this.h)) } -func (this *QGraphicsLineItem) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsLineItem_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} +func (this *QGraphicsEllipseItem) callVirtualBase_BoundingRect() *QRectF { -// Delete this object from C++ memory. -func (this *QGraphicsLineItem) Delete() { - C.QGraphicsLineItem_Delete(this.h) -} + _ret := C.QGraphicsEllipseItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsLineItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsLineItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) } - -type QGraphicsPixmapItem struct { - h *C.QGraphicsPixmapItem - *QGraphicsItem +func (this *QGraphicsEllipseItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsEllipseItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) cPointer() *C.QGraphicsPixmapItem { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsEllipseItem_BoundingRect +func miqt_exec_callback_QGraphicsEllipseItem_BoundingRect(self *C.QGraphicsEllipseItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + } -func (this *QGraphicsPixmapItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QGraphicsEllipseItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsEllipseItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsEllipseItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsEllipseItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem) *QGraphicsPixmapItem { - if h == nil { - return nil +//export miqt_exec_callback_QGraphicsEllipseItem_Shape +func miqt_exec_callback_QGraphicsEllipseItem_Shape(self *C.QGraphicsEllipseItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QGraphicsPixmapItem{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} -} -func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer) *QGraphicsPixmapItem { - return newQGraphicsPixmapItem((*C.QGraphicsPixmapItem)(h)) -} + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Shape) -// NewQGraphicsPixmapItem constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem() *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new() - return newQGraphicsPixmapItem(ret) -} + return virtualReturn.cPointer() -// NewQGraphicsPixmapItem2 constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem2(pixmap *QPixmap) *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new2(pixmap.cPointer()) - return newQGraphicsPixmapItem(ret) } -// NewQGraphicsPixmapItem3 constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem3(parent *QGraphicsItem) *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new3(parent.cPointer()) - return newQGraphicsPixmapItem(ret) +func (this *QGraphicsEllipseItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsEllipseItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsEllipseItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsEllipseItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQGraphicsPixmapItem4 constructs a new QGraphicsPixmapItem object. -func NewQGraphicsPixmapItem4(pixmap *QPixmap, parent *QGraphicsItem) *QGraphicsPixmapItem { - ret := C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer()) - return newQGraphicsPixmapItem(ret) +//export miqt_exec_callback_QGraphicsEllipseItem_Contains +func miqt_exec_callback_QGraphicsEllipseItem_Contains(self *C.QGraphicsEllipseItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Pixmap() *QPixmap { - _ret := C.QGraphicsPixmapItem_Pixmap(this.h) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsEllipseItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsEllipseItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsEllipseItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsEllipseItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetPixmap(pixmap *QPixmap) { - C.QGraphicsPixmapItem_SetPixmap(this.h, pixmap.cPointer()) +//export miqt_exec_callback_QGraphicsEllipseItem_Paint +func miqt_exec_callback_QGraphicsEllipseItem_Paint(self *C.QGraphicsEllipseItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + } -func (this *QGraphicsPixmapItem) TransformationMode() TransformationMode { - return (TransformationMode)(C.QGraphicsPixmapItem_TransformationMode(this.h)) +func (this *QGraphicsEllipseItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsEllipseItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsEllipseItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsEllipseItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetTransformationMode(mode TransformationMode) { - C.QGraphicsPixmapItem_SetTransformationMode(this.h, (C.int)(mode)) +//export miqt_exec_callback_QGraphicsEllipseItem_IsObscuredBy +func miqt_exec_callback_QGraphicsEllipseItem_IsObscuredBy(self *C.QGraphicsEllipseItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Offset() *QPointF { - _ret := C.QGraphicsPixmapItem_Offset(this.h) - _goptr := newQPointF(_ret) +func (this *QGraphicsEllipseItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsEllipseItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsEllipseItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsEllipseItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetOffset(offset *QPointF) { - C.QGraphicsPixmapItem_SetOffset(this.h, offset.cPointer()) +//export miqt_exec_callback_QGraphicsEllipseItem_OpaqueArea +func miqt_exec_callback_QGraphicsEllipseItem_OpaqueArea(self *C.QGraphicsEllipseItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + } -func (this *QGraphicsPixmapItem) SetOffset2(x float64, y float64) { - C.QGraphicsPixmapItem_SetOffset2(this.h, (C.double)(x), (C.double)(y)) +func (this *QGraphicsEllipseItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsEllipseItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsEllipseItem) OnType(slot func(super func() int) int) { + C.QGraphicsEllipseItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) BoundingRect() *QRectF { - _ret := C.QGraphicsPixmapItem_BoundingRect(this.h) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QGraphicsEllipseItem_Type +func miqt_exec_callback_QGraphicsEllipseItem_Type(self *C.QGraphicsEllipseItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Shape() *QPainterPath { - _ret := C.QGraphicsPixmapItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QGraphicsEllipseItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsEllipseItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsEllipseItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsEllipseItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsPixmapItem_Contains(this.h, point.cPointer())) +//export miqt_exec_callback_QGraphicsEllipseItem_SupportsExtension +func miqt_exec_callback_QGraphicsEllipseItem_SupportsExtension(self *C.QGraphicsEllipseItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsPixmapItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsPixmapItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsEllipseItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsEllipseItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsEllipseItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsEllipseItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsPixmapItem_IsObscuredBy(this.h, item.cPointer())) +//export miqt_exec_callback_QGraphicsEllipseItem_SetExtension +func miqt_exec_callback_QGraphicsEllipseItem_SetExtension(self *C.QGraphicsEllipseItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + } -func (this *QGraphicsPixmapItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsPixmapItem_OpaqueArea(this.h) - _goptr := newQPainterPath(_ret) +func (this *QGraphicsEllipseItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsEllipseItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsPixmapItem) Type() int { - return (int)(C.QGraphicsPixmapItem_Type(this.h)) } - -func (this *QGraphicsPixmapItem) ShapeMode() QGraphicsPixmapItem__ShapeMode { - return (QGraphicsPixmapItem__ShapeMode)(C.QGraphicsPixmapItem_ShapeMode(this.h)) +func (this *QGraphicsEllipseItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsEllipseItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsPixmapItem) SetShapeMode(mode QGraphicsPixmapItem__ShapeMode) { - C.QGraphicsPixmapItem_SetShapeMode(this.h, (C.int)(mode)) +//export miqt_exec_callback_QGraphicsEllipseItem_Extension +func miqt_exec_callback_QGraphicsEllipseItem_Extension(self *C.QGraphicsEllipseItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. -func (this *QGraphicsPixmapItem) Delete() { - C.QGraphicsPixmapItem_Delete(this.h) +func (this *QGraphicsEllipseItem) Delete() { + C.QGraphicsEllipseItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsPixmapItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsPixmapItem) { +func (this *QGraphicsEllipseItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsEllipseItem) { this.Delete() runtime.KeepAlive(this.h) }) } -type QGraphicsTextItem struct { - h *C.QGraphicsTextItem - *QGraphicsObject +type QGraphicsPolygonItem struct { + h *C.QGraphicsPolygonItem + isSubclass bool + *QAbstractGraphicsShapeItem } -func (this *QGraphicsTextItem) cPointer() *C.QGraphicsTextItem { +func (this *QGraphicsPolygonItem) cPointer() *C.QGraphicsPolygonItem { if this == nil { return nil } return this.h } -func (this *QGraphicsTextItem) UnsafePointer() unsafe.Pointer { +func (this *QGraphicsPolygonItem) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQGraphicsTextItem(h *C.QGraphicsTextItem) *QGraphicsTextItem { +// newQGraphicsPolygonItem constructs the type using only CGO pointers. +func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPolygonItem { if h == nil { return nil } - return &QGraphicsTextItem{h: h, QGraphicsObject: UnsafeNewQGraphicsObject(unsafe.Pointer(h))} + return &QGraphicsPolygonItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -func UnsafeNewQGraphicsTextItem(h unsafe.Pointer) *QGraphicsTextItem { - return newQGraphicsTextItem((*C.QGraphicsTextItem)(h)) +// UnsafeNewQGraphicsPolygonItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPolygonItem { + if h == nil { + return nil + } + + return &QGraphicsPolygonItem{h: (*C.QGraphicsPolygonItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} } -// NewQGraphicsTextItem constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem() *QGraphicsTextItem { - ret := C.QGraphicsTextItem_new() - return newQGraphicsTextItem(ret) +// NewQGraphicsPolygonItem constructs a new QGraphicsPolygonItem object. +func NewQGraphicsPolygonItem() *QGraphicsPolygonItem { + var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPolygonItem_new(&outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsTextItem2 constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem2(text string) *QGraphicsTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsTextItem_new2(text_ms) - return newQGraphicsTextItem(ret) +// NewQGraphicsPolygonItem2 constructs a new QGraphicsPolygonItem object. +func NewQGraphicsPolygonItem2(parent *QGraphicsItem) *QGraphicsPolygonItem { + var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPolygonItem_new2(parent.cPointer(), &outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsTextItem3 constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem3(parent *QGraphicsItem) *QGraphicsTextItem { - ret := C.QGraphicsTextItem_new3(parent.cPointer()) - return newQGraphicsTextItem(ret) +func (this *QGraphicsPolygonItem) FillRule() FillRule { + return (FillRule)(C.QGraphicsPolygonItem_FillRule(this.h)) } -// NewQGraphicsTextItem4 constructs a new QGraphicsTextItem object. -func NewQGraphicsTextItem4(text string, parent *QGraphicsItem) *QGraphicsTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsTextItem_new4(text_ms, parent.cPointer()) - return newQGraphicsTextItem(ret) +func (this *QGraphicsPolygonItem) SetFillRule(rule FillRule) { + C.QGraphicsPolygonItem_SetFillRule(this.h, (C.int)(rule)) } -func (this *QGraphicsTextItem) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsTextItem_MetaObject(this.h))) +func (this *QGraphicsPolygonItem) BoundingRect() *QRectF { + _ret := C.QGraphicsPolygonItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr } -func (this *QGraphicsTextItem) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QGraphicsTextItem_Metacast(this.h, param1_Cstring)) +func (this *QGraphicsPolygonItem) Shape() *QPainterPath { + _ret := C.QGraphicsPolygonItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr } -func QGraphicsTextItem_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QGraphicsPolygonItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsPolygonItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsTextItem) ToHtml() string { - var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToHtml(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - -func (this *QGraphicsTextItem) SetHtml(html string) { - html_ms := C.struct_miqt_string{} - html_ms.data = C.CString(html) - html_ms.len = C.size_t(len(html)) - defer C.free(unsafe.Pointer(html_ms.data)) - C.QGraphicsTextItem_SetHtml(this.h, html_ms) -} - -func (this *QGraphicsTextItem) ToPlainText() string { - var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToPlainText(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QGraphicsPolygonItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsPolygonItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsTextItem) SetPlainText(text string) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QGraphicsTextItem_SetPlainText(this.h, text_ms) +func (this *QGraphicsPolygonItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsPolygonItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsTextItem) Font() *QFont { - _ret := C.QGraphicsTextItem_Font(this.h) - _goptr := newQFont(_ret) +func (this *QGraphicsPolygonItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsPolygonItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsTextItem) SetFont(font *QFont) { - C.QGraphicsTextItem_SetFont(this.h, font.cPointer()) -} - -func (this *QGraphicsTextItem) SetDefaultTextColor(c *QColor) { - C.QGraphicsTextItem_SetDefaultTextColor(this.h, c.cPointer()) +func (this *QGraphicsPolygonItem) Type() int { + return (int)(C.QGraphicsPolygonItem_Type(this.h)) } -func (this *QGraphicsTextItem) DefaultTextColor() *QColor { - _ret := C.QGraphicsTextItem_DefaultTextColor(this.h) - _goptr := newQColor(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} +func (this *QGraphicsPolygonItem) callVirtualBase_BoundingRect() *QRectF { -func (this *QGraphicsTextItem) BoundingRect() *QRectF { - _ret := C.QGraphicsTextItem_BoundingRect(this.h) + _ret := C.QGraphicsPolygonItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsTextItem) Shape() *QPainterPath { - _ret := C.QGraphicsTextItem_Shape(this.h) - _goptr := newQPainterPath(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr } - -func (this *QGraphicsTextItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsTextItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsPolygonItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsPolygonItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) -} +//export miqt_exec_callback_QGraphicsPolygonItem_BoundingRect +func miqt_exec_callback_QGraphicsPolygonItem_BoundingRect(self *C.QGraphicsPolygonItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() -func (this *QGraphicsTextItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsTextItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsTextItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsTextItem_OpaqueArea(this.h) +func (this *QGraphicsPolygonItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsPolygonItem_virtualbase_Shape(unsafe.Pointer(this.h)) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr -} -func (this *QGraphicsTextItem) Type() int { - return (int)(C.QGraphicsTextItem_Type(this.h)) } - -func (this *QGraphicsTextItem) SetTextWidth(width float64) { - C.QGraphicsTextItem_SetTextWidth(this.h, (C.double)(width)) +func (this *QGraphicsPolygonItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPolygonItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) TextWidth() float64 { - return (float64)(C.QGraphicsTextItem_TextWidth(this.h)) -} +//export miqt_exec_callback_QGraphicsPolygonItem_Shape +func miqt_exec_callback_QGraphicsPolygonItem_Shape(self *C.QGraphicsPolygonItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() -func (this *QGraphicsTextItem) AdjustSize() { - C.QGraphicsTextItem_AdjustSize(this.h) } -func (this *QGraphicsTextItem) SetDocument(document *QTextDocument) { - C.QGraphicsTextItem_SetDocument(this.h, document.cPointer()) +func (this *QGraphicsPolygonItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsPolygonItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsPolygonItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsPolygonItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QGraphicsTextItem_Document(this.h))) +//export miqt_exec_callback_QGraphicsPolygonItem_Contains +func miqt_exec_callback_QGraphicsPolygonItem_Contains(self *C.QGraphicsPolygonItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsTextItem) SetTextInteractionFlags(flags TextInteractionFlag) { - C.QGraphicsTextItem_SetTextInteractionFlags(this.h, (C.int)(flags)) +func (this *QGraphicsPolygonItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsPolygonItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsPolygonItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsPolygonItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) TextInteractionFlags() TextInteractionFlag { - return (TextInteractionFlag)(C.QGraphicsTextItem_TextInteractionFlags(this.h)) +//export miqt_exec_callback_QGraphicsPolygonItem_Paint +func miqt_exec_callback_QGraphicsPolygonItem_Paint(self *C.QGraphicsPolygonItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + } -func (this *QGraphicsTextItem) SetTabChangesFocus(b bool) { - C.QGraphicsTextItem_SetTabChangesFocus(this.h, (C.bool)(b)) +func (this *QGraphicsPolygonItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsPolygonItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsPolygonItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsPolygonItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) TabChangesFocus() bool { - return (bool)(C.QGraphicsTextItem_TabChangesFocus(this.h)) +//export miqt_exec_callback_QGraphicsPolygonItem_IsObscuredBy +func miqt_exec_callback_QGraphicsPolygonItem_IsObscuredBy(self *C.QGraphicsPolygonItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsTextItem) SetOpenExternalLinks(open bool) { - C.QGraphicsTextItem_SetOpenExternalLinks(this.h, (C.bool)(open)) +func (this *QGraphicsPolygonItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsPolygonItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPolygonItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPolygonItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) OpenExternalLinks() bool { - return (bool)(C.QGraphicsTextItem_OpenExternalLinks(this.h)) +//export miqt_exec_callback_QGraphicsPolygonItem_OpaqueArea +func miqt_exec_callback_QGraphicsPolygonItem_OpaqueArea(self *C.QGraphicsPolygonItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + } -func (this *QGraphicsTextItem) SetTextCursor(cursor *QTextCursor) { - C.QGraphicsTextItem_SetTextCursor(this.h, cursor.cPointer()) +func (this *QGraphicsPolygonItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsPolygonItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsPolygonItem) OnType(slot func(super func() int) int) { + C.QGraphicsPolygonItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsTextItem) TextCursor() *QTextCursor { - _ret := C.QGraphicsTextItem_TextCursor(this.h) - _goptr := newQTextCursor(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QGraphicsPolygonItem_Type +func miqt_exec_callback_QGraphicsPolygonItem_Type(self *C.QGraphicsPolygonItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + } -func (this *QGraphicsTextItem) LinkActivated(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QGraphicsTextItem_LinkActivated(this.h, param1_ms) +func (this *QGraphicsPolygonItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsPolygonItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + } -func (this *QGraphicsTextItem) OnLinkActivated(slot func(param1 string)) { - C.QGraphicsTextItem_connect_LinkActivated(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QGraphicsPolygonItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsPolygonItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QGraphicsTextItem_LinkActivated -func miqt_exec_callback_QGraphicsTextItem_LinkActivated(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QGraphicsPolygonItem_SupportsExtension +func miqt_exec_callback_QGraphicsPolygonItem_SupportsExtension(self *C.QGraphicsPolygonItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) - gofunc(slotval1) } -func (this *QGraphicsTextItem) LinkHovered(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QGraphicsTextItem_LinkHovered(this.h, param1_ms) +func (this *QGraphicsPolygonItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsPolygonItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + } -func (this *QGraphicsTextItem) OnLinkHovered(slot func(param1 string)) { - C.QGraphicsTextItem_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QGraphicsPolygonItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsPolygonItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QGraphicsTextItem_LinkHovered -func miqt_exec_callback_QGraphicsTextItem_LinkHovered(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QGraphicsPolygonItem_SetExtension +func miqt_exec_callback_QGraphicsPolygonItem_SetExtension(self *C.QGraphicsPolygonItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) - gofunc(slotval1) } -func QGraphicsTextItem_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QGraphicsPolygonItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsPolygonItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPolygonItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsPolygonItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QGraphicsTextItem_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QGraphicsPolygonItem_Extension +func miqt_exec_callback_QGraphicsPolygonItem_Extension(self *C.QGraphicsPolygonItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. -func (this *QGraphicsTextItem) Delete() { - C.QGraphicsTextItem_Delete(this.h) +func (this *QGraphicsPolygonItem) Delete() { + C.QGraphicsPolygonItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsTextItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsTextItem) { +func (this *QGraphicsPolygonItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsPolygonItem) { this.Delete() runtime.KeepAlive(this.h) }) } -type QGraphicsSimpleTextItem struct { - h *C.QGraphicsSimpleTextItem - *QAbstractGraphicsShapeItem +type QGraphicsLineItem struct { + h *C.QGraphicsLineItem + isSubclass bool + *QGraphicsItem } -func (this *QGraphicsSimpleTextItem) cPointer() *C.QGraphicsSimpleTextItem { +func (this *QGraphicsLineItem) cPointer() *C.QGraphicsLineItem { if this == nil { return nil } return this.h } -func (this *QGraphicsSimpleTextItem) UnsafePointer() unsafe.Pointer { +func (this *QGraphicsLineItem) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem) *QGraphicsSimpleTextItem { +// newQGraphicsLineItem constructs the type using only CGO pointers. +func newQGraphicsLineItem(h *C.QGraphicsLineItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsLineItem { if h == nil { return nil } - return &QGraphicsSimpleTextItem{h: h, QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(unsafe.Pointer(h))} + return &QGraphicsLineItem{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} } -func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer) *QGraphicsSimpleTextItem { - return newQGraphicsSimpleTextItem((*C.QGraphicsSimpleTextItem)(h)) -} +// UnsafeNewQGraphicsLineItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsLineItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsLineItem { + if h == nil { + return nil + } -// NewQGraphicsSimpleTextItem constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem() *QGraphicsSimpleTextItem { - ret := C.QGraphicsSimpleTextItem_new() - return newQGraphicsSimpleTextItem(ret) + return &QGraphicsLineItem{h: (*C.QGraphicsLineItem)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } -// NewQGraphicsSimpleTextItem2 constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem2(text string) *QGraphicsSimpleTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsSimpleTextItem_new2(text_ms) - return newQGraphicsSimpleTextItem(ret) +// NewQGraphicsLineItem constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem() *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new(&outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsSimpleTextItem3 constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem3(parent *QGraphicsItem) *QGraphicsSimpleTextItem { - ret := C.QGraphicsSimpleTextItem_new3(parent.cPointer()) - return newQGraphicsSimpleTextItem(ret) +// NewQGraphicsLineItem2 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem2(line *QLineF) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new2(line.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -// NewQGraphicsSimpleTextItem4 constructs a new QGraphicsSimpleTextItem object. -func NewQGraphicsSimpleTextItem4(text string, parent *QGraphicsItem) *QGraphicsSimpleTextItem { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer()) - return newQGraphicsSimpleTextItem(ret) +// NewQGraphicsLineItem3 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem3(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsSimpleTextItem) SetText(text string) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QGraphicsSimpleTextItem_SetText(this.h, text_ms) +// NewQGraphicsLineItem4 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem4(parent *QGraphicsItem) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new4(parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsSimpleTextItem) Text() string { - var _ms C.struct_miqt_string = C.QGraphicsSimpleTextItem_Text(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +// NewQGraphicsLineItem5 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem5(line *QLineF, parent *QGraphicsItem) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsSimpleTextItem) SetFont(font *QFont) { - C.QGraphicsSimpleTextItem_SetFont(this.h, font.cPointer()) +// NewQGraphicsLineItem6 constructs a new QGraphicsLineItem object. +func NewQGraphicsLineItem6(x1 float64, y1 float64, x2 float64, y2 float64, parent *QGraphicsItem) *QGraphicsLineItem { + var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) + ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } -func (this *QGraphicsSimpleTextItem) Font() *QFont { - _ret := C.QGraphicsSimpleTextItem_Font(this.h) - _goptr := newQFont(_ret) +func (this *QGraphicsLineItem) Pen() *QPen { + _ret := C.QGraphicsLineItem_Pen(this.h) + _goptr := newQPen(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsSimpleTextItem) BoundingRect() *QRectF { - _ret := C.QGraphicsSimpleTextItem_BoundingRect(this.h) +func (this *QGraphicsLineItem) SetPen(pen *QPen) { + C.QGraphicsLineItem_SetPen(this.h, pen.cPointer()) +} + +func (this *QGraphicsLineItem) Line() *QLineF { + _ret := C.QGraphicsLineItem_Line(this.h) + _goptr := newQLineF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsLineItem) SetLine(line *QLineF) { + C.QGraphicsLineItem_SetLine(this.h, line.cPointer()) +} + +func (this *QGraphicsLineItem) SetLine2(x1 float64, y1 float64, x2 float64, y2 float64) { + C.QGraphicsLineItem_SetLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) +} + +func (this *QGraphicsLineItem) BoundingRect() *QRectF { + _ret := C.QGraphicsLineItem_BoundingRect(this.h) _goptr := newQRectF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsSimpleTextItem) Shape() *QPainterPath { - _ret := C.QGraphicsSimpleTextItem_Shape(this.h) +func (this *QGraphicsLineItem) Shape() *QPainterPath { + _ret := C.QGraphicsLineItem_Shape(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsSimpleTextItem) Contains(point *QPointF) bool { - return (bool)(C.QGraphicsSimpleTextItem_Contains(this.h, point.cPointer())) +func (this *QGraphicsLineItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsLineItem_Contains(this.h, point.cPointer())) } -func (this *QGraphicsSimpleTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsSimpleTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsLineItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsLineItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsSimpleTextItem) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsSimpleTextItem_IsObscuredBy(this.h, item.cPointer())) +func (this *QGraphicsLineItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsLineItem_IsObscuredBy(this.h, item.cPointer())) } -func (this *QGraphicsSimpleTextItem) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsSimpleTextItem_OpaqueArea(this.h) +func (this *QGraphicsLineItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsLineItem_OpaqueArea(this.h) _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QGraphicsSimpleTextItem) Type() int { - return (int)(C.QGraphicsSimpleTextItem_Type(this.h)) +func (this *QGraphicsLineItem) Type() int { + return (int)(C.QGraphicsLineItem_Type(this.h)) } -// Delete this object from C++ memory. -func (this *QGraphicsSimpleTextItem) Delete() { - C.QGraphicsSimpleTextItem_Delete(this.h) +func (this *QGraphicsLineItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsLineItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsLineItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QGraphicsSimpleTextItem) GoGC() { - runtime.SetFinalizer(this, func(this *QGraphicsSimpleTextItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QGraphicsLineItem_BoundingRect +func miqt_exec_callback_QGraphicsLineItem_BoundingRect(self *C.QGraphicsLineItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + } -type QGraphicsItemGroup struct { - h *C.QGraphicsItemGroup - *QGraphicsItem +func (this *QGraphicsLineItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsLineItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsLineItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsItemGroup) cPointer() *C.QGraphicsItemGroup { - if this == nil { - return nil +//export miqt_exec_callback_QGraphicsLineItem_Shape +func miqt_exec_callback_QGraphicsLineItem_Shape(self *C.QGraphicsLineItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + } -func (this *QGraphicsItemGroup) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QGraphicsLineItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsLineItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsLineItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQGraphicsItemGroup(h *C.QGraphicsItemGroup) *QGraphicsItemGroup { - if h == nil { - return nil +//export miqt_exec_callback_QGraphicsLineItem_Contains +func miqt_exec_callback_QGraphicsLineItem_Contains(self *C.QGraphicsLineItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QGraphicsItemGroup{h: h, QGraphicsItem: UnsafeNewQGraphicsItem(unsafe.Pointer(h))} -} -func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer) *QGraphicsItemGroup { - return newQGraphicsItemGroup((*C.QGraphicsItemGroup)(h)) + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + } -// NewQGraphicsItemGroup constructs a new QGraphicsItemGroup object. -func NewQGraphicsItemGroup() *QGraphicsItemGroup { - ret := C.QGraphicsItemGroup_new() - return newQGraphicsItemGroup(ret) +func (this *QGraphicsLineItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsLineItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsLineItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsLineItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQGraphicsItemGroup2 constructs a new QGraphicsItemGroup object. -func NewQGraphicsItemGroup2(parent *QGraphicsItem) *QGraphicsItemGroup { - ret := C.QGraphicsItemGroup_new2(parent.cPointer()) - return newQGraphicsItemGroup(ret) +//export miqt_exec_callback_QGraphicsLineItem_Paint +func miqt_exec_callback_QGraphicsLineItem_Paint(self *C.QGraphicsLineItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + } -func (this *QGraphicsItemGroup) AddToGroup(item *QGraphicsItem) { - C.QGraphicsItemGroup_AddToGroup(this.h, item.cPointer()) +func (this *QGraphicsLineItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsLineItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsLineItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsItemGroup) RemoveFromGroup(item *QGraphicsItem) { - C.QGraphicsItemGroup_RemoveFromGroup(this.h, item.cPointer()) +//export miqt_exec_callback_QGraphicsLineItem_IsObscuredBy +func miqt_exec_callback_QGraphicsLineItem_IsObscuredBy(self *C.QGraphicsLineItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QGraphicsItemGroup) BoundingRect() *QRectF { - _ret := C.QGraphicsItemGroup_BoundingRect(this.h) - _goptr := newQRectF(_ret) +func (this *QGraphicsLineItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsLineItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsLineItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsLineItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_OpaqueArea +func miqt_exec_callback_QGraphicsLineItem_OpaqueArea(self *C.QGraphicsLineItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + } -func (this *QGraphicsItemGroup) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsItemGroup_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsLineItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsLineItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsLineItem) OnType(slot func(super func() int) int) { + C.QGraphicsLineItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsItemGroup) IsObscuredBy(item *QGraphicsItem) bool { - return (bool)(C.QGraphicsItemGroup_IsObscuredBy(this.h, item.cPointer())) +//export miqt_exec_callback_QGraphicsLineItem_Type +func miqt_exec_callback_QGraphicsLineItem_Type(self *C.QGraphicsLineItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + } -func (this *QGraphicsItemGroup) OpaqueArea() *QPainterPath { - _ret := C.QGraphicsItemGroup_OpaqueArea(this.h) - _goptr := newQPainterPath(_ret) +func (this *QGraphicsLineItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsLineItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsLineItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SupportsExtension +func miqt_exec_callback_QGraphicsLineItem_SupportsExtension(self *C.QGraphicsLineItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsLineItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsLineItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsLineItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SetExtension +func miqt_exec_callback_QGraphicsLineItem_SetExtension(self *C.QGraphicsLineItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsLineItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsLineItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsLineItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsLineItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsItemGroup) Type() int { - return (int)(C.QGraphicsItemGroup_Type(this.h)) +//export miqt_exec_callback_QGraphicsLineItem_Extension +func miqt_exec_callback_QGraphicsLineItem_Extension(self *C.QGraphicsLineItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_Advance(phase int) { + + C.QGraphicsLineItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + } +func (this *QGraphicsLineItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsLineItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_Advance +func miqt_exec_callback_QGraphicsLineItem_Advance(self *C.QGraphicsLineItem, cb C.intptr_t, phase C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(phase int), phase int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(phase) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Advance, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsLineItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsLineItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_CollidesWithItem +func miqt_exec_callback_QGraphicsLineItem_CollidesWithItem(self *C.QGraphicsLineItem, cb C.intptr_t, other *C.QGraphicsItem, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(other)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsLineItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsLineItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_CollidesWithPath +func miqt_exec_callback_QGraphicsLineItem_CollidesWithPath(self *C.QGraphicsLineItem, cb C.intptr_t, path *C.QPainterPath, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsLineItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsLineItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SceneEventFilter +func miqt_exec_callback_QGraphicsLineItem_SceneEventFilter(self *C.QGraphicsLineItem, cb C.intptr_t, watched *C.QGraphicsItem, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsLineItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsLineItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsLineItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_SceneEvent +func miqt_exec_callback_QGraphicsLineItem_SceneEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsLineItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsLineItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsLineItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DragEnterEvent +func miqt_exec_callback_QGraphicsLineItem_DragEnterEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DragMoveEvent +func miqt_exec_callback_QGraphicsLineItem_DragMoveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsLineItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsLineItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_DropEvent +func miqt_exec_callback_QGraphicsLineItem_DropEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsLineItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsLineItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_FocusInEvent +func miqt_exec_callback_QGraphicsLineItem_FocusInEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsLineItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsLineItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_FocusOutEvent +func miqt_exec_callback_QGraphicsLineItem_FocusOutEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsLineItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsLineItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsLineItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsLineItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsLineItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsLineItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsLineItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsLineItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_KeyPressEvent +func miqt_exec_callback_QGraphicsLineItem_KeyPressEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsLineItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsLineItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MousePressEvent +func miqt_exec_callback_QGraphicsLineItem_MousePressEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsLineItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsLineItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsLineItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsLineItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_WheelEvent +func miqt_exec_callback_QGraphicsLineItem_WheelEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsLineItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsLineItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsLineItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_InputMethodEvent +func miqt_exec_callback_QGraphicsLineItem_InputMethodEvent(self *C.QGraphicsLineItem, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsLineItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsLineItem_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsLineItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_InputMethodQuery +func miqt_exec_callback_QGraphicsLineItem_InputMethodQuery(self *C.QGraphicsLineItem, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLineItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsLineItem_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsLineItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsLineItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLineItem_ItemChange +func miqt_exec_callback_QGraphicsLineItem_ItemChange(self *C.QGraphicsLineItem, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QGraphicsLineItem) Delete() { + C.QGraphicsLineItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsLineItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsLineItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsPixmapItem struct { + h *C.QGraphicsPixmapItem + isSubclass bool + *QGraphicsItem +} + +func (this *QGraphicsPixmapItem) cPointer() *C.QGraphicsPixmapItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsPixmapItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsPixmapItem constructs the type using only CGO pointers. +func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPixmapItem { + if h == nil { + return nil + } + return &QGraphicsPixmapItem{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsPixmapItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPixmapItem { + if h == nil { + return nil + } + + return &QGraphicsPixmapItem{h: (*C.QGraphicsPixmapItem)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +} + +// NewQGraphicsPixmapItem constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem() *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new(&outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsPixmapItem2 constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem2(pixmap *QPixmap) *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new2(pixmap.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsPixmapItem3 constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem3(parent *QGraphicsItem) *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new3(parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsPixmapItem4 constructs a new QGraphicsPixmapItem object. +func NewQGraphicsPixmapItem4(pixmap *QPixmap, parent *QGraphicsItem) *QGraphicsPixmapItem { + var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsPixmapItem) Pixmap() *QPixmap { + _ret := C.QGraphicsPixmapItem_Pixmap(this.h) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) SetPixmap(pixmap *QPixmap) { + C.QGraphicsPixmapItem_SetPixmap(this.h, pixmap.cPointer()) +} + +func (this *QGraphicsPixmapItem) TransformationMode() TransformationMode { + return (TransformationMode)(C.QGraphicsPixmapItem_TransformationMode(this.h)) +} + +func (this *QGraphicsPixmapItem) SetTransformationMode(mode TransformationMode) { + C.QGraphicsPixmapItem_SetTransformationMode(this.h, (C.int)(mode)) +} + +func (this *QGraphicsPixmapItem) Offset() *QPointF { + _ret := C.QGraphicsPixmapItem_Offset(this.h) + _goptr := newQPointF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) SetOffset(offset *QPointF) { + C.QGraphicsPixmapItem_SetOffset(this.h, offset.cPointer()) +} + +func (this *QGraphicsPixmapItem) SetOffset2(x float64, y float64) { + C.QGraphicsPixmapItem_SetOffset2(this.h, (C.double)(x), (C.double)(y)) +} + +func (this *QGraphicsPixmapItem) BoundingRect() *QRectF { + _ret := C.QGraphicsPixmapItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) Shape() *QPainterPath { + _ret := C.QGraphicsPixmapItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsPixmapItem_Contains(this.h, point.cPointer())) +} + +func (this *QGraphicsPixmapItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsPixmapItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsPixmapItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsPixmapItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsPixmapItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsPixmapItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsPixmapItem) Type() int { + return (int)(C.QGraphicsPixmapItem_Type(this.h)) +} + +func (this *QGraphicsPixmapItem) ShapeMode() QGraphicsPixmapItem__ShapeMode { + return (QGraphicsPixmapItem__ShapeMode)(C.QGraphicsPixmapItem_ShapeMode(this.h)) +} + +func (this *QGraphicsPixmapItem) SetShapeMode(mode QGraphicsPixmapItem__ShapeMode) { + C.QGraphicsPixmapItem_SetShapeMode(this.h, (C.int)(mode)) +} + +func (this *QGraphicsPixmapItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsPixmapItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsPixmapItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_BoundingRect +func miqt_exec_callback_QGraphicsPixmapItem_BoundingRect(self *C.QGraphicsPixmapItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsPixmapItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPixmapItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Shape +func miqt_exec_callback_QGraphicsPixmapItem_Shape(self *C.QGraphicsPixmapItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsPixmapItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Contains +func miqt_exec_callback_QGraphicsPixmapItem_Contains(self *C.QGraphicsPixmapItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsPixmapItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsPixmapItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Paint +func miqt_exec_callback_QGraphicsPixmapItem_Paint(self *C.QGraphicsPixmapItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsPixmapItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_IsObscuredBy +func miqt_exec_callback_QGraphicsPixmapItem_IsObscuredBy(self *C.QGraphicsPixmapItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsPixmapItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsPixmapItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_OpaqueArea +func miqt_exec_callback_QGraphicsPixmapItem_OpaqueArea(self *C.QGraphicsPixmapItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsPixmapItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsPixmapItem) OnType(slot func(super func() int) int) { + C.QGraphicsPixmapItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Type +func miqt_exec_callback_QGraphicsPixmapItem_Type(self *C.QGraphicsPixmapItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsPixmapItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsPixmapItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SupportsExtension +func miqt_exec_callback_QGraphicsPixmapItem_SupportsExtension(self *C.QGraphicsPixmapItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsPixmapItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsPixmapItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SetExtension +func miqt_exec_callback_QGraphicsPixmapItem_SetExtension(self *C.QGraphicsPixmapItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsPixmapItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsPixmapItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Extension +func miqt_exec_callback_QGraphicsPixmapItem_Extension(self *C.QGraphicsPixmapItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_Advance(phase int) { + + C.QGraphicsPixmapItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsPixmapItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsPixmapItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_Advance +func miqt_exec_callback_QGraphicsPixmapItem_Advance(self *C.QGraphicsPixmapItem, cb C.intptr_t, phase C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(phase int), phase int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(phase) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Advance, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsPixmapItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsPixmapItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_CollidesWithItem +func miqt_exec_callback_QGraphicsPixmapItem_CollidesWithItem(self *C.QGraphicsPixmapItem, cb C.intptr_t, other *C.QGraphicsItem, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(other)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsPixmapItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsPixmapItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_CollidesWithPath +func miqt_exec_callback_QGraphicsPixmapItem_CollidesWithPath(self *C.QGraphicsPixmapItem, cb C.intptr_t, path *C.QPainterPath, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsPixmapItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SceneEventFilter +func miqt_exec_callback_QGraphicsPixmapItem_SceneEventFilter(self *C.QGraphicsPixmapItem, cb C.intptr_t, watched *C.QGraphicsItem, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsPixmapItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsPixmapItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsPixmapItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_SceneEvent +func miqt_exec_callback_QGraphicsPixmapItem_SceneEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsPixmapItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsPixmapItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent +func miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent +func miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsPixmapItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsPixmapItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_DropEvent +func miqt_exec_callback_QGraphicsPixmapItem_DropEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsPixmapItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsPixmapItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent +func miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsPixmapItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsPixmapItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent +func miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsPixmapItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsPixmapItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsPixmapItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsPixmapItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsPixmapItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsPixmapItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsPixmapItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsPixmapItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent +func miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsPixmapItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsPixmapItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent +func miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsPixmapItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsPixmapItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsPixmapItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsPixmapItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_WheelEvent +func miqt_exec_callback_QGraphicsPixmapItem_WheelEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsPixmapItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsPixmapItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsPixmapItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent +func miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent(self *C.QGraphicsPixmapItem, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsPixmapItem_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsPixmapItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_InputMethodQuery +func miqt_exec_callback_QGraphicsPixmapItem_InputMethodQuery(self *C.QGraphicsPixmapItem, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsPixmapItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsPixmapItem_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsPixmapItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsPixmapItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsPixmapItem_ItemChange +func miqt_exec_callback_QGraphicsPixmapItem_ItemChange(self *C.QGraphicsPixmapItem, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QGraphicsPixmapItem) Delete() { + C.QGraphicsPixmapItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsPixmapItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsPixmapItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsTextItem struct { + h *C.QGraphicsTextItem + isSubclass bool + *QGraphicsObject +} + +func (this *QGraphicsTextItem) cPointer() *C.QGraphicsTextItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsTextItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsTextItem constructs the type using only CGO pointers. +func newQGraphicsTextItem(h *C.QGraphicsTextItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsTextItem { + if h == nil { + return nil + } + return &QGraphicsTextItem{h: h, + QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsTextItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsTextItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsTextItem { + if h == nil { + return nil + } + + return &QGraphicsTextItem{h: (*C.QGraphicsTextItem)(h), + QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +} + +// NewQGraphicsTextItem constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem() *QGraphicsTextItem { + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new(&outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTextItem2 constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem2(text string) *QGraphicsTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new2(text_ms, &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTextItem3 constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem3(parent *QGraphicsItem) *QGraphicsTextItem { + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new3(parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTextItem4 constructs a new QGraphicsTextItem object. +func NewQGraphicsTextItem4(text string, parent *QGraphicsItem) *QGraphicsTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsTextItem) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsTextItem_MetaObject(this.h))) +} + +func (this *QGraphicsTextItem) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QGraphicsTextItem_Metacast(this.h, param1_Cstring)) +} + +func QGraphicsTextItem_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) ToHtml() string { + var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToHtml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QGraphicsTextItem_SetHtml(this.h, html_ms) +} + +func (this *QGraphicsTextItem) ToPlainText() string { + var _ms C.struct_miqt_string = C.QGraphicsTextItem_ToPlainText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) SetPlainText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QGraphicsTextItem_SetPlainText(this.h, text_ms) +} + +func (this *QGraphicsTextItem) Font() *QFont { + _ret := C.QGraphicsTextItem_Font(this.h) + _goptr := newQFont(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) SetFont(font *QFont) { + C.QGraphicsTextItem_SetFont(this.h, font.cPointer()) +} + +func (this *QGraphicsTextItem) SetDefaultTextColor(c *QColor) { + C.QGraphicsTextItem_SetDefaultTextColor(this.h, c.cPointer()) +} + +func (this *QGraphicsTextItem) DefaultTextColor() *QColor { + _ret := C.QGraphicsTextItem_DefaultTextColor(this.h) + _goptr := newQColor(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) BoundingRect() *QRectF { + _ret := C.QGraphicsTextItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) Shape() *QPainterPath { + _ret := C.QGraphicsTextItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsTextItem_Contains(this.h, point.cPointer())) +} + +func (this *QGraphicsTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsTextItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsTextItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsTextItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsTextItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) Type() int { + return (int)(C.QGraphicsTextItem_Type(this.h)) +} + +func (this *QGraphicsTextItem) SetTextWidth(width float64) { + C.QGraphicsTextItem_SetTextWidth(this.h, (C.double)(width)) +} + +func (this *QGraphicsTextItem) TextWidth() float64 { + return (float64)(C.QGraphicsTextItem_TextWidth(this.h)) +} + +func (this *QGraphicsTextItem) AdjustSize() { + C.QGraphicsTextItem_AdjustSize(this.h) +} + +func (this *QGraphicsTextItem) SetDocument(document *QTextDocument) { + C.QGraphicsTextItem_SetDocument(this.h, document.cPointer()) +} + +func (this *QGraphicsTextItem) Document() *QTextDocument { + return UnsafeNewQTextDocument(unsafe.Pointer(C.QGraphicsTextItem_Document(this.h)), nil) +} + +func (this *QGraphicsTextItem) SetTextInteractionFlags(flags TextInteractionFlag) { + C.QGraphicsTextItem_SetTextInteractionFlags(this.h, (C.int)(flags)) +} + +func (this *QGraphicsTextItem) TextInteractionFlags() TextInteractionFlag { + return (TextInteractionFlag)(C.QGraphicsTextItem_TextInteractionFlags(this.h)) +} + +func (this *QGraphicsTextItem) SetTabChangesFocus(b bool) { + C.QGraphicsTextItem_SetTabChangesFocus(this.h, (C.bool)(b)) +} + +func (this *QGraphicsTextItem) TabChangesFocus() bool { + return (bool)(C.QGraphicsTextItem_TabChangesFocus(this.h)) +} + +func (this *QGraphicsTextItem) SetOpenExternalLinks(open bool) { + C.QGraphicsTextItem_SetOpenExternalLinks(this.h, (C.bool)(open)) +} + +func (this *QGraphicsTextItem) OpenExternalLinks() bool { + return (bool)(C.QGraphicsTextItem_OpenExternalLinks(this.h)) +} + +func (this *QGraphicsTextItem) SetTextCursor(cursor *QTextCursor) { + C.QGraphicsTextItem_SetTextCursor(this.h, cursor.cPointer()) +} + +func (this *QGraphicsTextItem) TextCursor() *QTextCursor { + _ret := C.QGraphicsTextItem_TextCursor(this.h) + _goptr := newQTextCursor(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsTextItem) LinkActivated(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QGraphicsTextItem_LinkActivated(this.h, param1_ms) +} +func (this *QGraphicsTextItem) OnLinkActivated(slot func(param1 string)) { + C.QGraphicsTextItem_connect_LinkActivated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_LinkActivated +func miqt_exec_callback_QGraphicsTextItem_LinkActivated(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func (this *QGraphicsTextItem) LinkHovered(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QGraphicsTextItem_LinkHovered(this.h, param1_ms) +} +func (this *QGraphicsTextItem) OnLinkHovered(slot func(param1 string)) { + C.QGraphicsTextItem_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_LinkHovered +func miqt_exec_callback_QGraphicsTextItem_LinkHovered(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func QGraphicsTextItem_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsTextItem_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsTextItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsTextItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsTextItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsTextItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_BoundingRect +func miqt_exec_callback_QGraphicsTextItem_BoundingRect(self *C.QGraphicsTextItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsTextItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsTextItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Shape +func miqt_exec_callback_QGraphicsTextItem_Shape(self *C.QGraphicsTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsTextItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsTextItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Contains +func miqt_exec_callback_QGraphicsTextItem_Contains(self *C.QGraphicsTextItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsTextItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsTextItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsTextItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Paint +func miqt_exec_callback_QGraphicsTextItem_Paint(self *C.QGraphicsTextItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsTextItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsTextItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsTextItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_IsObscuredBy +func miqt_exec_callback_QGraphicsTextItem_IsObscuredBy(self *C.QGraphicsTextItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsTextItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsTextItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_OpaqueArea +func miqt_exec_callback_QGraphicsTextItem_OpaqueArea(self *C.QGraphicsTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsTextItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsTextItem) OnType(slot func(super func() int) int) { + C.QGraphicsTextItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Type +func miqt_exec_callback_QGraphicsTextItem_Type(self *C.QGraphicsTextItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsTextItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsTextItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_SceneEvent +func miqt_exec_callback_QGraphicsTextItem_SceneEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MousePressEvent +func miqt_exec_callback_QGraphicsTextItem_MousePressEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsTextItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsTextItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsTextItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsTextItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsTextItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsTextItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_KeyPressEvent +func miqt_exec_callback_QGraphicsTextItem_KeyPressEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsTextItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsTextItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsTextItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsTextItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_FocusInEvent +func miqt_exec_callback_QGraphicsTextItem_FocusInEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsTextItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsTextItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_FocusOutEvent +func miqt_exec_callback_QGraphicsTextItem_FocusOutEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DragEnterEvent +func miqt_exec_callback_QGraphicsTextItem_DragEnterEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DragMoveEvent +func miqt_exec_callback_QGraphicsTextItem_DragMoveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsTextItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsTextItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_DropEvent +func miqt_exec_callback_QGraphicsTextItem_DropEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsTextItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsTextItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_InputMethodEvent +func miqt_exec_callback_QGraphicsTextItem_InputMethodEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsTextItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsTextItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsTextItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsTextItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsTextItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTextItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsTextItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent(self *C.QGraphicsTextItem, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsTextItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsTextItem_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsTextItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_InputMethodQuery +func miqt_exec_callback_QGraphicsTextItem_InputMethodQuery(self *C.QGraphicsTextItem, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsTextItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsTextItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_SupportsExtension +func miqt_exec_callback_QGraphicsTextItem_SupportsExtension(self *C.QGraphicsTextItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTextItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsTextItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsTextItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsTextItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_SetExtension +func miqt_exec_callback_QGraphicsTextItem_SetExtension(self *C.QGraphicsTextItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsTextItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsTextItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsTextItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsTextItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Extension +func miqt_exec_callback_QGraphicsTextItem_Extension(self *C.QGraphicsTextItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsTextItem) callVirtualBase_Event(ev *QEvent) bool { + + return (bool)(C.QGraphicsTextItem_virtualbase_Event(unsafe.Pointer(this.h), ev.cPointer())) + +} +func (this *QGraphicsTextItem) OnEvent(slot func(super func(ev *QEvent) bool, ev *QEvent) bool) { + C.QGraphicsTextItem_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTextItem_Event +func miqt_exec_callback_QGraphicsTextItem_Event(self *C.QGraphicsTextItem, cb C.intptr_t, ev *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QEvent) bool, ev *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(ev)) + + virtualReturn := gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QGraphicsTextItem) Delete() { + C.QGraphicsTextItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsTextItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsTextItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsSimpleTextItem struct { + h *C.QGraphicsSimpleTextItem + isSubclass bool + *QAbstractGraphicsShapeItem +} + +func (this *QGraphicsSimpleTextItem) cPointer() *C.QGraphicsSimpleTextItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsSimpleTextItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsSimpleTextItem constructs the type using only CGO pointers. +func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSimpleTextItem { + if h == nil { + return nil + } + return &QGraphicsSimpleTextItem{h: h, + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsSimpleTextItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSimpleTextItem { + if h == nil { + return nil + } + + return &QGraphicsSimpleTextItem{h: (*C.QGraphicsSimpleTextItem)(h), + QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +} + +// NewQGraphicsSimpleTextItem constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem() *QGraphicsSimpleTextItem { + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new(&outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSimpleTextItem2 constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem2(text string) *QGraphicsSimpleTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new2(text_ms, &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSimpleTextItem3 constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem3(parent *QGraphicsItem) *QGraphicsSimpleTextItem { + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new3(parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSimpleTextItem4 constructs a new QGraphicsSimpleTextItem object. +func NewQGraphicsSimpleTextItem4(text string, parent *QGraphicsItem) *QGraphicsSimpleTextItem { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsSimpleTextItem) SetText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QGraphicsSimpleTextItem_SetText(this.h, text_ms) +} + +func (this *QGraphicsSimpleTextItem) Text() string { + var _ms C.struct_miqt_string = C.QGraphicsSimpleTextItem_Text(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSimpleTextItem) SetFont(font *QFont) { + C.QGraphicsSimpleTextItem_SetFont(this.h, font.cPointer()) +} + +func (this *QGraphicsSimpleTextItem) Font() *QFont { + _ret := C.QGraphicsSimpleTextItem_Font(this.h) + _goptr := newQFont(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) BoundingRect() *QRectF { + _ret := C.QGraphicsSimpleTextItem_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) Shape() *QPainterPath { + _ret := C.QGraphicsSimpleTextItem_Shape(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) Contains(point *QPointF) bool { + return (bool)(C.QGraphicsSimpleTextItem_Contains(this.h, point.cPointer())) +} + +func (this *QGraphicsSimpleTextItem) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsSimpleTextItem_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsSimpleTextItem) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsSimpleTextItem_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsSimpleTextItem) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsSimpleTextItem_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSimpleTextItem) Type() int { + return (int)(C.QGraphicsSimpleTextItem_Type(this.h)) +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsSimpleTextItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_BoundingRect +func miqt_exec_callback_QGraphicsSimpleTextItem_BoundingRect(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsSimpleTextItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Shape +func miqt_exec_callback_QGraphicsSimpleTextItem_Shape(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsSimpleTextItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsSimpleTextItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsSimpleTextItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Contains +func miqt_exec_callback_QGraphicsSimpleTextItem_Contains(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsSimpleTextItem_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsSimpleTextItem) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsSimpleTextItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Paint +func miqt_exec_callback_QGraphicsSimpleTextItem_Paint(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsSimpleTextItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsSimpleTextItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsSimpleTextItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_IsObscuredBy +func miqt_exec_callback_QGraphicsSimpleTextItem_IsObscuredBy(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsSimpleTextItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_OpaqueArea +func miqt_exec_callback_QGraphicsSimpleTextItem_OpaqueArea(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsSimpleTextItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsSimpleTextItem) OnType(slot func(super func() int) int) { + C.QGraphicsSimpleTextItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Type +func miqt_exec_callback_QGraphicsSimpleTextItem_Type(self *C.QGraphicsSimpleTextItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsSimpleTextItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsSimpleTextItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsSimpleTextItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_SupportsExtension +func miqt_exec_callback_QGraphicsSimpleTextItem_SupportsExtension(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsSimpleTextItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsSimpleTextItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsSimpleTextItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_SetExtension +func miqt_exec_callback_QGraphicsSimpleTextItem_SetExtension(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsSimpleTextItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsSimpleTextItem_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSimpleTextItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsSimpleTextItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSimpleTextItem_Extension +func miqt_exec_callback_QGraphicsSimpleTextItem_Extension(self *C.QGraphicsSimpleTextItem, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QGraphicsSimpleTextItem) Delete() { + C.QGraphicsSimpleTextItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QGraphicsSimpleTextItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsSimpleTextItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QGraphicsItemGroup struct { + h *C.QGraphicsItemGroup + isSubclass bool + *QGraphicsItem +} + +func (this *QGraphicsItemGroup) cPointer() *C.QGraphicsItemGroup { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsItemGroup) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsItemGroup constructs the type using only CGO pointers. +func newQGraphicsItemGroup(h *C.QGraphicsItemGroup, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsItemGroup { + if h == nil { + return nil + } + return &QGraphicsItemGroup{h: h, + QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} +} + +// UnsafeNewQGraphicsItemGroup constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsItemGroup { + if h == nil { + return nil + } + + return &QGraphicsItemGroup{h: (*C.QGraphicsItemGroup)(h), + QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +} + +// NewQGraphicsItemGroup constructs a new QGraphicsItemGroup object. +func NewQGraphicsItemGroup() *QGraphicsItemGroup { + var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItemGroup_new(&outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsItemGroup2 constructs a new QGraphicsItemGroup object. +func NewQGraphicsItemGroup2(parent *QGraphicsItem) *QGraphicsItemGroup { + var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItemGroup_new2(parent.cPointer(), &outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsItemGroup) AddToGroup(item *QGraphicsItem) { + C.QGraphicsItemGroup_AddToGroup(this.h, item.cPointer()) +} + +func (this *QGraphicsItemGroup) RemoveFromGroup(item *QGraphicsItem) { + C.QGraphicsItemGroup_RemoveFromGroup(this.h, item.cPointer()) +} + +func (this *QGraphicsItemGroup) BoundingRect() *QRectF { + _ret := C.QGraphicsItemGroup_BoundingRect(this.h) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsItemGroup) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsItemGroup_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +} + +func (this *QGraphicsItemGroup) IsObscuredBy(item *QGraphicsItem) bool { + return (bool)(C.QGraphicsItemGroup_IsObscuredBy(this.h, item.cPointer())) +} + +func (this *QGraphicsItemGroup) OpaqueArea() *QPainterPath { + _ret := C.QGraphicsItemGroup_OpaqueArea(this.h) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsItemGroup) Type() int { + return (int)(C.QGraphicsItemGroup_Type(this.h)) +} + +func (this *QGraphicsItemGroup) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsItemGroup_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsItemGroup_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_BoundingRect +func miqt_exec_callback_QGraphicsItemGroup_BoundingRect(self *C.QGraphicsItemGroup, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsItemGroup_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsItemGroup) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsItemGroup_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Paint +func miqt_exec_callback_QGraphicsItemGroup_Paint(self *C.QGraphicsItemGroup, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsItemGroup) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsItemGroup_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_IsObscuredBy +func miqt_exec_callback_QGraphicsItemGroup_IsObscuredBy(self *C.QGraphicsItemGroup, cb C.intptr_t, item *C.QGraphicsItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(item)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsItemGroup_virtualbase_OpaqueArea(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItemGroup_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_OpaqueArea +func miqt_exec_callback_QGraphicsItemGroup_OpaqueArea(self *C.QGraphicsItemGroup, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Type() int { + + return (int)(C.QGraphicsItemGroup_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsItemGroup) OnType(slot func(super func() int) int) { + C.QGraphicsItemGroup_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Type +func miqt_exec_callback_QGraphicsItemGroup_Type(self *C.QGraphicsItemGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Advance(phase int) { + + C.QGraphicsItemGroup_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsItemGroup) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsItemGroup_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Advance +func miqt_exec_callback_QGraphicsItemGroup_Advance(self *C.QGraphicsItemGroup, cb C.intptr_t, phase C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(phase int), phase int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(phase) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Advance, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsItemGroup_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItemGroup_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Shape +func miqt_exec_callback_QGraphicsItemGroup_Shape(self *C.QGraphicsItemGroup, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsItemGroup) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsItemGroup_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Contains +func miqt_exec_callback_QGraphicsItemGroup_Contains(self *C.QGraphicsItemGroup, cb C.intptr_t, point *C.QPointF) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(point *QPointF) bool, point *QPointF) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItemGroup) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsItemGroup_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_CollidesWithItem +func miqt_exec_callback_QGraphicsItemGroup_CollidesWithItem(self *C.QGraphicsItemGroup, cb C.intptr_t, other *C.QGraphicsItem, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(other)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItemGroup) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsItemGroup_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_CollidesWithPath +func miqt_exec_callback_QGraphicsItemGroup_CollidesWithPath(self *C.QGraphicsItemGroup, cb C.intptr_t, path *C.QPainterPath, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + slotval2 := (ItemSelectionMode)(mode) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsItemGroup) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsItemGroup_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SceneEventFilter +func miqt_exec_callback_QGraphicsItemGroup_SceneEventFilter(self *C.QGraphicsItemGroup, cb C.intptr_t, watched *C.QGraphicsItem, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsItem(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsItemGroup) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsItemGroup_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SceneEvent +func miqt_exec_callback_QGraphicsItemGroup_SceneEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsItemGroup_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsItemGroup_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent +func miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent +func miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent +func miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent +func miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItemGroup_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItemGroup_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_DropEvent +func miqt_exec_callback_QGraphicsItemGroup_DropEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsItemGroup_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItemGroup_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_FocusInEvent +func miqt_exec_callback_QGraphicsItemGroup_FocusInEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsItemGroup_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItemGroup_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent +func miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItemGroup_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItemGroup_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent +func miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItemGroup_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItemGroup_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent +func miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItemGroup_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItemGroup_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent +func miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsItemGroup_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItemGroup_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent +func miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsItemGroup_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItemGroup_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent +func miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MousePressEvent +func miqt_exec_callback_QGraphicsItemGroup_MousePressEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent +func miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent +func miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItemGroup_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItemGroup_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsItemGroup_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsItemGroup_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_WheelEvent +func miqt_exec_callback_QGraphicsItemGroup_WheelEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsItemGroup_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemGroup) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsItemGroup_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent +func miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent(self *C.QGraphicsItemGroup, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsItemGroup_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsItemGroup_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_InputMethodQuery +func miqt_exec_callback_QGraphicsItemGroup_InputMethodQuery(self *C.QGraphicsItemGroup, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsItemGroup_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsItemGroup_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_ItemChange +func miqt_exec_callback_QGraphicsItemGroup_ItemChange(self *C.QGraphicsItemGroup, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsItemGroup_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsItemGroup) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsItemGroup_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SupportsExtension +func miqt_exec_callback_QGraphicsItemGroup_SupportsExtension(self *C.QGraphicsItemGroup, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsItemGroup_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsItemGroup) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsItemGroup_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_SetExtension +func miqt_exec_callback_QGraphicsItemGroup_SetExtension(self *C.QGraphicsItemGroup, cb C.intptr_t, extension C.int, variant *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__Extension)(extension) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsItemGroup) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsItemGroup_virtualbase_Extension(unsafe.Pointer(this.h), variant.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsItemGroup) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsItemGroup_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemGroup_Extension +func miqt_exec_callback_QGraphicsItemGroup_Extension(self *C.QGraphicsItemGroup, cb C.intptr_t, variant *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(variant)) + + virtualReturn := gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() -func (this *QGraphicsItemGroup) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsItemGroup_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } // Delete this object from C++ memory. func (this *QGraphicsItemGroup) Delete() { - C.QGraphicsItemGroup_Delete(this.h) + C.QGraphicsItemGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsitem.h b/qt6/gen_qgraphicsitem.h index 6c5bb0a0..0b55b51c 100644 --- a/qt6/gen_qgraphicsitem.h +++ b/qt6/gen_qgraphicsitem.h @@ -19,6 +19,8 @@ class QAbstractGraphicsShapeItem; class QBrush; class QColor; class QCursor; +class QEvent; +class QFocusEvent; class QFont; class QGraphicsEffect; class QGraphicsEllipseItem; @@ -31,12 +33,20 @@ class QGraphicsPixmapItem; class QGraphicsPolygonItem; class QGraphicsRectItem; class QGraphicsScene; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneWheelEvent; class QGraphicsSimpleTextItem; class QGraphicsTextItem; class QGraphicsTransform; class QGraphicsWidget; +class QInputMethodEvent; +class QKeyEvent; class QLineF; class QMetaObject; +class QObject; class QPainter; class QPainterPath; class QPen; @@ -56,6 +66,8 @@ typedef struct QAbstractGraphicsShapeItem QAbstractGraphicsShapeItem; typedef struct QBrush QBrush; typedef struct QColor QColor; typedef struct QCursor QCursor; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsEllipseItem QGraphicsEllipseItem; @@ -68,12 +80,20 @@ typedef struct QGraphicsPixmapItem QGraphicsPixmapItem; typedef struct QGraphicsPolygonItem QGraphicsPolygonItem; typedef struct QGraphicsRectItem QGraphicsRectItem; typedef struct QGraphicsScene QGraphicsScene; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; typedef struct QGraphicsSimpleTextItem QGraphicsSimpleTextItem; typedef struct QGraphicsTextItem QGraphicsTextItem; typedef struct QGraphicsTransform QGraphicsTransform; typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineF QLineF; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPainterPath QPainterPath; typedef struct QPen QPen; @@ -197,8 +217,8 @@ QPainterPath* QGraphicsItem_Shape(const QGraphicsItem* self); bool QGraphicsItem_IsClipped(const QGraphicsItem* self); QPainterPath* QGraphicsItem_ClipPath(const QGraphicsItem* self); bool QGraphicsItem_Contains(const QGraphicsItem* self, QPointF* point); -bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other); -bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path); +bool QGraphicsItem_CollidesWithItem(const QGraphicsItem* self, QGraphicsItem* other, int mode); +bool QGraphicsItem_CollidesWithPath(const QGraphicsItem* self, QPainterPath* path, int mode); struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems(const QGraphicsItem* self); bool QGraphicsItem_IsObscured(const QGraphicsItem* self); bool QGraphicsItem_IsObscured2(const QGraphicsItem* self, double x, double y, double w, double h); @@ -207,7 +227,7 @@ QPainterPath* QGraphicsItem_OpaqueArea(const QGraphicsItem* self); QRegion* QGraphicsItem_BoundingRegion(const QGraphicsItem* self, QTransform* itemToDeviceTransform); double QGraphicsItem_BoundingRegionGranularity(const QGraphicsItem* self); void QGraphicsItem_SetBoundingRegionGranularity(QGraphicsItem* self, double granularity); -void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsItem_Paint(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); void QGraphicsItem_Update(QGraphicsItem* self); void QGraphicsItem_Update2(QGraphicsItem* self, double x, double y, double width, double height); void QGraphicsItem_Scroll(QGraphicsItem* self, double dx, double dy); @@ -251,6 +271,31 @@ void QGraphicsItem_SetInputMethodHints(QGraphicsItem* self, int hints); int QGraphicsItem_Type(const QGraphicsItem* self); void QGraphicsItem_InstallSceneEventFilter(QGraphicsItem* self, QGraphicsItem* filterItem); void QGraphicsItem_RemoveSceneEventFilter(QGraphicsItem* self, QGraphicsItem* filterItem); +bool QGraphicsItem_SceneEventFilter(QGraphicsItem* self, QGraphicsItem* watched, QEvent* event); +bool QGraphicsItem_SceneEvent(QGraphicsItem* self, QEvent* event); +void QGraphicsItem_ContextMenuEvent(QGraphicsItem* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsItem_DragEnterEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_DragLeaveEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_DragMoveEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_DropEvent(QGraphicsItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_FocusInEvent(QGraphicsItem* self, QFocusEvent* event); +void QGraphicsItem_FocusOutEvent(QGraphicsItem* self, QFocusEvent* event); +void QGraphicsItem_HoverEnterEvent(QGraphicsItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_HoverMoveEvent(QGraphicsItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_HoverLeaveEvent(QGraphicsItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_KeyPressEvent(QGraphicsItem* self, QKeyEvent* event); +void QGraphicsItem_KeyReleaseEvent(QGraphicsItem* self, QKeyEvent* event); +void QGraphicsItem_MousePressEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_MouseMoveEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_MouseReleaseEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_MouseDoubleClickEvent(QGraphicsItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_WheelEvent(QGraphicsItem* self, QGraphicsSceneWheelEvent* event); +void QGraphicsItem_InputMethodEvent(QGraphicsItem* self, QInputMethodEvent* event); +QVariant* QGraphicsItem_InputMethodQuery(const QGraphicsItem* self, int query); +QVariant* QGraphicsItem_ItemChange(QGraphicsItem* self, int change, QVariant* value); +bool QGraphicsItem_SupportsExtension(const QGraphicsItem* self, int extension); +void QGraphicsItem_SetExtension(QGraphicsItem* self, int extension, QVariant* variant); +QVariant* QGraphicsItem_Extension(const QGraphicsItem* self, QVariant* variant); void QGraphicsItem_SetFlag2(QGraphicsItem* self, int flag, bool enabled); void QGraphicsItem_SetCacheMode2(QGraphicsItem* self, int mode, QSize* cacheSize); void QGraphicsItem_SetFocus1(QGraphicsItem* self, int focusReason); @@ -261,14 +306,11 @@ void QGraphicsItem_EnsureVisible5(QGraphicsItem* self, double x, double y, doubl void QGraphicsItem_EnsureVisible6(QGraphicsItem* self, double x, double y, double w, double h, int xmargin, int ymargin); QTransform* QGraphicsItem_ItemTransform2(const QGraphicsItem* self, QGraphicsItem* other, bool* ok); void QGraphicsItem_SetTransform2(QGraphicsItem* self, QTransform* matrix, bool combine); -bool QGraphicsItem_CollidesWithItem2(const QGraphicsItem* self, QGraphicsItem* other, int mode); -bool QGraphicsItem_CollidesWithPath2(const QGraphicsItem* self, QPainterPath* path, int mode); struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems1(const QGraphicsItem* self, int mode); bool QGraphicsItem_IsObscured1(const QGraphicsItem* self, QRectF* rect); -void QGraphicsItem_Paint3(QGraphicsItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); void QGraphicsItem_Update1(QGraphicsItem* self, QRectF* rect); void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* rect); -void QGraphicsItem_Delete(QGraphicsItem* self); +void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass); QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self); void* QGraphicsObject_Metacast(QGraphicsObject* self, const char* param1); @@ -299,10 +341,11 @@ void QGraphicsObject_WidthChanged(QGraphicsObject* self); void QGraphicsObject_connect_WidthChanged(QGraphicsObject* self, intptr_t slot); void QGraphicsObject_HeightChanged(QGraphicsObject* self); void QGraphicsObject_connect_HeightChanged(QGraphicsObject* self, intptr_t slot); +bool QGraphicsObject_Event(QGraphicsObject* self, QEvent* ev); struct miqt_string QGraphicsObject_Tr2(const char* s, const char* c); struct miqt_string QGraphicsObject_Tr3(const char* s, const char* c, int n); void QGraphicsObject_GrabGesture2(QGraphicsObject* self, int typeVal, int flags); -void QGraphicsObject_Delete(QGraphicsObject* self); +void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass); QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self); void QAbstractGraphicsShapeItem_SetPen(QAbstractGraphicsShapeItem* self, QPen* pen); @@ -310,49 +353,93 @@ QBrush* QAbstractGraphicsShapeItem_Brush(const QAbstractGraphicsShapeItem* self) void QAbstractGraphicsShapeItem_SetBrush(QAbstractGraphicsShapeItem* self, QBrush* brush); bool QAbstractGraphicsShapeItem_IsObscuredBy(const QAbstractGraphicsShapeItem* self, QGraphicsItem* item); QPainterPath* QAbstractGraphicsShapeItem_OpaqueArea(const QAbstractGraphicsShapeItem* self); -void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self); +void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass); -QGraphicsPathItem* QGraphicsPathItem_new(); -QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path); -QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent); -QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent); +void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self); void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path); QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self); QPainterPath* QGraphicsPathItem_Shape(const QGraphicsPathItem* self); bool QGraphicsPathItem_Contains(const QGraphicsPathItem* self, QPointF* point); -void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsPathItem_Paint(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsPathItem_IsObscuredBy(const QGraphicsPathItem* self, QGraphicsItem* item); QPainterPath* QGraphicsPathItem_OpaqueArea(const QGraphicsPathItem* self); int QGraphicsPathItem_Type(const QGraphicsPathItem* self); -void QGraphicsPathItem_Paint3(QGraphicsPathItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsPathItem_Delete(QGraphicsPathItem* self); +bool QGraphicsPathItem_SupportsExtension(const QGraphicsPathItem* self, int extension); +void QGraphicsPathItem_SetExtension(QGraphicsPathItem* self, int extension, QVariant* variant); +QVariant* QGraphicsPathItem_Extension(const QGraphicsPathItem* self, QVariant* variant); +void QGraphicsPathItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsPathItem_virtualbase_BoundingRect(const void* self); +void QGraphicsPathItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsPathItem_virtualbase_Shape(const void* self); +void QGraphicsPathItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsPathItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsPathItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsPathItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsPathItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsPathItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsPathItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsPathItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsPathItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsPathItem_virtualbase_Type(const void* self); +void QGraphicsPathItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsPathItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsPathItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsPathItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsPathItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsPathItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsPathItem_Delete(QGraphicsPathItem* self, bool isSubclass); -QGraphicsRectItem* QGraphicsRectItem_new(); -QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect); -QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h); -QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent); -QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent); -QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self); void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect); void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h); QRectF* QGraphicsRectItem_BoundingRect(const QGraphicsRectItem* self); QPainterPath* QGraphicsRectItem_Shape(const QGraphicsRectItem* self); bool QGraphicsRectItem_Contains(const QGraphicsRectItem* self, QPointF* point); -void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsRectItem_Paint(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsRectItem_IsObscuredBy(const QGraphicsRectItem* self, QGraphicsItem* item); QPainterPath* QGraphicsRectItem_OpaqueArea(const QGraphicsRectItem* self); int QGraphicsRectItem_Type(const QGraphicsRectItem* self); -void QGraphicsRectItem_Paint3(QGraphicsRectItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsRectItem_Delete(QGraphicsRectItem* self); +bool QGraphicsRectItem_SupportsExtension(const QGraphicsRectItem* self, int extension); +void QGraphicsRectItem_SetExtension(QGraphicsRectItem* self, int extension, QVariant* variant); +QVariant* QGraphicsRectItem_Extension(const QGraphicsRectItem* self, QVariant* variant); +void QGraphicsRectItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsRectItem_virtualbase_BoundingRect(const void* self); +void QGraphicsRectItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsRectItem_virtualbase_Shape(const void* self); +void QGraphicsRectItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsRectItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsRectItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsRectItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsRectItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsRectItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsRectItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsRectItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsRectItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsRectItem_virtualbase_Type(const void* self); +void QGraphicsRectItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsRectItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsRectItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsRectItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsRectItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsRectItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsRectItem_Delete(QGraphicsRectItem* self, bool isSubclass); -QGraphicsEllipseItem* QGraphicsEllipseItem_new(); -QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect); -QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h); -QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent); -QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent); -QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self); void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect); void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h); @@ -363,33 +450,77 @@ void QGraphicsEllipseItem_SetSpanAngle(QGraphicsEllipseItem* self, int angle); QRectF* QGraphicsEllipseItem_BoundingRect(const QGraphicsEllipseItem* self); QPainterPath* QGraphicsEllipseItem_Shape(const QGraphicsEllipseItem* self); bool QGraphicsEllipseItem_Contains(const QGraphicsEllipseItem* self, QPointF* point); -void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsEllipseItem_Paint(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsEllipseItem_IsObscuredBy(const QGraphicsEllipseItem* self, QGraphicsItem* item); QPainterPath* QGraphicsEllipseItem_OpaqueArea(const QGraphicsEllipseItem* self); int QGraphicsEllipseItem_Type(const QGraphicsEllipseItem* self); -void QGraphicsEllipseItem_Paint3(QGraphicsEllipseItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self); +bool QGraphicsEllipseItem_SupportsExtension(const QGraphicsEllipseItem* self, int extension); +void QGraphicsEllipseItem_SetExtension(QGraphicsEllipseItem* self, int extension, QVariant* variant); +QVariant* QGraphicsEllipseItem_Extension(const QGraphicsEllipseItem* self, QVariant* variant); +void QGraphicsEllipseItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsEllipseItem_virtualbase_BoundingRect(const void* self); +void QGraphicsEllipseItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsEllipseItem_virtualbase_Shape(const void* self); +void QGraphicsEllipseItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsEllipseItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsEllipseItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsEllipseItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsEllipseItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsEllipseItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsEllipseItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsEllipseItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsEllipseItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsEllipseItem_virtualbase_Type(const void* self); +void QGraphicsEllipseItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsEllipseItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsEllipseItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsEllipseItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsEllipseItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsEllipseItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self, bool isSubclass); -QGraphicsPolygonItem* QGraphicsPolygonItem_new(); -QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent); +void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self); void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule); QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self); QPainterPath* QGraphicsPolygonItem_Shape(const QGraphicsPolygonItem* self); bool QGraphicsPolygonItem_Contains(const QGraphicsPolygonItem* self, QPointF* point); -void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsPolygonItem_Paint(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsPolygonItem_IsObscuredBy(const QGraphicsPolygonItem* self, QGraphicsItem* item); QPainterPath* QGraphicsPolygonItem_OpaqueArea(const QGraphicsPolygonItem* self); int QGraphicsPolygonItem_Type(const QGraphicsPolygonItem* self); -void QGraphicsPolygonItem_Paint3(QGraphicsPolygonItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self); +bool QGraphicsPolygonItem_SupportsExtension(const QGraphicsPolygonItem* self, int extension); +void QGraphicsPolygonItem_SetExtension(QGraphicsPolygonItem* self, int extension, QVariant* variant); +QVariant* QGraphicsPolygonItem_Extension(const QGraphicsPolygonItem* self, QVariant* variant); +void QGraphicsPolygonItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsPolygonItem_virtualbase_BoundingRect(const void* self); +void QGraphicsPolygonItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsPolygonItem_virtualbase_Shape(const void* self); +void QGraphicsPolygonItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsPolygonItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsPolygonItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsPolygonItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsPolygonItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsPolygonItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsPolygonItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsPolygonItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsPolygonItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsPolygonItem_virtualbase_Type(const void* self); +void QGraphicsPolygonItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsPolygonItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsPolygonItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsPolygonItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsPolygonItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsPolygonItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self, bool isSubclass); -QGraphicsLineItem* QGraphicsLineItem_new(); -QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line); -QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2); -QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent); -QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent); -QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent); +void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self); void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen); QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self); @@ -398,17 +529,89 @@ void QGraphicsLineItem_SetLine2(QGraphicsLineItem* self, double x1, double y1, d QRectF* QGraphicsLineItem_BoundingRect(const QGraphicsLineItem* self); QPainterPath* QGraphicsLineItem_Shape(const QGraphicsLineItem* self); bool QGraphicsLineItem_Contains(const QGraphicsLineItem* self, QPointF* point); -void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsLineItem_Paint(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsLineItem_IsObscuredBy(const QGraphicsLineItem* self, QGraphicsItem* item); QPainterPath* QGraphicsLineItem_OpaqueArea(const QGraphicsLineItem* self); int QGraphicsLineItem_Type(const QGraphicsLineItem* self); -void QGraphicsLineItem_Paint3(QGraphicsLineItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsLineItem_Delete(QGraphicsLineItem* self); +bool QGraphicsLineItem_SupportsExtension(const QGraphicsLineItem* self, int extension); +void QGraphicsLineItem_SetExtension(QGraphicsLineItem* self, int extension, QVariant* variant); +QVariant* QGraphicsLineItem_Extension(const QGraphicsLineItem* self, QVariant* variant); +void QGraphicsLineItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsLineItem_virtualbase_BoundingRect(const void* self); +void QGraphicsLineItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsLineItem_virtualbase_Shape(const void* self); +void QGraphicsLineItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsLineItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsLineItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsLineItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsLineItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsLineItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsLineItem_virtualbase_Type(const void* self); +void QGraphicsLineItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsLineItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsLineItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsLineItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsLineItem_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_Advance(void* self, int phase); +void QGraphicsLineItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsLineItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsLineItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsLineItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsLineItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsLineItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsLineItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsLineItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsLineItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsLineItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsLineItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsLineItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsLineItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsLineItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsLineItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsLineItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsLineItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsLineItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsLineItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsLineItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsLineItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsLineItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsLineItem_Delete(QGraphicsLineItem* self, bool isSubclass); -QGraphicsPixmapItem* QGraphicsPixmapItem_new(); -QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap); -QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent); -QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent); +void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self); void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap); int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self); @@ -425,12 +628,85 @@ QPainterPath* QGraphicsPixmapItem_OpaqueArea(const QGraphicsPixmapItem* self); int QGraphicsPixmapItem_Type(const QGraphicsPixmapItem* self); int QGraphicsPixmapItem_ShapeMode(const QGraphicsPixmapItem* self); void QGraphicsPixmapItem_SetShapeMode(QGraphicsPixmapItem* self, int mode); -void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self); +bool QGraphicsPixmapItem_SupportsExtension(const QGraphicsPixmapItem* self, int extension); +void QGraphicsPixmapItem_SetExtension(QGraphicsPixmapItem* self, int extension, QVariant* variant); +QVariant* QGraphicsPixmapItem_Extension(const QGraphicsPixmapItem* self, QVariant* variant); +void QGraphicsPixmapItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsPixmapItem_virtualbase_BoundingRect(const void* self); +void QGraphicsPixmapItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsPixmapItem_virtualbase_Shape(const void* self); +void QGraphicsPixmapItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsPixmapItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsPixmapItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsPixmapItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsPixmapItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsPixmapItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsPixmapItem_virtualbase_Type(const void* self); +void QGraphicsPixmapItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsPixmapItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsPixmapItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsPixmapItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsPixmapItem_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_Advance(void* self, int phase); +void QGraphicsPixmapItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsPixmapItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsPixmapItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsPixmapItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsPixmapItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsPixmapItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsPixmapItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsPixmapItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsPixmapItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsPixmapItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsPixmapItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsPixmapItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsPixmapItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsPixmapItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsPixmapItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsPixmapItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsPixmapItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsPixmapItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsPixmapItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsPixmapItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsPixmapItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsPixmapItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self, bool isSubclass); -QGraphicsTextItem* QGraphicsTextItem_new(); -QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text); -QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent); -QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self); void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1); struct miqt_string QGraphicsTextItem_Tr(const char* s); @@ -466,14 +742,96 @@ void QGraphicsTextItem_LinkActivated(QGraphicsTextItem* self, struct miqt_string void QGraphicsTextItem_connect_LinkActivated(QGraphicsTextItem* self, intptr_t slot); void QGraphicsTextItem_LinkHovered(QGraphicsTextItem* self, struct miqt_string param1); void QGraphicsTextItem_connect_LinkHovered(QGraphicsTextItem* self, intptr_t slot); +bool QGraphicsTextItem_SceneEvent(QGraphicsTextItem* self, QEvent* event); +void QGraphicsTextItem_MousePressEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_MouseMoveEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_MouseReleaseEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_MouseDoubleClickEvent(QGraphicsTextItem* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_ContextMenuEvent(QGraphicsTextItem* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsTextItem_KeyPressEvent(QGraphicsTextItem* self, QKeyEvent* event); +void QGraphicsTextItem_KeyReleaseEvent(QGraphicsTextItem* self, QKeyEvent* event); +void QGraphicsTextItem_FocusInEvent(QGraphicsTextItem* self, QFocusEvent* event); +void QGraphicsTextItem_FocusOutEvent(QGraphicsTextItem* self, QFocusEvent* event); +void QGraphicsTextItem_DragEnterEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_DragLeaveEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_DragMoveEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_DropEvent(QGraphicsTextItem* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_InputMethodEvent(QGraphicsTextItem* self, QInputMethodEvent* event); +void QGraphicsTextItem_HoverEnterEvent(QGraphicsTextItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_HoverMoveEvent(QGraphicsTextItem* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_HoverLeaveEvent(QGraphicsTextItem* self, QGraphicsSceneHoverEvent* event); +QVariant* QGraphicsTextItem_InputMethodQuery(const QGraphicsTextItem* self, int query); +bool QGraphicsTextItem_SupportsExtension(const QGraphicsTextItem* self, int extension); +void QGraphicsTextItem_SetExtension(QGraphicsTextItem* self, int extension, QVariant* variant); +QVariant* QGraphicsTextItem_Extension(const QGraphicsTextItem* self, QVariant* variant); struct miqt_string QGraphicsTextItem_Tr2(const char* s, const char* c); struct miqt_string QGraphicsTextItem_Tr3(const char* s, const char* c, int n); -void QGraphicsTextItem_Delete(QGraphicsTextItem* self); +void QGraphicsTextItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsTextItem_virtualbase_BoundingRect(const void* self); +void QGraphicsTextItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsTextItem_virtualbase_Shape(const void* self); +void QGraphicsTextItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsTextItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsTextItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsTextItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsTextItem_virtualbase_Type(const void* self); +void QGraphicsTextItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsTextItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsTextItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsTextItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsTextItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsTextItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsTextItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsTextItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsTextItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsTextItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsTextItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsTextItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsTextItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsTextItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsTextItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsTextItem_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsTextItem_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsTextItem_Delete(QGraphicsTextItem* self, bool isSubclass); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new(); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent); -QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text); struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self); void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font); @@ -485,19 +843,111 @@ void QGraphicsSimpleTextItem_Paint(QGraphicsSimpleTextItem* self, QPainter* pain bool QGraphicsSimpleTextItem_IsObscuredBy(const QGraphicsSimpleTextItem* self, QGraphicsItem* item); QPainterPath* QGraphicsSimpleTextItem_OpaqueArea(const QGraphicsSimpleTextItem* self); int QGraphicsSimpleTextItem_Type(const QGraphicsSimpleTextItem* self); -void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self); +bool QGraphicsSimpleTextItem_SupportsExtension(const QGraphicsSimpleTextItem* self, int extension); +void QGraphicsSimpleTextItem_SetExtension(QGraphicsSimpleTextItem* self, int extension, QVariant* variant); +QVariant* QGraphicsSimpleTextItem_Extension(const QGraphicsSimpleTextItem* self, QVariant* variant); +void QGraphicsSimpleTextItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsSimpleTextItem_virtualbase_BoundingRect(const void* self); +void QGraphicsSimpleTextItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsSimpleTextItem_virtualbase_Shape(const void* self); +void QGraphicsSimpleTextItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsSimpleTextItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsSimpleTextItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsSimpleTextItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsSimpleTextItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsSimpleTextItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsSimpleTextItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsSimpleTextItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsSimpleTextItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsSimpleTextItem_virtualbase_Type(const void* self); +void QGraphicsSimpleTextItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsSimpleTextItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsSimpleTextItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsSimpleTextItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsSimpleTextItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsSimpleTextItem_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self, bool isSubclass); -QGraphicsItemGroup* QGraphicsItemGroup_new(); -QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent); +void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item); void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item); QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self); -void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsItemGroup_Paint(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); bool QGraphicsItemGroup_IsObscuredBy(const QGraphicsItemGroup* self, QGraphicsItem* item); QPainterPath* QGraphicsItemGroup_OpaqueArea(const QGraphicsItemGroup* self); int QGraphicsItemGroup_Type(const QGraphicsItemGroup* self); -void QGraphicsItemGroup_Paint3(QGraphicsItemGroup* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self); +void QGraphicsItemGroup_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsItemGroup_virtualbase_BoundingRect(const void* self); +void QGraphicsItemGroup_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsItemGroup_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsItemGroup_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsItemGroup_virtualbase_OpaqueArea(const void* self); +void QGraphicsItemGroup_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsItemGroup_virtualbase_Type(const void* self); +void QGraphicsItemGroup_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_Advance(void* self, int phase); +void QGraphicsItemGroup_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsItemGroup_virtualbase_Shape(const void* self); +void QGraphicsItemGroup_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsItemGroup_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsItemGroup_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsItemGroup_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsItemGroup_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsItemGroup_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsItemGroup_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItemGroup_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsItemGroup_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsItemGroup_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItemGroup_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItemGroup_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItemGroup_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsItemGroup_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsItemGroup_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItemGroup_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsItemGroup_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsItemGroup_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsItemGroup_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsItemGroup_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsItemGroup_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsItemGroup_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsItemGroup_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsItemGroup_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsItemGroup_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsItemGroup_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsItemGroup_virtualbase_Extension(const void* self, QVariant* variant); +void QGraphicsItemGroup_Delete(QGraphicsItemGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsitemanimation.cpp b/qt6/gen_qgraphicsitemanimation.cpp index 9cd6a6f9..7a1a96db 100644 --- a/qt6/gen_qgraphicsitemanimation.cpp +++ b/qt6/gen_qgraphicsitemanimation.cpp @@ -1,6 +1,9 @@ +#include +#include #include #include #include +#include #include #include #include @@ -8,17 +11,253 @@ #include #include #include +#include #include #include #include "gen_qgraphicsitemanimation.h" #include "_cgo_export.h" -QGraphicsItemAnimation* QGraphicsItemAnimation_new() { - return new QGraphicsItemAnimation(); +class MiqtVirtualQGraphicsItemAnimation : public virtual QGraphicsItemAnimation { +public: + + MiqtVirtualQGraphicsItemAnimation(): QGraphicsItemAnimation() {}; + MiqtVirtualQGraphicsItemAnimation(QObject* parent): QGraphicsItemAnimation(parent) {}; + + virtual ~MiqtVirtualQGraphicsItemAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BeforeAnimationStep = 0; + + // Subclass to allow providing a Go implementation + virtual void beforeAnimationStep(qreal step) override { + if (handle__BeforeAnimationStep == 0) { + QGraphicsItemAnimation::beforeAnimationStep(step); + return; + } + + qreal step_ret = step; + double sigval1 = static_cast(step_ret); + + miqt_exec_callback_QGraphicsItemAnimation_BeforeAnimationStep(this, handle__BeforeAnimationStep, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BeforeAnimationStep(double step) { + + QGraphicsItemAnimation::beforeAnimationStep(static_cast(step)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AfterAnimationStep = 0; + + // Subclass to allow providing a Go implementation + virtual void afterAnimationStep(qreal step) override { + if (handle__AfterAnimationStep == 0) { + QGraphicsItemAnimation::afterAnimationStep(step); + return; + } + + qreal step_ret = step; + double sigval1 = static_cast(step_ret); + + miqt_exec_callback_QGraphicsItemAnimation_AfterAnimationStep(this, handle__AfterAnimationStep, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AfterAnimationStep(double step) { + + QGraphicsItemAnimation::afterAnimationStep(static_cast(step)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsItemAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsItemAnimation::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGraphicsItemAnimation::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItemAnimation_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsItemAnimation::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGraphicsItemAnimation::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemAnimation_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsItemAnimation::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGraphicsItemAnimation::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemAnimation_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsItemAnimation::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QGraphicsItemAnimation::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItemAnimation_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsItemAnimation::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QGraphicsItemAnimation::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsItemAnimation_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsItemAnimation::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QGraphicsItemAnimation::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsItemAnimation_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsItemAnimation::disconnectNotify(*signal); + + } + +}; + +void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { + MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(); + *outptr_QGraphicsItemAnimation = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent) { - return new QGraphicsItemAnimation(parent); +void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { + MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(parent); + *outptr_QGraphicsItemAnimation = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self) { @@ -264,7 +503,83 @@ struct miqt_string QGraphicsItemAnimation_Tr3(const char* s, const char* c, int return _ms; } -void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self) { - delete self; +void QGraphicsItemAnimation_override_virtual_BeforeAnimationStep(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__BeforeAnimationStep = slot; +} + +void QGraphicsItemAnimation_virtualbase_BeforeAnimationStep(void* self, double step) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_BeforeAnimationStep(step); +} + +void QGraphicsItemAnimation_override_virtual_AfterAnimationStep(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__AfterAnimationStep = slot; +} + +void QGraphicsItemAnimation_virtualbase_AfterAnimationStep(void* self, double step) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_AfterAnimationStep(step); +} + +void QGraphicsItemAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__Event = slot; +} + +bool QGraphicsItemAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_Event(event); +} + +void QGraphicsItemAnimation_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsItemAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsItemAnimation_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsItemAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsItemAnimation_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsItemAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsItemAnimation_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsItemAnimation_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsItemAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsItemAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsItemAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItemAnimation*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsItemAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsItemAnimation*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsitemanimation.go b/qt6/gen_qgraphicsitemanimation.go index ff985a1d..f166a56a 100644 --- a/qt6/gen_qgraphicsitemanimation.go +++ b/qt6/gen_qgraphicsitemanimation.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsItemAnimation struct { - h *C.QGraphicsItemAnimation + h *C.QGraphicsItemAnimation + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QGraphicsItemAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation) *QGraphicsItemAnimation { +// newQGraphicsItemAnimation constructs the type using only CGO pointers. +func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation, h_QObject *C.QObject) *QGraphicsItemAnimation { if h == nil { return nil } - return &QGraphicsItemAnimation{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsItemAnimation{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer) *QGraphicsItemAnimation { - return newQGraphicsItemAnimation((*C.QGraphicsItemAnimation)(h)) +// UnsafeNewQGraphicsItemAnimation constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsItemAnimation { + if h == nil { + return nil + } + + return &QGraphicsItemAnimation{h: (*C.QGraphicsItemAnimation)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQGraphicsItemAnimation constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation() *QGraphicsItemAnimation { - ret := C.QGraphicsItemAnimation_new() - return newQGraphicsItemAnimation(ret) + var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsItemAnimation_new(&outptr_QGraphicsItemAnimation, &outptr_QObject) + ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsItemAnimation2 constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation2(parent *QObject) *QGraphicsItemAnimation { - ret := C.QGraphicsItemAnimation_new2(parent.cPointer()) - return newQGraphicsItemAnimation(ret) + var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsItemAnimation_new2(parent.cPointer(), &outptr_QGraphicsItemAnimation, &outptr_QObject) + ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsItemAnimation) MetaObject() *QMetaObject { @@ -83,7 +103,7 @@ func (this *QGraphicsItemAnimation) SetItem(item *QGraphicsItem) { } func (this *QGraphicsItemAnimation) TimeLine() *QTimeLine { - return UnsafeNewQTimeLine(unsafe.Pointer(C.QGraphicsItemAnimation_TimeLine(this.h))) + return UnsafeNewQTimeLine(unsafe.Pointer(C.QGraphicsItemAnimation_TimeLine(this.h)), nil) } func (this *QGraphicsItemAnimation) SetTimeLine(timeLine *QTimeLine) { @@ -324,9 +344,221 @@ func QGraphicsItemAnimation_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsItemAnimation) callVirtualBase_BeforeAnimationStep(step float64) { + + C.QGraphicsItemAnimation_virtualbase_BeforeAnimationStep(unsafe.Pointer(this.h), (C.double)(step)) + +} +func (this *QGraphicsItemAnimation) OnBeforeAnimationStep(slot func(super func(step float64), step float64)) { + C.QGraphicsItemAnimation_override_virtual_BeforeAnimationStep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_BeforeAnimationStep +func miqt_exec_callback_QGraphicsItemAnimation_BeforeAnimationStep(self *C.QGraphicsItemAnimation, cb C.intptr_t, step C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(step float64), step float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(step) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_BeforeAnimationStep, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_AfterAnimationStep(step float64) { + + C.QGraphicsItemAnimation_virtualbase_AfterAnimationStep(unsafe.Pointer(this.h), (C.double)(step)) + +} +func (this *QGraphicsItemAnimation) OnAfterAnimationStep(slot func(super func(step float64), step float64)) { + C.QGraphicsItemAnimation_override_virtual_AfterAnimationStep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_AfterAnimationStep +func miqt_exec_callback_QGraphicsItemAnimation_AfterAnimationStep(self *C.QGraphicsItemAnimation, cb C.intptr_t, step C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(step float64), step float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(step) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_AfterAnimationStep, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsItemAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsItemAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsItemAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_Event +func miqt_exec_callback_QGraphicsItemAnimation_Event(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsItemAnimation_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsItemAnimation) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsItemAnimation_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_EventFilter +func miqt_exec_callback_QGraphicsItemAnimation_EventFilter(self *C.QGraphicsItemAnimation, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsItemAnimation_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsItemAnimation_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_TimerEvent +func miqt_exec_callback_QGraphicsItemAnimation_TimerEvent(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsItemAnimation_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsItemAnimation_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_ChildEvent +func miqt_exec_callback_QGraphicsItemAnimation_ChildEvent(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsItemAnimation_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsItemAnimation_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_CustomEvent +func miqt_exec_callback_QGraphicsItemAnimation_CustomEvent(self *C.QGraphicsItemAnimation, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsItemAnimation_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsItemAnimation_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_ConnectNotify +func miqt_exec_callback_QGraphicsItemAnimation_ConnectNotify(self *C.QGraphicsItemAnimation, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsItemAnimation) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsItemAnimation_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsItemAnimation) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsItemAnimation_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItemAnimation_DisconnectNotify +func miqt_exec_callback_QGraphicsItemAnimation_DisconnectNotify(self *C.QGraphicsItemAnimation, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsItemAnimation) Delete() { - C.QGraphicsItemAnimation_Delete(this.h) + C.QGraphicsItemAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsitemanimation.h b/qt6/gen_qgraphicsitemanimation.h index 15fc04ac..622a5f64 100644 --- a/qt6/gen_qgraphicsitemanimation.h +++ b/qt6/gen_qgraphicsitemanimation.h @@ -15,25 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGraphicsItem; class QGraphicsItemAnimation; +class QMetaMethod; class QMetaObject; class QObject; class QPointF; class QTimeLine; +class QTimerEvent; class QTransform; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGraphicsItem QGraphicsItem; typedef struct QGraphicsItemAnimation QGraphicsItemAnimation; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPointF QPointF; typedef struct QTimeLine QTimeLine; +typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; #endif -QGraphicsItemAnimation* QGraphicsItemAnimation_new(); -QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent); +void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); +void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self); void* QGraphicsItemAnimation_Metacast(QGraphicsItemAnimation* self, const char* param1); struct miqt_string QGraphicsItemAnimation_Tr(const char* s); @@ -62,9 +70,29 @@ struct miqt_array /* of struct miqt_map tuple of double and QPointF* */ QGra void QGraphicsItemAnimation_SetShearAt(QGraphicsItemAnimation* self, double step, double sh, double sv); void QGraphicsItemAnimation_Clear(QGraphicsItemAnimation* self); void QGraphicsItemAnimation_SetStep(QGraphicsItemAnimation* self, double x); +void QGraphicsItemAnimation_BeforeAnimationStep(QGraphicsItemAnimation* self, double step); +void QGraphicsItemAnimation_AfterAnimationStep(QGraphicsItemAnimation* self, double step); struct miqt_string QGraphicsItemAnimation_Tr2(const char* s, const char* c); struct miqt_string QGraphicsItemAnimation_Tr3(const char* s, const char* c, int n); -void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self); +void QGraphicsItemAnimation_override_virtual_BeforeAnimationStep(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_BeforeAnimationStep(void* self, double step); +void QGraphicsItemAnimation_override_virtual_AfterAnimationStep(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_AfterAnimationStep(void* self, double step); +void QGraphicsItemAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsItemAnimation_virtualbase_Event(void* self, QEvent* event); +void QGraphicsItemAnimation_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsItemAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsItemAnimation_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsItemAnimation_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsItemAnimation_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsItemAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsItemAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsItemAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGraphicsItemAnimation_Delete(QGraphicsItemAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicslayout.cpp b/qt6/gen_qgraphicslayout.cpp index 327943f2..96fa07da 100644 --- a/qt6/gen_qgraphicslayout.cpp +++ b/qt6/gen_qgraphicslayout.cpp @@ -53,7 +53,11 @@ bool QGraphicsLayout_InstantInvalidatePropagation() { return QGraphicsLayout::instantInvalidatePropagation(); } -void QGraphicsLayout_Delete(QGraphicsLayout* self) { - delete self; +void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicslayout.go b/qt6/gen_qgraphicslayout.go index 202926a9..f14e03d7 100644 --- a/qt6/gen_qgraphicslayout.go +++ b/qt6/gen_qgraphicslayout.go @@ -14,7 +14,8 @@ import ( ) type QGraphicsLayout struct { - h *C.QGraphicsLayout + h *C.QGraphicsLayout + isSubclass bool *QGraphicsLayoutItem } @@ -32,15 +33,23 @@ func (this *QGraphicsLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsLayout(h *C.QGraphicsLayout) *QGraphicsLayout { +// newQGraphicsLayout constructs the type using only CGO pointers. +func newQGraphicsLayout(h *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLayout { if h == nil { return nil } - return &QGraphicsLayout{h: h, QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(h))} + return &QGraphicsLayout{h: h, + QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsLayout(h unsafe.Pointer) *QGraphicsLayout { - return newQGraphicsLayout((*C.QGraphicsLayout)(h)) +// UnsafeNewQGraphicsLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsLayout(h unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLayout { + if h == nil { + return nil + } + + return &QGraphicsLayout{h: (*C.QGraphicsLayout)(h), + QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } func (this *QGraphicsLayout) SetContentsMargins(left float64, top float64, right float64, bottom float64) { @@ -93,7 +102,7 @@ func QGraphicsLayout_InstantInvalidatePropagation() bool { // Delete this object from C++ memory. func (this *QGraphicsLayout) Delete() { - C.QGraphicsLayout_Delete(this.h) + C.QGraphicsLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicslayout.h b/qt6/gen_qgraphicslayout.h index 9432a69b..0fba91dc 100644 --- a/qt6/gen_qgraphicslayout.h +++ b/qt6/gen_qgraphicslayout.h @@ -36,7 +36,7 @@ QGraphicsLayoutItem* QGraphicsLayout_ItemAt(const QGraphicsLayout* self, int i); void QGraphicsLayout_RemoveAt(QGraphicsLayout* self, int index); void QGraphicsLayout_SetInstantInvalidatePropagation(bool enable); bool QGraphicsLayout_InstantInvalidatePropagation(); -void QGraphicsLayout_Delete(QGraphicsLayout* self); +void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicslayoutitem.cpp b/qt6/gen_qgraphicslayoutitem.cpp index 8083f331..600f5596 100644 --- a/qt6/gen_qgraphicslayoutitem.cpp +++ b/qt6/gen_qgraphicslayoutitem.cpp @@ -165,7 +165,11 @@ QSizeF* QGraphicsLayoutItem_EffectiveSizeHint2(const QGraphicsLayoutItem* self, return new QSizeF(self->effectiveSizeHint(static_cast(which), *constraint)); } -void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self) { - delete self; +void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicslayoutitem.go b/qt6/gen_qgraphicslayoutitem.go index 21c874d4..101d4256 100644 --- a/qt6/gen_qgraphicslayoutitem.go +++ b/qt6/gen_qgraphicslayoutitem.go @@ -14,7 +14,8 @@ import ( ) type QGraphicsLayoutItem struct { - h *C.QGraphicsLayoutItem + h *C.QGraphicsLayoutItem + isSubclass bool } func (this *QGraphicsLayoutItem) cPointer() *C.QGraphicsLayoutItem { @@ -31,6 +32,7 @@ func (this *QGraphicsLayoutItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGraphicsLayoutItem constructs the type using only CGO pointers. func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem { if h == nil { return nil @@ -38,8 +40,13 @@ func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem { return &QGraphicsLayoutItem{h: h} } +// UnsafeNewQGraphicsLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem { - return newQGraphicsLayoutItem((*C.QGraphicsLayoutItem)(h)) + if h == nil { + return nil + } + + return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)} } func (this *QGraphicsLayoutItem) SetSizePolicy(policy *QSizePolicy) { @@ -220,7 +227,7 @@ func (this *QGraphicsLayoutItem) EffectiveSizeHint2(which SizeHint, constraint * // Delete this object from C++ memory. func (this *QGraphicsLayoutItem) Delete() { - C.QGraphicsLayoutItem_Delete(this.h) + C.QGraphicsLayoutItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicslayoutitem.h b/qt6/gen_qgraphicslayoutitem.h index 03653bf9..2d28f296 100644 --- a/qt6/gen_qgraphicslayoutitem.h +++ b/qt6/gen_qgraphicslayoutitem.h @@ -64,9 +64,10 @@ void QGraphicsLayoutItem_SetParentLayoutItem(QGraphicsLayoutItem* self, QGraphic bool QGraphicsLayoutItem_IsLayout(const QGraphicsLayoutItem* self); QGraphicsItem* QGraphicsLayoutItem_GraphicsItem(const QGraphicsLayoutItem* self); bool QGraphicsLayoutItem_OwnedByLayout(const QGraphicsLayoutItem* self); +QSizeF* QGraphicsLayoutItem_SizeHint(const QGraphicsLayoutItem* self, int which, QSizeF* constraint); void QGraphicsLayoutItem_SetSizePolicy3(QGraphicsLayoutItem* self, int hPolicy, int vPolicy, int controlType); QSizeF* QGraphicsLayoutItem_EffectiveSizeHint2(const QGraphicsLayoutItem* self, int which, QSizeF* constraint); -void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self); +void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicslinearlayout.cpp b/qt6/gen_qgraphicslinearlayout.cpp index a4834ebe..f7372267 100644 --- a/qt6/gen_qgraphicslinearlayout.cpp +++ b/qt6/gen_qgraphicslinearlayout.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -6,20 +8,267 @@ #include "gen_qgraphicslinearlayout.h" #include "_cgo_export.h" -QGraphicsLinearLayout* QGraphicsLinearLayout_new() { - return new QGraphicsLinearLayout(); +class MiqtVirtualQGraphicsLinearLayout : public virtual QGraphicsLinearLayout { +public: + + MiqtVirtualQGraphicsLinearLayout(): QGraphicsLinearLayout() {}; + MiqtVirtualQGraphicsLinearLayout(Qt::Orientation orientation): QGraphicsLinearLayout(orientation) {}; + MiqtVirtualQGraphicsLinearLayout(QGraphicsLayoutItem* parent): QGraphicsLinearLayout(parent) {}; + MiqtVirtualQGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem* parent): QGraphicsLinearLayout(orientation, parent) {}; + + virtual ~MiqtVirtualQGraphicsLinearLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveAt = 0; + + // Subclass to allow providing a Go implementation + virtual void removeAt(int index) override { + if (handle__RemoveAt == 0) { + QGraphicsLinearLayout::removeAt(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsLinearLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RemoveAt(int index) { + + QGraphicsLinearLayout::removeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsLinearLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsLinearLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsLinearLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGraphicsLinearLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsLinearLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGraphicsLinearLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int index) const override { + if (handle__ItemAt == 0) { + return QGraphicsLinearLayout::itemAt(index); + } + + int sigval1 = index; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsLinearLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGraphicsLayoutItem* virtualbase_ItemAt(int index) const { + + return QGraphicsLinearLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGraphicsLinearLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsLinearLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsLinearLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsLinearLayout::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsLinearLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsLinearLayout::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsLinearLayout::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsLinearLayout_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsLinearLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsLinearLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsLinearLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsLinearLayout::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WidgetEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void widgetEvent(QEvent* e) override { + if (handle__WidgetEvent == 0) { + QGraphicsLinearLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsLinearLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsLinearLayout::widgetEvent(e); + + } + +}; + +void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation) { - return new QGraphicsLinearLayout(static_cast(orientation)); +void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation)); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent) { - return new QGraphicsLinearLayout(parent); +void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(parent); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent) { - return new QGraphicsLinearLayout(static_cast(orientation), parent); +void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation), parent); + *outptr_QGraphicsLinearLayout = ret; + *outptr_QGraphicsLayout = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation) { @@ -106,8 +355,8 @@ void QGraphicsLinearLayout_Invalidate(QGraphicsLinearLayout* self) { self->invalidate(); } -QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which) { - return new QSizeF(self->sizeHint(static_cast(which))); +QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which, QSizeF* constraint) { + return new QSizeF(self->sizeHint(static_cast(which), *constraint)); } void QGraphicsLinearLayout_Dump(const QGraphicsLinearLayout* self) { @@ -122,15 +371,87 @@ void QGraphicsLinearLayout_InsertStretch2(QGraphicsLinearLayout* self, int index self->insertStretch(static_cast(index), static_cast(stretch)); } -QSizeF* QGraphicsLinearLayout_SizeHint2(const QGraphicsLinearLayout* self, int which, QSizeF* constraint) { - return new QSizeF(self->sizeHint(static_cast(which), *constraint)); -} - void QGraphicsLinearLayout_Dump1(const QGraphicsLinearLayout* self, int indent) { self->dump(static_cast(indent)); } -void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self) { - delete self; +void QGraphicsLinearLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsLinearLayout_virtualbase_RemoveAt(void* self, int index) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_RemoveAt(index); +} + +void QGraphicsLinearLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsLinearLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsLinearLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__Count = slot; +} + +int QGraphicsLinearLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_Count(); +} + +void QGraphicsLinearLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__ItemAt = slot; +} + +QGraphicsLayoutItem* QGraphicsLinearLayout_virtualbase_ItemAt(const void* self, int index) { + return ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_ItemAt(index); +} + +void QGraphicsLinearLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsLinearLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsLinearLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsLinearLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsLinearLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsLinearLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsLinearLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsLinearLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsLinearLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLinearLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsLinearLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsLinearLayout*)(self) )->virtualbase_WidgetEvent(e); +} + +void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicslinearlayout.go b/qt6/gen_qgraphicslinearlayout.go index c98099ba..da035823 100644 --- a/qt6/gen_qgraphicslinearlayout.go +++ b/qt6/gen_qgraphicslinearlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGraphicsLinearLayout struct { - h *C.QGraphicsLinearLayout + h *C.QGraphicsLinearLayout + isSubclass bool *QGraphicsLayout } @@ -32,39 +34,71 @@ func (this *QGraphicsLinearLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout) *QGraphicsLinearLayout { +// newQGraphicsLinearLayout constructs the type using only CGO pointers. +func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLinearLayout { if h == nil { return nil } - return &QGraphicsLinearLayout{h: h, QGraphicsLayout: UnsafeNewQGraphicsLayout(unsafe.Pointer(h))} + return &QGraphicsLinearLayout{h: h, + QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer) *QGraphicsLinearLayout { - return newQGraphicsLinearLayout((*C.QGraphicsLinearLayout)(h)) +// UnsafeNewQGraphicsLinearLayout constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLinearLayout { + if h == nil { + return nil + } + + return &QGraphicsLinearLayout{h: (*C.QGraphicsLinearLayout)(h), + QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} } // NewQGraphicsLinearLayout constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout() *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new() - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new(&outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsLinearLayout2 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout2(orientation Orientation) *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new2((C.int)(orientation)) - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new2((C.int)(orientation), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsLinearLayout3 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout3(parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new3(parent.cPointer()) - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new3(parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsLinearLayout4 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout4(orientation Orientation, parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - ret := C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer()) - return newQGraphicsLinearLayout(ret) + var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsLinearLayout) SetOrientation(orientation Orientation) { @@ -147,8 +181,8 @@ func (this *QGraphicsLinearLayout) Invalidate() { C.QGraphicsLinearLayout_Invalidate(this.h) } -func (this *QGraphicsLinearLayout) SizeHint(which SizeHint) *QSizeF { - _ret := C.QGraphicsLinearLayout_SizeHint(this.h, (C.int)(which)) +func (this *QGraphicsLinearLayout) SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + _ret := C.QGraphicsLinearLayout_SizeHint(this.h, (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -166,20 +200,227 @@ func (this *QGraphicsLinearLayout) InsertStretch2(index int, stretch int) { C.QGraphicsLinearLayout_InsertStretch2(this.h, (C.int)(index), (C.int)(stretch)) } -func (this *QGraphicsLinearLayout) SizeHint2(which SizeHint, constraint *QSizeF) *QSizeF { - _ret := C.QGraphicsLinearLayout_SizeHint2(this.h, (C.int)(which), constraint.cPointer()) +func (this *QGraphicsLinearLayout) Dump1(indent int) { + C.QGraphicsLinearLayout_Dump1(this.h, (C.int)(indent)) +} + +func (this *QGraphicsLinearLayout) callVirtualBase_RemoveAt(index int) { + + C.QGraphicsLinearLayout_virtualbase_RemoveAt(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QGraphicsLinearLayout) OnRemoveAt(slot func(super func(index int), index int)) { + C.QGraphicsLinearLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_RemoveAt +func miqt_exec_callback_QGraphicsLinearLayout_RemoveAt(self *C.QGraphicsLinearLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_RemoveAt, slotval1) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsLinearLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsLinearLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsLinearLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_SetGeometry +func miqt_exec_callback_QGraphicsLinearLayout_SetGeometry(self *C.QGraphicsLinearLayout, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_Count() int { + + return (int)(C.QGraphicsLinearLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsLinearLayout) OnCount(slot func(super func() int) int) { + C.QGraphicsLinearLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_Count +func miqt_exec_callback_QGraphicsLinearLayout_Count(self *C.QGraphicsLinearLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_ItemAt(index int) *QGraphicsLayoutItem { + + return UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(C.QGraphicsLinearLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGraphicsLinearLayout) OnItemAt(slot func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) { + C.QGraphicsLinearLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_ItemAt +func miqt_exec_callback_QGraphicsLinearLayout_ItemAt(self *C.QGraphicsLinearLayout, cb C.intptr_t, index C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QGraphicsLayoutItem, index int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_Invalidate() { + + C.QGraphicsLinearLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLinearLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsLinearLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_Invalidate +func miqt_exec_callback_QGraphicsLinearLayout_Invalidate(self *C.QGraphicsLinearLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsLinearLayout_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) _goptr := newQSizeF(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QGraphicsLinearLayout) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsLinearLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QGraphicsLinearLayout) Dump1(indent int) { - C.QGraphicsLinearLayout_Dump1(this.h, (C.int)(indent)) +//export miqt_exec_callback_QGraphicsLinearLayout_SizeHint +func miqt_exec_callback_QGraphicsLinearLayout_SizeHint(self *C.QGraphicsLinearLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsLinearLayout_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsLinearLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsLinearLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsLinearLayout_GetContentsMargins(self *C.QGraphicsLinearLayout, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsLinearLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLinearLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsLinearLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsLinearLayout_UpdateGeometry(self *C.QGraphicsLinearLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsLinearLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsLinearLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsLinearLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsLinearLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLinearLayout_WidgetEvent +func miqt_exec_callback_QGraphicsLinearLayout_WidgetEvent(self *C.QGraphicsLinearLayout, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QGraphicsLinearLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + } // Delete this object from C++ memory. func (this *QGraphicsLinearLayout) Delete() { - C.QGraphicsLinearLayout_Delete(this.h) + C.QGraphicsLinearLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicslinearlayout.h b/qt6/gen_qgraphicslinearlayout.h index 081572d3..e06d5566 100644 --- a/qt6/gen_qgraphicslinearlayout.h +++ b/qt6/gen_qgraphicslinearlayout.h @@ -15,21 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QGraphicsLayout; class QGraphicsLayoutItem; class QGraphicsLinearLayout; class QRectF; class QSizeF; #else +typedef struct QEvent QEvent; +typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; typedef struct QGraphicsLinearLayout QGraphicsLinearLayout; typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -QGraphicsLinearLayout* QGraphicsLinearLayout_new(); -QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation); -QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent); -QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent); +void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation); int QGraphicsLinearLayout_Orientation(const QGraphicsLinearLayout* self); void QGraphicsLinearLayout_AddItem(QGraphicsLinearLayout* self, QGraphicsLayoutItem* item); @@ -50,13 +54,30 @@ void QGraphicsLinearLayout_SetGeometry(QGraphicsLinearLayout* self, QRectF* rect int QGraphicsLinearLayout_Count(const QGraphicsLinearLayout* self); QGraphicsLayoutItem* QGraphicsLinearLayout_ItemAt(const QGraphicsLinearLayout* self, int index); void QGraphicsLinearLayout_Invalidate(QGraphicsLinearLayout* self); -QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which); +QSizeF* QGraphicsLinearLayout_SizeHint(const QGraphicsLinearLayout* self, int which, QSizeF* constraint); void QGraphicsLinearLayout_Dump(const QGraphicsLinearLayout* self); void QGraphicsLinearLayout_AddStretch1(QGraphicsLinearLayout* self, int stretch); void QGraphicsLinearLayout_InsertStretch2(QGraphicsLinearLayout* self, int index, int stretch); -QSizeF* QGraphicsLinearLayout_SizeHint2(const QGraphicsLinearLayout* self, int which, QSizeF* constraint); void QGraphicsLinearLayout_Dump1(const QGraphicsLinearLayout* self, int indent); -void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self); +void QGraphicsLinearLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsLinearLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsLinearLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsLinearLayout_virtualbase_Count(const void* self); +void QGraphicsLinearLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsLinearLayout_virtualbase_ItemAt(const void* self, int index); +void QGraphicsLinearLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_Invalidate(void* self); +void QGraphicsLinearLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsLinearLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsLinearLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsLinearLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsLinearLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsLinearLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsLinearLayout_Delete(QGraphicsLinearLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsproxywidget.cpp b/qt6/gen_qgraphicsproxywidget.cpp index 250b49e7..a4209f3a 100644 --- a/qt6/gen_qgraphicsproxywidget.cpp +++ b/qt6/gen_qgraphicsproxywidget.cpp @@ -1,27 +1,1250 @@ +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include +#include +#include #include #include #include +#include #include +#include #include #include #include "gen_qgraphicsproxywidget.h" #include "_cgo_export.h" -QGraphicsProxyWidget* QGraphicsProxyWidget_new() { - return new QGraphicsProxyWidget(); +class MiqtVirtualQGraphicsProxyWidget : public virtual QGraphicsProxyWidget { +public: + + MiqtVirtualQGraphicsProxyWidget(): QGraphicsProxyWidget() {}; + MiqtVirtualQGraphicsProxyWidget(QGraphicsItem* parent): QGraphicsProxyWidget(parent) {}; + MiqtVirtualQGraphicsProxyWidget(QGraphicsItem* parent, Qt::WindowFlags wFlags): QGraphicsProxyWidget(parent, wFlags) {}; + + virtual ~MiqtVirtualQGraphicsProxyWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsProxyWidget::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsProxyWidget_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsProxyWidget::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsProxyWidget::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsProxyWidget_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsProxyWidget::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsProxyWidget::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsProxyWidget::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsProxyWidget::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsProxyWidget::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsProxyWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsProxyWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGraphicsProxyWidget::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QGraphicsProxyWidget::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsProxyWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsProxyWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGraphicsProxyWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGraphicsProxyWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsProxyWidget::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsProxyWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsProxyWidget::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsProxyWidget::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsProxyWidget::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsProxyWidget::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsProxyWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverEnterEvent == 0) { + QGraphicsProxyWidget::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsProxyWidget::hoverEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsProxyWidget::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsProxyWidget::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsProxyWidget::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsProxyWidget::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabMouseEvent(QEvent* event) override { + if (handle__GrabMouseEvent == 0) { + QGraphicsProxyWidget::grabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_GrabMouseEvent(this, handle__GrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabMouseEvent(QEvent* event) { + + QGraphicsProxyWidget::grabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabMouseEvent(QEvent* event) override { + if (handle__UngrabMouseEvent == 0) { + QGraphicsProxyWidget::ungrabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_UngrabMouseEvent(this, handle__UngrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabMouseEvent(QEvent* event) { + + QGraphicsProxyWidget::ungrabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsProxyWidget::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsProxyWidget::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsProxyWidget::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsProxyWidget::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsProxyWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsProxyWidget::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsProxyWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsProxyWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsProxyWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsProxyWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsProxyWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsProxyWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsProxyWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsProxyWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsProxyWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsProxyWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsProxyWidget::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsProxyWidget::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsProxyWidget::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsProxyWidget::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsProxyWidget::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsProxyWidget::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsProxyWidget::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QGraphicsSceneResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsProxyWidget::resizeEvent(event); + return; + } + + QGraphicsSceneResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QGraphicsSceneResizeEvent* event) { + + QGraphicsProxyWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsProxyWidget::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsProxyWidget_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsProxyWidget::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintWindowFrame = 0; + + // Subclass to allow providing a Go implementation + virtual void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__PaintWindowFrame == 0) { + QGraphicsProxyWidget::paintWindowFrame(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame(this, handle__PaintWindowFrame, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintWindowFrame(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsProxyWidget::paintWindowFrame(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsProxyWidget::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsProxyWidget::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsProxyWidget::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsProxyWidget::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOption* option) const override { + if (handle__InitStyleOption == 0) { + QGraphicsProxyWidget::initStyleOption(option); + return; + } + + QStyleOption* sigval1 = option; + + miqt_exec_callback_QGraphicsProxyWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOption* option) const { + + QGraphicsProxyWidget::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsProxyWidget::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsProxyWidget_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsProxyWidget::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PropertyChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant propertyChange(const QString& propertyName, const QVariant& value) override { + if (handle__PropertyChange == 0) { + return QGraphicsProxyWidget::propertyChange(propertyName, value); + } + + const QString propertyName_ret = propertyName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray propertyName_b = propertyName_ret.toUtf8(); + struct miqt_string propertyName_ms; + propertyName_ms.len = propertyName_b.length(); + propertyName_ms.data = static_cast(malloc(propertyName_ms.len)); + memcpy(propertyName_ms.data, propertyName_b.data(), propertyName_ms.len); + struct miqt_string sigval1 = propertyName_ms; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_PropertyChange(this, handle__PropertyChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_PropertyChange(struct miqt_string propertyName, QVariant* value) { + QString propertyName_QString = QString::fromUtf8(propertyName.data, propertyName.len); + + return new QVariant(QGraphicsProxyWidget::propertyChange(propertyName_QString, *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsProxyWidget::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsProxyWidget::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool windowFrameEvent(QEvent* e) override { + if (handle__WindowFrameEvent == 0) { + return QGraphicsProxyWidget::windowFrameEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_WindowFrameEvent(this, handle__WindowFrameEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WindowFrameEvent(QEvent* e) { + + return QGraphicsProxyWidget::windowFrameEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameSectionAt = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const override { + if (handle__WindowFrameSectionAt == 0) { + return QGraphicsProxyWidget::windowFrameSectionAt(pos); + } + + const QPointF& pos_ret = pos; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&pos_ret); + + int callback_return_value = miqt_exec_callback_QGraphicsProxyWidget_WindowFrameSectionAt(const_cast(this), handle__WindowFrameSectionAt, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_WindowFrameSectionAt(QPointF* pos) const { + + Qt::WindowFrameSection _ret = QGraphicsProxyWidget::windowFrameSectionAt(*pos); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGraphicsProxyWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGraphicsProxyWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGraphicsProxyWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGraphicsProxyWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QGraphicsSceneMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGraphicsProxyWidget::moveEvent(event); + return; + } + + QGraphicsSceneMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QGraphicsSceneMoveEvent* event) { + + QGraphicsProxyWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void polishEvent() override { + if (handle__PolishEvent == 0) { + QGraphicsProxyWidget::polishEvent(); + return; + } + + + miqt_exec_callback_QGraphicsProxyWidget_PolishEvent(this, handle__PolishEvent); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishEvent() { + + QGraphicsProxyWidget::polishEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabKeyboardEvent(QEvent* event) override { + if (handle__GrabKeyboardEvent == 0) { + QGraphicsProxyWidget::grabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_GrabKeyboardEvent(this, handle__GrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabKeyboardEvent(QEvent* event) { + + QGraphicsProxyWidget::grabKeyboardEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabKeyboardEvent(QEvent* event) override { + if (handle__UngrabKeyboardEvent == 0) { + QGraphicsProxyWidget::ungrabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsProxyWidget_UngrabKeyboardEvent(this, handle__UngrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabKeyboardEvent(QEvent* event) { + + QGraphicsProxyWidget::ungrabKeyboardEvent(event); + + } + +}; + +void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(); + *outptr_QGraphicsProxyWidget = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent) { - return new QGraphicsProxyWidget(parent); +void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent); + *outptr_QGraphicsProxyWidget = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags) { - return new QGraphicsProxyWidget(parent, static_cast(wFlags)); +void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent, static_cast(wFlags)); + *outptr_QGraphicsProxyWidget = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self) { @@ -93,7 +1316,395 @@ struct miqt_string QGraphicsProxyWidget_Tr3(const char* s, const char* c, int n) return _ms; } -void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self) { - delete self; +void QGraphicsProxyWidget_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsProxyWidget_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsProxyWidget_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Paint = slot; +} + +void QGraphicsProxyWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsProxyWidget_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Type = slot; +} + +int QGraphicsProxyWidget_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Type(); +} + +void QGraphicsProxyWidget_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsProxyWidget_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsProxyWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Event = slot; +} + +bool QGraphicsProxyWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Event(event); +} + +void QGraphicsProxyWidget_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsProxyWidget_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_EventFilter(object, event); +} + +void QGraphicsProxyWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HideEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__GrabMouseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_GrabMouseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__UngrabMouseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_UngrabMouseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsProxyWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsProxyWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsProxyWidget_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsProxyWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsProxyWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsProxyWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsProxyWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsProxyWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__PaintWindowFrame = slot; +} + +void QGraphicsProxyWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_PaintWindowFrame(painter, option, widget); +} + +void QGraphicsProxyWidget_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsProxyWidget_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsProxyWidget_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsProxyWidget_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_Shape(); +} + +void QGraphicsProxyWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QGraphicsProxyWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option) { + ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QGraphicsProxyWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsProxyWidget_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsProxyWidget_override_virtual_PropertyChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__PropertyChange = slot; +} + +QVariant* QGraphicsProxyWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_PropertyChange(propertyName, value); +} + +void QGraphicsProxyWidget_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsProxyWidget_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__WindowFrameEvent = slot; +} + +bool QGraphicsProxyWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_WindowFrameEvent(e); +} + +void QGraphicsProxyWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__WindowFrameSectionAt = slot; +} + +int QGraphicsProxyWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos) { + return ( (const MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_WindowFrameSectionAt(pos); +} + +void QGraphicsProxyWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__CloseEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__MoveEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_PolishEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__PolishEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_PolishEvent(void* self) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_PolishEvent(); +} + +void QGraphicsProxyWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__GrabKeyboardEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_GrabKeyboardEvent(event); +} + +void QGraphicsProxyWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsProxyWidget*)(self) )->handle__UngrabKeyboardEvent = slot; +} + +void QGraphicsProxyWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsProxyWidget*)(self) )->virtualbase_UngrabKeyboardEvent(event); +} + +void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsproxywidget.go b/qt6/gen_qgraphicsproxywidget.go index 818f6e54..b7c77769 100644 --- a/qt6/gen_qgraphicsproxywidget.go +++ b/qt6/gen_qgraphicsproxywidget.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -20,7 +21,8 @@ const ( ) type QGraphicsProxyWidget struct { - h *C.QGraphicsProxyWidget + h *C.QGraphicsProxyWidget + isSubclass bool *QGraphicsWidget } @@ -38,33 +40,68 @@ func (this *QGraphicsProxyWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget) *QGraphicsProxyWidget { +// newQGraphicsProxyWidget constructs the type using only CGO pointers. +func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget, h_QGraphicsWidget *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsProxyWidget { if h == nil { return nil } - return &QGraphicsProxyWidget{h: h, QGraphicsWidget: UnsafeNewQGraphicsWidget(unsafe.Pointer(h))} + return &QGraphicsProxyWidget{h: h, + QGraphicsWidget: newQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget((*C.QGraphicsProxyWidget)(h)) +// UnsafeNewQGraphicsProxyWidget constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer, h_QGraphicsWidget unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsProxyWidget { + if h == nil { + return nil + } + + return &QGraphicsProxyWidget{h: (*C.QGraphicsProxyWidget)(h), + QGraphicsWidget: UnsafeNewQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} } // NewQGraphicsProxyWidget constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget() *QGraphicsProxyWidget { - ret := C.QGraphicsProxyWidget_new() - return newQGraphicsProxyWidget(ret) + var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsProxyWidget_new(&outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsProxyWidget2 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget2(parent *QGraphicsItem) *QGraphicsProxyWidget { - ret := C.QGraphicsProxyWidget_new2(parent.cPointer()) - return newQGraphicsProxyWidget(ret) + var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsProxyWidget_new2(parent.cPointer(), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsProxyWidget3 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsProxyWidget { - ret := C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags)) - return newQGraphicsProxyWidget(ret) + var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsProxyWidget) MetaObject() *QMetaObject { @@ -91,7 +128,7 @@ func (this *QGraphicsProxyWidget) SetWidget(widget *QWidget) { } func (this *QGraphicsProxyWidget) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsProxyWidget_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsProxyWidget_Widget(this.h)), nil, nil) } func (this *QGraphicsProxyWidget) SubWidgetRect(widget *QWidget) *QRectF { @@ -114,7 +151,7 @@ func (this *QGraphicsProxyWidget) Type() int { } func (this *QGraphicsProxyWidget) CreateProxyForChildWidget(child *QWidget) *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer()))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer())), nil, nil, nil, nil, nil) } func QGraphicsProxyWidget_Tr2(s string, c string) string { @@ -139,9 +176,1165 @@ func QGraphicsProxyWidget_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsProxyWidget) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsProxyWidget_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsProxyWidget_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_SetGeometry +func miqt_exec_callback_QGraphicsProxyWidget_SetGeometry(self *C.QGraphicsProxyWidget, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsProxyWidget_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsProxyWidget_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Paint +func miqt_exec_callback_QGraphicsProxyWidget_Paint(self *C.QGraphicsProxyWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Type() int { + + return (int)(C.QGraphicsProxyWidget_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsProxyWidget) OnType(slot func(super func() int) int) { + C.QGraphicsProxyWidget_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Type +func miqt_exec_callback_QGraphicsProxyWidget_Type(self *C.QGraphicsProxyWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsProxyWidget_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsProxyWidget_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ItemChange +func miqt_exec_callback_QGraphicsProxyWidget_ItemChange(self *C.QGraphicsProxyWidget, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Event +func miqt_exec_callback_QGraphicsProxyWidget_Event(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_EventFilter +func miqt_exec_callback_QGraphicsProxyWidget_EventFilter(self *C.QGraphicsProxyWidget, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGraphicsProxyWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGraphicsProxyWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ShowEvent +func miqt_exec_callback_QGraphicsProxyWidget_ShowEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QGraphicsProxyWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QGraphicsProxyWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HideEvent +func miqt_exec_callback_QGraphicsProxyWidget_HideEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsProxyWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsProxyWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent +func miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent +func miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent +func miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsProxyWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsProxyWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_DropEvent +func miqt_exec_callback_QGraphicsProxyWidget_DropEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsProxyWidget_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsProxyWidget_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent +func miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsProxyWidget_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsProxyWidget_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent +func miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsProxyWidget_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsProxyWidget_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_GrabMouseEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_GrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnGrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_GrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_GrabMouseEvent +func miqt_exec_callback_QGraphicsProxyWidget_GrabMouseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_GrabMouseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_UngrabMouseEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_UngrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnUngrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_UngrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_UngrabMouseEvent +func miqt_exec_callback_QGraphicsProxyWidget_UngrabMouseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_UngrabMouseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent +func miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent +func miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsProxyWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsProxyWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsProxyWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsProxyWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_WheelEvent +func miqt_exec_callback_QGraphicsProxyWidget_WheelEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsProxyWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsProxyWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent +func miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsProxyWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsProxyWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent +func miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsProxyWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsProxyWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent +func miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsProxyWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsProxyWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent +func miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsProxyWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsProxyWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_FocusNextPrevChild +func miqt_exec_callback_QGraphicsProxyWidget_FocusNextPrevChild(self *C.QGraphicsProxyWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsProxyWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsProxyWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_InputMethodQuery +func miqt_exec_callback_QGraphicsProxyWidget_InputMethodQuery(self *C.QGraphicsProxyWidget, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsProxyWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsProxyWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent +func miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsProxyWidget_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsProxyWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_SizeHint +func miqt_exec_callback_QGraphicsProxyWidget_SizeHint(self *C.QGraphicsProxyWidget, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ResizeEvent(event *QGraphicsSceneResizeEvent) { + + C.QGraphicsProxyWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnResizeEvent(slot func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) { + C.QGraphicsProxyWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent +func miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsProxyWidget_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsProxyWidget) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsProxyWidget_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_GetContentsMargins +func miqt_exec_callback_QGraphicsProxyWidget_GetContentsMargins(self *C.QGraphicsProxyWidget, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsProxyWidget_virtualbase_PaintWindowFrame(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnPaintWindowFrame(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsProxyWidget_override_virtual_PaintWindowFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame +func miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame(self *C.QGraphicsProxyWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsProxyWidget_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsProxyWidget_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_BoundingRect +func miqt_exec_callback_QGraphicsProxyWidget_BoundingRect(self *C.QGraphicsProxyWidget, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsProxyWidget_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsProxyWidget_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_Shape +func miqt_exec_callback_QGraphicsProxyWidget_Shape(self *C.QGraphicsProxyWidget, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_InitStyleOption(option *QStyleOption) { + + C.QGraphicsProxyWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnInitStyleOption(slot func(super func(option *QStyleOption), option *QStyleOption)) { + C.QGraphicsProxyWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_InitStyleOption +func miqt_exec_callback_QGraphicsProxyWidget_InitStyleOption(self *C.QGraphicsProxyWidget, cb C.intptr_t, option *C.QStyleOption) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOption), option *QStyleOption)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_UpdateGeometry() { + + C.QGraphicsProxyWidget_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsProxyWidget) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsProxyWidget_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_UpdateGeometry +func miqt_exec_callback_QGraphicsProxyWidget_UpdateGeometry(self *C.QGraphicsProxyWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_PropertyChange(propertyName string, value *QVariant) *QVariant { + propertyName_ms := C.struct_miqt_string{} + propertyName_ms.data = C.CString(propertyName) + propertyName_ms.len = C.size_t(len(propertyName)) + defer C.free(unsafe.Pointer(propertyName_ms.data)) + + _ret := C.QGraphicsProxyWidget_virtualbase_PropertyChange(unsafe.Pointer(this.h), propertyName_ms, value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsProxyWidget) OnPropertyChange(slot func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) { + C.QGraphicsProxyWidget_override_virtual_PropertyChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_PropertyChange +func miqt_exec_callback_QGraphicsProxyWidget_PropertyChange(self *C.QGraphicsProxyWidget, cb C.intptr_t, propertyName C.struct_miqt_string, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var propertyName_ms C.struct_miqt_string = propertyName + propertyName_ret := C.GoStringN(propertyName_ms.data, C.int(int64(propertyName_ms.len))) + C.free(unsafe.Pointer(propertyName_ms.data)) + slotval1 := propertyName_ret + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PropertyChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_SceneEvent +func miqt_exec_callback_QGraphicsProxyWidget_SceneEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_WindowFrameEvent(e *QEvent) bool { + + return (bool)(C.QGraphicsProxyWidget_virtualbase_WindowFrameEvent(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnWindowFrameEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QGraphicsProxyWidget_override_virtual_WindowFrameEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_WindowFrameEvent +func miqt_exec_callback_QGraphicsProxyWidget_WindowFrameEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WindowFrameEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_WindowFrameSectionAt(pos *QPointF) WindowFrameSection { + + return (WindowFrameSection)(C.QGraphicsProxyWidget_virtualbase_WindowFrameSectionAt(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QGraphicsProxyWidget) OnWindowFrameSectionAt(slot func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) { + C.QGraphicsProxyWidget_override_virtual_WindowFrameSectionAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_WindowFrameSectionAt +func miqt_exec_callback_QGraphicsProxyWidget_WindowFrameSectionAt(self *C.QGraphicsProxyWidget, cb C.intptr_t, pos *C.QPointF) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WindowFrameSectionAt, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_ChangeEvent +func miqt_exec_callback_QGraphicsProxyWidget_ChangeEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QGraphicsProxyWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QGraphicsProxyWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_CloseEvent +func miqt_exec_callback_QGraphicsProxyWidget_CloseEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_MoveEvent(event *QGraphicsSceneMoveEvent) { + + C.QGraphicsProxyWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnMoveEvent(slot func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) { + C.QGraphicsProxyWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_MoveEvent +func miqt_exec_callback_QGraphicsProxyWidget_MoveEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QGraphicsSceneMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_PolishEvent() { + + C.QGraphicsProxyWidget_virtualbase_PolishEvent(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsProxyWidget) OnPolishEvent(slot func(super func())) { + C.QGraphicsProxyWidget_override_virtual_PolishEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_PolishEvent +func miqt_exec_callback_QGraphicsProxyWidget_PolishEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PolishEvent) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_GrabKeyboardEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_GrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnGrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_GrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_GrabKeyboardEvent +func miqt_exec_callback_QGraphicsProxyWidget_GrabKeyboardEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_GrabKeyboardEvent, slotval1) + +} + +func (this *QGraphicsProxyWidget) callVirtualBase_UngrabKeyboardEvent(event *QEvent) { + + C.QGraphicsProxyWidget_virtualbase_UngrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsProxyWidget) OnUngrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsProxyWidget_override_virtual_UngrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsProxyWidget_UngrabKeyboardEvent +func miqt_exec_callback_QGraphicsProxyWidget_UngrabKeyboardEvent(self *C.QGraphicsProxyWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_UngrabKeyboardEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsProxyWidget) Delete() { - C.QGraphicsProxyWidget_Delete(this.h) + C.QGraphicsProxyWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsproxywidget.h b/qt6/gen_qgraphicsproxywidget.h index cd516617..70459810 100644 --- a/qt6/gen_qgraphicsproxywidget.h +++ b/qt6/gen_qgraphicsproxywidget.h @@ -15,26 +15,72 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QEvent; +class QFocusEvent; class QGraphicsItem; +class QGraphicsLayoutItem; +class QGraphicsObject; class QGraphicsProxyWidget; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneMoveEvent; +class QGraphicsSceneResizeEvent; +class QGraphicsSceneWheelEvent; +class QGraphicsWidget; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QObject; class QPainter; +class QPainterPath; +class QPointF; class QRectF; +class QShowEvent; +class QSizeF; +class QStyleOption; class QStyleOptionGraphicsItem; +class QVariant; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QGraphicsObject QGraphicsObject; typedef struct QGraphicsProxyWidget QGraphicsProxyWidget; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneMoveEvent QGraphicsSceneMoveEvent; +typedef struct QGraphicsSceneResizeEvent QGraphicsSceneResizeEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; +typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; +typedef struct QPainterPath QPainterPath; +typedef struct QPointF QPointF; typedef struct QRectF QRectF; +typedef struct QShowEvent QShowEvent; +typedef struct QSizeF QSizeF; +typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsProxyWidget* QGraphicsProxyWidget_new(); -QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent); -QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self); void* QGraphicsProxyWidget_Metacast(QGraphicsProxyWidget* self, const char* param1); struct miqt_string QGraphicsProxyWidget_Tr(const char* s); @@ -45,9 +91,134 @@ void QGraphicsProxyWidget_SetGeometry(QGraphicsProxyWidget* self, QRectF* rect); void QGraphicsProxyWidget_Paint(QGraphicsProxyWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); int QGraphicsProxyWidget_Type(const QGraphicsProxyWidget* self); QGraphicsProxyWidget* QGraphicsProxyWidget_CreateProxyForChildWidget(QGraphicsProxyWidget* self, QWidget* child); +QVariant* QGraphicsProxyWidget_ItemChange(QGraphicsProxyWidget* self, int change, QVariant* value); +bool QGraphicsProxyWidget_Event(QGraphicsProxyWidget* self, QEvent* event); +bool QGraphicsProxyWidget_EventFilter(QGraphicsProxyWidget* self, QObject* object, QEvent* event); +void QGraphicsProxyWidget_ShowEvent(QGraphicsProxyWidget* self, QShowEvent* event); +void QGraphicsProxyWidget_HideEvent(QGraphicsProxyWidget* self, QHideEvent* event); +void QGraphicsProxyWidget_ContextMenuEvent(QGraphicsProxyWidget* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsProxyWidget_DragEnterEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_DragLeaveEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_DragMoveEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_DropEvent(QGraphicsProxyWidget* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_HoverEnterEvent(QGraphicsProxyWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_HoverLeaveEvent(QGraphicsProxyWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_HoverMoveEvent(QGraphicsProxyWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_GrabMouseEvent(QGraphicsProxyWidget* self, QEvent* event); +void QGraphicsProxyWidget_UngrabMouseEvent(QGraphicsProxyWidget* self, QEvent* event); +void QGraphicsProxyWidget_MouseMoveEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_MousePressEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_MouseReleaseEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_MouseDoubleClickEvent(QGraphicsProxyWidget* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_WheelEvent(QGraphicsProxyWidget* self, QGraphicsSceneWheelEvent* event); +void QGraphicsProxyWidget_KeyPressEvent(QGraphicsProxyWidget* self, QKeyEvent* event); +void QGraphicsProxyWidget_KeyReleaseEvent(QGraphicsProxyWidget* self, QKeyEvent* event); +void QGraphicsProxyWidget_FocusInEvent(QGraphicsProxyWidget* self, QFocusEvent* event); +void QGraphicsProxyWidget_FocusOutEvent(QGraphicsProxyWidget* self, QFocusEvent* event); +bool QGraphicsProxyWidget_FocusNextPrevChild(QGraphicsProxyWidget* self, bool next); +QVariant* QGraphicsProxyWidget_InputMethodQuery(const QGraphicsProxyWidget* self, int query); +void QGraphicsProxyWidget_InputMethodEvent(QGraphicsProxyWidget* self, QInputMethodEvent* event); +QSizeF* QGraphicsProxyWidget_SizeHint(const QGraphicsProxyWidget* self, int which, QSizeF* constraint); +void QGraphicsProxyWidget_ResizeEvent(QGraphicsProxyWidget* self, QGraphicsSceneResizeEvent* event); struct miqt_string QGraphicsProxyWidget_Tr2(const char* s, const char* c); struct miqt_string QGraphicsProxyWidget_Tr3(const char* s, const char* c, int n); -void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self); +void QGraphicsProxyWidget_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsProxyWidget_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsProxyWidget_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsProxyWidget_virtualbase_Type(const void* self); +void QGraphicsProxyWidget_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsProxyWidget_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsProxyWidget_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_Event(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QGraphicsProxyWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsProxyWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGraphicsProxyWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsProxyWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsProxyWidget_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsProxyWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsProxyWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsProxyWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsProxyWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsProxyWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsProxyWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsProxyWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsProxyWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsProxyWidget_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsProxyWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsProxyWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsProxyWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsProxyWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event); +void QGraphicsProxyWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsProxyWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsProxyWidget_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsProxyWidget_virtualbase_BoundingRect(const void* self); +void QGraphicsProxyWidget_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsProxyWidget_virtualbase_Shape(const void* self); +void QGraphicsProxyWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option); +void QGraphicsProxyWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_UpdateGeometry(void* self); +void QGraphicsProxyWidget_override_virtual_PropertyChange(void* self, intptr_t slot); +QVariant* QGraphicsProxyWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value); +void QGraphicsProxyWidget_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot); +bool QGraphicsProxyWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e); +void QGraphicsProxyWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot); +int QGraphicsProxyWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos); +void QGraphicsProxyWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGraphicsProxyWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event); +void QGraphicsProxyWidget_override_virtual_PolishEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_PolishEvent(void* self); +void QGraphicsProxyWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsProxyWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsProxyWidget_Delete(QGraphicsProxyWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsscene.cpp b/qt6/gen_qgraphicsscene.cpp index 0999744b..9f0a0b6f 100644 --- a/qt6/gen_qgraphicsscene.cpp +++ b/qt6/gen_qgraphicsscene.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -10,12 +12,20 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include +#include #include #include #include @@ -29,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -36,28 +47,710 @@ #include "gen_qgraphicsscene.h" #include "_cgo_export.h" -QGraphicsScene* QGraphicsScene_new() { - return new QGraphicsScene(); +class MiqtVirtualQGraphicsScene : public virtual QGraphicsScene { +public: + + MiqtVirtualQGraphicsScene(): QGraphicsScene() {}; + MiqtVirtualQGraphicsScene(const QRectF& sceneRect): QGraphicsScene(sceneRect) {}; + MiqtVirtualQGraphicsScene(qreal x, qreal y, qreal width, qreal height): QGraphicsScene(x, y, width, height) {}; + MiqtVirtualQGraphicsScene(QObject* parent): QGraphicsScene(parent) {}; + MiqtVirtualQGraphicsScene(const QRectF& sceneRect, QObject* parent): QGraphicsScene(sceneRect, parent) {}; + MiqtVirtualQGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject* parent): QGraphicsScene(x, y, width, height, parent) {}; + + virtual ~MiqtVirtualQGraphicsScene() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsScene::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsScene_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsScene::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsScene::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsScene_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsScene::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QGraphicsScene::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsScene_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsScene::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsScene::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsScene::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsScene::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsScene::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsScene::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsScene::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsScene::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsScene::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsScene::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsScene::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsScene::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HelpEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void helpEvent(QGraphicsSceneHelpEvent* event) override { + if (handle__HelpEvent == 0) { + QGraphicsScene::helpEvent(event); + return; + } + + QGraphicsSceneHelpEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_HelpEvent(this, handle__HelpEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HelpEvent(QGraphicsSceneHelpEvent* event) { + + QGraphicsScene::helpEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsScene::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsScene::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsScene::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsScene::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsScene::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsScene::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsScene::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsScene::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsScene::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsScene::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsScene::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsScene::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsScene::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBackground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBackground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawBackground == 0) { + QGraphicsScene::drawBackground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsScene_DrawBackground(this, handle__DrawBackground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBackground(QPainter* painter, QRectF* rect) { + + QGraphicsScene::drawBackground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawForeground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawForeground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawForeground == 0) { + QGraphicsScene::drawForeground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsScene_DrawForeground(this, handle__DrawForeground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawForeground(QPainter* painter, QRectF* rect) { + + QGraphicsScene::drawForeground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsScene::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsScene_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsScene::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGraphicsScene::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsScene::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGraphicsScene::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsScene::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QGraphicsScene::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsScene_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsScene::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QGraphicsScene::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsScene_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsScene::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QGraphicsScene::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsScene_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsScene::disconnectNotify(*signal); + + } + +}; + +void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect) { - return new QGraphicsScene(*sceneRect); +void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height) { - return new QGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); +void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new4(QObject* parent) { - return new QGraphicsScene(parent); +void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(parent); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent) { - return new QGraphicsScene(*sceneRect, parent); +void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect, parent); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } -QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent) { - return new QGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); +void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); + *outptr_QGraphicsScene = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self) { @@ -474,7 +1167,7 @@ void QGraphicsScene_Changed(QGraphicsScene* self, struct miqt_array /* of QRectF } void QGraphicsScene_connect_Changed(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast&)>(&QGraphicsScene::changed), self, [=](const QList& region) { + MiqtVirtualQGraphicsScene::connect(self, static_cast&)>(&QGraphicsScene::changed), self, [=](const QList& region) { const QList& region_ret = region; // Convert QList<> from C++ memory to manually-managed C memory QRectF** region_arr = static_cast(malloc(sizeof(QRectF*) * region_ret.length())); @@ -494,7 +1187,7 @@ void QGraphicsScene_SceneRectChanged(QGraphicsScene* self, QRectF* rect) { } void QGraphicsScene_connect_SceneRectChanged(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast(&QGraphicsScene::sceneRectChanged), self, [=](const QRectF& rect) { + MiqtVirtualQGraphicsScene::connect(self, static_cast(&QGraphicsScene::sceneRectChanged), self, [=](const QRectF& rect) { const QRectF& rect_ret = rect; // Cast returned reference into pointer QRectF* sigval1 = const_cast(&rect_ret); @@ -507,7 +1200,7 @@ void QGraphicsScene_SelectionChanged(QGraphicsScene* self) { } void QGraphicsScene_connect_SelectionChanged(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast(&QGraphicsScene::selectionChanged), self, [=]() { + MiqtVirtualQGraphicsScene::connect(self, static_cast(&QGraphicsScene::selectionChanged), self, [=]() { miqt_exec_callback_QGraphicsScene_SelectionChanged(slot); }); } @@ -517,7 +1210,7 @@ void QGraphicsScene_FocusItemChanged(QGraphicsScene* self, QGraphicsItem* newFoc } void QGraphicsScene_connect_FocusItemChanged(QGraphicsScene* self, intptr_t slot) { - QGraphicsScene::connect(self, static_cast(&QGraphicsScene::focusItemChanged), self, [=](QGraphicsItem* newFocus, QGraphicsItem* oldFocus, Qt::FocusReason reason) { + MiqtVirtualQGraphicsScene::connect(self, static_cast(&QGraphicsScene::focusItemChanged), self, [=](QGraphicsItem* newFocus, QGraphicsItem* oldFocus, Qt::FocusReason reason) { QGraphicsItem* sigval1 = newFocus; QGraphicsItem* sigval2 = oldFocus; Qt::FocusReason reason_ret = reason; @@ -814,7 +1507,227 @@ void QGraphicsScene_Invalidate22(QGraphicsScene* self, QRectF* rect, int layers) self->invalidate(*rect, static_cast(layers)); } -void QGraphicsScene_Delete(QGraphicsScene* self) { - delete self; +void QGraphicsScene_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsScene_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsScene*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsScene_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__Event = slot; +} + +bool QGraphicsScene_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_Event(event); +} + +void QGraphicsScene_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsScene_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsScene_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsScene_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsScene_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsScene_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsScene_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsScene_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsScene_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsScene_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsScene_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsScene_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsScene_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsScene_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsScene_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsScene_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsScene_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__HelpEvent = slot; +} + +void QGraphicsScene_virtualbase_HelpEvent(void* self, QGraphicsSceneHelpEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_HelpEvent(event); +} + +void QGraphicsScene_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsScene_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsScene_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsScene_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsScene_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsScene_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsScene_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsScene_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsScene_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsScene_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsScene_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsScene_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsScene_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsScene_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsScene_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsScene_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsScene_override_virtual_DrawBackground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DrawBackground = slot; +} + +void QGraphicsScene_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DrawBackground(painter, rect); +} + +void QGraphicsScene_override_virtual_DrawForeground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DrawForeground = slot; +} + +void QGraphicsScene_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DrawForeground(painter, rect); +} + +void QGraphicsScene_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsScene_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsScene_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsScene_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsScene_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsScene_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsScene_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsScene_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsScene_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsScene_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsScene_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScene*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsScene_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsScene*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGraphicsScene_Delete(QGraphicsScene* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsscene.go b/qt6/gen_qgraphicsscene.go index 053b3d95..88e9db50 100644 --- a/qt6/gen_qgraphicsscene.go +++ b/qt6/gen_qgraphicsscene.go @@ -31,7 +31,8 @@ const ( ) type QGraphicsScene struct { - h *C.QGraphicsScene + h *C.QGraphicsScene + isSubclass bool *QObject } @@ -49,51 +50,89 @@ func (this *QGraphicsScene) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsScene(h *C.QGraphicsScene) *QGraphicsScene { +// newQGraphicsScene constructs the type using only CGO pointers. +func newQGraphicsScene(h *C.QGraphicsScene, h_QObject *C.QObject) *QGraphicsScene { if h == nil { return nil } - return &QGraphicsScene{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsScene{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsScene(h unsafe.Pointer) *QGraphicsScene { - return newQGraphicsScene((*C.QGraphicsScene)(h)) +// UnsafeNewQGraphicsScene constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsScene(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScene { + if h == nil { + return nil + } + + return &QGraphicsScene{h: (*C.QGraphicsScene)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQGraphicsScene constructs a new QGraphicsScene object. func NewQGraphicsScene() *QGraphicsScene { - ret := C.QGraphicsScene_new() - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new(&outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene2 constructs a new QGraphicsScene object. func NewQGraphicsScene2(sceneRect *QRectF) *QGraphicsScene { - ret := C.QGraphicsScene_new2(sceneRect.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new2(sceneRect.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene3 constructs a new QGraphicsScene object. func NewQGraphicsScene3(x float64, y float64, width float64, height float64) *QGraphicsScene { - ret := C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height)) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene4 constructs a new QGraphicsScene object. func NewQGraphicsScene4(parent *QObject) *QGraphicsScene { - ret := C.QGraphicsScene_new4(parent.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new4(parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene5 constructs a new QGraphicsScene object. func NewQGraphicsScene5(sceneRect *QRectF, parent *QObject) *QGraphicsScene { - ret := C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScene6 constructs a new QGraphicsScene object. func NewQGraphicsScene6(x float64, y float64, width float64, height float64, parent *QObject) *QGraphicsScene { - ret := C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer()) - return newQGraphicsScene(ret) + var outptr_QGraphicsScene *C.QGraphicsScene = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) + ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsScene) MetaObject() *QMetaObject { @@ -265,7 +304,7 @@ func (this *QGraphicsScene) CreateItemGroup(items []*QGraphicsItem) *QGraphicsIt items_CArray[i] = items[i].cPointer() } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsScene_CreateItemGroup(this.h, items_ma))) + return UnsafeNewQGraphicsItemGroup(unsafe.Pointer(C.QGraphicsScene_CreateItemGroup(this.h, items_ma)), nil) } func (this *QGraphicsScene) DestroyItemGroup(group *QGraphicsItemGroup) { @@ -277,23 +316,23 @@ func (this *QGraphicsScene) AddItem(item *QGraphicsItem) { } func (this *QGraphicsScene) AddEllipse(rect *QRectF) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer())), nil, nil) } func (this *QGraphicsScene) AddLine(line *QLineF) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine(this.h, line.cPointer()))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine(this.h, line.cPointer())), nil) } func (this *QGraphicsScene) AddPath(path *QPainterPath) *QGraphicsPathItem { - return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath(this.h, path.cPointer()))) + return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath(this.h, path.cPointer())), nil, nil) } func (this *QGraphicsScene) AddPixmap(pixmap *QPixmap) *QGraphicsPixmapItem { - return UnsafeNewQGraphicsPixmapItem(unsafe.Pointer(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer()))) + return UnsafeNewQGraphicsPixmapItem(unsafe.Pointer(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer())), nil) } func (this *QGraphicsScene) AddRect(rect *QRectF) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect(this.h, rect.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect(this.h, rect.cPointer())), nil, nil) } func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { @@ -301,7 +340,7 @@ func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText(this.h, text_ms))) + return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText(this.h, text_ms)), nil, nil, nil) } func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem { @@ -309,23 +348,23 @@ func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText(this.h, text_ms))) + return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText(this.h, text_ms)), nil, nil) } func (this *QGraphicsScene) AddWidget(widget *QWidget) *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget(this.h, widget.cPointer()))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget(this.h, widget.cPointer())), nil, nil, nil, nil, nil) } func (this *QGraphicsScene) AddEllipse2(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))), nil, nil) } func (this *QGraphicsScene) AddLine2(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))), nil) } func (this *QGraphicsScene) AddRect2(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))), nil, nil) } func (this *QGraphicsScene) RemoveItem(item *QGraphicsItem) { @@ -398,7 +437,7 @@ func (this *QGraphicsScene) Views() []*QGraphicsView { _ret := make([]*QGraphicsView, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsView)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQGraphicsView(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQGraphicsView(unsafe.Pointer(_outCast[i]), nil, nil, nil, nil, nil) } return _ret } @@ -412,7 +451,7 @@ func (this *QGraphicsScene) Invalidate(x float64, y float64, w float64, h float6 } func (this *QGraphicsScene) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsScene_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsScene_Style(this.h)), nil) } func (this *QGraphicsScene) SetStyle(style *QStyle) { @@ -454,7 +493,7 @@ func (this *QGraphicsScene) SetActivePanel(item *QGraphicsItem) { } func (this *QGraphicsScene) ActiveWindow() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsScene_ActiveWindow(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsScene_ActiveWindow(this.h)), nil, nil, nil, nil) } func (this *QGraphicsScene) SetActiveWindow(widget *QGraphicsWidget) { @@ -762,31 +801,31 @@ func (this *QGraphicsScene) SetSelectionArea4(path *QPainterPath, selectionOpera } func (this *QGraphicsScene) AddEllipse22(rect *QRectF, pen *QPen) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddEllipse3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddLine22(line *QLineF, pen *QPen) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer())), nil) } func (this *QGraphicsScene) AddPath2(path *QPainterPath, pen *QPen) *QGraphicsPathItem { - return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddPath3(path *QPainterPath, pen *QPen, brush *QBrush) *QGraphicsPathItem { - return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsPathItem(unsafe.Pointer(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddRect22(rect *QRectF, pen *QPen) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddRect3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextItem { @@ -794,7 +833,7 @@ func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextIte text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer()))) + return UnsafeNewQGraphicsTextItem(unsafe.Pointer(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer())), nil, nil, nil) } func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsSimpleTextItem { @@ -802,31 +841,31 @@ func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsS text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer()))) + return UnsafeNewQGraphicsSimpleTextItem(unsafe.Pointer(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer())), nil, nil) } func (this *QGraphicsScene) AddWidget2(widget *QWidget, wFlags WindowType) *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags)))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags))), nil, nil, nil, nil, nil) } func (this *QGraphicsScene) AddEllipse5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddEllipse6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsEllipseItem(unsafe.Pointer(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) AddLine5(x1 float64, y1 float64, x2 float64, y2 float64, pen *QPen) *QGraphicsLineItem { - return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer()))) + return UnsafeNewQGraphicsLineItem(unsafe.Pointer(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer())), nil) } func (this *QGraphicsScene) AddRect5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())), nil, nil) } func (this *QGraphicsScene) AddRect6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()))) + return UnsafeNewQGraphicsRectItem(unsafe.Pointer(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())), nil, nil) } func (this *QGraphicsScene) SetFocusItem2(item *QGraphicsItem, focusReason FocusReason) { @@ -853,9 +892,644 @@ func (this *QGraphicsScene) Invalidate22(rect *QRectF, layers QGraphicsScene__Sc C.QGraphicsScene_Invalidate22(this.h, rect.cPointer(), (C.int)(layers)) } +func (this *QGraphicsScene) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsScene_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsScene) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsScene_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_InputMethodQuery +func miqt_exec_callback_QGraphicsScene_InputMethodQuery(self *C.QGraphicsScene, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsScene) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsScene_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsScene) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsScene_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_Event +func miqt_exec_callback_QGraphicsScene_Event(self *C.QGraphicsScene, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsScene) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsScene_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsScene) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsScene_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_EventFilter +func miqt_exec_callback_QGraphicsScene_EventFilter(self *C.QGraphicsScene, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsScene) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsScene_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsScene_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_ContextMenuEvent +func miqt_exec_callback_QGraphicsScene_ContextMenuEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DragEnterEvent +func miqt_exec_callback_QGraphicsScene_DragEnterEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DragMoveEvent +func miqt_exec_callback_QGraphicsScene_DragMoveEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DragLeaveEvent +func miqt_exec_callback_QGraphicsScene_DragLeaveEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsScene_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsScene_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DropEvent +func miqt_exec_callback_QGraphicsScene_DropEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsScene_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsScene_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_FocusInEvent +func miqt_exec_callback_QGraphicsScene_FocusInEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsScene_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsScene_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_FocusOutEvent +func miqt_exec_callback_QGraphicsScene_FocusOutEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_HelpEvent(event *QGraphicsSceneHelpEvent) { + + C.QGraphicsScene_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnHelpEvent(slot func(super func(event *QGraphicsSceneHelpEvent), event *QGraphicsSceneHelpEvent)) { + C.QGraphicsScene_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_HelpEvent +func miqt_exec_callback_QGraphicsScene_HelpEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneHelpEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHelpEvent), event *QGraphicsSceneHelpEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHelpEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_HelpEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsScene_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsScene_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_KeyPressEvent +func miqt_exec_callback_QGraphicsScene_KeyPressEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsScene_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsScene_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_KeyReleaseEvent +func miqt_exec_callback_QGraphicsScene_KeyReleaseEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MousePressEvent +func miqt_exec_callback_QGraphicsScene_MousePressEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MouseMoveEvent +func miqt_exec_callback_QGraphicsScene_MouseMoveEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MouseReleaseEvent +func miqt_exec_callback_QGraphicsScene_MouseReleaseEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsScene_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsScene_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsScene_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsScene_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_WheelEvent +func miqt_exec_callback_QGraphicsScene_WheelEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsScene_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsScene_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_InputMethodEvent +func miqt_exec_callback_QGraphicsScene_InputMethodEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DrawBackground(painter *QPainter, rect *QRectF) { + + C.QGraphicsScene_virtualbase_DrawBackground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsScene) OnDrawBackground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsScene_override_virtual_DrawBackground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DrawBackground +func miqt_exec_callback_QGraphicsScene_DrawBackground(self *C.QGraphicsScene, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DrawBackground, slotval1, slotval2) + +} + +func (this *QGraphicsScene) callVirtualBase_DrawForeground(painter *QPainter, rect *QRectF) { + + C.QGraphicsScene_virtualbase_DrawForeground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsScene) OnDrawForeground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsScene_override_virtual_DrawForeground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DrawForeground +func miqt_exec_callback_QGraphicsScene_DrawForeground(self *C.QGraphicsScene, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DrawForeground, slotval1, slotval2) + +} + +func (this *QGraphicsScene) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsScene_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsScene) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsScene_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_FocusNextPrevChild +func miqt_exec_callback_QGraphicsScene_FocusNextPrevChild(self *C.QGraphicsScene, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsScene) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsScene_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsScene_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_TimerEvent +func miqt_exec_callback_QGraphicsScene_TimerEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsScene_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsScene_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_ChildEvent +func miqt_exec_callback_QGraphicsScene_ChildEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsScene_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsScene) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsScene_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_CustomEvent +func miqt_exec_callback_QGraphicsScene_CustomEvent(self *C.QGraphicsScene, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsScene_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsScene) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsScene_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_ConnectNotify +func miqt_exec_callback_QGraphicsScene_ConnectNotify(self *C.QGraphicsScene, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsScene) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsScene_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsScene) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsScene_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScene_DisconnectNotify +func miqt_exec_callback_QGraphicsScene_DisconnectNotify(self *C.QGraphicsScene, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QGraphicsScene{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsScene) Delete() { - C.QGraphicsScene_Delete(this.h) + C.QGraphicsScene_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsscene.h b/qt6/gen_qgraphicsscene.h index 71617791..f0a8eb1d 100644 --- a/qt6/gen_qgraphicsscene.h +++ b/qt6/gen_qgraphicsscene.h @@ -16,7 +16,9 @@ extern "C" { #ifdef __cplusplus class QBrush; +class QChildEvent; class QEvent; +class QFocusEvent; class QFont; class QGraphicsEllipseItem; class QGraphicsItem; @@ -27,11 +29,19 @@ class QGraphicsPixmapItem; class QGraphicsProxyWidget; class QGraphicsRectItem; class QGraphicsScene; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHelpEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneWheelEvent; class QGraphicsSimpleTextItem; class QGraphicsTextItem; class QGraphicsView; class QGraphicsWidget; +class QInputMethodEvent; +class QKeyEvent; class QLineF; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; @@ -42,12 +52,15 @@ class QPixmap; class QPointF; class QRectF; class QStyle; +class QTimerEvent; class QTransform; class QVariant; class QWidget; #else typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QGraphicsEllipseItem QGraphicsEllipseItem; typedef struct QGraphicsItem QGraphicsItem; @@ -58,11 +71,19 @@ typedef struct QGraphicsPixmapItem QGraphicsPixmapItem; typedef struct QGraphicsProxyWidget QGraphicsProxyWidget; typedef struct QGraphicsRectItem QGraphicsRectItem; typedef struct QGraphicsScene QGraphicsScene; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHelpEvent QGraphicsSceneHelpEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; typedef struct QGraphicsSimpleTextItem QGraphicsSimpleTextItem; typedef struct QGraphicsTextItem QGraphicsTextItem; typedef struct QGraphicsView QGraphicsView; typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineF QLineF; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; @@ -73,17 +94,18 @@ typedef struct QPixmap QPixmap; typedef struct QPointF QPointF; typedef struct QRectF QRectF; typedef struct QStyle QStyle; +typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsScene* QGraphicsScene_new(); -QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect); -QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height); -QGraphicsScene* QGraphicsScene_new4(QObject* parent); -QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent); -QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent); +void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self); void* QGraphicsScene_Metacast(QGraphicsScene* self, const char* param1); struct miqt_string QGraphicsScene_Tr(const char* s); @@ -162,6 +184,27 @@ void QGraphicsScene_Invalidate2(QGraphicsScene* self); void QGraphicsScene_Advance(QGraphicsScene* self); void QGraphicsScene_ClearSelection(QGraphicsScene* self); void QGraphicsScene_Clear(QGraphicsScene* self); +bool QGraphicsScene_Event(QGraphicsScene* self, QEvent* event); +bool QGraphicsScene_EventFilter(QGraphicsScene* self, QObject* watched, QEvent* event); +void QGraphicsScene_ContextMenuEvent(QGraphicsScene* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsScene_DragEnterEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_DragMoveEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_DragLeaveEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_DropEvent(QGraphicsScene* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_FocusInEvent(QGraphicsScene* self, QFocusEvent* event); +void QGraphicsScene_FocusOutEvent(QGraphicsScene* self, QFocusEvent* event); +void QGraphicsScene_HelpEvent(QGraphicsScene* self, QGraphicsSceneHelpEvent* event); +void QGraphicsScene_KeyPressEvent(QGraphicsScene* self, QKeyEvent* event); +void QGraphicsScene_KeyReleaseEvent(QGraphicsScene* self, QKeyEvent* event); +void QGraphicsScene_MousePressEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_MouseMoveEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_MouseReleaseEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_MouseDoubleClickEvent(QGraphicsScene* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_WheelEvent(QGraphicsScene* self, QGraphicsSceneWheelEvent* event); +void QGraphicsScene_InputMethodEvent(QGraphicsScene* self, QInputMethodEvent* event); +void QGraphicsScene_DrawBackground(QGraphicsScene* self, QPainter* painter, QRectF* rect); +void QGraphicsScene_DrawForeground(QGraphicsScene* self, QPainter* painter, QRectF* rect); +bool QGraphicsScene_FocusNextPrevChild(QGraphicsScene* self, bool next); void QGraphicsScene_Changed(QGraphicsScene* self, struct miqt_array /* of QRectF* */ region); void QGraphicsScene_connect_Changed(QGraphicsScene* self, intptr_t slot); void QGraphicsScene_SceneRectChanged(QGraphicsScene* self, QRectF* rect); @@ -211,7 +254,61 @@ void QGraphicsScene_Invalidate5(QGraphicsScene* self, double x, double y, double void QGraphicsScene_Update1(QGraphicsScene* self, QRectF* rect); void QGraphicsScene_Invalidate1(QGraphicsScene* self, QRectF* rect); void QGraphicsScene_Invalidate22(QGraphicsScene* self, QRectF* rect, int layers); -void QGraphicsScene_Delete(QGraphicsScene* self); +void QGraphicsScene_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsScene_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsScene_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsScene_virtualbase_Event(void* self, QEvent* event); +void QGraphicsScene_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsScene_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsScene_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsScene_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsScene_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsScene_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsScene_override_virtual_HelpEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_HelpEvent(void* self, QGraphicsSceneHelpEvent* event); +void QGraphicsScene_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsScene_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsScene_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsScene_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsScene_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsScene_override_virtual_DrawBackground(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsScene_override_virtual_DrawForeground(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsScene_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsScene_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsScene_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsScene_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsScene_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsScene_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsScene_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsScene_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGraphicsScene_Delete(QGraphicsScene* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicssceneevent.cpp b/qt6/gen_qgraphicssceneevent.cpp index f25a666c..943e76d5 100644 --- a/qt6/gen_qgraphicssceneevent.cpp +++ b/qt6/gen_qgraphicssceneevent.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -16,8 +17,65 @@ #include "gen_qgraphicssceneevent.h" #include "_cgo_export.h" -QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal) { - return new QGraphicsSceneEvent(static_cast(typeVal)); +class MiqtVirtualQGraphicsSceneEvent : public virtual QGraphicsSceneEvent { +public: + + MiqtVirtualQGraphicsSceneEvent(QEvent::Type typeVal): QGraphicsSceneEvent(typeVal) {}; + + virtual ~MiqtVirtualQGraphicsSceneEvent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAccepted = 0; + + // Subclass to allow providing a Go implementation + virtual void setAccepted(bool accepted) override { + if (handle__SetAccepted == 0) { + QGraphicsSceneEvent::setAccepted(accepted); + return; + } + + bool sigval1 = accepted; + + miqt_exec_callback_QGraphicsSceneEvent_SetAccepted(this, handle__SetAccepted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAccepted(bool accepted) { + + QGraphicsSceneEvent::setAccepted(accepted); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QEvent* clone() const override { + if (handle__Clone == 0) { + return QGraphicsSceneEvent::clone(); + } + + + QEvent* callback_return_value = miqt_exec_callback_QGraphicsSceneEvent_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QEvent* virtualbase_Clone() const { + + return QGraphicsSceneEvent::clone(); + + } + +}; + +void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + MiqtVirtualQGraphicsSceneEvent* ret = new MiqtVirtualQGraphicsSceneEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneEvent = ret; + *outptr_QEvent = static_cast(ret); } QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self) { @@ -37,16 +95,42 @@ void QGraphicsSceneEvent_SetTimestamp(QGraphicsSceneEvent* self, unsigned long l self->setTimestamp(static_cast(ts)); } -void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self) { - delete self; +void QGraphicsSceneEvent_override_virtual_SetAccepted(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSceneEvent*)(self) )->handle__SetAccepted = slot; +} + +void QGraphicsSceneEvent_virtualbase_SetAccepted(void* self, bool accepted) { + ( (MiqtVirtualQGraphicsSceneEvent*)(self) )->virtualbase_SetAccepted(accepted); +} + +void QGraphicsSceneEvent_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSceneEvent*)(self) )->handle__Clone = slot; +} + +QEvent* QGraphicsSceneEvent_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQGraphicsSceneEvent*)(self) )->virtualbase_Clone(); +} + +void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new() { - return new QGraphicsSceneMouseEvent(); +void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(); + *outptr_QGraphicsSceneMouseEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal) { - return new QGraphicsSceneMouseEvent(static_cast(typeVal)); +void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneMouseEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self) { @@ -166,16 +250,26 @@ void QGraphicsSceneMouseEvent_SetFlags(QGraphicsSceneMouseEvent* self, int flags self->setFlags(static_cast(flags)); } -void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self) { - delete self; +void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new() { - return new QGraphicsSceneWheelEvent(); +void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(); + *outptr_QGraphicsSceneWheelEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal) { - return new QGraphicsSceneWheelEvent(static_cast(typeVal)); +void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneWheelEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self) { @@ -262,16 +356,26 @@ void QGraphicsSceneWheelEvent_SetInverted(QGraphicsSceneWheelEvent* self, bool i self->setInverted(inverted); } -void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self) { - delete self; +void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new() { - return new QGraphicsSceneContextMenuEvent(); +void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(); + *outptr_QGraphicsSceneContextMenuEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal) { - return new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); +void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneContextMenuEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self) { @@ -316,16 +420,26 @@ void QGraphicsSceneContextMenuEvent_SetReason(QGraphicsSceneContextMenuEvent* se self->setReason(static_cast(reason)); } -void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self) { - delete self; +void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new() { - return new QGraphicsSceneHoverEvent(); +void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(); + *outptr_QGraphicsSceneHoverEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal) { - return new QGraphicsSceneHoverEvent(static_cast(typeVal)); +void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneHoverEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self) { @@ -385,16 +499,26 @@ void QGraphicsSceneHoverEvent_SetModifiers(QGraphicsSceneHoverEvent* self, int m self->setModifiers(static_cast(modifiers)); } -void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self) { - delete self; +void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new() { - return new QGraphicsSceneHelpEvent(); +void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(); + *outptr_QGraphicsSceneHelpEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal) { - return new QGraphicsSceneHelpEvent(static_cast(typeVal)); +void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneHelpEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self) { @@ -413,16 +537,26 @@ void QGraphicsSceneHelpEvent_SetScreenPos(QGraphicsSceneHelpEvent* self, QPoint* self->setScreenPos(*pos); } -void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self) { - delete self; +void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new() { - return new QGraphicsSceneDragDropEvent(); +void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(); + *outptr_QGraphicsSceneDragDropEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal) { - return new QGraphicsSceneDragDropEvent(static_cast(typeVal)); +void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(static_cast(typeVal)); + *outptr_QGraphicsSceneDragDropEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self) { @@ -514,12 +648,19 @@ void QGraphicsSceneDragDropEvent_SetMimeData(QGraphicsSceneDragDropEvent* self, self->setMimeData(data); } -void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self) { - delete self; +void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new() { - return new QGraphicsSceneResizeEvent(); +void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneResizeEvent* ret = new QGraphicsSceneResizeEvent(); + *outptr_QGraphicsSceneResizeEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self) { @@ -538,12 +679,19 @@ void QGraphicsSceneResizeEvent_SetNewSize(QGraphicsSceneResizeEvent* self, QSize self->setNewSize(*size); } -void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self) { - delete self; +void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new() { - return new QGraphicsSceneMoveEvent(); +void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { + QGraphicsSceneMoveEvent* ret = new QGraphicsSceneMoveEvent(); + *outptr_QGraphicsSceneMoveEvent = ret; + *outptr_QGraphicsSceneEvent = static_cast(ret); + *outptr_QEvent = static_cast(ret); } QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self) { @@ -562,7 +710,11 @@ void QGraphicsSceneMoveEvent_SetNewPos(QGraphicsSceneMoveEvent* self, QPointF* p self->setNewPos(*pos); } -void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self) { - delete self; +void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicssceneevent.go b/qt6/gen_qgraphicssceneevent.go index c6d7d144..9cff11c3 100644 --- a/qt6/gen_qgraphicssceneevent.go +++ b/qt6/gen_qgraphicssceneevent.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -22,7 +23,8 @@ const ( ) type QGraphicsSceneEvent struct { - h *C.QGraphicsSceneEvent + h *C.QGraphicsSceneEvent + isSubclass bool *QEvent } @@ -40,25 +42,38 @@ func (this *QGraphicsSceneEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent) *QGraphicsSceneEvent { +// newQGraphicsSceneEvent constructs the type using only CGO pointers. +func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneEvent { if h == nil { return nil } - return &QGraphicsSceneEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} + return &QGraphicsSceneEvent{h: h, + QEvent: newQEvent(h_QEvent)} } -func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer) *QGraphicsSceneEvent { - return newQGraphicsSceneEvent((*C.QGraphicsSceneEvent)(h)) +// UnsafeNewQGraphicsSceneEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneEvent{h: (*C.QGraphicsSceneEvent)(h), + QEvent: UnsafeNewQEvent(h_QEvent)} } // NewQGraphicsSceneEvent constructs a new QGraphicsSceneEvent object. func NewQGraphicsSceneEvent(typeVal QEvent__Type) *QGraphicsSceneEvent { - ret := C.QGraphicsSceneEvent_new((C.int)(typeVal)) - return newQGraphicsSceneEvent(ret) + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneEvent_new((C.int)(typeVal), &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneEvent) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneEvent_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneEvent_Widget(this.h)), nil, nil) } func (this *QGraphicsSceneEvent) SetWidget(widget *QWidget) { @@ -73,9 +88,53 @@ func (this *QGraphicsSceneEvent) SetTimestamp(ts uint64) { C.QGraphicsSceneEvent_SetTimestamp(this.h, (C.ulonglong)(ts)) } +func (this *QGraphicsSceneEvent) callVirtualBase_SetAccepted(accepted bool) { + + C.QGraphicsSceneEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted)) + +} +func (this *QGraphicsSceneEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) { + C.QGraphicsSceneEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSceneEvent_SetAccepted +func miqt_exec_callback_QGraphicsSceneEvent_SetAccepted(self *C.QGraphicsSceneEvent, cb C.intptr_t, accepted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(accepted) + + gofunc((&QGraphicsSceneEvent{h: self}).callVirtualBase_SetAccepted, slotval1) + +} + +func (this *QGraphicsSceneEvent) callVirtualBase_Clone() *QEvent { + + return UnsafeNewQEvent(unsafe.Pointer(C.QGraphicsSceneEvent_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QGraphicsSceneEvent) OnClone(slot func(super func() *QEvent) *QEvent) { + C.QGraphicsSceneEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSceneEvent_Clone +func miqt_exec_callback_QGraphicsSceneEvent_Clone(self *C.QGraphicsSceneEvent, cb C.intptr_t) *C.QEvent { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QEvent) *QEvent) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSceneEvent{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsSceneEvent) Delete() { - C.QGraphicsSceneEvent_Delete(this.h) + C.QGraphicsSceneEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -88,7 +147,8 @@ func (this *QGraphicsSceneEvent) GoGC() { } type QGraphicsSceneMouseEvent struct { - h *C.QGraphicsSceneMouseEvent + h *C.QGraphicsSceneMouseEvent + isSubclass bool *QGraphicsSceneEvent } @@ -106,27 +166,47 @@ func (this *QGraphicsSceneMouseEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent) *QGraphicsSceneMouseEvent { +// newQGraphicsSceneMouseEvent constructs the type using only CGO pointers. +func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMouseEvent { if h == nil { return nil } - return &QGraphicsSceneMouseEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneMouseEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer) *QGraphicsSceneMouseEvent { - return newQGraphicsSceneMouseEvent((*C.QGraphicsSceneMouseEvent)(h)) +// UnsafeNewQGraphicsSceneMouseEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMouseEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneMouseEvent{h: (*C.QGraphicsSceneMouseEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneMouseEvent constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent() *QGraphicsSceneMouseEvent { - ret := C.QGraphicsSceneMouseEvent_new() - return newQGraphicsSceneMouseEvent(ret) + var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneMouseEvent_new(&outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneMouseEvent2 constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent2(typeVal QEvent__Type) *QGraphicsSceneMouseEvent { - ret := C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneMouseEvent(ret) + var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneMouseEvent) Pos() *QPointF { @@ -270,7 +350,7 @@ func (this *QGraphicsSceneMouseEvent) SetFlags(flags MouseEventFlag) { // Delete this object from C++ memory. func (this *QGraphicsSceneMouseEvent) Delete() { - C.QGraphicsSceneMouseEvent_Delete(this.h) + C.QGraphicsSceneMouseEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -283,7 +363,8 @@ func (this *QGraphicsSceneMouseEvent) GoGC() { } type QGraphicsSceneWheelEvent struct { - h *C.QGraphicsSceneWheelEvent + h *C.QGraphicsSceneWheelEvent + isSubclass bool *QGraphicsSceneEvent } @@ -301,27 +382,47 @@ func (this *QGraphicsSceneWheelEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent) *QGraphicsSceneWheelEvent { +// newQGraphicsSceneWheelEvent constructs the type using only CGO pointers. +func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneWheelEvent { if h == nil { return nil } - return &QGraphicsSceneWheelEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneWheelEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer) *QGraphicsSceneWheelEvent { - return newQGraphicsSceneWheelEvent((*C.QGraphicsSceneWheelEvent)(h)) +// UnsafeNewQGraphicsSceneWheelEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneWheelEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneWheelEvent{h: (*C.QGraphicsSceneWheelEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneWheelEvent constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent() *QGraphicsSceneWheelEvent { - ret := C.QGraphicsSceneWheelEvent_new() - return newQGraphicsSceneWheelEvent(ret) + var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneWheelEvent_new(&outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneWheelEvent2 constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent2(typeVal QEvent__Type) *QGraphicsSceneWheelEvent { - ret := C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneWheelEvent(ret) + var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneWheelEvent) Pos() *QPointF { @@ -418,7 +519,7 @@ func (this *QGraphicsSceneWheelEvent) SetInverted(inverted bool) { // Delete this object from C++ memory. func (this *QGraphicsSceneWheelEvent) Delete() { - C.QGraphicsSceneWheelEvent_Delete(this.h) + C.QGraphicsSceneWheelEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -431,7 +532,8 @@ func (this *QGraphicsSceneWheelEvent) GoGC() { } type QGraphicsSceneContextMenuEvent struct { - h *C.QGraphicsSceneContextMenuEvent + h *C.QGraphicsSceneContextMenuEvent + isSubclass bool *QGraphicsSceneEvent } @@ -449,27 +551,47 @@ func (this *QGraphicsSceneContextMenuEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent) *QGraphicsSceneContextMenuEvent { +// newQGraphicsSceneContextMenuEvent constructs the type using only CGO pointers. +func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneContextMenuEvent { if h == nil { return nil } - return &QGraphicsSceneContextMenuEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneContextMenuEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer) *QGraphicsSceneContextMenuEvent { - return newQGraphicsSceneContextMenuEvent((*C.QGraphicsSceneContextMenuEvent)(h)) +// UnsafeNewQGraphicsSceneContextMenuEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneContextMenuEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneContextMenuEvent{h: (*C.QGraphicsSceneContextMenuEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneContextMenuEvent constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent() *QGraphicsSceneContextMenuEvent { - ret := C.QGraphicsSceneContextMenuEvent_new() - return newQGraphicsSceneContextMenuEvent(ret) + var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneContextMenuEvent_new(&outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneContextMenuEvent2 constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent2(typeVal QEvent__Type) *QGraphicsSceneContextMenuEvent { - ret := C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneContextMenuEvent(ret) + var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneContextMenuEvent) Pos() *QPointF { @@ -523,7 +645,7 @@ func (this *QGraphicsSceneContextMenuEvent) SetReason(reason QGraphicsSceneConte // Delete this object from C++ memory. func (this *QGraphicsSceneContextMenuEvent) Delete() { - C.QGraphicsSceneContextMenuEvent_Delete(this.h) + C.QGraphicsSceneContextMenuEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -536,7 +658,8 @@ func (this *QGraphicsSceneContextMenuEvent) GoGC() { } type QGraphicsSceneHoverEvent struct { - h *C.QGraphicsSceneHoverEvent + h *C.QGraphicsSceneHoverEvent + isSubclass bool *QGraphicsSceneEvent } @@ -554,27 +677,47 @@ func (this *QGraphicsSceneHoverEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent) *QGraphicsSceneHoverEvent { +// newQGraphicsSceneHoverEvent constructs the type using only CGO pointers. +func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHoverEvent { if h == nil { return nil } - return &QGraphicsSceneHoverEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneHoverEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer) *QGraphicsSceneHoverEvent { - return newQGraphicsSceneHoverEvent((*C.QGraphicsSceneHoverEvent)(h)) +// UnsafeNewQGraphicsSceneHoverEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHoverEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneHoverEvent{h: (*C.QGraphicsSceneHoverEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneHoverEvent constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent() *QGraphicsSceneHoverEvent { - ret := C.QGraphicsSceneHoverEvent_new() - return newQGraphicsSceneHoverEvent(ret) + var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHoverEvent_new(&outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneHoverEvent2 constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent2(typeVal QEvent__Type) *QGraphicsSceneHoverEvent { - ret := C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneHoverEvent(ret) + var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneHoverEvent) Pos() *QPointF { @@ -653,7 +796,7 @@ func (this *QGraphicsSceneHoverEvent) SetModifiers(modifiers KeyboardModifier) { // Delete this object from C++ memory. func (this *QGraphicsSceneHoverEvent) Delete() { - C.QGraphicsSceneHoverEvent_Delete(this.h) + C.QGraphicsSceneHoverEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -666,7 +809,8 @@ func (this *QGraphicsSceneHoverEvent) GoGC() { } type QGraphicsSceneHelpEvent struct { - h *C.QGraphicsSceneHelpEvent + h *C.QGraphicsSceneHelpEvent + isSubclass bool *QGraphicsSceneEvent } @@ -684,27 +828,47 @@ func (this *QGraphicsSceneHelpEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent) *QGraphicsSceneHelpEvent { +// newQGraphicsSceneHelpEvent constructs the type using only CGO pointers. +func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHelpEvent { if h == nil { return nil } - return &QGraphicsSceneHelpEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneHelpEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer) *QGraphicsSceneHelpEvent { - return newQGraphicsSceneHelpEvent((*C.QGraphicsSceneHelpEvent)(h)) +// UnsafeNewQGraphicsSceneHelpEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHelpEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneHelpEvent{h: (*C.QGraphicsSceneHelpEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneHelpEvent constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent() *QGraphicsSceneHelpEvent { - ret := C.QGraphicsSceneHelpEvent_new() - return newQGraphicsSceneHelpEvent(ret) + var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHelpEvent_new(&outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneHelpEvent2 constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent2(typeVal QEvent__Type) *QGraphicsSceneHelpEvent { - ret := C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneHelpEvent(ret) + var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneHelpEvent) ScenePos() *QPointF { @@ -731,7 +895,7 @@ func (this *QGraphicsSceneHelpEvent) SetScreenPos(pos *QPoint) { // Delete this object from C++ memory. func (this *QGraphicsSceneHelpEvent) Delete() { - C.QGraphicsSceneHelpEvent_Delete(this.h) + C.QGraphicsSceneHelpEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -744,7 +908,8 @@ func (this *QGraphicsSceneHelpEvent) GoGC() { } type QGraphicsSceneDragDropEvent struct { - h *C.QGraphicsSceneDragDropEvent + h *C.QGraphicsSceneDragDropEvent + isSubclass bool *QGraphicsSceneEvent } @@ -762,27 +927,47 @@ func (this *QGraphicsSceneDragDropEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent) *QGraphicsSceneDragDropEvent { +// newQGraphicsSceneDragDropEvent constructs the type using only CGO pointers. +func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneDragDropEvent { if h == nil { return nil } - return &QGraphicsSceneDragDropEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneDragDropEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer) *QGraphicsSceneDragDropEvent { - return newQGraphicsSceneDragDropEvent((*C.QGraphicsSceneDragDropEvent)(h)) +// UnsafeNewQGraphicsSceneDragDropEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneDragDropEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneDragDropEvent{h: (*C.QGraphicsSceneDragDropEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneDragDropEvent constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent() *QGraphicsSceneDragDropEvent { - ret := C.QGraphicsSceneDragDropEvent_new() - return newQGraphicsSceneDragDropEvent(ret) + var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneDragDropEvent_new(&outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } // NewQGraphicsSceneDragDropEvent2 constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent2(typeVal QEvent__Type) *QGraphicsSceneDragDropEvent { - ret := C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal)) - return newQGraphicsSceneDragDropEvent(ret) + var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneDragDropEvent) Pos() *QPointF { @@ -863,7 +1048,7 @@ func (this *QGraphicsSceneDragDropEvent) SetDropAction(action DropAction) { } func (this *QGraphicsSceneDragDropEvent) Source() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_Source(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_Source(this.h)), nil, nil) } func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { @@ -871,7 +1056,7 @@ func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { } func (this *QGraphicsSceneDragDropEvent) MimeData() *QMimeData { - return UnsafeNewQMimeData(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_MimeData(this.h))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QGraphicsSceneDragDropEvent_MimeData(this.h)), nil) } func (this *QGraphicsSceneDragDropEvent) SetMimeData(data *QMimeData) { @@ -880,7 +1065,7 @@ func (this *QGraphicsSceneDragDropEvent) SetMimeData(data *QMimeData) { // Delete this object from C++ memory. func (this *QGraphicsSceneDragDropEvent) Delete() { - C.QGraphicsSceneDragDropEvent_Delete(this.h) + C.QGraphicsSceneDragDropEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -893,7 +1078,8 @@ func (this *QGraphicsSceneDragDropEvent) GoGC() { } type QGraphicsSceneResizeEvent struct { - h *C.QGraphicsSceneResizeEvent + h *C.QGraphicsSceneResizeEvent + isSubclass bool *QGraphicsSceneEvent } @@ -911,21 +1097,35 @@ func (this *QGraphicsSceneResizeEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent) *QGraphicsSceneResizeEvent { +// newQGraphicsSceneResizeEvent constructs the type using only CGO pointers. +func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneResizeEvent { if h == nil { return nil } - return &QGraphicsSceneResizeEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneResizeEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer) *QGraphicsSceneResizeEvent { - return newQGraphicsSceneResizeEvent((*C.QGraphicsSceneResizeEvent)(h)) +// UnsafeNewQGraphicsSceneResizeEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneResizeEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneResizeEvent{h: (*C.QGraphicsSceneResizeEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneResizeEvent constructs a new QGraphicsSceneResizeEvent object. func NewQGraphicsSceneResizeEvent() *QGraphicsSceneResizeEvent { - ret := C.QGraphicsSceneResizeEvent_new() - return newQGraphicsSceneResizeEvent(ret) + var outptr_QGraphicsSceneResizeEvent *C.QGraphicsSceneResizeEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneResizeEvent_new(&outptr_QGraphicsSceneResizeEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneResizeEvent(outptr_QGraphicsSceneResizeEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneResizeEvent) OldSize() *QSizeF { @@ -952,7 +1152,7 @@ func (this *QGraphicsSceneResizeEvent) SetNewSize(size *QSizeF) { // Delete this object from C++ memory. func (this *QGraphicsSceneResizeEvent) Delete() { - C.QGraphicsSceneResizeEvent_Delete(this.h) + C.QGraphicsSceneResizeEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -965,7 +1165,8 @@ func (this *QGraphicsSceneResizeEvent) GoGC() { } type QGraphicsSceneMoveEvent struct { - h *C.QGraphicsSceneMoveEvent + h *C.QGraphicsSceneMoveEvent + isSubclass bool *QGraphicsSceneEvent } @@ -983,21 +1184,35 @@ func (this *QGraphicsSceneMoveEvent) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent) *QGraphicsSceneMoveEvent { +// newQGraphicsSceneMoveEvent constructs the type using only CGO pointers. +func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMoveEvent { if h == nil { return nil } - return &QGraphicsSceneMoveEvent{h: h, QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(unsafe.Pointer(h))} + return &QGraphicsSceneMoveEvent{h: h, + QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } -func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer) *QGraphicsSceneMoveEvent { - return newQGraphicsSceneMoveEvent((*C.QGraphicsSceneMoveEvent)(h)) +// UnsafeNewQGraphicsSceneMoveEvent constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMoveEvent { + if h == nil { + return nil + } + + return &QGraphicsSceneMoveEvent{h: (*C.QGraphicsSceneMoveEvent)(h), + QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} } // NewQGraphicsSceneMoveEvent constructs a new QGraphicsSceneMoveEvent object. func NewQGraphicsSceneMoveEvent() *QGraphicsSceneMoveEvent { - ret := C.QGraphicsSceneMoveEvent_new() - return newQGraphicsSceneMoveEvent(ret) + var outptr_QGraphicsSceneMoveEvent *C.QGraphicsSceneMoveEvent = nil + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + var outptr_QEvent *C.QEvent = nil + + C.QGraphicsSceneMoveEvent_new(&outptr_QGraphicsSceneMoveEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) + ret := newQGraphicsSceneMoveEvent(outptr_QGraphicsSceneMoveEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret.isSubclass = true + return ret } func (this *QGraphicsSceneMoveEvent) OldPos() *QPointF { @@ -1024,7 +1239,7 @@ func (this *QGraphicsSceneMoveEvent) SetNewPos(pos *QPointF) { // Delete this object from C++ memory. func (this *QGraphicsSceneMoveEvent) Delete() { - C.QGraphicsSceneMoveEvent_Delete(this.h) + C.QGraphicsSceneMoveEvent_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicssceneevent.h b/qt6/gen_qgraphicssceneevent.h index bf5d449d..534439ec 100644 --- a/qt6/gen_qgraphicssceneevent.h +++ b/qt6/gen_qgraphicssceneevent.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsSceneContextMenuEvent; class QGraphicsSceneDragDropEvent; class QGraphicsSceneEvent; @@ -30,6 +31,7 @@ class QPointF; class QSizeF; class QWidget; #else +typedef struct QEvent QEvent; typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; typedef struct QGraphicsSceneEvent QGraphicsSceneEvent; @@ -46,15 +48,19 @@ typedef struct QSizeF QSizeF; typedef struct QWidget QWidget; #endif -QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal); +void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self); void QGraphicsSceneEvent_SetWidget(QGraphicsSceneEvent* self, QWidget* widget); unsigned long long QGraphicsSceneEvent_Timestamp(const QGraphicsSceneEvent* self); void QGraphicsSceneEvent_SetTimestamp(QGraphicsSceneEvent* self, unsigned long long ts); -void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self); - -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new(); -QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal); +void QGraphicsSceneEvent_override_virtual_SetAccepted(void* self, intptr_t slot); +void QGraphicsSceneEvent_virtualbase_SetAccepted(void* self, bool accepted); +void QGraphicsSceneEvent_override_virtual_Clone(void* self, intptr_t slot); +QEvent* QGraphicsSceneEvent_virtualbase_Clone(const void* self); +void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass); + +void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetPos(QGraphicsSceneMouseEvent* self, QPointF* pos); QPointF* QGraphicsSceneMouseEvent_ScenePos(const QGraphicsSceneMouseEvent* self); @@ -83,10 +89,10 @@ int QGraphicsSceneMouseEvent_Source(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetSource(QGraphicsSceneMouseEvent* self, int source); int QGraphicsSceneMouseEvent_Flags(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetFlags(QGraphicsSceneMouseEvent* self, int flags); -void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self); +void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubclass); -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new(); -QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal); +void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetPos(QGraphicsSceneWheelEvent* self, QPointF* pos); QPointF* QGraphicsSceneWheelEvent_ScenePos(const QGraphicsSceneWheelEvent* self); @@ -107,10 +113,10 @@ QPoint* QGraphicsSceneWheelEvent_PixelDelta(const QGraphicsSceneWheelEvent* self void QGraphicsSceneWheelEvent_SetPixelDelta(QGraphicsSceneWheelEvent* self, QPoint* delta); bool QGraphicsSceneWheelEvent_IsInverted(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetInverted(QGraphicsSceneWheelEvent* self, bool inverted); -void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self); +void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubclass); -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new(); -QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal); +void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self); void QGraphicsSceneContextMenuEvent_SetPos(QGraphicsSceneContextMenuEvent* self, QPointF* pos); QPointF* QGraphicsSceneContextMenuEvent_ScenePos(const QGraphicsSceneContextMenuEvent* self); @@ -121,10 +127,10 @@ int QGraphicsSceneContextMenuEvent_Modifiers(const QGraphicsSceneContextMenuEven void QGraphicsSceneContextMenuEvent_SetModifiers(QGraphicsSceneContextMenuEvent* self, int modifiers); int QGraphicsSceneContextMenuEvent_Reason(const QGraphicsSceneContextMenuEvent* self); void QGraphicsSceneContextMenuEvent_SetReason(QGraphicsSceneContextMenuEvent* self, int reason); -void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self); +void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, bool isSubclass); -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new(); -QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal); +void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetPos(QGraphicsSceneHoverEvent* self, QPointF* pos); QPointF* QGraphicsSceneHoverEvent_ScenePos(const QGraphicsSceneHoverEvent* self); @@ -139,18 +145,18 @@ QPoint* QGraphicsSceneHoverEvent_LastScreenPos(const QGraphicsSceneHoverEvent* s void QGraphicsSceneHoverEvent_SetLastScreenPos(QGraphicsSceneHoverEvent* self, QPoint* pos); int QGraphicsSceneHoverEvent_Modifiers(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetModifiers(QGraphicsSceneHoverEvent* self, int modifiers); -void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self); +void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubclass); -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new(); -QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal); +void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScenePos(QGraphicsSceneHelpEvent* self, QPointF* pos); QPoint* QGraphicsSceneHelpEvent_ScreenPos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScreenPos(QGraphicsSceneHelpEvent* self, QPoint* pos); -void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self); +void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubclass); -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new(); -QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal); +void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self); void QGraphicsSceneDragDropEvent_SetPos(QGraphicsSceneDragDropEvent* self, QPointF* pos); QPointF* QGraphicsSceneDragDropEvent_ScenePos(const QGraphicsSceneDragDropEvent* self); @@ -172,21 +178,21 @@ QWidget* QGraphicsSceneDragDropEvent_Source(const QGraphicsSceneDragDropEvent* s void QGraphicsSceneDragDropEvent_SetSource(QGraphicsSceneDragDropEvent* self, QWidget* source); QMimeData* QGraphicsSceneDragDropEvent_MimeData(const QGraphicsSceneDragDropEvent* self); void QGraphicsSceneDragDropEvent_SetMimeData(QGraphicsSceneDragDropEvent* self, QMimeData* data); -void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self); +void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool isSubclass); -QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new(); +void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetOldSize(QGraphicsSceneResizeEvent* self, QSizeF* size); QSizeF* QGraphicsSceneResizeEvent_NewSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetNewSize(QGraphicsSceneResizeEvent* self, QSizeF* size); -void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self); +void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSubclass); -QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new(); +void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self); void QGraphicsSceneMoveEvent_SetOldPos(QGraphicsSceneMoveEvent* self, QPointF* pos); QPointF* QGraphicsSceneMoveEvent_NewPos(const QGraphicsSceneMoveEvent* self); void QGraphicsSceneMoveEvent_SetNewPos(QGraphicsSceneMoveEvent* self, QPointF* pos); -void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self); +void QGraphicsSceneMoveEvent_Delete(QGraphicsSceneMoveEvent* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicstransform.cpp b/qt6/gen_qgraphicstransform.cpp index acc926c2..71a3a067 100644 --- a/qt6/gen_qgraphicstransform.cpp +++ b/qt6/gen_qgraphicstransform.cpp @@ -57,16 +57,60 @@ struct miqt_string QGraphicsTransform_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGraphicsTransform_Delete(QGraphicsTransform* self) { - delete self; +void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsScale* QGraphicsScale_new() { - return new QGraphicsScale(); +class MiqtVirtualQGraphicsScale : public virtual QGraphicsScale { +public: + + MiqtVirtualQGraphicsScale(): QGraphicsScale() {}; + MiqtVirtualQGraphicsScale(QObject* parent): QGraphicsScale(parent) {}; + + virtual ~MiqtVirtualQGraphicsScale() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ApplyTo = 0; + + // Subclass to allow providing a Go implementation + virtual void applyTo(QMatrix4x4* matrix) const override { + if (handle__ApplyTo == 0) { + QGraphicsScale::applyTo(matrix); + return; + } + + QMatrix4x4* sigval1 = matrix; + + miqt_exec_callback_QGraphicsScale_ApplyTo(const_cast(this), handle__ApplyTo, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ApplyTo(QMatrix4x4* matrix) const { + + QGraphicsScale::applyTo(matrix); + + } + +}; + +void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(); + *outptr_QGraphicsScale = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsScale* QGraphicsScale_new2(QObject* parent) { - return new QGraphicsScale(parent); +void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(parent); + *outptr_QGraphicsScale = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self) { @@ -132,7 +176,7 @@ void QGraphicsScale_OriginChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_OriginChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::originChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::originChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_OriginChanged(slot); }); } @@ -142,7 +186,7 @@ void QGraphicsScale_XScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_XScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::xScaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::xScaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_XScaleChanged(slot); }); } @@ -152,7 +196,7 @@ void QGraphicsScale_YScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_YScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::yScaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::yScaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_YScaleChanged(slot); }); } @@ -162,7 +206,7 @@ void QGraphicsScale_ZScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_ZScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::zScaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::zScaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_ZScaleChanged(slot); }); } @@ -172,7 +216,7 @@ void QGraphicsScale_ScaleChanged(QGraphicsScale* self) { } void QGraphicsScale_connect_ScaleChanged(QGraphicsScale* self, intptr_t slot) { - QGraphicsScale::connect(self, static_cast(&QGraphicsScale::scaleChanged), self, [=]() { + MiqtVirtualQGraphicsScale::connect(self, static_cast(&QGraphicsScale::scaleChanged), self, [=]() { miqt_exec_callback_QGraphicsScale_ScaleChanged(slot); }); } @@ -199,16 +243,68 @@ struct miqt_string QGraphicsScale_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGraphicsScale_Delete(QGraphicsScale* self) { - delete self; +void QGraphicsScale_override_virtual_ApplyTo(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsScale*)(self) )->handle__ApplyTo = slot; +} + +void QGraphicsScale_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix) { + ( (const MiqtVirtualQGraphicsScale*)(self) )->virtualbase_ApplyTo(matrix); +} + +void QGraphicsScale_Delete(QGraphicsScale* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGraphicsRotation* QGraphicsRotation_new() { - return new QGraphicsRotation(); +class MiqtVirtualQGraphicsRotation : public virtual QGraphicsRotation { +public: + + MiqtVirtualQGraphicsRotation(): QGraphicsRotation() {}; + MiqtVirtualQGraphicsRotation(QObject* parent): QGraphicsRotation(parent) {}; + + virtual ~MiqtVirtualQGraphicsRotation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ApplyTo = 0; + + // Subclass to allow providing a Go implementation + virtual void applyTo(QMatrix4x4* matrix) const override { + if (handle__ApplyTo == 0) { + QGraphicsRotation::applyTo(matrix); + return; + } + + QMatrix4x4* sigval1 = matrix; + + miqt_exec_callback_QGraphicsRotation_ApplyTo(const_cast(this), handle__ApplyTo, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ApplyTo(QMatrix4x4* matrix) const { + + QGraphicsRotation::applyTo(matrix); + + } + +}; + +void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(); + *outptr_QGraphicsRotation = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGraphicsRotation* QGraphicsRotation_new2(QObject* parent) { - return new QGraphicsRotation(parent); +void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(parent); + *outptr_QGraphicsRotation = ret; + *outptr_QGraphicsTransform = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self) { @@ -268,7 +364,7 @@ void QGraphicsRotation_OriginChanged(QGraphicsRotation* self) { } void QGraphicsRotation_connect_OriginChanged(QGraphicsRotation* self, intptr_t slot) { - QGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::originChanged), self, [=]() { + MiqtVirtualQGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::originChanged), self, [=]() { miqt_exec_callback_QGraphicsRotation_OriginChanged(slot); }); } @@ -278,7 +374,7 @@ void QGraphicsRotation_AngleChanged(QGraphicsRotation* self) { } void QGraphicsRotation_connect_AngleChanged(QGraphicsRotation* self, intptr_t slot) { - QGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::angleChanged), self, [=]() { + MiqtVirtualQGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::angleChanged), self, [=]() { miqt_exec_callback_QGraphicsRotation_AngleChanged(slot); }); } @@ -288,7 +384,7 @@ void QGraphicsRotation_AxisChanged(QGraphicsRotation* self) { } void QGraphicsRotation_connect_AxisChanged(QGraphicsRotation* self, intptr_t slot) { - QGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::axisChanged), self, [=]() { + MiqtVirtualQGraphicsRotation::connect(self, static_cast(&QGraphicsRotation::axisChanged), self, [=]() { miqt_exec_callback_QGraphicsRotation_AxisChanged(slot); }); } @@ -315,7 +411,19 @@ struct miqt_string QGraphicsRotation_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGraphicsRotation_Delete(QGraphicsRotation* self) { - delete self; +void QGraphicsRotation_override_virtual_ApplyTo(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsRotation*)(self) )->handle__ApplyTo = slot; +} + +void QGraphicsRotation_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix) { + ( (const MiqtVirtualQGraphicsRotation*)(self) )->virtualbase_ApplyTo(matrix); +} + +void QGraphicsRotation_Delete(QGraphicsRotation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicstransform.go b/qt6/gen_qgraphicstransform.go index 785d8bad..0d436cc3 100644 --- a/qt6/gen_qgraphicstransform.go +++ b/qt6/gen_qgraphicstransform.go @@ -15,7 +15,8 @@ import ( ) type QGraphicsTransform struct { - h *C.QGraphicsTransform + h *C.QGraphicsTransform + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QGraphicsTransform) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsTransform(h *C.QGraphicsTransform) *QGraphicsTransform { +// newQGraphicsTransform constructs the type using only CGO pointers. +func newQGraphicsTransform(h *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsTransform { if h == nil { return nil } - return &QGraphicsTransform{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QGraphicsTransform{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQGraphicsTransform(h unsafe.Pointer) *QGraphicsTransform { - return newQGraphicsTransform((*C.QGraphicsTransform)(h)) +// UnsafeNewQGraphicsTransform constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsTransform(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsTransform { + if h == nil { + return nil + } + + return &QGraphicsTransform{h: (*C.QGraphicsTransform)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QGraphicsTransform) MetaObject() *QMetaObject { @@ -91,7 +100,7 @@ func QGraphicsTransform_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QGraphicsTransform) Delete() { - C.QGraphicsTransform_Delete(this.h) + C.QGraphicsTransform_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -104,7 +113,8 @@ func (this *QGraphicsTransform) GoGC() { } type QGraphicsScale struct { - h *C.QGraphicsScale + h *C.QGraphicsScale + isSubclass bool *QGraphicsTransform } @@ -122,27 +132,47 @@ func (this *QGraphicsScale) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsScale(h *C.QGraphicsScale) *QGraphicsScale { +// newQGraphicsScale constructs the type using only CGO pointers. +func newQGraphicsScale(h *C.QGraphicsScale, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsScale { if h == nil { return nil } - return &QGraphicsScale{h: h, QGraphicsTransform: UnsafeNewQGraphicsTransform(unsafe.Pointer(h))} + return &QGraphicsScale{h: h, + QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } -func UnsafeNewQGraphicsScale(h unsafe.Pointer) *QGraphicsScale { - return newQGraphicsScale((*C.QGraphicsScale)(h)) +// UnsafeNewQGraphicsScale constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsScale(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScale { + if h == nil { + return nil + } + + return &QGraphicsScale{h: (*C.QGraphicsScale)(h), + QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } // NewQGraphicsScale constructs a new QGraphicsScale object. func NewQGraphicsScale() *QGraphicsScale { - ret := C.QGraphicsScale_new() - return newQGraphicsScale(ret) + var outptr_QGraphicsScale *C.QGraphicsScale = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScale_new(&outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsScale2 constructs a new QGraphicsScale object. func NewQGraphicsScale2(parent *QObject) *QGraphicsScale { - ret := C.QGraphicsScale_new2(parent.cPointer()) - return newQGraphicsScale(ret) + var outptr_QGraphicsScale *C.QGraphicsScale = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsScale_new2(parent.cPointer(), &outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsScale) MetaObject() *QMetaObject { @@ -310,9 +340,32 @@ func QGraphicsScale_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsScale) callVirtualBase_ApplyTo(matrix *QMatrix4x4) { + + C.QGraphicsScale_virtualbase_ApplyTo(unsafe.Pointer(this.h), matrix.cPointer()) + +} +func (this *QGraphicsScale) OnApplyTo(slot func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) { + C.QGraphicsScale_override_virtual_ApplyTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsScale_ApplyTo +func miqt_exec_callback_QGraphicsScale_ApplyTo(self *C.QGraphicsScale, cb C.intptr_t, matrix *C.QMatrix4x4) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMatrix4x4(unsafe.Pointer(matrix)) + + gofunc((&QGraphicsScale{h: self}).callVirtualBase_ApplyTo, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsScale) Delete() { - C.QGraphicsScale_Delete(this.h) + C.QGraphicsScale_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -325,7 +378,8 @@ func (this *QGraphicsScale) GoGC() { } type QGraphicsRotation struct { - h *C.QGraphicsRotation + h *C.QGraphicsRotation + isSubclass bool *QGraphicsTransform } @@ -343,27 +397,47 @@ func (this *QGraphicsRotation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsRotation(h *C.QGraphicsRotation) *QGraphicsRotation { +// newQGraphicsRotation constructs the type using only CGO pointers. +func newQGraphicsRotation(h *C.QGraphicsRotation, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsRotation { if h == nil { return nil } - return &QGraphicsRotation{h: h, QGraphicsTransform: UnsafeNewQGraphicsTransform(unsafe.Pointer(h))} + return &QGraphicsRotation{h: h, + QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } -func UnsafeNewQGraphicsRotation(h unsafe.Pointer) *QGraphicsRotation { - return newQGraphicsRotation((*C.QGraphicsRotation)(h)) +// UnsafeNewQGraphicsRotation constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsRotation(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsRotation { + if h == nil { + return nil + } + + return &QGraphicsRotation{h: (*C.QGraphicsRotation)(h), + QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} } // NewQGraphicsRotation constructs a new QGraphicsRotation object. func NewQGraphicsRotation() *QGraphicsRotation { - ret := C.QGraphicsRotation_new() - return newQGraphicsRotation(ret) + var outptr_QGraphicsRotation *C.QGraphicsRotation = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsRotation_new(&outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGraphicsRotation2 constructs a new QGraphicsRotation object. func NewQGraphicsRotation2(parent *QObject) *QGraphicsRotation { - ret := C.QGraphicsRotation_new2(parent.cPointer()) - return newQGraphicsRotation(ret) + var outptr_QGraphicsRotation *C.QGraphicsRotation = nil + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsRotation_new2(parent.cPointer(), &outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGraphicsRotation) MetaObject() *QMetaObject { @@ -496,9 +570,32 @@ func QGraphicsRotation_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsRotation) callVirtualBase_ApplyTo(matrix *QMatrix4x4) { + + C.QGraphicsRotation_virtualbase_ApplyTo(unsafe.Pointer(this.h), matrix.cPointer()) + +} +func (this *QGraphicsRotation) OnApplyTo(slot func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) { + C.QGraphicsRotation_override_virtual_ApplyTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsRotation_ApplyTo +func miqt_exec_callback_QGraphicsRotation_ApplyTo(self *C.QGraphicsRotation, cb C.intptr_t, matrix *C.QMatrix4x4) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(matrix *QMatrix4x4), matrix *QMatrix4x4)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMatrix4x4(unsafe.Pointer(matrix)) + + gofunc((&QGraphicsRotation{h: self}).callVirtualBase_ApplyTo, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsRotation) Delete() { - C.QGraphicsRotation_Delete(this.h) + C.QGraphicsRotation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicstransform.h b/qt6/gen_qgraphicstransform.h index 71c86ba0..51a1328a 100644 --- a/qt6/gen_qgraphicstransform.h +++ b/qt6/gen_qgraphicstransform.h @@ -38,10 +38,10 @@ struct miqt_string QGraphicsTransform_Tr(const char* s); void QGraphicsTransform_ApplyTo(const QGraphicsTransform* self, QMatrix4x4* matrix); struct miqt_string QGraphicsTransform_Tr2(const char* s, const char* c); struct miqt_string QGraphicsTransform_Tr3(const char* s, const char* c, int n); -void QGraphicsTransform_Delete(QGraphicsTransform* self); +void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass); -QGraphicsScale* QGraphicsScale_new(); -QGraphicsScale* QGraphicsScale_new2(QObject* parent); +void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self); void* QGraphicsScale_Metacast(QGraphicsScale* self, const char* param1); struct miqt_string QGraphicsScale_Tr(const char* s); @@ -66,10 +66,12 @@ void QGraphicsScale_ScaleChanged(QGraphicsScale* self); void QGraphicsScale_connect_ScaleChanged(QGraphicsScale* self, intptr_t slot); struct miqt_string QGraphicsScale_Tr2(const char* s, const char* c); struct miqt_string QGraphicsScale_Tr3(const char* s, const char* c, int n); -void QGraphicsScale_Delete(QGraphicsScale* self); +void QGraphicsScale_override_virtual_ApplyTo(void* self, intptr_t slot); +void QGraphicsScale_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); +void QGraphicsScale_Delete(QGraphicsScale* self, bool isSubclass); -QGraphicsRotation* QGraphicsRotation_new(); -QGraphicsRotation* QGraphicsRotation_new2(QObject* parent); +void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self); void* QGraphicsRotation_Metacast(QGraphicsRotation* self, const char* param1); struct miqt_string QGraphicsRotation_Tr(const char* s); @@ -89,7 +91,9 @@ void QGraphicsRotation_AxisChanged(QGraphicsRotation* self); void QGraphicsRotation_connect_AxisChanged(QGraphicsRotation* self, intptr_t slot); struct miqt_string QGraphicsRotation_Tr2(const char* s, const char* c); struct miqt_string QGraphicsRotation_Tr3(const char* s, const char* c, int n); -void QGraphicsRotation_Delete(QGraphicsRotation* self); +void QGraphicsRotation_override_virtual_ApplyTo(void* self, intptr_t slot); +void QGraphicsRotation_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); +void QGraphicsRotation_Delete(QGraphicsRotation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicsview.cpp b/qt6/gen_qgraphicsview.cpp index 4c5fb51f..e830c32b 100644 --- a/qt6/gen_qgraphicsview.cpp +++ b/qt6/gen_qgraphicsview.cpp @@ -1,40 +1,812 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qgraphicsview.h" #include "_cgo_export.h" -QGraphicsView* QGraphicsView_new(QWidget* parent) { - return new QGraphicsView(parent); +class MiqtVirtualQGraphicsView : public virtual QGraphicsView { +public: + + MiqtVirtualQGraphicsView(QWidget* parent): QGraphicsView(parent) {}; + MiqtVirtualQGraphicsView(): QGraphicsView() {}; + MiqtVirtualQGraphicsView(QGraphicsScene* scene): QGraphicsView(scene) {}; + MiqtVirtualQGraphicsView(QGraphicsScene* scene, QWidget* parent): QGraphicsView(scene, parent) {}; + + virtual ~MiqtVirtualQGraphicsView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QGraphicsView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGraphicsView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QGraphicsView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QGraphicsView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QGraphicsView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* widget) override { + if (handle__SetupViewport == 0) { + QGraphicsView::setupViewport(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QGraphicsView_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* widget) { + + QGraphicsView::setupViewport(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QGraphicsView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QGraphicsView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsView::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QGraphicsView::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGraphicsView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QGraphicsView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QGraphicsView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGraphicsView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QGraphicsView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QGraphicsView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QGraphicsView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGraphicsView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsView::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsView::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QGraphicsView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGraphicsView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QGraphicsView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QGraphicsView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QGraphicsView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGraphicsView::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QGraphicsView::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QGraphicsView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QGraphicsView::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QGraphicsView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QGraphicsView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QGraphicsView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QGraphicsView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsView::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsView::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QGraphicsView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBackground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBackground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawBackground == 0) { + QGraphicsView::drawBackground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsView_DrawBackground(this, handle__DrawBackground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBackground(QPainter* painter, QRectF* rect) { + + QGraphicsView::drawBackground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawForeground = 0; + + // Subclass to allow providing a Go implementation + virtual void drawForeground(QPainter* painter, const QRectF& rect) override { + if (handle__DrawForeground == 0) { + QGraphicsView::drawForeground(painter, rect); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsView_DrawForeground(this, handle__DrawForeground, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawForeground(QPainter* painter, QRectF* rect) { + + QGraphicsView::drawForeground(painter, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QGraphicsView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGraphicsView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QGraphicsView::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QGraphicsView::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QGraphicsView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QGraphicsView::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QGraphicsView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGraphicsView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QGraphicsView::viewportSizeHint()); + + } + +}; + +void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(parent); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGraphicsView* QGraphicsView_new2() { - return new QGraphicsView(); +void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene) { - return new QGraphicsView(scene); +void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent) { - return new QGraphicsView(scene, parent); +void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene, parent); + *outptr_QGraphicsView = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self) { @@ -414,7 +1186,7 @@ void QGraphicsView_RubberBandChanged(QGraphicsView* self, QRect* viewportRect, Q } void QGraphicsView_connect_RubberBandChanged(QGraphicsView* self, intptr_t slot) { - QGraphicsView::connect(self, static_cast(&QGraphicsView::rubberBandChanged), self, [=](QRect viewportRect, QPointF fromScenePoint, QPointF toScenePoint) { + MiqtVirtualQGraphicsView::connect(self, static_cast(&QGraphicsView::rubberBandChanged), self, [=](QRect viewportRect, QPointF fromScenePoint, QPointF toScenePoint) { QRect* sigval1 = new QRect(viewportRect); QPointF* sigval2 = new QPointF(fromScenePoint); QPointF* sigval3 = new QPointF(toScenePoint); @@ -551,7 +1323,251 @@ void QGraphicsView_InvalidateScene2(QGraphicsView* self, QRectF* rect, int layer self->invalidateScene(*rect, static_cast(layers)); } -void QGraphicsView_Delete(QGraphicsView* self) { - delete self; +void QGraphicsView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__SizeHint = slot; +} + +QSize* QGraphicsView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_SizeHint(); +} + +void QGraphicsView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsView_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__SetupViewport = slot; +} + +void QGraphicsView_virtualbase_SetupViewport(void* self, QWidget* widget) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_SetupViewport(widget); +} + +void QGraphicsView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__Event = slot; +} + +bool QGraphicsView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_Event(event); +} + +void QGraphicsView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ViewportEvent = slot; +} + +bool QGraphicsView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QGraphicsView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsView_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__PaintEvent = slot; +} + +void QGraphicsView_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_PaintEvent(event); +} + +void QGraphicsView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QGraphicsView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QGraphicsView_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsView_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsView_override_virtual_DrawBackground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DrawBackground = slot; +} + +void QGraphicsView_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DrawBackground(painter, rect); +} + +void QGraphicsView_override_virtual_DrawForeground(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__DrawForeground = slot; +} + +void QGraphicsView_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect) { + ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_DrawForeground(painter, rect); +} + +void QGraphicsView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QGraphicsView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QGraphicsView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsView_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQGraphicsView*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QGraphicsView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QGraphicsView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQGraphicsView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QGraphicsView_Delete(QGraphicsView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicsview.go b/qt6/gen_qgraphicsview.go index 3f6305ce..d948a779 100644 --- a/qt6/gen_qgraphicsview.go +++ b/qt6/gen_qgraphicsview.go @@ -56,7 +56,8 @@ const ( ) type QGraphicsView struct { - h *C.QGraphicsView + h *C.QGraphicsView + isSubclass bool *QAbstractScrollArea } @@ -74,39 +75,83 @@ func (this *QGraphicsView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsView(h *C.QGraphicsView) *QGraphicsView { +// newQGraphicsView constructs the type using only CGO pointers. +func newQGraphicsView(h *C.QGraphicsView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGraphicsView { if h == nil { return nil } - return &QGraphicsView{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QGraphicsView{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQGraphicsView(h unsafe.Pointer) *QGraphicsView { - return newQGraphicsView((*C.QGraphicsView)(h)) +// UnsafeNewQGraphicsView constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGraphicsView { + if h == nil { + return nil + } + + return &QGraphicsView{h: (*C.QGraphicsView)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQGraphicsView constructs a new QGraphicsView object. func NewQGraphicsView(parent *QWidget) *QGraphicsView { - ret := C.QGraphicsView_new(parent.cPointer()) - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new(parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGraphicsView2 constructs a new QGraphicsView object. func NewQGraphicsView2() *QGraphicsView { - ret := C.QGraphicsView_new2() - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new2(&outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGraphicsView3 constructs a new QGraphicsView object. func NewQGraphicsView3(scene *QGraphicsScene) *QGraphicsView { - ret := C.QGraphicsView_new3(scene.cPointer()) - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new3(scene.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGraphicsView4 constructs a new QGraphicsView object. func NewQGraphicsView4(scene *QGraphicsScene, parent *QWidget) *QGraphicsView { - ret := C.QGraphicsView_new4(scene.cPointer(), parent.cPointer()) - return newQGraphicsView(ret) + var outptr_QGraphicsView *C.QGraphicsView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGraphicsView_new4(scene.cPointer(), parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QGraphicsView) MetaObject() *QMetaObject { @@ -235,7 +280,7 @@ func (this *QGraphicsView) SetInteractive(allowed bool) { } func (this *QGraphicsView) Scene() *QGraphicsScene { - return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsView_Scene(this.h))) + return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsView_Scene(this.h)), nil) } func (this *QGraphicsView) SetScene(scene *QGraphicsScene) { @@ -649,9 +694,723 @@ func (this *QGraphicsView) InvalidateScene2(rect *QRectF, layers QGraphicsScene_ C.QGraphicsView_InvalidateScene2(this.h, rect.cPointer(), (C.int)(layers)) } +func (this *QGraphicsView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QGraphicsView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QGraphicsView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_SizeHint +func miqt_exec_callback_QGraphicsView_SizeHint(self *C.QGraphicsView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_InputMethodQuery +func miqt_exec_callback_QGraphicsView_InputMethodQuery(self *C.QGraphicsView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsView) callVirtualBase_SetupViewport(widget *QWidget) { + + C.QGraphicsView_virtualbase_SetupViewport(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QGraphicsView) OnSetupViewport(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QGraphicsView_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_SetupViewport +func miqt_exec_callback_QGraphicsView_SetupViewport(self *C.QGraphicsView, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_Event +func miqt_exec_callback_QGraphicsView_Event(self *C.QGraphicsView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ViewportEvent +func miqt_exec_callback_QGraphicsView_ViewportEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QGraphicsView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QGraphicsView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ContextMenuEvent +func miqt_exec_callback_QGraphicsView_ContextMenuEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QGraphicsView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QGraphicsView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DragEnterEvent +func miqt_exec_callback_QGraphicsView_DragEnterEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QGraphicsView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QGraphicsView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DragLeaveEvent +func miqt_exec_callback_QGraphicsView_DragLeaveEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QGraphicsView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QGraphicsView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DragMoveEvent +func miqt_exec_callback_QGraphicsView_DragMoveEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QGraphicsView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QGraphicsView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DropEvent +func miqt_exec_callback_QGraphicsView_DropEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_FocusInEvent +func miqt_exec_callback_QGraphicsView_FocusInEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_FocusNextPrevChild +func miqt_exec_callback_QGraphicsView_FocusNextPrevChild(self *C.QGraphicsView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_FocusOutEvent +func miqt_exec_callback_QGraphicsView_FocusOutEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_KeyPressEvent +func miqt_exec_callback_QGraphicsView_KeyPressEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsView_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsView_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_KeyReleaseEvent +func miqt_exec_callback_QGraphicsView_KeyReleaseEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MousePressEvent +func miqt_exec_callback_QGraphicsView_MousePressEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MouseMoveEvent +func miqt_exec_callback_QGraphicsView_MouseMoveEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QGraphicsView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGraphicsView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MouseReleaseEvent +func miqt_exec_callback_QGraphicsView_MouseReleaseEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QGraphicsView_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QGraphicsView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_WheelEvent +func miqt_exec_callback_QGraphicsView_WheelEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QGraphicsView_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QGraphicsView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_PaintEvent +func miqt_exec_callback_QGraphicsView_PaintEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QGraphicsView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QGraphicsView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ResizeEvent +func miqt_exec_callback_QGraphicsView_ResizeEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QGraphicsView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QGraphicsView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QGraphicsView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ScrollContentsBy +func miqt_exec_callback_QGraphicsView_ScrollContentsBy(self *C.QGraphicsView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QGraphicsView) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGraphicsView_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGraphicsView_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ShowEvent +func miqt_exec_callback_QGraphicsView_ShowEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_InputMethodEvent +func miqt_exec_callback_QGraphicsView_InputMethodEvent(self *C.QGraphicsView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsView) callVirtualBase_DrawBackground(painter *QPainter, rect *QRectF) { + + C.QGraphicsView_virtualbase_DrawBackground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsView) OnDrawBackground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsView_override_virtual_DrawBackground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DrawBackground +func miqt_exec_callback_QGraphicsView_DrawBackground(self *C.QGraphicsView, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DrawBackground, slotval1, slotval2) + +} + +func (this *QGraphicsView) callVirtualBase_DrawForeground(painter *QPainter, rect *QRectF) { + + C.QGraphicsView_virtualbase_DrawForeground(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer()) + +} +func (this *QGraphicsView) OnDrawForeground(slot func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) { + C.QGraphicsView_override_virtual_DrawForeground(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_DrawForeground +func miqt_exec_callback_QGraphicsView_DrawForeground(self *C.QGraphicsView, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF), painter *QPainter, rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsView{h: self}).callVirtualBase_DrawForeground, slotval1, slotval2) + +} + +func (this *QGraphicsView) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QGraphicsView_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QGraphicsView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_MinimumSizeHint +func miqt_exec_callback_QGraphicsView_MinimumSizeHint(self *C.QGraphicsView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsView) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QGraphicsView_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QGraphicsView) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QGraphicsView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_EventFilter +func miqt_exec_callback_QGraphicsView_EventFilter(self *C.QGraphicsView, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QGraphicsView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QGraphicsView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsView_ViewportSizeHint +func miqt_exec_callback_QGraphicsView_ViewportSizeHint(self *C.QGraphicsView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsView) Delete() { - C.QGraphicsView_Delete(this.h) + C.QGraphicsView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicsview.h b/qt6/gen_qgraphicsview.h index f4116a36..e03834bf 100644 --- a/qt6/gen_qgraphicsview.h +++ b/qt6/gen_qgraphicsview.h @@ -15,43 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QBrush; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QGraphicsItem; class QGraphicsScene; class QGraphicsView; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPainter; class QPainterPath; class QPoint; class QPointF; class QRect; class QRectF; +class QResizeEvent; +class QShowEvent; class QSize; class QTransform; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QGraphicsItem QGraphicsItem; typedef struct QGraphicsScene QGraphicsScene; typedef struct QGraphicsView QGraphicsView; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPainterPath QPainterPath; typedef struct QPoint QPoint; typedef struct QPointF QPointF; typedef struct QRect QRect; typedef struct QRectF QRectF; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QTransform QTransform; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QGraphicsView* QGraphicsView_new(QWidget* parent); -QGraphicsView* QGraphicsView_new2(); -QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene); -QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent); +void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self); void* QGraphicsView_Metacast(QGraphicsView* self, const char* param1); struct miqt_string QGraphicsView_Tr(const char* s); @@ -128,6 +164,31 @@ void QGraphicsView_InvalidateScene(QGraphicsView* self); void QGraphicsView_UpdateSceneRect(QGraphicsView* self, QRectF* rect); void QGraphicsView_RubberBandChanged(QGraphicsView* self, QRect* viewportRect, QPointF* fromScenePoint, QPointF* toScenePoint); void QGraphicsView_connect_RubberBandChanged(QGraphicsView* self, intptr_t slot); +void QGraphicsView_SetupViewport(QGraphicsView* self, QWidget* widget); +bool QGraphicsView_Event(QGraphicsView* self, QEvent* event); +bool QGraphicsView_ViewportEvent(QGraphicsView* self, QEvent* event); +void QGraphicsView_ContextMenuEvent(QGraphicsView* self, QContextMenuEvent* event); +void QGraphicsView_DragEnterEvent(QGraphicsView* self, QDragEnterEvent* event); +void QGraphicsView_DragLeaveEvent(QGraphicsView* self, QDragLeaveEvent* event); +void QGraphicsView_DragMoveEvent(QGraphicsView* self, QDragMoveEvent* event); +void QGraphicsView_DropEvent(QGraphicsView* self, QDropEvent* event); +void QGraphicsView_FocusInEvent(QGraphicsView* self, QFocusEvent* event); +bool QGraphicsView_FocusNextPrevChild(QGraphicsView* self, bool next); +void QGraphicsView_FocusOutEvent(QGraphicsView* self, QFocusEvent* event); +void QGraphicsView_KeyPressEvent(QGraphicsView* self, QKeyEvent* event); +void QGraphicsView_KeyReleaseEvent(QGraphicsView* self, QKeyEvent* event); +void QGraphicsView_MouseDoubleClickEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_MousePressEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_MouseMoveEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_MouseReleaseEvent(QGraphicsView* self, QMouseEvent* event); +void QGraphicsView_WheelEvent(QGraphicsView* self, QWheelEvent* event); +void QGraphicsView_PaintEvent(QGraphicsView* self, QPaintEvent* event); +void QGraphicsView_ResizeEvent(QGraphicsView* self, QResizeEvent* event); +void QGraphicsView_ScrollContentsBy(QGraphicsView* self, int dx, int dy); +void QGraphicsView_ShowEvent(QGraphicsView* self, QShowEvent* event); +void QGraphicsView_InputMethodEvent(QGraphicsView* self, QInputMethodEvent* event); +void QGraphicsView_DrawBackground(QGraphicsView* self, QPainter* painter, QRectF* rect); +void QGraphicsView_DrawForeground(QGraphicsView* self, QPainter* painter, QRectF* rect); struct miqt_string QGraphicsView_Tr2(const char* s, const char* c); struct miqt_string QGraphicsView_Tr3(const char* s, const char* c, int n); void QGraphicsView_SetRenderHint2(QGraphicsView* self, int hint, bool enabled); @@ -150,7 +211,67 @@ struct miqt_array /* of QGraphicsItem* */ QGraphicsView_Items5(const QGraphicsV struct miqt_array /* of QGraphicsItem* */ QGraphicsView_Items24(const QGraphicsView* self, QPainterPath* path, int mode); void QGraphicsView_InvalidateScene1(QGraphicsView* self, QRectF* rect); void QGraphicsView_InvalidateScene2(QGraphicsView* self, QRectF* rect, int layers); -void QGraphicsView_Delete(QGraphicsView* self); +void QGraphicsView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QGraphicsView_virtualbase_SizeHint(const void* self); +void QGraphicsView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsView_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsView_override_virtual_SetupViewport(void* self, intptr_t slot); +void QGraphicsView_virtualbase_SetupViewport(void* self, QWidget* widget); +void QGraphicsView_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_Event(void* self, QEvent* event); +void QGraphicsView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QGraphicsView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QGraphicsView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QGraphicsView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QGraphicsView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QGraphicsView_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QGraphicsView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QGraphicsView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QGraphicsView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QGraphicsView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QGraphicsView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QGraphicsView_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsView_override_virtual_DrawBackground(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DrawBackground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsView_override_virtual_DrawForeground(void* self, intptr_t slot); +void QGraphicsView_virtualbase_DrawForeground(void* self, QPainter* painter, QRectF* rect); +void QGraphicsView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QGraphicsView_virtualbase_MinimumSizeHint(const void* self); +void QGraphicsView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsView_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QGraphicsView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QGraphicsView_virtualbase_ViewportSizeHint(const void* self); +void QGraphicsView_Delete(QGraphicsView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgraphicswidget.cpp b/qt6/gen_qgraphicswidget.cpp index 1f8111d7..d199233d 100644 --- a/qt6/gen_qgraphicswidget.cpp +++ b/qt6/gen_qgraphicswidget.cpp @@ -1,37 +1,886 @@ #include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include #include +#include #include #include #include #include +#include #include #include #include +#include #include +#include #include #include #include #include #include +#include #include +#include #include #include #include "gen_qgraphicswidget.h" #include "_cgo_export.h" -QGraphicsWidget* QGraphicsWidget_new() { - return new QGraphicsWidget(); +class MiqtVirtualQGraphicsWidget : public virtual QGraphicsWidget { +public: + + MiqtVirtualQGraphicsWidget(): QGraphicsWidget() {}; + MiqtVirtualQGraphicsWidget(QGraphicsItem* parent): QGraphicsWidget(parent) {}; + MiqtVirtualQGraphicsWidget(QGraphicsItem* parent, Qt::WindowFlags wFlags): QGraphicsWidget(parent, wFlags) {}; + + virtual ~MiqtVirtualQGraphicsWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRectF& rect) override { + if (handle__SetGeometry == 0) { + QGraphicsWidget::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsWidget_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsWidget::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetContentsMargins = 0; + + // Subclass to allow providing a Go implementation + virtual void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const override { + if (handle__GetContentsMargins == 0) { + QGraphicsWidget::getContentsMargins(left, top, right, bottom); + return; + } + + qreal* left_ret = left; + double* sigval1 = static_cast(left_ret); + qreal* top_ret = top; + double* sigval2 = static_cast(top_ret); + qreal* right_ret = right; + double* sigval3 = static_cast(right_ret); + qreal* bottom_ret = bottom; + double* sigval4 = static_cast(bottom_ret); + + miqt_exec_callback_QGraphicsWidget_GetContentsMargins(const_cast(this), handle__GetContentsMargins, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GetContentsMargins(double* left, double* top, double* right, double* bottom) const { + + QGraphicsWidget::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsWidget::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsWidget_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsWidget::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsWidget::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsWidget_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsWidget::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintWindowFrame = 0; + + // Subclass to allow providing a Go implementation + virtual void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__PaintWindowFrame == 0) { + QGraphicsWidget::paintWindowFrame(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsWidget_PaintWindowFrame(this, handle__PaintWindowFrame, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintWindowFrame(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsWidget::paintWindowFrame(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsWidget::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsWidget_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsWidget::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsWidget::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsWidget_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsWidget::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOption* option) const override { + if (handle__InitStyleOption == 0) { + QGraphicsWidget::initStyleOption(option); + return; + } + + QStyleOption* sigval1 = option; + + miqt_exec_callback_QGraphicsWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOption* option) const { + + QGraphicsWidget::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const override { + if (handle__SizeHint == 0) { + return QGraphicsWidget::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsWidget_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsWidget::sizeHint(static_cast(which), *constraint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometry() override { + if (handle__UpdateGeometry == 0) { + QGraphicsWidget::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsWidget_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsWidget::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsWidget::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsWidget_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsWidget::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PropertyChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant propertyChange(const QString& propertyName, const QVariant& value) override { + if (handle__PropertyChange == 0) { + return QGraphicsWidget::propertyChange(propertyName, value); + } + + const QString propertyName_ret = propertyName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray propertyName_b = propertyName_ret.toUtf8(); + struct miqt_string propertyName_ms; + propertyName_ms.len = propertyName_b.length(); + propertyName_ms.data = static_cast(malloc(propertyName_ms.len)); + memcpy(propertyName_ms.data, propertyName_b.data(), propertyName_ms.len); + struct miqt_string sigval1 = propertyName_ms; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsWidget_PropertyChange(this, handle__PropertyChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_PropertyChange(struct miqt_string propertyName, QVariant* value) { + QString propertyName_QString = QString::fromUtf8(propertyName.data, propertyName.len); + + return new QVariant(QGraphicsWidget::propertyChange(propertyName_QString, *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* event) override { + if (handle__SceneEvent == 0) { + return QGraphicsWidget::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsWidget::sceneEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool windowFrameEvent(QEvent* e) override { + if (handle__WindowFrameEvent == 0) { + return QGraphicsWidget::windowFrameEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_WindowFrameEvent(this, handle__WindowFrameEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WindowFrameEvent(QEvent* e) { + + return QGraphicsWidget::windowFrameEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameSectionAt = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const override { + if (handle__WindowFrameSectionAt == 0) { + return QGraphicsWidget::windowFrameSectionAt(pos); + } + + const QPointF& pos_ret = pos; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&pos_ret); + + int callback_return_value = miqt_exec_callback_QGraphicsWidget_WindowFrameSectionAt(const_cast(this), handle__WindowFrameSectionAt, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_WindowFrameSectionAt(QPointF* pos) const { + + Qt::WindowFrameSection _ret = QGraphicsWidget::windowFrameSectionAt(*pos); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGraphicsWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGraphicsWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGraphicsWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGraphicsWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGraphicsWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGraphicsWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsWidget::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGraphicsWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGraphicsWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGraphicsWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QGraphicsSceneMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGraphicsWidget::moveEvent(event); + return; + } + + QGraphicsSceneMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QGraphicsSceneMoveEvent* event) { + + QGraphicsWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void polishEvent() override { + if (handle__PolishEvent == 0) { + QGraphicsWidget::polishEvent(); + return; + } + + + miqt_exec_callback_QGraphicsWidget_PolishEvent(this, handle__PolishEvent); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishEvent() { + + QGraphicsWidget::polishEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QGraphicsSceneResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsWidget::resizeEvent(event); + return; + } + + QGraphicsSceneResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QGraphicsSceneResizeEvent* event) { + + QGraphicsWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsWidget::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsWidget::hoverMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsWidget::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsWidget::hoverLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabMouseEvent(QEvent* event) override { + if (handle__GrabMouseEvent == 0) { + QGraphicsWidget::grabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_GrabMouseEvent(this, handle__GrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabMouseEvent(QEvent* event) { + + QGraphicsWidget::grabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabMouseEvent(QEvent* event) override { + if (handle__UngrabMouseEvent == 0) { + QGraphicsWidget::ungrabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_UngrabMouseEvent(this, handle__UngrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabMouseEvent(QEvent* event) { + + QGraphicsWidget::ungrabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabKeyboardEvent(QEvent* event) override { + if (handle__GrabKeyboardEvent == 0) { + QGraphicsWidget::grabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_GrabKeyboardEvent(this, handle__GrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabKeyboardEvent(QEvent* event) { + + QGraphicsWidget::grabKeyboardEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabKeyboardEvent(QEvent* event) override { + if (handle__UngrabKeyboardEvent == 0) { + QGraphicsWidget::ungrabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWidget_UngrabKeyboardEvent(this, handle__UngrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabKeyboardEvent(QEvent* event) { + + QGraphicsWidget::ungrabKeyboardEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QGraphicsWidget::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QGraphicsWidget_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QGraphicsWidget::isEmpty(); + + } + +}; + +void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(); + *outptr_QGraphicsWidget = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent) { - return new QGraphicsWidget(parent); +void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent); + *outptr_QGraphicsWidget = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } -QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags) { - return new QGraphicsWidget(parent, static_cast(wFlags)); +void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent, static_cast(wFlags)); + *outptr_QGraphicsWidget = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); } QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self) { @@ -294,12 +1143,12 @@ int QGraphicsWidget_Type(const QGraphicsWidget* self) { return self->type(); } -void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } -void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paintWindowFrame(painter, option); +void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paintWindowFrame(painter, option, widget); } QRectF* QGraphicsWidget_BoundingRect(const QGraphicsWidget* self) { @@ -315,7 +1164,7 @@ void QGraphicsWidget_GeometryChanged(QGraphicsWidget* self) { } void QGraphicsWidget_connect_GeometryChanged(QGraphicsWidget* self, intptr_t slot) { - QGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::geometryChanged), self, [=]() { + MiqtVirtualQGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::geometryChanged), self, [=]() { miqt_exec_callback_QGraphicsWidget_GeometryChanged(slot); }); } @@ -325,7 +1174,7 @@ void QGraphicsWidget_LayoutChanged(QGraphicsWidget* self) { } void QGraphicsWidget_connect_LayoutChanged(QGraphicsWidget* self, intptr_t slot) { - QGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::layoutChanged), self, [=]() { + MiqtVirtualQGraphicsWidget::connect(self, static_cast(&QGraphicsWidget::layoutChanged), self, [=]() { miqt_exec_callback_QGraphicsWidget_LayoutChanged(slot); }); } @@ -372,15 +1221,275 @@ void QGraphicsWidget_SetAttribute2(QGraphicsWidget* self, int attribute, bool on self->setAttribute(static_cast(attribute), on); } -void QGraphicsWidget_Paint3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsWidget_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__SetGeometry = slot; } -void QGraphicsWidget_PaintWindowFrame3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paintWindowFrame(painter, option, widget); +void QGraphicsWidget_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsWidget_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Type = slot; +} + +int QGraphicsWidget_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Type(); +} + +void QGraphicsWidget_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Paint = slot; +} + +void QGraphicsWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__PaintWindowFrame = slot; +} + +void QGraphicsWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_PaintWindowFrame(painter, option, widget); +} + +void QGraphicsWidget_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsWidget_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsWidget_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Shape = slot; } -void QGraphicsWidget_Delete(QGraphicsWidget* self) { - delete self; +QPainterPath* QGraphicsWidget_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Shape(); +} + +void QGraphicsWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QGraphicsWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option) { + ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QGraphicsWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsWidget_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsWidget_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsWidget_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsWidget_override_virtual_PropertyChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__PropertyChange = slot; +} + +QVariant* QGraphicsWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_PropertyChange(propertyName, value); +} + +void QGraphicsWidget_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsWidget_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__WindowFrameEvent = slot; +} + +bool QGraphicsWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_WindowFrameEvent(e); +} + +void QGraphicsWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__WindowFrameSectionAt = slot; +} + +int QGraphicsWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_WindowFrameSectionAt(pos); +} + +void QGraphicsWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__Event = slot; +} + +bool QGraphicsWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_Event(event); +} + +void QGraphicsWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QGraphicsWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGraphicsWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__CloseEvent = slot; +} + +void QGraphicsWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QGraphicsWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__HideEvent = slot; +} + +void QGraphicsWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QGraphicsWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__MoveEvent = slot; +} + +void QGraphicsWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QGraphicsWidget_override_virtual_PolishEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__PolishEvent = slot; +} + +void QGraphicsWidget_virtualbase_PolishEvent(void* self) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_PolishEvent(); +} + +void QGraphicsWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__GrabMouseEvent = slot; +} + +void QGraphicsWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_GrabMouseEvent(event); +} + +void QGraphicsWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__UngrabMouseEvent = slot; +} + +void QGraphicsWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_UngrabMouseEvent(event); +} + +void QGraphicsWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__GrabKeyboardEvent = slot; +} + +void QGraphicsWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_GrabKeyboardEvent(event); +} + +void QGraphicsWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__UngrabKeyboardEvent = slot; +} + +void QGraphicsWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_UngrabKeyboardEvent(event); +} + +void QGraphicsWidget_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWidget*)(self) )->handle__IsEmpty = slot; +} + +bool QGraphicsWidget_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQGraphicsWidget*)(self) )->virtualbase_IsEmpty(); +} + +void QGraphicsWidget_Delete(QGraphicsWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgraphicswidget.go b/qt6/gen_qgraphicswidget.go index 00435cf0..1ec55b01 100644 --- a/qt6/gen_qgraphicswidget.go +++ b/qt6/gen_qgraphicswidget.go @@ -21,7 +21,8 @@ const ( ) type QGraphicsWidget struct { - h *C.QGraphicsWidget + h *C.QGraphicsWidget + isSubclass bool *QGraphicsObject *QGraphicsLayoutItem } @@ -40,33 +41,67 @@ func (this *QGraphicsWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsWidget(h *C.QGraphicsWidget) *QGraphicsWidget { +// newQGraphicsWidget constructs the type using only CGO pointers. +func newQGraphicsWidget(h *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsWidget { if h == nil { return nil } - return &QGraphicsWidget{h: h, QGraphicsObject: UnsafeNewQGraphicsObject(unsafe.Pointer(h)), QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(unsafe.Pointer(h))} + return &QGraphicsWidget{h: h, + QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), + QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } -func UnsafeNewQGraphicsWidget(h unsafe.Pointer) *QGraphicsWidget { - return newQGraphicsWidget((*C.QGraphicsWidget)(h)) +// UnsafeNewQGraphicsWidget constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsWidget(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsWidget { + if h == nil { + return nil + } + + return &QGraphicsWidget{h: (*C.QGraphicsWidget)(h), + QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), + QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } // NewQGraphicsWidget constructs a new QGraphicsWidget object. func NewQGraphicsWidget() *QGraphicsWidget { - ret := C.QGraphicsWidget_new() - return newQGraphicsWidget(ret) + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWidget_new(&outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsWidget2 constructs a new QGraphicsWidget object. func NewQGraphicsWidget2(parent *QGraphicsItem) *QGraphicsWidget { - ret := C.QGraphicsWidget_new2(parent.cPointer()) - return newQGraphicsWidget(ret) + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWidget_new2(parent.cPointer(), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } // NewQGraphicsWidget3 constructs a new QGraphicsWidget object. func NewQGraphicsWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsWidget { - ret := C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags)) - return newQGraphicsWidget(ret) + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret } func (this *QGraphicsWidget) MetaObject() *QMetaObject { @@ -89,7 +124,7 @@ func QGraphicsWidget_Tr(s string) string { } func (this *QGraphicsWidget) Layout() *QGraphicsLayout { - return UnsafeNewQGraphicsLayout(unsafe.Pointer(C.QGraphicsWidget_Layout(this.h))) + return UnsafeNewQGraphicsLayout(unsafe.Pointer(C.QGraphicsWidget_Layout(this.h)), nil) } func (this *QGraphicsWidget) SetLayout(layout *QGraphicsLayout) { @@ -113,7 +148,7 @@ func (this *QGraphicsWidget) UnsetLayoutDirection() { } func (this *QGraphicsWidget) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsWidget_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QGraphicsWidget_Style(this.h)), nil) } func (this *QGraphicsWidget) SetStyle(style *QStyle) { @@ -266,7 +301,7 @@ func QGraphicsWidget_SetTabOrder(first *QGraphicsWidget, second *QGraphicsWidget } func (this *QGraphicsWidget) FocusWidget() *QGraphicsWidget { - return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsWidget_FocusWidget(this.h))) + return UnsafeNewQGraphicsWidget(unsafe.Pointer(C.QGraphicsWidget_FocusWidget(this.h)), nil, nil, nil, nil) } func (this *QGraphicsWidget) GrabShortcut(sequence *QKeySequence) int { @@ -322,7 +357,7 @@ func (this *QGraphicsWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -339,12 +374,12 @@ func (this *QGraphicsWidget) Type() int { return (int)(C.QGraphicsWidget_Type(this.h)) } -func (this *QGraphicsWidget) Paint(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsWidget_Paint(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsWidget) Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsWidget_Paint(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } -func (this *QGraphicsWidget) PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem) { - C.QGraphicsWidget_PaintWindowFrame(this.h, painter.cPointer(), option.cPointer()) +func (this *QGraphicsWidget) PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + C.QGraphicsWidget_PaintWindowFrame(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) } func (this *QGraphicsWidget) BoundingRect() *QRectF { @@ -437,17 +472,811 @@ func (this *QGraphicsWidget) SetAttribute2(attribute WidgetAttribute, on bool) { C.QGraphicsWidget_SetAttribute2(this.h, (C.int)(attribute), (C.bool)(on)) } -func (this *QGraphicsWidget) Paint3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsWidget_Paint3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsWidget) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsWidget_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsWidget) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsWidget_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_SetGeometry +func miqt_exec_callback_QGraphicsWidget_SetGeometry(self *C.QGraphicsWidget, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsWidget_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom))) + +} +func (this *QGraphicsWidget) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsWidget_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_GetContentsMargins +func miqt_exec_callback_QGraphicsWidget_GetContentsMargins(self *C.QGraphicsWidget, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (*float64)(unsafe.Pointer(left)) + + slotval2 := (*float64)(unsafe.Pointer(top)) + + slotval3 := (*float64)(unsafe.Pointer(right)) + + slotval4 := (*float64)(unsafe.Pointer(bottom)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsWidget) callVirtualBase_Type() int { + + return (int)(C.QGraphicsWidget_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsWidget) OnType(slot func(super func() int) int) { + C.QGraphicsWidget_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Type +func miqt_exec_callback_QGraphicsWidget_Type(self *C.QGraphicsWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsWidget_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsWidget) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsWidget_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Paint +func miqt_exec_callback_QGraphicsWidget_Paint(self *C.QGraphicsWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsWidget) callVirtualBase_PaintWindowFrame(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { + + C.QGraphicsWidget_virtualbase_PaintWindowFrame(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), widget.cPointer()) + +} +func (this *QGraphicsWidget) OnPaintWindowFrame(slot func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsWidget_override_virtual_PaintWindowFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_PaintWindowFrame +func miqt_exec_callback_QGraphicsWidget_PaintWindowFrame(self *C.QGraphicsWidget, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget), painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsWidget) callVirtualBase_BoundingRect() *QRectF { + + _ret := C.QGraphicsWidget_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnBoundingRect(slot func(super func() *QRectF) *QRectF) { + C.QGraphicsWidget_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_BoundingRect +func miqt_exec_callback_QGraphicsWidget_BoundingRect(self *C.QGraphicsWidget, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRectF) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_BoundingRect) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsWidget_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := newQPainterPath(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsWidget_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Shape +func miqt_exec_callback_QGraphicsWidget_Shape(self *C.QGraphicsWidget, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainterPath) *QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_InitStyleOption(option *QStyleOption) { + + C.QGraphicsWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QGraphicsWidget) OnInitStyleOption(slot func(super func(option *QStyleOption), option *QStyleOption)) { + C.QGraphicsWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_InitStyleOption +func miqt_exec_callback_QGraphicsWidget_InitStyleOption(self *C.QGraphicsWidget, cb C.intptr_t, option *C.QStyleOption) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOption), option *QStyleOption)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_SizeHint(which SizeHint, constraint *QSizeF) *QSizeF { + + _ret := C.QGraphicsWidget_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), constraint.cPointer()) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnSizeHint(slot func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_SizeHint +func miqt_exec_callback_QGraphicsWidget_SizeHint(self *C.QGraphicsWidget, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which SizeHint, constraint *QSizeF) *QSizeF, which SizeHint, constraint *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (SizeHint)(which) + + slotval2 := UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_UpdateGeometry() { + + C.QGraphicsWidget_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsWidget) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsWidget_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_UpdateGeometry +func miqt_exec_callback_QGraphicsWidget_UpdateGeometry(self *C.QGraphicsWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsWidget) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsWidget_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsWidget_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ItemChange +func miqt_exec_callback_QGraphicsWidget_ItemChange(self *C.QGraphicsWidget, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_PropertyChange(propertyName string, value *QVariant) *QVariant { + propertyName_ms := C.struct_miqt_string{} + propertyName_ms.data = C.CString(propertyName) + propertyName_ms.len = C.size_t(len(propertyName)) + defer C.free(unsafe.Pointer(propertyName_ms.data)) + + _ret := C.QGraphicsWidget_virtualbase_PropertyChange(unsafe.Pointer(this.h), propertyName_ms, value.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWidget) OnPropertyChange(slot func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) { + C.QGraphicsWidget_override_virtual_PropertyChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_PropertyChange +func miqt_exec_callback_QGraphicsWidget_PropertyChange(self *C.QGraphicsWidget, cb C.intptr_t, propertyName C.struct_miqt_string, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(propertyName string, value *QVariant) *QVariant, propertyName string, value *QVariant) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var propertyName_ms C.struct_miqt_string = propertyName + propertyName_ret := C.GoStringN(propertyName_ms.data, C.int(int64(propertyName_ms.len))) + C.free(unsafe.Pointer(propertyName_ms.data)) + slotval1 := propertyName_ret + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PropertyChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsWidget) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsWidget) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsWidget_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_SceneEvent +func miqt_exec_callback_QGraphicsWidget_SceneEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_WindowFrameEvent(e *QEvent) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_WindowFrameEvent(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QGraphicsWidget) OnWindowFrameEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QGraphicsWidget_override_virtual_WindowFrameEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_WindowFrameEvent +func miqt_exec_callback_QGraphicsWidget_WindowFrameEvent(self *C.QGraphicsWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_WindowFrameEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_WindowFrameSectionAt(pos *QPointF) WindowFrameSection { + + return (WindowFrameSection)(C.QGraphicsWidget_virtualbase_WindowFrameSectionAt(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QGraphicsWidget) OnWindowFrameSectionAt(slot func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) { + C.QGraphicsWidget_override_virtual_WindowFrameSectionAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_WindowFrameSectionAt +func miqt_exec_callback_QGraphicsWidget_WindowFrameSectionAt(self *C.QGraphicsWidget, cb C.intptr_t, pos *C.QPointF) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPointF) WindowFrameSection, pos *QPointF) WindowFrameSection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_WindowFrameSectionAt, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_Event +func miqt_exec_callback_QGraphicsWidget_Event(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ChangeEvent +func miqt_exec_callback_QGraphicsWidget_ChangeEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QGraphicsWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QGraphicsWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_CloseEvent +func miqt_exec_callback_QGraphicsWidget_CloseEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_FocusInEvent +func miqt_exec_callback_QGraphicsWidget_FocusInEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_FocusNextPrevChild +func miqt_exec_callback_QGraphicsWidget_FocusNextPrevChild(self *C.QGraphicsWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_FocusOutEvent +func miqt_exec_callback_QGraphicsWidget_FocusOutEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QGraphicsWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QGraphicsWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_HideEvent +func miqt_exec_callback_QGraphicsWidget_HideEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_MoveEvent(event *QGraphicsSceneMoveEvent) { + + C.QGraphicsWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnMoveEvent(slot func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) { + C.QGraphicsWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_MoveEvent +func miqt_exec_callback_QGraphicsWidget_MoveEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneMoveEvent), event *QGraphicsSceneMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_PolishEvent() { + + C.QGraphicsWidget_virtualbase_PolishEvent(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsWidget) OnPolishEvent(slot func(super func())) { + C.QGraphicsWidget_override_virtual_PolishEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_PolishEvent +func miqt_exec_callback_QGraphicsWidget_PolishEvent(self *C.QGraphicsWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PolishEvent) + +} + +func (this *QGraphicsWidget) callVirtualBase_ResizeEvent(event *QGraphicsSceneResizeEvent) { + + C.QGraphicsWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnResizeEvent(slot func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) { + C.QGraphicsWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ResizeEvent +func miqt_exec_callback_QGraphicsWidget_ResizeEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneResizeEvent), event *QGraphicsSceneResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGraphicsWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGraphicsWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_ShowEvent +func miqt_exec_callback_QGraphicsWidget_ShowEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsWidget_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsWidget_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_HoverMoveEvent +func miqt_exec_callback_QGraphicsWidget_HoverMoveEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsWidget_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsWidget_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent +func miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_GrabMouseEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_GrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnGrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_GrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_GrabMouseEvent +func miqt_exec_callback_QGraphicsWidget_GrabMouseEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_GrabMouseEvent, slotval1) + } -func (this *QGraphicsWidget) PaintWindowFrame3(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget) { - C.QGraphicsWidget_PaintWindowFrame3(this.h, painter.cPointer(), option.cPointer(), widget.cPointer()) +func (this *QGraphicsWidget) callVirtualBase_UngrabMouseEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_UngrabMouseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnUngrabMouseEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_UngrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_UngrabMouseEvent +func miqt_exec_callback_QGraphicsWidget_UngrabMouseEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_UngrabMouseEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_GrabKeyboardEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_GrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnGrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_GrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_GrabKeyboardEvent +func miqt_exec_callback_QGraphicsWidget_GrabKeyboardEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_GrabKeyboardEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_UngrabKeyboardEvent(event *QEvent) { + + C.QGraphicsWidget_virtualbase_UngrabKeyboardEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsWidget) OnUngrabKeyboardEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsWidget_override_virtual_UngrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_UngrabKeyboardEvent +func miqt_exec_callback_QGraphicsWidget_UngrabKeyboardEvent(self *C.QGraphicsWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGraphicsWidget{h: self}).callVirtualBase_UngrabKeyboardEvent, slotval1) + +} + +func (this *QGraphicsWidget) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QGraphicsWidget_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsWidget) OnIsEmpty(slot func(super func() bool) bool) { + C.QGraphicsWidget_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWidget_IsEmpty +func miqt_exec_callback_QGraphicsWidget_IsEmpty(self *C.QGraphicsWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWidget{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QGraphicsWidget) Delete() { - C.QGraphicsWidget_Delete(this.h) + C.QGraphicsWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgraphicswidget.h b/qt6/gen_qgraphicswidget.h index 141f501e..801afd4a 100644 --- a/qt6/gen_qgraphicswidget.h +++ b/qt6/gen_qgraphicswidget.h @@ -16,43 +16,71 @@ extern "C" { #ifdef __cplusplus class QAction; +class QCloseEvent; +class QEvent; +class QFocusEvent; class QFont; class QGraphicsItem; class QGraphicsLayout; +class QGraphicsLayoutItem; +class QGraphicsObject; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMoveEvent; +class QGraphicsSceneResizeEvent; class QGraphicsWidget; +class QHideEvent; class QKeySequence; class QMarginsF; class QMetaObject; +class QObject; class QPainter; class QPainterPath; class QPalette; +class QPointF; class QRectF; +class QShowEvent; class QSizeF; class QStyle; +class QStyleOption; class QStyleOptionGraphicsItem; +class QVariant; class QWidget; #else typedef struct QAction QAction; +typedef struct QCloseEvent QCloseEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QGraphicsItem QGraphicsItem; typedef struct QGraphicsLayout QGraphicsLayout; +typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QGraphicsObject QGraphicsObject; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMoveEvent QGraphicsSceneMoveEvent; +typedef struct QGraphicsSceneResizeEvent QGraphicsSceneResizeEvent; typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QHideEvent QHideEvent; typedef struct QKeySequence QKeySequence; typedef struct QMarginsF QMarginsF; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPainterPath QPainterPath; typedef struct QPalette QPalette; +typedef struct QPointF QPointF; typedef struct QRectF QRectF; +typedef struct QShowEvent QShowEvent; typedef struct QSizeF QSizeF; typedef struct QStyle QStyle; +typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QGraphicsWidget* QGraphicsWidget_new(); -QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent); -QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self); void* QGraphicsWidget_Metacast(QGraphicsWidget* self, const char* param1); struct miqt_string QGraphicsWidget_Tr(const char* s); @@ -108,8 +136,8 @@ struct miqt_array /* of QAction* */ QGraphicsWidget_Actions(const QGraphicsWidg void QGraphicsWidget_SetAttribute(QGraphicsWidget* self, int attribute); bool QGraphicsWidget_TestAttribute(const QGraphicsWidget* self, int attribute); int QGraphicsWidget_Type(const QGraphicsWidget* self); -void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option); -void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsWidget_Paint(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWidget_PaintWindowFrame(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); QRectF* QGraphicsWidget_BoundingRect(const QGraphicsWidget* self); QPainterPath* QGraphicsWidget_Shape(const QGraphicsWidget* self); void QGraphicsWidget_GeometryChanged(QGraphicsWidget* self); @@ -117,15 +145,104 @@ void QGraphicsWidget_connect_GeometryChanged(QGraphicsWidget* self, intptr_t slo void QGraphicsWidget_LayoutChanged(QGraphicsWidget* self); void QGraphicsWidget_connect_LayoutChanged(QGraphicsWidget* self, intptr_t slot); bool QGraphicsWidget_Close(QGraphicsWidget* self); +void QGraphicsWidget_InitStyleOption(const QGraphicsWidget* self, QStyleOption* option); +QSizeF* QGraphicsWidget_SizeHint(const QGraphicsWidget* self, int which, QSizeF* constraint); +void QGraphicsWidget_UpdateGeometry(QGraphicsWidget* self); +QVariant* QGraphicsWidget_ItemChange(QGraphicsWidget* self, int change, QVariant* value); +QVariant* QGraphicsWidget_PropertyChange(QGraphicsWidget* self, struct miqt_string propertyName, QVariant* value); +bool QGraphicsWidget_SceneEvent(QGraphicsWidget* self, QEvent* event); +bool QGraphicsWidget_WindowFrameEvent(QGraphicsWidget* self, QEvent* e); +int QGraphicsWidget_WindowFrameSectionAt(const QGraphicsWidget* self, QPointF* pos); +bool QGraphicsWidget_Event(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_ChangeEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_CloseEvent(QGraphicsWidget* self, QCloseEvent* event); +void QGraphicsWidget_FocusInEvent(QGraphicsWidget* self, QFocusEvent* event); +bool QGraphicsWidget_FocusNextPrevChild(QGraphicsWidget* self, bool next); +void QGraphicsWidget_FocusOutEvent(QGraphicsWidget* self, QFocusEvent* event); +void QGraphicsWidget_HideEvent(QGraphicsWidget* self, QHideEvent* event); +void QGraphicsWidget_MoveEvent(QGraphicsWidget* self, QGraphicsSceneMoveEvent* event); +void QGraphicsWidget_PolishEvent(QGraphicsWidget* self); +void QGraphicsWidget_ResizeEvent(QGraphicsWidget* self, QGraphicsSceneResizeEvent* event); +void QGraphicsWidget_ShowEvent(QGraphicsWidget* self, QShowEvent* event); +void QGraphicsWidget_HoverMoveEvent(QGraphicsWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_HoverLeaveEvent(QGraphicsWidget* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_GrabMouseEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_UngrabMouseEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_GrabKeyboardEvent(QGraphicsWidget* self, QEvent* event); +void QGraphicsWidget_UngrabKeyboardEvent(QGraphicsWidget* self, QEvent* event); struct miqt_string QGraphicsWidget_Tr2(const char* s, const char* c); struct miqt_string QGraphicsWidget_Tr3(const char* s, const char* c, int n); int QGraphicsWidget_GrabShortcut2(QGraphicsWidget* self, QKeySequence* sequence, int context); void QGraphicsWidget_SetShortcutEnabled2(QGraphicsWidget* self, int id, bool enabled); void QGraphicsWidget_SetShortcutAutoRepeat2(QGraphicsWidget* self, int id, bool enabled); void QGraphicsWidget_SetAttribute2(QGraphicsWidget* self, int attribute, bool on); -void QGraphicsWidget_Paint3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsWidget_PaintWindowFrame3(QGraphicsWidget* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsWidget_Delete(QGraphicsWidget* self); +void QGraphicsWidget_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsWidget_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsWidget_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsWidget_virtualbase_Type(const void* self); +void QGraphicsWidget_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWidget_override_virtual_PaintWindowFrame(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWidget_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsWidget_virtualbase_BoundingRect(const void* self); +void QGraphicsWidget_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsWidget_virtualbase_Shape(const void* self); +void QGraphicsWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_InitStyleOption(const void* self, QStyleOption* option); +void QGraphicsWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsWidget_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsWidget_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_UpdateGeometry(void* self); +void QGraphicsWidget_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsWidget_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsWidget_override_virtual_PropertyChange(void* self, intptr_t slot); +QVariant* QGraphicsWidget_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value); +void QGraphicsWidget_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_WindowFrameEvent(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_WindowFrameEvent(void* self, QEvent* e); +void QGraphicsWidget_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot); +int QGraphicsWidget_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos); +void QGraphicsWidget_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_Event(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGraphicsWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGraphicsWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event); +void QGraphicsWidget_override_virtual_PolishEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_PolishEvent(void* self); +void QGraphicsWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event); +void QGraphicsWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsWidget_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsWidget_override_virtual_GrabMouseEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_GrabMouseEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_UngrabMouseEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_UngrabMouseEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_GrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsWidget_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsWidget_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QGraphicsWidget_virtualbase_IsEmpty(const void* self); +void QGraphicsWidget_Delete(QGraphicsWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgridlayout.cpp b/qt6/gen_qgridlayout.cpp index 7ba9eb86..8364ee73 100644 --- a/qt6/gen_qgridlayout.cpp +++ b/qt6/gen_qgridlayout.cpp @@ -1,7 +1,9 @@ +#include #include #include #include #include +#include #include #include #include @@ -12,12 +14,536 @@ #include "gen_qgridlayout.h" #include "_cgo_export.h" -QGridLayout* QGridLayout_new(QWidget* parent) { - return new QGridLayout(parent); +class MiqtVirtualQGridLayout : public virtual QGridLayout { +public: + + MiqtVirtualQGridLayout(QWidget* parent): QGridLayout(parent) {}; + MiqtVirtualQGridLayout(): QGridLayout() {}; + + virtual ~MiqtVirtualQGridLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QGridLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGridLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QGridLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QGridLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGridLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QGridLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QGridLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGridLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QGridLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual void setSpacing(int spacing) override { + if (handle__SetSpacing == 0) { + QGridLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QGridLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QGridLayout::setSpacing(static_cast(spacing)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Spacing = 0; + + // Subclass to allow providing a Go implementation + virtual int spacing() const override { + if (handle__Spacing == 0) { + return QGridLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QGridLayout::spacing(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QGridLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QGridLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QGridLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QGridLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGridLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QGridLayout::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QGridLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGridLayout_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QGridLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QGridLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QGridLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QGridLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGridLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGridLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int index) const override { + if (handle__ItemAt == 0) { + return QGridLayout::itemAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QGridLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int index) const { + + return QGridLayout::itemAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int index) override { + if (handle__TakeAt == 0) { + return QGridLayout::takeAt(index); + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QGridLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int index) { + + return QGridLayout::takeAt(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QGridLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QGridLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QGridLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QGridLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QGridLayout::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItemWithQLayoutItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* param1) override { + if (handle__AddItemWithQLayoutItem == 0) { + QGridLayout::addItem(param1); + return; + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QGridLayout_AddItemWithQLayoutItem(this, handle__AddItemWithQLayoutItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItemWithQLayoutItem(QLayoutItem* param1) { + + QGridLayout::addItem(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QGridLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QGridLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QGridLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(const QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QGridLayout::indexOf(param1); + } + + QWidget* sigval1 = (QWidget*) param1; + + int callback_return_value = miqt_exec_callback_QGridLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QGridLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QGridLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QGridLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QGridLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QGridLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QGridLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QGridLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReplaceWidget = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* replaceWidget(QWidget* from, QWidget* to, Qt::FindChildOptions options) override { + if (handle__ReplaceWidget == 0) { + return QGridLayout::replaceWidget(from, to, options); + } + + QWidget* sigval1 = from; + QWidget* sigval2 = to; + Qt::FindChildOptions options_ret = options; + int sigval3 = static_cast(options_ret); + + QLayoutItem* callback_return_value = miqt_exec_callback_QGridLayout_ReplaceWidget(this, handle__ReplaceWidget, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ReplaceWidget(QWidget* from, QWidget* to, int options) { + + return QGridLayout::replaceWidget(from, to, static_cast(options)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QGridLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QGridLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QGridLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QGridLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QGridLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QGridLayout::childEvent(e); + + } + +}; + +void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(parent); + *outptr_QGridLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QGridLayout* QGridLayout_new2() { - return new QGridLayout(); +void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(); + *outptr_QGridLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QGridLayout_MetaObject(const QGridLayout* self) { @@ -251,7 +777,187 @@ void QGridLayout_AddItem6(QGridLayout* self, QLayoutItem* item, int row, int col self->addItem(item, static_cast(row), static_cast(column), static_cast(rowSpan), static_cast(columnSpan), static_cast(param6)); } -void QGridLayout_Delete(QGridLayout* self) { - delete self; +void QGridLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QGridLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_SizeHint(); +} + +void QGridLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QGridLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QGridLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QGridLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QGridLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__SetSpacing = slot; +} + +void QGridLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_SetSpacing(spacing); +} + +void QGridLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Spacing = slot; +} + +int QGridLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_Spacing(); +} + +void QGridLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QGridLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QGridLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QGridLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QGridLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QGridLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QGridLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QGridLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QGridLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Invalidate = slot; +} + +void QGridLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGridLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QGridLayout_virtualbase_ItemAt(const void* self, int index) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_ItemAt(index); +} + +void QGridLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QGridLayout_virtualbase_TakeAt(void* self, int index) { + return ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_TakeAt(index); +} + +void QGridLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Count = slot; +} + +int QGridLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_Count(); +} + +void QGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGridLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QGridLayout_override_virtual_AddItemWithQLayoutItem(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__AddItemWithQLayoutItem = slot; +} + +void QGridLayout_virtualbase_AddItemWithQLayoutItem(void* self, QLayoutItem* param1) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_AddItemWithQLayoutItem(param1); +} + +void QGridLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QGridLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_Geometry(); +} + +void QGridLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__IndexOf = slot; +} + +int QGridLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QGridLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QGridLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QGridLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ControlTypes = slot; +} + +int QGridLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQGridLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QGridLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ReplaceWidget = slot; +} + +QLayoutItem* QGridLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options) { + return ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_ReplaceWidget(from, to, options); +} + +void QGridLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QGridLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_Layout(); +} + +void QGridLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGridLayout*)(self) )->handle__ChildEvent = slot; +} + +void QGridLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQGridLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QGridLayout_Delete(QGridLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgridlayout.go b/qt6/gen_qgridlayout.go index a3db8dbc..5e62a36b 100644 --- a/qt6/gen_qgridlayout.go +++ b/qt6/gen_qgridlayout.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QGridLayout struct { - h *C.QGridLayout + h *C.QGridLayout + isSubclass bool *QLayout } @@ -32,27 +34,49 @@ func (this *QGridLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGridLayout(h *C.QGridLayout) *QGridLayout { +// newQGridLayout constructs the type using only CGO pointers. +func newQGridLayout(h *C.QGridLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QGridLayout { if h == nil { return nil } - return &QGridLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QGridLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQGridLayout(h unsafe.Pointer) *QGridLayout { - return newQGridLayout((*C.QGridLayout)(h)) +// UnsafeNewQGridLayout constructs the type using only unsafe pointers. +func UnsafeNewQGridLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QGridLayout { + if h == nil { + return nil + } + + return &QGridLayout{h: (*C.QGridLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQGridLayout constructs a new QGridLayout object. func NewQGridLayout(parent *QWidget) *QGridLayout { - ret := C.QGridLayout_new(parent.cPointer()) - return newQGridLayout(ret) + var outptr_QGridLayout *C.QGridLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QGridLayout_new(parent.cPointer(), &outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQGridLayout2 constructs a new QGridLayout object. func NewQGridLayout2() *QGridLayout { - ret := C.QGridLayout_new2() - return newQGridLayout(ret) + var outptr_QGridLayout *C.QGridLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QGridLayout_new2(&outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QGridLayout) MetaObject() *QMetaObject { @@ -296,9 +320,523 @@ func (this *QGridLayout) AddItem6(item *QLayoutItem, row int, column int, rowSpa C.QGridLayout_AddItem6(this.h, item.cPointer(), (C.int)(row), (C.int)(column), (C.int)(rowSpan), (C.int)(columnSpan), (C.int)(param6)) } +func (this *QGridLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QGridLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QGridLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_SizeHint +func miqt_exec_callback_QGridLayout_SizeHint(self *C.QGridLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QGridLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QGridLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_MinimumSize +func miqt_exec_callback_QGridLayout_MinimumSize(self *C.QGridLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QGridLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QGridLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_MaximumSize +func miqt_exec_callback_QGridLayout_MaximumSize(self *C.QGridLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QGridLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QGridLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QGridLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_SetSpacing +func miqt_exec_callback_QGridLayout_SetSpacing(self *C.QGridLayout, cb C.intptr_t, spacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(spacing int), spacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(spacing) + + gofunc((&QGridLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + +} + +func (this *QGridLayout) callVirtualBase_Spacing() int { + + return (int)(C.QGridLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnSpacing(slot func(super func() int) int) { + C.QGridLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Spacing +func miqt_exec_callback_QGridLayout_Spacing(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QGridLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QGridLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_HasHeightForWidth +func miqt_exec_callback_QGridLayout_HasHeightForWidth(self *C.QGridLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QGridLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGridLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QGridLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_HeightForWidth +func miqt_exec_callback_QGridLayout_HeightForWidth(self *C.QGridLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QGridLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGridLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QGridLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_MinimumHeightForWidth +func miqt_exec_callback_QGridLayout_MinimumHeightForWidth(self *C.QGridLayout, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QGridLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QGridLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ExpandingDirections +func miqt_exec_callback_QGridLayout_ExpandingDirections(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_Invalidate() { + + C.QGridLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGridLayout) OnInvalidate(slot func(super func())) { + C.QGridLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Invalidate +func miqt_exec_callback_QGridLayout_Invalidate(self *C.QGridLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGridLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGridLayout) callVirtualBase_ItemAt(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QGridLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGridLayout) OnItemAt(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QGridLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ItemAt +func miqt_exec_callback_QGridLayout_ItemAt(self *C.QGridLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_TakeAt(index int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QGridLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(index)))) +} +func (this *QGridLayout) OnTakeAt(slot func(super func(index int) *QLayoutItem, index int) *QLayoutItem) { + C.QGridLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_TakeAt +func miqt_exec_callback_QGridLayout_TakeAt(self *C.QGridLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QLayoutItem, index int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_Count() int { + + return (int)(C.QGridLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnCount(slot func(super func() int) int) { + C.QGridLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Count +func miqt_exec_callback_QGridLayout_Count(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QGridLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QGridLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QGridLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_SetGeometry +func miqt_exec_callback_QGridLayout_SetGeometry(self *C.QGridLayout, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QGridLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGridLayout) callVirtualBase_AddItemWithQLayoutItem(param1 *QLayoutItem) { + + C.QGridLayout_virtualbase_AddItemWithQLayoutItem(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QGridLayout) OnAddItemWithQLayoutItem(slot func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) { + C.QGridLayout_override_virtual_AddItemWithQLayoutItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_AddItemWithQLayoutItem +func miqt_exec_callback_QGridLayout_AddItemWithQLayoutItem(self *C.QGridLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem), param1 *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + gofunc((&QGridLayout{h: self}).callVirtualBase_AddItemWithQLayoutItem, slotval1) + +} + +func (this *QGridLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QGridLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGridLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QGridLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Geometry +func miqt_exec_callback_QGridLayout_Geometry(self *C.QGridLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QGridLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QGridLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QGridLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_IndexOf +func miqt_exec_callback_QGridLayout_IndexOf(self *C.QGridLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QGridLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QGridLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_IsEmpty +func miqt_exec_callback_QGridLayout_IsEmpty(self *C.QGridLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QGridLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QGridLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QGridLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ControlTypes +func miqt_exec_callback_QGridLayout_ControlTypes(self *C.QGridLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QGridLayout) callVirtualBase_ReplaceWidget(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QGridLayout_virtualbase_ReplaceWidget(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.int)(options)))) +} +func (this *QGridLayout) OnReplaceWidget(slot func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) { + C.QGridLayout_override_virtual_ReplaceWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ReplaceWidget +func miqt_exec_callback_QGridLayout_ReplaceWidget(self *C.QGridLayout, cb C.intptr_t, from *C.QWidget, to *C.QWidget, options C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(from), nil, nil) + slotval2 := UnsafeNewQWidget(unsafe.Pointer(to), nil, nil) + slotval3 := (FindChildOption)(options) + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_ReplaceWidget, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QGridLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QGridLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QGridLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_Layout +func miqt_exec_callback_QGridLayout_Layout(self *C.QGridLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QGridLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QGridLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGridLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QGridLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGridLayout_ChildEvent +func miqt_exec_callback_QGridLayout_ChildEvent(self *C.QGridLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QGridLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QGridLayout) Delete() { - C.QGridLayout_Delete(this.h) + C.QGridLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgridlayout.h b/qt6/gen_qgridlayout.h index 3a5b5465..177b31e4 100644 --- a/qt6/gen_qgridlayout.h +++ b/qt6/gen_qgridlayout.h @@ -15,25 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QGridLayout; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QGridLayout QGridLayout; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QGridLayout* QGridLayout_new(QWidget* parent); -QGridLayout* QGridLayout_new2(); +void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QGridLayout_MetaObject(const QGridLayout* self); void* QGridLayout_Metacast(QGridLayout* self, const char* param1); struct miqt_string QGridLayout_Tr(const char* s); @@ -77,6 +81,7 @@ void QGridLayout_SetGeometry(QGridLayout* self, QRect* geometry); void QGridLayout_AddItem(QGridLayout* self, QLayoutItem* item, int row, int column); void QGridLayout_SetDefaultPositioning(QGridLayout* self, int n, int orient); void QGridLayout_GetItemPosition(const QGridLayout* self, int idx, int* row, int* column, int* rowSpan, int* columnSpan); +void QGridLayout_AddItemWithQLayoutItem(QGridLayout* self, QLayoutItem* param1); struct miqt_string QGridLayout_Tr2(const char* s, const char* c); struct miqt_string QGridLayout_Tr3(const char* s, const char* c, int n); void QGridLayout_AddWidget4(QGridLayout* self, QWidget* param1, int row, int column, int param4); @@ -86,7 +91,51 @@ void QGridLayout_AddLayout6(QGridLayout* self, QLayout* param1, int row, int col void QGridLayout_AddItem4(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan); void QGridLayout_AddItem5(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan, int columnSpan); void QGridLayout_AddItem6(QGridLayout* self, QLayoutItem* item, int row, int column, int rowSpan, int columnSpan, int param6); -void QGridLayout_Delete(QGridLayout* self); +void QGridLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QGridLayout_virtualbase_SizeHint(const void* self); +void QGridLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QGridLayout_virtualbase_MinimumSize(const void* self); +void QGridLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QGridLayout_virtualbase_MaximumSize(const void* self); +void QGridLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QGridLayout_virtualbase_SetSpacing(void* self, int spacing); +void QGridLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QGridLayout_virtualbase_Spacing(const void* self); +void QGridLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QGridLayout_virtualbase_HasHeightForWidth(const void* self); +void QGridLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QGridLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QGridLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QGridLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QGridLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QGridLayout_virtualbase_ExpandingDirections(const void* self); +void QGridLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGridLayout_virtualbase_Invalidate(void* self); +void QGridLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QGridLayout_virtualbase_ItemAt(const void* self, int index); +void QGridLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QGridLayout_virtualbase_TakeAt(void* self, int index); +void QGridLayout_override_virtual_Count(void* self, intptr_t slot); +int QGridLayout_virtualbase_Count(const void* self); +void QGridLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGridLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QGridLayout_override_virtual_AddItemWithQLayoutItem(void* self, intptr_t slot); +void QGridLayout_virtualbase_AddItemWithQLayoutItem(void* self, QLayoutItem* param1); +void QGridLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QGridLayout_virtualbase_Geometry(const void* self); +void QGridLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QGridLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QGridLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QGridLayout_virtualbase_IsEmpty(const void* self); +void QGridLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QGridLayout_virtualbase_ControlTypes(const void* self); +void QGridLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot); +QLayoutItem* QGridLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options); +void QGridLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QGridLayout_virtualbase_Layout(void* self); +void QGridLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGridLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QGridLayout_Delete(QGridLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qgroupbox.cpp b/qt6/gen_qgroupbox.cpp index 22430303..ed53a7e2 100644 --- a/qt6/gen_qgroupbox.cpp +++ b/qt6/gen_qgroupbox.cpp @@ -1,30 +1,1111 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qgroupbox.h" #include "_cgo_export.h" -QGroupBox* QGroupBox_new(QWidget* parent) { - return new QGroupBox(parent); +class MiqtVirtualQGroupBox : public virtual QGroupBox { +public: + + MiqtVirtualQGroupBox(QWidget* parent): QGroupBox(parent) {}; + MiqtVirtualQGroupBox(): QGroupBox() {}; + MiqtVirtualQGroupBox(const QString& title): QGroupBox(title) {}; + MiqtVirtualQGroupBox(const QString& title, QWidget* parent): QGroupBox(title, parent) {}; + + virtual ~MiqtVirtualQGroupBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QGroupBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGroupBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QGroupBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QGroupBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGroupBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGroupBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QGroupBox::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGroupBox::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGroupBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QGroupBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QGroupBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QGroupBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QGroupBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGroupBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGroupBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGroupBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QGroupBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QGroupBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QGroupBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QGroupBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QGroupBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QGroupBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionGroupBox* option) const override { + if (handle__InitStyleOption == 0) { + QGroupBox::initStyleOption(option); + return; + } + + QStyleOptionGroupBox* sigval1 = option; + + miqt_exec_callback_QGroupBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionGroupBox* option) const { + + QGroupBox::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QGroupBox::devType(); + } + + + int callback_return_value = miqt_exec_callback_QGroupBox_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QGroupBox::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QGroupBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QGroupBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QGroupBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QGroupBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QGroupBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QGroupBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QGroupBox::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QGroupBox_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QGroupBox::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QGroupBox::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QGroupBox_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QGroupBox::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QGroupBox::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QGroupBox_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QGroupBox::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QGroupBox::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QGroupBox::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QGroupBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QGroupBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QGroupBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGroupBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QGroupBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGroupBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QGroupBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGroupBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QGroupBox::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QGroupBox::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QGroupBox::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QGroupBox::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGroupBox::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QGroupBox::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGroupBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGroupBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QGroupBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QGroupBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QGroupBox::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QGroupBox::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QGroupBox::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QGroupBox::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QGroupBox::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QGroupBox::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QGroupBox::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QGroupBox::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QGroupBox::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QGroupBox::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QGroupBox::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QGroupBox::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGroupBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGroupBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGroupBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGroupBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGroupBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QGroupBox::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QGroupBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QGroupBox::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QGroupBox::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QGroupBox_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QGroupBox::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QGroupBox::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGroupBox_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QGroupBox::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QGroupBox::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QGroupBox_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QGroupBox::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QGroupBox::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QGroupBox_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QGroupBox::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QGroupBox::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QGroupBox_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QGroupBox::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QGroupBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGroupBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QGroupBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGroupBox::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGroupBox_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGroupBox::focusNextPrevChild(next); + + } + +}; + +void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(parent); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGroupBox* QGroupBox_new2() { - return new QGroupBox(); +void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGroupBox* QGroupBox_new3(struct miqt_string title) { +void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QGroupBox(title_QString); + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent) { +void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QGroupBox(title_QString, parent); + MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString, parent); + *outptr_QGroupBox = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QGroupBox_MetaObject(const QGroupBox* self) { @@ -104,7 +1185,7 @@ void QGroupBox_Clicked(QGroupBox* self) { } void QGroupBox_connect_Clicked(QGroupBox* self, intptr_t slot) { - QGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=]() { + MiqtVirtualQGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=]() { miqt_exec_callback_QGroupBox_Clicked(slot); }); } @@ -114,7 +1195,7 @@ void QGroupBox_Toggled(QGroupBox* self, bool param1) { } void QGroupBox_connect_Toggled(QGroupBox* self, intptr_t slot) { - QGroupBox::connect(self, static_cast(&QGroupBox::toggled), self, [=](bool param1) { + MiqtVirtualQGroupBox::connect(self, static_cast(&QGroupBox::toggled), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QGroupBox_Toggled(slot, sigval1); }); @@ -147,13 +1228,361 @@ void QGroupBox_Clicked1(QGroupBox* self, bool checked) { } void QGroupBox_connect_Clicked1(QGroupBox* self, intptr_t slot) { - QGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=](bool checked) { + MiqtVirtualQGroupBox::connect(self, static_cast(&QGroupBox::clicked), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QGroupBox_Clicked1(slot, sigval1); }); } -void QGroupBox_Delete(QGroupBox* self) { - delete self; +void QGroupBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QGroupBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QGroupBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__Event = slot; +} + +bool QGroupBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_Event(event); +} + +void QGroupBox_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ChildEvent = slot; +} + +void QGroupBox_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ChildEvent(event); +} + +void QGroupBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ResizeEvent = slot; +} + +void QGroupBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGroupBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__PaintEvent = slot; +} + +void QGroupBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QGroupBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__FocusInEvent = slot; +} + +void QGroupBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGroupBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ChangeEvent = slot; +} + +void QGroupBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGroupBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MousePressEvent = slot; +} + +void QGroupBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGroupBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGroupBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGroupBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGroupBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGroupBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InitStyleOption = slot; +} + +void QGroupBox_virtualbase_InitStyleOption(const void* self, QStyleOptionGroupBox* option) { + ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QGroupBox_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DevType = slot; +} + +int QGroupBox_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_DevType(); +} + +void QGroupBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__SetVisible = slot; +} + +void QGroupBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QGroupBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QGroupBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_SizeHint(); +} + +void QGroupBox_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__HeightForWidth = slot; +} + +int QGroupBox_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QGroupBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QGroupBox_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QGroupBox_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QGroupBox_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_PaintEngine(); +} + +void QGroupBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGroupBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGroupBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__WheelEvent = slot; +} + +void QGroupBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QGroupBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QGroupBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGroupBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGroupBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGroupBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QGroupBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGroupBox_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__EnterEvent = slot; +} + +void QGroupBox_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_EnterEvent(event); +} + +void QGroupBox_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__LeaveEvent = slot; +} + +void QGroupBox_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_LeaveEvent(event); +} + +void QGroupBox_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__MoveEvent = slot; +} + +void QGroupBox_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_MoveEvent(event); +} + +void QGroupBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__CloseEvent = slot; +} + +void QGroupBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QGroupBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGroupBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGroupBox_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__TabletEvent = slot; +} + +void QGroupBox_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_TabletEvent(event); +} + +void QGroupBox_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ActionEvent = slot; +} + +void QGroupBox_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ActionEvent(event); +} + +void QGroupBox_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DragEnterEvent = slot; +} + +void QGroupBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGroupBox_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DragMoveEvent = slot; +} + +void QGroupBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGroupBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGroupBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGroupBox_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__DropEvent = slot; +} + +void QGroupBox_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_DropEvent(event); +} + +void QGroupBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__ShowEvent = slot; +} + +void QGroupBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QGroupBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__HideEvent = slot; +} + +void QGroupBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_HideEvent(event); +} + +void QGroupBox_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__NativeEvent = slot; +} + +bool QGroupBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QGroupBox_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__Metric = slot; +} + +int QGroupBox_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_Metric(param1); +} + +void QGroupBox_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InitPainter = slot; +} + +void QGroupBox_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_InitPainter(painter); +} + +void QGroupBox_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QGroupBox_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_Redirected(offset); +} + +void QGroupBox_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QGroupBox_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_SharedPainter(); +} + +void QGroupBox_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InputMethodEvent = slot; +} + +void QGroupBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QGroupBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGroupBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQGroupBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QGroupBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGroupBox*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGroupBox_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGroupBox*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGroupBox_Delete(QGroupBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qgroupbox.go b/qt6/gen_qgroupbox.go index 8f724b79..c8db8df1 100644 --- a/qt6/gen_qgroupbox.go +++ b/qt6/gen_qgroupbox.go @@ -15,7 +15,8 @@ import ( ) type QGroupBox struct { - h *C.QGroupBox + h *C.QGroupBox + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QGroupBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGroupBox(h *C.QGroupBox) *QGroupBox { +// newQGroupBox constructs the type using only CGO pointers. +func newQGroupBox(h *C.QGroupBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGroupBox { if h == nil { return nil } - return &QGroupBox{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QGroupBox{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQGroupBox(h unsafe.Pointer) *QGroupBox { - return newQGroupBox((*C.QGroupBox)(h)) +// UnsafeNewQGroupBox constructs the type using only unsafe pointers. +func UnsafeNewQGroupBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGroupBox { + if h == nil { + return nil + } + + return &QGroupBox{h: (*C.QGroupBox)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQGroupBox constructs a new QGroupBox object. func NewQGroupBox(parent *QWidget) *QGroupBox { - ret := C.QGroupBox_new(parent.cPointer()) - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new(parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGroupBox2 constructs a new QGroupBox object. func NewQGroupBox2() *QGroupBox { - ret := C.QGroupBox_new2() - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new2(&outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGroupBox3 constructs a new QGroupBox object. @@ -62,8 +85,15 @@ func NewQGroupBox3(title string) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QGroupBox_new3(title_ms) - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new3(title_ms, &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQGroupBox4 constructs a new QGroupBox object. @@ -72,8 +102,15 @@ func NewQGroupBox4(title string, parent *QWidget) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QGroupBox_new4(title_ms, parent.cPointer()) - return newQGroupBox(ret) + var outptr_QGroupBox *C.QGroupBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QGroupBox_new4(title_ms, parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QGroupBox) MetaObject() *QMetaObject { @@ -228,9 +265,1021 @@ func miqt_exec_callback_QGroupBox_Clicked1(cb C.intptr_t, checked C.bool) { gofunc(slotval1) } +func (this *QGroupBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QGroupBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGroupBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QGroupBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MinimumSizeHint +func miqt_exec_callback_QGroupBox_MinimumSizeHint(self *C.QGroupBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGroupBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGroupBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGroupBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_Event +func miqt_exec_callback_QGroupBox_Event(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGroupBox_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGroupBox_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ChildEvent +func miqt_exec_callback_QGroupBox_ChildEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QGroupBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QGroupBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ResizeEvent +func miqt_exec_callback_QGroupBox_ResizeEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QGroupBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QGroupBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_PaintEvent +func miqt_exec_callback_QGroupBox_PaintEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGroupBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGroupBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_FocusInEvent +func miqt_exec_callback_QGroupBox_FocusInEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QGroupBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGroupBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ChangeEvent +func miqt_exec_callback_QGroupBox_ChangeEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MousePressEvent +func miqt_exec_callback_QGroupBox_MousePressEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MouseMoveEvent +func miqt_exec_callback_QGroupBox_MouseMoveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MouseReleaseEvent +func miqt_exec_callback_QGroupBox_MouseReleaseEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_InitStyleOption(option *QStyleOptionGroupBox) { + + C.QGroupBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QGroupBox) OnInitStyleOption(slot func(super func(option *QStyleOptionGroupBox), option *QStyleOptionGroupBox)) { + C.QGroupBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InitStyleOption +func miqt_exec_callback_QGroupBox_InitStyleOption(self *C.QGroupBox, cb C.intptr_t, option *C.QStyleOptionGroupBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionGroupBox), option *QStyleOptionGroupBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionGroupBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DevType() int { + + return (int)(C.QGroupBox_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QGroupBox) OnDevType(slot func(super func() int) int) { + C.QGroupBox_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DevType +func miqt_exec_callback_QGroupBox_DevType(self *C.QGroupBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_SetVisible(visible bool) { + + C.QGroupBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QGroupBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QGroupBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_SetVisible +func miqt_exec_callback_QGroupBox_SetVisible(self *C.QGroupBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QGroupBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QGroupBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGroupBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QGroupBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_SizeHint +func miqt_exec_callback_QGroupBox_SizeHint(self *C.QGroupBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QGroupBox_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGroupBox) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QGroupBox_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_HeightForWidth +func miqt_exec_callback_QGroupBox_HeightForWidth(self *C.QGroupBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QGroupBox_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QGroupBox) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QGroupBox_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_HasHeightForWidth +func miqt_exec_callback_QGroupBox_HasHeightForWidth(self *C.QGroupBox, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QGroupBox_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QGroupBox) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QGroupBox_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_PaintEngine +func miqt_exec_callback_QGroupBox_PaintEngine(self *C.QGroupBox, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QGroupBox_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QGroupBox_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MouseDoubleClickEvent +func miqt_exec_callback_QGroupBox_MouseDoubleClickEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QGroupBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QGroupBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_WheelEvent +func miqt_exec_callback_QGroupBox_WheelEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGroupBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGroupBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_KeyPressEvent +func miqt_exec_callback_QGroupBox_KeyPressEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGroupBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGroupBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_KeyReleaseEvent +func miqt_exec_callback_QGroupBox_KeyReleaseEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGroupBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGroupBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_FocusOutEvent +func miqt_exec_callback_QGroupBox_FocusOutEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QGroupBox_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QGroupBox_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_EnterEvent +func miqt_exec_callback_QGroupBox_EnterEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QGroupBox_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGroupBox_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_LeaveEvent +func miqt_exec_callback_QGroupBox_LeaveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QGroupBox_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QGroupBox_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_MoveEvent +func miqt_exec_callback_QGroupBox_MoveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QGroupBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QGroupBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_CloseEvent +func miqt_exec_callback_QGroupBox_CloseEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QGroupBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QGroupBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ContextMenuEvent +func miqt_exec_callback_QGroupBox_ContextMenuEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QGroupBox_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QGroupBox_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_TabletEvent +func miqt_exec_callback_QGroupBox_TabletEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QGroupBox_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QGroupBox_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ActionEvent +func miqt_exec_callback_QGroupBox_ActionEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QGroupBox_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QGroupBox_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DragEnterEvent +func miqt_exec_callback_QGroupBox_DragEnterEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QGroupBox_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QGroupBox_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DragMoveEvent +func miqt_exec_callback_QGroupBox_DragMoveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QGroupBox_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QGroupBox_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DragLeaveEvent +func miqt_exec_callback_QGroupBox_DragLeaveEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QGroupBox_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QGroupBox_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_DropEvent +func miqt_exec_callback_QGroupBox_DropEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QGroupBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QGroupBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_ShowEvent +func miqt_exec_callback_QGroupBox_ShowEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QGroupBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGroupBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QGroupBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_HideEvent +func miqt_exec_callback_QGroupBox_HideEvent(self *C.QGroupBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QGroupBox_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QGroupBox) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QGroupBox_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_NativeEvent +func miqt_exec_callback_QGroupBox_NativeEvent(self *C.QGroupBox, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QGroupBox_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QGroupBox) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QGroupBox_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_Metric +func miqt_exec_callback_QGroupBox_Metric(self *C.QGroupBox, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGroupBox) callVirtualBase_InitPainter(painter *QPainter) { + + C.QGroupBox_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QGroupBox) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QGroupBox_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InitPainter +func miqt_exec_callback_QGroupBox_InitPainter(self *C.QGroupBox, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QGroupBox{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QGroupBox_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QGroupBox) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QGroupBox_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_Redirected +func miqt_exec_callback_QGroupBox_Redirected(self *C.QGroupBox, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QGroupBox_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QGroupBox) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QGroupBox_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_SharedPainter +func miqt_exec_callback_QGroupBox_SharedPainter(self *C.QGroupBox, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QGroupBox_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QGroupBox) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QGroupBox_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InputMethodEvent +func miqt_exec_callback_QGroupBox_InputMethodEvent(self *C.QGroupBox, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QGroupBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGroupBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QGroupBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGroupBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QGroupBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_InputMethodQuery +func miqt_exec_callback_QGroupBox_InputMethodQuery(self *C.QGroupBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGroupBox) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGroupBox_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGroupBox) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGroupBox_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGroupBox_FocusNextPrevChild +func miqt_exec_callback_QGroupBox_FocusNextPrevChild(self *C.QGroupBox, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QGroupBox{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QGroupBox) Delete() { - C.QGroupBox_Delete(this.h) + C.QGroupBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qgroupbox.h b/qt6/gen_qgroupbox.h index e74ee993..51d0992e 100644 --- a/qt6/gen_qgroupbox.h +++ b/qt6/gen_qgroupbox.h @@ -15,21 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; class QGroupBox; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionGroupBox; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QGroupBox QGroupBox; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionGroupBox QStyleOptionGroupBox; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QGroupBox* QGroupBox_new(QWidget* parent); -QGroupBox* QGroupBox_new2(); -QGroupBox* QGroupBox_new3(struct miqt_string title); -QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent); +void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QGroupBox_MetaObject(const QGroupBox* self); void* QGroupBox_Metacast(QGroupBox* self, const char* param1); struct miqt_string QGroupBox_Tr(const char* s); @@ -48,11 +106,107 @@ void QGroupBox_Clicked(QGroupBox* self); void QGroupBox_connect_Clicked(QGroupBox* self, intptr_t slot); void QGroupBox_Toggled(QGroupBox* self, bool param1); void QGroupBox_connect_Toggled(QGroupBox* self, intptr_t slot); +bool QGroupBox_Event(QGroupBox* self, QEvent* event); +void QGroupBox_ChildEvent(QGroupBox* self, QChildEvent* event); +void QGroupBox_ResizeEvent(QGroupBox* self, QResizeEvent* event); +void QGroupBox_PaintEvent(QGroupBox* self, QPaintEvent* event); +void QGroupBox_FocusInEvent(QGroupBox* self, QFocusEvent* event); +void QGroupBox_ChangeEvent(QGroupBox* self, QEvent* event); +void QGroupBox_MousePressEvent(QGroupBox* self, QMouseEvent* event); +void QGroupBox_MouseMoveEvent(QGroupBox* self, QMouseEvent* event); +void QGroupBox_MouseReleaseEvent(QGroupBox* self, QMouseEvent* event); +void QGroupBox_InitStyleOption(const QGroupBox* self, QStyleOptionGroupBox* option); struct miqt_string QGroupBox_Tr2(const char* s, const char* c); struct miqt_string QGroupBox_Tr3(const char* s, const char* c, int n); void QGroupBox_Clicked1(QGroupBox* self, bool checked); void QGroupBox_connect_Clicked1(QGroupBox* self, intptr_t slot); -void QGroupBox_Delete(QGroupBox* self); +void QGroupBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QGroupBox_virtualbase_MinimumSizeHint(const void* self); +void QGroupBox_override_virtual_Event(void* self, intptr_t slot); +bool QGroupBox_virtualbase_Event(void* self, QEvent* event); +void QGroupBox_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGroupBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QGroupBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QGroupBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGroupBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGroupBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QGroupBox_virtualbase_InitStyleOption(const void* self, QStyleOptionGroupBox* option); +void QGroupBox_override_virtual_DevType(void* self, intptr_t slot); +int QGroupBox_virtualbase_DevType(const void* self); +void QGroupBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QGroupBox_virtualbase_SetVisible(void* self, bool visible); +void QGroupBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QGroupBox_virtualbase_SizeHint(const void* self); +void QGroupBox_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QGroupBox_virtualbase_HeightForWidth(const void* self, int param1); +void QGroupBox_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QGroupBox_virtualbase_HasHeightForWidth(const void* self); +void QGroupBox_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QGroupBox_virtualbase_PaintEngine(const void* self); +void QGroupBox_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QGroupBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QGroupBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGroupBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGroupBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGroupBox_override_virtual_EnterEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QGroupBox_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_LeaveEvent(void* self, QEvent* event); +void QGroupBox_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QGroupBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGroupBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QGroupBox_override_virtual_TabletEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QGroupBox_override_virtual_ActionEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QGroupBox_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QGroupBox_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QGroupBox_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QGroupBox_override_virtual_DropEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_DropEvent(void* self, QDropEvent* event); +void QGroupBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGroupBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGroupBox_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QGroupBox_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QGroupBox_override_virtual_Metric(void* self, intptr_t slot); +int QGroupBox_virtualbase_Metric(const void* self, int param1); +void QGroupBox_override_virtual_InitPainter(void* self, intptr_t slot); +void QGroupBox_virtualbase_InitPainter(const void* self, QPainter* painter); +void QGroupBox_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QGroupBox_virtualbase_Redirected(const void* self, QPoint* offset); +void QGroupBox_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QGroupBox_virtualbase_SharedPainter(const void* self); +void QGroupBox_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGroupBox_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QGroupBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGroupBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QGroupBox_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGroupBox_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGroupBox_Delete(QGroupBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qguiapplication.cpp b/qt6/gen_qguiapplication.cpp index e92b146a..bff2f508 100644 --- a/qt6/gen_qguiapplication.cpp +++ b/qt6/gen_qguiapplication.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -21,12 +22,75 @@ #include "gen_qguiapplication.h" #include "_cgo_export.h" -QGuiApplication* QGuiApplication_new(int* argc, char** argv) { - return new QGuiApplication(static_cast(*argc), argv); +class MiqtVirtualQGuiApplication : public virtual QGuiApplication { +public: + + MiqtVirtualQGuiApplication(int& argc, char** argv): QGuiApplication(argc, argv) {}; + MiqtVirtualQGuiApplication(int& argc, char** argv, int param3): QGuiApplication(argc, argv, param3) {}; + + virtual ~MiqtVirtualQGuiApplication() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Notify = 0; + + // Subclass to allow providing a Go implementation + virtual bool notify(QObject* param1, QEvent* param2) override { + if (handle__Notify == 0) { + return QGuiApplication::notify(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QGuiApplication_Notify(this, handle__Notify, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Notify(QObject* param1, QEvent* param2) { + + return QGuiApplication::notify(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QGuiApplication::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QGuiApplication_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QGuiApplication::event(param1); + + } + +}; + +void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv); + *outptr_QGuiApplication = ret; + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3) { - return new QGuiApplication(static_cast(*argc), argv, static_cast(param3)); +void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { + MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv, static_cast(param3)); + *outptr_QGuiApplication = ret; + *outptr_QCoreApplication = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self) { @@ -320,7 +384,7 @@ void QGuiApplication_FontDatabaseChanged(QGuiApplication* self) { } void QGuiApplication_connect_FontDatabaseChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::fontDatabaseChanged), self, [=]() { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::fontDatabaseChanged), self, [=]() { miqt_exec_callback_QGuiApplication_FontDatabaseChanged(slot); }); } @@ -330,7 +394,7 @@ void QGuiApplication_ScreenAdded(QGuiApplication* self, QScreen* screen) { } void QGuiApplication_connect_ScreenAdded(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::screenAdded), self, [=](QScreen* screen) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::screenAdded), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QGuiApplication_ScreenAdded(slot, sigval1); }); @@ -341,7 +405,7 @@ void QGuiApplication_ScreenRemoved(QGuiApplication* self, QScreen* screen) { } void QGuiApplication_connect_ScreenRemoved(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::screenRemoved), self, [=](QScreen* screen) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::screenRemoved), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QGuiApplication_ScreenRemoved(slot, sigval1); }); @@ -352,7 +416,7 @@ void QGuiApplication_PrimaryScreenChanged(QGuiApplication* self, QScreen* screen } void QGuiApplication_connect_PrimaryScreenChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::primaryScreenChanged), self, [=](QScreen* screen) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::primaryScreenChanged), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(slot, sigval1); }); @@ -363,7 +427,7 @@ void QGuiApplication_LastWindowClosed(QGuiApplication* self) { } void QGuiApplication_connect_LastWindowClosed(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::lastWindowClosed), self, [=]() { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::lastWindowClosed), self, [=]() { miqt_exec_callback_QGuiApplication_LastWindowClosed(slot); }); } @@ -373,7 +437,7 @@ void QGuiApplication_FocusObjectChanged(QGuiApplication* self, QObject* focusObj } void QGuiApplication_connect_FocusObjectChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::focusObjectChanged), self, [=](QObject* focusObject) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::focusObjectChanged), self, [=](QObject* focusObject) { QObject* sigval1 = focusObject; miqt_exec_callback_QGuiApplication_FocusObjectChanged(slot, sigval1); }); @@ -384,7 +448,7 @@ void QGuiApplication_FocusWindowChanged(QGuiApplication* self, QWindow* focusWin } void QGuiApplication_connect_FocusWindowChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::focusWindowChanged), self, [=](QWindow* focusWindow) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::focusWindowChanged), self, [=](QWindow* focusWindow) { QWindow* sigval1 = focusWindow; miqt_exec_callback_QGuiApplication_FocusWindowChanged(slot, sigval1); }); @@ -395,7 +459,7 @@ void QGuiApplication_ApplicationStateChanged(QGuiApplication* self, int state) { } void QGuiApplication_connect_ApplicationStateChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::applicationStateChanged), self, [=](Qt::ApplicationState state) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::applicationStateChanged), self, [=](Qt::ApplicationState state) { Qt::ApplicationState state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QGuiApplication_ApplicationStateChanged(slot, sigval1); @@ -407,7 +471,7 @@ void QGuiApplication_LayoutDirectionChanged(QGuiApplication* self, int direction } void QGuiApplication_connect_LayoutDirectionChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::layoutDirectionChanged), self, [=](Qt::LayoutDirection direction) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::layoutDirectionChanged), self, [=](Qt::LayoutDirection direction) { Qt::LayoutDirection direction_ret = direction; int sigval1 = static_cast(direction_ret); miqt_exec_callback_QGuiApplication_LayoutDirectionChanged(slot, sigval1); @@ -419,7 +483,7 @@ void QGuiApplication_CommitDataRequest(QGuiApplication* self, QSessionManager* s } void QGuiApplication_connect_CommitDataRequest(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::commitDataRequest), self, [=](QSessionManager& sessionManager) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::commitDataRequest), self, [=](QSessionManager& sessionManager) { QSessionManager& sessionManager_ret = sessionManager; // Cast returned reference into pointer QSessionManager* sigval1 = &sessionManager_ret; @@ -432,7 +496,7 @@ void QGuiApplication_SaveStateRequest(QGuiApplication* self, QSessionManager* se } void QGuiApplication_connect_SaveStateRequest(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::saveStateRequest), self, [=](QSessionManager& sessionManager) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::saveStateRequest), self, [=](QSessionManager& sessionManager) { QSessionManager& sessionManager_ret = sessionManager; // Cast returned reference into pointer QSessionManager* sigval1 = &sessionManager_ret; @@ -445,7 +509,7 @@ void QGuiApplication_ApplicationDisplayNameChanged(QGuiApplication* self) { } void QGuiApplication_connect_ApplicationDisplayNameChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::applicationDisplayNameChanged), self, [=]() { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::applicationDisplayNameChanged), self, [=]() { miqt_exec_callback_QGuiApplication_ApplicationDisplayNameChanged(slot); }); } @@ -455,7 +519,7 @@ void QGuiApplication_PaletteChanged(QGuiApplication* self, QPalette* pal) { } void QGuiApplication_connect_PaletteChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::paletteChanged), self, [=](const QPalette& pal) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::paletteChanged), self, [=](const QPalette& pal) { const QPalette& pal_ret = pal; // Cast returned reference into pointer QPalette* sigval1 = const_cast(&pal_ret); @@ -468,7 +532,7 @@ void QGuiApplication_FontChanged(QGuiApplication* self, QFont* font) { } void QGuiApplication_connect_FontChanged(QGuiApplication* self, intptr_t slot) { - QGuiApplication::connect(self, static_cast(&QGuiApplication::fontChanged), self, [=](const QFont& font) { + MiqtVirtualQGuiApplication::connect(self, static_cast(&QGuiApplication::fontChanged), self, [=](const QFont& font) { const QFont& font_ret = font; // Cast returned reference into pointer QFont* sigval1 = const_cast(&font_ret); @@ -498,7 +562,27 @@ struct miqt_string QGuiApplication_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGuiApplication_Delete(QGuiApplication* self) { - delete self; +void QGuiApplication_override_virtual_Notify(void* self, intptr_t slot) { + dynamic_cast( (QGuiApplication*)(self) )->handle__Notify = slot; +} + +bool QGuiApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQGuiApplication*)(self) )->virtualbase_Notify(param1, param2); +} + +void QGuiApplication_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGuiApplication*)(self) )->handle__Event = slot; +} + +bool QGuiApplication_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQGuiApplication*)(self) )->virtualbase_Event(param1); +} + +void QGuiApplication_Delete(QGuiApplication* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qguiapplication.go b/qt6/gen_qguiapplication.go index 23fea611..76347f1e 100644 --- a/qt6/gen_qguiapplication.go +++ b/qt6/gen_qguiapplication.go @@ -15,7 +15,8 @@ import ( ) type QGuiApplication struct { - h *C.QGuiApplication + h *C.QGuiApplication + isSubclass bool *QCoreApplication } @@ -33,15 +34,23 @@ func (this *QGuiApplication) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGuiApplication(h *C.QGuiApplication) *QGuiApplication { +// newQGuiApplication constructs the type using only CGO pointers. +func newQGuiApplication(h *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QGuiApplication { if h == nil { return nil } - return &QGuiApplication{h: h, QCoreApplication: UnsafeNewQCoreApplication(unsafe.Pointer(h))} + return &QGuiApplication{h: h, + QCoreApplication: newQCoreApplication(h_QCoreApplication, h_QObject)} } -func UnsafeNewQGuiApplication(h unsafe.Pointer) *QGuiApplication { - return newQGuiApplication((*C.QGuiApplication)(h)) +// UnsafeNewQGuiApplication constructs the type using only unsafe pointers. +func UnsafeNewQGuiApplication(h unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QGuiApplication { + if h == nil { + return nil + } + + return &QGuiApplication{h: (*C.QGuiApplication)(h), + QCoreApplication: UnsafeNewQCoreApplication(h_QCoreApplication, h_QObject)} } // NewQGuiApplication constructs a new QGuiApplication object. @@ -56,8 +65,14 @@ func NewQGuiApplication(args []string) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QGuiApplication_new(argc, &argv[0]) - return newQGuiApplication(ret) + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QGuiApplication_new(argc, &argv[0], &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } // NewQGuiApplication2 constructs a new QGuiApplication object. @@ -72,8 +87,14 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - ret := C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3)) - return newQGuiApplication(ret) + var outptr_QGuiApplication *C.QGuiApplication = nil + var outptr_QCoreApplication *C.QCoreApplication = nil + var outptr_QObject *C.QObject = nil + + C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) + ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QGuiApplication) MetaObject() *QMetaObject { @@ -130,7 +151,7 @@ func QGuiApplication_AllWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } @@ -140,13 +161,13 @@ func QGuiApplication_TopLevelWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQWindow(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func QGuiApplication_TopLevelAt(pos *QPoint) *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_TopLevelAt(pos.cPointer()))) + return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_TopLevelAt(pos.cPointer())), nil, nil) } func QGuiApplication_SetWindowIcon(icon *QIcon) { @@ -168,11 +189,11 @@ func QGuiApplication_PlatformName() string { } func QGuiApplication_ModalWindow() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_ModalWindow())) + return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_ModalWindow()), nil, nil) } func QGuiApplication_FocusWindow() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_FocusWindow())) + return UnsafeNewQWindow(unsafe.Pointer(C.QGuiApplication_FocusWindow()), nil, nil) } func QGuiApplication_FocusObject() *QObject { @@ -180,7 +201,7 @@ func QGuiApplication_FocusObject() *QObject { } func QGuiApplication_PrimaryScreen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_PrimaryScreen())) + return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_PrimaryScreen()), nil) } func QGuiApplication_Screens() []*QScreen { @@ -188,13 +209,13 @@ func QGuiApplication_Screens() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i]), nil) } return _ret } func QGuiApplication_ScreenAt(point *QPoint) *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_ScreenAt(point.cPointer()))) + return UnsafeNewQScreen(unsafe.Pointer(C.QGuiApplication_ScreenAt(point.cPointer())), nil) } func (this *QGuiApplication) DevicePixelRatio() float64 { @@ -229,7 +250,7 @@ func QGuiApplication_SetFont(font *QFont) { } func QGuiApplication_Clipboard() *QClipboard { - return UnsafeNewQClipboard(unsafe.Pointer(C.QGuiApplication_Clipboard())) + return UnsafeNewQClipboard(unsafe.Pointer(C.QGuiApplication_Clipboard()), nil) } func QGuiApplication_Palette() *QPalette { @@ -272,7 +293,7 @@ func QGuiApplication_IsLeftToRight() bool { } func QGuiApplication_StyleHints() *QStyleHints { - return UnsafeNewQStyleHints(unsafe.Pointer(C.QGuiApplication_StyleHints())) + return UnsafeNewQStyleHints(unsafe.Pointer(C.QGuiApplication_StyleHints()), nil) } func QGuiApplication_SetDesktopSettingsAware(on bool) { @@ -284,7 +305,7 @@ func QGuiApplication_DesktopSettingsAware() bool { } func QGuiApplication_InputMethod() *QInputMethod { - return UnsafeNewQInputMethod(unsafe.Pointer(C.QGuiApplication_InputMethod())) + return UnsafeNewQInputMethod(unsafe.Pointer(C.QGuiApplication_InputMethod()), nil) } func QGuiApplication_SetQuitOnLastWindowClosed(quit bool) { @@ -373,7 +394,7 @@ func miqt_exec_callback_QGuiApplication_ScreenAdded(cb C.intptr_t, screen *C.QSc } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -393,7 +414,7 @@ func miqt_exec_callback_QGuiApplication_ScreenRemoved(cb C.intptr_t, screen *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -413,7 +434,7 @@ func miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(cb C.intptr_t, scre } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -470,7 +491,7 @@ func miqt_exec_callback_QGuiApplication_FocusWindowChanged(cb C.intptr_t, focusW } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWindow(unsafe.Pointer(focusWindow)) + slotval1 := UnsafeNewQWindow(unsafe.Pointer(focusWindow), nil, nil) gofunc(slotval1) } @@ -530,7 +551,7 @@ func miqt_exec_callback_QGuiApplication_CommitDataRequest(cb C.intptr_t, session } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager)) + slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager), nil) gofunc(slotval1) } @@ -550,7 +571,7 @@ func miqt_exec_callback_QGuiApplication_SaveStateRequest(cb C.intptr_t, sessionM } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager)) + slotval1 := UnsafeNewQSessionManager(unsafe.Pointer(sessionManager), nil) gofunc(slotval1) } @@ -634,9 +655,60 @@ func QGuiApplication_Tr3(s string, c string, n int) string { return _ret } +func (this *QGuiApplication) callVirtualBase_Notify(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QGuiApplication_virtualbase_Notify(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QGuiApplication) OnNotify(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QGuiApplication_override_virtual_Notify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGuiApplication_Notify +func miqt_exec_callback_QGuiApplication_Notify(self *C.QGuiApplication, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QGuiApplication{h: self}).callVirtualBase_Notify, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGuiApplication) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QGuiApplication_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QGuiApplication) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QGuiApplication_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGuiApplication_Event +func miqt_exec_callback_QGuiApplication_Event(self *C.QGuiApplication, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QGuiApplication{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QGuiApplication) Delete() { - C.QGuiApplication_Delete(this.h) + C.QGuiApplication_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qguiapplication.h b/qt6/gen_qguiapplication.h index 421cf43e..c8b3a253 100644 --- a/qt6/gen_qguiapplication.h +++ b/qt6/gen_qguiapplication.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QClipboard; +class QCoreApplication; class QCursor; class QEvent; class QFont; @@ -32,6 +33,7 @@ class QStyleHints; class QWindow; #else typedef struct QClipboard QClipboard; +typedef struct QCoreApplication QCoreApplication; typedef struct QCursor QCursor; typedef struct QEvent QEvent; typedef struct QFont QFont; @@ -48,8 +50,8 @@ typedef struct QStyleHints QStyleHints; typedef struct QWindow QWindow; #endif -QGuiApplication* QGuiApplication_new(int* argc, char** argv); -QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3); +void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self); void* QGuiApplication_Metacast(QGuiApplication* self, const char* param1); struct miqt_string QGuiApplication_Tr(const char* s); @@ -130,9 +132,14 @@ void QGuiApplication_PaletteChanged(QGuiApplication* self, QPalette* pal); void QGuiApplication_connect_PaletteChanged(QGuiApplication* self, intptr_t slot); void QGuiApplication_FontChanged(QGuiApplication* self, QFont* font); void QGuiApplication_connect_FontChanged(QGuiApplication* self, intptr_t slot); +bool QGuiApplication_Event(QGuiApplication* self, QEvent* param1); struct miqt_string QGuiApplication_Tr2(const char* s, const char* c); struct miqt_string QGuiApplication_Tr3(const char* s, const char* c, int n); -void QGuiApplication_Delete(QGuiApplication* self); +void QGuiApplication_override_virtual_Notify(void* self, intptr_t slot); +bool QGuiApplication_virtualbase_Notify(void* self, QObject* param1, QEvent* param2); +void QGuiApplication_override_virtual_Event(void* self, intptr_t slot); +bool QGuiApplication_virtualbase_Event(void* self, QEvent* param1); +void QGuiApplication_Delete(QGuiApplication* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qhashfunctions.cpp b/qt6/gen_qhashfunctions.cpp index 4ec272e0..b4e9a646 100644 --- a/qt6/gen_qhashfunctions.cpp +++ b/qt6/gen_qhashfunctions.cpp @@ -5,12 +5,14 @@ #include "gen_qhashfunctions.h" #include "_cgo_export.h" -QHashSeed* QHashSeed_new() { - return new QHashSeed(); +void QHashSeed_new(QHashSeed** outptr_QHashSeed) { + QHashSeed* ret = new QHashSeed(); + *outptr_QHashSeed = ret; } -QHashSeed* QHashSeed_new2(size_t d) { - return new QHashSeed(static_cast(d)); +void QHashSeed_new2(size_t d, QHashSeed** outptr_QHashSeed) { + QHashSeed* ret = new QHashSeed(static_cast(d)); + *outptr_QHashSeed = ret; } QHashSeed* QHashSeed_GlobalSeed() { @@ -25,23 +27,37 @@ void QHashSeed_ResetRandomGlobalSeed() { QHashSeed::resetRandomGlobalSeed(); } -void QHashSeed_Delete(QHashSeed* self) { - delete self; +void QHashSeed_Delete(QHashSeed* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__QHashCombine* QtPrivate__QHashCombine_new() { - return new QtPrivate::QHashCombine(); +void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine) { + QtPrivate::QHashCombine* ret = new QtPrivate::QHashCombine(); + *outptr_QtPrivate__QHashCombine = ret; } -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self) { - delete self; +void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__QHashCombineCommutative* QtPrivate__QHashCombineCommutative_new() { - return new QtPrivate::QHashCombineCommutative(); +void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative) { + QtPrivate::QHashCombineCommutative* ret = new QtPrivate::QHashCombineCommutative(); + *outptr_QtPrivate__QHashCombineCommutative = ret; } -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self) { - delete self; +void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qhashfunctions.go b/qt6/gen_qhashfunctions.go index f0d85886..3712fa23 100644 --- a/qt6/gen_qhashfunctions.go +++ b/qt6/gen_qhashfunctions.go @@ -14,7 +14,8 @@ import ( ) type QHashSeed struct { - h *C.QHashSeed + h *C.QHashSeed + isSubclass bool } func (this *QHashSeed) cPointer() *C.QHashSeed { @@ -31,6 +32,7 @@ func (this *QHashSeed) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHashSeed constructs the type using only CGO pointers. func newQHashSeed(h *C.QHashSeed) *QHashSeed { if h == nil { return nil @@ -38,20 +40,33 @@ func newQHashSeed(h *C.QHashSeed) *QHashSeed { return &QHashSeed{h: h} } +// UnsafeNewQHashSeed constructs the type using only unsafe pointers. func UnsafeNewQHashSeed(h unsafe.Pointer) *QHashSeed { - return newQHashSeed((*C.QHashSeed)(h)) + if h == nil { + return nil + } + + return &QHashSeed{h: (*C.QHashSeed)(h)} } // NewQHashSeed constructs a new QHashSeed object. func NewQHashSeed() *QHashSeed { - ret := C.QHashSeed_new() - return newQHashSeed(ret) + var outptr_QHashSeed *C.QHashSeed = nil + + C.QHashSeed_new(&outptr_QHashSeed) + ret := newQHashSeed(outptr_QHashSeed) + ret.isSubclass = true + return ret } // NewQHashSeed2 constructs a new QHashSeed object. func NewQHashSeed2(d uint64) *QHashSeed { - ret := C.QHashSeed_new2((C.size_t)(d)) - return newQHashSeed(ret) + var outptr_QHashSeed *C.QHashSeed = nil + + C.QHashSeed_new2((C.size_t)(d), &outptr_QHashSeed) + ret := newQHashSeed(outptr_QHashSeed) + ret.isSubclass = true + return ret } func QHashSeed_GlobalSeed() *QHashSeed { @@ -71,7 +86,7 @@ func QHashSeed_ResetRandomGlobalSeed() { // Delete this object from C++ memory. func (this *QHashSeed) Delete() { - C.QHashSeed_Delete(this.h) + C.QHashSeed_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -84,7 +99,8 @@ func (this *QHashSeed) GoGC() { } type QtPrivate__QHashCombine struct { - h *C.QtPrivate__QHashCombine + h *C.QtPrivate__QHashCombine + isSubclass bool } func (this *QtPrivate__QHashCombine) cPointer() *C.QtPrivate__QHashCombine { @@ -101,6 +117,7 @@ func (this *QtPrivate__QHashCombine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QHashCombine constructs the type using only CGO pointers. func newQtPrivate__QHashCombine(h *C.QtPrivate__QHashCombine) *QtPrivate__QHashCombine { if h == nil { return nil @@ -108,19 +125,28 @@ func newQtPrivate__QHashCombine(h *C.QtPrivate__QHashCombine) *QtPrivate__QHashC return &QtPrivate__QHashCombine{h: h} } +// UnsafeNewQtPrivate__QHashCombine constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QHashCombine(h unsafe.Pointer) *QtPrivate__QHashCombine { - return newQtPrivate__QHashCombine((*C.QtPrivate__QHashCombine)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QHashCombine{h: (*C.QtPrivate__QHashCombine)(h)} } // NewQtPrivate__QHashCombine constructs a new QtPrivate::QHashCombine object. func NewQtPrivate__QHashCombine() *QtPrivate__QHashCombine { - ret := C.QtPrivate__QHashCombine_new() - return newQtPrivate__QHashCombine(ret) + var outptr_QtPrivate__QHashCombine *C.QtPrivate__QHashCombine = nil + + C.QtPrivate__QHashCombine_new(&outptr_QtPrivate__QHashCombine) + ret := newQtPrivate__QHashCombine(outptr_QtPrivate__QHashCombine) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__QHashCombine) Delete() { - C.QtPrivate__QHashCombine_Delete(this.h) + C.QtPrivate__QHashCombine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -133,7 +159,8 @@ func (this *QtPrivate__QHashCombine) GoGC() { } type QtPrivate__QHashCombineCommutative struct { - h *C.QtPrivate__QHashCombineCommutative + h *C.QtPrivate__QHashCombineCommutative + isSubclass bool } func (this *QtPrivate__QHashCombineCommutative) cPointer() *C.QtPrivate__QHashCombineCommutative { @@ -150,6 +177,7 @@ func (this *QtPrivate__QHashCombineCommutative) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QHashCombineCommutative constructs the type using only CGO pointers. func newQtPrivate__QHashCombineCommutative(h *C.QtPrivate__QHashCombineCommutative) *QtPrivate__QHashCombineCommutative { if h == nil { return nil @@ -157,19 +185,28 @@ func newQtPrivate__QHashCombineCommutative(h *C.QtPrivate__QHashCombineCommutati return &QtPrivate__QHashCombineCommutative{h: h} } +// UnsafeNewQtPrivate__QHashCombineCommutative constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QHashCombineCommutative(h unsafe.Pointer) *QtPrivate__QHashCombineCommutative { - return newQtPrivate__QHashCombineCommutative((*C.QtPrivate__QHashCombineCommutative)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QHashCombineCommutative{h: (*C.QtPrivate__QHashCombineCommutative)(h)} } // NewQtPrivate__QHashCombineCommutative constructs a new QtPrivate::QHashCombineCommutative object. func NewQtPrivate__QHashCombineCommutative() *QtPrivate__QHashCombineCommutative { - ret := C.QtPrivate__QHashCombineCommutative_new() - return newQtPrivate__QHashCombineCommutative(ret) + var outptr_QtPrivate__QHashCombineCommutative *C.QtPrivate__QHashCombineCommutative = nil + + C.QtPrivate__QHashCombineCommutative_new(&outptr_QtPrivate__QHashCombineCommutative) + ret := newQtPrivate__QHashCombineCommutative(outptr_QtPrivate__QHashCombineCommutative) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__QHashCombineCommutative) Delete() { - C.QtPrivate__QHashCombineCommutative_Delete(this.h) + C.QtPrivate__QHashCombineCommutative_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qhashfunctions.h b/qt6/gen_qhashfunctions.h index 97c85f2d..aaae80ec 100644 --- a/qt6/gen_qhashfunctions.h +++ b/qt6/gen_qhashfunctions.h @@ -32,18 +32,18 @@ typedef struct QtPrivate__QHashCombine QtPrivate__QHashCombine; typedef struct QtPrivate__QHashCombineCommutative QtPrivate__QHashCombineCommutative; #endif -QHashSeed* QHashSeed_new(); -QHashSeed* QHashSeed_new2(size_t d); +void QHashSeed_new(QHashSeed** outptr_QHashSeed); +void QHashSeed_new2(size_t d, QHashSeed** outptr_QHashSeed); QHashSeed* QHashSeed_GlobalSeed(); void QHashSeed_SetDeterministicGlobalSeed(); void QHashSeed_ResetRandomGlobalSeed(); -void QHashSeed_Delete(QHashSeed* self); +void QHashSeed_Delete(QHashSeed* self, bool isSubclass); -QtPrivate__QHashCombine* QtPrivate__QHashCombine_new(); -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self); +void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine); +void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass); -QtPrivate__QHashCombineCommutative* QtPrivate__QHashCombineCommutative_new(); -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self); +void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative); +void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qheaderview.cpp b/qt6/gen_qheaderview.cpp index a7bbc5e7..e4388f18 100644 --- a/qt6/gen_qheaderview.cpp +++ b/qt6/gen_qheaderview.cpp @@ -1,484 +1,2685 @@ +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qheaderview.h" #include "_cgo_export.h" -QHeaderView* QHeaderView_new(int orientation) { - return new QHeaderView(static_cast(orientation)); +class MiqtVirtualQHeaderView : public virtual QHeaderView { +public: + + MiqtVirtualQHeaderView(Qt::Orientation orientation): QHeaderView(orientation) {}; + MiqtVirtualQHeaderView(Qt::Orientation orientation, QWidget* parent): QHeaderView(orientation, parent) {}; + + virtual ~MiqtVirtualQHeaderView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QHeaderView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QHeaderView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QHeaderView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QHeaderView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHeaderView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QHeaderView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool v) override { + if (handle__SetVisible == 0) { + QHeaderView::setVisible(v); + return; + } + + bool sigval1 = v; + + miqt_exec_callback_QHeaderView_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool v) { + + QHeaderView::setVisible(v); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QHeaderView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QHeaderView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QHeaderView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QHeaderView::reset(); + return; + } + + + miqt_exec_callback_QHeaderView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QHeaderView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& old) override { + if (handle__CurrentChanged == 0) { + QHeaderView::currentChanged(current, old); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& old_ret = old; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&old_ret); + + miqt_exec_callback_QHeaderView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* old) { + + QHeaderView::currentChanged(*current, *old); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QHeaderView::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QHeaderView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QHeaderView::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QHeaderView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QHeaderView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QHeaderView::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QHeaderView::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QHeaderView::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QHeaderView::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QHeaderView::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QHeaderView::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QHeaderView::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QHeaderView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QHeaderView::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* e) override { + if (handle__ViewportEvent == 0) { + return QHeaderView::viewportEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QHeaderView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* e) { + + return QHeaderView::viewportEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintSection = 0; + + // Subclass to allow providing a Go implementation + virtual void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const override { + if (handle__PaintSection == 0) { + QHeaderView::paintSection(painter, rect, logicalIndex); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = logicalIndex; + + miqt_exec_callback_QHeaderView_PaintSection(const_cast(this), handle__PaintSection, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintSection(QPainter* painter, QRect* rect, int logicalIndex) const { + + QHeaderView::paintSection(painter, *rect, static_cast(logicalIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SectionSizeFromContents = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sectionSizeFromContents(int logicalIndex) const override { + if (handle__SectionSizeFromContents == 0) { + return QHeaderView::sectionSizeFromContents(logicalIndex); + } + + int sigval1 = logicalIndex; + + QSize* callback_return_value = miqt_exec_callback_QHeaderView_SectionSizeFromContents(const_cast(this), handle__SectionSizeFromContents, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SectionSizeFromContents(int logicalIndex) const { + + return new QSize(QHeaderView::sectionSizeFromContents(static_cast(logicalIndex))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QHeaderView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QHeaderView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QHeaderView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QHeaderView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QHeaderView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QHeaderView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QHeaderView::updateGeometries(); + return; + } + + + miqt_exec_callback_QHeaderView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QHeaderView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QHeaderView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QHeaderView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QHeaderView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QHeaderView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QHeaderView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QHeaderView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QHeaderView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QHeaderView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QHeaderView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QHeaderView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QHeaderView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QHeaderView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QHeaderView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QHeaderView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QHeaderView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QHeaderView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QHeaderView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QHeaderView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QHeaderView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QHeaderView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QHeaderView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction param1, Qt::KeyboardModifiers param2) override { + if (handle__MoveCursor == 0) { + return QHeaderView::moveCursor(param1, param2); + } + + QAbstractItemView::CursorAction param1_ret = param1; + int sigval1 = static_cast(param1_ret); + Qt::KeyboardModifiers param2_ret = param2; + int sigval2 = static_cast(param2_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QHeaderView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int param1, int param2) { + + return new QModelIndex(QHeaderView::moveCursor(static_cast(param1), static_cast(param2))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags) override { + if (handle__SetSelection == 0) { + QHeaderView::setSelection(rect, flags); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags flags_ret = flags; + int sigval2 = static_cast(flags_ret); + + miqt_exec_callback_QHeaderView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int flags) { + + QHeaderView::setSelection(*rect, static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOptionForIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOptionForIndex(QStyleOptionHeader* option, int logicalIndex) const override { + if (handle__InitStyleOptionForIndex == 0) { + QHeaderView::initStyleOptionForIndex(option, logicalIndex); + return; + } + + QStyleOptionHeader* sigval1 = option; + int sigval2 = logicalIndex; + + miqt_exec_callback_QHeaderView_InitStyleOptionForIndex(const_cast(this), handle__InitStyleOptionForIndex, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOptionForIndex(QStyleOptionHeader* option, int logicalIndex) const { + + QHeaderView::initStyleOptionForIndex(option, static_cast(logicalIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionHeader* option) const override { + if (handle__InitStyleOption == 0) { + QHeaderView::initStyleOption(option); + return; + } + + QStyleOptionHeader* sigval1 = option; + + miqt_exec_callback_QHeaderView_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionHeader* option) const { + + QHeaderView::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QHeaderView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QHeaderView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QHeaderView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QHeaderView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QHeaderView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QHeaderView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QHeaderView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QHeaderView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QHeaderView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QHeaderView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QHeaderView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QHeaderView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemDelegateForIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemDelegate* itemDelegateForIndex(const QModelIndex& index) const override { + if (handle__ItemDelegateForIndex == 0) { + return QHeaderView::itemDelegateForIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QAbstractItemDelegate* callback_return_value = miqt_exec_callback_QHeaderView_ItemDelegateForIndex(const_cast(this), handle__ItemDelegateForIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemDelegate* virtualbase_ItemDelegateForIndex(QModelIndex* index) const { + + return QHeaderView::itemDelegateForIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QHeaderView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QHeaderView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QHeaderView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QHeaderView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QHeaderView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QHeaderView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QHeaderView::selectAll(); + return; + } + + + miqt_exec_callback_QHeaderView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QHeaderView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QHeaderView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QHeaderView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QHeaderView::updateEditorData(); + return; + } + + + miqt_exec_callback_QHeaderView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QHeaderView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QHeaderView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QHeaderView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QHeaderView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QHeaderView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QHeaderView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QHeaderView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QHeaderView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QHeaderView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QHeaderView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QHeaderView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QHeaderView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QHeaderView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QHeaderView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QHeaderView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QHeaderView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QHeaderView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QHeaderView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QHeaderView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QHeaderView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QHeaderView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QHeaderView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QHeaderView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QHeaderView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QHeaderView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QHeaderView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QHeaderView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QHeaderView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QHeaderView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QHeaderView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QHeaderView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QHeaderView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QHeaderView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QHeaderView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QHeaderView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QHeaderView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QHeaderView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QHeaderView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QHeaderView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QHeaderView::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QHeaderView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QHeaderView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QHeaderView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QHeaderView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QHeaderView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QHeaderView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QHeaderView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QHeaderView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QHeaderView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QHeaderView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QHeaderView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QHeaderView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QHeaderView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QHeaderView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QHeaderView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QHeaderView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QHeaderView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QHeaderView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QHeaderView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QHeaderView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QHeaderView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QHeaderView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QHeaderView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QHeaderView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QHeaderView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QHeaderView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QHeaderView::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QHeaderView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QHeaderView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QHeaderView::viewportSizeHint()); + + } + +}; + +void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation)); + *outptr_QHeaderView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation), parent); + *outptr_QHeaderView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QHeaderView_MetaObject(const QHeaderView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QHeaderView_Metacast(QHeaderView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QHeaderView_Tr(const char* s) { + QString _ret = QHeaderView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QHeaderView_SetModel(QHeaderView* self, QAbstractItemModel* model) { + self->setModel(model); +} + +int QHeaderView_Orientation(const QHeaderView* self) { + Qt::Orientation _ret = self->orientation(); + return static_cast(_ret); +} + +int QHeaderView_Offset(const QHeaderView* self) { + return self->offset(); +} + +int QHeaderView_Length(const QHeaderView* self) { + return self->length(); +} + +QSize* QHeaderView_SizeHint(const QHeaderView* self) { + return new QSize(self->sizeHint()); +} + +void QHeaderView_SetVisible(QHeaderView* self, bool v) { + self->setVisible(v); +} + +int QHeaderView_SectionSizeHint(const QHeaderView* self, int logicalIndex) { + return self->sectionSizeHint(static_cast(logicalIndex)); +} + +int QHeaderView_VisualIndexAt(const QHeaderView* self, int position) { + return self->visualIndexAt(static_cast(position)); +} + +int QHeaderView_LogicalIndexAt(const QHeaderView* self, int position) { + return self->logicalIndexAt(static_cast(position)); +} + +int QHeaderView_LogicalIndexAt2(const QHeaderView* self, int x, int y) { + return self->logicalIndexAt(static_cast(x), static_cast(y)); +} + +int QHeaderView_LogicalIndexAtWithPos(const QHeaderView* self, QPoint* pos) { + return self->logicalIndexAt(*pos); +} + +int QHeaderView_SectionSize(const QHeaderView* self, int logicalIndex) { + return self->sectionSize(static_cast(logicalIndex)); +} + +int QHeaderView_SectionPosition(const QHeaderView* self, int logicalIndex) { + return self->sectionPosition(static_cast(logicalIndex)); +} + +int QHeaderView_SectionViewportPosition(const QHeaderView* self, int logicalIndex) { + return self->sectionViewportPosition(static_cast(logicalIndex)); +} + +void QHeaderView_MoveSection(QHeaderView* self, int from, int to) { + self->moveSection(static_cast(from), static_cast(to)); +} + +void QHeaderView_SwapSections(QHeaderView* self, int first, int second) { + self->swapSections(static_cast(first), static_cast(second)); +} + +void QHeaderView_ResizeSection(QHeaderView* self, int logicalIndex, int size) { + self->resizeSection(static_cast(logicalIndex), static_cast(size)); +} + +void QHeaderView_ResizeSections(QHeaderView* self, int mode) { + self->resizeSections(static_cast(mode)); +} + +bool QHeaderView_IsSectionHidden(const QHeaderView* self, int logicalIndex) { + return self->isSectionHidden(static_cast(logicalIndex)); +} + +void QHeaderView_SetSectionHidden(QHeaderView* self, int logicalIndex, bool hide) { + self->setSectionHidden(static_cast(logicalIndex), hide); +} + +int QHeaderView_HiddenSectionCount(const QHeaderView* self) { + return self->hiddenSectionCount(); +} + +void QHeaderView_HideSection(QHeaderView* self, int logicalIndex) { + self->hideSection(static_cast(logicalIndex)); +} + +void QHeaderView_ShowSection(QHeaderView* self, int logicalIndex) { + self->showSection(static_cast(logicalIndex)); +} + +int QHeaderView_Count(const QHeaderView* self) { + return self->count(); +} + +int QHeaderView_VisualIndex(const QHeaderView* self, int logicalIndex) { + return self->visualIndex(static_cast(logicalIndex)); +} + +int QHeaderView_LogicalIndex(const QHeaderView* self, int visualIndex) { + return self->logicalIndex(static_cast(visualIndex)); +} + +void QHeaderView_SetSectionsMovable(QHeaderView* self, bool movable) { + self->setSectionsMovable(movable); +} + +bool QHeaderView_SectionsMovable(const QHeaderView* self) { + return self->sectionsMovable(); +} + +void QHeaderView_SetFirstSectionMovable(QHeaderView* self, bool movable) { + self->setFirstSectionMovable(movable); +} + +bool QHeaderView_IsFirstSectionMovable(const QHeaderView* self) { + return self->isFirstSectionMovable(); +} + +void QHeaderView_SetSectionsClickable(QHeaderView* self, bool clickable) { + self->setSectionsClickable(clickable); +} + +bool QHeaderView_SectionsClickable(const QHeaderView* self) { + return self->sectionsClickable(); +} + +void QHeaderView_SetHighlightSections(QHeaderView* self, bool highlight) { + self->setHighlightSections(highlight); +} + +bool QHeaderView_HighlightSections(const QHeaderView* self) { + return self->highlightSections(); +} + +int QHeaderView_SectionResizeMode(const QHeaderView* self, int logicalIndex) { + QHeaderView::ResizeMode _ret = self->sectionResizeMode(static_cast(logicalIndex)); + return static_cast(_ret); +} + +void QHeaderView_SetSectionResizeMode(QHeaderView* self, int mode) { + self->setSectionResizeMode(static_cast(mode)); +} + +void QHeaderView_SetSectionResizeMode2(QHeaderView* self, int logicalIndex, int mode) { + self->setSectionResizeMode(static_cast(logicalIndex), static_cast(mode)); +} + +void QHeaderView_SetResizeContentsPrecision(QHeaderView* self, int precision) { + self->setResizeContentsPrecision(static_cast(precision)); +} + +int QHeaderView_ResizeContentsPrecision(const QHeaderView* self) { + return self->resizeContentsPrecision(); +} + +int QHeaderView_StretchSectionCount(const QHeaderView* self) { + return self->stretchSectionCount(); +} + +void QHeaderView_SetSortIndicatorShown(QHeaderView* self, bool show) { + self->setSortIndicatorShown(show); +} + +bool QHeaderView_IsSortIndicatorShown(const QHeaderView* self) { + return self->isSortIndicatorShown(); +} + +void QHeaderView_SetSortIndicator(QHeaderView* self, int logicalIndex, int order) { + self->setSortIndicator(static_cast(logicalIndex), static_cast(order)); +} + +int QHeaderView_SortIndicatorSection(const QHeaderView* self) { + return self->sortIndicatorSection(); +} + +int QHeaderView_SortIndicatorOrder(const QHeaderView* self) { + Qt::SortOrder _ret = self->sortIndicatorOrder(); + return static_cast(_ret); +} + +void QHeaderView_SetSortIndicatorClearable(QHeaderView* self, bool clearable) { + self->setSortIndicatorClearable(clearable); +} + +bool QHeaderView_IsSortIndicatorClearable(const QHeaderView* self) { + return self->isSortIndicatorClearable(); +} + +bool QHeaderView_StretchLastSection(const QHeaderView* self) { + return self->stretchLastSection(); +} + +void QHeaderView_SetStretchLastSection(QHeaderView* self, bool stretch) { + self->setStretchLastSection(stretch); +} + +bool QHeaderView_CascadingSectionResizes(const QHeaderView* self) { + return self->cascadingSectionResizes(); +} + +void QHeaderView_SetCascadingSectionResizes(QHeaderView* self, bool enable) { + self->setCascadingSectionResizes(enable); +} + +int QHeaderView_DefaultSectionSize(const QHeaderView* self) { + return self->defaultSectionSize(); +} + +void QHeaderView_SetDefaultSectionSize(QHeaderView* self, int size) { + self->setDefaultSectionSize(static_cast(size)); +} + +void QHeaderView_ResetDefaultSectionSize(QHeaderView* self) { + self->resetDefaultSectionSize(); +} + +int QHeaderView_MinimumSectionSize(const QHeaderView* self) { + return self->minimumSectionSize(); +} + +void QHeaderView_SetMinimumSectionSize(QHeaderView* self, int size) { + self->setMinimumSectionSize(static_cast(size)); +} + +int QHeaderView_MaximumSectionSize(const QHeaderView* self) { + return self->maximumSectionSize(); +} + +void QHeaderView_SetMaximumSectionSize(QHeaderView* self, int size) { + self->setMaximumSectionSize(static_cast(size)); +} + +int QHeaderView_DefaultAlignment(const QHeaderView* self) { + Qt::Alignment _ret = self->defaultAlignment(); + return static_cast(_ret); +} + +void QHeaderView_SetDefaultAlignment(QHeaderView* self, int alignment) { + self->setDefaultAlignment(static_cast(alignment)); +} + +void QHeaderView_DoItemsLayout(QHeaderView* self) { + self->doItemsLayout(); +} + +bool QHeaderView_SectionsMoved(const QHeaderView* self) { + return self->sectionsMoved(); +} + +bool QHeaderView_SectionsHidden(const QHeaderView* self) { + return self->sectionsHidden(); +} + +struct miqt_string QHeaderView_SaveState(const QHeaderView* self) { + QByteArray _qb = self->saveState(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +bool QHeaderView_RestoreState(QHeaderView* self, struct miqt_string state) { + QByteArray state_QByteArray(state.data, state.len); + return self->restoreState(state_QByteArray); +} + +void QHeaderView_Reset(QHeaderView* self) { + self->reset(); +} + +void QHeaderView_SetOffset(QHeaderView* self, int offset) { + self->setOffset(static_cast(offset)); +} + +void QHeaderView_SetOffsetToSectionPosition(QHeaderView* self, int visualIndex) { + self->setOffsetToSectionPosition(static_cast(visualIndex)); +} + +void QHeaderView_SetOffsetToLastSection(QHeaderView* self) { + self->setOffsetToLastSection(); +} + +void QHeaderView_HeaderDataChanged(QHeaderView* self, int orientation, int logicalFirst, int logicalLast) { + self->headerDataChanged(static_cast(orientation), static_cast(logicalFirst), static_cast(logicalLast)); +} + +void QHeaderView_SectionMoved(QHeaderView* self, int logicalIndex, int oldVisualIndex, int newVisualIndex) { + self->sectionMoved(static_cast(logicalIndex), static_cast(oldVisualIndex), static_cast(newVisualIndex)); +} + +void QHeaderView_connect_SectionMoved(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionMoved), self, [=](int logicalIndex, int oldVisualIndex, int newVisualIndex) { + int sigval1 = logicalIndex; + int sigval2 = oldVisualIndex; + int sigval3 = newVisualIndex; + miqt_exec_callback_QHeaderView_SectionMoved(slot, sigval1, sigval2, sigval3); + }); +} + +void QHeaderView_SectionResized(QHeaderView* self, int logicalIndex, int oldSize, int newSize) { + self->sectionResized(static_cast(logicalIndex), static_cast(oldSize), static_cast(newSize)); +} + +void QHeaderView_connect_SectionResized(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionResized), self, [=](int logicalIndex, int oldSize, int newSize) { + int sigval1 = logicalIndex; + int sigval2 = oldSize; + int sigval3 = newSize; + miqt_exec_callback_QHeaderView_SectionResized(slot, sigval1, sigval2, sigval3); + }); +} + +void QHeaderView_SectionPressed(QHeaderView* self, int logicalIndex) { + self->sectionPressed(static_cast(logicalIndex)); +} + +void QHeaderView_connect_SectionPressed(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionPressed), self, [=](int logicalIndex) { + int sigval1 = logicalIndex; + miqt_exec_callback_QHeaderView_SectionPressed(slot, sigval1); + }); +} + +void QHeaderView_SectionClicked(QHeaderView* self, int logicalIndex) { + self->sectionClicked(static_cast(logicalIndex)); +} + +void QHeaderView_connect_SectionClicked(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionClicked), self, [=](int logicalIndex) { + int sigval1 = logicalIndex; + miqt_exec_callback_QHeaderView_SectionClicked(slot, sigval1); + }); +} + +void QHeaderView_SectionEntered(QHeaderView* self, int logicalIndex) { + self->sectionEntered(static_cast(logicalIndex)); +} + +void QHeaderView_connect_SectionEntered(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionEntered), self, [=](int logicalIndex) { + int sigval1 = logicalIndex; + miqt_exec_callback_QHeaderView_SectionEntered(slot, sigval1); + }); +} + +void QHeaderView_SectionDoubleClicked(QHeaderView* self, int logicalIndex) { + self->sectionDoubleClicked(static_cast(logicalIndex)); +} + +void QHeaderView_connect_SectionDoubleClicked(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionDoubleClicked), self, [=](int logicalIndex) { + int sigval1 = logicalIndex; + miqt_exec_callback_QHeaderView_SectionDoubleClicked(slot, sigval1); + }); +} + +void QHeaderView_SectionCountChanged(QHeaderView* self, int oldCount, int newCount) { + self->sectionCountChanged(static_cast(oldCount), static_cast(newCount)); +} + +void QHeaderView_connect_SectionCountChanged(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionCountChanged), self, [=](int oldCount, int newCount) { + int sigval1 = oldCount; + int sigval2 = newCount; + miqt_exec_callback_QHeaderView_SectionCountChanged(slot, sigval1, sigval2); + }); +} + +void QHeaderView_SectionHandleDoubleClicked(QHeaderView* self, int logicalIndex) { + self->sectionHandleDoubleClicked(static_cast(logicalIndex)); +} + +void QHeaderView_connect_SectionHandleDoubleClicked(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sectionHandleDoubleClicked), self, [=](int logicalIndex) { + int sigval1 = logicalIndex; + miqt_exec_callback_QHeaderView_SectionHandleDoubleClicked(slot, sigval1); + }); +} + +void QHeaderView_GeometriesChanged(QHeaderView* self) { + self->geometriesChanged(); +} + +void QHeaderView_connect_GeometriesChanged(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::geometriesChanged), self, [=]() { + miqt_exec_callback_QHeaderView_GeometriesChanged(slot); + }); +} + +void QHeaderView_SortIndicatorChanged(QHeaderView* self, int logicalIndex, int order) { + self->sortIndicatorChanged(static_cast(logicalIndex), static_cast(order)); +} + +void QHeaderView_connect_SortIndicatorChanged(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sortIndicatorChanged), self, [=](int logicalIndex, Qt::SortOrder order) { + int sigval1 = logicalIndex; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + miqt_exec_callback_QHeaderView_SortIndicatorChanged(slot, sigval1, sigval2); + }); +} + +void QHeaderView_SortIndicatorClearableChanged(QHeaderView* self, bool clearable) { + self->sortIndicatorClearableChanged(clearable); +} + +void QHeaderView_connect_SortIndicatorClearableChanged(QHeaderView* self, intptr_t slot) { + MiqtVirtualQHeaderView::connect(self, static_cast(&QHeaderView::sortIndicatorClearableChanged), self, [=](bool clearable) { + bool sigval1 = clearable; + miqt_exec_callback_QHeaderView_SortIndicatorClearableChanged(slot, sigval1); + }); +} + +struct miqt_string QHeaderView_Tr2(const char* s, const char* c) { + QString _ret = QHeaderView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QHeaderView_Tr3(const char* s, const char* c, int n) { + QString _ret = QHeaderView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QHeaderView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetModel = slot; +} + +void QHeaderView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetModel(model); +} + +void QHeaderView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SizeHint = slot; +} + +QSize* QHeaderView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SizeHint(); +} + +void QHeaderView_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetVisible = slot; +} + +void QHeaderView_virtualbase_SetVisible(void* self, bool v) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetVisible(v); +} + +void QHeaderView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DoItemsLayout = slot; +} + +void QHeaderView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QHeaderView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__Reset = slot; +} + +void QHeaderView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_Reset(); +} + +void QHeaderView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__CurrentChanged = slot; +} + +void QHeaderView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* old) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_CurrentChanged(current, old); +} + +void QHeaderView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__Event = slot; +} + +bool QHeaderView_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_Event(e); +} + +void QHeaderView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__PaintEvent = slot; +} + +void QHeaderView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_PaintEvent(e); +} + +void QHeaderView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MousePressEvent = slot; +} + +void QHeaderView_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MousePressEvent(e); +} + +void QHeaderView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QHeaderView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QHeaderView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QHeaderView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QHeaderView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QHeaderView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QHeaderView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ViewportEvent = slot; +} + +bool QHeaderView_virtualbase_ViewportEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ViewportEvent(e); +} + +void QHeaderView_override_virtual_PaintSection(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__PaintSection = slot; +} + +void QHeaderView_virtualbase_PaintSection(const void* self, QPainter* painter, QRect* rect, int logicalIndex) { + ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_PaintSection(painter, rect, logicalIndex); +} + +void QHeaderView_override_virtual_SectionSizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SectionSizeFromContents = slot; +} + +QSize* QHeaderView_virtualbase_SectionSizeFromContents(const void* self, int logicalIndex) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SectionSizeFromContents(logicalIndex); +} + +void QHeaderView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__HorizontalOffset = slot; } -QHeaderView* QHeaderView_new2(int orientation, QWidget* parent) { - return new QHeaderView(static_cast(orientation), parent); +int QHeaderView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_HorizontalOffset(); } -QMetaObject* QHeaderView_MetaObject(const QHeaderView* self) { - return (QMetaObject*) self->metaObject(); +void QHeaderView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VerticalOffset = slot; } -void* QHeaderView_Metacast(QHeaderView* self, const char* param1) { - return self->qt_metacast(param1); +int QHeaderView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_VerticalOffset(); } -struct miqt_string QHeaderView_Tr(const char* s) { - QString _ret = QHeaderView::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QHeaderView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__UpdateGeometries = slot; } -void QHeaderView_SetModel(QHeaderView* self, QAbstractItemModel* model) { - self->setModel(model); +void QHeaderView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_UpdateGeometries(); } -int QHeaderView_Orientation(const QHeaderView* self) { - Qt::Orientation _ret = self->orientation(); - return static_cast(_ret); +void QHeaderView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ScrollContentsBy = slot; } -int QHeaderView_Offset(const QHeaderView* self) { - return self->offset(); +void QHeaderView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -int QHeaderView_Length(const QHeaderView* self) { - return self->length(); +void QHeaderView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DataChanged = slot; } -QSize* QHeaderView_SizeHint(const QHeaderView* self) { - return new QSize(self->sizeHint()); +void QHeaderView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); } -void QHeaderView_SetVisible(QHeaderView* self, bool v) { - self->setVisible(v); +void QHeaderView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__RowsInserted = slot; } -int QHeaderView_SectionSizeHint(const QHeaderView* self, int logicalIndex) { - return self->sectionSizeHint(static_cast(logicalIndex)); +void QHeaderView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_RowsInserted(parent, start, end); } -int QHeaderView_VisualIndexAt(const QHeaderView* self, int position) { - return self->visualIndexAt(static_cast(position)); +void QHeaderView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VisualRect = slot; } -int QHeaderView_LogicalIndexAt(const QHeaderView* self, int position) { - return self->logicalIndexAt(static_cast(position)); +QRect* QHeaderView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_VisualRect(index); } -int QHeaderView_LogicalIndexAt2(const QHeaderView* self, int x, int y) { - return self->logicalIndexAt(static_cast(x), static_cast(y)); +void QHeaderView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ScrollTo = slot; } -int QHeaderView_LogicalIndexAtWithPos(const QHeaderView* self, QPoint* pos) { - return self->logicalIndexAt(*pos); +void QHeaderView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ScrollTo(index, hint); } -int QHeaderView_SectionSize(const QHeaderView* self, int logicalIndex) { - return self->sectionSize(static_cast(logicalIndex)); +void QHeaderView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__IndexAt = slot; } -int QHeaderView_SectionPosition(const QHeaderView* self, int logicalIndex) { - return self->sectionPosition(static_cast(logicalIndex)); +QModelIndex* QHeaderView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_IndexAt(p); } -int QHeaderView_SectionViewportPosition(const QHeaderView* self, int logicalIndex) { - return self->sectionViewportPosition(static_cast(logicalIndex)); +void QHeaderView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__IsIndexHidden = slot; } -void QHeaderView_MoveSection(QHeaderView* self, int from, int to) { - self->moveSection(static_cast(from), static_cast(to)); +bool QHeaderView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_IsIndexHidden(index); } -void QHeaderView_SwapSections(QHeaderView* self, int first, int second) { - self->swapSections(static_cast(first), static_cast(second)); +void QHeaderView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__MoveCursor = slot; } -void QHeaderView_ResizeSection(QHeaderView* self, int logicalIndex, int size) { - self->resizeSection(static_cast(logicalIndex), static_cast(size)); +QModelIndex* QHeaderView_virtualbase_MoveCursor(void* self, int param1, int param2) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_MoveCursor(param1, param2); } -void QHeaderView_ResizeSections(QHeaderView* self, int mode) { - self->resizeSections(static_cast(mode)); +void QHeaderView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetSelection = slot; } -bool QHeaderView_IsSectionHidden(const QHeaderView* self, int logicalIndex) { - return self->isSectionHidden(static_cast(logicalIndex)); +void QHeaderView_virtualbase_SetSelection(void* self, QRect* rect, int flags) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetSelection(rect, flags); } -void QHeaderView_SetSectionHidden(QHeaderView* self, int logicalIndex, bool hide) { - self->setSectionHidden(static_cast(logicalIndex), hide); +void QHeaderView_override_virtual_InitStyleOptionForIndex(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InitStyleOptionForIndex = slot; } -int QHeaderView_HiddenSectionCount(const QHeaderView* self) { - return self->hiddenSectionCount(); +void QHeaderView_virtualbase_InitStyleOptionForIndex(const void* self, QStyleOptionHeader* option, int logicalIndex) { + ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_InitStyleOptionForIndex(option, logicalIndex); } -void QHeaderView_HideSection(QHeaderView* self, int logicalIndex) { - self->hideSection(static_cast(logicalIndex)); +void QHeaderView_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InitStyleOption = slot; } -void QHeaderView_ShowSection(QHeaderView* self, int logicalIndex) { - self->showSection(static_cast(logicalIndex)); +void QHeaderView_virtualbase_InitStyleOption(const void* self, QStyleOptionHeader* option) { + ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_InitStyleOption(option); } -int QHeaderView_Count(const QHeaderView* self) { - return self->count(); +void QHeaderView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetSelectionModel = slot; } -int QHeaderView_VisualIndex(const QHeaderView* self, int logicalIndex) { - return self->visualIndex(static_cast(logicalIndex)); +void QHeaderView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetSelectionModel(selectionModel); } -int QHeaderView_LogicalIndex(const QHeaderView* self, int visualIndex) { - return self->logicalIndex(static_cast(visualIndex)); +void QHeaderView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__KeyboardSearch = slot; } -void QHeaderView_SetSectionsMovable(QHeaderView* self, bool movable) { - self->setSectionsMovable(movable); +void QHeaderView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_KeyboardSearch(search); } -bool QHeaderView_SectionsMovable(const QHeaderView* self) { - return self->sectionsMovable(); +void QHeaderView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SizeHintForRow = slot; } -void QHeaderView_SetFirstSectionMovable(QHeaderView* self, bool movable) { - self->setFirstSectionMovable(movable); +int QHeaderView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SizeHintForRow(row); } -bool QHeaderView_IsFirstSectionMovable(const QHeaderView* self) { - return self->isFirstSectionMovable(); +void QHeaderView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SizeHintForColumn = slot; } -void QHeaderView_SetSectionsClickable(QHeaderView* self, bool clickable) { - self->setSectionsClickable(clickable); +int QHeaderView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SizeHintForColumn(column); } -bool QHeaderView_SectionsClickable(const QHeaderView* self) { - return self->sectionsClickable(); +void QHeaderView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ItemDelegateForIndex = slot; } -void QHeaderView_SetHighlightSections(QHeaderView* self, bool highlight) { - self->setHighlightSections(highlight); +QAbstractItemDelegate* QHeaderView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_ItemDelegateForIndex(index); } -bool QHeaderView_HighlightSections(const QHeaderView* self) { - return self->highlightSections(); +void QHeaderView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InputMethodQuery = slot; } -int QHeaderView_SectionResizeMode(const QHeaderView* self, int logicalIndex) { - QHeaderView::ResizeMode _ret = self->sectionResizeMode(static_cast(logicalIndex)); - return static_cast(_ret); +QVariant* QHeaderView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_InputMethodQuery(query); } -void QHeaderView_SetSectionResizeMode(QHeaderView* self, int mode) { - self->setSectionResizeMode(static_cast(mode)); +void QHeaderView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SetRootIndex = slot; } -void QHeaderView_SetSectionResizeMode2(QHeaderView* self, int logicalIndex, int mode) { - self->setSectionResizeMode(static_cast(logicalIndex), static_cast(mode)); +void QHeaderView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetRootIndex(index); } -void QHeaderView_SetResizeContentsPrecision(QHeaderView* self, int precision) { - self->setResizeContentsPrecision(static_cast(precision)); +void QHeaderView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectAll = slot; } -int QHeaderView_ResizeContentsPrecision(const QHeaderView* self) { - return self->resizeContentsPrecision(); +void QHeaderView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectAll(); } -int QHeaderView_StretchSectionCount(const QHeaderView* self) { - return self->stretchSectionCount(); +void QHeaderView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__RowsAboutToBeRemoved = slot; } -void QHeaderView_SetSortIndicatorShown(QHeaderView* self, bool show) { - self->setSortIndicatorShown(show); +void QHeaderView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } -bool QHeaderView_IsSortIndicatorShown(const QHeaderView* self) { - return self->isSortIndicatorShown(); +void QHeaderView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__UpdateEditorData = slot; } -void QHeaderView_SetSortIndicator(QHeaderView* self, int logicalIndex, int order) { - self->setSortIndicator(static_cast(logicalIndex), static_cast(order)); +void QHeaderView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_UpdateEditorData(); } -int QHeaderView_SortIndicatorSection(const QHeaderView* self) { - return self->sortIndicatorSection(); +void QHeaderView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__UpdateEditorGeometries = slot; } -int QHeaderView_SortIndicatorOrder(const QHeaderView* self) { - Qt::SortOrder _ret = self->sortIndicatorOrder(); - return static_cast(_ret); +void QHeaderView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_UpdateEditorGeometries(); } -void QHeaderView_SetSortIndicatorClearable(QHeaderView* self, bool clearable) { - self->setSortIndicatorClearable(clearable); +void QHeaderView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VerticalScrollbarAction = slot; } -bool QHeaderView_IsSortIndicatorClearable(const QHeaderView* self) { - return self->isSortIndicatorClearable(); +void QHeaderView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_VerticalScrollbarAction(action); } -bool QHeaderView_StretchLastSection(const QHeaderView* self) { - return self->stretchLastSection(); +void QHeaderView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__HorizontalScrollbarAction = slot; } -void QHeaderView_SetStretchLastSection(QHeaderView* self, bool stretch) { - self->setStretchLastSection(stretch); +void QHeaderView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_HorizontalScrollbarAction(action); } -bool QHeaderView_CascadingSectionResizes(const QHeaderView* self) { - return self->cascadingSectionResizes(); +void QHeaderView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VerticalScrollbarValueChanged = slot; } -void QHeaderView_SetCascadingSectionResizes(QHeaderView* self, bool enable) { - self->setCascadingSectionResizes(enable); +void QHeaderView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); } -int QHeaderView_DefaultSectionSize(const QHeaderView* self) { - return self->defaultSectionSize(); +void QHeaderView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; } -void QHeaderView_SetDefaultSectionSize(QHeaderView* self, int size) { - self->setDefaultSectionSize(static_cast(size)); +void QHeaderView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); } -void QHeaderView_ResetDefaultSectionSize(QHeaderView* self) { - self->resetDefaultSectionSize(); +void QHeaderView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__CloseEditor = slot; } -int QHeaderView_MinimumSectionSize(const QHeaderView* self) { - return self->minimumSectionSize(); +void QHeaderView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_CloseEditor(editor, hint); } -void QHeaderView_SetMinimumSectionSize(QHeaderView* self, int size) { - self->setMinimumSectionSize(static_cast(size)); +void QHeaderView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__CommitData = slot; } -int QHeaderView_MaximumSectionSize(const QHeaderView* self) { - return self->maximumSectionSize(); +void QHeaderView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_CommitData(editor); } -void QHeaderView_SetMaximumSectionSize(QHeaderView* self, int size) { - self->setMaximumSectionSize(static_cast(size)); +void QHeaderView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__EditorDestroyed = slot; } -int QHeaderView_DefaultAlignment(const QHeaderView* self) { - Qt::Alignment _ret = self->defaultAlignment(); - return static_cast(_ret); +void QHeaderView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_EditorDestroyed(editor); } -void QHeaderView_SetDefaultAlignment(QHeaderView* self, int alignment) { - self->setDefaultAlignment(static_cast(alignment)); +void QHeaderView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectedIndexes = slot; } -void QHeaderView_DoItemsLayout(QHeaderView* self) { - self->doItemsLayout(); +struct miqt_array /* of QModelIndex* */ QHeaderView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectedIndexes(); } -bool QHeaderView_SectionsMoved(const QHeaderView* self) { - return self->sectionsMoved(); +void QHeaderView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__Edit2 = slot; } -bool QHeaderView_SectionsHidden(const QHeaderView* self) { - return self->sectionsHidden(); +bool QHeaderView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_Edit2(index, trigger, event); } -struct miqt_string QHeaderView_SaveState(const QHeaderView* self) { - QByteArray _qb = self->saveState(); - struct miqt_string _ms; - _ms.len = _qb.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _qb.data(), _ms.len); - return _ms; +void QHeaderView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectionCommand = slot; } -bool QHeaderView_RestoreState(QHeaderView* self, struct miqt_string state) { - QByteArray state_QByteArray(state.data, state.len); - return self->restoreState(state_QByteArray); +int QHeaderView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectionCommand(index, event); } -void QHeaderView_Reset(QHeaderView* self) { - self->reset(); +void QHeaderView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__StartDrag = slot; } -void QHeaderView_SetOffset(QHeaderView* self, int offset) { - self->setOffset(static_cast(offset)); +void QHeaderView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_StartDrag(supportedActions); } -void QHeaderView_SetOffsetToSectionPosition(QHeaderView* self, int visualIndex) { - self->setOffsetToSectionPosition(static_cast(visualIndex)); +void QHeaderView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InitViewItemOption = slot; } -void QHeaderView_SetOffsetToLastSection(QHeaderView* self) { - self->setOffsetToLastSection(); +void QHeaderView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_InitViewItemOption(option); } -void QHeaderView_HeaderDataChanged(QHeaderView* self, int orientation, int logicalFirst, int logicalLast) { - self->headerDataChanged(static_cast(orientation), static_cast(logicalFirst), static_cast(logicalLast)); +void QHeaderView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__FocusNextPrevChild = slot; } -void QHeaderView_SectionMoved(QHeaderView* self, int logicalIndex, int oldVisualIndex, int newVisualIndex) { - self->sectionMoved(static_cast(logicalIndex), static_cast(oldVisualIndex), static_cast(newVisualIndex)); +bool QHeaderView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_FocusNextPrevChild(next); } -void QHeaderView_connect_SectionMoved(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionMoved), self, [=](int logicalIndex, int oldVisualIndex, int newVisualIndex) { - int sigval1 = logicalIndex; - int sigval2 = oldVisualIndex; - int sigval3 = newVisualIndex; - miqt_exec_callback_QHeaderView_SectionMoved(slot, sigval1, sigval2, sigval3); - }); +void QHeaderView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DragEnterEvent = slot; } -void QHeaderView_SectionResized(QHeaderView* self, int logicalIndex, int oldSize, int newSize) { - self->sectionResized(static_cast(logicalIndex), static_cast(oldSize), static_cast(newSize)); +void QHeaderView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DragEnterEvent(event); } -void QHeaderView_connect_SectionResized(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionResized), self, [=](int logicalIndex, int oldSize, int newSize) { - int sigval1 = logicalIndex; - int sigval2 = oldSize; - int sigval3 = newSize; - miqt_exec_callback_QHeaderView_SectionResized(slot, sigval1, sigval2, sigval3); - }); +void QHeaderView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DragMoveEvent = slot; } -void QHeaderView_SectionPressed(QHeaderView* self, int logicalIndex) { - self->sectionPressed(static_cast(logicalIndex)); +void QHeaderView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DragMoveEvent(event); } -void QHeaderView_connect_SectionPressed(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionPressed), self, [=](int logicalIndex) { - int sigval1 = logicalIndex; - miqt_exec_callback_QHeaderView_SectionPressed(slot, sigval1); - }); +void QHeaderView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DragLeaveEvent = slot; } -void QHeaderView_SectionClicked(QHeaderView* self, int logicalIndex) { - self->sectionClicked(static_cast(logicalIndex)); +void QHeaderView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DragLeaveEvent(event); } -void QHeaderView_connect_SectionClicked(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionClicked), self, [=](int logicalIndex) { - int sigval1 = logicalIndex; - miqt_exec_callback_QHeaderView_SectionClicked(slot, sigval1); - }); +void QHeaderView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__DropEvent = slot; } -void QHeaderView_SectionEntered(QHeaderView* self, int logicalIndex) { - self->sectionEntered(static_cast(logicalIndex)); +void QHeaderView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_DropEvent(event); } -void QHeaderView_connect_SectionEntered(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionEntered), self, [=](int logicalIndex) { - int sigval1 = logicalIndex; - miqt_exec_callback_QHeaderView_SectionEntered(slot, sigval1); - }); +void QHeaderView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__FocusInEvent = slot; } -void QHeaderView_SectionDoubleClicked(QHeaderView* self, int logicalIndex) { - self->sectionDoubleClicked(static_cast(logicalIndex)); +void QHeaderView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_FocusInEvent(event); } -void QHeaderView_connect_SectionDoubleClicked(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionDoubleClicked), self, [=](int logicalIndex) { - int sigval1 = logicalIndex; - miqt_exec_callback_QHeaderView_SectionDoubleClicked(slot, sigval1); - }); +void QHeaderView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__FocusOutEvent = slot; } -void QHeaderView_SectionCountChanged(QHeaderView* self, int oldCount, int newCount) { - self->sectionCountChanged(static_cast(oldCount), static_cast(newCount)); +void QHeaderView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_FocusOutEvent(event); } -void QHeaderView_connect_SectionCountChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionCountChanged), self, [=](int oldCount, int newCount) { - int sigval1 = oldCount; - int sigval2 = newCount; - miqt_exec_callback_QHeaderView_SectionCountChanged(slot, sigval1, sigval2); - }); +void QHeaderView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__KeyPressEvent = slot; } -void QHeaderView_SectionHandleDoubleClicked(QHeaderView* self, int logicalIndex) { - self->sectionHandleDoubleClicked(static_cast(logicalIndex)); +void QHeaderView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_KeyPressEvent(event); } -void QHeaderView_connect_SectionHandleDoubleClicked(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sectionHandleDoubleClicked), self, [=](int logicalIndex) { - int sigval1 = logicalIndex; - miqt_exec_callback_QHeaderView_SectionHandleDoubleClicked(slot, sigval1); - }); +void QHeaderView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ResizeEvent = slot; } -void QHeaderView_GeometriesChanged(QHeaderView* self) { - self->geometriesChanged(); +void QHeaderView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_ResizeEvent(event); } -void QHeaderView_connect_GeometriesChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::geometriesChanged), self, [=]() { - miqt_exec_callback_QHeaderView_GeometriesChanged(slot); - }); +void QHeaderView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__TimerEvent = slot; } -void QHeaderView_SortIndicatorChanged(QHeaderView* self, int logicalIndex, int order) { - self->sortIndicatorChanged(static_cast(logicalIndex), static_cast(order)); +void QHeaderView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_TimerEvent(event); } -void QHeaderView_connect_SortIndicatorChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sortIndicatorChanged), self, [=](int logicalIndex, Qt::SortOrder order) { - int sigval1 = logicalIndex; - Qt::SortOrder order_ret = order; - int sigval2 = static_cast(order_ret); - miqt_exec_callback_QHeaderView_SortIndicatorChanged(slot, sigval1, sigval2); - }); +void QHeaderView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__InputMethodEvent = slot; } -void QHeaderView_SortIndicatorClearableChanged(QHeaderView* self, bool clearable) { - self->sortIndicatorClearableChanged(clearable); +void QHeaderView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_InputMethodEvent(event); } -void QHeaderView_connect_SortIndicatorClearableChanged(QHeaderView* self, intptr_t slot) { - QHeaderView::connect(self, static_cast(&QHeaderView::sortIndicatorClearableChanged), self, [=](bool clearable) { - bool sigval1 = clearable; - miqt_exec_callback_QHeaderView_SortIndicatorClearableChanged(slot, sigval1); - }); +void QHeaderView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__EventFilter = slot; } -struct miqt_string QHeaderView_Tr2(const char* s, const char* c) { - QString _ret = QHeaderView::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QHeaderView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_EventFilter(object, event); } -struct miqt_string QHeaderView_Tr3(const char* s, const char* c, int n) { - QString _ret = QHeaderView::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QHeaderView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QHeaderView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_ViewportSizeHint(); } -void QHeaderView_Delete(QHeaderView* self) { - delete self; +void QHeaderView_Delete(QHeaderView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qheaderview.go b/qt6/gen_qheaderview.go index 26f8a116..ccbb2f20 100644 --- a/qt6/gen_qheaderview.go +++ b/qt6/gen_qheaderview.go @@ -25,7 +25,8 @@ const ( ) type QHeaderView struct { - h *C.QHeaderView + h *C.QHeaderView + isSubclass bool *QAbstractItemView } @@ -43,27 +44,55 @@ func (this *QHeaderView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHeaderView(h *C.QHeaderView) *QHeaderView { +// newQHeaderView constructs the type using only CGO pointers. +func newQHeaderView(h *C.QHeaderView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QHeaderView { if h == nil { return nil } - return &QHeaderView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QHeaderView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQHeaderView(h unsafe.Pointer) *QHeaderView { - return newQHeaderView((*C.QHeaderView)(h)) +// UnsafeNewQHeaderView constructs the type using only unsafe pointers. +func UnsafeNewQHeaderView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QHeaderView { + if h == nil { + return nil + } + + return &QHeaderView{h: (*C.QHeaderView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQHeaderView constructs a new QHeaderView object. func NewQHeaderView(orientation Orientation) *QHeaderView { - ret := C.QHeaderView_new((C.int)(orientation)) - return newQHeaderView(ret) + var outptr_QHeaderView *C.QHeaderView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QHeaderView_new((C.int)(orientation), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQHeaderView2 constructs a new QHeaderView object. func NewQHeaderView2(orientation Orientation, parent *QWidget) *QHeaderView { - ret := C.QHeaderView_new2((C.int)(orientation), parent.cPointer()) - return newQHeaderView(ret) + var outptr_QHeaderView *C.QHeaderView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QHeaderView_new2((C.int)(orientation), parent.cPointer(), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QHeaderView) MetaObject() *QMetaObject { @@ -625,9 +654,1589 @@ func QHeaderView_Tr3(s string, c string, n int) string { return _ret } +func (this *QHeaderView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QHeaderView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QHeaderView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QHeaderView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetModel +func miqt_exec_callback_QHeaderView_SetModel(self *C.QHeaderView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QHeaderView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QHeaderView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SizeHint +func miqt_exec_callback_QHeaderView_SizeHint(self *C.QHeaderView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_SetVisible(v bool) { + + C.QHeaderView_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(v)) + +} +func (this *QHeaderView) OnSetVisible(slot func(super func(v bool), v bool)) { + C.QHeaderView_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetVisible +func miqt_exec_callback_QHeaderView_SetVisible(self *C.QHeaderView, cb C.intptr_t, v C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(v bool), v bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(v) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DoItemsLayout() { + + C.QHeaderView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnDoItemsLayout(slot func(super func())) { + C.QHeaderView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DoItemsLayout +func miqt_exec_callback_QHeaderView_DoItemsLayout(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QHeaderView) callVirtualBase_Reset() { + + C.QHeaderView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnReset(slot func(super func())) { + C.QHeaderView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_Reset +func miqt_exec_callback_QHeaderView_Reset(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_Reset) + +} + +func (this *QHeaderView) callVirtualBase_CurrentChanged(current *QModelIndex, old *QModelIndex) { + + C.QHeaderView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), old.cPointer()) + +} +func (this *QHeaderView) OnCurrentChanged(slot func(super func(current *QModelIndex, old *QModelIndex), current *QModelIndex, old *QModelIndex)) { + C.QHeaderView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_CurrentChanged +func miqt_exec_callback_QHeaderView_CurrentChanged(self *C.QHeaderView, cb C.intptr_t, current *C.QModelIndex, old *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, old *QModelIndex), current *QModelIndex, old *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(old)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QHeaderView) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QHeaderView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_Event +func miqt_exec_callback_QHeaderView_Event(self *C.QHeaderView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QHeaderView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QHeaderView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_PaintEvent +func miqt_exec_callback_QHeaderView_PaintEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MousePressEvent +func miqt_exec_callback_QHeaderView_MousePressEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MouseMoveEvent +func miqt_exec_callback_QHeaderView_MouseMoveEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MouseReleaseEvent +func miqt_exec_callback_QHeaderView_MouseReleaseEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QHeaderView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QHeaderView) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QHeaderView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MouseDoubleClickEvent +func miqt_exec_callback_QHeaderView_MouseDoubleClickEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_ViewportEvent(e *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QHeaderView) OnViewportEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QHeaderView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ViewportEvent +func miqt_exec_callback_QHeaderView_ViewportEvent(self *C.QHeaderView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_PaintSection(painter *QPainter, rect *QRect, logicalIndex int) { + + C.QHeaderView_virtualbase_PaintSection(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(logicalIndex)) + +} +func (this *QHeaderView) OnPaintSection(slot func(super func(painter *QPainter, rect *QRect, logicalIndex int), painter *QPainter, rect *QRect, logicalIndex int)) { + C.QHeaderView_override_virtual_PaintSection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_PaintSection +func miqt_exec_callback_QHeaderView_PaintSection(self *C.QHeaderView, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, logicalIndex C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, logicalIndex int), painter *QPainter, rect *QRect, logicalIndex int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(logicalIndex) + + gofunc((&QHeaderView{h: self}).callVirtualBase_PaintSection, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_SectionSizeFromContents(logicalIndex int) *QSize { + + _ret := C.QHeaderView_virtualbase_SectionSizeFromContents(unsafe.Pointer(this.h), (C.int)(logicalIndex)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnSectionSizeFromContents(slot func(super func(logicalIndex int) *QSize, logicalIndex int) *QSize) { + C.QHeaderView_override_virtual_SectionSizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SectionSizeFromContents +func miqt_exec_callback_QHeaderView_SectionSizeFromContents(self *C.QHeaderView, cb C.intptr_t, logicalIndex C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(logicalIndex int) *QSize, logicalIndex int) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(logicalIndex) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SectionSizeFromContents, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QHeaderView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QHeaderView) OnHorizontalOffset(slot func(super func() int) int) { + C.QHeaderView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_HorizontalOffset +func miqt_exec_callback_QHeaderView_HorizontalOffset(self *C.QHeaderView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QHeaderView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QHeaderView) OnVerticalOffset(slot func(super func() int) int) { + C.QHeaderView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VerticalOffset +func miqt_exec_callback_QHeaderView_VerticalOffset(self *C.QHeaderView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_UpdateGeometries() { + + C.QHeaderView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnUpdateGeometries(slot func(super func())) { + C.QHeaderView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_UpdateGeometries +func miqt_exec_callback_QHeaderView_UpdateGeometries(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QHeaderView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QHeaderView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QHeaderView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QHeaderView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ScrollContentsBy +func miqt_exec_callback_QHeaderView_ScrollContentsBy(self *C.QHeaderView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QHeaderView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QHeaderView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QHeaderView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QHeaderView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DataChanged +func miqt_exec_callback_QHeaderView_DataChanged(self *C.QHeaderView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QHeaderView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QHeaderView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QHeaderView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QHeaderView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_RowsInserted +func miqt_exec_callback_QHeaderView_RowsInserted(self *C.QHeaderView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QHeaderView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QHeaderView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QHeaderView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VisualRect +func miqt_exec_callback_QHeaderView_VisualRect(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QHeaderView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QHeaderView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QHeaderView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ScrollTo +func miqt_exec_callback_QHeaderView_ScrollTo(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QHeaderView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QHeaderView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QHeaderView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_IndexAt +func miqt_exec_callback_QHeaderView_IndexAt(self *C.QHeaderView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QHeaderView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QHeaderView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QHeaderView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_IsIndexHidden +func miqt_exec_callback_QHeaderView_IsIndexHidden(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_MoveCursor(param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex { + + _ret := C.QHeaderView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(param1), (C.int)(param2)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnMoveCursor(slot func(super func(param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex, param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex) { + C.QHeaderView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_MoveCursor +func miqt_exec_callback_QHeaderView_MoveCursor(self *C.QHeaderView, cb C.intptr_t, param1 C.int, param2 C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex, param1 QAbstractItemView__CursorAction, param2 KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(param1) + + slotval2 := (KeyboardModifier)(param2) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_SetSelection(rect *QRect, flags QItemSelectionModel__SelectionFlag) { + + C.QHeaderView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(flags)) + +} +func (this *QHeaderView) OnSetSelection(slot func(super func(rect *QRect, flags QItemSelectionModel__SelectionFlag), rect *QRect, flags QItemSelectionModel__SelectionFlag)) { + C.QHeaderView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetSelection +func miqt_exec_callback_QHeaderView_SetSelection(self *C.QHeaderView, cb C.intptr_t, rect *C.QRect, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, flags QItemSelectionModel__SelectionFlag), rect *QRect, flags QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(flags) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_InitStyleOptionForIndex(option *QStyleOptionHeader, logicalIndex int) { + + C.QHeaderView_virtualbase_InitStyleOptionForIndex(unsafe.Pointer(this.h), option.cPointer(), (C.int)(logicalIndex)) + +} +func (this *QHeaderView) OnInitStyleOptionForIndex(slot func(super func(option *QStyleOptionHeader, logicalIndex int), option *QStyleOptionHeader, logicalIndex int)) { + C.QHeaderView_override_virtual_InitStyleOptionForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InitStyleOptionForIndex +func miqt_exec_callback_QHeaderView_InitStyleOptionForIndex(self *C.QHeaderView, cb C.intptr_t, option *C.QStyleOptionHeader, logicalIndex C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionHeader, logicalIndex int), option *QStyleOptionHeader, logicalIndex int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionHeader(unsafe.Pointer(option), nil) + slotval2 := (int)(logicalIndex) + + gofunc((&QHeaderView{h: self}).callVirtualBase_InitStyleOptionForIndex, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_InitStyleOption(option *QStyleOptionHeader) { + + C.QHeaderView_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QHeaderView) OnInitStyleOption(slot func(super func(option *QStyleOptionHeader), option *QStyleOptionHeader)) { + C.QHeaderView_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InitStyleOption +func miqt_exec_callback_QHeaderView_InitStyleOption(self *C.QHeaderView, cb C.intptr_t, option *C.QStyleOptionHeader) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionHeader), option *QStyleOptionHeader)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionHeader(unsafe.Pointer(option), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QHeaderView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QHeaderView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QHeaderView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetSelectionModel +func miqt_exec_callback_QHeaderView_SetSelectionModel(self *C.QHeaderView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QHeaderView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QHeaderView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QHeaderView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_KeyboardSearch +func miqt_exec_callback_QHeaderView_KeyboardSearch(self *C.QHeaderView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QHeaderView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QHeaderView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QHeaderView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QHeaderView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SizeHintForRow +func miqt_exec_callback_QHeaderView_SizeHintForRow(self *C.QHeaderView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QHeaderView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QHeaderView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QHeaderView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SizeHintForColumn +func miqt_exec_callback_QHeaderView_SizeHintForColumn(self *C.QHeaderView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { + + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QHeaderView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())), nil) +} +func (this *QHeaderView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { + C.QHeaderView_override_virtual_ItemDelegateForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ItemDelegateForIndex +func miqt_exec_callback_QHeaderView_ItemDelegateForIndex(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) *C.QAbstractItemDelegate { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_ItemDelegateForIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QHeaderView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QHeaderView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InputMethodQuery +func miqt_exec_callback_QHeaderView_InputMethodQuery(self *C.QHeaderView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QHeaderView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QHeaderView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QHeaderView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QHeaderView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SetRootIndex +func miqt_exec_callback_QHeaderView_SetRootIndex(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SelectAll() { + + C.QHeaderView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnSelectAll(slot func(super func())) { + C.QHeaderView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectAll +func miqt_exec_callback_QHeaderView_SelectAll(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QHeaderView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QHeaderView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QHeaderView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QHeaderView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved +func miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved(self *C.QHeaderView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QHeaderView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QHeaderView) callVirtualBase_UpdateEditorData() { + + C.QHeaderView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnUpdateEditorData(slot func(super func())) { + C.QHeaderView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_UpdateEditorData +func miqt_exec_callback_QHeaderView_UpdateEditorData(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QHeaderView) callVirtualBase_UpdateEditorGeometries() { + + C.QHeaderView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QHeaderView) OnUpdateEditorGeometries(slot func(super func())) { + C.QHeaderView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_UpdateEditorGeometries +func miqt_exec_callback_QHeaderView_UpdateEditorGeometries(self *C.QHeaderView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QHeaderView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QHeaderView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QHeaderView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QHeaderView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QHeaderView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VerticalScrollbarAction +func miqt_exec_callback_QHeaderView_VerticalScrollbarAction(self *C.QHeaderView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QHeaderView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QHeaderView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QHeaderView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QHeaderView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_HorizontalScrollbarAction +func miqt_exec_callback_QHeaderView_HorizontalScrollbarAction(self *C.QHeaderView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QHeaderView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QHeaderView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QHeaderView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QHeaderView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VerticalScrollbarValueChanged +func miqt_exec_callback_QHeaderView_VerticalScrollbarValueChanged(self *C.QHeaderView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QHeaderView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QHeaderView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QHeaderView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QHeaderView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QHeaderView_HorizontalScrollbarValueChanged(self *C.QHeaderView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QHeaderView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QHeaderView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QHeaderView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QHeaderView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_CloseEditor +func miqt_exec_callback_QHeaderView_CloseEditor(self *C.QHeaderView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QHeaderView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QHeaderView) callVirtualBase_CommitData(editor *QWidget) { + + C.QHeaderView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QHeaderView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QHeaderView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_CommitData +func miqt_exec_callback_QHeaderView_CommitData(self *C.QHeaderView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QHeaderView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QHeaderView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QHeaderView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_EditorDestroyed +func miqt_exec_callback_QHeaderView_EditorDestroyed(self *C.QHeaderView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QHeaderView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QHeaderView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QHeaderView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectedIndexes +func miqt_exec_callback_QHeaderView_SelectedIndexes(self *C.QHeaderView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QHeaderView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QHeaderView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QHeaderView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_Edit2 +func miqt_exec_callback_QHeaderView_Edit2(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QHeaderView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QHeaderView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QHeaderView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectionCommand +func miqt_exec_callback_QHeaderView_SelectionCommand(self *C.QHeaderView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QHeaderView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QHeaderView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QHeaderView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_StartDrag +func miqt_exec_callback_QHeaderView_StartDrag(self *C.QHeaderView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QHeaderView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QHeaderView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QHeaderView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QHeaderView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InitViewItemOption +func miqt_exec_callback_QHeaderView_InitViewItemOption(self *C.QHeaderView, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QHeaderView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QHeaderView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QHeaderView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_FocusNextPrevChild +func miqt_exec_callback_QHeaderView_FocusNextPrevChild(self *C.QHeaderView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QHeaderView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QHeaderView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DragEnterEvent +func miqt_exec_callback_QHeaderView_DragEnterEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QHeaderView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QHeaderView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DragMoveEvent +func miqt_exec_callback_QHeaderView_DragMoveEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QHeaderView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QHeaderView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DragLeaveEvent +func miqt_exec_callback_QHeaderView_DragLeaveEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QHeaderView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QHeaderView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_DropEvent +func miqt_exec_callback_QHeaderView_DropEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QHeaderView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QHeaderView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_FocusInEvent +func miqt_exec_callback_QHeaderView_FocusInEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QHeaderView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QHeaderView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_FocusOutEvent +func miqt_exec_callback_QHeaderView_FocusOutEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QHeaderView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QHeaderView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_KeyPressEvent +func miqt_exec_callback_QHeaderView_KeyPressEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QHeaderView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QHeaderView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ResizeEvent +func miqt_exec_callback_QHeaderView_ResizeEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QHeaderView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QHeaderView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_TimerEvent +func miqt_exec_callback_QHeaderView_TimerEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QHeaderView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QHeaderView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QHeaderView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_InputMethodEvent +func miqt_exec_callback_QHeaderView_InputMethodEvent(self *C.QHeaderView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QHeaderView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QHeaderView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QHeaderView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QHeaderView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QHeaderView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_EventFilter +func miqt_exec_callback_QHeaderView_EventFilter(self *C.QHeaderView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QHeaderView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QHeaderView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QHeaderView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_ViewportSizeHint +func miqt_exec_callback_QHeaderView_ViewportSizeHint(self *C.QHeaderView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QHeaderView) Delete() { - C.QHeaderView_Delete(this.h) + C.QHeaderView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qheaderview.h b/qt6/gen_qheaderview.h index 1cbb729e..4174931e 100644 --- a/qt6/gen_qheaderview.h +++ b/qt6/gen_qheaderview.h @@ -15,25 +15,75 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; class QByteArray; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QHeaderView; +class QInputMethodEvent; +class QItemSelectionModel; +class QKeyEvent; class QMetaObject; +class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPainter; class QPoint; +class QRect; +class QResizeEvent; class QSize; +class QStyleOptionHeader; +class QStyleOptionViewItem; +class QTimerEvent; +class QVariant; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QByteArray QByteArray; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionHeader QStyleOptionHeader; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QHeaderView* QHeaderView_new(int orientation); -QHeaderView* QHeaderView_new2(int orientation, QWidget* parent); +void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QHeaderView_MetaObject(const QHeaderView* self); void* QHeaderView_Metacast(QHeaderView* self, const char* param1); struct miqt_string QHeaderView_Tr(const char* s); @@ -129,9 +179,163 @@ void QHeaderView_SortIndicatorChanged(QHeaderView* self, int logicalIndex, int o void QHeaderView_connect_SortIndicatorChanged(QHeaderView* self, intptr_t slot); void QHeaderView_SortIndicatorClearableChanged(QHeaderView* self, bool clearable); void QHeaderView_connect_SortIndicatorClearableChanged(QHeaderView* self, intptr_t slot); +void QHeaderView_CurrentChanged(QHeaderView* self, QModelIndex* current, QModelIndex* old); +bool QHeaderView_Event(QHeaderView* self, QEvent* e); +void QHeaderView_PaintEvent(QHeaderView* self, QPaintEvent* e); +void QHeaderView_MousePressEvent(QHeaderView* self, QMouseEvent* e); +void QHeaderView_MouseMoveEvent(QHeaderView* self, QMouseEvent* e); +void QHeaderView_MouseReleaseEvent(QHeaderView* self, QMouseEvent* e); +void QHeaderView_MouseDoubleClickEvent(QHeaderView* self, QMouseEvent* e); +bool QHeaderView_ViewportEvent(QHeaderView* self, QEvent* e); +void QHeaderView_PaintSection(const QHeaderView* self, QPainter* painter, QRect* rect, int logicalIndex); +QSize* QHeaderView_SectionSizeFromContents(const QHeaderView* self, int logicalIndex); +int QHeaderView_HorizontalOffset(const QHeaderView* self); +int QHeaderView_VerticalOffset(const QHeaderView* self); +void QHeaderView_UpdateGeometries(QHeaderView* self); +void QHeaderView_ScrollContentsBy(QHeaderView* self, int dx, int dy); +void QHeaderView_DataChanged(QHeaderView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QHeaderView_RowsInserted(QHeaderView* self, QModelIndex* parent, int start, int end); +QRect* QHeaderView_VisualRect(const QHeaderView* self, QModelIndex* index); +void QHeaderView_ScrollTo(QHeaderView* self, QModelIndex* index, int hint); +QModelIndex* QHeaderView_IndexAt(const QHeaderView* self, QPoint* p); +bool QHeaderView_IsIndexHidden(const QHeaderView* self, QModelIndex* index); +QModelIndex* QHeaderView_MoveCursor(QHeaderView* self, int param1, int param2); +void QHeaderView_SetSelection(QHeaderView* self, QRect* rect, int flags); +void QHeaderView_InitStyleOptionForIndex(const QHeaderView* self, QStyleOptionHeader* option, int logicalIndex); +void QHeaderView_InitStyleOption(const QHeaderView* self, QStyleOptionHeader* option); struct miqt_string QHeaderView_Tr2(const char* s, const char* c); struct miqt_string QHeaderView_Tr3(const char* s, const char* c, int n); -void QHeaderView_Delete(QHeaderView* self); +void QHeaderView_override_virtual_SetModel(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QHeaderView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QHeaderView_virtualbase_SizeHint(const void* self); +void QHeaderView_override_virtual_SetVisible(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetVisible(void* self, bool v); +void QHeaderView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QHeaderView_virtualbase_DoItemsLayout(void* self); +void QHeaderView_override_virtual_Reset(void* self, intptr_t slot); +void QHeaderView_virtualbase_Reset(void* self); +void QHeaderView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* old); +void QHeaderView_override_virtual_Event(void* self, intptr_t slot); +bool QHeaderView_virtualbase_Event(void* self, QEvent* e); +void QHeaderView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QHeaderView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QHeaderView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QHeaderView_virtualbase_ViewportEvent(void* self, QEvent* e); +void QHeaderView_override_virtual_PaintSection(void* self, intptr_t slot); +void QHeaderView_virtualbase_PaintSection(const void* self, QPainter* painter, QRect* rect, int logicalIndex); +void QHeaderView_override_virtual_SectionSizeFromContents(void* self, intptr_t slot); +QSize* QHeaderView_virtualbase_SectionSizeFromContents(const void* self, int logicalIndex); +void QHeaderView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QHeaderView_virtualbase_HorizontalOffset(const void* self); +void QHeaderView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QHeaderView_virtualbase_VerticalOffset(const void* self); +void QHeaderView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QHeaderView_virtualbase_UpdateGeometries(void* self); +void QHeaderView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QHeaderView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QHeaderView_override_virtual_DataChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QHeaderView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QHeaderView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QHeaderView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QHeaderView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QHeaderView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QHeaderView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QHeaderView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QHeaderView_virtualbase_IndexAt(const void* self, QPoint* p); +void QHeaderView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QHeaderView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QHeaderView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QHeaderView_virtualbase_MoveCursor(void* self, int param1, int param2); +void QHeaderView_override_virtual_SetSelection(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetSelection(void* self, QRect* rect, int flags); +void QHeaderView_override_virtual_InitStyleOptionForIndex(void* self, intptr_t slot); +void QHeaderView_virtualbase_InitStyleOptionForIndex(const void* self, QStyleOptionHeader* option, int logicalIndex); +void QHeaderView_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QHeaderView_virtualbase_InitStyleOption(const void* self, QStyleOptionHeader* option); +void QHeaderView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QHeaderView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QHeaderView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QHeaderView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QHeaderView_virtualbase_SizeHintForRow(const void* self, int row); +void QHeaderView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QHeaderView_virtualbase_SizeHintForColumn(const void* self, int column); +void QHeaderView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot); +QAbstractItemDelegate* QHeaderView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index); +void QHeaderView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QHeaderView_virtualbase_InputMethodQuery(const void* self, int query); +void QHeaderView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QHeaderView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QHeaderView_override_virtual_SelectAll(void* self, intptr_t slot); +void QHeaderView_virtualbase_SelectAll(void* self); +void QHeaderView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QHeaderView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QHeaderView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QHeaderView_virtualbase_UpdateEditorData(void* self); +void QHeaderView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QHeaderView_virtualbase_UpdateEditorGeometries(void* self); +void QHeaderView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QHeaderView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QHeaderView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QHeaderView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QHeaderView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QHeaderView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QHeaderView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QHeaderView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QHeaderView_override_virtual_CommitData(void* self, intptr_t slot); +void QHeaderView_virtualbase_CommitData(void* self, QWidget* editor); +void QHeaderView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QHeaderView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QHeaderView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QHeaderView_virtualbase_SelectedIndexes(const void* self); +void QHeaderView_override_virtual_Edit2(void* self, intptr_t slot); +bool QHeaderView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QHeaderView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QHeaderView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QHeaderView_override_virtual_StartDrag(void* self, intptr_t slot); +void QHeaderView_virtualbase_StartDrag(void* self, int supportedActions); +void QHeaderView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QHeaderView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QHeaderView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QHeaderView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QHeaderView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QHeaderView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QHeaderView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QHeaderView_override_virtual_DropEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QHeaderView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QHeaderView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QHeaderView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QHeaderView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QHeaderView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QHeaderView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QHeaderView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QHeaderView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QHeaderView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QHeaderView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QHeaderView_virtualbase_ViewportSizeHint(const void* self); +void QHeaderView_Delete(QHeaderView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qicon.cpp b/qt6/gen_qicon.cpp index 1fc85a3c..841f9c8e 100644 --- a/qt6/gen_qicon.cpp +++ b/qt6/gen_qicon.cpp @@ -13,25 +13,30 @@ #include "gen_qicon.h" #include "_cgo_export.h" -QIcon* QIcon_new() { - return new QIcon(); +void QIcon_new(QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(); + *outptr_QIcon = ret; } -QIcon* QIcon_new2(QPixmap* pixmap) { - return new QIcon(*pixmap); +void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(*pixmap); + *outptr_QIcon = ret; } -QIcon* QIcon_new3(QIcon* other) { - return new QIcon(*other); +void QIcon_new3(QIcon* other, QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(*other); + *outptr_QIcon = ret; } -QIcon* QIcon_new4(struct miqt_string fileName) { +void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QIcon(fileName_QString); + QIcon* ret = new QIcon(fileName_QString); + *outptr_QIcon = ret; } -QIcon* QIcon_new5(QIconEngine* engine) { - return new QIcon(engine); +void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon) { + QIcon* ret = new QIcon(engine); + *outptr_QIcon = ret; } void QIcon_OperatorAssign(QIcon* self, QIcon* other) { @@ -374,7 +379,11 @@ struct miqt_array /* of QSize* */ QIcon_AvailableSizes2(const QIcon* self, int return _out; } -void QIcon_Delete(QIcon* self) { - delete self; +void QIcon_Delete(QIcon* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qicon.go b/qt6/gen_qicon.go index 23d3bb8a..8f33ec2f 100644 --- a/qt6/gen_qicon.go +++ b/qt6/gen_qicon.go @@ -30,7 +30,8 @@ const ( ) type QIcon struct { - h *C.QIcon + h *C.QIcon + isSubclass bool } func (this *QIcon) cPointer() *C.QIcon { @@ -47,6 +48,7 @@ func (this *QIcon) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIcon constructs the type using only CGO pointers. func newQIcon(h *C.QIcon) *QIcon { if h == nil { return nil @@ -54,26 +56,43 @@ func newQIcon(h *C.QIcon) *QIcon { return &QIcon{h: h} } +// UnsafeNewQIcon constructs the type using only unsafe pointers. func UnsafeNewQIcon(h unsafe.Pointer) *QIcon { - return newQIcon((*C.QIcon)(h)) + if h == nil { + return nil + } + + return &QIcon{h: (*C.QIcon)(h)} } // NewQIcon constructs a new QIcon object. func NewQIcon() *QIcon { - ret := C.QIcon_new() - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new(&outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon2 constructs a new QIcon object. func NewQIcon2(pixmap *QPixmap) *QIcon { - ret := C.QIcon_new2(pixmap.cPointer()) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new2(pixmap.cPointer(), &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon3 constructs a new QIcon object. func NewQIcon3(other *QIcon) *QIcon { - ret := C.QIcon_new3(other.cPointer()) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new3(other.cPointer(), &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon4 constructs a new QIcon object. @@ -82,14 +101,22 @@ func NewQIcon4(fileName string) *QIcon { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QIcon_new4(fileName_ms) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new4(fileName_ms, &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } // NewQIcon5 constructs a new QIcon object. func NewQIcon5(engine *QIconEngine) *QIcon { - ret := C.QIcon_new5(engine.cPointer()) - return newQIcon(ret) + var outptr_QIcon *C.QIcon = nil + + C.QIcon_new5(engine.cPointer(), &outptr_QIcon) + ret := newQIcon(outptr_QIcon) + ret.isSubclass = true + return ret } func (this *QIcon) OperatorAssign(other *QIcon) { @@ -102,35 +129,35 @@ func (this *QIcon) Swap(other *QIcon) { func (this *QIcon) Pixmap(size *QSize) *QPixmap { _ret := C.QIcon_Pixmap(this.h, size.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap2(w int, h int) *QPixmap { _ret := C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) PixmapWithExtent(extent int) *QPixmap { _ret := C.QIcon_PixmapWithExtent(this.h, (C.int)(extent)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap3(size *QSize, devicePixelRatio float64) *QPixmap { _ret := C.QIcon_Pixmap3(this.h, size.cPointer(), (C.double)(devicePixelRatio)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap4(window *QWindow, size *QSize) *QPixmap { _ret := C.QIcon_Pixmap4(this.h, window.cPointer(), size.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -329,70 +356,70 @@ func QIcon_SetFallbackThemeName(name string) { func (this *QIcon) Pixmap22(size *QSize, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap32(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap33(w int, h int, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap42(w int, h int, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap42(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap23(extent int, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap34(extent int, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap35(size *QSize, devicePixelRatio float64, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap35(this.h, size.cPointer(), (C.double)(devicePixelRatio), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap43(size *QSize, devicePixelRatio float64, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap43(this.h, size.cPointer(), (C.double)(devicePixelRatio), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap36(window *QWindow, size *QSize, mode QIcon__Mode) *QPixmap { _ret := C.QIcon_Pixmap36(this.h, window.cPointer(), size.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap44(window *QWindow, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIcon_Pixmap44(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -509,7 +536,7 @@ func (this *QIcon) AvailableSizes2(mode QIcon__Mode, state QIcon__State) []QSize // Delete this object from C++ memory. func (this *QIcon) Delete() { - C.QIcon_Delete(this.h) + C.QIcon_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qicon.h b/qt6/gen_qicon.h index cc5f34e0..35a808bb 100644 --- a/qt6/gen_qicon.h +++ b/qt6/gen_qicon.h @@ -32,11 +32,11 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -QIcon* QIcon_new(); -QIcon* QIcon_new2(QPixmap* pixmap); -QIcon* QIcon_new3(QIcon* other); -QIcon* QIcon_new4(struct miqt_string fileName); -QIcon* QIcon_new5(QIconEngine* engine); +void QIcon_new(QIcon** outptr_QIcon); +void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon); +void QIcon_new3(QIcon* other, QIcon** outptr_QIcon); +void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon); +void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon); void QIcon_OperatorAssign(QIcon* self, QIcon* other); void QIcon_Swap(QIcon* self, QIcon* other); QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size); @@ -96,7 +96,7 @@ void QIcon_AddFile3(QIcon* self, struct miqt_string fileName, QSize* size, int m void QIcon_AddFile4(QIcon* self, struct miqt_string fileName, QSize* size, int mode, int state); struct miqt_array /* of QSize* */ QIcon_AvailableSizes1(const QIcon* self, int mode); struct miqt_array /* of QSize* */ QIcon_AvailableSizes2(const QIcon* self, int mode, int state); -void QIcon_Delete(QIcon* self); +void QIcon_Delete(QIcon* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qiconengine.cpp b/qt6/gen_qiconengine.cpp index 0d74da9e..eb0b697d 100644 --- a/qt6/gen_qiconengine.cpp +++ b/qt6/gen_qiconengine.cpp @@ -57,8 +57,8 @@ bool QIconEngine_Write(const QIconEngine* self, QDataStream* out) { return self->write(*out); } -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(QIconEngine* self) { - QList _ret = self->availableSizes(); +struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(QIconEngine* self, int mode, int state) { + QList _ret = self->availableSizes(static_cast(mode), static_cast(state)); // Convert QList<> from C++ memory to manually-managed C memory QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -93,45 +93,28 @@ void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data) { self->virtual_hook(static_cast(id), data); } -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes1(QIconEngine* self, int mode) { - QList _ret = self->availableSizes(static_cast(mode)); - // Convert QList<> from C++ memory to manually-managed C memory - QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QSize(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes2(QIconEngine* self, int mode, int state) { - QList _ret = self->availableSizes(static_cast(mode), static_cast(state)); - // Convert QList<> from C++ memory to manually-managed C memory - QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QSize(_ret[i]); +void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; } -void QIconEngine_Delete(QIconEngine* self) { - delete self; -} - -QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1) { - return new QIconEngine::ScaledPixmapArgument(*param1); +void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument) { + QIconEngine::ScaledPixmapArgument* ret = new QIconEngine::ScaledPixmapArgument(*param1); + *outptr_QIconEngine__ScaledPixmapArgument = ret; } void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1) { self->operator=(*param1); } -void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self) { - delete self; +void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qiconengine.go b/qt6/gen_qiconengine.go index c7974681..0c39a676 100644 --- a/qt6/gen_qiconengine.go +++ b/qt6/gen_qiconengine.go @@ -21,7 +21,8 @@ const ( ) type QIconEngine struct { - h *C.QIconEngine + h *C.QIconEngine + isSubclass bool } func (this *QIconEngine) cPointer() *C.QIconEngine { @@ -38,6 +39,7 @@ func (this *QIconEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIconEngine constructs the type using only CGO pointers. func newQIconEngine(h *C.QIconEngine) *QIconEngine { if h == nil { return nil @@ -45,8 +47,13 @@ func newQIconEngine(h *C.QIconEngine) *QIconEngine { return &QIconEngine{h: h} } +// UnsafeNewQIconEngine constructs the type using only unsafe pointers. func UnsafeNewQIconEngine(h unsafe.Pointer) *QIconEngine { - return newQIconEngine((*C.QIconEngine)(h)) + if h == nil { + return nil + } + + return &QIconEngine{h: (*C.QIconEngine)(h)} } func (this *QIconEngine) Paint(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State) { @@ -62,7 +69,7 @@ func (this *QIconEngine) ActualSize(size *QSize, mode QIcon__Mode, state QIcon__ func (this *QIconEngine) Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { _ret := C.QIconEngine_Pixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -98,8 +105,8 @@ func (this *QIconEngine) Write(out *QDataStream) bool { return (bool)(C.QIconEngine_Write(this.h, out.cPointer())) } -func (this *QIconEngine) AvailableSizes() []QSize { - var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes(this.h) +func (this *QIconEngine) AvailableSizes(mode QIcon__Mode, state QIcon__State) []QSize { + var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes(this.h, (C.int)(mode), (C.int)(state)) _ret := make([]QSize, int(_ma.len)) _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -124,7 +131,7 @@ func (this *QIconEngine) IsNull() bool { func (this *QIconEngine) ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap { _ret := C.QIconEngine_ScaledPixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -133,35 +140,9 @@ func (this *QIconEngine) VirtualHook(id int, data unsafe.Pointer) { C.QIconEngine_VirtualHook(this.h, (C.int)(id), data) } -func (this *QIconEngine) AvailableSizes1(mode QIcon__Mode) []QSize { - var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes1(this.h, (C.int)(mode)) - _ret := make([]QSize, int(_ma.len)) - _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQSize(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - -func (this *QIconEngine) AvailableSizes2(mode QIcon__Mode, state QIcon__State) []QSize { - var _ma C.struct_miqt_array = C.QIconEngine_AvailableSizes2(this.h, (C.int)(mode), (C.int)(state)) - _ret := make([]QSize, int(_ma.len)) - _outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQSize(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - // Delete this object from C++ memory. func (this *QIconEngine) Delete() { - C.QIconEngine_Delete(this.h) + C.QIconEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -174,7 +155,8 @@ func (this *QIconEngine) GoGC() { } type QIconEngine__ScaledPixmapArgument struct { - h *C.QIconEngine__ScaledPixmapArgument + h *C.QIconEngine__ScaledPixmapArgument + isSubclass bool } func (this *QIconEngine__ScaledPixmapArgument) cPointer() *C.QIconEngine__ScaledPixmapArgument { @@ -191,6 +173,7 @@ func (this *QIconEngine__ScaledPixmapArgument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIconEngine__ScaledPixmapArgument constructs the type using only CGO pointers. func newQIconEngine__ScaledPixmapArgument(h *C.QIconEngine__ScaledPixmapArgument) *QIconEngine__ScaledPixmapArgument { if h == nil { return nil @@ -198,14 +181,23 @@ func newQIconEngine__ScaledPixmapArgument(h *C.QIconEngine__ScaledPixmapArgument return &QIconEngine__ScaledPixmapArgument{h: h} } +// UnsafeNewQIconEngine__ScaledPixmapArgument constructs the type using only unsafe pointers. func UnsafeNewQIconEngine__ScaledPixmapArgument(h unsafe.Pointer) *QIconEngine__ScaledPixmapArgument { - return newQIconEngine__ScaledPixmapArgument((*C.QIconEngine__ScaledPixmapArgument)(h)) + if h == nil { + return nil + } + + return &QIconEngine__ScaledPixmapArgument{h: (*C.QIconEngine__ScaledPixmapArgument)(h)} } // NewQIconEngine__ScaledPixmapArgument constructs a new QIconEngine::ScaledPixmapArgument object. func NewQIconEngine__ScaledPixmapArgument(param1 *QIconEngine__ScaledPixmapArgument) *QIconEngine__ScaledPixmapArgument { - ret := C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer()) - return newQIconEngine__ScaledPixmapArgument(ret) + var outptr_QIconEngine__ScaledPixmapArgument *C.QIconEngine__ScaledPixmapArgument = nil + + C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer(), &outptr_QIconEngine__ScaledPixmapArgument) + ret := newQIconEngine__ScaledPixmapArgument(outptr_QIconEngine__ScaledPixmapArgument) + ret.isSubclass = true + return ret } func (this *QIconEngine__ScaledPixmapArgument) OperatorAssign(param1 *QIconEngine__ScaledPixmapArgument) { @@ -214,7 +206,7 @@ func (this *QIconEngine__ScaledPixmapArgument) OperatorAssign(param1 *QIconEngin // Delete this object from C++ memory. func (this *QIconEngine__ScaledPixmapArgument) Delete() { - C.QIconEngine__ScaledPixmapArgument_Delete(this.h) + C.QIconEngine__ScaledPixmapArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qiconengine.h b/qt6/gen_qiconengine.h index 635f5363..d8177041 100644 --- a/qt6/gen_qiconengine.h +++ b/qt6/gen_qiconengine.h @@ -45,18 +45,16 @@ struct miqt_string QIconEngine_Key(const QIconEngine* self); QIconEngine* QIconEngine_Clone(const QIconEngine* self); bool QIconEngine_Read(QIconEngine* self, QDataStream* in); bool QIconEngine_Write(const QIconEngine* self, QDataStream* out); -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(QIconEngine* self); +struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(QIconEngine* self, int mode, int state); struct miqt_string QIconEngine_IconName(QIconEngine* self); bool QIconEngine_IsNull(QIconEngine* self); QPixmap* QIconEngine_ScaledPixmap(QIconEngine* self, QSize* size, int mode, int state, double scale); void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data); -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes1(QIconEngine* self, int mode); -struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes2(QIconEngine* self, int mode, int state); -void QIconEngine_Delete(QIconEngine* self); +void QIconEngine_Delete(QIconEngine* self, bool isSubclass); -QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1); +void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument); void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1); -void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self); +void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qiconengineplugin.cpp b/qt6/gen_qiconengineplugin.cpp index d5fbf706..f5f1f618 100644 --- a/qt6/gen_qiconengineplugin.cpp +++ b/qt6/gen_qiconengineplugin.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -27,8 +28,9 @@ struct miqt_string QIconEnginePlugin_Tr(const char* s) { return _ms; } -QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self) { - return self->create(); +QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self, struct miqt_string filename) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + return self->create(filename_QString); } struct miqt_string QIconEnginePlugin_Tr2(const char* s, const char* c) { @@ -53,12 +55,11 @@ struct miqt_string QIconEnginePlugin_Tr3(const char* s, const char* c, int n) { return _ms; } -QIconEngine* QIconEnginePlugin_Create1(QIconEnginePlugin* self, struct miqt_string filename) { - QString filename_QString = QString::fromUtf8(filename.data, filename.len); - return self->create(filename_QString); -} - -void QIconEnginePlugin_Delete(QIconEnginePlugin* self) { - delete self; +void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qiconengineplugin.go b/qt6/gen_qiconengineplugin.go index 028120e9..f32108aa 100644 --- a/qt6/gen_qiconengineplugin.go +++ b/qt6/gen_qiconengineplugin.go @@ -14,7 +14,8 @@ import ( ) type QIconEnginePlugin struct { - h *C.QIconEnginePlugin + h *C.QIconEnginePlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QIconEnginePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIconEnginePlugin(h *C.QIconEnginePlugin) *QIconEnginePlugin { +// newQIconEnginePlugin constructs the type using only CGO pointers. +func newQIconEnginePlugin(h *C.QIconEnginePlugin, h_QObject *C.QObject) *QIconEnginePlugin { if h == nil { return nil } - return &QIconEnginePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QIconEnginePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQIconEnginePlugin(h unsafe.Pointer) *QIconEnginePlugin { - return newQIconEnginePlugin((*C.QIconEnginePlugin)(h)) +// UnsafeNewQIconEnginePlugin constructs the type using only unsafe pointers. +func UnsafeNewQIconEnginePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIconEnginePlugin { + if h == nil { + return nil + } + + return &QIconEnginePlugin{h: (*C.QIconEnginePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QIconEnginePlugin) MetaObject() *QMetaObject { @@ -62,8 +71,12 @@ func QIconEnginePlugin_Tr(s string) string { return _ret } -func (this *QIconEnginePlugin) Create() *QIconEngine { - return UnsafeNewQIconEngine(unsafe.Pointer(C.QIconEnginePlugin_Create(this.h))) +func (this *QIconEnginePlugin) Create(filename string) *QIconEngine { + filename_ms := C.struct_miqt_string{} + filename_ms.data = C.CString(filename) + filename_ms.len = C.size_t(len(filename)) + defer C.free(unsafe.Pointer(filename_ms.data)) + return UnsafeNewQIconEngine(unsafe.Pointer(C.QIconEnginePlugin_Create(this.h, filename_ms))) } func QIconEnginePlugin_Tr2(s string, c string) string { @@ -88,17 +101,9 @@ func QIconEnginePlugin_Tr3(s string, c string, n int) string { return _ret } -func (this *QIconEnginePlugin) Create1(filename string) *QIconEngine { - filename_ms := C.struct_miqt_string{} - filename_ms.data = C.CString(filename) - filename_ms.len = C.size_t(len(filename)) - defer C.free(unsafe.Pointer(filename_ms.data)) - return UnsafeNewQIconEngine(unsafe.Pointer(C.QIconEnginePlugin_Create1(this.h, filename_ms))) -} - // Delete this object from C++ memory. func (this *QIconEnginePlugin) Delete() { - C.QIconEnginePlugin_Delete(this.h) + C.QIconEnginePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qiconengineplugin.h b/qt6/gen_qiconengineplugin.h index 8cc7cc34..1deef096 100644 --- a/qt6/gen_qiconengineplugin.h +++ b/qt6/gen_qiconengineplugin.h @@ -18,20 +18,21 @@ extern "C" { class QIconEngine; class QIconEnginePlugin; class QMetaObject; +class QObject; #else typedef struct QIconEngine QIconEngine; typedef struct QIconEnginePlugin QIconEnginePlugin; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self); void* QIconEnginePlugin_Metacast(QIconEnginePlugin* self, const char* param1); struct miqt_string QIconEnginePlugin_Tr(const char* s); -QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self); +QIconEngine* QIconEnginePlugin_Create(QIconEnginePlugin* self, struct miqt_string filename); struct miqt_string QIconEnginePlugin_Tr2(const char* s, const char* c); struct miqt_string QIconEnginePlugin_Tr3(const char* s, const char* c, int n); -QIconEngine* QIconEnginePlugin_Create1(QIconEnginePlugin* self, struct miqt_string filename); -void QIconEnginePlugin_Delete(QIconEnginePlugin* self); +void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qidentityproxymodel.cpp b/qt6/gen_qidentityproxymodel.cpp index fab99f0d..1b3d73d1 100644 --- a/qt6/gen_qidentityproxymodel.cpp +++ b/qt6/gen_qidentityproxymodel.cpp @@ -1,10 +1,14 @@ #include +#include +#include #include #include +#include #include #include #include #include +#include #include #include #include @@ -13,12 +17,1137 @@ #include "gen_qidentityproxymodel.h" #include "_cgo_export.h" -QIdentityProxyModel* QIdentityProxyModel_new() { - return new QIdentityProxyModel(); +class MiqtVirtualQIdentityProxyModel : public virtual QIdentityProxyModel { +public: + + MiqtVirtualQIdentityProxyModel(): QIdentityProxyModel() {}; + MiqtVirtualQIdentityProxyModel(QObject* parent): QIdentityProxyModel(parent) {}; + + virtual ~MiqtVirtualQIdentityProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QIdentityProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QIdentityProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QIdentityProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QIdentityProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override { + if (handle__MapFromSource == 0) { + return QIdentityProxyModel::mapFromSource(sourceIndex); + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapFromSource(QModelIndex* sourceIndex) const { + + return new QModelIndex(QIdentityProxyModel::mapFromSource(*sourceIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const override { + if (handle__MapToSource == 0) { + return QIdentityProxyModel::mapToSource(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapToSource(QModelIndex* proxyIndex) const { + + return new QModelIndex(QIdentityProxyModel::mapToSource(*proxyIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QIdentityProxyModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QIdentityProxyModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QIdentityProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QIdentityProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QIdentityProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QIdentityProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QIdentityProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QIdentityProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QIdentityProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QIdentityProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QIdentityProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QIdentityProxyModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QIdentityProxyModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSourceModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSourceModel(QAbstractItemModel* sourceModel) override { + if (handle__SetSourceModel == 0) { + QIdentityProxyModel::setSourceModel(sourceModel); + return; + } + + QAbstractItemModel* sigval1 = sourceModel; + + miqt_exec_callback_QIdentityProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* sourceModel) { + + QIdentityProxyModel::setSourceModel(sourceModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QIdentityProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QIdentityProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QIdentityProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QIdentityProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QIdentityProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QIdentityProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QIdentityProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QIdentityProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QIdentityProxyModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QIdentityProxyModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QIdentityProxyModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QIdentityProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QIdentityProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QIdentityProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QIdentityProxyModel::revert(); + return; + } + + + miqt_exec_callback_QIdentityProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QIdentityProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& proxyIndex, int role) const override { + if (handle__Data == 0) { + return QIdentityProxyModel::data(proxyIndex, role); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* proxyIndex, int role) const { + + return new QVariant(QIdentityProxyModel::data(*proxyIndex, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QIdentityProxyModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QIdentityProxyModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QIdentityProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QIdentityProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QIdentityProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QIdentityProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QIdentityProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QIdentityProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QIdentityProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QIdentityProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QIdentityProxyModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QIdentityProxyModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QIdentityProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QIdentityProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QIdentityProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QIdentityProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QIdentityProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QIdentityProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QIdentityProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QIdentityProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QIdentityProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QIdentityProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QIdentityProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QIdentityProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QIdentityProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QIdentityProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QIdentityProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QIdentityProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QIdentityProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QIdentityProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QIdentityProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QIdentityProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QIdentityProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QIdentityProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QIdentityProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QIdentityProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QIdentityProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QIdentityProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QIdentityProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QIdentityProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QIdentityProxyModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QIdentityProxyModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + +}; + +void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(); + *outptr_QIdentityProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent) { - return new QIdentityProxyModel(parent); +void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(parent); + *outptr_QIdentityProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self) { @@ -40,12 +1169,12 @@ struct miqt_string QIdentityProxyModel_Tr(const char* s) { return _ms; } -int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self) { - return self->columnCount(); +int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QIdentityProxyModel_MapFromSource(const QIdentityProxyModel* self, QModelIndex* sourceIndex) { @@ -60,12 +1189,12 @@ QModelIndex* QIdentityProxyModel_Parent(const QIdentityProxyModel* self, QModelI return new QModelIndex(self->parent(*child)); } -int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self) { - return self->rowCount(); +int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } bool QIdentityProxyModel_DropMimeData(QIdentityProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { @@ -76,8 +1205,8 @@ QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* self, int ro return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value); +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -93,20 +1222,20 @@ void QIdentityProxyModel_SetSourceModel(QIdentityProxyModel* self, QAbstractItem self->setSourceModel(sourceModel); } -bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } -bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QIdentityProxyModel_MoveRows(QIdentityProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { @@ -139,65 +1268,315 @@ struct miqt_string QIdentityProxyModel_Tr3(const char* s, const char* c, int n) return _ms; } -int QIdentityProxyModel_ColumnCount1(const QIdentityProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QIdentityProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__ColumnCount = slot; } -QModelIndex* QIdentityProxyModel_Index3(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +int QIdentityProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_ColumnCount(parent); } -int QIdentityProxyModel_RowCount1(const QIdentityProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QIdentityProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Index = slot; } -QVariant* QIdentityProxyModel_HeaderData3(const QIdentityProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +QModelIndex* QIdentityProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Index(row, column, parent); } -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match4(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +void QIdentityProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapFromSource = slot; } -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match5(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +QModelIndex* QIdentityProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); } -bool QIdentityProxyModel_InsertColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); +void QIdentityProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapToSource = slot; } -bool QIdentityProxyModel_InsertRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +QModelIndex* QIdentityProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapToSource(proxyIndex); } -bool QIdentityProxyModel_RemoveColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); +void QIdentityProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Parent = slot; } -bool QIdentityProxyModel_RemoveRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +QModelIndex* QIdentityProxyModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Parent(child); +} + +void QIdentityProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RowCount = slot; +} + +int QIdentityProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RowCount(parent); +} + +void QIdentityProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QIdentityProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QIdentityProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QIdentityProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QIdentityProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QIdentityProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QIdentityProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QIdentityProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetSourceModel = slot; +} + +void QIdentityProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetSourceModel(sourceModel); +} + +void QIdentityProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QIdentityProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QIdentityProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QIdentityProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QIdentityProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QIdentityProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QIdentityProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QIdentityProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QIdentityProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QIdentityProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QIdentityProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QIdentityProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QIdentityProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Submit = slot; +} + +bool QIdentityProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Submit(); +} + +void QIdentityProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Revert = slot; +} + +void QIdentityProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Revert(); +} + +void QIdentityProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QIdentityProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Data(proxyIndex, role); +} + +void QIdentityProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QIdentityProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QIdentityProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Flags = slot; +} + +int QIdentityProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QIdentityProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetData = slot; +} + +bool QIdentityProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QIdentityProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QIdentityProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QIdentityProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QIdentityProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QIdentityProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__ClearItemData = slot; +} + +bool QIdentityProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QIdentityProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QIdentityProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QIdentityProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QIdentityProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QIdentityProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QIdentityProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QIdentityProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Sort = slot; +} + +void QIdentityProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QIdentityProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QIdentityProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Span(index); +} + +void QIdentityProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QIdentityProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QIdentityProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QIdentityProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QIdentityProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QIdentityProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QIdentityProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QIdentityProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QIdentityProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QIdentityProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QIdentityProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QIdentityProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QIdentityProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QIdentityProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_RoleNames(); } -void QIdentityProxyModel_Delete(QIdentityProxyModel* self) { - delete self; +void QIdentityProxyModel_Delete(QIdentityProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qidentityproxymodel.go b/qt6/gen_qidentityproxymodel.go index b97c8e6b..87e88757 100644 --- a/qt6/gen_qidentityproxymodel.go +++ b/qt6/gen_qidentityproxymodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QIdentityProxyModel struct { - h *C.QIdentityProxyModel + h *C.QIdentityProxyModel + isSubclass bool *QAbstractProxyModel } @@ -32,27 +34,49 @@ func (this *QIdentityProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIdentityProxyModel(h *C.QIdentityProxyModel) *QIdentityProxyModel { +// newQIdentityProxyModel constructs the type using only CGO pointers. +func newQIdentityProxyModel(h *C.QIdentityProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QIdentityProxyModel { if h == nil { return nil } - return &QIdentityProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))} + return &QIdentityProxyModel{h: h, + QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQIdentityProxyModel(h unsafe.Pointer) *QIdentityProxyModel { - return newQIdentityProxyModel((*C.QIdentityProxyModel)(h)) +// UnsafeNewQIdentityProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQIdentityProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QIdentityProxyModel { + if h == nil { + return nil + } + + return &QIdentityProxyModel{h: (*C.QIdentityProxyModel)(h), + QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } // NewQIdentityProxyModel constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel() *QIdentityProxyModel { - ret := C.QIdentityProxyModel_new() - return newQIdentityProxyModel(ret) + var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QIdentityProxyModel_new(&outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIdentityProxyModel2 constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel2(parent *QObject) *QIdentityProxyModel { - ret := C.QIdentityProxyModel_new2(parent.cPointer()) - return newQIdentityProxyModel(ret) + var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QIdentityProxyModel_new2(parent.cPointer(), &outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QIdentityProxyModel) MetaObject() *QMetaObject { @@ -74,12 +98,12 @@ func QIdentityProxyModel_Tr(s string) string { return _ret } -func (this *QIdentityProxyModel) ColumnCount() int { - return (int)(C.QIdentityProxyModel_ColumnCount(this.h)) +func (this *QIdentityProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QIdentityProxyModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QIdentityProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QIdentityProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QIdentityProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QIdentityProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -106,12 +130,12 @@ func (this *QIdentityProxyModel) Parent(child *QModelIndex) *QModelIndex { return _goptr } -func (this *QIdentityProxyModel) RowCount() int { - return (int)(C.QIdentityProxyModel_RowCount(this.h)) +func (this *QIdentityProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QIdentityProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QIdentityProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QIdentityProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QIdentityProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QIdentityProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -128,8 +152,8 @@ func (this *QIdentityProxyModel) Sibling(row int, column int, idx *QModelIndex) return _goptr } -func (this *QIdentityProxyModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex { - var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer()) +func (this *QIdentityProxyModel) Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -145,20 +169,20 @@ func (this *QIdentityProxyModel) SetSourceModel(sourceModel *QAbstractItemModel) C.QIdentityProxyModel_SetSourceModel(this.h, sourceModel.cPointer()) } -func (this *QIdentityProxyModel) InsertColumns(column int, count int) bool { - return (bool)(C.QIdentityProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QIdentityProxyModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QIdentityProxyModel) InsertRows(row int, count int) bool { - return (bool)(C.QIdentityProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QIdentityProxyModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QIdentityProxyModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QIdentityProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QIdentityProxyModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QIdentityProxyModel) RemoveRows(row int, count int) bool { - return (bool)(C.QIdentityProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QIdentityProxyModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QIdentityProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } func (this *QIdentityProxyModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { @@ -191,30 +215,271 @@ func QIdentityProxyModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QIdentityProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QIdentityProxyModel_ColumnCount1(this.h, parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QIdentityProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QIdentityProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_ColumnCount +func miqt_exec_callback_QIdentityProxyModel_ColumnCount(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Index +func miqt_exec_callback_QIdentityProxyModel_Index(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_MapFromSource(sourceIndex *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_MapFromSource(unsafe.Pointer(this.h), sourceIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapFromSource(slot func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapFromSource +func miqt_exec_callback_QIdentityProxyModel_MapFromSource(self *C.QIdentityProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceIndex)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapFromSource, slotval1) + + return virtualReturn.cPointer() + } -func (this *QIdentityProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QIdentityProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QIdentityProxyModel) callVirtualBase_MapToSource(proxyIndex *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_MapToSource(unsafe.Pointer(this.h), proxyIndex.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QIdentityProxyModel) OnMapToSource(slot func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapToSource +func miqt_exec_callback_QIdentityProxyModel_MapToSource(self *C.QIdentityProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapToSource, slotval1) + + return virtualReturn.cPointer() + } -func (this *QIdentityProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QIdentityProxyModel_RowCount1(this.h, parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QIdentityProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QIdentityProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +//export miqt_exec_callback_QIdentityProxyModel_Parent +func miqt_exec_callback_QIdentityProxyModel_Parent(self *C.QIdentityProxyModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QIdentityProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QIdentityProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RowCount +func miqt_exec_callback_QIdentityProxyModel_RowCount(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QIdentityProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QIdentityProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QIdentityProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_HeaderData +func miqt_exec_callback_QIdentityProxyModel_HeaderData(self *C.QIdentityProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_DropMimeData +func miqt_exec_callback_QIdentityProxyModel_DropMimeData(self *C.QIdentityProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Sibling +func miqt_exec_callback_QIdentityProxyModel_Sibling(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QIdentityProxyModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex { - var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits)) +func (this *QIdentityProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QIdentityProxyModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -224,40 +489,894 @@ func (this *QIdentityProxyModel) Match4(start *QModelIndex, role int, value *QVa _ret[i] = *_lv_goptr } return _ret + +} +func (this *QIdentityProxyModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QIdentityProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QIdentityProxyModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { - var _ma C.struct_miqt_array = C.QIdentityProxyModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya +//export miqt_exec_callback_QIdentityProxyModel_Match +func miqt_exec_callback_QIdentityProxyModel_Match(self *C.QIdentityProxyModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetSourceModel(sourceModel *QAbstractItemModel) { + + C.QIdentityProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), sourceModel.cPointer()) + +} +func (this *QIdentityProxyModel) OnSetSourceModel(slot func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) { + C.QIdentityProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetSourceModel +func miqt_exec_callback_QIdentityProxyModel_SetSourceModel(self *C.QIdentityProxyModel, cb C.intptr_t, sourceModel *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(sourceModel), nil) + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} + +func (this *QIdentityProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_InsertColumns +func miqt_exec_callback_QIdentityProxyModel_InsertColumns(self *C.QIdentityProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_InsertRows +func miqt_exec_callback_QIdentityProxyModel_InsertRows(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RemoveColumns +func miqt_exec_callback_QIdentityProxyModel_RemoveColumns(self *C.QIdentityProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RemoveRows +func miqt_exec_callback_QIdentityProxyModel_RemoveRows(self *C.QIdentityProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QIdentityProxyModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QIdentityProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MoveRows +func miqt_exec_callback_QIdentityProxyModel_MoveRows(self *C.QIdentityProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QIdentityProxyModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QIdentityProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MoveColumns +func miqt_exec_callback_QIdentityProxyModel_MoveColumns(self *C.QIdentityProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QIdentityProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QIdentityProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Submit +func miqt_exec_callback_QIdentityProxyModel_Submit(self *C.QIdentityProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Revert() { + + C.QIdentityProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QIdentityProxyModel) OnRevert(slot func(super func())) { + C.QIdentityProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Revert +func miqt_exec_callback_QIdentityProxyModel_Revert(self *C.QIdentityProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Data(proxyIndex *QModelIndex, role int) *QVariant { + + _ret := C.QIdentityProxyModel_virtualbase_Data(unsafe.Pointer(this.h), proxyIndex.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnData(slot func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) { + C.QIdentityProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Data +func miqt_exec_callback_QIdentityProxyModel_Data(self *C.QIdentityProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QIdentityProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QIdentityProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QIdentityProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_ItemData +func miqt_exec_callback_QIdentityProxyModel_ItemData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QIdentityProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QIdentityProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QIdentityProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QIdentityProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Flags +func miqt_exec_callback_QIdentityProxyModel_Flags(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QIdentityProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QIdentityProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetData +func miqt_exec_callback_QIdentityProxyModel_SetData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QIdentityProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QIdentityProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QIdentityProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetItemData +func miqt_exec_callback_QIdentityProxyModel_SetItemData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QIdentityProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QIdentityProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SetHeaderData +func miqt_exec_callback_QIdentityProxyModel_SetHeaderData(self *C.QIdentityProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QIdentityProxyModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_ClearItemData +func miqt_exec_callback_QIdentityProxyModel_ClearItemData(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QIdentityProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QIdentityProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Buddy +func miqt_exec_callback_QIdentityProxyModel_Buddy(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_CanFetchMore +func miqt_exec_callback_QIdentityProxyModel_CanFetchMore(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QIdentityProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QIdentityProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QIdentityProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_FetchMore +func miqt_exec_callback_QIdentityProxyModel_FetchMore(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QIdentityProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QIdentityProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QIdentityProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Sort +func miqt_exec_callback_QIdentityProxyModel_Sort(self *C.QIdentityProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QIdentityProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QIdentityProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QIdentityProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_Span +func miqt_exec_callback_QIdentityProxyModel_Span(self *C.QIdentityProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_HasChildren +func miqt_exec_callback_QIdentityProxyModel_HasChildren(self *C.QIdentityProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QIdentityProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QIdentityProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QIdentityProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MimeData +func miqt_exec_callback_QIdentityProxyModel_MimeData(self *C.QIdentityProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QIdentityProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QIdentityProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QIdentityProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_CanDropMimeData +func miqt_exec_callback_QIdentityProxyModel_CanDropMimeData(self *C.QIdentityProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QIdentityProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret } return _ret + +} +func (this *QIdentityProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QIdentityProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QIdentityProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QIdentityProxyModel_MimeTypes +func miqt_exec_callback_QIdentityProxyModel_MimeTypes(self *C.QIdentityProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + } -func (this *QIdentityProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QIdentityProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QIdentityProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QIdentityProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SupportedDragActions +func miqt_exec_callback_QIdentityProxyModel_SupportedDragActions(self *C.QIdentityProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + } -func (this *QIdentityProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QIdentityProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QIdentityProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + } +func (this *QIdentityProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QIdentityProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_SupportedDropActions +func miqt_exec_callback_QIdentityProxyModel_SupportedDropActions(self *C.QIdentityProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QIdentityProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QIdentityProxyModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QIdentityProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QIdentityProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_RoleNames +func miqt_exec_callback_QIdentityProxyModel_RoleNames(self *C.QIdentityProxyModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm -func (this *QIdentityProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QIdentityProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } // Delete this object from C++ memory. func (this *QIdentityProxyModel) Delete() { - C.QIdentityProxyModel_Delete(this.h) + C.QIdentityProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qidentityproxymodel.h b/qt6/gen_qidentityproxymodel.h index 6c1177b3..b282558a 100644 --- a/qt6/gen_qidentityproxymodel.h +++ b/qt6/gen_qidentityproxymodel.h @@ -16,57 +16,129 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractProxyModel; +class QByteArray; class QIdentityProxyModel; class QMetaObject; class QMimeData; class QModelIndex; class QObject; +class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractProxyModel QAbstractProxyModel; +typedef struct QByteArray QByteArray; typedef struct QIdentityProxyModel QIdentityProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; +typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -QIdentityProxyModel* QIdentityProxyModel_new(); -QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent); +void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self); void* QIdentityProxyModel_Metacast(QIdentityProxyModel* self, const char* param1); struct miqt_string QIdentityProxyModel_Tr(const char* s); -int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self); -QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column); +int QIdentityProxyModel_ColumnCount(const QIdentityProxyModel* self, QModelIndex* parent); +QModelIndex* QIdentityProxyModel_Index(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent); QModelIndex* QIdentityProxyModel_MapFromSource(const QIdentityProxyModel* self, QModelIndex* sourceIndex); QModelIndex* QIdentityProxyModel_MapToSource(const QIdentityProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QIdentityProxyModel_Parent(const QIdentityProxyModel* self, QModelIndex* child); -int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self); -QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation); +int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self, QModelIndex* parent); +QVariant* QIdentityProxyModel_HeaderData(const QIdentityProxyModel* self, int section, int orientation, int role); bool QIdentityProxyModel_DropMimeData(QIdentityProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* self, int row, int column, QModelIndex* idx); -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value); +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); void QIdentityProxyModel_SetSourceModel(QIdentityProxyModel* self, QAbstractItemModel* sourceModel); -bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count); -bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count); -bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count); -bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count); +bool QIdentityProxyModel_InsertColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); +bool QIdentityProxyModel_InsertRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); +bool QIdentityProxyModel_RemoveColumns(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); +bool QIdentityProxyModel_RemoveRows(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); bool QIdentityProxyModel_MoveRows(QIdentityProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); bool QIdentityProxyModel_MoveColumns(QIdentityProxyModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); struct miqt_string QIdentityProxyModel_Tr2(const char* s, const char* c); struct miqt_string QIdentityProxyModel_Tr3(const char* s, const char* c, int n); -int QIdentityProxyModel_ColumnCount1(const QIdentityProxyModel* self, QModelIndex* parent); -QModelIndex* QIdentityProxyModel_Index3(const QIdentityProxyModel* self, int row, int column, QModelIndex* parent); -int QIdentityProxyModel_RowCount1(const QIdentityProxyModel* self, QModelIndex* parent); -QVariant* QIdentityProxyModel_HeaderData3(const QIdentityProxyModel* self, int section, int orientation, int role); -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match4(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits); -struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_Match5(const QIdentityProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); -bool QIdentityProxyModel_InsertColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); -bool QIdentityProxyModel_InsertRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); -bool QIdentityProxyModel_RemoveColumns3(QIdentityProxyModel* self, int column, int count, QModelIndex* parent); -bool QIdentityProxyModel_RemoveRows3(QIdentityProxyModel* self, int row, int count, QModelIndex* parent); -void QIdentityProxyModel_Delete(QIdentityProxyModel* self); +void QIdentityProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QIdentityProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QIdentityProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QIdentityProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QIdentityProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QIdentityProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QIdentityProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QIdentityProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QIdentityProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel); +void QIdentityProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QIdentityProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QIdentityProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_Submit(void* self); +void QIdentityProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_Revert(void* self); +void QIdentityProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QIdentityProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role); +void QIdentityProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QIdentityProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QIdentityProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QIdentityProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QIdentityProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QIdentityProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QIdentityProxyModel_virtualbase_Sort(void* self, int column, int order); +void QIdentityProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QIdentityProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QIdentityProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QIdentityProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QIdentityProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QIdentityProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QIdentityProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QIdentityProxyModel_virtualbase_MimeTypes(const void* self); +void QIdentityProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_SupportedDragActions(const void* self); +void QIdentityProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QIdentityProxyModel_virtualbase_SupportedDropActions(const void* self); +void QIdentityProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QIdentityProxyModel_virtualbase_RoleNames(const void* self); +void QIdentityProxyModel_Delete(QIdentityProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qimage.cpp b/qt6/gen_qimage.cpp index 4e94a1aa..1f90fc02 100644 --- a/qt6/gen_qimage.cpp +++ b/qt6/gen_qimage.cpp @@ -6,7 +6,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -20,46 +22,221 @@ #include "gen_qimage.h" #include "_cgo_export.h" -QImage* QImage_new() { - return new QImage(); +class MiqtVirtualQImage : public virtual QImage { +public: + + MiqtVirtualQImage(): QImage() {}; + MiqtVirtualQImage(const QSize& size, QImage::Format format): QImage(size, format) {}; + MiqtVirtualQImage(int width, int height, QImage::Format format): QImage(width, height, format) {}; + MiqtVirtualQImage(uchar* data, int width, int height, QImage::Format format): QImage(data, width, height, format) {}; + MiqtVirtualQImage(const uchar* data, int width, int height, QImage::Format format): QImage(data, width, height, format) {}; + MiqtVirtualQImage(uchar* data, int width, int height, qsizetype bytesPerLine, QImage::Format format): QImage(data, width, height, bytesPerLine, format) {}; + MiqtVirtualQImage(const uchar* data, int width, int height, qsizetype bytesPerLine, QImage::Format format): QImage(data, width, height, bytesPerLine, format) {}; + MiqtVirtualQImage(const QString& fileName): QImage(fileName) {}; + MiqtVirtualQImage(const QImage& param1): QImage(param1) {}; + MiqtVirtualQImage(const QString& fileName, const char* format): QImage(fileName, format) {}; + + virtual ~MiqtVirtualQImage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QImage::devType(); + } + + + int callback_return_value = miqt_exec_callback_QImage_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QImage::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QImage::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QImage_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QImage::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override { + if (handle__Metric == 0) { + return QImage::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QImage_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int metric) const { + + return QImage::metric(static_cast(metric)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QImage::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QImage_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QImage::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QImage::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QImage_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QImage::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QImage::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QImage_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QImage::sharedPainter(); + + } + +}; + +void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new2(QSize* size, int format) { - return new QImage(*size, static_cast(format)); +void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(*size, static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new3(int width, int height, int format) { - return new QImage(static_cast(width), static_cast(height), static_cast(format)); +void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(width), static_cast(height), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new4(unsigned char* data, int width, int height, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); +void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new5(const unsigned char* data, int width, int height, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); +void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); +void QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format) { - return new QImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); +void QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new8(struct miqt_string fileName) { +void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImage(fileName_QString); + MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new9(QImage* param1) { - return new QImage(*param1); +void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQImage* ret = new MiqtVirtualQImage(*param1); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } -QImage* QImage_new10(struct miqt_string fileName, const char* format) { +void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImage(fileName_QString, format); + MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString, format); + *outptr_QImage = ret; + *outptr_QPaintDevice = static_cast(ret); } void QImage_OperatorAssign(QImage* self, QImage* param1) { @@ -682,7 +859,59 @@ struct miqt_string QImage_Text1(const QImage* self, struct miqt_string key) { return _ms; } -void QImage_Delete(QImage* self) { - delete self; +void QImage_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__DevType = slot; +} + +int QImage_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_DevType(); +} + +void QImage_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QImage_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_PaintEngine(); +} + +void QImage_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__Metric = slot; +} + +int QImage_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_Metric(metric); +} + +void QImage_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__InitPainter = slot; +} + +void QImage_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQImage*)(self) )->virtualbase_InitPainter(painter); +} + +void QImage_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QImage_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_Redirected(offset); +} + +void QImage_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QImage*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QImage_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQImage*)(self) )->virtualbase_SharedPainter(); +} + +void QImage_Delete(QImage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qimage.go b/qt6/gen_qimage.go index 2720a737..7773abe8 100644 --- a/qt6/gen_qimage.go +++ b/qt6/gen_qimage.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -63,7 +64,8 @@ const ( ) type QImage struct { - h *C.QImage + h *C.QImage + isSubclass bool *QPaintDevice } @@ -81,57 +83,100 @@ func (this *QImage) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQImage(h *C.QImage) *QImage { +// newQImage constructs the type using only CGO pointers. +func newQImage(h *C.QImage, h_QPaintDevice *C.QPaintDevice) *QImage { if h == nil { return nil } - return &QImage{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QImage{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQImage(h unsafe.Pointer) *QImage { - return newQImage((*C.QImage)(h)) +// UnsafeNewQImage constructs the type using only unsafe pointers. +func UnsafeNewQImage(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QImage { + if h == nil { + return nil + } + + return &QImage{h: (*C.QImage)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQImage constructs a new QImage object. func NewQImage() *QImage { - ret := C.QImage_new() - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new(&outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage2 constructs a new QImage object. func NewQImage2(size *QSize, format QImage__Format) *QImage { - ret := C.QImage_new2(size.cPointer(), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new2(size.cPointer(), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage3 constructs a new QImage object. func NewQImage3(width int, height int, format QImage__Format) *QImage { - ret := C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage4 constructs a new QImage object. func NewQImage4(data *byte, width int, height int, format QImage__Format) *QImage { - ret := C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage5 constructs a new QImage object. func NewQImage5(data *byte, width int, height int, format QImage__Format) *QImage { - ret := C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage6 constructs a new QImage object. func NewQImage6(data *byte, width int, height int, bytesPerLine int64, format QImage__Format) *QImage { - ret := C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage7 constructs a new QImage object. func NewQImage7(data *byte, width int, height int, bytesPerLine int64, format QImage__Format) *QImage { - ret := C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format)) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage8 constructs a new QImage object. @@ -140,14 +185,24 @@ func NewQImage8(fileName string) *QImage { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QImage_new8(fileName_ms) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new8(fileName_ms, &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage9 constructs a new QImage object. func NewQImage9(param1 *QImage) *QImage { - ret := C.QImage_new9(param1.cPointer()) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new9(param1.cPointer(), &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQImage10 constructs a new QImage object. @@ -158,8 +213,13 @@ func NewQImage10(fileName string, format string) *QImage { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QImage_new10(fileName_ms, format_Cstring) - return newQImage(ret) + var outptr_QImage *C.QImage = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QImage_new10(fileName_ms, format_Cstring, &outptr_QImage, &outptr_QPaintDevice) + ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QImage) OperatorAssign(param1 *QImage) { @@ -196,14 +256,14 @@ func (this *QImage) IsDetached() bool { func (this *QImage) Copy() *QImage { _ret := C.QImage_Copy(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Copy2(x int, y int, w int, h int) *QImage { _ret := C.QImage_Copy2(this.h, (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -214,7 +274,7 @@ func (this *QImage) Format() QImage__Format { func (this *QImage) ConvertToFormat(f QImage__Format) *QImage { _ret := C.QImage_ConvertToFormat(this.h, (C.int)(f)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -227,7 +287,7 @@ func (this *QImage) ConvertToFormat2(f QImage__Format, colorTable []uint) *QImag } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} _ret := C.QImage_ConvertToFormat2(this.h, (C.int)(f), colorTable_ma) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -238,7 +298,7 @@ func (this *QImage) ReinterpretAsFormat(f QImage__Format) bool { func (this *QImage) ConvertedTo(f QImage__Format) *QImage { _ret := C.QImage_ConvertedTo(this.h, (C.int)(f)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -444,56 +504,56 @@ func (this *QImage) SetAlphaChannel(alphaChannel *QImage) { func (this *QImage) CreateAlphaMask() *QImage { _ret := C.QImage_CreateAlphaMask(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask() *QImage { _ret := C.QImage_CreateHeuristicMask(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor(color uint) *QImage { _ret := C.QImage_CreateMaskFromColor(this.h, (C.uint)(color)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled(w int, h int) *QImage { _ret := C.QImage_Scaled(this.h, (C.int)(w), (C.int)(h)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledWithQSize(s *QSize) *QImage { _ret := C.QImage_ScaledWithQSize(this.h, s.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth(w int) *QImage { _ret := C.QImage_ScaledToWidth(this.h, (C.int)(w)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight(h int) *QImage { _ret := C.QImage_ScaledToHeight(this.h, (C.int)(h)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed(matrix *QTransform) *QImage { _ret := C.QImage_Transformed(this.h, matrix.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -507,14 +567,14 @@ func QImage_TrueMatrix(param1 *QTransform, w int, h int) *QTransform { func (this *QImage) Mirrored() *QImage { _ret := C.QImage_Mirrored(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) RgbSwapped() *QImage { _ret := C.QImage_RgbSwapped(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -540,7 +600,7 @@ func (this *QImage) ColorSpace() *QColorSpace { func (this *QImage) ConvertedToColorSpace(param1 *QColorSpace) *QImage { _ret := C.QImage_ConvertedToColorSpace(this.h, param1.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -555,7 +615,7 @@ func (this *QImage) SetColorSpace(colorSpace *QColorSpace) { func (this *QImage) ColorTransformed(transform *QColorTransform) *QImage { _ret := C.QImage_ColorTransformed(this.h, transform.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -607,14 +667,14 @@ func (this *QImage) SaveWithDevice(device *QIODevice) bool { func QImage_FromData(data QByteArrayView) *QImage { _ret := C.QImage_FromData(data.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QImage_FromData2(data *byte, size int) *QImage { _ret := C.QImage_FromData2((*C.uchar)(unsafe.Pointer(data)), (C.int)(size)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -624,7 +684,7 @@ func QImage_FromDataWithData(data []byte) *QImage { data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) _ret := C.QImage_FromDataWithData(data_alias) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -716,14 +776,14 @@ func QImage_ToImageFormat(format QPixelFormat) QImage__Format { func (this *QImage) Copy1(rect *QRect) *QImage { _ret := C.QImage_Copy1(this.h, rect.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ConvertToFormat22(f QImage__Format, flags ImageConversionFlag) *QImage { _ret := C.QImage_ConvertToFormat22(this.h, (C.int)(f), (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -736,14 +796,14 @@ func (this *QImage) ConvertToFormat3(f QImage__Format, colorTable []uint, flags } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} _ret := C.QImage_ConvertToFormat3(this.h, (C.int)(f), colorTable_ma, (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ConvertedTo2(f QImage__Format, flags ImageConversionFlag) *QImage { _ret := C.QImage_ConvertedTo2(this.h, (C.int)(f), (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -754,84 +814,84 @@ func (this *QImage) ConvertTo2(f QImage__Format, flags ImageConversionFlag) { func (this *QImage) CreateAlphaMask1(flags ImageConversionFlag) *QImage { _ret := C.QImage_CreateAlphaMask1(this.h, (C.int)(flags)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask1(clipTight bool) *QImage { _ret := C.QImage_CreateHeuristicMask1(this.h, (C.bool)(clipTight)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor2(color uint, mode MaskMode) *QImage { _ret := C.QImage_CreateMaskFromColor2(this.h, (C.uint)(color), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled3(w int, h int, aspectMode AspectRatioMode) *QImage { _ret := C.QImage_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QImage { _ret := C.QImage_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled2(s *QSize, aspectMode AspectRatioMode) *QImage { _ret := C.QImage_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QImage { _ret := C.QImage_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth2(w int, mode TransformationMode) *QImage { _ret := C.QImage_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight2(h int, mode TransformationMode) *QImage { _ret := C.QImage_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed2(matrix *QTransform, mode TransformationMode) *QImage { _ret := C.QImage_Transformed2(this.h, matrix.cPointer(), (C.int)(mode)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored1(horizontally bool) *QImage { _ret := C.QImage_Mirrored1(this.h, (C.bool)(horizontally)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored2(horizontally bool, vertically bool) *QImage { _ret := C.QImage_Mirrored2(this.h, (C.bool)(horizontally), (C.bool)(vertically)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -915,7 +975,7 @@ func QImage_FromData22(data QByteArrayView, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) _ret := C.QImage_FromData22(data.cPointer(), format_Cstring) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -924,7 +984,7 @@ func QImage_FromData3(data *byte, size int, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) _ret := C.QImage_FromData3((*C.uchar)(unsafe.Pointer(data)), (C.int)(size), format_Cstring) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -936,7 +996,7 @@ func QImage_FromData23(data []byte, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) _ret := C.QImage_FromData23(data_alias, format_Cstring) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -952,9 +1012,145 @@ func (this *QImage) Text1(key string) string { return _ret } +func (this *QImage) callVirtualBase_DevType() int { + + return (int)(C.QImage_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QImage) OnDevType(slot func(super func() int) int) { + C.QImage_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_DevType +func miqt_exec_callback_QImage_DevType(self *C.QImage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QImage) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QImage_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QImage) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QImage_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_PaintEngine +func miqt_exec_callback_QImage_PaintEngine(self *C.QImage, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QImage) callVirtualBase_Metric(metric QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QImage_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QImage) OnMetric(slot func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) { + C.QImage_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_Metric +func miqt_exec_callback_QImage_Metric(self *C.QImage, cb C.intptr_t, metric C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(metric) + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QImage) callVirtualBase_InitPainter(painter *QPainter) { + + C.QImage_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QImage) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QImage_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_InitPainter +func miqt_exec_callback_QImage_InitPainter(self *C.QImage, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QImage{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QImage) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QImage_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QImage) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QImage_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_Redirected +func miqt_exec_callback_QImage_Redirected(self *C.QImage, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QImage) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QImage_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QImage) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QImage_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImage_SharedPainter +func miqt_exec_callback_QImage_SharedPainter(self *C.QImage, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImage{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QImage) Delete() { - C.QImage_Delete(this.h) + C.QImage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qimage.h b/qt6/gen_qimage.h index 9b2e8685..7b681732 100644 --- a/qt6/gen_qimage.h +++ b/qt6/gen_qimage.h @@ -22,7 +22,9 @@ class QColorSpace; class QColorTransform; class QIODevice; class QImage; +class QPaintDevice; class QPaintEngine; +class QPainter; class QPixelFormat; class QPoint; class QRect; @@ -37,7 +39,9 @@ typedef struct QColorSpace QColorSpace; typedef struct QColorTransform QColorTransform; typedef struct QIODevice QIODevice; typedef struct QImage QImage; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; typedef struct QPixelFormat QPixelFormat; typedef struct QPoint QPoint; typedef struct QRect QRect; @@ -46,16 +50,16 @@ typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; #endif -QImage* QImage_new(); -QImage* QImage_new2(QSize* size, int format); -QImage* QImage_new3(int width, int height, int format); -QImage* QImage_new4(unsigned char* data, int width, int height, int format); -QImage* QImage_new5(const unsigned char* data, int width, int height, int format); -QImage* QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format); -QImage* QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format); -QImage* QImage_new8(struct miqt_string fileName); -QImage* QImage_new9(QImage* param1); -QImage* QImage_new10(struct miqt_string fileName, const char* format); +void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); void QImage_OperatorAssign(QImage* self, QImage* param1); void QImage_Swap(QImage* self, QImage* other); bool QImage_IsNull(const QImage* self); @@ -158,6 +162,7 @@ void QImage_SetText(QImage* self, struct miqt_string key, struct miqt_string val QPixelFormat* QImage_PixelFormat(const QImage* self); QPixelFormat* QImage_ToPixelFormat(int format); int QImage_ToImageFormat(QPixelFormat* format); +int QImage_Metric(const QImage* self, int metric); QImage* QImage_Copy1(const QImage* self, QRect* rect); QImage* QImage_ConvertToFormat22(const QImage* self, int f, int flags); QImage* QImage_ConvertToFormat3(const QImage* self, int f, struct miqt_array /* of unsigned int */ colorTable, int flags); @@ -190,7 +195,19 @@ QImage* QImage_FromData22(QByteArrayView* data, const char* format); QImage* QImage_FromData3(const unsigned char* data, int size, const char* format); QImage* QImage_FromData23(struct miqt_string data, const char* format); struct miqt_string QImage_Text1(const QImage* self, struct miqt_string key); -void QImage_Delete(QImage* self); +void QImage_override_virtual_DevType(void* self, intptr_t slot); +int QImage_virtualbase_DevType(const void* self); +void QImage_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QImage_virtualbase_PaintEngine(const void* self); +void QImage_override_virtual_Metric(void* self, intptr_t slot); +int QImage_virtualbase_Metric(const void* self, int metric); +void QImage_override_virtual_InitPainter(void* self, intptr_t slot); +void QImage_virtualbase_InitPainter(const void* self, QPainter* painter); +void QImage_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QImage_virtualbase_Redirected(const void* self, QPoint* offset); +void QImage_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QImage_virtualbase_SharedPainter(const void* self); +void QImage_Delete(QImage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qimageiohandler.cpp b/qt6/gen_qimageiohandler.cpp index 120ecc61..4e8c39b6 100644 --- a/qt6/gen_qimageiohandler.cpp +++ b/qt6/gen_qimageiohandler.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -97,8 +98,12 @@ bool QImageIOHandler_AllocateImage(QSize* size, int format, QImage* image) { return QImageIOHandler::allocateImage(*size, static_cast(format), image); } -void QImageIOHandler_Delete(QImageIOHandler* self) { - delete self; +void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self) { @@ -126,8 +131,9 @@ int QImageIOPlugin_Capabilities(const QImageIOPlugin* self, QIODevice* device, s return static_cast(_ret); } -QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device) { - return self->create(device); +QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format) { + QByteArray format_QByteArray(format.data, format.len); + return self->create(device, format_QByteArray); } struct miqt_string QImageIOPlugin_Tr2(const char* s, const char* c) { @@ -152,12 +158,11 @@ struct miqt_string QImageIOPlugin_Tr3(const char* s, const char* c, int n) { return _ms; } -QImageIOHandler* QImageIOPlugin_Create2(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format) { - QByteArray format_QByteArray(format.data, format.len); - return self->create(device, format_QByteArray); -} - -void QImageIOPlugin_Delete(QImageIOPlugin* self) { - delete self; +void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qimageiohandler.go b/qt6/gen_qimageiohandler.go index 9b16815d..119f292d 100644 --- a/qt6/gen_qimageiohandler.go +++ b/qt6/gen_qimageiohandler.go @@ -59,7 +59,8 @@ const ( ) type QImageIOHandler struct { - h *C.QImageIOHandler + h *C.QImageIOHandler + isSubclass bool } func (this *QImageIOHandler) cPointer() *C.QImageIOHandler { @@ -76,6 +77,7 @@ func (this *QImageIOHandler) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageIOHandler constructs the type using only CGO pointers. func newQImageIOHandler(h *C.QImageIOHandler) *QImageIOHandler { if h == nil { return nil @@ -83,8 +85,13 @@ func newQImageIOHandler(h *C.QImageIOHandler) *QImageIOHandler { return &QImageIOHandler{h: h} } +// UnsafeNewQImageIOHandler constructs the type using only unsafe pointers. func UnsafeNewQImageIOHandler(h unsafe.Pointer) *QImageIOHandler { - return newQImageIOHandler((*C.QImageIOHandler)(h)) + if h == nil { + return nil + } + + return &QImageIOHandler{h: (*C.QImageIOHandler)(h)} } func (this *QImageIOHandler) SetDevice(device *QIODevice) { @@ -92,7 +99,7 @@ func (this *QImageIOHandler) SetDevice(device *QIODevice) { } func (this *QImageIOHandler) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QImageIOHandler_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QImageIOHandler_Device(this.h)), nil, nil) } func (this *QImageIOHandler) SetFormat(format []byte) { @@ -180,7 +187,7 @@ func QImageIOHandler_AllocateImage(size QSize, format QImage__Format, image *QIm // Delete this object from C++ memory. func (this *QImageIOHandler) Delete() { - C.QImageIOHandler_Delete(this.h) + C.QImageIOHandler_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -193,7 +200,8 @@ func (this *QImageIOHandler) GoGC() { } type QImageIOPlugin struct { - h *C.QImageIOPlugin + h *C.QImageIOPlugin + isSubclass bool *QObject } @@ -211,15 +219,23 @@ func (this *QImageIOPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQImageIOPlugin(h *C.QImageIOPlugin) *QImageIOPlugin { +// newQImageIOPlugin constructs the type using only CGO pointers. +func newQImageIOPlugin(h *C.QImageIOPlugin, h_QObject *C.QObject) *QImageIOPlugin { if h == nil { return nil } - return &QImageIOPlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QImageIOPlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQImageIOPlugin(h unsafe.Pointer) *QImageIOPlugin { - return newQImageIOPlugin((*C.QImageIOPlugin)(h)) +// UnsafeNewQImageIOPlugin constructs the type using only unsafe pointers. +func UnsafeNewQImageIOPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImageIOPlugin { + if h == nil { + return nil + } + + return &QImageIOPlugin{h: (*C.QImageIOPlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QImageIOPlugin) MetaObject() *QMetaObject { @@ -248,8 +264,11 @@ func (this *QImageIOPlugin) Capabilities(device *QIODevice, format []byte) QImag return (QImageIOPlugin__Capability)(C.QImageIOPlugin_Capabilities(this.h, device.cPointer(), format_alias)) } -func (this *QImageIOPlugin) Create(device *QIODevice) *QImageIOHandler { - return UnsafeNewQImageIOHandler(unsafe.Pointer(C.QImageIOPlugin_Create(this.h, device.cPointer()))) +func (this *QImageIOPlugin) Create(device *QIODevice, format []byte) *QImageIOHandler { + format_alias := C.struct_miqt_string{} + format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) + format_alias.len = C.size_t(len(format)) + return UnsafeNewQImageIOHandler(unsafe.Pointer(C.QImageIOPlugin_Create(this.h, device.cPointer(), format_alias))) } func QImageIOPlugin_Tr2(s string, c string) string { @@ -274,16 +293,9 @@ func QImageIOPlugin_Tr3(s string, c string, n int) string { return _ret } -func (this *QImageIOPlugin) Create2(device *QIODevice, format []byte) *QImageIOHandler { - format_alias := C.struct_miqt_string{} - format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) - format_alias.len = C.size_t(len(format)) - return UnsafeNewQImageIOHandler(unsafe.Pointer(C.QImageIOPlugin_Create2(this.h, device.cPointer(), format_alias))) -} - // Delete this object from C++ memory. func (this *QImageIOPlugin) Delete() { - C.QImageIOPlugin_Delete(this.h) + C.QImageIOPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qimageiohandler.h b/qt6/gen_qimageiohandler.h index a282764c..f2bbea0b 100644 --- a/qt6/gen_qimageiohandler.h +++ b/qt6/gen_qimageiohandler.h @@ -21,6 +21,7 @@ class QImage; class QImageIOHandler; class QImageIOPlugin; class QMetaObject; +class QObject; class QRect; class QSize; class QVariant; @@ -31,6 +32,7 @@ typedef struct QImage QImage; typedef struct QImageIOHandler QImageIOHandler; typedef struct QImageIOPlugin QImageIOPlugin; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QVariant QVariant; @@ -55,17 +57,16 @@ int QImageIOHandler_NextImageDelay(const QImageIOHandler* self); int QImageIOHandler_CurrentImageNumber(const QImageIOHandler* self); QRect* QImageIOHandler_CurrentImageRect(const QImageIOHandler* self); bool QImageIOHandler_AllocateImage(QSize* size, int format, QImage* image); -void QImageIOHandler_Delete(QImageIOHandler* self); +void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass); QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self); void* QImageIOPlugin_Metacast(QImageIOPlugin* self, const char* param1); struct miqt_string QImageIOPlugin_Tr(const char* s); int QImageIOPlugin_Capabilities(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format); -QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device); +QImageIOHandler* QImageIOPlugin_Create(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format); struct miqt_string QImageIOPlugin_Tr2(const char* s, const char* c); struct miqt_string QImageIOPlugin_Tr3(const char* s, const char* c, int n); -QImageIOHandler* QImageIOPlugin_Create2(const QImageIOPlugin* self, QIODevice* device, struct miqt_string format); -void QImageIOPlugin_Delete(QImageIOPlugin* self); +void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qimagereader.cpp b/qt6/gen_qimagereader.cpp index 10099aef..bc0b8463 100644 --- a/qt6/gen_qimagereader.cpp +++ b/qt6/gen_qimagereader.cpp @@ -13,28 +13,33 @@ #include "gen_qimagereader.h" #include "_cgo_export.h" -QImageReader* QImageReader_new() { - return new QImageReader(); +void QImageReader_new(QImageReader** outptr_QImageReader) { + QImageReader* ret = new QImageReader(); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new2(QIODevice* device) { - return new QImageReader(device); +void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader) { + QImageReader* ret = new QImageReader(device); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new3(struct miqt_string fileName) { +void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImageReader(fileName_QString); + QImageReader* ret = new QImageReader(fileName_QString); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format) { +void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader) { QByteArray format_QByteArray(format.data, format.len); - return new QImageReader(device, format_QByteArray); + QImageReader* ret = new QImageReader(device, format_QByteArray); + *outptr_QImageReader = ret; } -QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format) { +void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QImageReader(fileName_QString, format_QByteArray); + QImageReader* ret = new QImageReader(fileName_QString, format_QByteArray); + *outptr_QImageReader = ret; } struct miqt_string QImageReader_Tr(const char* sourceText) { @@ -391,7 +396,11 @@ struct miqt_string QImageReader_Tr3(const char* sourceText, const char* disambig return _ms; } -void QImageReader_Delete(QImageReader* self) { - delete self; +void QImageReader_Delete(QImageReader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qimagereader.go b/qt6/gen_qimagereader.go index dc449a8f..809eeb6a 100644 --- a/qt6/gen_qimagereader.go +++ b/qt6/gen_qimagereader.go @@ -24,7 +24,8 @@ const ( ) type QImageReader struct { - h *C.QImageReader + h *C.QImageReader + isSubclass bool } func (this *QImageReader) cPointer() *C.QImageReader { @@ -41,6 +42,7 @@ func (this *QImageReader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageReader constructs the type using only CGO pointers. func newQImageReader(h *C.QImageReader) *QImageReader { if h == nil { return nil @@ -48,20 +50,33 @@ func newQImageReader(h *C.QImageReader) *QImageReader { return &QImageReader{h: h} } +// UnsafeNewQImageReader constructs the type using only unsafe pointers. func UnsafeNewQImageReader(h unsafe.Pointer) *QImageReader { - return newQImageReader((*C.QImageReader)(h)) + if h == nil { + return nil + } + + return &QImageReader{h: (*C.QImageReader)(h)} } // NewQImageReader constructs a new QImageReader object. func NewQImageReader() *QImageReader { - ret := C.QImageReader_new() - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new(&outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader2 constructs a new QImageReader object. func NewQImageReader2(device *QIODevice) *QImageReader { - ret := C.QImageReader_new2(device.cPointer()) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new2(device.cPointer(), &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader3 constructs a new QImageReader object. @@ -70,8 +85,12 @@ func NewQImageReader3(fileName string) *QImageReader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QImageReader_new3(fileName_ms) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new3(fileName_ms, &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader4 constructs a new QImageReader object. @@ -79,8 +98,12 @@ func NewQImageReader4(device *QIODevice, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageReader_new4(device.cPointer(), format_alias) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new4(device.cPointer(), format_alias, &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } // NewQImageReader5 constructs a new QImageReader object. @@ -92,8 +115,12 @@ func NewQImageReader5(fileName string, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageReader_new5(fileName_ms, format_alias) - return newQImageReader(ret) + var outptr_QImageReader *C.QImageReader = nil + + C.QImageReader_new5(fileName_ms, format_alias, &outptr_QImageReader) + ret := newQImageReader(outptr_QImageReader) + ret.isSubclass = true + return ret } func QImageReader_Tr(sourceText string) string { @@ -140,7 +167,7 @@ func (this *QImageReader) SetDevice(device *QIODevice) { } func (this *QImageReader) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QImageReader_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QImageReader_Device(this.h)), nil, nil) } func (this *QImageReader) SetFileName(fileName string) { @@ -287,7 +314,7 @@ func (this *QImageReader) CanRead() bool { func (this *QImageReader) Read() *QImage { _ret := C.QImageReader_Read(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -434,7 +461,7 @@ func QImageReader_Tr3(sourceText string, disambiguation string, n int) string { // Delete this object from C++ memory. func (this *QImageReader) Delete() { - C.QImageReader_Delete(this.h) + C.QImageReader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qimagereader.h b/qt6/gen_qimagereader.h index f39c9972..63119e11 100644 --- a/qt6/gen_qimagereader.h +++ b/qt6/gen_qimagereader.h @@ -32,11 +32,11 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif -QImageReader* QImageReader_new(); -QImageReader* QImageReader_new2(QIODevice* device); -QImageReader* QImageReader_new3(struct miqt_string fileName); -QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format); -QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format); +void QImageReader_new(QImageReader** outptr_QImageReader); +void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader); +void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader); +void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader); +void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader); struct miqt_string QImageReader_Tr(const char* sourceText); void QImageReader_SetFormat(QImageReader* self, struct miqt_string format); struct miqt_string QImageReader_Format(const QImageReader* self); @@ -90,7 +90,7 @@ int QImageReader_AllocationLimit(); void QImageReader_SetAllocationLimit(int mbLimit); struct miqt_string QImageReader_Tr2(const char* sourceText, const char* disambiguation); struct miqt_string QImageReader_Tr3(const char* sourceText, const char* disambiguation, int n); -void QImageReader_Delete(QImageReader* self); +void QImageReader_Delete(QImageReader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qimagewriter.cpp b/qt6/gen_qimagewriter.cpp index df86f10a..0ed79eb3 100644 --- a/qt6/gen_qimagewriter.cpp +++ b/qt6/gen_qimagewriter.cpp @@ -10,24 +10,28 @@ #include "gen_qimagewriter.h" #include "_cgo_export.h" -QImageWriter* QImageWriter_new() { - return new QImageWriter(); +void QImageWriter_new(QImageWriter** outptr_QImageWriter) { + QImageWriter* ret = new QImageWriter(); + *outptr_QImageWriter = ret; } -QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format) { +void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter) { QByteArray format_QByteArray(format.data, format.len); - return new QImageWriter(device, format_QByteArray); + QImageWriter* ret = new QImageWriter(device, format_QByteArray); + *outptr_QImageWriter = ret; } -QImageWriter* QImageWriter_new3(struct miqt_string fileName) { +void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QImageWriter(fileName_QString); + QImageWriter* ret = new QImageWriter(fileName_QString); + *outptr_QImageWriter = ret; } -QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format) { +void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QImageWriter(fileName_QString, format_QByteArray); + QImageWriter* ret = new QImageWriter(fileName_QString, format_QByteArray); + *outptr_QImageWriter = ret; } struct miqt_string QImageWriter_Tr(const char* sourceText) { @@ -263,7 +267,11 @@ struct miqt_string QImageWriter_Tr3(const char* sourceText, const char* disambig return _ms; } -void QImageWriter_Delete(QImageWriter* self) { - delete self; +void QImageWriter_Delete(QImageWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qimagewriter.go b/qt6/gen_qimagewriter.go index d8e10dad..aa0cbbf4 100644 --- a/qt6/gen_qimagewriter.go +++ b/qt6/gen_qimagewriter.go @@ -23,7 +23,8 @@ const ( ) type QImageWriter struct { - h *C.QImageWriter + h *C.QImageWriter + isSubclass bool } func (this *QImageWriter) cPointer() *C.QImageWriter { @@ -40,6 +41,7 @@ func (this *QImageWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQImageWriter constructs the type using only CGO pointers. func newQImageWriter(h *C.QImageWriter) *QImageWriter { if h == nil { return nil @@ -47,14 +49,23 @@ func newQImageWriter(h *C.QImageWriter) *QImageWriter { return &QImageWriter{h: h} } +// UnsafeNewQImageWriter constructs the type using only unsafe pointers. func UnsafeNewQImageWriter(h unsafe.Pointer) *QImageWriter { - return newQImageWriter((*C.QImageWriter)(h)) + if h == nil { + return nil + } + + return &QImageWriter{h: (*C.QImageWriter)(h)} } // NewQImageWriter constructs a new QImageWriter object. func NewQImageWriter() *QImageWriter { - ret := C.QImageWriter_new() - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new(&outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } // NewQImageWriter2 constructs a new QImageWriter object. @@ -62,8 +73,12 @@ func NewQImageWriter2(device *QIODevice, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageWriter_new2(device.cPointer(), format_alias) - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new2(device.cPointer(), format_alias, &outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } // NewQImageWriter3 constructs a new QImageWriter object. @@ -72,8 +87,12 @@ func NewQImageWriter3(fileName string) *QImageWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QImageWriter_new3(fileName_ms) - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new3(fileName_ms, &outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } // NewQImageWriter4 constructs a new QImageWriter object. @@ -85,8 +104,12 @@ func NewQImageWriter4(fileName string, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QImageWriter_new4(fileName_ms, format_alias) - return newQImageWriter(ret) + var outptr_QImageWriter *C.QImageWriter = nil + + C.QImageWriter_new4(fileName_ms, format_alias, &outptr_QImageWriter) + ret := newQImageWriter(outptr_QImageWriter) + ret.isSubclass = true + return ret } func QImageWriter_Tr(sourceText string) string { @@ -117,7 +140,7 @@ func (this *QImageWriter) SetDevice(device *QIODevice) { } func (this *QImageWriter) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QImageWriter_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QImageWriter_Device(this.h)), nil, nil) } func (this *QImageWriter) SetFileName(fileName string) { @@ -303,7 +326,7 @@ func QImageWriter_Tr3(sourceText string, disambiguation string, n int) string { // Delete this object from C++ memory. func (this *QImageWriter) Delete() { - C.QImageWriter_Delete(this.h) + C.QImageWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qimagewriter.h b/qt6/gen_qimagewriter.h index 02f21783..2991c65a 100644 --- a/qt6/gen_qimagewriter.h +++ b/qt6/gen_qimagewriter.h @@ -26,10 +26,10 @@ typedef struct QImage QImage; typedef struct QImageWriter QImageWriter; #endif -QImageWriter* QImageWriter_new(); -QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format); -QImageWriter* QImageWriter_new3(struct miqt_string fileName); -QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format); +void QImageWriter_new(QImageWriter** outptr_QImageWriter); +void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter); +void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter); +void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter); struct miqt_string QImageWriter_Tr(const char* sourceText); void QImageWriter_SetFormat(QImageWriter* self, struct miqt_string format); struct miqt_string QImageWriter_Format(const QImageWriter* self); @@ -61,7 +61,7 @@ struct miqt_array /* of struct miqt_string */ QImageWriter_SupportedMimeTypes() struct miqt_array /* of struct miqt_string */ QImageWriter_ImageFormatsForMimeType(struct miqt_string mimeType); struct miqt_string QImageWriter_Tr2(const char* sourceText, const char* disambiguation); struct miqt_string QImageWriter_Tr3(const char* sourceText, const char* disambiguation, int n); -void QImageWriter_Delete(QImageWriter* self); +void QImageWriter_Delete(QImageWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qinputdevice.cpp b/qt6/gen_qinputdevice.cpp index 81e2c71f..44cea863 100644 --- a/qt6/gen_qinputdevice.cpp +++ b/qt6/gen_qinputdevice.cpp @@ -1,38 +1,236 @@ +#include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qinputdevice.h" #include "_cgo_export.h" -QInputDevice* QInputDevice_new() { - return new QInputDevice(); +class MiqtVirtualQInputDevice : public virtual QInputDevice { +public: + + MiqtVirtualQInputDevice(): QInputDevice() {}; + MiqtVirtualQInputDevice(const QString& name, qint64 systemId, QInputDevice::DeviceType typeVal): QInputDevice(name, systemId, typeVal) {}; + MiqtVirtualQInputDevice(QObject* parent): QInputDevice(parent) {}; + MiqtVirtualQInputDevice(const QString& name, qint64 systemId, QInputDevice::DeviceType typeVal, const QString& seatName): QInputDevice(name, systemId, typeVal, seatName) {}; + MiqtVirtualQInputDevice(const QString& name, qint64 systemId, QInputDevice::DeviceType typeVal, const QString& seatName, QObject* parent): QInputDevice(name, systemId, typeVal, seatName, parent) {}; + + virtual ~MiqtVirtualQInputDevice() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QInputDevice::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QInputDevice_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QInputDevice::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QInputDevice::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QInputDevice_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QInputDevice::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QInputDevice::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QInputDevice_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QInputDevice::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QInputDevice::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QInputDevice_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QInputDevice::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QInputDevice::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QInputDevice_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QInputDevice::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QInputDevice::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QInputDevice_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QInputDevice::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QInputDevice::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QInputDevice_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QInputDevice::disconnectNotify(*signal); + + } + +}; + +void QInputDevice_new(QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { + MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(); + *outptr_QInputDevice = ret; + *outptr_QObject = static_cast(ret); } -QInputDevice* QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal) { +void QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QInputDevice(name_QString, static_cast(systemId), static_cast(typeVal)); + MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal)); + *outptr_QInputDevice = ret; + *outptr_QObject = static_cast(ret); } -QInputDevice* QInputDevice_new3(QObject* parent) { - return new QInputDevice(parent); +void QInputDevice_new3(QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { + MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(parent); + *outptr_QInputDevice = ret; + *outptr_QObject = static_cast(ret); } -QInputDevice* QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName) { +void QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - return new QInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString); + MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString); + *outptr_QInputDevice = ret; + *outptr_QObject = static_cast(ret); } -QInputDevice* QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent) { +void QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - return new QInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString, parent); + MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString, parent); + *outptr_QInputDevice = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QInputDevice_MetaObject(const QInputDevice* self) { @@ -145,7 +343,7 @@ void QInputDevice_AvailableVirtualGeometryChanged(QInputDevice* self, QRect* are } void QInputDevice_connect_AvailableVirtualGeometryChanged(QInputDevice* self, intptr_t slot) { - QInputDevice::connect(self, static_cast(&QInputDevice::availableVirtualGeometryChanged), self, [=](QRect area) { + MiqtVirtualQInputDevice::connect(self, static_cast(&QInputDevice::availableVirtualGeometryChanged), self, [=](QRect area) { QRect* sigval1 = new QRect(area); miqt_exec_callback_QInputDevice_AvailableVirtualGeometryChanged(slot, sigval1); }); @@ -178,7 +376,67 @@ QInputDevice* QInputDevice_PrimaryKeyboard1(struct miqt_string seatName) { return (QInputDevice*) QInputDevice::primaryKeyboard(seatName_QString); } -void QInputDevice_Delete(QInputDevice* self) { - delete self; +void QInputDevice_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__Event = slot; +} + +bool QInputDevice_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_Event(event); +} + +void QInputDevice_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__EventFilter = slot; +} + +bool QInputDevice_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QInputDevice_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__TimerEvent = slot; +} + +void QInputDevice_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_TimerEvent(event); +} + +void QInputDevice_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__ChildEvent = slot; +} + +void QInputDevice_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_ChildEvent(event); +} + +void QInputDevice_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__CustomEvent = slot; +} + +void QInputDevice_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_CustomEvent(event); +} + +void QInputDevice_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__ConnectNotify = slot; +} + +void QInputDevice_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QInputDevice_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QInputDevice*)(self) )->handle__DisconnectNotify = slot; +} + +void QInputDevice_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQInputDevice*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QInputDevice_Delete(QInputDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qinputdevice.go b/qt6/gen_qinputdevice.go index fcbe9248..69a9592c 100644 --- a/qt6/gen_qinputdevice.go +++ b/qt6/gen_qinputdevice.go @@ -50,7 +50,8 @@ const ( ) type QInputDevice struct { - h *C.QInputDevice + h *C.QInputDevice + isSubclass bool *QObject } @@ -68,21 +69,34 @@ func (this *QInputDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputDevice(h *C.QInputDevice) *QInputDevice { +// newQInputDevice constructs the type using only CGO pointers. +func newQInputDevice(h *C.QInputDevice, h_QObject *C.QObject) *QInputDevice { if h == nil { return nil } - return &QInputDevice{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QInputDevice{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQInputDevice(h unsafe.Pointer) *QInputDevice { - return newQInputDevice((*C.QInputDevice)(h)) +// UnsafeNewQInputDevice constructs the type using only unsafe pointers. +func UnsafeNewQInputDevice(h unsafe.Pointer, h_QObject unsafe.Pointer) *QInputDevice { + if h == nil { + return nil + } + + return &QInputDevice{h: (*C.QInputDevice)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQInputDevice constructs a new QInputDevice object. func NewQInputDevice() *QInputDevice { - ret := C.QInputDevice_new() - return newQInputDevice(ret) + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QInputDevice_new(&outptr_QInputDevice, &outptr_QObject) + ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQInputDevice2 constructs a new QInputDevice object. @@ -91,14 +105,24 @@ func NewQInputDevice2(name string, systemId int64, typeVal QInputDevice__DeviceT name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QInputDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(typeVal)) - return newQInputDevice(ret) + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QInputDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(typeVal), &outptr_QInputDevice, &outptr_QObject) + ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQInputDevice3 constructs a new QInputDevice object. func NewQInputDevice3(parent *QObject) *QInputDevice { - ret := C.QInputDevice_new3(parent.cPointer()) - return newQInputDevice(ret) + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QInputDevice_new3(parent.cPointer(), &outptr_QInputDevice, &outptr_QObject) + ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQInputDevice4 constructs a new QInputDevice object. @@ -111,8 +135,13 @@ func NewQInputDevice4(name string, systemId int64, typeVal QInputDevice__DeviceT seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - ret := C.QInputDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms) - return newQInputDevice(ret) + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QInputDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms, &outptr_QInputDevice, &outptr_QObject) + ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQInputDevice5 constructs a new QInputDevice object. @@ -125,8 +154,13 @@ func NewQInputDevice5(name string, systemId int64, typeVal QInputDevice__DeviceT seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - ret := C.QInputDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms, parent.cPointer()) - return newQInputDevice(ret) + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QInputDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms, parent.cPointer(), &outptr_QInputDevice, &outptr_QObject) + ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QInputDevice) MetaObject() *QMetaObject { @@ -203,13 +237,13 @@ func QInputDevice_Devices() []*QInputDevice { _ret := make([]*QInputDevice, int(_ma.len)) _outCast := (*[0xffff]*C.QInputDevice)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQInputDevice(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQInputDevice(unsafe.Pointer(_outCast[i]), nil) } return _ret } func QInputDevice_PrimaryKeyboard() *QInputDevice { - return UnsafeNewQInputDevice(unsafe.Pointer(C.QInputDevice_PrimaryKeyboard())) + return UnsafeNewQInputDevice(unsafe.Pointer(C.QInputDevice_PrimaryKeyboard()), nil) } func (this *QInputDevice) OperatorEqual(other *QInputDevice) bool { @@ -266,12 +300,178 @@ func QInputDevice_PrimaryKeyboard1(seatName string) *QInputDevice { seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - return UnsafeNewQInputDevice(unsafe.Pointer(C.QInputDevice_PrimaryKeyboard1(seatName_ms))) + return UnsafeNewQInputDevice(unsafe.Pointer(C.QInputDevice_PrimaryKeyboard1(seatName_ms)), nil) +} + +func (this *QInputDevice) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QInputDevice_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QInputDevice) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QInputDevice_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_Event +func miqt_exec_callback_QInputDevice_Event(self *C.QInputDevice, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QInputDevice{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QInputDevice) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QInputDevice_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QInputDevice) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QInputDevice_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_EventFilter +func miqt_exec_callback_QInputDevice_EventFilter(self *C.QInputDevice, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QInputDevice{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QInputDevice) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QInputDevice_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QInputDevice) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QInputDevice_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_TimerEvent +func miqt_exec_callback_QInputDevice_TimerEvent(self *C.QInputDevice, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QInputDevice{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QInputDevice) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QInputDevice_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QInputDevice) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QInputDevice_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_ChildEvent +func miqt_exec_callback_QInputDevice_ChildEvent(self *C.QInputDevice, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QInputDevice{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QInputDevice) callVirtualBase_CustomEvent(event *QEvent) { + + C.QInputDevice_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QInputDevice) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QInputDevice_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_CustomEvent +func miqt_exec_callback_QInputDevice_CustomEvent(self *C.QInputDevice, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QInputDevice{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QInputDevice) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QInputDevice_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QInputDevice) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QInputDevice_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_ConnectNotify +func miqt_exec_callback_QInputDevice_ConnectNotify(self *C.QInputDevice, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QInputDevice{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QInputDevice) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QInputDevice_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QInputDevice) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QInputDevice_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDevice_DisconnectNotify +func miqt_exec_callback_QInputDevice_DisconnectNotify(self *C.QInputDevice, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QInputDevice{h: self}).callVirtualBase_DisconnectNotify, slotval1) + } // Delete this object from C++ memory. func (this *QInputDevice) Delete() { - C.QInputDevice_Delete(this.h) + C.QInputDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qinputdevice.h b/qt6/gen_qinputdevice.h index 5c06718b..81b25f9c 100644 --- a/qt6/gen_qinputdevice.h +++ b/qt6/gen_qinputdevice.h @@ -15,22 +15,30 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QInputDevice; +class QMetaMethod; class QMetaObject; class QObject; class QRect; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QInputDevice QInputDevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; +typedef struct QTimerEvent QTimerEvent; #endif -QInputDevice* QInputDevice_new(); -QInputDevice* QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal); -QInputDevice* QInputDevice_new3(QObject* parent); -QInputDevice* QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName); -QInputDevice* QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent); +void QInputDevice_new(QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QInputDevice_new3(QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); QMetaObject* QInputDevice_MetaObject(const QInputDevice* self); void* QInputDevice_Metacast(QInputDevice* self, const char* param1); struct miqt_string QInputDevice_Tr(const char* s); @@ -50,7 +58,21 @@ void QInputDevice_connect_AvailableVirtualGeometryChanged(QInputDevice* self, in struct miqt_string QInputDevice_Tr2(const char* s, const char* c); struct miqt_string QInputDevice_Tr3(const char* s, const char* c, int n); QInputDevice* QInputDevice_PrimaryKeyboard1(struct miqt_string seatName); -void QInputDevice_Delete(QInputDevice* self); +void QInputDevice_override_virtual_Event(void* self, intptr_t slot); +bool QInputDevice_virtualbase_Event(void* self, QEvent* event); +void QInputDevice_override_virtual_EventFilter(void* self, intptr_t slot); +bool QInputDevice_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QInputDevice_override_virtual_TimerEvent(void* self, intptr_t slot); +void QInputDevice_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QInputDevice_override_virtual_ChildEvent(void* self, intptr_t slot); +void QInputDevice_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QInputDevice_override_virtual_CustomEvent(void* self, intptr_t slot); +void QInputDevice_virtualbase_CustomEvent(void* self, QEvent* event); +void QInputDevice_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QInputDevice_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QInputDevice_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QInputDevice_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QInputDevice_Delete(QInputDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qinputdialog.cpp b/qt6/gen_qinputdialog.cpp index ef37e857..7d3f4a37 100644 --- a/qt6/gen_qinputdialog.cpp +++ b/qt6/gen_qinputdialog.cpp @@ -1,6 +1,15 @@ +#include +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include #include #include #include @@ -10,16 +19,369 @@ #include "gen_qinputdialog.h" #include "_cgo_export.h" -QInputDialog* QInputDialog_new(QWidget* parent) { - return new QInputDialog(parent); +class MiqtVirtualQInputDialog : public virtual QInputDialog { +public: + + MiqtVirtualQInputDialog(QWidget* parent): QInputDialog(parent) {}; + MiqtVirtualQInputDialog(): QInputDialog() {}; + MiqtVirtualQInputDialog(QWidget* parent, Qt::WindowFlags flags): QInputDialog(parent, flags) {}; + + virtual ~MiqtVirtualQInputDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QInputDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QInputDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QInputDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QInputDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QInputDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QInputDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QInputDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QInputDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QInputDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QInputDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QInputDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QInputDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QInputDialog::open(); + return; + } + + + miqt_exec_callback_QInputDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QInputDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QInputDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QInputDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QInputDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QInputDialog::accept(); + return; + } + + + miqt_exec_callback_QInputDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QInputDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QInputDialog::reject(); + return; + } + + + miqt_exec_callback_QInputDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QInputDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QInputDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QInputDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QInputDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QInputDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QInputDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QInputDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QInputDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QInputDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QInputDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QInputDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QInputDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QInputDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QInputDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QInputDialog::eventFilter(param1, param2); + + } + +}; + +void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent); + *outptr_QInputDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QInputDialog* QInputDialog_new2() { - return new QInputDialog(); +void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(); + *outptr_QInputDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QInputDialog* QInputDialog_new3(QWidget* parent, int flags) { - return new QInputDialog(parent, static_cast(flags)); +void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent, static_cast(flags)); + *outptr_QInputDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QInputDialog_MetaObject(const QInputDialog* self) { @@ -335,7 +697,7 @@ void QInputDialog_TextValueChanged(QInputDialog* self, struct miqt_string text) } void QInputDialog_connect_TextValueChanged(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::textValueChanged), self, [=](const QString& text) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::textValueChanged), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -354,7 +716,7 @@ void QInputDialog_TextValueSelected(QInputDialog* self, struct miqt_string text) } void QInputDialog_connect_TextValueSelected(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::textValueSelected), self, [=](const QString& text) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::textValueSelected), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -372,7 +734,7 @@ void QInputDialog_IntValueChanged(QInputDialog* self, int value) { } void QInputDialog_connect_IntValueChanged(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::intValueChanged), self, [=](int value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::intValueChanged), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QInputDialog_IntValueChanged(slot, sigval1); }); @@ -383,7 +745,7 @@ void QInputDialog_IntValueSelected(QInputDialog* self, int value) { } void QInputDialog_connect_IntValueSelected(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::intValueSelected), self, [=](int value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::intValueSelected), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QInputDialog_IntValueSelected(slot, sigval1); }); @@ -394,7 +756,7 @@ void QInputDialog_DoubleValueChanged(QInputDialog* self, double value) { } void QInputDialog_connect_DoubleValueChanged(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::doubleValueChanged), self, [=](double value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::doubleValueChanged), self, [=](double value) { double sigval1 = value; miqt_exec_callback_QInputDialog_DoubleValueChanged(slot, sigval1); }); @@ -405,7 +767,7 @@ void QInputDialog_DoubleValueSelected(QInputDialog* self, double value) { } void QInputDialog_connect_DoubleValueSelected(QInputDialog* self, intptr_t slot) { - QInputDialog::connect(self, static_cast(&QInputDialog::doubleValueSelected), self, [=](double value) { + MiqtVirtualQInputDialog::connect(self, static_cast(&QInputDialog::doubleValueSelected), self, [=](double value) { double sigval1 = value; miqt_exec_callback_QInputDialog_DoubleValueSelected(slot, sigval1); }); @@ -744,7 +1106,123 @@ double QInputDialog_GetDouble10(QWidget* parent, struct miqt_string title, struc return QInputDialog::getDouble(parent, title_QString, label_QString, static_cast(value), static_cast(minValue), static_cast(maxValue), static_cast(decimals), ok, static_cast(flags), static_cast(step)); } -void QInputDialog_Delete(QInputDialog* self) { - delete self; +void QInputDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QInputDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQInputDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QInputDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QInputDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQInputDialog*)(self) )->virtualbase_SizeHint(); +} + +void QInputDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__SetVisible = slot; +} + +void QInputDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QInputDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Done = slot; +} + +void QInputDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Done(result); +} + +void QInputDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Open = slot; +} + +void QInputDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Open(); +} + +void QInputDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Exec = slot; +} + +int QInputDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Exec(); +} + +void QInputDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Accept = slot; +} + +void QInputDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Accept(); +} + +void QInputDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__Reject = slot; +} + +void QInputDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_Reject(); +} + +void QInputDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QInputDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QInputDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__CloseEvent = slot; +} + +void QInputDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QInputDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__ShowEvent = slot; +} + +void QInputDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QInputDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QInputDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QInputDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QInputDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QInputDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QInputDialog*)(self) )->handle__EventFilter = slot; +} + +bool QInputDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQInputDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QInputDialog_Delete(QInputDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qinputdialog.go b/qt6/gen_qinputdialog.go index fb19af98..75534c27 100644 --- a/qt6/gen_qinputdialog.go +++ b/qt6/gen_qinputdialog.go @@ -31,7 +31,8 @@ const ( ) type QInputDialog struct { - h *C.QInputDialog + h *C.QInputDialog + isSubclass bool *QDialog } @@ -49,33 +50,65 @@ func (this *QInputDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputDialog(h *C.QInputDialog) *QInputDialog { +// newQInputDialog constructs the type using only CGO pointers. +func newQInputDialog(h *C.QInputDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QInputDialog { if h == nil { return nil } - return &QInputDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QInputDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQInputDialog(h unsafe.Pointer) *QInputDialog { - return newQInputDialog((*C.QInputDialog)(h)) +// UnsafeNewQInputDialog constructs the type using only unsafe pointers. +func UnsafeNewQInputDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QInputDialog { + if h == nil { + return nil + } + + return &QInputDialog{h: (*C.QInputDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQInputDialog constructs a new QInputDialog object. func NewQInputDialog(parent *QWidget) *QInputDialog { - ret := C.QInputDialog_new(parent.cPointer()) - return newQInputDialog(ret) + var outptr_QInputDialog *C.QInputDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QInputDialog_new(parent.cPointer(), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQInputDialog2 constructs a new QInputDialog object. func NewQInputDialog2() *QInputDialog { - ret := C.QInputDialog_new2() - return newQInputDialog(ret) + var outptr_QInputDialog *C.QInputDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QInputDialog_new2(&outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQInputDialog3 constructs a new QInputDialog object. func NewQInputDialog3(parent *QWidget, flags WindowType) *QInputDialog { - ret := C.QInputDialog_new3(parent.cPointer(), (C.int)(flags)) - return newQInputDialog(ret) + var outptr_QInputDialog *C.QInputDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QInputDialog_new3(parent.cPointer(), (C.int)(flags), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QInputDialog) MetaObject() *QMetaObject { @@ -1013,9 +1046,328 @@ func QInputDialog_GetDouble10(parent *QWidget, title string, label string, value return (float64)(C.QInputDialog_GetDouble10(parent.cPointer(), title_ms, label_ms, (C.double)(value), (C.double)(minValue), (C.double)(maxValue), (C.int)(decimals), (*C.bool)(unsafe.Pointer(ok)), (C.int)(flags), (C.double)(step))) } +func (this *QInputDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QInputDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QInputDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QInputDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_MinimumSizeHint +func miqt_exec_callback_QInputDialog_MinimumSizeHint(self *C.QInputDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QInputDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QInputDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QInputDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QInputDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_SizeHint +func miqt_exec_callback_QInputDialog_SizeHint(self *C.QInputDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QInputDialog) callVirtualBase_SetVisible(visible bool) { + + C.QInputDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QInputDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QInputDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_SetVisible +func miqt_exec_callback_QInputDialog_SetVisible(self *C.QInputDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QInputDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_Done(result int) { + + C.QInputDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QInputDialog) OnDone(slot func(super func(result int), result int)) { + C.QInputDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Done +func miqt_exec_callback_QInputDialog_Done(self *C.QInputDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QInputDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_Open() { + + C.QInputDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QInputDialog) OnOpen(slot func(super func())) { + C.QInputDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Open +func miqt_exec_callback_QInputDialog_Open(self *C.QInputDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QInputDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QInputDialog) callVirtualBase_Exec() int { + + return (int)(C.QInputDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QInputDialog) OnExec(slot func(super func() int) int) { + C.QInputDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Exec +func miqt_exec_callback_QInputDialog_Exec(self *C.QInputDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QInputDialog) callVirtualBase_Accept() { + + C.QInputDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QInputDialog) OnAccept(slot func(super func())) { + C.QInputDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Accept +func miqt_exec_callback_QInputDialog_Accept(self *C.QInputDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QInputDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QInputDialog) callVirtualBase_Reject() { + + C.QInputDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QInputDialog) OnReject(slot func(super func())) { + C.QInputDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_Reject +func miqt_exec_callback_QInputDialog_Reject(self *C.QInputDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QInputDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QInputDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QInputDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QInputDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_KeyPressEvent +func miqt_exec_callback_QInputDialog_KeyPressEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QInputDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QInputDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_CloseEvent +func miqt_exec_callback_QInputDialog_CloseEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QInputDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QInputDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_ShowEvent +func miqt_exec_callback_QInputDialog_ShowEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QInputDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QInputDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_ResizeEvent +func miqt_exec_callback_QInputDialog_ResizeEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QInputDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QInputDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QInputDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_ContextMenuEvent +func miqt_exec_callback_QInputDialog_ContextMenuEvent(self *C.QInputDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QInputDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QInputDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QInputDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QInputDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QInputDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QInputDialog_EventFilter +func miqt_exec_callback_QInputDialog_EventFilter(self *C.QInputDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QInputDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QInputDialog) Delete() { - C.QInputDialog_Delete(this.h) + C.QInputDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qinputdialog.h b/qt6/gen_qinputdialog.h index 3ab6ce3f..366eac59 100644 --- a/qt6/gen_qinputdialog.h +++ b/qt6/gen_qinputdialog.h @@ -15,20 +15,38 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; class QInputDialog; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QResizeEvent; +class QShowEvent; class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; typedef struct QInputDialog QInputDialog; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QInputDialog* QInputDialog_new(QWidget* parent); -QInputDialog* QInputDialog_new2(); -QInputDialog* QInputDialog_new3(QWidget* parent, int flags); +void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QInputDialog_MetaObject(const QInputDialog* self); void* QInputDialog_Metacast(QInputDialog* self, const char* param1); struct miqt_string QInputDialog_Tr(const char* s); @@ -123,7 +141,35 @@ double QInputDialog_GetDouble7(QWidget* parent, struct miqt_string title, struct double QInputDialog_GetDouble8(QWidget* parent, struct miqt_string title, struct miqt_string label, double value, double minValue, double maxValue, int decimals, bool* ok); double QInputDialog_GetDouble9(QWidget* parent, struct miqt_string title, struct miqt_string label, double value, double minValue, double maxValue, int decimals, bool* ok, int flags); double QInputDialog_GetDouble10(QWidget* parent, struct miqt_string title, struct miqt_string label, double value, double minValue, double maxValue, int decimals, bool* ok, int flags, double step); -void QInputDialog_Delete(QInputDialog* self); +void QInputDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QInputDialog_virtualbase_MinimumSizeHint(const void* self); +void QInputDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QInputDialog_virtualbase_SizeHint(const void* self); +void QInputDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QInputDialog_virtualbase_SetVisible(void* self, bool visible); +void QInputDialog_override_virtual_Done(void* self, intptr_t slot); +void QInputDialog_virtualbase_Done(void* self, int result); +void QInputDialog_override_virtual_Open(void* self, intptr_t slot); +void QInputDialog_virtualbase_Open(void* self); +void QInputDialog_override_virtual_Exec(void* self, intptr_t slot); +int QInputDialog_virtualbase_Exec(void* self); +void QInputDialog_override_virtual_Accept(void* self, intptr_t slot); +void QInputDialog_virtualbase_Accept(void* self); +void QInputDialog_override_virtual_Reject(void* self, intptr_t slot); +void QInputDialog_virtualbase_Reject(void* self); +void QInputDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QInputDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QInputDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QInputDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QInputDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QInputDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QInputDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QInputDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QInputDialog_Delete(QInputDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qinputmethod.cpp b/qt6/gen_qinputmethod.cpp index 23932e67..16e82b1f 100644 --- a/qt6/gen_qinputmethod.cpp +++ b/qt6/gen_qinputmethod.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qinputmethod.go b/qt6/gen_qinputmethod.go index 0716a2a8..314ad3f0 100644 --- a/qt6/gen_qinputmethod.go +++ b/qt6/gen_qinputmethod.go @@ -21,7 +21,8 @@ const ( ) type QInputMethod struct { - h *C.QInputMethod + h *C.QInputMethod + isSubclass bool *QObject } @@ -39,15 +40,23 @@ func (this *QInputMethod) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQInputMethod(h *C.QInputMethod) *QInputMethod { +// newQInputMethod constructs the type using only CGO pointers. +func newQInputMethod(h *C.QInputMethod, h_QObject *C.QObject) *QInputMethod { if h == nil { return nil } - return &QInputMethod{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QInputMethod{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQInputMethod(h unsafe.Pointer) *QInputMethod { - return newQInputMethod((*C.QInputMethod)(h)) +// UnsafeNewQInputMethod constructs the type using only unsafe pointers. +func UnsafeNewQInputMethod(h unsafe.Pointer, h_QObject unsafe.Pointer) *QInputMethod { + if h == nil { + return nil + } + + return &QInputMethod{h: (*C.QInputMethod)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QInputMethod) MetaObject() *QMetaObject { diff --git a/qt6/gen_qinputmethod.h b/qt6/gen_qinputmethod.h index 3607eeeb..357c676f 100644 --- a/qt6/gen_qinputmethod.h +++ b/qt6/gen_qinputmethod.h @@ -18,6 +18,7 @@ extern "C" { class QInputMethod; class QLocale; class QMetaObject; +class QObject; class QRectF; class QTransform; class QVariant; @@ -25,6 +26,7 @@ class QVariant; typedef struct QInputMethod QInputMethod; typedef struct QLocale QLocale; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRectF QRectF; typedef struct QTransform QTransform; typedef struct QVariant QVariant; diff --git a/qt6/gen_qiodevice.cpp b/qt6/gen_qiodevice.cpp index cfe83ea9..fc7325f2 100644 --- a/qt6/gen_qiodevice.cpp +++ b/qt6/gen_qiodevice.cpp @@ -1,6 +1,8 @@ #include #include +#include #include +#include #include #include #include @@ -340,7 +342,11 @@ struct miqt_string QIODevice_ReadLine1(QIODevice* self, long long maxlen) { return _ms; } -void QIODevice_Delete(QIODevice* self) { - delete self; +void QIODevice_Delete(QIODevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qiodevice.go b/qt6/gen_qiodevice.go index 899255a3..439d809e 100644 --- a/qt6/gen_qiodevice.go +++ b/qt6/gen_qiodevice.go @@ -15,7 +15,8 @@ import ( ) type QIODevice struct { - h *C.QIODevice + h *C.QIODevice + isSubclass bool *QObject *QIODeviceBase } @@ -34,15 +35,25 @@ func (this *QIODevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIODevice(h *C.QIODevice) *QIODevice { +// newQIODevice constructs the type using only CGO pointers. +func newQIODevice(h *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QIODevice { if h == nil { return nil } - return &QIODevice{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QIODeviceBase: UnsafeNewQIODeviceBase(unsafe.Pointer(h))} + return &QIODevice{h: h, + QObject: newQObject(h_QObject), + QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} } -func UnsafeNewQIODevice(h unsafe.Pointer) *QIODevice { - return newQIODevice((*C.QIODevice)(h)) +// UnsafeNewQIODevice constructs the type using only unsafe pointers. +func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QIODevice { + if h == nil { + return nil + } + + return &QIODevice{h: (*C.QIODevice)(h), + QObject: UnsafeNewQObject(h_QObject), + QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} } func (this *QIODevice) MetaObject() *QMetaObject { @@ -414,7 +425,7 @@ func (this *QIODevice) ReadLine1(maxlen int64) []byte { // Delete this object from C++ memory. func (this *QIODevice) Delete() { - C.QIODevice_Delete(this.h) + C.QIODevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qiodevice.h b/qt6/gen_qiodevice.h index e409e875..20d1e324 100644 --- a/qt6/gen_qiodevice.h +++ b/qt6/gen_qiodevice.h @@ -17,11 +17,15 @@ extern "C" { #ifdef __cplusplus class QByteArray; class QIODevice; +class QIODeviceBase; class QMetaObject; +class QObject; #else typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; #endif QMetaObject* QIODevice_MetaObject(const QIODevice* self); @@ -83,10 +87,14 @@ void QIODevice_AboutToClose(QIODevice* self); void QIODevice_connect_AboutToClose(QIODevice* self, intptr_t slot); void QIODevice_ReadChannelFinished(QIODevice* self); void QIODevice_connect_ReadChannelFinished(QIODevice* self, intptr_t slot); +long long QIODevice_ReadData(QIODevice* self, char* data, long long maxlen); +long long QIODevice_ReadLineData(QIODevice* self, char* data, long long maxlen); +long long QIODevice_SkipData(QIODevice* self, long long maxSize); +long long QIODevice_WriteData(QIODevice* self, const char* data, long long lenVal); struct miqt_string QIODevice_Tr2(const char* s, const char* c); struct miqt_string QIODevice_Tr3(const char* s, const char* c, int n); struct miqt_string QIODevice_ReadLine1(QIODevice* self, long long maxlen); -void QIODevice_Delete(QIODevice* self); +void QIODevice_Delete(QIODevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qiodevicebase.go b/qt6/gen_qiodevicebase.go index 1fb3617b..89ef696d 100644 --- a/qt6/gen_qiodevicebase.go +++ b/qt6/gen_qiodevicebase.go @@ -28,7 +28,8 @@ const ( ) type QIODeviceBase struct { - h *C.QIODeviceBase + h *C.QIODeviceBase + isSubclass bool } func (this *QIODeviceBase) cPointer() *C.QIODeviceBase { @@ -45,6 +46,7 @@ func (this *QIODeviceBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIODeviceBase constructs the type using only CGO pointers. func newQIODeviceBase(h *C.QIODeviceBase) *QIODeviceBase { if h == nil { return nil @@ -52,6 +54,11 @@ func newQIODeviceBase(h *C.QIODeviceBase) *QIODeviceBase { return &QIODeviceBase{h: h} } +// UnsafeNewQIODeviceBase constructs the type using only unsafe pointers. func UnsafeNewQIODeviceBase(h unsafe.Pointer) *QIODeviceBase { - return newQIODeviceBase((*C.QIODeviceBase)(h)) + if h == nil { + return nil + } + + return &QIODeviceBase{h: (*C.QIODeviceBase)(h)} } diff --git a/qt6/gen_qitemdelegate.cpp b/qt6/gen_qitemdelegate.cpp index 3094412b..65e1a8d1 100644 --- a/qt6/gen_qitemdelegate.cpp +++ b/qt6/gen_qitemdelegate.cpp @@ -1,10 +1,17 @@ +#include #include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -15,12 +22,482 @@ #include "gen_qitemdelegate.h" #include "_cgo_export.h" -QItemDelegate* QItemDelegate_new() { - return new QItemDelegate(); +class MiqtVirtualQItemDelegate : public virtual QItemDelegate { +public: + + MiqtVirtualQItemDelegate(): QItemDelegate() {}; + MiqtVirtualQItemDelegate(QObject* parent): QItemDelegate(parent) {}; + + virtual ~MiqtVirtualQItemDelegate() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__Paint == 0) { + QItemDelegate::paint(painter, option, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_Paint(const_cast(this), handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) const { + + QItemDelegate::paint(painter, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__SizeHint == 0) { + return QItemDelegate::sizeHint(option, index); + } + + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval1 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QItemDelegate_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint(QStyleOptionViewItem* option, QModelIndex* index) const { + + return new QSize(QItemDelegate::sizeHint(*option, *index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateEditor = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__CreateEditor == 0) { + return QItemDelegate::createEditor(parent, option, index); + } + + QWidget* sigval1 = parent; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + QWidget* callback_return_value = miqt_exec_callback_QItemDelegate_CreateEditor(const_cast(this), handle__CreateEditor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateEditor(QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) const { + + return QItemDelegate::createEditor(parent, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override { + if (handle__SetEditorData == 0) { + QItemDelegate::setEditorData(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_SetEditorData(const_cast(this), handle__SetEditorData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditorData(QWidget* editor, QModelIndex* index) const { + + QItemDelegate::setEditorData(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModelData = 0; + + // Subclass to allow providing a Go implementation + virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override { + if (handle__SetModelData == 0) { + QItemDelegate::setModelData(editor, model, index); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemModel* sigval2 = model; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_SetModelData(const_cast(this), handle__SetModelData, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModelData(QWidget* editor, QAbstractItemModel* model, QModelIndex* index) const { + + QItemDelegate::setModelData(editor, model, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__UpdateEditorGeometry == 0) { + QItemDelegate::updateEditorGeometry(editor, option, index); + return; + } + + QWidget* sigval1 = editor; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_UpdateEditorGeometry(const_cast(this), handle__UpdateEditorGeometry, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometry(QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) const { + + QItemDelegate::updateEditorGeometry(editor, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawDisplay = 0; + + // Subclass to allow providing a Go implementation + virtual void drawDisplay(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const override { + if (handle__DrawDisplay == 0) { + QItemDelegate::drawDisplay(painter, option, rect, text); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval4 = text_ms; + + miqt_exec_callback_QItemDelegate_DrawDisplay(const_cast(this), handle__DrawDisplay, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawDisplay(QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QItemDelegate::drawDisplay(painter, *option, *rect, text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawDecoration = 0; + + // Subclass to allow providing a Go implementation + virtual void drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const override { + if (handle__DrawDecoration == 0) { + QItemDelegate::drawDecoration(painter, option, rect, pixmap); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval4 = const_cast(&pixmap_ret); + + miqt_exec_callback_QItemDelegate_DrawDecoration(const_cast(this), handle__DrawDecoration, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawDecoration(QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap) const { + + QItemDelegate::drawDecoration(painter, *option, *rect, *pixmap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawFocus = 0; + + // Subclass to allow providing a Go implementation + virtual void drawFocus(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const override { + if (handle__DrawFocus == 0) { + QItemDelegate::drawFocus(painter, option, rect); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + + miqt_exec_callback_QItemDelegate_DrawFocus(const_cast(this), handle__DrawFocus, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawFocus(QPainter* painter, QStyleOptionViewItem* option, QRect* rect) const { + + QItemDelegate::drawFocus(painter, *option, *rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawCheck = 0; + + // Subclass to allow providing a Go implementation + virtual void drawCheck(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const override { + if (handle__DrawCheck == 0) { + QItemDelegate::drawCheck(painter, option, rect, state); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&rect_ret); + Qt::CheckState state_ret = state; + int sigval4 = static_cast(state_ret); + + miqt_exec_callback_QItemDelegate_DrawCheck(const_cast(this), handle__DrawCheck, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawCheck(QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state) const { + + QItemDelegate::drawCheck(painter, *option, *rect, static_cast(state)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QItemDelegate::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QItemDelegate_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QItemDelegate::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__EditorEvent == 0) { + return QItemDelegate::editorEvent(event, model, option, index); + } + + QEvent* sigval1 = event; + QAbstractItemModel* sigval2 = model; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QItemDelegate_EditorEvent(this, handle__EditorEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EditorEvent(QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + + return QItemDelegate::editorEvent(event, model, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DestroyEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void destroyEditor(QWidget* editor, const QModelIndex& index) const override { + if (handle__DestroyEditor == 0) { + QItemDelegate::destroyEditor(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QItemDelegate_DestroyEditor(const_cast(this), handle__DestroyEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DestroyEditor(QWidget* editor, QModelIndex* index) const { + + QItemDelegate::destroyEditor(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HelpEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__HelpEvent == 0) { + return QItemDelegate::helpEvent(event, view, option, index); + } + + QHelpEvent* sigval1 = event; + QAbstractItemView* sigval2 = view; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QItemDelegate_HelpEvent(this, handle__HelpEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HelpEvent(QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + + return QItemDelegate::helpEvent(event, view, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintingRoles = 0; + + // Subclass to allow providing a Go implementation + virtual QList paintingRoles() const override { + if (handle__PaintingRoles == 0) { + return QItemDelegate::paintingRoles(); + } + + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QItemDelegate_PaintingRoles(const_cast(this), handle__PaintingRoles); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + int* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(static_cast(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of int */ virtualbase_PaintingRoles() const { + + QList _ret = QItemDelegate::paintingRoles(); + // Convert QList<> from C++ memory to manually-managed C memory + int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + +}; + +void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(); + *outptr_QItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QItemDelegate* QItemDelegate_new2(QObject* parent) { - return new QItemDelegate(parent); +void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(parent); + *outptr_QItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self) { @@ -104,7 +581,131 @@ struct miqt_string QItemDelegate_Tr3(const char* s, const char* c, int n) { return _ms; } -void QItemDelegate_Delete(QItemDelegate* self) { - delete self; +void QItemDelegate_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__Paint = slot; +} + +void QItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_Paint(painter, option, index); +} + +void QItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__SizeHint = slot; +} + +QSize* QItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_SizeHint(option, index); +} + +void QItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_CreateEditor(parent, option, index); +} + +void QItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__SetEditorData = slot; +} + +void QItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_SetEditorData(editor, index); +} + +void QItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__SetModelData = slot; +} + +void QItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_SetModelData(editor, model, index); +} + +void QItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__UpdateEditorGeometry = slot; +} + +void QItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_UpdateEditorGeometry(editor, option, index); +} + +void QItemDelegate_override_virtual_DrawDisplay(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawDisplay = slot; +} + +void QItemDelegate_virtualbase_DrawDisplay(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawDisplay(painter, option, rect, text); +} + +void QItemDelegate_override_virtual_DrawDecoration(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawDecoration = slot; +} + +void QItemDelegate_virtualbase_DrawDecoration(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawDecoration(painter, option, rect, pixmap); +} + +void QItemDelegate_override_virtual_DrawFocus(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawFocus = slot; +} + +void QItemDelegate_virtualbase_DrawFocus(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawFocus(painter, option, rect); +} + +void QItemDelegate_override_virtual_DrawCheck(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DrawCheck = slot; +} + +void QItemDelegate_virtualbase_DrawCheck(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DrawCheck(painter, option, rect, state); +} + +void QItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__EventFilter = slot; +} + +bool QItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQItemDelegate*)(self) )->virtualbase_EventFilter(object, event); +} + +void QItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__EditorEvent = slot; +} + +bool QItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQItemDelegate*)(self) )->virtualbase_EditorEvent(event, model, option, index); +} + +void QItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__DestroyEditor = slot; +} + +void QItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_DestroyEditor(editor, index); +} + +void QItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__HelpEvent = slot; +} + +bool QItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQItemDelegate*)(self) )->virtualbase_HelpEvent(event, view, option, index); +} + +void QItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot) { + dynamic_cast( (QItemDelegate*)(self) )->handle__PaintingRoles = slot; +} + +struct miqt_array /* of int */ QItemDelegate_virtualbase_PaintingRoles(const void* self) { + return ( (const MiqtVirtualQItemDelegate*)(self) )->virtualbase_PaintingRoles(); +} + +void QItemDelegate_Delete(QItemDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qitemdelegate.go b/qt6/gen_qitemdelegate.go index abab4536..67e71c7a 100644 --- a/qt6/gen_qitemdelegate.go +++ b/qt6/gen_qitemdelegate.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QItemDelegate struct { - h *C.QItemDelegate + h *C.QItemDelegate + isSubclass bool *QAbstractItemDelegate } @@ -32,27 +34,47 @@ func (this *QItemDelegate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQItemDelegate(h *C.QItemDelegate) *QItemDelegate { +// newQItemDelegate constructs the type using only CGO pointers. +func newQItemDelegate(h *C.QItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QItemDelegate { if h == nil { return nil } - return &QItemDelegate{h: h, QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(unsafe.Pointer(h))} + return &QItemDelegate{h: h, + QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } -func UnsafeNewQItemDelegate(h unsafe.Pointer) *QItemDelegate { - return newQItemDelegate((*C.QItemDelegate)(h)) +// UnsafeNewQItemDelegate constructs the type using only unsafe pointers. +func UnsafeNewQItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QItemDelegate { + if h == nil { + return nil + } + + return &QItemDelegate{h: (*C.QItemDelegate)(h), + QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } // NewQItemDelegate constructs a new QItemDelegate object. func NewQItemDelegate() *QItemDelegate { - ret := C.QItemDelegate_new() - return newQItemDelegate(ret) + var outptr_QItemDelegate *C.QItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QItemDelegate_new(&outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } // NewQItemDelegate2 constructs a new QItemDelegate object. func NewQItemDelegate2(parent *QObject) *QItemDelegate { - ret := C.QItemDelegate_new2(parent.cPointer()) - return newQItemDelegate(ret) + var outptr_QItemDelegate *C.QItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QItemDelegate_new2(parent.cPointer(), &outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QItemDelegate) MetaObject() *QMetaObject { @@ -94,7 +116,7 @@ func (this *QItemDelegate) SizeHint(option *QStyleOptionViewItem, index *QModelI } func (this *QItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) } func (this *QItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -139,9 +161,413 @@ func QItemDelegate_Tr3(s string, c string, n int) string { return _ret } +func (this *QItemDelegate) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QItemDelegate_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QItemDelegate_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_Paint +func miqt_exec_callback_QItemDelegate_Paint(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_SizeHint(option *QStyleOptionViewItem, index *QModelIndex) *QSize { + + _ret := C.QItemDelegate_virtualbase_SizeHint(unsafe.Pointer(this.h), option.cPointer(), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QItemDelegate) OnSizeHint(slot func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) { + C.QItemDelegate_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_SizeHint +func miqt_exec_callback_QItemDelegate_SizeHint(self *C.QItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) +} +func (this *QItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { + C.QItemDelegate_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_CreateEditor +func miqt_exec_callback_QItemDelegate_CreateEditor(self *C.QItemDelegate, cb C.intptr_t, parent *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QItemDelegate) callVirtualBase_SetEditorData(editor *QWidget, index *QModelIndex) { + + C.QItemDelegate_virtualbase_SetEditorData(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnSetEditorData(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QItemDelegate_override_virtual_SetEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_SetEditorData +func miqt_exec_callback_QItemDelegate_SetEditorData(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_SetEditorData, slotval1, slotval2) + +} + +func (this *QItemDelegate) callVirtualBase_SetModelData(editor *QWidget, model *QAbstractItemModel, index *QModelIndex) { + + C.QItemDelegate_virtualbase_SetModelData(unsafe.Pointer(this.h), editor.cPointer(), model.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnSetModelData(slot func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) { + C.QItemDelegate_override_virtual_SetModelData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_SetModelData +func miqt_exec_callback_QItemDelegate_SetModelData(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, model *C.QAbstractItemModel, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_SetModelData, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_UpdateEditorGeometry(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QItemDelegate_virtualbase_UpdateEditorGeometry(unsafe.Pointer(this.h), editor.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnUpdateEditorGeometry(slot func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QItemDelegate_override_virtual_UpdateEditorGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_UpdateEditorGeometry +func miqt_exec_callback_QItemDelegate_UpdateEditorGeometry(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_UpdateEditorGeometry, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_DrawDisplay(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + C.QItemDelegate_virtualbase_DrawDisplay(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer(), text_ms) + +} +func (this *QItemDelegate) OnDrawDisplay(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string)) { + C.QItemDelegate_override_virtual_DrawDisplay(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawDisplay +func miqt_exec_callback_QItemDelegate_DrawDisplay(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, text string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval4 := text_ret + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawDisplay, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QItemDelegate) callVirtualBase_DrawDecoration(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap) { + + C.QItemDelegate_virtualbase_DrawDecoration(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer(), pixmap.cPointer()) + +} +func (this *QItemDelegate) OnDrawDecoration(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap)) { + C.QItemDelegate_override_virtual_DrawDecoration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawDecoration +func miqt_exec_callback_QItemDelegate_DrawDecoration(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect, pixmap *C.QPixmap) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, pixmap *QPixmap)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval4 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawDecoration, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QItemDelegate) callVirtualBase_DrawFocus(painter *QPainter, option *QStyleOptionViewItem, rect *QRect) { + + C.QItemDelegate_virtualbase_DrawFocus(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer()) + +} +func (this *QItemDelegate) OnDrawFocus(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect), painter *QPainter, option *QStyleOptionViewItem, rect *QRect)) { + C.QItemDelegate_override_virtual_DrawFocus(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawFocus +func miqt_exec_callback_QItemDelegate_DrawFocus(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect), painter *QPainter, option *QStyleOptionViewItem, rect *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawFocus, slotval1, slotval2, slotval3) + +} + +func (this *QItemDelegate) callVirtualBase_DrawCheck(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState) { + + C.QItemDelegate_virtualbase_DrawCheck(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), rect.cPointer(), (C.int)(state)) + +} +func (this *QItemDelegate) OnDrawCheck(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState)) { + C.QItemDelegate_override_virtual_DrawCheck(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DrawCheck +func miqt_exec_callback_QItemDelegate_DrawCheck(self *C.QItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, rect *C.QRect, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState), painter *QPainter, option *QStyleOptionViewItem, rect *QRect, state CheckState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval4 := (CheckState)(state) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawCheck, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QItemDelegate) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QItemDelegate_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QItemDelegate) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QItemDelegate_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_EventFilter +func miqt_exec_callback_QItemDelegate_EventFilter(self *C.QItemDelegate, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemDelegate) callVirtualBase_EditorEvent(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QItemDelegate_virtualbase_EditorEvent(unsafe.Pointer(this.h), event.cPointer(), model.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QItemDelegate) OnEditorEvent(slot func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QItemDelegate_override_virtual_EditorEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_EditorEvent +func miqt_exec_callback_QItemDelegate_EditorEvent(self *C.QItemDelegate, cb C.intptr_t, event *C.QEvent, model *C.QAbstractItemModel, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_EditorEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemDelegate) callVirtualBase_DestroyEditor(editor *QWidget, index *QModelIndex) { + + C.QItemDelegate_virtualbase_DestroyEditor(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QItemDelegate) OnDestroyEditor(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QItemDelegate_override_virtual_DestroyEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_DestroyEditor +func miqt_exec_callback_QItemDelegate_DestroyEditor(self *C.QItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QItemDelegate{h: self}).callVirtualBase_DestroyEditor, slotval1, slotval2) + +} + +func (this *QItemDelegate) callVirtualBase_HelpEvent(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QItemDelegate_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer(), view.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QItemDelegate) OnHelpEvent(slot func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QItemDelegate_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_HelpEvent +func miqt_exec_callback_QItemDelegate_HelpEvent(self *C.QItemDelegate, cb C.intptr_t, event *C.QHelpEvent, view *C.QAbstractItemView, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHelpEvent(unsafe.Pointer(event), nil) + slotval2 := UnsafeNewQAbstractItemView(unsafe.Pointer(view), nil, nil, nil, nil, nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_HelpEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemDelegate) callVirtualBase_PaintingRoles() []int { + + var _ma C.struct_miqt_array = C.QItemDelegate_virtualbase_PaintingRoles(unsafe.Pointer(this.h)) + _ret := make([]int, int(_ma.len)) + _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _ret[i] = (int)(_outCast[i]) + } + return _ret + +} +func (this *QItemDelegate) OnPaintingRoles(slot func(super func() []int) []int) { + C.QItemDelegate_override_virtual_PaintingRoles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemDelegate_PaintingRoles +func miqt_exec_callback_QItemDelegate_PaintingRoles(self *C.QItemDelegate, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []int) []int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QItemDelegate{h: self}).callVirtualBase_PaintingRoles) + virtualReturn_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (C.int)(virtualReturn[i]) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + // Delete this object from C++ memory. func (this *QItemDelegate) Delete() { - C.QItemDelegate_Delete(this.h) + C.QItemDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qitemdelegate.h b/qt6/gen_qitemdelegate.h index 86dbf92a..8df0943e 100644 --- a/qt6/gen_qitemdelegate.h +++ b/qt6/gen_qitemdelegate.h @@ -15,31 +15,43 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QEvent; +class QHelpEvent; class QItemDelegate; class QItemEditorFactory; class QMetaObject; class QModelIndex; class QObject; class QPainter; +class QPixmap; +class QRect; class QSize; class QStyleOptionViewItem; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QEvent QEvent; +typedef struct QHelpEvent QHelpEvent; typedef struct QItemDelegate QItemDelegate; typedef struct QItemEditorFactory QItemEditorFactory; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPainter QPainter; +typedef struct QPixmap QPixmap; +typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QWidget QWidget; #endif -QItemDelegate* QItemDelegate_new(); -QItemDelegate* QItemDelegate_new2(QObject* parent); +void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self); void* QItemDelegate_Metacast(QItemDelegate* self, const char* param1); struct miqt_string QItemDelegate_Tr(const char* s); @@ -53,9 +65,45 @@ void QItemDelegate_SetModelData(const QItemDelegate* self, QWidget* editor, QAbs void QItemDelegate_UpdateEditorGeometry(const QItemDelegate* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); QItemEditorFactory* QItemDelegate_ItemEditorFactory(const QItemDelegate* self); void QItemDelegate_SetItemEditorFactory(QItemDelegate* self, QItemEditorFactory* factory); +void QItemDelegate_DrawDisplay(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text); +void QItemDelegate_DrawDecoration(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap); +void QItemDelegate_DrawFocus(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect); +void QItemDelegate_DrawCheck(const QItemDelegate* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state); +bool QItemDelegate_EventFilter(QItemDelegate* self, QObject* object, QEvent* event); +bool QItemDelegate_EditorEvent(QItemDelegate* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); struct miqt_string QItemDelegate_Tr2(const char* s, const char* c); struct miqt_string QItemDelegate_Tr3(const char* s, const char* c, int n); -void QItemDelegate_Delete(QItemDelegate* self); +void QItemDelegate_override_virtual_Paint(void* self, intptr_t slot); +void QItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot); +void QItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index); +void QItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot); +void QItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index); +void QItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot); +void QItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_DrawDisplay(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawDisplay(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, struct miqt_string text); +void QItemDelegate_override_virtual_DrawDecoration(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawDecoration(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, QPixmap* pixmap); +void QItemDelegate_override_virtual_DrawFocus(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawFocus(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect); +void QItemDelegate_override_virtual_DrawCheck(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DrawCheck(const void* self, QPainter* painter, QStyleOptionViewItem* option, QRect* rect, int state); +void QItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot); +bool QItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot); +bool QItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot); +void QItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index); +void QItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot); +bool QItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index); +void QItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot); +struct miqt_array /* of int */ QItemDelegate_virtualbase_PaintingRoles(const void* self); +void QItemDelegate_Delete(QItemDelegate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qitemeditorfactory.cpp b/qt6/gen_qitemeditorfactory.cpp index ece20aa6..08641f11 100644 --- a/qt6/gen_qitemeditorfactory.cpp +++ b/qt6/gen_qitemeditorfactory.cpp @@ -23,16 +23,85 @@ void QItemEditorCreatorBase_OperatorAssign(QItemEditorCreatorBase* self, QItemEd self->operator=(*param1); } -void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self) { - delete self; +void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QItemEditorFactory* QItemEditorFactory_new() { - return new QItemEditorFactory(); +class MiqtVirtualQItemEditorFactory : public virtual QItemEditorFactory { +public: + + MiqtVirtualQItemEditorFactory(): QItemEditorFactory() {}; + MiqtVirtualQItemEditorFactory(const QItemEditorFactory& param1): QItemEditorFactory(param1) {}; + + virtual ~MiqtVirtualQItemEditorFactory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateEditor = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createEditor(int userType, QWidget* parent) const override { + if (handle__CreateEditor == 0) { + return QItemEditorFactory::createEditor(userType, parent); + } + + int sigval1 = userType; + QWidget* sigval2 = parent; + + QWidget* callback_return_value = miqt_exec_callback_QItemEditorFactory_CreateEditor(const_cast(this), handle__CreateEditor, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateEditor(int userType, QWidget* parent) const { + + return QItemEditorFactory::createEditor(static_cast(userType), parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValuePropertyName = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray valuePropertyName(int userType) const override { + if (handle__ValuePropertyName == 0) { + return QItemEditorFactory::valuePropertyName(userType); + } + + int sigval1 = userType; + + struct miqt_string callback_return_value = miqt_exec_callback_QItemEditorFactory_ValuePropertyName(const_cast(this), handle__ValuePropertyName, sigval1); + QByteArray callback_return_value_QByteArray(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QByteArray; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_ValuePropertyName(int userType) const { + + QByteArray _qb = QItemEditorFactory::valuePropertyName(static_cast(userType)); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; + + } + +}; + +void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory) { + MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(); + *outptr_QItemEditorFactory = ret; } -QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1) { - return new QItemEditorFactory(*param1); +void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory) { + MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(*param1); + *outptr_QItemEditorFactory = ret; } QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent) { @@ -60,7 +129,27 @@ void QItemEditorFactory_SetDefaultFactory(QItemEditorFactory* factory) { QItemEditorFactory::setDefaultFactory(factory); } -void QItemEditorFactory_Delete(QItemEditorFactory* self) { - delete self; +void QItemEditorFactory_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QItemEditorFactory*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QItemEditorFactory_virtualbase_CreateEditor(const void* self, int userType, QWidget* parent) { + return ( (const MiqtVirtualQItemEditorFactory*)(self) )->virtualbase_CreateEditor(userType, parent); +} + +void QItemEditorFactory_override_virtual_ValuePropertyName(void* self, intptr_t slot) { + dynamic_cast( (QItemEditorFactory*)(self) )->handle__ValuePropertyName = slot; +} + +struct miqt_string QItemEditorFactory_virtualbase_ValuePropertyName(const void* self, int userType) { + return ( (const MiqtVirtualQItemEditorFactory*)(self) )->virtualbase_ValuePropertyName(userType); +} + +void QItemEditorFactory_Delete(QItemEditorFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qitemeditorfactory.go b/qt6/gen_qitemeditorfactory.go index f6e69fea..81092541 100644 --- a/qt6/gen_qitemeditorfactory.go +++ b/qt6/gen_qitemeditorfactory.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QItemEditorCreatorBase struct { - h *C.QItemEditorCreatorBase + h *C.QItemEditorCreatorBase + isSubclass bool } func (this *QItemEditorCreatorBase) cPointer() *C.QItemEditorCreatorBase { @@ -31,6 +33,7 @@ func (this *QItemEditorCreatorBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQItemEditorCreatorBase constructs the type using only CGO pointers. func newQItemEditorCreatorBase(h *C.QItemEditorCreatorBase) *QItemEditorCreatorBase { if h == nil { return nil @@ -38,12 +41,17 @@ func newQItemEditorCreatorBase(h *C.QItemEditorCreatorBase) *QItemEditorCreatorB return &QItemEditorCreatorBase{h: h} } +// UnsafeNewQItemEditorCreatorBase constructs the type using only unsafe pointers. func UnsafeNewQItemEditorCreatorBase(h unsafe.Pointer) *QItemEditorCreatorBase { - return newQItemEditorCreatorBase((*C.QItemEditorCreatorBase)(h)) + if h == nil { + return nil + } + + return &QItemEditorCreatorBase{h: (*C.QItemEditorCreatorBase)(h)} } func (this *QItemEditorCreatorBase) CreateWidget(parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer())), nil, nil) } func (this *QItemEditorCreatorBase) ValuePropertyName() []byte { @@ -59,7 +67,7 @@ func (this *QItemEditorCreatorBase) OperatorAssign(param1 *QItemEditorCreatorBas // Delete this object from C++ memory. func (this *QItemEditorCreatorBase) Delete() { - C.QItemEditorCreatorBase_Delete(this.h) + C.QItemEditorCreatorBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -72,7 +80,8 @@ func (this *QItemEditorCreatorBase) GoGC() { } type QItemEditorFactory struct { - h *C.QItemEditorFactory + h *C.QItemEditorFactory + isSubclass bool } func (this *QItemEditorFactory) cPointer() *C.QItemEditorFactory { @@ -89,6 +98,7 @@ func (this *QItemEditorFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQItemEditorFactory constructs the type using only CGO pointers. func newQItemEditorFactory(h *C.QItemEditorFactory) *QItemEditorFactory { if h == nil { return nil @@ -96,24 +106,37 @@ func newQItemEditorFactory(h *C.QItemEditorFactory) *QItemEditorFactory { return &QItemEditorFactory{h: h} } +// UnsafeNewQItemEditorFactory constructs the type using only unsafe pointers. func UnsafeNewQItemEditorFactory(h unsafe.Pointer) *QItemEditorFactory { - return newQItemEditorFactory((*C.QItemEditorFactory)(h)) + if h == nil { + return nil + } + + return &QItemEditorFactory{h: (*C.QItemEditorFactory)(h)} } // NewQItemEditorFactory constructs a new QItemEditorFactory object. func NewQItemEditorFactory() *QItemEditorFactory { - ret := C.QItemEditorFactory_new() - return newQItemEditorFactory(ret) + var outptr_QItemEditorFactory *C.QItemEditorFactory = nil + + C.QItemEditorFactory_new(&outptr_QItemEditorFactory) + ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret.isSubclass = true + return ret } // NewQItemEditorFactory2 constructs a new QItemEditorFactory object. func NewQItemEditorFactory2(param1 *QItemEditorFactory) *QItemEditorFactory { - ret := C.QItemEditorFactory_new2(param1.cPointer()) - return newQItemEditorFactory(ret) + var outptr_QItemEditorFactory *C.QItemEditorFactory = nil + + C.QItemEditorFactory_new2(param1.cPointer(), &outptr_QItemEditorFactory) + ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret.isSubclass = true + return ret } func (this *QItemEditorFactory) CreateEditor(userType int, parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer())), nil, nil) } func (this *QItemEditorFactory) ValuePropertyName(userType int) []byte { @@ -135,9 +158,65 @@ func QItemEditorFactory_SetDefaultFactory(factory *QItemEditorFactory) { C.QItemEditorFactory_SetDefaultFactory(factory.cPointer()) } +func (this *QItemEditorFactory) callVirtualBase_CreateEditor(userType int, parent *QWidget) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QItemEditorFactory_virtualbase_CreateEditor(unsafe.Pointer(this.h), (C.int)(userType), parent.cPointer())), nil, nil) +} +func (this *QItemEditorFactory) OnCreateEditor(slot func(super func(userType int, parent *QWidget) *QWidget, userType int, parent *QWidget) *QWidget) { + C.QItemEditorFactory_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemEditorFactory_CreateEditor +func miqt_exec_callback_QItemEditorFactory_CreateEditor(self *C.QItemEditorFactory, cb C.intptr_t, userType C.int, parent *C.QWidget) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(userType int, parent *QWidget) *QWidget, userType int, parent *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(userType) + + slotval2 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + + virtualReturn := gofunc((&QItemEditorFactory{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QItemEditorFactory) callVirtualBase_ValuePropertyName(userType int) []byte { + + var _bytearray C.struct_miqt_string = C.QItemEditorFactory_virtualbase_ValuePropertyName(unsafe.Pointer(this.h), (C.int)(userType)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QItemEditorFactory) OnValuePropertyName(slot func(super func(userType int) []byte, userType int) []byte) { + C.QItemEditorFactory_override_virtual_ValuePropertyName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemEditorFactory_ValuePropertyName +func miqt_exec_callback_QItemEditorFactory_ValuePropertyName(self *C.QItemEditorFactory, cb C.intptr_t, userType C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(userType int) []byte, userType int) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(userType) + + virtualReturn := gofunc((&QItemEditorFactory{h: self}).callVirtualBase_ValuePropertyName, slotval1) + virtualReturn_alias := C.struct_miqt_string{} + virtualReturn_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[0])) + virtualReturn_alias.len = C.size_t(len(virtualReturn)) + + return virtualReturn_alias + +} + // Delete this object from C++ memory. func (this *QItemEditorFactory) Delete() { - C.QItemEditorFactory_Delete(this.h) + C.QItemEditorFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qitemeditorfactory.h b/qt6/gen_qitemeditorfactory.h index f6e47c6f..6cf230fa 100644 --- a/qt6/gen_qitemeditorfactory.h +++ b/qt6/gen_qitemeditorfactory.h @@ -29,16 +29,20 @@ typedef struct QWidget QWidget; QWidget* QItemEditorCreatorBase_CreateWidget(const QItemEditorCreatorBase* self, QWidget* parent); struct miqt_string QItemEditorCreatorBase_ValuePropertyName(const QItemEditorCreatorBase* self); void QItemEditorCreatorBase_OperatorAssign(QItemEditorCreatorBase* self, QItemEditorCreatorBase* param1); -void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self); +void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self, bool isSubclass); -QItemEditorFactory* QItemEditorFactory_new(); -QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1); +void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory); +void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory); QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent); struct miqt_string QItemEditorFactory_ValuePropertyName(const QItemEditorFactory* self, int userType); void QItemEditorFactory_RegisterEditor(QItemEditorFactory* self, int userType, QItemEditorCreatorBase* creator); QItemEditorFactory* QItemEditorFactory_DefaultFactory(); void QItemEditorFactory_SetDefaultFactory(QItemEditorFactory* factory); -void QItemEditorFactory_Delete(QItemEditorFactory* self); +void QItemEditorFactory_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QItemEditorFactory_virtualbase_CreateEditor(const void* self, int userType, QWidget* parent); +void QItemEditorFactory_override_virtual_ValuePropertyName(void* self, intptr_t slot); +struct miqt_string QItemEditorFactory_virtualbase_ValuePropertyName(const void* self, int userType); +void QItemEditorFactory_Delete(QItemEditorFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qitemselectionmodel.cpp b/qt6/gen_qitemselectionmodel.cpp index e68a7fba..20b1a971 100644 --- a/qt6/gen_qitemselectionmodel.cpp +++ b/qt6/gen_qitemselectionmodel.cpp @@ -1,7 +1,10 @@ #include +#include +#include #include #include #include +#include #include #include #include @@ -9,24 +12,29 @@ #include #include #include +#include #include #include "gen_qitemselectionmodel.h" #include "_cgo_export.h" -QItemSelectionRange* QItemSelectionRange_new() { - return new QItemSelectionRange(); +void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(); + *outptr_QItemSelectionRange = ret; } -QItemSelectionRange* QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR) { - return new QItemSelectionRange(*topL, *bottomR); +void QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(*topL, *bottomR); + *outptr_QItemSelectionRange = ret; } -QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* index) { - return new QItemSelectionRange(*index); +void QItemSelectionRange_new3(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(*index); + *outptr_QItemSelectionRange = ret; } -QItemSelectionRange* QItemSelectionRange_new4(QItemSelectionRange* param1) { - return new QItemSelectionRange(*param1); +void QItemSelectionRange_new4(QItemSelectionRange* param1, QItemSelectionRange** outptr_QItemSelectionRange) { + QItemSelectionRange* ret = new QItemSelectionRange(*param1); + *outptr_QItemSelectionRange = ret; } void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other) { @@ -122,20 +130,337 @@ struct miqt_array /* of QModelIndex* */ QItemSelectionRange_Indexes(const QItem return _out; } -void QItemSelectionRange_Delete(QItemSelectionRange* self) { - delete self; +void QItemSelectionRange_Delete(QItemSelectionRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QItemSelectionModel* QItemSelectionModel_new() { - return new QItemSelectionModel(); +class MiqtVirtualQItemSelectionModel : public virtual QItemSelectionModel { +public: + + MiqtVirtualQItemSelectionModel(): QItemSelectionModel() {}; + MiqtVirtualQItemSelectionModel(QAbstractItemModel* model, QObject* parent): QItemSelectionModel(model, parent) {}; + MiqtVirtualQItemSelectionModel(QAbstractItemModel* model): QItemSelectionModel(model) {}; + + virtual ~MiqtVirtualQItemSelectionModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCurrentIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setCurrentIndex(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetCurrentIndex == 0) { + QItemSelectionModel::setCurrentIndex(index, command); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QItemSelectionModel_SetCurrentIndex(this, handle__SetCurrentIndex, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetCurrentIndex(QModelIndex* index, int command) { + + QItemSelectionModel::setCurrentIndex(*index, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Select = 0; + + // Subclass to allow providing a Go implementation + virtual void select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) override { + if (handle__Select == 0) { + QItemSelectionModel::select(index, command); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QItemSelectionModel_Select(this, handle__Select, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Select(QModelIndex* index, int command) { + + QItemSelectionModel::select(*index, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QItemSelectionModel::clear(); + return; + } + + + miqt_exec_callback_QItemSelectionModel_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QItemSelectionModel::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QItemSelectionModel::reset(); + return; + } + + + miqt_exec_callback_QItemSelectionModel_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QItemSelectionModel::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearCurrentIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void clearCurrentIndex() override { + if (handle__ClearCurrentIndex == 0) { + QItemSelectionModel::clearCurrentIndex(); + return; + } + + + miqt_exec_callback_QItemSelectionModel_ClearCurrentIndex(this, handle__ClearCurrentIndex); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ClearCurrentIndex() { + + QItemSelectionModel::clearCurrentIndex(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QItemSelectionModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QItemSelectionModel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QItemSelectionModel::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QItemSelectionModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QItemSelectionModel_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QItemSelectionModel::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QItemSelectionModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QItemSelectionModel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QItemSelectionModel::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QItemSelectionModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QItemSelectionModel_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QItemSelectionModel::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QItemSelectionModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QItemSelectionModel_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QItemSelectionModel::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QItemSelectionModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QItemSelectionModel_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QItemSelectionModel::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QItemSelectionModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QItemSelectionModel_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QItemSelectionModel::disconnectNotify(*signal); + + } + +}; + +void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { + MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(); + *outptr_QItemSelectionModel = ret; + *outptr_QObject = static_cast(ret); } -QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent) { - return new QItemSelectionModel(model, parent); +void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { + MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model, parent); + *outptr_QItemSelectionModel = ret; + *outptr_QObject = static_cast(ret); } -QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model) { - return new QItemSelectionModel(model); +void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { + MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model); + *outptr_QItemSelectionModel = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self) { @@ -265,7 +590,7 @@ void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* } void QItemSelectionModel_connect_CurrentChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { const QModelIndex& current_ret = current; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¤t_ret); @@ -281,7 +606,7 @@ void QItemSelectionModel_CurrentRowChanged(QItemSelectionModel* self, QModelInde } void QItemSelectionModel_connect_CurrentRowChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentRowChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentRowChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { const QModelIndex& current_ret = current; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¤t_ret); @@ -297,7 +622,7 @@ void QItemSelectionModel_CurrentColumnChanged(QItemSelectionModel* self, QModelI } void QItemSelectionModel_connect_CurrentColumnChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentColumnChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::currentColumnChanged), self, [=](const QModelIndex& current, const QModelIndex& previous) { const QModelIndex& current_ret = current; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¤t_ret); @@ -313,7 +638,7 @@ void QItemSelectionModel_ModelChanged(QItemSelectionModel* self, QAbstractItemMo } void QItemSelectionModel_connect_ModelChanged(QItemSelectionModel* self, intptr_t slot) { - QItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::modelChanged), self, [=](QAbstractItemModel* model) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::modelChanged), self, [=](QAbstractItemModel* model) { QAbstractItemModel* sigval1 = model; miqt_exec_callback_QItemSelectionModel_ModelChanged(slot, sigval1); }); @@ -383,7 +708,107 @@ struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns1(co return _out; } -void QItemSelectionModel_Delete(QItemSelectionModel* self) { - delete self; +void QItemSelectionModel_override_virtual_SetCurrentIndex(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__SetCurrentIndex = slot; +} + +void QItemSelectionModel_virtualbase_SetCurrentIndex(void* self, QModelIndex* index, int command) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_SetCurrentIndex(index, command); +} + +void QItemSelectionModel_override_virtual_Select(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Select = slot; +} + +void QItemSelectionModel_virtualbase_Select(void* self, QModelIndex* index, int command) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Select(index, command); +} + +void QItemSelectionModel_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Clear = slot; +} + +void QItemSelectionModel_virtualbase_Clear(void* self) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Clear(); +} + +void QItemSelectionModel_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Reset = slot; +} + +void QItemSelectionModel_virtualbase_Reset(void* self) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Reset(); +} + +void QItemSelectionModel_override_virtual_ClearCurrentIndex(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__ClearCurrentIndex = slot; +} + +void QItemSelectionModel_virtualbase_ClearCurrentIndex(void* self) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_ClearCurrentIndex(); +} + +void QItemSelectionModel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Event = slot; +} + +bool QItemSelectionModel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Event(event); +} + +void QItemSelectionModel_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__EventFilter = slot; +} + +bool QItemSelectionModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QItemSelectionModel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__TimerEvent = slot; +} + +void QItemSelectionModel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_TimerEvent(event); +} + +void QItemSelectionModel_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__ChildEvent = slot; +} + +void QItemSelectionModel_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_ChildEvent(event); +} + +void QItemSelectionModel_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__CustomEvent = slot; +} + +void QItemSelectionModel_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_CustomEvent(event); +} + +void QItemSelectionModel_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__ConnectNotify = slot; +} + +void QItemSelectionModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__DisconnectNotify = slot; +} + +void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qitemselectionmodel.go b/qt6/gen_qitemselectionmodel.go index 70c4d188..1291d06d 100644 --- a/qt6/gen_qitemselectionmodel.go +++ b/qt6/gen_qitemselectionmodel.go @@ -31,7 +31,8 @@ const ( ) type QItemSelectionRange struct { - h *C.QItemSelectionRange + h *C.QItemSelectionRange + isSubclass bool } func (this *QItemSelectionRange) cPointer() *C.QItemSelectionRange { @@ -48,6 +49,7 @@ func (this *QItemSelectionRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQItemSelectionRange constructs the type using only CGO pointers. func newQItemSelectionRange(h *C.QItemSelectionRange) *QItemSelectionRange { if h == nil { return nil @@ -55,32 +57,53 @@ func newQItemSelectionRange(h *C.QItemSelectionRange) *QItemSelectionRange { return &QItemSelectionRange{h: h} } +// UnsafeNewQItemSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQItemSelectionRange(h unsafe.Pointer) *QItemSelectionRange { - return newQItemSelectionRange((*C.QItemSelectionRange)(h)) + if h == nil { + return nil + } + + return &QItemSelectionRange{h: (*C.QItemSelectionRange)(h)} } // NewQItemSelectionRange constructs a new QItemSelectionRange object. func NewQItemSelectionRange() *QItemSelectionRange { - ret := C.QItemSelectionRange_new() - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new(&outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } // NewQItemSelectionRange2 constructs a new QItemSelectionRange object. func NewQItemSelectionRange2(topL *QModelIndex, bottomR *QModelIndex) *QItemSelectionRange { - ret := C.QItemSelectionRange_new2(topL.cPointer(), bottomR.cPointer()) - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new2(topL.cPointer(), bottomR.cPointer(), &outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } // NewQItemSelectionRange3 constructs a new QItemSelectionRange object. func NewQItemSelectionRange3(index *QModelIndex) *QItemSelectionRange { - ret := C.QItemSelectionRange_new3(index.cPointer()) - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new3(index.cPointer(), &outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } // NewQItemSelectionRange4 constructs a new QItemSelectionRange object. func NewQItemSelectionRange4(param1 *QItemSelectionRange) *QItemSelectionRange { - ret := C.QItemSelectionRange_new4(param1.cPointer()) - return newQItemSelectionRange(ret) + var outptr_QItemSelectionRange *C.QItemSelectionRange = nil + + C.QItemSelectionRange_new4(param1.cPointer(), &outptr_QItemSelectionRange) + ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret.isSubclass = true + return ret } func (this *QItemSelectionRange) Swap(other *QItemSelectionRange) { @@ -127,7 +150,7 @@ func (this *QItemSelectionRange) Parent() *QModelIndex { } func (this *QItemSelectionRange) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionRange_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionRange_Model(this.h)), nil) } func (this *QItemSelectionRange) Contains(index *QModelIndex) bool { @@ -180,7 +203,7 @@ func (this *QItemSelectionRange) Indexes() []QModelIndex { // Delete this object from C++ memory. func (this *QItemSelectionRange) Delete() { - C.QItemSelectionRange_Delete(this.h) + C.QItemSelectionRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -193,7 +216,8 @@ func (this *QItemSelectionRange) GoGC() { } type QItemSelectionModel struct { - h *C.QItemSelectionModel + h *C.QItemSelectionModel + isSubclass bool *QObject } @@ -211,33 +235,56 @@ func (this *QItemSelectionModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQItemSelectionModel(h *C.QItemSelectionModel) *QItemSelectionModel { +// newQItemSelectionModel constructs the type using only CGO pointers. +func newQItemSelectionModel(h *C.QItemSelectionModel, h_QObject *C.QObject) *QItemSelectionModel { if h == nil { return nil } - return &QItemSelectionModel{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QItemSelectionModel{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQItemSelectionModel(h unsafe.Pointer) *QItemSelectionModel { - return newQItemSelectionModel((*C.QItemSelectionModel)(h)) +// UnsafeNewQItemSelectionModel constructs the type using only unsafe pointers. +func UnsafeNewQItemSelectionModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QItemSelectionModel { + if h == nil { + return nil + } + + return &QItemSelectionModel{h: (*C.QItemSelectionModel)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQItemSelectionModel constructs a new QItemSelectionModel object. func NewQItemSelectionModel() *QItemSelectionModel { - ret := C.QItemSelectionModel_new() - return newQItemSelectionModel(ret) + var outptr_QItemSelectionModel *C.QItemSelectionModel = nil + var outptr_QObject *C.QObject = nil + + C.QItemSelectionModel_new(&outptr_QItemSelectionModel, &outptr_QObject) + ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQItemSelectionModel2 constructs a new QItemSelectionModel object. func NewQItemSelectionModel2(model *QAbstractItemModel, parent *QObject) *QItemSelectionModel { - ret := C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer()) - return newQItemSelectionModel(ret) + var outptr_QItemSelectionModel *C.QItemSelectionModel = nil + var outptr_QObject *C.QObject = nil + + C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) + ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQItemSelectionModel3 constructs a new QItemSelectionModel object. func NewQItemSelectionModel3(model *QAbstractItemModel) *QItemSelectionModel { - ret := C.QItemSelectionModel_new3(model.cPointer()) - return newQItemSelectionModel(ret) + var outptr_QItemSelectionModel *C.QItemSelectionModel = nil + var outptr_QObject *C.QObject = nil + + C.QItemSelectionModel_new3(model.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) + ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QItemSelectionModel) MetaObject() *QMetaObject { @@ -330,11 +377,11 @@ func (this *QItemSelectionModel) SelectedColumns() []QModelIndex { } func (this *QItemSelectionModel) Model() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model(this.h)), nil) } func (this *QItemSelectionModel) Model2() *QAbstractItemModel { - return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model2(this.h))) + return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model2(this.h)), nil) } func (this *QItemSelectionModel) SetModel(model *QAbstractItemModel) { @@ -443,7 +490,7 @@ func miqt_exec_callback_QItemSelectionModel_ModelChanged(cb C.intptr_t, model *C } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model)) + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) gofunc(slotval1) } @@ -512,9 +559,283 @@ func (this *QItemSelectionModel) SelectedColumns1(row int) []QModelIndex { return _ret } +func (this *QItemSelectionModel) callVirtualBase_SetCurrentIndex(index *QModelIndex, command QItemSelectionModel__SelectionFlag) { + + C.QItemSelectionModel_virtualbase_SetCurrentIndex(unsafe.Pointer(this.h), index.cPointer(), (C.int)(command)) + +} +func (this *QItemSelectionModel) OnSetCurrentIndex(slot func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) { + C.QItemSelectionModel_override_virtual_SetCurrentIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_SetCurrentIndex +func miqt_exec_callback_QItemSelectionModel_SetCurrentIndex(self *C.QItemSelectionModel, cb C.intptr_t, index *C.QModelIndex, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_SetCurrentIndex, slotval1, slotval2) + +} + +func (this *QItemSelectionModel) callVirtualBase_Select(index *QModelIndex, command QItemSelectionModel__SelectionFlag) { + + C.QItemSelectionModel_virtualbase_Select(unsafe.Pointer(this.h), index.cPointer(), (C.int)(command)) + +} +func (this *QItemSelectionModel) OnSelect(slot func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) { + C.QItemSelectionModel_override_virtual_Select(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Select +func miqt_exec_callback_QItemSelectionModel_Select(self *C.QItemSelectionModel, cb C.intptr_t, index *C.QModelIndex, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, command QItemSelectionModel__SelectionFlag), index *QModelIndex, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Select, slotval1, slotval2) + +} + +func (this *QItemSelectionModel) callVirtualBase_Clear() { + + C.QItemSelectionModel_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QItemSelectionModel) OnClear(slot func(super func())) { + C.QItemSelectionModel_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Clear +func miqt_exec_callback_QItemSelectionModel_Clear(self *C.QItemSelectionModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Clear) + +} + +func (this *QItemSelectionModel) callVirtualBase_Reset() { + + C.QItemSelectionModel_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QItemSelectionModel) OnReset(slot func(super func())) { + C.QItemSelectionModel_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Reset +func miqt_exec_callback_QItemSelectionModel_Reset(self *C.QItemSelectionModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Reset) + +} + +func (this *QItemSelectionModel) callVirtualBase_ClearCurrentIndex() { + + C.QItemSelectionModel_virtualbase_ClearCurrentIndex(unsafe.Pointer(this.h)) + +} +func (this *QItemSelectionModel) OnClearCurrentIndex(slot func(super func())) { + C.QItemSelectionModel_override_virtual_ClearCurrentIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_ClearCurrentIndex +func miqt_exec_callback_QItemSelectionModel_ClearCurrentIndex(self *C.QItemSelectionModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ClearCurrentIndex) + +} + +func (this *QItemSelectionModel) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QItemSelectionModel_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QItemSelectionModel) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QItemSelectionModel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Event +func miqt_exec_callback_QItemSelectionModel_Event(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemSelectionModel) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QItemSelectionModel_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QItemSelectionModel) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QItemSelectionModel_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_EventFilter +func miqt_exec_callback_QItemSelectionModel_EventFilter(self *C.QItemSelectionModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QItemSelectionModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QItemSelectionModel) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QItemSelectionModel_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QItemSelectionModel) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QItemSelectionModel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_TimerEvent +func miqt_exec_callback_QItemSelectionModel_TimerEvent(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QItemSelectionModel_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QItemSelectionModel) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QItemSelectionModel_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_ChildEvent +func miqt_exec_callback_QItemSelectionModel_ChildEvent(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_CustomEvent(event *QEvent) { + + C.QItemSelectionModel_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QItemSelectionModel) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QItemSelectionModel_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_CustomEvent +func miqt_exec_callback_QItemSelectionModel_CustomEvent(self *C.QItemSelectionModel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QItemSelectionModel_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QItemSelectionModel) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QItemSelectionModel_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_ConnectNotify +func miqt_exec_callback_QItemSelectionModel_ConnectNotify(self *C.QItemSelectionModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QItemSelectionModel) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QItemSelectionModel_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QItemSelectionModel) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QItemSelectionModel_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_DisconnectNotify +func miqt_exec_callback_QItemSelectionModel_DisconnectNotify(self *C.QItemSelectionModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QItemSelectionModel) Delete() { - C.QItemSelectionModel_Delete(this.h) + C.QItemSelectionModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qitemselectionmodel.h b/qt6/gen_qitemselectionmodel.h index 2b44d5dd..2540fef1 100644 --- a/qt6/gen_qitemselectionmodel.h +++ b/qt6/gen_qitemselectionmodel.h @@ -16,26 +16,34 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QChildEvent; +class QEvent; class QItemSelectionModel; class QItemSelectionRange; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; class QPersistentModelIndex; +class QTimerEvent; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QItemSelectionRange QItemSelectionRange; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPersistentModelIndex QPersistentModelIndex; +typedef struct QTimerEvent QTimerEvent; #endif -QItemSelectionRange* QItemSelectionRange_new(); -QItemSelectionRange* QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR); -QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* index); -QItemSelectionRange* QItemSelectionRange_new4(QItemSelectionRange* param1); +void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange); +void QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange); +void QItemSelectionRange_new3(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange); +void QItemSelectionRange_new4(QItemSelectionRange* param1, QItemSelectionRange** outptr_QItemSelectionRange); void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other); int QItemSelectionRange_Top(const QItemSelectionRange* self); int QItemSelectionRange_Left(const QItemSelectionRange* self); @@ -56,11 +64,11 @@ bool QItemSelectionRange_OperatorNotEqual(const QItemSelectionRange* self, QItem bool QItemSelectionRange_IsValid(const QItemSelectionRange* self); bool QItemSelectionRange_IsEmpty(const QItemSelectionRange* self); struct miqt_array /* of QModelIndex* */ QItemSelectionRange_Indexes(const QItemSelectionRange* self); -void QItemSelectionRange_Delete(QItemSelectionRange* self); +void QItemSelectionRange_Delete(QItemSelectionRange* self, bool isSubclass); -QItemSelectionModel* QItemSelectionModel_new(); -QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent); -QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model); +void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); +void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); +void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self); void* QItemSelectionModel_Metacast(QItemSelectionModel* self, const char* param1); struct miqt_string QItemSelectionModel_Tr(const char* s); @@ -99,7 +107,31 @@ bool QItemSelectionModel_RowIntersectsSelection2(const QItemSelectionModel* self bool QItemSelectionModel_ColumnIntersectsSelection2(const QItemSelectionModel* self, int column, QModelIndex* parent); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedRows1(const QItemSelectionModel* self, int column); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns1(const QItemSelectionModel* self, int row); -void QItemSelectionModel_Delete(QItemSelectionModel* self); +void QItemSelectionModel_override_virtual_SetCurrentIndex(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_SetCurrentIndex(void* self, QModelIndex* index, int command); +void QItemSelectionModel_override_virtual_Select(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Select(void* self, QModelIndex* index, int command); +void QItemSelectionModel_override_virtual_Clear(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Clear(void* self); +void QItemSelectionModel_override_virtual_Reset(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Reset(void* self); +void QItemSelectionModel_override_virtual_ClearCurrentIndex(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_ClearCurrentIndex(void* self); +void QItemSelectionModel_override_virtual_Event(void* self, intptr_t slot); +bool QItemSelectionModel_virtualbase_Event(void* self, QEvent* event); +void QItemSelectionModel_override_virtual_EventFilter(void* self, intptr_t slot); +bool QItemSelectionModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QItemSelectionModel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QItemSelectionModel_override_virtual_ChildEvent(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QItemSelectionModel_override_virtual_CustomEvent(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_CustomEvent(void* self, QEvent* event); +void QItemSelectionModel_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qjsonarray.cpp b/qt6/gen_qjsonarray.cpp index c40e3900..7ceef1c6 100644 --- a/qt6/gen_qjsonarray.cpp +++ b/qt6/gen_qjsonarray.cpp @@ -12,12 +12,14 @@ #include "gen_qjsonarray.h" #include "_cgo_export.h" -QJsonArray* QJsonArray_new() { - return new QJsonArray(); +void QJsonArray_new(QJsonArray** outptr_QJsonArray) { + QJsonArray* ret = new QJsonArray(); + *outptr_QJsonArray = ret; } -QJsonArray* QJsonArray_new2(QJsonArray* other) { - return new QJsonArray(*other); +void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray) { + QJsonArray* ret = new QJsonArray(*other); + *outptr_QJsonArray = ret; } void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other) { @@ -193,20 +195,27 @@ bool QJsonArray_Empty(const QJsonArray* self) { return self->empty(); } -void QJsonArray_Delete(QJsonArray* self) { - delete self; +void QJsonArray_Delete(QJsonArray* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonArray__iterator* QJsonArray__iterator_new() { - return new QJsonArray::iterator(); +void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator) { + QJsonArray::iterator* ret = new QJsonArray::iterator(); + *outptr_QJsonArray__iterator = ret; } -QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index) { - return new QJsonArray::iterator(array, (qsizetype)(index)); +void QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__iterator** outptr_QJsonArray__iterator) { + QJsonArray::iterator* ret = new QJsonArray::iterator(array, (qsizetype)(index)); + *outptr_QJsonArray__iterator = ret; } -QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* other) { - return new QJsonArray::iterator(*other); +void QJsonArray__iterator_new3(QJsonArray__iterator* other, QJsonArray__iterator** outptr_QJsonArray__iterator) { + QJsonArray::iterator* ret = new QJsonArray::iterator(*other); + *outptr_QJsonArray__iterator = ret; } void QJsonArray__iterator_OperatorAssign(QJsonArray__iterator* self, QJsonArray__iterator* other) { @@ -322,24 +331,32 @@ ptrdiff_t QJsonArray__iterator_OperatorMinusWithQJsonArrayiterator(const QJsonAr return static_cast(_ret); } -void QJsonArray__iterator_Delete(QJsonArray__iterator* self) { - delete self; +void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonArray__const_iterator* QJsonArray__const_iterator_new() { - return new QJsonArray::const_iterator(); +void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(); + *outptr_QJsonArray__const_iterator = ret; } -QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index) { - return new QJsonArray::const_iterator(array, (qsizetype)(index)); +void QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(array, (qsizetype)(index)); + *outptr_QJsonArray__const_iterator = ret; } -QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__iterator* o) { - return new QJsonArray::const_iterator(*o); +void QJsonArray__const_iterator_new3(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*o); + *outptr_QJsonArray__const_iterator = ret; } -QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other) { - return new QJsonArray::const_iterator(*other); +void QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { + QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*other); + *outptr_QJsonArray__const_iterator = ret; } void QJsonArray__const_iterator_OperatorAssign(QJsonArray__const_iterator* self, QJsonArray__const_iterator* other) { @@ -427,7 +444,11 @@ ptrdiff_t QJsonArray__const_iterator_OperatorMinusWithQJsonArrayconstIterator(co return static_cast(_ret); } -void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self) { - delete self; +void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qjsonarray.go b/qt6/gen_qjsonarray.go index 9fa30f5c..50a1bc7b 100644 --- a/qt6/gen_qjsonarray.go +++ b/qt6/gen_qjsonarray.go @@ -14,7 +14,8 @@ import ( ) type QJsonArray struct { - h *C.QJsonArray + h *C.QJsonArray + isSubclass bool } func (this *QJsonArray) cPointer() *C.QJsonArray { @@ -31,6 +32,7 @@ func (this *QJsonArray) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonArray constructs the type using only CGO pointers. func newQJsonArray(h *C.QJsonArray) *QJsonArray { if h == nil { return nil @@ -38,20 +40,33 @@ func newQJsonArray(h *C.QJsonArray) *QJsonArray { return &QJsonArray{h: h} } +// UnsafeNewQJsonArray constructs the type using only unsafe pointers. func UnsafeNewQJsonArray(h unsafe.Pointer) *QJsonArray { - return newQJsonArray((*C.QJsonArray)(h)) + if h == nil { + return nil + } + + return &QJsonArray{h: (*C.QJsonArray)(h)} } // NewQJsonArray constructs a new QJsonArray object. func NewQJsonArray() *QJsonArray { - ret := C.QJsonArray_new() - return newQJsonArray(ret) + var outptr_QJsonArray *C.QJsonArray = nil + + C.QJsonArray_new(&outptr_QJsonArray) + ret := newQJsonArray(outptr_QJsonArray) + ret.isSubclass = true + return ret } // NewQJsonArray2 constructs a new QJsonArray object. func NewQJsonArray2(other *QJsonArray) *QJsonArray { - ret := C.QJsonArray_new2(other.cPointer()) - return newQJsonArray(ret) + var outptr_QJsonArray *C.QJsonArray = nil + + C.QJsonArray_new2(other.cPointer(), &outptr_QJsonArray) + ret := newQJsonArray(outptr_QJsonArray) + ret.isSubclass = true + return ret } func (this *QJsonArray) OperatorAssign(other *QJsonArray) { @@ -149,7 +164,7 @@ func (this *QJsonArray) Contains(element *QJsonValue) bool { func (this *QJsonArray) OperatorSubscript(i int64) *QJsonValueRef { _ret := C.QJsonArray_OperatorSubscript(this.h, (C.ptrdiff_t)(i)) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -280,7 +295,7 @@ func (this *QJsonArray) Empty() bool { // Delete this object from C++ memory. func (this *QJsonArray) Delete() { - C.QJsonArray_Delete(this.h) + C.QJsonArray_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -293,7 +308,8 @@ func (this *QJsonArray) GoGC() { } type QJsonArray__iterator struct { - h *C.QJsonArray__iterator + h *C.QJsonArray__iterator + isSubclass bool } func (this *QJsonArray__iterator) cPointer() *C.QJsonArray__iterator { @@ -310,6 +326,7 @@ func (this *QJsonArray__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonArray__iterator constructs the type using only CGO pointers. func newQJsonArray__iterator(h *C.QJsonArray__iterator) *QJsonArray__iterator { if h == nil { return nil @@ -317,26 +334,43 @@ func newQJsonArray__iterator(h *C.QJsonArray__iterator) *QJsonArray__iterator { return &QJsonArray__iterator{h: h} } +// UnsafeNewQJsonArray__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__iterator(h unsafe.Pointer) *QJsonArray__iterator { - return newQJsonArray__iterator((*C.QJsonArray__iterator)(h)) + if h == nil { + return nil + } + + return &QJsonArray__iterator{h: (*C.QJsonArray__iterator)(h)} } // NewQJsonArray__iterator constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator() *QJsonArray__iterator { - ret := C.QJsonArray__iterator_new() - return newQJsonArray__iterator(ret) + var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil + + C.QJsonArray__iterator_new(&outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__iterator2 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator2(array *QJsonArray, index int64) *QJsonArray__iterator { - ret := C.QJsonArray__iterator_new2(array.cPointer(), (C.ptrdiff_t)(index)) - return newQJsonArray__iterator(ret) + var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil + + C.QJsonArray__iterator_new2(array.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__iterator3 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator3(other *QJsonArray__iterator) *QJsonArray__iterator { - ret := C.QJsonArray__iterator_new3(other.cPointer()) - return newQJsonArray__iterator(ret) + var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil + + C.QJsonArray__iterator_new3(other.cPointer(), &outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret.isSubclass = true + return ret } func (this *QJsonArray__iterator) OperatorAssign(other *QJsonArray__iterator) { @@ -345,7 +379,7 @@ func (this *QJsonArray__iterator) OperatorAssign(other *QJsonArray__iterator) { func (this *QJsonArray__iterator) OperatorMultiply() *QJsonValueRef { _ret := C.QJsonArray__iterator_OperatorMultiply(this.h) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -355,12 +389,12 @@ func (this *QJsonArray__iterator) OperatorMinusGreater() *QJsonValueConstRef { } func (this *QJsonArray__iterator) OperatorMinusGreater2() *QJsonValueRef { - return UnsafeNewQJsonValueRef(unsafe.Pointer(C.QJsonArray__iterator_OperatorMinusGreater2(this.h))) + return UnsafeNewQJsonValueRef(unsafe.Pointer(C.QJsonArray__iterator_OperatorMinusGreater2(this.h)), nil) } func (this *QJsonArray__iterator) OperatorSubscript(j int64) *QJsonValueRef { _ret := C.QJsonArray__iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j)) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -463,7 +497,7 @@ func (this *QJsonArray__iterator) OperatorMinusWithQJsonArrayiterator(j QJsonArr // Delete this object from C++ memory. func (this *QJsonArray__iterator) Delete() { - C.QJsonArray__iterator_Delete(this.h) + C.QJsonArray__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -476,7 +510,8 @@ func (this *QJsonArray__iterator) GoGC() { } type QJsonArray__const_iterator struct { - h *C.QJsonArray__const_iterator + h *C.QJsonArray__const_iterator + isSubclass bool } func (this *QJsonArray__const_iterator) cPointer() *C.QJsonArray__const_iterator { @@ -493,6 +528,7 @@ func (this *QJsonArray__const_iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonArray__const_iterator constructs the type using only CGO pointers. func newQJsonArray__const_iterator(h *C.QJsonArray__const_iterator) *QJsonArray__const_iterator { if h == nil { return nil @@ -500,32 +536,53 @@ func newQJsonArray__const_iterator(h *C.QJsonArray__const_iterator) *QJsonArray_ return &QJsonArray__const_iterator{h: h} } +// UnsafeNewQJsonArray__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__const_iterator(h unsafe.Pointer) *QJsonArray__const_iterator { - return newQJsonArray__const_iterator((*C.QJsonArray__const_iterator)(h)) + if h == nil { + return nil + } + + return &QJsonArray__const_iterator{h: (*C.QJsonArray__const_iterator)(h)} } // NewQJsonArray__const_iterator constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator() *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new() - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new(&outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__const_iterator2 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator2(array *QJsonArray, index int64) *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new2(array.cPointer(), (C.ptrdiff_t)(index)) - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new2(array.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__const_iterator3 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator3(o *QJsonArray__iterator) *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new3(o.cPointer()) - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new3(o.cPointer(), &outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonArray__const_iterator4 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator4(other *QJsonArray__const_iterator) *QJsonArray__const_iterator { - ret := C.QJsonArray__const_iterator_new4(other.cPointer()) - return newQJsonArray__const_iterator(ret) + var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil + + C.QJsonArray__const_iterator_new4(other.cPointer(), &outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret.isSubclass = true + return ret } func (this *QJsonArray__const_iterator) OperatorAssign(other *QJsonArray__const_iterator) { @@ -624,7 +681,7 @@ func (this *QJsonArray__const_iterator) OperatorMinusWithQJsonArrayconstIterator // Delete this object from C++ memory. func (this *QJsonArray__const_iterator) Delete() { - C.QJsonArray__const_iterator_Delete(this.h) + C.QJsonArray__const_iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qjsonarray.h b/qt6/gen_qjsonarray.h index ff0c24a5..eea094ba 100644 --- a/qt6/gen_qjsonarray.h +++ b/qt6/gen_qjsonarray.h @@ -38,8 +38,8 @@ typedef struct QJsonValueConstRef QJsonValueConstRef; typedef struct QJsonValueRef QJsonValueRef; #endif -QJsonArray* QJsonArray_new(); -QJsonArray* QJsonArray_new2(QJsonArray* other); +void QJsonArray_new(QJsonArray** outptr_QJsonArray); +void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray); void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other); QJsonArray* QJsonArray_FromStringList(struct miqt_array /* of struct miqt_string */ list); ptrdiff_t QJsonArray_Size(const QJsonArray* self); @@ -80,11 +80,11 @@ void QJsonArray_PushFront(QJsonArray* self, QJsonValue* t); void QJsonArray_PopFront(QJsonArray* self); void QJsonArray_PopBack(QJsonArray* self); bool QJsonArray_Empty(const QJsonArray* self); -void QJsonArray_Delete(QJsonArray* self); +void QJsonArray_Delete(QJsonArray* self, bool isSubclass); -QJsonArray__iterator* QJsonArray__iterator_new(); -QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index); -QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* other); +void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator); +void QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__iterator** outptr_QJsonArray__iterator); +void QJsonArray__iterator_new3(QJsonArray__iterator* other, QJsonArray__iterator** outptr_QJsonArray__iterator); void QJsonArray__iterator_OperatorAssign(QJsonArray__iterator* self, QJsonArray__iterator* other); QJsonValueRef* QJsonArray__iterator_OperatorMultiply(const QJsonArray__iterator* self); QJsonValueConstRef* QJsonArray__iterator_OperatorMinusGreater(const QJsonArray__iterator* self); @@ -111,12 +111,12 @@ QJsonArray__iterator* QJsonArray__iterator_OperatorMinusAssign(QJsonArray__itera QJsonArray__iterator* QJsonArray__iterator_OperatorPlus(const QJsonArray__iterator* self, ptrdiff_t j); QJsonArray__iterator* QJsonArray__iterator_OperatorMinus(const QJsonArray__iterator* self, ptrdiff_t j); ptrdiff_t QJsonArray__iterator_OperatorMinusWithQJsonArrayiterator(const QJsonArray__iterator* self, QJsonArray__iterator* j); -void QJsonArray__iterator_Delete(QJsonArray__iterator* self); +void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass); -QJsonArray__const_iterator* QJsonArray__const_iterator_new(); -QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index); -QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__iterator* o); -QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other); +void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +void QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +void QJsonArray__const_iterator_new3(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +void QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); void QJsonArray__const_iterator_OperatorAssign(QJsonArray__const_iterator* self, QJsonArray__const_iterator* other); QJsonValueConstRef* QJsonArray__const_iterator_OperatorMultiply(const QJsonArray__const_iterator* self); QJsonValueConstRef* QJsonArray__const_iterator_OperatorMinusGreater(const QJsonArray__const_iterator* self); @@ -136,7 +136,7 @@ QJsonArray__const_iterator* QJsonArray__const_iterator_OperatorMinusAssign(QJson QJsonArray__const_iterator* QJsonArray__const_iterator_OperatorPlus(const QJsonArray__const_iterator* self, ptrdiff_t j); QJsonArray__const_iterator* QJsonArray__const_iterator_OperatorMinus(const QJsonArray__const_iterator* self, ptrdiff_t j); ptrdiff_t QJsonArray__const_iterator_OperatorMinusWithQJsonArrayconstIterator(const QJsonArray__const_iterator* self, QJsonArray__const_iterator* j); -void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self); +void QJsonArray__const_iterator_Delete(QJsonArray__const_iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qjsondocument.cpp b/qt6/gen_qjsondocument.cpp index a131a9a7..d1a975bd 100644 --- a/qt6/gen_qjsondocument.cpp +++ b/qt6/gen_qjsondocument.cpp @@ -23,24 +23,32 @@ struct miqt_string QJsonParseError_ErrorString(const QJsonParseError* self) { return _ms; } -void QJsonParseError_Delete(QJsonParseError* self) { - delete self; +void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonDocument* QJsonDocument_new() { - return new QJsonDocument(); +void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(); + *outptr_QJsonDocument = ret; } -QJsonDocument* QJsonDocument_new2(QJsonObject* object) { - return new QJsonDocument(*object); +void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(*object); + *outptr_QJsonDocument = ret; } -QJsonDocument* QJsonDocument_new3(QJsonArray* array) { - return new QJsonDocument(*array); +void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(*array); + *outptr_QJsonDocument = ret; } -QJsonDocument* QJsonDocument_new4(QJsonDocument* other) { - return new QJsonDocument(*other); +void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument) { + QJsonDocument* ret = new QJsonDocument(*other); + *outptr_QJsonDocument = ret; } void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other) { @@ -136,7 +144,11 @@ struct miqt_string QJsonDocument_ToJson1(const QJsonDocument* self, int format) return _ms; } -void QJsonDocument_Delete(QJsonDocument* self) { - delete self; +void QJsonDocument_Delete(QJsonDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qjsondocument.go b/qt6/gen_qjsondocument.go index 0bc0fb02..2e7da214 100644 --- a/qt6/gen_qjsondocument.go +++ b/qt6/gen_qjsondocument.go @@ -41,7 +41,8 @@ const ( ) type QJsonParseError struct { - h *C.QJsonParseError + h *C.QJsonParseError + isSubclass bool } func (this *QJsonParseError) cPointer() *C.QJsonParseError { @@ -58,6 +59,7 @@ func (this *QJsonParseError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonParseError constructs the type using only CGO pointers. func newQJsonParseError(h *C.QJsonParseError) *QJsonParseError { if h == nil { return nil @@ -65,8 +67,13 @@ func newQJsonParseError(h *C.QJsonParseError) *QJsonParseError { return &QJsonParseError{h: h} } +// UnsafeNewQJsonParseError constructs the type using only unsafe pointers. func UnsafeNewQJsonParseError(h unsafe.Pointer) *QJsonParseError { - return newQJsonParseError((*C.QJsonParseError)(h)) + if h == nil { + return nil + } + + return &QJsonParseError{h: (*C.QJsonParseError)(h)} } func (this *QJsonParseError) ErrorString() string { @@ -78,7 +85,7 @@ func (this *QJsonParseError) ErrorString() string { // Delete this object from C++ memory. func (this *QJsonParseError) Delete() { - C.QJsonParseError_Delete(this.h) + C.QJsonParseError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -91,7 +98,8 @@ func (this *QJsonParseError) GoGC() { } type QJsonDocument struct { - h *C.QJsonDocument + h *C.QJsonDocument + isSubclass bool } func (this *QJsonDocument) cPointer() *C.QJsonDocument { @@ -108,6 +116,7 @@ func (this *QJsonDocument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonDocument constructs the type using only CGO pointers. func newQJsonDocument(h *C.QJsonDocument) *QJsonDocument { if h == nil { return nil @@ -115,32 +124,53 @@ func newQJsonDocument(h *C.QJsonDocument) *QJsonDocument { return &QJsonDocument{h: h} } +// UnsafeNewQJsonDocument constructs the type using only unsafe pointers. func UnsafeNewQJsonDocument(h unsafe.Pointer) *QJsonDocument { - return newQJsonDocument((*C.QJsonDocument)(h)) + if h == nil { + return nil + } + + return &QJsonDocument{h: (*C.QJsonDocument)(h)} } // NewQJsonDocument constructs a new QJsonDocument object. func NewQJsonDocument() *QJsonDocument { - ret := C.QJsonDocument_new() - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new(&outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } // NewQJsonDocument2 constructs a new QJsonDocument object. func NewQJsonDocument2(object *QJsonObject) *QJsonDocument { - ret := C.QJsonDocument_new2(object.cPointer()) - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new2(object.cPointer(), &outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } // NewQJsonDocument3 constructs a new QJsonDocument object. func NewQJsonDocument3(array *QJsonArray) *QJsonDocument { - ret := C.QJsonDocument_new3(array.cPointer()) - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new3(array.cPointer(), &outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } // NewQJsonDocument4 constructs a new QJsonDocument object. func NewQJsonDocument4(other *QJsonDocument) *QJsonDocument { - ret := C.QJsonDocument_new4(other.cPointer()) - return newQJsonDocument(ret) + var outptr_QJsonDocument *C.QJsonDocument = nil + + C.QJsonDocument_new4(other.cPointer(), &outptr_QJsonDocument) + ret := newQJsonDocument(outptr_QJsonDocument) + ret.isSubclass = true + return ret } func (this *QJsonDocument) OperatorAssign(other *QJsonDocument) { @@ -265,7 +295,7 @@ func (this *QJsonDocument) ToJson1(format QJsonDocument__JsonFormat) []byte { // Delete this object from C++ memory. func (this *QJsonDocument) Delete() { - C.QJsonDocument_Delete(this.h) + C.QJsonDocument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qjsondocument.h b/qt6/gen_qjsondocument.h index ba019314..ff5cdf7e 100644 --- a/qt6/gen_qjsondocument.h +++ b/qt6/gen_qjsondocument.h @@ -33,12 +33,12 @@ typedef struct QVariant QVariant; #endif struct miqt_string QJsonParseError_ErrorString(const QJsonParseError* self); -void QJsonParseError_Delete(QJsonParseError* self); +void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass); -QJsonDocument* QJsonDocument_new(); -QJsonDocument* QJsonDocument_new2(QJsonObject* object); -QJsonDocument* QJsonDocument_new3(QJsonArray* array); -QJsonDocument* QJsonDocument_new4(QJsonDocument* other); +void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument); +void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument); +void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument); +void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument); void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other); void QJsonDocument_Swap(QJsonDocument* self, QJsonDocument* other); QJsonDocument* QJsonDocument_FromVariant(QVariant* variant); @@ -59,7 +59,7 @@ bool QJsonDocument_OperatorNotEqual(const QJsonDocument* self, QJsonDocument* ot bool QJsonDocument_IsNull(const QJsonDocument* self); QJsonDocument* QJsonDocument_FromJson2(struct miqt_string json, QJsonParseError* error); struct miqt_string QJsonDocument_ToJson1(const QJsonDocument* self, int format); -void QJsonDocument_Delete(QJsonDocument* self); +void QJsonDocument_Delete(QJsonDocument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qjsonobject.cpp b/qt6/gen_qjsonobject.cpp index 19a3314d..b111bc1a 100644 --- a/qt6/gen_qjsonobject.cpp +++ b/qt6/gen_qjsonobject.cpp @@ -14,12 +14,14 @@ #include "gen_qjsonobject.h" #include "_cgo_export.h" -QJsonObject* QJsonObject_new() { - return new QJsonObject(); +void QJsonObject_new(QJsonObject** outptr_QJsonObject) { + QJsonObject* ret = new QJsonObject(); + *outptr_QJsonObject = ret; } -QJsonObject* QJsonObject_new2(QJsonObject* other) { - return new QJsonObject(*other); +void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject) { + QJsonObject* ret = new QJsonObject(*other); + *outptr_QJsonObject = ret; } void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other) { @@ -232,20 +234,27 @@ bool QJsonObject_Empty(const QJsonObject* self) { return self->empty(); } -void QJsonObject_Delete(QJsonObject* self) { - delete self; +void QJsonObject_Delete(QJsonObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonObject__iterator* QJsonObject__iterator_new() { - return new QJsonObject::iterator(); +void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator) { + QJsonObject::iterator* ret = new QJsonObject::iterator(); + *outptr_QJsonObject__iterator = ret; } -QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index) { - return new QJsonObject::iterator(obj, (qsizetype)(index)); +void QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__iterator** outptr_QJsonObject__iterator) { + QJsonObject::iterator* ret = new QJsonObject::iterator(obj, (qsizetype)(index)); + *outptr_QJsonObject__iterator = ret; } -QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* other) { - return new QJsonObject::iterator(*other); +void QJsonObject__iterator_new3(QJsonObject__iterator* other, QJsonObject__iterator** outptr_QJsonObject__iterator) { + QJsonObject::iterator* ret = new QJsonObject::iterator(*other); + *outptr_QJsonObject__iterator = ret; } void QJsonObject__iterator_OperatorAssign(QJsonObject__iterator* self, QJsonObject__iterator* other) { @@ -376,24 +385,32 @@ bool QJsonObject__iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__it return self->operator>=(*other); } -void QJsonObject__iterator_Delete(QJsonObject__iterator* self) { - delete self; +void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonObject__const_iterator* QJsonObject__const_iterator_new() { - return new QJsonObject::const_iterator(); +void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(); + *outptr_QJsonObject__const_iterator = ret; } -QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index) { - return new QJsonObject::const_iterator(obj, (qsizetype)(index)); +void QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(obj, (qsizetype)(index)); + *outptr_QJsonObject__const_iterator = ret; } -QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other) { - return new QJsonObject::const_iterator(*other); +void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*other); + *outptr_QJsonObject__const_iterator = ret; } -QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other) { - return new QJsonObject::const_iterator(*other); +void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { + QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*other); + *outptr_QJsonObject__const_iterator = ret; } void QJsonObject__const_iterator_OperatorAssign(QJsonObject__const_iterator* self, QJsonObject__const_iterator* other) { @@ -520,7 +537,11 @@ bool QJsonObject__const_iterator_OperatorGreaterOrEqualWithOther(const QJsonObje return self->operator>=(*other); } -void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self) { - delete self; +void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qjsonobject.go b/qt6/gen_qjsonobject.go index a66a10e0..e3e98e12 100644 --- a/qt6/gen_qjsonobject.go +++ b/qt6/gen_qjsonobject.go @@ -14,7 +14,8 @@ import ( ) type QJsonObject struct { - h *C.QJsonObject + h *C.QJsonObject + isSubclass bool } func (this *QJsonObject) cPointer() *C.QJsonObject { @@ -31,6 +32,7 @@ func (this *QJsonObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonObject constructs the type using only CGO pointers. func newQJsonObject(h *C.QJsonObject) *QJsonObject { if h == nil { return nil @@ -38,20 +40,33 @@ func newQJsonObject(h *C.QJsonObject) *QJsonObject { return &QJsonObject{h: h} } +// UnsafeNewQJsonObject constructs the type using only unsafe pointers. func UnsafeNewQJsonObject(h unsafe.Pointer) *QJsonObject { - return newQJsonObject((*C.QJsonObject)(h)) + if h == nil { + return nil + } + + return &QJsonObject{h: (*C.QJsonObject)(h)} } // NewQJsonObject constructs a new QJsonObject object. func NewQJsonObject() *QJsonObject { - ret := C.QJsonObject_new() - return newQJsonObject(ret) + var outptr_QJsonObject *C.QJsonObject = nil + + C.QJsonObject_new(&outptr_QJsonObject) + ret := newQJsonObject(outptr_QJsonObject) + ret.isSubclass = true + return ret } // NewQJsonObject2 constructs a new QJsonObject object. func NewQJsonObject2(other *QJsonObject) *QJsonObject { - ret := C.QJsonObject_new2(other.cPointer()) - return newQJsonObject(ret) + var outptr_QJsonObject *C.QJsonObject = nil + + C.QJsonObject_new2(other.cPointer(), &outptr_QJsonObject) + ret := newQJsonObject(outptr_QJsonObject) + ret.isSubclass = true + return ret } func (this *QJsonObject) OperatorAssign(other *QJsonObject) { @@ -211,7 +226,7 @@ func (this *QJsonObject) OperatorSubscriptWithKey(key string) *QJsonValueRef { key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) _ret := C.QJsonObject_OperatorSubscriptWithKey(this.h, key_ms) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -350,7 +365,7 @@ func (this *QJsonObject) Empty() bool { // Delete this object from C++ memory. func (this *QJsonObject) Delete() { - C.QJsonObject_Delete(this.h) + C.QJsonObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -363,7 +378,8 @@ func (this *QJsonObject) GoGC() { } type QJsonObject__iterator struct { - h *C.QJsonObject__iterator + h *C.QJsonObject__iterator + isSubclass bool } func (this *QJsonObject__iterator) cPointer() *C.QJsonObject__iterator { @@ -380,6 +396,7 @@ func (this *QJsonObject__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonObject__iterator constructs the type using only CGO pointers. func newQJsonObject__iterator(h *C.QJsonObject__iterator) *QJsonObject__iterator { if h == nil { return nil @@ -387,26 +404,43 @@ func newQJsonObject__iterator(h *C.QJsonObject__iterator) *QJsonObject__iterator return &QJsonObject__iterator{h: h} } +// UnsafeNewQJsonObject__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__iterator(h unsafe.Pointer) *QJsonObject__iterator { - return newQJsonObject__iterator((*C.QJsonObject__iterator)(h)) + if h == nil { + return nil + } + + return &QJsonObject__iterator{h: (*C.QJsonObject__iterator)(h)} } // NewQJsonObject__iterator constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator() *QJsonObject__iterator { - ret := C.QJsonObject__iterator_new() - return newQJsonObject__iterator(ret) + var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil + + C.QJsonObject__iterator_new(&outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__iterator2 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator2(obj *QJsonObject, index int64) *QJsonObject__iterator { - ret := C.QJsonObject__iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index)) - return newQJsonObject__iterator(ret) + var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil + + C.QJsonObject__iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__iterator3 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator3(other *QJsonObject__iterator) *QJsonObject__iterator { - ret := C.QJsonObject__iterator_new3(other.cPointer()) - return newQJsonObject__iterator(ret) + var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil + + C.QJsonObject__iterator_new3(other.cPointer(), &outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret.isSubclass = true + return ret } func (this *QJsonObject__iterator) OperatorAssign(other *QJsonObject__iterator) { @@ -422,14 +456,14 @@ func (this *QJsonObject__iterator) Key() string { func (this *QJsonObject__iterator) Value() *QJsonValueRef { _ret := C.QJsonObject__iterator_Value(this.h) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QJsonObject__iterator) OperatorMultiply() *QJsonValueRef { _ret := C.QJsonObject__iterator_OperatorMultiply(this.h) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -439,12 +473,12 @@ func (this *QJsonObject__iterator) OperatorMinusGreater() *QJsonValueConstRef { } func (this *QJsonObject__iterator) OperatorMinusGreater2() *QJsonValueRef { - return UnsafeNewQJsonValueRef(unsafe.Pointer(C.QJsonObject__iterator_OperatorMinusGreater2(this.h))) + return UnsafeNewQJsonValueRef(unsafe.Pointer(C.QJsonObject__iterator_OperatorMinusGreater2(this.h)), nil) } func (this *QJsonObject__iterator) OperatorSubscript(j int64) *QJsonValueRef { _ret := C.QJsonObject__iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j)) - _goptr := newQJsonValueRef(_ret) + _goptr := newQJsonValueRef(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -547,7 +581,7 @@ func (this *QJsonObject__iterator) OperatorGreaterOrEqualWithOther(other *QJsonO // Delete this object from C++ memory. func (this *QJsonObject__iterator) Delete() { - C.QJsonObject__iterator_Delete(this.h) + C.QJsonObject__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -560,7 +594,8 @@ func (this *QJsonObject__iterator) GoGC() { } type QJsonObject__const_iterator struct { - h *C.QJsonObject__const_iterator + h *C.QJsonObject__const_iterator + isSubclass bool } func (this *QJsonObject__const_iterator) cPointer() *C.QJsonObject__const_iterator { @@ -577,6 +612,7 @@ func (this *QJsonObject__const_iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonObject__const_iterator constructs the type using only CGO pointers. func newQJsonObject__const_iterator(h *C.QJsonObject__const_iterator) *QJsonObject__const_iterator { if h == nil { return nil @@ -584,32 +620,53 @@ func newQJsonObject__const_iterator(h *C.QJsonObject__const_iterator) *QJsonObje return &QJsonObject__const_iterator{h: h} } +// UnsafeNewQJsonObject__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__const_iterator(h unsafe.Pointer) *QJsonObject__const_iterator { - return newQJsonObject__const_iterator((*C.QJsonObject__const_iterator)(h)) + if h == nil { + return nil + } + + return &QJsonObject__const_iterator{h: (*C.QJsonObject__const_iterator)(h)} } // NewQJsonObject__const_iterator constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator() *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new() - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new(&outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__const_iterator2 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator2(obj *QJsonObject, index int64) *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index)) - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__const_iterator3 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator3(other *QJsonObject__iterator) *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new3(other.cPointer()) - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new3(other.cPointer(), &outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } // NewQJsonObject__const_iterator4 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator4(other *QJsonObject__const_iterator) *QJsonObject__const_iterator { - ret := C.QJsonObject__const_iterator_new4(other.cPointer()) - return newQJsonObject__const_iterator(ret) + var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil + + C.QJsonObject__const_iterator_new4(other.cPointer(), &outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret.isSubclass = true + return ret } func (this *QJsonObject__const_iterator) OperatorAssign(other *QJsonObject__const_iterator) { @@ -746,7 +803,7 @@ func (this *QJsonObject__const_iterator) OperatorGreaterOrEqualWithOther(other * // Delete this object from C++ memory. func (this *QJsonObject__const_iterator) Delete() { - C.QJsonObject__const_iterator_Delete(this.h) + C.QJsonObject__const_iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qjsonobject.h b/qt6/gen_qjsonobject.h index 814deb85..471c1cc0 100644 --- a/qt6/gen_qjsonobject.h +++ b/qt6/gen_qjsonobject.h @@ -40,8 +40,8 @@ typedef struct QJsonValueRef QJsonValueRef; typedef struct QVariant QVariant; #endif -QJsonObject* QJsonObject_new(); -QJsonObject* QJsonObject_new2(QJsonObject* other); +void QJsonObject_new(QJsonObject** outptr_QJsonObject); +void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject); void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other); void QJsonObject_Swap(QJsonObject* self, QJsonObject* other); QJsonObject* QJsonObject_FromVariantMap(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); @@ -73,11 +73,11 @@ QJsonObject__const_iterator* QJsonObject_FindWithKey(const QJsonObject* self, st QJsonObject__const_iterator* QJsonObject_ConstFind(const QJsonObject* self, struct miqt_string key); QJsonObject__iterator* QJsonObject_Insert(QJsonObject* self, struct miqt_string key, QJsonValue* value); bool QJsonObject_Empty(const QJsonObject* self); -void QJsonObject_Delete(QJsonObject* self); +void QJsonObject_Delete(QJsonObject* self, bool isSubclass); -QJsonObject__iterator* QJsonObject__iterator_new(); -QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index); -QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* other); +void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator); +void QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__iterator** outptr_QJsonObject__iterator); +void QJsonObject__iterator_new3(QJsonObject__iterator* other, QJsonObject__iterator** outptr_QJsonObject__iterator); void QJsonObject__iterator_OperatorAssign(QJsonObject__iterator* self, QJsonObject__iterator* other); struct miqt_string QJsonObject__iterator_Key(const QJsonObject__iterator* self); QJsonValueRef* QJsonObject__iterator_Value(const QJsonObject__iterator* self); @@ -106,12 +106,12 @@ bool QJsonObject__iterator_OperatorLesserWithOther(const QJsonObject__iterator* bool QJsonObject__iterator_OperatorLesserOrEqualWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); bool QJsonObject__iterator_OperatorGreaterWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); bool QJsonObject__iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); -void QJsonObject__iterator_Delete(QJsonObject__iterator* self); +void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass); -QJsonObject__const_iterator* QJsonObject__const_iterator_new(); -QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index); -QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other); -QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other); +void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +void QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); void QJsonObject__const_iterator_OperatorAssign(QJsonObject__const_iterator* self, QJsonObject__const_iterator* other); struct miqt_string QJsonObject__const_iterator_Key(const QJsonObject__const_iterator* self); QJsonValueConstRef* QJsonObject__const_iterator_Value(const QJsonObject__const_iterator* self); @@ -139,7 +139,7 @@ bool QJsonObject__const_iterator_OperatorLesserWithOther(const QJsonObject__cons bool QJsonObject__const_iterator_OperatorLesserOrEqualWithOther(const QJsonObject__const_iterator* self, QJsonObject__iterator* other); bool QJsonObject__const_iterator_OperatorGreaterWithOther(const QJsonObject__const_iterator* self, QJsonObject__iterator* other); bool QJsonObject__const_iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__const_iterator* self, QJsonObject__iterator* other); -void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self); +void QJsonObject__const_iterator_Delete(QJsonObject__const_iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qjsonvalue.cpp b/qt6/gen_qjsonvalue.cpp index 7e9f6fa7..ff46e2c1 100644 --- a/qt6/gen_qjsonvalue.cpp +++ b/qt6/gen_qjsonvalue.cpp @@ -11,49 +11,60 @@ #include "gen_qjsonvalue.h" #include "_cgo_export.h" -QJsonValue* QJsonValue_new() { - return new QJsonValue(); +void QJsonValue_new(QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new2(bool b) { - return new QJsonValue(b); +void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(b); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new3(double n) { - return new QJsonValue(static_cast(n)); +void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(n)); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new4(int n) { - return new QJsonValue(static_cast(n)); +void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(n)); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new5(long long v) { - return new QJsonValue(static_cast(v)); +void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(v)); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new6(struct miqt_string s) { +void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue) { QString s_QString = QString::fromUtf8(s.data, s.len); - return new QJsonValue(s_QString); + QJsonValue* ret = new QJsonValue(s_QString); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new7(const char* s) { - return new QJsonValue(s); +void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(s); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new8(QJsonArray* a) { - return new QJsonValue(*a); +void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(*a); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new9(QJsonObject* o) { - return new QJsonValue(*o); +void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(*o); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new10(QJsonValue* other) { - return new QJsonValue(*other); +void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(*other); + *outptr_QJsonValue = ret; } -QJsonValue* QJsonValue_new11(int param1) { - return new QJsonValue(static_cast(param1)); +void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue) { + QJsonValue* ret = new QJsonValue(static_cast(param1)); + *outptr_QJsonValue = ret; } void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other) { @@ -195,12 +206,17 @@ double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue) { return self->toDouble(static_cast(defaultValue)); } -void QJsonValue_Delete(QJsonValue* self) { - delete self; +void QJsonValue_Delete(QJsonValue* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonValueConstRef* QJsonValueConstRef_new(QJsonValueConstRef* param1) { - return new QJsonValueConstRef(*param1); +void QJsonValueConstRef_new(QJsonValueConstRef* param1, QJsonValueConstRef** outptr_QJsonValueConstRef) { + QJsonValueConstRef* ret = new QJsonValueConstRef(*param1); + *outptr_QJsonValueConstRef = ret; } QVariant* QJsonValueConstRef_ToVariant(const QJsonValueConstRef* self) { @@ -317,20 +333,30 @@ struct miqt_string QJsonValueConstRef_ToString1(const QJsonValueConstRef* self, return _ms; } -void QJsonValueConstRef_Delete(QJsonValueConstRef* self) { - delete self; +void QJsonValueConstRef_Delete(QJsonValueConstRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1) { - return new QJsonValueRef(*param1); +void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef) { + QJsonValueRef* ret = new QJsonValueRef(*param1); + *outptr_QJsonValueRef = ret; + *outptr_QJsonValueConstRef = static_cast(ret); } -QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx) { - return new QJsonValueRef(array, (qsizetype)(idx)); +void QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef) { + QJsonValueRef* ret = new QJsonValueRef(array, (qsizetype)(idx)); + *outptr_QJsonValueRef = ret; + *outptr_QJsonValueConstRef = static_cast(ret); } -QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx) { - return new QJsonValueRef(object, (qsizetype)(idx)); +void QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef) { + QJsonValueRef* ret = new QJsonValueRef(object, (qsizetype)(idx)); + *outptr_QJsonValueRef = ret; + *outptr_QJsonValueConstRef = static_cast(ret); } void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val) { @@ -455,7 +481,11 @@ struct miqt_string QJsonValueRef_ToString1(const QJsonValueRef* self, struct miq return _ms; } -void QJsonValueRef_Delete(QJsonValueRef* self) { - delete self; +void QJsonValueRef_Delete(QJsonValueRef* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qjsonvalue.go b/qt6/gen_qjsonvalue.go index 71831f54..3a829bcf 100644 --- a/qt6/gen_qjsonvalue.go +++ b/qt6/gen_qjsonvalue.go @@ -26,7 +26,8 @@ const ( ) type QJsonValue struct { - h *C.QJsonValue + h *C.QJsonValue + isSubclass bool } func (this *QJsonValue) cPointer() *C.QJsonValue { @@ -43,6 +44,7 @@ func (this *QJsonValue) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonValue constructs the type using only CGO pointers. func newQJsonValue(h *C.QJsonValue) *QJsonValue { if h == nil { return nil @@ -50,38 +52,63 @@ func newQJsonValue(h *C.QJsonValue) *QJsonValue { return &QJsonValue{h: h} } +// UnsafeNewQJsonValue constructs the type using only unsafe pointers. func UnsafeNewQJsonValue(h unsafe.Pointer) *QJsonValue { - return newQJsonValue((*C.QJsonValue)(h)) + if h == nil { + return nil + } + + return &QJsonValue{h: (*C.QJsonValue)(h)} } // NewQJsonValue constructs a new QJsonValue object. func NewQJsonValue() *QJsonValue { - ret := C.QJsonValue_new() - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new(&outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue2 constructs a new QJsonValue object. func NewQJsonValue2(b bool) *QJsonValue { - ret := C.QJsonValue_new2((C.bool)(b)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new2((C.bool)(b), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue3 constructs a new QJsonValue object. func NewQJsonValue3(n float64) *QJsonValue { - ret := C.QJsonValue_new3((C.double)(n)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new3((C.double)(n), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue4 constructs a new QJsonValue object. func NewQJsonValue4(n int) *QJsonValue { - ret := C.QJsonValue_new4((C.int)(n)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new4((C.int)(n), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue5 constructs a new QJsonValue object. func NewQJsonValue5(v int64) *QJsonValue { - ret := C.QJsonValue_new5((C.longlong)(v)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new5((C.longlong)(v), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue6 constructs a new QJsonValue object. @@ -90,40 +117,64 @@ func NewQJsonValue6(s string) *QJsonValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - ret := C.QJsonValue_new6(s_ms) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new6(s_ms, &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue7 constructs a new QJsonValue object. func NewQJsonValue7(s string) *QJsonValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - ret := C.QJsonValue_new7(s_Cstring) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new7(s_Cstring, &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue8 constructs a new QJsonValue object. func NewQJsonValue8(a *QJsonArray) *QJsonValue { - ret := C.QJsonValue_new8(a.cPointer()) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new8(a.cPointer(), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue9 constructs a new QJsonValue object. func NewQJsonValue9(o *QJsonObject) *QJsonValue { - ret := C.QJsonValue_new9(o.cPointer()) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new9(o.cPointer(), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue10 constructs a new QJsonValue object. func NewQJsonValue10(other *QJsonValue) *QJsonValue { - ret := C.QJsonValue_new10(other.cPointer()) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new10(other.cPointer(), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } // NewQJsonValue11 constructs a new QJsonValue object. func NewQJsonValue11(param1 QJsonValue__Type) *QJsonValue { - ret := C.QJsonValue_new11((C.int)(param1)) - return newQJsonValue(ret) + var outptr_QJsonValue *C.QJsonValue = nil + + C.QJsonValue_new11((C.int)(param1), &outptr_QJsonValue) + ret := newQJsonValue(outptr_QJsonValue) + ret.isSubclass = true + return ret } func (this *QJsonValue) OperatorAssign(other *QJsonValue) { @@ -286,7 +337,7 @@ func (this *QJsonValue) ToDouble1(defaultValue float64) float64 { // Delete this object from C++ memory. func (this *QJsonValue) Delete() { - C.QJsonValue_Delete(this.h) + C.QJsonValue_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -299,7 +350,8 @@ func (this *QJsonValue) GoGC() { } type QJsonValueConstRef struct { - h *C.QJsonValueConstRef + h *C.QJsonValueConstRef + isSubclass bool } func (this *QJsonValueConstRef) cPointer() *C.QJsonValueConstRef { @@ -316,6 +368,7 @@ func (this *QJsonValueConstRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQJsonValueConstRef constructs the type using only CGO pointers. func newQJsonValueConstRef(h *C.QJsonValueConstRef) *QJsonValueConstRef { if h == nil { return nil @@ -323,14 +376,23 @@ func newQJsonValueConstRef(h *C.QJsonValueConstRef) *QJsonValueConstRef { return &QJsonValueConstRef{h: h} } +// UnsafeNewQJsonValueConstRef constructs the type using only unsafe pointers. func UnsafeNewQJsonValueConstRef(h unsafe.Pointer) *QJsonValueConstRef { - return newQJsonValueConstRef((*C.QJsonValueConstRef)(h)) + if h == nil { + return nil + } + + return &QJsonValueConstRef{h: (*C.QJsonValueConstRef)(h)} } // NewQJsonValueConstRef constructs a new QJsonValueConstRef object. func NewQJsonValueConstRef(param1 *QJsonValueConstRef) *QJsonValueConstRef { - ret := C.QJsonValueConstRef_new(param1.cPointer()) - return newQJsonValueConstRef(ret) + var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil + + C.QJsonValueConstRef_new(param1.cPointer(), &outptr_QJsonValueConstRef) + ret := newQJsonValueConstRef(outptr_QJsonValueConstRef) + ret.isSubclass = true + return ret } func (this *QJsonValueConstRef) ToVariant() *QVariant { @@ -453,7 +515,7 @@ func (this *QJsonValueConstRef) ToString1(defaultValue string) string { // Delete this object from C++ memory. func (this *QJsonValueConstRef) Delete() { - C.QJsonValueConstRef_Delete(this.h) + C.QJsonValueConstRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -466,7 +528,8 @@ func (this *QJsonValueConstRef) GoGC() { } type QJsonValueRef struct { - h *C.QJsonValueRef + h *C.QJsonValueRef + isSubclass bool *QJsonValueConstRef } @@ -484,33 +547,56 @@ func (this *QJsonValueRef) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQJsonValueRef(h *C.QJsonValueRef) *QJsonValueRef { +// newQJsonValueRef constructs the type using only CGO pointers. +func newQJsonValueRef(h *C.QJsonValueRef, h_QJsonValueConstRef *C.QJsonValueConstRef) *QJsonValueRef { if h == nil { return nil } - return &QJsonValueRef{h: h, QJsonValueConstRef: UnsafeNewQJsonValueConstRef(unsafe.Pointer(h))} + return &QJsonValueRef{h: h, + QJsonValueConstRef: newQJsonValueConstRef(h_QJsonValueConstRef)} } -func UnsafeNewQJsonValueRef(h unsafe.Pointer) *QJsonValueRef { - return newQJsonValueRef((*C.QJsonValueRef)(h)) +// UnsafeNewQJsonValueRef constructs the type using only unsafe pointers. +func UnsafeNewQJsonValueRef(h unsafe.Pointer, h_QJsonValueConstRef unsafe.Pointer) *QJsonValueRef { + if h == nil { + return nil + } + + return &QJsonValueRef{h: (*C.QJsonValueRef)(h), + QJsonValueConstRef: UnsafeNewQJsonValueConstRef(h_QJsonValueConstRef)} } // NewQJsonValueRef constructs a new QJsonValueRef object. func NewQJsonValueRef(param1 *QJsonValueRef) *QJsonValueRef { - ret := C.QJsonValueRef_new(param1.cPointer()) - return newQJsonValueRef(ret) + var outptr_QJsonValueRef *C.QJsonValueRef = nil + var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil + + C.QJsonValueRef_new(param1.cPointer(), &outptr_QJsonValueRef, &outptr_QJsonValueConstRef) + ret := newQJsonValueRef(outptr_QJsonValueRef, outptr_QJsonValueConstRef) + ret.isSubclass = true + return ret } // NewQJsonValueRef2 constructs a new QJsonValueRef object. func NewQJsonValueRef2(array *QJsonArray, idx int64) *QJsonValueRef { - ret := C.QJsonValueRef_new2(array.cPointer(), (C.ptrdiff_t)(idx)) - return newQJsonValueRef(ret) + var outptr_QJsonValueRef *C.QJsonValueRef = nil + var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil + + C.QJsonValueRef_new2(array.cPointer(), (C.ptrdiff_t)(idx), &outptr_QJsonValueRef, &outptr_QJsonValueConstRef) + ret := newQJsonValueRef(outptr_QJsonValueRef, outptr_QJsonValueConstRef) + ret.isSubclass = true + return ret } // NewQJsonValueRef3 constructs a new QJsonValueRef object. func NewQJsonValueRef3(object *QJsonObject, idx int64) *QJsonValueRef { - ret := C.QJsonValueRef_new3(object.cPointer(), (C.ptrdiff_t)(idx)) - return newQJsonValueRef(ret) + var outptr_QJsonValueRef *C.QJsonValueRef = nil + var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil + + C.QJsonValueRef_new3(object.cPointer(), (C.ptrdiff_t)(idx), &outptr_QJsonValueRef, &outptr_QJsonValueConstRef) + ret := newQJsonValueRef(outptr_QJsonValueRef, outptr_QJsonValueConstRef) + ret.isSubclass = true + return ret } func (this *QJsonValueRef) OperatorAssign(val *QJsonValue) { @@ -641,7 +727,7 @@ func (this *QJsonValueRef) ToString1(defaultValue string) string { // Delete this object from C++ memory. func (this *QJsonValueRef) Delete() { - C.QJsonValueRef_Delete(this.h) + C.QJsonValueRef_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qjsonvalue.h b/qt6/gen_qjsonvalue.h index 8661a4a9..a329d939 100644 --- a/qt6/gen_qjsonvalue.h +++ b/qt6/gen_qjsonvalue.h @@ -30,17 +30,17 @@ typedef struct QJsonValueRef QJsonValueRef; typedef struct QVariant QVariant; #endif -QJsonValue* QJsonValue_new(); -QJsonValue* QJsonValue_new2(bool b); -QJsonValue* QJsonValue_new3(double n); -QJsonValue* QJsonValue_new4(int n); -QJsonValue* QJsonValue_new5(long long v); -QJsonValue* QJsonValue_new6(struct miqt_string s); -QJsonValue* QJsonValue_new7(const char* s); -QJsonValue* QJsonValue_new8(QJsonArray* a); -QJsonValue* QJsonValue_new9(QJsonObject* o); -QJsonValue* QJsonValue_new10(QJsonValue* other); -QJsonValue* QJsonValue_new11(int param1); +void QJsonValue_new(QJsonValue** outptr_QJsonValue); +void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue); +void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue); +void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue); +void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue); +void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue); +void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue); +void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue); +void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue); +void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue); +void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue); void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other); void QJsonValue_Swap(QJsonValue* self, QJsonValue* other); QJsonValue* QJsonValue_FromVariant(QVariant* variant); @@ -71,9 +71,9 @@ bool QJsonValue_ToBool1(const QJsonValue* self, bool defaultValue); int QJsonValue_ToInt1(const QJsonValue* self, int defaultValue); long long QJsonValue_ToInteger1(const QJsonValue* self, long long defaultValue); double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue); -void QJsonValue_Delete(QJsonValue* self); +void QJsonValue_Delete(QJsonValue* self, bool isSubclass); -QJsonValueConstRef* QJsonValueConstRef_new(QJsonValueConstRef* param1); +void QJsonValueConstRef_new(QJsonValueConstRef* param1, QJsonValueConstRef** outptr_QJsonValueConstRef); QVariant* QJsonValueConstRef_ToVariant(const QJsonValueConstRef* self); int QJsonValueConstRef_Type(const QJsonValueConstRef* self); bool QJsonValueConstRef_IsNull(const QJsonValueConstRef* self); @@ -98,11 +98,11 @@ int QJsonValueConstRef_ToInt1(const QJsonValueConstRef* self, int defaultValue); long long QJsonValueConstRef_ToInteger1(const QJsonValueConstRef* self, long long defaultValue); double QJsonValueConstRef_ToDouble1(const QJsonValueConstRef* self, double defaultValue); struct miqt_string QJsonValueConstRef_ToString1(const QJsonValueConstRef* self, struct miqt_string defaultValue); -void QJsonValueConstRef_Delete(QJsonValueConstRef* self); +void QJsonValueConstRef_Delete(QJsonValueConstRef* self, bool isSubclass); -QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1); -QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx); -QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx); +void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef); +void QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef); +void QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef); void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val); void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val); QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self); @@ -129,7 +129,7 @@ int QJsonValueRef_ToInt1(const QJsonValueRef* self, int defaultValue); long long QJsonValueRef_ToInteger1(const QJsonValueRef* self, long long defaultValue); double QJsonValueRef_ToDouble1(const QJsonValueRef* self, double defaultValue); struct miqt_string QJsonValueRef_ToString1(const QJsonValueRef* self, struct miqt_string defaultValue); -void QJsonValueRef_Delete(QJsonValueRef* self); +void QJsonValueRef_Delete(QJsonValueRef* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qkeysequence.cpp b/qt6/gen_qkeysequence.cpp index e388552d..e1cf0dc1 100644 --- a/qt6/gen_qkeysequence.cpp +++ b/qt6/gen_qkeysequence.cpp @@ -8,58 +8,71 @@ #include "gen_qkeysequence.h" #include "_cgo_export.h" -QKeySequence* QKeySequence_new() { - return new QKeySequence(); +void QKeySequence_new(QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new2(struct miqt_string key) { +void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QKeySequence(key_QString); + QKeySequence* ret = new QKeySequence(key_QString); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new3(int k1) { - return new QKeySequence(static_cast(k1)); +void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new4(QKeyCombination* k1) { - return new QKeySequence(*k1); +void QKeySequence_new4(QKeyCombination* k1, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(*k1); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new5(QKeySequence* ks) { - return new QKeySequence(*ks); +void QKeySequence_new5(QKeySequence* ks, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(*ks); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new6(int key) { - return new QKeySequence(static_cast(key)); +void QKeySequence_new6(int key, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(key)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new7(struct miqt_string key, int format) { +void QKeySequence_new7(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QKeySequence(key_QString, static_cast(format)); + QKeySequence* ret = new QKeySequence(key_QString, static_cast(format)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new8(int k1, int k2) { - return new QKeySequence(static_cast(k1), static_cast(k2)); +void QKeySequence_new8(int k1, int k2, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new9(int k1, int k2, int k3) { - return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); +void QKeySequence_new9(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new10(int k1, int k2, int k3, int k4) { - return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); +void QKeySequence_new10(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2) { - return new QKeySequence(*k1, *k2); +void QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(*k1, *k2); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3) { - return new QKeySequence(*k1, *k2, *k3); +void QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(*k1, *k2, *k3); + *outptr_QKeySequence = ret; } -QKeySequence* QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4) { - return new QKeySequence(*k1, *k2, *k3, *k4); +void QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4, QKeySequence** outptr_QKeySequence) { + QKeySequence* ret = new QKeySequence(*k1, *k2, *k3, *k4); + *outptr_QKeySequence = ret; } int QKeySequence_Count(const QKeySequence* self) { @@ -227,7 +240,11 @@ struct miqt_string QKeySequence_ListToString2(struct miqt_array /* of QKeySequen return _ms; } -void QKeySequence_Delete(QKeySequence* self) { - delete self; +void QKeySequence_Delete(QKeySequence* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qkeysequence.go b/qt6/gen_qkeysequence.go index 7f68746e..4215b222 100644 --- a/qt6/gen_qkeysequence.go +++ b/qt6/gen_qkeysequence.go @@ -105,7 +105,8 @@ const ( ) type QKeySequence struct { - h *C.QKeySequence + h *C.QKeySequence + isSubclass bool } func (this *QKeySequence) cPointer() *C.QKeySequence { @@ -122,6 +123,7 @@ func (this *QKeySequence) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQKeySequence constructs the type using only CGO pointers. func newQKeySequence(h *C.QKeySequence) *QKeySequence { if h == nil { return nil @@ -129,14 +131,23 @@ func newQKeySequence(h *C.QKeySequence) *QKeySequence { return &QKeySequence{h: h} } +// UnsafeNewQKeySequence constructs the type using only unsafe pointers. func UnsafeNewQKeySequence(h unsafe.Pointer) *QKeySequence { - return newQKeySequence((*C.QKeySequence)(h)) + if h == nil { + return nil + } + + return &QKeySequence{h: (*C.QKeySequence)(h)} } // NewQKeySequence constructs a new QKeySequence object. func NewQKeySequence() *QKeySequence { - ret := C.QKeySequence_new() - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new(&outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence2 constructs a new QKeySequence object. @@ -145,32 +156,52 @@ func NewQKeySequence2(key string) *QKeySequence { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QKeySequence_new2(key_ms) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new2(key_ms, &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence3 constructs a new QKeySequence object. func NewQKeySequence3(k1 int) *QKeySequence { - ret := C.QKeySequence_new3((C.int)(k1)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new3((C.int)(k1), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence4 constructs a new QKeySequence object. func NewQKeySequence4(k1 QKeyCombination) *QKeySequence { - ret := C.QKeySequence_new4(k1.cPointer()) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new4(k1.cPointer(), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence5 constructs a new QKeySequence object. func NewQKeySequence5(ks *QKeySequence) *QKeySequence { - ret := C.QKeySequence_new5(ks.cPointer()) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new5(ks.cPointer(), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence6 constructs a new QKeySequence object. func NewQKeySequence6(key QKeySequence__StandardKey) *QKeySequence { - ret := C.QKeySequence_new6((C.int)(key)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new6((C.int)(key), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence7 constructs a new QKeySequence object. @@ -179,44 +210,72 @@ func NewQKeySequence7(key string, format QKeySequence__SequenceFormat) *QKeySequ key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QKeySequence_new7(key_ms, (C.int)(format)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new7(key_ms, (C.int)(format), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence8 constructs a new QKeySequence object. func NewQKeySequence8(k1 int, k2 int) *QKeySequence { - ret := C.QKeySequence_new8((C.int)(k1), (C.int)(k2)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new8((C.int)(k1), (C.int)(k2), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence9 constructs a new QKeySequence object. func NewQKeySequence9(k1 int, k2 int, k3 int) *QKeySequence { - ret := C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence10 constructs a new QKeySequence object. func NewQKeySequence10(k1 int, k2 int, k3 int, k4 int) *QKeySequence { - ret := C.QKeySequence_new10((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4)) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new10((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence11 constructs a new QKeySequence object. func NewQKeySequence11(k1 QKeyCombination, k2 QKeyCombination) *QKeySequence { - ret := C.QKeySequence_new11(k1.cPointer(), k2.cPointer()) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new11(k1.cPointer(), k2.cPointer(), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence12 constructs a new QKeySequence object. func NewQKeySequence12(k1 QKeyCombination, k2 QKeyCombination, k3 QKeyCombination) *QKeySequence { - ret := C.QKeySequence_new12(k1.cPointer(), k2.cPointer(), k3.cPointer()) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new12(k1.cPointer(), k2.cPointer(), k3.cPointer(), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } // NewQKeySequence13 constructs a new QKeySequence object. func NewQKeySequence13(k1 QKeyCombination, k2 QKeyCombination, k3 QKeyCombination, k4 QKeyCombination) *QKeySequence { - ret := C.QKeySequence_new13(k1.cPointer(), k2.cPointer(), k3.cPointer(), k4.cPointer()) - return newQKeySequence(ret) + var outptr_QKeySequence *C.QKeySequence = nil + + C.QKeySequence_new13(k1.cPointer(), k2.cPointer(), k3.cPointer(), k4.cPointer(), &outptr_QKeySequence) + ret := newQKeySequence(outptr_QKeySequence) + ret.isSubclass = true + return ret } func (this *QKeySequence) Count() int { @@ -396,7 +455,7 @@ func QKeySequence_ListToString2(list []QKeySequence, format QKeySequence__Sequen // Delete this object from C++ memory. func (this *QKeySequence) Delete() { - C.QKeySequence_Delete(this.h) + C.QKeySequence_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qkeysequence.h b/qt6/gen_qkeysequence.h index 6a5384af..ce6285a5 100644 --- a/qt6/gen_qkeysequence.h +++ b/qt6/gen_qkeysequence.h @@ -22,19 +22,19 @@ typedef struct QKeyCombination QKeyCombination; typedef struct QKeySequence QKeySequence; #endif -QKeySequence* QKeySequence_new(); -QKeySequence* QKeySequence_new2(struct miqt_string key); -QKeySequence* QKeySequence_new3(int k1); -QKeySequence* QKeySequence_new4(QKeyCombination* k1); -QKeySequence* QKeySequence_new5(QKeySequence* ks); -QKeySequence* QKeySequence_new6(int key); -QKeySequence* QKeySequence_new7(struct miqt_string key, int format); -QKeySequence* QKeySequence_new8(int k1, int k2); -QKeySequence* QKeySequence_new9(int k1, int k2, int k3); -QKeySequence* QKeySequence_new10(int k1, int k2, int k3, int k4); -QKeySequence* QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2); -QKeySequence* QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3); -QKeySequence* QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4); +void QKeySequence_new(QKeySequence** outptr_QKeySequence); +void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence); +void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence); +void QKeySequence_new4(QKeyCombination* k1, QKeySequence** outptr_QKeySequence); +void QKeySequence_new5(QKeySequence* ks, QKeySequence** outptr_QKeySequence); +void QKeySequence_new6(int key, QKeySequence** outptr_QKeySequence); +void QKeySequence_new7(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence); +void QKeySequence_new8(int k1, int k2, QKeySequence** outptr_QKeySequence); +void QKeySequence_new9(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence); +void QKeySequence_new10(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence); +void QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2, QKeySequence** outptr_QKeySequence); +void QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeySequence** outptr_QKeySequence); +void QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4, QKeySequence** outptr_QKeySequence); int QKeySequence_Count(const QKeySequence* self); bool QKeySequence_IsEmpty(const QKeySequence* self); struct miqt_string QKeySequence_ToString(const QKeySequence* self); @@ -58,7 +58,7 @@ struct miqt_string QKeySequence_ToString1(const QKeySequence* self, int format); QKeySequence* QKeySequence_FromString2(struct miqt_string str, int format); struct miqt_array /* of QKeySequence* */ QKeySequence_ListFromString2(struct miqt_string str, int format); struct miqt_string QKeySequence_ListToString2(struct miqt_array /* of QKeySequence* */ list, int format); -void QKeySequence_Delete(QKeySequence* self); +void QKeySequence_Delete(QKeySequence* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qkeysequenceedit.cpp b/qt6/gen_qkeysequenceedit.cpp index c524cf5b..3e9776c2 100644 --- a/qt6/gen_qkeysequenceedit.cpp +++ b/qt6/gen_qkeysequenceedit.cpp @@ -1,28 +1,1085 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qkeysequenceedit.h" #include "_cgo_export.h" -QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent) { - return new QKeySequenceEdit(parent); +class MiqtVirtualQKeySequenceEdit : public virtual QKeySequenceEdit { +public: + + MiqtVirtualQKeySequenceEdit(QWidget* parent): QKeySequenceEdit(parent) {}; + MiqtVirtualQKeySequenceEdit(): QKeySequenceEdit() {}; + MiqtVirtualQKeySequenceEdit(const QKeySequence& keySequence): QKeySequenceEdit(keySequence) {}; + MiqtVirtualQKeySequenceEdit(const QKeySequence& keySequence, QWidget* parent): QKeySequenceEdit(keySequence, parent) {}; + + virtual ~MiqtVirtualQKeySequenceEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QKeySequenceEdit::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QKeySequenceEdit::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QKeySequenceEdit::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QKeySequenceEdit::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QKeySequenceEdit::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QKeySequenceEdit::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QKeySequenceEdit::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QKeySequenceEdit::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QKeySequenceEdit::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QKeySequenceEdit::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QKeySequenceEdit::devType(); + } + + + int callback_return_value = miqt_exec_callback_QKeySequenceEdit_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QKeySequenceEdit::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QKeySequenceEdit::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QKeySequenceEdit_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QKeySequenceEdit::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QKeySequenceEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QKeySequenceEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QKeySequenceEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QKeySequenceEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QKeySequenceEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QKeySequenceEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QKeySequenceEdit::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QKeySequenceEdit_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QKeySequenceEdit::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QKeySequenceEdit::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QKeySequenceEdit::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QKeySequenceEdit::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QKeySequenceEdit_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QKeySequenceEdit::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QKeySequenceEdit::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QKeySequenceEdit::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QKeySequenceEdit::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QKeySequenceEdit::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QKeySequenceEdit::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QKeySequenceEdit::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QKeySequenceEdit::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QKeySequenceEdit::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QKeySequenceEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QKeySequenceEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QKeySequenceEdit::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QKeySequenceEdit::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QKeySequenceEdit::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QKeySequenceEdit::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QKeySequenceEdit::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QKeySequenceEdit::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QKeySequenceEdit::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QKeySequenceEdit::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QKeySequenceEdit::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QKeySequenceEdit::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QKeySequenceEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QKeySequenceEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QKeySequenceEdit::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QKeySequenceEdit::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QKeySequenceEdit::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QKeySequenceEdit::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QKeySequenceEdit::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QKeySequenceEdit::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QKeySequenceEdit::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QKeySequenceEdit::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QKeySequenceEdit::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QKeySequenceEdit::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QKeySequenceEdit::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QKeySequenceEdit::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QKeySequenceEdit::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QKeySequenceEdit::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QKeySequenceEdit::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QKeySequenceEdit::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QKeySequenceEdit::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QKeySequenceEdit::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QKeySequenceEdit::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QKeySequenceEdit_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QKeySequenceEdit::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QKeySequenceEdit::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QKeySequenceEdit::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QKeySequenceEdit::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QKeySequenceEdit::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QKeySequenceEdit::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QKeySequenceEdit_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QKeySequenceEdit::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QKeySequenceEdit::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QKeySequenceEdit_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QKeySequenceEdit::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QKeySequenceEdit::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QKeySequenceEdit_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QKeySequenceEdit::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QKeySequenceEdit::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QKeySequenceEdit_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QKeySequenceEdit::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QKeySequenceEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QKeySequenceEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QKeySequenceEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QKeySequenceEdit::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QKeySequenceEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QKeySequenceEdit::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QKeySequenceEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QKeySequenceEdit::focusNextPrevChild(next); + + } + +}; + +void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(parent); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QKeySequenceEdit* QKeySequenceEdit_new2() { - return new QKeySequenceEdit(); +void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence) { - return new QKeySequenceEdit(*keySequence); +void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent) { - return new QKeySequenceEdit(*keySequence, parent); +void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence, parent); + *outptr_QKeySequenceEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self) { @@ -69,7 +1126,7 @@ void QKeySequenceEdit_EditingFinished(QKeySequenceEdit* self) { } void QKeySequenceEdit_connect_EditingFinished(QKeySequenceEdit* self, intptr_t slot) { - QKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::editingFinished), self, [=]() { + MiqtVirtualQKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::editingFinished), self, [=]() { miqt_exec_callback_QKeySequenceEdit_EditingFinished(slot); }); } @@ -79,7 +1136,7 @@ void QKeySequenceEdit_KeySequenceChanged(QKeySequenceEdit* self, QKeySequence* k } void QKeySequenceEdit_connect_KeySequenceChanged(QKeySequenceEdit* self, intptr_t slot) { - QKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::keySequenceChanged), self, [=](const QKeySequence& keySequence) { + MiqtVirtualQKeySequenceEdit::connect(self, static_cast(&QKeySequenceEdit::keySequenceChanged), self, [=](const QKeySequence& keySequence) { const QKeySequence& keySequence_ret = keySequence; // Cast returned reference into pointer QKeySequence* sigval1 = const_cast(&keySequence_ret); @@ -109,7 +1166,347 @@ struct miqt_string QKeySequenceEdit_Tr3(const char* s, const char* c, int n) { return _ms; } -void QKeySequenceEdit_Delete(QKeySequenceEdit* self) { - delete self; +void QKeySequenceEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__Event = slot; +} + +bool QKeySequenceEdit_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_Event(param1); +} + +void QKeySequenceEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QKeySequenceEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QKeySequenceEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QKeySequenceEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QKeySequenceEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__TimerEvent = slot; +} + +void QKeySequenceEdit_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_TimerEvent(param1); +} + +void QKeySequenceEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QKeySequenceEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QKeySequenceEdit_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DevType = slot; +} + +int QKeySequenceEdit_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DevType(); +} + +void QKeySequenceEdit_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__SetVisible = slot; +} + +void QKeySequenceEdit_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_SetVisible(visible); +} + +void QKeySequenceEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QKeySequenceEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_SizeHint(); +} + +void QKeySequenceEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QKeySequenceEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QKeySequenceEdit_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__HeightForWidth = slot; +} + +int QKeySequenceEdit_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QKeySequenceEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QKeySequenceEdit_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QKeySequenceEdit_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QKeySequenceEdit_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_PaintEngine(); +} + +void QKeySequenceEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MousePressEvent(event); +} + +void QKeySequenceEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QKeySequenceEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QKeySequenceEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QKeySequenceEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__WheelEvent = slot; +} + +void QKeySequenceEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QKeySequenceEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QKeySequenceEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_FocusInEvent(event); +} + +void QKeySequenceEdit_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__EnterEvent = slot; +} + +void QKeySequenceEdit_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_EnterEvent(event); +} + +void QKeySequenceEdit_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__LeaveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_LeaveEvent(event); +} + +void QKeySequenceEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__PaintEvent = slot; +} + +void QKeySequenceEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_PaintEvent(event); +} + +void QKeySequenceEdit_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__MoveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_MoveEvent(event); +} + +void QKeySequenceEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void QKeySequenceEdit_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__CloseEvent = slot; +} + +void QKeySequenceEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_CloseEvent(event); +} + +void QKeySequenceEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QKeySequenceEdit_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__TabletEvent = slot; +} + +void QKeySequenceEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_TabletEvent(event); +} + +void QKeySequenceEdit_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ActionEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ActionEvent(event); +} + +void QKeySequenceEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QKeySequenceEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QKeySequenceEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QKeySequenceEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__DropEvent = slot; +} + +void QKeySequenceEdit_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_DropEvent(event); +} + +void QKeySequenceEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ShowEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ShowEvent(event); +} + +void QKeySequenceEdit_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__HideEvent = slot; +} + +void QKeySequenceEdit_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_HideEvent(event); +} + +void QKeySequenceEdit_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__NativeEvent = slot; +} + +bool QKeySequenceEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QKeySequenceEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QKeySequenceEdit_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QKeySequenceEdit_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__Metric = slot; +} + +int QKeySequenceEdit_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_Metric(param1); +} + +void QKeySequenceEdit_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__InitPainter = slot; +} + +void QKeySequenceEdit_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_InitPainter(painter); +} + +void QKeySequenceEdit_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QKeySequenceEdit_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_Redirected(offset); +} + +void QKeySequenceEdit_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QKeySequenceEdit_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_SharedPainter(); +} + +void QKeySequenceEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void QKeySequenceEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QKeySequenceEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QKeySequenceEdit_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QKeySequenceEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QKeySequenceEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QKeySequenceEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQKeySequenceEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QKeySequenceEdit_Delete(QKeySequenceEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qkeysequenceedit.go b/qt6/gen_qkeysequenceedit.go index b0ad91f9..48003d9b 100644 --- a/qt6/gen_qkeysequenceedit.go +++ b/qt6/gen_qkeysequenceedit.go @@ -15,7 +15,8 @@ import ( ) type QKeySequenceEdit struct { - h *C.QKeySequenceEdit + h *C.QKeySequenceEdit + isSubclass bool *QWidget } @@ -33,39 +34,75 @@ func (this *QKeySequenceEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQKeySequenceEdit(h *C.QKeySequenceEdit) *QKeySequenceEdit { +// newQKeySequenceEdit constructs the type using only CGO pointers. +func newQKeySequenceEdit(h *C.QKeySequenceEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QKeySequenceEdit { if h == nil { return nil } - return &QKeySequenceEdit{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QKeySequenceEdit{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQKeySequenceEdit(h unsafe.Pointer) *QKeySequenceEdit { - return newQKeySequenceEdit((*C.QKeySequenceEdit)(h)) +// UnsafeNewQKeySequenceEdit constructs the type using only unsafe pointers. +func UnsafeNewQKeySequenceEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QKeySequenceEdit { + if h == nil { + return nil + } + + return &QKeySequenceEdit{h: (*C.QKeySequenceEdit)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQKeySequenceEdit constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit(parent *QWidget) *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new(parent.cPointer()) - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new(parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQKeySequenceEdit2 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit2() *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new2() - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new2(&outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQKeySequenceEdit3 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit3(keySequence *QKeySequence) *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new3(keySequence.cPointer()) - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new3(keySequence.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQKeySequenceEdit4 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit4(keySequence *QKeySequence, parent *QWidget) *QKeySequenceEdit { - ret := C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer()) - return newQKeySequenceEdit(ret) + var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QKeySequenceEdit) MetaObject() *QMetaObject { @@ -169,9 +206,998 @@ func QKeySequenceEdit_Tr3(s string, c string, n int) string { return _ret } +func (this *QKeySequenceEdit) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QKeySequenceEdit_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QKeySequenceEdit) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QKeySequenceEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_Event +func miqt_exec_callback_QKeySequenceEdit_Event(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QKeySequenceEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QKeySequenceEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_KeyPressEvent +func miqt_exec_callback_QKeySequenceEdit_KeyPressEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_KeyReleaseEvent(param1 *QKeyEvent) { + + C.QKeySequenceEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnKeyReleaseEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QKeySequenceEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent +func miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QKeySequenceEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QKeySequenceEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_TimerEvent +func miqt_exec_callback_QKeySequenceEdit_TimerEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QKeySequenceEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QKeySequenceEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_FocusOutEvent +func miqt_exec_callback_QKeySequenceEdit_FocusOutEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DevType() int { + + return (int)(C.QKeySequenceEdit_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QKeySequenceEdit) OnDevType(slot func(super func() int) int) { + C.QKeySequenceEdit_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DevType +func miqt_exec_callback_QKeySequenceEdit_DevType(self *C.QKeySequenceEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_SetVisible(visible bool) { + + C.QKeySequenceEdit_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QKeySequenceEdit) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QKeySequenceEdit_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_SetVisible +func miqt_exec_callback_QKeySequenceEdit_SetVisible(self *C.QKeySequenceEdit, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QKeySequenceEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QKeySequenceEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QKeySequenceEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_SizeHint +func miqt_exec_callback_QKeySequenceEdit_SizeHint(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QKeySequenceEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QKeySequenceEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QKeySequenceEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MinimumSizeHint +func miqt_exec_callback_QKeySequenceEdit_MinimumSizeHint(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QKeySequenceEdit_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QKeySequenceEdit) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QKeySequenceEdit_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_HeightForWidth +func miqt_exec_callback_QKeySequenceEdit_HeightForWidth(self *C.QKeySequenceEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QKeySequenceEdit_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QKeySequenceEdit) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QKeySequenceEdit_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_HasHeightForWidth +func miqt_exec_callback_QKeySequenceEdit_HasHeightForWidth(self *C.QKeySequenceEdit, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QKeySequenceEdit_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QKeySequenceEdit) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QKeySequenceEdit_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_PaintEngine +func miqt_exec_callback_QKeySequenceEdit_PaintEngine(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MousePressEvent +func miqt_exec_callback_QKeySequenceEdit_MousePressEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent +func miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent +func miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QKeySequenceEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QKeySequenceEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent +func miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QKeySequenceEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QKeySequenceEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_WheelEvent +func miqt_exec_callback_QKeySequenceEdit_WheelEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QKeySequenceEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QKeySequenceEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_FocusInEvent +func miqt_exec_callback_QKeySequenceEdit_FocusInEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QKeySequenceEdit_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QKeySequenceEdit_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_EnterEvent +func miqt_exec_callback_QKeySequenceEdit_EnterEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QKeySequenceEdit_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QKeySequenceEdit_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_LeaveEvent +func miqt_exec_callback_QKeySequenceEdit_LeaveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QKeySequenceEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QKeySequenceEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_PaintEvent +func miqt_exec_callback_QKeySequenceEdit_PaintEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QKeySequenceEdit_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QKeySequenceEdit_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_MoveEvent +func miqt_exec_callback_QKeySequenceEdit_MoveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QKeySequenceEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QKeySequenceEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ResizeEvent +func miqt_exec_callback_QKeySequenceEdit_ResizeEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QKeySequenceEdit_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QKeySequenceEdit_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_CloseEvent +func miqt_exec_callback_QKeySequenceEdit_CloseEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QKeySequenceEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QKeySequenceEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent +func miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QKeySequenceEdit_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QKeySequenceEdit_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_TabletEvent +func miqt_exec_callback_QKeySequenceEdit_TabletEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QKeySequenceEdit_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QKeySequenceEdit_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ActionEvent +func miqt_exec_callback_QKeySequenceEdit_ActionEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QKeySequenceEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QKeySequenceEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DragEnterEvent +func miqt_exec_callback_QKeySequenceEdit_DragEnterEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QKeySequenceEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QKeySequenceEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DragMoveEvent +func miqt_exec_callback_QKeySequenceEdit_DragMoveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QKeySequenceEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QKeySequenceEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent +func miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QKeySequenceEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QKeySequenceEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_DropEvent +func miqt_exec_callback_QKeySequenceEdit_DropEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QKeySequenceEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QKeySequenceEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ShowEvent +func miqt_exec_callback_QKeySequenceEdit_ShowEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QKeySequenceEdit_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QKeySequenceEdit) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QKeySequenceEdit_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_HideEvent +func miqt_exec_callback_QKeySequenceEdit_HideEvent(self *C.QKeySequenceEdit, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QKeySequenceEdit_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QKeySequenceEdit) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QKeySequenceEdit_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_NativeEvent +func miqt_exec_callback_QKeySequenceEdit_NativeEvent(self *C.QKeySequenceEdit, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QKeySequenceEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QKeySequenceEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_ChangeEvent +func miqt_exec_callback_QKeySequenceEdit_ChangeEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QKeySequenceEdit_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QKeySequenceEdit) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QKeySequenceEdit_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_Metric +func miqt_exec_callback_QKeySequenceEdit_Metric(self *C.QKeySequenceEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QKeySequenceEdit) callVirtualBase_InitPainter(painter *QPainter) { + + C.QKeySequenceEdit_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QKeySequenceEdit) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QKeySequenceEdit_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_InitPainter +func miqt_exec_callback_QKeySequenceEdit_InitPainter(self *C.QKeySequenceEdit, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QKeySequenceEdit_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QKeySequenceEdit) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QKeySequenceEdit_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_Redirected +func miqt_exec_callback_QKeySequenceEdit_Redirected(self *C.QKeySequenceEdit, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QKeySequenceEdit_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QKeySequenceEdit) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QKeySequenceEdit_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_SharedPainter +func miqt_exec_callback_QKeySequenceEdit_SharedPainter(self *C.QKeySequenceEdit, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QKeySequenceEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QKeySequenceEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QKeySequenceEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_InputMethodEvent +func miqt_exec_callback_QKeySequenceEdit_InputMethodEvent(self *C.QKeySequenceEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QKeySequenceEdit) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QKeySequenceEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QKeySequenceEdit) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QKeySequenceEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_InputMethodQuery +func miqt_exec_callback_QKeySequenceEdit_InputMethodQuery(self *C.QKeySequenceEdit, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QKeySequenceEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QKeySequenceEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QKeySequenceEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QKeySequenceEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QKeySequenceEdit_FocusNextPrevChild +func miqt_exec_callback_QKeySequenceEdit_FocusNextPrevChild(self *C.QKeySequenceEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QKeySequenceEdit) Delete() { - C.QKeySequenceEdit_Delete(this.h) + C.QKeySequenceEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qkeysequenceedit.h b/qt6/gen_qkeysequenceedit.h index eaab381a..244005ad 100644 --- a/qt6/gen_qkeysequenceedit.h +++ b/qt6/gen_qkeysequenceedit.h @@ -15,21 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QKeySequence; class QKeySequenceEdit; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QKeySequence QKeySequence; typedef struct QKeySequenceEdit QKeySequenceEdit; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent); -QKeySequenceEdit* QKeySequenceEdit_new2(); -QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence); -QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent); +void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self); void* QKeySequenceEdit_Metacast(QKeySequenceEdit* self, const char* param1); struct miqt_string QKeySequenceEdit_Tr(const char* s); @@ -42,9 +100,98 @@ void QKeySequenceEdit_EditingFinished(QKeySequenceEdit* self); void QKeySequenceEdit_connect_EditingFinished(QKeySequenceEdit* self, intptr_t slot); void QKeySequenceEdit_KeySequenceChanged(QKeySequenceEdit* self, QKeySequence* keySequence); void QKeySequenceEdit_connect_KeySequenceChanged(QKeySequenceEdit* self, intptr_t slot); +bool QKeySequenceEdit_Event(QKeySequenceEdit* self, QEvent* param1); +void QKeySequenceEdit_KeyPressEvent(QKeySequenceEdit* self, QKeyEvent* param1); +void QKeySequenceEdit_KeyReleaseEvent(QKeySequenceEdit* self, QKeyEvent* param1); +void QKeySequenceEdit_TimerEvent(QKeySequenceEdit* self, QTimerEvent* param1); +void QKeySequenceEdit_FocusOutEvent(QKeySequenceEdit* self, QFocusEvent* param1); struct miqt_string QKeySequenceEdit_Tr2(const char* s, const char* c); struct miqt_string QKeySequenceEdit_Tr3(const char* s, const char* c, int n); -void QKeySequenceEdit_Delete(QKeySequenceEdit* self); +void QKeySequenceEdit_override_virtual_Event(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_Event(void* self, QEvent* param1); +void QKeySequenceEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QKeySequenceEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QKeySequenceEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QKeySequenceEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QKeySequenceEdit_override_virtual_DevType(void* self, intptr_t slot); +int QKeySequenceEdit_virtualbase_DevType(const void* self); +void QKeySequenceEdit_override_virtual_SetVisible(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_SetVisible(void* self, bool visible); +void QKeySequenceEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QKeySequenceEdit_virtualbase_SizeHint(const void* self); +void QKeySequenceEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QKeySequenceEdit_virtualbase_MinimumSizeHint(const void* self); +void QKeySequenceEdit_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QKeySequenceEdit_virtualbase_HeightForWidth(const void* self, int param1); +void QKeySequenceEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_HasHeightForWidth(const void* self); +void QKeySequenceEdit_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QKeySequenceEdit_virtualbase_PaintEngine(const void* self); +void QKeySequenceEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QKeySequenceEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QKeySequenceEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QKeySequenceEdit_override_virtual_EnterEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QKeySequenceEdit_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_LeaveEvent(void* self, QEvent* event); +void QKeySequenceEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QKeySequenceEdit_override_virtual_MoveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QKeySequenceEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QKeySequenceEdit_override_virtual_CloseEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QKeySequenceEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QKeySequenceEdit_override_virtual_TabletEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QKeySequenceEdit_override_virtual_ActionEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QKeySequenceEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QKeySequenceEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QKeySequenceEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QKeySequenceEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_DropEvent(void* self, QDropEvent* event); +void QKeySequenceEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QKeySequenceEdit_override_virtual_HideEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_HideEvent(void* self, QHideEvent* event); +void QKeySequenceEdit_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QKeySequenceEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QKeySequenceEdit_override_virtual_Metric(void* self, intptr_t slot); +int QKeySequenceEdit_virtualbase_Metric(const void* self, int param1); +void QKeySequenceEdit_override_virtual_InitPainter(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_InitPainter(const void* self, QPainter* painter); +void QKeySequenceEdit_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QKeySequenceEdit_virtualbase_Redirected(const void* self, QPoint* offset); +void QKeySequenceEdit_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QKeySequenceEdit_virtualbase_SharedPainter(const void* self); +void QKeySequenceEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QKeySequenceEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QKeySequenceEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QKeySequenceEdit_virtualbase_InputMethodQuery(const void* self, int param1); +void QKeySequenceEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QKeySequenceEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QKeySequenceEdit_Delete(QKeySequenceEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlabel.cpp b/qt6/gen_qlabel.cpp index fe7af127..2413532b 100644 --- a/qt6/gen_qlabel.cpp +++ b/qt6/gen_qlabel.cpp @@ -1,42 +1,449 @@ +#include +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qlabel.h" #include "_cgo_export.h" -QLabel* QLabel_new(QWidget* parent) { - return new QLabel(parent); +class MiqtVirtualQLabel : public virtual QLabel { +public: + + MiqtVirtualQLabel(QWidget* parent): QLabel(parent) {}; + MiqtVirtualQLabel(): QLabel() {}; + MiqtVirtualQLabel(const QString& text): QLabel(text) {}; + MiqtVirtualQLabel(QWidget* parent, Qt::WindowFlags f): QLabel(parent, f) {}; + MiqtVirtualQLabel(const QString& text, QWidget* parent): QLabel(text, parent) {}; + MiqtVirtualQLabel(const QString& text, QWidget* parent, Qt::WindowFlags f): QLabel(text, parent, f) {}; + + virtual ~MiqtVirtualQLabel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QLabel::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLabel_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QLabel::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QLabel::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLabel_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QLabel::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QLabel::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLabel_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QLabel::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QLabel::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QLabel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QLabel::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QLabel::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QLabel::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QLabel::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QLabel_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QLabel::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QLabel::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QLabel_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QLabel::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* ev) override { + if (handle__MousePressEvent == 0) { + QLabel::mousePressEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* ev) { + + QLabel::mousePressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* ev) override { + if (handle__MouseMoveEvent == 0) { + QLabel::mouseMoveEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* ev) { + + QLabel::mouseMoveEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* ev) override { + if (handle__MouseReleaseEvent == 0) { + QLabel::mouseReleaseEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* ev) { + + QLabel::mouseReleaseEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* ev) override { + if (handle__ContextMenuEvent == 0) { + QLabel::contextMenuEvent(ev); + return; + } + + QContextMenuEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* ev) { + + QLabel::contextMenuEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* ev) override { + if (handle__FocusInEvent == 0) { + QLabel::focusInEvent(ev); + return; + } + + QFocusEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* ev) { + + QLabel::focusInEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* ev) override { + if (handle__FocusOutEvent == 0) { + QLabel::focusOutEvent(ev); + return; + } + + QFocusEvent* sigval1 = ev; + + miqt_exec_callback_QLabel_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* ev) { + + QLabel::focusOutEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QLabel::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QLabel_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QLabel::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QLabel::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QLabel_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QLabel::initStyleOption(option); + + } + +}; + +void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new2() { - return new QLabel(); +void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new3(struct miqt_string text) { +void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QLabel(text_QString); + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new4(QWidget* parent, int f) { - return new QLabel(parent, static_cast(f)); +void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent, static_cast(f)); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new5(struct miqt_string text, QWidget* parent) { +void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QLabel(text_QString, parent); + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f) { +void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QLabel(text_QString, parent, static_cast(f)); + MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent, static_cast(f)); + *outptr_QLabel = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QLabel_MetaObject(const QLabel* self) { @@ -234,7 +641,7 @@ void QLabel_LinkActivated(QLabel* self, struct miqt_string link) { } void QLabel_connect_LinkActivated(QLabel* self, intptr_t slot) { - QLabel::connect(self, static_cast(&QLabel::linkActivated), self, [=](const QString& link) { + MiqtVirtualQLabel::connect(self, static_cast(&QLabel::linkActivated), self, [=](const QString& link) { const QString link_ret = link; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray link_b = link_ret.toUtf8(); @@ -253,7 +660,7 @@ void QLabel_LinkHovered(QLabel* self, struct miqt_string link) { } void QLabel_connect_LinkHovered(QLabel* self, intptr_t slot) { - QLabel::connect(self, static_cast(&QLabel::linkHovered), self, [=](const QString& link) { + MiqtVirtualQLabel::connect(self, static_cast(&QLabel::linkHovered), self, [=](const QString& link) { const QString link_ret = link; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray link_b = link_ret.toUtf8(); @@ -288,7 +695,131 @@ struct miqt_string QLabel_Tr3(const char* s, const char* c, int n) { return _ms; } -void QLabel_Delete(QLabel* self) { - delete self; +void QLabel_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__SizeHint = slot; +} + +QSize* QLabel_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQLabel*)(self) )->virtualbase_SizeHint(); +} + +void QLabel_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QLabel_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQLabel*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QLabel_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__HeightForWidth = slot; +} + +int QLabel_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLabel*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLabel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__Event = slot; +} + +bool QLabel_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQLabel*)(self) )->virtualbase_Event(e); +} + +void QLabel_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__KeyPressEvent = slot; +} + +void QLabel_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QLabel_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__PaintEvent = slot; +} + +void QLabel_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_PaintEvent(param1); +} + +void QLabel_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__ChangeEvent = slot; +} + +void QLabel_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QLabel_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MousePressEvent = slot; +} + +void QLabel_virtualbase_MousePressEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_MousePressEvent(ev); +} + +void QLabel_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MouseMoveEvent = slot; +} + +void QLabel_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_MouseMoveEvent(ev); +} + +void QLabel_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QLabel_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_MouseReleaseEvent(ev); +} + +void QLabel_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__ContextMenuEvent = slot; +} + +void QLabel_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_ContextMenuEvent(ev); +} + +void QLabel_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__FocusInEvent = slot; +} + +void QLabel_virtualbase_FocusInEvent(void* self, QFocusEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_FocusInEvent(ev); +} + +void QLabel_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__FocusOutEvent = slot; +} + +void QLabel_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev) { + ( (MiqtVirtualQLabel*)(self) )->virtualbase_FocusOutEvent(ev); +} + +void QLabel_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QLabel_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQLabel*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QLabel_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QLabel*)(self) )->handle__InitStyleOption = slot; +} + +void QLabel_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQLabel*)(self) )->virtualbase_InitStyleOption(option); +} + +void QLabel_Delete(QLabel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlabel.go b/qt6/gen_qlabel.go index ae7b43ca..635c3234 100644 --- a/qt6/gen_qlabel.go +++ b/qt6/gen_qlabel.go @@ -15,7 +15,8 @@ import ( ) type QLabel struct { - h *C.QLabel + h *C.QLabel + isSubclass bool *QFrame } @@ -33,27 +34,51 @@ func (this *QLabel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLabel(h *C.QLabel) *QLabel { +// newQLabel constructs the type using only CGO pointers. +func newQLabel(h *C.QLabel, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLabel { if h == nil { return nil } - return &QLabel{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QLabel{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQLabel(h unsafe.Pointer) *QLabel { - return newQLabel((*C.QLabel)(h)) +// UnsafeNewQLabel constructs the type using only unsafe pointers. +func UnsafeNewQLabel(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLabel { + if h == nil { + return nil + } + + return &QLabel{h: (*C.QLabel)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQLabel constructs a new QLabel object. func NewQLabel(parent *QWidget) *QLabel { - ret := C.QLabel_new(parent.cPointer()) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new(parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel2 constructs a new QLabel object. func NewQLabel2() *QLabel { - ret := C.QLabel_new2() - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new2(&outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel3 constructs a new QLabel object. @@ -62,14 +87,30 @@ func NewQLabel3(text string) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QLabel_new3(text_ms) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new3(text_ms, &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel4 constructs a new QLabel object. func NewQLabel4(parent *QWidget, f WindowType) *QLabel { - ret := C.QLabel_new4(parent.cPointer(), (C.int)(f)) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new4(parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel5 constructs a new QLabel object. @@ -78,8 +119,16 @@ func NewQLabel5(text string, parent *QWidget) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QLabel_new5(text_ms, parent.cPointer()) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new5(text_ms, parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLabel6 constructs a new QLabel object. @@ -88,8 +137,16 @@ func NewQLabel6(text string, parent *QWidget, f WindowType) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f)) - return newQLabel(ret) + var outptr_QLabel *C.QLabel = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QLabel) MetaObject() *QMetaObject { @@ -120,34 +177,34 @@ func (this *QLabel) Text() string { func (this *QLabel) Pixmap(param1 ReturnByValueConstant) *QPixmap { _ret := C.QLabel_Pixmap(this.h, (C.int)(param1)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Pixmap2() *QPixmap { _ret := C.QLabel_Pixmap2(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Picture(param1 ReturnByValueConstant) *QPicture { _ret := C.QLabel_Picture(this.h, (C.int)(param1)) - _goptr := newQPicture(_ret) + _goptr := newQPicture(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Picture2() *QPicture { _ret := C.QLabel_Picture2(this.h) - _goptr := newQPicture(_ret) + _goptr := newQPicture(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Movie() *QMovie { - return UnsafeNewQMovie(unsafe.Pointer(C.QLabel_Movie(this.h))) + return UnsafeNewQMovie(unsafe.Pointer(C.QLabel_Movie(this.h)), nil) } func (this *QLabel) TextFormat() TextFormat { @@ -217,7 +274,7 @@ func (this *QLabel) SetBuddy(buddy *QWidget) { } func (this *QLabel) Buddy() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLabel_Buddy(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLabel_Buddy(this.h)), nil, nil) } func (this *QLabel) HeightForWidth(param1 int) int { @@ -367,9 +424,364 @@ func QLabel_Tr3(s string, c string, n int) string { return _ret } +func (this *QLabel) callVirtualBase_SizeHint() *QSize { + + _ret := C.QLabel_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLabel) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QLabel_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_SizeHint +func miqt_exec_callback_QLabel_SizeHint(self *C.QLabel, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLabel) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QLabel_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLabel) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QLabel_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MinimumSizeHint +func miqt_exec_callback_QLabel_MinimumSizeHint(self *C.QLabel, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLabel) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLabel_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLabel) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLabel_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_HeightForWidth +func miqt_exec_callback_QLabel_HeightForWidth(self *C.QLabel, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLabel) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QLabel_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QLabel) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QLabel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_Event +func miqt_exec_callback_QLabel_Event(self *C.QLabel, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLabel) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QLabel_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QLabel_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_KeyPressEvent +func miqt_exec_callback_QLabel_KeyPressEvent(self *C.QLabel, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QLabel_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLabel) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QLabel_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_PaintEvent +func miqt_exec_callback_QLabel_PaintEvent(self *C.QLabel, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QLabel_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLabel) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QLabel_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_ChangeEvent +func miqt_exec_callback_QLabel_ChangeEvent(self *C.QLabel, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QLabel{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_MousePressEvent(ev *QMouseEvent) { + + C.QLabel_virtualbase_MousePressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnMousePressEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QLabel_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MousePressEvent +func miqt_exec_callback_QLabel_MousePressEvent(self *C.QLabel, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_MouseMoveEvent(ev *QMouseEvent) { + + C.QLabel_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnMouseMoveEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QLabel_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MouseMoveEvent +func miqt_exec_callback_QLabel_MouseMoveEvent(self *C.QLabel, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_MouseReleaseEvent(ev *QMouseEvent) { + + C.QLabel_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnMouseReleaseEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QLabel_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_MouseReleaseEvent +func miqt_exec_callback_QLabel_MouseReleaseEvent(self *C.QLabel, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_ContextMenuEvent(ev *QContextMenuEvent) { + + C.QLabel_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnContextMenuEvent(slot func(super func(ev *QContextMenuEvent), ev *QContextMenuEvent)) { + C.QLabel_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_ContextMenuEvent +func miqt_exec_callback_QLabel_ContextMenuEvent(self *C.QLabel, cb C.intptr_t, ev *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QContextMenuEvent), ev *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QLabel{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_FocusInEvent(ev *QFocusEvent) { + + C.QLabel_virtualbase_FocusInEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnFocusInEvent(slot func(super func(ev *QFocusEvent), ev *QFocusEvent)) { + C.QLabel_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_FocusInEvent +func miqt_exec_callback_QLabel_FocusInEvent(self *C.QLabel, cb C.intptr_t, ev *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QFocusEvent), ev *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(ev), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_FocusOutEvent(ev *QFocusEvent) { + + C.QLabel_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QLabel) OnFocusOutEvent(slot func(super func(ev *QFocusEvent), ev *QFocusEvent)) { + C.QLabel_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_FocusOutEvent +func miqt_exec_callback_QLabel_FocusOutEvent(self *C.QLabel, cb C.intptr_t, ev *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QFocusEvent), ev *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(ev), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QLabel) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QLabel_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QLabel) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QLabel_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_FocusNextPrevChild +func miqt_exec_callback_QLabel_FocusNextPrevChild(self *C.QLabel, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QLabel{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLabel) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QLabel_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QLabel) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QLabel_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLabel_InitStyleOption +func miqt_exec_callback_QLabel_InitStyleOption(self *C.QLabel, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QLabel{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QLabel) Delete() { - C.QLabel_Delete(this.h) + C.QLabel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlabel.h b/qt6/gen_qlabel.h index 8fc9b9bf..bd61d7c1 100644 --- a/qt6/gen_qlabel.h +++ b/qt6/gen_qlabel.h @@ -15,29 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QContextMenuEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QKeyEvent; class QLabel; class QMetaObject; +class QMouseEvent; class QMovie; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPicture; class QPixmap; class QSize; +class QStyleOptionFrame; class QWidget; #else +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QLabel QLabel; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; typedef struct QMovie QMovie; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPicture QPicture; typedef struct QPixmap QPixmap; typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QWidget QWidget; #endif -QLabel* QLabel_new(QWidget* parent); -QLabel* QLabel_new2(); -QLabel* QLabel_new3(struct miqt_string text); -QLabel* QLabel_new4(QWidget* parent, int f); -QLabel* QLabel_new5(struct miqt_string text, QWidget* parent); -QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f); +void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QLabel_MetaObject(const QLabel* self); void* QLabel_Metacast(QLabel* self, const char* param1); struct miqt_string QLabel_Tr(const char* s); @@ -83,9 +103,50 @@ void QLabel_LinkActivated(QLabel* self, struct miqt_string link); void QLabel_connect_LinkActivated(QLabel* self, intptr_t slot); void QLabel_LinkHovered(QLabel* self, struct miqt_string link); void QLabel_connect_LinkHovered(QLabel* self, intptr_t slot); +bool QLabel_Event(QLabel* self, QEvent* e); +void QLabel_KeyPressEvent(QLabel* self, QKeyEvent* ev); +void QLabel_PaintEvent(QLabel* self, QPaintEvent* param1); +void QLabel_ChangeEvent(QLabel* self, QEvent* param1); +void QLabel_MousePressEvent(QLabel* self, QMouseEvent* ev); +void QLabel_MouseMoveEvent(QLabel* self, QMouseEvent* ev); +void QLabel_MouseReleaseEvent(QLabel* self, QMouseEvent* ev); +void QLabel_ContextMenuEvent(QLabel* self, QContextMenuEvent* ev); +void QLabel_FocusInEvent(QLabel* self, QFocusEvent* ev); +void QLabel_FocusOutEvent(QLabel* self, QFocusEvent* ev); +bool QLabel_FocusNextPrevChild(QLabel* self, bool next); struct miqt_string QLabel_Tr2(const char* s, const char* c); struct miqt_string QLabel_Tr3(const char* s, const char* c, int n); -void QLabel_Delete(QLabel* self); +void QLabel_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLabel_virtualbase_SizeHint(const void* self); +void QLabel_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QLabel_virtualbase_MinimumSizeHint(const void* self); +void QLabel_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLabel_virtualbase_HeightForWidth(const void* self, int param1); +void QLabel_override_virtual_Event(void* self, intptr_t slot); +bool QLabel_virtualbase_Event(void* self, QEvent* e); +void QLabel_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QLabel_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QLabel_override_virtual_PaintEvent(void* self, intptr_t slot); +void QLabel_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QLabel_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QLabel_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QLabel_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QLabel_virtualbase_MousePressEvent(void* self, QMouseEvent* ev); +void QLabel_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QLabel_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev); +void QLabel_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QLabel_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev); +void QLabel_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QLabel_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* ev); +void QLabel_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QLabel_virtualbase_FocusInEvent(void* self, QFocusEvent* ev); +void QLabel_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QLabel_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev); +void QLabel_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QLabel_virtualbase_FocusNextPrevChild(void* self, bool next); +void QLabel_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QLabel_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QLabel_Delete(QLabel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlayout.cpp b/qt6/gen_qlayout.cpp index a086999e..dd92835a 100644 --- a/qt6/gen_qlayout.cpp +++ b/qt6/gen_qlayout.cpp @@ -1,7 +1,9 @@ +#include #include #include #include #include +#include #include #include #include @@ -170,8 +172,8 @@ int QLayout_ControlTypes(const QLayout* self) { return static_cast(_ret); } -QLayoutItem* QLayout_ReplaceWidget(QLayout* self, QWidget* from, QWidget* to) { - return self->replaceWidget(from, to); +QLayoutItem* QLayout_ReplaceWidget(QLayout* self, QWidget* from, QWidget* to, int options) { + return self->replaceWidget(from, to, static_cast(options)); } int QLayout_TotalMinimumHeightForWidth(const QLayout* self, int w) { @@ -232,11 +234,11 @@ struct miqt_string QLayout_Tr3(const char* s, const char* c, int n) { return _ms; } -QLayoutItem* QLayout_ReplaceWidget3(QLayout* self, QWidget* from, QWidget* to, int options) { - return self->replaceWidget(from, to, static_cast(options)); -} - -void QLayout_Delete(QLayout* self) { - delete self; +void QLayout_Delete(QLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlayout.go b/qt6/gen_qlayout.go index 4f3b7d1e..bf291d2c 100644 --- a/qt6/gen_qlayout.go +++ b/qt6/gen_qlayout.go @@ -25,7 +25,8 @@ const ( ) type QLayout struct { - h *C.QLayout + h *C.QLayout + isSubclass bool *QObject *QLayoutItem } @@ -44,15 +45,25 @@ func (this *QLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLayout(h *C.QLayout) *QLayout { +// newQLayout constructs the type using only CGO pointers. +func newQLayout(h *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QLayout { if h == nil { return nil } - return &QLayout{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QLayoutItem: UnsafeNewQLayoutItem(unsafe.Pointer(h))} + return &QLayout{h: h, + QObject: newQObject(h_QObject), + QLayoutItem: newQLayoutItem(h_QLayoutItem)} } -func UnsafeNewQLayout(h unsafe.Pointer) *QLayout { - return newQLayout((*C.QLayout)(h)) +// UnsafeNewQLayout constructs the type using only unsafe pointers. +func UnsafeNewQLayout(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QLayout { + if h == nil { + return nil + } + + return &QLayout{h: (*C.QLayout)(h), + QObject: UnsafeNewQObject(h_QObject), + QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } func (this *QLayout) MetaObject() *QMetaObject { @@ -133,11 +144,11 @@ func (this *QLayout) SetMenuBar(w *QWidget) { } func (this *QLayout) MenuBar() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_MenuBar(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_MenuBar(this.h)), nil, nil) } func (this *QLayout) ParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_ParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_ParentWidget(this.h)), nil, nil) } func (this *QLayout) Invalidate() { @@ -225,8 +236,8 @@ func (this *QLayout) ControlTypes() QSizePolicy__ControlType { return (QSizePolicy__ControlType)(C.QLayout_ControlTypes(this.h)) } -func (this *QLayout) ReplaceWidget(from *QWidget, to *QWidget) *QLayoutItem { - return UnsafeNewQLayoutItem(unsafe.Pointer(C.QLayout_ReplaceWidget(this.h, from.cPointer(), to.cPointer()))) +func (this *QLayout) ReplaceWidget(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QLayout_ReplaceWidget(this.h, from.cPointer(), to.cPointer(), (C.int)(options)))) } func (this *QLayout) TotalMinimumHeightForWidth(w int) int { @@ -259,7 +270,7 @@ func (this *QLayout) TotalSizeHint() *QSize { } func (this *QLayout) Layout() *QLayout { - return UnsafeNewQLayout(unsafe.Pointer(C.QLayout_Layout(this.h))) + return UnsafeNewQLayout(unsafe.Pointer(C.QLayout_Layout(this.h)), nil, nil) } func (this *QLayout) SetEnabled(enabled bool) { @@ -299,13 +310,9 @@ func QLayout_Tr3(s string, c string, n int) string { return _ret } -func (this *QLayout) ReplaceWidget3(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { - return UnsafeNewQLayoutItem(unsafe.Pointer(C.QLayout_ReplaceWidget3(this.h, from.cPointer(), to.cPointer(), (C.int)(options)))) -} - // Delete this object from C++ memory. func (this *QLayout) Delete() { - C.QLayout_Delete(this.h) + C.QLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlayout.h b/qt6/gen_qlayout.h index c4757e5c..3c580843 100644 --- a/qt6/gen_qlayout.h +++ b/qt6/gen_qlayout.h @@ -15,18 +15,22 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QLayout; class QLayoutItem; class QMargins; class QMetaObject; +class QObject; class QRect; class QSize; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMargins QMargins; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QWidget QWidget; @@ -69,7 +73,7 @@ int QLayout_IndexOfWithQLayoutItem(const QLayout* self, QLayoutItem* param1); int QLayout_Count(const QLayout* self); bool QLayout_IsEmpty(const QLayout* self); int QLayout_ControlTypes(const QLayout* self); -QLayoutItem* QLayout_ReplaceWidget(QLayout* self, QWidget* from, QWidget* to); +QLayoutItem* QLayout_ReplaceWidget(QLayout* self, QWidget* from, QWidget* to, int options); int QLayout_TotalMinimumHeightForWidth(const QLayout* self, int w); int QLayout_TotalHeightForWidth(const QLayout* self, int w); QSize* QLayout_TotalMinimumSize(const QLayout* self); @@ -79,10 +83,10 @@ QLayout* QLayout_Layout(QLayout* self); void QLayout_SetEnabled(QLayout* self, bool enabled); bool QLayout_IsEnabled(const QLayout* self); QSize* QLayout_ClosestAcceptableSize(QWidget* w, QSize* s); +void QLayout_ChildEvent(QLayout* self, QChildEvent* e); struct miqt_string QLayout_Tr2(const char* s, const char* c); struct miqt_string QLayout_Tr3(const char* s, const char* c, int n); -QLayoutItem* QLayout_ReplaceWidget3(QLayout* self, QWidget* from, QWidget* to, int options); -void QLayout_Delete(QLayout* self); +void QLayout_Delete(QLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlayoutitem.cpp b/qt6/gen_qlayoutitem.cpp index fe32e3e2..8212b982 100644 --- a/qt6/gen_qlayoutitem.cpp +++ b/qt6/gen_qlayoutitem.cpp @@ -82,24 +82,387 @@ int QLayoutItem_ControlTypes(const QLayoutItem* self) { return static_cast(_ret); } -void QLayoutItem_Delete(QLayoutItem* self) { - delete self; +void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSpacerItem* QSpacerItem_new(int w, int h) { - return new QSpacerItem(static_cast(w), static_cast(h)); +class MiqtVirtualQSpacerItem : public virtual QSpacerItem { +public: + + MiqtVirtualQSpacerItem(int w, int h): QSpacerItem(w, h) {}; + MiqtVirtualQSpacerItem(const QSpacerItem& param1): QSpacerItem(param1) {}; + MiqtVirtualQSpacerItem(int w, int h, QSizePolicy::Policy hData): QSpacerItem(w, h, hData) {}; + MiqtVirtualQSpacerItem(int w, int h, QSizePolicy::Policy hData, QSizePolicy::Policy vData): QSpacerItem(w, h, hData, vData) {}; + + virtual ~MiqtVirtualQSpacerItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSpacerItem::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpacerItem_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSpacerItem::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QSpacerItem::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpacerItem_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QSpacerItem::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QSpacerItem::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpacerItem_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QSpacerItem::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QSpacerItem::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QSpacerItem_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QSpacerItem::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QSpacerItem::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QSpacerItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QSpacerItem::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QSpacerItem::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QSpacerItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QSpacerItem::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QSpacerItem::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QSpacerItem_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QSpacerItem::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SpacerItem = 0; + + // Subclass to allow providing a Go implementation + virtual QSpacerItem* spacerItem() override { + if (handle__SpacerItem == 0) { + return QSpacerItem::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QSpacerItem_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QSpacerItem::spacerItem(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSpacerItem::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSpacerItem_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSpacerItem::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSpacerItem::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSpacerItem_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSpacerItem::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QSpacerItem::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSpacerItem_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QSpacerItem::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QSpacerItem::invalidate(); + return; + } + + + miqt_exec_callback_QSpacerItem_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QSpacerItem::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Widget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* widget() const override { + if (handle__Widget == 0) { + return QSpacerItem::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QSpacerItem_Widget(const_cast(this), handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() const { + + return QSpacerItem::widget(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QSpacerItem::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QSpacerItem_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QSpacerItem::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QSpacerItem::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QSpacerItem_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QSpacerItem::controlTypes(); + return static_cast(_ret); + + } + +}; + +void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h)); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } -QSpacerItem* QSpacerItem_new2(QSpacerItem* param1) { - return new QSpacerItem(*param1); +void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(*param1); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } -QSpacerItem* QSpacerItem_new3(int w, int h, int hData) { - return new QSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); +void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } -QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData) { - return new QSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); +void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); + *outptr_QSpacerItem = ret; + *outptr_QLayoutItem = static_cast(ret); } void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h) { @@ -151,12 +514,486 @@ void QSpacerItem_ChangeSize4(QSpacerItem* self, int w, int h, int hData, int vDa self->changeSize(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); } -void QSpacerItem_Delete(QSpacerItem* self) { - delete self; +void QSpacerItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__SizeHint = slot; +} + +QSize* QSpacerItem_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_SizeHint(); +} + +void QSpacerItem_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__MinimumSize = slot; +} + +QSize* QSpacerItem_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_MinimumSize(); +} + +void QSpacerItem_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__MaximumSize = slot; +} + +QSize* QSpacerItem_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_MaximumSize(); } -QWidgetItem* QWidgetItem_new(QWidget* w) { - return new QWidgetItem(w); +void QSpacerItem_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__ExpandingDirections = slot; +} + +int QSpacerItem_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_ExpandingDirections(); +} + +void QSpacerItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__IsEmpty = slot; +} + +bool QSpacerItem_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_IsEmpty(); +} + +void QSpacerItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__SetGeometry = slot; +} + +void QSpacerItem_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QSpacerItem_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Geometry = slot; +} + +QRect* QSpacerItem_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_Geometry(); +} + +void QSpacerItem_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QSpacerItem_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_SpacerItem(); +} + +void QSpacerItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSpacerItem_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSpacerItem_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__HeightForWidth = slot; +} + +int QSpacerItem_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSpacerItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QSpacerItem_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QSpacerItem_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Invalidate = slot; +} + +void QSpacerItem_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_Invalidate(); +} + +void QSpacerItem_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Widget = slot; +} + +QWidget* QSpacerItem_virtualbase_Widget(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_Widget(); +} + +void QSpacerItem_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__Layout = slot; +} + +QLayout* QSpacerItem_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQSpacerItem*)(self) )->virtualbase_Layout(); +} + +void QSpacerItem_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QSpacerItem*)(self) )->handle__ControlTypes = slot; +} + +int QSpacerItem_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQSpacerItem*)(self) )->virtualbase_ControlTypes(); +} + +void QSpacerItem_Delete(QSpacerItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWidgetItem : public virtual QWidgetItem { +public: + + MiqtVirtualQWidgetItem(QWidget* w): QWidgetItem(w) {}; + + virtual ~MiqtVirtualQWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWidgetItem::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItem_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWidgetItem::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QWidgetItem::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItem_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QWidgetItem::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QWidgetItem::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItem_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QWidgetItem::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QWidgetItem::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItem_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QWidgetItem::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QWidgetItem::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QWidgetItem::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QWidgetItem::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QWidgetItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QWidgetItem::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QWidgetItem::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QWidgetItem_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QWidgetItem::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Widget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* widget() const override { + if (handle__Widget == 0) { + return QWidgetItem::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QWidgetItem_Widget(const_cast(this), handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() const { + + return QWidgetItem::widget(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWidgetItem::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItem_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWidgetItem::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWidgetItem::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidgetItem_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWidgetItem::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QWidgetItem::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidgetItem_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QWidgetItem::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QWidgetItem::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItem_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QWidgetItem::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QWidgetItem::invalidate(); + return; + } + + + miqt_exec_callback_QWidgetItem_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QWidgetItem::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QWidgetItem::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QWidgetItem_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QWidgetItem::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SpacerItem = 0; + + // Subclass to allow providing a Go implementation + virtual QSpacerItem* spacerItem() override { + if (handle__SpacerItem == 0) { + return QWidgetItem::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QWidgetItem_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QWidgetItem::spacerItem(); + + } + +}; + +void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQWidgetItem* ret = new MiqtVirtualQWidgetItem(w); + *outptr_QWidgetItem = ret; + *outptr_QLayoutItem = static_cast(ret); } QSize* QWidgetItem_SizeHint(const QWidgetItem* self) { @@ -209,12 +1046,420 @@ int QWidgetItem_ControlTypes(const QWidgetItem* self) { return static_cast(_ret); } -void QWidgetItem_Delete(QWidgetItem* self) { - delete self; +void QWidgetItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__SizeHint = slot; +} + +QSize* QWidgetItem_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_SizeHint(); +} + +void QWidgetItem_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__MinimumSize = slot; } -QWidgetItemV2* QWidgetItemV2_new(QWidget* widget) { - return new QWidgetItemV2(widget); +QSize* QWidgetItem_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_MinimumSize(); +} + +void QWidgetItem_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__MaximumSize = slot; +} + +QSize* QWidgetItem_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_MaximumSize(); +} + +void QWidgetItem_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__ExpandingDirections = slot; +} + +int QWidgetItem_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_ExpandingDirections(); +} + +void QWidgetItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__IsEmpty = slot; +} + +bool QWidgetItem_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_IsEmpty(); +} + +void QWidgetItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__SetGeometry = slot; +} + +void QWidgetItem_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QWidgetItem_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Geometry = slot; +} + +QRect* QWidgetItem_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_Geometry(); +} + +void QWidgetItem_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Widget = slot; +} + +QWidget* QWidgetItem_virtualbase_Widget(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_Widget(); +} + +void QWidgetItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWidgetItem_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWidgetItem_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__HeightForWidth = slot; +} + +int QWidgetItem_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWidgetItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QWidgetItem_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QWidgetItem_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__ControlTypes = slot; +} + +int QWidgetItem_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQWidgetItem*)(self) )->virtualbase_ControlTypes(); +} + +void QWidgetItem_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Invalidate = slot; +} + +void QWidgetItem_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_Invalidate(); +} + +void QWidgetItem_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__Layout = slot; +} + +QLayout* QWidgetItem_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_Layout(); +} + +void QWidgetItem_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItem*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QWidgetItem_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQWidgetItem*)(self) )->virtualbase_SpacerItem(); +} + +void QWidgetItem_Delete(QWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWidgetItemV2 : public virtual QWidgetItemV2 { +public: + + MiqtVirtualQWidgetItemV2(QWidget* widget): QWidgetItemV2(widget) {}; + + virtual ~MiqtVirtualQWidgetItemV2() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWidgetItemV2::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItemV2_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWidgetItemV2::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QWidgetItemV2::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItemV2_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QWidgetItemV2::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QWidgetItemV2::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidgetItemV2_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QWidgetItemV2::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QWidgetItemV2::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QWidgetItemV2::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QWidgetItemV2::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QWidgetItemV2::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QWidgetItemV2::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItemV2_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QWidgetItemV2::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& geometry) override { + if (handle__SetGeometry == 0) { + QWidgetItemV2::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QWidgetItemV2_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QWidgetItemV2::setGeometry(*geometry); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QWidgetItemV2::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QWidgetItemV2_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QWidgetItemV2::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Widget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* widget() const override { + if (handle__Widget == 0) { + return QWidgetItemV2::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QWidgetItemV2_Widget(const_cast(this), handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() const { + + return QWidgetItemV2::widget(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWidgetItemV2::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWidgetItemV2_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWidgetItemV2::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int minimumHeightForWidth(int param1) const override { + if (handle__MinimumHeightForWidth == 0) { + return QWidgetItemV2::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_MinimumHeightForWidth(const_cast(this), handle__MinimumHeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_MinimumHeightForWidth(int param1) const { + + return QWidgetItemV2::minimumHeightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QWidgetItemV2::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QWidgetItemV2_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QWidgetItemV2::controlTypes(); + return static_cast(_ret); + + } + +}; + +void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQWidgetItemV2* ret = new MiqtVirtualQWidgetItemV2(widget); + *outptr_QWidgetItemV2 = ret; + *outptr_QWidgetItem = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self) { @@ -233,7 +1478,107 @@ int QWidgetItemV2_HeightForWidth(const QWidgetItemV2* self, int width) { return self->heightForWidth(static_cast(width)); } -void QWidgetItemV2_Delete(QWidgetItemV2* self) { - delete self; +void QWidgetItemV2_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__SizeHint = slot; +} + +QSize* QWidgetItemV2_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_SizeHint(); +} + +void QWidgetItemV2_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__MinimumSize = slot; +} + +QSize* QWidgetItemV2_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_MinimumSize(); +} + +void QWidgetItemV2_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__MaximumSize = slot; +} + +QSize* QWidgetItemV2_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_MaximumSize(); +} + +void QWidgetItemV2_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__HeightForWidth = slot; +} + +int QWidgetItemV2_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_HeightForWidth(width); +} + +void QWidgetItemV2_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__ExpandingDirections = slot; +} + +int QWidgetItemV2_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_ExpandingDirections(); +} + +void QWidgetItemV2_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__IsEmpty = slot; +} + +bool QWidgetItemV2_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_IsEmpty(); +} + +void QWidgetItemV2_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__SetGeometry = slot; +} + +void QWidgetItemV2_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QWidgetItemV2_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__Geometry = slot; +} + +QRect* QWidgetItemV2_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_Geometry(); +} + +void QWidgetItemV2_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__Widget = slot; +} + +QWidget* QWidgetItemV2_virtualbase_Widget(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_Widget(); +} + +void QWidgetItemV2_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWidgetItemV2_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWidgetItemV2_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QWidgetItemV2_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QWidgetItemV2_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QWidgetItemV2*)(self) )->handle__ControlTypes = slot; +} + +int QWidgetItemV2_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQWidgetItemV2*)(self) )->virtualbase_ControlTypes(); +} + +void QWidgetItemV2_Delete(QWidgetItemV2* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlayoutitem.go b/qt6/gen_qlayoutitem.go index 27e060b1..ec0c56f6 100644 --- a/qt6/gen_qlayoutitem.go +++ b/qt6/gen_qlayoutitem.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QLayoutItem struct { - h *C.QLayoutItem + h *C.QLayoutItem + isSubclass bool } func (this *QLayoutItem) cPointer() *C.QLayoutItem { @@ -31,6 +33,7 @@ func (this *QLayoutItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLayoutItem constructs the type using only CGO pointers. func newQLayoutItem(h *C.QLayoutItem) *QLayoutItem { if h == nil { return nil @@ -38,8 +41,13 @@ func newQLayoutItem(h *C.QLayoutItem) *QLayoutItem { return &QLayoutItem{h: h} } +// UnsafeNewQLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQLayoutItem(h unsafe.Pointer) *QLayoutItem { - return newQLayoutItem((*C.QLayoutItem)(h)) + if h == nil { + return nil + } + + return &QLayoutItem{h: (*C.QLayoutItem)(h)} } func (this *QLayoutItem) SizeHint() *QSize { @@ -99,15 +107,15 @@ func (this *QLayoutItem) Invalidate() { } func (this *QLayoutItem) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QLayoutItem_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QLayoutItem_Widget(this.h)), nil, nil) } func (this *QLayoutItem) Layout() *QLayout { - return UnsafeNewQLayout(unsafe.Pointer(C.QLayoutItem_Layout(this.h))) + return UnsafeNewQLayout(unsafe.Pointer(C.QLayoutItem_Layout(this.h)), nil, nil) } func (this *QLayoutItem) SpacerItem() *QSpacerItem { - return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayoutItem_SpacerItem(this.h))) + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayoutItem_SpacerItem(this.h)), nil) } func (this *QLayoutItem) Alignment() AlignmentFlag { @@ -124,7 +132,7 @@ func (this *QLayoutItem) ControlTypes() QSizePolicy__ControlType { // Delete this object from C++ memory. func (this *QLayoutItem) Delete() { - C.QLayoutItem_Delete(this.h) + C.QLayoutItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -137,7 +145,8 @@ func (this *QLayoutItem) GoGC() { } type QSpacerItem struct { - h *C.QSpacerItem + h *C.QSpacerItem + isSubclass bool *QLayoutItem } @@ -155,39 +164,67 @@ func (this *QSpacerItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSpacerItem(h *C.QSpacerItem) *QSpacerItem { +// newQSpacerItem constructs the type using only CGO pointers. +func newQSpacerItem(h *C.QSpacerItem, h_QLayoutItem *C.QLayoutItem) *QSpacerItem { if h == nil { return nil } - return &QSpacerItem{h: h, QLayoutItem: UnsafeNewQLayoutItem(unsafe.Pointer(h))} + return &QSpacerItem{h: h, + QLayoutItem: newQLayoutItem(h_QLayoutItem)} } -func UnsafeNewQSpacerItem(h unsafe.Pointer) *QSpacerItem { - return newQSpacerItem((*C.QSpacerItem)(h)) +// UnsafeNewQSpacerItem constructs the type using only unsafe pointers. +func UnsafeNewQSpacerItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QSpacerItem { + if h == nil { + return nil + } + + return &QSpacerItem{h: (*C.QSpacerItem)(h), + QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } // NewQSpacerItem constructs a new QSpacerItem object. func NewQSpacerItem(w int, h int) *QSpacerItem { - ret := C.QSpacerItem_new((C.int)(w), (C.int)(h)) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new((C.int)(w), (C.int)(h), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQSpacerItem2 constructs a new QSpacerItem object. func NewQSpacerItem2(param1 *QSpacerItem) *QSpacerItem { - ret := C.QSpacerItem_new2(param1.cPointer()) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new2(param1.cPointer(), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQSpacerItem3 constructs a new QSpacerItem object. func NewQSpacerItem3(w int, h int, hData QSizePolicy__Policy) *QSpacerItem { - ret := C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData)) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQSpacerItem4 constructs a new QSpacerItem object. func NewQSpacerItem4(w int, h int, hData QSizePolicy__Policy, vData QSizePolicy__Policy) *QSpacerItem { - ret := C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData)) - return newQSpacerItem(ret) + var outptr_QSpacerItem *C.QSpacerItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData), &outptr_QSpacerItem, &outptr_QLayoutItem) + ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QSpacerItem) ChangeSize(w int, h int) { @@ -235,7 +272,7 @@ func (this *QSpacerItem) Geometry() *QRect { } func (this *QSpacerItem) SpacerItem() *QSpacerItem { - return UnsafeNewQSpacerItem(unsafe.Pointer(C.QSpacerItem_SpacerItem(this.h))) + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QSpacerItem_SpacerItem(this.h)), nil) } func (this *QSpacerItem) SizePolicy() *QSizePolicy { @@ -253,9 +290,353 @@ func (this *QSpacerItem) ChangeSize4(w int, h int, hData QSizePolicy__Policy, vD C.QSpacerItem_ChangeSize4(this.h, (C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData)) } +func (this *QSpacerItem) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSpacerItem_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSpacerItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_SizeHint +func miqt_exec_callback_QSpacerItem_SizeHint(self *C.QSpacerItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QSpacerItem_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QSpacerItem_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_MinimumSize +func miqt_exec_callback_QSpacerItem_MinimumSize(self *C.QSpacerItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QSpacerItem_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QSpacerItem_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_MaximumSize +func miqt_exec_callback_QSpacerItem_MaximumSize(self *C.QSpacerItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QSpacerItem_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QSpacerItem_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_ExpandingDirections +func miqt_exec_callback_QSpacerItem_ExpandingDirections(self *C.QSpacerItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QSpacerItem_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnIsEmpty(slot func(super func() bool) bool) { + C.QSpacerItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_IsEmpty +func miqt_exec_callback_QSpacerItem_IsEmpty(self *C.QSpacerItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QSpacerItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QSpacerItem) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QSpacerItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_SetGeometry +func miqt_exec_callback_QSpacerItem_SetGeometry(self *C.QSpacerItem, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QSpacerItem{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QSpacerItem) callVirtualBase_Geometry() *QRect { + + _ret := C.QSpacerItem_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpacerItem) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QSpacerItem_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Geometry +func miqt_exec_callback_QSpacerItem_Geometry(self *C.QSpacerItem, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QSpacerItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QSpacerItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QSpacerItem_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_SpacerItem +func miqt_exec_callback_QSpacerItem_SpacerItem(self *C.QSpacerItem, cb C.intptr_t) *C.QSpacerItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSpacerItem) *QSpacerItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSpacerItem_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSpacerItem_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_HasHeightForWidth +func miqt_exec_callback_QSpacerItem_HasHeightForWidth(self *C.QSpacerItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSpacerItem_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSpacerItem) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSpacerItem_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_HeightForWidth +func miqt_exec_callback_QSpacerItem_HeightForWidth(self *C.QSpacerItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QSpacerItem_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSpacerItem) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSpacerItem_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_MinimumHeightForWidth +func miqt_exec_callback_QSpacerItem_MinimumHeightForWidth(self *C.QSpacerItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSpacerItem) callVirtualBase_Invalidate() { + + C.QSpacerItem_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QSpacerItem) OnInvalidate(slot func(super func())) { + C.QSpacerItem_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Invalidate +func miqt_exec_callback_QSpacerItem_Invalidate(self *C.QSpacerItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSpacerItem{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QSpacerItem) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QSpacerItem_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QSpacerItem) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QSpacerItem_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Widget +func miqt_exec_callback_QSpacerItem_Widget(self *C.QSpacerItem, cb C.intptr_t) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QSpacerItem_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QSpacerItem) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QSpacerItem_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_Layout +func miqt_exec_callback_QSpacerItem_Layout(self *C.QSpacerItem, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QSpacerItem) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QSpacerItem_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QSpacerItem) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QSpacerItem_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpacerItem_ControlTypes +func miqt_exec_callback_QSpacerItem_ControlTypes(self *C.QSpacerItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpacerItem{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSpacerItem) Delete() { - C.QSpacerItem_Delete(this.h) + C.QSpacerItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -268,7 +649,8 @@ func (this *QSpacerItem) GoGC() { } type QWidgetItem struct { - h *C.QWidgetItem + h *C.QWidgetItem + isSubclass bool *QLayoutItem } @@ -286,21 +668,34 @@ func (this *QWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidgetItem(h *C.QWidgetItem) *QWidgetItem { +// newQWidgetItem constructs the type using only CGO pointers. +func newQWidgetItem(h *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItem { if h == nil { return nil } - return &QWidgetItem{h: h, QLayoutItem: UnsafeNewQLayoutItem(unsafe.Pointer(h))} + return &QWidgetItem{h: h, + QLayoutItem: newQLayoutItem(h_QLayoutItem)} } -func UnsafeNewQWidgetItem(h unsafe.Pointer) *QWidgetItem { - return newQWidgetItem((*C.QWidgetItem)(h)) +// UnsafeNewQWidgetItem constructs the type using only unsafe pointers. +func UnsafeNewQWidgetItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItem { + if h == nil { + return nil + } + + return &QWidgetItem{h: (*C.QWidgetItem)(h), + QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } // NewQWidgetItem constructs a new QWidgetItem object. func NewQWidgetItem(w *QWidget) *QWidgetItem { - ret := C.QWidgetItem_new(w.cPointer()) - return newQWidgetItem(ret) + var outptr_QWidgetItem *C.QWidgetItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QWidgetItem_new(w.cPointer(), &outptr_QWidgetItem, &outptr_QLayoutItem) + ret := newQWidgetItem(outptr_QWidgetItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QWidgetItem) SizeHint() *QSize { @@ -344,7 +739,7 @@ func (this *QWidgetItem) Geometry() *QRect { } func (this *QWidgetItem) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItem_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItem_Widget(this.h)), nil, nil) } func (this *QWidgetItem) HasHeightForWidth() bool { @@ -363,84 +758,725 @@ func (this *QWidgetItem) ControlTypes() QSizePolicy__ControlType { return (QSizePolicy__ControlType)(C.QWidgetItem_ControlTypes(this.h)) } -// Delete this object from C++ memory. -func (this *QWidgetItem) Delete() { - C.QWidgetItem_Delete(this.h) -} +func (this *QWidgetItem) callVirtualBase_SizeHint() *QSize { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QWidgetItem) GoGC() { - runtime.SetFinalizer(this, func(this *QWidgetItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + _ret := C.QWidgetItem_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -type QWidgetItemV2 struct { - h *C.QWidgetItemV2 - *QWidgetItem } - -func (this *QWidgetItemV2) cPointer() *C.QWidgetItemV2 { - if this == nil { - return nil - } - return this.h +func (this *QWidgetItem) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidgetItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWidgetItemV2) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +//export miqt_exec_callback_QWidgetItem_SizeHint +func miqt_exec_callback_QWidgetItem_SizeHint(self *C.QWidgetItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) -} -func newQWidgetItemV2(h *C.QWidgetItemV2) *QWidgetItemV2 { - if h == nil { - return nil - } - return &QWidgetItemV2{h: h, QWidgetItem: UnsafeNewQWidgetItem(unsafe.Pointer(h))} -} + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_SizeHint) -func UnsafeNewQWidgetItemV2(h unsafe.Pointer) *QWidgetItemV2 { - return newQWidgetItemV2((*C.QWidgetItemV2)(h)) -} + return virtualReturn.cPointer() -// NewQWidgetItemV2 constructs a new QWidgetItemV2 object. -func NewQWidgetItemV2(widget *QWidget) *QWidgetItemV2 { - ret := C.QWidgetItemV2_new(widget.cPointer()) - return newQWidgetItemV2(ret) } -func (this *QWidgetItemV2) SizeHint() *QSize { - _ret := C.QWidgetItemV2_SizeHint(this.h) +func (this *QWidgetItem) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QWidgetItem_virtualbase_MinimumSize(unsafe.Pointer(this.h)) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QWidgetItem) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItem_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWidgetItemV2) MinimumSize() *QSize { - _ret := C.QWidgetItemV2_MinimumSize(this.h) - _goptr := newQSize(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QWidgetItem_MinimumSize +func miqt_exec_callback_QWidgetItem_MinimumSize(self *C.QWidgetItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + } -func (this *QWidgetItemV2) MaximumSize() *QSize { - _ret := C.QWidgetItemV2_MaximumSize(this.h) +func (this *QWidgetItem) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QWidgetItem_virtualbase_MaximumSize(unsafe.Pointer(this.h)) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QWidgetItem) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItem_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWidgetItemV2) HeightForWidth(width int) int { - return (int)(C.QWidgetItemV2_HeightForWidth(this.h, (C.int)(width))) +//export miqt_exec_callback_QWidgetItem_MaximumSize +func miqt_exec_callback_QWidgetItem_MaximumSize(self *C.QWidgetItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QWidgetItem_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QWidgetItem_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_ExpandingDirections +func miqt_exec_callback_QWidgetItem_ExpandingDirections(self *C.QWidgetItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QWidgetItem_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnIsEmpty(slot func(super func() bool) bool) { + C.QWidgetItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_IsEmpty +func miqt_exec_callback_QWidgetItem_IsEmpty(self *C.QWidgetItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QWidgetItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QWidgetItem) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QWidgetItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_SetGeometry +func miqt_exec_callback_QWidgetItem_SetGeometry(self *C.QWidgetItem, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QWidgetItem{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QWidgetItem) callVirtualBase_Geometry() *QRect { + + _ret := C.QWidgetItem_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItem) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QWidgetItem_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Geometry +func miqt_exec_callback_QWidgetItem_Geometry(self *C.QWidgetItem, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItem_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QWidgetItem) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QWidgetItem_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Widget +func miqt_exec_callback_QWidgetItem_Widget(self *C.QWidgetItem, cb C.intptr_t) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWidgetItem_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWidgetItem_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_HasHeightForWidth +func miqt_exec_callback_QWidgetItem_HasHeightForWidth(self *C.QWidgetItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWidgetItem_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidgetItem) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidgetItem_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_HeightForWidth +func miqt_exec_callback_QWidgetItem_HeightForWidth(self *C.QWidgetItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QWidgetItem_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidgetItem) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidgetItem_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_MinimumHeightForWidth +func miqt_exec_callback_QWidgetItem_MinimumHeightForWidth(self *C.QWidgetItem, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QWidgetItem_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItem) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QWidgetItem_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_ControlTypes +func miqt_exec_callback_QWidgetItem_ControlTypes(self *C.QWidgetItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItem) callVirtualBase_Invalidate() { + + C.QWidgetItem_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QWidgetItem) OnInvalidate(slot func(super func())) { + C.QWidgetItem_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Invalidate +func miqt_exec_callback_QWidgetItem_Invalidate(self *C.QWidgetItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWidgetItem{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QWidgetItem) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QWidgetItem_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QWidgetItem) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QWidgetItem_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_Layout +func miqt_exec_callback_QWidgetItem_Layout(self *C.QWidgetItem, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItem) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QWidgetItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QWidgetItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QWidgetItem_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItem_SpacerItem +func miqt_exec_callback_QWidgetItem_SpacerItem(self *C.QWidgetItem, cb C.intptr_t) *C.QSpacerItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSpacerItem) *QSpacerItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItem{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QWidgetItem) Delete() { + C.QWidgetItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWidgetItem) GoGC() { + runtime.SetFinalizer(this, func(this *QWidgetItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWidgetItemV2 struct { + h *C.QWidgetItemV2 + isSubclass bool + *QWidgetItem +} + +func (this *QWidgetItemV2) cPointer() *C.QWidgetItemV2 { + if this == nil { + return nil + } + return this.h +} + +func (this *QWidgetItemV2) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWidgetItemV2 constructs the type using only CGO pointers. +func newQWidgetItemV2(h *C.QWidgetItemV2, h_QWidgetItem *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItemV2 { + if h == nil { + return nil + } + return &QWidgetItemV2{h: h, + QWidgetItem: newQWidgetItem(h_QWidgetItem, h_QLayoutItem)} +} + +// UnsafeNewQWidgetItemV2 constructs the type using only unsafe pointers. +func UnsafeNewQWidgetItemV2(h unsafe.Pointer, h_QWidgetItem unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItemV2 { + if h == nil { + return nil + } + + return &QWidgetItemV2{h: (*C.QWidgetItemV2)(h), + QWidgetItem: UnsafeNewQWidgetItem(h_QWidgetItem, h_QLayoutItem)} +} + +// NewQWidgetItemV2 constructs a new QWidgetItemV2 object. +func NewQWidgetItemV2(widget *QWidget) *QWidgetItemV2 { + var outptr_QWidgetItemV2 *C.QWidgetItemV2 = nil + var outptr_QWidgetItem *C.QWidgetItem = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QWidgetItemV2_new(widget.cPointer(), &outptr_QWidgetItemV2, &outptr_QWidgetItem, &outptr_QLayoutItem) + ret := newQWidgetItemV2(outptr_QWidgetItemV2, outptr_QWidgetItem, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +func (this *QWidgetItemV2) SizeHint() *QSize { + _ret := C.QWidgetItemV2_SizeHint(this.h) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWidgetItemV2) MinimumSize() *QSize { + _ret := C.QWidgetItemV2_MinimumSize(this.h) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWidgetItemV2) MaximumSize() *QSize { + _ret := C.QWidgetItemV2_MaximumSize(this.h) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWidgetItemV2) HeightForWidth(width int) int { + return (int)(C.QWidgetItemV2_HeightForWidth(this.h, (C.int)(width))) +} + +func (this *QWidgetItemV2) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWidgetItemV2_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidgetItemV2_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_SizeHint +func miqt_exec_callback_QWidgetItemV2_SizeHint(self *C.QWidgetItemV2, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QWidgetItemV2_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItemV2_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_MinimumSize +func miqt_exec_callback_QWidgetItemV2_MinimumSize(self *C.QWidgetItemV2, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QWidgetItemV2_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QWidgetItemV2_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_MaximumSize +func miqt_exec_callback_QWidgetItemV2_MaximumSize(self *C.QWidgetItemV2, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QWidgetItemV2_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QWidgetItemV2) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QWidgetItemV2_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_HeightForWidth +func miqt_exec_callback_QWidgetItemV2_HeightForWidth(self *C.QWidgetItemV2, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QWidgetItemV2_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QWidgetItemV2_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_ExpandingDirections +func miqt_exec_callback_QWidgetItemV2_ExpandingDirections(self *C.QWidgetItemV2, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QWidgetItemV2_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnIsEmpty(slot func(super func() bool) bool) { + C.QWidgetItemV2_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_IsEmpty +func miqt_exec_callback_QWidgetItemV2_IsEmpty(self *C.QWidgetItemV2, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QWidgetItemV2_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QWidgetItemV2) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QWidgetItemV2_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_SetGeometry +func miqt_exec_callback_QWidgetItemV2_SetGeometry(self *C.QWidgetItemV2, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(geometry *QRect), geometry *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(geometry)) + + gofunc((&QWidgetItemV2{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QWidgetItemV2) callVirtualBase_Geometry() *QRect { + + _ret := C.QWidgetItemV2_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidgetItemV2) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QWidgetItemV2_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_Geometry +func miqt_exec_callback_QWidgetItemV2_Geometry(self *C.QWidgetItemV2, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetItemV2_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QWidgetItemV2) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QWidgetItemV2_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_Widget +func miqt_exec_callback_QWidgetItemV2_Widget(self *C.QWidgetItemV2, cb C.intptr_t) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetItemV2) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWidgetItemV2_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWidgetItemV2_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_HasHeightForWidth +func miqt_exec_callback_QWidgetItemV2_HasHeightForWidth(self *C.QWidgetItemV2, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QWidgetItemV2_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidgetItemV2) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidgetItemV2_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_MinimumHeightForWidth +func miqt_exec_callback_QWidgetItemV2_MinimumHeightForWidth(self *C.QWidgetItemV2, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidgetItemV2) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QWidgetItemV2_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QWidgetItemV2) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QWidgetItemV2_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetItemV2_ControlTypes +func miqt_exec_callback_QWidgetItemV2_ControlTypes(self *C.QWidgetItemV2, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidgetItemV2{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + } // Delete this object from C++ memory. func (this *QWidgetItemV2) Delete() { - C.QWidgetItemV2_Delete(this.h) + C.QWidgetItemV2_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlayoutitem.h b/qt6/gen_qlayoutitem.h index ceb32104..767410fe 100644 --- a/qt6/gen_qlayoutitem.h +++ b/qt6/gen_qlayoutitem.h @@ -53,12 +53,12 @@ QSpacerItem* QLayoutItem_SpacerItem(QLayoutItem* self); int QLayoutItem_Alignment(const QLayoutItem* self); void QLayoutItem_SetAlignment(QLayoutItem* self, int a); int QLayoutItem_ControlTypes(const QLayoutItem* self); -void QLayoutItem_Delete(QLayoutItem* self); +void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass); -QSpacerItem* QSpacerItem_new(int w, int h); -QSpacerItem* QSpacerItem_new2(QSpacerItem* param1); -QSpacerItem* QSpacerItem_new3(int w, int h, int hData); -QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData); +void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h); QSize* QSpacerItem_SizeHint(const QSpacerItem* self); QSize* QSpacerItem_MinimumSize(const QSpacerItem* self); @@ -71,9 +71,39 @@ QSpacerItem* QSpacerItem_SpacerItem(QSpacerItem* self); QSizePolicy* QSpacerItem_SizePolicy(const QSpacerItem* self); void QSpacerItem_ChangeSize3(QSpacerItem* self, int w, int h, int hData); void QSpacerItem_ChangeSize4(QSpacerItem* self, int w, int h, int hData, int vData); -void QSpacerItem_Delete(QSpacerItem* self); +void QSpacerItem_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSpacerItem_virtualbase_SizeHint(const void* self); +void QSpacerItem_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QSpacerItem_virtualbase_MinimumSize(const void* self); +void QSpacerItem_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QSpacerItem_virtualbase_MaximumSize(const void* self); +void QSpacerItem_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QSpacerItem_virtualbase_ExpandingDirections(const void* self); +void QSpacerItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QSpacerItem_virtualbase_IsEmpty(const void* self); +void QSpacerItem_override_virtual_SetGeometry(void* self, intptr_t slot); +void QSpacerItem_virtualbase_SetGeometry(void* self, QRect* geometry); +void QSpacerItem_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QSpacerItem_virtualbase_Geometry(const void* self); +void QSpacerItem_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QSpacerItem_virtualbase_SpacerItem(void* self); +void QSpacerItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSpacerItem_virtualbase_HasHeightForWidth(const void* self); +void QSpacerItem_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSpacerItem_virtualbase_HeightForWidth(const void* self, int param1); +void QSpacerItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QSpacerItem_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QSpacerItem_override_virtual_Invalidate(void* self, intptr_t slot); +void QSpacerItem_virtualbase_Invalidate(void* self); +void QSpacerItem_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QSpacerItem_virtualbase_Widget(const void* self); +void QSpacerItem_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QSpacerItem_virtualbase_Layout(void* self); +void QSpacerItem_override_virtual_ControlTypes(void* self, intptr_t slot); +int QSpacerItem_virtualbase_ControlTypes(const void* self); +void QSpacerItem_Delete(QSpacerItem* self, bool isSubclass); -QWidgetItem* QWidgetItem_new(QWidget* w); +void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); QSize* QWidgetItem_SizeHint(const QWidgetItem* self); QSize* QWidgetItem_MinimumSize(const QWidgetItem* self); QSize* QWidgetItem_MaximumSize(const QWidgetItem* self); @@ -86,14 +116,68 @@ bool QWidgetItem_HasHeightForWidth(const QWidgetItem* self); int QWidgetItem_HeightForWidth(const QWidgetItem* self, int param1); int QWidgetItem_MinimumHeightForWidth(const QWidgetItem* self, int param1); int QWidgetItem_ControlTypes(const QWidgetItem* self); -void QWidgetItem_Delete(QWidgetItem* self); +void QWidgetItem_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWidgetItem_virtualbase_SizeHint(const void* self); +void QWidgetItem_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QWidgetItem_virtualbase_MinimumSize(const void* self); +void QWidgetItem_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QWidgetItem_virtualbase_MaximumSize(const void* self); +void QWidgetItem_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QWidgetItem_virtualbase_ExpandingDirections(const void* self); +void QWidgetItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QWidgetItem_virtualbase_IsEmpty(const void* self); +void QWidgetItem_override_virtual_SetGeometry(void* self, intptr_t slot); +void QWidgetItem_virtualbase_SetGeometry(void* self, QRect* geometry); +void QWidgetItem_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QWidgetItem_virtualbase_Geometry(const void* self); +void QWidgetItem_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QWidgetItem_virtualbase_Widget(const void* self); +void QWidgetItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWidgetItem_virtualbase_HasHeightForWidth(const void* self); +void QWidgetItem_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWidgetItem_virtualbase_HeightForWidth(const void* self, int param1); +void QWidgetItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QWidgetItem_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QWidgetItem_override_virtual_ControlTypes(void* self, intptr_t slot); +int QWidgetItem_virtualbase_ControlTypes(const void* self); +void QWidgetItem_override_virtual_Invalidate(void* self, intptr_t slot); +void QWidgetItem_virtualbase_Invalidate(void* self); +void QWidgetItem_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QWidgetItem_virtualbase_Layout(void* self); +void QWidgetItem_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QWidgetItem_virtualbase_SpacerItem(void* self); +void QWidgetItem_Delete(QWidgetItem* self, bool isSubclass); -QWidgetItemV2* QWidgetItemV2_new(QWidget* widget); +void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self); QSize* QWidgetItemV2_MinimumSize(const QWidgetItemV2* self); QSize* QWidgetItemV2_MaximumSize(const QWidgetItemV2* self); int QWidgetItemV2_HeightForWidth(const QWidgetItemV2* self, int width); -void QWidgetItemV2_Delete(QWidgetItemV2* self); +void QWidgetItemV2_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWidgetItemV2_virtualbase_SizeHint(const void* self); +void QWidgetItemV2_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QWidgetItemV2_virtualbase_MinimumSize(const void* self); +void QWidgetItemV2_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QWidgetItemV2_virtualbase_MaximumSize(const void* self); +void QWidgetItemV2_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_HeightForWidth(const void* self, int width); +void QWidgetItemV2_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_ExpandingDirections(const void* self); +void QWidgetItemV2_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QWidgetItemV2_virtualbase_IsEmpty(const void* self); +void QWidgetItemV2_override_virtual_SetGeometry(void* self, intptr_t slot); +void QWidgetItemV2_virtualbase_SetGeometry(void* self, QRect* geometry); +void QWidgetItemV2_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QWidgetItemV2_virtualbase_Geometry(const void* self); +void QWidgetItemV2_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QWidgetItemV2_virtualbase_Widget(const void* self); +void QWidgetItemV2_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWidgetItemV2_virtualbase_HasHeightForWidth(const void* self); +void QWidgetItemV2_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QWidgetItemV2_override_virtual_ControlTypes(void* self, intptr_t slot); +int QWidgetItemV2_virtualbase_ControlTypes(const void* self); +void QWidgetItemV2_Delete(QWidgetItemV2* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlcdnumber.cpp b/qt6/gen_qlcdnumber.cpp index 75efd194..2c018396 100644 --- a/qt6/gen_qlcdnumber.cpp +++ b/qt6/gen_qlcdnumber.cpp @@ -1,28 +1,183 @@ +#include +#include #include #include +#include +#include +#include #include #include #include #include +#include #include #include #include "gen_qlcdnumber.h" #include "_cgo_export.h" -QLCDNumber* QLCDNumber_new(QWidget* parent) { - return new QLCDNumber(parent); +class MiqtVirtualQLCDNumber : public virtual QLCDNumber { +public: + + MiqtVirtualQLCDNumber(QWidget* parent): QLCDNumber(parent) {}; + MiqtVirtualQLCDNumber(): QLCDNumber() {}; + MiqtVirtualQLCDNumber(uint numDigits): QLCDNumber(numDigits) {}; + MiqtVirtualQLCDNumber(uint numDigits, QWidget* parent): QLCDNumber(numDigits, parent) {}; + + virtual ~MiqtVirtualQLCDNumber() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QLCDNumber::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLCDNumber_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QLCDNumber::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QLCDNumber::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QLCDNumber_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QLCDNumber::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QLCDNumber::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QLCDNumber_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QLCDNumber::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QLCDNumber::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QLCDNumber_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QLCDNumber::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QLCDNumber::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QLCDNumber_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QLCDNumber::initStyleOption(option); + + } + +}; + +void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(parent); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLCDNumber* QLCDNumber_new2() { - return new QLCDNumber(); +void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLCDNumber* QLCDNumber_new3(unsigned int numDigits) { - return new QLCDNumber(static_cast(numDigits)); +void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits)); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent) { - return new QLCDNumber(static_cast(numDigits), parent); +void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits), parent); + *outptr_QLCDNumber = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self) { @@ -132,7 +287,7 @@ void QLCDNumber_Overflow(QLCDNumber* self) { } void QLCDNumber_connect_Overflow(QLCDNumber* self, intptr_t slot) { - QLCDNumber::connect(self, static_cast(&QLCDNumber::overflow), self, [=]() { + MiqtVirtualQLCDNumber::connect(self, static_cast(&QLCDNumber::overflow), self, [=]() { miqt_exec_callback_QLCDNumber_Overflow(slot); }); } @@ -159,7 +314,51 @@ struct miqt_string QLCDNumber_Tr3(const char* s, const char* c, int n) { return _ms; } -void QLCDNumber_Delete(QLCDNumber* self) { - delete self; +void QLCDNumber_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__SizeHint = slot; +} + +QSize* QLCDNumber_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQLCDNumber*)(self) )->virtualbase_SizeHint(); +} + +void QLCDNumber_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__Event = slot; +} + +bool QLCDNumber_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQLCDNumber*)(self) )->virtualbase_Event(e); +} + +void QLCDNumber_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__PaintEvent = slot; +} + +void QLCDNumber_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQLCDNumber*)(self) )->virtualbase_PaintEvent(param1); +} + +void QLCDNumber_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__ChangeEvent = slot; +} + +void QLCDNumber_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQLCDNumber*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QLCDNumber_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QLCDNumber*)(self) )->handle__InitStyleOption = slot; +} + +void QLCDNumber_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQLCDNumber*)(self) )->virtualbase_InitStyleOption(option); +} + +void QLCDNumber_Delete(QLCDNumber* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlcdnumber.go b/qt6/gen_qlcdnumber.go index 46adee8d..00bc09c7 100644 --- a/qt6/gen_qlcdnumber.go +++ b/qt6/gen_qlcdnumber.go @@ -32,7 +32,8 @@ const ( ) type QLCDNumber struct { - h *C.QLCDNumber + h *C.QLCDNumber + isSubclass bool *QFrame } @@ -50,39 +51,79 @@ func (this *QLCDNumber) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLCDNumber(h *C.QLCDNumber) *QLCDNumber { +// newQLCDNumber constructs the type using only CGO pointers. +func newQLCDNumber(h *C.QLCDNumber, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLCDNumber { if h == nil { return nil } - return &QLCDNumber{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QLCDNumber{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQLCDNumber(h unsafe.Pointer) *QLCDNumber { - return newQLCDNumber((*C.QLCDNumber)(h)) +// UnsafeNewQLCDNumber constructs the type using only unsafe pointers. +func UnsafeNewQLCDNumber(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLCDNumber { + if h == nil { + return nil + } + + return &QLCDNumber{h: (*C.QLCDNumber)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQLCDNumber constructs a new QLCDNumber object. func NewQLCDNumber(parent *QWidget) *QLCDNumber { - ret := C.QLCDNumber_new(parent.cPointer()) - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new(parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLCDNumber2 constructs a new QLCDNumber object. func NewQLCDNumber2() *QLCDNumber { - ret := C.QLCDNumber_new2() - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new2(&outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLCDNumber3 constructs a new QLCDNumber object. func NewQLCDNumber3(numDigits uint) *QLCDNumber { - ret := C.QLCDNumber_new3((C.uint)(numDigits)) - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new3((C.uint)(numDigits), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLCDNumber4 constructs a new QLCDNumber object. func NewQLCDNumber4(numDigits uint, parent *QWidget) *QLCDNumber { - ret := C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer()) - return newQLCDNumber(ret) + var outptr_QLCDNumber *C.QLCDNumber = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QLCDNumber) MetaObject() *QMetaObject { @@ -230,9 +271,128 @@ func QLCDNumber_Tr3(s string, c string, n int) string { return _ret } +func (this *QLCDNumber) callVirtualBase_SizeHint() *QSize { + + _ret := C.QLCDNumber_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLCDNumber) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QLCDNumber_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_SizeHint +func miqt_exec_callback_QLCDNumber_SizeHint(self *C.QLCDNumber, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLCDNumber{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLCDNumber) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QLCDNumber_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QLCDNumber) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QLCDNumber_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_Event +func miqt_exec_callback_QLCDNumber_Event(self *C.QLCDNumber, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QLCDNumber{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLCDNumber) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QLCDNumber_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLCDNumber) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QLCDNumber_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_PaintEvent +func miqt_exec_callback_QLCDNumber_PaintEvent(self *C.QLCDNumber, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLCDNumber{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QLCDNumber) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QLCDNumber_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLCDNumber) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QLCDNumber_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_ChangeEvent +func miqt_exec_callback_QLCDNumber_ChangeEvent(self *C.QLCDNumber, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QLCDNumber{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QLCDNumber) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QLCDNumber_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QLCDNumber) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QLCDNumber_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLCDNumber_InitStyleOption +func miqt_exec_callback_QLCDNumber_InitStyleOption(self *C.QLCDNumber, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QLCDNumber{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QLCDNumber) Delete() { - C.QLCDNumber_Delete(this.h) + C.QLCDNumber_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlcdnumber.h b/qt6/gen_qlcdnumber.h index 8a7aa75d..46728374 100644 --- a/qt6/gen_qlcdnumber.h +++ b/qt6/gen_qlcdnumber.h @@ -15,21 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QFrame; class QLCDNumber; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; class QSize; +class QStyleOptionFrame; class QWidget; #else +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QLCDNumber QLCDNumber; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QWidget QWidget; #endif -QLCDNumber* QLCDNumber_new(QWidget* parent); -QLCDNumber* QLCDNumber_new2(); -QLCDNumber* QLCDNumber_new3(unsigned int numDigits); -QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent); +void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self); void* QLCDNumber_Metacast(QLCDNumber* self, const char* param1); struct miqt_string QLCDNumber_Tr(const char* s); @@ -55,9 +67,21 @@ void QLCDNumber_SetBinMode(QLCDNumber* self); void QLCDNumber_SetSmallDecimalPoint(QLCDNumber* self, bool smallDecimalPoint); void QLCDNumber_Overflow(QLCDNumber* self); void QLCDNumber_connect_Overflow(QLCDNumber* self, intptr_t slot); +bool QLCDNumber_Event(QLCDNumber* self, QEvent* e); +void QLCDNumber_PaintEvent(QLCDNumber* self, QPaintEvent* param1); struct miqt_string QLCDNumber_Tr2(const char* s, const char* c); struct miqt_string QLCDNumber_Tr3(const char* s, const char* c, int n); -void QLCDNumber_Delete(QLCDNumber* self); +void QLCDNumber_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLCDNumber_virtualbase_SizeHint(const void* self); +void QLCDNumber_override_virtual_Event(void* self, intptr_t slot); +bool QLCDNumber_virtualbase_Event(void* self, QEvent* e); +void QLCDNumber_override_virtual_PaintEvent(void* self, intptr_t slot); +void QLCDNumber_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QLCDNumber_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QLCDNumber_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QLCDNumber_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QLCDNumber_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QLCDNumber_Delete(QLCDNumber* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlibrary.cpp b/qt6/gen_qlibrary.cpp index 5fec6491..c5e6a944 100644 --- a/qt6/gen_qlibrary.cpp +++ b/qt6/gen_qlibrary.cpp @@ -1,51 +1,258 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qlibrary.h" #include "_cgo_export.h" -QLibrary* QLibrary_new() { - return new QLibrary(); +class MiqtVirtualQLibrary : public virtual QLibrary { +public: + + MiqtVirtualQLibrary(): QLibrary() {}; + MiqtVirtualQLibrary(const QString& fileName): QLibrary(fileName) {}; + MiqtVirtualQLibrary(const QString& fileName, int verNum): QLibrary(fileName, verNum) {}; + MiqtVirtualQLibrary(const QString& fileName, const QString& version): QLibrary(fileName, version) {}; + MiqtVirtualQLibrary(QObject* parent): QLibrary(parent) {}; + MiqtVirtualQLibrary(const QString& fileName, QObject* parent): QLibrary(fileName, parent) {}; + MiqtVirtualQLibrary(const QString& fileName, int verNum, QObject* parent): QLibrary(fileName, verNum, parent) {}; + MiqtVirtualQLibrary(const QString& fileName, const QString& version, QObject* parent): QLibrary(fileName, version, parent) {}; + + virtual ~MiqtVirtualQLibrary() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QLibrary::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QLibrary_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QLibrary::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QLibrary::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QLibrary_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QLibrary::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QLibrary::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QLibrary_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QLibrary::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QLibrary::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QLibrary_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QLibrary::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QLibrary::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLibrary_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QLibrary::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QLibrary::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLibrary_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QLibrary::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QLibrary::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLibrary_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QLibrary::disconnectNotify(*signal); + + } + +}; + +void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject) { + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new2(struct miqt_string fileName) { +void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum) { +void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString, static_cast(verNum)); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum)); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version) { +void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - return new QLibrary(fileName_QString, version_QString); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new5(QObject* parent) { - return new QLibrary(parent); +void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent) { +void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString, parent); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent) { +void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLibrary(fileName_QString, static_cast(verNum), parent); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum), parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } -QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent) { +void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - return new QLibrary(fileName_QString, version_QString, parent); + MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString, parent); + *outptr_QLibrary = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QLibrary_MetaObject(const QLibrary* self) { @@ -153,7 +360,67 @@ struct miqt_string QLibrary_Tr3(const char* s, const char* c, int n) { return _ms; } -void QLibrary_Delete(QLibrary* self) { - delete self; +void QLibrary_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__Event = slot; +} + +bool QLibrary_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQLibrary*)(self) )->virtualbase_Event(event); +} + +void QLibrary_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__EventFilter = slot; +} + +bool QLibrary_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQLibrary*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QLibrary_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__TimerEvent = slot; +} + +void QLibrary_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_TimerEvent(event); +} + +void QLibrary_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__ChildEvent = slot; +} + +void QLibrary_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_ChildEvent(event); +} + +void QLibrary_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__CustomEvent = slot; +} + +void QLibrary_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_CustomEvent(event); +} + +void QLibrary_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__ConnectNotify = slot; +} + +void QLibrary_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QLibrary_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLibrary*)(self) )->handle__DisconnectNotify = slot; +} + +void QLibrary_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLibrary*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QLibrary_Delete(QLibrary* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlibrary.go b/qt6/gen_qlibrary.go index 1fb59e94..be4c47e1 100644 --- a/qt6/gen_qlibrary.go +++ b/qt6/gen_qlibrary.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -24,7 +25,8 @@ const ( ) type QLibrary struct { - h *C.QLibrary + h *C.QLibrary + isSubclass bool *QObject } @@ -42,21 +44,34 @@ func (this *QLibrary) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLibrary(h *C.QLibrary) *QLibrary { +// newQLibrary constructs the type using only CGO pointers. +func newQLibrary(h *C.QLibrary, h_QObject *C.QObject) *QLibrary { if h == nil { return nil } - return &QLibrary{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QLibrary{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQLibrary(h unsafe.Pointer) *QLibrary { - return newQLibrary((*C.QLibrary)(h)) +// UnsafeNewQLibrary constructs the type using only unsafe pointers. +func UnsafeNewQLibrary(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLibrary { + if h == nil { + return nil + } + + return &QLibrary{h: (*C.QLibrary)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQLibrary constructs a new QLibrary object. func NewQLibrary() *QLibrary { - ret := C.QLibrary_new() - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new(&outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary2 constructs a new QLibrary object. @@ -65,8 +80,13 @@ func NewQLibrary2(fileName string) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new2(fileName_ms) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new2(fileName_ms, &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary3 constructs a new QLibrary object. @@ -75,8 +95,13 @@ func NewQLibrary3(fileName string, verNum int) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new3(fileName_ms, (C.int)(verNum)) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new3(fileName_ms, (C.int)(verNum), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary4 constructs a new QLibrary object. @@ -89,14 +114,24 @@ func NewQLibrary4(fileName string, version string) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - ret := C.QLibrary_new4(fileName_ms, version_ms) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new4(fileName_ms, version_ms, &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary5 constructs a new QLibrary object. func NewQLibrary5(parent *QObject) *QLibrary { - ret := C.QLibrary_new5(parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new5(parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary6 constructs a new QLibrary object. @@ -105,8 +140,13 @@ func NewQLibrary6(fileName string, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new6(fileName_ms, parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new6(fileName_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary7 constructs a new QLibrary object. @@ -115,8 +155,13 @@ func NewQLibrary7(fileName string, verNum int, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLibrary8 constructs a new QLibrary object. @@ -129,8 +174,13 @@ func NewQLibrary8(fileName string, version string, parent *QObject) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - ret := C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer()) - return newQLibrary(ret) + var outptr_QLibrary *C.QLibrary = nil + var outptr_QObject *C.QObject = nil + + C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) + ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QLibrary) MetaObject() *QMetaObject { @@ -244,9 +294,175 @@ func QLibrary_Tr3(s string, c string, n int) string { return _ret } +func (this *QLibrary) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QLibrary_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QLibrary) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QLibrary_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_Event +func miqt_exec_callback_QLibrary_Event(self *C.QLibrary, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLibrary{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLibrary) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QLibrary_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QLibrary) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QLibrary_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_EventFilter +func miqt_exec_callback_QLibrary_EventFilter(self *C.QLibrary, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLibrary{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QLibrary) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QLibrary_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLibrary) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QLibrary_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_TimerEvent +func miqt_exec_callback_QLibrary_TimerEvent(self *C.QLibrary, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QLibrary{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLibrary) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QLibrary_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLibrary) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QLibrary_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_ChildEvent +func miqt_exec_callback_QLibrary_ChildEvent(self *C.QLibrary, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QLibrary{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QLibrary) callVirtualBase_CustomEvent(event *QEvent) { + + C.QLibrary_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLibrary) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLibrary_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_CustomEvent +func miqt_exec_callback_QLibrary_CustomEvent(self *C.QLibrary, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLibrary{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QLibrary) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QLibrary_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLibrary) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLibrary_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_ConnectNotify +func miqt_exec_callback_QLibrary_ConnectNotify(self *C.QLibrary, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLibrary{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QLibrary) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QLibrary_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLibrary) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLibrary_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLibrary_DisconnectNotify +func miqt_exec_callback_QLibrary_DisconnectNotify(self *C.QLibrary, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLibrary{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QLibrary) Delete() { - C.QLibrary_Delete(this.h) + C.QLibrary_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlibrary.h b/qt6/gen_qlibrary.h index e10a54e9..1ac03e14 100644 --- a/qt6/gen_qlibrary.h +++ b/qt6/gen_qlibrary.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QLibrary; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLibrary QLibrary; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QLibrary* QLibrary_new(); -QLibrary* QLibrary_new2(struct miqt_string fileName); -QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum); -QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version); -QLibrary* QLibrary_new5(QObject* parent); -QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent); -QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent); -QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent); +void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); QMetaObject* QLibrary_MetaObject(const QLibrary* self); void* QLibrary_Metacast(QLibrary* self, const char* param1); struct miqt_string QLibrary_Tr(const char* s); @@ -48,7 +56,21 @@ void QLibrary_SetLoadHints(QLibrary* self, int hints); int QLibrary_LoadHints(const QLibrary* self); struct miqt_string QLibrary_Tr2(const char* s, const char* c); struct miqt_string QLibrary_Tr3(const char* s, const char* c, int n); -void QLibrary_Delete(QLibrary* self); +void QLibrary_override_virtual_Event(void* self, intptr_t slot); +bool QLibrary_virtualbase_Event(void* self, QEvent* event); +void QLibrary_override_virtual_EventFilter(void* self, intptr_t slot); +bool QLibrary_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QLibrary_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLibrary_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QLibrary_override_virtual_ChildEvent(void* self, intptr_t slot); +void QLibrary_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QLibrary_override_virtual_CustomEvent(void* self, intptr_t slot); +void QLibrary_virtualbase_CustomEvent(void* self, QEvent* event); +void QLibrary_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QLibrary_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QLibrary_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QLibrary_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QLibrary_Delete(QLibrary* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlibraryinfo.cpp b/qt6/gen_qlibraryinfo.cpp index d936c027..b0a0f9c5 100644 --- a/qt6/gen_qlibraryinfo.cpp +++ b/qt6/gen_qlibraryinfo.cpp @@ -63,7 +63,11 @@ struct miqt_array /* of struct miqt_string */ QLibraryInfo_PlatformPluginArgume return _out; } -void QLibraryInfo_Delete(QLibraryInfo* self) { - delete self; +void QLibraryInfo_Delete(QLibraryInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlibraryinfo.go b/qt6/gen_qlibraryinfo.go index ee0f3e48..3abec676 100644 --- a/qt6/gen_qlibraryinfo.go +++ b/qt6/gen_qlibraryinfo.go @@ -34,7 +34,8 @@ const ( ) type QLibraryInfo struct { - h *C.QLibraryInfo + h *C.QLibraryInfo + isSubclass bool } func (this *QLibraryInfo) cPointer() *C.QLibraryInfo { @@ -51,6 +52,7 @@ func (this *QLibraryInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLibraryInfo constructs the type using only CGO pointers. func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo { if h == nil { return nil @@ -58,8 +60,13 @@ func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo { return &QLibraryInfo{h: h} } +// UnsafeNewQLibraryInfo constructs the type using only unsafe pointers. func UnsafeNewQLibraryInfo(h unsafe.Pointer) *QLibraryInfo { - return newQLibraryInfo((*C.QLibraryInfo)(h)) + if h == nil { + return nil + } + + return &QLibraryInfo{h: (*C.QLibraryInfo)(h)} } func QLibraryInfo_Build() string { @@ -111,7 +118,7 @@ func QLibraryInfo_PlatformPluginArguments(platformName string) []string { // Delete this object from C++ memory. func (this *QLibraryInfo) Delete() { - C.QLibraryInfo_Delete(this.h) + C.QLibraryInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlibraryinfo.h b/qt6/gen_qlibraryinfo.h index 3d18aaa7..32b82960 100644 --- a/qt6/gen_qlibraryinfo.h +++ b/qt6/gen_qlibraryinfo.h @@ -28,7 +28,7 @@ QVersionNumber* QLibraryInfo_Version(); struct miqt_string QLibraryInfo_Path(int p); struct miqt_string QLibraryInfo_Location(int location); struct miqt_array /* of struct miqt_string */ QLibraryInfo_PlatformPluginArguments(struct miqt_string platformName); -void QLibraryInfo_Delete(QLibraryInfo* self); +void QLibraryInfo_Delete(QLibraryInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qline.cpp b/qt6/gen_qline.cpp index f24c4389..10cb636a 100644 --- a/qt6/gen_qline.cpp +++ b/qt6/gen_qline.cpp @@ -6,20 +6,24 @@ #include "gen_qline.h" #include "_cgo_export.h" -QLine* QLine_new() { - return new QLine(); +void QLine_new(QLine** outptr_QLine) { + QLine* ret = new QLine(); + *outptr_QLine = ret; } -QLine* QLine_new2(QPoint* pt1, QPoint* pt2) { - return new QLine(*pt1, *pt2); +void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine) { + QLine* ret = new QLine(*pt1, *pt2); + *outptr_QLine = ret; } -QLine* QLine_new3(int x1, int y1, int x2, int y2) { - return new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine) { + QLine* ret = new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); + *outptr_QLine = ret; } -QLine* QLine_new4(QLine* param1) { - return new QLine(*param1); +void QLine_new4(QLine* param1, QLine** outptr_QLine) { + QLine* ret = new QLine(*param1); + *outptr_QLine = ret; } bool QLine_IsNull(const QLine* self) { @@ -106,28 +110,37 @@ QLineF* QLine_ToLineF(const QLine* self) { return new QLineF(self->toLineF()); } -void QLine_Delete(QLine* self) { - delete self; +void QLine_Delete(QLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QLineF* QLineF_new() { - return new QLineF(); +void QLineF_new(QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(); + *outptr_QLineF = ret; } -QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2) { - return new QLineF(*pt1, *pt2); +void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(*pt1, *pt2); + *outptr_QLineF = ret; } -QLineF* QLineF_new3(double x1, double y1, double x2, double y2) { - return new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); +void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); + *outptr_QLineF = ret; } -QLineF* QLineF_new4(QLine* line) { - return new QLineF(*line); +void QLineF_new4(QLine* line, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(*line); + *outptr_QLineF = ret; } -QLineF* QLineF_new5(QLineF* param1) { - return new QLineF(*param1); +void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF) { + QLineF* ret = new QLineF(*param1); + *outptr_QLineF = ret; } QLineF* QLineF_FromPolar(double length, double angle) { @@ -269,7 +282,11 @@ int QLineF_Intersects2(const QLineF* self, QLineF* l, QPointF* intersectionPoint return static_cast(_ret); } -void QLineF_Delete(QLineF* self) { - delete self; +void QLineF_Delete(QLineF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qline.go b/qt6/gen_qline.go index fa9d84a8..1aa9c5dc 100644 --- a/qt6/gen_qline.go +++ b/qt6/gen_qline.go @@ -22,7 +22,8 @@ const ( ) type QLine struct { - h *C.QLine + h *C.QLine + isSubclass bool } func (this *QLine) cPointer() *C.QLine { @@ -39,6 +40,7 @@ func (this *QLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLine constructs the type using only CGO pointers. func newQLine(h *C.QLine) *QLine { if h == nil { return nil @@ -46,32 +48,53 @@ func newQLine(h *C.QLine) *QLine { return &QLine{h: h} } +// UnsafeNewQLine constructs the type using only unsafe pointers. func UnsafeNewQLine(h unsafe.Pointer) *QLine { - return newQLine((*C.QLine)(h)) + if h == nil { + return nil + } + + return &QLine{h: (*C.QLine)(h)} } // NewQLine constructs a new QLine object. func NewQLine() *QLine { - ret := C.QLine_new() - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new(&outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } // NewQLine2 constructs a new QLine object. func NewQLine2(pt1 *QPoint, pt2 *QPoint) *QLine { - ret := C.QLine_new2(pt1.cPointer(), pt2.cPointer()) - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } // NewQLine3 constructs a new QLine object. func NewQLine3(x1 int, y1 int, x2 int, y2 int) *QLine { - ret := C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2)) - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2), &outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } // NewQLine4 constructs a new QLine object. func NewQLine4(param1 *QLine) *QLine { - ret := C.QLine_new4(param1.cPointer()) - return newQLine(ret) + var outptr_QLine *C.QLine = nil + + C.QLine_new4(param1.cPointer(), &outptr_QLine) + ret := newQLine(outptr_QLine) + ret.isSubclass = true + return ret } func (this *QLine) IsNull() bool { @@ -178,7 +201,7 @@ func (this *QLine) ToLineF() *QLineF { // Delete this object from C++ memory. func (this *QLine) Delete() { - C.QLine_Delete(this.h) + C.QLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -191,7 +214,8 @@ func (this *QLine) GoGC() { } type QLineF struct { - h *C.QLineF + h *C.QLineF + isSubclass bool } func (this *QLineF) cPointer() *C.QLineF { @@ -208,6 +232,7 @@ func (this *QLineF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLineF constructs the type using only CGO pointers. func newQLineF(h *C.QLineF) *QLineF { if h == nil { return nil @@ -215,38 +240,63 @@ func newQLineF(h *C.QLineF) *QLineF { return &QLineF{h: h} } +// UnsafeNewQLineF constructs the type using only unsafe pointers. func UnsafeNewQLineF(h unsafe.Pointer) *QLineF { - return newQLineF((*C.QLineF)(h)) + if h == nil { + return nil + } + + return &QLineF{h: (*C.QLineF)(h)} } // NewQLineF constructs a new QLineF object. func NewQLineF() *QLineF { - ret := C.QLineF_new() - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new(&outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF2 constructs a new QLineF object. func NewQLineF2(pt1 *QPointF, pt2 *QPointF) *QLineF { - ret := C.QLineF_new2(pt1.cPointer(), pt2.cPointer()) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF3 constructs a new QLineF object. func NewQLineF3(x1 float64, y1 float64, x2 float64, y2 float64) *QLineF { - ret := C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF4 constructs a new QLineF object. func NewQLineF4(line *QLine) *QLineF { - ret := C.QLineF_new4(line.cPointer()) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new4(line.cPointer(), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } // NewQLineF5 constructs a new QLineF object. func NewQLineF5(param1 *QLineF) *QLineF { - ret := C.QLineF_new5(param1.cPointer()) - return newQLineF(ret) + var outptr_QLineF *C.QLineF = nil + + C.QLineF_new5(param1.cPointer(), &outptr_QLineF) + ret := newQLineF(outptr_QLineF) + ret.isSubclass = true + return ret } func QLineF_FromPolar(length float64, angle float64) *QLineF { @@ -409,7 +459,7 @@ func (this *QLineF) Intersects2(l *QLineF, intersectionPoint *QPointF) QLineF__I // Delete this object from C++ memory. func (this *QLineF) Delete() { - C.QLineF_Delete(this.h) + C.QLineF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qline.h b/qt6/gen_qline.h index eacc0732..67e7f1d2 100644 --- a/qt6/gen_qline.h +++ b/qt6/gen_qline.h @@ -26,10 +26,10 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -QLine* QLine_new(); -QLine* QLine_new2(QPoint* pt1, QPoint* pt2); -QLine* QLine_new3(int x1, int y1, int x2, int y2); -QLine* QLine_new4(QLine* param1); +void QLine_new(QLine** outptr_QLine); +void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine); +void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine); +void QLine_new4(QLine* param1, QLine** outptr_QLine); bool QLine_IsNull(const QLine* self); QPoint* QLine_P1(const QLine* self); QPoint* QLine_P2(const QLine* self); @@ -51,13 +51,13 @@ void QLine_SetLine(QLine* self, int x1, int y1, int x2, int y2); bool QLine_OperatorEqual(const QLine* self, QLine* d); bool QLine_OperatorNotEqual(const QLine* self, QLine* d); QLineF* QLine_ToLineF(const QLine* self); -void QLine_Delete(QLine* self); +void QLine_Delete(QLine* self, bool isSubclass); -QLineF* QLineF_new(); -QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2); -QLineF* QLineF_new3(double x1, double y1, double x2, double y2); -QLineF* QLineF_new4(QLine* line); -QLineF* QLineF_new5(QLineF* param1); +void QLineF_new(QLineF** outptr_QLineF); +void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF); +void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF); +void QLineF_new4(QLine* line, QLineF** outptr_QLineF); +void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF); QLineF* QLineF_FromPolar(double length, double angle); bool QLineF_IsNull(const QLineF* self); QPointF* QLineF_P1(const QLineF* self); @@ -90,7 +90,7 @@ bool QLineF_OperatorEqual(const QLineF* self, QLineF* d); bool QLineF_OperatorNotEqual(const QLineF* self, QLineF* d); QLine* QLineF_ToLine(const QLineF* self); int QLineF_Intersects2(const QLineF* self, QLineF* l, QPointF* intersectionPoint); -void QLineF_Delete(QLineF* self); +void QLineF_Delete(QLineF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlineedit.cpp b/qt6/gen_qlineedit.cpp index b248a60a..fe341ff8 100644 --- a/qt6/gen_qlineedit.cpp +++ b/qt6/gen_qlineedit.cpp @@ -1,40 +1,1117 @@ #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include #include #include #include +#include #include #include #include "gen_qlineedit.h" #include "_cgo_export.h" -QLineEdit* QLineEdit_new(QWidget* parent) { - return new QLineEdit(parent); +class MiqtVirtualQLineEdit : public virtual QLineEdit { +public: + + MiqtVirtualQLineEdit(QWidget* parent): QLineEdit(parent) {}; + MiqtVirtualQLineEdit(): QLineEdit() {}; + MiqtVirtualQLineEdit(const QString& param1): QLineEdit(param1) {}; + MiqtVirtualQLineEdit(const QString& param1, QWidget* parent): QLineEdit(param1, parent) {}; + + virtual ~MiqtVirtualQLineEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QLineEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLineEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QLineEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QLineEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLineEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QLineEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QLineEdit::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QLineEdit::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QLineEdit::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QLineEdit::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QLineEdit::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QLineEdit::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QLineEdit::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QLineEdit::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QLineEdit::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QLineEdit::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QLineEdit::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QLineEdit::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QLineEdit::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QLineEdit::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QLineEdit::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QLineEdit::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QLineEdit::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QLineEdit::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QLineEdit::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QLineEdit::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QLineEdit::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QLineEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QLineEdit::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QLineEdit::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QLineEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QLineEdit::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QLineEdit::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QLineEdit::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QLineEdit::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QLineEdit::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QLineEdit::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QLineEdit::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QLineEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QLineEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QLineEdit::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QLineEdit_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QLineEdit::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QLineEdit::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QLineEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QLineEdit::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QLineEdit::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QLineEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QLineEdit::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QLineEdit::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QLineEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QLineEdit::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QLineEdit::devType(); + } + + + int callback_return_value = miqt_exec_callback_QLineEdit_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QLineEdit::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QLineEdit::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QLineEdit_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QLineEdit::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QLineEdit::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLineEdit_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QLineEdit::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QLineEdit::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QLineEdit_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QLineEdit::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QLineEdit::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QLineEdit_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QLineEdit::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QLineEdit::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QLineEdit::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QLineEdit::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QLineEdit::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QLineEdit::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QLineEdit::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QLineEdit::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QLineEdit::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QLineEdit::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QLineEdit::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QLineEdit::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QLineEdit::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QLineEdit::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QLineEdit::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QLineEdit::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QLineEdit::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QLineEdit::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QLineEdit::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QLineEdit::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QLineEdit_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QLineEdit::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QLineEdit::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QLineEdit_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QLineEdit::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QLineEdit::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QLineEdit_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QLineEdit::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QLineEdit::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QLineEdit_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QLineEdit::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QLineEdit::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QLineEdit_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QLineEdit::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QLineEdit::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QLineEdit_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QLineEdit::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QLineEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QLineEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QLineEdit::focusNextPrevChild(next); + + } + +}; + +void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(parent); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLineEdit* QLineEdit_new2() { - return new QLineEdit(); +void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLineEdit* QLineEdit_new3(struct miqt_string param1) { +void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - return new QLineEdit(param1_QString); + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent) { +void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - return new QLineEdit(param1_QString, parent); + MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString, parent); + *outptr_QLineEdit = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QLineEdit_MetaObject(const QLineEdit* self) { @@ -368,7 +1445,7 @@ void QLineEdit_TextChanged(QLineEdit* self, struct miqt_string param1) { } void QLineEdit_connect_TextChanged(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::textChanged), self, [=](const QString& param1) { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::textChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -387,7 +1464,7 @@ void QLineEdit_TextEdited(QLineEdit* self, struct miqt_string param1) { } void QLineEdit_connect_TextEdited(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::textEdited), self, [=](const QString& param1) { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::textEdited), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -405,7 +1482,7 @@ void QLineEdit_CursorPositionChanged(QLineEdit* self, int param1, int param2) { } void QLineEdit_connect_CursorPositionChanged(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::cursorPositionChanged), self, [=](int param1, int param2) { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::cursorPositionChanged), self, [=](int param1, int param2) { int sigval1 = param1; int sigval2 = param2; miqt_exec_callback_QLineEdit_CursorPositionChanged(slot, sigval1, sigval2); @@ -417,7 +1494,7 @@ void QLineEdit_ReturnPressed(QLineEdit* self) { } void QLineEdit_connect_ReturnPressed(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::returnPressed), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::returnPressed), self, [=]() { miqt_exec_callback_QLineEdit_ReturnPressed(slot); }); } @@ -427,7 +1504,7 @@ void QLineEdit_EditingFinished(QLineEdit* self) { } void QLineEdit_connect_EditingFinished(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::editingFinished), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::editingFinished), self, [=]() { miqt_exec_callback_QLineEdit_EditingFinished(slot); }); } @@ -437,7 +1514,7 @@ void QLineEdit_SelectionChanged(QLineEdit* self) { } void QLineEdit_connect_SelectionChanged(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::selectionChanged), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::selectionChanged), self, [=]() { miqt_exec_callback_QLineEdit_SelectionChanged(slot); }); } @@ -447,7 +1524,7 @@ void QLineEdit_InputRejected(QLineEdit* self) { } void QLineEdit_connect_InputRejected(QLineEdit* self, intptr_t slot) { - QLineEdit::connect(self, static_cast(&QLineEdit::inputRejected), self, [=]() { + MiqtVirtualQLineEdit::connect(self, static_cast(&QLineEdit::inputRejected), self, [=]() { miqt_exec_callback_QLineEdit_InputRejected(slot); }); } @@ -498,7 +1575,355 @@ void QLineEdit_CursorBackward2(QLineEdit* self, bool mark, int steps) { self->cursorBackward(mark, static_cast(steps)); } -void QLineEdit_Delete(QLineEdit* self) { - delete self; +void QLineEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QLineEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_SizeHint(); +} + +void QLineEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QLineEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QLineEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QLineEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QLineEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QLineEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QLineEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QLineEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QLineEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QLineEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QLineEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QLineEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QLineEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QLineEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QLineEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QLineEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QLineEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QLineEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QLineEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__PaintEvent = slot; +} + +void QLineEdit_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_PaintEvent(param1); +} + +void QLineEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QLineEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QLineEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QLineEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QLineEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QLineEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QLineEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DropEvent = slot; +} + +void QLineEdit_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_DropEvent(param1); +} + +void QLineEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QLineEdit_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QLineEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QLineEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QLineEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void QLineEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QLineEdit_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InitStyleOption = slot; +} + +void QLineEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_InitStyleOption(option); +} + +void QLineEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QLineEdit_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QLineEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__TimerEvent = slot; +} + +void QLineEdit_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_TimerEvent(param1); +} + +void QLineEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__Event = slot; +} + +bool QLineEdit_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_Event(param1); +} + +void QLineEdit_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__DevType = slot; +} + +int QLineEdit_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_DevType(); +} + +void QLineEdit_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__SetVisible = slot; +} + +void QLineEdit_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_SetVisible(visible); +} + +void QLineEdit_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__HeightForWidth = slot; +} + +int QLineEdit_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLineEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QLineEdit_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QLineEdit_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QLineEdit_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_PaintEngine(); +} + +void QLineEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__WheelEvent = slot; +} + +void QLineEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_WheelEvent(event); +} + +void QLineEdit_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__EnterEvent = slot; +} + +void QLineEdit_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_EnterEvent(event); +} + +void QLineEdit_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__LeaveEvent = slot; +} + +void QLineEdit_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_LeaveEvent(event); +} + +void QLineEdit_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__MoveEvent = slot; +} + +void QLineEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_MoveEvent(event); +} + +void QLineEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QLineEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ResizeEvent(event); +} + +void QLineEdit_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__CloseEvent = slot; +} + +void QLineEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_CloseEvent(event); +} + +void QLineEdit_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__TabletEvent = slot; +} + +void QLineEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_TabletEvent(event); +} + +void QLineEdit_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ActionEvent = slot; +} + +void QLineEdit_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ActionEvent(event); +} + +void QLineEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__ShowEvent = slot; +} + +void QLineEdit_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_ShowEvent(event); +} + +void QLineEdit_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__HideEvent = slot; +} + +void QLineEdit_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_HideEvent(event); +} + +void QLineEdit_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__NativeEvent = slot; +} + +bool QLineEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QLineEdit_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__Metric = slot; +} + +int QLineEdit_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_Metric(param1); +} + +void QLineEdit_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__InitPainter = slot; +} + +void QLineEdit_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_InitPainter(painter); +} + +void QLineEdit_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QLineEdit_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_Redirected(offset); +} + +void QLineEdit_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QLineEdit_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQLineEdit*)(self) )->virtualbase_SharedPainter(); +} + +void QLineEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QLineEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QLineEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQLineEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QLineEdit_Delete(QLineEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlineedit.go b/qt6/gen_qlineedit.go index d098f022..a1c778d3 100644 --- a/qt6/gen_qlineedit.go +++ b/qt6/gen_qlineedit.go @@ -31,7 +31,8 @@ const ( ) type QLineEdit struct { - h *C.QLineEdit + h *C.QLineEdit + isSubclass bool *QWidget } @@ -49,27 +50,49 @@ func (this *QLineEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLineEdit(h *C.QLineEdit) *QLineEdit { +// newQLineEdit constructs the type using only CGO pointers. +func newQLineEdit(h *C.QLineEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLineEdit { if h == nil { return nil } - return &QLineEdit{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QLineEdit{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQLineEdit(h unsafe.Pointer) *QLineEdit { - return newQLineEdit((*C.QLineEdit)(h)) +// UnsafeNewQLineEdit constructs the type using only unsafe pointers. +func UnsafeNewQLineEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLineEdit { + if h == nil { + return nil + } + + return &QLineEdit{h: (*C.QLineEdit)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQLineEdit constructs a new QLineEdit object. func NewQLineEdit(parent *QWidget) *QLineEdit { - ret := C.QLineEdit_new(parent.cPointer()) - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new(parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLineEdit2 constructs a new QLineEdit object. func NewQLineEdit2() *QLineEdit { - ret := C.QLineEdit_new2() - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new2(&outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLineEdit3 constructs a new QLineEdit object. @@ -78,8 +101,15 @@ func NewQLineEdit3(param1 string) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - ret := C.QLineEdit_new3(param1_ms) - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new3(param1_ms, &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQLineEdit4 constructs a new QLineEdit object. @@ -88,8 +118,15 @@ func NewQLineEdit4(param1 string, parent *QWidget) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - ret := C.QLineEdit_new4(param1_ms, parent.cPointer()) - return newQLineEdit(ret) + var outptr_QLineEdit *C.QLineEdit = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QLineEdit_new4(param1_ms, parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QLineEdit) MetaObject() *QMetaObject { @@ -185,7 +222,7 @@ func (this *QLineEdit) SetValidator(validator *QValidator) { } func (this *QLineEdit) Validator() *QValidator { - return UnsafeNewQValidator(unsafe.Pointer(C.QLineEdit_Validator(this.h))) + return UnsafeNewQValidator(unsafe.Pointer(C.QLineEdit_Validator(this.h)), nil) } func (this *QLineEdit) SetCompleter(completer *QCompleter) { @@ -193,7 +230,7 @@ func (this *QLineEdit) SetCompleter(completer *QCompleter) { } func (this *QLineEdit) Completer() *QCompleter { - return UnsafeNewQCompleter(unsafe.Pointer(C.QLineEdit_Completer(this.h))) + return UnsafeNewQCompleter(unsafe.Pointer(C.QLineEdit_Completer(this.h)), nil) } func (this *QLineEdit) SizeHint() *QSize { @@ -360,7 +397,7 @@ func (this *QLineEdit) AddAction(action *QAction, position QLineEdit__ActionPosi } func (this *QLineEdit) AddAction2(icon *QIcon, position QLineEdit__ActionPosition) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position)))) + return UnsafeNewQAction(unsafe.Pointer(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position))), nil) } func (this *QLineEdit) SetText(text string) { @@ -412,7 +449,7 @@ func (this *QLineEdit) Insert(param1 string) { } func (this *QLineEdit) CreateStandardContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QLineEdit_CreateStandardContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QLineEdit_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QLineEdit) TextChanged(param1 string) { @@ -611,9 +648,1021 @@ func (this *QLineEdit) CursorBackward2(mark bool, steps int) { C.QLineEdit_CursorBackward2(this.h, (C.bool)(mark), (C.int)(steps)) } +func (this *QLineEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QLineEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLineEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QLineEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_SizeHint +func miqt_exec_callback_QLineEdit_SizeHint(self *C.QLineEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QLineEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLineEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QLineEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MinimumSizeHint +func miqt_exec_callback_QLineEdit_MinimumSizeHint(self *C.QLineEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MousePressEvent +func miqt_exec_callback_QLineEdit_MousePressEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MouseMoveEvent +func miqt_exec_callback_QLineEdit_MouseMoveEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MouseReleaseEvent +func miqt_exec_callback_QLineEdit_MouseReleaseEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QLineEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QLineEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MouseDoubleClickEvent +func miqt_exec_callback_QLineEdit_MouseDoubleClickEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QLineEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QLineEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_KeyPressEvent +func miqt_exec_callback_QLineEdit_KeyPressEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_KeyReleaseEvent(param1 *QKeyEvent) { + + C.QLineEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnKeyReleaseEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QLineEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_KeyReleaseEvent +func miqt_exec_callback_QLineEdit_KeyReleaseEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QLineEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QLineEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_FocusInEvent +func miqt_exec_callback_QLineEdit_FocusInEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QLineEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QLineEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_FocusOutEvent +func miqt_exec_callback_QLineEdit_FocusOutEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QLineEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QLineEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_PaintEvent +func miqt_exec_callback_QLineEdit_PaintEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QLineEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QLineEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DragEnterEvent +func miqt_exec_callback_QLineEdit_DragEnterEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QLineEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QLineEdit) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QLineEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DragMoveEvent +func miqt_exec_callback_QLineEdit_DragMoveEvent(self *C.QLineEdit, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QLineEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QLineEdit) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QLineEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DragLeaveEvent +func miqt_exec_callback_QLineEdit_DragLeaveEvent(self *C.QLineEdit, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QLineEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QLineEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DropEvent +func miqt_exec_callback_QLineEdit_DropEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QLineEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QLineEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ChangeEvent +func miqt_exec_callback_QLineEdit_ChangeEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QLineEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QLineEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ContextMenuEvent +func miqt_exec_callback_QLineEdit_ContextMenuEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QLineEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QLineEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InputMethodEvent +func miqt_exec_callback_QLineEdit_InputMethodEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QLineEdit_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QLineEdit) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QLineEdit_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InitStyleOption +func miqt_exec_callback_QLineEdit_InitStyleOption(self *C.QLineEdit, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QLineEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QLineEdit) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QLineEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InputMethodQuery +func miqt_exec_callback_QLineEdit_InputMethodQuery(self *C.QLineEdit, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QLineEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QLineEdit) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QLineEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_TimerEvent +func miqt_exec_callback_QLineEdit_TimerEvent(self *C.QLineEdit, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QLineEdit_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QLineEdit) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QLineEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_Event +func miqt_exec_callback_QLineEdit_Event(self *C.QLineEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_DevType() int { + + return (int)(C.QLineEdit_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QLineEdit) OnDevType(slot func(super func() int) int) { + C.QLineEdit_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_DevType +func miqt_exec_callback_QLineEdit_DevType(self *C.QLineEdit, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_SetVisible(visible bool) { + + C.QLineEdit_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QLineEdit) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QLineEdit_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_SetVisible +func miqt_exec_callback_QLineEdit_SetVisible(self *C.QLineEdit, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QLineEdit{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLineEdit_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLineEdit) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLineEdit_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_HeightForWidth +func miqt_exec_callback_QLineEdit_HeightForWidth(self *C.QLineEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QLineEdit_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QLineEdit) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QLineEdit_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_HasHeightForWidth +func miqt_exec_callback_QLineEdit_HasHeightForWidth(self *C.QLineEdit, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QLineEdit_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QLineEdit) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QLineEdit_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_PaintEngine +func miqt_exec_callback_QLineEdit_PaintEngine(self *C.QLineEdit, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QLineEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QLineEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_WheelEvent +func miqt_exec_callback_QLineEdit_WheelEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QLineEdit_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QLineEdit_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_EnterEvent +func miqt_exec_callback_QLineEdit_EnterEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QLineEdit_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLineEdit_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_LeaveEvent +func miqt_exec_callback_QLineEdit_LeaveEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QLineEdit_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QLineEdit_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_MoveEvent +func miqt_exec_callback_QLineEdit_MoveEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QLineEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QLineEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ResizeEvent +func miqt_exec_callback_QLineEdit_ResizeEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QLineEdit_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QLineEdit_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_CloseEvent +func miqt_exec_callback_QLineEdit_CloseEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QLineEdit_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QLineEdit_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_TabletEvent +func miqt_exec_callback_QLineEdit_TabletEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QLineEdit_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QLineEdit_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ActionEvent +func miqt_exec_callback_QLineEdit_ActionEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QLineEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QLineEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_ShowEvent +func miqt_exec_callback_QLineEdit_ShowEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QLineEdit_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLineEdit) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QLineEdit_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_HideEvent +func miqt_exec_callback_QLineEdit_HideEvent(self *C.QLineEdit, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QLineEdit{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QLineEdit_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QLineEdit) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QLineEdit_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_NativeEvent +func miqt_exec_callback_QLineEdit_NativeEvent(self *C.QLineEdit, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QLineEdit_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLineEdit) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QLineEdit_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_Metric +func miqt_exec_callback_QLineEdit_Metric(self *C.QLineEdit, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLineEdit) callVirtualBase_InitPainter(painter *QPainter) { + + C.QLineEdit_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QLineEdit) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QLineEdit_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_InitPainter +func miqt_exec_callback_QLineEdit_InitPainter(self *C.QLineEdit, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QLineEdit{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QLineEdit) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QLineEdit_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QLineEdit) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QLineEdit_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_Redirected +func miqt_exec_callback_QLineEdit_Redirected(self *C.QLineEdit, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QLineEdit_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QLineEdit) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QLineEdit_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_SharedPainter +func miqt_exec_callback_QLineEdit_SharedPainter(self *C.QLineEdit, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QLineEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QLineEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QLineEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QLineEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLineEdit_FocusNextPrevChild +func miqt_exec_callback_QLineEdit_FocusNextPrevChild(self *C.QLineEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QLineEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QLineEdit) Delete() { - C.QLineEdit_Delete(this.h) + C.QLineEdit_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlineedit.h b/qt6/gen_qlineedit.h index d2c74f72..9de2c5ff 100644 --- a/qt6/gen_qlineedit.h +++ b/qt6/gen_qlineedit.h @@ -16,40 +16,90 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; class QCompleter; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QLineEdit; class QMargins; class QMenu; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionFrame; +class QTabletEvent; class QTimerEvent; class QValidator; class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QCompleter QCompleter; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLineEdit QLineEdit; typedef struct QMargins QMargins; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; +typedef struct QTabletEvent QTabletEvent; typedef struct QTimerEvent QTimerEvent; typedef struct QValidator QValidator; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QLineEdit* QLineEdit_new(QWidget* parent); -QLineEdit* QLineEdit_new2(); -QLineEdit* QLineEdit_new3(struct miqt_string param1); -QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent); +void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QLineEdit_MetaObject(const QLineEdit* self); void* QLineEdit_Metacast(QLineEdit* self, const char* param1); struct miqt_string QLineEdit_Tr(const char* s); @@ -133,6 +183,23 @@ void QLineEdit_SelectionChanged(QLineEdit* self); void QLineEdit_connect_SelectionChanged(QLineEdit* self, intptr_t slot); void QLineEdit_InputRejected(QLineEdit* self); void QLineEdit_connect_InputRejected(QLineEdit* self, intptr_t slot); +void QLineEdit_MousePressEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_MouseMoveEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_MouseReleaseEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_MouseDoubleClickEvent(QLineEdit* self, QMouseEvent* param1); +void QLineEdit_KeyPressEvent(QLineEdit* self, QKeyEvent* param1); +void QLineEdit_KeyReleaseEvent(QLineEdit* self, QKeyEvent* param1); +void QLineEdit_FocusInEvent(QLineEdit* self, QFocusEvent* param1); +void QLineEdit_FocusOutEvent(QLineEdit* self, QFocusEvent* param1); +void QLineEdit_PaintEvent(QLineEdit* self, QPaintEvent* param1); +void QLineEdit_DragEnterEvent(QLineEdit* self, QDragEnterEvent* param1); +void QLineEdit_DragMoveEvent(QLineEdit* self, QDragMoveEvent* e); +void QLineEdit_DragLeaveEvent(QLineEdit* self, QDragLeaveEvent* e); +void QLineEdit_DropEvent(QLineEdit* self, QDropEvent* param1); +void QLineEdit_ChangeEvent(QLineEdit* self, QEvent* param1); +void QLineEdit_ContextMenuEvent(QLineEdit* self, QContextMenuEvent* param1); +void QLineEdit_InputMethodEvent(QLineEdit* self, QInputMethodEvent* param1); +void QLineEdit_InitStyleOption(const QLineEdit* self, QStyleOptionFrame* option); QVariant* QLineEdit_InputMethodQuery(const QLineEdit* self, int param1); QVariant* QLineEdit_InputMethodQuery2(const QLineEdit* self, int property, QVariant* argument); void QLineEdit_TimerEvent(QLineEdit* self, QTimerEvent* param1); @@ -141,7 +208,93 @@ struct miqt_string QLineEdit_Tr2(const char* s, const char* c); struct miqt_string QLineEdit_Tr3(const char* s, const char* c, int n); void QLineEdit_CursorForward2(QLineEdit* self, bool mark, int steps); void QLineEdit_CursorBackward2(QLineEdit* self, bool mark, int steps); -void QLineEdit_Delete(QLineEdit* self); +void QLineEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLineEdit_virtualbase_SizeHint(const void* self); +void QLineEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QLineEdit_virtualbase_MinimumSizeHint(const void* self); +void QLineEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QLineEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QLineEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QLineEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QLineEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QLineEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QLineEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QLineEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QLineEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QLineEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QLineEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QLineEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QLineEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QLineEdit_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QLineEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QLineEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QLineEdit_virtualbase_InputMethodQuery(const void* self, int param1); +void QLineEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QLineEdit_override_virtual_Event(void* self, intptr_t slot); +bool QLineEdit_virtualbase_Event(void* self, QEvent* param1); +void QLineEdit_override_virtual_DevType(void* self, intptr_t slot); +int QLineEdit_virtualbase_DevType(const void* self); +void QLineEdit_override_virtual_SetVisible(void* self, intptr_t slot); +void QLineEdit_virtualbase_SetVisible(void* self, bool visible); +void QLineEdit_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLineEdit_virtualbase_HeightForWidth(const void* self, int param1); +void QLineEdit_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QLineEdit_virtualbase_HasHeightForWidth(const void* self); +void QLineEdit_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QLineEdit_virtualbase_PaintEngine(const void* self); +void QLineEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QLineEdit_override_virtual_EnterEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QLineEdit_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_LeaveEvent(void* self, QEvent* event); +void QLineEdit_override_virtual_MoveEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QLineEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QLineEdit_override_virtual_CloseEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QLineEdit_override_virtual_TabletEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QLineEdit_override_virtual_ActionEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QLineEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QLineEdit_override_virtual_HideEvent(void* self, intptr_t slot); +void QLineEdit_virtualbase_HideEvent(void* self, QHideEvent* event); +void QLineEdit_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QLineEdit_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QLineEdit_override_virtual_Metric(void* self, intptr_t slot); +int QLineEdit_virtualbase_Metric(const void* self, int param1); +void QLineEdit_override_virtual_InitPainter(void* self, intptr_t slot); +void QLineEdit_virtualbase_InitPainter(const void* self, QPainter* painter); +void QLineEdit_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QLineEdit_virtualbase_Redirected(const void* self, QPoint* offset); +void QLineEdit_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QLineEdit_virtualbase_SharedPainter(const void* self); +void QLineEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QLineEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QLineEdit_Delete(QLineEdit* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlistview.cpp b/qt6/gen_qlistview.cpp index fecf0837..a411c065 100644 --- a/qt6/gen_qlistview.cpp +++ b/qt6/gen_qlistview.cpp @@ -1,24 +1,1576 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qlistview.h" #include "_cgo_export.h" -QListView* QListView_new(QWidget* parent) { - return new QListView(parent); +class MiqtVirtualQListView : public virtual QListView { +public: + + MiqtVirtualQListView(QWidget* parent): QListView(parent) {}; + MiqtVirtualQListView(): QListView() {}; + + virtual ~MiqtVirtualQListView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QListView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QListView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QListView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QListView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QListView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QListView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QListView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QListView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QListView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QListView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QListView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QListView::reset(); + return; + } + + + miqt_exec_callback_QListView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QListView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QListView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QListView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QListView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QListView::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QListView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QListView::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QListView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QListView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QListView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QListView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QListView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QListView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QListView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QListView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QListView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QListView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QListView::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QListView::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QListView::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QListView::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QListView::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QListView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QListView::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QListView::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QListView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QListView::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QListView::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QListView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QListView::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QListView::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QListView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QListView::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QListView::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QListView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QListView::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QListView::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QListView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QListView::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QListView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QListView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QListView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QListView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QListView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QListView::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QListView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QListView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QListView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QListView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QListView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QListView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QListView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QListView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QListView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QListView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QListView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QListView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QListView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QListView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QListView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QListView::updateGeometries(); + return; + } + + + miqt_exec_callback_QListView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QListView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QListView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QListView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QListView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QListView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QListView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QListView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QListView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QListView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QListView::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QListView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QListView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QListView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QListView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QListView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QListView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QListView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QListView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QListView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QListView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QListView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QListView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QListView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QListView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QListView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemDelegateForIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemDelegate* itemDelegateForIndex(const QModelIndex& index) const override { + if (handle__ItemDelegateForIndex == 0) { + return QListView::itemDelegateForIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QAbstractItemDelegate* callback_return_value = miqt_exec_callback_QListView_ItemDelegateForIndex(const_cast(this), handle__ItemDelegateForIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemDelegate* virtualbase_ItemDelegateForIndex(QModelIndex* index) const { + + return QListView::itemDelegateForIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QListView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QListView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QListView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QListView::selectAll(); + return; + } + + + miqt_exec_callback_QListView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QListView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QListView::updateEditorData(); + return; + } + + + miqt_exec_callback_QListView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QListView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QListView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QListView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QListView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QListView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QListView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QListView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QListView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QListView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QListView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QListView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QListView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QListView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QListView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QListView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QListView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QListView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QListView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QListView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QListView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QListView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QListView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QListView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QListView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QListView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QListView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QListView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QListView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QListView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QListView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QListView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QListView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QListView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QListView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QListView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QListView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QListView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QListView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QListView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QListView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QListView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QListView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QListView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QListView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QListView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QListView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QListView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QListView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QListView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QListView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QListView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QListView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QListView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QListView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QListView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QListView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QListView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QListView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QListView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QListView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QListView::eventFilter(object, event); + + } + +}; + +void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListView* ret = new MiqtVirtualQListView(parent); + *outptr_QListView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QListView* QListView_new2() { - return new QListView(); +void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListView* ret = new MiqtVirtualQListView(); + *outptr_QListView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QListView_MetaObject(const QListView* self) { @@ -174,8 +1726,8 @@ QRect* QListView_VisualRect(const QListView* self, QModelIndex* index) { return new QRect(self->visualRect(*index)); } -void QListView_ScrollTo(QListView* self, QModelIndex* index) { - self->scrollTo(*index); +void QListView_ScrollTo(QListView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QModelIndex* QListView_IndexAt(const QListView* self, QPoint* p) { @@ -205,7 +1757,7 @@ void QListView_IndexesMoved(QListView* self, struct miqt_array /* of QModelIndex } void QListView_connect_IndexesMoved(QListView* self, intptr_t slot) { - QListView::connect(self, static_cast(&QListView::indexesMoved), self, [=](const QModelIndexList& indexes) { + MiqtVirtualQListView::connect(self, static_cast(&QListView::indexesMoved), self, [=](const QModelIndexList& indexes) { const QModelIndexList& indexes_ret = indexes; // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); @@ -242,11 +1794,491 @@ struct miqt_string QListView_Tr3(const char* s, const char* c, int n) { return _ms; } -void QListView_ScrollTo2(QListView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QListView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VisualRect = slot; +} + +QRect* QListView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_VisualRect(index); +} + +void QListView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ScrollTo = slot; +} + +void QListView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QListView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QListView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_IndexAt(p); +} + +void QListView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DoItemsLayout = slot; +} + +void QListView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QListView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__Reset = slot; +} + +void QListView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_Reset(); +} + +void QListView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetRootIndex = slot; +} + +void QListView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QListView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__Event = slot; +} + +bool QListView_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_Event(e); +} + +void QListView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QListView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QListView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DataChanged = slot; +} + +void QListView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QListView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__RowsInserted = slot; +} + +void QListView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QListView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QListView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QListView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QListView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QListView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QListView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QListView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__WheelEvent = slot; +} + +void QListView_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_WheelEvent(e); +} + +void QListView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__TimerEvent = slot; +} + +void QListView_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_TimerEvent(e); +} + +void QListView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ResizeEvent = slot; +} + +void QListView_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_ResizeEvent(e); +} + +void QListView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DragMoveEvent = slot; +} + +void QListView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QListView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QListView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QListView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DropEvent = slot; +} + +void QListView_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DropEvent(e); +} + +void QListView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__StartDrag = slot; +} + +void QListView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QListView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__InitViewItemOption = slot; +} + +void QListView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQListView*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QListView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__PaintEvent = slot; +} + +void QListView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_PaintEvent(e); +} + +void QListView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__HorizontalOffset = slot; +} + +int QListView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QListView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VerticalOffset = slot; +} + +int QListView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_VerticalOffset(); +} + +void QListView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QListView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QListView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetSelection = slot; +} + +void QListView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QListView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QListView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QListView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__UpdateGeometries = slot; +} + +void QListView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QListView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QListView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QListView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__CurrentChanged = slot; +} + +void QListView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QListView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QListView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QListView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetModel = slot; +} + +void QListView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetModel(model); +} + +void QListView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SetSelectionModel = slot; +} + +void QListView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QListView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__KeyboardSearch = slot; +} + +void QListView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QListView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SizeHintForRow = slot; +} + +int QListView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QListView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QListView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QListView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ItemDelegateForIndex = slot; +} + +QAbstractItemDelegate* QListView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_ItemDelegateForIndex(index); +} + +void QListView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QListView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QListView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectAll = slot; +} + +void QListView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SelectAll(); +} + +void QListView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__UpdateEditorData = slot; +} + +void QListView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QListView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QListView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QListView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QListView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QListView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QListView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QListView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QListView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QListView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QListView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QListView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__CloseEditor = slot; +} + +void QListView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QListView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__CommitData = slot; +} + +void QListView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_CommitData(editor); +} + +void QListView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__EditorDestroyed = slot; +} + +void QListView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QListView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__Edit2 = slot; +} + +bool QListView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QListView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectionCommand = slot; +} + +int QListView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QListView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QListView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QListView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__ViewportEvent = slot; +} + +bool QListView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QListView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MousePressEvent = slot; +} + +void QListView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QListView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QListView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QListView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__DragEnterEvent = slot; +} + +void QListView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QListView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__FocusInEvent = slot; +} + +void QListView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QListView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__FocusOutEvent = slot; +} + +void QListView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QListView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__KeyPressEvent = slot; +} + +void QListView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QListView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__InputMethodEvent = slot; +} + +void QListView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QListView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__EventFilter = slot; +} + +bool QListView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQListView*)(self) )->virtualbase_EventFilter(object, event); } -void QListView_Delete(QListView* self) { - delete self; +void QListView_Delete(QListView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlistview.go b/qt6/gen_qlistview.go index 11b23572..f4b2f5b2 100644 --- a/qt6/gen_qlistview.go +++ b/qt6/gen_qlistview.go @@ -51,7 +51,8 @@ const ( ) type QListView struct { - h *C.QListView + h *C.QListView + isSubclass bool *QAbstractItemView } @@ -69,27 +70,55 @@ func (this *QListView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQListView(h *C.QListView) *QListView { +// newQListView constructs the type using only CGO pointers. +func newQListView(h *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListView { if h == nil { return nil } - return &QListView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QListView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQListView(h unsafe.Pointer) *QListView { - return newQListView((*C.QListView)(h)) +// UnsafeNewQListView constructs the type using only unsafe pointers. +func UnsafeNewQListView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListView { + if h == nil { + return nil + } + + return &QListView{h: (*C.QListView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQListView constructs a new QListView object. func NewQListView(parent *QWidget) *QListView { - ret := C.QListView_new(parent.cPointer()) - return newQListView(ret) + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListView_new(parent.cPointer(), &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQListView2 constructs a new QListView object. func NewQListView2() *QListView { - ret := C.QListView_new2() - return newQListView(ret) + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListView_new2(&outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QListView) MetaObject() *QMetaObject { @@ -245,8 +274,8 @@ func (this *QListView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QListView) ScrollTo(index *QModelIndex) { - C.QListView_ScrollTo(this.h, index.cPointer()) +func (this *QListView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QListView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QListView) IndexAt(p *QPoint) *QModelIndex { @@ -325,13 +354,1464 @@ func QListView_Tr3(s string, c string, n int) string { return _ret } -func (this *QListView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QListView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QListView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QListView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QListView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VisualRect +func miqt_exec_callback_QListView_VisualRect(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QListView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QListView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QListView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ScrollTo +func miqt_exec_callback_QListView_ScrollTo(self *C.QListView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QListView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QListView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QListView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_IndexAt +func miqt_exec_callback_QListView_IndexAt(self *C.QListView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_DoItemsLayout() { + + C.QListView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnDoItemsLayout(slot func(super func())) { + C.QListView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DoItemsLayout +func miqt_exec_callback_QListView_DoItemsLayout(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QListView) callVirtualBase_Reset() { + + C.QListView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnReset(slot func(super func())) { + C.QListView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_Reset +func miqt_exec_callback_QListView_Reset(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_Reset) + +} + +func (this *QListView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QListView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QListView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QListView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetRootIndex +func miqt_exec_callback_QListView_SetRootIndex(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QListView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QListView) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QListView_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QListView) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QListView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_Event +func miqt_exec_callback_QListView_Event(self *C.QListView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QListView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QListView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QListView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ScrollContentsBy +func miqt_exec_callback_QListView_ScrollContentsBy(self *C.QListView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QListView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QListView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QListView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QListView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DataChanged +func miqt_exec_callback_QListView_DataChanged(self *C.QListView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QListView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QListView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QListView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_RowsInserted +func miqt_exec_callback_QListView_RowsInserted(self *C.QListView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QListView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QListView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_RowsAboutToBeRemoved +func miqt_exec_callback_QListView_RowsAboutToBeRemoved(self *C.QListView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QListView) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QListView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MouseMoveEvent +func miqt_exec_callback_QListView_MouseMoveEvent(self *C.QListView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QListView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MouseReleaseEvent +func miqt_exec_callback_QListView_MouseReleaseEvent(self *C.QListView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QListView_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QListView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_WheelEvent +func miqt_exec_callback_QListView_WheelEvent(self *C.QListView, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QListView_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QListView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_TimerEvent +func miqt_exec_callback_QListView_TimerEvent(self *C.QListView, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QListView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QListView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ResizeEvent +func miqt_exec_callback_QListView_ResizeEvent(self *C.QListView, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QListView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QListView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DragMoveEvent +func miqt_exec_callback_QListView_DragMoveEvent(self *C.QListView, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QListView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QListView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DragLeaveEvent +func miqt_exec_callback_QListView_DragLeaveEvent(self *C.QListView, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QListView_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QListView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DropEvent +func miqt_exec_callback_QListView_DropEvent(self *C.QListView, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QListView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QListView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QListView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_StartDrag +func miqt_exec_callback_QListView_StartDrag(self *C.QListView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QListView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QListView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QListView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QListView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QListView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_InitViewItemOption +func miqt_exec_callback_QListView_InitViewItemOption(self *C.QListView, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QListView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QListView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QListView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QListView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_PaintEvent +func miqt_exec_callback_QListView_PaintEvent(self *C.QListView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QListView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QListView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListView) OnHorizontalOffset(slot func(super func() int) int) { + C.QListView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_HorizontalOffset +func miqt_exec_callback_QListView_HorizontalOffset(self *C.QListView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QListView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListView) OnVerticalOffset(slot func(super func() int) int) { + C.QListView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VerticalOffset +func miqt_exec_callback_QListView_VerticalOffset(self *C.QListView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QListView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QListView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MoveCursor +func miqt_exec_callback_QListView_MoveCursor(self *C.QListView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QListView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QListView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QListView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetSelection +func miqt_exec_callback_QListView_SetSelection(self *C.QListView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QListView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QListView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QListView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QListView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectedIndexes +func miqt_exec_callback_QListView_SelectedIndexes(self *C.QListView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QListView) callVirtualBase_UpdateGeometries() { + + C.QListView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnUpdateGeometries(slot func(super func())) { + C.QListView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_UpdateGeometries +func miqt_exec_callback_QListView_UpdateGeometries(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QListView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QListView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QListView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QListView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_IsIndexHidden +func miqt_exec_callback_QListView_IsIndexHidden(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QListView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QListView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QListView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_CurrentChanged +func miqt_exec_callback_QListView_CurrentChanged(self *C.QListView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QListView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QListView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QListView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ViewportSizeHint +func miqt_exec_callback_QListView_ViewportSizeHint(self *C.QListView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QListView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QListView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QListView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetModel +func miqt_exec_callback_QListView_SetModel(self *C.QListView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QListView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QListView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QListView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QListView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QListView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SetSelectionModel +func miqt_exec_callback_QListView_SetSelectionModel(self *C.QListView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QListView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QListView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QListView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QListView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QListView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_KeyboardSearch +func miqt_exec_callback_QListView_KeyboardSearch(self *C.QListView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QListView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QListView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QListView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QListView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QListView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SizeHintForRow +func miqt_exec_callback_QListView_SizeHintForRow(self *C.QListView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QListView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QListView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QListView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SizeHintForColumn +func miqt_exec_callback_QListView_SizeHintForColumn(self *C.QListView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { + + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QListView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())), nil) +} +func (this *QListView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { + C.QListView_override_virtual_ItemDelegateForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ItemDelegateForIndex +func miqt_exec_callback_QListView_ItemDelegateForIndex(self *C.QListView, cb C.intptr_t, index *C.QModelIndex) *C.QAbstractItemDelegate { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_ItemDelegateForIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QListView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QListView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_InputMethodQuery +func miqt_exec_callback_QListView_InputMethodQuery(self *C.QListView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListView) callVirtualBase_SelectAll() { + + C.QListView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnSelectAll(slot func(super func())) { + C.QListView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectAll +func miqt_exec_callback_QListView_SelectAll(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QListView) callVirtualBase_UpdateEditorData() { + + C.QListView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnUpdateEditorData(slot func(super func())) { + C.QListView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_UpdateEditorData +func miqt_exec_callback_QListView_UpdateEditorData(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QListView) callVirtualBase_UpdateEditorGeometries() { + + C.QListView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QListView) OnUpdateEditorGeometries(slot func(super func())) { + C.QListView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_UpdateEditorGeometries +func miqt_exec_callback_QListView_UpdateEditorGeometries(self *C.QListView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QListView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QListView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QListView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QListView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VerticalScrollbarAction +func miqt_exec_callback_QListView_VerticalScrollbarAction(self *C.QListView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QListView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QListView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QListView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QListView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QListView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_HorizontalScrollbarAction +func miqt_exec_callback_QListView_HorizontalScrollbarAction(self *C.QListView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QListView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QListView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QListView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QListView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QListView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VerticalScrollbarValueChanged +func miqt_exec_callback_QListView_VerticalScrollbarValueChanged(self *C.QListView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QListView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QListView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QListView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QListView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QListView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QListView_HorizontalScrollbarValueChanged(self *C.QListView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QListView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QListView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QListView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QListView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QListView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_CloseEditor +func miqt_exec_callback_QListView_CloseEditor(self *C.QListView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QListView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QListView) callVirtualBase_CommitData(editor *QWidget) { + + C.QListView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QListView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QListView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_CommitData +func miqt_exec_callback_QListView_CommitData(self *C.QListView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QListView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QListView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QListView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QListView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_EditorDestroyed +func miqt_exec_callback_QListView_EditorDestroyed(self *C.QListView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QListView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QListView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QListView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QListView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QListView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_Edit2 +func miqt_exec_callback_QListView_Edit2(self *C.QListView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QListView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QListView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QListView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectionCommand +func miqt_exec_callback_QListView_SelectionCommand(self *C.QListView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QListView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QListView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QListView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_FocusNextPrevChild +func miqt_exec_callback_QListView_FocusNextPrevChild(self *C.QListView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QListView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QListView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QListView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_ViewportEvent +func miqt_exec_callback_QListView_ViewportEvent(self *C.QListView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QListView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QListView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MousePressEvent +func miqt_exec_callback_QListView_MousePressEvent(self *C.QListView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QListView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QListView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_MouseDoubleClickEvent +func miqt_exec_callback_QListView_MouseDoubleClickEvent(self *C.QListView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QListView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QListView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_DragEnterEvent +func miqt_exec_callback_QListView_DragEnterEvent(self *C.QListView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QListView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QListView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_FocusInEvent +func miqt_exec_callback_QListView_FocusInEvent(self *C.QListView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QListView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QListView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QListView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_FocusOutEvent +func miqt_exec_callback_QListView_FocusOutEvent(self *C.QListView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QListView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QListView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QListView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_KeyPressEvent +func miqt_exec_callback_QListView_KeyPressEvent(self *C.QListView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QListView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QListView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QListView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_InputMethodEvent +func miqt_exec_callback_QListView_InputMethodEvent(self *C.QListView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QListView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QListView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QListView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QListView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QListView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_EventFilter +func miqt_exec_callback_QListView_EventFilter(self *C.QListView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QListView) Delete() { - C.QListView_Delete(this.h) + C.QListView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlistview.h b/qt6/gen_qlistview.h index fe04d3c5..d6e46f51 100644 --- a/qt6/gen_qlistview.h +++ b/qt6/gen_qlistview.h @@ -15,25 +15,71 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; +class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; +class QItemSelectionModel; +class QKeyEvent; class QListView; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QListView QListView; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QListView* QListView_new(QWidget* parent); -QListView* QListView_new2(); +void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QListView_MetaObject(const QListView* self); void* QListView_Metacast(QListView* self, const char* param1); struct miqt_string QListView_Tr(const char* s); @@ -69,17 +115,161 @@ bool QListView_IsSelectionRectVisible(const QListView* self); void QListView_SetItemAlignment(QListView* self, int alignment); int QListView_ItemAlignment(const QListView* self); QRect* QListView_VisualRect(const QListView* self, QModelIndex* index); -void QListView_ScrollTo(QListView* self, QModelIndex* index); +void QListView_ScrollTo(QListView* self, QModelIndex* index, int hint); QModelIndex* QListView_IndexAt(const QListView* self, QPoint* p); void QListView_DoItemsLayout(QListView* self); void QListView_Reset(QListView* self); void QListView_SetRootIndex(QListView* self, QModelIndex* index); void QListView_IndexesMoved(QListView* self, struct miqt_array /* of QModelIndex* */ indexes); void QListView_connect_IndexesMoved(QListView* self, intptr_t slot); +bool QListView_Event(QListView* self, QEvent* e); +void QListView_ScrollContentsBy(QListView* self, int dx, int dy); +void QListView_DataChanged(QListView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QListView_RowsInserted(QListView* self, QModelIndex* parent, int start, int end); +void QListView_RowsAboutToBeRemoved(QListView* self, QModelIndex* parent, int start, int end); +void QListView_MouseMoveEvent(QListView* self, QMouseEvent* e); +void QListView_MouseReleaseEvent(QListView* self, QMouseEvent* e); +void QListView_WheelEvent(QListView* self, QWheelEvent* e); +void QListView_TimerEvent(QListView* self, QTimerEvent* e); +void QListView_ResizeEvent(QListView* self, QResizeEvent* e); +void QListView_DragMoveEvent(QListView* self, QDragMoveEvent* e); +void QListView_DragLeaveEvent(QListView* self, QDragLeaveEvent* e); +void QListView_DropEvent(QListView* self, QDropEvent* e); +void QListView_StartDrag(QListView* self, int supportedActions); +void QListView_InitViewItemOption(const QListView* self, QStyleOptionViewItem* option); +void QListView_PaintEvent(QListView* self, QPaintEvent* e); +int QListView_HorizontalOffset(const QListView* self); +int QListView_VerticalOffset(const QListView* self); +QModelIndex* QListView_MoveCursor(QListView* self, int cursorAction, int modifiers); +void QListView_SetSelection(QListView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QListView_SelectedIndexes(const QListView* self); +void QListView_UpdateGeometries(QListView* self); +bool QListView_IsIndexHidden(const QListView* self, QModelIndex* index); +void QListView_CurrentChanged(QListView* self, QModelIndex* current, QModelIndex* previous); +QSize* QListView_ViewportSizeHint(const QListView* self); struct miqt_string QListView_Tr2(const char* s, const char* c); struct miqt_string QListView_Tr3(const char* s, const char* c, int n); -void QListView_ScrollTo2(QListView* self, QModelIndex* index, int hint); -void QListView_Delete(QListView* self); +void QListView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QListView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QListView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QListView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QListView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QListView_virtualbase_IndexAt(const void* self, QPoint* p); +void QListView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QListView_virtualbase_DoItemsLayout(void* self); +void QListView_override_virtual_Reset(void* self, intptr_t slot); +void QListView_virtualbase_Reset(void* self); +void QListView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QListView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QListView_override_virtual_Event(void* self, intptr_t slot); +bool QListView_virtualbase_Event(void* self, QEvent* e); +void QListView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QListView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QListView_override_virtual_DataChanged(void* self, intptr_t slot); +void QListView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QListView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QListView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QListView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QListView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QListView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QListView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QListView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QListView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QListView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QListView_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QListView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QListView_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QListView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QListView_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QListView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QListView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QListView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QListView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QListView_override_virtual_DropEvent(void* self, intptr_t slot); +void QListView_virtualbase_DropEvent(void* self, QDropEvent* e); +void QListView_override_virtual_StartDrag(void* self, intptr_t slot); +void QListView_virtualbase_StartDrag(void* self, int supportedActions); +void QListView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QListView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QListView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QListView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QListView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QListView_virtualbase_HorizontalOffset(const void* self); +void QListView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QListView_virtualbase_VerticalOffset(const void* self); +void QListView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QListView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QListView_override_virtual_SetSelection(void* self, intptr_t slot); +void QListView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QListView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QListView_virtualbase_SelectedIndexes(const void* self); +void QListView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QListView_virtualbase_UpdateGeometries(void* self); +void QListView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QListView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QListView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QListView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QListView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QListView_virtualbase_ViewportSizeHint(const void* self); +void QListView_override_virtual_SetModel(void* self, intptr_t slot); +void QListView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QListView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QListView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QListView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QListView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QListView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QListView_virtualbase_SizeHintForRow(const void* self, int row); +void QListView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QListView_virtualbase_SizeHintForColumn(const void* self, int column); +void QListView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot); +QAbstractItemDelegate* QListView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index); +void QListView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QListView_virtualbase_InputMethodQuery(const void* self, int query); +void QListView_override_virtual_SelectAll(void* self, intptr_t slot); +void QListView_virtualbase_SelectAll(void* self); +void QListView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QListView_virtualbase_UpdateEditorData(void* self); +void QListView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QListView_virtualbase_UpdateEditorGeometries(void* self); +void QListView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QListView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QListView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QListView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QListView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QListView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QListView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QListView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QListView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QListView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QListView_override_virtual_CommitData(void* self, intptr_t slot); +void QListView_virtualbase_CommitData(void* self, QWidget* editor); +void QListView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QListView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QListView_override_virtual_Edit2(void* self, intptr_t slot); +bool QListView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QListView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QListView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QListView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QListView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QListView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QListView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QListView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QListView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QListView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QListView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QListView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QListView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QListView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QListView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QListView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QListView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QListView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QListView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QListView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QListView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QListView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QListView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QListView_Delete(QListView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlistwidget.cpp b/qt6/gen_qlistwidget.cpp index 1040fd0c..5e7fd9d9 100644 --- a/qt6/gen_qlistwidget.cpp +++ b/qt6/gen_qlistwidget.cpp @@ -1,70 +1,263 @@ +#include +#include #include #include +#include +#include +#include +#include #include +#include #include #include #include +#include #include #include #include #include #include +#include +#include +#include +#include #include #include +#include #include #include #include #include +#include +#include #include +#include #include #include #include "gen_qlistwidget.h" #include "_cgo_export.h" -QListWidgetItem* QListWidgetItem_new() { - return new QListWidgetItem(); +class MiqtVirtualQListWidgetItem : public virtual QListWidgetItem { +public: + + MiqtVirtualQListWidgetItem(): QListWidgetItem() {}; + MiqtVirtualQListWidgetItem(const QString& text): QListWidgetItem(text) {}; + MiqtVirtualQListWidgetItem(const QIcon& icon, const QString& text): QListWidgetItem(icon, text) {}; + MiqtVirtualQListWidgetItem(const QListWidgetItem& other): QListWidgetItem(other) {}; + MiqtVirtualQListWidgetItem(QListWidget* listview): QListWidgetItem(listview) {}; + MiqtVirtualQListWidgetItem(QListWidget* listview, int typeVal): QListWidgetItem(listview, typeVal) {}; + MiqtVirtualQListWidgetItem(const QString& text, QListWidget* listview): QListWidgetItem(text, listview) {}; + MiqtVirtualQListWidgetItem(const QString& text, QListWidget* listview, int typeVal): QListWidgetItem(text, listview, typeVal) {}; + MiqtVirtualQListWidgetItem(const QIcon& icon, const QString& text, QListWidget* listview): QListWidgetItem(icon, text, listview) {}; + MiqtVirtualQListWidgetItem(const QIcon& icon, const QString& text, QListWidget* listview, int typeVal): QListWidgetItem(icon, text, listview, typeVal) {}; + + virtual ~MiqtVirtualQListWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QListWidgetItem* clone() const override { + if (handle__Clone == 0) { + return QListWidgetItem::clone(); + } + + + QListWidgetItem* callback_return_value = miqt_exec_callback_QListWidgetItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QListWidgetItem* virtualbase_Clone() const { + + return QListWidgetItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int role) const override { + if (handle__Data == 0) { + return QListWidgetItem::data(role); + } + + int sigval1 = role; + + QVariant* callback_return_value = miqt_exec_callback_QListWidgetItem_Data(const_cast(this), handle__Data, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int role) const { + + return new QVariant(QListWidgetItem::data(static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(int role, const QVariant& value) override { + if (handle__SetData == 0) { + QListWidgetItem::setData(role, value); + return; + } + + int sigval1 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QListWidgetItem_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(int role, QVariant* value) { + + QListWidgetItem::setData(static_cast(role), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QListWidgetItem& other) const override { + if (handle__OperatorLesser == 0) { + return QListWidgetItem::operator<(other); + } + + const QListWidgetItem& other_ret = other; + // Cast returned reference into pointer + QListWidgetItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QListWidgetItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QListWidgetItem* other) const { + + return QListWidgetItem::operator<(*other); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QListWidgetItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QListWidgetItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QListWidgetItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QListWidgetItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QListWidgetItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QListWidgetItem::write(*out); + + } + +}; + +void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new2(struct miqt_string text) { +void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(text_QString); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text) { +void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(*icon, text_QString); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other) { - return new QListWidgetItem(*other); +void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*other); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new5(QListWidget* listview) { - return new QListWidgetItem(listview); +void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal) { - return new QListWidgetItem(listview, static_cast(typeVal)); +void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview, static_cast(typeVal)); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview) { +void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(text_QString, listview); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal) { +void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(text_QString, listview, static_cast(typeVal)); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview, static_cast(typeVal)); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview) { +void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(*icon, text_QString, listview); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview); + *outptr_QListWidgetItem = ret; } -QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal) { +void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); + MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); + *outptr_QListWidgetItem = ret; } QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self) { @@ -135,138 +328,1170 @@ struct miqt_string QListWidgetItem_StatusTip(const QListWidgetItem* self) { return _ms; } -void QListWidgetItem_SetStatusTip(QListWidgetItem* self, struct miqt_string statusTip) { - QString statusTip_QString = QString::fromUtf8(statusTip.data, statusTip.len); - self->setStatusTip(statusTip_QString); -} +void QListWidgetItem_SetStatusTip(QListWidgetItem* self, struct miqt_string statusTip) { + QString statusTip_QString = QString::fromUtf8(statusTip.data, statusTip.len); + self->setStatusTip(statusTip_QString); +} + +struct miqt_string QListWidgetItem_ToolTip(const QListWidgetItem* self) { + QString _ret = self->toolTip(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QListWidgetItem_SetToolTip(QListWidgetItem* self, struct miqt_string toolTip) { + QString toolTip_QString = QString::fromUtf8(toolTip.data, toolTip.len); + self->setToolTip(toolTip_QString); +} + +struct miqt_string QListWidgetItem_WhatsThis(const QListWidgetItem* self) { + QString _ret = self->whatsThis(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QListWidgetItem_SetWhatsThis(QListWidgetItem* self, struct miqt_string whatsThis) { + QString whatsThis_QString = QString::fromUtf8(whatsThis.data, whatsThis.len); + self->setWhatsThis(whatsThis_QString); +} + +QFont* QListWidgetItem_Font(const QListWidgetItem* self) { + return new QFont(self->font()); +} + +void QListWidgetItem_SetFont(QListWidgetItem* self, QFont* font) { + self->setFont(*font); +} + +int QListWidgetItem_TextAlignment(const QListWidgetItem* self) { + return self->textAlignment(); +} + +void QListWidgetItem_SetTextAlignment(QListWidgetItem* self, int alignment) { + self->setTextAlignment(static_cast(alignment)); +} + +void QListWidgetItem_SetTextAlignmentWithAlignment(QListWidgetItem* self, int alignment) { + self->setTextAlignment(static_cast(alignment)); +} + +void QListWidgetItem_SetTextAlignment2(QListWidgetItem* self, int alignment) { + self->setTextAlignment(static_cast(alignment)); +} + +QBrush* QListWidgetItem_Background(const QListWidgetItem* self) { + return new QBrush(self->background()); +} + +void QListWidgetItem_SetBackground(QListWidgetItem* self, QBrush* brush) { + self->setBackground(*brush); +} + +QBrush* QListWidgetItem_Foreground(const QListWidgetItem* self) { + return new QBrush(self->foreground()); +} + +void QListWidgetItem_SetForeground(QListWidgetItem* self, QBrush* brush) { + self->setForeground(*brush); +} + +int QListWidgetItem_CheckState(const QListWidgetItem* self) { + Qt::CheckState _ret = self->checkState(); + return static_cast(_ret); +} + +void QListWidgetItem_SetCheckState(QListWidgetItem* self, int state) { + self->setCheckState(static_cast(state)); +} + +QSize* QListWidgetItem_SizeHint(const QListWidgetItem* self) { + return new QSize(self->sizeHint()); +} + +void QListWidgetItem_SetSizeHint(QListWidgetItem* self, QSize* size) { + self->setSizeHint(*size); +} + +QVariant* QListWidgetItem_Data(const QListWidgetItem* self, int role) { + return new QVariant(self->data(static_cast(role))); +} + +void QListWidgetItem_SetData(QListWidgetItem* self, int role, QVariant* value) { + self->setData(static_cast(role), *value); +} + +bool QListWidgetItem_OperatorLesser(const QListWidgetItem* self, QListWidgetItem* other) { + return self->operator<(*other); +} + +void QListWidgetItem_Read(QListWidgetItem* self, QDataStream* in) { + self->read(*in); +} + +void QListWidgetItem_Write(const QListWidgetItem* self, QDataStream* out) { + self->write(*out); +} + +void QListWidgetItem_OperatorAssign(QListWidgetItem* self, QListWidgetItem* other) { + self->operator=(*other); +} + +int QListWidgetItem_Type(const QListWidgetItem* self) { + return self->type(); +} + +void QListWidgetItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Clone = slot; +} + +QListWidgetItem* QListWidgetItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Clone(); +} + +void QListWidgetItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Data = slot; +} + +QVariant* QListWidgetItem_virtualbase_Data(const void* self, int role) { + return ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Data(role); +} + +void QListWidgetItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__SetData = slot; +} + +void QListWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value) { + ( (MiqtVirtualQListWidgetItem*)(self) )->virtualbase_SetData(role, value); +} + +void QListWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__OperatorLesser = slot; +} + +bool QListWidgetItem_virtualbase_OperatorLesser(const void* self, QListWidgetItem* other) { + return ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_OperatorLesser(other); +} + +void QListWidgetItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Read = slot; +} + +void QListWidgetItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Read(in); +} + +void QListWidgetItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QListWidgetItem*)(self) )->handle__Write = slot; +} + +void QListWidgetItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQListWidgetItem*)(self) )->virtualbase_Write(out); +} + +void QListWidgetItem_Delete(QListWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQListWidget : public virtual QListWidget { +public: + + MiqtVirtualQListWidget(QWidget* parent): QListWidget(parent) {}; + MiqtVirtualQListWidget(): QListWidget() {}; + + virtual ~MiqtVirtualQListWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QListWidget::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QListWidget_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QListWidget::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QListWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QListWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QListWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QListWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QListWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QListWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QListWidget::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QListWidget_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QListWidget::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QList& items) const override { + if (handle__MimeData == 0) { + return QListWidget::mimeData(items); + } + + const QList& items_ret = items; + // Convert QList<> from C++ memory to manually-managed C memory + QListWidgetItem** items_arr = static_cast(malloc(sizeof(QListWidgetItem*) * items_ret.length())); + for (size_t i = 0, e = items_ret.length(); i < e; ++i) { + items_arr[i] = items_ret[i]; + } + struct miqt_array items_out; + items_out.len = items_ret.length(); + items_out.data = static_cast(items_arr); + struct miqt_array /* of QListWidgetItem* */ sigval1 = items_out; + + QMimeData* callback_return_value = miqt_exec_callback_QListWidget_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QListWidgetItem* */ items) const { + QList items_QList; + items_QList.reserve(items.len); + QListWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + + return QListWidget::mimeData(items_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(int index, const QMimeData* data, Qt::DropAction action) override { + if (handle__DropMimeData == 0) { + return QListWidget::dropMimeData(index, data, action); + } + + int sigval1 = index; + QMimeData* sigval2 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval3 = static_cast(action_ret); + + bool callback_return_value = miqt_exec_callback_QListWidget_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(int index, QMimeData* data, int action) { + + return QListWidget::dropMimeData(static_cast(index), data, static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QListWidget::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QListWidget_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QListWidget::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QListWidget::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QListWidget_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QListWidget::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QListWidget::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QListWidget_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QListWidget::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QListWidget::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListWidget_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QListWidget::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QListWidget::doItemsLayout(); + return; + } + + + miqt_exec_callback_QListWidget_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QListWidget::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QListWidget::reset(); + return; + } + + + miqt_exec_callback_QListWidget_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QListWidget::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QListWidget::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QListWidget_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QListWidget::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QListWidget::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QListWidget_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QListWidget::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QListWidget::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QListWidget_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QListWidget::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QListWidget::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListWidget_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QListWidget::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QListWidget::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QListWidget_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QListWidget::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QListWidget::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QListWidget::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QListWidget::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QListWidget::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QListWidget::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QListWidget::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QListWidget::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QListWidget::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QListWidget::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QListWidget::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QListWidget::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QListWidget::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QListWidget::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QListWidget::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QListWidget::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QListWidget_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QListWidget::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QListWidget::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QListWidget_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QListWidget::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QListWidget::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QListWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QListWidget::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QListWidget::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListWidget_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QListWidget::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QListWidget::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QListWidget_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QListWidget::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QListWidget::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QListWidget_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QListWidget::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QListWidget::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QListWidget_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QListWidget::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QListWidget::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QListWidget_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } -struct miqt_string QListWidgetItem_ToolTip(const QListWidgetItem* self) { - QString _ret = self->toolTip(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { -void QListWidgetItem_SetToolTip(QListWidgetItem* self, struct miqt_string toolTip) { - QString toolTip_QString = QString::fromUtf8(toolTip.data, toolTip.len); - self->setToolTip(toolTip_QString); -} + QModelIndexList _ret = QListWidget::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; -struct miqt_string QListWidgetItem_WhatsThis(const QListWidgetItem* self) { - QString _ret = self->whatsThis(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + } -void QListWidgetItem_SetWhatsThis(QListWidgetItem* self, struct miqt_string whatsThis) { - QString whatsThis_QString = QString::fromUtf8(whatsThis.data, whatsThis.len); - self->setWhatsThis(whatsThis_QString); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; -QFont* QListWidgetItem_Font(const QListWidgetItem* self) { - return new QFont(self->font()); -} + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QListWidget::updateGeometries(); + return; + } + -void QListWidgetItem_SetFont(QListWidgetItem* self, QFont* font) { - self->setFont(*font); -} + miqt_exec_callback_QListWidget_UpdateGeometries(this, handle__UpdateGeometries); -int QListWidgetItem_TextAlignment(const QListWidgetItem* self) { - return self->textAlignment(); -} + + } -void QListWidgetItem_SetTextAlignment(QListWidgetItem* self, int alignment) { - self->setTextAlignment(static_cast(alignment)); -} + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { -void QListWidgetItem_SetTextAlignmentWithAlignment(QListWidgetItem* self, int alignment) { - self->setTextAlignment(static_cast(alignment)); -} + QListWidget::updateGeometries(); -void QListWidgetItem_SetTextAlignment2(QListWidgetItem* self, int alignment) { - self->setTextAlignment(static_cast(alignment)); -} + } -QBrush* QListWidgetItem_Background(const QListWidgetItem* self) { - return new QBrush(self->background()); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; -void QListWidgetItem_SetBackground(QListWidgetItem* self, QBrush* brush) { - self->setBackground(*brush); -} + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QListWidget::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); -QBrush* QListWidgetItem_Foreground(const QListWidgetItem* self) { - return new QBrush(self->foreground()); -} + bool callback_return_value = miqt_exec_callback_QListWidget_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); -void QListWidgetItem_SetForeground(QListWidgetItem* self, QBrush* brush) { - self->setForeground(*brush); -} + return callback_return_value; + } -int QListWidgetItem_CheckState(const QListWidgetItem* self) { - Qt::CheckState _ret = self->checkState(); - return static_cast(_ret); -} + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { -void QListWidgetItem_SetCheckState(QListWidgetItem* self, int state) { - self->setCheckState(static_cast(state)); -} + return QListWidget::isIndexHidden(*index); -QSize* QListWidgetItem_SizeHint(const QListWidgetItem* self) { - return new QSize(self->sizeHint()); -} + } -void QListWidgetItem_SetSizeHint(QListWidgetItem* self, QSize* size) { - self->setSizeHint(*size); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QListWidget::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QListWidget_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } -QVariant* QListWidgetItem_Data(const QListWidgetItem* self, int role) { - return new QVariant(self->data(static_cast(role))); -} + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { -void QListWidgetItem_SetData(QListWidgetItem* self, int role, QVariant* value) { - self->setData(static_cast(role), *value); -} + QListWidget::currentChanged(*current, *previous); -bool QListWidgetItem_OperatorLesser(const QListWidgetItem* self, QListWidgetItem* other) { - return self->operator<(*other); -} + } -void QListWidgetItem_Read(QListWidgetItem* self, QDataStream* in) { - self->read(*in); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; -void QListWidgetItem_Write(const QListWidgetItem* self, QDataStream* out) { - self->write(*out); -} + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QListWidget::viewportSizeHint(); + } + -void QListWidgetItem_OperatorAssign(QListWidgetItem* self, QListWidgetItem* other) { - self->operator=(*other); -} + QSize* callback_return_value = miqt_exec_callback_QListWidget_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); -int QListWidgetItem_Type(const QListWidgetItem* self) { - return self->type(); -} + return *callback_return_value; + } -void QListWidgetItem_Delete(QListWidgetItem* self) { - delete self; -} + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QListWidget::viewportSizeHint()); -QListWidget* QListWidget_new(QWidget* parent) { - return new QListWidget(parent); + } + +}; + +void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(parent); + *outptr_QListWidget = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QListWidget* QListWidget_new2() { - return new QListWidget(); +void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(); + *outptr_QListWidget = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QListWidget_MetaObject(const QListWidget* self) { @@ -485,7 +1710,7 @@ void QListWidget_ItemPressed(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemPressed(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemPressed), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemPressed), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemPressed(slot, sigval1); }); @@ -496,7 +1721,7 @@ void QListWidget_ItemClicked(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemClicked(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemClicked), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemClicked), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemClicked(slot, sigval1); }); @@ -507,7 +1732,7 @@ void QListWidget_ItemDoubleClicked(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemDoubleClicked(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemDoubleClicked), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemDoubleClicked), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemDoubleClicked(slot, sigval1); }); @@ -518,7 +1743,7 @@ void QListWidget_ItemActivated(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemActivated(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemActivated), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemActivated), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemActivated(slot, sigval1); }); @@ -529,7 +1754,7 @@ void QListWidget_ItemEntered(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemEntered(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemEntered), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemEntered), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemEntered(slot, sigval1); }); @@ -540,7 +1765,7 @@ void QListWidget_ItemChanged(QListWidget* self, QListWidgetItem* item) { } void QListWidget_connect_ItemChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemChanged), self, [=](QListWidgetItem* item) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemChanged), self, [=](QListWidgetItem* item) { QListWidgetItem* sigval1 = item; miqt_exec_callback_QListWidget_ItemChanged(slot, sigval1); }); @@ -551,7 +1776,7 @@ void QListWidget_CurrentItemChanged(QListWidget* self, QListWidgetItem* current, } void QListWidget_connect_CurrentItemChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::currentItemChanged), self, [=](QListWidgetItem* current, QListWidgetItem* previous) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::currentItemChanged), self, [=](QListWidgetItem* current, QListWidgetItem* previous) { QListWidgetItem* sigval1 = current; QListWidgetItem* sigval2 = previous; miqt_exec_callback_QListWidget_CurrentItemChanged(slot, sigval1, sigval2); @@ -564,7 +1789,7 @@ void QListWidget_CurrentTextChanged(QListWidget* self, struct miqt_string curren } void QListWidget_connect_CurrentTextChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::currentTextChanged), self, [=](const QString& currentText) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::currentTextChanged), self, [=](const QString& currentText) { const QString currentText_ret = currentText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray currentText_b = currentText_ret.toUtf8(); @@ -582,7 +1807,7 @@ void QListWidget_CurrentRowChanged(QListWidget* self, int currentRow) { } void QListWidget_connect_CurrentRowChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::currentRowChanged), self, [=](int currentRow) { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::currentRowChanged), self, [=](int currentRow) { int sigval1 = currentRow; miqt_exec_callback_QListWidget_CurrentRowChanged(slot, sigval1); }); @@ -593,7 +1818,7 @@ void QListWidget_ItemSelectionChanged(QListWidget* self) { } void QListWidget_connect_ItemSelectionChanged(QListWidget* self, intptr_t slot) { - QListWidget::connect(self, static_cast(&QListWidget::itemSelectionChanged), self, [=]() { + MiqtVirtualQListWidget::connect(self, static_cast(&QListWidget::itemSelectionChanged), self, [=]() { miqt_exec_callback_QListWidget_ItemSelectionChanged(slot); }); } @@ -628,7 +1853,299 @@ void QListWidget_ScrollToItem2(QListWidget* self, QListWidgetItem* item, int hin self->scrollToItem(item, static_cast(hint)); } -void QListWidget_Delete(QListWidget* self) { - delete self; +void QListWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SetSelectionModel = slot; +} + +void QListWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QListWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DropEvent = slot; +} + +void QListWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QListWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__Event = slot; +} + +bool QListWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQListWidget*)(self) )->virtualbase_Event(e); +} + +void QListWidget_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QListWidget_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_MimeTypes(); +} + +void QListWidget_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MimeData = slot; +} + +QMimeData* QListWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QListWidgetItem* */ items) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_MimeData(items); +} + +void QListWidget_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DropMimeData = slot; +} + +bool QListWidget_virtualbase_DropMimeData(void* self, int index, QMimeData* data, int action) { + return ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DropMimeData(index, data, action); +} + +void QListWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SupportedDropActions = slot; +} + +int QListWidget_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_SupportedDropActions(); +} + +void QListWidget_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__VisualRect = slot; +} + +QRect* QListWidget_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_VisualRect(index); +} + +void QListWidget_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ScrollTo = slot; +} + +void QListWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QListWidget_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QListWidget_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_IndexAt(p); +} + +void QListWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DoItemsLayout = slot; +} + +void QListWidget_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DoItemsLayout(); +} + +void QListWidget_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__Reset = slot; +} + +void QListWidget_virtualbase_Reset(void* self) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_Reset(); +} + +void QListWidget_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SetRootIndex = slot; +} + +void QListWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetRootIndex(index); +} + +void QListWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ScrollContentsBy = slot; +} + +void QListWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QListWidget_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DataChanged = slot; +} + +void QListWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QListWidget_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__RowsInserted = slot; +} + +void QListWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QListWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QListWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QListWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QListWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QListWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QListWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QListWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__WheelEvent = slot; +} + +void QListWidget_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_WheelEvent(e); +} + +void QListWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__TimerEvent = slot; +} + +void QListWidget_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_TimerEvent(e); +} + +void QListWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QListWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_ResizeEvent(e); +} + +void QListWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QListWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QListWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QListWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QListWidget_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__StartDrag = slot; +} + +void QListWidget_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QListWidget_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__InitViewItemOption = slot; +} + +void QListWidget_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QListWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__PaintEvent = slot; +} + +void QListWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_PaintEvent(e); +} + +void QListWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__HorizontalOffset = slot; +} + +int QListWidget_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_HorizontalOffset(); +} + +void QListWidget_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__VerticalOffset = slot; +} + +int QListWidget_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_VerticalOffset(); +} + +void QListWidget_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QListWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQListWidget*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QListWidget_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SetSelection = slot; +} + +void QListWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QListWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QListWidget_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_SelectedIndexes(); +} + +void QListWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__UpdateGeometries = slot; +} + +void QListWidget_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_UpdateGeometries(); +} + +void QListWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__IsIndexHidden = slot; +} + +bool QListWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QListWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__CurrentChanged = slot; +} + +void QListWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QListWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QListWidget_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QListWidget_Delete(QListWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlistwidget.go b/qt6/gen_qlistwidget.go index d0abc9a3..76b85db4 100644 --- a/qt6/gen_qlistwidget.go +++ b/qt6/gen_qlistwidget.go @@ -22,7 +22,8 @@ const ( ) type QListWidgetItem struct { - h *C.QListWidgetItem + h *C.QListWidgetItem + isSubclass bool } func (this *QListWidgetItem) cPointer() *C.QListWidgetItem { @@ -39,6 +40,7 @@ func (this *QListWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQListWidgetItem constructs the type using only CGO pointers. func newQListWidgetItem(h *C.QListWidgetItem) *QListWidgetItem { if h == nil { return nil @@ -46,14 +48,23 @@ func newQListWidgetItem(h *C.QListWidgetItem) *QListWidgetItem { return &QListWidgetItem{h: h} } +// UnsafeNewQListWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQListWidgetItem(h unsafe.Pointer) *QListWidgetItem { - return newQListWidgetItem((*C.QListWidgetItem)(h)) + if h == nil { + return nil + } + + return &QListWidgetItem{h: (*C.QListWidgetItem)(h)} } // NewQListWidgetItem constructs a new QListWidgetItem object. func NewQListWidgetItem() *QListWidgetItem { - ret := C.QListWidgetItem_new() - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new(&outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem2 constructs a new QListWidgetItem object. @@ -62,8 +73,12 @@ func NewQListWidgetItem2(text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new2(text_ms) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new2(text_ms, &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem3 constructs a new QListWidgetItem object. @@ -72,26 +87,42 @@ func NewQListWidgetItem3(icon *QIcon, text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new3(icon.cPointer(), text_ms) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem4 constructs a new QListWidgetItem object. func NewQListWidgetItem4(other *QListWidgetItem) *QListWidgetItem { - ret := C.QListWidgetItem_new4(other.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new4(other.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem5 constructs a new QListWidgetItem object. func NewQListWidgetItem5(listview *QListWidget) *QListWidgetItem { - ret := C.QListWidgetItem_new5(listview.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new5(listview.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem6 constructs a new QListWidgetItem object. func NewQListWidgetItem6(listview *QListWidget, typeVal int) *QListWidgetItem { - ret := C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal)) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem7 constructs a new QListWidgetItem object. @@ -100,8 +131,12 @@ func NewQListWidgetItem7(text string, listview *QListWidget) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new7(text_ms, listview.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new7(text_ms, listview.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem8 constructs a new QListWidgetItem object. @@ -110,8 +145,12 @@ func NewQListWidgetItem8(text string, listview *QListWidget, typeVal int) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal)) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem9 constructs a new QListWidgetItem object. @@ -120,8 +159,12 @@ func NewQListWidgetItem9(icon *QIcon, text string, listview *QListWidget) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer()) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer(), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } // NewQListWidgetItem10 constructs a new QListWidgetItem object. @@ -130,8 +173,12 @@ func NewQListWidgetItem10(icon *QIcon, text string, listview *QListWidget, typeV text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal)) - return newQListWidgetItem(ret) + var outptr_QListWidgetItem *C.QListWidgetItem = nil + + C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) + ret := newQListWidgetItem(outptr_QListWidgetItem) + ret.isSubclass = true + return ret } func (this *QListWidgetItem) Clone() *QListWidgetItem { @@ -139,7 +186,7 @@ func (this *QListWidgetItem) Clone() *QListWidgetItem { } func (this *QListWidgetItem) ListWidget() *QListWidget { - return UnsafeNewQListWidget(unsafe.Pointer(C.QListWidgetItem_ListWidget(this.h))) + return UnsafeNewQListWidget(unsafe.Pointer(C.QListWidgetItem_ListWidget(this.h)), nil, nil, nil, nil, nil, nil, nil) } func (this *QListWidgetItem) SetSelected(selectVal bool) { @@ -336,9 +383,154 @@ func (this *QListWidgetItem) Type() int { return (int)(C.QListWidgetItem_Type(this.h)) } +func (this *QListWidgetItem) callVirtualBase_Clone() *QListWidgetItem { + + return UnsafeNewQListWidgetItem(unsafe.Pointer(C.QListWidgetItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QListWidgetItem) OnClone(slot func(super func() *QListWidgetItem) *QListWidgetItem) { + C.QListWidgetItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Clone +func miqt_exec_callback_QListWidgetItem_Clone(self *C.QListWidgetItem, cb C.intptr_t) *C.QListWidgetItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QListWidgetItem) *QListWidgetItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidgetItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QListWidgetItem) callVirtualBase_Data(role int) *QVariant { + + _ret := C.QListWidgetItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidgetItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) { + C.QListWidgetItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Data +func miqt_exec_callback_QListWidgetItem_Data(self *C.QListWidgetItem, cb C.intptr_t, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + virtualReturn := gofunc((&QListWidgetItem{h: self}).callVirtualBase_Data, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidgetItem) callVirtualBase_SetData(role int, value *QVariant) { + + C.QListWidgetItem_virtualbase_SetData(unsafe.Pointer(this.h), (C.int)(role), value.cPointer()) + +} +func (this *QListWidgetItem) OnSetData(slot func(super func(role int, value *QVariant), role int, value *QVariant)) { + C.QListWidgetItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_SetData +func miqt_exec_callback_QListWidgetItem_SetData(self *C.QListWidgetItem, cb C.intptr_t, role C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int, value *QVariant), role int, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QListWidgetItem) callVirtualBase_OperatorLesser(other *QListWidgetItem) bool { + + return (bool)(C.QListWidgetItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QListWidgetItem) OnOperatorLesser(slot func(super func(other *QListWidgetItem) bool, other *QListWidgetItem) bool) { + C.QListWidgetItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_OperatorLesser +func miqt_exec_callback_QListWidgetItem_OperatorLesser(self *C.QListWidgetItem, cb C.intptr_t, other *C.QListWidgetItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QListWidgetItem) bool, other *QListWidgetItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQListWidgetItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QListWidgetItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidgetItem) callVirtualBase_Read(in *QDataStream) { + + C.QListWidgetItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QListWidgetItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QListWidgetItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Read +func miqt_exec_callback_QListWidgetItem_Read(self *C.QListWidgetItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in), nil) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QListWidgetItem) callVirtualBase_Write(out *QDataStream) { + + C.QListWidgetItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QListWidgetItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QListWidgetItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidgetItem_Write +func miqt_exec_callback_QListWidgetItem_Write(self *C.QListWidgetItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out), nil) + + gofunc((&QListWidgetItem{h: self}).callVirtualBase_Write, slotval1) + +} + // Delete this object from C++ memory. func (this *QListWidgetItem) Delete() { - C.QListWidgetItem_Delete(this.h) + C.QListWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -351,7 +543,8 @@ func (this *QListWidgetItem) GoGC() { } type QListWidget struct { - h *C.QListWidget + h *C.QListWidget + isSubclass bool *QListView } @@ -369,27 +562,57 @@ func (this *QListWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQListWidget(h *C.QListWidget) *QListWidget { +// newQListWidget constructs the type using only CGO pointers. +func newQListWidget(h *C.QListWidget, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListWidget { if h == nil { return nil } - return &QListWidget{h: h, QListView: UnsafeNewQListView(unsafe.Pointer(h))} + return &QListWidget{h: h, + QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQListWidget(h unsafe.Pointer) *QListWidget { - return newQListWidget((*C.QListWidget)(h)) +// UnsafeNewQListWidget constructs the type using only unsafe pointers. +func UnsafeNewQListWidget(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListWidget { + if h == nil { + return nil + } + + return &QListWidget{h: (*C.QListWidget)(h), + QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQListWidget constructs a new QListWidget object. func NewQListWidget(parent *QWidget) *QListWidget { - ret := C.QListWidget_new(parent.cPointer()) - return newQListWidget(ret) + var outptr_QListWidget *C.QListWidget = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListWidget_new(parent.cPointer(), &outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQListWidget2 constructs a new QListWidget object. func NewQListWidget2() *QListWidget { - ret := C.QListWidget_new2() - return newQListWidget(ret) + var outptr_QListWidget *C.QListWidget = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QListWidget_new2(&outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QListWidget) MetaObject() *QMetaObject { @@ -551,7 +774,7 @@ func (this *QListWidget) IsPersistentEditorOpen(item *QListWidgetItem) bool { } func (this *QListWidget) ItemWidget(item *QListWidgetItem) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QListWidget_ItemWidget(this.h, item.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QListWidget_ItemWidget(this.h, item.cPointer())), nil, nil) } func (this *QListWidget) SetItemWidget(item *QListWidgetItem, widget *QWidget) { @@ -850,9 +1073,923 @@ func (this *QListWidget) ScrollToItem2(item *QListWidgetItem, hint QAbstractItem C.QListWidget_ScrollToItem2(this.h, item.cPointer(), (C.int)(hint)) } +func (this *QListWidget) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QListWidget_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QListWidget) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QListWidget_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SetSelectionModel +func miqt_exec_callback_QListWidget_SetSelectionModel(self *C.QListWidget, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QListWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QListWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QListWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QListWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DropEvent +func miqt_exec_callback_QListWidget_DropEvent(self *C.QListWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QListWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QListWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QListWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_Event +func miqt_exec_callback_QListWidget_Event(self *C.QListWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QListWidget_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QListWidget) OnMimeTypes(slot func(super func() []string) []string) { + C.QListWidget_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MimeTypes +func miqt_exec_callback_QListWidget_MimeTypes(self *C.QListWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QListWidget) callVirtualBase_MimeData(items []*QListWidgetItem) *QMimeData { + items_CArray := (*[0xffff]*C.QListWidgetItem)(C.malloc(C.size_t(8 * len(items)))) + defer C.free(unsafe.Pointer(items_CArray)) + for i := range items { + items_CArray[i] = items[i].cPointer() + } + items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QListWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)), nil) +} +func (this *QListWidget) OnMimeData(slot func(super func(items []*QListWidgetItem) *QMimeData, items []*QListWidgetItem) *QMimeData) { + C.QListWidget_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MimeData +func miqt_exec_callback_QListWidget_MimeData(self *C.QListWidget, cb C.intptr_t, items C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(items []*QListWidgetItem) *QMimeData, items []*QListWidgetItem) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var items_ma C.struct_miqt_array = items + items_ret := make([]*QListWidgetItem, int(items_ma.len)) + items_outCast := (*[0xffff]*C.QListWidgetItem)(unsafe.Pointer(items_ma.data)) // hey ya + for i := 0; i < int(items_ma.len); i++ { + items_ret[i] = UnsafeNewQListWidgetItem(unsafe.Pointer(items_outCast[i])) + } + slotval1 := items_ret + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_DropMimeData(index int, data *QMimeData, action DropAction) bool { + + return (bool)(C.QListWidget_virtualbase_DropMimeData(unsafe.Pointer(this.h), (C.int)(index), data.cPointer(), (C.int)(action))) + +} +func (this *QListWidget) OnDropMimeData(slot func(super func(index int, data *QMimeData, action DropAction) bool, index int, data *QMimeData, action DropAction) bool) { + C.QListWidget_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DropMimeData +func miqt_exec_callback_QListWidget_DropMimeData(self *C.QListWidget, cb C.intptr_t, index C.int, data *C.QMimeData, action C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int, data *QMimeData, action DropAction) bool, index int, data *QMimeData, action DropAction) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + slotval2 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval3 := (DropAction)(action) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QListWidget_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QListWidget) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QListWidget_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SupportedDropActions +func miqt_exec_callback_QListWidget_SupportedDropActions(self *C.QListWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QListWidget_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QListWidget_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_VisualRect +func miqt_exec_callback_QListWidget_VisualRect(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QListWidget_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QListWidget) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QListWidget_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ScrollTo +func miqt_exec_callback_QListWidget_ScrollTo(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QListWidget{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QListWidget_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QListWidget_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_IndexAt +func miqt_exec_callback_QListWidget_IndexAt(self *C.QListWidget, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_DoItemsLayout() { + + C.QListWidget_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QListWidget) OnDoItemsLayout(slot func(super func())) { + C.QListWidget_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DoItemsLayout +func miqt_exec_callback_QListWidget_DoItemsLayout(self *C.QListWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListWidget{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QListWidget) callVirtualBase_Reset() { + + C.QListWidget_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QListWidget) OnReset(slot func(super func())) { + C.QListWidget_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_Reset +func miqt_exec_callback_QListWidget_Reset(self *C.QListWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListWidget{h: self}).callVirtualBase_Reset) + +} + +func (this *QListWidget) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QListWidget_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QListWidget) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QListWidget_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SetRootIndex +func miqt_exec_callback_QListWidget_SetRootIndex(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QListWidget{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QListWidget) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QListWidget_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QListWidget) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QListWidget_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ScrollContentsBy +func miqt_exec_callback_QListWidget_ScrollContentsBy(self *C.QListWidget, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QListWidget{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QListWidget_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QListWidget) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QListWidget_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DataChanged +func miqt_exec_callback_QListWidget_DataChanged(self *C.QListWidget, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QListWidget{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QListWidget) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QListWidget_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListWidget) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListWidget_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_RowsInserted +func miqt_exec_callback_QListWidget_RowsInserted(self *C.QListWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListWidget{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QListWidget) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QListWidget_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QListWidget) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QListWidget_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_RowsAboutToBeRemoved +func miqt_exec_callback_QListWidget_RowsAboutToBeRemoved(self *C.QListWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QListWidget{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QListWidget) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QListWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MouseMoveEvent +func miqt_exec_callback_QListWidget_MouseMoveEvent(self *C.QListWidget, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QListWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QListWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MouseReleaseEvent +func miqt_exec_callback_QListWidget_MouseReleaseEvent(self *C.QListWidget, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QListWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QListWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_WheelEvent +func miqt_exec_callback_QListWidget_WheelEvent(self *C.QListWidget, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QListWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QListWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_TimerEvent +func miqt_exec_callback_QListWidget_TimerEvent(self *C.QListWidget, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QListWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QListWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ResizeEvent +func miqt_exec_callback_QListWidget_ResizeEvent(self *C.QListWidget, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QListWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QListWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DragMoveEvent +func miqt_exec_callback_QListWidget_DragMoveEvent(self *C.QListWidget, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QListWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QListWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_DragLeaveEvent +func miqt_exec_callback_QListWidget_DragLeaveEvent(self *C.QListWidget, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QListWidget_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QListWidget) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QListWidget_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_StartDrag +func miqt_exec_callback_QListWidget_StartDrag(self *C.QListWidget, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QListWidget{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QListWidget) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QListWidget_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QListWidget) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QListWidget_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_InitViewItemOption +func miqt_exec_callback_QListWidget_InitViewItemOption(self *C.QListWidget, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QListWidget) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QListWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QListWidget) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QListWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_PaintEvent +func miqt_exec_callback_QListWidget_PaintEvent(self *C.QListWidget, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QListWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QListWidget) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QListWidget_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListWidget) OnHorizontalOffset(slot func(super func() int) int) { + C.QListWidget_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_HorizontalOffset +func miqt_exec_callback_QListWidget_HorizontalOffset(self *C.QListWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_VerticalOffset() int { + + return (int)(C.QListWidget_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QListWidget) OnVerticalOffset(slot func(super func() int) int) { + C.QListWidget_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_VerticalOffset +func miqt_exec_callback_QListWidget_VerticalOffset(self *C.QListWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QListWidget_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QListWidget_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_MoveCursor +func miqt_exec_callback_QListWidget_MoveCursor(self *C.QListWidget, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QListWidget) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QListWidget_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QListWidget) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QListWidget_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SetSelection +func miqt_exec_callback_QListWidget_SetSelection(self *C.QListWidget, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QListWidget{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QListWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QListWidget) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QListWidget_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SelectedIndexes +func miqt_exec_callback_QListWidget_SelectedIndexes(self *C.QListWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QListWidget) callVirtualBase_UpdateGeometries() { + + C.QListWidget_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QListWidget) OnUpdateGeometries(slot func(super func())) { + C.QListWidget_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_UpdateGeometries +func miqt_exec_callback_QListWidget_UpdateGeometries(self *C.QListWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QListWidget{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QListWidget) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QListWidget_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QListWidget) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QListWidget_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_IsIndexHidden +func miqt_exec_callback_QListWidget_IsIndexHidden(self *C.QListWidget, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QListWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QListWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QListWidget) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QListWidget_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_CurrentChanged +func miqt_exec_callback_QListWidget_CurrentChanged(self *C.QListWidget, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QListWidget{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QListWidget) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QListWidget_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QListWidget_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_ViewportSizeHint +func miqt_exec_callback_QListWidget_ViewportSizeHint(self *C.QListWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QListWidget) Delete() { - C.QListWidget_Delete(this.h) + C.QListWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlistwidget.h b/qt6/gen_qlistwidget.h index 56eb5f85..9add824b 100644 --- a/qt6/gen_qlistwidget.h +++ b/qt6/gen_qlistwidget.h @@ -15,49 +15,81 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; class QBrush; class QDataStream; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; class QFont; +class QFrame; class QIcon; class QItemSelectionModel; +class QListView; class QListWidget; class QListWidgetItem; class QMetaObject; class QMimeData; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QResizeEvent; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; typedef struct QDataStream QDataStream; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QListView QListView; typedef struct QListWidget QListWidget; typedef struct QListWidgetItem QListWidgetItem; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QListWidgetItem* QListWidgetItem_new(); -QListWidgetItem* QListWidgetItem_new2(struct miqt_string text); -QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text); -QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other); -QListWidgetItem* QListWidgetItem_new5(QListWidget* listview); -QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal); -QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview); -QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal); -QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview); -QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal); +void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); +void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self); QListWidget* QListWidgetItem_ListWidget(const QListWidgetItem* self); void QListWidgetItem_SetSelected(QListWidgetItem* self, bool selectVal); @@ -97,10 +129,22 @@ void QListWidgetItem_Read(QListWidgetItem* self, QDataStream* in); void QListWidgetItem_Write(const QListWidgetItem* self, QDataStream* out); void QListWidgetItem_OperatorAssign(QListWidgetItem* self, QListWidgetItem* other); int QListWidgetItem_Type(const QListWidgetItem* self); -void QListWidgetItem_Delete(QListWidgetItem* self); +void QListWidgetItem_override_virtual_Clone(void* self, intptr_t slot); +QListWidgetItem* QListWidgetItem_virtualbase_Clone(const void* self); +void QListWidgetItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QListWidgetItem_virtualbase_Data(const void* self, int role); +void QListWidgetItem_override_virtual_SetData(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value); +void QListWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QListWidgetItem_virtualbase_OperatorLesser(const void* self, QListWidgetItem* other); +void QListWidgetItem_override_virtual_Read(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_Read(void* self, QDataStream* in); +void QListWidgetItem_override_virtual_Write(void* self, intptr_t slot); +void QListWidgetItem_virtualbase_Write(const void* self, QDataStream* out); +void QListWidgetItem_Delete(QListWidgetItem* self, bool isSubclass); -QListWidget* QListWidget_new(QWidget* parent); -QListWidget* QListWidget_new2(); +void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QListWidget_MetaObject(const QListWidget* self); void* QListWidget_Metacast(QListWidget* self, const char* param1); struct miqt_string QListWidget_Tr(const char* s); @@ -139,6 +183,7 @@ struct miqt_array /* of QListWidgetItem* */ QListWidget_FindItems(const QListWi struct miqt_array /* of QListWidgetItem* */ QListWidget_Items(const QListWidget* self, QMimeData* data); QModelIndex* QListWidget_IndexFromItem(const QListWidget* self, QListWidgetItem* item); QListWidgetItem* QListWidget_ItemFromIndex(const QListWidget* self, QModelIndex* index); +void QListWidget_DropEvent(QListWidget* self, QDropEvent* event); void QListWidget_ScrollToItem(QListWidget* self, QListWidgetItem* item); void QListWidget_Clear(QListWidget* self); void QListWidget_ItemPressed(QListWidget* self, QListWidgetItem* item); @@ -161,11 +206,88 @@ void QListWidget_CurrentRowChanged(QListWidget* self, int currentRow); void QListWidget_connect_CurrentRowChanged(QListWidget* self, intptr_t slot); void QListWidget_ItemSelectionChanged(QListWidget* self); void QListWidget_connect_ItemSelectionChanged(QListWidget* self, intptr_t slot); +bool QListWidget_Event(QListWidget* self, QEvent* e); +struct miqt_array /* of struct miqt_string */ QListWidget_MimeTypes(const QListWidget* self); +QMimeData* QListWidget_MimeData(const QListWidget* self, struct miqt_array /* of QListWidgetItem* */ items); +bool QListWidget_DropMimeData(QListWidget* self, int index, QMimeData* data, int action); +int QListWidget_SupportedDropActions(const QListWidget* self); struct miqt_string QListWidget_Tr2(const char* s, const char* c); struct miqt_string QListWidget_Tr3(const char* s, const char* c, int n); void QListWidget_SortItems1(QListWidget* self, int order); void QListWidget_ScrollToItem2(QListWidget* self, QListWidgetItem* item, int hint); -void QListWidget_Delete(QListWidget* self); +void QListWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QListWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QListWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QListWidget_override_virtual_Event(void* self, intptr_t slot); +bool QListWidget_virtualbase_Event(void* self, QEvent* e); +void QListWidget_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QListWidget_virtualbase_MimeTypes(const void* self); +void QListWidget_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QListWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QListWidgetItem* */ items); +void QListWidget_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QListWidget_virtualbase_DropMimeData(void* self, int index, QMimeData* data, int action); +void QListWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QListWidget_virtualbase_SupportedDropActions(const void* self); +void QListWidget_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QListWidget_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QListWidget_override_virtual_ScrollTo(void* self, intptr_t slot); +void QListWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QListWidget_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QListWidget_virtualbase_IndexAt(const void* self, QPoint* p); +void QListWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QListWidget_virtualbase_DoItemsLayout(void* self); +void QListWidget_override_virtual_Reset(void* self, intptr_t slot); +void QListWidget_virtualbase_Reset(void* self); +void QListWidget_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QListWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QListWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QListWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QListWidget_override_virtual_DataChanged(void* self, intptr_t slot); +void QListWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QListWidget_override_virtual_RowsInserted(void* self, intptr_t slot); +void QListWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QListWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QListWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QListWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QListWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QListWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QListWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QListWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QListWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QListWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QListWidget_override_virtual_StartDrag(void* self, intptr_t slot); +void QListWidget_virtualbase_StartDrag(void* self, int supportedActions); +void QListWidget_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QListWidget_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QListWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QListWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QListWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QListWidget_virtualbase_HorizontalOffset(const void* self); +void QListWidget_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QListWidget_virtualbase_VerticalOffset(const void* self); +void QListWidget_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QListWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QListWidget_override_virtual_SetSelection(void* self, intptr_t slot); +void QListWidget_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QListWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QListWidget_virtualbase_SelectedIndexes(const void* self); +void QListWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QListWidget_virtualbase_UpdateGeometries(void* self); +void QListWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QListWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QListWidget_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QListWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QListWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QListWidget_virtualbase_ViewportSizeHint(const void* self); +void QListWidget_Delete(QListWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlocale.cpp b/qt6/gen_qlocale.cpp index 873ab214..762c183a 100644 --- a/qt6/gen_qlocale.cpp +++ b/qt6/gen_qlocale.cpp @@ -11,33 +11,40 @@ #include "gen_qlocale.h" #include "_cgo_export.h" -QLocale* QLocale_new() { - return new QLocale(); +void QLocale_new(QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(); + *outptr_QLocale = ret; } -QLocale* QLocale_new2(struct miqt_string name) { +void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QLocale(name_QString); + QLocale* ret = new QLocale(name_QString); + *outptr_QLocale = ret; } -QLocale* QLocale_new3(uint16_t language, uint16_t territory) { - return new QLocale(static_cast(language), static_cast(territory)); +void QLocale_new3(uint16_t language, uint16_t territory, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language), static_cast(territory)); + *outptr_QLocale = ret; } -QLocale* QLocale_new4(uint16_t language) { - return new QLocale(static_cast(language)); +void QLocale_new4(uint16_t language, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language)); + *outptr_QLocale = ret; } -QLocale* QLocale_new5(QLocale* other) { - return new QLocale(*other); +void QLocale_new5(QLocale* other, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(*other); + *outptr_QLocale = ret; } -QLocale* QLocale_new6(uint16_t language, uint16_t script) { - return new QLocale(static_cast(language), static_cast(script)); +void QLocale_new6(uint16_t language, uint16_t script, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language), static_cast(script)); + *outptr_QLocale = ret; } -QLocale* QLocale_new7(uint16_t language, uint16_t script, uint16_t territory) { - return new QLocale(static_cast(language), static_cast(script), static_cast(territory)); +void QLocale_new7(uint16_t language, uint16_t script, uint16_t territory, QLocale** outptr_QLocale) { + QLocale* ret = new QLocale(static_cast(language), static_cast(script), static_cast(territory)); + *outptr_QLocale = ret; } void QLocale_OperatorAssign(QLocale* self, QLocale* other) { @@ -1363,7 +1370,11 @@ struct miqt_string QLocale_QuoteString2(const QLocale* self, struct miqt_string return _ms; } -void QLocale_Delete(QLocale* self) { - delete self; +void QLocale_Delete(QLocale* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlocale.go b/qt6/gen_qlocale.go index ff78f1b9..9b322d20 100644 --- a/qt6/gen_qlocale.go +++ b/qt6/gen_qlocale.go @@ -890,7 +890,8 @@ const ( ) type QLocale struct { - h *C.QLocale + h *C.QLocale + isSubclass bool } func (this *QLocale) cPointer() *C.QLocale { @@ -907,6 +908,7 @@ func (this *QLocale) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLocale constructs the type using only CGO pointers. func newQLocale(h *C.QLocale) *QLocale { if h == nil { return nil @@ -914,14 +916,23 @@ func newQLocale(h *C.QLocale) *QLocale { return &QLocale{h: h} } +// UnsafeNewQLocale constructs the type using only unsafe pointers. func UnsafeNewQLocale(h unsafe.Pointer) *QLocale { - return newQLocale((*C.QLocale)(h)) + if h == nil { + return nil + } + + return &QLocale{h: (*C.QLocale)(h)} } // NewQLocale constructs a new QLocale object. func NewQLocale() *QLocale { - ret := C.QLocale_new() - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new(&outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale2 constructs a new QLocale object. @@ -930,38 +941,62 @@ func NewQLocale2(name string) *QLocale { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QLocale_new2(name_ms) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new2(name_ms, &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale3 constructs a new QLocale object. func NewQLocale3(language QLocale__Language, territory QLocale__Country) *QLocale { - ret := C.QLocale_new3((C.uint16_t)(language), (C.uint16_t)(territory)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new3((C.uint16_t)(language), (C.uint16_t)(territory), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale4 constructs a new QLocale object. func NewQLocale4(language QLocale__Language) *QLocale { - ret := C.QLocale_new4((C.uint16_t)(language)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new4((C.uint16_t)(language), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale5 constructs a new QLocale object. func NewQLocale5(other *QLocale) *QLocale { - ret := C.QLocale_new5(other.cPointer()) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new5(other.cPointer(), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale6 constructs a new QLocale object. func NewQLocale6(language QLocale__Language, script QLocale__Script) *QLocale { - ret := C.QLocale_new6((C.uint16_t)(language), (C.uint16_t)(script)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new6((C.uint16_t)(language), (C.uint16_t)(script), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } // NewQLocale7 constructs a new QLocale object. func NewQLocale7(language QLocale__Language, script QLocale__Script, territory QLocale__Country) *QLocale { - ret := C.QLocale_new7((C.uint16_t)(language), (C.uint16_t)(script), (C.uint16_t)(territory)) - return newQLocale(ret) + var outptr_QLocale *C.QLocale = nil + + C.QLocale_new7((C.uint16_t)(language), (C.uint16_t)(script), (C.uint16_t)(territory), &outptr_QLocale) + ret := newQLocale(outptr_QLocale) + ret.isSubclass = true + return ret } func (this *QLocale) OperatorAssign(other *QLocale) { @@ -2112,7 +2147,7 @@ func (this *QLocale) QuoteString2(str string, style QLocale__QuotationStyle) str // Delete this object from C++ memory. func (this *QLocale) Delete() { - C.QLocale_Delete(this.h) + C.QLocale_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlocale.h b/qt6/gen_qlocale.h index 2b5fc188..2d7f3487 100644 --- a/qt6/gen_qlocale.h +++ b/qt6/gen_qlocale.h @@ -28,13 +28,13 @@ typedef struct QLocale QLocale; typedef struct QTime QTime; #endif -QLocale* QLocale_new(); -QLocale* QLocale_new2(struct miqt_string name); -QLocale* QLocale_new3(uint16_t language, uint16_t territory); -QLocale* QLocale_new4(uint16_t language); -QLocale* QLocale_new5(QLocale* other); -QLocale* QLocale_new6(uint16_t language, uint16_t script); -QLocale* QLocale_new7(uint16_t language, uint16_t script, uint16_t territory); +void QLocale_new(QLocale** outptr_QLocale); +void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale); +void QLocale_new3(uint16_t language, uint16_t territory, QLocale** outptr_QLocale); +void QLocale_new4(uint16_t language, QLocale** outptr_QLocale); +void QLocale_new5(QLocale* other, QLocale** outptr_QLocale); +void QLocale_new6(uint16_t language, uint16_t script, QLocale** outptr_QLocale); +void QLocale_new7(uint16_t language, uint16_t script, uint16_t territory, QLocale** outptr_QLocale); void QLocale_OperatorAssign(QLocale* self, QLocale* other); void QLocale_Swap(QLocale* self, QLocale* other); uint16_t QLocale_Language(const QLocale* self); @@ -177,7 +177,7 @@ struct miqt_string QLocale_FormattedDataSize2(const QLocale* self, long long byt struct miqt_string QLocale_FormattedDataSize3(const QLocale* self, long long bytes, int precision, int format); struct miqt_string QLocale_LanguageToCode2(uint16_t language, int codeTypes); struct miqt_string QLocale_QuoteString2(const QLocale* self, struct miqt_string str, int style); -void QLocale_Delete(QLocale* self); +void QLocale_Delete(QLocale* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qlockfile.cpp b/qt6/gen_qlockfile.cpp index b006341b..3f3e5ce0 100644 --- a/qt6/gen_qlockfile.cpp +++ b/qt6/gen_qlockfile.cpp @@ -6,9 +6,10 @@ #include "gen_qlockfile.h" #include "_cgo_export.h" -QLockFile* QLockFile_new(struct miqt_string fileName) { +void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QLockFile(fileName_QString); + QLockFile* ret = new QLockFile(fileName_QString); + *outptr_QLockFile = ret; } struct miqt_string QLockFile_FileName(const QLockFile* self) { @@ -59,7 +60,11 @@ bool QLockFile_TryLock1(QLockFile* self, int timeout) { return self->tryLock(static_cast(timeout)); } -void QLockFile_Delete(QLockFile* self) { - delete self; +void QLockFile_Delete(QLockFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qlockfile.go b/qt6/gen_qlockfile.go index 9449f7d2..4430447e 100644 --- a/qt6/gen_qlockfile.go +++ b/qt6/gen_qlockfile.go @@ -23,7 +23,8 @@ const ( ) type QLockFile struct { - h *C.QLockFile + h *C.QLockFile + isSubclass bool } func (this *QLockFile) cPointer() *C.QLockFile { @@ -40,6 +41,7 @@ func (this *QLockFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLockFile constructs the type using only CGO pointers. func newQLockFile(h *C.QLockFile) *QLockFile { if h == nil { return nil @@ -47,8 +49,13 @@ func newQLockFile(h *C.QLockFile) *QLockFile { return &QLockFile{h: h} } +// UnsafeNewQLockFile constructs the type using only unsafe pointers. func UnsafeNewQLockFile(h unsafe.Pointer) *QLockFile { - return newQLockFile((*C.QLockFile)(h)) + if h == nil { + return nil + } + + return &QLockFile{h: (*C.QLockFile)(h)} } // NewQLockFile constructs a new QLockFile object. @@ -57,8 +64,12 @@ func NewQLockFile(fileName string) *QLockFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QLockFile_new(fileName_ms) - return newQLockFile(ret) + var outptr_QLockFile *C.QLockFile = nil + + C.QLockFile_new(fileName_ms, &outptr_QLockFile) + ret := newQLockFile(outptr_QLockFile) + ret.isSubclass = true + return ret } func (this *QLockFile) FileName() string { @@ -106,7 +117,7 @@ func (this *QLockFile) TryLock1(timeout int) bool { // Delete this object from C++ memory. func (this *QLockFile) Delete() { - C.QLockFile_Delete(this.h) + C.QLockFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qlockfile.h b/qt6/gen_qlockfile.h index e202ca02..f74c5204 100644 --- a/qt6/gen_qlockfile.h +++ b/qt6/gen_qlockfile.h @@ -20,7 +20,7 @@ class QLockFile; typedef struct QLockFile QLockFile; #endif -QLockFile* QLockFile_new(struct miqt_string fileName); +void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile); struct miqt_string QLockFile_FileName(const QLockFile* self); bool QLockFile_Lock(QLockFile* self); bool QLockFile_TryLock(QLockFile* self); @@ -31,7 +31,7 @@ bool QLockFile_IsLocked(const QLockFile* self); bool QLockFile_RemoveStaleLockFile(QLockFile* self); int QLockFile_Error(const QLockFile* self); bool QLockFile_TryLock1(QLockFile* self, int timeout); -void QLockFile_Delete(QLockFile* self); +void QLockFile_Delete(QLockFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qloggingcategory.cpp b/qt6/gen_qloggingcategory.cpp index f7e39c04..e9926534 100644 --- a/qt6/gen_qloggingcategory.cpp +++ b/qt6/gen_qloggingcategory.cpp @@ -6,8 +6,9 @@ #include "gen_qloggingcategory.h" #include "_cgo_export.h" -QLoggingCategory* QLoggingCategory_new(const char* category) { - return new QLoggingCategory(category); +void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory) { + QLoggingCategory* ret = new QLoggingCategory(category); + *outptr_QLoggingCategory = ret; } bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self) { @@ -51,7 +52,11 @@ void QLoggingCategory_SetFilterRules(struct miqt_string rules) { QLoggingCategory::setFilterRules(rules_QString); } -void QLoggingCategory_Delete(QLoggingCategory* self) { - delete self; +void QLoggingCategory_Delete(QLoggingCategory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qloggingcategory.go b/qt6/gen_qloggingcategory.go index d747bf21..241d68cb 100644 --- a/qt6/gen_qloggingcategory.go +++ b/qt6/gen_qloggingcategory.go @@ -14,7 +14,8 @@ import ( ) type QLoggingCategory struct { - h *C.QLoggingCategory + h *C.QLoggingCategory + isSubclass bool } func (this *QLoggingCategory) cPointer() *C.QLoggingCategory { @@ -31,6 +32,7 @@ func (this *QLoggingCategory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQLoggingCategory constructs the type using only CGO pointers. func newQLoggingCategory(h *C.QLoggingCategory) *QLoggingCategory { if h == nil { return nil @@ -38,16 +40,25 @@ func newQLoggingCategory(h *C.QLoggingCategory) *QLoggingCategory { return &QLoggingCategory{h: h} } +// UnsafeNewQLoggingCategory constructs the type using only unsafe pointers. func UnsafeNewQLoggingCategory(h unsafe.Pointer) *QLoggingCategory { - return newQLoggingCategory((*C.QLoggingCategory)(h)) + if h == nil { + return nil + } + + return &QLoggingCategory{h: (*C.QLoggingCategory)(h)} } // NewQLoggingCategory constructs a new QLoggingCategory object. func NewQLoggingCategory(category string) *QLoggingCategory { category_Cstring := C.CString(category) defer C.free(unsafe.Pointer(category_Cstring)) - ret := C.QLoggingCategory_new(category_Cstring) - return newQLoggingCategory(ret) + var outptr_QLoggingCategory *C.QLoggingCategory = nil + + C.QLoggingCategory_new(category_Cstring, &outptr_QLoggingCategory) + ret := newQLoggingCategory(outptr_QLoggingCategory) + ret.isSubclass = true + return ret } func (this *QLoggingCategory) IsDebugEnabled() bool { @@ -93,7 +104,7 @@ func QLoggingCategory_SetFilterRules(rules string) { // Delete this object from C++ memory. func (this *QLoggingCategory) Delete() { - C.QLoggingCategory_Delete(this.h) + C.QLoggingCategory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qloggingcategory.h b/qt6/gen_qloggingcategory.h index 112ff57b..9415c5f5 100644 --- a/qt6/gen_qloggingcategory.h +++ b/qt6/gen_qloggingcategory.h @@ -20,7 +20,7 @@ class QLoggingCategory; typedef struct QLoggingCategory QLoggingCategory; #endif -QLoggingCategory* QLoggingCategory_new(const char* category); +void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory); bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsInfoEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsWarningEnabled(const QLoggingCategory* self); @@ -30,7 +30,7 @@ QLoggingCategory* QLoggingCategory_OperatorCall(QLoggingCategory* self); QLoggingCategory* QLoggingCategory_OperatorCall2(const QLoggingCategory* self); QLoggingCategory* QLoggingCategory_DefaultCategory(); void QLoggingCategory_SetFilterRules(struct miqt_string rules); -void QLoggingCategory_Delete(QLoggingCategory* self); +void QLoggingCategory_Delete(QLoggingCategory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmainwindow.cpp b/qt6/gen_qmainwindow.cpp index 59cb9a5c..79c56596 100644 --- a/qt6/gen_qmainwindow.cpp +++ b/qt6/gen_qmainwindow.cpp @@ -1,32 +1,1078 @@ +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include "gen_qmainwindow.h" #include "_cgo_export.h" -QMainWindow* QMainWindow_new(QWidget* parent) { - return new QMainWindow(parent); +class MiqtVirtualQMainWindow : public virtual QMainWindow { +public: + + MiqtVirtualQMainWindow(QWidget* parent): QMainWindow(parent) {}; + MiqtVirtualQMainWindow(): QMainWindow() {}; + MiqtVirtualQMainWindow(QWidget* parent, Qt::WindowFlags flags): QMainWindow(parent, flags) {}; + + virtual ~MiqtVirtualQMainWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreatePopupMenu = 0; + + // Subclass to allow providing a Go implementation + virtual QMenu* createPopupMenu() override { + if (handle__CreatePopupMenu == 0) { + return QMainWindow::createPopupMenu(); + } + + + QMenu* callback_return_value = miqt_exec_callback_QMainWindow_CreatePopupMenu(this, handle__CreatePopupMenu); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMenu* virtualbase_CreatePopupMenu() { + + return QMainWindow::createPopupMenu(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QMainWindow::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QMainWindow::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMainWindow::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMainWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMainWindow::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMainWindow::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMainWindow_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMainWindow::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMainWindow::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMainWindow_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMainWindow::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMainWindow::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMainWindow_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMainWindow::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMainWindow::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMainWindow_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMainWindow::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMainWindow::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMainWindow_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMainWindow::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMainWindow::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMainWindow_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMainWindow::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMainWindow::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMainWindow_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMainWindow::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QMainWindow::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QMainWindow::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QMainWindow::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QMainWindow::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QMainWindow::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QMainWindow::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QMainWindow::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QMainWindow::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QMainWindow::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QMainWindow::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QMainWindow::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QMainWindow::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMainWindow::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMainWindow::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QMainWindow::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QMainWindow::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QMainWindow::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QMainWindow::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QMainWindow::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QMainWindow::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QMainWindow::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QMainWindow::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QMainWindow::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QMainWindow::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QMainWindow::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QMainWindow::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QMainWindow::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QMainWindow::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMainWindow::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMainWindow::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMainWindow::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMainWindow::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QMainWindow::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QMainWindow::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMainWindow::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMainWindow::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMainWindow::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMainWindow::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMainWindow::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMainWindow::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMainWindow::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMainWindow::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMainWindow::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMainWindow::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QMainWindow::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QMainWindow_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QMainWindow::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QMainWindow::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QMainWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMainWindow::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QMainWindow::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMainWindow_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QMainWindow::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMainWindow::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMainWindow_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMainWindow::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMainWindow::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMainWindow_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMainWindow::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMainWindow::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMainWindow_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMainWindow::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMainWindow::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMainWindow_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMainWindow::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMainWindow::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMainWindow_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMainWindow::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMainWindow::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMainWindow_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMainWindow::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMainWindow::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMainWindow_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMainWindow::focusNextPrevChild(next); + + } + +}; + +void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent); + *outptr_QMainWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMainWindow* QMainWindow_new2() { - return new QMainWindow(); +void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(); + *outptr_QMainWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMainWindow* QMainWindow_new3(QWidget* parent, int flags) { - return new QMainWindow(parent, static_cast(flags)); +void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent, static_cast(flags)); + *outptr_QMainWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMainWindow_MetaObject(const QMainWindow* self) { @@ -296,7 +1342,7 @@ void QMainWindow_IconSizeChanged(QMainWindow* self, QSize* iconSize) { } void QMainWindow_connect_IconSizeChanged(QMainWindow* self, intptr_t slot) { - QMainWindow::connect(self, static_cast(&QMainWindow::iconSizeChanged), self, [=](const QSize& iconSize) { + MiqtVirtualQMainWindow::connect(self, static_cast(&QMainWindow::iconSizeChanged), self, [=](const QSize& iconSize) { const QSize& iconSize_ret = iconSize; // Cast returned reference into pointer QSize* sigval1 = const_cast(&iconSize_ret); @@ -309,7 +1355,7 @@ void QMainWindow_ToolButtonStyleChanged(QMainWindow* self, int toolButtonStyle) } void QMainWindow_connect_ToolButtonStyleChanged(QMainWindow* self, intptr_t slot) { - QMainWindow::connect(self, static_cast(&QMainWindow::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { + MiqtVirtualQMainWindow::connect(self, static_cast(&QMainWindow::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { Qt::ToolButtonStyle toolButtonStyle_ret = toolButtonStyle; int sigval1 = static_cast(toolButtonStyle_ret); miqt_exec_callback_QMainWindow_ToolButtonStyleChanged(slot, sigval1); @@ -321,7 +1367,7 @@ void QMainWindow_TabifiedDockWidgetActivated(QMainWindow* self, QDockWidget* doc } void QMainWindow_connect_TabifiedDockWidgetActivated(QMainWindow* self, intptr_t slot) { - QMainWindow::connect(self, static_cast(&QMainWindow::tabifiedDockWidgetActivated), self, [=](QDockWidget* dockWidget) { + MiqtVirtualQMainWindow::connect(self, static_cast(&QMainWindow::tabifiedDockWidgetActivated), self, [=](QDockWidget* dockWidget) { QDockWidget* sigval1 = dockWidget; miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(slot, sigval1); }); @@ -367,7 +1413,347 @@ bool QMainWindow_RestoreState2(QMainWindow* self, struct miqt_string state, int return self->restoreState(state_QByteArray, static_cast(version)); } -void QMainWindow_Delete(QMainWindow* self) { - delete self; +void QMainWindow_override_virtual_CreatePopupMenu(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__CreatePopupMenu = slot; +} + +QMenu* QMainWindow_virtualbase_CreatePopupMenu(void* self) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_CreatePopupMenu(); +} + +void QMainWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMainWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QMainWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__Event = slot; +} + +bool QMainWindow_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_Event(event); +} + +void QMainWindow_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DevType = slot; +} + +int QMainWindow_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_DevType(); +} + +void QMainWindow_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__SetVisible = slot; +} + +void QMainWindow_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_SetVisible(visible); +} + +void QMainWindow_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__SizeHint = slot; +} + +QSize* QMainWindow_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_SizeHint(); +} + +void QMainWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMainWindow_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMainWindow_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__HeightForWidth = slot; +} + +int QMainWindow_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMainWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMainWindow_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMainWindow_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMainWindow_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_PaintEngine(); +} + +void QMainWindow_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MousePressEvent = slot; +} + +void QMainWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MousePressEvent(event); +} + +void QMainWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMainWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QMainWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMainWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QMainWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMainWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QMainWindow_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__WheelEvent = slot; +} + +void QMainWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_WheelEvent(event); +} + +void QMainWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__KeyPressEvent = slot; +} + +void QMainWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QMainWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMainWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMainWindow_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__FocusInEvent = slot; +} + +void QMainWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_FocusInEvent(event); +} + +void QMainWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__FocusOutEvent = slot; +} + +void QMainWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QMainWindow_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__EnterEvent = slot; +} + +void QMainWindow_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_EnterEvent(event); +} + +void QMainWindow_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__LeaveEvent = slot; +} + +void QMainWindow_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_LeaveEvent(event); +} + +void QMainWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__PaintEvent = slot; +} + +void QMainWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_PaintEvent(event); +} + +void QMainWindow_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__MoveEvent = slot; +} + +void QMainWindow_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_MoveEvent(event); +} + +void QMainWindow_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ResizeEvent = slot; +} + +void QMainWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ResizeEvent(event); +} + +void QMainWindow_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__CloseEvent = slot; +} + +void QMainWindow_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_CloseEvent(event); +} + +void QMainWindow_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__TabletEvent = slot; +} + +void QMainWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_TabletEvent(event); +} + +void QMainWindow_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ActionEvent = slot; +} + +void QMainWindow_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ActionEvent(event); +} + +void QMainWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DragEnterEvent = slot; +} + +void QMainWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMainWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DragMoveEvent = slot; +} + +void QMainWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMainWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMainWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMainWindow_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__DropEvent = slot; +} + +void QMainWindow_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_DropEvent(event); +} + +void QMainWindow_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ShowEvent = slot; +} + +void QMainWindow_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ShowEvent(event); +} + +void QMainWindow_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__HideEvent = slot; +} + +void QMainWindow_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_HideEvent(event); +} + +void QMainWindow_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__NativeEvent = slot; +} + +bool QMainWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMainWindow_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__ChangeEvent = slot; +} + +void QMainWindow_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QMainWindow_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__Metric = slot; +} + +int QMainWindow_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_Metric(param1); +} + +void QMainWindow_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__InitPainter = slot; +} + +void QMainWindow_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_InitPainter(painter); +} + +void QMainWindow_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMainWindow_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_Redirected(offset); +} + +void QMainWindow_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMainWindow_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_SharedPainter(); +} + +void QMainWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__InputMethodEvent = slot; +} + +void QMainWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMainWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMainWindow_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMainWindow*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMainWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMainWindow*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMainWindow_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMainWindow*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMainWindow_Delete(QMainWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmainwindow.go b/qt6/gen_qmainwindow.go index 37167ab6..b7c03101 100644 --- a/qt6/gen_qmainwindow.go +++ b/qt6/gen_qmainwindow.go @@ -26,7 +26,8 @@ const ( ) type QMainWindow struct { - h *C.QMainWindow + h *C.QMainWindow + isSubclass bool *QWidget } @@ -44,33 +45,62 @@ func (this *QMainWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMainWindow(h *C.QMainWindow) *QMainWindow { +// newQMainWindow constructs the type using only CGO pointers. +func newQMainWindow(h *C.QMainWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMainWindow { if h == nil { return nil } - return &QMainWindow{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMainWindow{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMainWindow(h unsafe.Pointer) *QMainWindow { - return newQMainWindow((*C.QMainWindow)(h)) +// UnsafeNewQMainWindow constructs the type using only unsafe pointers. +func UnsafeNewQMainWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMainWindow { + if h == nil { + return nil + } + + return &QMainWindow{h: (*C.QMainWindow)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMainWindow constructs a new QMainWindow object. func NewQMainWindow(parent *QWidget) *QMainWindow { - ret := C.QMainWindow_new(parent.cPointer()) - return newQMainWindow(ret) + var outptr_QMainWindow *C.QMainWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMainWindow_new(parent.cPointer(), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMainWindow2 constructs a new QMainWindow object. func NewQMainWindow2() *QMainWindow { - ret := C.QMainWindow_new2() - return newQMainWindow(ret) + var outptr_QMainWindow *C.QMainWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMainWindow_new2(&outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMainWindow3 constructs a new QMainWindow object. func NewQMainWindow3(parent *QWidget, flags WindowType) *QMainWindow { - ret := C.QMainWindow_new3(parent.cPointer(), (C.int)(flags)) - return newQMainWindow(ret) + var outptr_QMainWindow *C.QMainWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMainWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMainWindow) MetaObject() *QMetaObject { @@ -156,7 +186,7 @@ func (this *QMainWindow) IsSeparator(pos *QPoint) bool { } func (this *QMainWindow) MenuBar() *QMenuBar { - return UnsafeNewQMenuBar(unsafe.Pointer(C.QMainWindow_MenuBar(this.h))) + return UnsafeNewQMenuBar(unsafe.Pointer(C.QMainWindow_MenuBar(this.h)), nil, nil, nil) } func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { @@ -164,7 +194,7 @@ func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { } func (this *QMainWindow) MenuWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_MenuWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_MenuWidget(this.h)), nil, nil) } func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { @@ -172,7 +202,7 @@ func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { } func (this *QMainWindow) StatusBar() *QStatusBar { - return UnsafeNewQStatusBar(unsafe.Pointer(C.QMainWindow_StatusBar(this.h))) + return UnsafeNewQStatusBar(unsafe.Pointer(C.QMainWindow_StatusBar(this.h)), nil, nil, nil) } func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { @@ -180,7 +210,7 @@ func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { } func (this *QMainWindow) CentralWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_CentralWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_CentralWidget(this.h)), nil, nil) } func (this *QMainWindow) SetCentralWidget(widget *QWidget) { @@ -188,7 +218,7 @@ func (this *QMainWindow) SetCentralWidget(widget *QWidget) { } func (this *QMainWindow) TakeCentralWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_TakeCentralWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMainWindow_TakeCentralWidget(this.h)), nil, nil) } func (this *QMainWindow) SetCorner(corner Corner, area DockWidgetArea) { @@ -220,7 +250,7 @@ func (this *QMainWindow) AddToolBarWithTitle(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQToolBar(unsafe.Pointer(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms))) + return UnsafeNewQToolBar(unsafe.Pointer(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms)), nil, nil, nil) } func (this *QMainWindow) InsertToolBar(before *QToolBar, toolbar *QToolBar) { @@ -268,7 +298,7 @@ func (this *QMainWindow) TabifiedDockWidgets(dockwidget *QDockWidget) []*QDockWi _ret := make([]*QDockWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QDockWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQDockWidget(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQDockWidget(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } @@ -316,7 +346,7 @@ func (this *QMainWindow) RestoreState(state []byte) bool { } func (this *QMainWindow) CreatePopupMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QMainWindow_CreatePopupMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMainWindow_CreatePopupMenu(this.h)), nil, nil, nil) } func (this *QMainWindow) SetAnimated(enabled bool) { @@ -386,7 +416,7 @@ func miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(cb C.intptr_t, d } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQDockWidget(unsafe.Pointer(dockWidget)) + slotval1 := UnsafeNewQDockWidget(unsafe.Pointer(dockWidget), nil, nil, nil) gofunc(slotval1) } @@ -431,9 +461,996 @@ func (this *QMainWindow) RestoreState2(state []byte, version int) bool { return (bool)(C.QMainWindow_RestoreState2(this.h, state_alias, (C.int)(version))) } +func (this *QMainWindow) callVirtualBase_CreatePopupMenu() *QMenu { + + return UnsafeNewQMenu(unsafe.Pointer(C.QMainWindow_virtualbase_CreatePopupMenu(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QMainWindow) OnCreatePopupMenu(slot func(super func() *QMenu) *QMenu) { + C.QMainWindow_override_virtual_CreatePopupMenu(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_CreatePopupMenu +func miqt_exec_callback_QMainWindow_CreatePopupMenu(self *C.QMainWindow, cb C.intptr_t) *C.QMenu { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMenu) *QMenu) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_CreatePopupMenu) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QMainWindow_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QMainWindow_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ContextMenuEvent +func miqt_exec_callback_QMainWindow_ContextMenuEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMainWindow_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMainWindow) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMainWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_Event +func miqt_exec_callback_QMainWindow_Event(self *C.QMainWindow, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_DevType() int { + + return (int)(C.QMainWindow_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMainWindow) OnDevType(slot func(super func() int) int) { + C.QMainWindow_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DevType +func miqt_exec_callback_QMainWindow_DevType(self *C.QMainWindow, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_SetVisible(visible bool) { + + C.QMainWindow_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMainWindow) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMainWindow_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_SetVisible +func miqt_exec_callback_QMainWindow_SetVisible(self *C.QMainWindow, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMainWindow{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMainWindow_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMainWindow) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMainWindow_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_SizeHint +func miqt_exec_callback_QMainWindow_SizeHint(self *C.QMainWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMainWindow_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMainWindow) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMainWindow_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MinimumSizeHint +func miqt_exec_callback_QMainWindow_MinimumSizeHint(self *C.QMainWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMainWindow_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMainWindow) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMainWindow_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_HeightForWidth +func miqt_exec_callback_QMainWindow_HeightForWidth(self *C.QMainWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMainWindow_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMainWindow) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMainWindow_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_HasHeightForWidth +func miqt_exec_callback_QMainWindow_HasHeightForWidth(self *C.QMainWindow, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMainWindow_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMainWindow) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMainWindow_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_PaintEngine +func miqt_exec_callback_QMainWindow_PaintEngine(self *C.QMainWindow, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MousePressEvent +func miqt_exec_callback_QMainWindow_MousePressEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MouseReleaseEvent +func miqt_exec_callback_QMainWindow_MouseReleaseEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MouseDoubleClickEvent +func miqt_exec_callback_QMainWindow_MouseDoubleClickEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QMainWindow_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMainWindow_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MouseMoveEvent +func miqt_exec_callback_QMainWindow_MouseMoveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QMainWindow_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QMainWindow_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_WheelEvent +func miqt_exec_callback_QMainWindow_WheelEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QMainWindow_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMainWindow_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_KeyPressEvent +func miqt_exec_callback_QMainWindow_KeyPressEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMainWindow_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMainWindow_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_KeyReleaseEvent +func miqt_exec_callback_QMainWindow_KeyReleaseEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QMainWindow_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMainWindow_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_FocusInEvent +func miqt_exec_callback_QMainWindow_FocusInEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QMainWindow_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMainWindow_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_FocusOutEvent +func miqt_exec_callback_QMainWindow_FocusOutEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QMainWindow_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QMainWindow_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_EnterEvent +func miqt_exec_callback_QMainWindow_EnterEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QMainWindow_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMainWindow_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_LeaveEvent +func miqt_exec_callback_QMainWindow_LeaveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QMainWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QMainWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_PaintEvent +func miqt_exec_callback_QMainWindow_PaintEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QMainWindow_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QMainWindow_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_MoveEvent +func miqt_exec_callback_QMainWindow_MoveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QMainWindow_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QMainWindow_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ResizeEvent +func miqt_exec_callback_QMainWindow_ResizeEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMainWindow_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMainWindow_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_CloseEvent +func miqt_exec_callback_QMainWindow_CloseEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMainWindow_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMainWindow_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_TabletEvent +func miqt_exec_callback_QMainWindow_TabletEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QMainWindow_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QMainWindow_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ActionEvent +func miqt_exec_callback_QMainWindow_ActionEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMainWindow_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMainWindow_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DragEnterEvent +func miqt_exec_callback_QMainWindow_DragEnterEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMainWindow_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMainWindow_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DragMoveEvent +func miqt_exec_callback_QMainWindow_DragMoveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMainWindow_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMainWindow_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DragLeaveEvent +func miqt_exec_callback_QMainWindow_DragLeaveEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMainWindow_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMainWindow_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_DropEvent +func miqt_exec_callback_QMainWindow_DropEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMainWindow_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMainWindow_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ShowEvent +func miqt_exec_callback_QMainWindow_ShowEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QMainWindow_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMainWindow) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QMainWindow_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_HideEvent +func miqt_exec_callback_QMainWindow_HideEvent(self *C.QMainWindow, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMainWindow_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QMainWindow) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QMainWindow_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_NativeEvent +func miqt_exec_callback_QMainWindow_NativeEvent(self *C.QMainWindow, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QMainWindow_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMainWindow) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMainWindow_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_ChangeEvent +func miqt_exec_callback_QMainWindow_ChangeEvent(self *C.QMainWindow, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMainWindow_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMainWindow) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMainWindow_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_Metric +func miqt_exec_callback_QMainWindow_Metric(self *C.QMainWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMainWindow) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMainWindow_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMainWindow) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMainWindow_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_InitPainter +func miqt_exec_callback_QMainWindow_InitPainter(self *C.QMainWindow, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMainWindow{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMainWindow_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMainWindow) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMainWindow_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_Redirected +func miqt_exec_callback_QMainWindow_Redirected(self *C.QMainWindow, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMainWindow_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMainWindow) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMainWindow_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_SharedPainter +func miqt_exec_callback_QMainWindow_SharedPainter(self *C.QMainWindow, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMainWindow_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMainWindow) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMainWindow_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_InputMethodEvent +func miqt_exec_callback_QMainWindow_InputMethodEvent(self *C.QMainWindow, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMainWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMainWindow) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMainWindow_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMainWindow) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMainWindow_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_InputMethodQuery +func miqt_exec_callback_QMainWindow_InputMethodQuery(self *C.QMainWindow, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMainWindow) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMainWindow_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMainWindow) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMainWindow_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMainWindow_FocusNextPrevChild +func miqt_exec_callback_QMainWindow_FocusNextPrevChild(self *C.QMainWindow, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMainWindow{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMainWindow) Delete() { - C.QMainWindow_Delete(this.h) + C.QMainWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmainwindow.h b/qt6/gen_qmainwindow.h index 26385e88..ee958c5a 100644 --- a/qt6/gen_qmainwindow.h +++ b/qt6/gen_qmainwindow.h @@ -15,34 +15,84 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; class QByteArray; +class QCloseEvent; +class QContextMenuEvent; class QDockWidget; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMainWindow; class QMenu; class QMenuBar; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QStatusBar; +class QTabletEvent; class QToolBar; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMainWindow QMainWindow; typedef struct QMenu QMenu; typedef struct QMenuBar QMenuBar; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QStatusBar QStatusBar; +typedef struct QTabletEvent QTabletEvent; typedef struct QToolBar QToolBar; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMainWindow* QMainWindow_new(QWidget* parent); -QMainWindow* QMainWindow_new2(); -QMainWindow* QMainWindow_new3(QWidget* parent, int flags); +void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMainWindow_MetaObject(const QMainWindow* self); void* QMainWindow_Metacast(QMainWindow* self, const char* param1); struct miqt_string QMainWindow_Tr(const char* s); @@ -104,12 +154,98 @@ void QMainWindow_ToolButtonStyleChanged(QMainWindow* self, int toolButtonStyle); void QMainWindow_connect_ToolButtonStyleChanged(QMainWindow* self, intptr_t slot); void QMainWindow_TabifiedDockWidgetActivated(QMainWindow* self, QDockWidget* dockWidget); void QMainWindow_connect_TabifiedDockWidgetActivated(QMainWindow* self, intptr_t slot); +void QMainWindow_ContextMenuEvent(QMainWindow* self, QContextMenuEvent* event); +bool QMainWindow_Event(QMainWindow* self, QEvent* event); struct miqt_string QMainWindow_Tr2(const char* s, const char* c); struct miqt_string QMainWindow_Tr3(const char* s, const char* c, int n); void QMainWindow_AddToolBarBreak1(QMainWindow* self, int area); struct miqt_string QMainWindow_SaveState1(const QMainWindow* self, int version); bool QMainWindow_RestoreState2(QMainWindow* self, struct miqt_string state, int version); -void QMainWindow_Delete(QMainWindow* self); +void QMainWindow_override_virtual_CreatePopupMenu(void* self, intptr_t slot); +QMenu* QMainWindow_virtualbase_CreatePopupMenu(void* self); +void QMainWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QMainWindow_override_virtual_Event(void* self, intptr_t slot); +bool QMainWindow_virtualbase_Event(void* self, QEvent* event); +void QMainWindow_override_virtual_DevType(void* self, intptr_t slot); +int QMainWindow_virtualbase_DevType(const void* self); +void QMainWindow_override_virtual_SetVisible(void* self, intptr_t slot); +void QMainWindow_virtualbase_SetVisible(void* self, bool visible); +void QMainWindow_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMainWindow_virtualbase_SizeHint(const void* self); +void QMainWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMainWindow_virtualbase_MinimumSizeHint(const void* self); +void QMainWindow_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMainWindow_virtualbase_HeightForWidth(const void* self, int param1); +void QMainWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMainWindow_virtualbase_HasHeightForWidth(const void* self); +void QMainWindow_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMainWindow_virtualbase_PaintEngine(const void* self); +void QMainWindow_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QMainWindow_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QMainWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QMainWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMainWindow_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QMainWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QMainWindow_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QMainWindow_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_LeaveEvent(void* self, QEvent* event); +void QMainWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QMainWindow_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QMainWindow_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QMainWindow_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMainWindow_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMainWindow_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QMainWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMainWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMainWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMainWindow_override_virtual_DropEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMainWindow_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMainWindow_override_virtual_HideEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_HideEvent(void* self, QHideEvent* event); +void QMainWindow_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMainWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QMainWindow_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QMainWindow_override_virtual_Metric(void* self, intptr_t slot); +int QMainWindow_virtualbase_Metric(const void* self, int param1); +void QMainWindow_override_virtual_InitPainter(void* self, intptr_t slot); +void QMainWindow_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMainWindow_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMainWindow_virtualbase_Redirected(const void* self, QPoint* offset); +void QMainWindow_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMainWindow_virtualbase_SharedPainter(const void* self); +void QMainWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMainWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMainWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMainWindow_virtualbase_InputMethodQuery(const void* self, int param1); +void QMainWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMainWindow_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMainWindow_Delete(QMainWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmargins.cpp b/qt6/gen_qmargins.cpp index 2d1079f8..b5d4f963 100644 --- a/qt6/gen_qmargins.cpp +++ b/qt6/gen_qmargins.cpp @@ -4,16 +4,19 @@ #include "gen_qmargins.h" #include "_cgo_export.h" -QMargins* QMargins_new() { - return new QMargins(); +void QMargins_new(QMargins** outptr_QMargins) { + QMargins* ret = new QMargins(); + *outptr_QMargins = ret; } -QMargins* QMargins_new2(int left, int top, int right, int bottom) { - return new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); +void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins) { + QMargins* ret = new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + *outptr_QMargins = ret; } -QMargins* QMargins_new3(QMargins* param1) { - return new QMargins(*param1); +void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins) { + QMargins* ret = new QMargins(*param1); + *outptr_QMargins = ret; } bool QMargins_IsNull(const QMargins* self) { @@ -104,24 +107,32 @@ QMarginsF* QMargins_ToMarginsF(const QMargins* self) { return new QMarginsF(self->toMarginsF()); } -void QMargins_Delete(QMargins* self) { - delete self; +void QMargins_Delete(QMargins* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMarginsF* QMarginsF_new() { - return new QMarginsF(); +void QMarginsF_new(QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(); + *outptr_QMarginsF = ret; } -QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom) { - return new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); +void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + *outptr_QMarginsF = ret; } -QMarginsF* QMarginsF_new3(QMargins* margins) { - return new QMarginsF(*margins); +void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(*margins); + *outptr_QMarginsF = ret; } -QMarginsF* QMarginsF_new4(QMarginsF* param1) { - return new QMarginsF(*param1); +void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF) { + QMarginsF* ret = new QMarginsF(*param1); + *outptr_QMarginsF = ret; } bool QMarginsF_IsNull(const QMarginsF* self) { @@ -204,7 +215,11 @@ QMargins* QMarginsF_ToMargins(const QMarginsF* self) { return new QMargins(self->toMargins()); } -void QMarginsF_Delete(QMarginsF* self) { - delete self; +void QMarginsF_Delete(QMarginsF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmargins.go b/qt6/gen_qmargins.go index 3f9a95fa..9db0df7b 100644 --- a/qt6/gen_qmargins.go +++ b/qt6/gen_qmargins.go @@ -14,7 +14,8 @@ import ( ) type QMargins struct { - h *C.QMargins + h *C.QMargins + isSubclass bool } func (this *QMargins) cPointer() *C.QMargins { @@ -31,6 +32,7 @@ func (this *QMargins) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMargins constructs the type using only CGO pointers. func newQMargins(h *C.QMargins) *QMargins { if h == nil { return nil @@ -38,26 +40,43 @@ func newQMargins(h *C.QMargins) *QMargins { return &QMargins{h: h} } +// UnsafeNewQMargins constructs the type using only unsafe pointers. func UnsafeNewQMargins(h unsafe.Pointer) *QMargins { - return newQMargins((*C.QMargins)(h)) + if h == nil { + return nil + } + + return &QMargins{h: (*C.QMargins)(h)} } // NewQMargins constructs a new QMargins object. func NewQMargins() *QMargins { - ret := C.QMargins_new() - return newQMargins(ret) + var outptr_QMargins *C.QMargins = nil + + C.QMargins_new(&outptr_QMargins) + ret := newQMargins(outptr_QMargins) + ret.isSubclass = true + return ret } // NewQMargins2 constructs a new QMargins object. func NewQMargins2(left int, top int, right int, bottom int) *QMargins { - ret := C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom)) - return newQMargins(ret) + var outptr_QMargins *C.QMargins = nil + + C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom), &outptr_QMargins) + ret := newQMargins(outptr_QMargins) + ret.isSubclass = true + return ret } // NewQMargins3 constructs a new QMargins object. func NewQMargins3(param1 *QMargins) *QMargins { - ret := C.QMargins_new3(param1.cPointer()) - return newQMargins(ret) + var outptr_QMargins *C.QMargins = nil + + C.QMargins_new3(param1.cPointer(), &outptr_QMargins) + ret := newQMargins(outptr_QMargins) + ret.isSubclass = true + return ret } func (this *QMargins) IsNull() bool { @@ -137,7 +156,7 @@ func (this *QMargins) ToMarginsF() *QMarginsF { // Delete this object from C++ memory. func (this *QMargins) Delete() { - C.QMargins_Delete(this.h) + C.QMargins_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -150,7 +169,8 @@ func (this *QMargins) GoGC() { } type QMarginsF struct { - h *C.QMarginsF + h *C.QMarginsF + isSubclass bool } func (this *QMarginsF) cPointer() *C.QMarginsF { @@ -167,6 +187,7 @@ func (this *QMarginsF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMarginsF constructs the type using only CGO pointers. func newQMarginsF(h *C.QMarginsF) *QMarginsF { if h == nil { return nil @@ -174,32 +195,53 @@ func newQMarginsF(h *C.QMarginsF) *QMarginsF { return &QMarginsF{h: h} } +// UnsafeNewQMarginsF constructs the type using only unsafe pointers. func UnsafeNewQMarginsF(h unsafe.Pointer) *QMarginsF { - return newQMarginsF((*C.QMarginsF)(h)) + if h == nil { + return nil + } + + return &QMarginsF{h: (*C.QMarginsF)(h)} } // NewQMarginsF constructs a new QMarginsF object. func NewQMarginsF() *QMarginsF { - ret := C.QMarginsF_new() - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new(&outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } // NewQMarginsF2 constructs a new QMarginsF object. func NewQMarginsF2(left float64, top float64, right float64, bottom float64) *QMarginsF { - ret := C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom)) - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom), &outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } // NewQMarginsF3 constructs a new QMarginsF object. func NewQMarginsF3(margins *QMargins) *QMarginsF { - ret := C.QMarginsF_new3(margins.cPointer()) - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new3(margins.cPointer(), &outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } // NewQMarginsF4 constructs a new QMarginsF object. func NewQMarginsF4(param1 *QMarginsF) *QMarginsF { - ret := C.QMarginsF_new4(param1.cPointer()) - return newQMarginsF(ret) + var outptr_QMarginsF *C.QMarginsF = nil + + C.QMarginsF_new4(param1.cPointer(), &outptr_QMarginsF) + ret := newQMarginsF(outptr_QMarginsF) + ret.isSubclass = true + return ret } func (this *QMarginsF) IsNull() bool { @@ -271,7 +313,7 @@ func (this *QMarginsF) ToMargins() *QMargins { // Delete this object from C++ memory. func (this *QMarginsF) Delete() { - C.QMarginsF_Delete(this.h) + C.QMarginsF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmargins.h b/qt6/gen_qmargins.h index 3b4cf10f..5f3d4281 100644 --- a/qt6/gen_qmargins.h +++ b/qt6/gen_qmargins.h @@ -22,9 +22,9 @@ typedef struct QMargins QMargins; typedef struct QMarginsF QMarginsF; #endif -QMargins* QMargins_new(); -QMargins* QMargins_new2(int left, int top, int right, int bottom); -QMargins* QMargins_new3(QMargins* param1); +void QMargins_new(QMargins** outptr_QMargins); +void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins); +void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins); bool QMargins_IsNull(const QMargins* self); int QMargins_Left(const QMargins* self); int QMargins_Top(const QMargins* self); @@ -43,12 +43,12 @@ QMargins* QMargins_OperatorDivideAssign(QMargins* self, int param1); QMargins* QMargins_OperatorMultiplyAssignWithQreal(QMargins* self, double param1); QMargins* QMargins_OperatorDivideAssignWithQreal(QMargins* self, double param1); QMarginsF* QMargins_ToMarginsF(const QMargins* self); -void QMargins_Delete(QMargins* self); +void QMargins_Delete(QMargins* self, bool isSubclass); -QMarginsF* QMarginsF_new(); -QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom); -QMarginsF* QMarginsF_new3(QMargins* margins); -QMarginsF* QMarginsF_new4(QMarginsF* param1); +void QMarginsF_new(QMarginsF** outptr_QMarginsF); +void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF); +void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF); +void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF); bool QMarginsF_IsNull(const QMarginsF* self); double QMarginsF_Left(const QMarginsF* self); double QMarginsF_Top(const QMarginsF* self); @@ -65,7 +65,7 @@ QMarginsF* QMarginsF_OperatorMinusAssignWithSubtrahend(QMarginsF* self, double s QMarginsF* QMarginsF_OperatorMultiplyAssign(QMarginsF* self, double factor); QMarginsF* QMarginsF_OperatorDivideAssign(QMarginsF* self, double divisor); QMargins* QMarginsF_ToMargins(const QMarginsF* self); -void QMarginsF_Delete(QMarginsF* self); +void QMarginsF_Delete(QMarginsF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmatrix4x4.cpp b/qt6/gen_qmatrix4x4.cpp index e45f81db..19877df0 100644 --- a/qt6/gen_qmatrix4x4.cpp +++ b/qt6/gen_qmatrix4x4.cpp @@ -11,32 +11,39 @@ #include "gen_qmatrix4x4.h" #include "_cgo_export.h" -QMatrix4x4* QMatrix4x4_new() { - return new QMatrix4x4(); +void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new2(int param1) { - return new QMatrix4x4(static_cast(param1)); +void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(param1)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new3(const float* values) { - return new QMatrix4x4(static_cast(values)); +void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(values)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { - return new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); +void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows) { - return new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); +void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new6(QTransform* transform) { - return new QMatrix4x4(*transform); +void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(*transform); + *outptr_QMatrix4x4 = ret; } -QMatrix4x4* QMatrix4x4_new7(QMatrix4x4* param1) { - return new QMatrix4x4(*param1); +void QMatrix4x4_new7(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4) { + QMatrix4x4* ret = new QMatrix4x4(*param1); + *outptr_QMatrix4x4 = ret; } QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index) { @@ -278,7 +285,11 @@ void QMatrix4x4_Viewport6(QMatrix4x4* self, float left, float bottom, float widt self->viewport(static_cast(left), static_cast(bottom), static_cast(width), static_cast(height), static_cast(nearPlane), static_cast(farPlane)); } -void QMatrix4x4_Delete(QMatrix4x4* self) { - delete self; +void QMatrix4x4_Delete(QMatrix4x4* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmatrix4x4.go b/qt6/gen_qmatrix4x4.go index edbe5bdc..08af9c69 100644 --- a/qt6/gen_qmatrix4x4.go +++ b/qt6/gen_qmatrix4x4.go @@ -26,7 +26,8 @@ const ( ) type QMatrix4x4 struct { - h *C.QMatrix4x4 + h *C.QMatrix4x4 + isSubclass bool } func (this *QMatrix4x4) cPointer() *C.QMatrix4x4 { @@ -43,6 +44,7 @@ func (this *QMatrix4x4) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMatrix4x4 constructs the type using only CGO pointers. func newQMatrix4x4(h *C.QMatrix4x4) *QMatrix4x4 { if h == nil { return nil @@ -50,50 +52,83 @@ func newQMatrix4x4(h *C.QMatrix4x4) *QMatrix4x4 { return &QMatrix4x4{h: h} } +// UnsafeNewQMatrix4x4 constructs the type using only unsafe pointers. func UnsafeNewQMatrix4x4(h unsafe.Pointer) *QMatrix4x4 { - return newQMatrix4x4((*C.QMatrix4x4)(h)) + if h == nil { + return nil + } + + return &QMatrix4x4{h: (*C.QMatrix4x4)(h)} } // NewQMatrix4x4 constructs a new QMatrix4x4 object. func NewQMatrix4x4() *QMatrix4x4 { - ret := C.QMatrix4x4_new() - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new(&outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x42 constructs a new QMatrix4x4 object. func NewQMatrix4x42(param1 Initialization) *QMatrix4x4 { - ret := C.QMatrix4x4_new2((C.int)(param1)) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new2((C.int)(param1), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x43 constructs a new QMatrix4x4 object. func NewQMatrix4x43(values *float32) *QMatrix4x4 { - ret := C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values))) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values)), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x44 constructs a new QMatrix4x4 object. func NewQMatrix4x44(m11 float32, m12 float32, m13 float32, m14 float32, m21 float32, m22 float32, m23 float32, m24 float32, m31 float32, m32 float32, m33 float32, m34 float32, m41 float32, m42 float32, m43 float32, m44 float32) *QMatrix4x4 { - ret := C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44)) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x45 constructs a new QMatrix4x4 object. func NewQMatrix4x45(values *float32, cols int, rows int) *QMatrix4x4 { - ret := C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows)) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x46 constructs a new QMatrix4x4 object. func NewQMatrix4x46(transform *QTransform) *QMatrix4x4 { - ret := C.QMatrix4x4_new6(transform.cPointer()) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new6(transform.cPointer(), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } // NewQMatrix4x47 constructs a new QMatrix4x4 object. func NewQMatrix4x47(param1 *QMatrix4x4) *QMatrix4x4 { - ret := C.QMatrix4x4_new7(param1.cPointer()) - return newQMatrix4x4(ret) + var outptr_QMatrix4x4 *C.QMatrix4x4 = nil + + C.QMatrix4x4_new7(param1.cPointer(), &outptr_QMatrix4x4) + ret := newQMatrix4x4(outptr_QMatrix4x4) + ret.isSubclass = true + return ret } func (this *QMatrix4x4) Column(index int) *QVector4D { @@ -368,7 +403,7 @@ func (this *QMatrix4x4) Viewport6(left float32, bottom float32, width float32, h // Delete this object from C++ memory. func (this *QMatrix4x4) Delete() { - C.QMatrix4x4_Delete(this.h) + C.QMatrix4x4_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmatrix4x4.h b/qt6/gen_qmatrix4x4.h index c2405440..8a3bbee9 100644 --- a/qt6/gen_qmatrix4x4.h +++ b/qt6/gen_qmatrix4x4.h @@ -36,13 +36,13 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QMatrix4x4* QMatrix4x4_new(); -QMatrix4x4* QMatrix4x4_new2(int param1); -QMatrix4x4* QMatrix4x4_new3(const float* values); -QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44); -QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows); -QMatrix4x4* QMatrix4x4_new6(QTransform* transform); -QMatrix4x4* QMatrix4x4_new7(QMatrix4x4* param1); +void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4); +void QMatrix4x4_new7(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4); QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index); void QMatrix4x4_SetColumn(QMatrix4x4* self, int index, QVector4D* value); QVector4D* QMatrix4x4_Row(const QMatrix4x4* self, int index); @@ -100,7 +100,7 @@ QMatrix4x4* QMatrix4x4_Inverted1(const QMatrix4x4* self, bool* invertible); void QMatrix4x4_Rotate4(QMatrix4x4* self, float angle, float x, float y, float z); void QMatrix4x4_Viewport5(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane); void QMatrix4x4_Viewport6(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane, float farPlane); -void QMatrix4x4_Delete(QMatrix4x4* self); +void QMatrix4x4_Delete(QMatrix4x4* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmdiarea.cpp b/qt6/gen_qmdiarea.cpp index 2c673ff5..02a57e09 100644 --- a/qt6/gen_qmdiarea.cpp +++ b/qt6/gen_qmdiarea.cpp @@ -1,23 +1,632 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include "gen_qmdiarea.h" #include "_cgo_export.h" -QMdiArea* QMdiArea_new(QWidget* parent) { - return new QMdiArea(parent); +class MiqtVirtualQMdiArea : public virtual QMdiArea { +public: + + MiqtVirtualQMdiArea(QWidget* parent): QMdiArea(parent) {}; + MiqtVirtualQMdiArea(): QMdiArea() {}; + + virtual ~MiqtVirtualQMdiArea() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMdiArea::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiArea_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMdiArea::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMdiArea::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiArea_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMdiArea::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QMdiArea::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QMdiArea_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QMdiArea::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMdiArea::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMdiArea_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMdiArea::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMdiArea::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMdiArea_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QMdiArea::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* paintEvent) override { + if (handle__PaintEvent == 0) { + QMdiArea::paintEvent(paintEvent); + return; + } + + QPaintEvent* sigval1 = paintEvent; + + miqt_exec_callback_QMdiArea_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* paintEvent) { + + QMdiArea::paintEvent(paintEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* childEvent) override { + if (handle__ChildEvent == 0) { + QMdiArea::childEvent(childEvent); + return; + } + + QChildEvent* sigval1 = childEvent; + + miqt_exec_callback_QMdiArea_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* childEvent) { + + QMdiArea::childEvent(childEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* resizeEvent) override { + if (handle__ResizeEvent == 0) { + QMdiArea::resizeEvent(resizeEvent); + return; + } + + QResizeEvent* sigval1 = resizeEvent; + + miqt_exec_callback_QMdiArea_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* resizeEvent) { + + QMdiArea::resizeEvent(resizeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* timerEvent) override { + if (handle__TimerEvent == 0) { + QMdiArea::timerEvent(timerEvent); + return; + } + + QTimerEvent* sigval1 = timerEvent; + + miqt_exec_callback_QMdiArea_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* timerEvent) { + + QMdiArea::timerEvent(timerEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* showEvent) override { + if (handle__ShowEvent == 0) { + QMdiArea::showEvent(showEvent); + return; + } + + QShowEvent* sigval1 = showEvent; + + miqt_exec_callback_QMdiArea_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* showEvent) { + + QMdiArea::showEvent(showEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QMdiArea::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMdiArea_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QMdiArea::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QMdiArea::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QMdiArea_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QMdiArea::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QMdiArea::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QMdiArea::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QMdiArea::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QMdiArea::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QMdiArea::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QMdiArea::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QMdiArea::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QMdiArea::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QMdiArea::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QMdiArea::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QMdiArea::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QMdiArea::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QMdiArea::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QMdiArea::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QMdiArea::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QMdiArea::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QMdiArea::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QMdiArea::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QMdiArea::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QMdiArea::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QMdiArea::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QMdiArea_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QMdiArea::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QMdiArea::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiArea_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QMdiArea::viewportSizeHint()); + + } + +}; + +void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(parent); + *outptr_QMdiArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMdiArea* QMdiArea_new2() { - return new QMdiArea(); +void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(); + *outptr_QMdiArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMdiArea_MetaObject(const QMdiArea* self) { @@ -157,7 +766,7 @@ void QMdiArea_SubWindowActivated(QMdiArea* self, QMdiSubWindow* param1) { } void QMdiArea_connect_SubWindowActivated(QMdiArea* self, intptr_t slot) { - QMdiArea::connect(self, static_cast(&QMdiArea::subWindowActivated), self, [=](QMdiSubWindow* param1) { + MiqtVirtualQMdiArea::connect(self, static_cast(&QMdiArea::subWindowActivated), self, [=](QMdiSubWindow* param1) { QMdiSubWindow* sigval1 = param1; miqt_exec_callback_QMdiArea_SubWindowActivated(slot, sigval1); }); @@ -234,7 +843,203 @@ void QMdiArea_SetOption2(QMdiArea* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QMdiArea_Delete(QMdiArea* self) { - delete self; +void QMdiArea_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__SizeHint = slot; +} + +QSize* QMdiArea_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMdiArea*)(self) )->virtualbase_SizeHint(); +} + +void QMdiArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMdiArea_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMdiArea*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMdiArea_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__SetupViewport = slot; +} + +void QMdiArea_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QMdiArea_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__Event = slot; +} + +bool QMdiArea_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_Event(event); +} + +void QMdiArea_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__EventFilter = slot; +} + +bool QMdiArea_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_EventFilter(object, event); +} + +void QMdiArea_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__PaintEvent = slot; +} + +void QMdiArea_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_PaintEvent(paintEvent); +} + +void QMdiArea_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ChildEvent = slot; +} + +void QMdiArea_virtualbase_ChildEvent(void* self, QChildEvent* childEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ChildEvent(childEvent); +} + +void QMdiArea_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ResizeEvent = slot; +} + +void QMdiArea_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ResizeEvent(resizeEvent); +} + +void QMdiArea_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__TimerEvent = slot; +} + +void QMdiArea_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_TimerEvent(timerEvent); +} + +void QMdiArea_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ShowEvent = slot; +} + +void QMdiArea_virtualbase_ShowEvent(void* self, QShowEvent* showEvent) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ShowEvent(showEvent); +} + +void QMdiArea_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ViewportEvent = slot; +} + +bool QMdiArea_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ViewportEvent(event); +} + +void QMdiArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ScrollContentsBy = slot; +} + +void QMdiArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QMdiArea_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MousePressEvent = slot; +} + +void QMdiArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QMdiArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMdiArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QMdiArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMdiArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QMdiArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMdiArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QMdiArea_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__WheelEvent = slot; +} + +void QMdiArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_WheelEvent(param1); +} + +void QMdiArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMdiArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QMdiArea_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DragEnterEvent = slot; +} + +void QMdiArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QMdiArea_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DragMoveEvent = slot; +} + +void QMdiArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QMdiArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMdiArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QMdiArea_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__DropEvent = slot; +} + +void QMdiArea_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_DropEvent(param1); +} + +void QMdiArea_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__KeyPressEvent = slot; +} + +void QMdiArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQMdiArea*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QMdiArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiArea*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QMdiArea_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQMdiArea*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QMdiArea_Delete(QMdiArea* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmdiarea.go b/qt6/gen_qmdiarea.go index fc447e25..cb906f48 100644 --- a/qt6/gen_qmdiarea.go +++ b/qt6/gen_qmdiarea.go @@ -36,7 +36,8 @@ const ( ) type QMdiArea struct { - h *C.QMdiArea + h *C.QMdiArea + isSubclass bool *QAbstractScrollArea } @@ -54,27 +55,53 @@ func (this *QMdiArea) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMdiArea(h *C.QMdiArea) *QMdiArea { +// newQMdiArea constructs the type using only CGO pointers. +func newQMdiArea(h *C.QMdiArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiArea { if h == nil { return nil } - return &QMdiArea{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QMdiArea{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMdiArea(h unsafe.Pointer) *QMdiArea { - return newQMdiArea((*C.QMdiArea)(h)) +// UnsafeNewQMdiArea constructs the type using only unsafe pointers. +func UnsafeNewQMdiArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiArea { + if h == nil { + return nil + } + + return &QMdiArea{h: (*C.QMdiArea)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMdiArea constructs a new QMdiArea object. func NewQMdiArea(parent *QWidget) *QMdiArea { - ret := C.QMdiArea_new(parent.cPointer()) - return newQMdiArea(ret) + var outptr_QMdiArea *C.QMdiArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiArea_new(parent.cPointer(), &outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMdiArea2 constructs a new QMdiArea object. func NewQMdiArea2() *QMdiArea { - ret := C.QMdiArea_new2() - return newQMdiArea(ret) + var outptr_QMdiArea *C.QMdiArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiArea_new2(&outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMdiArea) MetaObject() *QMetaObject { @@ -111,11 +138,11 @@ func (this *QMdiArea) MinimumSizeHint() *QSize { } func (this *QMdiArea) CurrentSubWindow() *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_CurrentSubWindow(this.h))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_CurrentSubWindow(this.h)), nil, nil, nil) } func (this *QMdiArea) ActiveSubWindow() *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_ActiveSubWindow(this.h))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_ActiveSubWindow(this.h)), nil, nil, nil) } func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { @@ -123,13 +150,13 @@ func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } func (this *QMdiArea) AddSubWindow(widget *QWidget) *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow(this.h, widget.cPointer()))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow(this.h, widget.cPointer())), nil, nil, nil) } func (this *QMdiArea) RemoveSubWindow(widget *QWidget) { @@ -226,7 +253,7 @@ func miqt_exec_callback_QMdiArea_SubWindowActivated(cb C.intptr_t, param1 *C.QMd } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQMdiSubWindow(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQMdiSubWindow(unsafe.Pointer(param1), nil, nil, nil) gofunc(slotval1) } @@ -286,22 +313,589 @@ func (this *QMdiArea) SubWindowList1(order QMdiArea__WindowOrder) []*QMdiSubWind _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQMdiSubWindow(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } func (this *QMdiArea) AddSubWindow2(widget *QWidget, flags WindowType) *QMdiSubWindow { - return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags)))) + return UnsafeNewQMdiSubWindow(unsafe.Pointer(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags))), nil, nil, nil) } func (this *QMdiArea) SetOption2(option QMdiArea__AreaOption, on bool) { C.QMdiArea_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } +func (this *QMdiArea) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMdiArea_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiArea) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiArea_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_SizeHint +func miqt_exec_callback_QMdiArea_SizeHint(self *C.QMdiArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiArea) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMdiArea_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiArea) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiArea_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MinimumSizeHint +func miqt_exec_callback_QMdiArea_MinimumSizeHint(self *C.QMdiArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiArea) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QMdiArea_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QMdiArea) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QMdiArea_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_SetupViewport +func miqt_exec_callback_QMdiArea_SetupViewport(self *C.QMdiArea, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMdiArea_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMdiArea) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMdiArea_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_Event +func miqt_exec_callback_QMdiArea_Event(self *C.QMdiArea, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiArea) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QMdiArea_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QMdiArea) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QMdiArea_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_EventFilter +func miqt_exec_callback_QMdiArea_EventFilter(self *C.QMdiArea, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiArea) callVirtualBase_PaintEvent(paintEvent *QPaintEvent) { + + C.QMdiArea_virtualbase_PaintEvent(unsafe.Pointer(this.h), paintEvent.cPointer()) + +} +func (this *QMdiArea) OnPaintEvent(slot func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) { + C.QMdiArea_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_PaintEvent +func miqt_exec_callback_QMdiArea_PaintEvent(self *C.QMdiArea, cb C.intptr_t, paintEvent *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(paintEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ChildEvent(childEvent *QChildEvent) { + + C.QMdiArea_virtualbase_ChildEvent(unsafe.Pointer(this.h), childEvent.cPointer()) + +} +func (this *QMdiArea) OnChildEvent(slot func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) { + C.QMdiArea_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ChildEvent +func miqt_exec_callback_QMdiArea_ChildEvent(self *C.QMdiArea, cb C.intptr_t, childEvent *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(childEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ResizeEvent(resizeEvent *QResizeEvent) { + + C.QMdiArea_virtualbase_ResizeEvent(unsafe.Pointer(this.h), resizeEvent.cPointer()) + +} +func (this *QMdiArea) OnResizeEvent(slot func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) { + C.QMdiArea_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ResizeEvent +func miqt_exec_callback_QMdiArea_ResizeEvent(self *C.QMdiArea, cb C.intptr_t, resizeEvent *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(resizeEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_TimerEvent(timerEvent *QTimerEvent) { + + C.QMdiArea_virtualbase_TimerEvent(unsafe.Pointer(this.h), timerEvent.cPointer()) + +} +func (this *QMdiArea) OnTimerEvent(slot func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) { + C.QMdiArea_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_TimerEvent +func miqt_exec_callback_QMdiArea_TimerEvent(self *C.QMdiArea, cb C.intptr_t, timerEvent *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(timerEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ShowEvent(showEvent *QShowEvent) { + + C.QMdiArea_virtualbase_ShowEvent(unsafe.Pointer(this.h), showEvent.cPointer()) + +} +func (this *QMdiArea) OnShowEvent(slot func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) { + C.QMdiArea_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ShowEvent +func miqt_exec_callback_QMdiArea_ShowEvent(self *C.QMdiArea, cb C.intptr_t, showEvent *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(showEvent), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QMdiArea_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMdiArea) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMdiArea_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ViewportEvent +func miqt_exec_callback_QMdiArea_ViewportEvent(self *C.QMdiArea, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiArea) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QMdiArea_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QMdiArea) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QMdiArea_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ScrollContentsBy +func miqt_exec_callback_QMdiArea_ScrollContentsBy(self *C.QMdiArea, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QMdiArea) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MousePressEvent +func miqt_exec_callback_QMdiArea_MousePressEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MouseReleaseEvent +func miqt_exec_callback_QMdiArea_MouseReleaseEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MouseDoubleClickEvent +func miqt_exec_callback_QMdiArea_MouseDoubleClickEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QMdiArea_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMdiArea_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_MouseMoveEvent +func miqt_exec_callback_QMdiArea_MouseMoveEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QMdiArea_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QMdiArea_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_WheelEvent +func miqt_exec_callback_QMdiArea_WheelEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QMdiArea_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QMdiArea_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ContextMenuEvent +func miqt_exec_callback_QMdiArea_ContextMenuEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QMdiArea_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QMdiArea_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DragEnterEvent +func miqt_exec_callback_QMdiArea_DragEnterEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DragMoveEvent(param1 *QDragMoveEvent) { + + C.QMdiArea_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDragMoveEvent(slot func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) { + C.QMdiArea_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DragMoveEvent +func miqt_exec_callback_QMdiArea_DragMoveEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DragLeaveEvent(param1 *QDragLeaveEvent) { + + C.QMdiArea_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDragLeaveEvent(slot func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) { + C.QMdiArea_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DragLeaveEvent +func miqt_exec_callback_QMdiArea_DragLeaveEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QMdiArea_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QMdiArea_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_DropEvent +func miqt_exec_callback_QMdiArea_DropEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QMdiArea_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiArea) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QMdiArea_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_KeyPressEvent +func miqt_exec_callback_QMdiArea_KeyPressEvent(self *C.QMdiArea, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMdiArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMdiArea) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QMdiArea_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiArea) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiArea_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiArea_ViewportSizeHint +func miqt_exec_callback_QMdiArea_ViewportSizeHint(self *C.QMdiArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiArea{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QMdiArea) Delete() { - C.QMdiArea_Delete(this.h) + C.QMdiArea_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmdiarea.h b/qt6/gen_qmdiarea.h index ecb69ee5..728fee2a 100644 --- a/qt6/gen_qmdiarea.h +++ b/qt6/gen_qmdiarea.h @@ -15,23 +15,59 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QBrush; +class QChildEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; +class QKeyEvent; class QMdiArea; class QMdiSubWindow; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QSize; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QMdiArea QMdiArea; typedef struct QMdiSubWindow QMdiSubWindow; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMdiArea* QMdiArea_new(QWidget* parent); -QMdiArea* QMdiArea_new2(); +void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMdiArea_MetaObject(const QMdiArea* self); void* QMdiArea_Metacast(QMdiArea* self, const char* param1); struct miqt_string QMdiArea_Tr(const char* s); @@ -69,12 +105,70 @@ void QMdiArea_CloseActiveSubWindow(QMdiArea* self); void QMdiArea_CloseAllSubWindows(QMdiArea* self); void QMdiArea_ActivateNextSubWindow(QMdiArea* self); void QMdiArea_ActivatePreviousSubWindow(QMdiArea* self); +void QMdiArea_SetupViewport(QMdiArea* self, QWidget* viewport); +bool QMdiArea_Event(QMdiArea* self, QEvent* event); +bool QMdiArea_EventFilter(QMdiArea* self, QObject* object, QEvent* event); +void QMdiArea_PaintEvent(QMdiArea* self, QPaintEvent* paintEvent); +void QMdiArea_ChildEvent(QMdiArea* self, QChildEvent* childEvent); +void QMdiArea_ResizeEvent(QMdiArea* self, QResizeEvent* resizeEvent); +void QMdiArea_TimerEvent(QMdiArea* self, QTimerEvent* timerEvent); +void QMdiArea_ShowEvent(QMdiArea* self, QShowEvent* showEvent); +bool QMdiArea_ViewportEvent(QMdiArea* self, QEvent* event); +void QMdiArea_ScrollContentsBy(QMdiArea* self, int dx, int dy); struct miqt_string QMdiArea_Tr2(const char* s, const char* c); struct miqt_string QMdiArea_Tr3(const char* s, const char* c, int n); struct miqt_array /* of QMdiSubWindow* */ QMdiArea_SubWindowList1(const QMdiArea* self, int order); QMdiSubWindow* QMdiArea_AddSubWindow2(QMdiArea* self, QWidget* widget, int flags); void QMdiArea_SetOption2(QMdiArea* self, int option, bool on); -void QMdiArea_Delete(QMdiArea* self); +void QMdiArea_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMdiArea_virtualbase_SizeHint(const void* self); +void QMdiArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMdiArea_virtualbase_MinimumSizeHint(const void* self); +void QMdiArea_override_virtual_SetupViewport(void* self, intptr_t slot); +void QMdiArea_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QMdiArea_override_virtual_Event(void* self, intptr_t slot); +bool QMdiArea_virtualbase_Event(void* self, QEvent* event); +void QMdiArea_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMdiArea_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QMdiArea_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent); +void QMdiArea_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ChildEvent(void* self, QChildEvent* childEvent); +void QMdiArea_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent); +void QMdiArea_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent); +void QMdiArea_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ShowEvent(void* self, QShowEvent* showEvent); +void QMdiArea_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QMdiArea_virtualbase_ViewportEvent(void* self, QEvent* event); +void QMdiArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QMdiArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QMdiArea_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QMdiArea_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QMdiArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QMdiArea_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QMdiArea_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QMdiArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QMdiArea_override_virtual_DropEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QMdiArea_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMdiArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QMdiArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QMdiArea_virtualbase_ViewportSizeHint(const void* self); +void QMdiArea_Delete(QMdiArea* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmdisubwindow.cpp b/qt6/gen_qmdisubwindow.cpp index 1e237800..5193f759 100644 --- a/qt6/gen_qmdisubwindow.cpp +++ b/qt6/gen_qmdisubwindow.cpp @@ -1,26 +1,1126 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qmdisubwindow.h" #include "_cgo_export.h" -QMdiSubWindow* QMdiSubWindow_new(QWidget* parent) { - return new QMdiSubWindow(parent); +class MiqtVirtualQMdiSubWindow : public virtual QMdiSubWindow { +public: + + MiqtVirtualQMdiSubWindow(QWidget* parent): QMdiSubWindow(parent) {}; + MiqtVirtualQMdiSubWindow(): QMdiSubWindow() {}; + MiqtVirtualQMdiSubWindow(QWidget* parent, Qt::WindowFlags flags): QMdiSubWindow(parent, flags) {}; + + virtual ~MiqtVirtualQMdiSubWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMdiSubWindow::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiSubWindow_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMdiSubWindow::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMdiSubWindow::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMdiSubWindow_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMdiSubWindow::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMdiSubWindow::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QMdiSubWindow::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMdiSubWindow::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMdiSubWindow::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* showEvent) override { + if (handle__ShowEvent == 0) { + QMdiSubWindow::showEvent(showEvent); + return; + } + + QShowEvent* sigval1 = showEvent; + + miqt_exec_callback_QMdiSubWindow_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* showEvent) { + + QMdiSubWindow::showEvent(showEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* hideEvent) override { + if (handle__HideEvent == 0) { + QMdiSubWindow::hideEvent(hideEvent); + return; + } + + QHideEvent* sigval1 = hideEvent; + + miqt_exec_callback_QMdiSubWindow_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* hideEvent) { + + QMdiSubWindow::hideEvent(hideEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* changeEvent) override { + if (handle__ChangeEvent == 0) { + QMdiSubWindow::changeEvent(changeEvent); + return; + } + + QEvent* sigval1 = changeEvent; + + miqt_exec_callback_QMdiSubWindow_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* changeEvent) { + + QMdiSubWindow::changeEvent(changeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* closeEvent) override { + if (handle__CloseEvent == 0) { + QMdiSubWindow::closeEvent(closeEvent); + return; + } + + QCloseEvent* sigval1 = closeEvent; + + miqt_exec_callback_QMdiSubWindow_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* closeEvent) { + + QMdiSubWindow::closeEvent(closeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* leaveEvent) override { + if (handle__LeaveEvent == 0) { + QMdiSubWindow::leaveEvent(leaveEvent); + return; + } + + QEvent* sigval1 = leaveEvent; + + miqt_exec_callback_QMdiSubWindow_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* leaveEvent) { + + QMdiSubWindow::leaveEvent(leaveEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* resizeEvent) override { + if (handle__ResizeEvent == 0) { + QMdiSubWindow::resizeEvent(resizeEvent); + return; + } + + QResizeEvent* sigval1 = resizeEvent; + + miqt_exec_callback_QMdiSubWindow_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* resizeEvent) { + + QMdiSubWindow::resizeEvent(resizeEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* timerEvent) override { + if (handle__TimerEvent == 0) { + QMdiSubWindow::timerEvent(timerEvent); + return; + } + + QTimerEvent* sigval1 = timerEvent; + + miqt_exec_callback_QMdiSubWindow_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* timerEvent) { + + QMdiSubWindow::timerEvent(timerEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* moveEvent) override { + if (handle__MoveEvent == 0) { + QMdiSubWindow::moveEvent(moveEvent); + return; + } + + QMoveEvent* sigval1 = moveEvent; + + miqt_exec_callback_QMdiSubWindow_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* moveEvent) { + + QMdiSubWindow::moveEvent(moveEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* paintEvent) override { + if (handle__PaintEvent == 0) { + QMdiSubWindow::paintEvent(paintEvent); + return; + } + + QPaintEvent* sigval1 = paintEvent; + + miqt_exec_callback_QMdiSubWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* paintEvent) { + + QMdiSubWindow::paintEvent(paintEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* mouseEvent) override { + if (handle__MousePressEvent == 0) { + QMdiSubWindow::mousePressEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mousePressEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseDoubleClickEvent == 0) { + QMdiSubWindow::mouseDoubleClickEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mouseDoubleClickEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseReleaseEvent == 0) { + QMdiSubWindow::mouseReleaseEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mouseReleaseEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseMoveEvent == 0) { + QMdiSubWindow::mouseMoveEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QMdiSubWindow_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* mouseEvent) { + + QMdiSubWindow::mouseMoveEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* keyEvent) override { + if (handle__KeyPressEvent == 0) { + QMdiSubWindow::keyPressEvent(keyEvent); + return; + } + + QKeyEvent* sigval1 = keyEvent; + + miqt_exec_callback_QMdiSubWindow_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* keyEvent) { + + QMdiSubWindow::keyPressEvent(keyEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* contextMenuEvent) override { + if (handle__ContextMenuEvent == 0) { + QMdiSubWindow::contextMenuEvent(contextMenuEvent); + return; + } + + QContextMenuEvent* sigval1 = contextMenuEvent; + + miqt_exec_callback_QMdiSubWindow_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* contextMenuEvent) { + + QMdiSubWindow::contextMenuEvent(contextMenuEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* focusInEvent) override { + if (handle__FocusInEvent == 0) { + QMdiSubWindow::focusInEvent(focusInEvent); + return; + } + + QFocusEvent* sigval1 = focusInEvent; + + miqt_exec_callback_QMdiSubWindow_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* focusInEvent) { + + QMdiSubWindow::focusInEvent(focusInEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* focusOutEvent) override { + if (handle__FocusOutEvent == 0) { + QMdiSubWindow::focusOutEvent(focusOutEvent); + return; + } + + QFocusEvent* sigval1 = focusOutEvent; + + miqt_exec_callback_QMdiSubWindow_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* focusOutEvent) { + + QMdiSubWindow::focusOutEvent(focusOutEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* childEvent) override { + if (handle__ChildEvent == 0) { + QMdiSubWindow::childEvent(childEvent); + return; + } + + QChildEvent* sigval1 = childEvent; + + miqt_exec_callback_QMdiSubWindow_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* childEvent) { + + QMdiSubWindow::childEvent(childEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMdiSubWindow::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMdiSubWindow_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMdiSubWindow::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMdiSubWindow::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMdiSubWindow_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMdiSubWindow::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMdiSubWindow::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMdiSubWindow_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMdiSubWindow::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMdiSubWindow::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMdiSubWindow::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMdiSubWindow::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMdiSubWindow_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMdiSubWindow::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QMdiSubWindow::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QMdiSubWindow::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMdiSubWindow::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMdiSubWindow::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QMdiSubWindow::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QMdiSubWindow::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMdiSubWindow::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMdiSubWindow::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QMdiSubWindow::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QMdiSubWindow::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMdiSubWindow::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMdiSubWindow::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMdiSubWindow::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMdiSubWindow::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMdiSubWindow::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMdiSubWindow::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMdiSubWindow::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMdiSubWindow_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMdiSubWindow::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QMdiSubWindow::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMdiSubWindow::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMdiSubWindow::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMdiSubWindow_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMdiSubWindow::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMdiSubWindow::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMdiSubWindow_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMdiSubWindow::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMdiSubWindow::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMdiSubWindow_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMdiSubWindow::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMdiSubWindow::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMdiSubWindow_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMdiSubWindow::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMdiSubWindow::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMdiSubWindow_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMdiSubWindow::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMdiSubWindow::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMdiSubWindow_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMdiSubWindow::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMdiSubWindow::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMdiSubWindow_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMdiSubWindow::focusNextPrevChild(next); + + } + +}; + +void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent); + *outptr_QMdiSubWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMdiSubWindow* QMdiSubWindow_new2() { - return new QMdiSubWindow(); +void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(); + *outptr_QMdiSubWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags) { - return new QMdiSubWindow(parent, static_cast(flags)); +void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent, static_cast(flags)); + *outptr_QMdiSubWindow = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self) { @@ -111,7 +1211,7 @@ void QMdiSubWindow_WindowStateChanged(QMdiSubWindow* self, int oldState, int new } void QMdiSubWindow_connect_WindowStateChanged(QMdiSubWindow* self, intptr_t slot) { - QMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::windowStateChanged), self, [=](Qt::WindowStates oldState, Qt::WindowStates newState) { + MiqtVirtualQMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::windowStateChanged), self, [=](Qt::WindowStates oldState, Qt::WindowStates newState) { Qt::WindowStates oldState_ret = oldState; int sigval1 = static_cast(oldState_ret); Qt::WindowStates newState_ret = newState; @@ -125,7 +1225,7 @@ void QMdiSubWindow_AboutToActivate(QMdiSubWindow* self) { } void QMdiSubWindow_connect_AboutToActivate(QMdiSubWindow* self, intptr_t slot) { - QMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::aboutToActivate), self, [=]() { + MiqtVirtualQMdiSubWindow::connect(self, static_cast(&QMdiSubWindow::aboutToActivate), self, [=]() { miqt_exec_callback_QMdiSubWindow_AboutToActivate(slot); }); } @@ -164,7 +1264,363 @@ void QMdiSubWindow_SetOption2(QMdiSubWindow* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QMdiSubWindow_Delete(QMdiSubWindow* self) { - delete self; +void QMdiSubWindow_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__SizeHint = slot; +} + +QSize* QMdiSubWindow_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_SizeHint(); +} + +void QMdiSubWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMdiSubWindow_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMdiSubWindow_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__EventFilter = slot; +} + +bool QMdiSubWindow_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_EventFilter(object, event); +} + +void QMdiSubWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__Event = slot; +} + +bool QMdiSubWindow_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_Event(event); +} + +void QMdiSubWindow_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ShowEvent = slot; +} + +void QMdiSubWindow_virtualbase_ShowEvent(void* self, QShowEvent* showEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ShowEvent(showEvent); +} + +void QMdiSubWindow_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__HideEvent = slot; +} + +void QMdiSubWindow_virtualbase_HideEvent(void* self, QHideEvent* hideEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_HideEvent(hideEvent); +} + +void QMdiSubWindow_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ChangeEvent = slot; +} + +void QMdiSubWindow_virtualbase_ChangeEvent(void* self, QEvent* changeEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ChangeEvent(changeEvent); +} + +void QMdiSubWindow_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__CloseEvent = slot; +} + +void QMdiSubWindow_virtualbase_CloseEvent(void* self, QCloseEvent* closeEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_CloseEvent(closeEvent); +} + +void QMdiSubWindow_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__LeaveEvent = slot; +} + +void QMdiSubWindow_virtualbase_LeaveEvent(void* self, QEvent* leaveEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_LeaveEvent(leaveEvent); +} + +void QMdiSubWindow_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ResizeEvent = slot; +} + +void QMdiSubWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ResizeEvent(resizeEvent); +} + +void QMdiSubWindow_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__TimerEvent = slot; +} + +void QMdiSubWindow_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_TimerEvent(timerEvent); +} + +void QMdiSubWindow_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MoveEvent = slot; +} + +void QMdiSubWindow_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MoveEvent(moveEvent); +} + +void QMdiSubWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__PaintEvent = slot; +} + +void QMdiSubWindow_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_PaintEvent(paintEvent); +} + +void QMdiSubWindow_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MousePressEvent = slot; +} + +void QMdiSubWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MousePressEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMdiSubWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MouseDoubleClickEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMdiSubWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MouseReleaseEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMdiSubWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_MouseMoveEvent(mouseEvent); +} + +void QMdiSubWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__KeyPressEvent = slot; +} + +void QMdiSubWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* keyEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_KeyPressEvent(keyEvent); +} + +void QMdiSubWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMdiSubWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* contextMenuEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ContextMenuEvent(contextMenuEvent); +} + +void QMdiSubWindow_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__FocusInEvent = slot; +} + +void QMdiSubWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* focusInEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_FocusInEvent(focusInEvent); +} + +void QMdiSubWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__FocusOutEvent = slot; +} + +void QMdiSubWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* focusOutEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_FocusOutEvent(focusOutEvent); +} + +void QMdiSubWindow_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ChildEvent = slot; +} + +void QMdiSubWindow_virtualbase_ChildEvent(void* self, QChildEvent* childEvent) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ChildEvent(childEvent); +} + +void QMdiSubWindow_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DevType = slot; +} + +int QMdiSubWindow_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DevType(); +} + +void QMdiSubWindow_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__SetVisible = slot; +} + +void QMdiSubWindow_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_SetVisible(visible); +} + +void QMdiSubWindow_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__HeightForWidth = slot; +} + +int QMdiSubWindow_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMdiSubWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMdiSubWindow_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMdiSubWindow_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMdiSubWindow_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_PaintEngine(); +} + +void QMdiSubWindow_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__WheelEvent = slot; +} + +void QMdiSubWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_WheelEvent(event); +} + +void QMdiSubWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMdiSubWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMdiSubWindow_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__EnterEvent = slot; +} + +void QMdiSubWindow_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_EnterEvent(event); +} + +void QMdiSubWindow_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__TabletEvent = slot; +} + +void QMdiSubWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_TabletEvent(event); +} + +void QMdiSubWindow_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__ActionEvent = slot; +} + +void QMdiSubWindow_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_ActionEvent(event); +} + +void QMdiSubWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DragEnterEvent = slot; +} + +void QMdiSubWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMdiSubWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DragMoveEvent = slot; +} + +void QMdiSubWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMdiSubWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMdiSubWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMdiSubWindow_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__DropEvent = slot; +} + +void QMdiSubWindow_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_DropEvent(event); +} + +void QMdiSubWindow_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__NativeEvent = slot; +} + +bool QMdiSubWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMdiSubWindow_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__Metric = slot; +} + +int QMdiSubWindow_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_Metric(param1); +} + +void QMdiSubWindow_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__InitPainter = slot; +} + +void QMdiSubWindow_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_InitPainter(painter); +} + +void QMdiSubWindow_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMdiSubWindow_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_Redirected(offset); +} + +void QMdiSubWindow_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMdiSubWindow_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_SharedPainter(); +} + +void QMdiSubWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__InputMethodEvent = slot; +} + +void QMdiSubWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMdiSubWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMdiSubWindow_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMdiSubWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMdiSubWindow*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMdiSubWindow_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMdiSubWindow*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMdiSubWindow_Delete(QMdiSubWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmdisubwindow.go b/qt6/gen_qmdisubwindow.go index 9c79620c..c2311a33 100644 --- a/qt6/gen_qmdisubwindow.go +++ b/qt6/gen_qmdisubwindow.go @@ -24,7 +24,8 @@ const ( ) type QMdiSubWindow struct { - h *C.QMdiSubWindow + h *C.QMdiSubWindow + isSubclass bool *QWidget } @@ -42,33 +43,62 @@ func (this *QMdiSubWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMdiSubWindow(h *C.QMdiSubWindow) *QMdiSubWindow { +// newQMdiSubWindow constructs the type using only CGO pointers. +func newQMdiSubWindow(h *C.QMdiSubWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiSubWindow { if h == nil { return nil } - return &QMdiSubWindow{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMdiSubWindow{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMdiSubWindow(h unsafe.Pointer) *QMdiSubWindow { - return newQMdiSubWindow((*C.QMdiSubWindow)(h)) +// UnsafeNewQMdiSubWindow constructs the type using only unsafe pointers. +func UnsafeNewQMdiSubWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiSubWindow { + if h == nil { + return nil + } + + return &QMdiSubWindow{h: (*C.QMdiSubWindow)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMdiSubWindow constructs a new QMdiSubWindow object. func NewQMdiSubWindow(parent *QWidget) *QMdiSubWindow { - ret := C.QMdiSubWindow_new(parent.cPointer()) - return newQMdiSubWindow(ret) + var outptr_QMdiSubWindow *C.QMdiSubWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiSubWindow_new(parent.cPointer(), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMdiSubWindow2 constructs a new QMdiSubWindow object. func NewQMdiSubWindow2() *QMdiSubWindow { - ret := C.QMdiSubWindow_new2() - return newQMdiSubWindow(ret) + var outptr_QMdiSubWindow *C.QMdiSubWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiSubWindow_new2(&outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMdiSubWindow3 constructs a new QMdiSubWindow object. func NewQMdiSubWindow3(parent *QWidget, flags WindowType) *QMdiSubWindow { - ret := C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags)) - return newQMdiSubWindow(ret) + var outptr_QMdiSubWindow *C.QMdiSubWindow = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMdiSubWindow) MetaObject() *QMetaObject { @@ -109,15 +139,15 @@ func (this *QMdiSubWindow) SetWidget(widget *QWidget) { } func (this *QMdiSubWindow) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_Widget(this.h)), nil, nil) } func (this *QMdiSubWindow) MaximizedButtonsWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedButtonsWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedButtonsWidget(this.h)), nil, nil) } func (this *QMdiSubWindow) MaximizedSystemMenuIconWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h)), nil, nil) } func (this *QMdiSubWindow) IsShaded() bool { @@ -153,11 +183,11 @@ func (this *QMdiSubWindow) SetSystemMenu(systemMenu *QMenu) { } func (this *QMdiSubWindow) SystemMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QMdiSubWindow_SystemMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMdiSubWindow_SystemMenu(this.h)), nil, nil, nil) } func (this *QMdiSubWindow) MdiArea() *QMdiArea { - return UnsafeNewQMdiArea(unsafe.Pointer(C.QMdiSubWindow_MdiArea(this.h))) + return UnsafeNewQMdiArea(unsafe.Pointer(C.QMdiSubWindow_MdiArea(this.h)), nil, nil, nil, nil, nil) } func (this *QMdiSubWindow) WindowStateChanged(oldState WindowState, newState WindowState) { @@ -233,9 +263,1047 @@ func (this *QMdiSubWindow) SetOption2(option QMdiSubWindow__SubWindowOption, on C.QMdiSubWindow_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } +func (this *QMdiSubWindow) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMdiSubWindow_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiSubWindow) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiSubWindow_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_SizeHint +func miqt_exec_callback_QMdiSubWindow_SizeHint(self *C.QMdiSubWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMdiSubWindow_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiSubWindow) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMdiSubWindow_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MinimumSizeHint +func miqt_exec_callback_QMdiSubWindow_MinimumSizeHint(self *C.QMdiSubWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QMdiSubWindow_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QMdiSubWindow) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QMdiSubWindow_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_EventFilter +func miqt_exec_callback_QMdiSubWindow_EventFilter(self *C.QMdiSubWindow, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMdiSubWindow_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMdiSubWindow) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMdiSubWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_Event +func miqt_exec_callback_QMdiSubWindow_Event(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_ShowEvent(showEvent *QShowEvent) { + + C.QMdiSubWindow_virtualbase_ShowEvent(unsafe.Pointer(this.h), showEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnShowEvent(slot func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) { + C.QMdiSubWindow_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ShowEvent +func miqt_exec_callback_QMdiSubWindow_ShowEvent(self *C.QMdiSubWindow, cb C.intptr_t, showEvent *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(showEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_HideEvent(hideEvent *QHideEvent) { + + C.QMdiSubWindow_virtualbase_HideEvent(unsafe.Pointer(this.h), hideEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnHideEvent(slot func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) { + C.QMdiSubWindow_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_HideEvent +func miqt_exec_callback_QMdiSubWindow_HideEvent(self *C.QMdiSubWindow, cb C.intptr_t, hideEvent *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(hideEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ChangeEvent(changeEvent *QEvent) { + + C.QMdiSubWindow_virtualbase_ChangeEvent(unsafe.Pointer(this.h), changeEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnChangeEvent(slot func(super func(changeEvent *QEvent), changeEvent *QEvent)) { + C.QMdiSubWindow_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ChangeEvent +func miqt_exec_callback_QMdiSubWindow_ChangeEvent(self *C.QMdiSubWindow, cb C.intptr_t, changeEvent *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(changeEvent *QEvent), changeEvent *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(changeEvent)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_CloseEvent(closeEvent *QCloseEvent) { + + C.QMdiSubWindow_virtualbase_CloseEvent(unsafe.Pointer(this.h), closeEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnCloseEvent(slot func(super func(closeEvent *QCloseEvent), closeEvent *QCloseEvent)) { + C.QMdiSubWindow_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_CloseEvent +func miqt_exec_callback_QMdiSubWindow_CloseEvent(self *C.QMdiSubWindow, cb C.intptr_t, closeEvent *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(closeEvent *QCloseEvent), closeEvent *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(closeEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_LeaveEvent(leaveEvent *QEvent) { + + C.QMdiSubWindow_virtualbase_LeaveEvent(unsafe.Pointer(this.h), leaveEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnLeaveEvent(slot func(super func(leaveEvent *QEvent), leaveEvent *QEvent)) { + C.QMdiSubWindow_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_LeaveEvent +func miqt_exec_callback_QMdiSubWindow_LeaveEvent(self *C.QMdiSubWindow, cb C.intptr_t, leaveEvent *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(leaveEvent *QEvent), leaveEvent *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(leaveEvent)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ResizeEvent(resizeEvent *QResizeEvent) { + + C.QMdiSubWindow_virtualbase_ResizeEvent(unsafe.Pointer(this.h), resizeEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnResizeEvent(slot func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) { + C.QMdiSubWindow_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ResizeEvent +func miqt_exec_callback_QMdiSubWindow_ResizeEvent(self *C.QMdiSubWindow, cb C.intptr_t, resizeEvent *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(resizeEvent *QResizeEvent), resizeEvent *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(resizeEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_TimerEvent(timerEvent *QTimerEvent) { + + C.QMdiSubWindow_virtualbase_TimerEvent(unsafe.Pointer(this.h), timerEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnTimerEvent(slot func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) { + C.QMdiSubWindow_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_TimerEvent +func miqt_exec_callback_QMdiSubWindow_TimerEvent(self *C.QMdiSubWindow, cb C.intptr_t, timerEvent *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(timerEvent *QTimerEvent), timerEvent *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(timerEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MoveEvent(moveEvent *QMoveEvent) { + + C.QMdiSubWindow_virtualbase_MoveEvent(unsafe.Pointer(this.h), moveEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMoveEvent(slot func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) { + C.QMdiSubWindow_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MoveEvent +func miqt_exec_callback_QMdiSubWindow_MoveEvent(self *C.QMdiSubWindow, cb C.intptr_t, moveEvent *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(moveEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_PaintEvent(paintEvent *QPaintEvent) { + + C.QMdiSubWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), paintEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnPaintEvent(slot func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) { + C.QMdiSubWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_PaintEvent +func miqt_exec_callback_QMdiSubWindow_PaintEvent(self *C.QMdiSubWindow, cb C.intptr_t, paintEvent *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(paintEvent *QPaintEvent), paintEvent *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(paintEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MousePressEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MousePressEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMousePressEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MousePressEvent +func miqt_exec_callback_QMdiSubWindow_MousePressEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MouseDoubleClickEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMouseDoubleClickEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent +func miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MouseReleaseEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMouseReleaseEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent +func miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_MouseMoveEvent(mouseEvent *QMouseEvent) { + + C.QMdiSubWindow_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnMouseMoveEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QMdiSubWindow_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_MouseMoveEvent +func miqt_exec_callback_QMdiSubWindow_MouseMoveEvent(self *C.QMdiSubWindow, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_KeyPressEvent(keyEvent *QKeyEvent) { + + C.QMdiSubWindow_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), keyEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnKeyPressEvent(slot func(super func(keyEvent *QKeyEvent), keyEvent *QKeyEvent)) { + C.QMdiSubWindow_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_KeyPressEvent +func miqt_exec_callback_QMdiSubWindow_KeyPressEvent(self *C.QMdiSubWindow, cb C.intptr_t, keyEvent *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(keyEvent *QKeyEvent), keyEvent *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(keyEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ContextMenuEvent(contextMenuEvent *QContextMenuEvent) { + + C.QMdiSubWindow_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), contextMenuEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnContextMenuEvent(slot func(super func(contextMenuEvent *QContextMenuEvent), contextMenuEvent *QContextMenuEvent)) { + C.QMdiSubWindow_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ContextMenuEvent +func miqt_exec_callback_QMdiSubWindow_ContextMenuEvent(self *C.QMdiSubWindow, cb C.intptr_t, contextMenuEvent *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(contextMenuEvent *QContextMenuEvent), contextMenuEvent *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(contextMenuEvent), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_FocusInEvent(focusInEvent *QFocusEvent) { + + C.QMdiSubWindow_virtualbase_FocusInEvent(unsafe.Pointer(this.h), focusInEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnFocusInEvent(slot func(super func(focusInEvent *QFocusEvent), focusInEvent *QFocusEvent)) { + C.QMdiSubWindow_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_FocusInEvent +func miqt_exec_callback_QMdiSubWindow_FocusInEvent(self *C.QMdiSubWindow, cb C.intptr_t, focusInEvent *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(focusInEvent *QFocusEvent), focusInEvent *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(focusInEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_FocusOutEvent(focusOutEvent *QFocusEvent) { + + C.QMdiSubWindow_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), focusOutEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnFocusOutEvent(slot func(super func(focusOutEvent *QFocusEvent), focusOutEvent *QFocusEvent)) { + C.QMdiSubWindow_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_FocusOutEvent +func miqt_exec_callback_QMdiSubWindow_FocusOutEvent(self *C.QMdiSubWindow, cb C.intptr_t, focusOutEvent *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(focusOutEvent *QFocusEvent), focusOutEvent *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(focusOutEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ChildEvent(childEvent *QChildEvent) { + + C.QMdiSubWindow_virtualbase_ChildEvent(unsafe.Pointer(this.h), childEvent.cPointer()) + +} +func (this *QMdiSubWindow) OnChildEvent(slot func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) { + C.QMdiSubWindow_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ChildEvent +func miqt_exec_callback_QMdiSubWindow_ChildEvent(self *C.QMdiSubWindow, cb C.intptr_t, childEvent *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(childEvent *QChildEvent), childEvent *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(childEvent), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DevType() int { + + return (int)(C.QMdiSubWindow_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMdiSubWindow) OnDevType(slot func(super func() int) int) { + C.QMdiSubWindow_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DevType +func miqt_exec_callback_QMdiSubWindow_DevType(self *C.QMdiSubWindow, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_SetVisible(visible bool) { + + C.QMdiSubWindow_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMdiSubWindow) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMdiSubWindow_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_SetVisible +func miqt_exec_callback_QMdiSubWindow_SetVisible(self *C.QMdiSubWindow, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMdiSubWindow_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMdiSubWindow) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMdiSubWindow_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_HeightForWidth +func miqt_exec_callback_QMdiSubWindow_HeightForWidth(self *C.QMdiSubWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMdiSubWindow_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMdiSubWindow) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMdiSubWindow_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_HasHeightForWidth +func miqt_exec_callback_QMdiSubWindow_HasHeightForWidth(self *C.QMdiSubWindow, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMdiSubWindow_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMdiSubWindow) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMdiSubWindow_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_PaintEngine +func miqt_exec_callback_QMdiSubWindow_PaintEngine(self *C.QMdiSubWindow, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QMdiSubWindow_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QMdiSubWindow_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_WheelEvent +func miqt_exec_callback_QMdiSubWindow_WheelEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMdiSubWindow_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMdiSubWindow_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent +func miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QMdiSubWindow_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QMdiSubWindow_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_EnterEvent +func miqt_exec_callback_QMdiSubWindow_EnterEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMdiSubWindow_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMdiSubWindow_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_TabletEvent +func miqt_exec_callback_QMdiSubWindow_TabletEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QMdiSubWindow_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QMdiSubWindow_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_ActionEvent +func miqt_exec_callback_QMdiSubWindow_ActionEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMdiSubWindow_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMdiSubWindow_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DragEnterEvent +func miqt_exec_callback_QMdiSubWindow_DragEnterEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMdiSubWindow_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMdiSubWindow_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DragMoveEvent +func miqt_exec_callback_QMdiSubWindow_DragMoveEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMdiSubWindow_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMdiSubWindow_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DragLeaveEvent +func miqt_exec_callback_QMdiSubWindow_DragLeaveEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMdiSubWindow_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMdiSubWindow) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMdiSubWindow_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_DropEvent +func miqt_exec_callback_QMdiSubWindow_DropEvent(self *C.QMdiSubWindow, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMdiSubWindow_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QMdiSubWindow) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QMdiSubWindow_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_NativeEvent +func miqt_exec_callback_QMdiSubWindow_NativeEvent(self *C.QMdiSubWindow, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMdiSubWindow_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMdiSubWindow) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMdiSubWindow_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_Metric +func miqt_exec_callback_QMdiSubWindow_Metric(self *C.QMdiSubWindow, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMdiSubWindow) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMdiSubWindow_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMdiSubWindow) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMdiSubWindow_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_InitPainter +func miqt_exec_callback_QMdiSubWindow_InitPainter(self *C.QMdiSubWindow, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMdiSubWindow_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMdiSubWindow) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMdiSubWindow_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_Redirected +func miqt_exec_callback_QMdiSubWindow_Redirected(self *C.QMdiSubWindow, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMdiSubWindow_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMdiSubWindow) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMdiSubWindow_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_SharedPainter +func miqt_exec_callback_QMdiSubWindow_SharedPainter(self *C.QMdiSubWindow, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMdiSubWindow_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMdiSubWindow) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMdiSubWindow_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_InputMethodEvent +func miqt_exec_callback_QMdiSubWindow_InputMethodEvent(self *C.QMdiSubWindow, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMdiSubWindow) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMdiSubWindow_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMdiSubWindow) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMdiSubWindow_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_InputMethodQuery +func miqt_exec_callback_QMdiSubWindow_InputMethodQuery(self *C.QMdiSubWindow, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMdiSubWindow) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMdiSubWindow_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMdiSubWindow) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMdiSubWindow_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMdiSubWindow_FocusNextPrevChild +func miqt_exec_callback_QMdiSubWindow_FocusNextPrevChild(self *C.QMdiSubWindow, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMdiSubWindow) Delete() { - C.QMdiSubWindow_Delete(this.h) + C.QMdiSubWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmdisubwindow.h b/qt6/gen_qmdisubwindow.h index fcae6068..e5b27295 100644 --- a/qt6/gen_qmdisubwindow.h +++ b/qt6/gen_qmdisubwindow.h @@ -15,24 +15,82 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMdiArea; class QMdiSubWindow; class QMenu; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMdiArea QMdiArea; typedef struct QMdiSubWindow QMdiSubWindow; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMdiSubWindow* QMdiSubWindow_new(QWidget* parent); -QMdiSubWindow* QMdiSubWindow_new2(); -QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags); +void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self); void* QMdiSubWindow_Metacast(QMdiSubWindow* self, const char* param1); struct miqt_string QMdiSubWindow_Tr(const char* s); @@ -58,10 +116,118 @@ void QMdiSubWindow_AboutToActivate(QMdiSubWindow* self); void QMdiSubWindow_connect_AboutToActivate(QMdiSubWindow* self, intptr_t slot); void QMdiSubWindow_ShowSystemMenu(QMdiSubWindow* self); void QMdiSubWindow_ShowShaded(QMdiSubWindow* self); +bool QMdiSubWindow_EventFilter(QMdiSubWindow* self, QObject* object, QEvent* event); +bool QMdiSubWindow_Event(QMdiSubWindow* self, QEvent* event); +void QMdiSubWindow_ShowEvent(QMdiSubWindow* self, QShowEvent* showEvent); +void QMdiSubWindow_HideEvent(QMdiSubWindow* self, QHideEvent* hideEvent); +void QMdiSubWindow_ChangeEvent(QMdiSubWindow* self, QEvent* changeEvent); +void QMdiSubWindow_CloseEvent(QMdiSubWindow* self, QCloseEvent* closeEvent); +void QMdiSubWindow_LeaveEvent(QMdiSubWindow* self, QEvent* leaveEvent); +void QMdiSubWindow_ResizeEvent(QMdiSubWindow* self, QResizeEvent* resizeEvent); +void QMdiSubWindow_TimerEvent(QMdiSubWindow* self, QTimerEvent* timerEvent); +void QMdiSubWindow_MoveEvent(QMdiSubWindow* self, QMoveEvent* moveEvent); +void QMdiSubWindow_PaintEvent(QMdiSubWindow* self, QPaintEvent* paintEvent); +void QMdiSubWindow_MousePressEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_MouseDoubleClickEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_MouseReleaseEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_MouseMoveEvent(QMdiSubWindow* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_KeyPressEvent(QMdiSubWindow* self, QKeyEvent* keyEvent); +void QMdiSubWindow_ContextMenuEvent(QMdiSubWindow* self, QContextMenuEvent* contextMenuEvent); +void QMdiSubWindow_FocusInEvent(QMdiSubWindow* self, QFocusEvent* focusInEvent); +void QMdiSubWindow_FocusOutEvent(QMdiSubWindow* self, QFocusEvent* focusOutEvent); +void QMdiSubWindow_ChildEvent(QMdiSubWindow* self, QChildEvent* childEvent); struct miqt_string QMdiSubWindow_Tr2(const char* s, const char* c); struct miqt_string QMdiSubWindow_Tr3(const char* s, const char* c, int n); void QMdiSubWindow_SetOption2(QMdiSubWindow* self, int option, bool on); -void QMdiSubWindow_Delete(QMdiSubWindow* self); +void QMdiSubWindow_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMdiSubWindow_virtualbase_SizeHint(const void* self); +void QMdiSubWindow_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMdiSubWindow_virtualbase_MinimumSizeHint(const void* self); +void QMdiSubWindow_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QMdiSubWindow_override_virtual_Event(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_Event(void* self, QEvent* event); +void QMdiSubWindow_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ShowEvent(void* self, QShowEvent* showEvent); +void QMdiSubWindow_override_virtual_HideEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_HideEvent(void* self, QHideEvent* hideEvent); +void QMdiSubWindow_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ChangeEvent(void* self, QEvent* changeEvent); +void QMdiSubWindow_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_CloseEvent(void* self, QCloseEvent* closeEvent); +void QMdiSubWindow_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_LeaveEvent(void* self, QEvent* leaveEvent); +void QMdiSubWindow_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* resizeEvent); +void QMdiSubWindow_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_TimerEvent(void* self, QTimerEvent* timerEvent); +void QMdiSubWindow_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent); +void QMdiSubWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_PaintEvent(void* self, QPaintEvent* paintEvent); +void QMdiSubWindow_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* mouseEvent); +void QMdiSubWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* keyEvent); +void QMdiSubWindow_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* contextMenuEvent); +void QMdiSubWindow_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* focusInEvent); +void QMdiSubWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* focusOutEvent); +void QMdiSubWindow_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ChildEvent(void* self, QChildEvent* childEvent); +void QMdiSubWindow_override_virtual_DevType(void* self, intptr_t slot); +int QMdiSubWindow_virtualbase_DevType(const void* self); +void QMdiSubWindow_override_virtual_SetVisible(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_SetVisible(void* self, bool visible); +void QMdiSubWindow_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMdiSubWindow_virtualbase_HeightForWidth(const void* self, int param1); +void QMdiSubWindow_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_HasHeightForWidth(const void* self); +void QMdiSubWindow_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMdiSubWindow_virtualbase_PaintEngine(const void* self); +void QMdiSubWindow_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QMdiSubWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMdiSubWindow_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QMdiSubWindow_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMdiSubWindow_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QMdiSubWindow_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMdiSubWindow_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMdiSubWindow_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMdiSubWindow_override_virtual_DropEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMdiSubWindow_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QMdiSubWindow_override_virtual_Metric(void* self, intptr_t slot); +int QMdiSubWindow_virtualbase_Metric(const void* self, int param1); +void QMdiSubWindow_override_virtual_InitPainter(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMdiSubWindow_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMdiSubWindow_virtualbase_Redirected(const void* self, QPoint* offset); +void QMdiSubWindow_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMdiSubWindow_virtualbase_SharedPainter(const void* self); +void QMdiSubWindow_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMdiSubWindow_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMdiSubWindow_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMdiSubWindow_virtualbase_InputMethodQuery(const void* self, int param1); +void QMdiSubWindow_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMdiSubWindow_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMdiSubWindow_Delete(QMdiSubWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmenu.cpp b/qt6/gen_qmenu.cpp index 705a0be1..a83800d8 100644 --- a/qt6/gen_qmenu.cpp +++ b/qt6/gen_qmenu.cpp @@ -1,35 +1,1116 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include #include #include #include "gen_qmenu.h" #include "_cgo_export.h" -QMenu* QMenu_new(QWidget* parent) { - return new QMenu(parent); +class MiqtVirtualQMenu : public virtual QMenu { +public: + + MiqtVirtualQMenu(QWidget* parent): QMenu(parent) {}; + MiqtVirtualQMenu(): QMenu() {}; + MiqtVirtualQMenu(const QString& title): QMenu(title) {}; + MiqtVirtualQMenu(const QString& title, QWidget* parent): QMenu(title, parent) {}; + + virtual ~MiqtVirtualQMenu() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMenu::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenu_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMenu::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QMenu::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QMenu::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QMenu::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QMenu::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QMenu::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QMenu::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QMenu::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QMenu::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QMenu::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QMenu::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QMenu::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QMenu::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* param1) override { + if (handle__EnterEvent == 0) { + QMenu::enterEvent(param1); + return; + } + + QEnterEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* param1) { + + QMenu::enterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* param1) override { + if (handle__LeaveEvent == 0) { + QMenu::leaveEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* param1) { + + QMenu::leaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QMenu::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QMenu::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QMenu::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QMenu::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* param1) override { + if (handle__ActionEvent == 0) { + QMenu::actionEvent(param1); + return; + } + + QActionEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* param1) { + + QMenu::actionEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QMenu::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QMenu::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QMenu::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QMenu_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QMenu::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMenu::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMenu_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMenu::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionMenuItem* option, const QAction* action) const override { + if (handle__InitStyleOption == 0) { + QMenu::initStyleOption(option, action); + return; + } + + QStyleOptionMenuItem* sigval1 = option; + QAction* sigval2 = (QAction*) action; + + miqt_exec_callback_QMenu_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionMenuItem* option, QAction* action) const { + + QMenu::initStyleOption(option, action); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMenu::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMenu_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMenu::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMenu::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMenu_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMenu::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMenu::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenu_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMenu::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMenu::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMenu_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMenu::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMenu::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMenu_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMenu::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMenu::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMenu_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMenu::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QMenu::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMenu_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QMenu::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMenu::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMenu_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMenu::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QMenu::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMenu_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QMenu::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QMenu::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QMenu_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QMenu::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QMenu::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenu_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QMenu::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QMenu::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QMenu_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QMenu::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMenu::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMenu_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMenu::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QMenu::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QMenu_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QMenu::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMenu::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMenu_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMenu::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMenu::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMenu::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMenu::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMenu::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMenu::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMenu::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMenu::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMenu_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMenu::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMenu::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMenu_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMenu::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QMenu::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QMenu_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMenu::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMenu::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMenu_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMenu::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMenu::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMenu_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMenu::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMenu::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMenu_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMenu::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMenu::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMenu_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMenu::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMenu::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMenu_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMenu::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMenu::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMenu_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMenu::inputMethodQuery(static_cast(param1))); + + } + +}; + +void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(parent); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenu* QMenu_new2() { - return new QMenu(); +void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenu* QMenu_new3(struct miqt_string title) { +void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QMenu(title_QString); + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenu* QMenu_new4(struct miqt_string title, QWidget* parent) { +void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QMenu(title_QString, parent); + MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString, parent); + *outptr_QMenu = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMenu_MetaObject(const QMenu* self) { @@ -236,7 +1317,7 @@ void QMenu_AboutToShow(QMenu* self) { } void QMenu_connect_AboutToShow(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::aboutToShow), self, [=]() { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::aboutToShow), self, [=]() { miqt_exec_callback_QMenu_AboutToShow(slot); }); } @@ -246,7 +1327,7 @@ void QMenu_AboutToHide(QMenu* self) { } void QMenu_connect_AboutToHide(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::aboutToHide), self, [=]() { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::aboutToHide), self, [=]() { miqt_exec_callback_QMenu_AboutToHide(slot); }); } @@ -256,7 +1337,7 @@ void QMenu_Triggered(QMenu* self, QAction* action) { } void QMenu_connect_Triggered(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::triggered), self, [=](QAction* action) { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::triggered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenu_Triggered(slot, sigval1); }); @@ -267,7 +1348,7 @@ void QMenu_Hovered(QMenu* self, QAction* action) { } void QMenu_connect_Hovered(QMenu* self, intptr_t slot) { - QMenu::connect(self, static_cast(&QMenu::hovered), self, [=](QAction* action) { + MiqtVirtualQMenu::connect(self, static_cast(&QMenu::hovered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenu_Hovered(slot, sigval1); }); @@ -323,7 +1404,355 @@ QAction* QMenu_Exec4(struct miqt_array /* of QAction* */ actions, QPoint* pos, return QMenu::exec(actions_QList, *pos, at, parent); } -void QMenu_Delete(QMenu* self) { - delete self; +void QMenu_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__SizeHint = slot; +} + +QSize* QMenu_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_SizeHint(); +} + +void QMenu_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ChangeEvent = slot; +} + +void QMenu_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QMenu_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__KeyPressEvent = slot; +} + +void QMenu_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QMenu_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMenu_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QMenu_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MousePressEvent = slot; +} + +void QMenu_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QMenu_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMenu_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QMenu_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__WheelEvent = slot; +} + +void QMenu_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_WheelEvent(param1); +} + +void QMenu_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__EnterEvent = slot; +} + +void QMenu_virtualbase_EnterEvent(void* self, QEnterEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_EnterEvent(param1); +} + +void QMenu_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__LeaveEvent = slot; +} + +void QMenu_virtualbase_LeaveEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_LeaveEvent(param1); +} + +void QMenu_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__HideEvent = slot; +} + +void QMenu_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_HideEvent(param1); +} + +void QMenu_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__PaintEvent = slot; +} + +void QMenu_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_PaintEvent(param1); +} + +void QMenu_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ActionEvent = slot; +} + +void QMenu_virtualbase_ActionEvent(void* self, QActionEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ActionEvent(param1); +} + +void QMenu_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__TimerEvent = slot; +} + +void QMenu_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_TimerEvent(param1); +} + +void QMenu_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__Event = slot; +} + +bool QMenu_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQMenu*)(self) )->virtualbase_Event(param1); +} + +void QMenu_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMenu_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMenu*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMenu_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InitStyleOption = slot; +} + +void QMenu_virtualbase_InitStyleOption(const void* self, QStyleOptionMenuItem* option, QAction* action) { + ( (const MiqtVirtualQMenu*)(self) )->virtualbase_InitStyleOption(option, action); +} + +void QMenu_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DevType = slot; +} + +int QMenu_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_DevType(); +} + +void QMenu_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__SetVisible = slot; +} + +void QMenu_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_SetVisible(visible); +} + +void QMenu_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMenu_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMenu_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__HeightForWidth = slot; +} + +int QMenu_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMenu_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMenu_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMenu_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMenu_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_PaintEngine(); +} + +void QMenu_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMenu_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QMenu_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMenu_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMenu_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__FocusInEvent = slot; +} + +void QMenu_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_FocusInEvent(event); +} + +void QMenu_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__FocusOutEvent = slot; +} + +void QMenu_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QMenu_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__MoveEvent = slot; +} + +void QMenu_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_MoveEvent(event); +} + +void QMenu_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ResizeEvent = slot; +} + +void QMenu_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ResizeEvent(event); +} + +void QMenu_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__CloseEvent = slot; +} + +void QMenu_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_CloseEvent(event); +} + +void QMenu_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMenu_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QMenu_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__TabletEvent = slot; +} + +void QMenu_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_TabletEvent(event); +} + +void QMenu_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DragEnterEvent = slot; +} + +void QMenu_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMenu_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DragMoveEvent = slot; +} + +void QMenu_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMenu_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMenu_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMenu_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__DropEvent = slot; +} + +void QMenu_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_DropEvent(event); +} + +void QMenu_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__ShowEvent = slot; +} + +void QMenu_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_ShowEvent(event); +} + +void QMenu_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__NativeEvent = slot; +} + +bool QMenu_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQMenu*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMenu_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__Metric = slot; +} + +int QMenu_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_Metric(param1); +} + +void QMenu_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InitPainter = slot; +} + +void QMenu_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMenu*)(self) )->virtualbase_InitPainter(painter); +} + +void QMenu_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMenu_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_Redirected(offset); +} + +void QMenu_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMenu_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_SharedPainter(); +} + +void QMenu_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InputMethodEvent = slot; +} + +void QMenu_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMenu*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMenu_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMenu*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMenu_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMenu*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMenu_Delete(QMenu* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmenu.go b/qt6/gen_qmenu.go index 04b67eb8..b3f3aadb 100644 --- a/qt6/gen_qmenu.go +++ b/qt6/gen_qmenu.go @@ -15,7 +15,8 @@ import ( ) type QMenu struct { - h *C.QMenu + h *C.QMenu + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QMenu) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMenu(h *C.QMenu) *QMenu { +// newQMenu constructs the type using only CGO pointers. +func newQMenu(h *C.QMenu, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenu { if h == nil { return nil } - return &QMenu{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMenu{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMenu(h unsafe.Pointer) *QMenu { - return newQMenu((*C.QMenu)(h)) +// UnsafeNewQMenu constructs the type using only unsafe pointers. +func UnsafeNewQMenu(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenu { + if h == nil { + return nil + } + + return &QMenu{h: (*C.QMenu)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMenu constructs a new QMenu object. func NewQMenu(parent *QWidget) *QMenu { - ret := C.QMenu_new(parent.cPointer()) - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new(parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenu2 constructs a new QMenu object. func NewQMenu2() *QMenu { - ret := C.QMenu_new2() - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new2(&outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenu3 constructs a new QMenu object. @@ -62,8 +85,15 @@ func NewQMenu3(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QMenu_new3(title_ms) - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new3(title_ms, &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenu4 constructs a new QMenu object. @@ -72,8 +102,15 @@ func NewQMenu4(title string, parent *QWidget) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QMenu_new4(title_ms, parent.cPointer()) - return newQMenu(ret) + var outptr_QMenu *C.QMenu = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenu_new4(title_ms, parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMenu) MetaObject() *QMetaObject { @@ -96,7 +133,7 @@ func QMenu_Tr(s string) string { } func (this *QMenu) AddMenu(menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddMenu(this.h, menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddMenu(this.h, menu.cPointer())), nil) } func (this *QMenu) AddMenuWithTitle(title string) *QMenu { @@ -104,7 +141,7 @@ func (this *QMenu) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenuWithTitle(this.h, title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenuWithTitle(this.h, title_ms)), nil, nil, nil) } func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { @@ -112,11 +149,11 @@ func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms)), nil, nil, nil) } func (this *QMenu) AddSeparator() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSeparator(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSeparator(this.h)), nil) } func (this *QMenu) AddSection(text string) *QAction { @@ -124,7 +161,7 @@ func (this *QMenu) AddSection(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection(this.h, text_ms)), nil) } func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { @@ -132,15 +169,15 @@ func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QMenu) InsertMenu(before *QAction, menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer())), nil) } func (this *QMenu) InsertSeparator(before *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSeparator(this.h, before.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSeparator(this.h, before.cPointer())), nil) } func (this *QMenu) InsertSection(before *QAction, text string) *QAction { @@ -148,7 +185,7 @@ func (this *QMenu) InsertSection(before *QAction, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms)), nil) } func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QAction { @@ -156,7 +193,7 @@ func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QA text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms)), nil) } func (this *QMenu) IsEmpty() bool { @@ -196,7 +233,7 @@ func (this *QMenu) SetDefaultAction(defaultAction *QAction) { } func (this *QMenu) DefaultAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_DefaultAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_DefaultAction(this.h)), nil) } func (this *QMenu) SetActiveAction(act *QAction) { @@ -204,7 +241,7 @@ func (this *QMenu) SetActiveAction(act *QAction) { } func (this *QMenu) ActiveAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActiveAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActiveAction(this.h)), nil) } func (this *QMenu) Popup(pos *QPoint) { @@ -212,11 +249,11 @@ func (this *QMenu) Popup(pos *QPoint) { } func (this *QMenu) Exec() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec(this.h)), nil) } func (this *QMenu) ExecWithPos(pos *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ExecWithPos(this.h, pos.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ExecWithPos(this.h, pos.cPointer())), nil) } func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { @@ -226,7 +263,7 @@ func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec2(actions_ma, pos.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec2(actions_ma, pos.cPointer())), nil) } func (this *QMenu) SizeHint() *QSize { @@ -244,15 +281,15 @@ func (this *QMenu) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenu) ActionAt(param1 *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActionAt(this.h, param1.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_ActionAt(this.h, param1.cPointer())), nil) } func (this *QMenu) MenuAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_MenuAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_MenuAction(this.h)), nil) } func QMenu_MenuInAction(action *QAction) *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_MenuInAction(action.cPointer()))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenu_MenuInAction(action.cPointer())), nil, nil, nil) } func (this *QMenu) Title() string { @@ -350,7 +387,7 @@ func miqt_exec_callback_QMenu_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -370,7 +407,7 @@ func miqt_exec_callback_QMenu_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -402,7 +439,7 @@ func (this *QMenu) Popup2(pos *QPoint, at *QAction) { } func (this *QMenu) Exec22(pos *QPoint, at *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer())), nil) } func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { @@ -412,7 +449,7 @@ func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer())), nil) } func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) *QAction { @@ -422,12 +459,1025 @@ func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer())), nil) +} + +func (this *QMenu) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMenu_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenu) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenu_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_SizeHint +func miqt_exec_callback_QMenu_SizeHint(self *C.QMenu, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QMenu_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenu_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ChangeEvent +func miqt_exec_callback_QMenu_ChangeEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenu{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QMenu_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QMenu_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_KeyPressEvent +func miqt_exec_callback_QMenu_KeyPressEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QMenu_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenu_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MouseReleaseEvent +func miqt_exec_callback_QMenu_MouseReleaseEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QMenu_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenu_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MousePressEvent +func miqt_exec_callback_QMenu_MousePressEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QMenu_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenu_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MouseMoveEvent +func miqt_exec_callback_QMenu_MouseMoveEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QMenu_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QMenu_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_WheelEvent +func miqt_exec_callback_QMenu_WheelEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_EnterEvent(param1 *QEnterEvent) { + + C.QMenu_virtualbase_EnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnEnterEvent(slot func(super func(param1 *QEnterEvent), param1 *QEnterEvent)) { + C.QMenu_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_EnterEvent +func miqt_exec_callback_QMenu_EnterEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEnterEvent), param1 *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_LeaveEvent(param1 *QEvent) { + + C.QMenu_virtualbase_LeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnLeaveEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenu_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_LeaveEvent +func miqt_exec_callback_QMenu_LeaveEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenu{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QMenu_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QMenu_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_HideEvent +func miqt_exec_callback_QMenu_HideEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QMenu_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QMenu_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_PaintEvent +func miqt_exec_callback_QMenu_PaintEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ActionEvent(param1 *QActionEvent) { + + C.QMenu_virtualbase_ActionEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnActionEvent(slot func(super func(param1 *QActionEvent), param1 *QActionEvent)) { + C.QMenu_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ActionEvent +func miqt_exec_callback_QMenu_ActionEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QActionEvent), param1 *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QMenu_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QMenu_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_TimerEvent +func miqt_exec_callback_QMenu_TimerEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QMenu_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QMenu) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QMenu_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_Event +func miqt_exec_callback_QMenu_Event(self *C.QMenu, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMenu_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMenu) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMenu_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_FocusNextPrevChild +func miqt_exec_callback_QMenu_FocusNextPrevChild(self *C.QMenu, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_InitStyleOption(option *QStyleOptionMenuItem, action *QAction) { + + C.QMenu_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer(), action.cPointer()) + +} +func (this *QMenu) OnInitStyleOption(slot func(super func(option *QStyleOptionMenuItem, action *QAction), option *QStyleOptionMenuItem, action *QAction)) { + C.QMenu_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InitStyleOption +func miqt_exec_callback_QMenu_InitStyleOption(self *C.QMenu, cb C.intptr_t, option *C.QStyleOptionMenuItem, action *C.QAction) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionMenuItem, action *QAction), option *QStyleOptionMenuItem, action *QAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionMenuItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQAction(unsafe.Pointer(action), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) + +} + +func (this *QMenu) callVirtualBase_DevType() int { + + return (int)(C.QMenu_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMenu) OnDevType(slot func(super func() int) int) { + C.QMenu_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DevType +func miqt_exec_callback_QMenu_DevType(self *C.QMenu, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_SetVisible(visible bool) { + + C.QMenu_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMenu) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMenu_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_SetVisible +func miqt_exec_callback_QMenu_SetVisible(self *C.QMenu, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMenu{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMenu) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMenu_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenu) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenu_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MinimumSizeHint +func miqt_exec_callback_QMenu_MinimumSizeHint(self *C.QMenu, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMenu_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenu) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMenu_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_HeightForWidth +func miqt_exec_callback_QMenu_HeightForWidth(self *C.QMenu, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMenu_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMenu) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMenu_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_HasHeightForWidth +func miqt_exec_callback_QMenu_HasHeightForWidth(self *C.QMenu, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMenu_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMenu) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMenu_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_PaintEngine +func miqt_exec_callback_QMenu_PaintEngine(self *C.QMenu, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QMenu_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMenu_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MouseDoubleClickEvent +func miqt_exec_callback_QMenu_MouseDoubleClickEvent(self *C.QMenu, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMenu_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMenu_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_KeyReleaseEvent +func miqt_exec_callback_QMenu_KeyReleaseEvent(self *C.QMenu, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QMenu_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMenu_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_FocusInEvent +func miqt_exec_callback_QMenu_FocusInEvent(self *C.QMenu, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QMenu_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QMenu_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_FocusOutEvent +func miqt_exec_callback_QMenu_FocusOutEvent(self *C.QMenu, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QMenu_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QMenu_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_MoveEvent +func miqt_exec_callback_QMenu_MoveEvent(self *C.QMenu, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QMenu_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QMenu_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ResizeEvent +func miqt_exec_callback_QMenu_ResizeEvent(self *C.QMenu, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMenu_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMenu_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_CloseEvent +func miqt_exec_callback_QMenu_CloseEvent(self *C.QMenu, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QMenu_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QMenu_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ContextMenuEvent +func miqt_exec_callback_QMenu_ContextMenuEvent(self *C.QMenu, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMenu_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMenu_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_TabletEvent +func miqt_exec_callback_QMenu_TabletEvent(self *C.QMenu, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMenu_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMenu_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DragEnterEvent +func miqt_exec_callback_QMenu_DragEnterEvent(self *C.QMenu, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMenu_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMenu_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DragMoveEvent +func miqt_exec_callback_QMenu_DragMoveEvent(self *C.QMenu, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMenu_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMenu_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DragLeaveEvent +func miqt_exec_callback_QMenu_DragLeaveEvent(self *C.QMenu, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMenu_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMenu_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_DropEvent +func miqt_exec_callback_QMenu_DropEvent(self *C.QMenu, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMenu_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenu) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMenu_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_ShowEvent +func miqt_exec_callback_QMenu_ShowEvent(self *C.QMenu, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMenu_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QMenu) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QMenu_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_NativeEvent +func miqt_exec_callback_QMenu_NativeEvent(self *C.QMenu, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMenu_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenu) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMenu_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_Metric +func miqt_exec_callback_QMenu_Metric(self *C.QMenu, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenu) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMenu_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMenu) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMenu_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InitPainter +func miqt_exec_callback_QMenu_InitPainter(self *C.QMenu, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMenu{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMenu) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMenu_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMenu) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMenu_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_Redirected +func miqt_exec_callback_QMenu_Redirected(self *C.QMenu, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMenu_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMenu) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMenu_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_SharedPainter +func miqt_exec_callback_QMenu_SharedPainter(self *C.QMenu, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMenu) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMenu_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenu) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMenu_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InputMethodEvent +func miqt_exec_callback_QMenu_InputMethodEvent(self *C.QMenu, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenu{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMenu) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMenu_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenu) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMenu_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenu_InputMethodQuery +func miqt_exec_callback_QMenu_InputMethodQuery(self *C.QMenu, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMenu{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } // Delete this object from C++ memory. func (this *QMenu) Delete() { - C.QMenu_Delete(this.h) + C.QMenu_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmenu.h b/qt6/gen_qmenu.h index 4b2280b6..71815384 100644 --- a/qt6/gen_qmenu.h +++ b/qt6/gen_qmenu.h @@ -16,28 +16,84 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionMenuItem; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionMenuItem QStyleOptionMenuItem; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMenu* QMenu_new(QWidget* parent); -QMenu* QMenu_new2(); -QMenu* QMenu_new3(struct miqt_string title); -QMenu* QMenu_new4(struct miqt_string title, QWidget* parent); +void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMenu_MetaObject(const QMenu* self); void* QMenu_Metacast(QMenu* self, const char* param1); struct miqt_string QMenu_Tr(const char* s); @@ -89,13 +145,114 @@ void QMenu_Triggered(QMenu* self, QAction* action); void QMenu_connect_Triggered(QMenu* self, intptr_t slot); void QMenu_Hovered(QMenu* self, QAction* action); void QMenu_connect_Hovered(QMenu* self, intptr_t slot); +void QMenu_ChangeEvent(QMenu* self, QEvent* param1); +void QMenu_KeyPressEvent(QMenu* self, QKeyEvent* param1); +void QMenu_MouseReleaseEvent(QMenu* self, QMouseEvent* param1); +void QMenu_MousePressEvent(QMenu* self, QMouseEvent* param1); +void QMenu_MouseMoveEvent(QMenu* self, QMouseEvent* param1); +void QMenu_WheelEvent(QMenu* self, QWheelEvent* param1); +void QMenu_EnterEvent(QMenu* self, QEnterEvent* param1); +void QMenu_LeaveEvent(QMenu* self, QEvent* param1); +void QMenu_HideEvent(QMenu* self, QHideEvent* param1); +void QMenu_PaintEvent(QMenu* self, QPaintEvent* param1); +void QMenu_ActionEvent(QMenu* self, QActionEvent* param1); +void QMenu_TimerEvent(QMenu* self, QTimerEvent* param1); +bool QMenu_Event(QMenu* self, QEvent* param1); +bool QMenu_FocusNextPrevChild(QMenu* self, bool next); +void QMenu_InitStyleOption(const QMenu* self, QStyleOptionMenuItem* option, QAction* action); struct miqt_string QMenu_Tr2(const char* s, const char* c); struct miqt_string QMenu_Tr3(const char* s, const char* c, int n); void QMenu_Popup2(QMenu* self, QPoint* pos, QAction* at); QAction* QMenu_Exec22(QMenu* self, QPoint* pos, QAction* at); QAction* QMenu_Exec3(struct miqt_array /* of QAction* */ actions, QPoint* pos, QAction* at); QAction* QMenu_Exec4(struct miqt_array /* of QAction* */ actions, QPoint* pos, QAction* at, QWidget* parent); -void QMenu_Delete(QMenu* self); +void QMenu_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMenu_virtualbase_SizeHint(const void* self); +void QMenu_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QMenu_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMenu_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QMenu_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QMenu_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QMenu_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QMenu_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMenu_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QMenu_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMenu_virtualbase_EnterEvent(void* self, QEnterEvent* param1); +void QMenu_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_LeaveEvent(void* self, QEvent* param1); +void QMenu_override_virtual_HideEvent(void* self, intptr_t slot); +void QMenu_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QMenu_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMenu_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QMenu_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ActionEvent(void* self, QActionEvent* param1); +void QMenu_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMenu_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QMenu_override_virtual_Event(void* self, intptr_t slot); +bool QMenu_virtualbase_Event(void* self, QEvent* param1); +void QMenu_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMenu_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMenu_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QMenu_virtualbase_InitStyleOption(const void* self, QStyleOptionMenuItem* option, QAction* action); +void QMenu_override_virtual_DevType(void* self, intptr_t slot); +int QMenu_virtualbase_DevType(const void* self); +void QMenu_override_virtual_SetVisible(void* self, intptr_t slot); +void QMenu_virtualbase_SetVisible(void* self, bool visible); +void QMenu_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMenu_virtualbase_MinimumSizeHint(const void* self); +void QMenu_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMenu_virtualbase_HeightForWidth(const void* self, int param1); +void QMenu_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMenu_virtualbase_HasHeightForWidth(const void* self); +void QMenu_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMenu_virtualbase_PaintEngine(const void* self); +void QMenu_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QMenu_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMenu_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMenu_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMenu_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QMenu_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMenu_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QMenu_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QMenu_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QMenu_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMenu_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMenu_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QMenu_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMenu_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMenu_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMenu_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMenu_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMenu_override_virtual_DropEvent(void* self, intptr_t slot); +void QMenu_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMenu_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMenu_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMenu_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMenu_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QMenu_override_virtual_Metric(void* self, intptr_t slot); +int QMenu_virtualbase_Metric(const void* self, int param1); +void QMenu_override_virtual_InitPainter(void* self, intptr_t slot); +void QMenu_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMenu_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMenu_virtualbase_Redirected(const void* self, QPoint* offset); +void QMenu_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMenu_virtualbase_SharedPainter(const void* self); +void QMenu_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMenu_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMenu_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMenu_virtualbase_InputMethodQuery(const void* self, int param1); +void QMenu_Delete(QMenu* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmenubar.cpp b/qt6/gen_qmenubar.cpp index 80516bf5..8973c1f4 100644 --- a/qt6/gen_qmenubar.cpp +++ b/qt6/gen_qmenubar.cpp @@ -1,25 +1,1120 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include #include #include #include "gen_qmenubar.h" #include "_cgo_export.h" -QMenuBar* QMenuBar_new(QWidget* parent) { - return new QMenuBar(parent); +class MiqtVirtualQMenuBar : public virtual QMenuBar { +public: + + MiqtVirtualQMenuBar(QWidget* parent): QMenuBar(parent) {}; + MiqtVirtualQMenuBar(): QMenuBar() {}; + + virtual ~MiqtVirtualQMenuBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMenuBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenuBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMenuBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMenuBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMenuBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMenuBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QMenuBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QMenuBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QMenuBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMenuBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMenuBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMenuBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QMenuBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QMenuBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QMenuBar::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QMenuBar::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QMenuBar::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QMenuBar::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QMenuBar::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QMenuBar::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QMenuBar::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QMenuBar::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* param1) override { + if (handle__LeaveEvent == 0) { + QMenuBar::leaveEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* param1) { + + QMenuBar::leaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QMenuBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QMenuBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QMenuBar::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QMenuBar::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* param1) override { + if (handle__ActionEvent == 0) { + QMenuBar::actionEvent(param1); + return; + } + + QActionEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* param1) { + + QMenuBar::actionEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QMenuBar::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QMenuBar::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QMenuBar::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QMenuBar::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QMenuBar::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QMenuBar::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QMenuBar::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QMenuBar_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QMenuBar::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QMenuBar::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QMenuBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QMenuBar::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionMenuItem* option, const QAction* action) const override { + if (handle__InitStyleOption == 0) { + QMenuBar::initStyleOption(option, action); + return; + } + + QStyleOptionMenuItem* sigval1 = option; + QAction* sigval2 = (QAction*) action; + + miqt_exec_callback_QMenuBar_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionMenuItem* option, QAction* action) const { + + QMenuBar::initStyleOption(option, action); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QMenuBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QMenuBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QMenuBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QMenuBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QMenuBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QMenuBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QMenuBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QMenuBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QMenuBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QMenuBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QMenuBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QMenuBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QMenuBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QMenuBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QMenuBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QMenuBar::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QMenuBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QMenuBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QMenuBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMenuBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMenuBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QMenuBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QMenuBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QMenuBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QMenuBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QMenuBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QMenuBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QMenuBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QMenuBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QMenuBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QMenuBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QMenuBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QMenuBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMenuBar::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMenuBar::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QMenuBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QMenuBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QMenuBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QMenuBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QMenuBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QMenuBar::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QMenuBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QMenuBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QMenuBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QMenuBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QMenuBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QMenuBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QMenuBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QMenuBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QMenuBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QMenuBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QMenuBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QMenuBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QMenuBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QMenuBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QMenuBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QMenuBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QMenuBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QMenuBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QMenuBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QMenuBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QMenuBar::focusNextPrevChild(next); + + } + +}; + +void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(parent); + *outptr_QMenuBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMenuBar* QMenuBar_new2() { - return new QMenuBar(); +void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(); + *outptr_QMenuBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMenuBar_MetaObject(const QMenuBar* self) { @@ -132,7 +1227,7 @@ void QMenuBar_Triggered(QMenuBar* self, QAction* action) { } void QMenuBar_connect_Triggered(QMenuBar* self, intptr_t slot) { - QMenuBar::connect(self, static_cast(&QMenuBar::triggered), self, [=](QAction* action) { + MiqtVirtualQMenuBar::connect(self, static_cast(&QMenuBar::triggered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenuBar_Triggered(slot, sigval1); }); @@ -143,7 +1238,7 @@ void QMenuBar_Hovered(QMenuBar* self, QAction* action) { } void QMenuBar_connect_Hovered(QMenuBar* self, intptr_t slot) { - QMenuBar::connect(self, static_cast(&QMenuBar::hovered), self, [=](QAction* action) { + MiqtVirtualQMenuBar::connect(self, static_cast(&QMenuBar::hovered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QMenuBar_Hovered(slot, sigval1); }); @@ -179,7 +1274,363 @@ QWidget* QMenuBar_CornerWidget1(const QMenuBar* self, int corner) { return self->cornerWidget(static_cast(corner)); } -void QMenuBar_Delete(QMenuBar* self) { - delete self; +void QMenuBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QMenuBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_SizeHint(); +} + +void QMenuBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMenuBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMenuBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__HeightForWidth = slot; +} + +int QMenuBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QMenuBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__SetVisible = slot; +} + +void QMenuBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QMenuBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ChangeEvent = slot; +} + +void QMenuBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QMenuBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QMenuBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QMenuBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QMenuBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QMenuBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MousePressEvent = slot; +} + +void QMenuBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QMenuBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QMenuBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QMenuBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__LeaveEvent = slot; +} + +void QMenuBar_virtualbase_LeaveEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_LeaveEvent(param1); +} + +void QMenuBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__PaintEvent = slot; +} + +void QMenuBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QMenuBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ResizeEvent = slot; +} + +void QMenuBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QMenuBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ActionEvent = slot; +} + +void QMenuBar_virtualbase_ActionEvent(void* self, QActionEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ActionEvent(param1); +} + +void QMenuBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QMenuBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QMenuBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__FocusInEvent = slot; +} + +void QMenuBar_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QMenuBar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__TimerEvent = slot; +} + +void QMenuBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_TimerEvent(param1); +} + +void QMenuBar_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__EventFilter = slot; +} + +bool QMenuBar_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QMenuBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__Event = slot; +} + +bool QMenuBar_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_Event(param1); +} + +void QMenuBar_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InitStyleOption = slot; +} + +void QMenuBar_virtualbase_InitStyleOption(const void* self, QStyleOptionMenuItem* option, QAction* action) { + ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_InitStyleOption(option, action); +} + +void QMenuBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DevType = slot; +} + +int QMenuBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_DevType(); +} + +void QMenuBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QMenuBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QMenuBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QMenuBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_PaintEngine(); +} + +void QMenuBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QMenuBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QMenuBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__WheelEvent = slot; +} + +void QMenuBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QMenuBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QMenuBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QMenuBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__EnterEvent = slot; +} + +void QMenuBar_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QMenuBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__MoveEvent = slot; +} + +void QMenuBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QMenuBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__CloseEvent = slot; +} + +void QMenuBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QMenuBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMenuBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QMenuBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__TabletEvent = slot; +} + +void QMenuBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QMenuBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QMenuBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QMenuBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QMenuBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QMenuBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QMenuBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QMenuBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__DropEvent = slot; +} + +void QMenuBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_DropEvent(event); +} + +void QMenuBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__ShowEvent = slot; +} + +void QMenuBar_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_ShowEvent(event); +} + +void QMenuBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__HideEvent = slot; +} + +void QMenuBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_HideEvent(event); +} + +void QMenuBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__NativeEvent = slot; +} + +bool QMenuBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QMenuBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__Metric = slot; +} + +int QMenuBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_Metric(param1); +} + +void QMenuBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InitPainter = slot; +} + +void QMenuBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QMenuBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QMenuBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_Redirected(offset); +} + +void QMenuBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QMenuBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_SharedPainter(); +} + +void QMenuBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QMenuBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QMenuBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QMenuBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQMenuBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QMenuBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QMenuBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QMenuBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQMenuBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QMenuBar_Delete(QMenuBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmenubar.go b/qt6/gen_qmenubar.go index b4d34e71..999c2d4e 100644 --- a/qt6/gen_qmenubar.go +++ b/qt6/gen_qmenubar.go @@ -15,7 +15,8 @@ import ( ) type QMenuBar struct { - h *C.QMenuBar + h *C.QMenuBar + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QMenuBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMenuBar(h *C.QMenuBar) *QMenuBar { +// newQMenuBar constructs the type using only CGO pointers. +func newQMenuBar(h *C.QMenuBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenuBar { if h == nil { return nil } - return &QMenuBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QMenuBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMenuBar(h unsafe.Pointer) *QMenuBar { - return newQMenuBar((*C.QMenuBar)(h)) +// UnsafeNewQMenuBar constructs the type using only unsafe pointers. +func UnsafeNewQMenuBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenuBar { + if h == nil { + return nil + } + + return &QMenuBar{h: (*C.QMenuBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMenuBar constructs a new QMenuBar object. func NewQMenuBar(parent *QWidget) *QMenuBar { - ret := C.QMenuBar_new(parent.cPointer()) - return newQMenuBar(ret) + var outptr_QMenuBar *C.QMenuBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenuBar_new(parent.cPointer(), &outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMenuBar2 constructs a new QMenuBar object. func NewQMenuBar2() *QMenuBar { - ret := C.QMenuBar_new2() - return newQMenuBar(ret) + var outptr_QMenuBar *C.QMenuBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMenuBar_new2(&outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMenuBar) MetaObject() *QMetaObject { @@ -76,7 +99,7 @@ func QMenuBar_Tr(s string) string { } func (this *QMenuBar) AddMenu(menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddMenu(this.h, menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddMenu(this.h, menu.cPointer())), nil) } func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { @@ -84,7 +107,7 @@ func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenuWithTitle(this.h, title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenuWithTitle(this.h, title_ms)), nil, nil, nil) } func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { @@ -92,19 +115,19 @@ func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms))) + return UnsafeNewQMenu(unsafe.Pointer(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms)), nil, nil, nil) } func (this *QMenuBar) AddSeparator() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddSeparator(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_AddSeparator(this.h)), nil) } func (this *QMenuBar) InsertSeparator(before *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertSeparator(this.h, before.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertSeparator(this.h, before.cPointer())), nil) } func (this *QMenuBar) InsertMenu(before *QAction, menu *QMenu) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer())), nil) } func (this *QMenuBar) Clear() { @@ -112,7 +135,7 @@ func (this *QMenuBar) Clear() { } func (this *QMenuBar) ActiveAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActiveAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActiveAction(this.h)), nil) } func (this *QMenuBar) SetActiveAction(action *QAction) { @@ -153,7 +176,7 @@ func (this *QMenuBar) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenuBar) ActionAt(param1 *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActionAt(this.h, param1.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QMenuBar_ActionAt(this.h, param1.cPointer())), nil) } func (this *QMenuBar) SetCornerWidget(w *QWidget) { @@ -161,7 +184,7 @@ func (this *QMenuBar) SetCornerWidget(w *QWidget) { } func (this *QMenuBar) CornerWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget(this.h)), nil, nil) } func (this *QMenuBar) IsNativeMenuBar() bool { @@ -191,7 +214,7 @@ func miqt_exec_callback_QMenuBar_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -211,7 +234,7 @@ func miqt_exec_callback_QMenuBar_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -243,12 +266,1051 @@ func (this *QMenuBar) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QMenuBar) CornerWidget1(corner Corner) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner))), nil, nil) +} + +func (this *QMenuBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMenuBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenuBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenuBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_SizeHint +func miqt_exec_callback_QMenuBar_SizeHint(self *C.QMenuBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMenuBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenuBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMenuBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MinimumSizeHint +func miqt_exec_callback_QMenuBar_MinimumSizeHint(self *C.QMenuBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QMenuBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenuBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QMenuBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_HeightForWidth +func miqt_exec_callback_QMenuBar_HeightForWidth(self *C.QMenuBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_SetVisible(visible bool) { + + C.QMenuBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMenuBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMenuBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_SetVisible +func miqt_exec_callback_QMenuBar_SetVisible(self *C.QMenuBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMenuBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QMenuBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenuBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ChangeEvent +func miqt_exec_callback_QMenuBar_ChangeEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QMenuBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QMenuBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_KeyPressEvent +func miqt_exec_callback_QMenuBar_KeyPressEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QMenuBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenuBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MouseReleaseEvent +func miqt_exec_callback_QMenuBar_MouseReleaseEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QMenuBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenuBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MousePressEvent +func miqt_exec_callback_QMenuBar_MousePressEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QMenuBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QMenuBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MouseMoveEvent +func miqt_exec_callback_QMenuBar_MouseMoveEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_LeaveEvent(param1 *QEvent) { + + C.QMenuBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnLeaveEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QMenuBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_LeaveEvent +func miqt_exec_callback_QMenuBar_LeaveEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QMenuBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QMenuBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_PaintEvent +func miqt_exec_callback_QMenuBar_PaintEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QMenuBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QMenuBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ResizeEvent +func miqt_exec_callback_QMenuBar_ResizeEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ActionEvent(param1 *QActionEvent) { + + C.QMenuBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnActionEvent(slot func(super func(param1 *QActionEvent), param1 *QActionEvent)) { + C.QMenuBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ActionEvent +func miqt_exec_callback_QMenuBar_ActionEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QActionEvent), param1 *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QMenuBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QMenuBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_FocusOutEvent +func miqt_exec_callback_QMenuBar_FocusOutEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QMenuBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QMenuBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_FocusInEvent +func miqt_exec_callback_QMenuBar_FocusInEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QMenuBar_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QMenuBar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_TimerEvent +func miqt_exec_callback_QMenuBar_TimerEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QMenuBar_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QMenuBar) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QMenuBar_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_EventFilter +func miqt_exec_callback_QMenuBar_EventFilter(self *C.QMenuBar, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QMenuBar_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QMenuBar) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QMenuBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_Event +func miqt_exec_callback_QMenuBar_Event(self *C.QMenuBar, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_InitStyleOption(option *QStyleOptionMenuItem, action *QAction) { + + C.QMenuBar_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer(), action.cPointer()) + +} +func (this *QMenuBar) OnInitStyleOption(slot func(super func(option *QStyleOptionMenuItem, action *QAction), option *QStyleOptionMenuItem, action *QAction)) { + C.QMenuBar_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InitStyleOption +func miqt_exec_callback_QMenuBar_InitStyleOption(self *C.QMenuBar, cb C.intptr_t, option *C.QStyleOptionMenuItem, action *C.QAction) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionMenuItem, action *QAction), option *QStyleOptionMenuItem, action *QAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionMenuItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQAction(unsafe.Pointer(action), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) + +} + +func (this *QMenuBar) callVirtualBase_DevType() int { + + return (int)(C.QMenuBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QMenuBar) OnDevType(slot func(super func() int) int) { + C.QMenuBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DevType +func miqt_exec_callback_QMenuBar_DevType(self *C.QMenuBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QMenuBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QMenuBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QMenuBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_HasHeightForWidth +func miqt_exec_callback_QMenuBar_HasHeightForWidth(self *C.QMenuBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QMenuBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QMenuBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QMenuBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_PaintEngine +func miqt_exec_callback_QMenuBar_PaintEngine(self *C.QMenuBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QMenuBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QMenuBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MouseDoubleClickEvent +func miqt_exec_callback_QMenuBar_MouseDoubleClickEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QMenuBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QMenuBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_WheelEvent +func miqt_exec_callback_QMenuBar_WheelEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QMenuBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMenuBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_KeyReleaseEvent +func miqt_exec_callback_QMenuBar_KeyReleaseEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QMenuBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QMenuBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_EnterEvent +func miqt_exec_callback_QMenuBar_EnterEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QMenuBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QMenuBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_MoveEvent +func miqt_exec_callback_QMenuBar_MoveEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMenuBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMenuBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_CloseEvent +func miqt_exec_callback_QMenuBar_CloseEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QMenuBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QMenuBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ContextMenuEvent +func miqt_exec_callback_QMenuBar_ContextMenuEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QMenuBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QMenuBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_TabletEvent +func miqt_exec_callback_QMenuBar_TabletEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QMenuBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QMenuBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DragEnterEvent +func miqt_exec_callback_QMenuBar_DragEnterEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QMenuBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QMenuBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DragMoveEvent +func miqt_exec_callback_QMenuBar_DragMoveEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QMenuBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QMenuBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DragLeaveEvent +func miqt_exec_callback_QMenuBar_DragLeaveEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QMenuBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QMenuBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_DropEvent +func miqt_exec_callback_QMenuBar_DropEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMenuBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMenuBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_ShowEvent +func miqt_exec_callback_QMenuBar_ShowEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QMenuBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMenuBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QMenuBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_HideEvent +func miqt_exec_callback_QMenuBar_HideEvent(self *C.QMenuBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QMenuBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QMenuBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QMenuBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_NativeEvent +func miqt_exec_callback_QMenuBar_NativeEvent(self *C.QMenuBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QMenuBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QMenuBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QMenuBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_Metric +func miqt_exec_callback_QMenuBar_Metric(self *C.QMenuBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QMenuBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QMenuBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QMenuBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QMenuBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InitPainter +func miqt_exec_callback_QMenuBar_InitPainter(self *C.QMenuBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QMenuBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QMenuBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QMenuBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QMenuBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_Redirected +func miqt_exec_callback_QMenuBar_Redirected(self *C.QMenuBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QMenuBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QMenuBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QMenuBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_SharedPainter +func miqt_exec_callback_QMenuBar_SharedPainter(self *C.QMenuBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QMenuBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMenuBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QMenuBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InputMethodEvent +func miqt_exec_callback_QMenuBar_InputMethodEvent(self *C.QMenuBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QMenuBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QMenuBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QMenuBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMenuBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QMenuBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_InputMethodQuery +func miqt_exec_callback_QMenuBar_InputMethodQuery(self *C.QMenuBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QMenuBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QMenuBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QMenuBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QMenuBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMenuBar_FocusNextPrevChild +func miqt_exec_callback_QMenuBar_FocusNextPrevChild(self *C.QMenuBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QMenuBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QMenuBar) Delete() { - C.QMenuBar_Delete(this.h) + C.QMenuBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmenubar.h b/qt6/gen_qmenubar.h index b3cb12ba..99c8fc36 100644 --- a/qt6/gen_qmenubar.h +++ b/qt6/gen_qmenubar.h @@ -16,28 +16,84 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMenuBar; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionMenuItem; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMenuBar QMenuBar; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionMenuItem QStyleOptionMenuItem; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QMenuBar* QMenuBar_new(QWidget* parent); -QMenuBar* QMenuBar_new2(); +void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMenuBar_MetaObject(const QMenuBar* self); void* QMenuBar_Metacast(QMenuBar* self, const char* param1); struct miqt_string QMenuBar_Tr(const char* s); @@ -66,11 +122,114 @@ void QMenuBar_Triggered(QMenuBar* self, QAction* action); void QMenuBar_connect_Triggered(QMenuBar* self, intptr_t slot); void QMenuBar_Hovered(QMenuBar* self, QAction* action); void QMenuBar_connect_Hovered(QMenuBar* self, intptr_t slot); +void QMenuBar_ChangeEvent(QMenuBar* self, QEvent* param1); +void QMenuBar_KeyPressEvent(QMenuBar* self, QKeyEvent* param1); +void QMenuBar_MouseReleaseEvent(QMenuBar* self, QMouseEvent* param1); +void QMenuBar_MousePressEvent(QMenuBar* self, QMouseEvent* param1); +void QMenuBar_MouseMoveEvent(QMenuBar* self, QMouseEvent* param1); +void QMenuBar_LeaveEvent(QMenuBar* self, QEvent* param1); +void QMenuBar_PaintEvent(QMenuBar* self, QPaintEvent* param1); +void QMenuBar_ResizeEvent(QMenuBar* self, QResizeEvent* param1); +void QMenuBar_ActionEvent(QMenuBar* self, QActionEvent* param1); +void QMenuBar_FocusOutEvent(QMenuBar* self, QFocusEvent* param1); +void QMenuBar_FocusInEvent(QMenuBar* self, QFocusEvent* param1); +void QMenuBar_TimerEvent(QMenuBar* self, QTimerEvent* param1); +bool QMenuBar_EventFilter(QMenuBar* self, QObject* param1, QEvent* param2); +bool QMenuBar_Event(QMenuBar* self, QEvent* param1); +void QMenuBar_InitStyleOption(const QMenuBar* self, QStyleOptionMenuItem* option, QAction* action); struct miqt_string QMenuBar_Tr2(const char* s, const char* c); struct miqt_string QMenuBar_Tr3(const char* s, const char* c, int n); void QMenuBar_SetCornerWidget2(QMenuBar* self, QWidget* w, int corner); QWidget* QMenuBar_CornerWidget1(const QMenuBar* self, int corner); -void QMenuBar_Delete(QMenuBar* self); +void QMenuBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMenuBar_virtualbase_SizeHint(const void* self); +void QMenuBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMenuBar_virtualbase_MinimumSizeHint(const void* self); +void QMenuBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QMenuBar_virtualbase_HeightForWidth(const void* self, int param1); +void QMenuBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QMenuBar_virtualbase_SetVisible(void* self, bool visible); +void QMenuBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QMenuBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QMenuBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QMenuBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QMenuBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QMenuBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_LeaveEvent(void* self, QEvent* param1); +void QMenuBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QMenuBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QMenuBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ActionEvent(void* self, QActionEvent* param1); +void QMenuBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QMenuBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QMenuBar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QMenuBar_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMenuBar_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QMenuBar_override_virtual_Event(void* self, intptr_t slot); +bool QMenuBar_virtualbase_Event(void* self, QEvent* param1); +void QMenuBar_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QMenuBar_virtualbase_InitStyleOption(const void* self, QStyleOptionMenuItem* option, QAction* action); +void QMenuBar_override_virtual_DevType(void* self, intptr_t slot); +int QMenuBar_virtualbase_DevType(const void* self); +void QMenuBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QMenuBar_virtualbase_HasHeightForWidth(const void* self); +void QMenuBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QMenuBar_virtualbase_PaintEngine(const void* self); +void QMenuBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QMenuBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QMenuBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QMenuBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QMenuBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QMenuBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMenuBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QMenuBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QMenuBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QMenuBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QMenuBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QMenuBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QMenuBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMenuBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QMenuBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QMenuBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QMenuBar_override_virtual_Metric(void* self, intptr_t slot); +int QMenuBar_virtualbase_Metric(const void* self, int param1); +void QMenuBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QMenuBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QMenuBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QMenuBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QMenuBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QMenuBar_virtualbase_SharedPainter(const void* self); +void QMenuBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QMenuBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QMenuBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QMenuBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QMenuBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QMenuBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QMenuBar_Delete(QMenuBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmessageauthenticationcode.cpp b/qt6/gen_qmessageauthenticationcode.cpp index f3c68be1..436a8bb1 100644 --- a/qt6/gen_qmessageauthenticationcode.cpp +++ b/qt6/gen_qmessageauthenticationcode.cpp @@ -5,13 +5,15 @@ #include "gen_qmessageauthenticationcode.h" #include "_cgo_export.h" -QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method) { - return new QMessageAuthenticationCode(static_cast(method)); +void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { + QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method)); + *outptr_QMessageAuthenticationCode = ret; } -QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key) { +void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { QByteArray key_QByteArray(key.data, key.len); - return new QMessageAuthenticationCode(static_cast(method), key_QByteArray); + QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method), key_QByteArray); + *outptr_QMessageAuthenticationCode = ret; } void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self) { @@ -56,7 +58,11 @@ struct miqt_string QMessageAuthenticationCode_Hash(struct miqt_string message, s return _ms; } -void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self) { - delete self; +void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmessageauthenticationcode.go b/qt6/gen_qmessageauthenticationcode.go index 7168f723..ce7de6cf 100644 --- a/qt6/gen_qmessageauthenticationcode.go +++ b/qt6/gen_qmessageauthenticationcode.go @@ -14,7 +14,8 @@ import ( ) type QMessageAuthenticationCode struct { - h *C.QMessageAuthenticationCode + h *C.QMessageAuthenticationCode + isSubclass bool } func (this *QMessageAuthenticationCode) cPointer() *C.QMessageAuthenticationCode { @@ -31,6 +32,7 @@ func (this *QMessageAuthenticationCode) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMessageAuthenticationCode constructs the type using only CGO pointers. func newQMessageAuthenticationCode(h *C.QMessageAuthenticationCode) *QMessageAuthenticationCode { if h == nil { return nil @@ -38,14 +40,23 @@ func newQMessageAuthenticationCode(h *C.QMessageAuthenticationCode) *QMessageAut return &QMessageAuthenticationCode{h: h} } +// UnsafeNewQMessageAuthenticationCode constructs the type using only unsafe pointers. func UnsafeNewQMessageAuthenticationCode(h unsafe.Pointer) *QMessageAuthenticationCode { - return newQMessageAuthenticationCode((*C.QMessageAuthenticationCode)(h)) + if h == nil { + return nil + } + + return &QMessageAuthenticationCode{h: (*C.QMessageAuthenticationCode)(h)} } // NewQMessageAuthenticationCode constructs a new QMessageAuthenticationCode object. func NewQMessageAuthenticationCode(method QCryptographicHash__Algorithm) *QMessageAuthenticationCode { - ret := C.QMessageAuthenticationCode_new((C.int)(method)) - return newQMessageAuthenticationCode(ret) + var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil + + C.QMessageAuthenticationCode_new((C.int)(method), &outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret.isSubclass = true + return ret } // NewQMessageAuthenticationCode2 constructs a new QMessageAuthenticationCode object. @@ -53,8 +64,12 @@ func NewQMessageAuthenticationCode2(method QCryptographicHash__Algorithm, key [] key_alias := C.struct_miqt_string{} key_alias.data = (*C.char)(unsafe.Pointer(&key[0])) key_alias.len = C.size_t(len(key)) - ret := C.QMessageAuthenticationCode_new2((C.int)(method), key_alias) - return newQMessageAuthenticationCode(ret) + var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil + + C.QMessageAuthenticationCode_new2((C.int)(method), key_alias, &outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret.isSubclass = true + return ret } func (this *QMessageAuthenticationCode) Reset() { @@ -107,7 +122,7 @@ func QMessageAuthenticationCode_Hash(message []byte, key []byte, method QCryptog // Delete this object from C++ memory. func (this *QMessageAuthenticationCode) Delete() { - C.QMessageAuthenticationCode_Delete(this.h) + C.QMessageAuthenticationCode_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmessageauthenticationcode.h b/qt6/gen_qmessageauthenticationcode.h index 25342ff9..7ae39218 100644 --- a/qt6/gen_qmessageauthenticationcode.h +++ b/qt6/gen_qmessageauthenticationcode.h @@ -24,8 +24,8 @@ typedef struct QIODevice QIODevice; typedef struct QMessageAuthenticationCode QMessageAuthenticationCode; #endif -QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method); -QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key); +void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); +void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self); void QMessageAuthenticationCode_SetKey(QMessageAuthenticationCode* self, struct miqt_string key); void QMessageAuthenticationCode_AddData(QMessageAuthenticationCode* self, const char* data, ptrdiff_t length); @@ -33,7 +33,7 @@ void QMessageAuthenticationCode_AddDataWithData(QMessageAuthenticationCode* self bool QMessageAuthenticationCode_AddDataWithDevice(QMessageAuthenticationCode* self, QIODevice* device); struct miqt_string QMessageAuthenticationCode_Result(const QMessageAuthenticationCode* self); struct miqt_string QMessageAuthenticationCode_Hash(struct miqt_string message, struct miqt_string key, int method); -void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self); +void QMessageAuthenticationCode_Delete(QMessageAuthenticationCode* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmessagebox.cpp b/qt6/gen_qmessagebox.cpp index 88c0e0fc..acfc9db5 100644 --- a/qt6/gen_qmessagebox.cpp +++ b/qt6/gen_qmessagebox.cpp @@ -1,10 +1,20 @@ #include #include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include +#include +#include +#include #include #include #include @@ -13,54 +23,490 @@ #include "gen_qmessagebox.h" #include "_cgo_export.h" -QMessageBox* QMessageBox_new(QWidget* parent) { - return new QMessageBox(parent); +class MiqtVirtualQMessageBox : public virtual QMessageBox { +public: + + MiqtVirtualQMessageBox(QWidget* parent): QMessageBox(parent) {}; + MiqtVirtualQMessageBox(): QMessageBox() {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text): QMessageBox(icon, title, text) {}; + MiqtVirtualQMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2): QMessageBox(title, text, icon, button0, button1, button2) {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons): QMessageBox(icon, title, text, buttons) {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QWidget* parent): QMessageBox(icon, title, text, buttons, parent) {}; + MiqtVirtualQMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QWidget* parent, Qt::WindowFlags flags): QMessageBox(icon, title, text, buttons, parent, flags) {}; + MiqtVirtualQMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent): QMessageBox(title, text, icon, button0, button1, button2, parent) {}; + MiqtVirtualQMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent, Qt::WindowFlags f): QMessageBox(title, text, icon, button0, button1, button2, parent, f) {}; + + virtual ~MiqtVirtualQMessageBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QMessageBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QMessageBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QMessageBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QMessageBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QMessageBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QMessageBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QMessageBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QMessageBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QMessageBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QMessageBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QMessageBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QMessageBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMessageBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QMessageBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QMessageBox::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QMessageBox_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QMessageBox::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QMessageBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMessageBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QMessageBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QMessageBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QMessageBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QMessageBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QMessageBox::open(); + return; + } + + + miqt_exec_callback_QMessageBox_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QMessageBox::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QMessageBox::exec(); + } + + + int callback_return_value = miqt_exec_callback_QMessageBox_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QMessageBox::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QMessageBox::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QMessageBox_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QMessageBox::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QMessageBox::accept(); + return; + } + + + miqt_exec_callback_QMessageBox_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QMessageBox::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QMessageBox::reject(); + return; + } + + + miqt_exec_callback_QMessageBox_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QMessageBox::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QMessageBox::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QMessageBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QMessageBox::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QMessageBox::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QMessageBox_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QMessageBox::eventFilter(param1, param2); + + } + +}; + +void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(parent); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new2() { - return new QMessageBox(); +void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text) { +void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2) { +void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons) { +void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent) { +void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags) { +void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent) { +void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f) { +void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - return new QMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); + MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); + *outptr_QMessageBox = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QMessageBox_MetaObject(const QMessageBox* self) { @@ -403,7 +849,7 @@ void QMessageBox_ButtonClicked(QMessageBox* self, QAbstractButton* button) { } void QMessageBox_connect_ButtonClicked(QMessageBox* self, intptr_t slot) { - QMessageBox::connect(self, static_cast(&QMessageBox::buttonClicked), self, [=](QAbstractButton* button) { + MiqtVirtualQMessageBox::connect(self, static_cast(&QMessageBox::buttonClicked), self, [=](QAbstractButton* button) { QAbstractButton* sigval1 = button; miqt_exec_callback_QMessageBox_ButtonClicked(slot, sigval1); }); @@ -675,7 +1121,139 @@ int QMessageBox_Critical8(QWidget* parent, struct miqt_string title, struct miqt return QMessageBox::critical(parent, title_QString, text_QString, button0Text_QString, button1Text_QString, button2Text_QString, static_cast(defaultButtonNumber), static_cast(escapeButtonNumber)); } -void QMessageBox_Delete(QMessageBox* self) { - delete self; +void QMessageBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Event = slot; +} + +bool QMessageBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Event(e); +} + +void QMessageBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ResizeEvent = slot; +} + +void QMessageBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QMessageBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ShowEvent = slot; +} + +void QMessageBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QMessageBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__CloseEvent = slot; +} + +void QMessageBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QMessageBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QMessageBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QMessageBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ChangeEvent = slot; +} + +void QMessageBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QMessageBox_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__SetVisible = slot; +} + +void QMessageBox_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_SetVisible(visible); +} + +void QMessageBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QMessageBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQMessageBox*)(self) )->virtualbase_SizeHint(); +} + +void QMessageBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QMessageBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQMessageBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QMessageBox_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Open = slot; +} + +void QMessageBox_virtualbase_Open(void* self) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Open(); +} + +void QMessageBox_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Exec = slot; +} + +int QMessageBox_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Exec(); +} + +void QMessageBox_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Done = slot; +} + +void QMessageBox_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Done(param1); +} + +void QMessageBox_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Accept = slot; +} + +void QMessageBox_virtualbase_Accept(void* self) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Accept(); +} + +void QMessageBox_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__Reject = slot; +} + +void QMessageBox_virtualbase_Reject(void* self) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_Reject(); +} + +void QMessageBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QMessageBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QMessageBox_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMessageBox*)(self) )->handle__EventFilter = slot; +} + +bool QMessageBox_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQMessageBox*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QMessageBox_Delete(QMessageBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmessagebox.go b/qt6/gen_qmessagebox.go index fc97a6e3..e6ca81d7 100644 --- a/qt6/gen_qmessagebox.go +++ b/qt6/gen_qmessagebox.go @@ -73,7 +73,8 @@ const ( ) type QMessageBox struct { - h *C.QMessageBox + h *C.QMessageBox + isSubclass bool *QDialog } @@ -91,27 +92,51 @@ func (this *QMessageBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMessageBox(h *C.QMessageBox) *QMessageBox { +// newQMessageBox constructs the type using only CGO pointers. +func newQMessageBox(h *C.QMessageBox, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMessageBox { if h == nil { return nil } - return &QMessageBox{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QMessageBox{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQMessageBox(h unsafe.Pointer) *QMessageBox { - return newQMessageBox((*C.QMessageBox)(h)) +// UnsafeNewQMessageBox constructs the type using only unsafe pointers. +func UnsafeNewQMessageBox(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMessageBox { + if h == nil { + return nil + } + + return &QMessageBox{h: (*C.QMessageBox)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQMessageBox constructs a new QMessageBox object. func NewQMessageBox(parent *QWidget) *QMessageBox { - ret := C.QMessageBox_new(parent.cPointer()) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new(parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox2 constructs a new QMessageBox object. func NewQMessageBox2() *QMessageBox { - ret := C.QMessageBox_new2() - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new2(&outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox3 constructs a new QMessageBox object. @@ -124,8 +149,16 @@ func NewQMessageBox3(icon QMessageBox__Icon, title string, text string) *QMessag text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new3((C.int)(icon), title_ms, text_ms) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new3((C.int)(icon), title_ms, text_ms, &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox4 constructs a new QMessageBox object. @@ -138,8 +171,16 @@ func NewQMessageBox4(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox5 constructs a new QMessageBox object. @@ -152,8 +193,16 @@ func NewQMessageBox5(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox6 constructs a new QMessageBox object. @@ -166,8 +215,16 @@ func NewQMessageBox6(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer()) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox7 constructs a new QMessageBox object. @@ -180,8 +237,16 @@ func NewQMessageBox7(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox8 constructs a new QMessageBox object. @@ -194,8 +259,16 @@ func NewQMessageBox8(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer()) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQMessageBox9 constructs a new QMessageBox object. @@ -208,8 +281,16 @@ func NewQMessageBox9(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f)) - return newQMessageBox(ret) + var outptr_QMessageBox *C.QMessageBox = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QMessageBox) MetaObject() *QMetaObject { @@ -240,11 +321,11 @@ func (this *QMessageBox) AddButton2(text string, role QMessageBox__ButtonRole) * text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role))), nil, nil, nil, nil) } func (this *QMessageBox) AddButtonWithButton(button QMessageBox__StandardButton) *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button)))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button))), nil, nil, nil, nil) } func (this *QMessageBox) RemoveButton(button *QAbstractButton) { @@ -256,7 +337,7 @@ func (this *QMessageBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAbstractButton(unsafe.Pointer(_outCast[i]), nil, nil, nil) } return _ret } @@ -278,11 +359,11 @@ func (this *QMessageBox) StandardButton(button *QAbstractButton) QMessageBox__St } func (this *QMessageBox) Button(which QMessageBox__StandardButton) *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_Button(this.h, (C.int)(which)))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_Button(this.h, (C.int)(which))), nil, nil, nil) } func (this *QMessageBox) DefaultButton() *QPushButton { - return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_DefaultButton(this.h))) + return UnsafeNewQPushButton(unsafe.Pointer(C.QMessageBox_DefaultButton(this.h)), nil, nil, nil, nil) } func (this *QMessageBox) SetDefaultButton(button *QPushButton) { @@ -294,7 +375,7 @@ func (this *QMessageBox) SetDefaultButtonWithButton(button QMessageBox__Standard } func (this *QMessageBox) EscapeButton() *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_EscapeButton(this.h))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_EscapeButton(this.h)), nil, nil, nil) } func (this *QMessageBox) SetEscapeButton(button *QAbstractButton) { @@ -306,7 +387,7 @@ func (this *QMessageBox) SetEscapeButtonWithButton(button QMessageBox__StandardB } func (this *QMessageBox) ClickedButton() *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_ClickedButton(this.h))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QMessageBox_ClickedButton(this.h)), nil, nil, nil) } func (this *QMessageBox) Text() string { @@ -334,7 +415,7 @@ func (this *QMessageBox) SetIcon(icon QMessageBox__Icon) { func (this *QMessageBox) IconPixmap() *QPixmap { _ret := C.QMessageBox_IconPixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -364,7 +445,7 @@ func (this *QMessageBox) SetCheckBox(cb *QCheckBox) { } func (this *QMessageBox) CheckBox() *QCheckBox { - return UnsafeNewQCheckBox(unsafe.Pointer(C.QMessageBox_CheckBox(this.h))) + return UnsafeNewQCheckBox(unsafe.Pointer(C.QMessageBox_CheckBox(this.h)), nil, nil, nil, nil) } func QMessageBox_Information(parent *QWidget, title string, text string) QMessageBox__StandardButton { @@ -650,7 +731,7 @@ func (this *QMessageBox) SetWindowModality(windowModality WindowModality) { func QMessageBox_StandardIcon(icon QMessageBox__Icon) *QPixmap { _ret := C.QMessageBox_StandardIcon((C.int)(icon)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -670,7 +751,7 @@ func miqt_exec_callback_QMessageBox_ButtonClicked(cb C.intptr_t, button *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button)) + slotval1 := UnsafeNewQAbstractButton(unsafe.Pointer(button), nil, nil, nil) gofunc(slotval1) } @@ -1253,9 +1334,376 @@ func QMessageBox_Critical8(parent *QWidget, title string, text string, button0Te return (int)(C.QMessageBox_Critical8(parent.cPointer(), title_ms, text_ms, button0Text_ms, button1Text_ms, button2Text_ms, (C.int)(defaultButtonNumber), (C.int)(escapeButtonNumber))) } +func (this *QMessageBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QMessageBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QMessageBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QMessageBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Event +func miqt_exec_callback_QMessageBox_Event(self *C.QMessageBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMessageBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QMessageBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QMessageBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ResizeEvent +func miqt_exec_callback_QMessageBox_ResizeEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QMessageBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QMessageBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ShowEvent +func miqt_exec_callback_QMessageBox_ShowEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QMessageBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QMessageBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_CloseEvent +func miqt_exec_callback_QMessageBox_CloseEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QMessageBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QMessageBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_KeyPressEvent +func miqt_exec_callback_QMessageBox_KeyPressEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QMessageBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMessageBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMessageBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ChangeEvent +func miqt_exec_callback_QMessageBox_ChangeEvent(self *C.QMessageBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_SetVisible(visible bool) { + + C.QMessageBox_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QMessageBox) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QMessageBox_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_SetVisible +func miqt_exec_callback_QMessageBox_SetVisible(self *C.QMessageBox, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QMessageBox{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QMessageBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMessageBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QMessageBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_SizeHint +func miqt_exec_callback_QMessageBox_SizeHint(self *C.QMessageBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMessageBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QMessageBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMessageBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QMessageBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_MinimumSizeHint +func miqt_exec_callback_QMessageBox_MinimumSizeHint(self *C.QMessageBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QMessageBox) callVirtualBase_Open() { + + C.QMessageBox_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QMessageBox) OnOpen(slot func(super func())) { + C.QMessageBox_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Open +func miqt_exec_callback_QMessageBox_Open(self *C.QMessageBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QMessageBox{h: self}).callVirtualBase_Open) + +} + +func (this *QMessageBox) callVirtualBase_Exec() int { + + return (int)(C.QMessageBox_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QMessageBox) OnExec(slot func(super func() int) int) { + C.QMessageBox_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Exec +func miqt_exec_callback_QMessageBox_Exec(self *C.QMessageBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QMessageBox) callVirtualBase_Done(param1 int) { + + C.QMessageBox_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QMessageBox) OnDone(slot func(super func(param1 int), param1 int)) { + C.QMessageBox_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Done +func miqt_exec_callback_QMessageBox_Done(self *C.QMessageBox, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QMessageBox{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_Accept() { + + C.QMessageBox_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QMessageBox) OnAccept(slot func(super func())) { + C.QMessageBox_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Accept +func miqt_exec_callback_QMessageBox_Accept(self *C.QMessageBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QMessageBox{h: self}).callVirtualBase_Accept) + +} + +func (this *QMessageBox) callVirtualBase_Reject() { + + C.QMessageBox_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QMessageBox) OnReject(slot func(super func())) { + C.QMessageBox_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_Reject +func miqt_exec_callback_QMessageBox_Reject(self *C.QMessageBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QMessageBox{h: self}).callVirtualBase_Reject) + +} + +func (this *QMessageBox) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QMessageBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QMessageBox) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QMessageBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_ContextMenuEvent +func miqt_exec_callback_QMessageBox_ContextMenuEvent(self *C.QMessageBox, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QMessageBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QMessageBox) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QMessageBox_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QMessageBox) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QMessageBox_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMessageBox_EventFilter +func miqt_exec_callback_QMessageBox_EventFilter(self *C.QMessageBox, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QMessageBox{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QMessageBox) Delete() { - C.QMessageBox_Delete(this.h) + C.QMessageBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmessagebox.h b/qt6/gen_qmessagebox.h index 3e20deea..e380a068 100644 --- a/qt6/gen_qmessagebox.h +++ b/qt6/gen_qmessagebox.h @@ -17,30 +17,50 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QCheckBox; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMessageBox; class QMetaObject; +class QObject; +class QPaintDevice; class QPixmap; class QPushButton; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else typedef struct QAbstractButton QAbstractButton; typedef struct QCheckBox QCheckBox; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMessageBox QMessageBox; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPixmap QPixmap; typedef struct QPushButton QPushButton; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QMessageBox* QMessageBox_new(QWidget* parent); -QMessageBox* QMessageBox_new2(); -QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text); -QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2); -QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons); -QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent); -QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags); -QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent); -QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f); +void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QMessageBox_MetaObject(const QMessageBox* self); void* QMessageBox_Metacast(QMessageBox* self, const char* param1); struct miqt_string QMessageBox_Tr(const char* s); @@ -102,6 +122,12 @@ void QMessageBox_SetWindowModality(QMessageBox* self, int windowModality); QPixmap* QMessageBox_StandardIcon(int icon); void QMessageBox_ButtonClicked(QMessageBox* self, QAbstractButton* button); void QMessageBox_connect_ButtonClicked(QMessageBox* self, intptr_t slot); +bool QMessageBox_Event(QMessageBox* self, QEvent* e); +void QMessageBox_ResizeEvent(QMessageBox* self, QResizeEvent* event); +void QMessageBox_ShowEvent(QMessageBox* self, QShowEvent* event); +void QMessageBox_CloseEvent(QMessageBox* self, QCloseEvent* event); +void QMessageBox_KeyPressEvent(QMessageBox* self, QKeyEvent* event); +void QMessageBox_ChangeEvent(QMessageBox* self, QEvent* event); struct miqt_string QMessageBox_Tr2(const char* s, const char* c); struct miqt_string QMessageBox_Tr3(const char* s, const char* c, int n); int QMessageBox_Information42(QWidget* parent, struct miqt_string title, struct miqt_string text, int buttons); @@ -136,7 +162,39 @@ int QMessageBox_Critical52(QWidget* parent, struct miqt_string title, struct miq int QMessageBox_Critical62(QWidget* parent, struct miqt_string title, struct miqt_string text, struct miqt_string button0Text, struct miqt_string button1Text, struct miqt_string button2Text); int QMessageBox_Critical7(QWidget* parent, struct miqt_string title, struct miqt_string text, struct miqt_string button0Text, struct miqt_string button1Text, struct miqt_string button2Text, int defaultButtonNumber); int QMessageBox_Critical8(QWidget* parent, struct miqt_string title, struct miqt_string text, struct miqt_string button0Text, struct miqt_string button1Text, struct miqt_string button2Text, int defaultButtonNumber, int escapeButtonNumber); -void QMessageBox_Delete(QMessageBox* self); +void QMessageBox_override_virtual_Event(void* self, intptr_t slot); +bool QMessageBox_virtualbase_Event(void* self, QEvent* e); +void QMessageBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QMessageBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QMessageBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QMessageBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QMessageBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QMessageBox_override_virtual_SetVisible(void* self, intptr_t slot); +void QMessageBox_virtualbase_SetVisible(void* self, bool visible); +void QMessageBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QMessageBox_virtualbase_SizeHint(const void* self); +void QMessageBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QMessageBox_virtualbase_MinimumSizeHint(const void* self); +void QMessageBox_override_virtual_Open(void* self, intptr_t slot); +void QMessageBox_virtualbase_Open(void* self); +void QMessageBox_override_virtual_Exec(void* self, intptr_t slot); +int QMessageBox_virtualbase_Exec(void* self); +void QMessageBox_override_virtual_Done(void* self, intptr_t slot); +void QMessageBox_virtualbase_Done(void* self, int param1); +void QMessageBox_override_virtual_Accept(void* self, intptr_t slot); +void QMessageBox_virtualbase_Accept(void* self); +void QMessageBox_override_virtual_Reject(void* self, intptr_t slot); +void QMessageBox_virtualbase_Reject(void* self); +void QMessageBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QMessageBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QMessageBox_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMessageBox_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QMessageBox_Delete(QMessageBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmetacontainer.cpp b/qt6/gen_qmetacontainer.cpp index 35bdda0b..60f94663 100644 --- a/qt6/gen_qmetacontainer.cpp +++ b/qt6/gen_qmetacontainer.cpp @@ -9,40 +9,60 @@ #include "gen_qmetacontainer.h" #include "_cgo_export.h" -QtMetaContainerPrivate__QMetaContainerInterface* QtMetaContainerPrivate__QMetaContainerInterface_new() { - return new QtMetaContainerPrivate::QMetaContainerInterface(); +void QtMetaContainerPrivate__QMetaContainerInterface_new(QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface) { + QtMetaContainerPrivate::QMetaContainerInterface* ret = new QtMetaContainerPrivate::QMetaContainerInterface(); + *outptr_QtMetaContainerPrivate__QMetaContainerInterface = ret; } -void QtMetaContainerPrivate__QMetaContainerInterface_Delete(QtMetaContainerPrivate__QMetaContainerInterface* self) { - delete self; +void QtMetaContainerPrivate__QMetaContainerInterface_Delete(QtMetaContainerPrivate__QMetaContainerInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaContainerPrivate__QMetaSequenceInterface* QtMetaContainerPrivate__QMetaSequenceInterface_new() { - return new QtMetaContainerPrivate::QMetaSequenceInterface(); +void QtMetaContainerPrivate__QMetaSequenceInterface_new(QtMetaContainerPrivate__QMetaSequenceInterface** outptr_QtMetaContainerPrivate__QMetaSequenceInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface) { + QtMetaContainerPrivate::QMetaSequenceInterface* ret = new QtMetaContainerPrivate::QMetaSequenceInterface(); + *outptr_QtMetaContainerPrivate__QMetaSequenceInterface = ret; + *outptr_QtMetaContainerPrivate::QMetaContainerInterface = static_cast(ret); } -void QtMetaContainerPrivate__QMetaSequenceInterface_Delete(QtMetaContainerPrivate__QMetaSequenceInterface* self) { - delete self; +void QtMetaContainerPrivate__QMetaSequenceInterface_Delete(QtMetaContainerPrivate__QMetaSequenceInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaContainerPrivate__QMetaAssociationInterface* QtMetaContainerPrivate__QMetaAssociationInterface_new() { - return new QtMetaContainerPrivate::QMetaAssociationInterface(); +void QtMetaContainerPrivate__QMetaAssociationInterface_new(QtMetaContainerPrivate__QMetaAssociationInterface** outptr_QtMetaContainerPrivate__QMetaAssociationInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface) { + QtMetaContainerPrivate::QMetaAssociationInterface* ret = new QtMetaContainerPrivate::QMetaAssociationInterface(); + *outptr_QtMetaContainerPrivate__QMetaAssociationInterface = ret; + *outptr_QtMetaContainerPrivate::QMetaContainerInterface = static_cast(ret); } -void QtMetaContainerPrivate__QMetaAssociationInterface_Delete(QtMetaContainerPrivate__QMetaAssociationInterface* self) { - delete self; +void QtMetaContainerPrivate__QMetaAssociationInterface_Delete(QtMetaContainerPrivate__QMetaAssociationInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaContainer* QMetaContainer_new() { - return new QMetaContainer(); +void QMetaContainer_new(QMetaContainer** outptr_QMetaContainer) { + QMetaContainer* ret = new QMetaContainer(); + *outptr_QMetaContainer = ret; } -QMetaContainer* QMetaContainer_new2(QtMetaContainerPrivate__QMetaContainerInterface* d) { - return new QMetaContainer(d); +void QMetaContainer_new2(QtMetaContainerPrivate__QMetaContainerInterface* d, QMetaContainer** outptr_QMetaContainer) { + QMetaContainer* ret = new QMetaContainer(d); + *outptr_QMetaContainer = ret; } -QMetaContainer* QMetaContainer_new3(QMetaContainer* param1) { - return new QMetaContainer(*param1); +void QMetaContainer_new3(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer) { + QMetaContainer* ret = new QMetaContainer(*param1); + *outptr_QMetaContainer = ret; } bool QMetaContainer_HasInputIterator(const QMetaContainer* self) { @@ -144,16 +164,24 @@ ptrdiff_t QMetaContainer_DiffConstIterator(const QMetaContainer* self, const voi return static_cast(_ret); } -void QMetaContainer_Delete(QMetaContainer* self) { - delete self; +void QMetaContainer_Delete(QMetaContainer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaSequence* QMetaSequence_new() { - return new QMetaSequence(); +void QMetaSequence_new(QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer) { + QMetaSequence* ret = new QMetaSequence(); + *outptr_QMetaSequence = ret; + *outptr_QMetaContainer = static_cast(ret); } -QMetaSequence* QMetaSequence_new2(QtMetaContainerPrivate__QMetaSequenceInterface* d) { - return new QMetaSequence(d); +void QMetaSequence_new2(QtMetaContainerPrivate__QMetaSequenceInterface* d, QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer) { + QMetaSequence* ret = new QMetaSequence(d); + *outptr_QMetaSequence = ret; + *outptr_QMetaContainer = static_cast(ret); } QMetaType* QMetaSequence_ValueMetaType(const QMetaSequence* self) { @@ -276,16 +304,24 @@ void QMetaSequence_ValueAtConstIterator(const QMetaSequence* self, const void* i self->valueAtConstIterator(iterator, result); } -void QMetaSequence_Delete(QMetaSequence* self) { - delete self; +void QMetaSequence_Delete(QMetaSequence* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaAssociation* QMetaAssociation_new() { - return new QMetaAssociation(); +void QMetaAssociation_new(QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer) { + QMetaAssociation* ret = new QMetaAssociation(); + *outptr_QMetaAssociation = ret; + *outptr_QMetaContainer = static_cast(ret); } -QMetaAssociation* QMetaAssociation_new2(QtMetaContainerPrivate__QMetaAssociationInterface* d) { - return new QMetaAssociation(d); +void QMetaAssociation_new2(QtMetaContainerPrivate__QMetaAssociationInterface* d, QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer) { + QMetaAssociation* ret = new QMetaAssociation(d); + *outptr_QMetaAssociation = ret; + *outptr_QMetaContainer = static_cast(ret); } QMetaType* QMetaAssociation_KeyMetaType(const QMetaAssociation* self) { @@ -392,7 +428,11 @@ void* QMetaAssociation_CreateConstIteratorAtKey(const QMetaAssociation* self, co return self->createConstIteratorAtKey(container, key); } -void QMetaAssociation_Delete(QMetaAssociation* self) { - delete self; +void QMetaAssociation_Delete(QMetaAssociation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmetacontainer.go b/qt6/gen_qmetacontainer.go index 660037e4..abcbe919 100644 --- a/qt6/gen_qmetacontainer.go +++ b/qt6/gen_qmetacontainer.go @@ -13,679 +13,807 @@ import ( "unsafe" ) -type QtMetaContainerPrivate__IteratorCapability byte + type QtMetaContainerPrivate__IteratorCapability byte + const ( +QtMetaContainerPrivate__InputCapability QtMetaContainerPrivate__IteratorCapability = 1 +QtMetaContainerPrivate__ForwardCapability QtMetaContainerPrivate__IteratorCapability = 2 +QtMetaContainerPrivate__BiDirectionalCapability QtMetaContainerPrivate__IteratorCapability = 4 +QtMetaContainerPrivate__RandomAccessCapability QtMetaContainerPrivate__IteratorCapability = 8 -const ( - QtMetaContainerPrivate__InputCapability QtMetaContainerPrivate__IteratorCapability = 1 - QtMetaContainerPrivate__ForwardCapability QtMetaContainerPrivate__IteratorCapability = 2 - QtMetaContainerPrivate__BiDirectionalCapability QtMetaContainerPrivate__IteratorCapability = 4 - QtMetaContainerPrivate__RandomAccessCapability QtMetaContainerPrivate__IteratorCapability = 8 ) -type QtMetaContainerPrivate__AddRemoveCapability byte -const ( - QtMetaContainerPrivate__CanAddAtBegin QtMetaContainerPrivate__AddRemoveCapability = 1 - QtMetaContainerPrivate__CanRemoveAtBegin QtMetaContainerPrivate__AddRemoveCapability = 2 - QtMetaContainerPrivate__CanAddAtEnd QtMetaContainerPrivate__AddRemoveCapability = 4 - QtMetaContainerPrivate__CanRemoveAtEnd QtMetaContainerPrivate__AddRemoveCapability = 8 -) - -type QtMetaContainerPrivate__QMetaContainerInterface__Position byte + type QtMetaContainerPrivate__AddRemoveCapability byte + const ( +QtMetaContainerPrivate__CanAddAtBegin QtMetaContainerPrivate__AddRemoveCapability = 1 +QtMetaContainerPrivate__CanRemoveAtBegin QtMetaContainerPrivate__AddRemoveCapability = 2 +QtMetaContainerPrivate__CanAddAtEnd QtMetaContainerPrivate__AddRemoveCapability = 4 +QtMetaContainerPrivate__CanRemoveAtEnd QtMetaContainerPrivate__AddRemoveCapability = 8 -const ( - QtMetaContainerPrivate__QMetaContainerInterface__AtBegin QtMetaContainerPrivate__QMetaContainerInterface__Position = 0 - QtMetaContainerPrivate__QMetaContainerInterface__AtEnd QtMetaContainerPrivate__QMetaContainerInterface__Position = 1 - QtMetaContainerPrivate__QMetaContainerInterface__Unspecified QtMetaContainerPrivate__QMetaContainerInterface__Position = 2 ) -type QtMetaContainerPrivate__QMetaContainerInterface struct { - h *C.QtMetaContainerPrivate__QMetaContainerInterface -} - -func (this *QtMetaContainerPrivate__QMetaContainerInterface) cPointer() *C.QtMetaContainerPrivate__QMetaContainerInterface { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaContainerPrivate__QMetaContainerInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQtMetaContainerPrivate__QMetaContainerInterface(h *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaContainerInterface { - if h == nil { - return nil - } - return &QtMetaContainerPrivate__QMetaContainerInterface{h: h} -} - -func UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h unsafe.Pointer) *QtMetaContainerPrivate__QMetaContainerInterface { - return newQtMetaContainerPrivate__QMetaContainerInterface((*C.QtMetaContainerPrivate__QMetaContainerInterface)(h)) -} - -// NewQtMetaContainerPrivate__QMetaContainerInterface constructs a new QtMetaContainerPrivate::QMetaContainerInterface object. -func NewQtMetaContainerPrivate__QMetaContainerInterface() *QtMetaContainerPrivate__QMetaContainerInterface { - ret := C.QtMetaContainerPrivate__QMetaContainerInterface_new() - return newQtMetaContainerPrivate__QMetaContainerInterface(ret) -} - -// Delete this object from C++ memory. -func (this *QtMetaContainerPrivate__QMetaContainerInterface) Delete() { - C.QtMetaContainerPrivate__QMetaContainerInterface_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaContainerPrivate__QMetaContainerInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaContainerInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtMetaContainerPrivate__QMetaSequenceInterface struct { - h *C.QtMetaContainerPrivate__QMetaSequenceInterface - *QtMetaContainerPrivate__QMetaContainerInterface -} - -func (this *QtMetaContainerPrivate__QMetaSequenceInterface) cPointer() *C.QtMetaContainerPrivate__QMetaSequenceInterface { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaContainerPrivate__QMetaSequenceInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQtMetaContainerPrivate__QMetaSequenceInterface(h *C.QtMetaContainerPrivate__QMetaSequenceInterface) *QtMetaContainerPrivate__QMetaSequenceInterface { - if h == nil { - return nil - } - return &QtMetaContainerPrivate__QMetaSequenceInterface{h: h, QtMetaContainerPrivate__QMetaContainerInterface: UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(unsafe.Pointer(h))} -} - -func UnsafeNewQtMetaContainerPrivate__QMetaSequenceInterface(h unsafe.Pointer) *QtMetaContainerPrivate__QMetaSequenceInterface { - return newQtMetaContainerPrivate__QMetaSequenceInterface((*C.QtMetaContainerPrivate__QMetaSequenceInterface)(h)) -} - -// NewQtMetaContainerPrivate__QMetaSequenceInterface constructs a new QtMetaContainerPrivate::QMetaSequenceInterface object. -func NewQtMetaContainerPrivate__QMetaSequenceInterface() *QtMetaContainerPrivate__QMetaSequenceInterface { - ret := C.QtMetaContainerPrivate__QMetaSequenceInterface_new() - return newQtMetaContainerPrivate__QMetaSequenceInterface(ret) -} - -// Delete this object from C++ memory. -func (this *QtMetaContainerPrivate__QMetaSequenceInterface) Delete() { - C.QtMetaContainerPrivate__QMetaSequenceInterface_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaContainerPrivate__QMetaSequenceInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaSequenceInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtMetaContainerPrivate__QMetaAssociationInterface struct { - h *C.QtMetaContainerPrivate__QMetaAssociationInterface - *QtMetaContainerPrivate__QMetaContainerInterface -} - -func (this *QtMetaContainerPrivate__QMetaAssociationInterface) cPointer() *C.QtMetaContainerPrivate__QMetaAssociationInterface { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaContainerPrivate__QMetaAssociationInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQtMetaContainerPrivate__QMetaAssociationInterface(h *C.QtMetaContainerPrivate__QMetaAssociationInterface) *QtMetaContainerPrivate__QMetaAssociationInterface { - if h == nil { - return nil - } - return &QtMetaContainerPrivate__QMetaAssociationInterface{h: h, QtMetaContainerPrivate__QMetaContainerInterface: UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(unsafe.Pointer(h))} -} - -func UnsafeNewQtMetaContainerPrivate__QMetaAssociationInterface(h unsafe.Pointer) *QtMetaContainerPrivate__QMetaAssociationInterface { - return newQtMetaContainerPrivate__QMetaAssociationInterface((*C.QtMetaContainerPrivate__QMetaAssociationInterface)(h)) -} - -// NewQtMetaContainerPrivate__QMetaAssociationInterface constructs a new QtMetaContainerPrivate::QMetaAssociationInterface object. -func NewQtMetaContainerPrivate__QMetaAssociationInterface() *QtMetaContainerPrivate__QMetaAssociationInterface { - ret := C.QtMetaContainerPrivate__QMetaAssociationInterface_new() - return newQtMetaContainerPrivate__QMetaAssociationInterface(ret) -} - -// Delete this object from C++ memory. -func (this *QtMetaContainerPrivate__QMetaAssociationInterface) Delete() { - C.QtMetaContainerPrivate__QMetaAssociationInterface_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaContainerPrivate__QMetaAssociationInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaAssociationInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QMetaContainer struct { - h *C.QMetaContainer -} - -func (this *QMetaContainer) cPointer() *C.QMetaContainer { - if this == nil { - return nil - } - return this.h -} - -func (this *QMetaContainer) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQMetaContainer(h *C.QMetaContainer) *QMetaContainer { - if h == nil { - return nil - } - return &QMetaContainer{h: h} -} - -func UnsafeNewQMetaContainer(h unsafe.Pointer) *QMetaContainer { - return newQMetaContainer((*C.QMetaContainer)(h)) -} - -// NewQMetaContainer constructs a new QMetaContainer object. -func NewQMetaContainer() *QMetaContainer { - ret := C.QMetaContainer_new() - return newQMetaContainer(ret) -} - -// NewQMetaContainer2 constructs a new QMetaContainer object. -func NewQMetaContainer2(d *QtMetaContainerPrivate__QMetaContainerInterface) *QMetaContainer { - ret := C.QMetaContainer_new2(d.cPointer()) - return newQMetaContainer(ret) -} - -// NewQMetaContainer3 constructs a new QMetaContainer object. -func NewQMetaContainer3(param1 *QMetaContainer) *QMetaContainer { - ret := C.QMetaContainer_new3(param1.cPointer()) - return newQMetaContainer(ret) -} - -func (this *QMetaContainer) HasInputIterator() bool { - return (bool)(C.QMetaContainer_HasInputIterator(this.h)) -} - -func (this *QMetaContainer) HasForwardIterator() bool { - return (bool)(C.QMetaContainer_HasForwardIterator(this.h)) -} - -func (this *QMetaContainer) HasBidirectionalIterator() bool { - return (bool)(C.QMetaContainer_HasBidirectionalIterator(this.h)) -} - -func (this *QMetaContainer) HasRandomAccessIterator() bool { - return (bool)(C.QMetaContainer_HasRandomAccessIterator(this.h)) -} - -func (this *QMetaContainer) HasSize() bool { - return (bool)(C.QMetaContainer_HasSize(this.h)) -} - -func (this *QMetaContainer) Size(container unsafe.Pointer) int64 { - return (int64)(C.QMetaContainer_Size(this.h, container)) -} - -func (this *QMetaContainer) CanClear() bool { - return (bool)(C.QMetaContainer_CanClear(this.h)) -} - -func (this *QMetaContainer) Clear(container unsafe.Pointer) { - C.QMetaContainer_Clear(this.h, container) -} - -func (this *QMetaContainer) HasIterator() bool { - return (bool)(C.QMetaContainer_HasIterator(this.h)) -} - -func (this *QMetaContainer) Begin(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_Begin(this.h, container)) -} - -func (this *QMetaContainer) End(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_End(this.h, container)) -} - -func (this *QMetaContainer) DestroyIterator(iterator unsafe.Pointer) { - C.QMetaContainer_DestroyIterator(this.h, iterator) -} - -func (this *QMetaContainer) CompareIterator(i unsafe.Pointer, j unsafe.Pointer) bool { - return (bool)(C.QMetaContainer_CompareIterator(this.h, i, j)) -} - -func (this *QMetaContainer) CopyIterator(target unsafe.Pointer, source unsafe.Pointer) { - C.QMetaContainer_CopyIterator(this.h, target, source) -} - -func (this *QMetaContainer) AdvanceIterator(iterator unsafe.Pointer, step int64) { - C.QMetaContainer_AdvanceIterator(this.h, iterator, (C.ptrdiff_t)(step)) -} - -func (this *QMetaContainer) DiffIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { - return (int64)(C.QMetaContainer_DiffIterator(this.h, i, j)) -} - -func (this *QMetaContainer) HasConstIterator() bool { - return (bool)(C.QMetaContainer_HasConstIterator(this.h)) -} - -func (this *QMetaContainer) ConstBegin(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_ConstBegin(this.h, container)) -} - -func (this *QMetaContainer) ConstEnd(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_ConstEnd(this.h, container)) -} - -func (this *QMetaContainer) DestroyConstIterator(iterator unsafe.Pointer) { - C.QMetaContainer_DestroyConstIterator(this.h, iterator) -} - -func (this *QMetaContainer) CompareConstIterator(i unsafe.Pointer, j unsafe.Pointer) bool { - return (bool)(C.QMetaContainer_CompareConstIterator(this.h, i, j)) -} - -func (this *QMetaContainer) CopyConstIterator(target unsafe.Pointer, source unsafe.Pointer) { - C.QMetaContainer_CopyConstIterator(this.h, target, source) -} - -func (this *QMetaContainer) AdvanceConstIterator(iterator unsafe.Pointer, step int64) { - C.QMetaContainer_AdvanceConstIterator(this.h, iterator, (C.ptrdiff_t)(step)) -} - -func (this *QMetaContainer) DiffConstIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { - return (int64)(C.QMetaContainer_DiffConstIterator(this.h, i, j)) -} - -// Delete this object from C++ memory. -func (this *QMetaContainer) Delete() { - C.QMetaContainer_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QMetaContainer) GoGC() { - runtime.SetFinalizer(this, func(this *QMetaContainer) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QMetaSequence struct { - h *C.QMetaSequence - *QMetaContainer -} - -func (this *QMetaSequence) cPointer() *C.QMetaSequence { - if this == nil { - return nil - } - return this.h -} - -func (this *QMetaSequence) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQMetaSequence(h *C.QMetaSequence) *QMetaSequence { - if h == nil { - return nil - } - return &QMetaSequence{h: h, QMetaContainer: UnsafeNewQMetaContainer(unsafe.Pointer(h))} -} - -func UnsafeNewQMetaSequence(h unsafe.Pointer) *QMetaSequence { - return newQMetaSequence((*C.QMetaSequence)(h)) -} - -// NewQMetaSequence constructs a new QMetaSequence object. -func NewQMetaSequence() *QMetaSequence { - ret := C.QMetaSequence_new() - return newQMetaSequence(ret) -} - -// NewQMetaSequence2 constructs a new QMetaSequence object. -func NewQMetaSequence2(d *QtMetaContainerPrivate__QMetaSequenceInterface) *QMetaSequence { - ret := C.QMetaSequence_new2(d.cPointer()) - return newQMetaSequence(ret) -} - -func (this *QMetaSequence) ValueMetaType() *QMetaType { - _ret := C.QMetaSequence_ValueMetaType(this.h) - _goptr := newQMetaType(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QMetaSequence) IsSortable() bool { - return (bool)(C.QMetaSequence_IsSortable(this.h)) -} - -func (this *QMetaSequence) CanAddValueAtBegin() bool { - return (bool)(C.QMetaSequence_CanAddValueAtBegin(this.h)) -} - -func (this *QMetaSequence) AddValueAtBegin(container unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_AddValueAtBegin(this.h, container, value) -} - -func (this *QMetaSequence) CanAddValueAtEnd() bool { - return (bool)(C.QMetaSequence_CanAddValueAtEnd(this.h)) -} - -func (this *QMetaSequence) AddValueAtEnd(container unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_AddValueAtEnd(this.h, container, value) -} - -func (this *QMetaSequence) CanRemoveValueAtBegin() bool { - return (bool)(C.QMetaSequence_CanRemoveValueAtBegin(this.h)) -} - -func (this *QMetaSequence) RemoveValueAtBegin(container unsafe.Pointer) { - C.QMetaSequence_RemoveValueAtBegin(this.h, container) -} - -func (this *QMetaSequence) CanRemoveValueAtEnd() bool { - return (bool)(C.QMetaSequence_CanRemoveValueAtEnd(this.h)) -} - -func (this *QMetaSequence) RemoveValueAtEnd(container unsafe.Pointer) { - C.QMetaSequence_RemoveValueAtEnd(this.h, container) -} - -func (this *QMetaSequence) CanGetValueAtIndex() bool { - return (bool)(C.QMetaSequence_CanGetValueAtIndex(this.h)) -} - -func (this *QMetaSequence) ValueAtIndex(container unsafe.Pointer, index int64, result unsafe.Pointer) { - C.QMetaSequence_ValueAtIndex(this.h, container, (C.ptrdiff_t)(index), result) -} - -func (this *QMetaSequence) CanSetValueAtIndex() bool { - return (bool)(C.QMetaSequence_CanSetValueAtIndex(this.h)) -} - -func (this *QMetaSequence) SetValueAtIndex(container unsafe.Pointer, index int64, value unsafe.Pointer) { - C.QMetaSequence_SetValueAtIndex(this.h, container, (C.ptrdiff_t)(index), value) -} - -func (this *QMetaSequence) CanAddValue() bool { - return (bool)(C.QMetaSequence_CanAddValue(this.h)) -} - -func (this *QMetaSequence) AddValue(container unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_AddValue(this.h, container, value) -} - -func (this *QMetaSequence) CanRemoveValue() bool { - return (bool)(C.QMetaSequence_CanRemoveValue(this.h)) -} -func (this *QMetaSequence) RemoveValue(container unsafe.Pointer) { - C.QMetaSequence_RemoveValue(this.h, container) -} + type QtMetaContainerPrivate__QMetaContainerInterface__Position byte + const ( +QtMetaContainerPrivate__QMetaContainerInterface__AtBegin QtMetaContainerPrivate__QMetaContainerInterface__Position = 0 +QtMetaContainerPrivate__QMetaContainerInterface__AtEnd QtMetaContainerPrivate__QMetaContainerInterface__Position = 1 +QtMetaContainerPrivate__QMetaContainerInterface__Unspecified QtMetaContainerPrivate__QMetaContainerInterface__Position = 2 -func (this *QMetaSequence) CanGetValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanGetValueAtIterator(this.h)) -} - -func (this *QMetaSequence) ValueAtIterator(iterator unsafe.Pointer, result unsafe.Pointer) { - C.QMetaSequence_ValueAtIterator(this.h, iterator, result) -} - -func (this *QMetaSequence) CanSetValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanSetValueAtIterator(this.h)) -} - -func (this *QMetaSequence) SetValueAtIterator(iterator unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_SetValueAtIterator(this.h, iterator, value) -} - -func (this *QMetaSequence) CanInsertValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanInsertValueAtIterator(this.h)) -} - -func (this *QMetaSequence) InsertValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_InsertValueAtIterator(this.h, container, iterator, value) -} - -func (this *QMetaSequence) CanEraseValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanEraseValueAtIterator(this.h)) -} - -func (this *QMetaSequence) EraseValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer) { - C.QMetaSequence_EraseValueAtIterator(this.h, container, iterator) -} - -func (this *QMetaSequence) CanEraseRangeAtIterator() bool { - return (bool)(C.QMetaSequence_CanEraseRangeAtIterator(this.h)) -} - -func (this *QMetaSequence) EraseRangeAtIterator(container unsafe.Pointer, iterator1 unsafe.Pointer, iterator2 unsafe.Pointer) { - C.QMetaSequence_EraseRangeAtIterator(this.h, container, iterator1, iterator2) -} - -func (this *QMetaSequence) CanGetValueAtConstIterator() bool { - return (bool)(C.QMetaSequence_CanGetValueAtConstIterator(this.h)) -} - -func (this *QMetaSequence) ValueAtConstIterator(iterator unsafe.Pointer, result unsafe.Pointer) { - C.QMetaSequence_ValueAtConstIterator(this.h, iterator, result) -} - -// Delete this object from C++ memory. -func (this *QMetaSequence) Delete() { - C.QMetaSequence_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QMetaSequence) GoGC() { - runtime.SetFinalizer(this, func(this *QMetaSequence) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QMetaAssociation struct { - h *C.QMetaAssociation - *QMetaContainer -} - -func (this *QMetaAssociation) cPointer() *C.QMetaAssociation { - if this == nil { - return nil - } - return this.h -} - -func (this *QMetaAssociation) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQMetaAssociation(h *C.QMetaAssociation) *QMetaAssociation { - if h == nil { - return nil - } - return &QMetaAssociation{h: h, QMetaContainer: UnsafeNewQMetaContainer(unsafe.Pointer(h))} -} - -func UnsafeNewQMetaAssociation(h unsafe.Pointer) *QMetaAssociation { - return newQMetaAssociation((*C.QMetaAssociation)(h)) -} - -// NewQMetaAssociation constructs a new QMetaAssociation object. -func NewQMetaAssociation() *QMetaAssociation { - ret := C.QMetaAssociation_new() - return newQMetaAssociation(ret) -} - -// NewQMetaAssociation2 constructs a new QMetaAssociation object. -func NewQMetaAssociation2(d *QtMetaContainerPrivate__QMetaAssociationInterface) *QMetaAssociation { - ret := C.QMetaAssociation_new2(d.cPointer()) - return newQMetaAssociation(ret) -} - -func (this *QMetaAssociation) KeyMetaType() *QMetaType { - _ret := C.QMetaAssociation_KeyMetaType(this.h) - _goptr := newQMetaType(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QMetaAssociation) MappedMetaType() *QMetaType { - _ret := C.QMetaAssociation_MappedMetaType(this.h) - _goptr := newQMetaType(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QMetaAssociation) CanInsertKey() bool { - return (bool)(C.QMetaAssociation_CanInsertKey(this.h)) -} - -func (this *QMetaAssociation) InsertKey(container unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_InsertKey(this.h, container, key) -} - -func (this *QMetaAssociation) CanRemoveKey() bool { - return (bool)(C.QMetaAssociation_CanRemoveKey(this.h)) -} - -func (this *QMetaAssociation) RemoveKey(container unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_RemoveKey(this.h, container, key) -} - -func (this *QMetaAssociation) CanContainsKey() bool { - return (bool)(C.QMetaAssociation_CanContainsKey(this.h)) -} - -func (this *QMetaAssociation) ContainsKey(container unsafe.Pointer, key unsafe.Pointer) bool { - return (bool)(C.QMetaAssociation_ContainsKey(this.h, container, key)) -} - -func (this *QMetaAssociation) CanGetMappedAtKey() bool { - return (bool)(C.QMetaAssociation_CanGetMappedAtKey(this.h)) -} - -func (this *QMetaAssociation) MappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_MappedAtKey(this.h, container, key, mapped) -} - -func (this *QMetaAssociation) CanSetMappedAtKey() bool { - return (bool)(C.QMetaAssociation_CanSetMappedAtKey(this.h)) -} - -func (this *QMetaAssociation) SetMappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_SetMappedAtKey(this.h, container, key, mapped) -} - -func (this *QMetaAssociation) CanGetKeyAtIterator() bool { - return (bool)(C.QMetaAssociation_CanGetKeyAtIterator(this.h)) -} - -func (this *QMetaAssociation) KeyAtIterator(iterator unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_KeyAtIterator(this.h, iterator, key) -} - -func (this *QMetaAssociation) CanGetKeyAtConstIterator() bool { - return (bool)(C.QMetaAssociation_CanGetKeyAtConstIterator(this.h)) -} - -func (this *QMetaAssociation) KeyAtConstIterator(iterator unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_KeyAtConstIterator(this.h, iterator, key) -} - -func (this *QMetaAssociation) CanGetMappedAtIterator() bool { - return (bool)(C.QMetaAssociation_CanGetMappedAtIterator(this.h)) -} - -func (this *QMetaAssociation) MappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_MappedAtIterator(this.h, iterator, mapped) -} - -func (this *QMetaAssociation) CanGetMappedAtConstIterator() bool { - return (bool)(C.QMetaAssociation_CanGetMappedAtConstIterator(this.h)) -} - -func (this *QMetaAssociation) MappedAtConstIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_MappedAtConstIterator(this.h, iterator, mapped) -} - -func (this *QMetaAssociation) CanSetMappedAtIterator() bool { - return (bool)(C.QMetaAssociation_CanSetMappedAtIterator(this.h)) -} - -func (this *QMetaAssociation) SetMappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_SetMappedAtIterator(this.h, iterator, mapped) -} - -func (this *QMetaAssociation) CanCreateIteratorAtKey() bool { - return (bool)(C.QMetaAssociation_CanCreateIteratorAtKey(this.h)) -} - -func (this *QMetaAssociation) CreateIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaAssociation_CreateIteratorAtKey(this.h, container, key)) -} - -func (this *QMetaAssociation) CanCreateConstIteratorAtKey() bool { - return (bool)(C.QMetaAssociation_CanCreateConstIteratorAtKey(this.h)) -} - -func (this *QMetaAssociation) CreateConstIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaAssociation_CreateConstIteratorAtKey(this.h, container, key)) -} +) -// Delete this object from C++ memory. -func (this *QMetaAssociation) Delete() { - C.QMetaAssociation_Delete(this.h) -} -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QMetaAssociation) GoGC() { - runtime.SetFinalizer(this, func(this *QMetaAssociation) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + type QtMetaContainerPrivate__QMetaContainerInterface struct { + h *C.QtMetaContainerPrivate__QMetaContainerInterface + isSubclass bool + + } + + func (this *QtMetaContainerPrivate__QMetaContainerInterface) cPointer() *C.QtMetaContainerPrivate__QMetaContainerInterface { + if this == nil { + return nil + } + return this.h + } + + func (this *QtMetaContainerPrivate__QMetaContainerInterface) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQtMetaContainerPrivate__QMetaContainerInterface constructs the type using only CGO pointers. + func newQtMetaContainerPrivate__QMetaContainerInterface(h *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaContainerInterface { + if h == nil { + return nil + } + return &QtMetaContainerPrivate__QMetaContainerInterface{h: h} + } + + // UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface constructs the type using only unsafe pointers. + func UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h unsafe.Pointer) *QtMetaContainerPrivate__QMetaContainerInterface { + if h == nil { + return nil + } + + return &QtMetaContainerPrivate__QMetaContainerInterface{h: (*C.QtMetaContainerPrivate__QMetaContainerInterface)(h)} + } + + + // NewQtMetaContainerPrivate__QMetaContainerInterface constructs a new QtMetaContainerPrivate::QMetaContainerInterface object. + func NewQtMetaContainerPrivate__QMetaContainerInterface() *QtMetaContainerPrivate__QMetaContainerInterface { + var outptr_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate__QMetaContainerInterface = nil + + C.QtMetaContainerPrivate__QMetaContainerInterface_new(&outptr_QtMetaContainerPrivate__QMetaContainerInterface) + ret := newQtMetaContainerPrivate__QMetaContainerInterface(outptr_QtMetaContainerPrivate__QMetaContainerInterface) + ret.isSubclass = true + return ret + } + + + // Delete this object from C++ memory. + func (this *QtMetaContainerPrivate__QMetaContainerInterface) Delete() { + C.QtMetaContainerPrivate__QMetaContainerInterface_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QtMetaContainerPrivate__QMetaContainerInterface) GoGC() { + runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaContainerInterface) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + + type QtMetaContainerPrivate__QMetaSequenceInterface struct { + h *C.QtMetaContainerPrivate__QMetaSequenceInterface + isSubclass bool + *QtMetaContainerPrivate__QMetaContainerInterface + + } + + func (this *QtMetaContainerPrivate__QMetaSequenceInterface) cPointer() *C.QtMetaContainerPrivate__QMetaSequenceInterface { + if this == nil { + return nil + } + return this.h + } + + func (this *QtMetaContainerPrivate__QMetaSequenceInterface) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQtMetaContainerPrivate__QMetaSequenceInterface constructs the type using only CGO pointers. + func newQtMetaContainerPrivate__QMetaSequenceInterface(h *C.QtMetaContainerPrivate__QMetaSequenceInterface, h_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaSequenceInterface { + if h == nil { + return nil + } + return &QtMetaContainerPrivate__QMetaSequenceInterface{h: h, +QtMetaContainerPrivate__QMetaContainerInterface: newQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} + } + + // UnsafeNewQtMetaContainerPrivate__QMetaSequenceInterface constructs the type using only unsafe pointers. + func UnsafeNewQtMetaContainerPrivate__QMetaSequenceInterface(h unsafe.Pointer, h_QtMetaContainerPrivate__QMetaContainerInterface unsafe.Pointer) *QtMetaContainerPrivate__QMetaSequenceInterface { + if h == nil { + return nil + } + + return &QtMetaContainerPrivate__QMetaSequenceInterface{h: (*C.QtMetaContainerPrivate__QMetaSequenceInterface)(h), +QtMetaContainerPrivate__QMetaContainerInterface: UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} + } + + + // NewQtMetaContainerPrivate__QMetaSequenceInterface constructs a new QtMetaContainerPrivate::QMetaSequenceInterface object. + func NewQtMetaContainerPrivate__QMetaSequenceInterface() *QtMetaContainerPrivate__QMetaSequenceInterface { + var outptr_QtMetaContainerPrivate__QMetaSequenceInterface *C.QtMetaContainerPrivate__QMetaSequenceInterface = nil +var outptr_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate::QMetaContainerInterface = nil + + C.QtMetaContainerPrivate__QMetaSequenceInterface_new(&outptr_QtMetaContainerPrivate__QMetaSequenceInterface, &outptr_QtMetaContainerPrivate__QMetaContainerInterface) + ret := newQtMetaContainerPrivate__QMetaSequenceInterface(outptr_QtMetaContainerPrivate__QMetaSequenceInterface, outptr_QtMetaContainerPrivate__QMetaContainerInterface) + ret.isSubclass = true + return ret + } + + + // Delete this object from C++ memory. + func (this *QtMetaContainerPrivate__QMetaSequenceInterface) Delete() { + C.QtMetaContainerPrivate__QMetaSequenceInterface_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QtMetaContainerPrivate__QMetaSequenceInterface) GoGC() { + runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaSequenceInterface) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + + type QtMetaContainerPrivate__QMetaAssociationInterface struct { + h *C.QtMetaContainerPrivate__QMetaAssociationInterface + isSubclass bool + *QtMetaContainerPrivate__QMetaContainerInterface + + } + + func (this *QtMetaContainerPrivate__QMetaAssociationInterface) cPointer() *C.QtMetaContainerPrivate__QMetaAssociationInterface { + if this == nil { + return nil + } + return this.h + } + + func (this *QtMetaContainerPrivate__QMetaAssociationInterface) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQtMetaContainerPrivate__QMetaAssociationInterface constructs the type using only CGO pointers. + func newQtMetaContainerPrivate__QMetaAssociationInterface(h *C.QtMetaContainerPrivate__QMetaAssociationInterface, h_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaAssociationInterface { + if h == nil { + return nil + } + return &QtMetaContainerPrivate__QMetaAssociationInterface{h: h, +QtMetaContainerPrivate__QMetaContainerInterface: newQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} + } + + // UnsafeNewQtMetaContainerPrivate__QMetaAssociationInterface constructs the type using only unsafe pointers. + func UnsafeNewQtMetaContainerPrivate__QMetaAssociationInterface(h unsafe.Pointer, h_QtMetaContainerPrivate__QMetaContainerInterface unsafe.Pointer) *QtMetaContainerPrivate__QMetaAssociationInterface { + if h == nil { + return nil + } + + return &QtMetaContainerPrivate__QMetaAssociationInterface{h: (*C.QtMetaContainerPrivate__QMetaAssociationInterface)(h), +QtMetaContainerPrivate__QMetaContainerInterface: UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} + } + + + // NewQtMetaContainerPrivate__QMetaAssociationInterface constructs a new QtMetaContainerPrivate::QMetaAssociationInterface object. + func NewQtMetaContainerPrivate__QMetaAssociationInterface() *QtMetaContainerPrivate__QMetaAssociationInterface { + var outptr_QtMetaContainerPrivate__QMetaAssociationInterface *C.QtMetaContainerPrivate__QMetaAssociationInterface = nil +var outptr_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate::QMetaContainerInterface = nil + + C.QtMetaContainerPrivate__QMetaAssociationInterface_new(&outptr_QtMetaContainerPrivate__QMetaAssociationInterface, &outptr_QtMetaContainerPrivate__QMetaContainerInterface) + ret := newQtMetaContainerPrivate__QMetaAssociationInterface(outptr_QtMetaContainerPrivate__QMetaAssociationInterface, outptr_QtMetaContainerPrivate__QMetaContainerInterface) + ret.isSubclass = true + return ret + } + + + // Delete this object from C++ memory. + func (this *QtMetaContainerPrivate__QMetaAssociationInterface) Delete() { + C.QtMetaContainerPrivate__QMetaAssociationInterface_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QtMetaContainerPrivate__QMetaAssociationInterface) GoGC() { + runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaAssociationInterface) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + + type QMetaContainer struct { + h *C.QMetaContainer + isSubclass bool + + } + + func (this *QMetaContainer) cPointer() *C.QMetaContainer { + if this == nil { + return nil + } + return this.h + } + + func (this *QMetaContainer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQMetaContainer constructs the type using only CGO pointers. + func newQMetaContainer(h *C.QMetaContainer) *QMetaContainer { + if h == nil { + return nil + } + return &QMetaContainer{h: h} + } + + // UnsafeNewQMetaContainer constructs the type using only unsafe pointers. + func UnsafeNewQMetaContainer(h unsafe.Pointer) *QMetaContainer { + if h == nil { + return nil + } + + return &QMetaContainer{h: (*C.QMetaContainer)(h)} + } + + + // NewQMetaContainer constructs a new QMetaContainer object. + func NewQMetaContainer() *QMetaContainer { + var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaContainer_new(&outptr_QMetaContainer) + ret := newQMetaContainer(outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + // NewQMetaContainer2 constructs a new QMetaContainer object. + func NewQMetaContainer2(d *QtMetaContainerPrivate__QMetaContainerInterface) *QMetaContainer { + var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaContainer_new2(d.cPointer(), &outptr_QMetaContainer) + ret := newQMetaContainer(outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + // NewQMetaContainer3 constructs a new QMetaContainer object. + func NewQMetaContainer3(param1 *QMetaContainer) *QMetaContainer { + var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaContainer_new3(param1.cPointer(), &outptr_QMetaContainer) + ret := newQMetaContainer(outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + func (this *QMetaContainer) HasInputIterator() bool { + return (bool)(C.QMetaContainer_HasInputIterator(this.h)) +} + + func (this *QMetaContainer) HasForwardIterator() bool { + return (bool)(C.QMetaContainer_HasForwardIterator(this.h)) +} + + func (this *QMetaContainer) HasBidirectionalIterator() bool { + return (bool)(C.QMetaContainer_HasBidirectionalIterator(this.h)) +} + + func (this *QMetaContainer) HasRandomAccessIterator() bool { + return (bool)(C.QMetaContainer_HasRandomAccessIterator(this.h)) +} + + func (this *QMetaContainer) HasSize() bool { + return (bool)(C.QMetaContainer_HasSize(this.h)) +} + + func (this *QMetaContainer) Size(container unsafe.Pointer) int64 { + return (int64)(C.QMetaContainer_Size(this.h, container)) +} + + func (this *QMetaContainer) CanClear() bool { + return (bool)(C.QMetaContainer_CanClear(this.h)) +} + + func (this *QMetaContainer) Clear(container unsafe.Pointer) { + C.QMetaContainer_Clear(this.h, container) +} + + func (this *QMetaContainer) HasIterator() bool { + return (bool)(C.QMetaContainer_HasIterator(this.h)) +} + + func (this *QMetaContainer) Begin(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_Begin(this.h, container)) +} + + func (this *QMetaContainer) End(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_End(this.h, container)) +} + + func (this *QMetaContainer) DestroyIterator(iterator unsafe.Pointer) { + C.QMetaContainer_DestroyIterator(this.h, iterator) +} + + func (this *QMetaContainer) CompareIterator(i unsafe.Pointer, j unsafe.Pointer) bool { + return (bool)(C.QMetaContainer_CompareIterator(this.h, i, j)) +} + + func (this *QMetaContainer) CopyIterator(target unsafe.Pointer, source unsafe.Pointer) { + C.QMetaContainer_CopyIterator(this.h, target, source) +} + + func (this *QMetaContainer) AdvanceIterator(iterator unsafe.Pointer, step int64) { + C.QMetaContainer_AdvanceIterator(this.h, iterator, (C.ptrdiff_t)(step)) +} + + func (this *QMetaContainer) DiffIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { + return (int64)(C.QMetaContainer_DiffIterator(this.h, i, j)) +} + + func (this *QMetaContainer) HasConstIterator() bool { + return (bool)(C.QMetaContainer_HasConstIterator(this.h)) +} + + func (this *QMetaContainer) ConstBegin(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_ConstBegin(this.h, container)) +} + + func (this *QMetaContainer) ConstEnd(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_ConstEnd(this.h, container)) +} + + func (this *QMetaContainer) DestroyConstIterator(iterator unsafe.Pointer) { + C.QMetaContainer_DestroyConstIterator(this.h, iterator) +} + + func (this *QMetaContainer) CompareConstIterator(i unsafe.Pointer, j unsafe.Pointer) bool { + return (bool)(C.QMetaContainer_CompareConstIterator(this.h, i, j)) +} + + func (this *QMetaContainer) CopyConstIterator(target unsafe.Pointer, source unsafe.Pointer) { + C.QMetaContainer_CopyConstIterator(this.h, target, source) +} + + func (this *QMetaContainer) AdvanceConstIterator(iterator unsafe.Pointer, step int64) { + C.QMetaContainer_AdvanceConstIterator(this.h, iterator, (C.ptrdiff_t)(step)) +} + + func (this *QMetaContainer) DiffConstIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { + return (int64)(C.QMetaContainer_DiffConstIterator(this.h, i, j)) +} + + // Delete this object from C++ memory. + func (this *QMetaContainer) Delete() { + C.QMetaContainer_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QMetaContainer) GoGC() { + runtime.SetFinalizer(this, func(this *QMetaContainer) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + + type QMetaSequence struct { + h *C.QMetaSequence + isSubclass bool + *QMetaContainer + + } + + func (this *QMetaSequence) cPointer() *C.QMetaSequence { + if this == nil { + return nil + } + return this.h + } + + func (this *QMetaSequence) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQMetaSequence constructs the type using only CGO pointers. + func newQMetaSequence(h *C.QMetaSequence, h_QMetaContainer *C.QMetaContainer) *QMetaSequence { + if h == nil { + return nil + } + return &QMetaSequence{h: h, +QMetaContainer: newQMetaContainer(h_QMetaContainer)} + } + + // UnsafeNewQMetaSequence constructs the type using only unsafe pointers. + func UnsafeNewQMetaSequence(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaSequence { + if h == nil { + return nil + } + + return &QMetaSequence{h: (*C.QMetaSequence)(h), +QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} + } + + + // NewQMetaSequence constructs a new QMetaSequence object. + func NewQMetaSequence() *QMetaSequence { + var outptr_QMetaSequence *C.QMetaSequence = nil +var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaSequence_new(&outptr_QMetaSequence, &outptr_QMetaContainer) + ret := newQMetaSequence(outptr_QMetaSequence, outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + // NewQMetaSequence2 constructs a new QMetaSequence object. + func NewQMetaSequence2(d *QtMetaContainerPrivate__QMetaSequenceInterface) *QMetaSequence { + var outptr_QMetaSequence *C.QMetaSequence = nil +var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaSequence_new2(d.cPointer(), &outptr_QMetaSequence, &outptr_QMetaContainer) + ret := newQMetaSequence(outptr_QMetaSequence, outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + func (this *QMetaSequence) ValueMetaType() *QMetaType { + _ret := C.QMetaSequence_ValueMetaType(this.h) +_goptr := newQMetaType(_ret) +_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer +return _goptr +} + + func (this *QMetaSequence) IsSortable() bool { + return (bool)(C.QMetaSequence_IsSortable(this.h)) +} + + func (this *QMetaSequence) CanAddValueAtBegin() bool { + return (bool)(C.QMetaSequence_CanAddValueAtBegin(this.h)) +} + + func (this *QMetaSequence) AddValueAtBegin(container unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_AddValueAtBegin(this.h, container, value) +} + + func (this *QMetaSequence) CanAddValueAtEnd() bool { + return (bool)(C.QMetaSequence_CanAddValueAtEnd(this.h)) +} + + func (this *QMetaSequence) AddValueAtEnd(container unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_AddValueAtEnd(this.h, container, value) +} + + func (this *QMetaSequence) CanRemoveValueAtBegin() bool { + return (bool)(C.QMetaSequence_CanRemoveValueAtBegin(this.h)) +} + + func (this *QMetaSequence) RemoveValueAtBegin(container unsafe.Pointer) { + C.QMetaSequence_RemoveValueAtBegin(this.h, container) +} + + func (this *QMetaSequence) CanRemoveValueAtEnd() bool { + return (bool)(C.QMetaSequence_CanRemoveValueAtEnd(this.h)) +} + + func (this *QMetaSequence) RemoveValueAtEnd(container unsafe.Pointer) { + C.QMetaSequence_RemoveValueAtEnd(this.h, container) +} + + func (this *QMetaSequence) CanGetValueAtIndex() bool { + return (bool)(C.QMetaSequence_CanGetValueAtIndex(this.h)) +} + + func (this *QMetaSequence) ValueAtIndex(container unsafe.Pointer, index int64, result unsafe.Pointer) { + C.QMetaSequence_ValueAtIndex(this.h, container, (C.ptrdiff_t)(index), result) +} + + func (this *QMetaSequence) CanSetValueAtIndex() bool { + return (bool)(C.QMetaSequence_CanSetValueAtIndex(this.h)) +} + + func (this *QMetaSequence) SetValueAtIndex(container unsafe.Pointer, index int64, value unsafe.Pointer) { + C.QMetaSequence_SetValueAtIndex(this.h, container, (C.ptrdiff_t)(index), value) +} + + func (this *QMetaSequence) CanAddValue() bool { + return (bool)(C.QMetaSequence_CanAddValue(this.h)) +} + + func (this *QMetaSequence) AddValue(container unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_AddValue(this.h, container, value) +} + + func (this *QMetaSequence) CanRemoveValue() bool { + return (bool)(C.QMetaSequence_CanRemoveValue(this.h)) +} + + func (this *QMetaSequence) RemoveValue(container unsafe.Pointer) { + C.QMetaSequence_RemoveValue(this.h, container) +} + + func (this *QMetaSequence) CanGetValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanGetValueAtIterator(this.h)) +} + + func (this *QMetaSequence) ValueAtIterator(iterator unsafe.Pointer, result unsafe.Pointer) { + C.QMetaSequence_ValueAtIterator(this.h, iterator, result) +} + + func (this *QMetaSequence) CanSetValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanSetValueAtIterator(this.h)) +} + + func (this *QMetaSequence) SetValueAtIterator(iterator unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_SetValueAtIterator(this.h, iterator, value) +} + + func (this *QMetaSequence) CanInsertValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanInsertValueAtIterator(this.h)) +} + + func (this *QMetaSequence) InsertValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_InsertValueAtIterator(this.h, container, iterator, value) +} + + func (this *QMetaSequence) CanEraseValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanEraseValueAtIterator(this.h)) +} + + func (this *QMetaSequence) EraseValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer) { + C.QMetaSequence_EraseValueAtIterator(this.h, container, iterator) +} + + func (this *QMetaSequence) CanEraseRangeAtIterator() bool { + return (bool)(C.QMetaSequence_CanEraseRangeAtIterator(this.h)) +} + + func (this *QMetaSequence) EraseRangeAtIterator(container unsafe.Pointer, iterator1 unsafe.Pointer, iterator2 unsafe.Pointer) { + C.QMetaSequence_EraseRangeAtIterator(this.h, container, iterator1, iterator2) +} + + func (this *QMetaSequence) CanGetValueAtConstIterator() bool { + return (bool)(C.QMetaSequence_CanGetValueAtConstIterator(this.h)) +} + + func (this *QMetaSequence) ValueAtConstIterator(iterator unsafe.Pointer, result unsafe.Pointer) { + C.QMetaSequence_ValueAtConstIterator(this.h, iterator, result) +} + + // Delete this object from C++ memory. + func (this *QMetaSequence) Delete() { + C.QMetaSequence_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QMetaSequence) GoGC() { + runtime.SetFinalizer(this, func(this *QMetaSequence) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + + type QMetaAssociation struct { + h *C.QMetaAssociation + isSubclass bool + *QMetaContainer + + } + + func (this *QMetaAssociation) cPointer() *C.QMetaAssociation { + if this == nil { + return nil + } + return this.h + } + + func (this *QMetaAssociation) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQMetaAssociation constructs the type using only CGO pointers. + func newQMetaAssociation(h *C.QMetaAssociation, h_QMetaContainer *C.QMetaContainer) *QMetaAssociation { + if h == nil { + return nil + } + return &QMetaAssociation{h: h, +QMetaContainer: newQMetaContainer(h_QMetaContainer)} + } + + // UnsafeNewQMetaAssociation constructs the type using only unsafe pointers. + func UnsafeNewQMetaAssociation(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaAssociation { + if h == nil { + return nil + } + + return &QMetaAssociation{h: (*C.QMetaAssociation)(h), +QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} + } + + + // NewQMetaAssociation constructs a new QMetaAssociation object. + func NewQMetaAssociation() *QMetaAssociation { + var outptr_QMetaAssociation *C.QMetaAssociation = nil +var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaAssociation_new(&outptr_QMetaAssociation, &outptr_QMetaContainer) + ret := newQMetaAssociation(outptr_QMetaAssociation, outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + // NewQMetaAssociation2 constructs a new QMetaAssociation object. + func NewQMetaAssociation2(d *QtMetaContainerPrivate__QMetaAssociationInterface) *QMetaAssociation { + var outptr_QMetaAssociation *C.QMetaAssociation = nil +var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaAssociation_new2(d.cPointer(), &outptr_QMetaAssociation, &outptr_QMetaContainer) + ret := newQMetaAssociation(outptr_QMetaAssociation, outptr_QMetaContainer) + ret.isSubclass = true + return ret + } + + + func (this *QMetaAssociation) KeyMetaType() *QMetaType { + _ret := C.QMetaAssociation_KeyMetaType(this.h) +_goptr := newQMetaType(_ret) +_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer +return _goptr +} + + func (this *QMetaAssociation) MappedMetaType() *QMetaType { + _ret := C.QMetaAssociation_MappedMetaType(this.h) +_goptr := newQMetaType(_ret) +_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer +return _goptr +} + + func (this *QMetaAssociation) CanInsertKey() bool { + return (bool)(C.QMetaAssociation_CanInsertKey(this.h)) +} + + func (this *QMetaAssociation) InsertKey(container unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_InsertKey(this.h, container, key) +} + + func (this *QMetaAssociation) CanRemoveKey() bool { + return (bool)(C.QMetaAssociation_CanRemoveKey(this.h)) +} + + func (this *QMetaAssociation) RemoveKey(container unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_RemoveKey(this.h, container, key) +} + + func (this *QMetaAssociation) CanContainsKey() bool { + return (bool)(C.QMetaAssociation_CanContainsKey(this.h)) +} + + func (this *QMetaAssociation) ContainsKey(container unsafe.Pointer, key unsafe.Pointer) bool { + return (bool)(C.QMetaAssociation_ContainsKey(this.h, container, key)) +} + + func (this *QMetaAssociation) CanGetMappedAtKey() bool { + return (bool)(C.QMetaAssociation_CanGetMappedAtKey(this.h)) +} + + func (this *QMetaAssociation) MappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_MappedAtKey(this.h, container, key, mapped) +} + + func (this *QMetaAssociation) CanSetMappedAtKey() bool { + return (bool)(C.QMetaAssociation_CanSetMappedAtKey(this.h)) +} + + func (this *QMetaAssociation) SetMappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_SetMappedAtKey(this.h, container, key, mapped) +} + + func (this *QMetaAssociation) CanGetKeyAtIterator() bool { + return (bool)(C.QMetaAssociation_CanGetKeyAtIterator(this.h)) +} + + func (this *QMetaAssociation) KeyAtIterator(iterator unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_KeyAtIterator(this.h, iterator, key) +} + + func (this *QMetaAssociation) CanGetKeyAtConstIterator() bool { + return (bool)(C.QMetaAssociation_CanGetKeyAtConstIterator(this.h)) +} + + func (this *QMetaAssociation) KeyAtConstIterator(iterator unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_KeyAtConstIterator(this.h, iterator, key) +} + + func (this *QMetaAssociation) CanGetMappedAtIterator() bool { + return (bool)(C.QMetaAssociation_CanGetMappedAtIterator(this.h)) +} + + func (this *QMetaAssociation) MappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_MappedAtIterator(this.h, iterator, mapped) +} + + func (this *QMetaAssociation) CanGetMappedAtConstIterator() bool { + return (bool)(C.QMetaAssociation_CanGetMappedAtConstIterator(this.h)) +} + + func (this *QMetaAssociation) MappedAtConstIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_MappedAtConstIterator(this.h, iterator, mapped) +} + + func (this *QMetaAssociation) CanSetMappedAtIterator() bool { + return (bool)(C.QMetaAssociation_CanSetMappedAtIterator(this.h)) +} + + func (this *QMetaAssociation) SetMappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_SetMappedAtIterator(this.h, iterator, mapped) +} + + func (this *QMetaAssociation) CanCreateIteratorAtKey() bool { + return (bool)(C.QMetaAssociation_CanCreateIteratorAtKey(this.h)) +} + + func (this *QMetaAssociation) CreateIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaAssociation_CreateIteratorAtKey(this.h, container, key)) +} + + func (this *QMetaAssociation) CanCreateConstIteratorAtKey() bool { + return (bool)(C.QMetaAssociation_CanCreateConstIteratorAtKey(this.h)) +} + + func (this *QMetaAssociation) CreateConstIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaAssociation_CreateConstIteratorAtKey(this.h, container, key)) +} + + // Delete this object from C++ memory. + func (this *QMetaAssociation) Delete() { + C.QMetaAssociation_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QMetaAssociation) GoGC() { + runtime.SetFinalizer(this, func(this *QMetaAssociation) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + \ No newline at end of file diff --git a/qt6/gen_qmetacontainer.h b/qt6/gen_qmetacontainer.h index 06a16ad6..c2703bc4 100644 --- a/qt6/gen_qmetacontainer.h +++ b/qt6/gen_qmetacontainer.h @@ -44,18 +44,18 @@ typedef struct QtMetaContainerPrivate__QMetaContainerInterface QtMetaContainerPr typedef struct QtMetaContainerPrivate__QMetaSequenceInterface QtMetaContainerPrivate__QMetaSequenceInterface; #endif -QtMetaContainerPrivate__QMetaContainerInterface* QtMetaContainerPrivate__QMetaContainerInterface_new(); -void QtMetaContainerPrivate__QMetaContainerInterface_Delete(QtMetaContainerPrivate__QMetaContainerInterface* self); +void QtMetaContainerPrivate__QMetaContainerInterface_new(QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface); +void QtMetaContainerPrivate__QMetaContainerInterface_Delete(QtMetaContainerPrivate__QMetaContainerInterface* self, bool isSubclass); -QtMetaContainerPrivate__QMetaSequenceInterface* QtMetaContainerPrivate__QMetaSequenceInterface_new(); -void QtMetaContainerPrivate__QMetaSequenceInterface_Delete(QtMetaContainerPrivate__QMetaSequenceInterface* self); +void QtMetaContainerPrivate__QMetaSequenceInterface_new(QtMetaContainerPrivate__QMetaSequenceInterface** outptr_QtMetaContainerPrivate__QMetaSequenceInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface); +void QtMetaContainerPrivate__QMetaSequenceInterface_Delete(QtMetaContainerPrivate__QMetaSequenceInterface* self, bool isSubclass); -QtMetaContainerPrivate__QMetaAssociationInterface* QtMetaContainerPrivate__QMetaAssociationInterface_new(); -void QtMetaContainerPrivate__QMetaAssociationInterface_Delete(QtMetaContainerPrivate__QMetaAssociationInterface* self); +void QtMetaContainerPrivate__QMetaAssociationInterface_new(QtMetaContainerPrivate__QMetaAssociationInterface** outptr_QtMetaContainerPrivate__QMetaAssociationInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface); +void QtMetaContainerPrivate__QMetaAssociationInterface_Delete(QtMetaContainerPrivate__QMetaAssociationInterface* self, bool isSubclass); -QMetaContainer* QMetaContainer_new(); -QMetaContainer* QMetaContainer_new2(QtMetaContainerPrivate__QMetaContainerInterface* d); -QMetaContainer* QMetaContainer_new3(QMetaContainer* param1); +void QMetaContainer_new(QMetaContainer** outptr_QMetaContainer); +void QMetaContainer_new2(QtMetaContainerPrivate__QMetaContainerInterface* d, QMetaContainer** outptr_QMetaContainer); +void QMetaContainer_new3(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer); bool QMetaContainer_HasInputIterator(const QMetaContainer* self); bool QMetaContainer_HasForwardIterator(const QMetaContainer* self); bool QMetaContainer_HasBidirectionalIterator(const QMetaContainer* self); @@ -80,10 +80,10 @@ bool QMetaContainer_CompareConstIterator(const QMetaContainer* self, const void* void QMetaContainer_CopyConstIterator(const QMetaContainer* self, void* target, const void* source); void QMetaContainer_AdvanceConstIterator(const QMetaContainer* self, void* iterator, ptrdiff_t step); ptrdiff_t QMetaContainer_DiffConstIterator(const QMetaContainer* self, const void* i, const void* j); -void QMetaContainer_Delete(QMetaContainer* self); +void QMetaContainer_Delete(QMetaContainer* self, bool isSubclass); -QMetaSequence* QMetaSequence_new(); -QMetaSequence* QMetaSequence_new2(QtMetaContainerPrivate__QMetaSequenceInterface* d); +void QMetaSequence_new(QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer); +void QMetaSequence_new2(QtMetaContainerPrivate__QMetaSequenceInterface* d, QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer); QMetaType* QMetaSequence_ValueMetaType(const QMetaSequence* self); bool QMetaSequence_IsSortable(const QMetaSequence* self); bool QMetaSequence_CanAddValueAtBegin(const QMetaSequence* self); @@ -114,10 +114,10 @@ bool QMetaSequence_CanEraseRangeAtIterator(const QMetaSequence* self); void QMetaSequence_EraseRangeAtIterator(const QMetaSequence* self, void* container, const void* iterator1, const void* iterator2); bool QMetaSequence_CanGetValueAtConstIterator(const QMetaSequence* self); void QMetaSequence_ValueAtConstIterator(const QMetaSequence* self, const void* iterator, void* result); -void QMetaSequence_Delete(QMetaSequence* self); +void QMetaSequence_Delete(QMetaSequence* self, bool isSubclass); -QMetaAssociation* QMetaAssociation_new(); -QMetaAssociation* QMetaAssociation_new2(QtMetaContainerPrivate__QMetaAssociationInterface* d); +void QMetaAssociation_new(QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer); +void QMetaAssociation_new2(QtMetaContainerPrivate__QMetaAssociationInterface* d, QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer); QMetaType* QMetaAssociation_KeyMetaType(const QMetaAssociation* self); QMetaType* QMetaAssociation_MappedMetaType(const QMetaAssociation* self); bool QMetaAssociation_CanInsertKey(const QMetaAssociation* self); @@ -144,7 +144,7 @@ bool QMetaAssociation_CanCreateIteratorAtKey(const QMetaAssociation* self); void* QMetaAssociation_CreateIteratorAtKey(const QMetaAssociation* self, void* container, const void* key); bool QMetaAssociation_CanCreateConstIteratorAtKey(const QMetaAssociation* self); void* QMetaAssociation_CreateConstIteratorAtKey(const QMetaAssociation* self, const void* container, const void* key); -void QMetaAssociation_Delete(QMetaAssociation* self); +void QMetaAssociation_Delete(QMetaAssociation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmetaobject.cpp b/qt6/gen_qmetaobject.cpp index a9fa5527..aa5937c3 100644 --- a/qt6/gen_qmetaobject.cpp +++ b/qt6/gen_qmetaobject.cpp @@ -15,12 +15,14 @@ #include "gen_qmetaobject.h" #include "_cgo_export.h" -QMetaMethod* QMetaMethod_new() { - return new QMetaMethod(); +void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod) { + QMetaMethod* ret = new QMetaMethod(); + *outptr_QMetaMethod = ret; } -QMetaMethod* QMetaMethod_new2(QMetaMethod* param1) { - return new QMetaMethod(*param1); +void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod) { + QMetaMethod* ret = new QMetaMethod(*param1); + *outptr_QMetaMethod = ret; } struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self) { @@ -420,16 +422,22 @@ bool QMetaMethod_InvokeOnGadget112(const QMetaMethod* self, void* gadget, QGener return self->invokeOnGadget(gadget, *val0, *val1, *val2, *val3, *val4, *val5, *val6, *val7, *val8, *val9); } -void QMetaMethod_Delete(QMetaMethod* self) { - delete self; +void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaEnum* QMetaEnum_new() { - return new QMetaEnum(); +void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum) { + QMetaEnum* ret = new QMetaEnum(); + *outptr_QMetaEnum = ret; } -QMetaEnum* QMetaEnum_new2(QMetaEnum* param1) { - return new QMetaEnum(*param1); +void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum) { + QMetaEnum* ret = new QMetaEnum(*param1); + *outptr_QMetaEnum = ret; } const char* QMetaEnum_Name(const QMetaEnum* self) { @@ -501,12 +509,17 @@ int QMetaEnum_KeysToValue2(const QMetaEnum* self, const char* keys, bool* ok) { return self->keysToValue(keys, ok); } -void QMetaEnum_Delete(QMetaEnum* self) { - delete self; +void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaProperty* QMetaProperty_new() { - return new QMetaProperty(); +void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty) { + QMetaProperty* ret = new QMetaProperty(); + *outptr_QMetaProperty = ret; } const char* QMetaProperty_Name(const QMetaProperty* self) { @@ -658,12 +671,17 @@ QMetaObject* QMetaProperty_EnclosingMetaObject(const QMetaProperty* self) { return (QMetaObject*) self->enclosingMetaObject(); } -void QMetaProperty_Delete(QMetaProperty* self) { - delete self; +void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaClassInfo* QMetaClassInfo_new() { - return new QMetaClassInfo(); +void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo) { + QMetaClassInfo* ret = new QMetaClassInfo(); + *outptr_QMetaClassInfo = ret; } const char* QMetaClassInfo_Name(const QMetaClassInfo* self) { @@ -678,7 +696,11 @@ QMetaObject* QMetaClassInfo_EnclosingMetaObject(const QMetaClassInfo* self) { return (QMetaObject*) self->enclosingMetaObject(); } -void QMetaClassInfo_Delete(QMetaClassInfo* self) { - delete self; +void QMetaClassInfo_Delete(QMetaClassInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmetaobject.go b/qt6/gen_qmetaobject.go index cb9cbdcf..6f82c712 100644 --- a/qt6/gen_qmetaobject.go +++ b/qt6/gen_qmetaobject.go @@ -39,7 +39,8 @@ const ( ) type QMetaMethod struct { - h *C.QMetaMethod + h *C.QMetaMethod + isSubclass bool } func (this *QMetaMethod) cPointer() *C.QMetaMethod { @@ -56,6 +57,7 @@ func (this *QMetaMethod) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaMethod constructs the type using only CGO pointers. func newQMetaMethod(h *C.QMetaMethod) *QMetaMethod { if h == nil { return nil @@ -63,20 +65,33 @@ func newQMetaMethod(h *C.QMetaMethod) *QMetaMethod { return &QMetaMethod{h: h} } +// UnsafeNewQMetaMethod constructs the type using only unsafe pointers. func UnsafeNewQMetaMethod(h unsafe.Pointer) *QMetaMethod { - return newQMetaMethod((*C.QMetaMethod)(h)) + if h == nil { + return nil + } + + return &QMetaMethod{h: (*C.QMetaMethod)(h)} } // NewQMetaMethod constructs a new QMetaMethod object. func NewQMetaMethod() *QMetaMethod { - ret := C.QMetaMethod_new() - return newQMetaMethod(ret) + var outptr_QMetaMethod *C.QMetaMethod = nil + + C.QMetaMethod_new(&outptr_QMetaMethod) + ret := newQMetaMethod(outptr_QMetaMethod) + ret.isSubclass = true + return ret } // NewQMetaMethod2 constructs a new QMetaMethod object. func NewQMetaMethod2(param1 *QMetaMethod) *QMetaMethod { - ret := C.QMetaMethod_new2(param1.cPointer()) - return newQMetaMethod(ret) + var outptr_QMetaMethod *C.QMetaMethod = nil + + C.QMetaMethod_new2(param1.cPointer(), &outptr_QMetaMethod) + ret := newQMetaMethod(outptr_QMetaMethod) + ret.isSubclass = true + return ret } func (this *QMetaMethod) MethodSignature() []byte { @@ -468,7 +483,7 @@ func (this *QMetaMethod) InvokeOnGadget112(gadget unsafe.Pointer, val0 QGenericA // Delete this object from C++ memory. func (this *QMetaMethod) Delete() { - C.QMetaMethod_Delete(this.h) + C.QMetaMethod_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -481,7 +496,8 @@ func (this *QMetaMethod) GoGC() { } type QMetaEnum struct { - h *C.QMetaEnum + h *C.QMetaEnum + isSubclass bool } func (this *QMetaEnum) cPointer() *C.QMetaEnum { @@ -498,6 +514,7 @@ func (this *QMetaEnum) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaEnum constructs the type using only CGO pointers. func newQMetaEnum(h *C.QMetaEnum) *QMetaEnum { if h == nil { return nil @@ -505,20 +522,33 @@ func newQMetaEnum(h *C.QMetaEnum) *QMetaEnum { return &QMetaEnum{h: h} } +// UnsafeNewQMetaEnum constructs the type using only unsafe pointers. func UnsafeNewQMetaEnum(h unsafe.Pointer) *QMetaEnum { - return newQMetaEnum((*C.QMetaEnum)(h)) + if h == nil { + return nil + } + + return &QMetaEnum{h: (*C.QMetaEnum)(h)} } // NewQMetaEnum constructs a new QMetaEnum object. func NewQMetaEnum() *QMetaEnum { - ret := C.QMetaEnum_new() - return newQMetaEnum(ret) + var outptr_QMetaEnum *C.QMetaEnum = nil + + C.QMetaEnum_new(&outptr_QMetaEnum) + ret := newQMetaEnum(outptr_QMetaEnum) + ret.isSubclass = true + return ret } // NewQMetaEnum2 constructs a new QMetaEnum object. func NewQMetaEnum2(param1 *QMetaEnum) *QMetaEnum { - ret := C.QMetaEnum_new2(param1.cPointer()) - return newQMetaEnum(ret) + var outptr_QMetaEnum *C.QMetaEnum = nil + + C.QMetaEnum_new2(param1.cPointer(), &outptr_QMetaEnum) + ret := newQMetaEnum(outptr_QMetaEnum) + ret.isSubclass = true + return ret } func (this *QMetaEnum) Name() string { @@ -603,7 +633,7 @@ func (this *QMetaEnum) KeysToValue2(keys string, ok *bool) int { // Delete this object from C++ memory. func (this *QMetaEnum) Delete() { - C.QMetaEnum_Delete(this.h) + C.QMetaEnum_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -616,7 +646,8 @@ func (this *QMetaEnum) GoGC() { } type QMetaProperty struct { - h *C.QMetaProperty + h *C.QMetaProperty + isSubclass bool } func (this *QMetaProperty) cPointer() *C.QMetaProperty { @@ -633,6 +664,7 @@ func (this *QMetaProperty) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaProperty constructs the type using only CGO pointers. func newQMetaProperty(h *C.QMetaProperty) *QMetaProperty { if h == nil { return nil @@ -640,14 +672,23 @@ func newQMetaProperty(h *C.QMetaProperty) *QMetaProperty { return &QMetaProperty{h: h} } +// UnsafeNewQMetaProperty constructs the type using only unsafe pointers. func UnsafeNewQMetaProperty(h unsafe.Pointer) *QMetaProperty { - return newQMetaProperty((*C.QMetaProperty)(h)) + if h == nil { + return nil + } + + return &QMetaProperty{h: (*C.QMetaProperty)(h)} } // NewQMetaProperty constructs a new QMetaProperty object. func NewQMetaProperty() *QMetaProperty { - ret := C.QMetaProperty_new() - return newQMetaProperty(ret) + var outptr_QMetaProperty *C.QMetaProperty = nil + + C.QMetaProperty_new(&outptr_QMetaProperty) + ret := newQMetaProperty(outptr_QMetaProperty) + ret.isSubclass = true + return ret } func (this *QMetaProperty) Name() string { @@ -820,7 +861,7 @@ func (this *QMetaProperty) EnclosingMetaObject() *QMetaObject { // Delete this object from C++ memory. func (this *QMetaProperty) Delete() { - C.QMetaProperty_Delete(this.h) + C.QMetaProperty_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -833,7 +874,8 @@ func (this *QMetaProperty) GoGC() { } type QMetaClassInfo struct { - h *C.QMetaClassInfo + h *C.QMetaClassInfo + isSubclass bool } func (this *QMetaClassInfo) cPointer() *C.QMetaClassInfo { @@ -850,6 +892,7 @@ func (this *QMetaClassInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaClassInfo constructs the type using only CGO pointers. func newQMetaClassInfo(h *C.QMetaClassInfo) *QMetaClassInfo { if h == nil { return nil @@ -857,14 +900,23 @@ func newQMetaClassInfo(h *C.QMetaClassInfo) *QMetaClassInfo { return &QMetaClassInfo{h: h} } +// UnsafeNewQMetaClassInfo constructs the type using only unsafe pointers. func UnsafeNewQMetaClassInfo(h unsafe.Pointer) *QMetaClassInfo { - return newQMetaClassInfo((*C.QMetaClassInfo)(h)) + if h == nil { + return nil + } + + return &QMetaClassInfo{h: (*C.QMetaClassInfo)(h)} } // NewQMetaClassInfo constructs a new QMetaClassInfo object. func NewQMetaClassInfo() *QMetaClassInfo { - ret := C.QMetaClassInfo_new() - return newQMetaClassInfo(ret) + var outptr_QMetaClassInfo *C.QMetaClassInfo = nil + + C.QMetaClassInfo_new(&outptr_QMetaClassInfo) + ret := newQMetaClassInfo(outptr_QMetaClassInfo) + ret.isSubclass = true + return ret } func (this *QMetaClassInfo) Name() string { @@ -883,7 +935,7 @@ func (this *QMetaClassInfo) EnclosingMetaObject() *QMetaObject { // Delete this object from C++ memory. func (this *QMetaClassInfo) Delete() { - C.QMetaClassInfo_Delete(this.h) + C.QMetaClassInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmetaobject.h b/qt6/gen_qmetaobject.h index c359d3aa..24320151 100644 --- a/qt6/gen_qmetaobject.h +++ b/qt6/gen_qmetaobject.h @@ -42,8 +42,8 @@ typedef struct QUntypedBindable QUntypedBindable; typedef struct QVariant QVariant; #endif -QMetaMethod* QMetaMethod_new(); -QMetaMethod* QMetaMethod_new2(QMetaMethod* param1); +void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod); +void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod); struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self); struct miqt_string QMetaMethod_Name(const QMetaMethod* self); const char* QMetaMethod_TypeName(const QMetaMethod* self); @@ -132,10 +132,10 @@ bool QMetaMethod_InvokeOnGadget82(const QMetaMethod* self, void* gadget, QGeneri bool QMetaMethod_InvokeOnGadget92(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7); bool QMetaMethod_InvokeOnGadget102(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8); bool QMetaMethod_InvokeOnGadget112(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); -void QMetaMethod_Delete(QMetaMethod* self); +void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass); -QMetaEnum* QMetaEnum_new(); -QMetaEnum* QMetaEnum_new2(QMetaEnum* param1); +void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum); +void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum); const char* QMetaEnum_Name(const QMetaEnum* self); const char* QMetaEnum_EnumName(const QMetaEnum* self); bool QMetaEnum_IsFlag(const QMetaEnum* self); @@ -152,9 +152,9 @@ QMetaObject* QMetaEnum_EnclosingMetaObject(const QMetaEnum* self); bool QMetaEnum_IsValid(const QMetaEnum* self); int QMetaEnum_KeyToValue2(const QMetaEnum* self, const char* key, bool* ok); int QMetaEnum_KeysToValue2(const QMetaEnum* self, const char* keys, bool* ok); -void QMetaEnum_Delete(QMetaEnum* self); +void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass); -QMetaProperty* QMetaProperty_new(); +void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty); const char* QMetaProperty_Name(const QMetaProperty* self); const char* QMetaProperty_TypeName(const QMetaProperty* self); int QMetaProperty_Type(const QMetaProperty* self); @@ -192,13 +192,13 @@ bool QMetaProperty_HasStdCppSet(const QMetaProperty* self); bool QMetaProperty_IsAlias(const QMetaProperty* self); bool QMetaProperty_IsValid(const QMetaProperty* self); QMetaObject* QMetaProperty_EnclosingMetaObject(const QMetaProperty* self); -void QMetaProperty_Delete(QMetaProperty* self); +void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass); -QMetaClassInfo* QMetaClassInfo_new(); +void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo); const char* QMetaClassInfo_Name(const QMetaClassInfo* self); const char* QMetaClassInfo_Value(const QMetaClassInfo* self); QMetaObject* QMetaClassInfo_EnclosingMetaObject(const QMetaClassInfo* self); -void QMetaClassInfo_Delete(QMetaClassInfo* self); +void QMetaClassInfo_Delete(QMetaClassInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmetatype.cpp b/qt6/gen_qmetatype.cpp index 9bea6b48..f89e8c78 100644 --- a/qt6/gen_qmetatype.cpp +++ b/qt6/gen_qmetatype.cpp @@ -12,20 +12,27 @@ #include "gen_qmetatype.h" #include "_cgo_export.h" -void QtPrivate__QMetaTypeInterface_Delete(QtPrivate__QMetaTypeInterface* self) { - delete self; +void QtPrivate__QMetaTypeInterface_Delete(QtPrivate__QMetaTypeInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaType* QMetaType_new(int typeVal) { - return new QMetaType(static_cast(typeVal)); +void QMetaType_new(int typeVal, QMetaType** outptr_QMetaType) { + QMetaType* ret = new QMetaType(static_cast(typeVal)); + *outptr_QMetaType = ret; } -QMetaType* QMetaType_new2() { - return new QMetaType(); +void QMetaType_new2(QMetaType** outptr_QMetaType) { + QMetaType* ret = new QMetaType(); + *outptr_QMetaType = ret; } -QMetaType* QMetaType_new3(QMetaType* param1) { - return new QMetaType(*param1); +void QMetaType_new3(QMetaType* param1, QMetaType** outptr_QMetaType) { + QMetaType* ret = new QMetaType(*param1); + *outptr_QMetaType = ret; } void QMetaType_RegisterNormalizedTypedef(struct miqt_string normalizedTypeName, QMetaType* typeVal) { @@ -250,16 +257,22 @@ void* QMetaType_Construct2(const QMetaType* self, void* where, const void* copyV return self->construct(where, copyVal); } -void QMetaType_Delete(QMetaType* self) { - delete self; +void QMetaType_Delete(QMetaType* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new() { - return new QtMetaTypePrivate::QPairVariantInterfaceImpl(); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { + QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(); + *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; } -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1) { - return new QtMetaTypePrivate::QPairVariantInterfaceImpl(*param1); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { + QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(*param1); + *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; } void QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr) { @@ -270,8 +283,12 @@ void QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate self->second(dataPtr); } -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self) { - delete self; +void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } int QtPrivate__QTypeNormalizer_NormalizeTypeFromSignature(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end) { @@ -286,7 +303,11 @@ int QtPrivate__QTypeNormalizer_NormalizeType3(QtPrivate__QTypeNormalizer* self, return self->normalizeType(begin, end, adjustConst); } -void QtPrivate__QTypeNormalizer_Delete(QtPrivate__QTypeNormalizer* self) { - delete self; +void QtPrivate__QTypeNormalizer_Delete(QtPrivate__QTypeNormalizer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmetatype.go b/qt6/gen_qmetatype.go index 922cb793..2b9767ff 100644 --- a/qt6/gen_qmetatype.go +++ b/qt6/gen_qmetatype.go @@ -132,7 +132,8 @@ const ( ) type QtPrivate__QMetaTypeInterface struct { - h *C.QtPrivate__QMetaTypeInterface + h *C.QtPrivate__QMetaTypeInterface + isSubclass bool } func (this *QtPrivate__QMetaTypeInterface) cPointer() *C.QtPrivate__QMetaTypeInterface { @@ -149,6 +150,7 @@ func (this *QtPrivate__QMetaTypeInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QMetaTypeInterface constructs the type using only CGO pointers. func newQtPrivate__QMetaTypeInterface(h *C.QtPrivate__QMetaTypeInterface) *QtPrivate__QMetaTypeInterface { if h == nil { return nil @@ -156,13 +158,18 @@ func newQtPrivate__QMetaTypeInterface(h *C.QtPrivate__QMetaTypeInterface) *QtPri return &QtPrivate__QMetaTypeInterface{h: h} } +// UnsafeNewQtPrivate__QMetaTypeInterface constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QMetaTypeInterface(h unsafe.Pointer) *QtPrivate__QMetaTypeInterface { - return newQtPrivate__QMetaTypeInterface((*C.QtPrivate__QMetaTypeInterface)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QMetaTypeInterface{h: (*C.QtPrivate__QMetaTypeInterface)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__QMetaTypeInterface) Delete() { - C.QtPrivate__QMetaTypeInterface_Delete(this.h) + C.QtPrivate__QMetaTypeInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -175,7 +182,8 @@ func (this *QtPrivate__QMetaTypeInterface) GoGC() { } type QMetaType struct { - h *C.QMetaType + h *C.QMetaType + isSubclass bool } func (this *QMetaType) cPointer() *C.QMetaType { @@ -192,6 +200,7 @@ func (this *QMetaType) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaType constructs the type using only CGO pointers. func newQMetaType(h *C.QMetaType) *QMetaType { if h == nil { return nil @@ -199,26 +208,43 @@ func newQMetaType(h *C.QMetaType) *QMetaType { return &QMetaType{h: h} } +// UnsafeNewQMetaType constructs the type using only unsafe pointers. func UnsafeNewQMetaType(h unsafe.Pointer) *QMetaType { - return newQMetaType((*C.QMetaType)(h)) + if h == nil { + return nil + } + + return &QMetaType{h: (*C.QMetaType)(h)} } // NewQMetaType constructs a new QMetaType object. func NewQMetaType(typeVal int) *QMetaType { - ret := C.QMetaType_new((C.int)(typeVal)) - return newQMetaType(ret) + var outptr_QMetaType *C.QMetaType = nil + + C.QMetaType_new((C.int)(typeVal), &outptr_QMetaType) + ret := newQMetaType(outptr_QMetaType) + ret.isSubclass = true + return ret } // NewQMetaType2 constructs a new QMetaType object. func NewQMetaType2() *QMetaType { - ret := C.QMetaType_new2() - return newQMetaType(ret) + var outptr_QMetaType *C.QMetaType = nil + + C.QMetaType_new2(&outptr_QMetaType) + ret := newQMetaType(outptr_QMetaType) + ret.isSubclass = true + return ret } // NewQMetaType3 constructs a new QMetaType object. func NewQMetaType3(param1 *QMetaType) *QMetaType { - ret := C.QMetaType_new3(param1.cPointer()) - return newQMetaType(ret) + var outptr_QMetaType *C.QMetaType = nil + + C.QMetaType_new3(param1.cPointer(), &outptr_QMetaType) + ret := newQMetaType(outptr_QMetaType) + ret.isSubclass = true + return ret } func QMetaType_RegisterNormalizedTypedef(normalizedTypeName []byte, typeVal QMetaType) { @@ -455,7 +481,7 @@ func (this *QMetaType) Construct2(where unsafe.Pointer, copyVal unsafe.Pointer) // Delete this object from C++ memory. func (this *QMetaType) Delete() { - C.QMetaType_Delete(this.h) + C.QMetaType_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -468,7 +494,8 @@ func (this *QMetaType) GoGC() { } type QtMetaTypePrivate__QPairVariantInterfaceImpl struct { - h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl + h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl + isSubclass bool } func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) cPointer() *C.QtMetaTypePrivate__QPairVariantInterfaceImpl { @@ -485,6 +512,7 @@ func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) UnsafePointer() unsafe return unsafe.Pointer(this.h) } +// newQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only CGO pointers. func newQtMetaTypePrivate__QPairVariantInterfaceImpl(h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { if h == nil { return nil @@ -492,20 +520,33 @@ func newQtMetaTypePrivate__QPairVariantInterfaceImpl(h *C.QtMetaTypePrivate__QPa return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: h} } +// UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only unsafe pointers. func UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl(h unsafe.Pointer) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - return newQtMetaTypePrivate__QPairVariantInterfaceImpl((*C.QtMetaTypePrivate__QPairVariantInterfaceImpl)(h)) + if h == nil { + return nil + } + + return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: (*C.QtMetaTypePrivate__QPairVariantInterfaceImpl)(h)} } // NewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. func NewQtMetaTypePrivate__QPairVariantInterfaceImpl() *QtMetaTypePrivate__QPairVariantInterfaceImpl { - ret := C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new() - return newQtMetaTypePrivate__QPairVariantInterfaceImpl(ret) + var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil + + C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new(&outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret.isSubclass = true + return ret } // NewQtMetaTypePrivate__QPairVariantInterfaceImpl2 constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. func NewQtMetaTypePrivate__QPairVariantInterfaceImpl2(param1 *QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - ret := C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(param1.cPointer()) - return newQtMetaTypePrivate__QPairVariantInterfaceImpl(ret) + var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil + + C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) + ret.isSubclass = true + return ret } func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) First(dataPtr unsafe.Pointer) { @@ -518,7 +559,7 @@ func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Second(dataPtr unsafe. // Delete this object from C++ memory. func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Delete() { - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(this.h) + C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -531,7 +572,8 @@ func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) GoGC() { } type QtPrivate__QTypeNormalizer struct { - h *C.QtPrivate__QTypeNormalizer + h *C.QtPrivate__QTypeNormalizer + isSubclass bool } func (this *QtPrivate__QTypeNormalizer) cPointer() *C.QtPrivate__QTypeNormalizer { @@ -548,6 +590,7 @@ func (this *QtPrivate__QTypeNormalizer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QTypeNormalizer constructs the type using only CGO pointers. func newQtPrivate__QTypeNormalizer(h *C.QtPrivate__QTypeNormalizer) *QtPrivate__QTypeNormalizer { if h == nil { return nil @@ -555,8 +598,13 @@ func newQtPrivate__QTypeNormalizer(h *C.QtPrivate__QTypeNormalizer) *QtPrivate__ return &QtPrivate__QTypeNormalizer{h: h} } +// UnsafeNewQtPrivate__QTypeNormalizer constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QTypeNormalizer(h unsafe.Pointer) *QtPrivate__QTypeNormalizer { - return newQtPrivate__QTypeNormalizer((*C.QtPrivate__QTypeNormalizer)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QTypeNormalizer{h: (*C.QtPrivate__QTypeNormalizer)(h)} } func (this *QtPrivate__QTypeNormalizer) NormalizeTypeFromSignature(begin string, end string) int { @@ -585,7 +633,7 @@ func (this *QtPrivate__QTypeNormalizer) NormalizeType3(begin string, end string, // Delete this object from C++ memory. func (this *QtPrivate__QTypeNormalizer) Delete() { - C.QtPrivate__QTypeNormalizer_Delete(this.h) + C.QtPrivate__QTypeNormalizer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmetatype.h b/qt6/gen_qmetatype.h index 11ee1101..3d2e32d9 100644 --- a/qt6/gen_qmetatype.h +++ b/qt6/gen_qmetatype.h @@ -50,11 +50,11 @@ typedef struct QtPrivate__QMetaTypeInterface QtPrivate__QMetaTypeInterface; typedef struct QtPrivate__QTypeNormalizer QtPrivate__QTypeNormalizer; #endif -void QtPrivate__QMetaTypeInterface_Delete(QtPrivate__QMetaTypeInterface* self); +void QtPrivate__QMetaTypeInterface_Delete(QtPrivate__QMetaTypeInterface* self, bool isSubclass); -QMetaType* QMetaType_new(int typeVal); -QMetaType* QMetaType_new2(); -QMetaType* QMetaType_new3(QMetaType* param1); +void QMetaType_new(int typeVal, QMetaType** outptr_QMetaType); +void QMetaType_new2(QMetaType** outptr_QMetaType); +void QMetaType_new3(QMetaType* param1, QMetaType** outptr_QMetaType); void QMetaType_RegisterNormalizedTypedef(struct miqt_string normalizedTypeName, QMetaType* typeVal); int QMetaType_Type(const char* typeName); int QMetaType_TypeWithTypeName(struct miqt_string typeName); @@ -109,18 +109,18 @@ void* QMetaType_Create22(int typeVal, const void* copyVal); int QMetaType_Id1(const QMetaType* self, int param1); void* QMetaType_Create1(const QMetaType* self, const void* copyVal); void* QMetaType_Construct2(const QMetaType* self, void* where, const void* copyVal); -void QMetaType_Delete(QMetaType* self); +void QMetaType_Delete(QMetaType* self, bool isSubclass); -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new(); -QtMetaTypePrivate__QPairVariantInterfaceImpl* QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); void QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr); void QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self); +void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass); int QtPrivate__QTypeNormalizer_NormalizeTypeFromSignature(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end); int QtPrivate__QTypeNormalizer_NormalizeType(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end); int QtPrivate__QTypeNormalizer_NormalizeType3(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end, bool adjustConst); -void QtPrivate__QTypeNormalizer_Delete(QtPrivate__QTypeNormalizer* self); +void QtPrivate__QTypeNormalizer_Delete(QtPrivate__QTypeNormalizer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmimedata.cpp b/qt6/gen_qmimedata.cpp index 2431b508..93199963 100644 --- a/qt6/gen_qmimedata.cpp +++ b/qt6/gen_qmimedata.cpp @@ -1,18 +1,314 @@ #include +#include +#include #include +#include #include +#include #include +#include #include #include #include +#include #include #include #include #include "gen_qmimedata.h" #include "_cgo_export.h" -QMimeData* QMimeData_new() { - return new QMimeData(); +class MiqtVirtualQMimeData : public virtual QMimeData { +public: + + MiqtVirtualQMimeData(): QMimeData() {}; + + virtual ~MiqtVirtualQMimeData() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasFormat = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasFormat(const QString& mimetype) const override { + if (handle__HasFormat == 0) { + return QMimeData::hasFormat(mimetype); + } + + const QString mimetype_ret = mimetype; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray mimetype_b = mimetype_ret.toUtf8(); + struct miqt_string mimetype_ms; + mimetype_ms.len = mimetype_b.length(); + mimetype_ms.data = static_cast(malloc(mimetype_ms.len)); + memcpy(mimetype_ms.data, mimetype_b.data(), mimetype_ms.len); + struct miqt_string sigval1 = mimetype_ms; + + bool callback_return_value = miqt_exec_callback_QMimeData_HasFormat(const_cast(this), handle__HasFormat, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasFormat(struct miqt_string mimetype) const { + QString mimetype_QString = QString::fromUtf8(mimetype.data, mimetype.len); + + return QMimeData::hasFormat(mimetype_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Formats = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList formats() const override { + if (handle__Formats == 0) { + return QMimeData::formats(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QMimeData_Formats(const_cast(this), handle__Formats); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_Formats() const { + + QStringList _ret = QMimeData::formats(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RetrieveData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant retrieveData(const QString& mimetype, QMetaType preferredType) const override { + if (handle__RetrieveData == 0) { + return QMimeData::retrieveData(mimetype, preferredType); + } + + const QString mimetype_ret = mimetype; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray mimetype_b = mimetype_ret.toUtf8(); + struct miqt_string mimetype_ms; + mimetype_ms.len = mimetype_b.length(); + mimetype_ms.data = static_cast(malloc(mimetype_ms.len)); + memcpy(mimetype_ms.data, mimetype_b.data(), mimetype_ms.len); + struct miqt_string sigval1 = mimetype_ms; + QMetaType* sigval2 = new QMetaType(preferredType); + + QVariant* callback_return_value = miqt_exec_callback_QMimeData_RetrieveData(const_cast(this), handle__RetrieveData, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_RetrieveData(struct miqt_string mimetype, QMetaType* preferredType) const { + QString mimetype_QString = QString::fromUtf8(mimetype.data, mimetype.len); + + return new QVariant(QMimeData::retrieveData(mimetype_QString, *preferredType)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMimeData::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMimeData_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMimeData::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMimeData::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMimeData_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMimeData::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMimeData::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMimeData_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMimeData::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMimeData::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMimeData_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMimeData::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMimeData::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMimeData_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMimeData::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMimeData::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMimeData_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMimeData::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMimeData::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMimeData_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMimeData::disconnectNotify(*signal); + + } + +}; + +void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject) { + MiqtVirtualQMimeData* ret = new MiqtVirtualQMimeData(); + *outptr_QMimeData = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMimeData_MetaObject(const QMimeData* self) { @@ -197,7 +493,91 @@ struct miqt_string QMimeData_Tr3(const char* s, const char* c, int n) { return _ms; } -void QMimeData_Delete(QMimeData* self) { - delete self; +void QMimeData_override_virtual_HasFormat(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__HasFormat = slot; +} + +bool QMimeData_virtualbase_HasFormat(const void* self, struct miqt_string mimetype) { + return ( (const MiqtVirtualQMimeData*)(self) )->virtualbase_HasFormat(mimetype); +} + +void QMimeData_override_virtual_Formats(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__Formats = slot; +} + +struct miqt_array /* of struct miqt_string */ QMimeData_virtualbase_Formats(const void* self) { + return ( (const MiqtVirtualQMimeData*)(self) )->virtualbase_Formats(); +} + +void QMimeData_override_virtual_RetrieveData(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__RetrieveData = slot; +} + +QVariant* QMimeData_virtualbase_RetrieveData(const void* self, struct miqt_string mimetype, QMetaType* preferredType) { + return ( (const MiqtVirtualQMimeData*)(self) )->virtualbase_RetrieveData(mimetype, preferredType); +} + +void QMimeData_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__Event = slot; +} + +bool QMimeData_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMimeData*)(self) )->virtualbase_Event(event); +} + +void QMimeData_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__EventFilter = slot; +} + +bool QMimeData_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMimeData*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMimeData_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__TimerEvent = slot; +} + +void QMimeData_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_TimerEvent(event); +} + +void QMimeData_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__ChildEvent = slot; +} + +void QMimeData_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_ChildEvent(event); +} + +void QMimeData_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__CustomEvent = slot; +} + +void QMimeData_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_CustomEvent(event); +} + +void QMimeData_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__ConnectNotify = slot; +} + +void QMimeData_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMimeData_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMimeData*)(self) )->handle__DisconnectNotify = slot; +} + +void QMimeData_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMimeData*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMimeData_Delete(QMimeData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmimedata.go b/qt6/gen_qmimedata.go index 99c1bcb2..930f26fd 100644 --- a/qt6/gen_qmimedata.go +++ b/qt6/gen_qmimedata.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QMimeData struct { - h *C.QMimeData + h *C.QMimeData + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QMimeData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMimeData(h *C.QMimeData) *QMimeData { +// newQMimeData constructs the type using only CGO pointers. +func newQMimeData(h *C.QMimeData, h_QObject *C.QObject) *QMimeData { if h == nil { return nil } - return &QMimeData{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QMimeData{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQMimeData(h unsafe.Pointer) *QMimeData { - return newQMimeData((*C.QMimeData)(h)) +// UnsafeNewQMimeData constructs the type using only unsafe pointers. +func UnsafeNewQMimeData(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMimeData { + if h == nil { + return nil + } + + return &QMimeData{h: (*C.QMimeData)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQMimeData constructs a new QMimeData object. func NewQMimeData() *QMimeData { - ret := C.QMimeData_new() - return newQMimeData(ret) + var outptr_QMimeData *C.QMimeData = nil + var outptr_QObject *C.QObject = nil + + C.QMimeData_new(&outptr_QMimeData, &outptr_QObject) + ret := newQMimeData(outptr_QMimeData, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMimeData) MetaObject() *QMetaObject { @@ -240,9 +255,287 @@ func QMimeData_Tr3(s string, c string, n int) string { return _ret } +func (this *QMimeData) callVirtualBase_HasFormat(mimetype string) bool { + mimetype_ms := C.struct_miqt_string{} + mimetype_ms.data = C.CString(mimetype) + mimetype_ms.len = C.size_t(len(mimetype)) + defer C.free(unsafe.Pointer(mimetype_ms.data)) + + return (bool)(C.QMimeData_virtualbase_HasFormat(unsafe.Pointer(this.h), mimetype_ms)) + +} +func (this *QMimeData) OnHasFormat(slot func(super func(mimetype string) bool, mimetype string) bool) { + C.QMimeData_override_virtual_HasFormat(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_HasFormat +func miqt_exec_callback_QMimeData_HasFormat(self *C.QMimeData, cb C.intptr_t, mimetype C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mimetype string) bool, mimetype string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var mimetype_ms C.struct_miqt_string = mimetype + mimetype_ret := C.GoStringN(mimetype_ms.data, C.int(int64(mimetype_ms.len))) + C.free(unsafe.Pointer(mimetype_ms.data)) + slotval1 := mimetype_ret + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_HasFormat, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMimeData) callVirtualBase_Formats() []string { + + var _ma C.struct_miqt_array = C.QMimeData_virtualbase_Formats(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QMimeData) OnFormats(slot func(super func() []string) []string) { + C.QMimeData_override_virtual_Formats(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_Formats +func miqt_exec_callback_QMimeData_Formats(self *C.QMimeData, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_Formats) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QMimeData) callVirtualBase_RetrieveData(mimetype string, preferredType QMetaType) *QVariant { + mimetype_ms := C.struct_miqt_string{} + mimetype_ms.data = C.CString(mimetype) + mimetype_ms.len = C.size_t(len(mimetype)) + defer C.free(unsafe.Pointer(mimetype_ms.data)) + + _ret := C.QMimeData_virtualbase_RetrieveData(unsafe.Pointer(this.h), mimetype_ms, preferredType.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QMimeData) OnRetrieveData(slot func(super func(mimetype string, preferredType QMetaType) *QVariant, mimetype string, preferredType QMetaType) *QVariant) { + C.QMimeData_override_virtual_RetrieveData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_RetrieveData +func miqt_exec_callback_QMimeData_RetrieveData(self *C.QMimeData, cb C.intptr_t, mimetype C.struct_miqt_string, preferredType *C.QMetaType) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mimetype string, preferredType QMetaType) *QVariant, mimetype string, preferredType QMetaType) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var mimetype_ms C.struct_miqt_string = mimetype + mimetype_ret := C.GoStringN(mimetype_ms.data, C.int(int64(mimetype_ms.len))) + C.free(unsafe.Pointer(mimetype_ms.data)) + slotval1 := mimetype_ret + preferredType_ret := preferredType + preferredType_goptr := newQMetaType(preferredType_ret) + preferredType_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *preferredType_goptr + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_RetrieveData, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QMimeData) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMimeData_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMimeData) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMimeData_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_Event +func miqt_exec_callback_QMimeData_Event(self *C.QMimeData, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMimeData) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QMimeData_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QMimeData) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QMimeData_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_EventFilter +func miqt_exec_callback_QMimeData_EventFilter(self *C.QMimeData, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMimeData) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QMimeData_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMimeData) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QMimeData_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_TimerEvent +func miqt_exec_callback_QMimeData_TimerEvent(self *C.QMimeData, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMimeData{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMimeData) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QMimeData_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMimeData) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QMimeData_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_ChildEvent +func miqt_exec_callback_QMimeData_ChildEvent(self *C.QMimeData, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMimeData{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMimeData) callVirtualBase_CustomEvent(event *QEvent) { + + C.QMimeData_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMimeData) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMimeData_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_CustomEvent +func miqt_exec_callback_QMimeData_CustomEvent(self *C.QMimeData, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMimeData{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMimeData) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QMimeData_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMimeData) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMimeData_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_ConnectNotify +func miqt_exec_callback_QMimeData_ConnectNotify(self *C.QMimeData, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMimeData{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMimeData) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QMimeData_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMimeData) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMimeData_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMimeData_DisconnectNotify +func miqt_exec_callback_QMimeData_DisconnectNotify(self *C.QMimeData, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMimeData{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMimeData) Delete() { - C.QMimeData_Delete(this.h) + C.QMimeData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmimedata.h b/qt6/gen_qmimedata.h index ef85c779..6019ec0d 100644 --- a/qt6/gen_qmimedata.h +++ b/qt6/gen_qmimedata.h @@ -16,19 +16,31 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; +class QMetaType; class QMimeData; +class QObject; +class QTimerEvent; class QUrl; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QMetaType QMetaType; typedef struct QMimeData QMimeData; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QMimeData* QMimeData_new(); +void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject); QMetaObject* QMimeData_MetaObject(const QMimeData* self); void* QMimeData_Metacast(QMimeData* self, const char* param1); struct miqt_string QMimeData_Tr(const char* s); @@ -53,9 +65,30 @@ void QMimeData_RemoveFormat(QMimeData* self, struct miqt_string mimetype); bool QMimeData_HasFormat(const QMimeData* self, struct miqt_string mimetype); struct miqt_array /* of struct miqt_string */ QMimeData_Formats(const QMimeData* self); void QMimeData_Clear(QMimeData* self); +QVariant* QMimeData_RetrieveData(const QMimeData* self, struct miqt_string mimetype, QMetaType* preferredType); struct miqt_string QMimeData_Tr2(const char* s, const char* c); struct miqt_string QMimeData_Tr3(const char* s, const char* c, int n); -void QMimeData_Delete(QMimeData* self); +void QMimeData_override_virtual_HasFormat(void* self, intptr_t slot); +bool QMimeData_virtualbase_HasFormat(const void* self, struct miqt_string mimetype); +void QMimeData_override_virtual_Formats(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QMimeData_virtualbase_Formats(const void* self); +void QMimeData_override_virtual_RetrieveData(void* self, intptr_t slot); +QVariant* QMimeData_virtualbase_RetrieveData(const void* self, struct miqt_string mimetype, QMetaType* preferredType); +void QMimeData_override_virtual_Event(void* self, intptr_t slot); +bool QMimeData_virtualbase_Event(void* self, QEvent* event); +void QMimeData_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMimeData_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMimeData_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMimeData_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMimeData_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMimeData_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMimeData_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMimeData_virtualbase_CustomEvent(void* self, QEvent* event); +void QMimeData_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMimeData_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMimeData_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMimeData_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMimeData_Delete(QMimeData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmimedatabase.cpp b/qt6/gen_qmimedatabase.cpp index 0e4cc76b..ee71f459 100644 --- a/qt6/gen_qmimedatabase.cpp +++ b/qt6/gen_qmimedatabase.cpp @@ -12,8 +12,9 @@ #include "gen_qmimedatabase.h" #include "_cgo_export.h" -QMimeDatabase* QMimeDatabase_new() { - return new QMimeDatabase(); +void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase) { + QMimeDatabase* ret = new QMimeDatabase(); + *outptr_QMimeDatabase = ret; } QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias) { @@ -102,7 +103,11 @@ QMimeType* QMimeDatabase_MimeTypeForFile22(const QMimeDatabase* self, QFileInfo* return new QMimeType(self->mimeTypeForFile(*fileInfo, static_cast(mode))); } -void QMimeDatabase_Delete(QMimeDatabase* self) { - delete self; +void QMimeDatabase_Delete(QMimeDatabase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmimedatabase.go b/qt6/gen_qmimedatabase.go index dfd226e2..dfa23b46 100644 --- a/qt6/gen_qmimedatabase.go +++ b/qt6/gen_qmimedatabase.go @@ -22,7 +22,8 @@ const ( ) type QMimeDatabase struct { - h *C.QMimeDatabase + h *C.QMimeDatabase + isSubclass bool } func (this *QMimeDatabase) cPointer() *C.QMimeDatabase { @@ -39,6 +40,7 @@ func (this *QMimeDatabase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMimeDatabase constructs the type using only CGO pointers. func newQMimeDatabase(h *C.QMimeDatabase) *QMimeDatabase { if h == nil { return nil @@ -46,14 +48,23 @@ func newQMimeDatabase(h *C.QMimeDatabase) *QMimeDatabase { return &QMimeDatabase{h: h} } +// UnsafeNewQMimeDatabase constructs the type using only unsafe pointers. func UnsafeNewQMimeDatabase(h unsafe.Pointer) *QMimeDatabase { - return newQMimeDatabase((*C.QMimeDatabase)(h)) + if h == nil { + return nil + } + + return &QMimeDatabase{h: (*C.QMimeDatabase)(h)} } // NewQMimeDatabase constructs a new QMimeDatabase object. func NewQMimeDatabase() *QMimeDatabase { - ret := C.QMimeDatabase_new() - return newQMimeDatabase(ret) + var outptr_QMimeDatabase *C.QMimeDatabase = nil + + C.QMimeDatabase_new(&outptr_QMimeDatabase) + ret := newQMimeDatabase(outptr_QMimeDatabase) + ret.isSubclass = true + return ret } func (this *QMimeDatabase) MimeTypeForName(nameOrAlias string) *QMimeType { @@ -195,7 +206,7 @@ func (this *QMimeDatabase) MimeTypeForFile22(fileInfo *QFileInfo, mode QMimeData // Delete this object from C++ memory. func (this *QMimeDatabase) Delete() { - C.QMimeDatabase_Delete(this.h) + C.QMimeDatabase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmimedatabase.h b/qt6/gen_qmimedatabase.h index 2bbebd5e..504e55e0 100644 --- a/qt6/gen_qmimedatabase.h +++ b/qt6/gen_qmimedatabase.h @@ -30,7 +30,7 @@ typedef struct QMimeType QMimeType; typedef struct QUrl QUrl; #endif -QMimeDatabase* QMimeDatabase_new(); +void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase); QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias); QMimeType* QMimeDatabase_MimeTypeForFile(const QMimeDatabase* self, struct miqt_string fileName); QMimeType* QMimeDatabase_MimeTypeForFileWithFileInfo(const QMimeDatabase* self, QFileInfo* fileInfo); @@ -44,7 +44,7 @@ struct miqt_string QMimeDatabase_SuffixForFileName(const QMimeDatabase* self, st struct miqt_array /* of QMimeType* */ QMimeDatabase_AllMimeTypes(const QMimeDatabase* self); QMimeType* QMimeDatabase_MimeTypeForFile2(const QMimeDatabase* self, struct miqt_string fileName, int mode); QMimeType* QMimeDatabase_MimeTypeForFile22(const QMimeDatabase* self, QFileInfo* fileInfo, int mode); -void QMimeDatabase_Delete(QMimeDatabase* self); +void QMimeDatabase_Delete(QMimeDatabase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmimetype.cpp b/qt6/gen_qmimetype.cpp index a2e96d57..df6a2a83 100644 --- a/qt6/gen_qmimetype.cpp +++ b/qt6/gen_qmimetype.cpp @@ -7,12 +7,14 @@ #include "gen_qmimetype.h" #include "_cgo_export.h" -QMimeType* QMimeType_new() { - return new QMimeType(); +void QMimeType_new(QMimeType** outptr_QMimeType) { + QMimeType* ret = new QMimeType(); + *outptr_QMimeType = ret; } -QMimeType* QMimeType_new2(QMimeType* other) { - return new QMimeType(*other); +void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType) { + QMimeType* ret = new QMimeType(*other); + *outptr_QMimeType = ret; } void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other) { @@ -210,7 +212,11 @@ struct miqt_string QMimeType_FilterString(const QMimeType* self) { return _ms; } -void QMimeType_Delete(QMimeType* self) { - delete self; +void QMimeType_Delete(QMimeType* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmimetype.go b/qt6/gen_qmimetype.go index a31eb079..f43a57dd 100644 --- a/qt6/gen_qmimetype.go +++ b/qt6/gen_qmimetype.go @@ -14,7 +14,8 @@ import ( ) type QMimeType struct { - h *C.QMimeType + h *C.QMimeType + isSubclass bool } func (this *QMimeType) cPointer() *C.QMimeType { @@ -31,6 +32,7 @@ func (this *QMimeType) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMimeType constructs the type using only CGO pointers. func newQMimeType(h *C.QMimeType) *QMimeType { if h == nil { return nil @@ -38,20 +40,33 @@ func newQMimeType(h *C.QMimeType) *QMimeType { return &QMimeType{h: h} } +// UnsafeNewQMimeType constructs the type using only unsafe pointers. func UnsafeNewQMimeType(h unsafe.Pointer) *QMimeType { - return newQMimeType((*C.QMimeType)(h)) + if h == nil { + return nil + } + + return &QMimeType{h: (*C.QMimeType)(h)} } // NewQMimeType constructs a new QMimeType object. func NewQMimeType() *QMimeType { - ret := C.QMimeType_new() - return newQMimeType(ret) + var outptr_QMimeType *C.QMimeType = nil + + C.QMimeType_new(&outptr_QMimeType) + ret := newQMimeType(outptr_QMimeType) + ret.isSubclass = true + return ret } // NewQMimeType2 constructs a new QMimeType object. func NewQMimeType2(other *QMimeType) *QMimeType { - ret := C.QMimeType_new2(other.cPointer()) - return newQMimeType(ret) + var outptr_QMimeType *C.QMimeType = nil + + C.QMimeType_new2(other.cPointer(), &outptr_QMimeType) + ret := newQMimeType(outptr_QMimeType) + ret.isSubclass = true + return ret } func (this *QMimeType) OperatorAssign(other *QMimeType) { @@ -195,7 +210,7 @@ func (this *QMimeType) FilterString() string { // Delete this object from C++ memory. func (this *QMimeType) Delete() { - C.QMimeType_Delete(this.h) + C.QMimeType_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmimetype.h b/qt6/gen_qmimetype.h index 44f7d098..0706eb16 100644 --- a/qt6/gen_qmimetype.h +++ b/qt6/gen_qmimetype.h @@ -20,8 +20,8 @@ class QMimeType; typedef struct QMimeType QMimeType; #endif -QMimeType* QMimeType_new(); -QMimeType* QMimeType_new2(QMimeType* other); +void QMimeType_new(QMimeType** outptr_QMimeType); +void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType); void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other); void QMimeType_Swap(QMimeType* self, QMimeType* other); bool QMimeType_OperatorEqual(const QMimeType* self, QMimeType* other); @@ -40,7 +40,7 @@ struct miqt_array /* of struct miqt_string */ QMimeType_Suffixes(const QMimeTyp struct miqt_string QMimeType_PreferredSuffix(const QMimeType* self); bool QMimeType_Inherits(const QMimeType* self, struct miqt_string mimeTypeName); struct miqt_string QMimeType_FilterString(const QMimeType* self); -void QMimeType_Delete(QMimeType* self); +void QMimeType_Delete(QMimeType* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmovie.cpp b/qt6/gen_qmovie.cpp index 69382c8e..a6f902e4 100644 --- a/qt6/gen_qmovie.cpp +++ b/qt6/gen_qmovie.cpp @@ -1,8 +1,11 @@ #include +#include #include +#include #include #include #include +#include #include #include #include @@ -12,47 +15,251 @@ #include #include #include +#include #include #include "gen_qmovie.h" #include "_cgo_export.h" -QMovie* QMovie_new() { - return new QMovie(); +class MiqtVirtualQMovie : public virtual QMovie { +public: + + MiqtVirtualQMovie(): QMovie() {}; + MiqtVirtualQMovie(QIODevice* device): QMovie(device) {}; + MiqtVirtualQMovie(const QString& fileName): QMovie(fileName) {}; + MiqtVirtualQMovie(QObject* parent): QMovie(parent) {}; + MiqtVirtualQMovie(QIODevice* device, const QByteArray& format): QMovie(device, format) {}; + MiqtVirtualQMovie(QIODevice* device, const QByteArray& format, QObject* parent): QMovie(device, format, parent) {}; + MiqtVirtualQMovie(const QString& fileName, const QByteArray& format): QMovie(fileName, format) {}; + MiqtVirtualQMovie(const QString& fileName, const QByteArray& format, QObject* parent): QMovie(fileName, format, parent) {}; + + virtual ~MiqtVirtualQMovie() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMovie::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMovie_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMovie::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMovie::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMovie_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMovie::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMovie::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMovie_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMovie::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMovie::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMovie_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMovie::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMovie::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMovie_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMovie::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMovie::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMovie_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMovie::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMovie::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMovie_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMovie::disconnectNotify(*signal); + + } + +}; + +void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject) { + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new2(QIODevice* device) { - return new QMovie(device); +void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject) { + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new3(struct miqt_string fileName) { +void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QMovie(fileName_QString); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new4(QObject* parent) { - return new QMovie(parent); +void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(parent); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new5(QIODevice* device, struct miqt_string format) { +void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { QByteArray format_QByteArray(format.data, format.len); - return new QMovie(device, format_QByteArray); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent) { +void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { QByteArray format_QByteArray(format.data, format.len); - return new QMovie(device, format_QByteArray, parent); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray, parent); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format) { +void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QMovie(fileName_QString, format_QByteArray); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } -QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent) { +void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QMovie(fileName_QString, format_QByteArray, parent); + MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray, parent); + *outptr_QMovie = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMovie_MetaObject(const QMovie* self) { @@ -221,7 +428,7 @@ void QMovie_Started(QMovie* self) { } void QMovie_connect_Started(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::started), self, [=]() { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::started), self, [=]() { miqt_exec_callback_QMovie_Started(slot); }); } @@ -231,7 +438,7 @@ void QMovie_Resized(QMovie* self, QSize* size) { } void QMovie_connect_Resized(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::resized), self, [=](const QSize& size) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::resized), self, [=](const QSize& size) { const QSize& size_ret = size; // Cast returned reference into pointer QSize* sigval1 = const_cast(&size_ret); @@ -244,7 +451,7 @@ void QMovie_Updated(QMovie* self, QRect* rect) { } void QMovie_connect_Updated(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::updated), self, [=](const QRect& rect) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::updated), self, [=](const QRect& rect) { const QRect& rect_ret = rect; // Cast returned reference into pointer QRect* sigval1 = const_cast(&rect_ret); @@ -257,7 +464,7 @@ void QMovie_StateChanged(QMovie* self, int state) { } void QMovie_connect_StateChanged(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::stateChanged), self, [=](QMovie::MovieState state) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::stateChanged), self, [=](QMovie::MovieState state) { QMovie::MovieState state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QMovie_StateChanged(slot, sigval1); @@ -269,7 +476,7 @@ void QMovie_Error(QMovie* self, int error) { } void QMovie_connect_Error(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::error), self, [=](QImageReader::ImageReaderError error) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::error), self, [=](QImageReader::ImageReaderError error) { QImageReader::ImageReaderError error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QMovie_Error(slot, sigval1); @@ -281,7 +488,7 @@ void QMovie_Finished(QMovie* self) { } void QMovie_connect_Finished(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::finished), self, [=]() { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::finished), self, [=]() { miqt_exec_callback_QMovie_Finished(slot); }); } @@ -291,7 +498,7 @@ void QMovie_FrameChanged(QMovie* self, int frameNumber) { } void QMovie_connect_FrameChanged(QMovie* self, intptr_t slot) { - QMovie::connect(self, static_cast(&QMovie::frameChanged), self, [=](int frameNumber) { + MiqtVirtualQMovie::connect(self, static_cast(&QMovie::frameChanged), self, [=](int frameNumber) { int sigval1 = frameNumber; miqt_exec_callback_QMovie_FrameChanged(slot, sigval1); }); @@ -339,7 +546,67 @@ struct miqt_string QMovie_Tr3(const char* s, const char* c, int n) { return _ms; } -void QMovie_Delete(QMovie* self) { - delete self; +void QMovie_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__Event = slot; +} + +bool QMovie_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMovie*)(self) )->virtualbase_Event(event); +} + +void QMovie_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__EventFilter = slot; +} + +bool QMovie_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMovie*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMovie_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__TimerEvent = slot; +} + +void QMovie_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_TimerEvent(event); +} + +void QMovie_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__ChildEvent = slot; +} + +void QMovie_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_ChildEvent(event); +} + +void QMovie_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__CustomEvent = slot; +} + +void QMovie_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_CustomEvent(event); +} + +void QMovie_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__ConnectNotify = slot; +} + +void QMovie_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMovie_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMovie*)(self) )->handle__DisconnectNotify = slot; +} + +void QMovie_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMovie*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMovie_Delete(QMovie* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmovie.go b/qt6/gen_qmovie.go index 9e5f600d..cda3735e 100644 --- a/qt6/gen_qmovie.go +++ b/qt6/gen_qmovie.go @@ -30,7 +30,8 @@ const ( ) type QMovie struct { - h *C.QMovie + h *C.QMovie + isSubclass bool *QObject } @@ -48,27 +49,45 @@ func (this *QMovie) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMovie(h *C.QMovie) *QMovie { +// newQMovie constructs the type using only CGO pointers. +func newQMovie(h *C.QMovie, h_QObject *C.QObject) *QMovie { if h == nil { return nil } - return &QMovie{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QMovie{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQMovie(h unsafe.Pointer) *QMovie { - return newQMovie((*C.QMovie)(h)) +// UnsafeNewQMovie constructs the type using only unsafe pointers. +func UnsafeNewQMovie(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMovie { + if h == nil { + return nil + } + + return &QMovie{h: (*C.QMovie)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQMovie constructs a new QMovie object. func NewQMovie() *QMovie { - ret := C.QMovie_new() - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new(&outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie2 constructs a new QMovie object. func NewQMovie2(device *QIODevice) *QMovie { - ret := C.QMovie_new2(device.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new2(device.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie3 constructs a new QMovie object. @@ -77,14 +96,24 @@ func NewQMovie3(fileName string) *QMovie { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QMovie_new3(fileName_ms) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new3(fileName_ms, &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie4 constructs a new QMovie object. func NewQMovie4(parent *QObject) *QMovie { - ret := C.QMovie_new4(parent.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new4(parent.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie5 constructs a new QMovie object. @@ -92,8 +121,13 @@ func NewQMovie5(device *QIODevice, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new5(device.cPointer(), format_alias) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new5(device.cPointer(), format_alias, &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie6 constructs a new QMovie object. @@ -101,8 +135,13 @@ func NewQMovie6(device *QIODevice, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie7 constructs a new QMovie object. @@ -114,8 +153,13 @@ func NewQMovie7(fileName string, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new7(fileName_ms, format_alias) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new7(fileName_ms, format_alias, &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMovie8 constructs a new QMovie object. @@ -127,8 +171,13 @@ func NewQMovie8(fileName string, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QMovie_new8(fileName_ms, format_alias, parent.cPointer()) - return newQMovie(ret) + var outptr_QMovie *C.QMovie = nil + var outptr_QObject *C.QObject = nil + + C.QMovie_new8(fileName_ms, format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) + ret := newQMovie(outptr_QMovie, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMovie) MetaObject() *QMetaObject { @@ -168,7 +217,7 @@ func (this *QMovie) SetDevice(device *QIODevice) { } func (this *QMovie) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QMovie_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QMovie_Device(this.h)), nil, nil) } func (this *QMovie) SetFileName(fileName string) { @@ -224,14 +273,14 @@ func (this *QMovie) FrameRect() *QRect { func (this *QMovie) CurrentImage() *QImage { _ret := C.QMovie_CurrentImage(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QMovie) CurrentPixmap() *QPixmap { _ret := C.QMovie_CurrentPixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -470,9 +519,175 @@ func QMovie_Tr3(s string, c string, n int) string { return _ret } +func (this *QMovie) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QMovie_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QMovie) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QMovie_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_Event +func miqt_exec_callback_QMovie_Event(self *C.QMovie, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMovie{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMovie) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QMovie_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QMovie) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QMovie_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_EventFilter +func miqt_exec_callback_QMovie_EventFilter(self *C.QMovie, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMovie{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMovie) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QMovie_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMovie) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QMovie_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_TimerEvent +func miqt_exec_callback_QMovie_TimerEvent(self *C.QMovie, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMovie{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMovie) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QMovie_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMovie) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QMovie_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_ChildEvent +func miqt_exec_callback_QMovie_ChildEvent(self *C.QMovie, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMovie{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMovie) callVirtualBase_CustomEvent(event *QEvent) { + + C.QMovie_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QMovie) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QMovie_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_CustomEvent +func miqt_exec_callback_QMovie_CustomEvent(self *C.QMovie, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMovie{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMovie) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QMovie_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMovie) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMovie_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_ConnectNotify +func miqt_exec_callback_QMovie_ConnectNotify(self *C.QMovie, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMovie{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMovie) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QMovie_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QMovie) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QMovie_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMovie_DisconnectNotify +func miqt_exec_callback_QMovie_DisconnectNotify(self *C.QMovie, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMovie{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMovie) Delete() { - C.QMovie_Delete(this.h) + C.QMovie_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmovie.h b/qt6/gen_qmovie.h index 05e67a46..7c3eb1c6 100644 --- a/qt6/gen_qmovie.h +++ b/qt6/gen_qmovie.h @@ -16,36 +16,44 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QColor; +class QEvent; class QIODevice; class QImage; +class QMetaMethod; class QMetaObject; class QMovie; class QObject; class QPixmap; class QRect; class QSize; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; typedef struct QImage QImage; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QMovie QMovie; typedef struct QObject QObject; typedef struct QPixmap QPixmap; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; #endif -QMovie* QMovie_new(); -QMovie* QMovie_new2(QIODevice* device); -QMovie* QMovie_new3(struct miqt_string fileName); -QMovie* QMovie_new4(QObject* parent); -QMovie* QMovie_new5(QIODevice* device, struct miqt_string format); -QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent); -QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format); -QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent); +void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); +void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); QMetaObject* QMovie_MetaObject(const QMovie* self); void* QMovie_Metacast(QMovie* self, const char* param1); struct miqt_string QMovie_Tr(const char* s); @@ -96,7 +104,21 @@ void QMovie_Stop(QMovie* self); void QMovie_SetSpeed(QMovie* self, int percentSpeed); struct miqt_string QMovie_Tr2(const char* s, const char* c); struct miqt_string QMovie_Tr3(const char* s, const char* c, int n); -void QMovie_Delete(QMovie* self); +void QMovie_override_virtual_Event(void* self, intptr_t slot); +bool QMovie_virtualbase_Event(void* self, QEvent* event); +void QMovie_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMovie_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMovie_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMovie_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMovie_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMovie_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMovie_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMovie_virtualbase_CustomEvent(void* self, QEvent* event); +void QMovie_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMovie_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMovie_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMovie_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMovie_Delete(QMovie* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qmutex.cpp b/qt6/gen_qmutex.cpp index 1cbccf32..a739a77c 100644 --- a/qt6/gen_qmutex.cpp +++ b/qt6/gen_qmutex.cpp @@ -5,8 +5,9 @@ #include "gen_qmutex.h" #include "_cgo_export.h" -QBasicMutex* QBasicMutex_new() { - return new QBasicMutex(); +void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex) { + QBasicMutex* ret = new QBasicMutex(); + *outptr_QBasicMutex = ret; } void QBasicMutex_Lock(QBasicMutex* self) { @@ -25,12 +26,18 @@ bool QBasicMutex_TryLock2(QBasicMutex* self) { return self->try_lock(); } -void QBasicMutex_Delete(QBasicMutex* self) { - delete self; +void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMutex* QMutex_new() { - return new QMutex(); +void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex) { + QMutex* ret = new QMutex(); + *outptr_QMutex = ret; + *outptr_QBasicMutex = static_cast(ret); } bool QMutex_TryLock(QMutex* self) { @@ -41,12 +48,17 @@ bool QMutex_TryLockWithTimeout(QMutex* self, int timeout) { return self->tryLock(static_cast(timeout)); } -void QMutex_Delete(QMutex* self) { - delete self; +void QMutex_Delete(QMutex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRecursiveMutex* QRecursiveMutex_new() { - return new QRecursiveMutex(); +void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex) { + QRecursiveMutex* ret = new QRecursiveMutex(); + *outptr_QRecursiveMutex = ret; } void QRecursiveMutex_Lock(QRecursiveMutex* self) { @@ -69,7 +81,11 @@ bool QRecursiveMutex_TryLock1(QRecursiveMutex* self, int timeout) { return self->tryLock(static_cast(timeout)); } -void QRecursiveMutex_Delete(QRecursiveMutex* self) { - delete self; +void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qmutex.go b/qt6/gen_qmutex.go index a6527c7e..78af6413 100644 --- a/qt6/gen_qmutex.go +++ b/qt6/gen_qmutex.go @@ -14,7 +14,8 @@ import ( ) type QBasicMutex struct { - h *C.QBasicMutex + h *C.QBasicMutex + isSubclass bool } func (this *QBasicMutex) cPointer() *C.QBasicMutex { @@ -31,6 +32,7 @@ func (this *QBasicMutex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQBasicMutex constructs the type using only CGO pointers. func newQBasicMutex(h *C.QBasicMutex) *QBasicMutex { if h == nil { return nil @@ -38,14 +40,23 @@ func newQBasicMutex(h *C.QBasicMutex) *QBasicMutex { return &QBasicMutex{h: h} } +// UnsafeNewQBasicMutex constructs the type using only unsafe pointers. func UnsafeNewQBasicMutex(h unsafe.Pointer) *QBasicMutex { - return newQBasicMutex((*C.QBasicMutex)(h)) + if h == nil { + return nil + } + + return &QBasicMutex{h: (*C.QBasicMutex)(h)} } // NewQBasicMutex constructs a new QBasicMutex object. func NewQBasicMutex() *QBasicMutex { - ret := C.QBasicMutex_new() - return newQBasicMutex(ret) + var outptr_QBasicMutex *C.QBasicMutex = nil + + C.QBasicMutex_new(&outptr_QBasicMutex) + ret := newQBasicMutex(outptr_QBasicMutex) + ret.isSubclass = true + return ret } func (this *QBasicMutex) Lock() { @@ -66,7 +77,7 @@ func (this *QBasicMutex) TryLock2() bool { // Delete this object from C++ memory. func (this *QBasicMutex) Delete() { - C.QBasicMutex_Delete(this.h) + C.QBasicMutex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -79,7 +90,8 @@ func (this *QBasicMutex) GoGC() { } type QMutex struct { - h *C.QMutex + h *C.QMutex + isSubclass bool *QBasicMutex } @@ -97,21 +109,34 @@ func (this *QMutex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMutex(h *C.QMutex) *QMutex { +// newQMutex constructs the type using only CGO pointers. +func newQMutex(h *C.QMutex, h_QBasicMutex *C.QBasicMutex) *QMutex { if h == nil { return nil } - return &QMutex{h: h, QBasicMutex: UnsafeNewQBasicMutex(unsafe.Pointer(h))} + return &QMutex{h: h, + QBasicMutex: newQBasicMutex(h_QBasicMutex)} } -func UnsafeNewQMutex(h unsafe.Pointer) *QMutex { - return newQMutex((*C.QMutex)(h)) +// UnsafeNewQMutex constructs the type using only unsafe pointers. +func UnsafeNewQMutex(h unsafe.Pointer, h_QBasicMutex unsafe.Pointer) *QMutex { + if h == nil { + return nil + } + + return &QMutex{h: (*C.QMutex)(h), + QBasicMutex: UnsafeNewQBasicMutex(h_QBasicMutex)} } // NewQMutex constructs a new QMutex object. func NewQMutex() *QMutex { - ret := C.QMutex_new() - return newQMutex(ret) + var outptr_QMutex *C.QMutex = nil + var outptr_QBasicMutex *C.QBasicMutex = nil + + C.QMutex_new(&outptr_QMutex, &outptr_QBasicMutex) + ret := newQMutex(outptr_QMutex, outptr_QBasicMutex) + ret.isSubclass = true + return ret } func (this *QMutex) TryLock() bool { @@ -124,7 +149,7 @@ func (this *QMutex) TryLockWithTimeout(timeout int) bool { // Delete this object from C++ memory. func (this *QMutex) Delete() { - C.QMutex_Delete(this.h) + C.QMutex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -137,7 +162,8 @@ func (this *QMutex) GoGC() { } type QRecursiveMutex struct { - h *C.QRecursiveMutex + h *C.QRecursiveMutex + isSubclass bool } func (this *QRecursiveMutex) cPointer() *C.QRecursiveMutex { @@ -154,6 +180,7 @@ func (this *QRecursiveMutex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRecursiveMutex constructs the type using only CGO pointers. func newQRecursiveMutex(h *C.QRecursiveMutex) *QRecursiveMutex { if h == nil { return nil @@ -161,14 +188,23 @@ func newQRecursiveMutex(h *C.QRecursiveMutex) *QRecursiveMutex { return &QRecursiveMutex{h: h} } +// UnsafeNewQRecursiveMutex constructs the type using only unsafe pointers. func UnsafeNewQRecursiveMutex(h unsafe.Pointer) *QRecursiveMutex { - return newQRecursiveMutex((*C.QRecursiveMutex)(h)) + if h == nil { + return nil + } + + return &QRecursiveMutex{h: (*C.QRecursiveMutex)(h)} } // NewQRecursiveMutex constructs a new QRecursiveMutex object. func NewQRecursiveMutex() *QRecursiveMutex { - ret := C.QRecursiveMutex_new() - return newQRecursiveMutex(ret) + var outptr_QRecursiveMutex *C.QRecursiveMutex = nil + + C.QRecursiveMutex_new(&outptr_QRecursiveMutex) + ret := newQRecursiveMutex(outptr_QRecursiveMutex) + ret.isSubclass = true + return ret } func (this *QRecursiveMutex) Lock() { @@ -193,7 +229,7 @@ func (this *QRecursiveMutex) TryLock1(timeout int) bool { // Delete this object from C++ memory. func (this *QRecursiveMutex) Delete() { - C.QRecursiveMutex_Delete(this.h) + C.QRecursiveMutex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qmutex.h b/qt6/gen_qmutex.h index 9709623b..c3973af2 100644 --- a/qt6/gen_qmutex.h +++ b/qt6/gen_qmutex.h @@ -24,25 +24,25 @@ typedef struct QMutex QMutex; typedef struct QRecursiveMutex QRecursiveMutex; #endif -QBasicMutex* QBasicMutex_new(); +void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex); void QBasicMutex_Lock(QBasicMutex* self); void QBasicMutex_Unlock(QBasicMutex* self); bool QBasicMutex_TryLock(QBasicMutex* self); bool QBasicMutex_TryLock2(QBasicMutex* self); -void QBasicMutex_Delete(QBasicMutex* self); +void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass); -QMutex* QMutex_new(); +void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex); bool QMutex_TryLock(QMutex* self); bool QMutex_TryLockWithTimeout(QMutex* self, int timeout); -void QMutex_Delete(QMutex* self); +void QMutex_Delete(QMutex* self, bool isSubclass); -QRecursiveMutex* QRecursiveMutex_new(); +void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex); void QRecursiveMutex_Lock(QRecursiveMutex* self); bool QRecursiveMutex_TryLock(QRecursiveMutex* self); void QRecursiveMutex_Unlock(QRecursiveMutex* self); bool QRecursiveMutex_TryLock2(QRecursiveMutex* self); bool QRecursiveMutex_TryLock1(QRecursiveMutex* self, int timeout); -void QRecursiveMutex_Delete(QRecursiveMutex* self); +void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qnamespace.cpp b/qt6/gen_qnamespace.cpp index b79e4f23..380d30e5 100644 --- a/qt6/gen_qnamespace.cpp +++ b/qt6/gen_qnamespace.cpp @@ -5,48 +5,65 @@ #include "gen_qnamespace.h" #include "_cgo_export.h" -Disambiguated_t* Disambiguated_t_new() { - return new Qt::Disambiguated_t(); +void Disambiguated_t_new(Disambiguated_t** outptr_Qt__Disambiguated_t) { + Qt::Disambiguated_t* ret = new Qt::Disambiguated_t(); + *outptr_Disambiguated_t = ret; } -Disambiguated_t* Disambiguated_t_new2(Disambiguated_t* param1) { - return new Qt::Disambiguated_t(*param1); +void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Qt__Disambiguated_t) { + Qt::Disambiguated_t* ret = new Qt::Disambiguated_t(*param1); + *outptr_Disambiguated_t = ret; } -void Disambiguated_t_Delete(Disambiguated_t* self) { - delete self; +void Disambiguated_t_Delete(Disambiguated_t* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QInternal_Delete(QInternal* self) { - delete self; +void QInternal_Delete(QInternal* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QKeyCombination* QKeyCombination_new() { - return new QKeyCombination(); +void QKeyCombination_new(QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(); + *outptr_QKeyCombination = ret; } -QKeyCombination* QKeyCombination_new2(int modifiers) { - return new QKeyCombination(static_cast(modifiers)); +void QKeyCombination_new2(int modifiers, QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(static_cast(modifiers)); + *outptr_QKeyCombination = ret; } -QKeyCombination* QKeyCombination_new3(int modifiers) { - return new QKeyCombination(static_cast(modifiers)); +void QKeyCombination_new3(int modifiers, QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(static_cast(modifiers)); + *outptr_QKeyCombination = ret; } -QKeyCombination* QKeyCombination_new4(QKeyCombination* param1) { - return new QKeyCombination(*param1); +void QKeyCombination_new4(QKeyCombination* param1, QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(*param1); + *outptr_QKeyCombination = ret; } -QKeyCombination* QKeyCombination_new5(int key) { - return new QKeyCombination(static_cast(key)); +void QKeyCombination_new5(int key, QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(static_cast(key)); + *outptr_QKeyCombination = ret; } -QKeyCombination* QKeyCombination_new6(int modifiers, int key) { - return new QKeyCombination(static_cast(modifiers), static_cast(key)); +void QKeyCombination_new6(int modifiers, int key, QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(static_cast(modifiers), static_cast(key)); + *outptr_QKeyCombination = ret; } -QKeyCombination* QKeyCombination_new7(int modifiers, int key) { - return new QKeyCombination(static_cast(modifiers), static_cast(key)); +void QKeyCombination_new7(int modifiers, int key, QKeyCombination** outptr_QKeyCombination) { + QKeyCombination* ret = new QKeyCombination(static_cast(modifiers), static_cast(key)); + *outptr_QKeyCombination = ret; } int QKeyCombination_KeyboardModifiers(const QKeyCombination* self) { @@ -67,7 +84,11 @@ int QKeyCombination_ToCombined(const QKeyCombination* self) { return self->toCombined(); } -void QKeyCombination_Delete(QKeyCombination* self) { - delete self; +void QKeyCombination_Delete(QKeyCombination* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qnamespace.go b/qt6/gen_qnamespace.go index 50c70706..31093853 100644 --- a/qt6/gen_qnamespace.go +++ b/qt6/gen_qnamespace.go @@ -1674,7 +1674,8 @@ const ( ) type Disambiguated_t struct { - h *C.Disambiguated_t + h *C.Disambiguated_t + isSubclass bool } func (this *Disambiguated_t) cPointer() *C.Disambiguated_t { @@ -1691,6 +1692,7 @@ func (this *Disambiguated_t) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newDisambiguated_t constructs the type using only CGO pointers. func newDisambiguated_t(h *C.Disambiguated_t) *Disambiguated_t { if h == nil { return nil @@ -1698,25 +1700,38 @@ func newDisambiguated_t(h *C.Disambiguated_t) *Disambiguated_t { return &Disambiguated_t{h: h} } +// UnsafeNewDisambiguated_t constructs the type using only unsafe pointers. func UnsafeNewDisambiguated_t(h unsafe.Pointer) *Disambiguated_t { - return newDisambiguated_t((*C.Disambiguated_t)(h)) + if h == nil { + return nil + } + + return &Disambiguated_t{h: (*C.Disambiguated_t)(h)} } // NewDisambiguated_t constructs a new Qt::Disambiguated_t object. func NewDisambiguated_t() *Disambiguated_t { - ret := C.Disambiguated_t_new() - return newDisambiguated_t(ret) + var outptr_Disambiguated_t *C.Disambiguated_t = nil + + C.Disambiguated_t_new(&outptr_Disambiguated_t) + ret := newDisambiguated_t(outptr_Disambiguated_t) + ret.isSubclass = true + return ret } // NewDisambiguated_t2 constructs a new Qt::Disambiguated_t object. func NewDisambiguated_t2(param1 *Disambiguated_t) *Disambiguated_t { - ret := C.Disambiguated_t_new2(param1.cPointer()) - return newDisambiguated_t(ret) + var outptr_Disambiguated_t *C.Disambiguated_t = nil + + C.Disambiguated_t_new2(param1.cPointer(), &outptr_Disambiguated_t) + ret := newDisambiguated_t(outptr_Disambiguated_t) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *Disambiguated_t) Delete() { - C.Disambiguated_t_Delete(this.h) + C.Disambiguated_t_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1729,7 +1744,8 @@ func (this *Disambiguated_t) GoGC() { } type QInternal struct { - h *C.QInternal + h *C.QInternal + isSubclass bool } func (this *QInternal) cPointer() *C.QInternal { @@ -1746,6 +1762,7 @@ func (this *QInternal) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQInternal constructs the type using only CGO pointers. func newQInternal(h *C.QInternal) *QInternal { if h == nil { return nil @@ -1753,13 +1770,18 @@ func newQInternal(h *C.QInternal) *QInternal { return &QInternal{h: h} } +// UnsafeNewQInternal constructs the type using only unsafe pointers. func UnsafeNewQInternal(h unsafe.Pointer) *QInternal { - return newQInternal((*C.QInternal)(h)) + if h == nil { + return nil + } + + return &QInternal{h: (*C.QInternal)(h)} } // Delete this object from C++ memory. func (this *QInternal) Delete() { - C.QInternal_Delete(this.h) + C.QInternal_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1772,7 +1794,8 @@ func (this *QInternal) GoGC() { } type QKeyCombination struct { - h *C.QKeyCombination + h *C.QKeyCombination + isSubclass bool } func (this *QKeyCombination) cPointer() *C.QKeyCombination { @@ -1789,6 +1812,7 @@ func (this *QKeyCombination) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQKeyCombination constructs the type using only CGO pointers. func newQKeyCombination(h *C.QKeyCombination) *QKeyCombination { if h == nil { return nil @@ -1796,50 +1820,83 @@ func newQKeyCombination(h *C.QKeyCombination) *QKeyCombination { return &QKeyCombination{h: h} } +// UnsafeNewQKeyCombination constructs the type using only unsafe pointers. func UnsafeNewQKeyCombination(h unsafe.Pointer) *QKeyCombination { - return newQKeyCombination((*C.QKeyCombination)(h)) + if h == nil { + return nil + } + + return &QKeyCombination{h: (*C.QKeyCombination)(h)} } // NewQKeyCombination constructs a new QKeyCombination object. func NewQKeyCombination() *QKeyCombination { - ret := C.QKeyCombination_new() - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new(&outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } // NewQKeyCombination2 constructs a new QKeyCombination object. func NewQKeyCombination2(modifiers Modifier) *QKeyCombination { - ret := C.QKeyCombination_new2((C.int)(modifiers)) - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new2((C.int)(modifiers), &outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } // NewQKeyCombination3 constructs a new QKeyCombination object. func NewQKeyCombination3(modifiers KeyboardModifier) *QKeyCombination { - ret := C.QKeyCombination_new3((C.int)(modifiers)) - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new3((C.int)(modifiers), &outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } // NewQKeyCombination4 constructs a new QKeyCombination object. func NewQKeyCombination4(param1 *QKeyCombination) *QKeyCombination { - ret := C.QKeyCombination_new4(param1.cPointer()) - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new4(param1.cPointer(), &outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } // NewQKeyCombination5 constructs a new QKeyCombination object. func NewQKeyCombination5(key Key) *QKeyCombination { - ret := C.QKeyCombination_new5((C.int)(key)) - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new5((C.int)(key), &outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } // NewQKeyCombination6 constructs a new QKeyCombination object. func NewQKeyCombination6(modifiers Modifier, key Key) *QKeyCombination { - ret := C.QKeyCombination_new6((C.int)(modifiers), (C.int)(key)) - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new6((C.int)(modifiers), (C.int)(key), &outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } // NewQKeyCombination7 constructs a new QKeyCombination object. func NewQKeyCombination7(modifiers KeyboardModifier, key Key) *QKeyCombination { - ret := C.QKeyCombination_new7((C.int)(modifiers), (C.int)(key)) - return newQKeyCombination(ret) + var outptr_QKeyCombination *C.QKeyCombination = nil + + C.QKeyCombination_new7((C.int)(modifiers), (C.int)(key), &outptr_QKeyCombination) + ret := newQKeyCombination(outptr_QKeyCombination) + ret.isSubclass = true + return ret } func (this *QKeyCombination) KeyboardModifiers() KeyboardModifier { @@ -1863,7 +1920,7 @@ func (this *QKeyCombination) ToCombined() int { // Delete this object from C++ memory. func (this *QKeyCombination) Delete() { - C.QKeyCombination_Delete(this.h) + C.QKeyCombination_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qnamespace.h b/qt6/gen_qnamespace.h index 40f5dd71..87253b56 100644 --- a/qt6/gen_qnamespace.h +++ b/qt6/gen_qnamespace.h @@ -28,24 +28,24 @@ typedef struct QKeyCombination QKeyCombination; typedef struct Disambiguated_t Disambiguated_t; #endif -Disambiguated_t* Disambiguated_t_new(); -Disambiguated_t* Disambiguated_t_new2(Disambiguated_t* param1); -void Disambiguated_t_Delete(Disambiguated_t* self); - -void QInternal_Delete(QInternal* self); - -QKeyCombination* QKeyCombination_new(); -QKeyCombination* QKeyCombination_new2(int modifiers); -QKeyCombination* QKeyCombination_new3(int modifiers); -QKeyCombination* QKeyCombination_new4(QKeyCombination* param1); -QKeyCombination* QKeyCombination_new5(int key); -QKeyCombination* QKeyCombination_new6(int modifiers, int key); -QKeyCombination* QKeyCombination_new7(int modifiers, int key); +void Disambiguated_t_new(Disambiguated_t** outptr_Qt__Disambiguated_t); +void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Qt__Disambiguated_t); +void Disambiguated_t_Delete(Disambiguated_t* self, bool isSubclass); + +void QInternal_Delete(QInternal* self, bool isSubclass); + +void QKeyCombination_new(QKeyCombination** outptr_QKeyCombination); +void QKeyCombination_new2(int modifiers, QKeyCombination** outptr_QKeyCombination); +void QKeyCombination_new3(int modifiers, QKeyCombination** outptr_QKeyCombination); +void QKeyCombination_new4(QKeyCombination* param1, QKeyCombination** outptr_QKeyCombination); +void QKeyCombination_new5(int key, QKeyCombination** outptr_QKeyCombination); +void QKeyCombination_new6(int modifiers, int key, QKeyCombination** outptr_QKeyCombination); +void QKeyCombination_new7(int modifiers, int key, QKeyCombination** outptr_QKeyCombination); int QKeyCombination_KeyboardModifiers(const QKeyCombination* self); int QKeyCombination_Key(const QKeyCombination* self); QKeyCombination* QKeyCombination_FromCombined(int combined); int QKeyCombination_ToCombined(const QKeyCombination* self); -void QKeyCombination_Delete(QKeyCombination* self); +void QKeyCombination_Delete(QKeyCombination* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qobject.cpp b/qt6/gen_qobject.cpp index af3bc920..2c77c94f 100644 --- a/qt6/gen_qobject.cpp +++ b/qt6/gen_qobject.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -13,6 +14,7 @@ #include #include #include +#include #include #include #include "gen_qobject.h" @@ -22,16 +24,203 @@ QMetaObject* QObjectData_DynamicMetaObject(const QObjectData* self) { return self->dynamicMetaObject(); } -void QObjectData_Delete(QObjectData* self) { - delete self; +void QObjectData_Delete(QObjectData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QObject* QObject_new() { - return new QObject(); +class MiqtVirtualQObject : public virtual QObject { +public: + + MiqtVirtualQObject(): QObject() {}; + MiqtVirtualQObject(QObject* parent): QObject(parent) {}; + + virtual ~MiqtVirtualQObject() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QObject::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QObject_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QObject::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QObject::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QObject_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QObject::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QObject::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QObject_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QObject::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QObject::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QObject_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QObject::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QObject::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QObject_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QObject::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QObject::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObject_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QObject::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QObject::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObject_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QObject::disconnectNotify(*signal); + + } + +}; + +void QObject_new(QObject** outptr_QObject) { + MiqtVirtualQObject* ret = new MiqtVirtualQObject(); + *outptr_QObject = ret; } -QObject* QObject_new2(QObject* parent) { - return new QObject(parent); +void QObject_new2(QObject* parent, QObject** outptr_QObject) { + MiqtVirtualQObject* ret = new MiqtVirtualQObject(parent); + *outptr_QObject = ret; } QMetaObject* QObject_MetaObject(const QObject* self) { @@ -200,7 +389,7 @@ void QObject_Destroyed(QObject* self) { } void QObject_connect_Destroyed(QObject* self, intptr_t slot) { - QObject::connect(self, static_cast(&QObject::destroyed), self, [=]() { + MiqtVirtualQObject::connect(self, static_cast(&QObject::destroyed), self, [=]() { miqt_exec_callback_QObject_Destroyed(slot); }); } @@ -256,22 +445,84 @@ void QObject_Destroyed1(QObject* self, QObject* param1) { } void QObject_connect_Destroyed1(QObject* self, intptr_t slot) { - QObject::connect(self, static_cast(&QObject::destroyed), self, [=](QObject* param1) { + MiqtVirtualQObject::connect(self, static_cast(&QObject::destroyed), self, [=](QObject* param1) { QObject* sigval1 = param1; miqt_exec_callback_QObject_Destroyed1(slot, sigval1); }); } -void QObject_Delete(QObject* self) { - delete self; +void QObject_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__Event = slot; +} + +bool QObject_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQObject*)(self) )->virtualbase_Event(event); +} + +void QObject_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__EventFilter = slot; +} + +bool QObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQObject*)(self) )->virtualbase_EventFilter(watched, event); } -QSignalBlocker* QSignalBlocker_new(QObject* o) { - return new QSignalBlocker(o); +void QObject_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__TimerEvent = slot; } -QSignalBlocker* QSignalBlocker_new2(QObject* o) { - return new QSignalBlocker(*o); +void QObject_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_TimerEvent(event); +} + +void QObject_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__ChildEvent = slot; +} + +void QObject_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_ChildEvent(event); +} + +void QObject_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__CustomEvent = slot; +} + +void QObject_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_CustomEvent(event); +} + +void QObject_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__ConnectNotify = slot; +} + +void QObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QObject_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObject*)(self) )->handle__DisconnectNotify = slot; +} + +void QObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObject*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QObject_Delete(QObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { + QSignalBlocker* ret = new QSignalBlocker(o); + *outptr_QSignalBlocker = ret; +} + +void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { + QSignalBlocker* ret = new QSignalBlocker(*o); + *outptr_QSignalBlocker = ret; } void QSignalBlocker_Reblock(QSignalBlocker* self) { @@ -282,7 +533,11 @@ void QSignalBlocker_Unblock(QSignalBlocker* self) { self->unblock(); } -void QSignalBlocker_Delete(QSignalBlocker* self) { - delete self; +void QSignalBlocker_Delete(QSignalBlocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qobject.go b/qt6/gen_qobject.go index 3bbd0ccc..81eebba9 100644 --- a/qt6/gen_qobject.go +++ b/qt6/gen_qobject.go @@ -21,7 +21,8 @@ const ( ) type QObjectData struct { - h *C.QObjectData + h *C.QObjectData + isSubclass bool } func (this *QObjectData) cPointer() *C.QObjectData { @@ -38,6 +39,7 @@ func (this *QObjectData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQObjectData constructs the type using only CGO pointers. func newQObjectData(h *C.QObjectData) *QObjectData { if h == nil { return nil @@ -45,8 +47,13 @@ func newQObjectData(h *C.QObjectData) *QObjectData { return &QObjectData{h: h} } +// UnsafeNewQObjectData constructs the type using only unsafe pointers. func UnsafeNewQObjectData(h unsafe.Pointer) *QObjectData { - return newQObjectData((*C.QObjectData)(h)) + if h == nil { + return nil + } + + return &QObjectData{h: (*C.QObjectData)(h)} } func (this *QObjectData) DynamicMetaObject() *QMetaObject { @@ -55,7 +62,7 @@ func (this *QObjectData) DynamicMetaObject() *QMetaObject { // Delete this object from C++ memory. func (this *QObjectData) Delete() { - C.QObjectData_Delete(this.h) + C.QObjectData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -68,7 +75,8 @@ func (this *QObjectData) GoGC() { } type QObject struct { - h *C.QObject + h *C.QObject + isSubclass bool } func (this *QObject) cPointer() *C.QObject { @@ -85,6 +93,7 @@ func (this *QObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQObject constructs the type using only CGO pointers. func newQObject(h *C.QObject) *QObject { if h == nil { return nil @@ -92,20 +101,33 @@ func newQObject(h *C.QObject) *QObject { return &QObject{h: h} } +// UnsafeNewQObject constructs the type using only unsafe pointers. func UnsafeNewQObject(h unsafe.Pointer) *QObject { - return newQObject((*C.QObject)(h)) + if h == nil { + return nil + } + + return &QObject{h: (*C.QObject)(h)} } // NewQObject constructs a new QObject object. func NewQObject() *QObject { - ret := C.QObject_new() - return newQObject(ret) + var outptr_QObject *C.QObject = nil + + C.QObject_new(&outptr_QObject) + ret := newQObject(outptr_QObject) + ret.isSubclass = true + return ret } // NewQObject2 constructs a new QObject object. func NewQObject2(parent *QObject) *QObject { - ret := C.QObject_new2(parent.cPointer()) - return newQObject(ret) + var outptr_QObject *C.QObject = nil + + C.QObject_new2(parent.cPointer(), &outptr_QObject) + ret := newQObject(outptr_QObject) + ret.isSubclass = true + return ret } func (this *QObject) MetaObject() *QMetaObject { @@ -167,7 +189,7 @@ func (this *QObject) BlockSignals(b bool) bool { } func (this *QObject) Thread() *QThread { - return UnsafeNewQThread(unsafe.Pointer(C.QObject_Thread(this.h))) + return UnsafeNewQThread(unsafe.Pointer(C.QObject_Thread(this.h)), nil) } func (this *QObject) MoveToThread(thread *QThread) { @@ -369,9 +391,175 @@ func miqt_exec_callback_QObject_Destroyed1(cb C.intptr_t, param1 *C.QObject) { gofunc(slotval1) } +func (this *QObject) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QObject_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QObject) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QObject_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_Event +func miqt_exec_callback_QObject_Event(self *C.QObject, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObject{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QObject) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QObject_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QObject) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QObject_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_EventFilter +func miqt_exec_callback_QObject_EventFilter(self *C.QObject, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObject{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QObject) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QObject_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObject) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QObject_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_TimerEvent +func miqt_exec_callback_QObject_TimerEvent(self *C.QObject, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QObject{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QObject) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QObject_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObject) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QObject_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_ChildEvent +func miqt_exec_callback_QObject_ChildEvent(self *C.QObject, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QObject{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QObject) callVirtualBase_CustomEvent(event *QEvent) { + + C.QObject_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObject) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QObject_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_CustomEvent +func miqt_exec_callback_QObject_CustomEvent(self *C.QObject, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QObject{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QObject) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QObject_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObject) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObject_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_ConnectNotify +func miqt_exec_callback_QObject_ConnectNotify(self *C.QObject, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObject{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QObject) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QObject_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObject) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObject_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObject_DisconnectNotify +func miqt_exec_callback_QObject_DisconnectNotify(self *C.QObject, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObject{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QObject) Delete() { - C.QObject_Delete(this.h) + C.QObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -384,7 +572,8 @@ func (this *QObject) GoGC() { } type QSignalBlocker struct { - h *C.QSignalBlocker + h *C.QSignalBlocker + isSubclass bool } func (this *QSignalBlocker) cPointer() *C.QSignalBlocker { @@ -401,6 +590,7 @@ func (this *QSignalBlocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSignalBlocker constructs the type using only CGO pointers. func newQSignalBlocker(h *C.QSignalBlocker) *QSignalBlocker { if h == nil { return nil @@ -408,20 +598,33 @@ func newQSignalBlocker(h *C.QSignalBlocker) *QSignalBlocker { return &QSignalBlocker{h: h} } +// UnsafeNewQSignalBlocker constructs the type using only unsafe pointers. func UnsafeNewQSignalBlocker(h unsafe.Pointer) *QSignalBlocker { - return newQSignalBlocker((*C.QSignalBlocker)(h)) + if h == nil { + return nil + } + + return &QSignalBlocker{h: (*C.QSignalBlocker)(h)} } // NewQSignalBlocker constructs a new QSignalBlocker object. func NewQSignalBlocker(o *QObject) *QSignalBlocker { - ret := C.QSignalBlocker_new(o.cPointer()) - return newQSignalBlocker(ret) + var outptr_QSignalBlocker *C.QSignalBlocker = nil + + C.QSignalBlocker_new(o.cPointer(), &outptr_QSignalBlocker) + ret := newQSignalBlocker(outptr_QSignalBlocker) + ret.isSubclass = true + return ret } // NewQSignalBlocker2 constructs a new QSignalBlocker object. func NewQSignalBlocker2(o *QObject) *QSignalBlocker { - ret := C.QSignalBlocker_new2(o.cPointer()) - return newQSignalBlocker(ret) + var outptr_QSignalBlocker *C.QSignalBlocker = nil + + C.QSignalBlocker_new2(o.cPointer(), &outptr_QSignalBlocker) + ret := newQSignalBlocker(outptr_QSignalBlocker) + ret.isSubclass = true + return ret } func (this *QSignalBlocker) Reblock() { @@ -434,7 +637,7 @@ func (this *QSignalBlocker) Unblock() { // Delete this object from C++ memory. func (this *QSignalBlocker) Delete() { - C.QSignalBlocker_Delete(this.h) + C.QSignalBlocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qobject.h b/qt6/gen_qobject.h index 1341e288..c9df1a59 100644 --- a/qt6/gen_qobject.h +++ b/qt6/gen_qobject.h @@ -18,6 +18,7 @@ extern "C" { class QAnyStringView; class QBindingStorage; class QByteArray; +class QChildEvent; class QEvent; class QMetaMethod; class QMetaObject; @@ -30,11 +31,13 @@ class QObject; class QObjectData; class QSignalBlocker; class QThread; +class QTimerEvent; class QVariant; #else typedef struct QAnyStringView QAnyStringView; typedef struct QBindingStorage QBindingStorage; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; @@ -43,14 +46,15 @@ typedef struct QObject QObject; typedef struct QObjectData QObjectData; typedef struct QSignalBlocker QSignalBlocker; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif QMetaObject* QObjectData_DynamicMetaObject(const QObjectData* self); -void QObjectData_Delete(QObjectData* self); +void QObjectData_Delete(QObjectData* self, bool isSubclass); -QObject* QObject_new(); -QObject* QObject_new2(QObject* parent); +void QObject_new(QObject** outptr_QObject); +void QObject_new2(QObject* parent, QObject** outptr_QObject); QMetaObject* QObject_MetaObject(const QObject* self); void* QObject_Metacast(QObject* self, const char* param1); struct miqt_string QObject_Tr(const char* s); @@ -87,6 +91,11 @@ void QObject_connect_Destroyed(QObject* self, intptr_t slot); QObject* QObject_Parent(const QObject* self); bool QObject_Inherits(const QObject* self, const char* classname); void QObject_DeleteLater(QObject* self); +void QObject_TimerEvent(QObject* self, QTimerEvent* event); +void QObject_ChildEvent(QObject* self, QChildEvent* event); +void QObject_CustomEvent(QObject* self, QEvent* event); +void QObject_ConnectNotify(QObject* self, QMetaMethod* signal); +void QObject_DisconnectNotify(QObject* self, QMetaMethod* signal); struct miqt_string QObject_Tr2(const char* s, const char* c); struct miqt_string QObject_Tr3(const char* s, const char* c, int n); int QObject_StartTimer2(QObject* self, int interval, int timerType); @@ -94,13 +103,27 @@ QMetaObject__Connection* QObject_Connect5(QObject* sender, QMetaMethod* signal, QMetaObject__Connection* QObject_Connect4(const QObject* self, QObject* sender, const char* signal, const char* member, int typeVal); void QObject_Destroyed1(QObject* self, QObject* param1); void QObject_connect_Destroyed1(QObject* self, intptr_t slot); -void QObject_Delete(QObject* self); +void QObject_override_virtual_Event(void* self, intptr_t slot); +bool QObject_virtualbase_Event(void* self, QEvent* event); +void QObject_override_virtual_EventFilter(void* self, intptr_t slot); +bool QObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QObject_override_virtual_TimerEvent(void* self, intptr_t slot); +void QObject_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QObject_override_virtual_ChildEvent(void* self, intptr_t slot); +void QObject_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QObject_override_virtual_CustomEvent(void* self, intptr_t slot); +void QObject_virtualbase_CustomEvent(void* self, QEvent* event); +void QObject_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QObject_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QObject_Delete(QObject* self, bool isSubclass); -QSignalBlocker* QSignalBlocker_new(QObject* o); -QSignalBlocker* QSignalBlocker_new2(QObject* o); +void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker); +void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker); void QSignalBlocker_Reblock(QSignalBlocker* self); void QSignalBlocker_Unblock(QSignalBlocker* self); -void QSignalBlocker_Delete(QSignalBlocker* self); +void QSignalBlocker_Delete(QSignalBlocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qobjectcleanuphandler.cpp b/qt6/gen_qobjectcleanuphandler.cpp index 1ecf1a55..3d4e6e21 100644 --- a/qt6/gen_qobjectcleanuphandler.cpp +++ b/qt6/gen_qobjectcleanuphandler.cpp @@ -1,15 +1,201 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qobjectcleanuphandler.h" #include "_cgo_export.h" -QObjectCleanupHandler* QObjectCleanupHandler_new() { - return new QObjectCleanupHandler(); +class MiqtVirtualQObjectCleanupHandler : public virtual QObjectCleanupHandler { +public: + + MiqtVirtualQObjectCleanupHandler(): QObjectCleanupHandler() {}; + + virtual ~MiqtVirtualQObjectCleanupHandler() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QObjectCleanupHandler::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QObjectCleanupHandler_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QObjectCleanupHandler::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QObjectCleanupHandler::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QObjectCleanupHandler_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QObjectCleanupHandler::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QObjectCleanupHandler::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QObjectCleanupHandler_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QObjectCleanupHandler::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QObjectCleanupHandler::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QObjectCleanupHandler_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QObjectCleanupHandler::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QObjectCleanupHandler::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QObjectCleanupHandler_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QObjectCleanupHandler::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QObjectCleanupHandler::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObjectCleanupHandler_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QObjectCleanupHandler::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QObjectCleanupHandler::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QObjectCleanupHandler_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QObjectCleanupHandler::disconnectNotify(*signal); + + } + +}; + +void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject) { + MiqtVirtualQObjectCleanupHandler* ret = new MiqtVirtualQObjectCleanupHandler(); + *outptr_QObjectCleanupHandler = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self) { @@ -69,7 +255,67 @@ struct miqt_string QObjectCleanupHandler_Tr3(const char* s, const char* c, int n return _ms; } -void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self) { - delete self; +void QObjectCleanupHandler_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__Event = slot; +} + +bool QObjectCleanupHandler_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_Event(event); +} + +void QObjectCleanupHandler_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__EventFilter = slot; +} + +bool QObjectCleanupHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QObjectCleanupHandler_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__TimerEvent = slot; +} + +void QObjectCleanupHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_TimerEvent(event); +} + +void QObjectCleanupHandler_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__ChildEvent = slot; +} + +void QObjectCleanupHandler_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_ChildEvent(event); +} + +void QObjectCleanupHandler_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__CustomEvent = slot; +} + +void QObjectCleanupHandler_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_CustomEvent(event); +} + +void QObjectCleanupHandler_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__ConnectNotify = slot; +} + +void QObjectCleanupHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QObjectCleanupHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QObjectCleanupHandler*)(self) )->handle__DisconnectNotify = slot; +} + +void QObjectCleanupHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQObjectCleanupHandler*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qobjectcleanuphandler.go b/qt6/gen_qobjectcleanuphandler.go index 065df29f..058c8ce2 100644 --- a/qt6/gen_qobjectcleanuphandler.go +++ b/qt6/gen_qobjectcleanuphandler.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QObjectCleanupHandler struct { - h *C.QObjectCleanupHandler + h *C.QObjectCleanupHandler + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QObjectCleanupHandler) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQObjectCleanupHandler(h *C.QObjectCleanupHandler) *QObjectCleanupHandler { +// newQObjectCleanupHandler constructs the type using only CGO pointers. +func newQObjectCleanupHandler(h *C.QObjectCleanupHandler, h_QObject *C.QObject) *QObjectCleanupHandler { if h == nil { return nil } - return &QObjectCleanupHandler{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QObjectCleanupHandler{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer) *QObjectCleanupHandler { - return newQObjectCleanupHandler((*C.QObjectCleanupHandler)(h)) +// UnsafeNewQObjectCleanupHandler constructs the type using only unsafe pointers. +func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QObjectCleanupHandler { + if h == nil { + return nil + } + + return &QObjectCleanupHandler{h: (*C.QObjectCleanupHandler)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQObjectCleanupHandler constructs a new QObjectCleanupHandler object. func NewQObjectCleanupHandler() *QObjectCleanupHandler { - ret := C.QObjectCleanupHandler_new() - return newQObjectCleanupHandler(ret) + var outptr_QObjectCleanupHandler *C.QObjectCleanupHandler = nil + var outptr_QObject *C.QObject = nil + + C.QObjectCleanupHandler_new(&outptr_QObjectCleanupHandler, &outptr_QObject) + ret := newQObjectCleanupHandler(outptr_QObjectCleanupHandler, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QObjectCleanupHandler) MetaObject() *QMetaObject { @@ -106,9 +121,175 @@ func QObjectCleanupHandler_Tr3(s string, c string, n int) string { return _ret } +func (this *QObjectCleanupHandler) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QObjectCleanupHandler_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QObjectCleanupHandler) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QObjectCleanupHandler_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_Event +func miqt_exec_callback_QObjectCleanupHandler_Event(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QObjectCleanupHandler_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QObjectCleanupHandler) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QObjectCleanupHandler_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_EventFilter +func miqt_exec_callback_QObjectCleanupHandler_EventFilter(self *C.QObjectCleanupHandler, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QObjectCleanupHandler_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObjectCleanupHandler) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QObjectCleanupHandler_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_TimerEvent +func miqt_exec_callback_QObjectCleanupHandler_TimerEvent(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QObjectCleanupHandler_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObjectCleanupHandler) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QObjectCleanupHandler_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_ChildEvent +func miqt_exec_callback_QObjectCleanupHandler_ChildEvent(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_CustomEvent(event *QEvent) { + + C.QObjectCleanupHandler_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QObjectCleanupHandler) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QObjectCleanupHandler_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_CustomEvent +func miqt_exec_callback_QObjectCleanupHandler_CustomEvent(self *C.QObjectCleanupHandler, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QObjectCleanupHandler_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObjectCleanupHandler) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObjectCleanupHandler_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_ConnectNotify +func miqt_exec_callback_QObjectCleanupHandler_ConnectNotify(self *C.QObjectCleanupHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QObjectCleanupHandler) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QObjectCleanupHandler_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QObjectCleanupHandler) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QObjectCleanupHandler_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QObjectCleanupHandler_DisconnectNotify +func miqt_exec_callback_QObjectCleanupHandler_DisconnectNotify(self *C.QObjectCleanupHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QObjectCleanupHandler) Delete() { - C.QObjectCleanupHandler_Delete(this.h) + C.QObjectCleanupHandler_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qobjectcleanuphandler.h b/qt6/gen_qobjectcleanuphandler.h index 02c5b4d7..0d39ab34 100644 --- a/qt6/gen_qobjectcleanuphandler.h +++ b/qt6/gen_qobjectcleanuphandler.h @@ -15,16 +15,24 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QObjectCleanupHandler; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QObjectCleanupHandler QObjectCleanupHandler; +typedef struct QTimerEvent QTimerEvent; #endif -QObjectCleanupHandler* QObjectCleanupHandler_new(); +void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject); QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self); void* QObjectCleanupHandler_Metacast(QObjectCleanupHandler* self, const char* param1); struct miqt_string QObjectCleanupHandler_Tr(const char* s); @@ -34,7 +42,21 @@ bool QObjectCleanupHandler_IsEmpty(const QObjectCleanupHandler* self); void QObjectCleanupHandler_Clear(QObjectCleanupHandler* self); struct miqt_string QObjectCleanupHandler_Tr2(const char* s, const char* c); struct miqt_string QObjectCleanupHandler_Tr3(const char* s, const char* c, int n); -void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self); +void QObjectCleanupHandler_override_virtual_Event(void* self, intptr_t slot); +bool QObjectCleanupHandler_virtualbase_Event(void* self, QEvent* event); +void QObjectCleanupHandler_override_virtual_EventFilter(void* self, intptr_t slot); +bool QObjectCleanupHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QObjectCleanupHandler_override_virtual_TimerEvent(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QObjectCleanupHandler_override_virtual_ChildEvent(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QObjectCleanupHandler_override_virtual_CustomEvent(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_CustomEvent(void* self, QEvent* event); +void QObjectCleanupHandler_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QObjectCleanupHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QObjectCleanupHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qobjectdefs.cpp b/qt6/gen_qobjectdefs.cpp index 432bc08b..13b96562 100644 --- a/qt6/gen_qobjectdefs.cpp +++ b/qt6/gen_qobjectdefs.cpp @@ -19,24 +19,32 @@ #include "gen_qobjectdefs.h" #include "_cgo_export.h" -void QMethodRawArguments_Delete(QMethodRawArguments* self) { - delete self; +void QMethodRawArguments_Delete(QMethodRawArguments* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGenericArgument* QGenericArgument_new() { - return new QGenericArgument(); +void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(); + *outptr_QGenericArgument = ret; } -QGenericArgument* QGenericArgument_new2(QGenericArgument* param1) { - return new QGenericArgument(*param1); +void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(*param1); + *outptr_QGenericArgument = ret; } -QGenericArgument* QGenericArgument_new3(const char* aName) { - return new QGenericArgument(aName); +void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(aName); + *outptr_QGenericArgument = ret; } -QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData) { - return new QGenericArgument(aName, aData); +void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument) { + QGenericArgument* ret = new QGenericArgument(aName, aData); + *outptr_QGenericArgument = ret; } void* QGenericArgument_Data(const QGenericArgument* self) { @@ -47,36 +55,54 @@ const char* QGenericArgument_Name(const QGenericArgument* self) { return (const char*) self->name(); } -void QGenericArgument_Delete(QGenericArgument* self) { - delete self; +void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QGenericReturnArgument* QGenericReturnArgument_new() { - return new QGenericReturnArgument(); +void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1) { - return new QGenericReturnArgument(*param1); +void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(*param1); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName) { - return new QGenericReturnArgument(aName); +void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(aName); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData) { - return new QGenericReturnArgument(aName, aData); +void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { + QGenericReturnArgument* ret = new QGenericReturnArgument(aName, aData); + *outptr_QGenericReturnArgument = ret; + *outptr_QGenericArgument = static_cast(ret); } -void QGenericReturnArgument_Delete(QGenericReturnArgument* self) { - delete self; +void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject* QMetaObject_new() { - return new QMetaObject(); +void QMetaObject_new(QMetaObject** outptr_QMetaObject) { + QMetaObject* ret = new QMetaObject(); + *outptr_QMetaObject = ret; } -QMetaObject* QMetaObject_new2(QMetaObject* param1) { - return new QMetaObject(*param1); +void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject) { + QMetaObject* ret = new QMetaObject(*param1); + *outptr_QMetaObject = ret; } const char* QMetaObject_ClassName(const QMetaObject* self) { @@ -483,16 +509,22 @@ QObject* QMetaObject_NewInstance10(const QMetaObject* self, QGenericArgument* va return self->newInstance(*val0, *val1, *val2, *val3, *val4, *val5, *val6, *val7, *val8, *val9); } -void QMetaObject_Delete(QMetaObject* self) { - delete self; +void QMetaObject_Delete(QMetaObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject__Connection* QMetaObject__Connection_new() { - return new QMetaObject::Connection(); +void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection) { + QMetaObject::Connection* ret = new QMetaObject::Connection(); + *outptr_QMetaObject__Connection = ret; } -QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other) { - return new QMetaObject::Connection(*other); +void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection) { + QMetaObject::Connection* ret = new QMetaObject::Connection(*other); + *outptr_QMetaObject__Connection = ret; } void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other) { @@ -503,20 +535,27 @@ void QMetaObject__Connection_Swap(QMetaObject__Connection* self, QMetaObject__Co self->swap(*other); } -void QMetaObject__Connection_Delete(QMetaObject__Connection* self) { - delete self; +void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject__SuperData* QMetaObject__SuperData_new() { - return new QMetaObject::SuperData(); +void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData) { + QMetaObject::SuperData* ret = new QMetaObject::SuperData(); + *outptr_QMetaObject__SuperData = ret; } -QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo) { - return new QMetaObject::SuperData(mo); +void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { + QMetaObject::SuperData* ret = new QMetaObject::SuperData(mo); + *outptr_QMetaObject__SuperData = ret; } -QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1) { - return new QMetaObject::SuperData(*param1); +void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { + QMetaObject::SuperData* ret = new QMetaObject::SuperData(*param1); + *outptr_QMetaObject__SuperData = ret; } QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self) { @@ -527,23 +566,33 @@ void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaOb self->operator=(*param1); } -void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self) { - delete self; +void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMetaObject__Data* QMetaObject__Data_new() { - return new QMetaObject::Data(); +void QMetaObject__Data_new(QMetaObject__Data** outptr_QMetaObject__Data) { + QMetaObject::Data* ret = new QMetaObject::Data(); + *outptr_QMetaObject__Data = ret; } -QMetaObject__Data* QMetaObject__Data_new2(QMetaObject__Data* param1) { - return new QMetaObject::Data(*param1); +void QMetaObject__Data_new2(QMetaObject__Data* param1, QMetaObject__Data** outptr_QMetaObject__Data) { + QMetaObject::Data* ret = new QMetaObject::Data(*param1); + *outptr_QMetaObject__Data = ret; } void QMetaObject__Data_OperatorAssign(QMetaObject__Data* self, QMetaObject__Data* param1) { self->operator=(*param1); } -void QMetaObject__Data_Delete(QMetaObject__Data* self) { - delete self; +void QMetaObject__Data_Delete(QMetaObject__Data* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qobjectdefs.go b/qt6/gen_qobjectdefs.go index 89580fdd..c14e81bb 100644 --- a/qt6/gen_qobjectdefs.go +++ b/qt6/gen_qobjectdefs.go @@ -29,7 +29,8 @@ const ( ) type QMethodRawArguments struct { - h *C.QMethodRawArguments + h *C.QMethodRawArguments + isSubclass bool } func (this *QMethodRawArguments) cPointer() *C.QMethodRawArguments { @@ -46,6 +47,7 @@ func (this *QMethodRawArguments) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMethodRawArguments constructs the type using only CGO pointers. func newQMethodRawArguments(h *C.QMethodRawArguments) *QMethodRawArguments { if h == nil { return nil @@ -53,13 +55,18 @@ func newQMethodRawArguments(h *C.QMethodRawArguments) *QMethodRawArguments { return &QMethodRawArguments{h: h} } +// UnsafeNewQMethodRawArguments constructs the type using only unsafe pointers. func UnsafeNewQMethodRawArguments(h unsafe.Pointer) *QMethodRawArguments { - return newQMethodRawArguments((*C.QMethodRawArguments)(h)) + if h == nil { + return nil + } + + return &QMethodRawArguments{h: (*C.QMethodRawArguments)(h)} } // Delete this object from C++ memory. func (this *QMethodRawArguments) Delete() { - C.QMethodRawArguments_Delete(this.h) + C.QMethodRawArguments_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -72,7 +79,8 @@ func (this *QMethodRawArguments) GoGC() { } type QGenericArgument struct { - h *C.QGenericArgument + h *C.QGenericArgument + isSubclass bool } func (this *QGenericArgument) cPointer() *C.QGenericArgument { @@ -89,6 +97,7 @@ func (this *QGenericArgument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQGenericArgument constructs the type using only CGO pointers. func newQGenericArgument(h *C.QGenericArgument) *QGenericArgument { if h == nil { return nil @@ -96,36 +105,57 @@ func newQGenericArgument(h *C.QGenericArgument) *QGenericArgument { return &QGenericArgument{h: h} } +// UnsafeNewQGenericArgument constructs the type using only unsafe pointers. func UnsafeNewQGenericArgument(h unsafe.Pointer) *QGenericArgument { - return newQGenericArgument((*C.QGenericArgument)(h)) + if h == nil { + return nil + } + + return &QGenericArgument{h: (*C.QGenericArgument)(h)} } // NewQGenericArgument constructs a new QGenericArgument object. func NewQGenericArgument() *QGenericArgument { - ret := C.QGenericArgument_new() - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new(&outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericArgument2 constructs a new QGenericArgument object. func NewQGenericArgument2(param1 *QGenericArgument) *QGenericArgument { - ret := C.QGenericArgument_new2(param1.cPointer()) - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new2(param1.cPointer(), &outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericArgument3 constructs a new QGenericArgument object. func NewQGenericArgument3(aName string) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericArgument_new3(aName_Cstring) - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new3(aName_Cstring, &outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericArgument4 constructs a new QGenericArgument object. func NewQGenericArgument4(aName string, aData unsafe.Pointer) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericArgument_new4(aName_Cstring, aData) - return newQGenericArgument(ret) + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericArgument_new4(aName_Cstring, aData, &outptr_QGenericArgument) + ret := newQGenericArgument(outptr_QGenericArgument) + ret.isSubclass = true + return ret } func (this *QGenericArgument) Data() unsafe.Pointer { @@ -139,7 +169,7 @@ func (this *QGenericArgument) Name() string { // Delete this object from C++ memory. func (this *QGenericArgument) Delete() { - C.QGenericArgument_Delete(this.h) + C.QGenericArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -152,7 +182,8 @@ func (this *QGenericArgument) GoGC() { } type QGenericReturnArgument struct { - h *C.QGenericReturnArgument + h *C.QGenericReturnArgument + isSubclass bool *QGenericArgument } @@ -170,48 +201,76 @@ func (this *QGenericReturnArgument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGenericReturnArgument(h *C.QGenericReturnArgument) *QGenericReturnArgument { +// newQGenericReturnArgument constructs the type using only CGO pointers. +func newQGenericReturnArgument(h *C.QGenericReturnArgument, h_QGenericArgument *C.QGenericArgument) *QGenericReturnArgument { if h == nil { return nil } - return &QGenericReturnArgument{h: h, QGenericArgument: UnsafeNewQGenericArgument(unsafe.Pointer(h))} + return &QGenericReturnArgument{h: h, + QGenericArgument: newQGenericArgument(h_QGenericArgument)} } -func UnsafeNewQGenericReturnArgument(h unsafe.Pointer) *QGenericReturnArgument { - return newQGenericReturnArgument((*C.QGenericReturnArgument)(h)) +// UnsafeNewQGenericReturnArgument constructs the type using only unsafe pointers. +func UnsafeNewQGenericReturnArgument(h unsafe.Pointer, h_QGenericArgument unsafe.Pointer) *QGenericReturnArgument { + if h == nil { + return nil + } + + return &QGenericReturnArgument{h: (*C.QGenericReturnArgument)(h), + QGenericArgument: UnsafeNewQGenericArgument(h_QGenericArgument)} } // NewQGenericReturnArgument constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument() *QGenericReturnArgument { - ret := C.QGenericReturnArgument_new() - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new(&outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericReturnArgument2 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument2(param1 *QGenericReturnArgument) *QGenericReturnArgument { - ret := C.QGenericReturnArgument_new2(param1.cPointer()) - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new2(param1.cPointer(), &outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericReturnArgument3 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument3(aName string) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericReturnArgument_new3(aName_Cstring) - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new3(aName_Cstring, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // NewQGenericReturnArgument4 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument4(aName string, aData unsafe.Pointer) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - ret := C.QGenericReturnArgument_new4(aName_Cstring, aData) - return newQGenericReturnArgument(ret) + var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil + var outptr_QGenericArgument *C.QGenericArgument = nil + + C.QGenericReturnArgument_new4(aName_Cstring, aData, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) + ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QGenericReturnArgument) Delete() { - C.QGenericReturnArgument_Delete(this.h) + C.QGenericReturnArgument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -224,7 +283,8 @@ func (this *QGenericReturnArgument) GoGC() { } type QMetaObject struct { - h *C.QMetaObject + h *C.QMetaObject + isSubclass bool } func (this *QMetaObject) cPointer() *C.QMetaObject { @@ -241,6 +301,7 @@ func (this *QMetaObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject constructs the type using only CGO pointers. func newQMetaObject(h *C.QMetaObject) *QMetaObject { if h == nil { return nil @@ -248,20 +309,33 @@ func newQMetaObject(h *C.QMetaObject) *QMetaObject { return &QMetaObject{h: h} } +// UnsafeNewQMetaObject constructs the type using only unsafe pointers. func UnsafeNewQMetaObject(h unsafe.Pointer) *QMetaObject { - return newQMetaObject((*C.QMetaObject)(h)) + if h == nil { + return nil + } + + return &QMetaObject{h: (*C.QMetaObject)(h)} } // NewQMetaObject constructs a new QMetaObject object. func NewQMetaObject() *QMetaObject { - ret := C.QMetaObject_new() - return newQMetaObject(ret) + var outptr_QMetaObject *C.QMetaObject = nil + + C.QMetaObject_new(&outptr_QMetaObject) + ret := newQMetaObject(outptr_QMetaObject) + ret.isSubclass = true + return ret } // NewQMetaObject2 constructs a new QMetaObject object. func NewQMetaObject2(param1 *QMetaObject) *QMetaObject { - ret := C.QMetaObject_new2(param1.cPointer()) - return newQMetaObject(ret) + var outptr_QMetaObject *C.QMetaObject = nil + + C.QMetaObject_new2(param1.cPointer(), &outptr_QMetaObject) + ret := newQMetaObject(outptr_QMetaObject) + ret.isSubclass = true + return ret } func (this *QMetaObject) ClassName() string { @@ -807,7 +881,7 @@ func (this *QMetaObject) NewInstance10(val0 QGenericArgument, val1 QGenericArgum // Delete this object from C++ memory. func (this *QMetaObject) Delete() { - C.QMetaObject_Delete(this.h) + C.QMetaObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -820,7 +894,8 @@ func (this *QMetaObject) GoGC() { } type QMetaObject__Connection struct { - h *C.QMetaObject__Connection + h *C.QMetaObject__Connection + isSubclass bool } func (this *QMetaObject__Connection) cPointer() *C.QMetaObject__Connection { @@ -837,6 +912,7 @@ func (this *QMetaObject__Connection) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject__Connection constructs the type using only CGO pointers. func newQMetaObject__Connection(h *C.QMetaObject__Connection) *QMetaObject__Connection { if h == nil { return nil @@ -844,20 +920,33 @@ func newQMetaObject__Connection(h *C.QMetaObject__Connection) *QMetaObject__Conn return &QMetaObject__Connection{h: h} } +// UnsafeNewQMetaObject__Connection constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__Connection(h unsafe.Pointer) *QMetaObject__Connection { - return newQMetaObject__Connection((*C.QMetaObject__Connection)(h)) + if h == nil { + return nil + } + + return &QMetaObject__Connection{h: (*C.QMetaObject__Connection)(h)} } // NewQMetaObject__Connection constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection() *QMetaObject__Connection { - ret := C.QMetaObject__Connection_new() - return newQMetaObject__Connection(ret) + var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil + + C.QMetaObject__Connection_new(&outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret.isSubclass = true + return ret } // NewQMetaObject__Connection2 constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection2(other *QMetaObject__Connection) *QMetaObject__Connection { - ret := C.QMetaObject__Connection_new2(other.cPointer()) - return newQMetaObject__Connection(ret) + var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil + + C.QMetaObject__Connection_new2(other.cPointer(), &outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret.isSubclass = true + return ret } func (this *QMetaObject__Connection) OperatorAssign(other *QMetaObject__Connection) { @@ -870,7 +959,7 @@ func (this *QMetaObject__Connection) Swap(other *QMetaObject__Connection) { // Delete this object from C++ memory. func (this *QMetaObject__Connection) Delete() { - C.QMetaObject__Connection_Delete(this.h) + C.QMetaObject__Connection_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -883,7 +972,8 @@ func (this *QMetaObject__Connection) GoGC() { } type QMetaObject__SuperData struct { - h *C.QMetaObject__SuperData + h *C.QMetaObject__SuperData + isSubclass bool } func (this *QMetaObject__SuperData) cPointer() *C.QMetaObject__SuperData { @@ -900,6 +990,7 @@ func (this *QMetaObject__SuperData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject__SuperData constructs the type using only CGO pointers. func newQMetaObject__SuperData(h *C.QMetaObject__SuperData) *QMetaObject__SuperData { if h == nil { return nil @@ -907,26 +998,43 @@ func newQMetaObject__SuperData(h *C.QMetaObject__SuperData) *QMetaObject__SuperD return &QMetaObject__SuperData{h: h} } +// UnsafeNewQMetaObject__SuperData constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__SuperData(h unsafe.Pointer) *QMetaObject__SuperData { - return newQMetaObject__SuperData((*C.QMetaObject__SuperData)(h)) + if h == nil { + return nil + } + + return &QMetaObject__SuperData{h: (*C.QMetaObject__SuperData)(h)} } // NewQMetaObject__SuperData constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData() *QMetaObject__SuperData { - ret := C.QMetaObject__SuperData_new() - return newQMetaObject__SuperData(ret) + var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil + + C.QMetaObject__SuperData_new(&outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret.isSubclass = true + return ret } // NewQMetaObject__SuperData2 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData2(mo *QMetaObject) *QMetaObject__SuperData { - ret := C.QMetaObject__SuperData_new2(mo.cPointer()) - return newQMetaObject__SuperData(ret) + var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil + + C.QMetaObject__SuperData_new2(mo.cPointer(), &outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret.isSubclass = true + return ret } // NewQMetaObject__SuperData3 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData3(param1 *QMetaObject__SuperData) *QMetaObject__SuperData { - ret := C.QMetaObject__SuperData_new3(param1.cPointer()) - return newQMetaObject__SuperData(ret) + var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil + + C.QMetaObject__SuperData_new3(param1.cPointer(), &outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret.isSubclass = true + return ret } func (this *QMetaObject__SuperData) OperatorMinusGreater() *QMetaObject { @@ -939,7 +1047,7 @@ func (this *QMetaObject__SuperData) OperatorAssign(param1 *QMetaObject__SuperDat // Delete this object from C++ memory. func (this *QMetaObject__SuperData) Delete() { - C.QMetaObject__SuperData_Delete(this.h) + C.QMetaObject__SuperData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -952,7 +1060,8 @@ func (this *QMetaObject__SuperData) GoGC() { } type QMetaObject__Data struct { - h *C.QMetaObject__Data + h *C.QMetaObject__Data + isSubclass bool } func (this *QMetaObject__Data) cPointer() *C.QMetaObject__Data { @@ -969,6 +1078,7 @@ func (this *QMetaObject__Data) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMetaObject__Data constructs the type using only CGO pointers. func newQMetaObject__Data(h *C.QMetaObject__Data) *QMetaObject__Data { if h == nil { return nil @@ -976,20 +1086,33 @@ func newQMetaObject__Data(h *C.QMetaObject__Data) *QMetaObject__Data { return &QMetaObject__Data{h: h} } +// UnsafeNewQMetaObject__Data constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__Data(h unsafe.Pointer) *QMetaObject__Data { - return newQMetaObject__Data((*C.QMetaObject__Data)(h)) + if h == nil { + return nil + } + + return &QMetaObject__Data{h: (*C.QMetaObject__Data)(h)} } // NewQMetaObject__Data constructs a new QMetaObject::Data object. func NewQMetaObject__Data() *QMetaObject__Data { - ret := C.QMetaObject__Data_new() - return newQMetaObject__Data(ret) + var outptr_QMetaObject__Data *C.QMetaObject__Data = nil + + C.QMetaObject__Data_new(&outptr_QMetaObject__Data) + ret := newQMetaObject__Data(outptr_QMetaObject__Data) + ret.isSubclass = true + return ret } // NewQMetaObject__Data2 constructs a new QMetaObject::Data object. func NewQMetaObject__Data2(param1 *QMetaObject__Data) *QMetaObject__Data { - ret := C.QMetaObject__Data_new2(param1.cPointer()) - return newQMetaObject__Data(ret) + var outptr_QMetaObject__Data *C.QMetaObject__Data = nil + + C.QMetaObject__Data_new2(param1.cPointer(), &outptr_QMetaObject__Data) + ret := newQMetaObject__Data(outptr_QMetaObject__Data) + ret.isSubclass = true + return ret } func (this *QMetaObject__Data) OperatorAssign(param1 *QMetaObject__Data) { @@ -998,7 +1121,7 @@ func (this *QMetaObject__Data) OperatorAssign(param1 *QMetaObject__Data) { // Delete this object from C++ memory. func (this *QMetaObject__Data) Delete() { - C.QMetaObject__Data_Delete(this.h) + C.QMetaObject__Data_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qobjectdefs.h b/qt6/gen_qobjectdefs.h index 95f1b082..5dc1ba9a 100644 --- a/qt6/gen_qobjectdefs.h +++ b/qt6/gen_qobjectdefs.h @@ -58,24 +58,24 @@ typedef struct QMethodRawArguments QMethodRawArguments; typedef struct QObject QObject; #endif -void QMethodRawArguments_Delete(QMethodRawArguments* self); +void QMethodRawArguments_Delete(QMethodRawArguments* self, bool isSubclass); -QGenericArgument* QGenericArgument_new(); -QGenericArgument* QGenericArgument_new2(QGenericArgument* param1); -QGenericArgument* QGenericArgument_new3(const char* aName); -QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData); +void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument); +void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument); +void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument); +void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument); void* QGenericArgument_Data(const QGenericArgument* self); const char* QGenericArgument_Name(const QGenericArgument* self); -void QGenericArgument_Delete(QGenericArgument* self); +void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass); -QGenericReturnArgument* QGenericReturnArgument_new(); -QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1); -QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName); -QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData); -void QGenericReturnArgument_Delete(QGenericReturnArgument* self); +void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass); -QMetaObject* QMetaObject_new(); -QMetaObject* QMetaObject_new2(QMetaObject* param1); +void QMetaObject_new(QMetaObject** outptr_QMetaObject); +void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject); const char* QMetaObject_ClassName(const QMetaObject* self); QMetaObject* QMetaObject_SuperClass(const QMetaObject* self); bool QMetaObject_Inherits(const QMetaObject* self, QMetaObject* metaObject); @@ -171,25 +171,25 @@ QObject* QMetaObject_NewInstance7(const QMetaObject* self, QGenericArgument* val QObject* QMetaObject_NewInstance8(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7); QObject* QMetaObject_NewInstance9(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8); QObject* QMetaObject_NewInstance10(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); -void QMetaObject_Delete(QMetaObject* self); +void QMetaObject_Delete(QMetaObject* self, bool isSubclass); -QMetaObject__Connection* QMetaObject__Connection_new(); -QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other); +void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection); +void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection); void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other); void QMetaObject__Connection_Swap(QMetaObject__Connection* self, QMetaObject__Connection* other); -void QMetaObject__Connection_Delete(QMetaObject__Connection* self); +void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubclass); -QMetaObject__SuperData* QMetaObject__SuperData_new(); -QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo); -QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1); +void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData); +void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData); +void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData); QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self); void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1); -void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self); +void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass); -QMetaObject__Data* QMetaObject__Data_new(); -QMetaObject__Data* QMetaObject__Data_new2(QMetaObject__Data* param1); +void QMetaObject__Data_new(QMetaObject__Data** outptr_QMetaObject__Data); +void QMetaObject__Data_new2(QMetaObject__Data* param1, QMetaObject__Data** outptr_QMetaObject__Data); void QMetaObject__Data_OperatorAssign(QMetaObject__Data* self, QMetaObject__Data* param1); -void QMetaObject__Data_Delete(QMetaObject__Data* self); +void QMetaObject__Data_Delete(QMetaObject__Data* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qoffscreensurface.cpp b/qt6/gen_qoffscreensurface.cpp index ea3197d5..7f0e79e7 100644 --- a/qt6/gen_qoffscreensurface.cpp +++ b/qt6/gen_qoffscreensurface.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,21 +9,281 @@ #include #include #include +#include #include +#include #include #include "gen_qoffscreensurface.h" #include "_cgo_export.h" -QOffscreenSurface* QOffscreenSurface_new() { - return new QOffscreenSurface(); +class MiqtVirtualQOffscreenSurface : public virtual QOffscreenSurface { +public: + + MiqtVirtualQOffscreenSurface(): QOffscreenSurface() {}; + MiqtVirtualQOffscreenSurface(QScreen* screen): QOffscreenSurface(screen) {}; + MiqtVirtualQOffscreenSurface(QScreen* screen, QObject* parent): QOffscreenSurface(screen, parent) {}; + + virtual ~MiqtVirtualQOffscreenSurface() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SurfaceType = 0; + + // Subclass to allow providing a Go implementation + virtual QSurface::SurfaceType surfaceType() const override { + if (handle__SurfaceType == 0) { + return QOffscreenSurface::surfaceType(); + } + + + int callback_return_value = miqt_exec_callback_QOffscreenSurface_SurfaceType(const_cast(this), handle__SurfaceType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SurfaceType() const { + + QSurface::SurfaceType _ret = QOffscreenSurface::surfaceType(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Format = 0; + + // Subclass to allow providing a Go implementation + virtual QSurfaceFormat format() const override { + if (handle__Format == 0) { + return QOffscreenSurface::format(); + } + + + QSurfaceFormat* callback_return_value = miqt_exec_callback_QOffscreenSurface_Format(const_cast(this), handle__Format); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSurfaceFormat* virtualbase_Format() const { + + return new QSurfaceFormat(QOffscreenSurface::format()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual QSize size() const override { + if (handle__Size == 0) { + return QOffscreenSurface::size(); + } + + + QSize* callback_return_value = miqt_exec_callback_QOffscreenSurface_Size(const_cast(this), handle__Size); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Size() const { + + return new QSize(QOffscreenSurface::size()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QOffscreenSurface::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QOffscreenSurface_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QOffscreenSurface::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QOffscreenSurface::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QOffscreenSurface_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QOffscreenSurface::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QOffscreenSurface::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QOffscreenSurface_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QOffscreenSurface::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QOffscreenSurface::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QOffscreenSurface_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QOffscreenSurface::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QOffscreenSurface::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QOffscreenSurface_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QOffscreenSurface::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QOffscreenSurface::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QOffscreenSurface_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QOffscreenSurface::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QOffscreenSurface::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QOffscreenSurface_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QOffscreenSurface::disconnectNotify(*signal); + + } + +}; + +void QOffscreenSurface_new(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(); + *outptr_QOffscreenSurface = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QOffscreenSurface* QOffscreenSurface_new2(QScreen* screen) { - return new QOffscreenSurface(screen); +void QOffscreenSurface_new2(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen); + *outptr_QOffscreenSurface = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen, QObject* parent) { - return new QOffscreenSurface(screen, parent); +void QOffscreenSurface_new3(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen, parent); + *outptr_QOffscreenSurface = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self) { @@ -88,7 +351,7 @@ void QOffscreenSurface_ScreenChanged(QOffscreenSurface* self, QScreen* screen) { } void QOffscreenSurface_connect_ScreenChanged(QOffscreenSurface* self, intptr_t slot) { - QOffscreenSurface::connect(self, static_cast(&QOffscreenSurface::screenChanged), self, [=](QScreen* screen) { + MiqtVirtualQOffscreenSurface::connect(self, static_cast(&QOffscreenSurface::screenChanged), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QOffscreenSurface_ScreenChanged(slot, sigval1); }); @@ -116,7 +379,91 @@ struct miqt_string QOffscreenSurface_Tr3(const char* s, const char* c, int n) { return _ms; } -void QOffscreenSurface_Delete(QOffscreenSurface* self) { - delete self; +void QOffscreenSurface_override_virtual_SurfaceType(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__SurfaceType = slot; +} + +int QOffscreenSurface_virtualbase_SurfaceType(const void* self) { + return ( (const MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_SurfaceType(); +} + +void QOffscreenSurface_override_virtual_Format(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__Format = slot; +} + +QSurfaceFormat* QOffscreenSurface_virtualbase_Format(const void* self) { + return ( (const MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_Format(); +} + +void QOffscreenSurface_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__Size = slot; +} + +QSize* QOffscreenSurface_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_Size(); +} + +void QOffscreenSurface_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__Event = slot; +} + +bool QOffscreenSurface_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_Event(event); +} + +void QOffscreenSurface_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__EventFilter = slot; +} + +bool QOffscreenSurface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QOffscreenSurface_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__TimerEvent = slot; +} + +void QOffscreenSurface_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_TimerEvent(event); +} + +void QOffscreenSurface_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__ChildEvent = slot; +} + +void QOffscreenSurface_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_ChildEvent(event); +} + +void QOffscreenSurface_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__CustomEvent = slot; +} + +void QOffscreenSurface_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_CustomEvent(event); +} + +void QOffscreenSurface_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__ConnectNotify = slot; +} + +void QOffscreenSurface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QOffscreenSurface_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QOffscreenSurface*)(self) )->handle__DisconnectNotify = slot; +} + +void QOffscreenSurface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQOffscreenSurface*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QOffscreenSurface_Delete(QOffscreenSurface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qoffscreensurface.go b/qt6/gen_qoffscreensurface.go index d91ec51f..e15700ff 100644 --- a/qt6/gen_qoffscreensurface.go +++ b/qt6/gen_qoffscreensurface.go @@ -15,7 +15,8 @@ import ( ) type QOffscreenSurface struct { - h *C.QOffscreenSurface + h *C.QOffscreenSurface + isSubclass bool *QObject *QSurface } @@ -34,33 +35,61 @@ func (this *QOffscreenSurface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQOffscreenSurface(h *C.QOffscreenSurface) *QOffscreenSurface { +// newQOffscreenSurface constructs the type using only CGO pointers. +func newQOffscreenSurface(h *C.QOffscreenSurface, h_QObject *C.QObject, h_QSurface *C.QSurface) *QOffscreenSurface { if h == nil { return nil } - return &QOffscreenSurface{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QSurface: UnsafeNewQSurface(unsafe.Pointer(h))} + return &QOffscreenSurface{h: h, + QObject: newQObject(h_QObject), + QSurface: newQSurface(h_QSurface)} } -func UnsafeNewQOffscreenSurface(h unsafe.Pointer) *QOffscreenSurface { - return newQOffscreenSurface((*C.QOffscreenSurface)(h)) +// UnsafeNewQOffscreenSurface constructs the type using only unsafe pointers. +func UnsafeNewQOffscreenSurface(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QOffscreenSurface { + if h == nil { + return nil + } + + return &QOffscreenSurface{h: (*C.QOffscreenSurface)(h), + QObject: UnsafeNewQObject(h_QObject), + QSurface: UnsafeNewQSurface(h_QSurface)} } // NewQOffscreenSurface constructs a new QOffscreenSurface object. func NewQOffscreenSurface() *QOffscreenSurface { - ret := C.QOffscreenSurface_new() - return newQOffscreenSurface(ret) + var outptr_QOffscreenSurface *C.QOffscreenSurface = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QOffscreenSurface_new(&outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) + ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQOffscreenSurface2 constructs a new QOffscreenSurface object. func NewQOffscreenSurface2(screen *QScreen) *QOffscreenSurface { - ret := C.QOffscreenSurface_new2(screen.cPointer()) - return newQOffscreenSurface(ret) + var outptr_QOffscreenSurface *C.QOffscreenSurface = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QOffscreenSurface_new2(screen.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) + ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQOffscreenSurface3 constructs a new QOffscreenSurface object. func NewQOffscreenSurface3(screen *QScreen, parent *QObject) *QOffscreenSurface { - ret := C.QOffscreenSurface_new3(screen.cPointer(), parent.cPointer()) - return newQOffscreenSurface(ret) + var outptr_QOffscreenSurface *C.QOffscreenSurface = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QOffscreenSurface_new3(screen.cPointer(), parent.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) + ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } func (this *QOffscreenSurface) MetaObject() *QMetaObject { @@ -124,7 +153,7 @@ func (this *QOffscreenSurface) Size() *QSize { } func (this *QOffscreenSurface) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QOffscreenSurface_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QOffscreenSurface_Screen(this.h)), nil) } func (this *QOffscreenSurface) SetScreen(screen *QScreen) { @@ -146,7 +175,7 @@ func miqt_exec_callback_QOffscreenSurface_ScreenChanged(cb C.intptr_t, screen *C } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -173,9 +202,247 @@ func QOffscreenSurface_Tr3(s string, c string, n int) string { return _ret } +func (this *QOffscreenSurface) callVirtualBase_SurfaceType() QSurface__SurfaceType { + + return (QSurface__SurfaceType)(C.QOffscreenSurface_virtualbase_SurfaceType(unsafe.Pointer(this.h))) + +} +func (this *QOffscreenSurface) OnSurfaceType(slot func(super func() QSurface__SurfaceType) QSurface__SurfaceType) { + C.QOffscreenSurface_override_virtual_SurfaceType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_SurfaceType +func miqt_exec_callback_QOffscreenSurface_SurfaceType(self *C.QOffscreenSurface, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSurface__SurfaceType) QSurface__SurfaceType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_SurfaceType) + + return (C.int)(virtualReturn) + +} + +func (this *QOffscreenSurface) callVirtualBase_Format() *QSurfaceFormat { + + _ret := C.QOffscreenSurface_virtualbase_Format(unsafe.Pointer(this.h)) + _goptr := newQSurfaceFormat(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QOffscreenSurface) OnFormat(slot func(super func() *QSurfaceFormat) *QSurfaceFormat) { + C.QOffscreenSurface_override_virtual_Format(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_Format +func miqt_exec_callback_QOffscreenSurface_Format(self *C.QOffscreenSurface, cb C.intptr_t) *C.QSurfaceFormat { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSurfaceFormat) *QSurfaceFormat) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_Format) + + return virtualReturn.cPointer() + +} + +func (this *QOffscreenSurface) callVirtualBase_Size() *QSize { + + _ret := C.QOffscreenSurface_virtualbase_Size(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QOffscreenSurface) OnSize(slot func(super func() *QSize) *QSize) { + C.QOffscreenSurface_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_Size +func miqt_exec_callback_QOffscreenSurface_Size(self *C.QOffscreenSurface, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_Size) + + return virtualReturn.cPointer() + +} + +func (this *QOffscreenSurface) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QOffscreenSurface_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QOffscreenSurface) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QOffscreenSurface_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_Event +func miqt_exec_callback_QOffscreenSurface_Event(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QOffscreenSurface) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QOffscreenSurface_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QOffscreenSurface) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QOffscreenSurface_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_EventFilter +func miqt_exec_callback_QOffscreenSurface_EventFilter(self *C.QOffscreenSurface, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QOffscreenSurface{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QOffscreenSurface) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QOffscreenSurface_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QOffscreenSurface) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QOffscreenSurface_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_TimerEvent +func miqt_exec_callback_QOffscreenSurface_TimerEvent(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QOffscreenSurface_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QOffscreenSurface) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QOffscreenSurface_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_ChildEvent +func miqt_exec_callback_QOffscreenSurface_ChildEvent(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_CustomEvent(event *QEvent) { + + C.QOffscreenSurface_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QOffscreenSurface) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QOffscreenSurface_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_CustomEvent +func miqt_exec_callback_QOffscreenSurface_CustomEvent(self *C.QOffscreenSurface, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QOffscreenSurface_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QOffscreenSurface) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QOffscreenSurface_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_ConnectNotify +func miqt_exec_callback_QOffscreenSurface_ConnectNotify(self *C.QOffscreenSurface, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QOffscreenSurface) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QOffscreenSurface_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QOffscreenSurface) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QOffscreenSurface_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QOffscreenSurface_DisconnectNotify +func miqt_exec_callback_QOffscreenSurface_DisconnectNotify(self *C.QOffscreenSurface, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QOffscreenSurface{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QOffscreenSurface) Delete() { - C.QOffscreenSurface_Delete(this.h) + C.QOffscreenSurface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qoffscreensurface.h b/qt6/gen_qoffscreensurface.h index 4d2f6324..c7032f1b 100644 --- a/qt6/gen_qoffscreensurface.h +++ b/qt6/gen_qoffscreensurface.h @@ -15,24 +15,34 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QOffscreenSurface; class QScreen; class QSize; +class QSurface; class QSurfaceFormat; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QOffscreenSurface QOffscreenSurface; typedef struct QScreen QScreen; typedef struct QSize QSize; +typedef struct QSurface QSurface; typedef struct QSurfaceFormat QSurfaceFormat; +typedef struct QTimerEvent QTimerEvent; #endif -QOffscreenSurface* QOffscreenSurface_new(); -QOffscreenSurface* QOffscreenSurface_new2(QScreen* screen); -QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen, QObject* parent); +void QOffscreenSurface_new(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QOffscreenSurface_new2(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QOffscreenSurface_new3(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self); void* QOffscreenSurface_Metacast(QOffscreenSurface* self, const char* param1); struct miqt_string QOffscreenSurface_Tr(const char* s); @@ -50,7 +60,27 @@ void QOffscreenSurface_ScreenChanged(QOffscreenSurface* self, QScreen* screen); void QOffscreenSurface_connect_ScreenChanged(QOffscreenSurface* self, intptr_t slot); struct miqt_string QOffscreenSurface_Tr2(const char* s, const char* c); struct miqt_string QOffscreenSurface_Tr3(const char* s, const char* c, int n); -void QOffscreenSurface_Delete(QOffscreenSurface* self); +void QOffscreenSurface_override_virtual_SurfaceType(void* self, intptr_t slot); +int QOffscreenSurface_virtualbase_SurfaceType(const void* self); +void QOffscreenSurface_override_virtual_Format(void* self, intptr_t slot); +QSurfaceFormat* QOffscreenSurface_virtualbase_Format(const void* self); +void QOffscreenSurface_override_virtual_Size(void* self, intptr_t slot); +QSize* QOffscreenSurface_virtualbase_Size(const void* self); +void QOffscreenSurface_override_virtual_Event(void* self, intptr_t slot); +bool QOffscreenSurface_virtualbase_Event(void* self, QEvent* event); +void QOffscreenSurface_override_virtual_EventFilter(void* self, intptr_t slot); +bool QOffscreenSurface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QOffscreenSurface_override_virtual_TimerEvent(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QOffscreenSurface_override_virtual_ChildEvent(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QOffscreenSurface_override_virtual_CustomEvent(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_CustomEvent(void* self, QEvent* event); +void QOffscreenSurface_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QOffscreenSurface_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QOffscreenSurface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QOffscreenSurface_Delete(QOffscreenSurface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qoperatingsystemversion.cpp b/qt6/gen_qoperatingsystemversion.cpp index cd64f1ee..b3365e71 100644 --- a/qt6/gen_qoperatingsystemversion.cpp +++ b/qt6/gen_qoperatingsystemversion.cpp @@ -8,20 +8,24 @@ #include "gen_qoperatingsystemversion.h" #include "_cgo_export.h" -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new(int osType, int vmajor) { - return new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor)); +void QOperatingSystemVersionBase_new(int osType, int vmajor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor)); + *outptr_QOperatingSystemVersionBase = ret; } -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1) { - return new QOperatingSystemVersionBase(*param1); +void QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(*param1); + *outptr_QOperatingSystemVersionBase = ret; } -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor) { - return new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor)); +void QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor)); + *outptr_QOperatingSystemVersionBase = ret; } -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro) { - return new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); +void QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); + *outptr_QOperatingSystemVersionBase = ret; } QOperatingSystemVersionBase* QOperatingSystemVersionBase_Current() { @@ -80,28 +84,42 @@ struct miqt_string QOperatingSystemVersionBase_Name2(const QOperatingSystemVersi return _ms; } -void QOperatingSystemVersionBase_Delete(QOperatingSystemVersionBase* self) { - delete self; +void QOperatingSystemVersionBase_Delete(QOperatingSystemVersionBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QOperatingSystemVersion* QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion) { - return new QOperatingSystemVersion(*osversion); +void QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(*osversion); + *outptr_QOperatingSystemVersion = ret; + *outptr_QOperatingSystemVersionBase = static_cast(ret); } -QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor) { - return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); +void QOperatingSystemVersion_new2(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); + *outptr_QOperatingSystemVersion = ret; + *outptr_QOperatingSystemVersionBase = static_cast(ret); } -QOperatingSystemVersion* QOperatingSystemVersion_new3(QOperatingSystemVersion* param1) { - return new QOperatingSystemVersion(*param1); +void QOperatingSystemVersion_new3(QOperatingSystemVersion* param1, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(*param1); + *outptr_QOperatingSystemVersion = ret; + *outptr_QOperatingSystemVersionBase = static_cast(ret); } -QOperatingSystemVersion* QOperatingSystemVersion_new4(int osType, int vmajor, int vminor) { - return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); +void QOperatingSystemVersion_new4(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); + *outptr_QOperatingSystemVersion = ret; + *outptr_QOperatingSystemVersionBase = static_cast(ret); } -QOperatingSystemVersion* QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro) { - return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); +void QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); + *outptr_QOperatingSystemVersion = ret; + *outptr_QOperatingSystemVersionBase = static_cast(ret); } QOperatingSystemVersion* QOperatingSystemVersion_Current() { @@ -149,7 +167,11 @@ struct miqt_string QOperatingSystemVersion_Name(const QOperatingSystemVersion* s return _ms; } -void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self) { - delete self; +void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qoperatingsystemversion.go b/qt6/gen_qoperatingsystemversion.go index 4431b335..a22e5b70 100644 --- a/qt6/gen_qoperatingsystemversion.go +++ b/qt6/gen_qoperatingsystemversion.go @@ -38,7 +38,8 @@ const ( ) type QOperatingSystemVersionBase struct { - h *C.QOperatingSystemVersionBase + h *C.QOperatingSystemVersionBase + isSubclass bool } func (this *QOperatingSystemVersionBase) cPointer() *C.QOperatingSystemVersionBase { @@ -55,6 +56,7 @@ func (this *QOperatingSystemVersionBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQOperatingSystemVersionBase constructs the type using only CGO pointers. func newQOperatingSystemVersionBase(h *C.QOperatingSystemVersionBase) *QOperatingSystemVersionBase { if h == nil { return nil @@ -62,32 +64,53 @@ func newQOperatingSystemVersionBase(h *C.QOperatingSystemVersionBase) *QOperatin return &QOperatingSystemVersionBase{h: h} } +// UnsafeNewQOperatingSystemVersionBase constructs the type using only unsafe pointers. func UnsafeNewQOperatingSystemVersionBase(h unsafe.Pointer) *QOperatingSystemVersionBase { - return newQOperatingSystemVersionBase((*C.QOperatingSystemVersionBase)(h)) + if h == nil { + return nil + } + + return &QOperatingSystemVersionBase{h: (*C.QOperatingSystemVersionBase)(h)} } // NewQOperatingSystemVersionBase constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase(osType QOperatingSystemVersionBase__OSType, vmajor int) *QOperatingSystemVersionBase { - ret := C.QOperatingSystemVersionBase_new((C.int)(osType), (C.int)(vmajor)) - return newQOperatingSystemVersionBase(ret) + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersionBase_new((C.int)(osType), (C.int)(vmajor), &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersionBase2 constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase2(param1 *QOperatingSystemVersionBase) *QOperatingSystemVersionBase { - ret := C.QOperatingSystemVersionBase_new2(param1.cPointer()) - return newQOperatingSystemVersionBase(ret) + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersionBase_new2(param1.cPointer(), &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersionBase3 constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase3(osType QOperatingSystemVersionBase__OSType, vmajor int, vminor int) *QOperatingSystemVersionBase { - ret := C.QOperatingSystemVersionBase_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor)) - return newQOperatingSystemVersionBase(ret) + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersionBase_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersionBase4 constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase4(osType QOperatingSystemVersionBase__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersionBase { - ret := C.QOperatingSystemVersionBase_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro)) - return newQOperatingSystemVersionBase(ret) + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersionBase_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro), &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } func QOperatingSystemVersionBase_Current() *QOperatingSystemVersionBase { @@ -144,7 +167,7 @@ func (this *QOperatingSystemVersionBase) Name2() string { // Delete this object from C++ memory. func (this *QOperatingSystemVersionBase) Delete() { - C.QOperatingSystemVersionBase_Delete(this.h) + C.QOperatingSystemVersionBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -157,7 +180,8 @@ func (this *QOperatingSystemVersionBase) GoGC() { } type QOperatingSystemVersion struct { - h *C.QOperatingSystemVersion + h *C.QOperatingSystemVersion + isSubclass bool *QOperatingSystemVersionBase } @@ -175,50 +199,83 @@ func (this *QOperatingSystemVersion) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQOperatingSystemVersion(h *C.QOperatingSystemVersion) *QOperatingSystemVersion { +// newQOperatingSystemVersion constructs the type using only CGO pointers. +func newQOperatingSystemVersion(h *C.QOperatingSystemVersion, h_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase) *QOperatingSystemVersion { if h == nil { return nil } - return &QOperatingSystemVersion{h: h, QOperatingSystemVersionBase: UnsafeNewQOperatingSystemVersionBase(unsafe.Pointer(h))} + return &QOperatingSystemVersion{h: h, + QOperatingSystemVersionBase: newQOperatingSystemVersionBase(h_QOperatingSystemVersionBase)} } -func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer) *QOperatingSystemVersion { - return newQOperatingSystemVersion((*C.QOperatingSystemVersion)(h)) +// UnsafeNewQOperatingSystemVersion constructs the type using only unsafe pointers. +func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer, h_QOperatingSystemVersionBase unsafe.Pointer) *QOperatingSystemVersion { + if h == nil { + return nil + } + + return &QOperatingSystemVersion{h: (*C.QOperatingSystemVersion)(h), + QOperatingSystemVersionBase: UnsafeNewQOperatingSystemVersionBase(h_QOperatingSystemVersionBase)} } // NewQOperatingSystemVersion constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion(osversion *QOperatingSystemVersionBase) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new(osversion.cPointer()) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersion_new(osversion.cPointer(), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersion2 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion2(osType QOperatingSystemVersion__OSType, vmajor int) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor)) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersion3 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion3(param1 *QOperatingSystemVersion) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new3(param1.cPointer()) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersion_new3(param1.cPointer(), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersion4 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion4(osType QOperatingSystemVersion__OSType, vmajor int, vminor int) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor)) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersion_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } // NewQOperatingSystemVersion5 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion5(osType QOperatingSystemVersion__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersion { - ret := C.QOperatingSystemVersion_new5((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro)) - return newQOperatingSystemVersion(ret) + var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + + C.QOperatingSystemVersion_new5((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret.isSubclass = true + return ret } func QOperatingSystemVersion_Current() *QOperatingSystemVersion { _ret := C.QOperatingSystemVersion_Current() - _goptr := newQOperatingSystemVersion(_ret) + _goptr := newQOperatingSystemVersion(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -263,7 +320,7 @@ func (this *QOperatingSystemVersion) Name() string { // Delete this object from C++ memory. func (this *QOperatingSystemVersion) Delete() { - C.QOperatingSystemVersion_Delete(this.h) + C.QOperatingSystemVersion_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qoperatingsystemversion.h b/qt6/gen_qoperatingsystemversion.h index 1096ca3e..2b9150ac 100644 --- a/qt6/gen_qoperatingsystemversion.h +++ b/qt6/gen_qoperatingsystemversion.h @@ -24,10 +24,10 @@ typedef struct QOperatingSystemVersionBase QOperatingSystemVersionBase; typedef struct QVersionNumber QVersionNumber; #endif -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new(int osType, int vmajor); -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1); -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor); -QOperatingSystemVersionBase* QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro); +void QOperatingSystemVersionBase_new(int osType, int vmajor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); QOperatingSystemVersionBase* QOperatingSystemVersionBase_Current(); struct miqt_string QOperatingSystemVersionBase_Name(QOperatingSystemVersionBase* osversion); int QOperatingSystemVersionBase_CurrentType(); @@ -38,13 +38,13 @@ int QOperatingSystemVersionBase_MicroVersion(const QOperatingSystemVersionBase* int QOperatingSystemVersionBase_SegmentCount(const QOperatingSystemVersionBase* self); int QOperatingSystemVersionBase_Type(const QOperatingSystemVersionBase* self); struct miqt_string QOperatingSystemVersionBase_Name2(const QOperatingSystemVersionBase* self); -void QOperatingSystemVersionBase_Delete(QOperatingSystemVersionBase* self); +void QOperatingSystemVersionBase_Delete(QOperatingSystemVersionBase* self, bool isSubclass); -QOperatingSystemVersion* QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion); -QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor); -QOperatingSystemVersion* QOperatingSystemVersion_new3(QOperatingSystemVersion* param1); -QOperatingSystemVersion* QOperatingSystemVersion_new4(int osType, int vmajor, int vminor); -QOperatingSystemVersion* QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro); +void QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersion_new2(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersion_new3(QOperatingSystemVersion* param1, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersion_new4(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +void QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); QOperatingSystemVersion* QOperatingSystemVersion_Current(); int QOperatingSystemVersion_CurrentType(); QVersionNumber* QOperatingSystemVersion_Version(const QOperatingSystemVersion* self); @@ -54,7 +54,7 @@ int QOperatingSystemVersion_MicroVersion(const QOperatingSystemVersion* self); int QOperatingSystemVersion_SegmentCount(const QOperatingSystemVersion* self); int QOperatingSystemVersion_Type(const QOperatingSystemVersion* self); struct miqt_string QOperatingSystemVersion_Name(const QOperatingSystemVersion* self); -void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self); +void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpagedpaintdevice.cpp b/qt6/gen_qpagedpaintdevice.cpp index f0ada6b1..bcd65220 100644 --- a/qt6/gen_qpagedpaintdevice.cpp +++ b/qt6/gen_qpagedpaintdevice.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "gen_qpagedpaintdevice.h" #include "_cgo_export.h" @@ -23,8 +24,8 @@ bool QPagedPaintDevice_SetPageOrientation(QPagedPaintDevice* self, int orientati return self->setPageOrientation(static_cast(orientation)); } -bool QPagedPaintDevice_SetPageMargins(QPagedPaintDevice* self, QMarginsF* margins) { - return self->setPageMargins(*margins); +bool QPagedPaintDevice_SetPageMargins(QPagedPaintDevice* self, QMarginsF* margins, int units) { + return self->setPageMargins(*margins, static_cast(units)); } QPageLayout* QPagedPaintDevice_PageLayout(const QPagedPaintDevice* self) { @@ -39,11 +40,11 @@ QPageRanges* QPagedPaintDevice_PageRanges(const QPagedPaintDevice* self) { return new QPageRanges(self->pageRanges()); } -bool QPagedPaintDevice_SetPageMargins2(QPagedPaintDevice* self, QMarginsF* margins, int units) { - return self->setPageMargins(*margins, static_cast(units)); -} - -void QPagedPaintDevice_Delete(QPagedPaintDevice* self) { - delete self; +void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpagedpaintdevice.go b/qt6/gen_qpagedpaintdevice.go index 3ed52bec..0690dfbd 100644 --- a/qt6/gen_qpagedpaintdevice.go +++ b/qt6/gen_qpagedpaintdevice.go @@ -22,7 +22,8 @@ const ( ) type QPagedPaintDevice struct { - h *C.QPagedPaintDevice + h *C.QPagedPaintDevice + isSubclass bool *QPaintDevice } @@ -40,15 +41,23 @@ func (this *QPagedPaintDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPagedPaintDevice(h *C.QPagedPaintDevice) *QPagedPaintDevice { +// newQPagedPaintDevice constructs the type using only CGO pointers. +func newQPagedPaintDevice(h *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPagedPaintDevice { if h == nil { return nil } - return &QPagedPaintDevice{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPagedPaintDevice{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPagedPaintDevice(h unsafe.Pointer) *QPagedPaintDevice { - return newQPagedPaintDevice((*C.QPagedPaintDevice)(h)) +// UnsafeNewQPagedPaintDevice constructs the type using only unsafe pointers. +func UnsafeNewQPagedPaintDevice(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPagedPaintDevice { + if h == nil { + return nil + } + + return &QPagedPaintDevice{h: (*C.QPagedPaintDevice)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } func (this *QPagedPaintDevice) NewPage() bool { @@ -67,8 +76,8 @@ func (this *QPagedPaintDevice) SetPageOrientation(orientation QPageLayout__Orien return (bool)(C.QPagedPaintDevice_SetPageOrientation(this.h, (C.int)(orientation))) } -func (this *QPagedPaintDevice) SetPageMargins(margins *QMarginsF) bool { - return (bool)(C.QPagedPaintDevice_SetPageMargins(this.h, margins.cPointer())) +func (this *QPagedPaintDevice) SetPageMargins(margins *QMarginsF, units QPageLayout__Unit) bool { + return (bool)(C.QPagedPaintDevice_SetPageMargins(this.h, margins.cPointer(), (C.int)(units))) } func (this *QPagedPaintDevice) PageLayout() *QPageLayout { @@ -89,13 +98,9 @@ func (this *QPagedPaintDevice) PageRanges() *QPageRanges { return _goptr } -func (this *QPagedPaintDevice) SetPageMargins2(margins *QMarginsF, units QPageLayout__Unit) bool { - return (bool)(C.QPagedPaintDevice_SetPageMargins2(this.h, margins.cPointer(), (C.int)(units))) -} - // Delete this object from C++ memory. func (this *QPagedPaintDevice) Delete() { - C.QPagedPaintDevice_Delete(this.h) + C.QPagedPaintDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpagedpaintdevice.h b/qt6/gen_qpagedpaintdevice.h index b465a549..8a6b86b2 100644 --- a/qt6/gen_qpagedpaintdevice.h +++ b/qt6/gen_qpagedpaintdevice.h @@ -20,24 +20,25 @@ class QPageLayout; class QPageRanges; class QPageSize; class QPagedPaintDevice; +class QPaintDevice; #else typedef struct QMarginsF QMarginsF; typedef struct QPageLayout QPageLayout; typedef struct QPageRanges QPageRanges; typedef struct QPageSize QPageSize; typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; #endif bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self); bool QPagedPaintDevice_SetPageLayout(QPagedPaintDevice* self, QPageLayout* pageLayout); bool QPagedPaintDevice_SetPageSize(QPagedPaintDevice* self, QPageSize* pageSize); bool QPagedPaintDevice_SetPageOrientation(QPagedPaintDevice* self, int orientation); -bool QPagedPaintDevice_SetPageMargins(QPagedPaintDevice* self, QMarginsF* margins); +bool QPagedPaintDevice_SetPageMargins(QPagedPaintDevice* self, QMarginsF* margins, int units); QPageLayout* QPagedPaintDevice_PageLayout(const QPagedPaintDevice* self); void QPagedPaintDevice_SetPageRanges(QPagedPaintDevice* self, QPageRanges* ranges); QPageRanges* QPagedPaintDevice_PageRanges(const QPagedPaintDevice* self); -bool QPagedPaintDevice_SetPageMargins2(QPagedPaintDevice* self, QMarginsF* margins, int units); -void QPagedPaintDevice_Delete(QPagedPaintDevice* self); +void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpagelayout.cpp b/qt6/gen_qpagelayout.cpp index bab98a32..aafdbcb3 100644 --- a/qt6/gen_qpagelayout.cpp +++ b/qt6/gen_qpagelayout.cpp @@ -8,24 +8,29 @@ #include "gen_qpagelayout.h" #include "_cgo_export.h" -QPageLayout* QPageLayout_new() { - return new QPageLayout(); +void QPageLayout_new(QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins) { - return new QPageLayout(*pageSize, static_cast(orientation), *margins); +void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new3(QPageLayout* other) { - return new QPageLayout(*other); +void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*other); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units) { - return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); +void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); + *outptr_QPageLayout = ret; } -QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins) { - return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); +void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout) { + QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); + *outptr_QPageLayout = ret; } void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other) { @@ -163,7 +168,11 @@ void QPageLayout_SetPageSize2(QPageLayout* self, QPageSize* pageSize, QMarginsF* self->setPageSize(*pageSize, *minMargins); } -void QPageLayout_Delete(QPageLayout* self) { - delete self; +void QPageLayout_Delete(QPageLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpagelayout.go b/qt6/gen_qpagelayout.go index acd9e567..783a818a 100644 --- a/qt6/gen_qpagelayout.go +++ b/qt6/gen_qpagelayout.go @@ -39,7 +39,8 @@ const ( ) type QPageLayout struct { - h *C.QPageLayout + h *C.QPageLayout + isSubclass bool } func (this *QPageLayout) cPointer() *C.QPageLayout { @@ -56,6 +57,7 @@ func (this *QPageLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPageLayout constructs the type using only CGO pointers. func newQPageLayout(h *C.QPageLayout) *QPageLayout { if h == nil { return nil @@ -63,38 +65,63 @@ func newQPageLayout(h *C.QPageLayout) *QPageLayout { return &QPageLayout{h: h} } +// UnsafeNewQPageLayout constructs the type using only unsafe pointers. func UnsafeNewQPageLayout(h unsafe.Pointer) *QPageLayout { - return newQPageLayout((*C.QPageLayout)(h)) + if h == nil { + return nil + } + + return &QPageLayout{h: (*C.QPageLayout)(h)} } // NewQPageLayout constructs a new QPageLayout object. func NewQPageLayout() *QPageLayout { - ret := C.QPageLayout_new() - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new(&outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout2 constructs a new QPageLayout object. func NewQPageLayout2(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF) *QPageLayout { - ret := C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer()) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout3 constructs a new QPageLayout object. func NewQPageLayout3(other *QPageLayout) *QPageLayout { - ret := C.QPageLayout_new3(other.cPointer()) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new3(other.cPointer(), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout4 constructs a new QPageLayout object. func NewQPageLayout4(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit) *QPageLayout { - ret := C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units)) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } // NewQPageLayout5 constructs a new QPageLayout object. func NewQPageLayout5(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit, minMargins *QMarginsF) *QPageLayout { - ret := C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer()) - return newQPageLayout(ret) + var outptr_QPageLayout *C.QPageLayout = nil + + C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer(), &outptr_QPageLayout) + ret := newQPageLayout(outptr_QPageLayout) + ret.isSubclass = true + return ret } func (this *QPageLayout) OperatorAssign(other *QPageLayout) { @@ -276,7 +303,7 @@ func (this *QPageLayout) SetPageSize2(pageSize *QPageSize, minMargins *QMarginsF // Delete this object from C++ memory. func (this *QPageLayout) Delete() { - C.QPageLayout_Delete(this.h) + C.QPageLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpagelayout.h b/qt6/gen_qpagelayout.h index 4ab5c9f2..220b868d 100644 --- a/qt6/gen_qpagelayout.h +++ b/qt6/gen_qpagelayout.h @@ -30,11 +30,11 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; #endif -QPageLayout* QPageLayout_new(); -QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins); -QPageLayout* QPageLayout_new3(QPageLayout* other); -QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units); -QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins); +void QPageLayout_new(QPageLayout** outptr_QPageLayout); +void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout); +void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout); +void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout); +void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout); void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other); void QPageLayout_Swap(QPageLayout* self, QPageLayout* other); bool QPageLayout_IsEquivalentTo(const QPageLayout* self, QPageLayout* other); @@ -68,7 +68,7 @@ QRectF* QPageLayout_PaintRectWithUnits(const QPageLayout* self, int units); QRect* QPageLayout_PaintRectPoints(const QPageLayout* self); QRect* QPageLayout_PaintRectPixels(const QPageLayout* self, int resolution); void QPageLayout_SetPageSize2(QPageLayout* self, QPageSize* pageSize, QMarginsF* minMargins); -void QPageLayout_Delete(QPageLayout* self); +void QPageLayout_Delete(QPageLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpageranges.cpp b/qt6/gen_qpageranges.cpp index 1bce7ea7..030f9e9f 100644 --- a/qt6/gen_qpageranges.cpp +++ b/qt6/gen_qpageranges.cpp @@ -8,12 +8,14 @@ #include "gen_qpageranges.h" #include "_cgo_export.h" -QPageRanges* QPageRanges_new() { - return new QPageRanges(); +void QPageRanges_new(QPageRanges** outptr_QPageRanges) { + QPageRanges* ret = new QPageRanges(); + *outptr_QPageRanges = ret; } -QPageRanges* QPageRanges_new2(QPageRanges* other) { - return new QPageRanges(*other); +void QPageRanges_new2(QPageRanges* other, QPageRanges** outptr_QPageRanges) { + QPageRanges* ret = new QPageRanges(*other); + *outptr_QPageRanges = ret; } void QPageRanges_OperatorAssign(QPageRanges* self, QPageRanges* other) { @@ -85,23 +87,33 @@ void QPageRanges_Detach(QPageRanges* self) { self->detach(); } -void QPageRanges_Delete(QPageRanges* self) { - delete self; +void QPageRanges_Delete(QPageRanges* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPageRanges__Range* QPageRanges__Range_new() { - return new QPageRanges::Range(); +void QPageRanges__Range_new(QPageRanges__Range** outptr_QPageRanges__Range) { + QPageRanges::Range* ret = new QPageRanges::Range(); + *outptr_QPageRanges__Range = ret; } -QPageRanges__Range* QPageRanges__Range_new2(QPageRanges__Range* param1) { - return new QPageRanges::Range(*param1); +void QPageRanges__Range_new2(QPageRanges__Range* param1, QPageRanges__Range** outptr_QPageRanges__Range) { + QPageRanges::Range* ret = new QPageRanges::Range(*param1); + *outptr_QPageRanges__Range = ret; } bool QPageRanges__Range_Contains(const QPageRanges__Range* self, int pageNumber) { return self->contains(static_cast(pageNumber)); } -void QPageRanges__Range_Delete(QPageRanges__Range* self) { - delete self; +void QPageRanges__Range_Delete(QPageRanges__Range* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpageranges.go b/qt6/gen_qpageranges.go index 7f6e4d4e..2ac70c90 100644 --- a/qt6/gen_qpageranges.go +++ b/qt6/gen_qpageranges.go @@ -14,7 +14,8 @@ import ( ) type QPageRanges struct { - h *C.QPageRanges + h *C.QPageRanges + isSubclass bool } func (this *QPageRanges) cPointer() *C.QPageRanges { @@ -31,6 +32,7 @@ func (this *QPageRanges) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPageRanges constructs the type using only CGO pointers. func newQPageRanges(h *C.QPageRanges) *QPageRanges { if h == nil { return nil @@ -38,20 +40,33 @@ func newQPageRanges(h *C.QPageRanges) *QPageRanges { return &QPageRanges{h: h} } +// UnsafeNewQPageRanges constructs the type using only unsafe pointers. func UnsafeNewQPageRanges(h unsafe.Pointer) *QPageRanges { - return newQPageRanges((*C.QPageRanges)(h)) + if h == nil { + return nil + } + + return &QPageRanges{h: (*C.QPageRanges)(h)} } // NewQPageRanges constructs a new QPageRanges object. func NewQPageRanges() *QPageRanges { - ret := C.QPageRanges_new() - return newQPageRanges(ret) + var outptr_QPageRanges *C.QPageRanges = nil + + C.QPageRanges_new(&outptr_QPageRanges) + ret := newQPageRanges(outptr_QPageRanges) + ret.isSubclass = true + return ret } // NewQPageRanges2 constructs a new QPageRanges object. func NewQPageRanges2(other *QPageRanges) *QPageRanges { - ret := C.QPageRanges_new2(other.cPointer()) - return newQPageRanges(ret) + var outptr_QPageRanges *C.QPageRanges = nil + + C.QPageRanges_new2(other.cPointer(), &outptr_QPageRanges) + ret := newQPageRanges(outptr_QPageRanges) + ret.isSubclass = true + return ret } func (this *QPageRanges) OperatorAssign(other *QPageRanges) { @@ -127,7 +142,7 @@ func (this *QPageRanges) Detach() { // Delete this object from C++ memory. func (this *QPageRanges) Delete() { - C.QPageRanges_Delete(this.h) + C.QPageRanges_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -140,7 +155,8 @@ func (this *QPageRanges) GoGC() { } type QPageRanges__Range struct { - h *C.QPageRanges__Range + h *C.QPageRanges__Range + isSubclass bool } func (this *QPageRanges__Range) cPointer() *C.QPageRanges__Range { @@ -157,6 +173,7 @@ func (this *QPageRanges__Range) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPageRanges__Range constructs the type using only CGO pointers. func newQPageRanges__Range(h *C.QPageRanges__Range) *QPageRanges__Range { if h == nil { return nil @@ -164,20 +181,33 @@ func newQPageRanges__Range(h *C.QPageRanges__Range) *QPageRanges__Range { return &QPageRanges__Range{h: h} } +// UnsafeNewQPageRanges__Range constructs the type using only unsafe pointers. func UnsafeNewQPageRanges__Range(h unsafe.Pointer) *QPageRanges__Range { - return newQPageRanges__Range((*C.QPageRanges__Range)(h)) + if h == nil { + return nil + } + + return &QPageRanges__Range{h: (*C.QPageRanges__Range)(h)} } // NewQPageRanges__Range constructs a new QPageRanges::Range object. func NewQPageRanges__Range() *QPageRanges__Range { - ret := C.QPageRanges__Range_new() - return newQPageRanges__Range(ret) + var outptr_QPageRanges__Range *C.QPageRanges__Range = nil + + C.QPageRanges__Range_new(&outptr_QPageRanges__Range) + ret := newQPageRanges__Range(outptr_QPageRanges__Range) + ret.isSubclass = true + return ret } // NewQPageRanges__Range2 constructs a new QPageRanges::Range object. func NewQPageRanges__Range2(param1 *QPageRanges__Range) *QPageRanges__Range { - ret := C.QPageRanges__Range_new2(param1.cPointer()) - return newQPageRanges__Range(ret) + var outptr_QPageRanges__Range *C.QPageRanges__Range = nil + + C.QPageRanges__Range_new2(param1.cPointer(), &outptr_QPageRanges__Range) + ret := newQPageRanges__Range(outptr_QPageRanges__Range) + ret.isSubclass = true + return ret } func (this *QPageRanges__Range) Contains(pageNumber int) bool { @@ -186,7 +216,7 @@ func (this *QPageRanges__Range) Contains(pageNumber int) bool { // Delete this object from C++ memory. func (this *QPageRanges__Range) Delete() { - C.QPageRanges__Range_Delete(this.h) + C.QPageRanges__Range_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpageranges.h b/qt6/gen_qpageranges.h index f5e0fecc..f3f1e905 100644 --- a/qt6/gen_qpageranges.h +++ b/qt6/gen_qpageranges.h @@ -26,8 +26,8 @@ typedef struct QPageRanges QPageRanges; typedef struct QPageRanges__Range QPageRanges__Range; #endif -QPageRanges* QPageRanges_new(); -QPageRanges* QPageRanges_new2(QPageRanges* other); +void QPageRanges_new(QPageRanges** outptr_QPageRanges); +void QPageRanges_new2(QPageRanges* other, QPageRanges** outptr_QPageRanges); void QPageRanges_OperatorAssign(QPageRanges* self, QPageRanges* other); void QPageRanges_Swap(QPageRanges* self, QPageRanges* other); void QPageRanges_AddPage(QPageRanges* self, int pageNumber); @@ -41,12 +41,12 @@ bool QPageRanges_IsEmpty(const QPageRanges* self); int QPageRanges_FirstPage(const QPageRanges* self); int QPageRanges_LastPage(const QPageRanges* self); void QPageRanges_Detach(QPageRanges* self); -void QPageRanges_Delete(QPageRanges* self); +void QPageRanges_Delete(QPageRanges* self, bool isSubclass); -QPageRanges__Range* QPageRanges__Range_new(); -QPageRanges__Range* QPageRanges__Range_new2(QPageRanges__Range* param1); +void QPageRanges__Range_new(QPageRanges__Range** outptr_QPageRanges__Range); +void QPageRanges__Range_new2(QPageRanges__Range* param1, QPageRanges__Range** outptr_QPageRanges__Range); bool QPageRanges__Range_Contains(const QPageRanges__Range* self, int pageNumber); -void QPageRanges__Range_Delete(QPageRanges__Range* self); +void QPageRanges__Range_Delete(QPageRanges__Range* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpagesize.cpp b/qt6/gen_qpagesize.cpp index 706d6005..f7121d1f 100644 --- a/qt6/gen_qpagesize.cpp +++ b/qt6/gen_qpagesize.cpp @@ -10,44 +10,53 @@ #include "gen_qpagesize.h" #include "_cgo_export.h" -QPageSize* QPageSize_new() { - return new QPageSize(); +void QPageSize_new(QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new2(int pageSizeId) { - return new QPageSize(static_cast(pageSizeId)); +void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(static_cast(pageSizeId)); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new3(QSize* pointSize) { - return new QPageSize(*pointSize); +void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(*pointSize); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new4(QSizeF* size, int units) { - return new QPageSize(*size, static_cast(units)); +void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(*size, static_cast(units)); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new5(QPageSize* other) { - return new QPageSize(*other); +void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize) { + QPageSize* ret = new QPageSize(*other); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name) { +void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*pointSize, name_QString); + QPageSize* ret = new QPageSize(*pointSize, name_QString); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy) { +void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); + QPageSize* ret = new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name) { +void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*size, static_cast(units), name_QString); + QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString); + *outptr_QPageSize = ret; } -QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy) { +void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); + QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); + *outptr_QPageSize = ret; } void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other) { @@ -202,7 +211,11 @@ int QPageSize_Id3(QSizeF* size, int units, int matchPolicy) { return static_cast(_ret); } -void QPageSize_Delete(QPageSize* self) { - delete self; +void QPageSize_Delete(QPageSize* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpagesize.go b/qt6/gen_qpagesize.go index 35bdadb4..c1c2fc15 100644 --- a/qt6/gen_qpagesize.go +++ b/qt6/gen_qpagesize.go @@ -163,7 +163,8 @@ const ( ) type QPageSize struct { - h *C.QPageSize + h *C.QPageSize + isSubclass bool } func (this *QPageSize) cPointer() *C.QPageSize { @@ -180,6 +181,7 @@ func (this *QPageSize) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPageSize constructs the type using only CGO pointers. func newQPageSize(h *C.QPageSize) *QPageSize { if h == nil { return nil @@ -187,38 +189,63 @@ func newQPageSize(h *C.QPageSize) *QPageSize { return &QPageSize{h: h} } +// UnsafeNewQPageSize constructs the type using only unsafe pointers. func UnsafeNewQPageSize(h unsafe.Pointer) *QPageSize { - return newQPageSize((*C.QPageSize)(h)) + if h == nil { + return nil + } + + return &QPageSize{h: (*C.QPageSize)(h)} } // NewQPageSize constructs a new QPageSize object. func NewQPageSize() *QPageSize { - ret := C.QPageSize_new() - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new(&outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize2 constructs a new QPageSize object. func NewQPageSize2(pageSizeId QPageSize__PageSizeId) *QPageSize { - ret := C.QPageSize_new2((C.int)(pageSizeId)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new2((C.int)(pageSizeId), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize3 constructs a new QPageSize object. func NewQPageSize3(pointSize *QSize) *QPageSize { - ret := C.QPageSize_new3(pointSize.cPointer()) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new3(pointSize.cPointer(), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize4 constructs a new QPageSize object. func NewQPageSize4(size *QSizeF, units QPageSize__Unit) *QPageSize { - ret := C.QPageSize_new4(size.cPointer(), (C.int)(units)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new4(size.cPointer(), (C.int)(units), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize5 constructs a new QPageSize object. func NewQPageSize5(other *QPageSize) *QPageSize { - ret := C.QPageSize_new5(other.cPointer()) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new5(other.cPointer(), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize6 constructs a new QPageSize object. @@ -227,8 +254,12 @@ func NewQPageSize6(pointSize *QSize, name string) *QPageSize { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new6(pointSize.cPointer(), name_ms) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new6(pointSize.cPointer(), name_ms, &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize7 constructs a new QPageSize object. @@ -237,8 +268,12 @@ func NewQPageSize7(pointSize *QSize, name string, matchPolicy QPageSize__SizeMat name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize8 constructs a new QPageSize object. @@ -247,8 +282,12 @@ func NewQPageSize8(size *QSizeF, units QPageSize__Unit, name string) *QPageSize name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms, &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } // NewQPageSize9 constructs a new QPageSize object. @@ -257,8 +296,12 @@ func NewQPageSize9(size *QSizeF, units QPageSize__Unit, name string, matchPolicy name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy)) - return newQPageSize(ret) + var outptr_QPageSize *C.QPageSize = nil + + C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) + ret := newQPageSize(outptr_QPageSize) + ret.isSubclass = true + return ret } func (this *QPageSize) OperatorAssign(other *QPageSize) { @@ -424,7 +467,7 @@ func QPageSize_Id3(size *QSizeF, units QPageSize__Unit, matchPolicy QPageSize__S // Delete this object from C++ memory. func (this *QPageSize) Delete() { - C.QPageSize_Delete(this.h) + C.QPageSize_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpagesize.h b/qt6/gen_qpagesize.h index 60680e1b..70042f32 100644 --- a/qt6/gen_qpagesize.h +++ b/qt6/gen_qpagesize.h @@ -28,15 +28,15 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QPageSize* QPageSize_new(); -QPageSize* QPageSize_new2(int pageSizeId); -QPageSize* QPageSize_new3(QSize* pointSize); -QPageSize* QPageSize_new4(QSizeF* size, int units); -QPageSize* QPageSize_new5(QPageSize* other); -QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name); -QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy); -QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name); -QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy); +void QPageSize_new(QPageSize** outptr_QPageSize); +void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize); +void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize); +void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize); +void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize); +void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize); +void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); +void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize); +void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other); void QPageSize_Swap(QPageSize* self, QPageSize* other); bool QPageSize_IsEquivalentTo(const QPageSize* self, QPageSize* other); @@ -66,7 +66,7 @@ QSize* QPageSize_SizePointsWithPageSizeId(int pageSizeId); QSize* QPageSize_SizePixels2(int pageSizeId, int resolution); int QPageSize_Id22(QSize* pointSize, int matchPolicy); int QPageSize_Id3(QSizeF* size, int units, int matchPolicy); -void QPageSize_Delete(QPageSize* self); +void QPageSize_Delete(QPageSize* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpaintdevice.cpp b/qt6/gen_qpaintdevice.cpp index f14cbe9a..1b239a42 100644 --- a/qt6/gen_qpaintdevice.cpp +++ b/qt6/gen_qpaintdevice.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include "gen_qpaintdevice.h" #include "_cgo_export.h" @@ -71,7 +73,11 @@ double QPaintDevice_DevicePixelRatioFScale() { return static_cast(_ret); } -void QPaintDevice_Delete(QPaintDevice* self) { - delete self; +void QPaintDevice_Delete(QPaintDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpaintdevice.go b/qt6/gen_qpaintdevice.go index 316821c6..a2602aa8 100644 --- a/qt6/gen_qpaintdevice.go +++ b/qt6/gen_qpaintdevice.go @@ -31,7 +31,8 @@ const ( ) type QPaintDevice struct { - h *C.QPaintDevice + h *C.QPaintDevice + isSubclass bool } func (this *QPaintDevice) cPointer() *C.QPaintDevice { @@ -48,6 +49,7 @@ func (this *QPaintDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPaintDevice constructs the type using only CGO pointers. func newQPaintDevice(h *C.QPaintDevice) *QPaintDevice { if h == nil { return nil @@ -55,8 +57,13 @@ func newQPaintDevice(h *C.QPaintDevice) *QPaintDevice { return &QPaintDevice{h: h} } +// UnsafeNewQPaintDevice constructs the type using only unsafe pointers. func UnsafeNewQPaintDevice(h unsafe.Pointer) *QPaintDevice { - return newQPaintDevice((*C.QPaintDevice)(h)) + if h == nil { + return nil + } + + return &QPaintDevice{h: (*C.QPaintDevice)(h)} } func (this *QPaintDevice) DevType() int { @@ -125,7 +132,7 @@ func QPaintDevice_DevicePixelRatioFScale() float64 { // Delete this object from C++ memory. func (this *QPaintDevice) Delete() { - C.QPaintDevice_Delete(this.h) + C.QPaintDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpaintdevice.h b/qt6/gen_qpaintdevice.h index c3d1132e..b672950d 100644 --- a/qt6/gen_qpaintdevice.h +++ b/qt6/gen_qpaintdevice.h @@ -17,9 +17,13 @@ extern "C" { #ifdef __cplusplus class QPaintDevice; class QPaintEngine; +class QPainter; +class QPoint; #else typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; #endif int QPaintDevice_DevType(const QPaintDevice* self); @@ -38,7 +42,11 @@ double QPaintDevice_DevicePixelRatioF(const QPaintDevice* self); int QPaintDevice_ColorCount(const QPaintDevice* self); int QPaintDevice_Depth(const QPaintDevice* self); double QPaintDevice_DevicePixelRatioFScale(); -void QPaintDevice_Delete(QPaintDevice* self); +int QPaintDevice_Metric(const QPaintDevice* self, int metric); +void QPaintDevice_InitPainter(const QPaintDevice* self, QPainter* painter); +QPaintDevice* QPaintDevice_Redirected(const QPaintDevice* self, QPoint* offset); +QPainter* QPaintDevice_SharedPainter(const QPaintDevice* self); +void QPaintDevice_Delete(QPaintDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpaintdevicewindow.cpp b/qt6/gen_qpaintdevicewindow.cpp index bc67688e..b32d8ba2 100644 --- a/qt6/gen_qpaintdevicewindow.cpp +++ b/qt6/gen_qpaintdevicewindow.cpp @@ -1,10 +1,17 @@ +#include +#include #include +#include +#include #include +#include #include #include #include #include #include +#include +#include #include #include "gen_qpaintdevicewindow.h" #include "_cgo_export.h" @@ -62,7 +69,11 @@ struct miqt_string QPaintDeviceWindow_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self) { - delete self; +void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpaintdevicewindow.go b/qt6/gen_qpaintdevicewindow.go index e41c9f97..a901c9b7 100644 --- a/qt6/gen_qpaintdevicewindow.go +++ b/qt6/gen_qpaintdevicewindow.go @@ -14,7 +14,8 @@ import ( ) type QPaintDeviceWindow struct { - h *C.QPaintDeviceWindow + h *C.QPaintDeviceWindow + isSubclass bool *QWindow *QPaintDevice } @@ -33,15 +34,25 @@ func (this *QPaintDeviceWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPaintDeviceWindow(h *C.QPaintDeviceWindow) *QPaintDeviceWindow { +// newQPaintDeviceWindow constructs the type using only CGO pointers. +func newQPaintDeviceWindow(h *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QPaintDeviceWindow { if h == nil { return nil } - return &QPaintDeviceWindow{h: h, QWindow: UnsafeNewQWindow(unsafe.Pointer(h)), QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPaintDeviceWindow{h: h, + QWindow: newQWindow(h_QWindow, h_QObject, h_QSurface), + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer) *QPaintDeviceWindow { - return newQPaintDeviceWindow((*C.QPaintDeviceWindow)(h)) +// UnsafeNewQPaintDeviceWindow constructs the type using only unsafe pointers. +func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPaintDeviceWindow { + if h == nil { + return nil + } + + return &QPaintDeviceWindow{h: (*C.QPaintDeviceWindow)(h), + QWindow: UnsafeNewQWindow(h_QWindow, h_QObject, h_QSurface), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } func (this *QPaintDeviceWindow) MetaObject() *QMetaObject { @@ -99,7 +110,7 @@ func QPaintDeviceWindow_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QPaintDeviceWindow) Delete() { - C.QPaintDeviceWindow_Delete(this.h) + C.QPaintDeviceWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpaintdevicewindow.h b/qt6/gen_qpaintdevicewindow.h index 159d7809..28aae7b4 100644 --- a/qt6/gen_qpaintdevicewindow.h +++ b/qt6/gen_qpaintdevicewindow.h @@ -15,15 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QExposeEvent; class QMetaObject; +class QObject; +class QPaintDevice; class QPaintDeviceWindow; +class QPaintEvent; class QRect; class QRegion; +class QSurface; +class QWindow; #else +typedef struct QEvent QEvent; +typedef struct QExposeEvent QExposeEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintDeviceWindow QPaintDeviceWindow; +typedef struct QPaintEvent QPaintEvent; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QSurface QSurface; +typedef struct QWindow QWindow; #endif QMetaObject* QPaintDeviceWindow_MetaObject(const QPaintDeviceWindow* self); @@ -32,9 +46,13 @@ struct miqt_string QPaintDeviceWindow_Tr(const char* s); void QPaintDeviceWindow_Update(QPaintDeviceWindow* self, QRect* rect); void QPaintDeviceWindow_UpdateWithRegion(QPaintDeviceWindow* self, QRegion* region); void QPaintDeviceWindow_Update2(QPaintDeviceWindow* self); +void QPaintDeviceWindow_ExposeEvent(QPaintDeviceWindow* self, QExposeEvent* param1); +void QPaintDeviceWindow_PaintEvent(QPaintDeviceWindow* self, QPaintEvent* event); +int QPaintDeviceWindow_Metric(const QPaintDeviceWindow* self, int metric); +bool QPaintDeviceWindow_Event(QPaintDeviceWindow* self, QEvent* event); struct miqt_string QPaintDeviceWindow_Tr2(const char* s, const char* c); struct miqt_string QPaintDeviceWindow_Tr3(const char* s, const char* c, int n); -void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self); +void QPaintDeviceWindow_Delete(QPaintDeviceWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpaintengine.cpp b/qt6/gen_qpaintengine.cpp index 09885166..3bc02694 100644 --- a/qt6/gen_qpaintengine.cpp +++ b/qt6/gen_qpaintengine.cpp @@ -60,8 +60,12 @@ QFont* QTextItem_Font(const QTextItem* self) { return new QFont(self->font()); } -void QTextItem_Delete(QTextItem* self) { - delete self; +void QTextItem_Delete(QTextItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QPaintEngine_IsActive(const QPaintEngine* self) { @@ -140,8 +144,8 @@ void QPaintEngine_DrawTiledPixmap(QPaintEngine* self, QRectF* r, QPixmap* pixmap self->drawTiledPixmap(*r, *pixmap, *s); } -void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr) { - self->drawImage(*r, *pm, *sr); +void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags) { + self->drawImage(*r, *pm, *sr, static_cast(flags)); } void QPaintEngine_SetPaintDevice(QPaintEngine* self, QPaintDevice* device) { @@ -213,20 +217,16 @@ QPixmap* QPaintEngine_CreatePixmap(QPaintEngine* self, QSize* size) { return new QPixmap(self->createPixmap(*size)); } -QPixmap* QPaintEngine_CreatePixmapFromImage(QPaintEngine* self, QImage* image) { - return new QPixmap(self->createPixmapFromImage(*image)); -} - -void QPaintEngine_DrawImage4(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags) { - self->drawImage(*r, *pm, *sr, static_cast(flags)); -} - -QPixmap* QPaintEngine_CreatePixmapFromImage2(QPaintEngine* self, QImage* image, int flags) { +QPixmap* QPaintEngine_CreatePixmapFromImage(QPaintEngine* self, QImage* image, int flags) { return new QPixmap(self->createPixmapFromImage(*image, static_cast(flags))); } -void QPaintEngine_Delete(QPaintEngine* self) { - delete self; +void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } int QPaintEngineState_State(const QPaintEngineState* self) { @@ -307,7 +307,11 @@ bool QPaintEngineState_PenNeedsResolving(const QPaintEngineState* self) { return self->penNeedsResolving(); } -void QPaintEngineState_Delete(QPaintEngineState* self) { - delete self; +void QPaintEngineState_Delete(QPaintEngineState* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpaintengine.go b/qt6/gen_qpaintengine.go index f21694ea..45694218 100644 --- a/qt6/gen_qpaintengine.go +++ b/qt6/gen_qpaintengine.go @@ -101,7 +101,8 @@ const ( ) type QTextItem struct { - h *C.QTextItem + h *C.QTextItem + isSubclass bool } func (this *QTextItem) cPointer() *C.QTextItem { @@ -118,6 +119,7 @@ func (this *QTextItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextItem constructs the type using only CGO pointers. func newQTextItem(h *C.QTextItem) *QTextItem { if h == nil { return nil @@ -125,8 +127,13 @@ func newQTextItem(h *C.QTextItem) *QTextItem { return &QTextItem{h: h} } +// UnsafeNewQTextItem constructs the type using only unsafe pointers. func UnsafeNewQTextItem(h unsafe.Pointer) *QTextItem { - return newQTextItem((*C.QTextItem)(h)) + if h == nil { + return nil + } + + return &QTextItem{h: (*C.QTextItem)(h)} } func (this *QTextItem) Descent() float64 { @@ -161,7 +168,7 @@ func (this *QTextItem) Font() *QFont { // Delete this object from C++ memory. func (this *QTextItem) Delete() { - C.QTextItem_Delete(this.h) + C.QTextItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -174,7 +181,8 @@ func (this *QTextItem) GoGC() { } type QPaintEngine struct { - h *C.QPaintEngine + h *C.QPaintEngine + isSubclass bool } func (this *QPaintEngine) cPointer() *C.QPaintEngine { @@ -191,6 +199,7 @@ func (this *QPaintEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPaintEngine constructs the type using only CGO pointers. func newQPaintEngine(h *C.QPaintEngine) *QPaintEngine { if h == nil { return nil @@ -198,8 +207,13 @@ func newQPaintEngine(h *C.QPaintEngine) *QPaintEngine { return &QPaintEngine{h: h} } +// UnsafeNewQPaintEngine constructs the type using only unsafe pointers. func UnsafeNewQPaintEngine(h unsafe.Pointer) *QPaintEngine { - return newQPaintEngine((*C.QPaintEngine)(h)) + if h == nil { + return nil + } + + return &QPaintEngine{h: (*C.QPaintEngine)(h)} } func (this *QPaintEngine) IsActive() bool { @@ -278,8 +292,8 @@ func (this *QPaintEngine) DrawTiledPixmap(r *QRectF, pixmap *QPixmap, s *QPointF C.QPaintEngine_DrawTiledPixmap(this.h, r.cPointer(), pixmap.cPointer(), s.cPointer()) } -func (this *QPaintEngine) DrawImage(r *QRectF, pm *QImage, sr *QRectF) { - C.QPaintEngine_DrawImage(this.h, r.cPointer(), pm.cPointer(), sr.cPointer()) +func (this *QPaintEngine) DrawImage(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag) { + C.QPaintEngine_DrawImage(this.h, r.cPointer(), pm.cPointer(), sr.cPointer(), (C.int)(flags)) } func (this *QPaintEngine) SetPaintDevice(device *QPaintDevice) { @@ -357,32 +371,21 @@ func (this *QPaintEngine) IsExtended() bool { func (this *QPaintEngine) CreatePixmap(size QSize) *QPixmap { _ret := C.QPaintEngine_CreatePixmap(this.h, size.cPointer()) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QPaintEngine) CreatePixmapFromImage(image QImage) *QPixmap { - _ret := C.QPaintEngine_CreatePixmapFromImage(this.h, image.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QPaintEngine) DrawImage4(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag) { - C.QPaintEngine_DrawImage4(this.h, r.cPointer(), pm.cPointer(), sr.cPointer(), (C.int)(flags)) -} - -func (this *QPaintEngine) CreatePixmapFromImage2(image QImage, flags ImageConversionFlag) *QPixmap { - _ret := C.QPaintEngine_CreatePixmapFromImage2(this.h, image.cPointer(), (C.int)(flags)) - _goptr := newQPixmap(_ret) +func (this *QPaintEngine) CreatePixmapFromImage(image QImage, flags ImageConversionFlag) *QPixmap { + _ret := C.QPaintEngine_CreatePixmapFromImage(this.h, image.cPointer(), (C.int)(flags)) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } // Delete this object from C++ memory. func (this *QPaintEngine) Delete() { - C.QPaintEngine_Delete(this.h) + C.QPaintEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -395,7 +398,8 @@ func (this *QPaintEngine) GoGC() { } type QPaintEngineState struct { - h *C.QPaintEngineState + h *C.QPaintEngineState + isSubclass bool } func (this *QPaintEngineState) cPointer() *C.QPaintEngineState { @@ -412,6 +416,7 @@ func (this *QPaintEngineState) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPaintEngineState constructs the type using only CGO pointers. func newQPaintEngineState(h *C.QPaintEngineState) *QPaintEngineState { if h == nil { return nil @@ -419,8 +424,13 @@ func newQPaintEngineState(h *C.QPaintEngineState) *QPaintEngineState { return &QPaintEngineState{h: h} } +// UnsafeNewQPaintEngineState constructs the type using only unsafe pointers. func UnsafeNewQPaintEngineState(h unsafe.Pointer) *QPaintEngineState { - return newQPaintEngineState((*C.QPaintEngineState)(h)) + if h == nil { + return nil + } + + return &QPaintEngineState{h: (*C.QPaintEngineState)(h)} } func (this *QPaintEngineState) State() QPaintEngine__DirtyFlag { @@ -521,7 +531,7 @@ func (this *QPaintEngineState) PenNeedsResolving() bool { // Delete this object from C++ memory. func (this *QPaintEngineState) Delete() { - C.QPaintEngineState_Delete(this.h) + C.QPaintEngineState_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpaintengine.h b/qt6/gen_qpaintengine.h index c1ae4c87..83ad1a2f 100644 --- a/qt6/gen_qpaintengine.h +++ b/qt6/gen_qpaintengine.h @@ -64,7 +64,7 @@ double QTextItem_Width(const QTextItem* self); int QTextItem_RenderFlags(const QTextItem* self); struct miqt_string QTextItem_Text(const QTextItem* self); QFont* QTextItem_Font(const QTextItem* self); -void QTextItem_Delete(QTextItem* self); +void QTextItem_Delete(QTextItem* self, bool isSubclass); bool QPaintEngine_IsActive(const QPaintEngine* self); void QPaintEngine_SetActive(QPaintEngine* self, bool newState); @@ -85,7 +85,7 @@ void QPaintEngine_DrawPolygon2(QPaintEngine* self, QPoint* points, int pointCoun void QPaintEngine_DrawPixmap(QPaintEngine* self, QRectF* r, QPixmap* pm, QRectF* sr); void QPaintEngine_DrawTextItem(QPaintEngine* self, QPointF* p, QTextItem* textItem); void QPaintEngine_DrawTiledPixmap(QPaintEngine* self, QRectF* r, QPixmap* pixmap, QPointF* s); -void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr); +void QPaintEngine_DrawImage(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags); void QPaintEngine_SetPaintDevice(QPaintEngine* self, QPaintDevice* device); QPaintDevice* QPaintEngine_PaintDevice(const QPaintEngine* self); void QPaintEngine_SetSystemClip(QPaintEngine* self, QRegion* baseClip); @@ -103,10 +103,8 @@ QPainter* QPaintEngine_Painter(const QPaintEngine* self); void QPaintEngine_SyncState(QPaintEngine* self); bool QPaintEngine_IsExtended(const QPaintEngine* self); QPixmap* QPaintEngine_CreatePixmap(QPaintEngine* self, QSize* size); -QPixmap* QPaintEngine_CreatePixmapFromImage(QPaintEngine* self, QImage* image); -void QPaintEngine_DrawImage4(QPaintEngine* self, QRectF* r, QImage* pm, QRectF* sr, int flags); -QPixmap* QPaintEngine_CreatePixmapFromImage2(QPaintEngine* self, QImage* image, int flags); -void QPaintEngine_Delete(QPaintEngine* self); +QPixmap* QPaintEngine_CreatePixmapFromImage(QPaintEngine* self, QImage* image, int flags); +void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass); int QPaintEngineState_State(const QPaintEngineState* self); QPen* QPaintEngineState_Pen(const QPaintEngineState* self); @@ -126,7 +124,7 @@ double QPaintEngineState_Opacity(const QPaintEngineState* self); QPainter* QPaintEngineState_Painter(const QPaintEngineState* self); bool QPaintEngineState_BrushNeedsResolving(const QPaintEngineState* self); bool QPaintEngineState_PenNeedsResolving(const QPaintEngineState* self); -void QPaintEngineState_Delete(QPaintEngineState* self); +void QPaintEngineState_Delete(QPaintEngineState* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpainter.cpp b/qt6/gen_qpainter.cpp index 5dc961af..1a1f2932 100644 --- a/qt6/gen_qpainter.cpp +++ b/qt6/gen_qpainter.cpp @@ -32,12 +32,14 @@ #include "gen_qpainter.h" #include "_cgo_export.h" -QPainter* QPainter_new() { - return new QPainter(); +void QPainter_new(QPainter** outptr_QPainter) { + QPainter* ret = new QPainter(); + *outptr_QPainter = ret; } -QPainter* QPainter_new2(QPaintDevice* param1) { - return new QPainter(param1); +void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter) { + QPainter* ret = new QPainter(param1); + *outptr_QPainter = ret; } QPaintDevice* QPainter_Device(const QPainter* self) { @@ -988,8 +990,12 @@ void QPainter_SetRenderHints2(QPainter* self, int hints, bool on) { self->setRenderHints(static_cast(hints), on); } -void QPainter_Delete(QPainter* self) { - delete self; +void QPainter_Delete(QPainter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QPainter__PixmapFragment* QPainter__PixmapFragment_Create(QPointF* pos, QRectF* sourceRect) { @@ -1012,7 +1018,11 @@ QPainter__PixmapFragment* QPainter__PixmapFragment_Create6(QPointF* pos, QRectF* return new QPainter::PixmapFragment(QPainter::PixmapFragment::create(*pos, *sourceRect, static_cast(scaleX), static_cast(scaleY), static_cast(rotation), static_cast(opacity))); } -void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self) { - delete self; +void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpainter.go b/qt6/gen_qpainter.go index e6254ae3..d09bb365 100644 --- a/qt6/gen_qpainter.go +++ b/qt6/gen_qpainter.go @@ -74,7 +74,8 @@ const ( ) type QPainter struct { - h *C.QPainter + h *C.QPainter + isSubclass bool } func (this *QPainter) cPointer() *C.QPainter { @@ -91,6 +92,7 @@ func (this *QPainter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainter constructs the type using only CGO pointers. func newQPainter(h *C.QPainter) *QPainter { if h == nil { return nil @@ -98,20 +100,33 @@ func newQPainter(h *C.QPainter) *QPainter { return &QPainter{h: h} } +// UnsafeNewQPainter constructs the type using only unsafe pointers. func UnsafeNewQPainter(h unsafe.Pointer) *QPainter { - return newQPainter((*C.QPainter)(h)) + if h == nil { + return nil + } + + return &QPainter{h: (*C.QPainter)(h)} } // NewQPainter constructs a new QPainter object. func NewQPainter() *QPainter { - ret := C.QPainter_new() - return newQPainter(ret) + var outptr_QPainter *C.QPainter = nil + + C.QPainter_new(&outptr_QPainter) + ret := newQPainter(outptr_QPainter) + ret.isSubclass = true + return ret } // NewQPainter2 constructs a new QPainter object. func NewQPainter2(param1 *QPaintDevice) *QPainter { - ret := C.QPainter_new2(param1.cPointer()) - return newQPainter(ret) + var outptr_QPainter *C.QPainter = nil + + C.QPainter_new2(param1.cPointer(), &outptr_QPainter) + ret := newQPainter(outptr_QPainter) + ret.isSubclass = true + return ret } func (this *QPainter) Device() *QPaintDevice { @@ -1138,7 +1153,7 @@ func (this *QPainter) SetRenderHints2(hints QPainter__RenderHint, on bool) { // Delete this object from C++ memory. func (this *QPainter) Delete() { - C.QPainter_Delete(this.h) + C.QPainter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1151,7 +1166,8 @@ func (this *QPainter) GoGC() { } type QPainter__PixmapFragment struct { - h *C.QPainter__PixmapFragment + h *C.QPainter__PixmapFragment + isSubclass bool } func (this *QPainter__PixmapFragment) cPointer() *C.QPainter__PixmapFragment { @@ -1168,6 +1184,7 @@ func (this *QPainter__PixmapFragment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainter__PixmapFragment constructs the type using only CGO pointers. func newQPainter__PixmapFragment(h *C.QPainter__PixmapFragment) *QPainter__PixmapFragment { if h == nil { return nil @@ -1175,8 +1192,13 @@ func newQPainter__PixmapFragment(h *C.QPainter__PixmapFragment) *QPainter__Pixma return &QPainter__PixmapFragment{h: h} } +// UnsafeNewQPainter__PixmapFragment constructs the type using only unsafe pointers. func UnsafeNewQPainter__PixmapFragment(h unsafe.Pointer) *QPainter__PixmapFragment { - return newQPainter__PixmapFragment((*C.QPainter__PixmapFragment)(h)) + if h == nil { + return nil + } + + return &QPainter__PixmapFragment{h: (*C.QPainter__PixmapFragment)(h)} } func QPainter__PixmapFragment_Create(pos *QPointF, sourceRect *QRectF) *QPainter__PixmapFragment { @@ -1216,7 +1238,7 @@ func QPainter__PixmapFragment_Create6(pos *QPointF, sourceRect *QRectF, scaleX f // Delete this object from C++ memory. func (this *QPainter__PixmapFragment) Delete() { - C.QPainter__PixmapFragment_Delete(this.h) + C.QPainter__PixmapFragment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpainter.h b/qt6/gen_qpainter.h index 86251872..846f4c6a 100644 --- a/qt6/gen_qpainter.h +++ b/qt6/gen_qpainter.h @@ -74,8 +74,8 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -QPainter* QPainter_new(); -QPainter* QPainter_new2(QPaintDevice* param1); +void QPainter_new(QPainter** outptr_QPainter); +void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter); QPaintDevice* QPainter_Device(const QPainter* self); bool QPainter_Begin(QPainter* self, QPaintDevice* param1); bool QPainter_End(QPainter* self); @@ -295,14 +295,14 @@ void QPainter_DrawText32(QPainter* self, QRectF* r, struct miqt_string text, QTe QRectF* QPainter_BoundingRect32(QPainter* self, QRectF* rect, struct miqt_string text, QTextOption* o); void QPainter_SetRenderHint2(QPainter* self, int hint, bool on); void QPainter_SetRenderHints2(QPainter* self, int hints, bool on); -void QPainter_Delete(QPainter* self); +void QPainter_Delete(QPainter* self, bool isSubclass); QPainter__PixmapFragment* QPainter__PixmapFragment_Create(QPointF* pos, QRectF* sourceRect); QPainter__PixmapFragment* QPainter__PixmapFragment_Create3(QPointF* pos, QRectF* sourceRect, double scaleX); QPainter__PixmapFragment* QPainter__PixmapFragment_Create4(QPointF* pos, QRectF* sourceRect, double scaleX, double scaleY); QPainter__PixmapFragment* QPainter__PixmapFragment_Create5(QPointF* pos, QRectF* sourceRect, double scaleX, double scaleY, double rotation); QPainter__PixmapFragment* QPainter__PixmapFragment_Create6(QPointF* pos, QRectF* sourceRect, double scaleX, double scaleY, double rotation, double opacity); -void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self); +void QPainter__PixmapFragment_Delete(QPainter__PixmapFragment* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpainterpath.cpp b/qt6/gen_qpainterpath.cpp index b55f6653..3b3780c4 100644 --- a/qt6/gen_qpainterpath.cpp +++ b/qt6/gen_qpainterpath.cpp @@ -14,16 +14,19 @@ #include "gen_qpainterpath.h" #include "_cgo_export.h" -QPainterPath* QPainterPath_new() { - return new QPainterPath(); +void QPainterPath_new(QPainterPath** outptr_QPainterPath) { + QPainterPath* ret = new QPainterPath(); + *outptr_QPainterPath = ret; } -QPainterPath* QPainterPath_new2(QPointF* startPoint) { - return new QPainterPath(*startPoint); +void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath) { + QPainterPath* ret = new QPainterPath(*startPoint); + *outptr_QPainterPath = ret; } -QPainterPath* QPainterPath_new3(QPainterPath* other) { - return new QPainterPath(*other); +void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath) { + QPainterPath* ret = new QPainterPath(*other); + *outptr_QPainterPath = ret; } void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other) { @@ -317,16 +320,22 @@ void QPainterPath_AddRoundedRect7(QPainterPath* self, double x, double y, double self->addRoundedRect(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(xRadius), static_cast(yRadius), static_cast(mode)); } -void QPainterPath_Delete(QPainterPath* self) { - delete self; +void QPainterPath_Delete(QPainterPath* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPainterPathStroker* QPainterPathStroker_new() { - return new QPainterPathStroker(); +void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker) { + QPainterPathStroker* ret = new QPainterPathStroker(); + *outptr_QPainterPathStroker = ret; } -QPainterPathStroker* QPainterPathStroker_new2(QPen* pen) { - return new QPainterPathStroker(*pen); +void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker) { + QPainterPathStroker* ret = new QPainterPathStroker(*pen); + *outptr_QPainterPathStroker = ret; } void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width) { @@ -414,8 +423,12 @@ QPainterPath* QPainterPathStroker_CreateStroke(const QPainterPathStroker* self, return new QPainterPath(self->createStroke(*path)); } -void QPainterPathStroker_Delete(QPainterPathStroker* self) { - delete self; +void QPainterPathStroker_Delete(QPainterPathStroker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } bool QPainterPath__Element_IsMoveTo(const QPainterPath__Element* self) { @@ -438,7 +451,11 @@ bool QPainterPath__Element_OperatorNotEqual(const QPainterPath__Element* self, Q return self->operator!=(*e); } -void QPainterPath__Element_Delete(QPainterPath__Element* self) { - delete self; +void QPainterPath__Element_Delete(QPainterPath__Element* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpainterpath.go b/qt6/gen_qpainterpath.go index 6b726a99..713a8707 100644 --- a/qt6/gen_qpainterpath.go +++ b/qt6/gen_qpainterpath.go @@ -23,7 +23,8 @@ const ( ) type QPainterPath struct { - h *C.QPainterPath + h *C.QPainterPath + isSubclass bool } func (this *QPainterPath) cPointer() *C.QPainterPath { @@ -40,6 +41,7 @@ func (this *QPainterPath) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainterPath constructs the type using only CGO pointers. func newQPainterPath(h *C.QPainterPath) *QPainterPath { if h == nil { return nil @@ -47,26 +49,43 @@ func newQPainterPath(h *C.QPainterPath) *QPainterPath { return &QPainterPath{h: h} } +// UnsafeNewQPainterPath constructs the type using only unsafe pointers. func UnsafeNewQPainterPath(h unsafe.Pointer) *QPainterPath { - return newQPainterPath((*C.QPainterPath)(h)) + if h == nil { + return nil + } + + return &QPainterPath{h: (*C.QPainterPath)(h)} } // NewQPainterPath constructs a new QPainterPath object. func NewQPainterPath() *QPainterPath { - ret := C.QPainterPath_new() - return newQPainterPath(ret) + var outptr_QPainterPath *C.QPainterPath = nil + + C.QPainterPath_new(&outptr_QPainterPath) + ret := newQPainterPath(outptr_QPainterPath) + ret.isSubclass = true + return ret } // NewQPainterPath2 constructs a new QPainterPath object. func NewQPainterPath2(startPoint *QPointF) *QPainterPath { - ret := C.QPainterPath_new2(startPoint.cPointer()) - return newQPainterPath(ret) + var outptr_QPainterPath *C.QPainterPath = nil + + C.QPainterPath_new2(startPoint.cPointer(), &outptr_QPainterPath) + ret := newQPainterPath(outptr_QPainterPath) + ret.isSubclass = true + return ret } // NewQPainterPath3 constructs a new QPainterPath object. func NewQPainterPath3(other *QPainterPath) *QPainterPath { - ret := C.QPainterPath_new3(other.cPointer()) - return newQPainterPath(ret) + var outptr_QPainterPath *C.QPainterPath = nil + + C.QPainterPath_new3(other.cPointer(), &outptr_QPainterPath) + ret := newQPainterPath(outptr_QPainterPath) + ret.isSubclass = true + return ret } func (this *QPainterPath) OperatorAssign(other *QPainterPath) { @@ -407,7 +426,7 @@ func (this *QPainterPath) AddRoundedRect7(x float64, y float64, w float64, h flo // Delete this object from C++ memory. func (this *QPainterPath) Delete() { - C.QPainterPath_Delete(this.h) + C.QPainterPath_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -420,7 +439,8 @@ func (this *QPainterPath) GoGC() { } type QPainterPathStroker struct { - h *C.QPainterPathStroker + h *C.QPainterPathStroker + isSubclass bool } func (this *QPainterPathStroker) cPointer() *C.QPainterPathStroker { @@ -437,6 +457,7 @@ func (this *QPainterPathStroker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainterPathStroker constructs the type using only CGO pointers. func newQPainterPathStroker(h *C.QPainterPathStroker) *QPainterPathStroker { if h == nil { return nil @@ -444,20 +465,33 @@ func newQPainterPathStroker(h *C.QPainterPathStroker) *QPainterPathStroker { return &QPainterPathStroker{h: h} } +// UnsafeNewQPainterPathStroker constructs the type using only unsafe pointers. func UnsafeNewQPainterPathStroker(h unsafe.Pointer) *QPainterPathStroker { - return newQPainterPathStroker((*C.QPainterPathStroker)(h)) + if h == nil { + return nil + } + + return &QPainterPathStroker{h: (*C.QPainterPathStroker)(h)} } // NewQPainterPathStroker constructs a new QPainterPathStroker object. func NewQPainterPathStroker() *QPainterPathStroker { - ret := C.QPainterPathStroker_new() - return newQPainterPathStroker(ret) + var outptr_QPainterPathStroker *C.QPainterPathStroker = nil + + C.QPainterPathStroker_new(&outptr_QPainterPathStroker) + ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret.isSubclass = true + return ret } // NewQPainterPathStroker2 constructs a new QPainterPathStroker object. func NewQPainterPathStroker2(pen *QPen) *QPainterPathStroker { - ret := C.QPainterPathStroker_new2(pen.cPointer()) - return newQPainterPathStroker(ret) + var outptr_QPainterPathStroker *C.QPainterPathStroker = nil + + C.QPainterPathStroker_new2(pen.cPointer(), &outptr_QPainterPathStroker) + ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret.isSubclass = true + return ret } func (this *QPainterPathStroker) SetWidth(width float64) { @@ -541,7 +575,7 @@ func (this *QPainterPathStroker) CreateStroke(path *QPainterPath) *QPainterPath // Delete this object from C++ memory. func (this *QPainterPathStroker) Delete() { - C.QPainterPathStroker_Delete(this.h) + C.QPainterPathStroker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -554,7 +588,8 @@ func (this *QPainterPathStroker) GoGC() { } type QPainterPath__Element struct { - h *C.QPainterPath__Element + h *C.QPainterPath__Element + isSubclass bool } func (this *QPainterPath__Element) cPointer() *C.QPainterPath__Element { @@ -571,6 +606,7 @@ func (this *QPainterPath__Element) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPainterPath__Element constructs the type using only CGO pointers. func newQPainterPath__Element(h *C.QPainterPath__Element) *QPainterPath__Element { if h == nil { return nil @@ -578,8 +614,13 @@ func newQPainterPath__Element(h *C.QPainterPath__Element) *QPainterPath__Element return &QPainterPath__Element{h: h} } +// UnsafeNewQPainterPath__Element constructs the type using only unsafe pointers. func UnsafeNewQPainterPath__Element(h unsafe.Pointer) *QPainterPath__Element { - return newQPainterPath__Element((*C.QPainterPath__Element)(h)) + if h == nil { + return nil + } + + return &QPainterPath__Element{h: (*C.QPainterPath__Element)(h)} } func (this *QPainterPath__Element) IsMoveTo() bool { @@ -604,7 +645,7 @@ func (this *QPainterPath__Element) OperatorNotEqual(e *QPainterPath__Element) bo // Delete this object from C++ memory. func (this *QPainterPath__Element) Delete() { - C.QPainterPath__Element_Delete(this.h) + C.QPainterPath__Element_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpainterpath.h b/qt6/gen_qpainterpath.h index 8c4aa475..af4a5126 100644 --- a/qt6/gen_qpainterpath.h +++ b/qt6/gen_qpainterpath.h @@ -38,9 +38,9 @@ typedef struct QRectF QRectF; typedef struct QRegion QRegion; #endif -QPainterPath* QPainterPath_new(); -QPainterPath* QPainterPath_new2(QPointF* startPoint); -QPainterPath* QPainterPath_new3(QPainterPath* other); +void QPainterPath_new(QPainterPath** outptr_QPainterPath); +void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath); +void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath); void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other); void QPainterPath_Swap(QPainterPath* self, QPainterPath* other); void QPainterPath_Clear(QPainterPath* self); @@ -111,10 +111,10 @@ QPainterPath* QPainterPath_OperatorPlusAssign(QPainterPath* self, QPainterPath* QPainterPath* QPainterPath_OperatorMinusAssign(QPainterPath* self, QPainterPath* other); void QPainterPath_AddRoundedRect4(QPainterPath* self, QRectF* rect, double xRadius, double yRadius, int mode); void QPainterPath_AddRoundedRect7(QPainterPath* self, double x, double y, double w, double h, double xRadius, double yRadius, int mode); -void QPainterPath_Delete(QPainterPath* self); +void QPainterPath_Delete(QPainterPath* self, bool isSubclass); -QPainterPathStroker* QPainterPathStroker_new(); -QPainterPathStroker* QPainterPathStroker_new2(QPen* pen); +void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker); +void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker); void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width); double QPainterPathStroker_Width(const QPainterPathStroker* self); void QPainterPathStroker_SetCapStyle(QPainterPathStroker* self, int style); @@ -131,14 +131,14 @@ struct miqt_array /* of double */ QPainterPathStroker_DashPattern(const QPainte void QPainterPathStroker_SetDashOffset(QPainterPathStroker* self, double offset); double QPainterPathStroker_DashOffset(const QPainterPathStroker* self); QPainterPath* QPainterPathStroker_CreateStroke(const QPainterPathStroker* self, QPainterPath* path); -void QPainterPathStroker_Delete(QPainterPathStroker* self); +void QPainterPathStroker_Delete(QPainterPathStroker* self, bool isSubclass); bool QPainterPath__Element_IsMoveTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsLineTo(const QPainterPath__Element* self); bool QPainterPath__Element_IsCurveTo(const QPainterPath__Element* self); bool QPainterPath__Element_OperatorEqual(const QPainterPath__Element* self, QPainterPath__Element* e); bool QPainterPath__Element_OperatorNotEqual(const QPainterPath__Element* self, QPainterPath__Element* e); -void QPainterPath__Element_Delete(QPainterPath__Element* self); +void QPainterPath__Element_Delete(QPainterPath__Element* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpalette.cpp b/qt6/gen_qpalette.cpp index 264fa206..eebb46c3 100644 --- a/qt6/gen_qpalette.cpp +++ b/qt6/gen_qpalette.cpp @@ -5,32 +5,39 @@ #include "gen_qpalette.h" #include "_cgo_export.h" -QPalette* QPalette_new() { - return new QPalette(); +void QPalette_new(QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(); + *outptr_QPalette = ret; } -QPalette* QPalette_new2(QColor* button) { - return new QPalette(*button); +void QPalette_new2(QColor* button, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*button); + *outptr_QPalette = ret; } -QPalette* QPalette_new3(int button) { - return new QPalette(static_cast(button)); +void QPalette_new3(int button, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(static_cast(button)); + *outptr_QPalette = ret; } -QPalette* QPalette_new4(QColor* button, QColor* window) { - return new QPalette(*button, *window); +void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*button, *window); + *outptr_QPalette = ret; } -QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window) { - return new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); +void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); + *outptr_QPalette = ret; } -QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base) { - return new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); +void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); + *outptr_QPalette = ret; } -QPalette* QPalette_new7(QPalette* palette) { - return new QPalette(*palette); +void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette) { + QPalette* ret = new QPalette(*palette); + *outptr_QPalette = ret; } void QPalette_OperatorAssign(QPalette* self, QPalette* palette) { @@ -252,7 +259,11 @@ void QPalette_SetResolveMask(QPalette* self, unsigned long long mask) { self->setResolveMask(static_cast(mask)); } -void QPalette_Delete(QPalette* self) { - delete self; +void QPalette_Delete(QPalette* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpalette.go b/qt6/gen_qpalette.go index 7c363d1e..2bf07c58 100644 --- a/qt6/gen_qpalette.go +++ b/qt6/gen_qpalette.go @@ -53,7 +53,8 @@ const ( ) type QPalette struct { - h *C.QPalette + h *C.QPalette + isSubclass bool } func (this *QPalette) cPointer() *C.QPalette { @@ -70,6 +71,7 @@ func (this *QPalette) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPalette constructs the type using only CGO pointers. func newQPalette(h *C.QPalette) *QPalette { if h == nil { return nil @@ -77,50 +79,83 @@ func newQPalette(h *C.QPalette) *QPalette { return &QPalette{h: h} } +// UnsafeNewQPalette constructs the type using only unsafe pointers. func UnsafeNewQPalette(h unsafe.Pointer) *QPalette { - return newQPalette((*C.QPalette)(h)) + if h == nil { + return nil + } + + return &QPalette{h: (*C.QPalette)(h)} } // NewQPalette constructs a new QPalette object. func NewQPalette() *QPalette { - ret := C.QPalette_new() - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new(&outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette2 constructs a new QPalette object. func NewQPalette2(button *QColor) *QPalette { - ret := C.QPalette_new2(button.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new2(button.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette3 constructs a new QPalette object. func NewQPalette3(button GlobalColor) *QPalette { - ret := C.QPalette_new3((C.int)(button)) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new3((C.int)(button), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette4 constructs a new QPalette object. func NewQPalette4(button *QColor, window *QColor) *QPalette { - ret := C.QPalette_new4(button.cPointer(), window.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new4(button.cPointer(), window.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette5 constructs a new QPalette object. func NewQPalette5(windowText *QBrush, button *QBrush, light *QBrush, dark *QBrush, mid *QBrush, text *QBrush, bright_text *QBrush, base *QBrush, window *QBrush) *QPalette { - ret := C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette6 constructs a new QPalette object. func NewQPalette6(windowText *QColor, window *QColor, light *QColor, dark *QColor, mid *QColor, text *QColor, base *QColor) *QPalette { - ret := C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } // NewQPalette7 constructs a new QPalette object. func NewQPalette7(palette *QPalette) *QPalette { - ret := C.QPalette_new7(palette.cPointer()) - return newQPalette(ret) + var outptr_QPalette *C.QPalette = nil + + C.QPalette_new7(palette.cPointer(), &outptr_QPalette) + ret := newQPalette(outptr_QPalette) + ret.isSubclass = true + return ret } func (this *QPalette) OperatorAssign(palette *QPalette) { @@ -296,7 +331,7 @@ func (this *QPalette) SetResolveMask(mask uint64) { // Delete this object from C++ memory. func (this *QPalette) Delete() { - C.QPalette_Delete(this.h) + C.QPalette_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpalette.h b/qt6/gen_qpalette.h index 71fb21db..af10434e 100644 --- a/qt6/gen_qpalette.h +++ b/qt6/gen_qpalette.h @@ -24,13 +24,13 @@ typedef struct QColor QColor; typedef struct QPalette QPalette; #endif -QPalette* QPalette_new(); -QPalette* QPalette_new2(QColor* button); -QPalette* QPalette_new3(int button); -QPalette* QPalette_new4(QColor* button, QColor* window); -QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window); -QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base); -QPalette* QPalette_new7(QPalette* palette); +void QPalette_new(QPalette** outptr_QPalette); +void QPalette_new2(QColor* button, QPalette** outptr_QPalette); +void QPalette_new3(int button, QPalette** outptr_QPalette); +void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette); +void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette); +void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette); +void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette); void QPalette_OperatorAssign(QPalette* self, QPalette* palette); void QPalette_Swap(QPalette* self, QPalette* other); int QPalette_CurrentColorGroup(const QPalette* self); @@ -73,7 +73,7 @@ long long QPalette_CacheKey(const QPalette* self); QPalette* QPalette_Resolve(const QPalette* self, QPalette* other); unsigned long long QPalette_ResolveMask(const QPalette* self); void QPalette_SetResolveMask(QPalette* self, unsigned long long mask); -void QPalette_Delete(QPalette* self); +void QPalette_Delete(QPalette* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qparallelanimationgroup.cpp b/qt6/gen_qparallelanimationgroup.cpp index cbcc1505..6c426500 100644 --- a/qt6/gen_qparallelanimationgroup.cpp +++ b/qt6/gen_qparallelanimationgroup.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -8,12 +11,151 @@ #include "gen_qparallelanimationgroup.h" #include "_cgo_export.h" -QParallelAnimationGroup* QParallelAnimationGroup_new() { - return new QParallelAnimationGroup(); +class MiqtVirtualQParallelAnimationGroup : public virtual QParallelAnimationGroup { +public: + + MiqtVirtualQParallelAnimationGroup(): QParallelAnimationGroup() {}; + MiqtVirtualQParallelAnimationGroup(QObject* parent): QParallelAnimationGroup(parent) {}; + + virtual ~MiqtVirtualQParallelAnimationGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QParallelAnimationGroup::duration(); + } + + + int callback_return_value = miqt_exec_callback_QParallelAnimationGroup_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QParallelAnimationGroup::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QParallelAnimationGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QParallelAnimationGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QParallelAnimationGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int currentTime) override { + if (handle__UpdateCurrentTime == 0) { + QParallelAnimationGroup::updateCurrentTime(currentTime); + return; + } + + int sigval1 = currentTime; + + miqt_exec_callback_QParallelAnimationGroup_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int currentTime) { + + QParallelAnimationGroup::updateCurrentTime(static_cast(currentTime)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QParallelAnimationGroup::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QParallelAnimationGroup_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QParallelAnimationGroup::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QParallelAnimationGroup::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QParallelAnimationGroup_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QParallelAnimationGroup::updateDirection(static_cast(direction)); + + } + +}; + +void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(); + *outptr_QParallelAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent) { - return new QParallelAnimationGroup(parent); +void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(parent); + *outptr_QParallelAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self) { @@ -61,7 +203,51 @@ struct miqt_string QParallelAnimationGroup_Tr3(const char* s, const char* c, int return _ms; } -void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self) { - delete self; +void QParallelAnimationGroup_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__Duration = slot; +} + +int QParallelAnimationGroup_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_Duration(); +} + +void QParallelAnimationGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__Event = slot; +} + +bool QParallelAnimationGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_Event(event); +} + +void QParallelAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QParallelAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int currentTime) { + ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_UpdateCurrentTime(currentTime); +} + +void QParallelAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__UpdateState = slot; +} + +void QParallelAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QParallelAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QParallelAnimationGroup*)(self) )->handle__UpdateDirection = slot; +} + +void QParallelAnimationGroup_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQParallelAnimationGroup*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qparallelanimationgroup.go b/qt6/gen_qparallelanimationgroup.go index 257a7253..f99fe409 100644 --- a/qt6/gen_qparallelanimationgroup.go +++ b/qt6/gen_qparallelanimationgroup.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QParallelAnimationGroup struct { - h *C.QParallelAnimationGroup + h *C.QParallelAnimationGroup + isSubclass bool *QAnimationGroup } @@ -32,27 +34,49 @@ func (this *QParallelAnimationGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQParallelAnimationGroup(h *C.QParallelAnimationGroup) *QParallelAnimationGroup { +// newQParallelAnimationGroup constructs the type using only CGO pointers. +func newQParallelAnimationGroup(h *C.QParallelAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QParallelAnimationGroup { if h == nil { return nil } - return &QParallelAnimationGroup{h: h, QAnimationGroup: UnsafeNewQAnimationGroup(unsafe.Pointer(h))} + return &QParallelAnimationGroup{h: h, + QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer) *QParallelAnimationGroup { - return newQParallelAnimationGroup((*C.QParallelAnimationGroup)(h)) +// UnsafeNewQParallelAnimationGroup constructs the type using only unsafe pointers. +func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QParallelAnimationGroup { + if h == nil { + return nil + } + + return &QParallelAnimationGroup{h: (*C.QParallelAnimationGroup)(h), + QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } // NewQParallelAnimationGroup constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup() *QParallelAnimationGroup { - ret := C.QParallelAnimationGroup_new() - return newQParallelAnimationGroup(ret) + var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QParallelAnimationGroup_new(&outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQParallelAnimationGroup2 constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup2(parent *QObject) *QParallelAnimationGroup { - ret := C.QParallelAnimationGroup_new2(parent.cPointer()) - return newQParallelAnimationGroup(ret) + var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QParallelAnimationGroup_new2(parent.cPointer(), &outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QParallelAnimationGroup) MetaObject() *QMetaObject { @@ -100,9 +124,127 @@ func QParallelAnimationGroup_Tr3(s string, c string, n int) string { return _ret } +func (this *QParallelAnimationGroup) callVirtualBase_Duration() int { + + return (int)(C.QParallelAnimationGroup_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QParallelAnimationGroup) OnDuration(slot func(super func() int) int) { + C.QParallelAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_Duration +func miqt_exec_callback_QParallelAnimationGroup_Duration(self *C.QParallelAnimationGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QParallelAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QParallelAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QParallelAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_Event +func miqt_exec_callback_QParallelAnimationGroup_Event(self *C.QParallelAnimationGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_UpdateCurrentTime(currentTime int) { + + C.QParallelAnimationGroup_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(currentTime)) + +} +func (this *QParallelAnimationGroup) OnUpdateCurrentTime(slot func(super func(currentTime int), currentTime int)) { + C.QParallelAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_UpdateCurrentTime +func miqt_exec_callback_QParallelAnimationGroup_UpdateCurrentTime(self *C.QParallelAnimationGroup, cb C.intptr_t, currentTime C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(currentTime int), currentTime int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentTime) + + gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QParallelAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QParallelAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QParallelAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_UpdateState +func miqt_exec_callback_QParallelAnimationGroup_UpdateState(self *C.QParallelAnimationGroup, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QParallelAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QParallelAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QParallelAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QParallelAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QParallelAnimationGroup_UpdateDirection +func miqt_exec_callback_QParallelAnimationGroup_UpdateDirection(self *C.QParallelAnimationGroup, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QParallelAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QParallelAnimationGroup) Delete() { - C.QParallelAnimationGroup_Delete(this.h) + C.QParallelAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qparallelanimationgroup.h b/qt6/gen_qparallelanimationgroup.h index 1220696f..3fc3e002 100644 --- a/qt6/gen_qparallelanimationgroup.h +++ b/qt6/gen_qparallelanimationgroup.h @@ -15,24 +15,44 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; +class QAnimationGroup; +class QEvent; class QMetaObject; class QObject; class QParallelAnimationGroup; #else +typedef struct QAbstractAnimation QAbstractAnimation; +typedef struct QAnimationGroup QAnimationGroup; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QParallelAnimationGroup QParallelAnimationGroup; #endif -QParallelAnimationGroup* QParallelAnimationGroup_new(); -QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent); +void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self); void* QParallelAnimationGroup_Metacast(QParallelAnimationGroup* self, const char* param1); struct miqt_string QParallelAnimationGroup_Tr(const char* s); int QParallelAnimationGroup_Duration(const QParallelAnimationGroup* self); +bool QParallelAnimationGroup_Event(QParallelAnimationGroup* self, QEvent* event); +void QParallelAnimationGroup_UpdateCurrentTime(QParallelAnimationGroup* self, int currentTime); +void QParallelAnimationGroup_UpdateState(QParallelAnimationGroup* self, int newState, int oldState); +void QParallelAnimationGroup_UpdateDirection(QParallelAnimationGroup* self, int direction); struct miqt_string QParallelAnimationGroup_Tr2(const char* s, const char* c); struct miqt_string QParallelAnimationGroup_Tr3(const char* s, const char* c, int n); -void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self); +void QParallelAnimationGroup_override_virtual_Duration(void* self, intptr_t slot); +int QParallelAnimationGroup_virtualbase_Duration(const void* self); +void QParallelAnimationGroup_override_virtual_Event(void* self, intptr_t slot); +bool QParallelAnimationGroup_virtualbase_Event(void* self, QEvent* event); +void QParallelAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QParallelAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int currentTime); +void QParallelAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot); +void QParallelAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState); +void QParallelAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QParallelAnimationGroup_virtualbase_UpdateDirection(void* self, int direction); +void QParallelAnimationGroup_Delete(QParallelAnimationGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpauseanimation.cpp b/qt6/gen_qpauseanimation.cpp index bb4b45eb..dbe8f6ec 100644 --- a/qt6/gen_qpauseanimation.cpp +++ b/qt6/gen_qpauseanimation.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -8,20 +10,165 @@ #include "gen_qpauseanimation.h" #include "_cgo_export.h" -QPauseAnimation* QPauseAnimation_new() { - return new QPauseAnimation(); +class MiqtVirtualQPauseAnimation : public virtual QPauseAnimation { +public: + + MiqtVirtualQPauseAnimation(): QPauseAnimation() {}; + MiqtVirtualQPauseAnimation(int msecs): QPauseAnimation(msecs) {}; + MiqtVirtualQPauseAnimation(QObject* parent): QPauseAnimation(parent) {}; + MiqtVirtualQPauseAnimation(int msecs, QObject* parent): QPauseAnimation(msecs, parent) {}; + + virtual ~MiqtVirtualQPauseAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QPauseAnimation::duration(); + } + + + int callback_return_value = miqt_exec_callback_QPauseAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QPauseAnimation::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QPauseAnimation::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QPauseAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QPauseAnimation::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QPauseAnimation::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QPauseAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QPauseAnimation::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QPauseAnimation::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QPauseAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QPauseAnimation::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QPauseAnimation::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QPauseAnimation_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QPauseAnimation::updateDirection(static_cast(direction)); + + } + +}; + +void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPauseAnimation* QPauseAnimation_new2(int msecs) { - return new QPauseAnimation(static_cast(msecs)); +void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs)); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPauseAnimation* QPauseAnimation_new3(QObject* parent) { - return new QPauseAnimation(parent); +void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(parent); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent) { - return new QPauseAnimation(static_cast(msecs), parent); +void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs), parent); + *outptr_QPauseAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self) { @@ -73,7 +220,51 @@ struct miqt_string QPauseAnimation_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPauseAnimation_Delete(QPauseAnimation* self) { - delete self; +void QPauseAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__Duration = slot; +} + +int QPauseAnimation_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQPauseAnimation*)(self) )->virtualbase_Duration(); +} + +void QPauseAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__Event = slot; +} + +bool QPauseAnimation_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_Event(e); +} + +void QPauseAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QPauseAnimation_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QPauseAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__UpdateState = slot; +} + +void QPauseAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QPauseAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QPauseAnimation*)(self) )->handle__UpdateDirection = slot; +} + +void QPauseAnimation_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQPauseAnimation*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QPauseAnimation_Delete(QPauseAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpauseanimation.go b/qt6/gen_qpauseanimation.go index f94210c4..f8c4edf9 100644 --- a/qt6/gen_qpauseanimation.go +++ b/qt6/gen_qpauseanimation.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPauseAnimation struct { - h *C.QPauseAnimation + h *C.QPauseAnimation + isSubclass bool *QAbstractAnimation } @@ -32,39 +34,71 @@ func (this *QPauseAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPauseAnimation(h *C.QPauseAnimation) *QPauseAnimation { +// newQPauseAnimation constructs the type using only CGO pointers. +func newQPauseAnimation(h *C.QPauseAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPauseAnimation { if h == nil { return nil } - return &QPauseAnimation{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))} + return &QPauseAnimation{h: h, + QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQPauseAnimation(h unsafe.Pointer) *QPauseAnimation { - return newQPauseAnimation((*C.QPauseAnimation)(h)) +// UnsafeNewQPauseAnimation constructs the type using only unsafe pointers. +func UnsafeNewQPauseAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPauseAnimation { + if h == nil { + return nil + } + + return &QPauseAnimation{h: (*C.QPauseAnimation)(h), + QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } // NewQPauseAnimation constructs a new QPauseAnimation object. func NewQPauseAnimation() *QPauseAnimation { - ret := C.QPauseAnimation_new() - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new(&outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPauseAnimation2 constructs a new QPauseAnimation object. func NewQPauseAnimation2(msecs int) *QPauseAnimation { - ret := C.QPauseAnimation_new2((C.int)(msecs)) - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new2((C.int)(msecs), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPauseAnimation3 constructs a new QPauseAnimation object. func NewQPauseAnimation3(parent *QObject) *QPauseAnimation { - ret := C.QPauseAnimation_new3(parent.cPointer()) - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new3(parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPauseAnimation4 constructs a new QPauseAnimation object. func NewQPauseAnimation4(msecs int, parent *QObject) *QPauseAnimation { - ret := C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer()) - return newQPauseAnimation(ret) + var outptr_QPauseAnimation *C.QPauseAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPauseAnimation) MetaObject() *QMetaObject { @@ -116,9 +150,127 @@ func QPauseAnimation_Tr3(s string, c string, n int) string { return _ret } +func (this *QPauseAnimation) callVirtualBase_Duration() int { + + return (int)(C.QPauseAnimation_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QPauseAnimation) OnDuration(slot func(super func() int) int) { + C.QPauseAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_Duration +func miqt_exec_callback_QPauseAnimation_Duration(self *C.QPauseAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPauseAnimation{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QPauseAnimation) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QPauseAnimation_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QPauseAnimation) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QPauseAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_Event +func miqt_exec_callback_QPauseAnimation_Event(self *C.QPauseAnimation, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QPauseAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPauseAnimation) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QPauseAnimation_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QPauseAnimation) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QPauseAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_UpdateCurrentTime +func miqt_exec_callback_QPauseAnimation_UpdateCurrentTime(self *C.QPauseAnimation, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QPauseAnimation{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QPauseAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QPauseAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QPauseAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QPauseAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_UpdateState +func miqt_exec_callback_QPauseAnimation_UpdateState(self *C.QPauseAnimation, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QPauseAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QPauseAnimation) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QPauseAnimation_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QPauseAnimation) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QPauseAnimation_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPauseAnimation_UpdateDirection +func miqt_exec_callback_QPauseAnimation_UpdateDirection(self *C.QPauseAnimation, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QPauseAnimation{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QPauseAnimation) Delete() { - C.QPauseAnimation_Delete(this.h) + C.QPauseAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpauseanimation.h b/qt6/gen_qpauseanimation.h index 69672503..cf824085 100644 --- a/qt6/gen_qpauseanimation.h +++ b/qt6/gen_qpauseanimation.h @@ -15,27 +15,43 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; +class QEvent; class QMetaObject; class QObject; class QPauseAnimation; #else +typedef struct QAbstractAnimation QAbstractAnimation; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPauseAnimation QPauseAnimation; #endif -QPauseAnimation* QPauseAnimation_new(); -QPauseAnimation* QPauseAnimation_new2(int msecs); -QPauseAnimation* QPauseAnimation_new3(QObject* parent); -QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent); +void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self); void* QPauseAnimation_Metacast(QPauseAnimation* self, const char* param1); struct miqt_string QPauseAnimation_Tr(const char* s); int QPauseAnimation_Duration(const QPauseAnimation* self); void QPauseAnimation_SetDuration(QPauseAnimation* self, int msecs); +bool QPauseAnimation_Event(QPauseAnimation* self, QEvent* e); +void QPauseAnimation_UpdateCurrentTime(QPauseAnimation* self, int param1); struct miqt_string QPauseAnimation_Tr2(const char* s, const char* c); struct miqt_string QPauseAnimation_Tr3(const char* s, const char* c, int n); -void QPauseAnimation_Delete(QPauseAnimation* self); +void QPauseAnimation_override_virtual_Duration(void* self, intptr_t slot); +int QPauseAnimation_virtualbase_Duration(const void* self); +void QPauseAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QPauseAnimation_virtualbase_Event(void* self, QEvent* e); +void QPauseAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QPauseAnimation_virtualbase_UpdateCurrentTime(void* self, int param1); +void QPauseAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QPauseAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QPauseAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QPauseAnimation_virtualbase_UpdateDirection(void* self, int direction); +void QPauseAnimation_Delete(QPauseAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpdfwriter.cpp b/qt6/gen_qpdfwriter.cpp index d1bae58e..c2ee3e89 100644 --- a/qt6/gen_qpdfwriter.cpp +++ b/qt6/gen_qpdfwriter.cpp @@ -1,21 +1,417 @@ #include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include "gen_qpdfwriter.h" #include "_cgo_export.h" -QPdfWriter* QPdfWriter_new(struct miqt_string filename) { +class MiqtVirtualQPdfWriter : public virtual QPdfWriter { +public: + + MiqtVirtualQPdfWriter(const QString& filename): QPdfWriter(filename) {}; + MiqtVirtualQPdfWriter(QIODevice* device): QPdfWriter(device) {}; + + virtual ~MiqtVirtualQPdfWriter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool newPage() override { + if (handle__NewPage == 0) { + return QPdfWriter::newPage(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfWriter_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NewPage() { + + return QPdfWriter::newPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPdfWriter::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPdfWriter_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPdfWriter::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric id) const override { + if (handle__Metric == 0) { + return QPdfWriter::metric(id); + } + + QPaintDevice::PaintDeviceMetric id_ret = id; + int sigval1 = static_cast(id_ret); + + int callback_return_value = miqt_exec_callback_QPdfWriter_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int id) const { + + return QPdfWriter::metric(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPdfWriter::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfWriter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPdfWriter::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QPdfWriter::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfWriter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QPdfWriter::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QPdfWriter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfWriter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QPdfWriter::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QPdfWriter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfWriter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QPdfWriter::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QPdfWriter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfWriter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QPdfWriter::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QPdfWriter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfWriter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QPdfWriter::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QPdfWriter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfWriter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QPdfWriter::disconnectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageLayout = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageLayout(const QPageLayout& pageLayout) override { + if (handle__SetPageLayout == 0) { + return QPdfWriter::setPageLayout(pageLayout); + } + + const QPageLayout& pageLayout_ret = pageLayout; + // Cast returned reference into pointer + QPageLayout* sigval1 = const_cast(&pageLayout_ret); + + bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageLayout(this, handle__SetPageLayout, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageLayout(QPageLayout* pageLayout) { + + return QPdfWriter::setPageLayout(*pageLayout); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSize = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageSize(const QPageSize& pageSize) override { + if (handle__SetPageSize == 0) { + return QPdfWriter::setPageSize(pageSize); + } + + const QPageSize& pageSize_ret = pageSize; + // Cast returned reference into pointer + QPageSize* sigval1 = const_cast(&pageSize_ret); + + bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageSize(this, handle__SetPageSize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageSize(QPageSize* pageSize) { + + return QPdfWriter::setPageSize(*pageSize); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageOrientation = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageOrientation(QPageLayout::Orientation orientation) override { + if (handle__SetPageOrientation == 0) { + return QPdfWriter::setPageOrientation(orientation); + } + + QPageLayout::Orientation orientation_ret = orientation; + int sigval1 = static_cast(orientation_ret); + + bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageOrientation(this, handle__SetPageOrientation, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageOrientation(int orientation) { + + return QPdfWriter::setPageOrientation(static_cast(orientation)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageMargins = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageMargins(const QMarginsF& margins, QPageLayout::Unit units) override { + if (handle__SetPageMargins == 0) { + return QPdfWriter::setPageMargins(margins, units); + } + + const QMarginsF& margins_ret = margins; + // Cast returned reference into pointer + QMarginsF* sigval1 = const_cast(&margins_ret); + QPageLayout::Unit units_ret = units; + int sigval2 = static_cast(units_ret); + + bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageMargins(this, handle__SetPageMargins, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageMargins(QMarginsF* margins, int units) { + + return QPdfWriter::setPageMargins(*margins, static_cast(units)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageRanges = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageRanges(const QPageRanges& ranges) override { + if (handle__SetPageRanges == 0) { + QPdfWriter::setPageRanges(ranges); + return; + } + + const QPageRanges& ranges_ret = ranges; + // Cast returned reference into pointer + QPageRanges* sigval1 = const_cast(&ranges_ret); + + miqt_exec_callback_QPdfWriter_SetPageRanges(this, handle__SetPageRanges, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageRanges(QPageRanges* ranges) { + + QPdfWriter::setPageRanges(*ranges); + + } + +}; + +void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - return new QPdfWriter(filename_QString); + MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(filename_QString); + *outptr_QPdfWriter = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPdfWriter* QPdfWriter_new2(QIODevice* device) { - return new QPdfWriter(device); +void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(device); + *outptr_QPdfWriter = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self) { @@ -139,7 +535,131 @@ void QPdfWriter_AddFileAttachment3(QPdfWriter* self, struct miqt_string fileName self->addFileAttachment(fileName_QString, data_QByteArray, mimeType_QString); } -void QPdfWriter_Delete(QPdfWriter* self) { - delete self; +void QPdfWriter_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__NewPage = slot; +} + +bool QPdfWriter_virtualbase_NewPage(void* self) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_NewPage(); +} + +void QPdfWriter_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPdfWriter_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPdfWriter*)(self) )->virtualbase_PaintEngine(); +} + +void QPdfWriter_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__Metric = slot; +} + +int QPdfWriter_virtualbase_Metric(const void* self, int id) { + return ( (const MiqtVirtualQPdfWriter*)(self) )->virtualbase_Metric(id); +} + +void QPdfWriter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__Event = slot; +} + +bool QPdfWriter_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_Event(event); +} + +void QPdfWriter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__EventFilter = slot; +} + +bool QPdfWriter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QPdfWriter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__TimerEvent = slot; +} + +void QPdfWriter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_TimerEvent(event); +} + +void QPdfWriter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__ChildEvent = slot; +} + +void QPdfWriter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_ChildEvent(event); +} + +void QPdfWriter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__CustomEvent = slot; +} + +void QPdfWriter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_CustomEvent(event); +} + +void QPdfWriter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__ConnectNotify = slot; +} + +void QPdfWriter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QPdfWriter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__DisconnectNotify = slot; +} + +void QPdfWriter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QPdfWriter_override_virtual_SetPageLayout(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageLayout = slot; +} + +bool QPdfWriter_virtualbase_SetPageLayout(void* self, QPageLayout* pageLayout) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageLayout(pageLayout); +} + +void QPdfWriter_override_virtual_SetPageSize(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageSize = slot; +} + +bool QPdfWriter_virtualbase_SetPageSize(void* self, QPageSize* pageSize) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageSize(pageSize); +} + +void QPdfWriter_override_virtual_SetPageOrientation(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageOrientation = slot; +} + +bool QPdfWriter_virtualbase_SetPageOrientation(void* self, int orientation) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageOrientation(orientation); +} + +void QPdfWriter_override_virtual_SetPageMargins(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageMargins = slot; +} + +bool QPdfWriter_virtualbase_SetPageMargins(void* self, QMarginsF* margins, int units) { + return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageMargins(margins, units); +} + +void QPdfWriter_override_virtual_SetPageRanges(void* self, intptr_t slot) { + dynamic_cast( (QPdfWriter*)(self) )->handle__SetPageRanges = slot; +} + +void QPdfWriter_virtualbase_SetPageRanges(void* self, QPageRanges* ranges) { + ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageRanges(ranges); +} + +void QPdfWriter_Delete(QPdfWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpdfwriter.go b/qt6/gen_qpdfwriter.go index ccbb75e5..fc7d2944 100644 --- a/qt6/gen_qpdfwriter.go +++ b/qt6/gen_qpdfwriter.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPdfWriter struct { - h *C.QPdfWriter + h *C.QPdfWriter + isSubclass bool *QObject *QPagedPaintDevice } @@ -33,15 +35,25 @@ func (this *QPdfWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPdfWriter(h *C.QPdfWriter) *QPdfWriter { +// newQPdfWriter constructs the type using only CGO pointers. +func newQPdfWriter(h *C.QPdfWriter, h_QObject *C.QObject, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPdfWriter { if h == nil { return nil } - return &QPdfWriter{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QPagedPaintDevice: UnsafeNewQPagedPaintDevice(unsafe.Pointer(h))} + return &QPdfWriter{h: h, + QObject: newQObject(h_QObject), + QPagedPaintDevice: newQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} } -func UnsafeNewQPdfWriter(h unsafe.Pointer) *QPdfWriter { - return newQPdfWriter((*C.QPdfWriter)(h)) +// UnsafeNewQPdfWriter constructs the type using only unsafe pointers. +func UnsafeNewQPdfWriter(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPdfWriter { + if h == nil { + return nil + } + + return &QPdfWriter{h: (*C.QPdfWriter)(h), + QObject: UnsafeNewQObject(h_QObject), + QPagedPaintDevice: UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} } // NewQPdfWriter constructs a new QPdfWriter object. @@ -50,14 +62,28 @@ func NewQPdfWriter(filename string) *QPdfWriter { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - ret := C.QPdfWriter_new(filename_ms) - return newQPdfWriter(ret) + var outptr_QPdfWriter *C.QPdfWriter = nil + var outptr_QObject *C.QObject = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPdfWriter_new(filename_ms, &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPdfWriter2 constructs a new QPdfWriter object. func NewQPdfWriter2(device *QIODevice) *QPdfWriter { - ret := C.QPdfWriter_new2(device.cPointer()) - return newQPdfWriter(ret) + var outptr_QPdfWriter *C.QPdfWriter = nil + var outptr_QObject *C.QObject = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPdfWriter_new2(device.cPointer(), &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPdfWriter) MetaObject() *QMetaObject { @@ -191,9 +217,367 @@ func (this *QPdfWriter) AddFileAttachment3(fileName string, data []byte, mimeTyp C.QPdfWriter_AddFileAttachment3(this.h, fileName_ms, data_alias, mimeType_ms) } +func (this *QPdfWriter) callVirtualBase_NewPage() bool { + + return (bool)(C.QPdfWriter_virtualbase_NewPage(unsafe.Pointer(this.h))) + +} +func (this *QPdfWriter) OnNewPage(slot func(super func() bool) bool) { + C.QPdfWriter_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_NewPage +func miqt_exec_callback_QPdfWriter_NewPage(self *C.QPdfWriter, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_NewPage) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPdfWriter_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPdfWriter) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QPdfWriter_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_PaintEngine +func miqt_exec_callback_QPdfWriter_PaintEngine(self *C.QPdfWriter, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QPdfWriter) callVirtualBase_Metric(id QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPdfWriter_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(id))) + +} +func (this *QPdfWriter) OnMetric(slot func(super func(id QPaintDevice__PaintDeviceMetric) int, id QPaintDevice__PaintDeviceMetric) int) { + C.QPdfWriter_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_Metric +func miqt_exec_callback_QPdfWriter_Metric(self *C.QPdfWriter, cb C.intptr_t, id C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id QPaintDevice__PaintDeviceMetric) int, id QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(id) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPdfWriter_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPdfWriter) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPdfWriter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_Event +func miqt_exec_callback_QPdfWriter_Event(self *C.QPdfWriter, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QPdfWriter_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QPdfWriter) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QPdfWriter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_EventFilter +func miqt_exec_callback_QPdfWriter_EventFilter(self *C.QPdfWriter, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QPdfWriter_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPdfWriter) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QPdfWriter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_TimerEvent +func miqt_exec_callback_QPdfWriter_TimerEvent(self *C.QPdfWriter, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QPdfWriter_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPdfWriter) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QPdfWriter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_ChildEvent +func miqt_exec_callback_QPdfWriter_ChildEvent(self *C.QPdfWriter, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_CustomEvent(event *QEvent) { + + C.QPdfWriter_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPdfWriter) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QPdfWriter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_CustomEvent +func miqt_exec_callback_QPdfWriter_CustomEvent(self *C.QPdfWriter, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QPdfWriter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPdfWriter) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPdfWriter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_ConnectNotify +func miqt_exec_callback_QPdfWriter_ConnectNotify(self *C.QPdfWriter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QPdfWriter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPdfWriter) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPdfWriter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_DisconnectNotify +func miqt_exec_callback_QPdfWriter_DisconnectNotify(self *C.QPdfWriter, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageLayout(pageLayout *QPageLayout) bool { + + return (bool)(C.QPdfWriter_virtualbase_SetPageLayout(unsafe.Pointer(this.h), pageLayout.cPointer())) + +} +func (this *QPdfWriter) OnSetPageLayout(slot func(super func(pageLayout *QPageLayout) bool, pageLayout *QPageLayout) bool) { + C.QPdfWriter_override_virtual_SetPageLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageLayout +func miqt_exec_callback_QPdfWriter_SetPageLayout(self *C.QPdfWriter, cb C.intptr_t, pageLayout *C.QPageLayout) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pageLayout *QPageLayout) bool, pageLayout *QPageLayout) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPageLayout(unsafe.Pointer(pageLayout)) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageLayout, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageSize(pageSize *QPageSize) bool { + + return (bool)(C.QPdfWriter_virtualbase_SetPageSize(unsafe.Pointer(this.h), pageSize.cPointer())) + +} +func (this *QPdfWriter) OnSetPageSize(slot func(super func(pageSize *QPageSize) bool, pageSize *QPageSize) bool) { + C.QPdfWriter_override_virtual_SetPageSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageSize +func miqt_exec_callback_QPdfWriter_SetPageSize(self *C.QPdfWriter, cb C.intptr_t, pageSize *C.QPageSize) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pageSize *QPageSize) bool, pageSize *QPageSize) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPageSize(unsafe.Pointer(pageSize)) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageSize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageOrientation(orientation QPageLayout__Orientation) bool { + + return (bool)(C.QPdfWriter_virtualbase_SetPageOrientation(unsafe.Pointer(this.h), (C.int)(orientation))) + +} +func (this *QPdfWriter) OnSetPageOrientation(slot func(super func(orientation QPageLayout__Orientation) bool, orientation QPageLayout__Orientation) bool) { + C.QPdfWriter_override_virtual_SetPageOrientation(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageOrientation +func miqt_exec_callback_QPdfWriter_SetPageOrientation(self *C.QPdfWriter, cb C.intptr_t, orientation C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(orientation QPageLayout__Orientation) bool, orientation QPageLayout__Orientation) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPageLayout__Orientation)(orientation) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageOrientation, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageMargins(margins *QMarginsF, units QPageLayout__Unit) bool { + + return (bool)(C.QPdfWriter_virtualbase_SetPageMargins(unsafe.Pointer(this.h), margins.cPointer(), (C.int)(units))) + +} +func (this *QPdfWriter) OnSetPageMargins(slot func(super func(margins *QMarginsF, units QPageLayout__Unit) bool, margins *QMarginsF, units QPageLayout__Unit) bool) { + C.QPdfWriter_override_virtual_SetPageMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageMargins +func miqt_exec_callback_QPdfWriter_SetPageMargins(self *C.QPdfWriter, cb C.intptr_t, margins *C.QMarginsF, units C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margins *QMarginsF, units QPageLayout__Unit) bool, margins *QMarginsF, units QPageLayout__Unit) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMarginsF(unsafe.Pointer(margins)) + slotval2 := (QPageLayout__Unit)(units) + + virtualReturn := gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageMargins, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfWriter) callVirtualBase_SetPageRanges(ranges *QPageRanges) { + + C.QPdfWriter_virtualbase_SetPageRanges(unsafe.Pointer(this.h), ranges.cPointer()) + +} +func (this *QPdfWriter) OnSetPageRanges(slot func(super func(ranges *QPageRanges), ranges *QPageRanges)) { + C.QPdfWriter_override_virtual_SetPageRanges(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfWriter_SetPageRanges +func miqt_exec_callback_QPdfWriter_SetPageRanges(self *C.QPdfWriter, cb C.intptr_t, ranges *C.QPageRanges) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ranges *QPageRanges), ranges *QPageRanges)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPageRanges(unsafe.Pointer(ranges)) + + gofunc((&QPdfWriter{h: self}).callVirtualBase_SetPageRanges, slotval1) + +} + // Delete this object from C++ memory. func (this *QPdfWriter) Delete() { - C.QPdfWriter_Delete(this.h) + C.QPdfWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpdfwriter.h b/qt6/gen_qpdfwriter.h index f5f751e2..fd06f85c 100644 --- a/qt6/gen_qpdfwriter.h +++ b/qt6/gen_qpdfwriter.h @@ -16,18 +16,42 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QIODevice; +class QMarginsF; +class QMetaMethod; class QMetaObject; +class QObject; +class QPageLayout; +class QPageRanges; +class QPageSize; +class QPagedPaintDevice; +class QPaintDevice; +class QPaintEngine; class QPdfWriter; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMarginsF QMarginsF; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPageLayout QPageLayout; +typedef struct QPageRanges QPageRanges; +typedef struct QPageSize QPageSize; +typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; typedef struct QPdfWriter QPdfWriter; +typedef struct QTimerEvent QTimerEvent; #endif -QPdfWriter* QPdfWriter_new(struct miqt_string filename); -QPdfWriter* QPdfWriter_new2(QIODevice* device); +void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self); void* QPdfWriter_Metacast(QPdfWriter* self, const char* param1); struct miqt_string QPdfWriter_Tr(const char* s); @@ -43,10 +67,42 @@ int QPdfWriter_Resolution(const QPdfWriter* self); void QPdfWriter_SetDocumentXmpMetadata(QPdfWriter* self, struct miqt_string xmpMetadata); struct miqt_string QPdfWriter_DocumentXmpMetadata(const QPdfWriter* self); void QPdfWriter_AddFileAttachment(QPdfWriter* self, struct miqt_string fileName, struct miqt_string data); +QPaintEngine* QPdfWriter_PaintEngine(const QPdfWriter* self); +int QPdfWriter_Metric(const QPdfWriter* self, int id); struct miqt_string QPdfWriter_Tr2(const char* s, const char* c); struct miqt_string QPdfWriter_Tr3(const char* s, const char* c, int n); void QPdfWriter_AddFileAttachment3(QPdfWriter* self, struct miqt_string fileName, struct miqt_string data, struct miqt_string mimeType); -void QPdfWriter_Delete(QPdfWriter* self); +void QPdfWriter_override_virtual_NewPage(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_NewPage(void* self); +void QPdfWriter_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPdfWriter_virtualbase_PaintEngine(const void* self); +void QPdfWriter_override_virtual_Metric(void* self, intptr_t slot); +int QPdfWriter_virtualbase_Metric(const void* self, int id); +void QPdfWriter_override_virtual_Event(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_Event(void* self, QEvent* event); +void QPdfWriter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QPdfWriter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPdfWriter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QPdfWriter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QPdfWriter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QPdfWriter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QPdfWriter_virtualbase_CustomEvent(void* self, QEvent* event); +void QPdfWriter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QPdfWriter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QPdfWriter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QPdfWriter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QPdfWriter_override_virtual_SetPageLayout(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_SetPageLayout(void* self, QPageLayout* pageLayout); +void QPdfWriter_override_virtual_SetPageSize(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_SetPageSize(void* self, QPageSize* pageSize); +void QPdfWriter_override_virtual_SetPageOrientation(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_SetPageOrientation(void* self, int orientation); +void QPdfWriter_override_virtual_SetPageMargins(void* self, intptr_t slot); +bool QPdfWriter_virtualbase_SetPageMargins(void* self, QMarginsF* margins, int units); +void QPdfWriter_override_virtual_SetPageRanges(void* self, intptr_t slot); +void QPdfWriter_virtualbase_SetPageRanges(void* self, QPageRanges* ranges); +void QPdfWriter_Delete(QPdfWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpen.cpp b/qt6/gen_qpen.cpp index 1b9c7762..b74848e0 100644 --- a/qt6/gen_qpen.cpp +++ b/qt6/gen_qpen.cpp @@ -6,36 +6,44 @@ #include "gen_qpen.h" #include "_cgo_export.h" -QPen* QPen_new() { - return new QPen(); +void QPen_new(QPen** outptr_QPen) { + QPen* ret = new QPen(); + *outptr_QPen = ret; } -QPen* QPen_new2(int param1) { - return new QPen(static_cast(param1)); +void QPen_new2(int param1, QPen** outptr_QPen) { + QPen* ret = new QPen(static_cast(param1)); + *outptr_QPen = ret; } -QPen* QPen_new3(QColor* color) { - return new QPen(*color); +void QPen_new3(QColor* color, QPen** outptr_QPen) { + QPen* ret = new QPen(*color); + *outptr_QPen = ret; } -QPen* QPen_new4(QBrush* brush, double width) { - return new QPen(*brush, static_cast(width)); +void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width)); + *outptr_QPen = ret; } -QPen* QPen_new5(QPen* pen) { - return new QPen(*pen); +void QPen_new5(QPen* pen, QPen** outptr_QPen) { + QPen* ret = new QPen(*pen); + *outptr_QPen = ret; } -QPen* QPen_new6(QBrush* brush, double width, int s) { - return new QPen(*brush, static_cast(width), static_cast(s)); +void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width), static_cast(s)); + *outptr_QPen = ret; } -QPen* QPen_new7(QBrush* brush, double width, int s, int c) { - return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); +void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); + *outptr_QPen = ret; } -QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j) { - return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); +void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen) { + QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); + *outptr_QPen = ret; } void QPen_OperatorAssign(QPen* self, QPen* pen) { @@ -171,7 +179,11 @@ bool QPen_IsDetached(QPen* self) { return self->isDetached(); } -void QPen_Delete(QPen* self) { - delete self; +void QPen_Delete(QPen* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpen.go b/qt6/gen_qpen.go index 3179b9e8..3c4886d8 100644 --- a/qt6/gen_qpen.go +++ b/qt6/gen_qpen.go @@ -14,7 +14,8 @@ import ( ) type QPen struct { - h *C.QPen + h *C.QPen + isSubclass bool } func (this *QPen) cPointer() *C.QPen { @@ -31,6 +32,7 @@ func (this *QPen) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPen constructs the type using only CGO pointers. func newQPen(h *C.QPen) *QPen { if h == nil { return nil @@ -38,56 +40,93 @@ func newQPen(h *C.QPen) *QPen { return &QPen{h: h} } +// UnsafeNewQPen constructs the type using only unsafe pointers. func UnsafeNewQPen(h unsafe.Pointer) *QPen { - return newQPen((*C.QPen)(h)) + if h == nil { + return nil + } + + return &QPen{h: (*C.QPen)(h)} } // NewQPen constructs a new QPen object. func NewQPen() *QPen { - ret := C.QPen_new() - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new(&outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen2 constructs a new QPen object. func NewQPen2(param1 PenStyle) *QPen { - ret := C.QPen_new2((C.int)(param1)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new2((C.int)(param1), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen3 constructs a new QPen object. func NewQPen3(color *QColor) *QPen { - ret := C.QPen_new3(color.cPointer()) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new3(color.cPointer(), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen4 constructs a new QPen object. func NewQPen4(brush *QBrush, width float64) *QPen { - ret := C.QPen_new4(brush.cPointer(), (C.double)(width)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new4(brush.cPointer(), (C.double)(width), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen5 constructs a new QPen object. func NewQPen5(pen *QPen) *QPen { - ret := C.QPen_new5(pen.cPointer()) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new5(pen.cPointer(), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen6 constructs a new QPen object. func NewQPen6(brush *QBrush, width float64, s PenStyle) *QPen { - ret := C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen7 constructs a new QPen object. func NewQPen7(brush *QBrush, width float64, s PenStyle, c PenCapStyle) *QPen { - ret := C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } // NewQPen8 constructs a new QPen object. func NewQPen8(brush *QBrush, width float64, s PenStyle, c PenCapStyle, j PenJoinStyle) *QPen { - ret := C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j)) - return newQPen(ret) + var outptr_QPen *C.QPen = nil + + C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j), &outptr_QPen) + ret := newQPen(outptr_QPen) + ret.isSubclass = true + return ret } func (this *QPen) OperatorAssign(pen *QPen) { @@ -222,7 +261,7 @@ func (this *QPen) IsDetached() bool { // Delete this object from C++ memory. func (this *QPen) Delete() { - C.QPen_Delete(this.h) + C.QPen_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpen.h b/qt6/gen_qpen.h index 94668f08..661eefd4 100644 --- a/qt6/gen_qpen.h +++ b/qt6/gen_qpen.h @@ -24,14 +24,14 @@ typedef struct QColor QColor; typedef struct QPen QPen; #endif -QPen* QPen_new(); -QPen* QPen_new2(int param1); -QPen* QPen_new3(QColor* color); -QPen* QPen_new4(QBrush* brush, double width); -QPen* QPen_new5(QPen* pen); -QPen* QPen_new6(QBrush* brush, double width, int s); -QPen* QPen_new7(QBrush* brush, double width, int s, int c); -QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j); +void QPen_new(QPen** outptr_QPen); +void QPen_new2(int param1, QPen** outptr_QPen); +void QPen_new3(QColor* color, QPen** outptr_QPen); +void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen); +void QPen_new5(QPen* pen, QPen** outptr_QPen); +void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen); +void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen); +void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen); void QPen_OperatorAssign(QPen* self, QPen* pen); void QPen_Swap(QPen* self, QPen* other); int QPen_Style(const QPen* self); @@ -60,7 +60,7 @@ void QPen_SetCosmetic(QPen* self, bool cosmetic); bool QPen_OperatorEqual(const QPen* self, QPen* p); bool QPen_OperatorNotEqual(const QPen* self, QPen* p); bool QPen_IsDetached(QPen* self); -void QPen_Delete(QPen* self); +void QPen_Delete(QPen* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpicture.cpp b/qt6/gen_qpicture.cpp index 07df0aa4..18cf0f4e 100644 --- a/qt6/gen_qpicture.cpp +++ b/qt6/gen_qpicture.cpp @@ -1,7 +1,9 @@ #include +#include #include #include #include +#include #include #include #include @@ -10,16 +12,196 @@ #include "gen_qpicture.h" #include "_cgo_export.h" -QPicture* QPicture_new() { - return new QPicture(); +class MiqtVirtualQPicture : public virtual QPicture { +public: + + MiqtVirtualQPicture(): QPicture() {}; + MiqtVirtualQPicture(const QPicture& param1): QPicture(param1) {}; + MiqtVirtualQPicture(int formatVersion): QPicture(formatVersion) {}; + + virtual ~MiqtVirtualQPicture() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPicture::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPicture_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPicture::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(const char* data, uint size) override { + if (handle__SetData == 0) { + QPicture::setData(data, size); + return; + } + + const char* sigval1 = (const char*) data; + uint size_ret = size; + unsigned int sigval2 = static_cast(size_ret); + + miqt_exec_callback_QPicture_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(const char* data, unsigned int size) { + + QPicture::setData(data, static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPicture::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPicture_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPicture::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric m) const override { + if (handle__Metric == 0) { + return QPicture::metric(m); + } + + QPaintDevice::PaintDeviceMetric m_ret = m; + int sigval1 = static_cast(m_ret); + + int callback_return_value = miqt_exec_callback_QPicture_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int m) const { + + return QPicture::metric(static_cast(m)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QPicture::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPicture_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPicture::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QPicture::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPicture_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPicture::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QPicture::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPicture_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPicture::sharedPainter(); + + } + +}; + +void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(); + *outptr_QPicture = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPicture* QPicture_new2(QPicture* param1) { - return new QPicture(*param1); +void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(*param1); + *outptr_QPicture = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPicture* QPicture_new3(int formatVersion) { - return new QPicture(static_cast(formatVersion)); +void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(static_cast(formatVersion)); + *outptr_QPicture = ret; + *outptr_QPaintDevice = static_cast(ret); } bool QPicture_IsNull(const QPicture* self) { @@ -93,7 +275,67 @@ QPaintEngine* QPicture_PaintEngine(const QPicture* self) { return self->paintEngine(); } -void QPicture_Delete(QPicture* self) { - delete self; +void QPicture_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__DevType = slot; +} + +int QPicture_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_DevType(); +} + +void QPicture_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__SetData = slot; +} + +void QPicture_virtualbase_SetData(void* self, const char* data, unsigned int size) { + ( (MiqtVirtualQPicture*)(self) )->virtualbase_SetData(data, size); +} + +void QPicture_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPicture_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_PaintEngine(); +} + +void QPicture_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__Metric = slot; +} + +int QPicture_virtualbase_Metric(const void* self, int m) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_Metric(m); +} + +void QPicture_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__InitPainter = slot; +} + +void QPicture_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPicture*)(self) )->virtualbase_InitPainter(painter); +} + +void QPicture_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPicture_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_Redirected(offset); +} + +void QPicture_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPicture*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPicture_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_SharedPainter(); +} + +void QPicture_Delete(QPicture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpicture.go b/qt6/gen_qpicture.go index 5d1210a1..497f5e99 100644 --- a/qt6/gen_qpicture.go +++ b/qt6/gen_qpicture.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPicture struct { - h *C.QPicture + h *C.QPicture + isSubclass bool *QPaintDevice } @@ -32,33 +34,56 @@ func (this *QPicture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPicture(h *C.QPicture) *QPicture { +// newQPicture constructs the type using only CGO pointers. +func newQPicture(h *C.QPicture, h_QPaintDevice *C.QPaintDevice) *QPicture { if h == nil { return nil } - return &QPicture{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPicture{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPicture(h unsafe.Pointer) *QPicture { - return newQPicture((*C.QPicture)(h)) +// UnsafeNewQPicture constructs the type using only unsafe pointers. +func UnsafeNewQPicture(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPicture { + if h == nil { + return nil + } + + return &QPicture{h: (*C.QPicture)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQPicture constructs a new QPicture object. func NewQPicture() *QPicture { - ret := C.QPicture_new() - return newQPicture(ret) + var outptr_QPicture *C.QPicture = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPicture_new(&outptr_QPicture, &outptr_QPaintDevice) + ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPicture2 constructs a new QPicture object. func NewQPicture2(param1 *QPicture) *QPicture { - ret := C.QPicture_new2(param1.cPointer()) - return newQPicture(ret) + var outptr_QPicture *C.QPicture = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPicture_new2(param1.cPointer(), &outptr_QPicture, &outptr_QPaintDevice) + ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPicture3 constructs a new QPicture object. func NewQPicture3(formatVersion int) *QPicture { - ret := C.QPicture_new3((C.int)(formatVersion)) - return newQPicture(ret) + var outptr_QPicture *C.QPicture = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPicture_new3((C.int)(formatVersion), &outptr_QPicture, &outptr_QPaintDevice) + ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPicture) IsNull() bool { @@ -143,9 +168,173 @@ func (this *QPicture) PaintEngine() *QPaintEngine { return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPicture_PaintEngine(this.h))) } +func (this *QPicture) callVirtualBase_DevType() int { + + return (int)(C.QPicture_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPicture) OnDevType(slot func(super func() int) int) { + C.QPicture_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_DevType +func miqt_exec_callback_QPicture_DevType(self *C.QPicture, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPicture) callVirtualBase_SetData(data string, size uint) { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + C.QPicture_virtualbase_SetData(unsafe.Pointer(this.h), data_Cstring, (C.uint)(size)) + +} +func (this *QPicture) OnSetData(slot func(super func(data string, size uint), data string, size uint)) { + C.QPicture_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_SetData +func miqt_exec_callback_QPicture_SetData(self *C.QPicture, cb C.intptr_t, data *C.const_char, size C.uint) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, size uint), data string, size uint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (uint)(size) + + gofunc((&QPicture{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QPicture) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPicture_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPicture) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QPicture_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_PaintEngine +func miqt_exec_callback_QPicture_PaintEngine(self *C.QPicture, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QPicture) callVirtualBase_Metric(m QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPicture_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(m))) + +} +func (this *QPicture) OnMetric(slot func(super func(m QPaintDevice__PaintDeviceMetric) int, m QPaintDevice__PaintDeviceMetric) int) { + C.QPicture_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_Metric +func miqt_exec_callback_QPicture_Metric(self *C.QPicture, cb C.intptr_t, m C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(m QPaintDevice__PaintDeviceMetric) int, m QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(m) + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPicture) callVirtualBase_InitPainter(painter *QPainter) { + + C.QPicture_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QPicture) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QPicture_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_InitPainter +func miqt_exec_callback_QPicture_InitPainter(self *C.QPicture, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPicture{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPicture) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QPicture_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QPicture) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QPicture_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_Redirected +func miqt_exec_callback_QPicture_Redirected(self *C.QPicture, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPicture) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QPicture_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPicture) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QPicture_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPicture_SharedPainter +func miqt_exec_callback_QPicture_SharedPainter(self *C.QPicture, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPicture{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QPicture) Delete() { - C.QPicture_Delete(this.h) + C.QPicture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpicture.h b/qt6/gen_qpicture.h index f6d0a787..75eeaf59 100644 --- a/qt6/gen_qpicture.h +++ b/qt6/gen_qpicture.h @@ -16,21 +16,25 @@ extern "C" { #ifdef __cplusplus class QIODevice; +class QPaintDevice; class QPaintEngine; class QPainter; class QPicture; +class QPoint; class QRect; #else typedef struct QIODevice QIODevice; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; typedef struct QPainter QPainter; typedef struct QPicture QPicture; +typedef struct QPoint QPoint; typedef struct QRect QRect; #endif -QPicture* QPicture_new(); -QPicture* QPicture_new2(QPicture* param1); -QPicture* QPicture_new3(int formatVersion); +void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); +void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); +void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); bool QPicture_IsNull(const QPicture* self); int QPicture_DevType(const QPicture* self); unsigned int QPicture_Size(const QPicture* self); @@ -48,7 +52,22 @@ void QPicture_Swap(QPicture* self, QPicture* other); void QPicture_Detach(QPicture* self); bool QPicture_IsDetached(const QPicture* self); QPaintEngine* QPicture_PaintEngine(const QPicture* self); -void QPicture_Delete(QPicture* self); +int QPicture_Metric(const QPicture* self, int m); +void QPicture_override_virtual_DevType(void* self, intptr_t slot); +int QPicture_virtualbase_DevType(const void* self); +void QPicture_override_virtual_SetData(void* self, intptr_t slot); +void QPicture_virtualbase_SetData(void* self, const char* data, unsigned int size); +void QPicture_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPicture_virtualbase_PaintEngine(const void* self); +void QPicture_override_virtual_Metric(void* self, intptr_t slot); +int QPicture_virtualbase_Metric(const void* self, int m); +void QPicture_override_virtual_InitPainter(void* self, intptr_t slot); +void QPicture_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPicture_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPicture_virtualbase_Redirected(const void* self, QPoint* offset); +void QPicture_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPicture_virtualbase_SharedPainter(const void* self); +void QPicture_Delete(QPicture* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpixelformat.cpp b/qt6/gen_qpixelformat.cpp index a12eea47..a5747dfa 100644 --- a/qt6/gen_qpixelformat.cpp +++ b/qt6/gen_qpixelformat.cpp @@ -3,24 +3,29 @@ #include "gen_qpixelformat.h" #include "_cgo_export.h" -QPixelFormat* QPixelFormat_new() { - return new QPixelFormat(); +void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation) { - return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); +void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new3(QPixelFormat* param1) { - return new QPixelFormat(*param1); +void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(*param1); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder) { - return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); +void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); + *outptr_QPixelFormat = ret; } -QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum) { - return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); +void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat) { + QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); + *outptr_QPixelFormat = ret; } int QPixelFormat_ColorModel(const QPixelFormat* self) { @@ -133,7 +138,11 @@ unsigned char QPixelFormat_SubEnum(const QPixelFormat* self) { return static_cast(_ret); } -void QPixelFormat_Delete(QPixelFormat* self) { - delete self; +void QPixelFormat_Delete(QPixelFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpixelformat.go b/qt6/gen_qpixelformat.go index 9988d4ba..de05ebf7 100644 --- a/qt6/gen_qpixelformat.go +++ b/qt6/gen_qpixelformat.go @@ -87,7 +87,8 @@ const ( ) type QPixelFormat struct { - h *C.QPixelFormat + h *C.QPixelFormat + isSubclass bool } func (this *QPixelFormat) cPointer() *C.QPixelFormat { @@ -104,6 +105,7 @@ func (this *QPixelFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPixelFormat constructs the type using only CGO pointers. func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat { if h == nil { return nil @@ -111,38 +113,63 @@ func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat { return &QPixelFormat{h: h} } +// UnsafeNewQPixelFormat constructs the type using only unsafe pointers. func UnsafeNewQPixelFormat(h unsafe.Pointer) *QPixelFormat { - return newQPixelFormat((*C.QPixelFormat)(h)) + if h == nil { + return nil + } + + return &QPixelFormat{h: (*C.QPixelFormat)(h)} } // NewQPixelFormat constructs a new QPixelFormat object. func NewQPixelFormat() *QPixelFormat { - ret := C.QPixelFormat_new() - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new(&outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat2 constructs a new QPixelFormat object. func NewQPixelFormat2(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation) *QPixelFormat { - ret := C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation)) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat3 constructs a new QPixelFormat object. func NewQPixelFormat3(param1 *QPixelFormat) *QPixelFormat { - ret := C.QPixelFormat_new3(param1.cPointer()) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new3(param1.cPointer(), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat4 constructs a new QPixelFormat object. func NewQPixelFormat4(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder) *QPixelFormat { - ret := C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder)) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } // NewQPixelFormat5 constructs a new QPixelFormat object. func NewQPixelFormat5(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder, subEnum byte) *QPixelFormat { - ret := C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum)) - return newQPixelFormat(ret) + var outptr_QPixelFormat *C.QPixelFormat = nil + + C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum), &outptr_QPixelFormat) + ret := newQPixelFormat(outptr_QPixelFormat) + ret.isSubclass = true + return ret } func (this *QPixelFormat) ColorModel() QPixelFormat__ColorModel { @@ -235,7 +262,7 @@ func (this *QPixelFormat) SubEnum() byte { // Delete this object from C++ memory. func (this *QPixelFormat) Delete() { - C.QPixelFormat_Delete(this.h) + C.QPixelFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpixelformat.h b/qt6/gen_qpixelformat.h index aab6aa34..60cf504b 100644 --- a/qt6/gen_qpixelformat.h +++ b/qt6/gen_qpixelformat.h @@ -20,11 +20,11 @@ class QPixelFormat; typedef struct QPixelFormat QPixelFormat; #endif -QPixelFormat* QPixelFormat_new(); -QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation); -QPixelFormat* QPixelFormat_new3(QPixelFormat* param1); -QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder); -QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum); +void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat); +void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat); int QPixelFormat_ColorModel(const QPixelFormat* self); unsigned char QPixelFormat_ChannelCount(const QPixelFormat* self); unsigned char QPixelFormat_RedSize(const QPixelFormat* self); @@ -47,7 +47,7 @@ int QPixelFormat_TypeInterpretation(const QPixelFormat* self); int QPixelFormat_ByteOrder(const QPixelFormat* self); int QPixelFormat_YuvLayout(const QPixelFormat* self); unsigned char QPixelFormat_SubEnum(const QPixelFormat* self); -void QPixelFormat_Delete(QPixelFormat* self); +void QPixelFormat_Delete(QPixelFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpixmap.cpp b/qt6/gen_qpixmap.cpp index 736f4186..72862b11 100644 --- a/qt6/gen_qpixmap.cpp +++ b/qt6/gen_qpixmap.cpp @@ -4,8 +4,11 @@ #include #include #include +#include #include +#include #include +#include #include #include #include @@ -18,35 +21,201 @@ #include "gen_qpixmap.h" #include "_cgo_export.h" -QPixmap* QPixmap_new() { - return new QPixmap(); +class MiqtVirtualQPixmap : public virtual QPixmap { +public: + + MiqtVirtualQPixmap(): QPixmap() {}; + MiqtVirtualQPixmap(int w, int h): QPixmap(w, h) {}; + MiqtVirtualQPixmap(const QSize& param1): QPixmap(param1) {}; + MiqtVirtualQPixmap(const QString& fileName): QPixmap(fileName) {}; + MiqtVirtualQPixmap(const QPixmap& param1): QPixmap(param1) {}; + MiqtVirtualQPixmap(const QString& fileName, const char* format): QPixmap(fileName, format) {}; + MiqtVirtualQPixmap(const QString& fileName, const char* format, Qt::ImageConversionFlags flags): QPixmap(fileName, format, flags) {}; + + virtual ~MiqtVirtualQPixmap() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPixmap::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPixmap_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPixmap::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPixmap::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPixmap_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPixmap::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QPixmap::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPixmap_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QPixmap::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QPixmap::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPixmap_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPixmap::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QPixmap::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPixmap_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPixmap::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QPixmap::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPixmap_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPixmap::sharedPainter(); + + } + +}; + +void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new2(int w, int h) { - return new QPixmap(static_cast(w), static_cast(h)); +void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(static_cast(w), static_cast(h)); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new3(QSize* param1) { - return new QPixmap(*param1); +void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new4(struct miqt_string fileName) { +void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPixmap(fileName_QString); + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new5(QPixmap* param1) { - return new QPixmap(*param1); +void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format) { +void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPixmap(fileName_QString, format); + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } -QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags) { +void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPixmap(fileName_QString, format, static_cast(flags)); + MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format, static_cast(flags)); + *outptr_QPixmap = ret; + *outptr_QPaintDevice = static_cast(ret); } void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1) { @@ -344,7 +513,59 @@ void QPixmap_Scroll4(QPixmap* self, int dx, int dy, QRect* rect, QRegion* expose self->scroll(static_cast(dx), static_cast(dy), *rect, exposed); } -void QPixmap_Delete(QPixmap* self) { - delete self; +void QPixmap_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__DevType = slot; +} + +int QPixmap_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_DevType(); +} + +void QPixmap_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPixmap_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_PaintEngine(); +} + +void QPixmap_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__Metric = slot; +} + +int QPixmap_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_Metric(param1); +} + +void QPixmap_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__InitPainter = slot; +} + +void QPixmap_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_InitPainter(painter); +} + +void QPixmap_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPixmap_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_Redirected(offset); +} + +void QPixmap_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPixmap*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPixmap_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPixmap*)(self) )->virtualbase_SharedPainter(); +} + +void QPixmap_Delete(QPixmap* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpixmap.go b/qt6/gen_qpixmap.go index cbe7b767..90483ffd 100644 --- a/qt6/gen_qpixmap.go +++ b/qt6/gen_qpixmap.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPixmap struct { - h *C.QPixmap + h *C.QPixmap + isSubclass bool *QPaintDevice } @@ -32,33 +34,56 @@ func (this *QPixmap) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPixmap(h *C.QPixmap) *QPixmap { +// newQPixmap constructs the type using only CGO pointers. +func newQPixmap(h *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QPixmap { if h == nil { return nil } - return &QPixmap{h: h, QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QPixmap{h: h, + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQPixmap(h unsafe.Pointer) *QPixmap { - return newQPixmap((*C.QPixmap)(h)) +// UnsafeNewQPixmap constructs the type using only unsafe pointers. +func UnsafeNewQPixmap(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPixmap { + if h == nil { + return nil + } + + return &QPixmap{h: (*C.QPixmap)(h), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQPixmap constructs a new QPixmap object. func NewQPixmap() *QPixmap { - ret := C.QPixmap_new() - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new(&outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap2 constructs a new QPixmap object. func NewQPixmap2(w int, h int) *QPixmap { - ret := C.QPixmap_new2((C.int)(w), (C.int)(h)) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new2((C.int)(w), (C.int)(h), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap3 constructs a new QPixmap object. func NewQPixmap3(param1 *QSize) *QPixmap { - ret := C.QPixmap_new3(param1.cPointer()) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new3(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap4 constructs a new QPixmap object. @@ -67,14 +92,24 @@ func NewQPixmap4(fileName string) *QPixmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QPixmap_new4(fileName_ms) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new4(fileName_ms, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap5 constructs a new QPixmap object. func NewQPixmap5(param1 *QPixmap) *QPixmap { - ret := C.QPixmap_new5(param1.cPointer()) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new5(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap6 constructs a new QPixmap object. @@ -85,8 +120,13 @@ func NewQPixmap6(fileName string, format string) *QPixmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QPixmap_new6(fileName_ms, format_Cstring) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new6(fileName_ms, format_Cstring, &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPixmap7 constructs a new QPixmap object. @@ -97,8 +137,13 @@ func NewQPixmap7(fileName string, format string, flags ImageConversionFlag) *QPi defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - ret := C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags)) - return newQPixmap(ret) + var outptr_QPixmap *C.QPixmap = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags), &outptr_QPixmap, &outptr_QPaintDevice) + ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPixmap) OperatorAssign(param1 *QPixmap) { @@ -153,7 +198,7 @@ func (this *QPixmap) Fill() { func (this *QPixmap) Mask() *QBitmap { _ret := C.QPixmap_Mask(this.h) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -187,49 +232,49 @@ func (this *QPixmap) HasAlphaChannel() bool { func (this *QPixmap) CreateHeuristicMask() *QBitmap { _ret := C.QPixmap_CreateHeuristicMask(this.h) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor(maskColor *QColor) *QBitmap { _ret := C.QPixmap_CreateMaskFromColor(this.h, maskColor.cPointer()) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled(w int, h int) *QPixmap { _ret := C.QPixmap_Scaled(this.h, (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledWithQSize(s *QSize) *QPixmap { _ret := C.QPixmap_ScaledWithQSize(this.h, s.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth(w int) *QPixmap { _ret := C.QPixmap_ScaledToWidth(this.h, (C.int)(w)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight(h int) *QPixmap { _ret := C.QPixmap_ScaledToHeight(this.h, (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed(param1 *QTransform) *QPixmap { _ret := C.QPixmap_Transformed(this.h, param1.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -243,21 +288,21 @@ func QPixmap_TrueMatrix(m *QTransform, w int, h int) *QTransform { func (this *QPixmap) ToImage() *QImage { _ret := C.QPixmap_ToImage(this.h) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage(image *QImage) *QPixmap { _ret := C.QPixmap_FromImage(image.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader(imageReader *QImageReader) *QPixmap { _ret := C.QPixmap_FromImageReader(imageReader.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -299,14 +344,14 @@ func (this *QPixmap) ConvertFromImage(img *QImage) bool { func (this *QPixmap) Copy(x int, y int, width int, height int) *QPixmap { _ret := C.QPixmap_Copy(this.h, (C.int)(x), (C.int)(y), (C.int)(width), (C.int)(height)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Copy2() *QPixmap { _ret := C.QPixmap_Copy2(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -349,77 +394,77 @@ func (this *QPixmap) Fill1(fillColor *QColor) { func (this *QPixmap) CreateHeuristicMask1(clipTight bool) *QBitmap { _ret := C.QPixmap_CreateHeuristicMask1(this.h, (C.bool)(clipTight)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor2(maskColor *QColor, mode MaskMode) *QBitmap { _ret := C.QPixmap_CreateMaskFromColor2(this.h, maskColor.cPointer(), (C.int)(mode)) - _goptr := newQBitmap(_ret) + _goptr := newQBitmap(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled3(w int, h int, aspectMode AspectRatioMode) *QPixmap { _ret := C.QPixmap_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled2(s *QSize, aspectMode AspectRatioMode) *QPixmap { _ret := C.QPixmap_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth2(w int, mode TransformationMode) *QPixmap { _ret := C.QPixmap_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight2(h int, mode TransformationMode) *QPixmap { _ret := C.QPixmap_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed2(param1 *QTransform, mode TransformationMode) *QPixmap { _ret := C.QPixmap_Transformed2(this.h, param1.cPointer(), (C.int)(mode)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage2(image *QImage, flags ImageConversionFlag) *QPixmap { _ret := C.QPixmap_FromImage2(image.cPointer(), (C.int)(flags)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader2(imageReader *QImageReader, flags ImageConversionFlag) *QPixmap { _ret := C.QPixmap_FromImageReader2(imageReader.cPointer(), (C.int)(flags)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -512,7 +557,7 @@ func (this *QPixmap) ConvertFromImage2(img *QImage, flags ImageConversionFlag) b func (this *QPixmap) Copy1(rect *QRect) *QPixmap { _ret := C.QPixmap_Copy1(this.h, rect.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -525,9 +570,145 @@ func (this *QPixmap) Scroll4(dx int, dy int, rect *QRect, exposed *QRegion) { C.QPixmap_Scroll4(this.h, (C.int)(dx), (C.int)(dy), rect.cPointer(), exposed.cPointer()) } +func (this *QPixmap) callVirtualBase_DevType() int { + + return (int)(C.QPixmap_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPixmap) OnDevType(slot func(super func() int) int) { + C.QPixmap_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_DevType +func miqt_exec_callback_QPixmap_DevType(self *C.QPixmap, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPixmap) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QPixmap_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPixmap) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QPixmap_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_PaintEngine +func miqt_exec_callback_QPixmap_PaintEngine(self *C.QPixmap, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QPixmap) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPixmap_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPixmap) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QPixmap_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_Metric +func miqt_exec_callback_QPixmap_Metric(self *C.QPixmap, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPixmap) callVirtualBase_InitPainter(painter *QPainter) { + + C.QPixmap_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QPixmap) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QPixmap_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_InitPainter +func miqt_exec_callback_QPixmap_InitPainter(self *C.QPixmap, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPixmap{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPixmap) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QPixmap_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QPixmap) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QPixmap_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_Redirected +func miqt_exec_callback_QPixmap_Redirected(self *C.QPixmap, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPixmap) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QPixmap_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPixmap) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QPixmap_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPixmap_SharedPainter +func miqt_exec_callback_QPixmap_SharedPainter(self *C.QPixmap, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPixmap{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QPixmap) Delete() { - C.QPixmap_Delete(this.h) + C.QPixmap_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpixmap.h b/qt6/gen_qpixmap.h index 0ba96b35..bf614f93 100644 --- a/qt6/gen_qpixmap.h +++ b/qt6/gen_qpixmap.h @@ -21,8 +21,11 @@ class QColor; class QIODevice; class QImage; class QImageReader; +class QPaintDevice; class QPaintEngine; +class QPainter; class QPixmap; +class QPoint; class QRect; class QRegion; class QSize; @@ -35,8 +38,11 @@ typedef struct QColor QColor; typedef struct QIODevice QIODevice; typedef struct QImage QImage; typedef struct QImageReader QImageReader; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; +typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegion QRegion; typedef struct QSize QSize; @@ -44,13 +50,13 @@ typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; #endif -QPixmap* QPixmap_new(); -QPixmap* QPixmap_new2(int w, int h); -QPixmap* QPixmap_new3(QSize* param1); -QPixmap* QPixmap_new4(struct miqt_string fileName); -QPixmap* QPixmap_new5(QPixmap* param1); -QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format); -QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags); +void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1); void QPixmap_Swap(QPixmap* self, QPixmap* other); bool QPixmap_IsNull(const QPixmap* self); @@ -96,6 +102,7 @@ void QPixmap_Detach(QPixmap* self); bool QPixmap_IsQBitmap(const QPixmap* self); QPaintEngine* QPixmap_PaintEngine(const QPixmap* self); bool QPixmap_OperatorNot(const QPixmap* self); +int QPixmap_Metric(const QPixmap* self, int param1); void QPixmap_Fill1(QPixmap* self, QColor* fillColor); QBitmap* QPixmap_CreateHeuristicMask1(const QPixmap* self, bool clipTight); QBitmap* QPixmap_CreateMaskFromColor2(const QPixmap* self, QColor* maskColor, int mode); @@ -122,7 +129,19 @@ bool QPixmap_ConvertFromImage2(QPixmap* self, QImage* img, int flags); QPixmap* QPixmap_Copy1(const QPixmap* self, QRect* rect); void QPixmap_Scroll7(QPixmap* self, int dx, int dy, int x, int y, int width, int height, QRegion* exposed); void QPixmap_Scroll4(QPixmap* self, int dx, int dy, QRect* rect, QRegion* exposed); -void QPixmap_Delete(QPixmap* self); +void QPixmap_override_virtual_DevType(void* self, intptr_t slot); +int QPixmap_virtualbase_DevType(const void* self); +void QPixmap_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPixmap_virtualbase_PaintEngine(const void* self); +void QPixmap_override_virtual_Metric(void* self, intptr_t slot); +int QPixmap_virtualbase_Metric(const void* self, int param1); +void QPixmap_override_virtual_InitPainter(void* self, intptr_t slot); +void QPixmap_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPixmap_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPixmap_virtualbase_Redirected(const void* self, QPoint* offset); +void QPixmap_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPixmap_virtualbase_SharedPainter(const void* self); +void QPixmap_Delete(QPixmap* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpixmapcache.cpp b/qt6/gen_qpixmapcache.cpp index 8fb4c3eb..c4b35c0c 100644 --- a/qt6/gen_qpixmapcache.cpp +++ b/qt6/gen_qpixmapcache.cpp @@ -51,16 +51,22 @@ void QPixmapCache_Clear() { QPixmapCache::clear(); } -void QPixmapCache_Delete(QPixmapCache* self) { - delete self; +void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPixmapCache__Key* QPixmapCache__Key_new() { - return new QPixmapCache::Key(); +void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key) { + QPixmapCache::Key* ret = new QPixmapCache::Key(); + *outptr_QPixmapCache__Key = ret; } -QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other) { - return new QPixmapCache::Key(*other); +void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key) { + QPixmapCache::Key* ret = new QPixmapCache::Key(*other); + *outptr_QPixmapCache__Key = ret; } bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) { @@ -83,7 +89,11 @@ bool QPixmapCache__Key_IsValid(const QPixmapCache__Key* self) { return self->isValid(); } -void QPixmapCache__Key_Delete(QPixmapCache__Key* self) { - delete self; +void QPixmapCache__Key_Delete(QPixmapCache__Key* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpixmapcache.go b/qt6/gen_qpixmapcache.go index 75c38bea..795e9256 100644 --- a/qt6/gen_qpixmapcache.go +++ b/qt6/gen_qpixmapcache.go @@ -14,7 +14,8 @@ import ( ) type QPixmapCache struct { - h *C.QPixmapCache + h *C.QPixmapCache + isSubclass bool } func (this *QPixmapCache) cPointer() *C.QPixmapCache { @@ -31,6 +32,7 @@ func (this *QPixmapCache) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPixmapCache constructs the type using only CGO pointers. func newQPixmapCache(h *C.QPixmapCache) *QPixmapCache { if h == nil { return nil @@ -38,8 +40,13 @@ func newQPixmapCache(h *C.QPixmapCache) *QPixmapCache { return &QPixmapCache{h: h} } +// UnsafeNewQPixmapCache constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache(h unsafe.Pointer) *QPixmapCache { - return newQPixmapCache((*C.QPixmapCache)(h)) + if h == nil { + return nil + } + + return &QPixmapCache{h: (*C.QPixmapCache)(h)} } func QPixmapCache_CacheLimit() int { @@ -99,7 +106,7 @@ func QPixmapCache_Clear() { // Delete this object from C++ memory. func (this *QPixmapCache) Delete() { - C.QPixmapCache_Delete(this.h) + C.QPixmapCache_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -112,7 +119,8 @@ func (this *QPixmapCache) GoGC() { } type QPixmapCache__Key struct { - h *C.QPixmapCache__Key + h *C.QPixmapCache__Key + isSubclass bool } func (this *QPixmapCache__Key) cPointer() *C.QPixmapCache__Key { @@ -129,6 +137,7 @@ func (this *QPixmapCache__Key) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPixmapCache__Key constructs the type using only CGO pointers. func newQPixmapCache__Key(h *C.QPixmapCache__Key) *QPixmapCache__Key { if h == nil { return nil @@ -136,20 +145,33 @@ func newQPixmapCache__Key(h *C.QPixmapCache__Key) *QPixmapCache__Key { return &QPixmapCache__Key{h: h} } +// UnsafeNewQPixmapCache__Key constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache__Key(h unsafe.Pointer) *QPixmapCache__Key { - return newQPixmapCache__Key((*C.QPixmapCache__Key)(h)) + if h == nil { + return nil + } + + return &QPixmapCache__Key{h: (*C.QPixmapCache__Key)(h)} } // NewQPixmapCache__Key constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key() *QPixmapCache__Key { - ret := C.QPixmapCache__Key_new() - return newQPixmapCache__Key(ret) + var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil + + C.QPixmapCache__Key_new(&outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret.isSubclass = true + return ret } // NewQPixmapCache__Key2 constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key2(other *QPixmapCache__Key) *QPixmapCache__Key { - ret := C.QPixmapCache__Key_new2(other.cPointer()) - return newQPixmapCache__Key(ret) + var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil + + C.QPixmapCache__Key_new2(other.cPointer(), &outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret.isSubclass = true + return ret } func (this *QPixmapCache__Key) OperatorEqual(key *QPixmapCache__Key) bool { @@ -174,7 +196,7 @@ func (this *QPixmapCache__Key) IsValid() bool { // Delete this object from C++ memory. func (this *QPixmapCache__Key) Delete() { - C.QPixmapCache__Key_Delete(this.h) + C.QPixmapCache__Key_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpixmapcache.h b/qt6/gen_qpixmapcache.h index 41afbe37..4bc0a19e 100644 --- a/qt6/gen_qpixmapcache.h +++ b/qt6/gen_qpixmapcache.h @@ -38,16 +38,16 @@ bool QPixmapCache_Replace(QPixmapCache__Key* key, QPixmap* pixmap); void QPixmapCache_Remove(struct miqt_string key); void QPixmapCache_RemoveWithKey(QPixmapCache__Key* key); void QPixmapCache_Clear(); -void QPixmapCache_Delete(QPixmapCache* self); +void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass); -QPixmapCache__Key* QPixmapCache__Key_new(); -QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other); +void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key); +void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key); bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); bool QPixmapCache__Key_OperatorNotEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); void QPixmapCache__Key_OperatorAssign(QPixmapCache__Key* self, QPixmapCache__Key* other); void QPixmapCache__Key_Swap(QPixmapCache__Key* self, QPixmapCache__Key* other); bool QPixmapCache__Key_IsValid(const QPixmapCache__Key* self); -void QPixmapCache__Key_Delete(QPixmapCache__Key* self); +void QPixmapCache__Key_Delete(QPixmapCache__Key* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qplaintextedit.cpp b/qt6/gen_qplaintextedit.cpp index df7e35e7..b468df0f 100644 --- a/qt6/gen_qplaintextedit.cpp +++ b/qt6/gen_qplaintextedit.cpp @@ -1,8 +1,25 @@ +#include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include #include +#include +#include #include #include #include @@ -11,6 +28,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -20,30 +40,903 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QTextEdit__ExtraSelection +#include #include +#include +#include #include #include +#include #include #include #include "gen_qplaintextedit.h" #include "_cgo_export.h" -QPlainTextEdit* QPlainTextEdit_new(QWidget* parent) { - return new QPlainTextEdit(parent); +class MiqtVirtualQPlainTextEdit : public virtual QPlainTextEdit { +public: + + MiqtVirtualQPlainTextEdit(QWidget* parent): QPlainTextEdit(parent) {}; + MiqtVirtualQPlainTextEdit(): QPlainTextEdit() {}; + MiqtVirtualQPlainTextEdit(const QString& text): QPlainTextEdit(text) {}; + MiqtVirtualQPlainTextEdit(const QString& text, QWidget* parent): QPlainTextEdit(text, parent) {}; + + virtual ~MiqtVirtualQPlainTextEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QPlainTextEdit::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPlainTextEdit_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QPlainTextEdit::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QPlainTextEdit::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPlainTextEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QPlainTextEdit::inputMethodQuery(static_cast(property))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QPlainTextEdit::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QPlainTextEdit::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QPlainTextEdit::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QPlainTextEdit::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QPlainTextEdit::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QPlainTextEdit::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QPlainTextEdit::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QPlainTextEdit::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QPlainTextEdit::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QPlainTextEdit::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QPlainTextEdit::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QPlainTextEdit::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QPlainTextEdit::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QPlainTextEdit::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QPlainTextEdit::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QPlainTextEdit::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QPlainTextEdit::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QPlainTextEdit::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QPlainTextEdit::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QPlainTextEdit::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QPlainTextEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QPlainTextEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QPlainTextEdit::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QPlainTextEdit::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QPlainTextEdit::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QPlainTextEdit::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QPlainTextEdit::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QPlainTextEdit::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QPlainTextEdit::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QPlainTextEdit::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QPlainTextEdit::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QPlainTextEdit::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QPlainTextEdit::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QPlainTextEdit::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QPlainTextEdit::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QPlainTextEdit::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QPlainTextEdit::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QPlainTextEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QPlainTextEdit::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QPlainTextEdit::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QPlainTextEdit::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QPlainTextEdit::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QPlainTextEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QPlainTextEdit::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateMimeDataFromSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* createMimeDataFromSelection() const override { + if (handle__CreateMimeDataFromSelection == 0) { + return QPlainTextEdit::createMimeDataFromSelection(); + } + + + QMimeData* callback_return_value = miqt_exec_callback_QPlainTextEdit_CreateMimeDataFromSelection(const_cast(this), handle__CreateMimeDataFromSelection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_CreateMimeDataFromSelection() const { + + return QPlainTextEdit::createMimeDataFromSelection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QPlainTextEdit::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QPlainTextEdit::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual void insertFromMimeData(const QMimeData* source) override { + if (handle__InsertFromMimeData == 0) { + QPlainTextEdit::insertFromMimeData(source); + return; + } + + QMimeData* sigval1 = (QMimeData*) source; + + miqt_exec_callback_QPlainTextEdit_InsertFromMimeData(this, handle__InsertFromMimeData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertFromMimeData(QMimeData* source) { + + QPlainTextEdit::insertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QPlainTextEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QPlainTextEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QPlainTextEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QPlainTextEdit::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QPlainTextEdit_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QPlainTextEdit::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetTextCursor = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetTextCursor(const QTextCursor& cursor) override { + if (handle__DoSetTextCursor == 0) { + QPlainTextEdit::doSetTextCursor(cursor); + return; + } + + const QTextCursor& cursor_ret = cursor; + // Cast returned reference into pointer + QTextCursor* sigval1 = const_cast(&cursor_ret); + + miqt_exec_callback_QPlainTextEdit_DoSetTextCursor(this, handle__DoSetTextCursor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetTextCursor(QTextCursor* cursor) { + + QPlainTextEdit::doSetTextCursor(*cursor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPlainTextEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPlainTextEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPlainTextEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPlainTextEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPlainTextEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPlainTextEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QPlainTextEdit::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QPlainTextEdit_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QPlainTextEdit::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QPlainTextEdit::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QPlainTextEdit::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QPlainTextEdit::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QPlainTextEdit_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QPlainTextEdit::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QPlainTextEdit::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPlainTextEdit_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QPlainTextEdit::viewportSizeHint()); + + } + +}; + +void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(parent); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPlainTextEdit* QPlainTextEdit_new2() { - return new QPlainTextEdit(); +void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text) { +void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPlainTextEdit(text_QString); + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent) { +void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPlainTextEdit(text_QString, parent); + MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString, parent); + *outptr_QPlainTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self) { @@ -331,214 +1224,770 @@ QVariant* QPlainTextEdit_InputMethodQuery2(const QPlainTextEdit* self, int query return new QVariant(self->inputMethodQuery(static_cast(query), *argument)); } -void QPlainTextEdit_SetPlainText(QPlainTextEdit* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setPlainText(text_QString); +void QPlainTextEdit_SetPlainText(QPlainTextEdit* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setPlainText(text_QString); +} + +void QPlainTextEdit_Cut(QPlainTextEdit* self) { + self->cut(); +} + +void QPlainTextEdit_Copy(QPlainTextEdit* self) { + self->copy(); +} + +void QPlainTextEdit_Paste(QPlainTextEdit* self) { + self->paste(); +} + +void QPlainTextEdit_Undo(QPlainTextEdit* self) { + self->undo(); +} + +void QPlainTextEdit_Redo(QPlainTextEdit* self) { + self->redo(); +} + +void QPlainTextEdit_Clear(QPlainTextEdit* self) { + self->clear(); +} + +void QPlainTextEdit_SelectAll(QPlainTextEdit* self) { + self->selectAll(); +} + +void QPlainTextEdit_InsertPlainText(QPlainTextEdit* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->insertPlainText(text_QString); +} + +void QPlainTextEdit_AppendPlainText(QPlainTextEdit* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->appendPlainText(text_QString); +} + +void QPlainTextEdit_AppendHtml(QPlainTextEdit* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->appendHtml(html_QString); +} + +void QPlainTextEdit_CenterCursor(QPlainTextEdit* self) { + self->centerCursor(); +} + +void QPlainTextEdit_ZoomIn(QPlainTextEdit* self) { + self->zoomIn(); +} + +void QPlainTextEdit_ZoomOut(QPlainTextEdit* self) { + self->zoomOut(); +} + +void QPlainTextEdit_TextChanged(QPlainTextEdit* self) { + self->textChanged(); +} + +void QPlainTextEdit_connect_TextChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::textChanged), self, [=]() { + miqt_exec_callback_QPlainTextEdit_TextChanged(slot); + }); +} + +void QPlainTextEdit_UndoAvailable(QPlainTextEdit* self, bool b) { + self->undoAvailable(b); +} + +void QPlainTextEdit_connect_UndoAvailable(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::undoAvailable), self, [=](bool b) { + bool sigval1 = b; + miqt_exec_callback_QPlainTextEdit_UndoAvailable(slot, sigval1); + }); +} + +void QPlainTextEdit_RedoAvailable(QPlainTextEdit* self, bool b) { + self->redoAvailable(b); +} + +void QPlainTextEdit_connect_RedoAvailable(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::redoAvailable), self, [=](bool b) { + bool sigval1 = b; + miqt_exec_callback_QPlainTextEdit_RedoAvailable(slot, sigval1); + }); +} + +void QPlainTextEdit_CopyAvailable(QPlainTextEdit* self, bool b) { + self->copyAvailable(b); +} + +void QPlainTextEdit_connect_CopyAvailable(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::copyAvailable), self, [=](bool b) { + bool sigval1 = b; + miqt_exec_callback_QPlainTextEdit_CopyAvailable(slot, sigval1); + }); +} + +void QPlainTextEdit_SelectionChanged(QPlainTextEdit* self) { + self->selectionChanged(); +} + +void QPlainTextEdit_connect_SelectionChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::selectionChanged), self, [=]() { + miqt_exec_callback_QPlainTextEdit_SelectionChanged(slot); + }); +} + +void QPlainTextEdit_CursorPositionChanged(QPlainTextEdit* self) { + self->cursorPositionChanged(); +} + +void QPlainTextEdit_connect_CursorPositionChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::cursorPositionChanged), self, [=]() { + miqt_exec_callback_QPlainTextEdit_CursorPositionChanged(slot); + }); +} + +void QPlainTextEdit_UpdateRequest(QPlainTextEdit* self, QRect* rect, int dy) { + self->updateRequest(*rect, static_cast(dy)); +} + +void QPlainTextEdit_connect_UpdateRequest(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::updateRequest), self, [=](const QRect& rect, int dy) { + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + int sigval2 = dy; + miqt_exec_callback_QPlainTextEdit_UpdateRequest(slot, sigval1, sigval2); + }); +} + +void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount) { + self->blockCountChanged(static_cast(newBlockCount)); +} + +void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::blockCountChanged), self, [=](int newBlockCount) { + int sigval1 = newBlockCount; + miqt_exec_callback_QPlainTextEdit_BlockCountChanged(slot, sigval1); + }); +} + +void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1) { + self->modificationChanged(param1); +} + +void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, intptr_t slot) { + MiqtVirtualQPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::modificationChanged), self, [=](bool param1) { + bool sigval1 = param1; + miqt_exec_callback_QPlainTextEdit_ModificationChanged(slot, sigval1); + }); +} + +struct miqt_string QPlainTextEdit_Tr2(const char* s, const char* c) { + QString _ret = QPlainTextEdit::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPlainTextEdit_Tr3(const char* s, const char* c, int n) { + QString _ret = QPlainTextEdit::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPlainTextEdit_Find2(QPlainTextEdit* self, struct miqt_string exp, int options) { + QString exp_QString = QString::fromUtf8(exp.data, exp.len); + return self->find(exp_QString, static_cast(options)); +} + +bool QPlainTextEdit_Find22(QPlainTextEdit* self, QRegularExpression* exp, int options) { + return self->find(*exp, static_cast(options)); +} + +void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, int operation, int mode) { + self->moveCursor(static_cast(operation), static_cast(mode)); +} + +void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal) { + self->zoomIn(static_cast(rangeVal)); +} + +void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal) { + self->zoomOut(static_cast(rangeVal)); +} + +void QPlainTextEdit_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__LoadResource = slot; +} + +QVariant* QPlainTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QPlainTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QPlainTextEdit_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_InputMethodQuery(property); +} + +void QPlainTextEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__Event = slot; +} + +bool QPlainTextEdit_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_Event(e); +} + +void QPlainTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__TimerEvent = slot; +} + +void QPlainTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_TimerEvent(e); +} + +void QPlainTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QPlainTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QPlainTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QPlainTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QPlainTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QPlainTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ResizeEvent(e); +} + +void QPlainTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__PaintEvent = slot; +} + +void QPlainTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_PaintEvent(e); +} + +void QPlainTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QPlainTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MousePressEvent(e); +} + +void QPlainTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QPlainTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QPlainTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QPlainTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QPlainTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QPlainTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QPlainTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QPlainTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QPlainTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPlainTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QPlainTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QPlainTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QPlainTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QPlainTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DragLeaveEvent(e); } -void QPlainTextEdit_Cut(QPlainTextEdit* self) { - self->cut(); +void QPlainTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DragMoveEvent = slot; } -void QPlainTextEdit_Copy(QPlainTextEdit* self) { - self->copy(); +void QPlainTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DragMoveEvent(e); } -void QPlainTextEdit_Paste(QPlainTextEdit* self) { - self->paste(); +void QPlainTextEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DropEvent = slot; } -void QPlainTextEdit_Undo(QPlainTextEdit* self) { - self->undo(); +void QPlainTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DropEvent(e); } -void QPlainTextEdit_Redo(QPlainTextEdit* self) { - self->redo(); +void QPlainTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__FocusInEvent = slot; } -void QPlainTextEdit_Clear(QPlainTextEdit* self) { - self->clear(); +void QPlainTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_FocusInEvent(e); } -void QPlainTextEdit_SelectAll(QPlainTextEdit* self) { - self->selectAll(); +void QPlainTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__FocusOutEvent = slot; } -void QPlainTextEdit_InsertPlainText(QPlainTextEdit* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->insertPlainText(text_QString); +void QPlainTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_FocusOutEvent(e); } -void QPlainTextEdit_AppendPlainText(QPlainTextEdit* self, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->appendPlainText(text_QString); +void QPlainTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ShowEvent = slot; } -void QPlainTextEdit_AppendHtml(QPlainTextEdit* self, struct miqt_string html) { - QString html_QString = QString::fromUtf8(html.data, html.len); - self->appendHtml(html_QString); +void QPlainTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ShowEvent(param1); } -void QPlainTextEdit_CenterCursor(QPlainTextEdit* self) { - self->centerCursor(); +void QPlainTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ChangeEvent = slot; } -void QPlainTextEdit_ZoomIn(QPlainTextEdit* self) { - self->zoomIn(); +void QPlainTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ChangeEvent(e); } -void QPlainTextEdit_ZoomOut(QPlainTextEdit* self) { - self->zoomOut(); +void QPlainTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__WheelEvent = slot; } -void QPlainTextEdit_TextChanged(QPlainTextEdit* self) { - self->textChanged(); +void QPlainTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_WheelEvent(e); } -void QPlainTextEdit_connect_TextChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::textChanged), self, [=]() { - miqt_exec_callback_QPlainTextEdit_TextChanged(slot); - }); +void QPlainTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__CreateMimeDataFromSelection = slot; } -void QPlainTextEdit_UndoAvailable(QPlainTextEdit* self, bool b) { - self->undoAvailable(b); +QMimeData* QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_CreateMimeDataFromSelection(); } -void QPlainTextEdit_connect_UndoAvailable(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::undoAvailable), self, [=](bool b) { - bool sigval1 = b; - miqt_exec_callback_QPlainTextEdit_UndoAvailable(slot, sigval1); - }); +void QPlainTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__CanInsertFromMimeData = slot; } -void QPlainTextEdit_RedoAvailable(QPlainTextEdit* self, bool b) { - self->redoAvailable(b); +bool QPlainTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_CanInsertFromMimeData(source); } -void QPlainTextEdit_connect_RedoAvailable(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::redoAvailable), self, [=](bool b) { - bool sigval1 = b; - miqt_exec_callback_QPlainTextEdit_RedoAvailable(slot, sigval1); - }); +void QPlainTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__InsertFromMimeData = slot; } -void QPlainTextEdit_CopyAvailable(QPlainTextEdit* self, bool b) { - self->copyAvailable(b); +void QPlainTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_InsertFromMimeData(source); } -void QPlainTextEdit_connect_CopyAvailable(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::copyAvailable), self, [=](bool b) { - bool sigval1 = b; - miqt_exec_callback_QPlainTextEdit_CopyAvailable(slot, sigval1); - }); +void QPlainTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__InputMethodEvent = slot; } -void QPlainTextEdit_SelectionChanged(QPlainTextEdit* self) { - self->selectionChanged(); +void QPlainTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_InputMethodEvent(param1); } -void QPlainTextEdit_connect_SelectionChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::selectionChanged), self, [=]() { - miqt_exec_callback_QPlainTextEdit_SelectionChanged(slot); - }); +void QPlainTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ScrollContentsBy = slot; } -void QPlainTextEdit_CursorPositionChanged(QPlainTextEdit* self) { - self->cursorPositionChanged(); +void QPlainTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -void QPlainTextEdit_connect_CursorPositionChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::cursorPositionChanged), self, [=]() { - miqt_exec_callback_QPlainTextEdit_CursorPositionChanged(slot); - }); +void QPlainTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__DoSetTextCursor = slot; } -void QPlainTextEdit_UpdateRequest(QPlainTextEdit* self, QRect* rect, int dy) { - self->updateRequest(*rect, static_cast(dy)); +void QPlainTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_DoSetTextCursor(cursor); } -void QPlainTextEdit_connect_UpdateRequest(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::updateRequest), self, [=](const QRect& rect, int dy) { - const QRect& rect_ret = rect; - // Cast returned reference into pointer - QRect* sigval1 = const_cast(&rect_ret); - int sigval2 = dy; - miqt_exec_callback_QPlainTextEdit_UpdateRequest(slot, sigval1, sigval2); - }); +void QPlainTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__MinimumSizeHint = slot; } -void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount) { - self->blockCountChanged(static_cast(newBlockCount)); +QSize* QPlainTextEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_MinimumSizeHint(); } -void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::blockCountChanged), self, [=](int newBlockCount) { - int sigval1 = newBlockCount; - miqt_exec_callback_QPlainTextEdit_BlockCountChanged(slot, sigval1); - }); +void QPlainTextEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__SizeHint = slot; } -void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1) { - self->modificationChanged(param1); +QSize* QPlainTextEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_SizeHint(); } -void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, intptr_t slot) { - QPlainTextEdit::connect(self, static_cast(&QPlainTextEdit::modificationChanged), self, [=](bool param1) { - bool sigval1 = param1; - miqt_exec_callback_QPlainTextEdit_ModificationChanged(slot, sigval1); - }); +void QPlainTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__SetupViewport = slot; } -struct miqt_string QPlainTextEdit_Tr2(const char* s, const char* c) { - QString _ret = QPlainTextEdit::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QPlainTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_SetupViewport(viewport); } -struct miqt_string QPlainTextEdit_Tr3(const char* s, const char* c, int n) { - QString _ret = QPlainTextEdit::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QPlainTextEdit_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__EventFilter = slot; } -bool QPlainTextEdit_Find2(QPlainTextEdit* self, struct miqt_string exp, int options) { - QString exp_QString = QString::fromUtf8(exp.data, exp.len); - return self->find(exp_QString, static_cast(options)); +bool QPlainTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_EventFilter(param1, param2); } -bool QPlainTextEdit_Find22(QPlainTextEdit* self, QRegularExpression* exp, int options) { - return self->find(*exp, static_cast(options)); +void QPlainTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ViewportEvent = slot; } -void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, int operation, int mode) { - self->moveCursor(static_cast(operation), static_cast(mode)); +bool QPlainTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ViewportEvent(param1); } -void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal) { - self->zoomIn(static_cast(rangeVal)); +void QPlainTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextEdit*)(self) )->handle__ViewportSizeHint = slot; } -void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal) { - self->zoomOut(static_cast(rangeVal)); +QSize* QPlainTextEdit_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQPlainTextEdit*)(self) )->virtualbase_ViewportSizeHint(); } -void QPlainTextEdit_Delete(QPlainTextEdit* self) { - delete self; +void QPlainTextEdit_Delete(QPlainTextEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document) { - return new QPlainTextDocumentLayout(document); +class MiqtVirtualQPlainTextDocumentLayout : public virtual QPlainTextDocumentLayout { +public: + + MiqtVirtualQPlainTextDocumentLayout(QTextDocument* document): QPlainTextDocumentLayout(document) {}; + + virtual ~MiqtVirtualQPlainTextDocumentLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* param1, const QAbstractTextDocumentLayout::PaintContext& param2) override { + if (handle__Draw == 0) { + QPlainTextDocumentLayout::draw(param1, param2); + return; + } + + QPainter* sigval1 = param1; + const QAbstractTextDocumentLayout::PaintContext& param2_ret = param2; + // Cast returned reference into pointer + QAbstractTextDocumentLayout__PaintContext* sigval2 = const_cast(¶m2_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_Draw(this, handle__Draw, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Draw(QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2) { + + QPlainTextDocumentLayout::draw(param1, *param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTest = 0; + + // Subclass to allow providing a Go implementation + virtual int hitTest(const QPointF& param1, Qt::HitTestAccuracy param2) const override { + if (handle__HitTest == 0) { + return QPlainTextDocumentLayout::hitTest(param1, param2); + } + + const QPointF& param1_ret = param1; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(¶m1_ret); + Qt::HitTestAccuracy param2_ret = param2; + int sigval2 = static_cast(param2_ret); + + int callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_HitTest(const_cast(this), handle__HitTest, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HitTest(QPointF* param1, int param2) const { + + return QPlainTextDocumentLayout::hitTest(*param1, static_cast(param2)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PageCount = 0; + + // Subclass to allow providing a Go implementation + virtual int pageCount() const override { + if (handle__PageCount == 0) { + return QPlainTextDocumentLayout::pageCount(); + } + + + int callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_PageCount(const_cast(this), handle__PageCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PageCount() const { + + return QPlainTextDocumentLayout::pageCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DocumentSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSizeF documentSize() const override { + if (handle__DocumentSize == 0) { + return QPlainTextDocumentLayout::documentSize(); + } + + + QSizeF* callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_DocumentSize(const_cast(this), handle__DocumentSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_DocumentSize() const { + + return new QSizeF(QPlainTextDocumentLayout::documentSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FrameBoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF frameBoundingRect(QTextFrame* param1) const override { + if (handle__FrameBoundingRect == 0) { + return QPlainTextDocumentLayout::frameBoundingRect(param1); + } + + QTextFrame* sigval1 = param1; + + QRectF* callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect(const_cast(this), handle__FrameBoundingRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_FrameBoundingRect(QTextFrame* param1) const { + + return new QRectF(QPlainTextDocumentLayout::frameBoundingRect(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockBoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF blockBoundingRect(const QTextBlock& block) const override { + if (handle__BlockBoundingRect == 0) { + return QPlainTextDocumentLayout::blockBoundingRect(block); + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + QRectF* callback_return_value = miqt_exec_callback_QPlainTextDocumentLayout_BlockBoundingRect(const_cast(this), handle__BlockBoundingRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BlockBoundingRect(QTextBlock* block) const { + + return new QRectF(QPlainTextDocumentLayout::blockBoundingRect(*block)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DocumentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void documentChanged(int from, int param2, int charsAdded) override { + if (handle__DocumentChanged == 0) { + QPlainTextDocumentLayout::documentChanged(from, param2, charsAdded); + return; + } + + int sigval1 = from; + int sigval2 = param2; + int sigval3 = charsAdded; + + miqt_exec_callback_QPlainTextDocumentLayout_DocumentChanged(this, handle__DocumentChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DocumentChanged(int from, int param2, int charsAdded) { + + QPlainTextDocumentLayout::documentChanged(static_cast(from), static_cast(param2), static_cast(charsAdded)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeInlineObject = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat& format) override { + if (handle__ResizeInlineObject == 0) { + QPlainTextDocumentLayout::resizeInlineObject(item, posInDocument, format); + return; + } + + QTextInlineObject* sigval1 = new QTextInlineObject(item); + int sigval2 = posInDocument; + const QTextFormat& format_ret = format; + // Cast returned reference into pointer + QTextFormat* sigval3 = const_cast(&format_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_ResizeInlineObject(this, handle__ResizeInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QPlainTextDocumentLayout::resizeInlineObject(*item, static_cast(posInDocument), *format); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PositionInlineObject = 0; + + // Subclass to allow providing a Go implementation + virtual void positionInlineObject(QTextInlineObject item, int posInDocument, const QTextFormat& format) override { + if (handle__PositionInlineObject == 0) { + QPlainTextDocumentLayout::positionInlineObject(item, posInDocument, format); + return; + } + + QTextInlineObject* sigval1 = new QTextInlineObject(item); + int sigval2 = posInDocument; + const QTextFormat& format_ret = format; + // Cast returned reference into pointer + QTextFormat* sigval3 = const_cast(&format_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_PositionInlineObject(this, handle__PositionInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PositionInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QPlainTextDocumentLayout::positionInlineObject(*item, static_cast(posInDocument), *format); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawInlineObject = 0; + + // Subclass to allow providing a Go implementation + virtual void drawInlineObject(QPainter* painter, const QRectF& rect, QTextInlineObject object, int posInDocument, const QTextFormat& format) override { + if (handle__DrawInlineObject == 0) { + QPlainTextDocumentLayout::drawInlineObject(painter, rect, object, posInDocument, format); + return; + } + + QPainter* sigval1 = painter; + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval2 = const_cast(&rect_ret); + QTextInlineObject* sigval3 = new QTextInlineObject(object); + int sigval4 = posInDocument; + const QTextFormat& format_ret = format; + // Cast returned reference into pointer + QTextFormat* sigval5 = const_cast(&format_ret); + + miqt_exec_callback_QPlainTextDocumentLayout_DrawInlineObject(this, handle__DrawInlineObject, sigval1, sigval2, sigval3, sigval4, sigval5); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawInlineObject(QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format) { + + QPlainTextDocumentLayout::drawInlineObject(painter, *rect, *object, static_cast(posInDocument), *format); + + } + +}; + +void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { + MiqtVirtualQPlainTextDocumentLayout* ret = new MiqtVirtualQPlainTextDocumentLayout(document); + *outptr_QPlainTextDocumentLayout = ret; + *outptr_QAbstractTextDocumentLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self) { @@ -622,7 +2071,91 @@ struct miqt_string QPlainTextDocumentLayout_Tr3(const char* s, const char* c, in return _ms; } -void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self) { - delete self; +void QPlainTextDocumentLayout_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__Draw = slot; +} + +void QPlainTextDocumentLayout_virtualbase_Draw(void* self, QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_Draw(param1, param2); +} + +void QPlainTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__HitTest = slot; +} + +int QPlainTextDocumentLayout_virtualbase_HitTest(const void* self, QPointF* param1, int param2) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_HitTest(param1, param2); +} + +void QPlainTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__PageCount = slot; +} + +int QPlainTextDocumentLayout_virtualbase_PageCount(const void* self) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_PageCount(); +} + +void QPlainTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__DocumentSize = slot; +} + +QSizeF* QPlainTextDocumentLayout_virtualbase_DocumentSize(const void* self) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_DocumentSize(); +} + +void QPlainTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__FrameBoundingRect = slot; +} + +QRectF* QPlainTextDocumentLayout_virtualbase_FrameBoundingRect(const void* self, QTextFrame* param1) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_FrameBoundingRect(param1); +} + +void QPlainTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__BlockBoundingRect = slot; +} + +QRectF* QPlainTextDocumentLayout_virtualbase_BlockBoundingRect(const void* self, QTextBlock* block) { + return ( (const MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_BlockBoundingRect(block); +} + +void QPlainTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__DocumentChanged = slot; +} + +void QPlainTextDocumentLayout_virtualbase_DocumentChanged(void* self, int from, int param2, int charsAdded) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_DocumentChanged(from, param2, charsAdded); +} + +void QPlainTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__ResizeInlineObject = slot; +} + +void QPlainTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_ResizeInlineObject(item, posInDocument, format); +} + +void QPlainTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__PositionInlineObject = slot; +} + +void QPlainTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_PositionInlineObject(item, posInDocument, format); +} + +void QPlainTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QPlainTextDocumentLayout*)(self) )->handle__DrawInlineObject = slot; +} + +void QPlainTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQPlainTextDocumentLayout*)(self) )->virtualbase_DrawInlineObject(painter, rect, object, posInDocument, format); +} + +void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qplaintextedit.go b/qt6/gen_qplaintextedit.go index b4a6461a..4d567261 100644 --- a/qt6/gen_qplaintextedit.go +++ b/qt6/gen_qplaintextedit.go @@ -22,7 +22,8 @@ const ( ) type QPlainTextEdit struct { - h *C.QPlainTextEdit + h *C.QPlainTextEdit + isSubclass bool *QAbstractScrollArea } @@ -40,27 +41,53 @@ func (this *QPlainTextEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPlainTextEdit(h *C.QPlainTextEdit) *QPlainTextEdit { +// newQPlainTextEdit constructs the type using only CGO pointers. +func newQPlainTextEdit(h *C.QPlainTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPlainTextEdit { if h == nil { return nil } - return &QPlainTextEdit{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QPlainTextEdit{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQPlainTextEdit(h unsafe.Pointer) *QPlainTextEdit { - return newQPlainTextEdit((*C.QPlainTextEdit)(h)) +// UnsafeNewQPlainTextEdit constructs the type using only unsafe pointers. +func UnsafeNewQPlainTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPlainTextEdit { + if h == nil { + return nil + } + + return &QPlainTextEdit{h: (*C.QPlainTextEdit)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPlainTextEdit constructs a new QPlainTextEdit object. func NewQPlainTextEdit(parent *QWidget) *QPlainTextEdit { - ret := C.QPlainTextEdit_new(parent.cPointer()) - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new(parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPlainTextEdit2 constructs a new QPlainTextEdit object. func NewQPlainTextEdit2() *QPlainTextEdit { - ret := C.QPlainTextEdit_new2() - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new2(&outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPlainTextEdit3 constructs a new QPlainTextEdit object. @@ -69,8 +96,17 @@ func NewQPlainTextEdit3(text string) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPlainTextEdit_new3(text_ms) - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new3(text_ms, &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPlainTextEdit4 constructs a new QPlainTextEdit object. @@ -79,8 +115,17 @@ func NewQPlainTextEdit4(text string, parent *QWidget) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPlainTextEdit_new4(text_ms, parent.cPointer()) - return newQPlainTextEdit(ret) + var outptr_QPlainTextEdit *C.QPlainTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPlainTextEdit_new4(text_ms, parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPlainTextEdit) MetaObject() *QMetaObject { @@ -107,7 +152,7 @@ func (this *QPlainTextEdit) SetDocument(document *QTextDocument) { } func (this *QPlainTextEdit) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QPlainTextEdit_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QPlainTextEdit_Document(this.h)), nil) } func (this *QPlainTextEdit) SetPlaceholderText(placeholderText string) { @@ -162,7 +207,7 @@ func (this *QPlainTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { func (this *QPlainTextEdit) CurrentCharFormat() *QTextCharFormat { _ret := C.QPlainTextEdit_CurrentCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -269,11 +314,11 @@ func (this *QPlainTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QPlainTextEdit) CreateStandardContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QPlainTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()))) + return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())), nil, nil, nil) } func (this *QPlainTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -671,149 +716,1270 @@ func (this *QPlainTextEdit) ZoomOut1(rangeVal int) { C.QPlainTextEdit_ZoomOut1(this.h, (C.int)(rangeVal)) } -// Delete this object from C++ memory. -func (this *QPlainTextEdit) Delete() { - C.QPlainTextEdit_Delete(this.h) +func (this *QPlainTextEdit) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QPlainTextEdit_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QPlainTextEdit_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QPlainTextEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QPlainTextEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QPlainTextEdit_LoadResource +func miqt_exec_callback_QPlainTextEdit_LoadResource(self *C.QPlainTextEdit, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + } -type QPlainTextDocumentLayout struct { - h *C.QPlainTextDocumentLayout - *QAbstractTextDocumentLayout +func (this *QPlainTextEdit) callVirtualBase_InputMethodQuery(property InputMethodQuery) *QVariant { + + _ret := C.QPlainTextEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnInputMethodQuery(slot func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) { + C.QPlainTextEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) cPointer() *C.QPlainTextDocumentLayout { - if this == nil { - return nil +//export miqt_exec_callback_QPlainTextEdit_InputMethodQuery +func miqt_exec_callback_QPlainTextEdit_InputMethodQuery(self *C.QPlainTextEdit, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(property) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } -func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QPlainTextEdit) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QPlainTextEdit) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QPlainTextEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_Event +func miqt_exec_callback_QPlainTextEdit_Event(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout) *QPlainTextDocumentLayout { - if h == nil { - return nil +func (this *QPlainTextEdit) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QPlainTextEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QPlainTextEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_TimerEvent +func miqt_exec_callback_QPlainTextEdit_TimerEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QPlainTextDocumentLayout{h: h, QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(h))} + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + } -func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer) *QPlainTextDocumentLayout { - return newQPlainTextDocumentLayout((*C.QPlainTextDocumentLayout)(h)) +func (this *QPlainTextEdit) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QPlainTextEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QPlainTextEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object. -func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout { - ret := C.QPlainTextDocumentLayout_new(document.cPointer()) - return newQPlainTextDocumentLayout(ret) +//export miqt_exec_callback_QPlainTextEdit_KeyPressEvent +func miqt_exec_callback_QPlainTextEdit_KeyPressEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QPlainTextDocumentLayout_MetaObject(this.h))) +func (this *QPlainTextEdit) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QPlainTextEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QPlainTextEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QPlainTextDocumentLayout_Metacast(this.h, param1_Cstring)) +//export miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent +func miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + } -func QPlainTextDocumentLayout_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QPlainTextEdit) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QPlainTextEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QPlainTextEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) { - C.QPlainTextDocumentLayout_Draw(this.h, param1.cPointer(), param2.cPointer()) +//export miqt_exec_callback_QPlainTextEdit_ResizeEvent +func miqt_exec_callback_QPlainTextEdit_ResizeEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) HitTest(param1 *QPointF, param2 HitTestAccuracy) int { - return (int)(C.QPlainTextDocumentLayout_HitTest(this.h, param1.cPointer(), (C.int)(param2))) +func (this *QPlainTextEdit) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QPlainTextEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QPlainTextEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) PageCount() int { - return (int)(C.QPlainTextDocumentLayout_PageCount(this.h)) +//export miqt_exec_callback_QPlainTextEdit_PaintEvent +func miqt_exec_callback_QPlainTextEdit_PaintEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) DocumentSize() *QSizeF { - _ret := C.QPlainTextDocumentLayout_DocumentSize(this.h) - _goptr := newQSizeF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QPlainTextEdit) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) FrameBoundingRect(param1 *QTextFrame) *QRectF { - _ret := C.QPlainTextDocumentLayout_FrameBoundingRect(this.h, param1.cPointer()) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +//export miqt_exec_callback_QPlainTextEdit_MousePressEvent +func miqt_exec_callback_QPlainTextEdit_MousePressEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) BlockBoundingRect(block *QTextBlock) *QRectF { - _ret := C.QPlainTextDocumentLayout_BlockBoundingRect(this.h, block.cPointer()) - _goptr := newQRectF(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QPlainTextEdit) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) EnsureBlockLayout(block *QTextBlock) { - C.QPlainTextDocumentLayout_EnsureBlockLayout(this.h, block.cPointer()) +//export miqt_exec_callback_QPlainTextEdit_MouseMoveEvent +func miqt_exec_callback_QPlainTextEdit_MouseMoveEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) SetCursorWidth(width int) { - C.QPlainTextDocumentLayout_SetCursorWidth(this.h, (C.int)(width)) +func (this *QPlainTextEdit) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QPlainTextDocumentLayout) CursorWidth() int { - return (int)(C.QPlainTextDocumentLayout_CursorWidth(this.h)) +//export miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent +func miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + } -func (this *QPlainTextDocumentLayout) RequestUpdate() { - C.QPlainTextDocumentLayout_RequestUpdate(this.h) +func (this *QPlainTextEdit) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QPlainTextEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPlainTextEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QPlainTextDocumentLayout_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent +func miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + } -func QPlainTextDocumentLayout_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QPlainTextEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QPlainTextEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QPlainTextEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_FocusNextPrevChild +func miqt_exec_callback_QPlainTextEdit_FocusNextPrevChild(self *C.QPlainTextEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QPlainTextEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QPlainTextEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ContextMenuEvent +func miqt_exec_callback_QPlainTextEdit_ContextMenuEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DragEnterEvent(e *QDragEnterEvent) { + + C.QPlainTextEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDragEnterEvent(slot func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) { + C.QPlainTextEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DragEnterEvent +func miqt_exec_callback_QPlainTextEdit_DragEnterEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QPlainTextEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QPlainTextEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DragLeaveEvent +func miqt_exec_callback_QPlainTextEdit_DragLeaveEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QPlainTextEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QPlainTextEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DragMoveEvent +func miqt_exec_callback_QPlainTextEdit_DragMoveEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QPlainTextEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QPlainTextEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DropEvent +func miqt_exec_callback_QPlainTextEdit_DropEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QPlainTextEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QPlainTextEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_FocusInEvent +func miqt_exec_callback_QPlainTextEdit_FocusInEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QPlainTextEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QPlainTextEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_FocusOutEvent +func miqt_exec_callback_QPlainTextEdit_FocusOutEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QPlainTextEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPlainTextEdit) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QPlainTextEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ShowEvent +func miqt_exec_callback_QPlainTextEdit_ShowEvent(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QPlainTextEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QPlainTextEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ChangeEvent +func miqt_exec_callback_QPlainTextEdit_ChangeEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QPlainTextEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPlainTextEdit) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QPlainTextEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_WheelEvent +func miqt_exec_callback_QPlainTextEdit_WheelEvent(self *C.QPlainTextEdit, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { + + return UnsafeNewQMimeData(unsafe.Pointer(C.QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))), nil) +} +func (this *QPlainTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { + C.QPlainTextEdit_override_virtual_CreateMimeDataFromSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_CreateMimeDataFromSelection +func miqt_exec_callback_QPlainTextEdit_CreateMimeDataFromSelection(self *C.QPlainTextEdit, cb C.intptr_t) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMimeData) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_CreateMimeDataFromSelection) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextEdit) callVirtualBase_CanInsertFromMimeData(source *QMimeData) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), source.cPointer())) + +} +func (this *QPlainTextEdit) OnCanInsertFromMimeData(slot func(super func(source *QMimeData) bool, source *QMimeData) bool) { + C.QPlainTextEdit_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData +func miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData(self *C.QPlainTextEdit, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData) bool, source *QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_InsertFromMimeData(source *QMimeData) { + + C.QPlainTextEdit_virtualbase_InsertFromMimeData(unsafe.Pointer(this.h), source.cPointer()) + +} +func (this *QPlainTextEdit) OnInsertFromMimeData(slot func(super func(source *QMimeData), source *QMimeData)) { + C.QPlainTextEdit_override_virtual_InsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_InsertFromMimeData +func miqt_exec_callback_QPlainTextEdit_InsertFromMimeData(self *C.QPlainTextEdit, cb C.intptr_t, source *C.QMimeData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData), source *QMimeData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QPlainTextEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPlainTextEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QPlainTextEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_InputMethodEvent +func miqt_exec_callback_QPlainTextEdit_InputMethodEvent(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QPlainTextEdit_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QPlainTextEdit) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QPlainTextEdit_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ScrollContentsBy +func miqt_exec_callback_QPlainTextEdit_ScrollContentsBy(self *C.QPlainTextEdit, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QPlainTextEdit) callVirtualBase_DoSetTextCursor(cursor *QTextCursor) { + + C.QPlainTextEdit_virtualbase_DoSetTextCursor(unsafe.Pointer(this.h), cursor.cPointer()) + +} +func (this *QPlainTextEdit) OnDoSetTextCursor(slot func(super func(cursor *QTextCursor), cursor *QTextCursor)) { + C.QPlainTextEdit_override_virtual_DoSetTextCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_DoSetTextCursor +func miqt_exec_callback_QPlainTextEdit_DoSetTextCursor(self *C.QPlainTextEdit, cb C.intptr_t, cursor *C.QTextCursor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursor *QTextCursor), cursor *QTextCursor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextCursor(unsafe.Pointer(cursor)) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DoSetTextCursor, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QPlainTextEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QPlainTextEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_MinimumSizeHint +func miqt_exec_callback_QPlainTextEdit_MinimumSizeHint(self *C.QPlainTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QPlainTextEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QPlainTextEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_SizeHint +func miqt_exec_callback_QPlainTextEdit_SizeHint(self *C.QPlainTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextEdit) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QPlainTextEdit_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QPlainTextEdit) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QPlainTextEdit_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_SetupViewport +func miqt_exec_callback_QPlainTextEdit_SetupViewport(self *C.QPlainTextEdit, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QPlainTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QPlainTextEdit) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QPlainTextEdit) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QPlainTextEdit_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_EventFilter +func miqt_exec_callback_QPlainTextEdit_EventFilter(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QPlainTextEdit_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QPlainTextEdit) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QPlainTextEdit_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ViewportEvent +func miqt_exec_callback_QPlainTextEdit_ViewportEvent(self *C.QPlainTextEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPlainTextEdit) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QPlainTextEdit_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextEdit) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QPlainTextEdit_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextEdit_ViewportSizeHint +func miqt_exec_callback_QPlainTextEdit_ViewportSizeHint(self *C.QPlainTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QPlainTextEdit) Delete() { + C.QPlainTextEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPlainTextEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QPlainTextEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QPlainTextDocumentLayout struct { + h *C.QPlainTextDocumentLayout + isSubclass bool + *QAbstractTextDocumentLayout +} + +func (this *QPlainTextDocumentLayout) cPointer() *C.QPlainTextDocumentLayout { + if this == nil { + return nil + } + return this.h +} + +func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPlainTextDocumentLayout constructs the type using only CGO pointers. +func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout, h_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QPlainTextDocumentLayout { + if h == nil { + return nil + } + return &QPlainTextDocumentLayout{h: h, + QAbstractTextDocumentLayout: newQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} +} + +// UnsafeNewQPlainTextDocumentLayout constructs the type using only unsafe pointers. +func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer, h_QAbstractTextDocumentLayout unsafe.Pointer, h_QObject unsafe.Pointer) *QPlainTextDocumentLayout { + if h == nil { + return nil + } + + return &QPlainTextDocumentLayout{h: (*C.QPlainTextDocumentLayout)(h), + QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} +} + +// NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object. +func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout { + var outptr_QPlainTextDocumentLayout *C.QPlainTextDocumentLayout = nil + var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil + var outptr_QObject *C.QObject = nil + + C.QPlainTextDocumentLayout_new(document.cPointer(), &outptr_QPlainTextDocumentLayout, &outptr_QAbstractTextDocumentLayout, &outptr_QObject) + ret := newQPlainTextDocumentLayout(outptr_QPlainTextDocumentLayout, outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QPlainTextDocumentLayout) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QPlainTextDocumentLayout_MetaObject(this.h))) +} + +func (this *QPlainTextDocumentLayout) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPlainTextDocumentLayout_Metacast(this.h, param1_Cstring)) +} + +func QPlainTextDocumentLayout_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPlainTextDocumentLayout) Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) { + C.QPlainTextDocumentLayout_Draw(this.h, param1.cPointer(), param2.cPointer()) +} + +func (this *QPlainTextDocumentLayout) HitTest(param1 *QPointF, param2 HitTestAccuracy) int { + return (int)(C.QPlainTextDocumentLayout_HitTest(this.h, param1.cPointer(), (C.int)(param2))) +} + +func (this *QPlainTextDocumentLayout) PageCount() int { + return (int)(C.QPlainTextDocumentLayout_PageCount(this.h)) +} + +func (this *QPlainTextDocumentLayout) DocumentSize() *QSizeF { + _ret := C.QPlainTextDocumentLayout_DocumentSize(this.h) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPlainTextDocumentLayout) FrameBoundingRect(param1 *QTextFrame) *QRectF { + _ret := C.QPlainTextDocumentLayout_FrameBoundingRect(this.h, param1.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPlainTextDocumentLayout) BlockBoundingRect(block *QTextBlock) *QRectF { + _ret := C.QPlainTextDocumentLayout_BlockBoundingRect(this.h, block.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPlainTextDocumentLayout) EnsureBlockLayout(block *QTextBlock) { + C.QPlainTextDocumentLayout_EnsureBlockLayout(this.h, block.cPointer()) +} + +func (this *QPlainTextDocumentLayout) SetCursorWidth(width int) { + C.QPlainTextDocumentLayout_SetCursorWidth(this.h, (C.int)(width)) +} + +func (this *QPlainTextDocumentLayout) CursorWidth() int { + return (int)(C.QPlainTextDocumentLayout_CursorWidth(this.h)) +} + +func (this *QPlainTextDocumentLayout) RequestUpdate() { + C.QPlainTextDocumentLayout_RequestUpdate(this.h) +} + +func QPlainTextDocumentLayout_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPlainTextDocumentLayout_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPlainTextDocumentLayout_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) { + + C.QPlainTextDocumentLayout_virtualbase_Draw(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnDraw(slot func(super func(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext), param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext)) { + C.QPlainTextDocumentLayout_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_Draw +func miqt_exec_callback_QPlainTextDocumentLayout_Draw(self *C.QPlainTextDocumentLayout, cb C.intptr_t, param1 *C.QPainter, param2 *C.QAbstractTextDocumentLayout__PaintContext) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext), param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQAbstractTextDocumentLayout__PaintContext(unsafe.Pointer(param2)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_Draw, slotval1, slotval2) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_HitTest(param1 *QPointF, param2 HitTestAccuracy) int { + + return (int)(C.QPlainTextDocumentLayout_virtualbase_HitTest(unsafe.Pointer(this.h), param1.cPointer(), (C.int)(param2))) + +} +func (this *QPlainTextDocumentLayout) OnHitTest(slot func(super func(param1 *QPointF, param2 HitTestAccuracy) int, param1 *QPointF, param2 HitTestAccuracy) int) { + C.QPlainTextDocumentLayout_override_virtual_HitTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_HitTest +func miqt_exec_callback_QPlainTextDocumentLayout_HitTest(self *C.QPlainTextDocumentLayout, cb C.intptr_t, param1 *C.QPointF, param2 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPointF, param2 HitTestAccuracy) int, param1 *QPointF, param2 HitTestAccuracy) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(param1)) + slotval2 := (HitTestAccuracy)(param2) + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_HitTest, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_PageCount() int { + + return (int)(C.QPlainTextDocumentLayout_virtualbase_PageCount(unsafe.Pointer(this.h))) + +} +func (this *QPlainTextDocumentLayout) OnPageCount(slot func(super func() int) int) { + C.QPlainTextDocumentLayout_override_virtual_PageCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_PageCount +func miqt_exec_callback_QPlainTextDocumentLayout_PageCount(self *C.QPlainTextDocumentLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_PageCount) + + return (C.int)(virtualReturn) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_DocumentSize() *QSizeF { + + _ret := C.QPlainTextDocumentLayout_virtualbase_DocumentSize(unsafe.Pointer(this.h)) + _goptr := newQSizeF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextDocumentLayout) OnDocumentSize(slot func(super func() *QSizeF) *QSizeF) { + C.QPlainTextDocumentLayout_override_virtual_DocumentSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_DocumentSize +func miqt_exec_callback_QPlainTextDocumentLayout_DocumentSize(self *C.QPlainTextDocumentLayout, cb C.intptr_t) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSizeF) *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_DocumentSize) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_FrameBoundingRect(param1 *QTextFrame) *QRectF { + + _ret := C.QPlainTextDocumentLayout_virtualbase_FrameBoundingRect(unsafe.Pointer(this.h), param1.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextDocumentLayout) OnFrameBoundingRect(slot func(super func(param1 *QTextFrame) *QRectF, param1 *QTextFrame) *QRectF) { + C.QPlainTextDocumentLayout_override_virtual_FrameBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect +func miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect(self *C.QPlainTextDocumentLayout, cb C.intptr_t, param1 *C.QTextFrame) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTextFrame) *QRectF, param1 *QTextFrame) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextFrame(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_FrameBoundingRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_BlockBoundingRect(block *QTextBlock) *QRectF { + + _ret := C.QPlainTextDocumentLayout_virtualbase_BlockBoundingRect(unsafe.Pointer(this.h), block.cPointer()) + _goptr := newQRectF(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPlainTextDocumentLayout) OnBlockBoundingRect(slot func(super func(block *QTextBlock) *QRectF, block *QTextBlock) *QRectF) { + C.QPlainTextDocumentLayout_override_virtual_BlockBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_BlockBoundingRect +func miqt_exec_callback_QPlainTextDocumentLayout_BlockBoundingRect(self *C.QPlainTextDocumentLayout, cb C.intptr_t, block *C.QTextBlock) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock) *QRectF, block *QTextBlock) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_BlockBoundingRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_DocumentChanged(from int, param2 int, charsAdded int) { + + C.QPlainTextDocumentLayout_virtualbase_DocumentChanged(unsafe.Pointer(this.h), (C.int)(from), (C.int)(param2), (C.int)(charsAdded)) + +} +func (this *QPlainTextDocumentLayout) OnDocumentChanged(slot func(super func(from int, param2 int, charsAdded int), from int, param2 int, charsAdded int)) { + C.QPlainTextDocumentLayout_override_virtual_DocumentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_DocumentChanged +func miqt_exec_callback_QPlainTextDocumentLayout_DocumentChanged(self *C.QPlainTextDocumentLayout, cb C.intptr_t, from C.int, param2 C.int, charsAdded C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from int, param2 int, charsAdded int), from int, param2 int, charsAdded int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(from) + + slotval2 := (int)(param2) + + slotval3 := (int)(charsAdded) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_DocumentChanged, slotval1, slotval2, slotval3) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_ResizeInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QPlainTextDocumentLayout_virtualbase_ResizeInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnResizeInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QPlainTextDocumentLayout_override_virtual_ResizeInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_ResizeInlineObject +func miqt_exec_callback_QPlainTextDocumentLayout_ResizeInlineObject(self *C.QPlainTextDocumentLayout, cb C.intptr_t, item *C.QTextInlineObject, posInDocument C.int, format *C.QTextFormat) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + item_ret := item + item_goptr := newQTextInlineObject(item_ret) + item_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *item_goptr + + slotval2 := (int)(posInDocument) + + slotval3 := UnsafeNewQTextFormat(unsafe.Pointer(format)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_ResizeInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_PositionInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QPlainTextDocumentLayout_virtualbase_PositionInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnPositionInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QPlainTextDocumentLayout_override_virtual_PositionInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_PositionInlineObject +func miqt_exec_callback_QPlainTextDocumentLayout_PositionInlineObject(self *C.QPlainTextDocumentLayout, cb C.intptr_t, item *C.QTextInlineObject, posInDocument C.int, format *C.QTextFormat) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + item_ret := item + item_goptr := newQTextInlineObject(item_ret) + item_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *item_goptr + + slotval2 := (int)(posInDocument) + + slotval3 := UnsafeNewQTextFormat(unsafe.Pointer(format)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_PositionInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QPlainTextDocumentLayout) callVirtualBase_DrawInlineObject(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QPlainTextDocumentLayout_virtualbase_DrawInlineObject(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), object.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QPlainTextDocumentLayout) OnDrawInlineObject(slot func(super func(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat), painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QPlainTextDocumentLayout_override_virtual_DrawInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPlainTextDocumentLayout_DrawInlineObject +func miqt_exec_callback_QPlainTextDocumentLayout_DrawInlineObject(self *C.QPlainTextDocumentLayout, cb C.intptr_t, painter *C.QPainter, rect *C.QRectF, object *C.QTextInlineObject, posInDocument C.int, format *C.QTextFormat) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat), painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRectF(unsafe.Pointer(rect)) + object_ret := object + object_goptr := newQTextInlineObject(object_ret) + object_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *object_goptr + + slotval4 := (int)(posInDocument) + + slotval5 := UnsafeNewQTextFormat(unsafe.Pointer(format)) + + gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_DrawInlineObject, slotval1, slotval2, slotval3, slotval4, slotval5) + } // Delete this object from C++ memory. func (this *QPlainTextDocumentLayout) Delete() { - C.QPlainTextDocumentLayout_Delete(this.h) + C.QPlainTextDocumentLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qplaintextedit.h b/qt6/gen_qplaintextedit.h index d007f246..a8b3aab8 100644 --- a/qt6/gen_qplaintextedit.h +++ b/qt6/gen_qplaintextedit.h @@ -15,14 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QAbstractTextDocumentLayout; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext) typedef QAbstractTextDocumentLayout::PaintContext QAbstractTextDocumentLayout__PaintContext; #else class QAbstractTextDocumentLayout__PaintContext; #endif +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; class QPagedPaintDevice; +class QPaintDevice; +class QPaintEvent; class QPainter; class QPlainTextDocumentLayout; class QPlainTextEdit; @@ -31,6 +48,9 @@ class QPointF; class QRect; class QRectF; class QRegularExpression; +class QResizeEvent; +class QShowEvent; +class QSize; class QSizeF; class QTextBlock; class QTextCharFormat; @@ -41,15 +61,36 @@ typedef QTextEdit::ExtraSelection QTextEdit__ExtraSelection; #else class QTextEdit__ExtraSelection; #endif +class QTextFormat; class QTextFrame; +class QTextInlineObject; +class QTimerEvent; class QUrl; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractTextDocumentLayout__PaintContext QAbstractTextDocumentLayout__PaintContext; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPlainTextDocumentLayout QPlainTextDocumentLayout; typedef struct QPlainTextEdit QPlainTextEdit; @@ -58,22 +99,29 @@ typedef struct QPointF QPointF; typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QRegularExpression QRegularExpression; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QSizeF QSizeF; typedef struct QTextBlock QTextBlock; typedef struct QTextCharFormat QTextCharFormat; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; typedef struct QTextEdit__ExtraSelection QTextEdit__ExtraSelection; +typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; +typedef struct QTextInlineObject QTextInlineObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QPlainTextEdit* QPlainTextEdit_new(QWidget* parent); -QPlainTextEdit* QPlainTextEdit_new2(); -QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text); -QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent); +void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self); void* QPlainTextEdit_Metacast(QPlainTextEdit* self, const char* param1); struct miqt_string QPlainTextEdit_Tr(const char* s); @@ -163,6 +211,33 @@ void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount); void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, intptr_t slot); void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1); void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, intptr_t slot); +bool QPlainTextEdit_Event(QPlainTextEdit* self, QEvent* e); +void QPlainTextEdit_TimerEvent(QPlainTextEdit* self, QTimerEvent* e); +void QPlainTextEdit_KeyPressEvent(QPlainTextEdit* self, QKeyEvent* e); +void QPlainTextEdit_KeyReleaseEvent(QPlainTextEdit* self, QKeyEvent* e); +void QPlainTextEdit_ResizeEvent(QPlainTextEdit* self, QResizeEvent* e); +void QPlainTextEdit_PaintEvent(QPlainTextEdit* self, QPaintEvent* e); +void QPlainTextEdit_MousePressEvent(QPlainTextEdit* self, QMouseEvent* e); +void QPlainTextEdit_MouseMoveEvent(QPlainTextEdit* self, QMouseEvent* e); +void QPlainTextEdit_MouseReleaseEvent(QPlainTextEdit* self, QMouseEvent* e); +void QPlainTextEdit_MouseDoubleClickEvent(QPlainTextEdit* self, QMouseEvent* e); +bool QPlainTextEdit_FocusNextPrevChild(QPlainTextEdit* self, bool next); +void QPlainTextEdit_ContextMenuEvent(QPlainTextEdit* self, QContextMenuEvent* e); +void QPlainTextEdit_DragEnterEvent(QPlainTextEdit* self, QDragEnterEvent* e); +void QPlainTextEdit_DragLeaveEvent(QPlainTextEdit* self, QDragLeaveEvent* e); +void QPlainTextEdit_DragMoveEvent(QPlainTextEdit* self, QDragMoveEvent* e); +void QPlainTextEdit_DropEvent(QPlainTextEdit* self, QDropEvent* e); +void QPlainTextEdit_FocusInEvent(QPlainTextEdit* self, QFocusEvent* e); +void QPlainTextEdit_FocusOutEvent(QPlainTextEdit* self, QFocusEvent* e); +void QPlainTextEdit_ShowEvent(QPlainTextEdit* self, QShowEvent* param1); +void QPlainTextEdit_ChangeEvent(QPlainTextEdit* self, QEvent* e); +void QPlainTextEdit_WheelEvent(QPlainTextEdit* self, QWheelEvent* e); +QMimeData* QPlainTextEdit_CreateMimeDataFromSelection(const QPlainTextEdit* self); +bool QPlainTextEdit_CanInsertFromMimeData(const QPlainTextEdit* self, QMimeData* source); +void QPlainTextEdit_InsertFromMimeData(QPlainTextEdit* self, QMimeData* source); +void QPlainTextEdit_InputMethodEvent(QPlainTextEdit* self, QInputMethodEvent* param1); +void QPlainTextEdit_ScrollContentsBy(QPlainTextEdit* self, int dx, int dy); +void QPlainTextEdit_DoSetTextCursor(QPlainTextEdit* self, QTextCursor* cursor); struct miqt_string QPlainTextEdit_Tr2(const char* s, const char* c); struct miqt_string QPlainTextEdit_Tr3(const char* s, const char* c, int n); bool QPlainTextEdit_Find2(QPlainTextEdit* self, struct miqt_string exp, int options); @@ -170,9 +245,79 @@ bool QPlainTextEdit_Find22(QPlainTextEdit* self, QRegularExpression* exp, int op void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, int operation, int mode); void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal); void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal); -void QPlainTextEdit_Delete(QPlainTextEdit* self); +void QPlainTextEdit_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QPlainTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QPlainTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QPlainTextEdit_virtualbase_InputMethodQuery(const void* self, int property); +void QPlainTextEdit_override_virtual_Event(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_Event(void* self, QEvent* e); +void QPlainTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QPlainTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QPlainTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QPlainTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QPlainTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QPlainTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QPlainTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QPlainTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QPlainTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QPlainTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QPlainTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QPlainTextEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e); +void QPlainTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QPlainTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QPlainTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QPlainTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e); +void QPlainTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QPlainTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot); +QMimeData* QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self); +void QPlainTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QPlainTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source); +void QPlainTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QPlainTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QPlainTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor); +void QPlainTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPlainTextEdit_virtualbase_MinimumSizeHint(const void* self); +void QPlainTextEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPlainTextEdit_virtualbase_SizeHint(const void* self); +void QPlainTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot); +void QPlainTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QPlainTextEdit_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QPlainTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QPlainTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QPlainTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QPlainTextEdit_virtualbase_ViewportSizeHint(const void* self); +void QPlainTextEdit_Delete(QPlainTextEdit* self, bool isSubclass); -QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document); +void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self); void* QPlainTextDocumentLayout_Metacast(QPlainTextDocumentLayout* self, const char* param1); struct miqt_string QPlainTextDocumentLayout_Tr(const char* s); @@ -186,9 +331,30 @@ void QPlainTextDocumentLayout_EnsureBlockLayout(const QPlainTextDocumentLayout* void QPlainTextDocumentLayout_SetCursorWidth(QPlainTextDocumentLayout* self, int width); int QPlainTextDocumentLayout_CursorWidth(const QPlainTextDocumentLayout* self); void QPlainTextDocumentLayout_RequestUpdate(QPlainTextDocumentLayout* self); +void QPlainTextDocumentLayout_DocumentChanged(QPlainTextDocumentLayout* self, int from, int param2, int charsAdded); struct miqt_string QPlainTextDocumentLayout_Tr2(const char* s, const char* c); struct miqt_string QPlainTextDocumentLayout_Tr3(const char* s, const char* c, int n); -void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self); +void QPlainTextDocumentLayout_override_virtual_Draw(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_Draw(void* self, QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2); +void QPlainTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot); +int QPlainTextDocumentLayout_virtualbase_HitTest(const void* self, QPointF* param1, int param2); +void QPlainTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot); +int QPlainTextDocumentLayout_virtualbase_PageCount(const void* self); +void QPlainTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot); +QSizeF* QPlainTextDocumentLayout_virtualbase_DocumentSize(const void* self); +void QPlainTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot); +QRectF* QPlainTextDocumentLayout_virtualbase_FrameBoundingRect(const void* self, QTextFrame* param1); +void QPlainTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot); +QRectF* QPlainTextDocumentLayout_virtualbase_BlockBoundingRect(const void* self, QTextBlock* block); +void QPlainTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_DocumentChanged(void* self, int from, int param2, int charsAdded); +void QPlainTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QPlainTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QPlainTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot); +void QPlainTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format); +void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qplugin.cpp b/qt6/gen_qplugin.cpp index 51cd0034..62f8bf9e 100644 --- a/qt6/gen_qplugin.cpp +++ b/qt6/gen_qplugin.cpp @@ -13,43 +13,67 @@ unsigned char QPluginMetaData_ArchRequirements() { return static_cast(_ret); } -void QPluginMetaData_Delete(QPluginMetaData* self) { - delete self; +void QPluginMetaData_Delete(QPluginMetaData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QJsonObject* QStaticPlugin_MetaData(const QStaticPlugin* self) { return new QJsonObject(self->metaData()); } -void QStaticPlugin_Delete(QStaticPlugin* self) { - delete self; +void QStaticPlugin_Delete(QStaticPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPluginMetaData__Header* QPluginMetaData__Header_new(QPluginMetaData__Header* param1) { - return new QPluginMetaData::Header(*param1); +void QPluginMetaData__Header_new(QPluginMetaData__Header* param1, QPluginMetaData__Header** outptr_QPluginMetaData__Header) { + QPluginMetaData::Header* ret = new QPluginMetaData::Header(*param1); + *outptr_QPluginMetaData__Header = ret; } -void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self) { - delete self; +void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPluginMetaData__MagicHeader* QPluginMetaData__MagicHeader_new() { - return new QPluginMetaData::MagicHeader(); +void QPluginMetaData__MagicHeader_new(QPluginMetaData__MagicHeader** outptr_QPluginMetaData__MagicHeader) { + QPluginMetaData::MagicHeader* ret = new QPluginMetaData::MagicHeader(); + *outptr_QPluginMetaData__MagicHeader = ret; } -void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self) { - delete self; +void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize) { - return new QPluginMetaData::ElfNoteHeader(static_cast(payloadSize)); +void QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader) { + QPluginMetaData::ElfNoteHeader* ret = new QPluginMetaData::ElfNoteHeader(static_cast(payloadSize)); + *outptr_QPluginMetaData__ElfNoteHeader = ret; } -QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1) { - return new QPluginMetaData::ElfNoteHeader(*param1); +void QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader) { + QPluginMetaData::ElfNoteHeader* ret = new QPluginMetaData::ElfNoteHeader(*param1); + *outptr_QPluginMetaData__ElfNoteHeader = ret; } -void QPluginMetaData__ElfNoteHeader_Delete(QPluginMetaData__ElfNoteHeader* self) { - delete self; +void QPluginMetaData__ElfNoteHeader_Delete(QPluginMetaData__ElfNoteHeader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qplugin.go b/qt6/gen_qplugin.go index 0096e12b..ab31270b 100644 --- a/qt6/gen_qplugin.go +++ b/qt6/gen_qplugin.go @@ -14,7 +14,8 @@ import ( ) type QPluginMetaData struct { - h *C.QPluginMetaData + h *C.QPluginMetaData + isSubclass bool } func (this *QPluginMetaData) cPointer() *C.QPluginMetaData { @@ -31,6 +32,7 @@ func (this *QPluginMetaData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPluginMetaData constructs the type using only CGO pointers. func newQPluginMetaData(h *C.QPluginMetaData) *QPluginMetaData { if h == nil { return nil @@ -38,8 +40,13 @@ func newQPluginMetaData(h *C.QPluginMetaData) *QPluginMetaData { return &QPluginMetaData{h: h} } +// UnsafeNewQPluginMetaData constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData(h unsafe.Pointer) *QPluginMetaData { - return newQPluginMetaData((*C.QPluginMetaData)(h)) + if h == nil { + return nil + } + + return &QPluginMetaData{h: (*C.QPluginMetaData)(h)} } func QPluginMetaData_ArchRequirements() byte { @@ -48,7 +55,7 @@ func QPluginMetaData_ArchRequirements() byte { // Delete this object from C++ memory. func (this *QPluginMetaData) Delete() { - C.QPluginMetaData_Delete(this.h) + C.QPluginMetaData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -61,7 +68,8 @@ func (this *QPluginMetaData) GoGC() { } type QStaticPlugin struct { - h *C.QStaticPlugin + h *C.QStaticPlugin + isSubclass bool } func (this *QStaticPlugin) cPointer() *C.QStaticPlugin { @@ -78,6 +86,7 @@ func (this *QStaticPlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStaticPlugin constructs the type using only CGO pointers. func newQStaticPlugin(h *C.QStaticPlugin) *QStaticPlugin { if h == nil { return nil @@ -85,8 +94,13 @@ func newQStaticPlugin(h *C.QStaticPlugin) *QStaticPlugin { return &QStaticPlugin{h: h} } +// UnsafeNewQStaticPlugin constructs the type using only unsafe pointers. func UnsafeNewQStaticPlugin(h unsafe.Pointer) *QStaticPlugin { - return newQStaticPlugin((*C.QStaticPlugin)(h)) + if h == nil { + return nil + } + + return &QStaticPlugin{h: (*C.QStaticPlugin)(h)} } func (this *QStaticPlugin) MetaData() *QJsonObject { @@ -98,7 +112,7 @@ func (this *QStaticPlugin) MetaData() *QJsonObject { // Delete this object from C++ memory. func (this *QStaticPlugin) Delete() { - C.QStaticPlugin_Delete(this.h) + C.QStaticPlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -111,7 +125,8 @@ func (this *QStaticPlugin) GoGC() { } type QPluginMetaData__Header struct { - h *C.QPluginMetaData__Header + h *C.QPluginMetaData__Header + isSubclass bool } func (this *QPluginMetaData__Header) cPointer() *C.QPluginMetaData__Header { @@ -128,6 +143,7 @@ func (this *QPluginMetaData__Header) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPluginMetaData__Header constructs the type using only CGO pointers. func newQPluginMetaData__Header(h *C.QPluginMetaData__Header) *QPluginMetaData__Header { if h == nil { return nil @@ -135,19 +151,28 @@ func newQPluginMetaData__Header(h *C.QPluginMetaData__Header) *QPluginMetaData__ return &QPluginMetaData__Header{h: h} } +// UnsafeNewQPluginMetaData__Header constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData__Header(h unsafe.Pointer) *QPluginMetaData__Header { - return newQPluginMetaData__Header((*C.QPluginMetaData__Header)(h)) + if h == nil { + return nil + } + + return &QPluginMetaData__Header{h: (*C.QPluginMetaData__Header)(h)} } // NewQPluginMetaData__Header constructs a new QPluginMetaData::Header object. func NewQPluginMetaData__Header(param1 *QPluginMetaData__Header) *QPluginMetaData__Header { - ret := C.QPluginMetaData__Header_new(param1.cPointer()) - return newQPluginMetaData__Header(ret) + var outptr_QPluginMetaData__Header *C.QPluginMetaData__Header = nil + + C.QPluginMetaData__Header_new(param1.cPointer(), &outptr_QPluginMetaData__Header) + ret := newQPluginMetaData__Header(outptr_QPluginMetaData__Header) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPluginMetaData__Header) Delete() { - C.QPluginMetaData__Header_Delete(this.h) + C.QPluginMetaData__Header_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -160,7 +185,8 @@ func (this *QPluginMetaData__Header) GoGC() { } type QPluginMetaData__MagicHeader struct { - h *C.QPluginMetaData__MagicHeader + h *C.QPluginMetaData__MagicHeader + isSubclass bool } func (this *QPluginMetaData__MagicHeader) cPointer() *C.QPluginMetaData__MagicHeader { @@ -177,6 +203,7 @@ func (this *QPluginMetaData__MagicHeader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPluginMetaData__MagicHeader constructs the type using only CGO pointers. func newQPluginMetaData__MagicHeader(h *C.QPluginMetaData__MagicHeader) *QPluginMetaData__MagicHeader { if h == nil { return nil @@ -184,19 +211,28 @@ func newQPluginMetaData__MagicHeader(h *C.QPluginMetaData__MagicHeader) *QPlugin return &QPluginMetaData__MagicHeader{h: h} } +// UnsafeNewQPluginMetaData__MagicHeader constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData__MagicHeader(h unsafe.Pointer) *QPluginMetaData__MagicHeader { - return newQPluginMetaData__MagicHeader((*C.QPluginMetaData__MagicHeader)(h)) + if h == nil { + return nil + } + + return &QPluginMetaData__MagicHeader{h: (*C.QPluginMetaData__MagicHeader)(h)} } // NewQPluginMetaData__MagicHeader constructs a new QPluginMetaData::MagicHeader object. func NewQPluginMetaData__MagicHeader() *QPluginMetaData__MagicHeader { - ret := C.QPluginMetaData__MagicHeader_new() - return newQPluginMetaData__MagicHeader(ret) + var outptr_QPluginMetaData__MagicHeader *C.QPluginMetaData__MagicHeader = nil + + C.QPluginMetaData__MagicHeader_new(&outptr_QPluginMetaData__MagicHeader) + ret := newQPluginMetaData__MagicHeader(outptr_QPluginMetaData__MagicHeader) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPluginMetaData__MagicHeader) Delete() { - C.QPluginMetaData__MagicHeader_Delete(this.h) + C.QPluginMetaData__MagicHeader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -209,7 +245,8 @@ func (this *QPluginMetaData__MagicHeader) GoGC() { } type QPluginMetaData__ElfNoteHeader struct { - h *C.QPluginMetaData__ElfNoteHeader + h *C.QPluginMetaData__ElfNoteHeader + isSubclass bool } func (this *QPluginMetaData__ElfNoteHeader) cPointer() *C.QPluginMetaData__ElfNoteHeader { @@ -226,6 +263,7 @@ func (this *QPluginMetaData__ElfNoteHeader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPluginMetaData__ElfNoteHeader constructs the type using only CGO pointers. func newQPluginMetaData__ElfNoteHeader(h *C.QPluginMetaData__ElfNoteHeader) *QPluginMetaData__ElfNoteHeader { if h == nil { return nil @@ -233,25 +271,38 @@ func newQPluginMetaData__ElfNoteHeader(h *C.QPluginMetaData__ElfNoteHeader) *QPl return &QPluginMetaData__ElfNoteHeader{h: h} } +// UnsafeNewQPluginMetaData__ElfNoteHeader constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData__ElfNoteHeader(h unsafe.Pointer) *QPluginMetaData__ElfNoteHeader { - return newQPluginMetaData__ElfNoteHeader((*C.QPluginMetaData__ElfNoteHeader)(h)) + if h == nil { + return nil + } + + return &QPluginMetaData__ElfNoteHeader{h: (*C.QPluginMetaData__ElfNoteHeader)(h)} } // NewQPluginMetaData__ElfNoteHeader constructs a new QPluginMetaData::ElfNoteHeader object. func NewQPluginMetaData__ElfNoteHeader(payloadSize uint) *QPluginMetaData__ElfNoteHeader { - ret := C.QPluginMetaData__ElfNoteHeader_new((C.uint)(payloadSize)) - return newQPluginMetaData__ElfNoteHeader(ret) + var outptr_QPluginMetaData__ElfNoteHeader *C.QPluginMetaData__ElfNoteHeader = nil + + C.QPluginMetaData__ElfNoteHeader_new((C.uint)(payloadSize), &outptr_QPluginMetaData__ElfNoteHeader) + ret := newQPluginMetaData__ElfNoteHeader(outptr_QPluginMetaData__ElfNoteHeader) + ret.isSubclass = true + return ret } // NewQPluginMetaData__ElfNoteHeader2 constructs a new QPluginMetaData::ElfNoteHeader object. func NewQPluginMetaData__ElfNoteHeader2(param1 *QPluginMetaData__ElfNoteHeader) *QPluginMetaData__ElfNoteHeader { - ret := C.QPluginMetaData__ElfNoteHeader_new2(param1.cPointer()) - return newQPluginMetaData__ElfNoteHeader(ret) + var outptr_QPluginMetaData__ElfNoteHeader *C.QPluginMetaData__ElfNoteHeader = nil + + C.QPluginMetaData__ElfNoteHeader_new2(param1.cPointer(), &outptr_QPluginMetaData__ElfNoteHeader) + ret := newQPluginMetaData__ElfNoteHeader(outptr_QPluginMetaData__ElfNoteHeader) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPluginMetaData__ElfNoteHeader) Delete() { - C.QPluginMetaData__ElfNoteHeader_Delete(this.h) + C.QPluginMetaData__ElfNoteHeader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qplugin.h b/qt6/gen_qplugin.h index 7691f443..fa6f1eb7 100644 --- a/qt6/gen_qplugin.h +++ b/qt6/gen_qplugin.h @@ -43,20 +43,20 @@ typedef struct QStaticPlugin QStaticPlugin; #endif unsigned char QPluginMetaData_ArchRequirements(); -void QPluginMetaData_Delete(QPluginMetaData* self); +void QPluginMetaData_Delete(QPluginMetaData* self, bool isSubclass); QJsonObject* QStaticPlugin_MetaData(const QStaticPlugin* self); -void QStaticPlugin_Delete(QStaticPlugin* self); +void QStaticPlugin_Delete(QStaticPlugin* self, bool isSubclass); -QPluginMetaData__Header* QPluginMetaData__Header_new(QPluginMetaData__Header* param1); -void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self); +void QPluginMetaData__Header_new(QPluginMetaData__Header* param1, QPluginMetaData__Header** outptr_QPluginMetaData__Header); +void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self, bool isSubclass); -QPluginMetaData__MagicHeader* QPluginMetaData__MagicHeader_new(); -void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self); +void QPluginMetaData__MagicHeader_new(QPluginMetaData__MagicHeader** outptr_QPluginMetaData__MagicHeader); +void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self, bool isSubclass); -QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize); -QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1); -void QPluginMetaData__ElfNoteHeader_Delete(QPluginMetaData__ElfNoteHeader* self); +void QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader); +void QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader); +void QPluginMetaData__ElfNoteHeader_Delete(QPluginMetaData__ElfNoteHeader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpluginloader.cpp b/qt6/gen_qpluginloader.cpp index cbf52825..024cafaf 100644 --- a/qt6/gen_qpluginloader.cpp +++ b/qt6/gen_qpluginloader.cpp @@ -1,5 +1,8 @@ +#include +#include #include #include +#include #include #include #include @@ -7,26 +10,218 @@ #include #include #include +#include #include #include "gen_qpluginloader.h" #include "_cgo_export.h" -QPluginLoader* QPluginLoader_new() { - return new QPluginLoader(); +class MiqtVirtualQPluginLoader : public virtual QPluginLoader { +public: + + MiqtVirtualQPluginLoader(): QPluginLoader() {}; + MiqtVirtualQPluginLoader(const QString& fileName): QPluginLoader(fileName) {}; + MiqtVirtualQPluginLoader(QObject* parent): QPluginLoader(parent) {}; + MiqtVirtualQPluginLoader(const QString& fileName, QObject* parent): QPluginLoader(fileName, parent) {}; + + virtual ~MiqtVirtualQPluginLoader() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPluginLoader::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPluginLoader_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPluginLoader::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QPluginLoader::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPluginLoader_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QPluginLoader::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QPluginLoader::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPluginLoader_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QPluginLoader::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QPluginLoader::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPluginLoader_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QPluginLoader::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QPluginLoader::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPluginLoader_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QPluginLoader::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QPluginLoader::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPluginLoader_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QPluginLoader::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QPluginLoader::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPluginLoader_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QPluginLoader::disconnectNotify(*signal); + + } + +}; + +void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } -QPluginLoader* QPluginLoader_new2(struct miqt_string fileName) { +void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPluginLoader(fileName_QString); + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } -QPluginLoader* QPluginLoader_new3(QObject* parent) { - return new QPluginLoader(parent); +void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(parent); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } -QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent) { +void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QPluginLoader(fileName_QString, parent); + MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString, parent); + *outptr_QPluginLoader = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self) { @@ -152,7 +347,67 @@ struct miqt_string QPluginLoader_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPluginLoader_Delete(QPluginLoader* self) { - delete self; +void QPluginLoader_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__Event = slot; +} + +bool QPluginLoader_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_Event(event); +} + +void QPluginLoader_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__EventFilter = slot; +} + +bool QPluginLoader_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QPluginLoader_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__TimerEvent = slot; +} + +void QPluginLoader_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_TimerEvent(event); +} + +void QPluginLoader_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__ChildEvent = slot; +} + +void QPluginLoader_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_ChildEvent(event); +} + +void QPluginLoader_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__CustomEvent = slot; +} + +void QPluginLoader_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_CustomEvent(event); +} + +void QPluginLoader_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__ConnectNotify = slot; +} + +void QPluginLoader_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QPluginLoader_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPluginLoader*)(self) )->handle__DisconnectNotify = slot; +} + +void QPluginLoader_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPluginLoader*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QPluginLoader_Delete(QPluginLoader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpluginloader.go b/qt6/gen_qpluginloader.go index e4cdb526..9656a2d1 100644 --- a/qt6/gen_qpluginloader.go +++ b/qt6/gen_qpluginloader.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPluginLoader struct { - h *C.QPluginLoader + h *C.QPluginLoader + isSubclass bool *QObject } @@ -32,21 +34,34 @@ func (this *QPluginLoader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPluginLoader(h *C.QPluginLoader) *QPluginLoader { +// newQPluginLoader constructs the type using only CGO pointers. +func newQPluginLoader(h *C.QPluginLoader, h_QObject *C.QObject) *QPluginLoader { if h == nil { return nil } - return &QPluginLoader{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QPluginLoader{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQPluginLoader(h unsafe.Pointer) *QPluginLoader { - return newQPluginLoader((*C.QPluginLoader)(h)) +// UnsafeNewQPluginLoader constructs the type using only unsafe pointers. +func UnsafeNewQPluginLoader(h unsafe.Pointer, h_QObject unsafe.Pointer) *QPluginLoader { + if h == nil { + return nil + } + + return &QPluginLoader{h: (*C.QPluginLoader)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQPluginLoader constructs a new QPluginLoader object. func NewQPluginLoader() *QPluginLoader { - ret := C.QPluginLoader_new() - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new(&outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPluginLoader2 constructs a new QPluginLoader object. @@ -55,14 +70,24 @@ func NewQPluginLoader2(fileName string) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QPluginLoader_new2(fileName_ms) - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new2(fileName_ms, &outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPluginLoader3 constructs a new QPluginLoader object. func NewQPluginLoader3(parent *QObject) *QPluginLoader { - ret := C.QPluginLoader_new3(parent.cPointer()) - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new3(parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPluginLoader4 constructs a new QPluginLoader object. @@ -71,8 +96,13 @@ func NewQPluginLoader4(fileName string, parent *QObject) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QPluginLoader_new4(fileName_ms, parent.cPointer()) - return newQPluginLoader(ret) + var outptr_QPluginLoader *C.QPluginLoader = nil + var outptr_QObject *C.QObject = nil + + C.QPluginLoader_new4(fileName_ms, parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) + ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPluginLoader) MetaObject() *QMetaObject { @@ -192,9 +222,175 @@ func QPluginLoader_Tr3(s string, c string, n int) string { return _ret } +func (this *QPluginLoader) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPluginLoader_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPluginLoader) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPluginLoader_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_Event +func miqt_exec_callback_QPluginLoader_Event(self *C.QPluginLoader, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPluginLoader{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPluginLoader) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QPluginLoader_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QPluginLoader) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QPluginLoader_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_EventFilter +func miqt_exec_callback_QPluginLoader_EventFilter(self *C.QPluginLoader, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPluginLoader{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPluginLoader) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QPluginLoader_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPluginLoader) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QPluginLoader_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_TimerEvent +func miqt_exec_callback_QPluginLoader_TimerEvent(self *C.QPluginLoader, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QPluginLoader_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPluginLoader) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QPluginLoader_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_ChildEvent +func miqt_exec_callback_QPluginLoader_ChildEvent(self *C.QPluginLoader, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_CustomEvent(event *QEvent) { + + C.QPluginLoader_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPluginLoader) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QPluginLoader_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_CustomEvent +func miqt_exec_callback_QPluginLoader_CustomEvent(self *C.QPluginLoader, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QPluginLoader_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPluginLoader) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPluginLoader_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_ConnectNotify +func miqt_exec_callback_QPluginLoader_ConnectNotify(self *C.QPluginLoader, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPluginLoader) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QPluginLoader_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPluginLoader) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPluginLoader_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPluginLoader_DisconnectNotify +func miqt_exec_callback_QPluginLoader_DisconnectNotify(self *C.QPluginLoader, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPluginLoader{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QPluginLoader) Delete() { - C.QPluginLoader_Delete(this.h) + C.QPluginLoader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpluginloader.h b/qt6/gen_qpluginloader.h index 4da611e6..a22a13b3 100644 --- a/qt6/gen_qpluginloader.h +++ b/qt6/gen_qpluginloader.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QJsonObject; +class QMetaMethod; class QMetaObject; class QObject; class QPluginLoader; class QStaticPlugin; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QJsonObject QJsonObject; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPluginLoader QPluginLoader; typedef struct QStaticPlugin QStaticPlugin; +typedef struct QTimerEvent QTimerEvent; #endif -QPluginLoader* QPluginLoader_new(); -QPluginLoader* QPluginLoader_new2(struct miqt_string fileName); -QPluginLoader* QPluginLoader_new3(QObject* parent); -QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent); +void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self); void* QPluginLoader_Metacast(QPluginLoader* self, const char* param1); struct miqt_string QPluginLoader_Tr(const char* s); @@ -49,7 +57,21 @@ void QPluginLoader_SetLoadHints(QPluginLoader* self, int loadHints); int QPluginLoader_LoadHints(const QPluginLoader* self); struct miqt_string QPluginLoader_Tr2(const char* s, const char* c); struct miqt_string QPluginLoader_Tr3(const char* s, const char* c, int n); -void QPluginLoader_Delete(QPluginLoader* self); +void QPluginLoader_override_virtual_Event(void* self, intptr_t slot); +bool QPluginLoader_virtualbase_Event(void* self, QEvent* event); +void QPluginLoader_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPluginLoader_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QPluginLoader_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPluginLoader_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QPluginLoader_override_virtual_ChildEvent(void* self, intptr_t slot); +void QPluginLoader_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QPluginLoader_override_virtual_CustomEvent(void* self, intptr_t slot); +void QPluginLoader_virtualbase_CustomEvent(void* self, QEvent* event); +void QPluginLoader_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QPluginLoader_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QPluginLoader_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QPluginLoader_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QPluginLoader_Delete(QPluginLoader* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpoint.cpp b/qt6/gen_qpoint.cpp index c2c4441f..60a83951 100644 --- a/qt6/gen_qpoint.cpp +++ b/qt6/gen_qpoint.cpp @@ -4,16 +4,19 @@ #include "gen_qpoint.h" #include "_cgo_export.h" -QPoint* QPoint_new() { - return new QPoint(); +void QPoint_new(QPoint** outptr_QPoint) { + QPoint* ret = new QPoint(); + *outptr_QPoint = ret; } -QPoint* QPoint_new2(int xpos, int ypos) { - return new QPoint(static_cast(xpos), static_cast(ypos)); +void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint) { + QPoint* ret = new QPoint(static_cast(xpos), static_cast(ypos)); + *outptr_QPoint = ret; } -QPoint* QPoint_new3(QPoint* param1) { - return new QPoint(*param1); +void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint) { + QPoint* ret = new QPoint(*param1); + *outptr_QPoint = ret; } bool QPoint_IsNull(const QPoint* self) { @@ -88,24 +91,32 @@ QPointF* QPoint_ToPointF(const QPoint* self) { return new QPointF(self->toPointF()); } -void QPoint_Delete(QPoint* self) { - delete self; +void QPoint_Delete(QPoint* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPointF* QPointF_new() { - return new QPointF(); +void QPointF_new(QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(); + *outptr_QPointF = ret; } -QPointF* QPointF_new2(QPoint* p) { - return new QPointF(*p); +void QPointF_new2(QPoint* p, QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(*p); + *outptr_QPointF = ret; } -QPointF* QPointF_new3(double xpos, double ypos) { - return new QPointF(static_cast(xpos), static_cast(ypos)); +void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(static_cast(xpos), static_cast(ypos)); + *outptr_QPointF = ret; } -QPointF* QPointF_new4(QPointF* param1) { - return new QPointF(*param1); +void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF) { + QPointF* ret = new QPointF(*param1); + *outptr_QPointF = ret; } double QPointF_ManhattanLength(const QPointF* self) { @@ -172,7 +183,11 @@ QPoint* QPointF_ToPoint(const QPointF* self) { return new QPoint(self->toPoint()); } -void QPointF_Delete(QPointF* self) { - delete self; +void QPointF_Delete(QPointF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpoint.go b/qt6/gen_qpoint.go index 86c09923..00561d75 100644 --- a/qt6/gen_qpoint.go +++ b/qt6/gen_qpoint.go @@ -14,7 +14,8 @@ import ( ) type QPoint struct { - h *C.QPoint + h *C.QPoint + isSubclass bool } func (this *QPoint) cPointer() *C.QPoint { @@ -31,6 +32,7 @@ func (this *QPoint) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPoint constructs the type using only CGO pointers. func newQPoint(h *C.QPoint) *QPoint { if h == nil { return nil @@ -38,26 +40,43 @@ func newQPoint(h *C.QPoint) *QPoint { return &QPoint{h: h} } +// UnsafeNewQPoint constructs the type using only unsafe pointers. func UnsafeNewQPoint(h unsafe.Pointer) *QPoint { - return newQPoint((*C.QPoint)(h)) + if h == nil { + return nil + } + + return &QPoint{h: (*C.QPoint)(h)} } // NewQPoint constructs a new QPoint object. func NewQPoint() *QPoint { - ret := C.QPoint_new() - return newQPoint(ret) + var outptr_QPoint *C.QPoint = nil + + C.QPoint_new(&outptr_QPoint) + ret := newQPoint(outptr_QPoint) + ret.isSubclass = true + return ret } // NewQPoint2 constructs a new QPoint object. func NewQPoint2(xpos int, ypos int) *QPoint { - ret := C.QPoint_new2((C.int)(xpos), (C.int)(ypos)) - return newQPoint(ret) + var outptr_QPoint *C.QPoint = nil + + C.QPoint_new2((C.int)(xpos), (C.int)(ypos), &outptr_QPoint) + ret := newQPoint(outptr_QPoint) + ret.isSubclass = true + return ret } // NewQPoint3 constructs a new QPoint object. func NewQPoint3(param1 *QPoint) *QPoint { - ret := C.QPoint_new3(param1.cPointer()) - return newQPoint(ret) + var outptr_QPoint *C.QPoint = nil + + C.QPoint_new3(param1.cPointer(), &outptr_QPoint) + ret := newQPoint(outptr_QPoint) + ret.isSubclass = true + return ret } func (this *QPoint) IsNull() bool { @@ -128,7 +147,7 @@ func (this *QPoint) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QPoint) Delete() { - C.QPoint_Delete(this.h) + C.QPoint_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -141,7 +160,8 @@ func (this *QPoint) GoGC() { } type QPointF struct { - h *C.QPointF + h *C.QPointF + isSubclass bool } func (this *QPointF) cPointer() *C.QPointF { @@ -158,6 +178,7 @@ func (this *QPointF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPointF constructs the type using only CGO pointers. func newQPointF(h *C.QPointF) *QPointF { if h == nil { return nil @@ -165,32 +186,53 @@ func newQPointF(h *C.QPointF) *QPointF { return &QPointF{h: h} } +// UnsafeNewQPointF constructs the type using only unsafe pointers. func UnsafeNewQPointF(h unsafe.Pointer) *QPointF { - return newQPointF((*C.QPointF)(h)) + if h == nil { + return nil + } + + return &QPointF{h: (*C.QPointF)(h)} } // NewQPointF constructs a new QPointF object. func NewQPointF() *QPointF { - ret := C.QPointF_new() - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new(&outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } // NewQPointF2 constructs a new QPointF object. func NewQPointF2(p *QPoint) *QPointF { - ret := C.QPointF_new2(p.cPointer()) - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new2(p.cPointer(), &outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } // NewQPointF3 constructs a new QPointF object. func NewQPointF3(xpos float64, ypos float64) *QPointF { - ret := C.QPointF_new3((C.double)(xpos), (C.double)(ypos)) - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new3((C.double)(xpos), (C.double)(ypos), &outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } // NewQPointF4 constructs a new QPointF object. func NewQPointF4(param1 *QPointF) *QPointF { - ret := C.QPointF_new4(param1.cPointer()) - return newQPointF(ret) + var outptr_QPointF *C.QPointF = nil + + C.QPointF_new4(param1.cPointer(), &outptr_QPointF) + ret := newQPointF(outptr_QPointF) + ret.isSubclass = true + return ret } func (this *QPointF) ManhattanLength() float64 { @@ -253,7 +295,7 @@ func (this *QPointF) ToPoint() *QPoint { // Delete this object from C++ memory. func (this *QPointF) Delete() { - C.QPointF_Delete(this.h) + C.QPointF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpoint.h b/qt6/gen_qpoint.h index 63544d79..4d9c1e99 100644 --- a/qt6/gen_qpoint.h +++ b/qt6/gen_qpoint.h @@ -22,9 +22,9 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -QPoint* QPoint_new(); -QPoint* QPoint_new2(int xpos, int ypos); -QPoint* QPoint_new3(QPoint* param1); +void QPoint_new(QPoint** outptr_QPoint); +void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint); +void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint); bool QPoint_IsNull(const QPoint* self); int QPoint_X(const QPoint* self); int QPoint_Y(const QPoint* self); @@ -40,12 +40,12 @@ QPoint* QPoint_OperatorMultiplyAssign2(QPoint* self, int factor); QPoint* QPoint_OperatorDivideAssign(QPoint* self, double divisor); int QPoint_DotProduct(QPoint* p1, QPoint* p2); QPointF* QPoint_ToPointF(const QPoint* self); -void QPoint_Delete(QPoint* self); +void QPoint_Delete(QPoint* self, bool isSubclass); -QPointF* QPointF_new(); -QPointF* QPointF_new2(QPoint* p); -QPointF* QPointF_new3(double xpos, double ypos); -QPointF* QPointF_new4(QPointF* param1); +void QPointF_new(QPointF** outptr_QPointF); +void QPointF_new2(QPoint* p, QPointF** outptr_QPointF); +void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF); +void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF); double QPointF_ManhattanLength(const QPointF* self); bool QPointF_IsNull(const QPointF* self); double QPointF_X(const QPointF* self); @@ -59,7 +59,7 @@ QPointF* QPointF_OperatorMultiplyAssign(QPointF* self, double c); QPointF* QPointF_OperatorDivideAssign(QPointF* self, double c); double QPointF_DotProduct(QPointF* p1, QPointF* p2); QPoint* QPointF_ToPoint(const QPointF* self); -void QPointF_Delete(QPointF* self); +void QPointF_Delete(QPointF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpointingdevice.cpp b/qt6/gen_qpointingdevice.cpp index 4147a53f..f87ef909 100644 --- a/qt6/gen_qpointingdevice.cpp +++ b/qt6/gen_qpointingdevice.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -11,12 +12,14 @@ #include "gen_qpointingdevice.h" #include "_cgo_export.h" -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new() { - return new QPointingDeviceUniqueId(); +void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { + QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(); + *outptr_QPointingDeviceUniqueId = ret; } -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1) { - return new QPointingDeviceUniqueId(*param1); +void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { + QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(*param1); + *outptr_QPointingDeviceUniqueId = ret; } QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id) { @@ -32,39 +35,61 @@ long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self) return static_cast(_ret); } -void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self) { - delete self; +void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPointingDevice* QPointingDevice_new() { - return new QPointingDevice(); +void QPointingDevice_new(QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { + QPointingDevice* ret = new QPointingDevice(); + *outptr_QPointingDevice = ret; + *outptr_QInputDevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPointingDevice* QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount) { +void QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount)); + QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount)); + *outptr_QPointingDevice = ret; + *outptr_QInputDevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPointingDevice* QPointingDevice_new3(QObject* parent) { - return new QPointingDevice(parent); +void QPointingDevice_new3(QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { + QPointingDevice* ret = new QPointingDevice(parent); + *outptr_QPointingDevice = ret; + *outptr_QInputDevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPointingDevice* QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName) { +void QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString); + QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString); + *outptr_QPointingDevice = ret; + *outptr_QInputDevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPointingDevice* QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId) { +void QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId); + QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId); + *outptr_QPointingDevice = ret; + *outptr_QInputDevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPointingDevice* QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent) { +void QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId, parent); + QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId, parent); + *outptr_QPointingDevice = ret; + *outptr_QInputDevice = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPointingDevice_MetaObject(const QPointingDevice* self) { @@ -167,7 +192,11 @@ QPointingDevice* QPointingDevice_PrimaryPointingDevice1(struct miqt_string seatN return (QPointingDevice*) QPointingDevice::primaryPointingDevice(seatName_QString); } -void QPointingDevice_Delete(QPointingDevice* self) { - delete self; +void QPointingDevice_Delete(QPointingDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpointingdevice.go b/qt6/gen_qpointingdevice.go index a9bedf68..71b335d0 100644 --- a/qt6/gen_qpointingdevice.go +++ b/qt6/gen_qpointingdevice.go @@ -39,7 +39,8 @@ const ( ) type QPointingDeviceUniqueId struct { - h *C.QPointingDeviceUniqueId + h *C.QPointingDeviceUniqueId + isSubclass bool } func (this *QPointingDeviceUniqueId) cPointer() *C.QPointingDeviceUniqueId { @@ -56,6 +57,7 @@ func (this *QPointingDeviceUniqueId) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPointingDeviceUniqueId constructs the type using only CGO pointers. func newQPointingDeviceUniqueId(h *C.QPointingDeviceUniqueId) *QPointingDeviceUniqueId { if h == nil { return nil @@ -63,20 +65,33 @@ func newQPointingDeviceUniqueId(h *C.QPointingDeviceUniqueId) *QPointingDeviceUn return &QPointingDeviceUniqueId{h: h} } +// UnsafeNewQPointingDeviceUniqueId constructs the type using only unsafe pointers. func UnsafeNewQPointingDeviceUniqueId(h unsafe.Pointer) *QPointingDeviceUniqueId { - return newQPointingDeviceUniqueId((*C.QPointingDeviceUniqueId)(h)) + if h == nil { + return nil + } + + return &QPointingDeviceUniqueId{h: (*C.QPointingDeviceUniqueId)(h)} } // NewQPointingDeviceUniqueId constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId() *QPointingDeviceUniqueId { - ret := C.QPointingDeviceUniqueId_new() - return newQPointingDeviceUniqueId(ret) + var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil + + C.QPointingDeviceUniqueId_new(&outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret.isSubclass = true + return ret } // NewQPointingDeviceUniqueId2 constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId2(param1 *QPointingDeviceUniqueId) *QPointingDeviceUniqueId { - ret := C.QPointingDeviceUniqueId_new2(param1.cPointer()) - return newQPointingDeviceUniqueId(ret) + var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil + + C.QPointingDeviceUniqueId_new2(param1.cPointer(), &outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret.isSubclass = true + return ret } func QPointingDeviceUniqueId_FromNumericId(id int64) *QPointingDeviceUniqueId { @@ -96,7 +111,7 @@ func (this *QPointingDeviceUniqueId) NumericId() int64 { // Delete this object from C++ memory. func (this *QPointingDeviceUniqueId) Delete() { - C.QPointingDeviceUniqueId_Delete(this.h) + C.QPointingDeviceUniqueId_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -109,7 +124,8 @@ func (this *QPointingDeviceUniqueId) GoGC() { } type QPointingDevice struct { - h *C.QPointingDevice + h *C.QPointingDevice + isSubclass bool *QInputDevice } @@ -127,21 +143,35 @@ func (this *QPointingDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPointingDevice(h *C.QPointingDevice) *QPointingDevice { +// newQPointingDevice constructs the type using only CGO pointers. +func newQPointingDevice(h *C.QPointingDevice, h_QInputDevice *C.QInputDevice, h_QObject *C.QObject) *QPointingDevice { if h == nil { return nil } - return &QPointingDevice{h: h, QInputDevice: UnsafeNewQInputDevice(unsafe.Pointer(h))} + return &QPointingDevice{h: h, + QInputDevice: newQInputDevice(h_QInputDevice, h_QObject)} } -func UnsafeNewQPointingDevice(h unsafe.Pointer) *QPointingDevice { - return newQPointingDevice((*C.QPointingDevice)(h)) +// UnsafeNewQPointingDevice constructs the type using only unsafe pointers. +func UnsafeNewQPointingDevice(h unsafe.Pointer, h_QInputDevice unsafe.Pointer, h_QObject unsafe.Pointer) *QPointingDevice { + if h == nil { + return nil + } + + return &QPointingDevice{h: (*C.QPointingDevice)(h), + QInputDevice: UnsafeNewQInputDevice(h_QInputDevice, h_QObject)} } // NewQPointingDevice constructs a new QPointingDevice object. func NewQPointingDevice() *QPointingDevice { - ret := C.QPointingDevice_new() - return newQPointingDevice(ret) + var outptr_QPointingDevice *C.QPointingDevice = nil + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QPointingDevice_new(&outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) + ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPointingDevice2 constructs a new QPointingDevice object. @@ -150,14 +180,26 @@ func NewQPointingDevice2(name string, systemId int64, devType QInputDevice__Devi name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QPointingDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount)) - return newQPointingDevice(ret) + var outptr_QPointingDevice *C.QPointingDevice = nil + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QPointingDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) + ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPointingDevice3 constructs a new QPointingDevice object. func NewQPointingDevice3(parent *QObject) *QPointingDevice { - ret := C.QPointingDevice_new3(parent.cPointer()) - return newQPointingDevice(ret) + var outptr_QPointingDevice *C.QPointingDevice = nil + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QPointingDevice_new3(parent.cPointer(), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) + ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPointingDevice4 constructs a new QPointingDevice object. @@ -170,8 +212,14 @@ func NewQPointingDevice4(name string, systemId int64, devType QInputDevice__Devi seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - ret := C.QPointingDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms) - return newQPointingDevice(ret) + var outptr_QPointingDevice *C.QPointingDevice = nil + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QPointingDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) + ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPointingDevice5 constructs a new QPointingDevice object. @@ -184,8 +232,14 @@ func NewQPointingDevice5(name string, systemId int64, devType QInputDevice__Devi seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - ret := C.QPointingDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer()) - return newQPointingDevice(ret) + var outptr_QPointingDevice *C.QPointingDevice = nil + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QPointingDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer(), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) + ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPointingDevice6 constructs a new QPointingDevice object. @@ -198,8 +252,14 @@ func NewQPointingDevice6(name string, systemId int64, devType QInputDevice__Devi seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - ret := C.QPointingDevice_new6(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer(), parent.cPointer()) - return newQPointingDevice(ret) + var outptr_QPointingDevice *C.QPointingDevice = nil + var outptr_QInputDevice *C.QInputDevice = nil + var outptr_QObject *C.QObject = nil + + C.QPointingDevice_new6(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer(), parent.cPointer(), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) + ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPointingDevice) MetaObject() *QMetaObject { @@ -253,7 +313,7 @@ func (this *QPointingDevice) UniqueId() *QPointingDeviceUniqueId { } func QPointingDevice_PrimaryPointingDevice() *QPointingDevice { - return UnsafeNewQPointingDevice(unsafe.Pointer(C.QPointingDevice_PrimaryPointingDevice())) + return UnsafeNewQPointingDevice(unsafe.Pointer(C.QPointingDevice_PrimaryPointingDevice()), nil, nil) } func (this *QPointingDevice) OperatorEqual(other *QPointingDevice) bool { @@ -278,7 +338,7 @@ func miqt_exec_callback_QPointingDevice_GrabChanged(cb C.intptr_t, grabber *C.QO slotval1 := UnsafeNewQObject(unsafe.Pointer(grabber)) slotval2 := (QPointingDevice__GrabTransition)(transition) - slotval3 := UnsafeNewQPointerEvent(unsafe.Pointer(event)) + slotval3 := UnsafeNewQPointerEvent(unsafe.Pointer(event), nil, nil) slotval4 := UnsafeNewQEventPoint(unsafe.Pointer(point)) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -311,12 +371,12 @@ func QPointingDevice_PrimaryPointingDevice1(seatName string) *QPointingDevice { seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - return UnsafeNewQPointingDevice(unsafe.Pointer(C.QPointingDevice_PrimaryPointingDevice1(seatName_ms))) + return UnsafeNewQPointingDevice(unsafe.Pointer(C.QPointingDevice_PrimaryPointingDevice1(seatName_ms)), nil, nil) } // Delete this object from C++ memory. func (this *QPointingDevice) Delete() { - C.QPointingDevice_Delete(this.h) + C.QPointingDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpointingdevice.h b/qt6/gen_qpointingdevice.h index a80a9f24..8c412f59 100644 --- a/qt6/gen_qpointingdevice.h +++ b/qt6/gen_qpointingdevice.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QEventPoint; +class QInputDevice; class QMetaObject; class QObject; class QPointerEvent; @@ -23,6 +24,7 @@ class QPointingDevice; class QPointingDeviceUniqueId; #else typedef struct QEventPoint QEventPoint; +typedef struct QInputDevice QInputDevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPointerEvent QPointerEvent; @@ -30,19 +32,19 @@ typedef struct QPointingDevice QPointingDevice; typedef struct QPointingDeviceUniqueId QPointingDeviceUniqueId; #endif -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new(); -QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1); +void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); +void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id); bool QPointingDeviceUniqueId_IsValid(const QPointingDeviceUniqueId* self); long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self); -void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self); +void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubclass); -QPointingDevice* QPointingDevice_new(); -QPointingDevice* QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount); -QPointingDevice* QPointingDevice_new3(QObject* parent); -QPointingDevice* QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName); -QPointingDevice* QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId); -QPointingDevice* QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent); +void QPointingDevice_new(QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QPointingDevice_new3(QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +void QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); QMetaObject* QPointingDevice_MetaObject(const QPointingDevice* self); void* QPointingDevice_Metacast(QPointingDevice* self, const char* param1); struct miqt_string QPointingDevice_Tr(const char* s); @@ -60,7 +62,7 @@ void QPointingDevice_connect_GrabChanged(QPointingDevice* self, intptr_t slot); struct miqt_string QPointingDevice_Tr2(const char* s, const char* c); struct miqt_string QPointingDevice_Tr3(const char* s, const char* c, int n); QPointingDevice* QPointingDevice_PrimaryPointingDevice1(struct miqt_string seatName); -void QPointingDevice_Delete(QPointingDevice* self); +void QPointingDevice_Delete(QPointingDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qprocess.cpp b/qt6/gen_qprocess.cpp index 12bf38e9..012e0dce 100644 --- a/qt6/gen_qprocess.cpp +++ b/qt6/gen_qprocess.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -11,16 +13,19 @@ #include "gen_qprocess.h" #include "_cgo_export.h" -QProcessEnvironment* QProcessEnvironment_new() { - return new QProcessEnvironment(); +void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment) { + QProcessEnvironment* ret = new QProcessEnvironment(); + *outptr_QProcessEnvironment = ret; } -QProcessEnvironment* QProcessEnvironment_new2(int param1) { - return new QProcessEnvironment(static_cast(param1)); +void QProcessEnvironment_new2(int param1, QProcessEnvironment** outptr_QProcessEnvironment) { + QProcessEnvironment* ret = new QProcessEnvironment(static_cast(param1)); + *outptr_QProcessEnvironment = ret; } -QProcessEnvironment* QProcessEnvironment_new3(QProcessEnvironment* other) { - return new QProcessEnvironment(*other); +void QProcessEnvironment_new3(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment) { + QProcessEnvironment* ret = new QProcessEnvironment(*other); + *outptr_QProcessEnvironment = ret; } void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other) { @@ -140,16 +145,438 @@ struct miqt_string QProcessEnvironment_Value2(const QProcessEnvironment* self, s return _ms; } -void QProcessEnvironment_Delete(QProcessEnvironment* self) { - delete self; +void QProcessEnvironment_Delete(QProcessEnvironment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QProcess* QProcess_new() { - return new QProcess(); +class MiqtVirtualQProcess : public virtual QProcess { +public: + + MiqtVirtualQProcess(): QProcess() {}; + MiqtVirtualQProcess(QObject* parent): QProcess(parent) {}; + + virtual ~MiqtVirtualQProcess() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode mode) override { + if (handle__Open == 0) { + return QProcess::open(mode); + } + + QIODeviceBase::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QProcess_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QProcess::open(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QProcess::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QProcess_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QProcess::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QProcess::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QProcess_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QProcess::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QProcess::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QProcess::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QProcess::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QProcess::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QProcess::close(); + return; + } + + + miqt_exec_callback_QProcess_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QProcess::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QProcess::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QProcess::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QProcess::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QProcess::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QProcess::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QProcess::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QProcess::size(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QProcess::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QProcess::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QProcess_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QProcess::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QProcess::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QProcess::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QProcess::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QProcess::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QProcess::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QProcess_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QProcess::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QProcess::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QProcess_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QProcess::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QProcess::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QProcess::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QProcess::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QProcess_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QProcess::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + +}; + +void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(); + *outptr_QProcess = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QProcess* QProcess_new2(QObject* parent) { - return new QProcess(parent); +void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(parent); + *outptr_QProcess = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QProcess_MetaObject(const QProcess* self) { @@ -189,8 +616,8 @@ bool QProcess_StartDetached(QProcess* self) { return self->startDetached(); } -bool QProcess_Open(QProcess* self) { - return self->open(); +bool QProcess_Open(QProcess* self, int mode) { + return self->open(static_cast(mode)); } struct miqt_string QProcess_Program(const QProcess* self) { @@ -368,12 +795,12 @@ bool QProcess_WaitForStarted(QProcess* self) { return self->waitForStarted(); } -bool QProcess_WaitForReadyRead(QProcess* self) { - return self->waitForReadyRead(); +bool QProcess_WaitForReadyRead(QProcess* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } -bool QProcess_WaitForBytesWritten(QProcess* self) { - return self->waitForBytesWritten(); +bool QProcess_WaitForBytesWritten(QProcess* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } bool QProcess_WaitForFinished(QProcess* self) { @@ -474,7 +901,7 @@ void QProcess_Finished(QProcess* self, int exitCode) { } void QProcess_connect_Finished(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode) { int sigval1 = exitCode; miqt_exec_callback_QProcess_Finished(slot, sigval1); }); @@ -485,7 +912,7 @@ void QProcess_ErrorOccurred(QProcess* self, int error) { } void QProcess_connect_ErrorOccurred(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::errorOccurred), self, [=](QProcess::ProcessError error) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::errorOccurred), self, [=](QProcess::ProcessError error) { QProcess::ProcessError error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QProcess_ErrorOccurred(slot, sigval1); @@ -551,10 +978,6 @@ bool QProcess_StartDetached1(QProcess* self, long long* pid) { return self->startDetached(static_cast(pid)); } -bool QProcess_Open1(QProcess* self, int mode) { - return self->open(static_cast(mode)); -} - void QProcess_SetStandardOutputFile2(QProcess* self, struct miqt_string fileName, int mode) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); self->setStandardOutputFile(fileName_QString, static_cast(mode)); @@ -569,14 +992,6 @@ bool QProcess_WaitForStarted1(QProcess* self, int msecs) { return self->waitForStarted(static_cast(msecs)); } -bool QProcess_WaitForReadyRead1(QProcess* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); -} - -bool QProcess_WaitForBytesWritten1(QProcess* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); -} - bool QProcess_WaitForFinished1(QProcess* self, int msecs) { return self->waitForFinished(static_cast(msecs)); } @@ -636,7 +1051,7 @@ void QProcess_Finished2(QProcess* self, int exitCode, int exitStatus) { } void QProcess_connect_Finished2(QProcess* self, intptr_t slot) { - QProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode, QProcess::ExitStatus exitStatus) { + MiqtVirtualQProcess::connect(self, static_cast(&QProcess::finished), self, [=](int exitCode, QProcess::ExitStatus exitStatus) { int sigval1 = exitCode; QProcess::ExitStatus exitStatus_ret = exitStatus; int sigval2 = static_cast(exitStatus_ret); @@ -644,7 +1059,147 @@ void QProcess_connect_Finished2(QProcess* self, intptr_t slot) { }); } -void QProcess_Delete(QProcess* self) { - delete self; +void QProcess_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Open = slot; +} + +bool QProcess_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_Open(mode); +} + +void QProcess_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QProcess_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QProcess_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QProcess_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QProcess_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__BytesToWrite = slot; +} + +long long QProcess_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_BytesToWrite(); +} + +void QProcess_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__IsSequential = slot; +} + +bool QProcess_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_IsSequential(); +} + +void QProcess_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Close = slot; +} + +void QProcess_virtualbase_Close(void* self) { + ( (MiqtVirtualQProcess*)(self) )->virtualbase_Close(); +} + +void QProcess_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__ReadData = slot; +} + +long long QProcess_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QProcess_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__WriteData = slot; +} + +long long QProcess_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QProcess_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Pos = slot; +} + +long long QProcess_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_Pos(); +} + +void QProcess_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Size = slot; +} + +long long QProcess_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_Size(); +} + +void QProcess_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Seek = slot; +} + +bool QProcess_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_Seek(pos); +} + +void QProcess_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__AtEnd = slot; +} + +bool QProcess_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_AtEnd(); +} + +void QProcess_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__Reset = slot; +} + +bool QProcess_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_Reset(); +} + +void QProcess_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__BytesAvailable = slot; +} + +long long QProcess_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_BytesAvailable(); +} + +void QProcess_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__CanReadLine = slot; +} + +bool QProcess_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQProcess*)(self) )->virtualbase_CanReadLine(); +} + +void QProcess_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__ReadLineData = slot; +} + +long long QProcess_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QProcess_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QProcess*)(self) )->handle__SkipData = slot; +} + +long long QProcess_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQProcess*)(self) )->virtualbase_SkipData(maxSize); +} + +void QProcess_Delete(QProcess* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qprocess.go b/qt6/gen_qprocess.go index 22d8ab40..32e95763 100644 --- a/qt6/gen_qprocess.go +++ b/qt6/gen_qprocess.go @@ -71,7 +71,8 @@ const ( ) type QProcessEnvironment struct { - h *C.QProcessEnvironment + h *C.QProcessEnvironment + isSubclass bool } func (this *QProcessEnvironment) cPointer() *C.QProcessEnvironment { @@ -88,6 +89,7 @@ func (this *QProcessEnvironment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQProcessEnvironment constructs the type using only CGO pointers. func newQProcessEnvironment(h *C.QProcessEnvironment) *QProcessEnvironment { if h == nil { return nil @@ -95,26 +97,43 @@ func newQProcessEnvironment(h *C.QProcessEnvironment) *QProcessEnvironment { return &QProcessEnvironment{h: h} } +// UnsafeNewQProcessEnvironment constructs the type using only unsafe pointers. func UnsafeNewQProcessEnvironment(h unsafe.Pointer) *QProcessEnvironment { - return newQProcessEnvironment((*C.QProcessEnvironment)(h)) + if h == nil { + return nil + } + + return &QProcessEnvironment{h: (*C.QProcessEnvironment)(h)} } // NewQProcessEnvironment constructs a new QProcessEnvironment object. func NewQProcessEnvironment() *QProcessEnvironment { - ret := C.QProcessEnvironment_new() - return newQProcessEnvironment(ret) + var outptr_QProcessEnvironment *C.QProcessEnvironment = nil + + C.QProcessEnvironment_new(&outptr_QProcessEnvironment) + ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret.isSubclass = true + return ret } // NewQProcessEnvironment2 constructs a new QProcessEnvironment object. func NewQProcessEnvironment2(param1 QProcessEnvironment__Initialization) *QProcessEnvironment { - ret := C.QProcessEnvironment_new2((C.int)(param1)) - return newQProcessEnvironment(ret) + var outptr_QProcessEnvironment *C.QProcessEnvironment = nil + + C.QProcessEnvironment_new2((C.int)(param1), &outptr_QProcessEnvironment) + ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret.isSubclass = true + return ret } // NewQProcessEnvironment3 constructs a new QProcessEnvironment object. func NewQProcessEnvironment3(other *QProcessEnvironment) *QProcessEnvironment { - ret := C.QProcessEnvironment_new3(other.cPointer()) - return newQProcessEnvironment(ret) + var outptr_QProcessEnvironment *C.QProcessEnvironment = nil + + C.QProcessEnvironment_new3(other.cPointer(), &outptr_QProcessEnvironment) + ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret.isSubclass = true + return ret } func (this *QProcessEnvironment) OperatorAssign(other *QProcessEnvironment) { @@ -238,7 +257,7 @@ func (this *QProcessEnvironment) Value2(name string, defaultValue string) string // Delete this object from C++ memory. func (this *QProcessEnvironment) Delete() { - C.QProcessEnvironment_Delete(this.h) + C.QProcessEnvironment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -251,7 +270,8 @@ func (this *QProcessEnvironment) GoGC() { } type QProcess struct { - h *C.QProcess + h *C.QProcess + isSubclass bool *QIODevice } @@ -269,27 +289,49 @@ func (this *QProcess) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProcess(h *C.QProcess) *QProcess { +// newQProcess constructs the type using only CGO pointers. +func newQProcess(h *C.QProcess, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QProcess { if h == nil { return nil } - return &QProcess{h: h, QIODevice: UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QProcess{h: h, + QIODevice: newQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQProcess(h unsafe.Pointer) *QProcess { - return newQProcess((*C.QProcess)(h)) +// UnsafeNewQProcess constructs the type using only unsafe pointers. +func UnsafeNewQProcess(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QProcess { + if h == nil { + return nil + } + + return &QProcess{h: (*C.QProcess)(h), + QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQProcess constructs a new QProcess object. func NewQProcess() *QProcess { - ret := C.QProcess_new() - return newQProcess(ret) + var outptr_QProcess *C.QProcess = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QProcess_new(&outptr_QProcess, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQProcess2 constructs a new QProcess object. func NewQProcess2(parent *QObject) *QProcess { - ret := C.QProcess_new2(parent.cPointer()) - return newQProcess(ret) + var outptr_QProcess *C.QProcess = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QProcess_new2(parent.cPointer(), &outptr_QProcess, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QProcess) MetaObject() *QMetaObject { @@ -335,8 +377,8 @@ func (this *QProcess) StartDetached() bool { return (bool)(C.QProcess_StartDetached(this.h)) } -func (this *QProcess) Open() bool { - return (bool)(C.QProcess_Open(this.h)) +func (this *QProcess) Open(mode QIODeviceBase__OpenModeFlag) bool { + return (bool)(C.QProcess_Open(this.h, (C.int)(mode))) } func (this *QProcess) Program() string { @@ -510,12 +552,12 @@ func (this *QProcess) WaitForStarted() bool { return (bool)(C.QProcess_WaitForStarted(this.h)) } -func (this *QProcess) WaitForReadyRead() bool { - return (bool)(C.QProcess_WaitForReadyRead(this.h)) +func (this *QProcess) WaitForReadyRead(msecs int) bool { + return (bool)(C.QProcess_WaitForReadyRead(this.h, (C.int)(msecs))) } -func (this *QProcess) WaitForBytesWritten() bool { - return (bool)(C.QProcess_WaitForBytesWritten(this.h)) +func (this *QProcess) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QProcess_WaitForBytesWritten(this.h, (C.int)(msecs))) } func (this *QProcess) WaitForFinished() bool { @@ -714,10 +756,6 @@ func (this *QProcess) StartDetached1(pid *int64) bool { return (bool)(C.QProcess_StartDetached1(this.h, (*C.longlong)(unsafe.Pointer(pid)))) } -func (this *QProcess) Open1(mode QIODeviceBase__OpenModeFlag) bool { - return (bool)(C.QProcess_Open1(this.h, (C.int)(mode))) -} - func (this *QProcess) SetStandardOutputFile2(fileName string, mode QIODeviceBase__OpenModeFlag) { fileName_ms := C.struct_miqt_string{} fileName_ms.data = C.CString(fileName) @@ -738,14 +776,6 @@ func (this *QProcess) WaitForStarted1(msecs int) bool { return (bool)(C.QProcess_WaitForStarted1(this.h, (C.int)(msecs))) } -func (this *QProcess) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QProcess_WaitForReadyRead1(this.h, (C.int)(msecs))) -} - -func (this *QProcess) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QProcess_WaitForBytesWritten1(this.h, (C.int)(msecs))) -} - func (this *QProcess) WaitForFinished1(msecs int) bool { return (bool)(C.QProcess_WaitForFinished1(this.h, (C.int)(msecs))) } @@ -852,9 +882,420 @@ func miqt_exec_callback_QProcess_Finished2(cb C.intptr_t, exitCode C.int, exitSt gofunc(slotval1, slotval2) } +func (this *QProcess) callVirtualBase_Open(mode QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QProcess_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QProcess) OnOpen(slot func(super func(mode QIODeviceBase__OpenModeFlag) bool, mode QIODeviceBase__OpenModeFlag) bool) { + C.QProcess_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Open +func miqt_exec_callback_QProcess_Open(self *C.QProcess, cb C.intptr_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QIODeviceBase__OpenModeFlag) bool, mode QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODeviceBase__OpenModeFlag)(mode) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QProcess_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QProcess) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QProcess_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_WaitForReadyRead +func miqt_exec_callback_QProcess_WaitForReadyRead(self *C.QProcess, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QProcess_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QProcess) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QProcess_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_WaitForBytesWritten +func miqt_exec_callback_QProcess_WaitForBytesWritten(self *C.QProcess, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QProcess_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnBytesToWrite(slot func(super func() int64) int64) { + C.QProcess_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_BytesToWrite +func miqt_exec_callback_QProcess_BytesToWrite(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_IsSequential() bool { + + return (bool)(C.QProcess_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnIsSequential(slot func(super func() bool) bool) { + C.QProcess_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_IsSequential +func miqt_exec_callback_QProcess_IsSequential(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Close() { + + C.QProcess_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QProcess) OnClose(slot func(super func())) { + C.QProcess_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Close +func miqt_exec_callback_QProcess_Close(self *C.QProcess, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProcess{h: self}).callVirtualBase_Close) + +} + +func (this *QProcess) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QProcess_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QProcess) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QProcess_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_ReadData +func miqt_exec_callback_QProcess_ReadData(self *C.QProcess, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QProcess_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QProcess) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QProcess_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_WriteData +func miqt_exec_callback_QProcess_WriteData(self *C.QProcess, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Pos() int64 { + + return (int64)(C.QProcess_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnPos(slot func(super func() int64) int64) { + C.QProcess_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Pos +func miqt_exec_callback_QProcess_Pos(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Size() int64 { + + return (int64)(C.QProcess_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnSize(slot func(super func() int64) int64) { + C.QProcess_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Size +func miqt_exec_callback_QProcess_Size(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QProcess_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QProcess) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QProcess_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Seek +func miqt_exec_callback_QProcess_Seek(self *C.QProcess, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_AtEnd() bool { + + return (bool)(C.QProcess_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnAtEnd(slot func(super func() bool) bool) { + C.QProcess_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_AtEnd +func miqt_exec_callback_QProcess_AtEnd(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_Reset() bool { + + return (bool)(C.QProcess_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnReset(slot func(super func() bool) bool) { + C.QProcess_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_Reset +func miqt_exec_callback_QProcess_Reset(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QProcess_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnBytesAvailable(slot func(super func() int64) int64) { + C.QProcess_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_BytesAvailable +func miqt_exec_callback_QProcess_BytesAvailable(self *C.QProcess, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QProcess_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QProcess) OnCanReadLine(slot func(super func() bool) bool) { + C.QProcess_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_CanReadLine +func miqt_exec_callback_QProcess_CanReadLine(self *C.QProcess, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QProcess_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QProcess) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QProcess_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_ReadLineData +func miqt_exec_callback_QProcess_ReadLineData(self *C.QProcess, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QProcess) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QProcess_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QProcess) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QProcess_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProcess_SkipData +func miqt_exec_callback_QProcess_SkipData(self *C.QProcess, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QProcess{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QProcess) Delete() { - C.QProcess_Delete(this.h) + C.QProcess_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qprocess.h b/qt6/gen_qprocess.h index d4eb7e86..f3695ab6 100644 --- a/qt6/gen_qprocess.h +++ b/qt6/gen_qprocess.h @@ -16,21 +16,25 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; class QProcess; class QProcessEnvironment; #else typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QProcess QProcess; typedef struct QProcessEnvironment QProcessEnvironment; #endif -QProcessEnvironment* QProcessEnvironment_new(); -QProcessEnvironment* QProcessEnvironment_new2(int param1); -QProcessEnvironment* QProcessEnvironment_new3(QProcessEnvironment* other); +void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment); +void QProcessEnvironment_new2(int param1, QProcessEnvironment** outptr_QProcessEnvironment); +void QProcessEnvironment_new3(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment); void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other); void QProcessEnvironment_Swap(QProcessEnvironment* self, QProcessEnvironment* other); bool QProcessEnvironment_OperatorEqual(const QProcessEnvironment* self, QProcessEnvironment* other); @@ -47,10 +51,10 @@ struct miqt_array /* of struct miqt_string */ QProcessEnvironment_Keys(const QP void QProcessEnvironment_InsertWithQProcessEnvironment(QProcessEnvironment* self, QProcessEnvironment* e); QProcessEnvironment* QProcessEnvironment_SystemEnvironment(); struct miqt_string QProcessEnvironment_Value2(const QProcessEnvironment* self, struct miqt_string name, struct miqt_string defaultValue); -void QProcessEnvironment_Delete(QProcessEnvironment* self); +void QProcessEnvironment_Delete(QProcessEnvironment* self, bool isSubclass); -QProcess* QProcess_new(); -QProcess* QProcess_new2(QObject* parent); +void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QProcess_MetaObject(const QProcess* self); void* QProcess_Metacast(QProcess* self, const char* param1); struct miqt_string QProcess_Tr(const char* s); @@ -58,7 +62,7 @@ void QProcess_Start(QProcess* self, struct miqt_string program); void QProcess_Start2(QProcess* self); void QProcess_StartCommand(QProcess* self, struct miqt_string command); bool QProcess_StartDetached(QProcess* self); -bool QProcess_Open(QProcess* self); +bool QProcess_Open(QProcess* self, int mode); struct miqt_string QProcess_Program(const QProcess* self); void QProcess_SetProgram(QProcess* self, struct miqt_string program); struct miqt_array /* of struct miqt_string */ QProcess_Arguments(const QProcess* self); @@ -85,8 +89,8 @@ int QProcess_Error(const QProcess* self); int QProcess_State(const QProcess* self); long long QProcess_ProcessId(const QProcess* self); bool QProcess_WaitForStarted(QProcess* self); -bool QProcess_WaitForReadyRead(QProcess* self); -bool QProcess_WaitForBytesWritten(QProcess* self); +bool QProcess_WaitForReadyRead(QProcess* self, int msecs); +bool QProcess_WaitForBytesWritten(QProcess* self, int msecs); bool QProcess_WaitForFinished(QProcess* self); struct miqt_string QProcess_ReadAllStandardOutput(QProcess* self); struct miqt_string QProcess_ReadAllStandardError(QProcess* self); @@ -105,6 +109,8 @@ void QProcess_Finished(QProcess* self, int exitCode); void QProcess_connect_Finished(QProcess* self, intptr_t slot); void QProcess_ErrorOccurred(QProcess* self, int error); void QProcess_connect_ErrorOccurred(QProcess* self, intptr_t slot); +long long QProcess_ReadData(QProcess* self, char* data, long long maxlen); +long long QProcess_WriteData(QProcess* self, const char* data, long long lenVal); struct miqt_string QProcess_Tr2(const char* s, const char* c); struct miqt_string QProcess_Tr3(const char* s, const char* c, int n); void QProcess_Start22(QProcess* self, struct miqt_string program, struct miqt_array /* of struct miqt_string */ arguments); @@ -112,12 +118,9 @@ void QProcess_Start3(QProcess* self, struct miqt_string program, struct miqt_arr void QProcess_Start1(QProcess* self, int mode); void QProcess_StartCommand2(QProcess* self, struct miqt_string command, int mode); bool QProcess_StartDetached1(QProcess* self, long long* pid); -bool QProcess_Open1(QProcess* self, int mode); void QProcess_SetStandardOutputFile2(QProcess* self, struct miqt_string fileName, int mode); void QProcess_SetStandardErrorFile2(QProcess* self, struct miqt_string fileName, int mode); bool QProcess_WaitForStarted1(QProcess* self, int msecs); -bool QProcess_WaitForReadyRead1(QProcess* self, int msecs); -bool QProcess_WaitForBytesWritten1(QProcess* self, int msecs); bool QProcess_WaitForFinished1(QProcess* self, int msecs); int QProcess_Execute2(struct miqt_string program, struct miqt_array /* of struct miqt_string */ arguments); bool QProcess_StartDetached2(struct miqt_string program, struct miqt_array /* of struct miqt_string */ arguments); @@ -125,7 +128,41 @@ bool QProcess_StartDetached3(struct miqt_string program, struct miqt_array /* of bool QProcess_StartDetached4(struct miqt_string program, struct miqt_array /* of struct miqt_string */ arguments, struct miqt_string workingDirectory, long long* pid); void QProcess_Finished2(QProcess* self, int exitCode, int exitStatus); void QProcess_connect_Finished2(QProcess* self, intptr_t slot); -void QProcess_Delete(QProcess* self); +void QProcess_override_virtual_Open(void* self, intptr_t slot); +bool QProcess_virtualbase_Open(void* self, int mode); +void QProcess_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QProcess_virtualbase_WaitForReadyRead(void* self, int msecs); +void QProcess_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QProcess_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QProcess_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QProcess_virtualbase_BytesToWrite(const void* self); +void QProcess_override_virtual_IsSequential(void* self, intptr_t slot); +bool QProcess_virtualbase_IsSequential(const void* self); +void QProcess_override_virtual_Close(void* self, intptr_t slot); +void QProcess_virtualbase_Close(void* self); +void QProcess_override_virtual_ReadData(void* self, intptr_t slot); +long long QProcess_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QProcess_override_virtual_WriteData(void* self, intptr_t slot); +long long QProcess_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QProcess_override_virtual_Pos(void* self, intptr_t slot); +long long QProcess_virtualbase_Pos(const void* self); +void QProcess_override_virtual_Size(void* self, intptr_t slot); +long long QProcess_virtualbase_Size(const void* self); +void QProcess_override_virtual_Seek(void* self, intptr_t slot); +bool QProcess_virtualbase_Seek(void* self, long long pos); +void QProcess_override_virtual_AtEnd(void* self, intptr_t slot); +bool QProcess_virtualbase_AtEnd(const void* self); +void QProcess_override_virtual_Reset(void* self, intptr_t slot); +bool QProcess_virtualbase_Reset(void* self); +void QProcess_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QProcess_virtualbase_BytesAvailable(const void* self); +void QProcess_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QProcess_virtualbase_CanReadLine(const void* self); +void QProcess_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QProcess_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QProcess_override_virtual_SkipData(void* self, intptr_t slot); +long long QProcess_virtualbase_SkipData(void* self, long long maxSize); +void QProcess_Delete(QProcess* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qprogressbar.cpp b/qt6/gen_qprogressbar.cpp index 16ca9e96..a0ad7809 100644 --- a/qt6/gen_qprogressbar.cpp +++ b/qt6/gen_qprogressbar.cpp @@ -1,20 +1,1096 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qprogressbar.h" #include "_cgo_export.h" -QProgressBar* QProgressBar_new(QWidget* parent) { - return new QProgressBar(parent); +class MiqtVirtualQProgressBar : public virtual QProgressBar { +public: + + MiqtVirtualQProgressBar(QWidget* parent): QProgressBar(parent) {}; + MiqtVirtualQProgressBar(): QProgressBar() {}; + + virtual ~MiqtVirtualQProgressBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Text = 0; + + // Subclass to allow providing a Go implementation + virtual QString text() const override { + if (handle__Text == 0) { + return QProgressBar::text(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QProgressBar_Text(const_cast(this), handle__Text); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Text() const { + + QString _ret = QProgressBar::text(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QProgressBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QProgressBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QProgressBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QProgressBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QProgressBar::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QProgressBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QProgressBar::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QProgressBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QProgressBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QProgressBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionProgressBar* option) const override { + if (handle__InitStyleOption == 0) { + QProgressBar::initStyleOption(option); + return; + } + + QStyleOptionProgressBar* sigval1 = option; + + miqt_exec_callback_QProgressBar_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionProgressBar* option) const { + + QProgressBar::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QProgressBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QProgressBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QProgressBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QProgressBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QProgressBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QProgressBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QProgressBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QProgressBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QProgressBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QProgressBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QProgressBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QProgressBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QProgressBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QProgressBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QProgressBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QProgressBar::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QProgressBar::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QProgressBar::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QProgressBar::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QProgressBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QProgressBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QProgressBar::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QProgressBar::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QProgressBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QProgressBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QProgressBar::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QProgressBar::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QProgressBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QProgressBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QProgressBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QProgressBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QProgressBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QProgressBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QProgressBar::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QProgressBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QProgressBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QProgressBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QProgressBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QProgressBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QProgressBar::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QProgressBar::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QProgressBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QProgressBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QProgressBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QProgressBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QProgressBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QProgressBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QProgressBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QProgressBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QProgressBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QProgressBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QProgressBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QProgressBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QProgressBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QProgressBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QProgressBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QProgressBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QProgressBar::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QProgressBar::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QProgressBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QProgressBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QProgressBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QProgressBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QProgressBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QProgressBar::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QProgressBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QProgressBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QProgressBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QProgressBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QProgressBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QProgressBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QProgressBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QProgressBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QProgressBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QProgressBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QProgressBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QProgressBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QProgressBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QProgressBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QProgressBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QProgressBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QProgressBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QProgressBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QProgressBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QProgressBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QProgressBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QProgressBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QProgressBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QProgressBar::focusNextPrevChild(next); + + } + +}; + +void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(parent); + *outptr_QProgressBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressBar* QProgressBar_new2() { - return new QProgressBar(); +void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(); + *outptr_QProgressBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QProgressBar_MetaObject(const QProgressBar* self) { @@ -155,7 +1231,7 @@ void QProgressBar_ValueChanged(QProgressBar* self, int value) { } void QProgressBar_connect_ValueChanged(QProgressBar* self, intptr_t slot) { - QProgressBar::connect(self, static_cast(&QProgressBar::valueChanged), self, [=](int value) { + MiqtVirtualQProgressBar::connect(self, static_cast(&QProgressBar::valueChanged), self, [=](int value) { int sigval1 = value; miqt_exec_callback_QProgressBar_ValueChanged(slot, sigval1); }); @@ -183,7 +1259,355 @@ struct miqt_string QProgressBar_Tr3(const char* s, const char* c, int n) { return _ms; } -void QProgressBar_Delete(QProgressBar* self) { - delete self; +void QProgressBar_override_virtual_Text(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Text = slot; +} + +struct miqt_string QProgressBar_virtualbase_Text(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_Text(); +} + +void QProgressBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QProgressBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_SizeHint(); +} + +void QProgressBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QProgressBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QProgressBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Event = slot; +} + +bool QProgressBar_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_Event(e); +} + +void QProgressBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__PaintEvent = slot; +} + +void QProgressBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QProgressBar_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InitStyleOption = slot; +} + +void QProgressBar_virtualbase_InitStyleOption(const void* self, QStyleOptionProgressBar* option) { + ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_InitStyleOption(option); +} + +void QProgressBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DevType = slot; +} + +int QProgressBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_DevType(); +} + +void QProgressBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__SetVisible = slot; +} + +void QProgressBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QProgressBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__HeightForWidth = slot; +} + +int QProgressBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QProgressBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QProgressBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QProgressBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QProgressBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_PaintEngine(); +} + +void QProgressBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MousePressEvent = slot; +} + +void QProgressBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MousePressEvent(event); +} + +void QProgressBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QProgressBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QProgressBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QProgressBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QProgressBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QProgressBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QProgressBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__WheelEvent = slot; +} + +void QProgressBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QProgressBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QProgressBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QProgressBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QProgressBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QProgressBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__FocusInEvent = slot; +} + +void QProgressBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QProgressBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QProgressBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QProgressBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__EnterEvent = slot; +} + +void QProgressBar_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QProgressBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__LeaveEvent = slot; +} + +void QProgressBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QProgressBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__MoveEvent = slot; +} + +void QProgressBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QProgressBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ResizeEvent = slot; +} + +void QProgressBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ResizeEvent(event); +} + +void QProgressBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__CloseEvent = slot; +} + +void QProgressBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QProgressBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QProgressBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QProgressBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__TabletEvent = slot; +} + +void QProgressBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QProgressBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ActionEvent = slot; +} + +void QProgressBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QProgressBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QProgressBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QProgressBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QProgressBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QProgressBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QProgressBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QProgressBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__DropEvent = slot; +} + +void QProgressBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_DropEvent(event); +} + +void QProgressBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ShowEvent = slot; +} + +void QProgressBar_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ShowEvent(event); +} + +void QProgressBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__HideEvent = slot; +} + +void QProgressBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_HideEvent(event); +} + +void QProgressBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__NativeEvent = slot; +} + +bool QProgressBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QProgressBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__ChangeEvent = slot; +} + +void QProgressBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QProgressBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Metric = slot; +} + +int QProgressBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_Metric(param1); +} + +void QProgressBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InitPainter = slot; +} + +void QProgressBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QProgressBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QProgressBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_Redirected(offset); +} + +void QProgressBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QProgressBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_SharedPainter(); +} + +void QProgressBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QProgressBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QProgressBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QProgressBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQProgressBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QProgressBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QProgressBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QProgressBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQProgressBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QProgressBar_Delete(QProgressBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qprogressbar.go b/qt6/gen_qprogressbar.go index 85cc95c1..b46d5cb0 100644 --- a/qt6/gen_qprogressbar.go +++ b/qt6/gen_qprogressbar.go @@ -22,7 +22,8 @@ const ( ) type QProgressBar struct { - h *C.QProgressBar + h *C.QProgressBar + isSubclass bool *QWidget } @@ -40,27 +41,49 @@ func (this *QProgressBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProgressBar(h *C.QProgressBar) *QProgressBar { +// newQProgressBar constructs the type using only CGO pointers. +func newQProgressBar(h *C.QProgressBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressBar { if h == nil { return nil } - return &QProgressBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QProgressBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQProgressBar(h unsafe.Pointer) *QProgressBar { - return newQProgressBar((*C.QProgressBar)(h)) +// UnsafeNewQProgressBar constructs the type using only unsafe pointers. +func UnsafeNewQProgressBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressBar { + if h == nil { + return nil + } + + return &QProgressBar{h: (*C.QProgressBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQProgressBar constructs a new QProgressBar object. func NewQProgressBar(parent *QWidget) *QProgressBar { - ret := C.QProgressBar_new(parent.cPointer()) - return newQProgressBar(ret) + var outptr_QProgressBar *C.QProgressBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressBar_new(parent.cPointer(), &outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressBar2 constructs a new QProgressBar object. func NewQProgressBar2() *QProgressBar { - ret := C.QProgressBar_new2() - return newQProgressBar(ret) + var outptr_QProgressBar *C.QProgressBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressBar_new2(&outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QProgressBar) MetaObject() *QMetaObject { @@ -236,9 +259,1026 @@ func QProgressBar_Tr3(s string, c string, n int) string { return _ret } +func (this *QProgressBar) callVirtualBase_Text() string { + + var _ms C.struct_miqt_string = C.QProgressBar_virtualbase_Text(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QProgressBar) OnText(slot func(super func() string) string) { + C.QProgressBar_override_virtual_Text(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Text +func miqt_exec_callback_QProgressBar_Text(self *C.QProgressBar, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Text) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QProgressBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QProgressBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_SizeHint +func miqt_exec_callback_QProgressBar_SizeHint(self *C.QProgressBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QProgressBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MinimumSizeHint +func miqt_exec_callback_QProgressBar_MinimumSizeHint(self *C.QProgressBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QProgressBar_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QProgressBar) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QProgressBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Event +func miqt_exec_callback_QProgressBar_Event(self *C.QProgressBar, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QProgressBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QProgressBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_PaintEvent +func miqt_exec_callback_QProgressBar_PaintEvent(self *C.QProgressBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_InitStyleOption(option *QStyleOptionProgressBar) { + + C.QProgressBar_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QProgressBar) OnInitStyleOption(slot func(super func(option *QStyleOptionProgressBar), option *QStyleOptionProgressBar)) { + C.QProgressBar_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InitStyleOption +func miqt_exec_callback_QProgressBar_InitStyleOption(self *C.QProgressBar, cb C.intptr_t, option *C.QStyleOptionProgressBar) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionProgressBar), option *QStyleOptionProgressBar)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionProgressBar(unsafe.Pointer(option), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DevType() int { + + return (int)(C.QProgressBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QProgressBar) OnDevType(slot func(super func() int) int) { + C.QProgressBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DevType +func miqt_exec_callback_QProgressBar_DevType(self *C.QProgressBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_SetVisible(visible bool) { + + C.QProgressBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QProgressBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QProgressBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_SetVisible +func miqt_exec_callback_QProgressBar_SetVisible(self *C.QProgressBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QProgressBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QProgressBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QProgressBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QProgressBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_HeightForWidth +func miqt_exec_callback_QProgressBar_HeightForWidth(self *C.QProgressBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QProgressBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QProgressBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QProgressBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_HasHeightForWidth +func miqt_exec_callback_QProgressBar_HasHeightForWidth(self *C.QProgressBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QProgressBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QProgressBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QProgressBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_PaintEngine +func miqt_exec_callback_QProgressBar_PaintEngine(self *C.QProgressBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MousePressEvent +func miqt_exec_callback_QProgressBar_MousePressEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MouseReleaseEvent +func miqt_exec_callback_QProgressBar_MouseReleaseEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MouseDoubleClickEvent +func miqt_exec_callback_QProgressBar_MouseDoubleClickEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QProgressBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QProgressBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MouseMoveEvent +func miqt_exec_callback_QProgressBar_MouseMoveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QProgressBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QProgressBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_WheelEvent +func miqt_exec_callback_QProgressBar_WheelEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QProgressBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QProgressBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_KeyPressEvent +func miqt_exec_callback_QProgressBar_KeyPressEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QProgressBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QProgressBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_KeyReleaseEvent +func miqt_exec_callback_QProgressBar_KeyReleaseEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QProgressBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QProgressBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_FocusInEvent +func miqt_exec_callback_QProgressBar_FocusInEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QProgressBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QProgressBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_FocusOutEvent +func miqt_exec_callback_QProgressBar_FocusOutEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QProgressBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QProgressBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_EnterEvent +func miqt_exec_callback_QProgressBar_EnterEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QProgressBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QProgressBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_LeaveEvent +func miqt_exec_callback_QProgressBar_LeaveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QProgressBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QProgressBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_MoveEvent +func miqt_exec_callback_QProgressBar_MoveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QProgressBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QProgressBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ResizeEvent +func miqt_exec_callback_QProgressBar_ResizeEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QProgressBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QProgressBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_CloseEvent +func miqt_exec_callback_QProgressBar_CloseEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QProgressBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QProgressBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ContextMenuEvent +func miqt_exec_callback_QProgressBar_ContextMenuEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QProgressBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QProgressBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_TabletEvent +func miqt_exec_callback_QProgressBar_TabletEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QProgressBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QProgressBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ActionEvent +func miqt_exec_callback_QProgressBar_ActionEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QProgressBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QProgressBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DragEnterEvent +func miqt_exec_callback_QProgressBar_DragEnterEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QProgressBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QProgressBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DragMoveEvent +func miqt_exec_callback_QProgressBar_DragMoveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QProgressBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QProgressBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DragLeaveEvent +func miqt_exec_callback_QProgressBar_DragLeaveEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QProgressBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QProgressBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_DropEvent +func miqt_exec_callback_QProgressBar_DropEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QProgressBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QProgressBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ShowEvent +func miqt_exec_callback_QProgressBar_ShowEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QProgressBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QProgressBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_HideEvent +func miqt_exec_callback_QProgressBar_HideEvent(self *C.QProgressBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QProgressBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QProgressBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QProgressBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_NativeEvent +func miqt_exec_callback_QProgressBar_NativeEvent(self *C.QProgressBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QProgressBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QProgressBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_ChangeEvent +func miqt_exec_callback_QProgressBar_ChangeEvent(self *C.QProgressBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QProgressBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QProgressBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QProgressBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Metric +func miqt_exec_callback_QProgressBar_Metric(self *C.QProgressBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QProgressBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QProgressBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QProgressBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InitPainter +func miqt_exec_callback_QProgressBar_InitPainter(self *C.QProgressBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QProgressBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QProgressBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QProgressBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QProgressBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_Redirected +func miqt_exec_callback_QProgressBar_Redirected(self *C.QProgressBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QProgressBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QProgressBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QProgressBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_SharedPainter +func miqt_exec_callback_QProgressBar_SharedPainter(self *C.QProgressBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QProgressBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QProgressBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InputMethodEvent +func miqt_exec_callback_QProgressBar_InputMethodEvent(self *C.QProgressBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QProgressBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QProgressBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QProgressBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QProgressBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_InputMethodQuery +func miqt_exec_callback_QProgressBar_InputMethodQuery(self *C.QProgressBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QProgressBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QProgressBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QProgressBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QProgressBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressBar_FocusNextPrevChild +func miqt_exec_callback_QProgressBar_FocusNextPrevChild(self *C.QProgressBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QProgressBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QProgressBar) Delete() { - C.QProgressBar_Delete(this.h) + C.QProgressBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qprogressbar.h b/qt6/gen_qprogressbar.h index 6fe7f8ab..362619bc 100644 --- a/qt6/gen_qprogressbar.h +++ b/qt6/gen_qprogressbar.h @@ -15,19 +15,75 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QProgressBar; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionProgressBar; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QProgressBar QProgressBar; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionProgressBar QStyleOptionProgressBar; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QProgressBar* QProgressBar_new(QWidget* parent); -QProgressBar* QProgressBar_new2(); +void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QProgressBar_MetaObject(const QProgressBar* self); void* QProgressBar_Metacast(QProgressBar* self, const char* param1); struct miqt_string QProgressBar_Tr(const char* s); @@ -57,9 +113,98 @@ void QProgressBar_SetValue(QProgressBar* self, int value); void QProgressBar_SetOrientation(QProgressBar* self, int orientation); void QProgressBar_ValueChanged(QProgressBar* self, int value); void QProgressBar_connect_ValueChanged(QProgressBar* self, intptr_t slot); +bool QProgressBar_Event(QProgressBar* self, QEvent* e); +void QProgressBar_PaintEvent(QProgressBar* self, QPaintEvent* param1); +void QProgressBar_InitStyleOption(const QProgressBar* self, QStyleOptionProgressBar* option); struct miqt_string QProgressBar_Tr2(const char* s, const char* c); struct miqt_string QProgressBar_Tr3(const char* s, const char* c, int n); -void QProgressBar_Delete(QProgressBar* self); +void QProgressBar_override_virtual_Text(void* self, intptr_t slot); +struct miqt_string QProgressBar_virtualbase_Text(const void* self); +void QProgressBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QProgressBar_virtualbase_SizeHint(const void* self); +void QProgressBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QProgressBar_virtualbase_MinimumSizeHint(const void* self); +void QProgressBar_override_virtual_Event(void* self, intptr_t slot); +bool QProgressBar_virtualbase_Event(void* self, QEvent* e); +void QProgressBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QProgressBar_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QProgressBar_virtualbase_InitStyleOption(const void* self, QStyleOptionProgressBar* option); +void QProgressBar_override_virtual_DevType(void* self, intptr_t slot); +int QProgressBar_virtualbase_DevType(const void* self); +void QProgressBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QProgressBar_virtualbase_SetVisible(void* self, bool visible); +void QProgressBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QProgressBar_virtualbase_HeightForWidth(const void* self, int param1); +void QProgressBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QProgressBar_virtualbase_HasHeightForWidth(const void* self); +void QProgressBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QProgressBar_virtualbase_PaintEngine(const void* self); +void QProgressBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QProgressBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QProgressBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QProgressBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QProgressBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QProgressBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QProgressBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QProgressBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QProgressBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QProgressBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QProgressBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QProgressBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QProgressBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QProgressBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QProgressBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QProgressBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QProgressBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QProgressBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QProgressBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QProgressBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QProgressBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QProgressBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QProgressBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QProgressBar_override_virtual_Metric(void* self, intptr_t slot); +int QProgressBar_virtualbase_Metric(const void* self, int param1); +void QProgressBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QProgressBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QProgressBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QProgressBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QProgressBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QProgressBar_virtualbase_SharedPainter(const void* self); +void QProgressBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QProgressBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QProgressBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QProgressBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QProgressBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QProgressBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QProgressBar_Delete(QProgressBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qprogressdialog.cpp b/qt6/gen_qprogressdialog.cpp index 0c4ccfe6..a59c4d6e 100644 --- a/qt6/gen_qprogressdialog.cpp +++ b/qt6/gen_qprogressdialog.cpp @@ -1,8 +1,17 @@ +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include +#include +#include #include #include #include @@ -12,34 +21,429 @@ #include "gen_qprogressdialog.h" #include "_cgo_export.h" -QProgressDialog* QProgressDialog_new(QWidget* parent) { - return new QProgressDialog(parent); +class MiqtVirtualQProgressDialog : public virtual QProgressDialog { +public: + + MiqtVirtualQProgressDialog(QWidget* parent): QProgressDialog(parent) {}; + MiqtVirtualQProgressDialog(): QProgressDialog() {}; + MiqtVirtualQProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum): QProgressDialog(labelText, cancelButtonText, minimum, maximum) {}; + MiqtVirtualQProgressDialog(QWidget* parent, Qt::WindowFlags flags): QProgressDialog(parent, flags) {}; + MiqtVirtualQProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum, QWidget* parent): QProgressDialog(labelText, cancelButtonText, minimum, maximum, parent) {}; + MiqtVirtualQProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum, QWidget* parent, Qt::WindowFlags flags): QProgressDialog(labelText, cancelButtonText, minimum, maximum, parent, flags) {}; + + virtual ~MiqtVirtualQProgressDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QProgressDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QProgressDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QProgressDialog::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QProgressDialog::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QProgressDialog::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QProgressDialog::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QProgressDialog::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QProgressDialog::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QProgressDialog::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QProgressDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QProgressDialog::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QProgressDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QProgressDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QProgressDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QProgressDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QProgressDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QProgressDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QProgressDialog::open(); + return; + } + + + miqt_exec_callback_QProgressDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QProgressDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QProgressDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QProgressDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QProgressDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QProgressDialog::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QProgressDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QProgressDialog::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QProgressDialog::accept(); + return; + } + + + miqt_exec_callback_QProgressDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QProgressDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QProgressDialog::reject(); + return; + } + + + miqt_exec_callback_QProgressDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QProgressDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QProgressDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QProgressDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QProgressDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QProgressDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QProgressDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QProgressDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QProgressDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QProgressDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QProgressDialog::eventFilter(param1, param2); + + } + +}; + +void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new2() { - return new QProgressDialog(); +void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum) { +void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - return new QProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags) { - return new QProgressDialog(parent, static_cast(flags)); +void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent, static_cast(flags)); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent) { +void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - return new QProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags) { +void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - return new QProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); + MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); + *outptr_QProgressDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self) { @@ -167,7 +571,7 @@ void QProgressDialog_Canceled(QProgressDialog* self) { } void QProgressDialog_connect_Canceled(QProgressDialog* self, intptr_t slot) { - QProgressDialog::connect(self, static_cast(&QProgressDialog::canceled), self, [=]() { + MiqtVirtualQProgressDialog::connect(self, static_cast(&QProgressDialog::canceled), self, [=]() { miqt_exec_callback_QProgressDialog_Canceled(slot); }); } @@ -194,7 +598,131 @@ struct miqt_string QProgressDialog_Tr3(const char* s, const char* c, int n) { return _ms; } -void QProgressDialog_Delete(QProgressDialog* self) { - delete self; +void QProgressDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QProgressDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQProgressDialog*)(self) )->virtualbase_SizeHint(); +} + +void QProgressDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QProgressDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ResizeEvent(event); +} + +void QProgressDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__CloseEvent = slot; +} + +void QProgressDialog_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_CloseEvent(event); +} + +void QProgressDialog_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ChangeEvent = slot; +} + +void QProgressDialog_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ChangeEvent(event); +} + +void QProgressDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ShowEvent = slot; +} + +void QProgressDialog_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ShowEvent(event); +} + +void QProgressDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__SetVisible = slot; +} + +void QProgressDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QProgressDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QProgressDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQProgressDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QProgressDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Open = slot; +} + +void QProgressDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Open(); +} + +void QProgressDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Exec = slot; +} + +int QProgressDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Exec(); +} + +void QProgressDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Done = slot; +} + +void QProgressDialog_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Done(param1); +} + +void QProgressDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Accept = slot; +} + +void QProgressDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Accept(); +} + +void QProgressDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__Reject = slot; +} + +void QProgressDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_Reject(); +} + +void QProgressDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QProgressDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QProgressDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QProgressDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QProgressDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QProgressDialog*)(self) )->handle__EventFilter = slot; +} + +bool QProgressDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQProgressDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QProgressDialog_Delete(QProgressDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qprogressdialog.go b/qt6/gen_qprogressdialog.go index df6a62b2..569e2e9f 100644 --- a/qt6/gen_qprogressdialog.go +++ b/qt6/gen_qprogressdialog.go @@ -15,7 +15,8 @@ import ( ) type QProgressDialog struct { - h *C.QProgressDialog + h *C.QProgressDialog + isSubclass bool *QDialog } @@ -33,27 +34,51 @@ func (this *QProgressDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProgressDialog(h *C.QProgressDialog) *QProgressDialog { +// newQProgressDialog constructs the type using only CGO pointers. +func newQProgressDialog(h *C.QProgressDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressDialog { if h == nil { return nil } - return &QProgressDialog{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QProgressDialog{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQProgressDialog(h unsafe.Pointer) *QProgressDialog { - return newQProgressDialog((*C.QProgressDialog)(h)) +// UnsafeNewQProgressDialog constructs the type using only unsafe pointers. +func UnsafeNewQProgressDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressDialog { + if h == nil { + return nil + } + + return &QProgressDialog{h: (*C.QProgressDialog)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQProgressDialog constructs a new QProgressDialog object. func NewQProgressDialog(parent *QWidget) *QProgressDialog { - ret := C.QProgressDialog_new(parent.cPointer()) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new(parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog2 constructs a new QProgressDialog object. func NewQProgressDialog2() *QProgressDialog { - ret := C.QProgressDialog_new2() - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new2(&outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog3 constructs a new QProgressDialog object. @@ -66,14 +91,30 @@ func NewQProgressDialog3(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - ret := C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum)) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog4 constructs a new QProgressDialog object. func NewQProgressDialog4(parent *QWidget, flags WindowType) *QProgressDialog { - ret := C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags)) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog5 constructs a new QProgressDialog object. @@ -86,8 +127,16 @@ func NewQProgressDialog5(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - ret := C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer()) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQProgressDialog6 constructs a new QProgressDialog object. @@ -100,8 +149,16 @@ func NewQProgressDialog6(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - ret := C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags)) - return newQProgressDialog(ret) + var outptr_QProgressDialog *C.QProgressDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QProgressDialog) MetaObject() *QMetaObject { @@ -268,9 +325,351 @@ func QProgressDialog_Tr3(s string, c string, n int) string { return _ret } +func (this *QProgressDialog) callVirtualBase_SizeHint() *QSize { + + _ret := C.QProgressDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressDialog) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_SizeHint +func miqt_exec_callback_QProgressDialog_SizeHint(self *C.QProgressDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressDialog) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QProgressDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QProgressDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ResizeEvent +func miqt_exec_callback_QProgressDialog_ResizeEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QProgressDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QProgressDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_CloseEvent +func miqt_exec_callback_QProgressDialog_CloseEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QProgressDialog_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QProgressDialog_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ChangeEvent +func miqt_exec_callback_QProgressDialog_ChangeEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QProgressDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QProgressDialog) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QProgressDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ShowEvent +func miqt_exec_callback_QProgressDialog_ShowEvent(self *C.QProgressDialog, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_SetVisible(visible bool) { + + C.QProgressDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QProgressDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QProgressDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_SetVisible +func miqt_exec_callback_QProgressDialog_SetVisible(self *C.QProgressDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QProgressDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProgressDialog) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QProgressDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_MinimumSizeHint +func miqt_exec_callback_QProgressDialog_MinimumSizeHint(self *C.QProgressDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QProgressDialog) callVirtualBase_Open() { + + C.QProgressDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QProgressDialog) OnOpen(slot func(super func())) { + C.QProgressDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Open +func miqt_exec_callback_QProgressDialog_Open(self *C.QProgressDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QProgressDialog) callVirtualBase_Exec() int { + + return (int)(C.QProgressDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QProgressDialog) OnExec(slot func(super func() int) int) { + C.QProgressDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Exec +func miqt_exec_callback_QProgressDialog_Exec(self *C.QProgressDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QProgressDialog) callVirtualBase_Done(param1 int) { + + C.QProgressDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QProgressDialog) OnDone(slot func(super func(param1 int), param1 int)) { + C.QProgressDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Done +func miqt_exec_callback_QProgressDialog_Done(self *C.QProgressDialog, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_Accept() { + + C.QProgressDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QProgressDialog) OnAccept(slot func(super func())) { + C.QProgressDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Accept +func miqt_exec_callback_QProgressDialog_Accept(self *C.QProgressDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QProgressDialog) callVirtualBase_Reject() { + + C.QProgressDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QProgressDialog) OnReject(slot func(super func())) { + C.QProgressDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_Reject +func miqt_exec_callback_QProgressDialog_Reject(self *C.QProgressDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QProgressDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QProgressDialog) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QProgressDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressDialog) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QProgressDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_KeyPressEvent +func miqt_exec_callback_QProgressDialog_KeyPressEvent(self *C.QProgressDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QProgressDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QProgressDialog) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QProgressDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_ContextMenuEvent +func miqt_exec_callback_QProgressDialog_ContextMenuEvent(self *C.QProgressDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QProgressDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QProgressDialog) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QProgressDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QProgressDialog) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QProgressDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProgressDialog_EventFilter +func miqt_exec_callback_QProgressDialog_EventFilter(self *C.QProgressDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QProgressDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QProgressDialog) Delete() { - C.QProgressDialog_Delete(this.h) + C.QProgressDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qprogressdialog.h b/qt6/gen_qprogressdialog.h index 25edfdc0..4bc9c157 100644 --- a/qt6/gen_qprogressdialog.h +++ b/qt6/gen_qprogressdialog.h @@ -15,29 +15,47 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QLabel; class QMetaObject; +class QObject; +class QPaintDevice; class QProgressBar; class QProgressDialog; class QPushButton; +class QResizeEvent; +class QShowEvent; class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QLabel QLabel; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QProgressBar QProgressBar; typedef struct QProgressDialog QProgressDialog; typedef struct QPushButton QPushButton; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QProgressDialog* QProgressDialog_new(QWidget* parent); -QProgressDialog* QProgressDialog_new2(); -QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum); -QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags); -QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent); -QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags); +void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self); void* QProgressDialog_Metacast(QProgressDialog* self, const char* param1); struct miqt_string QProgressDialog_Tr(const char* s); @@ -66,9 +84,43 @@ void QProgressDialog_SetCancelButtonText(QProgressDialog* self, struct miqt_stri void QProgressDialog_SetMinimumDuration(QProgressDialog* self, int ms); void QProgressDialog_Canceled(QProgressDialog* self); void QProgressDialog_connect_Canceled(QProgressDialog* self, intptr_t slot); +void QProgressDialog_ResizeEvent(QProgressDialog* self, QResizeEvent* event); +void QProgressDialog_CloseEvent(QProgressDialog* self, QCloseEvent* event); +void QProgressDialog_ChangeEvent(QProgressDialog* self, QEvent* event); +void QProgressDialog_ShowEvent(QProgressDialog* self, QShowEvent* event); struct miqt_string QProgressDialog_Tr2(const char* s, const char* c); struct miqt_string QProgressDialog_Tr3(const char* s, const char* c, int n); -void QProgressDialog_Delete(QProgressDialog* self); +void QProgressDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QProgressDialog_virtualbase_SizeHint(const void* self); +void QProgressDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QProgressDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QProgressDialog_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ChangeEvent(void* self, QEvent* event); +void QProgressDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QProgressDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QProgressDialog_virtualbase_SetVisible(void* self, bool visible); +void QProgressDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QProgressDialog_virtualbase_MinimumSizeHint(const void* self); +void QProgressDialog_override_virtual_Open(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Open(void* self); +void QProgressDialog_override_virtual_Exec(void* self, intptr_t slot); +int QProgressDialog_virtualbase_Exec(void* self); +void QProgressDialog_override_virtual_Done(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Done(void* self, int param1); +void QProgressDialog_override_virtual_Accept(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Accept(void* self); +void QProgressDialog_override_virtual_Reject(void* self, intptr_t slot); +void QProgressDialog_virtualbase_Reject(void* self); +void QProgressDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QProgressDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QProgressDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QProgressDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QProgressDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QProgressDialog_Delete(QProgressDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qproperty.cpp b/qt6/gen_qproperty.cpp index 34272d18..4885ad26 100644 --- a/qt6/gen_qproperty.cpp +++ b/qt6/gen_qproperty.cpp @@ -14,33 +14,43 @@ #include "gen_qproperty.h" #include "_cgo_export.h" -QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new() { - return new QPropertyBindingSourceLocation(); +void QPropertyBindingSourceLocation_new(QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation) { + QPropertyBindingSourceLocation* ret = new QPropertyBindingSourceLocation(); + *outptr_QPropertyBindingSourceLocation = ret; } -QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1) { - return new QPropertyBindingSourceLocation(*param1); +void QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1, QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation) { + QPropertyBindingSourceLocation* ret = new QPropertyBindingSourceLocation(*param1); + *outptr_QPropertyBindingSourceLocation = ret; } -void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self) { - delete self; +void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPropertyBindingError* QPropertyBindingError_new() { - return new QPropertyBindingError(); +void QPropertyBindingError_new(QPropertyBindingError** outptr_QPropertyBindingError) { + QPropertyBindingError* ret = new QPropertyBindingError(); + *outptr_QPropertyBindingError = ret; } -QPropertyBindingError* QPropertyBindingError_new2(int typeVal) { - return new QPropertyBindingError(static_cast(typeVal)); +void QPropertyBindingError_new2(int typeVal, QPropertyBindingError** outptr_QPropertyBindingError) { + QPropertyBindingError* ret = new QPropertyBindingError(static_cast(typeVal)); + *outptr_QPropertyBindingError = ret; } -QPropertyBindingError* QPropertyBindingError_new3(QPropertyBindingError* other) { - return new QPropertyBindingError(*other); +void QPropertyBindingError_new3(QPropertyBindingError* other, QPropertyBindingError** outptr_QPropertyBindingError) { + QPropertyBindingError* ret = new QPropertyBindingError(*other); + *outptr_QPropertyBindingError = ret; } -QPropertyBindingError* QPropertyBindingError_new4(int typeVal, struct miqt_string description) { +void QPropertyBindingError_new4(int typeVal, struct miqt_string description, QPropertyBindingError** outptr_QPropertyBindingError) { QString description_QString = QString::fromUtf8(description.data, description.len); - return new QPropertyBindingError(static_cast(typeVal), description_QString); + QPropertyBindingError* ret = new QPropertyBindingError(static_cast(typeVal), description_QString); + *outptr_QPropertyBindingError = ret; } void QPropertyBindingError_OperatorAssign(QPropertyBindingError* self, QPropertyBindingError* other) { @@ -67,16 +77,22 @@ struct miqt_string QPropertyBindingError_Description(const QPropertyBindingError return _ms; } -void QPropertyBindingError_Delete(QPropertyBindingError* self) { - delete self; +void QPropertyBindingError_Delete(QPropertyBindingError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QUntypedPropertyBinding* QUntypedPropertyBinding_new() { - return new QUntypedPropertyBinding(); +void QUntypedPropertyBinding_new(QUntypedPropertyBinding** outptr_QUntypedPropertyBinding) { + QUntypedPropertyBinding* ret = new QUntypedPropertyBinding(); + *outptr_QUntypedPropertyBinding = ret; } -QUntypedPropertyBinding* QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other) { - return new QUntypedPropertyBinding(*other); +void QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other, QUntypedPropertyBinding** outptr_QUntypedPropertyBinding) { + QUntypedPropertyBinding* ret = new QUntypedPropertyBinding(*other); + *outptr_QUntypedPropertyBinding = ret; } void QUntypedPropertyBinding_OperatorAssign(QUntypedPropertyBinding* self, QUntypedPropertyBinding* other) { @@ -95,48 +111,77 @@ QMetaType* QUntypedPropertyBinding_ValueMetaType(const QUntypedPropertyBinding* return new QMetaType(self->valueMetaType()); } -void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self) { - delete self; +void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPropertyObserverBase* QPropertyObserverBase_new() { - return new QPropertyObserverBase(); +void QPropertyObserverBase_new(QPropertyObserverBase** outptr_QPropertyObserverBase) { + QPropertyObserverBase* ret = new QPropertyObserverBase(); + *outptr_QPropertyObserverBase = ret; } -QPropertyObserverBase* QPropertyObserverBase_new2(QPropertyObserverBase* param1) { - return new QPropertyObserverBase(*param1); +void QPropertyObserverBase_new2(QPropertyObserverBase* param1, QPropertyObserverBase** outptr_QPropertyObserverBase) { + QPropertyObserverBase* ret = new QPropertyObserverBase(*param1); + *outptr_QPropertyObserverBase = ret; } -void QPropertyObserverBase_Delete(QPropertyObserverBase* self) { - delete self; +void QPropertyObserverBase_Delete(QPropertyObserverBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPropertyObserver* QPropertyObserver_new() { - return new QPropertyObserver(); +void QPropertyObserver_new(QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase) { + QPropertyObserver* ret = new QPropertyObserver(); + *outptr_QPropertyObserver = ret; + *outptr_QPropertyObserverBase = static_cast(ret); } -void QPropertyObserver_Delete(QPropertyObserver* self) { - delete self; +void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QPropertyNotifier* QPropertyNotifier_new() { - return new QPropertyNotifier(); +void QPropertyNotifier_new(QPropertyNotifier** outptr_QPropertyNotifier, QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase) { + QPropertyNotifier* ret = new QPropertyNotifier(); + *outptr_QPropertyNotifier = ret; + *outptr_QPropertyObserver = static_cast(ret); + *outptr_QPropertyObserverBase = static_cast(ret); } -void QPropertyNotifier_Delete(QPropertyNotifier* self) { - delete self; +void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__QBindableInterface_Delete(QtPrivate__QBindableInterface* self) { - delete self; +void QtPrivate__QBindableInterface_Delete(QtPrivate__QBindableInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QUntypedBindable* QUntypedBindable_new() { - return new QUntypedBindable(); +void QUntypedBindable_new(QUntypedBindable** outptr_QUntypedBindable) { + QUntypedBindable* ret = new QUntypedBindable(); + *outptr_QUntypedBindable = ret; } -QUntypedBindable* QUntypedBindable_new2(QUntypedBindable* param1) { - return new QUntypedBindable(*param1); +void QUntypedBindable_new2(QUntypedBindable* param1, QUntypedBindable** outptr_QUntypedBindable) { + QUntypedBindable* ret = new QUntypedBindable(*param1); + *outptr_QUntypedBindable = ret; } bool QUntypedBindable_IsValid(const QUntypedBindable* self) { @@ -183,7 +228,11 @@ QUntypedPropertyBinding* QUntypedBindable_MakeBinding1(const QUntypedBindable* s return new QUntypedPropertyBinding(self->makeBinding(*location)); } -void QUntypedBindable_Delete(QUntypedBindable* self) { - delete self; +void QUntypedBindable_Delete(QUntypedBindable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qproperty.go b/qt6/gen_qproperty.go index 3b64ecab..bdca2b73 100644 --- a/qt6/gen_qproperty.go +++ b/qt6/gen_qproperty.go @@ -40,7 +40,8 @@ const ( ) type QPropertyBindingSourceLocation struct { - h *C.QPropertyBindingSourceLocation + h *C.QPropertyBindingSourceLocation + isSubclass bool } func (this *QPropertyBindingSourceLocation) cPointer() *C.QPropertyBindingSourceLocation { @@ -57,6 +58,7 @@ func (this *QPropertyBindingSourceLocation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPropertyBindingSourceLocation constructs the type using only CGO pointers. func newQPropertyBindingSourceLocation(h *C.QPropertyBindingSourceLocation) *QPropertyBindingSourceLocation { if h == nil { return nil @@ -64,25 +66,38 @@ func newQPropertyBindingSourceLocation(h *C.QPropertyBindingSourceLocation) *QPr return &QPropertyBindingSourceLocation{h: h} } +// UnsafeNewQPropertyBindingSourceLocation constructs the type using only unsafe pointers. func UnsafeNewQPropertyBindingSourceLocation(h unsafe.Pointer) *QPropertyBindingSourceLocation { - return newQPropertyBindingSourceLocation((*C.QPropertyBindingSourceLocation)(h)) + if h == nil { + return nil + } + + return &QPropertyBindingSourceLocation{h: (*C.QPropertyBindingSourceLocation)(h)} } // NewQPropertyBindingSourceLocation constructs a new QPropertyBindingSourceLocation object. func NewQPropertyBindingSourceLocation() *QPropertyBindingSourceLocation { - ret := C.QPropertyBindingSourceLocation_new() - return newQPropertyBindingSourceLocation(ret) + var outptr_QPropertyBindingSourceLocation *C.QPropertyBindingSourceLocation = nil + + C.QPropertyBindingSourceLocation_new(&outptr_QPropertyBindingSourceLocation) + ret := newQPropertyBindingSourceLocation(outptr_QPropertyBindingSourceLocation) + ret.isSubclass = true + return ret } // NewQPropertyBindingSourceLocation2 constructs a new QPropertyBindingSourceLocation object. func NewQPropertyBindingSourceLocation2(param1 *QPropertyBindingSourceLocation) *QPropertyBindingSourceLocation { - ret := C.QPropertyBindingSourceLocation_new2(param1.cPointer()) - return newQPropertyBindingSourceLocation(ret) + var outptr_QPropertyBindingSourceLocation *C.QPropertyBindingSourceLocation = nil + + C.QPropertyBindingSourceLocation_new2(param1.cPointer(), &outptr_QPropertyBindingSourceLocation) + ret := newQPropertyBindingSourceLocation(outptr_QPropertyBindingSourceLocation) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPropertyBindingSourceLocation) Delete() { - C.QPropertyBindingSourceLocation_Delete(this.h) + C.QPropertyBindingSourceLocation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -95,7 +110,8 @@ func (this *QPropertyBindingSourceLocation) GoGC() { } type QPropertyBindingError struct { - h *C.QPropertyBindingError + h *C.QPropertyBindingError + isSubclass bool } func (this *QPropertyBindingError) cPointer() *C.QPropertyBindingError { @@ -112,6 +128,7 @@ func (this *QPropertyBindingError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPropertyBindingError constructs the type using only CGO pointers. func newQPropertyBindingError(h *C.QPropertyBindingError) *QPropertyBindingError { if h == nil { return nil @@ -119,26 +136,43 @@ func newQPropertyBindingError(h *C.QPropertyBindingError) *QPropertyBindingError return &QPropertyBindingError{h: h} } +// UnsafeNewQPropertyBindingError constructs the type using only unsafe pointers. func UnsafeNewQPropertyBindingError(h unsafe.Pointer) *QPropertyBindingError { - return newQPropertyBindingError((*C.QPropertyBindingError)(h)) + if h == nil { + return nil + } + + return &QPropertyBindingError{h: (*C.QPropertyBindingError)(h)} } // NewQPropertyBindingError constructs a new QPropertyBindingError object. func NewQPropertyBindingError() *QPropertyBindingError { - ret := C.QPropertyBindingError_new() - return newQPropertyBindingError(ret) + var outptr_QPropertyBindingError *C.QPropertyBindingError = nil + + C.QPropertyBindingError_new(&outptr_QPropertyBindingError) + ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret.isSubclass = true + return ret } // NewQPropertyBindingError2 constructs a new QPropertyBindingError object. func NewQPropertyBindingError2(typeVal QPropertyBindingError__Type) *QPropertyBindingError { - ret := C.QPropertyBindingError_new2((C.int)(typeVal)) - return newQPropertyBindingError(ret) + var outptr_QPropertyBindingError *C.QPropertyBindingError = nil + + C.QPropertyBindingError_new2((C.int)(typeVal), &outptr_QPropertyBindingError) + ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret.isSubclass = true + return ret } // NewQPropertyBindingError3 constructs a new QPropertyBindingError object. func NewQPropertyBindingError3(other *QPropertyBindingError) *QPropertyBindingError { - ret := C.QPropertyBindingError_new3(other.cPointer()) - return newQPropertyBindingError(ret) + var outptr_QPropertyBindingError *C.QPropertyBindingError = nil + + C.QPropertyBindingError_new3(other.cPointer(), &outptr_QPropertyBindingError) + ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret.isSubclass = true + return ret } // NewQPropertyBindingError4 constructs a new QPropertyBindingError object. @@ -147,8 +181,12 @@ func NewQPropertyBindingError4(typeVal QPropertyBindingError__Type, description description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - ret := C.QPropertyBindingError_new4((C.int)(typeVal), description_ms) - return newQPropertyBindingError(ret) + var outptr_QPropertyBindingError *C.QPropertyBindingError = nil + + C.QPropertyBindingError_new4((C.int)(typeVal), description_ms, &outptr_QPropertyBindingError) + ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret.isSubclass = true + return ret } func (this *QPropertyBindingError) OperatorAssign(other *QPropertyBindingError) { @@ -172,7 +210,7 @@ func (this *QPropertyBindingError) Description() string { // Delete this object from C++ memory. func (this *QPropertyBindingError) Delete() { - C.QPropertyBindingError_Delete(this.h) + C.QPropertyBindingError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -185,7 +223,8 @@ func (this *QPropertyBindingError) GoGC() { } type QUntypedPropertyBinding struct { - h *C.QUntypedPropertyBinding + h *C.QUntypedPropertyBinding + isSubclass bool } func (this *QUntypedPropertyBinding) cPointer() *C.QUntypedPropertyBinding { @@ -202,6 +241,7 @@ func (this *QUntypedPropertyBinding) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUntypedPropertyBinding constructs the type using only CGO pointers. func newQUntypedPropertyBinding(h *C.QUntypedPropertyBinding) *QUntypedPropertyBinding { if h == nil { return nil @@ -209,20 +249,33 @@ func newQUntypedPropertyBinding(h *C.QUntypedPropertyBinding) *QUntypedPropertyB return &QUntypedPropertyBinding{h: h} } +// UnsafeNewQUntypedPropertyBinding constructs the type using only unsafe pointers. func UnsafeNewQUntypedPropertyBinding(h unsafe.Pointer) *QUntypedPropertyBinding { - return newQUntypedPropertyBinding((*C.QUntypedPropertyBinding)(h)) + if h == nil { + return nil + } + + return &QUntypedPropertyBinding{h: (*C.QUntypedPropertyBinding)(h)} } // NewQUntypedPropertyBinding constructs a new QUntypedPropertyBinding object. func NewQUntypedPropertyBinding() *QUntypedPropertyBinding { - ret := C.QUntypedPropertyBinding_new() - return newQUntypedPropertyBinding(ret) + var outptr_QUntypedPropertyBinding *C.QUntypedPropertyBinding = nil + + C.QUntypedPropertyBinding_new(&outptr_QUntypedPropertyBinding) + ret := newQUntypedPropertyBinding(outptr_QUntypedPropertyBinding) + ret.isSubclass = true + return ret } // NewQUntypedPropertyBinding2 constructs a new QUntypedPropertyBinding object. func NewQUntypedPropertyBinding2(other *QUntypedPropertyBinding) *QUntypedPropertyBinding { - ret := C.QUntypedPropertyBinding_new2(other.cPointer()) - return newQUntypedPropertyBinding(ret) + var outptr_QUntypedPropertyBinding *C.QUntypedPropertyBinding = nil + + C.QUntypedPropertyBinding_new2(other.cPointer(), &outptr_QUntypedPropertyBinding) + ret := newQUntypedPropertyBinding(outptr_QUntypedPropertyBinding) + ret.isSubclass = true + return ret } func (this *QUntypedPropertyBinding) OperatorAssign(other *QUntypedPropertyBinding) { @@ -249,7 +302,7 @@ func (this *QUntypedPropertyBinding) ValueMetaType() *QMetaType { // Delete this object from C++ memory. func (this *QUntypedPropertyBinding) Delete() { - C.QUntypedPropertyBinding_Delete(this.h) + C.QUntypedPropertyBinding_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -262,7 +315,8 @@ func (this *QUntypedPropertyBinding) GoGC() { } type QPropertyObserverBase struct { - h *C.QPropertyObserverBase + h *C.QPropertyObserverBase + isSubclass bool } func (this *QPropertyObserverBase) cPointer() *C.QPropertyObserverBase { @@ -279,6 +333,7 @@ func (this *QPropertyObserverBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPropertyObserverBase constructs the type using only CGO pointers. func newQPropertyObserverBase(h *C.QPropertyObserverBase) *QPropertyObserverBase { if h == nil { return nil @@ -286,25 +341,38 @@ func newQPropertyObserverBase(h *C.QPropertyObserverBase) *QPropertyObserverBase return &QPropertyObserverBase{h: h} } +// UnsafeNewQPropertyObserverBase constructs the type using only unsafe pointers. func UnsafeNewQPropertyObserverBase(h unsafe.Pointer) *QPropertyObserverBase { - return newQPropertyObserverBase((*C.QPropertyObserverBase)(h)) + if h == nil { + return nil + } + + return &QPropertyObserverBase{h: (*C.QPropertyObserverBase)(h)} } // NewQPropertyObserverBase constructs a new QPropertyObserverBase object. func NewQPropertyObserverBase() *QPropertyObserverBase { - ret := C.QPropertyObserverBase_new() - return newQPropertyObserverBase(ret) + var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil + + C.QPropertyObserverBase_new(&outptr_QPropertyObserverBase) + ret := newQPropertyObserverBase(outptr_QPropertyObserverBase) + ret.isSubclass = true + return ret } // NewQPropertyObserverBase2 constructs a new QPropertyObserverBase object. func NewQPropertyObserverBase2(param1 *QPropertyObserverBase) *QPropertyObserverBase { - ret := C.QPropertyObserverBase_new2(param1.cPointer()) - return newQPropertyObserverBase(ret) + var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil + + C.QPropertyObserverBase_new2(param1.cPointer(), &outptr_QPropertyObserverBase) + ret := newQPropertyObserverBase(outptr_QPropertyObserverBase) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPropertyObserverBase) Delete() { - C.QPropertyObserverBase_Delete(this.h) + C.QPropertyObserverBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -317,7 +385,8 @@ func (this *QPropertyObserverBase) GoGC() { } type QPropertyObserver struct { - h *C.QPropertyObserver + h *C.QPropertyObserver + isSubclass bool *QPropertyObserverBase } @@ -335,26 +404,39 @@ func (this *QPropertyObserver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPropertyObserver(h *C.QPropertyObserver) *QPropertyObserver { +// newQPropertyObserver constructs the type using only CGO pointers. +func newQPropertyObserver(h *C.QPropertyObserver, h_QPropertyObserverBase *C.QPropertyObserverBase) *QPropertyObserver { if h == nil { return nil } - return &QPropertyObserver{h: h, QPropertyObserverBase: UnsafeNewQPropertyObserverBase(unsafe.Pointer(h))} + return &QPropertyObserver{h: h, + QPropertyObserverBase: newQPropertyObserverBase(h_QPropertyObserverBase)} } -func UnsafeNewQPropertyObserver(h unsafe.Pointer) *QPropertyObserver { - return newQPropertyObserver((*C.QPropertyObserver)(h)) +// UnsafeNewQPropertyObserver constructs the type using only unsafe pointers. +func UnsafeNewQPropertyObserver(h unsafe.Pointer, h_QPropertyObserverBase unsafe.Pointer) *QPropertyObserver { + if h == nil { + return nil + } + + return &QPropertyObserver{h: (*C.QPropertyObserver)(h), + QPropertyObserverBase: UnsafeNewQPropertyObserverBase(h_QPropertyObserverBase)} } // NewQPropertyObserver constructs a new QPropertyObserver object. func NewQPropertyObserver() *QPropertyObserver { - ret := C.QPropertyObserver_new() - return newQPropertyObserver(ret) + var outptr_QPropertyObserver *C.QPropertyObserver = nil + var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil + + C.QPropertyObserver_new(&outptr_QPropertyObserver, &outptr_QPropertyObserverBase) + ret := newQPropertyObserver(outptr_QPropertyObserver, outptr_QPropertyObserverBase) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPropertyObserver) Delete() { - C.QPropertyObserver_Delete(this.h) + C.QPropertyObserver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -367,7 +449,8 @@ func (this *QPropertyObserver) GoGC() { } type QPropertyNotifier struct { - h *C.QPropertyNotifier + h *C.QPropertyNotifier + isSubclass bool *QPropertyObserver } @@ -385,26 +468,40 @@ func (this *QPropertyNotifier) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPropertyNotifier(h *C.QPropertyNotifier) *QPropertyNotifier { +// newQPropertyNotifier constructs the type using only CGO pointers. +func newQPropertyNotifier(h *C.QPropertyNotifier, h_QPropertyObserver *C.QPropertyObserver, h_QPropertyObserverBase *C.QPropertyObserverBase) *QPropertyNotifier { if h == nil { return nil } - return &QPropertyNotifier{h: h, QPropertyObserver: UnsafeNewQPropertyObserver(unsafe.Pointer(h))} + return &QPropertyNotifier{h: h, + QPropertyObserver: newQPropertyObserver(h_QPropertyObserver, h_QPropertyObserverBase)} } -func UnsafeNewQPropertyNotifier(h unsafe.Pointer) *QPropertyNotifier { - return newQPropertyNotifier((*C.QPropertyNotifier)(h)) +// UnsafeNewQPropertyNotifier constructs the type using only unsafe pointers. +func UnsafeNewQPropertyNotifier(h unsafe.Pointer, h_QPropertyObserver unsafe.Pointer, h_QPropertyObserverBase unsafe.Pointer) *QPropertyNotifier { + if h == nil { + return nil + } + + return &QPropertyNotifier{h: (*C.QPropertyNotifier)(h), + QPropertyObserver: UnsafeNewQPropertyObserver(h_QPropertyObserver, h_QPropertyObserverBase)} } // NewQPropertyNotifier constructs a new QPropertyNotifier object. func NewQPropertyNotifier() *QPropertyNotifier { - ret := C.QPropertyNotifier_new() - return newQPropertyNotifier(ret) + var outptr_QPropertyNotifier *C.QPropertyNotifier = nil + var outptr_QPropertyObserver *C.QPropertyObserver = nil + var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil + + C.QPropertyNotifier_new(&outptr_QPropertyNotifier, &outptr_QPropertyObserver, &outptr_QPropertyObserverBase) + ret := newQPropertyNotifier(outptr_QPropertyNotifier, outptr_QPropertyObserver, outptr_QPropertyObserverBase) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QPropertyNotifier) Delete() { - C.QPropertyNotifier_Delete(this.h) + C.QPropertyNotifier_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -417,7 +514,8 @@ func (this *QPropertyNotifier) GoGC() { } type QtPrivate__QBindableInterface struct { - h *C.QtPrivate__QBindableInterface + h *C.QtPrivate__QBindableInterface + isSubclass bool } func (this *QtPrivate__QBindableInterface) cPointer() *C.QtPrivate__QBindableInterface { @@ -434,6 +532,7 @@ func (this *QtPrivate__QBindableInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QBindableInterface constructs the type using only CGO pointers. func newQtPrivate__QBindableInterface(h *C.QtPrivate__QBindableInterface) *QtPrivate__QBindableInterface { if h == nil { return nil @@ -441,13 +540,18 @@ func newQtPrivate__QBindableInterface(h *C.QtPrivate__QBindableInterface) *QtPri return &QtPrivate__QBindableInterface{h: h} } +// UnsafeNewQtPrivate__QBindableInterface constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QBindableInterface(h unsafe.Pointer) *QtPrivate__QBindableInterface { - return newQtPrivate__QBindableInterface((*C.QtPrivate__QBindableInterface)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QBindableInterface{h: (*C.QtPrivate__QBindableInterface)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__QBindableInterface) Delete() { - C.QtPrivate__QBindableInterface_Delete(this.h) + C.QtPrivate__QBindableInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -460,7 +564,8 @@ func (this *QtPrivate__QBindableInterface) GoGC() { } type QUntypedBindable struct { - h *C.QUntypedBindable + h *C.QUntypedBindable + isSubclass bool } func (this *QUntypedBindable) cPointer() *C.QUntypedBindable { @@ -477,6 +582,7 @@ func (this *QUntypedBindable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUntypedBindable constructs the type using only CGO pointers. func newQUntypedBindable(h *C.QUntypedBindable) *QUntypedBindable { if h == nil { return nil @@ -484,20 +590,33 @@ func newQUntypedBindable(h *C.QUntypedBindable) *QUntypedBindable { return &QUntypedBindable{h: h} } +// UnsafeNewQUntypedBindable constructs the type using only unsafe pointers. func UnsafeNewQUntypedBindable(h unsafe.Pointer) *QUntypedBindable { - return newQUntypedBindable((*C.QUntypedBindable)(h)) + if h == nil { + return nil + } + + return &QUntypedBindable{h: (*C.QUntypedBindable)(h)} } // NewQUntypedBindable constructs a new QUntypedBindable object. func NewQUntypedBindable() *QUntypedBindable { - ret := C.QUntypedBindable_new() - return newQUntypedBindable(ret) + var outptr_QUntypedBindable *C.QUntypedBindable = nil + + C.QUntypedBindable_new(&outptr_QUntypedBindable) + ret := newQUntypedBindable(outptr_QUntypedBindable) + ret.isSubclass = true + return ret } // NewQUntypedBindable2 constructs a new QUntypedBindable object. func NewQUntypedBindable2(param1 *QUntypedBindable) *QUntypedBindable { - ret := C.QUntypedBindable_new2(param1.cPointer()) - return newQUntypedBindable(ret) + var outptr_QUntypedBindable *C.QUntypedBindable = nil + + C.QUntypedBindable_new2(param1.cPointer(), &outptr_QUntypedBindable) + ret := newQUntypedBindable(outptr_QUntypedBindable) + ret.isSubclass = true + return ret } func (this *QUntypedBindable) IsValid() bool { @@ -561,7 +680,7 @@ func (this *QUntypedBindable) MakeBinding1(location *QPropertyBindingSourceLocat // Delete this object from C++ memory. func (this *QUntypedBindable) Delete() { - C.QUntypedBindable_Delete(this.h) + C.QUntypedBindable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qproperty.h b/qt6/gen_qproperty.h index 3213403b..fab0452a 100644 --- a/qt6/gen_qproperty.h +++ b/qt6/gen_qproperty.h @@ -40,42 +40,42 @@ typedef struct QUntypedPropertyBinding QUntypedPropertyBinding; typedef struct QtPrivate__QBindableInterface QtPrivate__QBindableInterface; #endif -QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new(); -QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1); -void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self); +void QPropertyBindingSourceLocation_new(QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation); +void QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1, QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation); +void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self, bool isSubclass); -QPropertyBindingError* QPropertyBindingError_new(); -QPropertyBindingError* QPropertyBindingError_new2(int typeVal); -QPropertyBindingError* QPropertyBindingError_new3(QPropertyBindingError* other); -QPropertyBindingError* QPropertyBindingError_new4(int typeVal, struct miqt_string description); +void QPropertyBindingError_new(QPropertyBindingError** outptr_QPropertyBindingError); +void QPropertyBindingError_new2(int typeVal, QPropertyBindingError** outptr_QPropertyBindingError); +void QPropertyBindingError_new3(QPropertyBindingError* other, QPropertyBindingError** outptr_QPropertyBindingError); +void QPropertyBindingError_new4(int typeVal, struct miqt_string description, QPropertyBindingError** outptr_QPropertyBindingError); void QPropertyBindingError_OperatorAssign(QPropertyBindingError* self, QPropertyBindingError* other); bool QPropertyBindingError_HasError(const QPropertyBindingError* self); int QPropertyBindingError_Type(const QPropertyBindingError* self); struct miqt_string QPropertyBindingError_Description(const QPropertyBindingError* self); -void QPropertyBindingError_Delete(QPropertyBindingError* self); +void QPropertyBindingError_Delete(QPropertyBindingError* self, bool isSubclass); -QUntypedPropertyBinding* QUntypedPropertyBinding_new(); -QUntypedPropertyBinding* QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other); +void QUntypedPropertyBinding_new(QUntypedPropertyBinding** outptr_QUntypedPropertyBinding); +void QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other, QUntypedPropertyBinding** outptr_QUntypedPropertyBinding); void QUntypedPropertyBinding_OperatorAssign(QUntypedPropertyBinding* self, QUntypedPropertyBinding* other); bool QUntypedPropertyBinding_IsNull(const QUntypedPropertyBinding* self); QPropertyBindingError* QUntypedPropertyBinding_Error(const QUntypedPropertyBinding* self); QMetaType* QUntypedPropertyBinding_ValueMetaType(const QUntypedPropertyBinding* self); -void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self); +void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self, bool isSubclass); -QPropertyObserverBase* QPropertyObserverBase_new(); -QPropertyObserverBase* QPropertyObserverBase_new2(QPropertyObserverBase* param1); -void QPropertyObserverBase_Delete(QPropertyObserverBase* self); +void QPropertyObserverBase_new(QPropertyObserverBase** outptr_QPropertyObserverBase); +void QPropertyObserverBase_new2(QPropertyObserverBase* param1, QPropertyObserverBase** outptr_QPropertyObserverBase); +void QPropertyObserverBase_Delete(QPropertyObserverBase* self, bool isSubclass); -QPropertyObserver* QPropertyObserver_new(); -void QPropertyObserver_Delete(QPropertyObserver* self); +void QPropertyObserver_new(QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase); +void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass); -QPropertyNotifier* QPropertyNotifier_new(); -void QPropertyNotifier_Delete(QPropertyNotifier* self); +void QPropertyNotifier_new(QPropertyNotifier** outptr_QPropertyNotifier, QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase); +void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass); -void QtPrivate__QBindableInterface_Delete(QtPrivate__QBindableInterface* self); +void QtPrivate__QBindableInterface_Delete(QtPrivate__QBindableInterface* self, bool isSubclass); -QUntypedBindable* QUntypedBindable_new(); -QUntypedBindable* QUntypedBindable_new2(QUntypedBindable* param1); +void QUntypedBindable_new(QUntypedBindable** outptr_QUntypedBindable); +void QUntypedBindable_new2(QUntypedBindable* param1, QUntypedBindable** outptr_QUntypedBindable); bool QUntypedBindable_IsValid(const QUntypedBindable* self); bool QUntypedBindable_IsBindable(const QUntypedBindable* self); bool QUntypedBindable_IsReadOnly(const QUntypedBindable* self); @@ -87,7 +87,7 @@ bool QUntypedBindable_SetBinding(QUntypedBindable* self, QUntypedPropertyBinding bool QUntypedBindable_HasBinding(const QUntypedBindable* self); QMetaType* QUntypedBindable_MetaType(const QUntypedBindable* self); QUntypedPropertyBinding* QUntypedBindable_MakeBinding1(const QUntypedBindable* self, QPropertyBindingSourceLocation* location); -void QUntypedBindable_Delete(QUntypedBindable* self); +void QUntypedBindable_Delete(QUntypedBindable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpropertyanimation.cpp b/qt6/gen_qpropertyanimation.cpp index 826a37fb..248f87bb 100644 --- a/qt6/gen_qpropertyanimation.cpp +++ b/qt6/gen_qpropertyanimation.cpp @@ -1,30 +1,214 @@ +#include #include +#include #include #include #include #include #include #include +#include +#include #include #include "gen_qpropertyanimation.h" #include "_cgo_export.h" -QPropertyAnimation* QPropertyAnimation_new() { - return new QPropertyAnimation(); +class MiqtVirtualQPropertyAnimation : public virtual QPropertyAnimation { +public: + + MiqtVirtualQPropertyAnimation(): QPropertyAnimation() {}; + MiqtVirtualQPropertyAnimation(QObject* target, const QByteArray& propertyName): QPropertyAnimation(target, propertyName) {}; + MiqtVirtualQPropertyAnimation(QObject* parent): QPropertyAnimation(parent) {}; + MiqtVirtualQPropertyAnimation(QObject* target, const QByteArray& propertyName, QObject* parent): QPropertyAnimation(target, propertyName, parent) {}; + + virtual ~MiqtVirtualQPropertyAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPropertyAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPropertyAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPropertyAnimation::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentValue = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentValue(const QVariant& value) override { + if (handle__UpdateCurrentValue == 0) { + QPropertyAnimation::updateCurrentValue(value); + return; + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + + miqt_exec_callback_QPropertyAnimation_UpdateCurrentValue(this, handle__UpdateCurrentValue, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentValue(QVariant* value) { + + QPropertyAnimation::updateCurrentValue(*value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QPropertyAnimation::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QPropertyAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QPropertyAnimation::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QPropertyAnimation::duration(); + } + + + int callback_return_value = miqt_exec_callback_QPropertyAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QPropertyAnimation::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QPropertyAnimation::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QPropertyAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QPropertyAnimation::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Interpolated = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant interpolated(const QVariant& from, const QVariant& to, qreal progress) const override { + if (handle__Interpolated == 0) { + return QPropertyAnimation::interpolated(from, to, progress); + } + + const QVariant& from_ret = from; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&from_ret); + const QVariant& to_ret = to; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&to_ret); + qreal progress_ret = progress; + double sigval3 = static_cast(progress_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPropertyAnimation_Interpolated(const_cast(this), handle__Interpolated, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Interpolated(QVariant* from, QVariant* to, double progress) const { + + return new QVariant(QPropertyAnimation::interpolated(*from, *to, static_cast(progress))); + + } + +}; + +void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName) { +void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - return new QPropertyAnimation(target, propertyName_QByteArray); + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPropertyAnimation* QPropertyAnimation_new3(QObject* parent) { - return new QPropertyAnimation(parent); +void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(parent); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent) { +void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - return new QPropertyAnimation(target, propertyName_QByteArray, parent); + MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray, parent); + *outptr_QPropertyAnimation = ret; + *outptr_QVariantAnimation = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self) { @@ -90,7 +274,59 @@ struct miqt_string QPropertyAnimation_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPropertyAnimation_Delete(QPropertyAnimation* self) { - delete self; +void QPropertyAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__Event = slot; +} + +bool QPropertyAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_Event(event); +} + +void QPropertyAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__UpdateCurrentValue = slot; +} + +void QPropertyAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value) { + ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_UpdateCurrentValue(value); +} + +void QPropertyAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__UpdateState = slot; +} + +void QPropertyAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QPropertyAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__Duration = slot; +} + +int QPropertyAnimation_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_Duration(); +} + +void QPropertyAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QPropertyAnimation_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QPropertyAnimation_override_virtual_Interpolated(void* self, intptr_t slot) { + dynamic_cast( (QPropertyAnimation*)(self) )->handle__Interpolated = slot; +} + +QVariant* QPropertyAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress) { + return ( (const MiqtVirtualQPropertyAnimation*)(self) )->virtualbase_Interpolated(from, to, progress); +} + +void QPropertyAnimation_Delete(QPropertyAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpropertyanimation.go b/qt6/gen_qpropertyanimation.go index 330e6adf..ad4da047 100644 --- a/qt6/gen_qpropertyanimation.go +++ b/qt6/gen_qpropertyanimation.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPropertyAnimation struct { - h *C.QPropertyAnimation + h *C.QPropertyAnimation + isSubclass bool *QVariantAnimation } @@ -32,21 +34,36 @@ func (this *QPropertyAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPropertyAnimation(h *C.QPropertyAnimation) *QPropertyAnimation { +// newQPropertyAnimation constructs the type using only CGO pointers. +func newQPropertyAnimation(h *C.QPropertyAnimation, h_QVariantAnimation *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPropertyAnimation { if h == nil { return nil } - return &QPropertyAnimation{h: h, QVariantAnimation: UnsafeNewQVariantAnimation(unsafe.Pointer(h))} + return &QPropertyAnimation{h: h, + QVariantAnimation: newQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQPropertyAnimation(h unsafe.Pointer) *QPropertyAnimation { - return newQPropertyAnimation((*C.QPropertyAnimation)(h)) +// UnsafeNewQPropertyAnimation constructs the type using only unsafe pointers. +func UnsafeNewQPropertyAnimation(h unsafe.Pointer, h_QVariantAnimation unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPropertyAnimation { + if h == nil { + return nil + } + + return &QPropertyAnimation{h: (*C.QPropertyAnimation)(h), + QVariantAnimation: UnsafeNewQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} } // NewQPropertyAnimation constructs a new QPropertyAnimation object. func NewQPropertyAnimation() *QPropertyAnimation { - ret := C.QPropertyAnimation_new() - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new(&outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPropertyAnimation2 constructs a new QPropertyAnimation object. @@ -54,14 +71,28 @@ func NewQPropertyAnimation2(target *QObject, propertyName []byte) *QPropertyAnim propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - ret := C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias) - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias, &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPropertyAnimation3 constructs a new QPropertyAnimation object. func NewQPropertyAnimation3(parent *QObject) *QPropertyAnimation { - ret := C.QPropertyAnimation_new3(parent.cPointer()) - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new3(parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQPropertyAnimation4 constructs a new QPropertyAnimation object. @@ -69,8 +100,15 @@ func NewQPropertyAnimation4(target *QObject, propertyName []byte, parent *QObjec propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - ret := C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer()) - return newQPropertyAnimation(ret) + var outptr_QPropertyAnimation *C.QPropertyAnimation = nil + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QPropertyAnimation) MetaObject() *QMetaObject { @@ -136,9 +174,157 @@ func QPropertyAnimation_Tr3(s string, c string, n int) string { return _ret } +func (this *QPropertyAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPropertyAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPropertyAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPropertyAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_Event +func miqt_exec_callback_QPropertyAnimation_Event(self *C.QPropertyAnimation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPropertyAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPropertyAnimation) callVirtualBase_UpdateCurrentValue(value *QVariant) { + + C.QPropertyAnimation_virtualbase_UpdateCurrentValue(unsafe.Pointer(this.h), value.cPointer()) + +} +func (this *QPropertyAnimation) OnUpdateCurrentValue(slot func(super func(value *QVariant), value *QVariant)) { + C.QPropertyAnimation_override_virtual_UpdateCurrentValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_UpdateCurrentValue +func miqt_exec_callback_QPropertyAnimation_UpdateCurrentValue(self *C.QPropertyAnimation, cb C.intptr_t, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant), value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QPropertyAnimation{h: self}).callVirtualBase_UpdateCurrentValue, slotval1) + +} + +func (this *QPropertyAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QPropertyAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QPropertyAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QPropertyAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_UpdateState +func miqt_exec_callback_QPropertyAnimation_UpdateState(self *C.QPropertyAnimation, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QPropertyAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QPropertyAnimation) callVirtualBase_Duration() int { + + return (int)(C.QPropertyAnimation_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QPropertyAnimation) OnDuration(slot func(super func() int) int) { + C.QPropertyAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_Duration +func miqt_exec_callback_QPropertyAnimation_Duration(self *C.QPropertyAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPropertyAnimation{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QPropertyAnimation) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QPropertyAnimation_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QPropertyAnimation) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QPropertyAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_UpdateCurrentTime +func miqt_exec_callback_QPropertyAnimation_UpdateCurrentTime(self *C.QPropertyAnimation, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QPropertyAnimation{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QPropertyAnimation) callVirtualBase_Interpolated(from *QVariant, to *QVariant, progress float64) *QVariant { + + _ret := C.QPropertyAnimation_virtualbase_Interpolated(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.double)(progress)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPropertyAnimation) OnInterpolated(slot func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) { + C.QPropertyAnimation_override_virtual_Interpolated(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPropertyAnimation_Interpolated +func miqt_exec_callback_QPropertyAnimation_Interpolated(self *C.QPropertyAnimation, cb C.intptr_t, from *C.QVariant, to *C.QVariant, progress C.double) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(from)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(to)) + slotval3 := (float64)(progress) + + virtualReturn := gofunc((&QPropertyAnimation{h: self}).callVirtualBase_Interpolated, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QPropertyAnimation) Delete() { - C.QPropertyAnimation_Delete(this.h) + C.QPropertyAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpropertyanimation.h b/qt6/gen_qpropertyanimation.h index b8579e18..da2535bb 100644 --- a/qt6/gen_qpropertyanimation.h +++ b/qt6/gen_qpropertyanimation.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; class QByteArray; +class QEvent; class QMetaObject; class QObject; class QPropertyAnimation; +class QVariant; +class QVariantAnimation; #else +typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QByteArray QByteArray; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPropertyAnimation QPropertyAnimation; +typedef struct QVariant QVariant; +typedef struct QVariantAnimation QVariantAnimation; #endif -QPropertyAnimation* QPropertyAnimation_new(); -QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName); -QPropertyAnimation* QPropertyAnimation_new3(QObject* parent); -QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent); +void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self); void* QPropertyAnimation_Metacast(QPropertyAnimation* self, const char* param1); struct miqt_string QPropertyAnimation_Tr(const char* s); @@ -37,9 +45,24 @@ QObject* QPropertyAnimation_TargetObject(const QPropertyAnimation* self); void QPropertyAnimation_SetTargetObject(QPropertyAnimation* self, QObject* target); struct miqt_string QPropertyAnimation_PropertyName(const QPropertyAnimation* self); void QPropertyAnimation_SetPropertyName(QPropertyAnimation* self, struct miqt_string propertyName); +bool QPropertyAnimation_Event(QPropertyAnimation* self, QEvent* event); +void QPropertyAnimation_UpdateCurrentValue(QPropertyAnimation* self, QVariant* value); +void QPropertyAnimation_UpdateState(QPropertyAnimation* self, int newState, int oldState); struct miqt_string QPropertyAnimation_Tr2(const char* s, const char* c); struct miqt_string QPropertyAnimation_Tr3(const char* s, const char* c, int n); -void QPropertyAnimation_Delete(QPropertyAnimation* self); +void QPropertyAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QPropertyAnimation_virtualbase_Event(void* self, QEvent* event); +void QPropertyAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot); +void QPropertyAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value); +void QPropertyAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QPropertyAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QPropertyAnimation_override_virtual_Duration(void* self, intptr_t slot); +int QPropertyAnimation_virtualbase_Duration(const void* self); +void QPropertyAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QPropertyAnimation_virtualbase_UpdateCurrentTime(void* self, int param1); +void QPropertyAnimation_override_virtual_Interpolated(void* self, intptr_t slot); +QVariant* QPropertyAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress); +void QPropertyAnimation_Delete(QPropertyAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpropertyprivate.cpp b/qt6/gen_qpropertyprivate.cpp index 7a5932fc..9cb2ebac 100644 --- a/qt6/gen_qpropertyprivate.cpp +++ b/qt6/gen_qpropertyprivate.cpp @@ -19,32 +19,57 @@ bool QtPrivate__RefCounted_Deref(QtPrivate__RefCounted* self) { return self->deref(); } -void QtPrivate__RefCounted_Delete(QtPrivate__RefCounted* self) { - delete self; +void QtPrivate__RefCounted_Delete(QtPrivate__RefCounted* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QUntypedPropertyData_Delete(QUntypedPropertyData* self) { - delete self; +void QUntypedPropertyData_Delete(QUntypedPropertyData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QPropertyProxyBindingData_Delete(QPropertyProxyBindingData* self) { - delete self; +void QPropertyProxyBindingData_Delete(QPropertyProxyBindingData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__MSVCWorkAround_Delete(QtPrivate__MSVCWorkAround* self) { - delete self; +void QtPrivate__MSVCWorkAround_Delete(QtPrivate__MSVCWorkAround* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__BindingFunctionVTable_Delete(QtPrivate__BindingFunctionVTable* self) { - delete self; +void QtPrivate__BindingFunctionVTable_Delete(QtPrivate__BindingFunctionVTable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__QPropertyBindingFunction_Delete(QtPrivate__QPropertyBindingFunction* self) { - delete self; +void QtPrivate__QPropertyBindingFunction_Delete(QtPrivate__QPropertyBindingFunction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__QPropertyBindingData* QtPrivate__QPropertyBindingData_new() { - return new QtPrivate::QPropertyBindingData(); +void QtPrivate__QPropertyBindingData_new(QtPrivate__QPropertyBindingData** outptr_QtPrivate__QPropertyBindingData) { + QtPrivate::QPropertyBindingData* ret = new QtPrivate::QPropertyBindingData(); + *outptr_QtPrivate__QPropertyBindingData = ret; } bool QtPrivate__QPropertyBindingData_HasBinding(const QtPrivate__QPropertyBindingData* self) { @@ -79,7 +104,11 @@ void QtPrivate__QPropertyBindingData_NotifyObservers2(const QtPrivate__QProperty self->notifyObservers(propertyDataPtr, storage); } -void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self) { - delete self; +void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpropertyprivate.go b/qt6/gen_qpropertyprivate.go index 92aa3adc..8596dc9c 100644 --- a/qt6/gen_qpropertyprivate.go +++ b/qt6/gen_qpropertyprivate.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__RefCounted struct { - h *C.QtPrivate__RefCounted + h *C.QtPrivate__RefCounted + isSubclass bool } func (this *QtPrivate__RefCounted) cPointer() *C.QtPrivate__RefCounted { @@ -31,6 +32,7 @@ func (this *QtPrivate__RefCounted) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__RefCounted constructs the type using only CGO pointers. func newQtPrivate__RefCounted(h *C.QtPrivate__RefCounted) *QtPrivate__RefCounted { if h == nil { return nil @@ -38,8 +40,13 @@ func newQtPrivate__RefCounted(h *C.QtPrivate__RefCounted) *QtPrivate__RefCounted return &QtPrivate__RefCounted{h: h} } +// UnsafeNewQtPrivate__RefCounted constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__RefCounted(h unsafe.Pointer) *QtPrivate__RefCounted { - return newQtPrivate__RefCounted((*C.QtPrivate__RefCounted)(h)) + if h == nil { + return nil + } + + return &QtPrivate__RefCounted{h: (*C.QtPrivate__RefCounted)(h)} } func (this *QtPrivate__RefCounted) AddRef() { @@ -52,7 +59,7 @@ func (this *QtPrivate__RefCounted) Deref() bool { // Delete this object from C++ memory. func (this *QtPrivate__RefCounted) Delete() { - C.QtPrivate__RefCounted_Delete(this.h) + C.QtPrivate__RefCounted_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -65,7 +72,8 @@ func (this *QtPrivate__RefCounted) GoGC() { } type QUntypedPropertyData struct { - h *C.QUntypedPropertyData + h *C.QUntypedPropertyData + isSubclass bool } func (this *QUntypedPropertyData) cPointer() *C.QUntypedPropertyData { @@ -82,6 +90,7 @@ func (this *QUntypedPropertyData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUntypedPropertyData constructs the type using only CGO pointers. func newQUntypedPropertyData(h *C.QUntypedPropertyData) *QUntypedPropertyData { if h == nil { return nil @@ -89,13 +98,18 @@ func newQUntypedPropertyData(h *C.QUntypedPropertyData) *QUntypedPropertyData { return &QUntypedPropertyData{h: h} } +// UnsafeNewQUntypedPropertyData constructs the type using only unsafe pointers. func UnsafeNewQUntypedPropertyData(h unsafe.Pointer) *QUntypedPropertyData { - return newQUntypedPropertyData((*C.QUntypedPropertyData)(h)) + if h == nil { + return nil + } + + return &QUntypedPropertyData{h: (*C.QUntypedPropertyData)(h)} } // Delete this object from C++ memory. func (this *QUntypedPropertyData) Delete() { - C.QUntypedPropertyData_Delete(this.h) + C.QUntypedPropertyData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -108,7 +122,8 @@ func (this *QUntypedPropertyData) GoGC() { } type QPropertyProxyBindingData struct { - h *C.QPropertyProxyBindingData + h *C.QPropertyProxyBindingData + isSubclass bool } func (this *QPropertyProxyBindingData) cPointer() *C.QPropertyProxyBindingData { @@ -125,6 +140,7 @@ func (this *QPropertyProxyBindingData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPropertyProxyBindingData constructs the type using only CGO pointers. func newQPropertyProxyBindingData(h *C.QPropertyProxyBindingData) *QPropertyProxyBindingData { if h == nil { return nil @@ -132,13 +148,18 @@ func newQPropertyProxyBindingData(h *C.QPropertyProxyBindingData) *QPropertyProx return &QPropertyProxyBindingData{h: h} } +// UnsafeNewQPropertyProxyBindingData constructs the type using only unsafe pointers. func UnsafeNewQPropertyProxyBindingData(h unsafe.Pointer) *QPropertyProxyBindingData { - return newQPropertyProxyBindingData((*C.QPropertyProxyBindingData)(h)) + if h == nil { + return nil + } + + return &QPropertyProxyBindingData{h: (*C.QPropertyProxyBindingData)(h)} } // Delete this object from C++ memory. func (this *QPropertyProxyBindingData) Delete() { - C.QPropertyProxyBindingData_Delete(this.h) + C.QPropertyProxyBindingData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -151,7 +172,8 @@ func (this *QPropertyProxyBindingData) GoGC() { } type QtPrivate__MSVCWorkAround struct { - h *C.QtPrivate__MSVCWorkAround + h *C.QtPrivate__MSVCWorkAround + isSubclass bool } func (this *QtPrivate__MSVCWorkAround) cPointer() *C.QtPrivate__MSVCWorkAround { @@ -168,6 +190,7 @@ func (this *QtPrivate__MSVCWorkAround) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__MSVCWorkAround constructs the type using only CGO pointers. func newQtPrivate__MSVCWorkAround(h *C.QtPrivate__MSVCWorkAround) *QtPrivate__MSVCWorkAround { if h == nil { return nil @@ -175,13 +198,18 @@ func newQtPrivate__MSVCWorkAround(h *C.QtPrivate__MSVCWorkAround) *QtPrivate__MS return &QtPrivate__MSVCWorkAround{h: h} } +// UnsafeNewQtPrivate__MSVCWorkAround constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__MSVCWorkAround(h unsafe.Pointer) *QtPrivate__MSVCWorkAround { - return newQtPrivate__MSVCWorkAround((*C.QtPrivate__MSVCWorkAround)(h)) + if h == nil { + return nil + } + + return &QtPrivate__MSVCWorkAround{h: (*C.QtPrivate__MSVCWorkAround)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__MSVCWorkAround) Delete() { - C.QtPrivate__MSVCWorkAround_Delete(this.h) + C.QtPrivate__MSVCWorkAround_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -194,7 +222,8 @@ func (this *QtPrivate__MSVCWorkAround) GoGC() { } type QtPrivate__BindingFunctionVTable struct { - h *C.QtPrivate__BindingFunctionVTable + h *C.QtPrivate__BindingFunctionVTable + isSubclass bool } func (this *QtPrivate__BindingFunctionVTable) cPointer() *C.QtPrivate__BindingFunctionVTable { @@ -211,6 +240,7 @@ func (this *QtPrivate__BindingFunctionVTable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__BindingFunctionVTable constructs the type using only CGO pointers. func newQtPrivate__BindingFunctionVTable(h *C.QtPrivate__BindingFunctionVTable) *QtPrivate__BindingFunctionVTable { if h == nil { return nil @@ -218,13 +248,18 @@ func newQtPrivate__BindingFunctionVTable(h *C.QtPrivate__BindingFunctionVTable) return &QtPrivate__BindingFunctionVTable{h: h} } +// UnsafeNewQtPrivate__BindingFunctionVTable constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__BindingFunctionVTable(h unsafe.Pointer) *QtPrivate__BindingFunctionVTable { - return newQtPrivate__BindingFunctionVTable((*C.QtPrivate__BindingFunctionVTable)(h)) + if h == nil { + return nil + } + + return &QtPrivate__BindingFunctionVTable{h: (*C.QtPrivate__BindingFunctionVTable)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__BindingFunctionVTable) Delete() { - C.QtPrivate__BindingFunctionVTable_Delete(this.h) + C.QtPrivate__BindingFunctionVTable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -237,7 +272,8 @@ func (this *QtPrivate__BindingFunctionVTable) GoGC() { } type QtPrivate__QPropertyBindingFunction struct { - h *C.QtPrivate__QPropertyBindingFunction + h *C.QtPrivate__QPropertyBindingFunction + isSubclass bool } func (this *QtPrivate__QPropertyBindingFunction) cPointer() *C.QtPrivate__QPropertyBindingFunction { @@ -254,6 +290,7 @@ func (this *QtPrivate__QPropertyBindingFunction) UnsafePointer() unsafe.Pointer return unsafe.Pointer(this.h) } +// newQtPrivate__QPropertyBindingFunction constructs the type using only CGO pointers. func newQtPrivate__QPropertyBindingFunction(h *C.QtPrivate__QPropertyBindingFunction) *QtPrivate__QPropertyBindingFunction { if h == nil { return nil @@ -261,13 +298,18 @@ func newQtPrivate__QPropertyBindingFunction(h *C.QtPrivate__QPropertyBindingFunc return &QtPrivate__QPropertyBindingFunction{h: h} } +// UnsafeNewQtPrivate__QPropertyBindingFunction constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QPropertyBindingFunction(h unsafe.Pointer) *QtPrivate__QPropertyBindingFunction { - return newQtPrivate__QPropertyBindingFunction((*C.QtPrivate__QPropertyBindingFunction)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QPropertyBindingFunction{h: (*C.QtPrivate__QPropertyBindingFunction)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__QPropertyBindingFunction) Delete() { - C.QtPrivate__QPropertyBindingFunction_Delete(this.h) + C.QtPrivate__QPropertyBindingFunction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -280,7 +322,8 @@ func (this *QtPrivate__QPropertyBindingFunction) GoGC() { } type QtPrivate__QPropertyBindingData struct { - h *C.QtPrivate__QPropertyBindingData + h *C.QtPrivate__QPropertyBindingData + isSubclass bool } func (this *QtPrivate__QPropertyBindingData) cPointer() *C.QtPrivate__QPropertyBindingData { @@ -297,6 +340,7 @@ func (this *QtPrivate__QPropertyBindingData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QPropertyBindingData constructs the type using only CGO pointers. func newQtPrivate__QPropertyBindingData(h *C.QtPrivate__QPropertyBindingData) *QtPrivate__QPropertyBindingData { if h == nil { return nil @@ -304,14 +348,23 @@ func newQtPrivate__QPropertyBindingData(h *C.QtPrivate__QPropertyBindingData) *Q return &QtPrivate__QPropertyBindingData{h: h} } +// UnsafeNewQtPrivate__QPropertyBindingData constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QPropertyBindingData(h unsafe.Pointer) *QtPrivate__QPropertyBindingData { - return newQtPrivate__QPropertyBindingData((*C.QtPrivate__QPropertyBindingData)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QPropertyBindingData{h: (*C.QtPrivate__QPropertyBindingData)(h)} } // NewQtPrivate__QPropertyBindingData constructs a new QtPrivate::QPropertyBindingData object. func NewQtPrivate__QPropertyBindingData() *QtPrivate__QPropertyBindingData { - ret := C.QtPrivate__QPropertyBindingData_new() - return newQtPrivate__QPropertyBindingData(ret) + var outptr_QtPrivate__QPropertyBindingData *C.QtPrivate__QPropertyBindingData = nil + + C.QtPrivate__QPropertyBindingData_new(&outptr_QtPrivate__QPropertyBindingData) + ret := newQtPrivate__QPropertyBindingData(outptr_QtPrivate__QPropertyBindingData) + ret.isSubclass = true + return ret } func (this *QtPrivate__QPropertyBindingData) HasBinding() bool { @@ -351,7 +404,7 @@ func (this *QtPrivate__QPropertyBindingData) NotifyObservers2(propertyDataPtr *Q // Delete this object from C++ memory. func (this *QtPrivate__QPropertyBindingData) Delete() { - C.QtPrivate__QPropertyBindingData_Delete(this.h) + C.QtPrivate__QPropertyBindingData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpropertyprivate.h b/qt6/gen_qpropertyprivate.h index 5c4004b5..4159eb5b 100644 --- a/qt6/gen_qpropertyprivate.h +++ b/qt6/gen_qpropertyprivate.h @@ -58,19 +58,19 @@ typedef struct QtPrivate__RefCounted QtPrivate__RefCounted; void QtPrivate__RefCounted_AddRef(QtPrivate__RefCounted* self); bool QtPrivate__RefCounted_Deref(QtPrivate__RefCounted* self); -void QtPrivate__RefCounted_Delete(QtPrivate__RefCounted* self); +void QtPrivate__RefCounted_Delete(QtPrivate__RefCounted* self, bool isSubclass); -void QUntypedPropertyData_Delete(QUntypedPropertyData* self); +void QUntypedPropertyData_Delete(QUntypedPropertyData* self, bool isSubclass); -void QPropertyProxyBindingData_Delete(QPropertyProxyBindingData* self); +void QPropertyProxyBindingData_Delete(QPropertyProxyBindingData* self, bool isSubclass); -void QtPrivate__MSVCWorkAround_Delete(QtPrivate__MSVCWorkAround* self); +void QtPrivate__MSVCWorkAround_Delete(QtPrivate__MSVCWorkAround* self, bool isSubclass); -void QtPrivate__BindingFunctionVTable_Delete(QtPrivate__BindingFunctionVTable* self); +void QtPrivate__BindingFunctionVTable_Delete(QtPrivate__BindingFunctionVTable* self, bool isSubclass); -void QtPrivate__QPropertyBindingFunction_Delete(QtPrivate__QPropertyBindingFunction* self); +void QtPrivate__QPropertyBindingFunction_Delete(QtPrivate__QPropertyBindingFunction* self, bool isSubclass); -QtPrivate__QPropertyBindingData* QtPrivate__QPropertyBindingData_new(); +void QtPrivate__QPropertyBindingData_new(QtPrivate__QPropertyBindingData** outptr_QtPrivate__QPropertyBindingData); bool QtPrivate__QPropertyBindingData_HasBinding(const QtPrivate__QPropertyBindingData* self); bool QtPrivate__QPropertyBindingData_IsNotificationDelayed(const QtPrivate__QPropertyBindingData* self); QUntypedPropertyBinding* QtPrivate__QPropertyBindingData_SetBinding(QtPrivate__QPropertyBindingData* self, QUntypedPropertyBinding* newBinding, QUntypedPropertyData* propertyDataPtr); @@ -79,7 +79,7 @@ void QtPrivate__QPropertyBindingData_RemoveBinding(QtPrivate__QPropertyBindingDa void QtPrivate__QPropertyBindingData_RegisterWithCurrentlyEvaluatingBinding2(const QtPrivate__QPropertyBindingData* self); void QtPrivate__QPropertyBindingData_NotifyObservers(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr); void QtPrivate__QPropertyBindingData_NotifyObservers2(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr, QBindingStorage* storage); -void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self); +void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qproxystyle.cpp b/qt6/gen_qproxystyle.cpp index 92a9691e..643b520b 100644 --- a/qt6/gen_qproxystyle.cpp +++ b/qt6/gen_qproxystyle.cpp @@ -1,7 +1,10 @@ #include +#include +#include #include #include #include +#include #include #include #include @@ -21,17 +24,709 @@ #include "gen_qproxystyle.h" #include "_cgo_export.h" -QProxyStyle* QProxyStyle_new() { - return new QProxyStyle(); +class MiqtVirtualQProxyStyle : public virtual QProxyStyle { +public: + + MiqtVirtualQProxyStyle(): QProxyStyle() {}; + MiqtVirtualQProxyStyle(const QString& key): QProxyStyle(key) {}; + MiqtVirtualQProxyStyle(QStyle* style): QProxyStyle(style) {}; + + virtual ~MiqtVirtualQProxyStyle() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPrimitive = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const override { + if (handle__DrawPrimitive == 0) { + QProxyStyle::drawPrimitive(element, option, painter, widget); + return; + } + + QStyle::PrimitiveElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QPainter* sigval3 = painter; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QProxyStyle_DrawPrimitive(const_cast(this), handle__DrawPrimitive, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPrimitive(int element, QStyleOption* option, QPainter* painter, QWidget* widget) const { + + QProxyStyle::drawPrimitive(static_cast(element), option, painter, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawControl(QStyle::ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const override { + if (handle__DrawControl == 0) { + QProxyStyle::drawControl(element, option, painter, widget); + return; + } + + QStyle::ControlElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QPainter* sigval3 = painter; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QProxyStyle_DrawControl(const_cast(this), handle__DrawControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawControl(int element, QStyleOption* option, QPainter* painter, QWidget* widget) const { + + QProxyStyle::drawControl(static_cast(element), option, painter, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual void drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex* option, QPainter* painter, const QWidget* widget) const override { + if (handle__DrawComplexControl == 0) { + QProxyStyle::drawComplexControl(control, option, painter, widget); + return; + } + + QStyle::ComplexControl control_ret = control; + int sigval1 = static_cast(control_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) option; + QPainter* sigval3 = painter; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QProxyStyle_DrawComplexControl(const_cast(this), handle__DrawComplexControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawComplexControl(int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) const { + + QProxyStyle::drawComplexControl(static_cast(control), option, painter, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemText = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const override { + if (handle__DrawItemText == 0) { + QProxyStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = flags; + const QPalette& pal_ret = pal; + // Cast returned reference into pointer + QPalette* sigval4 = const_cast(&pal_ret); + bool sigval5 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval6 = text_ms; + QPalette::ColorRole textRole_ret = textRole; + int sigval7 = static_cast(textRole_ret); + + miqt_exec_callback_QProxyStyle_DrawItemText(const_cast(this), handle__DrawItemText, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6, sigval7); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemText(QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + QProxyStyle::drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawItemPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const override { + if (handle__DrawItemPixmap == 0) { + QProxyStyle::drawItemPixmap(painter, rect, alignment, pixmap); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + int sigval3 = alignment; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval4 = const_cast(&pixmap_ret); + + miqt_exec_callback_QProxyStyle_DrawItemPixmap(const_cast(this), handle__DrawItemPixmap, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawItemPixmap(QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) const { + + QProxyStyle::drawItemPixmap(painter, *rect, static_cast(alignment), *pixmap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeFromContents = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeFromContents(QStyle::ContentsType typeVal, const QStyleOption* option, const QSize& size, const QWidget* widget) const override { + if (handle__SizeFromContents == 0) { + return QProxyStyle::sizeFromContents(typeVal, option, size, widget); + } + + QStyle::ContentsType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval3 = const_cast(&size_ret); + QWidget* sigval4 = (QWidget*) widget; + + QSize* callback_return_value = miqt_exec_callback_QProxyStyle_SizeFromContents(const_cast(this), handle__SizeFromContents, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeFromContents(int typeVal, QStyleOption* option, QSize* size, QWidget* widget) const { + + return new QSize(QProxyStyle::sizeFromContents(static_cast(typeVal), option, *size, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubElementRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subElementRect(QStyle::SubElement element, const QStyleOption* option, const QWidget* widget) const override { + if (handle__SubElementRect == 0) { + return QProxyStyle::subElementRect(element, option, widget); + } + + QStyle::SubElement element_ret = element; + int sigval1 = static_cast(element_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_SubElementRect(const_cast(this), handle__SubElementRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubElementRect(int element, QStyleOption* option, QWidget* widget) const { + + return new QRect(QProxyStyle::subElementRect(static_cast(element), option, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubControlRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* widget) const override { + if (handle__SubControlRect == 0) { + return QProxyStyle::subControlRect(cc, opt, sc, widget); + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QStyle::SubControl sc_ret = sc; + int sigval3 = static_cast(sc_ret); + QWidget* sigval4 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_SubControlRect(const_cast(this), handle__SubControlRect, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_SubControlRect(int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) const { + + return new QRect(QProxyStyle::subControlRect(static_cast(cc), opt, static_cast(sc), widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemTextRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemTextRect(const QFontMetrics& fm, const QRect& r, int flags, bool enabled, const QString& text) const override { + if (handle__ItemTextRect == 0) { + return QProxyStyle::itemTextRect(fm, r, flags, enabled, text); + } + + const QFontMetrics& fm_ret = fm; + // Cast returned reference into pointer + QFontMetrics* sigval1 = const_cast(&fm_ret); + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&r_ret); + int sigval3 = flags; + bool sigval4 = enabled; + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval5 = text_ms; + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_ItemTextRect(const_cast(this), handle__ItemTextRect, sigval1, sigval2, sigval3, sigval4, sigval5); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemTextRect(QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return new QRect(QProxyStyle::itemTextRect(*fm, *r, static_cast(flags), enabled, text_QString)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemPixmapRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const override { + if (handle__ItemPixmapRect == 0) { + return QProxyStyle::itemPixmapRect(r, flags, pixmap); + } + + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&r_ret); + int sigval2 = flags; + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval3 = const_cast(&pixmap_ret); + + QRect* callback_return_value = miqt_exec_callback_QProxyStyle_ItemPixmapRect(const_cast(this), handle__ItemPixmapRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_ItemPixmapRect(QRect* r, int flags, QPixmap* pixmap) const { + + return new QRect(QProxyStyle::itemPixmapRect(*r, static_cast(flags), *pixmap)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTestComplexControl = 0; + + // Subclass to allow providing a Go implementation + virtual QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex* option, const QPoint& pos, const QWidget* widget) const override { + if (handle__HitTestComplexControl == 0) { + return QProxyStyle::hitTestComplexControl(control, option, pos, widget); + } + + QStyle::ComplexControl control_ret = control; + int sigval1 = static_cast(control_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) option; + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval3 = const_cast(&pos_ret); + QWidget* sigval4 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QProxyStyle_HitTestComplexControl(const_cast(this), handle__HitTestComplexControl, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HitTestComplexControl(int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) const { + + QStyle::SubControl _ret = QProxyStyle::hitTestComplexControl(static_cast(control), option, *pos, widget); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleHint = 0; + + // Subclass to allow providing a Go implementation + virtual int styleHint(QStyle::StyleHint hint, const QStyleOption* option, const QWidget* widget, QStyleHintReturn* returnData) const override { + if (handle__StyleHint == 0) { + return QProxyStyle::styleHint(hint, option, widget, returnData); + } + + QStyle::StyleHint hint_ret = hint; + int sigval1 = static_cast(hint_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + QStyleHintReturn* sigval4 = returnData; + + int callback_return_value = miqt_exec_callback_QProxyStyle_StyleHint(const_cast(this), handle__StyleHint, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleHint(int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) const { + + return QProxyStyle::styleHint(static_cast(hint), option, widget, returnData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PixelMetric = 0; + + // Subclass to allow providing a Go implementation + virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override { + if (handle__PixelMetric == 0) { + return QProxyStyle::pixelMetric(metric, option, widget); + } + + QStyle::PixelMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QProxyStyle_PixelMetric(const_cast(this), handle__PixelMetric, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PixelMetric(int metric, QStyleOption* option, QWidget* widget) const { + + return QProxyStyle::pixelMetric(static_cast(metric), option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LayoutSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const override { + if (handle__LayoutSpacing == 0) { + return QProxyStyle::layoutSpacing(control1, control2, orientation, option, widget); + } + + QSizePolicy::ControlType control1_ret = control1; + int sigval1 = static_cast(control1_ret); + QSizePolicy::ControlType control2_ret = control2; + int sigval2 = static_cast(control2_ret); + Qt::Orientation orientation_ret = orientation; + int sigval3 = static_cast(orientation_ret); + QStyleOption* sigval4 = (QStyleOption*) option; + QWidget* sigval5 = (QWidget*) widget; + + int callback_return_value = miqt_exec_callback_QProxyStyle_LayoutSpacing(const_cast(this), handle__LayoutSpacing, sigval1, sigval2, sigval3, sigval4, sigval5); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LayoutSpacing(int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) const { + + return QProxyStyle::layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardIcon = 0; + + // Subclass to allow providing a Go implementation + virtual QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* option, const QWidget* widget) const override { + if (handle__StandardIcon == 0) { + return QProxyStyle::standardIcon(standardIcon, option, widget); + } + + QStyle::StandardPixmap standardIcon_ret = standardIcon; + int sigval1 = static_cast(standardIcon_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + QIcon* callback_return_value = miqt_exec_callback_QProxyStyle_StandardIcon(const_cast(this), handle__StandardIcon, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QIcon* virtualbase_StandardIcon(int standardIcon, QStyleOption* option, QWidget* widget) const { + + return new QIcon(QProxyStyle::standardIcon(static_cast(standardIcon), option, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt, const QWidget* widget) const override { + if (handle__StandardPixmap == 0) { + return QProxyStyle::standardPixmap(standardPixmap, opt, widget); + } + + QStyle::StandardPixmap standardPixmap_ret = standardPixmap; + int sigval1 = static_cast(standardPixmap_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + + QPixmap* callback_return_value = miqt_exec_callback_QProxyStyle_StandardPixmap(const_cast(this), handle__StandardPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_StandardPixmap(int standardPixmap, QStyleOption* opt, QWidget* widget) const { + + return new QPixmap(QProxyStyle::standardPixmap(static_cast(standardPixmap), opt, widget)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GeneratedIconPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const override { + if (handle__GeneratedIconPixmap == 0) { + return QProxyStyle::generatedIconPixmap(iconMode, pixmap, opt); + } + + QIcon::Mode iconMode_ret = iconMode; + int sigval1 = static_cast(iconMode_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pixmap_ret); + QStyleOption* sigval3 = (QStyleOption*) opt; + + QPixmap* callback_return_value = miqt_exec_callback_QProxyStyle_GeneratedIconPixmap(const_cast(this), handle__GeneratedIconPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_GeneratedIconPixmap(int iconMode, QPixmap* pixmap, QStyleOption* opt) const { + + return new QPixmap(QProxyStyle::generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StandardPalette = 0; + + // Subclass to allow providing a Go implementation + virtual QPalette standardPalette() const override { + if (handle__StandardPalette == 0) { + return QProxyStyle::standardPalette(); + } + + + QPalette* callback_return_value = miqt_exec_callback_QProxyStyle_StandardPalette(const_cast(this), handle__StandardPalette); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPalette* virtualbase_StandardPalette() const { + + return new QPalette(QProxyStyle::standardPalette()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Polish = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QWidget* widget) override { + if (handle__Polish == 0) { + QProxyStyle::polish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QProxyStyle_Polish(this, handle__Polish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Polish(QWidget* widget) { + + QProxyStyle::polish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithPal = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QPalette& pal) override { + if (handle__PolishWithPal == 0) { + QProxyStyle::polish(pal); + return; + } + + QPalette& pal_ret = pal; + // Cast returned reference into pointer + QPalette* sigval1 = &pal_ret; + + miqt_exec_callback_QProxyStyle_PolishWithPal(this, handle__PolishWithPal, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithPal(QPalette* pal) { + + QProxyStyle::polish(*pal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithApp = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QApplication* app) override { + if (handle__PolishWithApp == 0) { + QProxyStyle::polish(app); + return; + } + + QApplication* sigval1 = app; + + miqt_exec_callback_QProxyStyle_PolishWithApp(this, handle__PolishWithApp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithApp(QApplication* app) { + + QProxyStyle::polish(app); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unpolish = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QWidget* widget) override { + if (handle__Unpolish == 0) { + QProxyStyle::unpolish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QProxyStyle_Unpolish(this, handle__Unpolish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unpolish(QWidget* widget) { + + QProxyStyle::unpolish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnpolishWithApp = 0; + + // Subclass to allow providing a Go implementation + virtual void unpolish(QApplication* app) override { + if (handle__UnpolishWithApp == 0) { + QProxyStyle::unpolish(app); + return; + } + + QApplication* sigval1 = app; + + miqt_exec_callback_QProxyStyle_UnpolishWithApp(this, handle__UnpolishWithApp, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UnpolishWithApp(QApplication* app) { + + QProxyStyle::unpolish(app); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QProxyStyle::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QProxyStyle_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QProxyStyle::event(e); + + } + +}; + +void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(); + *outptr_QProxyStyle = ret; + *outptr_QCommonStyle = static_cast(ret); + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QProxyStyle* QProxyStyle_new2(struct miqt_string key) { +void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QProxyStyle(key_QString); + MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(key_QString); + *outptr_QProxyStyle = ret; + *outptr_QCommonStyle = static_cast(ret); + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QProxyStyle* QProxyStyle_new3(QStyle* style) { - return new QProxyStyle(style); +void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(style); + *outptr_QProxyStyle = ret; + *outptr_QCommonStyle = static_cast(ret); + *outptr_QStyle = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self) { @@ -61,21 +756,21 @@ void QProxyStyle_SetBaseStyle(QProxyStyle* self, QStyle* style) { self->setBaseStyle(style); } -void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter) { - self->drawPrimitive(static_cast(element), option, painter); +void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + self->drawPrimitive(static_cast(element), option, painter, widget); } -void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter) { - self->drawControl(static_cast(element), option, painter); +void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + self->drawControl(static_cast(element), option, painter, widget); } -void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter) { - self->drawComplexControl(static_cast(control), option, painter); +void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { + self->drawComplexControl(static_cast(control), option, painter, widget); } -void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text) { +void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString); + self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } void QProxyStyle_DrawItemPixmap(const QProxyStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { @@ -103,29 +798,29 @@ QRect* QProxyStyle_ItemPixmapRect(const QProxyStyle* self, QRect* r, int flags, return new QRect(self->itemPixmapRect(*r, static_cast(flags), *pixmap)); } -int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos); +int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { + QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos, widget); return static_cast(_ret); } -int QProxyStyle_StyleHint(const QProxyStyle* self, int hint) { - return self->styleHint(static_cast(hint)); +int QProxyStyle_StyleHint(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { + return self->styleHint(static_cast(hint), option, widget, returnData); } -int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric) { - return self->pixelMetric(static_cast(metric)); +int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget) { + return self->pixelMetric(static_cast(metric), option, widget); } -int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); +int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } -QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon) { - return new QIcon(self->standardIcon(static_cast(standardIcon))); +QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { + return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } -QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); +QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { + return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } QPixmap* QProxyStyle_GeneratedIconPixmap(const QProxyStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { @@ -178,69 +873,203 @@ struct miqt_string QProxyStyle_Tr3(const char* s, const char* c, int n) { return _ms; } -void QProxyStyle_DrawPrimitive4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { - self->drawPrimitive(static_cast(element), option, painter, widget); +void QProxyStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawPrimitive = slot; } -void QProxyStyle_DrawControl4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { - self->drawControl(static_cast(element), option, painter, widget); +void QProxyStyle_virtualbase_DrawPrimitive(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawPrimitive(element, option, painter, widget); } -void QProxyStyle_DrawComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { - self->drawComplexControl(static_cast(control), option, painter, widget); +void QProxyStyle_override_virtual_DrawControl(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawControl = slot; } -void QProxyStyle_DrawItemText7(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); +void QProxyStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawControl(element, option, painter, widget); } -int QProxyStyle_HitTestComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos, widget); - return static_cast(_ret); +void QProxyStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawComplexControl = slot; } -int QProxyStyle_StyleHint2(const QProxyStyle* self, int hint, QStyleOption* option) { - return self->styleHint(static_cast(hint), option); +void QProxyStyle_virtualbase_DrawComplexControl(const void* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawComplexControl(control, option, painter, widget); } -int QProxyStyle_StyleHint3(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget) { - return self->styleHint(static_cast(hint), option, widget); +void QProxyStyle_override_virtual_DrawItemText(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawItemText = slot; } -int QProxyStyle_StyleHint4(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { - return self->styleHint(static_cast(hint), option, widget, returnData); +void QProxyStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawItemText(painter, rect, flags, pal, enabled, text, textRole); } -int QProxyStyle_PixelMetric2(const QProxyStyle* self, int metric, QStyleOption* option) { - return self->pixelMetric(static_cast(metric), option); +void QProxyStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__DrawItemPixmap = slot; } -int QProxyStyle_PixelMetric3(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget) { - return self->pixelMetric(static_cast(metric), option, widget); +void QProxyStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { + ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_DrawItemPixmap(painter, rect, alignment, pixmap); } -int QProxyStyle_LayoutSpacing4(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); +void QProxyStyle_override_virtual_SizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__SizeFromContents = slot; } -int QProxyStyle_LayoutSpacing5(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); +QSize* QProxyStyle_virtualbase_SizeFromContents(const void* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_SizeFromContents(typeVal, option, size, widget); } -QIcon* QProxyStyle_StandardIcon2(const QProxyStyle* self, int standardIcon, QStyleOption* option) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option)); +void QProxyStyle_override_virtual_SubElementRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__SubElementRect = slot; } -QIcon* QProxyStyle_StandardIcon3(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); +QRect* QProxyStyle_virtualbase_SubElementRect(const void* self, int element, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_SubElementRect(element, option, widget); } -QPixmap* QProxyStyle_StandardPixmap3(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); +void QProxyStyle_override_virtual_SubControlRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__SubControlRect = slot; +} + +QRect* QProxyStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_SubControlRect(cc, opt, sc, widget); +} + +void QProxyStyle_override_virtual_ItemTextRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__ItemTextRect = slot; +} + +QRect* QProxyStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_ItemTextRect(fm, r, flags, enabled, text); +} + +void QProxyStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__ItemPixmapRect = slot; +} + +QRect* QProxyStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_ItemPixmapRect(r, flags, pixmap); +} + +void QProxyStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__HitTestComplexControl = slot; +} + +int QProxyStyle_virtualbase_HitTestComplexControl(const void* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_HitTestComplexControl(control, option, pos, widget); +} + +void QProxyStyle_override_virtual_StyleHint(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StyleHint = slot; +} + +int QProxyStyle_virtualbase_StyleHint(const void* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StyleHint(hint, option, widget, returnData); +} + +void QProxyStyle_override_virtual_PixelMetric(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__PixelMetric = slot; +} + +int QProxyStyle_virtualbase_PixelMetric(const void* self, int metric, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_PixelMetric(metric, option, widget); +} + +void QProxyStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__LayoutSpacing = slot; +} + +int QProxyStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_LayoutSpacing(control1, control2, orientation, option, widget); +} + +void QProxyStyle_override_virtual_StandardIcon(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StandardIcon = slot; +} + +QIcon* QProxyStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* option, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StandardIcon(standardIcon, option, widget); +} + +void QProxyStyle_override_virtual_StandardPixmap(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StandardPixmap = slot; +} + +QPixmap* QProxyStyle_virtualbase_StandardPixmap(const void* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StandardPixmap(standardPixmap, opt, widget); +} + +void QProxyStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__GeneratedIconPixmap = slot; +} + +QPixmap* QProxyStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_GeneratedIconPixmap(iconMode, pixmap, opt); +} + +void QProxyStyle_override_virtual_StandardPalette(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__StandardPalette = slot; +} + +QPalette* QProxyStyle_virtualbase_StandardPalette(const void* self) { + return ( (const MiqtVirtualQProxyStyle*)(self) )->virtualbase_StandardPalette(); +} + +void QProxyStyle_override_virtual_Polish(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__Polish = slot; +} + +void QProxyStyle_virtualbase_Polish(void* self, QWidget* widget) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_Polish(widget); +} + +void QProxyStyle_override_virtual_PolishWithPal(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__PolishWithPal = slot; +} + +void QProxyStyle_virtualbase_PolishWithPal(void* self, QPalette* pal) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_PolishWithPal(pal); +} + +void QProxyStyle_override_virtual_PolishWithApp(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__PolishWithApp = slot; +} + +void QProxyStyle_virtualbase_PolishWithApp(void* self, QApplication* app) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_PolishWithApp(app); +} + +void QProxyStyle_override_virtual_Unpolish(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__Unpolish = slot; +} + +void QProxyStyle_virtualbase_Unpolish(void* self, QWidget* widget) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_Unpolish(widget); +} + +void QProxyStyle_override_virtual_UnpolishWithApp(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__UnpolishWithApp = slot; +} + +void QProxyStyle_virtualbase_UnpolishWithApp(void* self, QApplication* app) { + ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_UnpolishWithApp(app); +} + +void QProxyStyle_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QProxyStyle*)(self) )->handle__Event = slot; +} + +bool QProxyStyle_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQProxyStyle*)(self) )->virtualbase_Event(e); } -void QProxyStyle_Delete(QProxyStyle* self) { - delete self; +void QProxyStyle_Delete(QProxyStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qproxystyle.go b/qt6/gen_qproxystyle.go index 54fb8e61..7ac4e228 100644 --- a/qt6/gen_qproxystyle.go +++ b/qt6/gen_qproxystyle.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QProxyStyle struct { - h *C.QProxyStyle + h *C.QProxyStyle + isSubclass bool *QCommonStyle } @@ -32,21 +34,36 @@ func (this *QProxyStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQProxyStyle(h *C.QProxyStyle) *QProxyStyle { +// newQProxyStyle constructs the type using only CGO pointers. +func newQProxyStyle(h *C.QProxyStyle, h_QCommonStyle *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QProxyStyle { if h == nil { return nil } - return &QProxyStyle{h: h, QCommonStyle: UnsafeNewQCommonStyle(unsafe.Pointer(h))} + return &QProxyStyle{h: h, + QCommonStyle: newQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} } -func UnsafeNewQProxyStyle(h unsafe.Pointer) *QProxyStyle { - return newQProxyStyle((*C.QProxyStyle)(h)) +// UnsafeNewQProxyStyle constructs the type using only unsafe pointers. +func UnsafeNewQProxyStyle(h unsafe.Pointer, h_QCommonStyle unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QProxyStyle { + if h == nil { + return nil + } + + return &QProxyStyle{h: (*C.QProxyStyle)(h), + QCommonStyle: UnsafeNewQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} } // NewQProxyStyle constructs a new QProxyStyle object. func NewQProxyStyle() *QProxyStyle { - ret := C.QProxyStyle_new() - return newQProxyStyle(ret) + var outptr_QProxyStyle *C.QProxyStyle = nil + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QProxyStyle_new(&outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } // NewQProxyStyle2 constructs a new QProxyStyle object. @@ -55,14 +72,28 @@ func NewQProxyStyle2(key string) *QProxyStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QProxyStyle_new2(key_ms) - return newQProxyStyle(ret) + var outptr_QProxyStyle *C.QProxyStyle = nil + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QProxyStyle_new2(key_ms, &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } // NewQProxyStyle3 constructs a new QProxyStyle object. func NewQProxyStyle3(style *QStyle) *QProxyStyle { - ret := C.QProxyStyle_new3(style.cPointer()) - return newQProxyStyle(ret) + var outptr_QProxyStyle *C.QProxyStyle = nil + var outptr_QCommonStyle *C.QCommonStyle = nil + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QProxyStyle_new3(style.cPointer(), &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) + ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QProxyStyle) MetaObject() *QMetaObject { @@ -85,31 +116,31 @@ func QProxyStyle_Tr(s string) string { } func (this *QProxyStyle) BaseStyle() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QProxyStyle_BaseStyle(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QProxyStyle_BaseStyle(this.h)), nil) } func (this *QProxyStyle) SetBaseStyle(style *QStyle) { C.QProxyStyle_SetBaseStyle(this.h, style.cPointer()) } -func (this *QProxyStyle) DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter) { - C.QProxyStyle_DrawPrimitive(this.h, (C.int)(element), option.cPointer(), painter.cPointer()) +func (this *QProxyStyle) DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + C.QProxyStyle_DrawPrimitive(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) } -func (this *QProxyStyle) DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter) { - C.QProxyStyle_DrawControl(this.h, (C.int)(element), option.cPointer(), painter.cPointer()) +func (this *QProxyStyle) DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + C.QProxyStyle_DrawControl(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) } -func (this *QProxyStyle) DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter) { - C.QProxyStyle_DrawComplexControl(this.h, (C.int)(control), option.cPointer(), painter.cPointer()) +func (this *QProxyStyle) DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) { + C.QProxyStyle_DrawComplexControl(this.h, (C.int)(control), option.cPointer(), painter.cPointer(), widget.cPointer()) } -func (this *QProxyStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string) { +func (this *QProxyStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { text_ms := C.struct_miqt_string{} text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - C.QProxyStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms) + C.QProxyStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) } func (this *QProxyStyle) DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { @@ -155,39 +186,39 @@ func (this *QProxyStyle) ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *Q return _goptr } -func (this *QProxyStyle) HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint) QStyle__SubControl { - return (QStyle__SubControl)(C.QProxyStyle_HitTestComplexControl(this.h, (C.int)(control), option.cPointer(), pos.cPointer())) +func (this *QProxyStyle) HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl { + return (QStyle__SubControl)(C.QProxyStyle_HitTestComplexControl(this.h, (C.int)(control), option.cPointer(), pos.cPointer(), widget.cPointer())) } -func (this *QProxyStyle) StyleHint(hint QStyle__StyleHint) int { - return (int)(C.QProxyStyle_StyleHint(this.h, (C.int)(hint))) +func (this *QProxyStyle) StyleHint(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { + return (int)(C.QProxyStyle_StyleHint(this.h, (C.int)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())) } -func (this *QProxyStyle) PixelMetric(metric QStyle__PixelMetric) int { - return (int)(C.QProxyStyle_PixelMetric(this.h, (C.int)(metric))) +func (this *QProxyStyle) PixelMetric(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { + return (int)(C.QProxyStyle_PixelMetric(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) } -func (this *QProxyStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int { - return (int)(C.QProxyStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation))) +func (this *QProxyStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + return (int)(C.QProxyStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } -func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { - _ret := C.QProxyStyle_StandardIcon(this.h, (C.int)(standardIcon)) +func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { + _ret := C.QProxyStyle_StandardIcon(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption) *QPixmap { - _ret := C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer()) - _goptr := newQPixmap(_ret) +func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + _ret := C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QProxyStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { _ret := C.QProxyStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -241,82 +272,699 @@ func QProxyStyle_Tr3(s string, c string, n int) string { return _ret } -func (this *QProxyStyle) DrawPrimitive4(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) { - C.QProxyStyle_DrawPrimitive4(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) +func (this *QProxyStyle) callVirtualBase_DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + + C.QProxyStyle_virtualbase_DrawPrimitive(unsafe.Pointer(this.h), (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) + +} +func (this *QProxyStyle) OnDrawPrimitive(slot func(super func(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget)) { + C.QProxyStyle_override_virtual_DrawPrimitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_DrawPrimitive +func miqt_exec_callback_QProxyStyle_DrawPrimitive(self *C.QProxyStyle, cb C.intptr_t, element C.int, option *C.QStyleOption, painter *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PrimitiveElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QProxyStyle) callVirtualBase_DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) { + + C.QProxyStyle_virtualbase_DrawControl(unsafe.Pointer(this.h), (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) + +} +func (this *QProxyStyle) OnDrawControl(slot func(super func(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget)) { + C.QProxyStyle_override_virtual_DrawControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) DrawControl4(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) { - C.QProxyStyle_DrawControl4(this.h, (C.int)(element), option.cPointer(), painter.cPointer(), widget.cPointer()) +//export miqt_exec_callback_QProxyStyle_DrawControl +func miqt_exec_callback_QProxyStyle_DrawControl(self *C.QProxyStyle, cb C.intptr_t, element C.int, option *C.QStyleOption, painter *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget), element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ControlElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) + } -func (this *QProxyStyle) DrawComplexControl4(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) { - C.QProxyStyle_DrawComplexControl4(this.h, (C.int)(control), option.cPointer(), painter.cPointer(), widget.cPointer()) +func (this *QProxyStyle) callVirtualBase_DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) { + + C.QProxyStyle_virtualbase_DrawComplexControl(unsafe.Pointer(this.h), (C.int)(control), option.cPointer(), painter.cPointer(), widget.cPointer()) + } +func (this *QProxyStyle) OnDrawComplexControl(slot func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget), control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget)) { + C.QProxyStyle_override_virtual_DrawComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_DrawComplexControl +func miqt_exec_callback_QProxyStyle_DrawComplexControl(self *C.QProxyStyle, cb C.intptr_t, control C.int, option *C.QStyleOptionComplex, painter *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget), control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(control) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) -func (this *QProxyStyle) DrawItemText7(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QProxyStyle) callVirtualBase_DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { text_ms := C.struct_miqt_string{} text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - C.QProxyStyle_DrawItemText7(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) + + C.QProxyStyle_virtualbase_DrawItemText(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) + +} +func (this *QProxyStyle) OnDrawItemText(slot func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) { + C.QProxyStyle_override_virtual_DrawItemText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) HitTestComplexControl4(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl { - return (QStyle__SubControl)(C.QProxyStyle_HitTestComplexControl4(this.h, (C.int)(control), option.cPointer(), pos.cPointer(), widget.cPointer())) +//export miqt_exec_callback_QProxyStyle_DrawItemText +func miqt_exec_callback_QProxyStyle_DrawItemText(self *C.QProxyStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, flags C.int, pal *C.QPalette, enabled C.bool, text C.struct_miqt_string, textRole C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole), painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(flags) + + slotval4 := UnsafeNewQPalette(unsafe.Pointer(pal)) + slotval5 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval6 := text_ret + slotval7 := (QPalette__ColorRole)(textRole) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawItemText, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7) + } -func (this *QProxyStyle) StyleHint2(hint QStyle__StyleHint, option *QStyleOption) int { - return (int)(C.QProxyStyle_StyleHint2(this.h, (C.int)(hint), option.cPointer())) +func (this *QProxyStyle) callVirtualBase_DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { + + C.QProxyStyle_virtualbase_DrawItemPixmap(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer()) + } +func (this *QProxyStyle) OnDrawItemPixmap(slot func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) { + C.QProxyStyle_override_virtual_DrawItemPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_DrawItemPixmap +func miqt_exec_callback_QProxyStyle_DrawItemPixmap(self *C.QProxyStyle, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, alignment C.int, pixmap *C.QPixmap) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := (int)(alignment) + + slotval4 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QProxyStyle) callVirtualBase_SizeFromContents(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize { + + _ret := C.QProxyStyle_virtualbase_SizeFromContents(unsafe.Pointer(this.h), (C.int)(typeVal), option.cPointer(), size.cPointer(), widget.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnSizeFromContents(slot func(super func(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize, typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize) { + C.QProxyStyle_override_virtual_SizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_SizeFromContents +func miqt_exec_callback_QProxyStyle_SizeFromContents(self *C.QProxyStyle, cb C.intptr_t, typeVal C.int, option *C.QStyleOption, size *C.QSize, widget *C.QWidget) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize, typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ContentsType)(typeVal) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_SubElementRect(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect { + + _ret := C.QProxyStyle_virtualbase_SubElementRect(unsafe.Pointer(this.h), (C.int)(element), option.cPointer(), widget.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr -func (this *QProxyStyle) StyleHint3(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget) int { - return (int)(C.QProxyStyle_StyleHint3(this.h, (C.int)(hint), option.cPointer(), widget.cPointer())) } +func (this *QProxyStyle) OnSubElementRect(slot func(super func(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect, element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect) { + C.QProxyStyle_override_virtual_SubElementRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_SubElementRect +func miqt_exec_callback_QProxyStyle_SubElementRect(self *C.QProxyStyle, cb C.intptr_t, element C.int, option *C.QStyleOption, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect, element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__SubElement)(element) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() -func (this *QProxyStyle) StyleHint4(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { - return (int)(C.QProxyStyle_StyleHint4(this.h, (C.int)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())) } -func (this *QProxyStyle) PixelMetric2(metric QStyle__PixelMetric, option *QStyleOption) int { - return (int)(C.QProxyStyle_PixelMetric2(this.h, (C.int)(metric), option.cPointer())) +func (this *QProxyStyle) callVirtualBase_SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect { + + _ret := C.QProxyStyle_virtualbase_SubControlRect(unsafe.Pointer(this.h), (C.int)(cc), opt.cPointer(), (C.int)(sc), widget.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnSubControlRect(slot func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect) { + C.QProxyStyle_override_virtual_SubControlRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) PixelMetric3(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { - return (int)(C.QProxyStyle_PixelMetric3(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) +//export miqt_exec_callback_QProxyStyle_SubControlRect +func miqt_exec_callback_QProxyStyle_SubControlRect(self *C.QProxyStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, sc C.int, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect, cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := (QStyle__SubControl)(sc) + + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + } -func (this *QProxyStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { - return (int)(C.QProxyStyle_LayoutSpacing4(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer())) +func (this *QProxyStyle) callVirtualBase_ItemTextRect(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + _ret := C.QProxyStyle_virtualbase_ItemTextRect(unsafe.Pointer(this.h), fm.cPointer(), r.cPointer(), (C.int)(flags), (C.bool)(enabled), text_ms) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnItemTextRect(slot func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) { + C.QProxyStyle_override_virtual_ItemTextRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { - return (int)(C.QProxyStyle_LayoutSpacing5(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) +//export miqt_exec_callback_QProxyStyle_ItemTextRect +func miqt_exec_callback_QProxyStyle_ItemTextRect(self *C.QProxyStyle, cb C.intptr_t, fm *C.QFontMetrics, r *C.QRect, flags C.int, enabled C.bool, text C.struct_miqt_string) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect, fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFontMetrics(unsafe.Pointer(fm)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval3 := (int)(flags) + + slotval4 := (bool)(enabled) + + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval5 := text_ret + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_ItemTextRect, slotval1, slotval2, slotval3, slotval4, slotval5) + + return virtualReturn.cPointer() + } -func (this *QProxyStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, option *QStyleOption) *QIcon { - _ret := C.QProxyStyle_StandardIcon2(this.h, (C.int)(standardIcon), option.cPointer()) - _goptr := newQIcon(_ret) +func (this *QProxyStyle) callVirtualBase_ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect { + + _ret := C.QProxyStyle_virtualbase_ItemPixmapRect(unsafe.Pointer(this.h), r.cPointer(), (C.int)(flags), pixmap.cPointer()) + _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QProxyStyle) OnItemPixmapRect(slot func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) { + C.QProxyStyle_override_virtual_ItemPixmapRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_ItemPixmapRect +func miqt_exec_callback_QProxyStyle_ItemPixmapRect(self *C.QProxyStyle, cb C.intptr_t, r *C.QRect, flags C.int, pixmap *C.QPixmap) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(r)) + slotval2 := (int)(flags) + + slotval3 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl { + + return (QStyle__SubControl)(C.QProxyStyle_virtualbase_HitTestComplexControl(unsafe.Pointer(this.h), (C.int)(control), option.cPointer(), pos.cPointer(), widget.cPointer())) + +} +func (this *QProxyStyle) OnHitTestComplexControl(slot func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl, control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl) { + C.QProxyStyle_override_virtual_HitTestComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { - _ret := C.QProxyStyle_StandardIcon3(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) +//export miqt_exec_callback_QProxyStyle_HitTestComplexControl +func miqt_exec_callback_QProxyStyle_HitTestComplexControl(self *C.QProxyStyle, cb C.intptr_t, control C.int, option *C.QStyleOptionComplex, pos *C.QPoint, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl, control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__ComplexControl)(control) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQPoint(unsafe.Pointer(pos)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_StyleHint(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { + + return (int)(C.QProxyStyle_virtualbase_StyleHint(unsafe.Pointer(this.h), (C.int)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())) + +} +func (this *QProxyStyle) OnStyleHint(slot func(super func(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int, hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int) { + C.QProxyStyle_override_virtual_StyleHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_StyleHint +func miqt_exec_callback_QProxyStyle_StyleHint(self *C.QProxyStyle, cb C.intptr_t, hint C.int, option *C.QStyleOption, widget *C.QWidget, returnData *C.QStyleHintReturn) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int, hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StyleHint)(hint) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval4 := UnsafeNewQStyleHintReturn(unsafe.Pointer(returnData)) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StyleHint, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_PixelMetric(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { + + return (int)(C.QProxyStyle_virtualbase_PixelMetric(unsafe.Pointer(this.h), (C.int)(metric), option.cPointer(), widget.cPointer())) + +} +func (this *QProxyStyle) OnPixelMetric(slot func(super func(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int, metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int) { + C.QProxyStyle_override_virtual_PixelMetric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_PixelMetric +func miqt_exec_callback_QProxyStyle_PixelMetric(self *C.QProxyStyle, cb C.intptr_t, metric C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int, metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__PixelMetric)(metric) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + + return (int)(C.QProxyStyle_virtualbase_LayoutSpacing(unsafe.Pointer(this.h), (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) + +} +func (this *QProxyStyle) OnLayoutSpacing(slot func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) { + C.QProxyStyle_override_virtual_LayoutSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_LayoutSpacing +func miqt_exec_callback_QProxyStyle_LayoutSpacing(self *C.QProxyStyle, cb C.intptr_t, control1 C.int, control2 C.int, orientation C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int, control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QSizePolicy__ControlType)(control1) + + slotval2 := (QSizePolicy__ControlType)(control2) + + slotval3 := (Orientation)(orientation) + + slotval4 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval5 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.int)(virtualReturn) + +} + +func (this *QProxyStyle) callVirtualBase_StandardIcon(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { + + _ret := C.QProxyStyle_virtualbase_StandardIcon(unsafe.Pointer(this.h), (C.int)(standardIcon), option.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QProxyStyle) OnStandardIcon(slot func(super func(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon) { + C.QProxyStyle_override_virtual_StandardIcon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QProxyStyle) StandardPixmap3(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _ret := C.QProxyStyle_StandardPixmap3(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) - _goptr := newQPixmap(_ret) +//export miqt_exec_callback_QProxyStyle_StandardIcon +func miqt_exec_callback_QProxyStyle_StandardIcon(self *C.QProxyStyle, cb C.intptr_t, standardIcon C.int, option *C.QStyleOption, widget *C.QWidget) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon, standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(standardIcon) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + + _ret := C.QProxyStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QProxyStyle) OnStandardPixmap(slot func(super func(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) { + C.QProxyStyle_override_virtual_StandardPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_StandardPixmap +func miqt_exec_callback_QProxyStyle_StandardPixmap(self *C.QProxyStyle, cb C.intptr_t, standardPixmap C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap, standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QStyle__StandardPixmap)(standardPixmap) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { + + _ret := C.QProxyStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnGeneratedIconPixmap(slot func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) { + C.QProxyStyle_override_virtual_GeneratedIconPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_GeneratedIconPixmap +func miqt_exec_callback_QProxyStyle_GeneratedIconPixmap(self *C.QProxyStyle, cb C.intptr_t, iconMode C.int, pixmap *C.QPixmap, opt *C.QStyleOption) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap, iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIcon__Mode)(iconMode) + + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval3 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_GeneratedIconPixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_StandardPalette() *QPalette { + + _ret := C.QProxyStyle_virtualbase_StandardPalette(unsafe.Pointer(this.h)) + _goptr := newQPalette(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QProxyStyle) OnStandardPalette(slot func(super func() *QPalette) *QPalette) { + C.QProxyStyle_override_virtual_StandardPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_StandardPalette +func miqt_exec_callback_QProxyStyle_StandardPalette(self *C.QProxyStyle, cb C.intptr_t) *C.QPalette { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPalette) *QPalette) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardPalette) + + return virtualReturn.cPointer() + +} + +func (this *QProxyStyle) callVirtualBase_Polish(widget *QWidget) { + + C.QProxyStyle_virtualbase_Polish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QProxyStyle) OnPolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QProxyStyle_override_virtual_Polish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_Polish +func miqt_exec_callback_QProxyStyle_Polish(self *C.QProxyStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_Polish, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_PolishWithPal(pal *QPalette) { + + C.QProxyStyle_virtualbase_PolishWithPal(unsafe.Pointer(this.h), pal.cPointer()) + +} +func (this *QProxyStyle) OnPolishWithPal(slot func(super func(pal *QPalette), pal *QPalette)) { + C.QProxyStyle_override_virtual_PolishWithPal(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_PolishWithPal +func miqt_exec_callback_QProxyStyle_PolishWithPal(self *C.QProxyStyle, cb C.intptr_t, pal *C.QPalette) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pal *QPalette), pal *QPalette)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPalette(unsafe.Pointer(pal)) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_PolishWithPal, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_PolishWithApp(app *QApplication) { + + C.QProxyStyle_virtualbase_PolishWithApp(unsafe.Pointer(this.h), app.cPointer()) + +} +func (this *QProxyStyle) OnPolishWithApp(slot func(super func(app *QApplication), app *QApplication)) { + C.QProxyStyle_override_virtual_PolishWithApp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_PolishWithApp +func miqt_exec_callback_QProxyStyle_PolishWithApp(self *C.QProxyStyle, cb C.intptr_t, app *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(app *QApplication), app *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(app), nil, nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_Unpolish(widget *QWidget) { + + C.QProxyStyle_virtualbase_Unpolish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QProxyStyle) OnUnpolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QProxyStyle_override_virtual_Unpolish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_Unpolish +func miqt_exec_callback_QProxyStyle_Unpolish(self *C.QProxyStyle, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_Unpolish, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_UnpolishWithApp(app *QApplication) { + + C.QProxyStyle_virtualbase_UnpolishWithApp(unsafe.Pointer(this.h), app.cPointer()) + +} +func (this *QProxyStyle) OnUnpolishWithApp(slot func(super func(app *QApplication), app *QApplication)) { + C.QProxyStyle_override_virtual_UnpolishWithApp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_UnpolishWithApp +func miqt_exec_callback_QProxyStyle_UnpolishWithApp(self *C.QProxyStyle, cb C.intptr_t, app *C.QApplication) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(app *QApplication), app *QApplication)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQApplication(unsafe.Pointer(app), nil, nil, nil) + + gofunc((&QProxyStyle{h: self}).callVirtualBase_UnpolishWithApp, slotval1) + +} + +func (this *QProxyStyle) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QProxyStyle_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QProxyStyle) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QProxyStyle_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QProxyStyle_Event +func miqt_exec_callback_QProxyStyle_Event(self *C.QProxyStyle, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QProxyStyle) Delete() { - C.QProxyStyle_Delete(this.h) + C.QProxyStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qproxystyle.h b/qt6/gen_qproxystyle.h index 5fc76c12..d6bcece9 100644 --- a/qt6/gen_qproxystyle.h +++ b/qt6/gen_qproxystyle.h @@ -16,9 +16,12 @@ extern "C" { #ifdef __cplusplus class QApplication; +class QCommonStyle; +class QEvent; class QFontMetrics; class QIcon; class QMetaObject; +class QObject; class QPainter; class QPalette; class QPixmap; @@ -33,9 +36,12 @@ class QStyleOptionComplex; class QWidget; #else typedef struct QApplication QApplication; +typedef struct QCommonStyle QCommonStyle; +typedef struct QEvent QEvent; typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; @@ -50,30 +56,30 @@ typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -QProxyStyle* QProxyStyle_new(); -QProxyStyle* QProxyStyle_new2(struct miqt_string key); -QProxyStyle* QProxyStyle_new3(QStyle* style); +void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self); void* QProxyStyle_Metacast(QProxyStyle* self, const char* param1); struct miqt_string QProxyStyle_Tr(const char* s); QStyle* QProxyStyle_BaseStyle(const QProxyStyle* self); void QProxyStyle_SetBaseStyle(QProxyStyle* self, QStyle* style); -void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter); -void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter); -void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter); -void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text); +void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget); +void QProxyStyle_DrawItemText(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); void QProxyStyle_DrawItemPixmap(const QProxyStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); QSize* QProxyStyle_SizeFromContents(const QProxyStyle* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget); QRect* QProxyStyle_SubElementRect(const QProxyStyle* self, int element, QStyleOption* option, QWidget* widget); QRect* QProxyStyle_SubControlRect(const QProxyStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); QRect* QProxyStyle_ItemTextRect(const QProxyStyle* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); QRect* QProxyStyle_ItemPixmapRect(const QProxyStyle* self, QRect* r, int flags, QPixmap* pixmap); -int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos); -int QProxyStyle_StyleHint(const QProxyStyle* self, int hint); -int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric); -int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation); -QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon); -QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt); +int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget); +int QProxyStyle_StyleHint(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData); +int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget); +int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); +QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); QPixmap* QProxyStyle_GeneratedIconPixmap(const QProxyStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); QPalette* QProxyStyle_StandardPalette(const QProxyStyle* self); void QProxyStyle_Polish(QProxyStyle* self, QWidget* widget); @@ -81,24 +87,58 @@ void QProxyStyle_PolishWithPal(QProxyStyle* self, QPalette* pal); void QProxyStyle_PolishWithApp(QProxyStyle* self, QApplication* app); void QProxyStyle_Unpolish(QProxyStyle* self, QWidget* widget); void QProxyStyle_UnpolishWithApp(QProxyStyle* self, QApplication* app); +bool QProxyStyle_Event(QProxyStyle* self, QEvent* e); struct miqt_string QProxyStyle_Tr2(const char* s, const char* c); struct miqt_string QProxyStyle_Tr3(const char* s, const char* c, int n); -void QProxyStyle_DrawPrimitive4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); -void QProxyStyle_DrawControl4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); -void QProxyStyle_DrawComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget); -void QProxyStyle_DrawItemText7(const QProxyStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); -int QProxyStyle_HitTestComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget); -int QProxyStyle_StyleHint2(const QProxyStyle* self, int hint, QStyleOption* option); -int QProxyStyle_StyleHint3(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget); -int QProxyStyle_StyleHint4(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData); -int QProxyStyle_PixelMetric2(const QProxyStyle* self, int metric, QStyleOption* option); -int QProxyStyle_PixelMetric3(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget); -int QProxyStyle_LayoutSpacing4(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option); -int QProxyStyle_LayoutSpacing5(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); -QIcon* QProxyStyle_StandardIcon2(const QProxyStyle* self, int standardIcon, QStyleOption* option); -QIcon* QProxyStyle_StandardIcon3(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); -QPixmap* QProxyStyle_StandardPixmap3(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); -void QProxyStyle_Delete(QProxyStyle* self); +void QProxyStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawPrimitive(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_override_virtual_DrawControl(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget); +void QProxyStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawComplexControl(const void* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget); +void QProxyStyle_override_virtual_DrawItemText(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); +void QProxyStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot); +void QProxyStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); +void QProxyStyle_override_virtual_SizeFromContents(void* self, intptr_t slot); +QSize* QProxyStyle_virtualbase_SizeFromContents(const void* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget); +void QProxyStyle_override_virtual_SubElementRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_SubElementRect(const void* self, int element, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_SubControlRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); +void QProxyStyle_override_virtual_ItemTextRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); +void QProxyStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot); +QRect* QProxyStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap); +void QProxyStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot); +int QProxyStyle_virtualbase_HitTestComplexControl(const void* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget); +void QProxyStyle_override_virtual_StyleHint(void* self, intptr_t slot); +int QProxyStyle_virtualbase_StyleHint(const void* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData); +void QProxyStyle_override_virtual_PixelMetric(void* self, intptr_t slot); +int QProxyStyle_virtualbase_PixelMetric(const void* self, int metric, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot); +int QProxyStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_StandardIcon(void* self, intptr_t slot); +QIcon* QProxyStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* option, QWidget* widget); +void QProxyStyle_override_virtual_StandardPixmap(void* self, intptr_t slot); +QPixmap* QProxyStyle_virtualbase_StandardPixmap(const void* self, int standardPixmap, QStyleOption* opt, QWidget* widget); +void QProxyStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot); +QPixmap* QProxyStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); +void QProxyStyle_override_virtual_StandardPalette(void* self, intptr_t slot); +QPalette* QProxyStyle_virtualbase_StandardPalette(const void* self); +void QProxyStyle_override_virtual_Polish(void* self, intptr_t slot); +void QProxyStyle_virtualbase_Polish(void* self, QWidget* widget); +void QProxyStyle_override_virtual_PolishWithPal(void* self, intptr_t slot); +void QProxyStyle_virtualbase_PolishWithPal(void* self, QPalette* pal); +void QProxyStyle_override_virtual_PolishWithApp(void* self, intptr_t slot); +void QProxyStyle_virtualbase_PolishWithApp(void* self, QApplication* app); +void QProxyStyle_override_virtual_Unpolish(void* self, intptr_t slot); +void QProxyStyle_virtualbase_Unpolish(void* self, QWidget* widget); +void QProxyStyle_override_virtual_UnpolishWithApp(void* self, intptr_t slot); +void QProxyStyle_virtualbase_UnpolishWithApp(void* self, QApplication* app); +void QProxyStyle_override_virtual_Event(void* self, intptr_t slot); +bool QProxyStyle_virtualbase_Event(void* self, QEvent* e); +void QProxyStyle_Delete(QProxyStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qpushbutton.cpp b/qt6/gen_qpushbutton.cpp index 101860aa..14bbd7e5 100644 --- a/qt6/gen_qpushbutton.cpp +++ b/qt6/gen_qpushbutton.cpp @@ -1,42 +1,499 @@ +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include #include #include #include "gen_qpushbutton.h" #include "_cgo_export.h" -QPushButton* QPushButton_new(QWidget* parent) { - return new QPushButton(parent); +class MiqtVirtualQPushButton : public virtual QPushButton { +public: + + MiqtVirtualQPushButton(QWidget* parent): QPushButton(parent) {}; + MiqtVirtualQPushButton(): QPushButton() {}; + MiqtVirtualQPushButton(const QString& text): QPushButton(text) {}; + MiqtVirtualQPushButton(const QIcon& icon, const QString& text): QPushButton(icon, text) {}; + MiqtVirtualQPushButton(const QString& text, QWidget* parent): QPushButton(text, parent) {}; + MiqtVirtualQPushButton(const QIcon& icon, const QString& text, QWidget* parent): QPushButton(icon, text, parent) {}; + + virtual ~MiqtVirtualQPushButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPushButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPushButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPushButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPushButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPushButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPushButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QPushButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QPushButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QPushButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QPushButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QPushButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QPushButton::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QPushButton::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QPushButton::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QPushButton::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QPushButton::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QPushButton::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QPushButton::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPushButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QPushButton::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionButton* option) const override { + if (handle__InitStyleOption == 0) { + QPushButton::initStyleOption(option); + return; + } + + QStyleOptionButton* sigval1 = option; + + miqt_exec_callback_QPushButton_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionButton* option) const { + + QPushButton::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QPushButton::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QPushButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QPushButton::hitButton(*pos); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QPushButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QPushButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QPushButton::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QPushButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QPushButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QPushButton::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QPushButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QPushButton::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QPushButton::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QPushButton::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QPushButton::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QPushButton::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QPushButton::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QPushButton::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QPushButton::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QPushButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QPushButton::timerEvent(e); + + } + +}; + +void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(parent); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new2() { - return new QPushButton(); +void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new3(struct miqt_string text) { +void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(text_QString); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text) { +void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(*icon, text_QString); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent) { +void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(text_QString, parent); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString, parent); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent) { +void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QPushButton(*icon, text_QString, parent); + MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString, parent); + *outptr_QPushButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPushButton_MetaObject(const QPushButton* self) { @@ -124,7 +581,147 @@ struct miqt_string QPushButton_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPushButton_Delete(QPushButton* self) { - delete self; +void QPushButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QPushButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_SizeHint(); +} + +void QPushButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPushButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPushButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__Event = slot; +} + +bool QPushButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQPushButton*)(self) )->virtualbase_Event(e); +} + +void QPushButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__PaintEvent = slot; +} + +void QPushButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QPushButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QPushButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QPushButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__FocusInEvent = slot; +} + +void QPushButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QPushButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QPushButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QPushButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QPushButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QPushButton_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__InitStyleOption = slot; +} + +void QPushButton_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* option) { + ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_InitStyleOption(option); +} + +void QPushButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__HitButton = slot; +} + +bool QPushButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQPushButton*)(self) )->virtualbase_HitButton(pos); +} + +void QPushButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__CheckStateSet = slot; +} + +void QPushButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QPushButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__NextCheckState = slot; +} + +void QPushButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_NextCheckState(); +} + +void QPushButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QPushButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QPushButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MousePressEvent = slot; +} + +void QPushButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_MousePressEvent(e); +} + +void QPushButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QPushButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QPushButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__ChangeEvent = slot; +} + +void QPushButton_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_ChangeEvent(e); +} + +void QPushButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPushButton*)(self) )->handle__TimerEvent = slot; +} + +void QPushButton_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQPushButton*)(self) )->virtualbase_TimerEvent(e); +} + +void QPushButton_Delete(QPushButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qpushbutton.go b/qt6/gen_qpushbutton.go index 7f531653..161a0855 100644 --- a/qt6/gen_qpushbutton.go +++ b/qt6/gen_qpushbutton.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QPushButton struct { - h *C.QPushButton + h *C.QPushButton + isSubclass bool *QAbstractButton } @@ -32,27 +34,51 @@ func (this *QPushButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPushButton(h *C.QPushButton) *QPushButton { +// newQPushButton constructs the type using only CGO pointers. +func newQPushButton(h *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPushButton { if h == nil { return nil } - return &QPushButton{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QPushButton{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQPushButton(h unsafe.Pointer) *QPushButton { - return newQPushButton((*C.QPushButton)(h)) +// UnsafeNewQPushButton constructs the type using only unsafe pointers. +func UnsafeNewQPushButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPushButton { + if h == nil { + return nil + } + + return &QPushButton{h: (*C.QPushButton)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPushButton constructs a new QPushButton object. func NewQPushButton(parent *QWidget) *QPushButton { - ret := C.QPushButton_new(parent.cPointer()) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new(parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton2 constructs a new QPushButton object. func NewQPushButton2() *QPushButton { - ret := C.QPushButton_new2() - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new2(&outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton3 constructs a new QPushButton object. @@ -61,8 +87,16 @@ func NewQPushButton3(text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new3(text_ms) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new3(text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton4 constructs a new QPushButton object. @@ -71,8 +105,16 @@ func NewQPushButton4(icon *QIcon, text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new4(icon.cPointer(), text_ms) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new4(icon.cPointer(), text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton5 constructs a new QPushButton object. @@ -81,8 +123,16 @@ func NewQPushButton5(text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new5(text_ms, parent.cPointer()) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new5(text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPushButton6 constructs a new QPushButton object. @@ -91,8 +141,16 @@ func NewQPushButton6(icon *QIcon, text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer()) - return newQPushButton(ret) + var outptr_QPushButton *C.QPushButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPushButton) MetaObject() *QMetaObject { @@ -149,7 +207,7 @@ func (this *QPushButton) SetMenu(menu *QMenu) { } func (this *QPushButton) Menu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QPushButton_Menu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QPushButton_Menu(this.h)), nil, nil, nil) } func (this *QPushButton) SetFlat(flat bool) { @@ -186,9 +244,402 @@ func QPushButton_Tr3(s string, c string, n int) string { return _ret } +func (this *QPushButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QPushButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPushButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QPushButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_SizeHint +func miqt_exec_callback_QPushButton_SizeHint(self *C.QPushButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPushButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QPushButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPushButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QPushButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MinimumSizeHint +func miqt_exec_callback_QPushButton_MinimumSizeHint(self *C.QPushButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QPushButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QPushButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QPushButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QPushButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_Event +func miqt_exec_callback_QPushButton_Event(self *C.QPushButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPushButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QPushButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QPushButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_PaintEvent +func miqt_exec_callback_QPushButton_PaintEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QPushButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QPushButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_KeyPressEvent +func miqt_exec_callback_QPushButton_KeyPressEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QPushButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QPushButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_FocusInEvent +func miqt_exec_callback_QPushButton_FocusInEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QPushButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QPushButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_FocusOutEvent +func miqt_exec_callback_QPushButton_FocusOutEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QPushButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QPushButton) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QPushButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MouseMoveEvent +func miqt_exec_callback_QPushButton_MouseMoveEvent(self *C.QPushButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_InitStyleOption(option *QStyleOptionButton) { + + C.QPushButton_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QPushButton) OnInitStyleOption(slot func(super func(option *QStyleOptionButton), option *QStyleOptionButton)) { + C.QPushButton_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_InitStyleOption +func miqt_exec_callback_QPushButton_InitStyleOption(self *C.QPushButton, cb C.intptr_t, option *C.QStyleOptionButton) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionButton), option *QStyleOptionButton)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionButton(unsafe.Pointer(option), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QPushButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QPushButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QPushButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QPushButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_HitButton +func miqt_exec_callback_QPushButton_HitButton(self *C.QPushButton, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QPushButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPushButton) callVirtualBase_CheckStateSet() { + + C.QPushButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QPushButton) OnCheckStateSet(slot func(super func())) { + C.QPushButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_CheckStateSet +func miqt_exec_callback_QPushButton_CheckStateSet(self *C.QPushButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPushButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QPushButton) callVirtualBase_NextCheckState() { + + C.QPushButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QPushButton) OnNextCheckState(slot func(super func())) { + C.QPushButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_NextCheckState +func miqt_exec_callback_QPushButton_NextCheckState(self *C.QPushButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPushButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QPushButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QPushButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QPushButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_KeyReleaseEvent +func miqt_exec_callback_QPushButton_KeyReleaseEvent(self *C.QPushButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QPushButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPushButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MousePressEvent +func miqt_exec_callback_QPushButton_MousePressEvent(self *C.QPushButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QPushButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QPushButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_MouseReleaseEvent +func miqt_exec_callback_QPushButton_MouseReleaseEvent(self *C.QPushButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QPushButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QPushButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_ChangeEvent +func miqt_exec_callback_QPushButton_ChangeEvent(self *C.QPushButton, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QPushButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPushButton) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QPushButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QPushButton) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QPushButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPushButton_TimerEvent +func miqt_exec_callback_QPushButton_TimerEvent(self *C.QPushButton, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QPushButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QPushButton) Delete() { - C.QPushButton_Delete(this.h) + C.QPushButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qpushbutton.h b/qt6/gen_qpushbutton.h index ac8cab5e..558272c9 100644 --- a/qt6/gen_qpushbutton.h +++ b/qt6/gen_qpushbutton.h @@ -15,27 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; +class QEvent; +class QFocusEvent; class QIcon; +class QKeyEvent; class QMenu; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QPushButton; class QSize; +class QStyleOptionButton; +class QTimerEvent; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QIcon QIcon; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QPushButton QPushButton; typedef struct QSize QSize; +typedef struct QStyleOptionButton QStyleOptionButton; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QPushButton* QPushButton_new(QWidget* parent); -QPushButton* QPushButton_new2(); -QPushButton* QPushButton_new3(struct miqt_string text); -QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text); -QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent); -QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent); +void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPushButton_MetaObject(const QPushButton* self); void* QPushButton_Metacast(QPushButton* self, const char* param1); struct miqt_string QPushButton_Tr(const char* s); @@ -50,9 +72,51 @@ QMenu* QPushButton_Menu(const QPushButton* self); void QPushButton_SetFlat(QPushButton* self, bool flat); bool QPushButton_IsFlat(const QPushButton* self); void QPushButton_ShowMenu(QPushButton* self); +bool QPushButton_Event(QPushButton* self, QEvent* e); +void QPushButton_PaintEvent(QPushButton* self, QPaintEvent* param1); +void QPushButton_KeyPressEvent(QPushButton* self, QKeyEvent* param1); +void QPushButton_FocusInEvent(QPushButton* self, QFocusEvent* param1); +void QPushButton_FocusOutEvent(QPushButton* self, QFocusEvent* param1); +void QPushButton_MouseMoveEvent(QPushButton* self, QMouseEvent* param1); +void QPushButton_InitStyleOption(const QPushButton* self, QStyleOptionButton* option); +bool QPushButton_HitButton(const QPushButton* self, QPoint* pos); struct miqt_string QPushButton_Tr2(const char* s, const char* c); struct miqt_string QPushButton_Tr3(const char* s, const char* c, int n); -void QPushButton_Delete(QPushButton* self); +void QPushButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPushButton_virtualbase_SizeHint(const void* self); +void QPushButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPushButton_virtualbase_MinimumSizeHint(const void* self); +void QPushButton_override_virtual_Event(void* self, intptr_t slot); +bool QPushButton_virtualbase_Event(void* self, QEvent* e); +void QPushButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QPushButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QPushButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QPushButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QPushButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QPushButton_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QPushButton_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* option); +void QPushButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QPushButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QPushButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QPushButton_virtualbase_CheckStateSet(void* self); +void QPushButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QPushButton_virtualbase_NextCheckState(void* self); +void QPushButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QPushButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QPushButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QPushButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_ChangeEvent(void* self, QEvent* e); +void QPushButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPushButton_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QPushButton_Delete(QPushButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qquaternion.cpp b/qt6/gen_qquaternion.cpp index 7eac49c2..162120ff 100644 --- a/qt6/gen_qquaternion.cpp +++ b/qt6/gen_qquaternion.cpp @@ -5,28 +5,34 @@ #include "gen_qquaternion.h" #include "_cgo_export.h" -QQuaternion* QQuaternion_new() { - return new QQuaternion(); +void QQuaternion_new(QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new2(int param1) { - return new QQuaternion(static_cast(param1)); +void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(static_cast(param1)); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos) { - return new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); +void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector) { - return new QQuaternion(static_cast(scalar), *vector); +void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(static_cast(scalar), *vector); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new5(QVector4D* vector) { - return new QQuaternion(*vector); +void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(*vector); + *outptr_QQuaternion = ret; } -QQuaternion* QQuaternion_new6(QQuaternion* param1) { - return new QQuaternion(*param1); +void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion) { + QQuaternion* ret = new QQuaternion(*param1); + *outptr_QQuaternion = ret; } bool QQuaternion_IsNull(const QQuaternion* self) { @@ -203,7 +209,11 @@ QQuaternion* QQuaternion_Nlerp(QQuaternion* q1, QQuaternion* q2, float t) { return new QQuaternion(QQuaternion::nlerp(*q1, *q2, static_cast(t))); } -void QQuaternion_Delete(QQuaternion* self) { - delete self; +void QQuaternion_Delete(QQuaternion* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qquaternion.go b/qt6/gen_qquaternion.go index a9783143..304bb33c 100644 --- a/qt6/gen_qquaternion.go +++ b/qt6/gen_qquaternion.go @@ -14,7 +14,8 @@ import ( ) type QQuaternion struct { - h *C.QQuaternion + h *C.QQuaternion + isSubclass bool } func (this *QQuaternion) cPointer() *C.QQuaternion { @@ -31,6 +32,7 @@ func (this *QQuaternion) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQQuaternion constructs the type using only CGO pointers. func newQQuaternion(h *C.QQuaternion) *QQuaternion { if h == nil { return nil @@ -38,44 +40,73 @@ func newQQuaternion(h *C.QQuaternion) *QQuaternion { return &QQuaternion{h: h} } +// UnsafeNewQQuaternion constructs the type using only unsafe pointers. func UnsafeNewQQuaternion(h unsafe.Pointer) *QQuaternion { - return newQQuaternion((*C.QQuaternion)(h)) + if h == nil { + return nil + } + + return &QQuaternion{h: (*C.QQuaternion)(h)} } // NewQQuaternion constructs a new QQuaternion object. func NewQQuaternion() *QQuaternion { - ret := C.QQuaternion_new() - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new(&outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion2 constructs a new QQuaternion object. func NewQQuaternion2(param1 Initialization) *QQuaternion { - ret := C.QQuaternion_new2((C.int)(param1)) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new2((C.int)(param1), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion3 constructs a new QQuaternion object. func NewQQuaternion3(scalar float32, xpos float32, ypos float32, zpos float32) *QQuaternion { - ret := C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos)) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion4 constructs a new QQuaternion object. func NewQQuaternion4(scalar float32, vector *QVector3D) *QQuaternion { - ret := C.QQuaternion_new4((C.float)(scalar), vector.cPointer()) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new4((C.float)(scalar), vector.cPointer(), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion5 constructs a new QQuaternion object. func NewQQuaternion5(vector *QVector4D) *QQuaternion { - ret := C.QQuaternion_new5(vector.cPointer()) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new5(vector.cPointer(), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } // NewQQuaternion6 constructs a new QQuaternion object. func NewQQuaternion6(param1 *QQuaternion) *QQuaternion { - ret := C.QQuaternion_new6(param1.cPointer()) - return newQQuaternion(ret) + var outptr_QQuaternion *C.QQuaternion = nil + + C.QQuaternion_new6(param1.cPointer(), &outptr_QQuaternion) + ret := newQQuaternion(outptr_QQuaternion) + ret.isSubclass = true + return ret } func (this *QQuaternion) IsNull() bool { @@ -292,7 +323,7 @@ func QQuaternion_Nlerp(q1 *QQuaternion, q2 *QQuaternion, t float32) *QQuaternion // Delete this object from C++ memory. func (this *QQuaternion) Delete() { - C.QQuaternion_Delete(this.h) + C.QQuaternion_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qquaternion.h b/qt6/gen_qquaternion.h index 1ddc4182..2a2c3b44 100644 --- a/qt6/gen_qquaternion.h +++ b/qt6/gen_qquaternion.h @@ -24,12 +24,12 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QQuaternion* QQuaternion_new(); -QQuaternion* QQuaternion_new2(int param1); -QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos); -QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector); -QQuaternion* QQuaternion_new5(QVector4D* vector); -QQuaternion* QQuaternion_new6(QQuaternion* param1); +void QQuaternion_new(QQuaternion** outptr_QQuaternion); +void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion); +void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion); +void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion); +void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion); +void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion); bool QQuaternion_IsNull(const QQuaternion* self); bool QQuaternion_IsIdentity(const QQuaternion* self); QVector3D* QQuaternion_Vector(const QQuaternion* self); @@ -71,7 +71,7 @@ QQuaternion* QQuaternion_FromDirection(QVector3D* direction, QVector3D* up); QQuaternion* QQuaternion_RotationTo(QVector3D* from, QVector3D* to); QQuaternion* QQuaternion_Slerp(QQuaternion* q1, QQuaternion* q2, float t); QQuaternion* QQuaternion_Nlerp(QQuaternion* q1, QQuaternion* q2, float t); -void QQuaternion_Delete(QQuaternion* self); +void QQuaternion_Delete(QQuaternion* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qradiobutton.cpp b/qt6/gen_qradiobutton.cpp index c00679e5..93a22b4d 100644 --- a/qt6/gen_qradiobutton.cpp +++ b/qt6/gen_qradiobutton.cpp @@ -1,30 +1,475 @@ +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include #include #include #include "gen_qradiobutton.h" #include "_cgo_export.h" -QRadioButton* QRadioButton_new(QWidget* parent) { - return new QRadioButton(parent); +class MiqtVirtualQRadioButton : public virtual QRadioButton { +public: + + MiqtVirtualQRadioButton(QWidget* parent): QRadioButton(parent) {}; + MiqtVirtualQRadioButton(): QRadioButton() {}; + MiqtVirtualQRadioButton(const QString& text): QRadioButton(text) {}; + MiqtVirtualQRadioButton(const QString& text, QWidget* parent): QRadioButton(text, parent) {}; + + virtual ~MiqtVirtualQRadioButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QRadioButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRadioButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QRadioButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QRadioButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRadioButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QRadioButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QRadioButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QRadioButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QRadioButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& param1) const override { + if (handle__HitButton == 0) { + return QRadioButton::hitButton(param1); + } + + const QPoint& param1_ret = param1; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(¶m1_ret); + + bool callback_return_value = miqt_exec_callback_QRadioButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* param1) const { + + return QRadioButton::hitButton(*param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QRadioButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QRadioButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QRadioButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QRadioButton::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QRadioButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QRadioButton::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionButton* button) const override { + if (handle__InitStyleOption == 0) { + QRadioButton::initStyleOption(button); + return; + } + + QStyleOptionButton* sigval1 = button; + + miqt_exec_callback_QRadioButton_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionButton* button) const { + + QRadioButton::initStyleOption(button); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QRadioButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QRadioButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QRadioButton::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QRadioButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QRadioButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QRadioButton::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QRadioButton::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QRadioButton::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QRadioButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QRadioButton::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QRadioButton::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QRadioButton::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QRadioButton::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QRadioButton::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QRadioButton::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QRadioButton::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QRadioButton::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QRadioButton::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QRadioButton::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QRadioButton::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QRadioButton::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QRadioButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QRadioButton::timerEvent(e); + + } + +}; + +void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(parent); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRadioButton* QRadioButton_new2() { - return new QRadioButton(); +void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRadioButton* QRadioButton_new3(struct miqt_string text) { +void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QRadioButton(text_QString); + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent) { +void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QRadioButton(text_QString, parent); + MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString, parent); + *outptr_QRadioButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QRadioButton_MetaObject(const QRadioButton* self) { @@ -76,7 +521,147 @@ struct miqt_string QRadioButton_Tr3(const char* s, const char* c, int n) { return _ms; } -void QRadioButton_Delete(QRadioButton* self) { - delete self; +void QRadioButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QRadioButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_SizeHint(); +} + +void QRadioButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QRadioButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QRadioButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__Event = slot; +} + +bool QRadioButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_Event(e); +} + +void QRadioButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__HitButton = slot; +} + +bool QRadioButton_virtualbase_HitButton(const void* self, QPoint* param1) { + return ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_HitButton(param1); +} + +void QRadioButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__PaintEvent = slot; +} + +void QRadioButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QRadioButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QRadioButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QRadioButton_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__InitStyleOption = slot; +} + +void QRadioButton_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* button) { + ( (const MiqtVirtualQRadioButton*)(self) )->virtualbase_InitStyleOption(button); +} + +void QRadioButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__CheckStateSet = slot; +} + +void QRadioButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QRadioButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__NextCheckState = slot; +} + +void QRadioButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_NextCheckState(); +} + +void QRadioButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QRadioButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QRadioButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QRadioButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QRadioButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MousePressEvent = slot; +} + +void QRadioButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_MousePressEvent(e); +} + +void QRadioButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QRadioButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QRadioButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__FocusInEvent = slot; +} + +void QRadioButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_FocusInEvent(e); +} + +void QRadioButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QRadioButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QRadioButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__ChangeEvent = slot; +} + +void QRadioButton_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_ChangeEvent(e); +} + +void QRadioButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QRadioButton*)(self) )->handle__TimerEvent = slot; +} + +void QRadioButton_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQRadioButton*)(self) )->virtualbase_TimerEvent(e); +} + +void QRadioButton_Delete(QRadioButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qradiobutton.go b/qt6/gen_qradiobutton.go index ebe3ed28..176acbbd 100644 --- a/qt6/gen_qradiobutton.go +++ b/qt6/gen_qradiobutton.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QRadioButton struct { - h *C.QRadioButton + h *C.QRadioButton + isSubclass bool *QAbstractButton } @@ -32,27 +34,51 @@ func (this *QRadioButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRadioButton(h *C.QRadioButton) *QRadioButton { +// newQRadioButton constructs the type using only CGO pointers. +func newQRadioButton(h *C.QRadioButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRadioButton { if h == nil { return nil } - return &QRadioButton{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QRadioButton{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQRadioButton(h unsafe.Pointer) *QRadioButton { - return newQRadioButton((*C.QRadioButton)(h)) +// UnsafeNewQRadioButton constructs the type using only unsafe pointers. +func UnsafeNewQRadioButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRadioButton { + if h == nil { + return nil + } + + return &QRadioButton{h: (*C.QRadioButton)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQRadioButton constructs a new QRadioButton object. func NewQRadioButton(parent *QWidget) *QRadioButton { - ret := C.QRadioButton_new(parent.cPointer()) - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new(parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRadioButton2 constructs a new QRadioButton object. func NewQRadioButton2() *QRadioButton { - ret := C.QRadioButton_new2() - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new2(&outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRadioButton3 constructs a new QRadioButton object. @@ -61,8 +87,16 @@ func NewQRadioButton3(text string) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QRadioButton_new3(text_ms) - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new3(text_ms, &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRadioButton4 constructs a new QRadioButton object. @@ -71,8 +105,16 @@ func NewQRadioButton4(text string, parent *QWidget) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QRadioButton_new4(text_ms, parent.cPointer()) - return newQRadioButton(ret) + var outptr_QRadioButton *C.QRadioButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRadioButton_new4(text_ms, parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QRadioButton) MetaObject() *QMetaObject { @@ -130,9 +172,402 @@ func QRadioButton_Tr3(s string, c string, n int) string { return _ret } +func (this *QRadioButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QRadioButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRadioButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QRadioButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_SizeHint +func miqt_exec_callback_QRadioButton_SizeHint(self *C.QRadioButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRadioButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QRadioButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRadioButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QRadioButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MinimumSizeHint +func miqt_exec_callback_QRadioButton_MinimumSizeHint(self *C.QRadioButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRadioButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QRadioButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QRadioButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QRadioButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_Event +func miqt_exec_callback_QRadioButton_Event(self *C.QRadioButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioButton) callVirtualBase_HitButton(param1 *QPoint) bool { + + return (bool)(C.QRadioButton_virtualbase_HitButton(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QRadioButton) OnHitButton(slot func(super func(param1 *QPoint) bool, param1 *QPoint) bool) { + C.QRadioButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_HitButton +func miqt_exec_callback_QRadioButton_HitButton(self *C.QRadioButton, cb C.intptr_t, param1 *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPoint) bool, param1 *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QRadioButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRadioButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QRadioButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRadioButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QRadioButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_PaintEvent +func miqt_exec_callback_QRadioButton_PaintEvent(self *C.QRadioButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QRadioButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRadioButton) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QRadioButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MouseMoveEvent +func miqt_exec_callback_QRadioButton_MouseMoveEvent(self *C.QRadioButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_InitStyleOption(button *QStyleOptionButton) { + + C.QRadioButton_virtualbase_InitStyleOption(unsafe.Pointer(this.h), button.cPointer()) + +} +func (this *QRadioButton) OnInitStyleOption(slot func(super func(button *QStyleOptionButton), button *QStyleOptionButton)) { + C.QRadioButton_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_InitStyleOption +func miqt_exec_callback_QRadioButton_InitStyleOption(self *C.QRadioButton, cb C.intptr_t, button *C.QStyleOptionButton) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(button *QStyleOptionButton), button *QStyleOptionButton)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionButton(unsafe.Pointer(button), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_CheckStateSet() { + + C.QRadioButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QRadioButton) OnCheckStateSet(slot func(super func())) { + C.QRadioButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_CheckStateSet +func miqt_exec_callback_QRadioButton_CheckStateSet(self *C.QRadioButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QRadioButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QRadioButton) callVirtualBase_NextCheckState() { + + C.QRadioButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QRadioButton) OnNextCheckState(slot func(super func())) { + C.QRadioButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_NextCheckState +func miqt_exec_callback_QRadioButton_NextCheckState(self *C.QRadioButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QRadioButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QRadioButton) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QRadioButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QRadioButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_KeyPressEvent +func miqt_exec_callback_QRadioButton_KeyPressEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QRadioButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QRadioButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_KeyReleaseEvent +func miqt_exec_callback_QRadioButton_KeyReleaseEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QRadioButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QRadioButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MousePressEvent +func miqt_exec_callback_QRadioButton_MousePressEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QRadioButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QRadioButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_MouseReleaseEvent +func miqt_exec_callback_QRadioButton_MouseReleaseEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QRadioButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QRadioButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_FocusInEvent +func miqt_exec_callback_QRadioButton_FocusInEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QRadioButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QRadioButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_FocusOutEvent +func miqt_exec_callback_QRadioButton_FocusOutEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QRadioButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QRadioButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_ChangeEvent +func miqt_exec_callback_QRadioButton_ChangeEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QRadioButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QRadioButton) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QRadioButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QRadioButton) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QRadioButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRadioButton_TimerEvent +func miqt_exec_callback_QRadioButton_TimerEvent(self *C.QRadioButton, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QRadioButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QRadioButton) Delete() { - C.QRadioButton_Delete(this.h) + C.QRadioButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qradiobutton.h b/qt6/gen_qradiobutton.h index 86ea22ec..4481b001 100644 --- a/qt6/gen_qradiobutton.h +++ b/qt6/gen_qradiobutton.h @@ -15,29 +15,90 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QRadioButton; class QSize; +class QStyleOptionButton; +class QTimerEvent; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QRadioButton QRadioButton; typedef struct QSize QSize; +typedef struct QStyleOptionButton QStyleOptionButton; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -QRadioButton* QRadioButton_new(QWidget* parent); -QRadioButton* QRadioButton_new2(); -QRadioButton* QRadioButton_new3(struct miqt_string text); -QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent); +void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QRadioButton_MetaObject(const QRadioButton* self); void* QRadioButton_Metacast(QRadioButton* self, const char* param1); struct miqt_string QRadioButton_Tr(const char* s); QSize* QRadioButton_SizeHint(const QRadioButton* self); QSize* QRadioButton_MinimumSizeHint(const QRadioButton* self); +bool QRadioButton_Event(QRadioButton* self, QEvent* e); +bool QRadioButton_HitButton(const QRadioButton* self, QPoint* param1); +void QRadioButton_PaintEvent(QRadioButton* self, QPaintEvent* param1); +void QRadioButton_MouseMoveEvent(QRadioButton* self, QMouseEvent* param1); +void QRadioButton_InitStyleOption(const QRadioButton* self, QStyleOptionButton* button); struct miqt_string QRadioButton_Tr2(const char* s, const char* c); struct miqt_string QRadioButton_Tr3(const char* s, const char* c, int n); -void QRadioButton_Delete(QRadioButton* self); +void QRadioButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QRadioButton_virtualbase_SizeHint(const void* self); +void QRadioButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QRadioButton_virtualbase_MinimumSizeHint(const void* self); +void QRadioButton_override_virtual_Event(void* self, intptr_t slot); +bool QRadioButton_virtualbase_Event(void* self, QEvent* e); +void QRadioButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QRadioButton_virtualbase_HitButton(const void* self, QPoint* param1); +void QRadioButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QRadioButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QRadioButton_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QRadioButton_virtualbase_InitStyleOption(const void* self, QStyleOptionButton* button); +void QRadioButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QRadioButton_virtualbase_CheckStateSet(void* self); +void QRadioButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QRadioButton_virtualbase_NextCheckState(void* self); +void QRadioButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QRadioButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QRadioButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QRadioButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QRadioButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QRadioButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QRadioButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_ChangeEvent(void* self, QEvent* e); +void QRadioButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QRadioButton_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QRadioButton_Delete(QRadioButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrandom.cpp b/qt6/gen_qrandom.cpp index 76177188..6e4d36ae 100644 --- a/qt6/gen_qrandom.cpp +++ b/qt6/gen_qrandom.cpp @@ -4,24 +4,29 @@ #include "gen_qrandom.h" #include "_cgo_export.h" -QRandomGenerator* QRandomGenerator_new() { - return new QRandomGenerator(); +void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { - return new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); +void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end) { - return new QRandomGenerator(static_cast(begin), static_cast(end)); +void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(static_cast(begin), static_cast(end)); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other) { - return new QRandomGenerator(*other); +void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(*other); + *outptr_QRandomGenerator = ret; } -QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue) { - return new QRandomGenerator(static_cast(seedValue)); +void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator* ret = new QRandomGenerator(static_cast(seedValue)); + *outptr_QRandomGenerator = ret; } void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other) { @@ -147,32 +152,48 @@ void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s) { self->seed(static_cast(s)); } -void QRandomGenerator_Delete(QRandomGenerator* self) { - delete self; +void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRandomGenerator64* QRandomGenerator64_new() { - return new QRandomGenerator64(); +void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { - return new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); +void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end) { - return new QRandomGenerator64(static_cast(begin), static_cast(end)); +void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(static_cast(begin), static_cast(end)); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other) { - return new QRandomGenerator64(*other); +void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(*other); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1) { - return new QRandomGenerator64(*param1); +void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(*param1); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } -QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue) { - return new QRandomGenerator64(static_cast(seedValue)); +void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { + QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedValue)); + *outptr_QRandomGenerator64 = ret; + *outptr_QRandomGenerator = static_cast(ret); } unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self) { @@ -215,7 +236,11 @@ void QRandomGenerator64_OperatorAssign(QRandomGenerator64* self, QRandomGenerato self->operator=(*param1); } -void QRandomGenerator64_Delete(QRandomGenerator64* self) { - delete self; +void QRandomGenerator64_Delete(QRandomGenerator64* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrandom.go b/qt6/gen_qrandom.go index 275b832d..ff1ef418 100644 --- a/qt6/gen_qrandom.go +++ b/qt6/gen_qrandom.go @@ -14,7 +14,8 @@ import ( ) type QRandomGenerator struct { - h *C.QRandomGenerator + h *C.QRandomGenerator + isSubclass bool } func (this *QRandomGenerator) cPointer() *C.QRandomGenerator { @@ -31,6 +32,7 @@ func (this *QRandomGenerator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRandomGenerator constructs the type using only CGO pointers. func newQRandomGenerator(h *C.QRandomGenerator) *QRandomGenerator { if h == nil { return nil @@ -38,38 +40,63 @@ func newQRandomGenerator(h *C.QRandomGenerator) *QRandomGenerator { return &QRandomGenerator{h: h} } +// UnsafeNewQRandomGenerator constructs the type using only unsafe pointers. func UnsafeNewQRandomGenerator(h unsafe.Pointer) *QRandomGenerator { - return newQRandomGenerator((*C.QRandomGenerator)(h)) + if h == nil { + return nil + } + + return &QRandomGenerator{h: (*C.QRandomGenerator)(h)} } // NewQRandomGenerator constructs a new QRandomGenerator object. func NewQRandomGenerator() *QRandomGenerator { - ret := C.QRandomGenerator_new() - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new(&outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator2 constructs a new QRandomGenerator object. func NewQRandomGenerator2(seedBuffer *uint, lenVal int64) *QRandomGenerator { - ret := C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal)) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator3 constructs a new QRandomGenerator object. func NewQRandomGenerator3(begin *uint, end *uint) *QRandomGenerator { - ret := C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end))) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator4 constructs a new QRandomGenerator object. func NewQRandomGenerator4(other *QRandomGenerator) *QRandomGenerator { - ret := C.QRandomGenerator_new4(other.cPointer()) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new4(other.cPointer(), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator5 constructs a new QRandomGenerator object. func NewQRandomGenerator5(seedValue uint) *QRandomGenerator { - ret := C.QRandomGenerator_new5((C.uint)(seedValue)) - return newQRandomGenerator(ret) + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator_new5((C.uint)(seedValue), &outptr_QRandomGenerator) + ret := newQRandomGenerator(outptr_QRandomGenerator) + ret.isSubclass = true + return ret } func (this *QRandomGenerator) OperatorAssign(other *QRandomGenerator) { @@ -185,7 +212,7 @@ func (this *QRandomGenerator) Seed1(s uint) { // Delete this object from C++ memory. func (this *QRandomGenerator) Delete() { - C.QRandomGenerator_Delete(this.h) + C.QRandomGenerator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -198,7 +225,8 @@ func (this *QRandomGenerator) GoGC() { } type QRandomGenerator64 struct { - h *C.QRandomGenerator64 + h *C.QRandomGenerator64 + isSubclass bool *QRandomGenerator } @@ -216,51 +244,89 @@ func (this *QRandomGenerator64) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRandomGenerator64(h *C.QRandomGenerator64) *QRandomGenerator64 { +// newQRandomGenerator64 constructs the type using only CGO pointers. +func newQRandomGenerator64(h *C.QRandomGenerator64, h_QRandomGenerator *C.QRandomGenerator) *QRandomGenerator64 { if h == nil { return nil } - return &QRandomGenerator64{h: h, QRandomGenerator: UnsafeNewQRandomGenerator(unsafe.Pointer(h))} + return &QRandomGenerator64{h: h, + QRandomGenerator: newQRandomGenerator(h_QRandomGenerator)} } -func UnsafeNewQRandomGenerator64(h unsafe.Pointer) *QRandomGenerator64 { - return newQRandomGenerator64((*C.QRandomGenerator64)(h)) +// UnsafeNewQRandomGenerator64 constructs the type using only unsafe pointers. +func UnsafeNewQRandomGenerator64(h unsafe.Pointer, h_QRandomGenerator unsafe.Pointer) *QRandomGenerator64 { + if h == nil { + return nil + } + + return &QRandomGenerator64{h: (*C.QRandomGenerator64)(h), + QRandomGenerator: UnsafeNewQRandomGenerator(h_QRandomGenerator)} } // NewQRandomGenerator64 constructs a new QRandomGenerator64 object. func NewQRandomGenerator64() *QRandomGenerator64 { - ret := C.QRandomGenerator64_new() - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new(&outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator642 constructs a new QRandomGenerator64 object. func NewQRandomGenerator642(seedBuffer *uint, lenVal int64) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal)) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator643 constructs a new QRandomGenerator64 object. func NewQRandomGenerator643(begin *uint, end *uint) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end))) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator644 constructs a new QRandomGenerator64 object. func NewQRandomGenerator644(other *QRandomGenerator) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new4(other.cPointer()) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new4(other.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator645 constructs a new QRandomGenerator64 object. func NewQRandomGenerator645(param1 *QRandomGenerator64) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new5(param1.cPointer()) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new5(param1.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } // NewQRandomGenerator646 constructs a new QRandomGenerator64 object. func NewQRandomGenerator646(seedValue uint) *QRandomGenerator64 { - ret := C.QRandomGenerator64_new6((C.uint)(seedValue)) - return newQRandomGenerator64(ret) + var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil + var outptr_QRandomGenerator *C.QRandomGenerator = nil + + C.QRandomGenerator64_new6((C.uint)(seedValue), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) + ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret.isSubclass = true + return ret } func (this *QRandomGenerator64) Generate() uint64 { @@ -284,16 +350,16 @@ func QRandomGenerator64_Max() uint64 { } func QRandomGenerator64_System() *QRandomGenerator64 { - return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_System())) + return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_System()), nil) } func QRandomGenerator64_Global() *QRandomGenerator64 { - return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_Global())) + return UnsafeNewQRandomGenerator64(unsafe.Pointer(C.QRandomGenerator64_Global()), nil) } func QRandomGenerator64_SecurelySeeded() *QRandomGenerator64 { _ret := C.QRandomGenerator64_SecurelySeeded() - _goptr := newQRandomGenerator64(_ret) + _goptr := newQRandomGenerator64(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -304,7 +370,7 @@ func (this *QRandomGenerator64) OperatorAssign(param1 *QRandomGenerator64) { // Delete this object from C++ memory. func (this *QRandomGenerator64) Delete() { - C.QRandomGenerator64_Delete(this.h) + C.QRandomGenerator64_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrandom.h b/qt6/gen_qrandom.h index ea5ad370..3a20f9b9 100644 --- a/qt6/gen_qrandom.h +++ b/qt6/gen_qrandom.h @@ -22,11 +22,11 @@ typedef struct QRandomGenerator QRandomGenerator; typedef struct QRandomGenerator64 QRandomGenerator64; #endif -QRandomGenerator* QRandomGenerator_new(); -QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); -QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end); -QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other); -QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue); +void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator); void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other); unsigned int QRandomGenerator_Generate(QRandomGenerator* self); unsigned long long QRandomGenerator_Generate64(QRandomGenerator* self); @@ -54,14 +54,14 @@ QRandomGenerator* QRandomGenerator_System(); QRandomGenerator* QRandomGenerator_Global(); QRandomGenerator* QRandomGenerator_SecurelySeeded(); void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s); -void QRandomGenerator_Delete(QRandomGenerator* self); +void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass); -QRandomGenerator64* QRandomGenerator64_new(); -QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); -QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end); -QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other); -QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1); -QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue); +void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self); unsigned long long QRandomGenerator64_OperatorCall(QRandomGenerator64* self); void QRandomGenerator64_Discard(QRandomGenerator64* self, unsigned long long z); @@ -71,7 +71,7 @@ QRandomGenerator64* QRandomGenerator64_System(); QRandomGenerator64* QRandomGenerator64_Global(); QRandomGenerator64* QRandomGenerator64_SecurelySeeded(); void QRandomGenerator64_OperatorAssign(QRandomGenerator64* self, QRandomGenerator64* param1); -void QRandomGenerator64_Delete(QRandomGenerator64* self); +void QRandomGenerator64_Delete(QRandomGenerator64* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrasterwindow.cpp b/qt6/gen_qrasterwindow.cpp index a2d0d9c3..78d9e165 100644 --- a/qt6/gen_qrasterwindow.cpp +++ b/qt6/gen_qrasterwindow.cpp @@ -1,19 +1,167 @@ +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include "gen_qrasterwindow.h" #include "_cgo_export.h" -QRasterWindow* QRasterWindow_new() { - return new QRasterWindow(); +class MiqtVirtualQRasterWindow : public virtual QRasterWindow { +public: + + MiqtVirtualQRasterWindow(): QRasterWindow() {}; + MiqtVirtualQRasterWindow(QWindow* parent): QRasterWindow(parent) {}; + + virtual ~MiqtVirtualQRasterWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override { + if (handle__Metric == 0) { + return QRasterWindow::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QRasterWindow_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int metric) const { + + return QRasterWindow::metric(static_cast(metric)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* param1) const override { + if (handle__Redirected == 0) { + return QRasterWindow::redirected(param1); + } + + QPoint* sigval1 = param1; + + QPaintDevice* callback_return_value = miqt_exec_callback_QRasterWindow_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* param1) const { + + return QRasterWindow::redirected(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExposeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void exposeEvent(QExposeEvent* param1) override { + if (handle__ExposeEvent == 0) { + QRasterWindow::exposeEvent(param1); + return; + } + + QExposeEvent* sigval1 = param1; + + miqt_exec_callback_QRasterWindow_ExposeEvent(this, handle__ExposeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ExposeEvent(QExposeEvent* param1) { + + QRasterWindow::exposeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QRasterWindow::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QRasterWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QRasterWindow::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QRasterWindow::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QRasterWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QRasterWindow::event(event); + + } + +}; + +void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(); + *outptr_QRasterWindow = ret; + *outptr_QPaintDeviceWindow = static_cast(ret); + *outptr_QWindow = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRasterWindow* QRasterWindow_new2(QWindow* parent) { - return new QRasterWindow(parent); +void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(parent); + *outptr_QRasterWindow = ret; + *outptr_QPaintDeviceWindow = static_cast(ret); + *outptr_QWindow = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self) { @@ -57,7 +205,51 @@ struct miqt_string QRasterWindow_Tr3(const char* s, const char* c, int n) { return _ms; } -void QRasterWindow_Delete(QRasterWindow* self) { - delete self; +void QRasterWindow_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__Metric = slot; +} + +int QRasterWindow_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQRasterWindow*)(self) )->virtualbase_Metric(metric); +} + +void QRasterWindow_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QRasterWindow_virtualbase_Redirected(const void* self, QPoint* param1) { + return ( (const MiqtVirtualQRasterWindow*)(self) )->virtualbase_Redirected(param1); +} + +void QRasterWindow_override_virtual_ExposeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__ExposeEvent = slot; +} + +void QRasterWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1) { + ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_ExposeEvent(param1); +} + +void QRasterWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__PaintEvent = slot; +} + +void QRasterWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_PaintEvent(event); +} + +void QRasterWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRasterWindow*)(self) )->handle__Event = slot; +} + +bool QRasterWindow_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_Event(event); +} + +void QRasterWindow_Delete(QRasterWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrasterwindow.go b/qt6/gen_qrasterwindow.go index a49b9b0e..51983b23 100644 --- a/qt6/gen_qrasterwindow.go +++ b/qt6/gen_qrasterwindow.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QRasterWindow struct { - h *C.QRasterWindow + h *C.QRasterWindow + isSubclass bool *QPaintDeviceWindow } @@ -32,27 +34,53 @@ func (this *QRasterWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRasterWindow(h *C.QRasterWindow) *QRasterWindow { +// newQRasterWindow constructs the type using only CGO pointers. +func newQRasterWindow(h *C.QRasterWindow, h_QPaintDeviceWindow *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QRasterWindow { if h == nil { return nil } - return &QRasterWindow{h: h, QPaintDeviceWindow: UnsafeNewQPaintDeviceWindow(unsafe.Pointer(h))} + return &QRasterWindow{h: h, + QPaintDeviceWindow: newQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} } -func UnsafeNewQRasterWindow(h unsafe.Pointer) *QRasterWindow { - return newQRasterWindow((*C.QRasterWindow)(h)) +// UnsafeNewQRasterWindow constructs the type using only unsafe pointers. +func UnsafeNewQRasterWindow(h unsafe.Pointer, h_QPaintDeviceWindow unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRasterWindow { + if h == nil { + return nil + } + + return &QRasterWindow{h: (*C.QRasterWindow)(h), + QPaintDeviceWindow: UnsafeNewQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} } // NewQRasterWindow constructs a new QRasterWindow object. func NewQRasterWindow() *QRasterWindow { - ret := C.QRasterWindow_new() - return newQRasterWindow(ret) + var outptr_QRasterWindow *C.QRasterWindow = nil + var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRasterWindow_new(&outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) + ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRasterWindow2 constructs a new QRasterWindow object. func NewQRasterWindow2(parent *QWindow) *QRasterWindow { - ret := C.QRasterWindow_new2(parent.cPointer()) - return newQRasterWindow(ret) + var outptr_QRasterWindow *C.QRasterWindow = nil + var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRasterWindow_new2(parent.cPointer(), &outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) + ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QRasterWindow) MetaObject() *QMetaObject { @@ -96,9 +124,129 @@ func QRasterWindow_Tr3(s string, c string, n int) string { return _ret } +func (this *QRasterWindow) callVirtualBase_Metric(metric QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QRasterWindow_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QRasterWindow) OnMetric(slot func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) { + C.QRasterWindow_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_Metric +func miqt_exec_callback_QRasterWindow_Metric(self *C.QRasterWindow, cb C.intptr_t, metric C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(metric) + + virtualReturn := gofunc((&QRasterWindow{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QRasterWindow) callVirtualBase_Redirected(param1 *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QRasterWindow_virtualbase_Redirected(unsafe.Pointer(this.h), param1.cPointer()))) +} +func (this *QRasterWindow) OnRedirected(slot func(super func(param1 *QPoint) *QPaintDevice, param1 *QPoint) *QPaintDevice) { + C.QRasterWindow_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_Redirected +func miqt_exec_callback_QRasterWindow_Redirected(self *C.QRasterWindow, cb C.intptr_t, param1 *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPoint) *QPaintDevice, param1 *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QRasterWindow{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QRasterWindow) callVirtualBase_ExposeEvent(param1 *QExposeEvent) { + + C.QRasterWindow_virtualbase_ExposeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRasterWindow) OnExposeEvent(slot func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) { + C.QRasterWindow_override_virtual_ExposeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_ExposeEvent +func miqt_exec_callback_QRasterWindow_ExposeEvent(self *C.QRasterWindow, cb C.intptr_t, param1 *C.QExposeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQExposeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRasterWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) + +} + +func (this *QRasterWindow) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QRasterWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRasterWindow) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QRasterWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_PaintEvent +func miqt_exec_callback_QRasterWindow_PaintEvent(self *C.QRasterWindow, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QRasterWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QRasterWindow) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QRasterWindow_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QRasterWindow) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QRasterWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRasterWindow_Event +func miqt_exec_callback_QRasterWindow_Event(self *C.QRasterWindow, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QRasterWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QRasterWindow) Delete() { - C.QRasterWindow_Delete(this.h) + C.QRasterWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrasterwindow.h b/qt6/gen_qrasterwindow.h index 0d3ea442..2cc1f00f 100644 --- a/qt6/gen_qrasterwindow.h +++ b/qt6/gen_qrasterwindow.h @@ -15,23 +15,51 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QExposeEvent; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintDeviceWindow; +class QPaintEvent; +class QPoint; class QRasterWindow; +class QSurface; class QWindow; #else +typedef struct QEvent QEvent; +typedef struct QExposeEvent QExposeEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintDeviceWindow QPaintDeviceWindow; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QRasterWindow QRasterWindow; +typedef struct QSurface QSurface; typedef struct QWindow QWindow; #endif -QRasterWindow* QRasterWindow_new(); -QRasterWindow* QRasterWindow_new2(QWindow* parent); +void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); +void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self); void* QRasterWindow_Metacast(QRasterWindow* self, const char* param1); struct miqt_string QRasterWindow_Tr(const char* s); +int QRasterWindow_Metric(const QRasterWindow* self, int metric); +QPaintDevice* QRasterWindow_Redirected(const QRasterWindow* self, QPoint* param1); struct miqt_string QRasterWindow_Tr2(const char* s, const char* c); struct miqt_string QRasterWindow_Tr3(const char* s, const char* c, int n); -void QRasterWindow_Delete(QRasterWindow* self); +void QRasterWindow_override_virtual_Metric(void* self, intptr_t slot); +int QRasterWindow_virtualbase_Metric(const void* self, int metric); +void QRasterWindow_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QRasterWindow_virtualbase_Redirected(const void* self, QPoint* param1); +void QRasterWindow_override_virtual_ExposeEvent(void* self, intptr_t slot); +void QRasterWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1); +void QRasterWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QRasterWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QRasterWindow_override_virtual_Event(void* self, intptr_t slot); +bool QRasterWindow_virtualbase_Event(void* self, QEvent* event); +void QRasterWindow_Delete(QRasterWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrawfont.cpp b/qt6/gen_qrawfont.cpp index 90699848..8f5f4518 100644 --- a/qt6/gen_qrawfont.cpp +++ b/qt6/gen_qrawfont.cpp @@ -15,32 +15,38 @@ #include "gen_qrawfont.h" #include "_cgo_export.h" -QRawFont* QRawFont_new() { - return new QRawFont(); +void QRawFont_new(QRawFont** outptr_QRawFont) { + QRawFont* ret = new QRawFont(); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize) { +void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QRawFont(fileName_QString, static_cast(pixelSize)); + QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize)); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize) { +void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - return new QRawFont(fontData_QByteArray, static_cast(pixelSize)); + QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize)); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new4(QRawFont* other) { - return new QRawFont(*other); +void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont) { + QRawFont* ret = new QRawFont(*other); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference) { +void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); + QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); + *outptr_QRawFont = ret; } -QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference) { +void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - return new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); + QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); + *outptr_QRawFont = ret; } void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other) { @@ -291,7 +297,11 @@ QRawFont* QRawFont_FromFont2(QFont* font, int writingSystem) { return new QRawFont(QRawFont::fromFont(*font, static_cast(writingSystem))); } -void QRawFont_Delete(QRawFont* self) { - delete self; +void QRawFont_Delete(QRawFont* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrawfont.go b/qt6/gen_qrawfont.go index f538b3ef..34d6921f 100644 --- a/qt6/gen_qrawfont.go +++ b/qt6/gen_qrawfont.go @@ -29,7 +29,8 @@ const ( ) type QRawFont struct { - h *C.QRawFont + h *C.QRawFont + isSubclass bool } func (this *QRawFont) cPointer() *C.QRawFont { @@ -46,6 +47,7 @@ func (this *QRawFont) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRawFont constructs the type using only CGO pointers. func newQRawFont(h *C.QRawFont) *QRawFont { if h == nil { return nil @@ -53,14 +55,23 @@ func newQRawFont(h *C.QRawFont) *QRawFont { return &QRawFont{h: h} } +// UnsafeNewQRawFont constructs the type using only unsafe pointers. func UnsafeNewQRawFont(h unsafe.Pointer) *QRawFont { - return newQRawFont((*C.QRawFont)(h)) + if h == nil { + return nil + } + + return &QRawFont{h: (*C.QRawFont)(h)} } // NewQRawFont constructs a new QRawFont object. func NewQRawFont() *QRawFont { - ret := C.QRawFont_new() - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new(&outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont2 constructs a new QRawFont object. @@ -69,8 +80,12 @@ func NewQRawFont2(fileName string, pixelSize float64) *QRawFont { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QRawFont_new2(fileName_ms, (C.double)(pixelSize)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new2(fileName_ms, (C.double)(pixelSize), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont3 constructs a new QRawFont object. @@ -78,14 +93,22 @@ func NewQRawFont3(fontData []byte, pixelSize float64) *QRawFont { fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - ret := C.QRawFont_new3(fontData_alias, (C.double)(pixelSize)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new3(fontData_alias, (C.double)(pixelSize), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont4 constructs a new QRawFont object. func NewQRawFont4(other *QRawFont) *QRawFont { - ret := C.QRawFont_new4(other.cPointer()) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new4(other.cPointer(), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont5 constructs a new QRawFont object. @@ -94,8 +117,12 @@ func NewQRawFont5(fileName string, pixelSize float64, hintingPreference QFont__H fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } // NewQRawFont6 constructs a new QRawFont object. @@ -103,8 +130,12 @@ func NewQRawFont6(fontData []byte, pixelSize float64, hintingPreference QFont__H fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - ret := C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference)) - return newQRawFont(ret) + var outptr_QRawFont *C.QRawFont = nil + + C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) + ret := newQRawFont(outptr_QRawFont) + ret.isSubclass = true + return ret } func (this *QRawFont) OperatorAssign(other *QRawFont) { @@ -215,7 +246,7 @@ func (this *QRawFont) AdvancesForGlyphIndexes4(glyphIndexes *uint, advances *QPo func (this *QRawFont) AlphaMapForGlyph(glyphIndex uint) *QImage { _ret := C.QRawFont_AlphaMapForGlyph(this.h, (C.uint)(glyphIndex)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -337,14 +368,14 @@ func QRawFont_FromFont(font *QFont) *QRawFont { func (this *QRawFont) AlphaMapForGlyph2(glyphIndex uint, antialiasingType QRawFont__AntialiasingType) *QImage { _ret := C.QRawFont_AlphaMapForGlyph2(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType)) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QRawFont) AlphaMapForGlyph3(glyphIndex uint, antialiasingType QRawFont__AntialiasingType, transform *QTransform) *QImage { _ret := C.QRawFont_AlphaMapForGlyph3(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType), transform.cPointer()) - _goptr := newQImage(_ret) + _goptr := newQImage(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -358,7 +389,7 @@ func QRawFont_FromFont2(font *QFont, writingSystem QFontDatabase__WritingSystem) // Delete this object from C++ memory. func (this *QRawFont) Delete() { - C.QRawFont_Delete(this.h) + C.QRawFont_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrawfont.h b/qt6/gen_qrawfont.h index a195f2f3..98a19b0e 100644 --- a/qt6/gen_qrawfont.h +++ b/qt6/gen_qrawfont.h @@ -36,12 +36,12 @@ typedef struct QRectF QRectF; typedef struct QTransform QTransform; #endif -QRawFont* QRawFont_new(); -QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize); -QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize); -QRawFont* QRawFont_new4(QRawFont* other); -QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference); -QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference); +void QRawFont_new(QRawFont** outptr_QRawFont); +void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont); +void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont); +void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont); +void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); +void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other); void QRawFont_Swap(QRawFont* self, QRawFont* other); bool QRawFont_IsValid(const QRawFont* self); @@ -83,7 +83,7 @@ QRawFont* QRawFont_FromFont(QFont* font); QImage* QRawFont_AlphaMapForGlyph2(const QRawFont* self, unsigned int glyphIndex, int antialiasingType); QImage* QRawFont_AlphaMapForGlyph3(const QRawFont* self, unsigned int glyphIndex, int antialiasingType, QTransform* transform); QRawFont* QRawFont_FromFont2(QFont* font, int writingSystem); -void QRawFont_Delete(QRawFont* self); +void QRawFont_Delete(QRawFont* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qreadwritelock.cpp b/qt6/gen_qreadwritelock.cpp index 735ddb26..67011be5 100644 --- a/qt6/gen_qreadwritelock.cpp +++ b/qt6/gen_qreadwritelock.cpp @@ -5,12 +5,14 @@ #include "gen_qreadwritelock.h" #include "_cgo_export.h" -QReadWriteLock* QReadWriteLock_new() { - return new QReadWriteLock(); +void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock) { + QReadWriteLock* ret = new QReadWriteLock(); + *outptr_QReadWriteLock = ret; } -QReadWriteLock* QReadWriteLock_new2(int recursionMode) { - return new QReadWriteLock(static_cast(recursionMode)); +void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock) { + QReadWriteLock* ret = new QReadWriteLock(static_cast(recursionMode)); + *outptr_QReadWriteLock = ret; } void QReadWriteLock_LockForRead(QReadWriteLock* self) { @@ -41,12 +43,17 @@ void QReadWriteLock_Unlock(QReadWriteLock* self) { self->unlock(); } -void QReadWriteLock_Delete(QReadWriteLock* self) { - delete self; +void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock) { - return new QReadLocker(readWriteLock); +void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker) { + QReadLocker* ret = new QReadLocker(readWriteLock); + *outptr_QReadLocker = ret; } void QReadLocker_Unlock(QReadLocker* self) { @@ -61,12 +68,17 @@ QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self) { return self->readWriteLock(); } -void QReadLocker_Delete(QReadLocker* self) { - delete self; +void QReadLocker_Delete(QReadLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock) { - return new QWriteLocker(readWriteLock); +void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker) { + QWriteLocker* ret = new QWriteLocker(readWriteLock); + *outptr_QWriteLocker = ret; } void QWriteLocker_Unlock(QWriteLocker* self) { @@ -81,7 +93,11 @@ QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self) { return self->readWriteLock(); } -void QWriteLocker_Delete(QWriteLocker* self) { - delete self; +void QWriteLocker_Delete(QWriteLocker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qreadwritelock.go b/qt6/gen_qreadwritelock.go index 3060e9b0..997d5163 100644 --- a/qt6/gen_qreadwritelock.go +++ b/qt6/gen_qreadwritelock.go @@ -21,7 +21,8 @@ const ( ) type QReadWriteLock struct { - h *C.QReadWriteLock + h *C.QReadWriteLock + isSubclass bool } func (this *QReadWriteLock) cPointer() *C.QReadWriteLock { @@ -38,6 +39,7 @@ func (this *QReadWriteLock) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQReadWriteLock constructs the type using only CGO pointers. func newQReadWriteLock(h *C.QReadWriteLock) *QReadWriteLock { if h == nil { return nil @@ -45,20 +47,33 @@ func newQReadWriteLock(h *C.QReadWriteLock) *QReadWriteLock { return &QReadWriteLock{h: h} } +// UnsafeNewQReadWriteLock constructs the type using only unsafe pointers. func UnsafeNewQReadWriteLock(h unsafe.Pointer) *QReadWriteLock { - return newQReadWriteLock((*C.QReadWriteLock)(h)) + if h == nil { + return nil + } + + return &QReadWriteLock{h: (*C.QReadWriteLock)(h)} } // NewQReadWriteLock constructs a new QReadWriteLock object. func NewQReadWriteLock() *QReadWriteLock { - ret := C.QReadWriteLock_new() - return newQReadWriteLock(ret) + var outptr_QReadWriteLock *C.QReadWriteLock = nil + + C.QReadWriteLock_new(&outptr_QReadWriteLock) + ret := newQReadWriteLock(outptr_QReadWriteLock) + ret.isSubclass = true + return ret } // NewQReadWriteLock2 constructs a new QReadWriteLock object. func NewQReadWriteLock2(recursionMode QReadWriteLock__RecursionMode) *QReadWriteLock { - ret := C.QReadWriteLock_new2((C.int)(recursionMode)) - return newQReadWriteLock(ret) + var outptr_QReadWriteLock *C.QReadWriteLock = nil + + C.QReadWriteLock_new2((C.int)(recursionMode), &outptr_QReadWriteLock) + ret := newQReadWriteLock(outptr_QReadWriteLock) + ret.isSubclass = true + return ret } func (this *QReadWriteLock) LockForRead() { @@ -91,7 +106,7 @@ func (this *QReadWriteLock) Unlock() { // Delete this object from C++ memory. func (this *QReadWriteLock) Delete() { - C.QReadWriteLock_Delete(this.h) + C.QReadWriteLock_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -104,7 +119,8 @@ func (this *QReadWriteLock) GoGC() { } type QReadLocker struct { - h *C.QReadLocker + h *C.QReadLocker + isSubclass bool } func (this *QReadLocker) cPointer() *C.QReadLocker { @@ -121,6 +137,7 @@ func (this *QReadLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQReadLocker constructs the type using only CGO pointers. func newQReadLocker(h *C.QReadLocker) *QReadLocker { if h == nil { return nil @@ -128,14 +145,23 @@ func newQReadLocker(h *C.QReadLocker) *QReadLocker { return &QReadLocker{h: h} } +// UnsafeNewQReadLocker constructs the type using only unsafe pointers. func UnsafeNewQReadLocker(h unsafe.Pointer) *QReadLocker { - return newQReadLocker((*C.QReadLocker)(h)) + if h == nil { + return nil + } + + return &QReadLocker{h: (*C.QReadLocker)(h)} } // NewQReadLocker constructs a new QReadLocker object. func NewQReadLocker(readWriteLock *QReadWriteLock) *QReadLocker { - ret := C.QReadLocker_new(readWriteLock.cPointer()) - return newQReadLocker(ret) + var outptr_QReadLocker *C.QReadLocker = nil + + C.QReadLocker_new(readWriteLock.cPointer(), &outptr_QReadLocker) + ret := newQReadLocker(outptr_QReadLocker) + ret.isSubclass = true + return ret } func (this *QReadLocker) Unlock() { @@ -152,7 +178,7 @@ func (this *QReadLocker) ReadWriteLock() *QReadWriteLock { // Delete this object from C++ memory. func (this *QReadLocker) Delete() { - C.QReadLocker_Delete(this.h) + C.QReadLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -165,7 +191,8 @@ func (this *QReadLocker) GoGC() { } type QWriteLocker struct { - h *C.QWriteLocker + h *C.QWriteLocker + isSubclass bool } func (this *QWriteLocker) cPointer() *C.QWriteLocker { @@ -182,6 +209,7 @@ func (this *QWriteLocker) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWriteLocker constructs the type using only CGO pointers. func newQWriteLocker(h *C.QWriteLocker) *QWriteLocker { if h == nil { return nil @@ -189,14 +217,23 @@ func newQWriteLocker(h *C.QWriteLocker) *QWriteLocker { return &QWriteLocker{h: h} } +// UnsafeNewQWriteLocker constructs the type using only unsafe pointers. func UnsafeNewQWriteLocker(h unsafe.Pointer) *QWriteLocker { - return newQWriteLocker((*C.QWriteLocker)(h)) + if h == nil { + return nil + } + + return &QWriteLocker{h: (*C.QWriteLocker)(h)} } // NewQWriteLocker constructs a new QWriteLocker object. func NewQWriteLocker(readWriteLock *QReadWriteLock) *QWriteLocker { - ret := C.QWriteLocker_new(readWriteLock.cPointer()) - return newQWriteLocker(ret) + var outptr_QWriteLocker *C.QWriteLocker = nil + + C.QWriteLocker_new(readWriteLock.cPointer(), &outptr_QWriteLocker) + ret := newQWriteLocker(outptr_QWriteLocker) + ret.isSubclass = true + return ret } func (this *QWriteLocker) Unlock() { @@ -213,7 +250,7 @@ func (this *QWriteLocker) ReadWriteLock() *QReadWriteLock { // Delete this object from C++ memory. func (this *QWriteLocker) Delete() { - C.QWriteLocker_Delete(this.h) + C.QWriteLocker_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qreadwritelock.h b/qt6/gen_qreadwritelock.h index cda5a373..fee0e264 100644 --- a/qt6/gen_qreadwritelock.h +++ b/qt6/gen_qreadwritelock.h @@ -24,8 +24,8 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWriteLocker QWriteLocker; #endif -QReadWriteLock* QReadWriteLock_new(); -QReadWriteLock* QReadWriteLock_new2(int recursionMode); +void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock); +void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock); void QReadWriteLock_LockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForReadWithTimeout(QReadWriteLock* self, int timeout); @@ -33,19 +33,19 @@ void QReadWriteLock_LockForWrite(QReadWriteLock* self); bool QReadWriteLock_TryLockForWrite(QReadWriteLock* self); bool QReadWriteLock_TryLockForWriteWithTimeout(QReadWriteLock* self, int timeout); void QReadWriteLock_Unlock(QReadWriteLock* self); -void QReadWriteLock_Delete(QReadWriteLock* self); +void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass); -QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock); +void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker); void QReadLocker_Unlock(QReadLocker* self); void QReadLocker_Relock(QReadLocker* self); QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self); -void QReadLocker_Delete(QReadLocker* self); +void QReadLocker_Delete(QReadLocker* self, bool isSubclass); -QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock); +void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker); void QWriteLocker_Unlock(QWriteLocker* self); void QWriteLocker_Relock(QWriteLocker* self); QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self); -void QWriteLocker_Delete(QWriteLocker* self); +void QWriteLocker_Delete(QWriteLocker* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrect.cpp b/qt6/gen_qrect.cpp index 494ec134..949f1570 100644 --- a/qt6/gen_qrect.cpp +++ b/qt6/gen_qrect.cpp @@ -10,24 +10,29 @@ #include "gen_qrect.h" #include "_cgo_export.h" -QRect* QRect_new() { - return new QRect(); +void QRect_new(QRect** outptr_QRect) { + QRect* ret = new QRect(); + *outptr_QRect = ret; } -QRect* QRect_new2(QPoint* topleft, QPoint* bottomright) { - return new QRect(*topleft, *bottomright); +void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect) { + QRect* ret = new QRect(*topleft, *bottomright); + *outptr_QRect = ret; } -QRect* QRect_new3(QPoint* topleft, QSize* size) { - return new QRect(*topleft, *size); +void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect) { + QRect* ret = new QRect(*topleft, *size); + *outptr_QRect = ret; } -QRect* QRect_new4(int left, int top, int width, int height) { - return new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); +void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect) { + QRect* ret = new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); + *outptr_QRect = ret; } -QRect* QRect_new5(QRect* param1) { - return new QRect(*param1); +void QRect_new5(QRect* param1, QRect** outptr_QRect) { + QRect* ret = new QRect(*param1); + *outptr_QRect = ret; } bool QRect_IsNull(const QRect* self) { @@ -322,32 +327,42 @@ bool QRect_Contains23(const QRect* self, QPoint* p, bool proper) { return self->contains(*p, proper); } -void QRect_Delete(QRect* self) { - delete self; +void QRect_Delete(QRect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRectF* QRectF_new() { - return new QRectF(); +void QRectF_new(QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(); + *outptr_QRectF = ret; } -QRectF* QRectF_new2(QPointF* topleft, QSizeF* size) { - return new QRectF(*topleft, *size); +void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*topleft, *size); + *outptr_QRectF = ret; } -QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight) { - return new QRectF(*topleft, *bottomRight); +void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*topleft, *bottomRight); + *outptr_QRectF = ret; } -QRectF* QRectF_new4(double left, double top, double width, double height) { - return new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); +void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); + *outptr_QRectF = ret; } -QRectF* QRectF_new5(QRect* rect) { - return new QRectF(*rect); +void QRectF_new5(QRect* rect, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*rect); + *outptr_QRectF = ret; } -QRectF* QRectF_new6(QRectF* param1) { - return new QRectF(*param1); +void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF) { + QRectF* ret = new QRectF(*param1); + *outptr_QRectF = ret; } bool QRectF_IsNull(const QRectF* self) { @@ -638,7 +653,11 @@ QRect* QRectF_ToAlignedRect(const QRectF* self) { return new QRect(self->toAlignedRect()); } -void QRectF_Delete(QRectF* self) { - delete self; +void QRectF_Delete(QRectF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrect.go b/qt6/gen_qrect.go index d78ebc17..018373d0 100644 --- a/qt6/gen_qrect.go +++ b/qt6/gen_qrect.go @@ -14,7 +14,8 @@ import ( ) type QRect struct { - h *C.QRect + h *C.QRect + isSubclass bool } func (this *QRect) cPointer() *C.QRect { @@ -31,6 +32,7 @@ func (this *QRect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRect constructs the type using only CGO pointers. func newQRect(h *C.QRect) *QRect { if h == nil { return nil @@ -38,38 +40,63 @@ func newQRect(h *C.QRect) *QRect { return &QRect{h: h} } +// UnsafeNewQRect constructs the type using only unsafe pointers. func UnsafeNewQRect(h unsafe.Pointer) *QRect { - return newQRect((*C.QRect)(h)) + if h == nil { + return nil + } + + return &QRect{h: (*C.QRect)(h)} } // NewQRect constructs a new QRect object. func NewQRect() *QRect { - ret := C.QRect_new() - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new(&outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect2 constructs a new QRect object. func NewQRect2(topleft *QPoint, bottomright *QPoint) *QRect { - ret := C.QRect_new2(topleft.cPointer(), bottomright.cPointer()) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new2(topleft.cPointer(), bottomright.cPointer(), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect3 constructs a new QRect object. func NewQRect3(topleft *QPoint, size *QSize) *QRect { - ret := C.QRect_new3(topleft.cPointer(), size.cPointer()) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new3(topleft.cPointer(), size.cPointer(), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect4 constructs a new QRect object. func NewQRect4(left int, top int, width int, height int) *QRect { - ret := C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height)) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } // NewQRect5 constructs a new QRect object. func NewQRect5(param1 *QRect) *QRect { - ret := C.QRect_new5(param1.cPointer()) - return newQRect(ret) + var outptr_QRect *C.QRect = nil + + C.QRect_new5(param1.cPointer(), &outptr_QRect) + ret := newQRect(outptr_QRect) + ret.isSubclass = true + return ret } func (this *QRect) IsNull() bool { @@ -419,7 +446,7 @@ func (this *QRect) Contains23(p *QPoint, proper bool) bool { // Delete this object from C++ memory. func (this *QRect) Delete() { - C.QRect_Delete(this.h) + C.QRect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -432,7 +459,8 @@ func (this *QRect) GoGC() { } type QRectF struct { - h *C.QRectF + h *C.QRectF + isSubclass bool } func (this *QRectF) cPointer() *C.QRectF { @@ -449,6 +477,7 @@ func (this *QRectF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRectF constructs the type using only CGO pointers. func newQRectF(h *C.QRectF) *QRectF { if h == nil { return nil @@ -456,44 +485,73 @@ func newQRectF(h *C.QRectF) *QRectF { return &QRectF{h: h} } +// UnsafeNewQRectF constructs the type using only unsafe pointers. func UnsafeNewQRectF(h unsafe.Pointer) *QRectF { - return newQRectF((*C.QRectF)(h)) + if h == nil { + return nil + } + + return &QRectF{h: (*C.QRectF)(h)} } // NewQRectF constructs a new QRectF object. func NewQRectF() *QRectF { - ret := C.QRectF_new() - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new(&outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF2 constructs a new QRectF object. func NewQRectF2(topleft *QPointF, size *QSizeF) *QRectF { - ret := C.QRectF_new2(topleft.cPointer(), size.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new2(topleft.cPointer(), size.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF3 constructs a new QRectF object. func NewQRectF3(topleft *QPointF, bottomRight *QPointF) *QRectF { - ret := C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF4 constructs a new QRectF object. func NewQRectF4(left float64, top float64, width float64, height float64) *QRectF { - ret := C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height)) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF5 constructs a new QRectF object. func NewQRectF5(rect *QRect) *QRectF { - ret := C.QRectF_new5(rect.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new5(rect.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } // NewQRectF6 constructs a new QRectF object. func NewQRectF6(param1 *QRectF) *QRectF { - ret := C.QRectF_new6(param1.cPointer()) - return newQRectF(ret) + var outptr_QRectF *C.QRectF = nil + + C.QRectF_new6(param1.cPointer(), &outptr_QRectF) + ret := newQRectF(outptr_QRectF) + ret.isSubclass = true + return ret } func (this *QRectF) IsNull() bool { @@ -831,7 +889,7 @@ func (this *QRectF) ToAlignedRect() *QRect { // Delete this object from C++ memory. func (this *QRectF) Delete() { - C.QRectF_Delete(this.h) + C.QRectF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrect.h b/qt6/gen_qrect.h index 47690367..cce8fb26 100644 --- a/qt6/gen_qrect.h +++ b/qt6/gen_qrect.h @@ -34,11 +34,11 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QRect* QRect_new(); -QRect* QRect_new2(QPoint* topleft, QPoint* bottomright); -QRect* QRect_new3(QPoint* topleft, QSize* size); -QRect* QRect_new4(int left, int top, int width, int height); -QRect* QRect_new5(QRect* param1); +void QRect_new(QRect** outptr_QRect); +void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect); +void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect); +void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect); +void QRect_new5(QRect* param1, QRect** outptr_QRect); bool QRect_IsNull(const QRect* self); bool QRect_IsEmpty(const QRect* self); bool QRect_IsValid(const QRect* self); @@ -111,14 +111,14 @@ QRect* QRect_Span(QPoint* p1, QPoint* p2); QRectF* QRect_ToRectF(const QRect* self); bool QRect_Contains22(const QRect* self, QRect* r, bool proper); bool QRect_Contains23(const QRect* self, QPoint* p, bool proper); -void QRect_Delete(QRect* self); +void QRect_Delete(QRect* self, bool isSubclass); -QRectF* QRectF_new(); -QRectF* QRectF_new2(QPointF* topleft, QSizeF* size); -QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight); -QRectF* QRectF_new4(double left, double top, double width, double height); -QRectF* QRectF_new5(QRect* rect); -QRectF* QRectF_new6(QRectF* param1); +void QRectF_new(QRectF** outptr_QRectF); +void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF); +void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF); +void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF); +void QRectF_new5(QRect* rect, QRectF** outptr_QRectF); +void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF); bool QRectF_IsNull(const QRectF* self); bool QRectF_IsEmpty(const QRectF* self); bool QRectF_IsValid(const QRectF* self); @@ -188,7 +188,7 @@ QRectF* QRectF_OperatorPlusAssign(QRectF* self, QMarginsF* margins); QRectF* QRectF_OperatorMinusAssign(QRectF* self, QMarginsF* margins); QRect* QRectF_ToRect(const QRectF* self); QRect* QRectF_ToAlignedRect(const QRectF* self); -void QRectF_Delete(QRectF* self); +void QRectF_Delete(QRectF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrefcount.cpp b/qt6/gen_qrefcount.cpp index b0a9a31f..4b43e0ce 100644 --- a/qt6/gen_qrefcount.cpp +++ b/qt6/gen_qrefcount.cpp @@ -27,7 +27,11 @@ void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self) { self->initializeUnsharable(); } -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self) { - delete self; +void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrefcount.go b/qt6/gen_qrefcount.go index a15c7468..6c637210 100644 --- a/qt6/gen_qrefcount.go +++ b/qt6/gen_qrefcount.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__RefCount struct { - h *C.QtPrivate__RefCount + h *C.QtPrivate__RefCount + isSubclass bool } func (this *QtPrivate__RefCount) cPointer() *C.QtPrivate__RefCount { @@ -31,6 +32,7 @@ func (this *QtPrivate__RefCount) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__RefCount constructs the type using only CGO pointers. func newQtPrivate__RefCount(h *C.QtPrivate__RefCount) *QtPrivate__RefCount { if h == nil { return nil @@ -38,8 +40,13 @@ func newQtPrivate__RefCount(h *C.QtPrivate__RefCount) *QtPrivate__RefCount { return &QtPrivate__RefCount{h: h} } +// UnsafeNewQtPrivate__RefCount constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__RefCount(h unsafe.Pointer) *QtPrivate__RefCount { - return newQtPrivate__RefCount((*C.QtPrivate__RefCount)(h)) + if h == nil { + return nil + } + + return &QtPrivate__RefCount{h: (*C.QtPrivate__RefCount)(h)} } func (this *QtPrivate__RefCount) Ref() bool { @@ -68,7 +75,7 @@ func (this *QtPrivate__RefCount) InitializeUnsharable() { // Delete this object from C++ memory. func (this *QtPrivate__RefCount) Delete() { - C.QtPrivate__RefCount_Delete(this.h) + C.QtPrivate__RefCount_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrefcount.h b/qt6/gen_qrefcount.h index 36edd682..0813be7c 100644 --- a/qt6/gen_qrefcount.h +++ b/qt6/gen_qrefcount.h @@ -30,7 +30,7 @@ bool QtPrivate__RefCount_IsStatic(const QtPrivate__RefCount* self); bool QtPrivate__RefCount_IsShared(const QtPrivate__RefCount* self); void QtPrivate__RefCount_InitializeOwned(QtPrivate__RefCount* self); void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self); -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self); +void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qregion.cpp b/qt6/gen_qregion.cpp index ea1f1c37..1146203f 100644 --- a/qt6/gen_qregion.cpp +++ b/qt6/gen_qregion.cpp @@ -6,32 +6,39 @@ #include "gen_qregion.h" #include "_cgo_export.h" -QRegion* QRegion_new() { - return new QRegion(); +void QRegion_new(QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(); + *outptr_QRegion = ret; } -QRegion* QRegion_new2(int x, int y, int w, int h) { - return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); +void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); + *outptr_QRegion = ret; } -QRegion* QRegion_new3(QRect* r) { - return new QRegion(*r); +void QRegion_new3(QRect* r, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*r); + *outptr_QRegion = ret; } -QRegion* QRegion_new4(QRegion* region) { - return new QRegion(*region); +void QRegion_new4(QRegion* region, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*region); + *outptr_QRegion = ret; } -QRegion* QRegion_new5(QBitmap* bitmap) { - return new QRegion(*bitmap); +void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*bitmap); + *outptr_QRegion = ret; } -QRegion* QRegion_new6(int x, int y, int w, int h, int t) { - return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); +void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); + *outptr_QRegion = ret; } -QRegion* QRegion_new7(QRect* r, int t) { - return new QRegion(*r, static_cast(t)); +void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion) { + QRegion* ret = new QRegion(*r, static_cast(t)); + *outptr_QRegion = ret; } void QRegion_OperatorAssign(QRegion* self, QRegion* param1) { @@ -208,7 +215,11 @@ bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r) { return self->operator!=(*r); } -void QRegion_Delete(QRegion* self) { - delete self; +void QRegion_Delete(QRegion* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qregion.go b/qt6/gen_qregion.go index 15995711..e7a3aedd 100644 --- a/qt6/gen_qregion.go +++ b/qt6/gen_qregion.go @@ -21,7 +21,8 @@ const ( ) type QRegion struct { - h *C.QRegion + h *C.QRegion + isSubclass bool } func (this *QRegion) cPointer() *C.QRegion { @@ -38,6 +39,7 @@ func (this *QRegion) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegion constructs the type using only CGO pointers. func newQRegion(h *C.QRegion) *QRegion { if h == nil { return nil @@ -45,50 +47,83 @@ func newQRegion(h *C.QRegion) *QRegion { return &QRegion{h: h} } +// UnsafeNewQRegion constructs the type using only unsafe pointers. func UnsafeNewQRegion(h unsafe.Pointer) *QRegion { - return newQRegion((*C.QRegion)(h)) + if h == nil { + return nil + } + + return &QRegion{h: (*C.QRegion)(h)} } // NewQRegion constructs a new QRegion object. func NewQRegion() *QRegion { - ret := C.QRegion_new() - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new(&outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion2 constructs a new QRegion object. func NewQRegion2(x int, y int, w int, h int) *QRegion { - ret := C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion3 constructs a new QRegion object. func NewQRegion3(r *QRect) *QRegion { - ret := C.QRegion_new3(r.cPointer()) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new3(r.cPointer(), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion4 constructs a new QRegion object. func NewQRegion4(region *QRegion) *QRegion { - ret := C.QRegion_new4(region.cPointer()) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new4(region.cPointer(), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion5 constructs a new QRegion object. func NewQRegion5(bitmap *QBitmap) *QRegion { - ret := C.QRegion_new5(bitmap.cPointer()) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new5(bitmap.cPointer(), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion6 constructs a new QRegion object. func NewQRegion6(x int, y int, w int, h int, t QRegion__RegionType) *QRegion { - ret := C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t)) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } // NewQRegion7 constructs a new QRegion object. func NewQRegion7(r *QRect, t QRegion__RegionType) *QRegion { - ret := C.QRegion_new7(r.cPointer(), (C.int)(t)) - return newQRegion(ret) + var outptr_QRegion *C.QRegion = nil + + C.QRegion_new7(r.cPointer(), (C.int)(t), &outptr_QRegion) + ret := newQRegion(outptr_QRegion) + ret.isSubclass = true + return ret } func (this *QRegion) OperatorAssign(param1 *QRegion) { @@ -305,7 +340,7 @@ func (this *QRegion) OperatorNotEqual(r *QRegion) bool { // Delete this object from C++ memory. func (this *QRegion) Delete() { - C.QRegion_Delete(this.h) + C.QRegion_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qregion.h b/qt6/gen_qregion.h index 0549c448..8a976359 100644 --- a/qt6/gen_qregion.h +++ b/qt6/gen_qregion.h @@ -26,13 +26,13 @@ typedef struct QRect QRect; typedef struct QRegion QRegion; #endif -QRegion* QRegion_new(); -QRegion* QRegion_new2(int x, int y, int w, int h); -QRegion* QRegion_new3(QRect* r); -QRegion* QRegion_new4(QRegion* region); -QRegion* QRegion_new5(QBitmap* bitmap); -QRegion* QRegion_new6(int x, int y, int w, int h, int t); -QRegion* QRegion_new7(QRect* r, int t); +void QRegion_new(QRegion** outptr_QRegion); +void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion); +void QRegion_new3(QRect* r, QRegion** outptr_QRegion); +void QRegion_new4(QRegion* region, QRegion** outptr_QRegion); +void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion); +void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion); +void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion); void QRegion_OperatorAssign(QRegion* self, QRegion* param1); void QRegion_Swap(QRegion* self, QRegion* other); bool QRegion_IsEmpty(const QRegion* self); @@ -74,7 +74,7 @@ QRegion* QRegion_OperatorMinusAssign(QRegion* self, QRegion* r); void QRegion_OperatorBitwiseNotAssign(QRegion* self, QRegion* r); bool QRegion_OperatorEqual(const QRegion* self, QRegion* r); bool QRegion_OperatorNotEqual(const QRegion* self, QRegion* r); -void QRegion_Delete(QRegion* self); +void QRegion_Delete(QRegion* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qregularexpression.cpp b/qt6/gen_qregularexpression.cpp index 5ebdbd73..abcea432 100644 --- a/qt6/gen_qregularexpression.cpp +++ b/qt6/gen_qregularexpression.cpp @@ -11,22 +11,26 @@ #include "gen_qregularexpression.h" #include "_cgo_export.h" -QRegularExpression* QRegularExpression_new() { - return new QRegularExpression(); +void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression) { + QRegularExpression* ret = new QRegularExpression(); + *outptr_QRegularExpression = ret; } -QRegularExpression* QRegularExpression_new2(struct miqt_string pattern) { +void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegularExpression(pattern_QString); + QRegularExpression* ret = new QRegularExpression(pattern_QString); + *outptr_QRegularExpression = ret; } -QRegularExpression* QRegularExpression_new3(QRegularExpression* re) { - return new QRegularExpression(*re); +void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression) { + QRegularExpression* ret = new QRegularExpression(*re); + *outptr_QRegularExpression = ret; } -QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options) { +void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QRegularExpression(pattern_QString, static_cast(options)); + QRegularExpression* ret = new QRegularExpression(pattern_QString, static_cast(options)); + *outptr_QRegularExpression = ret; } int QRegularExpression_PatternOptions(const QRegularExpression* self) { @@ -206,16 +210,22 @@ struct miqt_string QRegularExpression_WildcardToRegularExpression2(struct miqt_s return _ms; } -void QRegularExpression_Delete(QRegularExpression* self) { - delete self; +void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRegularExpressionMatch* QRegularExpressionMatch_new() { - return new QRegularExpressionMatch(); +void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch) { + QRegularExpressionMatch* ret = new QRegularExpressionMatch(); + *outptr_QRegularExpressionMatch = ret; } -QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match) { - return new QRegularExpressionMatch(*match); +void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch) { + QRegularExpressionMatch* ret = new QRegularExpressionMatch(*match); + *outptr_QRegularExpressionMatch = ret; } void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match) { @@ -367,24 +377,35 @@ ptrdiff_t QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* se return static_cast(_ret); } -void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self) { - delete self; +void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new() { - return new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) { + QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* ret = new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(); + *outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel = ret; } -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* self) { - delete self; +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new() { - return new QRegularExpressionMatchIterator(); +void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { + QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(); + *outptr_QRegularExpressionMatchIterator = ret; } -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator) { - return new QRegularExpressionMatchIterator(*iterator); +void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { + QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(*iterator); + *outptr_QRegularExpressionMatchIterator = ret; } void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator) { @@ -425,16 +446,22 @@ int QRegularExpressionMatchIterator_MatchOptions(const QRegularExpressionMatchIt return static_cast(_ret); } -void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self) { - delete self; +void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new() { - return new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator(); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) { + QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator* ret = new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator(); + *outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = ret; } -QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(QRegularExpressionMatchIterator* iterator) { - return new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator(*iterator); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(QRegularExpressionMatchIterator* iterator, QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) { + QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator* ret = new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator(*iterator); + *outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = ret; } QRegularExpressionMatch* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_OperatorMultiply(const QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self) { @@ -443,7 +470,11 @@ QRegularExpressionMatch* QtPrivate__QRegularExpressionMatchIteratorRangeBasedFor return const_cast(&_ret); } -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self) { - delete self; +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qregularexpression.go b/qt6/gen_qregularexpression.go index 9df7e5c9..8da51ecd 100644 --- a/qt6/gen_qregularexpression.go +++ b/qt6/gen_qregularexpression.go @@ -52,7 +52,8 @@ const ( ) type QRegularExpression struct { - h *C.QRegularExpression + h *C.QRegularExpression + isSubclass bool } func (this *QRegularExpression) cPointer() *C.QRegularExpression { @@ -69,6 +70,7 @@ func (this *QRegularExpression) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegularExpression constructs the type using only CGO pointers. func newQRegularExpression(h *C.QRegularExpression) *QRegularExpression { if h == nil { return nil @@ -76,14 +78,23 @@ func newQRegularExpression(h *C.QRegularExpression) *QRegularExpression { return &QRegularExpression{h: h} } +// UnsafeNewQRegularExpression constructs the type using only unsafe pointers. func UnsafeNewQRegularExpression(h unsafe.Pointer) *QRegularExpression { - return newQRegularExpression((*C.QRegularExpression)(h)) + if h == nil { + return nil + } + + return &QRegularExpression{h: (*C.QRegularExpression)(h)} } // NewQRegularExpression constructs a new QRegularExpression object. func NewQRegularExpression() *QRegularExpression { - ret := C.QRegularExpression_new() - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new(&outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } // NewQRegularExpression2 constructs a new QRegularExpression object. @@ -92,14 +103,22 @@ func NewQRegularExpression2(pattern string) *QRegularExpression { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegularExpression_new2(pattern_ms) - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new2(pattern_ms, &outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } // NewQRegularExpression3 constructs a new QRegularExpression object. func NewQRegularExpression3(re *QRegularExpression) *QRegularExpression { - ret := C.QRegularExpression_new3(re.cPointer()) - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new3(re.cPointer(), &outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } // NewQRegularExpression4 constructs a new QRegularExpression object. @@ -108,8 +127,12 @@ func NewQRegularExpression4(pattern string, options QRegularExpression__PatternO pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QRegularExpression_new4(pattern_ms, (C.int)(options)) - return newQRegularExpression(ret) + var outptr_QRegularExpression *C.QRegularExpression = nil + + C.QRegularExpression_new4(pattern_ms, (C.int)(options), &outptr_QRegularExpression) + ret := newQRegularExpression(outptr_QRegularExpression) + ret.isSubclass = true + return ret } func (this *QRegularExpression) PatternOptions() QRegularExpression__PatternOption { @@ -321,7 +344,7 @@ func QRegularExpression_WildcardToRegularExpression2(str string, options QRegula // Delete this object from C++ memory. func (this *QRegularExpression) Delete() { - C.QRegularExpression_Delete(this.h) + C.QRegularExpression_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -334,7 +357,8 @@ func (this *QRegularExpression) GoGC() { } type QRegularExpressionMatch struct { - h *C.QRegularExpressionMatch + h *C.QRegularExpressionMatch + isSubclass bool } func (this *QRegularExpressionMatch) cPointer() *C.QRegularExpressionMatch { @@ -351,6 +375,7 @@ func (this *QRegularExpressionMatch) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegularExpressionMatch constructs the type using only CGO pointers. func newQRegularExpressionMatch(h *C.QRegularExpressionMatch) *QRegularExpressionMatch { if h == nil { return nil @@ -358,20 +383,33 @@ func newQRegularExpressionMatch(h *C.QRegularExpressionMatch) *QRegularExpressio return &QRegularExpressionMatch{h: h} } +// UnsafeNewQRegularExpressionMatch constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatch(h unsafe.Pointer) *QRegularExpressionMatch { - return newQRegularExpressionMatch((*C.QRegularExpressionMatch)(h)) + if h == nil { + return nil + } + + return &QRegularExpressionMatch{h: (*C.QRegularExpressionMatch)(h)} } // NewQRegularExpressionMatch constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch() *QRegularExpressionMatch { - ret := C.QRegularExpressionMatch_new() - return newQRegularExpressionMatch(ret) + var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil + + C.QRegularExpressionMatch_new(&outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret.isSubclass = true + return ret } // NewQRegularExpressionMatch2 constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch2(match *QRegularExpressionMatch) *QRegularExpressionMatch { - ret := C.QRegularExpressionMatch_new2(match.cPointer()) - return newQRegularExpressionMatch(ret) + var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil + + C.QRegularExpressionMatch_new2(match.cPointer(), &outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret.isSubclass = true + return ret } func (this *QRegularExpressionMatch) OperatorAssign(match *QRegularExpressionMatch) { @@ -513,7 +551,7 @@ func (this *QRegularExpressionMatch) CapturedEnd1(nth int) int64 { // Delete this object from C++ memory. func (this *QRegularExpressionMatch) Delete() { - C.QRegularExpressionMatch_Delete(this.h) + C.QRegularExpressionMatch_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -526,7 +564,8 @@ func (this *QRegularExpressionMatch) GoGC() { } type QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel struct { - h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel + h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel + isSubclass bool } func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) cPointer() *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { @@ -543,6 +582,7 @@ func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSenti return unsafe.Pointer(this.h) } +// newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel constructs the type using only CGO pointers. func newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { if h == nil { return nil @@ -550,19 +590,28 @@ func newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel( return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel{h: h} } +// UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(h unsafe.Pointer) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { - return newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel((*C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel{h: (*C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel)(h)} } // NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel constructs a new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel object. func NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel() *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { - ret := C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new() - return newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(ret) + var outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel = nil + + C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(&outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) + ret := newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) Delete() { - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(this.h) + C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -575,7 +624,8 @@ func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSenti } type QRegularExpressionMatchIterator struct { - h *C.QRegularExpressionMatchIterator + h *C.QRegularExpressionMatchIterator + isSubclass bool } func (this *QRegularExpressionMatchIterator) cPointer() *C.QRegularExpressionMatchIterator { @@ -592,6 +642,7 @@ func (this *QRegularExpressionMatchIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRegularExpressionMatchIterator constructs the type using only CGO pointers. func newQRegularExpressionMatchIterator(h *C.QRegularExpressionMatchIterator) *QRegularExpressionMatchIterator { if h == nil { return nil @@ -599,20 +650,33 @@ func newQRegularExpressionMatchIterator(h *C.QRegularExpressionMatchIterator) *Q return &QRegularExpressionMatchIterator{h: h} } +// UnsafeNewQRegularExpressionMatchIterator constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatchIterator(h unsafe.Pointer) *QRegularExpressionMatchIterator { - return newQRegularExpressionMatchIterator((*C.QRegularExpressionMatchIterator)(h)) + if h == nil { + return nil + } + + return &QRegularExpressionMatchIterator{h: (*C.QRegularExpressionMatchIterator)(h)} } // NewQRegularExpressionMatchIterator constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator() *QRegularExpressionMatchIterator { - ret := C.QRegularExpressionMatchIterator_new() - return newQRegularExpressionMatchIterator(ret) + var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil + + C.QRegularExpressionMatchIterator_new(&outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret.isSubclass = true + return ret } // NewQRegularExpressionMatchIterator2 constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator2(iterator *QRegularExpressionMatchIterator) *QRegularExpressionMatchIterator { - ret := C.QRegularExpressionMatchIterator_new2(iterator.cPointer()) - return newQRegularExpressionMatchIterator(ret) + var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil + + C.QRegularExpressionMatchIterator_new2(iterator.cPointer(), &outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret.isSubclass = true + return ret } func (this *QRegularExpressionMatchIterator) OperatorAssign(iterator *QRegularExpressionMatchIterator) { @@ -662,7 +726,7 @@ func (this *QRegularExpressionMatchIterator) MatchOptions() QRegularExpression__ // Delete this object from C++ memory. func (this *QRegularExpressionMatchIterator) Delete() { - C.QRegularExpressionMatchIterator_Delete(this.h) + C.QRegularExpressionMatchIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -675,7 +739,8 @@ func (this *QRegularExpressionMatchIterator) GoGC() { } type QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator struct { - h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator + h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator + isSubclass bool } func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) cPointer() *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { @@ -692,6 +757,7 @@ func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) Uns return unsafe.Pointer(this.h) } +// newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator constructs the type using only CGO pointers. func newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { if h == nil { return nil @@ -699,20 +765,33 @@ func newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(h *C.QtP return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator{h: h} } +// UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(h unsafe.Pointer) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - return newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator((*C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator{h: (*C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator)(h)} } // NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator constructs a new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator object. func NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator() *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - ret := C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new() - return newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(ret) + var outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = nil + + C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(&outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) + ret := newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) + ret.isSubclass = true + return ret } // NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator2 constructs a new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator object. func NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator2(iterator *QRegularExpressionMatchIterator) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - ret := C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(iterator.cPointer()) - return newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(ret) + var outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = nil + + C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(iterator.cPointer(), &outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) + ret := newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) + ret.isSubclass = true + return ret } func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) OperatorMultiply() *QRegularExpressionMatch { @@ -721,7 +800,7 @@ func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) Ope // Delete this object from C++ memory. func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) Delete() { - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(this.h) + C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qregularexpression.h b/qt6/gen_qregularexpression.h index 8c68e68e..fadc2552 100644 --- a/qt6/gen_qregularexpression.h +++ b/qt6/gen_qregularexpression.h @@ -36,10 +36,10 @@ typedef struct QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator Q typedef struct QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel; #endif -QRegularExpression* QRegularExpression_new(); -QRegularExpression* QRegularExpression_new2(struct miqt_string pattern); -QRegularExpression* QRegularExpression_new3(QRegularExpression* re); -QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options); +void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression); +void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression); +void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression); +void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression); int QRegularExpression_PatternOptions(const QRegularExpression* self); void QRegularExpression_SetPatternOptions(QRegularExpression* self, int options); void QRegularExpression_OperatorAssign(QRegularExpression* self, QRegularExpression* re); @@ -66,10 +66,10 @@ QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch2(const QRegularE QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch3(const QRegularExpression* self, struct miqt_string subject, ptrdiff_t offset, int matchType); QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch4(const QRegularExpression* self, struct miqt_string subject, ptrdiff_t offset, int matchType, int matchOptions); struct miqt_string QRegularExpression_WildcardToRegularExpression2(struct miqt_string str, int options); -void QRegularExpression_Delete(QRegularExpression* self); +void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass); -QRegularExpressionMatch* QRegularExpressionMatch_new(); -QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match); +void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch); +void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch); void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match); void QRegularExpressionMatch_Swap(QRegularExpressionMatch* self, QRegularExpressionMatch* other); QRegularExpression* QRegularExpressionMatch_RegularExpression(const QRegularExpressionMatch* self); @@ -94,13 +94,13 @@ struct miqt_string QRegularExpressionMatch_Captured1(const QRegularExpressionMat ptrdiff_t QRegularExpressionMatch_CapturedStart1(const QRegularExpressionMatch* self, int nth); ptrdiff_t QRegularExpressionMatch_CapturedLength1(const QRegularExpressionMatch* self, int nth); ptrdiff_t QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* self, int nth); -void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self); +void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass); -QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* self); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* self, bool isSubclass); -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new(); -QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator); +void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); +void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator); void QRegularExpressionMatchIterator_Swap(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* other); bool QRegularExpressionMatchIterator_IsValid(const QRegularExpressionMatchIterator* self); @@ -110,12 +110,12 @@ QRegularExpressionMatch* QRegularExpressionMatchIterator_PeekNext(const QRegular QRegularExpression* QRegularExpressionMatchIterator_RegularExpression(const QRegularExpressionMatchIterator* self); int QRegularExpressionMatchIterator_MatchType(const QRegularExpressionMatchIterator* self); int QRegularExpressionMatchIterator_MatchOptions(const QRegularExpressionMatchIterator* self); -void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self); +void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self, bool isSubclass); -QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(); -QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(QRegularExpressionMatchIterator* iterator); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(QRegularExpressionMatchIterator* iterator, QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator); QRegularExpressionMatch* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_OperatorMultiply(const QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self); +void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qresource.cpp b/qt6/gen_qresource.cpp index c474ba3f..d06e5bcd 100644 --- a/qt6/gen_qresource.cpp +++ b/qt6/gen_qresource.cpp @@ -9,18 +9,21 @@ #include "gen_qresource.h" #include "_cgo_export.h" -QResource* QResource_new() { - return new QResource(); +void QResource_new(QResource** outptr_QResource) { + QResource* ret = new QResource(); + *outptr_QResource = ret; } -QResource* QResource_new2(struct miqt_string file) { +void QResource_new2(struct miqt_string file, QResource** outptr_QResource) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QResource(file_QString); + QResource* ret = new QResource(file_QString); + *outptr_QResource = ret; } -QResource* QResource_new3(struct miqt_string file, QLocale* locale) { +void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource) { QString file_QString = QString::fromUtf8(file.data, file.len); - return new QResource(file_QString, *locale); + QResource* ret = new QResource(file_QString, *locale); + *outptr_QResource = ret; } void QResource_SetFileName(QResource* self, struct miqt_string file) { @@ -135,7 +138,11 @@ bool QResource_UnregisterResource22(const unsigned char* rccData, struct miqt_st return QResource::unregisterResource(static_cast(rccData), resourceRoot_QString); } -void QResource_Delete(QResource* self) { - delete self; +void QResource_Delete(QResource* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qresource.go b/qt6/gen_qresource.go index 03de8066..6eb30295 100644 --- a/qt6/gen_qresource.go +++ b/qt6/gen_qresource.go @@ -22,7 +22,8 @@ const ( ) type QResource struct { - h *C.QResource + h *C.QResource + isSubclass bool } func (this *QResource) cPointer() *C.QResource { @@ -39,6 +40,7 @@ func (this *QResource) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQResource constructs the type using only CGO pointers. func newQResource(h *C.QResource) *QResource { if h == nil { return nil @@ -46,14 +48,23 @@ func newQResource(h *C.QResource) *QResource { return &QResource{h: h} } +// UnsafeNewQResource constructs the type using only unsafe pointers. func UnsafeNewQResource(h unsafe.Pointer) *QResource { - return newQResource((*C.QResource)(h)) + if h == nil { + return nil + } + + return &QResource{h: (*C.QResource)(h)} } // NewQResource constructs a new QResource object. func NewQResource() *QResource { - ret := C.QResource_new() - return newQResource(ret) + var outptr_QResource *C.QResource = nil + + C.QResource_new(&outptr_QResource) + ret := newQResource(outptr_QResource) + ret.isSubclass = true + return ret } // NewQResource2 constructs a new QResource object. @@ -62,8 +73,12 @@ func NewQResource2(file string) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QResource_new2(file_ms) - return newQResource(ret) + var outptr_QResource *C.QResource = nil + + C.QResource_new2(file_ms, &outptr_QResource) + ret := newQResource(outptr_QResource) + ret.isSubclass = true + return ret } // NewQResource3 constructs a new QResource object. @@ -72,8 +87,12 @@ func NewQResource3(file string, locale *QLocale) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - ret := C.QResource_new3(file_ms, locale.cPointer()) - return newQResource(ret) + var outptr_QResource *C.QResource = nil + + C.QResource_new3(file_ms, locale.cPointer(), &outptr_QResource) + ret := newQResource(outptr_QResource) + ret.isSubclass = true + return ret } func (this *QResource) SetFileName(file string) { @@ -209,7 +228,7 @@ func QResource_UnregisterResource22(rccData *byte, resourceRoot string) bool { // Delete this object from C++ memory. func (this *QResource) Delete() { - C.QResource_Delete(this.h) + C.QResource_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qresource.h b/qt6/gen_qresource.h index 38fa094b..a0a8eb14 100644 --- a/qt6/gen_qresource.h +++ b/qt6/gen_qresource.h @@ -26,9 +26,9 @@ typedef struct QLocale QLocale; typedef struct QResource QResource; #endif -QResource* QResource_new(); -QResource* QResource_new2(struct miqt_string file); -QResource* QResource_new3(struct miqt_string file, QLocale* locale); +void QResource_new(QResource** outptr_QResource); +void QResource_new2(struct miqt_string file, QResource** outptr_QResource); +void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource); void QResource_SetFileName(QResource* self, struct miqt_string file); struct miqt_string QResource_FileName(const QResource* self); struct miqt_string QResource_AbsoluteFilePath(const QResource* self); @@ -49,7 +49,7 @@ bool QResource_RegisterResource2(struct miqt_string rccFilename, struct miqt_str bool QResource_UnregisterResource2(struct miqt_string rccFilename, struct miqt_string resourceRoot); bool QResource_RegisterResource22(const unsigned char* rccData, struct miqt_string resourceRoot); bool QResource_UnregisterResource22(const unsigned char* rccData, struct miqt_string resourceRoot); -void QResource_Delete(QResource* self); +void QResource_Delete(QResource* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qresultstore.cpp b/qt6/gen_qresultstore.cpp index 06e95544..a9234e79 100644 --- a/qt6/gen_qresultstore.cpp +++ b/qt6/gen_qresultstore.cpp @@ -5,16 +5,19 @@ #include "gen_qresultstore.h" #include "_cgo_export.h" -QtPrivate__ResultItem* QtPrivate__ResultItem_new(const void* _result, int _count) { - return new QtPrivate::ResultItem(_result, static_cast(_count)); +void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { + QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result, static_cast(_count)); + *outptr_QtPrivate__ResultItem = ret; } -QtPrivate__ResultItem* QtPrivate__ResultItem_new2(const void* _result) { - return new QtPrivate::ResultItem(_result); +void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { + QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result); + *outptr_QtPrivate__ResultItem = ret; } -QtPrivate__ResultItem* QtPrivate__ResultItem_new3() { - return new QtPrivate::ResultItem(); +void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { + QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(); + *outptr_QtPrivate__ResultItem = ret; } bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self) { @@ -29,12 +32,17 @@ int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self) { return self->count(); } -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self) { - delete self; +void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__ResultIteratorBase* QtPrivate__ResultIteratorBase_new() { - return new QtPrivate::ResultIteratorBase(); +void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase) { + QtPrivate::ResultIteratorBase* ret = new QtPrivate::ResultIteratorBase(); + *outptr_QtPrivate__ResultIteratorBase = ret; } int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self) { @@ -65,12 +73,17 @@ bool QtPrivate__ResultIteratorBase_IsValid(const QtPrivate__ResultIteratorBase* return self->isValid(); } -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self) { - delete self; +void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QtPrivate__ResultStoreBase* QtPrivate__ResultStoreBase_new() { - return new QtPrivate::ResultStoreBase(); +void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase) { + QtPrivate::ResultStoreBase* ret = new QtPrivate::ResultStoreBase(); + *outptr_QtPrivate__ResultStoreBase = ret; } void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable) { @@ -105,7 +118,11 @@ int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* sel return self->addCanceledResult(static_cast(index)); } -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self) { - delete self; +void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qresultstore.go b/qt6/gen_qresultstore.go index b494bedc..861d5e1f 100644 --- a/qt6/gen_qresultstore.go +++ b/qt6/gen_qresultstore.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__ResultItem struct { - h *C.QtPrivate__ResultItem + h *C.QtPrivate__ResultItem + isSubclass bool } func (this *QtPrivate__ResultItem) cPointer() *C.QtPrivate__ResultItem { @@ -31,6 +32,7 @@ func (this *QtPrivate__ResultItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ResultItem constructs the type using only CGO pointers. func newQtPrivate__ResultItem(h *C.QtPrivate__ResultItem) *QtPrivate__ResultItem { if h == nil { return nil @@ -38,26 +40,43 @@ func newQtPrivate__ResultItem(h *C.QtPrivate__ResultItem) *QtPrivate__ResultItem return &QtPrivate__ResultItem{h: h} } +// UnsafeNewQtPrivate__ResultItem constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ResultItem(h unsafe.Pointer) *QtPrivate__ResultItem { - return newQtPrivate__ResultItem((*C.QtPrivate__ResultItem)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ResultItem{h: (*C.QtPrivate__ResultItem)(h)} } // NewQtPrivate__ResultItem constructs a new QtPrivate::ResultItem object. func NewQtPrivate__ResultItem(_result unsafe.Pointer, _count int) *QtPrivate__ResultItem { - ret := C.QtPrivate__ResultItem_new(_result, (C.int)(_count)) - return newQtPrivate__ResultItem(ret) + var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil + + C.QtPrivate__ResultItem_new(_result, (C.int)(_count), &outptr_QtPrivate__ResultItem) + ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) + ret.isSubclass = true + return ret } // NewQtPrivate__ResultItem2 constructs a new QtPrivate::ResultItem object. func NewQtPrivate__ResultItem2(_result unsafe.Pointer) *QtPrivate__ResultItem { - ret := C.QtPrivate__ResultItem_new2(_result) - return newQtPrivate__ResultItem(ret) + var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil + + C.QtPrivate__ResultItem_new2(_result, &outptr_QtPrivate__ResultItem) + ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) + ret.isSubclass = true + return ret } // NewQtPrivate__ResultItem3 constructs a new QtPrivate::ResultItem object. func NewQtPrivate__ResultItem3() *QtPrivate__ResultItem { - ret := C.QtPrivate__ResultItem_new3() - return newQtPrivate__ResultItem(ret) + var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil + + C.QtPrivate__ResultItem_new3(&outptr_QtPrivate__ResultItem) + ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) + ret.isSubclass = true + return ret } func (this *QtPrivate__ResultItem) IsValid() bool { @@ -74,7 +93,7 @@ func (this *QtPrivate__ResultItem) Count() int { // Delete this object from C++ memory. func (this *QtPrivate__ResultItem) Delete() { - C.QtPrivate__ResultItem_Delete(this.h) + C.QtPrivate__ResultItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -87,7 +106,8 @@ func (this *QtPrivate__ResultItem) GoGC() { } type QtPrivate__ResultIteratorBase struct { - h *C.QtPrivate__ResultIteratorBase + h *C.QtPrivate__ResultIteratorBase + isSubclass bool } func (this *QtPrivate__ResultIteratorBase) cPointer() *C.QtPrivate__ResultIteratorBase { @@ -104,6 +124,7 @@ func (this *QtPrivate__ResultIteratorBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ResultIteratorBase constructs the type using only CGO pointers. func newQtPrivate__ResultIteratorBase(h *C.QtPrivate__ResultIteratorBase) *QtPrivate__ResultIteratorBase { if h == nil { return nil @@ -111,14 +132,23 @@ func newQtPrivate__ResultIteratorBase(h *C.QtPrivate__ResultIteratorBase) *QtPri return &QtPrivate__ResultIteratorBase{h: h} } +// UnsafeNewQtPrivate__ResultIteratorBase constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ResultIteratorBase(h unsafe.Pointer) *QtPrivate__ResultIteratorBase { - return newQtPrivate__ResultIteratorBase((*C.QtPrivate__ResultIteratorBase)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ResultIteratorBase{h: (*C.QtPrivate__ResultIteratorBase)(h)} } // NewQtPrivate__ResultIteratorBase constructs a new QtPrivate::ResultIteratorBase object. func NewQtPrivate__ResultIteratorBase() *QtPrivate__ResultIteratorBase { - ret := C.QtPrivate__ResultIteratorBase_new() - return newQtPrivate__ResultIteratorBase(ret) + var outptr_QtPrivate__ResultIteratorBase *C.QtPrivate__ResultIteratorBase = nil + + C.QtPrivate__ResultIteratorBase_new(&outptr_QtPrivate__ResultIteratorBase) + ret := newQtPrivate__ResultIteratorBase(outptr_QtPrivate__ResultIteratorBase) + ret.isSubclass = true + return ret } func (this *QtPrivate__ResultIteratorBase) VectorIndex() int { @@ -151,7 +181,7 @@ func (this *QtPrivate__ResultIteratorBase) IsValid() bool { // Delete this object from C++ memory. func (this *QtPrivate__ResultIteratorBase) Delete() { - C.QtPrivate__ResultIteratorBase_Delete(this.h) + C.QtPrivate__ResultIteratorBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -164,7 +194,8 @@ func (this *QtPrivate__ResultIteratorBase) GoGC() { } type QtPrivate__ResultStoreBase struct { - h *C.QtPrivate__ResultStoreBase + h *C.QtPrivate__ResultStoreBase + isSubclass bool } func (this *QtPrivate__ResultStoreBase) cPointer() *C.QtPrivate__ResultStoreBase { @@ -181,6 +212,7 @@ func (this *QtPrivate__ResultStoreBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__ResultStoreBase constructs the type using only CGO pointers. func newQtPrivate__ResultStoreBase(h *C.QtPrivate__ResultStoreBase) *QtPrivate__ResultStoreBase { if h == nil { return nil @@ -188,14 +220,23 @@ func newQtPrivate__ResultStoreBase(h *C.QtPrivate__ResultStoreBase) *QtPrivate__ return &QtPrivate__ResultStoreBase{h: h} } +// UnsafeNewQtPrivate__ResultStoreBase constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__ResultStoreBase(h unsafe.Pointer) *QtPrivate__ResultStoreBase { - return newQtPrivate__ResultStoreBase((*C.QtPrivate__ResultStoreBase)(h)) + if h == nil { + return nil + } + + return &QtPrivate__ResultStoreBase{h: (*C.QtPrivate__ResultStoreBase)(h)} } // NewQtPrivate__ResultStoreBase constructs a new QtPrivate::ResultStoreBase object. func NewQtPrivate__ResultStoreBase() *QtPrivate__ResultStoreBase { - ret := C.QtPrivate__ResultStoreBase_new() - return newQtPrivate__ResultStoreBase(ret) + var outptr_QtPrivate__ResultStoreBase *C.QtPrivate__ResultStoreBase = nil + + C.QtPrivate__ResultStoreBase_new(&outptr_QtPrivate__ResultStoreBase) + ret := newQtPrivate__ResultStoreBase(outptr_QtPrivate__ResultStoreBase) + ret.isSubclass = true + return ret } func (this *QtPrivate__ResultStoreBase) SetFilterMode(enable bool) { @@ -232,7 +273,7 @@ func (this *QtPrivate__ResultStoreBase) AddCanceledResult(index int) int { // Delete this object from C++ memory. func (this *QtPrivate__ResultStoreBase) Delete() { - C.QtPrivate__ResultStoreBase_Delete(this.h) + C.QtPrivate__ResultStoreBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qresultstore.h b/qt6/gen_qresultstore.h index 4a8965f7..f603a04d 100644 --- a/qt6/gen_qresultstore.h +++ b/qt6/gen_qresultstore.h @@ -36,15 +36,15 @@ typedef struct QtPrivate__ResultIteratorBase QtPrivate__ResultIteratorBase; typedef struct QtPrivate__ResultStoreBase QtPrivate__ResultStoreBase; #endif -QtPrivate__ResultItem* QtPrivate__ResultItem_new(const void* _result, int _count); -QtPrivate__ResultItem* QtPrivate__ResultItem_new2(const void* _result); -QtPrivate__ResultItem* QtPrivate__ResultItem_new3(); +void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); +void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); +void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self); bool QtPrivate__ResultItem_IsVector(const QtPrivate__ResultItem* self); int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self); -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self); +void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass); -QtPrivate__ResultIteratorBase* QtPrivate__ResultIteratorBase_new(); +void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase); int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self); int QtPrivate__ResultIteratorBase_ResultIndex(const QtPrivate__ResultIteratorBase* self); int QtPrivate__ResultIteratorBase_BatchSize(const QtPrivate__ResultIteratorBase* self); @@ -52,9 +52,9 @@ void QtPrivate__ResultIteratorBase_BatchedAdvance(QtPrivate__ResultIteratorBase* bool QtPrivate__ResultIteratorBase_IsVector(const QtPrivate__ResultIteratorBase* self); bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__ResultIteratorBase* self); bool QtPrivate__ResultIteratorBase_IsValid(const QtPrivate__ResultIteratorBase* self); -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self); +void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass); -QtPrivate__ResultStoreBase* QtPrivate__ResultStoreBase_new(); +void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase); void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable); bool QtPrivate__ResultStoreBase_FilterMode(const QtPrivate__ResultStoreBase* self); int QtPrivate__ResultStoreBase_AddResult(QtPrivate__ResultStoreBase* self, int index, const void* result); @@ -63,7 +63,7 @@ bool QtPrivate__ResultStoreBase_HasNextResult(const QtPrivate__ResultStoreBase* bool QtPrivate__ResultStoreBase_Contains(const QtPrivate__ResultStoreBase* self, int index); int QtPrivate__ResultStoreBase_Count(const QtPrivate__ResultStoreBase* self); int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* self, int index); -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self); +void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrgba64.cpp b/qt6/gen_qrgba64.cpp index 81f267d5..b008c03a 100644 --- a/qt6/gen_qrgba64.cpp +++ b/qt6/gen_qrgba64.cpp @@ -3,12 +3,14 @@ #include "gen_qrgba64.h" #include "_cgo_export.h" -QRgba64* QRgba64_new() { - return new QRgba64(); +void QRgba64_new(QRgba64** outptr_QRgba64) { + QRgba64* ret = new QRgba64(); + *outptr_QRgba64 = ret; } -QRgba64* QRgba64_new2(QRgba64* param1) { - return new QRgba64(*param1); +void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64) { + QRgba64* ret = new QRgba64(*param1); + *outptr_QRgba64 = ret; } QRgba64* QRgba64_FromRgba64(unsigned long long c) { @@ -113,7 +115,11 @@ void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba) { self->operator=(static_cast(_rgba)); } -void QRgba64_Delete(QRgba64* self) { - delete self; +void QRgba64_Delete(QRgba64* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrgba64.go b/qt6/gen_qrgba64.go index c4c8242f..db2f4277 100644 --- a/qt6/gen_qrgba64.go +++ b/qt6/gen_qrgba64.go @@ -14,7 +14,8 @@ import ( ) type QRgba64 struct { - h *C.QRgba64 + h *C.QRgba64 + isSubclass bool } func (this *QRgba64) cPointer() *C.QRgba64 { @@ -31,6 +32,7 @@ func (this *QRgba64) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRgba64 constructs the type using only CGO pointers. func newQRgba64(h *C.QRgba64) *QRgba64 { if h == nil { return nil @@ -38,20 +40,33 @@ func newQRgba64(h *C.QRgba64) *QRgba64 { return &QRgba64{h: h} } +// UnsafeNewQRgba64 constructs the type using only unsafe pointers. func UnsafeNewQRgba64(h unsafe.Pointer) *QRgba64 { - return newQRgba64((*C.QRgba64)(h)) + if h == nil { + return nil + } + + return &QRgba64{h: (*C.QRgba64)(h)} } // NewQRgba64 constructs a new QRgba64 object. func NewQRgba64() *QRgba64 { - ret := C.QRgba64_new() - return newQRgba64(ret) + var outptr_QRgba64 *C.QRgba64 = nil + + C.QRgba64_new(&outptr_QRgba64) + ret := newQRgba64(outptr_QRgba64) + ret.isSubclass = true + return ret } // NewQRgba642 constructs a new QRgba64 object. func NewQRgba642(param1 *QRgba64) *QRgba64 { - ret := C.QRgba64_new2(param1.cPointer()) - return newQRgba64(ret) + var outptr_QRgba64 *C.QRgba64 = nil + + C.QRgba64_new2(param1.cPointer(), &outptr_QRgba64) + ret := newQRgba64(outptr_QRgba64) + ret.isSubclass = true + return ret } func QRgba64_FromRgba64(c uint64) *QRgba64 { @@ -166,7 +181,7 @@ func (this *QRgba64) OperatorAssign(_rgba uint64) { // Delete this object from C++ memory. func (this *QRgba64) Delete() { - C.QRgba64_Delete(this.h) + C.QRgba64_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrgba64.h b/qt6/gen_qrgba64.h index 8273c366..f1d71927 100644 --- a/qt6/gen_qrgba64.h +++ b/qt6/gen_qrgba64.h @@ -20,8 +20,8 @@ class QRgba64; typedef struct QRgba64 QRgba64; #endif -QRgba64* QRgba64_new(); -QRgba64* QRgba64_new2(QRgba64* param1); +void QRgba64_new(QRgba64** outptr_QRgba64); +void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64); QRgba64* QRgba64_FromRgba64(unsigned long long c); QRgba64* QRgba64_FromRgba642(uint16_t red, uint16_t green, uint16_t blue, uint16_t alpha); QRgba64* QRgba64_FromRgba(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha); @@ -45,7 +45,7 @@ uint16_t QRgba64_ToRgb16(const QRgba64* self); QRgba64* QRgba64_Premultiplied(const QRgba64* self); QRgba64* QRgba64_Unpremultiplied(const QRgba64* self); void QRgba64_OperatorAssign(QRgba64* self, unsigned long long _rgba); -void QRgba64_Delete(QRgba64* self); +void QRgba64_Delete(QRgba64* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrubberband.cpp b/qt6/gen_qrubberband.cpp index a15abb28..92aac291 100644 --- a/qt6/gen_qrubberband.cpp +++ b/qt6/gen_qrubberband.cpp @@ -1,22 +1,1067 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qrubberband.h" #include "_cgo_export.h" -QRubberBand* QRubberBand_new(int param1) { - return new QRubberBand(static_cast(param1)); +class MiqtVirtualQRubberBand : public virtual QRubberBand { +public: + + MiqtVirtualQRubberBand(QRubberBand::Shape param1): QRubberBand(param1) {}; + MiqtVirtualQRubberBand(QRubberBand::Shape param1, QWidget* param2): QRubberBand(param1, param2) {}; + + virtual ~MiqtVirtualQRubberBand() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QRubberBand::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QRubberBand_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QRubberBand::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QRubberBand::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QRubberBand::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QRubberBand::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QRubberBand::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QRubberBand::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QRubberBand::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QRubberBand::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QRubberBand::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* param1) override { + if (handle__MoveEvent == 0) { + QRubberBand::moveEvent(param1); + return; + } + + QMoveEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* param1) { + + QRubberBand::moveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionRubberBand* option) const override { + if (handle__InitStyleOption == 0) { + QRubberBand::initStyleOption(option); + return; + } + + QStyleOptionRubberBand* sigval1 = option; + + miqt_exec_callback_QRubberBand_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionRubberBand* option) const { + + QRubberBand::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QRubberBand::devType(); + } + + + int callback_return_value = miqt_exec_callback_QRubberBand_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QRubberBand::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QRubberBand::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QRubberBand_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QRubberBand::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QRubberBand::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRubberBand_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QRubberBand::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QRubberBand::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QRubberBand_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QRubberBand::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QRubberBand::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QRubberBand_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QRubberBand::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QRubberBand::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QRubberBand_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QRubberBand::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QRubberBand::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QRubberBand_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QRubberBand::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QRubberBand::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QRubberBand::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QRubberBand::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QRubberBand::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QRubberBand::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QRubberBand::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QRubberBand::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QRubberBand::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QRubberBand::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QRubberBand::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QRubberBand::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QRubberBand::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QRubberBand::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QRubberBand::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QRubberBand::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QRubberBand::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QRubberBand::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QRubberBand::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QRubberBand::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QRubberBand::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QRubberBand::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QRubberBand::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QRubberBand::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QRubberBand::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QRubberBand::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QRubberBand::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QRubberBand::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QRubberBand::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QRubberBand::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QRubberBand::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QRubberBand::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QRubberBand::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QRubberBand::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QRubberBand::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QRubberBand::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QRubberBand::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QRubberBand::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QRubberBand::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QRubberBand::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QRubberBand_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QRubberBand::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QRubberBand::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QRubberBand_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QRubberBand::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QRubberBand::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QRubberBand_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QRubberBand::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QRubberBand::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QRubberBand_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QRubberBand::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QRubberBand::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QRubberBand_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QRubberBand::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QRubberBand::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QRubberBand_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QRubberBand::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QRubberBand::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QRubberBand_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QRubberBand::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QRubberBand::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QRubberBand_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QRubberBand::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QRubberBand::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QRubberBand_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QRubberBand::focusNextPrevChild(next); + + } + +}; + +void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1)); + *outptr_QRubberBand = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QRubberBand* QRubberBand_new2(int param1, QWidget* param2) { - return new QRubberBand(static_cast(param1), param2); +void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1), param2); + *outptr_QRubberBand = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QRubberBand_MetaObject(const QRubberBand* self) { @@ -89,7 +1134,347 @@ struct miqt_string QRubberBand_Tr3(const char* s, const char* c, int n) { return _ms; } -void QRubberBand_Delete(QRubberBand* self) { - delete self; +void QRubberBand_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__Event = slot; +} + +bool QRubberBand_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_Event(e); +} + +void QRubberBand_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__PaintEvent = slot; +} + +void QRubberBand_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_PaintEvent(param1); +} + +void QRubberBand_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ChangeEvent = slot; +} + +void QRubberBand_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QRubberBand_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ShowEvent = slot; +} + +void QRubberBand_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ShowEvent(param1); +} + +void QRubberBand_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ResizeEvent = slot; +} + +void QRubberBand_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QRubberBand_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MoveEvent = slot; +} + +void QRubberBand_virtualbase_MoveEvent(void* self, QMoveEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MoveEvent(param1); +} + +void QRubberBand_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InitStyleOption = slot; +} + +void QRubberBand_virtualbase_InitStyleOption(const void* self, QStyleOptionRubberBand* option) { + ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_InitStyleOption(option); +} + +void QRubberBand_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DevType = slot; +} + +int QRubberBand_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_DevType(); +} + +void QRubberBand_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__SetVisible = slot; +} + +void QRubberBand_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_SetVisible(visible); +} + +void QRubberBand_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__SizeHint = slot; +} + +QSize* QRubberBand_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_SizeHint(); +} + +void QRubberBand_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QRubberBand_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QRubberBand_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__HeightForWidth = slot; +} + +int QRubberBand_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QRubberBand_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QRubberBand_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QRubberBand_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QRubberBand_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_PaintEngine(); +} + +void QRubberBand_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MousePressEvent = slot; +} + +void QRubberBand_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MousePressEvent(event); +} + +void QRubberBand_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QRubberBand_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QRubberBand_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QRubberBand_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QRubberBand_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__MouseMoveEvent = slot; +} + +void QRubberBand_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QRubberBand_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__WheelEvent = slot; +} + +void QRubberBand_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_WheelEvent(event); +} + +void QRubberBand_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__KeyPressEvent = slot; +} + +void QRubberBand_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QRubberBand_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QRubberBand_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QRubberBand_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__FocusInEvent = slot; +} + +void QRubberBand_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_FocusInEvent(event); +} + +void QRubberBand_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__FocusOutEvent = slot; +} + +void QRubberBand_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QRubberBand_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__EnterEvent = slot; +} + +void QRubberBand_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_EnterEvent(event); +} + +void QRubberBand_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__LeaveEvent = slot; +} + +void QRubberBand_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_LeaveEvent(event); +} + +void QRubberBand_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__CloseEvent = slot; +} + +void QRubberBand_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_CloseEvent(event); +} + +void QRubberBand_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ContextMenuEvent = slot; +} + +void QRubberBand_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QRubberBand_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__TabletEvent = slot; +} + +void QRubberBand_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_TabletEvent(event); +} + +void QRubberBand_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__ActionEvent = slot; +} + +void QRubberBand_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_ActionEvent(event); +} + +void QRubberBand_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DragEnterEvent = slot; +} + +void QRubberBand_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QRubberBand_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DragMoveEvent = slot; +} + +void QRubberBand_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QRubberBand_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DragLeaveEvent = slot; +} + +void QRubberBand_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QRubberBand_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__DropEvent = slot; +} + +void QRubberBand_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_DropEvent(event); +} + +void QRubberBand_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__HideEvent = slot; +} + +void QRubberBand_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_HideEvent(event); +} + +void QRubberBand_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__NativeEvent = slot; +} + +bool QRubberBand_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QRubberBand_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__Metric = slot; +} + +int QRubberBand_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_Metric(param1); +} + +void QRubberBand_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InitPainter = slot; +} + +void QRubberBand_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_InitPainter(painter); +} + +void QRubberBand_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QRubberBand_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_Redirected(offset); +} + +void QRubberBand_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QRubberBand_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_SharedPainter(); +} + +void QRubberBand_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InputMethodEvent = slot; +} + +void QRubberBand_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QRubberBand_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QRubberBand_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQRubberBand*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QRubberBand_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QRubberBand*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QRubberBand_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQRubberBand*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QRubberBand_Delete(QRubberBand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrubberband.go b/qt6/gen_qrubberband.go index 18af93dd..9abf120a 100644 --- a/qt6/gen_qrubberband.go +++ b/qt6/gen_qrubberband.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -21,7 +22,8 @@ const ( ) type QRubberBand struct { - h *C.QRubberBand + h *C.QRubberBand + isSubclass bool *QWidget } @@ -39,27 +41,49 @@ func (this *QRubberBand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRubberBand(h *C.QRubberBand) *QRubberBand { +// newQRubberBand constructs the type using only CGO pointers. +func newQRubberBand(h *C.QRubberBand, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRubberBand { if h == nil { return nil } - return &QRubberBand{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QRubberBand{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQRubberBand(h unsafe.Pointer) *QRubberBand { - return newQRubberBand((*C.QRubberBand)(h)) +// UnsafeNewQRubberBand constructs the type using only unsafe pointers. +func UnsafeNewQRubberBand(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRubberBand { + if h == nil { + return nil + } + + return &QRubberBand{h: (*C.QRubberBand)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQRubberBand constructs a new QRubberBand object. func NewQRubberBand(param1 QRubberBand__Shape) *QRubberBand { - ret := C.QRubberBand_new((C.int)(param1)) - return newQRubberBand(ret) + var outptr_QRubberBand *C.QRubberBand = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRubberBand_new((C.int)(param1), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQRubberBand2 constructs a new QRubberBand object. func NewQRubberBand2(param1 QRubberBand__Shape, param2 *QWidget) *QRubberBand { - ret := C.QRubberBand_new2((C.int)(param1), param2.cPointer()) - return newQRubberBand(ret) + var outptr_QRubberBand *C.QRubberBand = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QRubberBand_new2((C.int)(param1), param2.cPointer(), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QRubberBand) MetaObject() *QMetaObject { @@ -131,9 +155,998 @@ func QRubberBand_Tr3(s string, c string, n int) string { return _ret } +func (this *QRubberBand) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QRubberBand_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QRubberBand) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QRubberBand_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_Event +func miqt_exec_callback_QRubberBand_Event(self *C.QRubberBand, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QRubberBand_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QRubberBand_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_PaintEvent +func miqt_exec_callback_QRubberBand_PaintEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QRubberBand_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QRubberBand_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ChangeEvent +func miqt_exec_callback_QRubberBand_ChangeEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QRubberBand_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QRubberBand_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ShowEvent +func miqt_exec_callback_QRubberBand_ShowEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QRubberBand_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QRubberBand_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ResizeEvent +func miqt_exec_callback_QRubberBand_ResizeEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MoveEvent(param1 *QMoveEvent) { + + C.QRubberBand_virtualbase_MoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnMoveEvent(slot func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) { + C.QRubberBand_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MoveEvent +func miqt_exec_callback_QRubberBand_MoveEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_InitStyleOption(option *QStyleOptionRubberBand) { + + C.QRubberBand_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QRubberBand) OnInitStyleOption(slot func(super func(option *QStyleOptionRubberBand), option *QStyleOptionRubberBand)) { + C.QRubberBand_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InitStyleOption +func miqt_exec_callback_QRubberBand_InitStyleOption(self *C.QRubberBand, cb C.intptr_t, option *C.QStyleOptionRubberBand) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionRubberBand), option *QStyleOptionRubberBand)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionRubberBand(unsafe.Pointer(option), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DevType() int { + + return (int)(C.QRubberBand_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QRubberBand) OnDevType(slot func(super func() int) int) { + C.QRubberBand_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DevType +func miqt_exec_callback_QRubberBand_DevType(self *C.QRubberBand, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_SetVisible(visible bool) { + + C.QRubberBand_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QRubberBand) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QRubberBand_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_SetVisible +func miqt_exec_callback_QRubberBand_SetVisible(self *C.QRubberBand, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QRubberBand{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_SizeHint() *QSize { + + _ret := C.QRubberBand_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRubberBand) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QRubberBand_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_SizeHint +func miqt_exec_callback_QRubberBand_SizeHint(self *C.QRubberBand, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QRubberBand_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRubberBand) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QRubberBand_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MinimumSizeHint +func miqt_exec_callback_QRubberBand_MinimumSizeHint(self *C.QRubberBand, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QRubberBand_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QRubberBand) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QRubberBand_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_HeightForWidth +func miqt_exec_callback_QRubberBand_HeightForWidth(self *C.QRubberBand, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QRubberBand_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QRubberBand) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QRubberBand_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_HasHeightForWidth +func miqt_exec_callback_QRubberBand_HasHeightForWidth(self *C.QRubberBand, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QRubberBand_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QRubberBand) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QRubberBand_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_PaintEngine +func miqt_exec_callback_QRubberBand_PaintEngine(self *C.QRubberBand, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MousePressEvent +func miqt_exec_callback_QRubberBand_MousePressEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MouseReleaseEvent +func miqt_exec_callback_QRubberBand_MouseReleaseEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MouseDoubleClickEvent +func miqt_exec_callback_QRubberBand_MouseDoubleClickEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QRubberBand_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QRubberBand_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_MouseMoveEvent +func miqt_exec_callback_QRubberBand_MouseMoveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QRubberBand_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QRubberBand_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_WheelEvent +func miqt_exec_callback_QRubberBand_WheelEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QRubberBand_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QRubberBand_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_KeyPressEvent +func miqt_exec_callback_QRubberBand_KeyPressEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QRubberBand_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QRubberBand_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_KeyReleaseEvent +func miqt_exec_callback_QRubberBand_KeyReleaseEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QRubberBand_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QRubberBand_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_FocusInEvent +func miqt_exec_callback_QRubberBand_FocusInEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QRubberBand_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QRubberBand_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_FocusOutEvent +func miqt_exec_callback_QRubberBand_FocusOutEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QRubberBand_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QRubberBand_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_EnterEvent +func miqt_exec_callback_QRubberBand_EnterEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QRubberBand_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QRubberBand_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_LeaveEvent +func miqt_exec_callback_QRubberBand_LeaveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QRubberBand_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QRubberBand_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_CloseEvent +func miqt_exec_callback_QRubberBand_CloseEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QRubberBand_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QRubberBand_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ContextMenuEvent +func miqt_exec_callback_QRubberBand_ContextMenuEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QRubberBand_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QRubberBand_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_TabletEvent +func miqt_exec_callback_QRubberBand_TabletEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QRubberBand_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QRubberBand_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_ActionEvent +func miqt_exec_callback_QRubberBand_ActionEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QRubberBand_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QRubberBand_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DragEnterEvent +func miqt_exec_callback_QRubberBand_DragEnterEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QRubberBand_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QRubberBand_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DragMoveEvent +func miqt_exec_callback_QRubberBand_DragMoveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QRubberBand_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QRubberBand_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DragLeaveEvent +func miqt_exec_callback_QRubberBand_DragLeaveEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QRubberBand_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QRubberBand_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_DropEvent +func miqt_exec_callback_QRubberBand_DropEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QRubberBand_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QRubberBand) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QRubberBand_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_HideEvent +func miqt_exec_callback_QRubberBand_HideEvent(self *C.QRubberBand, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QRubberBand_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QRubberBand) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QRubberBand_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_NativeEvent +func miqt_exec_callback_QRubberBand_NativeEvent(self *C.QRubberBand, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QRubberBand_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QRubberBand) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QRubberBand_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_Metric +func miqt_exec_callback_QRubberBand_Metric(self *C.QRubberBand, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QRubberBand) callVirtualBase_InitPainter(painter *QPainter) { + + C.QRubberBand_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QRubberBand) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QRubberBand_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InitPainter +func miqt_exec_callback_QRubberBand_InitPainter(self *C.QRubberBand, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QRubberBand{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QRubberBand_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QRubberBand) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QRubberBand_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_Redirected +func miqt_exec_callback_QRubberBand_Redirected(self *C.QRubberBand, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QRubberBand_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QRubberBand) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QRubberBand_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_SharedPainter +func miqt_exec_callback_QRubberBand_SharedPainter(self *C.QRubberBand, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QRubberBand_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QRubberBand) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QRubberBand_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InputMethodEvent +func miqt_exec_callback_QRubberBand_InputMethodEvent(self *C.QRubberBand, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QRubberBand{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QRubberBand) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QRubberBand_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QRubberBand) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QRubberBand_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_InputMethodQuery +func miqt_exec_callback_QRubberBand_InputMethodQuery(self *C.QRubberBand, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QRubberBand) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QRubberBand_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QRubberBand) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QRubberBand_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRubberBand_FocusNextPrevChild +func miqt_exec_callback_QRubberBand_FocusNextPrevChild(self *C.QRubberBand, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QRubberBand{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QRubberBand) Delete() { - C.QRubberBand_Delete(this.h) + C.QRubberBand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrubberband.h b/qt6/gen_qrubberband.h index a925bd65..683f7461 100644 --- a/qt6/gen_qrubberband.h +++ b/qt6/gen_qrubberband.h @@ -15,23 +15,77 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; class QRubberBand; +class QShowEvent; class QSize; +class QStyleOptionRubberBand; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; typedef struct QRubberBand QRubberBand; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionRubberBand QStyleOptionRubberBand; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QRubberBand* QRubberBand_new(int param1); -QRubberBand* QRubberBand_new2(int param1, QWidget* param2); +void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QRubberBand_MetaObject(const QRubberBand* self); void* QRubberBand_Metacast(QRubberBand* self, const char* param1); struct miqt_string QRubberBand_Tr(const char* s); @@ -42,9 +96,100 @@ void QRubberBand_Move(QRubberBand* self, int x, int y); void QRubberBand_MoveWithQPoint(QRubberBand* self, QPoint* p); void QRubberBand_Resize(QRubberBand* self, int w, int h); void QRubberBand_ResizeWithQSize(QRubberBand* self, QSize* s); +bool QRubberBand_Event(QRubberBand* self, QEvent* e); +void QRubberBand_PaintEvent(QRubberBand* self, QPaintEvent* param1); +void QRubberBand_ChangeEvent(QRubberBand* self, QEvent* param1); +void QRubberBand_ShowEvent(QRubberBand* self, QShowEvent* param1); +void QRubberBand_ResizeEvent(QRubberBand* self, QResizeEvent* param1); +void QRubberBand_MoveEvent(QRubberBand* self, QMoveEvent* param1); +void QRubberBand_InitStyleOption(const QRubberBand* self, QStyleOptionRubberBand* option); struct miqt_string QRubberBand_Tr2(const char* s, const char* c); struct miqt_string QRubberBand_Tr3(const char* s, const char* c, int n); -void QRubberBand_Delete(QRubberBand* self); +void QRubberBand_override_virtual_Event(void* self, intptr_t slot); +bool QRubberBand_virtualbase_Event(void* self, QEvent* e); +void QRubberBand_override_virtual_PaintEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QRubberBand_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QRubberBand_override_virtual_ShowEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QRubberBand_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QRubberBand_override_virtual_MoveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MoveEvent(void* self, QMoveEvent* param1); +void QRubberBand_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QRubberBand_virtualbase_InitStyleOption(const void* self, QStyleOptionRubberBand* option); +void QRubberBand_override_virtual_DevType(void* self, intptr_t slot); +int QRubberBand_virtualbase_DevType(const void* self); +void QRubberBand_override_virtual_SetVisible(void* self, intptr_t slot); +void QRubberBand_virtualbase_SetVisible(void* self, bool visible); +void QRubberBand_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QRubberBand_virtualbase_SizeHint(const void* self); +void QRubberBand_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QRubberBand_virtualbase_MinimumSizeHint(const void* self); +void QRubberBand_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QRubberBand_virtualbase_HeightForWidth(const void* self, int param1); +void QRubberBand_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QRubberBand_virtualbase_HasHeightForWidth(const void* self); +void QRubberBand_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QRubberBand_virtualbase_PaintEngine(const void* self); +void QRubberBand_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QRubberBand_override_virtual_WheelEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QRubberBand_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QRubberBand_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QRubberBand_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QRubberBand_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QRubberBand_override_virtual_EnterEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QRubberBand_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_LeaveEvent(void* self, QEvent* event); +void QRubberBand_override_virtual_CloseEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QRubberBand_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QRubberBand_override_virtual_TabletEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QRubberBand_override_virtual_ActionEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QRubberBand_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QRubberBand_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QRubberBand_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QRubberBand_override_virtual_DropEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_DropEvent(void* self, QDropEvent* event); +void QRubberBand_override_virtual_HideEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_HideEvent(void* self, QHideEvent* event); +void QRubberBand_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QRubberBand_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QRubberBand_override_virtual_Metric(void* self, intptr_t slot); +int QRubberBand_virtualbase_Metric(const void* self, int param1); +void QRubberBand_override_virtual_InitPainter(void* self, intptr_t slot); +void QRubberBand_virtualbase_InitPainter(const void* self, QPainter* painter); +void QRubberBand_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QRubberBand_virtualbase_Redirected(const void* self, QPoint* offset); +void QRubberBand_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QRubberBand_virtualbase_SharedPainter(const void* self); +void QRubberBand_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QRubberBand_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QRubberBand_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QRubberBand_virtualbase_InputMethodQuery(const void* self, int param1); +void QRubberBand_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QRubberBand_virtualbase_FocusNextPrevChild(void* self, bool next); +void QRubberBand_Delete(QRubberBand* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qrunnable.cpp b/qt6/gen_qrunnable.cpp index 716a8c0b..cdfa63b9 100644 --- a/qt6/gen_qrunnable.cpp +++ b/qt6/gen_qrunnable.cpp @@ -15,7 +15,11 @@ void QRunnable_SetAutoDelete(QRunnable* self, bool autoDelete) { self->setAutoDelete(autoDelete); } -void QRunnable_Delete(QRunnable* self) { - delete self; +void QRunnable_Delete(QRunnable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qrunnable.go b/qt6/gen_qrunnable.go index 32abd121..00597a6c 100644 --- a/qt6/gen_qrunnable.go +++ b/qt6/gen_qrunnable.go @@ -14,7 +14,8 @@ import ( ) type QRunnable struct { - h *C.QRunnable + h *C.QRunnable + isSubclass bool } func (this *QRunnable) cPointer() *C.QRunnable { @@ -31,6 +32,7 @@ func (this *QRunnable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQRunnable constructs the type using only CGO pointers. func newQRunnable(h *C.QRunnable) *QRunnable { if h == nil { return nil @@ -38,8 +40,13 @@ func newQRunnable(h *C.QRunnable) *QRunnable { return &QRunnable{h: h} } +// UnsafeNewQRunnable constructs the type using only unsafe pointers. func UnsafeNewQRunnable(h unsafe.Pointer) *QRunnable { - return newQRunnable((*C.QRunnable)(h)) + if h == nil { + return nil + } + + return &QRunnable{h: (*C.QRunnable)(h)} } func (this *QRunnable) Run() { @@ -56,7 +63,7 @@ func (this *QRunnable) SetAutoDelete(autoDelete bool) { // Delete this object from C++ memory. func (this *QRunnable) Delete() { - C.QRunnable_Delete(this.h) + C.QRunnable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qrunnable.h b/qt6/gen_qrunnable.h index 29751e55..6903485a 100644 --- a/qt6/gen_qrunnable.h +++ b/qt6/gen_qrunnable.h @@ -23,7 +23,7 @@ typedef struct QRunnable QRunnable; void QRunnable_Run(QRunnable* self); bool QRunnable_AutoDelete(const QRunnable* self); void QRunnable_SetAutoDelete(QRunnable* self, bool autoDelete); -void QRunnable_Delete(QRunnable* self); +void QRunnable_Delete(QRunnable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsavefile.cpp b/qt6/gen_qsavefile.cpp index 35da9386..ee2f28d9 100644 --- a/qt6/gen_qsavefile.cpp +++ b/qt6/gen_qsavefile.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -8,22 +11,371 @@ #include "gen_qsavefile.h" #include "_cgo_export.h" -QSaveFile* QSaveFile_new(struct miqt_string name) { +class MiqtVirtualQSaveFile : public virtual QSaveFile { +public: + + MiqtVirtualQSaveFile(const QString& name): QSaveFile(name) {}; + MiqtVirtualQSaveFile(): QSaveFile() {}; + MiqtVirtualQSaveFile(const QString& name, QObject* parent): QSaveFile(name, parent) {}; + MiqtVirtualQSaveFile(QObject* parent): QSaveFile(parent) {}; + + virtual ~MiqtVirtualQSaveFile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FileName = 0; + + // Subclass to allow providing a Go implementation + virtual QString fileName() const override { + if (handle__FileName == 0) { + return QSaveFile::fileName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QSaveFile_FileName(const_cast(this), handle__FileName); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FileName() const { + + QString _ret = QSaveFile::fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode flags) override { + if (handle__Open == 0) { + return QSaveFile::open(flags); + } + + QIODeviceBase::OpenMode flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int flags) { + + return QSaveFile::open(static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QSaveFile::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QSaveFile_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QSaveFile::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QSaveFile::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QSaveFile_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QSaveFile::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QSaveFile::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QSaveFile_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QSaveFile::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 offset) override { + if (handle__Seek == 0) { + return QSaveFile::seek(offset); + } + + qint64 offset_ret = offset; + long long sigval1 = static_cast(offset_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long offset) { + + return QSaveFile::seek(static_cast(offset)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QSaveFile::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QSaveFile_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QSaveFile::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QSaveFile::size(); + } + + + long long callback_return_value = miqt_exec_callback_QSaveFile_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QSaveFile::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resize = 0; + + // Subclass to allow providing a Go implementation + virtual bool resize(qint64 sz) override { + if (handle__Resize == 0) { + return QSaveFile::resize(sz); + } + + qint64 sz_ret = sz; + long long sigval1 = static_cast(sz_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_Resize(this, handle__Resize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Resize(long long sz) { + + return QSaveFile::resize(static_cast(sz)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Permissions = 0; + + // Subclass to allow providing a Go implementation + virtual QFileDevice::Permissions permissions() const override { + if (handle__Permissions == 0) { + return QSaveFile::permissions(); + } + + + int callback_return_value = miqt_exec_callback_QSaveFile_Permissions(const_cast(this), handle__Permissions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Permissions() const { + + QFileDevice::Permissions _ret = QSaveFile::permissions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPermissions = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPermissions(QFileDevice::Permissions permissionSpec) override { + if (handle__SetPermissions == 0) { + return QSaveFile::setPermissions(permissionSpec); + } + + QFileDevice::Permissions permissionSpec_ret = permissionSpec; + int sigval1 = static_cast(permissionSpec_ret); + + bool callback_return_value = miqt_exec_callback_QSaveFile_SetPermissions(this, handle__SetPermissions, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPermissions(int permissionSpec) { + + return QSaveFile::setPermissions(static_cast(permissionSpec)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QSaveFile::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSaveFile_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QSaveFile::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QSaveFile::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSaveFile_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QSaveFile::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSaveFile(name_QString); + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QSaveFile* QSaveFile_new2() { - return new QSaveFile(); +void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent) { +void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSaveFile(name_QString, parent); + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString, parent); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QSaveFile* QSaveFile_new4(QObject* parent) { - return new QSaveFile(parent); +void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(parent); + *outptr_QSaveFile = ret; + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QSaveFile_MetaObject(const QSaveFile* self) { @@ -103,7 +455,115 @@ struct miqt_string QSaveFile_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSaveFile_Delete(QSaveFile* self) { - delete self; +void QSaveFile_override_virtual_FileName(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__FileName = slot; +} + +struct miqt_string QSaveFile_virtualbase_FileName(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_FileName(); +} + +void QSaveFile_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Open = slot; +} + +bool QSaveFile_virtualbase_Open(void* self, int flags) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_Open(flags); +} + +void QSaveFile_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__WriteData = slot; +} + +long long QSaveFile_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QSaveFile_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__IsSequential = slot; +} + +bool QSaveFile_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_IsSequential(); +} + +void QSaveFile_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Pos = slot; +} + +long long QSaveFile_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_Pos(); +} + +void QSaveFile_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Seek = slot; +} + +bool QSaveFile_virtualbase_Seek(void* self, long long offset) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_Seek(offset); +} + +void QSaveFile_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__AtEnd = slot; +} + +bool QSaveFile_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_AtEnd(); +} + +void QSaveFile_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Size = slot; +} + +long long QSaveFile_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_Size(); +} + +void QSaveFile_override_virtual_Resize(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Resize = slot; +} + +bool QSaveFile_virtualbase_Resize(void* self, long long sz) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_Resize(sz); +} + +void QSaveFile_override_virtual_Permissions(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__Permissions = slot; +} + +int QSaveFile_virtualbase_Permissions(const void* self) { + return ( (const MiqtVirtualQSaveFile*)(self) )->virtualbase_Permissions(); +} + +void QSaveFile_override_virtual_SetPermissions(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__SetPermissions = slot; +} + +bool QSaveFile_virtualbase_SetPermissions(void* self, int permissionSpec) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_SetPermissions(permissionSpec); +} + +void QSaveFile_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__ReadData = slot; +} + +long long QSaveFile_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QSaveFile_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QSaveFile*)(self) )->handle__ReadLineData = slot; +} + +long long QSaveFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSaveFile*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QSaveFile_Delete(QSaveFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsavefile.go b/qt6/gen_qsavefile.go index efb7451c..9de52a8e 100644 --- a/qt6/gen_qsavefile.go +++ b/qt6/gen_qsavefile.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QSaveFile struct { - h *C.QSaveFile + h *C.QSaveFile + isSubclass bool *QFileDevice } @@ -32,15 +34,23 @@ func (this *QSaveFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSaveFile(h *C.QSaveFile) *QSaveFile { +// newQSaveFile constructs the type using only CGO pointers. +func newQSaveFile(h *C.QSaveFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QSaveFile { if h == nil { return nil } - return &QSaveFile{h: h, QFileDevice: UnsafeNewQFileDevice(unsafe.Pointer(h))} + return &QSaveFile{h: h, + QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQSaveFile(h unsafe.Pointer) *QSaveFile { - return newQSaveFile((*C.QSaveFile)(h)) +// UnsafeNewQSaveFile constructs the type using only unsafe pointers. +func UnsafeNewQSaveFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QSaveFile { + if h == nil { + return nil + } + + return &QSaveFile{h: (*C.QSaveFile)(h), + QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQSaveFile constructs a new QSaveFile object. @@ -49,14 +59,30 @@ func NewQSaveFile(name string) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSaveFile_new(name_ms) - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSaveFile_new(name_ms, &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQSaveFile2 constructs a new QSaveFile object. func NewQSaveFile2() *QSaveFile { - ret := C.QSaveFile_new2() - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSaveFile_new2(&outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQSaveFile3 constructs a new QSaveFile object. @@ -65,14 +91,30 @@ func NewQSaveFile3(name string, parent *QObject) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSaveFile_new3(name_ms, parent.cPointer()) - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSaveFile_new3(name_ms, parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQSaveFile4 constructs a new QSaveFile object. func NewQSaveFile4(parent *QObject) *QSaveFile { - ret := C.QSaveFile_new4(parent.cPointer()) - return newQSaveFile(ret) + var outptr_QSaveFile *C.QSaveFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSaveFile_new4(parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QSaveFile) MetaObject() *QMetaObject { @@ -151,9 +193,337 @@ func QSaveFile_Tr3(s string, c string, n int) string { return _ret } +func (this *QSaveFile) callVirtualBase_FileName() string { + + var _ms C.struct_miqt_string = C.QSaveFile_virtualbase_FileName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QSaveFile) OnFileName(slot func(super func() string) string) { + C.QSaveFile_override_virtual_FileName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_FileName +func miqt_exec_callback_QSaveFile_FileName(self *C.QSaveFile, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_FileName) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QSaveFile) callVirtualBase_Open(flags QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QSaveFile_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(flags))) + +} +func (this *QSaveFile) OnOpen(slot func(super func(flags QIODeviceBase__OpenModeFlag) bool, flags QIODeviceBase__OpenModeFlag) bool) { + C.QSaveFile_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Open +func miqt_exec_callback_QSaveFile_Open(self *C.QSaveFile, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QIODeviceBase__OpenModeFlag) bool, flags QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODeviceBase__OpenModeFlag)(flags) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSaveFile_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QSaveFile) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QSaveFile_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_WriteData +func miqt_exec_callback_QSaveFile_WriteData(self *C.QSaveFile, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_IsSequential() bool { + + return (bool)(C.QSaveFile_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnIsSequential(slot func(super func() bool) bool) { + C.QSaveFile_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_IsSequential +func miqt_exec_callback_QSaveFile_IsSequential(self *C.QSaveFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Pos() int64 { + + return (int64)(C.QSaveFile_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnPos(slot func(super func() int64) int64) { + C.QSaveFile_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Pos +func miqt_exec_callback_QSaveFile_Pos(self *C.QSaveFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Seek(offset int64) bool { + + return (bool)(C.QSaveFile_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(offset))) + +} +func (this *QSaveFile) OnSeek(slot func(super func(offset int64) bool, offset int64) bool) { + C.QSaveFile_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Seek +func miqt_exec_callback_QSaveFile_Seek(self *C.QSaveFile, cb C.intptr_t, offset C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset int64) bool, offset int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(offset) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_AtEnd() bool { + + return (bool)(C.QSaveFile_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnAtEnd(slot func(super func() bool) bool) { + C.QSaveFile_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_AtEnd +func miqt_exec_callback_QSaveFile_AtEnd(self *C.QSaveFile, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Size() int64 { + + return (int64)(C.QSaveFile_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnSize(slot func(super func() int64) int64) { + C.QSaveFile_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Size +func miqt_exec_callback_QSaveFile_Size(self *C.QSaveFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Resize(sz int64) bool { + + return (bool)(C.QSaveFile_virtualbase_Resize(unsafe.Pointer(this.h), (C.longlong)(sz))) + +} +func (this *QSaveFile) OnResize(slot func(super func(sz int64) bool, sz int64) bool) { + C.QSaveFile_override_virtual_Resize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Resize +func miqt_exec_callback_QSaveFile_Resize(self *C.QSaveFile, cb C.intptr_t, sz C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sz int64) bool, sz int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(sz) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Resize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_Permissions() QFileDevice__Permission { + + return (QFileDevice__Permission)(C.QSaveFile_virtualbase_Permissions(unsafe.Pointer(this.h))) + +} +func (this *QSaveFile) OnPermissions(slot func(super func() QFileDevice__Permission) QFileDevice__Permission) { + C.QSaveFile_override_virtual_Permissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_Permissions +func miqt_exec_callback_QSaveFile_Permissions(self *C.QSaveFile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QFileDevice__Permission) QFileDevice__Permission) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_Permissions) + + return (C.int)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_SetPermissions(permissionSpec QFileDevice__Permission) bool { + + return (bool)(C.QSaveFile_virtualbase_SetPermissions(unsafe.Pointer(this.h), (C.int)(permissionSpec))) + +} +func (this *QSaveFile) OnSetPermissions(slot func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) { + C.QSaveFile_override_virtual_SetPermissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_SetPermissions +func miqt_exec_callback_QSaveFile_SetPermissions(self *C.QSaveFile, cb C.intptr_t, permissionSpec C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileDevice__Permission)(permissionSpec) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_SetPermissions, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSaveFile_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSaveFile) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSaveFile_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_ReadData +func miqt_exec_callback_QSaveFile_ReadData(self *C.QSaveFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSaveFile) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSaveFile_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSaveFile) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSaveFile_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSaveFile_ReadLineData +func miqt_exec_callback_QSaveFile_ReadLineData(self *C.QSaveFile, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSaveFile{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSaveFile) Delete() { - C.QSaveFile_Delete(this.h) + C.QSaveFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsavefile.h b/qt6/gen_qsavefile.h index 52609267..cda256ae 100644 --- a/qt6/gen_qsavefile.h +++ b/qt6/gen_qsavefile.h @@ -15,19 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QFileDevice; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; class QSaveFile; #else +typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSaveFile QSaveFile; #endif -QSaveFile* QSaveFile_new(struct miqt_string name); -QSaveFile* QSaveFile_new2(); -QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent); -QSaveFile* QSaveFile_new4(QObject* parent); +void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QSaveFile_MetaObject(const QSaveFile* self); void* QSaveFile_Metacast(QSaveFile* self, const char* param1); struct miqt_string QSaveFile_Tr(const char* s); @@ -38,9 +44,36 @@ bool QSaveFile_Commit(QSaveFile* self); void QSaveFile_CancelWriting(QSaveFile* self); void QSaveFile_SetDirectWriteFallback(QSaveFile* self, bool enabled); bool QSaveFile_DirectWriteFallback(const QSaveFile* self); +long long QSaveFile_WriteData(QSaveFile* self, const char* data, long long lenVal); struct miqt_string QSaveFile_Tr2(const char* s, const char* c); struct miqt_string QSaveFile_Tr3(const char* s, const char* c, int n); -void QSaveFile_Delete(QSaveFile* self); +void QSaveFile_override_virtual_FileName(void* self, intptr_t slot); +struct miqt_string QSaveFile_virtualbase_FileName(const void* self); +void QSaveFile_override_virtual_Open(void* self, intptr_t slot); +bool QSaveFile_virtualbase_Open(void* self, int flags); +void QSaveFile_override_virtual_WriteData(void* self, intptr_t slot); +long long QSaveFile_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QSaveFile_override_virtual_IsSequential(void* self, intptr_t slot); +bool QSaveFile_virtualbase_IsSequential(const void* self); +void QSaveFile_override_virtual_Pos(void* self, intptr_t slot); +long long QSaveFile_virtualbase_Pos(const void* self); +void QSaveFile_override_virtual_Seek(void* self, intptr_t slot); +bool QSaveFile_virtualbase_Seek(void* self, long long offset); +void QSaveFile_override_virtual_AtEnd(void* self, intptr_t slot); +bool QSaveFile_virtualbase_AtEnd(const void* self); +void QSaveFile_override_virtual_Size(void* self, intptr_t slot); +long long QSaveFile_virtualbase_Size(const void* self); +void QSaveFile_override_virtual_Resize(void* self, intptr_t slot); +bool QSaveFile_virtualbase_Resize(void* self, long long sz); +void QSaveFile_override_virtual_Permissions(void* self, intptr_t slot); +int QSaveFile_virtualbase_Permissions(const void* self); +void QSaveFile_override_virtual_SetPermissions(void* self, intptr_t slot); +bool QSaveFile_virtualbase_SetPermissions(void* self, int permissionSpec); +void QSaveFile_override_virtual_ReadData(void* self, intptr_t slot); +long long QSaveFile_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QSaveFile_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QSaveFile_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QSaveFile_Delete(QSaveFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qscopedpointer.cpp b/qt6/gen_qscopedpointer.cpp index 2fb6ae8e..09f9f175 100644 --- a/qt6/gen_qscopedpointer.cpp +++ b/qt6/gen_qscopedpointer.cpp @@ -11,7 +11,11 @@ void QScopedPointerPodDeleter_OperatorCall(const QScopedPointerPodDeleter* self, self->operator()(pointer); } -void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self) { - delete self; +void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qscopedpointer.go b/qt6/gen_qscopedpointer.go index 5e89b6ca..7e9ba74b 100644 --- a/qt6/gen_qscopedpointer.go +++ b/qt6/gen_qscopedpointer.go @@ -14,7 +14,8 @@ import ( ) type QScopedPointerPodDeleter struct { - h *C.QScopedPointerPodDeleter + h *C.QScopedPointerPodDeleter + isSubclass bool } func (this *QScopedPointerPodDeleter) cPointer() *C.QScopedPointerPodDeleter { @@ -31,6 +32,7 @@ func (this *QScopedPointerPodDeleter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQScopedPointerPodDeleter constructs the type using only CGO pointers. func newQScopedPointerPodDeleter(h *C.QScopedPointerPodDeleter) *QScopedPointerPodDeleter { if h == nil { return nil @@ -38,8 +40,13 @@ func newQScopedPointerPodDeleter(h *C.QScopedPointerPodDeleter) *QScopedPointerP return &QScopedPointerPodDeleter{h: h} } +// UnsafeNewQScopedPointerPodDeleter constructs the type using only unsafe pointers. func UnsafeNewQScopedPointerPodDeleter(h unsafe.Pointer) *QScopedPointerPodDeleter { - return newQScopedPointerPodDeleter((*C.QScopedPointerPodDeleter)(h)) + if h == nil { + return nil + } + + return &QScopedPointerPodDeleter{h: (*C.QScopedPointerPodDeleter)(h)} } func QScopedPointerPodDeleter_Cleanup(pointer unsafe.Pointer) { @@ -52,7 +59,7 @@ func (this *QScopedPointerPodDeleter) OperatorCall(pointer unsafe.Pointer) { // Delete this object from C++ memory. func (this *QScopedPointerPodDeleter) Delete() { - C.QScopedPointerPodDeleter_Delete(this.h) + C.QScopedPointerPodDeleter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qscopedpointer.h b/qt6/gen_qscopedpointer.h index c6a2761b..2edee1d8 100644 --- a/qt6/gen_qscopedpointer.h +++ b/qt6/gen_qscopedpointer.h @@ -22,7 +22,7 @@ typedef struct QScopedPointerPodDeleter QScopedPointerPodDeleter; void QScopedPointerPodDeleter_Cleanup(void* pointer); void QScopedPointerPodDeleter_OperatorCall(const QScopedPointerPodDeleter* self, void* pointer); -void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self); +void QScopedPointerPodDeleter_Delete(QScopedPointerPodDeleter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qscreen.cpp b/qt6/gen_qscreen.cpp index 559c5d89..0c82d9e1 100644 --- a/qt6/gen_qscreen.cpp +++ b/qt6/gen_qscreen.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -367,7 +368,11 @@ QPixmap* QScreen_GrabWindow5(QScreen* self, uintptr_t window, int x, int y, int return new QPixmap(self->grabWindow(static_cast(window), static_cast(x), static_cast(y), static_cast(w), static_cast(h))); } -void QScreen_Delete(QScreen* self) { - delete self; +void QScreen_Delete(QScreen* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qscreen.go b/qt6/gen_qscreen.go index 0b7a3d01..166a4234 100644 --- a/qt6/gen_qscreen.go +++ b/qt6/gen_qscreen.go @@ -15,7 +15,8 @@ import ( ) type QScreen struct { - h *C.QScreen + h *C.QScreen + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QScreen) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScreen(h *C.QScreen) *QScreen { +// newQScreen constructs the type using only CGO pointers. +func newQScreen(h *C.QScreen, h_QObject *C.QObject) *QScreen { if h == nil { return nil } - return &QScreen{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QScreen{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQScreen(h unsafe.Pointer) *QScreen { - return newQScreen((*C.QScreen)(h)) +// UnsafeNewQScreen constructs the type using only unsafe pointers. +func UnsafeNewQScreen(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScreen { + if h == nil { + return nil + } + + return &QScreen{h: (*C.QScreen)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QScreen) MetaObject() *QMetaObject { @@ -163,13 +172,13 @@ func (this *QScreen) VirtualSiblings() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQScreen(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QScreen) VirtualSiblingAt(point QPoint) *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QScreen_VirtualSiblingAt(this.h, point.cPointer()))) + return UnsafeNewQScreen(unsafe.Pointer(C.QScreen_VirtualSiblingAt(this.h, point.cPointer())), nil) } func (this *QScreen) VirtualSize() *QSize { @@ -240,7 +249,7 @@ func (this *QScreen) IsLandscape(orientation ScreenOrientation) bool { func (this *QScreen) GrabWindow() *QPixmap { _ret := C.QScreen_GrabWindow(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -453,42 +462,42 @@ func QScreen_Tr3(s string, c string, n int) string { func (this *QScreen) GrabWindow1(window uintptr) *QPixmap { _ret := C.QScreen_GrabWindow1(this.h, (C.uintptr_t)(window)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow2(window uintptr, x int) *QPixmap { _ret := C.QScreen_GrabWindow2(this.h, (C.uintptr_t)(window), (C.int)(x)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow3(window uintptr, x int, y int) *QPixmap { _ret := C.QScreen_GrabWindow3(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow4(window uintptr, x int, y int, w int) *QPixmap { _ret := C.QScreen_GrabWindow4(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow5(window uintptr, x int, y int, w int, h int) *QPixmap { _ret := C.QScreen_GrabWindow5(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } // Delete this object from C++ memory. func (this *QScreen) Delete() { - C.QScreen_Delete(this.h) + C.QScreen_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qscreen.h b/qt6/gen_qscreen.h index 3ff5584c..74e402fa 100644 --- a/qt6/gen_qscreen.h +++ b/qt6/gen_qscreen.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QPixmap; class QPoint; class QRect; @@ -25,6 +26,7 @@ class QSizeF; class QTransform; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPixmap QPixmap; typedef struct QPoint QPoint; typedef struct QRect QRect; @@ -95,7 +97,7 @@ QPixmap* QScreen_GrabWindow2(QScreen* self, uintptr_t window, int x); QPixmap* QScreen_GrabWindow3(QScreen* self, uintptr_t window, int x, int y); QPixmap* QScreen_GrabWindow4(QScreen* self, uintptr_t window, int x, int y, int w); QPixmap* QScreen_GrabWindow5(QScreen* self, uintptr_t window, int x, int y, int w, int h); -void QScreen_Delete(QScreen* self); +void QScreen_Delete(QScreen* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qscrollarea.cpp b/qt6/gen_qscrollarea.cpp index 5a497319..aa5e61bb 100644 --- a/qt6/gen_qscrollarea.cpp +++ b/qt6/gen_qscrollarea.cpp @@ -1,20 +1,577 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include #include #include "gen_qscrollarea.h" #include "_cgo_export.h" -QScrollArea* QScrollArea_new(QWidget* parent) { - return new QScrollArea(parent); +class MiqtVirtualQScrollArea : public virtual QScrollArea { +public: + + MiqtVirtualQScrollArea(QWidget* parent): QScrollArea(parent) {}; + MiqtVirtualQScrollArea(): QScrollArea() {}; + + virtual ~MiqtVirtualQScrollArea() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QScrollArea::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollArea_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QScrollArea::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QScrollArea::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QScrollArea_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QScrollArea::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QScrollArea::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QScrollArea_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QScrollArea::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QScrollArea::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QScrollArea_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QScrollArea::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QScrollArea::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QScrollArea::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QScrollArea::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QScrollArea_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QScrollArea::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QScrollArea::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollArea_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QScrollArea::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QScrollArea::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollArea_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QScrollArea::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QScrollArea::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QScrollArea_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QScrollArea::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QScrollArea::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QScrollArea_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QScrollArea::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QScrollArea::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QScrollArea::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QScrollArea::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QScrollArea::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QScrollArea::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QScrollArea::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QScrollArea::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QScrollArea::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QScrollArea::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QScrollArea::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QScrollArea::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QScrollArea::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QScrollArea::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QScrollArea::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QScrollArea::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QScrollArea::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QScrollArea::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QScrollArea::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QScrollArea::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QScrollArea::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QScrollArea::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QScrollArea::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QScrollArea::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QScrollArea_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QScrollArea::keyPressEvent(param1); + + } + +}; + +void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(parent); + *outptr_QScrollArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollArea* QScrollArea_new2() { - return new QScrollArea(); +void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(); + *outptr_QScrollArea = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QScrollArea_MetaObject(const QScrollArea* self) { @@ -119,7 +676,187 @@ void QScrollArea_EnsureWidgetVisible3(QScrollArea* self, QWidget* childWidget, i self->ensureWidgetVisible(childWidget, static_cast(xmargin), static_cast(ymargin)); } -void QScrollArea_Delete(QScrollArea* self) { - delete self; +void QScrollArea_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__SizeHint = slot; +} + +QSize* QScrollArea_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQScrollArea*)(self) )->virtualbase_SizeHint(); +} + +void QScrollArea_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QScrollArea_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QScrollArea_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__Event = slot; +} + +bool QScrollArea_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_Event(param1); +} + +void QScrollArea_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__EventFilter = slot; +} + +bool QScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ResizeEvent = slot; +} + +void QScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ScrollContentsBy = slot; +} + +void QScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QScrollArea_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQScrollArea*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QScrollArea_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQScrollArea*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__SetupViewport = slot; +} + +void QScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ViewportEvent = slot; +} + +bool QScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__PaintEvent = slot; +} + +void QScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_PaintEvent(param1); +} + +void QScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MousePressEvent = slot; +} + +void QScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__MouseMoveEvent = slot; +} + +void QScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__WheelEvent = slot; +} + +void QScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_WheelEvent(param1); +} + +void QScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__ContextMenuEvent = slot; +} + +void QScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DragEnterEvent = slot; +} + +void QScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DragMoveEvent = slot; +} + +void QScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DragLeaveEvent = slot; +} + +void QScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QScrollArea_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__DropEvent = slot; +} + +void QScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_DropEvent(param1); +} + +void QScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollArea*)(self) )->handle__KeyPressEvent = slot; +} + +void QScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQScrollArea*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QScrollArea_Delete(QScrollArea* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qscrollarea.go b/qt6/gen_qscrollarea.go index 94dc1a01..f1a2d652 100644 --- a/qt6/gen_qscrollarea.go +++ b/qt6/gen_qscrollarea.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QScrollArea struct { - h *C.QScrollArea + h *C.QScrollArea + isSubclass bool *QAbstractScrollArea } @@ -32,27 +34,53 @@ func (this *QScrollArea) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollArea(h *C.QScrollArea) *QScrollArea { +// newQScrollArea constructs the type using only CGO pointers. +func newQScrollArea(h *C.QScrollArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollArea { if h == nil { return nil } - return &QScrollArea{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QScrollArea{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQScrollArea(h unsafe.Pointer) *QScrollArea { - return newQScrollArea((*C.QScrollArea)(h)) +// UnsafeNewQScrollArea constructs the type using only unsafe pointers. +func UnsafeNewQScrollArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollArea { + if h == nil { + return nil + } + + return &QScrollArea{h: (*C.QScrollArea)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQScrollArea constructs a new QScrollArea object. func NewQScrollArea(parent *QWidget) *QScrollArea { - ret := C.QScrollArea_new(parent.cPointer()) - return newQScrollArea(ret) + var outptr_QScrollArea *C.QScrollArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollArea_new(parent.cPointer(), &outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollArea2 constructs a new QScrollArea object. func NewQScrollArea2() *QScrollArea { - ret := C.QScrollArea_new2() - return newQScrollArea(ret) + var outptr_QScrollArea *C.QScrollArea = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollArea_new2(&outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QScrollArea) MetaObject() *QMetaObject { @@ -75,7 +103,7 @@ func QScrollArea_Tr(s string) string { } func (this *QScrollArea) Widget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_Widget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_Widget(this.h)), nil, nil) } func (this *QScrollArea) SetWidget(widget *QWidget) { @@ -83,7 +111,7 @@ func (this *QScrollArea) SetWidget(widget *QWidget) { } func (this *QScrollArea) TakeWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_TakeWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QScrollArea_TakeWidget(this.h)), nil, nil) } func (this *QScrollArea) WidgetResizable() bool { @@ -159,9 +187,532 @@ func (this *QScrollArea) EnsureWidgetVisible3(childWidget *QWidget, xmargin int, C.QScrollArea_EnsureWidgetVisible3(this.h, childWidget.cPointer(), (C.int)(xmargin), (C.int)(ymargin)) } +func (this *QScrollArea) callVirtualBase_SizeHint() *QSize { + + _ret := C.QScrollArea_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollArea) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollArea_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_SizeHint +func miqt_exec_callback_QScrollArea_SizeHint(self *C.QScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollArea) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QScrollArea_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QScrollArea) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QScrollArea_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_FocusNextPrevChild +func miqt_exec_callback_QScrollArea_FocusNextPrevChild(self *C.QScrollArea, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QScrollArea_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QScrollArea) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QScrollArea_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_Event +func miqt_exec_callback_QScrollArea_Event(self *C.QScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QScrollArea_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QScrollArea) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QScrollArea_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_EventFilter +func miqt_exec_callback_QScrollArea_EventFilter(self *C.QScrollArea, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QScrollArea_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QScrollArea_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ResizeEvent +func miqt_exec_callback_QScrollArea_ResizeEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QScrollArea_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QScrollArea) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QScrollArea_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ScrollContentsBy +func miqt_exec_callback_QScrollArea_ScrollContentsBy(self *C.QScrollArea, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QScrollArea{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QScrollArea) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QScrollArea_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollArea) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollArea_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ViewportSizeHint +func miqt_exec_callback_QScrollArea_ViewportSizeHint(self *C.QScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollArea) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QScrollArea_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollArea) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollArea_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MinimumSizeHint +func miqt_exec_callback_QScrollArea_MinimumSizeHint(self *C.QScrollArea, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollArea) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QScrollArea_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QScrollArea) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QScrollArea_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_SetupViewport +func miqt_exec_callback_QScrollArea_SetupViewport(self *C.QScrollArea, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QScrollArea_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QScrollArea) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QScrollArea_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ViewportEvent +func miqt_exec_callback_QScrollArea_ViewportEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QScrollArea{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollArea) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QScrollArea_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QScrollArea_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_PaintEvent +func miqt_exec_callback_QScrollArea_PaintEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MousePressEvent +func miqt_exec_callback_QScrollArea_MousePressEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MouseReleaseEvent +func miqt_exec_callback_QScrollArea_MouseReleaseEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MouseDoubleClickEvent +func miqt_exec_callback_QScrollArea_MouseDoubleClickEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QScrollArea_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollArea_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_MouseMoveEvent +func miqt_exec_callback_QScrollArea_MouseMoveEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QScrollArea_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QScrollArea_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_WheelEvent +func miqt_exec_callback_QScrollArea_WheelEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QScrollArea_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QScrollArea_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_ContextMenuEvent +func miqt_exec_callback_QScrollArea_ContextMenuEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DragEnterEvent(param1 *QDragEnterEvent) { + + C.QScrollArea_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDragEnterEvent(slot func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) { + C.QScrollArea_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DragEnterEvent +func miqt_exec_callback_QScrollArea_DragEnterEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragEnterEvent), param1 *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DragMoveEvent(param1 *QDragMoveEvent) { + + C.QScrollArea_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDragMoveEvent(slot func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) { + C.QScrollArea_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DragMoveEvent +func miqt_exec_callback_QScrollArea_DragMoveEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragMoveEvent), param1 *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DragLeaveEvent(param1 *QDragLeaveEvent) { + + C.QScrollArea_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDragLeaveEvent(slot func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) { + C.QScrollArea_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DragLeaveEvent +func miqt_exec_callback_QScrollArea_DragLeaveEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDragLeaveEvent), param1 *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_DropEvent(param1 *QDropEvent) { + + C.QScrollArea_virtualbase_DropEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnDropEvent(slot func(super func(param1 *QDropEvent), param1 *QDropEvent)) { + C.QScrollArea_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_DropEvent +func miqt_exec_callback_QScrollArea_DropEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QDropEvent), param1 *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QScrollArea) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QScrollArea_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollArea) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QScrollArea_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollArea_KeyPressEvent +func miqt_exec_callback_QScrollArea_KeyPressEvent(self *C.QScrollArea, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QScrollArea) Delete() { - C.QScrollArea_Delete(this.h) + C.QScrollArea_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qscrollarea.h b/qt6/gen_qscrollarea.h index da70a4a6..10e1af9a 100644 --- a/qt6/gen_qscrollarea.h +++ b/qt6/gen_qscrollarea.h @@ -15,19 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; class QScrollArea; class QSize; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; typedef struct QScrollArea QScrollArea; typedef struct QSize QSize; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QScrollArea* QScrollArea_new(QWidget* parent); -QScrollArea* QScrollArea_new2(); +void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QScrollArea_MetaObject(const QScrollArea* self); void* QScrollArea_Metacast(QScrollArea* self, const char* param1); struct miqt_string QScrollArea_Tr(const char* s); @@ -42,13 +72,62 @@ int QScrollArea_Alignment(const QScrollArea* self); void QScrollArea_SetAlignment(QScrollArea* self, int alignment); void QScrollArea_EnsureVisible(QScrollArea* self, int x, int y); void QScrollArea_EnsureWidgetVisible(QScrollArea* self, QWidget* childWidget); +bool QScrollArea_Event(QScrollArea* self, QEvent* param1); +bool QScrollArea_EventFilter(QScrollArea* self, QObject* param1, QEvent* param2); +void QScrollArea_ResizeEvent(QScrollArea* self, QResizeEvent* param1); +void QScrollArea_ScrollContentsBy(QScrollArea* self, int dx, int dy); +QSize* QScrollArea_ViewportSizeHint(const QScrollArea* self); struct miqt_string QScrollArea_Tr2(const char* s, const char* c); struct miqt_string QScrollArea_Tr3(const char* s, const char* c, int n); void QScrollArea_EnsureVisible3(QScrollArea* self, int x, int y, int xmargin); void QScrollArea_EnsureVisible4(QScrollArea* self, int x, int y, int xmargin, int ymargin); void QScrollArea_EnsureWidgetVisible2(QScrollArea* self, QWidget* childWidget, int xmargin); void QScrollArea_EnsureWidgetVisible3(QScrollArea* self, QWidget* childWidget, int xmargin, int ymargin); -void QScrollArea_Delete(QScrollArea* self); +void QScrollArea_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QScrollArea_virtualbase_SizeHint(const void* self); +void QScrollArea_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QScrollArea_virtualbase_FocusNextPrevChild(void* self, bool next); +void QScrollArea_override_virtual_Event(void* self, intptr_t slot); +bool QScrollArea_virtualbase_Event(void* self, QEvent* param1); +void QScrollArea_override_virtual_EventFilter(void* self, intptr_t slot); +bool QScrollArea_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QScrollArea_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QScrollArea_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QScrollArea_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QScrollArea_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QScrollArea_virtualbase_ViewportSizeHint(const void* self); +void QScrollArea_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QScrollArea_virtualbase_MinimumSizeHint(const void* self); +void QScrollArea_override_virtual_SetupViewport(void* self, intptr_t slot); +void QScrollArea_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QScrollArea_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QScrollArea_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QScrollArea_override_virtual_PaintEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QScrollArea_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QScrollArea_override_virtual_WheelEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QScrollArea_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QScrollArea_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QScrollArea_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QScrollArea_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QScrollArea_override_virtual_DropEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QScrollArea_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QScrollArea_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QScrollArea_Delete(QScrollArea* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qscrollbar.cpp b/qt6/gen_qscrollbar.cpp index b7ecd3b7..e3e5fdf8 100644 --- a/qt6/gen_qscrollbar.cpp +++ b/qt6/gen_qscrollbar.cpp @@ -1,29 +1,406 @@ +#include +#include #include +#include +#include #include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qscrollbar.h" #include "_cgo_export.h" -QScrollBar* QScrollBar_new(QWidget* parent) { - return new QScrollBar(parent); +class MiqtVirtualQScrollBar : public virtual QScrollBar { +public: + + MiqtVirtualQScrollBar(QWidget* parent): QScrollBar(parent) {}; + MiqtVirtualQScrollBar(): QScrollBar() {}; + MiqtVirtualQScrollBar(Qt::Orientation param1): QScrollBar(param1) {}; + MiqtVirtualQScrollBar(Qt::Orientation param1, QWidget* parent): QScrollBar(param1, parent) {}; + + virtual ~MiqtVirtualQScrollBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QScrollBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QScrollBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QScrollBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QScrollBar::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QScrollBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QScrollBar::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QScrollBar::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QScrollBar::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QScrollBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QScrollBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QScrollBar::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QScrollBar::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QScrollBar::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QScrollBar::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QScrollBar::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QScrollBar::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QScrollBar::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QScrollBar::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QScrollBar::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QScrollBar_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QScrollBar::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QScrollBar::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QScrollBar::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSlider* option) const override { + if (handle__InitStyleOption == 0) { + QScrollBar::initStyleOption(option); + return; + } + + QStyleOptionSlider* sigval1 = option; + + miqt_exec_callback_QScrollBar_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSlider* option) const { + + QScrollBar::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QScrollBar::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QScrollBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QScrollBar::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QScrollBar::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QScrollBar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QScrollBar::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QScrollBar::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QScrollBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QScrollBar::changeEvent(e); + + } + +}; + +void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(parent); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollBar* QScrollBar_new2() { - return new QScrollBar(); +void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollBar* QScrollBar_new3(int param1) { - return new QScrollBar(static_cast(param1)); +void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1)); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QScrollBar* QScrollBar_new4(int param1, QWidget* parent) { - return new QScrollBar(static_cast(param1), parent); +void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1), parent); + *outptr_QScrollBar = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QScrollBar_MetaObject(const QScrollBar* self) { @@ -75,7 +452,123 @@ struct miqt_string QScrollBar_Tr3(const char* s, const char* c, int n) { return _ms; } -void QScrollBar_Delete(QScrollBar* self) { - delete self; +void QScrollBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QScrollBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQScrollBar*)(self) )->virtualbase_SizeHint(); +} + +void QScrollBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__Event = slot; +} + +bool QScrollBar_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_Event(event); +} + +void QScrollBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__WheelEvent = slot; +} + +void QScrollBar_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_WheelEvent(param1); +} + +void QScrollBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__PaintEvent = slot; +} + +void QScrollBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QScrollBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__MousePressEvent = slot; +} + +void QScrollBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QScrollBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QScrollBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QScrollBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QScrollBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QScrollBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__HideEvent = slot; +} + +void QScrollBar_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_HideEvent(param1); +} + +void QScrollBar_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__SliderChange = slot; +} + +void QScrollBar_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_SliderChange(change); +} + +void QScrollBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QScrollBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QScrollBar_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__InitStyleOption = slot; +} + +void QScrollBar_virtualbase_InitStyleOption(const void* self, QStyleOptionSlider* option) { + ( (const MiqtVirtualQScrollBar*)(self) )->virtualbase_InitStyleOption(option); +} + +void QScrollBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QScrollBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QScrollBar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__TimerEvent = slot; +} + +void QScrollBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_TimerEvent(param1); +} + +void QScrollBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QScrollBar*)(self) )->handle__ChangeEvent = slot; +} + +void QScrollBar_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQScrollBar*)(self) )->virtualbase_ChangeEvent(e); +} + +void QScrollBar_Delete(QScrollBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qscrollbar.go b/qt6/gen_qscrollbar.go index fb3f9c4a..8a947454 100644 --- a/qt6/gen_qscrollbar.go +++ b/qt6/gen_qscrollbar.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QScrollBar struct { - h *C.QScrollBar + h *C.QScrollBar + isSubclass bool *QAbstractSlider } @@ -32,39 +34,79 @@ func (this *QScrollBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScrollBar(h *C.QScrollBar) *QScrollBar { +// newQScrollBar constructs the type using only CGO pointers. +func newQScrollBar(h *C.QScrollBar, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollBar { if h == nil { return nil } - return &QScrollBar{h: h, QAbstractSlider: UnsafeNewQAbstractSlider(unsafe.Pointer(h))} + return &QScrollBar{h: h, + QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQScrollBar(h unsafe.Pointer) *QScrollBar { - return newQScrollBar((*C.QScrollBar)(h)) +// UnsafeNewQScrollBar constructs the type using only unsafe pointers. +func UnsafeNewQScrollBar(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollBar { + if h == nil { + return nil + } + + return &QScrollBar{h: (*C.QScrollBar)(h), + QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQScrollBar constructs a new QScrollBar object. func NewQScrollBar(parent *QWidget) *QScrollBar { - ret := C.QScrollBar_new(parent.cPointer()) - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new(parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollBar2 constructs a new QScrollBar object. func NewQScrollBar2() *QScrollBar { - ret := C.QScrollBar_new2() - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new2(&outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollBar3 constructs a new QScrollBar object. func NewQScrollBar3(param1 Orientation) *QScrollBar { - ret := C.QScrollBar_new3((C.int)(param1)) - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new3((C.int)(param1), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQScrollBar4 constructs a new QScrollBar object. func NewQScrollBar4(param1 Orientation, parent *QWidget) *QScrollBar { - ret := C.QScrollBar_new4((C.int)(param1), parent.cPointer()) - return newQScrollBar(ret) + var outptr_QScrollBar *C.QScrollBar = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QScrollBar_new4((C.int)(param1), parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QScrollBar) MetaObject() *QMetaObject { @@ -119,9 +161,335 @@ func QScrollBar_Tr3(s string, c string, n int) string { return _ret } +func (this *QScrollBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QScrollBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScrollBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QScrollBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_SizeHint +func miqt_exec_callback_QScrollBar_SizeHint(self *C.QScrollBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScrollBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QScrollBar) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QScrollBar_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QScrollBar) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QScrollBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_Event +func miqt_exec_callback_QScrollBar_Event(self *C.QScrollBar, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QScrollBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScrollBar) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QScrollBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QScrollBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_WheelEvent +func miqt_exec_callback_QScrollBar_WheelEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QScrollBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QScrollBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_PaintEvent +func miqt_exec_callback_QScrollBar_PaintEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QScrollBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_MousePressEvent +func miqt_exec_callback_QScrollBar_MousePressEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QScrollBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_MouseReleaseEvent +func miqt_exec_callback_QScrollBar_MouseReleaseEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QScrollBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QScrollBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_MouseMoveEvent +func miqt_exec_callback_QScrollBar_MouseMoveEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QScrollBar_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QScrollBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_HideEvent +func miqt_exec_callback_QScrollBar_HideEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QScrollBar_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QScrollBar) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QScrollBar_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_SliderChange +func miqt_exec_callback_QScrollBar_SliderChange(self *C.QScrollBar, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QScrollBar{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QScrollBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QScrollBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_ContextMenuEvent +func miqt_exec_callback_QScrollBar_ContextMenuEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_InitStyleOption(option *QStyleOptionSlider) { + + C.QScrollBar_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QScrollBar) OnInitStyleOption(slot func(super func(option *QStyleOptionSlider), option *QStyleOptionSlider)) { + C.QScrollBar_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_InitStyleOption +func miqt_exec_callback_QScrollBar_InitStyleOption(self *C.QScrollBar, cb C.intptr_t, option *C.QStyleOptionSlider) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSlider), option *QStyleOptionSlider)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSlider(unsafe.Pointer(option), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QScrollBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QScrollBar) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QScrollBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_KeyPressEvent +func miqt_exec_callback_QScrollBar_KeyPressEvent(self *C.QScrollBar, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QScrollBar_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QScrollBar) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QScrollBar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_TimerEvent +func miqt_exec_callback_QScrollBar_TimerEvent(self *C.QScrollBar, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QScrollBar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QScrollBar) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QScrollBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QScrollBar) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QScrollBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScrollBar_ChangeEvent +func miqt_exec_callback_QScrollBar_ChangeEvent(self *C.QScrollBar, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QScrollBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QScrollBar) Delete() { - C.QScrollBar_Delete(this.h) + C.QScrollBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qscrollbar.h b/qt6/gen_qscrollbar.h index 87df1ae1..7f5257fb 100644 --- a/qt6/gen_qscrollbar.h +++ b/qt6/gen_qscrollbar.h @@ -15,31 +15,90 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSlider; +class QContextMenuEvent; class QEvent; +class QHideEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QScrollBar; class QSize; +class QStyleOptionSlider; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSlider QAbstractSlider; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QEvent QEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QScrollBar QScrollBar; typedef struct QSize QSize; +typedef struct QStyleOptionSlider QStyleOptionSlider; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QScrollBar* QScrollBar_new(QWidget* parent); -QScrollBar* QScrollBar_new2(); -QScrollBar* QScrollBar_new3(int param1); -QScrollBar* QScrollBar_new4(int param1, QWidget* parent); +void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QScrollBar_MetaObject(const QScrollBar* self); void* QScrollBar_Metacast(QScrollBar* self, const char* param1); struct miqt_string QScrollBar_Tr(const char* s); QSize* QScrollBar_SizeHint(const QScrollBar* self); bool QScrollBar_Event(QScrollBar* self, QEvent* event); +void QScrollBar_WheelEvent(QScrollBar* self, QWheelEvent* param1); +void QScrollBar_PaintEvent(QScrollBar* self, QPaintEvent* param1); +void QScrollBar_MousePressEvent(QScrollBar* self, QMouseEvent* param1); +void QScrollBar_MouseReleaseEvent(QScrollBar* self, QMouseEvent* param1); +void QScrollBar_MouseMoveEvent(QScrollBar* self, QMouseEvent* param1); +void QScrollBar_HideEvent(QScrollBar* self, QHideEvent* param1); +void QScrollBar_SliderChange(QScrollBar* self, int change); +void QScrollBar_ContextMenuEvent(QScrollBar* self, QContextMenuEvent* param1); +void QScrollBar_InitStyleOption(const QScrollBar* self, QStyleOptionSlider* option); struct miqt_string QScrollBar_Tr2(const char* s, const char* c); struct miqt_string QScrollBar_Tr3(const char* s, const char* c, int n); -void QScrollBar_Delete(QScrollBar* self); +void QScrollBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QScrollBar_virtualbase_SizeHint(const void* self); +void QScrollBar_override_virtual_Event(void* self, intptr_t slot); +bool QScrollBar_virtualbase_Event(void* self, QEvent* event); +void QScrollBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QScrollBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QScrollBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QScrollBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QScrollBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QScrollBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QScrollBar_override_virtual_SliderChange(void* self, intptr_t slot); +void QScrollBar_virtualbase_SliderChange(void* self, int change); +void QScrollBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QScrollBar_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QScrollBar_virtualbase_InitStyleOption(const void* self, QStyleOptionSlider* option); +void QScrollBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QScrollBar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QScrollBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QScrollBar_virtualbase_ChangeEvent(void* self, QEvent* e); +void QScrollBar_Delete(QScrollBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qscroller.go b/qt6/gen_qscroller.go index 7166b412..e658dcbc 100644 --- a/qt6/gen_qscroller.go +++ b/qt6/gen_qscroller.go @@ -40,7 +40,8 @@ const ( ) type QScroller struct { - h *C.QScroller + h *C.QScroller + isSubclass bool *QObject } @@ -58,15 +59,23 @@ func (this *QScroller) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQScroller(h *C.QScroller) *QScroller { +// newQScroller constructs the type using only CGO pointers. +func newQScroller(h *C.QScroller, h_QObject *C.QObject) *QScroller { if h == nil { return nil } - return &QScroller{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QScroller{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQScroller(h unsafe.Pointer) *QScroller { - return newQScroller((*C.QScroller)(h)) +// UnsafeNewQScroller constructs the type using only unsafe pointers. +func UnsafeNewQScroller(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScroller { + if h == nil { + return nil + } + + return &QScroller{h: (*C.QScroller)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QScroller) MetaObject() *QMetaObject { @@ -93,11 +102,11 @@ func QScroller_HasScroller(target *QObject) bool { } func QScroller_Scroller(target *QObject) *QScroller { - return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_Scroller(target.cPointer()))) + return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_Scroller(target.cPointer())), nil) } func QScroller_ScrollerWithTarget(target *QObject) *QScroller { - return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_ScrollerWithTarget(target.cPointer()))) + return UnsafeNewQScroller(unsafe.Pointer(C.QScroller_ScrollerWithTarget(target.cPointer())), nil) } func QScroller_GrabGesture(target *QObject) GestureType { @@ -117,7 +126,7 @@ func QScroller_ActiveScrollers() []*QScroller { _ret := make([]*QScroller, int(_ma.len)) _outCast := (*[0xffff]*C.QScroller)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQScroller(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQScroller(unsafe.Pointer(_outCast[i]), nil) } return _ret } diff --git a/qt6/gen_qscrollerproperties.cpp b/qt6/gen_qscrollerproperties.cpp index 23abe2d4..47617dbf 100644 --- a/qt6/gen_qscrollerproperties.cpp +++ b/qt6/gen_qscrollerproperties.cpp @@ -4,12 +4,14 @@ #include "gen_qscrollerproperties.h" #include "_cgo_export.h" -QScrollerProperties* QScrollerProperties_new() { - return new QScrollerProperties(); +void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties) { + QScrollerProperties* ret = new QScrollerProperties(); + *outptr_QScrollerProperties = ret; } -QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp) { - return new QScrollerProperties(*sp); +void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties) { + QScrollerProperties* ret = new QScrollerProperties(*sp); + *outptr_QScrollerProperties = ret; } void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp) { @@ -40,7 +42,11 @@ void QScrollerProperties_SetScrollMetric(QScrollerProperties* self, int metric, self->setScrollMetric(static_cast(metric), *value); } -void QScrollerProperties_Delete(QScrollerProperties* self) { - delete self; +void QScrollerProperties_Delete(QScrollerProperties* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qscrollerproperties.go b/qt6/gen_qscrollerproperties.go index 8bf97641..11a94169 100644 --- a/qt6/gen_qscrollerproperties.go +++ b/qt6/gen_qscrollerproperties.go @@ -57,7 +57,8 @@ const ( ) type QScrollerProperties struct { - h *C.QScrollerProperties + h *C.QScrollerProperties + isSubclass bool } func (this *QScrollerProperties) cPointer() *C.QScrollerProperties { @@ -74,6 +75,7 @@ func (this *QScrollerProperties) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQScrollerProperties constructs the type using only CGO pointers. func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties { if h == nil { return nil @@ -81,20 +83,33 @@ func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties { return &QScrollerProperties{h: h} } +// UnsafeNewQScrollerProperties constructs the type using only unsafe pointers. func UnsafeNewQScrollerProperties(h unsafe.Pointer) *QScrollerProperties { - return newQScrollerProperties((*C.QScrollerProperties)(h)) + if h == nil { + return nil + } + + return &QScrollerProperties{h: (*C.QScrollerProperties)(h)} } // NewQScrollerProperties constructs a new QScrollerProperties object. func NewQScrollerProperties() *QScrollerProperties { - ret := C.QScrollerProperties_new() - return newQScrollerProperties(ret) + var outptr_QScrollerProperties *C.QScrollerProperties = nil + + C.QScrollerProperties_new(&outptr_QScrollerProperties) + ret := newQScrollerProperties(outptr_QScrollerProperties) + ret.isSubclass = true + return ret } // NewQScrollerProperties2 constructs a new QScrollerProperties object. func NewQScrollerProperties2(sp *QScrollerProperties) *QScrollerProperties { - ret := C.QScrollerProperties_new2(sp.cPointer()) - return newQScrollerProperties(ret) + var outptr_QScrollerProperties *C.QScrollerProperties = nil + + C.QScrollerProperties_new2(sp.cPointer(), &outptr_QScrollerProperties) + ret := newQScrollerProperties(outptr_QScrollerProperties) + ret.isSubclass = true + return ret } func (this *QScrollerProperties) OperatorAssign(sp *QScrollerProperties) { @@ -130,7 +145,7 @@ func (this *QScrollerProperties) SetScrollMetric(metric QScrollerProperties__Scr // Delete this object from C++ memory. func (this *QScrollerProperties) Delete() { - C.QScrollerProperties_Delete(this.h) + C.QScrollerProperties_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qscrollerproperties.h b/qt6/gen_qscrollerproperties.h index 0bb14424..577bf882 100644 --- a/qt6/gen_qscrollerproperties.h +++ b/qt6/gen_qscrollerproperties.h @@ -22,8 +22,8 @@ typedef struct QScrollerProperties QScrollerProperties; typedef struct QVariant QVariant; #endif -QScrollerProperties* QScrollerProperties_new(); -QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp); +void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties); +void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties); void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorEqual(const QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorNotEqual(const QScrollerProperties* self, QScrollerProperties* sp); @@ -31,7 +31,7 @@ void QScrollerProperties_SetDefaultScrollerProperties(QScrollerProperties* sp); void QScrollerProperties_UnsetDefaultScrollerProperties(); QVariant* QScrollerProperties_ScrollMetric(const QScrollerProperties* self, int metric); void QScrollerProperties_SetScrollMetric(QScrollerProperties* self, int metric, QVariant* value); -void QScrollerProperties_Delete(QScrollerProperties* self); +void QScrollerProperties_Delete(QScrollerProperties* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsemaphore.cpp b/qt6/gen_qsemaphore.cpp index 357fe4c2..e19d8eac 100644 --- a/qt6/gen_qsemaphore.cpp +++ b/qt6/gen_qsemaphore.cpp @@ -4,12 +4,14 @@ #include "gen_qsemaphore.h" #include "_cgo_export.h" -QSemaphore* QSemaphore_new() { - return new QSemaphore(); +void QSemaphore_new(QSemaphore** outptr_QSemaphore) { + QSemaphore* ret = new QSemaphore(); + *outptr_QSemaphore = ret; } -QSemaphore* QSemaphore_new2(int n) { - return new QSemaphore(static_cast(n)); +void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore) { + QSemaphore* ret = new QSemaphore(static_cast(n)); + *outptr_QSemaphore = ret; } void QSemaphore_Acquire(QSemaphore* self) { @@ -48,28 +50,37 @@ void QSemaphore_Release1(QSemaphore* self, int n) { self->release(static_cast(n)); } -void QSemaphore_Delete(QSemaphore* self) { - delete self; +void QSemaphore_Delete(QSemaphore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSemaphoreReleaser* QSemaphoreReleaser_new() { - return new QSemaphoreReleaser(); +void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem) { - return new QSemaphoreReleaser(*sem); +void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem) { - return new QSemaphoreReleaser(sem); +void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n) { - return new QSemaphoreReleaser(*sem, static_cast(n)); +void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem, static_cast(n)); + *outptr_QSemaphoreReleaser = ret; } -QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n) { - return new QSemaphoreReleaser(sem, static_cast(n)); +void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { + QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem, static_cast(n)); + *outptr_QSemaphoreReleaser = ret; } void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other) { @@ -84,7 +95,11 @@ QSemaphore* QSemaphoreReleaser_Cancel(QSemaphoreReleaser* self) { return self->cancel(); } -void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self) { - delete self; +void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsemaphore.go b/qt6/gen_qsemaphore.go index 52783aef..493acfd3 100644 --- a/qt6/gen_qsemaphore.go +++ b/qt6/gen_qsemaphore.go @@ -14,7 +14,8 @@ import ( ) type QSemaphore struct { - h *C.QSemaphore + h *C.QSemaphore + isSubclass bool } func (this *QSemaphore) cPointer() *C.QSemaphore { @@ -31,6 +32,7 @@ func (this *QSemaphore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSemaphore constructs the type using only CGO pointers. func newQSemaphore(h *C.QSemaphore) *QSemaphore { if h == nil { return nil @@ -38,20 +40,33 @@ func newQSemaphore(h *C.QSemaphore) *QSemaphore { return &QSemaphore{h: h} } +// UnsafeNewQSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSemaphore(h unsafe.Pointer) *QSemaphore { - return newQSemaphore((*C.QSemaphore)(h)) + if h == nil { + return nil + } + + return &QSemaphore{h: (*C.QSemaphore)(h)} } // NewQSemaphore constructs a new QSemaphore object. func NewQSemaphore() *QSemaphore { - ret := C.QSemaphore_new() - return newQSemaphore(ret) + var outptr_QSemaphore *C.QSemaphore = nil + + C.QSemaphore_new(&outptr_QSemaphore) + ret := newQSemaphore(outptr_QSemaphore) + ret.isSubclass = true + return ret } // NewQSemaphore2 constructs a new QSemaphore object. func NewQSemaphore2(n int) *QSemaphore { - ret := C.QSemaphore_new2((C.int)(n)) - return newQSemaphore(ret) + var outptr_QSemaphore *C.QSemaphore = nil + + C.QSemaphore_new2((C.int)(n), &outptr_QSemaphore) + ret := newQSemaphore(outptr_QSemaphore) + ret.isSubclass = true + return ret } func (this *QSemaphore) Acquire() { @@ -92,7 +107,7 @@ func (this *QSemaphore) Release1(n int) { // Delete this object from C++ memory. func (this *QSemaphore) Delete() { - C.QSemaphore_Delete(this.h) + C.QSemaphore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -105,7 +120,8 @@ func (this *QSemaphore) GoGC() { } type QSemaphoreReleaser struct { - h *C.QSemaphoreReleaser + h *C.QSemaphoreReleaser + isSubclass bool } func (this *QSemaphoreReleaser) cPointer() *C.QSemaphoreReleaser { @@ -122,6 +138,7 @@ func (this *QSemaphoreReleaser) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSemaphoreReleaser constructs the type using only CGO pointers. func newQSemaphoreReleaser(h *C.QSemaphoreReleaser) *QSemaphoreReleaser { if h == nil { return nil @@ -129,38 +146,63 @@ func newQSemaphoreReleaser(h *C.QSemaphoreReleaser) *QSemaphoreReleaser { return &QSemaphoreReleaser{h: h} } +// UnsafeNewQSemaphoreReleaser constructs the type using only unsafe pointers. func UnsafeNewQSemaphoreReleaser(h unsafe.Pointer) *QSemaphoreReleaser { - return newQSemaphoreReleaser((*C.QSemaphoreReleaser)(h)) + if h == nil { + return nil + } + + return &QSemaphoreReleaser{h: (*C.QSemaphoreReleaser)(h)} } // NewQSemaphoreReleaser constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser() *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new() - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new(&outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser2 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser2(sem *QSemaphore) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new2(sem.cPointer()) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new2(sem.cPointer(), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser3 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser3(sem *QSemaphore) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new3(sem.cPointer()) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new3(sem.cPointer(), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser4 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser4(sem *QSemaphore, n int) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n)) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } // NewQSemaphoreReleaser5 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser5(sem *QSemaphore, n int) *QSemaphoreReleaser { - ret := C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n)) - return newQSemaphoreReleaser(ret) + var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil + + C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret.isSubclass = true + return ret } func (this *QSemaphoreReleaser) Swap(other *QSemaphoreReleaser) { @@ -177,7 +219,7 @@ func (this *QSemaphoreReleaser) Cancel() *QSemaphore { // Delete this object from C++ memory. func (this *QSemaphoreReleaser) Delete() { - C.QSemaphoreReleaser_Delete(this.h) + C.QSemaphoreReleaser_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsemaphore.h b/qt6/gen_qsemaphore.h index 2c2b988f..b97ea9b1 100644 --- a/qt6/gen_qsemaphore.h +++ b/qt6/gen_qsemaphore.h @@ -22,8 +22,8 @@ typedef struct QSemaphore QSemaphore; typedef struct QSemaphoreReleaser QSemaphoreReleaser; #endif -QSemaphore* QSemaphore_new(); -QSemaphore* QSemaphore_new2(int n); +void QSemaphore_new(QSemaphore** outptr_QSemaphore); +void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore); void QSemaphore_Acquire(QSemaphore* self); bool QSemaphore_TryAcquire(QSemaphore* self); bool QSemaphore_TryAcquire2(QSemaphore* self, int n, int timeout); @@ -33,17 +33,17 @@ bool QSemaphore_TryAcquire3(QSemaphore* self); void QSemaphore_Acquire1(QSemaphore* self, int n); bool QSemaphore_TryAcquire1(QSemaphore* self, int n); void QSemaphore_Release1(QSemaphore* self, int n); -void QSemaphore_Delete(QSemaphore* self); +void QSemaphore_Delete(QSemaphore* self, bool isSubclass); -QSemaphoreReleaser* QSemaphoreReleaser_new(); -QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem); -QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem); -QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n); -QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n); +void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other); QSemaphore* QSemaphoreReleaser_Semaphore(const QSemaphoreReleaser* self); QSemaphore* QSemaphoreReleaser_Cancel(QSemaphoreReleaser* self); -void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self); +void QSemaphoreReleaser_Delete(QSemaphoreReleaser* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsequentialanimationgroup.cpp b/qt6/gen_qsequentialanimationgroup.cpp index 45eec244..3069dbbb 100644 --- a/qt6/gen_qsequentialanimationgroup.cpp +++ b/qt6/gen_qsequentialanimationgroup.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include #include #include @@ -10,12 +12,151 @@ #include "gen_qsequentialanimationgroup.h" #include "_cgo_export.h" -QSequentialAnimationGroup* QSequentialAnimationGroup_new() { - return new QSequentialAnimationGroup(); +class MiqtVirtualQSequentialAnimationGroup : public virtual QSequentialAnimationGroup { +public: + + MiqtVirtualQSequentialAnimationGroup(): QSequentialAnimationGroup() {}; + MiqtVirtualQSequentialAnimationGroup(QObject* parent): QSequentialAnimationGroup(parent) {}; + + virtual ~MiqtVirtualQSequentialAnimationGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QSequentialAnimationGroup::duration(); + } + + + int callback_return_value = miqt_exec_callback_QSequentialAnimationGroup_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QSequentialAnimationGroup::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSequentialAnimationGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSequentialAnimationGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSequentialAnimationGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QSequentialAnimationGroup::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QSequentialAnimationGroup_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QSequentialAnimationGroup::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QSequentialAnimationGroup::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QSequentialAnimationGroup_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QSequentialAnimationGroup::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QSequentialAnimationGroup::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QSequentialAnimationGroup_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QSequentialAnimationGroup::updateDirection(static_cast(direction)); + + } + +}; + +void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(); + *outptr_QSequentialAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent) { - return new QSequentialAnimationGroup(parent); +void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(parent); + *outptr_QSequentialAnimationGroup = ret; + *outptr_QAnimationGroup = static_cast(ret); + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self) { @@ -58,7 +199,7 @@ void QSequentialAnimationGroup_CurrentAnimationChanged(QSequentialAnimationGroup } void QSequentialAnimationGroup_connect_CurrentAnimationChanged(QSequentialAnimationGroup* self, intptr_t slot) { - QSequentialAnimationGroup::connect(self, static_cast(&QSequentialAnimationGroup::currentAnimationChanged), self, [=](QAbstractAnimation* current) { + MiqtVirtualQSequentialAnimationGroup::connect(self, static_cast(&QSequentialAnimationGroup::currentAnimationChanged), self, [=](QAbstractAnimation* current) { QAbstractAnimation* sigval1 = current; miqt_exec_callback_QSequentialAnimationGroup_CurrentAnimationChanged(slot, sigval1); }); @@ -86,7 +227,51 @@ struct miqt_string QSequentialAnimationGroup_Tr3(const char* s, const char* c, i return _ms; } -void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self) { - delete self; +void QSequentialAnimationGroup_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__Duration = slot; +} + +int QSequentialAnimationGroup_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_Duration(); +} + +void QSequentialAnimationGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__Event = slot; +} + +bool QSequentialAnimationGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_Event(event); +} + +void QSequentialAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QSequentialAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QSequentialAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__UpdateState = slot; +} + +void QSequentialAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QSequentialAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QSequentialAnimationGroup*)(self) )->handle__UpdateDirection = slot; +} + +void QSequentialAnimationGroup_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQSequentialAnimationGroup*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsequentialanimationgroup.go b/qt6/gen_qsequentialanimationgroup.go index 8a95e7f0..49e23ad2 100644 --- a/qt6/gen_qsequentialanimationgroup.go +++ b/qt6/gen_qsequentialanimationgroup.go @@ -15,7 +15,8 @@ import ( ) type QSequentialAnimationGroup struct { - h *C.QSequentialAnimationGroup + h *C.QSequentialAnimationGroup + isSubclass bool *QAnimationGroup } @@ -33,27 +34,49 @@ func (this *QSequentialAnimationGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup) *QSequentialAnimationGroup { +// newQSequentialAnimationGroup constructs the type using only CGO pointers. +func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QSequentialAnimationGroup { if h == nil { return nil } - return &QSequentialAnimationGroup{h: h, QAnimationGroup: UnsafeNewQAnimationGroup(unsafe.Pointer(h))} + return &QSequentialAnimationGroup{h: h, + QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer) *QSequentialAnimationGroup { - return newQSequentialAnimationGroup((*C.QSequentialAnimationGroup)(h)) +// UnsafeNewQSequentialAnimationGroup constructs the type using only unsafe pointers. +func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QSequentialAnimationGroup { + if h == nil { + return nil + } + + return &QSequentialAnimationGroup{h: (*C.QSequentialAnimationGroup)(h), + QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} } // NewQSequentialAnimationGroup constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup() *QSequentialAnimationGroup { - ret := C.QSequentialAnimationGroup_new() - return newQSequentialAnimationGroup(ret) + var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QSequentialAnimationGroup_new(&outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSequentialAnimationGroup2 constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup2(parent *QObject) *QSequentialAnimationGroup { - ret := C.QSequentialAnimationGroup_new2(parent.cPointer()) - return newQSequentialAnimationGroup(ret) + var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QSequentialAnimationGroup_new2(parent.cPointer(), &outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSequentialAnimationGroup) MetaObject() *QMetaObject { @@ -76,15 +99,15 @@ func QSequentialAnimationGroup_Tr(s string) string { } func (this *QSequentialAnimationGroup) AddPause(msecs int) *QPauseAnimation { - return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs)))) + return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs))), nil, nil) } func (this *QSequentialAnimationGroup) InsertPause(index int, msecs int) *QPauseAnimation { - return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs)))) + return UnsafeNewQPauseAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs))), nil, nil) } func (this *QSequentialAnimationGroup) CurrentAnimation() *QAbstractAnimation { - return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_CurrentAnimation(this.h))) + return UnsafeNewQAbstractAnimation(unsafe.Pointer(C.QSequentialAnimationGroup_CurrentAnimation(this.h)), nil) } func (this *QSequentialAnimationGroup) Duration() int { @@ -106,7 +129,7 @@ func miqt_exec_callback_QSequentialAnimationGroup_CurrentAnimationChanged(cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAbstractAnimation(unsafe.Pointer(current)) + slotval1 := UnsafeNewQAbstractAnimation(unsafe.Pointer(current), nil) gofunc(slotval1) } @@ -133,9 +156,127 @@ func QSequentialAnimationGroup_Tr3(s string, c string, n int) string { return _ret } +func (this *QSequentialAnimationGroup) callVirtualBase_Duration() int { + + return (int)(C.QSequentialAnimationGroup_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QSequentialAnimationGroup) OnDuration(slot func(super func() int) int) { + C.QSequentialAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_Duration +func miqt_exec_callback_QSequentialAnimationGroup_Duration(self *C.QSequentialAnimationGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSequentialAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSequentialAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSequentialAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_Event +func miqt_exec_callback_QSequentialAnimationGroup_Event(self *C.QSequentialAnimationGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QSequentialAnimationGroup_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QSequentialAnimationGroup) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QSequentialAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_UpdateCurrentTime +func miqt_exec_callback_QSequentialAnimationGroup_UpdateCurrentTime(self *C.QSequentialAnimationGroup, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QSequentialAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QSequentialAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QSequentialAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_UpdateState +func miqt_exec_callback_QSequentialAnimationGroup_UpdateState(self *C.QSequentialAnimationGroup, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QSequentialAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QSequentialAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QSequentialAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QSequentialAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSequentialAnimationGroup_UpdateDirection +func miqt_exec_callback_QSequentialAnimationGroup_UpdateDirection(self *C.QSequentialAnimationGroup, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QSequentialAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QSequentialAnimationGroup) Delete() { - C.QSequentialAnimationGroup_Delete(this.h) + C.QSequentialAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsequentialanimationgroup.h b/qt6/gen_qsequentialanimationgroup.h index c48e319d..6dffd850 100644 --- a/qt6/gen_qsequentialanimationgroup.h +++ b/qt6/gen_qsequentialanimationgroup.h @@ -16,20 +16,24 @@ extern "C" { #ifdef __cplusplus class QAbstractAnimation; +class QAnimationGroup; +class QEvent; class QMetaObject; class QObject; class QPauseAnimation; class QSequentialAnimationGroup; #else typedef struct QAbstractAnimation QAbstractAnimation; +typedef struct QAnimationGroup QAnimationGroup; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPauseAnimation QPauseAnimation; typedef struct QSequentialAnimationGroup QSequentialAnimationGroup; #endif -QSequentialAnimationGroup* QSequentialAnimationGroup_new(); -QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent); +void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self); void* QSequentialAnimationGroup_Metacast(QSequentialAnimationGroup* self, const char* param1); struct miqt_string QSequentialAnimationGroup_Tr(const char* s); @@ -39,9 +43,23 @@ QAbstractAnimation* QSequentialAnimationGroup_CurrentAnimation(const QSequential int QSequentialAnimationGroup_Duration(const QSequentialAnimationGroup* self); void QSequentialAnimationGroup_CurrentAnimationChanged(QSequentialAnimationGroup* self, QAbstractAnimation* current); void QSequentialAnimationGroup_connect_CurrentAnimationChanged(QSequentialAnimationGroup* self, intptr_t slot); +bool QSequentialAnimationGroup_Event(QSequentialAnimationGroup* self, QEvent* event); +void QSequentialAnimationGroup_UpdateCurrentTime(QSequentialAnimationGroup* self, int param1); +void QSequentialAnimationGroup_UpdateState(QSequentialAnimationGroup* self, int newState, int oldState); +void QSequentialAnimationGroup_UpdateDirection(QSequentialAnimationGroup* self, int direction); struct miqt_string QSequentialAnimationGroup_Tr2(const char* s, const char* c); struct miqt_string QSequentialAnimationGroup_Tr3(const char* s, const char* c, int n); -void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self); +void QSequentialAnimationGroup_override_virtual_Duration(void* self, intptr_t slot); +int QSequentialAnimationGroup_virtualbase_Duration(const void* self); +void QSequentialAnimationGroup_override_virtual_Event(void* self, intptr_t slot); +bool QSequentialAnimationGroup_virtualbase_Event(void* self, QEvent* event); +void QSequentialAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QSequentialAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int param1); +void QSequentialAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot); +void QSequentialAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState); +void QSequentialAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QSequentialAnimationGroup_virtualbase_UpdateDirection(void* self, int direction); +void QSequentialAnimationGroup_Delete(QSequentialAnimationGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsessionmanager.cpp b/qt6/gen_qsessionmanager.cpp index ce5e2ac3..bf133b57 100644 --- a/qt6/gen_qsessionmanager.cpp +++ b/qt6/gen_qsessionmanager.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt6/gen_qsessionmanager.go b/qt6/gen_qsessionmanager.go index 88aef8d7..f8080538 100644 --- a/qt6/gen_qsessionmanager.go +++ b/qt6/gen_qsessionmanager.go @@ -22,7 +22,8 @@ const ( ) type QSessionManager struct { - h *C.QSessionManager + h *C.QSessionManager + isSubclass bool *QObject } @@ -40,15 +41,23 @@ func (this *QSessionManager) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSessionManager(h *C.QSessionManager) *QSessionManager { +// newQSessionManager constructs the type using only CGO pointers. +func newQSessionManager(h *C.QSessionManager, h_QObject *C.QObject) *QSessionManager { if h == nil { return nil } - return &QSessionManager{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSessionManager{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSessionManager(h unsafe.Pointer) *QSessionManager { - return newQSessionManager((*C.QSessionManager)(h)) +// UnsafeNewQSessionManager constructs the type using only unsafe pointers. +func UnsafeNewQSessionManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSessionManager { + if h == nil { + return nil + } + + return &QSessionManager{h: (*C.QSessionManager)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QSessionManager) MetaObject() *QMetaObject { diff --git a/qt6/gen_qsessionmanager.h b/qt6/gen_qsessionmanager.h index 0c87ddfb..7771d014 100644 --- a/qt6/gen_qsessionmanager.h +++ b/qt6/gen_qsessionmanager.h @@ -16,9 +16,11 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QSessionManager; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSessionManager QSessionManager; #endif diff --git a/qt6/gen_qsettings.cpp b/qt6/gen_qsettings.cpp index cab671bb..46547cff 100644 --- a/qt6/gen_qsettings.cpp +++ b/qt6/gen_qsettings.cpp @@ -1,91 +1,319 @@ #include +#include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qsettings.h" #include "_cgo_export.h" -QSettings* QSettings_new(struct miqt_string organization) { +class MiqtVirtualQSettings : public virtual QSettings { +public: + + MiqtVirtualQSettings(const QString& organization): QSettings(organization) {}; + MiqtVirtualQSettings(QSettings::Scope scope, const QString& organization): QSettings(scope, organization) {}; + MiqtVirtualQSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization): QSettings(format, scope, organization) {}; + MiqtVirtualQSettings(const QString& fileName, QSettings::Format format): QSettings(fileName, format) {}; + MiqtVirtualQSettings(): QSettings() {}; + MiqtVirtualQSettings(QSettings::Scope scope): QSettings(scope) {}; + MiqtVirtualQSettings(const QString& organization, const QString& application): QSettings(organization, application) {}; + MiqtVirtualQSettings(const QString& organization, const QString& application, QObject* parent): QSettings(organization, application, parent) {}; + MiqtVirtualQSettings(QSettings::Scope scope, const QString& organization, const QString& application): QSettings(scope, organization, application) {}; + MiqtVirtualQSettings(QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent): QSettings(scope, organization, application, parent) {}; + MiqtVirtualQSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application): QSettings(format, scope, organization, application) {}; + MiqtVirtualQSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent): QSettings(format, scope, organization, application, parent) {}; + MiqtVirtualQSettings(const QString& fileName, QSettings::Format format, QObject* parent): QSettings(fileName, format, parent) {}; + MiqtVirtualQSettings(QObject* parent): QSettings(parent) {}; + MiqtVirtualQSettings(QSettings::Scope scope, QObject* parent): QSettings(scope, parent) {}; + + virtual ~MiqtVirtualQSettings() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSettings::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSettings_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSettings::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSettings::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSettings_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSettings::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSettings::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSettings_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSettings::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSettings::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSettings_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSettings::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSettings::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSettings_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSettings::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSettings::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSettings_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSettings::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSettings::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSettings_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSettings::disconnectNotify(*signal); + + } + +}; + +void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - return new QSettings(organization_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new2(int scope, struct miqt_string organization) { +void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - return new QSettings(static_cast(scope), organization_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new3(int format, int scope, struct miqt_string organization) { +void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - return new QSettings(static_cast(format), static_cast(scope), organization_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new4(struct miqt_string fileName, int format) { +void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QSettings(fileName_QString, static_cast(format)); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format)); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new5() { - return new QSettings(); +void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new6(int scope) { - return new QSettings(static_cast(scope)); +void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope)); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application) { +void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(organization_QString, application_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent) { +void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(organization_QString, application_QString, parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString, parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application) { +void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(scope), organization_QString, application_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { +void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(scope), organization_QString, application_QString, parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString, parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application) { +void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { +void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - return new QSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent) { +void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QSettings(fileName_QString, static_cast(format), parent); + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format), parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new14(QObject* parent) { - return new QSettings(parent); +void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } -QSettings* QSettings_new15(int scope, QObject* parent) { - return new QSettings(static_cast(scope), parent); +void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { + MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), parent); + *outptr_QSettings = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSettings_MetaObject(const QSettings* self) { @@ -338,7 +566,67 @@ void QSettings_BeginWriteArray2(QSettings* self, QAnyStringView* prefix, int siz self->beginWriteArray(*prefix, static_cast(size)); } -void QSettings_Delete(QSettings* self) { - delete self; +void QSettings_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__Event = slot; +} + +bool QSettings_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSettings*)(self) )->virtualbase_Event(event); +} + +void QSettings_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__EventFilter = slot; +} + +bool QSettings_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSettings*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSettings_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__TimerEvent = slot; +} + +void QSettings_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_TimerEvent(event); +} + +void QSettings_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__ChildEvent = slot; +} + +void QSettings_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_ChildEvent(event); +} + +void QSettings_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__CustomEvent = slot; +} + +void QSettings_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_CustomEvent(event); +} + +void QSettings_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__ConnectNotify = slot; +} + +void QSettings_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSettings_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSettings*)(self) )->handle__DisconnectNotify = slot; +} + +void QSettings_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSettings*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSettings_Delete(QSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsettings.go b/qt6/gen_qsettings.go index 10017288..951f59a7 100644 --- a/qt6/gen_qsettings.go +++ b/qt6/gen_qsettings.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -53,7 +54,8 @@ const ( ) type QSettings struct { - h *C.QSettings + h *C.QSettings + isSubclass bool *QObject } @@ -71,15 +73,23 @@ func (this *QSettings) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSettings(h *C.QSettings) *QSettings { +// newQSettings constructs the type using only CGO pointers. +func newQSettings(h *C.QSettings, h_QObject *C.QObject) *QSettings { if h == nil { return nil } - return &QSettings{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSettings{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSettings(h unsafe.Pointer) *QSettings { - return newQSettings((*C.QSettings)(h)) +// UnsafeNewQSettings constructs the type using only unsafe pointers. +func UnsafeNewQSettings(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSettings { + if h == nil { + return nil + } + + return &QSettings{h: (*C.QSettings)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSettings constructs a new QSettings object. @@ -88,8 +98,13 @@ func NewQSettings(organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - ret := C.QSettings_new(organization_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new(organization_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings2 constructs a new QSettings object. @@ -98,8 +113,13 @@ func NewQSettings2(scope QSettings__Scope, organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - ret := C.QSettings_new2((C.int)(scope), organization_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new2((C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings3 constructs a new QSettings object. @@ -108,8 +128,13 @@ func NewQSettings3(format QSettings__Format, scope QSettings__Scope, organizatio organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - ret := C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings4 constructs a new QSettings object. @@ -118,20 +143,35 @@ func NewQSettings4(fileName string, format QSettings__Format) *QSettings { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QSettings_new4(fileName_ms, (C.int)(format)) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new4(fileName_ms, (C.int)(format), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings5 constructs a new QSettings object. func NewQSettings5() *QSettings { - ret := C.QSettings_new5() - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new5(&outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings6 constructs a new QSettings object. func NewQSettings6(scope QSettings__Scope) *QSettings { - ret := C.QSettings_new6((C.int)(scope)) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new6((C.int)(scope), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings7 constructs a new QSettings object. @@ -144,8 +184,13 @@ func NewQSettings7(organization string, application string) *QSettings { application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new7(organization_ms, application_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new7(organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings8 constructs a new QSettings object. @@ -158,8 +203,13 @@ func NewQSettings8(organization string, application string, parent *QObject) *QS application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new8(organization_ms, application_ms, parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new8(organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings9 constructs a new QSettings object. @@ -172,8 +222,13 @@ func NewQSettings9(scope QSettings__Scope, organization string, application stri application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new9((C.int)(scope), organization_ms, application_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new9((C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings10 constructs a new QSettings object. @@ -186,8 +241,13 @@ func NewQSettings10(scope QSettings__Scope, organization string, application str application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings11 constructs a new QSettings object. @@ -200,8 +260,13 @@ func NewQSettings11(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings12 constructs a new QSettings object. @@ -214,8 +279,13 @@ func NewQSettings12(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - ret := C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings13 constructs a new QSettings object. @@ -224,20 +294,35 @@ func NewQSettings13(fileName string, format QSettings__Format, parent *QObject) fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings14 constructs a new QSettings object. func NewQSettings14(parent *QObject) *QSettings { - ret := C.QSettings_new14(parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new14(parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSettings15 constructs a new QSettings object. func NewQSettings15(scope QSettings__Scope, parent *QObject) *QSettings { - ret := C.QSettings_new15((C.int)(scope), parent.cPointer()) - return newQSettings(ret) + var outptr_QSettings *C.QSettings = nil + var outptr_QObject *C.QObject = nil + + C.QSettings_new15((C.int)(scope), parent.cPointer(), &outptr_QSettings, &outptr_QObject) + ret := newQSettings(outptr_QSettings, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSettings) MetaObject() *QMetaObject { @@ -458,9 +543,175 @@ func (this *QSettings) BeginWriteArray2(prefix QAnyStringView, size int) { C.QSettings_BeginWriteArray2(this.h, prefix.cPointer(), (C.int)(size)) } +func (this *QSettings) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSettings_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSettings) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSettings_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_Event +func miqt_exec_callback_QSettings_Event(self *C.QSettings, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSettings{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSettings) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSettings_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSettings) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSettings_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_EventFilter +func miqt_exec_callback_QSettings_EventFilter(self *C.QSettings, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSettings{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSettings) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSettings_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSettings) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSettings_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_TimerEvent +func miqt_exec_callback_QSettings_TimerEvent(self *C.QSettings, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSettings{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSettings) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSettings_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSettings) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSettings_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_ChildEvent +func miqt_exec_callback_QSettings_ChildEvent(self *C.QSettings, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSettings{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSettings) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSettings_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSettings) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSettings_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_CustomEvent +func miqt_exec_callback_QSettings_CustomEvent(self *C.QSettings, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSettings{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSettings) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSettings_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSettings) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSettings_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_ConnectNotify +func miqt_exec_callback_QSettings_ConnectNotify(self *C.QSettings, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSettings{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSettings) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSettings_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSettings) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSettings_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSettings_DisconnectNotify +func miqt_exec_callback_QSettings_DisconnectNotify(self *C.QSettings, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSettings{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSettings) Delete() { - C.QSettings_Delete(this.h) + C.QSettings_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsettings.h b/qt6/gen_qsettings.h index 711bd412..53f2d217 100644 --- a/qt6/gen_qsettings.h +++ b/qt6/gen_qsettings.h @@ -16,33 +16,41 @@ extern "C" { #ifdef __cplusplus class QAnyStringView; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSettings; +class QTimerEvent; class QVariant; #else typedef struct QAnyStringView QAnyStringView; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSettings QSettings; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QSettings* QSettings_new(struct miqt_string organization); -QSettings* QSettings_new2(int scope, struct miqt_string organization); -QSettings* QSettings_new3(int format, int scope, struct miqt_string organization); -QSettings* QSettings_new4(struct miqt_string fileName, int format); -QSettings* QSettings_new5(); -QSettings* QSettings_new6(int scope); -QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application); -QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent); -QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application); -QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); -QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application); -QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); -QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent); -QSettings* QSettings_new14(QObject* parent); -QSettings* QSettings_new15(int scope, QObject* parent); +void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); QMetaObject* QSettings_MetaObject(const QSettings* self); void* QSettings_Metacast(QSettings* self, const char* param1); struct miqt_string QSettings_Tr(const char* s); @@ -77,10 +85,25 @@ struct miqt_string QSettings_ApplicationName(const QSettings* self); void QSettings_SetDefaultFormat(int format); int QSettings_DefaultFormat(); void QSettings_SetPath(int format, int scope, struct miqt_string path); +bool QSettings_Event(QSettings* self, QEvent* event); struct miqt_string QSettings_Tr2(const char* s, const char* c); struct miqt_string QSettings_Tr3(const char* s, const char* c, int n); void QSettings_BeginWriteArray2(QSettings* self, QAnyStringView* prefix, int size); -void QSettings_Delete(QSettings* self); +void QSettings_override_virtual_Event(void* self, intptr_t slot); +bool QSettings_virtualbase_Event(void* self, QEvent* event); +void QSettings_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSettings_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSettings_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSettings_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSettings_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSettings_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSettings_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSettings_virtualbase_CustomEvent(void* self, QEvent* event); +void QSettings_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSettings_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSettings_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSettings_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSettings_Delete(QSettings* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qshareddata.cpp b/qt6/gen_qshareddata.cpp index 1a6fbc6a..cb6875dc 100644 --- a/qt6/gen_qshareddata.cpp +++ b/qt6/gen_qshareddata.cpp @@ -3,23 +3,34 @@ #include "gen_qshareddata.h" #include "_cgo_export.h" -QSharedData* QSharedData_new() { - return new QSharedData(); +void QSharedData_new(QSharedData** outptr_QSharedData) { + QSharedData* ret = new QSharedData(); + *outptr_QSharedData = ret; } -QSharedData* QSharedData_new2(QSharedData* param1) { - return new QSharedData(*param1); +void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData) { + QSharedData* ret = new QSharedData(*param1); + *outptr_QSharedData = ret; } -void QSharedData_Delete(QSharedData* self) { - delete self; +void QSharedData_Delete(QSharedData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QAdoptSharedDataTag* QAdoptSharedDataTag_new() { - return new QAdoptSharedDataTag(); +void QAdoptSharedDataTag_new(QAdoptSharedDataTag** outptr_QAdoptSharedDataTag) { + QAdoptSharedDataTag* ret = new QAdoptSharedDataTag(); + *outptr_QAdoptSharedDataTag = ret; } -void QAdoptSharedDataTag_Delete(QAdoptSharedDataTag* self) { - delete self; +void QAdoptSharedDataTag_Delete(QAdoptSharedDataTag* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qshareddata.go b/qt6/gen_qshareddata.go index 50de9f77..329322ae 100644 --- a/qt6/gen_qshareddata.go +++ b/qt6/gen_qshareddata.go @@ -14,7 +14,8 @@ import ( ) type QSharedData struct { - h *C.QSharedData + h *C.QSharedData + isSubclass bool } func (this *QSharedData) cPointer() *C.QSharedData { @@ -31,6 +32,7 @@ func (this *QSharedData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSharedData constructs the type using only CGO pointers. func newQSharedData(h *C.QSharedData) *QSharedData { if h == nil { return nil @@ -38,25 +40,38 @@ func newQSharedData(h *C.QSharedData) *QSharedData { return &QSharedData{h: h} } +// UnsafeNewQSharedData constructs the type using only unsafe pointers. func UnsafeNewQSharedData(h unsafe.Pointer) *QSharedData { - return newQSharedData((*C.QSharedData)(h)) + if h == nil { + return nil + } + + return &QSharedData{h: (*C.QSharedData)(h)} } // NewQSharedData constructs a new QSharedData object. func NewQSharedData() *QSharedData { - ret := C.QSharedData_new() - return newQSharedData(ret) + var outptr_QSharedData *C.QSharedData = nil + + C.QSharedData_new(&outptr_QSharedData) + ret := newQSharedData(outptr_QSharedData) + ret.isSubclass = true + return ret } // NewQSharedData2 constructs a new QSharedData object. func NewQSharedData2(param1 *QSharedData) *QSharedData { - ret := C.QSharedData_new2(param1.cPointer()) - return newQSharedData(ret) + var outptr_QSharedData *C.QSharedData = nil + + C.QSharedData_new2(param1.cPointer(), &outptr_QSharedData) + ret := newQSharedData(outptr_QSharedData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QSharedData) Delete() { - C.QSharedData_Delete(this.h) + C.QSharedData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -69,7 +84,8 @@ func (this *QSharedData) GoGC() { } type QAdoptSharedDataTag struct { - h *C.QAdoptSharedDataTag + h *C.QAdoptSharedDataTag + isSubclass bool } func (this *QAdoptSharedDataTag) cPointer() *C.QAdoptSharedDataTag { @@ -86,6 +102,7 @@ func (this *QAdoptSharedDataTag) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAdoptSharedDataTag constructs the type using only CGO pointers. func newQAdoptSharedDataTag(h *C.QAdoptSharedDataTag) *QAdoptSharedDataTag { if h == nil { return nil @@ -93,19 +110,28 @@ func newQAdoptSharedDataTag(h *C.QAdoptSharedDataTag) *QAdoptSharedDataTag { return &QAdoptSharedDataTag{h: h} } +// UnsafeNewQAdoptSharedDataTag constructs the type using only unsafe pointers. func UnsafeNewQAdoptSharedDataTag(h unsafe.Pointer) *QAdoptSharedDataTag { - return newQAdoptSharedDataTag((*C.QAdoptSharedDataTag)(h)) + if h == nil { + return nil + } + + return &QAdoptSharedDataTag{h: (*C.QAdoptSharedDataTag)(h)} } // NewQAdoptSharedDataTag constructs a new QAdoptSharedDataTag object. func NewQAdoptSharedDataTag() *QAdoptSharedDataTag { - ret := C.QAdoptSharedDataTag_new() - return newQAdoptSharedDataTag(ret) + var outptr_QAdoptSharedDataTag *C.QAdoptSharedDataTag = nil + + C.QAdoptSharedDataTag_new(&outptr_QAdoptSharedDataTag) + ret := newQAdoptSharedDataTag(outptr_QAdoptSharedDataTag) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QAdoptSharedDataTag) Delete() { - C.QAdoptSharedDataTag_Delete(this.h) + C.QAdoptSharedDataTag_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qshareddata.h b/qt6/gen_qshareddata.h index c5a2844d..7a4ee485 100644 --- a/qt6/gen_qshareddata.h +++ b/qt6/gen_qshareddata.h @@ -22,12 +22,12 @@ typedef struct QAdoptSharedDataTag QAdoptSharedDataTag; typedef struct QSharedData QSharedData; #endif -QSharedData* QSharedData_new(); -QSharedData* QSharedData_new2(QSharedData* param1); -void QSharedData_Delete(QSharedData* self); +void QSharedData_new(QSharedData** outptr_QSharedData); +void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData); +void QSharedData_Delete(QSharedData* self, bool isSubclass); -QAdoptSharedDataTag* QAdoptSharedDataTag_new(); -void QAdoptSharedDataTag_Delete(QAdoptSharedDataTag* self); +void QAdoptSharedDataTag_new(QAdoptSharedDataTag** outptr_QAdoptSharedDataTag); +void QAdoptSharedDataTag_Delete(QAdoptSharedDataTag* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsharedmemory.cpp b/qt6/gen_qsharedmemory.cpp index d7cb69e7..08e06ea2 100644 --- a/qt6/gen_qsharedmemory.cpp +++ b/qt6/gen_qsharedmemory.cpp @@ -1,29 +1,224 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qsharedmemory.h" #include "_cgo_export.h" -QSharedMemory* QSharedMemory_new() { - return new QSharedMemory(); +class MiqtVirtualQSharedMemory : public virtual QSharedMemory { +public: + + MiqtVirtualQSharedMemory(): QSharedMemory() {}; + MiqtVirtualQSharedMemory(const QString& key): QSharedMemory(key) {}; + MiqtVirtualQSharedMemory(QObject* parent): QSharedMemory(parent) {}; + MiqtVirtualQSharedMemory(const QString& key, QObject* parent): QSharedMemory(key, parent) {}; + + virtual ~MiqtVirtualQSharedMemory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSharedMemory::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSharedMemory_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSharedMemory::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSharedMemory::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSharedMemory_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSharedMemory::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSharedMemory::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSharedMemory_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSharedMemory::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSharedMemory::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSharedMemory_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSharedMemory::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSharedMemory::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSharedMemory_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSharedMemory::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSharedMemory::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSharedMemory_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSharedMemory::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSharedMemory::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSharedMemory_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSharedMemory::disconnectNotify(*signal); + + } + +}; + +void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } -QSharedMemory* QSharedMemory_new2(struct miqt_string key) { +void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSharedMemory(key_QString); + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } -QSharedMemory* QSharedMemory_new3(QObject* parent) { - return new QSharedMemory(parent); +void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(parent); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } -QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent) { +void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSharedMemory(key_QString, parent); + MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString, parent); + *outptr_QSharedMemory = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self) { @@ -164,7 +359,67 @@ bool QSharedMemory_Attach1(QSharedMemory* self, int mode) { return self->attach(static_cast(mode)); } -void QSharedMemory_Delete(QSharedMemory* self) { - delete self; +void QSharedMemory_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__Event = slot; +} + +bool QSharedMemory_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_Event(event); +} + +void QSharedMemory_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__EventFilter = slot; +} + +bool QSharedMemory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSharedMemory_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__TimerEvent = slot; +} + +void QSharedMemory_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_TimerEvent(event); +} + +void QSharedMemory_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__ChildEvent = slot; +} + +void QSharedMemory_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_ChildEvent(event); +} + +void QSharedMemory_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__CustomEvent = slot; +} + +void QSharedMemory_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_CustomEvent(event); +} + +void QSharedMemory_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__ConnectNotify = slot; +} + +void QSharedMemory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSharedMemory_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSharedMemory*)(self) )->handle__DisconnectNotify = slot; +} + +void QSharedMemory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSharedMemory*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSharedMemory_Delete(QSharedMemory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsharedmemory.go b/qt6/gen_qsharedmemory.go index fcc3f434..af393cb6 100644 --- a/qt6/gen_qsharedmemory.go +++ b/qt6/gen_qsharedmemory.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QSharedMemory struct { - h *C.QSharedMemory + h *C.QSharedMemory + isSubclass bool *QObject } @@ -53,21 +55,34 @@ func (this *QSharedMemory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSharedMemory(h *C.QSharedMemory) *QSharedMemory { +// newQSharedMemory constructs the type using only CGO pointers. +func newQSharedMemory(h *C.QSharedMemory, h_QObject *C.QObject) *QSharedMemory { if h == nil { return nil } - return &QSharedMemory{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSharedMemory{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSharedMemory(h unsafe.Pointer) *QSharedMemory { - return newQSharedMemory((*C.QSharedMemory)(h)) +// UnsafeNewQSharedMemory constructs the type using only unsafe pointers. +func UnsafeNewQSharedMemory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSharedMemory { + if h == nil { + return nil + } + + return &QSharedMemory{h: (*C.QSharedMemory)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSharedMemory constructs a new QSharedMemory object. func NewQSharedMemory() *QSharedMemory { - ret := C.QSharedMemory_new() - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new(&outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSharedMemory2 constructs a new QSharedMemory object. @@ -76,14 +91,24 @@ func NewQSharedMemory2(key string) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSharedMemory_new2(key_ms) - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new2(key_ms, &outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSharedMemory3 constructs a new QSharedMemory object. func NewQSharedMemory3(parent *QObject) *QSharedMemory { - ret := C.QSharedMemory_new3(parent.cPointer()) - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new3(parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSharedMemory4 constructs a new QSharedMemory object. @@ -92,8 +117,13 @@ func NewQSharedMemory4(key string, parent *QObject) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSharedMemory_new4(key_ms, parent.cPointer()) - return newQSharedMemory(ret) + var outptr_QSharedMemory *C.QSharedMemory = nil + var outptr_QObject *C.QObject = nil + + C.QSharedMemory_new4(key_ms, parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) + ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSharedMemory) MetaObject() *QMetaObject { @@ -226,9 +256,175 @@ func (this *QSharedMemory) Attach1(mode QSharedMemory__AccessMode) bool { return (bool)(C.QSharedMemory_Attach1(this.h, (C.int)(mode))) } +func (this *QSharedMemory) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSharedMemory_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSharedMemory) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSharedMemory_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_Event +func miqt_exec_callback_QSharedMemory_Event(self *C.QSharedMemory, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSharedMemory{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSharedMemory) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSharedMemory_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSharedMemory) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSharedMemory_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_EventFilter +func miqt_exec_callback_QSharedMemory_EventFilter(self *C.QSharedMemory, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSharedMemory{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSharedMemory) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSharedMemory_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSharedMemory) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSharedMemory_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_TimerEvent +func miqt_exec_callback_QSharedMemory_TimerEvent(self *C.QSharedMemory, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSharedMemory_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSharedMemory) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSharedMemory_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_ChildEvent +func miqt_exec_callback_QSharedMemory_ChildEvent(self *C.QSharedMemory, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSharedMemory_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSharedMemory) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSharedMemory_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_CustomEvent +func miqt_exec_callback_QSharedMemory_CustomEvent(self *C.QSharedMemory, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSharedMemory_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSharedMemory) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSharedMemory_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_ConnectNotify +func miqt_exec_callback_QSharedMemory_ConnectNotify(self *C.QSharedMemory, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSharedMemory) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSharedMemory_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSharedMemory) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSharedMemory_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSharedMemory_DisconnectNotify +func miqt_exec_callback_QSharedMemory_DisconnectNotify(self *C.QSharedMemory, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSharedMemory{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSharedMemory) Delete() { - C.QSharedMemory_Delete(this.h) + C.QSharedMemory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsharedmemory.h b/qt6/gen_qsharedmemory.h index 68b2380c..3a6b9f09 100644 --- a/qt6/gen_qsharedmemory.h +++ b/qt6/gen_qsharedmemory.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSharedMemory; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSharedMemory QSharedMemory; +typedef struct QTimerEvent QTimerEvent; #endif -QSharedMemory* QSharedMemory_new(); -QSharedMemory* QSharedMemory_new2(struct miqt_string key); -QSharedMemory* QSharedMemory_new3(QObject* parent); -QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent); +void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self); void* QSharedMemory_Metacast(QSharedMemory* self, const char* param1); struct miqt_string QSharedMemory_Tr(const char* s); @@ -51,7 +59,21 @@ struct miqt_string QSharedMemory_Tr2(const char* s, const char* c); struct miqt_string QSharedMemory_Tr3(const char* s, const char* c, int n); bool QSharedMemory_Create2(QSharedMemory* self, ptrdiff_t size, int mode); bool QSharedMemory_Attach1(QSharedMemory* self, int mode); -void QSharedMemory_Delete(QSharedMemory* self); +void QSharedMemory_override_virtual_Event(void* self, intptr_t slot); +bool QSharedMemory_virtualbase_Event(void* self, QEvent* event); +void QSharedMemory_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSharedMemory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSharedMemory_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSharedMemory_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSharedMemory_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSharedMemory_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSharedMemory_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSharedMemory_virtualbase_CustomEvent(void* self, QEvent* event); +void QSharedMemory_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSharedMemory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSharedMemory_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSharedMemory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSharedMemory_Delete(QSharedMemory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qshortcut.cpp b/qt6/gen_qshortcut.cpp index 19b6f4a3..3d444ddd 100644 --- a/qt6/gen_qshortcut.cpp +++ b/qt6/gen_qshortcut.cpp @@ -1,49 +1,259 @@ +#include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qshortcut.h" #include "_cgo_export.h" -QShortcut* QShortcut_new(QObject* parent) { - return new QShortcut(parent); +class MiqtVirtualQShortcut : public virtual QShortcut { +public: + + MiqtVirtualQShortcut(QObject* parent): QShortcut(parent) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QObject* parent): QShortcut(key, parent) {}; + MiqtVirtualQShortcut(QKeySequence::StandardKey key, QObject* parent): QShortcut(key, parent) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QObject* parent, const char* member): QShortcut(key, parent, member) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QObject* parent, const char* member, const char* ambiguousMember): QShortcut(key, parent, member, ambiguousMember) {}; + MiqtVirtualQShortcut(const QKeySequence& key, QObject* parent, const char* member, const char* ambiguousMember, Qt::ShortcutContext context): QShortcut(key, parent, member, ambiguousMember, context) {}; + MiqtVirtualQShortcut(QKeySequence::StandardKey key, QObject* parent, const char* member): QShortcut(key, parent, member) {}; + MiqtVirtualQShortcut(QKeySequence::StandardKey key, QObject* parent, const char* member, const char* ambiguousMember): QShortcut(key, parent, member, ambiguousMember) {}; + MiqtVirtualQShortcut(QKeySequence::StandardKey key, QObject* parent, const char* member, const char* ambiguousMember, Qt::ShortcutContext context): QShortcut(key, parent, member, ambiguousMember, context) {}; + + virtual ~MiqtVirtualQShortcut() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QShortcut::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QShortcut_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QShortcut::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QShortcut::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QShortcut_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QShortcut::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QShortcut::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QShortcut_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QShortcut::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QShortcut::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QShortcut_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QShortcut::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QShortcut::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QShortcut_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QShortcut::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QShortcut::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QShortcut_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QShortcut::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QShortcut::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QShortcut_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QShortcut::disconnectNotify(*signal); + + } + +}; + +void QShortcut_new(QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(parent); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new2(QKeySequence* key, QObject* parent) { - return new QShortcut(*key, parent); +void QShortcut_new2(QKeySequence* key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new3(int key, QObject* parent) { - return new QShortcut(static_cast(key), parent); +void QShortcut_new3(int key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new4(QKeySequence* key, QObject* parent, const char* member) { - return new QShortcut(*key, parent, member); +void QShortcut_new4(QKeySequence* key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember) { - return new QShortcut(*key, parent, member, ambiguousMember); +void QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context) { - return new QShortcut(*key, parent, member, ambiguousMember, static_cast(context)); +void QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember, static_cast(context)); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new7(int key, QObject* parent, const char* member) { - return new QShortcut(static_cast(key), parent, member); +void QShortcut_new7(int key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent, member); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember) { - return new QShortcut(static_cast(key), parent, member, ambiguousMember); +void QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent, member, ambiguousMember); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } -QShortcut* QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context) { - return new QShortcut(static_cast(key), parent, member, ambiguousMember, static_cast(context)); +void QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { + MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent, member, ambiguousMember, static_cast(context)); + *outptr_QShortcut = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QShortcut_MetaObject(const QShortcut* self) { @@ -150,7 +360,7 @@ void QShortcut_Activated(QShortcut* self) { } void QShortcut_connect_Activated(QShortcut* self, intptr_t slot) { - QShortcut::connect(self, static_cast(&QShortcut::activated), self, [=]() { + MiqtVirtualQShortcut::connect(self, static_cast(&QShortcut::activated), self, [=]() { miqt_exec_callback_QShortcut_Activated(slot); }); } @@ -160,7 +370,7 @@ void QShortcut_ActivatedAmbiguously(QShortcut* self) { } void QShortcut_connect_ActivatedAmbiguously(QShortcut* self, intptr_t slot) { - QShortcut::connect(self, static_cast(&QShortcut::activatedAmbiguously), self, [=]() { + MiqtVirtualQShortcut::connect(self, static_cast(&QShortcut::activatedAmbiguously), self, [=]() { miqt_exec_callback_QShortcut_ActivatedAmbiguously(slot); }); } @@ -187,7 +397,67 @@ struct miqt_string QShortcut_Tr3(const char* s, const char* c, int n) { return _ms; } -void QShortcut_Delete(QShortcut* self) { - delete self; +void QShortcut_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__Event = slot; +} + +bool QShortcut_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQShortcut*)(self) )->virtualbase_Event(e); +} + +void QShortcut_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__EventFilter = slot; +} + +bool QShortcut_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQShortcut*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QShortcut_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__TimerEvent = slot; +} + +void QShortcut_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_TimerEvent(event); +} + +void QShortcut_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__ChildEvent = slot; +} + +void QShortcut_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_ChildEvent(event); +} + +void QShortcut_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__CustomEvent = slot; +} + +void QShortcut_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_CustomEvent(event); +} + +void QShortcut_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__ConnectNotify = slot; +} + +void QShortcut_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QShortcut_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QShortcut*)(self) )->handle__DisconnectNotify = slot; +} + +void QShortcut_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQShortcut*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QShortcut_Delete(QShortcut* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qshortcut.go b/qt6/gen_qshortcut.go index db350a36..9ff24045 100644 --- a/qt6/gen_qshortcut.go +++ b/qt6/gen_qshortcut.go @@ -15,7 +15,8 @@ import ( ) type QShortcut struct { - h *C.QShortcut + h *C.QShortcut + isSubclass bool *QObject } @@ -33,41 +34,69 @@ func (this *QShortcut) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQShortcut(h *C.QShortcut) *QShortcut { +// newQShortcut constructs the type using only CGO pointers. +func newQShortcut(h *C.QShortcut, h_QObject *C.QObject) *QShortcut { if h == nil { return nil } - return &QShortcut{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QShortcut{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQShortcut(h unsafe.Pointer) *QShortcut { - return newQShortcut((*C.QShortcut)(h)) +// UnsafeNewQShortcut constructs the type using only unsafe pointers. +func UnsafeNewQShortcut(h unsafe.Pointer, h_QObject unsafe.Pointer) *QShortcut { + if h == nil { + return nil + } + + return &QShortcut{h: (*C.QShortcut)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQShortcut constructs a new QShortcut object. func NewQShortcut(parent *QObject) *QShortcut { - ret := C.QShortcut_new(parent.cPointer()) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new(parent.cPointer(), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut2 constructs a new QShortcut object. func NewQShortcut2(key *QKeySequence, parent *QObject) *QShortcut { - ret := C.QShortcut_new2(key.cPointer(), parent.cPointer()) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new2(key.cPointer(), parent.cPointer(), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut3 constructs a new QShortcut object. func NewQShortcut3(key QKeySequence__StandardKey, parent *QObject) *QShortcut { - ret := C.QShortcut_new3((C.int)(key), parent.cPointer()) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new3((C.int)(key), parent.cPointer(), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut4 constructs a new QShortcut object. func NewQShortcut4(key *QKeySequence, parent *QObject, member string) *QShortcut { member_Cstring := C.CString(member) defer C.free(unsafe.Pointer(member_Cstring)) - ret := C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring, &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut5 constructs a new QShortcut object. @@ -76,8 +105,13 @@ func NewQShortcut5(key *QKeySequence, parent *QObject, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - ret := C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut6 constructs a new QShortcut object. @@ -86,16 +120,26 @@ func NewQShortcut6(key *QKeySequence, parent *QObject, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - ret := C.QShortcut_new6(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context)) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new6(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut7 constructs a new QShortcut object. func NewQShortcut7(key QKeySequence__StandardKey, parent *QObject, member string) *QShortcut { member_Cstring := C.CString(member) defer C.free(unsafe.Pointer(member_Cstring)) - ret := C.QShortcut_new7((C.int)(key), parent.cPointer(), member_Cstring) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new7((C.int)(key), parent.cPointer(), member_Cstring, &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut8 constructs a new QShortcut object. @@ -104,8 +148,13 @@ func NewQShortcut8(key QKeySequence__StandardKey, parent *QObject, member string defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - ret := C.QShortcut_new8((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new8((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } // NewQShortcut9 constructs a new QShortcut object. @@ -114,8 +163,13 @@ func NewQShortcut9(key QKeySequence__StandardKey, parent *QObject, member string defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - ret := C.QShortcut_new9((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context)) - return newQShortcut(ret) + var outptr_QShortcut *C.QShortcut = nil + var outptr_QObject *C.QObject = nil + + C.QShortcut_new9((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context), &outptr_QShortcut, &outptr_QObject) + ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QShortcut) MetaObject() *QMetaObject { @@ -274,9 +328,175 @@ func QShortcut_Tr3(s string, c string, n int) string { return _ret } +func (this *QShortcut) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QShortcut_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QShortcut) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QShortcut_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_Event +func miqt_exec_callback_QShortcut_Event(self *C.QShortcut, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QShortcut{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QShortcut) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QShortcut_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QShortcut) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QShortcut_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_EventFilter +func miqt_exec_callback_QShortcut_EventFilter(self *C.QShortcut, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QShortcut{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QShortcut) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QShortcut_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QShortcut) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QShortcut_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_TimerEvent +func miqt_exec_callback_QShortcut_TimerEvent(self *C.QShortcut, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QShortcut{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QShortcut) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QShortcut_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QShortcut) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QShortcut_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_ChildEvent +func miqt_exec_callback_QShortcut_ChildEvent(self *C.QShortcut, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QShortcut{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QShortcut) callVirtualBase_CustomEvent(event *QEvent) { + + C.QShortcut_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QShortcut) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QShortcut_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_CustomEvent +func miqt_exec_callback_QShortcut_CustomEvent(self *C.QShortcut, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QShortcut{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QShortcut) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QShortcut_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QShortcut) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QShortcut_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_ConnectNotify +func miqt_exec_callback_QShortcut_ConnectNotify(self *C.QShortcut, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QShortcut{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QShortcut) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QShortcut_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QShortcut) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QShortcut_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QShortcut_DisconnectNotify +func miqt_exec_callback_QShortcut_DisconnectNotify(self *C.QShortcut, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QShortcut{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QShortcut) Delete() { - C.QShortcut_Delete(this.h) + C.QShortcut_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qshortcut.h b/qt6/gen_qshortcut.h index 93850329..ee2cca52 100644 --- a/qt6/gen_qshortcut.h +++ b/qt6/gen_qshortcut.h @@ -15,26 +15,34 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QKeySequence; +class QMetaMethod; class QMetaObject; class QObject; class QShortcut; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QKeySequence QKeySequence; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QShortcut QShortcut; +typedef struct QTimerEvent QTimerEvent; #endif -QShortcut* QShortcut_new(QObject* parent); -QShortcut* QShortcut_new2(QKeySequence* key, QObject* parent); -QShortcut* QShortcut_new3(int key, QObject* parent); -QShortcut* QShortcut_new4(QKeySequence* key, QObject* parent, const char* member); -QShortcut* QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember); -QShortcut* QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context); -QShortcut* QShortcut_new7(int key, QObject* parent, const char* member); -QShortcut* QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember); -QShortcut* QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context); +void QShortcut_new(QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new2(QKeySequence* key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new3(int key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new4(QKeySequence* key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new7(int key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +void QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject); QMetaObject* QShortcut_MetaObject(const QShortcut* self); void* QShortcut_Metacast(QShortcut* self, const char* param1); struct miqt_string QShortcut_Tr(const char* s); @@ -56,9 +64,24 @@ void QShortcut_Activated(QShortcut* self); void QShortcut_connect_Activated(QShortcut* self, intptr_t slot); void QShortcut_ActivatedAmbiguously(QShortcut* self); void QShortcut_connect_ActivatedAmbiguously(QShortcut* self, intptr_t slot); +bool QShortcut_Event(QShortcut* self, QEvent* e); struct miqt_string QShortcut_Tr2(const char* s, const char* c); struct miqt_string QShortcut_Tr3(const char* s, const char* c, int n); -void QShortcut_Delete(QShortcut* self); +void QShortcut_override_virtual_Event(void* self, intptr_t slot); +bool QShortcut_virtualbase_Event(void* self, QEvent* e); +void QShortcut_override_virtual_EventFilter(void* self, intptr_t slot); +bool QShortcut_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QShortcut_override_virtual_TimerEvent(void* self, intptr_t slot); +void QShortcut_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QShortcut_override_virtual_ChildEvent(void* self, intptr_t slot); +void QShortcut_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QShortcut_override_virtual_CustomEvent(void* self, intptr_t slot); +void QShortcut_virtualbase_CustomEvent(void* self, QEvent* event); +void QShortcut_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QShortcut_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QShortcut_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QShortcut_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QShortcut_Delete(QShortcut* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsignalmapper.cpp b/qt6/gen_qsignalmapper.cpp index 451a8131..387dbe70 100644 --- a/qt6/gen_qsignalmapper.cpp +++ b/qt6/gen_qsignalmapper.cpp @@ -1,19 +1,208 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qsignalmapper.h" #include "_cgo_export.h" -QSignalMapper* QSignalMapper_new() { - return new QSignalMapper(); +class MiqtVirtualQSignalMapper : public virtual QSignalMapper { +public: + + MiqtVirtualQSignalMapper(): QSignalMapper() {}; + MiqtVirtualQSignalMapper(QObject* parent): QSignalMapper(parent) {}; + + virtual ~MiqtVirtualQSignalMapper() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSignalMapper::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSignalMapper_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSignalMapper::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSignalMapper::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSignalMapper_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSignalMapper::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSignalMapper::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSignalMapper_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSignalMapper::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSignalMapper::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSignalMapper_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSignalMapper::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSignalMapper::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSignalMapper_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSignalMapper::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSignalMapper::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSignalMapper_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSignalMapper::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSignalMapper::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSignalMapper_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSignalMapper::disconnectNotify(*signal); + + } + +}; + +void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { + MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(); + *outptr_QSignalMapper = ret; + *outptr_QObject = static_cast(ret); } -QSignalMapper* QSignalMapper_new2(QObject* parent) { - return new QSignalMapper(parent); +void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { + MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(parent); + *outptr_QSignalMapper = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self) { @@ -70,7 +259,7 @@ void QSignalMapper_MappedInt(QSignalMapper* self, int param1) { } void QSignalMapper_connect_MappedInt(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedInt), self, [=](int param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedInt), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedInt(slot, sigval1); }); @@ -82,7 +271,7 @@ void QSignalMapper_MappedString(QSignalMapper* self, struct miqt_string param1) } void QSignalMapper_connect_MappedString(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedString), self, [=](const QString& param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedString), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -100,7 +289,7 @@ void QSignalMapper_MappedObject(QSignalMapper* self, QObject* param1) { } void QSignalMapper_connect_MappedObject(QSignalMapper* self, intptr_t slot) { - QSignalMapper::connect(self, static_cast(&QSignalMapper::mappedObject), self, [=](QObject* param1) { + MiqtVirtualQSignalMapper::connect(self, static_cast(&QSignalMapper::mappedObject), self, [=](QObject* param1) { QObject* sigval1 = param1; miqt_exec_callback_QSignalMapper_MappedObject(slot, sigval1); }); @@ -136,7 +325,67 @@ struct miqt_string QSignalMapper_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSignalMapper_Delete(QSignalMapper* self) { - delete self; +void QSignalMapper_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__Event = slot; +} + +bool QSignalMapper_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_Event(event); +} + +void QSignalMapper_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__EventFilter = slot; +} + +bool QSignalMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSignalMapper_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__TimerEvent = slot; +} + +void QSignalMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_TimerEvent(event); +} + +void QSignalMapper_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__ChildEvent = slot; +} + +void QSignalMapper_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_ChildEvent(event); +} + +void QSignalMapper_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__CustomEvent = slot; +} + +void QSignalMapper_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_CustomEvent(event); +} + +void QSignalMapper_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__ConnectNotify = slot; +} + +void QSignalMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSignalMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSignalMapper*)(self) )->handle__DisconnectNotify = slot; +} + +void QSignalMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSignalMapper*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSignalMapper_Delete(QSignalMapper* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsignalmapper.go b/qt6/gen_qsignalmapper.go index 70480a73..dda156a1 100644 --- a/qt6/gen_qsignalmapper.go +++ b/qt6/gen_qsignalmapper.go @@ -15,7 +15,8 @@ import ( ) type QSignalMapper struct { - h *C.QSignalMapper + h *C.QSignalMapper + isSubclass bool *QObject } @@ -33,27 +34,45 @@ func (this *QSignalMapper) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSignalMapper(h *C.QSignalMapper) *QSignalMapper { +// newQSignalMapper constructs the type using only CGO pointers. +func newQSignalMapper(h *C.QSignalMapper, h_QObject *C.QObject) *QSignalMapper { if h == nil { return nil } - return &QSignalMapper{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSignalMapper{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSignalMapper(h unsafe.Pointer) *QSignalMapper { - return newQSignalMapper((*C.QSignalMapper)(h)) +// UnsafeNewQSignalMapper constructs the type using only unsafe pointers. +func UnsafeNewQSignalMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSignalMapper { + if h == nil { + return nil + } + + return &QSignalMapper{h: (*C.QSignalMapper)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSignalMapper constructs a new QSignalMapper object. func NewQSignalMapper() *QSignalMapper { - ret := C.QSignalMapper_new() - return newQSignalMapper(ret) + var outptr_QSignalMapper *C.QSignalMapper = nil + var outptr_QObject *C.QObject = nil + + C.QSignalMapper_new(&outptr_QSignalMapper, &outptr_QObject) + ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSignalMapper2 constructs a new QSignalMapper object. func NewQSignalMapper2(parent *QObject) *QSignalMapper { - ret := C.QSignalMapper_new2(parent.cPointer()) - return newQSignalMapper(ret) + var outptr_QSignalMapper *C.QSignalMapper = nil + var outptr_QObject *C.QObject = nil + + C.QSignalMapper_new2(parent.cPointer(), &outptr_QSignalMapper, &outptr_QObject) + ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSignalMapper) MetaObject() *QMetaObject { @@ -208,9 +227,175 @@ func QSignalMapper_Tr3(s string, c string, n int) string { return _ret } +func (this *QSignalMapper) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSignalMapper_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSignalMapper) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSignalMapper_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_Event +func miqt_exec_callback_QSignalMapper_Event(self *C.QSignalMapper, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSignalMapper{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSignalMapper) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSignalMapper_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSignalMapper) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSignalMapper_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_EventFilter +func miqt_exec_callback_QSignalMapper_EventFilter(self *C.QSignalMapper, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSignalMapper{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSignalMapper) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSignalMapper_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalMapper) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSignalMapper_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_TimerEvent +func miqt_exec_callback_QSignalMapper_TimerEvent(self *C.QSignalMapper, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSignalMapper_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalMapper) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSignalMapper_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_ChildEvent +func miqt_exec_callback_QSignalMapper_ChildEvent(self *C.QSignalMapper, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSignalMapper_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSignalMapper) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSignalMapper_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_CustomEvent +func miqt_exec_callback_QSignalMapper_CustomEvent(self *C.QSignalMapper, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSignalMapper_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSignalMapper) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSignalMapper_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_ConnectNotify +func miqt_exec_callback_QSignalMapper_ConnectNotify(self *C.QSignalMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSignalMapper) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSignalMapper_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSignalMapper) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSignalMapper_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSignalMapper_DisconnectNotify +func miqt_exec_callback_QSignalMapper_DisconnectNotify(self *C.QSignalMapper, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSignalMapper{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSignalMapper) Delete() { - C.QSignalMapper_Delete(this.h) + C.QSignalMapper_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsignalmapper.h b/qt6/gen_qsignalmapper.h index 3864d1d7..c3079bed 100644 --- a/qt6/gen_qsignalmapper.h +++ b/qt6/gen_qsignalmapper.h @@ -15,17 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSignalMapper; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSignalMapper QSignalMapper; +typedef struct QTimerEvent QTimerEvent; #endif -QSignalMapper* QSignalMapper_new(); -QSignalMapper* QSignalMapper_new2(QObject* parent); +void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); +void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self); void* QSignalMapper_Metacast(QSignalMapper* self, const char* param1); struct miqt_string QSignalMapper_Tr(const char* s); @@ -46,7 +54,21 @@ void QSignalMapper_Map(QSignalMapper* self); void QSignalMapper_MapWithSender(QSignalMapper* self, QObject* sender); struct miqt_string QSignalMapper_Tr2(const char* s, const char* c); struct miqt_string QSignalMapper_Tr3(const char* s, const char* c, int n); -void QSignalMapper_Delete(QSignalMapper* self); +void QSignalMapper_override_virtual_Event(void* self, intptr_t slot); +bool QSignalMapper_virtualbase_Event(void* self, QEvent* event); +void QSignalMapper_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSignalMapper_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSignalMapper_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSignalMapper_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSignalMapper_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSignalMapper_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSignalMapper_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSignalMapper_virtualbase_CustomEvent(void* self, QEvent* event); +void QSignalMapper_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSignalMapper_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSignalMapper_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSignalMapper_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSignalMapper_Delete(QSignalMapper* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsize.cpp b/qt6/gen_qsize.cpp index c4947c88..f94d6e97 100644 --- a/qt6/gen_qsize.cpp +++ b/qt6/gen_qsize.cpp @@ -6,16 +6,19 @@ #include "gen_qsize.h" #include "_cgo_export.h" -QSize* QSize_new() { - return new QSize(); +void QSize_new(QSize** outptr_QSize) { + QSize* ret = new QSize(); + *outptr_QSize = ret; } -QSize* QSize_new2(int w, int h) { - return new QSize(static_cast(w), static_cast(h)); +void QSize_new2(int w, int h, QSize** outptr_QSize) { + QSize* ret = new QSize(static_cast(w), static_cast(h)); + *outptr_QSize = ret; } -QSize* QSize_new3(QSize* param1) { - return new QSize(*param1); +void QSize_new3(QSize* param1, QSize** outptr_QSize) { + QSize* ret = new QSize(*param1); + *outptr_QSize = ret; } bool QSize_IsNull(const QSize* self) { @@ -114,24 +117,32 @@ QSizeF* QSize_ToSizeF(const QSize* self) { return new QSizeF(self->toSizeF()); } -void QSize_Delete(QSize* self) { - delete self; +void QSize_Delete(QSize* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSizeF* QSizeF_new() { - return new QSizeF(); +void QSizeF_new(QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(); + *outptr_QSizeF = ret; } -QSizeF* QSizeF_new2(QSize* sz) { - return new QSizeF(*sz); +void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(*sz); + *outptr_QSizeF = ret; } -QSizeF* QSizeF_new3(double w, double h) { - return new QSizeF(static_cast(w), static_cast(h)); +void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(static_cast(w), static_cast(h)); + *outptr_QSizeF = ret; } -QSizeF* QSizeF_new4(QSizeF* param1) { - return new QSizeF(*param1); +void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF) { + QSizeF* ret = new QSizeF(*param1); + *outptr_QSizeF = ret; } bool QSizeF_IsNull(const QSizeF* self) { @@ -232,7 +243,11 @@ QSize* QSizeF_ToSize(const QSizeF* self) { return new QSize(self->toSize()); } -void QSizeF_Delete(QSizeF* self) { - delete self; +void QSizeF_Delete(QSizeF* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsize.go b/qt6/gen_qsize.go index fe512f5c..6da6d29e 100644 --- a/qt6/gen_qsize.go +++ b/qt6/gen_qsize.go @@ -14,7 +14,8 @@ import ( ) type QSize struct { - h *C.QSize + h *C.QSize + isSubclass bool } func (this *QSize) cPointer() *C.QSize { @@ -31,6 +32,7 @@ func (this *QSize) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSize constructs the type using only CGO pointers. func newQSize(h *C.QSize) *QSize { if h == nil { return nil @@ -38,26 +40,43 @@ func newQSize(h *C.QSize) *QSize { return &QSize{h: h} } +// UnsafeNewQSize constructs the type using only unsafe pointers. func UnsafeNewQSize(h unsafe.Pointer) *QSize { - return newQSize((*C.QSize)(h)) + if h == nil { + return nil + } + + return &QSize{h: (*C.QSize)(h)} } // NewQSize constructs a new QSize object. func NewQSize() *QSize { - ret := C.QSize_new() - return newQSize(ret) + var outptr_QSize *C.QSize = nil + + C.QSize_new(&outptr_QSize) + ret := newQSize(outptr_QSize) + ret.isSubclass = true + return ret } // NewQSize2 constructs a new QSize object. func NewQSize2(w int, h int) *QSize { - ret := C.QSize_new2((C.int)(w), (C.int)(h)) - return newQSize(ret) + var outptr_QSize *C.QSize = nil + + C.QSize_new2((C.int)(w), (C.int)(h), &outptr_QSize) + ret := newQSize(outptr_QSize) + ret.isSubclass = true + return ret } // NewQSize3 constructs a new QSize object. func NewQSize3(param1 *QSize) *QSize { - ret := C.QSize_new3(param1.cPointer()) - return newQSize(ret) + var outptr_QSize *C.QSize = nil + + C.QSize_new3(param1.cPointer(), &outptr_QSize) + ret := newQSize(outptr_QSize) + ret.isSubclass = true + return ret } func (this *QSize) IsNull() bool { @@ -174,7 +193,7 @@ func (this *QSize) ToSizeF() *QSizeF { // Delete this object from C++ memory. func (this *QSize) Delete() { - C.QSize_Delete(this.h) + C.QSize_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -187,7 +206,8 @@ func (this *QSize) GoGC() { } type QSizeF struct { - h *C.QSizeF + h *C.QSizeF + isSubclass bool } func (this *QSizeF) cPointer() *C.QSizeF { @@ -204,6 +224,7 @@ func (this *QSizeF) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSizeF constructs the type using only CGO pointers. func newQSizeF(h *C.QSizeF) *QSizeF { if h == nil { return nil @@ -211,32 +232,53 @@ func newQSizeF(h *C.QSizeF) *QSizeF { return &QSizeF{h: h} } +// UnsafeNewQSizeF constructs the type using only unsafe pointers. func UnsafeNewQSizeF(h unsafe.Pointer) *QSizeF { - return newQSizeF((*C.QSizeF)(h)) + if h == nil { + return nil + } + + return &QSizeF{h: (*C.QSizeF)(h)} } // NewQSizeF constructs a new QSizeF object. func NewQSizeF() *QSizeF { - ret := C.QSizeF_new() - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new(&outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } // NewQSizeF2 constructs a new QSizeF object. func NewQSizeF2(sz *QSize) *QSizeF { - ret := C.QSizeF_new2(sz.cPointer()) - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new2(sz.cPointer(), &outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } // NewQSizeF3 constructs a new QSizeF object. func NewQSizeF3(w float64, h float64) *QSizeF { - ret := C.QSizeF_new3((C.double)(w), (C.double)(h)) - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new3((C.double)(w), (C.double)(h), &outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } // NewQSizeF4 constructs a new QSizeF object. func NewQSizeF4(param1 *QSizeF) *QSizeF { - ret := C.QSizeF_new4(param1.cPointer()) - return newQSizeF(ret) + var outptr_QSizeF *C.QSizeF = nil + + C.QSizeF_new4(param1.cPointer(), &outptr_QSizeF) + ret := newQSizeF(outptr_QSizeF) + ret.isSubclass = true + return ret } func (this *QSizeF) IsNull() bool { @@ -353,7 +395,7 @@ func (this *QSizeF) ToSize() *QSize { // Delete this object from C++ memory. func (this *QSizeF) Delete() { - C.QSizeF_Delete(this.h) + C.QSizeF_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsize.h b/qt6/gen_qsize.h index d9d2a8e7..330fcbcd 100644 --- a/qt6/gen_qsize.h +++ b/qt6/gen_qsize.h @@ -26,9 +26,9 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -QSize* QSize_new(); -QSize* QSize_new2(int w, int h); -QSize* QSize_new3(QSize* param1); +void QSize_new(QSize** outptr_QSize); +void QSize_new2(int w, int h, QSize** outptr_QSize); +void QSize_new3(QSize* param1, QSize** outptr_QSize); bool QSize_IsNull(const QSize* self); bool QSize_IsEmpty(const QSize* self); bool QSize_IsValid(const QSize* self); @@ -51,12 +51,12 @@ QSize* QSize_OperatorMinusAssign(QSize* self, QSize* param1); QSize* QSize_OperatorMultiplyAssign(QSize* self, double c); QSize* QSize_OperatorDivideAssign(QSize* self, double c); QSizeF* QSize_ToSizeF(const QSize* self); -void QSize_Delete(QSize* self); +void QSize_Delete(QSize* self, bool isSubclass); -QSizeF* QSizeF_new(); -QSizeF* QSizeF_new2(QSize* sz); -QSizeF* QSizeF_new3(double w, double h); -QSizeF* QSizeF_new4(QSizeF* param1); +void QSizeF_new(QSizeF** outptr_QSizeF); +void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF); +void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF); +void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF); bool QSizeF_IsNull(const QSizeF* self); bool QSizeF_IsEmpty(const QSizeF* self); bool QSizeF_IsValid(const QSizeF* self); @@ -79,7 +79,7 @@ QSizeF* QSizeF_OperatorMinusAssign(QSizeF* self, QSizeF* param1); QSizeF* QSizeF_OperatorMultiplyAssign(QSizeF* self, double c); QSizeF* QSizeF_OperatorDivideAssign(QSizeF* self, double c); QSize* QSizeF_ToSize(const QSizeF* self); -void QSizeF_Delete(QSizeF* self); +void QSizeF_Delete(QSizeF* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsizegrip.cpp b/qt6/gen_qsizegrip.cpp index 8598f39a..49882581 100644 --- a/qt6/gen_qsizegrip.cpp +++ b/qt6/gen_qsizegrip.cpp @@ -1,16 +1,1056 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qsizegrip.h" #include "_cgo_export.h" -QSizeGrip* QSizeGrip_new(QWidget* parent) { - return new QSizeGrip(parent); +class MiqtVirtualQSizeGrip : public virtual QSizeGrip { +public: + + MiqtVirtualQSizeGrip(QWidget* parent): QSizeGrip(parent) {}; + + virtual ~MiqtVirtualQSizeGrip() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSizeGrip::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSizeGrip_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSizeGrip::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QSizeGrip::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSizeGrip_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSizeGrip::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QSizeGrip::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QSizeGrip::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QSizeGrip::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QSizeGrip::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QSizeGrip::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QSizeGrip::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* mouseEvent) override { + if (handle__MouseReleaseEvent == 0) { + QSizeGrip::mouseReleaseEvent(mouseEvent); + return; + } + + QMouseEvent* sigval1 = mouseEvent; + + miqt_exec_callback_QSizeGrip_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* mouseEvent) { + + QSizeGrip::mouseReleaseEvent(mouseEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* moveEvent) override { + if (handle__MoveEvent == 0) { + QSizeGrip::moveEvent(moveEvent); + return; + } + + QMoveEvent* sigval1 = moveEvent; + + miqt_exec_callback_QSizeGrip_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* moveEvent) { + + QSizeGrip::moveEvent(moveEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* showEvent) override { + if (handle__ShowEvent == 0) { + QSizeGrip::showEvent(showEvent); + return; + } + + QShowEvent* sigval1 = showEvent; + + miqt_exec_callback_QSizeGrip_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* showEvent) { + + QSizeGrip::showEvent(showEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* hideEvent) override { + if (handle__HideEvent == 0) { + QSizeGrip::hideEvent(hideEvent); + return; + } + + QHideEvent* sigval1 = hideEvent; + + miqt_exec_callback_QSizeGrip_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* hideEvent) { + + QSizeGrip::hideEvent(hideEvent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QSizeGrip::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QSizeGrip::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSizeGrip::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSizeGrip::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSizeGrip::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSizeGrip_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSizeGrip::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSizeGrip::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSizeGrip_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSizeGrip::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSizeGrip::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSizeGrip_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSizeGrip::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSizeGrip::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSizeGrip_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSizeGrip::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QSizeGrip::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSizeGrip_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSizeGrip::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QSizeGrip::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSizeGrip::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSizeGrip::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSizeGrip::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSizeGrip::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSizeGrip::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSizeGrip::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSizeGrip::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSizeGrip::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSizeGrip::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSizeGrip::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSizeGrip::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QSizeGrip::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QSizeGrip::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QSizeGrip::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSizeGrip::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QSizeGrip::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSizeGrip::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSizeGrip::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSizeGrip::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSizeGrip::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSizeGrip::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QSizeGrip::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSizeGrip::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QSizeGrip::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSizeGrip::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QSizeGrip::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSizeGrip::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QSizeGrip::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSizeGrip::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QSizeGrip::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSizeGrip::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QSizeGrip::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSizeGrip_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSizeGrip::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QSizeGrip::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QSizeGrip_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QSizeGrip::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSizeGrip::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSizeGrip::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSizeGrip::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSizeGrip_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QSizeGrip::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QSizeGrip::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSizeGrip_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSizeGrip::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QSizeGrip::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSizeGrip_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSizeGrip::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QSizeGrip::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSizeGrip_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSizeGrip::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QSizeGrip::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSizeGrip_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSizeGrip::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSizeGrip::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSizeGrip_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSizeGrip::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QSizeGrip::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSizeGrip_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSizeGrip::focusNextPrevChild(next); + + } + +}; + +void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSizeGrip* ret = new MiqtVirtualQSizeGrip(parent); + *outptr_QSizeGrip = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self) { @@ -62,7 +1102,347 @@ struct miqt_string QSizeGrip_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSizeGrip_Delete(QSizeGrip* self) { - delete self; +void QSizeGrip_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__SizeHint = slot; +} + +QSize* QSizeGrip_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_SizeHint(); +} + +void QSizeGrip_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__SetVisible = slot; +} + +void QSizeGrip_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_SetVisible(visible); +} + +void QSizeGrip_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__PaintEvent = slot; +} + +void QSizeGrip_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_PaintEvent(param1); +} + +void QSizeGrip_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MousePressEvent = slot; +} + +void QSizeGrip_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QSizeGrip_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSizeGrip_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QSizeGrip_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSizeGrip_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MouseReleaseEvent(mouseEvent); +} + +void QSizeGrip_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MoveEvent = slot; +} + +void QSizeGrip_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MoveEvent(moveEvent); +} + +void QSizeGrip_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ShowEvent = slot; +} + +void QSizeGrip_virtualbase_ShowEvent(void* self, QShowEvent* showEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ShowEvent(showEvent); +} + +void QSizeGrip_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__HideEvent = slot; +} + +void QSizeGrip_virtualbase_HideEvent(void* self, QHideEvent* hideEvent) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_HideEvent(hideEvent); +} + +void QSizeGrip_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__EventFilter = slot; +} + +bool QSizeGrip_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QSizeGrip_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__Event = slot; +} + +bool QSizeGrip_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_Event(param1); +} + +void QSizeGrip_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DevType = slot; +} + +int QSizeGrip_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_DevType(); +} + +void QSizeGrip_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSizeGrip_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSizeGrip_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__HeightForWidth = slot; +} + +int QSizeGrip_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSizeGrip_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSizeGrip_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSizeGrip_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSizeGrip_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_PaintEngine(); +} + +void QSizeGrip_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSizeGrip_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSizeGrip_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__WheelEvent = slot; +} + +void QSizeGrip_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_WheelEvent(event); +} + +void QSizeGrip_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__KeyPressEvent = slot; +} + +void QSizeGrip_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSizeGrip_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSizeGrip_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSizeGrip_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__FocusInEvent = slot; +} + +void QSizeGrip_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSizeGrip_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__FocusOutEvent = slot; +} + +void QSizeGrip_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSizeGrip_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__EnterEvent = slot; +} + +void QSizeGrip_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_EnterEvent(event); +} + +void QSizeGrip_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__LeaveEvent = slot; +} + +void QSizeGrip_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSizeGrip_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ResizeEvent = slot; +} + +void QSizeGrip_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSizeGrip_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__CloseEvent = slot; +} + +void QSizeGrip_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_CloseEvent(event); +} + +void QSizeGrip_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSizeGrip_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSizeGrip_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__TabletEvent = slot; +} + +void QSizeGrip_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_TabletEvent(event); +} + +void QSizeGrip_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ActionEvent = slot; +} + +void QSizeGrip_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ActionEvent(event); +} + +void QSizeGrip_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DragEnterEvent = slot; +} + +void QSizeGrip_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSizeGrip_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DragMoveEvent = slot; +} + +void QSizeGrip_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSizeGrip_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSizeGrip_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSizeGrip_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__DropEvent = slot; +} + +void QSizeGrip_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_DropEvent(event); +} + +void QSizeGrip_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__NativeEvent = slot; +} + +bool QSizeGrip_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSizeGrip_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__ChangeEvent = slot; +} + +void QSizeGrip_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSizeGrip_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__Metric = slot; +} + +int QSizeGrip_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_Metric(param1); +} + +void QSizeGrip_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__InitPainter = slot; +} + +void QSizeGrip_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_InitPainter(painter); +} + +void QSizeGrip_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSizeGrip_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_Redirected(offset); +} + +void QSizeGrip_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSizeGrip_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_SharedPainter(); +} + +void QSizeGrip_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__InputMethodEvent = slot; +} + +void QSizeGrip_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSizeGrip_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSizeGrip_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSizeGrip*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSizeGrip_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSizeGrip*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSizeGrip_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSizeGrip*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSizeGrip_Delete(QSizeGrip* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsizegrip.go b/qt6/gen_qsizegrip.go index e5dadb16..72e4a1da 100644 --- a/qt6/gen_qsizegrip.go +++ b/qt6/gen_qsizegrip.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QSizeGrip struct { - h *C.QSizeGrip + h *C.QSizeGrip + isSubclass bool *QWidget } @@ -32,21 +34,36 @@ func (this *QSizeGrip) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSizeGrip(h *C.QSizeGrip) *QSizeGrip { +// newQSizeGrip constructs the type using only CGO pointers. +func newQSizeGrip(h *C.QSizeGrip, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSizeGrip { if h == nil { return nil } - return &QSizeGrip{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QSizeGrip{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSizeGrip(h unsafe.Pointer) *QSizeGrip { - return newQSizeGrip((*C.QSizeGrip)(h)) +// UnsafeNewQSizeGrip constructs the type using only unsafe pointers. +func UnsafeNewQSizeGrip(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSizeGrip { + if h == nil { + return nil + } + + return &QSizeGrip{h: (*C.QSizeGrip)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSizeGrip constructs a new QSizeGrip object. func NewQSizeGrip(parent *QWidget) *QSizeGrip { - ret := C.QSizeGrip_new(parent.cPointer()) - return newQSizeGrip(ret) + var outptr_QSizeGrip *C.QSizeGrip = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSizeGrip_new(parent.cPointer(), &outptr_QSizeGrip, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSizeGrip(outptr_QSizeGrip, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSizeGrip) MetaObject() *QMetaObject { @@ -101,9 +118,1001 @@ func QSizeGrip_Tr3(s string, c string, n int) string { return _ret } +func (this *QSizeGrip) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSizeGrip_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSizeGrip) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSizeGrip_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_SizeHint +func miqt_exec_callback_QSizeGrip_SizeHint(self *C.QSizeGrip, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_SetVisible(visible bool) { + + C.QSizeGrip_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSizeGrip) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSizeGrip_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_SetVisible +func miqt_exec_callback_QSizeGrip_SetVisible(self *C.QSizeGrip, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QSizeGrip_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QSizeGrip_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_PaintEvent +func miqt_exec_callback_QSizeGrip_PaintEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QSizeGrip_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSizeGrip_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MousePressEvent +func miqt_exec_callback_QSizeGrip_MousePressEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QSizeGrip_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSizeGrip_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MouseMoveEvent +func miqt_exec_callback_QSizeGrip_MouseMoveEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MouseReleaseEvent(mouseEvent *QMouseEvent) { + + C.QSizeGrip_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), mouseEvent.cPointer()) + +} +func (this *QSizeGrip) OnMouseReleaseEvent(slot func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) { + C.QSizeGrip_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MouseReleaseEvent +func miqt_exec_callback_QSizeGrip_MouseReleaseEvent(self *C.QSizeGrip, cb C.intptr_t, mouseEvent *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mouseEvent *QMouseEvent), mouseEvent *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(mouseEvent), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_MoveEvent(moveEvent *QMoveEvent) { + + C.QSizeGrip_virtualbase_MoveEvent(unsafe.Pointer(this.h), moveEvent.cPointer()) + +} +func (this *QSizeGrip) OnMoveEvent(slot func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) { + C.QSizeGrip_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MoveEvent +func miqt_exec_callback_QSizeGrip_MoveEvent(self *C.QSizeGrip, cb C.intptr_t, moveEvent *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(moveEvent *QMoveEvent), moveEvent *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(moveEvent), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ShowEvent(showEvent *QShowEvent) { + + C.QSizeGrip_virtualbase_ShowEvent(unsafe.Pointer(this.h), showEvent.cPointer()) + +} +func (this *QSizeGrip) OnShowEvent(slot func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) { + C.QSizeGrip_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ShowEvent +func miqt_exec_callback_QSizeGrip_ShowEvent(self *C.QSizeGrip, cb C.intptr_t, showEvent *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(showEvent *QShowEvent), showEvent *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(showEvent), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_HideEvent(hideEvent *QHideEvent) { + + C.QSizeGrip_virtualbase_HideEvent(unsafe.Pointer(this.h), hideEvent.cPointer()) + +} +func (this *QSizeGrip) OnHideEvent(slot func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) { + C.QSizeGrip_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_HideEvent +func miqt_exec_callback_QSizeGrip_HideEvent(self *C.QSizeGrip, cb C.intptr_t, hideEvent *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hideEvent *QHideEvent), hideEvent *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(hideEvent), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QSizeGrip_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QSizeGrip) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QSizeGrip_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_EventFilter +func miqt_exec_callback_QSizeGrip_EventFilter(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSizeGrip_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSizeGrip) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSizeGrip_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_Event +func miqt_exec_callback_QSizeGrip_Event(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_DevType() int { + + return (int)(C.QSizeGrip_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSizeGrip) OnDevType(slot func(super func() int) int) { + C.QSizeGrip_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DevType +func miqt_exec_callback_QSizeGrip_DevType(self *C.QSizeGrip, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSizeGrip_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSizeGrip) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSizeGrip_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MinimumSizeHint +func miqt_exec_callback_QSizeGrip_MinimumSizeHint(self *C.QSizeGrip, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSizeGrip_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSizeGrip) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSizeGrip_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_HeightForWidth +func miqt_exec_callback_QSizeGrip_HeightForWidth(self *C.QSizeGrip, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSizeGrip_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSizeGrip) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSizeGrip_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_HasHeightForWidth +func miqt_exec_callback_QSizeGrip_HasHeightForWidth(self *C.QSizeGrip, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QSizeGrip_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSizeGrip) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QSizeGrip_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_PaintEngine +func miqt_exec_callback_QSizeGrip_PaintEngine(self *C.QSizeGrip, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QSizeGrip_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSizeGrip_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent +func miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSizeGrip_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSizeGrip_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_WheelEvent +func miqt_exec_callback_QSizeGrip_WheelEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSizeGrip_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSizeGrip_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_KeyPressEvent +func miqt_exec_callback_QSizeGrip_KeyPressEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSizeGrip_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSizeGrip_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_KeyReleaseEvent +func miqt_exec_callback_QSizeGrip_KeyReleaseEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSizeGrip_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSizeGrip_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_FocusInEvent +func miqt_exec_callback_QSizeGrip_FocusInEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSizeGrip_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSizeGrip_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_FocusOutEvent +func miqt_exec_callback_QSizeGrip_FocusOutEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QSizeGrip_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QSizeGrip_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_EnterEvent +func miqt_exec_callback_QSizeGrip_EnterEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QSizeGrip_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSizeGrip_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_LeaveEvent +func miqt_exec_callback_QSizeGrip_LeaveEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QSizeGrip_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QSizeGrip_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ResizeEvent +func miqt_exec_callback_QSizeGrip_ResizeEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSizeGrip_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSizeGrip_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_CloseEvent +func miqt_exec_callback_QSizeGrip_CloseEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSizeGrip_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSizeGrip_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ContextMenuEvent +func miqt_exec_callback_QSizeGrip_ContextMenuEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QSizeGrip_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QSizeGrip_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_TabletEvent +func miqt_exec_callback_QSizeGrip_TabletEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QSizeGrip_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QSizeGrip_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ActionEvent +func miqt_exec_callback_QSizeGrip_ActionEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QSizeGrip_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QSizeGrip_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DragEnterEvent +func miqt_exec_callback_QSizeGrip_DragEnterEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QSizeGrip_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QSizeGrip_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DragMoveEvent +func miqt_exec_callback_QSizeGrip_DragMoveEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QSizeGrip_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QSizeGrip_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DragLeaveEvent +func miqt_exec_callback_QSizeGrip_DragLeaveEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QSizeGrip_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSizeGrip) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QSizeGrip_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_DropEvent +func miqt_exec_callback_QSizeGrip_DropEvent(self *C.QSizeGrip, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QSizeGrip_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QSizeGrip) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QSizeGrip_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_NativeEvent +func miqt_exec_callback_QSizeGrip_NativeEvent(self *C.QSizeGrip, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSizeGrip_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSizeGrip_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_ChangeEvent +func miqt_exec_callback_QSizeGrip_ChangeEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSizeGrip_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSizeGrip) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QSizeGrip_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_Metric +func miqt_exec_callback_QSizeGrip_Metric(self *C.QSizeGrip, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSizeGrip) callVirtualBase_InitPainter(painter *QPainter) { + + C.QSizeGrip_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSizeGrip) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSizeGrip_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_InitPainter +func miqt_exec_callback_QSizeGrip_InitPainter(self *C.QSizeGrip, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QSizeGrip_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QSizeGrip) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QSizeGrip_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_Redirected +func miqt_exec_callback_QSizeGrip_Redirected(self *C.QSizeGrip, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QSizeGrip_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSizeGrip) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QSizeGrip_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_SharedPainter +func miqt_exec_callback_QSizeGrip_SharedPainter(self *C.QSizeGrip, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QSizeGrip_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSizeGrip) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QSizeGrip_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_InputMethodEvent +func miqt_exec_callback_QSizeGrip_InputMethodEvent(self *C.QSizeGrip, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSizeGrip{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSizeGrip) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSizeGrip_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSizeGrip) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSizeGrip_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_InputMethodQuery +func miqt_exec_callback_QSizeGrip_InputMethodQuery(self *C.QSizeGrip, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSizeGrip) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSizeGrip_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSizeGrip) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSizeGrip_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSizeGrip_FocusNextPrevChild +func miqt_exec_callback_QSizeGrip_FocusNextPrevChild(self *C.QSizeGrip, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSizeGrip) Delete() { - C.QSizeGrip_Delete(this.h) + C.QSizeGrip_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsizegrip.h b/qt6/gen_qsizegrip.h index 9fc9e663..9f9321d0 100644 --- a/qt6/gen_qsizegrip.h +++ b/qt6/gen_qsizegrip.h @@ -15,26 +15,173 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QSizeGrip; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QSizeGrip QSizeGrip; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSizeGrip* QSizeGrip_new(QWidget* parent); +void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self); void* QSizeGrip_Metacast(QSizeGrip* self, const char* param1); struct miqt_string QSizeGrip_Tr(const char* s); QSize* QSizeGrip_SizeHint(const QSizeGrip* self); void QSizeGrip_SetVisible(QSizeGrip* self, bool visible); +void QSizeGrip_PaintEvent(QSizeGrip* self, QPaintEvent* param1); +void QSizeGrip_MousePressEvent(QSizeGrip* self, QMouseEvent* param1); +void QSizeGrip_MouseMoveEvent(QSizeGrip* self, QMouseEvent* param1); +void QSizeGrip_MouseReleaseEvent(QSizeGrip* self, QMouseEvent* mouseEvent); +void QSizeGrip_MoveEvent(QSizeGrip* self, QMoveEvent* moveEvent); +void QSizeGrip_ShowEvent(QSizeGrip* self, QShowEvent* showEvent); +void QSizeGrip_HideEvent(QSizeGrip* self, QHideEvent* hideEvent); +bool QSizeGrip_EventFilter(QSizeGrip* self, QObject* param1, QEvent* param2); +bool QSizeGrip_Event(QSizeGrip* self, QEvent* param1); struct miqt_string QSizeGrip_Tr2(const char* s, const char* c); struct miqt_string QSizeGrip_Tr3(const char* s, const char* c, int n); -void QSizeGrip_Delete(QSizeGrip* self); +void QSizeGrip_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSizeGrip_virtualbase_SizeHint(const void* self); +void QSizeGrip_override_virtual_SetVisible(void* self, intptr_t slot); +void QSizeGrip_virtualbase_SetVisible(void* self, bool visible); +void QSizeGrip_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QSizeGrip_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QSizeGrip_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QSizeGrip_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* mouseEvent); +void QSizeGrip_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MoveEvent(void* self, QMoveEvent* moveEvent); +void QSizeGrip_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ShowEvent(void* self, QShowEvent* showEvent); +void QSizeGrip_override_virtual_HideEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_HideEvent(void* self, QHideEvent* hideEvent); +void QSizeGrip_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QSizeGrip_override_virtual_Event(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_Event(void* self, QEvent* param1); +void QSizeGrip_override_virtual_DevType(void* self, intptr_t slot); +int QSizeGrip_virtualbase_DevType(const void* self); +void QSizeGrip_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSizeGrip_virtualbase_MinimumSizeHint(const void* self); +void QSizeGrip_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSizeGrip_virtualbase_HeightForWidth(const void* self, int param1); +void QSizeGrip_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_HasHeightForWidth(const void* self); +void QSizeGrip_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSizeGrip_virtualbase_PaintEngine(const void* self); +void QSizeGrip_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSizeGrip_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSizeGrip_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSizeGrip_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSizeGrip_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSizeGrip_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSizeGrip_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QSizeGrip_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSizeGrip_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSizeGrip_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSizeGrip_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSizeGrip_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSizeGrip_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSizeGrip_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSizeGrip_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSizeGrip_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSizeGrip_override_virtual_DropEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSizeGrip_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QSizeGrip_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSizeGrip_override_virtual_Metric(void* self, intptr_t slot); +int QSizeGrip_virtualbase_Metric(const void* self, int param1); +void QSizeGrip_override_virtual_InitPainter(void* self, intptr_t slot); +void QSizeGrip_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSizeGrip_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSizeGrip_virtualbase_Redirected(const void* self, QPoint* offset); +void QSizeGrip_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSizeGrip_virtualbase_SharedPainter(const void* self); +void QSizeGrip_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSizeGrip_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSizeGrip_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSizeGrip_virtualbase_InputMethodQuery(const void* self, int param1); +void QSizeGrip_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSizeGrip_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSizeGrip_Delete(QSizeGrip* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsizepolicy.cpp b/qt6/gen_qsizepolicy.cpp index b332a145..8ada3a9d 100644 --- a/qt6/gen_qsizepolicy.cpp +++ b/qt6/gen_qsizepolicy.cpp @@ -3,20 +3,24 @@ #include "gen_qsizepolicy.h" #include "_cgo_export.h" -QSizePolicy* QSizePolicy_new() { - return new QSizePolicy(); +void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(); + *outptr_QSizePolicy = ret; } -QSizePolicy* QSizePolicy_new2(int horizontal, int vertical) { - return new QSizePolicy(static_cast(horizontal), static_cast(vertical)); +void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical)); + *outptr_QSizePolicy = ret; } -QSizePolicy* QSizePolicy_new3(QSizePolicy* param1) { - return new QSizePolicy(*param1); +void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(*param1); + *outptr_QSizePolicy = ret; } -QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal) { - return new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); +void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy) { + QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); + *outptr_QSizePolicy = ret; } int QSizePolicy_HorizontalPolicy(const QSizePolicy* self) { @@ -107,7 +111,11 @@ QSizePolicy* QSizePolicy_Transposed(const QSizePolicy* self) { return new QSizePolicy(self->transposed()); } -void QSizePolicy_Delete(QSizePolicy* self) { - delete self; +void QSizePolicy_Delete(QSizePolicy* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsizepolicy.go b/qt6/gen_qsizepolicy.go index 252853e9..a4e68ccc 100644 --- a/qt6/gen_qsizepolicy.go +++ b/qt6/gen_qsizepolicy.go @@ -55,7 +55,8 @@ const ( ) type QSizePolicy struct { - h *C.QSizePolicy + h *C.QSizePolicy + isSubclass bool } func (this *QSizePolicy) cPointer() *C.QSizePolicy { @@ -72,6 +73,7 @@ func (this *QSizePolicy) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSizePolicy constructs the type using only CGO pointers. func newQSizePolicy(h *C.QSizePolicy) *QSizePolicy { if h == nil { return nil @@ -79,32 +81,53 @@ func newQSizePolicy(h *C.QSizePolicy) *QSizePolicy { return &QSizePolicy{h: h} } +// UnsafeNewQSizePolicy constructs the type using only unsafe pointers. func UnsafeNewQSizePolicy(h unsafe.Pointer) *QSizePolicy { - return newQSizePolicy((*C.QSizePolicy)(h)) + if h == nil { + return nil + } + + return &QSizePolicy{h: (*C.QSizePolicy)(h)} } // NewQSizePolicy constructs a new QSizePolicy object. func NewQSizePolicy() *QSizePolicy { - ret := C.QSizePolicy_new() - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new(&outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } // NewQSizePolicy2 constructs a new QSizePolicy object. func NewQSizePolicy2(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy) *QSizePolicy { - ret := C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical)) - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical), &outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } // NewQSizePolicy3 constructs a new QSizePolicy object. func NewQSizePolicy3(param1 *QSizePolicy) *QSizePolicy { - ret := C.QSizePolicy_new3(param1.cPointer()) - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new3(param1.cPointer(), &outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } // NewQSizePolicy4 constructs a new QSizePolicy object. func NewQSizePolicy4(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy, typeVal QSizePolicy__ControlType) *QSizePolicy { - ret := C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal)) - return newQSizePolicy(ret) + var outptr_QSizePolicy *C.QSizePolicy = nil + + C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal), &outptr_QSizePolicy) + ret := newQSizePolicy(outptr_QSizePolicy) + ret.isSubclass = true + return ret } func (this *QSizePolicy) HorizontalPolicy() QSizePolicy__Policy { @@ -196,7 +219,7 @@ func (this *QSizePolicy) Transposed() *QSizePolicy { // Delete this object from C++ memory. func (this *QSizePolicy) Delete() { - C.QSizePolicy_Delete(this.h) + C.QSizePolicy_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsizepolicy.h b/qt6/gen_qsizepolicy.h index 614cf604..283aa622 100644 --- a/qt6/gen_qsizepolicy.h +++ b/qt6/gen_qsizepolicy.h @@ -20,10 +20,10 @@ class QSizePolicy; typedef struct QSizePolicy QSizePolicy; #endif -QSizePolicy* QSizePolicy_new(); -QSizePolicy* QSizePolicy_new2(int horizontal, int vertical); -QSizePolicy* QSizePolicy_new3(QSizePolicy* param1); -QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal); +void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy); +void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy); +void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy); +void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy); int QSizePolicy_HorizontalPolicy(const QSizePolicy* self); int QSizePolicy_VerticalPolicy(const QSizePolicy* self); int QSizePolicy_ControlType(const QSizePolicy* self); @@ -45,7 +45,7 @@ bool QSizePolicy_RetainSizeWhenHidden(const QSizePolicy* self); void QSizePolicy_SetRetainSizeWhenHidden(QSizePolicy* self, bool retainSize); void QSizePolicy_Transpose(QSizePolicy* self); QSizePolicy* QSizePolicy_Transposed(const QSizePolicy* self); -void QSizePolicy_Delete(QSizePolicy* self); +void QSizePolicy_Delete(QSizePolicy* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qslider.cpp b/qt6/gen_qslider.cpp index ebe3f2f8..4c9b676e 100644 --- a/qt6/gen_qslider.cpp +++ b/qt6/gen_qslider.cpp @@ -1,29 +1,378 @@ +#include #include +#include #include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include #include #include #include "gen_qslider.h" #include "_cgo_export.h" -QSlider* QSlider_new(QWidget* parent) { - return new QSlider(parent); +class MiqtVirtualQSlider : public virtual QSlider { +public: + + MiqtVirtualQSlider(QWidget* parent): QSlider(parent) {}; + MiqtVirtualQSlider(): QSlider() {}; + MiqtVirtualQSlider(Qt::Orientation orientation): QSlider(orientation) {}; + MiqtVirtualQSlider(Qt::Orientation orientation, QWidget* parent): QSlider(orientation, parent) {}; + + virtual ~MiqtVirtualQSlider() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSlider::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSlider_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSlider::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSlider::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSlider_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSlider::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSlider::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSlider_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSlider::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* ev) override { + if (handle__PaintEvent == 0) { + QSlider::paintEvent(ev); + return; + } + + QPaintEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* ev) { + + QSlider::paintEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* ev) override { + if (handle__MousePressEvent == 0) { + QSlider::mousePressEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* ev) { + + QSlider::mousePressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* ev) override { + if (handle__MouseReleaseEvent == 0) { + QSlider::mouseReleaseEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* ev) { + + QSlider::mouseReleaseEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* ev) override { + if (handle__MouseMoveEvent == 0) { + QSlider::mouseMoveEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* ev) { + + QSlider::mouseMoveEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSlider* option) const override { + if (handle__InitStyleOption == 0) { + QSlider::initStyleOption(option); + return; + } + + QStyleOptionSlider* sigval1 = option; + + miqt_exec_callback_QSlider_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSlider* option) const { + + QSlider::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SliderChange = 0; + + // Subclass to allow providing a Go implementation + virtual void sliderChange(QAbstractSlider::SliderChange change) override { + if (handle__SliderChange == 0) { + QSlider::sliderChange(change); + return; + } + + QAbstractSlider::SliderChange change_ret = change; + int sigval1 = static_cast(change_ret); + + miqt_exec_callback_QSlider_SliderChange(this, handle__SliderChange, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SliderChange(int change) { + + QSlider::sliderChange(static_cast(change)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QSlider::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QSlider_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QSlider::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QSlider::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QSlider_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QSlider::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QSlider::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QSlider_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QSlider::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QSlider::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QSlider_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QSlider::changeEvent(e); + + } + +}; + +void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(parent); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSlider* QSlider_new2() { - return new QSlider(); +void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSlider* QSlider_new3(int orientation) { - return new QSlider(static_cast(orientation)); +void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation)); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSlider* QSlider_new4(int orientation, QWidget* parent) { - return new QSlider(static_cast(orientation), parent); +void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation), parent); + *outptr_QSlider = ret; + *outptr_QAbstractSlider = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSlider_MetaObject(const QSlider* self) { @@ -96,7 +445,115 @@ struct miqt_string QSlider_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSlider_Delete(QSlider* self) { - delete self; +void QSlider_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__SizeHint = slot; +} + +QSize* QSlider_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSlider*)(self) )->virtualbase_SizeHint(); +} + +void QSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSlider_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSlider*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSlider_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__Event = slot; +} + +bool QSlider_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSlider*)(self) )->virtualbase_Event(event); +} + +void QSlider_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__PaintEvent = slot; +} + +void QSlider_virtualbase_PaintEvent(void* self, QPaintEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_PaintEvent(ev); +} + +void QSlider_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MousePressEvent = slot; +} + +void QSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_MousePressEvent(ev); +} + +void QSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_MouseReleaseEvent(ev); +} + +void QSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_MouseMoveEvent(ev); +} + +void QSlider_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__InitStyleOption = slot; +} + +void QSlider_virtualbase_InitStyleOption(const void* self, QStyleOptionSlider* option) { + ( (const MiqtVirtualQSlider*)(self) )->virtualbase_InitStyleOption(option); +} + +void QSlider_override_virtual_SliderChange(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__SliderChange = slot; +} + +void QSlider_virtualbase_SliderChange(void* self, int change) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_SliderChange(change); +} + +void QSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__KeyPressEvent = slot; +} + +void QSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QSlider_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__TimerEvent = slot; +} + +void QSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_TimerEvent(param1); +} + +void QSlider_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__WheelEvent = slot; +} + +void QSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_WheelEvent(e); +} + +void QSlider_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSlider*)(self) )->handle__ChangeEvent = slot; +} + +void QSlider_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQSlider*)(self) )->virtualbase_ChangeEvent(e); +} + +void QSlider_Delete(QSlider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qslider.go b/qt6/gen_qslider.go index 40955f88..8c64543a 100644 --- a/qt6/gen_qslider.go +++ b/qt6/gen_qslider.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -25,7 +26,8 @@ const ( ) type QSlider struct { - h *C.QSlider + h *C.QSlider + isSubclass bool *QAbstractSlider } @@ -43,39 +45,79 @@ func (this *QSlider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSlider(h *C.QSlider) *QSlider { +// newQSlider constructs the type using only CGO pointers. +func newQSlider(h *C.QSlider, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSlider { if h == nil { return nil } - return &QSlider{h: h, QAbstractSlider: UnsafeNewQAbstractSlider(unsafe.Pointer(h))} + return &QSlider{h: h, + QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSlider(h unsafe.Pointer) *QSlider { - return newQSlider((*C.QSlider)(h)) +// UnsafeNewQSlider constructs the type using only unsafe pointers. +func UnsafeNewQSlider(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSlider { + if h == nil { + return nil + } + + return &QSlider{h: (*C.QSlider)(h), + QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSlider constructs a new QSlider object. func NewQSlider(parent *QWidget) *QSlider { - ret := C.QSlider_new(parent.cPointer()) - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new(parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSlider2 constructs a new QSlider object. func NewQSlider2() *QSlider { - ret := C.QSlider_new2() - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new2(&outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSlider3 constructs a new QSlider object. func NewQSlider3(orientation Orientation) *QSlider { - ret := C.QSlider_new3((C.int)(orientation)) - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new3((C.int)(orientation), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSlider4 constructs a new QSlider object. func NewQSlider4(orientation Orientation, parent *QWidget) *QSlider { - ret := C.QSlider_new4((C.int)(orientation), parent.cPointer()) - return newQSlider(ret) + var outptr_QSlider *C.QSlider = nil + var outptr_QAbstractSlider *C.QAbstractSlider = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSlider_new4((C.int)(orientation), parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSlider) MetaObject() *QMetaObject { @@ -153,9 +195,314 @@ func QSlider_Tr3(s string, c string, n int) string { return _ret } +func (this *QSlider) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSlider_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSlider) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSlider_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_SizeHint +func miqt_exec_callback_QSlider_SizeHint(self *C.QSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSlider{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSlider) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSlider_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSlider) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSlider_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MinimumSizeHint +func miqt_exec_callback_QSlider_MinimumSizeHint(self *C.QSlider, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSlider{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSlider) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSlider_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSlider) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSlider_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_Event +func miqt_exec_callback_QSlider_Event(self *C.QSlider, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSlider{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSlider) callVirtualBase_PaintEvent(ev *QPaintEvent) { + + C.QSlider_virtualbase_PaintEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnPaintEvent(slot func(super func(ev *QPaintEvent), ev *QPaintEvent)) { + C.QSlider_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_PaintEvent +func miqt_exec_callback_QSlider_PaintEvent(self *C.QSlider, cb C.intptr_t, ev *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QPaintEvent), ev *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(ev), nil) + + gofunc((&QSlider{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_MousePressEvent(ev *QMouseEvent) { + + C.QSlider_virtualbase_MousePressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnMousePressEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QSlider_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MousePressEvent +func miqt_exec_callback_QSlider_MousePressEvent(self *C.QSlider, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_MouseReleaseEvent(ev *QMouseEvent) { + + C.QSlider_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnMouseReleaseEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QSlider_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MouseReleaseEvent +func miqt_exec_callback_QSlider_MouseReleaseEvent(self *C.QSlider, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_MouseMoveEvent(ev *QMouseEvent) { + + C.QSlider_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnMouseMoveEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QSlider_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_MouseMoveEvent +func miqt_exec_callback_QSlider_MouseMoveEvent(self *C.QSlider, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_InitStyleOption(option *QStyleOptionSlider) { + + C.QSlider_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QSlider) OnInitStyleOption(slot func(super func(option *QStyleOptionSlider), option *QStyleOptionSlider)) { + C.QSlider_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_InitStyleOption +func miqt_exec_callback_QSlider_InitStyleOption(self *C.QSlider, cb C.intptr_t, option *C.QStyleOptionSlider) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSlider), option *QStyleOptionSlider)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSlider(unsafe.Pointer(option), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QSlider) callVirtualBase_SliderChange(change QAbstractSlider__SliderChange) { + + C.QSlider_virtualbase_SliderChange(unsafe.Pointer(this.h), (C.int)(change)) + +} +func (this *QSlider) OnSliderChange(slot func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) { + C.QSlider_override_virtual_SliderChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_SliderChange +func miqt_exec_callback_QSlider_SliderChange(self *C.QSlider, cb C.intptr_t, change C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change QAbstractSlider__SliderChange), change QAbstractSlider__SliderChange)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSlider__SliderChange)(change) + + gofunc((&QSlider{h: self}).callVirtualBase_SliderChange, slotval1) + +} + +func (this *QSlider) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QSlider_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QSlider) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QSlider_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_KeyPressEvent +func miqt_exec_callback_QSlider_KeyPressEvent(self *C.QSlider, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QSlider_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSlider) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QSlider_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_TimerEvent +func miqt_exec_callback_QSlider_TimerEvent(self *C.QSlider, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSlider{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QSlider_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QSlider) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QSlider_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_WheelEvent +func miqt_exec_callback_QSlider_WheelEvent(self *C.QSlider, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QSlider{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSlider) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QSlider_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QSlider) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QSlider_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSlider_ChangeEvent +func miqt_exec_callback_QSlider_ChangeEvent(self *C.QSlider, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QSlider{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QSlider) Delete() { - C.QSlider_Delete(this.h) + C.QSlider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qslider.h b/qt6/gen_qslider.h index 61aa6e73..b616a61c 100644 --- a/qt6/gen_qslider.h +++ b/qt6/gen_qslider.h @@ -15,23 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSlider; class QEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QSize; class QSlider; +class QStyleOptionSlider; +class QTimerEvent; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSlider QAbstractSlider; typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QSize QSize; typedef struct QSlider QSlider; +typedef struct QStyleOptionSlider QStyleOptionSlider; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSlider* QSlider_new(QWidget* parent); -QSlider* QSlider_new2(); -QSlider* QSlider_new3(int orientation); -QSlider* QSlider_new4(int orientation, QWidget* parent); +void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSlider_MetaObject(const QSlider* self); void* QSlider_Metacast(QSlider* self, const char* param1); struct miqt_string QSlider_Tr(const char* s); @@ -42,9 +60,40 @@ int QSlider_TickPosition(const QSlider* self); void QSlider_SetTickInterval(QSlider* self, int ti); int QSlider_TickInterval(const QSlider* self); bool QSlider_Event(QSlider* self, QEvent* event); +void QSlider_PaintEvent(QSlider* self, QPaintEvent* ev); +void QSlider_MousePressEvent(QSlider* self, QMouseEvent* ev); +void QSlider_MouseReleaseEvent(QSlider* self, QMouseEvent* ev); +void QSlider_MouseMoveEvent(QSlider* self, QMouseEvent* ev); +void QSlider_InitStyleOption(const QSlider* self, QStyleOptionSlider* option); struct miqt_string QSlider_Tr2(const char* s, const char* c); struct miqt_string QSlider_Tr3(const char* s, const char* c, int n); -void QSlider_Delete(QSlider* self); +void QSlider_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSlider_virtualbase_SizeHint(const void* self); +void QSlider_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSlider_virtualbase_MinimumSizeHint(const void* self); +void QSlider_override_virtual_Event(void* self, intptr_t slot); +bool QSlider_virtualbase_Event(void* self, QEvent* event); +void QSlider_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSlider_virtualbase_PaintEvent(void* self, QPaintEvent* ev); +void QSlider_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSlider_virtualbase_MousePressEvent(void* self, QMouseEvent* ev); +void QSlider_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSlider_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev); +void QSlider_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSlider_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev); +void QSlider_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QSlider_virtualbase_InitStyleOption(const void* self, QStyleOptionSlider* option); +void QSlider_override_virtual_SliderChange(void* self, intptr_t slot); +void QSlider_virtualbase_SliderChange(void* self, int change); +void QSlider_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSlider_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QSlider_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSlider_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QSlider_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSlider_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QSlider_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSlider_virtualbase_ChangeEvent(void* self, QEvent* e); +void QSlider_Delete(QSlider* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsocketnotifier.cpp b/qt6/gen_qsocketnotifier.cpp index 21a492a1..864a684c 100644 --- a/qt6/gen_qsocketnotifier.cpp +++ b/qt6/gen_qsocketnotifier.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -5,24 +8,216 @@ #include #include #include +#include #include #include "gen_qsocketnotifier.h" #include "_cgo_export.h" -QSocketNotifier* QSocketNotifier_new(int param1) { - return new QSocketNotifier(static_cast(param1)); +class MiqtVirtualQSocketNotifier : public virtual QSocketNotifier { +public: + + MiqtVirtualQSocketNotifier(QSocketNotifier::Type param1): QSocketNotifier(param1) {}; + MiqtVirtualQSocketNotifier(qintptr socket, QSocketNotifier::Type param2): QSocketNotifier(socket, param2) {}; + MiqtVirtualQSocketNotifier(QSocketNotifier::Type param1, QObject* parent): QSocketNotifier(param1, parent) {}; + MiqtVirtualQSocketNotifier(qintptr socket, QSocketNotifier::Type param2, QObject* parent): QSocketNotifier(socket, param2, parent) {}; + + virtual ~MiqtVirtualQSocketNotifier() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSocketNotifier::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSocketNotifier_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSocketNotifier::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSocketNotifier::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSocketNotifier_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSocketNotifier::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSocketNotifier::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSocketNotifier_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSocketNotifier::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSocketNotifier::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSocketNotifier_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSocketNotifier::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSocketNotifier::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSocketNotifier_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSocketNotifier::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSocketNotifier::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSocketNotifier_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSocketNotifier::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSocketNotifier::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSocketNotifier_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSocketNotifier::disconnectNotify(*signal); + + } + +}; + +void QSocketNotifier_new(int param1, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { + MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier(static_cast(param1)); + *outptr_QSocketNotifier = ret; + *outptr_QObject = static_cast(ret); } -QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2) { - return new QSocketNotifier((qintptr)(socket), static_cast(param2)); +void QSocketNotifier_new2(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { + MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2)); + *outptr_QSocketNotifier = ret; + *outptr_QObject = static_cast(ret); } -QSocketNotifier* QSocketNotifier_new3(int param1, QObject* parent) { - return new QSocketNotifier(static_cast(param1), parent); +void QSocketNotifier_new3(int param1, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { + MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier(static_cast(param1), parent); + *outptr_QSocketNotifier = ret; + *outptr_QObject = static_cast(ret); } -QSocketNotifier* QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent) { - return new QSocketNotifier((qintptr)(socket), static_cast(param2), parent); +void QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { + MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2), parent); + *outptr_QSocketNotifier = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self) { @@ -92,31 +287,97 @@ struct miqt_string QSocketNotifier_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSocketNotifier_Delete(QSocketNotifier* self) { - delete self; +void QSocketNotifier_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__Event = slot; +} + +bool QSocketNotifier_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_Event(param1); +} + +void QSocketNotifier_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__EventFilter = slot; +} + +bool QSocketNotifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSocketNotifier_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__TimerEvent = slot; +} + +void QSocketNotifier_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_TimerEvent(event); +} + +void QSocketNotifier_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__ChildEvent = slot; +} + +void QSocketNotifier_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_ChildEvent(event); +} + +void QSocketNotifier_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__CustomEvent = slot; +} + +void QSocketNotifier_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_CustomEvent(event); +} + +void QSocketNotifier_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__ConnectNotify = slot; +} + +void QSocketNotifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSocketNotifier_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSocketNotifier*)(self) )->handle__DisconnectNotify = slot; +} + +void QSocketNotifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSocketNotifier*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSocketDescriptor* QSocketDescriptor_new() { - return new QSocketDescriptor(); +void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor) { + QSocketDescriptor* ret = new QSocketDescriptor(); + *outptr_QSocketDescriptor = ret; } -QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1) { - return new QSocketDescriptor(*param1); +void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor) { + QSocketDescriptor* ret = new QSocketDescriptor(*param1); + *outptr_QSocketDescriptor = ret; } -QSocketDescriptor* QSocketDescriptor_new3(int descriptor) { -#ifdef Q_OS_LINUX - return new QSocketDescriptor(static_cast(descriptor)); -#else - return nullptr; +void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) { +#ifndef Q_OS_LINUX + return; #endif + QSocketDescriptor* ret = new QSocketDescriptor(static_cast(descriptor)); + *outptr_QSocketDescriptor = ret; } bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) { return self->isValid(); } -void QSocketDescriptor_Delete(QSocketDescriptor* self) { - delete self; +void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsocketnotifier.go b/qt6/gen_qsocketnotifier.go index bf9214bb..c4e69997 100644 --- a/qt6/gen_qsocketnotifier.go +++ b/qt6/gen_qsocketnotifier.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -22,7 +23,8 @@ const ( ) type QSocketNotifier struct { - h *C.QSocketNotifier + h *C.QSocketNotifier + isSubclass bool *QObject } @@ -40,39 +42,67 @@ func (this *QSocketNotifier) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSocketNotifier(h *C.QSocketNotifier) *QSocketNotifier { +// newQSocketNotifier constructs the type using only CGO pointers. +func newQSocketNotifier(h *C.QSocketNotifier, h_QObject *C.QObject) *QSocketNotifier { if h == nil { return nil } - return &QSocketNotifier{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSocketNotifier{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSocketNotifier(h unsafe.Pointer) *QSocketNotifier { - return newQSocketNotifier((*C.QSocketNotifier)(h)) +// UnsafeNewQSocketNotifier constructs the type using only unsafe pointers. +func UnsafeNewQSocketNotifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSocketNotifier { + if h == nil { + return nil + } + + return &QSocketNotifier{h: (*C.QSocketNotifier)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSocketNotifier constructs a new QSocketNotifier object. func NewQSocketNotifier(param1 QSocketNotifier__Type) *QSocketNotifier { - ret := C.QSocketNotifier_new((C.int)(param1)) - return newQSocketNotifier(ret) + var outptr_QSocketNotifier *C.QSocketNotifier = nil + var outptr_QObject *C.QObject = nil + + C.QSocketNotifier_new((C.int)(param1), &outptr_QSocketNotifier, &outptr_QObject) + ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSocketNotifier2 constructs a new QSocketNotifier object. func NewQSocketNotifier2(socket uintptr, param2 QSocketNotifier__Type) *QSocketNotifier { - ret := C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2)) - return newQSocketNotifier(ret) + var outptr_QSocketNotifier *C.QSocketNotifier = nil + var outptr_QObject *C.QObject = nil + + C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), &outptr_QSocketNotifier, &outptr_QObject) + ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSocketNotifier3 constructs a new QSocketNotifier object. func NewQSocketNotifier3(param1 QSocketNotifier__Type, parent *QObject) *QSocketNotifier { - ret := C.QSocketNotifier_new3((C.int)(param1), parent.cPointer()) - return newQSocketNotifier(ret) + var outptr_QSocketNotifier *C.QSocketNotifier = nil + var outptr_QObject *C.QObject = nil + + C.QSocketNotifier_new3((C.int)(param1), parent.cPointer(), &outptr_QSocketNotifier, &outptr_QObject) + ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSocketNotifier4 constructs a new QSocketNotifier object. func NewQSocketNotifier4(socket uintptr, param2 QSocketNotifier__Type, parent *QObject) *QSocketNotifier { - ret := C.QSocketNotifier_new4((C.intptr_t)(socket), (C.int)(param2), parent.cPointer()) - return newQSocketNotifier(ret) + var outptr_QSocketNotifier *C.QSocketNotifier = nil + var outptr_QObject *C.QObject = nil + + C.QSocketNotifier_new4((C.intptr_t)(socket), (C.int)(param2), parent.cPointer(), &outptr_QSocketNotifier, &outptr_QObject) + ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSocketNotifier) MetaObject() *QMetaObject { @@ -140,9 +170,175 @@ func QSocketNotifier_Tr3(s string, c string, n int) string { return _ret } +func (this *QSocketNotifier) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSocketNotifier_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSocketNotifier) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSocketNotifier_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_Event +func miqt_exec_callback_QSocketNotifier_Event(self *C.QSocketNotifier, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSocketNotifier{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSocketNotifier) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSocketNotifier_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSocketNotifier) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSocketNotifier_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_EventFilter +func miqt_exec_callback_QSocketNotifier_EventFilter(self *C.QSocketNotifier, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSocketNotifier{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSocketNotifier) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSocketNotifier_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSocketNotifier) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSocketNotifier_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_TimerEvent +func miqt_exec_callback_QSocketNotifier_TimerEvent(self *C.QSocketNotifier, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSocketNotifier_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSocketNotifier) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSocketNotifier_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_ChildEvent +func miqt_exec_callback_QSocketNotifier_ChildEvent(self *C.QSocketNotifier, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSocketNotifier_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSocketNotifier) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSocketNotifier_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_CustomEvent +func miqt_exec_callback_QSocketNotifier_CustomEvent(self *C.QSocketNotifier, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSocketNotifier_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSocketNotifier) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSocketNotifier_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_ConnectNotify +func miqt_exec_callback_QSocketNotifier_ConnectNotify(self *C.QSocketNotifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSocketNotifier) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSocketNotifier_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSocketNotifier) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSocketNotifier_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSocketNotifier_DisconnectNotify +func miqt_exec_callback_QSocketNotifier_DisconnectNotify(self *C.QSocketNotifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSocketNotifier{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSocketNotifier) Delete() { - C.QSocketNotifier_Delete(this.h) + C.QSocketNotifier_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -155,7 +351,8 @@ func (this *QSocketNotifier) GoGC() { } type QSocketDescriptor struct { - h *C.QSocketDescriptor + h *C.QSocketDescriptor + isSubclass bool } func (this *QSocketDescriptor) cPointer() *C.QSocketDescriptor { @@ -172,6 +369,7 @@ func (this *QSocketDescriptor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSocketDescriptor constructs the type using only CGO pointers. func newQSocketDescriptor(h *C.QSocketDescriptor) *QSocketDescriptor { if h == nil { return nil @@ -179,30 +377,47 @@ func newQSocketDescriptor(h *C.QSocketDescriptor) *QSocketDescriptor { return &QSocketDescriptor{h: h} } +// UnsafeNewQSocketDescriptor constructs the type using only unsafe pointers. func UnsafeNewQSocketDescriptor(h unsafe.Pointer) *QSocketDescriptor { - return newQSocketDescriptor((*C.QSocketDescriptor)(h)) + if h == nil { + return nil + } + + return &QSocketDescriptor{h: (*C.QSocketDescriptor)(h)} } // NewQSocketDescriptor constructs a new QSocketDescriptor object. func NewQSocketDescriptor() *QSocketDescriptor { - ret := C.QSocketDescriptor_new() - return newQSocketDescriptor(ret) + var outptr_QSocketDescriptor *C.QSocketDescriptor = nil + + C.QSocketDescriptor_new(&outptr_QSocketDescriptor) + ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret.isSubclass = true + return ret } // NewQSocketDescriptor2 constructs a new QSocketDescriptor object. func NewQSocketDescriptor2(param1 *QSocketDescriptor) *QSocketDescriptor { - ret := C.QSocketDescriptor_new2(param1.cPointer()) - return newQSocketDescriptor(ret) + var outptr_QSocketDescriptor *C.QSocketDescriptor = nil + + C.QSocketDescriptor_new2(param1.cPointer(), &outptr_QSocketDescriptor) + ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret.isSubclass = true + return ret } // NewQSocketDescriptor3 constructs a new QSocketDescriptor object. func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor { - if runtime.GOOS == "linux" { - ret := C.QSocketDescriptor_new3((C.int)(descriptor)) - return newQSocketDescriptor(ret) - } else { + + if runtime.GOOS != "linux" { panic("Unsupported OS") } + var outptr_QSocketDescriptor *C.QSocketDescriptor = nil + + C.QSocketDescriptor_new3((C.int)(descriptor), &outptr_QSocketDescriptor) + ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret.isSubclass = true + return ret } func (this *QSocketDescriptor) IsValid() bool { @@ -211,7 +426,7 @@ func (this *QSocketDescriptor) IsValid() bool { // Delete this object from C++ memory. func (this *QSocketDescriptor) Delete() { - C.QSocketDescriptor_Delete(this.h) + C.QSocketDescriptor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsocketnotifier.h b/qt6/gen_qsocketnotifier.h index 3e67374f..c22008b5 100644 --- a/qt6/gen_qsocketnotifier.h +++ b/qt6/gen_qsocketnotifier.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSocketDescriptor; class QSocketNotifier; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketDescriptor QSocketDescriptor; typedef struct QSocketNotifier QSocketNotifier; +typedef struct QTimerEvent QTimerEvent; #endif -QSocketNotifier* QSocketNotifier_new(int param1); -QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2); -QSocketNotifier* QSocketNotifier_new3(int param1, QObject* parent); -QSocketNotifier* QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent); +void QSocketNotifier_new(int param1, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); +void QSocketNotifier_new2(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); +void QSocketNotifier_new3(int param1, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); +void QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self); void* QSocketNotifier_Metacast(QSocketNotifier* self, const char* param1); struct miqt_string QSocketNotifier_Tr(const char* s); @@ -39,15 +47,30 @@ int QSocketNotifier_Type(const QSocketNotifier* self); bool QSocketNotifier_IsValid(const QSocketNotifier* self); bool QSocketNotifier_IsEnabled(const QSocketNotifier* self); void QSocketNotifier_SetEnabled(QSocketNotifier* self, bool enabled); +bool QSocketNotifier_Event(QSocketNotifier* self, QEvent* param1); struct miqt_string QSocketNotifier_Tr2(const char* s, const char* c); struct miqt_string QSocketNotifier_Tr3(const char* s, const char* c, int n); -void QSocketNotifier_Delete(QSocketNotifier* self); +void QSocketNotifier_override_virtual_Event(void* self, intptr_t slot); +bool QSocketNotifier_virtualbase_Event(void* self, QEvent* param1); +void QSocketNotifier_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSocketNotifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSocketNotifier_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSocketNotifier_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSocketNotifier_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_CustomEvent(void* self, QEvent* event); +void QSocketNotifier_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSocketNotifier_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSocketNotifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass); -QSocketDescriptor* QSocketDescriptor_new(); -QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1); -QSocketDescriptor* QSocketDescriptor_new3(int descriptor); +void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor); +void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor); +void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor); bool QSocketDescriptor_IsValid(const QSocketDescriptor* self); -void QSocketDescriptor_Delete(QSocketDescriptor* self); +void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsortfilterproxymodel.cpp b/qt6/gen_qsortfilterproxymodel.cpp index 2ce15070..0c0a2233 100644 --- a/qt6/gen_qsortfilterproxymodel.cpp +++ b/qt6/gen_qsortfilterproxymodel.cpp @@ -1,5 +1,8 @@ #include +#include +#include #include +#include #include #include #include @@ -15,12 +18,1155 @@ #include "gen_qsortfilterproxymodel.h" #include "_cgo_export.h" -QSortFilterProxyModel* QSortFilterProxyModel_new() { - return new QSortFilterProxyModel(); +class MiqtVirtualQSortFilterProxyModel : public virtual QSortFilterProxyModel { +public: + + MiqtVirtualQSortFilterProxyModel(): QSortFilterProxyModel() {}; + MiqtVirtualQSortFilterProxyModel(QObject* parent): QSortFilterProxyModel(parent) {}; + + virtual ~MiqtVirtualQSortFilterProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSourceModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSourceModel(QAbstractItemModel* sourceModel) override { + if (handle__SetSourceModel == 0) { + QSortFilterProxyModel::setSourceModel(sourceModel); + return; + } + + QAbstractItemModel* sigval1 = sourceModel; + + miqt_exec_callback_QSortFilterProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* sourceModel) { + + QSortFilterProxyModel::setSourceModel(sourceModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const override { + if (handle__MapToSource == 0) { + return QSortFilterProxyModel::mapToSource(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapToSource(QModelIndex* proxyIndex) const { + + return new QModelIndex(QSortFilterProxyModel::mapToSource(*proxyIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override { + if (handle__MapFromSource == 0) { + return QSortFilterProxyModel::mapFromSource(sourceIndex); + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapFromSource(QModelIndex* sourceIndex) const { + + return new QModelIndex(QSortFilterProxyModel::mapFromSource(*sourceIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FilterAcceptsRow = 0; + + // Subclass to allow providing a Go implementation + virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override { + if (handle__FilterAcceptsRow == 0) { + return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); + } + + int sigval1 = source_row; + const QModelIndex& source_parent_ret = source_parent; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&source_parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsRow(const_cast(this), handle__FilterAcceptsRow, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FilterAcceptsRow(int source_row, QModelIndex* source_parent) const { + + return QSortFilterProxyModel::filterAcceptsRow(static_cast(source_row), *source_parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FilterAcceptsColumn = 0; + + // Subclass to allow providing a Go implementation + virtual bool filterAcceptsColumn(int source_column, const QModelIndex& source_parent) const override { + if (handle__FilterAcceptsColumn == 0) { + return QSortFilterProxyModel::filterAcceptsColumn(source_column, source_parent); + } + + int sigval1 = source_column; + const QModelIndex& source_parent_ret = source_parent; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&source_parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsColumn(const_cast(this), handle__FilterAcceptsColumn, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FilterAcceptsColumn(int source_column, QModelIndex* source_parent) const { + + return QSortFilterProxyModel::filterAcceptsColumn(static_cast(source_column), *source_parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LessThan = 0; + + // Subclass to allow providing a Go implementation + virtual bool lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const override { + if (handle__LessThan == 0) { + return QSortFilterProxyModel::lessThan(source_left, source_right); + } + + const QModelIndex& source_left_ret = source_left; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&source_left_ret); + const QModelIndex& source_right_ret = source_right; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&source_right_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_LessThan(const_cast(this), handle__LessThan, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_LessThan(QModelIndex* source_left, QModelIndex* source_right) const { + + return QSortFilterProxyModel::lessThan(*source_left, *source_right); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QSortFilterProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QSortFilterProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QSortFilterProxyModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { + + return new QModelIndex(QSortFilterProxyModel::parent(*child)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QSortFilterProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QSortFilterProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QSortFilterProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QSortFilterProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QSortFilterProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QSortFilterProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QSortFilterProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QSortFilterProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QSortFilterProxyModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QSortFilterProxyModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QSortFilterProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QSortFilterProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QSortFilterProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QSortFilterProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QSortFilterProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QSortFilterProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QSortFilterProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QSortFilterProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QSortFilterProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QSortFilterProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QSortFilterProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QSortFilterProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QSortFilterProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QSortFilterProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QSortFilterProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QSortFilterProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QSortFilterProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QSortFilterProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QSortFilterProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QSortFilterProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QSortFilterProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QSortFilterProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QSortFilterProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QSortFilterProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QSortFilterProxyModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QSortFilterProxyModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QSortFilterProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QSortFilterProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QSortFilterProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QSortFilterProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QSortFilterProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QSortFilterProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QSortFilterProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QSortFilterProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QSortFilterProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QSortFilterProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QSortFilterProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QSortFilterProxyModel::revert(); + return; + } + + + miqt_exec_callback_QSortFilterProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QSortFilterProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QSortFilterProxyModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QSortFilterProxyModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QSortFilterProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QSortFilterProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QSortFilterProxyModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QSortFilterProxyModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QSortFilterProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QSortFilterProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QSortFilterProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QSortFilterProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QSortFilterProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QSortFilterProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QSortFilterProxyModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QSortFilterProxyModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + +}; + +void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(); + *outptr_QSortFilterProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent) { - return new QSortFilterProxyModel(parent); +void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(parent); + *outptr_QSortFilterProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self) { @@ -164,8 +1310,8 @@ void QSortFilterProxyModel_Invalidate(QSortFilterProxyModel* self) { self->invalidate(); } -QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } QModelIndex* QSortFilterProxyModel_Parent(const QSortFilterProxyModel* self, QModelIndex* child) { @@ -176,32 +1322,32 @@ QModelIndex* QSortFilterProxyModel_Sibling(const QSortFilterProxyModel* self, in return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self) { - return self->rowCount(); +int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self) { - return self->columnCount(); +int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self) { - return self->hasChildren(); +bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); } -QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } -QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } QMimeData* QSortFilterProxyModel_MimeData(const QSortFilterProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes) { @@ -218,20 +1364,20 @@ bool QSortFilterProxyModel_DropMimeData(QSortFilterProxyModel* self, QMimeData* return self->dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); } -bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } -bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } void QSortFilterProxyModel_FetchMore(QSortFilterProxyModel* self, QModelIndex* parent) { @@ -251,8 +1397,8 @@ QModelIndex* QSortFilterProxyModel_Buddy(const QSortFilterProxyModel* self, QMod return new QModelIndex(self->buddy(*index)); } -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value); +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); // Convert QList<> from C++ memory to manually-managed C memory QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -268,8 +1414,8 @@ QSize* QSortFilterProxyModel_Span(const QSortFilterProxyModel* self, QModelIndex return new QSize(self->span(*index)); } -void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column) { - self->sort(static_cast(column)); +void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_MimeTypes(const QSortFilterProxyModel* self) { @@ -302,7 +1448,7 @@ void QSortFilterProxyModel_DynamicSortFilterChanged(QSortFilterProxyModel* self, } void QSortFilterProxyModel_connect_DynamicSortFilterChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::dynamicSortFilterChanged), self, [=](bool dynamicSortFilter) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::dynamicSortFilterChanged), self, [=](bool dynamicSortFilter) { bool sigval1 = dynamicSortFilter; miqt_exec_callback_QSortFilterProxyModel_DynamicSortFilterChanged(slot, sigval1); }); @@ -313,7 +1459,7 @@ void QSortFilterProxyModel_FilterCaseSensitivityChanged(QSortFilterProxyModel* s } void QSortFilterProxyModel_connect_FilterCaseSensitivityChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterCaseSensitivityChanged), self, [=](Qt::CaseSensitivity filterCaseSensitivity) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterCaseSensitivityChanged), self, [=](Qt::CaseSensitivity filterCaseSensitivity) { Qt::CaseSensitivity filterCaseSensitivity_ret = filterCaseSensitivity; int sigval1 = static_cast(filterCaseSensitivity_ret); miqt_exec_callback_QSortFilterProxyModel_FilterCaseSensitivityChanged(slot, sigval1); @@ -325,7 +1471,7 @@ void QSortFilterProxyModel_SortCaseSensitivityChanged(QSortFilterProxyModel* sel } void QSortFilterProxyModel_connect_SortCaseSensitivityChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortCaseSensitivityChanged), self, [=](Qt::CaseSensitivity sortCaseSensitivity) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortCaseSensitivityChanged), self, [=](Qt::CaseSensitivity sortCaseSensitivity) { Qt::CaseSensitivity sortCaseSensitivity_ret = sortCaseSensitivity; int sigval1 = static_cast(sortCaseSensitivity_ret); miqt_exec_callback_QSortFilterProxyModel_SortCaseSensitivityChanged(slot, sigval1); @@ -337,7 +1483,7 @@ void QSortFilterProxyModel_SortLocaleAwareChanged(QSortFilterProxyModel* self, b } void QSortFilterProxyModel_connect_SortLocaleAwareChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortLocaleAwareChanged), self, [=](bool sortLocaleAware) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortLocaleAwareChanged), self, [=](bool sortLocaleAware) { bool sigval1 = sortLocaleAware; miqt_exec_callback_QSortFilterProxyModel_SortLocaleAwareChanged(slot, sigval1); }); @@ -348,7 +1494,7 @@ void QSortFilterProxyModel_SortRoleChanged(QSortFilterProxyModel* self, int sort } void QSortFilterProxyModel_connect_SortRoleChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortRoleChanged), self, [=](int sortRole) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::sortRoleChanged), self, [=](int sortRole) { int sigval1 = sortRole; miqt_exec_callback_QSortFilterProxyModel_SortRoleChanged(slot, sigval1); }); @@ -359,7 +1505,7 @@ void QSortFilterProxyModel_FilterRoleChanged(QSortFilterProxyModel* self, int fi } void QSortFilterProxyModel_connect_FilterRoleChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterRoleChanged), self, [=](int filterRole) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::filterRoleChanged), self, [=](int filterRole) { int sigval1 = filterRole; miqt_exec_callback_QSortFilterProxyModel_FilterRoleChanged(slot, sigval1); }); @@ -370,7 +1516,7 @@ void QSortFilterProxyModel_RecursiveFilteringEnabledChanged(QSortFilterProxyMode } void QSortFilterProxyModel_connect_RecursiveFilteringEnabledChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::recursiveFilteringEnabledChanged), self, [=](bool recursiveFilteringEnabled) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::recursiveFilteringEnabledChanged), self, [=](bool recursiveFilteringEnabled) { bool sigval1 = recursiveFilteringEnabled; miqt_exec_callback_QSortFilterProxyModel_RecursiveFilteringEnabledChanged(slot, sigval1); }); @@ -381,7 +1527,7 @@ void QSortFilterProxyModel_AutoAcceptChildRowsChanged(QSortFilterProxyModel* sel } void QSortFilterProxyModel_connect_AutoAcceptChildRowsChanged(QSortFilterProxyModel* self, intptr_t slot) { - QSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::autoAcceptChildRowsChanged), self, [=](bool autoAcceptChildRows) { + MiqtVirtualQSortFilterProxyModel::connect(self, static_cast(&QSortFilterProxyModel::autoAcceptChildRowsChanged), self, [=](bool autoAcceptChildRows) { bool sigval1 = autoAcceptChildRows; miqt_exec_callback_QSortFilterProxyModel_AutoAcceptChildRowsChanged(slot, sigval1); }); @@ -409,85 +1555,323 @@ struct miqt_string QSortFilterProxyModel_Tr3(const char* s, const char* c, int n return _ms; } -QModelIndex* QSortFilterProxyModel_Index3(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +void QSortFilterProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetSourceModel = slot; } -int QSortFilterProxyModel_RowCount1(const QSortFilterProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QSortFilterProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetSourceModel(sourceModel); } -int QSortFilterProxyModel_ColumnCount1(const QSortFilterProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QSortFilterProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapToSource = slot; } -bool QSortFilterProxyModel_HasChildren1(const QSortFilterProxyModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); +QModelIndex* QSortFilterProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapToSource(proxyIndex); } -QVariant* QSortFilterProxyModel_Data2(const QSortFilterProxyModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +void QSortFilterProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapFromSource = slot; } -bool QSortFilterProxyModel_SetData3(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +QModelIndex* QSortFilterProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); } -QVariant* QSortFilterProxyModel_HeaderData3(const QSortFilterProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QSortFilterProxyModel_override_virtual_FilterAcceptsRow(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FilterAcceptsRow = slot; } -bool QSortFilterProxyModel_SetHeaderData4(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsRow(const void* self, int source_row, QModelIndex* source_parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_FilterAcceptsRow(source_row, source_parent); } -bool QSortFilterProxyModel_InsertRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +void QSortFilterProxyModel_override_virtual_FilterAcceptsColumn(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FilterAcceptsColumn = slot; } -bool QSortFilterProxyModel_InsertColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsColumn(const void* self, int source_column, QModelIndex* source_parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_FilterAcceptsColumn(source_column, source_parent); } -bool QSortFilterProxyModel_RemoveRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +void QSortFilterProxyModel_override_virtual_LessThan(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__LessThan = slot; } -bool QSortFilterProxyModel_RemoveColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); +bool QSortFilterProxyModel_virtualbase_LessThan(const void* self, QModelIndex* source_left, QModelIndex* source_right) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_LessThan(source_left, source_right); } -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match4(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +void QSortFilterProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Index = slot; } -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match5(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { - QModelIndexList _ret = self->match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QModelIndex(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; +QModelIndex* QSortFilterProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Index(row, column, parent); } -void QSortFilterProxyModel_Sort2(QSortFilterProxyModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +void QSortFilterProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QSortFilterProxyModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Parent(child); +} + +void QSortFilterProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Sibling = slot; } -void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self) { - delete self; +QModelIndex* QSortFilterProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QSortFilterProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RowCount = slot; +} + +int QSortFilterProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RowCount(parent); +} + +void QSortFilterProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__ColumnCount = slot; +} + +int QSortFilterProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QSortFilterProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QSortFilterProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QSortFilterProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QSortFilterProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Data(index, role); +} + +void QSortFilterProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetData = slot; +} + +bool QSortFilterProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QSortFilterProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QSortFilterProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QSortFilterProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QSortFilterProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QSortFilterProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QSortFilterProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QSortFilterProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QSortFilterProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QSortFilterProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QSortFilterProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QSortFilterProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QSortFilterProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QSortFilterProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QSortFilterProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QSortFilterProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QSortFilterProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QSortFilterProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QSortFilterProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QSortFilterProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QSortFilterProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QSortFilterProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Flags = slot; +} + +int QSortFilterProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QSortFilterProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QSortFilterProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QSortFilterProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QSortFilterProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QSortFilterProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Span(index); +} + +void QSortFilterProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Sort = slot; +} + +void QSortFilterProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QSortFilterProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QSortFilterProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QSortFilterProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QSortFilterProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Submit = slot; +} + +bool QSortFilterProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Submit(); +} + +void QSortFilterProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__Revert = slot; +} + +void QSortFilterProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_Revert(); +} + +void QSortFilterProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QSortFilterProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QSortFilterProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QSortFilterProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QSortFilterProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__ClearItemData = slot; +} + +bool QSortFilterProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QSortFilterProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QSortFilterProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QSortFilterProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QSortFilterProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QSortFilterProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QSortFilterProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_RoleNames(); +} + +void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsortfilterproxymodel.go b/qt6/gen_qsortfilterproxymodel.go index 7f6e04b7..c8f33d77 100644 --- a/qt6/gen_qsortfilterproxymodel.go +++ b/qt6/gen_qsortfilterproxymodel.go @@ -15,7 +15,8 @@ import ( ) type QSortFilterProxyModel struct { - h *C.QSortFilterProxyModel + h *C.QSortFilterProxyModel + isSubclass bool *QAbstractProxyModel } @@ -33,27 +34,49 @@ func (this *QSortFilterProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSortFilterProxyModel(h *C.QSortFilterProxyModel) *QSortFilterProxyModel { +// newQSortFilterProxyModel constructs the type using only CGO pointers. +func newQSortFilterProxyModel(h *C.QSortFilterProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QSortFilterProxyModel { if h == nil { return nil } - return &QSortFilterProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))} + return &QSortFilterProxyModel{h: h, + QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer) *QSortFilterProxyModel { - return newQSortFilterProxyModel((*C.QSortFilterProxyModel)(h)) +// UnsafeNewQSortFilterProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QSortFilterProxyModel { + if h == nil { + return nil + } + + return &QSortFilterProxyModel{h: (*C.QSortFilterProxyModel)(h), + QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } // NewQSortFilterProxyModel constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel() *QSortFilterProxyModel { - ret := C.QSortFilterProxyModel_new() - return newQSortFilterProxyModel(ret) + var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QSortFilterProxyModel_new(&outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSortFilterProxyModel2 constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel2(parent *QObject) *QSortFilterProxyModel { - ret := C.QSortFilterProxyModel_new2(parent.cPointer()) - return newQSortFilterProxyModel(ret) + var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QSortFilterProxyModel_new2(parent.cPointer(), &outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSortFilterProxyModel) MetaObject() *QMetaObject { @@ -212,8 +235,8 @@ func (this *QSortFilterProxyModel) Invalidate() { C.QSortFilterProxyModel_Invalidate(this.h) } -func (this *QSortFilterProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QSortFilterProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QSortFilterProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QSortFilterProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -233,38 +256,38 @@ func (this *QSortFilterProxyModel) Sibling(row int, column int, idx *QModelIndex return _goptr } -func (this *QSortFilterProxyModel) RowCount() int { - return (int)(C.QSortFilterProxyModel_RowCount(this.h)) +func (this *QSortFilterProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QSortFilterProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) ColumnCount() int { - return (int)(C.QSortFilterProxyModel_ColumnCount(this.h)) +func (this *QSortFilterProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QSortFilterProxyModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) HasChildren() bool { - return (bool)(C.QSortFilterProxyModel_HasChildren(this.h)) +func (this *QSortFilterProxyModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_HasChildren(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) Data(index *QModelIndex) *QVariant { - _ret := C.QSortFilterProxyModel_Data(this.h, index.cPointer()) +func (this *QSortFilterProxyModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QSortFilterProxyModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QSortFilterProxyModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QSortFilterProxyModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QSortFilterProxyModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QSortFilterProxyModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QSortFilterProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QSortFilterProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QSortFilterProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QSortFilterProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QSortFilterProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QSortFilterProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QSortFilterProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QSortFilterProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { @@ -274,27 +297,27 @@ func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma)), nil) } func (this *QSortFilterProxyModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { return (bool)(C.QSortFilterProxyModel_DropMimeData(this.h, data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) } -func (this *QSortFilterProxyModel) InsertRows(row int, count int) bool { - return (bool)(C.QSortFilterProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QSortFilterProxyModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) InsertColumns(column int, count int) bool { - return (bool)(C.QSortFilterProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QSortFilterProxyModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) RemoveRows(row int, count int) bool { - return (bool)(C.QSortFilterProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QSortFilterProxyModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QSortFilterProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QSortFilterProxyModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QSortFilterProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QSortFilterProxyModel) FetchMore(parent *QModelIndex) { @@ -316,8 +339,8 @@ func (this *QSortFilterProxyModel) Buddy(index *QModelIndex) *QModelIndex { return _goptr } -func (this *QSortFilterProxyModel) Match(start *QModelIndex, role int, value *QVariant) []QModelIndex { - var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer()) +func (this *QSortFilterProxyModel) Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) _ret := make([]QModelIndex, int(_ma.len)) _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -336,8 +359,8 @@ func (this *QSortFilterProxyModel) Span(index *QModelIndex) *QSize { return _goptr } -func (this *QSortFilterProxyModel) Sort(column int) { - C.QSortFilterProxyModel_Sort(this.h, (C.int)(column)) +func (this *QSortFilterProxyModel) Sort(column int, order SortOrder) { + C.QSortFilterProxyModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QSortFilterProxyModel) MimeTypes() []string { @@ -539,96 +562,1186 @@ func QSortFilterProxyModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QSortFilterProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QSortFilterProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QSortFilterProxyModel) callVirtualBase_SetSourceModel(sourceModel *QAbstractItemModel) { + + C.QSortFilterProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), sourceModel.cPointer()) + +} +func (this *QSortFilterProxyModel) OnSetSourceModel(slot func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) { + C.QSortFilterProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetSourceModel +func miqt_exec_callback_QSortFilterProxyModel_SetSourceModel(self *C.QSortFilterProxyModel, cb C.intptr_t, sourceModel *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(sourceModel), nil) + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MapToSource(proxyIndex *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_MapToSource(unsafe.Pointer(this.h), proxyIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnMapToSource(slot func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapToSource +func miqt_exec_callback_QSortFilterProxyModel_MapToSource(self *C.QSortFilterProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MapFromSource(sourceIndex *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_MapFromSource(unsafe.Pointer(this.h), sourceIndex.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QSortFilterProxyModel) OnMapFromSource(slot func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapFromSource +func miqt_exec_callback_QSortFilterProxyModel_MapFromSource(self *C.QSortFilterProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceIndex)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapFromSource, slotval1) + + return virtualReturn.cPointer() -func (this *QSortFilterProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QSortFilterProxyModel_RowCount1(this.h, parent.cPointer())) } -func (this *QSortFilterProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QSortFilterProxyModel_ColumnCount1(this.h, parent.cPointer())) +func (this *QSortFilterProxyModel) callVirtualBase_FilterAcceptsRow(source_row int, source_parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_FilterAcceptsRow(unsafe.Pointer(this.h), (C.int)(source_row), source_parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnFilterAcceptsRow(slot func(super func(source_row int, source_parent *QModelIndex) bool, source_row int, source_parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_FilterAcceptsRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSortFilterProxyModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_HasChildren1(this.h, parent.cPointer())) +//export miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsRow +func miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsRow(self *C.QSortFilterProxyModel, cb C.intptr_t, source_row C.int, source_parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source_row int, source_parent *QModelIndex) bool, source_row int, source_parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(source_row) + + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(source_parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_FilterAcceptsRow, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } -func (this *QSortFilterProxyModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QSortFilterProxyModel_Data2(this.h, index.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) +func (this *QSortFilterProxyModel) callVirtualBase_FilterAcceptsColumn(source_column int, source_parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_FilterAcceptsColumn(unsafe.Pointer(this.h), (C.int)(source_column), source_parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnFilterAcceptsColumn(slot func(super func(source_column int, source_parent *QModelIndex) bool, source_column int, source_parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_FilterAcceptsColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsColumn +func miqt_exec_callback_QSortFilterProxyModel_FilterAcceptsColumn(self *C.QSortFilterProxyModel, cb C.intptr_t, source_column C.int, source_parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source_column int, source_parent *QModelIndex) bool, source_column int, source_parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(source_column) + + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(source_parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_FilterAcceptsColumn, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_LessThan(source_left *QModelIndex, source_right *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_LessThan(unsafe.Pointer(this.h), source_left.cPointer(), source_right.cPointer())) + +} +func (this *QSortFilterProxyModel) OnLessThan(slot func(super func(source_left *QModelIndex, source_right *QModelIndex) bool, source_left *QModelIndex, source_right *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_LessThan(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_LessThan +func miqt_exec_callback_QSortFilterProxyModel_LessThan(self *C.QSortFilterProxyModel, cb C.intptr_t, source_left *C.QModelIndex, source_right *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source_left *QModelIndex, source_right *QModelIndex) bool, source_left *QModelIndex, source_right *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(source_left)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(source_right)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_LessThan, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Index +func miqt_exec_callback_QSortFilterProxyModel_Index(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + } +func (this *QSortFilterProxyModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Parent +func miqt_exec_callback_QSortFilterProxyModel_Parent(self *C.QSortFilterProxyModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() -func (this *QSortFilterProxyModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QSortFilterProxyModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } -func (this *QSortFilterProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QSortFilterProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) +func (this *QSortFilterProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QSortFilterProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Sibling +func miqt_exec_callback_QSortFilterProxyModel_Sibling(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QSortFilterProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QSortFilterProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) +func (this *QSortFilterProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QSortFilterProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + } +func (this *QSortFilterProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QSortFilterProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RowCount +func miqt_exec_callback_QSortFilterProxyModel_RowCount(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) -func (this *QSortFilterProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QSortFilterProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QSortFilterProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QSortFilterProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QSortFilterProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSortFilterProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QSortFilterProxyModel_ColumnCount +func miqt_exec_callback_QSortFilterProxyModel_ColumnCount(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QSortFilterProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QSortFilterProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QSortFilterProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QSortFilterProxyModel) Match4(start *QModelIndex, role int, value *QVariant, hits int) []QModelIndex { - var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match4(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr +//export miqt_exec_callback_QSortFilterProxyModel_HasChildren +func miqt_exec_callback_QSortFilterProxyModel_HasChildren(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return _ret + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QSortFilterProxyModel) Match5(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { - var _ma C.struct_miqt_array = C.QSortFilterProxyModel_Match5(this.h, start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) - _ret := make([]QModelIndex, int(_ma.len)) - _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQModelIndex(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr +func (this *QSortFilterProxyModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QSortFilterProxyModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QSortFilterProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Data +func miqt_exec_callback_QSortFilterProxyModel_Data(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return _ret + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QSortFilterProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QSortFilterProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetData +func miqt_exec_callback_QSortFilterProxyModel_SetData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QSortFilterProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QSortFilterProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_HeaderData +func miqt_exec_callback_QSortFilterProxyModel_HeaderData(self *C.QSortFilterProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + } -func (this *QSortFilterProxyModel) Sort2(column int, order SortOrder) { - C.QSortFilterProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +func (this *QSortFilterProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QSortFilterProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QSortFilterProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetHeaderData +func miqt_exec_callback_QSortFilterProxyModel_SetHeaderData(self *C.QSortFilterProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QSortFilterProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QSortFilterProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QSortFilterProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MimeData +func miqt_exec_callback_QSortFilterProxyModel_MimeData(self *C.QSortFilterProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_DropMimeData +func miqt_exec_callback_QSortFilterProxyModel_DropMimeData(self *C.QSortFilterProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_InsertRows +func miqt_exec_callback_QSortFilterProxyModel_InsertRows(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_InsertColumns +func miqt_exec_callback_QSortFilterProxyModel_InsertColumns(self *C.QSortFilterProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RemoveRows +func miqt_exec_callback_QSortFilterProxyModel_RemoveRows(self *C.QSortFilterProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RemoveColumns +func miqt_exec_callback_QSortFilterProxyModel_RemoveColumns(self *C.QSortFilterProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QSortFilterProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QSortFilterProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QSortFilterProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_FetchMore +func miqt_exec_callback_QSortFilterProxyModel_FetchMore(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_CanFetchMore +func miqt_exec_callback_QSortFilterProxyModel_CanFetchMore(self *C.QSortFilterProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QSortFilterProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QSortFilterProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QSortFilterProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Flags +func miqt_exec_callback_QSortFilterProxyModel_Flags(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QSortFilterProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Buddy +func miqt_exec_callback_QSortFilterProxyModel_Buddy(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QSortFilterProxyModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QSortFilterProxyModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QSortFilterProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Match +func miqt_exec_callback_QSortFilterProxyModel_Match(self *C.QSortFilterProxyModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QSortFilterProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QSortFilterProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Span +func miqt_exec_callback_QSortFilterProxyModel_Span(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QSortFilterProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QSortFilterProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QSortFilterProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Sort +func miqt_exec_callback_QSortFilterProxyModel_Sort(self *C.QSortFilterProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QSortFilterProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QSortFilterProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QSortFilterProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MimeTypes +func miqt_exec_callback_QSortFilterProxyModel_MimeTypes(self *C.QSortFilterProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QSortFilterProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QSortFilterProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QSortFilterProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SupportedDropActions +func miqt_exec_callback_QSortFilterProxyModel_SupportedDropActions(self *C.QSortFilterProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QSortFilterProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QSortFilterProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Submit +func miqt_exec_callback_QSortFilterProxyModel_Submit(self *C.QSortFilterProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_Revert() { + + C.QSortFilterProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QSortFilterProxyModel) OnRevert(slot func(super func())) { + C.QSortFilterProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_Revert +func miqt_exec_callback_QSortFilterProxyModel_Revert(self *C.QSortFilterProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QSortFilterProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QSortFilterProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QSortFilterProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_ItemData +func miqt_exec_callback_QSortFilterProxyModel_ItemData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QSortFilterProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QSortFilterProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QSortFilterProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SetItemData +func miqt_exec_callback_QSortFilterProxyModel_SetItemData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QSortFilterProxyModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_ClearItemData +func miqt_exec_callback_QSortFilterProxyModel_ClearItemData(self *C.QSortFilterProxyModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QSortFilterProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QSortFilterProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QSortFilterProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData +func miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData(self *C.QSortFilterProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QSortFilterProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QSortFilterProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QSortFilterProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_SupportedDragActions +func miqt_exec_callback_QSortFilterProxyModel_SupportedDragActions(self *C.QSortFilterProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QSortFilterProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QSortFilterProxyModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QSortFilterProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QSortFilterProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_RoleNames +func miqt_exec_callback_QSortFilterProxyModel_RoleNames(self *C.QSortFilterProxyModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + } // Delete this object from C++ memory. func (this *QSortFilterProxyModel) Delete() { - C.QSortFilterProxyModel_Delete(this.h) + C.QSortFilterProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsortfilterproxymodel.h b/qt6/gen_qsortfilterproxymodel.h index 46490fa8..93760a8b 100644 --- a/qt6/gen_qsortfilterproxymodel.h +++ b/qt6/gen_qsortfilterproxymodel.h @@ -16,6 +16,8 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractProxyModel; +class QByteArray; class QMetaObject; class QMimeData; class QModelIndex; @@ -26,6 +28,8 @@ class QSortFilterProxyModel; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractProxyModel QAbstractProxyModel; +typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -36,8 +40,8 @@ typedef struct QSortFilterProxyModel QSortFilterProxyModel; typedef struct QVariant QVariant; #endif -QSortFilterProxyModel* QSortFilterProxyModel_new(); -QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent); +void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self); void* QSortFilterProxyModel_Metacast(QSortFilterProxyModel* self, const char* param1); struct miqt_string QSortFilterProxyModel_Tr(const char* s); @@ -70,29 +74,32 @@ void QSortFilterProxyModel_SetFilterRegularExpressionWithRegularExpression(QSort void QSortFilterProxyModel_SetFilterWildcard(QSortFilterProxyModel* self, struct miqt_string pattern); void QSortFilterProxyModel_SetFilterFixedString(QSortFilterProxyModel* self, struct miqt_string pattern); void QSortFilterProxyModel_Invalidate(QSortFilterProxyModel* self); -QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column); +bool QSortFilterProxyModel_FilterAcceptsRow(const QSortFilterProxyModel* self, int source_row, QModelIndex* source_parent); +bool QSortFilterProxyModel_FilterAcceptsColumn(const QSortFilterProxyModel* self, int source_column, QModelIndex* source_parent); +bool QSortFilterProxyModel_LessThan(const QSortFilterProxyModel* self, QModelIndex* source_left, QModelIndex* source_right); +QModelIndex* QSortFilterProxyModel_Index(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent); QModelIndex* QSortFilterProxyModel_Parent(const QSortFilterProxyModel* self, QModelIndex* child); QModelIndex* QSortFilterProxyModel_Sibling(const QSortFilterProxyModel* self, int row, int column, QModelIndex* idx); -int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self); -int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self); -bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self); -QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index); -bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value); -QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation); -bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value); +int QSortFilterProxyModel_RowCount(const QSortFilterProxyModel* self, QModelIndex* parent); +int QSortFilterProxyModel_ColumnCount(const QSortFilterProxyModel* self, QModelIndex* parent); +bool QSortFilterProxyModel_HasChildren(const QSortFilterProxyModel* self, QModelIndex* parent); +QVariant* QSortFilterProxyModel_Data(const QSortFilterProxyModel* self, QModelIndex* index, int role); +bool QSortFilterProxyModel_SetData(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role); +QVariant* QSortFilterProxyModel_HeaderData(const QSortFilterProxyModel* self, int section, int orientation, int role); +bool QSortFilterProxyModel_SetHeaderData(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role); QMimeData* QSortFilterProxyModel_MimeData(const QSortFilterProxyModel* self, struct miqt_array /* of QModelIndex* */ indexes); bool QSortFilterProxyModel_DropMimeData(QSortFilterProxyModel* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); -bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count); -bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count); -bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count); -bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count); +bool QSortFilterProxyModel_InsertRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); +bool QSortFilterProxyModel_InsertColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); +bool QSortFilterProxyModel_RemoveRows(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); +bool QSortFilterProxyModel_RemoveColumns(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); void QSortFilterProxyModel_FetchMore(QSortFilterProxyModel* self, QModelIndex* parent); bool QSortFilterProxyModel_CanFetchMore(const QSortFilterProxyModel* self, QModelIndex* parent); int QSortFilterProxyModel_Flags(const QSortFilterProxyModel* self, QModelIndex* index); QModelIndex* QSortFilterProxyModel_Buddy(const QSortFilterProxyModel* self, QModelIndex* index); -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value); +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); QSize* QSortFilterProxyModel_Span(const QSortFilterProxyModel* self, QModelIndex* index); -void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column); +void QSortFilterProxyModel_Sort(QSortFilterProxyModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_MimeTypes(const QSortFilterProxyModel* self); int QSortFilterProxyModel_SupportedDropActions(const QSortFilterProxyModel* self); void QSortFilterProxyModel_DynamicSortFilterChanged(QSortFilterProxyModel* self, bool dynamicSortFilter); @@ -113,22 +120,85 @@ void QSortFilterProxyModel_AutoAcceptChildRowsChanged(QSortFilterProxyModel* sel void QSortFilterProxyModel_connect_AutoAcceptChildRowsChanged(QSortFilterProxyModel* self, intptr_t slot); struct miqt_string QSortFilterProxyModel_Tr2(const char* s, const char* c); struct miqt_string QSortFilterProxyModel_Tr3(const char* s, const char* c, int n); -QModelIndex* QSortFilterProxyModel_Index3(const QSortFilterProxyModel* self, int row, int column, QModelIndex* parent); -int QSortFilterProxyModel_RowCount1(const QSortFilterProxyModel* self, QModelIndex* parent); -int QSortFilterProxyModel_ColumnCount1(const QSortFilterProxyModel* self, QModelIndex* parent); -bool QSortFilterProxyModel_HasChildren1(const QSortFilterProxyModel* self, QModelIndex* parent); -QVariant* QSortFilterProxyModel_Data2(const QSortFilterProxyModel* self, QModelIndex* index, int role); -bool QSortFilterProxyModel_SetData3(QSortFilterProxyModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QSortFilterProxyModel_HeaderData3(const QSortFilterProxyModel* self, int section, int orientation, int role); -bool QSortFilterProxyModel_SetHeaderData4(QSortFilterProxyModel* self, int section, int orientation, QVariant* value, int role); -bool QSortFilterProxyModel_InsertRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); -bool QSortFilterProxyModel_InsertColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); -bool QSortFilterProxyModel_RemoveRows3(QSortFilterProxyModel* self, int row, int count, QModelIndex* parent); -bool QSortFilterProxyModel_RemoveColumns3(QSortFilterProxyModel* self, int column, int count, QModelIndex* parent); -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match4(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits); -struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_Match5(const QSortFilterProxyModel* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); -void QSortFilterProxyModel_Sort2(QSortFilterProxyModel* self, int column, int order); -void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self); +void QSortFilterProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel); +void QSortFilterProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QSortFilterProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QSortFilterProxyModel_override_virtual_FilterAcceptsRow(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsRow(const void* self, int source_row, QModelIndex* source_parent); +void QSortFilterProxyModel_override_virtual_FilterAcceptsColumn(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_FilterAcceptsColumn(const void* self, int source_column, QModelIndex* source_parent); +void QSortFilterProxyModel_override_virtual_LessThan(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_LessThan(const void* self, QModelIndex* source_left, QModelIndex* source_right); +void QSortFilterProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QSortFilterProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QSortFilterProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QSortFilterProxyModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QSortFilterProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QSortFilterProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QSortFilterProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QSortFilterProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QSortFilterProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QSortFilterProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QSortFilterProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QSortFilterProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QSortFilterProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QSortFilterProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QSortFilterProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_Sort(void* self, int column, int order); +void QSortFilterProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QSortFilterProxyModel_virtualbase_MimeTypes(const void* self); +void QSortFilterProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_SupportedDropActions(const void* self); +void QSortFilterProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_Submit(void* self); +void QSortFilterProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QSortFilterProxyModel_virtualbase_Revert(void* self); +void QSortFilterProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QSortFilterProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QSortFilterProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QSortFilterProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QSortFilterProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QSortFilterProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QSortFilterProxyModel_virtualbase_SupportedDragActions(const void* self); +void QSortFilterProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QSortFilterProxyModel_virtualbase_RoleNames(const void* self); +void QSortFilterProxyModel_Delete(QSortFilterProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qspinbox.cpp b/qt6/gen_qspinbox.cpp index 344da5f0..8a1e7862 100644 --- a/qt6/gen_qspinbox.cpp +++ b/qt6/gen_qspinbox.cpp @@ -1,199 +1,1877 @@ +#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qspinbox.h" #include "_cgo_export.h" -QSpinBox* QSpinBox_new(QWidget* parent) { - return new QSpinBox(parent); +class MiqtVirtualQSpinBox : public virtual QSpinBox { +public: + + MiqtVirtualQSpinBox(QWidget* parent): QSpinBox(parent) {}; + MiqtVirtualQSpinBox(): QSpinBox() {}; + + virtual ~MiqtVirtualQSpinBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSpinBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSpinBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSpinBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QSpinBox::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QSpinBox_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QSpinBox::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValueFromText = 0; + + // Subclass to allow providing a Go implementation + virtual int valueFromText(const QString& text) const override { + if (handle__ValueFromText == 0) { + return QSpinBox::valueFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + int callback_return_value = miqt_exec_callback_QSpinBox_ValueFromText(const_cast(this), handle__ValueFromText, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ValueFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return QSpinBox::valueFromText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromValue = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromValue(int val) const override { + if (handle__TextFromValue == 0) { + return QSpinBox::textFromValue(val); + } + + int sigval1 = val; + + struct miqt_string callback_return_value = miqt_exec_callback_QSpinBox_TextFromValue(const_cast(this), handle__TextFromValue, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromValue(int val) const { + + QString _ret = QSpinBox::textFromValue(static_cast(val)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& str) const override { + if (handle__Fixup == 0) { + QSpinBox::fixup(str); + return; + } + + QString str_ret = str; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray str_b = str_ret.toUtf8(); + struct miqt_string str_ms; + str_ms.len = str_b.length(); + str_ms.data = static_cast(malloc(str_ms.len)); + memcpy(str_ms.data, str_b.data(), str_ms.len); + struct miqt_string sigval1 = str_ms; + + miqt_exec_callback_QSpinBox_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string str) const { + QString str_QString = QString::fromUtf8(str.data, str.len); + + QSpinBox::fixup(str_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSpinBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpinBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSpinBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSpinBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSpinBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSpinBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSpinBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSpinBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSpinBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QSpinBox::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QSpinBox_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QSpinBox::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QSpinBox::clear(); + return; + } + + + miqt_exec_callback_QSpinBox_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QSpinBox::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QSpinBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSpinBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSpinBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSpinBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSpinBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSpinBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSpinBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSpinBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSpinBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSpinBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSpinBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSpinBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSpinBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSpinBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QSpinBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QSpinBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSpinBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSpinBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QSpinBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSpinBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QSpinBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QSpinBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QSpinBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QSpinBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QSpinBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QSpinBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSpinBox::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSpinBox::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QSpinBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QSpinBox::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QSpinBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSpinBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSpinBox::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSpinBox* option) const override { + if (handle__InitStyleOption == 0) { + QSpinBox::initStyleOption(option); + return; + } + + QStyleOptionSpinBox* sigval1 = option; + + miqt_exec_callback_QSpinBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSpinBox* option) const { + + QSpinBox::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QSpinBox::stepEnabled(); + } + + + int callback_return_value = miqt_exec_callback_QSpinBox_StepEnabled(const_cast(this), handle__StepEnabled); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QSpinBox::stepEnabled(); + return static_cast(_ret); + + } + +}; + +void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(parent); + *outptr_QSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(); + *outptr_QSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QSpinBox_MetaObject(const QSpinBox* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSpinBox_Metacast(QSpinBox* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSpinBox_Tr(const char* s) { + QString _ret = QSpinBox::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QSpinBox_Value(const QSpinBox* self) { + return self->value(); +} + +struct miqt_string QSpinBox_Prefix(const QSpinBox* self) { + QString _ret = self->prefix(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSpinBox_SetPrefix(QSpinBox* self, struct miqt_string prefix) { + QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); + self->setPrefix(prefix_QString); +} + +struct miqt_string QSpinBox_Suffix(const QSpinBox* self) { + QString _ret = self->suffix(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSpinBox_SetSuffix(QSpinBox* self, struct miqt_string suffix) { + QString suffix_QString = QString::fromUtf8(suffix.data, suffix.len); + self->setSuffix(suffix_QString); +} + +struct miqt_string QSpinBox_CleanText(const QSpinBox* self) { + QString _ret = self->cleanText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QSpinBox_SingleStep(const QSpinBox* self) { + return self->singleStep(); +} + +void QSpinBox_SetSingleStep(QSpinBox* self, int val) { + self->setSingleStep(static_cast(val)); +} + +int QSpinBox_Minimum(const QSpinBox* self) { + return self->minimum(); +} + +void QSpinBox_SetMinimum(QSpinBox* self, int min) { + self->setMinimum(static_cast(min)); +} + +int QSpinBox_Maximum(const QSpinBox* self) { + return self->maximum(); +} + +void QSpinBox_SetMaximum(QSpinBox* self, int max) { + self->setMaximum(static_cast(max)); +} + +void QSpinBox_SetRange(QSpinBox* self, int min, int max) { + self->setRange(static_cast(min), static_cast(max)); +} + +int QSpinBox_StepType(const QSpinBox* self) { + QAbstractSpinBox::StepType _ret = self->stepType(); + return static_cast(_ret); +} + +void QSpinBox_SetStepType(QSpinBox* self, int stepType) { + self->setStepType(static_cast(stepType)); +} + +int QSpinBox_DisplayIntegerBase(const QSpinBox* self) { + return self->displayIntegerBase(); +} + +void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base) { + self->setDisplayIntegerBase(static_cast(base)); +} + +void QSpinBox_SetValue(QSpinBox* self, int val) { + self->setValue(static_cast(val)); +} + +void QSpinBox_ValueChanged(QSpinBox* self, int param1) { + self->valueChanged(static_cast(param1)); +} + +void QSpinBox_connect_ValueChanged(QSpinBox* self, intptr_t slot) { + MiqtVirtualQSpinBox::connect(self, static_cast(&QSpinBox::valueChanged), self, [=](int param1) { + int sigval1 = param1; + miqt_exec_callback_QSpinBox_ValueChanged(slot, sigval1); + }); +} + +void QSpinBox_TextChanged(QSpinBox* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->textChanged(param1_QString); +} + +void QSpinBox_connect_TextChanged(QSpinBox* self, intptr_t slot) { + MiqtVirtualQSpinBox::connect(self, static_cast(&QSpinBox::textChanged), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QSpinBox_TextChanged(slot, sigval1); + }); +} + +struct miqt_string QSpinBox_Tr2(const char* s, const char* c) { + QString _ret = QSpinBox::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSpinBox_Tr3(const char* s, const char* c, int n) { + QString _ret = QSpinBox::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSpinBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Event = slot; +} + +bool QSpinBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_Event(event); +} + +void QSpinBox_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Validate = slot; +} + +int QSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_Validate(input, pos); +} + +void QSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ValueFromText = slot; +} + +int QSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_ValueFromText(text); +} + +void QSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__TextFromValue = slot; +} + +struct miqt_string QSpinBox_virtualbase_TextFromValue(const void* self, int val) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_TextFromValue(val); +} + +void QSpinBox_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Fixup = slot; +} + +void QSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str) { + ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_Fixup(str); +} + +void QSpinBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QSpinBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_SizeHint(); +} + +void QSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSpinBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSpinBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSpinBox_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__StepBy = slot; +} + +void QSpinBox_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_StepBy(steps); +} + +void QSpinBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__Clear = slot; +} + +void QSpinBox_virtualbase_Clear(void* self) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_Clear(); +} + +void QSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ResizeEvent = slot; +} + +void QSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__WheelEvent = slot; +} + +void QSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__FocusInEvent = slot; +} + +void QSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ChangeEvent = slot; +} + +void QSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__CloseEvent = slot; +} + +void QSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QSpinBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__HideEvent = slot; +} + +void QSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_HideEvent(event); +} + +void QSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MousePressEvent = slot; +} + +void QSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__TimerEvent = slot; +} + +void QSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_TimerEvent(event); +} + +void QSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__PaintEvent = slot; +} + +void QSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__ShowEvent = slot; +} + +void QSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSpinBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QSpinBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__InitStyleOption = slot; +} + +void QSpinBox_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option) { + ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QSpinBox*)(self) )->handle__StepEnabled = slot; +} + +int QSpinBox_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQSpinBox*)(self) )->virtualbase_StepEnabled(); +} + +void QSpinBox_Delete(QSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QSpinBox* QSpinBox_new2() { - return new QSpinBox(); -} +class MiqtVirtualQDoubleSpinBox : public virtual QDoubleSpinBox { +public: + + MiqtVirtualQDoubleSpinBox(QWidget* parent): QDoubleSpinBox(parent) {}; + MiqtVirtualQDoubleSpinBox(): QDoubleSpinBox() {}; + + virtual ~MiqtVirtualQDoubleSpinBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QDoubleSpinBox::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QDoubleSpinBox_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QDoubleSpinBox::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValueFromText = 0; + + // Subclass to allow providing a Go implementation + virtual double valueFromText(const QString& text) const override { + if (handle__ValueFromText == 0) { + return QDoubleSpinBox::valueFromText(text); + } + + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + struct miqt_string text_ms; + text_ms.len = text_b.length(); + text_ms.data = static_cast(malloc(text_ms.len)); + memcpy(text_ms.data, text_b.data(), text_ms.len); + struct miqt_string sigval1 = text_ms; + + double callback_return_value = miqt_exec_callback_QDoubleSpinBox_ValueFromText(const_cast(this), handle__ValueFromText, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + double virtualbase_ValueFromText(struct miqt_string text) const { + QString text_QString = QString::fromUtf8(text.data, text.len); + + return QDoubleSpinBox::valueFromText(text_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TextFromValue = 0; + + // Subclass to allow providing a Go implementation + virtual QString textFromValue(double val) const override { + if (handle__TextFromValue == 0) { + return QDoubleSpinBox::textFromValue(val); + } + + double sigval1 = val; + + struct miqt_string callback_return_value = miqt_exec_callback_QDoubleSpinBox_TextFromValue(const_cast(this), handle__TextFromValue, sigval1); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_TextFromValue(double val) const { + + QString _ret = QDoubleSpinBox::textFromValue(static_cast(val)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& str) const override { + if (handle__Fixup == 0) { + QDoubleSpinBox::fixup(str); + return; + } + + QString str_ret = str; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray str_b = str_ret.toUtf8(); + struct miqt_string str_ms; + str_ms.len = str_b.length(); + str_ms.data = static_cast(malloc(str_ms.len)); + memcpy(str_ms.data, str_b.data(), str_ms.len); + struct miqt_string sigval1 = str_ms; + + miqt_exec_callback_QDoubleSpinBox_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string str) const { + QString str_QString = QString::fromUtf8(str.data, str.len); + + QDoubleSpinBox::fixup(str_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QDoubleSpinBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDoubleSpinBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QDoubleSpinBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QDoubleSpinBox::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QDoubleSpinBox_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QDoubleSpinBox::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDoubleSpinBox::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDoubleSpinBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDoubleSpinBox::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QDoubleSpinBox::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QDoubleSpinBox_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QDoubleSpinBox::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StepBy = 0; + + // Subclass to allow providing a Go implementation + virtual void stepBy(int steps) override { + if (handle__StepBy == 0) { + QDoubleSpinBox::stepBy(steps); + return; + } + + int sigval1 = steps; + + miqt_exec_callback_QDoubleSpinBox_StepBy(this, handle__StepBy, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StepBy(int steps) { + + QDoubleSpinBox::stepBy(static_cast(steps)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QDoubleSpinBox::clear(); + return; + } + + + miqt_exec_callback_QDoubleSpinBox_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QDoubleSpinBox::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QDoubleSpinBox::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QDoubleSpinBox::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QDoubleSpinBox::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QDoubleSpinBox::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QDoubleSpinBox::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QDoubleSpinBox::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QDoubleSpinBox::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QDoubleSpinBox::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QDoubleSpinBox::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QDoubleSpinBox::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QDoubleSpinBox::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QDoubleSpinBox::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QDoubleSpinBox::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QDoubleSpinBox::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QDoubleSpinBox::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QDoubleSpinBox::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QDoubleSpinBox::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QDoubleSpinBox::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QDoubleSpinBox::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QDoubleSpinBox::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QDoubleSpinBox::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QDoubleSpinBox::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QDoubleSpinBox::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QDoubleSpinBox::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QDoubleSpinBox::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QDoubleSpinBox::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDoubleSpinBox::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDoubleSpinBox_TimerEvent(this, handle__TimerEvent, sigval1); + + + } -QMetaObject* QSpinBox_MetaObject(const QSpinBox* self) { - return (QMetaObject*) self->metaObject(); -} + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { -void* QSpinBox_Metacast(QSpinBox* self, const char* param1) { - return self->qt_metacast(param1); -} + QDoubleSpinBox::timerEvent(event); -struct miqt_string QSpinBox_Tr(const char* s) { - QString _ret = QSpinBox::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + } -int QSpinBox_Value(const QSpinBox* self) { - return self->value(); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; -struct miqt_string QSpinBox_Prefix(const QSpinBox* self) { - QString _ret = self->prefix(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QDoubleSpinBox::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; -void QSpinBox_SetPrefix(QSpinBox* self, struct miqt_string prefix) { - QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); - self->setPrefix(prefix_QString); -} + miqt_exec_callback_QDoubleSpinBox_PaintEvent(this, handle__PaintEvent, sigval1); -struct miqt_string QSpinBox_Suffix(const QSpinBox* self) { - QString _ret = self->suffix(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + + } -void QSpinBox_SetSuffix(QSpinBox* self, struct miqt_string suffix) { - QString suffix_QString = QString::fromUtf8(suffix.data, suffix.len); - self->setSuffix(suffix_QString); -} + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { -struct miqt_string QSpinBox_CleanText(const QSpinBox* self) { - QString _ret = self->cleanText(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + QDoubleSpinBox::paintEvent(event); -int QSpinBox_SingleStep(const QSpinBox* self) { - return self->singleStep(); -} + } -void QSpinBox_SetSingleStep(QSpinBox* self, int val) { - self->setSingleStep(static_cast(val)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; -int QSpinBox_Minimum(const QSpinBox* self) { - return self->minimum(); -} + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QDoubleSpinBox::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; -void QSpinBox_SetMinimum(QSpinBox* self, int min) { - self->setMinimum(static_cast(min)); -} + miqt_exec_callback_QDoubleSpinBox_ShowEvent(this, handle__ShowEvent, sigval1); -int QSpinBox_Maximum(const QSpinBox* self) { - return self->maximum(); -} + + } -void QSpinBox_SetMaximum(QSpinBox* self, int max) { - self->setMaximum(static_cast(max)); -} + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { -void QSpinBox_SetRange(QSpinBox* self, int min, int max) { - self->setRange(static_cast(min), static_cast(max)); -} + QDoubleSpinBox::showEvent(event); -int QSpinBox_StepType(const QSpinBox* self) { - QAbstractSpinBox::StepType _ret = self->stepType(); - return static_cast(_ret); -} + } -void QSpinBox_SetStepType(QSpinBox* self, int stepType) { - self->setStepType(static_cast(stepType)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; -int QSpinBox_DisplayIntegerBase(const QSpinBox* self) { - return self->displayIntegerBase(); -} + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionSpinBox* option) const override { + if (handle__InitStyleOption == 0) { + QDoubleSpinBox::initStyleOption(option); + return; + } + + QStyleOptionSpinBox* sigval1 = option; -void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base) { - self->setDisplayIntegerBase(static_cast(base)); -} + miqt_exec_callback_QDoubleSpinBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); -void QSpinBox_SetValue(QSpinBox* self, int val) { - self->setValue(static_cast(val)); -} + + } -void QSpinBox_ValueChanged(QSpinBox* self, int param1) { - self->valueChanged(static_cast(param1)); -} + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionSpinBox* option) const { -void QSpinBox_connect_ValueChanged(QSpinBox* self, intptr_t slot) { - QSpinBox::connect(self, static_cast(&QSpinBox::valueChanged), self, [=](int param1) { - int sigval1 = param1; - miqt_exec_callback_QSpinBox_ValueChanged(slot, sigval1); - }); -} + QDoubleSpinBox::initStyleOption(option); -void QSpinBox_TextChanged(QSpinBox* self, struct miqt_string param1) { - QString param1_QString = QString::fromUtf8(param1.data, param1.len); - self->textChanged(param1_QString); -} + } -void QSpinBox_connect_TextChanged(QSpinBox* self, intptr_t slot) { - QSpinBox::connect(self, static_cast(&QSpinBox::textChanged), self, [=](const QString& param1) { - const QString param1_ret = param1; - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray param1_b = param1_ret.toUtf8(); - struct miqt_string param1_ms; - param1_ms.len = param1_b.length(); - param1_ms.data = static_cast(malloc(param1_ms.len)); - memcpy(param1_ms.data, param1_b.data(), param1_ms.len); - struct miqt_string sigval1 = param1_ms; - miqt_exec_callback_QSpinBox_TextChanged(slot, sigval1); - }); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__StepEnabled = 0; -struct miqt_string QSpinBox_Tr2(const char* s, const char* c) { - QString _ret = QSpinBox::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + // Subclass to allow providing a Go implementation + virtual QAbstractSpinBox::StepEnabled stepEnabled() const override { + if (handle__StepEnabled == 0) { + return QDoubleSpinBox::stepEnabled(); + } + -struct miqt_string QSpinBox_Tr3(const char* s, const char* c, int n) { - QString _ret = QSpinBox::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} + int callback_return_value = miqt_exec_callback_QDoubleSpinBox_StepEnabled(const_cast(this), handle__StepEnabled); -void QSpinBox_Delete(QSpinBox* self) { - delete self; -} + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StepEnabled() const { + + QAbstractSpinBox::StepEnabled _ret = QDoubleSpinBox::stepEnabled(); + return static_cast(_ret); + + } + +}; -QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent) { - return new QDoubleSpinBox(parent); +void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(parent); + *outptr_QDoubleSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QDoubleSpinBox* QDoubleSpinBox_new2() { - return new QDoubleSpinBox(); +void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(); + *outptr_QDoubleSpinBox = ret; + *outptr_QAbstractSpinBox = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self) { @@ -343,7 +2021,7 @@ void QDoubleSpinBox_ValueChanged(QDoubleSpinBox* self, double param1) { } void QDoubleSpinBox_connect_ValueChanged(QDoubleSpinBox* self, intptr_t slot) { - QDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::valueChanged), self, [=](double param1) { + MiqtVirtualQDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::valueChanged), self, [=](double param1) { double sigval1 = param1; miqt_exec_callback_QDoubleSpinBox_ValueChanged(slot, sigval1); }); @@ -355,7 +2033,7 @@ void QDoubleSpinBox_TextChanged(QDoubleSpinBox* self, struct miqt_string param1) } void QDoubleSpinBox_connect_TextChanged(QDoubleSpinBox* self, intptr_t slot) { - QDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::textChanged), self, [=](const QString& param1) { + MiqtVirtualQDoubleSpinBox::connect(self, static_cast(&QDoubleSpinBox::textChanged), self, [=](const QString& param1) { const QString param1_ret = param1; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray param1_b = param1_ret.toUtf8(); @@ -390,7 +2068,235 @@ struct miqt_string QDoubleSpinBox_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDoubleSpinBox_Delete(QDoubleSpinBox* self) { - delete self; +void QDoubleSpinBox_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Validate = slot; +} + +int QDoubleSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Validate(input, pos); +} + +void QDoubleSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ValueFromText = slot; +} + +double QDoubleSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ValueFromText(text); +} + +void QDoubleSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__TextFromValue = slot; +} + +struct miqt_string QDoubleSpinBox_virtualbase_TextFromValue(const void* self, double val) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_TextFromValue(val); +} + +void QDoubleSpinBox_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Fixup = slot; +} + +void QDoubleSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str) { + ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Fixup(str); +} + +void QDoubleSpinBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QDoubleSpinBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_SizeHint(); +} + +void QDoubleSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QDoubleSpinBox_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QDoubleSpinBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Event = slot; +} + +bool QDoubleSpinBox_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Event(event); +} + +void QDoubleSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QDoubleSpinBox_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QDoubleSpinBox_override_virtual_StepBy(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__StepBy = slot; +} + +void QDoubleSpinBox_virtualbase_StepBy(void* self, int steps) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_StepBy(steps); +} + +void QDoubleSpinBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__Clear = slot; +} + +void QDoubleSpinBox_virtualbase_Clear(void* self) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_Clear(); +} + +void QDoubleSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ResizeEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ResizeEvent(event); +} + +void QDoubleSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__KeyPressEvent = slot; +} + +void QDoubleSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QDoubleSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QDoubleSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QDoubleSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__WheelEvent = slot; +} + +void QDoubleSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_WheelEvent(event); +} + +void QDoubleSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__FocusInEvent = slot; +} + +void QDoubleSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_FocusInEvent(event); +} + +void QDoubleSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__FocusOutEvent = slot; +} + +void QDoubleSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QDoubleSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ContextMenuEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QDoubleSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ChangeEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ChangeEvent(event); +} + +void QDoubleSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__CloseEvent = slot; +} + +void QDoubleSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_CloseEvent(event); +} + +void QDoubleSpinBox_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__HideEvent = slot; +} + +void QDoubleSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_HideEvent(event); +} + +void QDoubleSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MousePressEvent = slot; +} + +void QDoubleSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MousePressEvent(event); +} + +void QDoubleSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QDoubleSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QDoubleSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__MouseMoveEvent = slot; +} + +void QDoubleSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QDoubleSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__TimerEvent = slot; +} + +void QDoubleSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_TimerEvent(event); +} + +void QDoubleSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__PaintEvent = slot; +} + +void QDoubleSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_PaintEvent(event); +} + +void QDoubleSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__ShowEvent = slot; +} + +void QDoubleSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_ShowEvent(event); +} + +void QDoubleSpinBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__InitStyleOption = slot; +} + +void QDoubleSpinBox_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option) { + ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QDoubleSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot) { + dynamic_cast( (QDoubleSpinBox*)(self) )->handle__StepEnabled = slot; +} + +int QDoubleSpinBox_virtualbase_StepEnabled(const void* self) { + return ( (const MiqtVirtualQDoubleSpinBox*)(self) )->virtualbase_StepEnabled(); +} + +void QDoubleSpinBox_Delete(QDoubleSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qspinbox.go b/qt6/gen_qspinbox.go index 76db29a8..96a8d171 100644 --- a/qt6/gen_qspinbox.go +++ b/qt6/gen_qspinbox.go @@ -15,7 +15,8 @@ import ( ) type QSpinBox struct { - h *C.QSpinBox + h *C.QSpinBox + isSubclass bool *QAbstractSpinBox } @@ -33,27 +34,51 @@ func (this *QSpinBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSpinBox(h *C.QSpinBox) *QSpinBox { +// newQSpinBox constructs the type using only CGO pointers. +func newQSpinBox(h *C.QSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSpinBox { if h == nil { return nil } - return &QSpinBox{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))} + return &QSpinBox{h: h, + QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSpinBox(h unsafe.Pointer) *QSpinBox { - return newQSpinBox((*C.QSpinBox)(h)) +// UnsafeNewQSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSpinBox { + if h == nil { + return nil + } + + return &QSpinBox{h: (*C.QSpinBox)(h), + QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSpinBox constructs a new QSpinBox object. func NewQSpinBox(parent *QWidget) *QSpinBox { - ret := C.QSpinBox_new(parent.cPointer()) - return newQSpinBox(ret) + var outptr_QSpinBox *C.QSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSpinBox_new(parent.cPointer(), &outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSpinBox2 constructs a new QSpinBox object. func NewQSpinBox2() *QSpinBox { - ret := C.QSpinBox_new2() - return newQSpinBox(ret) + var outptr_QSpinBox *C.QSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSpinBox_new2(&outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSpinBox) MetaObject() *QMetaObject { @@ -233,262 +258,972 @@ func QSpinBox_Tr3(s string, c string, n int) string { return _ret } -// Delete this object from C++ memory. -func (this *QSpinBox) Delete() { - C.QSpinBox_Delete(this.h) -} +func (this *QSpinBox) callVirtualBase_Event(event *QEvent) bool { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QSpinBox) GoGC() { - runtime.SetFinalizer(this, func(this *QSpinBox) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + return (bool)(C.QSpinBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) -type QDoubleSpinBox struct { - h *C.QDoubleSpinBox - *QAbstractSpinBox +} +func (this *QSpinBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSpinBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) cPointer() *C.QDoubleSpinBox { - if this == nil { - return nil +//export miqt_exec_callback_QSpinBox_Event +func miqt_exec_callback_QSpinBox_Event(self *C.QSpinBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QDoubleSpinBox) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QSpinBox) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QSpinBox_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QSpinBox) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QSpinBox_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQDoubleSpinBox(h *C.QDoubleSpinBox) *QDoubleSpinBox { - if h == nil { - return nil +//export miqt_exec_callback_QSpinBox_Validate +func miqt_exec_callback_QSpinBox_Validate(self *C.QSpinBox, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QDoubleSpinBox{h: h, QAbstractSpinBox: UnsafeNewQAbstractSpinBox(unsafe.Pointer(h))} -} -func UnsafeNewQDoubleSpinBox(h unsafe.Pointer) *QDoubleSpinBox { - return newQDoubleSpinBox((*C.QDoubleSpinBox)(h)) -} + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) -// NewQDoubleSpinBox constructs a new QDoubleSpinBox object. -func NewQDoubleSpinBox(parent *QWidget) *QDoubleSpinBox { - ret := C.QDoubleSpinBox_new(parent.cPointer()) - return newQDoubleSpinBox(ret) -} + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_Validate, slotval1, slotval2) -// NewQDoubleSpinBox2 constructs a new QDoubleSpinBox object. -func NewQDoubleSpinBox2() *QDoubleSpinBox { - ret := C.QDoubleSpinBox_new2() - return newQDoubleSpinBox(ret) -} + return (C.int)(virtualReturn) -func (this *QDoubleSpinBox) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QDoubleSpinBox_MetaObject(this.h))) } -func (this *QDoubleSpinBox) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QDoubleSpinBox_Metacast(this.h, param1_Cstring)) -} +func (this *QSpinBox) callVirtualBase_ValueFromText(text string) int { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) -func QDoubleSpinBox_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + return (int)(C.QSpinBox_virtualbase_ValueFromText(unsafe.Pointer(this.h), text_ms)) -func (this *QDoubleSpinBox) Value() float64 { - return (float64)(C.QDoubleSpinBox_Value(this.h)) } - -func (this *QDoubleSpinBox) Prefix() string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Prefix(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QSpinBox) OnValueFromText(slot func(super func(text string) int, text string) int) { + C.QSpinBox_override_virtual_ValueFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) SetPrefix(prefix string) { - prefix_ms := C.struct_miqt_string{} - prefix_ms.data = C.CString(prefix) - prefix_ms.len = C.size_t(len(prefix)) - defer C.free(unsafe.Pointer(prefix_ms.data)) - C.QDoubleSpinBox_SetPrefix(this.h, prefix_ms) -} +//export miqt_exec_callback_QSpinBox_ValueFromText +func miqt_exec_callback_QSpinBox_ValueFromText(self *C.QSpinBox, cb C.intptr_t, text C.struct_miqt_string) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) int, text string) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QDoubleSpinBox) Suffix() string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Suffix(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_ValueFromText, slotval1) + + return (C.int)(virtualReturn) -func (this *QDoubleSpinBox) SetSuffix(suffix string) { - suffix_ms := C.struct_miqt_string{} - suffix_ms.data = C.CString(suffix) - suffix_ms.len = C.size_t(len(suffix)) - defer C.free(unsafe.Pointer(suffix_ms.data)) - C.QDoubleSpinBox_SetSuffix(this.h, suffix_ms) } -func (this *QDoubleSpinBox) CleanText() string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_CleanText(this.h) +func (this *QSpinBox) callVirtualBase_TextFromValue(val int) string { + + var _ms C.struct_miqt_string = C.QSpinBox_virtualbase_TextFromValue(unsafe.Pointer(this.h), (C.int)(val)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } - -func (this *QDoubleSpinBox) SingleStep() float64 { - return (float64)(C.QDoubleSpinBox_SingleStep(this.h)) +func (this *QSpinBox) OnTextFromValue(slot func(super func(val int) string, val int) string) { + C.QSpinBox_override_virtual_TextFromValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) SetSingleStep(val float64) { - C.QDoubleSpinBox_SetSingleStep(this.h, (C.double)(val)) -} +//export miqt_exec_callback_QSpinBox_TextFromValue +func miqt_exec_callback_QSpinBox_TextFromValue(self *C.QSpinBox, cb C.intptr_t, val C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(val int) string, val int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } -func (this *QDoubleSpinBox) Minimum() float64 { - return (float64)(C.QDoubleSpinBox_Minimum(this.h)) -} + // Convert all CABI parameters to Go parameters + slotval1 := (int)(val) -func (this *QDoubleSpinBox) SetMinimum(min float64) { - C.QDoubleSpinBox_SetMinimum(this.h, (C.double)(min)) -} + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_TextFromValue, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) -func (this *QDoubleSpinBox) Maximum() float64 { - return (float64)(C.QDoubleSpinBox_Maximum(this.h)) -} + return virtualReturn_ms -func (this *QDoubleSpinBox) SetMaximum(max float64) { - C.QDoubleSpinBox_SetMaximum(this.h, (C.double)(max)) } -func (this *QDoubleSpinBox) SetRange(min float64, max float64) { - C.QDoubleSpinBox_SetRange(this.h, (C.double)(min), (C.double)(max)) -} +func (this *QSpinBox) callVirtualBase_Fixup(str string) { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) -func (this *QDoubleSpinBox) StepType() QAbstractSpinBox__StepType { - return (QAbstractSpinBox__StepType)(C.QDoubleSpinBox_StepType(this.h)) -} + C.QSpinBox_virtualbase_Fixup(unsafe.Pointer(this.h), str_ms) -func (this *QDoubleSpinBox) SetStepType(stepType QAbstractSpinBox__StepType) { - C.QDoubleSpinBox_SetStepType(this.h, (C.int)(stepType)) +} +func (this *QSpinBox) OnFixup(slot func(super func(str string), str string)) { + C.QSpinBox_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) Decimals() int { - return (int)(C.QDoubleSpinBox_Decimals(this.h)) +//export miqt_exec_callback_QSpinBox_Fixup +func miqt_exec_callback_QSpinBox_Fixup(self *C.QSpinBox, cb C.intptr_t, str C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(str string), str string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var str_ms C.struct_miqt_string = str + str_ret := C.GoStringN(str_ms.data, C.int(int64(str_ms.len))) + C.free(unsafe.Pointer(str_ms.data)) + slotval1 := str_ret + + gofunc((&QSpinBox{h: self}).callVirtualBase_Fixup, slotval1) + } -func (this *QDoubleSpinBox) SetDecimals(prec int) { - C.QDoubleSpinBox_SetDecimals(this.h, (C.int)(prec)) +func (this *QSpinBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSpinBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpinBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSpinBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) Validate(input string, pos *int) QValidator__State { - input_ms := C.struct_miqt_string{} - input_ms.data = C.CString(input) - input_ms.len = C.size_t(len(input)) - defer C.free(unsafe.Pointer(input_ms.data)) - return (QValidator__State)(C.QDoubleSpinBox_Validate(this.h, input_ms, (*C.int)(unsafe.Pointer(pos)))) +//export miqt_exec_callback_QSpinBox_SizeHint +func miqt_exec_callback_QSpinBox_SizeHint(self *C.QSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func (this *QDoubleSpinBox) ValueFromText(text string) float64 { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - return (float64)(C.QDoubleSpinBox_ValueFromText(this.h, text_ms)) +func (this *QSpinBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSpinBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpinBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSpinBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) TextFromValue(val float64) string { - var _ms C.struct_miqt_string = C.QDoubleSpinBox_TextFromValue(this.h, (C.double)(val)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +//export miqt_exec_callback_QSpinBox_MinimumSizeHint +func miqt_exec_callback_QSpinBox_MinimumSizeHint(self *C.QSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + } -func (this *QDoubleSpinBox) Fixup(str string) { - str_ms := C.struct_miqt_string{} - str_ms.data = C.CString(str) - str_ms.len = C.size_t(len(str)) - defer C.free(unsafe.Pointer(str_ms.data)) - C.QDoubleSpinBox_Fixup(this.h, str_ms) +func (this *QSpinBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSpinBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSpinBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSpinBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QDoubleSpinBox) SetValue(val float64) { - C.QDoubleSpinBox_SetValue(this.h, (C.double)(val)) +//export miqt_exec_callback_QSpinBox_InputMethodQuery +func miqt_exec_callback_QSpinBox_InputMethodQuery(self *C.QSpinBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } -func (this *QDoubleSpinBox) ValueChanged(param1 float64) { - C.QDoubleSpinBox_ValueChanged(this.h, (C.double)(param1)) +func (this *QSpinBox) callVirtualBase_StepBy(steps int) { + + C.QSpinBox_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + } -func (this *QDoubleSpinBox) OnValueChanged(slot func(param1 float64)) { - C.QDoubleSpinBox_connect_ValueChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QSpinBox) OnStepBy(slot func(super func(steps int), steps int)) { + C.QSpinBox_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDoubleSpinBox_ValueChanged -func miqt_exec_callback_QDoubleSpinBox_ValueChanged(cb C.intptr_t, param1 C.double) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 float64)) +//export miqt_exec_callback_QSpinBox_StepBy +func miqt_exec_callback_QSpinBox_StepBy(self *C.QSpinBox, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters - slotval1 := (float64)(param1) + slotval1 := (int)(steps) + + gofunc((&QSpinBox{h: self}).callVirtualBase_StepBy, slotval1) - gofunc(slotval1) } -func (this *QDoubleSpinBox) TextChanged(param1 string) { - param1_ms := C.struct_miqt_string{} - param1_ms.data = C.CString(param1) - param1_ms.len = C.size_t(len(param1)) - defer C.free(unsafe.Pointer(param1_ms.data)) - C.QDoubleSpinBox_TextChanged(this.h, param1_ms) +func (this *QSpinBox) callVirtualBase_Clear() { + + C.QSpinBox_virtualbase_Clear(unsafe.Pointer(this.h)) + } -func (this *QDoubleSpinBox) OnTextChanged(slot func(param1 string)) { - C.QDoubleSpinBox_connect_TextChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QSpinBox) OnClear(slot func(super func())) { + C.QSpinBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QDoubleSpinBox_TextChanged -func miqt_exec_callback_QDoubleSpinBox_TextChanged(cb C.intptr_t, param1 C.struct_miqt_string) { - gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) +//export miqt_exec_callback_QSpinBox_Clear +func miqt_exec_callback_QSpinBox_Clear(self *C.QSpinBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - // Convert all CABI parameters to Go parameters - var param1_ms C.struct_miqt_string = param1 - param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) - C.free(unsafe.Pointer(param1_ms.data)) - slotval1 := param1_ret + gofunc((&QSpinBox{h: self}).callVirtualBase_Clear) - gofunc(slotval1) } -func QDoubleSpinBox_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QSpinBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QSpinBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QSpinBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QDoubleSpinBox_Tr3(s string, c string, n int) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) +//export miqt_exec_callback_QSpinBox_ResizeEvent +func miqt_exec_callback_QSpinBox_ResizeEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSpinBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSpinBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_KeyPressEvent +func miqt_exec_callback_QSpinBox_KeyPressEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSpinBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSpinBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_KeyReleaseEvent +func miqt_exec_callback_QSpinBox_KeyReleaseEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSpinBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSpinBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_WheelEvent +func miqt_exec_callback_QSpinBox_WheelEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSpinBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSpinBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_FocusInEvent +func miqt_exec_callback_QSpinBox_FocusInEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSpinBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSpinBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_FocusOutEvent +func miqt_exec_callback_QSpinBox_FocusOutEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSpinBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSpinBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ContextMenuEvent +func miqt_exec_callback_QSpinBox_ContextMenuEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QSpinBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSpinBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ChangeEvent +func miqt_exec_callback_QSpinBox_ChangeEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSpinBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSpinBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_CloseEvent +func miqt_exec_callback_QSpinBox_CloseEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QSpinBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QSpinBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_HideEvent +func miqt_exec_callback_QSpinBox_HideEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QSpinBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSpinBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_MousePressEvent +func miqt_exec_callback_QSpinBox_MousePressEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QSpinBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSpinBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_MouseReleaseEvent +func miqt_exec_callback_QSpinBox_MouseReleaseEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QSpinBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSpinBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_MouseMoveEvent +func miqt_exec_callback_QSpinBox_MouseMoveEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSpinBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSpinBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_TimerEvent +func miqt_exec_callback_QSpinBox_TimerEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QSpinBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QSpinBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_PaintEvent +func miqt_exec_callback_QSpinBox_PaintEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QSpinBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSpinBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QSpinBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_ShowEvent +func miqt_exec_callback_QSpinBox_ShowEvent(self *C.QSpinBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_InitStyleOption(option *QStyleOptionSpinBox) { + + C.QSpinBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QSpinBox) OnInitStyleOption(slot func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) { + C.QSpinBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_InitStyleOption +func miqt_exec_callback_QSpinBox_InitStyleOption(self *C.QSpinBox, cb C.intptr_t, option *C.QStyleOptionSpinBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSpinBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QSpinBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QSpinBox) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QSpinBox_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QSpinBox) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QSpinBox_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpinBox_StepEnabled +func miqt_exec_callback_QSpinBox_StepEnabled(self *C.QSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSpinBox{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QSpinBox) Delete() { + C.QSpinBox_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QSpinBox) GoGC() { + runtime.SetFinalizer(this, func(this *QSpinBox) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QDoubleSpinBox struct { + h *C.QDoubleSpinBox + isSubclass bool + *QAbstractSpinBox +} + +func (this *QDoubleSpinBox) cPointer() *C.QDoubleSpinBox { + if this == nil { + return nil + } + return this.h +} + +func (this *QDoubleSpinBox) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQDoubleSpinBox constructs the type using only CGO pointers. +func newQDoubleSpinBox(h *C.QDoubleSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDoubleSpinBox { + if h == nil { + return nil + } + return &QDoubleSpinBox{h: h, + QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQDoubleSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQDoubleSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDoubleSpinBox { + if h == nil { + return nil + } + + return &QDoubleSpinBox{h: (*C.QDoubleSpinBox)(h), + QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQDoubleSpinBox constructs a new QDoubleSpinBox object. +func NewQDoubleSpinBox(parent *QWidget) *QDoubleSpinBox { + var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDoubleSpinBox_new(parent.cPointer(), &outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQDoubleSpinBox2 constructs a new QDoubleSpinBox object. +func NewQDoubleSpinBox2() *QDoubleSpinBox { + var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QDoubleSpinBox_new2(&outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QDoubleSpinBox) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QDoubleSpinBox_MetaObject(this.h))) +} + +func (this *QDoubleSpinBox) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QDoubleSpinBox_Metacast(this.h, param1_Cstring)) +} + +func QDoubleSpinBox_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) Value() float64 { + return (float64)(C.QDoubleSpinBox_Value(this.h)) +} + +func (this *QDoubleSpinBox) Prefix() string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Prefix(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) SetPrefix(prefix string) { + prefix_ms := C.struct_miqt_string{} + prefix_ms.data = C.CString(prefix) + prefix_ms.len = C.size_t(len(prefix)) + defer C.free(unsafe.Pointer(prefix_ms.data)) + C.QDoubleSpinBox_SetPrefix(this.h, prefix_ms) +} + +func (this *QDoubleSpinBox) Suffix() string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Suffix(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) SetSuffix(suffix string) { + suffix_ms := C.struct_miqt_string{} + suffix_ms.data = C.CString(suffix) + suffix_ms.len = C.size_t(len(suffix)) + defer C.free(unsafe.Pointer(suffix_ms.data)) + C.QDoubleSpinBox_SetSuffix(this.h, suffix_ms) +} + +func (this *QDoubleSpinBox) CleanText() string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_CleanText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) SingleStep() float64 { + return (float64)(C.QDoubleSpinBox_SingleStep(this.h)) +} + +func (this *QDoubleSpinBox) SetSingleStep(val float64) { + C.QDoubleSpinBox_SetSingleStep(this.h, (C.double)(val)) +} + +func (this *QDoubleSpinBox) Minimum() float64 { + return (float64)(C.QDoubleSpinBox_Minimum(this.h)) +} + +func (this *QDoubleSpinBox) SetMinimum(min float64) { + C.QDoubleSpinBox_SetMinimum(this.h, (C.double)(min)) +} + +func (this *QDoubleSpinBox) Maximum() float64 { + return (float64)(C.QDoubleSpinBox_Maximum(this.h)) +} + +func (this *QDoubleSpinBox) SetMaximum(max float64) { + C.QDoubleSpinBox_SetMaximum(this.h, (C.double)(max)) +} + +func (this *QDoubleSpinBox) SetRange(min float64, max float64) { + C.QDoubleSpinBox_SetRange(this.h, (C.double)(min), (C.double)(max)) +} + +func (this *QDoubleSpinBox) StepType() QAbstractSpinBox__StepType { + return (QAbstractSpinBox__StepType)(C.QDoubleSpinBox_StepType(this.h)) +} + +func (this *QDoubleSpinBox) SetStepType(stepType QAbstractSpinBox__StepType) { + C.QDoubleSpinBox_SetStepType(this.h, (C.int)(stepType)) +} + +func (this *QDoubleSpinBox) Decimals() int { + return (int)(C.QDoubleSpinBox_Decimals(this.h)) +} + +func (this *QDoubleSpinBox) SetDecimals(prec int) { + C.QDoubleSpinBox_SetDecimals(this.h, (C.int)(prec)) +} + +func (this *QDoubleSpinBox) Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + return (QValidator__State)(C.QDoubleSpinBox_Validate(this.h, input_ms, (*C.int)(unsafe.Pointer(pos)))) +} + +func (this *QDoubleSpinBox) ValueFromText(text string) float64 { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + return (float64)(C.QDoubleSpinBox_ValueFromText(this.h, text_ms)) +} + +func (this *QDoubleSpinBox) TextFromValue(val float64) string { + var _ms C.struct_miqt_string = C.QDoubleSpinBox_TextFromValue(this.h, (C.double)(val)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QDoubleSpinBox) Fixup(str string) { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) + C.QDoubleSpinBox_Fixup(this.h, str_ms) +} + +func (this *QDoubleSpinBox) SetValue(val float64) { + C.QDoubleSpinBox_SetValue(this.h, (C.double)(val)) +} + +func (this *QDoubleSpinBox) ValueChanged(param1 float64) { + C.QDoubleSpinBox_ValueChanged(this.h, (C.double)(param1)) +} +func (this *QDoubleSpinBox) OnValueChanged(slot func(param1 float64)) { + C.QDoubleSpinBox_connect_ValueChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ValueChanged +func miqt_exec_callback_QDoubleSpinBox_ValueChanged(cb C.intptr_t, param1 C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(param1) + + gofunc(slotval1) +} + +func (this *QDoubleSpinBox) TextChanged(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + C.QDoubleSpinBox_TextChanged(this.h, param1_ms) +} +func (this *QDoubleSpinBox) OnTextChanged(slot func(param1 string)) { + C.QDoubleSpinBox_connect_TextChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_TextChanged +func miqt_exec_callback_QDoubleSpinBox_TextChanged(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func QDoubleSpinBox_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QDoubleSpinBox_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms C.struct_miqt_string = C.QDoubleSpinBox_Tr3(s_Cstring, c_Cstring, (C.int)(n)) @@ -497,9 +1232,694 @@ func QDoubleSpinBox_Tr3(s string, c string, n int) string { return _ret } +func (this *QDoubleSpinBox) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QDoubleSpinBox_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QDoubleSpinBox) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QDoubleSpinBox_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Validate +func miqt_exec_callback_QDoubleSpinBox_Validate(self *C.QDoubleSpinBox, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ValueFromText(text string) float64 { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + + return (float64)(C.QDoubleSpinBox_virtualbase_ValueFromText(unsafe.Pointer(this.h), text_ms)) + +} +func (this *QDoubleSpinBox) OnValueFromText(slot func(super func(text string) float64, text string) float64) { + C.QDoubleSpinBox_override_virtual_ValueFromText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ValueFromText +func miqt_exec_callback_QDoubleSpinBox_ValueFromText(self *C.QDoubleSpinBox, cb C.intptr_t, text C.struct_miqt_string) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(text string) float64, text string) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var text_ms C.struct_miqt_string = text + text_ret := C.GoStringN(text_ms.data, C.int(int64(text_ms.len))) + C.free(unsafe.Pointer(text_ms.data)) + slotval1 := text_ret + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ValueFromText, slotval1) + + return (C.double)(virtualReturn) + +} + +func (this *QDoubleSpinBox) callVirtualBase_TextFromValue(val float64) string { + + var _ms C.struct_miqt_string = C.QDoubleSpinBox_virtualbase_TextFromValue(unsafe.Pointer(this.h), (C.double)(val)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QDoubleSpinBox) OnTextFromValue(slot func(super func(val float64) string, val float64) string) { + C.QDoubleSpinBox_override_virtual_TextFromValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_TextFromValue +func miqt_exec_callback_QDoubleSpinBox_TextFromValue(self *C.QDoubleSpinBox, cb C.intptr_t, val C.double) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(val float64) string, val float64) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(val) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_TextFromValue, slotval1) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QDoubleSpinBox) callVirtualBase_Fixup(str string) { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) + + C.QDoubleSpinBox_virtualbase_Fixup(unsafe.Pointer(this.h), str_ms) + +} +func (this *QDoubleSpinBox) OnFixup(slot func(super func(str string), str string)) { + C.QDoubleSpinBox_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Fixup +func miqt_exec_callback_QDoubleSpinBox_Fixup(self *C.QDoubleSpinBox, cb C.intptr_t, str C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(str string), str string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var str_ms C.struct_miqt_string = str + str_ret := C.GoStringN(str_ms.data, C.int(int64(str_ms.len))) + C.free(unsafe.Pointer(str_ms.data)) + slotval1 := str_ret + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QDoubleSpinBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDoubleSpinBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QDoubleSpinBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_SizeHint +func miqt_exec_callback_QDoubleSpinBox_SizeHint(self *C.QDoubleSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDoubleSpinBox) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QDoubleSpinBox_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDoubleSpinBox) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QDoubleSpinBox_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MinimumSizeHint +func miqt_exec_callback_QDoubleSpinBox_MinimumSizeHint(self *C.QDoubleSpinBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QDoubleSpinBox) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QDoubleSpinBox_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QDoubleSpinBox) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QDoubleSpinBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Event +func miqt_exec_callback_QDoubleSpinBox_Event(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDoubleSpinBox) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QDoubleSpinBox_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QDoubleSpinBox) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QDoubleSpinBox_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_InputMethodQuery +func miqt_exec_callback_QDoubleSpinBox_InputMethodQuery(self *C.QDoubleSpinBox, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QDoubleSpinBox) callVirtualBase_StepBy(steps int) { + + C.QDoubleSpinBox_virtualbase_StepBy(unsafe.Pointer(this.h), (C.int)(steps)) + +} +func (this *QDoubleSpinBox) OnStepBy(slot func(super func(steps int), steps int)) { + C.QDoubleSpinBox_override_virtual_StepBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_StepBy +func miqt_exec_callback_QDoubleSpinBox_StepBy(self *C.QDoubleSpinBox, cb C.intptr_t, steps C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(steps int), steps int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(steps) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_StepBy, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_Clear() { + + C.QDoubleSpinBox_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QDoubleSpinBox) OnClear(slot func(super func())) { + C.QDoubleSpinBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_Clear +func miqt_exec_callback_QDoubleSpinBox_Clear(self *C.QDoubleSpinBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_Clear) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QDoubleSpinBox_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QDoubleSpinBox_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ResizeEvent +func miqt_exec_callback_QDoubleSpinBox_ResizeEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QDoubleSpinBox_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDoubleSpinBox_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_KeyPressEvent +func miqt_exec_callback_QDoubleSpinBox_KeyPressEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QDoubleSpinBox_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QDoubleSpinBox_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent +func miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QDoubleSpinBox_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QDoubleSpinBox_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_WheelEvent +func miqt_exec_callback_QDoubleSpinBox_WheelEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QDoubleSpinBox_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDoubleSpinBox_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_FocusInEvent +func miqt_exec_callback_QDoubleSpinBox_FocusInEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QDoubleSpinBox_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QDoubleSpinBox_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_FocusOutEvent +func miqt_exec_callback_QDoubleSpinBox_FocusOutEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QDoubleSpinBox_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QDoubleSpinBox_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent +func miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QDoubleSpinBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QDoubleSpinBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ChangeEvent +func miqt_exec_callback_QDoubleSpinBox_ChangeEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QDoubleSpinBox_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QDoubleSpinBox_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_CloseEvent +func miqt_exec_callback_QDoubleSpinBox_CloseEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QDoubleSpinBox_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QDoubleSpinBox_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_HideEvent +func miqt_exec_callback_QDoubleSpinBox_HideEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QDoubleSpinBox_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDoubleSpinBox_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MousePressEvent +func miqt_exec_callback_QDoubleSpinBox_MousePressEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QDoubleSpinBox_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDoubleSpinBox_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent +func miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QDoubleSpinBox_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QDoubleSpinBox_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent +func miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QDoubleSpinBox_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QDoubleSpinBox_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_TimerEvent +func miqt_exec_callback_QDoubleSpinBox_TimerEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QDoubleSpinBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QDoubleSpinBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_PaintEvent +func miqt_exec_callback_QDoubleSpinBox_PaintEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QDoubleSpinBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QDoubleSpinBox) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QDoubleSpinBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_ShowEvent +func miqt_exec_callback_QDoubleSpinBox_ShowEvent(self *C.QDoubleSpinBox, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_InitStyleOption(option *QStyleOptionSpinBox) { + + C.QDoubleSpinBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QDoubleSpinBox) OnInitStyleOption(slot func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) { + C.QDoubleSpinBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_InitStyleOption +func miqt_exec_callback_QDoubleSpinBox_InitStyleOption(self *C.QDoubleSpinBox, cb C.intptr_t, option *C.QStyleOptionSpinBox) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionSpinBox), option *QStyleOptionSpinBox)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionSpinBox(unsafe.Pointer(option), nil, nil) + + gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QDoubleSpinBox) callVirtualBase_StepEnabled() QAbstractSpinBox__StepEnabledFlag { + + return (QAbstractSpinBox__StepEnabledFlag)(C.QDoubleSpinBox_virtualbase_StepEnabled(unsafe.Pointer(this.h))) + +} +func (this *QDoubleSpinBox) OnStepEnabled(slot func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) { + C.QDoubleSpinBox_override_virtual_StepEnabled(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleSpinBox_StepEnabled +func miqt_exec_callback_QDoubleSpinBox_StepEnabled(self *C.QDoubleSpinBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QAbstractSpinBox__StepEnabledFlag) QAbstractSpinBox__StepEnabledFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_StepEnabled) + + return (C.int)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QDoubleSpinBox) Delete() { - C.QDoubleSpinBox_Delete(this.h) + C.QDoubleSpinBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qspinbox.h b/qt6/gen_qspinbox.h index 2afb97a6..fb30b393 100644 --- a/qt6/gen_qspinbox.h +++ b/qt6/gen_qspinbox.h @@ -15,19 +15,55 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSpinBox; +class QCloseEvent; +class QContextMenuEvent; class QDoubleSpinBox; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; +class QSize; class QSpinBox; +class QStyleOptionSpinBox; +class QTimerEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractSpinBox QAbstractSpinBox; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDoubleSpinBox QDoubleSpinBox; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QSpinBox QSpinBox; +typedef struct QStyleOptionSpinBox QStyleOptionSpinBox; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSpinBox* QSpinBox_new(QWidget* parent); -QSpinBox* QSpinBox_new2(); +void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSpinBox_MetaObject(const QSpinBox* self); void* QSpinBox_Metacast(QSpinBox* self, const char* param1); struct miqt_string QSpinBox_Tr(const char* s); @@ -48,6 +84,11 @@ int QSpinBox_StepType(const QSpinBox* self); void QSpinBox_SetStepType(QSpinBox* self, int stepType); int QSpinBox_DisplayIntegerBase(const QSpinBox* self); void QSpinBox_SetDisplayIntegerBase(QSpinBox* self, int base); +bool QSpinBox_Event(QSpinBox* self, QEvent* event); +int QSpinBox_Validate(const QSpinBox* self, struct miqt_string input, int* pos); +int QSpinBox_ValueFromText(const QSpinBox* self, struct miqt_string text); +struct miqt_string QSpinBox_TextFromValue(const QSpinBox* self, int val); +void QSpinBox_Fixup(const QSpinBox* self, struct miqt_string str); void QSpinBox_SetValue(QSpinBox* self, int val); void QSpinBox_ValueChanged(QSpinBox* self, int param1); void QSpinBox_connect_ValueChanged(QSpinBox* self, intptr_t slot); @@ -55,10 +96,66 @@ void QSpinBox_TextChanged(QSpinBox* self, struct miqt_string param1); void QSpinBox_connect_TextChanged(QSpinBox* self, intptr_t slot); struct miqt_string QSpinBox_Tr2(const char* s, const char* c); struct miqt_string QSpinBox_Tr3(const char* s, const char* c, int n); -void QSpinBox_Delete(QSpinBox* self); +void QSpinBox_override_virtual_Event(void* self, intptr_t slot); +bool QSpinBox_virtualbase_Event(void* self, QEvent* event); +void QSpinBox_override_virtual_Validate(void* self, intptr_t slot); +int QSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot); +int QSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text); +void QSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot); +struct miqt_string QSpinBox_virtualbase_TextFromValue(const void* self, int val); +void QSpinBox_override_virtual_Fixup(void* self, intptr_t slot); +void QSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str); +void QSpinBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSpinBox_virtualbase_SizeHint(const void* self); +void QSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSpinBox_virtualbase_MinimumSizeHint(const void* self); +void QSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSpinBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QSpinBox_override_virtual_StepBy(void* self, intptr_t slot); +void QSpinBox_virtualbase_StepBy(void* self, int steps); +void QSpinBox_override_virtual_Clear(void* self, intptr_t slot); +void QSpinBox_virtualbase_Clear(void* self); +void QSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSpinBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSpinBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QSpinBox_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); +void QSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); +int QSpinBox_virtualbase_StepEnabled(const void* self); +void QSpinBox_Delete(QSpinBox* self, bool isSubclass); -QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent); -QDoubleSpinBox* QDoubleSpinBox_new2(); +void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self); void* QDoubleSpinBox_Metacast(QDoubleSpinBox* self, const char* param1); struct miqt_string QDoubleSpinBox_Tr(const char* s); @@ -90,7 +187,63 @@ void QDoubleSpinBox_TextChanged(QDoubleSpinBox* self, struct miqt_string param1) void QDoubleSpinBox_connect_TextChanged(QDoubleSpinBox* self, intptr_t slot); struct miqt_string QDoubleSpinBox_Tr2(const char* s, const char* c); struct miqt_string QDoubleSpinBox_Tr3(const char* s, const char* c, int n); -void QDoubleSpinBox_Delete(QDoubleSpinBox* self); +void QDoubleSpinBox_override_virtual_Validate(void* self, intptr_t slot); +int QDoubleSpinBox_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QDoubleSpinBox_override_virtual_ValueFromText(void* self, intptr_t slot); +double QDoubleSpinBox_virtualbase_ValueFromText(const void* self, struct miqt_string text); +void QDoubleSpinBox_override_virtual_TextFromValue(void* self, intptr_t slot); +struct miqt_string QDoubleSpinBox_virtualbase_TextFromValue(const void* self, double val); +void QDoubleSpinBox_override_virtual_Fixup(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_Fixup(const void* self, struct miqt_string str); +void QDoubleSpinBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QDoubleSpinBox_virtualbase_SizeHint(const void* self); +void QDoubleSpinBox_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QDoubleSpinBox_virtualbase_MinimumSizeHint(const void* self); +void QDoubleSpinBox_override_virtual_Event(void* self, intptr_t slot); +bool QDoubleSpinBox_virtualbase_Event(void* self, QEvent* event); +void QDoubleSpinBox_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QDoubleSpinBox_virtualbase_InputMethodQuery(const void* self, int param1); +void QDoubleSpinBox_override_virtual_StepBy(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_StepBy(void* self, int steps); +void QDoubleSpinBox_override_virtual_Clear(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_Clear(void* self); +void QDoubleSpinBox_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QDoubleSpinBox_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QDoubleSpinBox_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QDoubleSpinBox_override_virtual_WheelEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QDoubleSpinBox_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QDoubleSpinBox_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QDoubleSpinBox_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QDoubleSpinBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ChangeEvent(void* self, QEvent* event); +void QDoubleSpinBox_override_virtual_CloseEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QDoubleSpinBox_override_virtual_HideEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_HideEvent(void* self, QHideEvent* event); +void QDoubleSpinBox_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QDoubleSpinBox_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QDoubleSpinBox_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QDoubleSpinBox_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDoubleSpinBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QDoubleSpinBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QDoubleSpinBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QDoubleSpinBox_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); +void QDoubleSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); +int QDoubleSpinBox_virtualbase_StepEnabled(const void* self); +void QDoubleSpinBox_Delete(QDoubleSpinBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsplashscreen.cpp b/qt6/gen_qsplashscreen.cpp index 5b29dc09..d0e767c6 100644 --- a/qt6/gen_qsplashscreen.cpp +++ b/qt6/gen_qsplashscreen.cpp @@ -1,38 +1,1104 @@ +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qsplashscreen.h" #include "_cgo_export.h" -QSplashScreen* QSplashScreen_new() { - return new QSplashScreen(); +class MiqtVirtualQSplashScreen : public virtual QSplashScreen { +public: + + MiqtVirtualQSplashScreen(): QSplashScreen() {}; + MiqtVirtualQSplashScreen(QScreen* screen): QSplashScreen(screen) {}; + MiqtVirtualQSplashScreen(const QPixmap& pixmap): QSplashScreen(pixmap) {}; + MiqtVirtualQSplashScreen(const QPixmap& pixmap, Qt::WindowFlags f): QSplashScreen(pixmap, f) {}; + MiqtVirtualQSplashScreen(QScreen* screen, const QPixmap& pixmap): QSplashScreen(screen, pixmap) {}; + MiqtVirtualQSplashScreen(QScreen* screen, const QPixmap& pixmap, Qt::WindowFlags f): QSplashScreen(screen, pixmap, f) {}; + + virtual ~MiqtVirtualQSplashScreen() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QSplashScreen::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QSplashScreen_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QSplashScreen::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawContents = 0; + + // Subclass to allow providing a Go implementation + virtual void drawContents(QPainter* painter) override { + if (handle__DrawContents == 0) { + QSplashScreen::drawContents(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSplashScreen_DrawContents(this, handle__DrawContents, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawContents(QPainter* painter) { + + QSplashScreen::drawContents(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QSplashScreen::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplashScreen_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QSplashScreen::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSplashScreen::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSplashScreen_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSplashScreen::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QSplashScreen::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSplashScreen_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSplashScreen::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSplashScreen::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplashScreen_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSplashScreen::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSplashScreen::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplashScreen_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSplashScreen::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSplashScreen::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSplashScreen_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSplashScreen::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSplashScreen::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSplashScreen_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSplashScreen::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QSplashScreen::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSplashScreen_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSplashScreen::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QSplashScreen::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QSplashScreen::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QSplashScreen::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSplashScreen::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QSplashScreen::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QSplashScreen::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSplashScreen::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSplashScreen::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSplashScreen::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSplashScreen::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSplashScreen::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSplashScreen::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSplashScreen::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSplashScreen::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSplashScreen::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSplashScreen::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QSplashScreen::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QSplashScreen::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QSplashScreen::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSplashScreen::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QSplashScreen::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QSplashScreen::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QSplashScreen::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QSplashScreen::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QSplashScreen::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSplashScreen::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSplashScreen::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSplashScreen::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSplashScreen::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSplashScreen::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QSplashScreen::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSplashScreen::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QSplashScreen::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSplashScreen::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QSplashScreen::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSplashScreen::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QSplashScreen::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSplashScreen::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QSplashScreen::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSplashScreen::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QSplashScreen::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSplashScreen::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QSplashScreen::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSplashScreen::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QSplashScreen::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSplashScreen_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSplashScreen::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QSplashScreen::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QSplashScreen_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QSplashScreen::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSplashScreen::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSplashScreen_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSplashScreen::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSplashScreen::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSplashScreen_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QSplashScreen::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QSplashScreen::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSplashScreen_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSplashScreen::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QSplashScreen::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSplashScreen_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSplashScreen::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QSplashScreen::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSplashScreen_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSplashScreen::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QSplashScreen::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSplashScreen_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSplashScreen::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSplashScreen::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSplashScreen_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSplashScreen::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QSplashScreen::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSplashScreen_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSplashScreen::focusNextPrevChild(next); + + } + +}; + +void QSplashScreen_new(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new2(QScreen* screen) { - return new QSplashScreen(screen); +void QSplashScreen_new2(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new3(QPixmap* pixmap) { - return new QSplashScreen(*pixmap); +void QSplashScreen_new3(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new4(QPixmap* pixmap, int f) { - return new QSplashScreen(*pixmap, static_cast(f)); +void QSplashScreen_new4(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap, static_cast(f)); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new5(QScreen* screen, QPixmap* pixmap) { - return new QSplashScreen(screen, *pixmap); +void QSplashScreen_new5(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f) { - return new QSplashScreen(screen, *pixmap, static_cast(f)); +void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap, static_cast(f)); + *outptr_QSplashScreen = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self) { @@ -96,7 +1162,7 @@ void QSplashScreen_MessageChanged(QSplashScreen* self, struct miqt_string messag } void QSplashScreen_connect_MessageChanged(QSplashScreen* self, intptr_t slot) { - QSplashScreen::connect(self, static_cast(&QSplashScreen::messageChanged), self, [=](const QString& message) { + MiqtVirtualQSplashScreen::connect(self, static_cast(&QSplashScreen::messageChanged), self, [=](const QString& message) { const QString message_ret = message; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray message_b = message_ret.toUtf8(); @@ -141,7 +1207,347 @@ void QSplashScreen_ShowMessage3(QSplashScreen* self, struct miqt_string message, self->showMessage(message_QString, static_cast(alignment), *color); } -void QSplashScreen_Delete(QSplashScreen* self) { - delete self; +void QSplashScreen_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__Event = slot; +} + +bool QSplashScreen_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_Event(e); +} + +void QSplashScreen_override_virtual_DrawContents(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DrawContents = slot; +} + +void QSplashScreen_virtualbase_DrawContents(void* self, QPainter* painter) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DrawContents(painter); +} + +void QSplashScreen_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MousePressEvent = slot; +} + +void QSplashScreen_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QSplashScreen_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DevType = slot; +} + +int QSplashScreen_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_DevType(); +} + +void QSplashScreen_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__SetVisible = slot; +} + +void QSplashScreen_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_SetVisible(visible); +} + +void QSplashScreen_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__SizeHint = slot; +} + +QSize* QSplashScreen_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_SizeHint(); +} + +void QSplashScreen_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSplashScreen_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSplashScreen_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__HeightForWidth = slot; +} + +int QSplashScreen_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSplashScreen_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSplashScreen_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSplashScreen_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSplashScreen_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_PaintEngine(); +} + +void QSplashScreen_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSplashScreen_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QSplashScreen_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSplashScreen_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSplashScreen_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSplashScreen_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QSplashScreen_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__WheelEvent = slot; +} + +void QSplashScreen_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_WheelEvent(event); +} + +void QSplashScreen_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__KeyPressEvent = slot; +} + +void QSplashScreen_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSplashScreen_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSplashScreen_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSplashScreen_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__FocusInEvent = slot; +} + +void QSplashScreen_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSplashScreen_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__FocusOutEvent = slot; +} + +void QSplashScreen_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSplashScreen_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__EnterEvent = slot; +} + +void QSplashScreen_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_EnterEvent(event); +} + +void QSplashScreen_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__LeaveEvent = slot; +} + +void QSplashScreen_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSplashScreen_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__PaintEvent = slot; +} + +void QSplashScreen_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_PaintEvent(event); +} + +void QSplashScreen_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__MoveEvent = slot; +} + +void QSplashScreen_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_MoveEvent(event); +} + +void QSplashScreen_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ResizeEvent = slot; +} + +void QSplashScreen_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSplashScreen_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__CloseEvent = slot; +} + +void QSplashScreen_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_CloseEvent(event); +} + +void QSplashScreen_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSplashScreen_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSplashScreen_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__TabletEvent = slot; +} + +void QSplashScreen_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_TabletEvent(event); +} + +void QSplashScreen_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ActionEvent = slot; +} + +void QSplashScreen_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ActionEvent(event); +} + +void QSplashScreen_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DragEnterEvent = slot; +} + +void QSplashScreen_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSplashScreen_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DragMoveEvent = slot; +} + +void QSplashScreen_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSplashScreen_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSplashScreen_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSplashScreen_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__DropEvent = slot; +} + +void QSplashScreen_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_DropEvent(event); +} + +void QSplashScreen_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ShowEvent = slot; +} + +void QSplashScreen_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ShowEvent(event); +} + +void QSplashScreen_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__HideEvent = slot; +} + +void QSplashScreen_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_HideEvent(event); +} + +void QSplashScreen_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__NativeEvent = slot; +} + +bool QSplashScreen_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSplashScreen_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__ChangeEvent = slot; +} + +void QSplashScreen_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSplashScreen_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__Metric = slot; +} + +int QSplashScreen_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_Metric(param1); +} + +void QSplashScreen_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__InitPainter = slot; +} + +void QSplashScreen_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_InitPainter(painter); +} + +void QSplashScreen_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSplashScreen_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_Redirected(offset); +} + +void QSplashScreen_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSplashScreen_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_SharedPainter(); +} + +void QSplashScreen_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__InputMethodEvent = slot; +} + +void QSplashScreen_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSplashScreen_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSplashScreen_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSplashScreen*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSplashScreen_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSplashScreen*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSplashScreen_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSplashScreen*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSplashScreen_Delete(QSplashScreen* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsplashscreen.go b/qt6/gen_qsplashscreen.go index 380f9d82..5dcfbec8 100644 --- a/qt6/gen_qsplashscreen.go +++ b/qt6/gen_qsplashscreen.go @@ -15,7 +15,8 @@ import ( ) type QSplashScreen struct { - h *C.QSplashScreen + h *C.QSplashScreen + isSubclass bool *QWidget } @@ -33,51 +34,101 @@ func (this *QSplashScreen) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSplashScreen(h *C.QSplashScreen) *QSplashScreen { +// newQSplashScreen constructs the type using only CGO pointers. +func newQSplashScreen(h *C.QSplashScreen, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplashScreen { if h == nil { return nil } - return &QSplashScreen{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QSplashScreen{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSplashScreen(h unsafe.Pointer) *QSplashScreen { - return newQSplashScreen((*C.QSplashScreen)(h)) +// UnsafeNewQSplashScreen constructs the type using only unsafe pointers. +func UnsafeNewQSplashScreen(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplashScreen { + if h == nil { + return nil + } + + return &QSplashScreen{h: (*C.QSplashScreen)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSplashScreen constructs a new QSplashScreen object. func NewQSplashScreen() *QSplashScreen { - ret := C.QSplashScreen_new() - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new(&outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen2 constructs a new QSplashScreen object. func NewQSplashScreen2(screen *QScreen) *QSplashScreen { - ret := C.QSplashScreen_new2(screen.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new2(screen.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen3 constructs a new QSplashScreen object. func NewQSplashScreen3(pixmap *QPixmap) *QSplashScreen { - ret := C.QSplashScreen_new3(pixmap.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new3(pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen4 constructs a new QSplashScreen object. func NewQSplashScreen4(pixmap *QPixmap, f WindowType) *QSplashScreen { - ret := C.QSplashScreen_new4(pixmap.cPointer(), (C.int)(f)) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new4(pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen5 constructs a new QSplashScreen object. func NewQSplashScreen5(screen *QScreen, pixmap *QPixmap) *QSplashScreen { - ret := C.QSplashScreen_new5(screen.cPointer(), pixmap.cPointer()) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new5(screen.cPointer(), pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplashScreen6 constructs a new QSplashScreen object. func NewQSplashScreen6(screen *QScreen, pixmap *QPixmap, f WindowType) *QSplashScreen { - ret := C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer(), (C.int)(f)) - return newQSplashScreen(ret) + var outptr_QSplashScreen *C.QSplashScreen = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSplashScreen) MetaObject() *QMetaObject { @@ -105,7 +156,7 @@ func (this *QSplashScreen) SetPixmap(pixmap *QPixmap) { func (this *QSplashScreen) Pixmap() *QPixmap { _ret := C.QSplashScreen_Pixmap(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -202,9 +253,998 @@ func (this *QSplashScreen) ShowMessage3(message string, alignment int, color *QC C.QSplashScreen_ShowMessage3(this.h, message_ms, (C.int)(alignment), color.cPointer()) } +func (this *QSplashScreen) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QSplashScreen_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QSplashScreen) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QSplashScreen_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_Event +func miqt_exec_callback_QSplashScreen_Event(self *C.QSplashScreen, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_DrawContents(painter *QPainter) { + + C.QSplashScreen_virtualbase_DrawContents(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSplashScreen) OnDrawContents(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSplashScreen_override_virtual_DrawContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DrawContents +func miqt_exec_callback_QSplashScreen_DrawContents(self *C.QSplashScreen, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DrawContents, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QSplashScreen_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplashScreen) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplashScreen_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MousePressEvent +func miqt_exec_callback_QSplashScreen_MousePressEvent(self *C.QSplashScreen, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DevType() int { + + return (int)(C.QSplashScreen_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSplashScreen) OnDevType(slot func(super func() int) int) { + C.QSplashScreen_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DevType +func miqt_exec_callback_QSplashScreen_DevType(self *C.QSplashScreen, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_SetVisible(visible bool) { + + C.QSplashScreen_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSplashScreen) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSplashScreen_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_SetVisible +func miqt_exec_callback_QSplashScreen_SetVisible(self *C.QSplashScreen, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSplashScreen_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplashScreen) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplashScreen_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_SizeHint +func miqt_exec_callback_QSplashScreen_SizeHint(self *C.QSplashScreen, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSplashScreen_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplashScreen) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplashScreen_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MinimumSizeHint +func miqt_exec_callback_QSplashScreen_MinimumSizeHint(self *C.QSplashScreen, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSplashScreen_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplashScreen) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSplashScreen_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_HeightForWidth +func miqt_exec_callback_QSplashScreen_HeightForWidth(self *C.QSplashScreen, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSplashScreen_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSplashScreen) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSplashScreen_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_HasHeightForWidth +func miqt_exec_callback_QSplashScreen_HasHeightForWidth(self *C.QSplashScreen, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QSplashScreen_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSplashScreen) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QSplashScreen_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_PaintEngine +func miqt_exec_callback_QSplashScreen_PaintEngine(self *C.QSplashScreen, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QSplashScreen_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplashScreen_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MouseReleaseEvent +func miqt_exec_callback_QSplashScreen_MouseReleaseEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QSplashScreen_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplashScreen_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent +func miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QSplashScreen_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplashScreen_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MouseMoveEvent +func miqt_exec_callback_QSplashScreen_MouseMoveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSplashScreen_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSplashScreen_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_WheelEvent +func miqt_exec_callback_QSplashScreen_WheelEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSplashScreen_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplashScreen_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_KeyPressEvent +func miqt_exec_callback_QSplashScreen_KeyPressEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSplashScreen_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplashScreen_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_KeyReleaseEvent +func miqt_exec_callback_QSplashScreen_KeyReleaseEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSplashScreen_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplashScreen_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_FocusInEvent +func miqt_exec_callback_QSplashScreen_FocusInEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSplashScreen_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplashScreen_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_FocusOutEvent +func miqt_exec_callback_QSplashScreen_FocusOutEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QSplashScreen_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QSplashScreen_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_EnterEvent +func miqt_exec_callback_QSplashScreen_EnterEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QSplashScreen_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSplashScreen_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_LeaveEvent +func miqt_exec_callback_QSplashScreen_LeaveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QSplashScreen_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QSplashScreen_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_PaintEvent +func miqt_exec_callback_QSplashScreen_PaintEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QSplashScreen_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QSplashScreen_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_MoveEvent +func miqt_exec_callback_QSplashScreen_MoveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QSplashScreen_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QSplashScreen_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ResizeEvent +func miqt_exec_callback_QSplashScreen_ResizeEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSplashScreen_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSplashScreen_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_CloseEvent +func miqt_exec_callback_QSplashScreen_CloseEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSplashScreen_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSplashScreen_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ContextMenuEvent +func miqt_exec_callback_QSplashScreen_ContextMenuEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QSplashScreen_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QSplashScreen_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_TabletEvent +func miqt_exec_callback_QSplashScreen_TabletEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QSplashScreen_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QSplashScreen_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ActionEvent +func miqt_exec_callback_QSplashScreen_ActionEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QSplashScreen_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QSplashScreen_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DragEnterEvent +func miqt_exec_callback_QSplashScreen_DragEnterEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QSplashScreen_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QSplashScreen_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DragMoveEvent +func miqt_exec_callback_QSplashScreen_DragMoveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QSplashScreen_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QSplashScreen_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DragLeaveEvent +func miqt_exec_callback_QSplashScreen_DragLeaveEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QSplashScreen_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QSplashScreen_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_DropEvent +func miqt_exec_callback_QSplashScreen_DropEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QSplashScreen_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QSplashScreen_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ShowEvent +func miqt_exec_callback_QSplashScreen_ShowEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QSplashScreen_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplashScreen) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QSplashScreen_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_HideEvent +func miqt_exec_callback_QSplashScreen_HideEvent(self *C.QSplashScreen, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QSplashScreen_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QSplashScreen) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QSplashScreen_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_NativeEvent +func miqt_exec_callback_QSplashScreen_NativeEvent(self *C.QSplashScreen, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSplashScreen_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplashScreen) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSplashScreen_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_ChangeEvent +func miqt_exec_callback_QSplashScreen_ChangeEvent(self *C.QSplashScreen, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSplashScreen_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplashScreen) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QSplashScreen_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_Metric +func miqt_exec_callback_QSplashScreen_Metric(self *C.QSplashScreen, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplashScreen) callVirtualBase_InitPainter(painter *QPainter) { + + C.QSplashScreen_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSplashScreen) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSplashScreen_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_InitPainter +func miqt_exec_callback_QSplashScreen_InitPainter(self *C.QSplashScreen, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QSplashScreen_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QSplashScreen) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QSplashScreen_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_Redirected +func miqt_exec_callback_QSplashScreen_Redirected(self *C.QSplashScreen, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QSplashScreen_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSplashScreen) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QSplashScreen_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_SharedPainter +func miqt_exec_callback_QSplashScreen_SharedPainter(self *C.QSplashScreen, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QSplashScreen_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplashScreen) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QSplashScreen_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_InputMethodEvent +func miqt_exec_callback_QSplashScreen_InputMethodEvent(self *C.QSplashScreen, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplashScreen{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSplashScreen) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSplashScreen_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplashScreen) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSplashScreen_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_InputMethodQuery +func miqt_exec_callback_QSplashScreen_InputMethodQuery(self *C.QSplashScreen, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplashScreen) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSplashScreen_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSplashScreen) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSplashScreen_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplashScreen_FocusNextPrevChild +func miqt_exec_callback_QSplashScreen_FocusNextPrevChild(self *C.QSplashScreen, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSplashScreen) Delete() { - C.QSplashScreen_Delete(this.h) + C.QSplashScreen_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsplashscreen.h b/qt6/gen_qsplashscreen.h index a24cfa8d..b1755a1d 100644 --- a/qt6/gen_qsplashscreen.h +++ b/qt6/gen_qsplashscreen.h @@ -15,27 +15,83 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPixmap; +class QPoint; +class QResizeEvent; class QScreen; +class QShowEvent; +class QSize; class QSplashScreen; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; typedef struct QScreen QScreen; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QSplashScreen QSplashScreen; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSplashScreen* QSplashScreen_new(); -QSplashScreen* QSplashScreen_new2(QScreen* screen); -QSplashScreen* QSplashScreen_new3(QPixmap* pixmap); -QSplashScreen* QSplashScreen_new4(QPixmap* pixmap, int f); -QSplashScreen* QSplashScreen_new5(QScreen* screen, QPixmap* pixmap); -QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f); +void QSplashScreen_new(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new2(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new3(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new4(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new5(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self); void* QSplashScreen_Metacast(QSplashScreen* self, const char* param1); struct miqt_string QSplashScreen_Tr(const char* s); @@ -48,11 +104,98 @@ void QSplashScreen_ShowMessage(QSplashScreen* self, struct miqt_string message); void QSplashScreen_ClearMessage(QSplashScreen* self); void QSplashScreen_MessageChanged(QSplashScreen* self, struct miqt_string message); void QSplashScreen_connect_MessageChanged(QSplashScreen* self, intptr_t slot); +bool QSplashScreen_Event(QSplashScreen* self, QEvent* e); +void QSplashScreen_DrawContents(QSplashScreen* self, QPainter* painter); +void QSplashScreen_MousePressEvent(QSplashScreen* self, QMouseEvent* param1); struct miqt_string QSplashScreen_Tr2(const char* s, const char* c); struct miqt_string QSplashScreen_Tr3(const char* s, const char* c, int n); void QSplashScreen_ShowMessage2(QSplashScreen* self, struct miqt_string message, int alignment); void QSplashScreen_ShowMessage3(QSplashScreen* self, struct miqt_string message, int alignment, QColor* color); -void QSplashScreen_Delete(QSplashScreen* self); +void QSplashScreen_override_virtual_Event(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_Event(void* self, QEvent* e); +void QSplashScreen_override_virtual_DrawContents(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DrawContents(void* self, QPainter* painter); +void QSplashScreen_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QSplashScreen_override_virtual_DevType(void* self, intptr_t slot); +int QSplashScreen_virtualbase_DevType(const void* self); +void QSplashScreen_override_virtual_SetVisible(void* self, intptr_t slot); +void QSplashScreen_virtualbase_SetVisible(void* self, bool visible); +void QSplashScreen_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSplashScreen_virtualbase_SizeHint(const void* self); +void QSplashScreen_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSplashScreen_virtualbase_MinimumSizeHint(const void* self); +void QSplashScreen_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSplashScreen_virtualbase_HeightForWidth(const void* self, int param1); +void QSplashScreen_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_HasHeightForWidth(const void* self); +void QSplashScreen_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSplashScreen_virtualbase_PaintEngine(const void* self); +void QSplashScreen_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QSplashScreen_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSplashScreen_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QSplashScreen_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSplashScreen_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSplashScreen_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSplashScreen_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSplashScreen_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSplashScreen_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QSplashScreen_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSplashScreen_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QSplashScreen_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QSplashScreen_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSplashScreen_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSplashScreen_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSplashScreen_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSplashScreen_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSplashScreen_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSplashScreen_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSplashScreen_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSplashScreen_override_virtual_DropEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSplashScreen_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSplashScreen_override_virtual_HideEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSplashScreen_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QSplashScreen_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSplashScreen_override_virtual_Metric(void* self, intptr_t slot); +int QSplashScreen_virtualbase_Metric(const void* self, int param1); +void QSplashScreen_override_virtual_InitPainter(void* self, intptr_t slot); +void QSplashScreen_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSplashScreen_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSplashScreen_virtualbase_Redirected(const void* self, QPoint* offset); +void QSplashScreen_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSplashScreen_virtualbase_SharedPainter(const void* self); +void QSplashScreen_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSplashScreen_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSplashScreen_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSplashScreen_virtualbase_InputMethodQuery(const void* self, int param1); +void QSplashScreen_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSplashScreen_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSplashScreen_Delete(QSplashScreen* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsplitter.cpp b/qt6/gen_qsplitter.cpp index 2478a886..9a07802a 100644 --- a/qt6/gen_qsplitter.cpp +++ b/qt6/gen_qsplitter.cpp @@ -1,31 +1,301 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include +#include #include #include #include "gen_qsplitter.h" #include "_cgo_export.h" -QSplitter* QSplitter_new(QWidget* parent) { - return new QSplitter(parent); +class MiqtVirtualQSplitter : public virtual QSplitter { +public: + + MiqtVirtualQSplitter(QWidget* parent): QSplitter(parent) {}; + MiqtVirtualQSplitter(): QSplitter() {}; + MiqtVirtualQSplitter(Qt::Orientation param1): QSplitter(param1) {}; + MiqtVirtualQSplitter(Qt::Orientation param1, QWidget* parent): QSplitter(param1, parent) {}; + + virtual ~MiqtVirtualQSplitter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSplitter::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitter_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSplitter::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSplitter::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitter_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSplitter::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateHandle = 0; + + // Subclass to allow providing a Go implementation + virtual QSplitterHandle* createHandle() override { + if (handle__CreateHandle == 0) { + return QSplitter::createHandle(); + } + + + QSplitterHandle* callback_return_value = miqt_exec_callback_QSplitter_CreateHandle(this, handle__CreateHandle); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSplitterHandle* virtualbase_CreateHandle() { + + return QSplitter::createHandle(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* param1) override { + if (handle__ChildEvent == 0) { + QSplitter::childEvent(param1); + return; + } + + QChildEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* param1) { + + QSplitter::childEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSplitter::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSplitter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSplitter::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QSplitter::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QSplitter::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSplitter::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSplitter::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QSplitter::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QSplitter_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QSplitter::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QSplitter::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QSplitter_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QSplitter::initStyleOption(option); + + } + +}; + +void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(parent); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplitter* QSplitter_new2() { - return new QSplitter(); +void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplitter* QSplitter_new3(int param1) { - return new QSplitter(static_cast(param1)); +void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1)); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QSplitter* QSplitter_new4(int param1, QWidget* parent) { - return new QSplitter(static_cast(param1), parent); +void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1), parent); + *outptr_QSplitter = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QSplitter_MetaObject(const QSplitter* self) { @@ -178,7 +448,7 @@ void QSplitter_SplitterMoved(QSplitter* self, int pos, int index) { } void QSplitter_connect_SplitterMoved(QSplitter* self, intptr_t slot) { - QSplitter::connect(self, static_cast(&QSplitter::splitterMoved), self, [=](int pos, int index) { + MiqtVirtualQSplitter::connect(self, static_cast(&QSplitter::splitterMoved), self, [=](int pos, int index) { int sigval1 = pos; int sigval2 = index; miqt_exec_callback_QSplitter_SplitterMoved(slot, sigval1, sigval2); @@ -211,77 +481,1474 @@ void QSplitter_SetOpaqueResize1(QSplitter* self, bool opaque) { self->setOpaqueResize(opaque); } -void QSplitter_Delete(QSplitter* self) { - delete self; +void QSplitter_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__SizeHint = slot; } -QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent) { - return new QSplitterHandle(static_cast(o), parent); +QSize* QSplitter_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSplitter*)(self) )->virtualbase_SizeHint(); } -QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self) { - return (QMetaObject*) self->metaObject(); +void QSplitter_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__MinimumSizeHint = slot; } -void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1) { - return self->qt_metacast(param1); +QSize* QSplitter_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSplitter*)(self) )->virtualbase_MinimumSizeHint(); } -struct miqt_string QSplitterHandle_Tr(const char* s) { - QString _ret = QSplitterHandle::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_override_virtual_CreateHandle(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__CreateHandle = slot; } -void QSplitterHandle_SetOrientation(QSplitterHandle* self, int o) { - self->setOrientation(static_cast(o)); +QSplitterHandle* QSplitter_virtualbase_CreateHandle(void* self) { + return ( (MiqtVirtualQSplitter*)(self) )->virtualbase_CreateHandle(); } -int QSplitterHandle_Orientation(const QSplitterHandle* self) { - Qt::Orientation _ret = self->orientation(); - return static_cast(_ret); +void QSplitter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__ChildEvent = slot; } -bool QSplitterHandle_OpaqueResize(const QSplitterHandle* self) { - return self->opaqueResize(); +void QSplitter_virtualbase_ChildEvent(void* self, QChildEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_ChildEvent(param1); } -QSplitter* QSplitterHandle_Splitter(const QSplitterHandle* self) { - return self->splitter(); +void QSplitter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__Event = slot; } -QSize* QSplitterHandle_SizeHint(const QSplitterHandle* self) { - return new QSize(self->sizeHint()); +bool QSplitter_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSplitter*)(self) )->virtualbase_Event(param1); } -struct miqt_string QSplitterHandle_Tr2(const char* s, const char* c) { - QString _ret = QSplitterHandle::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__ResizeEvent = slot; } -struct miqt_string QSplitterHandle_Tr3(const char* s, const char* c, int n) { - QString _ret = QSplitterHandle::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QSplitter_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QSplitter_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__ChangeEvent = slot; +} + +void QSplitter_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSplitter_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__PaintEvent = slot; +} + +void QSplitter_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQSplitter*)(self) )->virtualbase_PaintEvent(param1); +} + +void QSplitter_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QSplitter*)(self) )->handle__InitStyleOption = slot; +} + +void QSplitter_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQSplitter*)(self) )->virtualbase_InitStyleOption(option); +} + +void QSplitter_Delete(QSplitter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QSplitterHandle_Delete(QSplitterHandle* self) { - delete self; +class MiqtVirtualQSplitterHandle : public virtual QSplitterHandle { +public: + + MiqtVirtualQSplitterHandle(Qt::Orientation o, QSplitter* parent): QSplitterHandle(o, parent) {}; + + virtual ~MiqtVirtualQSplitterHandle() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QSplitterHandle::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitterHandle_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSplitterHandle::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QSplitterHandle::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QSplitterHandle::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QSplitterHandle::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QSplitterHandle::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QSplitterHandle::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QSplitterHandle::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QSplitterHandle::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QSplitterHandle::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QSplitterHandle::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QSplitterHandle::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QSplitterHandle::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QSplitterHandle::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSplitterHandle::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSplitterHandle_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSplitterHandle::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QSplitterHandle::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSplitterHandle_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSplitterHandle::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSplitterHandle::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSplitterHandle_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSplitterHandle::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QSplitterHandle::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSplitterHandle_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QSplitterHandle::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QSplitterHandle::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSplitterHandle::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QSplitterHandle::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSplitterHandle_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSplitterHandle::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QSplitterHandle::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSplitterHandle::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSplitterHandle::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSplitterHandle::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSplitterHandle::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSplitterHandle::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QSplitterHandle::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSplitterHandle::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSplitterHandle::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSplitterHandle::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QSplitterHandle::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSplitterHandle::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QSplitterHandle::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QSplitterHandle::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QSplitterHandle::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSplitterHandle::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QSplitterHandle::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QSplitterHandle::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QSplitterHandle::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSplitterHandle::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QSplitterHandle::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSplitterHandle::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QSplitterHandle::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSplitterHandle::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QSplitterHandle::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSplitterHandle::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QSplitterHandle::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSplitterHandle::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QSplitterHandle::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSplitterHandle::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QSplitterHandle::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSplitterHandle::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QSplitterHandle::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSplitterHandle::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QSplitterHandle::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSplitterHandle::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QSplitterHandle::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSplitterHandle_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSplitterHandle::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QSplitterHandle::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QSplitterHandle::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSplitterHandle::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSplitterHandle::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSplitterHandle::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSplitterHandle_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QSplitterHandle::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QSplitterHandle::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSplitterHandle_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSplitterHandle::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QSplitterHandle::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSplitterHandle_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSplitterHandle::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QSplitterHandle::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSplitterHandle_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSplitterHandle::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QSplitterHandle::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSplitterHandle_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSplitterHandle::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QSplitterHandle::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSplitterHandle_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QSplitterHandle::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QSplitterHandle::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSplitterHandle_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSplitterHandle::focusNextPrevChild(next); + + } + +}; + +void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSplitterHandle* ret = new MiqtVirtualQSplitterHandle(static_cast(o), parent); + *outptr_QSplitterHandle = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSplitterHandle_Tr(const char* s) { + QString _ret = QSplitterHandle::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSplitterHandle_SetOrientation(QSplitterHandle* self, int o) { + self->setOrientation(static_cast(o)); +} + +int QSplitterHandle_Orientation(const QSplitterHandle* self) { + Qt::Orientation _ret = self->orientation(); + return static_cast(_ret); +} + +bool QSplitterHandle_OpaqueResize(const QSplitterHandle* self) { + return self->opaqueResize(); +} + +QSplitter* QSplitterHandle_Splitter(const QSplitterHandle* self) { + return self->splitter(); +} + +QSize* QSplitterHandle_SizeHint(const QSplitterHandle* self) { + return new QSize(self->sizeHint()); +} + +struct miqt_string QSplitterHandle_Tr2(const char* s, const char* c) { + QString _ret = QSplitterHandle::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSplitterHandle_Tr3(const char* s, const char* c, int n) { + QString _ret = QSplitterHandle::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSplitterHandle_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__SizeHint = slot; +} + +QSize* QSplitterHandle_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_SizeHint(); +} + +void QSplitterHandle_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__PaintEvent = slot; +} + +void QSplitterHandle_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_PaintEvent(param1); +} + +void QSplitterHandle_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSplitterHandle_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QSplitterHandle_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MousePressEvent = slot; +} + +void QSplitterHandle_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QSplitterHandle_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSplitterHandle_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QSplitterHandle_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ResizeEvent = slot; +} + +void QSplitterHandle_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QSplitterHandle_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__Event = slot; +} + +bool QSplitterHandle_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_Event(param1); +} + +void QSplitterHandle_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DevType = slot; +} + +int QSplitterHandle_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DevType(); +} + +void QSplitterHandle_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__SetVisible = slot; +} + +void QSplitterHandle_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_SetVisible(visible); +} + +void QSplitterHandle_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSplitterHandle_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSplitterHandle_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__HeightForWidth = slot; +} + +int QSplitterHandle_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSplitterHandle_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSplitterHandle_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSplitterHandle_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSplitterHandle_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_PaintEngine(); +} + +void QSplitterHandle_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSplitterHandle_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSplitterHandle_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__WheelEvent = slot; +} + +void QSplitterHandle_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_WheelEvent(event); +} + +void QSplitterHandle_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__KeyPressEvent = slot; +} + +void QSplitterHandle_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSplitterHandle_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSplitterHandle_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSplitterHandle_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__FocusInEvent = slot; +} + +void QSplitterHandle_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSplitterHandle_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__FocusOutEvent = slot; +} + +void QSplitterHandle_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSplitterHandle_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__EnterEvent = slot; +} + +void QSplitterHandle_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_EnterEvent(event); +} + +void QSplitterHandle_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__LeaveEvent = slot; +} + +void QSplitterHandle_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSplitterHandle_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__MoveEvent = slot; +} + +void QSplitterHandle_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_MoveEvent(event); +} + +void QSplitterHandle_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__CloseEvent = slot; +} + +void QSplitterHandle_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_CloseEvent(event); +} + +void QSplitterHandle_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSplitterHandle_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSplitterHandle_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__TabletEvent = slot; +} + +void QSplitterHandle_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_TabletEvent(event); +} + +void QSplitterHandle_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ActionEvent = slot; +} + +void QSplitterHandle_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ActionEvent(event); +} + +void QSplitterHandle_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DragEnterEvent = slot; +} + +void QSplitterHandle_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSplitterHandle_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DragMoveEvent = slot; +} + +void QSplitterHandle_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSplitterHandle_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSplitterHandle_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSplitterHandle_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__DropEvent = slot; +} + +void QSplitterHandle_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_DropEvent(event); +} + +void QSplitterHandle_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ShowEvent = slot; +} + +void QSplitterHandle_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ShowEvent(event); +} + +void QSplitterHandle_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__HideEvent = slot; +} + +void QSplitterHandle_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_HideEvent(event); +} + +void QSplitterHandle_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__NativeEvent = slot; +} + +bool QSplitterHandle_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSplitterHandle_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__ChangeEvent = slot; +} + +void QSplitterHandle_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSplitterHandle_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__Metric = slot; +} + +int QSplitterHandle_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_Metric(param1); +} + +void QSplitterHandle_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__InitPainter = slot; +} + +void QSplitterHandle_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_InitPainter(painter); +} + +void QSplitterHandle_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSplitterHandle_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_Redirected(offset); +} + +void QSplitterHandle_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSplitterHandle_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_SharedPainter(); +} + +void QSplitterHandle_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__InputMethodEvent = slot; +} + +void QSplitterHandle_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSplitterHandle_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSplitterHandle_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSplitterHandle*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSplitterHandle_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSplitterHandle*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSplitterHandle_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSplitterHandle*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSplitterHandle_Delete(QSplitterHandle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsplitter.go b/qt6/gen_qsplitter.go index 0521ff45..d995e7eb 100644 --- a/qt6/gen_qsplitter.go +++ b/qt6/gen_qsplitter.go @@ -15,7 +15,8 @@ import ( ) type QSplitter struct { - h *C.QSplitter + h *C.QSplitter + isSubclass bool *QFrame } @@ -33,39 +34,79 @@ func (this *QSplitter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSplitter(h *C.QSplitter) *QSplitter { +// newQSplitter constructs the type using only CGO pointers. +func newQSplitter(h *C.QSplitter, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitter { if h == nil { return nil } - return &QSplitter{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QSplitter{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSplitter(h unsafe.Pointer) *QSplitter { - return newQSplitter((*C.QSplitter)(h)) +// UnsafeNewQSplitter constructs the type using only unsafe pointers. +func UnsafeNewQSplitter(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitter { + if h == nil { + return nil + } + + return &QSplitter{h: (*C.QSplitter)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSplitter constructs a new QSplitter object. func NewQSplitter(parent *QWidget) *QSplitter { - ret := C.QSplitter_new(parent.cPointer()) - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new(parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplitter2 constructs a new QSplitter object. func NewQSplitter2() *QSplitter { - ret := C.QSplitter_new2() - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new2(&outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplitter3 constructs a new QSplitter object. func NewQSplitter3(param1 Orientation) *QSplitter { - ret := C.QSplitter_new3((C.int)(param1)) - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new3((C.int)(param1), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQSplitter4 constructs a new QSplitter object. func NewQSplitter4(param1 Orientation, parent *QWidget) *QSplitter { - ret := C.QSplitter_new4((C.int)(param1), parent.cPointer()) - return newQSplitter(ret) + var outptr_QSplitter *C.QSplitter = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitter_new4((C.int)(param1), parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSplitter) MetaObject() *QMetaObject { @@ -96,7 +137,7 @@ func (this *QSplitter) InsertWidget(index int, widget *QWidget) { } func (this *QSplitter) ReplaceWidget(index int, widget *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer())), nil, nil) } func (this *QSplitter) SetOrientation(orientation Orientation) { @@ -196,7 +237,7 @@ func (this *QSplitter) IndexOf(w *QWidget) int { } func (this *QSplitter) Widget(index int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_Widget(this.h, (C.int)(index)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QSplitter_Widget(this.h, (C.int)(index))), nil, nil) } func (this *QSplitter) Count() int { @@ -208,7 +249,7 @@ func (this *QSplitter) GetRange(index int, param2 *int, param3 *int) { } func (this *QSplitter) Handle(index int) *QSplitterHandle { - return UnsafeNewQSplitterHandle(unsafe.Pointer(C.QSplitter_Handle(this.h, (C.int)(index)))) + return UnsafeNewQSplitterHandle(unsafe.Pointer(C.QSplitter_Handle(this.h, (C.int)(index))), nil, nil, nil) } func (this *QSplitter) SetStretchFactor(index int, stretch int) { @@ -263,9 +304,220 @@ func (this *QSplitter) SetOpaqueResize1(opaque bool) { C.QSplitter_SetOpaqueResize1(this.h, (C.bool)(opaque)) } +func (this *QSplitter) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSplitter_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitter) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitter_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_SizeHint +func miqt_exec_callback_QSplitter_SizeHint(self *C.QSplitter, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitter) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSplitter_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitter) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitter_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_MinimumSizeHint +func miqt_exec_callback_QSplitter_MinimumSizeHint(self *C.QSplitter, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitter) callVirtualBase_CreateHandle() *QSplitterHandle { + + return UnsafeNewQSplitterHandle(unsafe.Pointer(C.QSplitter_virtualbase_CreateHandle(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QSplitter) OnCreateHandle(slot func(super func() *QSplitterHandle) *QSplitterHandle) { + C.QSplitter_override_virtual_CreateHandle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_CreateHandle +func miqt_exec_callback_QSplitter_CreateHandle(self *C.QSplitter, cb C.intptr_t) *C.QSplitterHandle { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSplitterHandle) *QSplitterHandle) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_CreateHandle) + + return virtualReturn.cPointer() + +} + +func (this *QSplitter) callVirtualBase_ChildEvent(param1 *QChildEvent) { + + C.QSplitter_virtualbase_ChildEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnChildEvent(slot func(super func(param1 *QChildEvent), param1 *QChildEvent)) { + C.QSplitter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_ChildEvent +func miqt_exec_callback_QSplitter_ChildEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QChildEvent), param1 *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSplitter_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSplitter) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSplitter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_Event +func miqt_exec_callback_QSplitter_Event(self *C.QSplitter, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSplitter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitter) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QSplitter_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QSplitter_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_ResizeEvent +func miqt_exec_callback_QSplitter_ResizeEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSplitter_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSplitter_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_ChangeEvent +func miqt_exec_callback_QSplitter_ChangeEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSplitter{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QSplitter_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitter) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QSplitter_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_PaintEvent +func miqt_exec_callback_QSplitter_PaintEvent(self *C.QSplitter, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSplitter) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QSplitter_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QSplitter) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QSplitter_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitter_InitStyleOption +func miqt_exec_callback_QSplitter_InitStyleOption(self *C.QSplitter, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QSplitter{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QSplitter) Delete() { - C.QSplitter_Delete(this.h) + C.QSplitter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -278,7 +530,8 @@ func (this *QSplitter) GoGC() { } type QSplitterHandle struct { - h *C.QSplitterHandle + h *C.QSplitterHandle + isSubclass bool *QWidget } @@ -296,21 +549,36 @@ func (this *QSplitterHandle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSplitterHandle(h *C.QSplitterHandle) *QSplitterHandle { +// newQSplitterHandle constructs the type using only CGO pointers. +func newQSplitterHandle(h *C.QSplitterHandle, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitterHandle { if h == nil { return nil } - return &QSplitterHandle{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QSplitterHandle{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQSplitterHandle(h unsafe.Pointer) *QSplitterHandle { - return newQSplitterHandle((*C.QSplitterHandle)(h)) +// UnsafeNewQSplitterHandle constructs the type using only unsafe pointers. +func UnsafeNewQSplitterHandle(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitterHandle { + if h == nil { + return nil + } + + return &QSplitterHandle{h: (*C.QSplitterHandle)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQSplitterHandle constructs a new QSplitterHandle object. func NewQSplitterHandle(o Orientation, parent *QSplitter) *QSplitterHandle { - ret := C.QSplitterHandle_new((C.int)(o), parent.cPointer()) - return newQSplitterHandle(ret) + var outptr_QSplitterHandle *C.QSplitterHandle = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSplitterHandle_new((C.int)(o), parent.cPointer(), &outptr_QSplitterHandle, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSplitterHandle(outptr_QSplitterHandle, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QSplitterHandle) MetaObject() *QMetaObject { @@ -345,7 +613,7 @@ func (this *QSplitterHandle) OpaqueResize() bool { } func (this *QSplitterHandle) Splitter() *QSplitter { - return UnsafeNewQSplitter(unsafe.Pointer(C.QSplitterHandle_Splitter(this.h))) + return UnsafeNewQSplitter(unsafe.Pointer(C.QSplitterHandle_Splitter(this.h)), nil, nil, nil, nil) } func (this *QSplitterHandle) SizeHint() *QSize { @@ -377,9 +645,975 @@ func QSplitterHandle_Tr3(s string, c string, n int) string { return _ret } +func (this *QSplitterHandle) callVirtualBase_SizeHint() *QSize { + + _ret := C.QSplitterHandle_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitterHandle) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitterHandle_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_SizeHint +func miqt_exec_callback_QSplitterHandle_SizeHint(self *C.QSplitterHandle, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QSplitterHandle_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QSplitterHandle_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_PaintEvent +func miqt_exec_callback_QSplitterHandle_PaintEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MouseMoveEvent +func miqt_exec_callback_QSplitterHandle_MouseMoveEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MousePressEvent +func miqt_exec_callback_QSplitterHandle_MousePressEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MouseReleaseEvent +func miqt_exec_callback_QSplitterHandle_MouseReleaseEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QSplitterHandle_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QSplitterHandle_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ResizeEvent +func miqt_exec_callback_QSplitterHandle_ResizeEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QSplitterHandle_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QSplitterHandle) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QSplitterHandle_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_Event +func miqt_exec_callback_QSplitterHandle_Event(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_DevType() int { + + return (int)(C.QSplitterHandle_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSplitterHandle) OnDevType(slot func(super func() int) int) { + C.QSplitterHandle_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DevType +func miqt_exec_callback_QSplitterHandle_DevType(self *C.QSplitterHandle, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_SetVisible(visible bool) { + + C.QSplitterHandle_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSplitterHandle) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSplitterHandle_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_SetVisible +func miqt_exec_callback_QSplitterHandle_SetVisible(self *C.QSplitterHandle, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QSplitterHandle_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitterHandle) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QSplitterHandle_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MinimumSizeHint +func miqt_exec_callback_QSplitterHandle_MinimumSizeHint(self *C.QSplitterHandle, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSplitterHandle_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplitterHandle) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSplitterHandle_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_HeightForWidth +func miqt_exec_callback_QSplitterHandle_HeightForWidth(self *C.QSplitterHandle, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSplitterHandle_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSplitterHandle) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSplitterHandle_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_HasHeightForWidth +func miqt_exec_callback_QSplitterHandle_HasHeightForWidth(self *C.QSplitterHandle, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QSplitterHandle_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSplitterHandle) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QSplitterHandle_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_PaintEngine +func miqt_exec_callback_QSplitterHandle_PaintEngine(self *C.QSplitterHandle, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QSplitterHandle_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QSplitterHandle_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent +func miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QSplitterHandle_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QSplitterHandle_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_WheelEvent +func miqt_exec_callback_QSplitterHandle_WheelEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QSplitterHandle_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplitterHandle_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_KeyPressEvent +func miqt_exec_callback_QSplitterHandle_KeyPressEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QSplitterHandle_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QSplitterHandle_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_KeyReleaseEvent +func miqt_exec_callback_QSplitterHandle_KeyReleaseEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QSplitterHandle_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplitterHandle_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_FocusInEvent +func miqt_exec_callback_QSplitterHandle_FocusInEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QSplitterHandle_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QSplitterHandle_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_FocusOutEvent +func miqt_exec_callback_QSplitterHandle_FocusOutEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QSplitterHandle_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QSplitterHandle_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_EnterEvent +func miqt_exec_callback_QSplitterHandle_EnterEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QSplitterHandle_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSplitterHandle_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_LeaveEvent +func miqt_exec_callback_QSplitterHandle_LeaveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QSplitterHandle_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QSplitterHandle_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_MoveEvent +func miqt_exec_callback_QSplitterHandle_MoveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QSplitterHandle_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QSplitterHandle_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_CloseEvent +func miqt_exec_callback_QSplitterHandle_CloseEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QSplitterHandle_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QSplitterHandle_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ContextMenuEvent +func miqt_exec_callback_QSplitterHandle_ContextMenuEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QSplitterHandle_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QSplitterHandle_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_TabletEvent +func miqt_exec_callback_QSplitterHandle_TabletEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QSplitterHandle_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QSplitterHandle_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ActionEvent +func miqt_exec_callback_QSplitterHandle_ActionEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QSplitterHandle_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QSplitterHandle_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DragEnterEvent +func miqt_exec_callback_QSplitterHandle_DragEnterEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QSplitterHandle_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QSplitterHandle_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DragMoveEvent +func miqt_exec_callback_QSplitterHandle_DragMoveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QSplitterHandle_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QSplitterHandle_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DragLeaveEvent +func miqt_exec_callback_QSplitterHandle_DragLeaveEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QSplitterHandle_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QSplitterHandle_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_DropEvent +func miqt_exec_callback_QSplitterHandle_DropEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QSplitterHandle_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QSplitterHandle_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ShowEvent +func miqt_exec_callback_QSplitterHandle_ShowEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QSplitterHandle_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSplitterHandle) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QSplitterHandle_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_HideEvent +func miqt_exec_callback_QSplitterHandle_HideEvent(self *C.QSplitterHandle, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QSplitterHandle_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QSplitterHandle) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QSplitterHandle_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_NativeEvent +func miqt_exec_callback_QSplitterHandle_NativeEvent(self *C.QSplitterHandle, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QSplitterHandle_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QSplitterHandle_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_ChangeEvent +func miqt_exec_callback_QSplitterHandle_ChangeEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSplitterHandle_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSplitterHandle) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QSplitterHandle_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_Metric +func miqt_exec_callback_QSplitterHandle_Metric(self *C.QSplitterHandle, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSplitterHandle) callVirtualBase_InitPainter(painter *QPainter) { + + C.QSplitterHandle_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QSplitterHandle) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QSplitterHandle_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_InitPainter +func miqt_exec_callback_QSplitterHandle_InitPainter(self *C.QSplitterHandle, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QSplitterHandle_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QSplitterHandle) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QSplitterHandle_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_Redirected +func miqt_exec_callback_QSplitterHandle_Redirected(self *C.QSplitterHandle, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QSplitterHandle_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSplitterHandle) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QSplitterHandle_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_SharedPainter +func miqt_exec_callback_QSplitterHandle_SharedPainter(self *C.QSplitterHandle, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QSplitterHandle_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QSplitterHandle) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QSplitterHandle_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_InputMethodEvent +func miqt_exec_callback_QSplitterHandle_InputMethodEvent(self *C.QSplitterHandle, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSplitterHandle{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSplitterHandle) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QSplitterHandle_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSplitterHandle) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QSplitterHandle_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_InputMethodQuery +func miqt_exec_callback_QSplitterHandle_InputMethodQuery(self *C.QSplitterHandle, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSplitterHandle) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSplitterHandle_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSplitterHandle) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSplitterHandle_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSplitterHandle_FocusNextPrevChild +func miqt_exec_callback_QSplitterHandle_FocusNextPrevChild(self *C.QSplitterHandle, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSplitterHandle) Delete() { - C.QSplitterHandle_Delete(this.h) + C.QSplitterHandle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsplitter.h b/qt6/gen_qsplitter.h index f5f19236..bf208e28 100644 --- a/qt6/gen_qsplitter.h +++ b/qt6/gen_qsplitter.h @@ -15,25 +15,83 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; class QSplitter; class QSplitterHandle; +class QStyleOptionFrame; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QSplitter QSplitter; typedef struct QSplitterHandle QSplitterHandle; +typedef struct QStyleOptionFrame QStyleOptionFrame; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QSplitter* QSplitter_new(QWidget* parent); -QSplitter* QSplitter_new2(); -QSplitter* QSplitter_new3(int param1); -QSplitter* QSplitter_new4(int param1, QWidget* parent); +void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSplitter_MetaObject(const QSplitter* self); void* QSplitter_Metacast(QSplitter* self, const char* param1); struct miqt_string QSplitter_Tr(const char* s); @@ -65,12 +123,35 @@ QSplitterHandle* QSplitter_Handle(const QSplitter* self, int index); void QSplitter_SetStretchFactor(QSplitter* self, int index, int stretch); void QSplitter_SplitterMoved(QSplitter* self, int pos, int index); void QSplitter_connect_SplitterMoved(QSplitter* self, intptr_t slot); +QSplitterHandle* QSplitter_CreateHandle(QSplitter* self); +void QSplitter_ChildEvent(QSplitter* self, QChildEvent* param1); +bool QSplitter_Event(QSplitter* self, QEvent* param1); +void QSplitter_ResizeEvent(QSplitter* self, QResizeEvent* param1); +void QSplitter_ChangeEvent(QSplitter* self, QEvent* param1); struct miqt_string QSplitter_Tr2(const char* s, const char* c); struct miqt_string QSplitter_Tr3(const char* s, const char* c, int n); void QSplitter_SetOpaqueResize1(QSplitter* self, bool opaque); -void QSplitter_Delete(QSplitter* self); +void QSplitter_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSplitter_virtualbase_SizeHint(const void* self); +void QSplitter_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSplitter_virtualbase_MinimumSizeHint(const void* self); +void QSplitter_override_virtual_CreateHandle(void* self, intptr_t slot); +QSplitterHandle* QSplitter_virtualbase_CreateHandle(void* self); +void QSplitter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_ChildEvent(void* self, QChildEvent* param1); +void QSplitter_override_virtual_Event(void* self, intptr_t slot); +bool QSplitter_virtualbase_Event(void* self, QEvent* param1); +void QSplitter_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QSplitter_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSplitter_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSplitter_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QSplitter_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QSplitter_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QSplitter_Delete(QSplitter* self, bool isSubclass); -QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent); +void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self); void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1); struct miqt_string QSplitterHandle_Tr(const char* s); @@ -79,9 +160,97 @@ int QSplitterHandle_Orientation(const QSplitterHandle* self); bool QSplitterHandle_OpaqueResize(const QSplitterHandle* self); QSplitter* QSplitterHandle_Splitter(const QSplitterHandle* self); QSize* QSplitterHandle_SizeHint(const QSplitterHandle* self); +void QSplitterHandle_PaintEvent(QSplitterHandle* self, QPaintEvent* param1); +void QSplitterHandle_MouseMoveEvent(QSplitterHandle* self, QMouseEvent* param1); +void QSplitterHandle_MousePressEvent(QSplitterHandle* self, QMouseEvent* param1); +void QSplitterHandle_MouseReleaseEvent(QSplitterHandle* self, QMouseEvent* param1); +void QSplitterHandle_ResizeEvent(QSplitterHandle* self, QResizeEvent* param1); +bool QSplitterHandle_Event(QSplitterHandle* self, QEvent* param1); struct miqt_string QSplitterHandle_Tr2(const char* s, const char* c); struct miqt_string QSplitterHandle_Tr3(const char* s, const char* c, int n); -void QSplitterHandle_Delete(QSplitterHandle* self); +void QSplitterHandle_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSplitterHandle_virtualbase_SizeHint(const void* self); +void QSplitterHandle_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QSplitterHandle_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QSplitterHandle_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QSplitterHandle_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QSplitterHandle_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QSplitterHandle_override_virtual_Event(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_Event(void* self, QEvent* param1); +void QSplitterHandle_override_virtual_DevType(void* self, intptr_t slot); +int QSplitterHandle_virtualbase_DevType(const void* self); +void QSplitterHandle_override_virtual_SetVisible(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_SetVisible(void* self, bool visible); +void QSplitterHandle_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSplitterHandle_virtualbase_MinimumSizeHint(const void* self); +void QSplitterHandle_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSplitterHandle_virtualbase_HeightForWidth(const void* self, int param1); +void QSplitterHandle_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_HasHeightForWidth(const void* self); +void QSplitterHandle_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSplitterHandle_virtualbase_PaintEngine(const void* self); +void QSplitterHandle_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSplitterHandle_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSplitterHandle_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSplitterHandle_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSplitterHandle_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSplitterHandle_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSplitterHandle_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QSplitterHandle_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSplitterHandle_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QSplitterHandle_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSplitterHandle_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSplitterHandle_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSplitterHandle_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSplitterHandle_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSplitterHandle_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSplitterHandle_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSplitterHandle_override_virtual_DropEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSplitterHandle_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSplitterHandle_override_virtual_HideEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSplitterHandle_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QSplitterHandle_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSplitterHandle_override_virtual_Metric(void* self, intptr_t slot); +int QSplitterHandle_virtualbase_Metric(const void* self, int param1); +void QSplitterHandle_override_virtual_InitPainter(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSplitterHandle_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSplitterHandle_virtualbase_Redirected(const void* self, QPoint* offset); +void QSplitterHandle_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSplitterHandle_virtualbase_SharedPainter(const void* self); +void QSplitterHandle_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSplitterHandle_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSplitterHandle_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSplitterHandle_virtualbase_InputMethodQuery(const void* self, int param1); +void QSplitterHandle_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSplitterHandle_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSplitterHandle_Delete(QSplitterHandle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstackedlayout.cpp b/qt6/gen_qstackedlayout.cpp index 49ea1789..4c0ebea1 100644 --- a/qt6/gen_qstackedlayout.cpp +++ b/qt6/gen_qstackedlayout.cpp @@ -1,6 +1,8 @@ +#include #include #include #include +#include #include #include #include @@ -12,16 +14,522 @@ #include "gen_qstackedlayout.h" #include "_cgo_export.h" -QStackedLayout* QStackedLayout_new(QWidget* parent) { - return new QStackedLayout(parent); +class MiqtVirtualQStackedLayout : public virtual QStackedLayout { +public: + + MiqtVirtualQStackedLayout(QWidget* parent): QStackedLayout(parent) {}; + MiqtVirtualQStackedLayout(): QStackedLayout() {}; + MiqtVirtualQStackedLayout(QLayout* parentLayout): QStackedLayout(parentLayout) {}; + + virtual ~MiqtVirtualQStackedLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Count = 0; + + // Subclass to allow providing a Go implementation + virtual int count() const override { + if (handle__Count == 0) { + return QStackedLayout::count(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Count() const { + + return QStackedLayout::count(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddItem = 0; + + // Subclass to allow providing a Go implementation + virtual void addItem(QLayoutItem* item) override { + if (handle__AddItem == 0) { + QStackedLayout::addItem(item); + return; + } + + QLayoutItem* sigval1 = item; + + miqt_exec_callback_QStackedLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddItem(QLayoutItem* item) { + + QStackedLayout::addItem(item); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QStackedLayout::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QStackedLayout::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSize() const override { + if (handle__MinimumSize == 0) { + return QStackedLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QStackedLayout::minimumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* itemAt(int param1) const override { + if (handle__ItemAt == 0) { + return QStackedLayout::itemAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QStackedLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ItemAt(int param1) const { + + return QStackedLayout::itemAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TakeAt = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* takeAt(int param1) override { + if (handle__TakeAt == 0) { + return QStackedLayout::takeAt(param1); + } + + int sigval1 = param1; + + QLayoutItem* callback_return_value = miqt_exec_callback_QStackedLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_TakeAt(int param1) { + + return QStackedLayout::takeAt(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void setGeometry(const QRect& rect) override { + if (handle__SetGeometry == 0) { + QStackedLayout::setGeometry(rect); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QStackedLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* rect) { + + QStackedLayout::setGeometry(*rect); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QStackedLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QStackedLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QStackedLayout::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QStackedLayout::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QStackedLayout_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QStackedLayout::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Spacing = 0; + + // Subclass to allow providing a Go implementation + virtual int spacing() const override { + if (handle__Spacing == 0) { + return QStackedLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QStackedLayout::spacing(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSpacing = 0; + + // Subclass to allow providing a Go implementation + virtual void setSpacing(int spacing) override { + if (handle__SetSpacing == 0) { + QStackedLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QStackedLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QStackedLayout::setSpacing(static_cast(spacing)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Invalidate = 0; + + // Subclass to allow providing a Go implementation + virtual void invalidate() override { + if (handle__Invalidate == 0) { + QStackedLayout::invalidate(); + return; + } + + + miqt_exec_callback_QStackedLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QStackedLayout::invalidate(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Geometry = 0; + + // Subclass to allow providing a Go implementation + virtual QRect geometry() const override { + if (handle__Geometry == 0) { + return QStackedLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QStackedLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QStackedLayout::geometry()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExpandingDirections = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::Orientations expandingDirections() const override { + if (handle__ExpandingDirections == 0) { + return QStackedLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ExpandingDirections() const { + + Qt::Orientations _ret = QStackedLayout::expandingDirections(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MaximumSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize maximumSize() const override { + if (handle__MaximumSize == 0) { + return QStackedLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QStackedLayout::maximumSize()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOf = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(const QWidget* param1) const override { + if (handle__IndexOf == 0) { + return QStackedLayout::indexOf(param1); + } + + QWidget* sigval1 = (QWidget*) param1; + + int callback_return_value = miqt_exec_callback_QStackedLayout_IndexOf(const_cast(this), handle__IndexOf, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOf(QWidget* param1) const { + + return QStackedLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QStackedLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QStackedLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QStackedLayout::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ControlTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QSizePolicy::ControlTypes controlTypes() const override { + if (handle__ControlTypes == 0) { + return QStackedLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QStackedLayout_ControlTypes(const_cast(this), handle__ControlTypes); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ControlTypes() const { + + QSizePolicy::ControlTypes _ret = QStackedLayout::controlTypes(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReplaceWidget = 0; + + // Subclass to allow providing a Go implementation + virtual QLayoutItem* replaceWidget(QWidget* from, QWidget* to, Qt::FindChildOptions options) override { + if (handle__ReplaceWidget == 0) { + return QStackedLayout::replaceWidget(from, to, options); + } + + QWidget* sigval1 = from; + QWidget* sigval2 = to; + Qt::FindChildOptions options_ret = options; + int sigval3 = static_cast(options_ret); + + QLayoutItem* callback_return_value = miqt_exec_callback_QStackedLayout_ReplaceWidget(this, handle__ReplaceWidget, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayoutItem* virtualbase_ReplaceWidget(QWidget* from, QWidget* to, int options) { + + return QStackedLayout::replaceWidget(from, to, static_cast(options)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Layout = 0; + + // Subclass to allow providing a Go implementation + virtual QLayout* layout() override { + if (handle__Layout == 0) { + return QStackedLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QStackedLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QStackedLayout::layout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* e) override { + if (handle__ChildEvent == 0) { + QStackedLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QStackedLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QStackedLayout::childEvent(e); + + } + +}; + +void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parent); + *outptr_QStackedLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QStackedLayout* QStackedLayout_new2() { - return new QStackedLayout(); +void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(); + *outptr_QStackedLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } -QStackedLayout* QStackedLayout_new3(QLayout* parentLayout) { - return new QStackedLayout(parentLayout); +void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parentLayout); + *outptr_QStackedLayout = ret; + *outptr_QLayout = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); } QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self) { @@ -113,7 +621,7 @@ void QStackedLayout_WidgetRemoved(QStackedLayout* self, int index) { } void QStackedLayout_connect_WidgetRemoved(QStackedLayout* self, intptr_t slot) { - QStackedLayout::connect(self, static_cast(&QStackedLayout::widgetRemoved), self, [=](int index) { + MiqtVirtualQStackedLayout::connect(self, static_cast(&QStackedLayout::widgetRemoved), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QStackedLayout_WidgetRemoved(slot, sigval1); }); @@ -124,7 +632,7 @@ void QStackedLayout_CurrentChanged(QStackedLayout* self, int index) { } void QStackedLayout_connect_CurrentChanged(QStackedLayout* self, intptr_t slot) { - QStackedLayout::connect(self, static_cast(&QStackedLayout::currentChanged), self, [=](int index) { + MiqtVirtualQStackedLayout::connect(self, static_cast(&QStackedLayout::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QStackedLayout_CurrentChanged(slot, sigval1); }); @@ -160,7 +668,179 @@ struct miqt_string QStackedLayout_Tr3(const char* s, const char* c, int n) { return _ms; } -void QStackedLayout_Delete(QStackedLayout* self) { - delete self; +void QStackedLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Count = slot; +} + +int QStackedLayout_virtualbase_Count(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_Count(); +} + +void QStackedLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__AddItem = slot; +} + +void QStackedLayout_virtualbase_AddItem(void* self, QLayoutItem* item) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_AddItem(item); +} + +void QStackedLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__SizeHint = slot; +} + +QSize* QStackedLayout_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_SizeHint(); +} + +void QStackedLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QStackedLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QStackedLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ItemAt = slot; +} + +QLayoutItem* QStackedLayout_virtualbase_ItemAt(const void* self, int param1) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_ItemAt(param1); +} + +void QStackedLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__TakeAt = slot; +} + +QLayoutItem* QStackedLayout_virtualbase_TakeAt(void* self, int param1) { + return ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_TakeAt(param1); +} + +void QStackedLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__SetGeometry = slot; +} + +void QStackedLayout_virtualbase_SetGeometry(void* self, QRect* rect) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QStackedLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QStackedLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QStackedLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QStackedLayout_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_HeightForWidth(width); +} + +void QStackedLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Spacing = slot; +} + +int QStackedLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_Spacing(); +} + +void QStackedLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__SetSpacing = slot; +} + +void QStackedLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_SetSpacing(spacing); +} + +void QStackedLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Invalidate = slot; +} + +void QStackedLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_Invalidate(); +} + +void QStackedLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QStackedLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_Geometry(); +} + +void QStackedLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QStackedLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QStackedLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QStackedLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QStackedLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__IndexOf = slot; +} + +int QStackedLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QStackedLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QStackedLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QStackedLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ControlTypes = slot; +} + +int QStackedLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQStackedLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QStackedLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ReplaceWidget = slot; +} + +QLayoutItem* QStackedLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options) { + return ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_ReplaceWidget(from, to, options); +} + +void QStackedLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QStackedLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_Layout(); +} + +void QStackedLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QStackedLayout*)(self) )->handle__ChildEvent = slot; +} + +void QStackedLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQStackedLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QStackedLayout_Delete(QStackedLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstackedlayout.go b/qt6/gen_qstackedlayout.go index b4a2ec40..7647799e 100644 --- a/qt6/gen_qstackedlayout.go +++ b/qt6/gen_qstackedlayout.go @@ -22,7 +22,8 @@ const ( ) type QStackedLayout struct { - h *C.QStackedLayout + h *C.QStackedLayout + isSubclass bool *QLayout } @@ -40,33 +41,62 @@ func (this *QStackedLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStackedLayout(h *C.QStackedLayout) *QStackedLayout { +// newQStackedLayout constructs the type using only CGO pointers. +func newQStackedLayout(h *C.QStackedLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QStackedLayout { if h == nil { return nil } - return &QStackedLayout{h: h, QLayout: UnsafeNewQLayout(unsafe.Pointer(h))} + return &QStackedLayout{h: h, + QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } -func UnsafeNewQStackedLayout(h unsafe.Pointer) *QStackedLayout { - return newQStackedLayout((*C.QStackedLayout)(h)) +// UnsafeNewQStackedLayout constructs the type using only unsafe pointers. +func UnsafeNewQStackedLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QStackedLayout { + if h == nil { + return nil + } + + return &QStackedLayout{h: (*C.QStackedLayout)(h), + QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} } // NewQStackedLayout constructs a new QStackedLayout object. func NewQStackedLayout(parent *QWidget) *QStackedLayout { - ret := C.QStackedLayout_new(parent.cPointer()) - return newQStackedLayout(ret) + var outptr_QStackedLayout *C.QStackedLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QStackedLayout_new(parent.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQStackedLayout2 constructs a new QStackedLayout object. func NewQStackedLayout2() *QStackedLayout { - ret := C.QStackedLayout_new2() - return newQStackedLayout(ret) + var outptr_QStackedLayout *C.QStackedLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QStackedLayout_new2(&outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } // NewQStackedLayout3 constructs a new QStackedLayout object. func NewQStackedLayout3(parentLayout *QLayout) *QStackedLayout { - ret := C.QStackedLayout_new3(parentLayout.cPointer()) - return newQStackedLayout(ret) + var outptr_QStackedLayout *C.QStackedLayout = nil + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QStackedLayout_new3(parentLayout.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret } func (this *QStackedLayout) MetaObject() *QMetaObject { @@ -97,7 +127,7 @@ func (this *QStackedLayout) InsertWidget(index int, w *QWidget) int { } func (this *QStackedLayout) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_CurrentWidget(this.h)), nil, nil) } func (this *QStackedLayout) CurrentIndex() int { @@ -105,7 +135,7 @@ func (this *QStackedLayout) CurrentIndex() int { } func (this *QStackedLayout) Widget(param1 int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_Widget(this.h, (C.int)(param1)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedLayout_Widget(this.h, (C.int)(param1))), nil, nil) } func (this *QStackedLayout) Count() int { @@ -228,9 +258,498 @@ func QStackedLayout_Tr3(s string, c string, n int) string { return _ret } +func (this *QStackedLayout) callVirtualBase_Count() int { + + return (int)(C.QStackedLayout_virtualbase_Count(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnCount(slot func(super func() int) int) { + C.QStackedLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Count +func miqt_exec_callback_QStackedLayout_Count(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Count) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_AddItem(item *QLayoutItem) { + + C.QStackedLayout_virtualbase_AddItem(unsafe.Pointer(this.h), item.cPointer()) + +} +func (this *QStackedLayout) OnAddItem(slot func(super func(item *QLayoutItem), item *QLayoutItem)) { + C.QStackedLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_AddItem +func miqt_exec_callback_QStackedLayout_AddItem(self *C.QStackedLayout, cb C.intptr_t, item *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(item *QLayoutItem), item *QLayoutItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(item)) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_AddItem, slotval1) + +} + +func (this *QStackedLayout) callVirtualBase_SizeHint() *QSize { + + _ret := C.QStackedLayout_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QStackedLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_SizeHint +func miqt_exec_callback_QStackedLayout_SizeHint(self *C.QStackedLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QStackedLayout_virtualbase_MinimumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QStackedLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_MinimumSize +func miqt_exec_callback_QStackedLayout_MinimumSize(self *C.QStackedLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_ItemAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QStackedLayout_virtualbase_ItemAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QStackedLayout) OnItemAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QStackedLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ItemAt +func miqt_exec_callback_QStackedLayout_ItemAt(self *C.QStackedLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ItemAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_TakeAt(param1 int) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QStackedLayout_virtualbase_TakeAt(unsafe.Pointer(this.h), (C.int)(param1)))) +} +func (this *QStackedLayout) OnTakeAt(slot func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) { + C.QStackedLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_TakeAt +func miqt_exec_callback_QStackedLayout_TakeAt(self *C.QStackedLayout, cb C.intptr_t, param1 C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) *QLayoutItem, param1 int) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_TakeAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_SetGeometry(rect *QRect) { + + C.QStackedLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QStackedLayout) OnSetGeometry(slot func(super func(rect *QRect), rect *QRect)) { + C.QStackedLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_SetGeometry +func miqt_exec_callback_QStackedLayout_SetGeometry(self *C.QStackedLayout, cb C.intptr_t, rect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect), rect *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QStackedLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QStackedLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QStackedLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_HasHeightForWidth +func miqt_exec_callback_QStackedLayout_HasHeightForWidth(self *C.QStackedLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QStackedLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QStackedLayout) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QStackedLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_HeightForWidth +func miqt_exec_callback_QStackedLayout_HeightForWidth(self *C.QStackedLayout, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_Spacing() int { + + return (int)(C.QStackedLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnSpacing(slot func(super func() int) int) { + C.QStackedLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Spacing +func miqt_exec_callback_QStackedLayout_Spacing(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QStackedLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QStackedLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QStackedLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_SetSpacing +func miqt_exec_callback_QStackedLayout_SetSpacing(self *C.QStackedLayout, cb C.intptr_t, spacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(spacing int), spacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(spacing) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + +} + +func (this *QStackedLayout) callVirtualBase_Invalidate() { + + C.QStackedLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QStackedLayout) OnInvalidate(slot func(super func())) { + C.QStackedLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Invalidate +func miqt_exec_callback_QStackedLayout_Invalidate(self *C.QStackedLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QStackedLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QStackedLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QStackedLayout_virtualbase_Geometry(unsafe.Pointer(this.h)) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QStackedLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Geometry +func miqt_exec_callback_QStackedLayout_Geometry(self *C.QStackedLayout, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QRect) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QStackedLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QStackedLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ExpandingDirections +func miqt_exec_callback_QStackedLayout_ExpandingDirections(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() Orientation) Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QStackedLayout_virtualbase_MaximumSize(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QStackedLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_MaximumSize +func miqt_exec_callback_QStackedLayout_MaximumSize(self *C.QStackedLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QStackedLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QStackedLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QStackedLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_IndexOf +func miqt_exec_callback_QStackedLayout_IndexOf(self *C.QStackedLayout, cb C.intptr_t, param1 *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWidget) int, param1 *QWidget) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(param1), nil, nil) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QStackedLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QStackedLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_IsEmpty +func miqt_exec_callback_QStackedLayout_IsEmpty(self *C.QStackedLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QStackedLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QStackedLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QStackedLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ControlTypes +func miqt_exec_callback_QStackedLayout_ControlTypes(self *C.QStackedLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QStackedLayout) callVirtualBase_ReplaceWidget(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QStackedLayout_virtualbase_ReplaceWidget(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.int)(options)))) +} +func (this *QStackedLayout) OnReplaceWidget(slot func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) { + C.QStackedLayout_override_virtual_ReplaceWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ReplaceWidget +func miqt_exec_callback_QStackedLayout_ReplaceWidget(self *C.QStackedLayout, cb C.intptr_t, from *C.QWidget, to *C.QWidget, options C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(from), nil, nil) + slotval2 := UnsafeNewQWidget(unsafe.Pointer(to), nil, nil) + slotval3 := (FindChildOption)(options) + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_ReplaceWidget, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QStackedLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QStackedLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QStackedLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_Layout +func miqt_exec_callback_QStackedLayout_Layout(self *C.QStackedLayout, cb C.intptr_t) *C.QLayout { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLayout) *QLayout) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QStackedLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QStackedLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QStackedLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QStackedLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedLayout_ChildEvent +func miqt_exec_callback_QStackedLayout_ChildEvent(self *C.QStackedLayout, cb C.intptr_t, e *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QChildEvent), e *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(e), nil) + + gofunc((&QStackedLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QStackedLayout) Delete() { - C.QStackedLayout_Delete(this.h) + C.QStackedLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstackedlayout.h b/qt6/gen_qstackedlayout.h index 34259bb7..e1734e52 100644 --- a/qt6/gen_qstackedlayout.h +++ b/qt6/gen_qstackedlayout.h @@ -15,26 +15,30 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QLayout; class QLayoutItem; class QMetaObject; +class QObject; class QRect; class QSize; class QStackedLayout; class QWidget; #else +typedef struct QChildEvent QChildEvent; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QStackedLayout QStackedLayout; typedef struct QWidget QWidget; #endif -QStackedLayout* QStackedLayout_new(QWidget* parent); -QStackedLayout* QStackedLayout_new2(); -QStackedLayout* QStackedLayout_new3(QLayout* parentLayout); +void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self); void* QStackedLayout_Metacast(QStackedLayout* self, const char* param1); struct miqt_string QStackedLayout_Tr(const char* s); @@ -62,7 +66,49 @@ void QStackedLayout_SetCurrentIndex(QStackedLayout* self, int index); void QStackedLayout_SetCurrentWidget(QStackedLayout* self, QWidget* w); struct miqt_string QStackedLayout_Tr2(const char* s, const char* c); struct miqt_string QStackedLayout_Tr3(const char* s, const char* c, int n); -void QStackedLayout_Delete(QStackedLayout* self); +void QStackedLayout_override_virtual_Count(void* self, intptr_t slot); +int QStackedLayout_virtualbase_Count(const void* self); +void QStackedLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QStackedLayout_virtualbase_AddItem(void* self, QLayoutItem* item); +void QStackedLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStackedLayout_virtualbase_SizeHint(const void* self); +void QStackedLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QStackedLayout_virtualbase_MinimumSize(const void* self); +void QStackedLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QStackedLayout_virtualbase_ItemAt(const void* self, int param1); +void QStackedLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QStackedLayout_virtualbase_TakeAt(void* self, int param1); +void QStackedLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QStackedLayout_virtualbase_SetGeometry(void* self, QRect* rect); +void QStackedLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QStackedLayout_virtualbase_HasHeightForWidth(const void* self); +void QStackedLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QStackedLayout_virtualbase_HeightForWidth(const void* self, int width); +void QStackedLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QStackedLayout_virtualbase_Spacing(const void* self); +void QStackedLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QStackedLayout_virtualbase_SetSpacing(void* self, int spacing); +void QStackedLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QStackedLayout_virtualbase_Invalidate(void* self); +void QStackedLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QStackedLayout_virtualbase_Geometry(const void* self); +void QStackedLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QStackedLayout_virtualbase_ExpandingDirections(const void* self); +void QStackedLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QStackedLayout_virtualbase_MaximumSize(const void* self); +void QStackedLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QStackedLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QStackedLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QStackedLayout_virtualbase_IsEmpty(const void* self); +void QStackedLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QStackedLayout_virtualbase_ControlTypes(const void* self); +void QStackedLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot); +QLayoutItem* QStackedLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options); +void QStackedLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QStackedLayout_virtualbase_Layout(void* self); +void QStackedLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QStackedLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QStackedLayout_Delete(QStackedLayout* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstackedwidget.cpp b/qt6/gen_qstackedwidget.cpp index 2cd89899..7558df26 100644 --- a/qt6/gen_qstackedwidget.cpp +++ b/qt6/gen_qstackedwidget.cpp @@ -1,19 +1,163 @@ +#include +#include #include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include "gen_qstackedwidget.h" #include "_cgo_export.h" -QStackedWidget* QStackedWidget_new(QWidget* parent) { - return new QStackedWidget(parent); +class MiqtVirtualQStackedWidget : public virtual QStackedWidget { +public: + + MiqtVirtualQStackedWidget(QWidget* parent): QStackedWidget(parent) {}; + MiqtVirtualQStackedWidget(): QStackedWidget() {}; + + virtual ~MiqtVirtualQStackedWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QStackedWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QStackedWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QStackedWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QStackedWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStackedWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QStackedWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QStackedWidget::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QStackedWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QStackedWidget::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QStackedWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QStackedWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QStackedWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QStackedWidget::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QStackedWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QStackedWidget::initStyleOption(option); + + } + +}; + +void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(parent); + *outptr_QStackedWidget = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QStackedWidget* QStackedWidget_new2() { - return new QStackedWidget(); +void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(); + *outptr_QStackedWidget = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self) { @@ -80,7 +224,7 @@ void QStackedWidget_CurrentChanged(QStackedWidget* self, int param1) { } void QStackedWidget_connect_CurrentChanged(QStackedWidget* self, intptr_t slot) { - QStackedWidget::connect(self, static_cast(&QStackedWidget::currentChanged), self, [=](int param1) { + MiqtVirtualQStackedWidget::connect(self, static_cast(&QStackedWidget::currentChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QStackedWidget_CurrentChanged(slot, sigval1); }); @@ -91,7 +235,7 @@ void QStackedWidget_WidgetRemoved(QStackedWidget* self, int index) { } void QStackedWidget_connect_WidgetRemoved(QStackedWidget* self, intptr_t slot) { - QStackedWidget::connect(self, static_cast(&QStackedWidget::widgetRemoved), self, [=](int index) { + MiqtVirtualQStackedWidget::connect(self, static_cast(&QStackedWidget::widgetRemoved), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QStackedWidget_WidgetRemoved(slot, sigval1); }); @@ -119,7 +263,51 @@ struct miqt_string QStackedWidget_Tr3(const char* s, const char* c, int n) { return _ms; } -void QStackedWidget_Delete(QStackedWidget* self) { - delete self; +void QStackedWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__Event = slot; +} + +bool QStackedWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQStackedWidget*)(self) )->virtualbase_Event(e); +} + +void QStackedWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QStackedWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQStackedWidget*)(self) )->virtualbase_SizeHint(); +} + +void QStackedWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__PaintEvent = slot; +} + +void QStackedWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQStackedWidget*)(self) )->virtualbase_PaintEvent(param1); +} + +void QStackedWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QStackedWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQStackedWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QStackedWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QStackedWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QStackedWidget_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQStackedWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QStackedWidget_Delete(QStackedWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstackedwidget.go b/qt6/gen_qstackedwidget.go index c1c29898..045c6bd4 100644 --- a/qt6/gen_qstackedwidget.go +++ b/qt6/gen_qstackedwidget.go @@ -15,7 +15,8 @@ import ( ) type QStackedWidget struct { - h *C.QStackedWidget + h *C.QStackedWidget + isSubclass bool *QFrame } @@ -33,27 +34,51 @@ func (this *QStackedWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStackedWidget(h *C.QStackedWidget) *QStackedWidget { +// newQStackedWidget constructs the type using only CGO pointers. +func newQStackedWidget(h *C.QStackedWidget, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStackedWidget { if h == nil { return nil } - return &QStackedWidget{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QStackedWidget{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQStackedWidget(h unsafe.Pointer) *QStackedWidget { - return newQStackedWidget((*C.QStackedWidget)(h)) +// UnsafeNewQStackedWidget constructs the type using only unsafe pointers. +func UnsafeNewQStackedWidget(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStackedWidget { + if h == nil { + return nil + } + + return &QStackedWidget{h: (*C.QStackedWidget)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQStackedWidget constructs a new QStackedWidget object. func NewQStackedWidget(parent *QWidget) *QStackedWidget { - ret := C.QStackedWidget_new(parent.cPointer()) - return newQStackedWidget(ret) + var outptr_QStackedWidget *C.QStackedWidget = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStackedWidget_new(parent.cPointer(), &outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQStackedWidget2 constructs a new QStackedWidget object. func NewQStackedWidget2() *QStackedWidget { - ret := C.QStackedWidget_new2() - return newQStackedWidget(ret) + var outptr_QStackedWidget *C.QStackedWidget = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStackedWidget_new2(&outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QStackedWidget) MetaObject() *QMetaObject { @@ -88,7 +113,7 @@ func (this *QStackedWidget) RemoveWidget(w *QWidget) { } func (this *QStackedWidget) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_CurrentWidget(this.h)), nil, nil) } func (this *QStackedWidget) CurrentIndex() int { @@ -100,7 +125,7 @@ func (this *QStackedWidget) IndexOf(param1 *QWidget) int { } func (this *QStackedWidget) Widget(param1 int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_Widget(this.h, (C.int)(param1)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStackedWidget_Widget(this.h, (C.int)(param1))), nil, nil) } func (this *QStackedWidget) Count() int { @@ -177,9 +202,128 @@ func QStackedWidget_Tr3(s string, c string, n int) string { return _ret } +func (this *QStackedWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QStackedWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QStackedWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QStackedWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_Event +func miqt_exec_callback_QStackedWidget_Event(self *C.QStackedWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QStackedWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStackedWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QStackedWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStackedWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QStackedWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_SizeHint +func miqt_exec_callback_QStackedWidget_SizeHint(self *C.QStackedWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStackedWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStackedWidget) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QStackedWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStackedWidget) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QStackedWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_PaintEvent +func miqt_exec_callback_QStackedWidget_PaintEvent(self *C.QStackedWidget, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStackedWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QStackedWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QStackedWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStackedWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QStackedWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_ChangeEvent +func miqt_exec_callback_QStackedWidget_ChangeEvent(self *C.QStackedWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QStackedWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QStackedWidget) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QStackedWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QStackedWidget) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QStackedWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStackedWidget_InitStyleOption +func miqt_exec_callback_QStackedWidget_InitStyleOption(self *C.QStackedWidget, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QStackedWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QStackedWidget) Delete() { - C.QStackedWidget_Delete(this.h) + C.QStackedWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstackedwidget.h b/qt6/gen_qstackedwidget.h index eda0ca32..9251864f 100644 --- a/qt6/gen_qstackedwidget.h +++ b/qt6/gen_qstackedwidget.h @@ -15,17 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QFrame; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QSize; class QStackedWidget; +class QStyleOptionFrame; class QWidget; #else +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QSize QSize; typedef struct QStackedWidget QStackedWidget; +typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QWidget QWidget; #endif -QStackedWidget* QStackedWidget_new(QWidget* parent); -QStackedWidget* QStackedWidget_new2(); +void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self); void* QStackedWidget_Metacast(QStackedWidget* self, const char* param1); struct miqt_string QStackedWidget_Tr(const char* s); @@ -43,9 +57,20 @@ void QStackedWidget_CurrentChanged(QStackedWidget* self, int param1); void QStackedWidget_connect_CurrentChanged(QStackedWidget* self, intptr_t slot); void QStackedWidget_WidgetRemoved(QStackedWidget* self, int index); void QStackedWidget_connect_WidgetRemoved(QStackedWidget* self, intptr_t slot); +bool QStackedWidget_Event(QStackedWidget* self, QEvent* e); struct miqt_string QStackedWidget_Tr2(const char* s, const char* c); struct miqt_string QStackedWidget_Tr3(const char* s, const char* c, int n); -void QStackedWidget_Delete(QStackedWidget* self); +void QStackedWidget_override_virtual_Event(void* self, intptr_t slot); +bool QStackedWidget_virtualbase_Event(void* self, QEvent* e); +void QStackedWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStackedWidget_virtualbase_SizeHint(const void* self); +void QStackedWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QStackedWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QStackedWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QStackedWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QStackedWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QStackedWidget_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QStackedWidget_Delete(QStackedWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstandarditemmodel.cpp b/qt6/gen_qstandarditemmodel.cpp index f3ab2298..f989f780 100644 --- a/qt6/gen_qstandarditemmodel.cpp +++ b/qt6/gen_qstandarditemmodel.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -21,38 +22,251 @@ #include "gen_qstandarditemmodel.h" #include "_cgo_export.h" -QStandardItem* QStandardItem_new() { - return new QStandardItem(); +class MiqtVirtualQStandardItem : public virtual QStandardItem { +public: + + MiqtVirtualQStandardItem(): QStandardItem() {}; + MiqtVirtualQStandardItem(const QString& text): QStandardItem(text) {}; + MiqtVirtualQStandardItem(const QIcon& icon, const QString& text): QStandardItem(icon, text) {}; + MiqtVirtualQStandardItem(int rows): QStandardItem(rows) {}; + MiqtVirtualQStandardItem(int rows, int columns): QStandardItem(rows, columns) {}; + + virtual ~MiqtVirtualQStandardItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int role) const override { + if (handle__Data == 0) { + return QStandardItem::data(role); + } + + int sigval1 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStandardItem_Data(const_cast(this), handle__Data, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int role) const { + + return new QVariant(QStandardItem::data(static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MultiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(QModelRoleDataSpan roleDataSpan) const override { + if (handle__MultiData == 0) { + QStandardItem::multiData(roleDataSpan); + return; + } + + QModelRoleDataSpan* sigval1 = new QModelRoleDataSpan(roleDataSpan); + + miqt_exec_callback_QStandardItem_MultiData(const_cast(this), handle__MultiData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelRoleDataSpan* roleDataSpan) const { + + QStandardItem::multiData(*roleDataSpan); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(const QVariant& value, int role) override { + if (handle__SetData == 0) { + QStandardItem::setData(value, role); + return; + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + int sigval2 = role; + + miqt_exec_callback_QStandardItem_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(QVariant* value, int role) { + + QStandardItem::setData(*value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QStandardItem* clone() const override { + if (handle__Clone == 0) { + return QStandardItem::clone(); + } + + + QStandardItem* callback_return_value = miqt_exec_callback_QStandardItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QStandardItem* virtualbase_Clone() const { + + return QStandardItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QStandardItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QStandardItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QStandardItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QStandardItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QStandardItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QStandardItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QStandardItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QStandardItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QStandardItem::write(*out); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QStandardItem& other) const override { + if (handle__OperatorLesser == 0) { + return QStandardItem::operator<(other); + } + + const QStandardItem& other_ret = other; + // Cast returned reference into pointer + QStandardItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QStandardItem* other) const { + + return QStandardItem::operator<(*other); + + } + +}; + +void QStandardItem_new(QStandardItem** outptr_QStandardItem) { + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new2(struct miqt_string text) { +void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QStandardItem(text_QString); + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(text_QString); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text) { +void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QStandardItem(*icon, text_QString); + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(*icon, text_QString); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new4(int rows) { - return new QStandardItem(static_cast(rows)); +void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem) { + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows)); + *outptr_QStandardItem = ret; } -QStandardItem* QStandardItem_new5(int rows, int columns) { - return new QStandardItem(static_cast(rows), static_cast(columns)); +void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem) { + MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows), static_cast(columns)); + *outptr_QStandardItem = ret; } -QVariant* QStandardItem_Data(const QStandardItem* self) { - return new QVariant(self->data()); +QVariant* QStandardItem_Data(const QStandardItem* self, int role) { + return new QVariant(self->data(static_cast(role))); } void QStandardItem_MultiData(const QStandardItem* self, QModelRoleDataSpan* roleDataSpan) { self->multiData(*roleDataSpan); } -void QStandardItem_SetData(QStandardItem* self, QVariant* value) { - self->setData(*value); +void QStandardItem_SetData(QStandardItem* self, QVariant* value, int role) { + self->setData(*value, static_cast(role)); } void QStandardItem_ClearData(QStandardItem* self) { @@ -484,14 +698,6 @@ bool QStandardItem_OperatorLesser(const QStandardItem* self, QStandardItem* othe return self->operator<(*other); } -QVariant* QStandardItem_Data1(const QStandardItem* self, int role) { - return new QVariant(self->data(static_cast(role))); -} - -void QStandardItem_SetData2(QStandardItem* self, QVariant* value, int role) { - self->setData(*value, static_cast(role)); -} - QStandardItem* QStandardItem_Child2(const QStandardItem* self, int row, int column) { return self->child(static_cast(row), static_cast(column)); } @@ -504,267 +710,1442 @@ void QStandardItem_SortChildren2(QStandardItem* self, int column, int order) { self->sortChildren(static_cast(column), static_cast(order)); } -void QStandardItem_Delete(QStandardItem* self) { - delete self; +void QStandardItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Data = slot; } -QStandardItemModel* QStandardItemModel_new() { - return new QStandardItemModel(); +QVariant* QStandardItem_virtualbase_Data(const void* self, int role) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Data(role); } -QStandardItemModel* QStandardItemModel_new2(int rows, int columns) { - return new QStandardItemModel(static_cast(rows), static_cast(columns)); +void QStandardItem_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__MultiData = slot; } -QStandardItemModel* QStandardItemModel_new3(QObject* parent) { - return new QStandardItemModel(parent); +void QStandardItem_virtualbase_MultiData(const void* self, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_MultiData(roleDataSpan); } -QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent) { - return new QStandardItemModel(static_cast(rows), static_cast(columns), parent); +void QStandardItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__SetData = slot; } -QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { - return (QMetaObject*) self->metaObject(); +void QStandardItem_virtualbase_SetData(void* self, QVariant* value, int role) { + ( (MiqtVirtualQStandardItem*)(self) )->virtualbase_SetData(value, role); } -void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1) { - return self->qt_metacast(param1); +void QStandardItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Clone = slot; } -struct miqt_string QStandardItemModel_Tr(const char* s) { - QString _ret = QStandardItemModel::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QStandardItem* QStandardItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Clone(); } -void QStandardItemModel_SetItemRoleNames(QStandardItemModel* self, struct miqt_map /* of int to struct miqt_string */ roleNames) { - QHash roleNames_QMap; - roleNames_QMap.reserve(roleNames.len); - int* roleNames_karr = static_cast(roleNames.keys); - struct miqt_string* roleNames_varr = static_cast(roleNames.values); - for(size_t i = 0; i < roleNames.len; ++i) { - QByteArray roleNames_varr_i_QByteArray(roleNames_varr[i].data, roleNames_varr[i].len); - roleNames_QMap[static_cast(roleNames_karr[i])] = roleNames_varr_i_QByteArray; - } - self->setItemRoleNames(roleNames_QMap); +void QStandardItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Type = slot; } -struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_RoleNames(const QStandardItemModel* self) { - QHash _ret = self->roleNames(); - // Convert QMap<> from C++ memory to manually-managed C memory - int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); - struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); - int _ctr = 0; - for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { - _karr[_ctr] = _itr->first; - QByteArray _hashval_qb = _itr->second; - struct miqt_string _hashval_ms; - _hashval_ms.len = _hashval_qb.length(); - _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); - memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); - _varr[_ctr] = _hashval_ms; - _ctr++; - } - struct miqt_map _out; - _out.len = _ret.size(); - _out.keys = static_cast(_karr); - _out.values = static_cast(_varr); - return _out; +int QStandardItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Type(); } -QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +void QStandardItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Read = slot; } -QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child) { - return new QModelIndex(self->parent(*child)); +void QStandardItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQStandardItem*)(self) )->virtualbase_Read(in); } -int QStandardItemModel_RowCount(const QStandardItemModel* self) { - return self->rowCount(); +void QStandardItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__Write = slot; } -int QStandardItemModel_ColumnCount(const QStandardItemModel* self) { - return self->columnCount(); +void QStandardItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_Write(out); } -bool QStandardItemModel_HasChildren(const QStandardItemModel* self) { - return self->hasChildren(); +void QStandardItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QStandardItem*)(self) )->handle__OperatorLesser = slot; } -QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +bool QStandardItem_virtualbase_OperatorLesser(const void* self, QStandardItem* other) { + return ( (const MiqtVirtualQStandardItem*)(self) )->virtualbase_OperatorLesser(other); } -void QStandardItemModel_MultiData(const QStandardItemModel* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { - self->multiData(*index, *roleDataSpan); +void QStandardItem_Delete(QStandardItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); -} +class MiqtVirtualQStandardItemModel : public virtual QStandardItemModel { +public: -bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index) { - return self->clearItemData(*index); -} + MiqtVirtualQStandardItemModel(): QStandardItemModel() {}; + MiqtVirtualQStandardItemModel(int rows, int columns): QStandardItemModel(rows, columns) {}; + MiqtVirtualQStandardItemModel(QObject* parent): QStandardItemModel(parent) {}; + MiqtVirtualQStandardItemModel(int rows, int columns, QObject* parent): QStandardItemModel(rows, columns, parent) {}; -QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); -} + virtual ~MiqtVirtualQStandardItemModel() = default; -bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; -bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); -} + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QStandardItemModel::roleNames(); + } + -bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); -} + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QStandardItemModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } -bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); -} + return callback_return_value_QMap; + } -bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); -} + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QStandardItemModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; -int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index) { - Qt::ItemFlags _ret = self->flags(*index); - return static_cast(_ret); -} + } -int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self) { - Qt::DropActions _ret = self->supportedDropActions(); - return static_cast(_ret); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; -struct miqt_map /* of int to QVariant* */ QStandardItemModel_ItemData(const QStandardItemModel* self, QModelIndex* index) { - QMap _ret = self->itemData(*index); - // Convert QMap<> from C++ memory to manually-managed C memory - int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); - QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); - int _ctr = 0; - for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { - _karr[_ctr] = _itr->first; - _varr[_ctr] = new QVariant(_itr->second); - _ctr++; - } - struct miqt_map _out; - _out.len = _ret.size(); - _out.keys = static_cast(_karr); - _out.values = static_cast(_varr); - return _out; -} + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QStandardItemModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); -bool QStandardItemModel_SetItemData(QStandardItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { - QMap roles_QMap; - int* roles_karr = static_cast(roles.keys); - QVariant** roles_varr = static_cast(roles.values); - for(size_t i = 0; i < roles.len; ++i) { - roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; } - return self->setItemData(*index, roles_QMap); -} -void QStandardItemModel_Clear(QStandardItemModel* self) { - self->clear(); -} + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { -void QStandardItemModel_Sort(QStandardItemModel* self, int column) { - self->sort(static_cast(column)); -} + return new QModelIndex(QStandardItemModel::index(static_cast(row), static_cast(column), *parent)); -QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index) { - return self->itemFromIndex(*index); -} + } -QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item) { - return new QModelIndex(self->indexFromItem(item)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; -QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row) { - return self->item(static_cast(row)); -} + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& child) const override { + if (handle__Parent == 0) { + return QStandardItemModel::parent(child); + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); -void QStandardItemModel_SetItem(QStandardItemModel* self, int row, int column, QStandardItem* item) { - self->setItem(static_cast(row), static_cast(column), item); -} + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Parent(const_cast(this), handle__Parent, sigval1); -void QStandardItemModel_SetItem2(QStandardItemModel* self, int row, QStandardItem* item) { - self->setItem(static_cast(row), item); -} + return *callback_return_value; + } -QStandardItem* QStandardItemModel_InvisibleRootItem(const QStandardItemModel* self) { - return self->invisibleRootItem(); -} + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* child) const { -QStandardItem* QStandardItemModel_HorizontalHeaderItem(const QStandardItemModel* self, int column) { - return self->horizontalHeaderItem(static_cast(column)); -} + return new QModelIndex(QStandardItemModel::parent(*child)); -void QStandardItemModel_SetHorizontalHeaderItem(QStandardItemModel* self, int column, QStandardItem* item) { - self->setHorizontalHeaderItem(static_cast(column), item); -} + } -QStandardItem* QStandardItemModel_VerticalHeaderItem(const QStandardItemModel* self, int row) { - return self->verticalHeaderItem(static_cast(row)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; -void QStandardItemModel_SetVerticalHeaderItem(QStandardItemModel* self, int row, QStandardItem* item) { - self->setVerticalHeaderItem(static_cast(row), item); -} + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QStandardItemModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); -void QStandardItemModel_SetHorizontalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { - QStringList labels_QList; - labels_QList.reserve(labels.len); - struct miqt_string* labels_arr = static_cast(labels.data); - for(size_t i = 0; i < labels.len; ++i) { - QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); - labels_QList.push_back(labels_arr_i_QString); + int callback_return_value = miqt_exec_callback_QStandardItemModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); } - self->setHorizontalHeaderLabels(labels_QList); -} -void QStandardItemModel_SetVerticalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { - QStringList labels_QList; - labels_QList.reserve(labels.len); - struct miqt_string* labels_arr = static_cast(labels.data); - for(size_t i = 0; i < labels.len; ++i) { - QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); - labels_QList.push_back(labels_arr_i_QString); + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QStandardItemModel::rowCount(*parent); + } - self->setVerticalHeaderLabels(labels_QList); -} -void QStandardItemModel_SetRowCount(QStandardItemModel* self, int rows) { - self->setRowCount(static_cast(rows)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; -void QStandardItemModel_SetColumnCount(QStandardItemModel* self, int columns) { - self->setColumnCount(static_cast(columns)); -} + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QStandardItemModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); -void QStandardItemModel_AppendRow(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { - QList items_QList; - items_QList.reserve(items.len); - QStandardItem** items_arr = static_cast(items.data); - for(size_t i = 0; i < items.len; ++i) { - items_QList.push_back(items_arr[i]); + int callback_return_value = miqt_exec_callback_QStandardItemModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); } - self->appendRow(items_QList); -} -void QStandardItemModel_AppendColumn(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QStandardItemModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QStandardItemModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QStandardItemModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QStandardItemModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStandardItemModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QStandardItemModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MultiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(const QModelIndex& index, QModelRoleDataSpan roleDataSpan) const override { + if (handle__MultiData == 0) { + QStandardItemModel::multiData(index, roleDataSpan); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QModelRoleDataSpan* sigval2 = new QModelRoleDataSpan(roleDataSpan); + + miqt_exec_callback_QStandardItemModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QStandardItemModel::multiData(*index, *roleDataSpan); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QStandardItemModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QStandardItemModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QStandardItemModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QStandardItemModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QStandardItemModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStandardItemModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QStandardItemModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QStandardItemModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QStandardItemModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QStandardItemModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QStandardItemModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QStandardItemModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QStandardItemModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QStandardItemModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QStandardItemModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QStandardItemModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QStandardItemModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QStandardItemModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QStandardItemModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QStandardItemModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QStandardItemModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QStandardItemModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QStandardItemModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QStandardItemModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QStandardItemModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QStandardItemModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QStandardItemModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QStandardItemModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QStandardItemModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QStandardItemModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QStandardItemModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QStandardItemModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QStandardItemModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QStandardItemModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QStandardItemModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QStandardItemModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QStandardItemModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QStandardItemModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QStandardItemModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QStandardItemModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QStandardItemModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QStandardItemModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QStandardItemModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QStandardItemModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QStandardItemModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QStandardItemModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QStandardItemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QStandardItemModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QStandardItemModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QStandardItemModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QStandardItemModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QStandardItemModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QStandardItemModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QStandardItemModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QStandardItemModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QStandardItemModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStandardItemModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QStandardItemModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__Match == 0) { + return QStandardItemModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QStandardItemModel_Match(const_cast(this), handle__Match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_Match(QModelIndex* start, int role, QVariant* value, int hits, int flags) const { + + QModelIndexList _ret = QStandardItemModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QStandardItemModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QStandardItemModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QStandardItemModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QStandardItemModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QStandardItemModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QStandardItemModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QStandardItemModel::revert(); + return; + } + + + miqt_exec_callback_QStandardItemModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QStandardItemModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResetInternalData = 0; + + // Subclass to allow providing a Go implementation + virtual void resetInternalData() override { + if (handle__ResetInternalData == 0) { + QStandardItemModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QStandardItemModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QStandardItemModel::resetInternalData(); + + } + +}; + +void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns)); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(parent); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns), parent); + *outptr_QStandardItemModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QStandardItemModel_Tr(const char* s) { + QString _ret = QStandardItemModel::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QStandardItemModel_SetItemRoleNames(QStandardItemModel* self, struct miqt_map /* of int to struct miqt_string */ roleNames) { + QHash roleNames_QMap; + roleNames_QMap.reserve(roleNames.len); + int* roleNames_karr = static_cast(roleNames.keys); + struct miqt_string* roleNames_varr = static_cast(roleNames.values); + for(size_t i = 0; i < roleNames.len; ++i) { + QByteArray roleNames_varr_i_QByteArray(roleNames_varr[i].data, roleNames_varr[i].len); + roleNames_QMap[static_cast(roleNames_karr[i])] = roleNames_varr_i_QByteArray; + } + self->setItemRoleNames(roleNames_QMap); +} + +struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_RoleNames(const QStandardItemModel* self) { + QHash _ret = self->roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +} + +QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child) { + return new QModelIndex(self->parent(*child)); +} + +int QStandardItemModel_RowCount(const QStandardItemModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +int QStandardItemModel_ColumnCount(const QStandardItemModel* self, QModelIndex* parent) { + return self->columnCount(*parent); +} + +bool QStandardItemModel_HasChildren(const QStandardItemModel* self, QModelIndex* parent) { + return self->hasChildren(*parent); +} + +QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +void QStandardItemModel_MultiData(const QStandardItemModel* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + self->multiData(*index, *roleDataSpan); +} + +bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); +} + +bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index) { + return self->clearItemData(*index); +} + +QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +} + +bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); +} + +bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); +} + +bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); +} + +bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); +} + +bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); +} + +int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index) { + Qt::ItemFlags _ret = self->flags(*index); + return static_cast(_ret); +} + +int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self) { + Qt::DropActions _ret = self->supportedDropActions(); + return static_cast(_ret); +} + +struct miqt_map /* of int to QVariant* */ QStandardItemModel_ItemData(const QStandardItemModel* self, QModelIndex* index) { + QMap _ret = self->itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +bool QStandardItemModel_SetItemData(QStandardItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + return self->setItemData(*index, roles_QMap); +} + +void QStandardItemModel_Clear(QStandardItemModel* self) { + self->clear(); +} + +void QStandardItemModel_Sort(QStandardItemModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); +} + +QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index) { + return self->itemFromIndex(*index); +} + +QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item) { + return new QModelIndex(self->indexFromItem(item)); +} + +QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row) { + return self->item(static_cast(row)); +} + +void QStandardItemModel_SetItem(QStandardItemModel* self, int row, int column, QStandardItem* item) { + self->setItem(static_cast(row), static_cast(column), item); +} + +void QStandardItemModel_SetItem2(QStandardItemModel* self, int row, QStandardItem* item) { + self->setItem(static_cast(row), item); +} + +QStandardItem* QStandardItemModel_InvisibleRootItem(const QStandardItemModel* self) { + return self->invisibleRootItem(); +} + +QStandardItem* QStandardItemModel_HorizontalHeaderItem(const QStandardItemModel* self, int column) { + return self->horizontalHeaderItem(static_cast(column)); +} + +void QStandardItemModel_SetHorizontalHeaderItem(QStandardItemModel* self, int column, QStandardItem* item) { + self->setHorizontalHeaderItem(static_cast(column), item); +} + +QStandardItem* QStandardItemModel_VerticalHeaderItem(const QStandardItemModel* self, int row) { + return self->verticalHeaderItem(static_cast(row)); +} + +void QStandardItemModel_SetVerticalHeaderItem(QStandardItemModel* self, int row, QStandardItem* item) { + self->setVerticalHeaderItem(static_cast(row), item); +} + +void QStandardItemModel_SetHorizontalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { + QStringList labels_QList; + labels_QList.reserve(labels.len); + struct miqt_string* labels_arr = static_cast(labels.data); + for(size_t i = 0; i < labels.len; ++i) { + QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); + labels_QList.push_back(labels_arr_i_QString); + } + self->setHorizontalHeaderLabels(labels_QList); +} + +void QStandardItemModel_SetVerticalHeaderLabels(QStandardItemModel* self, struct miqt_array /* of struct miqt_string */ labels) { + QStringList labels_QList; + labels_QList.reserve(labels.len); + struct miqt_string* labels_arr = static_cast(labels.data); + for(size_t i = 0; i < labels.len; ++i) { + QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); + labels_QList.push_back(labels_arr_i_QString); + } + self->setVerticalHeaderLabels(labels_QList); +} + +void QStandardItemModel_SetRowCount(QStandardItemModel* self, int rows) { + self->setRowCount(static_cast(rows)); +} + +void QStandardItemModel_SetColumnCount(QStandardItemModel* self, int columns) { + self->setColumnCount(static_cast(columns)); +} + +void QStandardItemModel_AppendRow(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { + QList items_QList; + items_QList.reserve(items.len); + QStandardItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + self->appendRow(items_QList); +} + +void QStandardItemModel_AppendColumn(QStandardItemModel* self, struct miqt_array /* of QStandardItem* */ items) { QList items_QList; items_QList.reserve(items.len); QStandardItem** items_arr = static_cast(items.data); @@ -917,7 +2298,7 @@ void QStandardItemModel_ItemChanged(QStandardItemModel* self, QStandardItem* ite } void QStandardItemModel_connect_ItemChanged(QStandardItemModel* self, intptr_t slot) { - QStandardItemModel::connect(self, static_cast(&QStandardItemModel::itemChanged), self, [=](QStandardItem* item) { + MiqtVirtualQStandardItemModel::connect(self, static_cast(&QStandardItemModel::itemChanged), self, [=](QStandardItem* item) { QStandardItem* sigval1 = item; miqt_exec_callback_QStandardItemModel_ItemChanged(slot, sigval1); }); @@ -945,58 +2326,6 @@ struct miqt_string QStandardItemModel_Tr3(const char* s, const char* c, int n) { return _ms; } -QModelIndex* QStandardItemModel_Index3(const QStandardItemModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); -} - -int QStandardItemModel_RowCount1(const QStandardItemModel* self, QModelIndex* parent) { - return self->rowCount(*parent); -} - -int QStandardItemModel_ColumnCount1(const QStandardItemModel* self, QModelIndex* parent) { - return self->columnCount(*parent); -} - -bool QStandardItemModel_HasChildren1(const QStandardItemModel* self, QModelIndex* parent) { - return self->hasChildren(*parent); -} - -QVariant* QStandardItemModel_Data2(const QStandardItemModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); -} - -bool QStandardItemModel_SetData3(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); -} - -QVariant* QStandardItemModel_HeaderData3(const QStandardItemModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); -} - -bool QStandardItemModel_SetHeaderData4(QStandardItemModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); -} - -bool QStandardItemModel_InsertRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); -} - -bool QStandardItemModel_InsertColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); -} - -bool QStandardItemModel_RemoveRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); -} - -bool QStandardItemModel_RemoveColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); -} - -void QStandardItemModel_Sort2(QStandardItemModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); -} - QStandardItem* QStandardItemModel_Item2(const QStandardItemModel* self, int row, int column) { return self->item(static_cast(row), static_cast(column)); } @@ -1041,7 +2370,307 @@ struct miqt_array /* of QStandardItem* */ QStandardItemModel_FindItems3(const Q return _out; } -void QStandardItemModel_Delete(QStandardItemModel* self) { - delete self; +void QStandardItemModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RoleNames(); +} + +void QStandardItemModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QStandardItemModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Parent(const void* self, QModelIndex* child) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Parent(child); +} + +void QStandardItemModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RowCount = slot; +} + +int QStandardItemModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RowCount(parent); +} + +void QStandardItemModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__ColumnCount = slot; +} + +int QStandardItemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_ColumnCount(parent); +} + +void QStandardItemModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__HasChildren = slot; +} + +bool QStandardItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QStandardItemModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Data = slot; +} + +QVariant* QStandardItemModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Data(index, role); +} + +void QStandardItemModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MultiData = slot; +} + +void QStandardItemModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QStandardItemModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SetData = slot; +} + +bool QStandardItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QStandardItemModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__ClearItemData = slot; +} + +bool QStandardItemModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QStandardItemModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QStandardItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QStandardItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QStandardItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QStandardItemModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__InsertRows = slot; +} + +bool QStandardItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QStandardItemModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__InsertColumns = slot; +} + +bool QStandardItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QStandardItemModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RemoveRows = slot; +} + +bool QStandardItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QStandardItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QStandardItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QStandardItemModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Flags = slot; +} + +int QStandardItemModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Flags(index); +} + +void QStandardItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QStandardItemModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QStandardItemModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QStandardItemModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_ItemData(index); +} + +void QStandardItemModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SetItemData = slot; +} + +bool QStandardItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QStandardItemModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Sort = slot; +} + +void QStandardItemModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Sort(column, order); +} + +void QStandardItemModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QStandardItemModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MimeTypes(); +} + +void QStandardItemModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QStandardItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QStandardItemModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__DropMimeData = slot; +} + +bool QStandardItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QStandardItemModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QStandardItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QStandardItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QStandardItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QStandardItemModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QStandardItemModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MoveRows = slot; +} + +bool QStandardItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QStandardItemModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__MoveColumns = slot; +} + +bool QStandardItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QStandardItemModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__FetchMore = slot; +} + +void QStandardItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QStandardItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QStandardItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QStandardItemModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QStandardItemModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Buddy(index); +} + +void QStandardItemModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QStandardItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QStandardItemModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Span = slot; +} + +QSize* QStandardItemModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Span(index); +} + +void QStandardItemModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Submit = slot; +} + +bool QStandardItemModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Submit(); +} + +void QStandardItemModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__Revert = slot; +} + +void QStandardItemModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_Revert(); +} + +void QStandardItemModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QStandardItemModel*)(self) )->handle__ResetInternalData = slot; +} + +void QStandardItemModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQStandardItemModel*)(self) )->virtualbase_ResetInternalData(); +} + +void QStandardItemModel_Delete(QStandardItemModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstandarditemmodel.go b/qt6/gen_qstandarditemmodel.go index 19edc1ca..d14269ee 100644 --- a/qt6/gen_qstandarditemmodel.go +++ b/qt6/gen_qstandarditemmodel.go @@ -22,7 +22,8 @@ const ( ) type QStandardItem struct { - h *C.QStandardItem + h *C.QStandardItem + isSubclass bool } func (this *QStandardItem) cPointer() *C.QStandardItem { @@ -39,6 +40,7 @@ func (this *QStandardItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStandardItem constructs the type using only CGO pointers. func newQStandardItem(h *C.QStandardItem) *QStandardItem { if h == nil { return nil @@ -46,14 +48,23 @@ func newQStandardItem(h *C.QStandardItem) *QStandardItem { return &QStandardItem{h: h} } +// UnsafeNewQStandardItem constructs the type using only unsafe pointers. func UnsafeNewQStandardItem(h unsafe.Pointer) *QStandardItem { - return newQStandardItem((*C.QStandardItem)(h)) + if h == nil { + return nil + } + + return &QStandardItem{h: (*C.QStandardItem)(h)} } // NewQStandardItem constructs a new QStandardItem object. func NewQStandardItem() *QStandardItem { - ret := C.QStandardItem_new() - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new(&outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem2 constructs a new QStandardItem object. @@ -62,8 +73,12 @@ func NewQStandardItem2(text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QStandardItem_new2(text_ms) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new2(text_ms, &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem3 constructs a new QStandardItem object. @@ -72,24 +87,36 @@ func NewQStandardItem3(icon *QIcon, text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QStandardItem_new3(icon.cPointer(), text_ms) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new3(icon.cPointer(), text_ms, &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem4 constructs a new QStandardItem object. func NewQStandardItem4(rows int) *QStandardItem { - ret := C.QStandardItem_new4((C.int)(rows)) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new4((C.int)(rows), &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } // NewQStandardItem5 constructs a new QStandardItem object. func NewQStandardItem5(rows int, columns int) *QStandardItem { - ret := C.QStandardItem_new5((C.int)(rows), (C.int)(columns)) - return newQStandardItem(ret) + var outptr_QStandardItem *C.QStandardItem = nil + + C.QStandardItem_new5((C.int)(rows), (C.int)(columns), &outptr_QStandardItem) + ret := newQStandardItem(outptr_QStandardItem) + ret.isSubclass = true + return ret } -func (this *QStandardItem) Data() *QVariant { - _ret := C.QStandardItem_Data(this.h) +func (this *QStandardItem) Data(role int) *QVariant { + _ret := C.QStandardItem_Data(this.h, (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -99,8 +126,8 @@ func (this *QStandardItem) MultiData(roleDataSpan QModelRoleDataSpan) { C.QStandardItem_MultiData(this.h, roleDataSpan.cPointer()) } -func (this *QStandardItem) SetData(value *QVariant) { - C.QStandardItem_SetData(this.h, value.cPointer()) +func (this *QStandardItem) SetData(value *QVariant, role int) { + C.QStandardItem_SetData(this.h, value.cPointer(), (C.int)(role)) } func (this *QStandardItem) ClearData() { @@ -360,7 +387,7 @@ func (this *QStandardItem) Index() *QModelIndex { } func (this *QStandardItem) Model() *QStandardItemModel { - return UnsafeNewQStandardItemModel(unsafe.Pointer(C.QStandardItem_Model(this.h))) + return UnsafeNewQStandardItemModel(unsafe.Pointer(C.QStandardItem_Model(this.h)), nil, nil) } func (this *QStandardItem) RowCount() int { @@ -535,32 +562,213 @@ func (this *QStandardItem) OperatorLesser(other *QStandardItem) bool { return (bool)(C.QStandardItem_OperatorLesser(this.h, other.cPointer())) } -func (this *QStandardItem) Data1(role int) *QVariant { - _ret := C.QStandardItem_Data1(this.h, (C.int)(role)) +func (this *QStandardItem) Child2(row int, column int) *QStandardItem { + return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Child2(this.h, (C.int)(row), (C.int)(column)))) +} + +func (this *QStandardItem) TakeChild2(row int, column int) *QStandardItem { + return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_TakeChild2(this.h, (C.int)(row), (C.int)(column)))) +} + +func (this *QStandardItem) SortChildren2(column int, order SortOrder) { + C.QStandardItem_SortChildren2(this.h, (C.int)(column), (C.int)(order)) +} + +func (this *QStandardItem) callVirtualBase_Data(role int) *QVariant { + + _ret := C.QStandardItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QStandardItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) { + C.QStandardItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Data +func miqt_exec_callback_QStandardItem_Data(self *C.QStandardItem, cb C.intptr_t, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Data, slotval1) + + return virtualReturn.cPointer() + } -func (this *QStandardItem) SetData2(value *QVariant, role int) { - C.QStandardItem_SetData2(this.h, value.cPointer(), (C.int)(role)) +func (this *QStandardItem) callVirtualBase_MultiData(roleDataSpan QModelRoleDataSpan) { + + C.QStandardItem_virtualbase_MultiData(unsafe.Pointer(this.h), roleDataSpan.cPointer()) + +} +func (this *QStandardItem) OnMultiData(slot func(super func(roleDataSpan QModelRoleDataSpan), roleDataSpan QModelRoleDataSpan)) { + C.QStandardItem_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QStandardItem) Child2(row int, column int) *QStandardItem { - return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_Child2(this.h, (C.int)(row), (C.int)(column)))) +//export miqt_exec_callback_QStandardItem_MultiData +func miqt_exec_callback_QStandardItem_MultiData(self *C.QStandardItem, cb C.intptr_t, roleDataSpan *C.QModelRoleDataSpan) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(roleDataSpan QModelRoleDataSpan), roleDataSpan QModelRoleDataSpan)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + roleDataSpan_ret := roleDataSpan + roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan_ret) + roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *roleDataSpan_goptr + + gofunc((&QStandardItem{h: self}).callVirtualBase_MultiData, slotval1) + } -func (this *QStandardItem) TakeChild2(row int, column int) *QStandardItem { - return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_TakeChild2(this.h, (C.int)(row), (C.int)(column)))) +func (this *QStandardItem) callVirtualBase_SetData(value *QVariant, role int) { + + C.QStandardItem_virtualbase_SetData(unsafe.Pointer(this.h), value.cPointer(), (C.int)(role)) + +} +func (this *QStandardItem) OnSetData(slot func(super func(value *QVariant, role int), value *QVariant, role int)) { + C.QStandardItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QStandardItem) SortChildren2(column int, order SortOrder) { - C.QStandardItem_SortChildren2(this.h, (C.int)(column), (C.int)(order)) +//export miqt_exec_callback_QStandardItem_SetData +func miqt_exec_callback_QStandardItem_SetData(self *C.QStandardItem, cb C.intptr_t, value *C.QVariant, role C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant, role int), value *QVariant, role int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval2 := (int)(role) + + gofunc((&QStandardItem{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QStandardItem) callVirtualBase_Clone() *QStandardItem { + + return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QStandardItem) OnClone(slot func(super func() *QStandardItem) *QStandardItem) { + C.QStandardItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Clone +func miqt_exec_callback_QStandardItem_Clone(self *C.QStandardItem, cb C.intptr_t) *C.QStandardItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QStandardItem) *QStandardItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItem) callVirtualBase_Type() int { + + return (int)(C.QStandardItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QStandardItem) OnType(slot func(super func() int) int) { + C.QStandardItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Type +func miqt_exec_callback_QStandardItem_Type(self *C.QStandardItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItem) callVirtualBase_Read(in *QDataStream) { + + C.QStandardItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QStandardItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QStandardItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Read +func miqt_exec_callback_QStandardItem_Read(self *C.QStandardItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in), nil) + + gofunc((&QStandardItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QStandardItem) callVirtualBase_Write(out *QDataStream) { + + C.QStandardItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QStandardItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QStandardItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_Write +func miqt_exec_callback_QStandardItem_Write(self *C.QStandardItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out), nil) + + gofunc((&QStandardItem{h: self}).callVirtualBase_Write, slotval1) + +} + +func (this *QStandardItem) callVirtualBase_OperatorLesser(other *QStandardItem) bool { + + return (bool)(C.QStandardItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QStandardItem) OnOperatorLesser(slot func(super func(other *QStandardItem) bool, other *QStandardItem) bool) { + C.QStandardItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItem_OperatorLesser +func miqt_exec_callback_QStandardItem_OperatorLesser(self *C.QStandardItem, cb C.intptr_t, other *C.QStandardItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QStandardItem) bool, other *QStandardItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStandardItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QStandardItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QStandardItem) Delete() { - C.QStandardItem_Delete(this.h) + C.QStandardItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -573,7 +781,8 @@ func (this *QStandardItem) GoGC() { } type QStandardItemModel struct { - h *C.QStandardItemModel + h *C.QStandardItemModel + isSubclass bool *QAbstractItemModel } @@ -591,39 +800,71 @@ func (this *QStandardItemModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStandardItemModel(h *C.QStandardItemModel) *QStandardItemModel { +// newQStandardItemModel constructs the type using only CGO pointers. +func newQStandardItemModel(h *C.QStandardItemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStandardItemModel { if h == nil { return nil } - return &QStandardItemModel{h: h, QAbstractItemModel: UnsafeNewQAbstractItemModel(unsafe.Pointer(h))} + return &QStandardItemModel{h: h, + QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQStandardItemModel(h unsafe.Pointer) *QStandardItemModel { - return newQStandardItemModel((*C.QStandardItemModel)(h)) +// UnsafeNewQStandardItemModel constructs the type using only unsafe pointers. +func UnsafeNewQStandardItemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStandardItemModel { + if h == nil { + return nil + } + + return &QStandardItemModel{h: (*C.QStandardItemModel)(h), + QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } // NewQStandardItemModel constructs a new QStandardItemModel object. func NewQStandardItemModel() *QStandardItemModel { - ret := C.QStandardItemModel_new() - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new(&outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStandardItemModel2 constructs a new QStandardItemModel object. func NewQStandardItemModel2(rows int, columns int) *QStandardItemModel { - ret := C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns)) - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStandardItemModel3 constructs a new QStandardItemModel object. func NewQStandardItemModel3(parent *QObject) *QStandardItemModel { - ret := C.QStandardItemModel_new3(parent.cPointer()) - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new3(parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStandardItemModel4 constructs a new QStandardItemModel object. func NewQStandardItemModel4(rows int, columns int, parent *QObject) *QStandardItemModel { - ret := C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer()) - return newQStandardItemModel(ret) + var outptr_QStandardItemModel *C.QStandardItemModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStandardItemModel) MetaObject() *QMetaObject { @@ -684,8 +925,8 @@ func (this *QStandardItemModel) RoleNames() map[int][]byte { return _ret } -func (this *QStandardItemModel) Index(row int, column int) *QModelIndex { - _ret := C.QStandardItemModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QStandardItemModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QStandardItemModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -698,20 +939,20 @@ func (this *QStandardItemModel) Parent(child *QModelIndex) *QModelIndex { return _goptr } -func (this *QStandardItemModel) RowCount() int { - return (int)(C.QStandardItemModel_RowCount(this.h)) +func (this *QStandardItemModel) RowCount(parent *QModelIndex) int { + return (int)(C.QStandardItemModel_RowCount(this.h, parent.cPointer())) } -func (this *QStandardItemModel) ColumnCount() int { - return (int)(C.QStandardItemModel_ColumnCount(this.h)) +func (this *QStandardItemModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QStandardItemModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QStandardItemModel) HasChildren() bool { - return (bool)(C.QStandardItemModel_HasChildren(this.h)) +func (this *QStandardItemModel) HasChildren(parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_HasChildren(this.h, parent.cPointer())) } -func (this *QStandardItemModel) Data(index *QModelIndex) *QVariant { - _ret := C.QStandardItemModel_Data(this.h, index.cPointer()) +func (this *QStandardItemModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QStandardItemModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -721,39 +962,39 @@ func (this *QStandardItemModel) MultiData(index *QModelIndex, roleDataSpan QMode C.QStandardItemModel_MultiData(this.h, index.cPointer(), roleDataSpan.cPointer()) } -func (this *QStandardItemModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QStandardItemModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QStandardItemModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QStandardItemModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QStandardItemModel) ClearItemData(index *QModelIndex) bool { return (bool)(C.QStandardItemModel_ClearItemData(this.h, index.cPointer())) } -func (this *QStandardItemModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QStandardItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QStandardItemModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QStandardItemModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStandardItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QStandardItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QStandardItemModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QStandardItemModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } -func (this *QStandardItemModel) InsertRows(row int, count int) bool { - return (bool)(C.QStandardItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStandardItemModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStandardItemModel) InsertColumns(column int, count int) bool { - return (bool)(C.QStandardItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QStandardItemModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QStandardItemModel) RemoveRows(row int, count int) bool { - return (bool)(C.QStandardItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStandardItemModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStandardItemModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QStandardItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QStandardItemModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QStandardItemModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QStandardItemModel) Flags(index *QModelIndex) ItemFlag { @@ -805,8 +1046,8 @@ func (this *QStandardItemModel) Clear() { C.QStandardItemModel_Clear(this.h) } -func (this *QStandardItemModel) Sort(column int) { - C.QStandardItemModel_Sort(this.h, (C.int)(column)) +func (this *QStandardItemModel) Sort(column int, order SortOrder) { + C.QStandardItemModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QStandardItemModel) ItemFromIndex(index *QModelIndex) *QStandardItem { @@ -1026,7 +1267,7 @@ func (this *QStandardItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_MimeData(this.h, indexes_ma))) + return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_MimeData(this.h, indexes_ma)), nil) } func (this *QStandardItemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -1075,67 +1316,6 @@ func QStandardItemModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QStandardItemModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QStandardItemModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) - _goptr := newQModelIndex(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStandardItemModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QStandardItemModel_RowCount1(this.h, parent.cPointer())) -} - -func (this *QStandardItemModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QStandardItemModel_ColumnCount1(this.h, parent.cPointer())) -} - -func (this *QStandardItemModel) HasChildren1(parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_HasChildren1(this.h, parent.cPointer())) -} - -func (this *QStandardItemModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QStandardItemModel_Data2(this.h, index.cPointer(), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStandardItemModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QStandardItemModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) -} - -func (this *QStandardItemModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QStandardItemModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) - _goptr := newQVariant(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStandardItemModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QStandardItemModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) -} - -func (this *QStandardItemModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QStandardItemModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) -} - -func (this *QStandardItemModel) Sort2(column int, order SortOrder) { - C.QStandardItemModel_Sort2(this.h, (C.int)(column), (C.int)(order)) -} - func (this *QStandardItemModel) Item2(row int, column int) *QStandardItem { return UnsafeNewQStandardItem(unsafe.Pointer(C.QStandardItemModel_Item2(this.h, (C.int)(row), (C.int)(column)))) } @@ -1180,9 +1360,1136 @@ func (this *QStandardItemModel) FindItems3(text string, flags MatchFlag, column return _ret } +func (this *QStandardItemModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QStandardItemModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QStandardItemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QStandardItemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RoleNames +func miqt_exec_callback_QStandardItemModel_RoleNames(self *C.QStandardItemModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QStandardItemModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Index +func miqt_exec_callback_QStandardItemModel_Index(self *C.QStandardItemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_Parent(child *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Parent(unsafe.Pointer(this.h), child.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnParent(slot func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Parent +func miqt_exec_callback_QStandardItemModel_Parent(self *C.QStandardItemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(child *QModelIndex) *QModelIndex, child *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(child)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QStandardItemModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QStandardItemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RowCount +func miqt_exec_callback_QStandardItemModel_RowCount(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QStandardItemModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QStandardItemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_ColumnCount +func miqt_exec_callback_QStandardItemModel_ColumnCount(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_HasChildren +func miqt_exec_callback_QStandardItemModel_HasChildren(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QStandardItemModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QStandardItemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Data +func miqt_exec_callback_QStandardItemModel_Data(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QStandardItemModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QStandardItemModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QStandardItemModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MultiData +func miqt_exec_callback_QStandardItemModel_MultiData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, roleDataSpan *C.QModelRoleDataSpan) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + roleDataSpan_ret := roleDataSpan + roleDataSpan_goptr := newQModelRoleDataSpan(roleDataSpan_ret) + roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *roleDataSpan_goptr + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QStandardItemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QStandardItemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QStandardItemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SetData +func miqt_exec_callback_QStandardItemModel_SetData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QStandardItemModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_ClearItemData +func miqt_exec_callback_QStandardItemModel_ClearItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QStandardItemModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QStandardItemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_HeaderData +func miqt_exec_callback_QStandardItemModel_HeaderData(self *C.QStandardItemModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QStandardItemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QStandardItemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SetHeaderData +func miqt_exec_callback_QStandardItemModel_SetHeaderData(self *C.QStandardItemModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_InsertRows +func miqt_exec_callback_QStandardItemModel_InsertRows(self *C.QStandardItemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_InsertColumns +func miqt_exec_callback_QStandardItemModel_InsertColumns(self *C.QStandardItemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RemoveRows +func miqt_exec_callback_QStandardItemModel_RemoveRows(self *C.QStandardItemModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QStandardItemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_RemoveColumns +func miqt_exec_callback_QStandardItemModel_RemoveColumns(self *C.QStandardItemModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QStandardItemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QStandardItemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QStandardItemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Flags +func miqt_exec_callback_QStandardItemModel_Flags(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QStandardItemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QStandardItemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QStandardItemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SupportedDropActions +func miqt_exec_callback_QStandardItemModel_SupportedDropActions(self *C.QStandardItemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QStandardItemModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QStandardItemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QStandardItemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_ItemData +func miqt_exec_callback_QStandardItemModel_ItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QStandardItemModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QStandardItemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QStandardItemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QStandardItemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SetItemData +func miqt_exec_callback_QStandardItemModel_SetItemData(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QStandardItemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QStandardItemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QStandardItemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Sort +func miqt_exec_callback_QStandardItemModel_Sort(self *C.QStandardItemModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QStandardItemModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QStandardItemModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QStandardItemModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QStandardItemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MimeTypes +func miqt_exec_callback_QStandardItemModel_MimeTypes(self *C.QStandardItemModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QStandardItemModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QStandardItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QStandardItemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MimeData +func miqt_exec_callback_QStandardItemModel_MimeData(self *C.QStandardItemModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QStandardItemModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_DropMimeData +func miqt_exec_callback_QStandardItemModel_DropMimeData(self *C.QStandardItemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Sibling +func miqt_exec_callback_QStandardItemModel_Sibling(self *C.QStandardItemModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QStandardItemModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_CanDropMimeData +func miqt_exec_callback_QStandardItemModel_CanDropMimeData(self *C.QStandardItemModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QStandardItemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QStandardItemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QStandardItemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_SupportedDragActions +func miqt_exec_callback_QStandardItemModel_SupportedDragActions(self *C.QStandardItemModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QStandardItemModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QStandardItemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MoveRows +func miqt_exec_callback_QStandardItemModel_MoveRows(self *C.QStandardItemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QStandardItemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QStandardItemModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QStandardItemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_MoveColumns +func miqt_exec_callback_QStandardItemModel_MoveColumns(self *C.QStandardItemModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QStandardItemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QStandardItemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QStandardItemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_FetchMore +func miqt_exec_callback_QStandardItemModel_FetchMore(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QStandardItemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QStandardItemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QStandardItemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QStandardItemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_CanFetchMore +func miqt_exec_callback_QStandardItemModel_CanFetchMore(self *C.QStandardItemModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QStandardItemModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QStandardItemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Buddy +func miqt_exec_callback_QStandardItemModel_Buddy(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QStandardItemModel_virtualbase_Match(unsafe.Pointer(this.h), start.cPointer(), (C.int)(role), value.cPointer(), (C.int)(hits), (C.int)(flags)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QStandardItemModel) OnMatch(slot func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) { + C.QStandardItemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Match +func miqt_exec_callback_QStandardItemModel_Match(self *C.QStandardItemModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex, start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(start)) + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(hits) + + slotval5 := (MatchFlag)(flags) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QStandardItemModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QStandardItemModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStandardItemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QStandardItemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Span +func miqt_exec_callback_QStandardItemModel_Span(self *C.QStandardItemModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStandardItemModel) callVirtualBase_Submit() bool { + + return (bool)(C.QStandardItemModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QStandardItemModel) OnSubmit(slot func(super func() bool) bool) { + C.QStandardItemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Submit +func miqt_exec_callback_QStandardItemModel_Submit(self *C.QStandardItemModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStandardItemModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QStandardItemModel) callVirtualBase_Revert() { + + C.QStandardItemModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QStandardItemModel) OnRevert(slot func(super func())) { + C.QStandardItemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_Revert +func miqt_exec_callback_QStandardItemModel_Revert(self *C.QStandardItemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QStandardItemModel) callVirtualBase_ResetInternalData() { + + C.QStandardItemModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QStandardItemModel) OnResetInternalData(slot func(super func())) { + C.QStandardItemModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStandardItemModel_ResetInternalData +func miqt_exec_callback_QStandardItemModel_ResetInternalData(self *C.QStandardItemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QStandardItemModel{h: self}).callVirtualBase_ResetInternalData) + +} + // Delete this object from C++ memory. func (this *QStandardItemModel) Delete() { - C.QStandardItemModel_Delete(this.h) + C.QStandardItemModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstandarditemmodel.h b/qt6/gen_qstandarditemmodel.h index a3824eee..da38e6a9 100644 --- a/qt6/gen_qstandarditemmodel.h +++ b/qt6/gen_qstandarditemmodel.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; class QBrush; class QByteArray; class QDataStream; @@ -30,6 +31,7 @@ class QStandardItem; class QStandardItemModel; class QVariant; #else +typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QBrush QBrush; typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; @@ -46,14 +48,14 @@ typedef struct QStandardItemModel QStandardItemModel; typedef struct QVariant QVariant; #endif -QStandardItem* QStandardItem_new(); -QStandardItem* QStandardItem_new2(struct miqt_string text); -QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text); -QStandardItem* QStandardItem_new4(int rows); -QStandardItem* QStandardItem_new5(int rows, int columns); -QVariant* QStandardItem_Data(const QStandardItem* self); +void QStandardItem_new(QStandardItem** outptr_QStandardItem); +void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem); +void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem); +void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem); +void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem); +QVariant* QStandardItem_Data(const QStandardItem* self, int role); void QStandardItem_MultiData(const QStandardItem* self, QModelRoleDataSpan* roleDataSpan); -void QStandardItem_SetData(QStandardItem* self, QVariant* value); +void QStandardItem_SetData(QStandardItem* self, QVariant* value, int role); void QStandardItem_ClearData(QStandardItem* self); struct miqt_string QStandardItem_Text(const QStandardItem* self); void QStandardItem_SetText(QStandardItem* self, struct miqt_string text); @@ -135,43 +137,57 @@ int QStandardItem_Type(const QStandardItem* self); void QStandardItem_Read(QStandardItem* self, QDataStream* in); void QStandardItem_Write(const QStandardItem* self, QDataStream* out); bool QStandardItem_OperatorLesser(const QStandardItem* self, QStandardItem* other); -QVariant* QStandardItem_Data1(const QStandardItem* self, int role); -void QStandardItem_SetData2(QStandardItem* self, QVariant* value, int role); QStandardItem* QStandardItem_Child2(const QStandardItem* self, int row, int column); QStandardItem* QStandardItem_TakeChild2(QStandardItem* self, int row, int column); void QStandardItem_SortChildren2(QStandardItem* self, int column, int order); -void QStandardItem_Delete(QStandardItem* self); +void QStandardItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QStandardItem_virtualbase_Data(const void* self, int role); +void QStandardItem_override_virtual_MultiData(void* self, intptr_t slot); +void QStandardItem_virtualbase_MultiData(const void* self, QModelRoleDataSpan* roleDataSpan); +void QStandardItem_override_virtual_SetData(void* self, intptr_t slot); +void QStandardItem_virtualbase_SetData(void* self, QVariant* value, int role); +void QStandardItem_override_virtual_Clone(void* self, intptr_t slot); +QStandardItem* QStandardItem_virtualbase_Clone(const void* self); +void QStandardItem_override_virtual_Type(void* self, intptr_t slot); +int QStandardItem_virtualbase_Type(const void* self); +void QStandardItem_override_virtual_Read(void* self, intptr_t slot); +void QStandardItem_virtualbase_Read(void* self, QDataStream* in); +void QStandardItem_override_virtual_Write(void* self, intptr_t slot); +void QStandardItem_virtualbase_Write(const void* self, QDataStream* out); +void QStandardItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QStandardItem_virtualbase_OperatorLesser(const void* self, QStandardItem* other); +void QStandardItem_Delete(QStandardItem* self, bool isSubclass); -QStandardItemModel* QStandardItemModel_new(); -QStandardItemModel* QStandardItemModel_new2(int rows, int columns); -QStandardItemModel* QStandardItemModel_new3(QObject* parent); -QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent); +void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self); void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1); struct miqt_string QStandardItemModel_Tr(const char* s); void QStandardItemModel_SetItemRoleNames(QStandardItemModel* self, struct miqt_map /* of int to struct miqt_string */ roleNames); struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_RoleNames(const QStandardItemModel* self); -QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column); +QModelIndex* QStandardItemModel_Index(const QStandardItemModel* self, int row, int column, QModelIndex* parent); QModelIndex* QStandardItemModel_Parent(const QStandardItemModel* self, QModelIndex* child); -int QStandardItemModel_RowCount(const QStandardItemModel* self); -int QStandardItemModel_ColumnCount(const QStandardItemModel* self); -bool QStandardItemModel_HasChildren(const QStandardItemModel* self); -QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index); +int QStandardItemModel_RowCount(const QStandardItemModel* self, QModelIndex* parent); +int QStandardItemModel_ColumnCount(const QStandardItemModel* self, QModelIndex* parent); +bool QStandardItemModel_HasChildren(const QStandardItemModel* self, QModelIndex* parent); +QVariant* QStandardItemModel_Data(const QStandardItemModel* self, QModelIndex* index, int role); void QStandardItemModel_MultiData(const QStandardItemModel* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); -bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value); +bool QStandardItemModel_SetData(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role); bool QStandardItemModel_ClearItemData(QStandardItemModel* self, QModelIndex* index); -QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation); -bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value); -bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count); -bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count); -bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count); -bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count); +QVariant* QStandardItemModel_HeaderData(const QStandardItemModel* self, int section, int orientation, int role); +bool QStandardItemModel_SetHeaderData(QStandardItemModel* self, int section, int orientation, QVariant* value, int role); +bool QStandardItemModel_InsertRows(QStandardItemModel* self, int row, int count, QModelIndex* parent); +bool QStandardItemModel_InsertColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent); +bool QStandardItemModel_RemoveRows(QStandardItemModel* self, int row, int count, QModelIndex* parent); +bool QStandardItemModel_RemoveColumns(QStandardItemModel* self, int column, int count, QModelIndex* parent); int QStandardItemModel_Flags(const QStandardItemModel* self, QModelIndex* index); int QStandardItemModel_SupportedDropActions(const QStandardItemModel* self); struct miqt_map /* of int to QVariant* */ QStandardItemModel_ItemData(const QStandardItemModel* self, QModelIndex* index); bool QStandardItemModel_SetItemData(QStandardItemModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); void QStandardItemModel_Clear(QStandardItemModel* self); -void QStandardItemModel_Sort(QStandardItemModel* self, int column); +void QStandardItemModel_Sort(QStandardItemModel* self, int column, int order); QStandardItem* QStandardItemModel_ItemFromIndex(const QStandardItemModel* self, QModelIndex* index); QModelIndex* QStandardItemModel_IndexFromItem(const QStandardItemModel* self, QStandardItem* item); QStandardItem* QStandardItemModel_Item(const QStandardItemModel* self, int row); @@ -211,26 +227,87 @@ void QStandardItemModel_ItemChanged(QStandardItemModel* self, QStandardItem* ite void QStandardItemModel_connect_ItemChanged(QStandardItemModel* self, intptr_t slot); struct miqt_string QStandardItemModel_Tr2(const char* s, const char* c); struct miqt_string QStandardItemModel_Tr3(const char* s, const char* c, int n); -QModelIndex* QStandardItemModel_Index3(const QStandardItemModel* self, int row, int column, QModelIndex* parent); -int QStandardItemModel_RowCount1(const QStandardItemModel* self, QModelIndex* parent); -int QStandardItemModel_ColumnCount1(const QStandardItemModel* self, QModelIndex* parent); -bool QStandardItemModel_HasChildren1(const QStandardItemModel* self, QModelIndex* parent); -QVariant* QStandardItemModel_Data2(const QStandardItemModel* self, QModelIndex* index, int role); -bool QStandardItemModel_SetData3(QStandardItemModel* self, QModelIndex* index, QVariant* value, int role); -QVariant* QStandardItemModel_HeaderData3(const QStandardItemModel* self, int section, int orientation, int role); -bool QStandardItemModel_SetHeaderData4(QStandardItemModel* self, int section, int orientation, QVariant* value, int role); -bool QStandardItemModel_InsertRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent); -bool QStandardItemModel_InsertColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent); -bool QStandardItemModel_RemoveRows3(QStandardItemModel* self, int row, int count, QModelIndex* parent); -bool QStandardItemModel_RemoveColumns3(QStandardItemModel* self, int column, int count, QModelIndex* parent); -void QStandardItemModel_Sort2(QStandardItemModel* self, int column, int order); QStandardItem* QStandardItemModel_Item2(const QStandardItemModel* self, int row, int column); bool QStandardItemModel_InsertRow22(QStandardItemModel* self, int row, QModelIndex* parent); bool QStandardItemModel_InsertColumn2(QStandardItemModel* self, int column, QModelIndex* parent); QStandardItem* QStandardItemModel_TakeItem2(QStandardItemModel* self, int row, int column); struct miqt_array /* of QStandardItem* */ QStandardItemModel_FindItems2(const QStandardItemModel* self, struct miqt_string text, int flags); struct miqt_array /* of QStandardItem* */ QStandardItemModel_FindItems3(const QStandardItemModel* self, struct miqt_string text, int flags, int column); -void QStandardItemModel_Delete(QStandardItemModel* self); +void QStandardItemModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QStandardItemModel_virtualbase_RoleNames(const void* self); +void QStandardItemModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QStandardItemModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QStandardItemModel_override_virtual_RowCount(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QStandardItemModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QStandardItemModel_override_virtual_MultiData(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QStandardItemModel_override_virtual_SetData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QStandardItemModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QStandardItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QStandardItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QStandardItemModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QStandardItemModel_override_virtual_Flags(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_SupportedDropActions(const void* self); +void QStandardItemModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QStandardItemModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QStandardItemModel_override_virtual_Sort(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_Sort(void* self, int column, int order); +void QStandardItemModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QStandardItemModel_virtualbase_MimeTypes(const void* self); +void QStandardItemModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QStandardItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QStandardItemModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QStandardItemModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QStandardItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QStandardItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QStandardItemModel_virtualbase_SupportedDragActions(const void* self); +void QStandardItemModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QStandardItemModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QStandardItemModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QStandardItemModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QStandardItemModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QStandardItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QStandardItemModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QStandardItemModel_virtualbase_Span(const void* self, QModelIndex* index); +void QStandardItemModel_override_virtual_Submit(void* self, intptr_t slot); +bool QStandardItemModel_virtualbase_Submit(void* self); +void QStandardItemModel_override_virtual_Revert(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_Revert(void* self); +void QStandardItemModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QStandardItemModel_virtualbase_ResetInternalData(void* self); +void QStandardItemModel_Delete(QStandardItemModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstandardpaths.go b/qt6/gen_qstandardpaths.go index 414e89af..fff7a2bb 100644 --- a/qt6/gen_qstandardpaths.go +++ b/qt6/gen_qstandardpaths.go @@ -46,7 +46,8 @@ const ( ) type QStandardPaths struct { - h *C.QStandardPaths + h *C.QStandardPaths + isSubclass bool } func (this *QStandardPaths) cPointer() *C.QStandardPaths { @@ -63,6 +64,7 @@ func (this *QStandardPaths) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStandardPaths constructs the type using only CGO pointers. func newQStandardPaths(h *C.QStandardPaths) *QStandardPaths { if h == nil { return nil @@ -70,8 +72,13 @@ func newQStandardPaths(h *C.QStandardPaths) *QStandardPaths { return &QStandardPaths{h: h} } +// UnsafeNewQStandardPaths constructs the type using only unsafe pointers. func UnsafeNewQStandardPaths(h unsafe.Pointer) *QStandardPaths { - return newQStandardPaths((*C.QStandardPaths)(h)) + if h == nil { + return nil + } + + return &QStandardPaths{h: (*C.QStandardPaths)(h)} } func QStandardPaths_WritableLocation(typeVal QStandardPaths__StandardLocation) string { diff --git a/qt6/gen_qstatictext.cpp b/qt6/gen_qstatictext.cpp index 89977da8..74f05533 100644 --- a/qt6/gen_qstatictext.cpp +++ b/qt6/gen_qstatictext.cpp @@ -10,17 +10,20 @@ #include "gen_qstatictext.h" #include "_cgo_export.h" -QStaticText* QStaticText_new() { - return new QStaticText(); +void QStaticText_new(QStaticText** outptr_QStaticText) { + QStaticText* ret = new QStaticText(); + *outptr_QStaticText = ret; } -QStaticText* QStaticText_new2(struct miqt_string text) { +void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QStaticText(text_QString); + QStaticText* ret = new QStaticText(text_QString); + *outptr_QStaticText = ret; } -QStaticText* QStaticText_new3(QStaticText* other) { - return new QStaticText(*other); +void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText) { + QStaticText* ret = new QStaticText(*other); + *outptr_QStaticText = ret; } void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1) { @@ -106,7 +109,11 @@ void QStaticText_Prepare2(QStaticText* self, QTransform* matrix, QFont* font) { self->prepare(*matrix, *font); } -void QStaticText_Delete(QStaticText* self) { - delete self; +void QStaticText_Delete(QStaticText* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstatictext.go b/qt6/gen_qstatictext.go index 0bb071be..f3b9091b 100644 --- a/qt6/gen_qstatictext.go +++ b/qt6/gen_qstatictext.go @@ -21,7 +21,8 @@ const ( ) type QStaticText struct { - h *C.QStaticText + h *C.QStaticText + isSubclass bool } func (this *QStaticText) cPointer() *C.QStaticText { @@ -38,6 +39,7 @@ func (this *QStaticText) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStaticText constructs the type using only CGO pointers. func newQStaticText(h *C.QStaticText) *QStaticText { if h == nil { return nil @@ -45,14 +47,23 @@ func newQStaticText(h *C.QStaticText) *QStaticText { return &QStaticText{h: h} } +// UnsafeNewQStaticText constructs the type using only unsafe pointers. func UnsafeNewQStaticText(h unsafe.Pointer) *QStaticText { - return newQStaticText((*C.QStaticText)(h)) + if h == nil { + return nil + } + + return &QStaticText{h: (*C.QStaticText)(h)} } // NewQStaticText constructs a new QStaticText object. func NewQStaticText() *QStaticText { - ret := C.QStaticText_new() - return newQStaticText(ret) + var outptr_QStaticText *C.QStaticText = nil + + C.QStaticText_new(&outptr_QStaticText) + ret := newQStaticText(outptr_QStaticText) + ret.isSubclass = true + return ret } // NewQStaticText2 constructs a new QStaticText object. @@ -61,14 +72,22 @@ func NewQStaticText2(text string) *QStaticText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QStaticText_new2(text_ms) - return newQStaticText(ret) + var outptr_QStaticText *C.QStaticText = nil + + C.QStaticText_new2(text_ms, &outptr_QStaticText) + ret := newQStaticText(outptr_QStaticText) + ret.isSubclass = true + return ret } // NewQStaticText3 constructs a new QStaticText object. func NewQStaticText3(other *QStaticText) *QStaticText { - ret := C.QStaticText_new3(other.cPointer()) - return newQStaticText(ret) + var outptr_QStaticText *C.QStaticText = nil + + C.QStaticText_new3(other.cPointer(), &outptr_QStaticText) + ret := newQStaticText(outptr_QStaticText) + ret.isSubclass = true + return ret } func (this *QStaticText) OperatorAssign(param1 *QStaticText) { @@ -158,7 +177,7 @@ func (this *QStaticText) Prepare2(matrix *QTransform, font *QFont) { // Delete this object from C++ memory. func (this *QStaticText) Delete() { - C.QStaticText_Delete(this.h) + C.QStaticText_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstatictext.h b/qt6/gen_qstatictext.h index 321f4e83..9b14e499 100644 --- a/qt6/gen_qstatictext.h +++ b/qt6/gen_qstatictext.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -QStaticText* QStaticText_new(); -QStaticText* QStaticText_new2(struct miqt_string text); -QStaticText* QStaticText_new3(QStaticText* other); +void QStaticText_new(QStaticText** outptr_QStaticText); +void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText); +void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText); void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1); void QStaticText_Swap(QStaticText* self, QStaticText* other); void QStaticText_SetText(QStaticText* self, struct miqt_string text); @@ -49,7 +49,7 @@ bool QStaticText_OperatorEqual(const QStaticText* self, QStaticText* param1); bool QStaticText_OperatorNotEqual(const QStaticText* self, QStaticText* param1); void QStaticText_Prepare1(QStaticText* self, QTransform* matrix); void QStaticText_Prepare2(QStaticText* self, QTransform* matrix, QFont* font); -void QStaticText_Delete(QStaticText* self); +void QStaticText_Delete(QStaticText* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstatusbar.cpp b/qt6/gen_qstatusbar.cpp index 3706c108..73730526 100644 --- a/qt6/gen_qstatusbar.cpp +++ b/qt6/gen_qstatusbar.cpp @@ -1,19 +1,1041 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include #include "gen_qstatusbar.h" #include "_cgo_export.h" -QStatusBar* QStatusBar_new(QWidget* parent) { - return new QStatusBar(parent); +class MiqtVirtualQStatusBar : public virtual QStatusBar { +public: + + MiqtVirtualQStatusBar(QWidget* parent): QStatusBar(parent) {}; + MiqtVirtualQStatusBar(): QStatusBar() {}; + + virtual ~MiqtVirtualQStatusBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QStatusBar::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QStatusBar::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QStatusBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QStatusBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QStatusBar::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QStatusBar::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QStatusBar::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QStatusBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QStatusBar::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QStatusBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QStatusBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QStatusBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QStatusBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QStatusBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QStatusBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QStatusBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStatusBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QStatusBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QStatusBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QStatusBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QStatusBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QStatusBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QStatusBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QStatusBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QStatusBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QStatusBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QStatusBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QStatusBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QStatusBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QStatusBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QStatusBar::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QStatusBar::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QStatusBar::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QStatusBar::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QStatusBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QStatusBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QStatusBar::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QStatusBar::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QStatusBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QStatusBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QStatusBar::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QStatusBar::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QStatusBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QStatusBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QStatusBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QStatusBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QStatusBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QStatusBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QStatusBar::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QStatusBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QStatusBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QStatusBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QStatusBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QStatusBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QStatusBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QStatusBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QStatusBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QStatusBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QStatusBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QStatusBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QStatusBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QStatusBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QStatusBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QStatusBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QStatusBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QStatusBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QStatusBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QStatusBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QStatusBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QStatusBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QStatusBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QStatusBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QStatusBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QStatusBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QStatusBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QStatusBar::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QStatusBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QStatusBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QStatusBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QStatusBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QStatusBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QStatusBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QStatusBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QStatusBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QStatusBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QStatusBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QStatusBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QStatusBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QStatusBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QStatusBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QStatusBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QStatusBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QStatusBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QStatusBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QStatusBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QStatusBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QStatusBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QStatusBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QStatusBar::focusNextPrevChild(next); + + } + +}; + +void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(parent); + *outptr_QStatusBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QStatusBar* QStatusBar_new2() { - return new QStatusBar(); +void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(); + *outptr_QStatusBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QStatusBar_MetaObject(const QStatusBar* self) { @@ -89,7 +1111,7 @@ void QStatusBar_MessageChanged(QStatusBar* self, struct miqt_string text) { } void QStatusBar_connect_MessageChanged(QStatusBar* self, intptr_t slot) { - QStatusBar::connect(self, static_cast(&QStatusBar::messageChanged), self, [=](const QString& text) { + MiqtVirtualQStatusBar::connect(self, static_cast(&QStatusBar::messageChanged), self, [=](const QString& text) { const QString text_ret = text; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray text_b = text_ret.toUtf8(); @@ -145,7 +1167,339 @@ void QStatusBar_ShowMessage2(QStatusBar* self, struct miqt_string text, int time self->showMessage(text_QString, static_cast(timeout)); } -void QStatusBar_Delete(QStatusBar* self) { - delete self; +void QStatusBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ShowEvent = slot; +} + +void QStatusBar_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ShowEvent(param1); +} + +void QStatusBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__PaintEvent = slot; +} + +void QStatusBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QStatusBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ResizeEvent = slot; +} + +void QStatusBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QStatusBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__Event = slot; +} + +bool QStatusBar_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_Event(param1); +} + +void QStatusBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DevType = slot; +} + +int QStatusBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_DevType(); +} + +void QStatusBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__SetVisible = slot; +} + +void QStatusBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QStatusBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QStatusBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_SizeHint(); +} + +void QStatusBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QStatusBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QStatusBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__HeightForWidth = slot; +} + +int QStatusBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QStatusBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QStatusBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QStatusBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QStatusBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_PaintEngine(); +} + +void QStatusBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MousePressEvent = slot; +} + +void QStatusBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MousePressEvent(event); +} + +void QStatusBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QStatusBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QStatusBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QStatusBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QStatusBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QStatusBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QStatusBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__WheelEvent = slot; +} + +void QStatusBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QStatusBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QStatusBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QStatusBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QStatusBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QStatusBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__FocusInEvent = slot; +} + +void QStatusBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QStatusBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QStatusBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QStatusBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__EnterEvent = slot; +} + +void QStatusBar_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QStatusBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__LeaveEvent = slot; +} + +void QStatusBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QStatusBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__MoveEvent = slot; +} + +void QStatusBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QStatusBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__CloseEvent = slot; +} + +void QStatusBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QStatusBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QStatusBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QStatusBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__TabletEvent = slot; +} + +void QStatusBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QStatusBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ActionEvent = slot; +} + +void QStatusBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QStatusBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QStatusBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QStatusBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QStatusBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QStatusBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QStatusBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QStatusBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__DropEvent = slot; +} + +void QStatusBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_DropEvent(event); +} + +void QStatusBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__HideEvent = slot; +} + +void QStatusBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_HideEvent(event); +} + +void QStatusBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__NativeEvent = slot; +} + +bool QStatusBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QStatusBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__ChangeEvent = slot; +} + +void QStatusBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QStatusBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__Metric = slot; +} + +int QStatusBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_Metric(param1); +} + +void QStatusBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__InitPainter = slot; +} + +void QStatusBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QStatusBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QStatusBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_Redirected(offset); +} + +void QStatusBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QStatusBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_SharedPainter(); +} + +void QStatusBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QStatusBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QStatusBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QStatusBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQStatusBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QStatusBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QStatusBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QStatusBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQStatusBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QStatusBar_Delete(QStatusBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstatusbar.go b/qt6/gen_qstatusbar.go index 07db43c7..e34cfcb7 100644 --- a/qt6/gen_qstatusbar.go +++ b/qt6/gen_qstatusbar.go @@ -15,7 +15,8 @@ import ( ) type QStatusBar struct { - h *C.QStatusBar + h *C.QStatusBar + isSubclass bool *QWidget } @@ -33,27 +34,49 @@ func (this *QStatusBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStatusBar(h *C.QStatusBar) *QStatusBar { +// newQStatusBar constructs the type using only CGO pointers. +func newQStatusBar(h *C.QStatusBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStatusBar { if h == nil { return nil } - return &QStatusBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QStatusBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQStatusBar(h unsafe.Pointer) *QStatusBar { - return newQStatusBar((*C.QStatusBar)(h)) +// UnsafeNewQStatusBar constructs the type using only unsafe pointers. +func UnsafeNewQStatusBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStatusBar { + if h == nil { + return nil + } + + return &QStatusBar{h: (*C.QStatusBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQStatusBar constructs a new QStatusBar object. func NewQStatusBar(parent *QWidget) *QStatusBar { - ret := C.QStatusBar_new(parent.cPointer()) - return newQStatusBar(ret) + var outptr_QStatusBar *C.QStatusBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStatusBar_new(parent.cPointer(), &outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQStatusBar2 constructs a new QStatusBar object. func NewQStatusBar2() *QStatusBar { - ret := C.QStatusBar_new2() - return newQStatusBar(ret) + var outptr_QStatusBar *C.QStatusBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QStatusBar_new2(&outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QStatusBar) MetaObject() *QMetaObject { @@ -195,9 +218,975 @@ func (this *QStatusBar) ShowMessage2(text string, timeout int) { C.QStatusBar_ShowMessage2(this.h, text_ms, (C.int)(timeout)) } +func (this *QStatusBar) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QStatusBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QStatusBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ShowEvent +func miqt_exec_callback_QStatusBar_ShowEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QStatusBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QStatusBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_PaintEvent +func miqt_exec_callback_QStatusBar_PaintEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QStatusBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QStatusBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ResizeEvent +func miqt_exec_callback_QStatusBar_ResizeEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QStatusBar_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QStatusBar) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QStatusBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_Event +func miqt_exec_callback_QStatusBar_Event(self *C.QStatusBar, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_DevType() int { + + return (int)(C.QStatusBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QStatusBar) OnDevType(slot func(super func() int) int) { + C.QStatusBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DevType +func miqt_exec_callback_QStatusBar_DevType(self *C.QStatusBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_SetVisible(visible bool) { + + C.QStatusBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QStatusBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QStatusBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_SetVisible +func miqt_exec_callback_QStatusBar_SetVisible(self *C.QStatusBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QStatusBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QStatusBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStatusBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QStatusBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_SizeHint +func miqt_exec_callback_QStatusBar_SizeHint(self *C.QStatusBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QStatusBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStatusBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QStatusBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MinimumSizeHint +func miqt_exec_callback_QStatusBar_MinimumSizeHint(self *C.QStatusBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QStatusBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QStatusBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QStatusBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_HeightForWidth +func miqt_exec_callback_QStatusBar_HeightForWidth(self *C.QStatusBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QStatusBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QStatusBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QStatusBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_HasHeightForWidth +func miqt_exec_callback_QStatusBar_HasHeightForWidth(self *C.QStatusBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QStatusBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QStatusBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QStatusBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_PaintEngine +func miqt_exec_callback_QStatusBar_PaintEngine(self *C.QStatusBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MousePressEvent +func miqt_exec_callback_QStatusBar_MousePressEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MouseReleaseEvent +func miqt_exec_callback_QStatusBar_MouseReleaseEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MouseDoubleClickEvent +func miqt_exec_callback_QStatusBar_MouseDoubleClickEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QStatusBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QStatusBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MouseMoveEvent +func miqt_exec_callback_QStatusBar_MouseMoveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QStatusBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QStatusBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_WheelEvent +func miqt_exec_callback_QStatusBar_WheelEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QStatusBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QStatusBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_KeyPressEvent +func miqt_exec_callback_QStatusBar_KeyPressEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QStatusBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QStatusBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_KeyReleaseEvent +func miqt_exec_callback_QStatusBar_KeyReleaseEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QStatusBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QStatusBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_FocusInEvent +func miqt_exec_callback_QStatusBar_FocusInEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QStatusBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QStatusBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_FocusOutEvent +func miqt_exec_callback_QStatusBar_FocusOutEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QStatusBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QStatusBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_EnterEvent +func miqt_exec_callback_QStatusBar_EnterEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QStatusBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStatusBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_LeaveEvent +func miqt_exec_callback_QStatusBar_LeaveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QStatusBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QStatusBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_MoveEvent +func miqt_exec_callback_QStatusBar_MoveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QStatusBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QStatusBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_CloseEvent +func miqt_exec_callback_QStatusBar_CloseEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QStatusBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QStatusBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ContextMenuEvent +func miqt_exec_callback_QStatusBar_ContextMenuEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QStatusBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QStatusBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_TabletEvent +func miqt_exec_callback_QStatusBar_TabletEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QStatusBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QStatusBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ActionEvent +func miqt_exec_callback_QStatusBar_ActionEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QStatusBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QStatusBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DragEnterEvent +func miqt_exec_callback_QStatusBar_DragEnterEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QStatusBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QStatusBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DragMoveEvent +func miqt_exec_callback_QStatusBar_DragMoveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QStatusBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QStatusBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DragLeaveEvent +func miqt_exec_callback_QStatusBar_DragLeaveEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QStatusBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QStatusBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_DropEvent +func miqt_exec_callback_QStatusBar_DropEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QStatusBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStatusBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QStatusBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_HideEvent +func miqt_exec_callback_QStatusBar_HideEvent(self *C.QStatusBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QStatusBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QStatusBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QStatusBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_NativeEvent +func miqt_exec_callback_QStatusBar_NativeEvent(self *C.QStatusBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QStatusBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QStatusBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_ChangeEvent +func miqt_exec_callback_QStatusBar_ChangeEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QStatusBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QStatusBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QStatusBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_Metric +func miqt_exec_callback_QStatusBar_Metric(self *C.QStatusBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStatusBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QStatusBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QStatusBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QStatusBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_InitPainter +func miqt_exec_callback_QStatusBar_InitPainter(self *C.QStatusBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QStatusBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QStatusBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QStatusBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QStatusBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_Redirected +func miqt_exec_callback_QStatusBar_Redirected(self *C.QStatusBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QStatusBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QStatusBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QStatusBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_SharedPainter +func miqt_exec_callback_QStatusBar_SharedPainter(self *C.QStatusBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QStatusBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QStatusBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QStatusBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_InputMethodEvent +func miqt_exec_callback_QStatusBar_InputMethodEvent(self *C.QStatusBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QStatusBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QStatusBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QStatusBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStatusBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QStatusBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_InputMethodQuery +func miqt_exec_callback_QStatusBar_InputMethodQuery(self *C.QStatusBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStatusBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QStatusBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QStatusBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QStatusBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStatusBar_FocusNextPrevChild +func miqt_exec_callback_QStatusBar_FocusNextPrevChild(self *C.QStatusBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QStatusBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QStatusBar) Delete() { - C.QStatusBar_Delete(this.h) + C.QStatusBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstatusbar.h b/qt6/gen_qstatusbar.h index d564b6ec..71849396 100644 --- a/qt6/gen_qstatusbar.h +++ b/qt6/gen_qstatusbar.h @@ -15,17 +15,73 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; class QStatusBar; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QStatusBar QStatusBar; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QStatusBar* QStatusBar_new(QWidget* parent); -QStatusBar* QStatusBar_new2(); +void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QStatusBar_MetaObject(const QStatusBar* self); void* QStatusBar_Metacast(QStatusBar* self, const char* param1); struct miqt_string QStatusBar_Tr(const char* s); @@ -41,6 +97,10 @@ void QStatusBar_ShowMessage(QStatusBar* self, struct miqt_string text); void QStatusBar_ClearMessage(QStatusBar* self); void QStatusBar_MessageChanged(QStatusBar* self, struct miqt_string text); void QStatusBar_connect_MessageChanged(QStatusBar* self, intptr_t slot); +void QStatusBar_ShowEvent(QStatusBar* self, QShowEvent* param1); +void QStatusBar_PaintEvent(QStatusBar* self, QPaintEvent* param1); +void QStatusBar_ResizeEvent(QStatusBar* self, QResizeEvent* param1); +bool QStatusBar_Event(QStatusBar* self, QEvent* param1); struct miqt_string QStatusBar_Tr2(const char* s, const char* c); struct miqt_string QStatusBar_Tr3(const char* s, const char* c, int n); void QStatusBar_AddWidget2(QStatusBar* self, QWidget* widget, int stretch); @@ -48,7 +108,89 @@ int QStatusBar_InsertWidget3(QStatusBar* self, int index, QWidget* widget, int s void QStatusBar_AddPermanentWidget2(QStatusBar* self, QWidget* widget, int stretch); int QStatusBar_InsertPermanentWidget3(QStatusBar* self, int index, QWidget* widget, int stretch); void QStatusBar_ShowMessage2(QStatusBar* self, struct miqt_string text, int timeout); -void QStatusBar_Delete(QStatusBar* self); +void QStatusBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QStatusBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QStatusBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QStatusBar_override_virtual_Event(void* self, intptr_t slot); +bool QStatusBar_virtualbase_Event(void* self, QEvent* param1); +void QStatusBar_override_virtual_DevType(void* self, intptr_t slot); +int QStatusBar_virtualbase_DevType(const void* self); +void QStatusBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QStatusBar_virtualbase_SetVisible(void* self, bool visible); +void QStatusBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStatusBar_virtualbase_SizeHint(const void* self); +void QStatusBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QStatusBar_virtualbase_MinimumSizeHint(const void* self); +void QStatusBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QStatusBar_virtualbase_HeightForWidth(const void* self, int param1); +void QStatusBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QStatusBar_virtualbase_HasHeightForWidth(const void* self); +void QStatusBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QStatusBar_virtualbase_PaintEngine(const void* self); +void QStatusBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QStatusBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QStatusBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QStatusBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QStatusBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QStatusBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QStatusBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QStatusBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QStatusBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QStatusBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QStatusBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QStatusBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QStatusBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QStatusBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QStatusBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QStatusBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QStatusBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QStatusBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QStatusBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QStatusBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QStatusBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QStatusBar_override_virtual_Metric(void* self, intptr_t slot); +int QStatusBar_virtualbase_Metric(const void* self, int param1); +void QStatusBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QStatusBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QStatusBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QStatusBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QStatusBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QStatusBar_virtualbase_SharedPainter(const void* self); +void QStatusBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QStatusBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QStatusBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QStatusBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QStatusBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QStatusBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QStatusBar_Delete(QStatusBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstorageinfo.cpp b/qt6/gen_qstorageinfo.cpp index 35a393c3..bd643154 100644 --- a/qt6/gen_qstorageinfo.cpp +++ b/qt6/gen_qstorageinfo.cpp @@ -9,21 +9,25 @@ #include "gen_qstorageinfo.h" #include "_cgo_export.h" -QStorageInfo* QStorageInfo_new() { - return new QStorageInfo(); +void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo) { + QStorageInfo* ret = new QStorageInfo(); + *outptr_QStorageInfo = ret; } -QStorageInfo* QStorageInfo_new2(struct miqt_string path) { +void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo) { QString path_QString = QString::fromUtf8(path.data, path.len); - return new QStorageInfo(path_QString); + QStorageInfo* ret = new QStorageInfo(path_QString); + *outptr_QStorageInfo = ret; } -QStorageInfo* QStorageInfo_new3(QDir* dir) { - return new QStorageInfo(*dir); +void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo) { + QStorageInfo* ret = new QStorageInfo(*dir); + *outptr_QStorageInfo = ret; } -QStorageInfo* QStorageInfo_new4(QStorageInfo* other) { - return new QStorageInfo(*other); +void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo) { + QStorageInfo* ret = new QStorageInfo(*other); + *outptr_QStorageInfo = ret; } void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other) { @@ -155,7 +159,11 @@ QStorageInfo* QStorageInfo_Root() { return new QStorageInfo(QStorageInfo::root()); } -void QStorageInfo_Delete(QStorageInfo* self) { - delete self; +void QStorageInfo_Delete(QStorageInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstorageinfo.go b/qt6/gen_qstorageinfo.go index 67fd791b..9a5905d0 100644 --- a/qt6/gen_qstorageinfo.go +++ b/qt6/gen_qstorageinfo.go @@ -14,7 +14,8 @@ import ( ) type QStorageInfo struct { - h *C.QStorageInfo + h *C.QStorageInfo + isSubclass bool } func (this *QStorageInfo) cPointer() *C.QStorageInfo { @@ -31,6 +32,7 @@ func (this *QStorageInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStorageInfo constructs the type using only CGO pointers. func newQStorageInfo(h *C.QStorageInfo) *QStorageInfo { if h == nil { return nil @@ -38,14 +40,23 @@ func newQStorageInfo(h *C.QStorageInfo) *QStorageInfo { return &QStorageInfo{h: h} } +// UnsafeNewQStorageInfo constructs the type using only unsafe pointers. func UnsafeNewQStorageInfo(h unsafe.Pointer) *QStorageInfo { - return newQStorageInfo((*C.QStorageInfo)(h)) + if h == nil { + return nil + } + + return &QStorageInfo{h: (*C.QStorageInfo)(h)} } // NewQStorageInfo constructs a new QStorageInfo object. func NewQStorageInfo() *QStorageInfo { - ret := C.QStorageInfo_new() - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new(&outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } // NewQStorageInfo2 constructs a new QStorageInfo object. @@ -54,20 +65,32 @@ func NewQStorageInfo2(path string) *QStorageInfo { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - ret := C.QStorageInfo_new2(path_ms) - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new2(path_ms, &outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } // NewQStorageInfo3 constructs a new QStorageInfo object. func NewQStorageInfo3(dir *QDir) *QStorageInfo { - ret := C.QStorageInfo_new3(dir.cPointer()) - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new3(dir.cPointer(), &outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } // NewQStorageInfo4 constructs a new QStorageInfo object. func NewQStorageInfo4(other *QStorageInfo) *QStorageInfo { - ret := C.QStorageInfo_new4(other.cPointer()) - return newQStorageInfo(ret) + var outptr_QStorageInfo *C.QStorageInfo = nil + + C.QStorageInfo_new4(other.cPointer(), &outptr_QStorageInfo) + ret := newQStorageInfo(outptr_QStorageInfo) + ret.isSubclass = true + return ret } func (this *QStorageInfo) OperatorAssign(other *QStorageInfo) { @@ -186,7 +209,7 @@ func QStorageInfo_Root() *QStorageInfo { // Delete this object from C++ memory. func (this *QStorageInfo) Delete() { - C.QStorageInfo_Delete(this.h) + C.QStorageInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstorageinfo.h b/qt6/gen_qstorageinfo.h index 8719a197..e065d05d 100644 --- a/qt6/gen_qstorageinfo.h +++ b/qt6/gen_qstorageinfo.h @@ -24,10 +24,10 @@ typedef struct QDir QDir; typedef struct QStorageInfo QStorageInfo; #endif -QStorageInfo* QStorageInfo_new(); -QStorageInfo* QStorageInfo_new2(struct miqt_string path); -QStorageInfo* QStorageInfo_new3(QDir* dir); -QStorageInfo* QStorageInfo_new4(QStorageInfo* other); +void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo); +void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo); +void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo); +void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo); void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_Swap(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_SetPath(QStorageInfo* self, struct miqt_string path); @@ -48,7 +48,7 @@ bool QStorageInfo_IsValid(const QStorageInfo* self); void QStorageInfo_Refresh(QStorageInfo* self); struct miqt_array /* of QStorageInfo* */ QStorageInfo_MountedVolumes(); QStorageInfo* QStorageInfo_Root(); -void QStorageInfo_Delete(QStorageInfo* self); +void QStorageInfo_Delete(QStorageInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringbuilder.cpp b/qt6/gen_qstringbuilder.cpp index 15758bdf..4018eb00 100644 --- a/qt6/gen_qstringbuilder.cpp +++ b/qt6/gen_qstringbuilder.cpp @@ -2,7 +2,11 @@ #include "gen_qstringbuilder.h" #include "_cgo_export.h" -void QAbstractConcatenable_Delete(QAbstractConcatenable* self) { - delete self; +void QAbstractConcatenable_Delete(QAbstractConcatenable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstringbuilder.go b/qt6/gen_qstringbuilder.go index 729ca0be..3bcd472a 100644 --- a/qt6/gen_qstringbuilder.go +++ b/qt6/gen_qstringbuilder.go @@ -14,7 +14,8 @@ import ( ) type QAbstractConcatenable struct { - h *C.QAbstractConcatenable + h *C.QAbstractConcatenable + isSubclass bool } func (this *QAbstractConcatenable) cPointer() *C.QAbstractConcatenable { @@ -31,6 +32,7 @@ func (this *QAbstractConcatenable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractConcatenable constructs the type using only CGO pointers. func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable { if h == nil { return nil @@ -38,13 +40,18 @@ func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable return &QAbstractConcatenable{h: h} } +// UnsafeNewQAbstractConcatenable constructs the type using only unsafe pointers. func UnsafeNewQAbstractConcatenable(h unsafe.Pointer) *QAbstractConcatenable { - return newQAbstractConcatenable((*C.QAbstractConcatenable)(h)) + if h == nil { + return nil + } + + return &QAbstractConcatenable{h: (*C.QAbstractConcatenable)(h)} } // Delete this object from C++ memory. func (this *QAbstractConcatenable) Delete() { - C.QAbstractConcatenable_Delete(this.h) + C.QAbstractConcatenable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstringbuilder.h b/qt6/gen_qstringbuilder.h index 4287aee1..423270a4 100644 --- a/qt6/gen_qstringbuilder.h +++ b/qt6/gen_qstringbuilder.h @@ -20,7 +20,7 @@ class QAbstractConcatenable; typedef struct QAbstractConcatenable QAbstractConcatenable; #endif -void QAbstractConcatenable_Delete(QAbstractConcatenable* self); +void QAbstractConcatenable_Delete(QAbstractConcatenable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringconverter.cpp b/qt6/gen_qstringconverter.cpp index 689dbd1b..864fe4b4 100644 --- a/qt6/gen_qstringconverter.cpp +++ b/qt6/gen_qstringconverter.cpp @@ -1,29 +1,46 @@ #include #include +#include +#include #include #include #include #include "gen_qstringconverter.h" #include "_cgo_export.h" -QStringEncoder* QStringEncoder_new() { - return new QStringEncoder(); +void QStringEncoder_new(QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringEncoder* ret = new QStringEncoder(); + *outptr_QStringEncoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringEncoder* QStringEncoder_new2(int encoding) { - return new QStringEncoder(static_cast(encoding)); +void QStringEncoder_new2(int encoding, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringEncoder* ret = new QStringEncoder(static_cast(encoding)); + *outptr_QStringEncoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringEncoder* QStringEncoder_new3(const char* name) { - return new QStringEncoder(name); +void QStringEncoder_new3(const char* name, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringEncoder* ret = new QStringEncoder(name); + *outptr_QStringEncoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringEncoder* QStringEncoder_new4(int encoding, int flags) { - return new QStringEncoder(static_cast(encoding), static_cast(flags)); +void QStringEncoder_new4(int encoding, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringEncoder* ret = new QStringEncoder(static_cast(encoding), static_cast(flags)); + *outptr_QStringEncoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringEncoder* QStringEncoder_new5(const char* name, int flags) { - return new QStringEncoder(name, static_cast(flags)); +void QStringEncoder_new5(const char* name, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringEncoder* ret = new QStringEncoder(name, static_cast(flags)); + *outptr_QStringEncoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } ptrdiff_t QStringEncoder_RequiredSpace(const QStringEncoder* self, ptrdiff_t inputLength) { @@ -31,28 +48,47 @@ ptrdiff_t QStringEncoder_RequiredSpace(const QStringEncoder* self, ptrdiff_t inp return static_cast(_ret); } -void QStringEncoder_Delete(QStringEncoder* self) { - delete self; +void QStringEncoder_Delete(QStringEncoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStringDecoder* QStringDecoder_new(int encoding) { - return new QStringDecoder(static_cast(encoding)); +void QStringDecoder_new(int encoding, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringDecoder* ret = new QStringDecoder(static_cast(encoding)); + *outptr_QStringDecoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringDecoder* QStringDecoder_new2() { - return new QStringDecoder(); +void QStringDecoder_new2(QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringDecoder* ret = new QStringDecoder(); + *outptr_QStringDecoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringDecoder* QStringDecoder_new3(const char* name) { - return new QStringDecoder(name); +void QStringDecoder_new3(const char* name, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringDecoder* ret = new QStringDecoder(name); + *outptr_QStringDecoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringDecoder* QStringDecoder_new4(int encoding, int flags) { - return new QStringDecoder(static_cast(encoding), static_cast(flags)); +void QStringDecoder_new4(int encoding, int flags, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringDecoder* ret = new QStringDecoder(static_cast(encoding), static_cast(flags)); + *outptr_QStringDecoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } -QStringDecoder* QStringDecoder_new5(const char* name, int f) { - return new QStringDecoder(name, static_cast(f)); +void QStringDecoder_new5(const char* name, int f, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { + QStringDecoder* ret = new QStringDecoder(name, static_cast(f)); + *outptr_QStringDecoder = ret; + *outptr_QStringConverter = static_cast(ret); + *outptr_QStringConverterBase = static_cast(ret); } ptrdiff_t QStringDecoder_RequiredSpace(const QStringDecoder* self, ptrdiff_t inputLength) { @@ -68,7 +104,11 @@ QStringDecoder* QStringDecoder_DecoderForHtml(QByteArrayView* data) { return new QStringDecoder(QStringDecoder::decoderForHtml(*data)); } -void QStringDecoder_Delete(QStringDecoder* self) { - delete self; +void QStringDecoder_Delete(QStringDecoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstringconverter.go b/qt6/gen_qstringconverter.go index 7e271361..f4f267ac 100644 --- a/qt6/gen_qstringconverter.go +++ b/qt6/gen_qstringconverter.go @@ -14,7 +14,8 @@ import ( ) type QStringEncoder struct { - h *C.QStringEncoder + h *C.QStringEncoder + isSubclass bool *QStringConverter } @@ -32,49 +33,87 @@ func (this *QStringEncoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStringEncoder(h *C.QStringEncoder) *QStringEncoder { +// newQStringEncoder constructs the type using only CGO pointers. +func newQStringEncoder(h *C.QStringEncoder, h_QStringConverter *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringEncoder { if h == nil { return nil } - return &QStringEncoder{h: h, QStringConverter: UnsafeNewQStringConverter(unsafe.Pointer(h))} + return &QStringEncoder{h: h, + QStringConverter: newQStringConverter(h_QStringConverter, h_QStringConverterBase)} } -func UnsafeNewQStringEncoder(h unsafe.Pointer) *QStringEncoder { - return newQStringEncoder((*C.QStringEncoder)(h)) +// UnsafeNewQStringEncoder constructs the type using only unsafe pointers. +func UnsafeNewQStringEncoder(h unsafe.Pointer, h_QStringConverter unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringEncoder { + if h == nil { + return nil + } + + return &QStringEncoder{h: (*C.QStringEncoder)(h), + QStringConverter: UnsafeNewQStringConverter(h_QStringConverter, h_QStringConverterBase)} } // NewQStringEncoder constructs a new QStringEncoder object. func NewQStringEncoder() *QStringEncoder { - ret := C.QStringEncoder_new() - return newQStringEncoder(ret) + var outptr_QStringEncoder *C.QStringEncoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringEncoder_new(&outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringEncoder2 constructs a new QStringEncoder object. func NewQStringEncoder2(encoding QStringConverter__Encoding) *QStringEncoder { - ret := C.QStringEncoder_new2((C.int)(encoding)) - return newQStringEncoder(ret) + var outptr_QStringEncoder *C.QStringEncoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringEncoder_new2((C.int)(encoding), &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringEncoder3 constructs a new QStringEncoder object. func NewQStringEncoder3(name string) *QStringEncoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - ret := C.QStringEncoder_new3(name_Cstring) - return newQStringEncoder(ret) + var outptr_QStringEncoder *C.QStringEncoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringEncoder_new3(name_Cstring, &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringEncoder4 constructs a new QStringEncoder object. func NewQStringEncoder4(encoding QStringConverter__Encoding, flags QStringConverterBase__Flag) *QStringEncoder { - ret := C.QStringEncoder_new4((C.int)(encoding), (C.int)(flags)) - return newQStringEncoder(ret) + var outptr_QStringEncoder *C.QStringEncoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringEncoder_new4((C.int)(encoding), (C.int)(flags), &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringEncoder5 constructs a new QStringEncoder object. func NewQStringEncoder5(name string, flags QStringConverterBase__Flag) *QStringEncoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - ret := C.QStringEncoder_new5(name_Cstring, (C.int)(flags)) - return newQStringEncoder(ret) + var outptr_QStringEncoder *C.QStringEncoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringEncoder_new5(name_Cstring, (C.int)(flags), &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } func (this *QStringEncoder) RequiredSpace(inputLength int64) int64 { @@ -83,7 +122,7 @@ func (this *QStringEncoder) RequiredSpace(inputLength int64) int64 { // Delete this object from C++ memory. func (this *QStringEncoder) Delete() { - C.QStringEncoder_Delete(this.h) + C.QStringEncoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -96,7 +135,8 @@ func (this *QStringEncoder) GoGC() { } type QStringDecoder struct { - h *C.QStringDecoder + h *C.QStringDecoder + isSubclass bool *QStringConverter } @@ -114,49 +154,87 @@ func (this *QStringDecoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStringDecoder(h *C.QStringDecoder) *QStringDecoder { +// newQStringDecoder constructs the type using only CGO pointers. +func newQStringDecoder(h *C.QStringDecoder, h_QStringConverter *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringDecoder { if h == nil { return nil } - return &QStringDecoder{h: h, QStringConverter: UnsafeNewQStringConverter(unsafe.Pointer(h))} + return &QStringDecoder{h: h, + QStringConverter: newQStringConverter(h_QStringConverter, h_QStringConverterBase)} } -func UnsafeNewQStringDecoder(h unsafe.Pointer) *QStringDecoder { - return newQStringDecoder((*C.QStringDecoder)(h)) +// UnsafeNewQStringDecoder constructs the type using only unsafe pointers. +func UnsafeNewQStringDecoder(h unsafe.Pointer, h_QStringConverter unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringDecoder { + if h == nil { + return nil + } + + return &QStringDecoder{h: (*C.QStringDecoder)(h), + QStringConverter: UnsafeNewQStringConverter(h_QStringConverter, h_QStringConverterBase)} } // NewQStringDecoder constructs a new QStringDecoder object. func NewQStringDecoder(encoding QStringConverter__Encoding) *QStringDecoder { - ret := C.QStringDecoder_new((C.int)(encoding)) - return newQStringDecoder(ret) + var outptr_QStringDecoder *C.QStringDecoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringDecoder_new((C.int)(encoding), &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringDecoder2 constructs a new QStringDecoder object. func NewQStringDecoder2() *QStringDecoder { - ret := C.QStringDecoder_new2() - return newQStringDecoder(ret) + var outptr_QStringDecoder *C.QStringDecoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringDecoder_new2(&outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringDecoder3 constructs a new QStringDecoder object. func NewQStringDecoder3(name string) *QStringDecoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - ret := C.QStringDecoder_new3(name_Cstring) - return newQStringDecoder(ret) + var outptr_QStringDecoder *C.QStringDecoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringDecoder_new3(name_Cstring, &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringDecoder4 constructs a new QStringDecoder object. func NewQStringDecoder4(encoding QStringConverter__Encoding, flags QStringConverterBase__Flag) *QStringDecoder { - ret := C.QStringDecoder_new4((C.int)(encoding), (C.int)(flags)) - return newQStringDecoder(ret) + var outptr_QStringDecoder *C.QStringDecoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringDecoder_new4((C.int)(encoding), (C.int)(flags), &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringDecoder5 constructs a new QStringDecoder object. func NewQStringDecoder5(name string, f QStringConverterBase__Flag) *QStringDecoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - ret := C.QStringDecoder_new5(name_Cstring, (C.int)(f)) - return newQStringDecoder(ret) + var outptr_QStringDecoder *C.QStringDecoder = nil + var outptr_QStringConverter *C.QStringConverter = nil + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringDecoder_new5(name_Cstring, (C.int)(f), &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) + ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret.isSubclass = true + return ret } func (this *QStringDecoder) RequiredSpace(inputLength int64) int64 { @@ -169,14 +247,14 @@ func (this *QStringDecoder) AppendToBuffer(out *QChar, ba QByteArrayView) *QChar func QStringDecoder_DecoderForHtml(data QByteArrayView) *QStringDecoder { _ret := C.QStringDecoder_DecoderForHtml(data.cPointer()) - _goptr := newQStringDecoder(_ret) + _goptr := newQStringDecoder(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } // Delete this object from C++ memory. func (this *QStringDecoder) Delete() { - C.QStringDecoder_Delete(this.h) + C.QStringDecoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstringconverter.h b/qt6/gen_qstringconverter.h index a4aef377..7d60d94d 100644 --- a/qt6/gen_qstringconverter.h +++ b/qt6/gen_qstringconverter.h @@ -17,32 +17,36 @@ extern "C" { #ifdef __cplusplus class QByteArrayView; class QChar; +class QStringConverter; +class QStringConverterBase; class QStringDecoder; class QStringEncoder; #else typedef struct QByteArrayView QByteArrayView; typedef struct QChar QChar; +typedef struct QStringConverter QStringConverter; +typedef struct QStringConverterBase QStringConverterBase; typedef struct QStringDecoder QStringDecoder; typedef struct QStringEncoder QStringEncoder; #endif -QStringEncoder* QStringEncoder_new(); -QStringEncoder* QStringEncoder_new2(int encoding); -QStringEncoder* QStringEncoder_new3(const char* name); -QStringEncoder* QStringEncoder_new4(int encoding, int flags); -QStringEncoder* QStringEncoder_new5(const char* name, int flags); +void QStringEncoder_new(QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringEncoder_new2(int encoding, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringEncoder_new3(const char* name, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringEncoder_new4(int encoding, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringEncoder_new5(const char* name, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); ptrdiff_t QStringEncoder_RequiredSpace(const QStringEncoder* self, ptrdiff_t inputLength); -void QStringEncoder_Delete(QStringEncoder* self); +void QStringEncoder_Delete(QStringEncoder* self, bool isSubclass); -QStringDecoder* QStringDecoder_new(int encoding); -QStringDecoder* QStringDecoder_new2(); -QStringDecoder* QStringDecoder_new3(const char* name); -QStringDecoder* QStringDecoder_new4(int encoding, int flags); -QStringDecoder* QStringDecoder_new5(const char* name, int f); +void QStringDecoder_new(int encoding, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringDecoder_new2(QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringDecoder_new3(const char* name, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringDecoder_new4(int encoding, int flags, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +void QStringDecoder_new5(const char* name, int f, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); ptrdiff_t QStringDecoder_RequiredSpace(const QStringDecoder* self, ptrdiff_t inputLength); QChar* QStringDecoder_AppendToBuffer(QStringDecoder* self, QChar* out, QByteArrayView* ba); QStringDecoder* QStringDecoder_DecoderForHtml(QByteArrayView* data); -void QStringDecoder_Delete(QStringDecoder* self); +void QStringDecoder_Delete(QStringDecoder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringconverter_base.cpp b/qt6/gen_qstringconverter_base.cpp index a88e840c..3ad5ae14 100644 --- a/qt6/gen_qstringconverter_base.cpp +++ b/qt6/gen_qstringconverter_base.cpp @@ -5,12 +5,14 @@ #include "gen_qstringconverter_base.h" #include "_cgo_export.h" -QStringConverterBase* QStringConverterBase_new(QStringConverterBase* param1) { - return new QStringConverterBase(*param1); +void QStringConverterBase_new(QStringConverterBase* param1, QStringConverterBase** outptr_QStringConverterBase) { + QStringConverterBase* ret = new QStringConverterBase(*param1); + *outptr_QStringConverterBase = ret; } -QStringConverterBase* QStringConverterBase_new2() { - return new QStringConverterBase(); +void QStringConverterBase_new2(QStringConverterBase** outptr_QStringConverterBase) { + QStringConverterBase* ret = new QStringConverterBase(); + *outptr_QStringConverterBase = ret; } bool QStringConverter_IsValid(const QStringConverter* self) { @@ -33,12 +35,14 @@ const char* QStringConverter_NameForEncoding(int e) { return (const char*) QStringConverter::nameForEncoding(static_cast(e)); } -QStringConverterBase__State* QStringConverterBase__State_new() { - return new QStringConverterBase::State(); +void QStringConverterBase__State_new(QStringConverterBase__State** outptr_QStringConverterBase__State) { + QStringConverterBase::State* ret = new QStringConverterBase::State(); + *outptr_QStringConverterBase__State = ret; } -QStringConverterBase__State* QStringConverterBase__State_new2(int f) { - return new QStringConverterBase::State(static_cast(f)); +void QStringConverterBase__State_new2(int f, QStringConverterBase__State** outptr_QStringConverterBase__State) { + QStringConverterBase::State* ret = new QStringConverterBase::State(static_cast(f)); + *outptr_QStringConverterBase__State = ret; } void QStringConverterBase__State_Clear(QStringConverterBase__State* self) { @@ -49,7 +53,11 @@ void QStringConverterBase__State_Reset(QStringConverterBase__State* self) { self->reset(); } -void QStringConverterBase__State_Delete(QStringConverterBase__State* self) { - delete self; +void QStringConverterBase__State_Delete(QStringConverterBase__State* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstringconverter_base.go b/qt6/gen_qstringconverter_base.go index 96222bde..5a4008eb 100644 --- a/qt6/gen_qstringconverter_base.go +++ b/qt6/gen_qstringconverter_base.go @@ -40,7 +40,8 @@ const ( ) type QStringConverterBase struct { - h *C.QStringConverterBase + h *C.QStringConverterBase + isSubclass bool } func (this *QStringConverterBase) cPointer() *C.QStringConverterBase { @@ -57,6 +58,7 @@ func (this *QStringConverterBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringConverterBase constructs the type using only CGO pointers. func newQStringConverterBase(h *C.QStringConverterBase) *QStringConverterBase { if h == nil { return nil @@ -64,24 +66,38 @@ func newQStringConverterBase(h *C.QStringConverterBase) *QStringConverterBase { return &QStringConverterBase{h: h} } +// UnsafeNewQStringConverterBase constructs the type using only unsafe pointers. func UnsafeNewQStringConverterBase(h unsafe.Pointer) *QStringConverterBase { - return newQStringConverterBase((*C.QStringConverterBase)(h)) + if h == nil { + return nil + } + + return &QStringConverterBase{h: (*C.QStringConverterBase)(h)} } // NewQStringConverterBase constructs a new QStringConverterBase object. func NewQStringConverterBase(param1 *QStringConverterBase) *QStringConverterBase { - ret := C.QStringConverterBase_new(param1.cPointer()) - return newQStringConverterBase(ret) + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringConverterBase_new(param1.cPointer(), &outptr_QStringConverterBase) + ret := newQStringConverterBase(outptr_QStringConverterBase) + ret.isSubclass = true + return ret } // NewQStringConverterBase2 constructs a new QStringConverterBase object. func NewQStringConverterBase2() *QStringConverterBase { - ret := C.QStringConverterBase_new2() - return newQStringConverterBase(ret) + var outptr_QStringConverterBase *C.QStringConverterBase = nil + + C.QStringConverterBase_new2(&outptr_QStringConverterBase) + ret := newQStringConverterBase(outptr_QStringConverterBase) + ret.isSubclass = true + return ret } type QStringConverter struct { - h *C.QStringConverter + h *C.QStringConverter + isSubclass bool *QStringConverterBase } @@ -99,15 +115,23 @@ func (this *QStringConverter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStringConverter(h *C.QStringConverter) *QStringConverter { +// newQStringConverter constructs the type using only CGO pointers. +func newQStringConverter(h *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringConverter { if h == nil { return nil } - return &QStringConverter{h: h, QStringConverterBase: UnsafeNewQStringConverterBase(unsafe.Pointer(h))} + return &QStringConverter{h: h, + QStringConverterBase: newQStringConverterBase(h_QStringConverterBase)} } -func UnsafeNewQStringConverter(h unsafe.Pointer) *QStringConverter { - return newQStringConverter((*C.QStringConverter)(h)) +// UnsafeNewQStringConverter constructs the type using only unsafe pointers. +func UnsafeNewQStringConverter(h unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringConverter { + if h == nil { + return nil + } + + return &QStringConverter{h: (*C.QStringConverter)(h), + QStringConverterBase: UnsafeNewQStringConverterBase(h_QStringConverterBase)} } func (this *QStringConverter) IsValid() bool { @@ -133,7 +157,8 @@ func QStringConverter_NameForEncoding(e QStringConverter__Encoding) string { } type QStringConverterBase__State struct { - h *C.QStringConverterBase__State + h *C.QStringConverterBase__State + isSubclass bool } func (this *QStringConverterBase__State) cPointer() *C.QStringConverterBase__State { @@ -150,6 +175,7 @@ func (this *QStringConverterBase__State) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringConverterBase__State constructs the type using only CGO pointers. func newQStringConverterBase__State(h *C.QStringConverterBase__State) *QStringConverterBase__State { if h == nil { return nil @@ -157,20 +183,33 @@ func newQStringConverterBase__State(h *C.QStringConverterBase__State) *QStringCo return &QStringConverterBase__State{h: h} } +// UnsafeNewQStringConverterBase__State constructs the type using only unsafe pointers. func UnsafeNewQStringConverterBase__State(h unsafe.Pointer) *QStringConverterBase__State { - return newQStringConverterBase__State((*C.QStringConverterBase__State)(h)) + if h == nil { + return nil + } + + return &QStringConverterBase__State{h: (*C.QStringConverterBase__State)(h)} } // NewQStringConverterBase__State constructs a new QStringConverterBase::State object. func NewQStringConverterBase__State() *QStringConverterBase__State { - ret := C.QStringConverterBase__State_new() - return newQStringConverterBase__State(ret) + var outptr_QStringConverterBase__State *C.QStringConverterBase__State = nil + + C.QStringConverterBase__State_new(&outptr_QStringConverterBase__State) + ret := newQStringConverterBase__State(outptr_QStringConverterBase__State) + ret.isSubclass = true + return ret } // NewQStringConverterBase__State2 constructs a new QStringConverterBase::State object. func NewQStringConverterBase__State2(f QStringConverterBase__Flag) *QStringConverterBase__State { - ret := C.QStringConverterBase__State_new2((C.int)(f)) - return newQStringConverterBase__State(ret) + var outptr_QStringConverterBase__State *C.QStringConverterBase__State = nil + + C.QStringConverterBase__State_new2((C.int)(f), &outptr_QStringConverterBase__State) + ret := newQStringConverterBase__State(outptr_QStringConverterBase__State) + ret.isSubclass = true + return ret } func (this *QStringConverterBase__State) Clear() { @@ -183,7 +222,7 @@ func (this *QStringConverterBase__State) Reset() { // Delete this object from C++ memory. func (this *QStringConverterBase__State) Delete() { - C.QStringConverterBase__State_Delete(this.h) + C.QStringConverterBase__State_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstringconverter_base.h b/qt6/gen_qstringconverter_base.h index e520fdc4..f6737a61 100644 --- a/qt6/gen_qstringconverter_base.h +++ b/qt6/gen_qstringconverter_base.h @@ -28,8 +28,8 @@ typedef struct QStringConverterBase QStringConverterBase; typedef struct QStringConverterBase__State QStringConverterBase__State; #endif -QStringConverterBase* QStringConverterBase_new(QStringConverterBase* param1); -QStringConverterBase* QStringConverterBase_new2(); +void QStringConverterBase_new(QStringConverterBase* param1, QStringConverterBase** outptr_QStringConverterBase); +void QStringConverterBase_new2(QStringConverterBase** outptr_QStringConverterBase); bool QStringConverter_IsValid(const QStringConverter* self); void QStringConverter_ResetState(QStringConverter* self); @@ -37,11 +37,11 @@ bool QStringConverter_HasError(const QStringConverter* self); const char* QStringConverter_Name(const QStringConverter* self); const char* QStringConverter_NameForEncoding(int e); -QStringConverterBase__State* QStringConverterBase__State_new(); -QStringConverterBase__State* QStringConverterBase__State_new2(int f); +void QStringConverterBase__State_new(QStringConverterBase__State** outptr_QStringConverterBase__State); +void QStringConverterBase__State_new2(int f, QStringConverterBase__State** outptr_QStringConverterBase__State); void QStringConverterBase__State_Clear(QStringConverterBase__State* self); void QStringConverterBase__State_Reset(QStringConverterBase__State* self); -void QStringConverterBase__State_Delete(QStringConverterBase__State* self); +void QStringConverterBase__State_Delete(QStringConverterBase__State* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringlistmodel.cpp b/qt6/gen_qstringlistmodel.cpp index 586bbf84..677c5dc2 100644 --- a/qt6/gen_qstringlistmodel.cpp +++ b/qt6/gen_qstringlistmodel.cpp @@ -1,6 +1,9 @@ +#include +#include #include #include #include +#include #include #include #include @@ -12,11 +15,467 @@ #include "gen_qstringlistmodel.h" #include "_cgo_export.h" -QStringListModel* QStringListModel_new() { - return new QStringListModel(); +class MiqtVirtualQStringListModel : public virtual QStringListModel { +public: + + MiqtVirtualQStringListModel(): QStringListModel() {}; + MiqtVirtualQStringListModel(const QStringList& strings): QStringListModel(strings) {}; + MiqtVirtualQStringListModel(QObject* parent): QStringListModel(parent) {}; + MiqtVirtualQStringListModel(const QStringList& strings, QObject* parent): QStringListModel(strings, parent) {}; + + virtual ~MiqtVirtualQStringListModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QStringListModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QStringListModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QStringListModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QStringListModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStringListModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QStringListModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__Data == 0) { + return QStringListModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QStringListModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* index, int role) const { + + return new QVariant(QStringListModel::data(*index, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QStringListModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QStringListModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QStringListModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QStringListModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QStringListModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QStringListModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QStringListModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QStringListModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QStringListModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QStringListModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QStringListModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QStringListModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QStringListModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QStringListModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QStringListModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QStringListModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QStringListModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QStringListModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QStringListModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QStringListModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QStringListModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QStringListModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QStringListModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QStringListModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QStringListModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QStringListModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QStringListModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QStringListModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QStringListModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QStringListModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QStringListModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QStringListModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QStringListModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + +}; + +void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings) { +void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -24,14 +483,22 @@ QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_stri QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QStringListModel(strings_QList); + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStringListModel* QStringListModel_new3(QObject* parent) { - return new QStringListModel(parent); +void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(parent); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent) { +void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -39,7 +506,11 @@ QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_stri QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QStringListModel(strings_QList, parent); + MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList, parent); + *outptr_QStringListModel = ret; + *outptr_QAbstractListModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QStringListModel_MetaObject(const QStringListModel* self) { @@ -61,20 +532,20 @@ struct miqt_string QStringListModel_Tr(const char* s) { return _ms; } -int QStringListModel_RowCount(const QStringListModel* self) { - return self->rowCount(); +int QStringListModel_RowCount(const QStringListModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } QModelIndex* QStringListModel_Sibling(const QStringListModel* self, int row, int column, QModelIndex* idx) { return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } -QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index) { - return new QVariant(self->data(*index)); +QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); } -bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value) { - return self->setData(*index, *value); +bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value, int role) { + return self->setData(*index, *value, static_cast(role)); } bool QStringListModel_ClearItemData(QStringListModel* self, QModelIndex* index) { @@ -86,12 +557,12 @@ int QStringListModel_Flags(const QStringListModel* self, QModelIndex* index) { return static_cast(_ret); } -bool QStringListModel_InsertRows(QStringListModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QStringListModel_InsertRows(QStringListModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QStringListModel_MoveRows(QStringListModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { @@ -126,8 +597,8 @@ bool QStringListModel_SetItemData(QStringListModel* self, QModelIndex* index, st return self->setItemData(*index, roles_QMap); } -void QStringListModel_Sort(QStringListModel* self, int column) { - self->sort(static_cast(column)); +void QStringListModel_Sort(QStringListModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_array /* of struct miqt_string */ QStringListModel_StringList(const QStringListModel* self) { @@ -188,31 +659,131 @@ struct miqt_string QStringListModel_Tr3(const char* s, const char* c, int n) { return _ms; } -int QStringListModel_RowCount1(const QStringListModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QStringListModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__RowCount = slot; } -QVariant* QStringListModel_Data2(const QStringListModel* self, QModelIndex* index, int role) { - return new QVariant(self->data(*index, static_cast(role))); +int QStringListModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_RowCount(parent); } -bool QStringListModel_SetData3(QStringListModel* self, QModelIndex* index, QVariant* value, int role) { - return self->setData(*index, *value, static_cast(role)); +void QStringListModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Sibling = slot; } -bool QStringListModel_InsertRows3(QStringListModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +QModelIndex* QStringListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Sibling(row, column, idx); } -bool QStringListModel_RemoveRows3(QStringListModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +void QStringListModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Data = slot; } -void QStringListModel_Sort2(QStringListModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +QVariant* QStringListModel_virtualbase_Data(const void* self, QModelIndex* index, int role) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Data(index, role); +} + +void QStringListModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__SetData = slot; +} + +bool QStringListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QStringListModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__ClearItemData = slot; +} + +bool QStringListModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QStringListModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Flags = slot; +} + +int QStringListModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Flags(index); +} + +void QStringListModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__InsertRows = slot; +} + +bool QStringListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QStringListModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__RemoveRows = slot; +} + +bool QStringListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QStringListModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__MoveRows = slot; +} + +bool QStringListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QStringListModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__ItemData = slot; } -void QStringListModel_Delete(QStringListModel* self) { - delete self; +struct miqt_map /* of int to QVariant* */ QStringListModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_ItemData(index); +} + +void QStringListModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__SetItemData = slot; +} + +bool QStringListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QStringListModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Sort = slot; +} + +void QStringListModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_Sort(column, order); +} + +void QStringListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QStringListModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QStringListModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QStringListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQStringListModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QStringListModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QStringListModel*)(self) )->handle__DropMimeData = slot; +} + +bool QStringListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQStringListModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QStringListModel_Delete(QStringListModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstringlistmodel.go b/qt6/gen_qstringlistmodel.go index 3274e69d..6fe2e51f 100644 --- a/qt6/gen_qstringlistmodel.go +++ b/qt6/gen_qstringlistmodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QStringListModel struct { - h *C.QStringListModel + h *C.QStringListModel + isSubclass bool *QAbstractListModel } @@ -32,21 +34,36 @@ func (this *QStringListModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStringListModel(h *C.QStringListModel) *QStringListModel { +// newQStringListModel constructs the type using only CGO pointers. +func newQStringListModel(h *C.QStringListModel, h_QAbstractListModel *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStringListModel { if h == nil { return nil } - return &QStringListModel{h: h, QAbstractListModel: UnsafeNewQAbstractListModel(unsafe.Pointer(h))} + return &QStringListModel{h: h, + QAbstractListModel: newQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQStringListModel(h unsafe.Pointer) *QStringListModel { - return newQStringListModel((*C.QStringListModel)(h)) +// UnsafeNewQStringListModel constructs the type using only unsafe pointers. +func UnsafeNewQStringListModel(h unsafe.Pointer, h_QAbstractListModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStringListModel { + if h == nil { + return nil + } + + return &QStringListModel{h: (*C.QStringListModel)(h), + QAbstractListModel: UnsafeNewQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} } // NewQStringListModel constructs a new QStringListModel object. func NewQStringListModel() *QStringListModel { - ret := C.QStringListModel_new() - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new(&outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStringListModel2 constructs a new QStringListModel object. @@ -61,14 +78,28 @@ func NewQStringListModel2(strings []string) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QStringListModel_new2(strings_ma) - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new2(strings_ma, &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStringListModel3 constructs a new QStringListModel object. func NewQStringListModel3(parent *QObject) *QStringListModel { - ret := C.QStringListModel_new3(parent.cPointer()) - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new3(parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStringListModel4 constructs a new QStringListModel object. @@ -83,8 +114,15 @@ func NewQStringListModel4(strings []string, parent *QObject) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QStringListModel_new4(strings_ma, parent.cPointer()) - return newQStringListModel(ret) + var outptr_QStringListModel *C.QStringListModel = nil + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QStringListModel_new4(strings_ma, parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStringListModel) MetaObject() *QMetaObject { @@ -106,8 +144,8 @@ func QStringListModel_Tr(s string) string { return _ret } -func (this *QStringListModel) RowCount() int { - return (int)(C.QStringListModel_RowCount(this.h)) +func (this *QStringListModel) RowCount(parent *QModelIndex) int { + return (int)(C.QStringListModel_RowCount(this.h, parent.cPointer())) } func (this *QStringListModel) Sibling(row int, column int, idx *QModelIndex) *QModelIndex { @@ -117,15 +155,15 @@ func (this *QStringListModel) Sibling(row int, column int, idx *QModelIndex) *QM return _goptr } -func (this *QStringListModel) Data(index *QModelIndex) *QVariant { - _ret := C.QStringListModel_Data(this.h, index.cPointer()) +func (this *QStringListModel) Data(index *QModelIndex, role int) *QVariant { + _ret := C.QStringListModel_Data(this.h, index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStringListModel) SetData(index *QModelIndex, value *QVariant) bool { - return (bool)(C.QStringListModel_SetData(this.h, index.cPointer(), value.cPointer())) +func (this *QStringListModel) SetData(index *QModelIndex, value *QVariant, role int) bool { + return (bool)(C.QStringListModel_SetData(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) } func (this *QStringListModel) ClearItemData(index *QModelIndex) bool { @@ -136,12 +174,12 @@ func (this *QStringListModel) Flags(index *QModelIndex) ItemFlag { return (ItemFlag)(C.QStringListModel_Flags(this.h, index.cPointer())) } -func (this *QStringListModel) InsertRows(row int, count int) bool { - return (bool)(C.QStringListModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStringListModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStringListModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStringListModel) RemoveRows(row int, count int) bool { - return (bool)(C.QStringListModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QStringListModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QStringListModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } func (this *QStringListModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { @@ -185,8 +223,8 @@ func (this *QStringListModel) SetItemData(index *QModelIndex, roles map[int]QVar return (bool)(C.QStringListModel_SetItemData(this.h, index.cPointer(), roles_mm)) } -func (this *QStringListModel) Sort(column int) { - C.QStringListModel_Sort(this.h, (C.int)(column)) +func (this *QStringListModel) Sort(column int, order SortOrder) { + C.QStringListModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func (this *QStringListModel) StringList() []string { @@ -242,36 +280,481 @@ func QStringListModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QStringListModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QStringListModel_RowCount1(this.h, parent.cPointer())) +func (this *QStringListModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QStringListModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + } +func (this *QStringListModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QStringListModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_RowCount +func miqt_exec_callback_QStringListModel_RowCount(self *C.QStringListModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QStringListModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStringListModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QStringListModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Sibling +func miqt_exec_callback_QStringListModel_Sibling(self *C.QStringListModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) -func (this *QStringListModel) Data2(index *QModelIndex, role int) *QVariant { - _ret := C.QStringListModel_Data2(this.h, index.cPointer(), (C.int)(role)) + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStringListModel) callVirtualBase_Data(index *QModelIndex, role int) *QVariant { + + _ret := C.QStringListModel_virtualbase_Data(unsafe.Pointer(this.h), index.cPointer(), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QStringListModel) OnData(slot func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) { + C.QStringListModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Data +func miqt_exec_callback_QStringListModel_Data(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, role int) *QVariant, index *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + } -func (this *QStringListModel) SetData3(index *QModelIndex, value *QVariant, role int) bool { - return (bool)(C.QStringListModel_SetData3(this.h, index.cPointer(), value.cPointer(), (C.int)(role))) +func (this *QStringListModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QStringListModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + } +func (this *QStringListModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QStringListModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_SetData +func miqt_exec_callback_QStringListModel_SetData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) -func (this *QStringListModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStringListModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QStringListModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QStringListModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +func (this *QStringListModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QStringListModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QStringListModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QStringListModel) Sort2(column int, order SortOrder) { - C.QStringListModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +//export miqt_exec_callback_QStringListModel_ClearItemData +func miqt_exec_callback_QStringListModel_ClearItemData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QStringListModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QStringListModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QStringListModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Flags +func miqt_exec_callback_QStringListModel_Flags(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStringListModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStringListModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_InsertRows +func miqt_exec_callback_QStringListModel_InsertRows(self *C.QStringListModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QStringListModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QStringListModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_RemoveRows +func miqt_exec_callback_QStringListModel_RemoveRows(self *C.QStringListModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QStringListModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QStringListModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QStringListModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_MoveRows +func miqt_exec_callback_QStringListModel_MoveRows(self *C.QStringListModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QStringListModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QStringListModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QStringListModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_ItemData +func miqt_exec_callback_QStringListModel_ItemData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QStringListModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QStringListModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QStringListModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QStringListModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_SetItemData +func miqt_exec_callback_QStringListModel_SetItemData(self *C.QStringListModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QStringListModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QStringListModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QStringListModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Sort +func miqt_exec_callback_QStringListModel_Sort(self *C.QStringListModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QStringListModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QStringListModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QStringListModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QStringListModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QStringListModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_SupportedDropActions +func miqt_exec_callback_QStringListModel_SupportedDropActions(self *C.QStringListModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QStringListModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QStringListModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStringListModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QStringListModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_Index +func miqt_exec_callback_QStringListModel_Index(self *C.QStringListModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStringListModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QStringListModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QStringListModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QStringListModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStringListModel_DropMimeData +func miqt_exec_callback_QStringListModel_DropMimeData(self *C.QStringListModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QStringListModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QStringListModel) Delete() { - C.QStringListModel_Delete(this.h) + C.QStringListModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstringlistmodel.h b/qt6/gen_qstringlistmodel.h index 71ba8f6d..42e9429e 100644 --- a/qt6/gen_qstringlistmodel.h +++ b/qt6/gen_qstringlistmodel.h @@ -15,50 +15,80 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemModel; +class QAbstractListModel; class QMetaObject; +class QMimeData; class QModelIndex; class QObject; class QStringListModel; class QVariant; #else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractListModel QAbstractListModel; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QStringListModel QStringListModel; typedef struct QVariant QVariant; #endif -QStringListModel* QStringListModel_new(); -QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings); -QStringListModel* QStringListModel_new3(QObject* parent); -QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent); +void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QStringListModel_MetaObject(const QStringListModel* self); void* QStringListModel_Metacast(QStringListModel* self, const char* param1); struct miqt_string QStringListModel_Tr(const char* s); -int QStringListModel_RowCount(const QStringListModel* self); +int QStringListModel_RowCount(const QStringListModel* self, QModelIndex* parent); QModelIndex* QStringListModel_Sibling(const QStringListModel* self, int row, int column, QModelIndex* idx); -QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index); -bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value); +QVariant* QStringListModel_Data(const QStringListModel* self, QModelIndex* index, int role); +bool QStringListModel_SetData(QStringListModel* self, QModelIndex* index, QVariant* value, int role); bool QStringListModel_ClearItemData(QStringListModel* self, QModelIndex* index); int QStringListModel_Flags(const QStringListModel* self, QModelIndex* index); -bool QStringListModel_InsertRows(QStringListModel* self, int row, int count); -bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count); +bool QStringListModel_InsertRows(QStringListModel* self, int row, int count, QModelIndex* parent); +bool QStringListModel_RemoveRows(QStringListModel* self, int row, int count, QModelIndex* parent); bool QStringListModel_MoveRows(QStringListModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); struct miqt_map /* of int to QVariant* */ QStringListModel_ItemData(const QStringListModel* self, QModelIndex* index); bool QStringListModel_SetItemData(QStringListModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); -void QStringListModel_Sort(QStringListModel* self, int column); +void QStringListModel_Sort(QStringListModel* self, int column, int order); struct miqt_array /* of struct miqt_string */ QStringListModel_StringList(const QStringListModel* self); void QStringListModel_SetStringList(QStringListModel* self, struct miqt_array /* of struct miqt_string */ strings); int QStringListModel_SupportedDropActions(const QStringListModel* self); struct miqt_string QStringListModel_Tr2(const char* s, const char* c); struct miqt_string QStringListModel_Tr3(const char* s, const char* c, int n); -int QStringListModel_RowCount1(const QStringListModel* self, QModelIndex* parent); -QVariant* QStringListModel_Data2(const QStringListModel* self, QModelIndex* index, int role); -bool QStringListModel_SetData3(QStringListModel* self, QModelIndex* index, QVariant* value, int role); -bool QStringListModel_InsertRows3(QStringListModel* self, int row, int count, QModelIndex* parent); -bool QStringListModel_RemoveRows3(QStringListModel* self, int row, int count, QModelIndex* parent); -void QStringListModel_Sort2(QStringListModel* self, int column, int order); -void QStringListModel_Delete(QStringListModel* self); +void QStringListModel_override_virtual_RowCount(void* self, intptr_t slot); +int QStringListModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QStringListModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QStringListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QStringListModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QStringListModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QStringListModel_override_virtual_SetData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QStringListModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QStringListModel_override_virtual_Flags(void* self, intptr_t slot); +int QStringListModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QStringListModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QStringListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QStringListModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QStringListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QStringListModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QStringListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QStringListModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QStringListModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QStringListModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QStringListModel_override_virtual_Sort(void* self, intptr_t slot); +void QStringListModel_virtualbase_Sort(void* self, int column, int order); +void QStringListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QStringListModel_virtualbase_SupportedDropActions(const void* self); +void QStringListModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QStringListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QStringListModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QStringListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QStringListModel_Delete(QStringListModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringmatcher.cpp b/qt6/gen_qstringmatcher.cpp index be5d5102..e9a5611e 100644 --- a/qt6/gen_qstringmatcher.cpp +++ b/qt6/gen_qstringmatcher.cpp @@ -7,30 +7,36 @@ #include "gen_qstringmatcher.h" #include "_cgo_export.h" -QStringMatcher* QStringMatcher_new() { - return new QStringMatcher(); +void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new2(struct miqt_string pattern) { +void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QStringMatcher(pattern_QString); + QStringMatcher* ret = new QStringMatcher(pattern_QString); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal) { - return new QStringMatcher(uc, (qsizetype)(lenVal)); +void QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal, QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(uc, (qsizetype)(lenVal)); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new4(QStringMatcher* other) { - return new QStringMatcher(*other); +void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(*other); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs) { +void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - return new QStringMatcher(pattern_QString, static_cast(cs)); + QStringMatcher* ret = new QStringMatcher(pattern_QString, static_cast(cs)); + *outptr_QStringMatcher = ret; } -QStringMatcher* QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs) { - return new QStringMatcher(uc, (qsizetype)(lenVal), static_cast(cs)); +void QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs, QStringMatcher** outptr_QStringMatcher) { + QStringMatcher* ret = new QStringMatcher(uc, (qsizetype)(lenVal), static_cast(cs)); + *outptr_QStringMatcher = ret; } void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other) { @@ -84,7 +90,11 @@ ptrdiff_t QStringMatcher_IndexIn3(const QStringMatcher* self, QChar* str, ptrdif return static_cast(_ret); } -void QStringMatcher_Delete(QStringMatcher* self) { - delete self; +void QStringMatcher_Delete(QStringMatcher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstringmatcher.go b/qt6/gen_qstringmatcher.go index 986efae3..11075109 100644 --- a/qt6/gen_qstringmatcher.go +++ b/qt6/gen_qstringmatcher.go @@ -14,7 +14,8 @@ import ( ) type QStringMatcher struct { - h *C.QStringMatcher + h *C.QStringMatcher + isSubclass bool } func (this *QStringMatcher) cPointer() *C.QStringMatcher { @@ -31,6 +32,7 @@ func (this *QStringMatcher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringMatcher constructs the type using only CGO pointers. func newQStringMatcher(h *C.QStringMatcher) *QStringMatcher { if h == nil { return nil @@ -38,14 +40,23 @@ func newQStringMatcher(h *C.QStringMatcher) *QStringMatcher { return &QStringMatcher{h: h} } +// UnsafeNewQStringMatcher constructs the type using only unsafe pointers. func UnsafeNewQStringMatcher(h unsafe.Pointer) *QStringMatcher { - return newQStringMatcher((*C.QStringMatcher)(h)) + if h == nil { + return nil + } + + return &QStringMatcher{h: (*C.QStringMatcher)(h)} } // NewQStringMatcher constructs a new QStringMatcher object. func NewQStringMatcher() *QStringMatcher { - ret := C.QStringMatcher_new() - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new(&outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher2 constructs a new QStringMatcher object. @@ -54,20 +65,32 @@ func NewQStringMatcher2(pattern string) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QStringMatcher_new2(pattern_ms) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new2(pattern_ms, &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher3 constructs a new QStringMatcher object. func NewQStringMatcher3(uc *QChar, lenVal int64) *QStringMatcher { - ret := C.QStringMatcher_new3(uc.cPointer(), (C.ptrdiff_t)(lenVal)) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new3(uc.cPointer(), (C.ptrdiff_t)(lenVal), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher4 constructs a new QStringMatcher object. func NewQStringMatcher4(other *QStringMatcher) *QStringMatcher { - ret := C.QStringMatcher_new4(other.cPointer()) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new4(other.cPointer(), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher5 constructs a new QStringMatcher object. @@ -76,14 +99,22 @@ func NewQStringMatcher5(pattern string, cs CaseSensitivity) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - ret := C.QStringMatcher_new5(pattern_ms, (C.int)(cs)) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new5(pattern_ms, (C.int)(cs), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } // NewQStringMatcher6 constructs a new QStringMatcher object. func NewQStringMatcher6(uc *QChar, lenVal int64, cs CaseSensitivity) *QStringMatcher { - ret := C.QStringMatcher_new6(uc.cPointer(), (C.ptrdiff_t)(lenVal), (C.int)(cs)) - return newQStringMatcher(ret) + var outptr_QStringMatcher *C.QStringMatcher = nil + + C.QStringMatcher_new6(uc.cPointer(), (C.ptrdiff_t)(lenVal), (C.int)(cs), &outptr_QStringMatcher) + ret := newQStringMatcher(outptr_QStringMatcher) + ret.isSubclass = true + return ret } func (this *QStringMatcher) OperatorAssign(other *QStringMatcher) { @@ -139,7 +170,7 @@ func (this *QStringMatcher) IndexIn3(str *QChar, length int64, from int64) int64 // Delete this object from C++ memory. func (this *QStringMatcher) Delete() { - C.QStringMatcher_Delete(this.h) + C.QStringMatcher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstringmatcher.h b/qt6/gen_qstringmatcher.h index 728e816f..d84b835e 100644 --- a/qt6/gen_qstringmatcher.h +++ b/qt6/gen_qstringmatcher.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QStringMatcher QStringMatcher; #endif -QStringMatcher* QStringMatcher_new(); -QStringMatcher* QStringMatcher_new2(struct miqt_string pattern); -QStringMatcher* QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal); -QStringMatcher* QStringMatcher_new4(QStringMatcher* other); -QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs); -QStringMatcher* QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs); +void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher); +void QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs, QStringMatcher** outptr_QStringMatcher); void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other); void QStringMatcher_SetPattern(QStringMatcher* self, struct miqt_string pattern); void QStringMatcher_SetCaseSensitivity(QStringMatcher* self, int cs); @@ -37,7 +37,7 @@ struct miqt_string QStringMatcher_Pattern(const QStringMatcher* self); int QStringMatcher_CaseSensitivity(const QStringMatcher* self); ptrdiff_t QStringMatcher_IndexIn22(const QStringMatcher* self, struct miqt_string str, ptrdiff_t from); ptrdiff_t QStringMatcher_IndexIn3(const QStringMatcher* self, QChar* str, ptrdiff_t length, ptrdiff_t from); -void QStringMatcher_Delete(QStringMatcher* self); +void QStringMatcher_Delete(QStringMatcher* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringtokenizer.cpp b/qt6/gen_qstringtokenizer.cpp index 8b9f345d..3934bdea 100644 --- a/qt6/gen_qstringtokenizer.cpp +++ b/qt6/gen_qstringtokenizer.cpp @@ -3,7 +3,8 @@ #include "gen_qstringtokenizer.h" #include "_cgo_export.h" -QStringTokenizerBaseBase* QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1) { - return new QStringTokenizerBaseBase(*param1); +void QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1, QStringTokenizerBaseBase** outptr_QStringTokenizerBaseBase) { + QStringTokenizerBaseBase* ret = new QStringTokenizerBaseBase(*param1); + *outptr_QStringTokenizerBaseBase = ret; } diff --git a/qt6/gen_qstringtokenizer.go b/qt6/gen_qstringtokenizer.go index 091fff91..98201c63 100644 --- a/qt6/gen_qstringtokenizer.go +++ b/qt6/gen_qstringtokenizer.go @@ -13,7 +13,8 @@ import ( ) type QStringTokenizerBaseBase struct { - h *C.QStringTokenizerBaseBase + h *C.QStringTokenizerBaseBase + isSubclass bool } func (this *QStringTokenizerBaseBase) cPointer() *C.QStringTokenizerBaseBase { @@ -30,6 +31,7 @@ func (this *QStringTokenizerBaseBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringTokenizerBaseBase constructs the type using only CGO pointers. func newQStringTokenizerBaseBase(h *C.QStringTokenizerBaseBase) *QStringTokenizerBaseBase { if h == nil { return nil @@ -37,12 +39,21 @@ func newQStringTokenizerBaseBase(h *C.QStringTokenizerBaseBase) *QStringTokenize return &QStringTokenizerBaseBase{h: h} } +// UnsafeNewQStringTokenizerBaseBase constructs the type using only unsafe pointers. func UnsafeNewQStringTokenizerBaseBase(h unsafe.Pointer) *QStringTokenizerBaseBase { - return newQStringTokenizerBaseBase((*C.QStringTokenizerBaseBase)(h)) + if h == nil { + return nil + } + + return &QStringTokenizerBaseBase{h: (*C.QStringTokenizerBaseBase)(h)} } // NewQStringTokenizerBaseBase constructs a new QStringTokenizerBaseBase object. func NewQStringTokenizerBaseBase(param1 *QStringTokenizerBaseBase) *QStringTokenizerBaseBase { - ret := C.QStringTokenizerBaseBase_new(param1.cPointer()) - return newQStringTokenizerBaseBase(ret) + var outptr_QStringTokenizerBaseBase *C.QStringTokenizerBaseBase = nil + + C.QStringTokenizerBaseBase_new(param1.cPointer(), &outptr_QStringTokenizerBaseBase) + ret := newQStringTokenizerBaseBase(outptr_QStringTokenizerBaseBase) + ret.isSubclass = true + return ret } diff --git a/qt6/gen_qstringtokenizer.h b/qt6/gen_qstringtokenizer.h index de175df9..a4ca6509 100644 --- a/qt6/gen_qstringtokenizer.h +++ b/qt6/gen_qstringtokenizer.h @@ -20,7 +20,7 @@ class QStringTokenizerBaseBase; typedef struct QStringTokenizerBaseBase QStringTokenizerBaseBase; #endif -QStringTokenizerBaseBase* QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1); +void QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1, QStringTokenizerBaseBase** outptr_QStringTokenizerBaseBase); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringview.cpp b/qt6/gen_qstringview.cpp index fb40ef94..9411bb02 100644 --- a/qt6/gen_qstringview.cpp +++ b/qt6/gen_qstringview.cpp @@ -11,8 +11,9 @@ #include "gen_qstringview.h" #include "_cgo_export.h" -QStringView* QStringView_new() { - return new QStringView(); +void QStringView_new(QStringView** outptr_QStringView) { + QStringView* ret = new QStringView(); + *outptr_QStringView = ret; } struct miqt_string QStringView_ToString(const QStringView* self) { @@ -410,7 +411,11 @@ double QStringView_ToDouble1(const QStringView* self, bool* ok) { return self->toDouble(ok); } -void QStringView_Delete(QStringView* self) { - delete self; +void QStringView_Delete(QStringView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstringview.go b/qt6/gen_qstringview.go index 08997b6b..4a6328b6 100644 --- a/qt6/gen_qstringview.go +++ b/qt6/gen_qstringview.go @@ -14,7 +14,8 @@ import ( ) type QStringView struct { - h *C.QStringView + h *C.QStringView + isSubclass bool } func (this *QStringView) cPointer() *C.QStringView { @@ -31,6 +32,7 @@ func (this *QStringView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStringView constructs the type using only CGO pointers. func newQStringView(h *C.QStringView) *QStringView { if h == nil { return nil @@ -38,14 +40,23 @@ func newQStringView(h *C.QStringView) *QStringView { return &QStringView{h: h} } +// UnsafeNewQStringView constructs the type using only unsafe pointers. func UnsafeNewQStringView(h unsafe.Pointer) *QStringView { - return newQStringView((*C.QStringView)(h)) + if h == nil { + return nil + } + + return &QStringView{h: (*C.QStringView)(h)} } // NewQStringView constructs a new QStringView object. func NewQStringView() *QStringView { - ret := C.QStringView_new() - return newQStringView(ret) + var outptr_QStringView *C.QStringView = nil + + C.QStringView_new(&outptr_QStringView) + ret := newQStringView(outptr_QStringView) + ret.isSubclass = true + return ret } func (this *QStringView) ToString() string { @@ -410,7 +421,7 @@ func (this *QStringView) ToDouble1(ok *bool) float64 { // Delete this object from C++ memory. func (this *QStringView) Delete() { - C.QStringView_Delete(this.h) + C.QStringView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstringview.h b/qt6/gen_qstringview.h index f112754a..112a2f9e 100644 --- a/qt6/gen_qstringview.h +++ b/qt6/gen_qstringview.h @@ -28,7 +28,7 @@ typedef struct QRegularExpressionMatch QRegularExpressionMatch; typedef struct QStringView QStringView; #endif -QStringView* QStringView_new(); +void QStringView_new(QStringView** outptr_QStringView); struct miqt_string QStringView_ToString(const QStringView* self); ptrdiff_t QStringView_Size(const QStringView* self); QChar* QStringView_Data(const QStringView* self); @@ -110,7 +110,7 @@ unsigned long long QStringView_ToULongLong1(const QStringView* self, bool* ok); unsigned long long QStringView_ToULongLong2(const QStringView* self, bool* ok, int base); float QStringView_ToFloat1(const QStringView* self, bool* ok); double QStringView_ToDouble1(const QStringView* self, bool* ok); -void QStringView_Delete(QStringView* self); +void QStringView_Delete(QStringView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstyle.cpp b/qt6/gen_qstyle.cpp index d56481f7..6da08c74 100644 --- a/qt6/gen_qstyle.cpp +++ b/qt6/gen_qstyle.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -79,9 +80,9 @@ QRect* QStyle_ItemPixmapRect(const QStyle* self, QRect* r, int flags, QPixmap* p return new QRect(self->itemPixmapRect(*r, static_cast(flags), *pixmap)); } -void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text) { +void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString); + self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } void QStyle_DrawItemPixmap(const QStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { @@ -92,49 +93,49 @@ QPalette* QStyle_StandardPalette(const QStyle* self) { return new QPalette(self->standardPalette()); } -void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p) { - self->drawPrimitive(static_cast(pe), opt, p); +void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawPrimitive(static_cast(pe), opt, p, w); } -void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p) { - self->drawControl(static_cast(element), opt, p); +void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { + self->drawControl(static_cast(element), opt, p, w); } -QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option) { - return new QRect(self->subElementRect(static_cast(subElement), option)); +QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget) { + return new QRect(self->subElementRect(static_cast(subElement), option, widget)); } -void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p) { - self->drawComplexControl(static_cast(cc), opt, p); +void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget) { + self->drawComplexControl(static_cast(cc), opt, p, widget); } -int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt); +int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget) { + QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, widget); return static_cast(_ret); } -QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc))); +QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { + return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), widget)); } -int QStyle_PixelMetric(const QStyle* self, int metric) { - return self->pixelMetric(static_cast(metric)); +int QStyle_PixelMetric(const QStyle* self, int metric, QStyleOption* option, QWidget* widget) { + return self->pixelMetric(static_cast(metric), option, widget); } -QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize)); +QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w) { + return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, w)); } -int QStyle_StyleHint(const QStyle* self, int stylehint) { - return self->styleHint(static_cast(stylehint)); +int QStyle_StyleHint(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData) { + return self->styleHint(static_cast(stylehint), opt, widget, returnData); } -QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap))); +QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { + return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } -QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon) { - return new QIcon(self->standardIcon(static_cast(standardIcon))); +QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { + return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } QPixmap* QStyle_GeneratedIconPixmap(const QStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { @@ -166,8 +167,8 @@ QRect* QStyle_AlignedRect(int direction, int alignment, QSize* size, QRect* rect return new QRect(QStyle::alignedRect(static_cast(direction), static_cast(alignment), *size, *rectangle)); } -int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); +int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { + return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } int QStyle_CombinedLayoutSpacing(const QStyle* self, int controls1, int controls2, int orientation) { @@ -200,76 +201,6 @@ struct miqt_string QStyle_Tr3(const char* s, const char* c, int n) { return _ms; } -void QStyle_DrawItemText7(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); -} - -void QStyle_DrawPrimitive4(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawPrimitive(static_cast(pe), opt, p, w); -} - -void QStyle_DrawControl4(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { - self->drawControl(static_cast(element), opt, p, w); -} - -QRect* QStyle_SubElementRect3(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget) { - return new QRect(self->subElementRect(static_cast(subElement), option, widget)); -} - -void QStyle_DrawComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget) { - self->drawComplexControl(static_cast(cc), opt, p, widget); -} - -int QStyle_HitTestComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget) { - QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, widget); - return static_cast(_ret); -} - -QRect* QStyle_SubControlRect4(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { - return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), widget)); -} - -int QStyle_PixelMetric2(const QStyle* self, int metric, QStyleOption* option) { - return self->pixelMetric(static_cast(metric), option); -} - -int QStyle_PixelMetric3(const QStyle* self, int metric, QStyleOption* option, QWidget* widget) { - return self->pixelMetric(static_cast(metric), option, widget); -} - -QSize* QStyle_SizeFromContents4(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w) { - return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, w)); -} - -int QStyle_StyleHint2(const QStyle* self, int stylehint, QStyleOption* opt) { - return self->styleHint(static_cast(stylehint), opt); -} - -int QStyle_StyleHint3(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget) { - return self->styleHint(static_cast(stylehint), opt, widget); -} - -int QStyle_StyleHint4(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData) { - return self->styleHint(static_cast(stylehint), opt, widget, returnData); -} - -QPixmap* QStyle_StandardPixmap2(const QStyle* self, int standardPixmap, QStyleOption* opt) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); -} - -QPixmap* QStyle_StandardPixmap3(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { - return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); -} - -QIcon* QStyle_StandardIcon2(const QStyle* self, int standardIcon, QStyleOption* option) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option)); -} - -QIcon* QStyle_StandardIcon3(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { - return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); -} - int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool upsideDown) { return QStyle::sliderPositionFromValue(static_cast(min), static_cast(max), static_cast(val), static_cast(space), upsideDown); } @@ -278,14 +209,6 @@ int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool u return QStyle::sliderValueFromPosition(static_cast(min), static_cast(max), static_cast(pos), static_cast(space), upsideDown); } -int QStyle_LayoutSpacing4(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); -} - -int QStyle_LayoutSpacing5(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { - return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); -} - int QStyle_CombinedLayoutSpacing4(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option) { return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation), option); } @@ -294,7 +217,11 @@ int QStyle_CombinedLayoutSpacing5(const QStyle* self, int controls1, int control return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation), option, widget); } -void QStyle_Delete(QStyle* self) { - delete self; +void QStyle_Delete(QStyle* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstyle.go b/qt6/gen_qstyle.go index f359945f..0cdc4a6d 100644 --- a/qt6/gen_qstyle.go +++ b/qt6/gen_qstyle.go @@ -633,7 +633,8 @@ const ( ) type QStyle struct { - h *C.QStyle + h *C.QStyle + isSubclass bool *QObject } @@ -651,15 +652,23 @@ func (this *QStyle) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyle(h *C.QStyle) *QStyle { +// newQStyle constructs the type using only CGO pointers. +func newQStyle(h *C.QStyle, h_QObject *C.QObject) *QStyle { if h == nil { return nil } - return &QStyle{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QStyle{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQStyle(h unsafe.Pointer) *QStyle { - return newQStyle((*C.QStyle)(h)) +// UnsafeNewQStyle constructs the type using only unsafe pointers. +func UnsafeNewQStyle(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyle { + if h == nil { + return nil + } + + return &QStyle{h: (*C.QStyle)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QStyle) MetaObject() *QMetaObject { @@ -726,12 +735,12 @@ func (this *QStyle) ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect return _goptr } -func (this *QStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string) { +func (this *QStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { text_ms := C.struct_miqt_string{} text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - C.QStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms) + C.QStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) } func (this *QStyle) DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { @@ -745,60 +754,60 @@ func (this *QStyle) StandardPalette() *QPalette { return _goptr } -func (this *QStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter) { - C.QStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer()) +func (this *QStyle) DrawPrimitive(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QStyle_DrawPrimitive(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter) { - C.QStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer()) +func (this *QStyle) DrawControl(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { + C.QStyle_DrawControl(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) } -func (this *QStyle) SubElementRect(subElement QStyle__SubElement, option *QStyleOption) *QRect { - _ret := C.QStyle_SubElementRect(this.h, (C.int)(subElement), option.cPointer()) +func (this *QStyle) SubElementRect(subElement QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect { + _ret := C.QStyle_SubElementRect(this.h, (C.int)(subElement), option.cPointer(), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter) { - C.QStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer()) +func (this *QStyle) DrawComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *QWidget) { + C.QStyle_DrawComplexControl(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), widget.cPointer()) } -func (this *QStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint) QStyle__SubControl { - return (QStyle__SubControl)(C.QStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer())) +func (this *QStyle) HitTestComplexControl(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, widget *QWidget) QStyle__SubControl { + return (QStyle__SubControl)(C.QStyle_HitTestComplexControl(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), widget.cPointer())) } -func (this *QStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl) *QRect { - _ret := C.QStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc)) +func (this *QStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect { + _ret := C.QStyle_SubControlRect(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), widget.cPointer()) _goptr := newQRect(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) PixelMetric(metric QStyle__PixelMetric) int { - return (int)(C.QStyle_PixelMetric(this.h, (C.int)(metric))) +func (this *QStyle) PixelMetric(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { + return (int)(C.QStyle_PixelMetric(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) } -func (this *QStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize) *QSize { - _ret := C.QStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer()) +func (this *QStyle) SizeFromContents(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *QWidget) *QSize { + _ret := C.QStyle_SizeFromContents(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), w.cPointer()) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) StyleHint(stylehint QStyle__StyleHint) int { - return (int)(C.QStyle_StyleHint(this.h, (C.int)(stylehint))) +func (this *QStyle) StyleHint(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { + return (int)(C.QStyle_StyleHint(this.h, (C.int)(stylehint), opt.cPointer(), widget.cPointer(), returnData.cPointer())) } -func (this *QStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap) *QPixmap { - _ret := C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap)) - _goptr := newQPixmap(_ret) +func (this *QStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { + _ret := C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { - _ret := C.QStyle_StandardIcon(this.h, (C.int)(standardIcon)) +func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { + _ret := C.QStyle_StandardIcon(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) _goptr := newQIcon(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -806,7 +815,7 @@ func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon { func (this *QStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { _ret := C.QStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -844,8 +853,8 @@ func QStyle_AlignedRect(direction LayoutDirection, alignment AlignmentFlag, size return _goptr } -func (this *QStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int { - return (int)(C.QStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation))) +func (this *QStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { + return (int)(C.QStyle_LayoutSpacing(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } func (this *QStyle) CombinedLayoutSpacing(controls1 QSizePolicy__ControlType, controls2 QSizePolicy__ControlType, orientation Orientation) int { @@ -853,7 +862,7 @@ func (this *QStyle) CombinedLayoutSpacing(controls1 QSizePolicy__ControlType, co } func (this *QStyle) Proxy() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QStyle_Proxy(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStyle_Proxy(this.h)), nil) } func QStyle_Tr2(s string, c string) string { @@ -878,99 +887,6 @@ func QStyle_Tr3(s string, c string, n int) string { return _ret } -func (this *QStyle) DrawItemText7(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QStyle_DrawItemText7(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), text_ms, (C.int)(textRole)) -} - -func (this *QStyle) DrawPrimitive4(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QStyle_DrawPrimitive4(this.h, (C.int)(pe), opt.cPointer(), p.cPointer(), w.cPointer()) -} - -func (this *QStyle) DrawControl4(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget) { - C.QStyle_DrawControl4(this.h, (C.int)(element), opt.cPointer(), p.cPointer(), w.cPointer()) -} - -func (this *QStyle) SubElementRect3(subElement QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect { - _ret := C.QStyle_SubElementRect3(this.h, (C.int)(subElement), option.cPointer(), widget.cPointer()) - _goptr := newQRect(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) DrawComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *QWidget) { - C.QStyle_DrawComplexControl4(this.h, (C.int)(cc), opt.cPointer(), p.cPointer(), widget.cPointer()) -} - -func (this *QStyle) HitTestComplexControl4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, widget *QWidget) QStyle__SubControl { - return (QStyle__SubControl)(C.QStyle_HitTestComplexControl4(this.h, (C.int)(cc), opt.cPointer(), pt.cPointer(), widget.cPointer())) -} - -func (this *QStyle) SubControlRect4(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect { - _ret := C.QStyle_SubControlRect4(this.h, (C.int)(cc), opt.cPointer(), (C.int)(sc), widget.cPointer()) - _goptr := newQRect(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) PixelMetric2(metric QStyle__PixelMetric, option *QStyleOption) int { - return (int)(C.QStyle_PixelMetric2(this.h, (C.int)(metric), option.cPointer())) -} - -func (this *QStyle) PixelMetric3(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int { - return (int)(C.QStyle_PixelMetric3(this.h, (C.int)(metric), option.cPointer(), widget.cPointer())) -} - -func (this *QStyle) SizeFromContents4(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *QWidget) *QSize { - _ret := C.QStyle_SizeFromContents4(this.h, (C.int)(ct), opt.cPointer(), contentsSize.cPointer(), w.cPointer()) - _goptr := newQSize(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StyleHint2(stylehint QStyle__StyleHint, opt *QStyleOption) int { - return (int)(C.QStyle_StyleHint2(this.h, (C.int)(stylehint), opt.cPointer())) -} - -func (this *QStyle) StyleHint3(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget) int { - return (int)(C.QStyle_StyleHint3(this.h, (C.int)(stylehint), opt.cPointer(), widget.cPointer())) -} - -func (this *QStyle) StyleHint4(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int { - return (int)(C.QStyle_StyleHint4(this.h, (C.int)(stylehint), opt.cPointer(), widget.cPointer(), returnData.cPointer())) -} - -func (this *QStyle) StandardPixmap2(standardPixmap QStyle__StandardPixmap, opt *QStyleOption) *QPixmap { - _ret := C.QStyle_StandardPixmap2(this.h, (C.int)(standardPixmap), opt.cPointer()) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StandardPixmap3(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _ret := C.QStyle_StandardPixmap3(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, option *QStyleOption) *QIcon { - _ret := C.QStyle_StandardIcon2(this.h, (C.int)(standardIcon), option.cPointer()) - _goptr := newQIcon(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon { - _ret := C.QStyle_StandardIcon3(this.h, (C.int)(standardIcon), option.cPointer(), widget.cPointer()) - _goptr := newQIcon(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - func QStyle_SliderPositionFromValue5(min int, max int, val int, space int, upsideDown bool) int { return (int)(C.QStyle_SliderPositionFromValue5((C.int)(min), (C.int)(max), (C.int)(val), (C.int)(space), (C.bool)(upsideDown))) } @@ -979,14 +895,6 @@ func QStyle_SliderValueFromPosition5(min int, max int, pos int, space int, upsid return (int)(C.QStyle_SliderValueFromPosition5((C.int)(min), (C.int)(max), (C.int)(pos), (C.int)(space), (C.bool)(upsideDown))) } -func (this *QStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { - return (int)(C.QStyle_LayoutSpacing4(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer())) -} - -func (this *QStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int { - return (int)(C.QStyle_LayoutSpacing5(this.h, (C.int)(control1), (C.int)(control2), (C.int)(orientation), option.cPointer(), widget.cPointer())) -} - func (this *QStyle) CombinedLayoutSpacing4(controls1 QSizePolicy__ControlType, controls2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int { return (int)(C.QStyle_CombinedLayoutSpacing4(this.h, (C.int)(controls1), (C.int)(controls2), (C.int)(orientation), option.cPointer())) } @@ -997,7 +905,7 @@ func (this *QStyle) CombinedLayoutSpacing5(controls1 QSizePolicy__ControlType, c // Delete this object from C++ memory. func (this *QStyle) Delete() { - C.QStyle_Delete(this.h) + C.QStyle_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstyle.h b/qt6/gen_qstyle.h index c43cb54d..ceb43ee0 100644 --- a/qt6/gen_qstyle.h +++ b/qt6/gen_qstyle.h @@ -19,6 +19,7 @@ class QApplication; class QFontMetrics; class QIcon; class QMetaObject; +class QObject; class QPainter; class QPalette; class QPixmap; @@ -35,6 +36,7 @@ typedef struct QApplication QApplication; typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; @@ -59,20 +61,20 @@ void QStyle_UnpolishWithApplication(QStyle* self, QApplication* application); void QStyle_PolishWithPalette(QStyle* self, QPalette* palette); QRect* QStyle_ItemTextRect(const QStyle* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); QRect* QStyle_ItemPixmapRect(const QStyle* self, QRect* r, int flags, QPixmap* pixmap); -void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text); +void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); void QStyle_DrawItemPixmap(const QStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); QPalette* QStyle_StandardPalette(const QStyle* self); -void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p); -void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p); -QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option); -void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p); -int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt); -QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc); -int QStyle_PixelMetric(const QStyle* self, int metric); -QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize); -int QStyle_StyleHint(const QStyle* self, int stylehint); -QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap); -QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon); +void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget); +void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget); +int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget); +QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); +int QStyle_PixelMetric(const QStyle* self, int metric, QStyleOption* option, QWidget* widget); +QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w); +int QStyle_StyleHint(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData); +QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); +QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); QPixmap* QStyle_GeneratedIconPixmap(const QStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); QRect* QStyle_VisualRect(int direction, QRect* boundingRect, QRect* logicalRect); QPoint* QStyle_VisualPos(int direction, QRect* boundingRect, QPoint* logicalPos); @@ -80,35 +82,16 @@ int QStyle_SliderPositionFromValue(int min, int max, int val, int space); int QStyle_SliderValueFromPosition(int min, int max, int pos, int space); int QStyle_VisualAlignment(int direction, int alignment); QRect* QStyle_AlignedRect(int direction, int alignment, QSize* size, QRect* rectangle); -int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation); +int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); int QStyle_CombinedLayoutSpacing(const QStyle* self, int controls1, int controls2, int orientation); QStyle* QStyle_Proxy(const QStyle* self); struct miqt_string QStyle_Tr2(const char* s, const char* c); struct miqt_string QStyle_Tr3(const char* s, const char* c, int n); -void QStyle_DrawItemText7(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); -void QStyle_DrawPrimitive4(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); -void QStyle_DrawControl4(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); -QRect* QStyle_SubElementRect3(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget); -void QStyle_DrawComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget); -int QStyle_HitTestComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget); -QRect* QStyle_SubControlRect4(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); -int QStyle_PixelMetric2(const QStyle* self, int metric, QStyleOption* option); -int QStyle_PixelMetric3(const QStyle* self, int metric, QStyleOption* option, QWidget* widget); -QSize* QStyle_SizeFromContents4(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w); -int QStyle_StyleHint2(const QStyle* self, int stylehint, QStyleOption* opt); -int QStyle_StyleHint3(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget); -int QStyle_StyleHint4(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData); -QPixmap* QStyle_StandardPixmap2(const QStyle* self, int standardPixmap, QStyleOption* opt); -QPixmap* QStyle_StandardPixmap3(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget); -QIcon* QStyle_StandardIcon2(const QStyle* self, int standardIcon, QStyleOption* option); -QIcon* QStyle_StandardIcon3(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget); int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool upsideDown); int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool upsideDown); -int QStyle_LayoutSpacing4(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option); -int QStyle_LayoutSpacing5(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); int QStyle_CombinedLayoutSpacing4(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option); int QStyle_CombinedLayoutSpacing5(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option, QWidget* widget); -void QStyle_Delete(QStyle* self); +void QStyle_Delete(QStyle* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstyleditemdelegate.cpp b/qt6/gen_qstyleditemdelegate.cpp index f5497d15..f5edd177 100644 --- a/qt6/gen_qstyleditemdelegate.cpp +++ b/qt6/gen_qstyleditemdelegate.cpp @@ -1,5 +1,10 @@ +#include #include +#include +#include +#include #include +#include #include #include #include @@ -17,12 +22,411 @@ #include "gen_qstyleditemdelegate.h" #include "_cgo_export.h" -QStyledItemDelegate* QStyledItemDelegate_new() { - return new QStyledItemDelegate(); +class MiqtVirtualQStyledItemDelegate : public virtual QStyledItemDelegate { +public: + + MiqtVirtualQStyledItemDelegate(): QStyledItemDelegate() {}; + MiqtVirtualQStyledItemDelegate(QObject* parent): QStyledItemDelegate(parent) {}; + + virtual ~MiqtVirtualQStyledItemDelegate() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__Paint == 0) { + QStyledItemDelegate::paint(painter, option, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_Paint(const_cast(this), handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) const { + + QStyledItemDelegate::paint(painter, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__SizeHint == 0) { + return QStyledItemDelegate::sizeHint(option, index); + } + + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval1 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QStyledItemDelegate_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint(QStyleOptionViewItem* option, QModelIndex* index) const { + + return new QSize(QStyledItemDelegate::sizeHint(*option, *index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateEditor = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__CreateEditor == 0) { + return QStyledItemDelegate::createEditor(parent, option, index); + } + + QWidget* sigval1 = parent; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + QWidget* callback_return_value = miqt_exec_callback_QStyledItemDelegate_CreateEditor(const_cast(this), handle__CreateEditor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateEditor(QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) const { + + return QStyledItemDelegate::createEditor(parent, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override { + if (handle__SetEditorData == 0) { + QStyledItemDelegate::setEditorData(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_SetEditorData(const_cast(this), handle__SetEditorData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditorData(QWidget* editor, QModelIndex* index) const { + + QStyledItemDelegate::setEditorData(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModelData = 0; + + // Subclass to allow providing a Go implementation + virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override { + if (handle__SetModelData == 0) { + QStyledItemDelegate::setModelData(editor, model, index); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemModel* sigval2 = model; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_SetModelData(const_cast(this), handle__SetModelData, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModelData(QWidget* editor, QAbstractItemModel* model, QModelIndex* index) const { + + QStyledItemDelegate::setModelData(editor, model, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometry = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override { + if (handle__UpdateEditorGeometry == 0) { + QStyledItemDelegate::updateEditorGeometry(editor, option, index); + return; + } + + QWidget* sigval1 = editor; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry(const_cast(this), handle__UpdateEditorGeometry, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometry(QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) const { + + QStyledItemDelegate::updateEditorGeometry(editor, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisplayText = 0; + + // Subclass to allow providing a Go implementation + virtual QString displayText(const QVariant& value, const QLocale& locale) const override { + if (handle__DisplayText == 0) { + return QStyledItemDelegate::displayText(value, locale); + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + const QLocale& locale_ret = locale; + // Cast returned reference into pointer + QLocale* sigval2 = const_cast(&locale_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QStyledItemDelegate_DisplayText(const_cast(this), handle__DisplayText, sigval1, sigval2); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_DisplayText(QVariant* value, QLocale* locale) const { + + QString _ret = QStyledItemDelegate::displayText(*value, *locale); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) const override { + if (handle__InitStyleOption == 0) { + QStyledItemDelegate::initStyleOption(option, index); + return; + } + + QStyleOptionViewItem* sigval1 = option; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionViewItem* option, QModelIndex* index) const { + + QStyledItemDelegate::initStyleOption(option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QStyledItemDelegate::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStyledItemDelegate_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QStyledItemDelegate::eventFilter(object, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__EditorEvent == 0) { + return QStyledItemDelegate::editorEvent(event, model, option, index); + } + + QEvent* sigval1 = event; + QAbstractItemModel* sigval2 = model; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QStyledItemDelegate_EditorEvent(this, handle__EditorEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EditorEvent(QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + + return QStyledItemDelegate::editorEvent(event, model, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DestroyEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void destroyEditor(QWidget* editor, const QModelIndex& index) const override { + if (handle__DestroyEditor == 0) { + QStyledItemDelegate::destroyEditor(editor, index); + return; + } + + QWidget* sigval1 = editor; + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&index_ret); + + miqt_exec_callback_QStyledItemDelegate_DestroyEditor(const_cast(this), handle__DestroyEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DestroyEditor(QWidget* editor, QModelIndex* index) const { + + QStyledItemDelegate::destroyEditor(editor, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HelpEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) override { + if (handle__HelpEvent == 0) { + return QStyledItemDelegate::helpEvent(event, view, option, index); + } + + QHelpEvent* sigval1 = event; + QAbstractItemView* sigval2 = view; + const QStyleOptionViewItem& option_ret = option; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval3 = const_cast(&option_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QStyledItemDelegate_HelpEvent(this, handle__HelpEvent, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HelpEvent(QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + + return QStyledItemDelegate::helpEvent(event, view, *option, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintingRoles = 0; + + // Subclass to allow providing a Go implementation + virtual QList paintingRoles() const override { + if (handle__PaintingRoles == 0) { + return QStyledItemDelegate::paintingRoles(); + } + + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QStyledItemDelegate_PaintingRoles(const_cast(this), handle__PaintingRoles); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + int* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(static_cast(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of int */ virtualbase_PaintingRoles() const { + + QList _ret = QStyledItemDelegate::paintingRoles(); + // Convert QList<> from C++ memory to manually-managed C memory + int* _arr = static_cast(malloc(sizeof(int) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + +}; + +void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(); + *outptr_QStyledItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent) { - return new QStyledItemDelegate(parent); +void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(parent); + *outptr_QStyledItemDelegate = ret; + *outptr_QAbstractItemDelegate = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self) { @@ -109,7 +513,115 @@ struct miqt_string QStyledItemDelegate_Tr3(const char* s, const char* c, int n) return _ms; } -void QStyledItemDelegate_Delete(QStyledItemDelegate* self) { - delete self; +void QStyledItemDelegate_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__Paint = slot; +} + +void QStyledItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_Paint(painter, option, index); +} + +void QStyledItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__SizeHint = slot; +} + +QSize* QStyledItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_SizeHint(option, index); +} + +void QStyledItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QStyledItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_CreateEditor(parent, option, index); +} + +void QStyledItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__SetEditorData = slot; +} + +void QStyledItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_SetEditorData(editor, index); +} + +void QStyledItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__SetModelData = slot; +} + +void QStyledItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_SetModelData(editor, model, index); +} + +void QStyledItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__UpdateEditorGeometry = slot; +} + +void QStyledItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_UpdateEditorGeometry(editor, option, index); +} + +void QStyledItemDelegate_override_virtual_DisplayText(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__DisplayText = slot; +} + +struct miqt_string QStyledItemDelegate_virtualbase_DisplayText(const void* self, QVariant* value, QLocale* locale) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_DisplayText(value, locale); +} + +void QStyledItemDelegate_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__InitStyleOption = slot; +} + +void QStyledItemDelegate_virtualbase_InitStyleOption(const void* self, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_InitStyleOption(option, index); +} + +void QStyledItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__EventFilter = slot; +} + +bool QStyledItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_EventFilter(object, event); +} + +void QStyledItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__EditorEvent = slot; +} + +bool QStyledItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_EditorEvent(event, model, option, index); +} + +void QStyledItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__DestroyEditor = slot; +} + +void QStyledItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_DestroyEditor(editor, index); +} + +void QStyledItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__HelpEvent = slot; +} + +bool QStyledItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_HelpEvent(event, view, option, index); +} + +void QStyledItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot) { + dynamic_cast( (QStyledItemDelegate*)(self) )->handle__PaintingRoles = slot; +} + +struct miqt_array /* of int */ QStyledItemDelegate_virtualbase_PaintingRoles(const void* self) { + return ( (const MiqtVirtualQStyledItemDelegate*)(self) )->virtualbase_PaintingRoles(); +} + +void QStyledItemDelegate_Delete(QStyledItemDelegate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstyleditemdelegate.go b/qt6/gen_qstyleditemdelegate.go index ce47b080..4156e48d 100644 --- a/qt6/gen_qstyleditemdelegate.go +++ b/qt6/gen_qstyleditemdelegate.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QStyledItemDelegate struct { - h *C.QStyledItemDelegate + h *C.QStyledItemDelegate + isSubclass bool *QAbstractItemDelegate } @@ -32,27 +34,47 @@ func (this *QStyledItemDelegate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyledItemDelegate(h *C.QStyledItemDelegate) *QStyledItemDelegate { +// newQStyledItemDelegate constructs the type using only CGO pointers. +func newQStyledItemDelegate(h *C.QStyledItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QStyledItemDelegate { if h == nil { return nil } - return &QStyledItemDelegate{h: h, QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(unsafe.Pointer(h))} + return &QStyledItemDelegate{h: h, + QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } -func UnsafeNewQStyledItemDelegate(h unsafe.Pointer) *QStyledItemDelegate { - return newQStyledItemDelegate((*C.QStyledItemDelegate)(h)) +// UnsafeNewQStyledItemDelegate constructs the type using only unsafe pointers. +func UnsafeNewQStyledItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QStyledItemDelegate { + if h == nil { + return nil + } + + return &QStyledItemDelegate{h: (*C.QStyledItemDelegate)(h), + QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} } // NewQStyledItemDelegate constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate() *QStyledItemDelegate { - ret := C.QStyledItemDelegate_new() - return newQStyledItemDelegate(ret) + var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QStyledItemDelegate_new(&outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } // NewQStyledItemDelegate2 constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate2(parent *QObject) *QStyledItemDelegate { - ret := C.QStyledItemDelegate_new2(parent.cPointer()) - return newQStyledItemDelegate(ret) + var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QStyledItemDelegate_new2(parent.cPointer(), &outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QStyledItemDelegate) MetaObject() *QMetaObject { @@ -86,7 +108,7 @@ func (this *QStyledItemDelegate) SizeHint(option *QStyleOptionViewItem, index *Q } func (this *QStyledItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) } func (this *QStyledItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -138,9 +160,359 @@ func QStyledItemDelegate_Tr3(s string, c string, n int) string { return _ret } +func (this *QStyledItemDelegate) callVirtualBase_Paint(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_Paint(unsafe.Pointer(this.h), painter.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnPaint(slot func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_Paint +func miqt_exec_callback_QStyledItemDelegate_Paint(self *C.QStyledItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QStyledItemDelegate) callVirtualBase_SizeHint(option *QStyleOptionViewItem, index *QModelIndex) *QSize { + + _ret := C.QStyledItemDelegate_virtualbase_SizeHint(unsafe.Pointer(this.h), option.cPointer(), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QStyledItemDelegate) OnSizeHint(slot func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) { + C.QStyledItemDelegate_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_SizeHint +func miqt_exec_callback_QStyledItemDelegate_SizeHint(self *C.QStyledItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem, index *QModelIndex) *QSize, option *QStyleOptionViewItem, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QStyledItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QStyledItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) +} +func (this *QStyledItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { + C.QStyledItemDelegate_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_CreateEditor +func miqt_exec_callback_QStyledItemDelegate_CreateEditor(self *C.QStyledItemDelegate, cb C.intptr_t, parent *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStyledItemDelegate) callVirtualBase_SetEditorData(editor *QWidget, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_SetEditorData(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnSetEditorData(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_SetEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_SetEditorData +func miqt_exec_callback_QStyledItemDelegate_SetEditorData(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_SetEditorData, slotval1, slotval2) + +} + +func (this *QStyledItemDelegate) callVirtualBase_SetModelData(editor *QWidget, model *QAbstractItemModel, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_SetModelData(unsafe.Pointer(this.h), editor.cPointer(), model.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnSetModelData(slot func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_SetModelData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_SetModelData +func miqt_exec_callback_QStyledItemDelegate_SetModelData(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, model *C.QAbstractItemModel, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_SetModelData, slotval1, slotval2, slotval3) + +} + +func (this *QStyledItemDelegate) callVirtualBase_UpdateEditorGeometry(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_UpdateEditorGeometry(unsafe.Pointer(this.h), editor.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnUpdateEditorGeometry(slot func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_UpdateEditorGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry +func miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_UpdateEditorGeometry, slotval1, slotval2, slotval3) + +} + +func (this *QStyledItemDelegate) callVirtualBase_DisplayText(value *QVariant, locale *QLocale) string { + + var _ms C.struct_miqt_string = C.QStyledItemDelegate_virtualbase_DisplayText(unsafe.Pointer(this.h), value.cPointer(), locale.cPointer()) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QStyledItemDelegate) OnDisplayText(slot func(super func(value *QVariant, locale *QLocale) string, value *QVariant, locale *QLocale) string) { + C.QStyledItemDelegate_override_virtual_DisplayText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_DisplayText +func miqt_exec_callback_QStyledItemDelegate_DisplayText(self *C.QStyledItemDelegate, cb C.intptr_t, value *C.QVariant, locale *C.QLocale) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant, locale *QLocale) string, value *QVariant, locale *QLocale) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval2 := UnsafeNewQLocale(unsafe.Pointer(locale)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_DisplayText, slotval1, slotval2) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QStyledItemDelegate) callVirtualBase_InitStyleOption(option *QStyleOptionViewItem, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnInitStyleOption(slot func(super func(option *QStyleOptionViewItem, index *QModelIndex), option *QStyleOptionViewItem, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_InitStyleOption +func miqt_exec_callback_QStyledItemDelegate_InitStyleOption(self *C.QStyledItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem, index *QModelIndex), option *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) + +} + +func (this *QStyledItemDelegate) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QStyledItemDelegate_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QStyledItemDelegate) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QStyledItemDelegate_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_EventFilter +func miqt_exec_callback_QStyledItemDelegate_EventFilter(self *C.QStyledItemDelegate, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyledItemDelegate) callVirtualBase_EditorEvent(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QStyledItemDelegate_virtualbase_EditorEvent(unsafe.Pointer(this.h), event.cPointer(), model.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QStyledItemDelegate) OnEditorEvent(slot func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QStyledItemDelegate_override_virtual_EditorEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_EditorEvent +func miqt_exec_callback_QStyledItemDelegate_EditorEvent(self *C.QStyledItemDelegate, cb C.intptr_t, event *C.QEvent, model *C.QAbstractItemModel, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + slotval2 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_EditorEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyledItemDelegate) callVirtualBase_DestroyEditor(editor *QWidget, index *QModelIndex) { + + C.QStyledItemDelegate_virtualbase_DestroyEditor(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QStyledItemDelegate) OnDestroyEditor(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QStyledItemDelegate_override_virtual_DestroyEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_DestroyEditor +func miqt_exec_callback_QStyledItemDelegate_DestroyEditor(self *C.QStyledItemDelegate, cb C.intptr_t, editor *C.QWidget, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_DestroyEditor, slotval1, slotval2) + +} + +func (this *QStyledItemDelegate) callVirtualBase_HelpEvent(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QStyledItemDelegate_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer(), view.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QStyledItemDelegate) OnHelpEvent(slot func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QStyledItemDelegate_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_HelpEvent +func miqt_exec_callback_QStyledItemDelegate_HelpEvent(self *C.QStyledItemDelegate, cb C.intptr_t, event *C.QHelpEvent, view *C.QAbstractItemView, option *C.QStyleOptionViewItem, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHelpEvent(unsafe.Pointer(event), nil) + slotval2 := UnsafeNewQAbstractItemView(unsafe.Pointer(view), nil, nil, nil, nil, nil) + slotval3 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_HelpEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyledItemDelegate) callVirtualBase_PaintingRoles() []int { + + var _ma C.struct_miqt_array = C.QStyledItemDelegate_virtualbase_PaintingRoles(unsafe.Pointer(this.h)) + _ret := make([]int, int(_ma.len)) + _outCast := (*[0xffff]C.int)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _ret[i] = (int)(_outCast[i]) + } + return _ret + +} +func (this *QStyledItemDelegate) OnPaintingRoles(slot func(super func() []int) []int) { + C.QStyledItemDelegate_override_virtual_PaintingRoles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyledItemDelegate_PaintingRoles +func miqt_exec_callback_QStyledItemDelegate_PaintingRoles(self *C.QStyledItemDelegate, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []int) []int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QStyledItemDelegate{h: self}).callVirtualBase_PaintingRoles) + virtualReturn_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (C.int)(virtualReturn[i]) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + // Delete this object from C++ memory. func (this *QStyledItemDelegate) Delete() { - C.QStyledItemDelegate_Delete(this.h) + C.QStyledItemDelegate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstyleditemdelegate.h b/qt6/gen_qstyleditemdelegate.h index d017356b..e1f7ec79 100644 --- a/qt6/gen_qstyleditemdelegate.h +++ b/qt6/gen_qstyleditemdelegate.h @@ -15,7 +15,11 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QEvent; +class QHelpEvent; class QItemEditorFactory; class QLocale; class QMetaObject; @@ -28,7 +32,11 @@ class QStyledItemDelegate; class QVariant; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QEvent QEvent; +typedef struct QHelpEvent QHelpEvent; typedef struct QItemEditorFactory QItemEditorFactory; typedef struct QLocale QLocale; typedef struct QMetaObject QMetaObject; @@ -42,8 +50,8 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QStyledItemDelegate* QStyledItemDelegate_new(); -QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent); +void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self); void* QStyledItemDelegate_Metacast(QStyledItemDelegate* self, const char* param1); struct miqt_string QStyledItemDelegate_Tr(const char* s); @@ -56,9 +64,38 @@ void QStyledItemDelegate_UpdateEditorGeometry(const QStyledItemDelegate* self, Q QItemEditorFactory* QStyledItemDelegate_ItemEditorFactory(const QStyledItemDelegate* self); void QStyledItemDelegate_SetItemEditorFactory(QStyledItemDelegate* self, QItemEditorFactory* factory); struct miqt_string QStyledItemDelegate_DisplayText(const QStyledItemDelegate* self, QVariant* value, QLocale* locale); +void QStyledItemDelegate_InitStyleOption(const QStyledItemDelegate* self, QStyleOptionViewItem* option, QModelIndex* index); +bool QStyledItemDelegate_EventFilter(QStyledItemDelegate* self, QObject* object, QEvent* event); +bool QStyledItemDelegate_EditorEvent(QStyledItemDelegate* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); struct miqt_string QStyledItemDelegate_Tr2(const char* s, const char* c); struct miqt_string QStyledItemDelegate_Tr3(const char* s, const char* c, int n); -void QStyledItemDelegate_Delete(QStyledItemDelegate* self); +void QStyledItemDelegate_override_virtual_Paint(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QStyledItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QStyledItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index); +void QStyledItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index); +void QStyledItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_DisplayText(void* self, intptr_t slot); +struct miqt_string QStyledItemDelegate_virtualbase_DisplayText(const void* self, QVariant* value, QLocale* locale); +void QStyledItemDelegate_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_InitStyleOption(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStyledItemDelegate_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QStyledItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot); +bool QStyledItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot); +void QStyledItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index); +void QStyledItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot); +bool QStyledItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index); +void QStyledItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot); +struct miqt_array /* of int */ QStyledItemDelegate_virtualbase_PaintingRoles(const void* self); +void QStyledItemDelegate_Delete(QStyledItemDelegate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstylefactory.cpp b/qt6/gen_qstylefactory.cpp index 2e2586b0..0d3e75cc 100644 --- a/qt6/gen_qstylefactory.cpp +++ b/qt6/gen_qstylefactory.cpp @@ -33,7 +33,11 @@ QStyle* QStyleFactory_Create(struct miqt_string param1) { return QStyleFactory::create(param1_QString); } -void QStyleFactory_Delete(QStyleFactory* self) { - delete self; +void QStyleFactory_Delete(QStyleFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstylefactory.go b/qt6/gen_qstylefactory.go index d01073ec..d680fbb6 100644 --- a/qt6/gen_qstylefactory.go +++ b/qt6/gen_qstylefactory.go @@ -14,7 +14,8 @@ import ( ) type QStyleFactory struct { - h *C.QStyleFactory + h *C.QStyleFactory + isSubclass bool } func (this *QStyleFactory) cPointer() *C.QStyleFactory { @@ -31,6 +32,7 @@ func (this *QStyleFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStyleFactory constructs the type using only CGO pointers. func newQStyleFactory(h *C.QStyleFactory) *QStyleFactory { if h == nil { return nil @@ -38,8 +40,13 @@ func newQStyleFactory(h *C.QStyleFactory) *QStyleFactory { return &QStyleFactory{h: h} } +// UnsafeNewQStyleFactory constructs the type using only unsafe pointers. func UnsafeNewQStyleFactory(h unsafe.Pointer) *QStyleFactory { - return newQStyleFactory((*C.QStyleFactory)(h)) + if h == nil { + return nil + } + + return &QStyleFactory{h: (*C.QStyleFactory)(h)} } func QStyleFactory_Keys() []string { @@ -60,12 +67,12 @@ func QStyleFactory_Create(param1 string) *QStyle { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - return UnsafeNewQStyle(unsafe.Pointer(C.QStyleFactory_Create(param1_ms))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStyleFactory_Create(param1_ms)), nil) } // Delete this object from C++ memory. func (this *QStyleFactory) Delete() { - C.QStyleFactory_Delete(this.h) + C.QStyleFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstylefactory.h b/qt6/gen_qstylefactory.h index c3f3ed97..82e89824 100644 --- a/qt6/gen_qstylefactory.h +++ b/qt6/gen_qstylefactory.h @@ -24,7 +24,7 @@ typedef struct QStyleFactory QStyleFactory; struct miqt_array /* of struct miqt_string */ QStyleFactory_Keys(); QStyle* QStyleFactory_Create(struct miqt_string param1); -void QStyleFactory_Delete(QStyleFactory* self); +void QStyleFactory_Delete(QStyleFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstylehints.cpp b/qt6/gen_qstylehints.cpp index 87b07ec9..0e54a09b 100644 --- a/qt6/gen_qstylehints.cpp +++ b/qt6/gen_qstylehints.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -309,7 +310,11 @@ struct miqt_string QStyleHints_Tr3(const char* s, const char* c, int n) { return _ms; } -void QStyleHints_Delete(QStyleHints* self) { - delete self; +void QStyleHints_Delete(QStyleHints* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstylehints.go b/qt6/gen_qstylehints.go index 3583a2ad..60406045 100644 --- a/qt6/gen_qstylehints.go +++ b/qt6/gen_qstylehints.go @@ -15,7 +15,8 @@ import ( ) type QStyleHints struct { - h *C.QStyleHints + h *C.QStyleHints + isSubclass bool *QObject } @@ -33,15 +34,23 @@ func (this *QStyleHints) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleHints(h *C.QStyleHints) *QStyleHints { +// newQStyleHints constructs the type using only CGO pointers. +func newQStyleHints(h *C.QStyleHints, h_QObject *C.QObject) *QStyleHints { if h == nil { return nil } - return &QStyleHints{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QStyleHints{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQStyleHints(h unsafe.Pointer) *QStyleHints { - return newQStyleHints((*C.QStyleHints)(h)) +// UnsafeNewQStyleHints constructs the type using only unsafe pointers. +func UnsafeNewQStyleHints(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyleHints { + if h == nil { + return nil + } + + return &QStyleHints{h: (*C.QStyleHints)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QStyleHints) MetaObject() *QMetaObject { @@ -446,7 +455,7 @@ func QStyleHints_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QStyleHints) Delete() { - C.QStyleHints_Delete(this.h) + C.QStyleHints_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstylehints.h b/qt6/gen_qstylehints.h index ba078edc..8f3b9241 100644 --- a/qt6/gen_qstylehints.h +++ b/qt6/gen_qstylehints.h @@ -17,10 +17,12 @@ extern "C" { #ifdef __cplusplus class QChar; class QMetaObject; +class QObject; class QStyleHints; #else typedef struct QChar QChar; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QStyleHints QStyleHints; #endif @@ -85,7 +87,7 @@ void QStyleHints_MouseQuickSelectionThresholdChanged(QStyleHints* self, int thre void QStyleHints_connect_MouseQuickSelectionThresholdChanged(QStyleHints* self, intptr_t slot); struct miqt_string QStyleHints_Tr2(const char* s, const char* c); struct miqt_string QStyleHints_Tr3(const char* s, const char* c, int n); -void QStyleHints_Delete(QStyleHints* self); +void QStyleHints_Delete(QStyleHints* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstyleoption.cpp b/qt6/gen_qstyleoption.cpp index 0909c12b..6694f525 100644 --- a/qt6/gen_qstyleoption.cpp +++ b/qt6/gen_qstyleoption.cpp @@ -32,20 +32,24 @@ #include "gen_qstyleoption.h" #include "_cgo_export.h" -QStyleOption* QStyleOption_new() { - return new QStyleOption(); +void QStyleOption_new(QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(); + *outptr_QStyleOption = ret; } -QStyleOption* QStyleOption_new2(QStyleOption* other) { - return new QStyleOption(*other); +void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(*other); + *outptr_QStyleOption = ret; } -QStyleOption* QStyleOption_new3(int version) { - return new QStyleOption(static_cast(version)); +void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(static_cast(version)); + *outptr_QStyleOption = ret; } -QStyleOption* QStyleOption_new4(int version, int typeVal) { - return new QStyleOption(static_cast(version), static_cast(typeVal)); +void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption) { + QStyleOption* ret = new QStyleOption(static_cast(version), static_cast(typeVal)); + *outptr_QStyleOption = ret; } void QStyleOption_InitFrom(QStyleOption* self, QWidget* w) { @@ -56,300 +60,512 @@ void QStyleOption_OperatorAssign(QStyleOption* self, QStyleOption* other) { self->operator=(*other); } -void QStyleOption_Delete(QStyleOption* self) { - delete self; +void QStyleOption_Delete(QStyleOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionFocusRect* QStyleOptionFocusRect_new() { - return new QStyleOptionFocusRect(); +void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { + QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(); + *outptr_QStyleOptionFocusRect = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other) { - return new QStyleOptionFocusRect(*other); +void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { + QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(*other); + *outptr_QStyleOptionFocusRect = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self) { - delete self; +void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionFrame* QStyleOptionFrame_new() { - return new QStyleOptionFrame(); +void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionFrame* ret = new QStyleOptionFrame(); + *outptr_QStyleOptionFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other) { - return new QStyleOptionFrame(*other); +void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionFrame* ret = new QStyleOptionFrame(*other); + *outptr_QStyleOptionFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionFrame_Delete(QStyleOptionFrame* self) { - delete self; +void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new() { - return new QStyleOptionTabWidgetFrame(); +void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(); + *outptr_QStyleOptionTabWidgetFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other) { - return new QStyleOptionTabWidgetFrame(*other); +void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(*other); + *outptr_QStyleOptionTabWidgetFrame = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self) { - delete self; +void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new() { - return new QStyleOptionTabBarBase(); +void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(); + *outptr_QStyleOptionTabBarBase = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other) { - return new QStyleOptionTabBarBase(*other); +void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { + QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(*other); + *outptr_QStyleOptionTabBarBase = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self) { - delete self; +void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionHeader* QStyleOptionHeader_new() { - return new QStyleOptionHeader(); +void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { + QStyleOptionHeader* ret = new QStyleOptionHeader(); + *outptr_QStyleOptionHeader = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other) { - return new QStyleOptionHeader(*other); +void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { + QStyleOptionHeader* ret = new QStyleOptionHeader(*other); + *outptr_QStyleOptionHeader = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionHeader_Delete(QStyleOptionHeader* self) { - delete self; +void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionHeaderV2* QStyleOptionHeaderV2_new() { - return new QStyleOptionHeaderV2(); +void QStyleOptionHeaderV2_new(QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { + QStyleOptionHeaderV2* ret = new QStyleOptionHeaderV2(); + *outptr_QStyleOptionHeaderV2 = ret; + *outptr_QStyleOptionHeader = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionHeaderV2* QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other) { - return new QStyleOptionHeaderV2(*other); +void QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other, QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { + QStyleOptionHeaderV2* ret = new QStyleOptionHeaderV2(*other); + *outptr_QStyleOptionHeaderV2 = ret; + *outptr_QStyleOptionHeader = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self) { - delete self; +void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionButton* QStyleOptionButton_new() { - return new QStyleOptionButton(); +void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { + QStyleOptionButton* ret = new QStyleOptionButton(); + *outptr_QStyleOptionButton = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other) { - return new QStyleOptionButton(*other); +void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { + QStyleOptionButton* ret = new QStyleOptionButton(*other); + *outptr_QStyleOptionButton = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionButton_Delete(QStyleOptionButton* self) { - delete self; +void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTab* QStyleOptionTab_new() { - return new QStyleOptionTab(); +void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { + QStyleOptionTab* ret = new QStyleOptionTab(); + *outptr_QStyleOptionTab = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other) { - return new QStyleOptionTab(*other); +void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { + QStyleOptionTab* ret = new QStyleOptionTab(*other); + *outptr_QStyleOptionTab = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTab_Delete(QStyleOptionTab* self) { - delete self; +void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionToolBar* QStyleOptionToolBar_new() { - return new QStyleOptionToolBar(); +void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBar* ret = new QStyleOptionToolBar(); + *outptr_QStyleOptionToolBar = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other) { - return new QStyleOptionToolBar(*other); +void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBar* ret = new QStyleOptionToolBar(*other); + *outptr_QStyleOptionToolBar = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self) { - delete self; +void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionProgressBar* QStyleOptionProgressBar_new() { - return new QStyleOptionProgressBar(); +void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(); + *outptr_QStyleOptionProgressBar = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other) { - return new QStyleOptionProgressBar(*other); +void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { + QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(*other); + *outptr_QStyleOptionProgressBar = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self) { - delete self; +void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionMenuItem* QStyleOptionMenuItem_new() { - return new QStyleOptionMenuItem(); +void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(); + *outptr_QStyleOptionMenuItem = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other) { - return new QStyleOptionMenuItem(*other); +void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(*other); + *outptr_QStyleOptionMenuItem = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self) { - delete self; +void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionDockWidget* QStyleOptionDockWidget_new() { - return new QStyleOptionDockWidget(); +void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { + QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(); + *outptr_QStyleOptionDockWidget = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other) { - return new QStyleOptionDockWidget(*other); +void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { + QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(*other); + *outptr_QStyleOptionDockWidget = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self) { - delete self; +void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionViewItem* QStyleOptionViewItem_new() { - return new QStyleOptionViewItem(); +void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionViewItem* ret = new QStyleOptionViewItem(); + *outptr_QStyleOptionViewItem = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other) { - return new QStyleOptionViewItem(*other); +void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionViewItem* ret = new QStyleOptionViewItem(*other); + *outptr_QStyleOptionViewItem = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self) { - delete self; +void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionToolBox* QStyleOptionToolBox_new() { - return new QStyleOptionToolBox(); +void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBox* ret = new QStyleOptionToolBox(); + *outptr_QStyleOptionToolBox = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other) { - return new QStyleOptionToolBox(*other); +void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolBox* ret = new QStyleOptionToolBox(*other); + *outptr_QStyleOptionToolBox = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self) { - delete self; +void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionRubberBand* QStyleOptionRubberBand_new() { - return new QStyleOptionRubberBand(); +void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { + QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(); + *outptr_QStyleOptionRubberBand = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other) { - return new QStyleOptionRubberBand(*other); +void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { + QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(*other); + *outptr_QStyleOptionRubberBand = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self) { - delete self; +void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionComplex* QStyleOptionComplex_new() { - return new QStyleOptionComplex(); +void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other) { - return new QStyleOptionComplex(*other); +void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(*other); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComplex* QStyleOptionComplex_new3(int version) { - return new QStyleOptionComplex(static_cast(version)); +void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version)); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal) { - return new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); +void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); + *outptr_QStyleOptionComplex = ret; + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionComplex_Delete(QStyleOptionComplex* self) { - delete self; +void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionSlider* QStyleOptionSlider_new() { - return new QStyleOptionSlider(); +void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSlider* ret = new QStyleOptionSlider(); + *outptr_QStyleOptionSlider = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other) { - return new QStyleOptionSlider(*other); +void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSlider* ret = new QStyleOptionSlider(*other); + *outptr_QStyleOptionSlider = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionSlider_Delete(QStyleOptionSlider* self) { - delete self; +void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionSpinBox* QStyleOptionSpinBox_new() { - return new QStyleOptionSpinBox(); +void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(); + *outptr_QStyleOptionSpinBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other) { - return new QStyleOptionSpinBox(*other); +void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(*other); + *outptr_QStyleOptionSpinBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self) { - delete self; +void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionToolButton* QStyleOptionToolButton_new() { - return new QStyleOptionToolButton(); +void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolButton* ret = new QStyleOptionToolButton(); + *outptr_QStyleOptionToolButton = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other) { - return new QStyleOptionToolButton(*other); +void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionToolButton* ret = new QStyleOptionToolButton(*other); + *outptr_QStyleOptionToolButton = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self) { - delete self; +void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionComboBox* QStyleOptionComboBox_new() { - return new QStyleOptionComboBox(); +void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComboBox* ret = new QStyleOptionComboBox(); + *outptr_QStyleOptionComboBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other) { - return new QStyleOptionComboBox(*other); +void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionComboBox* ret = new QStyleOptionComboBox(*other); + *outptr_QStyleOptionComboBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self) { - delete self; +void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionTitleBar* QStyleOptionTitleBar_new() { - return new QStyleOptionTitleBar(); +void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(); + *outptr_QStyleOptionTitleBar = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other) { - return new QStyleOptionTitleBar(*other); +void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(*other); + *outptr_QStyleOptionTitleBar = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self) { - delete self; +void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionGroupBox* QStyleOptionGroupBox_new() { - return new QStyleOptionGroupBox(); +void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(); + *outptr_QStyleOptionGroupBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other) { - return new QStyleOptionGroupBox(*other); +void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(*other); + *outptr_QStyleOptionGroupBox = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self) { - delete self; +void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new() { - return new QStyleOptionSizeGrip(); +void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(); + *outptr_QStyleOptionSizeGrip = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other) { - return new QStyleOptionSizeGrip(*other); +void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { + QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(*other); + *outptr_QStyleOptionSizeGrip = ret; + *outptr_QStyleOptionComplex = static_cast(ret); + *outptr_QStyleOption = static_cast(ret); } -void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self) { - delete self; +void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new() { - return new QStyleOptionGraphicsItem(); +void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(); + *outptr_QStyleOptionGraphicsItem = ret; + *outptr_QStyleOption = static_cast(ret); } -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other) { - return new QStyleOptionGraphicsItem(*other); +void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { + QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(*other); + *outptr_QStyleOptionGraphicsItem = ret; + *outptr_QStyleOption = static_cast(ret); } double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform) { @@ -357,63 +573,91 @@ double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTran return static_cast(_ret); } -void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self) { - delete self; +void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleHintReturn* QStyleHintReturn_new() { - return new QStyleHintReturn(); +void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(); + *outptr_QStyleHintReturn = ret; } -QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1) { - return new QStyleHintReturn(*param1); +void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(*param1); + *outptr_QStyleHintReturn = ret; } -QStyleHintReturn* QStyleHintReturn_new3(int version) { - return new QStyleHintReturn(static_cast(version)); +void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version)); + *outptr_QStyleHintReturn = ret; } -QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal) { - return new QStyleHintReturn(static_cast(version), static_cast(typeVal)); +void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version), static_cast(typeVal)); + *outptr_QStyleHintReturn = ret; } void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1) { self->operator=(*param1); } -void QStyleHintReturn_Delete(QStyleHintReturn* self) { - delete self; +void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleHintReturnMask* QStyleHintReturnMask_new() { - return new QStyleHintReturnMask(); +void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnMask* ret = new QStyleHintReturnMask(); + *outptr_QStyleHintReturnMask = ret; + *outptr_QStyleHintReturn = static_cast(ret); } -QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1) { - return new QStyleHintReturnMask(*param1); +void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnMask* ret = new QStyleHintReturnMask(*param1); + *outptr_QStyleHintReturnMask = ret; + *outptr_QStyleHintReturn = static_cast(ret); } void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1) { self->operator=(*param1); } -void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self) { - delete self; +void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QStyleHintReturnVariant* QStyleHintReturnVariant_new() { - return new QStyleHintReturnVariant(); +void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(); + *outptr_QStyleHintReturnVariant = ret; + *outptr_QStyleHintReturn = static_cast(ret); } -QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1) { - return new QStyleHintReturnVariant(*param1); +void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { + QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(*param1); + *outptr_QStyleHintReturnVariant = ret; + *outptr_QStyleHintReturn = static_cast(ret); } void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1) { self->operator=(*param1); } -void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self) { - delete self; +void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstyleoption.go b/qt6/gen_qstyleoption.go index 16c5c668..fd10169a 100644 --- a/qt6/gen_qstyleoption.go +++ b/qt6/gen_qstyleoption.go @@ -561,7 +561,8 @@ const ( ) type QStyleOption struct { - h *C.QStyleOption + h *C.QStyleOption + isSubclass bool } func (this *QStyleOption) cPointer() *C.QStyleOption { @@ -578,6 +579,7 @@ func (this *QStyleOption) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStyleOption constructs the type using only CGO pointers. func newQStyleOption(h *C.QStyleOption) *QStyleOption { if h == nil { return nil @@ -585,32 +587,53 @@ func newQStyleOption(h *C.QStyleOption) *QStyleOption { return &QStyleOption{h: h} } +// UnsafeNewQStyleOption constructs the type using only unsafe pointers. func UnsafeNewQStyleOption(h unsafe.Pointer) *QStyleOption { - return newQStyleOption((*C.QStyleOption)(h)) + if h == nil { + return nil + } + + return &QStyleOption{h: (*C.QStyleOption)(h)} } // NewQStyleOption constructs a new QStyleOption object. func NewQStyleOption() *QStyleOption { - ret := C.QStyleOption_new() - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new(&outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOption2 constructs a new QStyleOption object. func NewQStyleOption2(other *QStyleOption) *QStyleOption { - ret := C.QStyleOption_new2(other.cPointer()) - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new2(other.cPointer(), &outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOption3 constructs a new QStyleOption object. func NewQStyleOption3(version int) *QStyleOption { - ret := C.QStyleOption_new3((C.int)(version)) - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new3((C.int)(version), &outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOption4 constructs a new QStyleOption object. func NewQStyleOption4(version int, typeVal int) *QStyleOption { - ret := C.QStyleOption_new4((C.int)(version), (C.int)(typeVal)) - return newQStyleOption(ret) + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOption_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOption) + ret := newQStyleOption(outptr_QStyleOption) + ret.isSubclass = true + return ret } func (this *QStyleOption) InitFrom(w *QWidget) { @@ -623,7 +646,7 @@ func (this *QStyleOption) OperatorAssign(other *QStyleOption) { // Delete this object from C++ memory. func (this *QStyleOption) Delete() { - C.QStyleOption_Delete(this.h) + C.QStyleOption_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -636,7 +659,8 @@ func (this *QStyleOption) GoGC() { } type QStyleOptionFocusRect struct { - h *C.QStyleOptionFocusRect + h *C.QStyleOptionFocusRect + isSubclass bool *QStyleOption } @@ -654,32 +678,50 @@ func (this *QStyleOptionFocusRect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect) *QStyleOptionFocusRect { +// newQStyleOptionFocusRect constructs the type using only CGO pointers. +func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect, h_QStyleOption *C.QStyleOption) *QStyleOptionFocusRect { if h == nil { return nil } - return &QStyleOptionFocusRect{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionFocusRect{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer) *QStyleOptionFocusRect { - return newQStyleOptionFocusRect((*C.QStyleOptionFocusRect)(h)) +// UnsafeNewQStyleOptionFocusRect constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFocusRect { + if h == nil { + return nil + } + + return &QStyleOptionFocusRect{h: (*C.QStyleOptionFocusRect)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionFocusRect constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect() *QStyleOptionFocusRect { - ret := C.QStyleOptionFocusRect_new() - return newQStyleOptionFocusRect(ret) + var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFocusRect_new(&outptr_QStyleOptionFocusRect, &outptr_QStyleOption) + ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionFocusRect2 constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect2(other *QStyleOptionFocusRect) *QStyleOptionFocusRect { - ret := C.QStyleOptionFocusRect_new2(other.cPointer()) - return newQStyleOptionFocusRect(ret) + var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFocusRect_new2(other.cPointer(), &outptr_QStyleOptionFocusRect, &outptr_QStyleOption) + ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionFocusRect) Delete() { - C.QStyleOptionFocusRect_Delete(this.h) + C.QStyleOptionFocusRect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -692,7 +734,8 @@ func (this *QStyleOptionFocusRect) GoGC() { } type QStyleOptionFrame struct { - h *C.QStyleOptionFrame + h *C.QStyleOptionFrame + isSubclass bool *QStyleOption } @@ -710,32 +753,50 @@ func (this *QStyleOptionFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionFrame(h *C.QStyleOptionFrame) *QStyleOptionFrame { +// newQStyleOptionFrame constructs the type using only CGO pointers. +func newQStyleOptionFrame(h *C.QStyleOptionFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionFrame { if h == nil { return nil } - return &QStyleOptionFrame{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionFrame{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionFrame(h unsafe.Pointer) *QStyleOptionFrame { - return newQStyleOptionFrame((*C.QStyleOptionFrame)(h)) +// UnsafeNewQStyleOptionFrame constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFrame { + if h == nil { + return nil + } + + return &QStyleOptionFrame{h: (*C.QStyleOptionFrame)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionFrame constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame() *QStyleOptionFrame { - ret := C.QStyleOptionFrame_new() - return newQStyleOptionFrame(ret) + var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFrame_new(&outptr_QStyleOptionFrame, &outptr_QStyleOption) + ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionFrame2 constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame2(other *QStyleOptionFrame) *QStyleOptionFrame { - ret := C.QStyleOptionFrame_new2(other.cPointer()) - return newQStyleOptionFrame(ret) + var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionFrame_new2(other.cPointer(), &outptr_QStyleOptionFrame, &outptr_QStyleOption) + ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionFrame) Delete() { - C.QStyleOptionFrame_Delete(this.h) + C.QStyleOptionFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -748,7 +809,8 @@ func (this *QStyleOptionFrame) GoGC() { } type QStyleOptionTabWidgetFrame struct { - h *C.QStyleOptionTabWidgetFrame + h *C.QStyleOptionTabWidgetFrame + isSubclass bool *QStyleOption } @@ -766,32 +828,50 @@ func (this *QStyleOptionTabWidgetFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { +// newQStyleOptionTabWidgetFrame constructs the type using only CGO pointers. +func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionTabWidgetFrame { if h == nil { return nil } - return &QStyleOptionTabWidgetFrame{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionTabWidgetFrame{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer) *QStyleOptionTabWidgetFrame { - return newQStyleOptionTabWidgetFrame((*C.QStyleOptionTabWidgetFrame)(h)) +// UnsafeNewQStyleOptionTabWidgetFrame constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabWidgetFrame { + if h == nil { + return nil + } + + return &QStyleOptionTabWidgetFrame{h: (*C.QStyleOptionTabWidgetFrame)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionTabWidgetFrame constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame() *QStyleOptionTabWidgetFrame { - ret := C.QStyleOptionTabWidgetFrame_new() - return newQStyleOptionTabWidgetFrame(ret) + var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabWidgetFrame_new(&outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTabWidgetFrame2 constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame2(other *QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { - ret := C.QStyleOptionTabWidgetFrame_new2(other.cPointer()) - return newQStyleOptionTabWidgetFrame(ret) + var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabWidgetFrame_new2(other.cPointer(), &outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTabWidgetFrame) Delete() { - C.QStyleOptionTabWidgetFrame_Delete(this.h) + C.QStyleOptionTabWidgetFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -804,7 +884,8 @@ func (this *QStyleOptionTabWidgetFrame) GoGC() { } type QStyleOptionTabBarBase struct { - h *C.QStyleOptionTabBarBase + h *C.QStyleOptionTabBarBase + isSubclass bool *QStyleOption } @@ -822,32 +903,50 @@ func (this *QStyleOptionTabBarBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase) *QStyleOptionTabBarBase { +// newQStyleOptionTabBarBase constructs the type using only CGO pointers. +func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase, h_QStyleOption *C.QStyleOption) *QStyleOptionTabBarBase { if h == nil { return nil } - return &QStyleOptionTabBarBase{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionTabBarBase{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer) *QStyleOptionTabBarBase { - return newQStyleOptionTabBarBase((*C.QStyleOptionTabBarBase)(h)) +// UnsafeNewQStyleOptionTabBarBase constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabBarBase { + if h == nil { + return nil + } + + return &QStyleOptionTabBarBase{h: (*C.QStyleOptionTabBarBase)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionTabBarBase constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase() *QStyleOptionTabBarBase { - ret := C.QStyleOptionTabBarBase_new() - return newQStyleOptionTabBarBase(ret) + var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabBarBase_new(&outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTabBarBase2 constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase2(other *QStyleOptionTabBarBase) *QStyleOptionTabBarBase { - ret := C.QStyleOptionTabBarBase_new2(other.cPointer()) - return newQStyleOptionTabBarBase(ret) + var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTabBarBase_new2(other.cPointer(), &outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTabBarBase) Delete() { - C.QStyleOptionTabBarBase_Delete(this.h) + C.QStyleOptionTabBarBase_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -860,7 +959,8 @@ func (this *QStyleOptionTabBarBase) GoGC() { } type QStyleOptionHeader struct { - h *C.QStyleOptionHeader + h *C.QStyleOptionHeader + isSubclass bool *QStyleOption } @@ -878,32 +978,50 @@ func (this *QStyleOptionHeader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionHeader(h *C.QStyleOptionHeader) *QStyleOptionHeader { +// newQStyleOptionHeader constructs the type using only CGO pointers. +func newQStyleOptionHeader(h *C.QStyleOptionHeader, h_QStyleOption *C.QStyleOption) *QStyleOptionHeader { if h == nil { return nil } - return &QStyleOptionHeader{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionHeader{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionHeader(h unsafe.Pointer) *QStyleOptionHeader { - return newQStyleOptionHeader((*C.QStyleOptionHeader)(h)) +// UnsafeNewQStyleOptionHeader constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionHeader(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionHeader { + if h == nil { + return nil + } + + return &QStyleOptionHeader{h: (*C.QStyleOptionHeader)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionHeader constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader() *QStyleOptionHeader { - ret := C.QStyleOptionHeader_new() - return newQStyleOptionHeader(ret) + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionHeader_new(&outptr_QStyleOptionHeader, &outptr_QStyleOption) + ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionHeader2 constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader2(other *QStyleOptionHeader) *QStyleOptionHeader { - ret := C.QStyleOptionHeader_new2(other.cPointer()) - return newQStyleOptionHeader(ret) + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionHeader_new2(other.cPointer(), &outptr_QStyleOptionHeader, &outptr_QStyleOption) + ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionHeader) Delete() { - C.QStyleOptionHeader_Delete(this.h) + C.QStyleOptionHeader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -916,7 +1034,8 @@ func (this *QStyleOptionHeader) GoGC() { } type QStyleOptionHeaderV2 struct { - h *C.QStyleOptionHeaderV2 + h *C.QStyleOptionHeaderV2 + isSubclass bool *QStyleOptionHeader } @@ -934,32 +1053,52 @@ func (this *QStyleOptionHeaderV2) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionHeaderV2(h *C.QStyleOptionHeaderV2) *QStyleOptionHeaderV2 { +// newQStyleOptionHeaderV2 constructs the type using only CGO pointers. +func newQStyleOptionHeaderV2(h *C.QStyleOptionHeaderV2, h_QStyleOptionHeader *C.QStyleOptionHeader, h_QStyleOption *C.QStyleOption) *QStyleOptionHeaderV2 { if h == nil { return nil } - return &QStyleOptionHeaderV2{h: h, QStyleOptionHeader: UnsafeNewQStyleOptionHeader(unsafe.Pointer(h))} + return &QStyleOptionHeaderV2{h: h, + QStyleOptionHeader: newQStyleOptionHeader(h_QStyleOptionHeader, h_QStyleOption)} } -func UnsafeNewQStyleOptionHeaderV2(h unsafe.Pointer) *QStyleOptionHeaderV2 { - return newQStyleOptionHeaderV2((*C.QStyleOptionHeaderV2)(h)) +// UnsafeNewQStyleOptionHeaderV2 constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionHeaderV2(h unsafe.Pointer, h_QStyleOptionHeader unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionHeaderV2 { + if h == nil { + return nil + } + + return &QStyleOptionHeaderV2{h: (*C.QStyleOptionHeaderV2)(h), + QStyleOptionHeader: UnsafeNewQStyleOptionHeader(h_QStyleOptionHeader, h_QStyleOption)} } // NewQStyleOptionHeaderV2 constructs a new QStyleOptionHeaderV2 object. func NewQStyleOptionHeaderV2() *QStyleOptionHeaderV2 { - ret := C.QStyleOptionHeaderV2_new() - return newQStyleOptionHeaderV2(ret) + var outptr_QStyleOptionHeaderV2 *C.QStyleOptionHeaderV2 = nil + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionHeaderV2_new(&outptr_QStyleOptionHeaderV2, &outptr_QStyleOptionHeader, &outptr_QStyleOption) + ret := newQStyleOptionHeaderV2(outptr_QStyleOptionHeaderV2, outptr_QStyleOptionHeader, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionHeaderV22 constructs a new QStyleOptionHeaderV2 object. func NewQStyleOptionHeaderV22(other *QStyleOptionHeaderV2) *QStyleOptionHeaderV2 { - ret := C.QStyleOptionHeaderV2_new2(other.cPointer()) - return newQStyleOptionHeaderV2(ret) + var outptr_QStyleOptionHeaderV2 *C.QStyleOptionHeaderV2 = nil + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionHeaderV2_new2(other.cPointer(), &outptr_QStyleOptionHeaderV2, &outptr_QStyleOptionHeader, &outptr_QStyleOption) + ret := newQStyleOptionHeaderV2(outptr_QStyleOptionHeaderV2, outptr_QStyleOptionHeader, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionHeaderV2) Delete() { - C.QStyleOptionHeaderV2_Delete(this.h) + C.QStyleOptionHeaderV2_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -972,7 +1111,8 @@ func (this *QStyleOptionHeaderV2) GoGC() { } type QStyleOptionButton struct { - h *C.QStyleOptionButton + h *C.QStyleOptionButton + isSubclass bool *QStyleOption } @@ -990,32 +1130,50 @@ func (this *QStyleOptionButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionButton(h *C.QStyleOptionButton) *QStyleOptionButton { +// newQStyleOptionButton constructs the type using only CGO pointers. +func newQStyleOptionButton(h *C.QStyleOptionButton, h_QStyleOption *C.QStyleOption) *QStyleOptionButton { if h == nil { return nil } - return &QStyleOptionButton{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionButton{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionButton(h unsafe.Pointer) *QStyleOptionButton { - return newQStyleOptionButton((*C.QStyleOptionButton)(h)) +// UnsafeNewQStyleOptionButton constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionButton(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionButton { + if h == nil { + return nil + } + + return &QStyleOptionButton{h: (*C.QStyleOptionButton)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionButton constructs a new QStyleOptionButton object. func NewQStyleOptionButton() *QStyleOptionButton { - ret := C.QStyleOptionButton_new() - return newQStyleOptionButton(ret) + var outptr_QStyleOptionButton *C.QStyleOptionButton = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionButton_new(&outptr_QStyleOptionButton, &outptr_QStyleOption) + ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionButton2 constructs a new QStyleOptionButton object. func NewQStyleOptionButton2(other *QStyleOptionButton) *QStyleOptionButton { - ret := C.QStyleOptionButton_new2(other.cPointer()) - return newQStyleOptionButton(ret) + var outptr_QStyleOptionButton *C.QStyleOptionButton = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionButton_new2(other.cPointer(), &outptr_QStyleOptionButton, &outptr_QStyleOption) + ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionButton) Delete() { - C.QStyleOptionButton_Delete(this.h) + C.QStyleOptionButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1028,7 +1186,8 @@ func (this *QStyleOptionButton) GoGC() { } type QStyleOptionTab struct { - h *C.QStyleOptionTab + h *C.QStyleOptionTab + isSubclass bool *QStyleOption } @@ -1046,32 +1205,50 @@ func (this *QStyleOptionTab) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTab(h *C.QStyleOptionTab) *QStyleOptionTab { +// newQStyleOptionTab constructs the type using only CGO pointers. +func newQStyleOptionTab(h *C.QStyleOptionTab, h_QStyleOption *C.QStyleOption) *QStyleOptionTab { if h == nil { return nil } - return &QStyleOptionTab{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionTab{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionTab(h unsafe.Pointer) *QStyleOptionTab { - return newQStyleOptionTab((*C.QStyleOptionTab)(h)) +// UnsafeNewQStyleOptionTab constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTab(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTab { + if h == nil { + return nil + } + + return &QStyleOptionTab{h: (*C.QStyleOptionTab)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionTab constructs a new QStyleOptionTab object. func NewQStyleOptionTab() *QStyleOptionTab { - ret := C.QStyleOptionTab_new() - return newQStyleOptionTab(ret) + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTab_new(&outptr_QStyleOptionTab, &outptr_QStyleOption) + ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTab2 constructs a new QStyleOptionTab object. func NewQStyleOptionTab2(other *QStyleOptionTab) *QStyleOptionTab { - ret := C.QStyleOptionTab_new2(other.cPointer()) - return newQStyleOptionTab(ret) + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTab_new2(other.cPointer(), &outptr_QStyleOptionTab, &outptr_QStyleOption) + ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTab) Delete() { - C.QStyleOptionTab_Delete(this.h) + C.QStyleOptionTab_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1084,7 +1261,8 @@ func (this *QStyleOptionTab) GoGC() { } type QStyleOptionToolBar struct { - h *C.QStyleOptionToolBar + h *C.QStyleOptionToolBar + isSubclass bool *QStyleOption } @@ -1102,32 +1280,50 @@ func (this *QStyleOptionToolBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionToolBar(h *C.QStyleOptionToolBar) *QStyleOptionToolBar { +// newQStyleOptionToolBar constructs the type using only CGO pointers. +func newQStyleOptionToolBar(h *C.QStyleOptionToolBar, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBar { if h == nil { return nil } - return &QStyleOptionToolBar{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionToolBar{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer) *QStyleOptionToolBar { - return newQStyleOptionToolBar((*C.QStyleOptionToolBar)(h)) +// UnsafeNewQStyleOptionToolBar constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBar { + if h == nil { + return nil + } + + return &QStyleOptionToolBar{h: (*C.QStyleOptionToolBar)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionToolBar constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar() *QStyleOptionToolBar { - ret := C.QStyleOptionToolBar_new() - return newQStyleOptionToolBar(ret) + var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBar_new(&outptr_QStyleOptionToolBar, &outptr_QStyleOption) + ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionToolBar2 constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar2(other *QStyleOptionToolBar) *QStyleOptionToolBar { - ret := C.QStyleOptionToolBar_new2(other.cPointer()) - return newQStyleOptionToolBar(ret) + var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBar_new2(other.cPointer(), &outptr_QStyleOptionToolBar, &outptr_QStyleOption) + ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionToolBar) Delete() { - C.QStyleOptionToolBar_Delete(this.h) + C.QStyleOptionToolBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1140,7 +1336,8 @@ func (this *QStyleOptionToolBar) GoGC() { } type QStyleOptionProgressBar struct { - h *C.QStyleOptionProgressBar + h *C.QStyleOptionProgressBar + isSubclass bool *QStyleOption } @@ -1158,32 +1355,50 @@ func (this *QStyleOptionProgressBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar) *QStyleOptionProgressBar { +// newQStyleOptionProgressBar constructs the type using only CGO pointers. +func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar, h_QStyleOption *C.QStyleOption) *QStyleOptionProgressBar { if h == nil { return nil } - return &QStyleOptionProgressBar{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionProgressBar{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer) *QStyleOptionProgressBar { - return newQStyleOptionProgressBar((*C.QStyleOptionProgressBar)(h)) +// UnsafeNewQStyleOptionProgressBar constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionProgressBar { + if h == nil { + return nil + } + + return &QStyleOptionProgressBar{h: (*C.QStyleOptionProgressBar)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionProgressBar constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar() *QStyleOptionProgressBar { - ret := C.QStyleOptionProgressBar_new() - return newQStyleOptionProgressBar(ret) + var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionProgressBar_new(&outptr_QStyleOptionProgressBar, &outptr_QStyleOption) + ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionProgressBar2 constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar2(other *QStyleOptionProgressBar) *QStyleOptionProgressBar { - ret := C.QStyleOptionProgressBar_new2(other.cPointer()) - return newQStyleOptionProgressBar(ret) + var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionProgressBar_new2(other.cPointer(), &outptr_QStyleOptionProgressBar, &outptr_QStyleOption) + ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionProgressBar) Delete() { - C.QStyleOptionProgressBar_Delete(this.h) + C.QStyleOptionProgressBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1196,7 +1411,8 @@ func (this *QStyleOptionProgressBar) GoGC() { } type QStyleOptionMenuItem struct { - h *C.QStyleOptionMenuItem + h *C.QStyleOptionMenuItem + isSubclass bool *QStyleOption } @@ -1214,32 +1430,50 @@ func (this *QStyleOptionMenuItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem) *QStyleOptionMenuItem { +// newQStyleOptionMenuItem constructs the type using only CGO pointers. +func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem, h_QStyleOption *C.QStyleOption) *QStyleOptionMenuItem { if h == nil { return nil } - return &QStyleOptionMenuItem{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionMenuItem{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer) *QStyleOptionMenuItem { - return newQStyleOptionMenuItem((*C.QStyleOptionMenuItem)(h)) +// UnsafeNewQStyleOptionMenuItem constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionMenuItem { + if h == nil { + return nil + } + + return &QStyleOptionMenuItem{h: (*C.QStyleOptionMenuItem)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionMenuItem constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem() *QStyleOptionMenuItem { - ret := C.QStyleOptionMenuItem_new() - return newQStyleOptionMenuItem(ret) + var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionMenuItem_new(&outptr_QStyleOptionMenuItem, &outptr_QStyleOption) + ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionMenuItem2 constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem2(other *QStyleOptionMenuItem) *QStyleOptionMenuItem { - ret := C.QStyleOptionMenuItem_new2(other.cPointer()) - return newQStyleOptionMenuItem(ret) + var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionMenuItem_new2(other.cPointer(), &outptr_QStyleOptionMenuItem, &outptr_QStyleOption) + ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionMenuItem) Delete() { - C.QStyleOptionMenuItem_Delete(this.h) + C.QStyleOptionMenuItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1252,7 +1486,8 @@ func (this *QStyleOptionMenuItem) GoGC() { } type QStyleOptionDockWidget struct { - h *C.QStyleOptionDockWidget + h *C.QStyleOptionDockWidget + isSubclass bool *QStyleOption } @@ -1270,32 +1505,50 @@ func (this *QStyleOptionDockWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget) *QStyleOptionDockWidget { +// newQStyleOptionDockWidget constructs the type using only CGO pointers. +func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget, h_QStyleOption *C.QStyleOption) *QStyleOptionDockWidget { if h == nil { return nil } - return &QStyleOptionDockWidget{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionDockWidget{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer) *QStyleOptionDockWidget { - return newQStyleOptionDockWidget((*C.QStyleOptionDockWidget)(h)) +// UnsafeNewQStyleOptionDockWidget constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionDockWidget { + if h == nil { + return nil + } + + return &QStyleOptionDockWidget{h: (*C.QStyleOptionDockWidget)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionDockWidget constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget() *QStyleOptionDockWidget { - ret := C.QStyleOptionDockWidget_new() - return newQStyleOptionDockWidget(ret) + var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionDockWidget_new(&outptr_QStyleOptionDockWidget, &outptr_QStyleOption) + ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionDockWidget2 constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget2(other *QStyleOptionDockWidget) *QStyleOptionDockWidget { - ret := C.QStyleOptionDockWidget_new2(other.cPointer()) - return newQStyleOptionDockWidget(ret) + var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionDockWidget_new2(other.cPointer(), &outptr_QStyleOptionDockWidget, &outptr_QStyleOption) + ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionDockWidget) Delete() { - C.QStyleOptionDockWidget_Delete(this.h) + C.QStyleOptionDockWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1308,7 +1561,8 @@ func (this *QStyleOptionDockWidget) GoGC() { } type QStyleOptionViewItem struct { - h *C.QStyleOptionViewItem + h *C.QStyleOptionViewItem + isSubclass bool *QStyleOption } @@ -1326,32 +1580,50 @@ func (this *QStyleOptionViewItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionViewItem(h *C.QStyleOptionViewItem) *QStyleOptionViewItem { +// newQStyleOptionViewItem constructs the type using only CGO pointers. +func newQStyleOptionViewItem(h *C.QStyleOptionViewItem, h_QStyleOption *C.QStyleOption) *QStyleOptionViewItem { if h == nil { return nil } - return &QStyleOptionViewItem{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionViewItem{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer) *QStyleOptionViewItem { - return newQStyleOptionViewItem((*C.QStyleOptionViewItem)(h)) +// UnsafeNewQStyleOptionViewItem constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionViewItem { + if h == nil { + return nil + } + + return &QStyleOptionViewItem{h: (*C.QStyleOptionViewItem)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionViewItem constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem() *QStyleOptionViewItem { - ret := C.QStyleOptionViewItem_new() - return newQStyleOptionViewItem(ret) + var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionViewItem_new(&outptr_QStyleOptionViewItem, &outptr_QStyleOption) + ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionViewItem2 constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem2(other *QStyleOptionViewItem) *QStyleOptionViewItem { - ret := C.QStyleOptionViewItem_new2(other.cPointer()) - return newQStyleOptionViewItem(ret) + var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionViewItem_new2(other.cPointer(), &outptr_QStyleOptionViewItem, &outptr_QStyleOption) + ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionViewItem) Delete() { - C.QStyleOptionViewItem_Delete(this.h) + C.QStyleOptionViewItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1364,7 +1636,8 @@ func (this *QStyleOptionViewItem) GoGC() { } type QStyleOptionToolBox struct { - h *C.QStyleOptionToolBox + h *C.QStyleOptionToolBox + isSubclass bool *QStyleOption } @@ -1382,32 +1655,50 @@ func (this *QStyleOptionToolBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionToolBox(h *C.QStyleOptionToolBox) *QStyleOptionToolBox { +// newQStyleOptionToolBox constructs the type using only CGO pointers. +func newQStyleOptionToolBox(h *C.QStyleOptionToolBox, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBox { if h == nil { return nil } - return &QStyleOptionToolBox{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionToolBox{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer) *QStyleOptionToolBox { - return newQStyleOptionToolBox((*C.QStyleOptionToolBox)(h)) +// UnsafeNewQStyleOptionToolBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBox { + if h == nil { + return nil + } + + return &QStyleOptionToolBox{h: (*C.QStyleOptionToolBox)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionToolBox constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox() *QStyleOptionToolBox { - ret := C.QStyleOptionToolBox_new() - return newQStyleOptionToolBox(ret) + var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBox_new(&outptr_QStyleOptionToolBox, &outptr_QStyleOption) + ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionToolBox2 constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox2(other *QStyleOptionToolBox) *QStyleOptionToolBox { - ret := C.QStyleOptionToolBox_new2(other.cPointer()) - return newQStyleOptionToolBox(ret) + var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolBox_new2(other.cPointer(), &outptr_QStyleOptionToolBox, &outptr_QStyleOption) + ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionToolBox) Delete() { - C.QStyleOptionToolBox_Delete(this.h) + C.QStyleOptionToolBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1420,7 +1711,8 @@ func (this *QStyleOptionToolBox) GoGC() { } type QStyleOptionRubberBand struct { - h *C.QStyleOptionRubberBand + h *C.QStyleOptionRubberBand + isSubclass bool *QStyleOption } @@ -1438,32 +1730,50 @@ func (this *QStyleOptionRubberBand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand) *QStyleOptionRubberBand { +// newQStyleOptionRubberBand constructs the type using only CGO pointers. +func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand, h_QStyleOption *C.QStyleOption) *QStyleOptionRubberBand { if h == nil { return nil } - return &QStyleOptionRubberBand{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionRubberBand{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer) *QStyleOptionRubberBand { - return newQStyleOptionRubberBand((*C.QStyleOptionRubberBand)(h)) +// UnsafeNewQStyleOptionRubberBand constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionRubberBand { + if h == nil { + return nil + } + + return &QStyleOptionRubberBand{h: (*C.QStyleOptionRubberBand)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionRubberBand constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand() *QStyleOptionRubberBand { - ret := C.QStyleOptionRubberBand_new() - return newQStyleOptionRubberBand(ret) + var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionRubberBand_new(&outptr_QStyleOptionRubberBand, &outptr_QStyleOption) + ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionRubberBand2 constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand2(other *QStyleOptionRubberBand) *QStyleOptionRubberBand { - ret := C.QStyleOptionRubberBand_new2(other.cPointer()) - return newQStyleOptionRubberBand(ret) + var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionRubberBand_new2(other.cPointer(), &outptr_QStyleOptionRubberBand, &outptr_QStyleOption) + ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionRubberBand) Delete() { - C.QStyleOptionRubberBand_Delete(this.h) + C.QStyleOptionRubberBand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1476,7 +1786,8 @@ func (this *QStyleOptionRubberBand) GoGC() { } type QStyleOptionComplex struct { - h *C.QStyleOptionComplex + h *C.QStyleOptionComplex + isSubclass bool *QStyleOption } @@ -1494,44 +1805,72 @@ func (this *QStyleOptionComplex) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionComplex(h *C.QStyleOptionComplex) *QStyleOptionComplex { +// newQStyleOptionComplex constructs the type using only CGO pointers. +func newQStyleOptionComplex(h *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComplex { if h == nil { return nil } - return &QStyleOptionComplex{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionComplex{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionComplex(h unsafe.Pointer) *QStyleOptionComplex { - return newQStyleOptionComplex((*C.QStyleOptionComplex)(h)) +// UnsafeNewQStyleOptionComplex constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionComplex(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComplex { + if h == nil { + return nil + } + + return &QStyleOptionComplex{h: (*C.QStyleOptionComplex)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionComplex constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex() *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new() - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new(&outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComplex2 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex2(other *QStyleOptionComplex) *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new2(other.cPointer()) - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new2(other.cPointer(), &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComplex3 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex3(version int) *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new3((C.int)(version)) - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new3((C.int)(version), &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComplex4 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex4(version int, typeVal int) *QStyleOptionComplex { - ret := C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal)) - return newQStyleOptionComplex(ret) + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionComplex) Delete() { - C.QStyleOptionComplex_Delete(this.h) + C.QStyleOptionComplex_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1544,7 +1883,8 @@ func (this *QStyleOptionComplex) GoGC() { } type QStyleOptionSlider struct { - h *C.QStyleOptionSlider + h *C.QStyleOptionSlider + isSubclass bool *QStyleOptionComplex } @@ -1562,32 +1902,52 @@ func (this *QStyleOptionSlider) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionSlider(h *C.QStyleOptionSlider) *QStyleOptionSlider { +// newQStyleOptionSlider constructs the type using only CGO pointers. +func newQStyleOptionSlider(h *C.QStyleOptionSlider, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSlider { if h == nil { return nil } - return &QStyleOptionSlider{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionSlider{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionSlider(h unsafe.Pointer) *QStyleOptionSlider { - return newQStyleOptionSlider((*C.QStyleOptionSlider)(h)) +// UnsafeNewQStyleOptionSlider constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionSlider(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSlider { + if h == nil { + return nil + } + + return &QStyleOptionSlider{h: (*C.QStyleOptionSlider)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionSlider constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider() *QStyleOptionSlider { - ret := C.QStyleOptionSlider_new() - return newQStyleOptionSlider(ret) + var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSlider_new(&outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionSlider2 constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider2(other *QStyleOptionSlider) *QStyleOptionSlider { - ret := C.QStyleOptionSlider_new2(other.cPointer()) - return newQStyleOptionSlider(ret) + var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSlider_new2(other.cPointer(), &outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionSlider) Delete() { - C.QStyleOptionSlider_Delete(this.h) + C.QStyleOptionSlider_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1600,7 +1960,8 @@ func (this *QStyleOptionSlider) GoGC() { } type QStyleOptionSpinBox struct { - h *C.QStyleOptionSpinBox + h *C.QStyleOptionSpinBox + isSubclass bool *QStyleOptionComplex } @@ -1618,32 +1979,52 @@ func (this *QStyleOptionSpinBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox) *QStyleOptionSpinBox { +// newQStyleOptionSpinBox constructs the type using only CGO pointers. +func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSpinBox { if h == nil { return nil } - return &QStyleOptionSpinBox{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionSpinBox{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer) *QStyleOptionSpinBox { - return newQStyleOptionSpinBox((*C.QStyleOptionSpinBox)(h)) +// UnsafeNewQStyleOptionSpinBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSpinBox { + if h == nil { + return nil + } + + return &QStyleOptionSpinBox{h: (*C.QStyleOptionSpinBox)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionSpinBox constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox() *QStyleOptionSpinBox { - ret := C.QStyleOptionSpinBox_new() - return newQStyleOptionSpinBox(ret) + var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSpinBox_new(&outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionSpinBox2 constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox2(other *QStyleOptionSpinBox) *QStyleOptionSpinBox { - ret := C.QStyleOptionSpinBox_new2(other.cPointer()) - return newQStyleOptionSpinBox(ret) + var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSpinBox_new2(other.cPointer(), &outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionSpinBox) Delete() { - C.QStyleOptionSpinBox_Delete(this.h) + C.QStyleOptionSpinBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1656,7 +2037,8 @@ func (this *QStyleOptionSpinBox) GoGC() { } type QStyleOptionToolButton struct { - h *C.QStyleOptionToolButton + h *C.QStyleOptionToolButton + isSubclass bool *QStyleOptionComplex } @@ -1674,32 +2056,52 @@ func (this *QStyleOptionToolButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionToolButton(h *C.QStyleOptionToolButton) *QStyleOptionToolButton { +// newQStyleOptionToolButton constructs the type using only CGO pointers. +func newQStyleOptionToolButton(h *C.QStyleOptionToolButton, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionToolButton { if h == nil { return nil } - return &QStyleOptionToolButton{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionToolButton{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer) *QStyleOptionToolButton { - return newQStyleOptionToolButton((*C.QStyleOptionToolButton)(h)) +// UnsafeNewQStyleOptionToolButton constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolButton { + if h == nil { + return nil + } + + return &QStyleOptionToolButton{h: (*C.QStyleOptionToolButton)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionToolButton constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton() *QStyleOptionToolButton { - ret := C.QStyleOptionToolButton_new() - return newQStyleOptionToolButton(ret) + var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolButton_new(&outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionToolButton2 constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton2(other *QStyleOptionToolButton) *QStyleOptionToolButton { - ret := C.QStyleOptionToolButton_new2(other.cPointer()) - return newQStyleOptionToolButton(ret) + var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionToolButton_new2(other.cPointer(), &outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionToolButton) Delete() { - C.QStyleOptionToolButton_Delete(this.h) + C.QStyleOptionToolButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1712,7 +2114,8 @@ func (this *QStyleOptionToolButton) GoGC() { } type QStyleOptionComboBox struct { - h *C.QStyleOptionComboBox + h *C.QStyleOptionComboBox + isSubclass bool *QStyleOptionComplex } @@ -1730,32 +2133,52 @@ func (this *QStyleOptionComboBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionComboBox(h *C.QStyleOptionComboBox) *QStyleOptionComboBox { +// newQStyleOptionComboBox constructs the type using only CGO pointers. +func newQStyleOptionComboBox(h *C.QStyleOptionComboBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComboBox { if h == nil { return nil } - return &QStyleOptionComboBox{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionComboBox{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer) *QStyleOptionComboBox { - return newQStyleOptionComboBox((*C.QStyleOptionComboBox)(h)) +// UnsafeNewQStyleOptionComboBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComboBox { + if h == nil { + return nil + } + + return &QStyleOptionComboBox{h: (*C.QStyleOptionComboBox)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionComboBox constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox() *QStyleOptionComboBox { - ret := C.QStyleOptionComboBox_new() - return newQStyleOptionComboBox(ret) + var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComboBox_new(&outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionComboBox2 constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox2(other *QStyleOptionComboBox) *QStyleOptionComboBox { - ret := C.QStyleOptionComboBox_new2(other.cPointer()) - return newQStyleOptionComboBox(ret) + var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionComboBox_new2(other.cPointer(), &outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionComboBox) Delete() { - C.QStyleOptionComboBox_Delete(this.h) + C.QStyleOptionComboBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1768,7 +2191,8 @@ func (this *QStyleOptionComboBox) GoGC() { } type QStyleOptionTitleBar struct { - h *C.QStyleOptionTitleBar + h *C.QStyleOptionTitleBar + isSubclass bool *QStyleOptionComplex } @@ -1786,32 +2210,52 @@ func (this *QStyleOptionTitleBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar) *QStyleOptionTitleBar { +// newQStyleOptionTitleBar constructs the type using only CGO pointers. +func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionTitleBar { if h == nil { return nil } - return &QStyleOptionTitleBar{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionTitleBar{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer) *QStyleOptionTitleBar { - return newQStyleOptionTitleBar((*C.QStyleOptionTitleBar)(h)) +// UnsafeNewQStyleOptionTitleBar constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTitleBar { + if h == nil { + return nil + } + + return &QStyleOptionTitleBar{h: (*C.QStyleOptionTitleBar)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionTitleBar constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar() *QStyleOptionTitleBar { - ret := C.QStyleOptionTitleBar_new() - return newQStyleOptionTitleBar(ret) + var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTitleBar_new(&outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionTitleBar2 constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar2(other *QStyleOptionTitleBar) *QStyleOptionTitleBar { - ret := C.QStyleOptionTitleBar_new2(other.cPointer()) - return newQStyleOptionTitleBar(ret) + var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionTitleBar_new2(other.cPointer(), &outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionTitleBar) Delete() { - C.QStyleOptionTitleBar_Delete(this.h) + C.QStyleOptionTitleBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1824,7 +2268,8 @@ func (this *QStyleOptionTitleBar) GoGC() { } type QStyleOptionGroupBox struct { - h *C.QStyleOptionGroupBox + h *C.QStyleOptionGroupBox + isSubclass bool *QStyleOptionComplex } @@ -1842,32 +2287,52 @@ func (this *QStyleOptionGroupBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox) *QStyleOptionGroupBox { +// newQStyleOptionGroupBox constructs the type using only CGO pointers. +func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionGroupBox { if h == nil { return nil } - return &QStyleOptionGroupBox{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionGroupBox{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer) *QStyleOptionGroupBox { - return newQStyleOptionGroupBox((*C.QStyleOptionGroupBox)(h)) +// UnsafeNewQStyleOptionGroupBox constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGroupBox { + if h == nil { + return nil + } + + return &QStyleOptionGroupBox{h: (*C.QStyleOptionGroupBox)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionGroupBox constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox() *QStyleOptionGroupBox { - ret := C.QStyleOptionGroupBox_new() - return newQStyleOptionGroupBox(ret) + var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGroupBox_new(&outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionGroupBox2 constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox2(other *QStyleOptionGroupBox) *QStyleOptionGroupBox { - ret := C.QStyleOptionGroupBox_new2(other.cPointer()) - return newQStyleOptionGroupBox(ret) + var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGroupBox_new2(other.cPointer(), &outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionGroupBox) Delete() { - C.QStyleOptionGroupBox_Delete(this.h) + C.QStyleOptionGroupBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1880,7 +2345,8 @@ func (this *QStyleOptionGroupBox) GoGC() { } type QStyleOptionSizeGrip struct { - h *C.QStyleOptionSizeGrip + h *C.QStyleOptionSizeGrip + isSubclass bool *QStyleOptionComplex } @@ -1898,32 +2364,52 @@ func (this *QStyleOptionSizeGrip) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip) *QStyleOptionSizeGrip { +// newQStyleOptionSizeGrip constructs the type using only CGO pointers. +func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSizeGrip { if h == nil { return nil } - return &QStyleOptionSizeGrip{h: h, QStyleOptionComplex: UnsafeNewQStyleOptionComplex(unsafe.Pointer(h))} + return &QStyleOptionSizeGrip{h: h, + QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } -func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer) *QStyleOptionSizeGrip { - return newQStyleOptionSizeGrip((*C.QStyleOptionSizeGrip)(h)) +// UnsafeNewQStyleOptionSizeGrip constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSizeGrip { + if h == nil { + return nil + } + + return &QStyleOptionSizeGrip{h: (*C.QStyleOptionSizeGrip)(h), + QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} } // NewQStyleOptionSizeGrip constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip() *QStyleOptionSizeGrip { - ret := C.QStyleOptionSizeGrip_new() - return newQStyleOptionSizeGrip(ret) + var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSizeGrip_new(&outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionSizeGrip2 constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip2(other *QStyleOptionSizeGrip) *QStyleOptionSizeGrip { - ret := C.QStyleOptionSizeGrip_new2(other.cPointer()) - return newQStyleOptionSizeGrip(ret) + var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionSizeGrip_new2(other.cPointer(), &outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QStyleOptionSizeGrip) Delete() { - C.QStyleOptionSizeGrip_Delete(this.h) + C.QStyleOptionSizeGrip_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1936,7 +2422,8 @@ func (this *QStyleOptionSizeGrip) GoGC() { } type QStyleOptionGraphicsItem struct { - h *C.QStyleOptionGraphicsItem + h *C.QStyleOptionGraphicsItem + isSubclass bool *QStyleOption } @@ -1954,27 +2441,45 @@ func (this *QStyleOptionGraphicsItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { +// newQStyleOptionGraphicsItem constructs the type using only CGO pointers. +func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem, h_QStyleOption *C.QStyleOption) *QStyleOptionGraphicsItem { if h == nil { return nil } - return &QStyleOptionGraphicsItem{h: h, QStyleOption: UnsafeNewQStyleOption(unsafe.Pointer(h))} + return &QStyleOptionGraphicsItem{h: h, + QStyleOption: newQStyleOption(h_QStyleOption)} } -func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer) *QStyleOptionGraphicsItem { - return newQStyleOptionGraphicsItem((*C.QStyleOptionGraphicsItem)(h)) +// UnsafeNewQStyleOptionGraphicsItem constructs the type using only unsafe pointers. +func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGraphicsItem { + if h == nil { + return nil + } + + return &QStyleOptionGraphicsItem{h: (*C.QStyleOptionGraphicsItem)(h), + QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} } // NewQStyleOptionGraphicsItem constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem() *QStyleOptionGraphicsItem { - ret := C.QStyleOptionGraphicsItem_new() - return newQStyleOptionGraphicsItem(ret) + var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGraphicsItem_new(&outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } // NewQStyleOptionGraphicsItem2 constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem2(other *QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { - ret := C.QStyleOptionGraphicsItem_new2(other.cPointer()) - return newQStyleOptionGraphicsItem(ret) + var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil + var outptr_QStyleOption *C.QStyleOption = nil + + C.QStyleOptionGraphicsItem_new2(other.cPointer(), &outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret.isSubclass = true + return ret } func QStyleOptionGraphicsItem_LevelOfDetailFromTransform(worldTransform *QTransform) float64 { @@ -1983,7 +2488,7 @@ func QStyleOptionGraphicsItem_LevelOfDetailFromTransform(worldTransform *QTransf // Delete this object from C++ memory. func (this *QStyleOptionGraphicsItem) Delete() { - C.QStyleOptionGraphicsItem_Delete(this.h) + C.QStyleOptionGraphicsItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1996,7 +2501,8 @@ func (this *QStyleOptionGraphicsItem) GoGC() { } type QStyleHintReturn struct { - h *C.QStyleHintReturn + h *C.QStyleHintReturn + isSubclass bool } func (this *QStyleHintReturn) cPointer() *C.QStyleHintReturn { @@ -2013,6 +2519,7 @@ func (this *QStyleHintReturn) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQStyleHintReturn constructs the type using only CGO pointers. func newQStyleHintReturn(h *C.QStyleHintReturn) *QStyleHintReturn { if h == nil { return nil @@ -2020,32 +2527,53 @@ func newQStyleHintReturn(h *C.QStyleHintReturn) *QStyleHintReturn { return &QStyleHintReturn{h: h} } +// UnsafeNewQStyleHintReturn constructs the type using only unsafe pointers. func UnsafeNewQStyleHintReturn(h unsafe.Pointer) *QStyleHintReturn { - return newQStyleHintReturn((*C.QStyleHintReturn)(h)) + if h == nil { + return nil + } + + return &QStyleHintReturn{h: (*C.QStyleHintReturn)(h)} } // NewQStyleHintReturn constructs a new QStyleHintReturn object. func NewQStyleHintReturn() *QStyleHintReturn { - ret := C.QStyleHintReturn_new() - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new(&outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturn2 constructs a new QStyleHintReturn object. func NewQStyleHintReturn2(param1 *QStyleHintReturn) *QStyleHintReturn { - ret := C.QStyleHintReturn_new2(param1.cPointer()) - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new2(param1.cPointer(), &outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturn3 constructs a new QStyleHintReturn object. func NewQStyleHintReturn3(version int) *QStyleHintReturn { - ret := C.QStyleHintReturn_new3((C.int)(version)) - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new3((C.int)(version), &outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturn4 constructs a new QStyleHintReturn object. func NewQStyleHintReturn4(version int, typeVal int) *QStyleHintReturn { - ret := C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal)) - return newQStyleHintReturn(ret) + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleHintReturn) + ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } func (this *QStyleHintReturn) OperatorAssign(param1 *QStyleHintReturn) { @@ -2054,7 +2582,7 @@ func (this *QStyleHintReturn) OperatorAssign(param1 *QStyleHintReturn) { // Delete this object from C++ memory. func (this *QStyleHintReturn) Delete() { - C.QStyleHintReturn_Delete(this.h) + C.QStyleHintReturn_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2067,7 +2595,8 @@ func (this *QStyleHintReturn) GoGC() { } type QStyleHintReturnMask struct { - h *C.QStyleHintReturnMask + h *C.QStyleHintReturnMask + isSubclass bool *QStyleHintReturn } @@ -2085,27 +2614,45 @@ func (this *QStyleHintReturnMask) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleHintReturnMask(h *C.QStyleHintReturnMask) *QStyleHintReturnMask { +// newQStyleHintReturnMask constructs the type using only CGO pointers. +func newQStyleHintReturnMask(h *C.QStyleHintReturnMask, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnMask { if h == nil { return nil } - return &QStyleHintReturnMask{h: h, QStyleHintReturn: UnsafeNewQStyleHintReturn(unsafe.Pointer(h))} + return &QStyleHintReturnMask{h: h, + QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} } -func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer) *QStyleHintReturnMask { - return newQStyleHintReturnMask((*C.QStyleHintReturnMask)(h)) +// UnsafeNewQStyleHintReturnMask constructs the type using only unsafe pointers. +func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnMask { + if h == nil { + return nil + } + + return &QStyleHintReturnMask{h: (*C.QStyleHintReturnMask)(h), + QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} } // NewQStyleHintReturnMask constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask() *QStyleHintReturnMask { - ret := C.QStyleHintReturnMask_new() - return newQStyleHintReturnMask(ret) + var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnMask_new(&outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturnMask2 constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask2(param1 *QStyleHintReturnMask) *QStyleHintReturnMask { - ret := C.QStyleHintReturnMask_new2(param1.cPointer()) - return newQStyleHintReturnMask(ret) + var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnMask_new2(param1.cPointer(), &outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } func (this *QStyleHintReturnMask) OperatorAssign(param1 *QStyleHintReturnMask) { @@ -2114,7 +2661,7 @@ func (this *QStyleHintReturnMask) OperatorAssign(param1 *QStyleHintReturnMask) { // Delete this object from C++ memory. func (this *QStyleHintReturnMask) Delete() { - C.QStyleHintReturnMask_Delete(this.h) + C.QStyleHintReturnMask_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -2127,7 +2674,8 @@ func (this *QStyleHintReturnMask) GoGC() { } type QStyleHintReturnVariant struct { - h *C.QStyleHintReturnVariant + h *C.QStyleHintReturnVariant + isSubclass bool *QStyleHintReturn } @@ -2145,27 +2693,45 @@ func (this *QStyleHintReturnVariant) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant) *QStyleHintReturnVariant { +// newQStyleHintReturnVariant constructs the type using only CGO pointers. +func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnVariant { if h == nil { return nil } - return &QStyleHintReturnVariant{h: h, QStyleHintReturn: UnsafeNewQStyleHintReturn(unsafe.Pointer(h))} + return &QStyleHintReturnVariant{h: h, + QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} } -func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer) *QStyleHintReturnVariant { - return newQStyleHintReturnVariant((*C.QStyleHintReturnVariant)(h)) +// UnsafeNewQStyleHintReturnVariant constructs the type using only unsafe pointers. +func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnVariant { + if h == nil { + return nil + } + + return &QStyleHintReturnVariant{h: (*C.QStyleHintReturnVariant)(h), + QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} } // NewQStyleHintReturnVariant constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant() *QStyleHintReturnVariant { - ret := C.QStyleHintReturnVariant_new() - return newQStyleHintReturnVariant(ret) + var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnVariant_new(&outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } // NewQStyleHintReturnVariant2 constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant2(param1 *QStyleHintReturnVariant) *QStyleHintReturnVariant { - ret := C.QStyleHintReturnVariant_new2(param1.cPointer()) - return newQStyleHintReturnVariant(ret) + var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + + C.QStyleHintReturnVariant_new2(param1.cPointer(), &outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret.isSubclass = true + return ret } func (this *QStyleHintReturnVariant) OperatorAssign(param1 *QStyleHintReturnVariant) { @@ -2174,7 +2740,7 @@ func (this *QStyleHintReturnVariant) OperatorAssign(param1 *QStyleHintReturnVari // Delete this object from C++ memory. func (this *QStyleHintReturnVariant) Delete() { - C.QStyleHintReturnVariant_Delete(this.h) + C.QStyleHintReturnVariant_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstyleoption.h b/qt6/gen_qstyleoption.h index b0adc57f..ebbf59a7 100644 --- a/qt6/gen_qstyleoption.h +++ b/qt6/gen_qstyleoption.h @@ -78,129 +78,129 @@ typedef struct QTransform QTransform; typedef struct QWidget QWidget; #endif -QStyleOption* QStyleOption_new(); -QStyleOption* QStyleOption_new2(QStyleOption* other); -QStyleOption* QStyleOption_new3(int version); -QStyleOption* QStyleOption_new4(int version, int typeVal); +void QStyleOption_new(QStyleOption** outptr_QStyleOption); +void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption); +void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption); +void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption); void QStyleOption_InitFrom(QStyleOption* self, QWidget* w); void QStyleOption_OperatorAssign(QStyleOption* self, QStyleOption* other); -void QStyleOption_Delete(QStyleOption* self); +void QStyleOption_Delete(QStyleOption* self, bool isSubclass); -QStyleOptionFocusRect* QStyleOptionFocusRect_new(); -QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other); -void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self); +void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); +void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); +void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass); -QStyleOptionFrame* QStyleOptionFrame_new(); -QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other); -void QStyleOptionFrame_Delete(QStyleOptionFrame* self); +void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass); -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new(); -QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other); -void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self); +void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass); -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new(); -QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other); -void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self); +void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); +void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass); -QStyleOptionHeader* QStyleOptionHeader_new(); -QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other); -void QStyleOptionHeader_Delete(QStyleOptionHeader* self); +void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass); -QStyleOptionHeaderV2* QStyleOptionHeaderV2_new(); -QStyleOptionHeaderV2* QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other); -void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self); +void QStyleOptionHeaderV2_new(QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +void QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other, QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self, bool isSubclass); -QStyleOptionButton* QStyleOptionButton_new(); -QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other); -void QStyleOptionButton_Delete(QStyleOptionButton* self); +void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); +void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); +void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass); -QStyleOptionTab* QStyleOptionTab_new(); -QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other); -void QStyleOptionTab_Delete(QStyleOptionTab* self); +void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass); -QStyleOptionToolBar* QStyleOptionToolBar_new(); -QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other); -void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self); +void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass); -QStyleOptionProgressBar* QStyleOptionProgressBar_new(); -QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other); -void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self); +void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); +void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass); -QStyleOptionMenuItem* QStyleOptionMenuItem_new(); -QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other); -void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self); +void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass); -QStyleOptionDockWidget* QStyleOptionDockWidget_new(); -QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other); -void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self); +void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); +void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); +void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass); -QStyleOptionViewItem* QStyleOptionViewItem_new(); -QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other); -void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self); +void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass); -QStyleOptionToolBox* QStyleOptionToolBox_new(); -QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other); -void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self); +void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass); -QStyleOptionRubberBand* QStyleOptionRubberBand_new(); -QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other); -void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self); +void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); +void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); +void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass); -QStyleOptionComplex* QStyleOptionComplex_new(); -QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other); -QStyleOptionComplex* QStyleOptionComplex_new3(int version); -QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal); -void QStyleOptionComplex_Delete(QStyleOptionComplex* self); +void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass); -QStyleOptionSlider* QStyleOptionSlider_new(); -QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other); -void QStyleOptionSlider_Delete(QStyleOptionSlider* self); +void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass); -QStyleOptionSpinBox* QStyleOptionSpinBox_new(); -QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other); -void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self); +void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass); -QStyleOptionToolButton* QStyleOptionToolButton_new(); -QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other); -void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self); +void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass); -QStyleOptionComboBox* QStyleOptionComboBox_new(); -QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other); -void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self); +void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass); -QStyleOptionTitleBar* QStyleOptionTitleBar_new(); -QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other); -void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self); +void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass); -QStyleOptionGroupBox* QStyleOptionGroupBox_new(); -QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other); -void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self); +void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass); -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new(); -QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other); -void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self); +void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass); -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new(); -QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other); +void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); +void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform); -void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self); +void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubclass); -QStyleHintReturn* QStyleHintReturn_new(); -QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1); -QStyleHintReturn* QStyleHintReturn_new3(int version); -QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal); +void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1); -void QStyleHintReturn_Delete(QStyleHintReturn* self); +void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass); -QStyleHintReturnMask* QStyleHintReturnMask_new(); -QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1); +void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1); -void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self); +void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass); -QStyleHintReturnVariant* QStyleHintReturnVariant_new(); -QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1); +void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); +void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1); -void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self); +void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstylepainter.cpp b/qt6/gen_qstylepainter.cpp index 327e99eb..d0f15ade 100644 --- a/qt6/gen_qstylepainter.cpp +++ b/qt6/gen_qstylepainter.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -14,16 +15,22 @@ #include "gen_qstylepainter.h" #include "_cgo_export.h" -QStylePainter* QStylePainter_new(QWidget* w) { - return new QStylePainter(w); +void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { + QStylePainter* ret = new QStylePainter(w); + *outptr_QStylePainter = ret; + *outptr_QPainter = static_cast(ret); } -QStylePainter* QStylePainter_new2() { - return new QStylePainter(); +void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { + QStylePainter* ret = new QStylePainter(); + *outptr_QStylePainter = ret; + *outptr_QPainter = static_cast(ret); } -QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w) { - return new QStylePainter(pd, w); +void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { + QStylePainter* ret = new QStylePainter(pd, w); + *outptr_QStylePainter = ret; + *outptr_QPainter = static_cast(ret); } bool QStylePainter_Begin(QStylePainter* self, QWidget* w) { @@ -64,7 +71,11 @@ void QStylePainter_DrawItemText6(QStylePainter* self, QRect* r, int flags, QPale self->drawItemText(*r, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } -void QStylePainter_Delete(QStylePainter* self) { - delete self; +void QStylePainter_Delete(QStylePainter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstylepainter.go b/qt6/gen_qstylepainter.go index ea900c2a..77faff00 100644 --- a/qt6/gen_qstylepainter.go +++ b/qt6/gen_qstylepainter.go @@ -14,7 +14,8 @@ import ( ) type QStylePainter struct { - h *C.QStylePainter + h *C.QStylePainter + isSubclass bool *QPainter } @@ -32,33 +33,56 @@ func (this *QStylePainter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStylePainter(h *C.QStylePainter) *QStylePainter { +// newQStylePainter constructs the type using only CGO pointers. +func newQStylePainter(h *C.QStylePainter, h_QPainter *C.QPainter) *QStylePainter { if h == nil { return nil } - return &QStylePainter{h: h, QPainter: UnsafeNewQPainter(unsafe.Pointer(h))} + return &QStylePainter{h: h, + QPainter: newQPainter(h_QPainter)} } -func UnsafeNewQStylePainter(h unsafe.Pointer) *QStylePainter { - return newQStylePainter((*C.QStylePainter)(h)) +// UnsafeNewQStylePainter constructs the type using only unsafe pointers. +func UnsafeNewQStylePainter(h unsafe.Pointer, h_QPainter unsafe.Pointer) *QStylePainter { + if h == nil { + return nil + } + + return &QStylePainter{h: (*C.QStylePainter)(h), + QPainter: UnsafeNewQPainter(h_QPainter)} } // NewQStylePainter constructs a new QStylePainter object. func NewQStylePainter(w *QWidget) *QStylePainter { - ret := C.QStylePainter_new(w.cPointer()) - return newQStylePainter(ret) + var outptr_QStylePainter *C.QStylePainter = nil + var outptr_QPainter *C.QPainter = nil + + C.QStylePainter_new(w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) + ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret.isSubclass = true + return ret } // NewQStylePainter2 constructs a new QStylePainter object. func NewQStylePainter2() *QStylePainter { - ret := C.QStylePainter_new2() - return newQStylePainter(ret) + var outptr_QStylePainter *C.QStylePainter = nil + var outptr_QPainter *C.QPainter = nil + + C.QStylePainter_new2(&outptr_QStylePainter, &outptr_QPainter) + ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret.isSubclass = true + return ret } // NewQStylePainter3 constructs a new QStylePainter object. func NewQStylePainter3(pd *QPaintDevice, w *QWidget) *QStylePainter { - ret := C.QStylePainter_new3(pd.cPointer(), w.cPointer()) - return newQStylePainter(ret) + var outptr_QStylePainter *C.QStylePainter = nil + var outptr_QPainter *C.QPainter = nil + + C.QStylePainter_new3(pd.cPointer(), w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) + ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret.isSubclass = true + return ret } func (this *QStylePainter) Begin(w *QWidget) bool { @@ -94,7 +118,7 @@ func (this *QStylePainter) DrawItemPixmap(r *QRect, flags int, pixmap *QPixmap) } func (this *QStylePainter) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QStylePainter_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStylePainter_Style(this.h)), nil) } func (this *QStylePainter) DrawItemText6(r *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { @@ -107,7 +131,7 @@ func (this *QStylePainter) DrawItemText6(r *QRect, flags int, pal *QPalette, ena // Delete this object from C++ memory. func (this *QStylePainter) Delete() { - C.QStylePainter_Delete(this.h) + C.QStylePainter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstylepainter.h b/qt6/gen_qstylepainter.h index 9791ee61..01ca166e 100644 --- a/qt6/gen_qstylepainter.h +++ b/qt6/gen_qstylepainter.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QPaintDevice; +class QPainter; class QPalette; class QPixmap; class QRect; @@ -26,6 +27,7 @@ class QStylePainter; class QWidget; #else typedef struct QPaintDevice QPaintDevice; +typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; typedef struct QRect QRect; @@ -36,9 +38,9 @@ typedef struct QStylePainter QStylePainter; typedef struct QWidget QWidget; #endif -QStylePainter* QStylePainter_new(QWidget* w); -QStylePainter* QStylePainter_new2(); -QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w); +void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); +void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); +void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); bool QStylePainter_Begin(QStylePainter* self, QWidget* w); bool QStylePainter_Begin2(QStylePainter* self, QPaintDevice* pd, QWidget* w); void QStylePainter_DrawPrimitive(QStylePainter* self, int pe, QStyleOption* opt); @@ -48,7 +50,7 @@ void QStylePainter_DrawItemText(QStylePainter* self, QRect* r, int flags, QPalet void QStylePainter_DrawItemPixmap(QStylePainter* self, QRect* r, int flags, QPixmap* pixmap); QStyle* QStylePainter_Style(const QStylePainter* self); void QStylePainter_DrawItemText6(QStylePainter* self, QRect* r, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); -void QStylePainter_Delete(QStylePainter* self); +void QStylePainter_Delete(QStylePainter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstyleplugin.cpp b/qt6/gen_qstyleplugin.cpp index 34509a9f..d9a1dc5e 100644 --- a/qt6/gen_qstyleplugin.cpp +++ b/qt6/gen_qstyleplugin.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -54,7 +55,11 @@ struct miqt_string QStylePlugin_Tr3(const char* s, const char* c, int n) { return _ms; } -void QStylePlugin_Delete(QStylePlugin* self) { - delete self; +void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qstyleplugin.go b/qt6/gen_qstyleplugin.go index 3e6016e1..0d00e465 100644 --- a/qt6/gen_qstyleplugin.go +++ b/qt6/gen_qstyleplugin.go @@ -14,7 +14,8 @@ import ( ) type QStylePlugin struct { - h *C.QStylePlugin + h *C.QStylePlugin + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QStylePlugin) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQStylePlugin(h *C.QStylePlugin) *QStylePlugin { +// newQStylePlugin constructs the type using only CGO pointers. +func newQStylePlugin(h *C.QStylePlugin, h_QObject *C.QObject) *QStylePlugin { if h == nil { return nil } - return &QStylePlugin{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QStylePlugin{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQStylePlugin(h unsafe.Pointer) *QStylePlugin { - return newQStylePlugin((*C.QStylePlugin)(h)) +// UnsafeNewQStylePlugin constructs the type using only unsafe pointers. +func UnsafeNewQStylePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStylePlugin { + if h == nil { + return nil + } + + return &QStylePlugin{h: (*C.QStylePlugin)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QStylePlugin) MetaObject() *QMetaObject { @@ -67,7 +76,7 @@ func (this *QStylePlugin) Create(key string) *QStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return UnsafeNewQStyle(unsafe.Pointer(C.QStylePlugin_Create(this.h, key_ms))) + return UnsafeNewQStyle(unsafe.Pointer(C.QStylePlugin_Create(this.h, key_ms)), nil) } func QStylePlugin_Tr2(s string, c string) string { @@ -94,7 +103,7 @@ func QStylePlugin_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QStylePlugin) Delete() { - C.QStylePlugin_Delete(this.h) + C.QStylePlugin_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qstyleplugin.h b/qt6/gen_qstyleplugin.h index 17f64470..525a638f 100644 --- a/qt6/gen_qstyleplugin.h +++ b/qt6/gen_qstyleplugin.h @@ -16,10 +16,12 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QStyle; class QStylePlugin; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QStyle QStyle; typedef struct QStylePlugin QStylePlugin; #endif @@ -30,7 +32,7 @@ struct miqt_string QStylePlugin_Tr(const char* s); QStyle* QStylePlugin_Create(QStylePlugin* self, struct miqt_string key); struct miqt_string QStylePlugin_Tr2(const char* s, const char* c); struct miqt_string QStylePlugin_Tr3(const char* s, const char* c, int n); -void QStylePlugin_Delete(QStylePlugin* self); +void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsurface.cpp b/qt6/gen_qsurface.cpp index f88d7930..b080ea37 100644 --- a/qt6/gen_qsurface.cpp +++ b/qt6/gen_qsurface.cpp @@ -27,7 +27,11 @@ QSize* QSurface_Size(const QSurface* self) { return new QSize(self->size()); } -void QSurface_Delete(QSurface* self) { - delete self; +void QSurface_Delete(QSurface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsurface.go b/qt6/gen_qsurface.go index d59daa71..dfce50be 100644 --- a/qt6/gen_qsurface.go +++ b/qt6/gen_qsurface.go @@ -33,7 +33,8 @@ const ( ) type QSurface struct { - h *C.QSurface + h *C.QSurface + isSubclass bool } func (this *QSurface) cPointer() *C.QSurface { @@ -50,6 +51,7 @@ func (this *QSurface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSurface constructs the type using only CGO pointers. func newQSurface(h *C.QSurface) *QSurface { if h == nil { return nil @@ -57,8 +59,13 @@ func newQSurface(h *C.QSurface) *QSurface { return &QSurface{h: h} } +// UnsafeNewQSurface constructs the type using only unsafe pointers. func UnsafeNewQSurface(h unsafe.Pointer) *QSurface { - return newQSurface((*C.QSurface)(h)) + if h == nil { + return nil + } + + return &QSurface{h: (*C.QSurface)(h)} } func (this *QSurface) SurfaceClass() QSurface__SurfaceClass { @@ -89,7 +96,7 @@ func (this *QSurface) Size() *QSize { // Delete this object from C++ memory. func (this *QSurface) Delete() { - C.QSurface_Delete(this.h) + C.QSurface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsurface.h b/qt6/gen_qsurface.h index b75e892b..4539240a 100644 --- a/qt6/gen_qsurface.h +++ b/qt6/gen_qsurface.h @@ -29,7 +29,7 @@ QSurfaceFormat* QSurface_Format(const QSurface* self); int QSurface_SurfaceType(const QSurface* self); bool QSurface_SupportsOpenGL(const QSurface* self); QSize* QSurface_Size(const QSurface* self); -void QSurface_Delete(QSurface* self); +void QSurface_Delete(QSurface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsurfaceformat.cpp b/qt6/gen_qsurfaceformat.cpp index 33707752..771b519b 100644 --- a/qt6/gen_qsurfaceformat.cpp +++ b/qt6/gen_qsurfaceformat.cpp @@ -4,16 +4,19 @@ #include "gen_qsurfaceformat.h" #include "_cgo_export.h" -QSurfaceFormat* QSurfaceFormat_new() { - return new QSurfaceFormat(); +void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat) { + QSurfaceFormat* ret = new QSurfaceFormat(); + *outptr_QSurfaceFormat = ret; } -QSurfaceFormat* QSurfaceFormat_new2(int options) { - return new QSurfaceFormat(static_cast(options)); +void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat) { + QSurfaceFormat* ret = new QSurfaceFormat(static_cast(options)); + *outptr_QSurfaceFormat = ret; } -QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other) { - return new QSurfaceFormat(*other); +void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat) { + QSurfaceFormat* ret = new QSurfaceFormat(*other); + *outptr_QSurfaceFormat = ret; } void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other) { @@ -200,7 +203,11 @@ void QSurfaceFormat_SetOption2(QSurfaceFormat* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QSurfaceFormat_Delete(QSurfaceFormat* self) { - delete self; +void QSurfaceFormat_Delete(QSurfaceFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsurfaceformat.go b/qt6/gen_qsurfaceformat.go index 3468692e..bb093bdb 100644 --- a/qt6/gen_qsurfaceformat.go +++ b/qt6/gen_qsurfaceformat.go @@ -57,7 +57,8 @@ const ( ) type QSurfaceFormat struct { - h *C.QSurfaceFormat + h *C.QSurfaceFormat + isSubclass bool } func (this *QSurfaceFormat) cPointer() *C.QSurfaceFormat { @@ -74,6 +75,7 @@ func (this *QSurfaceFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSurfaceFormat constructs the type using only CGO pointers. func newQSurfaceFormat(h *C.QSurfaceFormat) *QSurfaceFormat { if h == nil { return nil @@ -81,26 +83,43 @@ func newQSurfaceFormat(h *C.QSurfaceFormat) *QSurfaceFormat { return &QSurfaceFormat{h: h} } +// UnsafeNewQSurfaceFormat constructs the type using only unsafe pointers. func UnsafeNewQSurfaceFormat(h unsafe.Pointer) *QSurfaceFormat { - return newQSurfaceFormat((*C.QSurfaceFormat)(h)) + if h == nil { + return nil + } + + return &QSurfaceFormat{h: (*C.QSurfaceFormat)(h)} } // NewQSurfaceFormat constructs a new QSurfaceFormat object. func NewQSurfaceFormat() *QSurfaceFormat { - ret := C.QSurfaceFormat_new() - return newQSurfaceFormat(ret) + var outptr_QSurfaceFormat *C.QSurfaceFormat = nil + + C.QSurfaceFormat_new(&outptr_QSurfaceFormat) + ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret.isSubclass = true + return ret } // NewQSurfaceFormat2 constructs a new QSurfaceFormat object. func NewQSurfaceFormat2(options QSurfaceFormat__FormatOption) *QSurfaceFormat { - ret := C.QSurfaceFormat_new2((C.int)(options)) - return newQSurfaceFormat(ret) + var outptr_QSurfaceFormat *C.QSurfaceFormat = nil + + C.QSurfaceFormat_new2((C.int)(options), &outptr_QSurfaceFormat) + ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret.isSubclass = true + return ret } // NewQSurfaceFormat3 constructs a new QSurfaceFormat object. func NewQSurfaceFormat3(other *QSurfaceFormat) *QSurfaceFormat { - ret := C.QSurfaceFormat_new3(other.cPointer()) - return newQSurfaceFormat(ret) + var outptr_QSurfaceFormat *C.QSurfaceFormat = nil + + C.QSurfaceFormat_new3(other.cPointer(), &outptr_QSurfaceFormat) + ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret.isSubclass = true + return ret } func (this *QSurfaceFormat) OperatorAssign(other *QSurfaceFormat) { @@ -289,7 +308,7 @@ func (this *QSurfaceFormat) SetOption2(option QSurfaceFormat__FormatOption, on b // Delete this object from C++ memory. func (this *QSurfaceFormat) Delete() { - C.QSurfaceFormat_Delete(this.h) + C.QSurfaceFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsurfaceformat.h b/qt6/gen_qsurfaceformat.h index c77afafb..f2ced619 100644 --- a/qt6/gen_qsurfaceformat.h +++ b/qt6/gen_qsurfaceformat.h @@ -22,9 +22,9 @@ typedef struct QColorSpace QColorSpace; typedef struct QSurfaceFormat QSurfaceFormat; #endif -QSurfaceFormat* QSurfaceFormat_new(); -QSurfaceFormat* QSurfaceFormat_new2(int options); -QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other); +void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat); +void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat); +void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat); void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other); void QSurfaceFormat_SetDepthBufferSize(QSurfaceFormat* self, int size); int QSurfaceFormat_DepthBufferSize(const QSurfaceFormat* self); @@ -67,7 +67,7 @@ void QSurfaceFormat_SetColorSpaceWithColorSpace(QSurfaceFormat* self, int colorS void QSurfaceFormat_SetDefaultFormat(QSurfaceFormat* format); QSurfaceFormat* QSurfaceFormat_DefaultFormat(); void QSurfaceFormat_SetOption2(QSurfaceFormat* self, int option, bool on); -void QSurfaceFormat_Delete(QSurfaceFormat* self); +void QSurfaceFormat_Delete(QSurfaceFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsyntaxhighlighter.cpp b/qt6/gen_qsyntaxhighlighter.cpp index cfec24c3..ff9da23b 100644 --- a/qt6/gen_qsyntaxhighlighter.cpp +++ b/qt6/gen_qsyntaxhighlighter.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -66,7 +67,11 @@ struct miqt_string QSyntaxHighlighter_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self) { - delete self; +void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsyntaxhighlighter.go b/qt6/gen_qsyntaxhighlighter.go index 5f311b8e..6c82cbea 100644 --- a/qt6/gen_qsyntaxhighlighter.go +++ b/qt6/gen_qsyntaxhighlighter.go @@ -14,7 +14,8 @@ import ( ) type QSyntaxHighlighter struct { - h *C.QSyntaxHighlighter + h *C.QSyntaxHighlighter + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QSyntaxHighlighter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSyntaxHighlighter(h *C.QSyntaxHighlighter) *QSyntaxHighlighter { +// newQSyntaxHighlighter constructs the type using only CGO pointers. +func newQSyntaxHighlighter(h *C.QSyntaxHighlighter, h_QObject *C.QObject) *QSyntaxHighlighter { if h == nil { return nil } - return &QSyntaxHighlighter{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSyntaxHighlighter{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer) *QSyntaxHighlighter { - return newQSyntaxHighlighter((*C.QSyntaxHighlighter)(h)) +// UnsafeNewQSyntaxHighlighter constructs the type using only unsafe pointers. +func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSyntaxHighlighter { + if h == nil { + return nil + } + + return &QSyntaxHighlighter{h: (*C.QSyntaxHighlighter)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QSyntaxHighlighter) MetaObject() *QMetaObject { @@ -67,7 +76,7 @@ func (this *QSyntaxHighlighter) SetDocument(doc *QTextDocument) { } func (this *QSyntaxHighlighter) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QSyntaxHighlighter_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QSyntaxHighlighter_Document(this.h)), nil) } func (this *QSyntaxHighlighter) Rehighlight() { @@ -102,7 +111,7 @@ func QSyntaxHighlighter_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QSyntaxHighlighter) Delete() { - C.QSyntaxHighlighter_Delete(this.h) + C.QSyntaxHighlighter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsyntaxhighlighter.h b/qt6/gen_qsyntaxhighlighter.h index a5e44870..42e0c13f 100644 --- a/qt6/gen_qsyntaxhighlighter.h +++ b/qt6/gen_qsyntaxhighlighter.h @@ -16,11 +16,13 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QSyntaxHighlighter; class QTextBlock; class QTextDocument; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QSyntaxHighlighter QSyntaxHighlighter; typedef struct QTextBlock QTextBlock; typedef struct QTextDocument QTextDocument; @@ -33,9 +35,10 @@ void QSyntaxHighlighter_SetDocument(QSyntaxHighlighter* self, QTextDocument* doc QTextDocument* QSyntaxHighlighter_Document(const QSyntaxHighlighter* self); void QSyntaxHighlighter_Rehighlight(QSyntaxHighlighter* self); void QSyntaxHighlighter_RehighlightBlock(QSyntaxHighlighter* self, QTextBlock* block); +void QSyntaxHighlighter_HighlightBlock(QSyntaxHighlighter* self, struct miqt_string text); struct miqt_string QSyntaxHighlighter_Tr2(const char* s, const char* c); struct miqt_string QSyntaxHighlighter_Tr3(const char* s, const char* c, int n); -void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self); +void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsystemsemaphore.cpp b/qt6/gen_qsystemsemaphore.cpp index 5e86e2a0..f702ed93 100644 --- a/qt6/gen_qsystemsemaphore.cpp +++ b/qt6/gen_qsystemsemaphore.cpp @@ -6,19 +6,22 @@ #include "gen_qsystemsemaphore.h" #include "_cgo_export.h" -QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key) { +void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSystemSemaphore(key_QString); + QSystemSemaphore* ret = new QSystemSemaphore(key_QString); + *outptr_QSystemSemaphore = ret; } -QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue) { +void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSystemSemaphore(key_QString, static_cast(initialValue)); + QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue)); + *outptr_QSystemSemaphore = ret; } -QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode) { +void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore) { QString key_QString = QString::fromUtf8(key.data, key.len); - return new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); + QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); + *outptr_QSystemSemaphore = ret; } struct miqt_string QSystemSemaphore_Tr(const char* sourceText) { @@ -108,7 +111,11 @@ bool QSystemSemaphore_Release1(QSystemSemaphore* self, int n) { return self->release(static_cast(n)); } -void QSystemSemaphore_Delete(QSystemSemaphore* self) { - delete self; +void QSystemSemaphore_Delete(QSystemSemaphore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsystemsemaphore.go b/qt6/gen_qsystemsemaphore.go index 0beb8553..b53dcf36 100644 --- a/qt6/gen_qsystemsemaphore.go +++ b/qt6/gen_qsystemsemaphore.go @@ -33,7 +33,8 @@ const ( ) type QSystemSemaphore struct { - h *C.QSystemSemaphore + h *C.QSystemSemaphore + isSubclass bool } func (this *QSystemSemaphore) cPointer() *C.QSystemSemaphore { @@ -50,6 +51,7 @@ func (this *QSystemSemaphore) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSystemSemaphore constructs the type using only CGO pointers. func newQSystemSemaphore(h *C.QSystemSemaphore) *QSystemSemaphore { if h == nil { return nil @@ -57,8 +59,13 @@ func newQSystemSemaphore(h *C.QSystemSemaphore) *QSystemSemaphore { return &QSystemSemaphore{h: h} } +// UnsafeNewQSystemSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSystemSemaphore(h unsafe.Pointer) *QSystemSemaphore { - return newQSystemSemaphore((*C.QSystemSemaphore)(h)) + if h == nil { + return nil + } + + return &QSystemSemaphore{h: (*C.QSystemSemaphore)(h)} } // NewQSystemSemaphore constructs a new QSystemSemaphore object. @@ -67,8 +74,12 @@ func NewQSystemSemaphore(key string) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSystemSemaphore_new(key_ms) - return newQSystemSemaphore(ret) + var outptr_QSystemSemaphore *C.QSystemSemaphore = nil + + C.QSystemSemaphore_new(key_ms, &outptr_QSystemSemaphore) + ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret.isSubclass = true + return ret } // NewQSystemSemaphore2 constructs a new QSystemSemaphore object. @@ -77,8 +88,12 @@ func NewQSystemSemaphore2(key string, initialValue int) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue)) - return newQSystemSemaphore(ret) + var outptr_QSystemSemaphore *C.QSystemSemaphore = nil + + C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue), &outptr_QSystemSemaphore) + ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret.isSubclass = true + return ret } // NewQSystemSemaphore3 constructs a new QSystemSemaphore object. @@ -87,8 +102,12 @@ func NewQSystemSemaphore3(key string, initialValue int, mode QSystemSemaphore__A key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - ret := C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode)) - return newQSystemSemaphore(ret) + var outptr_QSystemSemaphore *C.QSystemSemaphore = nil + + C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode), &outptr_QSystemSemaphore) + ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret.isSubclass = true + return ret } func QSystemSemaphore_Tr(sourceText string) string { @@ -178,7 +197,7 @@ func (this *QSystemSemaphore) Release1(n int) bool { // Delete this object from C++ memory. func (this *QSystemSemaphore) Delete() { - C.QSystemSemaphore_Delete(this.h) + C.QSystemSemaphore_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsystemsemaphore.h b/qt6/gen_qsystemsemaphore.h index 4e25954a..a57cb688 100644 --- a/qt6/gen_qsystemsemaphore.h +++ b/qt6/gen_qsystemsemaphore.h @@ -20,9 +20,9 @@ class QSystemSemaphore; typedef struct QSystemSemaphore QSystemSemaphore; #endif -QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key); -QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue); -QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode); +void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore); +void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore); +void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore); struct miqt_string QSystemSemaphore_Tr(const char* sourceText); void QSystemSemaphore_SetKey(QSystemSemaphore* self, struct miqt_string key); struct miqt_string QSystemSemaphore_Key(const QSystemSemaphore* self); @@ -35,7 +35,7 @@ struct miqt_string QSystemSemaphore_Tr3(const char* sourceText, const char* disa void QSystemSemaphore_SetKey2(QSystemSemaphore* self, struct miqt_string key, int initialValue); void QSystemSemaphore_SetKey3(QSystemSemaphore* self, struct miqt_string key, int initialValue, int mode); bool QSystemSemaphore_Release1(QSystemSemaphore* self, int n); -void QSystemSemaphore_Delete(QSystemSemaphore* self); +void QSystemSemaphore_Delete(QSystemSemaphore* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qsystemtrayicon.cpp b/qt6/gen_qsystemtrayicon.cpp index 1a3b65f3..4c8e5456 100644 --- a/qt6/gen_qsystemtrayicon.cpp +++ b/qt6/gen_qsystemtrayicon.cpp @@ -1,5 +1,8 @@ +#include +#include #include #include +#include #include #include #include @@ -7,24 +10,216 @@ #include #include #include +#include #include #include "gen_qsystemtrayicon.h" #include "_cgo_export.h" -QSystemTrayIcon* QSystemTrayIcon_new() { - return new QSystemTrayIcon(); +class MiqtVirtualQSystemTrayIcon : public virtual QSystemTrayIcon { +public: + + MiqtVirtualQSystemTrayIcon(): QSystemTrayIcon() {}; + MiqtVirtualQSystemTrayIcon(const QIcon& icon): QSystemTrayIcon(icon) {}; + MiqtVirtualQSystemTrayIcon(QObject* parent): QSystemTrayIcon(parent) {}; + MiqtVirtualQSystemTrayIcon(const QIcon& icon, QObject* parent): QSystemTrayIcon(icon, parent) {}; + + virtual ~MiqtVirtualQSystemTrayIcon() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSystemTrayIcon::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSystemTrayIcon_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSystemTrayIcon::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSystemTrayIcon::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSystemTrayIcon_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSystemTrayIcon::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSystemTrayIcon::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSystemTrayIcon_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSystemTrayIcon::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSystemTrayIcon::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSystemTrayIcon_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSystemTrayIcon::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSystemTrayIcon::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSystemTrayIcon_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSystemTrayIcon::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSystemTrayIcon::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSystemTrayIcon_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSystemTrayIcon::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSystemTrayIcon::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSystemTrayIcon_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSystemTrayIcon::disconnectNotify(*signal); + + } + +}; + +void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } -QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon) { - return new QSystemTrayIcon(*icon); +void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } -QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent) { - return new QSystemTrayIcon(parent); +void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(parent); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } -QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent) { - return new QSystemTrayIcon(*icon, parent); +void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { + MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon, parent); + *outptr_QSystemTrayIcon = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self) { @@ -123,7 +318,7 @@ void QSystemTrayIcon_Activated(QSystemTrayIcon* self, int reason) { } void QSystemTrayIcon_connect_Activated(QSystemTrayIcon* self, intptr_t slot) { - QSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::activated), self, [=](QSystemTrayIcon::ActivationReason reason) { + MiqtVirtualQSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::activated), self, [=](QSystemTrayIcon::ActivationReason reason) { QSystemTrayIcon::ActivationReason reason_ret = reason; int sigval1 = static_cast(reason_ret); miqt_exec_callback_QSystemTrayIcon_Activated(slot, sigval1); @@ -135,7 +330,7 @@ void QSystemTrayIcon_MessageClicked(QSystemTrayIcon* self) { } void QSystemTrayIcon_connect_MessageClicked(QSystemTrayIcon* self, intptr_t slot) { - QSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::messageClicked), self, [=]() { + MiqtVirtualQSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::messageClicked), self, [=]() { miqt_exec_callback_QSystemTrayIcon_MessageClicked(slot); }); } @@ -180,7 +375,67 @@ void QSystemTrayIcon_ShowMessage42(QSystemTrayIcon* self, struct miqt_string tit self->showMessage(title_QString, msg_QString, static_cast(icon), static_cast(msecs)); } -void QSystemTrayIcon_Delete(QSystemTrayIcon* self) { - delete self; +void QSystemTrayIcon_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__Event = slot; +} + +bool QSystemTrayIcon_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_Event(event); +} + +void QSystemTrayIcon_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__EventFilter = slot; +} + +bool QSystemTrayIcon_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSystemTrayIcon_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__TimerEvent = slot; +} + +void QSystemTrayIcon_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_TimerEvent(event); +} + +void QSystemTrayIcon_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__ChildEvent = slot; +} + +void QSystemTrayIcon_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_ChildEvent(event); +} + +void QSystemTrayIcon_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__CustomEvent = slot; +} + +void QSystemTrayIcon_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_CustomEvent(event); +} + +void QSystemTrayIcon_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__ConnectNotify = slot; +} + +void QSystemTrayIcon_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSystemTrayIcon_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSystemTrayIcon*)(self) )->handle__DisconnectNotify = slot; +} + +void QSystemTrayIcon_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSystemTrayIcon_Delete(QSystemTrayIcon* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qsystemtrayicon.go b/qt6/gen_qsystemtrayicon.go index 9acd1eb7..503c8244 100644 --- a/qt6/gen_qsystemtrayicon.go +++ b/qt6/gen_qsystemtrayicon.go @@ -34,7 +34,8 @@ const ( ) type QSystemTrayIcon struct { - h *C.QSystemTrayIcon + h *C.QSystemTrayIcon + isSubclass bool *QObject } @@ -52,39 +53,67 @@ func (this *QSystemTrayIcon) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSystemTrayIcon(h *C.QSystemTrayIcon) *QSystemTrayIcon { +// newQSystemTrayIcon constructs the type using only CGO pointers. +func newQSystemTrayIcon(h *C.QSystemTrayIcon, h_QObject *C.QObject) *QSystemTrayIcon { if h == nil { return nil } - return &QSystemTrayIcon{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QSystemTrayIcon{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQSystemTrayIcon(h unsafe.Pointer) *QSystemTrayIcon { - return newQSystemTrayIcon((*C.QSystemTrayIcon)(h)) +// UnsafeNewQSystemTrayIcon constructs the type using only unsafe pointers. +func UnsafeNewQSystemTrayIcon(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSystemTrayIcon { + if h == nil { + return nil + } + + return &QSystemTrayIcon{h: (*C.QSystemTrayIcon)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQSystemTrayIcon constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon() *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new() - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new(&outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSystemTrayIcon2 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon2(icon *QIcon) *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new2(icon.cPointer()) - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new2(icon.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSystemTrayIcon3 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon3(parent *QObject) *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new3(parent.cPointer()) - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new3(parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSystemTrayIcon4 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon4(icon *QIcon, parent *QObject) *QSystemTrayIcon { - ret := C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer()) - return newQSystemTrayIcon(ret) + var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil + var outptr_QObject *C.QObject = nil + + C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) + ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSystemTrayIcon) MetaObject() *QMetaObject { @@ -111,7 +140,7 @@ func (this *QSystemTrayIcon) SetContextMenu(menu *QMenu) { } func (this *QSystemTrayIcon) ContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QSystemTrayIcon_ContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QSystemTrayIcon_ContextMenu(this.h)), nil, nil, nil) } func (this *QSystemTrayIcon) Icon() *QIcon { @@ -290,9 +319,175 @@ func (this *QSystemTrayIcon) ShowMessage42(title string, msg string, icon QSyste C.QSystemTrayIcon_ShowMessage42(this.h, title_ms, msg_ms, (C.int)(icon), (C.int)(msecs)) } +func (this *QSystemTrayIcon) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSystemTrayIcon_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSystemTrayIcon) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSystemTrayIcon_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_Event +func miqt_exec_callback_QSystemTrayIcon_Event(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSystemTrayIcon) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSystemTrayIcon_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSystemTrayIcon) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSystemTrayIcon_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_EventFilter +func miqt_exec_callback_QSystemTrayIcon_EventFilter(self *C.QSystemTrayIcon, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSystemTrayIcon) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSystemTrayIcon_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSystemTrayIcon) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSystemTrayIcon_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_TimerEvent +func miqt_exec_callback_QSystemTrayIcon_TimerEvent(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSystemTrayIcon_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSystemTrayIcon) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSystemTrayIcon_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_ChildEvent +func miqt_exec_callback_QSystemTrayIcon_ChildEvent(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSystemTrayIcon_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSystemTrayIcon) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSystemTrayIcon_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_CustomEvent +func miqt_exec_callback_QSystemTrayIcon_CustomEvent(self *C.QSystemTrayIcon, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSystemTrayIcon_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSystemTrayIcon) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSystemTrayIcon_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_ConnectNotify +func miqt_exec_callback_QSystemTrayIcon_ConnectNotify(self *C.QSystemTrayIcon, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSystemTrayIcon) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSystemTrayIcon_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSystemTrayIcon) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSystemTrayIcon_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSystemTrayIcon_DisconnectNotify +func miqt_exec_callback_QSystemTrayIcon_DisconnectNotify(self *C.QSystemTrayIcon, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSystemTrayIcon) Delete() { - C.QSystemTrayIcon_Delete(this.h) + C.QSystemTrayIcon_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qsystemtrayicon.h b/qt6/gen_qsystemtrayicon.h index 2e4139d0..96b7e966 100644 --- a/qt6/gen_qsystemtrayicon.h +++ b/qt6/gen_qsystemtrayicon.h @@ -15,25 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QIcon; class QMenu; +class QMetaMethod; class QMetaObject; class QObject; class QRect; class QSystemTrayIcon; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIcon QIcon; typedef struct QMenu QMenu; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSystemTrayIcon QSystemTrayIcon; +typedef struct QTimerEvent QTimerEvent; #endif -QSystemTrayIcon* QSystemTrayIcon_new(); -QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon); -QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent); -QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent); +void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self); void* QSystemTrayIcon_Metacast(QSystemTrayIcon* self, const char* param1); struct miqt_string QSystemTrayIcon_Tr(const char* s); @@ -56,12 +64,27 @@ void QSystemTrayIcon_Activated(QSystemTrayIcon* self, int reason); void QSystemTrayIcon_connect_Activated(QSystemTrayIcon* self, intptr_t slot); void QSystemTrayIcon_MessageClicked(QSystemTrayIcon* self); void QSystemTrayIcon_connect_MessageClicked(QSystemTrayIcon* self, intptr_t slot); +bool QSystemTrayIcon_Event(QSystemTrayIcon* self, QEvent* event); struct miqt_string QSystemTrayIcon_Tr2(const char* s, const char* c); struct miqt_string QSystemTrayIcon_Tr3(const char* s, const char* c, int n); void QSystemTrayIcon_ShowMessage4(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, QIcon* icon, int msecs); void QSystemTrayIcon_ShowMessage3(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, int icon); void QSystemTrayIcon_ShowMessage42(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, int icon, int msecs); -void QSystemTrayIcon_Delete(QSystemTrayIcon* self); +void QSystemTrayIcon_override_virtual_Event(void* self, intptr_t slot); +bool QSystemTrayIcon_virtualbase_Event(void* self, QEvent* event); +void QSystemTrayIcon_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSystemTrayIcon_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSystemTrayIcon_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSystemTrayIcon_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSystemTrayIcon_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_CustomEvent(void* self, QEvent* event); +void QSystemTrayIcon_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSystemTrayIcon_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSystemTrayIcon_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSystemTrayIcon_Delete(QSystemTrayIcon* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtabbar.cpp b/qt6/gen_qtabbar.cpp index ee91fbc9..bcc2bb44 100644 --- a/qt6/gen_qtabbar.cpp +++ b/qt6/gen_qtabbar.cpp @@ -1,25 +1,1212 @@ +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include #include +#include +#include #include +#include #include #include #include "gen_qtabbar.h" #include "_cgo_export.h" -QTabBar* QTabBar_new(QWidget* parent) { - return new QTabBar(parent); +class MiqtVirtualQTabBar : public virtual QTabBar { +public: + + MiqtVirtualQTabBar(QWidget* parent): QTabBar(parent) {}; + MiqtVirtualQTabBar(): QTabBar() {}; + + virtual ~MiqtVirtualQTabBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTabBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTabBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QTabBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QTabBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize tabSizeHint(int index) const override { + if (handle__TabSizeHint == 0) { + return QTabBar::tabSizeHint(index); + } + + int sigval1 = index; + + QSize* callback_return_value = miqt_exec_callback_QTabBar_TabSizeHint(const_cast(this), handle__TabSizeHint, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_TabSizeHint(int index) const { + + return new QSize(QTabBar::tabSizeHint(static_cast(index))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumTabSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumTabSizeHint(int index) const override { + if (handle__MinimumTabSizeHint == 0) { + return QTabBar::minimumTabSizeHint(index); + } + + int sigval1 = index; + + QSize* callback_return_value = miqt_exec_callback_QTabBar_MinimumTabSizeHint(const_cast(this), handle__MinimumTabSizeHint, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumTabSizeHint(int index) const { + + return new QSize(QTabBar::minimumTabSizeHint(static_cast(index))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void tabInserted(int index) override { + if (handle__TabInserted == 0) { + QTabBar::tabInserted(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabBar_TabInserted(this, handle__TabInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabInserted(int index) { + + QTabBar::tabInserted(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void tabRemoved(int index) override { + if (handle__TabRemoved == 0) { + QTabBar::tabRemoved(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabBar_TabRemoved(this, handle__TabRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabRemoved(int index) { + + QTabBar::tabRemoved(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabLayoutChange = 0; + + // Subclass to allow providing a Go implementation + virtual void tabLayoutChange() override { + if (handle__TabLayoutChange == 0) { + QTabBar::tabLayoutChange(); + return; + } + + + miqt_exec_callback_QTabBar_TabLayoutChange(this, handle__TabLayoutChange); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabLayoutChange() { + + QTabBar::tabLayoutChange(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QTabBar::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QTabBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QTabBar::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QTabBar::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QTabBar::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTabBar::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTabBar::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QTabBar::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QTabBar::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QTabBar::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QTabBar::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QTabBar::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QTabBar::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QTabBar::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QTabBar::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QTabBar::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QTabBar::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QTabBar::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QTabBar::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QTabBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QTabBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QTabBar::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QTabBar::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QTabBar::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QTabBar::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTabBar::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTabBar::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionTab* option, int tabIndex) const override { + if (handle__InitStyleOption == 0) { + QTabBar::initStyleOption(option, tabIndex); + return; + } + + QStyleOptionTab* sigval1 = option; + int sigval2 = tabIndex; + + miqt_exec_callback_QTabBar_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionTab* option, int tabIndex) const { + + QTabBar::initStyleOption(option, static_cast(tabIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QTabBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QTabBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QTabBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QTabBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QTabBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QTabBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QTabBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QTabBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QTabBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QTabBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QTabBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QTabBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QTabBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QTabBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QTabBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QTabBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QTabBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTabBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTabBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTabBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTabBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QTabBar::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QTabBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QTabBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QTabBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QTabBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QTabBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QTabBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QTabBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QTabBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QTabBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QTabBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QTabBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QTabBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QTabBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTabBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTabBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTabBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTabBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTabBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTabBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTabBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTabBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTabBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QTabBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QTabBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QTabBar::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QTabBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QTabBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QTabBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QTabBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QTabBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QTabBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QTabBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QTabBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QTabBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QTabBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QTabBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QTabBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTabBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTabBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTabBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QTabBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTabBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QTabBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTabBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTabBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTabBar::focusNextPrevChild(next); + + } + +}; + +void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(parent); + *outptr_QTabBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTabBar* QTabBar_new2() { - return new QTabBar(); +void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(); + *outptr_QTabBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTabBar_MetaObject(const QTabBar* self) { @@ -313,7 +1500,7 @@ void QTabBar_CurrentChanged(QTabBar* self, int index) { } void QTabBar_connect_CurrentChanged(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::currentChanged), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_CurrentChanged(slot, sigval1); }); @@ -324,7 +1511,7 @@ void QTabBar_TabCloseRequested(QTabBar* self, int index) { } void QTabBar_connect_TabCloseRequested(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabCloseRequested), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabCloseRequested), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_TabCloseRequested(slot, sigval1); }); @@ -335,7 +1522,7 @@ void QTabBar_TabMoved(QTabBar* self, int from, int to) { } void QTabBar_connect_TabMoved(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabMoved), self, [=](int from, int to) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabMoved), self, [=](int from, int to) { int sigval1 = from; int sigval2 = to; miqt_exec_callback_QTabBar_TabMoved(slot, sigval1, sigval2); @@ -347,7 +1534,7 @@ void QTabBar_TabBarClicked(QTabBar* self, int index) { } void QTabBar_connect_TabBarClicked(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabBarClicked), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabBarClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_TabBarClicked(slot, sigval1); }); @@ -358,7 +1545,7 @@ void QTabBar_TabBarDoubleClicked(QTabBar* self, int index) { } void QTabBar_connect_TabBarDoubleClicked(QTabBar* self, intptr_t slot) { - QTabBar::connect(self, static_cast(&QTabBar::tabBarDoubleClicked), self, [=](int index) { + MiqtVirtualQTabBar::connect(self, static_cast(&QTabBar::tabBarDoubleClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabBar_TabBarDoubleClicked(slot, sigval1); }); @@ -386,7 +1573,395 @@ struct miqt_string QTabBar_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTabBar_Delete(QTabBar* self) { - delete self; +void QTabBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QTabBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_SizeHint(); +} + +void QTabBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QTabBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QTabBar_override_virtual_TabSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabSizeHint = slot; +} + +QSize* QTabBar_virtualbase_TabSizeHint(const void* self, int index) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_TabSizeHint(index); +} + +void QTabBar_override_virtual_MinimumTabSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MinimumTabSizeHint = slot; +} + +QSize* QTabBar_virtualbase_MinimumTabSizeHint(const void* self, int index) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_MinimumTabSizeHint(index); +} + +void QTabBar_override_virtual_TabInserted(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabInserted = slot; +} + +void QTabBar_virtualbase_TabInserted(void* self, int index) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabInserted(index); +} + +void QTabBar_override_virtual_TabRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabRemoved = slot; +} + +void QTabBar_virtualbase_TabRemoved(void* self, int index) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabRemoved(index); +} + +void QTabBar_override_virtual_TabLayoutChange(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabLayoutChange = slot; +} + +void QTabBar_virtualbase_TabLayoutChange(void* self) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabLayoutChange(); +} + +void QTabBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__Event = slot; +} + +bool QTabBar_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQTabBar*)(self) )->virtualbase_Event(param1); +} + +void QTabBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ResizeEvent = slot; +} + +void QTabBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QTabBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ShowEvent = slot; +} + +void QTabBar_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTabBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__HideEvent = slot; +} + +void QTabBar_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_HideEvent(param1); +} + +void QTabBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__PaintEvent = slot; +} + +void QTabBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_PaintEvent(param1); +} + +void QTabBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MousePressEvent = slot; +} + +void QTabBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QTabBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTabBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QTabBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTabBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QTabBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTabBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QTabBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__WheelEvent = slot; +} + +void QTabBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QTabBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QTabBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QTabBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ChangeEvent = slot; +} + +void QTabBar_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QTabBar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TimerEvent = slot; +} + +void QTabBar_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TimerEvent(event); +} + +void QTabBar_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InitStyleOption = slot; +} + +void QTabBar_virtualbase_InitStyleOption(const void* self, QStyleOptionTab* option, int tabIndex) { + ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_InitStyleOption(option, tabIndex); +} + +void QTabBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DevType = slot; +} + +int QTabBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_DevType(); +} + +void QTabBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__SetVisible = slot; +} + +void QTabBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QTabBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__HeightForWidth = slot; +} + +int QTabBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QTabBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QTabBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QTabBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QTabBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_PaintEngine(); +} + +void QTabBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTabBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QTabBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__FocusInEvent = slot; +} + +void QTabBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTabBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QTabBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTabBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__EnterEvent = slot; +} + +void QTabBar_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QTabBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__LeaveEvent = slot; +} + +void QTabBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QTabBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__MoveEvent = slot; +} + +void QTabBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QTabBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__CloseEvent = slot; +} + +void QTabBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QTabBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTabBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QTabBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__TabletEvent = slot; +} + +void QTabBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QTabBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__ActionEvent = slot; +} + +void QTabBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QTabBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QTabBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTabBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QTabBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTabBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTabBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTabBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__DropEvent = slot; +} + +void QTabBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_DropEvent(event); +} + +void QTabBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__NativeEvent = slot; +} + +bool QTabBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQTabBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QTabBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__Metric = slot; +} + +int QTabBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_Metric(param1); +} + +void QTabBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InitPainter = slot; +} + +void QTabBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QTabBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QTabBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_Redirected(offset); +} + +void QTabBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QTabBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_SharedPainter(); +} + +void QTabBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QTabBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTabBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTabBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTabBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQTabBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QTabBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTabBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTabBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTabBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTabBar_Delete(QTabBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtabbar.go b/qt6/gen_qtabbar.go index d2fe8735..4adeb0e2 100644 --- a/qt6/gen_qtabbar.go +++ b/qt6/gen_qtabbar.go @@ -43,7 +43,8 @@ const ( ) type QTabBar struct { - h *C.QTabBar + h *C.QTabBar + isSubclass bool *QWidget } @@ -61,27 +62,49 @@ func (this *QTabBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTabBar(h *C.QTabBar) *QTabBar { +// newQTabBar constructs the type using only CGO pointers. +func newQTabBar(h *C.QTabBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabBar { if h == nil { return nil } - return &QTabBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QTabBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTabBar(h unsafe.Pointer) *QTabBar { - return newQTabBar((*C.QTabBar)(h)) +// UnsafeNewQTabBar constructs the type using only unsafe pointers. +func UnsafeNewQTabBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabBar { + if h == nil { + return nil + } + + return &QTabBar{h: (*C.QTabBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTabBar constructs a new QTabBar object. func NewQTabBar(parent *QWidget) *QTabBar { - ret := C.QTabBar_new(parent.cPointer()) - return newQTabBar(ret) + var outptr_QTabBar *C.QTabBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabBar_new(parent.cPointer(), &outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTabBar2 constructs a new QTabBar object. func NewQTabBar2() *QTabBar { - ret := C.QTabBar_new2() - return newQTabBar(ret) + var outptr_QTabBar *C.QTabBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabBar_new2(&outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTabBar) MetaObject() *QMetaObject { @@ -326,7 +349,7 @@ func (this *QTabBar) SetTabButton(index int, position QTabBar__ButtonPosition, w } func (this *QTabBar) TabButton(index int, position QTabBar__ButtonPosition) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position))), nil, nil) } func (this *QTabBar) SelectionBehaviorOnRemove() QTabBar__SelectionBehavior { @@ -520,9 +543,1144 @@ func QTabBar_Tr3(s string, c string, n int) string { return _ret } +func (this *QTabBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTabBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_SizeHint +func miqt_exec_callback_QTabBar_SizeHint(self *C.QTabBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QTabBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MinimumSizeHint +func miqt_exec_callback_QTabBar_MinimumSizeHint(self *C.QTabBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_TabSizeHint(index int) *QSize { + + _ret := C.QTabBar_virtualbase_TabSizeHint(unsafe.Pointer(this.h), (C.int)(index)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnTabSizeHint(slot func(super func(index int) *QSize, index int) *QSize) { + C.QTabBar_override_virtual_TabSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabSizeHint +func miqt_exec_callback_QTabBar_TabSizeHint(self *C.QTabBar, cb C.intptr_t, index C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QSize, index int) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_TabSizeHint, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_MinimumTabSizeHint(index int) *QSize { + + _ret := C.QTabBar_virtualbase_MinimumTabSizeHint(unsafe.Pointer(this.h), (C.int)(index)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnMinimumTabSizeHint(slot func(super func(index int) *QSize, index int) *QSize) { + C.QTabBar_override_virtual_MinimumTabSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MinimumTabSizeHint +func miqt_exec_callback_QTabBar_MinimumTabSizeHint(self *C.QTabBar, cb C.intptr_t, index C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int) *QSize, index int) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_MinimumTabSizeHint, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_TabInserted(index int) { + + C.QTabBar_virtualbase_TabInserted(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabBar) OnTabInserted(slot func(super func(index int), index int)) { + C.QTabBar_override_virtual_TabInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabInserted +func miqt_exec_callback_QTabBar_TabInserted(self *C.QTabBar, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabBar{h: self}).callVirtualBase_TabInserted, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TabRemoved(index int) { + + C.QTabBar_virtualbase_TabRemoved(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabBar) OnTabRemoved(slot func(super func(index int), index int)) { + C.QTabBar_override_virtual_TabRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabRemoved +func miqt_exec_callback_QTabBar_TabRemoved(self *C.QTabBar, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabBar{h: self}).callVirtualBase_TabRemoved, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TabLayoutChange() { + + C.QTabBar_virtualbase_TabLayoutChange(unsafe.Pointer(this.h)) + +} +func (this *QTabBar) OnTabLayoutChange(slot func(super func())) { + C.QTabBar_override_virtual_TabLayoutChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabLayoutChange +func miqt_exec_callback_QTabBar_TabLayoutChange(self *C.QTabBar, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTabBar{h: self}).callVirtualBase_TabLayoutChange) + +} + +func (this *QTabBar) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QTabBar_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QTabBar) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QTabBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_Event +func miqt_exec_callback_QTabBar_Event(self *C.QTabBar, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QTabBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QTabBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ResizeEvent +func miqt_exec_callback_QTabBar_ResizeEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTabBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTabBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ShowEvent +func miqt_exec_callback_QTabBar_ShowEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QTabBar_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QTabBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_HideEvent +func miqt_exec_callback_QTabBar_HideEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QTabBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QTabBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_PaintEvent +func miqt_exec_callback_QTabBar_PaintEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MousePressEvent +func miqt_exec_callback_QTabBar_MousePressEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MouseMoveEvent +func miqt_exec_callback_QTabBar_MouseMoveEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MouseReleaseEvent +func miqt_exec_callback_QTabBar_MouseReleaseEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QTabBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QTabBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MouseDoubleClickEvent +func miqt_exec_callback_QTabBar_MouseDoubleClickEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QTabBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QTabBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_WheelEvent +func miqt_exec_callback_QTabBar_WheelEvent(self *C.QTabBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QTabBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QTabBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_KeyPressEvent +func miqt_exec_callback_QTabBar_KeyPressEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QTabBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QTabBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ChangeEvent +func miqt_exec_callback_QTabBar_ChangeEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QTabBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTabBar_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTabBar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TimerEvent +func miqt_exec_callback_QTabBar_TimerEvent(self *C.QTabBar, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_InitStyleOption(option *QStyleOptionTab, tabIndex int) { + + C.QTabBar_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer(), (C.int)(tabIndex)) + +} +func (this *QTabBar) OnInitStyleOption(slot func(super func(option *QStyleOptionTab, tabIndex int), option *QStyleOptionTab, tabIndex int)) { + C.QTabBar_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InitStyleOption +func miqt_exec_callback_QTabBar_InitStyleOption(self *C.QTabBar, cb C.intptr_t, option *C.QStyleOptionTab, tabIndex C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionTab, tabIndex int), option *QStyleOptionTab, tabIndex int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionTab(unsafe.Pointer(option), nil) + slotval2 := (int)(tabIndex) + + gofunc((&QTabBar{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) + +} + +func (this *QTabBar) callVirtualBase_DevType() int { + + return (int)(C.QTabBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QTabBar) OnDevType(slot func(super func() int) int) { + C.QTabBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DevType +func miqt_exec_callback_QTabBar_DevType(self *C.QTabBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_SetVisible(visible bool) { + + C.QTabBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QTabBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QTabBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_SetVisible +func miqt_exec_callback_QTabBar_SetVisible(self *C.QTabBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QTabBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QTabBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QTabBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QTabBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QTabBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_HeightForWidth +func miqt_exec_callback_QTabBar_HeightForWidth(self *C.QTabBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QTabBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QTabBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QTabBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_HasHeightForWidth +func miqt_exec_callback_QTabBar_HasHeightForWidth(self *C.QTabBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QTabBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QTabBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QTabBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_PaintEngine +func miqt_exec_callback_QTabBar_PaintEngine(self *C.QTabBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QTabBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTabBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_KeyReleaseEvent +func miqt_exec_callback_QTabBar_KeyReleaseEvent(self *C.QTabBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTabBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_FocusInEvent +func miqt_exec_callback_QTabBar_FocusInEvent(self *C.QTabBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTabBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_FocusOutEvent +func miqt_exec_callback_QTabBar_FocusOutEvent(self *C.QTabBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QTabBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QTabBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_EnterEvent +func miqt_exec_callback_QTabBar_EnterEvent(self *C.QTabBar, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QTabBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTabBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_LeaveEvent +func miqt_exec_callback_QTabBar_LeaveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTabBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QTabBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QTabBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_MoveEvent +func miqt_exec_callback_QTabBar_MoveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QTabBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QTabBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_CloseEvent +func miqt_exec_callback_QTabBar_CloseEvent(self *C.QTabBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QTabBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QTabBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ContextMenuEvent +func miqt_exec_callback_QTabBar_ContextMenuEvent(self *C.QTabBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QTabBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QTabBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_TabletEvent +func miqt_exec_callback_QTabBar_TabletEvent(self *C.QTabBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QTabBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QTabBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_ActionEvent +func miqt_exec_callback_QTabBar_ActionEvent(self *C.QTabBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTabBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTabBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DragEnterEvent +func miqt_exec_callback_QTabBar_DragEnterEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTabBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTabBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DragMoveEvent +func miqt_exec_callback_QTabBar_DragMoveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTabBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTabBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DragLeaveEvent +func miqt_exec_callback_QTabBar_DragLeaveEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTabBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTabBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_DropEvent +func miqt_exec_callback_QTabBar_DropEvent(self *C.QTabBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QTabBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QTabBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QTabBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_NativeEvent +func miqt_exec_callback_QTabBar_NativeEvent(self *C.QTabBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QTabBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QTabBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QTabBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_Metric +func miqt_exec_callback_QTabBar_Metric(self *C.QTabBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QTabBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QTabBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QTabBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InitPainter +func miqt_exec_callback_QTabBar_InitPainter(self *C.QTabBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QTabBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QTabBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QTabBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QTabBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QTabBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_Redirected +func miqt_exec_callback_QTabBar_Redirected(self *C.QTabBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QTabBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QTabBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QTabBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_SharedPainter +func miqt_exec_callback_QTabBar_SharedPainter(self *C.QTabBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTabBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTabBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InputMethodEvent +func miqt_exec_callback_QTabBar_InputMethodEvent(self *C.QTabBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTabBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QTabBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QTabBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_InputMethodQuery +func miqt_exec_callback_QTabBar_InputMethodQuery(self *C.QTabBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTabBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTabBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTabBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabBar_FocusNextPrevChild +func miqt_exec_callback_QTabBar_FocusNextPrevChild(self *C.QTabBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTabBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTabBar) Delete() { - C.QTabBar_Delete(this.h) + C.QTabBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtabbar.h b/qt6/gen_qtabbar.h index 484cea54..78e42a26 100644 --- a/qt6/gen_qtabbar.h +++ b/qt6/gen_qtabbar.h @@ -15,29 +15,83 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionTab; class QTabBar; +class QTabletEvent; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionTab QStyleOptionTab; typedef struct QTabBar QTabBar; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTabBar* QTabBar_new(QWidget* parent); -QTabBar* QTabBar_new2(); +void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTabBar_MetaObject(const QTabBar* self); void* QTabBar_Metacast(QTabBar* self, const char* param1); struct miqt_string QTabBar_Tr(const char* s); @@ -108,9 +162,124 @@ void QTabBar_TabBarClicked(QTabBar* self, int index); void QTabBar_connect_TabBarClicked(QTabBar* self, intptr_t slot); void QTabBar_TabBarDoubleClicked(QTabBar* self, int index); void QTabBar_connect_TabBarDoubleClicked(QTabBar* self, intptr_t slot); +QSize* QTabBar_TabSizeHint(const QTabBar* self, int index); +QSize* QTabBar_MinimumTabSizeHint(const QTabBar* self, int index); +void QTabBar_TabInserted(QTabBar* self, int index); +void QTabBar_TabRemoved(QTabBar* self, int index); +void QTabBar_TabLayoutChange(QTabBar* self); +bool QTabBar_Event(QTabBar* self, QEvent* param1); +void QTabBar_ResizeEvent(QTabBar* self, QResizeEvent* param1); +void QTabBar_ShowEvent(QTabBar* self, QShowEvent* param1); +void QTabBar_HideEvent(QTabBar* self, QHideEvent* param1); +void QTabBar_PaintEvent(QTabBar* self, QPaintEvent* param1); +void QTabBar_MousePressEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_MouseMoveEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_MouseReleaseEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_MouseDoubleClickEvent(QTabBar* self, QMouseEvent* param1); +void QTabBar_WheelEvent(QTabBar* self, QWheelEvent* event); +void QTabBar_KeyPressEvent(QTabBar* self, QKeyEvent* param1); +void QTabBar_ChangeEvent(QTabBar* self, QEvent* param1); +void QTabBar_TimerEvent(QTabBar* self, QTimerEvent* event); +void QTabBar_InitStyleOption(const QTabBar* self, QStyleOptionTab* option, int tabIndex); struct miqt_string QTabBar_Tr2(const char* s, const char* c); struct miqt_string QTabBar_Tr3(const char* s, const char* c, int n); -void QTabBar_Delete(QTabBar* self); +void QTabBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_SizeHint(const void* self); +void QTabBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_MinimumSizeHint(const void* self); +void QTabBar_override_virtual_TabSizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_TabSizeHint(const void* self, int index); +void QTabBar_override_virtual_MinimumTabSizeHint(void* self, intptr_t slot); +QSize* QTabBar_virtualbase_MinimumTabSizeHint(const void* self, int index); +void QTabBar_override_virtual_TabInserted(void* self, intptr_t slot); +void QTabBar_virtualbase_TabInserted(void* self, int index); +void QTabBar_override_virtual_TabRemoved(void* self, intptr_t slot); +void QTabBar_virtualbase_TabRemoved(void* self, int index); +void QTabBar_override_virtual_TabLayoutChange(void* self, intptr_t slot); +void QTabBar_virtualbase_TabLayoutChange(void* self); +void QTabBar_override_virtual_Event(void* self, intptr_t slot); +bool QTabBar_virtualbase_Event(void* self, QEvent* param1); +void QTabBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QTabBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTabBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QTabBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QTabBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QTabBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QTabBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QTabBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QTabBar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTabBar_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QTabBar_virtualbase_InitStyleOption(const void* self, QStyleOptionTab* option, int tabIndex); +void QTabBar_override_virtual_DevType(void* self, intptr_t slot); +int QTabBar_virtualbase_DevType(const void* self); +void QTabBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QTabBar_virtualbase_SetVisible(void* self, bool visible); +void QTabBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QTabBar_virtualbase_HeightForWidth(const void* self, int param1); +void QTabBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QTabBar_virtualbase_HasHeightForWidth(const void* self); +void QTabBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QTabBar_virtualbase_PaintEngine(const void* self); +void QTabBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QTabBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTabBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTabBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QTabBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QTabBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QTabBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QTabBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QTabBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QTabBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QTabBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTabBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTabBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTabBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTabBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QTabBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QTabBar_override_virtual_Metric(void* self, intptr_t slot); +int QTabBar_virtualbase_Metric(const void* self, int param1); +void QTabBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QTabBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QTabBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QTabBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QTabBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QTabBar_virtualbase_SharedPainter(const void* self); +void QTabBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTabBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTabBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTabBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QTabBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTabBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTabBar_Delete(QTabBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtableview.cpp b/qt6/gen_qtableview.cpp index 5da52aed..2fe4d11c 100644 --- a/qt6/gen_qtableview.cpp +++ b/qt6/gen_qtableview.cpp @@ -1,25 +1,1552 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include +#include #include #include +#include +#include +#include +#include #include #include +#include +#include #include #include #include +#include #include +#include +#include #include #include #include "gen_qtableview.h" #include "_cgo_export.h" -QTableView* QTableView_new(QWidget* parent) { - return new QTableView(parent); +class MiqtVirtualQTableView : public virtual QTableView { +public: + + MiqtVirtualQTableView(QWidget* parent): QTableView(parent) {}; + MiqtVirtualQTableView(): QTableView() {}; + + virtual ~MiqtVirtualQTableView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QTableView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QTableView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QTableView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTableView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTableView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTableView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTableView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTableView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTableView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTableView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTableView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTableView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTableView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTableView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTableView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTableView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTableView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTableView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTableView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTableView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTableView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTableView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTableView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QTableView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QTableView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QTableView::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTableView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTableView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTableView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTableView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTableView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTableView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTableView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTableView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTableView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTableView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTableView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTableView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTableView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTableView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTableView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTableView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTableView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTableView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTableView::updateGeometries(); + return; + } + + + miqt_exec_callback_QTableView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTableView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTableView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTableView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTableView::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QTableView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QTableView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QTableView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTableView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTableView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTableView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QTableView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QTableView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTableView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTableView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTableView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTableView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTableView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTableView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTableView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTableView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QTableView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QTableView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QTableView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemDelegateForIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemDelegate* itemDelegateForIndex(const QModelIndex& index) const override { + if (handle__ItemDelegateForIndex == 0) { + return QTableView::itemDelegateForIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QAbstractItemDelegate* callback_return_value = miqt_exec_callback_QTableView_ItemDelegateForIndex(const_cast(this), handle__ItemDelegateForIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemDelegate* virtualbase_ItemDelegateForIndex(QModelIndex* index) const { + + return QTableView::itemDelegateForIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QTableView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTableView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QTableView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QTableView::reset(); + return; + } + + + miqt_exec_callback_QTableView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QTableView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QTableView::selectAll(); + return; + } + + + miqt_exec_callback_QTableView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QTableView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QTableView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QTableView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QTableView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QTableView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTableView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QTableView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QTableView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTableView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QTableView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QTableView::updateEditorData(); + return; + } + + + miqt_exec_callback_QTableView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QTableView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QTableView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QTableView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QTableView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QTableView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTableView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QTableView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QTableView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTableView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QTableView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QTableView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTableView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QTableView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QTableView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QTableView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QTableView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QTableView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QTableView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QTableView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QTableView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QTableView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QTableView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QTableView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QTableView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QTableView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QTableView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QTableView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTableView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTableView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTableView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTableView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTableView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QTableView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QTableView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTableView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTableView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTableView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTableView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTableView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTableView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTableView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTableView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTableView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTableView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTableView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTableView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTableView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTableView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTableView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTableView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTableView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTableView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTableView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTableView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTableView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTableView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTableView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTableView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTableView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTableView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTableView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QTableView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QTableView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QTableView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QTableView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QTableView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QTableView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTableView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTableView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QTableView::eventFilter(object, event); + + } + +}; + +void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(parent); + *outptr_QTableView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTableView* QTableView_new2() { - return new QTableView(); +void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(); + *outptr_QTableView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTableView_MetaObject(const QTableView* self) { @@ -162,8 +1689,8 @@ QRect* QTableView_VisualRect(const QTableView* self, QModelIndex* index) { return new QRect(self->visualRect(*index)); } -void QTableView_ScrollTo(QTableView* self, QModelIndex* index) { - self->scrollTo(*index); +void QTableView_ScrollTo(QTableView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); } QModelIndex* QTableView_IndexAt(const QTableView* self, QPoint* p) { @@ -256,11 +1783,483 @@ struct miqt_string QTableView_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTableView_ScrollTo2(QTableView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QTableView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetModel = slot; +} + +void QTableView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetModel(model); +} + +void QTableView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetRootIndex = slot; +} + +void QTableView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTableView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetSelectionModel = slot; +} + +void QTableView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTableView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DoItemsLayout = slot; +} + +void QTableView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTableView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VisualRect = slot; +} + +QRect* QTableView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_VisualRect(index); +} + +void QTableView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ScrollTo = slot; +} + +void QTableView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTableView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTableView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_IndexAt(p); +} + +void QTableView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTableView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTableView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__InitViewItemOption = slot; +} + +void QTableView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQTableView*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QTableView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__PaintEvent = slot; +} + +void QTableView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_PaintEvent(e); +} + +void QTableView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__TimerEvent = slot; +} + +void QTableView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_TimerEvent(event); +} + +void QTableView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__HorizontalOffset = slot; +} + +int QTableView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QTableView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VerticalOffset = slot; +} + +int QTableView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_VerticalOffset(); +} + +void QTableView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QTableView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QTableView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SetSelection = slot; +} + +void QTableView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QTableView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QTableView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QTableView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__UpdateGeometries = slot; +} + +void QTableView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QTableView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTableView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTableView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SizeHintForRow = slot; +} + +int QTableView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QTableView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QTableView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QTableView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QTableView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QTableView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QTableView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QTableView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QTableView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QTableView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__CurrentChanged = slot; +} + +void QTableView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QTableView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__KeyboardSearch = slot; +} + +void QTableView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QTableView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ItemDelegateForIndex = slot; +} + +QAbstractItemDelegate* QTableView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_ItemDelegateForIndex(index); +} + +void QTableView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTableView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QTableView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__Reset = slot; +} + +void QTableView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_Reset(); +} + +void QTableView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectAll = slot; +} + +void QTableView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SelectAll(); +} + +void QTableView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DataChanged = slot; +} + +void QTableView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QTableView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__RowsInserted = slot; +} + +void QTableView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QTableView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QTableView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QTableView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__UpdateEditorData = slot; +} + +void QTableView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QTableView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QTableView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QTableView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QTableView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QTableView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QTableView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QTableView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__CloseEditor = slot; +} + +void QTableView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QTableView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__CommitData = slot; +} + +void QTableView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_CommitData(editor); +} + +void QTableView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__EditorDestroyed = slot; +} + +void QTableView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QTableView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__Edit2 = slot; +} + +bool QTableView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QTableView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectionCommand = slot; +} + +int QTableView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QTableView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__StartDrag = slot; +} + +void QTableView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QTableView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTableView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTableView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__Event = slot; +} + +bool QTableView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_Event(event); +} + +void QTableView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ViewportEvent = slot; +} + +bool QTableView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QTableView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MousePressEvent = slot; +} + +void QTableView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTableView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTableView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QTableView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTableView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QTableView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTableView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTableView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DragEnterEvent = slot; +} + +void QTableView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTableView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DragMoveEvent = slot; +} + +void QTableView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTableView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTableView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTableView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__DropEvent = slot; +} + +void QTableView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_DropEvent(event); +} + +void QTableView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__FocusInEvent = slot; +} + +void QTableView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTableView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__FocusOutEvent = slot; +} + +void QTableView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTableView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__KeyPressEvent = slot; +} + +void QTableView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QTableView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__ResizeEvent = slot; +} + +void QTableView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QTableView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__InputMethodEvent = slot; +} + +void QTableView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QTableView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__EventFilter = slot; +} + +bool QTableView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQTableView*)(self) )->virtualbase_EventFilter(object, event); } -void QTableView_Delete(QTableView* self) { - delete self; +void QTableView_Delete(QTableView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtableview.go b/qt6/gen_qtableview.go index c554de8e..e42b319f 100644 --- a/qt6/gen_qtableview.go +++ b/qt6/gen_qtableview.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTableView struct { - h *C.QTableView + h *C.QTableView + isSubclass bool *QAbstractItemView } @@ -32,27 +34,55 @@ func (this *QTableView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTableView(h *C.QTableView) *QTableView { +// newQTableView constructs the type using only CGO pointers. +func newQTableView(h *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableView { if h == nil { return nil } - return &QTableView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QTableView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTableView(h unsafe.Pointer) *QTableView { - return newQTableView((*C.QTableView)(h)) +// UnsafeNewQTableView constructs the type using only unsafe pointers. +func UnsafeNewQTableView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableView { + if h == nil { + return nil + } + + return &QTableView{h: (*C.QTableView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTableView constructs a new QTableView object. func NewQTableView(parent *QWidget) *QTableView { - ret := C.QTableView_new(parent.cPointer()) - return newQTableView(ret) + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableView_new(parent.cPointer(), &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableView2 constructs a new QTableView object. func NewQTableView2() *QTableView { - ret := C.QTableView_new2() - return newQTableView(ret) + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableView_new2(&outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTableView) MetaObject() *QMetaObject { @@ -91,11 +121,11 @@ func (this *QTableView) DoItemsLayout() { } func (this *QTableView) HorizontalHeader() *QHeaderView { - return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_HorizontalHeader(this.h))) + return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_HorizontalHeader(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QTableView) VerticalHeader() *QHeaderView { - return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_VerticalHeader(this.h))) + return UnsafeNewQHeaderView(unsafe.Pointer(C.QTableView_VerticalHeader(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QTableView) SetHorizontalHeader(header *QHeaderView) { @@ -197,8 +227,8 @@ func (this *QTableView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QTableView) ScrollTo(index *QModelIndex) { - C.QTableView_ScrollTo(this.h, index.cPointer()) +func (this *QTableView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QTableView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QTableView) IndexAt(p *QPoint) *QModelIndex { @@ -294,13 +324,1441 @@ func QTableView_Tr3(s string, c string, n int) string { return _ret } -func (this *QTableView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QTableView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QTableView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QTableView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QTableView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QTableView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetModel +func miqt_exec_callback_QTableView_SetModel(self *C.QTableView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QTableView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTableView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTableView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTableView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetRootIndex +func miqt_exec_callback_QTableView_SetRootIndex(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTableView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTableView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTableView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTableView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTableView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetSelectionModel +func miqt_exec_callback_QTableView_SetSelectionModel(self *C.QTableView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTableView) callVirtualBase_DoItemsLayout() { + + C.QTableView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnDoItemsLayout(slot func(super func())) { + C.QTableView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DoItemsLayout +func miqt_exec_callback_QTableView_DoItemsLayout(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTableView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTableView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTableView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VisualRect +func miqt_exec_callback_QTableView_VisualRect(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTableView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTableView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTableView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ScrollTo +func miqt_exec_callback_QTableView_ScrollTo(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTableView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTableView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTableView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_IndexAt +func miqt_exec_callback_QTableView_IndexAt(self *C.QTableView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTableView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTableView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTableView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ScrollContentsBy +func miqt_exec_callback_QTableView_ScrollContentsBy(self *C.QTableView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTableView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QTableView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QTableView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QTableView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_InitViewItemOption +func miqt_exec_callback_QTableView_InitViewItemOption(self *C.QTableView, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QTableView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTableView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTableView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTableView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_PaintEvent +func miqt_exec_callback_QTableView_PaintEvent(self *C.QTableView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTableView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTableView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_TimerEvent +func miqt_exec_callback_QTableView_TimerEvent(self *C.QTableView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTableView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableView) OnHorizontalOffset(slot func(super func() int) int) { + C.QTableView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_HorizontalOffset +func miqt_exec_callback_QTableView_HorizontalOffset(self *C.QTableView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTableView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableView) OnVerticalOffset(slot func(super func() int) int) { + C.QTableView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VerticalOffset +func miqt_exec_callback_QTableView_VerticalOffset(self *C.QTableView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTableView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTableView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MoveCursor +func miqt_exec_callback_QTableView_MoveCursor(self *C.QTableView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTableView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTableView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTableView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SetSelection +func miqt_exec_callback_QTableView_SetSelection(self *C.QTableView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTableView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTableView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTableView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTableView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectedIndexes +func miqt_exec_callback_QTableView_SelectedIndexes(self *C.QTableView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTableView) callVirtualBase_UpdateGeometries() { + + C.QTableView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnUpdateGeometries(slot func(super func())) { + C.QTableView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_UpdateGeometries +func miqt_exec_callback_QTableView_UpdateGeometries(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTableView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTableView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTableView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ViewportSizeHint +func miqt_exec_callback_QTableView_ViewportSizeHint(self *C.QTableView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QTableView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QTableView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QTableView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SizeHintForRow +func miqt_exec_callback_QTableView_SizeHintForRow(self *C.QTableView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTableView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTableView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTableView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SizeHintForColumn +func miqt_exec_callback_QTableView_SizeHintForColumn(self *C.QTableView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QTableView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VerticalScrollbarAction +func miqt_exec_callback_QTableView_VerticalScrollbarAction(self *C.QTableView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QTableView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTableView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_HorizontalScrollbarAction +func miqt_exec_callback_QTableView_HorizontalScrollbarAction(self *C.QTableView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTableView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTableView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTableView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTableView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_IsIndexHidden +func miqt_exec_callback_QTableView_IsIndexHidden(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTableView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTableView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTableView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_CurrentChanged +func miqt_exec_callback_QTableView_CurrentChanged(self *C.QTableView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTableView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QTableView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QTableView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QTableView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_KeyboardSearch +func miqt_exec_callback_QTableView_KeyboardSearch(self *C.QTableView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QTableView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QTableView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { + + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QTableView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())), nil) +} +func (this *QTableView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { + C.QTableView_override_virtual_ItemDelegateForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ItemDelegateForIndex +func miqt_exec_callback_QTableView_ItemDelegateForIndex(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex) *C.QAbstractItemDelegate { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_ItemDelegateForIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QTableView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QTableView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_InputMethodQuery +func miqt_exec_callback_QTableView_InputMethodQuery(self *C.QTableView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableView) callVirtualBase_Reset() { + + C.QTableView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnReset(slot func(super func())) { + C.QTableView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_Reset +func miqt_exec_callback_QTableView_Reset(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_Reset) + +} + +func (this *QTableView) callVirtualBase_SelectAll() { + + C.QTableView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnSelectAll(slot func(super func())) { + C.QTableView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectAll +func miqt_exec_callback_QTableView_SelectAll(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QTableView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QTableView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QTableView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QTableView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DataChanged +func miqt_exec_callback_QTableView_DataChanged(self *C.QTableView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QTableView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QTableView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QTableView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTableView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTableView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_RowsInserted +func miqt_exec_callback_QTableView_RowsInserted(self *C.QTableView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTableView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QTableView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QTableView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTableView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTableView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_RowsAboutToBeRemoved +func miqt_exec_callback_QTableView_RowsAboutToBeRemoved(self *C.QTableView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTableView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QTableView) callVirtualBase_UpdateEditorData() { + + C.QTableView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnUpdateEditorData(slot func(super func())) { + C.QTableView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_UpdateEditorData +func miqt_exec_callback_QTableView_UpdateEditorData(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QTableView) callVirtualBase_UpdateEditorGeometries() { + + C.QTableView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTableView) OnUpdateEditorGeometries(slot func(super func())) { + C.QTableView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_UpdateEditorGeometries +func miqt_exec_callback_QTableView_UpdateEditorGeometries(self *C.QTableView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QTableView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QTableView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTableView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTableView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VerticalScrollbarValueChanged +func miqt_exec_callback_QTableView_VerticalScrollbarValueChanged(self *C.QTableView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTableView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QTableView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QTableView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTableView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTableView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QTableView_HorizontalScrollbarValueChanged(self *C.QTableView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTableView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QTableView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QTableView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QTableView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QTableView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_CloseEditor +func miqt_exec_callback_QTableView_CloseEditor(self *C.QTableView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QTableView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QTableView) callVirtualBase_CommitData(editor *QWidget) { + + C.QTableView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTableView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QTableView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_CommitData +func miqt_exec_callback_QTableView_CommitData(self *C.QTableView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QTableView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QTableView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTableView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QTableView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_EditorDestroyed +func miqt_exec_callback_QTableView_EditorDestroyed(self *C.QTableView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QTableView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QTableView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QTableView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QTableView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_Edit2 +func miqt_exec_callback_QTableView_Edit2(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QTableView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QTableView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QTableView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectionCommand +func miqt_exec_callback_QTableView_SelectionCommand(self *C.QTableView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QTableView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QTableView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QTableView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_StartDrag +func miqt_exec_callback_QTableView_StartDrag(self *C.QTableView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QTableView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QTableView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTableView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTableView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTableView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_FocusNextPrevChild +func miqt_exec_callback_QTableView_FocusNextPrevChild(self *C.QTableView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTableView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTableView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_Event +func miqt_exec_callback_QTableView_Event(self *C.QTableView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTableView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTableView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ViewportEvent +func miqt_exec_callback_QTableView_ViewportEvent(self *C.QTableView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MousePressEvent +func miqt_exec_callback_QTableView_MousePressEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MouseMoveEvent +func miqt_exec_callback_QTableView_MouseMoveEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MouseReleaseEvent +func miqt_exec_callback_QTableView_MouseReleaseEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTableView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTableView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_MouseDoubleClickEvent +func miqt_exec_callback_QTableView_MouseDoubleClickEvent(self *C.QTableView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTableView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTableView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DragEnterEvent +func miqt_exec_callback_QTableView_DragEnterEvent(self *C.QTableView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTableView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTableView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DragMoveEvent +func miqt_exec_callback_QTableView_DragMoveEvent(self *C.QTableView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTableView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTableView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DragLeaveEvent +func miqt_exec_callback_QTableView_DragLeaveEvent(self *C.QTableView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTableView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTableView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_DropEvent +func miqt_exec_callback_QTableView_DropEvent(self *C.QTableView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTableView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTableView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_FocusInEvent +func miqt_exec_callback_QTableView_FocusInEvent(self *C.QTableView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTableView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTableView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_FocusOutEvent +func miqt_exec_callback_QTableView_FocusOutEvent(self *C.QTableView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTableView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTableView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_KeyPressEvent +func miqt_exec_callback_QTableView_KeyPressEvent(self *C.QTableView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTableView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QTableView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QTableView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_ResizeEvent +func miqt_exec_callback_QTableView_ResizeEvent(self *C.QTableView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QTableView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QTableView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_InputMethodEvent +func miqt_exec_callback_QTableView_InputMethodEvent(self *C.QTableView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTableView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QTableView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QTableView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QTableView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_EventFilter +func miqt_exec_callback_QTableView_EventFilter(self *C.QTableView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QTableView) Delete() { - C.QTableView_Delete(this.h) + C.QTableView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtableview.h b/qt6/gen_qtableview.h index 38fc5871..d8e51d4e 100644 --- a/qt6/gen_qtableview.h +++ b/qt6/gen_qtableview.h @@ -15,29 +15,71 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QHeaderView; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QResizeEvent; +class QSize; +class QStyleOptionViewItem; class QTableView; +class QTimerEvent; +class QVariant; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QTableView QTableView; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTableView* QTableView_new(QWidget* parent); -QTableView* QTableView_new2(); +void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTableView_MetaObject(const QTableView* self); void* QTableView_Metacast(QTableView* self, const char* param1); struct miqt_string QTableView_Tr(const char* s); @@ -71,7 +113,7 @@ bool QTableView_WordWrap(const QTableView* self); void QTableView_SetCornerButtonEnabled(QTableView* self, bool enable); bool QTableView_IsCornerButtonEnabled(const QTableView* self); QRect* QTableView_VisualRect(const QTableView* self, QModelIndex* index); -void QTableView_ScrollTo(QTableView* self, QModelIndex* index); +void QTableView_ScrollTo(QTableView* self, QModelIndex* index, int hint); QModelIndex* QTableView_IndexAt(const QTableView* self, QPoint* p); void QTableView_SetSpan(QTableView* self, int row, int column, int rowSpan, int columnSpan); int QTableView_RowSpan(const QTableView* self, int row, int column); @@ -89,10 +131,144 @@ void QTableView_ResizeColumnToContents(QTableView* self, int column); void QTableView_ResizeColumnsToContents(QTableView* self); void QTableView_SortByColumn(QTableView* self, int column, int order); void QTableView_SetShowGrid(QTableView* self, bool show); +void QTableView_ScrollContentsBy(QTableView* self, int dx, int dy); +void QTableView_InitViewItemOption(const QTableView* self, QStyleOptionViewItem* option); +void QTableView_PaintEvent(QTableView* self, QPaintEvent* e); +void QTableView_TimerEvent(QTableView* self, QTimerEvent* event); +int QTableView_HorizontalOffset(const QTableView* self); +int QTableView_VerticalOffset(const QTableView* self); +QModelIndex* QTableView_MoveCursor(QTableView* self, int cursorAction, int modifiers); +void QTableView_SetSelection(QTableView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QTableView_SelectedIndexes(const QTableView* self); +void QTableView_UpdateGeometries(QTableView* self); +QSize* QTableView_ViewportSizeHint(const QTableView* self); +int QTableView_SizeHintForRow(const QTableView* self, int row); +int QTableView_SizeHintForColumn(const QTableView* self, int column); +void QTableView_VerticalScrollbarAction(QTableView* self, int action); +void QTableView_HorizontalScrollbarAction(QTableView* self, int action); +bool QTableView_IsIndexHidden(const QTableView* self, QModelIndex* index); +void QTableView_CurrentChanged(QTableView* self, QModelIndex* current, QModelIndex* previous); struct miqt_string QTableView_Tr2(const char* s, const char* c); struct miqt_string QTableView_Tr3(const char* s, const char* c, int n); -void QTableView_ScrollTo2(QTableView* self, QModelIndex* index, int hint); -void QTableView_Delete(QTableView* self); +void QTableView_override_virtual_SetModel(void* self, intptr_t slot); +void QTableView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QTableView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTableView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTableView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTableView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTableView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTableView_virtualbase_DoItemsLayout(void* self); +void QTableView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTableView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTableView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTableView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTableView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTableView_virtualbase_IndexAt(const void* self, QPoint* p); +void QTableView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTableView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTableView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QTableView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QTableView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTableView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTableView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTableView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTableView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTableView_virtualbase_HorizontalOffset(const void* self); +void QTableView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTableView_virtualbase_VerticalOffset(const void* self); +void QTableView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTableView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTableView_override_virtual_SetSelection(void* self, intptr_t slot); +void QTableView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTableView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTableView_virtualbase_SelectedIndexes(const void* self); +void QTableView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTableView_virtualbase_UpdateGeometries(void* self); +void QTableView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTableView_virtualbase_ViewportSizeHint(const void* self); +void QTableView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QTableView_virtualbase_SizeHintForRow(const void* self, int row); +void QTableView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTableView_virtualbase_SizeHintForColumn(const void* self, int column); +void QTableView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QTableView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QTableView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTableView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTableView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTableView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTableView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTableView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTableView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QTableView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QTableView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot); +QAbstractItemDelegate* QTableView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index); +void QTableView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTableView_virtualbase_InputMethodQuery(const void* self, int query); +void QTableView_override_virtual_Reset(void* self, intptr_t slot); +void QTableView_virtualbase_Reset(void* self); +void QTableView_override_virtual_SelectAll(void* self, intptr_t slot); +void QTableView_virtualbase_SelectAll(void* self); +void QTableView_override_virtual_DataChanged(void* self, intptr_t slot); +void QTableView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QTableView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QTableView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QTableView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QTableView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QTableView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QTableView_virtualbase_UpdateEditorData(void* self); +void QTableView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QTableView_virtualbase_UpdateEditorGeometries(void* self); +void QTableView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QTableView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QTableView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QTableView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QTableView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QTableView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QTableView_override_virtual_CommitData(void* self, intptr_t slot); +void QTableView_virtualbase_CommitData(void* self, QWidget* editor); +void QTableView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QTableView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QTableView_override_virtual_Edit2(void* self, intptr_t slot); +bool QTableView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QTableView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QTableView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QTableView_override_virtual_StartDrag(void* self, intptr_t slot); +void QTableView_virtualbase_StartDrag(void* self, int supportedActions); +void QTableView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTableView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTableView_override_virtual_Event(void* self, intptr_t slot); +bool QTableView_virtualbase_Event(void* self, QEvent* event); +void QTableView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTableView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QTableView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTableView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTableView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTableView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTableView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTableView_override_virtual_DropEvent(void* self, intptr_t slot); +void QTableView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTableView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTableView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTableView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTableView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTableView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTableView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTableView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTableView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QTableView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTableView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QTableView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTableView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QTableView_Delete(QTableView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtablewidget.cpp b/qt6/gen_qtablewidget.cpp index 70347736..f4aaa36d 100644 --- a/qt6/gen_qtablewidget.cpp +++ b/qt6/gen_qtablewidget.cpp @@ -1,32 +1,46 @@ +#include +#include #include #include +#include +#include #include +#include #include +#include #include #include #include #include +#include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include +#include #include #include #include #include "gen_qtablewidget.h" #include "_cgo_export.h" -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new() { - return new QTableWidgetSelectionRange(); +void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { + QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(); + *outptr_QTableWidgetSelectionRange = ret; } -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right) { - return new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); +void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { + QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); + *outptr_QTableWidgetSelectionRange = ret; } int QTableWidgetSelectionRange_TopRow(const QTableWidgetSelectionRange* self) { @@ -53,40 +67,215 @@ int QTableWidgetSelectionRange_ColumnCount(const QTableWidgetSelectionRange* sel return self->columnCount(); } -void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self) { - delete self; +void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTableWidgetItem* QTableWidgetItem_new() { - return new QTableWidgetItem(); +class MiqtVirtualQTableWidgetItem : public virtual QTableWidgetItem { +public: + + MiqtVirtualQTableWidgetItem(): QTableWidgetItem() {}; + MiqtVirtualQTableWidgetItem(const QString& text): QTableWidgetItem(text) {}; + MiqtVirtualQTableWidgetItem(const QIcon& icon, const QString& text): QTableWidgetItem(icon, text) {}; + MiqtVirtualQTableWidgetItem(const QTableWidgetItem& other): QTableWidgetItem(other) {}; + MiqtVirtualQTableWidgetItem(int typeVal): QTableWidgetItem(typeVal) {}; + MiqtVirtualQTableWidgetItem(const QString& text, int typeVal): QTableWidgetItem(text, typeVal) {}; + MiqtVirtualQTableWidgetItem(const QIcon& icon, const QString& text, int typeVal): QTableWidgetItem(icon, text, typeVal) {}; + + virtual ~MiqtVirtualQTableWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTableWidgetItem* clone() const override { + if (handle__Clone == 0) { + return QTableWidgetItem::clone(); + } + + + QTableWidgetItem* callback_return_value = miqt_exec_callback_QTableWidgetItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTableWidgetItem* virtualbase_Clone() const { + + return QTableWidgetItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int role) const override { + if (handle__Data == 0) { + return QTableWidgetItem::data(role); + } + + int sigval1 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTableWidgetItem_Data(const_cast(this), handle__Data, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int role) const { + + return new QVariant(QTableWidgetItem::data(static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(int role, const QVariant& value) override { + if (handle__SetData == 0) { + QTableWidgetItem::setData(role, value); + return; + } + + int sigval1 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QTableWidgetItem_SetData(this, handle__SetData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(int role, QVariant* value) { + + QTableWidgetItem::setData(static_cast(role), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QTableWidgetItem& other) const override { + if (handle__OperatorLesser == 0) { + return QTableWidgetItem::operator<(other); + } + + const QTableWidgetItem& other_ret = other; + // Cast returned reference into pointer + QTableWidgetItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QTableWidgetItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QTableWidgetItem* other) const { + + return QTableWidgetItem::operator<(*other); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QTableWidgetItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QTableWidgetItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QTableWidgetItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QTableWidgetItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QTableWidgetItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QTableWidgetItem::write(*out); + + } + +}; + +void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem) { + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text) { +void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(text_QString); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text) { +void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(*icon, text_QString); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other) { - return new QTableWidgetItem(*other); +void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem) { + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*other); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new5(int typeVal) { - return new QTableWidgetItem(static_cast(typeVal)); +void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(static_cast(typeVal)); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal) { +void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(text_QString, static_cast(typeVal)); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString, static_cast(typeVal)); + *outptr_QTableWidgetItem = ret; } -QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal) { +void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTableWidgetItem(*icon, text_QString, static_cast(typeVal)); + MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString, static_cast(typeVal)); + *outptr_QTableWidgetItem = ret; } QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self) { @@ -279,24 +468,876 @@ int QTableWidgetItem_Type(const QTableWidgetItem* self) { return self->type(); } -void QTableWidgetItem_Delete(QTableWidgetItem* self) { - delete self; +void QTableWidgetItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Clone = slot; +} + +QTableWidgetItem* QTableWidgetItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Clone(); +} + +void QTableWidgetItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Data = slot; +} + +QVariant* QTableWidgetItem_virtualbase_Data(const void* self, int role) { + return ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Data(role); +} + +void QTableWidgetItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__SetData = slot; +} + +void QTableWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value) { + ( (MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_SetData(role, value); +} + +void QTableWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__OperatorLesser = slot; +} + +bool QTableWidgetItem_virtualbase_OperatorLesser(const void* self, QTableWidgetItem* other) { + return ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_OperatorLesser(other); } -QTableWidget* QTableWidget_new(QWidget* parent) { - return new QTableWidget(parent); +void QTableWidgetItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Read = slot; } -QTableWidget* QTableWidget_new2() { - return new QTableWidget(); +void QTableWidgetItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Read(in); } -QTableWidget* QTableWidget_new3(int rows, int columns) { - return new QTableWidget(static_cast(rows), static_cast(columns)); +void QTableWidgetItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QTableWidgetItem*)(self) )->handle__Write = slot; } -QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent) { - return new QTableWidget(static_cast(rows), static_cast(columns), parent); +void QTableWidgetItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQTableWidgetItem*)(self) )->virtualbase_Write(out); +} + +void QTableWidgetItem_Delete(QTableWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQTableWidget : public virtual QTableWidget { +public: + + MiqtVirtualQTableWidget(QWidget* parent): QTableWidget(parent) {}; + MiqtVirtualQTableWidget(): QTableWidget() {}; + MiqtVirtualQTableWidget(int rows, int columns): QTableWidget(rows, columns) {}; + MiqtVirtualQTableWidget(int rows, int columns, QWidget* parent): QTableWidget(rows, columns, parent) {}; + + virtual ~MiqtVirtualQTableWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTableWidget::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTableWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTableWidget::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QTableWidget::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QTableWidget_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QTableWidget::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QList& items) const override { + if (handle__MimeData == 0) { + return QTableWidget::mimeData(items); + } + + const QList& items_ret = items; + // Convert QList<> from C++ memory to manually-managed C memory + QTableWidgetItem** items_arr = static_cast(malloc(sizeof(QTableWidgetItem*) * items_ret.length())); + for (size_t i = 0, e = items_ret.length(); i < e; ++i) { + items_arr[i] = items_ret[i]; + } + struct miqt_array items_out; + items_out.len = items_ret.length(); + items_out.data = static_cast(items_arr); + struct miqt_array /* of QTableWidgetItem* */ sigval1 = items_out; + + QMimeData* callback_return_value = miqt_exec_callback_QTableWidget_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QTableWidgetItem* */ items) const { + QList items_QList; + items_QList.reserve(items.len); + QTableWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + + return QTableWidget::mimeData(items_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(int row, int column, const QMimeData* data, Qt::DropAction action) override { + if (handle__DropMimeData == 0) { + return QTableWidget::dropMimeData(row, column, data, action); + } + + int sigval1 = row; + int sigval2 = column; + QMimeData* sigval3 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval4 = static_cast(action_ret); + + bool callback_return_value = miqt_exec_callback_QTableWidget_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(int row, int column, QMimeData* data, int action) { + + return QTableWidget::dropMimeData(static_cast(row), static_cast(column), data, static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QTableWidget::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QTableWidget_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QTableWidget::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTableWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTableWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTableWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTableWidget::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTableWidget_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTableWidget::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTableWidget::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTableWidget_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTableWidget::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTableWidget::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTableWidget_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTableWidget::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTableWidget::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTableWidget_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTableWidget::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTableWidget::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTableWidget_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTableWidget::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTableWidget::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableWidget_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTableWidget::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTableWidget::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTableWidget_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTableWidget::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QTableWidget::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QTableWidget_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QTableWidget::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTableWidget::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTableWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTableWidget::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTableWidget::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTableWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTableWidget::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTableWidget::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableWidget_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTableWidget::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTableWidget::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTableWidget_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTableWidget::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTableWidget::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTableWidget_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTableWidget::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTableWidget::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTableWidget_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTableWidget::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTableWidget::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTableWidget_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTableWidget::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTableWidget::updateGeometries(); + return; + } + + + miqt_exec_callback_QTableWidget_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTableWidget::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTableWidget::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTableWidget_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTableWidget::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QTableWidget::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QTableWidget_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QTableWidget::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTableWidget::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTableWidget_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTableWidget::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QTableWidget::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableWidget_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QTableWidget::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTableWidget::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTableWidget_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTableWidget::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTableWidget::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTableWidget_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTableWidget::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTableWidget::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTableWidget_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTableWidget::currentChanged(*current, *previous); + + } + +}; + +void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(parent); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns)); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns), parent); + *outptr_QTableWidget = ret; + *outptr_QTableView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTableWidget_MetaObject(const QTableWidget* self) { @@ -594,7 +1635,7 @@ void QTableWidget_ItemPressed(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemPressed(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemPressed), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemPressed), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemPressed(slot, sigval1); }); @@ -605,7 +1646,7 @@ void QTableWidget_ItemClicked(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemClicked), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemClicked), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemClicked(slot, sigval1); }); @@ -616,7 +1657,7 @@ void QTableWidget_ItemDoubleClicked(QTableWidget* self, QTableWidgetItem* item) } void QTableWidget_connect_ItemDoubleClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemDoubleClicked), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemDoubleClicked), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemDoubleClicked(slot, sigval1); }); @@ -627,7 +1668,7 @@ void QTableWidget_ItemActivated(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemActivated(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemActivated), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemActivated), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemActivated(slot, sigval1); }); @@ -638,7 +1679,7 @@ void QTableWidget_ItemEntered(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemEntered(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemEntered), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemEntered), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemEntered(slot, sigval1); }); @@ -649,7 +1690,7 @@ void QTableWidget_ItemChanged(QTableWidget* self, QTableWidgetItem* item) { } void QTableWidget_connect_ItemChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemChanged), self, [=](QTableWidgetItem* item) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemChanged), self, [=](QTableWidgetItem* item) { QTableWidgetItem* sigval1 = item; miqt_exec_callback_QTableWidget_ItemChanged(slot, sigval1); }); @@ -660,7 +1701,7 @@ void QTableWidget_CurrentItemChanged(QTableWidget* self, QTableWidgetItem* curre } void QTableWidget_connect_CurrentItemChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::currentItemChanged), self, [=](QTableWidgetItem* current, QTableWidgetItem* previous) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::currentItemChanged), self, [=](QTableWidgetItem* current, QTableWidgetItem* previous) { QTableWidgetItem* sigval1 = current; QTableWidgetItem* sigval2 = previous; miqt_exec_callback_QTableWidget_CurrentItemChanged(slot, sigval1, sigval2); @@ -672,7 +1713,7 @@ void QTableWidget_ItemSelectionChanged(QTableWidget* self) { } void QTableWidget_connect_ItemSelectionChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::itemSelectionChanged), self, [=]() { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::itemSelectionChanged), self, [=]() { miqt_exec_callback_QTableWidget_ItemSelectionChanged(slot); }); } @@ -682,7 +1723,7 @@ void QTableWidget_CellPressed(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellPressed(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellPressed), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellPressed), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellPressed(slot, sigval1, sigval2); @@ -694,7 +1735,7 @@ void QTableWidget_CellClicked(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellClicked), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellClicked), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellClicked(slot, sigval1, sigval2); @@ -706,7 +1747,7 @@ void QTableWidget_CellDoubleClicked(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellDoubleClicked(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellDoubleClicked), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellDoubleClicked), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellDoubleClicked(slot, sigval1, sigval2); @@ -718,7 +1759,7 @@ void QTableWidget_CellActivated(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellActivated(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellActivated), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellActivated), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellActivated(slot, sigval1, sigval2); @@ -730,7 +1771,7 @@ void QTableWidget_CellEntered(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellEntered(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellEntered), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellEntered), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellEntered(slot, sigval1, sigval2); @@ -742,7 +1783,7 @@ void QTableWidget_CellChanged(QTableWidget* self, int row, int column) { } void QTableWidget_connect_CellChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::cellChanged), self, [=](int row, int column) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::cellChanged), self, [=](int row, int column) { int sigval1 = row; int sigval2 = column; miqt_exec_callback_QTableWidget_CellChanged(slot, sigval1, sigval2); @@ -754,7 +1795,7 @@ void QTableWidget_CurrentCellChanged(QTableWidget* self, int currentRow, int cur } void QTableWidget_connect_CurrentCellChanged(QTableWidget* self, intptr_t slot) { - QTableWidget::connect(self, static_cast(&QTableWidget::currentCellChanged), self, [=](int currentRow, int currentColumn, int previousRow, int previousColumn) { + MiqtVirtualQTableWidget::connect(self, static_cast(&QTableWidget::currentCellChanged), self, [=](int currentRow, int currentColumn, int previousRow, int previousColumn) { int sigval1 = currentRow; int sigval2 = currentColumn; int sigval3 = previousRow; @@ -793,7 +1834,243 @@ void QTableWidget_ScrollToItem2(QTableWidget* self, QTableWidgetItem* item, int self->scrollToItem(item, static_cast(hint)); } -void QTableWidget_Delete(QTableWidget* self) { - delete self; +void QTableWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__Event = slot; +} + +bool QTableWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_Event(e); +} + +void QTableWidget_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QTableWidget_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_MimeTypes(); +} + +void QTableWidget_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__MimeData = slot; +} + +QMimeData* QTableWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTableWidgetItem* */ items) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_MimeData(items); +} + +void QTableWidget_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__DropMimeData = slot; +} + +bool QTableWidget_virtualbase_DropMimeData(void* self, int row, int column, QMimeData* data, int action) { + return ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_DropMimeData(row, column, data, action); +} + +void QTableWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SupportedDropActions = slot; +} + +int QTableWidget_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SupportedDropActions(); +} + +void QTableWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__DropEvent = slot; +} + +void QTableWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QTableWidget_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SetRootIndex = slot; +} + +void QTableWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTableWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SetSelectionModel = slot; +} + +void QTableWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTableWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__DoItemsLayout = slot; +} + +void QTableWidget_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTableWidget_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VisualRect = slot; +} + +QRect* QTableWidget_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_VisualRect(index); +} + +void QTableWidget_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ScrollTo = slot; +} + +void QTableWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTableWidget_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTableWidget_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_IndexAt(p); +} + +void QTableWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTableWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTableWidget_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__InitViewItemOption = slot; +} + +void QTableWidget_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QTableWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__PaintEvent = slot; +} + +void QTableWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_PaintEvent(e); +} + +void QTableWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__TimerEvent = slot; +} + +void QTableWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_TimerEvent(event); +} + +void QTableWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__HorizontalOffset = slot; +} + +int QTableWidget_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_HorizontalOffset(); +} + +void QTableWidget_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VerticalOffset = slot; +} + +int QTableWidget_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_VerticalOffset(); +} + +void QTableWidget_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QTableWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QTableWidget_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SetSelection = slot; +} + +void QTableWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QTableWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QTableWidget_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SelectedIndexes(); +} + +void QTableWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__UpdateGeometries = slot; +} + +void QTableWidget_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_UpdateGeometries(); +} + +void QTableWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTableWidget_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTableWidget_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SizeHintForRow = slot; +} + +int QTableWidget_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QTableWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SizeHintForColumn = slot; +} + +int QTableWidget_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QTableWidget_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QTableWidget_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QTableWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QTableWidget_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QTableWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__IsIndexHidden = slot; +} + +bool QTableWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QTableWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__CurrentChanged = slot; +} + +void QTableWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QTableWidget_Delete(QTableWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtablewidget.go b/qt6/gen_qtablewidget.go index 6cb7e6b4..5834c573 100644 --- a/qt6/gen_qtablewidget.go +++ b/qt6/gen_qtablewidget.go @@ -22,7 +22,8 @@ const ( ) type QTableWidgetSelectionRange struct { - h *C.QTableWidgetSelectionRange + h *C.QTableWidgetSelectionRange + isSubclass bool } func (this *QTableWidgetSelectionRange) cPointer() *C.QTableWidgetSelectionRange { @@ -39,6 +40,7 @@ func (this *QTableWidgetSelectionRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTableWidgetSelectionRange constructs the type using only CGO pointers. func newQTableWidgetSelectionRange(h *C.QTableWidgetSelectionRange) *QTableWidgetSelectionRange { if h == nil { return nil @@ -46,20 +48,33 @@ func newQTableWidgetSelectionRange(h *C.QTableWidgetSelectionRange) *QTableWidge return &QTableWidgetSelectionRange{h: h} } +// UnsafeNewQTableWidgetSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetSelectionRange(h unsafe.Pointer) *QTableWidgetSelectionRange { - return newQTableWidgetSelectionRange((*C.QTableWidgetSelectionRange)(h)) + if h == nil { + return nil + } + + return &QTableWidgetSelectionRange{h: (*C.QTableWidgetSelectionRange)(h)} } // NewQTableWidgetSelectionRange constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange() *QTableWidgetSelectionRange { - ret := C.QTableWidgetSelectionRange_new() - return newQTableWidgetSelectionRange(ret) + var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil + + C.QTableWidgetSelectionRange_new(&outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret.isSubclass = true + return ret } // NewQTableWidgetSelectionRange2 constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange2(top int, left int, bottom int, right int) *QTableWidgetSelectionRange { - ret := C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right)) - return newQTableWidgetSelectionRange(ret) + var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil + + C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right), &outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret.isSubclass = true + return ret } func (this *QTableWidgetSelectionRange) TopRow() int { @@ -88,7 +103,7 @@ func (this *QTableWidgetSelectionRange) ColumnCount() int { // Delete this object from C++ memory. func (this *QTableWidgetSelectionRange) Delete() { - C.QTableWidgetSelectionRange_Delete(this.h) + C.QTableWidgetSelectionRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -101,7 +116,8 @@ func (this *QTableWidgetSelectionRange) GoGC() { } type QTableWidgetItem struct { - h *C.QTableWidgetItem + h *C.QTableWidgetItem + isSubclass bool } func (this *QTableWidgetItem) cPointer() *C.QTableWidgetItem { @@ -118,6 +134,7 @@ func (this *QTableWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTableWidgetItem constructs the type using only CGO pointers. func newQTableWidgetItem(h *C.QTableWidgetItem) *QTableWidgetItem { if h == nil { return nil @@ -125,14 +142,23 @@ func newQTableWidgetItem(h *C.QTableWidgetItem) *QTableWidgetItem { return &QTableWidgetItem{h: h} } +// UnsafeNewQTableWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetItem(h unsafe.Pointer) *QTableWidgetItem { - return newQTableWidgetItem((*C.QTableWidgetItem)(h)) + if h == nil { + return nil + } + + return &QTableWidgetItem{h: (*C.QTableWidgetItem)(h)} } // NewQTableWidgetItem constructs a new QTableWidgetItem object. func NewQTableWidgetItem() *QTableWidgetItem { - ret := C.QTableWidgetItem_new() - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new(&outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem2 constructs a new QTableWidgetItem object. @@ -141,8 +167,12 @@ func NewQTableWidgetItem2(text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new2(text_ms) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new2(text_ms, &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem3 constructs a new QTableWidgetItem object. @@ -151,20 +181,32 @@ func NewQTableWidgetItem3(icon *QIcon, text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new3(icon.cPointer(), text_ms) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem4 constructs a new QTableWidgetItem object. func NewQTableWidgetItem4(other *QTableWidgetItem) *QTableWidgetItem { - ret := C.QTableWidgetItem_new4(other.cPointer()) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new4(other.cPointer(), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem5 constructs a new QTableWidgetItem object. func NewQTableWidgetItem5(typeVal int) *QTableWidgetItem { - ret := C.QTableWidgetItem_new5((C.int)(typeVal)) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new5((C.int)(typeVal), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem6 constructs a new QTableWidgetItem object. @@ -173,8 +215,12 @@ func NewQTableWidgetItem6(text string, typeVal int) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal)) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } // NewQTableWidgetItem7 constructs a new QTableWidgetItem object. @@ -183,8 +229,12 @@ func NewQTableWidgetItem7(icon *QIcon, text string, typeVal int) *QTableWidgetIt text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal)) - return newQTableWidgetItem(ret) + var outptr_QTableWidgetItem *C.QTableWidgetItem = nil + + C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) + ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret.isSubclass = true + return ret } func (this *QTableWidgetItem) Clone() *QTableWidgetItem { @@ -192,7 +242,7 @@ func (this *QTableWidgetItem) Clone() *QTableWidgetItem { } func (this *QTableWidgetItem) TableWidget() *QTableWidget { - return UnsafeNewQTableWidget(unsafe.Pointer(C.QTableWidgetItem_TableWidget(this.h))) + return UnsafeNewQTableWidget(unsafe.Pointer(C.QTableWidgetItem_TableWidget(this.h)), nil, nil, nil, nil, nil, nil, nil) } func (this *QTableWidgetItem) Row() int { @@ -389,9 +439,154 @@ func (this *QTableWidgetItem) Type() int { return (int)(C.QTableWidgetItem_Type(this.h)) } +func (this *QTableWidgetItem) callVirtualBase_Clone() *QTableWidgetItem { + + return UnsafeNewQTableWidgetItem(unsafe.Pointer(C.QTableWidgetItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QTableWidgetItem) OnClone(slot func(super func() *QTableWidgetItem) *QTableWidgetItem) { + C.QTableWidgetItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Clone +func miqt_exec_callback_QTableWidgetItem_Clone(self *C.QTableWidgetItem, cb C.intptr_t) *C.QTableWidgetItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTableWidgetItem) *QTableWidgetItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidgetItem) callVirtualBase_Data(role int) *QVariant { + + _ret := C.QTableWidgetItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidgetItem) OnData(slot func(super func(role int) *QVariant, role int) *QVariant) { + C.QTableWidgetItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Data +func miqt_exec_callback_QTableWidgetItem_Data(self *C.QTableWidgetItem, cb C.intptr_t, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int) *QVariant, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + virtualReturn := gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Data, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidgetItem) callVirtualBase_SetData(role int, value *QVariant) { + + C.QTableWidgetItem_virtualbase_SetData(unsafe.Pointer(this.h), (C.int)(role), value.cPointer()) + +} +func (this *QTableWidgetItem) OnSetData(slot func(super func(role int, value *QVariant), role int, value *QVariant)) { + C.QTableWidgetItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_SetData +func miqt_exec_callback_QTableWidgetItem_SetData(self *C.QTableWidgetItem, cb C.intptr_t, role C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(role int, value *QVariant), role int, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(role) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QTableWidgetItem{h: self}).callVirtualBase_SetData, slotval1, slotval2) + +} + +func (this *QTableWidgetItem) callVirtualBase_OperatorLesser(other *QTableWidgetItem) bool { + + return (bool)(C.QTableWidgetItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QTableWidgetItem) OnOperatorLesser(slot func(super func(other *QTableWidgetItem) bool, other *QTableWidgetItem) bool) { + C.QTableWidgetItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_OperatorLesser +func miqt_exec_callback_QTableWidgetItem_OperatorLesser(self *C.QTableWidgetItem, cb C.intptr_t, other *C.QTableWidgetItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QTableWidgetItem) bool, other *QTableWidgetItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTableWidgetItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QTableWidgetItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidgetItem) callVirtualBase_Read(in *QDataStream) { + + C.QTableWidgetItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QTableWidgetItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QTableWidgetItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Read +func miqt_exec_callback_QTableWidgetItem_Read(self *C.QTableWidgetItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in), nil) + + gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QTableWidgetItem) callVirtualBase_Write(out *QDataStream) { + + C.QTableWidgetItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QTableWidgetItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QTableWidgetItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidgetItem_Write +func miqt_exec_callback_QTableWidgetItem_Write(self *C.QTableWidgetItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out), nil) + + gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Write, slotval1) + +} + // Delete this object from C++ memory. func (this *QTableWidgetItem) Delete() { - C.QTableWidgetItem_Delete(this.h) + C.QTableWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -404,7 +599,8 @@ func (this *QTableWidgetItem) GoGC() { } type QTableWidget struct { - h *C.QTableWidget + h *C.QTableWidget + isSubclass bool *QTableView } @@ -422,39 +618,91 @@ func (this *QTableWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTableWidget(h *C.QTableWidget) *QTableWidget { +// newQTableWidget constructs the type using only CGO pointers. +func newQTableWidget(h *C.QTableWidget, h_QTableView *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableWidget { if h == nil { return nil } - return &QTableWidget{h: h, QTableView: UnsafeNewQTableView(unsafe.Pointer(h))} + return &QTableWidget{h: h, + QTableView: newQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTableWidget(h unsafe.Pointer) *QTableWidget { - return newQTableWidget((*C.QTableWidget)(h)) +// UnsafeNewQTableWidget constructs the type using only unsafe pointers. +func UnsafeNewQTableWidget(h unsafe.Pointer, h_QTableView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableWidget { + if h == nil { + return nil + } + + return &QTableWidget{h: (*C.QTableWidget)(h), + QTableView: UnsafeNewQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTableWidget constructs a new QTableWidget object. func NewQTableWidget(parent *QWidget) *QTableWidget { - ret := C.QTableWidget_new(parent.cPointer()) - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new(parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableWidget2 constructs a new QTableWidget object. func NewQTableWidget2() *QTableWidget { - ret := C.QTableWidget_new2() - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new2(&outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableWidget3 constructs a new QTableWidget object. func NewQTableWidget3(rows int, columns int) *QTableWidget { - ret := C.QTableWidget_new3((C.int)(rows), (C.int)(columns)) - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new3((C.int)(rows), (C.int)(columns), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTableWidget4 constructs a new QTableWidget object. func NewQTableWidget4(rows int, columns int, parent *QWidget) *QTableWidget { - ret := C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer()) - return newQTableWidget(ret) + var outptr_QTableWidget *C.QTableWidget = nil + var outptr_QTableView *C.QTableView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTableWidget) MetaObject() *QMetaObject { @@ -642,7 +890,7 @@ func (this *QTableWidget) IsPersistentEditorOpen(item *QTableWidgetItem) bool { } func (this *QTableWidget) CellWidget(row int, column int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column))), nil, nil) } func (this *QTableWidget) SetCellWidget(row int, column int, widget *QWidget) { @@ -1099,9 +1347,751 @@ func (this *QTableWidget) ScrollToItem2(item *QTableWidgetItem, hint QAbstractIt C.QTableWidget_ScrollToItem2(this.h, item.cPointer(), (C.int)(hint)) } +func (this *QTableWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTableWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTableWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTableWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_Event +func miqt_exec_callback_QTableWidget_Event(self *C.QTableWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QTableWidget_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QTableWidget) OnMimeTypes(slot func(super func() []string) []string) { + C.QTableWidget_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_MimeTypes +func miqt_exec_callback_QTableWidget_MimeTypes(self *C.QTableWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTableWidget) callVirtualBase_MimeData(items []*QTableWidgetItem) *QMimeData { + items_CArray := (*[0xffff]*C.QTableWidgetItem)(C.malloc(C.size_t(8 * len(items)))) + defer C.free(unsafe.Pointer(items_CArray)) + for i := range items { + items_CArray[i] = items[i].cPointer() + } + items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTableWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)), nil) +} +func (this *QTableWidget) OnMimeData(slot func(super func(items []*QTableWidgetItem) *QMimeData, items []*QTableWidgetItem) *QMimeData) { + C.QTableWidget_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_MimeData +func miqt_exec_callback_QTableWidget_MimeData(self *C.QTableWidget, cb C.intptr_t, items C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(items []*QTableWidgetItem) *QMimeData, items []*QTableWidgetItem) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var items_ma C.struct_miqt_array = items + items_ret := make([]*QTableWidgetItem, int(items_ma.len)) + items_outCast := (*[0xffff]*C.QTableWidgetItem)(unsafe.Pointer(items_ma.data)) // hey ya + for i := 0; i < int(items_ma.len); i++ { + items_ret[i] = UnsafeNewQTableWidgetItem(unsafe.Pointer(items_outCast[i])) + } + slotval1 := items_ret + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_DropMimeData(row int, column int, data *QMimeData, action DropAction) bool { + + return (bool)(C.QTableWidget_virtualbase_DropMimeData(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), data.cPointer(), (C.int)(action))) + +} +func (this *QTableWidget) OnDropMimeData(slot func(super func(row int, column int, data *QMimeData, action DropAction) bool, row int, column int, data *QMimeData, action DropAction) bool) { + C.QTableWidget_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_DropMimeData +func miqt_exec_callback_QTableWidget_DropMimeData(self *C.QTableWidget, cb C.intptr_t, row C.int, column C.int, data *C.QMimeData, action C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, data *QMimeData, action DropAction) bool, row int, column int, data *QMimeData, action DropAction) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval4 := (DropAction)(action) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QTableWidget_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QTableWidget) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QTableWidget_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SupportedDropActions +func miqt_exec_callback_QTableWidget_SupportedDropActions(self *C.QTableWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTableWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTableWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_DropEvent +func miqt_exec_callback_QTableWidget_DropEvent(self *C.QTableWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTableWidget_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTableWidget) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTableWidget_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SetRootIndex +func miqt_exec_callback_QTableWidget_SetRootIndex(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTableWidget_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTableWidget) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTableWidget_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SetSelectionModel +func miqt_exec_callback_QTableWidget_SetSelectionModel(self *C.QTableWidget, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_DoItemsLayout() { + + C.QTableWidget_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTableWidget) OnDoItemsLayout(slot func(super func())) { + C.QTableWidget_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_DoItemsLayout +func miqt_exec_callback_QTableWidget_DoItemsLayout(self *C.QTableWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableWidget{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTableWidget) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTableWidget_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTableWidget_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VisualRect +func miqt_exec_callback_QTableWidget_VisualRect(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTableWidget_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTableWidget) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTableWidget_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ScrollTo +func miqt_exec_callback_QTableWidget_ScrollTo(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTableWidget{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTableWidget) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTableWidget_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTableWidget_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_IndexAt +func miqt_exec_callback_QTableWidget_IndexAt(self *C.QTableWidget, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTableWidget_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTableWidget) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTableWidget_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ScrollContentsBy +func miqt_exec_callback_QTableWidget_ScrollContentsBy(self *C.QTableWidget, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTableWidget{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTableWidget) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QTableWidget_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QTableWidget) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QTableWidget_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_InitViewItemOption +func miqt_exec_callback_QTableWidget_InitViewItemOption(self *C.QTableWidget, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTableWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTableWidget) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTableWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_PaintEvent +func miqt_exec_callback_QTableWidget_PaintEvent(self *C.QTableWidget, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTableWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTableWidget) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTableWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_TimerEvent +func miqt_exec_callback_QTableWidget_TimerEvent(self *C.QTableWidget, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTableWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTableWidget_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableWidget) OnHorizontalOffset(slot func(super func() int) int) { + C.QTableWidget_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_HorizontalOffset +func miqt_exec_callback_QTableWidget_HorizontalOffset(self *C.QTableWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTableWidget_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTableWidget) OnVerticalOffset(slot func(super func() int) int) { + C.QTableWidget_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VerticalOffset +func miqt_exec_callback_QTableWidget_VerticalOffset(self *C.QTableWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTableWidget_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTableWidget_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_MoveCursor +func miqt_exec_callback_QTableWidget_MoveCursor(self *C.QTableWidget, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTableWidget_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTableWidget) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTableWidget_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SetSelection +func miqt_exec_callback_QTableWidget_SetSelection(self *C.QTableWidget, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTableWidget) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTableWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTableWidget) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTableWidget_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SelectedIndexes +func miqt_exec_callback_QTableWidget_SelectedIndexes(self *C.QTableWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTableWidget) callVirtualBase_UpdateGeometries() { + + C.QTableWidget_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTableWidget) OnUpdateGeometries(slot func(super func())) { + C.QTableWidget_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_UpdateGeometries +func miqt_exec_callback_QTableWidget_UpdateGeometries(self *C.QTableWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTableWidget{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTableWidget) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTableWidget_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTableWidget_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_ViewportSizeHint +func miqt_exec_callback_QTableWidget_ViewportSizeHint(self *C.QTableWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTableWidget) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QTableWidget_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QTableWidget) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QTableWidget_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SizeHintForRow +func miqt_exec_callback_QTableWidget_SizeHintForRow(self *C.QTableWidget, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTableWidget_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTableWidget) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTableWidget_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SizeHintForColumn +func miqt_exec_callback_QTableWidget_SizeHintForColumn(self *C.QTableWidget, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QTableWidget_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableWidget) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableWidget_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VerticalScrollbarAction +func miqt_exec_callback_QTableWidget_VerticalScrollbarAction(self *C.QTableWidget, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableWidget{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTableWidget_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTableWidget) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTableWidget_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_HorizontalScrollbarAction +func miqt_exec_callback_QTableWidget_HorizontalScrollbarAction(self *C.QTableWidget, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTableWidget{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTableWidget) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTableWidget_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTableWidget) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTableWidget_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_IsIndexHidden +func miqt_exec_callback_QTableWidget_IsIndexHidden(self *C.QTableWidget, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTableWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTableWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTableWidget) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTableWidget_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_CurrentChanged +func miqt_exec_callback_QTableWidget_CurrentChanged(self *C.QTableWidget, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTableWidget{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QTableWidget) Delete() { - C.QTableWidget_Delete(this.h) + C.QTableWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtablewidget.h b/qt6/gen_qtablewidget.h index 4f20e6dc..0531b34c 100644 --- a/qt6/gen_qtablewidget.h +++ b/qt6/gen_qtablewidget.h @@ -15,56 +15,80 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; class QBrush; class QDataStream; +class QDropEvent; +class QEvent; class QFont; +class QFrame; class QIcon; +class QItemSelectionModel; class QMetaObject; class QMimeData; class QModelIndex; +class QObject; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; class QSize; +class QStyleOptionViewItem; +class QTableView; class QTableWidget; class QTableWidgetItem; class QTableWidgetSelectionRange; +class QTimerEvent; class QVariant; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; typedef struct QDataStream QDataStream; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTableView QTableView; typedef struct QTableWidget QTableWidget; typedef struct QTableWidgetItem QTableWidgetItem; typedef struct QTableWidgetSelectionRange QTableWidgetSelectionRange; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new(); -QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right); +void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); +void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); int QTableWidgetSelectionRange_TopRow(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_BottomRow(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_LeftColumn(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_RightColumn(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_RowCount(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_ColumnCount(const QTableWidgetSelectionRange* self); -void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self); +void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self, bool isSubclass); -QTableWidgetItem* QTableWidgetItem_new(); -QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text); -QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text); -QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other); -QTableWidgetItem* QTableWidgetItem_new5(int typeVal); -QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal); -QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal); +void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); +void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self); QTableWidget* QTableWidgetItem_TableWidget(const QTableWidgetItem* self); int QTableWidgetItem_Row(const QTableWidgetItem* self); @@ -104,12 +128,24 @@ void QTableWidgetItem_Read(QTableWidgetItem* self, QDataStream* in); void QTableWidgetItem_Write(const QTableWidgetItem* self, QDataStream* out); void QTableWidgetItem_OperatorAssign(QTableWidgetItem* self, QTableWidgetItem* other); int QTableWidgetItem_Type(const QTableWidgetItem* self); -void QTableWidgetItem_Delete(QTableWidgetItem* self); +void QTableWidgetItem_override_virtual_Clone(void* self, intptr_t slot); +QTableWidgetItem* QTableWidgetItem_virtualbase_Clone(const void* self); +void QTableWidgetItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QTableWidgetItem_virtualbase_Data(const void* self, int role); +void QTableWidgetItem_override_virtual_SetData(void* self, intptr_t slot); +void QTableWidgetItem_virtualbase_SetData(void* self, int role, QVariant* value); +void QTableWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QTableWidgetItem_virtualbase_OperatorLesser(const void* self, QTableWidgetItem* other); +void QTableWidgetItem_override_virtual_Read(void* self, intptr_t slot); +void QTableWidgetItem_virtualbase_Read(void* self, QDataStream* in); +void QTableWidgetItem_override_virtual_Write(void* self, intptr_t slot); +void QTableWidgetItem_virtualbase_Write(const void* self, QDataStream* out); +void QTableWidgetItem_Delete(QTableWidgetItem* self, bool isSubclass); -QTableWidget* QTableWidget_new(QWidget* parent); -QTableWidget* QTableWidget_new2(); -QTableWidget* QTableWidget_new3(int rows, int columns); -QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent); +void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTableWidget_MetaObject(const QTableWidget* self); void* QTableWidget_Metacast(QTableWidget* self, const char* param1); struct miqt_string QTableWidget_Tr(const char* s); @@ -198,11 +234,75 @@ void QTableWidget_CellChanged(QTableWidget* self, int row, int column); void QTableWidget_connect_CellChanged(QTableWidget* self, intptr_t slot); void QTableWidget_CurrentCellChanged(QTableWidget* self, int currentRow, int currentColumn, int previousRow, int previousColumn); void QTableWidget_connect_CurrentCellChanged(QTableWidget* self, intptr_t slot); +bool QTableWidget_Event(QTableWidget* self, QEvent* e); +struct miqt_array /* of struct miqt_string */ QTableWidget_MimeTypes(const QTableWidget* self); +QMimeData* QTableWidget_MimeData(const QTableWidget* self, struct miqt_array /* of QTableWidgetItem* */ items); +bool QTableWidget_DropMimeData(QTableWidget* self, int row, int column, QMimeData* data, int action); +int QTableWidget_SupportedDropActions(const QTableWidget* self); +void QTableWidget_DropEvent(QTableWidget* self, QDropEvent* event); struct miqt_string QTableWidget_Tr2(const char* s, const char* c); struct miqt_string QTableWidget_Tr3(const char* s, const char* c, int n); void QTableWidget_SortItems2(QTableWidget* self, int column, int order); void QTableWidget_ScrollToItem2(QTableWidget* self, QTableWidgetItem* item, int hint); -void QTableWidget_Delete(QTableWidget* self); +void QTableWidget_override_virtual_Event(void* self, intptr_t slot); +bool QTableWidget_virtualbase_Event(void* self, QEvent* e); +void QTableWidget_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QTableWidget_virtualbase_MimeTypes(const void* self); +void QTableWidget_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QTableWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTableWidgetItem* */ items); +void QTableWidget_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QTableWidget_virtualbase_DropMimeData(void* self, int row, int column, QMimeData* data, int action); +void QTableWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QTableWidget_virtualbase_SupportedDropActions(const void* self); +void QTableWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QTableWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTableWidget_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTableWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTableWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTableWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTableWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTableWidget_virtualbase_DoItemsLayout(void* self); +void QTableWidget_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTableWidget_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTableWidget_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTableWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTableWidget_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTableWidget_virtualbase_IndexAt(const void* self, QPoint* p); +void QTableWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTableWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTableWidget_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QTableWidget_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QTableWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTableWidget_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTableWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTableWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTableWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTableWidget_virtualbase_HorizontalOffset(const void* self); +void QTableWidget_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTableWidget_virtualbase_VerticalOffset(const void* self); +void QTableWidget_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTableWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTableWidget_override_virtual_SetSelection(void* self, intptr_t slot); +void QTableWidget_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTableWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTableWidget_virtualbase_SelectedIndexes(const void* self); +void QTableWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTableWidget_virtualbase_UpdateGeometries(void* self); +void QTableWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTableWidget_virtualbase_ViewportSizeHint(const void* self); +void QTableWidget_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QTableWidget_virtualbase_SizeHintForRow(const void* self, int row); +void QTableWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTableWidget_virtualbase_SizeHintForColumn(const void* self, int column); +void QTableWidget_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QTableWidget_virtualbase_VerticalScrollbarAction(void* self, int action); +void QTableWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTableWidget_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTableWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTableWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTableWidget_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTableWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTableWidget_Delete(QTableWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtabwidget.cpp b/qt6/gen_qtabwidget.cpp index 51d7561d..0e00e328 100644 --- a/qt6/gen_qtabwidget.cpp +++ b/qt6/gen_qtabwidget.cpp @@ -1,22 +1,1116 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include #include #include +#include +#include +#include #include #include #include "gen_qtabwidget.h" #include "_cgo_export.h" -QTabWidget* QTabWidget_new(QWidget* parent) { - return new QTabWidget(parent); +class MiqtVirtualQTabWidget : public virtual QTabWidget { +public: + + MiqtVirtualQTabWidget(QWidget* parent): QTabWidget(parent) {}; + MiqtVirtualQTabWidget(): QTabWidget() {}; + + virtual ~MiqtVirtualQTabWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTabWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTabWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QTabWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTabWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QTabWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int width) const override { + if (handle__HeightForWidth == 0) { + return QTabWidget::heightForWidth(width); + } + + int sigval1 = width; + + int callback_return_value = miqt_exec_callback_QTabWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int width) const { + + return QTabWidget::heightForWidth(static_cast(width)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QTabWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QTabWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QTabWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void tabInserted(int index) override { + if (handle__TabInserted == 0) { + QTabWidget::tabInserted(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabWidget_TabInserted(this, handle__TabInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabInserted(int index) { + + QTabWidget::tabInserted(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void tabRemoved(int index) override { + if (handle__TabRemoved == 0) { + QTabWidget::tabRemoved(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QTabWidget_TabRemoved(this, handle__TabRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabRemoved(int index) { + + QTabWidget::tabRemoved(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTabWidget::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTabWidget::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QTabWidget::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QTabWidget::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QTabWidget::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QTabWidget::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QTabWidget::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QTabWidget::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QTabWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QTabWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QTabWidget::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QTabWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QTabWidget::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionTabWidgetFrame* option) const override { + if (handle__InitStyleOption == 0) { + QTabWidget::initStyleOption(option); + return; + } + + QStyleOptionTabWidgetFrame* sigval1 = option; + + miqt_exec_callback_QTabWidget_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionTabWidgetFrame* option) const { + + QTabWidget::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QTabWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QTabWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QTabWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QTabWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QTabWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QTabWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QTabWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QTabWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QTabWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTabWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTabWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTabWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTabWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTabWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTabWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTabWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTabWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QTabWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QTabWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QTabWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QTabWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTabWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTabWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTabWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTabWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QTabWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QTabWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QTabWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QTabWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QTabWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QTabWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QTabWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QTabWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QTabWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QTabWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QTabWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QTabWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QTabWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QTabWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTabWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTabWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTabWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTabWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTabWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTabWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTabWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTabWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QTabWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QTabWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QTabWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QTabWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QTabWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QTabWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QTabWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QTabWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QTabWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QTabWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QTabWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QTabWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QTabWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QTabWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QTabWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QTabWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QTabWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QTabWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTabWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTabWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTabWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QTabWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTabWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QTabWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTabWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTabWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTabWidget::focusNextPrevChild(next); + + } + +}; + +void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(parent); + *outptr_QTabWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTabWidget* QTabWidget_new2() { - return new QTabWidget(); +void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(); + *outptr_QTabWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTabWidget_MetaObject(const QTabWidget* self) { @@ -274,7 +1368,7 @@ void QTabWidget_CurrentChanged(QTabWidget* self, int index) { } void QTabWidget_connect_CurrentChanged(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::currentChanged), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_CurrentChanged(slot, sigval1); }); @@ -285,7 +1379,7 @@ void QTabWidget_TabCloseRequested(QTabWidget* self, int index) { } void QTabWidget_connect_TabCloseRequested(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::tabCloseRequested), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::tabCloseRequested), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_TabCloseRequested(slot, sigval1); }); @@ -296,7 +1390,7 @@ void QTabWidget_TabBarClicked(QTabWidget* self, int index) { } void QTabWidget_connect_TabBarClicked(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::tabBarClicked), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::tabBarClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_TabBarClicked(slot, sigval1); }); @@ -307,7 +1401,7 @@ void QTabWidget_TabBarDoubleClicked(QTabWidget* self, int index) { } void QTabWidget_connect_TabBarDoubleClicked(QTabWidget* self, intptr_t slot) { - QTabWidget::connect(self, static_cast(&QTabWidget::tabBarDoubleClicked), self, [=](int index) { + MiqtVirtualQTabWidget::connect(self, static_cast(&QTabWidget::tabBarDoubleClicked), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QTabWidget_TabBarDoubleClicked(slot, sigval1); }); @@ -343,7 +1437,363 @@ QWidget* QTabWidget_CornerWidget1(const QTabWidget* self, int corner) { return self->cornerWidget(static_cast(corner)); } -void QTabWidget_Delete(QTabWidget* self) { - delete self; +void QTabWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QTabWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_SizeHint(); +} + +void QTabWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QTabWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QTabWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QTabWidget_virtualbase_HeightForWidth(const void* self, int width) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_HeightForWidth(width); +} + +void QTabWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QTabWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QTabWidget_override_virtual_TabInserted(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__TabInserted = slot; +} + +void QTabWidget_virtualbase_TabInserted(void* self, int index) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_TabInserted(index); +} + +void QTabWidget_override_virtual_TabRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__TabRemoved = slot; +} + +void QTabWidget_virtualbase_TabRemoved(void* self, int index) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_TabRemoved(index); +} + +void QTabWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ShowEvent = slot; +} + +void QTabWidget_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTabWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QTabWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QTabWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QTabWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QTabWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__PaintEvent = slot; +} + +void QTabWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_PaintEvent(param1); +} + +void QTabWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QTabWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QTabWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__Event = slot; +} + +bool QTabWidget_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_Event(param1); +} + +void QTabWidget_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InitStyleOption = slot; +} + +void QTabWidget_virtualbase_InitStyleOption(const void* self, QStyleOptionTabWidgetFrame* option) { + ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_InitStyleOption(option); +} + +void QTabWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DevType = slot; +} + +int QTabWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_DevType(); +} + +void QTabWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__SetVisible = slot; +} + +void QTabWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QTabWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QTabWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QTabWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QTabWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTabWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTabWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QTabWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTabWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTabWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTabWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QTabWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__WheelEvent = slot; +} + +void QTabWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QTabWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTabWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QTabWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QTabWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTabWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QTabWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTabWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__EnterEvent = slot; +} + +void QTabWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QTabWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QTabWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QTabWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__MoveEvent = slot; +} + +void QTabWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QTabWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__CloseEvent = slot; +} + +void QTabWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QTabWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTabWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QTabWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__TabletEvent = slot; +} + +void QTabWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QTabWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__ActionEvent = slot; +} + +void QTabWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QTabWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QTabWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTabWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QTabWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTabWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTabWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTabWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__DropEvent = slot; +} + +void QTabWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QTabWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__HideEvent = slot; +} + +void QTabWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QTabWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QTabWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QTabWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__Metric = slot; +} + +int QTabWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_Metric(param1); +} + +void QTabWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InitPainter = slot; +} + +void QTabWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QTabWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QTabWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QTabWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QTabWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QTabWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QTabWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTabWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTabWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQTabWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QTabWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTabWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTabWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTabWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTabWidget_Delete(QTabWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtabwidget.go b/qt6/gen_qtabwidget.go index f7387cec..5a2783fe 100644 --- a/qt6/gen_qtabwidget.go +++ b/qt6/gen_qtabwidget.go @@ -31,7 +31,8 @@ const ( ) type QTabWidget struct { - h *C.QTabWidget + h *C.QTabWidget + isSubclass bool *QWidget } @@ -49,27 +50,49 @@ func (this *QTabWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTabWidget(h *C.QTabWidget) *QTabWidget { +// newQTabWidget constructs the type using only CGO pointers. +func newQTabWidget(h *C.QTabWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabWidget { if h == nil { return nil } - return &QTabWidget{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QTabWidget{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTabWidget(h unsafe.Pointer) *QTabWidget { - return newQTabWidget((*C.QTabWidget)(h)) +// UnsafeNewQTabWidget constructs the type using only unsafe pointers. +func UnsafeNewQTabWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabWidget { + if h == nil { + return nil + } + + return &QTabWidget{h: (*C.QTabWidget)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTabWidget constructs a new QTabWidget object. func NewQTabWidget(parent *QWidget) *QTabWidget { - ret := C.QTabWidget_new(parent.cPointer()) - return newQTabWidget(ret) + var outptr_QTabWidget *C.QTabWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabWidget_new(parent.cPointer(), &outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTabWidget2 constructs a new QTabWidget object. func NewQTabWidget2() *QTabWidget { - ret := C.QTabWidget_new2() - return newQTabWidget(ret) + var outptr_QTabWidget *C.QTabWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTabWidget_new2(&outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTabWidget) MetaObject() *QMetaObject { @@ -204,11 +227,11 @@ func (this *QTabWidget) CurrentIndex() int { } func (this *QTabWidget) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CurrentWidget(this.h)), nil, nil) } func (this *QTabWidget) Widget(index int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_Widget(this.h, (C.int)(index)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_Widget(this.h, (C.int)(index))), nil, nil) } func (this *QTabWidget) IndexOf(widget *QWidget) int { @@ -278,7 +301,7 @@ func (this *QTabWidget) SetCornerWidget(w *QWidget) { } func (this *QTabWidget) CornerWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget(this.h)), nil, nil) } func (this *QTabWidget) ElideMode() TextElideMode { @@ -329,7 +352,7 @@ func (this *QTabWidget) Clear() { } func (this *QTabWidget) TabBar() *QTabBar { - return UnsafeNewQTabBar(unsafe.Pointer(C.QTabWidget_TabBar(this.h))) + return UnsafeNewQTabBar(unsafe.Pointer(C.QTabWidget_TabBar(this.h)), nil, nil, nil) } func (this *QTabWidget) SetCurrentIndex(index int) { @@ -447,12 +470,1047 @@ func (this *QTabWidget) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QTabWidget) CornerWidget1(corner Corner) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner))), nil, nil) +} + +func (this *QTabWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTabWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_SizeHint +func miqt_exec_callback_QTabWidget_SizeHint(self *C.QTabWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QTabWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QTabWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MinimumSizeHint +func miqt_exec_callback_QTabWidget_MinimumSizeHint(self *C.QTabWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_HeightForWidth(width int) int { + + return (int)(C.QTabWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(width))) + +} +func (this *QTabWidget) OnHeightForWidth(slot func(super func(width int) int, width int) int) { + C.QTabWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_HeightForWidth +func miqt_exec_callback_QTabWidget_HeightForWidth(self *C.QTabWidget, cb C.intptr_t, width C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(width int) int, width int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QTabWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QTabWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QTabWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_HasHeightForWidth +func miqt_exec_callback_QTabWidget_HasHeightForWidth(self *C.QTabWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_TabInserted(index int) { + + C.QTabWidget_virtualbase_TabInserted(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabWidget) OnTabInserted(slot func(super func(index int), index int)) { + C.QTabWidget_override_virtual_TabInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_TabInserted +func miqt_exec_callback_QTabWidget_TabInserted(self *C.QTabWidget, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabWidget{h: self}).callVirtualBase_TabInserted, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_TabRemoved(index int) { + + C.QTabWidget_virtualbase_TabRemoved(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QTabWidget) OnTabRemoved(slot func(super func(index int), index int)) { + C.QTabWidget_override_virtual_TabRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_TabRemoved +func miqt_exec_callback_QTabWidget_TabRemoved(self *C.QTabWidget, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QTabWidget{h: self}).callVirtualBase_TabRemoved, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTabWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTabWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ShowEvent +func miqt_exec_callback_QTabWidget_ShowEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QTabWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QTabWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ResizeEvent +func miqt_exec_callback_QTabWidget_ResizeEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QTabWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QTabWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_KeyPressEvent +func miqt_exec_callback_QTabWidget_KeyPressEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QTabWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QTabWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_PaintEvent +func miqt_exec_callback_QTabWidget_PaintEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QTabWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QTabWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ChangeEvent +func miqt_exec_callback_QTabWidget_ChangeEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QTabWidget_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QTabWidget) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QTabWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_Event +func miqt_exec_callback_QTabWidget_Event(self *C.QTabWidget, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_InitStyleOption(option *QStyleOptionTabWidgetFrame) { + + C.QTabWidget_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QTabWidget) OnInitStyleOption(slot func(super func(option *QStyleOptionTabWidgetFrame), option *QStyleOptionTabWidgetFrame)) { + C.QTabWidget_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InitStyleOption +func miqt_exec_callback_QTabWidget_InitStyleOption(self *C.QTabWidget, cb C.intptr_t, option *C.QStyleOptionTabWidgetFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionTabWidgetFrame), option *QStyleOptionTabWidgetFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionTabWidgetFrame(unsafe.Pointer(option), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DevType() int { + + return (int)(C.QTabWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QTabWidget) OnDevType(slot func(super func() int) int) { + C.QTabWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DevType +func miqt_exec_callback_QTabWidget_DevType(self *C.QTabWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_SetVisible(visible bool) { + + C.QTabWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QTabWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QTabWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_SetVisible +func miqt_exec_callback_QTabWidget_SetVisible(self *C.QTabWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QTabWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QTabWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QTabWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QTabWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_PaintEngine +func miqt_exec_callback_QTabWidget_PaintEngine(self *C.QTabWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MousePressEvent +func miqt_exec_callback_QTabWidget_MousePressEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MouseReleaseEvent +func miqt_exec_callback_QTabWidget_MouseReleaseEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MouseDoubleClickEvent +func miqt_exec_callback_QTabWidget_MouseDoubleClickEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTabWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTabWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MouseMoveEvent +func miqt_exec_callback_QTabWidget_MouseMoveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QTabWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QTabWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_WheelEvent +func miqt_exec_callback_QTabWidget_WheelEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QTabWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTabWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_KeyReleaseEvent +func miqt_exec_callback_QTabWidget_KeyReleaseEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTabWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_FocusInEvent +func miqt_exec_callback_QTabWidget_FocusInEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTabWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTabWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_FocusOutEvent +func miqt_exec_callback_QTabWidget_FocusOutEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QTabWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QTabWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_EnterEvent +func miqt_exec_callback_QTabWidget_EnterEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QTabWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTabWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_LeaveEvent +func miqt_exec_callback_QTabWidget_LeaveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QTabWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QTabWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_MoveEvent +func miqt_exec_callback_QTabWidget_MoveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QTabWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QTabWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_CloseEvent +func miqt_exec_callback_QTabWidget_CloseEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QTabWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QTabWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ContextMenuEvent +func miqt_exec_callback_QTabWidget_ContextMenuEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QTabWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QTabWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_TabletEvent +func miqt_exec_callback_QTabWidget_TabletEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QTabWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QTabWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_ActionEvent +func miqt_exec_callback_QTabWidget_ActionEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTabWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTabWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DragEnterEvent +func miqt_exec_callback_QTabWidget_DragEnterEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTabWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTabWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DragMoveEvent +func miqt_exec_callback_QTabWidget_DragMoveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTabWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTabWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DragLeaveEvent +func miqt_exec_callback_QTabWidget_DragLeaveEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTabWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTabWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_DropEvent +func miqt_exec_callback_QTabWidget_DropEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QTabWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTabWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QTabWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_HideEvent +func miqt_exec_callback_QTabWidget_HideEvent(self *C.QTabWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QTabWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QTabWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QTabWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_NativeEvent +func miqt_exec_callback_QTabWidget_NativeEvent(self *C.QTabWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QTabWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QTabWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QTabWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_Metric +func miqt_exec_callback_QTabWidget_Metric(self *C.QTabWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTabWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QTabWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QTabWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QTabWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InitPainter +func miqt_exec_callback_QTabWidget_InitPainter(self *C.QTabWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QTabWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QTabWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QTabWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QTabWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_Redirected +func miqt_exec_callback_QTabWidget_Redirected(self *C.QTabWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QTabWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QTabWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QTabWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_SharedPainter +func miqt_exec_callback_QTabWidget_SharedPainter(self *C.QTabWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTabWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTabWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTabWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InputMethodEvent +func miqt_exec_callback_QTabWidget_InputMethodEvent(self *C.QTabWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTabWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTabWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QTabWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTabWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QTabWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_InputMethodQuery +func miqt_exec_callback_QTabWidget_InputMethodQuery(self *C.QTabWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTabWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTabWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTabWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTabWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTabWidget_FocusNextPrevChild +func miqt_exec_callback_QTabWidget_FocusNextPrevChild(self *C.QTabWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTabWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QTabWidget) Delete() { - C.QTabWidget_Delete(this.h) + C.QTabWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtabwidget.h b/qt6/gen_qtabwidget.h index b4e0ddff..9a62c3f8 100644 --- a/qt6/gen_qtabwidget.h +++ b/qt6/gen_qtabwidget.h @@ -15,23 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionTabWidgetFrame; class QTabBar; class QTabWidget; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionTabWidgetFrame QStyleOptionTabWidgetFrame; typedef struct QTabBar QTabBar; typedef struct QTabWidget QTabWidget; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTabWidget* QTabWidget_new(QWidget* parent); -QTabWidget* QTabWidget_new2(); +void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTabWidget_MetaObject(const QTabWidget* self); void* QTabWidget_Metacast(QTabWidget* self, const char* param1); struct miqt_string QTabWidget_Tr(const char* s); @@ -93,11 +149,108 @@ void QTabWidget_TabBarClicked(QTabWidget* self, int index); void QTabWidget_connect_TabBarClicked(QTabWidget* self, intptr_t slot); void QTabWidget_TabBarDoubleClicked(QTabWidget* self, int index); void QTabWidget_connect_TabBarDoubleClicked(QTabWidget* self, intptr_t slot); +void QTabWidget_TabInserted(QTabWidget* self, int index); +void QTabWidget_TabRemoved(QTabWidget* self, int index); +void QTabWidget_ShowEvent(QTabWidget* self, QShowEvent* param1); +void QTabWidget_ResizeEvent(QTabWidget* self, QResizeEvent* param1); +void QTabWidget_KeyPressEvent(QTabWidget* self, QKeyEvent* param1); +void QTabWidget_PaintEvent(QTabWidget* self, QPaintEvent* param1); +void QTabWidget_ChangeEvent(QTabWidget* self, QEvent* param1); +bool QTabWidget_Event(QTabWidget* self, QEvent* param1); +void QTabWidget_InitStyleOption(const QTabWidget* self, QStyleOptionTabWidgetFrame* option); struct miqt_string QTabWidget_Tr2(const char* s, const char* c); struct miqt_string QTabWidget_Tr3(const char* s, const char* c, int n); void QTabWidget_SetCornerWidget2(QTabWidget* self, QWidget* w, int corner); QWidget* QTabWidget_CornerWidget1(const QTabWidget* self, int corner); -void QTabWidget_Delete(QTabWidget* self); +void QTabWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTabWidget_virtualbase_SizeHint(const void* self); +void QTabWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QTabWidget_virtualbase_MinimumSizeHint(const void* self); +void QTabWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QTabWidget_virtualbase_HeightForWidth(const void* self, int width); +void QTabWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QTabWidget_virtualbase_HasHeightForWidth(const void* self); +void QTabWidget_override_virtual_TabInserted(void* self, intptr_t slot); +void QTabWidget_virtualbase_TabInserted(void* self, int index); +void QTabWidget_override_virtual_TabRemoved(void* self, intptr_t slot); +void QTabWidget_virtualbase_TabRemoved(void* self, int index); +void QTabWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTabWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QTabWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QTabWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QTabWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QTabWidget_override_virtual_Event(void* self, intptr_t slot); +bool QTabWidget_virtualbase_Event(void* self, QEvent* param1); +void QTabWidget_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QTabWidget_virtualbase_InitStyleOption(const void* self, QStyleOptionTabWidgetFrame* option); +void QTabWidget_override_virtual_DevType(void* self, intptr_t slot); +int QTabWidget_virtualbase_DevType(const void* self); +void QTabWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QTabWidget_virtualbase_SetVisible(void* self, bool visible); +void QTabWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QTabWidget_virtualbase_PaintEngine(const void* self); +void QTabWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTabWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QTabWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QTabWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTabWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTabWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QTabWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QTabWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QTabWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QTabWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QTabWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QTabWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QTabWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTabWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTabWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTabWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTabWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QTabWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QTabWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QTabWidget_override_virtual_Metric(void* self, intptr_t slot); +int QTabWidget_virtualbase_Metric(const void* self, int param1); +void QTabWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QTabWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QTabWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QTabWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QTabWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QTabWidget_virtualbase_SharedPainter(const void* self); +void QTabWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTabWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTabWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTabWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QTabWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTabWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTabWidget_Delete(QTabWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtemporarydir.cpp b/qt6/gen_qtemporarydir.cpp index c25d4ff0..92f9a596 100644 --- a/qt6/gen_qtemporarydir.cpp +++ b/qt6/gen_qtemporarydir.cpp @@ -6,13 +6,15 @@ #include "gen_qtemporarydir.h" #include "_cgo_export.h" -QTemporaryDir* QTemporaryDir_new() { - return new QTemporaryDir(); +void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir) { + QTemporaryDir* ret = new QTemporaryDir(); + *outptr_QTemporaryDir = ret; } -QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName) { +void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - return new QTemporaryDir(templateName_QString); + QTemporaryDir* ret = new QTemporaryDir(templateName_QString); + *outptr_QTemporaryDir = ret; } void QTemporaryDir_Swap(QTemporaryDir* self, QTemporaryDir* other) { @@ -69,7 +71,11 @@ struct miqt_string QTemporaryDir_FilePath(const QTemporaryDir* self, struct miqt return _ms; } -void QTemporaryDir_Delete(QTemporaryDir* self) { - delete self; +void QTemporaryDir_Delete(QTemporaryDir* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtemporarydir.go b/qt6/gen_qtemporarydir.go index 5c8920fe..8a48bbbf 100644 --- a/qt6/gen_qtemporarydir.go +++ b/qt6/gen_qtemporarydir.go @@ -14,7 +14,8 @@ import ( ) type QTemporaryDir struct { - h *C.QTemporaryDir + h *C.QTemporaryDir + isSubclass bool } func (this *QTemporaryDir) cPointer() *C.QTemporaryDir { @@ -31,6 +32,7 @@ func (this *QTemporaryDir) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTemporaryDir constructs the type using only CGO pointers. func newQTemporaryDir(h *C.QTemporaryDir) *QTemporaryDir { if h == nil { return nil @@ -38,14 +40,23 @@ func newQTemporaryDir(h *C.QTemporaryDir) *QTemporaryDir { return &QTemporaryDir{h: h} } +// UnsafeNewQTemporaryDir constructs the type using only unsafe pointers. func UnsafeNewQTemporaryDir(h unsafe.Pointer) *QTemporaryDir { - return newQTemporaryDir((*C.QTemporaryDir)(h)) + if h == nil { + return nil + } + + return &QTemporaryDir{h: (*C.QTemporaryDir)(h)} } // NewQTemporaryDir constructs a new QTemporaryDir object. func NewQTemporaryDir() *QTemporaryDir { - ret := C.QTemporaryDir_new() - return newQTemporaryDir(ret) + var outptr_QTemporaryDir *C.QTemporaryDir = nil + + C.QTemporaryDir_new(&outptr_QTemporaryDir) + ret := newQTemporaryDir(outptr_QTemporaryDir) + ret.isSubclass = true + return ret } // NewQTemporaryDir2 constructs a new QTemporaryDir object. @@ -54,8 +65,12 @@ func NewQTemporaryDir2(templateName string) *QTemporaryDir { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - ret := C.QTemporaryDir_new2(templateName_ms) - return newQTemporaryDir(ret) + var outptr_QTemporaryDir *C.QTemporaryDir = nil + + C.QTemporaryDir_new2(templateName_ms, &outptr_QTemporaryDir) + ret := newQTemporaryDir(outptr_QTemporaryDir) + ret.isSubclass = true + return ret } func (this *QTemporaryDir) Swap(other *QTemporaryDir) { @@ -105,7 +120,7 @@ func (this *QTemporaryDir) FilePath(fileName string) string { // Delete this object from C++ memory. func (this *QTemporaryDir) Delete() { - C.QTemporaryDir_Delete(this.h) + C.QTemporaryDir_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtemporarydir.h b/qt6/gen_qtemporarydir.h index e474cf47..2962ae16 100644 --- a/qt6/gen_qtemporarydir.h +++ b/qt6/gen_qtemporarydir.h @@ -20,8 +20,8 @@ class QTemporaryDir; typedef struct QTemporaryDir QTemporaryDir; #endif -QTemporaryDir* QTemporaryDir_new(); -QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName); +void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir); +void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir); void QTemporaryDir_Swap(QTemporaryDir* self, QTemporaryDir* other); bool QTemporaryDir_IsValid(const QTemporaryDir* self); struct miqt_string QTemporaryDir_ErrorString(const QTemporaryDir* self); @@ -30,7 +30,7 @@ void QTemporaryDir_SetAutoRemove(QTemporaryDir* self, bool b); bool QTemporaryDir_Remove(QTemporaryDir* self); struct miqt_string QTemporaryDir_Path(const QTemporaryDir* self); struct miqt_string QTemporaryDir_FilePath(const QTemporaryDir* self, struct miqt_string fileName); -void QTemporaryDir_Delete(QTemporaryDir* self); +void QTemporaryDir_Delete(QTemporaryDir* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtemporaryfile.cpp b/qt6/gen_qtemporaryfile.cpp index 6f965b2a..e1224bf5 100644 --- a/qt6/gen_qtemporaryfile.cpp +++ b/qt6/gen_qtemporaryfile.cpp @@ -1,4 +1,7 @@ #include +#include +#include +#include #include #include #include @@ -9,22 +12,206 @@ #include "gen_qtemporaryfile.h" #include "_cgo_export.h" -QTemporaryFile* QTemporaryFile_new() { - return new QTemporaryFile(); +class MiqtVirtualQTemporaryFile : public virtual QTemporaryFile { +public: + + MiqtVirtualQTemporaryFile(): QTemporaryFile() {}; + MiqtVirtualQTemporaryFile(const QString& templateName): QTemporaryFile(templateName) {}; + MiqtVirtualQTemporaryFile(QObject* parent): QTemporaryFile(parent) {}; + MiqtVirtualQTemporaryFile(const QString& templateName, QObject* parent): QTemporaryFile(templateName, parent) {}; + + virtual ~MiqtVirtualQTemporaryFile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__FileName = 0; + + // Subclass to allow providing a Go implementation + virtual QString fileName() const override { + if (handle__FileName == 0) { + return QTemporaryFile::fileName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QTemporaryFile_FileName(const_cast(this), handle__FileName); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_FileName() const { + + QString _ret = QTemporaryFile::fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OpenWithFlags = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode flags) override { + if (handle__OpenWithFlags == 0) { + return QTemporaryFile::open(flags); + } + + QIODeviceBase::OpenMode flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QTemporaryFile_OpenWithFlags(this, handle__OpenWithFlags, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OpenWithFlags(int flags) { + + return QTemporaryFile::open(static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QTemporaryFile::size(); + } + + + long long callback_return_value = miqt_exec_callback_QTemporaryFile_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QTemporaryFile::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resize = 0; + + // Subclass to allow providing a Go implementation + virtual bool resize(qint64 sz) override { + if (handle__Resize == 0) { + return QTemporaryFile::resize(sz); + } + + qint64 sz_ret = sz; + long long sigval1 = static_cast(sz_ret); + + bool callback_return_value = miqt_exec_callback_QTemporaryFile_Resize(this, handle__Resize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Resize(long long sz) { + + return QTemporaryFile::resize(static_cast(sz)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Permissions = 0; + + // Subclass to allow providing a Go implementation + virtual QFileDevice::Permissions permissions() const override { + if (handle__Permissions == 0) { + return QTemporaryFile::permissions(); + } + + + int callback_return_value = miqt_exec_callback_QTemporaryFile_Permissions(const_cast(this), handle__Permissions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Permissions() const { + + QFileDevice::Permissions _ret = QTemporaryFile::permissions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPermissions = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPermissions(QFileDevice::Permissions permissionSpec) override { + if (handle__SetPermissions == 0) { + return QTemporaryFile::setPermissions(permissionSpec); + } + + QFileDevice::Permissions permissionSpec_ret = permissionSpec; + int sigval1 = static_cast(permissionSpec_ret); + + bool callback_return_value = miqt_exec_callback_QTemporaryFile_SetPermissions(this, handle__SetPermissions, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPermissions(int permissionSpec) { + + return QTemporaryFile::setPermissions(static_cast(permissionSpec)); + + } + +}; + +void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName) { +void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - return new QTemporaryFile(templateName_QString); + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QTemporaryFile* QTemporaryFile_new3(QObject* parent) { - return new QTemporaryFile(parent); +void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(parent); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent) { +void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - return new QTemporaryFile(templateName_QString, parent); + MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString, parent); + *outptr_QTemporaryFile = ret; + *outptr_QFile = static_cast(ret); + *outptr_QFileDevice = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self) { @@ -121,7 +308,59 @@ struct miqt_string QTemporaryFile_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTemporaryFile_Delete(QTemporaryFile* self) { - delete self; +void QTemporaryFile_override_virtual_FileName(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__FileName = slot; +} + +struct miqt_string QTemporaryFile_virtualbase_FileName(const void* self) { + return ( (const MiqtVirtualQTemporaryFile*)(self) )->virtualbase_FileName(); +} + +void QTemporaryFile_override_virtual_OpenWithFlags(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__OpenWithFlags = slot; +} + +bool QTemporaryFile_virtualbase_OpenWithFlags(void* self, int flags) { + return ( (MiqtVirtualQTemporaryFile*)(self) )->virtualbase_OpenWithFlags(flags); +} + +void QTemporaryFile_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__Size = slot; +} + +long long QTemporaryFile_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQTemporaryFile*)(self) )->virtualbase_Size(); +} + +void QTemporaryFile_override_virtual_Resize(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__Resize = slot; +} + +bool QTemporaryFile_virtualbase_Resize(void* self, long long sz) { + return ( (MiqtVirtualQTemporaryFile*)(self) )->virtualbase_Resize(sz); +} + +void QTemporaryFile_override_virtual_Permissions(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__Permissions = slot; +} + +int QTemporaryFile_virtualbase_Permissions(const void* self) { + return ( (const MiqtVirtualQTemporaryFile*)(self) )->virtualbase_Permissions(); +} + +void QTemporaryFile_override_virtual_SetPermissions(void* self, intptr_t slot) { + dynamic_cast( (QTemporaryFile*)(self) )->handle__SetPermissions = slot; +} + +bool QTemporaryFile_virtualbase_SetPermissions(void* self, int permissionSpec) { + return ( (MiqtVirtualQTemporaryFile*)(self) )->virtualbase_SetPermissions(permissionSpec); +} + +void QTemporaryFile_Delete(QTemporaryFile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtemporaryfile.go b/qt6/gen_qtemporaryfile.go index 56efe7f6..6fe47733 100644 --- a/qt6/gen_qtemporaryfile.go +++ b/qt6/gen_qtemporaryfile.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTemporaryFile struct { - h *C.QTemporaryFile + h *C.QTemporaryFile + isSubclass bool *QFile } @@ -32,21 +34,38 @@ func (this *QTemporaryFile) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTemporaryFile(h *C.QTemporaryFile) *QTemporaryFile { +// newQTemporaryFile constructs the type using only CGO pointers. +func newQTemporaryFile(h *C.QTemporaryFile, h_QFile *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QTemporaryFile { if h == nil { return nil } - return &QTemporaryFile{h: h, QFile: UnsafeNewQFile(unsafe.Pointer(h))} + return &QTemporaryFile{h: h, + QFile: newQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQTemporaryFile(h unsafe.Pointer) *QTemporaryFile { - return newQTemporaryFile((*C.QTemporaryFile)(h)) +// UnsafeNewQTemporaryFile constructs the type using only unsafe pointers. +func UnsafeNewQTemporaryFile(h unsafe.Pointer, h_QFile unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QTemporaryFile { + if h == nil { + return nil + } + + return &QTemporaryFile{h: (*C.QTemporaryFile)(h), + QFile: UnsafeNewQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQTemporaryFile constructs a new QTemporaryFile object. func NewQTemporaryFile() *QTemporaryFile { - ret := C.QTemporaryFile_new() - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTemporaryFile_new(&outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTemporaryFile2 constructs a new QTemporaryFile object. @@ -55,14 +74,32 @@ func NewQTemporaryFile2(templateName string) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - ret := C.QTemporaryFile_new2(templateName_ms) - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTemporaryFile_new2(templateName_ms, &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTemporaryFile3 constructs a new QTemporaryFile object. func NewQTemporaryFile3(parent *QObject) *QTemporaryFile { - ret := C.QTemporaryFile_new3(parent.cPointer()) - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTemporaryFile_new3(parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTemporaryFile4 constructs a new QTemporaryFile object. @@ -71,8 +108,17 @@ func NewQTemporaryFile4(templateName string, parent *QObject) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - ret := C.QTemporaryFile_new4(templateName_ms, parent.cPointer()) - return newQTemporaryFile(ret) + var outptr_QTemporaryFile *C.QTemporaryFile = nil + var outptr_QFile *C.QFile = nil + var outptr_QFileDevice *C.QFileDevice = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTemporaryFile_new4(templateName_ms, parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QTemporaryFile) MetaObject() *QMetaObject { @@ -141,11 +187,11 @@ func QTemporaryFile_CreateNativeFile(fileName string) *QTemporaryFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFile(fileName_ms))) + return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFile(fileName_ms)), nil, nil, nil, nil, nil) } func QTemporaryFile_CreateNativeFileWithFile(file *QFile) *QTemporaryFile { - return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer()))) + return UnsafeNewQTemporaryFile(unsafe.Pointer(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer())), nil, nil, nil, nil, nil) } func QTemporaryFile_Tr2(s string, c string) string { @@ -170,9 +216,156 @@ func QTemporaryFile_Tr3(s string, c string, n int) string { return _ret } +func (this *QTemporaryFile) callVirtualBase_FileName() string { + + var _ms C.struct_miqt_string = C.QTemporaryFile_virtualbase_FileName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QTemporaryFile) OnFileName(slot func(super func() string) string) { + C.QTemporaryFile_override_virtual_FileName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_FileName +func miqt_exec_callback_QTemporaryFile_FileName(self *C.QTemporaryFile, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_FileName) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QTemporaryFile) callVirtualBase_OpenWithFlags(flags QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QTemporaryFile_virtualbase_OpenWithFlags(unsafe.Pointer(this.h), (C.int)(flags))) + +} +func (this *QTemporaryFile) OnOpenWithFlags(slot func(super func(flags QIODeviceBase__OpenModeFlag) bool, flags QIODeviceBase__OpenModeFlag) bool) { + C.QTemporaryFile_override_virtual_OpenWithFlags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_OpenWithFlags +func miqt_exec_callback_QTemporaryFile_OpenWithFlags(self *C.QTemporaryFile, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(flags QIODeviceBase__OpenModeFlag) bool, flags QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIODeviceBase__OpenModeFlag)(flags) + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_OpenWithFlags, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_Size() int64 { + + return (int64)(C.QTemporaryFile_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QTemporaryFile) OnSize(slot func(super func() int64) int64) { + C.QTemporaryFile_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_Size +func miqt_exec_callback_QTemporaryFile_Size(self *C.QTemporaryFile, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_Resize(sz int64) bool { + + return (bool)(C.QTemporaryFile_virtualbase_Resize(unsafe.Pointer(this.h), (C.longlong)(sz))) + +} +func (this *QTemporaryFile) OnResize(slot func(super func(sz int64) bool, sz int64) bool) { + C.QTemporaryFile_override_virtual_Resize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_Resize +func miqt_exec_callback_QTemporaryFile_Resize(self *C.QTemporaryFile, cb C.intptr_t, sz C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sz int64) bool, sz int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(sz) + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_Resize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_Permissions() QFileDevice__Permission { + + return (QFileDevice__Permission)(C.QTemporaryFile_virtualbase_Permissions(unsafe.Pointer(this.h))) + +} +func (this *QTemporaryFile) OnPermissions(slot func(super func() QFileDevice__Permission) QFileDevice__Permission) { + C.QTemporaryFile_override_virtual_Permissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_Permissions +func miqt_exec_callback_QTemporaryFile_Permissions(self *C.QTemporaryFile, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QFileDevice__Permission) QFileDevice__Permission) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_Permissions) + + return (C.int)(virtualReturn) + +} + +func (this *QTemporaryFile) callVirtualBase_SetPermissions(permissionSpec QFileDevice__Permission) bool { + + return (bool)(C.QTemporaryFile_virtualbase_SetPermissions(unsafe.Pointer(this.h), (C.int)(permissionSpec))) + +} +func (this *QTemporaryFile) OnSetPermissions(slot func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) { + C.QTemporaryFile_override_virtual_SetPermissions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTemporaryFile_SetPermissions +func miqt_exec_callback_QTemporaryFile_SetPermissions(self *C.QTemporaryFile, cb C.intptr_t, permissionSpec C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(permissionSpec QFileDevice__Permission) bool, permissionSpec QFileDevice__Permission) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QFileDevice__Permission)(permissionSpec) + + virtualReturn := gofunc((&QTemporaryFile{h: self}).callVirtualBase_SetPermissions, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTemporaryFile) Delete() { - C.QTemporaryFile_Delete(this.h) + C.QTemporaryFile_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtemporaryfile.h b/qt6/gen_qtemporaryfile.h index 1f59c9d8..a834c836 100644 --- a/qt6/gen_qtemporaryfile.h +++ b/qt6/gen_qtemporaryfile.h @@ -16,20 +16,26 @@ extern "C" { #ifdef __cplusplus class QFile; +class QFileDevice; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; class QTemporaryFile; #else typedef struct QFile QFile; +typedef struct QFileDevice QFileDevice; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTemporaryFile QTemporaryFile; #endif -QTemporaryFile* QTemporaryFile_new(); -QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName); -QTemporaryFile* QTemporaryFile_new3(QObject* parent); -QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent); +void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self); void* QTemporaryFile_Metacast(QTemporaryFile* self, const char* param1); struct miqt_string QTemporaryFile_Tr(const char* s); @@ -42,9 +48,22 @@ void QTemporaryFile_SetFileTemplate(QTemporaryFile* self, struct miqt_string nam bool QTemporaryFile_Rename(QTemporaryFile* self, struct miqt_string newName); QTemporaryFile* QTemporaryFile_CreateNativeFile(struct miqt_string fileName); QTemporaryFile* QTemporaryFile_CreateNativeFileWithFile(QFile* file); +bool QTemporaryFile_OpenWithFlags(QTemporaryFile* self, int flags); struct miqt_string QTemporaryFile_Tr2(const char* s, const char* c); struct miqt_string QTemporaryFile_Tr3(const char* s, const char* c, int n); -void QTemporaryFile_Delete(QTemporaryFile* self); +void QTemporaryFile_override_virtual_FileName(void* self, intptr_t slot); +struct miqt_string QTemporaryFile_virtualbase_FileName(const void* self); +void QTemporaryFile_override_virtual_OpenWithFlags(void* self, intptr_t slot); +bool QTemporaryFile_virtualbase_OpenWithFlags(void* self, int flags); +void QTemporaryFile_override_virtual_Size(void* self, intptr_t slot); +long long QTemporaryFile_virtualbase_Size(const void* self); +void QTemporaryFile_override_virtual_Resize(void* self, intptr_t slot); +bool QTemporaryFile_virtualbase_Resize(void* self, long long sz); +void QTemporaryFile_override_virtual_Permissions(void* self, intptr_t slot); +int QTemporaryFile_virtualbase_Permissions(const void* self); +void QTemporaryFile_override_virtual_SetPermissions(void* self, intptr_t slot); +bool QTemporaryFile_virtualbase_SetPermissions(void* self, int permissionSpec); +void QTemporaryFile_Delete(QTemporaryFile* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtestsupport_gui.cpp b/qt6/gen_qtestsupport_gui.cpp index 02092f90..6342702a 100644 --- a/qt6/gen_qtestsupport_gui.cpp +++ b/qt6/gen_qtestsupport_gui.cpp @@ -29,8 +29,8 @@ QTest__QTouchEventSequence* QTest__QTouchEventSequence_Stationary(QTest__QTouchE return &_ret; } -bool QTest__QTouchEventSequence_Commit(QTest__QTouchEventSequence* self) { - return self->commit(); +bool QTest__QTouchEventSequence_Commit(QTest__QTouchEventSequence* self, bool processEvents) { + return self->commit(processEvents); } QTest__QTouchEventSequence* QTest__QTouchEventSequence_Press3(QTest__QTouchEventSequence* self, int touchId, QPoint* pt, QWindow* window) { @@ -51,11 +51,11 @@ QTest__QTouchEventSequence* QTest__QTouchEventSequence_Release3(QTest__QTouchEve return &_ret; } -bool QTest__QTouchEventSequence_Commit1(QTest__QTouchEventSequence* self, bool processEvents) { - return self->commit(processEvents); -} - -void QTest__QTouchEventSequence_Delete(QTest__QTouchEventSequence* self) { - delete self; +void QTest__QTouchEventSequence_Delete(QTest__QTouchEventSequence* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtestsupport_gui.go b/qt6/gen_qtestsupport_gui.go index 36025cb1..1d5cfa10 100644 --- a/qt6/gen_qtestsupport_gui.go +++ b/qt6/gen_qtestsupport_gui.go @@ -14,7 +14,8 @@ import ( ) type QTest__QTouchEventSequence struct { - h *C.QTest__QTouchEventSequence + h *C.QTest__QTouchEventSequence + isSubclass bool } func (this *QTest__QTouchEventSequence) cPointer() *C.QTest__QTouchEventSequence { @@ -31,6 +32,7 @@ func (this *QTest__QTouchEventSequence) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTest__QTouchEventSequence constructs the type using only CGO pointers. func newQTest__QTouchEventSequence(h *C.QTest__QTouchEventSequence) *QTest__QTouchEventSequence { if h == nil { return nil @@ -38,8 +40,13 @@ func newQTest__QTouchEventSequence(h *C.QTest__QTouchEventSequence) *QTest__QTou return &QTest__QTouchEventSequence{h: h} } +// UnsafeNewQTest__QTouchEventSequence constructs the type using only unsafe pointers. func UnsafeNewQTest__QTouchEventSequence(h unsafe.Pointer) *QTest__QTouchEventSequence { - return newQTest__QTouchEventSequence((*C.QTest__QTouchEventSequence)(h)) + if h == nil { + return nil + } + + return &QTest__QTouchEventSequence{h: (*C.QTest__QTouchEventSequence)(h)} } func (this *QTest__QTouchEventSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventSequence { @@ -58,8 +65,8 @@ func (this *QTest__QTouchEventSequence) Stationary(touchId int) *QTest__QTouchEv return UnsafeNewQTest__QTouchEventSequence(unsafe.Pointer(C.QTest__QTouchEventSequence_Stationary(this.h, (C.int)(touchId)))) } -func (this *QTest__QTouchEventSequence) Commit() bool { - return (bool)(C.QTest__QTouchEventSequence_Commit(this.h)) +func (this *QTest__QTouchEventSequence) Commit(processEvents bool) bool { + return (bool)(C.QTest__QTouchEventSequence_Commit(this.h, (C.bool)(processEvents))) } func (this *QTest__QTouchEventSequence) Press3(touchId int, pt *QPoint, window *QWindow) *QTest__QTouchEventSequence { @@ -74,13 +81,9 @@ func (this *QTest__QTouchEventSequence) Release3(touchId int, pt *QPoint, window return UnsafeNewQTest__QTouchEventSequence(unsafe.Pointer(C.QTest__QTouchEventSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), window.cPointer()))) } -func (this *QTest__QTouchEventSequence) Commit1(processEvents bool) bool { - return (bool)(C.QTest__QTouchEventSequence_Commit1(this.h, (C.bool)(processEvents))) -} - // Delete this object from C++ memory. func (this *QTest__QTouchEventSequence) Delete() { - C.QTest__QTouchEventSequence_Delete(this.h) + C.QTest__QTouchEventSequence_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtestsupport_gui.h b/qt6/gen_qtestsupport_gui.h index ab3c71b4..5b989495 100644 --- a/qt6/gen_qtestsupport_gui.h +++ b/qt6/gen_qtestsupport_gui.h @@ -32,12 +32,11 @@ QTest__QTouchEventSequence* QTest__QTouchEventSequence_Press(QTest__QTouchEventS QTest__QTouchEventSequence* QTest__QTouchEventSequence_Move(QTest__QTouchEventSequence* self, int touchId, QPoint* pt); QTest__QTouchEventSequence* QTest__QTouchEventSequence_Release(QTest__QTouchEventSequence* self, int touchId, QPoint* pt); QTest__QTouchEventSequence* QTest__QTouchEventSequence_Stationary(QTest__QTouchEventSequence* self, int touchId); -bool QTest__QTouchEventSequence_Commit(QTest__QTouchEventSequence* self); +bool QTest__QTouchEventSequence_Commit(QTest__QTouchEventSequence* self, bool processEvents); QTest__QTouchEventSequence* QTest__QTouchEventSequence_Press3(QTest__QTouchEventSequence* self, int touchId, QPoint* pt, QWindow* window); QTest__QTouchEventSequence* QTest__QTouchEventSequence_Move3(QTest__QTouchEventSequence* self, int touchId, QPoint* pt, QWindow* window); QTest__QTouchEventSequence* QTest__QTouchEventSequence_Release3(QTest__QTouchEventSequence* self, int touchId, QPoint* pt, QWindow* window); -bool QTest__QTouchEventSequence_Commit1(QTest__QTouchEventSequence* self, bool processEvents); -void QTest__QTouchEventSequence_Delete(QTest__QTouchEventSequence* self); +void QTest__QTouchEventSequence_Delete(QTest__QTouchEventSequence* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtestsupport_widgets.cpp b/qt6/gen_qtestsupport_widgets.cpp index e9eb01a6..ec57cda2 100644 --- a/qt6/gen_qtestsupport_widgets.cpp +++ b/qt6/gen_qtestsupport_widgets.cpp @@ -1,12 +1,72 @@ #include +#define WORKAROUND_INNER_CLASS_DEFINITION_QTest__QTouchEventSequence #define WORKAROUND_INNER_CLASS_DEFINITION_QTest__QTouchEventWidgetSequence #include #include #include "gen_qtestsupport_widgets.h" #include "_cgo_export.h" -QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1) { - return new QTest::QTouchEventWidgetSequence(*param1); +class MiqtVirtualQTestQTouchEventWidgetSequence : public virtual QTest::QTouchEventWidgetSequence { +public: + + MiqtVirtualQTestQTouchEventWidgetSequence(const QTest::QTouchEventWidgetSequence& param1): QTest::QTouchEventWidgetSequence(param1) {}; + + virtual ~MiqtVirtualQTestQTouchEventWidgetSequence() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Stationary = 0; + + // Subclass to allow providing a Go implementation + virtual QTest::QTouchEventWidgetSequence& stationary(int touchId) override { + if (handle__Stationary == 0) { + return QTest__QTouchEventWidgetSequence::stationary(touchId); + } + + int sigval1 = touchId; + + QTest__QTouchEventWidgetSequence* callback_return_value = miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary(this, handle__Stationary, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QTest__QTouchEventWidgetSequence* virtualbase_Stationary(int touchId) { + + QTest::QTouchEventWidgetSequence& _ret = QTest__QTouchEventWidgetSequence::stationary(static_cast(touchId)); + // Cast returned reference into pointer + return &_ret; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Commit = 0; + + // Subclass to allow providing a Go implementation + virtual bool commit(bool processEvents) override { + if (handle__Commit == 0) { + return QTest__QTouchEventWidgetSequence::commit(processEvents); + } + + bool sigval1 = processEvents; + + bool callback_return_value = miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit(this, handle__Commit, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Commit(bool processEvents) { + + return QTest__QTouchEventWidgetSequence::commit(processEvents); + + } + +}; + +void QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1, QTest__QTouchEventWidgetSequence** outptr_QTest__QTouchEventWidgetSequence, QTest__QTouchEventSequence** outptr_QTest__QTouchEventSequence) { + MiqtVirtualQTestQTouchEventWidgetSequence* ret = new MiqtVirtualQTestQTouchEventWidgetSequence(*param1); + *outptr_QTest__QTouchEventWidgetSequence = ret; + *outptr_QTest::QTouchEventSequence = static_cast(ret); } QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt) { @@ -33,8 +93,8 @@ QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Stationary(QT return &_ret; } -bool QTest__QTouchEventWidgetSequence_Commit(QTest__QTouchEventWidgetSequence* self) { - return self->commit(); +bool QTest__QTouchEventWidgetSequence_Commit(QTest__QTouchEventWidgetSequence* self, bool processEvents) { + return self->commit(processEvents); } QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press3(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt, QWidget* widget) { @@ -55,11 +115,27 @@ QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Release3(QTes return &_ret; } -bool QTest__QTouchEventWidgetSequence_Commit1(QTest__QTouchEventWidgetSequence* self, bool processEvents) { - return self->commit(processEvents); +void QTest__QTouchEventWidgetSequence_override_virtual_Stationary(void* self, intptr_t slot) { + dynamic_cast( (QTest__QTouchEventWidgetSequence*)(self) )->handle__Stationary = slot; +} + +QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_virtualbase_Stationary(void* self, int touchId) { + return ( (MiqtVirtualQTestQTouchEventWidgetSequence*)(self) )->virtualbase_Stationary(touchId); +} + +void QTest__QTouchEventWidgetSequence_override_virtual_Commit(void* self, intptr_t slot) { + dynamic_cast( (QTest__QTouchEventWidgetSequence*)(self) )->handle__Commit = slot; +} + +bool QTest__QTouchEventWidgetSequence_virtualbase_Commit(void* self, bool processEvents) { + return ( (MiqtVirtualQTestQTouchEventWidgetSequence*)(self) )->virtualbase_Commit(processEvents); } -void QTest__QTouchEventWidgetSequence_Delete(QTest__QTouchEventWidgetSequence* self) { - delete self; +void QTest__QTouchEventWidgetSequence_Delete(QTest__QTouchEventWidgetSequence* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtestsupport_widgets.go b/qt6/gen_qtestsupport_widgets.go index e62364d4..d1f1dce4 100644 --- a/qt6/gen_qtestsupport_widgets.go +++ b/qt6/gen_qtestsupport_widgets.go @@ -10,91 +10,151 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) -type QTest__QTouchEventWidgetSequence struct { - h *C.QTest__QTouchEventWidgetSequence - *QTest__QTouchEventSequence -} - -func (this *QTest__QTouchEventWidgetSequence) cPointer() *C.QTest__QTouchEventWidgetSequence { - if this == nil { - return nil - } - return this.h -} - -func (this *QTest__QTouchEventWidgetSequence) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { - if h == nil { - return nil - } - return &QTest__QTouchEventWidgetSequence{h: h, QTest__QTouchEventSequence: UnsafeNewQTest__QTouchEventSequence(unsafe.Pointer(h))} -} - -func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence((*C.QTest__QTouchEventWidgetSequence)(h)) -} - -// NewQTest__QTouchEventWidgetSequence constructs a new QTest::QTouchEventWidgetSequence object. -func NewQTest__QTouchEventWidgetSequence(param1 *QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { - ret := C.QTest__QTouchEventWidgetSequence_new(param1.cPointer()) - return newQTest__QTouchEventWidgetSequence(ret) -} - -func (this *QTest__QTouchEventWidgetSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer()))) -} - -func (this *QTest__QTouchEventWidgetSequence) Move(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer()))) -} - -func (this *QTest__QTouchEventWidgetSequence) Release(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer()))) -} - -func (this *QTest__QTouchEventWidgetSequence) Stationary(touchId int) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId)))) -} - -func (this *QTest__QTouchEventWidgetSequence) Commit() bool { - return (bool)(C.QTest__QTouchEventWidgetSequence_Commit(this.h)) -} - -func (this *QTest__QTouchEventWidgetSequence) Press3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()))) -} - -func (this *QTest__QTouchEventWidgetSequence) Move3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()))) -} - -func (this *QTest__QTouchEventWidgetSequence) Release3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()))) -} - -func (this *QTest__QTouchEventWidgetSequence) Commit1(processEvents bool) bool { - return (bool)(C.QTest__QTouchEventWidgetSequence_Commit1(this.h, (C.bool)(processEvents))) -} - -// Delete this object from C++ memory. -func (this *QTest__QTouchEventWidgetSequence) Delete() { - C.QTest__QTouchEventWidgetSequence_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QTest__QTouchEventWidgetSequence) GoGC() { - runtime.SetFinalizer(this, func(this *QTest__QTouchEventWidgetSequence) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + type QTest__QTouchEventWidgetSequence struct { + h *C.QTest__QTouchEventWidgetSequence + isSubclass bool + *QTest__QTouchEventSequence + + } + + func (this *QTest__QTouchEventWidgetSequence) cPointer() *C.QTest__QTouchEventWidgetSequence { + if this == nil { + return nil + } + return this.h + } + + func (this *QTest__QTouchEventWidgetSequence) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) + } + + + // newQTest__QTouchEventWidgetSequence constructs the type using only CGO pointers. + func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence, h_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence) *QTest__QTouchEventWidgetSequence { + if h == nil { + return nil + } + return &QTest__QTouchEventWidgetSequence{h: h, +QTest__QTouchEventSequence: newQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} + } + + // UnsafeNewQTest__QTouchEventWidgetSequence constructs the type using only unsafe pointers. + func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer, h_QTest__QTouchEventSequence unsafe.Pointer) *QTest__QTouchEventWidgetSequence { + if h == nil { + return nil + } + + return &QTest__QTouchEventWidgetSequence{h: (*C.QTest__QTouchEventWidgetSequence)(h), +QTest__QTouchEventSequence: UnsafeNewQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} + } + + + // NewQTest__QTouchEventWidgetSequence constructs a new QTest::QTouchEventWidgetSequence object. + func NewQTest__QTouchEventWidgetSequence(param1 *QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { + var outptr_QTest__QTouchEventWidgetSequence *C.QTest__QTouchEventWidgetSequence = nil +var outptr_QTest__QTouchEventSequence *C.QTest::QTouchEventSequence = nil + + C.QTest__QTouchEventWidgetSequence_new(param1.cPointer(), &outptr_QTest__QTouchEventWidgetSequence, &outptr_QTest__QTouchEventSequence) + ret := newQTest__QTouchEventWidgetSequence(outptr_QTest__QTouchEventWidgetSequence, outptr_QTest__QTouchEventSequence) + ret.isSubclass = true + return ret + } + + + func (this *QTest__QTouchEventWidgetSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer())), nil)} + + func (this *QTest__QTouchEventWidgetSequence) Move(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer())), nil)} + + func (this *QTest__QTouchEventWidgetSequence) Release(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer())), nil)} + + func (this *QTest__QTouchEventWidgetSequence) Stationary(touchId int) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId))), nil)} + + func (this *QTest__QTouchEventWidgetSequence) Commit(processEvents bool) bool { + return (bool)(C.QTest__QTouchEventWidgetSequence_Commit(this.h, (C.bool)(processEvents))) +} + + func (this *QTest__QTouchEventWidgetSequence) Press3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil)} + + func (this *QTest__QTouchEventWidgetSequence) Move3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil)} + + func (this *QTest__QTouchEventWidgetSequence) Release3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil)} + + func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Stationary(touchId int) *QTest__QTouchEventWidgetSequence { + + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_virtualbase_Stationary(unsafe.Pointer(this.h), (C.int)(touchId))), nil) + } + func (this *QTest__QTouchEventWidgetSequence) OnStationary(slot func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) { + C.QTest__QTouchEventWidgetSequence_override_virtual_Stationary(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)) ) + } + + //export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary + func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, touchId C.int) *C.QTest__QTouchEventWidgetSequence{ + gofunc, ok := cgo.Handle(cb).Value().(func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters +slotval1 := (int)(touchId) + + +virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Stationary, slotval1 ) + +return virtualReturn.cPointer() + + } + + func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Commit(processEvents bool) bool { + + return (bool)(C.QTest__QTouchEventWidgetSequence_virtualbase_Commit(unsafe.Pointer(this.h), (C.bool)(processEvents))) + + } + func (this *QTest__QTouchEventWidgetSequence) OnCommit(slot func(super func(processEvents bool) bool, processEvents bool) bool) { + C.QTest__QTouchEventWidgetSequence_override_virtual_Commit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)) ) + } + + //export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit + func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, processEvents C.bool) C.bool{ + gofunc, ok := cgo.Handle(cb).Value().(func(super func(processEvents bool) bool, processEvents bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters +slotval1 := (bool)(processEvents) + + +virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Commit, slotval1 ) + +return (C.bool)(virtualReturn) + + } + + // Delete this object from C++ memory. + func (this *QTest__QTouchEventWidgetSequence) Delete() { + C.QTest__QTouchEventWidgetSequence_Delete(this.h, C.bool(this.isSubclass)) + } + + // GoGC adds a Go Finalizer to this pointer, so that it will be deleted + // from C++ memory once it is unreachable from Go memory. + func (this *QTest__QTouchEventWidgetSequence) GoGC() { + runtime.SetFinalizer(this, func(this *QTest__QTouchEventWidgetSequence) { + this.Delete() + runtime.KeepAlive(this.h) + }) + } + \ No newline at end of file diff --git a/qt6/gen_qtestsupport_widgets.h b/qt6/gen_qtestsupport_widgets.h index b971ba51..1e138eb4 100644 --- a/qt6/gen_qtestsupport_widgets.h +++ b/qt6/gen_qtestsupport_widgets.h @@ -16,6 +16,11 @@ extern "C" { #ifdef __cplusplus class QPoint; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTest__QTouchEventSequence) +typedef QTest::QTouchEventSequence QTest__QTouchEventSequence; +#else +class QTest__QTouchEventSequence; +#endif #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTest__QTouchEventWidgetSequence) typedef QTest::QTouchEventWidgetSequence QTest__QTouchEventWidgetSequence; #else @@ -24,21 +29,25 @@ class QTest__QTouchEventWidgetSequence; class QWidget; #else typedef struct QPoint QPoint; +typedef struct QTest__QTouchEventSequence QTest__QTouchEventSequence; typedef struct QTest__QTouchEventWidgetSequence QTest__QTouchEventWidgetSequence; typedef struct QWidget QWidget; #endif -QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1); +void QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1, QTest__QTouchEventWidgetSequence** outptr_QTest__QTouchEventWidgetSequence, QTest__QTouchEventSequence** outptr_QTest__QTouchEventSequence); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Move(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Release(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Stationary(QTest__QTouchEventWidgetSequence* self, int touchId); -bool QTest__QTouchEventWidgetSequence_Commit(QTest__QTouchEventWidgetSequence* self); +bool QTest__QTouchEventWidgetSequence_Commit(QTest__QTouchEventWidgetSequence* self, bool processEvents); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press3(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt, QWidget* widget); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Move3(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt, QWidget* widget); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Release3(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt, QWidget* widget); -bool QTest__QTouchEventWidgetSequence_Commit1(QTest__QTouchEventWidgetSequence* self, bool processEvents); -void QTest__QTouchEventWidgetSequence_Delete(QTest__QTouchEventWidgetSequence* self); +void QTest__QTouchEventWidgetSequence_override_virtual_Stationary(void* self, intptr_t slot); +QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_virtualbase_Stationary(void* self, int touchId); +void QTest__QTouchEventWidgetSequence_override_virtual_Commit(void* self, intptr_t slot); +bool QTest__QTouchEventWidgetSequence_virtualbase_Commit(void* self, bool processEvents); +void QTest__QTouchEventWidgetSequence_Delete(QTest__QTouchEventWidgetSequence* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextboundaryfinder.cpp b/qt6/gen_qtextboundaryfinder.cpp index a1a686e1..2b558e37 100644 --- a/qt6/gen_qtextboundaryfinder.cpp +++ b/qt6/gen_qtextboundaryfinder.cpp @@ -7,29 +7,35 @@ #include "gen_qtextboundaryfinder.h" #include "_cgo_export.h" -QTextBoundaryFinder* QTextBoundaryFinder_new() { - return new QTextBoundaryFinder(); +void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other) { - return new QTextBoundaryFinder(*other); +void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(*other); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal) { +void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - return new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length) { - return new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length)); +void QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length)); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer) { - return new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer)); +void QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer)); + *outptr_QTextBoundaryFinder = ret; } -QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize) { - return new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer), (qsizetype)(bufferSize)); +void QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { + QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer), (qsizetype)(bufferSize)); + *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other) { @@ -92,7 +98,11 @@ int QTextBoundaryFinder_BoundaryReasons(const QTextBoundaryFinder* self) { return static_cast(_ret); } -void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self) { - delete self; +void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextboundaryfinder.go b/qt6/gen_qtextboundaryfinder.go index 3ea794f8..e10640bb 100644 --- a/qt6/gen_qtextboundaryfinder.go +++ b/qt6/gen_qtextboundaryfinder.go @@ -34,7 +34,8 @@ const ( ) type QTextBoundaryFinder struct { - h *C.QTextBoundaryFinder + h *C.QTextBoundaryFinder + isSubclass bool } func (this *QTextBoundaryFinder) cPointer() *C.QTextBoundaryFinder { @@ -51,6 +52,7 @@ func (this *QTextBoundaryFinder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBoundaryFinder constructs the type using only CGO pointers. func newQTextBoundaryFinder(h *C.QTextBoundaryFinder) *QTextBoundaryFinder { if h == nil { return nil @@ -58,20 +60,33 @@ func newQTextBoundaryFinder(h *C.QTextBoundaryFinder) *QTextBoundaryFinder { return &QTextBoundaryFinder{h: h} } +// UnsafeNewQTextBoundaryFinder constructs the type using only unsafe pointers. func UnsafeNewQTextBoundaryFinder(h unsafe.Pointer) *QTextBoundaryFinder { - return newQTextBoundaryFinder((*C.QTextBoundaryFinder)(h)) + if h == nil { + return nil + } + + return &QTextBoundaryFinder{h: (*C.QTextBoundaryFinder)(h)} } // NewQTextBoundaryFinder constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder() *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new() - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new(&outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder2 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder2(other *QTextBoundaryFinder) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new2(other.cPointer()) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new2(other.cPointer(), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder3 constructs a new QTextBoundaryFinder object. @@ -80,26 +95,42 @@ func NewQTextBoundaryFinder3(typeVal QTextBoundaryFinder__BoundaryType, stringVa stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - ret := C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms, &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder4 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder4(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int64) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length)) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder5 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder5(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int64, buffer *byte) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer))) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } // NewQTextBoundaryFinder6 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder6(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int64, buffer *byte, bufferSize int64) *QTextBoundaryFinder { - ret := C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.ptrdiff_t)(bufferSize)) - return newQTextBoundaryFinder(ret) + var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil + + C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.ptrdiff_t)(bufferSize), &outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret.isSubclass = true + return ret } func (this *QTextBoundaryFinder) OperatorAssign(other *QTextBoundaryFinder) { @@ -155,7 +186,7 @@ func (this *QTextBoundaryFinder) BoundaryReasons() QTextBoundaryFinder__Boundary // Delete this object from C++ memory. func (this *QTextBoundaryFinder) Delete() { - C.QTextBoundaryFinder_Delete(this.h) + C.QTextBoundaryFinder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextboundaryfinder.h b/qt6/gen_qtextboundaryfinder.h index 5a41d52a..7f02c37c 100644 --- a/qt6/gen_qtextboundaryfinder.h +++ b/qt6/gen_qtextboundaryfinder.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QTextBoundaryFinder QTextBoundaryFinder; #endif -QTextBoundaryFinder* QTextBoundaryFinder_new(); -QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other); -QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal); -QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length); -QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer); -QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize); +void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +void QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder); void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other); bool QTextBoundaryFinder_IsValid(const QTextBoundaryFinder* self); int QTextBoundaryFinder_Type(const QTextBoundaryFinder* self); @@ -40,7 +40,7 @@ ptrdiff_t QTextBoundaryFinder_ToNextBoundary(QTextBoundaryFinder* self); ptrdiff_t QTextBoundaryFinder_ToPreviousBoundary(QTextBoundaryFinder* self); bool QTextBoundaryFinder_IsAtBoundary(const QTextBoundaryFinder* self); int QTextBoundaryFinder_BoundaryReasons(const QTextBoundaryFinder* self); -void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self); +void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextbrowser.cpp b/qt6/gen_qtextbrowser.cpp index 564c155d..58e0e941 100644 --- a/qt6/gen_qtextbrowser.cpp +++ b/qt6/gen_qtextbrowser.cpp @@ -1,22 +1,884 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include #include #include +#include #include #include #include "gen_qtextbrowser.h" #include "_cgo_export.h" -QTextBrowser* QTextBrowser_new(QWidget* parent) { - return new QTextBrowser(parent); +class MiqtVirtualQTextBrowser : public virtual QTextBrowser { +public: + + MiqtVirtualQTextBrowser(QWidget* parent): QTextBrowser(parent) {}; + MiqtVirtualQTextBrowser(): QTextBrowser() {}; + + virtual ~MiqtVirtualQTextBrowser() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QTextBrowser::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextBrowser_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QTextBrowser::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Backward = 0; + + // Subclass to allow providing a Go implementation + virtual void backward() override { + if (handle__Backward == 0) { + QTextBrowser::backward(); + return; + } + + + miqt_exec_callback_QTextBrowser_Backward(this, handle__Backward); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Backward() { + + QTextBrowser::backward(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Forward = 0; + + // Subclass to allow providing a Go implementation + virtual void forward() override { + if (handle__Forward == 0) { + QTextBrowser::forward(); + return; + } + + + miqt_exec_callback_QTextBrowser_Forward(this, handle__Forward); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Forward() { + + QTextBrowser::forward(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Home = 0; + + // Subclass to allow providing a Go implementation + virtual void home() override { + if (handle__Home == 0) { + QTextBrowser::home(); + return; + } + + + miqt_exec_callback_QTextBrowser_Home(this, handle__Home); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Home() { + + QTextBrowser::home(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reload = 0; + + // Subclass to allow providing a Go implementation + virtual void reload() override { + if (handle__Reload == 0) { + QTextBrowser::reload(); + return; + } + + + miqt_exec_callback_QTextBrowser_Reload(this, handle__Reload); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reload() { + + QTextBrowser::reload(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTextBrowser::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTextBrowser_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTextBrowser::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* ev) override { + if (handle__KeyPressEvent == 0) { + QTextBrowser::keyPressEvent(ev); + return; + } + + QKeyEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* ev) { + + QTextBrowser::keyPressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* ev) override { + if (handle__MouseMoveEvent == 0) { + QTextBrowser::mouseMoveEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* ev) { + + QTextBrowser::mouseMoveEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* ev) override { + if (handle__MousePressEvent == 0) { + QTextBrowser::mousePressEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* ev) { + + QTextBrowser::mousePressEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* ev) override { + if (handle__MouseReleaseEvent == 0) { + QTextBrowser::mouseReleaseEvent(ev); + return; + } + + QMouseEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* ev) { + + QTextBrowser::mouseReleaseEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* ev) override { + if (handle__FocusOutEvent == 0) { + QTextBrowser::focusOutEvent(ev); + return; + } + + QFocusEvent* sigval1 = ev; + + miqt_exec_callback_QTextBrowser_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* ev) { + + QTextBrowser::focusOutEvent(ev); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTextBrowser::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTextBrowser_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTextBrowser::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTextBrowser::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTextBrowser::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetSource = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetSource(const QUrl& name, QTextDocument::ResourceType typeVal) override { + if (handle__DoSetSource == 0) { + QTextBrowser::doSetSource(name, typeVal); + return; + } + + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&name_ret); + QTextDocument::ResourceType typeVal_ret = typeVal; + int sigval2 = static_cast(typeVal_ret); + + miqt_exec_callback_QTextBrowser_DoSetSource(this, handle__DoSetSource, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetSource(QUrl* name, int typeVal) { + + QTextBrowser::doSetSource(*name, static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QTextBrowser::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextBrowser_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QTextBrowser::inputMethodQuery(static_cast(property))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QTextBrowser::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QTextBrowser::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QTextBrowser::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QTextBrowser::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QTextBrowser::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QTextBrowser::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QTextBrowser::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QTextBrowser::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QTextBrowser::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QTextBrowser::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QTextBrowser::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QTextBrowser::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QTextBrowser::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QTextBrowser::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QTextBrowser::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QTextBrowser::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QTextBrowser::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QTextBrowser::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QTextBrowser::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QTextBrowser::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTextBrowser::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTextBrowser_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTextBrowser::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QTextBrowser::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QTextBrowser::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QTextBrowser::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QTextBrowser_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QTextBrowser::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateMimeDataFromSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* createMimeDataFromSelection() const override { + if (handle__CreateMimeDataFromSelection == 0) { + return QTextBrowser::createMimeDataFromSelection(); + } + + + QMimeData* callback_return_value = miqt_exec_callback_QTextBrowser_CreateMimeDataFromSelection(const_cast(this), handle__CreateMimeDataFromSelection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_CreateMimeDataFromSelection() const { + + return QTextBrowser::createMimeDataFromSelection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QTextBrowser::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QTextBrowser_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QTextBrowser::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual void insertFromMimeData(const QMimeData* source) override { + if (handle__InsertFromMimeData == 0) { + QTextBrowser::insertFromMimeData(source); + return; + } + + QMimeData* sigval1 = (QMimeData*) source; + + miqt_exec_callback_QTextBrowser_InsertFromMimeData(this, handle__InsertFromMimeData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertFromMimeData(QMimeData* source) { + + QTextBrowser::insertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTextBrowser::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTextBrowser_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTextBrowser::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTextBrowser::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTextBrowser_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTextBrowser::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetTextCursor = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetTextCursor(const QTextCursor& cursor) override { + if (handle__DoSetTextCursor == 0) { + QTextBrowser::doSetTextCursor(cursor); + return; + } + + const QTextCursor& cursor_ret = cursor; + // Cast returned reference into pointer + QTextCursor* sigval1 = const_cast(&cursor_ret); + + miqt_exec_callback_QTextBrowser_DoSetTextCursor(this, handle__DoSetTextCursor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetTextCursor(QTextCursor* cursor) { + + QTextBrowser::doSetTextCursor(*cursor); + + } + +}; + +void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(parent); + *outptr_QTextBrowser = ret; + *outptr_QTextEdit = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextBrowser* QTextBrowser_new2() { - return new QTextBrowser(); +void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(); + *outptr_QTextBrowser = ret; + *outptr_QTextEdit = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self) { @@ -158,7 +1020,7 @@ void QTextBrowser_BackwardAvailable(QTextBrowser* self, bool param1) { } void QTextBrowser_connect_BackwardAvailable(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::backwardAvailable), self, [=](bool param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::backwardAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextBrowser_BackwardAvailable(slot, sigval1); }); @@ -169,7 +1031,7 @@ void QTextBrowser_ForwardAvailable(QTextBrowser* self, bool param1) { } void QTextBrowser_connect_ForwardAvailable(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::forwardAvailable), self, [=](bool param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::forwardAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextBrowser_ForwardAvailable(slot, sigval1); }); @@ -180,7 +1042,7 @@ void QTextBrowser_HistoryChanged(QTextBrowser* self) { } void QTextBrowser_connect_HistoryChanged(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::historyChanged), self, [=]() { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::historyChanged), self, [=]() { miqt_exec_callback_QTextBrowser_HistoryChanged(slot); }); } @@ -190,7 +1052,7 @@ void QTextBrowser_SourceChanged(QTextBrowser* self, QUrl* param1) { } void QTextBrowser_connect_SourceChanged(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::sourceChanged), self, [=](const QUrl& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::sourceChanged), self, [=](const QUrl& param1) { const QUrl& param1_ret = param1; // Cast returned reference into pointer QUrl* sigval1 = const_cast(¶m1_ret); @@ -203,7 +1065,7 @@ void QTextBrowser_Highlighted(QTextBrowser* self, QUrl* param1) { } void QTextBrowser_connect_Highlighted(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::highlighted), self, [=](const QUrl& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::highlighted), self, [=](const QUrl& param1) { const QUrl& param1_ret = param1; // Cast returned reference into pointer QUrl* sigval1 = const_cast(¶m1_ret); @@ -216,7 +1078,7 @@ void QTextBrowser_AnchorClicked(QTextBrowser* self, QUrl* param1) { } void QTextBrowser_connect_AnchorClicked(QTextBrowser* self, intptr_t slot) { - QTextBrowser::connect(self, static_cast(&QTextBrowser::anchorClicked), self, [=](const QUrl& param1) { + MiqtVirtualQTextBrowser::connect(self, static_cast(&QTextBrowser::anchorClicked), self, [=](const QUrl& param1) { const QUrl& param1_ret = param1; // Cast returned reference into pointer QUrl* sigval1 = const_cast(¶m1_ret); @@ -250,7 +1112,283 @@ void QTextBrowser_SetSource2(QTextBrowser* self, QUrl* name, int typeVal) { self->setSource(*name, static_cast(typeVal)); } -void QTextBrowser_Delete(QTextBrowser* self) { - delete self; +void QTextBrowser_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__LoadResource = slot; +} + +QVariant* QTextBrowser_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QTextBrowser_override_virtual_Backward(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Backward = slot; +} + +void QTextBrowser_virtualbase_Backward(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Backward(); +} + +void QTextBrowser_override_virtual_Forward(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Forward = slot; +} + +void QTextBrowser_virtualbase_Forward(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Forward(); +} + +void QTextBrowser_override_virtual_Home(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Home = slot; +} + +void QTextBrowser_virtualbase_Home(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Home(); +} + +void QTextBrowser_override_virtual_Reload(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Reload = slot; +} + +void QTextBrowser_virtualbase_Reload(void* self) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Reload(); +} + +void QTextBrowser_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__Event = slot; +} + +bool QTextBrowser_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_Event(e); +} + +void QTextBrowser_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__KeyPressEvent = slot; +} + +void QTextBrowser_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_KeyPressEvent(ev); +} + +void QTextBrowser_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTextBrowser_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MouseMoveEvent(ev); +} + +void QTextBrowser_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MousePressEvent = slot; +} + +void QTextBrowser_virtualbase_MousePressEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MousePressEvent(ev); +} + +void QTextBrowser_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTextBrowser_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MouseReleaseEvent(ev); +} + +void QTextBrowser_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__FocusOutEvent = slot; +} + +void QTextBrowser_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_FocusOutEvent(ev); +} + +void QTextBrowser_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTextBrowser_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTextBrowser_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__PaintEvent = slot; +} + +void QTextBrowser_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_PaintEvent(e); +} + +void QTextBrowser_override_virtual_DoSetSource(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DoSetSource = slot; +} + +void QTextBrowser_virtualbase_DoSetSource(void* self, QUrl* name, int typeVal) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DoSetSource(name, typeVal); +} + +void QTextBrowser_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTextBrowser_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQTextBrowser*)(self) )->virtualbase_InputMethodQuery(property); +} + +void QTextBrowser_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__TimerEvent = slot; +} + +void QTextBrowser_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_TimerEvent(e); +} + +void QTextBrowser_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTextBrowser_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QTextBrowser_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ResizeEvent = slot; +} + +void QTextBrowser_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ResizeEvent(e); +} + +void QTextBrowser_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTextBrowser_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QTextBrowser_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTextBrowser_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QTextBrowser_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DragEnterEvent = slot; +} + +void QTextBrowser_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QTextBrowser_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTextBrowser_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QTextBrowser_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DragMoveEvent = slot; +} + +void QTextBrowser_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QTextBrowser_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DropEvent = slot; +} + +void QTextBrowser_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DropEvent(e); +} + +void QTextBrowser_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__FocusInEvent = slot; +} + +void QTextBrowser_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_FocusInEvent(e); +} + +void QTextBrowser_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ShowEvent = slot; +} + +void QTextBrowser_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTextBrowser_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ChangeEvent = slot; +} + +void QTextBrowser_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ChangeEvent(e); +} + +void QTextBrowser_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__WheelEvent = slot; +} + +void QTextBrowser_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_WheelEvent(e); +} + +void QTextBrowser_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__CreateMimeDataFromSelection = slot; +} + +QMimeData* QTextBrowser_virtualbase_CreateMimeDataFromSelection(const void* self) { + return ( (const MiqtVirtualQTextBrowser*)(self) )->virtualbase_CreateMimeDataFromSelection(); +} + +void QTextBrowser_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__CanInsertFromMimeData = slot; +} + +bool QTextBrowser_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQTextBrowser*)(self) )->virtualbase_CanInsertFromMimeData(source); +} + +void QTextBrowser_override_virtual_InsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__InsertFromMimeData = slot; +} + +void QTextBrowser_virtualbase_InsertFromMimeData(void* self, QMimeData* source) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_InsertFromMimeData(source); +} + +void QTextBrowser_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__InputMethodEvent = slot; +} + +void QTextBrowser_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTextBrowser_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTextBrowser_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTextBrowser_override_virtual_DoSetTextCursor(void* self, intptr_t slot) { + dynamic_cast( (QTextBrowser*)(self) )->handle__DoSetTextCursor = slot; +} + +void QTextBrowser_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor) { + ( (MiqtVirtualQTextBrowser*)(self) )->virtualbase_DoSetTextCursor(cursor); +} + +void QTextBrowser_Delete(QTextBrowser* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextbrowser.go b/qt6/gen_qtextbrowser.go index c034866f..4835b7bb 100644 --- a/qt6/gen_qtextbrowser.go +++ b/qt6/gen_qtextbrowser.go @@ -15,7 +15,8 @@ import ( ) type QTextBrowser struct { - h *C.QTextBrowser + h *C.QTextBrowser + isSubclass bool *QTextEdit } @@ -33,27 +34,55 @@ func (this *QTextBrowser) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextBrowser(h *C.QTextBrowser) *QTextBrowser { +// newQTextBrowser constructs the type using only CGO pointers. +func newQTextBrowser(h *C.QTextBrowser, h_QTextEdit *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextBrowser { if h == nil { return nil } - return &QTextBrowser{h: h, QTextEdit: UnsafeNewQTextEdit(unsafe.Pointer(h))} + return &QTextBrowser{h: h, + QTextEdit: newQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTextBrowser(h unsafe.Pointer) *QTextBrowser { - return newQTextBrowser((*C.QTextBrowser)(h)) +// UnsafeNewQTextBrowser constructs the type using only unsafe pointers. +func UnsafeNewQTextBrowser(h unsafe.Pointer, h_QTextEdit unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextBrowser { + if h == nil { + return nil + } + + return &QTextBrowser{h: (*C.QTextBrowser)(h), + QTextEdit: UnsafeNewQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTextBrowser constructs a new QTextBrowser object. func NewQTextBrowser(parent *QWidget) *QTextBrowser { - ret := C.QTextBrowser_new(parent.cPointer()) - return newQTextBrowser(ret) + var outptr_QTextBrowser *C.QTextBrowser = nil + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextBrowser_new(parent.cPointer(), &outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextBrowser2 constructs a new QTextBrowser object. func NewQTextBrowser2() *QTextBrowser { - ret := C.QTextBrowser_new2() - return newQTextBrowser(ret) + var outptr_QTextBrowser *C.QTextBrowser = nil + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextBrowser_new2(&outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTextBrowser) MetaObject() *QMetaObject { @@ -333,9 +362,798 @@ func (this *QTextBrowser) SetSource2(name *QUrl, typeVal QTextDocument__Resource C.QTextBrowser_SetSource2(this.h, name.cPointer(), (C.int)(typeVal)) } +func (this *QTextBrowser) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QTextBrowser_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextBrowser) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QTextBrowser_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_LoadResource +func miqt_exec_callback_QTextBrowser_LoadResource(self *C.QTextBrowser, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTextBrowser) callVirtualBase_Backward() { + + C.QTextBrowser_virtualbase_Backward(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnBackward(slot func(super func())) { + C.QTextBrowser_override_virtual_Backward(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Backward +func miqt_exec_callback_QTextBrowser_Backward(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Backward) + +} + +func (this *QTextBrowser) callVirtualBase_Forward() { + + C.QTextBrowser_virtualbase_Forward(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnForward(slot func(super func())) { + C.QTextBrowser_override_virtual_Forward(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Forward +func miqt_exec_callback_QTextBrowser_Forward(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Forward) + +} + +func (this *QTextBrowser) callVirtualBase_Home() { + + C.QTextBrowser_virtualbase_Home(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnHome(slot func(super func())) { + C.QTextBrowser_override_virtual_Home(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Home +func miqt_exec_callback_QTextBrowser_Home(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Home) + +} + +func (this *QTextBrowser) callVirtualBase_Reload() { + + C.QTextBrowser_virtualbase_Reload(unsafe.Pointer(this.h)) + +} +func (this *QTextBrowser) OnReload(slot func(super func())) { + C.QTextBrowser_override_virtual_Reload(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Reload +func miqt_exec_callback_QTextBrowser_Reload(self *C.QTextBrowser, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextBrowser{h: self}).callVirtualBase_Reload) + +} + +func (this *QTextBrowser) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTextBrowser_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTextBrowser) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTextBrowser_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_Event +func miqt_exec_callback_QTextBrowser_Event(self *C.QTextBrowser, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextBrowser) callVirtualBase_KeyPressEvent(ev *QKeyEvent) { + + C.QTextBrowser_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnKeyPressEvent(slot func(super func(ev *QKeyEvent), ev *QKeyEvent)) { + C.QTextBrowser_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_KeyPressEvent +func miqt_exec_callback_QTextBrowser_KeyPressEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QKeyEvent), ev *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(ev), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MouseMoveEvent(ev *QMouseEvent) { + + C.QTextBrowser_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnMouseMoveEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QTextBrowser_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MouseMoveEvent +func miqt_exec_callback_QTextBrowser_MouseMoveEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MousePressEvent(ev *QMouseEvent) { + + C.QTextBrowser_virtualbase_MousePressEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnMousePressEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QTextBrowser_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MousePressEvent +func miqt_exec_callback_QTextBrowser_MousePressEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MouseReleaseEvent(ev *QMouseEvent) { + + C.QTextBrowser_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnMouseReleaseEvent(slot func(super func(ev *QMouseEvent), ev *QMouseEvent)) { + C.QTextBrowser_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MouseReleaseEvent +func miqt_exec_callback_QTextBrowser_MouseReleaseEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QMouseEvent), ev *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(ev), nil, nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_FocusOutEvent(ev *QFocusEvent) { + + C.QTextBrowser_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), ev.cPointer()) + +} +func (this *QTextBrowser) OnFocusOutEvent(slot func(super func(ev *QFocusEvent), ev *QFocusEvent)) { + C.QTextBrowser_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_FocusOutEvent +func miqt_exec_callback_QTextBrowser_FocusOutEvent(self *C.QTextBrowser, cb C.intptr_t, ev *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *QFocusEvent), ev *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(ev), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTextBrowser_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTextBrowser) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTextBrowser_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_FocusNextPrevChild +func miqt_exec_callback_QTextBrowser_FocusNextPrevChild(self *C.QTextBrowser, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextBrowser) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTextBrowser_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTextBrowser_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_PaintEvent +func miqt_exec_callback_QTextBrowser_PaintEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DoSetSource(name *QUrl, typeVal QTextDocument__ResourceType) { + + C.QTextBrowser_virtualbase_DoSetSource(unsafe.Pointer(this.h), name.cPointer(), (C.int)(typeVal)) + +} +func (this *QTextBrowser) OnDoSetSource(slot func(super func(name *QUrl, typeVal QTextDocument__ResourceType), name *QUrl, typeVal QTextDocument__ResourceType)) { + C.QTextBrowser_override_virtual_DoSetSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DoSetSource +func miqt_exec_callback_QTextBrowser_DoSetSource(self *C.QTextBrowser, cb C.intptr_t, name *C.QUrl, typeVal C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(name *QUrl, typeVal QTextDocument__ResourceType), name *QUrl, typeVal QTextDocument__ResourceType)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQUrl(unsafe.Pointer(name)) + slotval2 := (QTextDocument__ResourceType)(typeVal) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DoSetSource, slotval1, slotval2) + +} + +func (this *QTextBrowser) callVirtualBase_InputMethodQuery(property InputMethodQuery) *QVariant { + + _ret := C.QTextBrowser_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextBrowser) OnInputMethodQuery(slot func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) { + C.QTextBrowser_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_InputMethodQuery +func miqt_exec_callback_QTextBrowser_InputMethodQuery(self *C.QTextBrowser, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(property) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTextBrowser) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QTextBrowser_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QTextBrowser_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_TimerEvent +func miqt_exec_callback_QTextBrowser_TimerEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QTextBrowser_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QTextBrowser_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_KeyReleaseEvent +func miqt_exec_callback_QTextBrowser_KeyReleaseEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QTextBrowser_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QTextBrowser_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ResizeEvent +func miqt_exec_callback_QTextBrowser_ResizeEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QTextBrowser_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextBrowser_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent +func miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QTextBrowser_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QTextBrowser_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ContextMenuEvent +func miqt_exec_callback_QTextBrowser_ContextMenuEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DragEnterEvent(e *QDragEnterEvent) { + + C.QTextBrowser_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDragEnterEvent(slot func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) { + C.QTextBrowser_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DragEnterEvent +func miqt_exec_callback_QTextBrowser_DragEnterEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QTextBrowser_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QTextBrowser_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DragLeaveEvent +func miqt_exec_callback_QTextBrowser_DragLeaveEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QTextBrowser_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QTextBrowser_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DragMoveEvent +func miqt_exec_callback_QTextBrowser_DragMoveEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QTextBrowser_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QTextBrowser_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DropEvent +func miqt_exec_callback_QTextBrowser_DropEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QTextBrowser_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QTextBrowser_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_FocusInEvent +func miqt_exec_callback_QTextBrowser_FocusInEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTextBrowser_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextBrowser) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTextBrowser_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ShowEvent +func miqt_exec_callback_QTextBrowser_ShowEvent(self *C.QTextBrowser, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QTextBrowser_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QTextBrowser_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ChangeEvent +func miqt_exec_callback_QTextBrowser_ChangeEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QTextBrowser_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextBrowser) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QTextBrowser_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_WheelEvent +func miqt_exec_callback_QTextBrowser_WheelEvent(self *C.QTextBrowser, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTextBrowser_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))), nil) +} +func (this *QTextBrowser) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { + C.QTextBrowser_override_virtual_CreateMimeDataFromSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_CreateMimeDataFromSelection +func miqt_exec_callback_QTextBrowser_CreateMimeDataFromSelection(self *C.QTextBrowser, cb C.intptr_t) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMimeData) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_CreateMimeDataFromSelection) + + return virtualReturn.cPointer() + +} + +func (this *QTextBrowser) callVirtualBase_CanInsertFromMimeData(source *QMimeData) bool { + + return (bool)(C.QTextBrowser_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), source.cPointer())) + +} +func (this *QTextBrowser) OnCanInsertFromMimeData(slot func(super func(source *QMimeData) bool, source *QMimeData) bool) { + C.QTextBrowser_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_CanInsertFromMimeData +func miqt_exec_callback_QTextBrowser_CanInsertFromMimeData(self *C.QTextBrowser, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData) bool, source *QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextBrowser) callVirtualBase_InsertFromMimeData(source *QMimeData) { + + C.QTextBrowser_virtualbase_InsertFromMimeData(unsafe.Pointer(this.h), source.cPointer()) + +} +func (this *QTextBrowser) OnInsertFromMimeData(slot func(super func(source *QMimeData), source *QMimeData)) { + C.QTextBrowser_override_virtual_InsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_InsertFromMimeData +func miqt_exec_callback_QTextBrowser_InsertFromMimeData(self *C.QTextBrowser, cb C.intptr_t, source *C.QMimeData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData), source *QMimeData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_InsertFromMimeData, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTextBrowser_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextBrowser) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTextBrowser_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_InputMethodEvent +func miqt_exec_callback_QTextBrowser_InputMethodEvent(self *C.QTextBrowser, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTextBrowser) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTextBrowser_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTextBrowser) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTextBrowser_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_ScrollContentsBy +func miqt_exec_callback_QTextBrowser_ScrollContentsBy(self *C.QTextBrowser, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTextBrowser) callVirtualBase_DoSetTextCursor(cursor *QTextCursor) { + + C.QTextBrowser_virtualbase_DoSetTextCursor(unsafe.Pointer(this.h), cursor.cPointer()) + +} +func (this *QTextBrowser) OnDoSetTextCursor(slot func(super func(cursor *QTextCursor), cursor *QTextCursor)) { + C.QTextBrowser_override_virtual_DoSetTextCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextBrowser_DoSetTextCursor +func miqt_exec_callback_QTextBrowser_DoSetTextCursor(self *C.QTextBrowser, cb C.intptr_t, cursor *C.QTextCursor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursor *QTextCursor), cursor *QTextCursor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextCursor(unsafe.Pointer(cursor)) + + gofunc((&QTextBrowser{h: self}).callVirtualBase_DoSetTextCursor, slotval1) + +} + // Delete this object from C++ memory. func (this *QTextBrowser) Delete() { - C.QTextBrowser_Delete(this.h) + C.QTextBrowser_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextbrowser.h b/qt6/gen_qtextbrowser.h index ca499b41..a8981da3 100644 --- a/qt6/gen_qtextbrowser.h +++ b/qt6/gen_qtextbrowser.h @@ -15,21 +15,65 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QResizeEvent; +class QShowEvent; class QTextBrowser; +class QTextCursor; +class QTextEdit; +class QTimerEvent; class QUrl; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QTextBrowser QTextBrowser; +typedef struct QTextCursor QTextCursor; +typedef struct QTextEdit QTextEdit; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTextBrowser* QTextBrowser_new(QWidget* parent); -QTextBrowser* QTextBrowser_new2(); +void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self); void* QTextBrowser_Metacast(QTextBrowser* self, const char* param1); struct miqt_string QTextBrowser_Tr(const char* s); @@ -66,10 +110,87 @@ void QTextBrowser_Highlighted(QTextBrowser* self, QUrl* param1); void QTextBrowser_connect_Highlighted(QTextBrowser* self, intptr_t slot); void QTextBrowser_AnchorClicked(QTextBrowser* self, QUrl* param1); void QTextBrowser_connect_AnchorClicked(QTextBrowser* self, intptr_t slot); +bool QTextBrowser_Event(QTextBrowser* self, QEvent* e); +void QTextBrowser_KeyPressEvent(QTextBrowser* self, QKeyEvent* ev); +void QTextBrowser_MouseMoveEvent(QTextBrowser* self, QMouseEvent* ev); +void QTextBrowser_MousePressEvent(QTextBrowser* self, QMouseEvent* ev); +void QTextBrowser_MouseReleaseEvent(QTextBrowser* self, QMouseEvent* ev); +void QTextBrowser_FocusOutEvent(QTextBrowser* self, QFocusEvent* ev); +bool QTextBrowser_FocusNextPrevChild(QTextBrowser* self, bool next); +void QTextBrowser_PaintEvent(QTextBrowser* self, QPaintEvent* e); +void QTextBrowser_DoSetSource(QTextBrowser* self, QUrl* name, int typeVal); struct miqt_string QTextBrowser_Tr2(const char* s, const char* c); struct miqt_string QTextBrowser_Tr3(const char* s, const char* c, int n); void QTextBrowser_SetSource2(QTextBrowser* self, QUrl* name, int typeVal); -void QTextBrowser_Delete(QTextBrowser* self); +void QTextBrowser_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QTextBrowser_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QTextBrowser_override_virtual_Backward(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Backward(void* self); +void QTextBrowser_override_virtual_Forward(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Forward(void* self); +void QTextBrowser_override_virtual_Home(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Home(void* self); +void QTextBrowser_override_virtual_Reload(void* self, intptr_t slot); +void QTextBrowser_virtualbase_Reload(void* self); +void QTextBrowser_override_virtual_Event(void* self, intptr_t slot); +bool QTextBrowser_virtualbase_Event(void* self, QEvent* e); +void QTextBrowser_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_KeyPressEvent(void* self, QKeyEvent* ev); +void QTextBrowser_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MouseMoveEvent(void* self, QMouseEvent* ev); +void QTextBrowser_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MousePressEvent(void* self, QMouseEvent* ev); +void QTextBrowser_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* ev); +void QTextBrowser_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_FocusOutEvent(void* self, QFocusEvent* ev); +void QTextBrowser_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTextBrowser_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTextBrowser_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTextBrowser_override_virtual_DoSetSource(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DoSetSource(void* self, QUrl* name, int typeVal); +void QTextBrowser_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTextBrowser_virtualbase_InputMethodQuery(const void* self, int property); +void QTextBrowser_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QTextBrowser_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QTextBrowser_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QTextBrowser_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QTextBrowser_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QTextBrowser_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QTextBrowser_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QTextBrowser_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QTextBrowser_override_virtual_DropEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DropEvent(void* self, QDropEvent* e); +void QTextBrowser_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QTextBrowser_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTextBrowser_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ChangeEvent(void* self, QEvent* e); +void QTextBrowser_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QTextBrowser_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot); +QMimeData* QTextBrowser_virtualbase_CreateMimeDataFromSelection(const void* self); +void QTextBrowser_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QTextBrowser_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QTextBrowser_override_virtual_InsertFromMimeData(void* self, intptr_t slot); +void QTextBrowser_virtualbase_InsertFromMimeData(void* self, QMimeData* source); +void QTextBrowser_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTextBrowser_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTextBrowser_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTextBrowser_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTextBrowser_override_virtual_DoSetTextCursor(void* self, intptr_t slot); +void QTextBrowser_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor); +void QTextBrowser_Delete(QTextBrowser* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextcursor.cpp b/qt6/gen_qtextcursor.cpp index 8e21aa2a..795e8d92 100644 --- a/qt6/gen_qtextcursor.cpp +++ b/qt6/gen_qtextcursor.cpp @@ -19,24 +19,29 @@ #include "gen_qtextcursor.h" #include "_cgo_export.h" -QTextCursor* QTextCursor_new() { - return new QTextCursor(); +void QTextCursor_new(QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new2(QTextDocument* document) { - return new QTextCursor(document); +void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(document); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new3(QTextFrame* frame) { - return new QTextCursor(frame); +void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(frame); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new4(QTextBlock* block) { - return new QTextCursor(*block); +void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(*block); + *outptr_QTextCursor = ret; } -QTextCursor* QTextCursor_new5(QTextCursor* cursor) { - return new QTextCursor(*cursor); +void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor) { + QTextCursor* ret = new QTextCursor(*cursor); + *outptr_QTextCursor = ret; } void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other) { @@ -373,7 +378,11 @@ void QTextCursor_InsertImage2(QTextCursor* self, QImage* image, struct miqt_stri self->insertImage(*image, name_QString); } -void QTextCursor_Delete(QTextCursor* self) { - delete self; +void QTextCursor_Delete(QTextCursor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextcursor.go b/qt6/gen_qtextcursor.go index 1a839ba5..5764033e 100644 --- a/qt6/gen_qtextcursor.go +++ b/qt6/gen_qtextcursor.go @@ -60,7 +60,8 @@ const ( ) type QTextCursor struct { - h *C.QTextCursor + h *C.QTextCursor + isSubclass bool } func (this *QTextCursor) cPointer() *C.QTextCursor { @@ -77,6 +78,7 @@ func (this *QTextCursor) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextCursor constructs the type using only CGO pointers. func newQTextCursor(h *C.QTextCursor) *QTextCursor { if h == nil { return nil @@ -84,38 +86,63 @@ func newQTextCursor(h *C.QTextCursor) *QTextCursor { return &QTextCursor{h: h} } +// UnsafeNewQTextCursor constructs the type using only unsafe pointers. func UnsafeNewQTextCursor(h unsafe.Pointer) *QTextCursor { - return newQTextCursor((*C.QTextCursor)(h)) + if h == nil { + return nil + } + + return &QTextCursor{h: (*C.QTextCursor)(h)} } // NewQTextCursor constructs a new QTextCursor object. func NewQTextCursor() *QTextCursor { - ret := C.QTextCursor_new() - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new(&outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor2 constructs a new QTextCursor object. func NewQTextCursor2(document *QTextDocument) *QTextCursor { - ret := C.QTextCursor_new2(document.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new2(document.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor3 constructs a new QTextCursor object. func NewQTextCursor3(frame *QTextFrame) *QTextCursor { - ret := C.QTextCursor_new3(frame.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new3(frame.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor4 constructs a new QTextCursor object. func NewQTextCursor4(block *QTextBlock) *QTextCursor { - ret := C.QTextCursor_new4(block.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new4(block.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } // NewQTextCursor5 constructs a new QTextCursor object. func NewQTextCursor5(cursor *QTextCursor) *QTextCursor { - ret := C.QTextCursor_new5(cursor.cPointer()) - return newQTextCursor(ret) + var outptr_QTextCursor *C.QTextCursor = nil + + C.QTextCursor_new5(cursor.cPointer(), &outptr_QTextCursor) + ret := newQTextCursor(outptr_QTextCursor) + ret.isSubclass = true + return ret } func (this *QTextCursor) OperatorAssign(other *QTextCursor) { @@ -253,7 +280,7 @@ func (this *QTextCursor) Block() *QTextBlock { func (this *QTextCursor) CharFormat() *QTextCharFormat { _ret := C.QTextCursor_CharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -268,7 +295,7 @@ func (this *QTextCursor) MergeCharFormat(modifier *QTextCharFormat) { func (this *QTextCursor) BlockFormat() *QTextBlockFormat { _ret := C.QTextCursor_BlockFormat(this.h) - _goptr := newQTextBlockFormat(_ret) + _goptr := newQTextBlockFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -283,7 +310,7 @@ func (this *QTextCursor) MergeBlockFormat(modifier *QTextBlockFormat) { func (this *QTextCursor) BlockCharFormat() *QTextCharFormat { _ret := C.QTextCursor_BlockCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -325,43 +352,43 @@ func (this *QTextCursor) InsertBlock2(format *QTextBlockFormat, charFormat *QTex } func (this *QTextCursor) InsertList(format *QTextListFormat) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertList(this.h, format.cPointer()))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertList(this.h, format.cPointer())), nil, nil, nil) } func (this *QTextCursor) InsertListWithStyle(style QTextListFormat__Style) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style)))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style))), nil, nil, nil) } func (this *QTextCursor) CreateList(format *QTextListFormat) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateList(this.h, format.cPointer()))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateList(this.h, format.cPointer())), nil, nil, nil) } func (this *QTextCursor) CreateListWithStyle(style QTextListFormat__Style) *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style)))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style))), nil, nil, nil) } func (this *QTextCursor) CurrentList() *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CurrentList(this.h))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextCursor_CurrentList(this.h)), nil, nil, nil) } func (this *QTextCursor) InsertTable(rows int, cols int, format *QTextTableFormat) *QTextTable { - return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer()))) + return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer())), nil, nil, nil) } func (this *QTextCursor) InsertTable2(rows int, cols int) *QTextTable { - return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols)))) + return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols))), nil, nil, nil) } func (this *QTextCursor) CurrentTable() *QTextTable { - return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_CurrentTable(this.h))) + return UnsafeNewQTextTable(unsafe.Pointer(C.QTextCursor_CurrentTable(this.h)), nil, nil, nil) } func (this *QTextCursor) InsertFrame(format *QTextFrameFormat) *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_InsertFrame(this.h, format.cPointer()))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_InsertFrame(this.h, format.cPointer())), nil, nil) } func (this *QTextCursor) CurrentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_CurrentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextCursor_CurrentFrame(this.h)), nil, nil) } func (this *QTextCursor) InsertFragment(fragment *QTextDocumentFragment) { @@ -453,7 +480,7 @@ func (this *QTextCursor) ColumnNumber() int { } func (this *QTextCursor) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextCursor_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextCursor_Document(this.h)), nil) } func (this *QTextCursor) SetPosition2(pos int, mode QTextCursor__MoveMode) { @@ -486,7 +513,7 @@ func (this *QTextCursor) InsertImage2(image *QImage, name string) { // Delete this object from C++ memory. func (this *QTextCursor) Delete() { - C.QTextCursor_Delete(this.h) + C.QTextCursor_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextcursor.h b/qt6/gen_qtextcursor.h index e60137f3..f30115ab 100644 --- a/qt6/gen_qtextcursor.h +++ b/qt6/gen_qtextcursor.h @@ -46,11 +46,11 @@ typedef struct QTextTable QTextTable; typedef struct QTextTableFormat QTextTableFormat; #endif -QTextCursor* QTextCursor_new(); -QTextCursor* QTextCursor_new2(QTextDocument* document); -QTextCursor* QTextCursor_new3(QTextFrame* frame); -QTextCursor* QTextCursor_new4(QTextBlock* block); -QTextCursor* QTextCursor_new5(QTextCursor* cursor); +void QTextCursor_new(QTextCursor** outptr_QTextCursor); +void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor); +void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor); +void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor); +void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor); void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other); void QTextCursor_Swap(QTextCursor* self, QTextCursor* other); bool QTextCursor_IsNull(const QTextCursor* self); @@ -131,7 +131,7 @@ bool QTextCursor_MovePosition2(QTextCursor* self, int op, int param2); bool QTextCursor_MovePosition3(QTextCursor* self, int op, int param2, int n); void QTextCursor_InsertMarkdown2(QTextCursor* self, struct miqt_string markdown, int features); void QTextCursor_InsertImage2(QTextCursor* self, QImage* image, struct miqt_string name); -void QTextCursor_Delete(QTextCursor* self); +void QTextCursor_Delete(QTextCursor* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextdocument.cpp b/qt6/gen_qtextdocument.cpp index 7ad71321..6cb6fd87 100644 --- a/qt6/gen_qtextdocument.cpp +++ b/qt6/gen_qtextdocument.cpp @@ -1,8 +1,11 @@ #include #include #include +#include +#include #include #include +#include #include #include #include @@ -20,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -38,26 +42,295 @@ void QAbstractUndoItem_OperatorAssign(QAbstractUndoItem* self, QAbstractUndoItem self->operator=(*param1); } -void QAbstractUndoItem_Delete(QAbstractUndoItem* self) { - delete self; +void QAbstractUndoItem_Delete(QAbstractUndoItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextDocument* QTextDocument_new() { - return new QTextDocument(); +class MiqtVirtualQTextDocument : public virtual QTextDocument { +public: + + MiqtVirtualQTextDocument(): QTextDocument() {}; + MiqtVirtualQTextDocument(const QString& text): QTextDocument(text) {}; + MiqtVirtualQTextDocument(QObject* parent): QTextDocument(parent) {}; + MiqtVirtualQTextDocument(const QString& text, QObject* parent): QTextDocument(text, parent) {}; + + virtual ~MiqtVirtualQTextDocument() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QTextDocument::clear(); + return; + } + + + miqt_exec_callback_QTextDocument_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QTextDocument::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateObject = 0; + + // Subclass to allow providing a Go implementation + virtual QTextObject* createObject(const QTextFormat& f) override { + if (handle__CreateObject == 0) { + return QTextDocument::createObject(f); + } + + const QTextFormat& f_ret = f; + // Cast returned reference into pointer + QTextFormat* sigval1 = const_cast(&f_ret); + + QTextObject* callback_return_value = miqt_exec_callback_QTextDocument_CreateObject(this, handle__CreateObject, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTextObject* virtualbase_CreateObject(QTextFormat* f) { + + return QTextDocument::createObject(*f); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QTextDocument::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextDocument_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QTextDocument::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTextDocument::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTextDocument_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTextDocument::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTextDocument::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTextDocument_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTextDocument::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTextDocument::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTextDocument_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTextDocument::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTextDocument::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTextDocument_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTextDocument::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTextDocument::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTextDocument_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTextDocument::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTextDocument::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTextDocument_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTextDocument::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTextDocument::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTextDocument_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTextDocument::disconnectNotify(*signal); + + } + +}; + +void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } -QTextDocument* QTextDocument_new2(struct miqt_string text) { +void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextDocument(text_QString); + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } -QTextDocument* QTextDocument_new3(QObject* parent) { - return new QTextDocument(parent); +void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(parent); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } -QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent) { +void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextDocument(text_QString, parent); + MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString, parent); + *outptr_QTextDocument = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTextDocument_MetaObject(const QTextDocument* self) { @@ -486,7 +759,7 @@ void QTextDocument_ContentsChange(QTextDocument* self, int from, int charsRemove } void QTextDocument_connect_ContentsChange(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::contentsChange), self, [=](int from, int charsRemoved, int charsAdded) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::contentsChange), self, [=](int from, int charsRemoved, int charsAdded) { int sigval1 = from; int sigval2 = charsRemoved; int sigval3 = charsAdded; @@ -499,7 +772,7 @@ void QTextDocument_ContentsChanged(QTextDocument* self) { } void QTextDocument_connect_ContentsChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::contentsChanged), self, [=]() { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::contentsChanged), self, [=]() { miqt_exec_callback_QTextDocument_ContentsChanged(slot); }); } @@ -509,7 +782,7 @@ void QTextDocument_UndoAvailable(QTextDocument* self, bool param1) { } void QTextDocument_connect_UndoAvailable(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::undoAvailable), self, [=](bool param1) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::undoAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextDocument_UndoAvailable(slot, sigval1); }); @@ -520,7 +793,7 @@ void QTextDocument_RedoAvailable(QTextDocument* self, bool param1) { } void QTextDocument_connect_RedoAvailable(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::redoAvailable), self, [=](bool param1) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::redoAvailable), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QTextDocument_RedoAvailable(slot, sigval1); }); @@ -531,7 +804,7 @@ void QTextDocument_UndoCommandAdded(QTextDocument* self) { } void QTextDocument_connect_UndoCommandAdded(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::undoCommandAdded), self, [=]() { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::undoCommandAdded), self, [=]() { miqt_exec_callback_QTextDocument_UndoCommandAdded(slot); }); } @@ -541,7 +814,7 @@ void QTextDocument_ModificationChanged(QTextDocument* self, bool m) { } void QTextDocument_connect_ModificationChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::modificationChanged), self, [=](bool m) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::modificationChanged), self, [=](bool m) { bool sigval1 = m; miqt_exec_callback_QTextDocument_ModificationChanged(slot, sigval1); }); @@ -552,7 +825,7 @@ void QTextDocument_CursorPositionChanged(QTextDocument* self, QTextCursor* curso } void QTextDocument_connect_CursorPositionChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::cursorPositionChanged), self, [=](const QTextCursor& cursor) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::cursorPositionChanged), self, [=](const QTextCursor& cursor) { const QTextCursor& cursor_ret = cursor; // Cast returned reference into pointer QTextCursor* sigval1 = const_cast(&cursor_ret); @@ -565,7 +838,7 @@ void QTextDocument_BlockCountChanged(QTextDocument* self, int newBlockCount) { } void QTextDocument_connect_BlockCountChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::blockCountChanged), self, [=](int newBlockCount) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::blockCountChanged), self, [=](int newBlockCount) { int sigval1 = newBlockCount; miqt_exec_callback_QTextDocument_BlockCountChanged(slot, sigval1); }); @@ -576,7 +849,7 @@ void QTextDocument_BaseUrlChanged(QTextDocument* self, QUrl* url) { } void QTextDocument_connect_BaseUrlChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::baseUrlChanged), self, [=](const QUrl& url) { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::baseUrlChanged), self, [=](const QUrl& url) { const QUrl& url_ret = url; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&url_ret); @@ -589,7 +862,7 @@ void QTextDocument_DocumentLayoutChanged(QTextDocument* self) { } void QTextDocument_connect_DocumentLayoutChanged(QTextDocument* self, intptr_t slot) { - QTextDocument::connect(self, static_cast(&QTextDocument::documentLayoutChanged), self, [=]() { + MiqtVirtualQTextDocument::connect(self, static_cast(&QTextDocument::documentLayoutChanged), self, [=]() { miqt_exec_callback_QTextDocument_DocumentLayoutChanged(slot); }); } @@ -691,7 +964,91 @@ void QTextDocument_SetModified1(QTextDocument* self, bool m) { self->setModified(m); } -void QTextDocument_Delete(QTextDocument* self) { - delete self; +void QTextDocument_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__Clear = slot; +} + +void QTextDocument_virtualbase_Clear(void* self) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_Clear(); +} + +void QTextDocument_override_virtual_CreateObject(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__CreateObject = slot; +} + +QTextObject* QTextDocument_virtualbase_CreateObject(void* self, QTextFormat* f) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_CreateObject(f); +} + +void QTextDocument_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__LoadResource = slot; +} + +QVariant* QTextDocument_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QTextDocument_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__Event = slot; +} + +bool QTextDocument_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_Event(event); +} + +void QTextDocument_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__EventFilter = slot; +} + +bool QTextDocument_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTextDocument_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__TimerEvent = slot; +} + +void QTextDocument_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_TimerEvent(event); +} + +void QTextDocument_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__ChildEvent = slot; +} + +void QTextDocument_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_ChildEvent(event); +} + +void QTextDocument_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__CustomEvent = slot; +} + +void QTextDocument_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_CustomEvent(event); +} + +void QTextDocument_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__ConnectNotify = slot; +} + +void QTextDocument_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTextDocument_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTextDocument*)(self) )->handle__DisconnectNotify = slot; +} + +void QTextDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTextDocument*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTextDocument_Delete(QTextDocument* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextdocument.go b/qt6/gen_qtextdocument.go index 442dee7e..637fff80 100644 --- a/qt6/gen_qtextdocument.go +++ b/qt6/gen_qtextdocument.go @@ -58,7 +58,8 @@ const ( ) type QAbstractUndoItem struct { - h *C.QAbstractUndoItem + h *C.QAbstractUndoItem + isSubclass bool } func (this *QAbstractUndoItem) cPointer() *C.QAbstractUndoItem { @@ -75,6 +76,7 @@ func (this *QAbstractUndoItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAbstractUndoItem constructs the type using only CGO pointers. func newQAbstractUndoItem(h *C.QAbstractUndoItem) *QAbstractUndoItem { if h == nil { return nil @@ -82,8 +84,13 @@ func newQAbstractUndoItem(h *C.QAbstractUndoItem) *QAbstractUndoItem { return &QAbstractUndoItem{h: h} } +// UnsafeNewQAbstractUndoItem constructs the type using only unsafe pointers. func UnsafeNewQAbstractUndoItem(h unsafe.Pointer) *QAbstractUndoItem { - return newQAbstractUndoItem((*C.QAbstractUndoItem)(h)) + if h == nil { + return nil + } + + return &QAbstractUndoItem{h: (*C.QAbstractUndoItem)(h)} } func (this *QAbstractUndoItem) Undo() { @@ -100,7 +107,7 @@ func (this *QAbstractUndoItem) OperatorAssign(param1 *QAbstractUndoItem) { // Delete this object from C++ memory. func (this *QAbstractUndoItem) Delete() { - C.QAbstractUndoItem_Delete(this.h) + C.QAbstractUndoItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -113,7 +120,8 @@ func (this *QAbstractUndoItem) GoGC() { } type QTextDocument struct { - h *C.QTextDocument + h *C.QTextDocument + isSubclass bool *QObject } @@ -131,21 +139,34 @@ func (this *QTextDocument) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextDocument(h *C.QTextDocument) *QTextDocument { +// newQTextDocument constructs the type using only CGO pointers. +func newQTextDocument(h *C.QTextDocument, h_QObject *C.QObject) *QTextDocument { if h == nil { return nil } - return &QTextDocument{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTextDocument{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTextDocument(h unsafe.Pointer) *QTextDocument { - return newQTextDocument((*C.QTextDocument)(h)) +// UnsafeNewQTextDocument constructs the type using only unsafe pointers. +func UnsafeNewQTextDocument(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextDocument { + if h == nil { + return nil + } + + return &QTextDocument{h: (*C.QTextDocument)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTextDocument constructs a new QTextDocument object. func NewQTextDocument() *QTextDocument { - ret := C.QTextDocument_new() - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new(&outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTextDocument2 constructs a new QTextDocument object. @@ -154,14 +175,24 @@ func NewQTextDocument2(text string) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextDocument_new2(text_ms) - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new2(text_ms, &outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTextDocument3 constructs a new QTextDocument object. func NewQTextDocument3(parent *QObject) *QTextDocument { - ret := C.QTextDocument_new3(parent.cPointer()) - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new3(parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTextDocument4 constructs a new QTextDocument object. @@ -170,8 +201,13 @@ func NewQTextDocument4(text string, parent *QObject) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextDocument_new4(text_ms, parent.cPointer()) - return newQTextDocument(ret) + var outptr_QTextDocument *C.QTextDocument = nil + var outptr_QObject *C.QObject = nil + + C.QTextDocument_new4(text_ms, parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) + ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextDocument) MetaObject() *QMetaObject { @@ -194,7 +230,7 @@ func QTextDocument_Tr(s string) string { } func (this *QTextDocument) Clone() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone(this.h)), nil) } func (this *QTextDocument) IsEmpty() bool { @@ -238,7 +274,7 @@ func (this *QTextDocument) SetDocumentLayout(layout *QAbstractTextDocumentLayout } func (this *QTextDocument) DocumentLayout() *QAbstractTextDocumentLayout { - return UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(C.QTextDocument_DocumentLayout(this.h))) + return UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(C.QTextDocument_DocumentLayout(this.h)), nil) } func (this *QTextDocument) SetMetaInformation(info QTextDocument__MetaInformation, param2 string) { @@ -352,19 +388,19 @@ func (this *QTextDocument) Find3(expr *QRegularExpression, cursor *QTextCursor) } func (this *QTextDocument) FrameAt(pos int) *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_FrameAt(this.h, (C.int)(pos)))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_FrameAt(this.h, (C.int)(pos))), nil, nil) } func (this *QTextDocument) RootFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_RootFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextDocument_RootFrame(this.h)), nil, nil) } func (this *QTextDocument) Object(objectIndex int) *QTextObject { - return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_Object(this.h, (C.int)(objectIndex)))) + return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_Object(this.h, (C.int)(objectIndex))), nil) } func (this *QTextDocument) ObjectForFormat(param1 *QTextFormat) *QTextObject { - return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer()))) + return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer())), nil) } func (this *QTextDocument) FindBlock(pos int) *QTextBlock { @@ -872,7 +908,7 @@ func QTextDocument_Tr3(s string, c string, n int) string { } func (this *QTextDocument) Clone1(parent *QObject) *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone1(this.h, parent.cPointer()))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextDocument_Clone1(this.h, parent.cPointer())), nil) } func (this *QTextDocument) ToMarkdown1(features QTextDocument__MarkdownFeature) string { @@ -956,9 +992,249 @@ func (this *QTextDocument) SetModified1(m bool) { C.QTextDocument_SetModified1(this.h, (C.bool)(m)) } +func (this *QTextDocument) callVirtualBase_Clear() { + + C.QTextDocument_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QTextDocument) OnClear(slot func(super func())) { + C.QTextDocument_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_Clear +func miqt_exec_callback_QTextDocument_Clear(self *C.QTextDocument, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTextDocument{h: self}).callVirtualBase_Clear) + +} + +func (this *QTextDocument) callVirtualBase_CreateObject(f *QTextFormat) *QTextObject { + + return UnsafeNewQTextObject(unsafe.Pointer(C.QTextDocument_virtualbase_CreateObject(unsafe.Pointer(this.h), f.cPointer())), nil) +} +func (this *QTextDocument) OnCreateObject(slot func(super func(f *QTextFormat) *QTextObject, f *QTextFormat) *QTextObject) { + C.QTextDocument_override_virtual_CreateObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_CreateObject +func miqt_exec_callback_QTextDocument_CreateObject(self *C.QTextDocument, cb C.intptr_t, f *C.QTextFormat) *C.QTextObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(f *QTextFormat) *QTextObject, f *QTextFormat) *QTextObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextFormat(unsafe.Pointer(f)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_CreateObject, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTextDocument) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QTextDocument_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextDocument) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QTextDocument_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_LoadResource +func miqt_exec_callback_QTextDocument_LoadResource(self *C.QTextDocument, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTextDocument) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTextDocument_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTextDocument) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTextDocument_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_Event +func miqt_exec_callback_QTextDocument_Event(self *C.QTextDocument, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextDocument) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTextDocument_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTextDocument) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTextDocument_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_EventFilter +func miqt_exec_callback_QTextDocument_EventFilter(self *C.QTextDocument, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTextDocument{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextDocument) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTextDocument_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTextDocument) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTextDocument_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_TimerEvent +func miqt_exec_callback_QTextDocument_TimerEvent(self *C.QTextDocument, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTextDocument{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTextDocument_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTextDocument) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTextDocument_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_ChildEvent +func miqt_exec_callback_QTextDocument_ChildEvent(self *C.QTextDocument, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTextDocument{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTextDocument_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTextDocument) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTextDocument_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_CustomEvent +func miqt_exec_callback_QTextDocument_CustomEvent(self *C.QTextDocument, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTextDocument{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTextDocument_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTextDocument) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTextDocument_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_ConnectNotify +func miqt_exec_callback_QTextDocument_ConnectNotify(self *C.QTextDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTextDocument{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTextDocument) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTextDocument_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTextDocument) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTextDocument_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextDocument_DisconnectNotify +func miqt_exec_callback_QTextDocument_DisconnectNotify(self *C.QTextDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTextDocument{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTextDocument) Delete() { - C.QTextDocument_Delete(this.h) + C.QTextDocument_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextdocument.h b/qt6/gen_qtextdocument.h index 7068323f..6f2215f7 100644 --- a/qt6/gen_qtextdocument.h +++ b/qt6/gen_qtextdocument.h @@ -18,7 +18,10 @@ extern "C" { class QAbstractTextDocumentLayout; class QAbstractUndoItem; class QChar; +class QChildEvent; +class QEvent; class QFont; +class QMetaMethod; class QMetaObject; class QObject; class QPagedPaintDevice; @@ -33,13 +36,17 @@ class QTextFormat; class QTextFrame; class QTextObject; class QTextOption; +class QTimerEvent; class QUrl; class QVariant; #else typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractUndoItem QAbstractUndoItem; typedef struct QChar QChar; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPagedPaintDevice QPagedPaintDevice; @@ -54,6 +61,7 @@ typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; typedef struct QTextObject QTextObject; typedef struct QTextOption QTextOption; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif @@ -61,12 +69,12 @@ typedef struct QVariant QVariant; void QAbstractUndoItem_Undo(QAbstractUndoItem* self); void QAbstractUndoItem_Redo(QAbstractUndoItem* self); void QAbstractUndoItem_OperatorAssign(QAbstractUndoItem* self, QAbstractUndoItem* param1); -void QAbstractUndoItem_Delete(QAbstractUndoItem* self); +void QAbstractUndoItem_Delete(QAbstractUndoItem* self, bool isSubclass); -QTextDocument* QTextDocument_new(); -QTextDocument* QTextDocument_new2(struct miqt_string text); -QTextDocument* QTextDocument_new3(QObject* parent); -QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent); +void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); QMetaObject* QTextDocument_MetaObject(const QTextDocument* self); void* QTextDocument_Metacast(QTextDocument* self, const char* param1); struct miqt_string QTextDocument_Tr(const char* s); @@ -178,6 +186,8 @@ void QTextDocument_Undo2(QTextDocument* self); void QTextDocument_Redo2(QTextDocument* self); void QTextDocument_AppendUndoItem(QTextDocument* self, QAbstractUndoItem* param1); void QTextDocument_SetModified(QTextDocument* self); +QTextObject* QTextDocument_CreateObject(QTextDocument* self, QTextFormat* f); +QVariant* QTextDocument_LoadResource(QTextDocument* self, int typeVal, QUrl* name); struct miqt_string QTextDocument_Tr2(const char* s, const char* c); struct miqt_string QTextDocument_Tr3(const char* s, const char* c, int n); QTextDocument* QTextDocument_Clone1(const QTextDocument* self, QObject* parent); @@ -192,7 +202,27 @@ QTextCursor* QTextDocument_Find35(const QTextDocument* self, QRegularExpression* void QTextDocument_DrawContents2(QTextDocument* self, QPainter* painter, QRectF* rect); void QTextDocument_ClearUndoRedoStacks1(QTextDocument* self, int historyToClear); void QTextDocument_SetModified1(QTextDocument* self, bool m); -void QTextDocument_Delete(QTextDocument* self); +void QTextDocument_override_virtual_Clear(void* self, intptr_t slot); +void QTextDocument_virtualbase_Clear(void* self); +void QTextDocument_override_virtual_CreateObject(void* self, intptr_t slot); +QTextObject* QTextDocument_virtualbase_CreateObject(void* self, QTextFormat* f); +void QTextDocument_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QTextDocument_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QTextDocument_override_virtual_Event(void* self, intptr_t slot); +bool QTextDocument_virtualbase_Event(void* self, QEvent* event); +void QTextDocument_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTextDocument_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTextDocument_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTextDocument_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTextDocument_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTextDocument_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTextDocument_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTextDocument_virtualbase_CustomEvent(void* self, QEvent* event); +void QTextDocument_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTextDocument_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTextDocument_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTextDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTextDocument_Delete(QTextDocument* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextdocumentfragment.cpp b/qt6/gen_qtextdocumentfragment.cpp index 6df3732f..cd103ef9 100644 --- a/qt6/gen_qtextdocumentfragment.cpp +++ b/qt6/gen_qtextdocumentfragment.cpp @@ -8,20 +8,24 @@ #include "gen_qtextdocumentfragment.h" #include "_cgo_export.h" -QTextDocumentFragment* QTextDocumentFragment_new() { - return new QTextDocumentFragment(); +void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(); + *outptr_QTextDocumentFragment = ret; } -QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document) { - return new QTextDocumentFragment(document); +void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(document); + *outptr_QTextDocumentFragment = ret; } -QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal) { - return new QTextDocumentFragment(*rangeVal); +void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(*rangeVal); + *outptr_QTextDocumentFragment = ret; } -QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs) { - return new QTextDocumentFragment(*rhs); +void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment) { + QTextDocumentFragment* ret = new QTextDocumentFragment(*rhs); + *outptr_QTextDocumentFragment = ret; } void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs) { @@ -112,7 +116,11 @@ QTextDocumentFragment* QTextDocumentFragment_FromMarkdown2(struct miqt_string ma return new QTextDocumentFragment(QTextDocumentFragment::fromMarkdown(markdown_QString, static_cast(features))); } -void QTextDocumentFragment_Delete(QTextDocumentFragment* self) { - delete self; +void QTextDocumentFragment_Delete(QTextDocumentFragment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextdocumentfragment.go b/qt6/gen_qtextdocumentfragment.go index 8aa3dc31..3655d023 100644 --- a/qt6/gen_qtextdocumentfragment.go +++ b/qt6/gen_qtextdocumentfragment.go @@ -14,7 +14,8 @@ import ( ) type QTextDocumentFragment struct { - h *C.QTextDocumentFragment + h *C.QTextDocumentFragment + isSubclass bool } func (this *QTextDocumentFragment) cPointer() *C.QTextDocumentFragment { @@ -31,6 +32,7 @@ func (this *QTextDocumentFragment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextDocumentFragment constructs the type using only CGO pointers. func newQTextDocumentFragment(h *C.QTextDocumentFragment) *QTextDocumentFragment { if h == nil { return nil @@ -38,32 +40,53 @@ func newQTextDocumentFragment(h *C.QTextDocumentFragment) *QTextDocumentFragment return &QTextDocumentFragment{h: h} } +// UnsafeNewQTextDocumentFragment constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentFragment(h unsafe.Pointer) *QTextDocumentFragment { - return newQTextDocumentFragment((*C.QTextDocumentFragment)(h)) + if h == nil { + return nil + } + + return &QTextDocumentFragment{h: (*C.QTextDocumentFragment)(h)} } // NewQTextDocumentFragment constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment() *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new() - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new(&outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } // NewQTextDocumentFragment2 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment2(document *QTextDocument) *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new2(document.cPointer()) - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new2(document.cPointer(), &outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } // NewQTextDocumentFragment3 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment3(rangeVal *QTextCursor) *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new3(rangeVal.cPointer()) - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new3(rangeVal.cPointer(), &outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } // NewQTextDocumentFragment4 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment4(rhs *QTextDocumentFragment) *QTextDocumentFragment { - ret := C.QTextDocumentFragment_new4(rhs.cPointer()) - return newQTextDocumentFragment(ret) + var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil + + C.QTextDocumentFragment_new4(rhs.cPointer(), &outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret.isSubclass = true + return ret } func (this *QTextDocumentFragment) OperatorAssign(rhs *QTextDocumentFragment) { @@ -166,7 +189,7 @@ func QTextDocumentFragment_FromMarkdown2(markdown string, features QTextDocument // Delete this object from C++ memory. func (this *QTextDocumentFragment) Delete() { - C.QTextDocumentFragment_Delete(this.h) + C.QTextDocumentFragment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextdocumentfragment.h b/qt6/gen_qtextdocumentfragment.h index 45b8d407..de32d868 100644 --- a/qt6/gen_qtextdocumentfragment.h +++ b/qt6/gen_qtextdocumentfragment.h @@ -24,10 +24,10 @@ typedef struct QTextDocument QTextDocument; typedef struct QTextDocumentFragment QTextDocumentFragment; #endif -QTextDocumentFragment* QTextDocumentFragment_new(); -QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document); -QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal); -QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs); +void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment); +void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment); +void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment); +void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment); void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs); bool QTextDocumentFragment_IsEmpty(const QTextDocumentFragment* self); struct miqt_string QTextDocumentFragment_ToPlainText(const QTextDocumentFragment* self); @@ -40,7 +40,7 @@ QTextDocumentFragment* QTextDocumentFragment_FromMarkdown(struct miqt_string mar struct miqt_string QTextDocumentFragment_ToMarkdown1(const QTextDocumentFragment* self, int features); QTextDocumentFragment* QTextDocumentFragment_FromHtml2(struct miqt_string html, QTextDocument* resourceProvider); QTextDocumentFragment* QTextDocumentFragment_FromMarkdown2(struct miqt_string markdown, int features); -void QTextDocumentFragment_Delete(QTextDocumentFragment* self); +void QTextDocumentFragment_Delete(QTextDocumentFragment* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextdocumentwriter.cpp b/qt6/gen_qtextdocumentwriter.cpp index ff906c48..39266931 100644 --- a/qt6/gen_qtextdocumentwriter.cpp +++ b/qt6/gen_qtextdocumentwriter.cpp @@ -11,24 +11,28 @@ #include "gen_qtextdocumentwriter.h" #include "_cgo_export.h" -QTextDocumentWriter* QTextDocumentWriter_new() { - return new QTextDocumentWriter(); +void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter) { + QTextDocumentWriter* ret = new QTextDocumentWriter(); + *outptr_QTextDocumentWriter = ret; } -QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format) { +void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { QByteArray format_QByteArray(format.data, format.len); - return new QTextDocumentWriter(device, format_QByteArray); + QTextDocumentWriter* ret = new QTextDocumentWriter(device, format_QByteArray); + *outptr_QTextDocumentWriter = ret; } -QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName) { +void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - return new QTextDocumentWriter(fileName_QString); + QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString); + *outptr_QTextDocumentWriter = ret; } -QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format) { +void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - return new QTextDocumentWriter(fileName_QString, format_QByteArray); + QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString, format_QByteArray); + *outptr_QTextDocumentWriter = ret; } void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format) { @@ -95,7 +99,11 @@ struct miqt_array /* of struct miqt_string */ QTextDocumentWriter_SupportedDocu return _out; } -void QTextDocumentWriter_Delete(QTextDocumentWriter* self) { - delete self; +void QTextDocumentWriter_Delete(QTextDocumentWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextdocumentwriter.go b/qt6/gen_qtextdocumentwriter.go index 2d08e9ff..74cccae9 100644 --- a/qt6/gen_qtextdocumentwriter.go +++ b/qt6/gen_qtextdocumentwriter.go @@ -14,7 +14,8 @@ import ( ) type QTextDocumentWriter struct { - h *C.QTextDocumentWriter + h *C.QTextDocumentWriter + isSubclass bool } func (this *QTextDocumentWriter) cPointer() *C.QTextDocumentWriter { @@ -31,6 +32,7 @@ func (this *QTextDocumentWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextDocumentWriter constructs the type using only CGO pointers. func newQTextDocumentWriter(h *C.QTextDocumentWriter) *QTextDocumentWriter { if h == nil { return nil @@ -38,14 +40,23 @@ func newQTextDocumentWriter(h *C.QTextDocumentWriter) *QTextDocumentWriter { return &QTextDocumentWriter{h: h} } +// UnsafeNewQTextDocumentWriter constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentWriter(h unsafe.Pointer) *QTextDocumentWriter { - return newQTextDocumentWriter((*C.QTextDocumentWriter)(h)) + if h == nil { + return nil + } + + return &QTextDocumentWriter{h: (*C.QTextDocumentWriter)(h)} } // NewQTextDocumentWriter constructs a new QTextDocumentWriter object. func NewQTextDocumentWriter() *QTextDocumentWriter { - ret := C.QTextDocumentWriter_new() - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new(&outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } // NewQTextDocumentWriter2 constructs a new QTextDocumentWriter object. @@ -53,8 +64,12 @@ func NewQTextDocumentWriter2(device *QIODevice, format []byte) *QTextDocumentWri format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QTextDocumentWriter_new2(device.cPointer(), format_alias) - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new2(device.cPointer(), format_alias, &outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } // NewQTextDocumentWriter3 constructs a new QTextDocumentWriter object. @@ -63,8 +78,12 @@ func NewQTextDocumentWriter3(fileName string) *QTextDocumentWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - ret := C.QTextDocumentWriter_new3(fileName_ms) - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new3(fileName_ms, &outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } // NewQTextDocumentWriter4 constructs a new QTextDocumentWriter object. @@ -76,8 +95,12 @@ func NewQTextDocumentWriter4(fileName string, format []byte) *QTextDocumentWrite format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - ret := C.QTextDocumentWriter_new4(fileName_ms, format_alias) - return newQTextDocumentWriter(ret) + var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil + + C.QTextDocumentWriter_new4(fileName_ms, format_alias, &outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret.isSubclass = true + return ret } func (this *QTextDocumentWriter) SetFormat(format []byte) { @@ -99,7 +122,7 @@ func (this *QTextDocumentWriter) SetDevice(device *QIODevice) { } func (this *QTextDocumentWriter) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QTextDocumentWriter_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QTextDocumentWriter_Device(this.h)), nil, nil) } func (this *QTextDocumentWriter) SetFileName(fileName string) { @@ -140,7 +163,7 @@ func QTextDocumentWriter_SupportedDocumentFormats() [][]byte { // Delete this object from C++ memory. func (this *QTextDocumentWriter) Delete() { - C.QTextDocumentWriter_Delete(this.h) + C.QTextDocumentWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextdocumentwriter.h b/qt6/gen_qtextdocumentwriter.h index 48d1ac30..40e8ad69 100644 --- a/qt6/gen_qtextdocumentwriter.h +++ b/qt6/gen_qtextdocumentwriter.h @@ -28,10 +28,10 @@ typedef struct QTextDocumentFragment QTextDocumentFragment; typedef struct QTextDocumentWriter QTextDocumentWriter; #endif -QTextDocumentWriter* QTextDocumentWriter_new(); -QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format); -QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName); -QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format); +void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter); +void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); +void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter); +void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format); struct miqt_string QTextDocumentWriter_Format(const QTextDocumentWriter* self); void QTextDocumentWriter_SetDevice(QTextDocumentWriter* self, QIODevice* device); @@ -41,7 +41,7 @@ struct miqt_string QTextDocumentWriter_FileName(const QTextDocumentWriter* self) bool QTextDocumentWriter_Write(QTextDocumentWriter* self, QTextDocument* document); bool QTextDocumentWriter_WriteWithFragment(QTextDocumentWriter* self, QTextDocumentFragment* fragment); struct miqt_array /* of struct miqt_string */ QTextDocumentWriter_SupportedDocumentFormats(); -void QTextDocumentWriter_Delete(QTextDocumentWriter* self); +void QTextDocumentWriter_Delete(QTextDocumentWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextedit.cpp b/qt6/gen_qtextedit.cpp index c5054524..39a2e244 100644 --- a/qt6/gen_qtextedit.cpp +++ b/qt6/gen_qtextedit.cpp @@ -1,12 +1,31 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include +#include +#include +#include #include +#include +#include #include #include #include +#include +#include +#include #include #include #include @@ -15,29 +34,900 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QTextEdit__ExtraSelection +#include #include #include +#include #include #include #include "gen_qtextedit.h" #include "_cgo_export.h" -QTextEdit* QTextEdit_new(QWidget* parent) { - return new QTextEdit(parent); +class MiqtVirtualQTextEdit : public virtual QTextEdit { +public: + + MiqtVirtualQTextEdit(QWidget* parent): QTextEdit(parent) {}; + MiqtVirtualQTextEdit(): QTextEdit() {}; + MiqtVirtualQTextEdit(const QString& text): QTextEdit(text) {}; + MiqtVirtualQTextEdit(const QString& text, QWidget* parent): QTextEdit(text, parent) {}; + + virtual ~MiqtVirtualQTextEdit() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadResource = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant loadResource(int typeVal, const QUrl& name) override { + if (handle__LoadResource == 0) { + return QTextEdit::loadResource(typeVal, name); + } + + int sigval1 = typeVal; + const QUrl& name_ret = name; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&name_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextEdit_LoadResource(this, handle__LoadResource, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_LoadResource(int typeVal, QUrl* name) { + + return new QVariant(QTextEdit::loadResource(static_cast(typeVal), *name)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QTextEdit::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTextEdit_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QTextEdit::inputMethodQuery(static_cast(property))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTextEdit::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QTextEdit_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QTextEdit::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QTextEdit::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QTextEdit::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QTextEdit::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QTextEdit::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QTextEdit::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QTextEdit::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QTextEdit::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QTextEdit::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QTextEdit::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QTextEdit::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* e) override { + if (handle__MousePressEvent == 0) { + QTextEdit::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QTextEdit::mousePressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QTextEdit::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QTextEdit::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QTextEdit::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QTextEdit::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* e) override { + if (handle__MouseDoubleClickEvent == 0) { + QTextEdit::mouseDoubleClickEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* e) { + + QTextEdit::mouseDoubleClickEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTextEdit::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTextEdit_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTextEdit::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* e) override { + if (handle__ContextMenuEvent == 0) { + QTextEdit::contextMenuEvent(e); + return; + } + + QContextMenuEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* e) { + + QTextEdit::contextMenuEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QTextEdit::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QTextEdit::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QTextEdit::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QTextEdit::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QTextEdit::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QTextEdit::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QTextEdit::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QTextEdit::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QTextEdit::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QTextEdit::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QTextEdit::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QTextEdit::focusOutEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QTextEdit::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QTextEdit_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QTextEdit::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* e) override { + if (handle__ChangeEvent == 0) { + QTextEdit::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QTextEdit::changeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QTextEdit::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QTextEdit_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QTextEdit::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateMimeDataFromSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* createMimeDataFromSelection() const override { + if (handle__CreateMimeDataFromSelection == 0) { + return QTextEdit::createMimeDataFromSelection(); + } + + + QMimeData* callback_return_value = miqt_exec_callback_QTextEdit_CreateMimeDataFromSelection(const_cast(this), handle__CreateMimeDataFromSelection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_CreateMimeDataFromSelection() const { + + return QTextEdit::createMimeDataFromSelection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanInsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canInsertFromMimeData(const QMimeData* source) const override { + if (handle__CanInsertFromMimeData == 0) { + return QTextEdit::canInsertFromMimeData(source); + } + + QMimeData* sigval1 = (QMimeData*) source; + + bool callback_return_value = miqt_exec_callback_QTextEdit_CanInsertFromMimeData(const_cast(this), handle__CanInsertFromMimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanInsertFromMimeData(QMimeData* source) const { + + return QTextEdit::canInsertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertFromMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual void insertFromMimeData(const QMimeData* source) override { + if (handle__InsertFromMimeData == 0) { + QTextEdit::insertFromMimeData(source); + return; + } + + QMimeData* sigval1 = (QMimeData*) source; + + miqt_exec_callback_QTextEdit_InsertFromMimeData(this, handle__InsertFromMimeData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InsertFromMimeData(QMimeData* source) { + + QTextEdit::insertFromMimeData(source); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QTextEdit::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QTextEdit_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QTextEdit::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTextEdit::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTextEdit_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTextEdit::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoSetTextCursor = 0; + + // Subclass to allow providing a Go implementation + virtual void doSetTextCursor(const QTextCursor& cursor) override { + if (handle__DoSetTextCursor == 0) { + QTextEdit::doSetTextCursor(cursor); + return; + } + + const QTextCursor& cursor_ret = cursor; + // Cast returned reference into pointer + QTextCursor* sigval1 = const_cast(&cursor_ret); + + miqt_exec_callback_QTextEdit_DoSetTextCursor(this, handle__DoSetTextCursor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoSetTextCursor(QTextCursor* cursor) { + + QTextEdit::doSetTextCursor(*cursor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QTextEdit::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTextEdit_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QTextEdit::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QTextEdit::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTextEdit_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QTextEdit::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__SetupViewport == 0) { + QTextEdit::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QTextEdit_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QTextEdit::setupViewport(viewport); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QTextEdit::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QTextEdit_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QTextEdit::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__ViewportEvent == 0) { + return QTextEdit::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QTextEdit_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* param1) { + + return QTextEdit::viewportEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTextEdit::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTextEdit_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTextEdit::viewportSizeHint()); + + } + +}; + +void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(parent); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextEdit* QTextEdit_new2() { - return new QTextEdit(); +void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextEdit* QTextEdit_new3(struct miqt_string text) { +void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextEdit(text_QString); + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent) { +void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextEdit(text_QString, parent); + MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString, parent); + *outptr_QTextEdit = ret; + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QTextEdit_MetaObject(const QTextEdit* self) { @@ -507,7 +1397,7 @@ void QTextEdit_TextChanged(QTextEdit* self) { } void QTextEdit_connect_TextChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::textChanged), self, [=]() { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::textChanged), self, [=]() { miqt_exec_callback_QTextEdit_TextChanged(slot); }); } @@ -517,7 +1407,7 @@ void QTextEdit_UndoAvailable(QTextEdit* self, bool b) { } void QTextEdit_connect_UndoAvailable(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::undoAvailable), self, [=](bool b) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::undoAvailable), self, [=](bool b) { bool sigval1 = b; miqt_exec_callback_QTextEdit_UndoAvailable(slot, sigval1); }); @@ -528,7 +1418,7 @@ void QTextEdit_RedoAvailable(QTextEdit* self, bool b) { } void QTextEdit_connect_RedoAvailable(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::redoAvailable), self, [=](bool b) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::redoAvailable), self, [=](bool b) { bool sigval1 = b; miqt_exec_callback_QTextEdit_RedoAvailable(slot, sigval1); }); @@ -539,7 +1429,7 @@ void QTextEdit_CurrentCharFormatChanged(QTextEdit* self, QTextCharFormat* format } void QTextEdit_connect_CurrentCharFormatChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::currentCharFormatChanged), self, [=](const QTextCharFormat& format) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::currentCharFormatChanged), self, [=](const QTextCharFormat& format) { const QTextCharFormat& format_ret = format; // Cast returned reference into pointer QTextCharFormat* sigval1 = const_cast(&format_ret); @@ -552,7 +1442,7 @@ void QTextEdit_CopyAvailable(QTextEdit* self, bool b) { } void QTextEdit_connect_CopyAvailable(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::copyAvailable), self, [=](bool b) { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::copyAvailable), self, [=](bool b) { bool sigval1 = b; miqt_exec_callback_QTextEdit_CopyAvailable(slot, sigval1); }); @@ -563,7 +1453,7 @@ void QTextEdit_SelectionChanged(QTextEdit* self) { } void QTextEdit_connect_SelectionChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::selectionChanged), self, [=]() { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::selectionChanged), self, [=]() { miqt_exec_callback_QTextEdit_SelectionChanged(slot); }); } @@ -573,7 +1463,7 @@ void QTextEdit_CursorPositionChanged(QTextEdit* self) { } void QTextEdit_connect_CursorPositionChanged(QTextEdit* self, intptr_t slot) { - QTextEdit::connect(self, static_cast(&QTextEdit::cursorPositionChanged), self, [=]() { + MiqtVirtualQTextEdit::connect(self, static_cast(&QTextEdit::cursorPositionChanged), self, [=]() { miqt_exec_callback_QTextEdit_CursorPositionChanged(slot); }); } @@ -632,19 +1522,308 @@ void QTextEdit_ZoomOut1(QTextEdit* self, int rangeVal) { self->zoomOut(static_cast(rangeVal)); } -void QTextEdit_Delete(QTextEdit* self) { - delete self; +void QTextEdit_override_virtual_LoadResource(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__LoadResource = slot; +} + +QVariant* QTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_LoadResource(typeVal, name); +} + +void QTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QTextEdit_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_InputMethodQuery(property); } -QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1) { - return new QTextEdit::ExtraSelection(*param1); +void QTextEdit_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__Event = slot; +} + +bool QTextEdit_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_Event(e); +} + +void QTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__TimerEvent = slot; +} + +void QTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_TimerEvent(e); +} + +void QTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__KeyPressEvent = slot; +} + +void QTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ResizeEvent = slot; +} + +void QTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ResizeEvent(e); +} + +void QTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__PaintEvent = slot; +} + +void QTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_PaintEvent(e); +} + +void QTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MousePressEvent = slot; +} + +void QTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MousePressEvent(e); +} + +void QTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_MouseDoubleClickEvent(e); +} + +void QTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ContextMenuEvent = slot; +} + +void QTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ContextMenuEvent(e); +} + +void QTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DragEnterEvent = slot; +} + +void QTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DragMoveEvent = slot; +} + +void QTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QTextEdit_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DropEvent = slot; +} + +void QTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DropEvent(e); +} + +void QTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__FocusInEvent = slot; +} + +void QTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_FocusInEvent(e); +} + +void QTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__FocusOutEvent = slot; +} + +void QTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ShowEvent = slot; +} + +void QTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ShowEvent(param1); +} + +void QTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ChangeEvent = slot; +} + +void QTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ChangeEvent(e); +} + +void QTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__WheelEvent = slot; +} + +void QTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_WheelEvent(e); +} + +void QTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__CreateMimeDataFromSelection = slot; +} + +QMimeData* QTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_CreateMimeDataFromSelection(); +} + +void QTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__CanInsertFromMimeData = slot; +} + +bool QTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_CanInsertFromMimeData(source); +} + +void QTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__InsertFromMimeData = slot; +} + +void QTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_InsertFromMimeData(source); +} + +void QTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__InputMethodEvent = slot; +} + +void QTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__DoSetTextCursor = slot; +} + +void QTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_DoSetTextCursor(cursor); +} + +void QTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QTextEdit_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QTextEdit_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__SizeHint = slot; +} + +QSize* QTextEdit_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_SizeHint(); +} + +void QTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__SetupViewport = slot; +} + +void QTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QTextEdit_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__EventFilter = slot; +} + +bool QTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ViewportEvent = slot; +} + +bool QTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQTextEdit*)(self) )->virtualbase_ViewportEvent(param1); +} + +void QTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTextEdit*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTextEdit_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTextEdit*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTextEdit_Delete(QTextEdit* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection) { + QTextEdit::ExtraSelection* ret = new QTextEdit::ExtraSelection(*param1); + *outptr_QTextEdit__ExtraSelection = ret; } void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1) { self->operator=(*param1); } -void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self) { - delete self; +void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextedit.go b/qt6/gen_qtextedit.go index 70204a37..4c3a941e 100644 --- a/qt6/gen_qtextedit.go +++ b/qt6/gen_qtextedit.go @@ -32,7 +32,8 @@ const ( ) type QTextEdit struct { - h *C.QTextEdit + h *C.QTextEdit + isSubclass bool *QAbstractScrollArea } @@ -50,27 +51,53 @@ func (this *QTextEdit) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextEdit(h *C.QTextEdit) *QTextEdit { +// newQTextEdit constructs the type using only CGO pointers. +func newQTextEdit(h *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextEdit { if h == nil { return nil } - return &QTextEdit{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))} + return &QTextEdit{h: h, + QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTextEdit(h unsafe.Pointer) *QTextEdit { - return newQTextEdit((*C.QTextEdit)(h)) +// UnsafeNewQTextEdit constructs the type using only unsafe pointers. +func UnsafeNewQTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextEdit { + if h == nil { + return nil + } + + return &QTextEdit{h: (*C.QTextEdit)(h), + QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTextEdit constructs a new QTextEdit object. func NewQTextEdit(parent *QWidget) *QTextEdit { - ret := C.QTextEdit_new(parent.cPointer()) - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new(parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextEdit2 constructs a new QTextEdit object. func NewQTextEdit2() *QTextEdit { - ret := C.QTextEdit_new2() - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new2(&outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextEdit3 constructs a new QTextEdit object. @@ -79,8 +106,17 @@ func NewQTextEdit3(text string) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextEdit_new3(text_ms) - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new3(text_ms, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTextEdit4 constructs a new QTextEdit object. @@ -89,8 +125,17 @@ func NewQTextEdit4(text string, parent *QWidget) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextEdit_new4(text_ms, parent.cPointer()) - return newQTextEdit(ret) + var outptr_QTextEdit *C.QTextEdit = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTextEdit_new4(text_ms, parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTextEdit) MetaObject() *QMetaObject { @@ -117,7 +162,7 @@ func (this *QTextEdit) SetDocument(document *QTextDocument) { } func (this *QTextEdit) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextEdit_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextEdit_Document(this.h)), nil) } func (this *QTextEdit) SetPlaceholderText(placeholderText string) { @@ -220,7 +265,7 @@ func (this *QTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { func (this *QTextEdit) CurrentCharFormat() *QTextCharFormat { _ret := C.QTextEdit_CurrentCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -333,11 +378,11 @@ func (this *QTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QTextEdit) CreateStandardContextMenu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenu(this.h)), nil, nil, nil) } func (this *QTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()))) + return UnsafeNewQMenu(unsafe.Pointer(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())), nil, nil, nil) } func (this *QTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -661,7 +706,7 @@ func miqt_exec_callback_QTextEdit_CurrentCharFormatChanged(cb C.intptr_t, format } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQTextCharFormat(unsafe.Pointer(format)) + slotval1 := UnsafeNewQTextCharFormat(unsafe.Pointer(format), nil) gofunc(slotval1) } @@ -773,53 +818,898 @@ func (this *QTextEdit) ZoomOut1(rangeVal int) { C.QTextEdit_ZoomOut1(this.h, (C.int)(rangeVal)) } -// Delete this object from C++ memory. -func (this *QTextEdit) Delete() { - C.QTextEdit_Delete(this.h) +func (this *QTextEdit) callVirtualBase_LoadResource(typeVal int, name *QUrl) *QVariant { + + _ret := C.QTextEdit_virtualbase_LoadResource(unsafe.Pointer(this.h), (C.int)(typeVal), name.cPointer()) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnLoadResource(slot func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) { + C.QTextEdit_override_virtual_LoadResource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QTextEdit) GoGC() { - runtime.SetFinalizer(this, func(this *QTextEdit) { - this.Delete() - runtime.KeepAlive(this.h) - }) +//export miqt_exec_callback_QTextEdit_LoadResource +func miqt_exec_callback_QTextEdit_LoadResource(self *C.QTextEdit, cb C.intptr_t, typeVal C.int, name *C.QUrl) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal int, name *QUrl) *QVariant, typeVal int, name *QUrl) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := UnsafeNewQUrl(unsafe.Pointer(name)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_LoadResource, slotval1, slotval2) + + return virtualReturn.cPointer() + } -type QTextEdit__ExtraSelection struct { - h *C.QTextEdit__ExtraSelection +func (this *QTextEdit) callVirtualBase_InputMethodQuery(property InputMethodQuery) *QVariant { + + _ret := C.QTextEdit_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnInputMethodQuery(slot func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) { + C.QTextEdit_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTextEdit__ExtraSelection) cPointer() *C.QTextEdit__ExtraSelection { - if this == nil { - return nil +//export miqt_exec_callback_QTextEdit_InputMethodQuery +func miqt_exec_callback_QTextEdit_InputMethodQuery(self *C.QTextEdit, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property InputMethodQuery) *QVariant, property InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(property) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + } -func (this *QTextEdit__ExtraSelection) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil +func (this *QTextEdit) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTextEdit_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTextEdit) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTextEdit_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_Event +func miqt_exec_callback_QTextEdit_Event(self *C.QTextEdit, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return unsafe.Pointer(this.h) + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func newQTextEdit__ExtraSelection(h *C.QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { - if h == nil { - return nil +func (this *QTextEdit) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QTextEdit_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QTextEdit_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_TimerEvent +func miqt_exec_callback_QTextEdit_TimerEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QTextEdit__ExtraSelection{h: h} + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) + } -func UnsafeNewQTextEdit__ExtraSelection(h unsafe.Pointer) *QTextEdit__ExtraSelection { - return newQTextEdit__ExtraSelection((*C.QTextEdit__ExtraSelection)(h)) +func (this *QTextEdit) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QTextEdit_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QTextEdit_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQTextEdit__ExtraSelection constructs a new QTextEdit::ExtraSelection object. -func NewQTextEdit__ExtraSelection(param1 *QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { - ret := C.QTextEdit__ExtraSelection_new(param1.cPointer()) - return newQTextEdit__ExtraSelection(ret) +//export miqt_exec_callback_QTextEdit_KeyPressEvent +func miqt_exec_callback_QTextEdit_KeyPressEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QTextEdit_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QTextEdit_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_KeyReleaseEvent +func miqt_exec_callback_QTextEdit_KeyReleaseEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QTextEdit_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QTextEdit_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ResizeEvent +func miqt_exec_callback_QTextEdit_ResizeEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QTextEdit_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QTextEdit_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_PaintEvent +func miqt_exec_callback_QTextEdit_PaintEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MousePressEvent +func miqt_exec_callback_QTextEdit_MousePressEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MouseMoveEvent +func miqt_exec_callback_QTextEdit_MouseMoveEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MouseReleaseEvent +func miqt_exec_callback_QTextEdit_MouseReleaseEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MouseDoubleClickEvent(e *QMouseEvent) { + + C.QTextEdit_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnMouseDoubleClickEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QTextEdit_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MouseDoubleClickEvent +func miqt_exec_callback_QTextEdit_MouseDoubleClickEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTextEdit_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTextEdit) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTextEdit_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_FocusNextPrevChild +func miqt_exec_callback_QTextEdit_FocusNextPrevChild(self *C.QTextEdit, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_ContextMenuEvent(e *QContextMenuEvent) { + + C.QTextEdit_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnContextMenuEvent(slot func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) { + C.QTextEdit_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ContextMenuEvent +func miqt_exec_callback_QTextEdit_ContextMenuEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QContextMenuEvent), e *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DragEnterEvent(e *QDragEnterEvent) { + + C.QTextEdit_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDragEnterEvent(slot func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) { + C.QTextEdit_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DragEnterEvent +func miqt_exec_callback_QTextEdit_DragEnterEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragEnterEvent), e *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QTextEdit_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QTextEdit_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DragLeaveEvent +func miqt_exec_callback_QTextEdit_DragLeaveEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QTextEdit_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QTextEdit_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DragMoveEvent +func miqt_exec_callback_QTextEdit_DragMoveEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QTextEdit_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QTextEdit_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DropEvent +func miqt_exec_callback_QTextEdit_DropEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QTextEdit_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QTextEdit_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_FocusInEvent +func miqt_exec_callback_QTextEdit_FocusInEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QTextEdit_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QTextEdit_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_FocusOutEvent +func miqt_exec_callback_QTextEdit_FocusOutEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QTextEdit_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextEdit) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QTextEdit_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ShowEvent +func miqt_exec_callback_QTextEdit_ShowEvent(self *C.QTextEdit, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QTextEdit_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QTextEdit_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ChangeEvent +func miqt_exec_callback_QTextEdit_ChangeEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent), e *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QTextEdit_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QTextEdit) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QTextEdit_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_WheelEvent +func miqt_exec_callback_QTextEdit_WheelEvent(self *C.QTextEdit, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))), nil) +} +func (this *QTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { + C.QTextEdit_override_virtual_CreateMimeDataFromSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_CreateMimeDataFromSelection +func miqt_exec_callback_QTextEdit_CreateMimeDataFromSelection(self *C.QTextEdit, cb C.intptr_t) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QMimeData) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_CreateMimeDataFromSelection) + + return virtualReturn.cPointer() + +} + +func (this *QTextEdit) callVirtualBase_CanInsertFromMimeData(source *QMimeData) bool { + + return (bool)(C.QTextEdit_virtualbase_CanInsertFromMimeData(unsafe.Pointer(this.h), source.cPointer())) + +} +func (this *QTextEdit) OnCanInsertFromMimeData(slot func(super func(source *QMimeData) bool, source *QMimeData) bool) { + C.QTextEdit_override_virtual_CanInsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_CanInsertFromMimeData +func miqt_exec_callback_QTextEdit_CanInsertFromMimeData(self *C.QTextEdit, cb C.intptr_t, source *C.QMimeData) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData) bool, source *QMimeData) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_InsertFromMimeData(source *QMimeData) { + + C.QTextEdit_virtualbase_InsertFromMimeData(unsafe.Pointer(this.h), source.cPointer()) + +} +func (this *QTextEdit) OnInsertFromMimeData(slot func(super func(source *QMimeData), source *QMimeData)) { + C.QTextEdit_override_virtual_InsertFromMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_InsertFromMimeData +func miqt_exec_callback_QTextEdit_InsertFromMimeData(self *C.QTextEdit, cb C.intptr_t, source *C.QMimeData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(source *QMimeData), source *QMimeData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(source), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QTextEdit_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTextEdit) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QTextEdit_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_InputMethodEvent +func miqt_exec_callback_QTextEdit_InputMethodEvent(self *C.QTextEdit, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTextEdit_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTextEdit) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTextEdit_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ScrollContentsBy +func miqt_exec_callback_QTextEdit_ScrollContentsBy(self *C.QTextEdit, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTextEdit{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTextEdit) callVirtualBase_DoSetTextCursor(cursor *QTextCursor) { + + C.QTextEdit_virtualbase_DoSetTextCursor(unsafe.Pointer(this.h), cursor.cPointer()) + +} +func (this *QTextEdit) OnDoSetTextCursor(slot func(super func(cursor *QTextCursor), cursor *QTextCursor)) { + C.QTextEdit_override_virtual_DoSetTextCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_DoSetTextCursor +func miqt_exec_callback_QTextEdit_DoSetTextCursor(self *C.QTextEdit, cb C.intptr_t, cursor *C.QTextCursor) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursor *QTextCursor), cursor *QTextCursor)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextCursor(unsafe.Pointer(cursor)) + + gofunc((&QTextEdit{h: self}).callVirtualBase_DoSetTextCursor, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QTextEdit_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QTextEdit_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_MinimumSizeHint +func miqt_exec_callback_QTextEdit_MinimumSizeHint(self *C.QTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTextEdit) callVirtualBase_SizeHint() *QSize { + + _ret := C.QTextEdit_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QTextEdit_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_SizeHint +func miqt_exec_callback_QTextEdit_SizeHint(self *C.QTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTextEdit) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QTextEdit_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QTextEdit) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QTextEdit_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_SetupViewport +func miqt_exec_callback_QTextEdit_SetupViewport(self *C.QTextEdit, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *QWidget), viewport *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + + gofunc((&QTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QTextEdit) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QTextEdit_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QTextEdit) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QTextEdit_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_EventFilter +func miqt_exec_callback_QTextEdit_EventFilter(self *C.QTextEdit, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_ViewportEvent(param1 *QEvent) bool { + + return (bool)(C.QTextEdit_virtualbase_ViewportEvent(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QTextEdit) OnViewportEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QTextEdit_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ViewportEvent +func miqt_exec_callback_QTextEdit_ViewportEvent(self *C.QTextEdit, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTextEdit) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTextEdit_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTextEdit) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTextEdit_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextEdit_ViewportSizeHint +func miqt_exec_callback_QTextEdit_ViewportSizeHint(self *C.QTextEdit, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +// Delete this object from C++ memory. +func (this *QTextEdit) Delete() { + C.QTextEdit_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QTextEdit) GoGC() { + runtime.SetFinalizer(this, func(this *QTextEdit) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QTextEdit__ExtraSelection struct { + h *C.QTextEdit__ExtraSelection + isSubclass bool +} + +func (this *QTextEdit__ExtraSelection) cPointer() *C.QTextEdit__ExtraSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QTextEdit__ExtraSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQTextEdit__ExtraSelection constructs the type using only CGO pointers. +func newQTextEdit__ExtraSelection(h *C.QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { + if h == nil { + return nil + } + return &QTextEdit__ExtraSelection{h: h} +} + +// UnsafeNewQTextEdit__ExtraSelection constructs the type using only unsafe pointers. +func UnsafeNewQTextEdit__ExtraSelection(h unsafe.Pointer) *QTextEdit__ExtraSelection { + if h == nil { + return nil + } + + return &QTextEdit__ExtraSelection{h: (*C.QTextEdit__ExtraSelection)(h)} +} + +// NewQTextEdit__ExtraSelection constructs a new QTextEdit::ExtraSelection object. +func NewQTextEdit__ExtraSelection(param1 *QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { + var outptr_QTextEdit__ExtraSelection *C.QTextEdit__ExtraSelection = nil + + C.QTextEdit__ExtraSelection_new(param1.cPointer(), &outptr_QTextEdit__ExtraSelection) + ret := newQTextEdit__ExtraSelection(outptr_QTextEdit__ExtraSelection) + ret.isSubclass = true + return ret } func (this *QTextEdit__ExtraSelection) OperatorAssign(param1 *QTextEdit__ExtraSelection) { @@ -828,7 +1718,7 @@ func (this *QTextEdit__ExtraSelection) OperatorAssign(param1 *QTextEdit__ExtraSe // Delete this object from C++ memory. func (this *QTextEdit__ExtraSelection) Delete() { - C.QTextEdit__ExtraSelection_Delete(this.h) + C.QTextEdit__ExtraSelection_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextedit.h b/qt6/gen_qtextedit.h index 6b2ebb7e..7b5f8f70 100644 --- a/qt6/gen_qtextedit.h +++ b/qt6/gen_qtextedit.h @@ -15,14 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractScrollArea; class QColor; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; class QFont; +class QFrame; +class QInputMethodEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMimeData; +class QMouseEvent; +class QObject; class QPagedPaintDevice; +class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; class QRegularExpression; +class QResizeEvent; +class QShowEvent; +class QSize; class QTextCharFormat; class QTextCursor; class QTextDocument; @@ -32,32 +51,55 @@ typedef QTextEdit::ExtraSelection QTextEdit__ExtraSelection; #else class QTextEdit__ExtraSelection; #endif +class QTimerEvent; class QUrl; class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QColor QColor; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QRegularExpression QRegularExpression; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QTextCharFormat QTextCharFormat; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; typedef struct QTextEdit QTextEdit; typedef struct QTextEdit__ExtraSelection QTextEdit__ExtraSelection; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QTextEdit* QTextEdit_new(QWidget* parent); -QTextEdit* QTextEdit_new2(); -QTextEdit* QTextEdit_new3(struct miqt_string text); -QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent); +void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTextEdit_MetaObject(const QTextEdit* self); void* QTextEdit_Metacast(QTextEdit* self, const char* param1); struct miqt_string QTextEdit_Tr(const char* s); @@ -165,6 +207,33 @@ void QTextEdit_SelectionChanged(QTextEdit* self); void QTextEdit_connect_SelectionChanged(QTextEdit* self, intptr_t slot); void QTextEdit_CursorPositionChanged(QTextEdit* self); void QTextEdit_connect_CursorPositionChanged(QTextEdit* self, intptr_t slot); +bool QTextEdit_Event(QTextEdit* self, QEvent* e); +void QTextEdit_TimerEvent(QTextEdit* self, QTimerEvent* e); +void QTextEdit_KeyPressEvent(QTextEdit* self, QKeyEvent* e); +void QTextEdit_KeyReleaseEvent(QTextEdit* self, QKeyEvent* e); +void QTextEdit_ResizeEvent(QTextEdit* self, QResizeEvent* e); +void QTextEdit_PaintEvent(QTextEdit* self, QPaintEvent* e); +void QTextEdit_MousePressEvent(QTextEdit* self, QMouseEvent* e); +void QTextEdit_MouseMoveEvent(QTextEdit* self, QMouseEvent* e); +void QTextEdit_MouseReleaseEvent(QTextEdit* self, QMouseEvent* e); +void QTextEdit_MouseDoubleClickEvent(QTextEdit* self, QMouseEvent* e); +bool QTextEdit_FocusNextPrevChild(QTextEdit* self, bool next); +void QTextEdit_ContextMenuEvent(QTextEdit* self, QContextMenuEvent* e); +void QTextEdit_DragEnterEvent(QTextEdit* self, QDragEnterEvent* e); +void QTextEdit_DragLeaveEvent(QTextEdit* self, QDragLeaveEvent* e); +void QTextEdit_DragMoveEvent(QTextEdit* self, QDragMoveEvent* e); +void QTextEdit_DropEvent(QTextEdit* self, QDropEvent* e); +void QTextEdit_FocusInEvent(QTextEdit* self, QFocusEvent* e); +void QTextEdit_FocusOutEvent(QTextEdit* self, QFocusEvent* e); +void QTextEdit_ShowEvent(QTextEdit* self, QShowEvent* param1); +void QTextEdit_ChangeEvent(QTextEdit* self, QEvent* e); +void QTextEdit_WheelEvent(QTextEdit* self, QWheelEvent* e); +QMimeData* QTextEdit_CreateMimeDataFromSelection(const QTextEdit* self); +bool QTextEdit_CanInsertFromMimeData(const QTextEdit* self, QMimeData* source); +void QTextEdit_InsertFromMimeData(QTextEdit* self, QMimeData* source); +void QTextEdit_InputMethodEvent(QTextEdit* self, QInputMethodEvent* param1); +void QTextEdit_ScrollContentsBy(QTextEdit* self, int dx, int dy); +void QTextEdit_DoSetTextCursor(QTextEdit* self, QTextCursor* cursor); struct miqt_string QTextEdit_Tr2(const char* s, const char* c); struct miqt_string QTextEdit_Tr3(const char* s, const char* c, int n); bool QTextEdit_Find2(QTextEdit* self, struct miqt_string exp, int options); @@ -173,11 +242,81 @@ struct miqt_string QTextEdit_ToMarkdown1(const QTextEdit* self, int features); void QTextEdit_MoveCursor2(QTextEdit* self, int operation, int mode); void QTextEdit_ZoomIn1(QTextEdit* self, int rangeVal); void QTextEdit_ZoomOut1(QTextEdit* self, int rangeVal); -void QTextEdit_Delete(QTextEdit* self); +void QTextEdit_override_virtual_LoadResource(void* self, intptr_t slot); +QVariant* QTextEdit_virtualbase_LoadResource(void* self, int typeVal, QUrl* name); +void QTextEdit_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTextEdit_virtualbase_InputMethodQuery(const void* self, int property); +void QTextEdit_override_virtual_Event(void* self, intptr_t slot); +bool QTextEdit_virtualbase_Event(void* self, QEvent* e); +void QTextEdit_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QTextEdit_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QTextEdit_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QTextEdit_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QTextEdit_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QTextEdit_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* e); +void QTextEdit_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTextEdit_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTextEdit_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* e); +void QTextEdit_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QTextEdit_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QTextEdit_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QTextEdit_override_virtual_DropEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_DropEvent(void* self, QDropEvent* e); +void QTextEdit_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QTextEdit_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QTextEdit_override_virtual_ShowEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QTextEdit_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_ChangeEvent(void* self, QEvent* e); +void QTextEdit_override_virtual_WheelEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QTextEdit_override_virtual_CreateMimeDataFromSelection(void* self, intptr_t slot); +QMimeData* QTextEdit_virtualbase_CreateMimeDataFromSelection(const void* self); +void QTextEdit_override_virtual_CanInsertFromMimeData(void* self, intptr_t slot); +bool QTextEdit_virtualbase_CanInsertFromMimeData(const void* self, QMimeData* source); +void QTextEdit_override_virtual_InsertFromMimeData(void* self, intptr_t slot); +void QTextEdit_virtualbase_InsertFromMimeData(void* self, QMimeData* source); +void QTextEdit_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTextEdit_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QTextEdit_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTextEdit_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTextEdit_override_virtual_DoSetTextCursor(void* self, intptr_t slot); +void QTextEdit_virtualbase_DoSetTextCursor(void* self, QTextCursor* cursor); +void QTextEdit_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QTextEdit_virtualbase_MinimumSizeHint(const void* self); +void QTextEdit_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QTextEdit_virtualbase_SizeHint(const void* self); +void QTextEdit_override_virtual_SetupViewport(void* self, intptr_t slot); +void QTextEdit_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QTextEdit_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTextEdit_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QTextEdit_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTextEdit_virtualbase_ViewportEvent(void* self, QEvent* param1); +void QTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTextEdit_virtualbase_ViewportSizeHint(const void* self); +void QTextEdit_Delete(QTextEdit* self, bool isSubclass); -QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1); +void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection); void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1); -void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self); +void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextformat.cpp b/qt6/gen_qtextformat.cpp index 4e84a0b2..a054cb6d 100644 --- a/qt6/gen_qtextformat.cpp +++ b/qt6/gen_qtextformat.cpp @@ -22,16 +22,19 @@ #include "gen_qtextformat.h" #include "_cgo_export.h" -QTextLength* QTextLength_new() { - return new QTextLength(); +void QTextLength_new(QTextLength** outptr_QTextLength) { + QTextLength* ret = new QTextLength(); + *outptr_QTextLength = ret; } -QTextLength* QTextLength_new2(int typeVal, double value) { - return new QTextLength(static_cast(typeVal), static_cast(value)); +void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength) { + QTextLength* ret = new QTextLength(static_cast(typeVal), static_cast(value)); + *outptr_QTextLength = ret; } -QTextLength* QTextLength_new3(QTextLength* param1) { - return new QTextLength(*param1); +void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength) { + QTextLength* ret = new QTextLength(*param1); + *outptr_QTextLength = ret; } int QTextLength_Type(const QTextLength* self) { @@ -57,20 +60,27 @@ bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other) { return self->operator!=(*other); } -void QTextLength_Delete(QTextLength* self) { - delete self; +void QTextLength_Delete(QTextLength* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFormat* QTextFormat_new() { - return new QTextFormat(); +void QTextFormat_new(QTextFormat** outptr_QTextFormat) { + QTextFormat* ret = new QTextFormat(); + *outptr_QTextFormat = ret; } -QTextFormat* QTextFormat_new2(int typeVal) { - return new QTextFormat(static_cast(typeVal)); +void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat) { + QTextFormat* ret = new QTextFormat(static_cast(typeVal)); + *outptr_QTextFormat = ret; } -QTextFormat* QTextFormat_new3(QTextFormat* rhs) { - return new QTextFormat(*rhs); +void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat) { + QTextFormat* ret = new QTextFormat(*rhs); + *outptr_QTextFormat = ret; } void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs) { @@ -311,16 +321,24 @@ void QTextFormat_ClearForeground(QTextFormat* self) { self->clearForeground(); } -void QTextFormat_Delete(QTextFormat* self) { - delete self; +void QTextFormat_Delete(QTextFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextCharFormat* QTextCharFormat_new() { - return new QTextCharFormat(); +void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextCharFormat* ret = new QTextCharFormat(); + *outptr_QTextCharFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1) { - return new QTextCharFormat(*param1); +void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextCharFormat* ret = new QTextCharFormat(*param1); + *outptr_QTextCharFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextCharFormat_IsValid(const QTextCharFormat* self) { @@ -667,16 +685,24 @@ void QTextCharFormat_SetFontStyleHint2(QTextCharFormat* self, int hint, int stra self->setFontStyleHint(static_cast(hint), static_cast(strategy)); } -void QTextCharFormat_Delete(QTextCharFormat* self) { - delete self; +void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextBlockFormat* QTextBlockFormat_new() { - return new QTextBlockFormat(); +void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { + QTextBlockFormat* ret = new QTextBlockFormat(); + *outptr_QTextBlockFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1) { - return new QTextBlockFormat(*param1); +void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { + QTextBlockFormat* ret = new QTextBlockFormat(*param1); + *outptr_QTextBlockFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextBlockFormat_IsValid(const QTextBlockFormat* self) { @@ -820,16 +846,24 @@ int QTextBlockFormat_Marker(const QTextBlockFormat* self) { return static_cast(_ret); } -void QTextBlockFormat_Delete(QTextBlockFormat* self) { - delete self; +void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextListFormat* QTextListFormat_new() { - return new QTextListFormat(); +void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { + QTextListFormat* ret = new QTextListFormat(); + *outptr_QTextListFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextListFormat* QTextListFormat_new2(QTextListFormat* param1) { - return new QTextListFormat(*param1); +void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { + QTextListFormat* ret = new QTextListFormat(*param1); + *outptr_QTextListFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextListFormat_IsValid(const QTextListFormat* self) { @@ -885,12 +919,19 @@ struct miqt_string QTextListFormat_NumberSuffix(const QTextListFormat* self) { return _ms; } -void QTextListFormat_Delete(QTextListFormat* self) { - delete self; +void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextImageFormat* QTextImageFormat_new() { - return new QTextImageFormat(); +void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextImageFormat* ret = new QTextImageFormat(); + *outptr_QTextImageFormat = ret; + *outptr_QTextCharFormat = static_cast(ret); + *outptr_QTextFormat = static_cast(ret); } bool QTextImageFormat_IsValid(const QTextImageFormat* self) { @@ -943,16 +984,24 @@ int QTextImageFormat_Quality(const QTextImageFormat* self) { return self->quality(); } -void QTextImageFormat_Delete(QTextImageFormat* self) { - delete self; +void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFrameFormat* QTextFrameFormat_new() { - return new QTextFrameFormat(); +void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { + QTextFrameFormat* ret = new QTextFrameFormat(); + *outptr_QTextFrameFormat = ret; + *outptr_QTextFormat = static_cast(ret); } -QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1) { - return new QTextFrameFormat(*param1); +void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { + QTextFrameFormat* ret = new QTextFrameFormat(*param1); + *outptr_QTextFrameFormat = ret; + *outptr_QTextFormat = static_cast(ret); } bool QTextFrameFormat_IsValid(const QTextFrameFormat* self) { @@ -1081,12 +1130,19 @@ int QTextFrameFormat_PageBreakPolicy(const QTextFrameFormat* self) { return static_cast(_ret); } -void QTextFrameFormat_Delete(QTextFrameFormat* self) { - delete self; +void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextTableFormat* QTextTableFormat_new() { - return new QTextTableFormat(); +void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { + QTextTableFormat* ret = new QTextTableFormat(); + *outptr_QTextTableFormat = ret; + *outptr_QTextFrameFormat = static_cast(ret); + *outptr_QTextFormat = static_cast(ret); } bool QTextTableFormat_IsValid(const QTextTableFormat* self) { @@ -1171,12 +1227,19 @@ bool QTextTableFormat_BorderCollapse(const QTextTableFormat* self) { return self->borderCollapse(); } -void QTextTableFormat_Delete(QTextTableFormat* self) { - delete self; +void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextTableCellFormat* QTextTableCellFormat_new() { - return new QTextTableCellFormat(); +void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { + QTextTableCellFormat* ret = new QTextTableCellFormat(); + *outptr_QTextTableCellFormat = ret; + *outptr_QTextCharFormat = static_cast(ret); + *outptr_QTextFormat = static_cast(ret); } bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self) { @@ -1339,7 +1402,11 @@ void QTextTableCellFormat_SetBorderBrush(QTextTableCellFormat* self, QBrush* bru self->setBorderBrush(*brush); } -void QTextTableCellFormat_Delete(QTextTableCellFormat* self) { - delete self; +void QTextTableCellFormat_Delete(QTextTableCellFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextformat.go b/qt6/gen_qtextformat.go index a84d0e61..c9a70255 100644 --- a/qt6/gen_qtextformat.go +++ b/qt6/gen_qtextformat.go @@ -256,7 +256,8 @@ const ( ) type QTextLength struct { - h *C.QTextLength + h *C.QTextLength + isSubclass bool } func (this *QTextLength) cPointer() *C.QTextLength { @@ -273,6 +274,7 @@ func (this *QTextLength) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLength constructs the type using only CGO pointers. func newQTextLength(h *C.QTextLength) *QTextLength { if h == nil { return nil @@ -280,26 +282,43 @@ func newQTextLength(h *C.QTextLength) *QTextLength { return &QTextLength{h: h} } +// UnsafeNewQTextLength constructs the type using only unsafe pointers. func UnsafeNewQTextLength(h unsafe.Pointer) *QTextLength { - return newQTextLength((*C.QTextLength)(h)) + if h == nil { + return nil + } + + return &QTextLength{h: (*C.QTextLength)(h)} } // NewQTextLength constructs a new QTextLength object. func NewQTextLength() *QTextLength { - ret := C.QTextLength_new() - return newQTextLength(ret) + var outptr_QTextLength *C.QTextLength = nil + + C.QTextLength_new(&outptr_QTextLength) + ret := newQTextLength(outptr_QTextLength) + ret.isSubclass = true + return ret } // NewQTextLength2 constructs a new QTextLength object. func NewQTextLength2(typeVal QTextLength__Type, value float64) *QTextLength { - ret := C.QTextLength_new2((C.int)(typeVal), (C.double)(value)) - return newQTextLength(ret) + var outptr_QTextLength *C.QTextLength = nil + + C.QTextLength_new2((C.int)(typeVal), (C.double)(value), &outptr_QTextLength) + ret := newQTextLength(outptr_QTextLength) + ret.isSubclass = true + return ret } // NewQTextLength3 constructs a new QTextLength object. func NewQTextLength3(param1 *QTextLength) *QTextLength { - ret := C.QTextLength_new3(param1.cPointer()) - return newQTextLength(ret) + var outptr_QTextLength *C.QTextLength = nil + + C.QTextLength_new3(param1.cPointer(), &outptr_QTextLength) + ret := newQTextLength(outptr_QTextLength) + ret.isSubclass = true + return ret } func (this *QTextLength) Type() QTextLength__Type { @@ -324,7 +343,7 @@ func (this *QTextLength) OperatorNotEqual(other *QTextLength) bool { // Delete this object from C++ memory. func (this *QTextLength) Delete() { - C.QTextLength_Delete(this.h) + C.QTextLength_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -337,7 +356,8 @@ func (this *QTextLength) GoGC() { } type QTextFormat struct { - h *C.QTextFormat + h *C.QTextFormat + isSubclass bool } func (this *QTextFormat) cPointer() *C.QTextFormat { @@ -354,6 +374,7 @@ func (this *QTextFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFormat constructs the type using only CGO pointers. func newQTextFormat(h *C.QTextFormat) *QTextFormat { if h == nil { return nil @@ -361,26 +382,43 @@ func newQTextFormat(h *C.QTextFormat) *QTextFormat { return &QTextFormat{h: h} } +// UnsafeNewQTextFormat constructs the type using only unsafe pointers. func UnsafeNewQTextFormat(h unsafe.Pointer) *QTextFormat { - return newQTextFormat((*C.QTextFormat)(h)) + if h == nil { + return nil + } + + return &QTextFormat{h: (*C.QTextFormat)(h)} } // NewQTextFormat constructs a new QTextFormat object. func NewQTextFormat() *QTextFormat { - ret := C.QTextFormat_new() - return newQTextFormat(ret) + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFormat_new(&outptr_QTextFormat) + ret := newQTextFormat(outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextFormat2 constructs a new QTextFormat object. func NewQTextFormat2(typeVal int) *QTextFormat { - ret := C.QTextFormat_new2((C.int)(typeVal)) - return newQTextFormat(ret) + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFormat_new2((C.int)(typeVal), &outptr_QTextFormat) + ret := newQTextFormat(outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextFormat3 constructs a new QTextFormat object. func NewQTextFormat3(rhs *QTextFormat) *QTextFormat { - ret := C.QTextFormat_new3(rhs.cPointer()) - return newQTextFormat(ret) + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFormat_new3(rhs.cPointer(), &outptr_QTextFormat) + ret := newQTextFormat(outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextFormat) OperatorAssign(rhs *QTextFormat) { @@ -564,49 +602,49 @@ func (this *QTextFormat) IsTableCellFormat() bool { func (this *QTextFormat) ToBlockFormat() *QTextBlockFormat { _ret := C.QTextFormat_ToBlockFormat(this.h) - _goptr := newQTextBlockFormat(_ret) + _goptr := newQTextBlockFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToCharFormat() *QTextCharFormat { _ret := C.QTextFormat_ToCharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToListFormat() *QTextListFormat { _ret := C.QTextFormat_ToListFormat(this.h) - _goptr := newQTextListFormat(_ret) + _goptr := newQTextListFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableFormat() *QTextTableFormat { _ret := C.QTextFormat_ToTableFormat(this.h) - _goptr := newQTextTableFormat(_ret) + _goptr := newQTextTableFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToFrameFormat() *QTextFrameFormat { _ret := C.QTextFormat_ToFrameFormat(this.h) - _goptr := newQTextFrameFormat(_ret) + _goptr := newQTextFrameFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToImageFormat() *QTextImageFormat { _ret := C.QTextFormat_ToImageFormat(this.h) - _goptr := newQTextImageFormat(_ret) + _goptr := newQTextImageFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableCellFormat() *QTextTableCellFormat { _ret := C.QTextFormat_ToTableCellFormat(this.h) - _goptr := newQTextTableCellFormat(_ret) + _goptr := newQTextTableCellFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -659,7 +697,7 @@ func (this *QTextFormat) ClearForeground() { // Delete this object from C++ memory. func (this *QTextFormat) Delete() { - C.QTextFormat_Delete(this.h) + C.QTextFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -672,7 +710,8 @@ func (this *QTextFormat) GoGC() { } type QTextCharFormat struct { - h *C.QTextCharFormat + h *C.QTextCharFormat + isSubclass bool *QTextFormat } @@ -690,27 +729,45 @@ func (this *QTextCharFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextCharFormat(h *C.QTextCharFormat) *QTextCharFormat { +// newQTextCharFormat constructs the type using only CGO pointers. +func newQTextCharFormat(h *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextCharFormat { if h == nil { return nil } - return &QTextCharFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextCharFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextCharFormat(h unsafe.Pointer) *QTextCharFormat { - return newQTextCharFormat((*C.QTextCharFormat)(h)) +// UnsafeNewQTextCharFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextCharFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextCharFormat { + if h == nil { + return nil + } + + return &QTextCharFormat{h: (*C.QTextCharFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextCharFormat constructs a new QTextCharFormat object. func NewQTextCharFormat() *QTextCharFormat { - ret := C.QTextCharFormat_new() - return newQTextCharFormat(ret) + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextCharFormat_new(&outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextCharFormat2 constructs a new QTextCharFormat object. func NewQTextCharFormat2(param1 *QTextCharFormat) *QTextCharFormat { - ret := C.QTextCharFormat_new2(param1.cPointer()) - return newQTextCharFormat(ret) + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextCharFormat_new2(param1.cPointer(), &outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextCharFormat) IsValid() bool { @@ -1060,7 +1117,7 @@ func (this *QTextCharFormat) SetFontStyleHint2(hint QFont__StyleHint, strategy Q // Delete this object from C++ memory. func (this *QTextCharFormat) Delete() { - C.QTextCharFormat_Delete(this.h) + C.QTextCharFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1073,7 +1130,8 @@ func (this *QTextCharFormat) GoGC() { } type QTextBlockFormat struct { - h *C.QTextBlockFormat + h *C.QTextBlockFormat + isSubclass bool *QTextFormat } @@ -1091,27 +1149,45 @@ func (this *QTextBlockFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextBlockFormat(h *C.QTextBlockFormat) *QTextBlockFormat { +// newQTextBlockFormat constructs the type using only CGO pointers. +func newQTextBlockFormat(h *C.QTextBlockFormat, h_QTextFormat *C.QTextFormat) *QTextBlockFormat { if h == nil { return nil } - return &QTextBlockFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextBlockFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextBlockFormat(h unsafe.Pointer) *QTextBlockFormat { - return newQTextBlockFormat((*C.QTextBlockFormat)(h)) +// UnsafeNewQTextBlockFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextBlockFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextBlockFormat { + if h == nil { + return nil + } + + return &QTextBlockFormat{h: (*C.QTextBlockFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextBlockFormat constructs a new QTextBlockFormat object. func NewQTextBlockFormat() *QTextBlockFormat { - ret := C.QTextBlockFormat_new() - return newQTextBlockFormat(ret) + var outptr_QTextBlockFormat *C.QTextBlockFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextBlockFormat_new(&outptr_QTextBlockFormat, &outptr_QTextFormat) + ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextBlockFormat2 constructs a new QTextBlockFormat object. func NewQTextBlockFormat2(param1 *QTextBlockFormat) *QTextBlockFormat { - ret := C.QTextBlockFormat_new2(param1.cPointer()) - return newQTextBlockFormat(ret) + var outptr_QTextBlockFormat *C.QTextBlockFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextBlockFormat_new2(param1.cPointer(), &outptr_QTextBlockFormat, &outptr_QTextFormat) + ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextBlockFormat) IsValid() bool { @@ -1247,7 +1323,7 @@ func (this *QTextBlockFormat) Marker() QTextBlockFormat__MarkerType { // Delete this object from C++ memory. func (this *QTextBlockFormat) Delete() { - C.QTextBlockFormat_Delete(this.h) + C.QTextBlockFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1260,7 +1336,8 @@ func (this *QTextBlockFormat) GoGC() { } type QTextListFormat struct { - h *C.QTextListFormat + h *C.QTextListFormat + isSubclass bool *QTextFormat } @@ -1278,27 +1355,45 @@ func (this *QTextListFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextListFormat(h *C.QTextListFormat) *QTextListFormat { +// newQTextListFormat constructs the type using only CGO pointers. +func newQTextListFormat(h *C.QTextListFormat, h_QTextFormat *C.QTextFormat) *QTextListFormat { if h == nil { return nil } - return &QTextListFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextListFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextListFormat(h unsafe.Pointer) *QTextListFormat { - return newQTextListFormat((*C.QTextListFormat)(h)) +// UnsafeNewQTextListFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextListFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextListFormat { + if h == nil { + return nil + } + + return &QTextListFormat{h: (*C.QTextListFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextListFormat constructs a new QTextListFormat object. func NewQTextListFormat() *QTextListFormat { - ret := C.QTextListFormat_new() - return newQTextListFormat(ret) + var outptr_QTextListFormat *C.QTextListFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextListFormat_new(&outptr_QTextListFormat, &outptr_QTextFormat) + ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextListFormat2 constructs a new QTextListFormat object. func NewQTextListFormat2(param1 *QTextListFormat) *QTextListFormat { - ret := C.QTextListFormat_new2(param1.cPointer()) - return newQTextListFormat(ret) + var outptr_QTextListFormat *C.QTextListFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextListFormat_new2(param1.cPointer(), &outptr_QTextListFormat, &outptr_QTextFormat) + ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextListFormat) IsValid() bool { @@ -1353,7 +1448,7 @@ func (this *QTextListFormat) NumberSuffix() string { // Delete this object from C++ memory. func (this *QTextListFormat) Delete() { - C.QTextListFormat_Delete(this.h) + C.QTextListFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1366,7 +1461,8 @@ func (this *QTextListFormat) GoGC() { } type QTextImageFormat struct { - h *C.QTextImageFormat + h *C.QTextImageFormat + isSubclass bool *QTextCharFormat } @@ -1384,21 +1480,35 @@ func (this *QTextImageFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextImageFormat(h *C.QTextImageFormat) *QTextImageFormat { +// newQTextImageFormat constructs the type using only CGO pointers. +func newQTextImageFormat(h *C.QTextImageFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextImageFormat { if h == nil { return nil } - return &QTextImageFormat{h: h, QTextCharFormat: UnsafeNewQTextCharFormat(unsafe.Pointer(h))} + return &QTextImageFormat{h: h, + QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } -func UnsafeNewQTextImageFormat(h unsafe.Pointer) *QTextImageFormat { - return newQTextImageFormat((*C.QTextImageFormat)(h)) +// UnsafeNewQTextImageFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextImageFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextImageFormat { + if h == nil { + return nil + } + + return &QTextImageFormat{h: (*C.QTextImageFormat)(h), + QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } // NewQTextImageFormat constructs a new QTextImageFormat object. func NewQTextImageFormat() *QTextImageFormat { - ret := C.QTextImageFormat_new() - return newQTextImageFormat(ret) + var outptr_QTextImageFormat *C.QTextImageFormat = nil + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextImageFormat_new(&outptr_QTextImageFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextImageFormat(outptr_QTextImageFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextImageFormat) IsValid() bool { @@ -1450,7 +1560,7 @@ func (this *QTextImageFormat) Quality() int { // Delete this object from C++ memory. func (this *QTextImageFormat) Delete() { - C.QTextImageFormat_Delete(this.h) + C.QTextImageFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1463,7 +1573,8 @@ func (this *QTextImageFormat) GoGC() { } type QTextFrameFormat struct { - h *C.QTextFrameFormat + h *C.QTextFrameFormat + isSubclass bool *QTextFormat } @@ -1481,27 +1592,45 @@ func (this *QTextFrameFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextFrameFormat(h *C.QTextFrameFormat) *QTextFrameFormat { +// newQTextFrameFormat constructs the type using only CGO pointers. +func newQTextFrameFormat(h *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextFrameFormat { if h == nil { return nil } - return &QTextFrameFormat{h: h, QTextFormat: UnsafeNewQTextFormat(unsafe.Pointer(h))} + return &QTextFrameFormat{h: h, + QTextFormat: newQTextFormat(h_QTextFormat)} } -func UnsafeNewQTextFrameFormat(h unsafe.Pointer) *QTextFrameFormat { - return newQTextFrameFormat((*C.QTextFrameFormat)(h)) +// UnsafeNewQTextFrameFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextFrameFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextFrameFormat { + if h == nil { + return nil + } + + return &QTextFrameFormat{h: (*C.QTextFrameFormat)(h), + QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} } // NewQTextFrameFormat constructs a new QTextFrameFormat object. func NewQTextFrameFormat() *QTextFrameFormat { - ret := C.QTextFrameFormat_new() - return newQTextFrameFormat(ret) + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFrameFormat_new(&outptr_QTextFrameFormat, &outptr_QTextFormat) + ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } // NewQTextFrameFormat2 constructs a new QTextFrameFormat object. func NewQTextFrameFormat2(param1 *QTextFrameFormat) *QTextFrameFormat { - ret := C.QTextFrameFormat_new2(param1.cPointer()) - return newQTextFrameFormat(ret) + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextFrameFormat_new2(param1.cPointer(), &outptr_QTextFrameFormat, &outptr_QTextFormat) + ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextFrameFormat) IsValid() bool { @@ -1631,7 +1760,7 @@ func (this *QTextFrameFormat) PageBreakPolicy() QTextFormat__PageBreakFlag { // Delete this object from C++ memory. func (this *QTextFrameFormat) Delete() { - C.QTextFrameFormat_Delete(this.h) + C.QTextFrameFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1644,7 +1773,8 @@ func (this *QTextFrameFormat) GoGC() { } type QTextTableFormat struct { - h *C.QTextTableFormat + h *C.QTextTableFormat + isSubclass bool *QTextFrameFormat } @@ -1662,21 +1792,35 @@ func (this *QTextTableFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextTableFormat(h *C.QTextTableFormat) *QTextTableFormat { +// newQTextTableFormat constructs the type using only CGO pointers. +func newQTextTableFormat(h *C.QTextTableFormat, h_QTextFrameFormat *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextTableFormat { if h == nil { return nil } - return &QTextTableFormat{h: h, QTextFrameFormat: UnsafeNewQTextFrameFormat(unsafe.Pointer(h))} + return &QTextTableFormat{h: h, + QTextFrameFormat: newQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} } -func UnsafeNewQTextTableFormat(h unsafe.Pointer) *QTextTableFormat { - return newQTextTableFormat((*C.QTextTableFormat)(h)) +// UnsafeNewQTextTableFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextTableFormat(h unsafe.Pointer, h_QTextFrameFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableFormat { + if h == nil { + return nil + } + + return &QTextTableFormat{h: (*C.QTextTableFormat)(h), + QTextFrameFormat: UnsafeNewQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} } // NewQTextTableFormat constructs a new QTextTableFormat object. func NewQTextTableFormat() *QTextTableFormat { - ret := C.QTextTableFormat_new() - return newQTextTableFormat(ret) + var outptr_QTextTableFormat *C.QTextTableFormat = nil + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextTableFormat_new(&outptr_QTextTableFormat, &outptr_QTextFrameFormat, &outptr_QTextFormat) + ret := newQTextTableFormat(outptr_QTextTableFormat, outptr_QTextFrameFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextTableFormat) IsValid() bool { @@ -1760,7 +1904,7 @@ func (this *QTextTableFormat) BorderCollapse() bool { // Delete this object from C++ memory. func (this *QTextTableFormat) Delete() { - C.QTextTableFormat_Delete(this.h) + C.QTextTableFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -1773,7 +1917,8 @@ func (this *QTextTableFormat) GoGC() { } type QTextTableCellFormat struct { - h *C.QTextTableCellFormat + h *C.QTextTableCellFormat + isSubclass bool *QTextCharFormat } @@ -1791,21 +1936,35 @@ func (this *QTextTableCellFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextTableCellFormat(h *C.QTextTableCellFormat) *QTextTableCellFormat { +// newQTextTableCellFormat constructs the type using only CGO pointers. +func newQTextTableCellFormat(h *C.QTextTableCellFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextTableCellFormat { if h == nil { return nil } - return &QTextTableCellFormat{h: h, QTextCharFormat: UnsafeNewQTextCharFormat(unsafe.Pointer(h))} + return &QTextTableCellFormat{h: h, + QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } -func UnsafeNewQTextTableCellFormat(h unsafe.Pointer) *QTextTableCellFormat { - return newQTextTableCellFormat((*C.QTextTableCellFormat)(h)) +// UnsafeNewQTextTableCellFormat constructs the type using only unsafe pointers. +func UnsafeNewQTextTableCellFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableCellFormat { + if h == nil { + return nil + } + + return &QTextTableCellFormat{h: (*C.QTextTableCellFormat)(h), + QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} } // NewQTextTableCellFormat constructs a new QTextTableCellFormat object. func NewQTextTableCellFormat() *QTextTableCellFormat { - ret := C.QTextTableCellFormat_new() - return newQTextTableCellFormat(ret) + var outptr_QTextTableCellFormat *C.QTextTableCellFormat = nil + var outptr_QTextCharFormat *C.QTextCharFormat = nil + var outptr_QTextFormat *C.QTextFormat = nil + + C.QTextTableCellFormat_new(&outptr_QTextTableCellFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) + ret := newQTextTableCellFormat(outptr_QTextTableCellFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret.isSubclass = true + return ret } func (this *QTextTableCellFormat) IsValid() bool { @@ -1970,7 +2129,7 @@ func (this *QTextTableCellFormat) SetBorderBrush(brush *QBrush) { // Delete this object from C++ memory. func (this *QTextTableCellFormat) Delete() { - C.QTextTableCellFormat_Delete(this.h) + C.QTextTableCellFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextformat.h b/qt6/gen_qtextformat.h index 06b6ae4a..eae6c9ff 100644 --- a/qt6/gen_qtextformat.h +++ b/qt6/gen_qtextformat.h @@ -52,19 +52,19 @@ typedef struct QTextTableFormat QTextTableFormat; typedef struct QVariant QVariant; #endif -QTextLength* QTextLength_new(); -QTextLength* QTextLength_new2(int typeVal, double value); -QTextLength* QTextLength_new3(QTextLength* param1); +void QTextLength_new(QTextLength** outptr_QTextLength); +void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength); +void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength); int QTextLength_Type(const QTextLength* self); double QTextLength_Value(const QTextLength* self, double maximumLength); double QTextLength_RawValue(const QTextLength* self); bool QTextLength_OperatorEqual(const QTextLength* self, QTextLength* other); bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other); -void QTextLength_Delete(QTextLength* self); +void QTextLength_Delete(QTextLength* self, bool isSubclass); -QTextFormat* QTextFormat_new(); -QTextFormat* QTextFormat_new2(int typeVal); -QTextFormat* QTextFormat_new3(QTextFormat* rhs); +void QTextFormat_new(QTextFormat** outptr_QTextFormat); +void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat); +void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat); void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs); void QTextFormat_Swap(QTextFormat* self, QTextFormat* other); void QTextFormat_Merge(QTextFormat* self, QTextFormat* other); @@ -115,10 +115,10 @@ void QTextFormat_ClearBackground(QTextFormat* self); void QTextFormat_SetForeground(QTextFormat* self, QBrush* brush); QBrush* QTextFormat_Foreground(const QTextFormat* self); void QTextFormat_ClearForeground(QTextFormat* self); -void QTextFormat_Delete(QTextFormat* self); +void QTextFormat_Delete(QTextFormat* self, bool isSubclass); -QTextCharFormat* QTextCharFormat_new(); -QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1); +void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); bool QTextCharFormat_IsValid(const QTextCharFormat* self); void QTextCharFormat_SetFont(QTextCharFormat* self, QFont* font); QFont* QTextCharFormat_Font(const QTextCharFormat* self); @@ -188,10 +188,10 @@ void QTextCharFormat_SetTableCellColumnSpan(QTextCharFormat* self, int tableCell int QTextCharFormat_TableCellColumnSpan(const QTextCharFormat* self); void QTextCharFormat_SetFont2(QTextCharFormat* self, QFont* font, int behavior); void QTextCharFormat_SetFontStyleHint2(QTextCharFormat* self, int hint, int strategy); -void QTextCharFormat_Delete(QTextCharFormat* self); +void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass); -QTextBlockFormat* QTextBlockFormat_new(); -QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1); +void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); +void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); bool QTextBlockFormat_IsValid(const QTextBlockFormat* self); void QTextBlockFormat_SetAlignment(QTextBlockFormat* self, int alignment); int QTextBlockFormat_Alignment(const QTextBlockFormat* self); @@ -221,10 +221,10 @@ void QTextBlockFormat_SetTabPositions(QTextBlockFormat* self, struct miqt_array struct miqt_array /* of QTextOption__Tab* */ QTextBlockFormat_TabPositions(const QTextBlockFormat* self); void QTextBlockFormat_SetMarker(QTextBlockFormat* self, int marker); int QTextBlockFormat_Marker(const QTextBlockFormat* self); -void QTextBlockFormat_Delete(QTextBlockFormat* self); +void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass); -QTextListFormat* QTextListFormat_new(); -QTextListFormat* QTextListFormat_new2(QTextListFormat* param1); +void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); +void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); bool QTextListFormat_IsValid(const QTextListFormat* self); void QTextListFormat_SetStyle(QTextListFormat* self, int style); int QTextListFormat_Style(const QTextListFormat* self); @@ -234,9 +234,9 @@ void QTextListFormat_SetNumberPrefix(QTextListFormat* self, struct miqt_string n struct miqt_string QTextListFormat_NumberPrefix(const QTextListFormat* self); void QTextListFormat_SetNumberSuffix(QTextListFormat* self, struct miqt_string numberSuffix); struct miqt_string QTextListFormat_NumberSuffix(const QTextListFormat* self); -void QTextListFormat_Delete(QTextListFormat* self); +void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass); -QTextImageFormat* QTextImageFormat_new(); +void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); bool QTextImageFormat_IsValid(const QTextImageFormat* self); void QTextImageFormat_SetName(QTextImageFormat* self, struct miqt_string name); struct miqt_string QTextImageFormat_Name(const QTextImageFormat* self); @@ -247,10 +247,10 @@ double QTextImageFormat_Height(const QTextImageFormat* self); void QTextImageFormat_SetQuality(QTextImageFormat* self, int quality); void QTextImageFormat_SetQuality2(QTextImageFormat* self); int QTextImageFormat_Quality(const QTextImageFormat* self); -void QTextImageFormat_Delete(QTextImageFormat* self); +void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass); -QTextFrameFormat* QTextFrameFormat_new(); -QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1); +void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); +void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); bool QTextFrameFormat_IsValid(const QTextFrameFormat* self); void QTextFrameFormat_SetPosition(QTextFrameFormat* self, int f); int QTextFrameFormat_Position(const QTextFrameFormat* self); @@ -280,9 +280,9 @@ void QTextFrameFormat_SetHeightWithHeight(QTextFrameFormat* self, QTextLength* h QTextLength* QTextFrameFormat_Height(const QTextFrameFormat* self); void QTextFrameFormat_SetPageBreakPolicy(QTextFrameFormat* self, int flags); int QTextFrameFormat_PageBreakPolicy(const QTextFrameFormat* self); -void QTextFrameFormat_Delete(QTextFrameFormat* self); +void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass); -QTextTableFormat* QTextTableFormat_new(); +void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); bool QTextTableFormat_IsValid(const QTextTableFormat* self); int QTextTableFormat_Columns(const QTextTableFormat* self); void QTextTableFormat_SetColumns(QTextTableFormat* self, int columns); @@ -299,9 +299,9 @@ void QTextTableFormat_SetHeaderRowCount(QTextTableFormat* self, int count); int QTextTableFormat_HeaderRowCount(const QTextTableFormat* self); void QTextTableFormat_SetBorderCollapse(QTextTableFormat* self, bool borderCollapse); bool QTextTableFormat_BorderCollapse(const QTextTableFormat* self); -void QTextTableFormat_Delete(QTextTableFormat* self); +void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass); -QTextTableCellFormat* QTextTableCellFormat_new(); +void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self); void QTextTableCellFormat_SetTopPadding(QTextTableCellFormat* self, double padding); double QTextTableCellFormat_TopPadding(const QTextTableCellFormat* self); @@ -339,7 +339,7 @@ QBrush* QTextTableCellFormat_LeftBorderBrush(const QTextTableCellFormat* self); void QTextTableCellFormat_SetRightBorderBrush(QTextTableCellFormat* self, QBrush* brush); QBrush* QTextTableCellFormat_RightBorderBrush(const QTextTableCellFormat* self); void QTextTableCellFormat_SetBorderBrush(QTextTableCellFormat* self, QBrush* brush); -void QTextTableCellFormat_Delete(QTextTableCellFormat* self); +void QTextTableCellFormat_Delete(QTextTableCellFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextlayout.cpp b/qt6/gen_qtextlayout.cpp index 5ae78c8a..cca03156 100644 --- a/qt6/gen_qtextlayout.cpp +++ b/qt6/gen_qtextlayout.cpp @@ -20,8 +20,9 @@ #include "gen_qtextlayout.h" #include "_cgo_export.h" -QTextInlineObject* QTextInlineObject_new() { - return new QTextInlineObject(); +void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject) { + QTextInlineObject* ret = new QTextInlineObject(); + *outptr_QTextInlineObject = ret; } bool QTextInlineObject_IsValid(const QTextInlineObject* self) { @@ -81,31 +82,40 @@ QTextFormat* QTextInlineObject_Format(const QTextInlineObject* self) { return new QTextFormat(self->format()); } -void QTextInlineObject_Delete(QTextInlineObject* self) { - delete self; +void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextLayout* QTextLayout_new() { - return new QTextLayout(); +void QTextLayout_new(QTextLayout** outptr_QTextLayout) { + QTextLayout* ret = new QTextLayout(); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new2(struct miqt_string text) { +void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextLayout(text_QString); + QTextLayout* ret = new QTextLayout(text_QString); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font) { +void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextLayout(text_QString, *font); + QTextLayout* ret = new QTextLayout(text_QString, *font); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new4(QTextBlock* b) { - return new QTextLayout(*b); +void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout) { + QTextLayout* ret = new QTextLayout(*b); + *outptr_QTextLayout = ret; } -QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice) { +void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QTextLayout(text_QString, *font, paintdevice); + QTextLayout* ret = new QTextLayout(text_QString, *font, paintdevice); + *outptr_QTextLayout = ret; } void QTextLayout_SetFont(QTextLayout* self, QFont* f) { @@ -363,12 +373,17 @@ struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns2(const QTextLayout* return _out; } -void QTextLayout_Delete(QTextLayout* self) { - delete self; +void QTextLayout_Delete(QTextLayout* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextLine* QTextLine_new() { - return new QTextLine(); +void QTextLine_new(QTextLine** outptr_QTextLine) { + QTextLine* ret = new QTextLine(); + *outptr_QTextLine = ret; } bool QTextLine_IsValid(const QTextLine* self) { @@ -539,19 +554,28 @@ struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns2(const QTextLine* sel return _out; } -void QTextLine_Delete(QTextLine* self) { - delete self; +void QTextLine_Delete(QTextLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextLayout__FormatRange* QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1) { - return new QTextLayout::FormatRange(*param1); +void QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1, QTextLayout__FormatRange** outptr_QTextLayout__FormatRange) { + QTextLayout::FormatRange* ret = new QTextLayout::FormatRange(*param1); + *outptr_QTextLayout__FormatRange = ret; } void QTextLayout__FormatRange_OperatorAssign(QTextLayout__FormatRange* self, QTextLayout__FormatRange* param1) { self->operator=(*param1); } -void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self) { - delete self; +void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextlayout.go b/qt6/gen_qtextlayout.go index d4b1205d..f069fa92 100644 --- a/qt6/gen_qtextlayout.go +++ b/qt6/gen_qtextlayout.go @@ -35,7 +35,8 @@ const ( ) type QTextInlineObject struct { - h *C.QTextInlineObject + h *C.QTextInlineObject + isSubclass bool } func (this *QTextInlineObject) cPointer() *C.QTextInlineObject { @@ -52,6 +53,7 @@ func (this *QTextInlineObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextInlineObject constructs the type using only CGO pointers. func newQTextInlineObject(h *C.QTextInlineObject) *QTextInlineObject { if h == nil { return nil @@ -59,14 +61,23 @@ func newQTextInlineObject(h *C.QTextInlineObject) *QTextInlineObject { return &QTextInlineObject{h: h} } +// UnsafeNewQTextInlineObject constructs the type using only unsafe pointers. func UnsafeNewQTextInlineObject(h unsafe.Pointer) *QTextInlineObject { - return newQTextInlineObject((*C.QTextInlineObject)(h)) + if h == nil { + return nil + } + + return &QTextInlineObject{h: (*C.QTextInlineObject)(h)} } // NewQTextInlineObject constructs a new QTextInlineObject object. func NewQTextInlineObject() *QTextInlineObject { - ret := C.QTextInlineObject_new() - return newQTextInlineObject(ret) + var outptr_QTextInlineObject *C.QTextInlineObject = nil + + C.QTextInlineObject_new(&outptr_QTextInlineObject) + ret := newQTextInlineObject(outptr_QTextInlineObject) + ret.isSubclass = true + return ret } func (this *QTextInlineObject) IsValid() bool { @@ -129,7 +140,7 @@ func (this *QTextInlineObject) Format() *QTextFormat { // Delete this object from C++ memory. func (this *QTextInlineObject) Delete() { - C.QTextInlineObject_Delete(this.h) + C.QTextInlineObject_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -142,7 +153,8 @@ func (this *QTextInlineObject) GoGC() { } type QTextLayout struct { - h *C.QTextLayout + h *C.QTextLayout + isSubclass bool } func (this *QTextLayout) cPointer() *C.QTextLayout { @@ -159,6 +171,7 @@ func (this *QTextLayout) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLayout constructs the type using only CGO pointers. func newQTextLayout(h *C.QTextLayout) *QTextLayout { if h == nil { return nil @@ -166,14 +179,23 @@ func newQTextLayout(h *C.QTextLayout) *QTextLayout { return &QTextLayout{h: h} } +// UnsafeNewQTextLayout constructs the type using only unsafe pointers. func UnsafeNewQTextLayout(h unsafe.Pointer) *QTextLayout { - return newQTextLayout((*C.QTextLayout)(h)) + if h == nil { + return nil + } + + return &QTextLayout{h: (*C.QTextLayout)(h)} } // NewQTextLayout constructs a new QTextLayout object. func NewQTextLayout() *QTextLayout { - ret := C.QTextLayout_new() - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new(&outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout2 constructs a new QTextLayout object. @@ -182,8 +204,12 @@ func NewQTextLayout2(text string) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextLayout_new2(text_ms) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new2(text_ms, &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout3 constructs a new QTextLayout object. @@ -192,14 +218,22 @@ func NewQTextLayout3(text string, font *QFont) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextLayout_new3(text_ms, font.cPointer()) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new3(text_ms, font.cPointer(), &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout4 constructs a new QTextLayout object. func NewQTextLayout4(b *QTextBlock) *QTextLayout { - ret := C.QTextLayout_new4(b.cPointer()) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new4(b.cPointer(), &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } // NewQTextLayout5 constructs a new QTextLayout object. @@ -208,8 +242,12 @@ func NewQTextLayout5(text string, font *QFont, paintdevice *QPaintDevice) *QText text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer()) - return newQTextLayout(ret) + var outptr_QTextLayout *C.QTextLayout = nil + + C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer(), &outptr_QTextLayout) + ret := newQTextLayout(outptr_QTextLayout) + ret.isSubclass = true + return ret } func (this *QTextLayout) SetFont(f *QFont) { @@ -480,7 +518,7 @@ func (this *QTextLayout) GlyphRuns2(from int, length int) []QGlyphRun { // Delete this object from C++ memory. func (this *QTextLayout) Delete() { - C.QTextLayout_Delete(this.h) + C.QTextLayout_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -493,7 +531,8 @@ func (this *QTextLayout) GoGC() { } type QTextLine struct { - h *C.QTextLine + h *C.QTextLine + isSubclass bool } func (this *QTextLine) cPointer() *C.QTextLine { @@ -510,6 +549,7 @@ func (this *QTextLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLine constructs the type using only CGO pointers. func newQTextLine(h *C.QTextLine) *QTextLine { if h == nil { return nil @@ -517,14 +557,23 @@ func newQTextLine(h *C.QTextLine) *QTextLine { return &QTextLine{h: h} } +// UnsafeNewQTextLine constructs the type using only unsafe pointers. func UnsafeNewQTextLine(h unsafe.Pointer) *QTextLine { - return newQTextLine((*C.QTextLine)(h)) + if h == nil { + return nil + } + + return &QTextLine{h: (*C.QTextLine)(h)} } // NewQTextLine constructs a new QTextLine object. func NewQTextLine() *QTextLine { - ret := C.QTextLine_new() - return newQTextLine(ret) + var outptr_QTextLine *C.QTextLine = nil + + C.QTextLine_new(&outptr_QTextLine) + ret := newQTextLine(outptr_QTextLine) + ret.isSubclass = true + return ret } func (this *QTextLine) IsValid() bool { @@ -693,7 +742,7 @@ func (this *QTextLine) GlyphRuns2(from int, length int) []QGlyphRun { // Delete this object from C++ memory. func (this *QTextLine) Delete() { - C.QTextLine_Delete(this.h) + C.QTextLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -706,7 +755,8 @@ func (this *QTextLine) GoGC() { } type QTextLayout__FormatRange struct { - h *C.QTextLayout__FormatRange + h *C.QTextLayout__FormatRange + isSubclass bool } func (this *QTextLayout__FormatRange) cPointer() *C.QTextLayout__FormatRange { @@ -723,6 +773,7 @@ func (this *QTextLayout__FormatRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextLayout__FormatRange constructs the type using only CGO pointers. func newQTextLayout__FormatRange(h *C.QTextLayout__FormatRange) *QTextLayout__FormatRange { if h == nil { return nil @@ -730,14 +781,23 @@ func newQTextLayout__FormatRange(h *C.QTextLayout__FormatRange) *QTextLayout__Fo return &QTextLayout__FormatRange{h: h} } +// UnsafeNewQTextLayout__FormatRange constructs the type using only unsafe pointers. func UnsafeNewQTextLayout__FormatRange(h unsafe.Pointer) *QTextLayout__FormatRange { - return newQTextLayout__FormatRange((*C.QTextLayout__FormatRange)(h)) + if h == nil { + return nil + } + + return &QTextLayout__FormatRange{h: (*C.QTextLayout__FormatRange)(h)} } // NewQTextLayout__FormatRange constructs a new QTextLayout::FormatRange object. func NewQTextLayout__FormatRange(param1 *QTextLayout__FormatRange) *QTextLayout__FormatRange { - ret := C.QTextLayout__FormatRange_new(param1.cPointer()) - return newQTextLayout__FormatRange(ret) + var outptr_QTextLayout__FormatRange *C.QTextLayout__FormatRange = nil + + C.QTextLayout__FormatRange_new(param1.cPointer(), &outptr_QTextLayout__FormatRange) + ret := newQTextLayout__FormatRange(outptr_QTextLayout__FormatRange) + ret.isSubclass = true + return ret } func (this *QTextLayout__FormatRange) OperatorAssign(param1 *QTextLayout__FormatRange) { @@ -746,7 +806,7 @@ func (this *QTextLayout__FormatRange) OperatorAssign(param1 *QTextLayout__Format // Delete this object from C++ memory. func (this *QTextLayout__FormatRange) Delete() { - C.QTextLayout__FormatRange_Delete(this.h) + C.QTextLayout__FormatRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextlayout.h b/qt6/gen_qtextlayout.h index 82587a28..dd006eac 100644 --- a/qt6/gen_qtextlayout.h +++ b/qt6/gen_qtextlayout.h @@ -50,7 +50,7 @@ typedef struct QTextLine QTextLine; typedef struct QTextOption QTextOption; #endif -QTextInlineObject* QTextInlineObject_new(); +void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject); bool QTextInlineObject_IsValid(const QTextInlineObject* self); QRectF* QTextInlineObject_Rect(const QTextInlineObject* self); double QTextInlineObject_Width(const QTextInlineObject* self); @@ -64,13 +64,13 @@ void QTextInlineObject_SetDescent(QTextInlineObject* self, double d); int QTextInlineObject_TextPosition(const QTextInlineObject* self); int QTextInlineObject_FormatIndex(const QTextInlineObject* self); QTextFormat* QTextInlineObject_Format(const QTextInlineObject* self); -void QTextInlineObject_Delete(QTextInlineObject* self); +void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass); -QTextLayout* QTextLayout_new(); -QTextLayout* QTextLayout_new2(struct miqt_string text); -QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font); -QTextLayout* QTextLayout_new4(QTextBlock* b); -QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice); +void QTextLayout_new(QTextLayout** outptr_QTextLayout); +void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout); +void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout); +void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout); +void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout); void QTextLayout_SetFont(QTextLayout* self, QFont* f); QFont* QTextLayout_Font(const QTextLayout* self); void QTextLayout_SetRawFont(QTextLayout* self, QRawFont* rawFont); @@ -116,9 +116,9 @@ void QTextLayout_Draw3(const QTextLayout* self, QPainter* p, QPointF* pos, struc void QTextLayout_Draw4(const QTextLayout* self, QPainter* p, QPointF* pos, struct miqt_array /* of QTextLayout__FormatRange* */ selections, QRectF* clip); struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns1(const QTextLayout* self, int from); struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns2(const QTextLayout* self, int from, int length); -void QTextLayout_Delete(QTextLayout* self); +void QTextLayout_Delete(QTextLayout* self, bool isSubclass); -QTextLine* QTextLine_new(); +void QTextLine_new(QTextLine** outptr_QTextLine); bool QTextLine_IsValid(const QTextLine* self); QRectF* QTextLine_Rect(const QTextLine* self); double QTextLine_X(const QTextLine* self); @@ -151,11 +151,11 @@ double QTextLine_CursorToX22(const QTextLine* self, int cursorPos, int edge); int QTextLine_XToCursor2(const QTextLine* self, double x, int param2); struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns1(const QTextLine* self, int from); struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns2(const QTextLine* self, int from, int length); -void QTextLine_Delete(QTextLine* self); +void QTextLine_Delete(QTextLine* self, bool isSubclass); -QTextLayout__FormatRange* QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1); +void QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1, QTextLayout__FormatRange** outptr_QTextLayout__FormatRange); void QTextLayout__FormatRange_OperatorAssign(QTextLayout__FormatRange* self, QTextLayout__FormatRange* param1); -void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self); +void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextlist.cpp b/qt6/gen_qtextlist.cpp index 94887e10..096c1832 100644 --- a/qt6/gen_qtextlist.cpp +++ b/qt6/gen_qtextlist.cpp @@ -1,17 +1,111 @@ #include +#include #include #include #include #include +#include #include #include #include +#include #include #include "gen_qtextlist.h" #include "_cgo_export.h" -QTextList* QTextList_new(QTextDocument* doc) { - return new QTextList(doc); +class MiqtVirtualQTextList : public virtual QTextList { +public: + + MiqtVirtualQTextList(QTextDocument* doc): QTextList(doc) {}; + + virtual ~MiqtVirtualQTextList() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void blockInserted(const QTextBlock& block) override { + if (handle__BlockInserted == 0) { + QTextList::blockInserted(block); + return; + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + miqt_exec_callback_QTextList_BlockInserted(this, handle__BlockInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BlockInserted(QTextBlock* block) { + + QTextList::blockInserted(*block); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void blockRemoved(const QTextBlock& block) override { + if (handle__BlockRemoved == 0) { + QTextList::blockRemoved(block); + return; + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + miqt_exec_callback_QTextList_BlockRemoved(this, handle__BlockRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BlockRemoved(QTextBlock* block) { + + QTextList::blockRemoved(*block); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BlockFormatChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void blockFormatChanged(const QTextBlock& block) override { + if (handle__BlockFormatChanged == 0) { + QTextList::blockFormatChanged(block); + return; + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + miqt_exec_callback_QTextList_BlockFormatChanged(this, handle__BlockFormatChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_BlockFormatChanged(QTextBlock* block) { + + QTextList::blockFormatChanged(*block); + + } + +}; + +void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { + MiqtVirtualQTextList* ret = new MiqtVirtualQTextList(doc); + *outptr_QTextList = ret; + *outptr_QTextBlockGroup = static_cast(ret); + *outptr_QTextObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTextList_MetaObject(const QTextList* self) { @@ -98,7 +192,35 @@ struct miqt_string QTextList_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTextList_Delete(QTextList* self) { - delete self; +void QTextList_override_virtual_BlockInserted(void* self, intptr_t slot) { + dynamic_cast( (QTextList*)(self) )->handle__BlockInserted = slot; +} + +void QTextList_virtualbase_BlockInserted(void* self, QTextBlock* block) { + ( (MiqtVirtualQTextList*)(self) )->virtualbase_BlockInserted(block); +} + +void QTextList_override_virtual_BlockRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTextList*)(self) )->handle__BlockRemoved = slot; +} + +void QTextList_virtualbase_BlockRemoved(void* self, QTextBlock* block) { + ( (MiqtVirtualQTextList*)(self) )->virtualbase_BlockRemoved(block); +} + +void QTextList_override_virtual_BlockFormatChanged(void* self, intptr_t slot) { + dynamic_cast( (QTextList*)(self) )->handle__BlockFormatChanged = slot; +} + +void QTextList_virtualbase_BlockFormatChanged(void* self, QTextBlock* block) { + ( (MiqtVirtualQTextList*)(self) )->virtualbase_BlockFormatChanged(block); +} + +void QTextList_Delete(QTextList* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextlist.go b/qt6/gen_qtextlist.go index 4c999fc6..d4bab5f1 100644 --- a/qt6/gen_qtextlist.go +++ b/qt6/gen_qtextlist.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTextList struct { - h *C.QTextList + h *C.QTextList + isSubclass bool *QTextBlockGroup } @@ -32,21 +34,36 @@ func (this *QTextList) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextList(h *C.QTextList) *QTextList { +// newQTextList constructs the type using only CGO pointers. +func newQTextList(h *C.QTextList, h_QTextBlockGroup *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextList { if h == nil { return nil } - return &QTextList{h: h, QTextBlockGroup: UnsafeNewQTextBlockGroup(unsafe.Pointer(h))} + return &QTextList{h: h, + QTextBlockGroup: newQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} } -func UnsafeNewQTextList(h unsafe.Pointer) *QTextList { - return newQTextList((*C.QTextList)(h)) +// UnsafeNewQTextList constructs the type using only unsafe pointers. +func UnsafeNewQTextList(h unsafe.Pointer, h_QTextBlockGroup unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextList { + if h == nil { + return nil + } + + return &QTextList{h: (*C.QTextList)(h), + QTextBlockGroup: UnsafeNewQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} } // NewQTextList constructs a new QTextList object. func NewQTextList(doc *QTextDocument) *QTextList { - ret := C.QTextList_new(doc.cPointer()) - return newQTextList(ret) + var outptr_QTextList *C.QTextList = nil + var outptr_QTextBlockGroup *C.QTextBlockGroup = nil + var outptr_QTextObject *C.QTextObject = nil + var outptr_QObject *C.QObject = nil + + C.QTextList_new(doc.cPointer(), &outptr_QTextList, &outptr_QTextBlockGroup, &outptr_QTextObject, &outptr_QObject) + ret := newQTextList(outptr_QTextList, outptr_QTextBlockGroup, outptr_QTextObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextList) MetaObject() *QMetaObject { @@ -108,7 +125,7 @@ func (this *QTextList) SetFormat(format *QTextListFormat) { func (this *QTextList) Format() *QTextListFormat { _ret := C.QTextList_Format(this.h) - _goptr := newQTextListFormat(_ret) + _goptr := newQTextListFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -135,9 +152,78 @@ func QTextList_Tr3(s string, c string, n int) string { return _ret } +func (this *QTextList) callVirtualBase_BlockInserted(block *QTextBlock) { + + C.QTextList_virtualbase_BlockInserted(unsafe.Pointer(this.h), block.cPointer()) + +} +func (this *QTextList) OnBlockInserted(slot func(super func(block *QTextBlock), block *QTextBlock)) { + C.QTextList_override_virtual_BlockInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextList_BlockInserted +func miqt_exec_callback_QTextList_BlockInserted(self *C.QTextList, cb C.intptr_t, block *C.QTextBlock) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock), block *QTextBlock)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + gofunc((&QTextList{h: self}).callVirtualBase_BlockInserted, slotval1) + +} + +func (this *QTextList) callVirtualBase_BlockRemoved(block *QTextBlock) { + + C.QTextList_virtualbase_BlockRemoved(unsafe.Pointer(this.h), block.cPointer()) + +} +func (this *QTextList) OnBlockRemoved(slot func(super func(block *QTextBlock), block *QTextBlock)) { + C.QTextList_override_virtual_BlockRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextList_BlockRemoved +func miqt_exec_callback_QTextList_BlockRemoved(self *C.QTextList, cb C.intptr_t, block *C.QTextBlock) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock), block *QTextBlock)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + gofunc((&QTextList{h: self}).callVirtualBase_BlockRemoved, slotval1) + +} + +func (this *QTextList) callVirtualBase_BlockFormatChanged(block *QTextBlock) { + + C.QTextList_virtualbase_BlockFormatChanged(unsafe.Pointer(this.h), block.cPointer()) + +} +func (this *QTextList) OnBlockFormatChanged(slot func(super func(block *QTextBlock), block *QTextBlock)) { + C.QTextList_override_virtual_BlockFormatChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTextList_BlockFormatChanged +func miqt_exec_callback_QTextList_BlockFormatChanged(self *C.QTextList, cb C.intptr_t, block *C.QTextBlock) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(block *QTextBlock), block *QTextBlock)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextBlock(unsafe.Pointer(block)) + + gofunc((&QTextList{h: self}).callVirtualBase_BlockFormatChanged, slotval1) + +} + // Delete this object from C++ memory. func (this *QTextList) Delete() { - C.QTextList_Delete(this.h) + C.QTextList_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextlist.h b/qt6/gen_qtextlist.h index 91f1603e..51569f37 100644 --- a/qt6/gen_qtextlist.h +++ b/qt6/gen_qtextlist.h @@ -16,19 +16,25 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QTextBlock; +class QTextBlockGroup; class QTextDocument; class QTextList; class QTextListFormat; +class QTextObject; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QTextBlock QTextBlock; +typedef struct QTextBlockGroup QTextBlockGroup; typedef struct QTextDocument QTextDocument; typedef struct QTextList QTextList; typedef struct QTextListFormat QTextListFormat; +typedef struct QTextObject QTextObject; #endif -QTextList* QTextList_new(QTextDocument* doc); +void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject); QMetaObject* QTextList_MetaObject(const QTextList* self); void* QTextList_Metacast(QTextList* self, const char* param1); struct miqt_string QTextList_Tr(const char* s); @@ -43,7 +49,13 @@ void QTextList_SetFormat(QTextList* self, QTextListFormat* format); QTextListFormat* QTextList_Format(const QTextList* self); struct miqt_string QTextList_Tr2(const char* s, const char* c); struct miqt_string QTextList_Tr3(const char* s, const char* c, int n); -void QTextList_Delete(QTextList* self); +void QTextList_override_virtual_BlockInserted(void* self, intptr_t slot); +void QTextList_virtualbase_BlockInserted(void* self, QTextBlock* block); +void QTextList_override_virtual_BlockRemoved(void* self, intptr_t slot); +void QTextList_virtualbase_BlockRemoved(void* self, QTextBlock* block); +void QTextList_override_virtual_BlockFormatChanged(void* self, intptr_t slot); +void QTextList_virtualbase_BlockFormatChanged(void* self, QTextBlock* block); +void QTextList_Delete(QTextList* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextobject.cpp b/qt6/gen_qtextobject.cpp index 91557a51..de7089f8 100644 --- a/qt6/gen_qtextobject.cpp +++ b/qt6/gen_qtextobject.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -128,12 +129,19 @@ void QTextFrameLayoutData_OperatorAssign(QTextFrameLayoutData* self, QTextFrameL self->operator=(*param1); } -void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self) { - delete self; +void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFrame* QTextFrame_new(QTextDocument* doc) { - return new QTextFrame(doc); +void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { + QTextFrame* ret = new QTextFrame(doc); + *outptr_QTextFrame = ret; + *outptr_QTextObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTextFrame_MetaObject(const QTextFrame* self) { @@ -234,24 +242,34 @@ struct miqt_string QTextFrame_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTextFrame_Delete(QTextFrame* self) { - delete self; +void QTextFrame_Delete(QTextFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } void QTextBlockUserData_OperatorAssign(QTextBlockUserData* self, QTextBlockUserData* param1) { self->operator=(*param1); } -void QTextBlockUserData_Delete(QTextBlockUserData* self) { - delete self; +void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextBlock* QTextBlock_new() { - return new QTextBlock(); +void QTextBlock_new(QTextBlock** outptr_QTextBlock) { + QTextBlock* ret = new QTextBlock(); + *outptr_QTextBlock = ret; } -QTextBlock* QTextBlock_new2(QTextBlock* o) { - return new QTextBlock(*o); +void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock) { + QTextBlock* ret = new QTextBlock(*o); + *outptr_QTextBlock = ret; } void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o) { @@ -415,16 +433,22 @@ int QTextBlock_FragmentIndex(const QTextBlock* self) { return self->fragmentIndex(); } -void QTextBlock_Delete(QTextBlock* self) { - delete self; +void QTextBlock_Delete(QTextBlock* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFragment* QTextFragment_new() { - return new QTextFragment(); +void QTextFragment_new(QTextFragment** outptr_QTextFragment) { + QTextFragment* ret = new QTextFragment(); + *outptr_QTextFragment = ret; } -QTextFragment* QTextFragment_new2(QTextFragment* o) { - return new QTextFragment(*o); +void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment) { + QTextFragment* ret = new QTextFragment(*o); + *outptr_QTextFragment = ret; } void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o) { @@ -517,16 +541,22 @@ struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns2(const QTextFragm return _out; } -void QTextFragment_Delete(QTextFragment* self) { - delete self; +void QTextFragment_Delete(QTextFragment* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextFrame__iterator* QTextFrame__iterator_new() { - return new QTextFrame::iterator(); +void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator) { + QTextFrame::iterator* ret = new QTextFrame::iterator(); + *outptr_QTextFrame__iterator = ret; } -QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* param1) { - return new QTextFrame::iterator(*param1); +void QTextFrame__iterator_new2(QTextFrame__iterator* param1, QTextFrame__iterator** outptr_QTextFrame__iterator) { + QTextFrame::iterator* ret = new QTextFrame::iterator(*param1); + *outptr_QTextFrame__iterator = ret; } QTextFrame* QTextFrame__iterator_ParentFrame(const QTextFrame__iterator* self) { @@ -573,16 +603,22 @@ QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinusWithInt(QTextFrame_ return new QTextFrame::iterator(self->operator--(static_cast(param1))); } -void QTextFrame__iterator_Delete(QTextFrame__iterator* self) { - delete self; +void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextBlock__iterator* QTextBlock__iterator_new() { - return new QTextBlock::iterator(); +void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator) { + QTextBlock::iterator* ret = new QTextBlock::iterator(); + *outptr_QTextBlock__iterator = ret; } -QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* param1) { - return new QTextBlock::iterator(*param1); +void QTextBlock__iterator_new2(QTextBlock__iterator* param1, QTextBlock__iterator** outptr_QTextBlock__iterator) { + QTextBlock::iterator* ret = new QTextBlock::iterator(*param1); + *outptr_QTextBlock__iterator = ret; } QTextFragment* QTextBlock__iterator_Fragment(const QTextBlock__iterator* self) { @@ -621,7 +657,11 @@ QTextBlock__iterator* QTextBlock__iterator_OperatorMinusMinusWithInt(QTextBlock_ return new QTextBlock::iterator(self->operator--(static_cast(param1))); } -void QTextBlock__iterator_Delete(QTextBlock__iterator* self) { - delete self; +void QTextBlock__iterator_Delete(QTextBlock__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextobject.go b/qt6/gen_qtextobject.go index fdc50a60..e519b340 100644 --- a/qt6/gen_qtextobject.go +++ b/qt6/gen_qtextobject.go @@ -14,7 +14,8 @@ import ( ) type QTextObject struct { - h *C.QTextObject + h *C.QTextObject + isSubclass bool *QObject } @@ -32,15 +33,23 @@ func (this *QTextObject) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextObject(h *C.QTextObject) *QTextObject { +// newQTextObject constructs the type using only CGO pointers. +func newQTextObject(h *C.QTextObject, h_QObject *C.QObject) *QTextObject { if h == nil { return nil } - return &QTextObject{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTextObject{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTextObject(h unsafe.Pointer) *QTextObject { - return newQTextObject((*C.QTextObject)(h)) +// UnsafeNewQTextObject constructs the type using only unsafe pointers. +func UnsafeNewQTextObject(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextObject { + if h == nil { + return nil + } + + return &QTextObject{h: (*C.QTextObject)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QTextObject) MetaObject() *QMetaObject { @@ -74,7 +83,7 @@ func (this *QTextObject) FormatIndex() int { } func (this *QTextObject) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextObject_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextObject_Document(this.h)), nil) } func (this *QTextObject) ObjectIndex() int { @@ -104,7 +113,8 @@ func QTextObject_Tr3(s string, c string, n int) string { } type QTextBlockGroup struct { - h *C.QTextBlockGroup + h *C.QTextBlockGroup + isSubclass bool *QTextObject } @@ -122,15 +132,23 @@ func (this *QTextBlockGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextBlockGroup(h *C.QTextBlockGroup) *QTextBlockGroup { +// newQTextBlockGroup constructs the type using only CGO pointers. +func newQTextBlockGroup(h *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextBlockGroup { if h == nil { return nil } - return &QTextBlockGroup{h: h, QTextObject: UnsafeNewQTextObject(unsafe.Pointer(h))} + return &QTextBlockGroup{h: h, + QTextObject: newQTextObject(h_QTextObject, h_QObject)} } -func UnsafeNewQTextBlockGroup(h unsafe.Pointer) *QTextBlockGroup { - return newQTextBlockGroup((*C.QTextBlockGroup)(h)) +// UnsafeNewQTextBlockGroup constructs the type using only unsafe pointers. +func UnsafeNewQTextBlockGroup(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextBlockGroup { + if h == nil { + return nil + } + + return &QTextBlockGroup{h: (*C.QTextBlockGroup)(h), + QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} } func (this *QTextBlockGroup) MetaObject() *QMetaObject { @@ -175,7 +193,8 @@ func QTextBlockGroup_Tr3(s string, c string, n int) string { } type QTextFrameLayoutData struct { - h *C.QTextFrameLayoutData + h *C.QTextFrameLayoutData + isSubclass bool } func (this *QTextFrameLayoutData) cPointer() *C.QTextFrameLayoutData { @@ -192,6 +211,7 @@ func (this *QTextFrameLayoutData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFrameLayoutData constructs the type using only CGO pointers. func newQTextFrameLayoutData(h *C.QTextFrameLayoutData) *QTextFrameLayoutData { if h == nil { return nil @@ -199,8 +219,13 @@ func newQTextFrameLayoutData(h *C.QTextFrameLayoutData) *QTextFrameLayoutData { return &QTextFrameLayoutData{h: h} } +// UnsafeNewQTextFrameLayoutData constructs the type using only unsafe pointers. func UnsafeNewQTextFrameLayoutData(h unsafe.Pointer) *QTextFrameLayoutData { - return newQTextFrameLayoutData((*C.QTextFrameLayoutData)(h)) + if h == nil { + return nil + } + + return &QTextFrameLayoutData{h: (*C.QTextFrameLayoutData)(h)} } func (this *QTextFrameLayoutData) OperatorAssign(param1 *QTextFrameLayoutData) { @@ -209,7 +234,7 @@ func (this *QTextFrameLayoutData) OperatorAssign(param1 *QTextFrameLayoutData) { // Delete this object from C++ memory. func (this *QTextFrameLayoutData) Delete() { - C.QTextFrameLayoutData_Delete(this.h) + C.QTextFrameLayoutData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -222,7 +247,8 @@ func (this *QTextFrameLayoutData) GoGC() { } type QTextFrame struct { - h *C.QTextFrame + h *C.QTextFrame + isSubclass bool *QTextObject } @@ -240,21 +266,35 @@ func (this *QTextFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextFrame(h *C.QTextFrame) *QTextFrame { +// newQTextFrame constructs the type using only CGO pointers. +func newQTextFrame(h *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextFrame { if h == nil { return nil } - return &QTextFrame{h: h, QTextObject: UnsafeNewQTextObject(unsafe.Pointer(h))} + return &QTextFrame{h: h, + QTextObject: newQTextObject(h_QTextObject, h_QObject)} } -func UnsafeNewQTextFrame(h unsafe.Pointer) *QTextFrame { - return newQTextFrame((*C.QTextFrame)(h)) +// UnsafeNewQTextFrame constructs the type using only unsafe pointers. +func UnsafeNewQTextFrame(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextFrame { + if h == nil { + return nil + } + + return &QTextFrame{h: (*C.QTextFrame)(h), + QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} } // NewQTextFrame constructs a new QTextFrame object. func NewQTextFrame(doc *QTextDocument) *QTextFrame { - ret := C.QTextFrame_new(doc.cPointer()) - return newQTextFrame(ret) + var outptr_QTextFrame *C.QTextFrame = nil + var outptr_QTextObject *C.QTextObject = nil + var outptr_QObject *C.QObject = nil + + C.QTextFrame_new(doc.cPointer(), &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) + ret := newQTextFrame(outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextFrame) MetaObject() *QMetaObject { @@ -282,7 +322,7 @@ func (this *QTextFrame) SetFrameFormat(format *QTextFrameFormat) { func (this *QTextFrame) FrameFormat() *QTextFrameFormat { _ret := C.QTextFrame_FrameFormat(this.h) - _goptr := newQTextFrameFormat(_ret) + _goptr := newQTextFrameFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -322,13 +362,13 @@ func (this *QTextFrame) ChildFrames() []*QTextFrame { _ret := make([]*QTextFrame, int(_ma.len)) _outCast := (*[0xffff]*C.QTextFrame)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQTextFrame(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQTextFrame(unsafe.Pointer(_outCast[i]), nil, nil) } return _ret } func (this *QTextFrame) ParentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame_ParentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame_ParentFrame(this.h)), nil, nil) } func (this *QTextFrame) Begin() *QTextFrame__iterator { @@ -369,7 +409,7 @@ func QTextFrame_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTextFrame) Delete() { - C.QTextFrame_Delete(this.h) + C.QTextFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -382,7 +422,8 @@ func (this *QTextFrame) GoGC() { } type QTextBlockUserData struct { - h *C.QTextBlockUserData + h *C.QTextBlockUserData + isSubclass bool } func (this *QTextBlockUserData) cPointer() *C.QTextBlockUserData { @@ -399,6 +440,7 @@ func (this *QTextBlockUserData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBlockUserData constructs the type using only CGO pointers. func newQTextBlockUserData(h *C.QTextBlockUserData) *QTextBlockUserData { if h == nil { return nil @@ -406,8 +448,13 @@ func newQTextBlockUserData(h *C.QTextBlockUserData) *QTextBlockUserData { return &QTextBlockUserData{h: h} } +// UnsafeNewQTextBlockUserData constructs the type using only unsafe pointers. func UnsafeNewQTextBlockUserData(h unsafe.Pointer) *QTextBlockUserData { - return newQTextBlockUserData((*C.QTextBlockUserData)(h)) + if h == nil { + return nil + } + + return &QTextBlockUserData{h: (*C.QTextBlockUserData)(h)} } func (this *QTextBlockUserData) OperatorAssign(param1 *QTextBlockUserData) { @@ -416,7 +463,7 @@ func (this *QTextBlockUserData) OperatorAssign(param1 *QTextBlockUserData) { // Delete this object from C++ memory. func (this *QTextBlockUserData) Delete() { - C.QTextBlockUserData_Delete(this.h) + C.QTextBlockUserData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -429,7 +476,8 @@ func (this *QTextBlockUserData) GoGC() { } type QTextBlock struct { - h *C.QTextBlock + h *C.QTextBlock + isSubclass bool } func (this *QTextBlock) cPointer() *C.QTextBlock { @@ -446,6 +494,7 @@ func (this *QTextBlock) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBlock constructs the type using only CGO pointers. func newQTextBlock(h *C.QTextBlock) *QTextBlock { if h == nil { return nil @@ -453,20 +502,33 @@ func newQTextBlock(h *C.QTextBlock) *QTextBlock { return &QTextBlock{h: h} } +// UnsafeNewQTextBlock constructs the type using only unsafe pointers. func UnsafeNewQTextBlock(h unsafe.Pointer) *QTextBlock { - return newQTextBlock((*C.QTextBlock)(h)) + if h == nil { + return nil + } + + return &QTextBlock{h: (*C.QTextBlock)(h)} } // NewQTextBlock constructs a new QTextBlock object. func NewQTextBlock() *QTextBlock { - ret := C.QTextBlock_new() - return newQTextBlock(ret) + var outptr_QTextBlock *C.QTextBlock = nil + + C.QTextBlock_new(&outptr_QTextBlock) + ret := newQTextBlock(outptr_QTextBlock) + ret.isSubclass = true + return ret } // NewQTextBlock2 constructs a new QTextBlock object. func NewQTextBlock2(o *QTextBlock) *QTextBlock { - ret := C.QTextBlock_new2(o.cPointer()) - return newQTextBlock(ret) + var outptr_QTextBlock *C.QTextBlock = nil + + C.QTextBlock_new2(o.cPointer(), &outptr_QTextBlock) + ret := newQTextBlock(outptr_QTextBlock) + ret.isSubclass = true + return ret } func (this *QTextBlock) OperatorAssign(o *QTextBlock) { @@ -511,7 +573,7 @@ func (this *QTextBlock) ClearLayout() { func (this *QTextBlock) BlockFormat() *QTextBlockFormat { _ret := C.QTextBlock_BlockFormat(this.h) - _goptr := newQTextBlockFormat(_ret) + _goptr := newQTextBlockFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -522,7 +584,7 @@ func (this *QTextBlock) BlockFormatIndex() int { func (this *QTextBlock) CharFormat() *QTextCharFormat { _ret := C.QTextBlock_CharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -556,11 +618,11 @@ func (this *QTextBlock) TextFormats() []QTextLayout__FormatRange { } func (this *QTextBlock) Document() *QTextDocument { - return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextBlock_Document(this.h))) + return UnsafeNewQTextDocument(unsafe.Pointer(C.QTextBlock_Document(this.h)), nil) } func (this *QTextBlock) TextList() *QTextList { - return UnsafeNewQTextList(unsafe.Pointer(C.QTextBlock_TextList(this.h))) + return UnsafeNewQTextList(unsafe.Pointer(C.QTextBlock_TextList(this.h)), nil, nil, nil) } func (this *QTextBlock) UserData() *QTextBlockUserData { @@ -645,7 +707,7 @@ func (this *QTextBlock) FragmentIndex() int { // Delete this object from C++ memory. func (this *QTextBlock) Delete() { - C.QTextBlock_Delete(this.h) + C.QTextBlock_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -658,7 +720,8 @@ func (this *QTextBlock) GoGC() { } type QTextFragment struct { - h *C.QTextFragment + h *C.QTextFragment + isSubclass bool } func (this *QTextFragment) cPointer() *C.QTextFragment { @@ -675,6 +738,7 @@ func (this *QTextFragment) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFragment constructs the type using only CGO pointers. func newQTextFragment(h *C.QTextFragment) *QTextFragment { if h == nil { return nil @@ -682,20 +746,33 @@ func newQTextFragment(h *C.QTextFragment) *QTextFragment { return &QTextFragment{h: h} } +// UnsafeNewQTextFragment constructs the type using only unsafe pointers. func UnsafeNewQTextFragment(h unsafe.Pointer) *QTextFragment { - return newQTextFragment((*C.QTextFragment)(h)) + if h == nil { + return nil + } + + return &QTextFragment{h: (*C.QTextFragment)(h)} } // NewQTextFragment constructs a new QTextFragment object. func NewQTextFragment() *QTextFragment { - ret := C.QTextFragment_new() - return newQTextFragment(ret) + var outptr_QTextFragment *C.QTextFragment = nil + + C.QTextFragment_new(&outptr_QTextFragment) + ret := newQTextFragment(outptr_QTextFragment) + ret.isSubclass = true + return ret } // NewQTextFragment2 constructs a new QTextFragment object. func NewQTextFragment2(o *QTextFragment) *QTextFragment { - ret := C.QTextFragment_new2(o.cPointer()) - return newQTextFragment(ret) + var outptr_QTextFragment *C.QTextFragment = nil + + C.QTextFragment_new2(o.cPointer(), &outptr_QTextFragment) + ret := newQTextFragment(outptr_QTextFragment) + ret.isSubclass = true + return ret } func (this *QTextFragment) OperatorAssign(o *QTextFragment) { @@ -732,7 +809,7 @@ func (this *QTextFragment) Contains(position int) bool { func (this *QTextFragment) CharFormat() *QTextCharFormat { _ret := C.QTextFragment_CharFormat(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -789,7 +866,7 @@ func (this *QTextFragment) GlyphRuns2(from int, length int) []QGlyphRun { // Delete this object from C++ memory. func (this *QTextFragment) Delete() { - C.QTextFragment_Delete(this.h) + C.QTextFragment_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -802,7 +879,8 @@ func (this *QTextFragment) GoGC() { } type QTextFrame__iterator struct { - h *C.QTextFrame__iterator + h *C.QTextFrame__iterator + isSubclass bool } func (this *QTextFrame__iterator) cPointer() *C.QTextFrame__iterator { @@ -819,6 +897,7 @@ func (this *QTextFrame__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextFrame__iterator constructs the type using only CGO pointers. func newQTextFrame__iterator(h *C.QTextFrame__iterator) *QTextFrame__iterator { if h == nil { return nil @@ -826,28 +905,41 @@ func newQTextFrame__iterator(h *C.QTextFrame__iterator) *QTextFrame__iterator { return &QTextFrame__iterator{h: h} } +// UnsafeNewQTextFrame__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextFrame__iterator(h unsafe.Pointer) *QTextFrame__iterator { - return newQTextFrame__iterator((*C.QTextFrame__iterator)(h)) + if h == nil { + return nil + } + + return &QTextFrame__iterator{h: (*C.QTextFrame__iterator)(h)} } // NewQTextFrame__iterator constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator() *QTextFrame__iterator { - ret := C.QTextFrame__iterator_new() - return newQTextFrame__iterator(ret) + var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil + + C.QTextFrame__iterator_new(&outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret.isSubclass = true + return ret } // NewQTextFrame__iterator2 constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator2(param1 *QTextFrame__iterator) *QTextFrame__iterator { - ret := C.QTextFrame__iterator_new2(param1.cPointer()) - return newQTextFrame__iterator(ret) + var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil + + C.QTextFrame__iterator_new2(param1.cPointer(), &outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret.isSubclass = true + return ret } func (this *QTextFrame__iterator) ParentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_ParentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_ParentFrame(this.h)), nil, nil) } func (this *QTextFrame__iterator) CurrentFrame() *QTextFrame { - return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_CurrentFrame(this.h))) + return UnsafeNewQTextFrame(unsafe.Pointer(C.QTextFrame__iterator_CurrentFrame(this.h)), nil, nil) } func (this *QTextFrame__iterator) CurrentBlock() *QTextBlock { @@ -893,7 +985,7 @@ func (this *QTextFrame__iterator) OperatorMinusMinusWithInt(param1 int) *QTextFr // Delete this object from C++ memory. func (this *QTextFrame__iterator) Delete() { - C.QTextFrame__iterator_Delete(this.h) + C.QTextFrame__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -906,7 +998,8 @@ func (this *QTextFrame__iterator) GoGC() { } type QTextBlock__iterator struct { - h *C.QTextBlock__iterator + h *C.QTextBlock__iterator + isSubclass bool } func (this *QTextBlock__iterator) cPointer() *C.QTextBlock__iterator { @@ -923,6 +1016,7 @@ func (this *QTextBlock__iterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextBlock__iterator constructs the type using only CGO pointers. func newQTextBlock__iterator(h *C.QTextBlock__iterator) *QTextBlock__iterator { if h == nil { return nil @@ -930,20 +1024,33 @@ func newQTextBlock__iterator(h *C.QTextBlock__iterator) *QTextBlock__iterator { return &QTextBlock__iterator{h: h} } +// UnsafeNewQTextBlock__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextBlock__iterator(h unsafe.Pointer) *QTextBlock__iterator { - return newQTextBlock__iterator((*C.QTextBlock__iterator)(h)) + if h == nil { + return nil + } + + return &QTextBlock__iterator{h: (*C.QTextBlock__iterator)(h)} } // NewQTextBlock__iterator constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator() *QTextBlock__iterator { - ret := C.QTextBlock__iterator_new() - return newQTextBlock__iterator(ret) + var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil + + C.QTextBlock__iterator_new(&outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret.isSubclass = true + return ret } // NewQTextBlock__iterator2 constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator2(param1 *QTextBlock__iterator) *QTextBlock__iterator { - ret := C.QTextBlock__iterator_new2(param1.cPointer()) - return newQTextBlock__iterator(ret) + var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil + + C.QTextBlock__iterator_new2(param1.cPointer(), &outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret.isSubclass = true + return ret } func (this *QTextBlock__iterator) Fragment() *QTextFragment { @@ -989,7 +1096,7 @@ func (this *QTextBlock__iterator) OperatorMinusMinusWithInt(param1 int) *QTextBl // Delete this object from C++ memory. func (this *QTextBlock__iterator) Delete() { - C.QTextBlock__iterator_Delete(this.h) + C.QTextBlock__iterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextobject.h b/qt6/gen_qtextobject.h index d4076b37..33a793c1 100644 --- a/qt6/gen_qtextobject.h +++ b/qt6/gen_qtextobject.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QGlyphRun; class QMetaObject; +class QObject; class QTextBlock; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTextBlock__iterator) typedef QTextBlock::iterator QTextBlock__iterator; @@ -50,6 +51,7 @@ class QTextObject; #else typedef struct QGlyphRun QGlyphRun; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QTextBlock QTextBlock; typedef struct QTextBlock__iterator QTextBlock__iterator; typedef struct QTextBlockFormat QTextBlockFormat; @@ -83,13 +85,16 @@ struct miqt_string QTextObject_Tr3(const char* s, const char* c, int n); QMetaObject* QTextBlockGroup_MetaObject(const QTextBlockGroup* self); void* QTextBlockGroup_Metacast(QTextBlockGroup* self, const char* param1); struct miqt_string QTextBlockGroup_Tr(const char* s); +void QTextBlockGroup_BlockInserted(QTextBlockGroup* self, QTextBlock* block); +void QTextBlockGroup_BlockRemoved(QTextBlockGroup* self, QTextBlock* block); +void QTextBlockGroup_BlockFormatChanged(QTextBlockGroup* self, QTextBlock* block); struct miqt_string QTextBlockGroup_Tr2(const char* s, const char* c); struct miqt_string QTextBlockGroup_Tr3(const char* s, const char* c, int n); void QTextFrameLayoutData_OperatorAssign(QTextFrameLayoutData* self, QTextFrameLayoutData* param1); -void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self); +void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass); -QTextFrame* QTextFrame_new(QTextDocument* doc); +void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); QMetaObject* QTextFrame_MetaObject(const QTextFrame* self); void* QTextFrame_Metacast(QTextFrame* self, const char* param1); struct miqt_string QTextFrame_Tr(const char* s); @@ -107,13 +112,13 @@ QTextFrame__iterator* QTextFrame_Begin(const QTextFrame* self); QTextFrame__iterator* QTextFrame_End(const QTextFrame* self); struct miqt_string QTextFrame_Tr2(const char* s, const char* c); struct miqt_string QTextFrame_Tr3(const char* s, const char* c, int n); -void QTextFrame_Delete(QTextFrame* self); +void QTextFrame_Delete(QTextFrame* self, bool isSubclass); void QTextBlockUserData_OperatorAssign(QTextBlockUserData* self, QTextBlockUserData* param1); -void QTextBlockUserData_Delete(QTextBlockUserData* self); +void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass); -QTextBlock* QTextBlock_new(); -QTextBlock* QTextBlock_new2(QTextBlock* o); +void QTextBlock_new(QTextBlock** outptr_QTextBlock); +void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock); void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o); bool QTextBlock_IsValid(const QTextBlock* self); bool QTextBlock_OperatorEqual(const QTextBlock* self, QTextBlock* o); @@ -150,10 +155,10 @@ QTextBlock__iterator* QTextBlock_End(const QTextBlock* self); QTextBlock* QTextBlock_Next(const QTextBlock* self); QTextBlock* QTextBlock_Previous(const QTextBlock* self); int QTextBlock_FragmentIndex(const QTextBlock* self); -void QTextBlock_Delete(QTextBlock* self); +void QTextBlock_Delete(QTextBlock* self, bool isSubclass); -QTextFragment* QTextFragment_new(); -QTextFragment* QTextFragment_new2(QTextFragment* o); +void QTextFragment_new(QTextFragment** outptr_QTextFragment); +void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment); void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o); bool QTextFragment_IsValid(const QTextFragment* self); bool QTextFragment_OperatorEqual(const QTextFragment* self, QTextFragment* o); @@ -168,10 +173,10 @@ struct miqt_string QTextFragment_Text(const QTextFragment* self); struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns(const QTextFragment* self); struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns1(const QTextFragment* self, int from); struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns2(const QTextFragment* self, int from, int length); -void QTextFragment_Delete(QTextFragment* self); +void QTextFragment_Delete(QTextFragment* self, bool isSubclass); -QTextFrame__iterator* QTextFrame__iterator_new(); -QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* param1); +void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator); +void QTextFrame__iterator_new2(QTextFrame__iterator* param1, QTextFrame__iterator** outptr_QTextFrame__iterator); QTextFrame* QTextFrame__iterator_ParentFrame(const QTextFrame__iterator* self); QTextFrame* QTextFrame__iterator_CurrentFrame(const QTextFrame__iterator* self); QTextBlock* QTextFrame__iterator_CurrentBlock(const QTextFrame__iterator* self); @@ -182,10 +187,10 @@ QTextFrame__iterator* QTextFrame__iterator_OperatorPlusPlus(QTextFrame__iterator QTextFrame__iterator* QTextFrame__iterator_OperatorPlusPlusWithInt(QTextFrame__iterator* self, int param1); QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinus(QTextFrame__iterator* self); QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinusWithInt(QTextFrame__iterator* self, int param1); -void QTextFrame__iterator_Delete(QTextFrame__iterator* self); +void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass); -QTextBlock__iterator* QTextBlock__iterator_new(); -QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* param1); +void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator); +void QTextBlock__iterator_new2(QTextBlock__iterator* param1, QTextBlock__iterator** outptr_QTextBlock__iterator); QTextFragment* QTextBlock__iterator_Fragment(const QTextBlock__iterator* self); bool QTextBlock__iterator_AtEnd(const QTextBlock__iterator* self); bool QTextBlock__iterator_OperatorEqual(const QTextBlock__iterator* self, QTextBlock__iterator* o); @@ -194,7 +199,7 @@ QTextBlock__iterator* QTextBlock__iterator_OperatorPlusPlus(QTextBlock__iterator QTextBlock__iterator* QTextBlock__iterator_OperatorPlusPlusWithInt(QTextBlock__iterator* self, int param1); QTextBlock__iterator* QTextBlock__iterator_OperatorMinusMinus(QTextBlock__iterator* self); QTextBlock__iterator* QTextBlock__iterator_OperatorMinusMinusWithInt(QTextBlock__iterator* self, int param1); -void QTextBlock__iterator_Delete(QTextBlock__iterator* self); +void QTextBlock__iterator_Delete(QTextBlock__iterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextoption.cpp b/qt6/gen_qtextoption.cpp index e54ef83c..54698db9 100644 --- a/qt6/gen_qtextoption.cpp +++ b/qt6/gen_qtextoption.cpp @@ -6,16 +6,19 @@ #include "gen_qtextoption.h" #include "_cgo_export.h" -QTextOption* QTextOption_new() { - return new QTextOption(); +void QTextOption_new(QTextOption** outptr_QTextOption) { + QTextOption* ret = new QTextOption(); + *outptr_QTextOption = ret; } -QTextOption* QTextOption_new2(int alignment) { - return new QTextOption(static_cast(alignment)); +void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption) { + QTextOption* ret = new QTextOption(static_cast(alignment)); + *outptr_QTextOption = ret; } -QTextOption* QTextOption_new3(QTextOption* o) { - return new QTextOption(*o); +void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption) { + QTextOption* ret = new QTextOption(*o); + *outptr_QTextOption = ret; } void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o) { @@ -121,20 +124,27 @@ bool QTextOption_UseDesignMetrics(const QTextOption* self) { return self->useDesignMetrics(); } -void QTextOption_Delete(QTextOption* self) { - delete self; +void QTextOption_Delete(QTextOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextOption__Tab* QTextOption__Tab_new() { - return new QTextOption::Tab(); +void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(); + *outptr_QTextOption__Tab = ret; } -QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType) { - return new QTextOption::Tab(static_cast(pos), static_cast(tabType)); +void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType)); + *outptr_QTextOption__Tab = ret; } -QTextOption__Tab* QTextOption__Tab_new3(double pos, int tabType, QChar* delim) { - return new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); +void QTextOption__Tab_new3(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab) { + QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); + *outptr_QTextOption__Tab = ret; } bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other) { @@ -145,7 +155,11 @@ bool QTextOption__Tab_OperatorNotEqual(const QTextOption__Tab* self, QTextOption return self->operator!=(*other); } -void QTextOption__Tab_Delete(QTextOption__Tab* self) { - delete self; +void QTextOption__Tab_Delete(QTextOption__Tab* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextoption.go b/qt6/gen_qtextoption.go index f24bc353..856d0d4a 100644 --- a/qt6/gen_qtextoption.go +++ b/qt6/gen_qtextoption.go @@ -44,7 +44,8 @@ const ( ) type QTextOption struct { - h *C.QTextOption + h *C.QTextOption + isSubclass bool } func (this *QTextOption) cPointer() *C.QTextOption { @@ -61,6 +62,7 @@ func (this *QTextOption) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextOption constructs the type using only CGO pointers. func newQTextOption(h *C.QTextOption) *QTextOption { if h == nil { return nil @@ -68,26 +70,43 @@ func newQTextOption(h *C.QTextOption) *QTextOption { return &QTextOption{h: h} } +// UnsafeNewQTextOption constructs the type using only unsafe pointers. func UnsafeNewQTextOption(h unsafe.Pointer) *QTextOption { - return newQTextOption((*C.QTextOption)(h)) + if h == nil { + return nil + } + + return &QTextOption{h: (*C.QTextOption)(h)} } // NewQTextOption constructs a new QTextOption object. func NewQTextOption() *QTextOption { - ret := C.QTextOption_new() - return newQTextOption(ret) + var outptr_QTextOption *C.QTextOption = nil + + C.QTextOption_new(&outptr_QTextOption) + ret := newQTextOption(outptr_QTextOption) + ret.isSubclass = true + return ret } // NewQTextOption2 constructs a new QTextOption object. func NewQTextOption2(alignment AlignmentFlag) *QTextOption { - ret := C.QTextOption_new2((C.int)(alignment)) - return newQTextOption(ret) + var outptr_QTextOption *C.QTextOption = nil + + C.QTextOption_new2((C.int)(alignment), &outptr_QTextOption) + ret := newQTextOption(outptr_QTextOption) + ret.isSubclass = true + return ret } // NewQTextOption3 constructs a new QTextOption object. func NewQTextOption3(o *QTextOption) *QTextOption { - ret := C.QTextOption_new3(o.cPointer()) - return newQTextOption(ret) + var outptr_QTextOption *C.QTextOption = nil + + C.QTextOption_new3(o.cPointer(), &outptr_QTextOption) + ret := newQTextOption(outptr_QTextOption) + ret.isSubclass = true + return ret } func (this *QTextOption) OperatorAssign(o *QTextOption) { @@ -187,7 +206,7 @@ func (this *QTextOption) UseDesignMetrics() bool { // Delete this object from C++ memory. func (this *QTextOption) Delete() { - C.QTextOption_Delete(this.h) + C.QTextOption_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -200,7 +219,8 @@ func (this *QTextOption) GoGC() { } type QTextOption__Tab struct { - h *C.QTextOption__Tab + h *C.QTextOption__Tab + isSubclass bool } func (this *QTextOption__Tab) cPointer() *C.QTextOption__Tab { @@ -217,6 +237,7 @@ func (this *QTextOption__Tab) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextOption__Tab constructs the type using only CGO pointers. func newQTextOption__Tab(h *C.QTextOption__Tab) *QTextOption__Tab { if h == nil { return nil @@ -224,26 +245,43 @@ func newQTextOption__Tab(h *C.QTextOption__Tab) *QTextOption__Tab { return &QTextOption__Tab{h: h} } +// UnsafeNewQTextOption__Tab constructs the type using only unsafe pointers. func UnsafeNewQTextOption__Tab(h unsafe.Pointer) *QTextOption__Tab { - return newQTextOption__Tab((*C.QTextOption__Tab)(h)) + if h == nil { + return nil + } + + return &QTextOption__Tab{h: (*C.QTextOption__Tab)(h)} } // NewQTextOption__Tab constructs a new QTextOption::Tab object. func NewQTextOption__Tab() *QTextOption__Tab { - ret := C.QTextOption__Tab_new() - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new(&outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } // NewQTextOption__Tab2 constructs a new QTextOption::Tab object. func NewQTextOption__Tab2(pos float64, tabType QTextOption__TabType) *QTextOption__Tab { - ret := C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType)) - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType), &outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } // NewQTextOption__Tab3 constructs a new QTextOption::Tab object. func NewQTextOption__Tab3(pos float64, tabType QTextOption__TabType, delim QChar) *QTextOption__Tab { - ret := C.QTextOption__Tab_new3((C.double)(pos), (C.int)(tabType), delim.cPointer()) - return newQTextOption__Tab(ret) + var outptr_QTextOption__Tab *C.QTextOption__Tab = nil + + C.QTextOption__Tab_new3((C.double)(pos), (C.int)(tabType), delim.cPointer(), &outptr_QTextOption__Tab) + ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret.isSubclass = true + return ret } func (this *QTextOption__Tab) OperatorEqual(other *QTextOption__Tab) bool { @@ -256,7 +294,7 @@ func (this *QTextOption__Tab) OperatorNotEqual(other *QTextOption__Tab) bool { // Delete this object from C++ memory. func (this *QTextOption__Tab) Delete() { - C.QTextOption__Tab_Delete(this.h) + C.QTextOption__Tab_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextoption.h b/qt6/gen_qtextoption.h index 58a4ac71..35da5585 100644 --- a/qt6/gen_qtextoption.h +++ b/qt6/gen_qtextoption.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTextOption__Tab QTextOption__Tab; #endif -QTextOption* QTextOption_new(); -QTextOption* QTextOption_new2(int alignment); -QTextOption* QTextOption_new3(QTextOption* o); +void QTextOption_new(QTextOption** outptr_QTextOption); +void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption); +void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption); void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o); void QTextOption_SetAlignment(QTextOption* self, int alignment); int QTextOption_Alignment(const QTextOption* self); @@ -48,14 +48,14 @@ void QTextOption_SetTabs(QTextOption* self, struct miqt_array /* of QTextOption_ struct miqt_array /* of QTextOption__Tab* */ QTextOption_Tabs(const QTextOption* self); void QTextOption_SetUseDesignMetrics(QTextOption* self, bool b); bool QTextOption_UseDesignMetrics(const QTextOption* self); -void QTextOption_Delete(QTextOption* self); +void QTextOption_Delete(QTextOption* self, bool isSubclass); -QTextOption__Tab* QTextOption__Tab_new(); -QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType); -QTextOption__Tab* QTextOption__Tab_new3(double pos, int tabType, QChar* delim); +void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab); +void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab); +void QTextOption__Tab_new3(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab); bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other); bool QTextOption__Tab_OperatorNotEqual(const QTextOption__Tab* self, QTextOption__Tab* other); -void QTextOption__Tab_Delete(QTextOption__Tab* self); +void QTextOption__Tab_Delete(QTextOption__Tab* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtextstream.cpp b/qt6/gen_qtextstream.cpp index bea7cb87..bf9bcfcf 100644 --- a/qt6/gen_qtextstream.cpp +++ b/qt6/gen_qtextstream.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -10,22 +11,30 @@ #include "gen_qtextstream.h" #include "_cgo_export.h" -QTextStream* QTextStream_new() { - return new QTextStream(); +void QTextStream_new(QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { + QTextStream* ret = new QTextStream(); + *outptr_QTextStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } -QTextStream* QTextStream_new2(QIODevice* device) { - return new QTextStream(device); +void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { + QTextStream* ret = new QTextStream(device); + *outptr_QTextStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } -QTextStream* QTextStream_new3(struct miqt_string array) { +void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { QByteArray array_QByteArray(array.data, array.len); - return new QTextStream(array_QByteArray); + QTextStream* ret = new QTextStream(array_QByteArray); + *outptr_QTextStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } -QTextStream* QTextStream_new4(struct miqt_string array, int openMode) { +void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { QByteArray array_QByteArray(array.data, array.len); - return new QTextStream(array_QByteArray, static_cast(openMode)); + QTextStream* ret = new QTextStream(array_QByteArray, static_cast(openMode)); + *outptr_QTextStream = ret; + *outptr_QIODeviceBase = static_cast(ret); } void QTextStream_SetEncoding(QTextStream* self, int encoding) { @@ -411,7 +420,11 @@ struct miqt_string QTextStream_ReadLine1(QTextStream* self, long long maxlen) { return _ms; } -void QTextStream_Delete(QTextStream* self) { - delete self; +void QTextStream_Delete(QTextStream* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtextstream.go b/qt6/gen_qtextstream.go index f68597a5..4aee8da4 100644 --- a/qt6/gen_qtextstream.go +++ b/qt6/gen_qtextstream.go @@ -50,7 +50,8 @@ const ( ) type QTextStream struct { - h *C.QTextStream + h *C.QTextStream + isSubclass bool *QIODeviceBase } @@ -68,27 +69,45 @@ func (this *QTextStream) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextStream(h *C.QTextStream) *QTextStream { +// newQTextStream constructs the type using only CGO pointers. +func newQTextStream(h *C.QTextStream, h_QIODeviceBase *C.QIODeviceBase) *QTextStream { if h == nil { return nil } - return &QTextStream{h: h, QIODeviceBase: UnsafeNewQIODeviceBase(unsafe.Pointer(h))} + return &QTextStream{h: h, + QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} } -func UnsafeNewQTextStream(h unsafe.Pointer) *QTextStream { - return newQTextStream((*C.QTextStream)(h)) +// UnsafeNewQTextStream constructs the type using only unsafe pointers. +func UnsafeNewQTextStream(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QTextStream { + if h == nil { + return nil + } + + return &QTextStream{h: (*C.QTextStream)(h), + QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} } // NewQTextStream constructs a new QTextStream object. func NewQTextStream() *QTextStream { - ret := C.QTextStream_new() - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTextStream_new(&outptr_QTextStream, &outptr_QIODeviceBase) + ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTextStream2 constructs a new QTextStream object. func NewQTextStream2(device *QIODevice) *QTextStream { - ret := C.QTextStream_new2(device.cPointer()) - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTextStream_new2(device.cPointer(), &outptr_QTextStream, &outptr_QIODeviceBase) + ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTextStream3 constructs a new QTextStream object. @@ -96,8 +115,13 @@ func NewQTextStream3(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - ret := C.QTextStream_new3(array_alias) - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTextStream_new3(array_alias, &outptr_QTextStream, &outptr_QIODeviceBase) + ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTextStream4 constructs a new QTextStream object. @@ -105,8 +129,13 @@ func NewQTextStream4(array []byte, openMode QIODeviceBase__OpenModeFlag) *QTextS array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - ret := C.QTextStream_new4(array_alias, (C.int)(openMode)) - return newQTextStream(ret) + var outptr_QTextStream *C.QTextStream = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTextStream_new4(array_alias, (C.int)(openMode), &outptr_QTextStream, &outptr_QIODeviceBase) + ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QTextStream) SetEncoding(encoding QStringConverter__Encoding) { @@ -149,7 +178,7 @@ func (this *QTextStream) SetDevice(device *QIODevice) { } func (this *QTextStream) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QTextStream_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QTextStream_Device(this.h)), nil, nil) } func (this *QTextStream) String() string { @@ -276,51 +305,51 @@ func (this *QTextStream) RealNumberPrecision() int { } func (this *QTextStream) OperatorShiftRight(ch *QChar) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRight(this.h, ch.cPointer()))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRight(this.h, ch.cPointer())), nil) } func (this *QTextStream) OperatorShiftRightWithCh(ch *int8) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithCh(this.h, (*C.char)(unsafe.Pointer(ch))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithCh(this.h, (*C.char)(unsafe.Pointer(ch)))), nil) } func (this *QTextStream) OperatorShiftRightWithShort(i *int16) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithShort(this.h, (*C.int16_t)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithShort(this.h, (*C.int16_t)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithUnsignedshort(i *uint16) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithUnsignedshort(this.h, (*C.uint16_t)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithUnsignedshort(this.h, (*C.uint16_t)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithInt(i *int) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithInt(this.h, (*C.int)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithInt(this.h, (*C.int)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithUnsignedint(i *uint) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithUnsignedint(this.h, (*C.uint)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithUnsignedint(this.h, (*C.uint)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithLong(i *int64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithLong(this.h, (*C.long)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithLong(this.h, (*C.long)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithUnsignedlong(i *uint64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithUnsignedlong(this.h, (*C.ulong)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithUnsignedlong(this.h, (*C.ulong)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithQlonglong(i *int64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithQlonglong(this.h, (*C.longlong)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithQlonglong(this.h, (*C.longlong)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithQulonglong(i *uint64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithQulonglong(this.h, (*C.ulonglong)(unsafe.Pointer(i))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithQulonglong(this.h, (*C.ulonglong)(unsafe.Pointer(i)))), nil) } func (this *QTextStream) OperatorShiftRightWithFloat(f *float32) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithFloat(this.h, (*C.float)(unsafe.Pointer(f))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithFloat(this.h, (*C.float)(unsafe.Pointer(f)))), nil) } func (this *QTextStream) OperatorShiftRightWithDouble(f *float64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithDouble(this.h, (*C.double)(unsafe.Pointer(f))))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithDouble(this.h, (*C.double)(unsafe.Pointer(f)))), nil) } func (this *QTextStream) OperatorShiftRightWithQString(s string) *QTextStream { @@ -328,68 +357,68 @@ func (this *QTextStream) OperatorShiftRightWithQString(s string) *QTextStream { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithQString(this.h, s_ms))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithQString(this.h, s_ms)), nil) } func (this *QTextStream) OperatorShiftRightWithArray(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithArray(this.h, array_alias))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithArray(this.h, array_alias)), nil) } func (this *QTextStream) OperatorShiftRightWithChar(c string) *QTextStream { c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithChar(this.h, c_Cstring))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithChar(this.h, c_Cstring)), nil) } func (this *QTextStream) OperatorShiftLeft(ch QChar) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeft(this.h, ch.cPointer()))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeft(this.h, ch.cPointer())), nil) } func (this *QTextStream) OperatorShiftLeftWithCh(ch int8) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithCh(this.h, (C.char)(ch)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithCh(this.h, (C.char)(ch))), nil) } func (this *QTextStream) OperatorShiftLeftWithShort(i int16) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithShort(this.h, (C.int16_t)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithShort(this.h, (C.int16_t)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithUnsignedshort(i uint16) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithInt(i int) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithInt(this.h, (C.int)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithInt(this.h, (C.int)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithUnsignedint(i uint) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithLong(i int64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithLong(this.h, (C.long)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithLong(this.h, (C.long)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithUnsignedlong(i uint64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithQlonglong(i int64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithQlonglong(this.h, (C.longlong)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithQlonglong(this.h, (C.longlong)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithQulonglong(i uint64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithQulonglong(this.h, (C.ulonglong)(i)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithQulonglong(this.h, (C.ulonglong)(i))), nil) } func (this *QTextStream) OperatorShiftLeftWithFloat(f float32) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithFloat(this.h, (C.float)(f)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithFloat(this.h, (C.float)(f))), nil) } func (this *QTextStream) OperatorShiftLeftWithDouble(f float64) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithDouble(this.h, (C.double)(f)))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithDouble(this.h, (C.double)(f))), nil) } func (this *QTextStream) OperatorShiftLeftWithQString(s string) *QTextStream { @@ -397,24 +426,24 @@ func (this *QTextStream) OperatorShiftLeftWithQString(s string) *QTextStream { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithQString(this.h, s_ms))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithQString(this.h, s_ms)), nil) } func (this *QTextStream) OperatorShiftLeftWithArray(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithArray(this.h, array_alias))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithArray(this.h, array_alias)), nil) } func (this *QTextStream) OperatorShiftLeftWithChar(c string) *QTextStream { c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithChar(this.h, c_Cstring))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithChar(this.h, c_Cstring)), nil) } func (this *QTextStream) OperatorShiftLeftWithPtr(ptr unsafe.Pointer) *QTextStream { - return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithPtr(this.h, ptr))) + return UnsafeNewQTextStream(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithPtr(this.h, ptr)), nil) } func (this *QTextStream) ReadLine1(maxlen int64) string { @@ -426,7 +455,7 @@ func (this *QTextStream) ReadLine1(maxlen int64) string { // Delete this object from C++ memory. func (this *QTextStream) Delete() { - C.QTextStream_Delete(this.h) + C.QTextStream_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtextstream.h b/qt6/gen_qtextstream.h index 7abf65cd..c9ee8840 100644 --- a/qt6/gen_qtextstream.h +++ b/qt6/gen_qtextstream.h @@ -18,20 +18,22 @@ extern "C" { class QByteArray; class QChar; class QIODevice; +class QIODeviceBase; class QLocale; class QTextStream; #else typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QLocale QLocale; typedef struct QTextStream QTextStream; #endif -QTextStream* QTextStream_new(); -QTextStream* QTextStream_new2(QIODevice* device); -QTextStream* QTextStream_new3(struct miqt_string array); -QTextStream* QTextStream_new4(struct miqt_string array, int openMode); +void QTextStream_new(QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); +void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); +void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); +void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); void QTextStream_SetEncoding(QTextStream* self, int encoding); int QTextStream_Encoding(const QTextStream* self); void QTextStream_SetAutoDetectUnicode(QTextStream* self, bool enabled); @@ -101,7 +103,7 @@ QTextStream* QTextStream_OperatorShiftLeftWithArray(QTextStream* self, struct mi QTextStream* QTextStream_OperatorShiftLeftWithChar(QTextStream* self, const char* c); QTextStream* QTextStream_OperatorShiftLeftWithPtr(QTextStream* self, const void* ptr); struct miqt_string QTextStream_ReadLine1(QTextStream* self, long long maxlen); -void QTextStream_Delete(QTextStream* self); +void QTextStream_Delete(QTextStream* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtexttable.cpp b/qt6/gen_qtexttable.cpp index 1ff8f41d..f04321ac 100644 --- a/qt6/gen_qtexttable.cpp +++ b/qt6/gen_qtexttable.cpp @@ -1,11 +1,14 @@ #include +#include #include #include #include #include #include #include +#include #define WORKAROUND_INNER_CLASS_DEFINITION_QTextFrame__iterator +#include #include #include #include @@ -13,12 +16,14 @@ #include "gen_qtexttable.h" #include "_cgo_export.h" -QTextTableCell* QTextTableCell_new() { - return new QTextTableCell(); +void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell) { + QTextTableCell* ret = new QTextTableCell(); + *outptr_QTextTableCell = ret; } -QTextTableCell* QTextTableCell_new2(QTextTableCell* o) { - return new QTextTableCell(*o); +void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell) { + QTextTableCell* ret = new QTextTableCell(*o); + *outptr_QTextTableCell = ret; } void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o) { @@ -89,12 +94,20 @@ int QTextTableCell_TableCellFormatIndex(const QTextTableCell* self) { return self->tableCellFormatIndex(); } -void QTextTableCell_Delete(QTextTableCell* self) { - delete self; +void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTextTable* QTextTable_new(QTextDocument* doc) { - return new QTextTable(doc); +void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { + QTextTable* ret = new QTextTable(doc); + *outptr_QTextTable = ret; + *outptr_QTextFrame = static_cast(ret); + *outptr_QTextObject = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTextTable_MetaObject(const QTextTable* self) { @@ -214,7 +227,11 @@ struct miqt_string QTextTable_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTextTable_Delete(QTextTable* self) { - delete self; +void QTextTable_Delete(QTextTable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtexttable.go b/qt6/gen_qtexttable.go index f85d16c2..13add3e6 100644 --- a/qt6/gen_qtexttable.go +++ b/qt6/gen_qtexttable.go @@ -14,7 +14,8 @@ import ( ) type QTextTableCell struct { - h *C.QTextTableCell + h *C.QTextTableCell + isSubclass bool } func (this *QTextTableCell) cPointer() *C.QTextTableCell { @@ -31,6 +32,7 @@ func (this *QTextTableCell) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTextTableCell constructs the type using only CGO pointers. func newQTextTableCell(h *C.QTextTableCell) *QTextTableCell { if h == nil { return nil @@ -38,20 +40,33 @@ func newQTextTableCell(h *C.QTextTableCell) *QTextTableCell { return &QTextTableCell{h: h} } +// UnsafeNewQTextTableCell constructs the type using only unsafe pointers. func UnsafeNewQTextTableCell(h unsafe.Pointer) *QTextTableCell { - return newQTextTableCell((*C.QTextTableCell)(h)) + if h == nil { + return nil + } + + return &QTextTableCell{h: (*C.QTextTableCell)(h)} } // NewQTextTableCell constructs a new QTextTableCell object. func NewQTextTableCell() *QTextTableCell { - ret := C.QTextTableCell_new() - return newQTextTableCell(ret) + var outptr_QTextTableCell *C.QTextTableCell = nil + + C.QTextTableCell_new(&outptr_QTextTableCell) + ret := newQTextTableCell(outptr_QTextTableCell) + ret.isSubclass = true + return ret } // NewQTextTableCell2 constructs a new QTextTableCell object. func NewQTextTableCell2(o *QTextTableCell) *QTextTableCell { - ret := C.QTextTableCell_new2(o.cPointer()) - return newQTextTableCell(ret) + var outptr_QTextTableCell *C.QTextTableCell = nil + + C.QTextTableCell_new2(o.cPointer(), &outptr_QTextTableCell) + ret := newQTextTableCell(outptr_QTextTableCell) + ret.isSubclass = true + return ret } func (this *QTextTableCell) OperatorAssign(o *QTextTableCell) { @@ -64,7 +79,7 @@ func (this *QTextTableCell) SetFormat(format *QTextCharFormat) { func (this *QTextTableCell) Format() *QTextCharFormat { _ret := C.QTextTableCell_Format(this.h) - _goptr := newQTextCharFormat(_ret) + _goptr := newQTextCharFormat(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -139,7 +154,7 @@ func (this *QTextTableCell) TableCellFormatIndex() int { // Delete this object from C++ memory. func (this *QTextTableCell) Delete() { - C.QTextTableCell_Delete(this.h) + C.QTextTableCell_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -152,7 +167,8 @@ func (this *QTextTableCell) GoGC() { } type QTextTable struct { - h *C.QTextTable + h *C.QTextTable + isSubclass bool *QTextFrame } @@ -170,21 +186,36 @@ func (this *QTextTable) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTextTable(h *C.QTextTable) *QTextTable { +// newQTextTable constructs the type using only CGO pointers. +func newQTextTable(h *C.QTextTable, h_QTextFrame *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextTable { if h == nil { return nil } - return &QTextTable{h: h, QTextFrame: UnsafeNewQTextFrame(unsafe.Pointer(h))} + return &QTextTable{h: h, + QTextFrame: newQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} } -func UnsafeNewQTextTable(h unsafe.Pointer) *QTextTable { - return newQTextTable((*C.QTextTable)(h)) +// UnsafeNewQTextTable constructs the type using only unsafe pointers. +func UnsafeNewQTextTable(h unsafe.Pointer, h_QTextFrame unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextTable { + if h == nil { + return nil + } + + return &QTextTable{h: (*C.QTextTable)(h), + QTextFrame: UnsafeNewQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} } // NewQTextTable constructs a new QTextTable object. func NewQTextTable(doc *QTextDocument) *QTextTable { - ret := C.QTextTable_new(doc.cPointer()) - return newQTextTable(ret) + var outptr_QTextTable *C.QTextTable = nil + var outptr_QTextFrame *C.QTextFrame = nil + var outptr_QTextObject *C.QTextObject = nil + var outptr_QObject *C.QObject = nil + + C.QTextTable_new(doc.cPointer(), &outptr_QTextTable, &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) + ret := newQTextTable(outptr_QTextTable, outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTextTable) MetaObject() *QMetaObject { @@ -295,7 +326,7 @@ func (this *QTextTable) SetFormat(format *QTextTableFormat) { func (this *QTextTable) Format() *QTextTableFormat { _ret := C.QTextTable_Format(this.h) - _goptr := newQTextTableFormat(_ret) + _goptr := newQTextTableFormat(_ret, nil, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -324,7 +355,7 @@ func QTextTable_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QTextTable) Delete() { - C.QTextTable_Delete(this.h) + C.QTextTable_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtexttable.h b/qt6/gen_qtexttable.h index 64c2823a..4b4e4181 100644 --- a/qt6/gen_qtexttable.h +++ b/qt6/gen_qtexttable.h @@ -16,30 +16,36 @@ extern "C" { #ifdef __cplusplus class QMetaObject; +class QObject; class QTextCharFormat; class QTextCursor; class QTextDocument; +class QTextFrame; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTextFrame__iterator) typedef QTextFrame::iterator QTextFrame__iterator; #else class QTextFrame__iterator; #endif +class QTextObject; class QTextTable; class QTextTableCell; class QTextTableFormat; #else typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QTextCharFormat QTextCharFormat; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; +typedef struct QTextFrame QTextFrame; typedef struct QTextFrame__iterator QTextFrame__iterator; +typedef struct QTextObject QTextObject; typedef struct QTextTable QTextTable; typedef struct QTextTableCell QTextTableCell; typedef struct QTextTableFormat QTextTableFormat; #endif -QTextTableCell* QTextTableCell_new(); -QTextTableCell* QTextTableCell_new2(QTextTableCell* o); +void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell); +void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell); void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o); void QTextTableCell_SetFormat(QTextTableCell* self, QTextCharFormat* format); QTextCharFormat* QTextTableCell_Format(const QTextTableCell* self); @@ -57,9 +63,9 @@ bool QTextTableCell_OperatorNotEqual(const QTextTableCell* self, QTextTableCell* QTextFrame__iterator* QTextTableCell_Begin(const QTextTableCell* self); QTextFrame__iterator* QTextTableCell_End(const QTextTableCell* self); int QTextTableCell_TableCellFormatIndex(const QTextTableCell* self); -void QTextTableCell_Delete(QTextTableCell* self); +void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass); -QTextTable* QTextTable_new(QTextDocument* doc); +void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); QMetaObject* QTextTable_MetaObject(const QTextTable* self); void* QTextTable_Metacast(QTextTable* self, const char* param1); struct miqt_string QTextTable_Tr(const char* s); @@ -84,7 +90,7 @@ void QTextTable_SetFormat(QTextTable* self, QTextTableFormat* format); QTextTableFormat* QTextTable_Format(const QTextTable* self); struct miqt_string QTextTable_Tr2(const char* s, const char* c); struct miqt_string QTextTable_Tr3(const char* s, const char* c, int n); -void QTextTable_Delete(QTextTable* self); +void QTextTable_Delete(QTextTable* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qthread.cpp b/qt6/gen_qthread.cpp index cd7244ba..6a1c6f9c 100644 --- a/qt6/gen_qthread.cpp +++ b/qt6/gen_qthread.cpp @@ -1,22 +1,233 @@ #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qthread.h" #include "_cgo_export.h" -QThread* QThread_new() { - return new QThread(); +class MiqtVirtualQThread : public virtual QThread { +public: + + MiqtVirtualQThread(): QThread() {}; + MiqtVirtualQThread(QObject* parent): QThread(parent) {}; + + virtual ~MiqtVirtualQThread() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QThread::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QThread_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QThread::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Run = 0; + + // Subclass to allow providing a Go implementation + virtual void run() override { + if (handle__Run == 0) { + QThread::run(); + return; + } + + + miqt_exec_callback_QThread_Run(this, handle__Run); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Run() { + + QThread::run(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QThread::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QThread_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QThread::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QThread::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QThread_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QThread::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QThread::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QThread_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QThread::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QThread::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QThread_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QThread::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QThread::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThread_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QThread::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QThread::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThread_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QThread::disconnectNotify(*signal); + + } + +}; + +void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject) { + MiqtVirtualQThread* ret = new MiqtVirtualQThread(); + *outptr_QThread = ret; + *outptr_QObject = static_cast(ret); } -QThread* QThread_new2(QObject* parent) { - return new QThread(parent); +void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject) { + MiqtVirtualQThread* ret = new MiqtVirtualQThread(parent); + *outptr_QThread = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QThread_MetaObject(const QThread* self) { @@ -175,7 +386,75 @@ bool QThread_Wait1(QThread* self, QDeadlineTimer* deadline) { return self->wait(*deadline); } -void QThread_Delete(QThread* self) { - delete self; +void QThread_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__Event = slot; +} + +bool QThread_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQThread*)(self) )->virtualbase_Event(event); +} + +void QThread_override_virtual_Run(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__Run = slot; +} + +void QThread_virtualbase_Run(void* self) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_Run(); +} + +void QThread_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__EventFilter = slot; +} + +bool QThread_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQThread*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QThread_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__TimerEvent = slot; +} + +void QThread_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_TimerEvent(event); +} + +void QThread_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__ChildEvent = slot; +} + +void QThread_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_ChildEvent(event); +} + +void QThread_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__CustomEvent = slot; +} + +void QThread_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_CustomEvent(event); +} + +void QThread_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__ConnectNotify = slot; +} + +void QThread_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QThread_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThread*)(self) )->handle__DisconnectNotify = slot; +} + +void QThread_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThread*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QThread_Delete(QThread* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qthread.go b/qt6/gen_qthread.go index d82a7b9c..a77abecb 100644 --- a/qt6/gen_qthread.go +++ b/qt6/gen_qthread.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -27,7 +28,8 @@ const ( ) type QThread struct { - h *C.QThread + h *C.QThread + isSubclass bool *QObject } @@ -45,27 +47,45 @@ func (this *QThread) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQThread(h *C.QThread) *QThread { +// newQThread constructs the type using only CGO pointers. +func newQThread(h *C.QThread, h_QObject *C.QObject) *QThread { if h == nil { return nil } - return &QThread{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QThread{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQThread(h unsafe.Pointer) *QThread { - return newQThread((*C.QThread)(h)) +// UnsafeNewQThread constructs the type using only unsafe pointers. +func UnsafeNewQThread(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThread { + if h == nil { + return nil + } + + return &QThread{h: (*C.QThread)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQThread constructs a new QThread object. func NewQThread() *QThread { - ret := C.QThread_new() - return newQThread(ret) + var outptr_QThread *C.QThread = nil + var outptr_QObject *C.QObject = nil + + C.QThread_new(&outptr_QThread, &outptr_QObject) + ret := newQThread(outptr_QThread, outptr_QObject) + ret.isSubclass = true + return ret } // NewQThread2 constructs a new QThread object. func NewQThread2(parent *QObject) *QThread { - ret := C.QThread_new2(parent.cPointer()) - return newQThread(ret) + var outptr_QThread *C.QThread = nil + var outptr_QObject *C.QObject = nil + + C.QThread_new2(parent.cPointer(), &outptr_QThread, &outptr_QObject) + ret := newQThread(outptr_QThread, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QThread) MetaObject() *QMetaObject { @@ -92,7 +112,7 @@ func QThread_CurrentThreadId() unsafe.Pointer { } func QThread_CurrentThread() *QThread { - return UnsafeNewQThread(unsafe.Pointer(C.QThread_CurrentThread())) + return UnsafeNewQThread(unsafe.Pointer(C.QThread_CurrentThread()), nil) } func QThread_IdealThreadCount() int { @@ -136,7 +156,7 @@ func (this *QThread) StackSize() uint { } func (this *QThread) EventDispatcher() *QAbstractEventDispatcher { - return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QThread_EventDispatcher(this.h))) + return UnsafeNewQAbstractEventDispatcher(unsafe.Pointer(C.QThread_EventDispatcher(this.h)), nil) } func (this *QThread) SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -221,9 +241,195 @@ func (this *QThread) Wait1(deadline QDeadlineTimer) bool { return (bool)(C.QThread_Wait1(this.h, deadline.cPointer())) } +func (this *QThread) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QThread_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QThread) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QThread_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_Event +func miqt_exec_callback_QThread_Event(self *C.QThread, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThread{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QThread) callVirtualBase_Run() { + + C.QThread_virtualbase_Run(unsafe.Pointer(this.h)) + +} +func (this *QThread) OnRun(slot func(super func())) { + C.QThread_override_virtual_Run(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_Run +func miqt_exec_callback_QThread_Run(self *C.QThread, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QThread{h: self}).callVirtualBase_Run) + +} + +func (this *QThread) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QThread_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QThread) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QThread_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_EventFilter +func miqt_exec_callback_QThread_EventFilter(self *C.QThread, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThread{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QThread) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QThread_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThread) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QThread_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_TimerEvent +func miqt_exec_callback_QThread_TimerEvent(self *C.QThread, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QThread{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QThread) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QThread_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThread) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QThread_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_ChildEvent +func miqt_exec_callback_QThread_ChildEvent(self *C.QThread, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QThread{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QThread) callVirtualBase_CustomEvent(event *QEvent) { + + C.QThread_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThread) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QThread_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_CustomEvent +func miqt_exec_callback_QThread_CustomEvent(self *C.QThread, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QThread{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QThread) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QThread_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThread) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThread_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_ConnectNotify +func miqt_exec_callback_QThread_ConnectNotify(self *C.QThread, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThread{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QThread) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QThread_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThread) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThread_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThread_DisconnectNotify +func miqt_exec_callback_QThread_DisconnectNotify(self *C.QThread, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThread{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QThread) Delete() { - C.QThread_Delete(this.h) + C.QThread_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qthread.h b/qt6/gen_qthread.h index d4fbcc08..f1d01333 100644 --- a/qt6/gen_qthread.h +++ b/qt6/gen_qthread.h @@ -16,22 +16,28 @@ extern "C" { #ifdef __cplusplus class QAbstractEventDispatcher; +class QChildEvent; class QDeadlineTimer; class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QThread; +class QTimerEvent; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; +typedef struct QChildEvent QChildEvent; typedef struct QDeadlineTimer QDeadlineTimer; typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; #endif -QThread* QThread_new(); -QThread* QThread_new2(QObject* parent); +void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject); +void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject); QMetaObject* QThread_MetaObject(const QThread* self); void* QThread_Metacast(QThread* self, const char* param1); struct miqt_string QThread_Tr(const char* s); @@ -60,12 +66,29 @@ bool QThread_WaitWithTime(QThread* self, unsigned long time); void QThread_Sleep(unsigned long param1); void QThread_Msleep(unsigned long param1); void QThread_Usleep(unsigned long param1); +void QThread_Run(QThread* self); struct miqt_string QThread_Tr2(const char* s, const char* c); struct miqt_string QThread_Tr3(const char* s, const char* c, int n); void QThread_Start1(QThread* self, int param1); void QThread_Exit1(QThread* self, int retcode); bool QThread_Wait1(QThread* self, QDeadlineTimer* deadline); -void QThread_Delete(QThread* self); +void QThread_override_virtual_Event(void* self, intptr_t slot); +bool QThread_virtualbase_Event(void* self, QEvent* event); +void QThread_override_virtual_Run(void* self, intptr_t slot); +void QThread_virtualbase_Run(void* self); +void QThread_override_virtual_EventFilter(void* self, intptr_t slot); +bool QThread_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QThread_override_virtual_TimerEvent(void* self, intptr_t slot); +void QThread_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QThread_override_virtual_ChildEvent(void* self, intptr_t slot); +void QThread_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QThread_override_virtual_CustomEvent(void* self, intptr_t slot); +void QThread_virtualbase_CustomEvent(void* self, QEvent* event); +void QThread_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QThread_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QThread_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QThread_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QThread_Delete(QThread* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qthreadpool.cpp b/qt6/gen_qthreadpool.cpp index b4f01898..d9682b41 100644 --- a/qt6/gen_qthreadpool.cpp +++ b/qt6/gen_qthreadpool.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,16 +9,202 @@ #include #include #include +#include #include #include "gen_qthreadpool.h" #include "_cgo_export.h" -QThreadPool* QThreadPool_new() { - return new QThreadPool(); +class MiqtVirtualQThreadPool : public virtual QThreadPool { +public: + + MiqtVirtualQThreadPool(): QThreadPool() {}; + MiqtVirtualQThreadPool(QObject* parent): QThreadPool(parent) {}; + + virtual ~MiqtVirtualQThreadPool() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QThreadPool::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QThreadPool_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QThreadPool::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QThreadPool::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QThreadPool_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QThreadPool::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QThreadPool::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QThreadPool_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QThreadPool::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QThreadPool::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QThreadPool_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QThreadPool::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QThreadPool::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QThreadPool_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QThreadPool::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QThreadPool::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThreadPool_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QThreadPool::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QThreadPool::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QThreadPool_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QThreadPool::disconnectNotify(*signal); + + } + +}; + +void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { + MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(); + *outptr_QThreadPool = ret; + *outptr_QObject = static_cast(ret); } -QThreadPool* QThreadPool_new2(QObject* parent) { - return new QThreadPool(parent); +void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { + MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(parent); + *outptr_QThreadPool = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QThreadPool_MetaObject(const QThreadPool* self) { @@ -145,7 +334,67 @@ bool QThreadPool_WaitForDone1(QThreadPool* self, int msecs) { return self->waitForDone(static_cast(msecs)); } -void QThreadPool_Delete(QThreadPool* self) { - delete self; +void QThreadPool_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__Event = slot; +} + +bool QThreadPool_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_Event(event); +} + +void QThreadPool_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__EventFilter = slot; +} + +bool QThreadPool_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QThreadPool_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__TimerEvent = slot; +} + +void QThreadPool_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_TimerEvent(event); +} + +void QThreadPool_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__ChildEvent = slot; +} + +void QThreadPool_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_ChildEvent(event); +} + +void QThreadPool_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__CustomEvent = slot; +} + +void QThreadPool_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_CustomEvent(event); +} + +void QThreadPool_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__ConnectNotify = slot; +} + +void QThreadPool_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QThreadPool_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QThreadPool*)(self) )->handle__DisconnectNotify = slot; +} + +void QThreadPool_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQThreadPool*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QThreadPool_Delete(QThreadPool* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qthreadpool.go b/qt6/gen_qthreadpool.go index a6b6ae3c..452a338c 100644 --- a/qt6/gen_qthreadpool.go +++ b/qt6/gen_qthreadpool.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QThreadPool struct { - h *C.QThreadPool + h *C.QThreadPool + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QThreadPool) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQThreadPool(h *C.QThreadPool) *QThreadPool { +// newQThreadPool constructs the type using only CGO pointers. +func newQThreadPool(h *C.QThreadPool, h_QObject *C.QObject) *QThreadPool { if h == nil { return nil } - return &QThreadPool{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QThreadPool{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQThreadPool(h unsafe.Pointer) *QThreadPool { - return newQThreadPool((*C.QThreadPool)(h)) +// UnsafeNewQThreadPool constructs the type using only unsafe pointers. +func UnsafeNewQThreadPool(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThreadPool { + if h == nil { + return nil + } + + return &QThreadPool{h: (*C.QThreadPool)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQThreadPool constructs a new QThreadPool object. func NewQThreadPool() *QThreadPool { - ret := C.QThreadPool_new() - return newQThreadPool(ret) + var outptr_QThreadPool *C.QThreadPool = nil + var outptr_QObject *C.QObject = nil + + C.QThreadPool_new(&outptr_QThreadPool, &outptr_QObject) + ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret.isSubclass = true + return ret } // NewQThreadPool2 constructs a new QThreadPool object. func NewQThreadPool2(parent *QObject) *QThreadPool { - ret := C.QThreadPool_new2(parent.cPointer()) - return newQThreadPool(ret) + var outptr_QThreadPool *C.QThreadPool = nil + var outptr_QObject *C.QObject = nil + + C.QThreadPool_new2(parent.cPointer(), &outptr_QThreadPool, &outptr_QObject) + ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QThreadPool) MetaObject() *QMetaObject { @@ -75,7 +95,7 @@ func QThreadPool_Tr(s string) string { } func QThreadPool_GlobalInstance() *QThreadPool { - return UnsafeNewQThreadPool(unsafe.Pointer(C.QThreadPool_GlobalInstance())) + return UnsafeNewQThreadPool(unsafe.Pointer(C.QThreadPool_GlobalInstance()), nil) } func (this *QThreadPool) Start(runnable *QRunnable) { @@ -180,9 +200,175 @@ func (this *QThreadPool) WaitForDone1(msecs int) bool { return (bool)(C.QThreadPool_WaitForDone1(this.h, (C.int)(msecs))) } +func (this *QThreadPool) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QThreadPool_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QThreadPool) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QThreadPool_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_Event +func miqt_exec_callback_QThreadPool_Event(self *C.QThreadPool, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThreadPool{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QThreadPool) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QThreadPool_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QThreadPool) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QThreadPool_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_EventFilter +func miqt_exec_callback_QThreadPool_EventFilter(self *C.QThreadPool, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QThreadPool{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QThreadPool) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QThreadPool_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThreadPool) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QThreadPool_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_TimerEvent +func miqt_exec_callback_QThreadPool_TimerEvent(self *C.QThreadPool, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QThreadPool{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QThreadPool_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThreadPool) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QThreadPool_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_ChildEvent +func miqt_exec_callback_QThreadPool_ChildEvent(self *C.QThreadPool, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QThreadPool{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_CustomEvent(event *QEvent) { + + C.QThreadPool_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QThreadPool) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QThreadPool_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_CustomEvent +func miqt_exec_callback_QThreadPool_CustomEvent(self *C.QThreadPool, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QThreadPool{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QThreadPool_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThreadPool) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThreadPool_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_ConnectNotify +func miqt_exec_callback_QThreadPool_ConnectNotify(self *C.QThreadPool, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThreadPool{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QThreadPool) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QThreadPool_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QThreadPool) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QThreadPool_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QThreadPool_DisconnectNotify +func miqt_exec_callback_QThreadPool_DisconnectNotify(self *C.QThreadPool, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QThreadPool{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QThreadPool) Delete() { - C.QThreadPool_Delete(this.h) + C.QThreadPool_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qthreadpool.h b/qt6/gen_qthreadpool.h index f2b20373..64e19f41 100644 --- a/qt6/gen_qthreadpool.h +++ b/qt6/gen_qthreadpool.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QRunnable; class QThread; class QThreadPool; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRunnable QRunnable; typedef struct QThread QThread; typedef struct QThreadPool QThreadPool; +typedef struct QTimerEvent QTimerEvent; #endif -QThreadPool* QThreadPool_new(); -QThreadPool* QThreadPool_new2(QObject* parent); +void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); +void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); QMetaObject* QThreadPool_MetaObject(const QThreadPool* self); void* QThreadPool_Metacast(QThreadPool* self, const char* param1); struct miqt_string QThreadPool_Tr(const char* s); @@ -56,7 +64,21 @@ struct miqt_string QThreadPool_Tr2(const char* s, const char* c); struct miqt_string QThreadPool_Tr3(const char* s, const char* c, int n); void QThreadPool_Start2(QThreadPool* self, QRunnable* runnable, int priority); bool QThreadPool_WaitForDone1(QThreadPool* self, int msecs); -void QThreadPool_Delete(QThreadPool* self); +void QThreadPool_override_virtual_Event(void* self, intptr_t slot); +bool QThreadPool_virtualbase_Event(void* self, QEvent* event); +void QThreadPool_override_virtual_EventFilter(void* self, intptr_t slot); +bool QThreadPool_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QThreadPool_override_virtual_TimerEvent(void* self, intptr_t slot); +void QThreadPool_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QThreadPool_override_virtual_ChildEvent(void* self, intptr_t slot); +void QThreadPool_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QThreadPool_override_virtual_CustomEvent(void* self, intptr_t slot); +void QThreadPool_virtualbase_CustomEvent(void* self, QEvent* event); +void QThreadPool_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QThreadPool_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QThreadPool_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QThreadPool_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QThreadPool_Delete(QThreadPool* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qthreadstorage.cpp b/qt6/gen_qthreadstorage.cpp index c144d63d..e694cada 100644 --- a/qt6/gen_qthreadstorage.cpp +++ b/qt6/gen_qthreadstorage.cpp @@ -3,11 +3,16 @@ #include "gen_qthreadstorage.h" #include "_cgo_export.h" -QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1) { - return new QThreadStorageData(*param1); +void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData) { + QThreadStorageData* ret = new QThreadStorageData(*param1); + *outptr_QThreadStorageData = ret; } -void QThreadStorageData_Delete(QThreadStorageData* self) { - delete self; +void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qthreadstorage.go b/qt6/gen_qthreadstorage.go index 2ce7a87f..1c1a789b 100644 --- a/qt6/gen_qthreadstorage.go +++ b/qt6/gen_qthreadstorage.go @@ -14,7 +14,8 @@ import ( ) type QThreadStorageData struct { - h *C.QThreadStorageData + h *C.QThreadStorageData + isSubclass bool } func (this *QThreadStorageData) cPointer() *C.QThreadStorageData { @@ -31,6 +32,7 @@ func (this *QThreadStorageData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQThreadStorageData constructs the type using only CGO pointers. func newQThreadStorageData(h *C.QThreadStorageData) *QThreadStorageData { if h == nil { return nil @@ -38,19 +40,28 @@ func newQThreadStorageData(h *C.QThreadStorageData) *QThreadStorageData { return &QThreadStorageData{h: h} } +// UnsafeNewQThreadStorageData constructs the type using only unsafe pointers. func UnsafeNewQThreadStorageData(h unsafe.Pointer) *QThreadStorageData { - return newQThreadStorageData((*C.QThreadStorageData)(h)) + if h == nil { + return nil + } + + return &QThreadStorageData{h: (*C.QThreadStorageData)(h)} } // NewQThreadStorageData constructs a new QThreadStorageData object. func NewQThreadStorageData(param1 *QThreadStorageData) *QThreadStorageData { - ret := C.QThreadStorageData_new(param1.cPointer()) - return newQThreadStorageData(ret) + var outptr_QThreadStorageData *C.QThreadStorageData = nil + + C.QThreadStorageData_new(param1.cPointer(), &outptr_QThreadStorageData) + ret := newQThreadStorageData(outptr_QThreadStorageData) + ret.isSubclass = true + return ret } // Delete this object from C++ memory. func (this *QThreadStorageData) Delete() { - C.QThreadStorageData_Delete(this.h) + C.QThreadStorageData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qthreadstorage.h b/qt6/gen_qthreadstorage.h index e97c1154..6a5c6ccf 100644 --- a/qt6/gen_qthreadstorage.h +++ b/qt6/gen_qthreadstorage.h @@ -20,8 +20,8 @@ class QThreadStorageData; typedef struct QThreadStorageData QThreadStorageData; #endif -QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1); -void QThreadStorageData_Delete(QThreadStorageData* self); +void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData); +void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtimeline.cpp b/qt6/gen_qtimeline.cpp index 42e1f1eb..a926dfa9 100644 --- a/qt6/gen_qtimeline.cpp +++ b/qt6/gen_qtimeline.cpp @@ -1,24 +1,240 @@ +#include #include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qtimeline.h" #include "_cgo_export.h" -QTimeLine* QTimeLine_new() { - return new QTimeLine(); +class MiqtVirtualQTimeLine : public virtual QTimeLine { +public: + + MiqtVirtualQTimeLine(): QTimeLine() {}; + MiqtVirtualQTimeLine(int duration): QTimeLine(duration) {}; + MiqtVirtualQTimeLine(int duration, QObject* parent): QTimeLine(duration, parent) {}; + + virtual ~MiqtVirtualQTimeLine() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValueForTime = 0; + + // Subclass to allow providing a Go implementation + virtual qreal valueForTime(int msec) const override { + if (handle__ValueForTime == 0) { + return QTimeLine::valueForTime(msec); + } + + int sigval1 = msec; + + double callback_return_value = miqt_exec_callback_QTimeLine_ValueForTime(const_cast(this), handle__ValueForTime, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + double virtualbase_ValueForTime(int msec) const { + + qreal _ret = QTimeLine::valueForTime(static_cast(msec)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTimeLine::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTimeLine_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTimeLine::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTimeLine::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTimeLine_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTimeLine::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTimeLine::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTimeLine_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTimeLine::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTimeLine::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTimeLine_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTimeLine::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTimeLine::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTimeLine_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTimeLine::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTimeLine::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimeLine_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTimeLine::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTimeLine::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimeLine_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTimeLine::disconnectNotify(*signal); + + } + +}; + +void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { + MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(); + *outptr_QTimeLine = ret; + *outptr_QObject = static_cast(ret); } -QTimeLine* QTimeLine_new2(int duration) { - return new QTimeLine(static_cast(duration)); +void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { + MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration)); + *outptr_QTimeLine = ret; + *outptr_QObject = static_cast(ret); } -QTimeLine* QTimeLine_new3(int duration, QObject* parent) { - return new QTimeLine(static_cast(duration), parent); +void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { + MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration), parent); + *outptr_QTimeLine = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTimeLine_MetaObject(const QTimeLine* self) { @@ -174,7 +390,75 @@ struct miqt_string QTimeLine_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTimeLine_Delete(QTimeLine* self) { - delete self; +void QTimeLine_override_virtual_ValueForTime(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__ValueForTime = slot; +} + +double QTimeLine_virtualbase_ValueForTime(const void* self, int msec) { + return ( (const MiqtVirtualQTimeLine*)(self) )->virtualbase_ValueForTime(msec); +} + +void QTimeLine_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__TimerEvent = slot; +} + +void QTimeLine_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_TimerEvent(event); +} + +void QTimeLine_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__Event = slot; +} + +bool QTimeLine_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_Event(event); +} + +void QTimeLine_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__EventFilter = slot; +} + +bool QTimeLine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTimeLine_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__ChildEvent = slot; +} + +void QTimeLine_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_ChildEvent(event); +} + +void QTimeLine_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__CustomEvent = slot; +} + +void QTimeLine_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_CustomEvent(event); +} + +void QTimeLine_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__ConnectNotify = slot; +} + +void QTimeLine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTimeLine_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimeLine*)(self) )->handle__DisconnectNotify = slot; +} + +void QTimeLine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimeLine*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTimeLine_Delete(QTimeLine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtimeline.go b/qt6/gen_qtimeline.go index 493bc066..015f4ed7 100644 --- a/qt6/gen_qtimeline.go +++ b/qt6/gen_qtimeline.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -29,7 +30,8 @@ const ( ) type QTimeLine struct { - h *C.QTimeLine + h *C.QTimeLine + isSubclass bool *QObject } @@ -47,33 +49,56 @@ func (this *QTimeLine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTimeLine(h *C.QTimeLine) *QTimeLine { +// newQTimeLine constructs the type using only CGO pointers. +func newQTimeLine(h *C.QTimeLine, h_QObject *C.QObject) *QTimeLine { if h == nil { return nil } - return &QTimeLine{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTimeLine{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTimeLine(h unsafe.Pointer) *QTimeLine { - return newQTimeLine((*C.QTimeLine)(h)) +// UnsafeNewQTimeLine constructs the type using only unsafe pointers. +func UnsafeNewQTimeLine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimeLine { + if h == nil { + return nil + } + + return &QTimeLine{h: (*C.QTimeLine)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTimeLine constructs a new QTimeLine object. func NewQTimeLine() *QTimeLine { - ret := C.QTimeLine_new() - return newQTimeLine(ret) + var outptr_QTimeLine *C.QTimeLine = nil + var outptr_QObject *C.QObject = nil + + C.QTimeLine_new(&outptr_QTimeLine, &outptr_QObject) + ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTimeLine2 constructs a new QTimeLine object. func NewQTimeLine2(duration int) *QTimeLine { - ret := C.QTimeLine_new2((C.int)(duration)) - return newQTimeLine(ret) + var outptr_QTimeLine *C.QTimeLine = nil + var outptr_QObject *C.QObject = nil + + C.QTimeLine_new2((C.int)(duration), &outptr_QTimeLine, &outptr_QObject) + ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTimeLine3 constructs a new QTimeLine object. func NewQTimeLine3(duration int, parent *QObject) *QTimeLine { - ret := C.QTimeLine_new3((C.int)(duration), parent.cPointer()) - return newQTimeLine(ret) + var outptr_QTimeLine *C.QTimeLine = nil + var outptr_QObject *C.QObject = nil + + C.QTimeLine_new3((C.int)(duration), parent.cPointer(), &outptr_QTimeLine, &outptr_QObject) + ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTimeLine) MetaObject() *QMetaObject { @@ -228,9 +253,200 @@ func QTimeLine_Tr3(s string, c string, n int) string { return _ret } +func (this *QTimeLine) callVirtualBase_ValueForTime(msec int) float64 { + + return (float64)(C.QTimeLine_virtualbase_ValueForTime(unsafe.Pointer(this.h), (C.int)(msec))) + +} +func (this *QTimeLine) OnValueForTime(slot func(super func(msec int) float64, msec int) float64) { + C.QTimeLine_override_virtual_ValueForTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_ValueForTime +func miqt_exec_callback_QTimeLine_ValueForTime(self *C.QTimeLine, cb C.intptr_t, msec C.int) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msec int) float64, msec int) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msec) + + virtualReturn := gofunc((&QTimeLine{h: self}).callVirtualBase_ValueForTime, slotval1) + + return (C.double)(virtualReturn) + +} + +func (this *QTimeLine) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTimeLine_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeLine) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTimeLine_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_TimerEvent +func miqt_exec_callback_QTimeLine_TimerEvent(self *C.QTimeLine, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeLine{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTimeLine_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTimeLine) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTimeLine_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_Event +func miqt_exec_callback_QTimeLine_Event(self *C.QTimeLine, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimeLine{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeLine) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTimeLine_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTimeLine) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTimeLine_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_EventFilter +func miqt_exec_callback_QTimeLine_EventFilter(self *C.QTimeLine, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimeLine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimeLine) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTimeLine_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeLine) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTimeLine_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_ChildEvent +func miqt_exec_callback_QTimeLine_ChildEvent(self *C.QTimeLine, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimeLine{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTimeLine_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimeLine) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTimeLine_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_CustomEvent +func miqt_exec_callback_QTimeLine_CustomEvent(self *C.QTimeLine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTimeLine{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTimeLine_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimeLine) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimeLine_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_ConnectNotify +func miqt_exec_callback_QTimeLine_ConnectNotify(self *C.QTimeLine, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimeLine{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTimeLine) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTimeLine_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimeLine) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimeLine_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimeLine_DisconnectNotify +func miqt_exec_callback_QTimeLine_DisconnectNotify(self *C.QTimeLine, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimeLine{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTimeLine) Delete() { - C.QTimeLine_Delete(this.h) + C.QTimeLine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtimeline.h b/qt6/gen_qtimeline.h index 7c59584c..0413bbf9 100644 --- a/qt6/gen_qtimeline.h +++ b/qt6/gen_qtimeline.h @@ -15,20 +15,28 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QEasingCurve; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QTimeLine; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; typedef struct QEasingCurve QEasingCurve; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTimeLine QTimeLine; +typedef struct QTimerEvent QTimerEvent; #endif -QTimeLine* QTimeLine_new(); -QTimeLine* QTimeLine_new2(int duration); -QTimeLine* QTimeLine_new3(int duration, QObject* parent); +void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); +void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); +void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); QMetaObject* QTimeLine_MetaObject(const QTimeLine* self); void* QTimeLine_Metacast(QTimeLine* self, const char* param1); struct miqt_string QTimeLine_Tr(const char* s); @@ -59,9 +67,26 @@ void QTimeLine_Stop(QTimeLine* self); void QTimeLine_SetPaused(QTimeLine* self, bool paused); void QTimeLine_SetCurrentTime(QTimeLine* self, int msec); void QTimeLine_ToggleDirection(QTimeLine* self); +void QTimeLine_TimerEvent(QTimeLine* self, QTimerEvent* event); struct miqt_string QTimeLine_Tr2(const char* s, const char* c); struct miqt_string QTimeLine_Tr3(const char* s, const char* c, int n); -void QTimeLine_Delete(QTimeLine* self); +void QTimeLine_override_virtual_ValueForTime(void* self, intptr_t slot); +double QTimeLine_virtualbase_ValueForTime(const void* self, int msec); +void QTimeLine_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTimeLine_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTimeLine_override_virtual_Event(void* self, intptr_t slot); +bool QTimeLine_virtualbase_Event(void* self, QEvent* event); +void QTimeLine_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTimeLine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTimeLine_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTimeLine_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTimeLine_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTimeLine_virtualbase_CustomEvent(void* self, QEvent* event); +void QTimeLine_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTimeLine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTimeLine_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTimeLine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTimeLine_Delete(QTimeLine* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtimer.cpp b/qt6/gen_qtimer.cpp index 28a4569c..ed5f3309 100644 --- a/qt6/gen_qtimer.cpp +++ b/qt6/gen_qtimer.cpp @@ -1,19 +1,208 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qtimer.h" #include "_cgo_export.h" -QTimer* QTimer_new() { - return new QTimer(); +class MiqtVirtualQTimer : public virtual QTimer { +public: + + MiqtVirtualQTimer(): QTimer() {}; + MiqtVirtualQTimer(QObject* parent): QTimer(parent) {}; + + virtual ~MiqtVirtualQTimer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QTimer::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QTimer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QTimer::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTimer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTimer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTimer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTimer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTimer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTimer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTimer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTimer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTimer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTimer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTimer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTimer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTimer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTimer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTimer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTimer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTimer::disconnectNotify(*signal); + + } + +}; + +void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject) { + MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(); + *outptr_QTimer = ret; + *outptr_QObject = static_cast(ret); } -QTimer* QTimer_new2(QObject* parent) { - return new QTimer(parent); +void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject) { + MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(parent); + *outptr_QTimer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTimer_MetaObject(const QTimer* self) { @@ -106,7 +295,67 @@ struct miqt_string QTimer_Tr3(const char* s, const char* c, int n) { return _ms; } -void QTimer_Delete(QTimer* self) { - delete self; +void QTimer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__TimerEvent = slot; +} + +void QTimer_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_TimerEvent(param1); +} + +void QTimer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__Event = slot; +} + +bool QTimer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTimer*)(self) )->virtualbase_Event(event); +} + +void QTimer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__EventFilter = slot; +} + +bool QTimer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTimer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTimer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__ChildEvent = slot; +} + +void QTimer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_ChildEvent(event); +} + +void QTimer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__CustomEvent = slot; +} + +void QTimer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_CustomEvent(event); +} + +void QTimer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__ConnectNotify = slot; +} + +void QTimer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTimer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTimer*)(self) )->handle__DisconnectNotify = slot; +} + +void QTimer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTimer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTimer_Delete(QTimer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtimer.go b/qt6/gen_qtimer.go index 0080e783..ff7bd016 100644 --- a/qt6/gen_qtimer.go +++ b/qt6/gen_qtimer.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTimer struct { - h *C.QTimer + h *C.QTimer + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QTimer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTimer(h *C.QTimer) *QTimer { +// newQTimer constructs the type using only CGO pointers. +func newQTimer(h *C.QTimer, h_QObject *C.QObject) *QTimer { if h == nil { return nil } - return &QTimer{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTimer{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTimer(h unsafe.Pointer) *QTimer { - return newQTimer((*C.QTimer)(h)) +// UnsafeNewQTimer constructs the type using only unsafe pointers. +func UnsafeNewQTimer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimer { + if h == nil { + return nil + } + + return &QTimer{h: (*C.QTimer)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTimer constructs a new QTimer object. func NewQTimer() *QTimer { - ret := C.QTimer_new() - return newQTimer(ret) + var outptr_QTimer *C.QTimer = nil + var outptr_QObject *C.QObject = nil + + C.QTimer_new(&outptr_QTimer, &outptr_QObject) + ret := newQTimer(outptr_QTimer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTimer2 constructs a new QTimer object. func NewQTimer2(parent *QObject) *QTimer { - ret := C.QTimer_new2(parent.cPointer()) - return newQTimer(ret) + var outptr_QTimer *C.QTimer = nil + var outptr_QObject *C.QObject = nil + + C.QTimer_new2(parent.cPointer(), &outptr_QTimer, &outptr_QObject) + ret := newQTimer(outptr_QTimer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTimer) MetaObject() *QMetaObject { @@ -144,9 +164,175 @@ func QTimer_Tr3(s string, c string, n int) string { return _ret } +func (this *QTimer) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QTimer_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QTimer) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QTimer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_TimerEvent +func miqt_exec_callback_QTimer_TimerEvent(self *C.QTimer, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QTimer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTimer) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTimer_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTimer) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTimer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_Event +func miqt_exec_callback_QTimer_Event(self *C.QTimer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimer) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTimer_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTimer) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTimer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_EventFilter +func miqt_exec_callback_QTimer_EventFilter(self *C.QTimer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTimer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTimer) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTimer_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimer) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTimer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_ChildEvent +func miqt_exec_callback_QTimer_ChildEvent(self *C.QTimer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTimer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTimer) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTimer_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTimer) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTimer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_CustomEvent +func miqt_exec_callback_QTimer_CustomEvent(self *C.QTimer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTimer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTimer) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTimer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimer) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_ConnectNotify +func miqt_exec_callback_QTimer_ConnectNotify(self *C.QTimer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTimer) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTimer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTimer) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTimer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTimer_DisconnectNotify +func miqt_exec_callback_QTimer_DisconnectNotify(self *C.QTimer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTimer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTimer) Delete() { - C.QTimer_Delete(this.h) + C.QTimer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtimer.h b/qt6/gen_qtimer.h index 0a2c6f92..9e955746 100644 --- a/qt6/gen_qtimer.h +++ b/qt6/gen_qtimer.h @@ -15,17 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QTimer; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTimer QTimer; +typedef struct QTimerEvent QTimerEvent; #endif -QTimer* QTimer_new(); -QTimer* QTimer_new2(QObject* parent); +void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject); +void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject); QMetaObject* QTimer_MetaObject(const QTimer* self); void* QTimer_Metacast(QTimer* self, const char* param1); struct miqt_string QTimer_Tr(const char* s); @@ -41,9 +49,24 @@ bool QTimer_IsSingleShot(const QTimer* self); void QTimer_Start(QTimer* self, int msec); void QTimer_Start2(QTimer* self); void QTimer_Stop(QTimer* self); +void QTimer_TimerEvent(QTimer* self, QTimerEvent* param1); struct miqt_string QTimer_Tr2(const char* s, const char* c); struct miqt_string QTimer_Tr3(const char* s, const char* c, int n); -void QTimer_Delete(QTimer* self); +void QTimer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTimer_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QTimer_override_virtual_Event(void* self, intptr_t slot); +bool QTimer_virtualbase_Event(void* self, QEvent* event); +void QTimer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTimer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTimer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTimer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTimer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTimer_virtualbase_CustomEvent(void* self, QEvent* event); +void QTimer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTimer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTimer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTimer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTimer_Delete(QTimer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtimezone.cpp b/qt6/gen_qtimezone.cpp index df034d7d..8ba32249 100644 --- a/qt6/gen_qtimezone.cpp +++ b/qt6/gen_qtimezone.cpp @@ -11,43 +11,50 @@ #include "gen_qtimezone.h" #include "_cgo_export.h" -QTimeZone* QTimeZone_new() { - return new QTimeZone(); +void QTimeZone_new(QTimeZone** outptr_QTimeZone) { + QTimeZone* ret = new QTimeZone(); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new2(struct miqt_string ianaId) { +void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone) { QByteArray ianaId_QByteArray(ianaId.data, ianaId.len); - return new QTimeZone(ianaId_QByteArray); + QTimeZone* ret = new QTimeZone(ianaId_QByteArray); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new3(int offsetSeconds) { - return new QTimeZone(static_cast(offsetSeconds)); +void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone) { + QTimeZone* ret = new QTimeZone(static_cast(offsetSeconds)); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation) { +void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); + QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new5(QTimeZone* other) { - return new QTimeZone(*other); +void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone) { + QTimeZone* ret = new QTimeZone(*other); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory) { +void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, QTimeZone** outptr_QTimeZone) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory)); + QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory)); + *outptr_QTimeZone = ret; } -QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment) { +void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment, QTimeZone** outptr_QTimeZone) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); QString comment_QString = QString::fromUtf8(comment.data, comment.len); - return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory), comment_QString); + QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory), comment_QString); + *outptr_QTimeZone = ret; } void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other) { @@ -362,19 +369,28 @@ struct miqt_string QTimeZone_DisplayName32(const QTimeZone* self, int timeType, return _ms; } -void QTimeZone_Delete(QTimeZone* self) { - delete self; +void QTimeZone_Delete(QTimeZone* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1) { - return new QTimeZone::OffsetData(*param1); +void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData) { + QTimeZone::OffsetData* ret = new QTimeZone::OffsetData(*param1); + *outptr_QTimeZone__OffsetData = ret; } void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1) { self->operator=(*param1); } -void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self) { - delete self; +void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtimezone.go b/qt6/gen_qtimezone.go index 0cdc73bc..86784920 100644 --- a/qt6/gen_qtimezone.go +++ b/qt6/gen_qtimezone.go @@ -38,7 +38,8 @@ const ( ) type QTimeZone struct { - h *C.QTimeZone + h *C.QTimeZone + isSubclass bool } func (this *QTimeZone) cPointer() *C.QTimeZone { @@ -55,6 +56,7 @@ func (this *QTimeZone) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTimeZone constructs the type using only CGO pointers. func newQTimeZone(h *C.QTimeZone) *QTimeZone { if h == nil { return nil @@ -62,14 +64,23 @@ func newQTimeZone(h *C.QTimeZone) *QTimeZone { return &QTimeZone{h: h} } +// UnsafeNewQTimeZone constructs the type using only unsafe pointers. func UnsafeNewQTimeZone(h unsafe.Pointer) *QTimeZone { - return newQTimeZone((*C.QTimeZone)(h)) + if h == nil { + return nil + } + + return &QTimeZone{h: (*C.QTimeZone)(h)} } // NewQTimeZone constructs a new QTimeZone object. func NewQTimeZone() *QTimeZone { - ret := C.QTimeZone_new() - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new(&outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone2 constructs a new QTimeZone object. @@ -77,14 +88,22 @@ func NewQTimeZone2(ianaId []byte) *QTimeZone { ianaId_alias := C.struct_miqt_string{} ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0])) ianaId_alias.len = C.size_t(len(ianaId)) - ret := C.QTimeZone_new2(ianaId_alias) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new2(ianaId_alias, &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone3 constructs a new QTimeZone object. func NewQTimeZone3(offsetSeconds int) *QTimeZone { - ret := C.QTimeZone_new3((C.int)(offsetSeconds)) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new3((C.int)(offsetSeconds), &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone4 constructs a new QTimeZone object. @@ -100,14 +119,22 @@ func NewQTimeZone4(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - ret := C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone5 constructs a new QTimeZone object. func NewQTimeZone5(other *QTimeZone) *QTimeZone { - ret := C.QTimeZone_new5(other.cPointer()) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new5(other.cPointer(), &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone6 constructs a new QTimeZone object. @@ -123,8 +150,12 @@ func NewQTimeZone6(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - ret := C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory)) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory), &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } // NewQTimeZone7 constructs a new QTimeZone object. @@ -144,8 +175,12 @@ func NewQTimeZone7(zoneId []byte, offsetSeconds int, name string, abbreviation s comment_ms.data = C.CString(comment) comment_ms.len = C.size_t(len(comment)) defer C.free(unsafe.Pointer(comment_ms.data)) - ret := C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory), comment_ms) - return newQTimeZone(ret) + var outptr_QTimeZone *C.QTimeZone = nil + + C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory), comment_ms, &outptr_QTimeZone) + ret := newQTimeZone(outptr_QTimeZone) + ret.isSubclass = true + return ret } func (this *QTimeZone) OperatorAssign(other *QTimeZone) { @@ -420,7 +455,7 @@ func (this *QTimeZone) DisplayName32(timeType QTimeZone__TimeType, nameType QTim // Delete this object from C++ memory. func (this *QTimeZone) Delete() { - C.QTimeZone_Delete(this.h) + C.QTimeZone_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -433,7 +468,8 @@ func (this *QTimeZone) GoGC() { } type QTimeZone__OffsetData struct { - h *C.QTimeZone__OffsetData + h *C.QTimeZone__OffsetData + isSubclass bool } func (this *QTimeZone__OffsetData) cPointer() *C.QTimeZone__OffsetData { @@ -450,6 +486,7 @@ func (this *QTimeZone__OffsetData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTimeZone__OffsetData constructs the type using only CGO pointers. func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData { if h == nil { return nil @@ -457,14 +494,23 @@ func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData return &QTimeZone__OffsetData{h: h} } +// UnsafeNewQTimeZone__OffsetData constructs the type using only unsafe pointers. func UnsafeNewQTimeZone__OffsetData(h unsafe.Pointer) *QTimeZone__OffsetData { - return newQTimeZone__OffsetData((*C.QTimeZone__OffsetData)(h)) + if h == nil { + return nil + } + + return &QTimeZone__OffsetData{h: (*C.QTimeZone__OffsetData)(h)} } // NewQTimeZone__OffsetData constructs a new QTimeZone::OffsetData object. func NewQTimeZone__OffsetData(param1 *QTimeZone__OffsetData) *QTimeZone__OffsetData { - ret := C.QTimeZone__OffsetData_new(param1.cPointer()) - return newQTimeZone__OffsetData(ret) + var outptr_QTimeZone__OffsetData *C.QTimeZone__OffsetData = nil + + C.QTimeZone__OffsetData_new(param1.cPointer(), &outptr_QTimeZone__OffsetData) + ret := newQTimeZone__OffsetData(outptr_QTimeZone__OffsetData) + ret.isSubclass = true + return ret } func (this *QTimeZone__OffsetData) OperatorAssign(param1 *QTimeZone__OffsetData) { @@ -473,7 +519,7 @@ func (this *QTimeZone__OffsetData) OperatorAssign(param1 *QTimeZone__OffsetData) // Delete this object from C++ memory. func (this *QTimeZone__OffsetData) Delete() { - C.QTimeZone__OffsetData_Delete(this.h) + C.QTimeZone__OffsetData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtimezone.h b/qt6/gen_qtimezone.h index 7d77befc..585de412 100644 --- a/qt6/gen_qtimezone.h +++ b/qt6/gen_qtimezone.h @@ -32,13 +32,13 @@ typedef struct QTimeZone QTimeZone; typedef struct QTimeZone__OffsetData QTimeZone__OffsetData; #endif -QTimeZone* QTimeZone_new(); -QTimeZone* QTimeZone_new2(struct miqt_string ianaId); -QTimeZone* QTimeZone_new3(int offsetSeconds); -QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation); -QTimeZone* QTimeZone_new5(QTimeZone* other); -QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory); -QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment); +void QTimeZone_new(QTimeZone** outptr_QTimeZone); +void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone); +void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone); +void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone); +void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone); +void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, QTimeZone** outptr_QTimeZone); +void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment, QTimeZone** outptr_QTimeZone); void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other); void QTimeZone_Swap(QTimeZone* self, QTimeZone* other); bool QTimeZone_IsValid(const QTimeZone* self); @@ -75,11 +75,11 @@ struct miqt_string QTimeZone_DisplayName2(const QTimeZone* self, QDateTime* atDa struct miqt_string QTimeZone_DisplayName3(const QTimeZone* self, QDateTime* atDateTime, int nameType, QLocale* locale); struct miqt_string QTimeZone_DisplayName22(const QTimeZone* self, int timeType, int nameType); struct miqt_string QTimeZone_DisplayName32(const QTimeZone* self, int timeType, int nameType, QLocale* locale); -void QTimeZone_Delete(QTimeZone* self); +void QTimeZone_Delete(QTimeZone* self, bool isSubclass); -QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1); +void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData); void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1); -void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self); +void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtoolbar.cpp b/qt6/gen_qtoolbar.cpp index 2068c7e6..3ed98d86 100644 --- a/qt6/gen_qtoolbar.cpp +++ b/qt6/gen_qtoolbar.cpp @@ -1,33 +1,1088 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include +#include +#include #include +#include +#include #include #include #include "gen_qtoolbar.h" #include "_cgo_export.h" -QToolBar* QToolBar_new(QWidget* parent) { - return new QToolBar(parent); +class MiqtVirtualQToolBar : public virtual QToolBar { +public: + + MiqtVirtualQToolBar(QWidget* parent): QToolBar(parent) {}; + MiqtVirtualQToolBar(const QString& title): QToolBar(title) {}; + MiqtVirtualQToolBar(): QToolBar() {}; + MiqtVirtualQToolBar(const QString& title, QWidget* parent): QToolBar(title, parent) {}; + + virtual ~MiqtVirtualQToolBar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QToolBar::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QToolBar::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QToolBar::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QToolBar::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QToolBar::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QToolBar::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QToolBar::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QToolBar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QToolBar::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionToolBar* option) const override { + if (handle__InitStyleOption == 0) { + QToolBar::initStyleOption(option); + return; + } + + QStyleOptionToolBar* sigval1 = option; + + miqt_exec_callback_QToolBar_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionToolBar* option) const { + + QToolBar::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QToolBar::devType(); + } + + + int callback_return_value = miqt_exec_callback_QToolBar_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QToolBar::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QToolBar::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QToolBar_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QToolBar::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QToolBar::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolBar_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QToolBar::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QToolBar::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolBar_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QToolBar::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QToolBar::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QToolBar_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QToolBar::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QToolBar::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QToolBar_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QToolBar::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QToolBar::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QToolBar_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QToolBar::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QToolBar::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QToolBar::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QToolBar::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QToolBar::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QToolBar::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QToolBar::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QToolBar::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QToolBar::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QToolBar::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QToolBar::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QToolBar::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QToolBar::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QToolBar::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QToolBar::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QToolBar::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QToolBar::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QToolBar::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QToolBar::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QToolBar::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QToolBar::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QToolBar::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QToolBar::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QToolBar::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QToolBar::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QToolBar::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QToolBar::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QToolBar::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QToolBar::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QToolBar::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QToolBar::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QToolBar::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QToolBar::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QToolBar::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QToolBar::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QToolBar::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QToolBar::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QToolBar::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QToolBar::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QToolBar::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QToolBar::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QToolBar::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QToolBar::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QToolBar::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QToolBar_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QToolBar::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QToolBar::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QToolBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QToolBar::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QToolBar::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QToolBar_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QToolBar::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QToolBar::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QToolBar_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QToolBar::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QToolBar::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QToolBar_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QToolBar::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QToolBar::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QToolBar_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QToolBar::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QToolBar::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QToolBar_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QToolBar::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QToolBar::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QToolBar_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QToolBar::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QToolBar::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QToolBar_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QToolBar::focusNextPrevChild(next); + + } + +}; + +void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(parent); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBar* QToolBar_new2(struct miqt_string title) { +void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QToolBar(title_QString); + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBar* QToolBar_new3() { - return new QToolBar(); +void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent) { +void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { QString title_QString = QString::fromUtf8(title.data, title.len); - return new QToolBar(title_QString, parent); + MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString, parent); + *outptr_QToolBar = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QToolBar_MetaObject(const QToolBar* self) { @@ -153,7 +1208,7 @@ void QToolBar_ActionTriggered(QToolBar* self, QAction* action) { } void QToolBar_connect_ActionTriggered(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::actionTriggered), self, [=](QAction* action) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::actionTriggered), self, [=](QAction* action) { QAction* sigval1 = action; miqt_exec_callback_QToolBar_ActionTriggered(slot, sigval1); }); @@ -164,7 +1219,7 @@ void QToolBar_MovableChanged(QToolBar* self, bool movable) { } void QToolBar_connect_MovableChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::movableChanged), self, [=](bool movable) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::movableChanged), self, [=](bool movable) { bool sigval1 = movable; miqt_exec_callback_QToolBar_MovableChanged(slot, sigval1); }); @@ -175,7 +1230,7 @@ void QToolBar_AllowedAreasChanged(QToolBar* self, int allowedAreas) { } void QToolBar_connect_AllowedAreasChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::allowedAreasChanged), self, [=](Qt::ToolBarAreas allowedAreas) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::allowedAreasChanged), self, [=](Qt::ToolBarAreas allowedAreas) { Qt::ToolBarAreas allowedAreas_ret = allowedAreas; int sigval1 = static_cast(allowedAreas_ret); miqt_exec_callback_QToolBar_AllowedAreasChanged(slot, sigval1); @@ -187,7 +1242,7 @@ void QToolBar_OrientationChanged(QToolBar* self, int orientation) { } void QToolBar_connect_OrientationChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::orientationChanged), self, [=](Qt::Orientation orientation) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::orientationChanged), self, [=](Qt::Orientation orientation) { Qt::Orientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); miqt_exec_callback_QToolBar_OrientationChanged(slot, sigval1); @@ -199,7 +1254,7 @@ void QToolBar_IconSizeChanged(QToolBar* self, QSize* iconSize) { } void QToolBar_connect_IconSizeChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::iconSizeChanged), self, [=](const QSize& iconSize) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::iconSizeChanged), self, [=](const QSize& iconSize) { const QSize& iconSize_ret = iconSize; // Cast returned reference into pointer QSize* sigval1 = const_cast(&iconSize_ret); @@ -212,7 +1267,7 @@ void QToolBar_ToolButtonStyleChanged(QToolBar* self, int toolButtonStyle) { } void QToolBar_connect_ToolButtonStyleChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) { Qt::ToolButtonStyle toolButtonStyle_ret = toolButtonStyle; int sigval1 = static_cast(toolButtonStyle_ret); miqt_exec_callback_QToolBar_ToolButtonStyleChanged(slot, sigval1); @@ -224,7 +1279,7 @@ void QToolBar_TopLevelChanged(QToolBar* self, bool topLevel) { } void QToolBar_connect_TopLevelChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::topLevelChanged), self, [=](bool topLevel) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::topLevelChanged), self, [=](bool topLevel) { bool sigval1 = topLevel; miqt_exec_callback_QToolBar_TopLevelChanged(slot, sigval1); }); @@ -235,7 +1290,7 @@ void QToolBar_VisibilityChanged(QToolBar* self, bool visible) { } void QToolBar_connect_VisibilityChanged(QToolBar* self, intptr_t slot) { - QToolBar::connect(self, static_cast(&QToolBar::visibilityChanged), self, [=](bool visible) { + MiqtVirtualQToolBar::connect(self, static_cast(&QToolBar::visibilityChanged), self, [=](bool visible) { bool sigval1 = visible; miqt_exec_callback_QToolBar_VisibilityChanged(slot, sigval1); }); @@ -263,7 +1318,347 @@ struct miqt_string QToolBar_Tr3(const char* s, const char* c, int n) { return _ms; } -void QToolBar_Delete(QToolBar* self) { - delete self; +void QToolBar_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ActionEvent = slot; +} + +void QToolBar_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ActionEvent(event); +} + +void QToolBar_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ChangeEvent = slot; +} + +void QToolBar_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ChangeEvent(event); +} + +void QToolBar_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__PaintEvent = slot; +} + +void QToolBar_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_PaintEvent(event); +} + +void QToolBar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__Event = slot; +} + +bool QToolBar_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQToolBar*)(self) )->virtualbase_Event(event); +} + +void QToolBar_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InitStyleOption = slot; +} + +void QToolBar_virtualbase_InitStyleOption(const void* self, QStyleOptionToolBar* option) { + ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_InitStyleOption(option); +} + +void QToolBar_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DevType = slot; +} + +int QToolBar_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_DevType(); +} + +void QToolBar_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__SetVisible = slot; +} + +void QToolBar_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_SetVisible(visible); +} + +void QToolBar_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__SizeHint = slot; +} + +QSize* QToolBar_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_SizeHint(); +} + +void QToolBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QToolBar_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QToolBar_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__HeightForWidth = slot; +} + +int QToolBar_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QToolBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QToolBar_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QToolBar_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QToolBar_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_PaintEngine(); +} + +void QToolBar_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MousePressEvent = slot; +} + +void QToolBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MousePressEvent(event); +} + +void QToolBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QToolBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QToolBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QToolBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QToolBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MouseMoveEvent = slot; +} + +void QToolBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QToolBar_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__WheelEvent = slot; +} + +void QToolBar_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_WheelEvent(event); +} + +void QToolBar_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__KeyPressEvent = slot; +} + +void QToolBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QToolBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QToolBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QToolBar_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__FocusInEvent = slot; +} + +void QToolBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_FocusInEvent(event); +} + +void QToolBar_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__FocusOutEvent = slot; +} + +void QToolBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QToolBar_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__EnterEvent = slot; +} + +void QToolBar_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_EnterEvent(event); +} + +void QToolBar_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__LeaveEvent = slot; +} + +void QToolBar_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_LeaveEvent(event); +} + +void QToolBar_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__MoveEvent = slot; +} + +void QToolBar_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_MoveEvent(event); +} + +void QToolBar_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ResizeEvent = slot; +} + +void QToolBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ResizeEvent(event); +} + +void QToolBar_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__CloseEvent = slot; +} + +void QToolBar_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_CloseEvent(event); +} + +void QToolBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ContextMenuEvent = slot; +} + +void QToolBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QToolBar_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__TabletEvent = slot; +} + +void QToolBar_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_TabletEvent(event); +} + +void QToolBar_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DragEnterEvent = slot; +} + +void QToolBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QToolBar_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DragMoveEvent = slot; +} + +void QToolBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QToolBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DragLeaveEvent = slot; +} + +void QToolBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QToolBar_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__DropEvent = slot; +} + +void QToolBar_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_DropEvent(event); +} + +void QToolBar_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__ShowEvent = slot; +} + +void QToolBar_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_ShowEvent(event); +} + +void QToolBar_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__HideEvent = slot; +} + +void QToolBar_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_HideEvent(event); +} + +void QToolBar_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__NativeEvent = slot; +} + +bool QToolBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQToolBar*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QToolBar_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__Metric = slot; +} + +int QToolBar_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_Metric(param1); +} + +void QToolBar_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InitPainter = slot; +} + +void QToolBar_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_InitPainter(painter); +} + +void QToolBar_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QToolBar_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_Redirected(offset); +} + +void QToolBar_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QToolBar_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_SharedPainter(); +} + +void QToolBar_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InputMethodEvent = slot; +} + +void QToolBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQToolBar*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QToolBar_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QToolBar_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQToolBar*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QToolBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QToolBar*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QToolBar_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQToolBar*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QToolBar_Delete(QToolBar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtoolbar.go b/qt6/gen_qtoolbar.go index c37ad074..4b0d3877 100644 --- a/qt6/gen_qtoolbar.go +++ b/qt6/gen_qtoolbar.go @@ -15,7 +15,8 @@ import ( ) type QToolBar struct { - h *C.QToolBar + h *C.QToolBar + isSubclass bool *QWidget } @@ -33,21 +34,36 @@ func (this *QToolBar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolBar(h *C.QToolBar) *QToolBar { +// newQToolBar constructs the type using only CGO pointers. +func newQToolBar(h *C.QToolBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBar { if h == nil { return nil } - return &QToolBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} + return &QToolBar{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQToolBar(h unsafe.Pointer) *QToolBar { - return newQToolBar((*C.QToolBar)(h)) +// UnsafeNewQToolBar constructs the type using only unsafe pointers. +func UnsafeNewQToolBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBar { + if h == nil { + return nil + } + + return &QToolBar{h: (*C.QToolBar)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQToolBar constructs a new QToolBar object. func NewQToolBar(parent *QWidget) *QToolBar { - ret := C.QToolBar_new(parent.cPointer()) - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new(parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBar2 constructs a new QToolBar object. @@ -56,14 +72,28 @@ func NewQToolBar2(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QToolBar_new2(title_ms) - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new2(title_ms, &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBar3 constructs a new QToolBar object. func NewQToolBar3() *QToolBar { - ret := C.QToolBar_new3() - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new3(&outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBar4 constructs a new QToolBar object. @@ -72,8 +102,15 @@ func NewQToolBar4(title string, parent *QWidget) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - ret := C.QToolBar_new4(title_ms, parent.cPointer()) - return newQToolBar(ret) + var outptr_QToolBar *C.QToolBar = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBar_new4(title_ms, parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QToolBar) MetaObject() *QMetaObject { @@ -128,19 +165,19 @@ func (this *QToolBar) Clear() { } func (this *QToolBar) AddSeparator() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddSeparator(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddSeparator(this.h)), nil) } func (this *QToolBar) InsertSeparator(before *QAction) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertSeparator(this.h, before.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertSeparator(this.h, before.cPointer())), nil) } func (this *QToolBar) AddWidget(widget *QWidget) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddWidget(this.h, widget.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_AddWidget(this.h, widget.cPointer())), nil) } func (this *QToolBar) InsertWidget(before *QAction, widget *QWidget) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer())), nil) } func (this *QToolBar) ActionGeometry(action *QAction) *QRect { @@ -151,15 +188,15 @@ func (this *QToolBar) ActionGeometry(action *QAction) *QRect { } func (this *QToolBar) ActionAt(p *QPoint) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt(this.h, p.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt(this.h, p.cPointer())), nil) } func (this *QToolBar) ActionAt2(x int, y int) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y)))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y))), nil) } func (this *QToolBar) ToggleViewAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ToggleViewAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolBar_ToggleViewAction(this.h)), nil) } func (this *QToolBar) IconSize() *QSize { @@ -174,7 +211,7 @@ func (this *QToolBar) ToolButtonStyle() ToolButtonStyle { } func (this *QToolBar) WidgetForAction(action *QAction) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QToolBar_WidgetForAction(this.h, action.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QToolBar_WidgetForAction(this.h, action.cPointer())), nil, nil) } func (this *QToolBar) IsFloatable() bool { @@ -212,7 +249,7 @@ func miqt_exec_callback_QToolBar_ActionTriggered(cb C.intptr_t, action *C.QActio } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(action)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(action), nil) gofunc(slotval1) } @@ -379,9 +416,998 @@ func QToolBar_Tr3(s string, c string, n int) string { return _ret } +func (this *QToolBar) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QToolBar_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QToolBar_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ActionEvent +func miqt_exec_callback_QToolBar_ActionEvent(self *C.QToolBar, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QToolBar_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QToolBar_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ChangeEvent +func miqt_exec_callback_QToolBar_ChangeEvent(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QToolBar{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QToolBar_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QToolBar_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_PaintEvent +func miqt_exec_callback_QToolBar_PaintEvent(self *C.QToolBar, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QToolBar_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QToolBar) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QToolBar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_Event +func miqt_exec_callback_QToolBar_Event(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_InitStyleOption(option *QStyleOptionToolBar) { + + C.QToolBar_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QToolBar) OnInitStyleOption(slot func(super func(option *QStyleOptionToolBar), option *QStyleOptionToolBar)) { + C.QToolBar_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InitStyleOption +func miqt_exec_callback_QToolBar_InitStyleOption(self *C.QToolBar, cb C.intptr_t, option *C.QStyleOptionToolBar) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionToolBar), option *QStyleOptionToolBar)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionToolBar(unsafe.Pointer(option), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DevType() int { + + return (int)(C.QToolBar_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QToolBar) OnDevType(slot func(super func() int) int) { + C.QToolBar_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DevType +func miqt_exec_callback_QToolBar_DevType(self *C.QToolBar, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_SetVisible(visible bool) { + + C.QToolBar_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QToolBar) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QToolBar_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_SetVisible +func miqt_exec_callback_QToolBar_SetVisible(self *C.QToolBar, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QToolBar{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QToolBar) callVirtualBase_SizeHint() *QSize { + + _ret := C.QToolBar_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBar) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolBar_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_SizeHint +func miqt_exec_callback_QToolBar_SizeHint(self *C.QToolBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QToolBar_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBar) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolBar_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MinimumSizeHint +func miqt_exec_callback_QToolBar_MinimumSizeHint(self *C.QToolBar, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QToolBar_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QToolBar) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QToolBar_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_HeightForWidth +func miqt_exec_callback_QToolBar_HeightForWidth(self *C.QToolBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QToolBar_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QToolBar) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QToolBar_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_HasHeightForWidth +func miqt_exec_callback_QToolBar_HasHeightForWidth(self *C.QToolBar, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QToolBar_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QToolBar) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QToolBar_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_PaintEngine +func miqt_exec_callback_QToolBar_PaintEngine(self *C.QToolBar, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MousePressEvent +func miqt_exec_callback_QToolBar_MousePressEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MouseReleaseEvent +func miqt_exec_callback_QToolBar_MouseReleaseEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MouseDoubleClickEvent +func miqt_exec_callback_QToolBar_MouseDoubleClickEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QToolBar_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QToolBar_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MouseMoveEvent +func miqt_exec_callback_QToolBar_MouseMoveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QToolBar_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QToolBar_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_WheelEvent +func miqt_exec_callback_QToolBar_WheelEvent(self *C.QToolBar, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QToolBar_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QToolBar_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_KeyPressEvent +func miqt_exec_callback_QToolBar_KeyPressEvent(self *C.QToolBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QToolBar_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QToolBar_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_KeyReleaseEvent +func miqt_exec_callback_QToolBar_KeyReleaseEvent(self *C.QToolBar, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QToolBar_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QToolBar_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_FocusInEvent +func miqt_exec_callback_QToolBar_FocusInEvent(self *C.QToolBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QToolBar_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QToolBar_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_FocusOutEvent +func miqt_exec_callback_QToolBar_FocusOutEvent(self *C.QToolBar, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QToolBar_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QToolBar_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_EnterEvent +func miqt_exec_callback_QToolBar_EnterEvent(self *C.QToolBar, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QToolBar_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QToolBar_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_LeaveEvent +func miqt_exec_callback_QToolBar_LeaveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QToolBar{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QToolBar_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QToolBar_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_MoveEvent +func miqt_exec_callback_QToolBar_MoveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QToolBar_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QToolBar_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ResizeEvent +func miqt_exec_callback_QToolBar_ResizeEvent(self *C.QToolBar, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QToolBar_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QToolBar_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_CloseEvent +func miqt_exec_callback_QToolBar_CloseEvent(self *C.QToolBar, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QToolBar_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QToolBar_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ContextMenuEvent +func miqt_exec_callback_QToolBar_ContextMenuEvent(self *C.QToolBar, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QToolBar_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QToolBar_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_TabletEvent +func miqt_exec_callback_QToolBar_TabletEvent(self *C.QToolBar, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QToolBar_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QToolBar_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DragEnterEvent +func miqt_exec_callback_QToolBar_DragEnterEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QToolBar_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QToolBar_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DragMoveEvent +func miqt_exec_callback_QToolBar_DragMoveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QToolBar_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QToolBar_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DragLeaveEvent +func miqt_exec_callback_QToolBar_DragLeaveEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QToolBar_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QToolBar_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_DropEvent +func miqt_exec_callback_QToolBar_DropEvent(self *C.QToolBar, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QToolBar_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QToolBar_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_ShowEvent +func miqt_exec_callback_QToolBar_ShowEvent(self *C.QToolBar, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QToolBar_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QToolBar) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QToolBar_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_HideEvent +func miqt_exec_callback_QToolBar_HideEvent(self *C.QToolBar, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QToolBar_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QToolBar) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QToolBar_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_NativeEvent +func miqt_exec_callback_QToolBar_NativeEvent(self *C.QToolBar, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QToolBar_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QToolBar) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QToolBar_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_Metric +func miqt_exec_callback_QToolBar_Metric(self *C.QToolBar, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QToolBar) callVirtualBase_InitPainter(painter *QPainter) { + + C.QToolBar_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QToolBar) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QToolBar_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InitPainter +func miqt_exec_callback_QToolBar_InitPainter(self *C.QToolBar, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QToolBar{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QToolBar) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QToolBar_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QToolBar) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QToolBar_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_Redirected +func miqt_exec_callback_QToolBar_Redirected(self *C.QToolBar, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QToolBar_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QToolBar) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QToolBar_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_SharedPainter +func miqt_exec_callback_QToolBar_SharedPainter(self *C.QToolBar, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QToolBar_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolBar) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QToolBar_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InputMethodEvent +func miqt_exec_callback_QToolBar_InputMethodEvent(self *C.QToolBar, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QToolBar) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QToolBar_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBar) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QToolBar_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_InputMethodQuery +func miqt_exec_callback_QToolBar_InputMethodQuery(self *C.QToolBar, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QToolBar) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QToolBar_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QToolBar) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QToolBar_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBar_FocusNextPrevChild +func miqt_exec_callback_QToolBar_FocusNextPrevChild(self *C.QToolBar, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QToolBar{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QToolBar) Delete() { - C.QToolBar_Delete(this.h) + C.QToolBar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtoolbar.h b/qt6/gen_qtoolbar.h index 4b992b61..ab96f655 100644 --- a/qt6/gen_qtoolbar.h +++ b/qt6/gen_qtoolbar.h @@ -16,26 +16,80 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QShowEvent; class QSize; +class QStyleOptionToolBar; +class QTabletEvent; class QToolBar; +class QVariant; +class QWheelEvent; class QWidget; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QStyleOptionToolBar QStyleOptionToolBar; +typedef struct QTabletEvent QTabletEvent; typedef struct QToolBar QToolBar; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QToolBar* QToolBar_new(QWidget* parent); -QToolBar* QToolBar_new2(struct miqt_string title); -QToolBar* QToolBar_new3(); -QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent); +void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QToolBar_MetaObject(const QToolBar* self); void* QToolBar_Metacast(QToolBar* self, const char* param1); struct miqt_string QToolBar_Tr(const char* s); @@ -79,9 +133,98 @@ void QToolBar_TopLevelChanged(QToolBar* self, bool topLevel); void QToolBar_connect_TopLevelChanged(QToolBar* self, intptr_t slot); void QToolBar_VisibilityChanged(QToolBar* self, bool visible); void QToolBar_connect_VisibilityChanged(QToolBar* self, intptr_t slot); +void QToolBar_ActionEvent(QToolBar* self, QActionEvent* event); +void QToolBar_ChangeEvent(QToolBar* self, QEvent* event); +void QToolBar_PaintEvent(QToolBar* self, QPaintEvent* event); +bool QToolBar_Event(QToolBar* self, QEvent* event); +void QToolBar_InitStyleOption(const QToolBar* self, QStyleOptionToolBar* option); struct miqt_string QToolBar_Tr2(const char* s, const char* c); struct miqt_string QToolBar_Tr3(const char* s, const char* c, int n); -void QToolBar_Delete(QToolBar* self); +void QToolBar_override_virtual_ActionEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QToolBar_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ChangeEvent(void* self, QEvent* event); +void QToolBar_override_virtual_PaintEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QToolBar_override_virtual_Event(void* self, intptr_t slot); +bool QToolBar_virtualbase_Event(void* self, QEvent* event); +void QToolBar_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QToolBar_virtualbase_InitStyleOption(const void* self, QStyleOptionToolBar* option); +void QToolBar_override_virtual_DevType(void* self, intptr_t slot); +int QToolBar_virtualbase_DevType(const void* self); +void QToolBar_override_virtual_SetVisible(void* self, intptr_t slot); +void QToolBar_virtualbase_SetVisible(void* self, bool visible); +void QToolBar_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QToolBar_virtualbase_SizeHint(const void* self); +void QToolBar_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QToolBar_virtualbase_MinimumSizeHint(const void* self); +void QToolBar_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QToolBar_virtualbase_HeightForWidth(const void* self, int param1); +void QToolBar_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QToolBar_virtualbase_HasHeightForWidth(const void* self); +void QToolBar_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QToolBar_virtualbase_PaintEngine(const void* self); +void QToolBar_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QToolBar_override_virtual_WheelEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QToolBar_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QToolBar_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QToolBar_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QToolBar_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QToolBar_override_virtual_EnterEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QToolBar_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_LeaveEvent(void* self, QEvent* event); +void QToolBar_override_virtual_MoveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QToolBar_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QToolBar_override_virtual_CloseEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QToolBar_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QToolBar_override_virtual_TabletEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QToolBar_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QToolBar_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QToolBar_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QToolBar_override_virtual_DropEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_DropEvent(void* self, QDropEvent* event); +void QToolBar_override_virtual_ShowEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QToolBar_override_virtual_HideEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_HideEvent(void* self, QHideEvent* event); +void QToolBar_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QToolBar_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QToolBar_override_virtual_Metric(void* self, intptr_t slot); +int QToolBar_virtualbase_Metric(const void* self, int param1); +void QToolBar_override_virtual_InitPainter(void* self, intptr_t slot); +void QToolBar_virtualbase_InitPainter(const void* self, QPainter* painter); +void QToolBar_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QToolBar_virtualbase_Redirected(const void* self, QPoint* offset); +void QToolBar_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QToolBar_virtualbase_SharedPainter(const void* self); +void QToolBar_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QToolBar_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QToolBar_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QToolBar_virtualbase_InputMethodQuery(const void* self, int param1); +void QToolBar_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QToolBar_virtualbase_FocusNextPrevChild(void* self, bool next); +void QToolBar_Delete(QToolBar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtoolbox.cpp b/qt6/gen_qtoolbox.cpp index 5c4738b5..8bc043c7 100644 --- a/qt6/gen_qtoolbox.cpp +++ b/qt6/gen_qtoolbox.cpp @@ -1,24 +1,247 @@ +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include +#include #include #include #include #include "gen_qtoolbox.h" #include "_cgo_export.h" -QToolBox* QToolBox_new(QWidget* parent) { - return new QToolBox(parent); +class MiqtVirtualQToolBox : public virtual QToolBox { +public: + + MiqtVirtualQToolBox(QWidget* parent): QToolBox(parent) {}; + MiqtVirtualQToolBox(): QToolBox() {}; + MiqtVirtualQToolBox(QWidget* parent, Qt::WindowFlags f): QToolBox(parent, f) {}; + + virtual ~MiqtVirtualQToolBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QToolBox::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QToolBox_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QToolBox::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void itemInserted(int index) override { + if (handle__ItemInserted == 0) { + QToolBox::itemInserted(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QToolBox_ItemInserted(this, handle__ItemInserted, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ItemInserted(int index) { + + QToolBox::itemInserted(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void itemRemoved(int index) override { + if (handle__ItemRemoved == 0) { + QToolBox::itemRemoved(index); + return; + } + + int sigval1 = index; + + miqt_exec_callback_QToolBox_ItemRemoved(this, handle__ItemRemoved, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ItemRemoved(int index) { + + QToolBox::itemRemoved(static_cast(index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* e) override { + if (handle__ShowEvent == 0) { + QToolBox::showEvent(e); + return; + } + + QShowEvent* sigval1 = e; + + miqt_exec_callback_QToolBox_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* e) { + + QToolBox::showEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QToolBox::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolBox_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QToolBox::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QToolBox::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolBox_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QToolBox::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QToolBox::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QToolBox_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QToolBox::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__InitStyleOption == 0) { + QToolBox::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QToolBox_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionFrame* option) const { + + QToolBox::initStyleOption(option); + + } + +}; + +void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent); + *outptr_QToolBox = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBox* QToolBox_new2() { - return new QToolBox(); +void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(); + *outptr_QToolBox = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolBox* QToolBox_new3(QWidget* parent, int f) { - return new QToolBox(parent, static_cast(f)); +void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent, static_cast(f)); + *outptr_QToolBox = ret; + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QToolBox_MetaObject(const QToolBox* self) { @@ -145,7 +368,7 @@ void QToolBox_CurrentChanged(QToolBox* self, int index) { } void QToolBox_connect_CurrentChanged(QToolBox* self, intptr_t slot) { - QToolBox::connect(self, static_cast(&QToolBox::currentChanged), self, [=](int index) { + MiqtVirtualQToolBox::connect(self, static_cast(&QToolBox::currentChanged), self, [=](int index) { int sigval1 = index; miqt_exec_callback_QToolBox_CurrentChanged(slot, sigval1); }); @@ -173,7 +396,75 @@ struct miqt_string QToolBox_Tr3(const char* s, const char* c, int n) { return _ms; } -void QToolBox_Delete(QToolBox* self) { - delete self; +void QToolBox_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__Event = slot; +} + +bool QToolBox_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQToolBox*)(self) )->virtualbase_Event(e); +} + +void QToolBox_override_virtual_ItemInserted(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ItemInserted = slot; +} + +void QToolBox_virtualbase_ItemInserted(void* self, int index) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ItemInserted(index); +} + +void QToolBox_override_virtual_ItemRemoved(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ItemRemoved = slot; +} + +void QToolBox_virtualbase_ItemRemoved(void* self, int index) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ItemRemoved(index); +} + +void QToolBox_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ShowEvent = slot; +} + +void QToolBox_virtualbase_ShowEvent(void* self, QShowEvent* e) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ShowEvent(e); +} + +void QToolBox_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__ChangeEvent = slot; +} + +void QToolBox_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QToolBox_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__SizeHint = slot; +} + +QSize* QToolBox_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQToolBox*)(self) )->virtualbase_SizeHint(); +} + +void QToolBox_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__PaintEvent = slot; +} + +void QToolBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQToolBox*)(self) )->virtualbase_PaintEvent(param1); +} + +void QToolBox_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QToolBox*)(self) )->handle__InitStyleOption = slot; +} + +void QToolBox_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option) { + ( (const MiqtVirtualQToolBox*)(self) )->virtualbase_InitStyleOption(option); +} + +void QToolBox_Delete(QToolBox* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtoolbox.go b/qt6/gen_qtoolbox.go index 1fcec03c..c0ab1259 100644 --- a/qt6/gen_qtoolbox.go +++ b/qt6/gen_qtoolbox.go @@ -15,7 +15,8 @@ import ( ) type QToolBox struct { - h *C.QToolBox + h *C.QToolBox + isSubclass bool *QFrame } @@ -33,33 +34,65 @@ func (this *QToolBox) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolBox(h *C.QToolBox) *QToolBox { +// newQToolBox constructs the type using only CGO pointers. +func newQToolBox(h *C.QToolBox, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBox { if h == nil { return nil } - return &QToolBox{h: h, QFrame: UnsafeNewQFrame(unsafe.Pointer(h))} + return &QToolBox{h: h, + QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQToolBox(h unsafe.Pointer) *QToolBox { - return newQToolBox((*C.QToolBox)(h)) +// UnsafeNewQToolBox constructs the type using only unsafe pointers. +func UnsafeNewQToolBox(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBox { + if h == nil { + return nil + } + + return &QToolBox{h: (*C.QToolBox)(h), + QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQToolBox constructs a new QToolBox object. func NewQToolBox(parent *QWidget) *QToolBox { - ret := C.QToolBox_new(parent.cPointer()) - return newQToolBox(ret) + var outptr_QToolBox *C.QToolBox = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBox_new(parent.cPointer(), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBox2 constructs a new QToolBox object. func NewQToolBox2() *QToolBox { - ret := C.QToolBox_new2() - return newQToolBox(ret) + var outptr_QToolBox *C.QToolBox = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBox_new2(&outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolBox3 constructs a new QToolBox object. func NewQToolBox3(parent *QWidget, f WindowType) *QToolBox { - ret := C.QToolBox_new3(parent.cPointer(), (C.int)(f)) - return newQToolBox(ret) + var outptr_QToolBox *C.QToolBox = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolBox_new3(parent.cPointer(), (C.int)(f), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QToolBox) MetaObject() *QMetaObject { @@ -171,11 +204,11 @@ func (this *QToolBox) CurrentIndex() int { } func (this *QToolBox) CurrentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_CurrentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_CurrentWidget(this.h)), nil, nil) } func (this *QToolBox) Widget(index int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_Widget(this.h, (C.int)(index)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QToolBox_Widget(this.h, (C.int)(index))), nil, nil) } func (this *QToolBox) IndexOf(widget *QWidget) int { @@ -236,9 +269,197 @@ func QToolBox_Tr3(s string, c string, n int) string { return _ret } +func (this *QToolBox) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QToolBox_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QToolBox) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QToolBox_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_Event +func miqt_exec_callback_QToolBox_Event(self *C.QToolBox, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QToolBox{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolBox) callVirtualBase_ItemInserted(index int) { + + C.QToolBox_virtualbase_ItemInserted(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QToolBox) OnItemInserted(slot func(super func(index int), index int)) { + C.QToolBox_override_virtual_ItemInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ItemInserted +func miqt_exec_callback_QToolBox_ItemInserted(self *C.QToolBox, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QToolBox{h: self}).callVirtualBase_ItemInserted, slotval1) + +} + +func (this *QToolBox) callVirtualBase_ItemRemoved(index int) { + + C.QToolBox_virtualbase_ItemRemoved(unsafe.Pointer(this.h), (C.int)(index)) + +} +func (this *QToolBox) OnItemRemoved(slot func(super func(index int), index int)) { + C.QToolBox_override_virtual_ItemRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ItemRemoved +func miqt_exec_callback_QToolBox_ItemRemoved(self *C.QToolBox, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index int), index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc((&QToolBox{h: self}).callVirtualBase_ItemRemoved, slotval1) + +} + +func (this *QToolBox) callVirtualBase_ShowEvent(e *QShowEvent) { + + C.QToolBox_virtualbase_ShowEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolBox) OnShowEvent(slot func(super func(e *QShowEvent), e *QShowEvent)) { + C.QToolBox_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ShowEvent +func miqt_exec_callback_QToolBox_ShowEvent(self *C.QToolBox, cb C.intptr_t, e *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QShowEvent), e *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(e), nil) + + gofunc((&QToolBox{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QToolBox) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QToolBox_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolBox) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolBox_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_ChangeEvent +func miqt_exec_callback_QToolBox_ChangeEvent(self *C.QToolBox, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolBox{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QToolBox) callVirtualBase_SizeHint() *QSize { + + _ret := C.QToolBox_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolBox) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolBox_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_SizeHint +func miqt_exec_callback_QToolBox_SizeHint(self *C.QToolBox, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolBox{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolBox) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QToolBox_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolBox) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QToolBox_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_PaintEvent +func miqt_exec_callback_QToolBox_PaintEvent(self *C.QToolBox, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolBox{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QToolBox) callVirtualBase_InitStyleOption(option *QStyleOptionFrame) { + + C.QToolBox_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QToolBox) OnInitStyleOption(slot func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) { + C.QToolBox_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolBox_InitStyleOption +func miqt_exec_callback_QToolBox_InitStyleOption(self *C.QToolBox, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionFrame), option *QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionFrame(unsafe.Pointer(option), nil) + + gofunc((&QToolBox{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + // Delete this object from C++ memory. func (this *QToolBox) Delete() { - C.QToolBox_Delete(this.h) + C.QToolBox_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtoolbox.h b/qt6/gen_qtoolbox.h index aa797626..5524b55c 100644 --- a/qt6/gen_qtoolbox.h +++ b/qt6/gen_qtoolbox.h @@ -15,20 +15,36 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; +class QFrame; class QIcon; class QMetaObject; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QShowEvent; +class QSize; +class QStyleOptionFrame; class QToolBox; class QWidget; #else +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QToolBox QToolBox; typedef struct QWidget QWidget; #endif -QToolBox* QToolBox_new(QWidget* parent); -QToolBox* QToolBox_new2(); -QToolBox* QToolBox_new3(QWidget* parent, int f); +void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QToolBox_MetaObject(const QToolBox* self); void* QToolBox_Metacast(QToolBox* self, const char* param1); struct miqt_string QToolBox_Tr(const char* s); @@ -54,9 +70,30 @@ void QToolBox_SetCurrentIndex(QToolBox* self, int index); void QToolBox_SetCurrentWidget(QToolBox* self, QWidget* widget); void QToolBox_CurrentChanged(QToolBox* self, int index); void QToolBox_connect_CurrentChanged(QToolBox* self, intptr_t slot); +bool QToolBox_Event(QToolBox* self, QEvent* e); +void QToolBox_ItemInserted(QToolBox* self, int index); +void QToolBox_ItemRemoved(QToolBox* self, int index); +void QToolBox_ShowEvent(QToolBox* self, QShowEvent* e); +void QToolBox_ChangeEvent(QToolBox* self, QEvent* param1); struct miqt_string QToolBox_Tr2(const char* s, const char* c); struct miqt_string QToolBox_Tr3(const char* s, const char* c, int n); -void QToolBox_Delete(QToolBox* self); +void QToolBox_override_virtual_Event(void* self, intptr_t slot); +bool QToolBox_virtualbase_Event(void* self, QEvent* e); +void QToolBox_override_virtual_ItemInserted(void* self, intptr_t slot); +void QToolBox_virtualbase_ItemInserted(void* self, int index); +void QToolBox_override_virtual_ItemRemoved(void* self, intptr_t slot); +void QToolBox_virtualbase_ItemRemoved(void* self, int index); +void QToolBox_override_virtual_ShowEvent(void* self, intptr_t slot); +void QToolBox_virtualbase_ShowEvent(void* self, QShowEvent* e); +void QToolBox_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QToolBox_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QToolBox_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QToolBox_virtualbase_SizeHint(const void* self); +void QToolBox_override_virtual_PaintEvent(void* self, intptr_t slot); +void QToolBox_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QToolBox_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QToolBox_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); +void QToolBox_Delete(QToolBox* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtoolbutton.cpp b/qt6/gen_qtoolbutton.cpp index f48cca76..50710b2e 100644 --- a/qt6/gen_qtoolbutton.cpp +++ b/qt6/gen_qtoolbutton.cpp @@ -1,22 +1,529 @@ +#include #include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include #include #include "gen_qtoolbutton.h" #include "_cgo_export.h" -QToolButton* QToolButton_new(QWidget* parent) { - return new QToolButton(parent); +class MiqtVirtualQToolButton : public virtual QToolButton { +public: + + MiqtVirtualQToolButton(QWidget* parent): QToolButton(parent) {}; + MiqtVirtualQToolButton(): QToolButton() {}; + + virtual ~MiqtVirtualQToolButton() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QToolButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QToolButton::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QToolButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QToolButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QToolButton::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QToolButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QToolButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QToolButton::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QToolButton::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QToolButton::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QToolButton::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QToolButton::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QToolButton::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QToolButton::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* param1) override { + if (handle__ActionEvent == 0) { + QToolButton::actionEvent(param1); + return; + } + + QActionEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* param1) { + + QToolButton::actionEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* param1) override { + if (handle__EnterEvent == 0) { + QToolButton::enterEvent(param1); + return; + } + + QEnterEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* param1) { + + QToolButton::enterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* param1) override { + if (handle__LeaveEvent == 0) { + QToolButton::leaveEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* param1) { + + QToolButton::leaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* param1) override { + if (handle__TimerEvent == 0) { + QToolButton::timerEvent(param1); + return; + } + + QTimerEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* param1) { + + QToolButton::timerEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QToolButton::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QToolButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QToolButton::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitButton = 0; + + // Subclass to allow providing a Go implementation + virtual bool hitButton(const QPoint& pos) const override { + if (handle__HitButton == 0) { + return QToolButton::hitButton(pos); + } + + const QPoint& pos_ret = pos; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&pos_ret); + + bool callback_return_value = miqt_exec_callback_QToolButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QToolButton::hitButton(*pos); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CheckStateSet = 0; + + // Subclass to allow providing a Go implementation + virtual void checkStateSet() override { + if (handle__CheckStateSet == 0) { + QToolButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QToolButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QToolButton::checkStateSet(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextCheckState = 0; + + // Subclass to allow providing a Go implementation + virtual void nextCheckState() override { + if (handle__NextCheckState == 0) { + QToolButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QToolButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QToolButton::nextCheckState(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionToolButton* option) const override { + if (handle__InitStyleOption == 0) { + QToolButton::initStyleOption(option); + return; + } + + QStyleOptionToolButton* sigval1 = option; + + miqt_exec_callback_QToolButton_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOptionToolButton* option) const { + + QToolButton::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* e) override { + if (handle__KeyPressEvent == 0) { + QToolButton::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QToolButton::keyPressEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* e) override { + if (handle__KeyReleaseEvent == 0) { + QToolButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QToolButton::keyReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QToolButton::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QToolButton::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* e) override { + if (handle__FocusInEvent == 0) { + QToolButton::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QToolButton::focusInEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* e) override { + if (handle__FocusOutEvent == 0) { + QToolButton::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QToolButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QToolButton::focusOutEvent(e); + + } + +}; + +void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(parent); + *outptr_QToolButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QToolButton* QToolButton_new2() { - return new QToolButton(); +void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(); + *outptr_QToolButton = ret; + *outptr_QAbstractButton = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QToolButton_MetaObject(const QToolButton* self) { @@ -106,7 +613,7 @@ void QToolButton_Triggered(QToolButton* self, QAction* param1) { } void QToolButton_connect_Triggered(QToolButton* self, intptr_t slot) { - QToolButton::connect(self, static_cast(&QToolButton::triggered), self, [=](QAction* param1) { + MiqtVirtualQToolButton::connect(self, static_cast(&QToolButton::triggered), self, [=](QAction* param1) { QAction* sigval1 = param1; miqt_exec_callback_QToolButton_Triggered(slot, sigval1); }); @@ -134,7 +641,171 @@ struct miqt_string QToolButton_Tr3(const char* s, const char* c, int n) { return _ms; } -void QToolButton_Delete(QToolButton* self) { - delete self; +void QToolButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QToolButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_SizeHint(); +} + +void QToolButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QToolButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QToolButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__Event = slot; +} + +bool QToolButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQToolButton*)(self) )->virtualbase_Event(e); +} + +void QToolButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MousePressEvent = slot; +} + +void QToolButton_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QToolButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QToolButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QToolButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__PaintEvent = slot; +} + +void QToolButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_PaintEvent(param1); +} + +void QToolButton_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__ActionEvent = slot; +} + +void QToolButton_virtualbase_ActionEvent(void* self, QActionEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_ActionEvent(param1); +} + +void QToolButton_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__EnterEvent = slot; +} + +void QToolButton_virtualbase_EnterEvent(void* self, QEnterEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_EnterEvent(param1); +} + +void QToolButton_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__LeaveEvent = slot; +} + +void QToolButton_virtualbase_LeaveEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_LeaveEvent(param1); +} + +void QToolButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__TimerEvent = slot; +} + +void QToolButton_virtualbase_TimerEvent(void* self, QTimerEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_TimerEvent(param1); +} + +void QToolButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__ChangeEvent = slot; +} + +void QToolButton_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QToolButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__HitButton = slot; +} + +bool QToolButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_HitButton(pos); +} + +void QToolButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__CheckStateSet = slot; +} + +void QToolButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QToolButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__NextCheckState = slot; +} + +void QToolButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_NextCheckState(); +} + +void QToolButton_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__InitStyleOption = slot; +} + +void QToolButton_virtualbase_InitStyleOption(const void* self, QStyleOptionToolButton* option) { + ( (const MiqtVirtualQToolButton*)(self) )->virtualbase_InitStyleOption(option); +} + +void QToolButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QToolButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QToolButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QToolButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QToolButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QToolButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QToolButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__FocusInEvent = slot; +} + +void QToolButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_FocusInEvent(e); +} + +void QToolButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QToolButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QToolButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQToolButton*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QToolButton_Delete(QToolButton* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtoolbutton.go b/qt6/gen_qtoolbutton.go index c2ff41d8..e2505a9e 100644 --- a/qt6/gen_qtoolbutton.go +++ b/qt6/gen_qtoolbutton.go @@ -23,7 +23,8 @@ const ( ) type QToolButton struct { - h *C.QToolButton + h *C.QToolButton + isSubclass bool *QAbstractButton } @@ -41,27 +42,51 @@ func (this *QToolButton) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQToolButton(h *C.QToolButton) *QToolButton { +// newQToolButton constructs the type using only CGO pointers. +func newQToolButton(h *C.QToolButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolButton { if h == nil { return nil } - return &QToolButton{h: h, QAbstractButton: UnsafeNewQAbstractButton(unsafe.Pointer(h))} + return &QToolButton{h: h, + QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQToolButton(h unsafe.Pointer) *QToolButton { - return newQToolButton((*C.QToolButton)(h)) +// UnsafeNewQToolButton constructs the type using only unsafe pointers. +func UnsafeNewQToolButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolButton { + if h == nil { + return nil + } + + return &QToolButton{h: (*C.QToolButton)(h), + QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQToolButton constructs a new QToolButton object. func NewQToolButton(parent *QWidget) *QToolButton { - ret := C.QToolButton_new(parent.cPointer()) - return newQToolButton(ret) + var outptr_QToolButton *C.QToolButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolButton_new(parent.cPointer(), &outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQToolButton2 constructs a new QToolButton object. func NewQToolButton2() *QToolButton { - ret := C.QToolButton_new2() - return newQToolButton(ret) + var outptr_QToolButton *C.QToolButton = nil + var outptr_QAbstractButton *C.QAbstractButton = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QToolButton_new2(&outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QToolButton) MetaObject() *QMetaObject { @@ -114,7 +139,7 @@ func (this *QToolButton) SetMenu(menu *QMenu) { } func (this *QToolButton) Menu() *QMenu { - return UnsafeNewQMenu(unsafe.Pointer(C.QToolButton_Menu(this.h))) + return UnsafeNewQMenu(unsafe.Pointer(C.QToolButton_Menu(this.h)), nil, nil, nil) } func (this *QToolButton) SetPopupMode(mode QToolButton__ToolButtonPopupMode) { @@ -126,7 +151,7 @@ func (this *QToolButton) PopupMode() QToolButton__ToolButtonPopupMode { } func (this *QToolButton) DefaultAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QToolButton_DefaultAction(this.h))) + return UnsafeNewQAction(unsafe.Pointer(C.QToolButton_DefaultAction(this.h)), nil) } func (this *QToolButton) SetAutoRaise(enable bool) { @@ -164,7 +189,7 @@ func miqt_exec_callback_QToolButton_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQAction(unsafe.Pointer(param1)) + slotval1 := UnsafeNewQAction(unsafe.Pointer(param1), nil) gofunc(slotval1) } @@ -191,9 +216,471 @@ func QToolButton_Tr3(s string, c string, n int) string { return _ret } +func (this *QToolButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QToolButton_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_SizeHint +func miqt_exec_callback_QToolButton_SizeHint(self *C.QToolButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QToolButton_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QToolButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QToolButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MinimumSizeHint +func miqt_exec_callback_QToolButton_MinimumSizeHint(self *C.QToolButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QToolButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QToolButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QToolButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QToolButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_Event +func miqt_exec_callback_QToolButton_Event(self *C.QToolButton, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolButton) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QToolButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QToolButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MousePressEvent +func miqt_exec_callback_QToolButton_MousePressEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QToolButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QToolButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MouseReleaseEvent +func miqt_exec_callback_QToolButton_MouseReleaseEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QToolButton_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QToolButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_PaintEvent +func miqt_exec_callback_QToolButton_PaintEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_ActionEvent(param1 *QActionEvent) { + + C.QToolButton_virtualbase_ActionEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnActionEvent(slot func(super func(param1 *QActionEvent), param1 *QActionEvent)) { + C.QToolButton_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_ActionEvent +func miqt_exec_callback_QToolButton_ActionEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QActionEvent), param1 *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_EnterEvent(param1 *QEnterEvent) { + + C.QToolButton_virtualbase_EnterEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnEnterEvent(slot func(super func(param1 *QEnterEvent), param1 *QEnterEvent)) { + C.QToolButton_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_EnterEvent +func miqt_exec_callback_QToolButton_EnterEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEnterEvent), param1 *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_LeaveEvent(param1 *QEvent) { + + C.QToolButton_virtualbase_LeaveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnLeaveEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolButton_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_LeaveEvent +func miqt_exec_callback_QToolButton_LeaveEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolButton{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_TimerEvent(param1 *QTimerEvent) { + + C.QToolButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnTimerEvent(slot func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) { + C.QToolButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_TimerEvent +func miqt_exec_callback_QToolButton_TimerEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTimerEvent), param1 *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(param1), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QToolButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QToolButton) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QToolButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_ChangeEvent +func miqt_exec_callback_QToolButton_ChangeEvent(self *C.QToolButton, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QToolButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QToolButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QToolButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QToolButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_HitButton +func miqt_exec_callback_QToolButton_HitButton(self *C.QToolButton, cb C.intptr_t, pos *C.QPoint) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *QPoint) bool, pos *QPoint) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QToolButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QToolButton) callVirtualBase_CheckStateSet() { + + C.QToolButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QToolButton) OnCheckStateSet(slot func(super func())) { + C.QToolButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_CheckStateSet +func miqt_exec_callback_QToolButton_CheckStateSet(self *C.QToolButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QToolButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QToolButton) callVirtualBase_NextCheckState() { + + C.QToolButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QToolButton) OnNextCheckState(slot func(super func())) { + C.QToolButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_NextCheckState +func miqt_exec_callback_QToolButton_NextCheckState(self *C.QToolButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QToolButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QToolButton) callVirtualBase_InitStyleOption(option *QStyleOptionToolButton) { + + C.QToolButton_virtualbase_InitStyleOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QToolButton) OnInitStyleOption(slot func(super func(option *QStyleOptionToolButton), option *QStyleOptionToolButton)) { + C.QToolButton_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_InitStyleOption +func miqt_exec_callback_QToolButton_InitStyleOption(self *C.QToolButton, cb C.intptr_t, option *C.QStyleOptionToolButton) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionToolButton), option *QStyleOptionToolButton)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionToolButton(unsafe.Pointer(option), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QToolButton) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QToolButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QToolButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_KeyPressEvent +func miqt_exec_callback_QToolButton_KeyPressEvent(self *C.QToolButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QToolButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QToolButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_KeyReleaseEvent +func miqt_exec_callback_QToolButton_KeyReleaseEvent(self *C.QToolButton, cb C.intptr_t, e *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QKeyEvent), e *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QToolButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QToolButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_MouseMoveEvent +func miqt_exec_callback_QToolButton_MouseMoveEvent(self *C.QToolButton, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QToolButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QToolButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_FocusInEvent +func miqt_exec_callback_QToolButton_FocusInEvent(self *C.QToolButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QToolButton) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QToolButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QToolButton) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QToolButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QToolButton_FocusOutEvent +func miqt_exec_callback_QToolButton_FocusOutEvent(self *C.QToolButton, cb C.intptr_t, e *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QFocusEvent), e *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + + gofunc((&QToolButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + // Delete this object from C++ memory. func (this *QToolButton) Delete() { - C.QToolButton_Delete(this.h) + C.QToolButton_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtoolbutton.h b/qt6/gen_qtoolbutton.h index d8aaaf41..b895a162 100644 --- a/qt6/gen_qtoolbutton.h +++ b/qt6/gen_qtoolbutton.h @@ -15,23 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractButton; class QAction; +class QActionEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QKeyEvent; class QMenu; class QMetaObject; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; class QSize; +class QStyleOptionToolButton; +class QTimerEvent; class QToolButton; class QWidget; #else +typedef struct QAbstractButton QAbstractButton; typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMenu QMenu; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; typedef struct QSize QSize; +typedef struct QStyleOptionToolButton QStyleOptionToolButton; +typedef struct QTimerEvent QTimerEvent; typedef struct QToolButton QToolButton; typedef struct QWidget QWidget; #endif -QToolButton* QToolButton_new(QWidget* parent); -QToolButton* QToolButton_new2(); +void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QToolButton_MetaObject(const QToolButton* self); void* QToolButton_Metacast(QToolButton* self, const char* param1); struct miqt_string QToolButton_Tr(const char* s); @@ -52,9 +78,62 @@ void QToolButton_SetToolButtonStyle(QToolButton* self, int style); void QToolButton_SetDefaultAction(QToolButton* self, QAction* defaultAction); void QToolButton_Triggered(QToolButton* self, QAction* param1); void QToolButton_connect_Triggered(QToolButton* self, intptr_t slot); +bool QToolButton_Event(QToolButton* self, QEvent* e); +void QToolButton_MousePressEvent(QToolButton* self, QMouseEvent* param1); +void QToolButton_MouseReleaseEvent(QToolButton* self, QMouseEvent* param1); +void QToolButton_PaintEvent(QToolButton* self, QPaintEvent* param1); +void QToolButton_ActionEvent(QToolButton* self, QActionEvent* param1); +void QToolButton_EnterEvent(QToolButton* self, QEnterEvent* param1); +void QToolButton_LeaveEvent(QToolButton* self, QEvent* param1); +void QToolButton_TimerEvent(QToolButton* self, QTimerEvent* param1); +void QToolButton_ChangeEvent(QToolButton* self, QEvent* param1); +bool QToolButton_HitButton(const QToolButton* self, QPoint* pos); +void QToolButton_CheckStateSet(QToolButton* self); +void QToolButton_NextCheckState(QToolButton* self); +void QToolButton_InitStyleOption(const QToolButton* self, QStyleOptionToolButton* option); struct miqt_string QToolButton_Tr2(const char* s, const char* c); struct miqt_string QToolButton_Tr3(const char* s, const char* c, int n); -void QToolButton_Delete(QToolButton* self); +void QToolButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QToolButton_virtualbase_SizeHint(const void* self); +void QToolButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QToolButton_virtualbase_MinimumSizeHint(const void* self); +void QToolButton_override_virtual_Event(void* self, intptr_t slot); +bool QToolButton_virtualbase_Event(void* self, QEvent* e); +void QToolButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QToolButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QToolButton_override_virtual_PaintEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QToolButton_override_virtual_ActionEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_ActionEvent(void* self, QActionEvent* param1); +void QToolButton_override_virtual_EnterEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_EnterEvent(void* self, QEnterEvent* param1); +void QToolButton_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_LeaveEvent(void* self, QEvent* param1); +void QToolButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_TimerEvent(void* self, QTimerEvent* param1); +void QToolButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QToolButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QToolButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QToolButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QToolButton_virtualbase_CheckStateSet(void* self); +void QToolButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QToolButton_virtualbase_NextCheckState(void* self); +void QToolButton_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QToolButton_virtualbase_InitStyleOption(const void* self, QStyleOptionToolButton* option); +void QToolButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QToolButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QToolButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QToolButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QToolButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QToolButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QToolButton_Delete(QToolButton* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtooltip.cpp b/qt6/gen_qtooltip.cpp index 835d19eb..d94f7adf 100644 --- a/qt6/gen_qtooltip.cpp +++ b/qt6/gen_qtooltip.cpp @@ -66,7 +66,11 @@ void QToolTip_ShowText5(QPoint* pos, struct miqt_string text, QWidget* w, QRect* QToolTip::showText(*pos, text_QString, w, *rect, static_cast(msecShowTime)); } -void QToolTip_Delete(QToolTip* self) { - delete self; +void QToolTip_Delete(QToolTip* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtooltip.go b/qt6/gen_qtooltip.go index 6ec3eba1..834ddd6f 100644 --- a/qt6/gen_qtooltip.go +++ b/qt6/gen_qtooltip.go @@ -14,7 +14,8 @@ import ( ) type QToolTip struct { - h *C.QToolTip + h *C.QToolTip + isSubclass bool } func (this *QToolTip) cPointer() *C.QToolTip { @@ -31,6 +32,7 @@ func (this *QToolTip) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQToolTip constructs the type using only CGO pointers. func newQToolTip(h *C.QToolTip) *QToolTip { if h == nil { return nil @@ -38,8 +40,13 @@ func newQToolTip(h *C.QToolTip) *QToolTip { return &QToolTip{h: h} } +// UnsafeNewQToolTip constructs the type using only unsafe pointers. func UnsafeNewQToolTip(h unsafe.Pointer) *QToolTip { - return newQToolTip((*C.QToolTip)(h)) + if h == nil { + return nil + } + + return &QToolTip{h: (*C.QToolTip)(h)} } func QToolTip_ShowText(pos *QPoint, text string) { @@ -113,7 +120,7 @@ func QToolTip_ShowText5(pos *QPoint, text string, w *QWidget, rect *QRect, msecS // Delete this object from C++ memory. func (this *QToolTip) Delete() { - C.QToolTip_Delete(this.h) + C.QToolTip_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtooltip.h b/qt6/gen_qtooltip.h index 57ddf23d..3b91f1fb 100644 --- a/qt6/gen_qtooltip.h +++ b/qt6/gen_qtooltip.h @@ -41,7 +41,7 @@ void QToolTip_SetFont(QFont* font); void QToolTip_ShowText3(QPoint* pos, struct miqt_string text, QWidget* w); void QToolTip_ShowText4(QPoint* pos, struct miqt_string text, QWidget* w, QRect* rect); void QToolTip_ShowText5(QPoint* pos, struct miqt_string text, QWidget* w, QRect* rect, int msecShowTime); -void QToolTip_Delete(QToolTip* self); +void QToolTip_Delete(QToolTip* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtransform.cpp b/qt6/gen_qtransform.cpp index a585519f..16144f13 100644 --- a/qt6/gen_qtransform.cpp +++ b/qt6/gen_qtransform.cpp @@ -11,24 +11,29 @@ #include "gen_qtransform.h" #include "_cgo_export.h" -QTransform* QTransform_new(int param1) { - return new QTransform(static_cast(param1)); +void QTransform_new(int param1, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(param1)); + *outptr_QTransform = ret; } -QTransform* QTransform_new2() { - return new QTransform(); +void QTransform_new2(QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(); + *outptr_QTransform = ret; } -QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33) { - return new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); +void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); + *outptr_QTransform = ret; } -QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy) { - return new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); +void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); + *outptr_QTransform = ret; } -QTransform* QTransform_new5(QTransform* other) { - return new QTransform(*other); +void QTransform_new5(QTransform* other, QTransform** outptr_QTransform) { + QTransform* ret = new QTransform(*other); + *outptr_QTransform = ret; } void QTransform_OperatorAssign(QTransform* self, QTransform* param1) { @@ -280,7 +285,11 @@ QTransform* QTransform_RotateRadians2(QTransform* self, double a, int axis) { return &_ret; } -void QTransform_Delete(QTransform* self) { - delete self; +void QTransform_Delete(QTransform* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtransform.go b/qt6/gen_qtransform.go index 0029573d..7e58b0fa 100644 --- a/qt6/gen_qtransform.go +++ b/qt6/gen_qtransform.go @@ -25,7 +25,8 @@ const ( ) type QTransform struct { - h *C.QTransform + h *C.QTransform + isSubclass bool } func (this *QTransform) cPointer() *C.QTransform { @@ -42,6 +43,7 @@ func (this *QTransform) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTransform constructs the type using only CGO pointers. func newQTransform(h *C.QTransform) *QTransform { if h == nil { return nil @@ -49,38 +51,63 @@ func newQTransform(h *C.QTransform) *QTransform { return &QTransform{h: h} } +// UnsafeNewQTransform constructs the type using only unsafe pointers. func UnsafeNewQTransform(h unsafe.Pointer) *QTransform { - return newQTransform((*C.QTransform)(h)) + if h == nil { + return nil + } + + return &QTransform{h: (*C.QTransform)(h)} } // NewQTransform constructs a new QTransform object. func NewQTransform(param1 Initialization) *QTransform { - ret := C.QTransform_new((C.int)(param1)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new((C.int)(param1), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform2 constructs a new QTransform object. func NewQTransform2() *QTransform { - ret := C.QTransform_new2() - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new2(&outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform3 constructs a new QTransform object. func NewQTransform3(h11 float64, h12 float64, h13 float64, h21 float64, h22 float64, h23 float64, h31 float64, h32 float64, h33 float64) *QTransform { - ret := C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform4 constructs a new QTransform object. func NewQTransform4(h11 float64, h12 float64, h21 float64, h22 float64, dx float64, dy float64) *QTransform { - ret := C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy)) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } // NewQTransform5 constructs a new QTransform object. func NewQTransform5(other *QTransform) *QTransform { - ret := C.QTransform_new5(other.cPointer()) - return newQTransform(ret) + var outptr_QTransform *C.QTransform = nil + + C.QTransform_new5(other.cPointer(), &outptr_QTransform) + ret := newQTransform(outptr_QTransform) + ret.isSubclass = true + return ret } func (this *QTransform) OperatorAssign(param1 *QTransform) { @@ -342,7 +369,7 @@ func (this *QTransform) RotateRadians2(a float64, axis Axis) *QTransform { // Delete this object from C++ memory. func (this *QTransform) Delete() { - C.QTransform_Delete(this.h) + C.QTransform_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtransform.h b/qt6/gen_qtransform.h index 78c07c57..a8e18690 100644 --- a/qt6/gen_qtransform.h +++ b/qt6/gen_qtransform.h @@ -36,11 +36,11 @@ typedef struct QRegion QRegion; typedef struct QTransform QTransform; #endif -QTransform* QTransform_new(int param1); -QTransform* QTransform_new2(); -QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33); -QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy); -QTransform* QTransform_new5(QTransform* other); +void QTransform_new(int param1, QTransform** outptr_QTransform); +void QTransform_new2(QTransform** outptr_QTransform); +void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform); +void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform); +void QTransform_new5(QTransform* other, QTransform** outptr_QTransform); void QTransform_OperatorAssign(QTransform* self, QTransform* param1); bool QTransform_IsAffine(const QTransform* self); bool QTransform_IsIdentity(const QTransform* self); @@ -94,7 +94,7 @@ QTransform* QTransform_FromScale(double dx, double dy); QTransform* QTransform_Inverted1(const QTransform* self, bool* invertible); QTransform* QTransform_Rotate2(QTransform* self, double a, int axis); QTransform* QTransform_RotateRadians2(QTransform* self, double a, int axis); -void QTransform_Delete(QTransform* self); +void QTransform_Delete(QTransform* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtranslator.cpp b/qt6/gen_qtranslator.cpp index 79cd71b2..59dd9c8d 100644 --- a/qt6/gen_qtranslator.cpp +++ b/qt6/gen_qtranslator.cpp @@ -1,20 +1,265 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qtranslator.h" #include "_cgo_export.h" -QTranslator* QTranslator_new() { - return new QTranslator(); +class MiqtVirtualQTranslator : public virtual QTranslator { +public: + + MiqtVirtualQTranslator(): QTranslator() {}; + MiqtVirtualQTranslator(QObject* parent): QTranslator(parent) {}; + + virtual ~MiqtVirtualQTranslator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Translate = 0; + + // Subclass to allow providing a Go implementation + virtual QString translate(const char* context, const char* sourceText, const char* disambiguation, int n) const override { + if (handle__Translate == 0) { + return QTranslator::translate(context, sourceText, disambiguation, n); + } + + const char* sigval1 = (const char*) context; + const char* sigval2 = (const char*) sourceText; + const char* sigval3 = (const char*) disambiguation; + int sigval4 = n; + + struct miqt_string callback_return_value = miqt_exec_callback_QTranslator_Translate(const_cast(this), handle__Translate, sigval1, sigval2, sigval3, sigval4); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_Translate(const char* context, const char* sourceText, const char* disambiguation, int n) const { + + QString _ret = QTranslator::translate(context, sourceText, disambiguation, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsEmpty = 0; + + // Subclass to allow providing a Go implementation + virtual bool isEmpty() const override { + if (handle__IsEmpty == 0) { + return QTranslator::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QTranslator_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QTranslator::isEmpty(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTranslator::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTranslator_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTranslator::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTranslator::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTranslator_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTranslator::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTranslator::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTranslator_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTranslator::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTranslator::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTranslator_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTranslator::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTranslator::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTranslator_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTranslator::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTranslator::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTranslator_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTranslator::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTranslator::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTranslator_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTranslator::disconnectNotify(*signal); + + } + +}; + +void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject) { + MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(); + *outptr_QTranslator = ret; + *outptr_QObject = static_cast(ret); } -QTranslator* QTranslator_new2(QObject* parent) { - return new QTranslator(parent); +void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject) { + MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(parent); + *outptr_QTranslator = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTranslator_MetaObject(const QTranslator* self) { @@ -36,8 +281,8 @@ struct miqt_string QTranslator_Tr(const char* s) { return _ms; } -struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText) { - QString _ret = self->translate(context, sourceText); +struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n) { + QString _ret = self->translate(context, sourceText, disambiguation, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; @@ -109,28 +354,6 @@ struct miqt_string QTranslator_Tr3(const char* s, const char* c, int n) { return _ms; } -struct miqt_string QTranslator_Translate3(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation) { - QString _ret = self->translate(context, sourceText, disambiguation); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} - -struct miqt_string QTranslator_Translate4(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n) { - QString _ret = self->translate(context, sourceText, disambiguation, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; -} - bool QTranslator_Load22(QTranslator* self, struct miqt_string filename, struct miqt_string directory) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); @@ -178,7 +401,83 @@ bool QTranslator_Load34(QTranslator* self, const unsigned char* data, int lenVal return self->load(static_cast(data), static_cast(lenVal), directory_QString); } -void QTranslator_Delete(QTranslator* self) { - delete self; +void QTranslator_override_virtual_Translate(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__Translate = slot; +} + +struct miqt_string QTranslator_virtualbase_Translate(const void* self, const char* context, const char* sourceText, const char* disambiguation, int n) { + return ( (const MiqtVirtualQTranslator*)(self) )->virtualbase_Translate(context, sourceText, disambiguation, n); +} + +void QTranslator_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__IsEmpty = slot; +} + +bool QTranslator_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQTranslator*)(self) )->virtualbase_IsEmpty(); +} + +void QTranslator_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__Event = slot; +} + +bool QTranslator_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTranslator*)(self) )->virtualbase_Event(event); +} + +void QTranslator_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__EventFilter = slot; +} + +bool QTranslator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTranslator*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTranslator_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__TimerEvent = slot; +} + +void QTranslator_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_TimerEvent(event); +} + +void QTranslator_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__ChildEvent = slot; +} + +void QTranslator_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_ChildEvent(event); +} + +void QTranslator_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__CustomEvent = slot; +} + +void QTranslator_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_CustomEvent(event); +} + +void QTranslator_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__ConnectNotify = slot; +} + +void QTranslator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTranslator_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTranslator*)(self) )->handle__DisconnectNotify = slot; +} + +void QTranslator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTranslator*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTranslator_Delete(QTranslator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtranslator.go b/qt6/gen_qtranslator.go index 608173db..1cde80b1 100644 --- a/qt6/gen_qtranslator.go +++ b/qt6/gen_qtranslator.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTranslator struct { - h *C.QTranslator + h *C.QTranslator + isSubclass bool *QObject } @@ -32,27 +34,45 @@ func (this *QTranslator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTranslator(h *C.QTranslator) *QTranslator { +// newQTranslator constructs the type using only CGO pointers. +func newQTranslator(h *C.QTranslator, h_QObject *C.QObject) *QTranslator { if h == nil { return nil } - return &QTranslator{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QTranslator{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQTranslator(h unsafe.Pointer) *QTranslator { - return newQTranslator((*C.QTranslator)(h)) +// UnsafeNewQTranslator constructs the type using only unsafe pointers. +func UnsafeNewQTranslator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTranslator { + if h == nil { + return nil + } + + return &QTranslator{h: (*C.QTranslator)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQTranslator constructs a new QTranslator object. func NewQTranslator() *QTranslator { - ret := C.QTranslator_new() - return newQTranslator(ret) + var outptr_QTranslator *C.QTranslator = nil + var outptr_QObject *C.QObject = nil + + C.QTranslator_new(&outptr_QTranslator, &outptr_QObject) + ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTranslator2 constructs a new QTranslator object. func NewQTranslator2(parent *QObject) *QTranslator { - ret := C.QTranslator_new2(parent.cPointer()) - return newQTranslator(ret) + var outptr_QTranslator *C.QTranslator = nil + var outptr_QObject *C.QObject = nil + + C.QTranslator_new2(parent.cPointer(), &outptr_QTranslator, &outptr_QObject) + ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTranslator) MetaObject() *QMetaObject { @@ -74,12 +94,14 @@ func QTranslator_Tr(s string) string { return _ret } -func (this *QTranslator) Translate(context string, sourceText string) string { +func (this *QTranslator) Translate(context string, sourceText string, disambiguation string, n int) string { context_Cstring := C.CString(context) defer C.free(unsafe.Pointer(context_Cstring)) sourceText_Cstring := C.CString(sourceText) defer C.free(unsafe.Pointer(sourceText_Cstring)) - var _ms C.struct_miqt_string = C.QTranslator_Translate(this.h, context_Cstring, sourceText_Cstring) + disambiguation_Cstring := C.CString(disambiguation) + defer C.free(unsafe.Pointer(disambiguation_Cstring)) + var _ms C.struct_miqt_string = C.QTranslator_Translate(this.h, context_Cstring, sourceText_Cstring, disambiguation_Cstring, (C.int)(n)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret @@ -145,32 +167,6 @@ func QTranslator_Tr3(s string, c string, n int) string { return _ret } -func (this *QTranslator) Translate3(context string, sourceText string, disambiguation string) string { - context_Cstring := C.CString(context) - defer C.free(unsafe.Pointer(context_Cstring)) - sourceText_Cstring := C.CString(sourceText) - defer C.free(unsafe.Pointer(sourceText_Cstring)) - disambiguation_Cstring := C.CString(disambiguation) - defer C.free(unsafe.Pointer(disambiguation_Cstring)) - var _ms C.struct_miqt_string = C.QTranslator_Translate3(this.h, context_Cstring, sourceText_Cstring, disambiguation_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - -func (this *QTranslator) Translate4(context string, sourceText string, disambiguation string, n int) string { - context_Cstring := C.CString(context) - defer C.free(unsafe.Pointer(context_Cstring)) - sourceText_Cstring := C.CString(sourceText) - defer C.free(unsafe.Pointer(sourceText_Cstring)) - disambiguation_Cstring := C.CString(disambiguation) - defer C.free(unsafe.Pointer(disambiguation_Cstring)) - var _ms C.struct_miqt_string = C.QTranslator_Translate4(this.h, context_Cstring, sourceText_Cstring, disambiguation_Cstring, (C.int)(n)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret -} - func (this *QTranslator) Load22(filename string, directory string) bool { filename_ms := C.struct_miqt_string{} filename_ms.data = C.CString(filename) @@ -275,9 +271,243 @@ func (this *QTranslator) Load34(data *byte, lenVal int, directory string) bool { return (bool)(C.QTranslator_Load34(this.h, (*C.uchar)(unsafe.Pointer(data)), (C.int)(lenVal), directory_ms)) } +func (this *QTranslator) callVirtualBase_Translate(context string, sourceText string, disambiguation string, n int) string { + context_Cstring := C.CString(context) + defer C.free(unsafe.Pointer(context_Cstring)) + sourceText_Cstring := C.CString(sourceText) + defer C.free(unsafe.Pointer(sourceText_Cstring)) + disambiguation_Cstring := C.CString(disambiguation) + defer C.free(unsafe.Pointer(disambiguation_Cstring)) + + var _ms C.struct_miqt_string = C.QTranslator_virtualbase_Translate(unsafe.Pointer(this.h), context_Cstring, sourceText_Cstring, disambiguation_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QTranslator) OnTranslate(slot func(super func(context string, sourceText string, disambiguation string, n int) string, context string, sourceText string, disambiguation string, n int) string) { + C.QTranslator_override_virtual_Translate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_Translate +func miqt_exec_callback_QTranslator_Translate(self *C.QTranslator, cb C.intptr_t, context *C.const_char, sourceText *C.const_char, disambiguation *C.const_char, n C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(context string, sourceText string, disambiguation string, n int) string, context string, sourceText string, disambiguation string, n int) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + context_ret := context + slotval1 := C.GoString(context_ret) + + sourceText_ret := sourceText + slotval2 := C.GoString(sourceText_ret) + + disambiguation_ret := disambiguation + slotval3 := C.GoString(disambiguation_ret) + + slotval4 := (int)(n) + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_Translate, slotval1, slotval2, slotval3, slotval4) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QTranslator) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QTranslator_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QTranslator) OnIsEmpty(slot func(super func() bool) bool) { + C.QTranslator_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_IsEmpty +func miqt_exec_callback_QTranslator_IsEmpty(self *C.QTranslator, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QTranslator) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTranslator_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTranslator) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTranslator_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_Event +func miqt_exec_callback_QTranslator_Event(self *C.QTranslator, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTranslator) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QTranslator_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QTranslator) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QTranslator_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_EventFilter +func miqt_exec_callback_QTranslator_EventFilter(self *C.QTranslator, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTranslator{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTranslator) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTranslator_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTranslator) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTranslator_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_TimerEvent +func miqt_exec_callback_QTranslator_TimerEvent(self *C.QTranslator, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTranslator{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTranslator) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QTranslator_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTranslator) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QTranslator_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_ChildEvent +func miqt_exec_callback_QTranslator_ChildEvent(self *C.QTranslator, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTranslator{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTranslator) callVirtualBase_CustomEvent(event *QEvent) { + + C.QTranslator_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTranslator) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTranslator_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_CustomEvent +func miqt_exec_callback_QTranslator_CustomEvent(self *C.QTranslator, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTranslator{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTranslator) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QTranslator_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTranslator) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTranslator_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_ConnectNotify +func miqt_exec_callback_QTranslator_ConnectNotify(self *C.QTranslator, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTranslator{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTranslator) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QTranslator_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QTranslator) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QTranslator_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTranslator_DisconnectNotify +func miqt_exec_callback_QTranslator_DisconnectNotify(self *C.QTranslator, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTranslator{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTranslator) Delete() { - C.QTranslator_Delete(this.h) + C.QTranslator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtranslator.h b/qt6/gen_qtranslator.h index 0da14c57..a7ed5fb0 100644 --- a/qt6/gen_qtranslator.h +++ b/qt6/gen_qtranslator.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QLocale; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QTranslator; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLocale QLocale; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -QTranslator* QTranslator_new(); -QTranslator* QTranslator_new2(QObject* parent); +void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject); +void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject); QMetaObject* QTranslator_MetaObject(const QTranslator* self); void* QTranslator_Metacast(QTranslator* self, const char* param1); struct miqt_string QTranslator_Tr(const char* s); -struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText); +struct miqt_string QTranslator_Translate(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n); bool QTranslator_IsEmpty(const QTranslator* self); struct miqt_string QTranslator_Language(const QTranslator* self); struct miqt_string QTranslator_FilePath(const QTranslator* self); @@ -40,8 +48,6 @@ bool QTranslator_Load2(QTranslator* self, QLocale* locale, struct miqt_string fi bool QTranslator_Load3(QTranslator* self, const unsigned char* data, int lenVal); struct miqt_string QTranslator_Tr2(const char* s, const char* c); struct miqt_string QTranslator_Tr3(const char* s, const char* c, int n); -struct miqt_string QTranslator_Translate3(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation); -struct miqt_string QTranslator_Translate4(const QTranslator* self, const char* context, const char* sourceText, const char* disambiguation, int n); bool QTranslator_Load22(QTranslator* self, struct miqt_string filename, struct miqt_string directory); bool QTranslator_Load32(QTranslator* self, struct miqt_string filename, struct miqt_string directory, struct miqt_string search_delimiters); bool QTranslator_Load4(QTranslator* self, struct miqt_string filename, struct miqt_string directory, struct miqt_string search_delimiters, struct miqt_string suffix); @@ -49,7 +55,25 @@ bool QTranslator_Load33(QTranslator* self, QLocale* locale, struct miqt_string f bool QTranslator_Load42(QTranslator* self, QLocale* locale, struct miqt_string filename, struct miqt_string prefix, struct miqt_string directory); bool QTranslator_Load5(QTranslator* self, QLocale* locale, struct miqt_string filename, struct miqt_string prefix, struct miqt_string directory, struct miqt_string suffix); bool QTranslator_Load34(QTranslator* self, const unsigned char* data, int lenVal, struct miqt_string directory); -void QTranslator_Delete(QTranslator* self); +void QTranslator_override_virtual_Translate(void* self, intptr_t slot); +struct miqt_string QTranslator_virtualbase_Translate(const void* self, const char* context, const char* sourceText, const char* disambiguation, int n); +void QTranslator_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QTranslator_virtualbase_IsEmpty(const void* self); +void QTranslator_override_virtual_Event(void* self, intptr_t slot); +bool QTranslator_virtualbase_Event(void* self, QEvent* event); +void QTranslator_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTranslator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTranslator_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTranslator_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTranslator_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTranslator_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTranslator_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTranslator_virtualbase_CustomEvent(void* self, QEvent* event); +void QTranslator_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTranslator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTranslator_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTranslator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTranslator_Delete(QTranslator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtransposeproxymodel.cpp b/qt6/gen_qtransposeproxymodel.cpp index 7729dc37..7a939407 100644 --- a/qt6/gen_qtransposeproxymodel.cpp +++ b/qt6/gen_qtransposeproxymodel.cpp @@ -1,6 +1,10 @@ #include +#include +#include +#include #include #include +#include #include #include #include @@ -13,12 +17,1090 @@ #include "gen_qtransposeproxymodel.h" #include "_cgo_export.h" -QTransposeProxyModel* QTransposeProxyModel_new() { - return new QTransposeProxyModel(); +class MiqtVirtualQTransposeProxyModel : public virtual QTransposeProxyModel { +public: + + MiqtVirtualQTransposeProxyModel(): QTransposeProxyModel() {}; + MiqtVirtualQTransposeProxyModel(QObject* parent): QTransposeProxyModel(parent) {}; + + virtual ~MiqtVirtualQTransposeProxyModel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSourceModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSourceModel(QAbstractItemModel* newSourceModel) override { + if (handle__SetSourceModel == 0) { + QTransposeProxyModel::setSourceModel(newSourceModel); + return; + } + + QAbstractItemModel* sigval1 = newSourceModel; + + miqt_exec_callback_QTransposeProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* newSourceModel) { + + QTransposeProxyModel::setSourceModel(newSourceModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__RowCount == 0) { + return QTransposeProxyModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_RowCount(QModelIndex* parent) const { + + return QTransposeProxyModel::rowCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ColumnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__ColumnCount == 0) { + return QTransposeProxyModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ColumnCount(QModelIndex* parent) const { + + return QTransposeProxyModel::columnCount(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__HeaderData == 0) { + return QTransposeProxyModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTransposeProxyModel_HeaderData(const_cast(this), handle__HeaderData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_HeaderData(int section, int orientation, int role) const { + + return new QVariant(QTransposeProxyModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__SetHeaderData == 0) { + return QTransposeProxyModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_SetHeaderData(this, handle__SetHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetHeaderData(int section, int orientation, QVariant* value, int role) { + + return QTransposeProxyModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__SetItemData == 0) { + return QTransposeProxyModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_SetItemData(this, handle__SetItemData, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetItemData(QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return QTransposeProxyModel::setItemData(*index, roles_QMap); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__Span == 0) { + return QTransposeProxyModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Span(const_cast(this), handle__Span, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Span(QModelIndex* index) const { + + return new QSize(QTransposeProxyModel::span(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__ItemData == 0) { + return QTransposeProxyModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QTransposeProxyModel_ItemData(const_cast(this), handle__ItemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to QVariant* */ virtualbase_ItemData(QModelIndex* index) const { + + QMap _ret = QTransposeProxyModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override { + if (handle__MapFromSource == 0) { + return QTransposeProxyModel::mapFromSource(sourceIndex); + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapFromSource(QModelIndex* sourceIndex) const { + + return new QModelIndex(QTransposeProxyModel::mapFromSource(*sourceIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const override { + if (handle__MapToSource == 0) { + return QTransposeProxyModel::mapToSource(proxyIndex); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MapToSource(QModelIndex* proxyIndex) const { + + return new QModelIndex(QTransposeProxyModel::mapToSource(*proxyIndex)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& index) const override { + if (handle__Parent == 0) { + return QTransposeProxyModel::parent(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Parent(QModelIndex* index) const { + + return new QModelIndex(QTransposeProxyModel::parent(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__Index == 0) { + return QTransposeProxyModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Index(int row, int column, QModelIndex* parent) const { + + return new QModelIndex(QTransposeProxyModel::index(static_cast(row), static_cast(column), *parent)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__InsertRows == 0) { + return QTransposeProxyModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_InsertRows(this, handle__InsertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertRows(int row, int count, QModelIndex* parent) { + + return QTransposeProxyModel::insertRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__RemoveRows == 0) { + return QTransposeProxyModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_RemoveRows(this, handle__RemoveRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveRows(int row, int count, QModelIndex* parent) { + + return QTransposeProxyModel::removeRows(static_cast(row), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveRows == 0) { + return QTransposeProxyModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_MoveRows(this, handle__MoveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveRows(QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return QTransposeProxyModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__InsertColumns == 0) { + return QTransposeProxyModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_InsertColumns(this, handle__InsertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertColumns(int column, int count, QModelIndex* parent) { + + return QTransposeProxyModel::insertColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__RemoveColumns == 0) { + return QTransposeProxyModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_RemoveColumns(this, handle__RemoveColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_RemoveColumns(int column, int count, QModelIndex* parent) { + + return QTransposeProxyModel::removeColumns(static_cast(column), static_cast(count), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__MoveColumns == 0) { + return QTransposeProxyModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_MoveColumns(this, handle__MoveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MoveColumns(QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return QTransposeProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__Sort == 0) { + QTransposeProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QTransposeProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QTransposeProxyModel::sort(static_cast(column), static_cast(order)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__Submit == 0) { + return QTransposeProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QTransposeProxyModel::submit(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__Revert == 0) { + QTransposeProxyModel::revert(); + return; + } + + + miqt_exec_callback_QTransposeProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QTransposeProxyModel::revert(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& proxyIndex, int role) const override { + if (handle__Data == 0) { + return QTransposeProxyModel::data(proxyIndex, role); + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(QModelIndex* proxyIndex, int role) const { + + return new QVariant(QTransposeProxyModel::data(*proxyIndex, static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__Flags == 0) { + return QTransposeProxyModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_Flags(const_cast(this), handle__Flags, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Flags(QModelIndex* index) const { + + Qt::ItemFlags _ret = QTransposeProxyModel::flags(*index); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__SetData == 0) { + return QTransposeProxyModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetData(QModelIndex* index, QVariant* value, int role) { + + return QTransposeProxyModel::setData(*index, *value, static_cast(role)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__ClearItemData == 0) { + return QTransposeProxyModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QTransposeProxyModel::clearItemData(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__Buddy == 0) { + return QTransposeProxyModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Buddy(const_cast(this), handle__Buddy, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Buddy(QModelIndex* index) const { + + return new QModelIndex(QTransposeProxyModel::buddy(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__CanFetchMore == 0) { + return QTransposeProxyModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QTransposeProxyModel::canFetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__FetchMore == 0) { + QTransposeProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QTransposeProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QTransposeProxyModel::fetchMore(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__HasChildren == 0) { + return QTransposeProxyModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QTransposeProxyModel::hasChildren(*parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__Sibling == 0) { + return QTransposeProxyModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTransposeProxyModel_Sibling(const_cast(this), handle__Sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_Sibling(int row, int column, QModelIndex* idx) const { + + return new QModelIndex(QTransposeProxyModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__MimeData == 0) { + return QTransposeProxyModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QModelIndex* */ indexes) const { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return QTransposeProxyModel::mimeData(indexes_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__CanDropMimeData == 0) { + return QTransposeProxyModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_CanDropMimeData(const_cast(this), handle__CanDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanDropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) const { + + return QTransposeProxyModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__DropMimeData == 0) { + return QTransposeProxyModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QTransposeProxyModel_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return QTransposeProxyModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QTransposeProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QTransposeProxyModel_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QTransposeProxyModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__SupportedDragActions == 0) { + return QTransposeProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_SupportedDragActions(const_cast(this), handle__SupportedDragActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDragActions() const { + + Qt::DropActions _ret = QTransposeProxyModel::supportedDragActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QTransposeProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QTransposeProxyModel_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { + + Qt::DropActions _ret = QTransposeProxyModel::supportedDropActions(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__RoleNames == 0) { + return QTransposeProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QTransposeProxyModel_RoleNames(const_cast(this), handle__RoleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + // Wrapper to allow calling protected method + struct miqt_map /* of int to struct miqt_string */ virtualbase_RoleNames() const { + + QHash _ret = QTransposeProxyModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + + } + +}; + +void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(); + *outptr_QTransposeProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent) { - return new QTransposeProxyModel(parent); +void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(parent); + *outptr_QTransposeProxyModel = ret; + *outptr_QAbstractProxyModel = static_cast(ret); + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self) { @@ -44,20 +1126,20 @@ void QTransposeProxyModel_SetSourceModel(QTransposeProxyModel* self, QAbstractIt self->setSourceModel(newSourceModel); } -int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self) { - return self->rowCount(); +int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self, QModelIndex* parent) { + return self->rowCount(*parent); } -int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self) { - return self->columnCount(); +int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self, QModelIndex* parent) { + return self->columnCount(*parent); } -QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation))); +QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation, int role) { + return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); } -bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value); +bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role) { + return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); } bool QTransposeProxyModel_SetItemData(QTransposeProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { @@ -104,36 +1186,36 @@ QModelIndex* QTransposeProxyModel_Parent(const QTransposeProxyModel* self, QMode return new QModelIndex(self->parent(*index)); } -QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column) { - return new QModelIndex(self->index(static_cast(row), static_cast(column))); +QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); } -bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count) { - return self->insertRows(static_cast(row), static_cast(count)); +bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { + return self->insertRows(static_cast(row), static_cast(count), *parent); } -bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count) { - return self->removeRows(static_cast(row), static_cast(count)); +bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { + return self->removeRows(static_cast(row), static_cast(count), *parent); } bool QTransposeProxyModel_MoveRows(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { return self->moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); } -bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count) { - return self->insertColumns(static_cast(column), static_cast(count)); +bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { + return self->insertColumns(static_cast(column), static_cast(count), *parent); } -bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count) { - return self->removeColumns(static_cast(column), static_cast(count)); +bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { + return self->removeColumns(static_cast(column), static_cast(count), *parent); } bool QTransposeProxyModel_MoveColumns(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { return self->moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); } -void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column) { - self->sort(static_cast(column)); +void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column, int order) { + self->sort(static_cast(column), static_cast(order)); } struct miqt_string QTransposeProxyModel_Tr2(const char* s, const char* c) { @@ -158,47 +1240,307 @@ struct miqt_string QTransposeProxyModel_Tr3(const char* s, const char* c, int n) return _ms; } -int QTransposeProxyModel_RowCount1(const QTransposeProxyModel* self, QModelIndex* parent) { - return self->rowCount(*parent); +void QTransposeProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetSourceModel = slot; } -int QTransposeProxyModel_ColumnCount1(const QTransposeProxyModel* self, QModelIndex* parent) { - return self->columnCount(*parent); +void QTransposeProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* newSourceModel) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetSourceModel(newSourceModel); } -QVariant* QTransposeProxyModel_HeaderData3(const QTransposeProxyModel* self, int section, int orientation, int role) { - return new QVariant(self->headerData(static_cast(section), static_cast(orientation), static_cast(role))); +void QTransposeProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RowCount = slot; } -bool QTransposeProxyModel_SetHeaderData4(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role) { - return self->setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); +int QTransposeProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RowCount(parent); } -QModelIndex* QTransposeProxyModel_Index3(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent) { - return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +void QTransposeProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__ColumnCount = slot; } -bool QTransposeProxyModel_InsertRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { - return self->insertRows(static_cast(row), static_cast(count), *parent); +int QTransposeProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_ColumnCount(parent); } -bool QTransposeProxyModel_RemoveRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent) { - return self->removeRows(static_cast(row), static_cast(count), *parent); +void QTransposeProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__HeaderData = slot; } -bool QTransposeProxyModel_InsertColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { - return self->insertColumns(static_cast(column), static_cast(count), *parent); +QVariant* QTransposeProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); } -bool QTransposeProxyModel_RemoveColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent) { - return self->removeColumns(static_cast(column), static_cast(count), *parent); +void QTransposeProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetHeaderData = slot; } -void QTransposeProxyModel_Sort2(QTransposeProxyModel* self, int column, int order) { - self->sort(static_cast(column), static_cast(order)); +bool QTransposeProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QTransposeProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QTransposeProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QTransposeProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QTransposeProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Span(index); } -void QTransposeProxyModel_Delete(QTransposeProxyModel* self) { - delete self; +void QTransposeProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QTransposeProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QTransposeProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapFromSource = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); +} + +void QTransposeProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapToSource = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapToSource(proxyIndex); +} + +void QTransposeProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Parent = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Parent(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Parent(index); +} + +void QTransposeProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QTransposeProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QTransposeProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QTransposeProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QTransposeProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QTransposeProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QTransposeProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QTransposeProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QTransposeProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QTransposeProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QTransposeProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QTransposeProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QTransposeProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QTransposeProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Sort = slot; +} + +void QTransposeProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QTransposeProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Submit = slot; +} + +bool QTransposeProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Submit(); +} + +void QTransposeProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Revert = slot; +} + +void QTransposeProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Revert(); +} + +void QTransposeProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QTransposeProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Data(proxyIndex, role); +} + +void QTransposeProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Flags = slot; +} + +int QTransposeProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QTransposeProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SetData = slot; +} + +bool QTransposeProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QTransposeProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__ClearItemData = slot; +} + +bool QTransposeProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QTransposeProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QTransposeProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QTransposeProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QTransposeProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QTransposeProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QTransposeProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QTransposeProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QTransposeProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QTransposeProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QTransposeProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QTransposeProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QTransposeProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QTransposeProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QTransposeProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QTransposeProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QTransposeProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QTransposeProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QTransposeProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QTransposeProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QTransposeProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QTransposeProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QTransposeProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QTransposeProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_RoleNames(); +} + +void QTransposeProxyModel_Delete(QTransposeProxyModel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtransposeproxymodel.go b/qt6/gen_qtransposeproxymodel.go index fd62abcd..5a3cd13f 100644 --- a/qt6/gen_qtransposeproxymodel.go +++ b/qt6/gen_qtransposeproxymodel.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QTransposeProxyModel struct { - h *C.QTransposeProxyModel + h *C.QTransposeProxyModel + isSubclass bool *QAbstractProxyModel } @@ -32,27 +34,49 @@ func (this *QTransposeProxyModel) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTransposeProxyModel(h *C.QTransposeProxyModel) *QTransposeProxyModel { +// newQTransposeProxyModel constructs the type using only CGO pointers. +func newQTransposeProxyModel(h *C.QTransposeProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QTransposeProxyModel { if h == nil { return nil } - return &QTransposeProxyModel{h: h, QAbstractProxyModel: UnsafeNewQAbstractProxyModel(unsafe.Pointer(h))} + return &QTransposeProxyModel{h: h, + QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } -func UnsafeNewQTransposeProxyModel(h unsafe.Pointer) *QTransposeProxyModel { - return newQTransposeProxyModel((*C.QTransposeProxyModel)(h)) +// UnsafeNewQTransposeProxyModel constructs the type using only unsafe pointers. +func UnsafeNewQTransposeProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QTransposeProxyModel { + if h == nil { + return nil + } + + return &QTransposeProxyModel{h: (*C.QTransposeProxyModel)(h), + QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} } // NewQTransposeProxyModel constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel() *QTransposeProxyModel { - ret := C.QTransposeProxyModel_new() - return newQTransposeProxyModel(ret) + var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QTransposeProxyModel_new(&outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTransposeProxyModel2 constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel2(parent *QObject) *QTransposeProxyModel { - ret := C.QTransposeProxyModel_new2(parent.cPointer()) - return newQTransposeProxyModel(ret) + var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QTransposeProxyModel_new2(parent.cPointer(), &outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTransposeProxyModel) MetaObject() *QMetaObject { @@ -78,23 +102,23 @@ func (this *QTransposeProxyModel) SetSourceModel(newSourceModel *QAbstractItemMo C.QTransposeProxyModel_SetSourceModel(this.h, newSourceModel.cPointer()) } -func (this *QTransposeProxyModel) RowCount() int { - return (int)(C.QTransposeProxyModel_RowCount(this.h)) +func (this *QTransposeProxyModel) RowCount(parent *QModelIndex) int { + return (int)(C.QTransposeProxyModel_RowCount(this.h, parent.cPointer())) } -func (this *QTransposeProxyModel) ColumnCount() int { - return (int)(C.QTransposeProxyModel_ColumnCount(this.h)) +func (this *QTransposeProxyModel) ColumnCount(parent *QModelIndex) int { + return (int)(C.QTransposeProxyModel_ColumnCount(this.h, parent.cPointer())) } -func (this *QTransposeProxyModel) HeaderData(section int, orientation Orientation) *QVariant { - _ret := C.QTransposeProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation)) +func (this *QTransposeProxyModel) HeaderData(section int, orientation Orientation, role int) *QVariant { + _ret := C.QTransposeProxyModel_HeaderData(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QTransposeProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant) bool { - return (bool)(C.QTransposeProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer())) +func (this *QTransposeProxyModel) SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + return (bool)(C.QTransposeProxyModel_SetHeaderData(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) } func (this *QTransposeProxyModel) SetItemData(index *QModelIndex, roles map[int]QVariant) bool { @@ -162,39 +186,39 @@ func (this *QTransposeProxyModel) Parent(index *QModelIndex) *QModelIndex { return _goptr } -func (this *QTransposeProxyModel) Index(row int, column int) *QModelIndex { - _ret := C.QTransposeProxyModel_Index(this.h, (C.int)(row), (C.int)(column)) +func (this *QTransposeProxyModel) Index(row int, column int, parent *QModelIndex) *QModelIndex { + _ret := C.QTransposeProxyModel_Index(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } -func (this *QTransposeProxyModel) InsertRows(row int, count int) bool { - return (bool)(C.QTransposeProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QTransposeProxyModel) InsertRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_InsertRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } -func (this *QTransposeProxyModel) RemoveRows(row int, count int) bool { - return (bool)(C.QTransposeProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count))) +func (this *QTransposeProxyModel) RemoveRows(row int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_RemoveRows(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) } func (this *QTransposeProxyModel) MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { return (bool)(C.QTransposeProxyModel_MoveRows(this.h, sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) } -func (this *QTransposeProxyModel) InsertColumns(column int, count int) bool { - return (bool)(C.QTransposeProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QTransposeProxyModel) InsertColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_InsertColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } -func (this *QTransposeProxyModel) RemoveColumns(column int, count int) bool { - return (bool)(C.QTransposeProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count))) +func (this *QTransposeProxyModel) RemoveColumns(column int, count int, parent *QModelIndex) bool { + return (bool)(C.QTransposeProxyModel_RemoveColumns(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) } func (this *QTransposeProxyModel) MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { return (bool)(C.QTransposeProxyModel_MoveColumns(this.h, sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) } -func (this *QTransposeProxyModel) Sort(column int) { - C.QTransposeProxyModel_Sort(this.h, (C.int)(column)) +func (this *QTransposeProxyModel) Sort(column int, order SortOrder) { + C.QTransposeProxyModel_Sort(this.h, (C.int)(column), (C.int)(order)) } func QTransposeProxyModel_Tr2(s string, c string) string { @@ -219,55 +243,1122 @@ func QTransposeProxyModel_Tr3(s string, c string, n int) string { return _ret } -func (this *QTransposeProxyModel) RowCount1(parent *QModelIndex) int { - return (int)(C.QTransposeProxyModel_RowCount1(this.h, parent.cPointer())) +func (this *QTransposeProxyModel) callVirtualBase_SetSourceModel(newSourceModel *QAbstractItemModel) { + + C.QTransposeProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), newSourceModel.cPointer()) + +} +func (this *QTransposeProxyModel) OnSetSourceModel(slot func(super func(newSourceModel *QAbstractItemModel), newSourceModel *QAbstractItemModel)) { + C.QTransposeProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetSourceModel +func miqt_exec_callback_QTransposeProxyModel_SetSourceModel(self *C.QTransposeProxyModel, cb C.intptr_t, newSourceModel *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newSourceModel *QAbstractItemModel), newSourceModel *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(newSourceModel), nil) + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} + +func (this *QTransposeProxyModel) callVirtualBase_RowCount(parent *QModelIndex) int { + + return (int)(C.QTransposeProxyModel_virtualbase_RowCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnRowCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QTransposeProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_RowCount +func miqt_exec_callback_QTransposeProxyModel_RowCount(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_ColumnCount(parent *QModelIndex) int { + + return (int)(C.QTransposeProxyModel_virtualbase_ColumnCount(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnColumnCount(slot func(super func(parent *QModelIndex) int, parent *QModelIndex) int) { + C.QTransposeProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) ColumnCount1(parent *QModelIndex) int { - return (int)(C.QTransposeProxyModel_ColumnCount1(this.h, parent.cPointer())) +//export miqt_exec_callback_QTransposeProxyModel_ColumnCount +func miqt_exec_callback_QTransposeProxyModel_ColumnCount(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) int, parent *QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + } -func (this *QTransposeProxyModel) HeaderData3(section int, orientation Orientation, role int) *QVariant { - _ret := C.QTransposeProxyModel_HeaderData3(this.h, (C.int)(section), (C.int)(orientation), (C.int)(role)) +func (this *QTransposeProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QTransposeProxyModel_virtualbase_HeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)) _goptr := newQVariant(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QTransposeProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QTransposeProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_HeaderData +func miqt_exec_callback_QTransposeProxyModel_HeaderData(self *C.QTransposeProxyModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QTransposeProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QTransposeProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetHeaderData +func miqt_exec_callback_QTransposeProxyModel_SetHeaderData(self *C.QTransposeProxyModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (Orientation)(orientation) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval4 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_SetItemData(index *QModelIndex, roles map[int]QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = roles_v.cPointer() + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QTransposeProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QTransposeProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QTransposeProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetItemData +func miqt_exec_callback_QTransposeProxyModel_SetItemData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_ret := roles_Values[i] + roles_mapval_goptr := newQVariant(roles_mapval_ret) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QTransposeProxyModel_virtualbase_Span(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QTransposeProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Span +func miqt_exec_callback_QTransposeProxyModel_Span(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QTransposeProxyModel_virtualbase_ItemData(unsafe.Pointer(this.h), index.cPointer()) + _ret := make(map[int]QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_ret := _Values[i] + _mapval_goptr := newQVariant(_mapval_ret) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QTransposeProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QTransposeProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_ItemData +func miqt_exec_callback_QTransposeProxyModel_ItemData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v.cPointer() + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QTransposeProxyModel) callVirtualBase_MapFromSource(sourceIndex *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_MapFromSource(unsafe.Pointer(this.h), sourceIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapFromSource(slot func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MapFromSource +func miqt_exec_callback_QTransposeProxyModel_MapFromSource(self *C.QTransposeProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceIndex *QModelIndex) *QModelIndex, sourceIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceIndex)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapFromSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_MapToSource(proxyIndex *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_MapToSource(unsafe.Pointer(this.h), proxyIndex.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapToSource(slot func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MapToSource +func miqt_exec_callback_QTransposeProxyModel_MapToSource(self *C.QTransposeProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex) *QModelIndex, proxyIndex *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_Parent(index *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Parent(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnParent(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) SetHeaderData4(section int, orientation Orientation, value *QVariant, role int) bool { - return (bool)(C.QTransposeProxyModel_SetHeaderData4(this.h, (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) +//export miqt_exec_callback_QTransposeProxyModel_Parent +func miqt_exec_callback_QTransposeProxyModel_Parent(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Parent, slotval1) + + return virtualReturn.cPointer() + } -func (this *QTransposeProxyModel) Index3(row int, column int, parent *QModelIndex) *QModelIndex { - _ret := C.QTransposeProxyModel_Index3(this.h, (C.int)(row), (C.int)(column), parent.cPointer()) +func (this *QTransposeProxyModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), parent.cPointer()) _goptr := newQModelIndex(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr + +} +func (this *QTransposeProxyModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Index +func miqt_exec_callback_QTransposeProxyModel_Index(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_InsertRows +func miqt_exec_callback_QTransposeProxyModel_InsertRows(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_RemoveRows +func miqt_exec_callback_QTransposeProxyModel_RemoveRows(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QTransposeProxyModel) OnMoveRows(slot func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QTransposeProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) InsertRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_InsertRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QTransposeProxyModel_MoveRows +func miqt_exec_callback_QTransposeProxyModel_MoveRows(self *C.QTransposeProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) RemoveRows3(row int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_RemoveRows3(this.h, (C.int)(row), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QTransposeProxyModel_InsertColumns +func miqt_exec_callback_QTransposeProxyModel_InsertColumns(self *C.QTransposeProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QTransposeProxyModel) InsertColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_InsertColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +func (this *QTransposeProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTransposeProxyModel) RemoveColumns3(column int, count int, parent *QModelIndex) bool { - return (bool)(C.QTransposeProxyModel_RemoveColumns3(this.h, (C.int)(column), (C.int)(count), parent.cPointer())) +//export miqt_exec_callback_QTransposeProxyModel_RemoveColumns +func miqt_exec_callback_QTransposeProxyModel_RemoveColumns(self *C.QTransposeProxyModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QTransposeProxyModel) Sort2(column int, order SortOrder) { - C.QTransposeProxyModel_Sort2(this.h, (C.int)(column), (C.int)(order)) +func (this *QTransposeProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QTransposeProxyModel) OnMoveColumns(slot func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) { + C.QTransposeProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MoveColumns +func miqt_exec_callback_QTransposeProxyModel_MoveColumns(self *C.QTransposeProxyModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool, sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QTransposeProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QTransposeProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QTransposeProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Sort +func miqt_exec_callback_QTransposeProxyModel_Sort(self *C.QTransposeProxyModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order SortOrder), column int, order SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (SortOrder)(order) + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QTransposeProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QTransposeProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Submit +func miqt_exec_callback_QTransposeProxyModel_Submit(self *C.QTransposeProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Revert() { + + C.QTransposeProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QTransposeProxyModel) OnRevert(slot func(super func())) { + C.QTransposeProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Revert +func miqt_exec_callback_QTransposeProxyModel_Revert(self *C.QTransposeProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Data(proxyIndex *QModelIndex, role int) *QVariant { + + _ret := C.QTransposeProxyModel_virtualbase_Data(unsafe.Pointer(this.h), proxyIndex.cPointer(), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnData(slot func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) { + C.QTransposeProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Data +func miqt_exec_callback_QTransposeProxyModel_Data(self *C.QTransposeProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(proxyIndex)) + slotval2 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QTransposeProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTransposeProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QTransposeProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Flags +func miqt_exec_callback_QTransposeProxyModel_Flags(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QTransposeProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QTransposeProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SetData +func miqt_exec_callback_QTransposeProxyModel_SetData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + slotval3 := (int)(role) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTransposeProxyModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_ClearItemData +func miqt_exec_callback_QTransposeProxyModel_ClearItemData(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Buddy(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Buddy +func miqt_exec_callback_QTransposeProxyModel_Buddy(self *C.QTransposeProxyModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_CanFetchMore +func miqt_exec_callback_QTransposeProxyModel_CanFetchMore(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QTransposeProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QTransposeProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QTransposeProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_FetchMore +func miqt_exec_callback_QTransposeProxyModel_FetchMore(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex), parent *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QTransposeProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_HasChildren +func miqt_exec_callback_QTransposeProxyModel_HasChildren(self *C.QTransposeProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QTransposeProxyModel_virtualbase_Sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), idx.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QTransposeProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_Sibling +func miqt_exec_callback_QTransposeProxyModel_Sibling(self *C.QTransposeProxyModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = indexes[i].cPointer() + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTransposeProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QTransposeProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QTransposeProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MimeData +func miqt_exec_callback_QTransposeProxyModel_MimeData(self *C.QTransposeProxyModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_ret := indexes_outCast[i] + indexes_lv_goptr := newQModelIndex(indexes_lv_ret) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnCanDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_CanDropMimeData +func miqt_exec_callback_QTransposeProxyModel_CanDropMimeData(self *C.QTransposeProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QTransposeProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QTransposeProxyModel) OnDropMimeData(slot func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) { + C.QTransposeProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_DropMimeData +func miqt_exec_callback_QTransposeProxyModel_DropMimeData(self *C.QTransposeProxyModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool, data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval2 := (DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QTransposeProxyModel_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QTransposeProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QTransposeProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MimeTypes +func miqt_exec_callback_QTransposeProxyModel_MimeTypes(self *C.QTransposeProxyModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTransposeProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QTransposeProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QTransposeProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QTransposeProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SupportedDragActions +func miqt_exec_callback_QTransposeProxyModel_SupportedDragActions(self *C.QTransposeProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QTransposeProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QTransposeProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QTransposeProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_SupportedDropActions +func miqt_exec_callback_QTransposeProxyModel_SupportedDropActions(self *C.QTransposeProxyModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTransposeProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QTransposeProxyModel_virtualbase_RoleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QTransposeProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QTransposeProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_RoleNames +func miqt_exec_callback_QTransposeProxyModel_RoleNames(self *C.QTransposeProxyModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + } // Delete this object from C++ memory. func (this *QTransposeProxyModel) Delete() { - C.QTransposeProxyModel_Delete(this.h) + C.QTransposeProxyModel_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtransposeproxymodel.h b/qt6/gen_qtransposeproxymodel.h index fbc25f3b..cbec9e45 100644 --- a/qt6/gen_qtransposeproxymodel.h +++ b/qt6/gen_qtransposeproxymodel.h @@ -16,7 +16,10 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; +class QAbstractProxyModel; +class QByteArray; class QMetaObject; +class QMimeData; class QModelIndex; class QObject; class QSize; @@ -24,7 +27,10 @@ class QTransposeProxyModel; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractProxyModel QAbstractProxyModel; +typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QSize QSize; @@ -32,43 +38,107 @@ typedef struct QTransposeProxyModel QTransposeProxyModel; typedef struct QVariant QVariant; #endif -QTransposeProxyModel* QTransposeProxyModel_new(); -QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent); +void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self); void* QTransposeProxyModel_Metacast(QTransposeProxyModel* self, const char* param1); struct miqt_string QTransposeProxyModel_Tr(const char* s); void QTransposeProxyModel_SetSourceModel(QTransposeProxyModel* self, QAbstractItemModel* newSourceModel); -int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self); -int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self); -QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation); -bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value); +int QTransposeProxyModel_RowCount(const QTransposeProxyModel* self, QModelIndex* parent); +int QTransposeProxyModel_ColumnCount(const QTransposeProxyModel* self, QModelIndex* parent); +QVariant* QTransposeProxyModel_HeaderData(const QTransposeProxyModel* self, int section, int orientation, int role); +bool QTransposeProxyModel_SetHeaderData(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role); bool QTransposeProxyModel_SetItemData(QTransposeProxyModel* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); QSize* QTransposeProxyModel_Span(const QTransposeProxyModel* self, QModelIndex* index); struct miqt_map /* of int to QVariant* */ QTransposeProxyModel_ItemData(const QTransposeProxyModel* self, QModelIndex* index); QModelIndex* QTransposeProxyModel_MapFromSource(const QTransposeProxyModel* self, QModelIndex* sourceIndex); QModelIndex* QTransposeProxyModel_MapToSource(const QTransposeProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QTransposeProxyModel_Parent(const QTransposeProxyModel* self, QModelIndex* index); -QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column); -bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count); -bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count); +QModelIndex* QTransposeProxyModel_Index(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent); +bool QTransposeProxyModel_InsertRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); +bool QTransposeProxyModel_RemoveRows(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); bool QTransposeProxyModel_MoveRows(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); -bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count); -bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count); +bool QTransposeProxyModel_InsertColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); +bool QTransposeProxyModel_RemoveColumns(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); bool QTransposeProxyModel_MoveColumns(QTransposeProxyModel* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); -void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column); +void QTransposeProxyModel_Sort(QTransposeProxyModel* self, int column, int order); struct miqt_string QTransposeProxyModel_Tr2(const char* s, const char* c); struct miqt_string QTransposeProxyModel_Tr3(const char* s, const char* c, int n); -int QTransposeProxyModel_RowCount1(const QTransposeProxyModel* self, QModelIndex* parent); -int QTransposeProxyModel_ColumnCount1(const QTransposeProxyModel* self, QModelIndex* parent); -QVariant* QTransposeProxyModel_HeaderData3(const QTransposeProxyModel* self, int section, int orientation, int role); -bool QTransposeProxyModel_SetHeaderData4(QTransposeProxyModel* self, int section, int orientation, QVariant* value, int role); -QModelIndex* QTransposeProxyModel_Index3(const QTransposeProxyModel* self, int row, int column, QModelIndex* parent); -bool QTransposeProxyModel_InsertRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); -bool QTransposeProxyModel_RemoveRows3(QTransposeProxyModel* self, int row, int count, QModelIndex* parent); -bool QTransposeProxyModel_InsertColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); -bool QTransposeProxyModel_RemoveColumns3(QTransposeProxyModel* self, int column, int count, QModelIndex* parent); -void QTransposeProxyModel_Sort2(QTransposeProxyModel* self, int column, int order); -void QTransposeProxyModel_Delete(QTransposeProxyModel* self); +void QTransposeProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* newSourceModel); +void QTransposeProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QTransposeProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QTransposeProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QTransposeProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QTransposeProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QTransposeProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QTransposeProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QTransposeProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QTransposeProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Parent(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QTransposeProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QTransposeProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_Sort(void* self, int column, int order); +void QTransposeProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_Submit(void* self); +void QTransposeProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_Revert(void* self); +void QTransposeProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QTransposeProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role); +void QTransposeProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QTransposeProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QTransposeProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QTransposeProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QTransposeProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QTransposeProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QTransposeProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QTransposeProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QTransposeProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QTransposeProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QTransposeProxyModel_virtualbase_MimeTypes(const void* self); +void QTransposeProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_SupportedDragActions(const void* self); +void QTransposeProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QTransposeProxyModel_virtualbase_SupportedDropActions(const void* self); +void QTransposeProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QTransposeProxyModel_virtualbase_RoleNames(const void* self); +void QTransposeProxyModel_Delete(QTransposeProxyModel* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtreeview.cpp b/qt6/gen_qtreeview.cpp index 6f88b10d..b2ba20a1 100644 --- a/qt6/gen_qtreeview.cpp +++ b/qt6/gen_qtreeview.cpp @@ -1,363 +1,2466 @@ +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include #include #include #include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include +#include +#include #include +#include #include #include #include "gen_qtreeview.h" #include "_cgo_export.h" -QTreeView* QTreeView_new(QWidget* parent) { - return new QTreeView(parent); +class MiqtVirtualQTreeView : public virtual QTreeView { +public: + + MiqtVirtualQTreeView(QWidget* parent): QTreeView(parent) {}; + MiqtVirtualQTreeView(): QTreeView() {}; + + virtual ~MiqtVirtualQTreeView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setModel(QAbstractItemModel* model) override { + if (handle__SetModel == 0) { + QTreeView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QTreeView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QTreeView::setModel(model); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTreeView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QTreeView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTreeView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTreeView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTreeView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QTreeView::setSelectionModel(selectionModel); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QTreeView::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QTreeView_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QTreeView::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTreeView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTreeView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTreeView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTreeView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTreeView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTreeView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTreeView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTreeView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTreeView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTreeView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTreeView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QTreeView::reset(); + return; + } + + + miqt_exec_callback_QTreeView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QTreeView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QTreeView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QTreeView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QTreeView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QTreeView::selectAll(); + return; + } + + + miqt_exec_callback_QTreeView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QTreeView::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QTreeView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTreeView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QTreeView::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTreeView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTreeView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTreeView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QTreeView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QTreeView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QTreeView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QTreeView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTreeView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTreeView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTreeView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTreeView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTreeView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTreeView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTreeView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTreeView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTreeView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTreeView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTreeView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTreeView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QTreeView::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QTreeView::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTreeView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTreeView::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QTreeView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QTreeView::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRow = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const override { + if (handle__DrawRow == 0) { + QTreeView::drawRow(painter, options, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& options_ret = options; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&options_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeView_DrawRow(const_cast(this), handle__DrawRow, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRow(QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) const { + + QTreeView::drawRow(painter, *options, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBranches = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const override { + if (handle__DrawBranches == 0) { + QTreeView::drawBranches(painter, rect, index); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeView_DrawBranches(const_cast(this), handle__DrawBranches, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBranches(QPainter* painter, QRect* rect, QModelIndex* index) const { + + QTreeView::drawBranches(painter, *rect, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTreeView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTreeView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTreeView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTreeView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTreeView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTreeView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTreeView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTreeView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTreeView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTreeView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTreeView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTreeView::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QTreeView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QTreeView::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTreeView::updateGeometries(); + return; + } + + + miqt_exec_callback_QTreeView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTreeView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTreeView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTreeView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTreeView::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTreeView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTreeView_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTreeView::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTreeView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTreeView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTreeView::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTreeView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTreeView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTreeView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTreeView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTreeView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTreeView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForRow = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForRow(int row) const override { + if (handle__SizeHintForRow == 0) { + return QTreeView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QTreeView_SizeHintForRow(const_cast(this), handle__SizeHintForRow, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForRow(int row) const { + + return QTreeView::sizeHintForRow(static_cast(row)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemDelegateForIndex = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractItemDelegate* itemDelegateForIndex(const QModelIndex& index) const override { + if (handle__ItemDelegateForIndex == 0) { + return QTreeView::itemDelegateForIndex(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QAbstractItemDelegate* callback_return_value = miqt_exec_callback_QTreeView_ItemDelegateForIndex(const_cast(this), handle__ItemDelegateForIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemDelegate* virtualbase_ItemDelegateForIndex(QModelIndex* index) const { + + return QTreeView::itemDelegateForIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const override { + if (handle__InputMethodQuery == 0) { + return QTreeView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTreeView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int query) const { + + return new QVariant(QTreeView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorData() override { + if (handle__UpdateEditorData == 0) { + QTreeView::updateEditorData(); + return; + } + + + miqt_exec_callback_QTreeView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QTreeView::updateEditorData(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateEditorGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateEditorGeometries() override { + if (handle__UpdateEditorGeometries == 0) { + QTreeView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QTreeView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QTreeView::updateEditorGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarAction(int action) override { + if (handle__VerticalScrollbarAction == 0) { + QTreeView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTreeView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QTreeView::verticalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarValueChanged(int value) override { + if (handle__HorizontalScrollbarValueChanged == 0) { + QTreeView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTreeView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QTreeView::horizontalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEditor = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override { + if (handle__CloseEditor == 0) { + QTreeView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTreeView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QTreeView::closeEditor(editor, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CommitData = 0; + + // Subclass to allow providing a Go implementation + virtual void commitData(QWidget* editor) override { + if (handle__CommitData == 0) { + QTreeView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QTreeView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QTreeView::commitData(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EditorDestroyed = 0; + + // Subclass to allow providing a Go implementation + virtual void editorDestroyed(QObject* editor) override { + if (handle__EditorDestroyed == 0) { + QTreeView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QTreeView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QTreeView::editorDestroyed(editor); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Edit2 = 0; + + // Subclass to allow providing a Go implementation + virtual bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) override { + if (handle__Edit2 == 0) { + return QTreeView::edit(index, trigger, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::EditTrigger trigger_ret = trigger; + int sigval2 = static_cast(trigger_ret); + QEvent* sigval3 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_Edit2(this, handle__Edit2, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Edit2(QModelIndex* index, int trigger, QEvent* event) { + + return QTreeView::edit(*index, static_cast(trigger), event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionCommand = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const override { + if (handle__SelectionCommand == 0) { + return QTreeView::selectionCommand(index, event); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QEvent* sigval2 = (QEvent*) event; + + int callback_return_value = miqt_exec_callback_QTreeView_SelectionCommand(const_cast(this), handle__SelectionCommand, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SelectionCommand(QModelIndex* index, QEvent* event) const { + + QItemSelectionModel::SelectionFlags _ret = QTreeView::selectionCommand(*index, event); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QTreeView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QTreeView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QTreeView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QTreeView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QTreeView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QTreeView::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QTreeView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QTreeView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QTreeView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTreeView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTreeView::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QTreeView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QTreeView::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QTreeView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QTreeView::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTreeView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QTreeView::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QTreeView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QTreeView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QTreeView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QTreeView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QTreeView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QTreeView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* event) override { + if (handle__InputMethodEvent == 0) { + QTreeView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QTreeView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QTreeView::inputMethodEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* object, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTreeView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTreeView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QTreeView::eventFilter(object, event); + + } + +}; + +void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(parent); + *outptr_QTreeView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(); + *outptr_QTreeView = ret; + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QTreeView_MetaObject(const QTreeView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QTreeView_Metacast(QTreeView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QTreeView_Tr(const char* s) { + QString _ret = QTreeView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTreeView_SetModel(QTreeView* self, QAbstractItemModel* model) { + self->setModel(model); +} + +void QTreeView_SetRootIndex(QTreeView* self, QModelIndex* index) { + self->setRootIndex(*index); +} + +void QTreeView_SetSelectionModel(QTreeView* self, QItemSelectionModel* selectionModel) { + self->setSelectionModel(selectionModel); +} + +QHeaderView* QTreeView_Header(const QTreeView* self) { + return self->header(); +} + +void QTreeView_SetHeader(QTreeView* self, QHeaderView* header) { + self->setHeader(header); +} + +int QTreeView_AutoExpandDelay(const QTreeView* self) { + return self->autoExpandDelay(); +} + +void QTreeView_SetAutoExpandDelay(QTreeView* self, int delay) { + self->setAutoExpandDelay(static_cast(delay)); +} + +int QTreeView_Indentation(const QTreeView* self) { + return self->indentation(); +} + +void QTreeView_SetIndentation(QTreeView* self, int i) { + self->setIndentation(static_cast(i)); +} + +void QTreeView_ResetIndentation(QTreeView* self) { + self->resetIndentation(); +} + +bool QTreeView_RootIsDecorated(const QTreeView* self) { + return self->rootIsDecorated(); +} + +void QTreeView_SetRootIsDecorated(QTreeView* self, bool show) { + self->setRootIsDecorated(show); +} + +bool QTreeView_UniformRowHeights(const QTreeView* self) { + return self->uniformRowHeights(); +} + +void QTreeView_SetUniformRowHeights(QTreeView* self, bool uniform) { + self->setUniformRowHeights(uniform); +} + +bool QTreeView_ItemsExpandable(const QTreeView* self) { + return self->itemsExpandable(); +} + +void QTreeView_SetItemsExpandable(QTreeView* self, bool enable) { + self->setItemsExpandable(enable); +} + +bool QTreeView_ExpandsOnDoubleClick(const QTreeView* self) { + return self->expandsOnDoubleClick(); +} + +void QTreeView_SetExpandsOnDoubleClick(QTreeView* self, bool enable) { + self->setExpandsOnDoubleClick(enable); +} + +int QTreeView_ColumnViewportPosition(const QTreeView* self, int column) { + return self->columnViewportPosition(static_cast(column)); +} + +int QTreeView_ColumnWidth(const QTreeView* self, int column) { + return self->columnWidth(static_cast(column)); +} + +void QTreeView_SetColumnWidth(QTreeView* self, int column, int width) { + self->setColumnWidth(static_cast(column), static_cast(width)); +} + +int QTreeView_ColumnAt(const QTreeView* self, int x) { + return self->columnAt(static_cast(x)); +} + +bool QTreeView_IsColumnHidden(const QTreeView* self, int column) { + return self->isColumnHidden(static_cast(column)); +} + +void QTreeView_SetColumnHidden(QTreeView* self, int column, bool hide) { + self->setColumnHidden(static_cast(column), hide); +} + +bool QTreeView_IsHeaderHidden(const QTreeView* self) { + return self->isHeaderHidden(); +} + +void QTreeView_SetHeaderHidden(QTreeView* self, bool hide) { + self->setHeaderHidden(hide); +} + +bool QTreeView_IsRowHidden(const QTreeView* self, int row, QModelIndex* parent) { + return self->isRowHidden(static_cast(row), *parent); +} + +void QTreeView_SetRowHidden(QTreeView* self, int row, QModelIndex* parent, bool hide) { + self->setRowHidden(static_cast(row), *parent, hide); +} + +bool QTreeView_IsFirstColumnSpanned(const QTreeView* self, int row, QModelIndex* parent) { + return self->isFirstColumnSpanned(static_cast(row), *parent); +} + +void QTreeView_SetFirstColumnSpanned(QTreeView* self, int row, QModelIndex* parent, bool span) { + self->setFirstColumnSpanned(static_cast(row), *parent, span); +} + +bool QTreeView_IsExpanded(const QTreeView* self, QModelIndex* index) { + return self->isExpanded(*index); +} + +void QTreeView_SetExpanded(QTreeView* self, QModelIndex* index, bool expand) { + self->setExpanded(*index, expand); +} + +void QTreeView_SetSortingEnabled(QTreeView* self, bool enable) { + self->setSortingEnabled(enable); +} + +bool QTreeView_IsSortingEnabled(const QTreeView* self) { + return self->isSortingEnabled(); +} + +void QTreeView_SetAnimated(QTreeView* self, bool enable) { + self->setAnimated(enable); +} + +bool QTreeView_IsAnimated(const QTreeView* self) { + return self->isAnimated(); +} + +void QTreeView_SetAllColumnsShowFocus(QTreeView* self, bool enable) { + self->setAllColumnsShowFocus(enable); +} + +bool QTreeView_AllColumnsShowFocus(const QTreeView* self) { + return self->allColumnsShowFocus(); +} + +void QTreeView_SetWordWrap(QTreeView* self, bool on) { + self->setWordWrap(on); +} + +bool QTreeView_WordWrap(const QTreeView* self) { + return self->wordWrap(); +} + +void QTreeView_SetTreePosition(QTreeView* self, int logicalIndex) { + self->setTreePosition(static_cast(logicalIndex)); +} + +int QTreeView_TreePosition(const QTreeView* self) { + return self->treePosition(); +} + +void QTreeView_KeyboardSearch(QTreeView* self, struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + self->keyboardSearch(search_QString); +} + +QRect* QTreeView_VisualRect(const QTreeView* self, QModelIndex* index) { + return new QRect(self->visualRect(*index)); +} + +void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index, int hint) { + self->scrollTo(*index, static_cast(hint)); +} + +QModelIndex* QTreeView_IndexAt(const QTreeView* self, QPoint* p) { + return new QModelIndex(self->indexAt(*p)); +} + +QModelIndex* QTreeView_IndexAbove(const QTreeView* self, QModelIndex* index) { + return new QModelIndex(self->indexAbove(*index)); +} + +QModelIndex* QTreeView_IndexBelow(const QTreeView* self, QModelIndex* index) { + return new QModelIndex(self->indexBelow(*index)); +} + +void QTreeView_DoItemsLayout(QTreeView* self) { + self->doItemsLayout(); +} + +void QTreeView_Reset(QTreeView* self) { + self->reset(); +} + +void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + self->dataChanged(*topLeft, *bottomRight, roles_QList); +} + +void QTreeView_SelectAll(QTreeView* self) { + self->selectAll(); +} + +void QTreeView_Expanded(QTreeView* self, QModelIndex* index) { + self->expanded(*index); +} + +void QTreeView_connect_Expanded(QTreeView* self, intptr_t slot) { + MiqtVirtualQTreeView::connect(self, static_cast(&QTreeView::expanded), self, [=](const QModelIndex& index) { + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + miqt_exec_callback_QTreeView_Expanded(slot, sigval1); + }); +} + +void QTreeView_Collapsed(QTreeView* self, QModelIndex* index) { + self->collapsed(*index); +} + +void QTreeView_connect_Collapsed(QTreeView* self, intptr_t slot) { + MiqtVirtualQTreeView::connect(self, static_cast(&QTreeView::collapsed), self, [=](const QModelIndex& index) { + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + miqt_exec_callback_QTreeView_Collapsed(slot, sigval1); + }); +} + +void QTreeView_HideColumn(QTreeView* self, int column) { + self->hideColumn(static_cast(column)); +} + +void QTreeView_ShowColumn(QTreeView* self, int column) { + self->showColumn(static_cast(column)); +} + +void QTreeView_Expand(QTreeView* self, QModelIndex* index) { + self->expand(*index); +} + +void QTreeView_Collapse(QTreeView* self, QModelIndex* index) { + self->collapse(*index); +} + +void QTreeView_ResizeColumnToContents(QTreeView* self, int column) { + self->resizeColumnToContents(static_cast(column)); +} + +void QTreeView_SortByColumn(QTreeView* self, int column, int order) { + self->sortByColumn(static_cast(column), static_cast(order)); +} + +void QTreeView_ExpandAll(QTreeView* self) { + self->expandAll(); +} + +void QTreeView_ExpandRecursively(QTreeView* self, QModelIndex* index) { + self->expandRecursively(*index); +} + +void QTreeView_CollapseAll(QTreeView* self) { + self->collapseAll(); +} + +void QTreeView_ExpandToDepth(QTreeView* self, int depth) { + self->expandToDepth(static_cast(depth)); +} + +struct miqt_string QTreeView_Tr2(const char* s, const char* c) { + QString _ret = QTreeView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QTreeView_Tr3(const char* s, const char* c, int n) { + QString _ret = QTreeView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QTreeView_ExpandRecursively2(QTreeView* self, QModelIndex* index, int depth) { + self->expandRecursively(*index, static_cast(depth)); +} + +void QTreeView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetModel = slot; +} + +void QTreeView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetModel(model); +} + +void QTreeView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetRootIndex = slot; +} + +void QTreeView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTreeView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetSelectionModel = slot; +} + +void QTreeView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTreeView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__KeyboardSearch = slot; +} + +void QTreeView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QTreeView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VisualRect = slot; +} + +QRect* QTreeView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_VisualRect(index); +} + +void QTreeView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ScrollTo = slot; } -QTreeView* QTreeView_new2() { - return new QTreeView(); +void QTreeView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ScrollTo(index, hint); } -QMetaObject* QTreeView_MetaObject(const QTreeView* self) { - return (QMetaObject*) self->metaObject(); +void QTreeView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__IndexAt = slot; } -void* QTreeView_Metacast(QTreeView* self, const char* param1) { - return self->qt_metacast(param1); +QModelIndex* QTreeView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_IndexAt(p); } -struct miqt_string QTreeView_Tr(const char* s) { - QString _ret = QTreeView::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DoItemsLayout = slot; } -void QTreeView_SetModel(QTreeView* self, QAbstractItemModel* model) { - self->setModel(model); +void QTreeView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DoItemsLayout(); } -void QTreeView_SetRootIndex(QTreeView* self, QModelIndex* index) { - self->setRootIndex(*index); +void QTreeView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__Reset = slot; } -void QTreeView_SetSelectionModel(QTreeView* self, QItemSelectionModel* selectionModel) { - self->setSelectionModel(selectionModel); +void QTreeView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_Reset(); } -QHeaderView* QTreeView_Header(const QTreeView* self) { - return self->header(); +void QTreeView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DataChanged = slot; } -void QTreeView_SetHeader(QTreeView* self, QHeaderView* header) { - self->setHeader(header); +void QTreeView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); } -int QTreeView_AutoExpandDelay(const QTreeView* self) { - return self->autoExpandDelay(); +void QTreeView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectAll = slot; } -void QTreeView_SetAutoExpandDelay(QTreeView* self, int delay) { - self->setAutoExpandDelay(static_cast(delay)); +void QTreeView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SelectAll(); } -int QTreeView_Indentation(const QTreeView* self) { - return self->indentation(); +void QTreeView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VerticalScrollbarValueChanged = slot; } -void QTreeView_SetIndentation(QTreeView* self, int i) { - self->setIndentation(static_cast(i)); +void QTreeView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); } -void QTreeView_ResetIndentation(QTreeView* self) { - self->resetIndentation(); +void QTreeView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ScrollContentsBy = slot; } -bool QTreeView_RootIsDecorated(const QTreeView* self) { - return self->rootIsDecorated(); +void QTreeView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); } -void QTreeView_SetRootIsDecorated(QTreeView* self, bool show) { - self->setRootIsDecorated(show); +void QTreeView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__RowsInserted = slot; } -bool QTreeView_UniformRowHeights(const QTreeView* self) { - return self->uniformRowHeights(); +void QTreeView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_RowsInserted(parent, start, end); } -void QTreeView_SetUniformRowHeights(QTreeView* self, bool uniform) { - self->setUniformRowHeights(uniform); +void QTreeView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__RowsAboutToBeRemoved = slot; } -bool QTreeView_ItemsExpandable(const QTreeView* self) { - return self->itemsExpandable(); +void QTreeView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } -void QTreeView_SetItemsExpandable(QTreeView* self, bool enable) { - self->setItemsExpandable(enable); +void QTreeView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MoveCursor = slot; } -bool QTreeView_ExpandsOnDoubleClick(const QTreeView* self) { - return self->expandsOnDoubleClick(); +QModelIndex* QTreeView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); } -void QTreeView_SetExpandsOnDoubleClick(QTreeView* self, bool enable) { - self->setExpandsOnDoubleClick(enable); +void QTreeView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__HorizontalOffset = slot; } -int QTreeView_ColumnViewportPosition(const QTreeView* self, int column) { - return self->columnViewportPosition(static_cast(column)); +int QTreeView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_HorizontalOffset(); } -int QTreeView_ColumnWidth(const QTreeView* self, int column) { - return self->columnWidth(static_cast(column)); +void QTreeView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VerticalOffset = slot; } -void QTreeView_SetColumnWidth(QTreeView* self, int column, int width) { - self->setColumnWidth(static_cast(column), static_cast(width)); +int QTreeView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_VerticalOffset(); } -int QTreeView_ColumnAt(const QTreeView* self, int x) { - return self->columnAt(static_cast(x)); +void QTreeView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SetSelection = slot; } -bool QTreeView_IsColumnHidden(const QTreeView* self, int column) { - return self->isColumnHidden(static_cast(column)); +void QTreeView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetSelection(rect, command); } -void QTreeView_SetColumnHidden(QTreeView* self, int column, bool hide) { - self->setColumnHidden(static_cast(column), hide); +void QTreeView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectedIndexes = slot; } -bool QTreeView_IsHeaderHidden(const QTreeView* self) { - return self->isHeaderHidden(); +struct miqt_array /* of QModelIndex* */ QTreeView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SelectedIndexes(); } -void QTreeView_SetHeaderHidden(QTreeView* self, bool hide) { - self->setHeaderHidden(hide); +void QTreeView_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ChangeEvent = slot; } -bool QTreeView_IsRowHidden(const QTreeView* self, int row, QModelIndex* parent) { - return self->isRowHidden(static_cast(row), *parent); +void QTreeView_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ChangeEvent(event); } -void QTreeView_SetRowHidden(QTreeView* self, int row, QModelIndex* parent, bool hide) { - self->setRowHidden(static_cast(row), *parent, hide); +void QTreeView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__TimerEvent = slot; } -bool QTreeView_IsFirstColumnSpanned(const QTreeView* self, int row, QModelIndex* parent) { - return self->isFirstColumnSpanned(static_cast(row), *parent); +void QTreeView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_TimerEvent(event); } -void QTreeView_SetFirstColumnSpanned(QTreeView* self, int row, QModelIndex* parent, bool span) { - self->setFirstColumnSpanned(static_cast(row), *parent, span); +void QTreeView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__PaintEvent = slot; } -bool QTreeView_IsExpanded(const QTreeView* self, QModelIndex* index) { - return self->isExpanded(*index); +void QTreeView_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_PaintEvent(event); } -void QTreeView_SetExpanded(QTreeView* self, QModelIndex* index, bool expand) { - self->setExpanded(*index, expand); +void QTreeView_override_virtual_DrawRow(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DrawRow = slot; } -void QTreeView_SetSortingEnabled(QTreeView* self, bool enable) { - self->setSortingEnabled(enable); +void QTreeView_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) { + ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_DrawRow(painter, options, index); } -bool QTreeView_IsSortingEnabled(const QTreeView* self) { - return self->isSortingEnabled(); +void QTreeView_override_virtual_DrawBranches(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DrawBranches = slot; } -void QTreeView_SetAnimated(QTreeView* self, bool enable) { - self->setAnimated(enable); +void QTreeView_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index) { + ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_DrawBranches(painter, rect, index); } -bool QTreeView_IsAnimated(const QTreeView* self) { - return self->isAnimated(); +void QTreeView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MousePressEvent = slot; } -void QTreeView_SetAllColumnsShowFocus(QTreeView* self, bool enable) { - self->setAllColumnsShowFocus(enable); +void QTreeView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MousePressEvent(event); } -bool QTreeView_AllColumnsShowFocus(const QTreeView* self) { - return self->allColumnsShowFocus(); +void QTreeView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MouseReleaseEvent = slot; } -void QTreeView_SetWordWrap(QTreeView* self, bool on) { - self->setWordWrap(on); +void QTreeView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MouseReleaseEvent(event); } -bool QTreeView_WordWrap(const QTreeView* self) { - return self->wordWrap(); +void QTreeView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MouseDoubleClickEvent = slot; } -void QTreeView_SetTreePosition(QTreeView* self, int logicalIndex) { - self->setTreePosition(static_cast(logicalIndex)); +void QTreeView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MouseDoubleClickEvent(event); } -int QTreeView_TreePosition(const QTreeView* self) { - return self->treePosition(); +void QTreeView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__MouseMoveEvent = slot; } -void QTreeView_KeyboardSearch(QTreeView* self, struct miqt_string search) { - QString search_QString = QString::fromUtf8(search.data, search.len); - self->keyboardSearch(search_QString); +void QTreeView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_MouseMoveEvent(event); } -QRect* QTreeView_VisualRect(const QTreeView* self, QModelIndex* index) { - return new QRect(self->visualRect(*index)); +void QTreeView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__KeyPressEvent = slot; } -void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index) { - self->scrollTo(*index); +void QTreeView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_KeyPressEvent(event); } -QModelIndex* QTreeView_IndexAt(const QTreeView* self, QPoint* p) { - return new QModelIndex(self->indexAt(*p)); +void QTreeView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DragMoveEvent = slot; } -QModelIndex* QTreeView_IndexAbove(const QTreeView* self, QModelIndex* index) { - return new QModelIndex(self->indexAbove(*index)); +void QTreeView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DragMoveEvent(event); } -QModelIndex* QTreeView_IndexBelow(const QTreeView* self, QModelIndex* index) { - return new QModelIndex(self->indexBelow(*index)); +void QTreeView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ViewportEvent = slot; } -void QTreeView_DoItemsLayout(QTreeView* self) { - self->doItemsLayout(); +bool QTreeView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ViewportEvent(event); } -void QTreeView_Reset(QTreeView* self) { - self->reset(); +void QTreeView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__UpdateGeometries = slot; } -void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight) { - self->dataChanged(*topLeft, *bottomRight); +void QTreeView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_UpdateGeometries(); } -void QTreeView_SelectAll(QTreeView* self) { - self->selectAll(); +void QTreeView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ViewportSizeHint = slot; } -void QTreeView_Expanded(QTreeView* self, QModelIndex* index) { - self->expanded(*index); +QSize* QTreeView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_ViewportSizeHint(); } -void QTreeView_connect_Expanded(QTreeView* self, intptr_t slot) { - QTreeView::connect(self, static_cast(&QTreeView::expanded), self, [=](const QModelIndex& index) { - const QModelIndex& index_ret = index; - // Cast returned reference into pointer - QModelIndex* sigval1 = const_cast(&index_ret); - miqt_exec_callback_QTreeView_Expanded(slot, sigval1); - }); +void QTreeView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SizeHintForColumn = slot; } -void QTreeView_Collapsed(QTreeView* self, QModelIndex* index) { - self->collapsed(*index); +int QTreeView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SizeHintForColumn(column); } -void QTreeView_connect_Collapsed(QTreeView* self, intptr_t slot) { - QTreeView::connect(self, static_cast(&QTreeView::collapsed), self, [=](const QModelIndex& index) { - const QModelIndex& index_ret = index; - // Cast returned reference into pointer - QModelIndex* sigval1 = const_cast(&index_ret); - miqt_exec_callback_QTreeView_Collapsed(slot, sigval1); - }); +void QTreeView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__HorizontalScrollbarAction = slot; } -void QTreeView_HideColumn(QTreeView* self, int column) { - self->hideColumn(static_cast(column)); +void QTreeView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_HorizontalScrollbarAction(action); } -void QTreeView_ShowColumn(QTreeView* self, int column) { - self->showColumn(static_cast(column)); +void QTreeView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__IsIndexHidden = slot; } -void QTreeView_Expand(QTreeView* self, QModelIndex* index) { - self->expand(*index); +bool QTreeView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_IsIndexHidden(index); } -void QTreeView_Collapse(QTreeView* self, QModelIndex* index) { - self->collapse(*index); +void QTreeView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__CurrentChanged = slot; } -void QTreeView_ResizeColumnToContents(QTreeView* self, int column) { - self->resizeColumnToContents(static_cast(column)); +void QTreeView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_CurrentChanged(current, previous); } -void QTreeView_SortByColumn(QTreeView* self, int column, int order) { - self->sortByColumn(static_cast(column), static_cast(order)); +void QTreeView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SizeHintForRow = slot; } -void QTreeView_ExpandAll(QTreeView* self) { - self->expandAll(); +int QTreeView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SizeHintForRow(row); } -void QTreeView_ExpandRecursively(QTreeView* self, QModelIndex* index) { - self->expandRecursively(*index); +void QTreeView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ItemDelegateForIndex = slot; } -void QTreeView_CollapseAll(QTreeView* self) { - self->collapseAll(); +QAbstractItemDelegate* QTreeView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_ItemDelegateForIndex(index); } -void QTreeView_ExpandToDepth(QTreeView* self, int depth) { - self->expandToDepth(static_cast(depth)); +void QTreeView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__InputMethodQuery = slot; } -struct miqt_string QTreeView_Tr2(const char* s, const char* c) { - QString _ret = QTreeView::tr(s, c); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QVariant* QTreeView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_InputMethodQuery(query); } -struct miqt_string QTreeView_Tr3(const char* s, const char* c, int n) { - QString _ret = QTreeView::tr(s, c, static_cast(n)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__UpdateEditorData = slot; } -void QTreeView_ScrollTo2(QTreeView* self, QModelIndex* index, int hint) { - self->scrollTo(*index, static_cast(hint)); +void QTreeView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_UpdateEditorData(); } -void QTreeView_DataChanged3(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { - QList roles_QList; - roles_QList.reserve(roles.len); - int* roles_arr = static_cast(roles.data); - for(size_t i = 0; i < roles.len; ++i) { - roles_QList.push_back(static_cast(roles_arr[i])); - } - self->dataChanged(*topLeft, *bottomRight, roles_QList); +void QTreeView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__UpdateEditorGeometries = slot; } -void QTreeView_ExpandRecursively2(QTreeView* self, QModelIndex* index, int depth) { - self->expandRecursively(*index, static_cast(depth)); +void QTreeView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QTreeView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QTreeView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QTreeView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QTreeView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QTreeView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__CloseEditor = slot; +} + +void QTreeView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QTreeView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__CommitData = slot; +} + +void QTreeView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_CommitData(editor); +} + +void QTreeView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__EditorDestroyed = slot; +} + +void QTreeView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QTreeView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__Edit2 = slot; +} + +bool QTreeView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QTreeView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectionCommand = slot; +} + +int QTreeView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QTreeView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__StartDrag = slot; +} + +void QTreeView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QTreeView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__InitViewItemOption = slot; +} + +void QTreeView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QTreeView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QTreeView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QTreeView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__Event = slot; +} + +bool QTreeView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_Event(event); +} + +void QTreeView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DragEnterEvent = slot; +} + +void QTreeView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QTreeView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QTreeView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QTreeView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__DropEvent = slot; +} + +void QTreeView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_DropEvent(event); +} + +void QTreeView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__FocusInEvent = slot; +} + +void QTreeView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QTreeView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__FocusOutEvent = slot; +} + +void QTreeView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QTreeView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__ResizeEvent = slot; +} + +void QTreeView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QTreeView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__InputMethodEvent = slot; +} + +void QTreeView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QTreeView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__EventFilter = slot; +} + +bool QTreeView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQTreeView*)(self) )->virtualbase_EventFilter(object, event); } -void QTreeView_Delete(QTreeView* self) { - delete self; +void QTreeView_Delete(QTreeView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtreeview.go b/qt6/gen_qtreeview.go index 9a5da524..36c40bcd 100644 --- a/qt6/gen_qtreeview.go +++ b/qt6/gen_qtreeview.go @@ -15,7 +15,8 @@ import ( ) type QTreeView struct { - h *C.QTreeView + h *C.QTreeView + isSubclass bool *QAbstractItemView } @@ -33,27 +34,55 @@ func (this *QTreeView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTreeView(h *C.QTreeView) *QTreeView { +// newQTreeView constructs the type using only CGO pointers. +func newQTreeView(h *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeView { if h == nil { return nil } - return &QTreeView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))} + return &QTreeView{h: h, + QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTreeView(h unsafe.Pointer) *QTreeView { - return newQTreeView((*C.QTreeView)(h)) +// UnsafeNewQTreeView constructs the type using only unsafe pointers. +func UnsafeNewQTreeView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeView { + if h == nil { + return nil + } + + return &QTreeView{h: (*C.QTreeView)(h), + QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTreeView constructs a new QTreeView object. func NewQTreeView(parent *QWidget) *QTreeView { - ret := C.QTreeView_new(parent.cPointer()) - return newQTreeView(ret) + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeView_new(parent.cPointer(), &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTreeView2 constructs a new QTreeView object. func NewQTreeView2() *QTreeView { - ret := C.QTreeView_new2() - return newQTreeView(ret) + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeView_new2(&outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTreeView) MetaObject() *QMetaObject { @@ -88,7 +117,7 @@ func (this *QTreeView) SetSelectionModel(selectionModel *QItemSelectionModel) { } func (this *QTreeView) Header() *QHeaderView { - return UnsafeNewQHeaderView(unsafe.Pointer(C.QTreeView_Header(this.h))) + return UnsafeNewQHeaderView(unsafe.Pointer(C.QTreeView_Header(this.h)), nil, nil, nil, nil, nil, nil) } func (this *QTreeView) SetHeader(header *QHeaderView) { @@ -258,8 +287,8 @@ func (this *QTreeView) VisualRect(index *QModelIndex) *QRect { return _goptr } -func (this *QTreeView) ScrollTo(index *QModelIndex) { - C.QTreeView_ScrollTo(this.h, index.cPointer()) +func (this *QTreeView) ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + C.QTreeView_ScrollTo(this.h, index.cPointer(), (C.int)(hint)) } func (this *QTreeView) IndexAt(p *QPoint) *QModelIndex { @@ -291,8 +320,14 @@ func (this *QTreeView) Reset() { C.QTreeView_Reset(this.h) } -func (this *QTreeView) DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex) { - C.QTreeView_DataChanged(this.h, topLeft.cPointer(), bottomRight.cPointer()) +func (this *QTreeView) DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + C.QTreeView_DataChanged(this.h, topLeft.cPointer(), bottomRight.cPointer(), roles_ma) } func (this *QTreeView) SelectAll() { @@ -401,27 +436,1518 @@ func QTreeView_Tr3(s string, c string, n int) string { return _ret } -func (this *QTreeView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) { - C.QTreeView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint)) +func (this *QTreeView) ExpandRecursively2(index *QModelIndex, depth int) { + C.QTreeView_ExpandRecursively2(this.h, index.cPointer(), (C.int)(depth)) +} + +func (this *QTreeView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QTreeView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QTreeView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QTreeView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetModel +func miqt_exec_callback_QTreeView_SetModel(self *C.QTreeView, cb C.intptr_t, model *C.QAbstractItemModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQAbstractItemModel(unsafe.Pointer(model), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QTreeView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTreeView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTreeView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTreeView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetRootIndex +func miqt_exec_callback_QTreeView_SetRootIndex(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTreeView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTreeView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTreeView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTreeView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetSelectionModel +func miqt_exec_callback_QTreeView_SetSelectionModel(self *C.QTreeView, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTreeView) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QTreeView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QTreeView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QTreeView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_KeyboardSearch +func miqt_exec_callback_QTreeView_KeyboardSearch(self *C.QTreeView, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QTreeView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QTreeView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTreeView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTreeView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VisualRect +func miqt_exec_callback_QTreeView_VisualRect(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTreeView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTreeView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTreeView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ScrollTo +func miqt_exec_callback_QTreeView_ScrollTo(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTreeView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTreeView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTreeView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_IndexAt +func miqt_exec_callback_QTreeView_IndexAt(self *C.QTreeView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_DoItemsLayout() { + + C.QTreeView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnDoItemsLayout(slot func(super func())) { + C.QTreeView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DoItemsLayout +func miqt_exec_callback_QTreeView_DoItemsLayout(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTreeView) callVirtualBase_Reset() { + + C.QTreeView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnReset(slot func(super func())) { + C.QTreeView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_Reset +func miqt_exec_callback_QTreeView_Reset(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_Reset) + } -func (this *QTreeView) DataChanged3(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { +func (this *QTreeView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) defer C.free(unsafe.Pointer(roles_CArray)) for i := range roles { roles_CArray[i] = (C.int)(roles[i]) } roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} - C.QTreeView_DataChanged3(this.h, topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + + C.QTreeView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QTreeView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QTreeView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QTreeView) ExpandRecursively2(index *QModelIndex, depth int) { - C.QTreeView_ExpandRecursively2(this.h, index.cPointer(), (C.int)(depth)) +//export miqt_exec_callback_QTreeView_DataChanged +func miqt_exec_callback_QTreeView_DataChanged(self *C.QTreeView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QTreeView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_SelectAll() { + + C.QTreeView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnSelectAll(slot func(super func())) { + C.QTreeView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectAll +func miqt_exec_callback_QTreeView_SelectAll(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QTreeView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QTreeView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTreeView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTreeView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VerticalScrollbarValueChanged +func miqt_exec_callback_QTreeView_VerticalScrollbarValueChanged(self *C.QTreeView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTreeView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTreeView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTreeView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTreeView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ScrollContentsBy +func miqt_exec_callback_QTreeView_ScrollContentsBy(self *C.QTreeView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTreeView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QTreeView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_RowsInserted +func miqt_exec_callback_QTreeView_RowsInserted(self *C.QTreeView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QTreeView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_RowsAboutToBeRemoved +func miqt_exec_callback_QTreeView_RowsAboutToBeRemoved(self *C.QTreeView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTreeView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTreeView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MoveCursor +func miqt_exec_callback_QTreeView_MoveCursor(self *C.QTreeView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTreeView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeView) OnHorizontalOffset(slot func(super func() int) int) { + C.QTreeView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_HorizontalOffset +func miqt_exec_callback_QTreeView_HorizontalOffset(self *C.QTreeView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTreeView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeView) OnVerticalOffset(slot func(super func() int) int) { + C.QTreeView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VerticalOffset +func miqt_exec_callback_QTreeView_VerticalOffset(self *C.QTreeView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTreeView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTreeView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTreeView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SetSelection +func miqt_exec_callback_QTreeView_SetSelection(self *C.QTreeView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTreeView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTreeView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTreeView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTreeView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectedIndexes +func miqt_exec_callback_QTreeView_SelectedIndexes(self *C.QTreeView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTreeView) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QTreeView_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTreeView_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ChangeEvent +func miqt_exec_callback_QTreeView_ChangeEvent(self *C.QTreeView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTreeView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTreeView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTreeView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_TimerEvent +func miqt_exec_callback_QTreeView_TimerEvent(self *C.QTreeView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QTreeView_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QTreeView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_PaintEvent +func miqt_exec_callback_QTreeView_PaintEvent(self *C.QTreeView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DrawRow(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex) { + + C.QTreeView_virtualbase_DrawRow(unsafe.Pointer(this.h), painter.cPointer(), options.cPointer(), index.cPointer()) + +} +func (this *QTreeView) OnDrawRow(slot func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) { + C.QTreeView_override_virtual_DrawRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DrawRow +func miqt_exec_callback_QTreeView_DrawRow(self *C.QTreeView, cb C.intptr_t, painter *C.QPainter, options *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(options), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeView{h: self}).callVirtualBase_DrawRow, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_DrawBranches(painter *QPainter, rect *QRect, index *QModelIndex) { + + C.QTreeView_virtualbase_DrawBranches(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), index.cPointer()) + +} +func (this *QTreeView) OnDrawBranches(slot func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) { + C.QTreeView_override_virtual_DrawBranches(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DrawBranches +func miqt_exec_callback_QTreeView_DrawBranches(self *C.QTreeView, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeView{h: self}).callVirtualBase_DrawBranches, slotval1, slotval2, slotval3) + +} + +func (this *QTreeView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MousePressEvent +func miqt_exec_callback_QTreeView_MousePressEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MouseReleaseEvent +func miqt_exec_callback_QTreeView_MouseReleaseEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MouseDoubleClickEvent +func miqt_exec_callback_QTreeView_MouseDoubleClickEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTreeView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_MouseMoveEvent +func miqt_exec_callback_QTreeView_MouseMoveEvent(self *C.QTreeView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTreeView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTreeView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_KeyPressEvent +func miqt_exec_callback_QTreeView_KeyPressEvent(self *C.QTreeView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTreeView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTreeView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DragMoveEvent +func miqt_exec_callback_QTreeView_DragMoveEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTreeView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTreeView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ViewportEvent +func miqt_exec_callback_QTreeView_ViewportEvent(self *C.QTreeView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_UpdateGeometries() { + + C.QTreeView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnUpdateGeometries(slot func(super func())) { + C.QTreeView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_UpdateGeometries +func miqt_exec_callback_QTreeView_UpdateGeometries(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTreeView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTreeView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTreeView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ViewportSizeHint +func miqt_exec_callback_QTreeView_ViewportSizeHint(self *C.QTreeView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTreeView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTreeView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTreeView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SizeHintForColumn +func miqt_exec_callback_QTreeView_SizeHintForColumn(self *C.QTreeView, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTreeView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTreeView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTreeView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_HorizontalScrollbarAction +func miqt_exec_callback_QTreeView_HorizontalScrollbarAction(self *C.QTreeView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTreeView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTreeView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTreeView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTreeView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTreeView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_IsIndexHidden +func miqt_exec_callback_QTreeView_IsIndexHidden(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTreeView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTreeView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTreeView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_CurrentChanged +func miqt_exec_callback_QTreeView_CurrentChanged(self *C.QTreeView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTreeView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QTreeView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QTreeView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QTreeView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SizeHintForRow +func miqt_exec_callback_QTreeView_SizeHintForRow(self *C.QTreeView, cb C.intptr_t, row C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int) int, row int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { + + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QTreeView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())), nil) +} +func (this *QTreeView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { + C.QTreeView_override_virtual_ItemDelegateForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ItemDelegateForIndex +func miqt_exec_callback_QTreeView_ItemDelegateForIndex(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex) *C.QAbstractItemDelegate { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_ItemDelegateForIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QTreeView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QTreeView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_InputMethodQuery +func miqt_exec_callback_QTreeView_InputMethodQuery(self *C.QTreeView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(query) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeView) callVirtualBase_UpdateEditorData() { + + C.QTreeView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnUpdateEditorData(slot func(super func())) { + C.QTreeView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_UpdateEditorData +func miqt_exec_callback_QTreeView_UpdateEditorData(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QTreeView) callVirtualBase_UpdateEditorGeometries() { + + C.QTreeView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTreeView) OnUpdateEditorGeometries(slot func(super func())) { + C.QTreeView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_UpdateEditorGeometries +func miqt_exec_callback_QTreeView_UpdateEditorGeometries(self *C.QTreeView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QTreeView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QTreeView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTreeView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QTreeView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VerticalScrollbarAction +func miqt_exec_callback_QTreeView_VerticalScrollbarAction(self *C.QTreeView, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTreeView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QTreeView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QTreeView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTreeView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTreeView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QTreeView_HorizontalScrollbarValueChanged(self *C.QTreeView, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTreeView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QTreeView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QTreeView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QTreeView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QTreeView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_CloseEditor +func miqt_exec_callback_QTreeView_CloseEditor(self *C.QTreeView, cb C.intptr_t, editor *C.QWidget, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) + + gofunc((&QTreeView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QTreeView) callVirtualBase_CommitData(editor *QWidget) { + + C.QTreeView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTreeView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QTreeView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_CommitData +func miqt_exec_callback_QTreeView_CommitData(self *C.QTreeView, cb C.intptr_t, editor *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QWidget), editor *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(editor), nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QTreeView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QTreeView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QTreeView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QTreeView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_EditorDestroyed +func miqt_exec_callback_QTreeView_EditorDestroyed(self *C.QTreeView, cb C.intptr_t, editor *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(editor *QObject), editor *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(editor)) + + gofunc((&QTreeView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} + +func (this *QTreeView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QTreeView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QTreeView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_Edit2 +func miqt_exec_callback_QTreeView_Edit2(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex, trigger C.int, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__EditTrigger)(trigger) + + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QTreeView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QTreeView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QTreeView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectionCommand +func miqt_exec_callback_QTreeView_SelectionCommand(self *C.QTreeView, cb C.intptr_t, index *C.QModelIndex, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QTreeView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QTreeView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QTreeView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_StartDrag +func miqt_exec_callback_QTreeView_StartDrag(self *C.QTreeView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QTreeView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QTreeView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QTreeView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QTreeView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QTreeView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_InitViewItemOption +func miqt_exec_callback_QTreeView_InitViewItemOption(self *C.QTreeView, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QTreeView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QTreeView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QTreeView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QTreeView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_FocusNextPrevChild +func miqt_exec_callback_QTreeView_FocusNextPrevChild(self *C.QTreeView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTreeView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTreeView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_Event +func miqt_exec_callback_QTreeView_Event(self *C.QTreeView, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QTreeView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QTreeView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DragEnterEvent +func miqt_exec_callback_QTreeView_DragEnterEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QTreeView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QTreeView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DragLeaveEvent +func miqt_exec_callback_QTreeView_DragLeaveEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTreeView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTreeView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_DropEvent +func miqt_exec_callback_QTreeView_DropEvent(self *C.QTreeView, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QTreeView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTreeView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_FocusInEvent +func miqt_exec_callback_QTreeView_FocusInEvent(self *C.QTreeView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QTreeView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QTreeView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_FocusOutEvent +func miqt_exec_callback_QTreeView_FocusOutEvent(self *C.QTreeView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QTreeView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QTreeView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_ResizeEvent +func miqt_exec_callback_QTreeView_ResizeEvent(self *C.QTreeView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QTreeView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QTreeView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_InputMethodEvent +func miqt_exec_callback_QTreeView_InputMethodEvent(self *C.QTreeView, cb C.intptr_t, event *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QTreeView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QTreeView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QTreeView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QTreeView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_EventFilter +func miqt_exec_callback_QTreeView_EventFilter(self *C.QTreeView, cb C.intptr_t, object *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QTreeView) Delete() { - C.QTreeView_Delete(this.h) + C.QTreeView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtreeview.h b/qt6/gen_qtreeview.h index 3511372b..b75173e0 100644 --- a/qt6/gen_qtreeview.h +++ b/qt6/gen_qtreeview.h @@ -15,29 +15,73 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemDelegate; class QAbstractItemModel; +class QAbstractItemView; +class QAbstractScrollArea; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; class QHeaderView; +class QInputMethodEvent; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPainter; class QPoint; class QRect; +class QResizeEvent; +class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QTreeView; +class QVariant; class QWidget; #else +typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; +typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QTreeView QTreeView; +typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTreeView* QTreeView_new(QWidget* parent); -QTreeView* QTreeView_new2(); +void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTreeView_MetaObject(const QTreeView* self); void* QTreeView_Metacast(QTreeView* self, const char* param1); struct miqt_string QTreeView_Tr(const char* s); @@ -85,13 +129,13 @@ void QTreeView_SetTreePosition(QTreeView* self, int logicalIndex); int QTreeView_TreePosition(const QTreeView* self); void QTreeView_KeyboardSearch(QTreeView* self, struct miqt_string search); QRect* QTreeView_VisualRect(const QTreeView* self, QModelIndex* index); -void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index); +void QTreeView_ScrollTo(QTreeView* self, QModelIndex* index, int hint); QModelIndex* QTreeView_IndexAt(const QTreeView* self, QPoint* p); QModelIndex* QTreeView_IndexAbove(const QTreeView* self, QModelIndex* index); QModelIndex* QTreeView_IndexBelow(const QTreeView* self, QModelIndex* index); void QTreeView_DoItemsLayout(QTreeView* self); void QTreeView_Reset(QTreeView* self); -void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight); +void QTreeView_DataChanged(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); void QTreeView_SelectAll(QTreeView* self); void QTreeView_Expanded(QTreeView* self, QModelIndex* index); void QTreeView_connect_Expanded(QTreeView* self, intptr_t slot); @@ -107,12 +151,161 @@ void QTreeView_ExpandAll(QTreeView* self); void QTreeView_ExpandRecursively(QTreeView* self, QModelIndex* index); void QTreeView_CollapseAll(QTreeView* self); void QTreeView_ExpandToDepth(QTreeView* self, int depth); +void QTreeView_VerticalScrollbarValueChanged(QTreeView* self, int value); +void QTreeView_ScrollContentsBy(QTreeView* self, int dx, int dy); +void QTreeView_RowsInserted(QTreeView* self, QModelIndex* parent, int start, int end); +void QTreeView_RowsAboutToBeRemoved(QTreeView* self, QModelIndex* parent, int start, int end); +QModelIndex* QTreeView_MoveCursor(QTreeView* self, int cursorAction, int modifiers); +int QTreeView_HorizontalOffset(const QTreeView* self); +int QTreeView_VerticalOffset(const QTreeView* self); +void QTreeView_SetSelection(QTreeView* self, QRect* rect, int command); +struct miqt_array /* of QModelIndex* */ QTreeView_SelectedIndexes(const QTreeView* self); +void QTreeView_ChangeEvent(QTreeView* self, QEvent* event); +void QTreeView_TimerEvent(QTreeView* self, QTimerEvent* event); +void QTreeView_PaintEvent(QTreeView* self, QPaintEvent* event); +void QTreeView_DrawRow(const QTreeView* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index); +void QTreeView_DrawBranches(const QTreeView* self, QPainter* painter, QRect* rect, QModelIndex* index); +void QTreeView_MousePressEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_MouseReleaseEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_MouseDoubleClickEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_MouseMoveEvent(QTreeView* self, QMouseEvent* event); +void QTreeView_KeyPressEvent(QTreeView* self, QKeyEvent* event); +void QTreeView_DragMoveEvent(QTreeView* self, QDragMoveEvent* event); +bool QTreeView_ViewportEvent(QTreeView* self, QEvent* event); +void QTreeView_UpdateGeometries(QTreeView* self); +QSize* QTreeView_ViewportSizeHint(const QTreeView* self); +int QTreeView_SizeHintForColumn(const QTreeView* self, int column); +void QTreeView_HorizontalScrollbarAction(QTreeView* self, int action); +bool QTreeView_IsIndexHidden(const QTreeView* self, QModelIndex* index); +void QTreeView_CurrentChanged(QTreeView* self, QModelIndex* current, QModelIndex* previous); struct miqt_string QTreeView_Tr2(const char* s, const char* c); struct miqt_string QTreeView_Tr3(const char* s, const char* c, int n); -void QTreeView_ScrollTo2(QTreeView* self, QModelIndex* index, int hint); -void QTreeView_DataChanged3(QTreeView* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); void QTreeView_ExpandRecursively2(QTreeView* self, QModelIndex* index, int depth); -void QTreeView_Delete(QTreeView* self); +void QTreeView_override_virtual_SetModel(void* self, intptr_t slot); +void QTreeView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QTreeView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTreeView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTreeView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTreeView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTreeView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QTreeView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QTreeView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTreeView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTreeView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTreeView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTreeView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTreeView_virtualbase_IndexAt(const void* self, QPoint* p); +void QTreeView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTreeView_virtualbase_DoItemsLayout(void* self); +void QTreeView_override_virtual_Reset(void* self, intptr_t slot); +void QTreeView_virtualbase_Reset(void* self); +void QTreeView_override_virtual_DataChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QTreeView_override_virtual_SelectAll(void* self, intptr_t slot); +void QTreeView_virtualbase_SelectAll(void* self); +void QTreeView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QTreeView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTreeView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTreeView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QTreeView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QTreeView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QTreeView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QTreeView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTreeView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTreeView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTreeView_virtualbase_HorizontalOffset(const void* self); +void QTreeView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTreeView_virtualbase_VerticalOffset(const void* self); +void QTreeView_override_virtual_SetSelection(void* self, intptr_t slot); +void QTreeView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTreeView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTreeView_virtualbase_SelectedIndexes(const void* self); +void QTreeView_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_ChangeEvent(void* self, QEvent* event); +void QTreeView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTreeView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QTreeView_override_virtual_DrawRow(void* self, intptr_t slot); +void QTreeView_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index); +void QTreeView_override_virtual_DrawBranches(void* self, intptr_t slot); +void QTreeView_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index); +void QTreeView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTreeView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTreeView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTreeView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTreeView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QTreeView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTreeView_virtualbase_UpdateGeometries(void* self); +void QTreeView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTreeView_virtualbase_ViewportSizeHint(const void* self); +void QTreeView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTreeView_virtualbase_SizeHintForColumn(const void* self, int column); +void QTreeView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTreeView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTreeView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTreeView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTreeView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTreeView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QTreeView_virtualbase_SizeHintForRow(const void* self, int row); +void QTreeView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot); +QAbstractItemDelegate* QTreeView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index); +void QTreeView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QTreeView_virtualbase_InputMethodQuery(const void* self, int query); +void QTreeView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QTreeView_virtualbase_UpdateEditorData(void* self); +void QTreeView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QTreeView_virtualbase_UpdateEditorGeometries(void* self); +void QTreeView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QTreeView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QTreeView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QTreeView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QTreeView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QTreeView_override_virtual_CommitData(void* self, intptr_t slot); +void QTreeView_virtualbase_CommitData(void* self, QWidget* editor); +void QTreeView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QTreeView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QTreeView_override_virtual_Edit2(void* self, intptr_t slot); +bool QTreeView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QTreeView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QTreeView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QTreeView_override_virtual_StartDrag(void* self, intptr_t slot); +void QTreeView_virtualbase_StartDrag(void* self, int supportedActions); +void QTreeView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QTreeView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QTreeView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QTreeView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QTreeView_override_virtual_Event(void* self, intptr_t slot); +bool QTreeView_virtualbase_Event(void* self, QEvent* event); +void QTreeView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QTreeView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QTreeView_override_virtual_DropEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTreeView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QTreeView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QTreeView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QTreeView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QTreeView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QTreeView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTreeView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QTreeView_Delete(QTreeView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtreewidget.cpp b/qt6/gen_qtreewidget.cpp index 744e2864..c63872df 100644 --- a/qt6/gen_qtreewidget.cpp +++ b/qt6/gen_qtreewidget.cpp @@ -1,17 +1,33 @@ +#include +#include #include #include +#include +#include +#include #include +#include #include #include +#include #include #include +#include #include +#include +#include +#include +#include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include @@ -20,11 +36,188 @@ #include "gen_qtreewidget.h" #include "_cgo_export.h" -QTreeWidgetItem* QTreeWidgetItem_new() { - return new QTreeWidgetItem(); +class MiqtVirtualQTreeWidgetItem : public virtual QTreeWidgetItem { +public: + + MiqtVirtualQTreeWidgetItem(): QTreeWidgetItem() {}; + MiqtVirtualQTreeWidgetItem(const QStringList& strings): QTreeWidgetItem(strings) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview): QTreeWidgetItem(treeview) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, const QStringList& strings): QTreeWidgetItem(treeview, strings) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, QTreeWidgetItem* after): QTreeWidgetItem(treeview, after) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent): QTreeWidgetItem(parent) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, const QStringList& strings): QTreeWidgetItem(parent, strings) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, QTreeWidgetItem* after): QTreeWidgetItem(parent, after) {}; + MiqtVirtualQTreeWidgetItem(const QTreeWidgetItem& other): QTreeWidgetItem(other) {}; + MiqtVirtualQTreeWidgetItem(int typeVal): QTreeWidgetItem(typeVal) {}; + MiqtVirtualQTreeWidgetItem(const QStringList& strings, int typeVal): QTreeWidgetItem(strings, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, int typeVal): QTreeWidgetItem(treeview, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, const QStringList& strings, int typeVal): QTreeWidgetItem(treeview, strings, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal): QTreeWidgetItem(treeview, after, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, int typeVal): QTreeWidgetItem(parent, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, const QStringList& strings, int typeVal): QTreeWidgetItem(parent, strings, typeVal) {}; + MiqtVirtualQTreeWidgetItem(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal): QTreeWidgetItem(parent, after, typeVal) {}; + + virtual ~MiqtVirtualQTreeWidgetItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QTreeWidgetItem* clone() const override { + if (handle__Clone == 0) { + return QTreeWidgetItem::clone(); + } + + + QTreeWidgetItem* callback_return_value = miqt_exec_callback_QTreeWidgetItem_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTreeWidgetItem* virtualbase_Clone() const { + + return QTreeWidgetItem::clone(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(int column, int role) const override { + if (handle__Data == 0) { + return QTreeWidgetItem::data(column, role); + } + + int sigval1 = column; + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QTreeWidgetItem_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Data(int column, int role) const { + + return new QVariant(QTreeWidgetItem::data(static_cast(column), static_cast(role))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetData = 0; + + // Subclass to allow providing a Go implementation + virtual void setData(int column, int role, const QVariant& value) override { + if (handle__SetData == 0) { + QTreeWidgetItem::setData(column, role, value); + return; + } + + int sigval1 = column; + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + + miqt_exec_callback_QTreeWidgetItem_SetData(this, handle__SetData, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetData(int column, int role, QVariant* value) { + + QTreeWidgetItem::setData(static_cast(column), static_cast(role), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__OperatorLesser = 0; + + // Subclass to allow providing a Go implementation + virtual bool operator<(const QTreeWidgetItem& other) const override { + if (handle__OperatorLesser == 0) { + return QTreeWidgetItem::operator<(other); + } + + const QTreeWidgetItem& other_ret = other; + // Cast returned reference into pointer + QTreeWidgetItem* sigval1 = const_cast(&other_ret); + + bool callback_return_value = miqt_exec_callback_QTreeWidgetItem_OperatorLesser(const_cast(this), handle__OperatorLesser, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_OperatorLesser(QTreeWidgetItem* other) const { + + return QTreeWidgetItem::operator<(*other); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual void read(QDataStream& in) override { + if (handle__Read == 0) { + QTreeWidgetItem::read(in); + return; + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + miqt_exec_callback_QTreeWidgetItem_Read(this, handle__Read, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Read(QDataStream* in) { + + QTreeWidgetItem::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual void write(QDataStream& out) const override { + if (handle__Write == 0) { + QTreeWidgetItem::write(out); + return; + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + miqt_exec_callback_QTreeWidgetItem_Write(const_cast(this), handle__Write, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Write(QDataStream* out) const { + + QTreeWidgetItem::write(*out); + + } + +}; + +void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings) { +void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -32,14 +225,16 @@ QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(strings_QList); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview) { - return new QTreeWidgetItem(treeview); +void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings) { +void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -47,18 +242,21 @@ QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array / QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(treeview, strings_QList); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after) { - return new QTreeWidgetItem(treeview, after); +void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent) { - return new QTreeWidgetItem(parent); +void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings) { +void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -66,22 +264,26 @@ QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(parent, strings_QList); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after) { - return new QTreeWidgetItem(parent, after); +void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other) { - return new QTreeWidgetItem(*other); +void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(*other); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal) { - return new QTreeWidgetItem(static_cast(typeVal)); +void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal) { +void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -89,14 +291,16 @@ QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_strin QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(strings_QList, static_cast(typeVal)); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal) { - return new QTreeWidgetItem(treeview, static_cast(typeVal)); +void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { +void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -104,18 +308,21 @@ QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal) { - return new QTreeWidgetItem(treeview, after, static_cast(typeVal)); +void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal) { - return new QTreeWidgetItem(parent, static_cast(typeVal)); +void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { +void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -123,11 +330,13 @@ QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_arra QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - return new QTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } -QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal) { - return new QTreeWidgetItem(parent, after, static_cast(typeVal)); +void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { + MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after, static_cast(typeVal)); + *outptr_QTreeWidgetItem = ret; } QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self) { @@ -426,278 +635,1495 @@ void QTreeWidgetItem_SortChildren(QTreeWidgetItem* self, int column, int order) self->sortChildren(static_cast(column), static_cast(order)); } -void QTreeWidgetItem_Delete(QTreeWidgetItem* self) { - delete self; +void QTreeWidgetItem_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Clone = slot; } -QTreeWidget* QTreeWidget_new(QWidget* parent) { - return new QTreeWidget(parent); +QTreeWidgetItem* QTreeWidgetItem_virtualbase_Clone(const void* self) { + return ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Clone(); } -QTreeWidget* QTreeWidget_new2() { - return new QTreeWidget(); +void QTreeWidgetItem_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Data = slot; } -QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self) { - return (QMetaObject*) self->metaObject(); +QVariant* QTreeWidgetItem_virtualbase_Data(const void* self, int column, int role) { + return ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Data(column, role); } -void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1) { - return self->qt_metacast(param1); +void QTreeWidgetItem_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__SetData = slot; } -struct miqt_string QTreeWidget_Tr(const char* s) { - QString _ret = QTreeWidget::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QTreeWidgetItem_virtualbase_SetData(void* self, int column, int role, QVariant* value) { + ( (MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_SetData(column, role, value); } -int QTreeWidget_ColumnCount(const QTreeWidget* self) { - return self->columnCount(); +void QTreeWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__OperatorLesser = slot; } -void QTreeWidget_SetColumnCount(QTreeWidget* self, int columns) { - self->setColumnCount(static_cast(columns)); +bool QTreeWidgetItem_virtualbase_OperatorLesser(const void* self, QTreeWidgetItem* other) { + return ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_OperatorLesser(other); } -QTreeWidgetItem* QTreeWidget_InvisibleRootItem(const QTreeWidget* self) { - return self->invisibleRootItem(); +void QTreeWidgetItem_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Read = slot; } -QTreeWidgetItem* QTreeWidget_TopLevelItem(const QTreeWidget* self, int index) { - return self->topLevelItem(static_cast(index)); +void QTreeWidgetItem_virtualbase_Read(void* self, QDataStream* in) { + ( (MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Read(in); } -int QTreeWidget_TopLevelItemCount(const QTreeWidget* self) { - return self->topLevelItemCount(); +void QTreeWidgetItem_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidgetItem*)(self) )->handle__Write = slot; } -void QTreeWidget_InsertTopLevelItem(QTreeWidget* self, int index, QTreeWidgetItem* item) { - self->insertTopLevelItem(static_cast(index), item); +void QTreeWidgetItem_virtualbase_Write(const void* self, QDataStream* out) { + ( (const MiqtVirtualQTreeWidgetItem*)(self) )->virtualbase_Write(out); } -void QTreeWidget_AddTopLevelItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->addTopLevelItem(item); +void QTreeWidgetItem_Delete(QTreeWidgetItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTreeWidgetItem* QTreeWidget_TakeTopLevelItem(QTreeWidget* self, int index) { - return self->takeTopLevelItem(static_cast(index)); -} +class MiqtVirtualQTreeWidget : public virtual QTreeWidget { +public: -int QTreeWidget_IndexOfTopLevelItem(const QTreeWidget* self, QTreeWidgetItem* item) { - return self->indexOfTopLevelItem(item); -} + MiqtVirtualQTreeWidget(QWidget* parent): QTreeWidget(parent) {}; + MiqtVirtualQTreeWidget(): QTreeWidget() {}; -void QTreeWidget_InsertTopLevelItems(QTreeWidget* self, int index, struct miqt_array /* of QTreeWidgetItem* */ items) { - QList items_QList; - items_QList.reserve(items.len); - QTreeWidgetItem** items_arr = static_cast(items.data); - for(size_t i = 0; i < items.len; ++i) { - items_QList.push_back(items_arr[i]); - } - self->insertTopLevelItems(static_cast(index), items_QList); -} + virtual ~MiqtVirtualQTreeWidget() = default; -void QTreeWidget_AddTopLevelItems(QTreeWidget* self, struct miqt_array /* of QTreeWidgetItem* */ items) { - QList items_QList; - items_QList.reserve(items.len); - QTreeWidgetItem** items_arr = static_cast(items.data); - for(size_t i = 0; i < items.len; ++i) { - items_QList.push_back(items_arr[i]); + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelectionModel = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelectionModel(QItemSelectionModel* selectionModel) override { + if (handle__SetSelectionModel == 0) { + QTreeWidget::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QTreeWidget_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + } - self->addTopLevelItems(items_QList); -} -QTreeWidgetItem* QTreeWidget_HeaderItem(const QTreeWidget* self) { - return self->headerItem(); -} + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { -void QTreeWidget_SetHeaderItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->setHeaderItem(item); -} + QTreeWidget::setSelectionModel(selectionModel); -void QTreeWidget_SetHeaderLabels(QTreeWidget* self, struct miqt_array /* of struct miqt_string */ labels) { - QStringList labels_QList; - labels_QList.reserve(labels.len); - struct miqt_string* labels_arr = static_cast(labels.data); - for(size_t i = 0; i < labels.len; ++i) { - QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); - labels_QList.push_back(labels_arr_i_QString); } - self->setHeaderLabels(labels_QList); -} -void QTreeWidget_SetHeaderLabel(QTreeWidget* self, struct miqt_string label) { - QString label_QString = QString::fromUtf8(label.data, label.len); - self->setHeaderLabel(label_QString); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; -QTreeWidgetItem* QTreeWidget_CurrentItem(const QTreeWidget* self) { - return self->currentItem(); -} + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QTreeWidget::event(e); + } + + QEvent* sigval1 = e; -int QTreeWidget_CurrentColumn(const QTreeWidget* self) { - return self->currentColumn(); -} + bool callback_return_value = miqt_exec_callback_QTreeWidget_Event(this, handle__Event, sigval1); -void QTreeWidget_SetCurrentItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->setCurrentItem(item); -} + return callback_return_value; + } -void QTreeWidget_SetCurrentItem2(QTreeWidget* self, QTreeWidgetItem* item, int column) { - self->setCurrentItem(item, static_cast(column)); -} + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { -void QTreeWidget_SetCurrentItem3(QTreeWidget* self, QTreeWidgetItem* item, int column, int command) { - self->setCurrentItem(item, static_cast(column), static_cast(command)); -} + return QTreeWidget::event(e); -QTreeWidgetItem* QTreeWidget_ItemAt(const QTreeWidget* self, QPoint* p) { - return self->itemAt(*p); -} + } -QTreeWidgetItem* QTreeWidget_ItemAt2(const QTreeWidget* self, int x, int y) { - return self->itemAt(static_cast(x), static_cast(y)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__MimeTypes == 0) { + return QTreeWidget::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QTreeWidget_MimeTypes(const_cast(this), handle__MimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } -QRect* QTreeWidget_VisualItemRect(const QTreeWidget* self, QTreeWidgetItem* item) { - return new QRect(self->visualItemRect(item)); -} + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_MimeTypes() const { + + QStringList _ret = QTreeWidget::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; -int QTreeWidget_SortColumn(const QTreeWidget* self) { - return self->sortColumn(); -} + } -void QTreeWidget_SortItems(QTreeWidget* self, int column, int order) { - self->sortItems(static_cast(column), static_cast(order)); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__MimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QList& items) const override { + if (handle__MimeData == 0) { + return QTreeWidget::mimeData(items); + } + + const QList& items_ret = items; + // Convert QList<> from C++ memory to manually-managed C memory + QTreeWidgetItem** items_arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * items_ret.length())); + for (size_t i = 0, e = items_ret.length(); i < e; ++i) { + items_arr[i] = items_ret[i]; + } + struct miqt_array items_out; + items_out.len = items_ret.length(); + items_out.data = static_cast(items_arr); + struct miqt_array /* of QTreeWidgetItem* */ sigval1 = items_out; + + QMimeData* callback_return_value = miqt_exec_callback_QTreeWidget_MimeData(const_cast(this), handle__MimeData, sigval1); + + return callback_return_value; + } -void QTreeWidget_EditItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->editItem(item); -} + // Wrapper to allow calling protected method + QMimeData* virtualbase_MimeData(struct miqt_array /* of QTreeWidgetItem* */ items) const { + QList items_QList; + items_QList.reserve(items.len); + QTreeWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } -void QTreeWidget_OpenPersistentEditor(QTreeWidget* self, QTreeWidgetItem* item) { - self->openPersistentEditor(item); -} + return QTreeWidget::mimeData(items_QList); -void QTreeWidget_ClosePersistentEditor(QTreeWidget* self, QTreeWidgetItem* item) { - self->closePersistentEditor(item); -} + } -bool QTreeWidget_IsPersistentEditorOpen(const QTreeWidget* self, QTreeWidgetItem* item) { - return self->isPersistentEditorOpen(item); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__DropMimeData = 0; -QWidget* QTreeWidget_ItemWidget(const QTreeWidget* self, QTreeWidgetItem* item, int column) { - return self->itemWidget(item, static_cast(column)); -} + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(QTreeWidgetItem* parent, int index, const QMimeData* data, Qt::DropAction action) override { + if (handle__DropMimeData == 0) { + return QTreeWidget::dropMimeData(parent, index, data, action); + } + + QTreeWidgetItem* sigval1 = parent; + int sigval2 = index; + QMimeData* sigval3 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval4 = static_cast(action_ret); -void QTreeWidget_SetItemWidget(QTreeWidget* self, QTreeWidgetItem* item, int column, QWidget* widget) { - self->setItemWidget(item, static_cast(column), widget); -} + bool callback_return_value = miqt_exec_callback_QTreeWidget_DropMimeData(this, handle__DropMimeData, sigval1, sigval2, sigval3, sigval4); -void QTreeWidget_RemoveItemWidget(QTreeWidget* self, QTreeWidgetItem* item, int column) { - self->removeItemWidget(item, static_cast(column)); -} + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DropMimeData(QTreeWidgetItem* parent, int index, QMimeData* data, int action) { + + return QTreeWidget::dropMimeData(parent, static_cast(index), data, static_cast(action)); -struct miqt_array /* of QTreeWidgetItem* */ QTreeWidget_SelectedItems(const QTreeWidget* self) { - QList _ret = self->selectedItems(); - // Convert QList<> from C++ memory to manually-managed C memory - QTreeWidgetItem** _arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} -struct miqt_array /* of QTreeWidgetItem* */ QTreeWidget_FindItems(const QTreeWidget* self, struct miqt_string text, int flags) { - QString text_QString = QString::fromUtf8(text.data, text.len); - QList _ret = self->findItems(text_QString, static_cast(flags)); - // Convert QList<> from C++ memory to manually-managed C memory - QTreeWidgetItem** _arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = _ret[i]; + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__SupportedDropActions == 0) { + return QTreeWidget::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QTreeWidget_SupportedDropActions(const_cast(this), handle__SupportedDropActions); + + return static_cast(callback_return_value); } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} -QTreeWidgetItem* QTreeWidget_ItemAbove(const QTreeWidget* self, QTreeWidgetItem* item) { - return self->itemAbove(item); -} + // Wrapper to allow calling protected method + int virtualbase_SupportedDropActions() const { -QTreeWidgetItem* QTreeWidget_ItemBelow(const QTreeWidget* self, QTreeWidgetItem* item) { - return self->itemBelow(item); -} + Qt::DropActions _ret = QTreeWidget::supportedDropActions(); + return static_cast(_ret); -QModelIndex* QTreeWidget_IndexFromItem(const QTreeWidget* self, QTreeWidgetItem* item) { - return new QModelIndex(self->indexFromItem(item)); -} + } -QTreeWidgetItem* QTreeWidget_ItemFromIndex(const QTreeWidget* self, QModelIndex* index) { - return self->itemFromIndex(*index); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; -void QTreeWidget_SetSelectionModel(QTreeWidget* self, QItemSelectionModel* selectionModel) { - self->setSelectionModel(selectionModel); -} + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QTreeWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; -void QTreeWidget_ScrollToItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->scrollToItem(item); -} + miqt_exec_callback_QTreeWidget_DropEvent(this, handle__DropEvent, sigval1); -void QTreeWidget_ExpandItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->expandItem(item); -} + + } -void QTreeWidget_CollapseItem(QTreeWidget* self, QTreeWidgetItem* item) { - self->collapseItem(item); -} + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { -void QTreeWidget_Clear(QTreeWidget* self) { - self->clear(); -} + QTreeWidget::dropEvent(event); -void QTreeWidget_ItemPressed(QTreeWidget* self, QTreeWidgetItem* item, int column) { - self->itemPressed(item, static_cast(column)); -} + } -void QTreeWidget_connect_ItemPressed(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemPressed), self, [=](QTreeWidgetItem* item, int column) { - QTreeWidgetItem* sigval1 = item; - int sigval2 = column; - miqt_exec_callback_QTreeWidget_ItemPressed(slot, sigval1, sigval2); - }); -} + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; -void QTreeWidget_ItemClicked(QTreeWidget* self, QTreeWidgetItem* item, int column) { - self->itemClicked(item, static_cast(column)); -} + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QTreeWidget::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); -void QTreeWidget_connect_ItemClicked(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemClicked), self, [=](QTreeWidgetItem* item, int column) { - QTreeWidgetItem* sigval1 = item; - int sigval2 = column; - miqt_exec_callback_QTreeWidget_ItemClicked(slot, sigval1, sigval2); - }); -} + miqt_exec_callback_QTreeWidget_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QTreeWidget::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyboardSearch = 0; + + // Subclass to allow providing a Go implementation + virtual void keyboardSearch(const QString& search) override { + if (handle__KeyboardSearch == 0) { + QTreeWidget::keyboardSearch(search); + return; + } + + const QString search_ret = search; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray search_b = search_ret.toUtf8(); + struct miqt_string search_ms; + search_ms.len = search_b.length(); + search_ms.data = static_cast(malloc(search_ms.len)); + memcpy(search_ms.data, search_b.data(), search_ms.len); + struct miqt_string sigval1 = search_ms; + + miqt_exec_callback_QTreeWidget_KeyboardSearch(this, handle__KeyboardSearch, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyboardSearch(struct miqt_string search) { + QString search_QString = QString::fromUtf8(search.data, search.len); + + QTreeWidget::keyboardSearch(search_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QTreeWidget::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QTreeWidget_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QTreeWidget::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QTreeWidget::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QTreeWidget_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QTreeWidget::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QTreeWidget::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeWidget_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QTreeWidget::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QTreeWidget::doItemsLayout(); + return; + } + + + miqt_exec_callback_QTreeWidget_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QTreeWidget::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QTreeWidget::reset(); + return; + } + + + miqt_exec_callback_QTreeWidget_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QTreeWidget::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QTreeWidget::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QTreeWidget_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QTreeWidget::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectAll = 0; + + // Subclass to allow providing a Go implementation + virtual void selectAll() override { + if (handle__SelectAll == 0) { + QTreeWidget::selectAll(); + return; + } + + + miqt_exec_callback_QTreeWidget_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QTreeWidget::selectAll(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalScrollbarValueChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void verticalScrollbarValueChanged(int value) override { + if (handle__VerticalScrollbarValueChanged == 0) { + QTreeWidget::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QTreeWidget_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QTreeWidget::verticalScrollbarValueChanged(static_cast(value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QTreeWidget::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QTreeWidget_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QTreeWidget::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QTreeWidget::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeWidget_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QTreeWidget::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QTreeWidget::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QTreeWidget_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QTreeWidget::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QTreeWidget::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QTreeWidget_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QTreeWidget::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QTreeWidget::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeWidget_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QTreeWidget::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QTreeWidget::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QTreeWidget_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QTreeWidget::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QTreeWidget::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QTreeWidget_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QTreeWidget::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QTreeWidget::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QTreeWidget_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QTreeWidget::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QTreeWidget::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QTreeWidget::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTreeWidget::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTreeWidget::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QTreeWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QTreeWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRow = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const override { + if (handle__DrawRow == 0) { + QTreeWidget::drawRow(painter, options, index); + return; + } + + QPainter* sigval1 = painter; + const QStyleOptionViewItem& options_ret = options; + // Cast returned reference into pointer + QStyleOptionViewItem* sigval2 = const_cast(&options_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeWidget_DrawRow(const_cast(this), handle__DrawRow, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRow(QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) const { + + QTreeWidget::drawRow(painter, *options, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawBranches = 0; + + // Subclass to allow providing a Go implementation + virtual void drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const override { + if (handle__DrawBranches == 0) { + QTreeWidget::drawBranches(painter, rect, index); + return; + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&index_ret); + + miqt_exec_callback_QTreeWidget_DrawBranches(const_cast(this), handle__DrawBranches, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawBranches(QPainter* painter, QRect* rect, QModelIndex* index) const { + + QTreeWidget::drawBranches(painter, *rect, *index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QTreeWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QTreeWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QTreeWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QTreeWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QTreeWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QTreeWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QTreeWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QTreeWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QTreeWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QTreeWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QTreeWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QTreeWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QTreeWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* event) override { + if (handle__ViewportEvent == 0) { + return QTreeWidget::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTreeWidget_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QTreeWidget::viewportEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QTreeWidget::updateGeometries(); + return; + } + + + miqt_exec_callback_QTreeWidget_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QTreeWidget::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QTreeWidget::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QTreeWidget_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QTreeWidget::viewportSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHintForColumn = 0; + + // Subclass to allow providing a Go implementation + virtual int sizeHintForColumn(int column) const override { + if (handle__SizeHintForColumn == 0) { + return QTreeWidget::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QTreeWidget_SizeHintForColumn(const_cast(this), handle__SizeHintForColumn, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SizeHintForColumn(int column) const { + + return QTreeWidget::sizeHintForColumn(static_cast(column)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalScrollbarAction = 0; + + // Subclass to allow providing a Go implementation + virtual void horizontalScrollbarAction(int action) override { + if (handle__HorizontalScrollbarAction == 0) { + QTreeWidget::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QTreeWidget_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QTreeWidget::horizontalScrollbarAction(static_cast(action)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QTreeWidget::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QTreeWidget_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QTreeWidget::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QTreeWidget::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QTreeWidget_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QTreeWidget::currentChanged(*current, *previous); + + } + +}; + +void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(parent); + *outptr_QTreeWidget = ret; + *outptr_QTreeView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(); + *outptr_QTreeWidget = ret; + *outptr_QTreeView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QTreeWidget_Tr(const char* s) { + QString _ret = QTreeWidget::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QTreeWidget_ColumnCount(const QTreeWidget* self) { + return self->columnCount(); +} + +void QTreeWidget_SetColumnCount(QTreeWidget* self, int columns) { + self->setColumnCount(static_cast(columns)); +} + +QTreeWidgetItem* QTreeWidget_InvisibleRootItem(const QTreeWidget* self) { + return self->invisibleRootItem(); +} + +QTreeWidgetItem* QTreeWidget_TopLevelItem(const QTreeWidget* self, int index) { + return self->topLevelItem(static_cast(index)); +} + +int QTreeWidget_TopLevelItemCount(const QTreeWidget* self) { + return self->topLevelItemCount(); +} + +void QTreeWidget_InsertTopLevelItem(QTreeWidget* self, int index, QTreeWidgetItem* item) { + self->insertTopLevelItem(static_cast(index), item); +} + +void QTreeWidget_AddTopLevelItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->addTopLevelItem(item); +} + +QTreeWidgetItem* QTreeWidget_TakeTopLevelItem(QTreeWidget* self, int index) { + return self->takeTopLevelItem(static_cast(index)); +} + +int QTreeWidget_IndexOfTopLevelItem(const QTreeWidget* self, QTreeWidgetItem* item) { + return self->indexOfTopLevelItem(item); +} + +void QTreeWidget_InsertTopLevelItems(QTreeWidget* self, int index, struct miqt_array /* of QTreeWidgetItem* */ items) { + QList items_QList; + items_QList.reserve(items.len); + QTreeWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + self->insertTopLevelItems(static_cast(index), items_QList); +} + +void QTreeWidget_AddTopLevelItems(QTreeWidget* self, struct miqt_array /* of QTreeWidgetItem* */ items) { + QList items_QList; + items_QList.reserve(items.len); + QTreeWidgetItem** items_arr = static_cast(items.data); + for(size_t i = 0; i < items.len; ++i) { + items_QList.push_back(items_arr[i]); + } + self->addTopLevelItems(items_QList); +} + +QTreeWidgetItem* QTreeWidget_HeaderItem(const QTreeWidget* self) { + return self->headerItem(); +} + +void QTreeWidget_SetHeaderItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->setHeaderItem(item); +} + +void QTreeWidget_SetHeaderLabels(QTreeWidget* self, struct miqt_array /* of struct miqt_string */ labels) { + QStringList labels_QList; + labels_QList.reserve(labels.len); + struct miqt_string* labels_arr = static_cast(labels.data); + for(size_t i = 0; i < labels.len; ++i) { + QString labels_arr_i_QString = QString::fromUtf8(labels_arr[i].data, labels_arr[i].len); + labels_QList.push_back(labels_arr_i_QString); + } + self->setHeaderLabels(labels_QList); +} + +void QTreeWidget_SetHeaderLabel(QTreeWidget* self, struct miqt_string label) { + QString label_QString = QString::fromUtf8(label.data, label.len); + self->setHeaderLabel(label_QString); +} + +QTreeWidgetItem* QTreeWidget_CurrentItem(const QTreeWidget* self) { + return self->currentItem(); +} + +int QTreeWidget_CurrentColumn(const QTreeWidget* self) { + return self->currentColumn(); +} + +void QTreeWidget_SetCurrentItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->setCurrentItem(item); +} + +void QTreeWidget_SetCurrentItem2(QTreeWidget* self, QTreeWidgetItem* item, int column) { + self->setCurrentItem(item, static_cast(column)); +} + +void QTreeWidget_SetCurrentItem3(QTreeWidget* self, QTreeWidgetItem* item, int column, int command) { + self->setCurrentItem(item, static_cast(column), static_cast(command)); +} + +QTreeWidgetItem* QTreeWidget_ItemAt(const QTreeWidget* self, QPoint* p) { + return self->itemAt(*p); +} + +QTreeWidgetItem* QTreeWidget_ItemAt2(const QTreeWidget* self, int x, int y) { + return self->itemAt(static_cast(x), static_cast(y)); +} + +QRect* QTreeWidget_VisualItemRect(const QTreeWidget* self, QTreeWidgetItem* item) { + return new QRect(self->visualItemRect(item)); +} + +int QTreeWidget_SortColumn(const QTreeWidget* self) { + return self->sortColumn(); +} + +void QTreeWidget_SortItems(QTreeWidget* self, int column, int order) { + self->sortItems(static_cast(column), static_cast(order)); +} + +void QTreeWidget_EditItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->editItem(item); +} + +void QTreeWidget_OpenPersistentEditor(QTreeWidget* self, QTreeWidgetItem* item) { + self->openPersistentEditor(item); +} + +void QTreeWidget_ClosePersistentEditor(QTreeWidget* self, QTreeWidgetItem* item) { + self->closePersistentEditor(item); +} + +bool QTreeWidget_IsPersistentEditorOpen(const QTreeWidget* self, QTreeWidgetItem* item) { + return self->isPersistentEditorOpen(item); +} + +QWidget* QTreeWidget_ItemWidget(const QTreeWidget* self, QTreeWidgetItem* item, int column) { + return self->itemWidget(item, static_cast(column)); +} + +void QTreeWidget_SetItemWidget(QTreeWidget* self, QTreeWidgetItem* item, int column, QWidget* widget) { + self->setItemWidget(item, static_cast(column), widget); +} + +void QTreeWidget_RemoveItemWidget(QTreeWidget* self, QTreeWidgetItem* item, int column) { + self->removeItemWidget(item, static_cast(column)); +} + +struct miqt_array /* of QTreeWidgetItem* */ QTreeWidget_SelectedItems(const QTreeWidget* self) { + QList _ret = self->selectedItems(); + // Convert QList<> from C++ memory to manually-managed C memory + QTreeWidgetItem** _arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QTreeWidgetItem* */ QTreeWidget_FindItems(const QTreeWidget* self, struct miqt_string text, int flags) { + QString text_QString = QString::fromUtf8(text.data, text.len); + QList _ret = self->findItems(text_QString, static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QTreeWidgetItem** _arr = static_cast(malloc(sizeof(QTreeWidgetItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +QTreeWidgetItem* QTreeWidget_ItemAbove(const QTreeWidget* self, QTreeWidgetItem* item) { + return self->itemAbove(item); +} + +QTreeWidgetItem* QTreeWidget_ItemBelow(const QTreeWidget* self, QTreeWidgetItem* item) { + return self->itemBelow(item); +} + +QModelIndex* QTreeWidget_IndexFromItem(const QTreeWidget* self, QTreeWidgetItem* item) { + return new QModelIndex(self->indexFromItem(item)); +} + +QTreeWidgetItem* QTreeWidget_ItemFromIndex(const QTreeWidget* self, QModelIndex* index) { + return self->itemFromIndex(*index); +} + +void QTreeWidget_SetSelectionModel(QTreeWidget* self, QItemSelectionModel* selectionModel) { + self->setSelectionModel(selectionModel); +} + +void QTreeWidget_ScrollToItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->scrollToItem(item); +} + +void QTreeWidget_ExpandItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->expandItem(item); +} + +void QTreeWidget_CollapseItem(QTreeWidget* self, QTreeWidgetItem* item) { + self->collapseItem(item); +} + +void QTreeWidget_Clear(QTreeWidget* self) { + self->clear(); +} + +void QTreeWidget_ItemPressed(QTreeWidget* self, QTreeWidgetItem* item, int column) { + self->itemPressed(item, static_cast(column)); +} + +void QTreeWidget_connect_ItemPressed(QTreeWidget* self, intptr_t slot) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemPressed), self, [=](QTreeWidgetItem* item, int column) { + QTreeWidgetItem* sigval1 = item; + int sigval2 = column; + miqt_exec_callback_QTreeWidget_ItemPressed(slot, sigval1, sigval2); + }); +} + +void QTreeWidget_ItemClicked(QTreeWidget* self, QTreeWidgetItem* item, int column) { + self->itemClicked(item, static_cast(column)); +} + +void QTreeWidget_connect_ItemClicked(QTreeWidget* self, intptr_t slot) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemClicked), self, [=](QTreeWidgetItem* item, int column) { + QTreeWidgetItem* sigval1 = item; + int sigval2 = column; + miqt_exec_callback_QTreeWidget_ItemClicked(slot, sigval1, sigval2); + }); +} void QTreeWidget_ItemDoubleClicked(QTreeWidget* self, QTreeWidgetItem* item, int column) { self->itemDoubleClicked(item, static_cast(column)); } void QTreeWidget_connect_ItemDoubleClicked(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemDoubleClicked), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemDoubleClicked), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemDoubleClicked(slot, sigval1, sigval2); @@ -709,7 +2135,7 @@ void QTreeWidget_ItemActivated(QTreeWidget* self, QTreeWidgetItem* item, int col } void QTreeWidget_connect_ItemActivated(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemActivated), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemActivated), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemActivated(slot, sigval1, sigval2); @@ -721,7 +2147,7 @@ void QTreeWidget_ItemEntered(QTreeWidget* self, QTreeWidgetItem* item, int colum } void QTreeWidget_connect_ItemEntered(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemEntered), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemEntered), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemEntered(slot, sigval1, sigval2); @@ -733,7 +2159,7 @@ void QTreeWidget_ItemChanged(QTreeWidget* self, QTreeWidgetItem* item, int colum } void QTreeWidget_connect_ItemChanged(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemChanged), self, [=](QTreeWidgetItem* item, int column) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemChanged), self, [=](QTreeWidgetItem* item, int column) { QTreeWidgetItem* sigval1 = item; int sigval2 = column; miqt_exec_callback_QTreeWidget_ItemChanged(slot, sigval1, sigval2); @@ -745,7 +2171,7 @@ void QTreeWidget_ItemExpanded(QTreeWidget* self, QTreeWidgetItem* item) { } void QTreeWidget_connect_ItemExpanded(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemExpanded), self, [=](QTreeWidgetItem* item) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemExpanded), self, [=](QTreeWidgetItem* item) { QTreeWidgetItem* sigval1 = item; miqt_exec_callback_QTreeWidget_ItemExpanded(slot, sigval1); }); @@ -756,7 +2182,7 @@ void QTreeWidget_ItemCollapsed(QTreeWidget* self, QTreeWidgetItem* item) { } void QTreeWidget_connect_ItemCollapsed(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemCollapsed), self, [=](QTreeWidgetItem* item) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemCollapsed), self, [=](QTreeWidgetItem* item) { QTreeWidgetItem* sigval1 = item; miqt_exec_callback_QTreeWidget_ItemCollapsed(slot, sigval1); }); @@ -767,7 +2193,7 @@ void QTreeWidget_CurrentItemChanged(QTreeWidget* self, QTreeWidgetItem* current, } void QTreeWidget_connect_CurrentItemChanged(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::currentItemChanged), self, [=](QTreeWidgetItem* current, QTreeWidgetItem* previous) { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::currentItemChanged), self, [=](QTreeWidgetItem* current, QTreeWidgetItem* previous) { QTreeWidgetItem* sigval1 = current; QTreeWidgetItem* sigval2 = previous; miqt_exec_callback_QTreeWidget_CurrentItemChanged(slot, sigval1, sigval2); @@ -779,7 +2205,7 @@ void QTreeWidget_ItemSelectionChanged(QTreeWidget* self) { } void QTreeWidget_connect_ItemSelectionChanged(QTreeWidget* self, intptr_t slot) { - QTreeWidget::connect(self, static_cast(&QTreeWidget::itemSelectionChanged), self, [=]() { + MiqtVirtualQTreeWidget::connect(self, static_cast(&QTreeWidget::itemSelectionChanged), self, [=]() { miqt_exec_callback_QTreeWidget_ItemSelectionChanged(slot); }); } @@ -844,7 +2270,355 @@ void QTreeWidget_ScrollToItem2(QTreeWidget* self, QTreeWidgetItem* item, int hin self->scrollToItem(item, static_cast(hint)); } -void QTreeWidget_Delete(QTreeWidget* self) { - delete self; +void QTreeWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SetSelectionModel = slot; +} + +void QTreeWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QTreeWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__Event = slot; +} + +bool QTreeWidget_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_Event(e); +} + +void QTreeWidget_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QTreeWidget_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_MimeTypes(); +} + +void QTreeWidget_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MimeData = slot; +} + +QMimeData* QTreeWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTreeWidgetItem* */ items) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_MimeData(items); +} + +void QTreeWidget_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DropMimeData = slot; +} + +bool QTreeWidget_virtualbase_DropMimeData(void* self, QTreeWidgetItem* parent, int index, QMimeData* data, int action) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DropMimeData(parent, index, data, action); +} + +void QTreeWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SupportedDropActions = slot; +} + +int QTreeWidget_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_SupportedDropActions(); +} + +void QTreeWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DropEvent = slot; +} + +void QTreeWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QTreeWidget_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SetRootIndex = slot; +} + +void QTreeWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetRootIndex(index); +} + +void QTreeWidget_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__KeyboardSearch = slot; +} + +void QTreeWidget_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QTreeWidget_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VisualRect = slot; +} + +QRect* QTreeWidget_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_VisualRect(index); +} + +void QTreeWidget_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ScrollTo = slot; +} + +void QTreeWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QTreeWidget_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QTreeWidget_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_IndexAt(p); +} + +void QTreeWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DoItemsLayout = slot; +} + +void QTreeWidget_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DoItemsLayout(); +} + +void QTreeWidget_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__Reset = slot; +} + +void QTreeWidget_virtualbase_Reset(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_Reset(); +} + +void QTreeWidget_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DataChanged = slot; +} + +void QTreeWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QTreeWidget_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SelectAll = slot; +} + +void QTreeWidget_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SelectAll(); +} + +void QTreeWidget_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QTreeWidget_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QTreeWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ScrollContentsBy = slot; +} + +void QTreeWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QTreeWidget_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__RowsInserted = slot; +} + +void QTreeWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QTreeWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QTreeWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QTreeWidget_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QTreeWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QTreeWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__HorizontalOffset = slot; +} + +int QTreeWidget_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_HorizontalOffset(); +} + +void QTreeWidget_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VerticalOffset = slot; +} + +int QTreeWidget_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_VerticalOffset(); +} + +void QTreeWidget_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SetSelection = slot; +} + +void QTreeWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QTreeWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QTreeWidget_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_SelectedIndexes(); +} + +void QTreeWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QTreeWidget_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ChangeEvent(event); +} + +void QTreeWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__TimerEvent = slot; +} + +void QTreeWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_TimerEvent(event); +} + +void QTreeWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__PaintEvent = slot; +} + +void QTreeWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QTreeWidget_override_virtual_DrawRow(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DrawRow = slot; +} + +void QTreeWidget_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index) { + ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_DrawRow(painter, options, index); +} + +void QTreeWidget_override_virtual_DrawBranches(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DrawBranches = slot; +} + +void QTreeWidget_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index) { + ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_DrawBranches(painter, rect, index); +} + +void QTreeWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QTreeWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QTreeWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QTreeWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QTreeWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QTreeWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QTreeWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QTreeWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QTreeWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QTreeWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QTreeWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QTreeWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QTreeWidget_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ViewportEvent = slot; +} + +bool QTreeWidget_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_ViewportEvent(event); +} + +void QTreeWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__UpdateGeometries = slot; +} + +void QTreeWidget_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_UpdateGeometries(); +} + +void QTreeWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QTreeWidget_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QTreeWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SizeHintForColumn = slot; +} + +int QTreeWidget_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QTreeWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QTreeWidget_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QTreeWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__IsIndexHidden = slot; +} + +bool QTreeWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QTreeWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__CurrentChanged = slot; +} + +void QTreeWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QTreeWidget_Delete(QTreeWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtreewidget.go b/qt6/gen_qtreewidget.go index 853aa5bd..7c3f31c9 100644 --- a/qt6/gen_qtreewidget.go +++ b/qt6/gen_qtreewidget.go @@ -30,7 +30,8 @@ const ( ) type QTreeWidgetItem struct { - h *C.QTreeWidgetItem + h *C.QTreeWidgetItem + isSubclass bool } func (this *QTreeWidgetItem) cPointer() *C.QTreeWidgetItem { @@ -47,6 +48,7 @@ func (this *QTreeWidgetItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTreeWidgetItem constructs the type using only CGO pointers. func newQTreeWidgetItem(h *C.QTreeWidgetItem) *QTreeWidgetItem { if h == nil { return nil @@ -54,14 +56,23 @@ func newQTreeWidgetItem(h *C.QTreeWidgetItem) *QTreeWidgetItem { return &QTreeWidgetItem{h: h} } +// UnsafeNewQTreeWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItem(h unsafe.Pointer) *QTreeWidgetItem { - return newQTreeWidgetItem((*C.QTreeWidgetItem)(h)) + if h == nil { + return nil + } + + return &QTreeWidgetItem{h: (*C.QTreeWidgetItem)(h)} } // NewQTreeWidgetItem constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem() *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new() - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new(&outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem2 constructs a new QTreeWidgetItem object. @@ -76,14 +87,22 @@ func NewQTreeWidgetItem2(strings []string) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new2(strings_ma) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new2(strings_ma, &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem3 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem3(treeview *QTreeWidget) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new3(treeview.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new3(treeview.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem4 constructs a new QTreeWidgetItem object. @@ -98,20 +117,32 @@ func NewQTreeWidgetItem4(treeview *QTreeWidget, strings []string) *QTreeWidgetIt strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma, &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem5 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem5(treeview *QTreeWidget, after *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem6 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem6(parent *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new6(parent.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new6(parent.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem7 constructs a new QTreeWidgetItem object. @@ -126,26 +157,42 @@ func NewQTreeWidgetItem7(parent *QTreeWidgetItem, strings []string) *QTreeWidget strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma, &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem8 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem8(parent *QTreeWidgetItem, after *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem9 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem9(other *QTreeWidgetItem) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new9(other.cPointer()) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new9(other.cPointer(), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem10 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem10(typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new10((C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new10((C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem11 constructs a new QTreeWidgetItem object. @@ -160,14 +207,22 @@ func NewQTreeWidgetItem11(strings []string, typeVal int) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem12 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem12(treeview *QTreeWidget, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem13 constructs a new QTreeWidgetItem object. @@ -182,20 +237,32 @@ func NewQTreeWidgetItem13(treeview *QTreeWidget, strings []string, typeVal int) strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem14 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem14(treeview *QTreeWidget, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem15 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem15(parent *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem16 constructs a new QTreeWidgetItem object. @@ -210,14 +277,22 @@ func NewQTreeWidgetItem16(parent *QTreeWidgetItem, strings []string, typeVal int strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - ret := C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } // NewQTreeWidgetItem17 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem17(parent *QTreeWidgetItem, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - ret := C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal)) - return newQTreeWidgetItem(ret) + var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil + + C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret.isSubclass = true + return ret } func (this *QTreeWidgetItem) Clone() *QTreeWidgetItem { @@ -225,7 +300,7 @@ func (this *QTreeWidgetItem) Clone() *QTreeWidgetItem { } func (this *QTreeWidgetItem) TreeWidget() *QTreeWidget { - return UnsafeNewQTreeWidget(unsafe.Pointer(C.QTreeWidgetItem_TreeWidget(this.h))) + return UnsafeNewQTreeWidget(unsafe.Pointer(C.QTreeWidgetItem_TreeWidget(this.h)), nil, nil, nil, nil, nil, nil, nil) } func (this *QTreeWidgetItem) SetSelected(selectVal bool) { @@ -524,9 +599,158 @@ func (this *QTreeWidgetItem) SortChildren(column int, order SortOrder) { C.QTreeWidgetItem_SortChildren(this.h, (C.int)(column), (C.int)(order)) } +func (this *QTreeWidgetItem) callVirtualBase_Clone() *QTreeWidgetItem { + + return UnsafeNewQTreeWidgetItem(unsafe.Pointer(C.QTreeWidgetItem_virtualbase_Clone(unsafe.Pointer(this.h)))) +} +func (this *QTreeWidgetItem) OnClone(slot func(super func() *QTreeWidgetItem) *QTreeWidgetItem) { + C.QTreeWidgetItem_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Clone +func miqt_exec_callback_QTreeWidgetItem_Clone(self *C.QTreeWidgetItem, cb C.intptr_t) *C.QTreeWidgetItem { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTreeWidgetItem) *QTreeWidgetItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Clone) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidgetItem) callVirtualBase_Data(column int, role int) *QVariant { + + _ret := C.QTreeWidgetItem_virtualbase_Data(unsafe.Pointer(this.h), (C.int)(column), (C.int)(role)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidgetItem) OnData(slot func(super func(column int, role int) *QVariant, column int, role int) *QVariant) { + C.QTreeWidgetItem_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Data +func miqt_exec_callback_QTreeWidgetItem_Data(self *C.QTreeWidgetItem, cb C.intptr_t, column C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, role int) *QVariant, column int, role int) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(role) + + virtualReturn := gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidgetItem) callVirtualBase_SetData(column int, role int, value *QVariant) { + + C.QTreeWidgetItem_virtualbase_SetData(unsafe.Pointer(this.h), (C.int)(column), (C.int)(role), value.cPointer()) + +} +func (this *QTreeWidgetItem) OnSetData(slot func(super func(column int, role int, value *QVariant), column int, role int, value *QVariant)) { + C.QTreeWidgetItem_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_SetData +func miqt_exec_callback_QTreeWidgetItem_SetData(self *C.QTreeWidgetItem, cb C.intptr_t, column C.int, role C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, role int, value *QVariant), column int, role int, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(role) + + slotval3 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidgetItem) callVirtualBase_OperatorLesser(other *QTreeWidgetItem) bool { + + return (bool)(C.QTreeWidgetItem_virtualbase_OperatorLesser(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QTreeWidgetItem) OnOperatorLesser(slot func(super func(other *QTreeWidgetItem) bool, other *QTreeWidgetItem) bool) { + C.QTreeWidgetItem_override_virtual_OperatorLesser(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_OperatorLesser +func miqt_exec_callback_QTreeWidgetItem_OperatorLesser(self *C.QTreeWidgetItem, cb C.intptr_t, other *C.QTreeWidgetItem) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QTreeWidgetItem) bool, other *QTreeWidgetItem) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTreeWidgetItem(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_OperatorLesser, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidgetItem) callVirtualBase_Read(in *QDataStream) { + + C.QTreeWidgetItem_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer()) + +} +func (this *QTreeWidgetItem) OnRead(slot func(super func(in *QDataStream), in *QDataStream)) { + C.QTreeWidgetItem_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Read +func miqt_exec_callback_QTreeWidgetItem_Read(self *C.QTreeWidgetItem, cb C.intptr_t, in *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream), in *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in), nil) + + gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Read, slotval1) + +} + +func (this *QTreeWidgetItem) callVirtualBase_Write(out *QDataStream) { + + C.QTreeWidgetItem_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer()) + +} +func (this *QTreeWidgetItem) OnWrite(slot func(super func(out *QDataStream), out *QDataStream)) { + C.QTreeWidgetItem_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidgetItem_Write +func miqt_exec_callback_QTreeWidgetItem_Write(self *C.QTreeWidgetItem, cb C.intptr_t, out *C.QDataStream) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream), out *QDataStream)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out), nil) + + gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Write, slotval1) + +} + // Delete this object from C++ memory. func (this *QTreeWidgetItem) Delete() { - C.QTreeWidgetItem_Delete(this.h) + C.QTreeWidgetItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -539,7 +763,8 @@ func (this *QTreeWidgetItem) GoGC() { } type QTreeWidget struct { - h *C.QTreeWidget + h *C.QTreeWidget + isSubclass bool *QTreeView } @@ -557,27 +782,57 @@ func (this *QTreeWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTreeWidget(h *C.QTreeWidget) *QTreeWidget { +// newQTreeWidget constructs the type using only CGO pointers. +func newQTreeWidget(h *C.QTreeWidget, h_QTreeView *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeWidget { if h == nil { return nil } - return &QTreeWidget{h: h, QTreeView: UnsafeNewQTreeView(unsafe.Pointer(h))} + return &QTreeWidget{h: h, + QTreeView: newQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQTreeWidget(h unsafe.Pointer) *QTreeWidget { - return newQTreeWidget((*C.QTreeWidget)(h)) +// UnsafeNewQTreeWidget constructs the type using only unsafe pointers. +func UnsafeNewQTreeWidget(h unsafe.Pointer, h_QTreeView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeWidget { + if h == nil { + return nil + } + + return &QTreeWidget{h: (*C.QTreeWidget)(h), + QTreeView: UnsafeNewQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQTreeWidget constructs a new QTreeWidget object. func NewQTreeWidget(parent *QWidget) *QTreeWidget { - ret := C.QTreeWidget_new(parent.cPointer()) - return newQTreeWidget(ret) + var outptr_QTreeWidget *C.QTreeWidget = nil + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeWidget_new(parent.cPointer(), &outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQTreeWidget2 constructs a new QTreeWidget object. func NewQTreeWidget2() *QTreeWidget { - ret := C.QTreeWidget_new2() - return newQTreeWidget(ret) + var outptr_QTreeWidget *C.QTreeWidget = nil + var outptr_QTreeView *C.QTreeView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QTreeWidget_new2(&outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QTreeWidget) MetaObject() *QMetaObject { @@ -745,7 +1000,7 @@ func (this *QTreeWidget) IsPersistentEditorOpen(item *QTreeWidgetItem) bool { } func (this *QTreeWidget) ItemWidget(item *QTreeWidgetItem, column int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column))), nil, nil) } func (this *QTreeWidget) SetItemWidget(item *QTreeWidgetItem, column int, widget *QWidget) { @@ -1086,9 +1341,1097 @@ func (this *QTreeWidget) ScrollToItem2(item *QTreeWidgetItem, hint QAbstractItem C.QTreeWidget_ScrollToItem2(this.h, item.cPointer(), (C.int)(hint)) } +func (this *QTreeWidget) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QTreeWidget_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QTreeWidget) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QTreeWidget_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SetSelectionModel +func miqt_exec_callback_QTreeWidget_SetSelectionModel(self *C.QTreeWidget, cb C.intptr_t, selectionModel *C.QItemSelectionModel) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelectionModel(unsafe.Pointer(selectionModel), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QTreeWidget_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QTreeWidget) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QTreeWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_Event +func miqt_exec_callback_QTreeWidget_Event(self *C.QTreeWidget, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QTreeWidget_virtualbase_MimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QTreeWidget) OnMimeTypes(slot func(super func() []string) []string) { + C.QTreeWidget_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MimeTypes +func miqt_exec_callback_QTreeWidget_MimeTypes(self *C.QTreeWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTreeWidget) callVirtualBase_MimeData(items []*QTreeWidgetItem) *QMimeData { + items_CArray := (*[0xffff]*C.QTreeWidgetItem)(C.malloc(C.size_t(8 * len(items)))) + defer C.free(unsafe.Pointer(items_CArray)) + for i := range items { + items_CArray[i] = items[i].cPointer() + } + items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} + + return UnsafeNewQMimeData(unsafe.Pointer(C.QTreeWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)), nil) +} +func (this *QTreeWidget) OnMimeData(slot func(super func(items []*QTreeWidgetItem) *QMimeData, items []*QTreeWidgetItem) *QMimeData) { + C.QTreeWidget_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MimeData +func miqt_exec_callback_QTreeWidget_MimeData(self *C.QTreeWidget, cb C.intptr_t, items C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(items []*QTreeWidgetItem) *QMimeData, items []*QTreeWidgetItem) *QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var items_ma C.struct_miqt_array = items + items_ret := make([]*QTreeWidgetItem, int(items_ma.len)) + items_outCast := (*[0xffff]*C.QTreeWidgetItem)(unsafe.Pointer(items_ma.data)) // hey ya + for i := 0; i < int(items_ma.len); i++ { + items_ret[i] = UnsafeNewQTreeWidgetItem(unsafe.Pointer(items_outCast[i])) + } + slotval1 := items_ret + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_DropMimeData(parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool { + + return (bool)(C.QTreeWidget_virtualbase_DropMimeData(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(index), data.cPointer(), (C.int)(action))) + +} +func (this *QTreeWidget) OnDropMimeData(slot func(super func(parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool, parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool) { + C.QTreeWidget_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DropMimeData +func miqt_exec_callback_QTreeWidget_DropMimeData(self *C.QTreeWidget, cb C.intptr_t, parent *C.QTreeWidgetItem, index C.int, data *C.QMimeData, action C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool, parent *QTreeWidgetItem, index int, data *QMimeData, action DropAction) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTreeWidgetItem(unsafe.Pointer(parent)) + slotval2 := (int)(index) + + slotval3 := UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval4 := (DropAction)(action) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QTreeWidget_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QTreeWidget) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QTreeWidget_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SupportedDropActions +func miqt_exec_callback_QTreeWidget_SupportedDropActions(self *C.QTreeWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() DropAction) DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QTreeWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QTreeWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DropEvent +func miqt_exec_callback_QTreeWidget_DropEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QTreeWidget_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QTreeWidget) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QTreeWidget_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SetRootIndex +func miqt_exec_callback_QTreeWidget_SetRootIndex(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_KeyboardSearch(search string) { + search_ms := C.struct_miqt_string{} + search_ms.data = C.CString(search) + search_ms.len = C.size_t(len(search)) + defer C.free(unsafe.Pointer(search_ms.data)) + + C.QTreeWidget_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QTreeWidget) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QTreeWidget_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_KeyboardSearch +func miqt_exec_callback_QTreeWidget_KeyboardSearch(self *C.QTreeWidget, cb C.intptr_t, search C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(search string), search string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var search_ms C.struct_miqt_string = search + search_ret := C.GoStringN(search_ms.data, C.int(int64(search_ms.len))) + C.free(unsafe.Pointer(search_ms.data)) + slotval1 := search_ret + + gofunc((&QTreeWidget{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QTreeWidget_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QTreeWidget_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VisualRect +func miqt_exec_callback_QTreeWidget_VisualRect(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QTreeWidget_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QTreeWidget) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QTreeWidget_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ScrollTo +func miqt_exec_callback_QTreeWidget_ScrollTo(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QTreeWidget) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QTreeWidget_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QTreeWidget_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_IndexAt +func miqt_exec_callback_QTreeWidget_IndexAt(self *C.QTreeWidget, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_DoItemsLayout() { + + C.QTreeWidget_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnDoItemsLayout(slot func(super func())) { + C.QTreeWidget_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DoItemsLayout +func miqt_exec_callback_QTreeWidget_DoItemsLayout(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QTreeWidget) callVirtualBase_Reset() { + + C.QTreeWidget_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnReset(slot func(super func())) { + C.QTreeWidget_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_Reset +func miqt_exec_callback_QTreeWidget_Reset(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_Reset) + +} + +func (this *QTreeWidget) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QTreeWidget_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QTreeWidget) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QTreeWidget_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DataChanged +func miqt_exec_callback_QTreeWidget_DataChanged(self *C.QTreeWidget, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_SelectAll() { + + C.QTreeWidget_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnSelectAll(slot func(super func())) { + C.QTreeWidget_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SelectAll +func miqt_exec_callback_QTreeWidget_SelectAll(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QTreeWidget) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QTreeWidget_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QTreeWidget) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QTreeWidget_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VerticalScrollbarValueChanged +func miqt_exec_callback_QTreeWidget_VerticalScrollbarValueChanged(self *C.QTreeWidget, cb C.intptr_t, value C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value int), value int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(value) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QTreeWidget_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QTreeWidget) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QTreeWidget_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ScrollContentsBy +func miqt_exec_callback_QTreeWidget_ScrollContentsBy(self *C.QTreeWidget, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QTreeWidget) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QTreeWidget_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeWidget) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeWidget_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_RowsInserted +func miqt_exec_callback_QTreeWidget_RowsInserted(self *C.QTreeWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QTreeWidget_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QTreeWidget) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QTreeWidget_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_RowsAboutToBeRemoved +func miqt_exec_callback_QTreeWidget_RowsAboutToBeRemoved(self *C.QTreeWidget, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QTreeWidget_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QTreeWidget_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MoveCursor +func miqt_exec_callback_QTreeWidget_MoveCursor(self *C.QTreeWidget, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QTreeWidget_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeWidget) OnHorizontalOffset(slot func(super func() int) int) { + C.QTreeWidget_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_HorizontalOffset +func miqt_exec_callback_QTreeWidget_HorizontalOffset(self *C.QTreeWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_VerticalOffset() int { + + return (int)(C.QTreeWidget_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QTreeWidget) OnVerticalOffset(slot func(super func() int) int) { + C.QTreeWidget_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VerticalOffset +func miqt_exec_callback_QTreeWidget_VerticalOffset(self *C.QTreeWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QTreeWidget_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QTreeWidget) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QTreeWidget_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SetSelection +func miqt_exec_callback_QTreeWidget_SetSelection(self *C.QTreeWidget, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QTreeWidget) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QTreeWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QTreeWidget) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QTreeWidget_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SelectedIndexes +func miqt_exec_callback_QTreeWidget_SelectedIndexes(self *C.QTreeWidget, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QTreeWidget) callVirtualBase_ChangeEvent(event *QEvent) { + + C.QTreeWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnChangeEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QTreeWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ChangeEvent +func miqt_exec_callback_QTreeWidget_ChangeEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QTreeWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QTreeWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_TimerEvent +func miqt_exec_callback_QTreeWidget_TimerEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QTreeWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QTreeWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_PaintEvent +func miqt_exec_callback_QTreeWidget_PaintEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_DrawRow(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex) { + + C.QTreeWidget_virtualbase_DrawRow(unsafe.Pointer(this.h), painter.cPointer(), options.cPointer(), index.cPointer()) + +} +func (this *QTreeWidget) OnDrawRow(slot func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) { + C.QTreeWidget_override_virtual_DrawRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DrawRow +func miqt_exec_callback_QTreeWidget_DrawRow(self *C.QTreeWidget, cb C.intptr_t, painter *C.QPainter, options *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex), painter *QPainter, options *QStyleOptionViewItem, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(options), nil) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DrawRow, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_DrawBranches(painter *QPainter, rect *QRect, index *QModelIndex) { + + C.QTreeWidget_virtualbase_DrawBranches(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), index.cPointer()) + +} +func (this *QTreeWidget) OnDrawBranches(slot func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) { + C.QTreeWidget_override_virtual_DrawBranches(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DrawBranches +func miqt_exec_callback_QTreeWidget_DrawBranches(self *C.QTreeWidget, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter, rect *QRect, index *QModelIndex), painter *QPainter, rect *QRect, index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval3 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DrawBranches, slotval1, slotval2, slotval3) + +} + +func (this *QTreeWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MousePressEvent +func miqt_exec_callback_QTreeWidget_MousePressEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MouseReleaseEvent +func miqt_exec_callback_QTreeWidget_MouseReleaseEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent +func miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QTreeWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QTreeWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_MouseMoveEvent +func miqt_exec_callback_QTreeWidget_MouseMoveEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QTreeWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QTreeWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_KeyPressEvent +func miqt_exec_callback_QTreeWidget_KeyPressEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QTreeWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QTreeWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QTreeWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_DragMoveEvent +func miqt_exec_callback_QTreeWidget_DragMoveEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QTreeWidget_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QTreeWidget) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QTreeWidget_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ViewportEvent +func miqt_exec_callback_QTreeWidget_ViewportEvent(self *C.QTreeWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_UpdateGeometries() { + + C.QTreeWidget_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QTreeWidget) OnUpdateGeometries(slot func(super func())) { + C.QTreeWidget_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_UpdateGeometries +func miqt_exec_callback_QTreeWidget_UpdateGeometries(self *C.QTreeWidget, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTreeWidget{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QTreeWidget) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QTreeWidget_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QTreeWidget_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_ViewportSizeHint +func miqt_exec_callback_QTreeWidget_ViewportSizeHint(self *C.QTreeWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QTreeWidget) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QTreeWidget_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QTreeWidget) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QTreeWidget_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SizeHintForColumn +func miqt_exec_callback_QTreeWidget_SizeHintForColumn(self *C.QTreeWidget, cb C.intptr_t, column C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int) int, column int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QTreeWidget_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QTreeWidget) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QTreeWidget_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_HorizontalScrollbarAction +func miqt_exec_callback_QTreeWidget_HorizontalScrollbarAction(self *C.QTreeWidget, cb C.intptr_t, action C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action int), action int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(action) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QTreeWidget) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QTreeWidget_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QTreeWidget) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QTreeWidget_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_IsIndexHidden +func miqt_exec_callback_QTreeWidget_IsIndexHidden(self *C.QTreeWidget, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTreeWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QTreeWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QTreeWidget) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QTreeWidget_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_CurrentChanged +func miqt_exec_callback_QTreeWidget_CurrentChanged(self *C.QTreeWidget, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QTreeWidget) Delete() { - C.QTreeWidget_Delete(this.h) + C.QTreeWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtreewidget.h b/qt6/gen_qtreewidget.h index 587e9667..81b271d9 100644 --- a/qt6/gen_qtreewidget.h +++ b/qt6/gen_qtreewidget.h @@ -15,54 +15,86 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; class QBrush; class QDataStream; +class QDragMoveEvent; +class QDropEvent; +class QEvent; class QFont; +class QFrame; class QIcon; class QItemSelectionModel; +class QKeyEvent; class QMetaObject; +class QMimeData; class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPainter; class QPoint; class QRect; class QSize; +class QStyleOptionViewItem; +class QTimerEvent; +class QTreeView; class QTreeWidget; class QTreeWidgetItem; class QVariant; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; typedef struct QBrush QBrush; typedef struct QDataStream QDataStream; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; typedef struct QItemSelectionModel QItemSelectionModel; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QTreeView QTreeView; typedef struct QTreeWidget QTreeWidget; typedef struct QTreeWidgetItem QTreeWidgetItem; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -QTreeWidgetItem* QTreeWidgetItem_new(); -QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings); -QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview); -QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings); -QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after); -QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent); -QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings); -QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after); -QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other); -QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal); -QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal); +void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self); QTreeWidget* QTreeWidgetItem_TreeWidget(const QTreeWidgetItem* self); void QTreeWidgetItem_SetSelected(QTreeWidgetItem* self, bool selectVal); @@ -123,10 +155,22 @@ void QTreeWidgetItem_InsertChildren(QTreeWidgetItem* self, int index, struct miq struct miqt_array /* of QTreeWidgetItem* */ QTreeWidgetItem_TakeChildren(QTreeWidgetItem* self); int QTreeWidgetItem_Type(const QTreeWidgetItem* self); void QTreeWidgetItem_SortChildren(QTreeWidgetItem* self, int column, int order); -void QTreeWidgetItem_Delete(QTreeWidgetItem* self); +void QTreeWidgetItem_override_virtual_Clone(void* self, intptr_t slot); +QTreeWidgetItem* QTreeWidgetItem_virtualbase_Clone(const void* self); +void QTreeWidgetItem_override_virtual_Data(void* self, intptr_t slot); +QVariant* QTreeWidgetItem_virtualbase_Data(const void* self, int column, int role); +void QTreeWidgetItem_override_virtual_SetData(void* self, intptr_t slot); +void QTreeWidgetItem_virtualbase_SetData(void* self, int column, int role, QVariant* value); +void QTreeWidgetItem_override_virtual_OperatorLesser(void* self, intptr_t slot); +bool QTreeWidgetItem_virtualbase_OperatorLesser(const void* self, QTreeWidgetItem* other); +void QTreeWidgetItem_override_virtual_Read(void* self, intptr_t slot); +void QTreeWidgetItem_virtualbase_Read(void* self, QDataStream* in); +void QTreeWidgetItem_override_virtual_Write(void* self, intptr_t slot); +void QTreeWidgetItem_virtualbase_Write(const void* self, QDataStream* out); +void QTreeWidgetItem_Delete(QTreeWidgetItem* self, bool isSubclass); -QTreeWidget* QTreeWidget_new(QWidget* parent); -QTreeWidget* QTreeWidget_new2(); +void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self); void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1); struct miqt_string QTreeWidget_Tr(const char* s); @@ -193,6 +237,12 @@ void QTreeWidget_CurrentItemChanged(QTreeWidget* self, QTreeWidgetItem* current, void QTreeWidget_connect_CurrentItemChanged(QTreeWidget* self, intptr_t slot); void QTreeWidget_ItemSelectionChanged(QTreeWidget* self); void QTreeWidget_connect_ItemSelectionChanged(QTreeWidget* self, intptr_t slot); +bool QTreeWidget_Event(QTreeWidget* self, QEvent* e); +struct miqt_array /* of struct miqt_string */ QTreeWidget_MimeTypes(const QTreeWidget* self); +QMimeData* QTreeWidget_MimeData(const QTreeWidget* self, struct miqt_array /* of QTreeWidgetItem* */ items); +bool QTreeWidget_DropMimeData(QTreeWidget* self, QTreeWidgetItem* parent, int index, QMimeData* data, int action); +int QTreeWidget_SupportedDropActions(const QTreeWidget* self); +void QTreeWidget_DropEvent(QTreeWidget* self, QDropEvent* event); struct miqt_string QTreeWidget_Tr2(const char* s, const char* c); struct miqt_string QTreeWidget_Tr3(const char* s, const char* c, int n); void QTreeWidget_EditItem2(QTreeWidget* self, QTreeWidgetItem* item, int column); @@ -202,7 +252,93 @@ bool QTreeWidget_IsPersistentEditorOpen2(const QTreeWidget* self, QTreeWidgetIte struct miqt_array /* of QTreeWidgetItem* */ QTreeWidget_FindItems3(const QTreeWidget* self, struct miqt_string text, int flags, int column); QModelIndex* QTreeWidget_IndexFromItem2(const QTreeWidget* self, QTreeWidgetItem* item, int column); void QTreeWidget_ScrollToItem2(QTreeWidget* self, QTreeWidgetItem* item, int hint); -void QTreeWidget_Delete(QTreeWidget* self); +void QTreeWidget_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QTreeWidget_override_virtual_Event(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_Event(void* self, QEvent* e); +void QTreeWidget_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QTreeWidget_virtualbase_MimeTypes(const void* self); +void QTreeWidget_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QTreeWidget_virtualbase_MimeData(const void* self, struct miqt_array /* of QTreeWidgetItem* */ items); +void QTreeWidget_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_DropMimeData(void* self, QTreeWidgetItem* parent, int index, QMimeData* data, int action); +void QTreeWidget_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QTreeWidget_virtualbase_SupportedDropActions(const void* self); +void QTreeWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QTreeWidget_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QTreeWidget_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QTreeWidget_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QTreeWidget_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QTreeWidget_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QTreeWidget_override_virtual_ScrollTo(void* self, intptr_t slot); +void QTreeWidget_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QTreeWidget_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QTreeWidget_virtualbase_IndexAt(const void* self, QPoint* p); +void QTreeWidget_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DoItemsLayout(void* self); +void QTreeWidget_override_virtual_Reset(void* self, intptr_t slot); +void QTreeWidget_virtualbase_Reset(void* self); +void QTreeWidget_override_virtual_DataChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QTreeWidget_override_virtual_SelectAll(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SelectAll(void* self); +void QTreeWidget_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QTreeWidget_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QTreeWidget_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QTreeWidget_override_virtual_RowsInserted(void* self, intptr_t slot); +void QTreeWidget_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QTreeWidget_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QTreeWidget_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QTreeWidget_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QTreeWidget_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QTreeWidget_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QTreeWidget_virtualbase_HorizontalOffset(const void* self); +void QTreeWidget_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QTreeWidget_virtualbase_VerticalOffset(const void* self); +void QTreeWidget_override_virtual_SetSelection(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QTreeWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QTreeWidget_virtualbase_SelectedIndexes(const void* self); +void QTreeWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_ChangeEvent(void* self, QEvent* event); +void QTreeWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTreeWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QTreeWidget_override_virtual_DrawRow(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DrawRow(const void* self, QPainter* painter, QStyleOptionViewItem* options, QModelIndex* index); +void QTreeWidget_override_virtual_DrawBranches(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DrawBranches(const void* self, QPainter* painter, QRect* rect, QModelIndex* index); +void QTreeWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QTreeWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QTreeWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QTreeWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QTreeWidget_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_ViewportEvent(void* self, QEvent* event); +void QTreeWidget_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QTreeWidget_virtualbase_UpdateGeometries(void* self); +void QTreeWidget_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QTreeWidget_virtualbase_ViewportSizeHint(const void* self); +void QTreeWidget_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QTreeWidget_virtualbase_SizeHintForColumn(const void* self, int column); +void QTreeWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QTreeWidget_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QTreeWidget_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QTreeWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QTreeWidget_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QTreeWidget_Delete(QTreeWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qtreewidgetitemiterator.cpp b/qt6/gen_qtreewidgetitemiterator.cpp index 03cda8d7..e0f1499c 100644 --- a/qt6/gen_qtreewidgetitemiterator.cpp +++ b/qt6/gen_qtreewidgetitemiterator.cpp @@ -5,24 +5,29 @@ #include "gen_qtreewidgetitemiterator.h" #include "_cgo_export.h" -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it) { - return new QTreeWidgetItemIterator(*it); +void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(*it); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget) { - return new QTreeWidgetItemIterator(widget); +void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item) { - return new QTreeWidgetItemIterator(item); +void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags) { - return new QTreeWidgetItemIterator(widget, static_cast(flags)); +void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget, static_cast(flags)); + *outptr_QTreeWidgetItemIterator = ret; } -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags) { - return new QTreeWidgetItemIterator(item, static_cast(flags)); +void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { + QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item, static_cast(flags)); + *outptr_QTreeWidgetItemIterator = ret; } void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it) { @@ -65,7 +70,11 @@ QTreeWidgetItem* QTreeWidgetItemIterator_OperatorMultiply(const QTreeWidgetItemI return self->operator*(); } -void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self) { - delete self; +void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qtreewidgetitemiterator.go b/qt6/gen_qtreewidgetitemiterator.go index 622f47e7..196f1973 100644 --- a/qt6/gen_qtreewidgetitemiterator.go +++ b/qt6/gen_qtreewidgetitemiterator.go @@ -39,7 +39,8 @@ const ( ) type QTreeWidgetItemIterator struct { - h *C.QTreeWidgetItemIterator + h *C.QTreeWidgetItemIterator + isSubclass bool } func (this *QTreeWidgetItemIterator) cPointer() *C.QTreeWidgetItemIterator { @@ -56,6 +57,7 @@ func (this *QTreeWidgetItemIterator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTreeWidgetItemIterator constructs the type using only CGO pointers. func newQTreeWidgetItemIterator(h *C.QTreeWidgetItemIterator) *QTreeWidgetItemIterator { if h == nil { return nil @@ -63,38 +65,63 @@ func newQTreeWidgetItemIterator(h *C.QTreeWidgetItemIterator) *QTreeWidgetItemIt return &QTreeWidgetItemIterator{h: h} } +// UnsafeNewQTreeWidgetItemIterator constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItemIterator(h unsafe.Pointer) *QTreeWidgetItemIterator { - return newQTreeWidgetItemIterator((*C.QTreeWidgetItemIterator)(h)) + if h == nil { + return nil + } + + return &QTreeWidgetItemIterator{h: (*C.QTreeWidgetItemIterator)(h)} } // NewQTreeWidgetItemIterator constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator(it *QTreeWidgetItemIterator) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new(it.cPointer()) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new(it.cPointer(), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator2 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator2(widget *QTreeWidget) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new2(widget.cPointer()) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new2(widget.cPointer(), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator3 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator3(item *QTreeWidgetItem) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new3(item.cPointer()) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new3(item.cPointer(), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator4 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator4(widget *QTreeWidget, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags)) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } // NewQTreeWidgetItemIterator5 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator5(item *QTreeWidgetItem, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - ret := C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags)) - return newQTreeWidgetItemIterator(ret) + var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil + + C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret.isSubclass = true + return ret } func (this *QTreeWidgetItemIterator) OperatorAssign(it *QTreeWidgetItemIterator) { @@ -137,7 +164,7 @@ func (this *QTreeWidgetItemIterator) OperatorMultiply() *QTreeWidgetItem { // Delete this object from C++ memory. func (this *QTreeWidgetItemIterator) Delete() { - C.QTreeWidgetItemIterator_Delete(this.h) + C.QTreeWidgetItemIterator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qtreewidgetitemiterator.h b/qt6/gen_qtreewidgetitemiterator.h index 6be6c8b0..7eb33d94 100644 --- a/qt6/gen_qtreewidgetitemiterator.h +++ b/qt6/gen_qtreewidgetitemiterator.h @@ -24,11 +24,11 @@ typedef struct QTreeWidgetItem QTreeWidgetItem; typedef struct QTreeWidgetItemIterator QTreeWidgetItemIterator; #endif -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags); -QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags); +void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlus(QTreeWidgetItemIterator* self); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlusWithInt(QTreeWidgetItemIterator* self, int param1); @@ -37,7 +37,7 @@ QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorMinusMinus(QTreeWidgetI QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorMinusMinusWithInt(QTreeWidgetItemIterator* self, int param1); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorMinusAssign(QTreeWidgetItemIterator* self, int n); QTreeWidgetItem* QTreeWidgetItemIterator_OperatorMultiply(const QTreeWidgetItemIterator* self); -void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self); +void QTreeWidgetItemIterator_Delete(QTreeWidgetItemIterator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qundogroup.cpp b/qt6/gen_qundogroup.cpp index 60073037..3d31e5e0 100644 --- a/qt6/gen_qundogroup.cpp +++ b/qt6/gen_qundogroup.cpp @@ -1,22 +1,211 @@ #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qundogroup.h" #include "_cgo_export.h" -QUndoGroup* QUndoGroup_new() { - return new QUndoGroup(); +class MiqtVirtualQUndoGroup : public virtual QUndoGroup { +public: + + MiqtVirtualQUndoGroup(): QUndoGroup() {}; + MiqtVirtualQUndoGroup(QObject* parent): QUndoGroup(parent) {}; + + virtual ~MiqtVirtualQUndoGroup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QUndoGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QUndoGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QUndoGroup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QUndoGroup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QUndoGroup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QUndoGroup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QUndoGroup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QUndoGroup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QUndoGroup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QUndoGroup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QUndoGroup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QUndoGroup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QUndoGroup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QUndoGroup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QUndoGroup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QUndoGroup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoGroup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QUndoGroup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QUndoGroup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoGroup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QUndoGroup::disconnectNotify(*signal); + + } + +}; + +void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { + MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(); + *outptr_QUndoGroup = ret; + *outptr_QObject = static_cast(ret); } -QUndoGroup* QUndoGroup_new2(QObject* parent) { - return new QUndoGroup(parent); +void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { + MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(parent); + *outptr_QUndoGroup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self) { @@ -122,7 +311,7 @@ void QUndoGroup_ActiveStackChanged(QUndoGroup* self, QUndoStack* stack) { } void QUndoGroup_connect_ActiveStackChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::activeStackChanged), self, [=](QUndoStack* stack) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::activeStackChanged), self, [=](QUndoStack* stack) { QUndoStack* sigval1 = stack; miqt_exec_callback_QUndoGroup_ActiveStackChanged(slot, sigval1); }); @@ -133,7 +322,7 @@ void QUndoGroup_IndexChanged(QUndoGroup* self, int idx) { } void QUndoGroup_connect_IndexChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::indexChanged), self, [=](int idx) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::indexChanged), self, [=](int idx) { int sigval1 = idx; miqt_exec_callback_QUndoGroup_IndexChanged(slot, sigval1); }); @@ -144,7 +333,7 @@ void QUndoGroup_CleanChanged(QUndoGroup* self, bool clean) { } void QUndoGroup_connect_CleanChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::cleanChanged), self, [=](bool clean) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::cleanChanged), self, [=](bool clean) { bool sigval1 = clean; miqt_exec_callback_QUndoGroup_CleanChanged(slot, sigval1); }); @@ -155,7 +344,7 @@ void QUndoGroup_CanUndoChanged(QUndoGroup* self, bool canUndo) { } void QUndoGroup_connect_CanUndoChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::canUndoChanged), self, [=](bool canUndo) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::canUndoChanged), self, [=](bool canUndo) { bool sigval1 = canUndo; miqt_exec_callback_QUndoGroup_CanUndoChanged(slot, sigval1); }); @@ -166,7 +355,7 @@ void QUndoGroup_CanRedoChanged(QUndoGroup* self, bool canRedo) { } void QUndoGroup_connect_CanRedoChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::canRedoChanged), self, [=](bool canRedo) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::canRedoChanged), self, [=](bool canRedo) { bool sigval1 = canRedo; miqt_exec_callback_QUndoGroup_CanRedoChanged(slot, sigval1); }); @@ -178,7 +367,7 @@ void QUndoGroup_UndoTextChanged(QUndoGroup* self, struct miqt_string undoText) { } void QUndoGroup_connect_UndoTextChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::undoTextChanged), self, [=](const QString& undoText) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::undoTextChanged), self, [=](const QString& undoText) { const QString undoText_ret = undoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray undoText_b = undoText_ret.toUtf8(); @@ -197,7 +386,7 @@ void QUndoGroup_RedoTextChanged(QUndoGroup* self, struct miqt_string redoText) { } void QUndoGroup_connect_RedoTextChanged(QUndoGroup* self, intptr_t slot) { - QUndoGroup::connect(self, static_cast(&QUndoGroup::redoTextChanged), self, [=](const QString& redoText) { + MiqtVirtualQUndoGroup::connect(self, static_cast(&QUndoGroup::redoTextChanged), self, [=](const QString& redoText) { const QString redoText_ret = redoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray redoText_b = redoText_ret.toUtf8(); @@ -242,7 +431,67 @@ QAction* QUndoGroup_CreateRedoAction2(const QUndoGroup* self, QObject* parent, s return self->createRedoAction(parent, prefix_QString); } -void QUndoGroup_Delete(QUndoGroup* self) { - delete self; +void QUndoGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__Event = slot; +} + +bool QUndoGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_Event(event); +} + +void QUndoGroup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__EventFilter = slot; +} + +bool QUndoGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QUndoGroup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__TimerEvent = slot; +} + +void QUndoGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_TimerEvent(event); +} + +void QUndoGroup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__ChildEvent = slot; +} + +void QUndoGroup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_ChildEvent(event); +} + +void QUndoGroup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__CustomEvent = slot; +} + +void QUndoGroup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_CustomEvent(event); +} + +void QUndoGroup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__ConnectNotify = slot; +} + +void QUndoGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QUndoGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoGroup*)(self) )->handle__DisconnectNotify = slot; +} + +void QUndoGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoGroup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QUndoGroup_Delete(QUndoGroup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qundogroup.go b/qt6/gen_qundogroup.go index 6e4ba67b..6e1c7876 100644 --- a/qt6/gen_qundogroup.go +++ b/qt6/gen_qundogroup.go @@ -15,7 +15,8 @@ import ( ) type QUndoGroup struct { - h *C.QUndoGroup + h *C.QUndoGroup + isSubclass bool *QObject } @@ -33,27 +34,45 @@ func (this *QUndoGroup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUndoGroup(h *C.QUndoGroup) *QUndoGroup { +// newQUndoGroup constructs the type using only CGO pointers. +func newQUndoGroup(h *C.QUndoGroup, h_QObject *C.QObject) *QUndoGroup { if h == nil { return nil } - return &QUndoGroup{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QUndoGroup{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQUndoGroup(h unsafe.Pointer) *QUndoGroup { - return newQUndoGroup((*C.QUndoGroup)(h)) +// UnsafeNewQUndoGroup constructs the type using only unsafe pointers. +func UnsafeNewQUndoGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoGroup { + if h == nil { + return nil + } + + return &QUndoGroup{h: (*C.QUndoGroup)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQUndoGroup constructs a new QUndoGroup object. func NewQUndoGroup() *QUndoGroup { - ret := C.QUndoGroup_new() - return newQUndoGroup(ret) + var outptr_QUndoGroup *C.QUndoGroup = nil + var outptr_QObject *C.QObject = nil + + C.QUndoGroup_new(&outptr_QUndoGroup, &outptr_QObject) + ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQUndoGroup2 constructs a new QUndoGroup object. func NewQUndoGroup2(parent *QObject) *QUndoGroup { - ret := C.QUndoGroup_new2(parent.cPointer()) - return newQUndoGroup(ret) + var outptr_QUndoGroup *C.QUndoGroup = nil + var outptr_QObject *C.QObject = nil + + C.QUndoGroup_new2(parent.cPointer(), &outptr_QUndoGroup, &outptr_QObject) + ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QUndoGroup) MetaObject() *QMetaObject { @@ -88,21 +107,21 @@ func (this *QUndoGroup) Stacks() []*QUndoStack { _ret := make([]*QUndoStack, int(_ma.len)) _outCast := (*[0xffff]*C.QUndoStack)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQUndoStack(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQUndoStack(unsafe.Pointer(_outCast[i]), nil) } return _ret } func (this *QUndoGroup) ActiveStack() *QUndoStack { - return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoGroup_ActiveStack(this.h))) + return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoGroup_ActiveStack(this.h)), nil) } func (this *QUndoGroup) CreateUndoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer())), nil) } func (this *QUndoGroup) CreateRedoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer())), nil) } func (this *QUndoGroup) CanUndo() bool { @@ -158,7 +177,7 @@ func miqt_exec_callback_QUndoGroup_ActiveStackChanged(cb C.intptr_t, stack *C.QU } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQUndoStack(unsafe.Pointer(stack)) + slotval1 := UnsafeNewQUndoStack(unsafe.Pointer(stack), nil) gofunc(slotval1) } @@ -324,7 +343,7 @@ func (this *QUndoGroup) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)), nil) } func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -332,12 +351,178 @@ func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)), nil) +} + +func (this *QUndoGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QUndoGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QUndoGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QUndoGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_Event +func miqt_exec_callback_QUndoGroup_Event(self *C.QUndoGroup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoGroup) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QUndoGroup_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QUndoGroup) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QUndoGroup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_EventFilter +func miqt_exec_callback_QUndoGroup_EventFilter(self *C.QUndoGroup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoGroup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoGroup) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QUndoGroup_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoGroup) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QUndoGroup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_TimerEvent +func miqt_exec_callback_QUndoGroup_TimerEvent(self *C.QUndoGroup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QUndoGroup_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoGroup) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QUndoGroup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_ChildEvent +func miqt_exec_callback_QUndoGroup_ChildEvent(self *C.QUndoGroup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_CustomEvent(event *QEvent) { + + C.QUndoGroup_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoGroup) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QUndoGroup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_CustomEvent +func miqt_exec_callback_QUndoGroup_CustomEvent(self *C.QUndoGroup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QUndoGroup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoGroup) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoGroup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_ConnectNotify +func miqt_exec_callback_QUndoGroup_ConnectNotify(self *C.QUndoGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QUndoGroup) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QUndoGroup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoGroup) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoGroup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoGroup_DisconnectNotify +func miqt_exec_callback_QUndoGroup_DisconnectNotify(self *C.QUndoGroup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoGroup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + } // Delete this object from C++ memory. func (this *QUndoGroup) Delete() { - C.QUndoGroup_Delete(this.h) + C.QUndoGroup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qundogroup.h b/qt6/gen_qundogroup.h index 6e0ce08f..9a54f650 100644 --- a/qt6/gen_qundogroup.h +++ b/qt6/gen_qundogroup.h @@ -16,20 +16,28 @@ extern "C" { #ifdef __cplusplus class QAction; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUndoGroup; class QUndoStack; #else typedef struct QAction QAction; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUndoGroup QUndoGroup; typedef struct QUndoStack QUndoStack; #endif -QUndoGroup* QUndoGroup_new(); -QUndoGroup* QUndoGroup_new2(QObject* parent); +void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); +void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self); void* QUndoGroup_Metacast(QUndoGroup* self, const char* param1); struct miqt_string QUndoGroup_Tr(const char* s); @@ -65,7 +73,21 @@ struct miqt_string QUndoGroup_Tr2(const char* s, const char* c); struct miqt_string QUndoGroup_Tr3(const char* s, const char* c, int n); QAction* QUndoGroup_CreateUndoAction2(const QUndoGroup* self, QObject* parent, struct miqt_string prefix); QAction* QUndoGroup_CreateRedoAction2(const QUndoGroup* self, QObject* parent, struct miqt_string prefix); -void QUndoGroup_Delete(QUndoGroup* self); +void QUndoGroup_override_virtual_Event(void* self, intptr_t slot); +bool QUndoGroup_virtualbase_Event(void* self, QEvent* event); +void QUndoGroup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QUndoGroup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QUndoGroup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QUndoGroup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QUndoGroup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QUndoGroup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QUndoGroup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QUndoGroup_virtualbase_CustomEvent(void* self, QEvent* event); +void QUndoGroup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QUndoGroup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QUndoGroup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QUndoGroup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QUndoGroup_Delete(QUndoGroup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qundostack.cpp b/qt6/gen_qundostack.cpp index b498b9e0..d3a1018b 100644 --- a/qt6/gen_qundostack.cpp +++ b/qt6/gen_qundostack.cpp @@ -1,31 +1,142 @@ #include +#include +#include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qundostack.h" #include "_cgo_export.h" -QUndoCommand* QUndoCommand_new() { - return new QUndoCommand(); +class MiqtVirtualQUndoCommand : public virtual QUndoCommand { +public: + + MiqtVirtualQUndoCommand(): QUndoCommand() {}; + MiqtVirtualQUndoCommand(const QString& text): QUndoCommand(text) {}; + MiqtVirtualQUndoCommand(QUndoCommand* parent): QUndoCommand(parent) {}; + MiqtVirtualQUndoCommand(const QString& text, QUndoCommand* parent): QUndoCommand(text, parent) {}; + + virtual ~MiqtVirtualQUndoCommand() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Undo = 0; + + // Subclass to allow providing a Go implementation + virtual void undo() override { + if (handle__Undo == 0) { + QUndoCommand::undo(); + return; + } + + + miqt_exec_callback_QUndoCommand_Undo(this, handle__Undo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Undo() { + + QUndoCommand::undo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redo = 0; + + // Subclass to allow providing a Go implementation + virtual void redo() override { + if (handle__Redo == 0) { + QUndoCommand::redo(); + return; + } + + + miqt_exec_callback_QUndoCommand_Redo(this, handle__Redo); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Redo() { + + QUndoCommand::redo(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Id = 0; + + // Subclass to allow providing a Go implementation + virtual int id() const override { + if (handle__Id == 0) { + return QUndoCommand::id(); + } + + + int callback_return_value = miqt_exec_callback_QUndoCommand_Id(const_cast(this), handle__Id); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Id() const { + + return QUndoCommand::id(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MergeWith = 0; + + // Subclass to allow providing a Go implementation + virtual bool mergeWith(const QUndoCommand* other) override { + if (handle__MergeWith == 0) { + return QUndoCommand::mergeWith(other); + } + + QUndoCommand* sigval1 = (QUndoCommand*) other; + + bool callback_return_value = miqt_exec_callback_QUndoCommand_MergeWith(this, handle__MergeWith, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_MergeWith(QUndoCommand* other) { + + return QUndoCommand::mergeWith(other); + + } + +}; + +void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand) { + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(); + *outptr_QUndoCommand = ret; } -QUndoCommand* QUndoCommand_new2(struct miqt_string text) { +void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QUndoCommand(text_QString); + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString); + *outptr_QUndoCommand = ret; } -QUndoCommand* QUndoCommand_new3(QUndoCommand* parent) { - return new QUndoCommand(parent); +void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(parent); + *outptr_QUndoCommand = ret; } -QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent) { +void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { QString text_QString = QString::fromUtf8(text.data, text.len); - return new QUndoCommand(text_QString, parent); + MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString, parent); + *outptr_QUndoCommand = ret; } void QUndoCommand_Undo(QUndoCommand* self) { @@ -87,16 +198,237 @@ QUndoCommand* QUndoCommand_Child(const QUndoCommand* self, int index) { return (QUndoCommand*) self->child(static_cast(index)); } -void QUndoCommand_Delete(QUndoCommand* self) { - delete self; +void QUndoCommand_override_virtual_Undo(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__Undo = slot; } -QUndoStack* QUndoStack_new() { - return new QUndoStack(); +void QUndoCommand_virtualbase_Undo(void* self) { + ( (MiqtVirtualQUndoCommand*)(self) )->virtualbase_Undo(); } -QUndoStack* QUndoStack_new2(QObject* parent) { - return new QUndoStack(parent); +void QUndoCommand_override_virtual_Redo(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__Redo = slot; +} + +void QUndoCommand_virtualbase_Redo(void* self) { + ( (MiqtVirtualQUndoCommand*)(self) )->virtualbase_Redo(); +} + +void QUndoCommand_override_virtual_Id(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__Id = slot; +} + +int QUndoCommand_virtualbase_Id(const void* self) { + return ( (const MiqtVirtualQUndoCommand*)(self) )->virtualbase_Id(); +} + +void QUndoCommand_override_virtual_MergeWith(void* self, intptr_t slot) { + dynamic_cast( (QUndoCommand*)(self) )->handle__MergeWith = slot; +} + +bool QUndoCommand_virtualbase_MergeWith(void* self, QUndoCommand* other) { + return ( (MiqtVirtualQUndoCommand*)(self) )->virtualbase_MergeWith(other); +} + +void QUndoCommand_Delete(QUndoCommand* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQUndoStack : public virtual QUndoStack { +public: + + MiqtVirtualQUndoStack(): QUndoStack() {}; + MiqtVirtualQUndoStack(QObject* parent): QUndoStack(parent) {}; + + virtual ~MiqtVirtualQUndoStack() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QUndoStack::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QUndoStack_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QUndoStack::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QUndoStack::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QUndoStack_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QUndoStack::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QUndoStack::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QUndoStack_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QUndoStack::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QUndoStack::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QUndoStack_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QUndoStack::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QUndoStack::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QUndoStack_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QUndoStack::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QUndoStack::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoStack_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QUndoStack::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QUndoStack::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QUndoStack_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QUndoStack::disconnectNotify(*signal); + + } + +}; + +void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { + MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(); + *outptr_QUndoStack = ret; + *outptr_QObject = static_cast(ret); +} + +void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { + MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(parent); + *outptr_QUndoStack = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QUndoStack_MetaObject(const QUndoStack* self) { @@ -245,7 +577,7 @@ void QUndoStack_IndexChanged(QUndoStack* self, int idx) { } void QUndoStack_connect_IndexChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::indexChanged), self, [=](int idx) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::indexChanged), self, [=](int idx) { int sigval1 = idx; miqt_exec_callback_QUndoStack_IndexChanged(slot, sigval1); }); @@ -256,7 +588,7 @@ void QUndoStack_CleanChanged(QUndoStack* self, bool clean) { } void QUndoStack_connect_CleanChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::cleanChanged), self, [=](bool clean) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::cleanChanged), self, [=](bool clean) { bool sigval1 = clean; miqt_exec_callback_QUndoStack_CleanChanged(slot, sigval1); }); @@ -267,7 +599,7 @@ void QUndoStack_CanUndoChanged(QUndoStack* self, bool canUndo) { } void QUndoStack_connect_CanUndoChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::canUndoChanged), self, [=](bool canUndo) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::canUndoChanged), self, [=](bool canUndo) { bool sigval1 = canUndo; miqt_exec_callback_QUndoStack_CanUndoChanged(slot, sigval1); }); @@ -278,7 +610,7 @@ void QUndoStack_CanRedoChanged(QUndoStack* self, bool canRedo) { } void QUndoStack_connect_CanRedoChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::canRedoChanged), self, [=](bool canRedo) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::canRedoChanged), self, [=](bool canRedo) { bool sigval1 = canRedo; miqt_exec_callback_QUndoStack_CanRedoChanged(slot, sigval1); }); @@ -290,7 +622,7 @@ void QUndoStack_UndoTextChanged(QUndoStack* self, struct miqt_string undoText) { } void QUndoStack_connect_UndoTextChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::undoTextChanged), self, [=](const QString& undoText) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::undoTextChanged), self, [=](const QString& undoText) { const QString undoText_ret = undoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray undoText_b = undoText_ret.toUtf8(); @@ -309,7 +641,7 @@ void QUndoStack_RedoTextChanged(QUndoStack* self, struct miqt_string redoText) { } void QUndoStack_connect_RedoTextChanged(QUndoStack* self, intptr_t slot) { - QUndoStack::connect(self, static_cast(&QUndoStack::redoTextChanged), self, [=](const QString& redoText) { + MiqtVirtualQUndoStack::connect(self, static_cast(&QUndoStack::redoTextChanged), self, [=](const QString& redoText) { const QString redoText_ret = redoText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray redoText_b = redoText_ret.toUtf8(); @@ -358,7 +690,67 @@ void QUndoStack_SetActive1(QUndoStack* self, bool active) { self->setActive(active); } -void QUndoStack_Delete(QUndoStack* self) { - delete self; +void QUndoStack_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__Event = slot; +} + +bool QUndoStack_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_Event(event); +} + +void QUndoStack_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__EventFilter = slot; +} + +bool QUndoStack_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QUndoStack_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__TimerEvent = slot; +} + +void QUndoStack_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_TimerEvent(event); +} + +void QUndoStack_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__ChildEvent = slot; +} + +void QUndoStack_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_ChildEvent(event); +} + +void QUndoStack_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__CustomEvent = slot; +} + +void QUndoStack_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_CustomEvent(event); +} + +void QUndoStack_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__ConnectNotify = slot; +} + +void QUndoStack_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QUndoStack_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QUndoStack*)(self) )->handle__DisconnectNotify = slot; +} + +void QUndoStack_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQUndoStack*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QUndoStack_Delete(QUndoStack* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qundostack.go b/qt6/gen_qundostack.go index dfa9f9c9..601af2dc 100644 --- a/qt6/gen_qundostack.go +++ b/qt6/gen_qundostack.go @@ -15,7 +15,8 @@ import ( ) type QUndoCommand struct { - h *C.QUndoCommand + h *C.QUndoCommand + isSubclass bool } func (this *QUndoCommand) cPointer() *C.QUndoCommand { @@ -32,6 +33,7 @@ func (this *QUndoCommand) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUndoCommand constructs the type using only CGO pointers. func newQUndoCommand(h *C.QUndoCommand) *QUndoCommand { if h == nil { return nil @@ -39,14 +41,23 @@ func newQUndoCommand(h *C.QUndoCommand) *QUndoCommand { return &QUndoCommand{h: h} } +// UnsafeNewQUndoCommand constructs the type using only unsafe pointers. func UnsafeNewQUndoCommand(h unsafe.Pointer) *QUndoCommand { - return newQUndoCommand((*C.QUndoCommand)(h)) + if h == nil { + return nil + } + + return &QUndoCommand{h: (*C.QUndoCommand)(h)} } // NewQUndoCommand constructs a new QUndoCommand object. func NewQUndoCommand() *QUndoCommand { - ret := C.QUndoCommand_new() - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new(&outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } // NewQUndoCommand2 constructs a new QUndoCommand object. @@ -55,14 +66,22 @@ func NewQUndoCommand2(text string) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QUndoCommand_new2(text_ms) - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new2(text_ms, &outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } // NewQUndoCommand3 constructs a new QUndoCommand object. func NewQUndoCommand3(parent *QUndoCommand) *QUndoCommand { - ret := C.QUndoCommand_new3(parent.cPointer()) - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new3(parent.cPointer(), &outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } // NewQUndoCommand4 constructs a new QUndoCommand object. @@ -71,8 +90,12 @@ func NewQUndoCommand4(text string, parent *QUndoCommand) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - ret := C.QUndoCommand_new4(text_ms, parent.cPointer()) - return newQUndoCommand(ret) + var outptr_QUndoCommand *C.QUndoCommand = nil + + C.QUndoCommand_new4(text_ms, parent.cPointer(), &outptr_QUndoCommand) + ret := newQUndoCommand(outptr_QUndoCommand) + ret.isSubclass = true + return ret } func (this *QUndoCommand) Undo() { @@ -129,9 +152,96 @@ func (this *QUndoCommand) Child(index int) *QUndoCommand { return UnsafeNewQUndoCommand(unsafe.Pointer(C.QUndoCommand_Child(this.h, (C.int)(index)))) } +func (this *QUndoCommand) callVirtualBase_Undo() { + + C.QUndoCommand_virtualbase_Undo(unsafe.Pointer(this.h)) + +} +func (this *QUndoCommand) OnUndo(slot func(super func())) { + C.QUndoCommand_override_virtual_Undo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_Undo +func miqt_exec_callback_QUndoCommand_Undo(self *C.QUndoCommand, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoCommand{h: self}).callVirtualBase_Undo) + +} + +func (this *QUndoCommand) callVirtualBase_Redo() { + + C.QUndoCommand_virtualbase_Redo(unsafe.Pointer(this.h)) + +} +func (this *QUndoCommand) OnRedo(slot func(super func())) { + C.QUndoCommand_override_virtual_Redo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_Redo +func miqt_exec_callback_QUndoCommand_Redo(self *C.QUndoCommand, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoCommand{h: self}).callVirtualBase_Redo) + +} + +func (this *QUndoCommand) callVirtualBase_Id() int { + + return (int)(C.QUndoCommand_virtualbase_Id(unsafe.Pointer(this.h))) + +} +func (this *QUndoCommand) OnId(slot func(super func() int) int) { + C.QUndoCommand_override_virtual_Id(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_Id +func miqt_exec_callback_QUndoCommand_Id(self *C.QUndoCommand, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoCommand{h: self}).callVirtualBase_Id) + + return (C.int)(virtualReturn) + +} + +func (this *QUndoCommand) callVirtualBase_MergeWith(other *QUndoCommand) bool { + + return (bool)(C.QUndoCommand_virtualbase_MergeWith(unsafe.Pointer(this.h), other.cPointer())) + +} +func (this *QUndoCommand) OnMergeWith(slot func(super func(other *QUndoCommand) bool, other *QUndoCommand) bool) { + C.QUndoCommand_override_virtual_MergeWith(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoCommand_MergeWith +func miqt_exec_callback_QUndoCommand_MergeWith(self *C.QUndoCommand, cb C.intptr_t, other *C.QUndoCommand) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(other *QUndoCommand) bool, other *QUndoCommand) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQUndoCommand(unsafe.Pointer(other)) + + virtualReturn := gofunc((&QUndoCommand{h: self}).callVirtualBase_MergeWith, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QUndoCommand) Delete() { - C.QUndoCommand_Delete(this.h) + C.QUndoCommand_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -144,7 +254,8 @@ func (this *QUndoCommand) GoGC() { } type QUndoStack struct { - h *C.QUndoStack + h *C.QUndoStack + isSubclass bool *QObject } @@ -162,27 +273,45 @@ func (this *QUndoStack) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUndoStack(h *C.QUndoStack) *QUndoStack { +// newQUndoStack constructs the type using only CGO pointers. +func newQUndoStack(h *C.QUndoStack, h_QObject *C.QObject) *QUndoStack { if h == nil { return nil } - return &QUndoStack{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QUndoStack{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQUndoStack(h unsafe.Pointer) *QUndoStack { - return newQUndoStack((*C.QUndoStack)(h)) +// UnsafeNewQUndoStack constructs the type using only unsafe pointers. +func UnsafeNewQUndoStack(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoStack { + if h == nil { + return nil + } + + return &QUndoStack{h: (*C.QUndoStack)(h), + QObject: UnsafeNewQObject(h_QObject)} } // NewQUndoStack constructs a new QUndoStack object. func NewQUndoStack() *QUndoStack { - ret := C.QUndoStack_new() - return newQUndoStack(ret) + var outptr_QUndoStack *C.QUndoStack = nil + var outptr_QObject *C.QObject = nil + + C.QUndoStack_new(&outptr_QUndoStack, &outptr_QObject) + ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret.isSubclass = true + return ret } // NewQUndoStack2 constructs a new QUndoStack object. func NewQUndoStack2(parent *QObject) *QUndoStack { - ret := C.QUndoStack_new2(parent.cPointer()) - return newQUndoStack(ret) + var outptr_QUndoStack *C.QUndoStack = nil + var outptr_QObject *C.QObject = nil + + C.QUndoStack_new2(parent.cPointer(), &outptr_QUndoStack, &outptr_QObject) + ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QUndoStack) MetaObject() *QMetaObject { @@ -250,11 +379,11 @@ func (this *QUndoStack) Text(idx int) string { } func (this *QUndoStack) CreateUndoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer())), nil) } func (this *QUndoStack) CreateRedoAction(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer())), nil) } func (this *QUndoStack) IsActive() bool { @@ -478,7 +607,7 @@ func (this *QUndoStack) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)), nil) } func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -486,16 +615,182 @@ func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)), nil) } func (this *QUndoStack) SetActive1(active bool) { C.QUndoStack_SetActive1(this.h, (C.bool)(active)) } +func (this *QUndoStack) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QUndoStack_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QUndoStack) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QUndoStack_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_Event +func miqt_exec_callback_QUndoStack_Event(self *C.QUndoStack, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoStack{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoStack) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QUndoStack_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QUndoStack) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QUndoStack_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_EventFilter +func miqt_exec_callback_QUndoStack_EventFilter(self *C.QUndoStack, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QUndoStack{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoStack) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QUndoStack_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoStack) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QUndoStack_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_TimerEvent +func miqt_exec_callback_QUndoStack_TimerEvent(self *C.QUndoStack, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoStack{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QUndoStack_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoStack) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QUndoStack_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_ChildEvent +func miqt_exec_callback_QUndoStack_ChildEvent(self *C.QUndoStack, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QUndoStack{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_CustomEvent(event *QEvent) { + + C.QUndoStack_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QUndoStack) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QUndoStack_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_CustomEvent +func miqt_exec_callback_QUndoStack_CustomEvent(self *C.QUndoStack, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QUndoStack{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QUndoStack_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoStack) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoStack_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_ConnectNotify +func miqt_exec_callback_QUndoStack_ConnectNotify(self *C.QUndoStack, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoStack{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QUndoStack) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QUndoStack_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QUndoStack) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QUndoStack_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoStack_DisconnectNotify +func miqt_exec_callback_QUndoStack_DisconnectNotify(self *C.QUndoStack, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QUndoStack{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QUndoStack) Delete() { - C.QUndoStack_Delete(this.h) + C.QUndoStack_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qundostack.h b/qt6/gen_qundostack.h index d03e8557..89626505 100644 --- a/qt6/gen_qundostack.h +++ b/qt6/gen_qundostack.h @@ -16,22 +16,30 @@ extern "C" { #ifdef __cplusplus class QAction; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUndoCommand; class QUndoStack; #else typedef struct QAction QAction; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUndoCommand QUndoCommand; typedef struct QUndoStack QUndoStack; #endif -QUndoCommand* QUndoCommand_new(); -QUndoCommand* QUndoCommand_new2(struct miqt_string text); -QUndoCommand* QUndoCommand_new3(QUndoCommand* parent); -QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent); +void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand); +void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand); +void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); +void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); void QUndoCommand_Undo(QUndoCommand* self); void QUndoCommand_Redo(QUndoCommand* self); struct miqt_string QUndoCommand_Text(const QUndoCommand* self); @@ -43,10 +51,18 @@ int QUndoCommand_Id(const QUndoCommand* self); bool QUndoCommand_MergeWith(QUndoCommand* self, QUndoCommand* other); int QUndoCommand_ChildCount(const QUndoCommand* self); QUndoCommand* QUndoCommand_Child(const QUndoCommand* self, int index); -void QUndoCommand_Delete(QUndoCommand* self); +void QUndoCommand_override_virtual_Undo(void* self, intptr_t slot); +void QUndoCommand_virtualbase_Undo(void* self); +void QUndoCommand_override_virtual_Redo(void* self, intptr_t slot); +void QUndoCommand_virtualbase_Redo(void* self); +void QUndoCommand_override_virtual_Id(void* self, intptr_t slot); +int QUndoCommand_virtualbase_Id(const void* self); +void QUndoCommand_override_virtual_MergeWith(void* self, intptr_t slot); +bool QUndoCommand_virtualbase_MergeWith(void* self, QUndoCommand* other); +void QUndoCommand_Delete(QUndoCommand* self, bool isSubclass); -QUndoStack* QUndoStack_new(); -QUndoStack* QUndoStack_new2(QObject* parent); +void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); +void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); QMetaObject* QUndoStack_MetaObject(const QUndoStack* self); void* QUndoStack_Metacast(QUndoStack* self, const char* param1); struct miqt_string QUndoStack_Tr(const char* s); @@ -92,7 +108,21 @@ struct miqt_string QUndoStack_Tr3(const char* s, const char* c, int n); QAction* QUndoStack_CreateUndoAction2(const QUndoStack* self, QObject* parent, struct miqt_string prefix); QAction* QUndoStack_CreateRedoAction2(const QUndoStack* self, QObject* parent, struct miqt_string prefix); void QUndoStack_SetActive1(QUndoStack* self, bool active); -void QUndoStack_Delete(QUndoStack* self); +void QUndoStack_override_virtual_Event(void* self, intptr_t slot); +bool QUndoStack_virtualbase_Event(void* self, QEvent* event); +void QUndoStack_override_virtual_EventFilter(void* self, intptr_t slot); +bool QUndoStack_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QUndoStack_override_virtual_TimerEvent(void* self, intptr_t slot); +void QUndoStack_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QUndoStack_override_virtual_ChildEvent(void* self, intptr_t slot); +void QUndoStack_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QUndoStack_override_virtual_CustomEvent(void* self, intptr_t slot); +void QUndoStack_virtualbase_CustomEvent(void* self, QEvent* event); +void QUndoStack_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QUndoStack_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QUndoStack_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QUndoStack_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QUndoStack_Delete(QUndoStack* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qundoview.cpp b/qt6/gen_qundoview.cpp index ef7e4020..45c73e4b 100644 --- a/qt6/gen_qundoview.cpp +++ b/qt6/gen_qundoview.cpp @@ -1,38 +1,919 @@ +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include #include #include +#include #include #include #include "gen_qundoview.h" #include "_cgo_export.h" -QUndoView* QUndoView_new(QWidget* parent) { - return new QUndoView(parent); +class MiqtVirtualQUndoView : public virtual QUndoView { +public: + + MiqtVirtualQUndoView(QWidget* parent): QUndoView(parent) {}; + MiqtVirtualQUndoView(): QUndoView() {}; + MiqtVirtualQUndoView(QUndoStack* stack): QUndoView(stack) {}; + MiqtVirtualQUndoView(QUndoGroup* group): QUndoView(group) {}; + MiqtVirtualQUndoView(QUndoStack* stack, QWidget* parent): QUndoView(stack, parent) {}; + MiqtVirtualQUndoView(QUndoGroup* group, QWidget* parent): QUndoView(group, parent) {}; + + virtual ~MiqtVirtualQUndoView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect visualRect(const QModelIndex& index) const override { + if (handle__VisualRect == 0) { + return QUndoView::visualRect(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QUndoView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_VisualRect(QModelIndex* index) const { + + return new QRect(QUndoView::visualRect(*index)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollTo = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) override { + if (handle__ScrollTo == 0) { + QUndoView::scrollTo(index, hint); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QAbstractItemView::ScrollHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QUndoView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollTo(QModelIndex* index, int hint) { + + QUndoView::scrollTo(*index, static_cast(hint)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexAt = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex indexAt(const QPoint& p) const override { + if (handle__IndexAt == 0) { + return QUndoView::indexAt(p); + } + + const QPoint& p_ret = p; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&p_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QUndoView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_IndexAt(QPoint* p) const { + + return new QModelIndex(QUndoView::indexAt(*p)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DoItemsLayout = 0; + + // Subclass to allow providing a Go implementation + virtual void doItemsLayout() override { + if (handle__DoItemsLayout == 0) { + QUndoView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QUndoView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QUndoView::doItemsLayout(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset() override { + if (handle__Reset == 0) { + QUndoView::reset(); + return; + } + + + miqt_exec_callback_QUndoView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QUndoView::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetRootIndex = 0; + + // Subclass to allow providing a Go implementation + virtual void setRootIndex(const QModelIndex& index) override { + if (handle__SetRootIndex == 0) { + QUndoView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QUndoView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QUndoView::setRootIndex(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* e) override { + if (handle__Event == 0) { + return QUndoView::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QUndoView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QUndoView::event(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__ScrollContentsBy == 0) { + QUndoView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QUndoView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QUndoView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DataChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) override { + if (handle__DataChanged == 0) { + QUndoView::dataChanged(topLeft, bottomRight, roles); + return; + } + + const QModelIndex& topLeft_ret = topLeft; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&topLeft_ret); + const QModelIndex& bottomRight_ret = bottomRight; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&bottomRight_ret); + const QList& roles_ret = roles; + // Convert QList<> from C++ memory to manually-managed C memory + int* roles_arr = static_cast(malloc(sizeof(int) * roles_ret.length())); + for (size_t i = 0, e = roles_ret.length(); i < e; ++i) { + roles_arr[i] = roles_ret[i]; + } + struct miqt_array roles_out; + roles_out.len = roles_ret.length(); + roles_out.data = static_cast(roles_arr); + struct miqt_array /* of int */ sigval3 = roles_out; + + miqt_exec_callback_QUndoView_DataChanged(this, handle__DataChanged, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DataChanged(QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + QList roles_QList; + roles_QList.reserve(roles.len); + int* roles_arr = static_cast(roles.data); + for(size_t i = 0; i < roles.len; ++i) { + roles_QList.push_back(static_cast(roles_arr[i])); + } + + QUndoView::dataChanged(*topLeft, *bottomRight, roles_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsInserted = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsInserted(const QModelIndex& parent, int start, int end) override { + if (handle__RowsInserted == 0) { + QUndoView::rowsInserted(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QUndoView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QUndoView::rowsInserted(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RowsAboutToBeRemoved = 0; + + // Subclass to allow providing a Go implementation + virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override { + if (handle__RowsAboutToBeRemoved == 0) { + QUndoView::rowsAboutToBeRemoved(parent, start, end); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + int sigval2 = start; + int sigval3 = end; + + miqt_exec_callback_QUndoView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QUndoView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* e) override { + if (handle__MouseMoveEvent == 0) { + QUndoView::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QUndoView::mouseMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* e) override { + if (handle__MouseReleaseEvent == 0) { + QUndoView::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QUndoView::mouseReleaseEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* e) override { + if (handle__WheelEvent == 0) { + QUndoView::wheelEvent(e); + return; + } + + QWheelEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* e) { + + QUndoView::wheelEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* e) override { + if (handle__TimerEvent == 0) { + QUndoView::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QUndoView::timerEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* e) override { + if (handle__ResizeEvent == 0) { + QUndoView::resizeEvent(e); + return; + } + + QResizeEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* e) { + + QUndoView::resizeEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QUndoView::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QUndoView::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QUndoView::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QUndoView::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QUndoView::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QUndoView::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartDrag = 0; + + // Subclass to allow providing a Go implementation + virtual void startDrag(Qt::DropActions supportedActions) override { + if (handle__StartDrag == 0) { + QUndoView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QUndoView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QUndoView::startDrag(static_cast(supportedActions)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitViewItemOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initViewItemOption(QStyleOptionViewItem* option) const override { + if (handle__InitViewItemOption == 0) { + QUndoView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QUndoView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QUndoView::initViewItemOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* e) override { + if (handle__PaintEvent == 0) { + QUndoView::paintEvent(e); + return; + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QUndoView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* e) { + + QUndoView::paintEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HorizontalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int horizontalOffset() const override { + if (handle__HorizontalOffset == 0) { + return QUndoView::horizontalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QUndoView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HorizontalOffset() const { + + return QUndoView::horizontalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VerticalOffset = 0; + + // Subclass to allow providing a Go implementation + virtual int verticalOffset() const override { + if (handle__VerticalOffset == 0) { + return QUndoView::verticalOffset(); + } + + + int callback_return_value = miqt_exec_callback_QUndoView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_VerticalOffset() const { + + return QUndoView::verticalOffset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveCursor = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override { + if (handle__MoveCursor == 0) { + return QUndoView::moveCursor(cursorAction, modifiers); + } + + QAbstractItemView::CursorAction cursorAction_ret = cursorAction; + int sigval1 = static_cast(cursorAction_ret); + Qt::KeyboardModifiers modifiers_ret = modifiers; + int sigval2 = static_cast(modifiers_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QUndoView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QModelIndex* virtualbase_MoveCursor(int cursorAction, int modifiers) { + + return new QModelIndex(QUndoView::moveCursor(static_cast(cursorAction), static_cast(modifiers))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) override { + if (handle__SetSelection == 0) { + QUndoView::setSelection(rect, command); + return; + } + + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&rect_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QUndoView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelection(QRect* rect, int command) { + + QUndoView::setSelection(*rect, static_cast(command)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectedIndexes = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList selectedIndexes() const override { + if (handle__SelectedIndexes == 0) { + return QUndoView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QUndoView_SelectedIndexes(const_cast(this), handle__SelectedIndexes); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QModelIndex* */ virtualbase_SelectedIndexes() const { + + QModelIndexList _ret = QUndoView::selectedIndexes(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateGeometries = 0; + + // Subclass to allow providing a Go implementation + virtual void updateGeometries() override { + if (handle__UpdateGeometries == 0) { + QUndoView::updateGeometries(); + return; + } + + + miqt_exec_callback_QUndoView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QUndoView::updateGeometries(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsIndexHidden = 0; + + // Subclass to allow providing a Go implementation + virtual bool isIndexHidden(const QModelIndex& index) const override { + if (handle__IsIndexHidden == 0) { + return QUndoView::isIndexHidden(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QUndoView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsIndexHidden(QModelIndex* index) const { + + return QUndoView::isIndexHidden(*index); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous) override { + if (handle__CurrentChanged == 0) { + QUndoView::currentChanged(current, previous); + return; + } + + const QModelIndex& current_ret = current; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(¤t_ret); + const QModelIndex& previous_ret = previous; + // Cast returned reference into pointer + QModelIndex* sigval2 = const_cast(&previous_ret); + + miqt_exec_callback_QUndoView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QUndoView::currentChanged(*current, *previous); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ViewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__ViewportSizeHint == 0) { + return QUndoView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QUndoView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QUndoView::viewportSizeHint()); + + } + +}; + +void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(parent); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new2() { - return new QUndoView(); +void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new3(QUndoStack* stack) { - return new QUndoView(stack); +void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new4(QUndoGroup* group) { - return new QUndoView(group); +void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent) { - return new QUndoView(stack, parent); +void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack, parent); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent) { - return new QUndoView(group, parent); +void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group, parent); + *outptr_QUndoView = ret; + *outptr_QListView = static_cast(ret); + *outptr_QAbstractItemView = static_cast(ret); + *outptr_QAbstractScrollArea = static_cast(ret); + *outptr_QFrame = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QUndoView_MetaObject(const QUndoView* self) { @@ -116,7 +997,259 @@ struct miqt_string QUndoView_Tr3(const char* s, const char* c, int n) { return _ms; } -void QUndoView_Delete(QUndoView* self) { - delete self; +void QUndoView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__VisualRect = slot; +} + +QRect* QUndoView_virtualbase_VisualRect(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_VisualRect(index); +} + +void QUndoView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ScrollTo = slot; +} + +void QUndoView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_ScrollTo(index, hint); +} + +void QUndoView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__IndexAt = slot; +} + +QModelIndex* QUndoView_virtualbase_IndexAt(const void* self, QPoint* p) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_IndexAt(p); +} + +void QUndoView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DoItemsLayout = slot; +} + +void QUndoView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QUndoView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__Reset = slot; +} + +void QUndoView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_Reset(); +} + +void QUndoView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SetRootIndex = slot; +} + +void QUndoView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QUndoView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__Event = slot; +} + +bool QUndoView_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQUndoView*)(self) )->virtualbase_Event(e); +} + +void QUndoView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QUndoView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + +void QUndoView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DataChanged = slot; +} + +void QUndoView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QUndoView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__RowsInserted = slot; +} + +void QUndoView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QUndoView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QUndoView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QUndoView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QUndoView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QUndoView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QUndoView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QUndoView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__WheelEvent = slot; +} + +void QUndoView_virtualbase_WheelEvent(void* self, QWheelEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_WheelEvent(e); +} + +void QUndoView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__TimerEvent = slot; +} + +void QUndoView_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_TimerEvent(e); +} + +void QUndoView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ResizeEvent = slot; +} + +void QUndoView_virtualbase_ResizeEvent(void* self, QResizeEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_ResizeEvent(e); +} + +void QUndoView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DragMoveEvent = slot; +} + +void QUndoView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QUndoView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QUndoView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QUndoView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__DropEvent = slot; +} + +void QUndoView_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_DropEvent(e); +} + +void QUndoView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__StartDrag = slot; +} + +void QUndoView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QUndoView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__InitViewItemOption = slot; +} + +void QUndoView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QUndoView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__PaintEvent = slot; +} + +void QUndoView_virtualbase_PaintEvent(void* self, QPaintEvent* e) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_PaintEvent(e); +} + +void QUndoView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__HorizontalOffset = slot; +} + +int QUndoView_virtualbase_HorizontalOffset(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_HorizontalOffset(); +} + +void QUndoView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__VerticalOffset = slot; +} + +int QUndoView_virtualbase_VerticalOffset(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_VerticalOffset(); +} + +void QUndoView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__MoveCursor = slot; +} + +QModelIndex* QUndoView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers) { + return ( (MiqtVirtualQUndoView*)(self) )->virtualbase_MoveCursor(cursorAction, modifiers); +} + +void QUndoView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SetSelection = slot; +} + +void QUndoView_virtualbase_SetSelection(void* self, QRect* rect, int command) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SetSelection(rect, command); +} + +void QUndoView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QUndoView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QUndoView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__UpdateGeometries = slot; +} + +void QUndoView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QUndoView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__IsIndexHidden = slot; +} + +bool QUndoView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_IsIndexHidden(index); +} + +void QUndoView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__CurrentChanged = slot; +} + +void QUndoView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QUndoView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QUndoView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QUndoView_Delete(QUndoView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qundoview.go b/qt6/gen_qundoview.go index 05ee5aa5..80a1f719 100644 --- a/qt6/gen_qundoview.go +++ b/qt6/gen_qundoview.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QUndoView struct { - h *C.QUndoView + h *C.QUndoView + isSubclass bool *QListView } @@ -32,51 +34,125 @@ func (this *QUndoView) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUndoView(h *C.QUndoView) *QUndoView { +// newQUndoView constructs the type using only CGO pointers. +func newQUndoView(h *C.QUndoView, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QUndoView { if h == nil { return nil } - return &QUndoView{h: h, QListView: UnsafeNewQListView(unsafe.Pointer(h))} + return &QUndoView{h: h, + QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQUndoView(h unsafe.Pointer) *QUndoView { - return newQUndoView((*C.QUndoView)(h)) +// UnsafeNewQUndoView constructs the type using only unsafe pointers. +func UnsafeNewQUndoView(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QUndoView { + if h == nil { + return nil + } + + return &QUndoView{h: (*C.QUndoView)(h), + QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQUndoView constructs a new QUndoView object. func NewQUndoView(parent *QWidget) *QUndoView { - ret := C.QUndoView_new(parent.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new(parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView2 constructs a new QUndoView object. func NewQUndoView2() *QUndoView { - ret := C.QUndoView_new2() - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new2(&outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView3 constructs a new QUndoView object. func NewQUndoView3(stack *QUndoStack) *QUndoView { - ret := C.QUndoView_new3(stack.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new3(stack.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView4 constructs a new QUndoView object. func NewQUndoView4(group *QUndoGroup) *QUndoView { - ret := C.QUndoView_new4(group.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new4(group.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView5 constructs a new QUndoView object. func NewQUndoView5(stack *QUndoStack, parent *QWidget) *QUndoView { - ret := C.QUndoView_new5(stack.cPointer(), parent.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new5(stack.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQUndoView6 constructs a new QUndoView object. func NewQUndoView6(group *QUndoGroup, parent *QWidget) *QUndoView { - ret := C.QUndoView_new6(group.cPointer(), parent.cPointer()) - return newQUndoView(ret) + var outptr_QUndoView *C.QUndoView = nil + var outptr_QListView *C.QListView = nil + var outptr_QAbstractItemView *C.QAbstractItemView = nil + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + var outptr_QFrame *C.QFrame = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QUndoView_new6(group.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QUndoView) MetaObject() *QMetaObject { @@ -99,11 +175,11 @@ func QUndoView_Tr(s string) string { } func (this *QUndoView) Stack() *QUndoStack { - return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoView_Stack(this.h))) + return UnsafeNewQUndoStack(unsafe.Pointer(C.QUndoView_Stack(this.h)), nil) } func (this *QUndoView) Group() *QUndoGroup { - return UnsafeNewQUndoGroup(unsafe.Pointer(C.QUndoView_Group(this.h))) + return UnsafeNewQUndoGroup(unsafe.Pointer(C.QUndoView_Group(this.h)), nil) } func (this *QUndoView) SetEmptyLabel(label string) { @@ -162,9 +238,773 @@ func QUndoView_Tr3(s string, c string, n int) string { return _ret } +func (this *QUndoView) callVirtualBase_VisualRect(index *QModelIndex) *QRect { + + _ret := C.QUndoView_virtualbase_VisualRect(unsafe.Pointer(this.h), index.cPointer()) + _goptr := newQRect(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnVisualRect(slot func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) { + C.QUndoView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_VisualRect +func miqt_exec_callback_QUndoView_VisualRect(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) *QRect, index *QModelIndex) *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_VisualRect, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_ScrollTo(index *QModelIndex, hint QAbstractItemView__ScrollHint) { + + C.QUndoView_virtualbase_ScrollTo(unsafe.Pointer(this.h), index.cPointer(), (C.int)(hint)) + +} +func (this *QUndoView) OnScrollTo(slot func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QUndoView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ScrollTo +func miqt_exec_callback_QUndoView_ScrollTo(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex, hint QAbstractItemView__ScrollHint), index *QModelIndex, hint QAbstractItemView__ScrollHint)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + slotval2 := (QAbstractItemView__ScrollHint)(hint) + + gofunc((&QUndoView{h: self}).callVirtualBase_ScrollTo, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_IndexAt(p *QPoint) *QModelIndex { + + _ret := C.QUndoView_virtualbase_IndexAt(unsafe.Pointer(this.h), p.cPointer()) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnIndexAt(slot func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) { + C.QUndoView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_IndexAt +func miqt_exec_callback_QUndoView_IndexAt(self *C.QUndoView, cb C.intptr_t, p *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPoint) *QModelIndex, p *QPoint) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(p)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_IndexAt, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_DoItemsLayout() { + + C.QUndoView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QUndoView) OnDoItemsLayout(slot func(super func())) { + C.QUndoView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DoItemsLayout +func miqt_exec_callback_QUndoView_DoItemsLayout(self *C.QUndoView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QUndoView) callVirtualBase_Reset() { + + C.QUndoView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QUndoView) OnReset(slot func(super func())) { + C.QUndoView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_Reset +func miqt_exec_callback_QUndoView_Reset(self *C.QUndoView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoView{h: self}).callVirtualBase_Reset) + +} + +func (this *QUndoView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QUndoView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QUndoView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QUndoView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SetRootIndex +func miqt_exec_callback_QUndoView_SetRootIndex(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex), index *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + gofunc((&QUndoView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QUndoView) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QUndoView_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QUndoView) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QUndoView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_Event +func miqt_exec_callback_QUndoView_Event(self *C.QUndoView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QUndoView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QUndoView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QUndoView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ScrollContentsBy +func miqt_exec_callback_QUndoView_ScrollContentsBy(self *C.QUndoView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QUndoView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_DataChanged(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int) { + roles_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_CArray)) + for i := range roles { + roles_CArray[i] = (C.int)(roles[i]) + } + roles_ma := C.struct_miqt_array{len: C.size_t(len(roles)), data: unsafe.Pointer(roles_CArray)} + + C.QUndoView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QUndoView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QUndoView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DataChanged +func miqt_exec_callback_QUndoView_DataChanged(self *C.QUndoView, cb C.intptr_t, topLeft *C.QModelIndex, bottomRight *C.QModelIndex, roles C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(topLeft)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(bottomRight)) + var roles_ma C.struct_miqt_array = roles + roles_ret := make([]int, int(roles_ma.len)) + roles_outCast := (*[0xffff]C.int)(unsafe.Pointer(roles_ma.data)) // hey ya + for i := 0; i < int(roles_ma.len); i++ { + roles_ret[i] = (int)(roles_outCast[i]) + } + slotval3 := roles_ret + + gofunc((&QUndoView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QUndoView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QUndoView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QUndoView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QUndoView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_RowsInserted +func miqt_exec_callback_QUndoView_RowsInserted(self *C.QUndoView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QUndoView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QUndoView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QUndoView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QUndoView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QUndoView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_RowsAboutToBeRemoved +func miqt_exec_callback_QUndoView_RowsAboutToBeRemoved(self *C.QUndoView, cb C.intptr_t, parent *C.QModelIndex, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(parent)) + slotval2 := (int)(start) + + slotval3 := (int)(end) + + gofunc((&QUndoView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QUndoView) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QUndoView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QUndoView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_MouseMoveEvent +func miqt_exec_callback_QUndoView_MouseMoveEvent(self *C.QUndoView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QUndoView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QUndoView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_MouseReleaseEvent +func miqt_exec_callback_QUndoView_MouseReleaseEvent(self *C.QUndoView, cb C.intptr_t, e *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QMouseEvent), e *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_WheelEvent(e *QWheelEvent) { + + C.QUndoView_virtualbase_WheelEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnWheelEvent(slot func(super func(e *QWheelEvent), e *QWheelEvent)) { + C.QUndoView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_WheelEvent +func miqt_exec_callback_QUndoView_WheelEvent(self *C.QUndoView, cb C.intptr_t, e *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QWheelEvent), e *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QUndoView_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QUndoView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_TimerEvent +func miqt_exec_callback_QUndoView_TimerEvent(self *C.QUndoView, cb C.intptr_t, e *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QTimerEvent), e *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_ResizeEvent(e *QResizeEvent) { + + C.QUndoView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnResizeEvent(slot func(super func(e *QResizeEvent), e *QResizeEvent)) { + C.QUndoView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ResizeEvent +func miqt_exec_callback_QUndoView_ResizeEvent(self *C.QUndoView, cb C.intptr_t, e *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QResizeEvent), e *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_DragMoveEvent(e *QDragMoveEvent) { + + C.QUndoView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnDragMoveEvent(slot func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) { + C.QUndoView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DragMoveEvent +func miqt_exec_callback_QUndoView_DragMoveEvent(self *C.QUndoView, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragMoveEvent), e *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_DragLeaveEvent(e *QDragLeaveEvent) { + + C.QUndoView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnDragLeaveEvent(slot func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) { + C.QUndoView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DragLeaveEvent +func miqt_exec_callback_QUndoView_DragLeaveEvent(self *C.QUndoView, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDragLeaveEvent), e *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_DropEvent(e *QDropEvent) { + + C.QUndoView_virtualbase_DropEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnDropEvent(slot func(super func(e *QDropEvent), e *QDropEvent)) { + C.QUndoView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_DropEvent +func miqt_exec_callback_QUndoView_DropEvent(self *C.QUndoView, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QDropEvent), e *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QUndoView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QUndoView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QUndoView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_StartDrag +func miqt_exec_callback_QUndoView_StartDrag(self *C.QUndoView, cb C.intptr_t, supportedActions C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(supportedActions DropAction), supportedActions DropAction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (DropAction)(supportedActions) + + gofunc((&QUndoView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QUndoView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QUndoView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QUndoView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QUndoView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_InitViewItemOption +func miqt_exec_callback_QUndoView_InitViewItemOption(self *C.QUndoView, cb C.intptr_t, option *C.QStyleOptionViewItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQStyleOptionViewItem(unsafe.Pointer(option), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QUndoView) callVirtualBase_PaintEvent(e *QPaintEvent) { + + C.QUndoView_virtualbase_PaintEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QUndoView) OnPaintEvent(slot func(super func(e *QPaintEvent), e *QPaintEvent)) { + C.QUndoView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_PaintEvent +func miqt_exec_callback_QUndoView_PaintEvent(self *C.QUndoView, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QPaintEvent), e *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + + gofunc((&QUndoView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QUndoView) callVirtualBase_HorizontalOffset() int { + + return (int)(C.QUndoView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) + +} +func (this *QUndoView) OnHorizontalOffset(slot func(super func() int) int) { + C.QUndoView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_HorizontalOffset +func miqt_exec_callback_QUndoView_HorizontalOffset(self *C.QUndoView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_HorizontalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_VerticalOffset() int { + + return (int)(C.QUndoView_virtualbase_VerticalOffset(unsafe.Pointer(this.h))) + +} +func (this *QUndoView) OnVerticalOffset(slot func(super func() int) int) { + C.QUndoView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_VerticalOffset +func miqt_exec_callback_QUndoView_VerticalOffset(self *C.QUndoView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_VerticalOffset) + + return (C.int)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_MoveCursor(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex { + + _ret := C.QUndoView_virtualbase_MoveCursor(unsafe.Pointer(this.h), (C.int)(cursorAction), (C.int)(modifiers)) + _goptr := newQModelIndex(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnMoveCursor(slot func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QUndoView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_MoveCursor +func miqt_exec_callback_QUndoView_MoveCursor(self *C.QUndoView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex, cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractItemView__CursorAction)(cursorAction) + + slotval2 := (KeyboardModifier)(modifiers) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_MoveCursor, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QUndoView) callVirtualBase_SetSelection(rect *QRect, command QItemSelectionModel__SelectionFlag) { + + C.QUndoView_virtualbase_SetSelection(unsafe.Pointer(this.h), rect.cPointer(), (C.int)(command)) + +} +func (this *QUndoView) OnSetSelection(slot func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QUndoView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SetSelection +func miqt_exec_callback_QUndoView_SetSelection(self *C.QUndoView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRect, command QItemSelectionModel__SelectionFlag), rect *QRect, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rect)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QUndoView{h: self}).callVirtualBase_SetSelection, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QUndoView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) + _ret := make([]QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQModelIndex(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QUndoView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QUndoView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SelectedIndexes +func miqt_exec_callback_QUndoView_SelectedIndexes(self *C.QUndoView, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []QModelIndex) []QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_SelectedIndexes) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QUndoView) callVirtualBase_UpdateGeometries() { + + C.QUndoView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QUndoView) OnUpdateGeometries(slot func(super func())) { + C.QUndoView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_UpdateGeometries +func miqt_exec_callback_QUndoView_UpdateGeometries(self *C.QUndoView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUndoView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QUndoView) callVirtualBase_IsIndexHidden(index *QModelIndex) bool { + + return (bool)(C.QUndoView_virtualbase_IsIndexHidden(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QUndoView) OnIsIndexHidden(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QUndoView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_IsIndexHidden +func miqt_exec_callback_QUndoView_IsIndexHidden(self *C.QUndoView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *QModelIndex) bool, index *QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_IsIndexHidden, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUndoView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QUndoView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QUndoView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QUndoView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_CurrentChanged +func miqt_exec_callback_QUndoView_CurrentChanged(self *C.QUndoView, cb C.intptr_t, current *C.QModelIndex, previous *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQModelIndex(unsafe.Pointer(current)) + slotval2 := UnsafeNewQModelIndex(unsafe.Pointer(previous)) + + gofunc((&QUndoView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QUndoView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QUndoView_virtualbase_ViewportSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QUndoView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_ViewportSizeHint +func miqt_exec_callback_QUndoView_ViewportSizeHint(self *C.QUndoView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QUndoView) Delete() { - C.QUndoView_Delete(this.h) + C.QUndoView_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qundoview.h b/qt6/gen_qundoview.h index 54a5d2fa..12ead5ed 100644 --- a/qt6/gen_qundoview.h +++ b/qt6/gen_qundoview.h @@ -15,27 +15,67 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractItemView; +class QAbstractScrollArea; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFrame; class QIcon; +class QListView; class QMetaObject; +class QModelIndex; +class QMouseEvent; +class QObject; +class QPaintDevice; +class QPaintEvent; +class QPoint; +class QRect; +class QResizeEvent; +class QSize; +class QStyleOptionViewItem; +class QTimerEvent; class QUndoGroup; class QUndoStack; class QUndoView; +class QWheelEvent; class QWidget; #else +typedef struct QAbstractItemView QAbstractItemView; +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QListView QListView; typedef struct QMetaObject QMetaObject; +typedef struct QModelIndex QModelIndex; +typedef struct QMouseEvent QMouseEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QResizeEvent QResizeEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QUndoGroup QUndoGroup; typedef struct QUndoStack QUndoStack; typedef struct QUndoView QUndoView; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QUndoView* QUndoView_new(QWidget* parent); -QUndoView* QUndoView_new2(); -QUndoView* QUndoView_new3(QUndoStack* stack); -QUndoView* QUndoView_new4(QUndoGroup* group); -QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent); -QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent); +void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QUndoView_MetaObject(const QUndoView* self); void* QUndoView_Metacast(QUndoView* self, const char* param1); struct miqt_string QUndoView_Tr(const char* s); @@ -49,7 +89,69 @@ void QUndoView_SetStack(QUndoView* self, QUndoStack* stack); void QUndoView_SetGroup(QUndoView* self, QUndoGroup* group); struct miqt_string QUndoView_Tr2(const char* s, const char* c); struct miqt_string QUndoView_Tr3(const char* s, const char* c, int n); -void QUndoView_Delete(QUndoView* self); +void QUndoView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QUndoView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QUndoView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QUndoView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QUndoView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QUndoView_virtualbase_IndexAt(const void* self, QPoint* p); +void QUndoView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QUndoView_virtualbase_DoItemsLayout(void* self); +void QUndoView_override_virtual_Reset(void* self, intptr_t slot); +void QUndoView_virtualbase_Reset(void* self); +void QUndoView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QUndoView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QUndoView_override_virtual_Event(void* self, intptr_t slot); +bool QUndoView_virtualbase_Event(void* self, QEvent* e); +void QUndoView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QUndoView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); +void QUndoView_override_virtual_DataChanged(void* self, intptr_t slot); +void QUndoView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QUndoView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QUndoView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QUndoView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QUndoView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QUndoView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QUndoView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QUndoView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_WheelEvent(void* self, QWheelEvent* e); +void QUndoView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QUndoView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_ResizeEvent(void* self, QResizeEvent* e); +void QUndoView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QUndoView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QUndoView_override_virtual_DropEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_DropEvent(void* self, QDropEvent* e); +void QUndoView_override_virtual_StartDrag(void* self, intptr_t slot); +void QUndoView_virtualbase_StartDrag(void* self, int supportedActions); +void QUndoView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QUndoView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QUndoView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QUndoView_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QUndoView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QUndoView_virtualbase_HorizontalOffset(const void* self); +void QUndoView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QUndoView_virtualbase_VerticalOffset(const void* self); +void QUndoView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QUndoView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QUndoView_override_virtual_SetSelection(void* self, intptr_t slot); +void QUndoView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QUndoView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QUndoView_virtualbase_SelectedIndexes(const void* self); +void QUndoView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QUndoView_virtualbase_UpdateGeometries(void* self); +void QUndoView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QUndoView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QUndoView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QUndoView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QUndoView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QUndoView_virtualbase_ViewportSizeHint(const void* self); +void QUndoView_Delete(QUndoView* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qurl.cpp b/qt6/gen_qurl.cpp index e07fbe8f..017d48bc 100644 --- a/qt6/gen_qurl.cpp +++ b/qt6/gen_qurl.cpp @@ -9,22 +9,26 @@ #include "gen_qurl.h" #include "_cgo_export.h" -QUrl* QUrl_new() { - return new QUrl(); +void QUrl_new(QUrl** outptr_QUrl) { + QUrl* ret = new QUrl(); + *outptr_QUrl = ret; } -QUrl* QUrl_new2(QUrl* copyVal) { - return new QUrl(*copyVal); +void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl) { + QUrl* ret = new QUrl(*copyVal); + *outptr_QUrl = ret; } -QUrl* QUrl_new3(struct miqt_string url) { +void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl) { QString url_QString = QString::fromUtf8(url.data, url.len); - return new QUrl(url_QString); + QUrl* ret = new QUrl(url_QString); + *outptr_QUrl = ret; } -QUrl* QUrl_new4(struct miqt_string url, int mode) { +void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl) { QString url_QString = QString::fromUtf8(url.data, url.len); - return new QUrl(url_QString, static_cast(mode)); + QUrl* ret = new QUrl(url_QString, static_cast(mode)); + *outptr_QUrl = ret; } void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal) { @@ -698,7 +702,11 @@ struct miqt_array /* of QUrl* */ QUrl_FromStringList2(struct miqt_array /* of s return _out; } -void QUrl_Delete(QUrl* self) { - delete self; +void QUrl_Delete(QUrl* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qurl.go b/qt6/gen_qurl.go index 178215e6..c9379a5e 100644 --- a/qt6/gen_qurl.go +++ b/qt6/gen_qurl.go @@ -67,7 +67,8 @@ const ( ) type QUrl struct { - h *C.QUrl + h *C.QUrl + isSubclass bool } func (this *QUrl) cPointer() *C.QUrl { @@ -84,6 +85,7 @@ func (this *QUrl) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUrl constructs the type using only CGO pointers. func newQUrl(h *C.QUrl) *QUrl { if h == nil { return nil @@ -91,20 +93,33 @@ func newQUrl(h *C.QUrl) *QUrl { return &QUrl{h: h} } +// UnsafeNewQUrl constructs the type using only unsafe pointers. func UnsafeNewQUrl(h unsafe.Pointer) *QUrl { - return newQUrl((*C.QUrl)(h)) + if h == nil { + return nil + } + + return &QUrl{h: (*C.QUrl)(h)} } // NewQUrl constructs a new QUrl object. func NewQUrl() *QUrl { - ret := C.QUrl_new() - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new(&outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } // NewQUrl2 constructs a new QUrl object. func NewQUrl2(copyVal *QUrl) *QUrl { - ret := C.QUrl_new2(copyVal.cPointer()) - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new2(copyVal.cPointer(), &outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } // NewQUrl3 constructs a new QUrl object. @@ -113,8 +128,12 @@ func NewQUrl3(url string) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - ret := C.QUrl_new3(url_ms) - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new3(url_ms, &outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } // NewQUrl4 constructs a new QUrl object. @@ -123,8 +142,12 @@ func NewQUrl4(url string, mode QUrl__ParsingMode) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - ret := C.QUrl_new4(url_ms, (C.int)(mode)) - return newQUrl(ret) + var outptr_QUrl *C.QUrl = nil + + C.QUrl_new4(url_ms, (C.int)(mode), &outptr_QUrl) + ret := newQUrl(outptr_QUrl) + ret.isSubclass = true + return ret } func (this *QUrl) OperatorAssign(copyVal *QUrl) { @@ -805,7 +828,7 @@ func QUrl_FromStringList2(uris []string, mode QUrl__ParsingMode) []QUrl { // Delete this object from C++ memory. func (this *QUrl) Delete() { - C.QUrl_Delete(this.h) + C.QUrl_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qurl.h b/qt6/gen_qurl.h index fcd7a7f6..2f86f66d 100644 --- a/qt6/gen_qurl.h +++ b/qt6/gen_qurl.h @@ -24,10 +24,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -QUrl* QUrl_new(); -QUrl* QUrl_new2(QUrl* copyVal); -QUrl* QUrl_new3(struct miqt_string url); -QUrl* QUrl_new4(struct miqt_string url, int mode); +void QUrl_new(QUrl** outptr_QUrl); +void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl); +void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl); +void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl); void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal); void QUrl_OperatorAssignWithUrl(QUrl* self, struct miqt_string url); void QUrl_Swap(QUrl* self, QUrl* other); @@ -112,7 +112,7 @@ struct miqt_string QUrl_ToPercentEncoding3(struct miqt_string param1, struct miq struct miqt_string QUrl_FromAce2(struct miqt_string domain, unsigned int options); struct miqt_string QUrl_ToAce2(struct miqt_string domain, unsigned int options); struct miqt_array /* of QUrl* */ QUrl_FromStringList2(struct miqt_array /* of struct miqt_string */ uris, int mode); -void QUrl_Delete(QUrl* self); +void QUrl_Delete(QUrl* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qurlquery.cpp b/qt6/gen_qurlquery.cpp index 6bf3856d..a199dc23 100644 --- a/qt6/gen_qurlquery.cpp +++ b/qt6/gen_qurlquery.cpp @@ -9,21 +9,25 @@ #include "gen_qurlquery.h" #include "_cgo_export.h" -QUrlQuery* QUrlQuery_new() { - return new QUrlQuery(); +void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery) { + QUrlQuery* ret = new QUrlQuery(); + *outptr_QUrlQuery = ret; } -QUrlQuery* QUrlQuery_new2(QUrl* url) { - return new QUrlQuery(*url); +void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery) { + QUrlQuery* ret = new QUrlQuery(*url); + *outptr_QUrlQuery = ret; } -QUrlQuery* QUrlQuery_new3(struct miqt_string queryString) { +void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery) { QString queryString_QString = QString::fromUtf8(queryString.data, queryString.len); - return new QUrlQuery(queryString_QString); + QUrlQuery* ret = new QUrlQuery(queryString_QString); + *outptr_QUrlQuery = ret; } -QUrlQuery* QUrlQuery_new4(QUrlQuery* other) { - return new QUrlQuery(*other); +void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery) { + QUrlQuery* ret = new QUrlQuery(*other); + *outptr_QUrlQuery = ret; } void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other) { @@ -293,7 +297,11 @@ struct miqt_array /* of struct miqt_string */ QUrlQuery_AllQueryItemValues2(con return _out; } -void QUrlQuery_Delete(QUrlQuery* self) { - delete self; +void QUrlQuery_Delete(QUrlQuery* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qurlquery.go b/qt6/gen_qurlquery.go index 18178646..66c77534 100644 --- a/qt6/gen_qurlquery.go +++ b/qt6/gen_qurlquery.go @@ -14,7 +14,8 @@ import ( ) type QUrlQuery struct { - h *C.QUrlQuery + h *C.QUrlQuery + isSubclass bool } func (this *QUrlQuery) cPointer() *C.QUrlQuery { @@ -31,6 +32,7 @@ func (this *QUrlQuery) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUrlQuery constructs the type using only CGO pointers. func newQUrlQuery(h *C.QUrlQuery) *QUrlQuery { if h == nil { return nil @@ -38,20 +40,33 @@ func newQUrlQuery(h *C.QUrlQuery) *QUrlQuery { return &QUrlQuery{h: h} } +// UnsafeNewQUrlQuery constructs the type using only unsafe pointers. func UnsafeNewQUrlQuery(h unsafe.Pointer) *QUrlQuery { - return newQUrlQuery((*C.QUrlQuery)(h)) + if h == nil { + return nil + } + + return &QUrlQuery{h: (*C.QUrlQuery)(h)} } // NewQUrlQuery constructs a new QUrlQuery object. func NewQUrlQuery() *QUrlQuery { - ret := C.QUrlQuery_new() - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new(&outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } // NewQUrlQuery2 constructs a new QUrlQuery object. func NewQUrlQuery2(url *QUrl) *QUrlQuery { - ret := C.QUrlQuery_new2(url.cPointer()) - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new2(url.cPointer(), &outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } // NewQUrlQuery3 constructs a new QUrlQuery object. @@ -60,14 +75,22 @@ func NewQUrlQuery3(queryString string) *QUrlQuery { queryString_ms.data = C.CString(queryString) queryString_ms.len = C.size_t(len(queryString)) defer C.free(unsafe.Pointer(queryString_ms.data)) - ret := C.QUrlQuery_new3(queryString_ms) - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new3(queryString_ms, &outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } // NewQUrlQuery4 constructs a new QUrlQuery object. func NewQUrlQuery4(other *QUrlQuery) *QUrlQuery { - ret := C.QUrlQuery_new4(other.cPointer()) - return newQUrlQuery(ret) + var outptr_QUrlQuery *C.QUrlQuery = nil + + C.QUrlQuery_new4(other.cPointer(), &outptr_QUrlQuery) + ret := newQUrlQuery(outptr_QUrlQuery) + ret.isSubclass = true + return ret } func (this *QUrlQuery) OperatorAssign(other *QUrlQuery) { @@ -338,7 +361,7 @@ func (this *QUrlQuery) AllQueryItemValues2(key string, encoding QUrl__ComponentF // Delete this object from C++ memory. func (this *QUrlQuery) Delete() { - C.QUrlQuery_Delete(this.h) + C.QUrlQuery_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qurlquery.h b/qt6/gen_qurlquery.h index a5488e18..3ffedf3d 100644 --- a/qt6/gen_qurlquery.h +++ b/qt6/gen_qurlquery.h @@ -24,10 +24,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -QUrlQuery* QUrlQuery_new(); -QUrlQuery* QUrlQuery_new2(QUrl* url); -QUrlQuery* QUrlQuery_new3(struct miqt_string queryString); -QUrlQuery* QUrlQuery_new4(QUrlQuery* other); +void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery); +void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery); +void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery); +void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery); void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorEqual(const QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorNotEqual(const QUrlQuery* self, QUrlQuery* other); @@ -54,7 +54,7 @@ struct miqt_string QUrlQuery_ToString1(const QUrlQuery* self, unsigned int encod struct miqt_array /* of struct miqt_map tuple of struct miqt_string and struct miqt_string */ QUrlQuery_QueryItems1(const QUrlQuery* self, unsigned int encoding); struct miqt_string QUrlQuery_QueryItemValue2(const QUrlQuery* self, struct miqt_string key, unsigned int encoding); struct miqt_array /* of struct miqt_string */ QUrlQuery_AllQueryItemValues2(const QUrlQuery* self, struct miqt_string key, unsigned int encoding); -void QUrlQuery_Delete(QUrlQuery* self); +void QUrlQuery_Delete(QUrlQuery* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qutf8stringview.cpp b/qt6/gen_qutf8stringview.cpp index a399dfad..6ccee24e 100644 --- a/qt6/gen_qutf8stringview.cpp +++ b/qt6/gen_qutf8stringview.cpp @@ -4,11 +4,19 @@ #include "gen_qutf8stringview.h" #include "_cgo_export.h" -void QtPrivate__hide_char8_t_Delete(QtPrivate__hide_char8_t* self) { - delete self; +void QtPrivate__hide_char8_t_Delete(QtPrivate__hide_char8_t* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QtPrivate__wrap_char_Delete(QtPrivate__wrap_char* self) { - delete self; +void QtPrivate__wrap_char_Delete(QtPrivate__wrap_char* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qutf8stringview.go b/qt6/gen_qutf8stringview.go index 692820d2..5a9c2c21 100644 --- a/qt6/gen_qutf8stringview.go +++ b/qt6/gen_qutf8stringview.go @@ -14,7 +14,8 @@ import ( ) type QtPrivate__hide_char8_t struct { - h *C.QtPrivate__hide_char8_t + h *C.QtPrivate__hide_char8_t + isSubclass bool } func (this *QtPrivate__hide_char8_t) cPointer() *C.QtPrivate__hide_char8_t { @@ -31,6 +32,7 @@ func (this *QtPrivate__hide_char8_t) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__hide_char8_t constructs the type using only CGO pointers. func newQtPrivate__hide_char8_t(h *C.QtPrivate__hide_char8_t) *QtPrivate__hide_char8_t { if h == nil { return nil @@ -38,13 +40,18 @@ func newQtPrivate__hide_char8_t(h *C.QtPrivate__hide_char8_t) *QtPrivate__hide_c return &QtPrivate__hide_char8_t{h: h} } +// UnsafeNewQtPrivate__hide_char8_t constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__hide_char8_t(h unsafe.Pointer) *QtPrivate__hide_char8_t { - return newQtPrivate__hide_char8_t((*C.QtPrivate__hide_char8_t)(h)) + if h == nil { + return nil + } + + return &QtPrivate__hide_char8_t{h: (*C.QtPrivate__hide_char8_t)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__hide_char8_t) Delete() { - C.QtPrivate__hide_char8_t_Delete(this.h) + C.QtPrivate__hide_char8_t_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -57,7 +64,8 @@ func (this *QtPrivate__hide_char8_t) GoGC() { } type QtPrivate__wrap_char struct { - h *C.QtPrivate__wrap_char + h *C.QtPrivate__wrap_char + isSubclass bool } func (this *QtPrivate__wrap_char) cPointer() *C.QtPrivate__wrap_char { @@ -74,6 +82,7 @@ func (this *QtPrivate__wrap_char) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__wrap_char constructs the type using only CGO pointers. func newQtPrivate__wrap_char(h *C.QtPrivate__wrap_char) *QtPrivate__wrap_char { if h == nil { return nil @@ -81,13 +90,18 @@ func newQtPrivate__wrap_char(h *C.QtPrivate__wrap_char) *QtPrivate__wrap_char { return &QtPrivate__wrap_char{h: h} } +// UnsafeNewQtPrivate__wrap_char constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__wrap_char(h unsafe.Pointer) *QtPrivate__wrap_char { - return newQtPrivate__wrap_char((*C.QtPrivate__wrap_char)(h)) + if h == nil { + return nil + } + + return &QtPrivate__wrap_char{h: (*C.QtPrivate__wrap_char)(h)} } // Delete this object from C++ memory. func (this *QtPrivate__wrap_char) Delete() { - C.QtPrivate__wrap_char_Delete(this.h) + C.QtPrivate__wrap_char_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qutf8stringview.h b/qt6/gen_qutf8stringview.h index dc950168..59b8f30f 100644 --- a/qt6/gen_qutf8stringview.h +++ b/qt6/gen_qutf8stringview.h @@ -30,9 +30,9 @@ typedef struct QtPrivate__hide_char8_t QtPrivate__hide_char8_t; typedef struct QtPrivate__wrap_char QtPrivate__wrap_char; #endif -void QtPrivate__hide_char8_t_Delete(QtPrivate__hide_char8_t* self); +void QtPrivate__hide_char8_t_Delete(QtPrivate__hide_char8_t* self, bool isSubclass); -void QtPrivate__wrap_char_Delete(QtPrivate__wrap_char* self); +void QtPrivate__wrap_char_Delete(QtPrivate__wrap_char* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_quuid.cpp b/qt6/gen_quuid.cpp index e84e1a2f..96a8bbc0 100644 --- a/qt6/gen_quuid.cpp +++ b/qt6/gen_quuid.cpp @@ -9,20 +9,24 @@ #include "gen_quuid.h" #include "_cgo_export.h" -QUuid* QUuid_new() { - return new QUuid(); +void QUuid_new(QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(); + *outptr_QUuid = ret; } -QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8) { - return new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); +void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); + *outptr_QUuid = ret; } -QUuid* QUuid_new3(QAnyStringView* stringVal) { - return new QUuid(*stringVal); +void QUuid_new3(QAnyStringView* stringVal, QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(*stringVal); + *outptr_QUuid = ret; } -QUuid* QUuid_new4(QUuid* param1) { - return new QUuid(*param1); +void QUuid_new4(QUuid* param1, QUuid** outptr_QUuid) { + QUuid* ret = new QUuid(*param1); + *outptr_QUuid = ret; } QUuid* QUuid_FromString(QAnyStringView* stringVal) { @@ -136,7 +140,11 @@ struct miqt_string QUuid_ToByteArray1(const QUuid* self, int mode) { return _ms; } -void QUuid_Delete(QUuid* self) { - delete self; +void QUuid_Delete(QUuid* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_quuid.go b/qt6/gen_quuid.go index 64c03ecd..ecfd655a 100644 --- a/qt6/gen_quuid.go +++ b/qt6/gen_quuid.go @@ -44,7 +44,8 @@ const ( ) type QUuid struct { - h *C.QUuid + h *C.QUuid + isSubclass bool } func (this *QUuid) cPointer() *C.QUuid { @@ -61,6 +62,7 @@ func (this *QUuid) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQUuid constructs the type using only CGO pointers. func newQUuid(h *C.QUuid) *QUuid { if h == nil { return nil @@ -68,32 +70,53 @@ func newQUuid(h *C.QUuid) *QUuid { return &QUuid{h: h} } +// UnsafeNewQUuid constructs the type using only unsafe pointers. func UnsafeNewQUuid(h unsafe.Pointer) *QUuid { - return newQUuid((*C.QUuid)(h)) + if h == nil { + return nil + } + + return &QUuid{h: (*C.QUuid)(h)} } // NewQUuid constructs a new QUuid object. func NewQUuid() *QUuid { - ret := C.QUuid_new() - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new(&outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid2 constructs a new QUuid object. func NewQUuid2(l uint, w1 uint16, w2 uint16, b1 byte, b2 byte, b3 byte, b4 byte, b5 byte, b6 byte, b7 byte, b8 byte) *QUuid { - ret := C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8)) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8), &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid3 constructs a new QUuid object. func NewQUuid3(stringVal QAnyStringView) *QUuid { - ret := C.QUuid_new3(stringVal.cPointer()) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new3(stringVal.cPointer(), &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } // NewQUuid4 constructs a new QUuid object. func NewQUuid4(param1 *QUuid) *QUuid { - ret := C.QUuid_new4(param1.cPointer()) - return newQUuid(ret) + var outptr_QUuid *C.QUuid = nil + + C.QUuid_new4(param1.cPointer(), &outptr_QUuid) + ret := newQUuid(outptr_QUuid) + ret.isSubclass = true + return ret } func QUuid_FromString(stringVal QAnyStringView) *QUuid { @@ -224,7 +247,7 @@ func (this *QUuid) ToByteArray1(mode QUuid__StringFormat) []byte { // Delete this object from C++ memory. func (this *QUuid) Delete() { - C.QUuid_Delete(this.h) + C.QUuid_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_quuid.h b/qt6/gen_quuid.h index cbfbff09..cc38b213 100644 --- a/qt6/gen_quuid.h +++ b/qt6/gen_quuid.h @@ -26,10 +26,10 @@ typedef struct QByteArrayView QByteArrayView; typedef struct QUuid QUuid; #endif -QUuid* QUuid_new(); -QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8); -QUuid* QUuid_new3(QAnyStringView* stringVal); -QUuid* QUuid_new4(QUuid* param1); +void QUuid_new(QUuid** outptr_QUuid); +void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid); +void QUuid_new3(QAnyStringView* stringVal, QUuid** outptr_QUuid); +void QUuid_new4(QUuid* param1, QUuid** outptr_QUuid); QUuid* QUuid_FromString(QAnyStringView* stringVal); struct miqt_string QUuid_ToString(const QUuid* self); struct miqt_string QUuid_ToByteArray(const QUuid* self); @@ -49,7 +49,7 @@ int QUuid_Variant(const QUuid* self); int QUuid_Version(const QUuid* self); struct miqt_string QUuid_ToString1(const QUuid* self, int mode); struct miqt_string QUuid_ToByteArray1(const QUuid* self, int mode); -void QUuid_Delete(QUuid* self); +void QUuid_Delete(QUuid* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qvalidator.cpp b/qt6/gen_qvalidator.cpp index 594ad275..08cf4ab6 100644 --- a/qt6/gen_qvalidator.cpp +++ b/qt6/gen_qvalidator.cpp @@ -83,24 +83,117 @@ struct miqt_string QValidator_Tr3(const char* s, const char* c, int n) { return _ms; } -void QValidator_Delete(QValidator* self) { - delete self; +void QValidator_Delete(QValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QIntValidator* QIntValidator_new() { - return new QIntValidator(); +class MiqtVirtualQIntValidator : public virtual QIntValidator { +public: + + MiqtVirtualQIntValidator(): QIntValidator() {}; + MiqtVirtualQIntValidator(int bottom, int top): QIntValidator(bottom, top) {}; + MiqtVirtualQIntValidator(QObject* parent): QIntValidator(parent) {}; + MiqtVirtualQIntValidator(int bottom, int top, QObject* parent): QIntValidator(bottom, top, parent) {}; + + virtual ~MiqtVirtualQIntValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& param1, int& param2) const override { + if (handle__Validate == 0) { + return QIntValidator::validate(param1, param2); + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + int* sigval2 = ¶m2; + + int callback_return_value = miqt_exec_callback_QIntValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string param1, int* param2) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QValidator::State _ret = QIntValidator::validate(param1_QString, static_cast(*param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QIntValidator::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QIntValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QIntValidator::fixup(input_QString); + + } + +}; + +void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIntValidator* QIntValidator_new2(int bottom, int top) { - return new QIntValidator(static_cast(bottom), static_cast(top)); +void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top)); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIntValidator* QIntValidator_new3(QObject* parent) { - return new QIntValidator(parent); +void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(parent); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent) { - return new QIntValidator(static_cast(bottom), static_cast(top), parent); +void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top), parent); + *outptr_QIntValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QIntValidator_MetaObject(const QIntValidator* self) { @@ -158,7 +251,7 @@ void QIntValidator_BottomChanged(QIntValidator* self, int bottom) { } void QIntValidator_connect_BottomChanged(QIntValidator* self, intptr_t slot) { - QIntValidator::connect(self, static_cast(&QIntValidator::bottomChanged), self, [=](int bottom) { + MiqtVirtualQIntValidator::connect(self, static_cast(&QIntValidator::bottomChanged), self, [=](int bottom) { int sigval1 = bottom; miqt_exec_callback_QIntValidator_BottomChanged(slot, sigval1); }); @@ -169,7 +262,7 @@ void QIntValidator_TopChanged(QIntValidator* self, int top) { } void QIntValidator_connect_TopChanged(QIntValidator* self, intptr_t slot) { - QIntValidator::connect(self, static_cast(&QIntValidator::topChanged), self, [=](int top) { + MiqtVirtualQIntValidator::connect(self, static_cast(&QIntValidator::topChanged), self, [=](int top) { int sigval1 = top; miqt_exec_callback_QIntValidator_TopChanged(slot, sigval1); }); @@ -197,24 +290,133 @@ struct miqt_string QIntValidator_Tr3(const char* s, const char* c, int n) { return _ms; } -void QIntValidator_Delete(QIntValidator* self) { - delete self; +void QIntValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QIntValidator*)(self) )->handle__Validate = slot; +} + +int QIntValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2) { + return ( (const MiqtVirtualQIntValidator*)(self) )->virtualbase_Validate(param1, param2); +} + +void QIntValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QIntValidator*)(self) )->handle__Fixup = slot; +} + +void QIntValidator_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQIntValidator*)(self) )->virtualbase_Fixup(input); +} + +void QIntValidator_Delete(QIntValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDoubleValidator* QDoubleValidator_new() { - return new QDoubleValidator(); +class MiqtVirtualQDoubleValidator : public virtual QDoubleValidator { +public: + + MiqtVirtualQDoubleValidator(): QDoubleValidator() {}; + MiqtVirtualQDoubleValidator(double bottom, double top, int decimals): QDoubleValidator(bottom, top, decimals) {}; + MiqtVirtualQDoubleValidator(QObject* parent): QDoubleValidator(parent) {}; + MiqtVirtualQDoubleValidator(double bottom, double top, int decimals, QObject* parent): QDoubleValidator(bottom, top, decimals, parent) {}; + + virtual ~MiqtVirtualQDoubleValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& param1, int& param2) const override { + if (handle__Validate == 0) { + return QDoubleValidator::validate(param1, param2); + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + int* sigval2 = ¶m2; + + int callback_return_value = miqt_exec_callback_QDoubleValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string param1, int* param2) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QValidator::State _ret = QDoubleValidator::validate(param1_QString, static_cast(*param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& input) const override { + if (handle__Fixup == 0) { + QDoubleValidator::fixup(input); + return; + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + + miqt_exec_callback_QDoubleValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string input) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QDoubleValidator::fixup(input_QString); + + } + +}; + +void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals) { - return new QDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); +void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QDoubleValidator* QDoubleValidator_new3(QObject* parent) { - return new QDoubleValidator(parent); +void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(parent); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent) { - return new QDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); +void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); + *outptr_QDoubleValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self) { @@ -293,7 +495,7 @@ void QDoubleValidator_BottomChanged(QDoubleValidator* self, double bottom) { } void QDoubleValidator_connect_BottomChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::bottomChanged), self, [=](double bottom) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::bottomChanged), self, [=](double bottom) { double sigval1 = bottom; miqt_exec_callback_QDoubleValidator_BottomChanged(slot, sigval1); }); @@ -304,7 +506,7 @@ void QDoubleValidator_TopChanged(QDoubleValidator* self, double top) { } void QDoubleValidator_connect_TopChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::topChanged), self, [=](double top) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::topChanged), self, [=](double top) { double sigval1 = top; miqt_exec_callback_QDoubleValidator_TopChanged(slot, sigval1); }); @@ -315,7 +517,7 @@ void QDoubleValidator_DecimalsChanged(QDoubleValidator* self, int decimals) { } void QDoubleValidator_connect_DecimalsChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::decimalsChanged), self, [=](int decimals) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::decimalsChanged), self, [=](int decimals) { int sigval1 = decimals; miqt_exec_callback_QDoubleValidator_DecimalsChanged(slot, sigval1); }); @@ -326,7 +528,7 @@ void QDoubleValidator_NotationChanged(QDoubleValidator* self, int notation) { } void QDoubleValidator_connect_NotationChanged(QDoubleValidator* self, intptr_t slot) { - QDoubleValidator::connect(self, static_cast(&QDoubleValidator::notationChanged), self, [=](QDoubleValidator::Notation notation) { + MiqtVirtualQDoubleValidator::connect(self, static_cast(&QDoubleValidator::notationChanged), self, [=](QDoubleValidator::Notation notation) { QDoubleValidator::Notation notation_ret = notation; int sigval1 = static_cast(notation_ret); miqt_exec_callback_QDoubleValidator_NotationChanged(slot, sigval1); @@ -355,24 +557,133 @@ struct miqt_string QDoubleValidator_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDoubleValidator_Delete(QDoubleValidator* self) { - delete self; +void QDoubleValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QDoubleValidator*)(self) )->handle__Validate = slot; +} + +int QDoubleValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2) { + return ( (const MiqtVirtualQDoubleValidator*)(self) )->virtualbase_Validate(param1, param2); +} + +void QDoubleValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QDoubleValidator*)(self) )->handle__Fixup = slot; +} + +void QDoubleValidator_virtualbase_Fixup(const void* self, struct miqt_string input) { + ( (const MiqtVirtualQDoubleValidator*)(self) )->virtualbase_Fixup(input); } -QRegularExpressionValidator* QRegularExpressionValidator_new() { - return new QRegularExpressionValidator(); +void QDoubleValidator_Delete(QDoubleValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQRegularExpressionValidator : public virtual QRegularExpressionValidator { +public: + + MiqtVirtualQRegularExpressionValidator(): QRegularExpressionValidator() {}; + MiqtVirtualQRegularExpressionValidator(const QRegularExpression& re): QRegularExpressionValidator(re) {}; + MiqtVirtualQRegularExpressionValidator(QObject* parent): QRegularExpressionValidator(parent) {}; + MiqtVirtualQRegularExpressionValidator(const QRegularExpression& re, QObject* parent): QRegularExpressionValidator(re, parent) {}; + + virtual ~MiqtVirtualQRegularExpressionValidator() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Validate = 0; + + // Subclass to allow providing a Go implementation + virtual QValidator::State validate(QString& input, int& pos) const override { + if (handle__Validate == 0) { + return QRegularExpressionValidator::validate(input, pos); + } + + QString input_ret = input; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray input_b = input_ret.toUtf8(); + struct miqt_string input_ms; + input_ms.len = input_b.length(); + input_ms.data = static_cast(malloc(input_ms.len)); + memcpy(input_ms.data, input_b.data(), input_ms.len); + struct miqt_string sigval1 = input_ms; + int* sigval2 = &pos; + + int callback_return_value = miqt_exec_callback_QRegularExpressionValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Validate(struct miqt_string input, int* pos) const { + QString input_QString = QString::fromUtf8(input.data, input.len); + + QValidator::State _ret = QRegularExpressionValidator::validate(input_QString, static_cast(*pos)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Fixup = 0; + + // Subclass to allow providing a Go implementation + virtual void fixup(QString& param1) const override { + if (handle__Fixup == 0) { + QRegularExpressionValidator::fixup(param1); + return; + } + + QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + + miqt_exec_callback_QRegularExpressionValidator_Fixup(const_cast(this), handle__Fixup, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Fixup(struct miqt_string param1) const { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + + QRegularExpressionValidator::fixup(param1_QString); + + } + +}; + +void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re) { - return new QRegularExpressionValidator(*re); +void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent) { - return new QRegularExpressionValidator(parent); +void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(parent); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent) { - return new QRegularExpressionValidator(*re, parent); +void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re, parent); + *outptr_QRegularExpressionValidator = ret; + *outptr_QValidator = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self) { @@ -413,7 +724,7 @@ void QRegularExpressionValidator_RegularExpressionChanged(QRegularExpressionVali } void QRegularExpressionValidator_connect_RegularExpressionChanged(QRegularExpressionValidator* self, intptr_t slot) { - QRegularExpressionValidator::connect(self, static_cast(&QRegularExpressionValidator::regularExpressionChanged), self, [=](const QRegularExpression& re) { + MiqtVirtualQRegularExpressionValidator::connect(self, static_cast(&QRegularExpressionValidator::regularExpressionChanged), self, [=](const QRegularExpression& re) { const QRegularExpression& re_ret = re; // Cast returned reference into pointer QRegularExpression* sigval1 = const_cast(&re_ret); @@ -443,7 +754,27 @@ struct miqt_string QRegularExpressionValidator_Tr3(const char* s, const char* c, return _ms; } -void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self) { - delete self; +void QRegularExpressionValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QRegularExpressionValidator*)(self) )->handle__Validate = slot; +} + +int QRegularExpressionValidator_virtualbase_Validate(const void* self, struct miqt_string input, int* pos) { + return ( (const MiqtVirtualQRegularExpressionValidator*)(self) )->virtualbase_Validate(input, pos); +} + +void QRegularExpressionValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QRegularExpressionValidator*)(self) )->handle__Fixup = slot; +} + +void QRegularExpressionValidator_virtualbase_Fixup(const void* self, struct miqt_string param1) { + ( (const MiqtVirtualQRegularExpressionValidator*)(self) )->virtualbase_Fixup(param1); +} + +void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qvalidator.go b/qt6/gen_qvalidator.go index 3d408072..5f504a35 100644 --- a/qt6/gen_qvalidator.go +++ b/qt6/gen_qvalidator.go @@ -30,7 +30,8 @@ const ( ) type QValidator struct { - h *C.QValidator + h *C.QValidator + isSubclass bool *QObject } @@ -48,15 +49,23 @@ func (this *QValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQValidator(h *C.QValidator) *QValidator { +// newQValidator constructs the type using only CGO pointers. +func newQValidator(h *C.QValidator, h_QObject *C.QObject) *QValidator { if h == nil { return nil } - return &QValidator{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h))} + return &QValidator{h: h, + QObject: newQObject(h_QObject)} } -func UnsafeNewQValidator(h unsafe.Pointer) *QValidator { - return newQValidator((*C.QValidator)(h)) +// UnsafeNewQValidator constructs the type using only unsafe pointers. +func UnsafeNewQValidator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QValidator { + if h == nil { + return nil + } + + return &QValidator{h: (*C.QValidator)(h), + QObject: UnsafeNewQObject(h_QObject)} } func (this *QValidator) MetaObject() *QMetaObject { @@ -146,7 +155,7 @@ func QValidator_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QValidator) Delete() { - C.QValidator_Delete(this.h) + C.QValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -159,7 +168,8 @@ func (this *QValidator) GoGC() { } type QIntValidator struct { - h *C.QIntValidator + h *C.QIntValidator + isSubclass bool *QValidator } @@ -177,39 +187,71 @@ func (this *QIntValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQIntValidator(h *C.QIntValidator) *QIntValidator { +// newQIntValidator constructs the type using only CGO pointers. +func newQIntValidator(h *C.QIntValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QIntValidator { if h == nil { return nil } - return &QIntValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QIntValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQIntValidator(h unsafe.Pointer) *QIntValidator { - return newQIntValidator((*C.QIntValidator)(h)) +// UnsafeNewQIntValidator constructs the type using only unsafe pointers. +func UnsafeNewQIntValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QIntValidator { + if h == nil { + return nil + } + + return &QIntValidator{h: (*C.QIntValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQIntValidator constructs a new QIntValidator object. func NewQIntValidator() *QIntValidator { - ret := C.QIntValidator_new() - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new(&outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIntValidator2 constructs a new QIntValidator object. func NewQIntValidator2(bottom int, top int) *QIntValidator { - ret := C.QIntValidator_new2((C.int)(bottom), (C.int)(top)) - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new2((C.int)(bottom), (C.int)(top), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIntValidator3 constructs a new QIntValidator object. func NewQIntValidator3(parent *QObject) *QIntValidator { - ret := C.QIntValidator_new3(parent.cPointer()) - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new3(parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQIntValidator4 constructs a new QIntValidator object. func NewQIntValidator4(bottom int, top int, parent *QObject) *QIntValidator { - ret := C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer()) - return newQIntValidator(ret) + var outptr_QIntValidator *C.QIntValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) + ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QIntValidator) MetaObject() *QMetaObject { @@ -329,9 +371,72 @@ func QIntValidator_Tr3(s string, c string, n int) string { return _ret } +func (this *QIntValidator) callVirtualBase_Validate(param1 string, param2 *int) QValidator__State { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + return (QValidator__State)(C.QIntValidator_virtualbase_Validate(unsafe.Pointer(this.h), param1_ms, (*C.int)(unsafe.Pointer(param2)))) + +} +func (this *QIntValidator) OnValidate(slot func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) { + C.QIntValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIntValidator_Validate +func miqt_exec_callback_QIntValidator_Validate(self *C.QIntValidator, cb C.intptr_t, param1 C.struct_miqt_string, param2 *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + slotval2 := (*int)(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QIntValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QIntValidator) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QIntValidator_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QIntValidator) OnFixup(slot func(super func(input string), input string)) { + C.QIntValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIntValidator_Fixup +func miqt_exec_callback_QIntValidator_Fixup(self *C.QIntValidator, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QIntValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + // Delete this object from C++ memory. func (this *QIntValidator) Delete() { - C.QIntValidator_Delete(this.h) + C.QIntValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -344,7 +449,8 @@ func (this *QIntValidator) GoGC() { } type QDoubleValidator struct { - h *C.QDoubleValidator + h *C.QDoubleValidator + isSubclass bool *QValidator } @@ -362,39 +468,71 @@ func (this *QDoubleValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDoubleValidator(h *C.QDoubleValidator) *QDoubleValidator { +// newQDoubleValidator constructs the type using only CGO pointers. +func newQDoubleValidator(h *C.QDoubleValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QDoubleValidator { if h == nil { return nil } - return &QDoubleValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QDoubleValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQDoubleValidator(h unsafe.Pointer) *QDoubleValidator { - return newQDoubleValidator((*C.QDoubleValidator)(h)) +// UnsafeNewQDoubleValidator constructs the type using only unsafe pointers. +func UnsafeNewQDoubleValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QDoubleValidator { + if h == nil { + return nil + } + + return &QDoubleValidator{h: (*C.QDoubleValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQDoubleValidator constructs a new QDoubleValidator object. func NewQDoubleValidator() *QDoubleValidator { - ret := C.QDoubleValidator_new() - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new(&outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDoubleValidator2 constructs a new QDoubleValidator object. func NewQDoubleValidator2(bottom float64, top float64, decimals int) *QDoubleValidator { - ret := C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals)) - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDoubleValidator3 constructs a new QDoubleValidator object. func NewQDoubleValidator3(parent *QObject) *QDoubleValidator { - ret := C.QDoubleValidator_new3(parent.cPointer()) - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new3(parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDoubleValidator4 constructs a new QDoubleValidator object. func NewQDoubleValidator4(bottom float64, top float64, decimals int, parent *QObject) *QDoubleValidator { - ret := C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer()) - return newQDoubleValidator(ret) + var outptr_QDoubleValidator *C.QDoubleValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) + ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDoubleValidator) MetaObject() *QMetaObject { @@ -574,9 +712,72 @@ func QDoubleValidator_Tr3(s string, c string, n int) string { return _ret } +func (this *QDoubleValidator) callVirtualBase_Validate(param1 string, param2 *int) QValidator__State { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + return (QValidator__State)(C.QDoubleValidator_virtualbase_Validate(unsafe.Pointer(this.h), param1_ms, (*C.int)(unsafe.Pointer(param2)))) + +} +func (this *QDoubleValidator) OnValidate(slot func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) { + C.QDoubleValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleValidator_Validate +func miqt_exec_callback_QDoubleValidator_Validate(self *C.QDoubleValidator, cb C.intptr_t, param1 C.struct_miqt_string, param2 *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 *int) QValidator__State, param1 string, param2 *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + slotval2 := (*int)(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QDoubleValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QDoubleValidator) callVirtualBase_Fixup(input string) { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + C.QDoubleValidator_virtualbase_Fixup(unsafe.Pointer(this.h), input_ms) + +} +func (this *QDoubleValidator) OnFixup(slot func(super func(input string), input string)) { + C.QDoubleValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDoubleValidator_Fixup +func miqt_exec_callback_QDoubleValidator_Fixup(self *C.QDoubleValidator, cb C.intptr_t, input C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string), input string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + + gofunc((&QDoubleValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + // Delete this object from C++ memory. func (this *QDoubleValidator) Delete() { - C.QDoubleValidator_Delete(this.h) + C.QDoubleValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -589,7 +790,8 @@ func (this *QDoubleValidator) GoGC() { } type QRegularExpressionValidator struct { - h *C.QRegularExpressionValidator + h *C.QRegularExpressionValidator + isSubclass bool *QValidator } @@ -607,39 +809,71 @@ func (this *QRegularExpressionValidator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQRegularExpressionValidator(h *C.QRegularExpressionValidator) *QRegularExpressionValidator { +// newQRegularExpressionValidator constructs the type using only CGO pointers. +func newQRegularExpressionValidator(h *C.QRegularExpressionValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QRegularExpressionValidator { if h == nil { return nil } - return &QRegularExpressionValidator{h: h, QValidator: UnsafeNewQValidator(unsafe.Pointer(h))} + return &QRegularExpressionValidator{h: h, + QValidator: newQValidator(h_QValidator, h_QObject)} } -func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer) *QRegularExpressionValidator { - return newQRegularExpressionValidator((*C.QRegularExpressionValidator)(h)) +// UnsafeNewQRegularExpressionValidator constructs the type using only unsafe pointers. +func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QRegularExpressionValidator { + if h == nil { + return nil + } + + return &QRegularExpressionValidator{h: (*C.QRegularExpressionValidator)(h), + QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} } // NewQRegularExpressionValidator constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator() *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new() - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new(&outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegularExpressionValidator2 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator2(re *QRegularExpression) *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new2(re.cPointer()) - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new2(re.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegularExpressionValidator3 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator3(parent *QObject) *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new3(parent.cPointer()) - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new3(parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } // NewQRegularExpressionValidator4 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator4(re *QRegularExpression, parent *QObject) *QRegularExpressionValidator { - ret := C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer()) - return newQRegularExpressionValidator(ret) + var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) + ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QRegularExpressionValidator) MetaObject() *QMetaObject { @@ -722,9 +956,72 @@ func QRegularExpressionValidator_Tr3(s string, c string, n int) string { return _ret } +func (this *QRegularExpressionValidator) callVirtualBase_Validate(input string, pos *int) QValidator__State { + input_ms := C.struct_miqt_string{} + input_ms.data = C.CString(input) + input_ms.len = C.size_t(len(input)) + defer C.free(unsafe.Pointer(input_ms.data)) + + return (QValidator__State)(C.QRegularExpressionValidator_virtualbase_Validate(unsafe.Pointer(this.h), input_ms, (*C.int)(unsafe.Pointer(pos)))) + +} +func (this *QRegularExpressionValidator) OnValidate(slot func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) { + C.QRegularExpressionValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRegularExpressionValidator_Validate +func miqt_exec_callback_QRegularExpressionValidator_Validate(self *C.QRegularExpressionValidator, cb C.intptr_t, input C.struct_miqt_string, pos *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(input string, pos *int) QValidator__State, input string, pos *int) QValidator__State) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var input_ms C.struct_miqt_string = input + input_ret := C.GoStringN(input_ms.data, C.int(int64(input_ms.len))) + C.free(unsafe.Pointer(input_ms.data)) + slotval1 := input_ret + slotval2 := (*int)(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QRegularExpressionValidator{h: self}).callVirtualBase_Validate, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QRegularExpressionValidator) callVirtualBase_Fixup(param1 string) { + param1_ms := C.struct_miqt_string{} + param1_ms.data = C.CString(param1) + param1_ms.len = C.size_t(len(param1)) + defer C.free(unsafe.Pointer(param1_ms.data)) + + C.QRegularExpressionValidator_virtualbase_Fixup(unsafe.Pointer(this.h), param1_ms) + +} +func (this *QRegularExpressionValidator) OnFixup(slot func(super func(param1 string), param1 string)) { + C.QRegularExpressionValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRegularExpressionValidator_Fixup +func miqt_exec_callback_QRegularExpressionValidator_Fixup(self *C.QRegularExpressionValidator, cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string), param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc((&QRegularExpressionValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + // Delete this object from C++ memory. func (this *QRegularExpressionValidator) Delete() { - C.QRegularExpressionValidator_Delete(this.h) + C.QRegularExpressionValidator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qvalidator.h b/qt6/gen_qvalidator.h index b9036eb7..c4029fa2 100644 --- a/qt6/gen_qvalidator.h +++ b/qt6/gen_qvalidator.h @@ -45,12 +45,12 @@ void QValidator_Changed(QValidator* self); void QValidator_connect_Changed(QValidator* self, intptr_t slot); struct miqt_string QValidator_Tr2(const char* s, const char* c); struct miqt_string QValidator_Tr3(const char* s, const char* c, int n); -void QValidator_Delete(QValidator* self); +void QValidator_Delete(QValidator* self, bool isSubclass); -QIntValidator* QIntValidator_new(); -QIntValidator* QIntValidator_new2(int bottom, int top); -QIntValidator* QIntValidator_new3(QObject* parent); -QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent); +void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QIntValidator_MetaObject(const QIntValidator* self); void* QIntValidator_Metacast(QIntValidator* self, const char* param1); struct miqt_string QIntValidator_Tr(const char* s); @@ -67,12 +67,16 @@ void QIntValidator_TopChanged(QIntValidator* self, int top); void QIntValidator_connect_TopChanged(QIntValidator* self, intptr_t slot); struct miqt_string QIntValidator_Tr2(const char* s, const char* c); struct miqt_string QIntValidator_Tr3(const char* s, const char* c, int n); -void QIntValidator_Delete(QIntValidator* self); +void QIntValidator_override_virtual_Validate(void* self, intptr_t slot); +int QIntValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2); +void QIntValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QIntValidator_virtualbase_Fixup(const void* self, struct miqt_string input); +void QIntValidator_Delete(QIntValidator* self, bool isSubclass); -QDoubleValidator* QDoubleValidator_new(); -QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals); -QDoubleValidator* QDoubleValidator_new3(QObject* parent); -QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent); +void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self); void* QDoubleValidator_Metacast(QDoubleValidator* self, const char* param1); struct miqt_string QDoubleValidator_Tr(const char* s); @@ -98,12 +102,16 @@ void QDoubleValidator_NotationChanged(QDoubleValidator* self, int notation); void QDoubleValidator_connect_NotationChanged(QDoubleValidator* self, intptr_t slot); struct miqt_string QDoubleValidator_Tr2(const char* s, const char* c); struct miqt_string QDoubleValidator_Tr3(const char* s, const char* c, int n); -void QDoubleValidator_Delete(QDoubleValidator* self); +void QDoubleValidator_override_virtual_Validate(void* self, intptr_t slot); +int QDoubleValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2); +void QDoubleValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QDoubleValidator_virtualbase_Fixup(const void* self, struct miqt_string input); +void QDoubleValidator_Delete(QDoubleValidator* self, bool isSubclass); -QRegularExpressionValidator* QRegularExpressionValidator_new(); -QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re); -QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent); -QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent); +void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self); void* QRegularExpressionValidator_Metacast(QRegularExpressionValidator* self, const char* param1); struct miqt_string QRegularExpressionValidator_Tr(const char* s); @@ -114,7 +122,11 @@ void QRegularExpressionValidator_RegularExpressionChanged(QRegularExpressionVali void QRegularExpressionValidator_connect_RegularExpressionChanged(QRegularExpressionValidator* self, intptr_t slot); struct miqt_string QRegularExpressionValidator_Tr2(const char* s, const char* c); struct miqt_string QRegularExpressionValidator_Tr3(const char* s, const char* c, int n); -void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self); +void QRegularExpressionValidator_override_virtual_Validate(void* self, intptr_t slot); +int QRegularExpressionValidator_virtualbase_Validate(const void* self, struct miqt_string input, int* pos); +void QRegularExpressionValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QRegularExpressionValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); +void QRegularExpressionValidator_Delete(QRegularExpressionValidator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qvariant.cpp b/qt6/gen_qvariant.cpp index fe609dd9..e438aad9 100644 --- a/qt6/gen_qvariant.cpp +++ b/qt6/gen_qvariant.cpp @@ -38,65 +38,79 @@ #include "gen_qvariant.h" #include "_cgo_export.h" -QVariant* QVariant_new() { - return new QVariant(); +void QVariant_new(QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(); + *outptr_QVariant = ret; } -QVariant* QVariant_new2(QMetaType* typeVal) { - return new QVariant(*typeVal); +void QVariant_new2(QMetaType* typeVal, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*typeVal); + *outptr_QVariant = ret; } -QVariant* QVariant_new3(QVariant* other) { - return new QVariant(*other); +void QVariant_new3(QVariant* other, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*other); + *outptr_QVariant = ret; } -QVariant* QVariant_new4(int i) { - return new QVariant(static_cast(i)); +void QVariant_new4(int i, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(i)); + *outptr_QVariant = ret; } -QVariant* QVariant_new5(unsigned int ui) { - return new QVariant(static_cast(ui)); +void QVariant_new5(unsigned int ui, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(ui)); + *outptr_QVariant = ret; } -QVariant* QVariant_new6(long long ll) { - return new QVariant(static_cast(ll)); +void QVariant_new6(long long ll, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(ll)); + *outptr_QVariant = ret; } -QVariant* QVariant_new7(unsigned long long ull) { - return new QVariant(static_cast(ull)); +void QVariant_new7(unsigned long long ull, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(ull)); + *outptr_QVariant = ret; } -QVariant* QVariant_new8(bool b) { - return new QVariant(b); +void QVariant_new8(bool b, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(b); + *outptr_QVariant = ret; } -QVariant* QVariant_new9(double d) { - return new QVariant(static_cast(d)); +void QVariant_new9(double d, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(d)); + *outptr_QVariant = ret; } -QVariant* QVariant_new10(float f) { - return new QVariant(static_cast(f)); +void QVariant_new10(float f, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(f)); + *outptr_QVariant = ret; } -QVariant* QVariant_new11(const char* str) { - return new QVariant(str); +void QVariant_new11(const char* str, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(str); + *outptr_QVariant = ret; } -QVariant* QVariant_new12(struct miqt_string bytearray) { +void QVariant_new12(struct miqt_string bytearray, QVariant** outptr_QVariant) { QByteArray bytearray_QByteArray(bytearray.data, bytearray.len); - return new QVariant(bytearray_QByteArray); + QVariant* ret = new QVariant(bytearray_QByteArray); + *outptr_QVariant = ret; } -QVariant* QVariant_new13(QBitArray* bitarray) { - return new QVariant(*bitarray); +void QVariant_new13(QBitArray* bitarray, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*bitarray); + *outptr_QVariant = ret; } -QVariant* QVariant_new14(struct miqt_string stringVal) { +void QVariant_new14(struct miqt_string stringVal, QVariant** outptr_QVariant) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - return new QVariant(stringVal_QString); + QVariant* ret = new QVariant(stringVal_QString); + *outptr_QVariant = ret; } -QVariant* QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist) { +void QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant) { QStringList stringlist_QList; stringlist_QList.reserve(stringlist.len); struct miqt_string* stringlist_arr = static_cast(stringlist.data); @@ -104,26 +118,31 @@ QVariant* QVariant_new15(struct miqt_array /* of struct miqt_string */ stringli QString stringlist_arr_i_QString = QString::fromUtf8(stringlist_arr[i].data, stringlist_arr[i].len); stringlist_QList.push_back(stringlist_arr_i_QString); } - return new QVariant(stringlist_QList); + QVariant* ret = new QVariant(stringlist_QList); + *outptr_QVariant = ret; } -QVariant* QVariant_new16(QChar* qchar) { - return new QVariant(*qchar); +void QVariant_new16(QChar* qchar, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*qchar); + *outptr_QVariant = ret; } -QVariant* QVariant_new17(QDate* date) { - return new QVariant(*date); +void QVariant_new17(QDate* date, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*date); + *outptr_QVariant = ret; } -QVariant* QVariant_new18(QTime* time) { - return new QVariant(*time); +void QVariant_new18(QTime* time, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*time); + *outptr_QVariant = ret; } -QVariant* QVariant_new19(QDateTime* datetime) { - return new QVariant(*datetime); +void QVariant_new19(QDateTime* datetime, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*datetime); + *outptr_QVariant = ret; } -QVariant* QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) { +void QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant) { QMap mapVal_QMap; struct miqt_string* mapVal_karr = static_cast(mapVal.keys); QVariant** mapVal_varr = static_cast(mapVal.values); @@ -131,10 +150,11 @@ QVariant* QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* * QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len); mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]); } - return new QVariant(mapVal_QMap); + QVariant* ret = new QVariant(mapVal_QMap); + *outptr_QVariant = ret; } -QVariant* QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash) { +void QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant) { QHash hash_QMap; hash_QMap.reserve(hash.len); struct miqt_string* hash_karr = static_cast(hash.keys); @@ -143,91 +163,113 @@ QVariant* QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* * QString hash_karr_i_QString = QString::fromUtf8(hash_karr[i].data, hash_karr[i].len); hash_QMap[hash_karr_i_QString] = *(hash_varr[i]); } - return new QVariant(hash_QMap); + QVariant* ret = new QVariant(hash_QMap); + *outptr_QVariant = ret; } -QVariant* QVariant_new22(QSize* size) { - return new QVariant(*size); +void QVariant_new22(QSize* size, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*size); + *outptr_QVariant = ret; } -QVariant* QVariant_new23(QSizeF* size) { - return new QVariant(*size); +void QVariant_new23(QSizeF* size, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*size); + *outptr_QVariant = ret; } -QVariant* QVariant_new24(QPoint* pt) { - return new QVariant(*pt); +void QVariant_new24(QPoint* pt, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*pt); + *outptr_QVariant = ret; } -QVariant* QVariant_new25(QPointF* pt) { - return new QVariant(*pt); +void QVariant_new25(QPointF* pt, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*pt); + *outptr_QVariant = ret; } -QVariant* QVariant_new26(QLine* line) { - return new QVariant(*line); +void QVariant_new26(QLine* line, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*line); + *outptr_QVariant = ret; } -QVariant* QVariant_new27(QLineF* line) { - return new QVariant(*line); +void QVariant_new27(QLineF* line, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*line); + *outptr_QVariant = ret; } -QVariant* QVariant_new28(QRect* rect) { - return new QVariant(*rect); +void QVariant_new28(QRect* rect, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*rect); + *outptr_QVariant = ret; } -QVariant* QVariant_new29(QRectF* rect) { - return new QVariant(*rect); +void QVariant_new29(QRectF* rect, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*rect); + *outptr_QVariant = ret; } -QVariant* QVariant_new30(QLocale* locale) { - return new QVariant(*locale); +void QVariant_new30(QLocale* locale, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*locale); + *outptr_QVariant = ret; } -QVariant* QVariant_new31(QRegularExpression* re) { - return new QVariant(*re); +void QVariant_new31(QRegularExpression* re, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*re); + *outptr_QVariant = ret; } -QVariant* QVariant_new32(QEasingCurve* easing) { - return new QVariant(*easing); +void QVariant_new32(QEasingCurve* easing, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*easing); + *outptr_QVariant = ret; } -QVariant* QVariant_new33(QUuid* uuid) { - return new QVariant(*uuid); +void QVariant_new33(QUuid* uuid, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*uuid); + *outptr_QVariant = ret; } -QVariant* QVariant_new34(QUrl* url) { - return new QVariant(*url); +void QVariant_new34(QUrl* url, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*url); + *outptr_QVariant = ret; } -QVariant* QVariant_new35(QJsonValue* jsonValue) { - return new QVariant(*jsonValue); +void QVariant_new35(QJsonValue* jsonValue, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonValue); + *outptr_QVariant = ret; } -QVariant* QVariant_new36(QJsonObject* jsonObject) { - return new QVariant(*jsonObject); +void QVariant_new36(QJsonObject* jsonObject, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonObject); + *outptr_QVariant = ret; } -QVariant* QVariant_new37(QJsonArray* jsonArray) { - return new QVariant(*jsonArray); +void QVariant_new37(QJsonArray* jsonArray, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonArray); + *outptr_QVariant = ret; } -QVariant* QVariant_new38(QJsonDocument* jsonDocument) { - return new QVariant(*jsonDocument); +void QVariant_new38(QJsonDocument* jsonDocument, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*jsonDocument); + *outptr_QVariant = ret; } -QVariant* QVariant_new39(QModelIndex* modelIndex) { - return new QVariant(*modelIndex); +void QVariant_new39(QModelIndex* modelIndex, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*modelIndex); + *outptr_QVariant = ret; } -QVariant* QVariant_new40(QPersistentModelIndex* modelIndex) { - return new QVariant(*modelIndex); +void QVariant_new40(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*modelIndex); + *outptr_QVariant = ret; } -QVariant* QVariant_new41(int typeVal) { - return new QVariant(static_cast(typeVal)); +void QVariant_new41(int typeVal, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(static_cast(typeVal)); + *outptr_QVariant = ret; } -QVariant* QVariant_new42(QMetaType* typeVal, const void* copyVal) { - return new QVariant(*typeVal, copyVal); +void QVariant_new42(QMetaType* typeVal, const void* copyVal, QVariant** outptr_QVariant) { + QVariant* ret = new QVariant(*typeVal, copyVal); + *outptr_QVariant = ret; } void QVariant_OperatorAssign(QVariant* self, QVariant* other) { @@ -590,8 +632,12 @@ double QVariant_ToReal1(const QVariant* self, bool* ok) { return static_cast(_ret); } -void QVariant_Delete(QVariant* self) { - delete self; +void QVariant_Delete(QVariant* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } const void* QtPrivate__QVariantTypeCoercer_Convert(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal) { @@ -602,16 +648,22 @@ const void* QtPrivate__QVariantTypeCoercer_Coerce(QtPrivate__QVariantTypeCoercer return (const void*) self->coerce(*value, *typeVal); } -void QtPrivate__QVariantTypeCoercer_Delete(QtPrivate__QVariantTypeCoercer* self) { - delete self; +void QtPrivate__QVariantTypeCoercer_Delete(QtPrivate__QVariantTypeCoercer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QVariantConstPointer* QVariantConstPointer_new(QVariant* variant) { - return new QVariantConstPointer(*variant); +void QVariantConstPointer_new(QVariant* variant, QVariantConstPointer** outptr_QVariantConstPointer) { + QVariantConstPointer* ret = new QVariantConstPointer(*variant); + *outptr_QVariantConstPointer = ret; } -QVariantConstPointer* QVariantConstPointer_new2(QVariantConstPointer* param1) { - return new QVariantConstPointer(*param1); +void QVariantConstPointer_new2(QVariantConstPointer* param1, QVariantConstPointer** outptr_QVariantConstPointer) { + QVariantConstPointer* ret = new QVariantConstPointer(*param1); + *outptr_QVariantConstPointer = ret; } QVariant* QVariantConstPointer_OperatorMultiply(const QVariantConstPointer* self) { @@ -626,7 +678,11 @@ void QVariantConstPointer_OperatorAssign(QVariantConstPointer* self, QVariantCon self->operator=(*param1); } -void QVariantConstPointer_Delete(QVariantConstPointer* self) { - delete self; +void QVariantConstPointer_Delete(QVariantConstPointer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qvariant.go b/qt6/gen_qvariant.go index 4383beb6..27460a4b 100644 --- a/qt6/gen_qvariant.go +++ b/qt6/gen_qvariant.go @@ -79,7 +79,8 @@ const ( ) type QVariant struct { - h *C.QVariant + h *C.QVariant + isSubclass bool } func (this *QVariant) cPointer() *C.QVariant { @@ -96,6 +97,7 @@ func (this *QVariant) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVariant constructs the type using only CGO pointers. func newQVariant(h *C.QVariant) *QVariant { if h == nil { return nil @@ -103,76 +105,125 @@ func newQVariant(h *C.QVariant) *QVariant { return &QVariant{h: h} } +// UnsafeNewQVariant constructs the type using only unsafe pointers. func UnsafeNewQVariant(h unsafe.Pointer) *QVariant { - return newQVariant((*C.QVariant)(h)) + if h == nil { + return nil + } + + return &QVariant{h: (*C.QVariant)(h)} } // NewQVariant constructs a new QVariant object. func NewQVariant() *QVariant { - ret := C.QVariant_new() - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new(&outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant2 constructs a new QVariant object. func NewQVariant2(typeVal QMetaType) *QVariant { - ret := C.QVariant_new2(typeVal.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new2(typeVal.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant3 constructs a new QVariant object. func NewQVariant3(other *QVariant) *QVariant { - ret := C.QVariant_new3(other.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new3(other.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant4 constructs a new QVariant object. func NewQVariant4(i int) *QVariant { - ret := C.QVariant_new4((C.int)(i)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new4((C.int)(i), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant5 constructs a new QVariant object. func NewQVariant5(ui uint) *QVariant { - ret := C.QVariant_new5((C.uint)(ui)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new5((C.uint)(ui), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant6 constructs a new QVariant object. func NewQVariant6(ll int64) *QVariant { - ret := C.QVariant_new6((C.longlong)(ll)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new6((C.longlong)(ll), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant7 constructs a new QVariant object. func NewQVariant7(ull uint64) *QVariant { - ret := C.QVariant_new7((C.ulonglong)(ull)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new7((C.ulonglong)(ull), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant8 constructs a new QVariant object. func NewQVariant8(b bool) *QVariant { - ret := C.QVariant_new8((C.bool)(b)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new8((C.bool)(b), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant9 constructs a new QVariant object. func NewQVariant9(d float64) *QVariant { - ret := C.QVariant_new9((C.double)(d)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new9((C.double)(d), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant10 constructs a new QVariant object. func NewQVariant10(f float32) *QVariant { - ret := C.QVariant_new10((C.float)(f)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new10((C.float)(f), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant11 constructs a new QVariant object. func NewQVariant11(str string) *QVariant { str_Cstring := C.CString(str) defer C.free(unsafe.Pointer(str_Cstring)) - ret := C.QVariant_new11(str_Cstring) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new11(str_Cstring, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant12 constructs a new QVariant object. @@ -180,14 +231,22 @@ func NewQVariant12(bytearray []byte) *QVariant { bytearray_alias := C.struct_miqt_string{} bytearray_alias.data = (*C.char)(unsafe.Pointer(&bytearray[0])) bytearray_alias.len = C.size_t(len(bytearray)) - ret := C.QVariant_new12(bytearray_alias) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new12(bytearray_alias, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant13 constructs a new QVariant object. func NewQVariant13(bitarray *QBitArray) *QVariant { - ret := C.QVariant_new13(bitarray.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new13(bitarray.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant14 constructs a new QVariant object. @@ -196,8 +255,12 @@ func NewQVariant14(stringVal string) *QVariant { stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - ret := C.QVariant_new14(stringVal_ms) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new14(stringVal_ms, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant15 constructs a new QVariant object. @@ -212,32 +275,52 @@ func NewQVariant15(stringlist []string) *QVariant { stringlist_CArray[i] = stringlist_i_ms } stringlist_ma := C.struct_miqt_array{len: C.size_t(len(stringlist)), data: unsafe.Pointer(stringlist_CArray)} - ret := C.QVariant_new15(stringlist_ma) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new15(stringlist_ma, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant16 constructs a new QVariant object. func NewQVariant16(qchar QChar) *QVariant { - ret := C.QVariant_new16(qchar.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new16(qchar.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant17 constructs a new QVariant object. func NewQVariant17(date QDate) *QVariant { - ret := C.QVariant_new17(date.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new17(date.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant18 constructs a new QVariant object. func NewQVariant18(time QTime) *QVariant { - ret := C.QVariant_new18(time.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new18(time.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant19 constructs a new QVariant object. func NewQVariant19(datetime *QDateTime) *QVariant { - ret := C.QVariant_new19(datetime.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new19(datetime.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant20 constructs a new QVariant object. @@ -261,8 +344,12 @@ func NewQVariant20(mapVal map[string]QVariant) *QVariant { keys: unsafe.Pointer(mapVal_Keys_CArray), values: unsafe.Pointer(mapVal_Values_CArray), } - ret := C.QVariant_new20(mapVal_mm) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new20(mapVal_mm, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant21 constructs a new QVariant object. @@ -286,134 +373,222 @@ func NewQVariant21(hash map[string]QVariant) *QVariant { keys: unsafe.Pointer(hash_Keys_CArray), values: unsafe.Pointer(hash_Values_CArray), } - ret := C.QVariant_new21(hash_mm) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new21(hash_mm, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant22 constructs a new QVariant object. func NewQVariant22(size *QSize) *QVariant { - ret := C.QVariant_new22(size.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new22(size.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant23 constructs a new QVariant object. func NewQVariant23(size *QSizeF) *QVariant { - ret := C.QVariant_new23(size.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new23(size.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant24 constructs a new QVariant object. func NewQVariant24(pt *QPoint) *QVariant { - ret := C.QVariant_new24(pt.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new24(pt.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant25 constructs a new QVariant object. func NewQVariant25(pt *QPointF) *QVariant { - ret := C.QVariant_new25(pt.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new25(pt.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant26 constructs a new QVariant object. func NewQVariant26(line *QLine) *QVariant { - ret := C.QVariant_new26(line.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new26(line.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant27 constructs a new QVariant object. func NewQVariant27(line *QLineF) *QVariant { - ret := C.QVariant_new27(line.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new27(line.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant28 constructs a new QVariant object. func NewQVariant28(rect *QRect) *QVariant { - ret := C.QVariant_new28(rect.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new28(rect.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant29 constructs a new QVariant object. func NewQVariant29(rect *QRectF) *QVariant { - ret := C.QVariant_new29(rect.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new29(rect.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant30 constructs a new QVariant object. func NewQVariant30(locale *QLocale) *QVariant { - ret := C.QVariant_new30(locale.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new30(locale.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant31 constructs a new QVariant object. func NewQVariant31(re *QRegularExpression) *QVariant { - ret := C.QVariant_new31(re.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new31(re.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant32 constructs a new QVariant object. func NewQVariant32(easing *QEasingCurve) *QVariant { - ret := C.QVariant_new32(easing.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new32(easing.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant33 constructs a new QVariant object. func NewQVariant33(uuid *QUuid) *QVariant { - ret := C.QVariant_new33(uuid.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new33(uuid.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant34 constructs a new QVariant object. func NewQVariant34(url *QUrl) *QVariant { - ret := C.QVariant_new34(url.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new34(url.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant35 constructs a new QVariant object. func NewQVariant35(jsonValue *QJsonValue) *QVariant { - ret := C.QVariant_new35(jsonValue.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new35(jsonValue.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant36 constructs a new QVariant object. func NewQVariant36(jsonObject *QJsonObject) *QVariant { - ret := C.QVariant_new36(jsonObject.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new36(jsonObject.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant37 constructs a new QVariant object. func NewQVariant37(jsonArray *QJsonArray) *QVariant { - ret := C.QVariant_new37(jsonArray.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new37(jsonArray.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant38 constructs a new QVariant object. func NewQVariant38(jsonDocument *QJsonDocument) *QVariant { - ret := C.QVariant_new38(jsonDocument.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new38(jsonDocument.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant39 constructs a new QVariant object. func NewQVariant39(modelIndex *QModelIndex) *QVariant { - ret := C.QVariant_new39(modelIndex.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new39(modelIndex.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant40 constructs a new QVariant object. func NewQVariant40(modelIndex *QPersistentModelIndex) *QVariant { - ret := C.QVariant_new40(modelIndex.cPointer()) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new40(modelIndex.cPointer(), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant41 constructs a new QVariant object. func NewQVariant41(typeVal QVariant__Type) *QVariant { - ret := C.QVariant_new41((C.int)(typeVal)) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new41((C.int)(typeVal), &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } // NewQVariant42 constructs a new QVariant object. func NewQVariant42(typeVal QMetaType, copyVal unsafe.Pointer) *QVariant { - ret := C.QVariant_new42(typeVal.cPointer(), copyVal) - return newQVariant(ret) + var outptr_QVariant *C.QVariant = nil + + C.QVariant_new42(typeVal.cPointer(), copyVal, &outptr_QVariant) + ret := newQVariant(outptr_QVariant) + ret.isSubclass = true + return ret } func (this *QVariant) OperatorAssign(other *QVariant) { @@ -827,7 +1002,7 @@ func (this *QVariant) ToReal1(ok *bool) float64 { // Delete this object from C++ memory. func (this *QVariant) Delete() { - C.QVariant_Delete(this.h) + C.QVariant_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -840,7 +1015,8 @@ func (this *QVariant) GoGC() { } type QtPrivate__QVariantTypeCoercer struct { - h *C.QtPrivate__QVariantTypeCoercer + h *C.QtPrivate__QVariantTypeCoercer + isSubclass bool } func (this *QtPrivate__QVariantTypeCoercer) cPointer() *C.QtPrivate__QVariantTypeCoercer { @@ -857,6 +1033,7 @@ func (this *QtPrivate__QVariantTypeCoercer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QVariantTypeCoercer constructs the type using only CGO pointers. func newQtPrivate__QVariantTypeCoercer(h *C.QtPrivate__QVariantTypeCoercer) *QtPrivate__QVariantTypeCoercer { if h == nil { return nil @@ -864,8 +1041,13 @@ func newQtPrivate__QVariantTypeCoercer(h *C.QtPrivate__QVariantTypeCoercer) *QtP return &QtPrivate__QVariantTypeCoercer{h: h} } +// UnsafeNewQtPrivate__QVariantTypeCoercer constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QVariantTypeCoercer(h unsafe.Pointer) *QtPrivate__QVariantTypeCoercer { - return newQtPrivate__QVariantTypeCoercer((*C.QtPrivate__QVariantTypeCoercer)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QVariantTypeCoercer{h: (*C.QtPrivate__QVariantTypeCoercer)(h)} } func (this *QtPrivate__QVariantTypeCoercer) Convert(value *QVariant, typeVal *QMetaType) unsafe.Pointer { @@ -878,7 +1060,7 @@ func (this *QtPrivate__QVariantTypeCoercer) Coerce(value *QVariant, typeVal *QMe // Delete this object from C++ memory. func (this *QtPrivate__QVariantTypeCoercer) Delete() { - C.QtPrivate__QVariantTypeCoercer_Delete(this.h) + C.QtPrivate__QVariantTypeCoercer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -891,7 +1073,8 @@ func (this *QtPrivate__QVariantTypeCoercer) GoGC() { } type QVariantConstPointer struct { - h *C.QVariantConstPointer + h *C.QVariantConstPointer + isSubclass bool } func (this *QVariantConstPointer) cPointer() *C.QVariantConstPointer { @@ -908,6 +1091,7 @@ func (this *QVariantConstPointer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVariantConstPointer constructs the type using only CGO pointers. func newQVariantConstPointer(h *C.QVariantConstPointer) *QVariantConstPointer { if h == nil { return nil @@ -915,20 +1099,33 @@ func newQVariantConstPointer(h *C.QVariantConstPointer) *QVariantConstPointer { return &QVariantConstPointer{h: h} } +// UnsafeNewQVariantConstPointer constructs the type using only unsafe pointers. func UnsafeNewQVariantConstPointer(h unsafe.Pointer) *QVariantConstPointer { - return newQVariantConstPointer((*C.QVariantConstPointer)(h)) + if h == nil { + return nil + } + + return &QVariantConstPointer{h: (*C.QVariantConstPointer)(h)} } // NewQVariantConstPointer constructs a new QVariantConstPointer object. func NewQVariantConstPointer(variant QVariant) *QVariantConstPointer { - ret := C.QVariantConstPointer_new(variant.cPointer()) - return newQVariantConstPointer(ret) + var outptr_QVariantConstPointer *C.QVariantConstPointer = nil + + C.QVariantConstPointer_new(variant.cPointer(), &outptr_QVariantConstPointer) + ret := newQVariantConstPointer(outptr_QVariantConstPointer) + ret.isSubclass = true + return ret } // NewQVariantConstPointer2 constructs a new QVariantConstPointer object. func NewQVariantConstPointer2(param1 *QVariantConstPointer) *QVariantConstPointer { - ret := C.QVariantConstPointer_new2(param1.cPointer()) - return newQVariantConstPointer(ret) + var outptr_QVariantConstPointer *C.QVariantConstPointer = nil + + C.QVariantConstPointer_new2(param1.cPointer(), &outptr_QVariantConstPointer) + ret := newQVariantConstPointer(outptr_QVariantConstPointer) + ret.isSubclass = true + return ret } func (this *QVariantConstPointer) OperatorMultiply() *QVariant { @@ -948,7 +1145,7 @@ func (this *QVariantConstPointer) OperatorAssign(param1 *QVariantConstPointer) { // Delete this object from C++ memory. func (this *QVariantConstPointer) Delete() { - C.QVariantConstPointer_Delete(this.h) + C.QVariantConstPointer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qvariant.h b/qt6/gen_qvariant.h index 4b9717fa..02522c5f 100644 --- a/qt6/gen_qvariant.h +++ b/qt6/gen_qvariant.h @@ -84,48 +84,48 @@ typedef struct QVariantConstPointer QVariantConstPointer; typedef struct QtPrivate__QVariantTypeCoercer QtPrivate__QVariantTypeCoercer; #endif -QVariant* QVariant_new(); -QVariant* QVariant_new2(QMetaType* typeVal); -QVariant* QVariant_new3(QVariant* other); -QVariant* QVariant_new4(int i); -QVariant* QVariant_new5(unsigned int ui); -QVariant* QVariant_new6(long long ll); -QVariant* QVariant_new7(unsigned long long ull); -QVariant* QVariant_new8(bool b); -QVariant* QVariant_new9(double d); -QVariant* QVariant_new10(float f); -QVariant* QVariant_new11(const char* str); -QVariant* QVariant_new12(struct miqt_string bytearray); -QVariant* QVariant_new13(QBitArray* bitarray); -QVariant* QVariant_new14(struct miqt_string stringVal); -QVariant* QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist); -QVariant* QVariant_new16(QChar* qchar); -QVariant* QVariant_new17(QDate* date); -QVariant* QVariant_new18(QTime* time); -QVariant* QVariant_new19(QDateTime* datetime); -QVariant* QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); -QVariant* QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash); -QVariant* QVariant_new22(QSize* size); -QVariant* QVariant_new23(QSizeF* size); -QVariant* QVariant_new24(QPoint* pt); -QVariant* QVariant_new25(QPointF* pt); -QVariant* QVariant_new26(QLine* line); -QVariant* QVariant_new27(QLineF* line); -QVariant* QVariant_new28(QRect* rect); -QVariant* QVariant_new29(QRectF* rect); -QVariant* QVariant_new30(QLocale* locale); -QVariant* QVariant_new31(QRegularExpression* re); -QVariant* QVariant_new32(QEasingCurve* easing); -QVariant* QVariant_new33(QUuid* uuid); -QVariant* QVariant_new34(QUrl* url); -QVariant* QVariant_new35(QJsonValue* jsonValue); -QVariant* QVariant_new36(QJsonObject* jsonObject); -QVariant* QVariant_new37(QJsonArray* jsonArray); -QVariant* QVariant_new38(QJsonDocument* jsonDocument); -QVariant* QVariant_new39(QModelIndex* modelIndex); -QVariant* QVariant_new40(QPersistentModelIndex* modelIndex); -QVariant* QVariant_new41(int typeVal); -QVariant* QVariant_new42(QMetaType* typeVal, const void* copyVal); +void QVariant_new(QVariant** outptr_QVariant); +void QVariant_new2(QMetaType* typeVal, QVariant** outptr_QVariant); +void QVariant_new3(QVariant* other, QVariant** outptr_QVariant); +void QVariant_new4(int i, QVariant** outptr_QVariant); +void QVariant_new5(unsigned int ui, QVariant** outptr_QVariant); +void QVariant_new6(long long ll, QVariant** outptr_QVariant); +void QVariant_new7(unsigned long long ull, QVariant** outptr_QVariant); +void QVariant_new8(bool b, QVariant** outptr_QVariant); +void QVariant_new9(double d, QVariant** outptr_QVariant); +void QVariant_new10(float f, QVariant** outptr_QVariant); +void QVariant_new11(const char* str, QVariant** outptr_QVariant); +void QVariant_new12(struct miqt_string bytearray, QVariant** outptr_QVariant); +void QVariant_new13(QBitArray* bitarray, QVariant** outptr_QVariant); +void QVariant_new14(struct miqt_string stringVal, QVariant** outptr_QVariant); +void QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant); +void QVariant_new16(QChar* qchar, QVariant** outptr_QVariant); +void QVariant_new17(QDate* date, QVariant** outptr_QVariant); +void QVariant_new18(QTime* time, QVariant** outptr_QVariant); +void QVariant_new19(QDateTime* datetime, QVariant** outptr_QVariant); +void QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant); +void QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant); +void QVariant_new22(QSize* size, QVariant** outptr_QVariant); +void QVariant_new23(QSizeF* size, QVariant** outptr_QVariant); +void QVariant_new24(QPoint* pt, QVariant** outptr_QVariant); +void QVariant_new25(QPointF* pt, QVariant** outptr_QVariant); +void QVariant_new26(QLine* line, QVariant** outptr_QVariant); +void QVariant_new27(QLineF* line, QVariant** outptr_QVariant); +void QVariant_new28(QRect* rect, QVariant** outptr_QVariant); +void QVariant_new29(QRectF* rect, QVariant** outptr_QVariant); +void QVariant_new30(QLocale* locale, QVariant** outptr_QVariant); +void QVariant_new31(QRegularExpression* re, QVariant** outptr_QVariant); +void QVariant_new32(QEasingCurve* easing, QVariant** outptr_QVariant); +void QVariant_new33(QUuid* uuid, QVariant** outptr_QVariant); +void QVariant_new34(QUrl* url, QVariant** outptr_QVariant); +void QVariant_new35(QJsonValue* jsonValue, QVariant** outptr_QVariant); +void QVariant_new36(QJsonObject* jsonObject, QVariant** outptr_QVariant); +void QVariant_new37(QJsonArray* jsonArray, QVariant** outptr_QVariant); +void QVariant_new38(QJsonDocument* jsonDocument, QVariant** outptr_QVariant); +void QVariant_new39(QModelIndex* modelIndex, QVariant** outptr_QVariant); +void QVariant_new40(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant); +void QVariant_new41(int typeVal, QVariant** outptr_QVariant); +void QVariant_new42(QMetaType* typeVal, const void* copyVal, QVariant** outptr_QVariant); void QVariant_OperatorAssign(QVariant* self, QVariant* other); void QVariant_Swap(QVariant* self, QVariant* other); int QVariant_UserType(const QVariant* self); @@ -196,18 +196,18 @@ unsigned long long QVariant_ToULongLong1(const QVariant* self, bool* ok); double QVariant_ToDouble1(const QVariant* self, bool* ok); float QVariant_ToFloat1(const QVariant* self, bool* ok); double QVariant_ToReal1(const QVariant* self, bool* ok); -void QVariant_Delete(QVariant* self); +void QVariant_Delete(QVariant* self, bool isSubclass); const void* QtPrivate__QVariantTypeCoercer_Convert(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal); const void* QtPrivate__QVariantTypeCoercer_Coerce(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal); -void QtPrivate__QVariantTypeCoercer_Delete(QtPrivate__QVariantTypeCoercer* self); +void QtPrivate__QVariantTypeCoercer_Delete(QtPrivate__QVariantTypeCoercer* self, bool isSubclass); -QVariantConstPointer* QVariantConstPointer_new(QVariant* variant); -QVariantConstPointer* QVariantConstPointer_new2(QVariantConstPointer* param1); +void QVariantConstPointer_new(QVariant* variant, QVariantConstPointer** outptr_QVariantConstPointer); +void QVariantConstPointer_new2(QVariantConstPointer* param1, QVariantConstPointer** outptr_QVariantConstPointer); QVariant* QVariantConstPointer_OperatorMultiply(const QVariantConstPointer* self); QVariant* QVariantConstPointer_OperatorMinusGreater(const QVariantConstPointer* self); void QVariantConstPointer_OperatorAssign(QVariantConstPointer* self, QVariantConstPointer* param1); -void QVariantConstPointer_Delete(QVariantConstPointer* self); +void QVariantConstPointer_Delete(QVariantConstPointer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qvariantanimation.cpp b/qt6/gen_qvariantanimation.cpp index c8df6b62..89216162 100644 --- a/qt6/gen_qvariantanimation.cpp +++ b/qt6/gen_qvariantanimation.cpp @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -11,12 +13,205 @@ #include "gen_qvariantanimation.h" #include "_cgo_export.h" -QVariantAnimation* QVariantAnimation_new() { - return new QVariantAnimation(); +class MiqtVirtualQVariantAnimation : public virtual QVariantAnimation { +public: + + MiqtVirtualQVariantAnimation(): QVariantAnimation() {}; + MiqtVirtualQVariantAnimation(QObject* parent): QVariantAnimation(parent) {}; + + virtual ~MiqtVirtualQVariantAnimation() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Duration = 0; + + // Subclass to allow providing a Go implementation + virtual int duration() const override { + if (handle__Duration == 0) { + return QVariantAnimation::duration(); + } + + + int callback_return_value = miqt_exec_callback_QVariantAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Duration() const { + + return QVariantAnimation::duration(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QVariantAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QVariantAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QVariantAnimation::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentTime = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentTime(int param1) override { + if (handle__UpdateCurrentTime == 0) { + QVariantAnimation::updateCurrentTime(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QVariantAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentTime(int param1) { + + QVariantAnimation::updateCurrentTime(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override { + if (handle__UpdateState == 0) { + QVariantAnimation::updateState(newState, oldState); + return; + } + + QAbstractAnimation::State newState_ret = newState; + int sigval1 = static_cast(newState_ret); + QAbstractAnimation::State oldState_ret = oldState; + int sigval2 = static_cast(oldState_ret); + + miqt_exec_callback_QVariantAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QVariantAnimation::updateState(static_cast(newState), static_cast(oldState)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCurrentValue = 0; + + // Subclass to allow providing a Go implementation + virtual void updateCurrentValue(const QVariant& value) override { + if (handle__UpdateCurrentValue == 0) { + QVariantAnimation::updateCurrentValue(value); + return; + } + + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&value_ret); + + miqt_exec_callback_QVariantAnimation_UpdateCurrentValue(this, handle__UpdateCurrentValue, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateCurrentValue(QVariant* value) { + + QVariantAnimation::updateCurrentValue(*value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Interpolated = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant interpolated(const QVariant& from, const QVariant& to, qreal progress) const override { + if (handle__Interpolated == 0) { + return QVariantAnimation::interpolated(from, to, progress); + } + + const QVariant& from_ret = from; + // Cast returned reference into pointer + QVariant* sigval1 = const_cast(&from_ret); + const QVariant& to_ret = to; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&to_ret); + qreal progress_ret = progress; + double sigval3 = static_cast(progress_ret); + + QVariant* callback_return_value = miqt_exec_callback_QVariantAnimation_Interpolated(const_cast(this), handle__Interpolated, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Interpolated(QVariant* from, QVariant* to, double progress) const { + + return new QVariant(QVariantAnimation::interpolated(*from, *to, static_cast(progress))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateDirection = 0; + + // Subclass to allow providing a Go implementation + virtual void updateDirection(QAbstractAnimation::Direction direction) override { + if (handle__UpdateDirection == 0) { + QVariantAnimation::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QVariantAnimation_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QVariantAnimation::updateDirection(static_cast(direction)); + + } + +}; + +void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(); + *outptr_QVariantAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QVariantAnimation* QVariantAnimation_new2(QObject* parent) { - return new QVariantAnimation(parent); +void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(parent); + *outptr_QVariantAnimation = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self) { @@ -125,7 +320,7 @@ void QVariantAnimation_ValueChanged(QVariantAnimation* self, QVariant* value) { } void QVariantAnimation_connect_ValueChanged(QVariantAnimation* self, intptr_t slot) { - QVariantAnimation::connect(self, static_cast(&QVariantAnimation::valueChanged), self, [=](const QVariant& value) { + MiqtVirtualQVariantAnimation::connect(self, static_cast(&QVariantAnimation::valueChanged), self, [=](const QVariant& value) { const QVariant& value_ret = value; // Cast returned reference into pointer QVariant* sigval1 = const_cast(&value_ret); @@ -155,7 +350,67 @@ struct miqt_string QVariantAnimation_Tr3(const char* s, const char* c, int n) { return _ms; } -void QVariantAnimation_Delete(QVariantAnimation* self) { - delete self; +void QVariantAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__Duration = slot; +} + +int QVariantAnimation_virtualbase_Duration(const void* self) { + return ( (const MiqtVirtualQVariantAnimation*)(self) )->virtualbase_Duration(); +} + +void QVariantAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__Event = slot; +} + +bool QVariantAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_Event(event); +} + +void QVariantAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QVariantAnimation_virtualbase_UpdateCurrentTime(void* self, int param1) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateCurrentTime(param1); +} + +void QVariantAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateState = slot; +} + +void QVariantAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QVariantAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateCurrentValue = slot; +} + +void QVariantAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateCurrentValue(value); +} + +void QVariantAnimation_override_virtual_Interpolated(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__Interpolated = slot; +} + +QVariant* QVariantAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress) { + return ( (const MiqtVirtualQVariantAnimation*)(self) )->virtualbase_Interpolated(from, to, progress); +} + +void QVariantAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QVariantAnimation*)(self) )->handle__UpdateDirection = slot; +} + +void QVariantAnimation_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQVariantAnimation*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QVariantAnimation_Delete(QVariantAnimation* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qvariantanimation.go b/qt6/gen_qvariantanimation.go index 08d8175c..f8215c99 100644 --- a/qt6/gen_qvariantanimation.go +++ b/qt6/gen_qvariantanimation.go @@ -15,7 +15,8 @@ import ( ) type QVariantAnimation struct { - h *C.QVariantAnimation + h *C.QVariantAnimation + isSubclass bool *QAbstractAnimation } @@ -33,27 +34,47 @@ func (this *QVariantAnimation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVariantAnimation(h *C.QVariantAnimation) *QVariantAnimation { +// newQVariantAnimation constructs the type using only CGO pointers. +func newQVariantAnimation(h *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QVariantAnimation { if h == nil { return nil } - return &QVariantAnimation{h: h, QAbstractAnimation: UnsafeNewQAbstractAnimation(unsafe.Pointer(h))} + return &QVariantAnimation{h: h, + QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } -func UnsafeNewQVariantAnimation(h unsafe.Pointer) *QVariantAnimation { - return newQVariantAnimation((*C.QVariantAnimation)(h)) +// UnsafeNewQVariantAnimation constructs the type using only unsafe pointers. +func UnsafeNewQVariantAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QVariantAnimation { + if h == nil { + return nil + } + + return &QVariantAnimation{h: (*C.QVariantAnimation)(h), + QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } // NewQVariantAnimation constructs a new QVariantAnimation object. func NewQVariantAnimation() *QVariantAnimation { - ret := C.QVariantAnimation_new() - return newQVariantAnimation(ret) + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QVariantAnimation_new(&outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } // NewQVariantAnimation2 constructs a new QVariantAnimation object. func NewQVariantAnimation2(parent *QObject) *QVariantAnimation { - ret := C.QVariantAnimation_new2(parent.cPointer()) - return newQVariantAnimation(ret) + var outptr_QVariantAnimation *C.QVariantAnimation = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QVariantAnimation_new2(parent.cPointer(), &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QVariantAnimation) MetaObject() *QMetaObject { @@ -229,9 +250,180 @@ func QVariantAnimation_Tr3(s string, c string, n int) string { return _ret } +func (this *QVariantAnimation) callVirtualBase_Duration() int { + + return (int)(C.QVariantAnimation_virtualbase_Duration(unsafe.Pointer(this.h))) + +} +func (this *QVariantAnimation) OnDuration(slot func(super func() int) int) { + C.QVariantAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_Duration +func miqt_exec_callback_QVariantAnimation_Duration(self *C.QVariantAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVariantAnimation{h: self}).callVirtualBase_Duration) + + return (C.int)(virtualReturn) + +} + +func (this *QVariantAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QVariantAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QVariantAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QVariantAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_Event +func miqt_exec_callback_QVariantAnimation_Event(self *C.QVariantAnimation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVariantAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateCurrentTime(param1 int) { + + C.QVariantAnimation_virtualbase_UpdateCurrentTime(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QVariantAnimation) OnUpdateCurrentTime(slot func(super func(param1 int), param1 int)) { + C.QVariantAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateCurrentTime +func miqt_exec_callback_QVariantAnimation_UpdateCurrentTime(self *C.QVariantAnimation, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateCurrentTime, slotval1) + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QVariantAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QVariantAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QVariantAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateState +func miqt_exec_callback_QVariantAnimation_UpdateState(self *C.QVariantAnimation, cb C.intptr_t, newState C.int, oldState C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__State)(newState) + + slotval2 := (QAbstractAnimation__State)(oldState) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateCurrentValue(value *QVariant) { + + C.QVariantAnimation_virtualbase_UpdateCurrentValue(unsafe.Pointer(this.h), value.cPointer()) + +} +func (this *QVariantAnimation) OnUpdateCurrentValue(slot func(super func(value *QVariant), value *QVariant)) { + C.QVariantAnimation_override_virtual_UpdateCurrentValue(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateCurrentValue +func miqt_exec_callback_QVariantAnimation_UpdateCurrentValue(self *C.QVariantAnimation, cb C.intptr_t, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(value *QVariant), value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateCurrentValue, slotval1) + +} + +func (this *QVariantAnimation) callVirtualBase_Interpolated(from *QVariant, to *QVariant, progress float64) *QVariant { + + _ret := C.QVariantAnimation_virtualbase_Interpolated(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.double)(progress)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVariantAnimation) OnInterpolated(slot func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) { + C.QVariantAnimation_override_virtual_Interpolated(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_Interpolated +func miqt_exec_callback_QVariantAnimation_Interpolated(self *C.QVariantAnimation, cb C.intptr_t, from *C.QVariant, to *C.QVariant, progress C.double) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(from *QVariant, to *QVariant, progress float64) *QVariant, from *QVariant, to *QVariant, progress float64) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVariant(unsafe.Pointer(from)) + slotval2 := UnsafeNewQVariant(unsafe.Pointer(to)) + slotval3 := (float64)(progress) + + virtualReturn := gofunc((&QVariantAnimation{h: self}).callVirtualBase_Interpolated, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QVariantAnimation) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QVariantAnimation_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QVariantAnimation) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QVariantAnimation_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVariantAnimation_UpdateDirection +func miqt_exec_callback_QVariantAnimation_UpdateDirection(self *C.QVariantAnimation, cb C.intptr_t, direction C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractAnimation__Direction)(direction) + + gofunc((&QVariantAnimation{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QVariantAnimation) Delete() { - C.QVariantAnimation_Delete(this.h) + C.QVariantAnimation_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qvariantanimation.h b/qt6/gen_qvariantanimation.h index 0267c2eb..a5b46712 100644 --- a/qt6/gen_qvariantanimation.h +++ b/qt6/gen_qvariantanimation.h @@ -15,21 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractAnimation; class QEasingCurve; +class QEvent; class QMetaObject; class QObject; class QVariant; class QVariantAnimation; #else +typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QEasingCurve QEasingCurve; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QVariant QVariant; typedef struct QVariantAnimation QVariantAnimation; #endif -QVariantAnimation* QVariantAnimation_new(); -QVariantAnimation* QVariantAnimation_new2(QObject* parent); +void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self); void* QVariantAnimation_Metacast(QVariantAnimation* self, const char* param1); struct miqt_string QVariantAnimation_Tr(const char* s); @@ -48,9 +52,28 @@ QEasingCurve* QVariantAnimation_EasingCurve(const QVariantAnimation* self); void QVariantAnimation_SetEasingCurve(QVariantAnimation* self, QEasingCurve* easing); void QVariantAnimation_ValueChanged(QVariantAnimation* self, QVariant* value); void QVariantAnimation_connect_ValueChanged(QVariantAnimation* self, intptr_t slot); +bool QVariantAnimation_Event(QVariantAnimation* self, QEvent* event); +void QVariantAnimation_UpdateCurrentTime(QVariantAnimation* self, int param1); +void QVariantAnimation_UpdateState(QVariantAnimation* self, int newState, int oldState); +void QVariantAnimation_UpdateCurrentValue(QVariantAnimation* self, QVariant* value); +QVariant* QVariantAnimation_Interpolated(const QVariantAnimation* self, QVariant* from, QVariant* to, double progress); struct miqt_string QVariantAnimation_Tr2(const char* s, const char* c); struct miqt_string QVariantAnimation_Tr3(const char* s, const char* c, int n); -void QVariantAnimation_Delete(QVariantAnimation* self); +void QVariantAnimation_override_virtual_Duration(void* self, intptr_t slot); +int QVariantAnimation_virtualbase_Duration(const void* self); +void QVariantAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QVariantAnimation_virtualbase_Event(void* self, QEvent* event); +void QVariantAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateCurrentTime(void* self, int param1); +void QVariantAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QVariantAnimation_override_virtual_UpdateCurrentValue(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateCurrentValue(void* self, QVariant* value); +void QVariantAnimation_override_virtual_Interpolated(void* self, intptr_t slot); +QVariant* QVariantAnimation_virtualbase_Interpolated(const void* self, QVariant* from, QVariant* to, double progress); +void QVariantAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QVariantAnimation_virtualbase_UpdateDirection(void* self, int direction); +void QVariantAnimation_Delete(QVariantAnimation* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qvarlengtharray.go b/qt6/gen_qvarlengtharray.go index 8a851280..9be2e0b6 100644 --- a/qt6/gen_qvarlengtharray.go +++ b/qt6/gen_qvarlengtharray.go @@ -13,7 +13,8 @@ import ( ) type QVLABaseBase struct { - h *C.QVLABaseBase + h *C.QVLABaseBase + isSubclass bool } func (this *QVLABaseBase) cPointer() *C.QVLABaseBase { @@ -30,6 +31,7 @@ func (this *QVLABaseBase) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVLABaseBase constructs the type using only CGO pointers. func newQVLABaseBase(h *C.QVLABaseBase) *QVLABaseBase { if h == nil { return nil @@ -37,8 +39,13 @@ func newQVLABaseBase(h *C.QVLABaseBase) *QVLABaseBase { return &QVLABaseBase{h: h} } +// UnsafeNewQVLABaseBase constructs the type using only unsafe pointers. func UnsafeNewQVLABaseBase(h unsafe.Pointer) *QVLABaseBase { - return newQVLABaseBase((*C.QVLABaseBase)(h)) + if h == nil { + return nil + } + + return &QVLABaseBase{h: (*C.QVLABaseBase)(h)} } func (this *QVLABaseBase) Capacity() int64 { diff --git a/qt6/gen_qvectornd.cpp b/qt6/gen_qvectornd.cpp index 8a1ec23f..c61312a3 100644 --- a/qt6/gen_qvectornd.cpp +++ b/qt6/gen_qvectornd.cpp @@ -9,36 +9,44 @@ #include "gen_qvectornd.h" #include "_cgo_export.h" -QVector2D* QVector2D_new() { - return new QVector2D(); +void QVector2D_new(QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new2(int param1) { - return new QVector2D(static_cast(param1)); +void QVector2D_new2(int param1, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(static_cast(param1)); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new3(float xpos, float ypos) { - return new QVector2D(static_cast(xpos), static_cast(ypos)); +void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(static_cast(xpos), static_cast(ypos)); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new4(QPoint* point) { - return new QVector2D(*point); +void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*point); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new5(QPointF* point) { - return new QVector2D(*point); +void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*point); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new6(QVector3D* vector) { - return new QVector2D(*vector); +void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*vector); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new7(QVector4D* vector) { - return new QVector2D(*vector); +void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*vector); + *outptr_QVector2D = ret; } -QVector2D* QVector2D_new8(QVector2D* param1) { - return new QVector2D(*param1); +void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D) { + QVector2D* ret = new QVector2D(*param1); + *outptr_QVector2D = ret; } bool QVector2D_IsNull(const QVector2D* self) { @@ -145,44 +153,57 @@ QPointF* QVector2D_ToPointF(const QVector2D* self) { return new QPointF(self->toPointF()); } -void QVector2D_Delete(QVector2D* self) { - delete self; +void QVector2D_Delete(QVector2D* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QVector3D* QVector3D_new() { - return new QVector3D(); +void QVector3D_new(QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new2(int param1) { - return new QVector3D(static_cast(param1)); +void QVector3D_new2(int param1, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(static_cast(param1)); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new3(float xpos, float ypos, float zpos) { - return new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); +void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new4(QPoint* point) { - return new QVector3D(*point); +void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*point); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new5(QPointF* point) { - return new QVector3D(*point); +void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*point); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new6(QVector2D* vector) { - return new QVector3D(*vector); +void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*vector); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new7(QVector2D* vector, float zpos) { - return new QVector3D(*vector, static_cast(zpos)); +void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*vector, static_cast(zpos)); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new8(QVector4D* vector) { - return new QVector3D(*vector); +void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*vector); + *outptr_QVector3D = ret; } -QVector3D* QVector3D_new9(QVector3D* param1) { - return new QVector3D(*param1); +void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D) { + QVector3D* ret = new QVector3D(*param1); + *outptr_QVector3D = ret; } bool QVector3D_IsNull(const QVector3D* self) { @@ -325,48 +346,62 @@ QPointF* QVector3D_ToPointF(const QVector3D* self) { return new QPointF(self->toPointF()); } -void QVector3D_Delete(QVector3D* self) { - delete self; +void QVector3D_Delete(QVector3D* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QVector4D* QVector4D_new() { - return new QVector4D(); +void QVector4D_new(QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new2(int param1) { - return new QVector4D(static_cast(param1)); +void QVector4D_new2(int param1, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(static_cast(param1)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos) { - return new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); +void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new4(QPoint* point) { - return new QVector4D(*point); +void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*point); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new5(QPointF* point) { - return new QVector4D(*point); +void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*point); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new6(QVector2D* vector) { - return new QVector4D(*vector); +void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos) { - return new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); +void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new8(QVector3D* vector) { - return new QVector4D(*vector); +void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new9(QVector3D* vector, float wpos) { - return new QVector4D(*vector, static_cast(wpos)); +void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*vector, static_cast(wpos)); + *outptr_QVector4D = ret; } -QVector4D* QVector4D_new10(QVector4D* param1) { - return new QVector4D(*param1); +void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D) { + QVector4D* ret = new QVector4D(*param1); + *outptr_QVector4D = ret; } bool QVector4D_IsNull(const QVector4D* self) { @@ -489,7 +524,11 @@ QPointF* QVector4D_ToPointF(const QVector4D* self) { return new QPointF(self->toPointF()); } -void QVector4D_Delete(QVector4D* self) { - delete self; +void QVector4D_Delete(QVector4D* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qvectornd.go b/qt6/gen_qvectornd.go index 05e31f37..7092795e 100644 --- a/qt6/gen_qvectornd.go +++ b/qt6/gen_qvectornd.go @@ -14,7 +14,8 @@ import ( ) type QVector2D struct { - h *C.QVector2D + h *C.QVector2D + isSubclass bool } func (this *QVector2D) cPointer() *C.QVector2D { @@ -31,6 +32,7 @@ func (this *QVector2D) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVector2D constructs the type using only CGO pointers. func newQVector2D(h *C.QVector2D) *QVector2D { if h == nil { return nil @@ -38,56 +40,93 @@ func newQVector2D(h *C.QVector2D) *QVector2D { return &QVector2D{h: h} } +// UnsafeNewQVector2D constructs the type using only unsafe pointers. func UnsafeNewQVector2D(h unsafe.Pointer) *QVector2D { - return newQVector2D((*C.QVector2D)(h)) + if h == nil { + return nil + } + + return &QVector2D{h: (*C.QVector2D)(h)} } // NewQVector2D constructs a new QVector2D object. func NewQVector2D() *QVector2D { - ret := C.QVector2D_new() - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new(&outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D2 constructs a new QVector2D object. func NewQVector2D2(param1 Initialization) *QVector2D { - ret := C.QVector2D_new2((C.int)(param1)) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new2((C.int)(param1), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D3 constructs a new QVector2D object. func NewQVector2D3(xpos float32, ypos float32) *QVector2D { - ret := C.QVector2D_new3((C.float)(xpos), (C.float)(ypos)) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new3((C.float)(xpos), (C.float)(ypos), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D4 constructs a new QVector2D object. func NewQVector2D4(point QPoint) *QVector2D { - ret := C.QVector2D_new4(point.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new4(point.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D5 constructs a new QVector2D object. func NewQVector2D5(point QPointF) *QVector2D { - ret := C.QVector2D_new5(point.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new5(point.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D6 constructs a new QVector2D object. func NewQVector2D6(vector QVector3D) *QVector2D { - ret := C.QVector2D_new6(vector.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new6(vector.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D7 constructs a new QVector2D object. func NewQVector2D7(vector QVector4D) *QVector2D { - ret := C.QVector2D_new7(vector.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new7(vector.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } // NewQVector2D8 constructs a new QVector2D object. func NewQVector2D8(param1 *QVector2D) *QVector2D { - ret := C.QVector2D_new8(param1.cPointer()) - return newQVector2D(ret) + var outptr_QVector2D *C.QVector2D = nil + + C.QVector2D_new8(param1.cPointer(), &outptr_QVector2D) + ret := newQVector2D(outptr_QVector2D) + ret.isSubclass = true + return ret } func (this *QVector2D) IsNull() bool { @@ -199,7 +238,7 @@ func (this *QVector2D) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QVector2D) Delete() { - C.QVector2D_Delete(this.h) + C.QVector2D_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -212,7 +251,8 @@ func (this *QVector2D) GoGC() { } type QVector3D struct { - h *C.QVector3D + h *C.QVector3D + isSubclass bool } func (this *QVector3D) cPointer() *C.QVector3D { @@ -229,6 +269,7 @@ func (this *QVector3D) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVector3D constructs the type using only CGO pointers. func newQVector3D(h *C.QVector3D) *QVector3D { if h == nil { return nil @@ -236,62 +277,103 @@ func newQVector3D(h *C.QVector3D) *QVector3D { return &QVector3D{h: h} } +// UnsafeNewQVector3D constructs the type using only unsafe pointers. func UnsafeNewQVector3D(h unsafe.Pointer) *QVector3D { - return newQVector3D((*C.QVector3D)(h)) + if h == nil { + return nil + } + + return &QVector3D{h: (*C.QVector3D)(h)} } // NewQVector3D constructs a new QVector3D object. func NewQVector3D() *QVector3D { - ret := C.QVector3D_new() - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new(&outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D2 constructs a new QVector3D object. func NewQVector3D2(param1 Initialization) *QVector3D { - ret := C.QVector3D_new2((C.int)(param1)) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new2((C.int)(param1), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D3 constructs a new QVector3D object. func NewQVector3D3(xpos float32, ypos float32, zpos float32) *QVector3D { - ret := C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos)) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D4 constructs a new QVector3D object. func NewQVector3D4(point QPoint) *QVector3D { - ret := C.QVector3D_new4(point.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new4(point.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D5 constructs a new QVector3D object. func NewQVector3D5(point QPointF) *QVector3D { - ret := C.QVector3D_new5(point.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new5(point.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D6 constructs a new QVector3D object. func NewQVector3D6(vector QVector2D) *QVector3D { - ret := C.QVector3D_new6(vector.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new6(vector.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D7 constructs a new QVector3D object. func NewQVector3D7(vector QVector2D, zpos float32) *QVector3D { - ret := C.QVector3D_new7(vector.cPointer(), (C.float)(zpos)) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new7(vector.cPointer(), (C.float)(zpos), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D8 constructs a new QVector3D object. func NewQVector3D8(vector QVector4D) *QVector3D { - ret := C.QVector3D_new8(vector.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new8(vector.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } // NewQVector3D9 constructs a new QVector3D object. func NewQVector3D9(param1 *QVector3D) *QVector3D { - ret := C.QVector3D_new9(param1.cPointer()) - return newQVector3D(ret) + var outptr_QVector3D *C.QVector3D = nil + + C.QVector3D_new9(param1.cPointer(), &outptr_QVector3D) + ret := newQVector3D(outptr_QVector3D) + ret.isSubclass = true + return ret } func (this *QVector3D) IsNull() bool { @@ -454,7 +536,7 @@ func (this *QVector3D) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QVector3D) Delete() { - C.QVector3D_Delete(this.h) + C.QVector3D_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -467,7 +549,8 @@ func (this *QVector3D) GoGC() { } type QVector4D struct { - h *C.QVector4D + h *C.QVector4D + isSubclass bool } func (this *QVector4D) cPointer() *C.QVector4D { @@ -484,6 +567,7 @@ func (this *QVector4D) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVector4D constructs the type using only CGO pointers. func newQVector4D(h *C.QVector4D) *QVector4D { if h == nil { return nil @@ -491,68 +575,113 @@ func newQVector4D(h *C.QVector4D) *QVector4D { return &QVector4D{h: h} } +// UnsafeNewQVector4D constructs the type using only unsafe pointers. func UnsafeNewQVector4D(h unsafe.Pointer) *QVector4D { - return newQVector4D((*C.QVector4D)(h)) + if h == nil { + return nil + } + + return &QVector4D{h: (*C.QVector4D)(h)} } // NewQVector4D constructs a new QVector4D object. func NewQVector4D() *QVector4D { - ret := C.QVector4D_new() - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new(&outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D2 constructs a new QVector4D object. func NewQVector4D2(param1 Initialization) *QVector4D { - ret := C.QVector4D_new2((C.int)(param1)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new2((C.int)(param1), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D3 constructs a new QVector4D object. func NewQVector4D3(xpos float32, ypos float32, zpos float32, wpos float32) *QVector4D { - ret := C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D4 constructs a new QVector4D object. func NewQVector4D4(point QPoint) *QVector4D { - ret := C.QVector4D_new4(point.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new4(point.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D5 constructs a new QVector4D object. func NewQVector4D5(point QPointF) *QVector4D { - ret := C.QVector4D_new5(point.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new5(point.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D6 constructs a new QVector4D object. func NewQVector4D6(vector QVector2D) *QVector4D { - ret := C.QVector4D_new6(vector.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new6(vector.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D7 constructs a new QVector4D object. func NewQVector4D7(vector QVector2D, zpos float32, wpos float32) *QVector4D { - ret := C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D8 constructs a new QVector4D object. func NewQVector4D8(vector QVector3D) *QVector4D { - ret := C.QVector4D_new8(vector.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new8(vector.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D9 constructs a new QVector4D object. func NewQVector4D9(vector QVector3D, wpos float32) *QVector4D { - ret := C.QVector4D_new9(vector.cPointer(), (C.float)(wpos)) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new9(vector.cPointer(), (C.float)(wpos), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } // NewQVector4D10 constructs a new QVector4D object. func NewQVector4D10(param1 *QVector4D) *QVector4D { - ret := C.QVector4D_new10(param1.cPointer()) - return newQVector4D(ret) + var outptr_QVector4D *C.QVector4D = nil + + C.QVector4D_new10(param1.cPointer(), &outptr_QVector4D) + ret := newQVector4D(outptr_QVector4D) + ret.isSubclass = true + return ret } func (this *QVector4D) IsNull() bool { @@ -686,7 +815,7 @@ func (this *QVector4D) ToPointF() *QPointF { // Delete this object from C++ memory. func (this *QVector4D) Delete() { - C.QVector4D_Delete(this.h) + C.QVector4D_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qvectornd.h b/qt6/gen_qvectornd.h index 47994df0..d7d31e53 100644 --- a/qt6/gen_qvectornd.h +++ b/qt6/gen_qvectornd.h @@ -32,14 +32,14 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -QVector2D* QVector2D_new(); -QVector2D* QVector2D_new2(int param1); -QVector2D* QVector2D_new3(float xpos, float ypos); -QVector2D* QVector2D_new4(QPoint* point); -QVector2D* QVector2D_new5(QPointF* point); -QVector2D* QVector2D_new6(QVector3D* vector); -QVector2D* QVector2D_new7(QVector4D* vector); -QVector2D* QVector2D_new8(QVector2D* param1); +void QVector2D_new(QVector2D** outptr_QVector2D); +void QVector2D_new2(int param1, QVector2D** outptr_QVector2D); +void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D); +void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D); +void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D); +void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D); +void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D); +void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D); bool QVector2D_IsNull(const QVector2D* self); float QVector2D_X(const QVector2D* self); float QVector2D_Y(const QVector2D* self); @@ -63,17 +63,17 @@ QVector3D* QVector2D_ToVector3D(const QVector2D* self); QVector4D* QVector2D_ToVector4D(const QVector2D* self); QPoint* QVector2D_ToPoint(const QVector2D* self); QPointF* QVector2D_ToPointF(const QVector2D* self); -void QVector2D_Delete(QVector2D* self); +void QVector2D_Delete(QVector2D* self, bool isSubclass); -QVector3D* QVector3D_new(); -QVector3D* QVector3D_new2(int param1); -QVector3D* QVector3D_new3(float xpos, float ypos, float zpos); -QVector3D* QVector3D_new4(QPoint* point); -QVector3D* QVector3D_new5(QPointF* point); -QVector3D* QVector3D_new6(QVector2D* vector); -QVector3D* QVector3D_new7(QVector2D* vector, float zpos); -QVector3D* QVector3D_new8(QVector4D* vector); -QVector3D* QVector3D_new9(QVector3D* param1); +void QVector3D_new(QVector3D** outptr_QVector3D); +void QVector3D_new2(int param1, QVector3D** outptr_QVector3D); +void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D); +void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D); +void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D); +void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D); +void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D); +void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D); +void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D); bool QVector3D_IsNull(const QVector3D* self); float QVector3D_X(const QVector3D* self); float QVector3D_Y(const QVector3D* self); @@ -106,18 +106,18 @@ QVector2D* QVector3D_ToVector2D(const QVector3D* self); QVector4D* QVector3D_ToVector4D(const QVector3D* self); QPoint* QVector3D_ToPoint(const QVector3D* self); QPointF* QVector3D_ToPointF(const QVector3D* self); -void QVector3D_Delete(QVector3D* self); +void QVector3D_Delete(QVector3D* self, bool isSubclass); -QVector4D* QVector4D_new(); -QVector4D* QVector4D_new2(int param1); -QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos); -QVector4D* QVector4D_new4(QPoint* point); -QVector4D* QVector4D_new5(QPointF* point); -QVector4D* QVector4D_new6(QVector2D* vector); -QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos); -QVector4D* QVector4D_new8(QVector3D* vector); -QVector4D* QVector4D_new9(QVector3D* vector, float wpos); -QVector4D* QVector4D_new10(QVector4D* param1); +void QVector4D_new(QVector4D** outptr_QVector4D); +void QVector4D_new2(int param1, QVector4D** outptr_QVector4D); +void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D); +void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D); +void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D); +void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D); +void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D); +void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D); +void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D); +void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D); bool QVector4D_IsNull(const QVector4D* self); float QVector4D_X(const QVector4D* self); float QVector4D_Y(const QVector4D* self); @@ -145,7 +145,7 @@ QVector3D* QVector4D_ToVector3D(const QVector4D* self); QVector3D* QVector4D_ToVector3DAffine(const QVector4D* self); QPoint* QVector4D_ToPoint(const QVector4D* self); QPointF* QVector4D_ToPointF(const QVector4D* self); -void QVector4D_Delete(QVector4D* self); +void QVector4D_Delete(QVector4D* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qversionnumber.cpp b/qt6/gen_qversionnumber.cpp index cd7c6d5a..754eba57 100644 --- a/qt6/gen_qversionnumber.cpp +++ b/qt6/gen_qversionnumber.cpp @@ -9,34 +9,40 @@ #include "gen_qversionnumber.h" #include "_cgo_export.h" -QVersionNumber* QVersionNumber_new() { - return new QVersionNumber(); +void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg) { +void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber) { QList seg_QList; seg_QList.reserve(seg.len); int* seg_arr = static_cast(seg.data); for(size_t i = 0; i < seg.len; ++i) { seg_QList.push_back(static_cast(seg_arr[i])); } - return new QVersionNumber(seg_QList); + QVersionNumber* ret = new QVersionNumber(seg_QList); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new3(int maj) { - return new QVersionNumber(static_cast(maj)); +void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(static_cast(maj)); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new4(int maj, int min) { - return new QVersionNumber(static_cast(maj), static_cast(min)); +void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min)); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new5(int maj, int min, int mic) { - return new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); +void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); + *outptr_QVersionNumber = ret; } -QVersionNumber* QVersionNumber_new6(QVersionNumber* param1) { - return new QVersionNumber(*param1); +void QVersionNumber_new6(QVersionNumber* param1, QVersionNumber** outptr_QVersionNumber) { + QVersionNumber* ret = new QVersionNumber(*param1); + *outptr_QVersionNumber = ret; } bool QVersionNumber_IsNull(const QVersionNumber* self) { @@ -116,16 +122,22 @@ QVersionNumber* QVersionNumber_FromString2(QAnyStringView* stringVal, ptrdiff_t* return new QVersionNumber(QVersionNumber::fromString(*stringVal, (qsizetype*)(suffixIndex))); } -void QVersionNumber_Delete(QVersionNumber* self) { - delete self; +void QVersionNumber_Delete(QVersionNumber* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QTypeRevision* QTypeRevision_new() { - return new QTypeRevision(); +void QTypeRevision_new(QTypeRevision** outptr_QTypeRevision) { + QTypeRevision* ret = new QTypeRevision(); + *outptr_QTypeRevision = ret; } -QTypeRevision* QTypeRevision_new2(QTypeRevision* param1) { - return new QTypeRevision(*param1); +void QTypeRevision_new2(QTypeRevision* param1, QTypeRevision** outptr_QTypeRevision) { + QTypeRevision* ret = new QTypeRevision(*param1); + *outptr_QTypeRevision = ret; } QTypeRevision* QTypeRevision_Zero() { @@ -154,7 +166,11 @@ bool QTypeRevision_IsValid(const QTypeRevision* self) { return self->isValid(); } -void QTypeRevision_Delete(QTypeRevision* self) { - delete self; +void QTypeRevision_Delete(QTypeRevision* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qversionnumber.go b/qt6/gen_qversionnumber.go index ec21c77c..6edb659a 100644 --- a/qt6/gen_qversionnumber.go +++ b/qt6/gen_qversionnumber.go @@ -14,7 +14,8 @@ import ( ) type QVersionNumber struct { - h *C.QVersionNumber + h *C.QVersionNumber + isSubclass bool } func (this *QVersionNumber) cPointer() *C.QVersionNumber { @@ -31,6 +32,7 @@ func (this *QVersionNumber) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVersionNumber constructs the type using only CGO pointers. func newQVersionNumber(h *C.QVersionNumber) *QVersionNumber { if h == nil { return nil @@ -38,14 +40,23 @@ func newQVersionNumber(h *C.QVersionNumber) *QVersionNumber { return &QVersionNumber{h: h} } +// UnsafeNewQVersionNumber constructs the type using only unsafe pointers. func UnsafeNewQVersionNumber(h unsafe.Pointer) *QVersionNumber { - return newQVersionNumber((*C.QVersionNumber)(h)) + if h == nil { + return nil + } + + return &QVersionNumber{h: (*C.QVersionNumber)(h)} } // NewQVersionNumber constructs a new QVersionNumber object. func NewQVersionNumber() *QVersionNumber { - ret := C.QVersionNumber_new() - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new(&outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber2 constructs a new QVersionNumber object. @@ -56,32 +67,52 @@ func NewQVersionNumber2(seg []int) *QVersionNumber { seg_CArray[i] = (C.int)(seg[i]) } seg_ma := C.struct_miqt_array{len: C.size_t(len(seg)), data: unsafe.Pointer(seg_CArray)} - ret := C.QVersionNumber_new2(seg_ma) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new2(seg_ma, &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber3 constructs a new QVersionNumber object. func NewQVersionNumber3(maj int) *QVersionNumber { - ret := C.QVersionNumber_new3((C.int)(maj)) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new3((C.int)(maj), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber4 constructs a new QVersionNumber object. func NewQVersionNumber4(maj int, min int) *QVersionNumber { - ret := C.QVersionNumber_new4((C.int)(maj), (C.int)(min)) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new4((C.int)(maj), (C.int)(min), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber5 constructs a new QVersionNumber object. func NewQVersionNumber5(maj int, min int, mic int) *QVersionNumber { - ret := C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic)) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } // NewQVersionNumber6 constructs a new QVersionNumber object. func NewQVersionNumber6(param1 *QVersionNumber) *QVersionNumber { - ret := C.QVersionNumber_new6(param1.cPointer()) - return newQVersionNumber(ret) + var outptr_QVersionNumber *C.QVersionNumber = nil + + C.QVersionNumber_new6(param1.cPointer(), &outptr_QVersionNumber) + ret := newQVersionNumber(outptr_QVersionNumber) + ret.isSubclass = true + return ret } func (this *QVersionNumber) IsNull() bool { @@ -167,7 +198,7 @@ func QVersionNumber_FromString2(stringVal QAnyStringView, suffixIndex *int64) *Q // Delete this object from C++ memory. func (this *QVersionNumber) Delete() { - C.QVersionNumber_Delete(this.h) + C.QVersionNumber_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -180,7 +211,8 @@ func (this *QVersionNumber) GoGC() { } type QTypeRevision struct { - h *C.QTypeRevision + h *C.QTypeRevision + isSubclass bool } func (this *QTypeRevision) cPointer() *C.QTypeRevision { @@ -197,6 +229,7 @@ func (this *QTypeRevision) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQTypeRevision constructs the type using only CGO pointers. func newQTypeRevision(h *C.QTypeRevision) *QTypeRevision { if h == nil { return nil @@ -204,20 +237,33 @@ func newQTypeRevision(h *C.QTypeRevision) *QTypeRevision { return &QTypeRevision{h: h} } +// UnsafeNewQTypeRevision constructs the type using only unsafe pointers. func UnsafeNewQTypeRevision(h unsafe.Pointer) *QTypeRevision { - return newQTypeRevision((*C.QTypeRevision)(h)) + if h == nil { + return nil + } + + return &QTypeRevision{h: (*C.QTypeRevision)(h)} } // NewQTypeRevision constructs a new QTypeRevision object. func NewQTypeRevision() *QTypeRevision { - ret := C.QTypeRevision_new() - return newQTypeRevision(ret) + var outptr_QTypeRevision *C.QTypeRevision = nil + + C.QTypeRevision_new(&outptr_QTypeRevision) + ret := newQTypeRevision(outptr_QTypeRevision) + ret.isSubclass = true + return ret } // NewQTypeRevision2 constructs a new QTypeRevision object. func NewQTypeRevision2(param1 *QTypeRevision) *QTypeRevision { - ret := C.QTypeRevision_new2(param1.cPointer()) - return newQTypeRevision(ret) + var outptr_QTypeRevision *C.QTypeRevision = nil + + C.QTypeRevision_new2(param1.cPointer(), &outptr_QTypeRevision) + ret := newQTypeRevision(outptr_QTypeRevision) + ret.isSubclass = true + return ret } func QTypeRevision_Zero() *QTypeRevision { @@ -249,7 +295,7 @@ func (this *QTypeRevision) IsValid() bool { // Delete this object from C++ memory. func (this *QTypeRevision) Delete() { - C.QTypeRevision_Delete(this.h) + C.QTypeRevision_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qversionnumber.h b/qt6/gen_qversionnumber.h index e3d98dc1..da56e0e3 100644 --- a/qt6/gen_qversionnumber.h +++ b/qt6/gen_qversionnumber.h @@ -24,12 +24,12 @@ typedef struct QTypeRevision QTypeRevision; typedef struct QVersionNumber QVersionNumber; #endif -QVersionNumber* QVersionNumber_new(); -QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg); -QVersionNumber* QVersionNumber_new3(int maj); -QVersionNumber* QVersionNumber_new4(int maj, int min); -QVersionNumber* QVersionNumber_new5(int maj, int min, int mic); -QVersionNumber* QVersionNumber_new6(QVersionNumber* param1); +void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber); +void QVersionNumber_new6(QVersionNumber* param1, QVersionNumber** outptr_QVersionNumber); bool QVersionNumber_IsNull(const QVersionNumber* self); bool QVersionNumber_IsNormalized(const QVersionNumber* self); int QVersionNumber_MajorVersion(const QVersionNumber* self); @@ -45,17 +45,17 @@ QVersionNumber* QVersionNumber_CommonPrefix(QVersionNumber* v1, QVersionNumber* struct miqt_string QVersionNumber_ToString(const QVersionNumber* self); QVersionNumber* QVersionNumber_FromString(QAnyStringView* stringVal); QVersionNumber* QVersionNumber_FromString2(QAnyStringView* stringVal, ptrdiff_t* suffixIndex); -void QVersionNumber_Delete(QVersionNumber* self); +void QVersionNumber_Delete(QVersionNumber* self, bool isSubclass); -QTypeRevision* QTypeRevision_new(); -QTypeRevision* QTypeRevision_new2(QTypeRevision* param1); +void QTypeRevision_new(QTypeRevision** outptr_QTypeRevision); +void QTypeRevision_new2(QTypeRevision* param1, QTypeRevision** outptr_QTypeRevision); QTypeRevision* QTypeRevision_Zero(); bool QTypeRevision_HasMajorVersion(const QTypeRevision* self); unsigned char QTypeRevision_MajorVersion(const QTypeRevision* self); bool QTypeRevision_HasMinorVersion(const QTypeRevision* self); unsigned char QTypeRevision_MinorVersion(const QTypeRevision* self); bool QTypeRevision_IsValid(const QTypeRevision* self); -void QTypeRevision_Delete(QTypeRevision* self); +void QTypeRevision_Delete(QTypeRevision* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qwaitcondition.cpp b/qt6/gen_qwaitcondition.cpp index ad79b27d..180ef11e 100644 --- a/qt6/gen_qwaitcondition.cpp +++ b/qt6/gen_qwaitcondition.cpp @@ -6,8 +6,9 @@ #include "gen_qwaitcondition.h" #include "_cgo_export.h" -QWaitCondition* QWaitCondition_new() { - return new QWaitCondition(); +void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition) { + QWaitCondition* ret = new QWaitCondition(); + *outptr_QWaitCondition = ret; } bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex) { @@ -50,7 +51,11 @@ bool QWaitCondition_Wait23(QWaitCondition* self, QReadWriteLock* lockedReadWrite return self->wait(lockedReadWriteLock, *deadline); } -void QWaitCondition_Delete(QWaitCondition* self) { - delete self; +void QWaitCondition_Delete(QWaitCondition* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qwaitcondition.go b/qt6/gen_qwaitcondition.go index acefde90..e9c8833d 100644 --- a/qt6/gen_qwaitcondition.go +++ b/qt6/gen_qwaitcondition.go @@ -14,7 +14,8 @@ import ( ) type QWaitCondition struct { - h *C.QWaitCondition + h *C.QWaitCondition + isSubclass bool } func (this *QWaitCondition) cPointer() *C.QWaitCondition { @@ -31,6 +32,7 @@ func (this *QWaitCondition) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWaitCondition constructs the type using only CGO pointers. func newQWaitCondition(h *C.QWaitCondition) *QWaitCondition { if h == nil { return nil @@ -38,14 +40,23 @@ func newQWaitCondition(h *C.QWaitCondition) *QWaitCondition { return &QWaitCondition{h: h} } +// UnsafeNewQWaitCondition constructs the type using only unsafe pointers. func UnsafeNewQWaitCondition(h unsafe.Pointer) *QWaitCondition { - return newQWaitCondition((*C.QWaitCondition)(h)) + if h == nil { + return nil + } + + return &QWaitCondition{h: (*C.QWaitCondition)(h)} } // NewQWaitCondition constructs a new QWaitCondition object. func NewQWaitCondition() *QWaitCondition { - ret := C.QWaitCondition_new() - return newQWaitCondition(ret) + var outptr_QWaitCondition *C.QWaitCondition = nil + + C.QWaitCondition_new(&outptr_QWaitCondition) + ret := newQWaitCondition(outptr_QWaitCondition) + ret.isSubclass = true + return ret } func (this *QWaitCondition) Wait(lockedMutex *QMutex) bool { @@ -90,7 +101,7 @@ func (this *QWaitCondition) Wait23(lockedReadWriteLock *QReadWriteLock, deadline // Delete this object from C++ memory. func (this *QWaitCondition) Delete() { - C.QWaitCondition_Delete(this.h) + C.QWaitCondition_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qwaitcondition.h b/qt6/gen_qwaitcondition.h index 7279158b..177b0fb0 100644 --- a/qt6/gen_qwaitcondition.h +++ b/qt6/gen_qwaitcondition.h @@ -26,7 +26,7 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWaitCondition QWaitCondition; #endif -QWaitCondition* QWaitCondition_new(); +void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition); bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex); bool QWaitCondition_Wait2(QWaitCondition* self, QMutex* lockedMutex, unsigned long time); bool QWaitCondition_WaitWithLockedReadWriteLock(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock); @@ -37,7 +37,7 @@ void QWaitCondition_NotifyOne(QWaitCondition* self); void QWaitCondition_NotifyAll(QWaitCondition* self); bool QWaitCondition_Wait22(QWaitCondition* self, QMutex* lockedMutex, QDeadlineTimer* deadline); bool QWaitCondition_Wait23(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock, QDeadlineTimer* deadline); -void QWaitCondition_Delete(QWaitCondition* self); +void QWaitCondition_Delete(QWaitCondition* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qwhatsthis.cpp b/qt6/gen_qwhatsthis.cpp index c7501669..770e04c2 100644 --- a/qt6/gen_qwhatsthis.cpp +++ b/qt6/gen_qwhatsthis.cpp @@ -44,7 +44,11 @@ QAction* QWhatsThis_CreateAction1(QObject* parent) { return QWhatsThis::createAction(parent); } -void QWhatsThis_Delete(QWhatsThis* self) { - delete self; +void QWhatsThis_Delete(QWhatsThis* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qwhatsthis.go b/qt6/gen_qwhatsthis.go index e3f2bb28..05ff524b 100644 --- a/qt6/gen_qwhatsthis.go +++ b/qt6/gen_qwhatsthis.go @@ -14,7 +14,8 @@ import ( ) type QWhatsThis struct { - h *C.QWhatsThis + h *C.QWhatsThis + isSubclass bool } func (this *QWhatsThis) cPointer() *C.QWhatsThis { @@ -31,6 +32,7 @@ func (this *QWhatsThis) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWhatsThis constructs the type using only CGO pointers. func newQWhatsThis(h *C.QWhatsThis) *QWhatsThis { if h == nil { return nil @@ -38,8 +40,13 @@ func newQWhatsThis(h *C.QWhatsThis) *QWhatsThis { return &QWhatsThis{h: h} } +// UnsafeNewQWhatsThis constructs the type using only unsafe pointers. func UnsafeNewQWhatsThis(h unsafe.Pointer) *QWhatsThis { - return newQWhatsThis((*C.QWhatsThis)(h)) + if h == nil { + return nil + } + + return &QWhatsThis{h: (*C.QWhatsThis)(h)} } func QWhatsThis_EnterWhatsThisMode() { @@ -67,7 +74,7 @@ func QWhatsThis_HideText() { } func QWhatsThis_CreateAction() *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction())) + return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction()), nil) } func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { @@ -79,12 +86,12 @@ func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { } func QWhatsThis_CreateAction1(parent *QObject) *QAction { - return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction1(parent.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QWhatsThis_CreateAction1(parent.cPointer())), nil) } // Delete this object from C++ memory. func (this *QWhatsThis) Delete() { - C.QWhatsThis_Delete(this.h) + C.QWhatsThis_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qwhatsthis.h b/qt6/gen_qwhatsthis.h index 0edffef9..f2bfe89e 100644 --- a/qt6/gen_qwhatsthis.h +++ b/qt6/gen_qwhatsthis.h @@ -36,7 +36,7 @@ void QWhatsThis_HideText(); QAction* QWhatsThis_CreateAction(); void QWhatsThis_ShowText3(QPoint* pos, struct miqt_string text, QWidget* w); QAction* QWhatsThis_CreateAction1(QObject* parent); -void QWhatsThis_Delete(QWhatsThis* self); +void QWhatsThis_Delete(QWhatsThis* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qwidget.cpp b/qt6/gen_qwidget.cpp index bf521cbd..6ff73e25 100644 --- a/qt6/gen_qwidget.cpp +++ b/qt6/gen_qwidget.cpp @@ -1,22 +1,41 @@ #include +#include #include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include #include #include +#include #include +#include +#include +#include #include #include +#include #include #include #include @@ -24,14 +43,19 @@ #include #include #include +#include #include +#include #include #include #include #include #include #include +#include +#include #include +#include #include #include #include @@ -39,28 +63,1177 @@ #include "gen_qwidget.h" #include "_cgo_export.h" -QWidgetData* QWidgetData_new(QWidgetData* param1) { - return new QWidgetData(*param1); +void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData) { + QWidgetData* ret = new QWidgetData(*param1); + *outptr_QWidgetData = ret; } void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1) { self->operator=(*param1); } -void QWidgetData_Delete(QWidgetData* self) { - delete self; +void QWidgetData_Delete(QWidgetData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QWidget* QWidget_new(QWidget* parent) { - return new QWidget(parent); +class MiqtVirtualQWidget : public virtual QWidget { +public: + + MiqtVirtualQWidget(QWidget* parent): QWidget(parent) {}; + MiqtVirtualQWidget(): QWidget() {}; + MiqtVirtualQWidget(QWidget* parent, Qt::WindowFlags f): QWidget(parent, f) {}; + + virtual ~MiqtVirtualQWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWidget::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWidget::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWidget_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWidget::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWidget::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWidget_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWidget::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWidget::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWidget_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWidget::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWidget::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWidget_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWidget::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWidget::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWidget_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWidget::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWidget::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWidget_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWidget::disconnectNotify(*signal); + + } + +}; + +void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent); + *outptr_QWidget = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWidget* QWidget_new2() { - return new QWidget(); +void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(); + *outptr_QWidget = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWidget* QWidget_new3(QWidget* parent, int f) { - return new QWidget(parent, static_cast(f)); +void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent, static_cast(f)); + *outptr_QWidget = ret; + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QWidget_MetaObject(const QWidget* self) { @@ -1230,7 +2403,7 @@ void QWidget_WindowTitleChanged(QWidget* self, struct miqt_string title) { } void QWidget_connect_WindowTitleChanged(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::windowTitleChanged), self, [=](const QString& title) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::windowTitleChanged), self, [=](const QString& title) { const QString title_ret = title; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray title_b = title_ret.toUtf8(); @@ -1248,7 +2421,7 @@ void QWidget_WindowIconChanged(QWidget* self, QIcon* icon) { } void QWidget_connect_WindowIconChanged(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::windowIconChanged), self, [=](const QIcon& icon) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::windowIconChanged), self, [=](const QIcon& icon) { const QIcon& icon_ret = icon; // Cast returned reference into pointer QIcon* sigval1 = const_cast(&icon_ret); @@ -1262,7 +2435,7 @@ void QWidget_WindowIconTextChanged(QWidget* self, struct miqt_string iconText) { } void QWidget_connect_WindowIconTextChanged(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::windowIconTextChanged), self, [=](const QString& iconText) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::windowIconTextChanged), self, [=](const QString& iconText) { const QString iconText_ret = iconText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray iconText_b = iconText_ret.toUtf8(); @@ -1280,7 +2453,7 @@ void QWidget_CustomContextMenuRequested(QWidget* self, QPoint* pos) { } void QWidget_connect_CustomContextMenuRequested(QWidget* self, intptr_t slot) { - QWidget::connect(self, static_cast(&QWidget::customContextMenuRequested), self, [=](const QPoint& pos) { + MiqtVirtualQWidget::connect(self, static_cast(&QWidget::customContextMenuRequested), self, [=](const QPoint& pos) { const QPoint& pos_ret = pos; // Cast returned reference into pointer QPoint* sigval1 = const_cast(&pos_ret); @@ -1383,7 +2556,387 @@ QWidget* QWidget_CreateWindowContainer3(QWindow* window, QWidget* parent, int fl return QWidget::createWindowContainer(window, parent, static_cast(flags)); } -void QWidget_Delete(QWidget* self) { - delete self; +void QWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DevType = slot; +} + +int QWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_DevType(); +} + +void QWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__SetVisible = slot; +} + +void QWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_SizeHint(); +} + +void QWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__Event = slot; +} + +bool QWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_Event(event); +} + +void QWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__WheelEvent = slot; +} + +void QWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__EnterEvent = slot; +} + +void QWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__PaintEvent = slot; +} + +void QWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__MoveEvent = slot; +} + +void QWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__CloseEvent = slot; +} + +void QWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__TabletEvent = slot; +} + +void QWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ActionEvent = slot; +} + +void QWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DropEvent = slot; +} + +void QWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ShowEvent = slot; +} + +void QWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__HideEvent = slot; +} + +void QWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__Metric = slot; +} + +int QWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_Metric(param1); +} + +void QWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__InitPainter = slot; +} + +void QWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWidget_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__EventFilter = slot; +} + +bool QWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWidget*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWidget_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__TimerEvent = slot; +} + +void QWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_TimerEvent(event); +} + +void QWidget_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ChildEvent = slot; +} + +void QWidget_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ChildEvent(event); +} + +void QWidget_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__CustomEvent = slot; +} + +void QWidget_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_CustomEvent(event); +} + +void QWidget_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__ConnectNotify = slot; +} + +void QWidget_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWidget_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWidget*)(self) )->handle__DisconnectNotify = slot; +} + +void QWidget_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWidget*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWidget_Delete(QWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qwidget.go b/qt6/gen_qwidget.go index aee42103..ff2af753 100644 --- a/qt6/gen_qwidget.go +++ b/qt6/gen_qwidget.go @@ -23,7 +23,8 @@ const ( ) type QWidgetData struct { - h *C.QWidgetData + h *C.QWidgetData + isSubclass bool } func (this *QWidgetData) cPointer() *C.QWidgetData { @@ -40,6 +41,7 @@ func (this *QWidgetData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQWidgetData constructs the type using only CGO pointers. func newQWidgetData(h *C.QWidgetData) *QWidgetData { if h == nil { return nil @@ -47,14 +49,23 @@ func newQWidgetData(h *C.QWidgetData) *QWidgetData { return &QWidgetData{h: h} } +// UnsafeNewQWidgetData constructs the type using only unsafe pointers. func UnsafeNewQWidgetData(h unsafe.Pointer) *QWidgetData { - return newQWidgetData((*C.QWidgetData)(h)) + if h == nil { + return nil + } + + return &QWidgetData{h: (*C.QWidgetData)(h)} } // NewQWidgetData constructs a new QWidgetData object. func NewQWidgetData(param1 *QWidgetData) *QWidgetData { - ret := C.QWidgetData_new(param1.cPointer()) - return newQWidgetData(ret) + var outptr_QWidgetData *C.QWidgetData = nil + + C.QWidgetData_new(param1.cPointer(), &outptr_QWidgetData) + ret := newQWidgetData(outptr_QWidgetData) + ret.isSubclass = true + return ret } func (this *QWidgetData) OperatorAssign(param1 *QWidgetData) { @@ -63,7 +74,7 @@ func (this *QWidgetData) OperatorAssign(param1 *QWidgetData) { // Delete this object from C++ memory. func (this *QWidgetData) Delete() { - C.QWidgetData_Delete(this.h) + C.QWidgetData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -76,7 +87,8 @@ func (this *QWidgetData) GoGC() { } type QWidget struct { - h *C.QWidget + h *C.QWidget + isSubclass bool *QObject *QPaintDevice } @@ -95,33 +107,61 @@ func (this *QWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidget(h *C.QWidget) *QWidget { +// newQWidget constructs the type using only CGO pointers. +func newQWidget(h *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWidget { if h == nil { return nil } - return &QWidget{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QPaintDevice: UnsafeNewQPaintDevice(unsafe.Pointer(h))} + return &QWidget{h: h, + QObject: newQObject(h_QObject), + QPaintDevice: newQPaintDevice(h_QPaintDevice)} } -func UnsafeNewQWidget(h unsafe.Pointer) *QWidget { - return newQWidget((*C.QWidget)(h)) +// UnsafeNewQWidget constructs the type using only unsafe pointers. +func UnsafeNewQWidget(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWidget { + if h == nil { + return nil + } + + return &QWidget{h: (*C.QWidget)(h), + QObject: UnsafeNewQObject(h_QObject), + QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } // NewQWidget constructs a new QWidget object. func NewQWidget(parent *QWidget) *QWidget { - ret := C.QWidget_new(parent.cPointer()) - return newQWidget(ret) + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWidget_new(parent.cPointer(), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWidget2 constructs a new QWidget object. func NewQWidget2() *QWidget { - ret := C.QWidget_new2() - return newQWidget(ret) + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWidget_new2(&outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWidget3 constructs a new QWidget object. func NewQWidget3(parent *QWidget, f WindowType) *QWidget { - ret := C.QWidget_new3(parent.cPointer(), (C.int)(f)) - return newQWidget(ret) + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWidget_new3(parent.cPointer(), (C.int)(f), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QWidget) MetaObject() *QMetaObject { @@ -164,7 +204,7 @@ func (this *QWidget) EffectiveWinId() uintptr { } func (this *QWidget) Style() *QStyle { - return UnsafeNewQStyle(unsafe.Pointer(C.QWidget_Style(this.h))) + return UnsafeNewQStyle(unsafe.Pointer(C.QWidget_Style(this.h)), nil) } func (this *QWidget) SetStyle(style *QStyle) { @@ -480,15 +520,15 @@ func (this *QWidget) MapFrom2(param1 *QWidget, param2 *QPoint) *QPoint { } func (this *QWidget) Window() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Window(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Window(this.h)), nil, nil) } func (this *QWidget) NativeParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NativeParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NativeParentWidget(this.h)), nil, nil) } func (this *QWidget) TopLevelWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_TopLevelWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_TopLevelWidget(this.h)), nil, nil) } func (this *QWidget) Palette() *QPalette { @@ -601,13 +641,13 @@ func (this *QWidget) RenderWithPainter(painter *QPainter) { func (this *QWidget) Grab() *QPixmap { _ret := C.QWidget_Grab(this.h) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QWidget) GraphicsEffect() *QGraphicsEffect { - return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QWidget_GraphicsEffect(this.h))) + return UnsafeNewQGraphicsEffect(unsafe.Pointer(C.QWidget_GraphicsEffect(this.h)), nil) } func (this *QWidget) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -879,7 +919,7 @@ func (this *QWidget) SetFocusProxy(focusProxy *QWidget) { } func (this *QWidget) FocusProxy() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusProxy(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusProxy(this.h)), nil, nil) } func (this *QWidget) ContextMenuPolicy() ContextMenuPolicy { @@ -927,11 +967,11 @@ func (this *QWidget) SetShortcutAutoRepeat(id int) { } func QWidget_MouseGrabber() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_MouseGrabber())) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_MouseGrabber()), nil, nil) } func QWidget_KeyboardGrabber() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_KeyboardGrabber())) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_KeyboardGrabber()), nil, nil) } func (this *QWidget) UpdatesEnabled() bool { @@ -943,7 +983,7 @@ func (this *QWidget) SetUpdatesEnabled(enable bool) { } func (this *QWidget) GraphicsProxyWidget() *QGraphicsProxyWidget { - return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QWidget_GraphicsProxyWidget(this.h))) + return UnsafeNewQGraphicsProxyWidget(unsafe.Pointer(C.QWidget_GraphicsProxyWidget(this.h)), nil, nil, nil, nil, nil) } func (this *QWidget) Update() { @@ -1171,7 +1211,7 @@ func (this *QWidget) ContentsRect() *QRect { } func (this *QWidget) Layout() *QLayout { - return UnsafeNewQLayout(unsafe.Pointer(C.QWidget_Layout(this.h))) + return UnsafeNewQLayout(unsafe.Pointer(C.QWidget_Layout(this.h)), nil, nil) } func (this *QWidget) SetLayout(layout *QLayout) { @@ -1199,15 +1239,15 @@ func (this *QWidget) Scroll2(dx int, dy int, param3 *QRect) { } func (this *QWidget) FocusWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_FocusWidget(this.h)), nil, nil) } func (this *QWidget) NextInFocusChain() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NextInFocusChain(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_NextInFocusChain(this.h)), nil, nil) } func (this *QWidget) PreviousInFocusChain() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_PreviousInFocusChain(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_PreviousInFocusChain(this.h)), nil, nil) } func (this *QWidget) AcceptDrops() bool { @@ -1255,7 +1295,7 @@ func (this *QWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i])) + _ret[i] = UnsafeNewQAction(unsafe.Pointer(_outCast[i]), nil) } return _ret } @@ -1265,7 +1305,7 @@ func (this *QWidget) AddActionWithText(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddActionWithText(this.h, text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddActionWithText(this.h, text_ms)), nil) } func (this *QWidget) AddAction2(icon *QIcon, text string) *QAction { @@ -1273,7 +1313,7 @@ func (this *QWidget) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddAction2(this.h, icon.cPointer(), text_ms))) + return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddAction2(this.h, icon.cPointer(), text_ms)), nil) } func (this *QWidget) AddAction3(text string, shortcut *QKeySequence) *QAction { @@ -1281,7 +1321,7 @@ func (this *QWidget) AddAction3(text string, shortcut *QKeySequence) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddAction3(this.h, text_ms, shortcut.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddAction3(this.h, text_ms, shortcut.cPointer())), nil) } func (this *QWidget) AddAction4(icon *QIcon, text string, shortcut *QKeySequence) *QAction { @@ -1289,11 +1329,11 @@ func (this *QWidget) AddAction4(icon *QIcon, text string, shortcut *QKeySequence text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddAction4(this.h, icon.cPointer(), text_ms, shortcut.cPointer()))) + return UnsafeNewQAction(unsafe.Pointer(C.QWidget_AddAction4(this.h, icon.cPointer(), text_ms, shortcut.cPointer())), nil) } func (this *QWidget) ParentWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ParentWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ParentWidget(this.h)), nil, nil) } func (this *QWidget) SetWindowFlags(typeVal WindowType) { @@ -1317,15 +1357,15 @@ func (this *QWidget) WindowType() WindowType { } func QWidget_Find(param1 uintptr) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Find((C.uintptr_t)(param1)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_Find((C.uintptr_t)(param1))), nil, nil) } func (this *QWidget) ChildAt(x int, y int) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y))), nil, nil) } func (this *QWidget) ChildAtWithQPoint(p *QPoint) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer())), nil, nil) } func (this *QWidget) SetAttribute(param1 WidgetAttribute) { @@ -1361,11 +1401,11 @@ func (this *QWidget) BackingStore() *QBackingStore { } func (this *QWidget) WindowHandle() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWidget_WindowHandle(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWidget_WindowHandle(this.h)), nil, nil) } func (this *QWidget) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QWidget_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QWidget_Screen(this.h)), nil) } func (this *QWidget) SetScreen(screen *QScreen) { @@ -1373,7 +1413,7 @@ func (this *QWidget) SetScreen(screen *QScreen) { } func QWidget_CreateWindowContainer(window *QWindow) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer(window.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer(window.cPointer())), nil, nil) } func (this *QWidget) WindowTitleChanged(title string) { @@ -1533,7 +1573,7 @@ func (this *QWidget) Render42(painter *QPainter, targetOffset *QPoint, sourceReg func (this *QWidget) Grab1(rectangle *QRect) *QPixmap { _ret := C.QWidget_Grab1(this.h, rectangle.cPointer()) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1563,16 +1603,1123 @@ func (this *QWidget) SetAttribute2(param1 WidgetAttribute, on bool) { } func QWidget_CreateWindowContainer2(window *QWindow, parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer())), nil, nil) } func QWidget_CreateWindowContainer3(window *QWindow, parent *QWidget, flags WindowType) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags)))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags))), nil, nil) +} + +func (this *QWidget) callVirtualBase_DevType() int { + + return (int)(C.QWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWidget) OnDevType(slot func(super func() int) int) { + C.QWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DevType +func miqt_exec_callback_QWidget_DevType(self *C.QWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_SetVisible(visible bool) { + + C.QWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_SetVisible +func miqt_exec_callback_QWidget_SetVisible(self *C.QWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWidget) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidget) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_SizeHint +func miqt_exec_callback_QWidget_SizeHint(self *C.QWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidget) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MinimumSizeHint +func miqt_exec_callback_QWidget_MinimumSizeHint(self *C.QWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_HeightForWidth +func miqt_exec_callback_QWidget_HeightForWidth(self *C.QWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_HasHeightForWidth +func miqt_exec_callback_QWidget_HasHeightForWidth(self *C.QWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWidget) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_PaintEngine +func miqt_exec_callback_QWidget_PaintEngine(self *C.QWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QWidget_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QWidget) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_Event +func miqt_exec_callback_QWidget_Event(self *C.QWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MousePressEvent +func miqt_exec_callback_QWidget_MousePressEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MouseReleaseEvent +func miqt_exec_callback_QWidget_MouseReleaseEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MouseDoubleClickEvent +func miqt_exec_callback_QWidget_MouseDoubleClickEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MouseMoveEvent +func miqt_exec_callback_QWidget_MouseMoveEvent(self *C.QWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_WheelEvent +func miqt_exec_callback_QWidget_WheelEvent(self *C.QWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_KeyPressEvent +func miqt_exec_callback_QWidget_KeyPressEvent(self *C.QWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_KeyReleaseEvent +func miqt_exec_callback_QWidget_KeyReleaseEvent(self *C.QWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_FocusInEvent +func miqt_exec_callback_QWidget_FocusInEvent(self *C.QWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_FocusOutEvent +func miqt_exec_callback_QWidget_FocusOutEvent(self *C.QWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_EnterEvent +func miqt_exec_callback_QWidget_EnterEvent(self *C.QWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_LeaveEvent +func miqt_exec_callback_QWidget_LeaveEvent(self *C.QWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_PaintEvent +func miqt_exec_callback_QWidget_PaintEvent(self *C.QWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_MoveEvent +func miqt_exec_callback_QWidget_MoveEvent(self *C.QWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ResizeEvent +func miqt_exec_callback_QWidget_ResizeEvent(self *C.QWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_CloseEvent +func miqt_exec_callback_QWidget_CloseEvent(self *C.QWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ContextMenuEvent +func miqt_exec_callback_QWidget_ContextMenuEvent(self *C.QWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_TabletEvent +func miqt_exec_callback_QWidget_TabletEvent(self *C.QWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ActionEvent +func miqt_exec_callback_QWidget_ActionEvent(self *C.QWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DragEnterEvent +func miqt_exec_callback_QWidget_DragEnterEvent(self *C.QWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DragMoveEvent +func miqt_exec_callback_QWidget_DragMoveEvent(self *C.QWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DragLeaveEvent +func miqt_exec_callback_QWidget_DragLeaveEvent(self *C.QWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DropEvent +func miqt_exec_callback_QWidget_DropEvent(self *C.QWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ShowEvent +func miqt_exec_callback_QWidget_ShowEvent(self *C.QWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_HideEvent +func miqt_exec_callback_QWidget_HideEvent(self *C.QWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_NativeEvent +func miqt_exec_callback_QWidget_NativeEvent(self *C.QWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWidget) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ChangeEvent +func miqt_exec_callback_QWidget_ChangeEvent(self *C.QWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWidget) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_Metric +func miqt_exec_callback_QWidget_Metric(self *C.QWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_InitPainter(painter *QPainter) { + + C.QWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QWidget) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_InitPainter +func miqt_exec_callback_QWidget_InitPainter(self *C.QWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWidget) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QWidget_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QWidget) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_Redirected +func miqt_exec_callback_QWidget_Redirected(self *C.QWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWidget) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_SharedPainter +func miqt_exec_callback_QWidget_SharedPainter(self *C.QWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWidget) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_InputMethodEvent +func miqt_exec_callback_QWidget_InputMethodEvent(self *C.QWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWidget) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_InputMethodQuery +func miqt_exec_callback_QWidget_InputMethodQuery(self *C.QWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_FocusNextPrevChild +func miqt_exec_callback_QWidget_FocusNextPrevChild(self *C.QWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QWidget_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QWidget) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QWidget_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_EventFilter +func miqt_exec_callback_QWidget_EventFilter(self *C.QWidget, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWidget{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidget) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QWidget_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QWidget_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_TimerEvent +func miqt_exec_callback_QWidget_TimerEvent(self *C.QWidget, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QWidget_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QWidget_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ChildEvent +func miqt_exec_callback_QWidget_ChildEvent(self *C.QWidget, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWidget{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_CustomEvent(event *QEvent) { + + C.QWidget_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWidget) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWidget_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_CustomEvent +func miqt_exec_callback_QWidget_CustomEvent(self *C.QWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWidget{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWidget) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QWidget_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWidget) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWidget_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_ConnectNotify +func miqt_exec_callback_QWidget_ConnectNotify(self *C.QWidget, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWidget{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWidget) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QWidget_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWidget) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWidget_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidget_DisconnectNotify +func miqt_exec_callback_QWidget_DisconnectNotify(self *C.QWidget, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWidget{h: self}).callVirtualBase_DisconnectNotify, slotval1) + } // Delete this object from C++ memory. func (this *QWidget) Delete() { - C.QWidget_Delete(this.h) + C.QWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qwidget.h b/qt6/gen_qwidget.h index c131f71c..6b69f885 100644 --- a/qt6/gen_qwidget.h +++ b/qt6/gen_qwidget.h @@ -16,23 +16,42 @@ extern "C" { #ifdef __cplusplus class QAction; +class QActionEvent; class QBackingStore; class QBitmap; class QByteArray; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; class QCursor; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; class QFont; class QFontInfo; class QFontMetrics; class QGraphicsEffect; class QGraphicsProxyWidget; +class QHideEvent; class QIcon; +class QInputMethodEvent; +class QKeyEvent; class QKeySequence; class QLayout; class QLocale; class QMargins; +class QMetaMethod; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; class QPaintDevice; class QPaintEngine; +class QPaintEvent; class QPainter; class QPalette; class QPixmap; @@ -40,33 +59,57 @@ class QPoint; class QPointF; class QRect; class QRegion; +class QResizeEvent; class QScreen; +class QShowEvent; class QSize; class QSizePolicy; class QStyle; +class QTabletEvent; +class QTimerEvent; class QVariant; +class QWheelEvent; class QWidget; class QWidgetData; class QWindow; #else typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; typedef struct QBackingStore QBackingStore; typedef struct QBitmap QBitmap; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QCursor QCursor; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; typedef struct QFont QFont; typedef struct QFontInfo QFontInfo; typedef struct QFontMetrics QFontMetrics; typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsProxyWidget QGraphicsProxyWidget; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QKeySequence QKeySequence; typedef struct QLayout QLayout; typedef struct QLocale QLocale; typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPalette QPalette; typedef struct QPixmap QPixmap; @@ -74,23 +117,28 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QResizeEvent QResizeEvent; typedef struct QScreen QScreen; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; typedef struct QSizePolicy QSizePolicy; typedef struct QStyle QStyle; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QWidgetData QWidgetData; typedef struct QWindow QWindow; #endif -QWidgetData* QWidgetData_new(QWidgetData* param1); +void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData); void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1); -void QWidgetData_Delete(QWidgetData* self); +void QWidgetData_Delete(QWidgetData* self, bool isSubclass); -QWidget* QWidget_new(QWidget* parent); -QWidget* QWidget_new2(); -QWidget* QWidget_new3(QWidget* parent, int f); +void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWidget_MetaObject(const QWidget* self); void* QWidget_Metacast(QWidget* self, const char* param1); struct miqt_string QWidget_Tr(const char* s); @@ -355,9 +403,42 @@ void QWidget_WindowIconTextChanged(QWidget* self, struct miqt_string iconText); void QWidget_connect_WindowIconTextChanged(QWidget* self, intptr_t slot); void QWidget_CustomContextMenuRequested(QWidget* self, QPoint* pos); void QWidget_connect_CustomContextMenuRequested(QWidget* self, intptr_t slot); +bool QWidget_Event(QWidget* self, QEvent* event); +void QWidget_MousePressEvent(QWidget* self, QMouseEvent* event); +void QWidget_MouseReleaseEvent(QWidget* self, QMouseEvent* event); +void QWidget_MouseDoubleClickEvent(QWidget* self, QMouseEvent* event); +void QWidget_MouseMoveEvent(QWidget* self, QMouseEvent* event); +void QWidget_WheelEvent(QWidget* self, QWheelEvent* event); +void QWidget_KeyPressEvent(QWidget* self, QKeyEvent* event); +void QWidget_KeyReleaseEvent(QWidget* self, QKeyEvent* event); +void QWidget_FocusInEvent(QWidget* self, QFocusEvent* event); +void QWidget_FocusOutEvent(QWidget* self, QFocusEvent* event); +void QWidget_EnterEvent(QWidget* self, QEnterEvent* event); +void QWidget_LeaveEvent(QWidget* self, QEvent* event); +void QWidget_PaintEvent(QWidget* self, QPaintEvent* event); +void QWidget_MoveEvent(QWidget* self, QMoveEvent* event); +void QWidget_ResizeEvent(QWidget* self, QResizeEvent* event); +void QWidget_CloseEvent(QWidget* self, QCloseEvent* event); +void QWidget_ContextMenuEvent(QWidget* self, QContextMenuEvent* event); +void QWidget_TabletEvent(QWidget* self, QTabletEvent* event); +void QWidget_ActionEvent(QWidget* self, QActionEvent* event); +void QWidget_DragEnterEvent(QWidget* self, QDragEnterEvent* event); +void QWidget_DragMoveEvent(QWidget* self, QDragMoveEvent* event); +void QWidget_DragLeaveEvent(QWidget* self, QDragLeaveEvent* event); +void QWidget_DropEvent(QWidget* self, QDropEvent* event); +void QWidget_ShowEvent(QWidget* self, QShowEvent* event); +void QWidget_HideEvent(QWidget* self, QHideEvent* event); +bool QWidget_NativeEvent(QWidget* self, struct miqt_string eventType, void* message, intptr_t* result); +void QWidget_ChangeEvent(QWidget* self, QEvent* param1); +int QWidget_Metric(const QWidget* self, int param1); +void QWidget_InitPainter(const QWidget* self, QPainter* painter); +QPaintDevice* QWidget_Redirected(const QWidget* self, QPoint* offset); +QPainter* QWidget_SharedPainter(const QWidget* self); +void QWidget_InputMethodEvent(QWidget* self, QInputMethodEvent* param1); QVariant* QWidget_InputMethodQuery(const QWidget* self, int param1); int QWidget_InputMethodHints(const QWidget* self); void QWidget_SetInputMethodHints(QWidget* self, int hints); +bool QWidget_FocusNextPrevChild(QWidget* self, bool next); struct miqt_string QWidget_Tr2(const char* s, const char* c); struct miqt_string QWidget_Tr3(const char* s, const char* c, int n); void QWidget_Render2(QWidget* self, QPaintDevice* target, QPoint* targetOffset); @@ -375,7 +456,101 @@ void QWidget_SetWindowFlag2(QWidget* self, int param1, bool on); void QWidget_SetAttribute2(QWidget* self, int param1, bool on); QWidget* QWidget_CreateWindowContainer2(QWindow* window, QWidget* parent); QWidget* QWidget_CreateWindowContainer3(QWindow* window, QWidget* parent, int flags); -void QWidget_Delete(QWidget* self); +void QWidget_override_virtual_DevType(void* self, intptr_t slot); +int QWidget_virtualbase_DevType(const void* self); +void QWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QWidget_virtualbase_SetVisible(void* self, bool visible); +void QWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWidget_virtualbase_SizeHint(const void* self); +void QWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWidget_virtualbase_MinimumSizeHint(const void* self); +void QWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWidget_virtualbase_HasHeightForWidth(const void* self); +void QWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWidget_virtualbase_PaintEngine(const void* self); +void QWidget_override_virtual_Event(void* self, intptr_t slot); +bool QWidget_virtualbase_Event(void* self, QEvent* event); +void QWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWidget_override_virtual_Metric(void* self, intptr_t slot); +int QWidget_virtualbase_Metric(const void* self, int param1); +void QWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWidget_virtualbase_SharedPainter(const void* self); +void QWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWidget_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWidget_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWidget_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWidget_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWidget_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWidget_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWidget_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWidget_virtualbase_CustomEvent(void* self, QEvent* event); +void QWidget_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWidget_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWidget_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWidget_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWidget_Delete(QWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qwidgetaction.cpp b/qt6/gen_qwidgetaction.cpp index eeec32de..5a4b7f68 100644 --- a/qt6/gen_qwidgetaction.cpp +++ b/qt6/gen_qwidgetaction.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -9,8 +11,114 @@ #include "gen_qwidgetaction.h" #include "_cgo_export.h" -QWidgetAction* QWidgetAction_new(QObject* parent) { - return new QWidgetAction(parent); +class MiqtVirtualQWidgetAction : public virtual QWidgetAction { +public: + + MiqtVirtualQWidgetAction(QObject* parent): QWidgetAction(parent) {}; + + virtual ~MiqtVirtualQWidgetAction() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWidgetAction::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWidgetAction_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWidgetAction::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QWidgetAction::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QWidgetAction_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QWidgetAction::eventFilter(param1, param2); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWidget = 0; + + // Subclass to allow providing a Go implementation + virtual QWidget* createWidget(QWidget* parent) override { + if (handle__CreateWidget == 0) { + return QWidgetAction::createWidget(parent); + } + + QWidget* sigval1 = parent; + + QWidget* callback_return_value = miqt_exec_callback_QWidgetAction_CreateWidget(this, handle__CreateWidget, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_CreateWidget(QWidget* parent) { + + return QWidgetAction::createWidget(parent); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DeleteWidget = 0; + + // Subclass to allow providing a Go implementation + virtual void deleteWidget(QWidget* widget) override { + if (handle__DeleteWidget == 0) { + QWidgetAction::deleteWidget(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QWidgetAction_DeleteWidget(this, handle__DeleteWidget, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DeleteWidget(QWidget* widget) { + + QWidgetAction::deleteWidget(widget); + + } + +}; + +void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject) { + MiqtVirtualQWidgetAction* ret = new MiqtVirtualQWidgetAction(parent); + *outptr_QWidgetAction = ret; + *outptr_QAction = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self) { @@ -70,7 +178,43 @@ struct miqt_string QWidgetAction_Tr3(const char* s, const char* c, int n) { return _ms; } -void QWidgetAction_Delete(QWidgetAction* self) { - delete self; +void QWidgetAction_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__Event = slot; +} + +bool QWidgetAction_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_Event(param1); +} + +void QWidgetAction_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__EventFilter = slot; +} + +bool QWidgetAction_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QWidgetAction_override_virtual_CreateWidget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__CreateWidget = slot; +} + +QWidget* QWidgetAction_virtualbase_CreateWidget(void* self, QWidget* parent) { + return ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_CreateWidget(parent); +} + +void QWidgetAction_override_virtual_DeleteWidget(void* self, intptr_t slot) { + dynamic_cast( (QWidgetAction*)(self) )->handle__DeleteWidget = slot; +} + +void QWidgetAction_virtualbase_DeleteWidget(void* self, QWidget* widget) { + ( (MiqtVirtualQWidgetAction*)(self) )->virtualbase_DeleteWidget(widget); +} + +void QWidgetAction_Delete(QWidgetAction* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qwidgetaction.go b/qt6/gen_qwidgetaction.go index 73071157..f56932be 100644 --- a/qt6/gen_qwidgetaction.go +++ b/qt6/gen_qwidgetaction.go @@ -10,11 +10,13 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) type QWidgetAction struct { - h *C.QWidgetAction + h *C.QWidgetAction + isSubclass bool *QAction } @@ -32,21 +34,35 @@ func (this *QWidgetAction) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWidgetAction(h *C.QWidgetAction) *QWidgetAction { +// newQWidgetAction constructs the type using only CGO pointers. +func newQWidgetAction(h *C.QWidgetAction, h_QAction *C.QAction, h_QObject *C.QObject) *QWidgetAction { if h == nil { return nil } - return &QWidgetAction{h: h, QAction: UnsafeNewQAction(unsafe.Pointer(h))} + return &QWidgetAction{h: h, + QAction: newQAction(h_QAction, h_QObject)} } -func UnsafeNewQWidgetAction(h unsafe.Pointer) *QWidgetAction { - return newQWidgetAction((*C.QWidgetAction)(h)) +// UnsafeNewQWidgetAction constructs the type using only unsafe pointers. +func UnsafeNewQWidgetAction(h unsafe.Pointer, h_QAction unsafe.Pointer, h_QObject unsafe.Pointer) *QWidgetAction { + if h == nil { + return nil + } + + return &QWidgetAction{h: (*C.QWidgetAction)(h), + QAction: UnsafeNewQAction(h_QAction, h_QObject)} } // NewQWidgetAction constructs a new QWidgetAction object. func NewQWidgetAction(parent *QObject) *QWidgetAction { - ret := C.QWidgetAction_new(parent.cPointer()) - return newQWidgetAction(ret) + var outptr_QWidgetAction *C.QWidgetAction = nil + var outptr_QAction *C.QAction = nil + var outptr_QObject *C.QObject = nil + + C.QWidgetAction_new(parent.cPointer(), &outptr_QWidgetAction, &outptr_QAction, &outptr_QObject) + ret := newQWidgetAction(outptr_QWidgetAction, outptr_QAction, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QWidgetAction) MetaObject() *QMetaObject { @@ -73,11 +89,11 @@ func (this *QWidgetAction) SetDefaultWidget(w *QWidget) { } func (this *QWidgetAction) DefaultWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_DefaultWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_DefaultWidget(this.h)), nil, nil) } func (this *QWidgetAction) RequestWidget(parent *QWidget) *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_RequestWidget(this.h, parent.cPointer()))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_RequestWidget(this.h, parent.cPointer())), nil, nil) } func (this *QWidgetAction) ReleaseWidget(widget *QWidget) { @@ -106,9 +122,107 @@ func QWidgetAction_Tr3(s string, c string, n int) string { return _ret } +func (this *QWidgetAction) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QWidgetAction_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QWidgetAction) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QWidgetAction_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_Event +func miqt_exec_callback_QWidgetAction_Event(self *C.QWidgetAction, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetAction) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QWidgetAction_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QWidgetAction) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QWidgetAction_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_EventFilter +func miqt_exec_callback_QWidgetAction_EventFilter(self *C.QWidgetAction, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWidgetAction) callVirtualBase_CreateWidget(parent *QWidget) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QWidgetAction_virtualbase_CreateWidget(unsafe.Pointer(this.h), parent.cPointer())), nil, nil) +} +func (this *QWidgetAction) OnCreateWidget(slot func(super func(parent *QWidget) *QWidget, parent *QWidget) *QWidget) { + C.QWidgetAction_override_virtual_CreateWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_CreateWidget +func miqt_exec_callback_QWidgetAction_CreateWidget(self *C.QWidgetAction, cb C.intptr_t, parent *C.QWidget) *C.QWidget { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *QWidget) *QWidget, parent *QWidget) *QWidget) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(parent), nil, nil) + + virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_CreateWidget, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWidgetAction) callVirtualBase_DeleteWidget(widget *QWidget) { + + C.QWidgetAction_virtualbase_DeleteWidget(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QWidgetAction) OnDeleteWidget(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QWidgetAction_override_virtual_DeleteWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWidgetAction_DeleteWidget +func miqt_exec_callback_QWidgetAction_DeleteWidget(self *C.QWidgetAction, cb C.intptr_t, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(widget *QWidget), widget *QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QWidgetAction{h: self}).callVirtualBase_DeleteWidget, slotval1) + +} + // Delete this object from C++ memory. func (this *QWidgetAction) Delete() { - C.QWidgetAction_Delete(this.h) + C.QWidgetAction_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qwidgetaction.h b/qt6/gen_qwidgetaction.h index dc551e22..6a117c1c 100644 --- a/qt6/gen_qwidgetaction.h +++ b/qt6/gen_qwidgetaction.h @@ -15,18 +15,22 @@ extern "C" { #endif #ifdef __cplusplus +class QAction; +class QEvent; class QMetaObject; class QObject; class QWidget; class QWidgetAction; #else +typedef struct QAction QAction; +typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QWidget QWidget; typedef struct QWidgetAction QWidgetAction; #endif -QWidgetAction* QWidgetAction_new(QObject* parent); +void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject); QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self); void* QWidgetAction_Metacast(QWidgetAction* self, const char* param1); struct miqt_string QWidgetAction_Tr(const char* s); @@ -34,9 +38,21 @@ void QWidgetAction_SetDefaultWidget(QWidgetAction* self, QWidget* w); QWidget* QWidgetAction_DefaultWidget(const QWidgetAction* self); QWidget* QWidgetAction_RequestWidget(QWidgetAction* self, QWidget* parent); void QWidgetAction_ReleaseWidget(QWidgetAction* self, QWidget* widget); +bool QWidgetAction_Event(QWidgetAction* self, QEvent* param1); +bool QWidgetAction_EventFilter(QWidgetAction* self, QObject* param1, QEvent* param2); +QWidget* QWidgetAction_CreateWidget(QWidgetAction* self, QWidget* parent); +void QWidgetAction_DeleteWidget(QWidgetAction* self, QWidget* widget); struct miqt_string QWidgetAction_Tr2(const char* s, const char* c); struct miqt_string QWidgetAction_Tr3(const char* s, const char* c, int n); -void QWidgetAction_Delete(QWidgetAction* self); +void QWidgetAction_override_virtual_Event(void* self, intptr_t slot); +bool QWidgetAction_virtualbase_Event(void* self, QEvent* param1); +void QWidgetAction_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWidgetAction_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QWidgetAction_override_virtual_CreateWidget(void* self, intptr_t slot); +QWidget* QWidgetAction_virtualbase_CreateWidget(void* self, QWidget* parent); +void QWidgetAction_override_virtual_DeleteWidget(void* self, intptr_t slot); +void QWidgetAction_virtualbase_DeleteWidget(void* self, QWidget* widget); +void QWidgetAction_Delete(QWidgetAction* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qwindow.cpp b/qt6/gen_qwindow.cpp index 81fa7051..8f08d6de 100644 --- a/qt6/gen_qwindow.cpp +++ b/qt6/gen_qwindow.cpp @@ -1,34 +1,819 @@ #include +#include +#include +#include #include +#include +#include +#include +#include #include +#include #include +#include #include +#include +#include #include +#include #include #include #include #include +#include #include +#include #include #include #include #include +#include #include +#include +#include +#include +#include #include #include #include "gen_qwindow.h" #include "_cgo_export.h" -QWindow* QWindow_new() { - return new QWindow(); +class MiqtVirtualQWindow : public virtual QWindow { +public: + + MiqtVirtualQWindow(): QWindow() {}; + MiqtVirtualQWindow(QWindow* parent): QWindow(parent) {}; + MiqtVirtualQWindow(QScreen* screen): QWindow(screen) {}; + + virtual ~MiqtVirtualQWindow() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SurfaceType = 0; + + // Subclass to allow providing a Go implementation + virtual QSurface::SurfaceType surfaceType() const override { + if (handle__SurfaceType == 0) { + return QWindow::surfaceType(); + } + + + int callback_return_value = miqt_exec_callback_QWindow_SurfaceType(const_cast(this), handle__SurfaceType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_SurfaceType() const { + + QSurface::SurfaceType _ret = QWindow::surfaceType(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Format = 0; + + // Subclass to allow providing a Go implementation + virtual QSurfaceFormat format() const override { + if (handle__Format == 0) { + return QWindow::format(); + } + + + QSurfaceFormat* callback_return_value = miqt_exec_callback_QWindow_Format(const_cast(this), handle__Format); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSurfaceFormat* virtualbase_Format() const { + + return new QSurfaceFormat(QWindow::format()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual QSize size() const override { + if (handle__Size == 0) { + return QWindow::size(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWindow_Size(const_cast(this), handle__Size); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_Size() const { + + return new QSize(QWindow::size()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AccessibleRoot = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* accessibleRoot() const override { + if (handle__AccessibleRoot == 0) { + return QWindow::accessibleRoot(); + } + + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QWindow_AccessibleRoot(const_cast(this), handle__AccessibleRoot); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAccessibleInterface* virtualbase_AccessibleRoot() const { + + return QWindow::accessibleRoot(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusObject = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* focusObject() const override { + if (handle__FocusObject == 0) { + return QWindow::focusObject(); + } + + + QObject* callback_return_value = miqt_exec_callback_QWindow_FocusObject(const_cast(this), handle__FocusObject); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QObject* virtualbase_FocusObject() const { + + return QWindow::focusObject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExposeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void exposeEvent(QExposeEvent* param1) override { + if (handle__ExposeEvent == 0) { + QWindow::exposeEvent(param1); + return; + } + + QExposeEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_ExposeEvent(this, handle__ExposeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ExposeEvent(QExposeEvent* param1) { + + QWindow::exposeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QWindow::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QWindow::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QWindow::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QWindow::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* param1) override { + if (handle__MoveEvent == 0) { + QWindow::moveEvent(param1); + return; + } + + QMoveEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* param1) { + + QWindow::moveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QWindow::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QWindow::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QWindow::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QWindow::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QWindow::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QWindow::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QWindow::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QWindow::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QWindow::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QWindow::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWindow::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWindow_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWindow::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QWindow::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QWindow::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QWindow::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QWindow::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QWindow::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QWindow::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QWindow::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QWindow::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QWindow::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QWindow::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QWindow::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QWindow::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QWindow::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QWindow::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TouchEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void touchEvent(QTouchEvent* param1) override { + if (handle__TouchEvent == 0) { + QWindow::touchEvent(param1); + return; + } + + QTouchEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_TouchEvent(this, handle__TouchEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TouchEvent(QTouchEvent* param1) { + + QWindow::touchEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* param1) override { + if (handle__TabletEvent == 0) { + QWindow::tabletEvent(param1); + return; + } + + QTabletEvent* sigval1 = param1; + + miqt_exec_callback_QWindow_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* param1) { + + QWindow::tabletEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QWindow::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWindow::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWindow::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWindow_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWindow::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWindow::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWindow_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWindow::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWindow::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWindow_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWindow::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWindow::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWindow_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWindow::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWindow::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWindow_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWindow::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWindow::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWindow_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWindow::disconnectNotify(*signal); + + } + +}; + +void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(); + *outptr_QWindow = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QWindow* QWindow_new2(QWindow* parent) { - return new QWindow(parent); +void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(parent); + *outptr_QWindow = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } -QWindow* QWindow_new3(QScreen* screen) { - return new QWindow(screen); +void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { + MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(screen); + *outptr_QWindow = ret; + *outptr_QObject = static_cast(ret); + *outptr_QSurface = static_cast(ret); } QMetaObject* QWindow_MetaObject(const QWindow* self) { @@ -518,7 +1303,7 @@ void QWindow_ScreenChanged(QWindow* self, QScreen* screen) { } void QWindow_connect_ScreenChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::screenChanged), self, [=](QScreen* screen) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::screenChanged), self, [=](QScreen* screen) { QScreen* sigval1 = screen; miqt_exec_callback_QWindow_ScreenChanged(slot, sigval1); }); @@ -529,7 +1314,7 @@ void QWindow_ModalityChanged(QWindow* self, int modality) { } void QWindow_connect_ModalityChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::modalityChanged), self, [=](Qt::WindowModality modality) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::modalityChanged), self, [=](Qt::WindowModality modality) { Qt::WindowModality modality_ret = modality; int sigval1 = static_cast(modality_ret); miqt_exec_callback_QWindow_ModalityChanged(slot, sigval1); @@ -541,7 +1326,7 @@ void QWindow_WindowStateChanged(QWindow* self, int windowState) { } void QWindow_connect_WindowStateChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::windowStateChanged), self, [=](Qt::WindowState windowState) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::windowStateChanged), self, [=](Qt::WindowState windowState) { Qt::WindowState windowState_ret = windowState; int sigval1 = static_cast(windowState_ret); miqt_exec_callback_QWindow_WindowStateChanged(slot, sigval1); @@ -554,7 +1339,7 @@ void QWindow_WindowTitleChanged(QWindow* self, struct miqt_string title) { } void QWindow_connect_WindowTitleChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::windowTitleChanged), self, [=](const QString& title) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::windowTitleChanged), self, [=](const QString& title) { const QString title_ret = title; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray title_b = title_ret.toUtf8(); @@ -572,7 +1357,7 @@ void QWindow_XChanged(QWindow* self, int arg) { } void QWindow_connect_XChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::xChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::xChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_XChanged(slot, sigval1); }); @@ -583,7 +1368,7 @@ void QWindow_YChanged(QWindow* self, int arg) { } void QWindow_connect_YChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::yChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::yChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_YChanged(slot, sigval1); }); @@ -594,7 +1379,7 @@ void QWindow_WidthChanged(QWindow* self, int arg) { } void QWindow_connect_WidthChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::widthChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::widthChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_WidthChanged(slot, sigval1); }); @@ -605,7 +1390,7 @@ void QWindow_HeightChanged(QWindow* self, int arg) { } void QWindow_connect_HeightChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::heightChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::heightChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_HeightChanged(slot, sigval1); }); @@ -616,7 +1401,7 @@ void QWindow_MinimumWidthChanged(QWindow* self, int arg) { } void QWindow_connect_MinimumWidthChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::minimumWidthChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::minimumWidthChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MinimumWidthChanged(slot, sigval1); }); @@ -627,7 +1412,7 @@ void QWindow_MinimumHeightChanged(QWindow* self, int arg) { } void QWindow_connect_MinimumHeightChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::minimumHeightChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::minimumHeightChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MinimumHeightChanged(slot, sigval1); }); @@ -638,7 +1423,7 @@ void QWindow_MaximumWidthChanged(QWindow* self, int arg) { } void QWindow_connect_MaximumWidthChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::maximumWidthChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::maximumWidthChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MaximumWidthChanged(slot, sigval1); }); @@ -649,7 +1434,7 @@ void QWindow_MaximumHeightChanged(QWindow* self, int arg) { } void QWindow_connect_MaximumHeightChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::maximumHeightChanged), self, [=](int arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::maximumHeightChanged), self, [=](int arg) { int sigval1 = arg; miqt_exec_callback_QWindow_MaximumHeightChanged(slot, sigval1); }); @@ -660,7 +1445,7 @@ void QWindow_VisibleChanged(QWindow* self, bool arg) { } void QWindow_connect_VisibleChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::visibleChanged), self, [=](bool arg) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::visibleChanged), self, [=](bool arg) { bool sigval1 = arg; miqt_exec_callback_QWindow_VisibleChanged(slot, sigval1); }); @@ -671,7 +1456,7 @@ void QWindow_VisibilityChanged(QWindow* self, int visibility) { } void QWindow_connect_VisibilityChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::visibilityChanged), self, [=](QWindow::Visibility visibility) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::visibilityChanged), self, [=](QWindow::Visibility visibility) { QWindow::Visibility visibility_ret = visibility; int sigval1 = static_cast(visibility_ret); miqt_exec_callback_QWindow_VisibilityChanged(slot, sigval1); @@ -683,7 +1468,7 @@ void QWindow_ActiveChanged(QWindow* self) { } void QWindow_connect_ActiveChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::activeChanged), self, [=]() { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::activeChanged), self, [=]() { miqt_exec_callback_QWindow_ActiveChanged(slot); }); } @@ -693,7 +1478,7 @@ void QWindow_ContentOrientationChanged(QWindow* self, int orientation) { } void QWindow_connect_ContentOrientationChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::contentOrientationChanged), self, [=](Qt::ScreenOrientation orientation) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::contentOrientationChanged), self, [=](Qt::ScreenOrientation orientation) { Qt::ScreenOrientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); miqt_exec_callback_QWindow_ContentOrientationChanged(slot, sigval1); @@ -705,7 +1490,7 @@ void QWindow_FocusObjectChanged(QWindow* self, QObject* object) { } void QWindow_connect_FocusObjectChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::focusObjectChanged), self, [=](QObject* object) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::focusObjectChanged), self, [=](QObject* object) { QObject* sigval1 = object; miqt_exec_callback_QWindow_FocusObjectChanged(slot, sigval1); }); @@ -716,7 +1501,7 @@ void QWindow_OpacityChanged(QWindow* self, double opacity) { } void QWindow_connect_OpacityChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::opacityChanged), self, [=](qreal opacity) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::opacityChanged), self, [=](qreal opacity) { qreal opacity_ret = opacity; double sigval1 = static_cast(opacity_ret); miqt_exec_callback_QWindow_OpacityChanged(slot, sigval1); @@ -728,7 +1513,7 @@ void QWindow_TransientParentChanged(QWindow* self, QWindow* transientParent) { } void QWindow_connect_TransientParentChanged(QWindow* self, intptr_t slot) { - QWindow::connect(self, static_cast(&QWindow::transientParentChanged), self, [=](QWindow* transientParent) { + MiqtVirtualQWindow::connect(self, static_cast(&QWindow::transientParentChanged), self, [=](QWindow* transientParent) { QWindow* sigval1 = transientParent; miqt_exec_callback_QWindow_TransientParentChanged(slot, sigval1); }); @@ -768,7 +1553,259 @@ bool QWindow_IsAncestorOf2(const QWindow* self, QWindow* child, int mode) { return self->isAncestorOf(child, static_cast(mode)); } -void QWindow_Delete(QWindow* self) { - delete self; +void QWindow_override_virtual_SurfaceType(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__SurfaceType = slot; +} + +int QWindow_virtualbase_SurfaceType(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_SurfaceType(); +} + +void QWindow_override_virtual_Format(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__Format = slot; +} + +QSurfaceFormat* QWindow_virtualbase_Format(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_Format(); +} + +void QWindow_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__Size = slot; +} + +QSize* QWindow_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_Size(); +} + +void QWindow_override_virtual_AccessibleRoot(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__AccessibleRoot = slot; +} + +QAccessibleInterface* QWindow_virtualbase_AccessibleRoot(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_AccessibleRoot(); +} + +void QWindow_override_virtual_FocusObject(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__FocusObject = slot; +} + +QObject* QWindow_virtualbase_FocusObject(const void* self) { + return ( (const MiqtVirtualQWindow*)(self) )->virtualbase_FocusObject(); +} + +void QWindow_override_virtual_ExposeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ExposeEvent = slot; +} + +void QWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ExposeEvent(param1); +} + +void QWindow_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ResizeEvent = slot; +} + +void QWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__PaintEvent = slot; +} + +void QWindow_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_PaintEvent(param1); +} + +void QWindow_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MoveEvent = slot; +} + +void QWindow_virtualbase_MoveEvent(void* self, QMoveEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MoveEvent(param1); +} + +void QWindow_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__FocusInEvent = slot; +} + +void QWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__FocusOutEvent = slot; +} + +void QWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QWindow_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ShowEvent = slot; +} + +void QWindow_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ShowEvent(param1); +} + +void QWindow_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__HideEvent = slot; +} + +void QWindow_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_HideEvent(param1); +} + +void QWindow_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__CloseEvent = slot; +} + +void QWindow_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_CloseEvent(param1); +} + +void QWindow_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__Event = slot; +} + +bool QWindow_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWindow*)(self) )->virtualbase_Event(param1); +} + +void QWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__KeyPressEvent = slot; +} + +void QWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QWindow_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MousePressEvent = slot; +} + +void QWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QWindow_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__WheelEvent = slot; +} + +void QWindow_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_WheelEvent(param1); +} + +void QWindow_override_virtual_TouchEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__TouchEvent = slot; +} + +void QWindow_virtualbase_TouchEvent(void* self, QTouchEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_TouchEvent(param1); +} + +void QWindow_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__TabletEvent = slot; +} + +void QWindow_virtualbase_TabletEvent(void* self, QTabletEvent* param1) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_TabletEvent(param1); +} + +void QWindow_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__NativeEvent = slot; +} + +bool QWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQWindow*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWindow_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__EventFilter = slot; +} + +bool QWindow_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWindow*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWindow_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__TimerEvent = slot; +} + +void QWindow_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_TimerEvent(event); +} + +void QWindow_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ChildEvent = slot; +} + +void QWindow_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ChildEvent(event); +} + +void QWindow_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__CustomEvent = slot; +} + +void QWindow_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_CustomEvent(event); +} + +void QWindow_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__ConnectNotify = slot; +} + +void QWindow_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWindow_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWindow*)(self) )->handle__DisconnectNotify = slot; +} + +void QWindow_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWindow*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWindow_Delete(QWindow* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qwindow.go b/qt6/gen_qwindow.go index 1d3fb615..39eec827 100644 --- a/qt6/gen_qwindow.go +++ b/qt6/gen_qwindow.go @@ -33,7 +33,8 @@ const ( ) type QWindow struct { - h *C.QWindow + h *C.QWindow + isSubclass bool *QObject *QSurface } @@ -52,33 +53,61 @@ func (this *QWindow) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWindow(h *C.QWindow) *QWindow { +// newQWindow constructs the type using only CGO pointers. +func newQWindow(h *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface) *QWindow { if h == nil { return nil } - return &QWindow{h: h, QObject: UnsafeNewQObject(unsafe.Pointer(h)), QSurface: UnsafeNewQSurface(unsafe.Pointer(h))} + return &QWindow{h: h, + QObject: newQObject(h_QObject), + QSurface: newQSurface(h_QSurface)} } -func UnsafeNewQWindow(h unsafe.Pointer) *QWindow { - return newQWindow((*C.QWindow)(h)) +// UnsafeNewQWindow constructs the type using only unsafe pointers. +func UnsafeNewQWindow(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QWindow { + if h == nil { + return nil + } + + return &QWindow{h: (*C.QWindow)(h), + QObject: UnsafeNewQObject(h_QObject), + QSurface: UnsafeNewQSurface(h_QSurface)} } // NewQWindow constructs a new QWindow object. func NewQWindow() *QWindow { - ret := C.QWindow_new() - return newQWindow(ret) + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QWindow_new(&outptr_QWindow, &outptr_QObject, &outptr_QSurface) + ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQWindow2 constructs a new QWindow object. func NewQWindow2(parent *QWindow) *QWindow { - ret := C.QWindow_new2(parent.cPointer()) - return newQWindow(ret) + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QWindow_new2(parent.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) + ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } // NewQWindow3 constructs a new QWindow object. func NewQWindow3(screen *QScreen) *QWindow { - ret := C.QWindow_new3(screen.cPointer()) - return newQWindow(ret) + var outptr_QWindow *C.QWindow = nil + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + + C.QWindow_new3(screen.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) + ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret.isSubclass = true + return ret } func (this *QWindow) MetaObject() *QMetaObject { @@ -129,7 +158,7 @@ func (this *QWindow) WinId() uintptr { } func (this *QWindow) Parent() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent(this.h)), nil, nil) } func (this *QWindow) SetParent(parent *QWindow) { @@ -249,7 +278,7 @@ func (this *QWindow) SetTransientParent(parent *QWindow) { } func (this *QWindow) TransientParent() *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_TransientParent(this.h))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_TransientParent(this.h)), nil, nil) } func (this *QWindow) IsAncestorOf(child *QWindow) bool { @@ -437,7 +466,7 @@ func (this *QWindow) SetMouseGrabEnabled(grab bool) bool { } func (this *QWindow) Screen() *QScreen { - return UnsafeNewQScreen(unsafe.Pointer(C.QWindow_Screen(this.h))) + return UnsafeNewQScreen(unsafe.Pointer(C.QWindow_Screen(this.h)), nil) } func (this *QWindow) SetScreen(screen *QScreen) { @@ -496,7 +525,7 @@ func (this *QWindow) UnsetCursor() { } func QWindow_FromWinId(id uintptr) *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_FromWinId((C.uintptr_t)(id)))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_FromWinId((C.uintptr_t)(id))), nil, nil) } func (this *QWindow) RequestActivate() { @@ -622,7 +651,7 @@ func miqt_exec_callback_QWindow_ScreenChanged(cb C.intptr_t, screen *C.QScreen) } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen)) + slotval1 := UnsafeNewQScreen(unsafe.Pointer(screen), nil) gofunc(slotval1) } @@ -986,7 +1015,7 @@ func miqt_exec_callback_QWindow_TransientParentChanged(cb C.intptr_t, transientP } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQWindow(unsafe.Pointer(transientParent)) + slotval1 := UnsafeNewQWindow(unsafe.Pointer(transientParent), nil, nil) gofunc(slotval1) } @@ -1014,7 +1043,7 @@ func QWindow_Tr3(s string, c string, n int) string { } func (this *QWindow) Parent1(mode QWindow__AncestorMode) *QWindow { - return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent1(this.h, (C.int)(mode)))) + return UnsafeNewQWindow(unsafe.Pointer(C.QWindow_Parent1(this.h, (C.int)(mode))), nil, nil) } func (this *QWindow) SetFlag2(param1 WindowType, on bool) { @@ -1025,9 +1054,737 @@ func (this *QWindow) IsAncestorOf2(child *QWindow, mode QWindow__AncestorMode) b return (bool)(C.QWindow_IsAncestorOf2(this.h, child.cPointer(), (C.int)(mode))) } +func (this *QWindow) callVirtualBase_SurfaceType() QSurface__SurfaceType { + + return (QSurface__SurfaceType)(C.QWindow_virtualbase_SurfaceType(unsafe.Pointer(this.h))) + +} +func (this *QWindow) OnSurfaceType(slot func(super func() QSurface__SurfaceType) QSurface__SurfaceType) { + C.QWindow_override_virtual_SurfaceType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_SurfaceType +func miqt_exec_callback_QWindow_SurfaceType(self *C.QWindow, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() QSurface__SurfaceType) QSurface__SurfaceType) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_SurfaceType) + + return (C.int)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_Format() *QSurfaceFormat { + + _ret := C.QWindow_virtualbase_Format(unsafe.Pointer(this.h)) + _goptr := newQSurfaceFormat(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWindow) OnFormat(slot func(super func() *QSurfaceFormat) *QSurfaceFormat) { + C.QWindow_override_virtual_Format(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_Format +func miqt_exec_callback_QWindow_Format(self *C.QWindow, cb C.intptr_t) *C.QSurfaceFormat { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSurfaceFormat) *QSurfaceFormat) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_Format) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_Size() *QSize { + + _ret := C.QWindow_virtualbase_Size(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWindow) OnSize(slot func(super func() *QSize) *QSize) { + C.QWindow_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_Size +func miqt_exec_callback_QWindow_Size(self *C.QWindow, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_Size) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_AccessibleRoot() *QAccessibleInterface { + + return UnsafeNewQAccessibleInterface(unsafe.Pointer(C.QWindow_virtualbase_AccessibleRoot(unsafe.Pointer(this.h)))) +} +func (this *QWindow) OnAccessibleRoot(slot func(super func() *QAccessibleInterface) *QAccessibleInterface) { + C.QWindow_override_virtual_AccessibleRoot(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_AccessibleRoot +func miqt_exec_callback_QWindow_AccessibleRoot(self *C.QWindow, cb C.intptr_t) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QAccessibleInterface) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_AccessibleRoot) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_FocusObject() *QObject { + + return UnsafeNewQObject(unsafe.Pointer(C.QWindow_virtualbase_FocusObject(unsafe.Pointer(this.h)))) +} +func (this *QWindow) OnFocusObject(slot func(super func() *QObject) *QObject) { + C.QWindow_override_virtual_FocusObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_FocusObject +func miqt_exec_callback_QWindow_FocusObject(self *C.QWindow, cb C.intptr_t) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QObject) *QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_FocusObject) + + return virtualReturn.cPointer() + +} + +func (this *QWindow) callVirtualBase_ExposeEvent(param1 *QExposeEvent) { + + C.QWindow_virtualbase_ExposeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnExposeEvent(slot func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) { + C.QWindow_override_virtual_ExposeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ExposeEvent +func miqt_exec_callback_QWindow_ExposeEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QExposeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QExposeEvent), param1 *QExposeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQExposeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ResizeEvent(param1 *QResizeEvent) { + + C.QWindow_virtualbase_ResizeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnResizeEvent(slot func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) { + C.QWindow_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ResizeEvent +func miqt_exec_callback_QWindow_ResizeEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QResizeEvent), param1 *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QWindow_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QWindow_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_PaintEvent +func miqt_exec_callback_QWindow_PaintEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MoveEvent(param1 *QMoveEvent) { + + C.QWindow_virtualbase_MoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMoveEvent(slot func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) { + C.QWindow_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MoveEvent +func miqt_exec_callback_QWindow_MoveEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMoveEvent), param1 *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_FocusInEvent(param1 *QFocusEvent) { + + C.QWindow_virtualbase_FocusInEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnFocusInEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QWindow_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_FocusInEvent +func miqt_exec_callback_QWindow_FocusInEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_FocusOutEvent(param1 *QFocusEvent) { + + C.QWindow_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnFocusOutEvent(slot func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) { + C.QWindow_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_FocusOutEvent +func miqt_exec_callback_QWindow_FocusOutEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QFocusEvent), param1 *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QWindow_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QWindow_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ShowEvent +func miqt_exec_callback_QWindow_ShowEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_HideEvent(param1 *QHideEvent) { + + C.QWindow_virtualbase_HideEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnHideEvent(slot func(super func(param1 *QHideEvent), param1 *QHideEvent)) { + C.QWindow_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_HideEvent +func miqt_exec_callback_QWindow_HideEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QHideEvent), param1 *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QWindow_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QWindow_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_CloseEvent +func miqt_exec_callback_QWindow_CloseEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_Event(param1 *QEvent) bool { + + return (bool)(C.QWindow_virtualbase_Event(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QWindow) OnEvent(slot func(super func(param1 *QEvent) bool, param1 *QEvent) bool) { + C.QWindow_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_Event +func miqt_exec_callback_QWindow_Event(self *C.QWindow, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent) bool, param1 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QWindow_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QWindow_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_KeyPressEvent +func miqt_exec_callback_QWindow_KeyPressEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_KeyReleaseEvent(param1 *QKeyEvent) { + + C.QWindow_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnKeyReleaseEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QWindow_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_KeyReleaseEvent +func miqt_exec_callback_QWindow_KeyReleaseEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MousePressEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MousePressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMousePressEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MousePressEvent +func miqt_exec_callback_QWindow_MousePressEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MouseReleaseEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMouseReleaseEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MouseReleaseEvent +func miqt_exec_callback_QWindow_MouseReleaseEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MouseDoubleClickEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMouseDoubleClickEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MouseDoubleClickEvent +func miqt_exec_callback_QWindow_MouseDoubleClickEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_MouseMoveEvent(param1 *QMouseEvent) { + + C.QWindow_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnMouseMoveEvent(slot func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) { + C.QWindow_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_MouseMoveEvent +func miqt_exec_callback_QWindow_MouseMoveEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QMouseEvent), param1 *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QWindow_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QWindow_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_WheelEvent +func miqt_exec_callback_QWindow_WheelEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_TouchEvent(param1 *QTouchEvent) { + + C.QWindow_virtualbase_TouchEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnTouchEvent(slot func(super func(param1 *QTouchEvent), param1 *QTouchEvent)) { + C.QWindow_override_virtual_TouchEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_TouchEvent +func miqt_exec_callback_QWindow_TouchEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QTouchEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTouchEvent), param1 *QTouchEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTouchEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_TouchEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_TabletEvent(param1 *QTabletEvent) { + + C.QWindow_virtualbase_TabletEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWindow) OnTabletEvent(slot func(super func(param1 *QTabletEvent), param1 *QTabletEvent)) { + C.QWindow_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_TabletEvent +func miqt_exec_callback_QWindow_TabletEvent(self *C.QWindow, cb C.intptr_t, param1 *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QTabletEvent), param1 *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + + gofunc((&QWindow{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWindow_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QWindow) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QWindow_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_NativeEvent +func miqt_exec_callback_QWindow_NativeEvent(self *C.QWindow, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QWindow_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QWindow) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QWindow_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_EventFilter +func miqt_exec_callback_QWindow_EventFilter(self *C.QWindow, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWindow{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWindow) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QWindow_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWindow) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QWindow_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_TimerEvent +func miqt_exec_callback_QWindow_TimerEvent(self *C.QWindow, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QWindow_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWindow) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QWindow_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ChildEvent +func miqt_exec_callback_QWindow_ChildEvent(self *C.QWindow, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWindow{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_CustomEvent(event *QEvent) { + + C.QWindow_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWindow) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWindow_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_CustomEvent +func miqt_exec_callback_QWindow_CustomEvent(self *C.QWindow, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWindow{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWindow) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QWindow_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWindow) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWindow_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_ConnectNotify +func miqt_exec_callback_QWindow_ConnectNotify(self *C.QWindow, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWindow{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWindow) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QWindow_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QWindow) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QWindow_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWindow_DisconnectNotify +func miqt_exec_callback_QWindow_DisconnectNotify(self *C.QWindow, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWindow{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QWindow) Delete() { - C.QWindow_Delete(this.h) + C.QWindow_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qwindow.h b/qt6/gen_qwindow.h index ebdc0f51..3fc7da5c 100644 --- a/qt6/gen_qwindow.h +++ b/qt6/gen_qwindow.h @@ -16,39 +16,77 @@ extern "C" { #ifdef __cplusplus class QAccessibleInterface; +class QByteArray; +class QChildEvent; +class QCloseEvent; class QCursor; +class QEvent; +class QExposeEvent; +class QFocusEvent; +class QHideEvent; class QIcon; +class QKeyEvent; class QMargins; +class QMetaMethod; class QMetaObject; +class QMouseEvent; +class QMoveEvent; class QObject; +class QPaintEvent; class QPoint; class QPointF; class QRect; class QRegion; +class QResizeEvent; class QScreen; +class QShowEvent; class QSize; +class QSurface; class QSurfaceFormat; +class QTabletEvent; +class QTimerEvent; +class QTouchEvent; +class QWheelEvent; class QWindow; #else typedef struct QAccessibleInterface QAccessibleInterface; +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; typedef struct QCursor QCursor; +typedef struct QEvent QEvent; +typedef struct QExposeEvent QExposeEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; typedef struct QIcon QIcon; +typedef struct QKeyEvent QKeyEvent; typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; typedef struct QObject QObject; +typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QPointF QPointF; typedef struct QRect QRect; typedef struct QRegion QRegion; +typedef struct QResizeEvent QResizeEvent; typedef struct QScreen QScreen; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QSurface QSurface; typedef struct QSurfaceFormat QSurfaceFormat; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QTouchEvent QTouchEvent; +typedef struct QWheelEvent QWheelEvent; typedef struct QWindow QWindow; #endif -QWindow* QWindow_new(); -QWindow* QWindow_new2(QWindow* parent); -QWindow* QWindow_new3(QScreen* screen); +void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); +void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QWindow_MetaObject(const QWindow* self); void* QWindow_Metacast(QWindow* self, const char* param1); struct miqt_string QWindow_Tr(const char* s); @@ -199,12 +237,94 @@ void QWindow_OpacityChanged(QWindow* self, double opacity); void QWindow_connect_OpacityChanged(QWindow* self, intptr_t slot); void QWindow_TransientParentChanged(QWindow* self, QWindow* transientParent); void QWindow_connect_TransientParentChanged(QWindow* self, intptr_t slot); +void QWindow_ExposeEvent(QWindow* self, QExposeEvent* param1); +void QWindow_ResizeEvent(QWindow* self, QResizeEvent* param1); +void QWindow_PaintEvent(QWindow* self, QPaintEvent* param1); +void QWindow_MoveEvent(QWindow* self, QMoveEvent* param1); +void QWindow_FocusInEvent(QWindow* self, QFocusEvent* param1); +void QWindow_FocusOutEvent(QWindow* self, QFocusEvent* param1); +void QWindow_ShowEvent(QWindow* self, QShowEvent* param1); +void QWindow_HideEvent(QWindow* self, QHideEvent* param1); +void QWindow_CloseEvent(QWindow* self, QCloseEvent* param1); +bool QWindow_Event(QWindow* self, QEvent* param1); +void QWindow_KeyPressEvent(QWindow* self, QKeyEvent* param1); +void QWindow_KeyReleaseEvent(QWindow* self, QKeyEvent* param1); +void QWindow_MousePressEvent(QWindow* self, QMouseEvent* param1); +void QWindow_MouseReleaseEvent(QWindow* self, QMouseEvent* param1); +void QWindow_MouseDoubleClickEvent(QWindow* self, QMouseEvent* param1); +void QWindow_MouseMoveEvent(QWindow* self, QMouseEvent* param1); +void QWindow_WheelEvent(QWindow* self, QWheelEvent* param1); +void QWindow_TouchEvent(QWindow* self, QTouchEvent* param1); +void QWindow_TabletEvent(QWindow* self, QTabletEvent* param1); +bool QWindow_NativeEvent(QWindow* self, struct miqt_string eventType, void* message, intptr_t* result); struct miqt_string QWindow_Tr2(const char* s, const char* c); struct miqt_string QWindow_Tr3(const char* s, const char* c, int n); QWindow* QWindow_Parent1(const QWindow* self, int mode); void QWindow_SetFlag2(QWindow* self, int param1, bool on); bool QWindow_IsAncestorOf2(const QWindow* self, QWindow* child, int mode); -void QWindow_Delete(QWindow* self); +void QWindow_override_virtual_SurfaceType(void* self, intptr_t slot); +int QWindow_virtualbase_SurfaceType(const void* self); +void QWindow_override_virtual_Format(void* self, intptr_t slot); +QSurfaceFormat* QWindow_virtualbase_Format(const void* self); +void QWindow_override_virtual_Size(void* self, intptr_t slot); +QSize* QWindow_virtualbase_Size(const void* self); +void QWindow_override_virtual_AccessibleRoot(void* self, intptr_t slot); +QAccessibleInterface* QWindow_virtualbase_AccessibleRoot(const void* self); +void QWindow_override_virtual_FocusObject(void* self, intptr_t slot); +QObject* QWindow_virtualbase_FocusObject(const void* self); +void QWindow_override_virtual_ExposeEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1); +void QWindow_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QWindow_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWindow_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QWindow_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MoveEvent(void* self, QMoveEvent* param1); +void QWindow_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWindow_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QWindow_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWindow_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QWindow_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QWindow_override_virtual_HideEvent(void* self, intptr_t slot); +void QWindow_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QWindow_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWindow_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QWindow_override_virtual_Event(void* self, intptr_t slot); +bool QWindow_virtualbase_Event(void* self, QEvent* param1); +void QWindow_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWindow_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QWindow_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWindow_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QWindow_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWindow_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QWindow_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWindow_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QWindow_override_virtual_TouchEvent(void* self, intptr_t slot); +void QWindow_virtualbase_TouchEvent(void* self, QTouchEvent* param1); +void QWindow_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWindow_virtualbase_TabletEvent(void* self, QTabletEvent* param1); +void QWindow_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWindow_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QWindow_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWindow_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWindow_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWindow_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWindow_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWindow_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWindow_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWindow_virtualbase_CustomEvent(void* self, QEvent* event); +void QWindow_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWindow_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWindow_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWindow_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWindow_Delete(QWindow* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qwizard.cpp b/qt6/gen_qwizard.cpp index f4eff838..2dadb285 100644 --- a/qt6/gen_qwizard.cpp +++ b/qt6/gen_qwizard.cpp @@ -1,12 +1,39 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include #include #include #include +#include #include +#include #include #include #include @@ -14,16 +41,508 @@ #include "gen_qwizard.h" #include "_cgo_export.h" -QWizard* QWizard_new(QWidget* parent) { - return new QWizard(parent); +class MiqtVirtualQWizard : public virtual QWizard { +public: + + MiqtVirtualQWizard(QWidget* parent): QWizard(parent) {}; + MiqtVirtualQWizard(): QWizard() {}; + MiqtVirtualQWizard(QWidget* parent, Qt::WindowFlags flags): QWizard(parent, flags) {}; + + virtual ~MiqtVirtualQWizard() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValidateCurrentPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool validateCurrentPage() override { + if (handle__ValidateCurrentPage == 0) { + return QWizard::validateCurrentPage(); + } + + + bool callback_return_value = miqt_exec_callback_QWizard_ValidateCurrentPage(this, handle__ValidateCurrentPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ValidateCurrentPage() { + + return QWizard::validateCurrentPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextId = 0; + + // Subclass to allow providing a Go implementation + virtual int nextId() const override { + if (handle__NextId == 0) { + return QWizard::nextId(); + } + + + int callback_return_value = miqt_exec_callback_QWizard_NextId(const_cast(this), handle__NextId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_NextId() const { + + return QWizard::nextId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWizard::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWizard_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWizard::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWizard::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizard_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWizard::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWizard::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWizard_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWizard::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWizard::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWizard_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWizard::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWizard::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWizard_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWizard::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QWizard::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QWizard_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QWizard::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitializePage = 0; + + // Subclass to allow providing a Go implementation + virtual void initializePage(int id) override { + if (handle__InitializePage == 0) { + QWizard::initializePage(id); + return; + } + + int sigval1 = id; + + miqt_exec_callback_QWizard_InitializePage(this, handle__InitializePage, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitializePage(int id) { + + QWizard::initializePage(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CleanupPage = 0; + + // Subclass to allow providing a Go implementation + virtual void cleanupPage(int id) override { + if (handle__CleanupPage == 0) { + QWizard::cleanupPage(id); + return; + } + + int sigval1 = id; + + miqt_exec_callback_QWizard_CleanupPage(this, handle__CleanupPage, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CleanupPage(int id) { + + QWizard::cleanupPage(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWizard::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizard_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWizard::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QWizard::open(); + return; + } + + + miqt_exec_callback_QWizard_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QWizard::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QWizard::exec(); + } + + + int callback_return_value = miqt_exec_callback_QWizard_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QWizard::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QWizard::accept(); + return; + } + + + miqt_exec_callback_QWizard_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QWizard::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QWizard::reject(); + return; + } + + + miqt_exec_callback_QWizard_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QWizard::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QWizard::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QWizard::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QWizard::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QWizard::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QWizard::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QWizard::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QWizard::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QWizard_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QWizard::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QWizard::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QWizard_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QWizard::eventFilter(param1, param2); + + } + +}; + +void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent); + *outptr_QWizard = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWizard* QWizard_new2() { - return new QWizard(); +void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(); + *outptr_QWizard = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QWizard* QWizard_new3(QWidget* parent, int flags) { - return new QWizard(parent, static_cast(flags)); +void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent, static_cast(flags)); + *outptr_QWizard = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QWizard_MetaObject(const QWizard* self) { @@ -236,7 +755,7 @@ void QWizard_CurrentIdChanged(QWizard* self, int id) { } void QWizard_connect_CurrentIdChanged(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::currentIdChanged), self, [=](int id) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::currentIdChanged), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QWizard_CurrentIdChanged(slot, sigval1); }); @@ -247,7 +766,7 @@ void QWizard_HelpRequested(QWizard* self) { } void QWizard_connect_HelpRequested(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::helpRequested), self, [=]() { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::helpRequested), self, [=]() { miqt_exec_callback_QWizard_HelpRequested(slot); }); } @@ -257,7 +776,7 @@ void QWizard_CustomButtonClicked(QWizard* self, int which) { } void QWizard_connect_CustomButtonClicked(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::customButtonClicked), self, [=](int which) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::customButtonClicked), self, [=](int which) { int sigval1 = which; miqt_exec_callback_QWizard_CustomButtonClicked(slot, sigval1); }); @@ -268,7 +787,7 @@ void QWizard_PageAdded(QWizard* self, int id) { } void QWizard_connect_PageAdded(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::pageAdded), self, [=](int id) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::pageAdded), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QWizard_PageAdded(slot, sigval1); }); @@ -279,7 +798,7 @@ void QWizard_PageRemoved(QWizard* self, int id) { } void QWizard_connect_PageRemoved(QWizard* self, intptr_t slot) { - QWizard::connect(self, static_cast(&QWizard::pageRemoved), self, [=](int id) { + MiqtVirtualQWizard::connect(self, static_cast(&QWizard::pageRemoved), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QWizard_PageRemoved(slot, sigval1); }); @@ -327,123 +846,1393 @@ void QWizard_SetOption2(QWizard* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QWizard_Delete(QWizard* self) { - delete self; +void QWizard_override_virtual_ValidateCurrentPage(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ValidateCurrentPage = slot; } -QWizardPage* QWizardPage_new(QWidget* parent) { - return new QWizardPage(parent); +bool QWizard_virtualbase_ValidateCurrentPage(void* self) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_ValidateCurrentPage(); } -QWizardPage* QWizardPage_new2() { - return new QWizardPage(); +void QWizard_override_virtual_NextId(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__NextId = slot; } -QMetaObject* QWizardPage_MetaObject(const QWizardPage* self) { - return (QMetaObject*) self->metaObject(); +int QWizard_virtualbase_NextId(const void* self) { + return ( (const MiqtVirtualQWizard*)(self) )->virtualbase_NextId(); } -void* QWizardPage_Metacast(QWizardPage* self, const char* param1) { - return self->qt_metacast(param1); +void QWizard_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__SetVisible = slot; } -struct miqt_string QWizardPage_Tr(const char* s) { - QString _ret = QWizardPage::tr(s); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QWizard_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_SetVisible(visible); } -void QWizardPage_SetTitle(QWizardPage* self, struct miqt_string title) { - QString title_QString = QString::fromUtf8(title.data, title.len); - self->setTitle(title_QString); +void QWizard_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__SizeHint = slot; } -struct miqt_string QWizardPage_Title(const QWizardPage* self) { - QString _ret = self->title(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +QSize* QWizard_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWizard*)(self) )->virtualbase_SizeHint(); } -void QWizardPage_SetSubTitle(QWizardPage* self, struct miqt_string subTitle) { - QString subTitle_QString = QString::fromUtf8(subTitle.data, subTitle.len); - self->setSubTitle(subTitle_QString); +void QWizard_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Event = slot; } -struct miqt_string QWizardPage_SubTitle(const QWizardPage* self) { - QString _ret = self->subTitle(); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +bool QWizard_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_Event(event); } -void QWizardPage_SetPixmap(QWizardPage* self, int which, QPixmap* pixmap) { - self->setPixmap(static_cast(which), *pixmap); +void QWizard_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ResizeEvent = slot; } -QPixmap* QWizardPage_Pixmap(const QWizardPage* self, int which) { - return new QPixmap(self->pixmap(static_cast(which))); +void QWizard_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_ResizeEvent(event); } -void QWizardPage_SetFinalPage(QWizardPage* self, bool finalPage) { - self->setFinalPage(finalPage); +void QWizard_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__PaintEvent = slot; } -bool QWizardPage_IsFinalPage(const QWizardPage* self) { - return self->isFinalPage(); +void QWizard_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_PaintEvent(event); } -void QWizardPage_SetCommitPage(QWizardPage* self, bool commitPage) { - self->setCommitPage(commitPage); +void QWizard_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Done = slot; } -bool QWizardPage_IsCommitPage(const QWizardPage* self) { - return self->isCommitPage(); +void QWizard_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Done(result); } -void QWizardPage_SetButtonText(QWizardPage* self, int which, struct miqt_string text) { - QString text_QString = QString::fromUtf8(text.data, text.len); - self->setButtonText(static_cast(which), text_QString); +void QWizard_override_virtual_InitializePage(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__InitializePage = slot; } -struct miqt_string QWizardPage_ButtonText(const QWizardPage* self, int which) { - QString _ret = self->buttonText(static_cast(which)); - // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory - QByteArray _b = _ret.toUtf8(); - struct miqt_string _ms; - _ms.len = _b.length(); - _ms.data = static_cast(malloc(_ms.len)); - memcpy(_ms.data, _b.data(), _ms.len); - return _ms; +void QWizard_virtualbase_InitializePage(void* self, int id) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_InitializePage(id); } -void QWizardPage_InitializePage(QWizardPage* self) { - self->initializePage(); +void QWizard_override_virtual_CleanupPage(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__CleanupPage = slot; } -void QWizardPage_CleanupPage(QWizardPage* self) { - self->cleanupPage(); +void QWizard_virtualbase_CleanupPage(void* self, int id) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_CleanupPage(id); } -bool QWizardPage_ValidatePage(QWizardPage* self) { - return self->validatePage(); +void QWizard_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__MinimumSizeHint = slot; } -bool QWizardPage_IsComplete(const QWizardPage* self) { - return self->isComplete(); +QSize* QWizard_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWizard*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWizard_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Open = slot; +} + +void QWizard_virtualbase_Open(void* self) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Open(); +} + +void QWizard_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Exec = slot; +} + +int QWizard_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_Exec(); +} + +void QWizard_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Accept = slot; +} + +void QWizard_virtualbase_Accept(void* self) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Accept(); +} + +void QWizard_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__Reject = slot; +} + +void QWizard_virtualbase_Reject(void* self) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_Reject(); +} + +void QWizard_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__KeyPressEvent = slot; +} + +void QWizard_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QWizard_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__CloseEvent = slot; +} + +void QWizard_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_CloseEvent(param1); +} + +void QWizard_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ShowEvent = slot; +} + +void QWizard_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_ShowEvent(param1); +} + +void QWizard_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWizard_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQWizard*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QWizard_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWizard*)(self) )->handle__EventFilter = slot; +} + +bool QWizard_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQWizard*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QWizard_Delete(QWizard* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQWizardPage : public virtual QWizardPage { +public: + + MiqtVirtualQWizardPage(QWidget* parent): QWizardPage(parent) {}; + MiqtVirtualQWizardPage(): QWizardPage() {}; + + virtual ~MiqtVirtualQWizardPage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitializePage = 0; + + // Subclass to allow providing a Go implementation + virtual void initializePage() override { + if (handle__InitializePage == 0) { + QWizardPage::initializePage(); + return; + } + + + miqt_exec_callback_QWizardPage_InitializePage(this, handle__InitializePage); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitializePage() { + + QWizardPage::initializePage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CleanupPage = 0; + + // Subclass to allow providing a Go implementation + virtual void cleanupPage() override { + if (handle__CleanupPage == 0) { + QWizardPage::cleanupPage(); + return; + } + + + miqt_exec_callback_QWizardPage_CleanupPage(this, handle__CleanupPage); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CleanupPage() { + + QWizardPage::cleanupPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValidatePage = 0; + + // Subclass to allow providing a Go implementation + virtual bool validatePage() override { + if (handle__ValidatePage == 0) { + return QWizardPage::validatePage(); + } + + + bool callback_return_value = miqt_exec_callback_QWizardPage_ValidatePage(this, handle__ValidatePage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ValidatePage() { + + return QWizardPage::validatePage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsComplete = 0; + + // Subclass to allow providing a Go implementation + virtual bool isComplete() const override { + if (handle__IsComplete == 0) { + return QWizardPage::isComplete(); + } + + + bool callback_return_value = miqt_exec_callback_QWizardPage_IsComplete(const_cast(this), handle__IsComplete); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsComplete() const { + + return QWizardPage::isComplete(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextId = 0; + + // Subclass to allow providing a Go implementation + virtual int nextId() const override { + if (handle__NextId == 0) { + return QWizardPage::nextId(); + } + + + int callback_return_value = miqt_exec_callback_QWizardPage_NextId(const_cast(this), handle__NextId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_NextId() const { + + return QWizardPage::nextId(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWizardPage::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWizardPage_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWizardPage::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWizardPage::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWizardPage_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWizardPage::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWizardPage::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizardPage_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWizardPage::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWizardPage::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWizardPage_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWizardPage::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWizardPage::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWizardPage_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWizardPage::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWizardPage::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWizardPage_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWizardPage::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QWizardPage::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWizardPage_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWizardPage::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWizardPage::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWizardPage_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWizardPage::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWizardPage::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWizardPage::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWizardPage::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWizardPage::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QWizardPage::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWizardPage::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWizardPage::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWizardPage::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWizardPage::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWizardPage::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWizardPage::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWizardPage::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QWizardPage::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWizardPage::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWizardPage::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWizardPage::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QWizardPage::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWizardPage::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QWizardPage::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QWizardPage::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QWizardPage::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWizardPage::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWizardPage::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWizardPage::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWizardPage::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWizardPage::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWizardPage::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWizardPage::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QWizardPage::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QWizardPage::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QWizardPage::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QWizardPage::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWizardPage::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWizardPage::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QWizardPage::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWizardPage::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QWizardPage::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QWizardPage::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QWizardPage::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QWizardPage::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QWizardPage::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QWizardPage::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QWizardPage::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QWizardPage::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QWizardPage::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QWizardPage::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QWizardPage::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QWizardPage_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QWizardPage::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QWizardPage::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QWizardPage_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWizardPage::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWizardPage::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWizardPage_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWizardPage::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWizardPage::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWizardPage_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QWizardPage::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QWizardPage::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWizardPage_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWizardPage::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QWizardPage::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWizardPage_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWizardPage::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QWizardPage::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWizardPage_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWizardPage::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWizardPage::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWizardPage_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWizardPage::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QWizardPage::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWizardPage_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QWizardPage::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWizardPage::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWizardPage_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWizardPage::focusNextPrevChild(next); + + } + +}; + +void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(parent); + *outptr_QWizardPage = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(); + *outptr_QWizardPage = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QWizardPage_MetaObject(const QWizardPage* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWizardPage_Metacast(QWizardPage* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWizardPage_Tr(const char* s) { + QString _ret = QWizardPage::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_SetTitle(QWizardPage* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->setTitle(title_QString); +} + +struct miqt_string QWizardPage_Title(const QWizardPage* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_SetSubTitle(QWizardPage* self, struct miqt_string subTitle) { + QString subTitle_QString = QString::fromUtf8(subTitle.data, subTitle.len); + self->setSubTitle(subTitle_QString); +} + +struct miqt_string QWizardPage_SubTitle(const QWizardPage* self) { + QString _ret = self->subTitle(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_SetPixmap(QWizardPage* self, int which, QPixmap* pixmap) { + self->setPixmap(static_cast(which), *pixmap); +} + +QPixmap* QWizardPage_Pixmap(const QWizardPage* self, int which) { + return new QPixmap(self->pixmap(static_cast(which))); +} + +void QWizardPage_SetFinalPage(QWizardPage* self, bool finalPage) { + self->setFinalPage(finalPage); +} + +bool QWizardPage_IsFinalPage(const QWizardPage* self) { + return self->isFinalPage(); +} + +void QWizardPage_SetCommitPage(QWizardPage* self, bool commitPage) { + self->setCommitPage(commitPage); +} + +bool QWizardPage_IsCommitPage(const QWizardPage* self) { + return self->isCommitPage(); +} + +void QWizardPage_SetButtonText(QWizardPage* self, int which, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setButtonText(static_cast(which), text_QString); +} + +struct miqt_string QWizardPage_ButtonText(const QWizardPage* self, int which) { + QString _ret = self->buttonText(static_cast(which)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWizardPage_InitializePage(QWizardPage* self) { + self->initializePage(); +} + +void QWizardPage_CleanupPage(QWizardPage* self) { + self->cleanupPage(); +} + +bool QWizardPage_ValidatePage(QWizardPage* self) { + return self->validatePage(); +} + +bool QWizardPage_IsComplete(const QWizardPage* self) { + return self->isComplete(); } int QWizardPage_NextId(const QWizardPage* self) { @@ -455,7 +2244,7 @@ void QWizardPage_CompleteChanged(QWizardPage* self) { } void QWizardPage_connect_CompleteChanged(QWizardPage* self, intptr_t slot) { - QWizardPage::connect(self, static_cast(&QWizardPage::completeChanged), self, [=]() { + MiqtVirtualQWizardPage::connect(self, static_cast(&QWizardPage::completeChanged), self, [=]() { miqt_exec_callback_QWizardPage_CompleteChanged(slot); }); } @@ -482,7 +2271,379 @@ struct miqt_string QWizardPage_Tr3(const char* s, const char* c, int n) { return _ms; } -void QWizardPage_Delete(QWizardPage* self) { - delete self; +void QWizardPage_override_virtual_InitializePage(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InitializePage = slot; +} + +void QWizardPage_virtualbase_InitializePage(void* self) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_InitializePage(); +} + +void QWizardPage_override_virtual_CleanupPage(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__CleanupPage = slot; +} + +void QWizardPage_virtualbase_CleanupPage(void* self) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_CleanupPage(); +} + +void QWizardPage_override_virtual_ValidatePage(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ValidatePage = slot; +} + +bool QWizardPage_virtualbase_ValidatePage(void* self) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ValidatePage(); +} + +void QWizardPage_override_virtual_IsComplete(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__IsComplete = slot; +} + +bool QWizardPage_virtualbase_IsComplete(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_IsComplete(); +} + +void QWizardPage_override_virtual_NextId(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__NextId = slot; +} + +int QWizardPage_virtualbase_NextId(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_NextId(); +} + +void QWizardPage_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DevType = slot; +} + +int QWizardPage_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_DevType(); +} + +void QWizardPage_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__SetVisible = slot; +} + +void QWizardPage_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_SetVisible(visible); +} + +void QWizardPage_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__SizeHint = slot; +} + +QSize* QWizardPage_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_SizeHint(); +} + +void QWizardPage_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWizardPage_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWizardPage_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__HeightForWidth = slot; +} + +int QWizardPage_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWizardPage_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWizardPage_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWizardPage_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWizardPage_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_PaintEngine(); +} + +void QWizardPage_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__Event = slot; +} + +bool QWizardPage_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_Event(event); +} + +void QWizardPage_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MousePressEvent = slot; +} + +void QWizardPage_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWizardPage_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWizardPage_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWizardPage_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWizardPage_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWizardPage_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWizardPage_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWizardPage_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__WheelEvent = slot; +} + +void QWizardPage_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_WheelEvent(event); +} + +void QWizardPage_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__KeyPressEvent = slot; +} + +void QWizardPage_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWizardPage_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWizardPage_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWizardPage_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__FocusInEvent = slot; +} + +void QWizardPage_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWizardPage_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__FocusOutEvent = slot; +} + +void QWizardPage_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWizardPage_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__EnterEvent = slot; +} + +void QWizardPage_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_EnterEvent(event); +} + +void QWizardPage_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__LeaveEvent = slot; +} + +void QWizardPage_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWizardPage_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__PaintEvent = slot; +} + +void QWizardPage_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_PaintEvent(event); +} + +void QWizardPage_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__MoveEvent = slot; +} + +void QWizardPage_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_MoveEvent(event); +} + +void QWizardPage_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ResizeEvent = slot; +} + +void QWizardPage_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWizardPage_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__CloseEvent = slot; +} + +void QWizardPage_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_CloseEvent(event); +} + +void QWizardPage_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWizardPage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QWizardPage_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__TabletEvent = slot; +} + +void QWizardPage_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_TabletEvent(event); +} + +void QWizardPage_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ActionEvent = slot; +} + +void QWizardPage_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ActionEvent(event); +} + +void QWizardPage_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DragEnterEvent = slot; +} + +void QWizardPage_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QWizardPage_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DragMoveEvent = slot; +} + +void QWizardPage_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QWizardPage_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWizardPage_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QWizardPage_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__DropEvent = slot; +} + +void QWizardPage_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_DropEvent(event); +} + +void QWizardPage_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ShowEvent = slot; +} + +void QWizardPage_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ShowEvent(event); +} + +void QWizardPage_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__HideEvent = slot; +} + +void QWizardPage_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_HideEvent(event); +} + +void QWizardPage_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__NativeEvent = slot; +} + +bool QWizardPage_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWizardPage_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__ChangeEvent = slot; +} + +void QWizardPage_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWizardPage_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__Metric = slot; +} + +int QWizardPage_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_Metric(param1); +} + +void QWizardPage_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InitPainter = slot; +} + +void QWizardPage_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_InitPainter(painter); +} + +void QWizardPage_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWizardPage_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_Redirected(offset); +} + +void QWizardPage_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWizardPage_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_SharedPainter(); +} + +void QWizardPage_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InputMethodEvent = slot; +} + +void QWizardPage_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWizardPage_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWizardPage_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWizardPage*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWizardPage_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWizardPage*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWizardPage_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWizardPage*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWizardPage_Delete(QWizardPage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qwizard.go b/qt6/gen_qwizard.go index 95df9e67..2769bc56 100644 --- a/qt6/gen_qwizard.go +++ b/qt6/gen_qwizard.go @@ -75,7 +75,8 @@ const ( ) type QWizard struct { - h *C.QWizard + h *C.QWizard + isSubclass bool *QDialog } @@ -93,33 +94,65 @@ func (this *QWizard) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWizard(h *C.QWizard) *QWizard { +// newQWizard constructs the type using only CGO pointers. +func newQWizard(h *C.QWizard, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizard { if h == nil { return nil } - return &QWizard{h: h, QDialog: UnsafeNewQDialog(unsafe.Pointer(h))} + return &QWizard{h: h, + QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQWizard(h unsafe.Pointer) *QWizard { - return newQWizard((*C.QWizard)(h)) +// UnsafeNewQWizard constructs the type using only unsafe pointers. +func UnsafeNewQWizard(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizard { + if h == nil { + return nil + } + + return &QWizard{h: (*C.QWizard)(h), + QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQWizard constructs a new QWizard object. func NewQWizard(parent *QWidget) *QWizard { - ret := C.QWizard_new(parent.cPointer()) - return newQWizard(ret) + var outptr_QWizard *C.QWizard = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizard_new(parent.cPointer(), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWizard2 constructs a new QWizard object. func NewQWizard2() *QWizard { - ret := C.QWizard_new2() - return newQWizard(ret) + var outptr_QWizard *C.QWizard = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizard_new2(&outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQWizard3 constructs a new QWizard object. func NewQWizard3(parent *QWidget, flags WindowType) *QWizard { - ret := C.QWizard_new3(parent.cPointer(), (C.int)(flags)) - return newQWizard(ret) + var outptr_QWizard *C.QWizard = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizard_new3(parent.cPointer(), (C.int)(flags), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QWizard) MetaObject() *QMetaObject { @@ -154,7 +187,7 @@ func (this *QWizard) RemovePage(id int) { } func (this *QWizard) Page(id int) *QWizardPage { - return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_Page(this.h, (C.int)(id)))) + return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_Page(this.h, (C.int)(id))), nil, nil, nil) } func (this *QWizard) HasVisitedPage(id int) bool { @@ -190,7 +223,7 @@ func (this *QWizard) StartId() int { } func (this *QWizard) CurrentPage() *QWizardPage { - return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_CurrentPage(this.h))) + return UnsafeNewQWizardPage(unsafe.Pointer(C.QWizard_CurrentPage(this.h)), nil, nil, nil) } func (this *QWizard) CurrentId() int { @@ -278,7 +311,7 @@ func (this *QWizard) SetButton(which QWizard__WizardButton, button *QAbstractBut } func (this *QWizard) Button(which QWizard__WizardButton) *QAbstractButton { - return UnsafeNewQAbstractButton(unsafe.Pointer(C.QWizard_Button(this.h, (C.int)(which)))) + return UnsafeNewQAbstractButton(unsafe.Pointer(C.QWizard_Button(this.h, (C.int)(which))), nil, nil, nil) } func (this *QWizard) SetTitleFormat(format TextFormat) { @@ -303,7 +336,7 @@ func (this *QWizard) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { func (this *QWizard) Pixmap(which QWizard__WizardPixmap) *QPixmap { _ret := C.QWizard_Pixmap(this.h, (C.int)(which)) - _goptr := newQPixmap(_ret) + _goptr := newQPixmap(_ret, nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -313,7 +346,7 @@ func (this *QWizard) SetSideWidget(widget *QWidget) { } func (this *QWizard) SideWidget() *QWidget { - return UnsafeNewQWidget(unsafe.Pointer(C.QWizard_SideWidget(this.h))) + return UnsafeNewQWidget(unsafe.Pointer(C.QWizard_SideWidget(this.h)), nil, nil) } func (this *QWizard) SetDefaultProperty(className string, property string, changedSignal string) { @@ -476,215 +509,1767 @@ func (this *QWizard) SetOption2(option QWizard__WizardOption, on bool) { C.QWizard_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } -// Delete this object from C++ memory. -func (this *QWizard) Delete() { - C.QWizard_Delete(this.h) -} +func (this *QWizard) callVirtualBase_ValidateCurrentPage() bool { -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QWizard) GoGC() { - runtime.SetFinalizer(this, func(this *QWizard) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} + return (bool)(C.QWizard_virtualbase_ValidateCurrentPage(unsafe.Pointer(this.h))) -type QWizardPage struct { - h *C.QWizardPage - *QWidget +} +func (this *QWizard) OnValidateCurrentPage(slot func(super func() bool) bool) { + C.QWizard_override_virtual_ValidateCurrentPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) cPointer() *C.QWizardPage { - if this == nil { - return nil +//export miqt_exec_callback_QWizard_ValidateCurrentPage +func miqt_exec_callback_QWizard_ValidateCurrentPage(self *C.QWizard, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return this.h + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_ValidateCurrentPage) + + return (C.bool)(virtualReturn) + } -func (this *QWizardPage) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) +func (this *QWizard) callVirtualBase_NextId() int { + + return (int)(C.QWizard_virtualbase_NextId(unsafe.Pointer(this.h))) + +} +func (this *QWizard) OnNextId(slot func(super func() int) int) { + C.QWizard_override_virtual_NextId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func newQWizardPage(h *C.QWizardPage) *QWizardPage { - if h == nil { - return nil +//export miqt_exec_callback_QWizard_NextId +func miqt_exec_callback_QWizard_NextId(self *C.QWizard, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") } - return &QWizardPage{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))} -} -func UnsafeNewQWizardPage(h unsafe.Pointer) *QWizardPage { - return newQWizardPage((*C.QWizardPage)(h)) + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_NextId) + + return (C.int)(virtualReturn) + } -// NewQWizardPage constructs a new QWizardPage object. -func NewQWizardPage(parent *QWidget) *QWizardPage { - ret := C.QWizardPage_new(parent.cPointer()) - return newQWizardPage(ret) +func (this *QWizard) callVirtualBase_SetVisible(visible bool) { + + C.QWizard_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWizard) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWizard_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -// NewQWizardPage2 constructs a new QWizardPage object. -func NewQWizardPage2() *QWizardPage { - ret := C.QWizardPage_new2() - return newQWizardPage(ret) +//export miqt_exec_callback_QWizard_SetVisible +func miqt_exec_callback_QWizard_SetVisible(self *C.QWizard, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWizard{h: self}).callVirtualBase_SetVisible, slotval1) + } -func (this *QWizardPage) MetaObject() *QMetaObject { - return UnsafeNewQMetaObject(unsafe.Pointer(C.QWizardPage_MetaObject(this.h))) +func (this *QWizard) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWizard_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizard) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizard_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) Metacast(param1 string) unsafe.Pointer { - param1_Cstring := C.CString(param1) - defer C.free(unsafe.Pointer(param1_Cstring)) - return (unsafe.Pointer)(C.QWizardPage_Metacast(this.h, param1_Cstring)) +//export miqt_exec_callback_QWizard_SizeHint +func miqt_exec_callback_QWizard_SizeHint(self *C.QWizard, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + } -func QWizardPage_Tr(s string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_Tr(s_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QWizard_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QWizard) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QWizard_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetTitle(title string) { - title_ms := C.struct_miqt_string{} - title_ms.data = C.CString(title) - title_ms.len = C.size_t(len(title)) - defer C.free(unsafe.Pointer(title_ms.data)) - C.QWizardPage_SetTitle(this.h, title_ms) +//export miqt_exec_callback_QWizard_Event +func miqt_exec_callback_QWizard_Event(self *C.QWizard, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } -func (this *QWizardPage) Title() string { - var _ms C.struct_miqt_string = C.QWizardPage_Title(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QWizard_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizard) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QWizard_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetSubTitle(subTitle string) { - subTitle_ms := C.struct_miqt_string{} - subTitle_ms.data = C.CString(subTitle) - subTitle_ms.len = C.size_t(len(subTitle)) - defer C.free(unsafe.Pointer(subTitle_ms.data)) - C.QWizardPage_SetSubTitle(this.h, subTitle_ms) +//export miqt_exec_callback_QWizard_ResizeEvent +func miqt_exec_callback_QWizard_ResizeEvent(self *C.QWizard, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_ResizeEvent, slotval1) + } -func (this *QWizardPage) SubTitle() string { - var _ms C.struct_miqt_string = C.QWizardPage_SubTitle(this.h) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QWizard_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizard) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QWizard_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { - C.QWizardPage_SetPixmap(this.h, (C.int)(which), pixmap.cPointer()) +//export miqt_exec_callback_QWizard_PaintEvent +func miqt_exec_callback_QWizard_PaintEvent(self *C.QWizard, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_PaintEvent, slotval1) + } -func (this *QWizardPage) Pixmap(which QWizard__WizardPixmap) *QPixmap { - _ret := C.QWizardPage_Pixmap(this.h, (C.int)(which)) - _goptr := newQPixmap(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr +func (this *QWizard) callVirtualBase_Done(result int) { + + C.QWizard_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QWizard) OnDone(slot func(super func(result int), result int)) { + C.QWizard_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetFinalPage(finalPage bool) { - C.QWizardPage_SetFinalPage(this.h, (C.bool)(finalPage)) +//export miqt_exec_callback_QWizard_Done +func miqt_exec_callback_QWizard_Done(self *C.QWizard, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QWizard{h: self}).callVirtualBase_Done, slotval1) + } -func (this *QWizardPage) IsFinalPage() bool { - return (bool)(C.QWizardPage_IsFinalPage(this.h)) +func (this *QWizard) callVirtualBase_InitializePage(id int) { + + C.QWizard_virtualbase_InitializePage(unsafe.Pointer(this.h), (C.int)(id)) + +} +func (this *QWizard) OnInitializePage(slot func(super func(id int), id int)) { + C.QWizard_override_virtual_InitializePage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetCommitPage(commitPage bool) { - C.QWizardPage_SetCommitPage(this.h, (C.bool)(commitPage)) +//export miqt_exec_callback_QWizard_InitializePage +func miqt_exec_callback_QWizard_InitializePage(self *C.QWizard, cb C.intptr_t, id C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int), id int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(id) + + gofunc((&QWizard{h: self}).callVirtualBase_InitializePage, slotval1) + } -func (this *QWizardPage) IsCommitPage() bool { - return (bool)(C.QWizardPage_IsCommitPage(this.h)) +func (this *QWizard) callVirtualBase_CleanupPage(id int) { + + C.QWizard_virtualbase_CleanupPage(unsafe.Pointer(this.h), (C.int)(id)) + +} +func (this *QWizard) OnCleanupPage(slot func(super func(id int), id int)) { + C.QWizard_override_virtual_CleanupPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) SetButtonText(which QWizard__WizardButton, text string) { - text_ms := C.struct_miqt_string{} - text_ms.data = C.CString(text) - text_ms.len = C.size_t(len(text)) - defer C.free(unsafe.Pointer(text_ms.data)) - C.QWizardPage_SetButtonText(this.h, (C.int)(which), text_ms) +//export miqt_exec_callback_QWizard_CleanupPage +func miqt_exec_callback_QWizard_CleanupPage(self *C.QWizard, cb C.intptr_t, id C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int), id int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(id) + + gofunc((&QWizard{h: self}).callVirtualBase_CleanupPage, slotval1) + } -func (this *QWizardPage) ButtonText(which QWizard__WizardButton) string { - var _ms C.struct_miqt_string = C.QWizardPage_ButtonText(this.h, (C.int)(which)) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QWizard_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizard) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizard_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) InitializePage() { - C.QWizardPage_InitializePage(this.h) +//export miqt_exec_callback_QWizard_MinimumSizeHint +func miqt_exec_callback_QWizard_MinimumSizeHint(self *C.QWizard, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + } -func (this *QWizardPage) CleanupPage() { - C.QWizardPage_CleanupPage(this.h) +func (this *QWizard) callVirtualBase_Open() { + + C.QWizard_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QWizard) OnOpen(slot func(super func())) { + C.QWizard_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) ValidatePage() bool { - return (bool)(C.QWizardPage_ValidatePage(this.h)) +//export miqt_exec_callback_QWizard_Open +func miqt_exec_callback_QWizard_Open(self *C.QWizard, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizard{h: self}).callVirtualBase_Open) + } -func (this *QWizardPage) IsComplete() bool { - return (bool)(C.QWizardPage_IsComplete(this.h)) +func (this *QWizard) callVirtualBase_Exec() int { + + return (int)(C.QWizard_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QWizard) OnExec(slot func(super func() int) int) { + C.QWizard_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QWizardPage) NextId() int { - return (int)(C.QWizardPage_NextId(this.h)) +//export miqt_exec_callback_QWizard_Exec +func miqt_exec_callback_QWizard_Exec(self *C.QWizard, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + } -func (this *QWizardPage) CompleteChanged() { - C.QWizardPage_CompleteChanged(this.h) +func (this *QWizard) callVirtualBase_Accept() { + + C.QWizard_virtualbase_Accept(unsafe.Pointer(this.h)) + } -func (this *QWizardPage) OnCompleteChanged(slot func()) { - C.QWizardPage_connect_CompleteChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +func (this *QWizard) OnAccept(slot func(super func())) { + C.QWizard_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -//export miqt_exec_callback_QWizardPage_CompleteChanged -func miqt_exec_callback_QWizardPage_CompleteChanged(cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) +//export miqt_exec_callback_QWizard_Accept +func miqt_exec_callback_QWizard_Accept(self *C.QWizard, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - gofunc() + gofunc((&QWizard{h: self}).callVirtualBase_Accept) + } -func QWizardPage_Tr2(s string, c string) string { - s_Cstring := C.CString(s) - defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_Tr2(s_Cstring, c_Cstring) - _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) - C.free(unsafe.Pointer(_ms.data)) - return _ret +func (this *QWizard) callVirtualBase_Reject() { + + C.QWizard_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QWizard) OnReject(slot func(super func())) { + C.QWizard_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func QWizardPage_Tr3(s string, c string, n int) string { +//export miqt_exec_callback_QWizard_Reject +func miqt_exec_callback_QWizard_Reject(self *C.QWizard, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizard{h: self}).callVirtualBase_Reject) + +} + +func (this *QWizard) callVirtualBase_KeyPressEvent(param1 *QKeyEvent) { + + C.QWizard_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnKeyPressEvent(slot func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) { + C.QWizard_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_KeyPressEvent +func miqt_exec_callback_QWizard_KeyPressEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QKeyEvent), param1 *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWizard{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_CloseEvent(param1 *QCloseEvent) { + + C.QWizard_virtualbase_CloseEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnCloseEvent(slot func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) { + C.QWizard_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_CloseEvent +func miqt_exec_callback_QWizard_CloseEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QCloseEvent), param1 *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_ShowEvent(param1 *QShowEvent) { + + C.QWizard_virtualbase_ShowEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnShowEvent(slot func(super func(param1 *QShowEvent), param1 *QShowEvent)) { + C.QWizard_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_ShowEvent +func miqt_exec_callback_QWizard_ShowEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QShowEvent), param1 *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWizard{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QWizard_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizard) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QWizard_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_ContextMenuEvent +func miqt_exec_callback_QWizard_ContextMenuEvent(self *C.QWizard, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWizard{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWizard) callVirtualBase_EventFilter(param1 *QObject, param2 *QEvent) bool { + + return (bool)(C.QWizard_virtualbase_EventFilter(unsafe.Pointer(this.h), param1.cPointer(), param2.cPointer())) + +} +func (this *QWizard) OnEventFilter(slot func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) { + C.QWizard_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizard_EventFilter +func miqt_exec_callback_QWizard_EventFilter(self *C.QWizard, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QObject, param2 *QEvent) bool, param1 *QObject, param2 *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QWizard{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QWizard) Delete() { + C.QWizard_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWizard) GoGC() { + runtime.SetFinalizer(this, func(this *QWizard) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWizardPage struct { + h *C.QWizardPage + isSubclass bool + *QWidget +} + +func (this *QWizardPage) cPointer() *C.QWizardPage { + if this == nil { + return nil + } + return this.h +} + +func (this *QWizardPage) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWizardPage constructs the type using only CGO pointers. +func newQWizardPage(h *C.QWizardPage, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizardPage { + if h == nil { + return nil + } + return &QWizardPage{h: h, + QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// UnsafeNewQWizardPage constructs the type using only unsafe pointers. +func UnsafeNewQWizardPage(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizardPage { + if h == nil { + return nil + } + + return &QWizardPage{h: (*C.QWizardPage)(h), + QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQWizardPage constructs a new QWizardPage object. +func NewQWizardPage(parent *QWidget) *QWizardPage { + var outptr_QWizardPage *C.QWizardPage = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizardPage_new(parent.cPointer(), &outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWizardPage2 constructs a new QWizardPage object. +func NewQWizardPage2() *QWizardPage { + var outptr_QWizardPage *C.QWizardPage = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWizardPage_new2(&outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QWizardPage) MetaObject() *QMetaObject { + return UnsafeNewQMetaObject(unsafe.Pointer(C.QWizardPage_MetaObject(this.h))) +} + +func (this *QWizardPage) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWizardPage_Metacast(this.h, param1_Cstring)) +} + +func QWizardPage_Tr(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - c_Cstring := C.CString(c) - defer C.free(unsafe.Pointer(c_Cstring)) - var _ms C.struct_miqt_string = C.QWizardPage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + var _ms C.struct_miqt_string = C.QWizardPage_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) SetTitle(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWizardPage_SetTitle(this.h, title_ms) +} + +func (this *QWizardPage) Title() string { + var _ms C.struct_miqt_string = C.QWizardPage_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) SetSubTitle(subTitle string) { + subTitle_ms := C.struct_miqt_string{} + subTitle_ms.data = C.CString(subTitle) + subTitle_ms.len = C.size_t(len(subTitle)) + defer C.free(unsafe.Pointer(subTitle_ms.data)) + C.QWizardPage_SetSubTitle(this.h, subTitle_ms) +} + +func (this *QWizardPage) SubTitle() string { + var _ms C.struct_miqt_string = C.QWizardPage_SubTitle(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { + C.QWizardPage_SetPixmap(this.h, (C.int)(which), pixmap.cPointer()) +} + +func (this *QWizardPage) Pixmap(which QWizard__WizardPixmap) *QPixmap { + _ret := C.QWizardPage_Pixmap(this.h, (C.int)(which)) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWizardPage) SetFinalPage(finalPage bool) { + C.QWizardPage_SetFinalPage(this.h, (C.bool)(finalPage)) +} + +func (this *QWizardPage) IsFinalPage() bool { + return (bool)(C.QWizardPage_IsFinalPage(this.h)) +} + +func (this *QWizardPage) SetCommitPage(commitPage bool) { + C.QWizardPage_SetCommitPage(this.h, (C.bool)(commitPage)) +} + +func (this *QWizardPage) IsCommitPage() bool { + return (bool)(C.QWizardPage_IsCommitPage(this.h)) +} + +func (this *QWizardPage) SetButtonText(which QWizard__WizardButton, text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QWizardPage_SetButtonText(this.h, (C.int)(which), text_ms) +} + +func (this *QWizardPage) ButtonText(which QWizard__WizardButton) string { + var _ms C.struct_miqt_string = C.QWizardPage_ButtonText(this.h, (C.int)(which)) _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QWizardPage) InitializePage() { + C.QWizardPage_InitializePage(this.h) +} + +func (this *QWizardPage) CleanupPage() { + C.QWizardPage_CleanupPage(this.h) +} + +func (this *QWizardPage) ValidatePage() bool { + return (bool)(C.QWizardPage_ValidatePage(this.h)) +} + +func (this *QWizardPage) IsComplete() bool { + return (bool)(C.QWizardPage_IsComplete(this.h)) +} + +func (this *QWizardPage) NextId() int { + return (int)(C.QWizardPage_NextId(this.h)) +} + +func (this *QWizardPage) CompleteChanged() { + C.QWizardPage_CompleteChanged(this.h) +} +func (this *QWizardPage) OnCompleteChanged(slot func()) { + C.QWizardPage_connect_CompleteChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_CompleteChanged +func miqt_exec_callback_QWizardPage_CompleteChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWizardPage_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWizardPage_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWizardPage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWizardPage) callVirtualBase_InitializePage() { + + C.QWizardPage_virtualbase_InitializePage(unsafe.Pointer(this.h)) + +} +func (this *QWizardPage) OnInitializePage(slot func(super func())) { + C.QWizardPage_override_virtual_InitializePage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InitializePage +func miqt_exec_callback_QWizardPage_InitializePage(self *C.QWizardPage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizardPage{h: self}).callVirtualBase_InitializePage) + +} + +func (this *QWizardPage) callVirtualBase_CleanupPage() { + + C.QWizardPage_virtualbase_CleanupPage(unsafe.Pointer(this.h)) + +} +func (this *QWizardPage) OnCleanupPage(slot func(super func())) { + C.QWizardPage_override_virtual_CleanupPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_CleanupPage +func miqt_exec_callback_QWizardPage_CleanupPage(self *C.QWizardPage, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWizardPage{h: self}).callVirtualBase_CleanupPage) + +} + +func (this *QWizardPage) callVirtualBase_ValidatePage() bool { + + return (bool)(C.QWizardPage_virtualbase_ValidatePage(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnValidatePage(slot func(super func() bool) bool) { + C.QWizardPage_override_virtual_ValidatePage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ValidatePage +func miqt_exec_callback_QWizardPage_ValidatePage(self *C.QWizardPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_ValidatePage) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_IsComplete() bool { + + return (bool)(C.QWizardPage_virtualbase_IsComplete(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnIsComplete(slot func(super func() bool) bool) { + C.QWizardPage_override_virtual_IsComplete(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_IsComplete +func miqt_exec_callback_QWizardPage_IsComplete(self *C.QWizardPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_IsComplete) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_NextId() int { + + return (int)(C.QWizardPage_virtualbase_NextId(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnNextId(slot func(super func() int) int) { + C.QWizardPage_override_virtual_NextId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_NextId +func miqt_exec_callback_QWizardPage_NextId(self *C.QWizardPage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_NextId) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_DevType() int { + + return (int)(C.QWizardPage_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnDevType(slot func(super func() int) int) { + C.QWizardPage_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DevType +func miqt_exec_callback_QWizardPage_DevType(self *C.QWizardPage, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_SetVisible(visible bool) { + + C.QWizardPage_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWizardPage) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWizardPage_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_SetVisible +func miqt_exec_callback_QWizardPage_SetVisible(self *C.QWizardPage, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWizardPage{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_SizeHint() *QSize { + + _ret := C.QWizardPage_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizardPage) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizardPage_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_SizeHint +func miqt_exec_callback_QWizardPage_SizeHint(self *C.QWizardPage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QWizardPage_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizardPage) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QWizardPage_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MinimumSizeHint +func miqt_exec_callback_QWizardPage_MinimumSizeHint(self *C.QWizardPage, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWizardPage_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWizardPage) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWizardPage_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_HeightForWidth +func miqt_exec_callback_QWizardPage_HeightForWidth(self *C.QWizardPage, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWizardPage_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWizardPage) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWizardPage_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_HasHeightForWidth +func miqt_exec_callback_QWizardPage_HasHeightForWidth(self *C.QWizardPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QWizardPage_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWizardPage) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QWizardPage_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_PaintEngine +func miqt_exec_callback_QWizardPage_PaintEngine(self *C.QWizardPage, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPaintEngine) *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QWizardPage_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QWizardPage) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QWizardPage_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_Event +func miqt_exec_callback_QWizardPage_Event(self *C.QWizardPage, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MousePressEvent +func miqt_exec_callback_QWizardPage_MousePressEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MouseReleaseEvent +func miqt_exec_callback_QWizardPage_MouseReleaseEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MouseDoubleClickEvent +func miqt_exec_callback_QWizardPage_MouseDoubleClickEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QWizardPage_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QWizardPage_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MouseMoveEvent +func miqt_exec_callback_QWizardPage_MouseMoveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMouseEvent), event *QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QWizardPage_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QWizardPage_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_WheelEvent +func miqt_exec_callback_QWizardPage_WheelEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QWheelEvent), event *QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QWizardPage_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWizardPage_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_KeyPressEvent +func miqt_exec_callback_QWizardPage_KeyPressEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QWizardPage_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QWizardPage_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_KeyReleaseEvent +func miqt_exec_callback_QWizardPage_KeyReleaseEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QKeyEvent), event *QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QWizardPage_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWizardPage_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_FocusInEvent +func miqt_exec_callback_QWizardPage_FocusInEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QWizardPage_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QWizardPage_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_FocusOutEvent +func miqt_exec_callback_QWizardPage_FocusOutEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QFocusEvent), event *QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QWizardPage_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QWizardPage_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_EnterEvent +func miqt_exec_callback_QWizardPage_EnterEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEnterEvent), event *QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QWizardPage_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QWizardPage_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_LeaveEvent +func miqt_exec_callback_QWizardPage_LeaveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_PaintEvent(event *QPaintEvent) { + + C.QWizardPage_virtualbase_PaintEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnPaintEvent(slot func(super func(event *QPaintEvent), event *QPaintEvent)) { + C.QWizardPage_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_PaintEvent +func miqt_exec_callback_QWizardPage_PaintEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QPaintEvent), event *QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QWizardPage_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QWizardPage_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_MoveEvent +func miqt_exec_callback_QWizardPage_MoveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QMoveEvent), event *QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QWizardPage_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QWizardPage_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ResizeEvent +func miqt_exec_callback_QWizardPage_ResizeEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QResizeEvent), event *QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QWizardPage_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QWizardPage_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_CloseEvent +func miqt_exec_callback_QWizardPage_CloseEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QCloseEvent), event *QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QWizardPage_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QWizardPage_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ContextMenuEvent +func miqt_exec_callback_QWizardPage_ContextMenuEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QWizardPage_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QWizardPage_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_TabletEvent +func miqt_exec_callback_QWizardPage_TabletEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTabletEvent), event *QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QWizardPage_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QWizardPage_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ActionEvent +func miqt_exec_callback_QWizardPage_ActionEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QActionEvent), event *QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QWizardPage_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QWizardPage_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DragEnterEvent +func miqt_exec_callback_QWizardPage_DragEnterEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QWizardPage_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QWizardPage_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DragMoveEvent +func miqt_exec_callback_QWizardPage_DragMoveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QWizardPage_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QWizardPage_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DragLeaveEvent +func miqt_exec_callback_QWizardPage_DragLeaveEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QWizardPage_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QWizardPage_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_DropEvent +func miqt_exec_callback_QWizardPage_DropEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QDropEvent), event *QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QWizardPage_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QWizardPage_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ShowEvent +func miqt_exec_callback_QWizardPage_ShowEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QShowEvent), event *QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QWizardPage_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QWizardPage) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QWizardPage_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_HideEvent +func miqt_exec_callback_QWizardPage_HideEvent(self *C.QWizardPage, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QHideEvent), event *QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWizardPage_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QWizardPage) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QWizardPage_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_NativeEvent +func miqt_exec_callback_QWizardPage_NativeEvent(self *C.QWizardPage, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_ChangeEvent(param1 *QEvent) { + + C.QWizardPage_virtualbase_ChangeEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizardPage) OnChangeEvent(slot func(super func(param1 *QEvent), param1 *QEvent)) { + C.QWizardPage_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_ChangeEvent +func miqt_exec_callback_QWizardPage_ChangeEvent(self *C.QWizardPage, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QEvent), param1 *QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWizardPage_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWizardPage) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QWizardPage_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_Metric +func miqt_exec_callback_QWizardPage_Metric(self *C.QWizardPage, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWizardPage) callVirtualBase_InitPainter(painter *QPainter) { + + C.QWizardPage_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QWizardPage) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QWizardPage_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InitPainter +func miqt_exec_callback_QWizardPage_InitPainter(self *C.QWizardPage, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *QPainter), painter *QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWizardPage{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QWizardPage_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QWizardPage) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QWizardPage_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_Redirected +func miqt_exec_callback_QWizardPage_Redirected(self *C.QWizardPage, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QWizardPage_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWizardPage) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QWizardPage_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_SharedPainter +func miqt_exec_callback_QWizardPage_SharedPainter(self *C.QWizardPage, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPainter) *QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QWizardPage_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QWizardPage) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QWizardPage_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InputMethodEvent +func miqt_exec_callback_QWizardPage_InputMethodEvent(self *C.QWizardPage, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWizardPage{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWizardPage) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QWizardPage_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWizardPage) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QWizardPage_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_InputMethodQuery +func miqt_exec_callback_QWizardPage_InputMethodQuery(self *C.QWizardPage, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWizardPage) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWizardPage_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWizardPage) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWizardPage_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWizardPage_FocusNextPrevChild +func miqt_exec_callback_QWizardPage_FocusNextPrevChild(self *C.QWizardPage, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QWizardPage{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QWizardPage) Delete() { - C.QWizardPage_Delete(this.h) + C.QWizardPage_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qwizard.h b/qt6/gen_qwizard.h index 74ef19a7..e8c95a8f 100644 --- a/qt6/gen_qwizard.h +++ b/qt6/gen_qwizard.h @@ -16,27 +16,81 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; class QPixmap; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; class QVariant; +class QWheelEvent; class QWidget; class QWizard; class QWizardPage; #else typedef struct QAbstractButton QAbstractButton; +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; typedef struct QPixmap QPixmap; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; typedef struct QWizard QWizard; typedef struct QWizardPage QWizardPage; #endif -QWizard* QWizard_new(QWidget* parent); -QWizard* QWizard_new2(); -QWizard* QWizard_new3(QWidget* parent, int flags); +void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWizard_MetaObject(const QWizard* self); void* QWizard_Metacast(QWizard* self, const char* param1); struct miqt_string QWizard_Tr(const char* s); @@ -91,13 +145,59 @@ void QWizard_Back(QWizard* self); void QWizard_Next(QWizard* self); void QWizard_SetCurrentId(QWizard* self, int id); void QWizard_Restart(QWizard* self); +bool QWizard_Event(QWizard* self, QEvent* event); +void QWizard_ResizeEvent(QWizard* self, QResizeEvent* event); +void QWizard_PaintEvent(QWizard* self, QPaintEvent* event); +void QWizard_Done(QWizard* self, int result); +void QWizard_InitializePage(QWizard* self, int id); +void QWizard_CleanupPage(QWizard* self, int id); struct miqt_string QWizard_Tr2(const char* s, const char* c); struct miqt_string QWizard_Tr3(const char* s, const char* c, int n); void QWizard_SetOption2(QWizard* self, int option, bool on); -void QWizard_Delete(QWizard* self); +void QWizard_override_virtual_ValidateCurrentPage(void* self, intptr_t slot); +bool QWizard_virtualbase_ValidateCurrentPage(void* self); +void QWizard_override_virtual_NextId(void* self, intptr_t slot); +int QWizard_virtualbase_NextId(const void* self); +void QWizard_override_virtual_SetVisible(void* self, intptr_t slot); +void QWizard_virtualbase_SetVisible(void* self, bool visible); +void QWizard_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWizard_virtualbase_SizeHint(const void* self); +void QWizard_override_virtual_Event(void* self, intptr_t slot); +bool QWizard_virtualbase_Event(void* self, QEvent* event); +void QWizard_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWizard_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWizard_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWizard_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWizard_override_virtual_Done(void* self, intptr_t slot); +void QWizard_virtualbase_Done(void* self, int result); +void QWizard_override_virtual_InitializePage(void* self, intptr_t slot); +void QWizard_virtualbase_InitializePage(void* self, int id); +void QWizard_override_virtual_CleanupPage(void* self, intptr_t slot); +void QWizard_virtualbase_CleanupPage(void* self, int id); +void QWizard_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWizard_virtualbase_MinimumSizeHint(const void* self); +void QWizard_override_virtual_Open(void* self, intptr_t slot); +void QWizard_virtualbase_Open(void* self); +void QWizard_override_virtual_Exec(void* self, intptr_t slot); +int QWizard_virtualbase_Exec(void* self); +void QWizard_override_virtual_Accept(void* self, intptr_t slot); +void QWizard_virtualbase_Accept(void* self); +void QWizard_override_virtual_Reject(void* self, intptr_t slot); +void QWizard_virtualbase_Reject(void* self); +void QWizard_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWizard_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QWizard_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWizard_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QWizard_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWizard_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QWizard_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWizard_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QWizard_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWizard_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QWizard_Delete(QWizard* self, bool isSubclass); -QWizardPage* QWizardPage_new(QWidget* parent); -QWizardPage* QWizardPage_new2(); +void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWizardPage_MetaObject(const QWizardPage* self); void* QWizardPage_Metacast(QWizardPage* self, const char* param1); struct miqt_string QWizardPage_Tr(const char* s); @@ -122,7 +222,99 @@ void QWizardPage_CompleteChanged(QWizardPage* self); void QWizardPage_connect_CompleteChanged(QWizardPage* self, intptr_t slot); struct miqt_string QWizardPage_Tr2(const char* s, const char* c); struct miqt_string QWizardPage_Tr3(const char* s, const char* c, int n); -void QWizardPage_Delete(QWizardPage* self); +void QWizardPage_override_virtual_InitializePage(void* self, intptr_t slot); +void QWizardPage_virtualbase_InitializePage(void* self); +void QWizardPage_override_virtual_CleanupPage(void* self, intptr_t slot); +void QWizardPage_virtualbase_CleanupPage(void* self); +void QWizardPage_override_virtual_ValidatePage(void* self, intptr_t slot); +bool QWizardPage_virtualbase_ValidatePage(void* self); +void QWizardPage_override_virtual_IsComplete(void* self, intptr_t slot); +bool QWizardPage_virtualbase_IsComplete(const void* self); +void QWizardPage_override_virtual_NextId(void* self, intptr_t slot); +int QWizardPage_virtualbase_NextId(const void* self); +void QWizardPage_override_virtual_DevType(void* self, intptr_t slot); +int QWizardPage_virtualbase_DevType(const void* self); +void QWizardPage_override_virtual_SetVisible(void* self, intptr_t slot); +void QWizardPage_virtualbase_SetVisible(void* self, bool visible); +void QWizardPage_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWizardPage_virtualbase_SizeHint(const void* self); +void QWizardPage_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWizardPage_virtualbase_MinimumSizeHint(const void* self); +void QWizardPage_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWizardPage_virtualbase_HeightForWidth(const void* self, int param1); +void QWizardPage_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWizardPage_virtualbase_HasHeightForWidth(const void* self); +void QWizardPage_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWizardPage_virtualbase_PaintEngine(const void* self); +void QWizardPage_override_virtual_Event(void* self, intptr_t slot); +bool QWizardPage_virtualbase_Event(void* self, QEvent* event); +void QWizardPage_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWizardPage_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWizardPage_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWizardPage_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWizardPage_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWizardPage_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWizardPage_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QWizardPage_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWizardPage_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWizardPage_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWizardPage_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWizardPage_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QWizardPage_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QWizardPage_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWizardPage_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWizardPage_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QWizardPage_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QWizardPage_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QWizardPage_override_virtual_DropEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_DropEvent(void* self, QDropEvent* event); +void QWizardPage_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QWizardPage_override_virtual_HideEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_HideEvent(void* self, QHideEvent* event); +void QWizardPage_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWizardPage_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QWizardPage_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWizardPage_override_virtual_Metric(void* self, intptr_t slot); +int QWizardPage_virtualbase_Metric(const void* self, int param1); +void QWizardPage_override_virtual_InitPainter(void* self, intptr_t slot); +void QWizardPage_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWizardPage_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWizardPage_virtualbase_Redirected(const void* self, QPoint* offset); +void QWizardPage_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWizardPage_virtualbase_SharedPainter(const void* self); +void QWizardPage_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWizardPage_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWizardPage_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWizardPage_virtualbase_InputMethodQuery(const void* self, int param1); +void QWizardPage_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWizardPage_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWizardPage_Delete(QWizardPage* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qxmlstream.cpp b/qt6/gen_qxmlstream.cpp index 68f770e3..4cc0f9af 100644 --- a/qt6/gen_qxmlstream.cpp +++ b/qt6/gen_qxmlstream.cpp @@ -16,13 +16,15 @@ #include "gen_qxmlstream.h" #include "_cgo_export.h" -QtPrivate__QXmlString* QtPrivate__QXmlString_new(struct miqt_string s) { +void QtPrivate__QXmlString_new(struct miqt_string s, QtPrivate__QXmlString** outptr_QtPrivate__QXmlString) { QString s_QString = QString::fromUtf8(s.data, s.len); - return new QtPrivate::QXmlString(s_QString); + QtPrivate::QXmlString* ret = new QtPrivate::QXmlString(s_QString); + *outptr_QtPrivate__QXmlString = ret; } -QtPrivate__QXmlString* QtPrivate__QXmlString_new2() { - return new QtPrivate::QXmlString(); +void QtPrivate__QXmlString_new2(QtPrivate__QXmlString** outptr_QtPrivate__QXmlString) { + QtPrivate::QXmlString* ret = new QtPrivate::QXmlString(); + *outptr_QtPrivate__QXmlString = ret; } void QtPrivate__QXmlString_OperatorAssign(QtPrivate__QXmlString* self, struct miqt_string s) { @@ -35,29 +37,37 @@ ptrdiff_t QtPrivate__QXmlString_Size(const QtPrivate__QXmlString* self) { return static_cast(_ret); } -void QtPrivate__QXmlString_Delete(QtPrivate__QXmlString* self) { - delete self; +void QtPrivate__QXmlString_Delete(QtPrivate__QXmlString* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamAttribute* QXmlStreamAttribute_new() { - return new QXmlStreamAttribute(); +void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute) { + QXmlStreamAttribute* ret = new QXmlStreamAttribute(); + *outptr_QXmlStreamAttribute = ret; } -QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value) { +void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { QString qualifiedName_QString = QString::fromUtf8(qualifiedName.data, qualifiedName.len); QString value_QString = QString::fromUtf8(value.data, value.len); - return new QXmlStreamAttribute(qualifiedName_QString, value_QString); + QXmlStreamAttribute* ret = new QXmlStreamAttribute(qualifiedName_QString, value_QString); + *outptr_QXmlStreamAttribute = ret; } -QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value) { +void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString value_QString = QString::fromUtf8(value.data, value.len); - return new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); + QXmlStreamAttribute* ret = new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); + *outptr_QXmlStreamAttribute = ret; } -QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1) { - return new QXmlStreamAttribute(*param1); +void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { + QXmlStreamAttribute* ret = new QXmlStreamAttribute(*param1); + *outptr_QXmlStreamAttribute = ret; } bool QXmlStreamAttribute_IsDefault(const QXmlStreamAttribute* self) { @@ -76,18 +86,24 @@ void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAtt self->operator=(*param1); } -void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self) { - delete self; +void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new() { - return new QXmlStreamNamespaceDeclaration(); +void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { + QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(); + *outptr_QXmlStreamNamespaceDeclaration = ret; } -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri) { +void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); - return new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); + QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); + *outptr_QXmlStreamNamespaceDeclaration = ret; } bool QXmlStreamNamespaceDeclaration_OperatorEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other) { @@ -98,12 +114,17 @@ bool QXmlStreamNamespaceDeclaration_OperatorNotEqual(const QXmlStreamNamespaceDe return self->operator!=(*other); } -void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self) { - delete self; +void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new() { - return new QXmlStreamNotationDeclaration(); +void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration) { + QXmlStreamNotationDeclaration* ret = new QXmlStreamNotationDeclaration(); + *outptr_QXmlStreamNotationDeclaration = ret; } bool QXmlStreamNotationDeclaration_OperatorEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other) { @@ -114,12 +135,17 @@ bool QXmlStreamNotationDeclaration_OperatorNotEqual(const QXmlStreamNotationDecl return self->operator!=(*other); } -void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self) { - delete self; +void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new() { - return new QXmlStreamEntityDeclaration(); +void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration) { + QXmlStreamEntityDeclaration* ret = new QXmlStreamEntityDeclaration(); + *outptr_QXmlStreamEntityDeclaration = ret; } bool QXmlStreamEntityDeclaration_OperatorEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other) { @@ -130,8 +156,12 @@ bool QXmlStreamEntityDeclaration_OperatorNotEqual(const QXmlStreamEntityDeclarat return self->operator!=(*other); } -void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self) { - delete self; +void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } struct miqt_string QXmlStreamEntityResolver_ResolveEntity(QXmlStreamEntityResolver* self, struct miqt_string publicId, struct miqt_string systemId) { @@ -163,30 +193,39 @@ void QXmlStreamEntityResolver_OperatorAssign(QXmlStreamEntityResolver* self, QXm self->operator=(*param1); } -void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self) { - delete self; +void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamReader* QXmlStreamReader_new() { - return new QXmlStreamReader(); +void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader) { + QXmlStreamReader* ret = new QXmlStreamReader(); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device) { - return new QXmlStreamReader(device); +void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader) { + QXmlStreamReader* ret = new QXmlStreamReader(device); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data) { +void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { QByteArray data_QByteArray(data.data, data.len); - return new QXmlStreamReader(data_QByteArray); + QXmlStreamReader* ret = new QXmlStreamReader(data_QByteArray); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data) { +void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { QString data_QString = QString::fromUtf8(data.data, data.len); - return new QXmlStreamReader(data_QString); + QXmlStreamReader* ret = new QXmlStreamReader(data_QString); + *outptr_QXmlStreamReader = ret; } -QXmlStreamReader* QXmlStreamReader_new5(const char* data) { - return new QXmlStreamReader(data); +void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader) { + QXmlStreamReader* ret = new QXmlStreamReader(data); + *outptr_QXmlStreamReader = ret; } void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device) { @@ -439,16 +478,22 @@ void QXmlStreamReader_RaiseError1(QXmlStreamReader* self, struct miqt_string mes self->raiseError(message_QString); } -void QXmlStreamReader_Delete(QXmlStreamReader* self) { - delete self; +void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QXmlStreamWriter* QXmlStreamWriter_new() { - return new QXmlStreamWriter(); +void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter) { + QXmlStreamWriter* ret = new QXmlStreamWriter(); + *outptr_QXmlStreamWriter = ret; } -QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device) { - return new QXmlStreamWriter(device); +void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter) { + QXmlStreamWriter* ret = new QXmlStreamWriter(device); + *outptr_QXmlStreamWriter = ret; } void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device) { @@ -609,7 +654,11 @@ void QXmlStreamWriter_WriteProcessingInstruction2(QXmlStreamWriter* self, struct self->writeProcessingInstruction(target_QString, data_QString); } -void QXmlStreamWriter_Delete(QXmlStreamWriter* self) { - delete self; +void QXmlStreamWriter_Delete(QXmlStreamWriter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/gen_qxmlstream.go b/qt6/gen_qxmlstream.go index 11a8e2c8..c5f6f0ef 100644 --- a/qt6/gen_qxmlstream.go +++ b/qt6/gen_qxmlstream.go @@ -48,7 +48,8 @@ const ( ) type QtPrivate__QXmlString struct { - h *C.QtPrivate__QXmlString + h *C.QtPrivate__QXmlString + isSubclass bool } func (this *QtPrivate__QXmlString) cPointer() *C.QtPrivate__QXmlString { @@ -65,6 +66,7 @@ func (this *QtPrivate__QXmlString) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQtPrivate__QXmlString constructs the type using only CGO pointers. func newQtPrivate__QXmlString(h *C.QtPrivate__QXmlString) *QtPrivate__QXmlString { if h == nil { return nil @@ -72,8 +74,13 @@ func newQtPrivate__QXmlString(h *C.QtPrivate__QXmlString) *QtPrivate__QXmlString return &QtPrivate__QXmlString{h: h} } +// UnsafeNewQtPrivate__QXmlString constructs the type using only unsafe pointers. func UnsafeNewQtPrivate__QXmlString(h unsafe.Pointer) *QtPrivate__QXmlString { - return newQtPrivate__QXmlString((*C.QtPrivate__QXmlString)(h)) + if h == nil { + return nil + } + + return &QtPrivate__QXmlString{h: (*C.QtPrivate__QXmlString)(h)} } // NewQtPrivate__QXmlString constructs a new QtPrivate::QXmlString object. @@ -82,14 +89,22 @@ func NewQtPrivate__QXmlString(s string) *QtPrivate__QXmlString { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - ret := C.QtPrivate__QXmlString_new(s_ms) - return newQtPrivate__QXmlString(ret) + var outptr_QtPrivate__QXmlString *C.QtPrivate__QXmlString = nil + + C.QtPrivate__QXmlString_new(s_ms, &outptr_QtPrivate__QXmlString) + ret := newQtPrivate__QXmlString(outptr_QtPrivate__QXmlString) + ret.isSubclass = true + return ret } // NewQtPrivate__QXmlString2 constructs a new QtPrivate::QXmlString object. func NewQtPrivate__QXmlString2() *QtPrivate__QXmlString { - ret := C.QtPrivate__QXmlString_new2() - return newQtPrivate__QXmlString(ret) + var outptr_QtPrivate__QXmlString *C.QtPrivate__QXmlString = nil + + C.QtPrivate__QXmlString_new2(&outptr_QtPrivate__QXmlString) + ret := newQtPrivate__QXmlString(outptr_QtPrivate__QXmlString) + ret.isSubclass = true + return ret } func (this *QtPrivate__QXmlString) OperatorAssign(s string) { @@ -106,7 +121,7 @@ func (this *QtPrivate__QXmlString) Size() int64 { // Delete this object from C++ memory. func (this *QtPrivate__QXmlString) Delete() { - C.QtPrivate__QXmlString_Delete(this.h) + C.QtPrivate__QXmlString_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -119,7 +134,8 @@ func (this *QtPrivate__QXmlString) GoGC() { } type QXmlStreamAttribute struct { - h *C.QXmlStreamAttribute + h *C.QXmlStreamAttribute + isSubclass bool } func (this *QXmlStreamAttribute) cPointer() *C.QXmlStreamAttribute { @@ -136,6 +152,7 @@ func (this *QXmlStreamAttribute) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamAttribute constructs the type using only CGO pointers. func newQXmlStreamAttribute(h *C.QXmlStreamAttribute) *QXmlStreamAttribute { if h == nil { return nil @@ -143,14 +160,23 @@ func newQXmlStreamAttribute(h *C.QXmlStreamAttribute) *QXmlStreamAttribute { return &QXmlStreamAttribute{h: h} } +// UnsafeNewQXmlStreamAttribute constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamAttribute(h unsafe.Pointer) *QXmlStreamAttribute { - return newQXmlStreamAttribute((*C.QXmlStreamAttribute)(h)) + if h == nil { + return nil + } + + return &QXmlStreamAttribute{h: (*C.QXmlStreamAttribute)(h)} } // NewQXmlStreamAttribute constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute() *QXmlStreamAttribute { - ret := C.QXmlStreamAttribute_new() - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new(&outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } // NewQXmlStreamAttribute2 constructs a new QXmlStreamAttribute object. @@ -163,8 +189,12 @@ func NewQXmlStreamAttribute2(qualifiedName string, value string) *QXmlStreamAttr value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - ret := C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms) - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms, &outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } // NewQXmlStreamAttribute3 constructs a new QXmlStreamAttribute object. @@ -181,14 +211,22 @@ func NewQXmlStreamAttribute3(namespaceUri string, name string, value string) *QX value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - ret := C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms) - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms, &outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } // NewQXmlStreamAttribute4 constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute4(param1 *QXmlStreamAttribute) *QXmlStreamAttribute { - ret := C.QXmlStreamAttribute_new4(param1.cPointer()) - return newQXmlStreamAttribute(ret) + var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil + + C.QXmlStreamAttribute_new4(param1.cPointer(), &outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret.isSubclass = true + return ret } func (this *QXmlStreamAttribute) IsDefault() bool { @@ -209,7 +247,7 @@ func (this *QXmlStreamAttribute) OperatorAssign(param1 *QXmlStreamAttribute) { // Delete this object from C++ memory. func (this *QXmlStreamAttribute) Delete() { - C.QXmlStreamAttribute_Delete(this.h) + C.QXmlStreamAttribute_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -222,7 +260,8 @@ func (this *QXmlStreamAttribute) GoGC() { } type QXmlStreamNamespaceDeclaration struct { - h *C.QXmlStreamNamespaceDeclaration + h *C.QXmlStreamNamespaceDeclaration + isSubclass bool } func (this *QXmlStreamNamespaceDeclaration) cPointer() *C.QXmlStreamNamespaceDeclaration { @@ -239,6 +278,7 @@ func (this *QXmlStreamNamespaceDeclaration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamNamespaceDeclaration constructs the type using only CGO pointers. func newQXmlStreamNamespaceDeclaration(h *C.QXmlStreamNamespaceDeclaration) *QXmlStreamNamespaceDeclaration { if h == nil { return nil @@ -246,14 +286,23 @@ func newQXmlStreamNamespaceDeclaration(h *C.QXmlStreamNamespaceDeclaration) *QXm return &QXmlStreamNamespaceDeclaration{h: h} } +// UnsafeNewQXmlStreamNamespaceDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNamespaceDeclaration(h unsafe.Pointer) *QXmlStreamNamespaceDeclaration { - return newQXmlStreamNamespaceDeclaration((*C.QXmlStreamNamespaceDeclaration)(h)) + if h == nil { + return nil + } + + return &QXmlStreamNamespaceDeclaration{h: (*C.QXmlStreamNamespaceDeclaration)(h)} } // NewQXmlStreamNamespaceDeclaration constructs a new QXmlStreamNamespaceDeclaration object. func NewQXmlStreamNamespaceDeclaration() *QXmlStreamNamespaceDeclaration { - ret := C.QXmlStreamNamespaceDeclaration_new() - return newQXmlStreamNamespaceDeclaration(ret) + var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil + + C.QXmlStreamNamespaceDeclaration_new(&outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret.isSubclass = true + return ret } // NewQXmlStreamNamespaceDeclaration2 constructs a new QXmlStreamNamespaceDeclaration object. @@ -266,8 +315,12 @@ func NewQXmlStreamNamespaceDeclaration2(prefix string, namespaceUri string) *QXm namespaceUri_ms.data = C.CString(namespaceUri) namespaceUri_ms.len = C.size_t(len(namespaceUri)) defer C.free(unsafe.Pointer(namespaceUri_ms.data)) - ret := C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms) - return newQXmlStreamNamespaceDeclaration(ret) + var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil + + C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms, &outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret.isSubclass = true + return ret } func (this *QXmlStreamNamespaceDeclaration) OperatorEqual(other *QXmlStreamNamespaceDeclaration) bool { @@ -280,7 +333,7 @@ func (this *QXmlStreamNamespaceDeclaration) OperatorNotEqual(other *QXmlStreamNa // Delete this object from C++ memory. func (this *QXmlStreamNamespaceDeclaration) Delete() { - C.QXmlStreamNamespaceDeclaration_Delete(this.h) + C.QXmlStreamNamespaceDeclaration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -293,7 +346,8 @@ func (this *QXmlStreamNamespaceDeclaration) GoGC() { } type QXmlStreamNotationDeclaration struct { - h *C.QXmlStreamNotationDeclaration + h *C.QXmlStreamNotationDeclaration + isSubclass bool } func (this *QXmlStreamNotationDeclaration) cPointer() *C.QXmlStreamNotationDeclaration { @@ -310,6 +364,7 @@ func (this *QXmlStreamNotationDeclaration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamNotationDeclaration constructs the type using only CGO pointers. func newQXmlStreamNotationDeclaration(h *C.QXmlStreamNotationDeclaration) *QXmlStreamNotationDeclaration { if h == nil { return nil @@ -317,14 +372,23 @@ func newQXmlStreamNotationDeclaration(h *C.QXmlStreamNotationDeclaration) *QXmlS return &QXmlStreamNotationDeclaration{h: h} } +// UnsafeNewQXmlStreamNotationDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNotationDeclaration(h unsafe.Pointer) *QXmlStreamNotationDeclaration { - return newQXmlStreamNotationDeclaration((*C.QXmlStreamNotationDeclaration)(h)) + if h == nil { + return nil + } + + return &QXmlStreamNotationDeclaration{h: (*C.QXmlStreamNotationDeclaration)(h)} } // NewQXmlStreamNotationDeclaration constructs a new QXmlStreamNotationDeclaration object. func NewQXmlStreamNotationDeclaration() *QXmlStreamNotationDeclaration { - ret := C.QXmlStreamNotationDeclaration_new() - return newQXmlStreamNotationDeclaration(ret) + var outptr_QXmlStreamNotationDeclaration *C.QXmlStreamNotationDeclaration = nil + + C.QXmlStreamNotationDeclaration_new(&outptr_QXmlStreamNotationDeclaration) + ret := newQXmlStreamNotationDeclaration(outptr_QXmlStreamNotationDeclaration) + ret.isSubclass = true + return ret } func (this *QXmlStreamNotationDeclaration) OperatorEqual(other *QXmlStreamNotationDeclaration) bool { @@ -337,7 +401,7 @@ func (this *QXmlStreamNotationDeclaration) OperatorNotEqual(other *QXmlStreamNot // Delete this object from C++ memory. func (this *QXmlStreamNotationDeclaration) Delete() { - C.QXmlStreamNotationDeclaration_Delete(this.h) + C.QXmlStreamNotationDeclaration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -350,7 +414,8 @@ func (this *QXmlStreamNotationDeclaration) GoGC() { } type QXmlStreamEntityDeclaration struct { - h *C.QXmlStreamEntityDeclaration + h *C.QXmlStreamEntityDeclaration + isSubclass bool } func (this *QXmlStreamEntityDeclaration) cPointer() *C.QXmlStreamEntityDeclaration { @@ -367,6 +432,7 @@ func (this *QXmlStreamEntityDeclaration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamEntityDeclaration constructs the type using only CGO pointers. func newQXmlStreamEntityDeclaration(h *C.QXmlStreamEntityDeclaration) *QXmlStreamEntityDeclaration { if h == nil { return nil @@ -374,14 +440,23 @@ func newQXmlStreamEntityDeclaration(h *C.QXmlStreamEntityDeclaration) *QXmlStrea return &QXmlStreamEntityDeclaration{h: h} } +// UnsafeNewQXmlStreamEntityDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityDeclaration(h unsafe.Pointer) *QXmlStreamEntityDeclaration { - return newQXmlStreamEntityDeclaration((*C.QXmlStreamEntityDeclaration)(h)) + if h == nil { + return nil + } + + return &QXmlStreamEntityDeclaration{h: (*C.QXmlStreamEntityDeclaration)(h)} } // NewQXmlStreamEntityDeclaration constructs a new QXmlStreamEntityDeclaration object. func NewQXmlStreamEntityDeclaration() *QXmlStreamEntityDeclaration { - ret := C.QXmlStreamEntityDeclaration_new() - return newQXmlStreamEntityDeclaration(ret) + var outptr_QXmlStreamEntityDeclaration *C.QXmlStreamEntityDeclaration = nil + + C.QXmlStreamEntityDeclaration_new(&outptr_QXmlStreamEntityDeclaration) + ret := newQXmlStreamEntityDeclaration(outptr_QXmlStreamEntityDeclaration) + ret.isSubclass = true + return ret } func (this *QXmlStreamEntityDeclaration) OperatorEqual(other *QXmlStreamEntityDeclaration) bool { @@ -394,7 +469,7 @@ func (this *QXmlStreamEntityDeclaration) OperatorNotEqual(other *QXmlStreamEntit // Delete this object from C++ memory. func (this *QXmlStreamEntityDeclaration) Delete() { - C.QXmlStreamEntityDeclaration_Delete(this.h) + C.QXmlStreamEntityDeclaration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -407,7 +482,8 @@ func (this *QXmlStreamEntityDeclaration) GoGC() { } type QXmlStreamEntityResolver struct { - h *C.QXmlStreamEntityResolver + h *C.QXmlStreamEntityResolver + isSubclass bool } func (this *QXmlStreamEntityResolver) cPointer() *C.QXmlStreamEntityResolver { @@ -424,6 +500,7 @@ func (this *QXmlStreamEntityResolver) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamEntityResolver constructs the type using only CGO pointers. func newQXmlStreamEntityResolver(h *C.QXmlStreamEntityResolver) *QXmlStreamEntityResolver { if h == nil { return nil @@ -431,8 +508,13 @@ func newQXmlStreamEntityResolver(h *C.QXmlStreamEntityResolver) *QXmlStreamEntit return &QXmlStreamEntityResolver{h: h} } +// UnsafeNewQXmlStreamEntityResolver constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityResolver(h unsafe.Pointer) *QXmlStreamEntityResolver { - return newQXmlStreamEntityResolver((*C.QXmlStreamEntityResolver)(h)) + if h == nil { + return nil + } + + return &QXmlStreamEntityResolver{h: (*C.QXmlStreamEntityResolver)(h)} } func (this *QXmlStreamEntityResolver) ResolveEntity(publicId string, systemId string) string { @@ -467,7 +549,7 @@ func (this *QXmlStreamEntityResolver) OperatorAssign(param1 *QXmlStreamEntityRes // Delete this object from C++ memory. func (this *QXmlStreamEntityResolver) Delete() { - C.QXmlStreamEntityResolver_Delete(this.h) + C.QXmlStreamEntityResolver_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -480,7 +562,8 @@ func (this *QXmlStreamEntityResolver) GoGC() { } type QXmlStreamReader struct { - h *C.QXmlStreamReader + h *C.QXmlStreamReader + isSubclass bool } func (this *QXmlStreamReader) cPointer() *C.QXmlStreamReader { @@ -497,6 +580,7 @@ func (this *QXmlStreamReader) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamReader constructs the type using only CGO pointers. func newQXmlStreamReader(h *C.QXmlStreamReader) *QXmlStreamReader { if h == nil { return nil @@ -504,20 +588,33 @@ func newQXmlStreamReader(h *C.QXmlStreamReader) *QXmlStreamReader { return &QXmlStreamReader{h: h} } +// UnsafeNewQXmlStreamReader constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamReader(h unsafe.Pointer) *QXmlStreamReader { - return newQXmlStreamReader((*C.QXmlStreamReader)(h)) + if h == nil { + return nil + } + + return &QXmlStreamReader{h: (*C.QXmlStreamReader)(h)} } // NewQXmlStreamReader constructs a new QXmlStreamReader object. func NewQXmlStreamReader() *QXmlStreamReader { - ret := C.QXmlStreamReader_new() - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new(&outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader2 constructs a new QXmlStreamReader object. func NewQXmlStreamReader2(device *QIODevice) *QXmlStreamReader { - ret := C.QXmlStreamReader_new2(device.cPointer()) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new2(device.cPointer(), &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader3 constructs a new QXmlStreamReader object. @@ -525,8 +622,12 @@ func NewQXmlStreamReader3(data []byte) *QXmlStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QXmlStreamReader_new3(data_alias) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new3(data_alias, &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader4 constructs a new QXmlStreamReader object. @@ -535,16 +636,24 @@ func NewQXmlStreamReader4(data string) *QXmlStreamReader { data_ms.data = C.CString(data) data_ms.len = C.size_t(len(data)) defer C.free(unsafe.Pointer(data_ms.data)) - ret := C.QXmlStreamReader_new4(data_ms) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new4(data_ms, &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } // NewQXmlStreamReader5 constructs a new QXmlStreamReader object. func NewQXmlStreamReader5(data string) *QXmlStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - ret := C.QXmlStreamReader_new5(data_Cstring) - return newQXmlStreamReader(ret) + var outptr_QXmlStreamReader *C.QXmlStreamReader = nil + + C.QXmlStreamReader_new5(data_Cstring, &outptr_QXmlStreamReader) + ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret.isSubclass = true + return ret } func (this *QXmlStreamReader) SetDevice(device *QIODevice) { @@ -552,7 +661,7 @@ func (this *QXmlStreamReader) SetDevice(device *QIODevice) { } func (this *QXmlStreamReader) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamReader_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamReader_Device(this.h)), nil, nil) } func (this *QXmlStreamReader) AddData(data []byte) { @@ -787,7 +896,7 @@ func (this *QXmlStreamReader) RaiseError1(message string) { // Delete this object from C++ memory. func (this *QXmlStreamReader) Delete() { - C.QXmlStreamReader_Delete(this.h) + C.QXmlStreamReader_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -800,7 +909,8 @@ func (this *QXmlStreamReader) GoGC() { } type QXmlStreamWriter struct { - h *C.QXmlStreamWriter + h *C.QXmlStreamWriter + isSubclass bool } func (this *QXmlStreamWriter) cPointer() *C.QXmlStreamWriter { @@ -817,6 +927,7 @@ func (this *QXmlStreamWriter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQXmlStreamWriter constructs the type using only CGO pointers. func newQXmlStreamWriter(h *C.QXmlStreamWriter) *QXmlStreamWriter { if h == nil { return nil @@ -824,20 +935,33 @@ func newQXmlStreamWriter(h *C.QXmlStreamWriter) *QXmlStreamWriter { return &QXmlStreamWriter{h: h} } +// UnsafeNewQXmlStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamWriter(h unsafe.Pointer) *QXmlStreamWriter { - return newQXmlStreamWriter((*C.QXmlStreamWriter)(h)) + if h == nil { + return nil + } + + return &QXmlStreamWriter{h: (*C.QXmlStreamWriter)(h)} } // NewQXmlStreamWriter constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter() *QXmlStreamWriter { - ret := C.QXmlStreamWriter_new() - return newQXmlStreamWriter(ret) + var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil + + C.QXmlStreamWriter_new(&outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret.isSubclass = true + return ret } // NewQXmlStreamWriter2 constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter2(device *QIODevice) *QXmlStreamWriter { - ret := C.QXmlStreamWriter_new2(device.cPointer()) - return newQXmlStreamWriter(ret) + var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil + + C.QXmlStreamWriter_new2(device.cPointer(), &outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret.isSubclass = true + return ret } func (this *QXmlStreamWriter) SetDevice(device *QIODevice) { @@ -845,7 +969,7 @@ func (this *QXmlStreamWriter) SetDevice(device *QIODevice) { } func (this *QXmlStreamWriter) Device() *QIODevice { - return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamWriter_Device(this.h))) + return UnsafeNewQIODevice(unsafe.Pointer(C.QXmlStreamWriter_Device(this.h)), nil, nil) } func (this *QXmlStreamWriter) SetAutoFormatting(autoFormatting bool) { @@ -1090,7 +1214,7 @@ func (this *QXmlStreamWriter) WriteProcessingInstruction2(target string, data st // Delete this object from C++ memory. func (this *QXmlStreamWriter) Delete() { - C.QXmlStreamWriter_Delete(this.h) + C.QXmlStreamWriter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/gen_qxmlstream.h b/qt6/gen_qxmlstream.h index 98c0961c..4b155af7 100644 --- a/qt6/gen_qxmlstream.h +++ b/qt6/gen_qxmlstream.h @@ -42,48 +42,48 @@ typedef struct QXmlStreamWriter QXmlStreamWriter; typedef struct QtPrivate__QXmlString QtPrivate__QXmlString; #endif -QtPrivate__QXmlString* QtPrivate__QXmlString_new(struct miqt_string s); -QtPrivate__QXmlString* QtPrivate__QXmlString_new2(); +void QtPrivate__QXmlString_new(struct miqt_string s, QtPrivate__QXmlString** outptr_QtPrivate__QXmlString); +void QtPrivate__QXmlString_new2(QtPrivate__QXmlString** outptr_QtPrivate__QXmlString); void QtPrivate__QXmlString_OperatorAssign(QtPrivate__QXmlString* self, struct miqt_string s); ptrdiff_t QtPrivate__QXmlString_Size(const QtPrivate__QXmlString* self); -void QtPrivate__QXmlString_Delete(QtPrivate__QXmlString* self); +void QtPrivate__QXmlString_Delete(QtPrivate__QXmlString* self, bool isSubclass); -QXmlStreamAttribute* QXmlStreamAttribute_new(); -QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value); -QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value); -QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1); +void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute); +void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); +void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); +void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute); bool QXmlStreamAttribute_IsDefault(const QXmlStreamAttribute* self); bool QXmlStreamAttribute_OperatorEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); bool QXmlStreamAttribute_OperatorNotEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAttribute* param1); -void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self); +void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass); -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new(); -QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri); +void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); +void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); bool QXmlStreamNamespaceDeclaration_OperatorEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); bool QXmlStreamNamespaceDeclaration_OperatorNotEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); -void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self); +void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, bool isSubclass); -QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new(); +void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration); bool QXmlStreamNotationDeclaration_OperatorEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); bool QXmlStreamNotationDeclaration_OperatorNotEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); -void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self); +void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, bool isSubclass); -QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new(); +void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration); bool QXmlStreamEntityDeclaration_OperatorEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); bool QXmlStreamEntityDeclaration_OperatorNotEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); -void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self); +void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self, bool isSubclass); struct miqt_string QXmlStreamEntityResolver_ResolveEntity(QXmlStreamEntityResolver* self, struct miqt_string publicId, struct miqt_string systemId); struct miqt_string QXmlStreamEntityResolver_ResolveUndeclaredEntity(QXmlStreamEntityResolver* self, struct miqt_string name); void QXmlStreamEntityResolver_OperatorAssign(QXmlStreamEntityResolver* self, QXmlStreamEntityResolver* param1); -void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self); +void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubclass); -QXmlStreamReader* QXmlStreamReader_new(); -QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device); -QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data); -QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data); -QXmlStreamReader* QXmlStreamReader_new5(const char* data); +void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); +void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader); void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device); QIODevice* QXmlStreamReader_Device(const QXmlStreamReader* self); void QXmlStreamReader_AddData(QXmlStreamReader* self, struct miqt_string data); @@ -129,10 +129,10 @@ void QXmlStreamReader_SetEntityResolver(QXmlStreamReader* self, QXmlStreamEntity QXmlStreamEntityResolver* QXmlStreamReader_EntityResolver(const QXmlStreamReader* self); struct miqt_string QXmlStreamReader_ReadElementText1(QXmlStreamReader* self, int behaviour); void QXmlStreamReader_RaiseError1(QXmlStreamReader* self, struct miqt_string message); -void QXmlStreamReader_Delete(QXmlStreamReader* self); +void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass); -QXmlStreamWriter* QXmlStreamWriter_new(); -QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device); +void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter); +void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter); void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device); QIODevice* QXmlStreamWriter_Device(const QXmlStreamWriter* self); void QXmlStreamWriter_SetAutoFormatting(QXmlStreamWriter* self, bool autoFormatting); @@ -165,7 +165,7 @@ void QXmlStreamWriter_WriteCurrentToken(QXmlStreamWriter* self, QXmlStreamReader bool QXmlStreamWriter_HasError(const QXmlStreamWriter* self); void QXmlStreamWriter_WriteNamespace2(QXmlStreamWriter* self, struct miqt_string namespaceUri, struct miqt_string prefix); void QXmlStreamWriter_WriteProcessingInstruction2(QXmlStreamWriter* self, struct miqt_string target, struct miqt_string data); -void QXmlStreamWriter_Delete(QXmlStreamWriter* self); +void QXmlStreamWriter_Delete(QXmlStreamWriter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudiobuffer.cpp b/qt6/multimedia/gen_qaudiobuffer.cpp index 07cd22a9..93b578ab 100644 --- a/qt6/multimedia/gen_qaudiobuffer.cpp +++ b/qt6/multimedia/gen_qaudiobuffer.cpp @@ -5,30 +5,36 @@ #include "gen_qaudiobuffer.h" #include "_cgo_export.h" -QAudioBuffer* QAudioBuffer_new() { - return new QAudioBuffer(); +void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other) { - return new QAudioBuffer(*other); +void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(*other); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format) { +void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { QByteArray data_QByteArray(data.data, data.len); - return new QAudioBuffer(data_QByteArray, *format); + QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format) { - return new QAudioBuffer(static_cast(numFrames), *format); +void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime) { +void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { QByteArray data_QByteArray(data.data, data.len); - return new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); + QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); + *outptr_QAudioBuffer = ret; } -QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime) { - return new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); +void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { + QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); + *outptr_QAudioBuffer = ret; } void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other) { @@ -76,7 +82,11 @@ long long QAudioBuffer_StartTime(const QAudioBuffer* self) { return static_cast(_ret); } -void QAudioBuffer_Delete(QAudioBuffer* self) { - delete self; +void QAudioBuffer_Delete(QAudioBuffer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudiobuffer.go b/qt6/multimedia/gen_qaudiobuffer.go index ec95a51d..67dfacea 100644 --- a/qt6/multimedia/gen_qaudiobuffer.go +++ b/qt6/multimedia/gen_qaudiobuffer.go @@ -14,7 +14,8 @@ import ( ) type QAudioBuffer struct { - h *C.QAudioBuffer + h *C.QAudioBuffer + isSubclass bool } func (this *QAudioBuffer) cPointer() *C.QAudioBuffer { @@ -31,6 +32,7 @@ func (this *QAudioBuffer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioBuffer constructs the type using only CGO pointers. func newQAudioBuffer(h *C.QAudioBuffer) *QAudioBuffer { if h == nil { return nil @@ -38,20 +40,33 @@ func newQAudioBuffer(h *C.QAudioBuffer) *QAudioBuffer { return &QAudioBuffer{h: h} } +// UnsafeNewQAudioBuffer constructs the type using only unsafe pointers. func UnsafeNewQAudioBuffer(h unsafe.Pointer) *QAudioBuffer { - return newQAudioBuffer((*C.QAudioBuffer)(h)) + if h == nil { + return nil + } + + return &QAudioBuffer{h: (*C.QAudioBuffer)(h)} } // NewQAudioBuffer constructs a new QAudioBuffer object. func NewQAudioBuffer() *QAudioBuffer { - ret := C.QAudioBuffer_new() - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new(&outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer2 constructs a new QAudioBuffer object. func NewQAudioBuffer2(other *QAudioBuffer) *QAudioBuffer { - ret := C.QAudioBuffer_new2(other.cPointer()) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new2(other.cPointer(), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer3 constructs a new QAudioBuffer object. @@ -59,14 +74,22 @@ func NewQAudioBuffer3(data []byte, format *QAudioFormat) *QAudioBuffer { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QAudioBuffer_new3(data_alias, format.cPointer()) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new3(data_alias, format.cPointer(), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer4 constructs a new QAudioBuffer object. func NewQAudioBuffer4(numFrames int, format *QAudioFormat) *QAudioBuffer { - ret := C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer()) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer(), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer5 constructs a new QAudioBuffer object. @@ -74,14 +97,22 @@ func NewQAudioBuffer5(data []byte, format *QAudioFormat, startTime int64) *QAudi data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime)) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } // NewQAudioBuffer6 constructs a new QAudioBuffer object. func NewQAudioBuffer6(numFrames int, format *QAudioFormat, startTime int64) *QAudioBuffer { - ret := C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime)) - return newQAudioBuffer(ret) + var outptr_QAudioBuffer *C.QAudioBuffer = nil + + C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) + ret := newQAudioBuffer(outptr_QAudioBuffer) + ret.isSubclass = true + return ret } func (this *QAudioBuffer) OperatorAssign(other *QAudioBuffer) { @@ -129,7 +160,7 @@ func (this *QAudioBuffer) StartTime() int64 { // Delete this object from C++ memory. func (this *QAudioBuffer) Delete() { - C.QAudioBuffer_Delete(this.h) + C.QAudioBuffer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudiobuffer.h b/qt6/multimedia/gen_qaudiobuffer.h index 1ad31814..34101b77 100644 --- a/qt6/multimedia/gen_qaudiobuffer.h +++ b/qt6/multimedia/gen_qaudiobuffer.h @@ -24,12 +24,12 @@ typedef struct QAudioFormat QAudioFormat; typedef struct QByteArray QByteArray; #endif -QAudioBuffer* QAudioBuffer_new(); -QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other); -QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format); -QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format); -QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime); -QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime); +void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); +void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other); void QAudioBuffer_Swap(QAudioBuffer* self, QAudioBuffer* other); bool QAudioBuffer_IsValid(const QAudioBuffer* self); @@ -40,7 +40,7 @@ ptrdiff_t QAudioBuffer_SampleCount(const QAudioBuffer* self); ptrdiff_t QAudioBuffer_ByteCount(const QAudioBuffer* self); long long QAudioBuffer_Duration(const QAudioBuffer* self); long long QAudioBuffer_StartTime(const QAudioBuffer* self); -void QAudioBuffer_Delete(QAudioBuffer* self); +void QAudioBuffer_Delete(QAudioBuffer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudiodecoder.cpp b/qt6/multimedia/gen_qaudiodecoder.cpp index ac534e4a..56799cdb 100644 --- a/qt6/multimedia/gen_qaudiodecoder.cpp +++ b/qt6/multimedia/gen_qaudiodecoder.cpp @@ -1,23 +1,212 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qaudiodecoder.h" #include "_cgo_export.h" -QAudioDecoder* QAudioDecoder_new() { - return new QAudioDecoder(); +class MiqtVirtualQAudioDecoder : public virtual QAudioDecoder { +public: + + MiqtVirtualQAudioDecoder(): QAudioDecoder() {}; + MiqtVirtualQAudioDecoder(QObject* parent): QAudioDecoder(parent) {}; + + virtual ~MiqtVirtualQAudioDecoder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioDecoder::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioDecoder_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioDecoder::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioDecoder::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioDecoder_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioDecoder::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioDecoder::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioDecoder_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioDecoder::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioDecoder::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioDecoder_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioDecoder::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioDecoder::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioDecoder_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioDecoder::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioDecoder::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioDecoder_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioDecoder::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioDecoder::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioDecoder_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioDecoder::disconnectNotify(*signal); + + } + +}; + +void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject) { + MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(); + *outptr_QAudioDecoder = ret; + *outptr_QObject = static_cast(ret); } -QAudioDecoder* QAudioDecoder_new2(QObject* parent) { - return new QAudioDecoder(parent); +void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject) { + MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(parent); + *outptr_QAudioDecoder = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self) { @@ -118,7 +307,7 @@ void QAudioDecoder_BufferAvailableChanged(QAudioDecoder* self, bool param1) { } void QAudioDecoder_connect_BufferAvailableChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferAvailableChanged), self, [=](bool param1) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferAvailableChanged), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QAudioDecoder_BufferAvailableChanged(slot, sigval1); }); @@ -129,7 +318,7 @@ void QAudioDecoder_BufferReady(QAudioDecoder* self) { } void QAudioDecoder_connect_BufferReady(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferReady), self, [=]() { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::bufferReady), self, [=]() { miqt_exec_callback_QAudioDecoder_BufferReady(slot); }); } @@ -139,7 +328,7 @@ void QAudioDecoder_Finished(QAudioDecoder* self) { } void QAudioDecoder_connect_Finished(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::finished), self, [=]() { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::finished), self, [=]() { miqt_exec_callback_QAudioDecoder_Finished(slot); }); } @@ -149,7 +338,7 @@ void QAudioDecoder_IsDecodingChanged(QAudioDecoder* self, bool param1) { } void QAudioDecoder_connect_IsDecodingChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::isDecodingChanged), self, [=](bool param1) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::isDecodingChanged), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QAudioDecoder_IsDecodingChanged(slot, sigval1); }); @@ -160,7 +349,7 @@ void QAudioDecoder_FormatChanged(QAudioDecoder* self, QAudioFormat* format) { } void QAudioDecoder_connect_FormatChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::formatChanged), self, [=](const QAudioFormat& format) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::formatChanged), self, [=](const QAudioFormat& format) { const QAudioFormat& format_ret = format; // Cast returned reference into pointer QAudioFormat* sigval1 = const_cast(&format_ret); @@ -173,7 +362,7 @@ void QAudioDecoder_ErrorWithError(QAudioDecoder* self, int error) { } void QAudioDecoder_connect_ErrorWithError(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::error), self, [=](QAudioDecoder::Error error) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::error), self, [=](QAudioDecoder::Error error) { QAudioDecoder::Error error_ret = error; int sigval1 = static_cast(error_ret); miqt_exec_callback_QAudioDecoder_ErrorWithError(slot, sigval1); @@ -185,7 +374,7 @@ void QAudioDecoder_SourceChanged(QAudioDecoder* self) { } void QAudioDecoder_connect_SourceChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::sourceChanged), self, [=]() { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::sourceChanged), self, [=]() { miqt_exec_callback_QAudioDecoder_SourceChanged(slot); }); } @@ -195,7 +384,7 @@ void QAudioDecoder_PositionChanged(QAudioDecoder* self, long long position) { } void QAudioDecoder_connect_PositionChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::positionChanged), self, [=](qint64 position) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::positionChanged), self, [=](qint64 position) { qint64 position_ret = position; long long sigval1 = static_cast(position_ret); miqt_exec_callback_QAudioDecoder_PositionChanged(slot, sigval1); @@ -207,7 +396,7 @@ void QAudioDecoder_DurationChanged(QAudioDecoder* self, long long duration) { } void QAudioDecoder_connect_DurationChanged(QAudioDecoder* self, intptr_t slot) { - QAudioDecoder::connect(self, static_cast(&QAudioDecoder::durationChanged), self, [=](qint64 duration) { + MiqtVirtualQAudioDecoder::connect(self, static_cast(&QAudioDecoder::durationChanged), self, [=](qint64 duration) { qint64 duration_ret = duration; long long sigval1 = static_cast(duration_ret); miqt_exec_callback_QAudioDecoder_DurationChanged(slot, sigval1); @@ -236,7 +425,67 @@ struct miqt_string QAudioDecoder_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioDecoder_Delete(QAudioDecoder* self) { - delete self; +void QAudioDecoder_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__Event = slot; +} + +bool QAudioDecoder_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_Event(event); +} + +void QAudioDecoder_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__EventFilter = slot; +} + +bool QAudioDecoder_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioDecoder_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__TimerEvent = slot; +} + +void QAudioDecoder_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioDecoder_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__ChildEvent = slot; +} + +void QAudioDecoder_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioDecoder_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__CustomEvent = slot; +} + +void QAudioDecoder_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioDecoder_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioDecoder_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioDecoder_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioDecoder*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioDecoder_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioDecoder*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioDecoder_Delete(QAudioDecoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudiodecoder.go b/qt6/multimedia/gen_qaudiodecoder.go index 4c29d340..47670405 100644 --- a/qt6/multimedia/gen_qaudiodecoder.go +++ b/qt6/multimedia/gen_qaudiodecoder.go @@ -26,7 +26,8 @@ const ( ) type QAudioDecoder struct { - h *C.QAudioDecoder + h *C.QAudioDecoder + isSubclass bool *qt6.QObject } @@ -44,27 +45,45 @@ func (this *QAudioDecoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioDecoder(h *C.QAudioDecoder) *QAudioDecoder { +// newQAudioDecoder constructs the type using only CGO pointers. +func newQAudioDecoder(h *C.QAudioDecoder, h_QObject *C.QObject) *QAudioDecoder { if h == nil { return nil } - return &QAudioDecoder{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioDecoder{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioDecoder(h unsafe.Pointer) *QAudioDecoder { - return newQAudioDecoder((*C.QAudioDecoder)(h)) +// UnsafeNewQAudioDecoder constructs the type using only unsafe pointers. +func UnsafeNewQAudioDecoder(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioDecoder { + if h == nil { + return nil + } + + return &QAudioDecoder{h: (*C.QAudioDecoder)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioDecoder constructs a new QAudioDecoder object. func NewQAudioDecoder() *QAudioDecoder { - ret := C.QAudioDecoder_new() - return newQAudioDecoder(ret) + var outptr_QAudioDecoder *C.QAudioDecoder = nil + var outptr_QObject *C.QObject = nil + + C.QAudioDecoder_new(&outptr_QAudioDecoder, &outptr_QObject) + ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioDecoder2 constructs a new QAudioDecoder object. func NewQAudioDecoder2(parent *qt6.QObject) *QAudioDecoder { - ret := C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer())) - return newQAudioDecoder(ret) + var outptr_QAudioDecoder *C.QAudioDecoder = nil + var outptr_QObject *C.QObject = nil + + C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioDecoder, &outptr_QObject) + ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioDecoder) MetaObject() *qt6.QMetaObject { @@ -106,7 +125,7 @@ func (this *QAudioDecoder) SetSource(fileName *qt6.QUrl) { } func (this *QAudioDecoder) SourceDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h)), nil, nil) } func (this *QAudioDecoder) SetSourceDevice(device *qt6.QIODevice) { @@ -355,9 +374,175 @@ func QAudioDecoder_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioDecoder) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioDecoder_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioDecoder) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioDecoder_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_Event +func miqt_exec_callback_QAudioDecoder_Event(self *C.QAudioDecoder, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioDecoder{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioDecoder) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioDecoder_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioDecoder) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioDecoder_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_EventFilter +func miqt_exec_callback_QAudioDecoder_EventFilter(self *C.QAudioDecoder, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioDecoder{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioDecoder) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioDecoder_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioDecoder) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioDecoder_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_TimerEvent +func miqt_exec_callback_QAudioDecoder_TimerEvent(self *C.QAudioDecoder, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioDecoder{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioDecoder) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioDecoder_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioDecoder) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioDecoder_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_ChildEvent +func miqt_exec_callback_QAudioDecoder_ChildEvent(self *C.QAudioDecoder, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioDecoder{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioDecoder) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioDecoder_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioDecoder) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioDecoder_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_CustomEvent +func miqt_exec_callback_QAudioDecoder_CustomEvent(self *C.QAudioDecoder, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioDecoder{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioDecoder) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioDecoder_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioDecoder) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioDecoder_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_ConnectNotify +func miqt_exec_callback_QAudioDecoder_ConnectNotify(self *C.QAudioDecoder, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioDecoder{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioDecoder) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioDecoder_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioDecoder) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioDecoder_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioDecoder_DisconnectNotify +func miqt_exec_callback_QAudioDecoder_DisconnectNotify(self *C.QAudioDecoder, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioDecoder{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioDecoder) Delete() { - C.QAudioDecoder_Delete(this.h) + C.QAudioDecoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudiodecoder.h b/qt6/multimedia/gen_qaudiodecoder.h index e95a9a11..18734af1 100644 --- a/qt6/multimedia/gen_qaudiodecoder.h +++ b/qt6/multimedia/gen_qaudiodecoder.h @@ -18,22 +18,30 @@ extern "C" { class QAudioBuffer; class QAudioDecoder; class QAudioFormat; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUrl; #else typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioDecoder QAudioDecoder; typedef struct QAudioFormat QAudioFormat; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QAudioDecoder* QAudioDecoder_new(); -QAudioDecoder* QAudioDecoder_new2(QObject* parent); +void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject); +void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject); QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self); void* QAudioDecoder_Metacast(QAudioDecoder* self, const char* param1); struct miqt_string QAudioDecoder_Tr(const char* s); @@ -73,7 +81,21 @@ void QAudioDecoder_DurationChanged(QAudioDecoder* self, long long duration); void QAudioDecoder_connect_DurationChanged(QAudioDecoder* self, intptr_t slot); struct miqt_string QAudioDecoder_Tr2(const char* s, const char* c); struct miqt_string QAudioDecoder_Tr3(const char* s, const char* c, int n); -void QAudioDecoder_Delete(QAudioDecoder* self); +void QAudioDecoder_override_virtual_Event(void* self, intptr_t slot); +bool QAudioDecoder_virtualbase_Event(void* self, QEvent* event); +void QAudioDecoder_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioDecoder_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioDecoder_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioDecoder_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioDecoder_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioDecoder_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioDecoder_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioDecoder_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioDecoder_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioDecoder_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioDecoder_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioDecoder_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioDecoder_Delete(QAudioDecoder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudiodevice.cpp b/qt6/multimedia/gen_qaudiodevice.cpp index 35ddb8af..9bb30c38 100644 --- a/qt6/multimedia/gen_qaudiodevice.cpp +++ b/qt6/multimedia/gen_qaudiodevice.cpp @@ -9,12 +9,14 @@ #include "gen_qaudiodevice.h" #include "_cgo_export.h" -QAudioDevice* QAudioDevice_new() { - return new QAudioDevice(); +void QAudioDevice_new(QAudioDevice** outptr_QAudioDevice) { + QAudioDevice* ret = new QAudioDevice(); + *outptr_QAudioDevice = ret; } -QAudioDevice* QAudioDevice_new2(QAudioDevice* other) { - return new QAudioDevice(*other); +void QAudioDevice_new2(QAudioDevice* other, QAudioDevice** outptr_QAudioDevice) { + QAudioDevice* ret = new QAudioDevice(*other); + *outptr_QAudioDevice = ret; } void QAudioDevice_Swap(QAudioDevice* self, QAudioDevice* other) { @@ -109,7 +111,11 @@ uint32_t QAudioDevice_ChannelConfiguration(const QAudioDevice* self) { return static_cast(_ret); } -void QAudioDevice_Delete(QAudioDevice* self) { - delete self; +void QAudioDevice_Delete(QAudioDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudiodevice.go b/qt6/multimedia/gen_qaudiodevice.go index 6f0dc38e..5acea281 100644 --- a/qt6/multimedia/gen_qaudiodevice.go +++ b/qt6/multimedia/gen_qaudiodevice.go @@ -22,7 +22,8 @@ const ( ) type QAudioDevice struct { - h *C.QAudioDevice + h *C.QAudioDevice + isSubclass bool } func (this *QAudioDevice) cPointer() *C.QAudioDevice { @@ -39,6 +40,7 @@ func (this *QAudioDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioDevice constructs the type using only CGO pointers. func newQAudioDevice(h *C.QAudioDevice) *QAudioDevice { if h == nil { return nil @@ -46,20 +48,33 @@ func newQAudioDevice(h *C.QAudioDevice) *QAudioDevice { return &QAudioDevice{h: h} } +// UnsafeNewQAudioDevice constructs the type using only unsafe pointers. func UnsafeNewQAudioDevice(h unsafe.Pointer) *QAudioDevice { - return newQAudioDevice((*C.QAudioDevice)(h)) + if h == nil { + return nil + } + + return &QAudioDevice{h: (*C.QAudioDevice)(h)} } // NewQAudioDevice constructs a new QAudioDevice object. func NewQAudioDevice() *QAudioDevice { - ret := C.QAudioDevice_new() - return newQAudioDevice(ret) + var outptr_QAudioDevice *C.QAudioDevice = nil + + C.QAudioDevice_new(&outptr_QAudioDevice) + ret := newQAudioDevice(outptr_QAudioDevice) + ret.isSubclass = true + return ret } // NewQAudioDevice2 constructs a new QAudioDevice object. func NewQAudioDevice2(other *QAudioDevice) *QAudioDevice { - ret := C.QAudioDevice_new2(other.cPointer()) - return newQAudioDevice(ret) + var outptr_QAudioDevice *C.QAudioDevice = nil + + C.QAudioDevice_new2(other.cPointer(), &outptr_QAudioDevice) + ret := newQAudioDevice(outptr_QAudioDevice) + ret.isSubclass = true + return ret } func (this *QAudioDevice) Swap(other *QAudioDevice) { @@ -147,7 +162,7 @@ func (this *QAudioDevice) ChannelConfiguration() QAudioFormat__ChannelConfig { // Delete this object from C++ memory. func (this *QAudioDevice) Delete() { - C.QAudioDevice_Delete(this.h) + C.QAudioDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudiodevice.h b/qt6/multimedia/gen_qaudiodevice.h index 17096e96..a37f7cef 100644 --- a/qt6/multimedia/gen_qaudiodevice.h +++ b/qt6/multimedia/gen_qaudiodevice.h @@ -24,8 +24,8 @@ typedef struct QAudioFormat QAudioFormat; typedef struct QByteArray QByteArray; #endif -QAudioDevice* QAudioDevice_new(); -QAudioDevice* QAudioDevice_new2(QAudioDevice* other); +void QAudioDevice_new(QAudioDevice** outptr_QAudioDevice); +void QAudioDevice_new2(QAudioDevice* other, QAudioDevice** outptr_QAudioDevice); void QAudioDevice_Swap(QAudioDevice* self, QAudioDevice* other); void QAudioDevice_OperatorAssign(QAudioDevice* self, QAudioDevice* other); bool QAudioDevice_OperatorEqual(const QAudioDevice* self, QAudioDevice* other); @@ -43,7 +43,7 @@ int QAudioDevice_MinimumChannelCount(const QAudioDevice* self); int QAudioDevice_MaximumChannelCount(const QAudioDevice* self); struct miqt_array /* of uint16_t */ QAudioDevice_SupportedSampleFormats(const QAudioDevice* self); uint32_t QAudioDevice_ChannelConfiguration(const QAudioDevice* self); -void QAudioDevice_Delete(QAudioDevice* self); +void QAudioDevice_Delete(QAudioDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudioformat.cpp b/qt6/multimedia/gen_qaudioformat.cpp index 83128aa6..81271c36 100644 --- a/qt6/multimedia/gen_qaudioformat.cpp +++ b/qt6/multimedia/gen_qaudioformat.cpp @@ -3,12 +3,14 @@ #include "gen_qaudioformat.h" #include "_cgo_export.h" -QAudioFormat* QAudioFormat_new() { - return new QAudioFormat(); +void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat) { + QAudioFormat* ret = new QAudioFormat(); + *outptr_QAudioFormat = ret; } -QAudioFormat* QAudioFormat_new2(QAudioFormat* param1) { - return new QAudioFormat(*param1); +void QAudioFormat_new2(QAudioFormat* param1, QAudioFormat** outptr_QAudioFormat) { + QAudioFormat* ret = new QAudioFormat(*param1); + *outptr_QAudioFormat = ret; } bool QAudioFormat_IsValid(const QAudioFormat* self) { @@ -100,7 +102,11 @@ uint32_t QAudioFormat_DefaultChannelConfigForChannelCount(int channelCount) { return static_cast(_ret); } -void QAudioFormat_Delete(QAudioFormat* self) { - delete self; +void QAudioFormat_Delete(QAudioFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudioformat.go b/qt6/multimedia/gen_qaudioformat.go index 35d025cb..faccdee7 100644 --- a/qt6/multimedia/gen_qaudioformat.go +++ b/qt6/multimedia/gen_qaudioformat.go @@ -70,7 +70,8 @@ const ( ) type QAudioFormat struct { - h *C.QAudioFormat + h *C.QAudioFormat + isSubclass bool } func (this *QAudioFormat) cPointer() *C.QAudioFormat { @@ -87,6 +88,7 @@ func (this *QAudioFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAudioFormat constructs the type using only CGO pointers. func newQAudioFormat(h *C.QAudioFormat) *QAudioFormat { if h == nil { return nil @@ -94,20 +96,33 @@ func newQAudioFormat(h *C.QAudioFormat) *QAudioFormat { return &QAudioFormat{h: h} } +// UnsafeNewQAudioFormat constructs the type using only unsafe pointers. func UnsafeNewQAudioFormat(h unsafe.Pointer) *QAudioFormat { - return newQAudioFormat((*C.QAudioFormat)(h)) + if h == nil { + return nil + } + + return &QAudioFormat{h: (*C.QAudioFormat)(h)} } // NewQAudioFormat constructs a new QAudioFormat object. func NewQAudioFormat() *QAudioFormat { - ret := C.QAudioFormat_new() - return newQAudioFormat(ret) + var outptr_QAudioFormat *C.QAudioFormat = nil + + C.QAudioFormat_new(&outptr_QAudioFormat) + ret := newQAudioFormat(outptr_QAudioFormat) + ret.isSubclass = true + return ret } // NewQAudioFormat2 constructs a new QAudioFormat object. func NewQAudioFormat2(param1 *QAudioFormat) *QAudioFormat { - ret := C.QAudioFormat_new2(param1.cPointer()) - return newQAudioFormat(ret) + var outptr_QAudioFormat *C.QAudioFormat = nil + + C.QAudioFormat_new2(param1.cPointer(), &outptr_QAudioFormat) + ret := newQAudioFormat(outptr_QAudioFormat) + ret.isSubclass = true + return ret } func (this *QAudioFormat) IsValid() bool { @@ -192,7 +207,7 @@ func QAudioFormat_DefaultChannelConfigForChannelCount(channelCount int) QAudioFo // Delete this object from C++ memory. func (this *QAudioFormat) Delete() { - C.QAudioFormat_Delete(this.h) + C.QAudioFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudioformat.h b/qt6/multimedia/gen_qaudioformat.h index 6a480fe7..b4f679a0 100644 --- a/qt6/multimedia/gen_qaudioformat.h +++ b/qt6/multimedia/gen_qaudioformat.h @@ -20,8 +20,8 @@ class QAudioFormat; typedef struct QAudioFormat QAudioFormat; #endif -QAudioFormat* QAudioFormat_new(); -QAudioFormat* QAudioFormat_new2(QAudioFormat* param1); +void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat); +void QAudioFormat_new2(QAudioFormat* param1, QAudioFormat** outptr_QAudioFormat); bool QAudioFormat_IsValid(const QAudioFormat* self); void QAudioFormat_SetSampleRate(QAudioFormat* self, int sampleRate); int QAudioFormat_SampleRate(const QAudioFormat* self); @@ -42,7 +42,7 @@ int QAudioFormat_BytesPerFrame(const QAudioFormat* self); int QAudioFormat_BytesPerSample(const QAudioFormat* self); float QAudioFormat_NormalizedSampleValue(const QAudioFormat* self, const void* sample); uint32_t QAudioFormat_DefaultChannelConfigForChannelCount(int channelCount); -void QAudioFormat_Delete(QAudioFormat* self); +void QAudioFormat_Delete(QAudioFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudioinput.cpp b/qt6/multimedia/gen_qaudioinput.cpp index 29d7815d..7a52ac0b 100644 --- a/qt6/multimedia/gen_qaudioinput.cpp +++ b/qt6/multimedia/gen_qaudioinput.cpp @@ -1,28 +1,223 @@ #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaudioinput.h" #include "_cgo_export.h" -QAudioInput* QAudioInput_new() { - return new QAudioInput(); +class MiqtVirtualQAudioInput : public virtual QAudioInput { +public: + + MiqtVirtualQAudioInput(): QAudioInput() {}; + MiqtVirtualQAudioInput(const QAudioDevice& deviceInfo): QAudioInput(deviceInfo) {}; + MiqtVirtualQAudioInput(QObject* parent): QAudioInput(parent) {}; + MiqtVirtualQAudioInput(const QAudioDevice& deviceInfo, QObject* parent): QAudioInput(deviceInfo, parent) {}; + + virtual ~MiqtVirtualQAudioInput() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioInput::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioInput_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioInput::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioInput::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioInput_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioInput::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioInput::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioInput_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioInput::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioInput::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioInput_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioInput::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioInput::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioInput_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioInput::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioInput::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioInput_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioInput::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioInput::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioInput_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioInput::disconnectNotify(*signal); + + } + +}; + +void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new2(QAudioDevice* deviceInfo) { - return new QAudioInput(*deviceInfo); +void QAudioInput_new2(QAudioDevice* deviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*deviceInfo); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new3(QObject* parent) { - return new QAudioInput(parent); +void QAudioInput_new3(QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(parent); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } -QAudioInput* QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent) { - return new QAudioInput(*deviceInfo, parent); +void QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { + MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*deviceInfo, parent); + *outptr_QAudioInput = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioInput_MetaObject(const QAudioInput* self) { @@ -73,7 +268,7 @@ void QAudioInput_DeviceChanged(QAudioInput* self) { } void QAudioInput_connect_DeviceChanged(QAudioInput* self, intptr_t slot) { - QAudioInput::connect(self, static_cast(&QAudioInput::deviceChanged), self, [=]() { + MiqtVirtualQAudioInput::connect(self, static_cast(&QAudioInput::deviceChanged), self, [=]() { miqt_exec_callback_QAudioInput_DeviceChanged(slot); }); } @@ -83,7 +278,7 @@ void QAudioInput_VolumeChanged(QAudioInput* self, float volume) { } void QAudioInput_connect_VolumeChanged(QAudioInput* self, intptr_t slot) { - QAudioInput::connect(self, static_cast(&QAudioInput::volumeChanged), self, [=](float volume) { + MiqtVirtualQAudioInput::connect(self, static_cast(&QAudioInput::volumeChanged), self, [=](float volume) { float sigval1 = volume; miqt_exec_callback_QAudioInput_VolumeChanged(slot, sigval1); }); @@ -94,7 +289,7 @@ void QAudioInput_MutedChanged(QAudioInput* self, bool muted) { } void QAudioInput_connect_MutedChanged(QAudioInput* self, intptr_t slot) { - QAudioInput::connect(self, static_cast(&QAudioInput::mutedChanged), self, [=](bool muted) { + MiqtVirtualQAudioInput::connect(self, static_cast(&QAudioInput::mutedChanged), self, [=](bool muted) { bool sigval1 = muted; miqt_exec_callback_QAudioInput_MutedChanged(slot, sigval1); }); @@ -122,7 +317,67 @@ struct miqt_string QAudioInput_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioInput_Delete(QAudioInput* self) { - delete self; +void QAudioInput_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__Event = slot; +} + +bool QAudioInput_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_Event(event); +} + +void QAudioInput_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__EventFilter = slot; +} + +bool QAudioInput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioInput_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__TimerEvent = slot; +} + +void QAudioInput_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioInput_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__ChildEvent = slot; +} + +void QAudioInput_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioInput_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__CustomEvent = slot; +} + +void QAudioInput_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioInput_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioInput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioInput_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioInput*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioInput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioInput*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioInput_Delete(QAudioInput* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudioinput.go b/qt6/multimedia/gen_qaudioinput.go index 664f2bbf..905bac01 100644 --- a/qt6/multimedia/gen_qaudioinput.go +++ b/qt6/multimedia/gen_qaudioinput.go @@ -16,7 +16,8 @@ import ( ) type QAudioInput struct { - h *C.QAudioInput + h *C.QAudioInput + isSubclass bool *qt6.QObject } @@ -34,39 +35,67 @@ func (this *QAudioInput) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioInput(h *C.QAudioInput) *QAudioInput { +// newQAudioInput constructs the type using only CGO pointers. +func newQAudioInput(h *C.QAudioInput, h_QObject *C.QObject) *QAudioInput { if h == nil { return nil } - return &QAudioInput{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioInput{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioInput(h unsafe.Pointer) *QAudioInput { - return newQAudioInput((*C.QAudioInput)(h)) +// UnsafeNewQAudioInput constructs the type using only unsafe pointers. +func UnsafeNewQAudioInput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioInput { + if h == nil { + return nil + } + + return &QAudioInput{h: (*C.QAudioInput)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioInput constructs a new QAudioInput object. func NewQAudioInput() *QAudioInput { - ret := C.QAudioInput_new() - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new(&outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput2 constructs a new QAudioInput object. func NewQAudioInput2(deviceInfo *QAudioDevice) *QAudioInput { - ret := C.QAudioInput_new2(deviceInfo.cPointer()) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new2(deviceInfo.cPointer(), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput3 constructs a new QAudioInput object. func NewQAudioInput3(parent *qt6.QObject) *QAudioInput { - ret := C.QAudioInput_new3((*C.QObject)(parent.UnsafePointer())) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioInput4 constructs a new QAudioInput object. func NewQAudioInput4(deviceInfo *QAudioDevice, parent *qt6.QObject) *QAudioInput { - ret := C.QAudioInput_new4(deviceInfo.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioInput(ret) + var outptr_QAudioInput *C.QAudioInput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioInput_new4(deviceInfo.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) + ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioInput) MetaObject() *qt6.QMetaObject { @@ -194,9 +223,175 @@ func QAudioInput_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioInput) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioInput_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioInput) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioInput_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_Event +func miqt_exec_callback_QAudioInput_Event(self *C.QAudioInput, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioInput{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioInput) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioInput_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioInput) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioInput_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_EventFilter +func miqt_exec_callback_QAudioInput_EventFilter(self *C.QAudioInput, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioInput{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioInput) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioInput_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioInput) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioInput_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_TimerEvent +func miqt_exec_callback_QAudioInput_TimerEvent(self *C.QAudioInput, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioInput{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioInput_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioInput) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioInput_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_ChildEvent +func miqt_exec_callback_QAudioInput_ChildEvent(self *C.QAudioInput, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioInput{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioInput_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioInput) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioInput_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_CustomEvent +func miqt_exec_callback_QAudioInput_CustomEvent(self *C.QAudioInput, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioInput{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioInput_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioInput) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioInput_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_ConnectNotify +func miqt_exec_callback_QAudioInput_ConnectNotify(self *C.QAudioInput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioInput{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioInput) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioInput_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioInput) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioInput_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioInput_DisconnectNotify +func miqt_exec_callback_QAudioInput_DisconnectNotify(self *C.QAudioInput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioInput{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioInput) Delete() { - C.QAudioInput_Delete(this.h) + C.QAudioInput_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudioinput.h b/qt6/multimedia/gen_qaudioinput.h index b2232224..e21471c4 100644 --- a/qt6/multimedia/gen_qaudioinput.h +++ b/qt6/multimedia/gen_qaudioinput.h @@ -17,19 +17,27 @@ extern "C" { #ifdef __cplusplus class QAudioDevice; class QAudioInput; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDevice QAudioDevice; typedef struct QAudioInput QAudioInput; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioInput* QAudioInput_new(); -QAudioInput* QAudioInput_new2(QAudioDevice* deviceInfo); -QAudioInput* QAudioInput_new3(QObject* parent); -QAudioInput* QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent); +void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new2(QAudioDevice* deviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new3(QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +void QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); QMetaObject* QAudioInput_MetaObject(const QAudioInput* self); void* QAudioInput_Metacast(QAudioInput* self, const char* param1); struct miqt_string QAudioInput_Tr(const char* s); @@ -47,7 +55,21 @@ void QAudioInput_MutedChanged(QAudioInput* self, bool muted); void QAudioInput_connect_MutedChanged(QAudioInput* self, intptr_t slot); struct miqt_string QAudioInput_Tr2(const char* s, const char* c); struct miqt_string QAudioInput_Tr3(const char* s, const char* c, int n); -void QAudioInput_Delete(QAudioInput* self); +void QAudioInput_override_virtual_Event(void* self, intptr_t slot); +bool QAudioInput_virtualbase_Event(void* self, QEvent* event); +void QAudioInput_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioInput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioInput_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioInput_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioInput_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioInput_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioInput_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioInput_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioInput_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioInput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioInput_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioInput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioInput_Delete(QAudioInput* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudiooutput.cpp b/qt6/multimedia/gen_qaudiooutput.cpp index 50cccf58..02b6a919 100644 --- a/qt6/multimedia/gen_qaudiooutput.cpp +++ b/qt6/multimedia/gen_qaudiooutput.cpp @@ -1,28 +1,223 @@ #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaudiooutput.h" #include "_cgo_export.h" -QAudioOutput* QAudioOutput_new() { - return new QAudioOutput(); +class MiqtVirtualQAudioOutput : public virtual QAudioOutput { +public: + + MiqtVirtualQAudioOutput(): QAudioOutput() {}; + MiqtVirtualQAudioOutput(const QAudioDevice& device): QAudioOutput(device) {}; + MiqtVirtualQAudioOutput(QObject* parent): QAudioOutput(parent) {}; + MiqtVirtualQAudioOutput(const QAudioDevice& device, QObject* parent): QAudioOutput(device, parent) {}; + + virtual ~MiqtVirtualQAudioOutput() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioOutput::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioOutput_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioOutput::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioOutput::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioOutput_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioOutput::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioOutput::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioOutput_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioOutput::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioOutput::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioOutput_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioOutput::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioOutput::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioOutput_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioOutput::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioOutput::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioOutput_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioOutput::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioOutput::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioOutput_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioOutput::disconnectNotify(*signal); + + } + +}; + +void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new2(QAudioDevice* device) { - return new QAudioOutput(*device); +void QAudioOutput_new2(QAudioDevice* device, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*device); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new3(QObject* parent) { - return new QAudioOutput(parent); +void QAudioOutput_new3(QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(parent); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } -QAudioOutput* QAudioOutput_new4(QAudioDevice* device, QObject* parent) { - return new QAudioOutput(*device, parent); +void QAudioOutput_new4(QAudioDevice* device, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { + MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*device, parent); + *outptr_QAudioOutput = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self) { @@ -73,7 +268,7 @@ void QAudioOutput_DeviceChanged(QAudioOutput* self) { } void QAudioOutput_connect_DeviceChanged(QAudioOutput* self, intptr_t slot) { - QAudioOutput::connect(self, static_cast(&QAudioOutput::deviceChanged), self, [=]() { + MiqtVirtualQAudioOutput::connect(self, static_cast(&QAudioOutput::deviceChanged), self, [=]() { miqt_exec_callback_QAudioOutput_DeviceChanged(slot); }); } @@ -83,7 +278,7 @@ void QAudioOutput_VolumeChanged(QAudioOutput* self, float volume) { } void QAudioOutput_connect_VolumeChanged(QAudioOutput* self, intptr_t slot) { - QAudioOutput::connect(self, static_cast(&QAudioOutput::volumeChanged), self, [=](float volume) { + MiqtVirtualQAudioOutput::connect(self, static_cast(&QAudioOutput::volumeChanged), self, [=](float volume) { float sigval1 = volume; miqt_exec_callback_QAudioOutput_VolumeChanged(slot, sigval1); }); @@ -94,7 +289,7 @@ void QAudioOutput_MutedChanged(QAudioOutput* self, bool muted) { } void QAudioOutput_connect_MutedChanged(QAudioOutput* self, intptr_t slot) { - QAudioOutput::connect(self, static_cast(&QAudioOutput::mutedChanged), self, [=](bool muted) { + MiqtVirtualQAudioOutput::connect(self, static_cast(&QAudioOutput::mutedChanged), self, [=](bool muted) { bool sigval1 = muted; miqt_exec_callback_QAudioOutput_MutedChanged(slot, sigval1); }); @@ -122,7 +317,67 @@ struct miqt_string QAudioOutput_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioOutput_Delete(QAudioOutput* self) { - delete self; +void QAudioOutput_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__Event = slot; +} + +bool QAudioOutput_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_Event(event); +} + +void QAudioOutput_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__EventFilter = slot; +} + +bool QAudioOutput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioOutput_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__TimerEvent = slot; +} + +void QAudioOutput_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioOutput_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__ChildEvent = slot; +} + +void QAudioOutput_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioOutput_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__CustomEvent = slot; +} + +void QAudioOutput_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioOutput_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioOutput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioOutput_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioOutput*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioOutput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioOutput*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioOutput_Delete(QAudioOutput* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudiooutput.go b/qt6/multimedia/gen_qaudiooutput.go index edeb0261..3a8cd25c 100644 --- a/qt6/multimedia/gen_qaudiooutput.go +++ b/qt6/multimedia/gen_qaudiooutput.go @@ -16,7 +16,8 @@ import ( ) type QAudioOutput struct { - h *C.QAudioOutput + h *C.QAudioOutput + isSubclass bool *qt6.QObject } @@ -34,39 +35,67 @@ func (this *QAudioOutput) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioOutput(h *C.QAudioOutput) *QAudioOutput { +// newQAudioOutput constructs the type using only CGO pointers. +func newQAudioOutput(h *C.QAudioOutput, h_QObject *C.QObject) *QAudioOutput { if h == nil { return nil } - return &QAudioOutput{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioOutput{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioOutput(h unsafe.Pointer) *QAudioOutput { - return newQAudioOutput((*C.QAudioOutput)(h)) +// UnsafeNewQAudioOutput constructs the type using only unsafe pointers. +func UnsafeNewQAudioOutput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioOutput { + if h == nil { + return nil + } + + return &QAudioOutput{h: (*C.QAudioOutput)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioOutput constructs a new QAudioOutput object. func NewQAudioOutput() *QAudioOutput { - ret := C.QAudioOutput_new() - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new(&outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput2 constructs a new QAudioOutput object. func NewQAudioOutput2(device *QAudioDevice) *QAudioOutput { - ret := C.QAudioOutput_new2(device.cPointer()) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new2(device.cPointer(), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput3 constructs a new QAudioOutput object. func NewQAudioOutput3(parent *qt6.QObject) *QAudioOutput { - ret := C.QAudioOutput_new3((*C.QObject)(parent.UnsafePointer())) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioOutput4 constructs a new QAudioOutput object. func NewQAudioOutput4(device *QAudioDevice, parent *qt6.QObject) *QAudioOutput { - ret := C.QAudioOutput_new4(device.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioOutput(ret) + var outptr_QAudioOutput *C.QAudioOutput = nil + var outptr_QObject *C.QObject = nil + + C.QAudioOutput_new4(device.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) + ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioOutput) MetaObject() *qt6.QMetaObject { @@ -194,9 +223,175 @@ func QAudioOutput_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioOutput) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioOutput_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioOutput) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioOutput_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_Event +func miqt_exec_callback_QAudioOutput_Event(self *C.QAudioOutput, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioOutput{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioOutput) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioOutput_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioOutput) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioOutput_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_EventFilter +func miqt_exec_callback_QAudioOutput_EventFilter(self *C.QAudioOutput, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioOutput{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioOutput) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioOutput_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioOutput) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioOutput_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_TimerEvent +func miqt_exec_callback_QAudioOutput_TimerEvent(self *C.QAudioOutput, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioOutput_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioOutput) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioOutput_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_ChildEvent +func miqt_exec_callback_QAudioOutput_ChildEvent(self *C.QAudioOutput, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioOutput_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioOutput) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioOutput_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_CustomEvent +func miqt_exec_callback_QAudioOutput_CustomEvent(self *C.QAudioOutput, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioOutput_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioOutput) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioOutput_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_ConnectNotify +func miqt_exec_callback_QAudioOutput_ConnectNotify(self *C.QAudioOutput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioOutput) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioOutput_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioOutput) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioOutput_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioOutput_DisconnectNotify +func miqt_exec_callback_QAudioOutput_DisconnectNotify(self *C.QAudioOutput, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioOutput{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioOutput) Delete() { - C.QAudioOutput_Delete(this.h) + C.QAudioOutput_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudiooutput.h b/qt6/multimedia/gen_qaudiooutput.h index d71b6537..a81c6adc 100644 --- a/qt6/multimedia/gen_qaudiooutput.h +++ b/qt6/multimedia/gen_qaudiooutput.h @@ -17,19 +17,27 @@ extern "C" { #ifdef __cplusplus class QAudioDevice; class QAudioOutput; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDevice QAudioDevice; typedef struct QAudioOutput QAudioOutput; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioOutput* QAudioOutput_new(); -QAudioOutput* QAudioOutput_new2(QAudioDevice* device); -QAudioOutput* QAudioOutput_new3(QObject* parent); -QAudioOutput* QAudioOutput_new4(QAudioDevice* device, QObject* parent); +void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new2(QAudioDevice* device, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new3(QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +void QAudioOutput_new4(QAudioDevice* device, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self); void* QAudioOutput_Metacast(QAudioOutput* self, const char* param1); struct miqt_string QAudioOutput_Tr(const char* s); @@ -47,7 +55,21 @@ void QAudioOutput_MutedChanged(QAudioOutput* self, bool muted); void QAudioOutput_connect_MutedChanged(QAudioOutput* self, intptr_t slot); struct miqt_string QAudioOutput_Tr2(const char* s, const char* c); struct miqt_string QAudioOutput_Tr3(const char* s, const char* c, int n); -void QAudioOutput_Delete(QAudioOutput* self); +void QAudioOutput_override_virtual_Event(void* self, intptr_t slot); +bool QAudioOutput_virtualbase_Event(void* self, QEvent* event); +void QAudioOutput_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioOutput_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioOutput_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioOutput_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioOutput_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioOutput_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioOutput_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioOutput_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioOutput_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioOutput_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioOutput_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioOutput_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioOutput_Delete(QAudioOutput* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudiosink.cpp b/qt6/multimedia/gen_qaudiosink.cpp index 95d09f7b..07ea337d 100644 --- a/qt6/multimedia/gen_qaudiosink.cpp +++ b/qt6/multimedia/gen_qaudiosink.cpp @@ -1,38 +1,239 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qaudiosink.h" #include "_cgo_export.h" -QAudioSink* QAudioSink_new() { - return new QAudioSink(); +class MiqtVirtualQAudioSink : public virtual QAudioSink { +public: + + MiqtVirtualQAudioSink(): QAudioSink() {}; + MiqtVirtualQAudioSink(const QAudioDevice& audioDeviceInfo): QAudioSink(audioDeviceInfo) {}; + MiqtVirtualQAudioSink(const QAudioFormat& format): QAudioSink(format) {}; + MiqtVirtualQAudioSink(const QAudioFormat& format, QObject* parent): QAudioSink(format, parent) {}; + MiqtVirtualQAudioSink(const QAudioDevice& audioDeviceInfo, const QAudioFormat& format): QAudioSink(audioDeviceInfo, format) {}; + MiqtVirtualQAudioSink(const QAudioDevice& audioDeviceInfo, const QAudioFormat& format, QObject* parent): QAudioSink(audioDeviceInfo, format, parent) {}; + + virtual ~MiqtVirtualQAudioSink() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioSink::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioSink_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioSink::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioSink::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioSink_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioSink::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioSink::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioSink_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioSink::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioSink::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioSink_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioSink::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioSink::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioSink_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioSink::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioSink::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioSink_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioSink::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioSink::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioSink_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioSink::disconnectNotify(*signal); + + } + +}; + +void QAudioSink_new(QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { + MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(); + *outptr_QAudioSink = ret; + *outptr_QObject = static_cast(ret); } -QAudioSink* QAudioSink_new2(QAudioDevice* audioDeviceInfo) { - return new QAudioSink(*audioDeviceInfo); +void QAudioSink_new2(QAudioDevice* audioDeviceInfo, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { + MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*audioDeviceInfo); + *outptr_QAudioSink = ret; + *outptr_QObject = static_cast(ret); } -QAudioSink* QAudioSink_new3(QAudioFormat* format) { - return new QAudioSink(*format); +void QAudioSink_new3(QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { + MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*format); + *outptr_QAudioSink = ret; + *outptr_QObject = static_cast(ret); } -QAudioSink* QAudioSink_new4(QAudioFormat* format, QObject* parent) { - return new QAudioSink(*format, parent); +void QAudioSink_new4(QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { + MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*format, parent); + *outptr_QAudioSink = ret; + *outptr_QObject = static_cast(ret); } -QAudioSink* QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format) { - return new QAudioSink(*audioDeviceInfo, *format); +void QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { + MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*audioDeviceInfo, *format); + *outptr_QAudioSink = ret; + *outptr_QObject = static_cast(ret); } -QAudioSink* QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent) { - return new QAudioSink(*audioDeviceInfo, *format, parent); +void QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { + MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*audioDeviceInfo, *format, parent); + *outptr_QAudioSink = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioSink_MetaObject(const QAudioSink* self) { @@ -134,7 +335,7 @@ void QAudioSink_StateChanged(QAudioSink* self, int state) { } void QAudioSink_connect_StateChanged(QAudioSink* self, intptr_t slot) { - QAudioSink::connect(self, static_cast(&QAudioSink::stateChanged), self, [=](QAudio::State state) { + MiqtVirtualQAudioSink::connect(self, static_cast(&QAudioSink::stateChanged), self, [=](QAudio::State state) { QAudio::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QAudioSink_StateChanged(slot, sigval1); @@ -163,7 +364,67 @@ struct miqt_string QAudioSink_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioSink_Delete(QAudioSink* self) { - delete self; +void QAudioSink_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__Event = slot; +} + +bool QAudioSink_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_Event(event); +} + +void QAudioSink_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__EventFilter = slot; +} + +bool QAudioSink_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioSink_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__TimerEvent = slot; +} + +void QAudioSink_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioSink_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__ChildEvent = slot; +} + +void QAudioSink_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioSink_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__CustomEvent = slot; +} + +void QAudioSink_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioSink_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioSink_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioSink_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioSink*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioSink_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioSink*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioSink_Delete(QAudioSink* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudiosink.go b/qt6/multimedia/gen_qaudiosink.go index e1897be5..842ba2ee 100644 --- a/qt6/multimedia/gen_qaudiosink.go +++ b/qt6/multimedia/gen_qaudiosink.go @@ -16,7 +16,8 @@ import ( ) type QAudioSink struct { - h *C.QAudioSink + h *C.QAudioSink + isSubclass bool *qt6.QObject } @@ -34,51 +35,89 @@ func (this *QAudioSink) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioSink(h *C.QAudioSink) *QAudioSink { +// newQAudioSink constructs the type using only CGO pointers. +func newQAudioSink(h *C.QAudioSink, h_QObject *C.QObject) *QAudioSink { if h == nil { return nil } - return &QAudioSink{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioSink{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioSink(h unsafe.Pointer) *QAudioSink { - return newQAudioSink((*C.QAudioSink)(h)) +// UnsafeNewQAudioSink constructs the type using only unsafe pointers. +func UnsafeNewQAudioSink(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioSink { + if h == nil { + return nil + } + + return &QAudioSink{h: (*C.QAudioSink)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioSink constructs a new QAudioSink object. func NewQAudioSink() *QAudioSink { - ret := C.QAudioSink_new() - return newQAudioSink(ret) + var outptr_QAudioSink *C.QAudioSink = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSink_new(&outptr_QAudioSink, &outptr_QObject) + ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSink2 constructs a new QAudioSink object. func NewQAudioSink2(audioDeviceInfo *QAudioDevice) *QAudioSink { - ret := C.QAudioSink_new2(audioDeviceInfo.cPointer()) - return newQAudioSink(ret) + var outptr_QAudioSink *C.QAudioSink = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSink_new2(audioDeviceInfo.cPointer(), &outptr_QAudioSink, &outptr_QObject) + ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSink3 constructs a new QAudioSink object. func NewQAudioSink3(format *QAudioFormat) *QAudioSink { - ret := C.QAudioSink_new3(format.cPointer()) - return newQAudioSink(ret) + var outptr_QAudioSink *C.QAudioSink = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSink_new3(format.cPointer(), &outptr_QAudioSink, &outptr_QObject) + ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSink4 constructs a new QAudioSink object. func NewQAudioSink4(format *QAudioFormat, parent *qt6.QObject) *QAudioSink { - ret := C.QAudioSink_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioSink(ret) + var outptr_QAudioSink *C.QAudioSink = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSink_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSink, &outptr_QObject) + ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSink5 constructs a new QAudioSink object. func NewQAudioSink5(audioDeviceInfo *QAudioDevice, format *QAudioFormat) *QAudioSink { - ret := C.QAudioSink_new5(audioDeviceInfo.cPointer(), format.cPointer()) - return newQAudioSink(ret) + var outptr_QAudioSink *C.QAudioSink = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSink_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioSink, &outptr_QObject) + ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSink6 constructs a new QAudioSink object. func NewQAudioSink6(audioDeviceInfo *QAudioDevice, format *QAudioFormat, parent *qt6.QObject) *QAudioSink { - ret := C.QAudioSink_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioSink(ret) + var outptr_QAudioSink *C.QAudioSink = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSink_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSink, &outptr_QObject) + ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioSink) MetaObject() *qt6.QMetaObject { @@ -116,7 +155,7 @@ func (this *QAudioSink) Start(device *qt6.QIODevice) { } func (this *QAudioSink) Start2() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSink_Start2(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSink_Start2(this.h)), nil, nil) } func (this *QAudioSink) Stop() { @@ -213,9 +252,175 @@ func QAudioSink_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioSink) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioSink_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioSink) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioSink_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_Event +func miqt_exec_callback_QAudioSink_Event(self *C.QAudioSink, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioSink{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioSink) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioSink_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioSink) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioSink_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_EventFilter +func miqt_exec_callback_QAudioSink_EventFilter(self *C.QAudioSink, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioSink{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioSink) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioSink_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioSink) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioSink_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_TimerEvent +func miqt_exec_callback_QAudioSink_TimerEvent(self *C.QAudioSink, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioSink{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioSink) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioSink_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioSink) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioSink_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_ChildEvent +func miqt_exec_callback_QAudioSink_ChildEvent(self *C.QAudioSink, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioSink{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioSink) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioSink_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioSink) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioSink_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_CustomEvent +func miqt_exec_callback_QAudioSink_CustomEvent(self *C.QAudioSink, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioSink{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioSink) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioSink_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioSink) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioSink_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_ConnectNotify +func miqt_exec_callback_QAudioSink_ConnectNotify(self *C.QAudioSink, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioSink{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioSink) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioSink_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioSink) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioSink_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSink_DisconnectNotify +func miqt_exec_callback_QAudioSink_DisconnectNotify(self *C.QAudioSink, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioSink{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioSink) Delete() { - C.QAudioSink_Delete(this.h) + C.QAudioSink_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudiosink.h b/qt6/multimedia/gen_qaudiosink.h index 76a9860b..76222d77 100644 --- a/qt6/multimedia/gen_qaudiosink.h +++ b/qt6/multimedia/gen_qaudiosink.h @@ -18,24 +18,32 @@ extern "C" { class QAudioDevice; class QAudioFormat; class QAudioSink; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDevice QAudioDevice; typedef struct QAudioFormat QAudioFormat; typedef struct QAudioSink QAudioSink; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioSink* QAudioSink_new(); -QAudioSink* QAudioSink_new2(QAudioDevice* audioDeviceInfo); -QAudioSink* QAudioSink_new3(QAudioFormat* format); -QAudioSink* QAudioSink_new4(QAudioFormat* format, QObject* parent); -QAudioSink* QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format); -QAudioSink* QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioSink_new(QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); +void QAudioSink_new2(QAudioDevice* audioDeviceInfo, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); +void QAudioSink_new3(QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); +void QAudioSink_new4(QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); +void QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); +void QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); QMetaObject* QAudioSink_MetaObject(const QAudioSink* self); void* QAudioSink_Metacast(QAudioSink* self, const char* param1); struct miqt_string QAudioSink_Tr(const char* s); @@ -60,7 +68,21 @@ void QAudioSink_StateChanged(QAudioSink* self, int state); void QAudioSink_connect_StateChanged(QAudioSink* self, intptr_t slot); struct miqt_string QAudioSink_Tr2(const char* s, const char* c); struct miqt_string QAudioSink_Tr3(const char* s, const char* c, int n); -void QAudioSink_Delete(QAudioSink* self); +void QAudioSink_override_virtual_Event(void* self, intptr_t slot); +bool QAudioSink_virtualbase_Event(void* self, QEvent* event); +void QAudioSink_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioSink_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioSink_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioSink_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioSink_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioSink_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioSink_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioSink_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioSink_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioSink_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioSink_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioSink_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioSink_Delete(QAudioSink* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qaudiosource.cpp b/qt6/multimedia/gen_qaudiosource.cpp index af500ee5..1794fba1 100644 --- a/qt6/multimedia/gen_qaudiosource.cpp +++ b/qt6/multimedia/gen_qaudiosource.cpp @@ -1,38 +1,239 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qaudiosource.h" #include "_cgo_export.h" -QAudioSource* QAudioSource_new() { - return new QAudioSource(); +class MiqtVirtualQAudioSource : public virtual QAudioSource { +public: + + MiqtVirtualQAudioSource(): QAudioSource() {}; + MiqtVirtualQAudioSource(const QAudioDevice& audioDeviceInfo): QAudioSource(audioDeviceInfo) {}; + MiqtVirtualQAudioSource(const QAudioFormat& format): QAudioSource(format) {}; + MiqtVirtualQAudioSource(const QAudioFormat& format, QObject* parent): QAudioSource(format, parent) {}; + MiqtVirtualQAudioSource(const QAudioDevice& audioDeviceInfo, const QAudioFormat& format): QAudioSource(audioDeviceInfo, format) {}; + MiqtVirtualQAudioSource(const QAudioDevice& audioDeviceInfo, const QAudioFormat& format, QObject* parent): QAudioSource(audioDeviceInfo, format, parent) {}; + + virtual ~MiqtVirtualQAudioSource() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioSource::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioSource_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioSource::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioSource::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioSource_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioSource::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioSource::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioSource_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioSource::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioSource::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioSource_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioSource::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioSource::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioSource_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioSource::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioSource::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioSource_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioSource::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioSource::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioSource_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioSource::disconnectNotify(*signal); + + } + +}; + +void QAudioSource_new(QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { + MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(); + *outptr_QAudioSource = ret; + *outptr_QObject = static_cast(ret); } -QAudioSource* QAudioSource_new2(QAudioDevice* audioDeviceInfo) { - return new QAudioSource(*audioDeviceInfo); +void QAudioSource_new2(QAudioDevice* audioDeviceInfo, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { + MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*audioDeviceInfo); + *outptr_QAudioSource = ret; + *outptr_QObject = static_cast(ret); } -QAudioSource* QAudioSource_new3(QAudioFormat* format) { - return new QAudioSource(*format); +void QAudioSource_new3(QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { + MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*format); + *outptr_QAudioSource = ret; + *outptr_QObject = static_cast(ret); } -QAudioSource* QAudioSource_new4(QAudioFormat* format, QObject* parent) { - return new QAudioSource(*format, parent); +void QAudioSource_new4(QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { + MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*format, parent); + *outptr_QAudioSource = ret; + *outptr_QObject = static_cast(ret); } -QAudioSource* QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format) { - return new QAudioSource(*audioDeviceInfo, *format); +void QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { + MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*audioDeviceInfo, *format); + *outptr_QAudioSource = ret; + *outptr_QObject = static_cast(ret); } -QAudioSource* QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent) { - return new QAudioSource(*audioDeviceInfo, *format, parent); +void QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { + MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*audioDeviceInfo, *format, parent); + *outptr_QAudioSource = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioSource_MetaObject(const QAudioSource* self) { @@ -134,7 +335,7 @@ void QAudioSource_StateChanged(QAudioSource* self, int state) { } void QAudioSource_connect_StateChanged(QAudioSource* self, intptr_t slot) { - QAudioSource::connect(self, static_cast(&QAudioSource::stateChanged), self, [=](QAudio::State state) { + MiqtVirtualQAudioSource::connect(self, static_cast(&QAudioSource::stateChanged), self, [=](QAudio::State state) { QAudio::State state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QAudioSource_StateChanged(slot, sigval1); @@ -163,7 +364,67 @@ struct miqt_string QAudioSource_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioSource_Delete(QAudioSource* self) { - delete self; +void QAudioSource_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__Event = slot; +} + +bool QAudioSource_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_Event(event); +} + +void QAudioSource_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__EventFilter = slot; +} + +bool QAudioSource_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioSource_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__TimerEvent = slot; +} + +void QAudioSource_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioSource_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__ChildEvent = slot; +} + +void QAudioSource_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioSource_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__CustomEvent = slot; +} + +void QAudioSource_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioSource_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioSource_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioSource_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioSource*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioSource_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioSource*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioSource_Delete(QAudioSource* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qaudiosource.go b/qt6/multimedia/gen_qaudiosource.go index 4119cc8d..bc417ffb 100644 --- a/qt6/multimedia/gen_qaudiosource.go +++ b/qt6/multimedia/gen_qaudiosource.go @@ -16,7 +16,8 @@ import ( ) type QAudioSource struct { - h *C.QAudioSource + h *C.QAudioSource + isSubclass bool *qt6.QObject } @@ -34,51 +35,89 @@ func (this *QAudioSource) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioSource(h *C.QAudioSource) *QAudioSource { +// newQAudioSource constructs the type using only CGO pointers. +func newQAudioSource(h *C.QAudioSource, h_QObject *C.QObject) *QAudioSource { if h == nil { return nil } - return &QAudioSource{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioSource{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioSource(h unsafe.Pointer) *QAudioSource { - return newQAudioSource((*C.QAudioSource)(h)) +// UnsafeNewQAudioSource constructs the type using only unsafe pointers. +func UnsafeNewQAudioSource(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioSource { + if h == nil { + return nil + } + + return &QAudioSource{h: (*C.QAudioSource)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioSource constructs a new QAudioSource object. func NewQAudioSource() *QAudioSource { - ret := C.QAudioSource_new() - return newQAudioSource(ret) + var outptr_QAudioSource *C.QAudioSource = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSource_new(&outptr_QAudioSource, &outptr_QObject) + ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSource2 constructs a new QAudioSource object. func NewQAudioSource2(audioDeviceInfo *QAudioDevice) *QAudioSource { - ret := C.QAudioSource_new2(audioDeviceInfo.cPointer()) - return newQAudioSource(ret) + var outptr_QAudioSource *C.QAudioSource = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSource_new2(audioDeviceInfo.cPointer(), &outptr_QAudioSource, &outptr_QObject) + ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSource3 constructs a new QAudioSource object. func NewQAudioSource3(format *QAudioFormat) *QAudioSource { - ret := C.QAudioSource_new3(format.cPointer()) - return newQAudioSource(ret) + var outptr_QAudioSource *C.QAudioSource = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSource_new3(format.cPointer(), &outptr_QAudioSource, &outptr_QObject) + ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSource4 constructs a new QAudioSource object. func NewQAudioSource4(format *QAudioFormat, parent *qt6.QObject) *QAudioSource { - ret := C.QAudioSource_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioSource(ret) + var outptr_QAudioSource *C.QAudioSource = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSource_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSource, &outptr_QObject) + ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSource5 constructs a new QAudioSource object. func NewQAudioSource5(audioDeviceInfo *QAudioDevice, format *QAudioFormat) *QAudioSource { - ret := C.QAudioSource_new5(audioDeviceInfo.cPointer(), format.cPointer()) - return newQAudioSource(ret) + var outptr_QAudioSource *C.QAudioSource = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSource_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioSource, &outptr_QObject) + ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioSource6 constructs a new QAudioSource object. func NewQAudioSource6(audioDeviceInfo *QAudioDevice, format *QAudioFormat, parent *qt6.QObject) *QAudioSource { - ret := C.QAudioSource_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQAudioSource(ret) + var outptr_QAudioSource *C.QAudioSource = nil + var outptr_QObject *C.QObject = nil + + C.QAudioSource_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSource, &outptr_QObject) + ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioSource) MetaObject() *qt6.QMetaObject { @@ -116,7 +155,7 @@ func (this *QAudioSource) Start(device *qt6.QIODevice) { } func (this *QAudioSource) Start2() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSource_Start2(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSource_Start2(this.h)), nil, nil) } func (this *QAudioSource) Stop() { @@ -213,9 +252,175 @@ func QAudioSource_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioSource) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioSource_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioSource) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioSource_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_Event +func miqt_exec_callback_QAudioSource_Event(self *C.QAudioSource, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioSource{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioSource) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioSource_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioSource) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioSource_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_EventFilter +func miqt_exec_callback_QAudioSource_EventFilter(self *C.QAudioSource, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioSource{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioSource) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioSource_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioSource) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioSource_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_TimerEvent +func miqt_exec_callback_QAudioSource_TimerEvent(self *C.QAudioSource, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioSource{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioSource) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioSource_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioSource) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioSource_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_ChildEvent +func miqt_exec_callback_QAudioSource_ChildEvent(self *C.QAudioSource, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioSource{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioSource) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioSource_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioSource) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioSource_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_CustomEvent +func miqt_exec_callback_QAudioSource_CustomEvent(self *C.QAudioSource, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioSource{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioSource) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioSource_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioSource) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioSource_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_ConnectNotify +func miqt_exec_callback_QAudioSource_ConnectNotify(self *C.QAudioSource, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioSource{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioSource) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioSource_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioSource) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioSource_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSource_DisconnectNotify +func miqt_exec_callback_QAudioSource_DisconnectNotify(self *C.QAudioSource, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioSource{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioSource) Delete() { - C.QAudioSource_Delete(this.h) + C.QAudioSource_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qaudiosource.h b/qt6/multimedia/gen_qaudiosource.h index 4a5c8620..e90884b6 100644 --- a/qt6/multimedia/gen_qaudiosource.h +++ b/qt6/multimedia/gen_qaudiosource.h @@ -18,24 +18,32 @@ extern "C" { class QAudioDevice; class QAudioFormat; class QAudioSource; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDevice QAudioDevice; typedef struct QAudioFormat QAudioFormat; typedef struct QAudioSource QAudioSource; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioSource* QAudioSource_new(); -QAudioSource* QAudioSource_new2(QAudioDevice* audioDeviceInfo); -QAudioSource* QAudioSource_new3(QAudioFormat* format); -QAudioSource* QAudioSource_new4(QAudioFormat* format, QObject* parent); -QAudioSource* QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format); -QAudioSource* QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioSource_new(QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); +void QAudioSource_new2(QAudioDevice* audioDeviceInfo, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); +void QAudioSource_new3(QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); +void QAudioSource_new4(QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); +void QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); +void QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); QMetaObject* QAudioSource_MetaObject(const QAudioSource* self); void* QAudioSource_Metacast(QAudioSource* self, const char* param1); struct miqt_string QAudioSource_Tr(const char* s); @@ -60,7 +68,21 @@ void QAudioSource_StateChanged(QAudioSource* self, int state); void QAudioSource_connect_StateChanged(QAudioSource* self, intptr_t slot); struct miqt_string QAudioSource_Tr2(const char* s, const char* c); struct miqt_string QAudioSource_Tr3(const char* s, const char* c, int n); -void QAudioSource_Delete(QAudioSource* self); +void QAudioSource_override_virtual_Event(void* self, intptr_t slot); +bool QAudioSource_virtualbase_Event(void* self, QEvent* event); +void QAudioSource_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioSource_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioSource_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioSource_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioSource_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioSource_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioSource_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioSource_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioSource_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioSource_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioSource_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioSource_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioSource_Delete(QAudioSource* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qcamera.cpp b/qt6/multimedia/gen_qcamera.cpp index e3e5d812..78e00353 100644 --- a/qt6/multimedia/gen_qcamera.cpp +++ b/qt6/multimedia/gen_qcamera.cpp @@ -1,39 +1,240 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qcamera.h" #include "_cgo_export.h" -QCamera* QCamera_new() { - return new QCamera(); +class MiqtVirtualQCamera : public virtual QCamera { +public: + + MiqtVirtualQCamera(): QCamera() {}; + MiqtVirtualQCamera(const QCameraDevice& cameraDevice): QCamera(cameraDevice) {}; + MiqtVirtualQCamera(QCameraDevice::Position position): QCamera(position) {}; + MiqtVirtualQCamera(QObject* parent): QCamera(parent) {}; + MiqtVirtualQCamera(const QCameraDevice& cameraDevice, QObject* parent): QCamera(cameraDevice, parent) {}; + MiqtVirtualQCamera(QCameraDevice::Position position, QObject* parent): QCamera(position, parent) {}; + + virtual ~MiqtVirtualQCamera() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QCamera::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QCamera_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QCamera::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QCamera::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QCamera_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QCamera::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QCamera::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QCamera_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QCamera::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QCamera::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QCamera_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QCamera::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QCamera::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QCamera_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QCamera::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QCamera::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCamera_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QCamera::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QCamera::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QCamera_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QCamera::disconnectNotify(*signal); + + } + +}; + +void QCamera_new(QCamera** outptr_QCamera, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(); + *outptr_QCamera = ret; + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new2(QCameraDevice* cameraDevice) { - return new QCamera(*cameraDevice); +void QCamera_new2(QCameraDevice* cameraDevice, QCamera** outptr_QCamera, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraDevice); + *outptr_QCamera = ret; + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new3(int position) { - return new QCamera(static_cast(position)); +void QCamera_new3(int position, QCamera** outptr_QCamera, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position)); + *outptr_QCamera = ret; + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new4(QObject* parent) { - return new QCamera(parent); +void QCamera_new4(QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(parent); + *outptr_QCamera = ret; + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new5(QCameraDevice* cameraDevice, QObject* parent) { - return new QCamera(*cameraDevice, parent); +void QCamera_new5(QCameraDevice* cameraDevice, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraDevice, parent); + *outptr_QCamera = ret; + *outptr_QObject = static_cast(ret); } -QCamera* QCamera_new6(int position, QObject* parent) { - return new QCamera(static_cast(position), parent); +void QCamera_new6(int position, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject) { + MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position), parent); + *outptr_QCamera = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QCamera_MetaObject(const QCamera* self) { @@ -294,7 +495,7 @@ void QCamera_ActiveChanged(QCamera* self, bool param1) { } void QCamera_connect_ActiveChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::activeChanged), self, [=](bool param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::activeChanged), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QCamera_ActiveChanged(slot, sigval1); }); @@ -305,7 +506,7 @@ void QCamera_ErrorChanged(QCamera* self) { } void QCamera_connect_ErrorChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::errorChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::errorChanged), self, [=]() { miqt_exec_callback_QCamera_ErrorChanged(slot); }); } @@ -316,7 +517,7 @@ void QCamera_ErrorOccurred(QCamera* self, int error, struct miqt_string errorStr } void QCamera_connect_ErrorOccurred(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::errorOccurred), self, [=](QCamera::Error error, const QString& errorString) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::errorOccurred), self, [=](QCamera::Error error, const QString& errorString) { QCamera::Error error_ret = error; int sigval1 = static_cast(error_ret); const QString errorString_ret = errorString; @@ -336,7 +537,7 @@ void QCamera_CameraDeviceChanged(QCamera* self) { } void QCamera_connect_CameraDeviceChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::cameraDeviceChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::cameraDeviceChanged), self, [=]() { miqt_exec_callback_QCamera_CameraDeviceChanged(slot); }); } @@ -346,7 +547,7 @@ void QCamera_CameraFormatChanged(QCamera* self) { } void QCamera_connect_CameraFormatChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::cameraFormatChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::cameraFormatChanged), self, [=]() { miqt_exec_callback_QCamera_CameraFormatChanged(slot); }); } @@ -356,7 +557,7 @@ void QCamera_SupportedFeaturesChanged(QCamera* self) { } void QCamera_connect_SupportedFeaturesChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::supportedFeaturesChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::supportedFeaturesChanged), self, [=]() { miqt_exec_callback_QCamera_SupportedFeaturesChanged(slot); }); } @@ -366,7 +567,7 @@ void QCamera_FocusModeChanged(QCamera* self) { } void QCamera_connect_FocusModeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::focusModeChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::focusModeChanged), self, [=]() { miqt_exec_callback_QCamera_FocusModeChanged(slot); }); } @@ -376,7 +577,7 @@ void QCamera_ZoomFactorChanged(QCamera* self, float param1) { } void QCamera_connect_ZoomFactorChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::zoomFactorChanged), self, [=](float param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::zoomFactorChanged), self, [=](float param1) { float sigval1 = param1; miqt_exec_callback_QCamera_ZoomFactorChanged(slot, sigval1); }); @@ -387,7 +588,7 @@ void QCamera_MinimumZoomFactorChanged(QCamera* self, float param1) { } void QCamera_connect_MinimumZoomFactorChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::minimumZoomFactorChanged), self, [=](float param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::minimumZoomFactorChanged), self, [=](float param1) { float sigval1 = param1; miqt_exec_callback_QCamera_MinimumZoomFactorChanged(slot, sigval1); }); @@ -398,7 +599,7 @@ void QCamera_MaximumZoomFactorChanged(QCamera* self, float param1) { } void QCamera_connect_MaximumZoomFactorChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::maximumZoomFactorChanged), self, [=](float param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::maximumZoomFactorChanged), self, [=](float param1) { float sigval1 = param1; miqt_exec_callback_QCamera_MaximumZoomFactorChanged(slot, sigval1); }); @@ -409,7 +610,7 @@ void QCamera_FocusDistanceChanged(QCamera* self, float param1) { } void QCamera_connect_FocusDistanceChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::focusDistanceChanged), self, [=](float param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::focusDistanceChanged), self, [=](float param1) { float sigval1 = param1; miqt_exec_callback_QCamera_FocusDistanceChanged(slot, sigval1); }); @@ -420,7 +621,7 @@ void QCamera_FocusPointChanged(QCamera* self) { } void QCamera_connect_FocusPointChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::focusPointChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::focusPointChanged), self, [=]() { miqt_exec_callback_QCamera_FocusPointChanged(slot); }); } @@ -430,7 +631,7 @@ void QCamera_CustomFocusPointChanged(QCamera* self) { } void QCamera_connect_CustomFocusPointChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::customFocusPointChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::customFocusPointChanged), self, [=]() { miqt_exec_callback_QCamera_CustomFocusPointChanged(slot); }); } @@ -440,7 +641,7 @@ void QCamera_FlashReady(QCamera* self, bool param1) { } void QCamera_connect_FlashReady(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::flashReady), self, [=](bool param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::flashReady), self, [=](bool param1) { bool sigval1 = param1; miqt_exec_callback_QCamera_FlashReady(slot, sigval1); }); @@ -451,7 +652,7 @@ void QCamera_FlashModeChanged(QCamera* self) { } void QCamera_connect_FlashModeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::flashModeChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::flashModeChanged), self, [=]() { miqt_exec_callback_QCamera_FlashModeChanged(slot); }); } @@ -461,7 +662,7 @@ void QCamera_TorchModeChanged(QCamera* self) { } void QCamera_connect_TorchModeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::torchModeChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::torchModeChanged), self, [=]() { miqt_exec_callback_QCamera_TorchModeChanged(slot); }); } @@ -471,7 +672,7 @@ void QCamera_ExposureTimeChanged(QCamera* self, float speed) { } void QCamera_connect_ExposureTimeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::exposureTimeChanged), self, [=](float speed) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::exposureTimeChanged), self, [=](float speed) { float sigval1 = speed; miqt_exec_callback_QCamera_ExposureTimeChanged(slot, sigval1); }); @@ -482,7 +683,7 @@ void QCamera_ManualExposureTimeChanged(QCamera* self, float speed) { } void QCamera_connect_ManualExposureTimeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::manualExposureTimeChanged), self, [=](float speed) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::manualExposureTimeChanged), self, [=](float speed) { float sigval1 = speed; miqt_exec_callback_QCamera_ManualExposureTimeChanged(slot, sigval1); }); @@ -493,7 +694,7 @@ void QCamera_IsoSensitivityChanged(QCamera* self, int param1) { } void QCamera_connect_IsoSensitivityChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::isoSensitivityChanged), self, [=](int param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::isoSensitivityChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QCamera_IsoSensitivityChanged(slot, sigval1); }); @@ -504,7 +705,7 @@ void QCamera_ManualIsoSensitivityChanged(QCamera* self, int param1) { } void QCamera_connect_ManualIsoSensitivityChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::manualIsoSensitivityChanged), self, [=](int param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::manualIsoSensitivityChanged), self, [=](int param1) { int sigval1 = param1; miqt_exec_callback_QCamera_ManualIsoSensitivityChanged(slot, sigval1); }); @@ -515,7 +716,7 @@ void QCamera_ExposureCompensationChanged(QCamera* self, float param1) { } void QCamera_connect_ExposureCompensationChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::exposureCompensationChanged), self, [=](float param1) { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::exposureCompensationChanged), self, [=](float param1) { float sigval1 = param1; miqt_exec_callback_QCamera_ExposureCompensationChanged(slot, sigval1); }); @@ -526,7 +727,7 @@ void QCamera_ExposureModeChanged(QCamera* self) { } void QCamera_connect_ExposureModeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::exposureModeChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::exposureModeChanged), self, [=]() { miqt_exec_callback_QCamera_ExposureModeChanged(slot); }); } @@ -536,7 +737,7 @@ void QCamera_WhiteBalanceModeChanged(const QCamera* self) { } void QCamera_connect_WhiteBalanceModeChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::whiteBalanceModeChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::whiteBalanceModeChanged), self, [=]() { miqt_exec_callback_QCamera_WhiteBalanceModeChanged(slot); }); } @@ -546,7 +747,7 @@ void QCamera_ColorTemperatureChanged(const QCamera* self) { } void QCamera_connect_ColorTemperatureChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::colorTemperatureChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::colorTemperatureChanged), self, [=]() { miqt_exec_callback_QCamera_ColorTemperatureChanged(slot); }); } @@ -556,7 +757,7 @@ void QCamera_BrightnessChanged(QCamera* self) { } void QCamera_connect_BrightnessChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::brightnessChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::brightnessChanged), self, [=]() { miqt_exec_callback_QCamera_BrightnessChanged(slot); }); } @@ -566,7 +767,7 @@ void QCamera_ContrastChanged(QCamera* self) { } void QCamera_connect_ContrastChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::contrastChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::contrastChanged), self, [=]() { miqt_exec_callback_QCamera_ContrastChanged(slot); }); } @@ -576,7 +777,7 @@ void QCamera_SaturationChanged(QCamera* self) { } void QCamera_connect_SaturationChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::saturationChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::saturationChanged), self, [=]() { miqt_exec_callback_QCamera_SaturationChanged(slot); }); } @@ -586,7 +787,7 @@ void QCamera_HueChanged(QCamera* self) { } void QCamera_connect_HueChanged(QCamera* self, intptr_t slot) { - QCamera::connect(self, static_cast(&QCamera::hueChanged), self, [=]() { + MiqtVirtualQCamera::connect(self, static_cast(&QCamera::hueChanged), self, [=]() { miqt_exec_callback_QCamera_HueChanged(slot); }); } @@ -613,7 +814,67 @@ struct miqt_string QCamera_Tr3(const char* s, const char* c, int n) { return _ms; } -void QCamera_Delete(QCamera* self) { - delete self; +void QCamera_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__Event = slot; +} + +bool QCamera_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQCamera*)(self) )->virtualbase_Event(event); +} + +void QCamera_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__EventFilter = slot; +} + +bool QCamera_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQCamera*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QCamera_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__TimerEvent = slot; +} + +void QCamera_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQCamera*)(self) )->virtualbase_TimerEvent(event); +} + +void QCamera_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__ChildEvent = slot; +} + +void QCamera_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQCamera*)(self) )->virtualbase_ChildEvent(event); +} + +void QCamera_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__CustomEvent = slot; +} + +void QCamera_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQCamera*)(self) )->virtualbase_CustomEvent(event); +} + +void QCamera_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__ConnectNotify = slot; +} + +void QCamera_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCamera*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QCamera_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QCamera*)(self) )->handle__DisconnectNotify = slot; +} + +void QCamera_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQCamera*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QCamera_Delete(QCamera* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qcamera.go b/qt6/multimedia/gen_qcamera.go index e8751fbe..af235f73 100644 --- a/qt6/multimedia/gen_qcamera.go +++ b/qt6/multimedia/gen_qcamera.go @@ -97,7 +97,8 @@ const ( ) type QCamera struct { - h *C.QCamera + h *C.QCamera + isSubclass bool *qt6.QObject } @@ -115,51 +116,89 @@ func (this *QCamera) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQCamera(h *C.QCamera) *QCamera { +// newQCamera constructs the type using only CGO pointers. +func newQCamera(h *C.QCamera, h_QObject *C.QObject) *QCamera { if h == nil { return nil } - return &QCamera{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QCamera{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQCamera(h unsafe.Pointer) *QCamera { - return newQCamera((*C.QCamera)(h)) +// UnsafeNewQCamera constructs the type using only unsafe pointers. +func UnsafeNewQCamera(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCamera { + if h == nil { + return nil + } + + return &QCamera{h: (*C.QCamera)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQCamera constructs a new QCamera object. func NewQCamera() *QCamera { - ret := C.QCamera_new() - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new(&outptr_QCamera, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera2 constructs a new QCamera object. func NewQCamera2(cameraDevice *QCameraDevice) *QCamera { - ret := C.QCamera_new2(cameraDevice.cPointer()) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new2(cameraDevice.cPointer(), &outptr_QCamera, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera3 constructs a new QCamera object. func NewQCamera3(position QCameraDevice__Position) *QCamera { - ret := C.QCamera_new3((C.int)(position)) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new3((C.int)(position), &outptr_QCamera, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera4 constructs a new QCamera object. func NewQCamera4(parent *qt6.QObject) *QCamera { - ret := C.QCamera_new4((*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new4((*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera5 constructs a new QCamera object. func NewQCamera5(cameraDevice *QCameraDevice, parent *qt6.QObject) *QCamera { - ret := C.QCamera_new5(cameraDevice.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new5(cameraDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QObject) + ret.isSubclass = true + return ret } // NewQCamera6 constructs a new QCamera object. func NewQCamera6(position QCameraDevice__Position, parent *qt6.QObject) *QCamera { - ret := C.QCamera_new6((C.int)(position), (*C.QObject)(parent.UnsafePointer())) - return newQCamera(ret) + var outptr_QCamera *C.QCamera = nil + var outptr_QObject *C.QObject = nil + + C.QCamera_new6((C.int)(position), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QObject) + ret := newQCamera(outptr_QCamera, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QCamera) MetaObject() *qt6.QMetaObject { @@ -190,7 +229,7 @@ func (this *QCamera) IsActive() bool { } func (this *QCamera) CaptureSession() *QMediaCaptureSession { - return UnsafeNewQMediaCaptureSession(unsafe.Pointer(C.QCamera_CaptureSession(this.h))) + return UnsafeNewQMediaCaptureSession(unsafe.Pointer(C.QCamera_CaptureSession(this.h)), nil) } func (this *QCamera) CameraDevice() *QCameraDevice { @@ -959,9 +998,175 @@ func QCamera_Tr3(s string, c string, n int) string { return _ret } +func (this *QCamera) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QCamera_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QCamera) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QCamera_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_Event +func miqt_exec_callback_QCamera_Event(self *C.QCamera, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCamera{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QCamera) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QCamera_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QCamera) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QCamera_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_EventFilter +func miqt_exec_callback_QCamera_EventFilter(self *C.QCamera, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QCamera{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QCamera) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QCamera_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QCamera) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QCamera_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_TimerEvent +func miqt_exec_callback_QCamera_TimerEvent(self *C.QCamera, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QCamera{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QCamera) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QCamera_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QCamera) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QCamera_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_ChildEvent +func miqt_exec_callback_QCamera_ChildEvent(self *C.QCamera, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QCamera{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QCamera) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QCamera_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QCamera) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QCamera_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_CustomEvent +func miqt_exec_callback_QCamera_CustomEvent(self *C.QCamera, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QCamera{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QCamera) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QCamera_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QCamera) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QCamera_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_ConnectNotify +func miqt_exec_callback_QCamera_ConnectNotify(self *C.QCamera, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCamera{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QCamera) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QCamera_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QCamera) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QCamera_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QCamera_DisconnectNotify +func miqt_exec_callback_QCamera_DisconnectNotify(self *C.QCamera, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QCamera{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QCamera) Delete() { - C.QCamera_Delete(this.h) + C.QCamera_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qcamera.h b/qt6/multimedia/gen_qcamera.h index dd6efaaa..2f6f51d7 100644 --- a/qt6/multimedia/gen_qcamera.h +++ b/qt6/multimedia/gen_qcamera.h @@ -18,26 +18,34 @@ extern "C" { class QCamera; class QCameraDevice; class QCameraFormat; +class QChildEvent; +class QEvent; class QMediaCaptureSession; +class QMetaMethod; class QMetaObject; class QObject; class QPointF; +class QTimerEvent; #else typedef struct QCamera QCamera; typedef struct QCameraDevice QCameraDevice; typedef struct QCameraFormat QCameraFormat; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QMediaCaptureSession QMediaCaptureSession; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPointF QPointF; +typedef struct QTimerEvent QTimerEvent; #endif -QCamera* QCamera_new(); -QCamera* QCamera_new2(QCameraDevice* cameraDevice); -QCamera* QCamera_new3(int position); -QCamera* QCamera_new4(QObject* parent); -QCamera* QCamera_new5(QCameraDevice* cameraDevice, QObject* parent); -QCamera* QCamera_new6(int position, QObject* parent); +void QCamera_new(QCamera** outptr_QCamera, QObject** outptr_QObject); +void QCamera_new2(QCameraDevice* cameraDevice, QCamera** outptr_QCamera, QObject** outptr_QObject); +void QCamera_new3(int position, QCamera** outptr_QCamera, QObject** outptr_QObject); +void QCamera_new4(QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject); +void QCamera_new5(QCameraDevice* cameraDevice, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject); +void QCamera_new6(int position, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject); QMetaObject* QCamera_MetaObject(const QCamera* self); void* QCamera_Metacast(QCamera* self, const char* param1); struct miqt_string QCamera_Tr(const char* s); @@ -154,7 +162,21 @@ void QCamera_HueChanged(QCamera* self); void QCamera_connect_HueChanged(QCamera* self, intptr_t slot); struct miqt_string QCamera_Tr2(const char* s, const char* c); struct miqt_string QCamera_Tr3(const char* s, const char* c, int n); -void QCamera_Delete(QCamera* self); +void QCamera_override_virtual_Event(void* self, intptr_t slot); +bool QCamera_virtualbase_Event(void* self, QEvent* event); +void QCamera_override_virtual_EventFilter(void* self, intptr_t slot); +bool QCamera_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QCamera_override_virtual_TimerEvent(void* self, intptr_t slot); +void QCamera_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QCamera_override_virtual_ChildEvent(void* self, intptr_t slot); +void QCamera_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QCamera_override_virtual_CustomEvent(void* self, intptr_t slot); +void QCamera_virtualbase_CustomEvent(void* self, QEvent* event); +void QCamera_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QCamera_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QCamera_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QCamera_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QCamera_Delete(QCamera* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qcameradevice.cpp b/qt6/multimedia/gen_qcameradevice.cpp index 8a23ef5c..68a46d48 100644 --- a/qt6/multimedia/gen_qcameradevice.cpp +++ b/qt6/multimedia/gen_qcameradevice.cpp @@ -10,12 +10,14 @@ #include "gen_qcameradevice.h" #include "_cgo_export.h" -QCameraFormat* QCameraFormat_new() { - return new QCameraFormat(); +void QCameraFormat_new(QCameraFormat** outptr_QCameraFormat) { + QCameraFormat* ret = new QCameraFormat(); + *outptr_QCameraFormat = ret; } -QCameraFormat* QCameraFormat_new2(QCameraFormat* other) { - return new QCameraFormat(*other); +void QCameraFormat_new2(QCameraFormat* other, QCameraFormat** outptr_QCameraFormat) { + QCameraFormat* ret = new QCameraFormat(*other); + *outptr_QCameraFormat = ret; } void QCameraFormat_OperatorAssign(QCameraFormat* self, QCameraFormat* other) { @@ -51,16 +53,22 @@ bool QCameraFormat_OperatorNotEqual(const QCameraFormat* self, QCameraFormat* ot return self->operator!=(*other); } -void QCameraFormat_Delete(QCameraFormat* self) { - delete self; +void QCameraFormat_Delete(QCameraFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QCameraDevice* QCameraDevice_new() { - return new QCameraDevice(); +void QCameraDevice_new(QCameraDevice** outptr_QCameraDevice) { + QCameraDevice* ret = new QCameraDevice(); + *outptr_QCameraDevice = ret; } -QCameraDevice* QCameraDevice_new2(QCameraDevice* other) { - return new QCameraDevice(*other); +void QCameraDevice_new2(QCameraDevice* other, QCameraDevice** outptr_QCameraDevice) { + QCameraDevice* ret = new QCameraDevice(*other); + *outptr_QCameraDevice = ret; } void QCameraDevice_OperatorAssign(QCameraDevice* self, QCameraDevice* other) { @@ -134,7 +142,11 @@ struct miqt_array /* of QCameraFormat* */ QCameraDevice_VideoFormats(const QCam return _out; } -void QCameraDevice_Delete(QCameraDevice* self) { - delete self; +void QCameraDevice_Delete(QCameraDevice* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qcameradevice.go b/qt6/multimedia/gen_qcameradevice.go index f0775e33..7ff992ea 100644 --- a/qt6/multimedia/gen_qcameradevice.go +++ b/qt6/multimedia/gen_qcameradevice.go @@ -23,7 +23,8 @@ const ( ) type QCameraFormat struct { - h *C.QCameraFormat + h *C.QCameraFormat + isSubclass bool } func (this *QCameraFormat) cPointer() *C.QCameraFormat { @@ -40,6 +41,7 @@ func (this *QCameraFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCameraFormat constructs the type using only CGO pointers. func newQCameraFormat(h *C.QCameraFormat) *QCameraFormat { if h == nil { return nil @@ -47,20 +49,33 @@ func newQCameraFormat(h *C.QCameraFormat) *QCameraFormat { return &QCameraFormat{h: h} } +// UnsafeNewQCameraFormat constructs the type using only unsafe pointers. func UnsafeNewQCameraFormat(h unsafe.Pointer) *QCameraFormat { - return newQCameraFormat((*C.QCameraFormat)(h)) + if h == nil { + return nil + } + + return &QCameraFormat{h: (*C.QCameraFormat)(h)} } // NewQCameraFormat constructs a new QCameraFormat object. func NewQCameraFormat() *QCameraFormat { - ret := C.QCameraFormat_new() - return newQCameraFormat(ret) + var outptr_QCameraFormat *C.QCameraFormat = nil + + C.QCameraFormat_new(&outptr_QCameraFormat) + ret := newQCameraFormat(outptr_QCameraFormat) + ret.isSubclass = true + return ret } // NewQCameraFormat2 constructs a new QCameraFormat object. func NewQCameraFormat2(other *QCameraFormat) *QCameraFormat { - ret := C.QCameraFormat_new2(other.cPointer()) - return newQCameraFormat(ret) + var outptr_QCameraFormat *C.QCameraFormat = nil + + C.QCameraFormat_new2(other.cPointer(), &outptr_QCameraFormat) + ret := newQCameraFormat(outptr_QCameraFormat) + ret.isSubclass = true + return ret } func (this *QCameraFormat) OperatorAssign(other *QCameraFormat) { @@ -100,7 +115,7 @@ func (this *QCameraFormat) OperatorNotEqual(other *QCameraFormat) bool { // Delete this object from C++ memory. func (this *QCameraFormat) Delete() { - C.QCameraFormat_Delete(this.h) + C.QCameraFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -113,7 +128,8 @@ func (this *QCameraFormat) GoGC() { } type QCameraDevice struct { - h *C.QCameraDevice + h *C.QCameraDevice + isSubclass bool } func (this *QCameraDevice) cPointer() *C.QCameraDevice { @@ -130,6 +146,7 @@ func (this *QCameraDevice) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQCameraDevice constructs the type using only CGO pointers. func newQCameraDevice(h *C.QCameraDevice) *QCameraDevice { if h == nil { return nil @@ -137,20 +154,33 @@ func newQCameraDevice(h *C.QCameraDevice) *QCameraDevice { return &QCameraDevice{h: h} } +// UnsafeNewQCameraDevice constructs the type using only unsafe pointers. func UnsafeNewQCameraDevice(h unsafe.Pointer) *QCameraDevice { - return newQCameraDevice((*C.QCameraDevice)(h)) + if h == nil { + return nil + } + + return &QCameraDevice{h: (*C.QCameraDevice)(h)} } // NewQCameraDevice constructs a new QCameraDevice object. func NewQCameraDevice() *QCameraDevice { - ret := C.QCameraDevice_new() - return newQCameraDevice(ret) + var outptr_QCameraDevice *C.QCameraDevice = nil + + C.QCameraDevice_new(&outptr_QCameraDevice) + ret := newQCameraDevice(outptr_QCameraDevice) + ret.isSubclass = true + return ret } // NewQCameraDevice2 constructs a new QCameraDevice object. func NewQCameraDevice2(other *QCameraDevice) *QCameraDevice { - ret := C.QCameraDevice_new2(other.cPointer()) - return newQCameraDevice(ret) + var outptr_QCameraDevice *C.QCameraDevice = nil + + C.QCameraDevice_new2(other.cPointer(), &outptr_QCameraDevice) + ret := newQCameraDevice(outptr_QCameraDevice) + ret.isSubclass = true + return ret } func (this *QCameraDevice) OperatorAssign(other *QCameraDevice) { @@ -219,7 +249,7 @@ func (this *QCameraDevice) VideoFormats() []QCameraFormat { // Delete this object from C++ memory. func (this *QCameraDevice) Delete() { - C.QCameraDevice_Delete(this.h) + C.QCameraDevice_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qcameradevice.h b/qt6/multimedia/gen_qcameradevice.h index 0a2f1362..c3bff71a 100644 --- a/qt6/multimedia/gen_qcameradevice.h +++ b/qt6/multimedia/gen_qcameradevice.h @@ -26,8 +26,8 @@ typedef struct QCameraFormat QCameraFormat; typedef struct QSize QSize; #endif -QCameraFormat* QCameraFormat_new(); -QCameraFormat* QCameraFormat_new2(QCameraFormat* other); +void QCameraFormat_new(QCameraFormat** outptr_QCameraFormat); +void QCameraFormat_new2(QCameraFormat* other, QCameraFormat** outptr_QCameraFormat); void QCameraFormat_OperatorAssign(QCameraFormat* self, QCameraFormat* other); int QCameraFormat_PixelFormat(const QCameraFormat* self); QSize* QCameraFormat_Resolution(const QCameraFormat* self); @@ -36,10 +36,10 @@ float QCameraFormat_MaxFrameRate(const QCameraFormat* self); bool QCameraFormat_IsNull(const QCameraFormat* self); bool QCameraFormat_OperatorEqual(const QCameraFormat* self, QCameraFormat* other); bool QCameraFormat_OperatorNotEqual(const QCameraFormat* self, QCameraFormat* other); -void QCameraFormat_Delete(QCameraFormat* self); +void QCameraFormat_Delete(QCameraFormat* self, bool isSubclass); -QCameraDevice* QCameraDevice_new(); -QCameraDevice* QCameraDevice_new2(QCameraDevice* other); +void QCameraDevice_new(QCameraDevice** outptr_QCameraDevice); +void QCameraDevice_new2(QCameraDevice* other, QCameraDevice** outptr_QCameraDevice); void QCameraDevice_OperatorAssign(QCameraDevice* self, QCameraDevice* other); bool QCameraDevice_OperatorEqual(const QCameraDevice* self, QCameraDevice* other); bool QCameraDevice_OperatorNotEqual(const QCameraDevice* self, QCameraDevice* other); @@ -50,7 +50,7 @@ bool QCameraDevice_IsDefault(const QCameraDevice* self); int QCameraDevice_Position(const QCameraDevice* self); struct miqt_array /* of QSize* */ QCameraDevice_PhotoResolutions(const QCameraDevice* self); struct miqt_array /* of QCameraFormat* */ QCameraDevice_VideoFormats(const QCameraDevice* self); -void QCameraDevice_Delete(QCameraDevice* self); +void QCameraDevice_Delete(QCameraDevice* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qgraphicsvideoitem.cpp b/qt6/multimedia/gen_qgraphicsvideoitem.cpp index cada9577..40855152 100644 --- a/qt6/multimedia/gen_qgraphicsvideoitem.cpp +++ b/qt6/multimedia/gen_qgraphicsvideoitem.cpp @@ -1,6 +1,9 @@ +#include #include +#include #include #include +#include #include #include #include @@ -9,18 +12,182 @@ #include #include #include +#include +#include #include #include #include #include "gen_qgraphicsvideoitem.h" #include "_cgo_export.h" -QGraphicsVideoItem* QGraphicsVideoItem_new() { - return new QGraphicsVideoItem(); +class MiqtVirtualQGraphicsVideoItem : public virtual QGraphicsVideoItem { +public: + + MiqtVirtualQGraphicsVideoItem(): QGraphicsVideoItem() {}; + MiqtVirtualQGraphicsVideoItem(QGraphicsItem* parent): QGraphicsVideoItem(parent) {}; + + virtual ~MiqtVirtualQGraphicsVideoItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsVideoItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsVideoItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsVideoItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsVideoItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsVideoItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsVideoItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsVideoItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsVideoItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsVideoItem::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QGraphicsVideoItem::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsVideoItem_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsVideoItem::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) override { + if (handle__ItemChange == 0) { + return QGraphicsVideoItem::itemChange(change, value); + } + + QGraphicsItem::GraphicsItemChange change_ret = change; + int sigval1 = static_cast(change_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsVideoItem_ItemChange(this, handle__ItemChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_ItemChange(int change, QVariant* value) { + + return new QVariant(QGraphicsVideoItem::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* ev) override { + if (handle__Event == 0) { + return QGraphicsVideoItem::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsVideoItem_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsVideoItem::event(ev); + + } + +}; + +void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(); + *outptr_QGraphicsVideoItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } -QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent) { - return new QGraphicsVideoItem(parent); +void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(parent); + *outptr_QGraphicsVideoItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); } QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self) { @@ -79,8 +246,8 @@ QRectF* QGraphicsVideoItem_BoundingRect(const QGraphicsVideoItem* self) { return new QRectF(self->boundingRect()); } -void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) { - self->paint(painter, option); +void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); } int QGraphicsVideoItem_Type(const QGraphicsVideoItem* self) { @@ -92,7 +259,7 @@ void QGraphicsVideoItem_NativeSizeChanged(QGraphicsVideoItem* self, QSizeF* size } void QGraphicsVideoItem_connect_NativeSizeChanged(QGraphicsVideoItem* self, intptr_t slot) { - QGraphicsVideoItem::connect(self, static_cast(&QGraphicsVideoItem::nativeSizeChanged), self, [=](const QSizeF& size) { + MiqtVirtualQGraphicsVideoItem::connect(self, static_cast(&QGraphicsVideoItem::nativeSizeChanged), self, [=](const QSizeF& size) { const QSizeF& size_ret = size; // Cast returned reference into pointer QSizeF* sigval1 = const_cast(&size_ret); @@ -122,11 +289,59 @@ struct miqt_string QGraphicsVideoItem_Tr3(const char* s, const char* c, int n) { return _ms; } -void QGraphicsVideoItem_Paint3(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { - self->paint(painter, option, widget); +void QGraphicsVideoItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsVideoItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsVideoItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsVideoItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsVideoItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__Type = slot; +} + +int QGraphicsVideoItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsVideoItem_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsVideoItem_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsVideoItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsVideoItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsVideoItem_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsVideoItem*)(self) )->handle__Event = slot; +} + +bool QGraphicsVideoItem_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsVideoItem*)(self) )->virtualbase_Event(ev); } -void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self) { - delete self; +void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qgraphicsvideoitem.go b/qt6/multimedia/gen_qgraphicsvideoitem.go index 0c956ddc..ea3e96ae 100644 --- a/qt6/multimedia/gen_qgraphicsvideoitem.go +++ b/qt6/multimedia/gen_qgraphicsvideoitem.go @@ -22,7 +22,8 @@ const ( ) type QGraphicsVideoItem struct { - h *C.QGraphicsVideoItem + h *C.QGraphicsVideoItem + isSubclass bool *qt6.QGraphicsObject } @@ -40,27 +41,49 @@ func (this *QGraphicsVideoItem) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQGraphicsVideoItem(h *C.QGraphicsVideoItem) *QGraphicsVideoItem { +// newQGraphicsVideoItem constructs the type using only CGO pointers. +func newQGraphicsVideoItem(h *C.QGraphicsVideoItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsVideoItem { if h == nil { return nil } - return &QGraphicsVideoItem{h: h, QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(h))} + return &QGraphicsVideoItem{h: h, + QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem))} } -func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer) *QGraphicsVideoItem { - return newQGraphicsVideoItem((*C.QGraphicsVideoItem)(h)) +// UnsafeNewQGraphicsVideoItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsVideoItem { + if h == nil { + return nil + } + + return &QGraphicsVideoItem{h: (*C.QGraphicsVideoItem)(h), + QGraphicsObject: qt6.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} } // NewQGraphicsVideoItem constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem() *QGraphicsVideoItem { - ret := C.QGraphicsVideoItem_new() - return newQGraphicsVideoItem(ret) + var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsVideoItem_new(&outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } // NewQGraphicsVideoItem2 constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem2(parent *qt6.QGraphicsItem) *QGraphicsVideoItem { - ret := C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer())) - return newQGraphicsVideoItem(ret) + var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer()), &outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret } func (this *QGraphicsVideoItem) MetaObject() *qt6.QMetaObject { @@ -83,7 +106,7 @@ func QGraphicsVideoItem_Tr(s string) string { } func (this *QGraphicsVideoItem) VideoSink() *QVideoSink { - return UnsafeNewQVideoSink(unsafe.Pointer(C.QGraphicsVideoItem_VideoSink(this.h))) + return UnsafeNewQVideoSink(unsafe.Pointer(C.QGraphicsVideoItem_VideoSink(this.h)), nil) } func (this *QGraphicsVideoItem) AspectRatioMode() qt6.AspectRatioMode { @@ -130,8 +153,8 @@ func (this *QGraphicsVideoItem) BoundingRect() *qt6.QRectF { return _goptr } -func (this *QGraphicsVideoItem) Paint(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem) { - C.QGraphicsVideoItem_Paint(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer())) +func (this *QGraphicsVideoItem) Paint(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget) { + C.QGraphicsVideoItem_Paint(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) } func (this *QGraphicsVideoItem) Type() int { @@ -180,13 +203,159 @@ func QGraphicsVideoItem_Tr3(s string, c string, n int) string { return _ret } -func (this *QGraphicsVideoItem) Paint3(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget) { - C.QGraphicsVideoItem_Paint3(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) +func (this *QGraphicsVideoItem) callVirtualBase_BoundingRect() *qt6.QRectF { + + _ret := C.QGraphicsVideoItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsVideoItem) OnBoundingRect(slot func(super func() *qt6.QRectF) *qt6.QRectF) { + C.QGraphicsVideoItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_BoundingRect +func miqt_exec_callback_QGraphicsVideoItem_BoundingRect(self *C.QGraphicsVideoItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QRectF) *qt6.QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_BoundingRect) + + return (*C.QRectF)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_Paint(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget) { + + C.QGraphicsVideoItem_virtualbase_Paint(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) + +} +func (this *QGraphicsVideoItem) OnPaint(slot func(super func(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget), painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget)) { + C.QGraphicsVideoItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_Paint +func miqt_exec_callback_QGraphicsVideoItem_Paint(self *C.QGraphicsVideoItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget), painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := qt6.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := qt6.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsVideoItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsVideoItem) OnType(slot func(super func() int) int) { + C.QGraphicsVideoItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_Type +func miqt_exec_callback_QGraphicsVideoItem_Type(self *C.QGraphicsVideoItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QGraphicsVideoItem_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsVideoItem) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QGraphicsVideoItem_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_TimerEvent +func miqt_exec_callback_QGraphicsVideoItem_TimerEvent(self *C.QGraphicsVideoItem, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_ItemChange(change qt6.QGraphicsItem__GraphicsItemChange, value *qt6.QVariant) *qt6.QVariant { + + _ret := C.QGraphicsVideoItem_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), (*C.QVariant)(value.UnsafePointer())) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsVideoItem) OnItemChange(slot func(super func(change qt6.QGraphicsItem__GraphicsItemChange, value *qt6.QVariant) *qt6.QVariant, change qt6.QGraphicsItem__GraphicsItemChange, value *qt6.QVariant) *qt6.QVariant) { + C.QGraphicsVideoItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_ItemChange +func miqt_exec_callback_QGraphicsVideoItem_ItemChange(self *C.QGraphicsVideoItem, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change qt6.QGraphicsItem__GraphicsItemChange, value *qt6.QVariant) *qt6.QVariant, change qt6.QGraphicsItem__GraphicsItemChange, value *qt6.QVariant) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsVideoItem) callVirtualBase_Event(ev *qt6.QEvent) bool { + + return (bool)(C.QGraphicsVideoItem_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(ev.UnsafePointer()))) + +} +func (this *QGraphicsVideoItem) OnEvent(slot func(super func(ev *qt6.QEvent) bool, ev *qt6.QEvent) bool) { + C.QGraphicsVideoItem_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsVideoItem_Event +func miqt_exec_callback_QGraphicsVideoItem_Event(self *C.QGraphicsVideoItem, cb C.intptr_t, ev *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *qt6.QEvent) bool, ev *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(ev)) + + virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QGraphicsVideoItem) Delete() { - C.QGraphicsVideoItem_Delete(this.h) + C.QGraphicsVideoItem_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qgraphicsvideoitem.h b/qt6/multimedia/gen_qgraphicsvideoitem.h index d2c527f4..c1a64bdf 100644 --- a/qt6/multimedia/gen_qgraphicsvideoitem.h +++ b/qt6/multimedia/gen_qgraphicsvideoitem.h @@ -15,31 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QEvent; class QGraphicsItem; +class QGraphicsObject; class QGraphicsVideoItem; class QMetaObject; +class QObject; class QPainter; class QPointF; class QRectF; class QSizeF; class QStyleOptionGraphicsItem; +class QTimerEvent; +class QVariant; class QVideoSink; class QWidget; #else +typedef struct QEvent QEvent; typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsObject QGraphicsObject; typedef struct QGraphicsVideoItem QGraphicsVideoItem; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPointF QPointF; typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; typedef struct QVideoSink QVideoSink; typedef struct QWidget QWidget; #endif -QGraphicsVideoItem* QGraphicsVideoItem_new(); -QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent); +void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self); void* QGraphicsVideoItem_Metacast(QGraphicsVideoItem* self, const char* param1); struct miqt_string QGraphicsVideoItem_Tr(const char* s); @@ -52,14 +62,27 @@ QSizeF* QGraphicsVideoItem_Size(const QGraphicsVideoItem* self); void QGraphicsVideoItem_SetSize(QGraphicsVideoItem* self, QSizeF* size); QSizeF* QGraphicsVideoItem_NativeSize(const QGraphicsVideoItem* self); QRectF* QGraphicsVideoItem_BoundingRect(const QGraphicsVideoItem* self); -void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option); +void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); int QGraphicsVideoItem_Type(const QGraphicsVideoItem* self); void QGraphicsVideoItem_NativeSizeChanged(QGraphicsVideoItem* self, QSizeF* size); void QGraphicsVideoItem_connect_NativeSizeChanged(QGraphicsVideoItem* self, intptr_t slot); +void QGraphicsVideoItem_TimerEvent(QGraphicsVideoItem* self, QTimerEvent* event); +QVariant* QGraphicsVideoItem_ItemChange(QGraphicsVideoItem* self, int change, QVariant* value); struct miqt_string QGraphicsVideoItem_Tr2(const char* s, const char* c); struct miqt_string QGraphicsVideoItem_Tr3(const char* s, const char* c, int n); -void QGraphicsVideoItem_Paint3(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); -void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self); +void QGraphicsVideoItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsVideoItem_virtualbase_BoundingRect(const void* self); +void QGraphicsVideoItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsVideoItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsVideoItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsVideoItem_virtualbase_Type(const void* self); +void QGraphicsVideoItem_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsVideoItem_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsVideoItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsVideoItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsVideoItem_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsVideoItem_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qimagecapture.cpp b/qt6/multimedia/gen_qimagecapture.cpp index c04ccb0f..ce6be4eb 100644 --- a/qt6/multimedia/gen_qimagecapture.cpp +++ b/qt6/multimedia/gen_qimagecapture.cpp @@ -1,25 +1,214 @@ +#include +#include #include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qimagecapture.h" #include "_cgo_export.h" -QImageCapture* QImageCapture_new() { - return new QImageCapture(); +class MiqtVirtualQImageCapture : public virtual QImageCapture { +public: + + MiqtVirtualQImageCapture(): QImageCapture() {}; + MiqtVirtualQImageCapture(QObject* parent): QImageCapture(parent) {}; + + virtual ~MiqtVirtualQImageCapture() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QImageCapture::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QImageCapture_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QImageCapture::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QImageCapture::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QImageCapture_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QImageCapture::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QImageCapture::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QImageCapture_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QImageCapture::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QImageCapture::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QImageCapture_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QImageCapture::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QImageCapture::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QImageCapture_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QImageCapture::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QImageCapture::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QImageCapture_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QImageCapture::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QImageCapture::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QImageCapture_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QImageCapture::disconnectNotify(*signal); + + } + +}; + +void QImageCapture_new(QImageCapture** outptr_QImageCapture, QObject** outptr_QObject) { + MiqtVirtualQImageCapture* ret = new MiqtVirtualQImageCapture(); + *outptr_QImageCapture = ret; + *outptr_QObject = static_cast(ret); } -QImageCapture* QImageCapture_new2(QObject* parent) { - return new QImageCapture(parent); +void QImageCapture_new2(QObject* parent, QImageCapture** outptr_QImageCapture, QObject** outptr_QObject) { + MiqtVirtualQImageCapture* ret = new MiqtVirtualQImageCapture(parent); + *outptr_QImageCapture = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QImageCapture_MetaObject(const QImageCapture* self) { @@ -160,7 +349,7 @@ void QImageCapture_ErrorChanged(QImageCapture* self) { } void QImageCapture_connect_ErrorChanged(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::errorChanged), self, [=]() { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::errorChanged), self, [=]() { miqt_exec_callback_QImageCapture_ErrorChanged(slot); }); } @@ -171,7 +360,7 @@ void QImageCapture_ErrorOccurred(QImageCapture* self, int id, int error, struct } void QImageCapture_connect_ErrorOccurred(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::errorOccurred), self, [=](int id, QImageCapture::Error error, const QString& errorString) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::errorOccurred), self, [=](int id, QImageCapture::Error error, const QString& errorString) { int sigval1 = id; QImageCapture::Error error_ret = error; int sigval2 = static_cast(error_ret); @@ -192,7 +381,7 @@ void QImageCapture_ReadyForCaptureChanged(QImageCapture* self, bool ready) { } void QImageCapture_connect_ReadyForCaptureChanged(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::readyForCaptureChanged), self, [=](bool ready) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::readyForCaptureChanged), self, [=](bool ready) { bool sigval1 = ready; miqt_exec_callback_QImageCapture_ReadyForCaptureChanged(slot, sigval1); }); @@ -203,7 +392,7 @@ void QImageCapture_MetaDataChanged(QImageCapture* self) { } void QImageCapture_connect_MetaDataChanged(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::metaDataChanged), self, [=]() { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::metaDataChanged), self, [=]() { miqt_exec_callback_QImageCapture_MetaDataChanged(slot); }); } @@ -213,7 +402,7 @@ void QImageCapture_FileFormatChanged(QImageCapture* self) { } void QImageCapture_connect_FileFormatChanged(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::fileFormatChanged), self, [=]() { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::fileFormatChanged), self, [=]() { miqt_exec_callback_QImageCapture_FileFormatChanged(slot); }); } @@ -223,7 +412,7 @@ void QImageCapture_QualityChanged(QImageCapture* self) { } void QImageCapture_connect_QualityChanged(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::qualityChanged), self, [=]() { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::qualityChanged), self, [=]() { miqt_exec_callback_QImageCapture_QualityChanged(slot); }); } @@ -233,7 +422,7 @@ void QImageCapture_ResolutionChanged(QImageCapture* self) { } void QImageCapture_connect_ResolutionChanged(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::resolutionChanged), self, [=]() { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::resolutionChanged), self, [=]() { miqt_exec_callback_QImageCapture_ResolutionChanged(slot); }); } @@ -243,7 +432,7 @@ void QImageCapture_ImageExposed(QImageCapture* self, int id) { } void QImageCapture_connect_ImageExposed(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::imageExposed), self, [=](int id) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::imageExposed), self, [=](int id) { int sigval1 = id; miqt_exec_callback_QImageCapture_ImageExposed(slot, sigval1); }); @@ -254,7 +443,7 @@ void QImageCapture_ImageCaptured(QImageCapture* self, int id, QImage* preview) { } void QImageCapture_connect_ImageCaptured(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::imageCaptured), self, [=](int id, const QImage& preview) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::imageCaptured), self, [=](int id, const QImage& preview) { int sigval1 = id; const QImage& preview_ret = preview; // Cast returned reference into pointer @@ -268,7 +457,7 @@ void QImageCapture_ImageMetadataAvailable(QImageCapture* self, int id, QMediaMet } void QImageCapture_connect_ImageMetadataAvailable(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::imageMetadataAvailable), self, [=](int id, const QMediaMetaData& metaData) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::imageMetadataAvailable), self, [=](int id, const QMediaMetaData& metaData) { int sigval1 = id; const QMediaMetaData& metaData_ret = metaData; // Cast returned reference into pointer @@ -282,7 +471,7 @@ void QImageCapture_ImageAvailable(QImageCapture* self, int id, QVideoFrame* fram } void QImageCapture_connect_ImageAvailable(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::imageAvailable), self, [=](int id, const QVideoFrame& frame) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::imageAvailable), self, [=](int id, const QVideoFrame& frame) { int sigval1 = id; const QVideoFrame& frame_ret = frame; // Cast returned reference into pointer @@ -297,7 +486,7 @@ void QImageCapture_ImageSaved(QImageCapture* self, int id, struct miqt_string fi } void QImageCapture_connect_ImageSaved(QImageCapture* self, intptr_t slot) { - QImageCapture::connect(self, static_cast(&QImageCapture::imageSaved), self, [=](int id, const QString& fileName) { + MiqtVirtualQImageCapture::connect(self, static_cast(&QImageCapture::imageSaved), self, [=](int id, const QString& fileName) { int sigval1 = id; const QString fileName_ret = fileName; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory @@ -338,7 +527,67 @@ int QImageCapture_CaptureToFile1(QImageCapture* self, struct miqt_string locatio return self->captureToFile(location_QString); } -void QImageCapture_Delete(QImageCapture* self) { - delete self; +void QImageCapture_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__Event = slot; +} + +bool QImageCapture_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_Event(event); +} + +void QImageCapture_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__EventFilter = slot; +} + +bool QImageCapture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QImageCapture_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__TimerEvent = slot; +} + +void QImageCapture_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_TimerEvent(event); +} + +void QImageCapture_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__ChildEvent = slot; +} + +void QImageCapture_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_ChildEvent(event); +} + +void QImageCapture_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__CustomEvent = slot; +} + +void QImageCapture_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_CustomEvent(event); +} + +void QImageCapture_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__ConnectNotify = slot; +} + +void QImageCapture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QImageCapture_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QImageCapture*)(self) )->handle__DisconnectNotify = slot; +} + +void QImageCapture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQImageCapture*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QImageCapture_Delete(QImageCapture* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qimagecapture.go b/qt6/multimedia/gen_qimagecapture.go index 37b21aec..0de61ff7 100644 --- a/qt6/multimedia/gen_qimagecapture.go +++ b/qt6/multimedia/gen_qimagecapture.go @@ -48,7 +48,8 @@ const ( ) type QImageCapture struct { - h *C.QImageCapture + h *C.QImageCapture + isSubclass bool *qt6.QObject } @@ -66,27 +67,45 @@ func (this *QImageCapture) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQImageCapture(h *C.QImageCapture) *QImageCapture { +// newQImageCapture constructs the type using only CGO pointers. +func newQImageCapture(h *C.QImageCapture, h_QObject *C.QObject) *QImageCapture { if h == nil { return nil } - return &QImageCapture{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QImageCapture{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQImageCapture(h unsafe.Pointer) *QImageCapture { - return newQImageCapture((*C.QImageCapture)(h)) +// UnsafeNewQImageCapture constructs the type using only unsafe pointers. +func UnsafeNewQImageCapture(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImageCapture { + if h == nil { + return nil + } + + return &QImageCapture{h: (*C.QImageCapture)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQImageCapture constructs a new QImageCapture object. func NewQImageCapture() *QImageCapture { - ret := C.QImageCapture_new() - return newQImageCapture(ret) + var outptr_QImageCapture *C.QImageCapture = nil + var outptr_QObject *C.QObject = nil + + C.QImageCapture_new(&outptr_QImageCapture, &outptr_QObject) + ret := newQImageCapture(outptr_QImageCapture, outptr_QObject) + ret.isSubclass = true + return ret } // NewQImageCapture2 constructs a new QImageCapture object. func NewQImageCapture2(parent *qt6.QObject) *QImageCapture { - ret := C.QImageCapture_new2((*C.QObject)(parent.UnsafePointer())) - return newQImageCapture(ret) + var outptr_QImageCapture *C.QImageCapture = nil + var outptr_QObject *C.QObject = nil + + C.QImageCapture_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QImageCapture, &outptr_QObject) + ret := newQImageCapture(outptr_QImageCapture, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QImageCapture) MetaObject() *qt6.QMetaObject { @@ -113,7 +132,7 @@ func (this *QImageCapture) IsAvailable() bool { } func (this *QImageCapture) CaptureSession() *QMediaCaptureSession { - return UnsafeNewQMediaCaptureSession(unsafe.Pointer(C.QImageCapture_CaptureSession(this.h))) + return UnsafeNewQMediaCaptureSession(unsafe.Pointer(C.QImageCapture_CaptureSession(this.h)), nil) } func (this *QImageCapture) Error() QImageCapture__Error { @@ -382,7 +401,7 @@ func miqt_exec_callback_QImageCapture_ImageCaptured(cb C.intptr_t, id C.int, pre // Convert all CABI parameters to Go parameters slotval1 := (int)(id) - slotval2 := qt6.UnsafeNewQImage(unsafe.Pointer(preview)) + slotval2 := qt6.UnsafeNewQImage(unsafe.Pointer(preview), nil) gofunc(slotval1, slotval2) } @@ -490,9 +509,175 @@ func (this *QImageCapture) CaptureToFile1(location string) int { return (int)(C.QImageCapture_CaptureToFile1(this.h, location_ms)) } +func (this *QImageCapture) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QImageCapture_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QImageCapture) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QImageCapture_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_Event +func miqt_exec_callback_QImageCapture_Event(self *C.QImageCapture, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QImageCapture{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageCapture) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QImageCapture_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QImageCapture) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QImageCapture_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_EventFilter +func miqt_exec_callback_QImageCapture_EventFilter(self *C.QImageCapture, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QImageCapture{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageCapture) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QImageCapture_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QImageCapture) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QImageCapture_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_TimerEvent +func miqt_exec_callback_QImageCapture_TimerEvent(self *C.QImageCapture, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QImageCapture{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QImageCapture) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QImageCapture_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QImageCapture) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QImageCapture_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_ChildEvent +func miqt_exec_callback_QImageCapture_ChildEvent(self *C.QImageCapture, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QImageCapture{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QImageCapture) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QImageCapture_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QImageCapture) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QImageCapture_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_CustomEvent +func miqt_exec_callback_QImageCapture_CustomEvent(self *C.QImageCapture, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QImageCapture{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QImageCapture) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QImageCapture_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QImageCapture) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QImageCapture_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_ConnectNotify +func miqt_exec_callback_QImageCapture_ConnectNotify(self *C.QImageCapture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QImageCapture{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QImageCapture) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QImageCapture_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QImageCapture) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QImageCapture_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageCapture_DisconnectNotify +func miqt_exec_callback_QImageCapture_DisconnectNotify(self *C.QImageCapture, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QImageCapture{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QImageCapture) Delete() { - C.QImageCapture_Delete(this.h) + C.QImageCapture_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qimagecapture.h b/qt6/multimedia/gen_qimagecapture.h index 3942364d..cd0768a3 100644 --- a/qt6/multimedia/gen_qimagecapture.h +++ b/qt6/multimedia/gen_qimagecapture.h @@ -15,27 +15,35 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QImage; class QImageCapture; class QMediaCaptureSession; class QMediaMetaData; +class QMetaMethod; class QMetaObject; class QObject; class QSize; +class QTimerEvent; class QVideoFrame; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QImage QImage; typedef struct QImageCapture QImageCapture; typedef struct QMediaCaptureSession QMediaCaptureSession; typedef struct QMediaMetaData QMediaMetaData; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVideoFrame QVideoFrame; #endif -QImageCapture* QImageCapture_new(); -QImageCapture* QImageCapture_new2(QObject* parent); +void QImageCapture_new(QImageCapture** outptr_QImageCapture, QObject** outptr_QObject); +void QImageCapture_new2(QObject* parent, QImageCapture** outptr_QImageCapture, QObject** outptr_QObject); QMetaObject* QImageCapture_MetaObject(const QImageCapture* self); void* QImageCapture_Metacast(QImageCapture* self, const char* param1); struct miqt_string QImageCapture_Tr(const char* s); @@ -86,7 +94,21 @@ void QImageCapture_connect_ImageSaved(QImageCapture* self, intptr_t slot); struct miqt_string QImageCapture_Tr2(const char* s, const char* c); struct miqt_string QImageCapture_Tr3(const char* s, const char* c, int n); int QImageCapture_CaptureToFile1(QImageCapture* self, struct miqt_string location); -void QImageCapture_Delete(QImageCapture* self); +void QImageCapture_override_virtual_Event(void* self, intptr_t slot); +bool QImageCapture_virtualbase_Event(void* self, QEvent* event); +void QImageCapture_override_virtual_EventFilter(void* self, intptr_t slot); +bool QImageCapture_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QImageCapture_override_virtual_TimerEvent(void* self, intptr_t slot); +void QImageCapture_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QImageCapture_override_virtual_ChildEvent(void* self, intptr_t slot); +void QImageCapture_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QImageCapture_override_virtual_CustomEvent(void* self, intptr_t slot); +void QImageCapture_virtualbase_CustomEvent(void* self, QEvent* event); +void QImageCapture_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QImageCapture_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QImageCapture_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QImageCapture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QImageCapture_Delete(QImageCapture* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediacapturesession.cpp b/qt6/multimedia/gen_qmediacapturesession.cpp index 437918f6..efdb98d1 100644 --- a/qt6/multimedia/gen_qmediacapturesession.cpp +++ b/qt6/multimedia/gen_qmediacapturesession.cpp @@ -1,25 +1,214 @@ #include #include #include +#include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qmediacapturesession.h" #include "_cgo_export.h" -QMediaCaptureSession* QMediaCaptureSession_new() { - return new QMediaCaptureSession(); +class MiqtVirtualQMediaCaptureSession : public virtual QMediaCaptureSession { +public: + + MiqtVirtualQMediaCaptureSession(): QMediaCaptureSession() {}; + MiqtVirtualQMediaCaptureSession(QObject* parent): QMediaCaptureSession(parent) {}; + + virtual ~MiqtVirtualQMediaCaptureSession() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMediaCaptureSession::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMediaCaptureSession_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMediaCaptureSession::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMediaCaptureSession::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMediaCaptureSession_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMediaCaptureSession::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMediaCaptureSession::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMediaCaptureSession_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMediaCaptureSession::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMediaCaptureSession::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMediaCaptureSession_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMediaCaptureSession::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMediaCaptureSession::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMediaCaptureSession_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMediaCaptureSession::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMediaCaptureSession::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaCaptureSession_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMediaCaptureSession::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMediaCaptureSession::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaCaptureSession_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMediaCaptureSession::disconnectNotify(*signal); + + } + +}; + +void QMediaCaptureSession_new(QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject) { + MiqtVirtualQMediaCaptureSession* ret = new MiqtVirtualQMediaCaptureSession(); + *outptr_QMediaCaptureSession = ret; + *outptr_QObject = static_cast(ret); } -QMediaCaptureSession* QMediaCaptureSession_new2(QObject* parent) { - return new QMediaCaptureSession(parent); +void QMediaCaptureSession_new2(QObject* parent, QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject) { + MiqtVirtualQMediaCaptureSession* ret = new MiqtVirtualQMediaCaptureSession(parent); + *outptr_QMediaCaptureSession = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMediaCaptureSession_MetaObject(const QMediaCaptureSession* self) { @@ -102,7 +291,7 @@ void QMediaCaptureSession_AudioInputChanged(QMediaCaptureSession* self) { } void QMediaCaptureSession_connect_AudioInputChanged(QMediaCaptureSession* self, intptr_t slot) { - QMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::audioInputChanged), self, [=]() { + MiqtVirtualQMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::audioInputChanged), self, [=]() { miqt_exec_callback_QMediaCaptureSession_AudioInputChanged(slot); }); } @@ -112,7 +301,7 @@ void QMediaCaptureSession_CameraChanged(QMediaCaptureSession* self) { } void QMediaCaptureSession_connect_CameraChanged(QMediaCaptureSession* self, intptr_t slot) { - QMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::cameraChanged), self, [=]() { + MiqtVirtualQMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::cameraChanged), self, [=]() { miqt_exec_callback_QMediaCaptureSession_CameraChanged(slot); }); } @@ -122,7 +311,7 @@ void QMediaCaptureSession_ImageCaptureChanged(QMediaCaptureSession* self) { } void QMediaCaptureSession_connect_ImageCaptureChanged(QMediaCaptureSession* self, intptr_t slot) { - QMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::imageCaptureChanged), self, [=]() { + MiqtVirtualQMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::imageCaptureChanged), self, [=]() { miqt_exec_callback_QMediaCaptureSession_ImageCaptureChanged(slot); }); } @@ -132,7 +321,7 @@ void QMediaCaptureSession_RecorderChanged(QMediaCaptureSession* self) { } void QMediaCaptureSession_connect_RecorderChanged(QMediaCaptureSession* self, intptr_t slot) { - QMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::recorderChanged), self, [=]() { + MiqtVirtualQMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::recorderChanged), self, [=]() { miqt_exec_callback_QMediaCaptureSession_RecorderChanged(slot); }); } @@ -142,7 +331,7 @@ void QMediaCaptureSession_VideoOutputChanged(QMediaCaptureSession* self) { } void QMediaCaptureSession_connect_VideoOutputChanged(QMediaCaptureSession* self, intptr_t slot) { - QMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::videoOutputChanged), self, [=]() { + MiqtVirtualQMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::videoOutputChanged), self, [=]() { miqt_exec_callback_QMediaCaptureSession_VideoOutputChanged(slot); }); } @@ -152,7 +341,7 @@ void QMediaCaptureSession_AudioOutputChanged(QMediaCaptureSession* self) { } void QMediaCaptureSession_connect_AudioOutputChanged(QMediaCaptureSession* self, intptr_t slot) { - QMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::audioOutputChanged), self, [=]() { + MiqtVirtualQMediaCaptureSession::connect(self, static_cast(&QMediaCaptureSession::audioOutputChanged), self, [=]() { miqt_exec_callback_QMediaCaptureSession_AudioOutputChanged(slot); }); } @@ -179,7 +368,67 @@ struct miqt_string QMediaCaptureSession_Tr3(const char* s, const char* c, int n) return _ms; } -void QMediaCaptureSession_Delete(QMediaCaptureSession* self) { - delete self; +void QMediaCaptureSession_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__Event = slot; +} + +bool QMediaCaptureSession_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_Event(event); +} + +void QMediaCaptureSession_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__EventFilter = slot; +} + +bool QMediaCaptureSession_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMediaCaptureSession_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__TimerEvent = slot; +} + +void QMediaCaptureSession_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_TimerEvent(event); +} + +void QMediaCaptureSession_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__ChildEvent = slot; +} + +void QMediaCaptureSession_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_ChildEvent(event); +} + +void QMediaCaptureSession_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__CustomEvent = slot; +} + +void QMediaCaptureSession_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_CustomEvent(event); +} + +void QMediaCaptureSession_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__ConnectNotify = slot; +} + +void QMediaCaptureSession_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMediaCaptureSession_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaCaptureSession*)(self) )->handle__DisconnectNotify = slot; +} + +void QMediaCaptureSession_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaCaptureSession*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMediaCaptureSession_Delete(QMediaCaptureSession* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediacapturesession.go b/qt6/multimedia/gen_qmediacapturesession.go index fcc9a325..f5fd6d07 100644 --- a/qt6/multimedia/gen_qmediacapturesession.go +++ b/qt6/multimedia/gen_qmediacapturesession.go @@ -16,7 +16,8 @@ import ( ) type QMediaCaptureSession struct { - h *C.QMediaCaptureSession + h *C.QMediaCaptureSession + isSubclass bool *qt6.QObject } @@ -34,27 +35,45 @@ func (this *QMediaCaptureSession) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaCaptureSession(h *C.QMediaCaptureSession) *QMediaCaptureSession { +// newQMediaCaptureSession constructs the type using only CGO pointers. +func newQMediaCaptureSession(h *C.QMediaCaptureSession, h_QObject *C.QObject) *QMediaCaptureSession { if h == nil { return nil } - return &QMediaCaptureSession{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaCaptureSession{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaCaptureSession(h unsafe.Pointer) *QMediaCaptureSession { - return newQMediaCaptureSession((*C.QMediaCaptureSession)(h)) +// UnsafeNewQMediaCaptureSession constructs the type using only unsafe pointers. +func UnsafeNewQMediaCaptureSession(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaCaptureSession { + if h == nil { + return nil + } + + return &QMediaCaptureSession{h: (*C.QMediaCaptureSession)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQMediaCaptureSession constructs a new QMediaCaptureSession object. func NewQMediaCaptureSession() *QMediaCaptureSession { - ret := C.QMediaCaptureSession_new() - return newQMediaCaptureSession(ret) + var outptr_QMediaCaptureSession *C.QMediaCaptureSession = nil + var outptr_QObject *C.QObject = nil + + C.QMediaCaptureSession_new(&outptr_QMediaCaptureSession, &outptr_QObject) + ret := newQMediaCaptureSession(outptr_QMediaCaptureSession, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMediaCaptureSession2 constructs a new QMediaCaptureSession object. func NewQMediaCaptureSession2(parent *qt6.QObject) *QMediaCaptureSession { - ret := C.QMediaCaptureSession_new2((*C.QObject)(parent.UnsafePointer())) - return newQMediaCaptureSession(ret) + var outptr_QMediaCaptureSession *C.QMediaCaptureSession = nil + var outptr_QObject *C.QObject = nil + + C.QMediaCaptureSession_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaCaptureSession, &outptr_QObject) + ret := newQMediaCaptureSession(outptr_QMediaCaptureSession, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMediaCaptureSession) MetaObject() *qt6.QMetaObject { @@ -77,7 +96,7 @@ func QMediaCaptureSession_Tr(s string) string { } func (this *QMediaCaptureSession) AudioInput() *QAudioInput { - return UnsafeNewQAudioInput(unsafe.Pointer(C.QMediaCaptureSession_AudioInput(this.h))) + return UnsafeNewQAudioInput(unsafe.Pointer(C.QMediaCaptureSession_AudioInput(this.h)), nil) } func (this *QMediaCaptureSession) SetAudioInput(input *QAudioInput) { @@ -85,7 +104,7 @@ func (this *QMediaCaptureSession) SetAudioInput(input *QAudioInput) { } func (this *QMediaCaptureSession) Camera() *QCamera { - return UnsafeNewQCamera(unsafe.Pointer(C.QMediaCaptureSession_Camera(this.h))) + return UnsafeNewQCamera(unsafe.Pointer(C.QMediaCaptureSession_Camera(this.h)), nil) } func (this *QMediaCaptureSession) SetCamera(camera *QCamera) { @@ -93,7 +112,7 @@ func (this *QMediaCaptureSession) SetCamera(camera *QCamera) { } func (this *QMediaCaptureSession) ImageCapture() *QImageCapture { - return UnsafeNewQImageCapture(unsafe.Pointer(C.QMediaCaptureSession_ImageCapture(this.h))) + return UnsafeNewQImageCapture(unsafe.Pointer(C.QMediaCaptureSession_ImageCapture(this.h)), nil) } func (this *QMediaCaptureSession) SetImageCapture(imageCapture *QImageCapture) { @@ -101,7 +120,7 @@ func (this *QMediaCaptureSession) SetImageCapture(imageCapture *QImageCapture) { } func (this *QMediaCaptureSession) Recorder() *QMediaRecorder { - return UnsafeNewQMediaRecorder(unsafe.Pointer(C.QMediaCaptureSession_Recorder(this.h))) + return UnsafeNewQMediaRecorder(unsafe.Pointer(C.QMediaCaptureSession_Recorder(this.h)), nil) } func (this *QMediaCaptureSession) SetRecorder(recorder *QMediaRecorder) { @@ -121,7 +140,7 @@ func (this *QMediaCaptureSession) SetVideoSink(sink *QVideoSink) { } func (this *QMediaCaptureSession) VideoSink() *QVideoSink { - return UnsafeNewQVideoSink(unsafe.Pointer(C.QMediaCaptureSession_VideoSink(this.h))) + return UnsafeNewQVideoSink(unsafe.Pointer(C.QMediaCaptureSession_VideoSink(this.h)), nil) } func (this *QMediaCaptureSession) SetAudioOutput(output *QAudioOutput) { @@ -129,7 +148,7 @@ func (this *QMediaCaptureSession) SetAudioOutput(output *QAudioOutput) { } func (this *QMediaCaptureSession) AudioOutput() *QAudioOutput { - return UnsafeNewQAudioOutput(unsafe.Pointer(C.QMediaCaptureSession_AudioOutput(this.h))) + return UnsafeNewQAudioOutput(unsafe.Pointer(C.QMediaCaptureSession_AudioOutput(this.h)), nil) } func (this *QMediaCaptureSession) AudioInputChanged() { @@ -256,9 +275,175 @@ func QMediaCaptureSession_Tr3(s string, c string, n int) string { return _ret } +func (this *QMediaCaptureSession) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QMediaCaptureSession_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaCaptureSession) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QMediaCaptureSession_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_Event +func miqt_exec_callback_QMediaCaptureSession_Event(self *C.QMediaCaptureSession, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaCaptureSession) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QMediaCaptureSession_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaCaptureSession) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QMediaCaptureSession_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_EventFilter +func miqt_exec_callback_QMediaCaptureSession_EventFilter(self *C.QMediaCaptureSession, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaCaptureSession) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QMediaCaptureSession_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QMediaCaptureSession) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QMediaCaptureSession_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_TimerEvent +func miqt_exec_callback_QMediaCaptureSession_TimerEvent(self *C.QMediaCaptureSession, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMediaCaptureSession) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QMediaCaptureSession_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QMediaCaptureSession) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QMediaCaptureSession_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_ChildEvent +func miqt_exec_callback_QMediaCaptureSession_ChildEvent(self *C.QMediaCaptureSession, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMediaCaptureSession) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QMediaCaptureSession_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QMediaCaptureSession) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QMediaCaptureSession_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_CustomEvent +func miqt_exec_callback_QMediaCaptureSession_CustomEvent(self *C.QMediaCaptureSession, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMediaCaptureSession) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaCaptureSession_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaCaptureSession) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaCaptureSession_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_ConnectNotify +func miqt_exec_callback_QMediaCaptureSession_ConnectNotify(self *C.QMediaCaptureSession, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMediaCaptureSession) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaCaptureSession_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaCaptureSession) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaCaptureSession_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaCaptureSession_DisconnectNotify +func miqt_exec_callback_QMediaCaptureSession_DisconnectNotify(self *C.QMediaCaptureSession, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMediaCaptureSession) Delete() { - C.QMediaCaptureSession_Delete(this.h) + C.QMediaCaptureSession_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediacapturesession.h b/qt6/multimedia/gen_qmediacapturesession.h index 31dc23cd..0b4c6361 100644 --- a/qt6/multimedia/gen_qmediacapturesession.h +++ b/qt6/multimedia/gen_qmediacapturesession.h @@ -18,26 +18,34 @@ extern "C" { class QAudioInput; class QAudioOutput; class QCamera; +class QChildEvent; +class QEvent; class QImageCapture; class QMediaCaptureSession; class QMediaRecorder; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVideoSink; #else typedef struct QAudioInput QAudioInput; typedef struct QAudioOutput QAudioOutput; typedef struct QCamera QCamera; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QImageCapture QImageCapture; typedef struct QMediaCaptureSession QMediaCaptureSession; typedef struct QMediaRecorder QMediaRecorder; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVideoSink QVideoSink; #endif -QMediaCaptureSession* QMediaCaptureSession_new(); -QMediaCaptureSession* QMediaCaptureSession_new2(QObject* parent); +void QMediaCaptureSession_new(QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject); +void QMediaCaptureSession_new2(QObject* parent, QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject); QMetaObject* QMediaCaptureSession_MetaObject(const QMediaCaptureSession* self); void* QMediaCaptureSession_Metacast(QMediaCaptureSession* self, const char* param1); struct miqt_string QMediaCaptureSession_Tr(const char* s); @@ -69,7 +77,21 @@ void QMediaCaptureSession_AudioOutputChanged(QMediaCaptureSession* self); void QMediaCaptureSession_connect_AudioOutputChanged(QMediaCaptureSession* self, intptr_t slot); struct miqt_string QMediaCaptureSession_Tr2(const char* s, const char* c); struct miqt_string QMediaCaptureSession_Tr3(const char* s, const char* c, int n); -void QMediaCaptureSession_Delete(QMediaCaptureSession* self); +void QMediaCaptureSession_override_virtual_Event(void* self, intptr_t slot); +bool QMediaCaptureSession_virtualbase_Event(void* self, QEvent* event); +void QMediaCaptureSession_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMediaCaptureSession_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMediaCaptureSession_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMediaCaptureSession_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMediaCaptureSession_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMediaCaptureSession_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMediaCaptureSession_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMediaCaptureSession_virtualbase_CustomEvent(void* self, QEvent* event); +void QMediaCaptureSession_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMediaCaptureSession_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMediaCaptureSession_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMediaCaptureSession_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMediaCaptureSession_Delete(QMediaCaptureSession* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediadevices.cpp b/qt6/multimedia/gen_qmediadevices.cpp index dde6efd3..3230fbf1 100644 --- a/qt6/multimedia/gen_qmediadevices.cpp +++ b/qt6/multimedia/gen_qmediadevices.cpp @@ -1,22 +1,211 @@ #include #include +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qmediadevices.h" #include "_cgo_export.h" -QMediaDevices* QMediaDevices_new() { - return new QMediaDevices(); +class MiqtVirtualQMediaDevices : public virtual QMediaDevices { +public: + + MiqtVirtualQMediaDevices(): QMediaDevices() {}; + MiqtVirtualQMediaDevices(QObject* parent): QMediaDevices(parent) {}; + + virtual ~MiqtVirtualQMediaDevices() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMediaDevices::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMediaDevices_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMediaDevices::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMediaDevices::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMediaDevices_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMediaDevices::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMediaDevices::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMediaDevices_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMediaDevices::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMediaDevices::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMediaDevices_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMediaDevices::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMediaDevices::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMediaDevices_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMediaDevices::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMediaDevices::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaDevices_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMediaDevices::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMediaDevices::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaDevices_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMediaDevices::disconnectNotify(*signal); + + } + +}; + +void QMediaDevices_new(QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject) { + MiqtVirtualQMediaDevices* ret = new MiqtVirtualQMediaDevices(); + *outptr_QMediaDevices = ret; + *outptr_QObject = static_cast(ret); } -QMediaDevices* QMediaDevices_new2(QObject* parent) { - return new QMediaDevices(parent); +void QMediaDevices_new2(QObject* parent, QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject) { + MiqtVirtualQMediaDevices* ret = new MiqtVirtualQMediaDevices(parent); + *outptr_QMediaDevices = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMediaDevices_MetaObject(const QMediaDevices* self) { @@ -94,7 +283,7 @@ void QMediaDevices_AudioInputsChanged(QMediaDevices* self) { } void QMediaDevices_connect_AudioInputsChanged(QMediaDevices* self, intptr_t slot) { - QMediaDevices::connect(self, static_cast(&QMediaDevices::audioInputsChanged), self, [=]() { + MiqtVirtualQMediaDevices::connect(self, static_cast(&QMediaDevices::audioInputsChanged), self, [=]() { miqt_exec_callback_QMediaDevices_AudioInputsChanged(slot); }); } @@ -104,7 +293,7 @@ void QMediaDevices_AudioOutputsChanged(QMediaDevices* self) { } void QMediaDevices_connect_AudioOutputsChanged(QMediaDevices* self, intptr_t slot) { - QMediaDevices::connect(self, static_cast(&QMediaDevices::audioOutputsChanged), self, [=]() { + MiqtVirtualQMediaDevices::connect(self, static_cast(&QMediaDevices::audioOutputsChanged), self, [=]() { miqt_exec_callback_QMediaDevices_AudioOutputsChanged(slot); }); } @@ -114,7 +303,7 @@ void QMediaDevices_VideoInputsChanged(QMediaDevices* self) { } void QMediaDevices_connect_VideoInputsChanged(QMediaDevices* self, intptr_t slot) { - QMediaDevices::connect(self, static_cast(&QMediaDevices::videoInputsChanged), self, [=]() { + MiqtVirtualQMediaDevices::connect(self, static_cast(&QMediaDevices::videoInputsChanged), self, [=]() { miqt_exec_callback_QMediaDevices_VideoInputsChanged(slot); }); } @@ -141,7 +330,67 @@ struct miqt_string QMediaDevices_Tr3(const char* s, const char* c, int n) { return _ms; } -void QMediaDevices_Delete(QMediaDevices* self) { - delete self; +void QMediaDevices_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__Event = slot; +} + +bool QMediaDevices_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_Event(event); +} + +void QMediaDevices_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__EventFilter = slot; +} + +bool QMediaDevices_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMediaDevices_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__TimerEvent = slot; +} + +void QMediaDevices_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_TimerEvent(event); +} + +void QMediaDevices_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__ChildEvent = slot; +} + +void QMediaDevices_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_ChildEvent(event); +} + +void QMediaDevices_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__CustomEvent = slot; +} + +void QMediaDevices_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_CustomEvent(event); +} + +void QMediaDevices_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__ConnectNotify = slot; +} + +void QMediaDevices_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMediaDevices_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaDevices*)(self) )->handle__DisconnectNotify = slot; +} + +void QMediaDevices_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaDevices*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMediaDevices_Delete(QMediaDevices* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediadevices.go b/qt6/multimedia/gen_qmediadevices.go index 194a5824..5617190e 100644 --- a/qt6/multimedia/gen_qmediadevices.go +++ b/qt6/multimedia/gen_qmediadevices.go @@ -16,7 +16,8 @@ import ( ) type QMediaDevices struct { - h *C.QMediaDevices + h *C.QMediaDevices + isSubclass bool *qt6.QObject } @@ -34,27 +35,45 @@ func (this *QMediaDevices) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaDevices(h *C.QMediaDevices) *QMediaDevices { +// newQMediaDevices constructs the type using only CGO pointers. +func newQMediaDevices(h *C.QMediaDevices, h_QObject *C.QObject) *QMediaDevices { if h == nil { return nil } - return &QMediaDevices{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaDevices{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaDevices(h unsafe.Pointer) *QMediaDevices { - return newQMediaDevices((*C.QMediaDevices)(h)) +// UnsafeNewQMediaDevices constructs the type using only unsafe pointers. +func UnsafeNewQMediaDevices(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaDevices { + if h == nil { + return nil + } + + return &QMediaDevices{h: (*C.QMediaDevices)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQMediaDevices constructs a new QMediaDevices object. func NewQMediaDevices() *QMediaDevices { - ret := C.QMediaDevices_new() - return newQMediaDevices(ret) + var outptr_QMediaDevices *C.QMediaDevices = nil + var outptr_QObject *C.QObject = nil + + C.QMediaDevices_new(&outptr_QMediaDevices, &outptr_QObject) + ret := newQMediaDevices(outptr_QMediaDevices, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMediaDevices2 constructs a new QMediaDevices object. func NewQMediaDevices2(parent *qt6.QObject) *QMediaDevices { - ret := C.QMediaDevices_new2((*C.QObject)(parent.UnsafePointer())) - return newQMediaDevices(ret) + var outptr_QMediaDevices *C.QMediaDevices = nil + var outptr_QObject *C.QObject = nil + + C.QMediaDevices_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaDevices, &outptr_QObject) + ret := newQMediaDevices(outptr_QMediaDevices, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMediaDevices) MetaObject() *qt6.QMetaObject { @@ -209,9 +228,175 @@ func QMediaDevices_Tr3(s string, c string, n int) string { return _ret } +func (this *QMediaDevices) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QMediaDevices_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaDevices) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QMediaDevices_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_Event +func miqt_exec_callback_QMediaDevices_Event(self *C.QMediaDevices, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaDevices{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaDevices) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QMediaDevices_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaDevices) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QMediaDevices_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_EventFilter +func miqt_exec_callback_QMediaDevices_EventFilter(self *C.QMediaDevices, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaDevices{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaDevices) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QMediaDevices_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QMediaDevices) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QMediaDevices_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_TimerEvent +func miqt_exec_callback_QMediaDevices_TimerEvent(self *C.QMediaDevices, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaDevices{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMediaDevices) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QMediaDevices_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QMediaDevices) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QMediaDevices_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_ChildEvent +func miqt_exec_callback_QMediaDevices_ChildEvent(self *C.QMediaDevices, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaDevices{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMediaDevices) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QMediaDevices_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QMediaDevices) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QMediaDevices_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_CustomEvent +func miqt_exec_callback_QMediaDevices_CustomEvent(self *C.QMediaDevices, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMediaDevices{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMediaDevices) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaDevices_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaDevices) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaDevices_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_ConnectNotify +func miqt_exec_callback_QMediaDevices_ConnectNotify(self *C.QMediaDevices, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaDevices{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMediaDevices) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaDevices_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaDevices) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaDevices_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaDevices_DisconnectNotify +func miqt_exec_callback_QMediaDevices_DisconnectNotify(self *C.QMediaDevices, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaDevices{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMediaDevices) Delete() { - C.QMediaDevices_Delete(this.h) + C.QMediaDevices_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediadevices.h b/qt6/multimedia/gen_qmediadevices.h index 874437df..964b4741 100644 --- a/qt6/multimedia/gen_qmediadevices.h +++ b/qt6/multimedia/gen_qmediadevices.h @@ -17,19 +17,27 @@ extern "C" { #ifdef __cplusplus class QAudioDevice; class QCameraDevice; +class QChildEvent; +class QEvent; class QMediaDevices; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDevice QAudioDevice; typedef struct QCameraDevice QCameraDevice; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QMediaDevices QMediaDevices; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QMediaDevices* QMediaDevices_new(); -QMediaDevices* QMediaDevices_new2(QObject* parent); +void QMediaDevices_new(QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject); +void QMediaDevices_new2(QObject* parent, QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject); QMetaObject* QMediaDevices_MetaObject(const QMediaDevices* self); void* QMediaDevices_Metacast(QMediaDevices* self, const char* param1); struct miqt_string QMediaDevices_Tr(const char* s); @@ -47,7 +55,21 @@ void QMediaDevices_VideoInputsChanged(QMediaDevices* self); void QMediaDevices_connect_VideoInputsChanged(QMediaDevices* self, intptr_t slot); struct miqt_string QMediaDevices_Tr2(const char* s, const char* c); struct miqt_string QMediaDevices_Tr3(const char* s, const char* c, int n); -void QMediaDevices_Delete(QMediaDevices* self); +void QMediaDevices_override_virtual_Event(void* self, intptr_t slot); +bool QMediaDevices_virtualbase_Event(void* self, QEvent* event); +void QMediaDevices_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMediaDevices_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMediaDevices_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMediaDevices_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMediaDevices_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMediaDevices_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMediaDevices_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMediaDevices_virtualbase_CustomEvent(void* self, QEvent* event); +void QMediaDevices_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMediaDevices_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMediaDevices_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMediaDevices_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMediaDevices_Delete(QMediaDevices* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediaformat.cpp b/qt6/multimedia/gen_qmediaformat.cpp index ea91474f..e4c85be7 100644 --- a/qt6/multimedia/gen_qmediaformat.cpp +++ b/qt6/multimedia/gen_qmediaformat.cpp @@ -8,16 +8,19 @@ #include "gen_qmediaformat.h" #include "_cgo_export.h" -QMediaFormat* QMediaFormat_new() { - return new QMediaFormat(); +void QMediaFormat_new(QMediaFormat** outptr_QMediaFormat) { + QMediaFormat* ret = new QMediaFormat(); + *outptr_QMediaFormat = ret; } -QMediaFormat* QMediaFormat_new2(QMediaFormat* other) { - return new QMediaFormat(*other); +void QMediaFormat_new2(QMediaFormat* other, QMediaFormat** outptr_QMediaFormat) { + QMediaFormat* ret = new QMediaFormat(*other); + *outptr_QMediaFormat = ret; } -QMediaFormat* QMediaFormat_new3(int format) { - return new QMediaFormat(static_cast(format)); +void QMediaFormat_new3(int format, QMediaFormat** outptr_QMediaFormat) { + QMediaFormat* ret = new QMediaFormat(static_cast(format)); + *outptr_QMediaFormat = ret; } void QMediaFormat_OperatorAssign(QMediaFormat* self, QMediaFormat* other) { @@ -183,7 +186,11 @@ void QMediaFormat_ResolveForEncoding(QMediaFormat* self, int flags) { self->resolveForEncoding(static_cast(flags)); } -void QMediaFormat_Delete(QMediaFormat* self) { - delete self; +void QMediaFormat_Delete(QMediaFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediaformat.go b/qt6/multimedia/gen_qmediaformat.go index 3cc2c095..335ab3fc 100644 --- a/qt6/multimedia/gen_qmediaformat.go +++ b/qt6/multimedia/gen_qmediaformat.go @@ -85,7 +85,8 @@ const ( ) type QMediaFormat struct { - h *C.QMediaFormat + h *C.QMediaFormat + isSubclass bool } func (this *QMediaFormat) cPointer() *C.QMediaFormat { @@ -102,6 +103,7 @@ func (this *QMediaFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaFormat constructs the type using only CGO pointers. func newQMediaFormat(h *C.QMediaFormat) *QMediaFormat { if h == nil { return nil @@ -109,26 +111,43 @@ func newQMediaFormat(h *C.QMediaFormat) *QMediaFormat { return &QMediaFormat{h: h} } +// UnsafeNewQMediaFormat constructs the type using only unsafe pointers. func UnsafeNewQMediaFormat(h unsafe.Pointer) *QMediaFormat { - return newQMediaFormat((*C.QMediaFormat)(h)) + if h == nil { + return nil + } + + return &QMediaFormat{h: (*C.QMediaFormat)(h)} } // NewQMediaFormat constructs a new QMediaFormat object. func NewQMediaFormat() *QMediaFormat { - ret := C.QMediaFormat_new() - return newQMediaFormat(ret) + var outptr_QMediaFormat *C.QMediaFormat = nil + + C.QMediaFormat_new(&outptr_QMediaFormat) + ret := newQMediaFormat(outptr_QMediaFormat) + ret.isSubclass = true + return ret } // NewQMediaFormat2 constructs a new QMediaFormat object. func NewQMediaFormat2(other *QMediaFormat) *QMediaFormat { - ret := C.QMediaFormat_new2(other.cPointer()) - return newQMediaFormat(ret) + var outptr_QMediaFormat *C.QMediaFormat = nil + + C.QMediaFormat_new2(other.cPointer(), &outptr_QMediaFormat) + ret := newQMediaFormat(outptr_QMediaFormat) + ret.isSubclass = true + return ret } // NewQMediaFormat3 constructs a new QMediaFormat object. func NewQMediaFormat3(format QMediaFormat__FileFormat) *QMediaFormat { - ret := C.QMediaFormat_new3((C.int)(format)) - return newQMediaFormat(ret) + var outptr_QMediaFormat *C.QMediaFormat = nil + + C.QMediaFormat_new3((C.int)(format), &outptr_QMediaFormat) + ret := newQMediaFormat(outptr_QMediaFormat) + ret.isSubclass = true + return ret } func (this *QMediaFormat) OperatorAssign(other *QMediaFormat) { @@ -260,7 +279,7 @@ func (this *QMediaFormat) ResolveForEncoding(flags QMediaFormat__ResolveFlags) { // Delete this object from C++ memory. func (this *QMediaFormat) Delete() { - C.QMediaFormat_Delete(this.h) + C.QMediaFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediaformat.h b/qt6/multimedia/gen_qmediaformat.h index 12636c32..83b069a4 100644 --- a/qt6/multimedia/gen_qmediaformat.h +++ b/qt6/multimedia/gen_qmediaformat.h @@ -22,9 +22,9 @@ typedef struct QMediaFormat QMediaFormat; typedef struct QMimeType QMimeType; #endif -QMediaFormat* QMediaFormat_new(); -QMediaFormat* QMediaFormat_new2(QMediaFormat* other); -QMediaFormat* QMediaFormat_new3(int format); +void QMediaFormat_new(QMediaFormat** outptr_QMediaFormat); +void QMediaFormat_new2(QMediaFormat* other, QMediaFormat** outptr_QMediaFormat); +void QMediaFormat_new3(int format, QMediaFormat** outptr_QMediaFormat); void QMediaFormat_OperatorAssign(QMediaFormat* self, QMediaFormat* other); void QMediaFormat_Swap(QMediaFormat* self, QMediaFormat* other); int QMediaFormat_FileFormat(const QMediaFormat* self); @@ -47,7 +47,7 @@ struct miqt_string QMediaFormat_VideoCodecDescription(int codec); bool QMediaFormat_OperatorEqual(const QMediaFormat* self, QMediaFormat* other); bool QMediaFormat_OperatorNotEqual(const QMediaFormat* self, QMediaFormat* other); void QMediaFormat_ResolveForEncoding(QMediaFormat* self, int flags); -void QMediaFormat_Delete(QMediaFormat* self); +void QMediaFormat_Delete(QMediaFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediametadata.cpp b/qt6/multimedia/gen_qmediametadata.cpp index deda9c3d..6f44befa 100644 --- a/qt6/multimedia/gen_qmediametadata.cpp +++ b/qt6/multimedia/gen_qmediametadata.cpp @@ -8,12 +8,14 @@ #include "gen_qmediametadata.h" #include "_cgo_export.h" -QMediaMetaData* QMediaMetaData_new(QMediaMetaData* param1) { - return new QMediaMetaData(*param1); +void QMediaMetaData_new(QMediaMetaData* param1, QMediaMetaData** outptr_QMediaMetaData) { + QMediaMetaData* ret = new QMediaMetaData(*param1); + *outptr_QMediaMetaData = ret; } -QMediaMetaData* QMediaMetaData_new2() { - return new QMediaMetaData(); +void QMediaMetaData_new2(QMediaMetaData** outptr_QMediaMetaData) { + QMediaMetaData* ret = new QMediaMetaData(); + *outptr_QMediaMetaData = ret; } QVariant* QMediaMetaData_Value(const QMediaMetaData* self, int k) { @@ -78,7 +80,11 @@ struct miqt_string QMediaMetaData_MetaDataKeyToString(int k) { return _ms; } -void QMediaMetaData_Delete(QMediaMetaData* self) { - delete self; +void QMediaMetaData_Delete(QMediaMetaData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediametadata.go b/qt6/multimedia/gen_qmediametadata.go index 1726fb9b..dca8c434 100644 --- a/qt6/multimedia/gen_qmediametadata.go +++ b/qt6/multimedia/gen_qmediametadata.go @@ -48,7 +48,8 @@ const ( ) type QMediaMetaData struct { - h *C.QMediaMetaData + h *C.QMediaMetaData + isSubclass bool } func (this *QMediaMetaData) cPointer() *C.QMediaMetaData { @@ -65,6 +66,7 @@ func (this *QMediaMetaData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaMetaData constructs the type using only CGO pointers. func newQMediaMetaData(h *C.QMediaMetaData) *QMediaMetaData { if h == nil { return nil @@ -72,20 +74,33 @@ func newQMediaMetaData(h *C.QMediaMetaData) *QMediaMetaData { return &QMediaMetaData{h: h} } +// UnsafeNewQMediaMetaData constructs the type using only unsafe pointers. func UnsafeNewQMediaMetaData(h unsafe.Pointer) *QMediaMetaData { - return newQMediaMetaData((*C.QMediaMetaData)(h)) + if h == nil { + return nil + } + + return &QMediaMetaData{h: (*C.QMediaMetaData)(h)} } // NewQMediaMetaData constructs a new QMediaMetaData object. func NewQMediaMetaData(param1 *QMediaMetaData) *QMediaMetaData { - ret := C.QMediaMetaData_new(param1.cPointer()) - return newQMediaMetaData(ret) + var outptr_QMediaMetaData *C.QMediaMetaData = nil + + C.QMediaMetaData_new(param1.cPointer(), &outptr_QMediaMetaData) + ret := newQMediaMetaData(outptr_QMediaMetaData) + ret.isSubclass = true + return ret } // NewQMediaMetaData2 constructs a new QMediaMetaData object. func NewQMediaMetaData2() *QMediaMetaData { - ret := C.QMediaMetaData_new2() - return newQMediaMetaData(ret) + var outptr_QMediaMetaData *C.QMediaMetaData = nil + + C.QMediaMetaData_new2(&outptr_QMediaMetaData) + ret := newQMediaMetaData(outptr_QMediaMetaData) + ret.isSubclass = true + return ret } func (this *QMediaMetaData) Value(k QMediaMetaData__Key) *qt6.QVariant { @@ -141,7 +156,7 @@ func QMediaMetaData_MetaDataKeyToString(k QMediaMetaData__Key) string { // Delete this object from C++ memory. func (this *QMediaMetaData) Delete() { - C.QMediaMetaData_Delete(this.h) + C.QMediaMetaData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediametadata.h b/qt6/multimedia/gen_qmediametadata.h index 51e00c8c..7e1f85be 100644 --- a/qt6/multimedia/gen_qmediametadata.h +++ b/qt6/multimedia/gen_qmediametadata.h @@ -22,8 +22,8 @@ typedef struct QMediaMetaData QMediaMetaData; typedef struct QVariant QVariant; #endif -QMediaMetaData* QMediaMetaData_new(QMediaMetaData* param1); -QMediaMetaData* QMediaMetaData_new2(); +void QMediaMetaData_new(QMediaMetaData* param1, QMediaMetaData** outptr_QMediaMetaData); +void QMediaMetaData_new2(QMediaMetaData** outptr_QMediaMetaData); QVariant* QMediaMetaData_Value(const QMediaMetaData* self, int k); void QMediaMetaData_Insert(QMediaMetaData* self, int k, QVariant* value); void QMediaMetaData_Remove(QMediaMetaData* self, int k); @@ -33,7 +33,7 @@ void QMediaMetaData_Clear(QMediaMetaData* self); bool QMediaMetaData_IsEmpty(const QMediaMetaData* self); struct miqt_string QMediaMetaData_StringValue(const QMediaMetaData* self, int k); struct miqt_string QMediaMetaData_MetaDataKeyToString(int k); -void QMediaMetaData_Delete(QMediaMetaData* self); +void QMediaMetaData_Delete(QMediaMetaData* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediaplayer.cpp b/qt6/multimedia/gen_qmediaplayer.cpp index 3f3653e2..ee57e527 100644 --- a/qt6/multimedia/gen_qmediaplayer.cpp +++ b/qt6/multimedia/gen_qmediaplayer.cpp @@ -1,26 +1,215 @@ #include +#include +#include #include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qmediaplayer.h" #include "_cgo_export.h" -QMediaPlayer* QMediaPlayer_new() { - return new QMediaPlayer(); +class MiqtVirtualQMediaPlayer : public virtual QMediaPlayer { +public: + + MiqtVirtualQMediaPlayer(): QMediaPlayer() {}; + MiqtVirtualQMediaPlayer(QObject* parent): QMediaPlayer(parent) {}; + + virtual ~MiqtVirtualQMediaPlayer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMediaPlayer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMediaPlayer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMediaPlayer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMediaPlayer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMediaPlayer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMediaPlayer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMediaPlayer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMediaPlayer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMediaPlayer::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMediaPlayer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMediaPlayer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMediaPlayer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMediaPlayer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMediaPlayer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMediaPlayer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMediaPlayer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaPlayer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMediaPlayer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMediaPlayer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaPlayer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMediaPlayer::disconnectNotify(*signal); + + } + +}; + +void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject) { + MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(); + *outptr_QMediaPlayer = ret; + *outptr_QObject = static_cast(ret); } -QMediaPlayer* QMediaPlayer_new2(QObject* parent) { - return new QMediaPlayer(parent); +void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject) { + MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(parent); + *outptr_QMediaPlayer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self) { @@ -247,7 +436,7 @@ void QMediaPlayer_SourceChanged(QMediaPlayer* self, QUrl* media) { } void QMediaPlayer_connect_SourceChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::sourceChanged), self, [=](const QUrl& media) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::sourceChanged), self, [=](const QUrl& media) { const QUrl& media_ret = media; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&media_ret); @@ -260,7 +449,7 @@ void QMediaPlayer_PlaybackStateChanged(QMediaPlayer* self, int newState) { } void QMediaPlayer_connect_PlaybackStateChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::playbackStateChanged), self, [=](QMediaPlayer::PlaybackState newState) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::playbackStateChanged), self, [=](QMediaPlayer::PlaybackState newState) { QMediaPlayer::PlaybackState newState_ret = newState; int sigval1 = static_cast(newState_ret); miqt_exec_callback_QMediaPlayer_PlaybackStateChanged(slot, sigval1); @@ -272,7 +461,7 @@ void QMediaPlayer_MediaStatusChanged(QMediaPlayer* self, int status) { } void QMediaPlayer_connect_MediaStatusChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::mediaStatusChanged), self, [=](QMediaPlayer::MediaStatus status) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::mediaStatusChanged), self, [=](QMediaPlayer::MediaStatus status) { QMediaPlayer::MediaStatus status_ret = status; int sigval1 = static_cast(status_ret); miqt_exec_callback_QMediaPlayer_MediaStatusChanged(slot, sigval1); @@ -284,7 +473,7 @@ void QMediaPlayer_DurationChanged(QMediaPlayer* self, long long duration) { } void QMediaPlayer_connect_DurationChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::durationChanged), self, [=](qint64 duration) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::durationChanged), self, [=](qint64 duration) { qint64 duration_ret = duration; long long sigval1 = static_cast(duration_ret); miqt_exec_callback_QMediaPlayer_DurationChanged(slot, sigval1); @@ -296,7 +485,7 @@ void QMediaPlayer_PositionChanged(QMediaPlayer* self, long long position) { } void QMediaPlayer_connect_PositionChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::positionChanged), self, [=](qint64 position) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::positionChanged), self, [=](qint64 position) { qint64 position_ret = position; long long sigval1 = static_cast(position_ret); miqt_exec_callback_QMediaPlayer_PositionChanged(slot, sigval1); @@ -308,7 +497,7 @@ void QMediaPlayer_HasAudioChanged(QMediaPlayer* self, bool available) { } void QMediaPlayer_connect_HasAudioChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::hasAudioChanged), self, [=](bool available) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::hasAudioChanged), self, [=](bool available) { bool sigval1 = available; miqt_exec_callback_QMediaPlayer_HasAudioChanged(slot, sigval1); }); @@ -319,7 +508,7 @@ void QMediaPlayer_HasVideoChanged(QMediaPlayer* self, bool videoAvailable) { } void QMediaPlayer_connect_HasVideoChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::hasVideoChanged), self, [=](bool videoAvailable) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::hasVideoChanged), self, [=](bool videoAvailable) { bool sigval1 = videoAvailable; miqt_exec_callback_QMediaPlayer_HasVideoChanged(slot, sigval1); }); @@ -330,7 +519,7 @@ void QMediaPlayer_BufferProgressChanged(QMediaPlayer* self, float progress) { } void QMediaPlayer_connect_BufferProgressChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::bufferProgressChanged), self, [=](float progress) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::bufferProgressChanged), self, [=](float progress) { float sigval1 = progress; miqt_exec_callback_QMediaPlayer_BufferProgressChanged(slot, sigval1); }); @@ -341,7 +530,7 @@ void QMediaPlayer_SeekableChanged(QMediaPlayer* self, bool seekable) { } void QMediaPlayer_connect_SeekableChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::seekableChanged), self, [=](bool seekable) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::seekableChanged), self, [=](bool seekable) { bool sigval1 = seekable; miqt_exec_callback_QMediaPlayer_SeekableChanged(slot, sigval1); }); @@ -352,7 +541,7 @@ void QMediaPlayer_PlaybackRateChanged(QMediaPlayer* self, double rate) { } void QMediaPlayer_connect_PlaybackRateChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::playbackRateChanged), self, [=](qreal rate) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::playbackRateChanged), self, [=](qreal rate) { qreal rate_ret = rate; double sigval1 = static_cast(rate_ret); miqt_exec_callback_QMediaPlayer_PlaybackRateChanged(slot, sigval1); @@ -364,7 +553,7 @@ void QMediaPlayer_LoopsChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_LoopsChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::loopsChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::loopsChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_LoopsChanged(slot); }); } @@ -374,7 +563,7 @@ void QMediaPlayer_MetaDataChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_MetaDataChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::metaDataChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::metaDataChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_MetaDataChanged(slot); }); } @@ -384,7 +573,7 @@ void QMediaPlayer_VideoOutputChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_VideoOutputChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::videoOutputChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::videoOutputChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_VideoOutputChanged(slot); }); } @@ -394,7 +583,7 @@ void QMediaPlayer_AudioOutputChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_AudioOutputChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::audioOutputChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::audioOutputChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_AudioOutputChanged(slot); }); } @@ -404,7 +593,7 @@ void QMediaPlayer_TracksChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_TracksChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::tracksChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::tracksChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_TracksChanged(slot); }); } @@ -414,7 +603,7 @@ void QMediaPlayer_ActiveTracksChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_ActiveTracksChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::activeTracksChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::activeTracksChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_ActiveTracksChanged(slot); }); } @@ -424,7 +613,7 @@ void QMediaPlayer_ErrorChanged(QMediaPlayer* self) { } void QMediaPlayer_connect_ErrorChanged(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::errorChanged), self, [=]() { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::errorChanged), self, [=]() { miqt_exec_callback_QMediaPlayer_ErrorChanged(slot); }); } @@ -435,7 +624,7 @@ void QMediaPlayer_ErrorOccurred(QMediaPlayer* self, int error, struct miqt_strin } void QMediaPlayer_connect_ErrorOccurred(QMediaPlayer* self, intptr_t slot) { - QMediaPlayer::connect(self, static_cast(&QMediaPlayer::errorOccurred), self, [=](QMediaPlayer::Error error, const QString& errorString) { + MiqtVirtualQMediaPlayer::connect(self, static_cast(&QMediaPlayer::errorOccurred), self, [=](QMediaPlayer::Error error, const QString& errorString) { QMediaPlayer::Error error_ret = error; int sigval1 = static_cast(error_ret); const QString errorString_ret = errorString; @@ -476,7 +665,67 @@ void QMediaPlayer_SetSourceDevice2(QMediaPlayer* self, QIODevice* device, QUrl* self->setSourceDevice(device, *sourceUrl); } -void QMediaPlayer_Delete(QMediaPlayer* self) { - delete self; +void QMediaPlayer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__Event = slot; +} + +bool QMediaPlayer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_Event(event); +} + +void QMediaPlayer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__EventFilter = slot; +} + +bool QMediaPlayer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMediaPlayer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__TimerEvent = slot; +} + +void QMediaPlayer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_TimerEvent(event); +} + +void QMediaPlayer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__ChildEvent = slot; +} + +void QMediaPlayer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_ChildEvent(event); +} + +void QMediaPlayer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__CustomEvent = slot; +} + +void QMediaPlayer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_CustomEvent(event); +} + +void QMediaPlayer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__ConnectNotify = slot; +} + +void QMediaPlayer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMediaPlayer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaPlayer*)(self) )->handle__DisconnectNotify = slot; +} + +void QMediaPlayer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaPlayer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMediaPlayer_Delete(QMediaPlayer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediaplayer.go b/qt6/multimedia/gen_qmediaplayer.go index fbb4da91..311889f2 100644 --- a/qt6/multimedia/gen_qmediaplayer.go +++ b/qt6/multimedia/gen_qmediaplayer.go @@ -54,7 +54,8 @@ const ( ) type QMediaPlayer struct { - h *C.QMediaPlayer + h *C.QMediaPlayer + isSubclass bool *qt6.QObject } @@ -72,27 +73,45 @@ func (this *QMediaPlayer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaPlayer(h *C.QMediaPlayer) *QMediaPlayer { +// newQMediaPlayer constructs the type using only CGO pointers. +func newQMediaPlayer(h *C.QMediaPlayer, h_QObject *C.QObject) *QMediaPlayer { if h == nil { return nil } - return &QMediaPlayer{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaPlayer{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaPlayer(h unsafe.Pointer) *QMediaPlayer { - return newQMediaPlayer((*C.QMediaPlayer)(h)) +// UnsafeNewQMediaPlayer constructs the type using only unsafe pointers. +func UnsafeNewQMediaPlayer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaPlayer { + if h == nil { + return nil + } + + return &QMediaPlayer{h: (*C.QMediaPlayer)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQMediaPlayer constructs a new QMediaPlayer object. func NewQMediaPlayer() *QMediaPlayer { - ret := C.QMediaPlayer_new() - return newQMediaPlayer(ret) + var outptr_QMediaPlayer *C.QMediaPlayer = nil + var outptr_QObject *C.QObject = nil + + C.QMediaPlayer_new(&outptr_QMediaPlayer, &outptr_QObject) + ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMediaPlayer2 constructs a new QMediaPlayer object. func NewQMediaPlayer2(parent *qt6.QObject) *QMediaPlayer { - ret := C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer())) - return newQMediaPlayer(ret) + var outptr_QMediaPlayer *C.QMediaPlayer = nil + var outptr_QObject *C.QObject = nil + + C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaPlayer, &outptr_QObject) + ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMediaPlayer) MetaObject() *qt6.QMetaObject { @@ -182,7 +201,7 @@ func (this *QMediaPlayer) SetAudioOutput(output *QAudioOutput) { } func (this *QMediaPlayer) AudioOutput() *QAudioOutput { - return UnsafeNewQAudioOutput(unsafe.Pointer(C.QMediaPlayer_AudioOutput(this.h))) + return UnsafeNewQAudioOutput(unsafe.Pointer(C.QMediaPlayer_AudioOutput(this.h)), nil) } func (this *QMediaPlayer) SetVideoOutput(videoOutput *qt6.QObject) { @@ -198,7 +217,7 @@ func (this *QMediaPlayer) SetVideoSink(sink *QVideoSink) { } func (this *QMediaPlayer) VideoSink() *QVideoSink { - return UnsafeNewQVideoSink(unsafe.Pointer(C.QMediaPlayer_VideoSink(this.h))) + return UnsafeNewQVideoSink(unsafe.Pointer(C.QMediaPlayer_VideoSink(this.h)), nil) } func (this *QMediaPlayer) Source() *qt6.QUrl { @@ -209,7 +228,7 @@ func (this *QMediaPlayer) Source() *qt6.QUrl { } func (this *QMediaPlayer) SourceDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_SourceDevice(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_SourceDevice(this.h)), nil, nil) } func (this *QMediaPlayer) PlaybackState() QMediaPlayer__PlaybackState { @@ -687,9 +706,175 @@ func (this *QMediaPlayer) SetSourceDevice2(device *qt6.QIODevice, sourceUrl *qt6 C.QMediaPlayer_SetSourceDevice2(this.h, (*C.QIODevice)(device.UnsafePointer()), (*C.QUrl)(sourceUrl.UnsafePointer())) } +func (this *QMediaPlayer) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QMediaPlayer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaPlayer) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QMediaPlayer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_Event +func miqt_exec_callback_QMediaPlayer_Event(self *C.QMediaPlayer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaPlayer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlayer) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QMediaPlayer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaPlayer) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QMediaPlayer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_EventFilter +func miqt_exec_callback_QMediaPlayer_EventFilter(self *C.QMediaPlayer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaPlayer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaPlayer) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QMediaPlayer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QMediaPlayer) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QMediaPlayer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_TimerEvent +func miqt_exec_callback_QMediaPlayer_TimerEvent(self *C.QMediaPlayer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaPlayer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMediaPlayer) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QMediaPlayer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QMediaPlayer) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QMediaPlayer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_ChildEvent +func miqt_exec_callback_QMediaPlayer_ChildEvent(self *C.QMediaPlayer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaPlayer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMediaPlayer) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QMediaPlayer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QMediaPlayer) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QMediaPlayer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_CustomEvent +func miqt_exec_callback_QMediaPlayer_CustomEvent(self *C.QMediaPlayer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMediaPlayer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMediaPlayer) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaPlayer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaPlayer) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaPlayer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_ConnectNotify +func miqt_exec_callback_QMediaPlayer_ConnectNotify(self *C.QMediaPlayer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaPlayer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMediaPlayer) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaPlayer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaPlayer) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaPlayer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaPlayer_DisconnectNotify +func miqt_exec_callback_QMediaPlayer_DisconnectNotify(self *C.QMediaPlayer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaPlayer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMediaPlayer) Delete() { - C.QMediaPlayer_Delete(this.h) + C.QMediaPlayer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediaplayer.h b/qt6/multimedia/gen_qmediaplayer.h index 6496fc02..83864116 100644 --- a/qt6/multimedia/gen_qmediaplayer.h +++ b/qt6/multimedia/gen_qmediaplayer.h @@ -16,28 +16,36 @@ extern "C" { #ifdef __cplusplus class QAudioOutput; +class QChildEvent; +class QEvent; class QIODevice; class QMediaMetaData; class QMediaPlayer; class QMediaTimeRange; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QUrl; class QVideoSink; #else typedef struct QAudioOutput QAudioOutput; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; typedef struct QMediaMetaData QMediaMetaData; typedef struct QMediaPlayer QMediaPlayer; typedef struct QMediaTimeRange QMediaTimeRange; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVideoSink QVideoSink; #endif -QMediaPlayer* QMediaPlayer_new(); -QMediaPlayer* QMediaPlayer_new2(QObject* parent); +void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject); +void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject); QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self); void* QMediaPlayer_Metacast(QMediaPlayer* self, const char* param1); struct miqt_string QMediaPlayer_Tr(const char* s); @@ -120,7 +128,21 @@ void QMediaPlayer_connect_ErrorOccurred(QMediaPlayer* self, intptr_t slot); struct miqt_string QMediaPlayer_Tr2(const char* s, const char* c); struct miqt_string QMediaPlayer_Tr3(const char* s, const char* c, int n); void QMediaPlayer_SetSourceDevice2(QMediaPlayer* self, QIODevice* device, QUrl* sourceUrl); -void QMediaPlayer_Delete(QMediaPlayer* self); +void QMediaPlayer_override_virtual_Event(void* self, intptr_t slot); +bool QMediaPlayer_virtualbase_Event(void* self, QEvent* event); +void QMediaPlayer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMediaPlayer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMediaPlayer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMediaPlayer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMediaPlayer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMediaPlayer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMediaPlayer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMediaPlayer_virtualbase_CustomEvent(void* self, QEvent* event); +void QMediaPlayer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMediaPlayer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMediaPlayer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMediaPlayer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMediaPlayer_Delete(QMediaPlayer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediarecorder.cpp b/qt6/multimedia/gen_qmediarecorder.cpp index 453a9706..38c6ee95 100644 --- a/qt6/multimedia/gen_qmediarecorder.cpp +++ b/qt6/multimedia/gen_qmediarecorder.cpp @@ -1,24 +1,213 @@ +#include +#include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qmediarecorder.h" #include "_cgo_export.h" -QMediaRecorder* QMediaRecorder_new() { - return new QMediaRecorder(); +class MiqtVirtualQMediaRecorder : public virtual QMediaRecorder { +public: + + MiqtVirtualQMediaRecorder(): QMediaRecorder() {}; + MiqtVirtualQMediaRecorder(QObject* parent): QMediaRecorder(parent) {}; + + virtual ~MiqtVirtualQMediaRecorder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QMediaRecorder::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QMediaRecorder_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QMediaRecorder::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QMediaRecorder::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QMediaRecorder_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QMediaRecorder::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QMediaRecorder::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QMediaRecorder_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QMediaRecorder::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QMediaRecorder::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QMediaRecorder_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QMediaRecorder::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QMediaRecorder::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QMediaRecorder_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QMediaRecorder::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QMediaRecorder::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaRecorder_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QMediaRecorder::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QMediaRecorder::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QMediaRecorder_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QMediaRecorder::disconnectNotify(*signal); + + } + +}; + +void QMediaRecorder_new(QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject) { + MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(); + *outptr_QMediaRecorder = ret; + *outptr_QObject = static_cast(ret); } -QMediaRecorder* QMediaRecorder_new2(QObject* parent) { - return new QMediaRecorder(parent); +void QMediaRecorder_new2(QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject) { + MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(parent); + *outptr_QMediaRecorder = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self) { @@ -194,7 +383,7 @@ void QMediaRecorder_RecorderStateChanged(QMediaRecorder* self, int state) { } void QMediaRecorder_connect_RecorderStateChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::recorderStateChanged), self, [=](QMediaRecorder::RecorderState state) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::recorderStateChanged), self, [=](QMediaRecorder::RecorderState state) { QMediaRecorder::RecorderState state_ret = state; int sigval1 = static_cast(state_ret); miqt_exec_callback_QMediaRecorder_RecorderStateChanged(slot, sigval1); @@ -206,7 +395,7 @@ void QMediaRecorder_DurationChanged(QMediaRecorder* self, long long duration) { } void QMediaRecorder_connect_DurationChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::durationChanged), self, [=](qint64 duration) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::durationChanged), self, [=](qint64 duration) { qint64 duration_ret = duration; long long sigval1 = static_cast(duration_ret); miqt_exec_callback_QMediaRecorder_DurationChanged(slot, sigval1); @@ -218,7 +407,7 @@ void QMediaRecorder_ActualLocationChanged(QMediaRecorder* self, QUrl* location) } void QMediaRecorder_connect_ActualLocationChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::actualLocationChanged), self, [=](const QUrl& location) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::actualLocationChanged), self, [=](const QUrl& location) { const QUrl& location_ret = location; // Cast returned reference into pointer QUrl* sigval1 = const_cast(&location_ret); @@ -231,7 +420,7 @@ void QMediaRecorder_EncoderSettingsChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_EncoderSettingsChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::encoderSettingsChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::encoderSettingsChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_EncoderSettingsChanged(slot); }); } @@ -242,7 +431,7 @@ void QMediaRecorder_ErrorOccurred(QMediaRecorder* self, int error, struct miqt_s } void QMediaRecorder_connect_ErrorOccurred(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::errorOccurred), self, [=](QMediaRecorder::Error error, const QString& errorString) { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::errorOccurred), self, [=](QMediaRecorder::Error error, const QString& errorString) { QMediaRecorder::Error error_ret = error; int sigval1 = static_cast(error_ret); const QString errorString_ret = errorString; @@ -262,7 +451,7 @@ void QMediaRecorder_ErrorChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_ErrorChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::errorChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::errorChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_ErrorChanged(slot); }); } @@ -272,7 +461,7 @@ void QMediaRecorder_MetaDataChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_MetaDataChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::metaDataChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_MetaDataChanged(slot); }); } @@ -282,7 +471,7 @@ void QMediaRecorder_MediaFormatChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_MediaFormatChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::mediaFormatChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::mediaFormatChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_MediaFormatChanged(slot); }); } @@ -292,7 +481,7 @@ void QMediaRecorder_EncodingModeChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_EncodingModeChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::encodingModeChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::encodingModeChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_EncodingModeChanged(slot); }); } @@ -302,7 +491,7 @@ void QMediaRecorder_QualityChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_QualityChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::qualityChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::qualityChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_QualityChanged(slot); }); } @@ -312,7 +501,7 @@ void QMediaRecorder_VideoResolutionChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_VideoResolutionChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::videoResolutionChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::videoResolutionChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_VideoResolutionChanged(slot); }); } @@ -322,7 +511,7 @@ void QMediaRecorder_VideoFrameRateChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_VideoFrameRateChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::videoFrameRateChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::videoFrameRateChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_VideoFrameRateChanged(slot); }); } @@ -332,7 +521,7 @@ void QMediaRecorder_VideoBitRateChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_VideoBitRateChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::videoBitRateChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::videoBitRateChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_VideoBitRateChanged(slot); }); } @@ -342,7 +531,7 @@ void QMediaRecorder_AudioBitRateChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_AudioBitRateChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::audioBitRateChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::audioBitRateChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_AudioBitRateChanged(slot); }); } @@ -352,7 +541,7 @@ void QMediaRecorder_AudioChannelCountChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_AudioChannelCountChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::audioChannelCountChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::audioChannelCountChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_AudioChannelCountChanged(slot); }); } @@ -362,7 +551,7 @@ void QMediaRecorder_AudioSampleRateChanged(QMediaRecorder* self) { } void QMediaRecorder_connect_AudioSampleRateChanged(QMediaRecorder* self, intptr_t slot) { - QMediaRecorder::connect(self, static_cast(&QMediaRecorder::audioSampleRateChanged), self, [=]() { + MiqtVirtualQMediaRecorder::connect(self, static_cast(&QMediaRecorder::audioSampleRateChanged), self, [=]() { miqt_exec_callback_QMediaRecorder_AudioSampleRateChanged(slot); }); } @@ -389,7 +578,67 @@ struct miqt_string QMediaRecorder_Tr3(const char* s, const char* c, int n) { return _ms; } -void QMediaRecorder_Delete(QMediaRecorder* self) { - delete self; +void QMediaRecorder_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__Event = slot; +} + +bool QMediaRecorder_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_Event(event); +} + +void QMediaRecorder_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__EventFilter = slot; +} + +bool QMediaRecorder_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QMediaRecorder_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__TimerEvent = slot; +} + +void QMediaRecorder_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_TimerEvent(event); +} + +void QMediaRecorder_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__ChildEvent = slot; +} + +void QMediaRecorder_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_ChildEvent(event); +} + +void QMediaRecorder_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__CustomEvent = slot; +} + +void QMediaRecorder_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_CustomEvent(event); +} + +void QMediaRecorder_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__ConnectNotify = slot; +} + +void QMediaRecorder_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QMediaRecorder_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QMediaRecorder*)(self) )->handle__DisconnectNotify = slot; +} + +void QMediaRecorder_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQMediaRecorder*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QMediaRecorder_Delete(QMediaRecorder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediarecorder.go b/qt6/multimedia/gen_qmediarecorder.go index 11d7768b..3345b714 100644 --- a/qt6/multimedia/gen_qmediarecorder.go +++ b/qt6/multimedia/gen_qmediarecorder.go @@ -53,7 +53,8 @@ const ( ) type QMediaRecorder struct { - h *C.QMediaRecorder + h *C.QMediaRecorder + isSubclass bool *qt6.QObject } @@ -71,27 +72,45 @@ func (this *QMediaRecorder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQMediaRecorder(h *C.QMediaRecorder) *QMediaRecorder { +// newQMediaRecorder constructs the type using only CGO pointers. +func newQMediaRecorder(h *C.QMediaRecorder, h_QObject *C.QObject) *QMediaRecorder { if h == nil { return nil } - return &QMediaRecorder{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QMediaRecorder{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQMediaRecorder(h unsafe.Pointer) *QMediaRecorder { - return newQMediaRecorder((*C.QMediaRecorder)(h)) +// UnsafeNewQMediaRecorder constructs the type using only unsafe pointers. +func UnsafeNewQMediaRecorder(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaRecorder { + if h == nil { + return nil + } + + return &QMediaRecorder{h: (*C.QMediaRecorder)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQMediaRecorder constructs a new QMediaRecorder object. func NewQMediaRecorder() *QMediaRecorder { - ret := C.QMediaRecorder_new() - return newQMediaRecorder(ret) + var outptr_QMediaRecorder *C.QMediaRecorder = nil + var outptr_QObject *C.QObject = nil + + C.QMediaRecorder_new(&outptr_QMediaRecorder, &outptr_QObject) + ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject) + ret.isSubclass = true + return ret } // NewQMediaRecorder2 constructs a new QMediaRecorder object. func NewQMediaRecorder2(parent *qt6.QObject) *QMediaRecorder { - ret := C.QMediaRecorder_new2((*C.QObject)(parent.UnsafePointer())) - return newQMediaRecorder(ret) + var outptr_QMediaRecorder *C.QMediaRecorder = nil + var outptr_QObject *C.QObject = nil + + C.QMediaRecorder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaRecorder, &outptr_QObject) + ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QMediaRecorder) MetaObject() *qt6.QMetaObject { @@ -252,7 +271,7 @@ func (this *QMediaRecorder) AddMetaData(metaData *QMediaMetaData) { } func (this *QMediaRecorder) CaptureSession() *QMediaCaptureSession { - return UnsafeNewQMediaCaptureSession(unsafe.Pointer(C.QMediaRecorder_CaptureSession(this.h))) + return UnsafeNewQMediaCaptureSession(unsafe.Pointer(C.QMediaRecorder_CaptureSession(this.h)), nil) } func (this *QMediaRecorder) Record() { @@ -582,9 +601,175 @@ func QMediaRecorder_Tr3(s string, c string, n int) string { return _ret } +func (this *QMediaRecorder) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QMediaRecorder_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaRecorder) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QMediaRecorder_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_Event +func miqt_exec_callback_QMediaRecorder_Event(self *C.QMediaRecorder, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaRecorder) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QMediaRecorder_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QMediaRecorder) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QMediaRecorder_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_EventFilter +func miqt_exec_callback_QMediaRecorder_EventFilter(self *C.QMediaRecorder, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QMediaRecorder) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QMediaRecorder_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QMediaRecorder) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QMediaRecorder_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_TimerEvent +func miqt_exec_callback_QMediaRecorder_TimerEvent(self *C.QMediaRecorder, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QMediaRecorder_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QMediaRecorder) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QMediaRecorder_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_ChildEvent +func miqt_exec_callback_QMediaRecorder_ChildEvent(self *C.QMediaRecorder, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QMediaRecorder_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QMediaRecorder) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QMediaRecorder_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_CustomEvent +func miqt_exec_callback_QMediaRecorder_CustomEvent(self *C.QMediaRecorder, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaRecorder_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaRecorder) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaRecorder_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_ConnectNotify +func miqt_exec_callback_QMediaRecorder_ConnectNotify(self *C.QMediaRecorder, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QMediaRecorder) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QMediaRecorder_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QMediaRecorder) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QMediaRecorder_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QMediaRecorder_DisconnectNotify +func miqt_exec_callback_QMediaRecorder_DisconnectNotify(self *C.QMediaRecorder, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QMediaRecorder{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QMediaRecorder) Delete() { - C.QMediaRecorder_Delete(this.h) + C.QMediaRecorder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediarecorder.h b/qt6/multimedia/gen_qmediarecorder.h index 6c984e04..58613972 100644 --- a/qt6/multimedia/gen_qmediarecorder.h +++ b/qt6/multimedia/gen_qmediarecorder.h @@ -15,27 +15,35 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QMediaCaptureSession; class QMediaFormat; class QMediaMetaData; class QMediaRecorder; +class QMetaMethod; class QMetaObject; class QObject; class QSize; +class QTimerEvent; class QUrl; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QMediaCaptureSession QMediaCaptureSession; typedef struct QMediaFormat QMediaFormat; typedef struct QMediaMetaData QMediaMetaData; typedef struct QMediaRecorder QMediaRecorder; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QMediaRecorder* QMediaRecorder_new(); -QMediaRecorder* QMediaRecorder_new2(QObject* parent); +void QMediaRecorder_new(QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject); +void QMediaRecorder_new2(QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject); QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self); void* QMediaRecorder_Metacast(QMediaRecorder* self, const char* param1); struct miqt_string QMediaRecorder_Tr(const char* s); @@ -107,7 +115,21 @@ void QMediaRecorder_AudioSampleRateChanged(QMediaRecorder* self); void QMediaRecorder_connect_AudioSampleRateChanged(QMediaRecorder* self, intptr_t slot); struct miqt_string QMediaRecorder_Tr2(const char* s, const char* c); struct miqt_string QMediaRecorder_Tr3(const char* s, const char* c, int n); -void QMediaRecorder_Delete(QMediaRecorder* self); +void QMediaRecorder_override_virtual_Event(void* self, intptr_t slot); +bool QMediaRecorder_virtualbase_Event(void* self, QEvent* event); +void QMediaRecorder_override_virtual_EventFilter(void* self, intptr_t slot); +bool QMediaRecorder_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QMediaRecorder_override_virtual_TimerEvent(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QMediaRecorder_override_virtual_ChildEvent(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QMediaRecorder_override_virtual_CustomEvent(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_CustomEvent(void* self, QEvent* event); +void QMediaRecorder_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QMediaRecorder_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QMediaRecorder_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QMediaRecorder_Delete(QMediaRecorder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qmediatimerange.cpp b/qt6/multimedia/gen_qmediatimerange.cpp index 0c51d6b8..01b92650 100644 --- a/qt6/multimedia/gen_qmediatimerange.cpp +++ b/qt6/multimedia/gen_qmediatimerange.cpp @@ -5,20 +5,24 @@ #include "gen_qmediatimerange.h" #include "_cgo_export.h" -QMediaTimeRange* QMediaTimeRange_new() { - return new QMediaTimeRange(); +void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(); + *outptr_QMediaTimeRange = ret; } -QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end) { - return new QMediaTimeRange(static_cast(start), static_cast(end)); +void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(static_cast(start), static_cast(end)); + *outptr_QMediaTimeRange = ret; } -QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeRange__Interval* param1) { - return new QMediaTimeRange(*param1); +void QMediaTimeRange_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(*param1); + *outptr_QMediaTimeRange = ret; } -QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal) { - return new QMediaTimeRange(*rangeVal); +void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange) { + QMediaTimeRange* ret = new QMediaTimeRange(*rangeVal); + *outptr_QMediaTimeRange = ret; } void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1) { @@ -124,20 +128,27 @@ void QMediaTimeRange_Clear(QMediaTimeRange* self) { self->clear(); } -void QMediaTimeRange_Delete(QMediaTimeRange* self) { - delete self; +void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QMediaTimeRange__Interval* QMediaTimeRange__Interval_new() { - return new QMediaTimeRange::Interval(); +void QMediaTimeRange__Interval_new(QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval) { + QMediaTimeRange::Interval* ret = new QMediaTimeRange::Interval(); + *outptr_QMediaTimeRange__Interval = ret; } -QMediaTimeRange__Interval* QMediaTimeRange__Interval_new2(long long start, long long end) { - return new QMediaTimeRange::Interval(static_cast(start), static_cast(end)); +void QMediaTimeRange__Interval_new2(long long start, long long end, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval) { + QMediaTimeRange::Interval* ret = new QMediaTimeRange::Interval(static_cast(start), static_cast(end)); + *outptr_QMediaTimeRange__Interval = ret; } -QMediaTimeRange__Interval* QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1) { - return new QMediaTimeRange::Interval(*param1); +void QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval) { + QMediaTimeRange::Interval* ret = new QMediaTimeRange::Interval(*param1); + *outptr_QMediaTimeRange__Interval = ret; } long long QMediaTimeRange__Interval_Start(const QMediaTimeRange__Interval* self) { @@ -166,7 +177,11 @@ QMediaTimeRange__Interval* QMediaTimeRange__Interval_Translated(const QMediaTime return new QMediaTimeRange::Interval(self->translated(static_cast(offset))); } -void QMediaTimeRange__Interval_Delete(QMediaTimeRange__Interval* self) { - delete self; +void QMediaTimeRange__Interval_Delete(QMediaTimeRange__Interval* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qmediatimerange.go b/qt6/multimedia/gen_qmediatimerange.go index 0a907da0..a8b28753 100644 --- a/qt6/multimedia/gen_qmediatimerange.go +++ b/qt6/multimedia/gen_qmediatimerange.go @@ -14,7 +14,8 @@ import ( ) type QMediaTimeRange struct { - h *C.QMediaTimeRange + h *C.QMediaTimeRange + isSubclass bool } func (this *QMediaTimeRange) cPointer() *C.QMediaTimeRange { @@ -31,6 +32,7 @@ func (this *QMediaTimeRange) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaTimeRange constructs the type using only CGO pointers. func newQMediaTimeRange(h *C.QMediaTimeRange) *QMediaTimeRange { if h == nil { return nil @@ -38,32 +40,53 @@ func newQMediaTimeRange(h *C.QMediaTimeRange) *QMediaTimeRange { return &QMediaTimeRange{h: h} } +// UnsafeNewQMediaTimeRange constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeRange(h unsafe.Pointer) *QMediaTimeRange { - return newQMediaTimeRange((*C.QMediaTimeRange)(h)) + if h == nil { + return nil + } + + return &QMediaTimeRange{h: (*C.QMediaTimeRange)(h)} } // NewQMediaTimeRange constructs a new QMediaTimeRange object. func NewQMediaTimeRange() *QMediaTimeRange { - ret := C.QMediaTimeRange_new() - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new(&outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } // NewQMediaTimeRange2 constructs a new QMediaTimeRange object. func NewQMediaTimeRange2(start int64, end int64) *QMediaTimeRange { - ret := C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end)) - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } // NewQMediaTimeRange3 constructs a new QMediaTimeRange object. func NewQMediaTimeRange3(param1 *QMediaTimeRange__Interval) *QMediaTimeRange { - ret := C.QMediaTimeRange_new3(param1.cPointer()) - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new3(param1.cPointer(), &outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } // NewQMediaTimeRange4 constructs a new QMediaTimeRange object. func NewQMediaTimeRange4(rangeVal *QMediaTimeRange) *QMediaTimeRange { - ret := C.QMediaTimeRange_new4(rangeVal.cPointer()) - return newQMediaTimeRange(ret) + var outptr_QMediaTimeRange *C.QMediaTimeRange = nil + + C.QMediaTimeRange_new4(rangeVal.cPointer(), &outptr_QMediaTimeRange) + ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret.isSubclass = true + return ret } func (this *QMediaTimeRange) OperatorAssign(param1 *QMediaTimeRange) { @@ -161,7 +184,7 @@ func (this *QMediaTimeRange) Clear() { // Delete this object from C++ memory. func (this *QMediaTimeRange) Delete() { - C.QMediaTimeRange_Delete(this.h) + C.QMediaTimeRange_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -174,7 +197,8 @@ func (this *QMediaTimeRange) GoGC() { } type QMediaTimeRange__Interval struct { - h *C.QMediaTimeRange__Interval + h *C.QMediaTimeRange__Interval + isSubclass bool } func (this *QMediaTimeRange__Interval) cPointer() *C.QMediaTimeRange__Interval { @@ -191,6 +215,7 @@ func (this *QMediaTimeRange__Interval) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQMediaTimeRange__Interval constructs the type using only CGO pointers. func newQMediaTimeRange__Interval(h *C.QMediaTimeRange__Interval) *QMediaTimeRange__Interval { if h == nil { return nil @@ -198,26 +223,43 @@ func newQMediaTimeRange__Interval(h *C.QMediaTimeRange__Interval) *QMediaTimeRan return &QMediaTimeRange__Interval{h: h} } +// UnsafeNewQMediaTimeRange__Interval constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeRange__Interval(h unsafe.Pointer) *QMediaTimeRange__Interval { - return newQMediaTimeRange__Interval((*C.QMediaTimeRange__Interval)(h)) + if h == nil { + return nil + } + + return &QMediaTimeRange__Interval{h: (*C.QMediaTimeRange__Interval)(h)} } // NewQMediaTimeRange__Interval constructs a new QMediaTimeRange::Interval object. func NewQMediaTimeRange__Interval() *QMediaTimeRange__Interval { - ret := C.QMediaTimeRange__Interval_new() - return newQMediaTimeRange__Interval(ret) + var outptr_QMediaTimeRange__Interval *C.QMediaTimeRange__Interval = nil + + C.QMediaTimeRange__Interval_new(&outptr_QMediaTimeRange__Interval) + ret := newQMediaTimeRange__Interval(outptr_QMediaTimeRange__Interval) + ret.isSubclass = true + return ret } // NewQMediaTimeRange__Interval2 constructs a new QMediaTimeRange::Interval object. func NewQMediaTimeRange__Interval2(start int64, end int64) *QMediaTimeRange__Interval { - ret := C.QMediaTimeRange__Interval_new2((C.longlong)(start), (C.longlong)(end)) - return newQMediaTimeRange__Interval(ret) + var outptr_QMediaTimeRange__Interval *C.QMediaTimeRange__Interval = nil + + C.QMediaTimeRange__Interval_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeRange__Interval) + ret := newQMediaTimeRange__Interval(outptr_QMediaTimeRange__Interval) + ret.isSubclass = true + return ret } // NewQMediaTimeRange__Interval3 constructs a new QMediaTimeRange::Interval object. func NewQMediaTimeRange__Interval3(param1 *QMediaTimeRange__Interval) *QMediaTimeRange__Interval { - ret := C.QMediaTimeRange__Interval_new3(param1.cPointer()) - return newQMediaTimeRange__Interval(ret) + var outptr_QMediaTimeRange__Interval *C.QMediaTimeRange__Interval = nil + + C.QMediaTimeRange__Interval_new3(param1.cPointer(), &outptr_QMediaTimeRange__Interval) + ret := newQMediaTimeRange__Interval(outptr_QMediaTimeRange__Interval) + ret.isSubclass = true + return ret } func (this *QMediaTimeRange__Interval) Start() int64 { @@ -252,7 +294,7 @@ func (this *QMediaTimeRange__Interval) Translated(offset int64) *QMediaTimeRange // Delete this object from C++ memory. func (this *QMediaTimeRange__Interval) Delete() { - C.QMediaTimeRange__Interval_Delete(this.h) + C.QMediaTimeRange__Interval_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qmediatimerange.h b/qt6/multimedia/gen_qmediatimerange.h index 3fb507eb..1e027ce3 100644 --- a/qt6/multimedia/gen_qmediatimerange.h +++ b/qt6/multimedia/gen_qmediatimerange.h @@ -26,10 +26,10 @@ typedef struct QMediaTimeRange QMediaTimeRange; typedef struct QMediaTimeRange__Interval QMediaTimeRange__Interval; #endif -QMediaTimeRange* QMediaTimeRange_new(); -QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end); -QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeRange__Interval* param1); -QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal); +void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange); +void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange); +void QMediaTimeRange_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange** outptr_QMediaTimeRange); +void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange); void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1); void QMediaTimeRange_Swap(QMediaTimeRange* self, QMediaTimeRange* other); void QMediaTimeRange_Detach(QMediaTimeRange* self); @@ -51,18 +51,18 @@ QMediaTimeRange* QMediaTimeRange_OperatorPlusAssignWithQMediaTimeRangeInterval(Q QMediaTimeRange* QMediaTimeRange_OperatorMinusAssign(QMediaTimeRange* self, QMediaTimeRange* param1); QMediaTimeRange* QMediaTimeRange_OperatorMinusAssignWithQMediaTimeRangeInterval(QMediaTimeRange* self, QMediaTimeRange__Interval* param1); void QMediaTimeRange_Clear(QMediaTimeRange* self); -void QMediaTimeRange_Delete(QMediaTimeRange* self); +void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass); -QMediaTimeRange__Interval* QMediaTimeRange__Interval_new(); -QMediaTimeRange__Interval* QMediaTimeRange__Interval_new2(long long start, long long end); -QMediaTimeRange__Interval* QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1); +void QMediaTimeRange__Interval_new(QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval); +void QMediaTimeRange__Interval_new2(long long start, long long end, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval); +void QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval); long long QMediaTimeRange__Interval_Start(const QMediaTimeRange__Interval* self); long long QMediaTimeRange__Interval_End(const QMediaTimeRange__Interval* self); bool QMediaTimeRange__Interval_Contains(const QMediaTimeRange__Interval* self, long long time); bool QMediaTimeRange__Interval_IsNormal(const QMediaTimeRange__Interval* self); QMediaTimeRange__Interval* QMediaTimeRange__Interval_Normalized(const QMediaTimeRange__Interval* self); QMediaTimeRange__Interval* QMediaTimeRange__Interval_Translated(const QMediaTimeRange__Interval* self, long long offset); -void QMediaTimeRange__Interval_Delete(QMediaTimeRange__Interval* self); +void QMediaTimeRange__Interval_Delete(QMediaTimeRange__Interval* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qsoundeffect.cpp b/qt6/multimedia/gen_qsoundeffect.cpp index 2d789baf..b13903fe 100644 --- a/qt6/multimedia/gen_qsoundeffect.cpp +++ b/qt6/multimedia/gen_qsoundeffect.cpp @@ -1,30 +1,225 @@ #include +#include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qsoundeffect.h" #include "_cgo_export.h" -QSoundEffect* QSoundEffect_new() { - return new QSoundEffect(); +class MiqtVirtualQSoundEffect : public virtual QSoundEffect { +public: + + MiqtVirtualQSoundEffect(): QSoundEffect() {}; + MiqtVirtualQSoundEffect(const QAudioDevice& audioDevice): QSoundEffect(audioDevice) {}; + MiqtVirtualQSoundEffect(QObject* parent): QSoundEffect(parent) {}; + MiqtVirtualQSoundEffect(const QAudioDevice& audioDevice, QObject* parent): QSoundEffect(audioDevice, parent) {}; + + virtual ~MiqtVirtualQSoundEffect() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSoundEffect::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSoundEffect_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSoundEffect::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSoundEffect::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSoundEffect_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSoundEffect::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSoundEffect::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSoundEffect_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSoundEffect::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSoundEffect::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSoundEffect_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSoundEffect::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSoundEffect::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSoundEffect_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSoundEffect::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSoundEffect::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSoundEffect_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSoundEffect::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSoundEffect::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSoundEffect_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSoundEffect::disconnectNotify(*signal); + + } + +}; + +void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } -QSoundEffect* QSoundEffect_new2(QAudioDevice* audioDevice) { - return new QSoundEffect(*audioDevice); +void QSoundEffect_new2(QAudioDevice* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } -QSoundEffect* QSoundEffect_new3(QObject* parent) { - return new QSoundEffect(parent); +void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(parent); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } -QSoundEffect* QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent) { - return new QSoundEffect(*audioDevice, parent); +void QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { + MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice, parent); + *outptr_QSoundEffect = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self) { @@ -128,7 +323,7 @@ void QSoundEffect_SourceChanged(QSoundEffect* self) { } void QSoundEffect_connect_SourceChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::sourceChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::sourceChanged), self, [=]() { miqt_exec_callback_QSoundEffect_SourceChanged(slot); }); } @@ -138,7 +333,7 @@ void QSoundEffect_LoopCountChanged(QSoundEffect* self) { } void QSoundEffect_connect_LoopCountChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::loopCountChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::loopCountChanged), self, [=]() { miqt_exec_callback_QSoundEffect_LoopCountChanged(slot); }); } @@ -148,7 +343,7 @@ void QSoundEffect_LoopsRemainingChanged(QSoundEffect* self) { } void QSoundEffect_connect_LoopsRemainingChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::loopsRemainingChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::loopsRemainingChanged), self, [=]() { miqt_exec_callback_QSoundEffect_LoopsRemainingChanged(slot); }); } @@ -158,7 +353,7 @@ void QSoundEffect_VolumeChanged(QSoundEffect* self) { } void QSoundEffect_connect_VolumeChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::volumeChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::volumeChanged), self, [=]() { miqt_exec_callback_QSoundEffect_VolumeChanged(slot); }); } @@ -168,7 +363,7 @@ void QSoundEffect_MutedChanged(QSoundEffect* self) { } void QSoundEffect_connect_MutedChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::mutedChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::mutedChanged), self, [=]() { miqt_exec_callback_QSoundEffect_MutedChanged(slot); }); } @@ -178,7 +373,7 @@ void QSoundEffect_LoadedChanged(QSoundEffect* self) { } void QSoundEffect_connect_LoadedChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::loadedChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::loadedChanged), self, [=]() { miqt_exec_callback_QSoundEffect_LoadedChanged(slot); }); } @@ -188,7 +383,7 @@ void QSoundEffect_PlayingChanged(QSoundEffect* self) { } void QSoundEffect_connect_PlayingChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::playingChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::playingChanged), self, [=]() { miqt_exec_callback_QSoundEffect_PlayingChanged(slot); }); } @@ -198,7 +393,7 @@ void QSoundEffect_StatusChanged(QSoundEffect* self) { } void QSoundEffect_connect_StatusChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::statusChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::statusChanged), self, [=]() { miqt_exec_callback_QSoundEffect_StatusChanged(slot); }); } @@ -208,7 +403,7 @@ void QSoundEffect_AudioDeviceChanged(QSoundEffect* self) { } void QSoundEffect_connect_AudioDeviceChanged(QSoundEffect* self, intptr_t slot) { - QSoundEffect::connect(self, static_cast(&QSoundEffect::audioDeviceChanged), self, [=]() { + MiqtVirtualQSoundEffect::connect(self, static_cast(&QSoundEffect::audioDeviceChanged), self, [=]() { miqt_exec_callback_QSoundEffect_AudioDeviceChanged(slot); }); } @@ -243,7 +438,67 @@ struct miqt_string QSoundEffect_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSoundEffect_Delete(QSoundEffect* self) { - delete self; +void QSoundEffect_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__Event = slot; +} + +bool QSoundEffect_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_Event(event); +} + +void QSoundEffect_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__EventFilter = slot; +} + +bool QSoundEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSoundEffect_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__TimerEvent = slot; +} + +void QSoundEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_TimerEvent(event); +} + +void QSoundEffect_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__ChildEvent = slot; +} + +void QSoundEffect_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_ChildEvent(event); +} + +void QSoundEffect_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__CustomEvent = slot; +} + +void QSoundEffect_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_CustomEvent(event); +} + +void QSoundEffect_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__ConnectNotify = slot; +} + +void QSoundEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSoundEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSoundEffect*)(self) )->handle__DisconnectNotify = slot; +} + +void QSoundEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSoundEffect*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSoundEffect_Delete(QSoundEffect* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qsoundeffect.go b/qt6/multimedia/gen_qsoundeffect.go index ffc60e70..0e31b8d6 100644 --- a/qt6/multimedia/gen_qsoundeffect.go +++ b/qt6/multimedia/gen_qsoundeffect.go @@ -31,7 +31,8 @@ const ( ) type QSoundEffect struct { - h *C.QSoundEffect + h *C.QSoundEffect + isSubclass bool *qt6.QObject } @@ -49,39 +50,67 @@ func (this *QSoundEffect) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSoundEffect(h *C.QSoundEffect) *QSoundEffect { +// newQSoundEffect constructs the type using only CGO pointers. +func newQSoundEffect(h *C.QSoundEffect, h_QObject *C.QObject) *QSoundEffect { if h == nil { return nil } - return &QSoundEffect{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QSoundEffect{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQSoundEffect(h unsafe.Pointer) *QSoundEffect { - return newQSoundEffect((*C.QSoundEffect)(h)) +// UnsafeNewQSoundEffect constructs the type using only unsafe pointers. +func UnsafeNewQSoundEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSoundEffect { + if h == nil { + return nil + } + + return &QSoundEffect{h: (*C.QSoundEffect)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQSoundEffect constructs a new QSoundEffect object. func NewQSoundEffect() *QSoundEffect { - ret := C.QSoundEffect_new() - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new(&outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSoundEffect2 constructs a new QSoundEffect object. func NewQSoundEffect2(audioDevice *QAudioDevice) *QSoundEffect { - ret := C.QSoundEffect_new2(audioDevice.cPointer()) - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new2(audioDevice.cPointer(), &outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSoundEffect3 constructs a new QSoundEffect object. func NewQSoundEffect3(parent *qt6.QObject) *QSoundEffect { - ret := C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer())) - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSoundEffect4 constructs a new QSoundEffect object. func NewQSoundEffect4(audioDevice *QAudioDevice, parent *qt6.QObject) *QSoundEffect { - ret := C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQSoundEffect(ret) + var outptr_QSoundEffect *C.QSoundEffect = nil + var outptr_QObject *C.QObject = nil + + C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) + ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSoundEffect) MetaObject() *qt6.QMetaObject { @@ -361,9 +390,175 @@ func QSoundEffect_Tr3(s string, c string, n int) string { return _ret } +func (this *QSoundEffect) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QSoundEffect_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSoundEffect) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QSoundEffect_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_Event +func miqt_exec_callback_QSoundEffect_Event(self *C.QSoundEffect, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSoundEffect{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSoundEffect) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QSoundEffect_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSoundEffect) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QSoundEffect_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_EventFilter +func miqt_exec_callback_QSoundEffect_EventFilter(self *C.QSoundEffect, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSoundEffect{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSoundEffect) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QSoundEffect_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QSoundEffect) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QSoundEffect_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_TimerEvent +func miqt_exec_callback_QSoundEffect_TimerEvent(self *C.QSoundEffect, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QSoundEffect_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QSoundEffect) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QSoundEffect_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_ChildEvent +func miqt_exec_callback_QSoundEffect_ChildEvent(self *C.QSoundEffect, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QSoundEffect_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSoundEffect) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QSoundEffect_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_CustomEvent +func miqt_exec_callback_QSoundEffect_CustomEvent(self *C.QSoundEffect, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QSoundEffect_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSoundEffect) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QSoundEffect_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_ConnectNotify +func miqt_exec_callback_QSoundEffect_ConnectNotify(self *C.QSoundEffect, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSoundEffect) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QSoundEffect_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSoundEffect) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QSoundEffect_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSoundEffect_DisconnectNotify +func miqt_exec_callback_QSoundEffect_DisconnectNotify(self *C.QSoundEffect, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSoundEffect{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSoundEffect) Delete() { - C.QSoundEffect_Delete(this.h) + C.QSoundEffect_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qsoundeffect.h b/qt6/multimedia/gen_qsoundeffect.h index 4086d7e9..43f54a9d 100644 --- a/qt6/multimedia/gen_qsoundeffect.h +++ b/qt6/multimedia/gen_qsoundeffect.h @@ -16,22 +16,30 @@ extern "C" { #ifdef __cplusplus class QAudioDevice; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSoundEffect; +class QTimerEvent; class QUrl; #else typedef struct QAudioDevice QAudioDevice; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSoundEffect QSoundEffect; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QSoundEffect* QSoundEffect_new(); -QSoundEffect* QSoundEffect_new2(QAudioDevice* audioDevice); -QSoundEffect* QSoundEffect_new3(QObject* parent); -QSoundEffect* QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent); +void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +void QSoundEffect_new2(QAudioDevice* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +void QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self); void* QSoundEffect_Metacast(QSoundEffect* self, const char* param1); struct miqt_string QSoundEffect_Tr(const char* s); @@ -72,7 +80,21 @@ void QSoundEffect_Play(QSoundEffect* self); void QSoundEffect_Stop(QSoundEffect* self); struct miqt_string QSoundEffect_Tr2(const char* s, const char* c); struct miqt_string QSoundEffect_Tr3(const char* s, const char* c, int n); -void QSoundEffect_Delete(QSoundEffect* self); +void QSoundEffect_override_virtual_Event(void* self, intptr_t slot); +bool QSoundEffect_virtualbase_Event(void* self, QEvent* event); +void QSoundEffect_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSoundEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSoundEffect_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSoundEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSoundEffect_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSoundEffect_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSoundEffect_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSoundEffect_virtualbase_CustomEvent(void* self, QEvent* event); +void QSoundEffect_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSoundEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSoundEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSoundEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSoundEffect_Delete(QSoundEffect* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qvideoframe.cpp b/qt6/multimedia/gen_qvideoframe.cpp index e16a24b5..d78ace1e 100644 --- a/qt6/multimedia/gen_qvideoframe.cpp +++ b/qt6/multimedia/gen_qvideoframe.cpp @@ -12,16 +12,19 @@ #include "gen_qvideoframe.h" #include "_cgo_export.h" -QVideoFrame* QVideoFrame_new() { - return new QVideoFrame(); +void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(); + *outptr_QVideoFrame = ret; } -QVideoFrame* QVideoFrame_new2(QVideoFrameFormat* format) { - return new QVideoFrame(*format); +void QVideoFrame_new2(QVideoFrameFormat* format, QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(*format); + *outptr_QVideoFrame = ret; } -QVideoFrame* QVideoFrame_new3(QVideoFrame* other) { - return new QVideoFrame(*other); +void QVideoFrame_new3(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame) { + QVideoFrame* ret = new QVideoFrame(*other); + *outptr_QVideoFrame = ret; } void QVideoFrame_Swap(QVideoFrame* self, QVideoFrame* other) { @@ -176,11 +179,19 @@ void QVideoFrame_Paint(QVideoFrame* self, QPainter* painter, QRectF* rect, QVide self->paint(painter, *rect, *options); } -void QVideoFrame_Delete(QVideoFrame* self) { - delete self; +void QVideoFrame_Delete(QVideoFrame* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -void QVideoFrame__PaintOptions_Delete(QVideoFrame__PaintOptions* self) { - delete self; +void QVideoFrame__PaintOptions_Delete(QVideoFrame__PaintOptions* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qvideoframe.go b/qt6/multimedia/gen_qvideoframe.go index 9f1eea55..959990c2 100644 --- a/qt6/multimedia/gen_qvideoframe.go +++ b/qt6/multimedia/gen_qvideoframe.go @@ -46,7 +46,8 @@ const ( ) type QVideoFrame struct { - h *C.QVideoFrame + h *C.QVideoFrame + isSubclass bool } func (this *QVideoFrame) cPointer() *C.QVideoFrame { @@ -63,6 +64,7 @@ func (this *QVideoFrame) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoFrame constructs the type using only CGO pointers. func newQVideoFrame(h *C.QVideoFrame) *QVideoFrame { if h == nil { return nil @@ -70,26 +72,43 @@ func newQVideoFrame(h *C.QVideoFrame) *QVideoFrame { return &QVideoFrame{h: h} } +// UnsafeNewQVideoFrame constructs the type using only unsafe pointers. func UnsafeNewQVideoFrame(h unsafe.Pointer) *QVideoFrame { - return newQVideoFrame((*C.QVideoFrame)(h)) + if h == nil { + return nil + } + + return &QVideoFrame{h: (*C.QVideoFrame)(h)} } // NewQVideoFrame constructs a new QVideoFrame object. func NewQVideoFrame() *QVideoFrame { - ret := C.QVideoFrame_new() - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new(&outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } // NewQVideoFrame2 constructs a new QVideoFrame object. func NewQVideoFrame2(format *QVideoFrameFormat) *QVideoFrame { - ret := C.QVideoFrame_new2(format.cPointer()) - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new2(format.cPointer(), &outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } // NewQVideoFrame3 constructs a new QVideoFrame object. func NewQVideoFrame3(other *QVideoFrame) *QVideoFrame { - ret := C.QVideoFrame_new3(other.cPointer()) - return newQVideoFrame(ret) + var outptr_QVideoFrame *C.QVideoFrame = nil + + C.QVideoFrame_new3(other.cPointer(), &outptr_QVideoFrame) + ret := newQVideoFrame(outptr_QVideoFrame) + ret.isSubclass = true + return ret } func (this *QVideoFrame) Swap(other *QVideoFrame) { @@ -220,7 +239,7 @@ func (this *QVideoFrame) Mirrored() bool { func (this *QVideoFrame) ToImage() *qt6.QImage { _ret := C.QVideoFrame_ToImage(this.h) - _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(_ret)) + _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(_ret), nil) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -246,7 +265,7 @@ func (this *QVideoFrame) Paint(painter *qt6.QPainter, rect *qt6.QRectF, options // Delete this object from C++ memory. func (this *QVideoFrame) Delete() { - C.QVideoFrame_Delete(this.h) + C.QVideoFrame_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -259,7 +278,8 @@ func (this *QVideoFrame) GoGC() { } type QVideoFrame__PaintOptions struct { - h *C.QVideoFrame__PaintOptions + h *C.QVideoFrame__PaintOptions + isSubclass bool } func (this *QVideoFrame__PaintOptions) cPointer() *C.QVideoFrame__PaintOptions { @@ -276,6 +296,7 @@ func (this *QVideoFrame__PaintOptions) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoFrame__PaintOptions constructs the type using only CGO pointers. func newQVideoFrame__PaintOptions(h *C.QVideoFrame__PaintOptions) *QVideoFrame__PaintOptions { if h == nil { return nil @@ -283,13 +304,18 @@ func newQVideoFrame__PaintOptions(h *C.QVideoFrame__PaintOptions) *QVideoFrame__ return &QVideoFrame__PaintOptions{h: h} } +// UnsafeNewQVideoFrame__PaintOptions constructs the type using only unsafe pointers. func UnsafeNewQVideoFrame__PaintOptions(h unsafe.Pointer) *QVideoFrame__PaintOptions { - return newQVideoFrame__PaintOptions((*C.QVideoFrame__PaintOptions)(h)) + if h == nil { + return nil + } + + return &QVideoFrame__PaintOptions{h: (*C.QVideoFrame__PaintOptions)(h)} } // Delete this object from C++ memory. func (this *QVideoFrame__PaintOptions) Delete() { - C.QVideoFrame__PaintOptions_Delete(this.h) + C.QVideoFrame__PaintOptions_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qvideoframe.h b/qt6/multimedia/gen_qvideoframe.h index 3b6df1cc..bc4091c2 100644 --- a/qt6/multimedia/gen_qvideoframe.h +++ b/qt6/multimedia/gen_qvideoframe.h @@ -36,9 +36,9 @@ typedef struct QVideoFrame__PaintOptions QVideoFrame__PaintOptions; typedef struct QVideoFrameFormat QVideoFrameFormat; #endif -QVideoFrame* QVideoFrame_new(); -QVideoFrame* QVideoFrame_new2(QVideoFrameFormat* format); -QVideoFrame* QVideoFrame_new3(QVideoFrame* other); +void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame); +void QVideoFrame_new2(QVideoFrameFormat* format, QVideoFrame** outptr_QVideoFrame); +void QVideoFrame_new3(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame); void QVideoFrame_Swap(QVideoFrame* self, QVideoFrame* other); void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other); bool QVideoFrame_OperatorEqual(const QVideoFrame* self, QVideoFrame* other); @@ -73,9 +73,9 @@ QImage* QVideoFrame_ToImage(const QVideoFrame* self); struct miqt_string QVideoFrame_SubtitleText(const QVideoFrame* self); void QVideoFrame_SetSubtitleText(QVideoFrame* self, struct miqt_string text); void QVideoFrame_Paint(QVideoFrame* self, QPainter* painter, QRectF* rect, QVideoFrame__PaintOptions* options); -void QVideoFrame_Delete(QVideoFrame* self); +void QVideoFrame_Delete(QVideoFrame* self, bool isSubclass); -void QVideoFrame__PaintOptions_Delete(QVideoFrame__PaintOptions* self); +void QVideoFrame__PaintOptions_Delete(QVideoFrame__PaintOptions* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qvideoframeformat.cpp b/qt6/multimedia/gen_qvideoframeformat.cpp index ce3c61c7..f4694459 100644 --- a/qt6/multimedia/gen_qvideoframeformat.cpp +++ b/qt6/multimedia/gen_qvideoframeformat.cpp @@ -8,16 +8,19 @@ #include "gen_qvideoframeformat.h" #include "_cgo_export.h" -QVideoFrameFormat* QVideoFrameFormat_new() { - return new QVideoFrameFormat(); +void QVideoFrameFormat_new(QVideoFrameFormat** outptr_QVideoFrameFormat) { + QVideoFrameFormat* ret = new QVideoFrameFormat(); + *outptr_QVideoFrameFormat = ret; } -QVideoFrameFormat* QVideoFrameFormat_new2(QSize* size, int pixelFormat) { - return new QVideoFrameFormat(*size, static_cast(pixelFormat)); +void QVideoFrameFormat_new2(QSize* size, int pixelFormat, QVideoFrameFormat** outptr_QVideoFrameFormat) { + QVideoFrameFormat* ret = new QVideoFrameFormat(*size, static_cast(pixelFormat)); + *outptr_QVideoFrameFormat = ret; } -QVideoFrameFormat* QVideoFrameFormat_new3(QVideoFrameFormat* format) { - return new QVideoFrameFormat(*format); +void QVideoFrameFormat_new3(QVideoFrameFormat* format, QVideoFrameFormat** outptr_QVideoFrameFormat) { + QVideoFrameFormat* ret = new QVideoFrameFormat(*format); + *outptr_QVideoFrameFormat = ret; } void QVideoFrameFormat_Swap(QVideoFrameFormat* self, QVideoFrameFormat* other) { @@ -194,7 +197,11 @@ struct miqt_string QVideoFrameFormat_PixelFormatToString(int pixelFormat) { return _ms; } -void QVideoFrameFormat_Delete(QVideoFrameFormat* self) { - delete self; +void QVideoFrameFormat_Delete(QVideoFrameFormat* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qvideoframeformat.go b/qt6/multimedia/gen_qvideoframeformat.go index 2133383e..c48110a6 100644 --- a/qt6/multimedia/gen_qvideoframeformat.go +++ b/qt6/multimedia/gen_qvideoframeformat.go @@ -102,7 +102,8 @@ const ( ) type QVideoFrameFormat struct { - h *C.QVideoFrameFormat + h *C.QVideoFrameFormat + isSubclass bool } func (this *QVideoFrameFormat) cPointer() *C.QVideoFrameFormat { @@ -119,6 +120,7 @@ func (this *QVideoFrameFormat) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQVideoFrameFormat constructs the type using only CGO pointers. func newQVideoFrameFormat(h *C.QVideoFrameFormat) *QVideoFrameFormat { if h == nil { return nil @@ -126,26 +128,43 @@ func newQVideoFrameFormat(h *C.QVideoFrameFormat) *QVideoFrameFormat { return &QVideoFrameFormat{h: h} } +// UnsafeNewQVideoFrameFormat constructs the type using only unsafe pointers. func UnsafeNewQVideoFrameFormat(h unsafe.Pointer) *QVideoFrameFormat { - return newQVideoFrameFormat((*C.QVideoFrameFormat)(h)) + if h == nil { + return nil + } + + return &QVideoFrameFormat{h: (*C.QVideoFrameFormat)(h)} } // NewQVideoFrameFormat constructs a new QVideoFrameFormat object. func NewQVideoFrameFormat() *QVideoFrameFormat { - ret := C.QVideoFrameFormat_new() - return newQVideoFrameFormat(ret) + var outptr_QVideoFrameFormat *C.QVideoFrameFormat = nil + + C.QVideoFrameFormat_new(&outptr_QVideoFrameFormat) + ret := newQVideoFrameFormat(outptr_QVideoFrameFormat) + ret.isSubclass = true + return ret } // NewQVideoFrameFormat2 constructs a new QVideoFrameFormat object. func NewQVideoFrameFormat2(size *qt6.QSize, pixelFormat QVideoFrameFormat__PixelFormat) *QVideoFrameFormat { - ret := C.QVideoFrameFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat)) - return newQVideoFrameFormat(ret) + var outptr_QVideoFrameFormat *C.QVideoFrameFormat = nil + + C.QVideoFrameFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), &outptr_QVideoFrameFormat) + ret := newQVideoFrameFormat(outptr_QVideoFrameFormat) + ret.isSubclass = true + return ret } // NewQVideoFrameFormat3 constructs a new QVideoFrameFormat object. func NewQVideoFrameFormat3(format *QVideoFrameFormat) *QVideoFrameFormat { - ret := C.QVideoFrameFormat_new3(format.cPointer()) - return newQVideoFrameFormat(ret) + var outptr_QVideoFrameFormat *C.QVideoFrameFormat = nil + + C.QVideoFrameFormat_new3(format.cPointer(), &outptr_QVideoFrameFormat) + ret := newQVideoFrameFormat(outptr_QVideoFrameFormat) + ret.isSubclass = true + return ret } func (this *QVideoFrameFormat) Swap(other *QVideoFrameFormat) { @@ -309,7 +328,7 @@ func QVideoFrameFormat_PixelFormatToString(pixelFormat QVideoFrameFormat__PixelF // Delete this object from C++ memory. func (this *QVideoFrameFormat) Delete() { - C.QVideoFrameFormat_Delete(this.h) + C.QVideoFrameFormat_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qvideoframeformat.h b/qt6/multimedia/gen_qvideoframeformat.h index 12d0eb0c..60aeb44e 100644 --- a/qt6/multimedia/gen_qvideoframeformat.h +++ b/qt6/multimedia/gen_qvideoframeformat.h @@ -24,9 +24,9 @@ typedef struct QSize QSize; typedef struct QVideoFrameFormat QVideoFrameFormat; #endif -QVideoFrameFormat* QVideoFrameFormat_new(); -QVideoFrameFormat* QVideoFrameFormat_new2(QSize* size, int pixelFormat); -QVideoFrameFormat* QVideoFrameFormat_new3(QVideoFrameFormat* format); +void QVideoFrameFormat_new(QVideoFrameFormat** outptr_QVideoFrameFormat); +void QVideoFrameFormat_new2(QSize* size, int pixelFormat, QVideoFrameFormat** outptr_QVideoFrameFormat); +void QVideoFrameFormat_new3(QVideoFrameFormat* format, QVideoFrameFormat** outptr_QVideoFrameFormat); void QVideoFrameFormat_Swap(QVideoFrameFormat* self, QVideoFrameFormat* other); void QVideoFrameFormat_Detach(QVideoFrameFormat* self); void QVideoFrameFormat_OperatorAssign(QVideoFrameFormat* self, QVideoFrameFormat* format); @@ -63,7 +63,7 @@ void QVideoFrameFormat_SetMaxLuminance(QVideoFrameFormat* self, float lum); int QVideoFrameFormat_PixelFormatFromImageFormat(int format); int QVideoFrameFormat_ImageFormatFromPixelFormat(int format); struct miqt_string QVideoFrameFormat_PixelFormatToString(int pixelFormat); -void QVideoFrameFormat_Delete(QVideoFrameFormat* self); +void QVideoFrameFormat_Delete(QVideoFrameFormat* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qvideosink.cpp b/qt6/multimedia/gen_qvideosink.cpp index 01fb9832..6c0422db 100644 --- a/qt6/multimedia/gen_qvideosink.cpp +++ b/qt6/multimedia/gen_qvideosink.cpp @@ -1,21 +1,210 @@ +#include +#include +#include #include #include #include #include #include #include +#include #include #include #include #include "gen_qvideosink.h" #include "_cgo_export.h" -QVideoSink* QVideoSink_new() { - return new QVideoSink(); +class MiqtVirtualQVideoSink : public virtual QVideoSink { +public: + + MiqtVirtualQVideoSink(): QVideoSink() {}; + MiqtVirtualQVideoSink(QObject* parent): QVideoSink(parent) {}; + + virtual ~MiqtVirtualQVideoSink() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QVideoSink::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QVideoSink_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QVideoSink::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QVideoSink::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QVideoSink_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QVideoSink::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QVideoSink::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QVideoSink_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QVideoSink::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QVideoSink::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QVideoSink_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QVideoSink::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QVideoSink::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QVideoSink_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QVideoSink::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QVideoSink::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QVideoSink_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QVideoSink::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QVideoSink::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QVideoSink_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QVideoSink::disconnectNotify(*signal); + + } + +}; + +void QVideoSink_new(QVideoSink** outptr_QVideoSink, QObject** outptr_QObject) { + MiqtVirtualQVideoSink* ret = new MiqtVirtualQVideoSink(); + *outptr_QVideoSink = ret; + *outptr_QObject = static_cast(ret); } -QVideoSink* QVideoSink_new2(QObject* parent) { - return new QVideoSink(parent); +void QVideoSink_new2(QObject* parent, QVideoSink** outptr_QVideoSink, QObject** outptr_QObject) { + MiqtVirtualQVideoSink* ret = new MiqtVirtualQVideoSink(parent); + *outptr_QVideoSink = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QVideoSink_MetaObject(const QVideoSink* self) { @@ -70,7 +259,7 @@ void QVideoSink_VideoFrameChanged(const QVideoSink* self, QVideoFrame* frame) { } void QVideoSink_connect_VideoFrameChanged(QVideoSink* self, intptr_t slot) { - QVideoSink::connect(self, static_cast(&QVideoSink::videoFrameChanged), self, [=](const QVideoFrame& frame) { + MiqtVirtualQVideoSink::connect(self, static_cast(&QVideoSink::videoFrameChanged), self, [=](const QVideoFrame& frame) { const QVideoFrame& frame_ret = frame; // Cast returned reference into pointer QVideoFrame* sigval1 = const_cast(&frame_ret); @@ -84,7 +273,7 @@ void QVideoSink_SubtitleTextChanged(const QVideoSink* self, struct miqt_string s } void QVideoSink_connect_SubtitleTextChanged(QVideoSink* self, intptr_t slot) { - QVideoSink::connect(self, static_cast(&QVideoSink::subtitleTextChanged), self, [=](const QString& subtitleText) { + MiqtVirtualQVideoSink::connect(self, static_cast(&QVideoSink::subtitleTextChanged), self, [=](const QString& subtitleText) { const QString subtitleText_ret = subtitleText; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray subtitleText_b = subtitleText_ret.toUtf8(); @@ -102,7 +291,7 @@ void QVideoSink_VideoSizeChanged(QVideoSink* self) { } void QVideoSink_connect_VideoSizeChanged(QVideoSink* self, intptr_t slot) { - QVideoSink::connect(self, static_cast(&QVideoSink::videoSizeChanged), self, [=]() { + MiqtVirtualQVideoSink::connect(self, static_cast(&QVideoSink::videoSizeChanged), self, [=]() { miqt_exec_callback_QVideoSink_VideoSizeChanged(slot); }); } @@ -129,7 +318,67 @@ struct miqt_string QVideoSink_Tr3(const char* s, const char* c, int n) { return _ms; } -void QVideoSink_Delete(QVideoSink* self) { - delete self; +void QVideoSink_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__Event = slot; +} + +bool QVideoSink_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_Event(event); +} + +void QVideoSink_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__EventFilter = slot; +} + +bool QVideoSink_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QVideoSink_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__TimerEvent = slot; +} + +void QVideoSink_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_TimerEvent(event); +} + +void QVideoSink_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__ChildEvent = slot; +} + +void QVideoSink_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_ChildEvent(event); +} + +void QVideoSink_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__CustomEvent = slot; +} + +void QVideoSink_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_CustomEvent(event); +} + +void QVideoSink_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__ConnectNotify = slot; +} + +void QVideoSink_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QVideoSink_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QVideoSink*)(self) )->handle__DisconnectNotify = slot; +} + +void QVideoSink_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQVideoSink*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QVideoSink_Delete(QVideoSink* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qvideosink.go b/qt6/multimedia/gen_qvideosink.go index d7a9f75a..d27693e8 100644 --- a/qt6/multimedia/gen_qvideosink.go +++ b/qt6/multimedia/gen_qvideosink.go @@ -16,7 +16,8 @@ import ( ) type QVideoSink struct { - h *C.QVideoSink + h *C.QVideoSink + isSubclass bool *qt6.QObject } @@ -34,27 +35,45 @@ func (this *QVideoSink) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoSink(h *C.QVideoSink) *QVideoSink { +// newQVideoSink constructs the type using only CGO pointers. +func newQVideoSink(h *C.QVideoSink, h_QObject *C.QObject) *QVideoSink { if h == nil { return nil } - return &QVideoSink{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QVideoSink{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQVideoSink(h unsafe.Pointer) *QVideoSink { - return newQVideoSink((*C.QVideoSink)(h)) +// UnsafeNewQVideoSink constructs the type using only unsafe pointers. +func UnsafeNewQVideoSink(h unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoSink { + if h == nil { + return nil + } + + return &QVideoSink{h: (*C.QVideoSink)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQVideoSink constructs a new QVideoSink object. func NewQVideoSink() *QVideoSink { - ret := C.QVideoSink_new() - return newQVideoSink(ret) + var outptr_QVideoSink *C.QVideoSink = nil + var outptr_QObject *C.QObject = nil + + C.QVideoSink_new(&outptr_QVideoSink, &outptr_QObject) + ret := newQVideoSink(outptr_QVideoSink, outptr_QObject) + ret.isSubclass = true + return ret } // NewQVideoSink2 constructs a new QVideoSink object. func NewQVideoSink2(parent *qt6.QObject) *QVideoSink { - ret := C.QVideoSink_new2((*C.QObject)(parent.UnsafePointer())) - return newQVideoSink(ret) + var outptr_QVideoSink *C.QVideoSink = nil + var outptr_QObject *C.QObject = nil + + C.QVideoSink_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QVideoSink, &outptr_QObject) + ret := newQVideoSink(outptr_QVideoSink, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QVideoSink) MetaObject() *qt6.QMetaObject { @@ -195,9 +214,175 @@ func QVideoSink_Tr3(s string, c string, n int) string { return _ret } +func (this *QVideoSink) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QVideoSink_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QVideoSink) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QVideoSink_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_Event +func miqt_exec_callback_QVideoSink_Event(self *C.QVideoSink, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVideoSink{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoSink) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QVideoSink_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QVideoSink) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QVideoSink_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_EventFilter +func miqt_exec_callback_QVideoSink_EventFilter(self *C.QVideoSink, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVideoSink{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoSink) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QVideoSink_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QVideoSink) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QVideoSink_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_TimerEvent +func miqt_exec_callback_QVideoSink_TimerEvent(self *C.QVideoSink, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoSink{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QVideoSink) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QVideoSink_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QVideoSink) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QVideoSink_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_ChildEvent +func miqt_exec_callback_QVideoSink_ChildEvent(self *C.QVideoSink, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoSink{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QVideoSink) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QVideoSink_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QVideoSink) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QVideoSink_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_CustomEvent +func miqt_exec_callback_QVideoSink_CustomEvent(self *C.QVideoSink, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QVideoSink{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QVideoSink) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QVideoSink_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QVideoSink) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QVideoSink_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_ConnectNotify +func miqt_exec_callback_QVideoSink_ConnectNotify(self *C.QVideoSink, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QVideoSink{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QVideoSink) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QVideoSink_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QVideoSink) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QVideoSink_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoSink_DisconnectNotify +func miqt_exec_callback_QVideoSink_DisconnectNotify(self *C.QVideoSink, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QVideoSink{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QVideoSink) Delete() { - C.QVideoSink_Delete(this.h) + C.QVideoSink_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qvideosink.h b/qt6/multimedia/gen_qvideosink.h index ff32a3b3..f808dbc8 100644 --- a/qt6/multimedia/gen_qvideosink.h +++ b/qt6/multimedia/gen_qvideosink.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSize; +class QTimerEvent; class QVideoFrame; class QVideoSink; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVideoFrame QVideoFrame; typedef struct QVideoSink QVideoSink; #endif -QVideoSink* QVideoSink_new(); -QVideoSink* QVideoSink_new2(QObject* parent); +void QVideoSink_new(QVideoSink** outptr_QVideoSink, QObject** outptr_QObject); +void QVideoSink_new2(QObject* parent, QVideoSink** outptr_QVideoSink, QObject** outptr_QObject); QMetaObject* QVideoSink_MetaObject(const QVideoSink* self); void* QVideoSink_Metacast(QVideoSink* self, const char* param1); struct miqt_string QVideoSink_Tr(const char* s); @@ -46,7 +54,21 @@ void QVideoSink_VideoSizeChanged(QVideoSink* self); void QVideoSink_connect_VideoSizeChanged(QVideoSink* self, intptr_t slot); struct miqt_string QVideoSink_Tr2(const char* s, const char* c); struct miqt_string QVideoSink_Tr3(const char* s, const char* c, int n); -void QVideoSink_Delete(QVideoSink* self); +void QVideoSink_override_virtual_Event(void* self, intptr_t slot); +bool QVideoSink_virtualbase_Event(void* self, QEvent* event); +void QVideoSink_override_virtual_EventFilter(void* self, intptr_t slot); +bool QVideoSink_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QVideoSink_override_virtual_TimerEvent(void* self, intptr_t slot); +void QVideoSink_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QVideoSink_override_virtual_ChildEvent(void* self, intptr_t slot); +void QVideoSink_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QVideoSink_override_virtual_CustomEvent(void* self, intptr_t slot); +void QVideoSink_virtualbase_CustomEvent(void* self, QEvent* event); +void QVideoSink_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QVideoSink_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QVideoSink_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QVideoSink_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QVideoSink_Delete(QVideoSink* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qvideowidget.cpp b/qt6/multimedia/gen_qvideowidget.cpp index 7bd0c0a6..9bc5b77b 100644 --- a/qt6/multimedia/gen_qvideowidget.cpp +++ b/qt6/multimedia/gen_qvideowidget.cpp @@ -1,21 +1,1042 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include #include +#include #include #include #include "gen_qvideowidget.h" #include "_cgo_export.h" -QVideoWidget* QVideoWidget_new(QWidget* parent) { - return new QVideoWidget(parent); +class MiqtVirtualQVideoWidget : public virtual QVideoWidget { +public: + + MiqtVirtualQVideoWidget(QWidget* parent): QVideoWidget(parent) {}; + MiqtVirtualQVideoWidget(): QVideoWidget() {}; + + virtual ~MiqtVirtualQVideoWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QVideoWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVideoWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QVideoWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QVideoWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QVideoWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QVideoWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QVideoWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QVideoWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QVideoWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QVideoWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QVideoWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QVideoWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QVideoWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QVideoWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QVideoWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QVideoWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QVideoWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QVideoWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QVideoWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QVideoWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QVideoWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QVideoWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QVideoWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QVideoWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QVideoWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QVideoWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QVideoWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QVideoWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QVideoWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QVideoWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QVideoWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QVideoWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QVideoWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QVideoWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QVideoWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QVideoWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QVideoWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QVideoWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QVideoWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QVideoWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QVideoWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QVideoWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QVideoWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QVideoWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QVideoWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QVideoWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QVideoWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QVideoWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QVideoWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QVideoWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QVideoWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QVideoWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QVideoWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QVideoWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QVideoWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QVideoWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QVideoWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QVideoWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QVideoWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QVideoWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QVideoWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QVideoWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QVideoWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QVideoWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QVideoWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QVideoWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QVideoWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QVideoWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QVideoWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QVideoWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QVideoWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QVideoWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QVideoWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QVideoWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QVideoWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QVideoWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QVideoWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QVideoWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QVideoWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QVideoWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QVideoWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QVideoWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QVideoWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QVideoWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QVideoWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QVideoWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QVideoWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QVideoWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QVideoWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QVideoWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QVideoWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QVideoWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QVideoWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QVideoWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QVideoWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QVideoWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QVideoWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QVideoWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QVideoWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QVideoWidget::focusNextPrevChild(next); + + } + +}; + +void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(parent); + *outptr_QVideoWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QVideoWidget* QVideoWidget_new2() { - return new QVideoWidget(); +void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(); + *outptr_QVideoWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self) { @@ -63,7 +1084,7 @@ void QVideoWidget_FullScreenChanged(QVideoWidget* self, bool fullScreen) { } void QVideoWidget_connect_FullScreenChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::fullScreenChanged), self, [=](bool fullScreen) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::fullScreenChanged), self, [=](bool fullScreen) { bool sigval1 = fullScreen; miqt_exec_callback_QVideoWidget_FullScreenChanged(slot, sigval1); }); @@ -74,7 +1095,7 @@ void QVideoWidget_AspectRatioModeChanged(QVideoWidget* self, int mode) { } void QVideoWidget_connect_AspectRatioModeChanged(QVideoWidget* self, intptr_t slot) { - QVideoWidget::connect(self, static_cast(&QVideoWidget::aspectRatioModeChanged), self, [=](Qt::AspectRatioMode mode) { + MiqtVirtualQVideoWidget::connect(self, static_cast(&QVideoWidget::aspectRatioModeChanged), self, [=](Qt::AspectRatioMode mode) { Qt::AspectRatioMode mode_ret = mode; int sigval1 = static_cast(mode_ret); miqt_exec_callback_QVideoWidget_AspectRatioModeChanged(slot, sigval1); @@ -103,7 +1124,339 @@ struct miqt_string QVideoWidget_Tr3(const char* s, const char* c, int n) { return _ms; } -void QVideoWidget_Delete(QVideoWidget* self) { - delete self; +void QVideoWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QVideoWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_SizeHint(); +} + +void QVideoWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__Event = slot; +} + +bool QVideoWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_Event(event); +} + +void QVideoWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ShowEvent = slot; +} + +void QVideoWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QVideoWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__HideEvent = slot; +} + +void QVideoWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QVideoWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QVideoWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QVideoWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MoveEvent = slot; +} + +void QVideoWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QVideoWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DevType = slot; +} + +int QVideoWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_DevType(); +} + +void QVideoWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SetVisible = slot; +} + +void QVideoWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QVideoWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QVideoWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QVideoWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QVideoWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QVideoWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QVideoWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QVideoWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QVideoWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QVideoWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QVideoWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QVideoWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QVideoWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QVideoWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QVideoWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QVideoWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QVideoWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QVideoWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__WheelEvent = slot; +} + +void QVideoWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QVideoWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QVideoWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QVideoWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QVideoWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QVideoWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QVideoWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QVideoWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QVideoWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QVideoWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__EnterEvent = slot; +} + +void QVideoWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QVideoWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QVideoWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QVideoWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__PaintEvent = slot; +} + +void QVideoWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QVideoWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__CloseEvent = slot; +} + +void QVideoWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QVideoWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QVideoWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QVideoWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__TabletEvent = slot; +} + +void QVideoWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QVideoWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ActionEvent = slot; +} + +void QVideoWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QVideoWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QVideoWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QVideoWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QVideoWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QVideoWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QVideoWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QVideoWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__DropEvent = slot; +} + +void QVideoWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QVideoWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QVideoWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QVideoWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QVideoWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QVideoWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__Metric = slot; +} + +int QVideoWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_Metric(param1); +} + +void QVideoWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__InitPainter = slot; +} + +void QVideoWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QVideoWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QVideoWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QVideoWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QVideoWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QVideoWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QVideoWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QVideoWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QVideoWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQVideoWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QVideoWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QVideoWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QVideoWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQVideoWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QVideoWidget_Delete(QVideoWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qvideowidget.go b/qt6/multimedia/gen_qvideowidget.go index debf6097..60368044 100644 --- a/qt6/multimedia/gen_qvideowidget.go +++ b/qt6/multimedia/gen_qvideowidget.go @@ -16,7 +16,8 @@ import ( ) type QVideoWidget struct { - h *C.QVideoWidget + h *C.QVideoWidget + isSubclass bool *qt6.QWidget } @@ -34,27 +35,49 @@ func (this *QVideoWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQVideoWidget(h *C.QVideoWidget) *QVideoWidget { +// newQVideoWidget constructs the type using only CGO pointers. +func newQVideoWidget(h *C.QVideoWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QVideoWidget { if h == nil { return nil } - return &QVideoWidget{h: h, QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h))} + return &QVideoWidget{h: h, + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQVideoWidget(h unsafe.Pointer) *QVideoWidget { - return newQVideoWidget((*C.QVideoWidget)(h)) +// UnsafeNewQVideoWidget constructs the type using only unsafe pointers. +func UnsafeNewQVideoWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QVideoWidget { + if h == nil { + return nil + } + + return &QVideoWidget{h: (*C.QVideoWidget)(h), + QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQVideoWidget constructs a new QVideoWidget object. func NewQVideoWidget(parent *qt6.QWidget) *QVideoWidget { - ret := C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer())) - return newQVideoWidget(ret) + var outptr_QVideoWidget *C.QVideoWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQVideoWidget2 constructs a new QVideoWidget object. func NewQVideoWidget2() *QVideoWidget { - ret := C.QVideoWidget_new2() - return newQVideoWidget(ret) + var outptr_QVideoWidget *C.QVideoWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QVideoWidget_new2(&outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QVideoWidget) MetaObject() *qt6.QMetaObject { @@ -77,7 +100,7 @@ func QVideoWidget_Tr(s string) string { } func (this *QVideoWidget) VideoSink() *QVideoSink { - return UnsafeNewQVideoSink(unsafe.Pointer(C.QVideoWidget_VideoSink(this.h))) + return UnsafeNewQVideoSink(unsafe.Pointer(C.QVideoWidget_VideoSink(this.h)), nil) } func (this *QVideoWidget) AspectRatioMode() qt6.AspectRatioMode { @@ -161,9 +184,975 @@ func QVideoWidget_Tr3(s string, c string, n int) string { return _ret } +func (this *QVideoWidget) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QVideoWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVideoWidget) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QVideoWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SizeHint +func miqt_exec_callback_QVideoWidget_SizeHint(self *C.QVideoWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QVideoWidget_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QVideoWidget) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QVideoWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_Event +func miqt_exec_callback_QVideoWidget_Event(self *C.QVideoWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_ShowEvent(event *qt6.QShowEvent) { + + C.QVideoWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnShowEvent(slot func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) { + C.QVideoWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ShowEvent +func miqt_exec_callback_QVideoWidget_ShowEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_HideEvent(event *qt6.QHideEvent) { + + C.QVideoWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnHideEvent(slot func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) { + C.QVideoWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_HideEvent +func miqt_exec_callback_QVideoWidget_HideEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_ResizeEvent(event *qt6.QResizeEvent) { + + C.QVideoWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnResizeEvent(slot func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) { + C.QVideoWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ResizeEvent +func miqt_exec_callback_QVideoWidget_ResizeEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MoveEvent(event *qt6.QMoveEvent) { + + C.QVideoWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMoveEvent(slot func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) { + C.QVideoWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MoveEvent +func miqt_exec_callback_QVideoWidget_MoveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DevType() int { + + return (int)(C.QVideoWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QVideoWidget) OnDevType(slot func(super func() int) int) { + C.QVideoWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DevType +func miqt_exec_callback_QVideoWidget_DevType(self *C.QVideoWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_SetVisible(visible bool) { + + C.QVideoWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QVideoWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QVideoWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SetVisible +func miqt_exec_callback_QVideoWidget_SetVisible(self *C.QVideoWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QVideoWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVideoWidget) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QVideoWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MinimumSizeHint +func miqt_exec_callback_QVideoWidget_MinimumSizeHint(self *C.QVideoWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QVideoWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVideoWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QVideoWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_HeightForWidth +func miqt_exec_callback_QVideoWidget_HeightForWidth(self *C.QVideoWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QVideoWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QVideoWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QVideoWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_HasHeightForWidth +func miqt_exec_callback_QVideoWidget_HasHeightForWidth(self *C.QVideoWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QVideoWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QVideoWidget) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QVideoWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_PaintEngine +func miqt_exec_callback_QVideoWidget_PaintEngine(self *C.QVideoWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_MousePressEvent(event *qt6.QMouseEvent) { + + C.QVideoWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMousePressEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QVideoWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MousePressEvent +func miqt_exec_callback_QVideoWidget_MousePressEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MouseReleaseEvent(event *qt6.QMouseEvent) { + + C.QVideoWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMouseReleaseEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QVideoWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MouseReleaseEvent +func miqt_exec_callback_QVideoWidget_MouseReleaseEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MouseDoubleClickEvent(event *qt6.QMouseEvent) { + + C.QVideoWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMouseDoubleClickEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QVideoWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent +func miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_MouseMoveEvent(event *qt6.QMouseEvent) { + + C.QVideoWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnMouseMoveEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QVideoWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_MouseMoveEvent +func miqt_exec_callback_QVideoWidget_MouseMoveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_WheelEvent(event *qt6.QWheelEvent) { + + C.QVideoWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnWheelEvent(slot func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) { + C.QVideoWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_WheelEvent +func miqt_exec_callback_QVideoWidget_WheelEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_KeyPressEvent(event *qt6.QKeyEvent) { + + C.QVideoWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnKeyPressEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QVideoWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_KeyPressEvent +func miqt_exec_callback_QVideoWidget_KeyPressEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_KeyReleaseEvent(event *qt6.QKeyEvent) { + + C.QVideoWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnKeyReleaseEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QVideoWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_KeyReleaseEvent +func miqt_exec_callback_QVideoWidget_KeyReleaseEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_FocusInEvent(event *qt6.QFocusEvent) { + + C.QVideoWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnFocusInEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QVideoWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_FocusInEvent +func miqt_exec_callback_QVideoWidget_FocusInEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_FocusOutEvent(event *qt6.QFocusEvent) { + + C.QVideoWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnFocusOutEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QVideoWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_FocusOutEvent +func miqt_exec_callback_QVideoWidget_FocusOutEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_EnterEvent(event *qt6.QEnterEvent) { + + C.QVideoWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEnterEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnEnterEvent(slot func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) { + C.QVideoWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_EnterEvent +func miqt_exec_callback_QVideoWidget_EnterEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_LeaveEvent(event *qt6.QEvent) { + + C.QVideoWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnLeaveEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QVideoWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_LeaveEvent +func miqt_exec_callback_QVideoWidget_LeaveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_PaintEvent(event *qt6.QPaintEvent) { + + C.QVideoWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnPaintEvent(slot func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) { + C.QVideoWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_PaintEvent +func miqt_exec_callback_QVideoWidget_PaintEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_CloseEvent(event *qt6.QCloseEvent) { + + C.QVideoWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnCloseEvent(slot func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) { + C.QVideoWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_CloseEvent +func miqt_exec_callback_QVideoWidget_CloseEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_ContextMenuEvent(event *qt6.QContextMenuEvent) { + + C.QVideoWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnContextMenuEvent(slot func(super func(event *qt6.QContextMenuEvent), event *qt6.QContextMenuEvent)) { + C.QVideoWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ContextMenuEvent +func miqt_exec_callback_QVideoWidget_ContextMenuEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QContextMenuEvent), event *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_TabletEvent(event *qt6.QTabletEvent) { + + C.QVideoWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnTabletEvent(slot func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) { + C.QVideoWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_TabletEvent +func miqt_exec_callback_QVideoWidget_TabletEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_ActionEvent(event *qt6.QActionEvent) { + + C.QVideoWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnActionEvent(slot func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) { + C.QVideoWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ActionEvent +func miqt_exec_callback_QVideoWidget_ActionEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DragEnterEvent(event *qt6.QDragEnterEvent) { + + C.QVideoWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDragEnterEvent(slot func(super func(event *qt6.QDragEnterEvent), event *qt6.QDragEnterEvent)) { + C.QVideoWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DragEnterEvent +func miqt_exec_callback_QVideoWidget_DragEnterEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragEnterEvent), event *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DragMoveEvent(event *qt6.QDragMoveEvent) { + + C.QVideoWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDragMoveEvent(slot func(super func(event *qt6.QDragMoveEvent), event *qt6.QDragMoveEvent)) { + C.QVideoWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DragMoveEvent +func miqt_exec_callback_QVideoWidget_DragMoveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragMoveEvent), event *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DragLeaveEvent(event *qt6.QDragLeaveEvent) { + + C.QVideoWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDragLeaveEvent(slot func(super func(event *qt6.QDragLeaveEvent), event *qt6.QDragLeaveEvent)) { + C.QVideoWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DragLeaveEvent +func miqt_exec_callback_QVideoWidget_DragLeaveEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragLeaveEvent), event *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_DropEvent(event *qt6.QDropEvent) { + + C.QVideoWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QVideoWidget) OnDropEvent(slot func(super func(event *qt6.QDropEvent), event *qt6.QDropEvent)) { + C.QVideoWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_DropEvent +func miqt_exec_callback_QVideoWidget_DropEvent(self *C.QVideoWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDropEvent), event *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QVideoWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QVideoWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QVideoWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_NativeEvent +func miqt_exec_callback_QVideoWidget_NativeEvent(self *C.QVideoWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_ChangeEvent(param1 *qt6.QEvent) { + + C.QVideoWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QVideoWidget) OnChangeEvent(slot func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) { + C.QVideoWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_ChangeEvent +func miqt_exec_callback_QVideoWidget_ChangeEvent(self *C.QVideoWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QVideoWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QVideoWidget) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QVideoWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_Metric +func miqt_exec_callback_QVideoWidget_Metric(self *C.QVideoWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QVideoWidget) callVirtualBase_InitPainter(painter *qt6.QPainter) { + + C.QVideoWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QVideoWidget) OnInitPainter(slot func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) { + C.QVideoWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_InitPainter +func miqt_exec_callback_QVideoWidget_InitPainter(self *C.QVideoWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_Redirected(offset *qt6.QPoint) *qt6.QPaintDevice { + + return qt6.UnsafeNewQPaintDevice(unsafe.Pointer(C.QVideoWidget_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QVideoWidget) OnRedirected(slot func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) { + C.QVideoWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_Redirected +func miqt_exec_callback_QVideoWidget_Redirected(self *C.QVideoWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_SharedPainter() *qt6.QPainter { + + return qt6.UnsafeNewQPainter(unsafe.Pointer(C.QVideoWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QVideoWidget) OnSharedPainter(slot func(super func() *qt6.QPainter) *qt6.QPainter) { + C.QVideoWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_SharedPainter +func miqt_exec_callback_QVideoWidget_SharedPainter(self *C.QVideoWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPainter) *qt6.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_InputMethodEvent(param1 *qt6.QInputMethodEvent) { + + C.QVideoWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QVideoWidget) OnInputMethodEvent(slot func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) { + C.QVideoWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_InputMethodEvent +func miqt_exec_callback_QVideoWidget_InputMethodEvent(self *C.QVideoWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QVideoWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QVideoWidget) callVirtualBase_InputMethodQuery(param1 qt6.InputMethodQuery) *qt6.QVariant { + + _ret := C.QVideoWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QVideoWidget) OnInputMethodQuery(slot func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) { + C.QVideoWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_InputMethodQuery +func miqt_exec_callback_QVideoWidget_InputMethodQuery(self *C.QVideoWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QVideoWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QVideoWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QVideoWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QVideoWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QVideoWidget_FocusNextPrevChild +func miqt_exec_callback_QVideoWidget_FocusNextPrevChild(self *C.QVideoWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QVideoWidget) Delete() { - C.QVideoWidget_Delete(this.h) + C.QVideoWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qvideowidget.h b/qt6/multimedia/gen_qvideowidget.h index 47ffaa0e..850b70aa 100644 --- a/qt6/multimedia/gen_qvideowidget.h +++ b/qt6/multimedia/gen_qvideowidget.h @@ -15,21 +15,75 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; class QSize; +class QTabletEvent; +class QVariant; class QVideoSink; class QVideoWidget; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; typedef struct QVideoSink QVideoSink; typedef struct QVideoWidget QVideoWidget; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QVideoWidget* QVideoWidget_new(QWidget* parent); -QVideoWidget* QVideoWidget_new2(); +void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self); void* QVideoWidget_Metacast(QVideoWidget* self, const char* param1); struct miqt_string QVideoWidget_Tr(const char* s); @@ -42,9 +96,96 @@ void QVideoWidget_FullScreenChanged(QVideoWidget* self, bool fullScreen); void QVideoWidget_connect_FullScreenChanged(QVideoWidget* self, intptr_t slot); void QVideoWidget_AspectRatioModeChanged(QVideoWidget* self, int mode); void QVideoWidget_connect_AspectRatioModeChanged(QVideoWidget* self, intptr_t slot); +bool QVideoWidget_Event(QVideoWidget* self, QEvent* event); +void QVideoWidget_ShowEvent(QVideoWidget* self, QShowEvent* event); +void QVideoWidget_HideEvent(QVideoWidget* self, QHideEvent* event); +void QVideoWidget_ResizeEvent(QVideoWidget* self, QResizeEvent* event); +void QVideoWidget_MoveEvent(QVideoWidget* self, QMoveEvent* event); struct miqt_string QVideoWidget_Tr2(const char* s, const char* c); struct miqt_string QVideoWidget_Tr3(const char* s, const char* c, int n); -void QVideoWidget_Delete(QVideoWidget* self); +void QVideoWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QVideoWidget_virtualbase_SizeHint(const void* self); +void QVideoWidget_override_virtual_Event(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_Event(void* self, QEvent* event); +void QVideoWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QVideoWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QVideoWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QVideoWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QVideoWidget_override_virtual_DevType(void* self, intptr_t slot); +int QVideoWidget_virtualbase_DevType(const void* self); +void QVideoWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QVideoWidget_virtualbase_SetVisible(void* self, bool visible); +void QVideoWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QVideoWidget_virtualbase_MinimumSizeHint(const void* self); +void QVideoWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QVideoWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QVideoWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_HasHeightForWidth(const void* self); +void QVideoWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QVideoWidget_virtualbase_PaintEngine(const void* self); +void QVideoWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QVideoWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QVideoWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QVideoWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QVideoWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QVideoWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QVideoWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QVideoWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QVideoWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QVideoWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QVideoWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QVideoWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QVideoWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QVideoWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QVideoWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QVideoWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QVideoWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QVideoWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QVideoWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QVideoWidget_override_virtual_Metric(void* self, intptr_t slot); +int QVideoWidget_virtualbase_Metric(const void* self, int param1); +void QVideoWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QVideoWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QVideoWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QVideoWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QVideoWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QVideoWidget_virtualbase_SharedPainter(const void* self); +void QVideoWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QVideoWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QVideoWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QVideoWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QVideoWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QVideoWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QVideoWidget_Delete(QVideoWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/multimedia/gen_qwavedecoder.cpp b/qt6/multimedia/gen_qwavedecoder.cpp index 1adb5e0e..1de8b2b4 100644 --- a/qt6/multimedia/gen_qwavedecoder.cpp +++ b/qt6/multimedia/gen_qwavedecoder.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -10,20 +11,396 @@ #include "gen_qwavedecoder.h" #include "_cgo_export.h" -QWaveDecoder* QWaveDecoder_new(QIODevice* device) { - return new QWaveDecoder(device); +class MiqtVirtualQWaveDecoder : public virtual QWaveDecoder { +public: + + MiqtVirtualQWaveDecoder(QIODevice* device): QWaveDecoder(device) {}; + MiqtVirtualQWaveDecoder(QIODevice* device, const QAudioFormat& format): QWaveDecoder(device, format) {}; + MiqtVirtualQWaveDecoder(QIODevice* device, QObject* parent): QWaveDecoder(device, parent) {}; + MiqtVirtualQWaveDecoder(QIODevice* device, const QAudioFormat& format, QObject* parent): QWaveDecoder(device, format, parent) {}; + + virtual ~MiqtVirtualQWaveDecoder() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODevice::OpenMode mode) override { + if (handle__Open == 0) { + return QWaveDecoder::open(mode); + } + + QIODevice::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QWaveDecoder::open(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QWaveDecoder::close(); + return; + } + + + miqt_exec_callback_QWaveDecoder_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QWaveDecoder::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QWaveDecoder::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QWaveDecoder::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QWaveDecoder::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QWaveDecoder_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QWaveDecoder::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QWaveDecoder::size(); + } + + + long long callback_return_value = miqt_exec_callback_QWaveDecoder_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QWaveDecoder::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QWaveDecoder::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QWaveDecoder::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QWaveDecoder::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QWaveDecoder_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QWaveDecoder::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QWaveDecoder::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QWaveDecoder::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QWaveDecoder::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QWaveDecoder::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QWaveDecoder::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QWaveDecoder_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QWaveDecoder::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QWaveDecoder::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QWaveDecoder::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QWaveDecoder::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QWaveDecoder::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QWaveDecoder::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QWaveDecoder_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QWaveDecoder::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QWaveDecoder::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QWaveDecoder_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QWaveDecoder::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QWaveDecoder::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QWaveDecoder_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QWaveDecoder::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + +}; + +void QWaveDecoder_new(QIODevice* device, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device); + *outptr_QWaveDecoder = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QWaveDecoder* QWaveDecoder_new2(QIODevice* device, QAudioFormat* format) { - return new QWaveDecoder(device, *format); +void QWaveDecoder_new2(QIODevice* device, QAudioFormat* format, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device, *format); + *outptr_QWaveDecoder = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QWaveDecoder* QWaveDecoder_new3(QIODevice* device, QObject* parent) { - return new QWaveDecoder(device, parent); +void QWaveDecoder_new3(QIODevice* device, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device, parent); + *outptr_QWaveDecoder = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QWaveDecoder* QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent) { - return new QWaveDecoder(device, *format, parent); +void QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device, *format, parent); + *outptr_QWaveDecoder = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QWaveDecoder_MetaObject(const QWaveDecoder* self) { @@ -98,7 +475,7 @@ void QWaveDecoder_FormatKnown(QWaveDecoder* self) { } void QWaveDecoder_connect_FormatKnown(QWaveDecoder* self, intptr_t slot) { - QWaveDecoder::connect(self, static_cast(&QWaveDecoder::formatKnown), self, [=]() { + MiqtVirtualQWaveDecoder::connect(self, static_cast(&QWaveDecoder::formatKnown), self, [=]() { miqt_exec_callback_QWaveDecoder_FormatKnown(slot); }); } @@ -108,7 +485,7 @@ void QWaveDecoder_ParsingError(QWaveDecoder* self) { } void QWaveDecoder_connect_ParsingError(QWaveDecoder* self, intptr_t slot) { - QWaveDecoder::connect(self, static_cast(&QWaveDecoder::parsingError), self, [=]() { + MiqtVirtualQWaveDecoder::connect(self, static_cast(&QWaveDecoder::parsingError), self, [=]() { miqt_exec_callback_QWaveDecoder_ParsingError(slot); }); } @@ -135,7 +512,131 @@ struct miqt_string QWaveDecoder_Tr3(const char* s, const char* c, int n) { return _ms; } -void QWaveDecoder_Delete(QWaveDecoder* self) { - delete self; +void QWaveDecoder_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__Open = slot; +} + +bool QWaveDecoder_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_Open(mode); +} + +void QWaveDecoder_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__Close = slot; +} + +void QWaveDecoder_virtualbase_Close(void* self) { + ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_Close(); +} + +void QWaveDecoder_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__Seek = slot; +} + +bool QWaveDecoder_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_Seek(pos); +} + +void QWaveDecoder_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__Pos = slot; +} + +long long QWaveDecoder_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_Pos(); +} + +void QWaveDecoder_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__Size = slot; +} + +long long QWaveDecoder_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_Size(); +} + +void QWaveDecoder_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__IsSequential = slot; +} + +bool QWaveDecoder_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_IsSequential(); +} + +void QWaveDecoder_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__BytesAvailable = slot; +} + +long long QWaveDecoder_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_BytesAvailable(); +} + +void QWaveDecoder_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__AtEnd = slot; +} + +bool QWaveDecoder_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_AtEnd(); +} + +void QWaveDecoder_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__Reset = slot; +} + +bool QWaveDecoder_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_Reset(); +} + +void QWaveDecoder_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__BytesToWrite = slot; +} + +long long QWaveDecoder_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_BytesToWrite(); +} + +void QWaveDecoder_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__CanReadLine = slot; +} + +bool QWaveDecoder_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQWaveDecoder*)(self) )->virtualbase_CanReadLine(); +} + +void QWaveDecoder_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QWaveDecoder_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QWaveDecoder_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QWaveDecoder_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QWaveDecoder_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__ReadLineData = slot; +} + +long long QWaveDecoder_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QWaveDecoder_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QWaveDecoder*)(self) )->handle__SkipData = slot; +} + +long long QWaveDecoder_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQWaveDecoder*)(self) )->virtualbase_SkipData(maxSize); +} + +void QWaveDecoder_Delete(QWaveDecoder* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/multimedia/gen_qwavedecoder.go b/qt6/multimedia/gen_qwavedecoder.go index 473b8169..092de6f1 100644 --- a/qt6/multimedia/gen_qwavedecoder.go +++ b/qt6/multimedia/gen_qwavedecoder.go @@ -16,7 +16,8 @@ import ( ) type QWaveDecoder struct { - h *C.QWaveDecoder + h *C.QWaveDecoder + isSubclass bool *qt6.QIODevice } @@ -34,39 +35,75 @@ func (this *QWaveDecoder) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQWaveDecoder(h *C.QWaveDecoder) *QWaveDecoder { +// newQWaveDecoder constructs the type using only CGO pointers. +func newQWaveDecoder(h *C.QWaveDecoder, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QWaveDecoder { if h == nil { return nil } - return &QWaveDecoder{h: h, QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QWaveDecoder{h: h, + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} } -func UnsafeNewQWaveDecoder(h unsafe.Pointer) *QWaveDecoder { - return newQWaveDecoder((*C.QWaveDecoder)(h)) +// UnsafeNewQWaveDecoder constructs the type using only unsafe pointers. +func UnsafeNewQWaveDecoder(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QWaveDecoder { + if h == nil { + return nil + } + + return &QWaveDecoder{h: (*C.QWaveDecoder)(h), + QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQWaveDecoder constructs a new QWaveDecoder object. func NewQWaveDecoder(device *qt6.QIODevice) *QWaveDecoder { - ret := C.QWaveDecoder_new((*C.QIODevice)(device.UnsafePointer())) - return newQWaveDecoder(ret) + var outptr_QWaveDecoder *C.QWaveDecoder = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QWaveDecoder_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQWaveDecoder2 constructs a new QWaveDecoder object. func NewQWaveDecoder2(device *qt6.QIODevice, format *QAudioFormat) *QWaveDecoder { - ret := C.QWaveDecoder_new2((*C.QIODevice)(device.UnsafePointer()), format.cPointer()) - return newQWaveDecoder(ret) + var outptr_QWaveDecoder *C.QWaveDecoder = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QWaveDecoder_new2((*C.QIODevice)(device.UnsafePointer()), format.cPointer(), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQWaveDecoder3 constructs a new QWaveDecoder object. func NewQWaveDecoder3(device *qt6.QIODevice, parent *qt6.QObject) *QWaveDecoder { - ret := C.QWaveDecoder_new3((*C.QIODevice)(device.UnsafePointer()), (*C.QObject)(parent.UnsafePointer())) - return newQWaveDecoder(ret) + var outptr_QWaveDecoder *C.QWaveDecoder = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QWaveDecoder_new3((*C.QIODevice)(device.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQWaveDecoder4 constructs a new QWaveDecoder object. func NewQWaveDecoder4(device *qt6.QIODevice, format *QAudioFormat, parent *qt6.QObject) *QWaveDecoder { - ret := C.QWaveDecoder_new4((*C.QIODevice)(device.UnsafePointer()), format.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQWaveDecoder(ret) + var outptr_QWaveDecoder *C.QWaveDecoder = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QWaveDecoder_new4((*C.QIODevice)(device.UnsafePointer()), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QWaveDecoder) MetaObject() *qt6.QMetaObject { @@ -96,7 +133,7 @@ func (this *QWaveDecoder) AudioFormat() *QAudioFormat { } func (this *QWaveDecoder) GetDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QWaveDecoder_GetDevice(this.h))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QWaveDecoder_GetDevice(this.h)), nil, nil) } func (this *QWaveDecoder) Duration() int { @@ -191,9 +228,360 @@ func QWaveDecoder_Tr3(s string, c string, n int) string { return _ret } +func (this *QWaveDecoder) callVirtualBase_Open(mode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QWaveDecoder_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QWaveDecoder) OnOpen(slot func(super func(mode qt6.QIODeviceBase__OpenModeFlag) bool, mode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QWaveDecoder_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_Open +func miqt_exec_callback_QWaveDecoder_Open(self *C.QWaveDecoder, cb C.intptr_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode qt6.QIODeviceBase__OpenModeFlag) bool, mode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QIODeviceBase__OpenModeFlag)(mode) + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_Close() { + + C.QWaveDecoder_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QWaveDecoder) OnClose(slot func(super func())) { + C.QWaveDecoder_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_Close +func miqt_exec_callback_QWaveDecoder_Close(self *C.QWaveDecoder, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWaveDecoder{h: self}).callVirtualBase_Close) + +} + +func (this *QWaveDecoder) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QWaveDecoder_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QWaveDecoder) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QWaveDecoder_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_Seek +func miqt_exec_callback_QWaveDecoder_Seek(self *C.QWaveDecoder, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_Pos() int64 { + + return (int64)(C.QWaveDecoder_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnPos(slot func(super func() int64) int64) { + C.QWaveDecoder_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_Pos +func miqt_exec_callback_QWaveDecoder_Pos(self *C.QWaveDecoder, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_Size() int64 { + + return (int64)(C.QWaveDecoder_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnSize(slot func(super func() int64) int64) { + C.QWaveDecoder_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_Size +func miqt_exec_callback_QWaveDecoder_Size(self *C.QWaveDecoder, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_IsSequential() bool { + + return (bool)(C.QWaveDecoder_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnIsSequential(slot func(super func() bool) bool) { + C.QWaveDecoder_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_IsSequential +func miqt_exec_callback_QWaveDecoder_IsSequential(self *C.QWaveDecoder, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QWaveDecoder_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnBytesAvailable(slot func(super func() int64) int64) { + C.QWaveDecoder_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_BytesAvailable +func miqt_exec_callback_QWaveDecoder_BytesAvailable(self *C.QWaveDecoder, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_AtEnd() bool { + + return (bool)(C.QWaveDecoder_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnAtEnd(slot func(super func() bool) bool) { + C.QWaveDecoder_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_AtEnd +func miqt_exec_callback_QWaveDecoder_AtEnd(self *C.QWaveDecoder, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_Reset() bool { + + return (bool)(C.QWaveDecoder_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnReset(slot func(super func() bool) bool) { + C.QWaveDecoder_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_Reset +func miqt_exec_callback_QWaveDecoder_Reset(self *C.QWaveDecoder, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QWaveDecoder_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnBytesToWrite(slot func(super func() int64) int64) { + C.QWaveDecoder_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_BytesToWrite +func miqt_exec_callback_QWaveDecoder_BytesToWrite(self *C.QWaveDecoder, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QWaveDecoder_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QWaveDecoder) OnCanReadLine(slot func(super func() bool) bool) { + C.QWaveDecoder_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_CanReadLine +func miqt_exec_callback_QWaveDecoder_CanReadLine(self *C.QWaveDecoder, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QWaveDecoder_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QWaveDecoder) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QWaveDecoder_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_WaitForReadyRead +func miqt_exec_callback_QWaveDecoder_WaitForReadyRead(self *C.QWaveDecoder, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QWaveDecoder_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QWaveDecoder) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QWaveDecoder_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_WaitForBytesWritten +func miqt_exec_callback_QWaveDecoder_WaitForBytesWritten(self *C.QWaveDecoder, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QWaveDecoder_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QWaveDecoder) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QWaveDecoder_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_ReadLineData +func miqt_exec_callback_QWaveDecoder_ReadLineData(self *C.QWaveDecoder, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QWaveDecoder) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QWaveDecoder_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QWaveDecoder) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QWaveDecoder_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWaveDecoder_SkipData +func miqt_exec_callback_QWaveDecoder_SkipData(self *C.QWaveDecoder, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QWaveDecoder{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QWaveDecoder) Delete() { - C.QWaveDecoder_Delete(this.h) + C.QWaveDecoder_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/multimedia/gen_qwavedecoder.h b/qt6/multimedia/gen_qwavedecoder.h index 0028c13c..6784db0c 100644 --- a/qt6/multimedia/gen_qwavedecoder.h +++ b/qt6/multimedia/gen_qwavedecoder.h @@ -17,21 +17,23 @@ extern "C" { #ifdef __cplusplus class QAudioFormat; class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; class QWaveDecoder; #else typedef struct QAudioFormat QAudioFormat; typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QWaveDecoder QWaveDecoder; #endif -QWaveDecoder* QWaveDecoder_new(QIODevice* device); -QWaveDecoder* QWaveDecoder_new2(QIODevice* device, QAudioFormat* format); -QWaveDecoder* QWaveDecoder_new3(QIODevice* device, QObject* parent); -QWaveDecoder* QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent); +void QWaveDecoder_new(QIODevice* device, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QWaveDecoder_new2(QIODevice* device, QAudioFormat* format, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QWaveDecoder_new3(QIODevice* device, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QWaveDecoder_MetaObject(const QWaveDecoder* self); void* QWaveDecoder_Metacast(QWaveDecoder* self, const char* param1); struct miqt_string QWaveDecoder_Tr(const char* s); @@ -52,7 +54,37 @@ void QWaveDecoder_ParsingError(QWaveDecoder* self); void QWaveDecoder_connect_ParsingError(QWaveDecoder* self, intptr_t slot); struct miqt_string QWaveDecoder_Tr2(const char* s, const char* c); struct miqt_string QWaveDecoder_Tr3(const char* s, const char* c, int n); -void QWaveDecoder_Delete(QWaveDecoder* self); +void QWaveDecoder_override_virtual_Open(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_Open(void* self, int mode); +void QWaveDecoder_override_virtual_Close(void* self, intptr_t slot); +void QWaveDecoder_virtualbase_Close(void* self); +void QWaveDecoder_override_virtual_Seek(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_Seek(void* self, long long pos); +void QWaveDecoder_override_virtual_Pos(void* self, intptr_t slot); +long long QWaveDecoder_virtualbase_Pos(const void* self); +void QWaveDecoder_override_virtual_Size(void* self, intptr_t slot); +long long QWaveDecoder_virtualbase_Size(const void* self); +void QWaveDecoder_override_virtual_IsSequential(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_IsSequential(const void* self); +void QWaveDecoder_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QWaveDecoder_virtualbase_BytesAvailable(const void* self); +void QWaveDecoder_override_virtual_AtEnd(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_AtEnd(const void* self); +void QWaveDecoder_override_virtual_Reset(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_Reset(void* self); +void QWaveDecoder_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QWaveDecoder_virtualbase_BytesToWrite(const void* self); +void QWaveDecoder_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_CanReadLine(const void* self); +void QWaveDecoder_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_WaitForReadyRead(void* self, int msecs); +void QWaveDecoder_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QWaveDecoder_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QWaveDecoder_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QWaveDecoder_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QWaveDecoder_override_virtual_SkipData(void* self, intptr_t slot); +long long QWaveDecoder_virtualbase_SkipData(void* self, long long maxSize); +void QWaveDecoder_Delete(QWaveDecoder* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qabstractnetworkcache.cpp b/qt6/network/gen_qabstractnetworkcache.cpp index d2baddea..b2d490f7 100644 --- a/qt6/network/gen_qabstractnetworkcache.cpp +++ b/qt6/network/gen_qabstractnetworkcache.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -14,12 +15,14 @@ #include "gen_qabstractnetworkcache.h" #include "_cgo_export.h" -QNetworkCacheMetaData* QNetworkCacheMetaData_new() { - return new QNetworkCacheMetaData(); +void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { + QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(); + *outptr_QNetworkCacheMetaData = ret; } -QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other) { - return new QNetworkCacheMetaData(*other); +void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { + QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(*other); + *outptr_QNetworkCacheMetaData = ret; } void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other) { @@ -154,8 +157,12 @@ void QNetworkCacheMetaData_SetAttributes(QNetworkCacheMetaData* self, struct miq self->setAttributes(attributes_QMap); } -void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self) { - delete self; +void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self) { @@ -232,7 +239,11 @@ struct miqt_string QAbstractNetworkCache_Tr3(const char* s, const char* c, int n return _ms; } -void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self) { - delete self; +void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qabstractnetworkcache.go b/qt6/network/gen_qabstractnetworkcache.go index 27aeedd0..100a4576 100644 --- a/qt6/network/gen_qabstractnetworkcache.go +++ b/qt6/network/gen_qabstractnetworkcache.go @@ -15,7 +15,8 @@ import ( ) type QNetworkCacheMetaData struct { - h *C.QNetworkCacheMetaData + h *C.QNetworkCacheMetaData + isSubclass bool } func (this *QNetworkCacheMetaData) cPointer() *C.QNetworkCacheMetaData { @@ -32,6 +33,7 @@ func (this *QNetworkCacheMetaData) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkCacheMetaData constructs the type using only CGO pointers. func newQNetworkCacheMetaData(h *C.QNetworkCacheMetaData) *QNetworkCacheMetaData { if h == nil { return nil @@ -39,20 +41,33 @@ func newQNetworkCacheMetaData(h *C.QNetworkCacheMetaData) *QNetworkCacheMetaData return &QNetworkCacheMetaData{h: h} } +// UnsafeNewQNetworkCacheMetaData constructs the type using only unsafe pointers. func UnsafeNewQNetworkCacheMetaData(h unsafe.Pointer) *QNetworkCacheMetaData { - return newQNetworkCacheMetaData((*C.QNetworkCacheMetaData)(h)) + if h == nil { + return nil + } + + return &QNetworkCacheMetaData{h: (*C.QNetworkCacheMetaData)(h)} } // NewQNetworkCacheMetaData constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData() *QNetworkCacheMetaData { - ret := C.QNetworkCacheMetaData_new() - return newQNetworkCacheMetaData(ret) + var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil + + C.QNetworkCacheMetaData_new(&outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret.isSubclass = true + return ret } // NewQNetworkCacheMetaData2 constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData2(other *QNetworkCacheMetaData) *QNetworkCacheMetaData { - ret := C.QNetworkCacheMetaData_new2(other.cPointer()) - return newQNetworkCacheMetaData(ret) + var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil + + C.QNetworkCacheMetaData_new2(other.cPointer(), &outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret.isSubclass = true + return ret } func (this *QNetworkCacheMetaData) OperatorAssign(other *QNetworkCacheMetaData) { @@ -215,7 +230,7 @@ func (this *QNetworkCacheMetaData) SetAttributes(attributes map[QNetworkRequest_ // Delete this object from C++ memory. func (this *QNetworkCacheMetaData) Delete() { - C.QNetworkCacheMetaData_Delete(this.h) + C.QNetworkCacheMetaData_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -228,7 +243,8 @@ func (this *QNetworkCacheMetaData) GoGC() { } type QAbstractNetworkCache struct { - h *C.QAbstractNetworkCache + h *C.QAbstractNetworkCache + isSubclass bool *qt6.QObject } @@ -246,15 +262,23 @@ func (this *QAbstractNetworkCache) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractNetworkCache(h *C.QAbstractNetworkCache) *QAbstractNetworkCache { +// newQAbstractNetworkCache constructs the type using only CGO pointers. +func newQAbstractNetworkCache(h *C.QAbstractNetworkCache, h_QObject *C.QObject) *QAbstractNetworkCache { if h == nil { return nil } - return &QAbstractNetworkCache{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAbstractNetworkCache{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer) *QAbstractNetworkCache { - return newQAbstractNetworkCache((*C.QAbstractNetworkCache)(h)) +// UnsafeNewQAbstractNetworkCache constructs the type using only unsafe pointers. +func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractNetworkCache { + if h == nil { + return nil + } + + return &QAbstractNetworkCache{h: (*C.QAbstractNetworkCache)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } func (this *QAbstractNetworkCache) MetaObject() *qt6.QMetaObject { @@ -288,7 +312,7 @@ func (this *QAbstractNetworkCache) UpdateMetaData(metaData *QNetworkCacheMetaDat } func (this *QAbstractNetworkCache) Data(url *qt6.QUrl) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil, nil) } func (this *QAbstractNetworkCache) Remove(url *qt6.QUrl) bool { @@ -300,7 +324,7 @@ func (this *QAbstractNetworkCache) CacheSize() int64 { } func (this *QAbstractNetworkCache) Prepare(metaData *QNetworkCacheMetaData) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer()))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer())), nil, nil) } func (this *QAbstractNetworkCache) Insert(device *qt6.QIODevice) { @@ -335,7 +359,7 @@ func QAbstractNetworkCache_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QAbstractNetworkCache) Delete() { - C.QAbstractNetworkCache_Delete(this.h) + C.QAbstractNetworkCache_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qabstractnetworkcache.h b/qt6/network/gen_qabstractnetworkcache.h index ef79a374..ce6fdca3 100644 --- a/qt6/network/gen_qabstractnetworkcache.h +++ b/qt6/network/gen_qabstractnetworkcache.h @@ -20,6 +20,7 @@ class QDateTime; class QIODevice; class QMetaObject; class QNetworkCacheMetaData; +class QObject; class QUrl; class QVariant; #else @@ -28,12 +29,13 @@ typedef struct QDateTime QDateTime; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkCacheMetaData QNetworkCacheMetaData; +typedef struct QObject QObject; typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QNetworkCacheMetaData* QNetworkCacheMetaData_new(); -QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other); +void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); +void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); void QNetworkCacheMetaData_Swap(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); bool QNetworkCacheMetaData_OperatorEqual(const QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); @@ -51,7 +53,7 @@ bool QNetworkCacheMetaData_SaveToDisk(const QNetworkCacheMetaData* self); void QNetworkCacheMetaData_SetSaveToDisk(QNetworkCacheMetaData* self, bool allow); struct miqt_map /* of int to QVariant* */ QNetworkCacheMetaData_Attributes(const QNetworkCacheMetaData* self); void QNetworkCacheMetaData_SetAttributes(QNetworkCacheMetaData* self, struct miqt_map /* of int to QVariant* */ attributes); -void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self); +void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass); QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self); void* QAbstractNetworkCache_Metacast(QAbstractNetworkCache* self, const char* param1); @@ -66,7 +68,7 @@ void QAbstractNetworkCache_Insert(QAbstractNetworkCache* self, QIODevice* device void QAbstractNetworkCache_Clear(QAbstractNetworkCache* self); struct miqt_string QAbstractNetworkCache_Tr2(const char* s, const char* c); struct miqt_string QAbstractNetworkCache_Tr3(const char* s, const char* c, int n); -void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self); +void QAbstractNetworkCache_Delete(QAbstractNetworkCache* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qabstractsocket.cpp b/qt6/network/gen_qabstractsocket.cpp index 12656b8b..fbb39ccf 100644 --- a/qt6/network/gen_qabstractsocket.cpp +++ b/qt6/network/gen_qabstractsocket.cpp @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include #include @@ -12,8 +14,708 @@ #include "gen_qabstractsocket.h" #include "_cgo_export.h" -QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent) { - return new QAbstractSocket(static_cast(socketType), parent); +class MiqtVirtualQAbstractSocket : public virtual QAbstractSocket { +public: + + MiqtVirtualQAbstractSocket(QAbstractSocket::SocketType socketType, QObject* parent): QAbstractSocket(socketType, parent) {}; + + virtual ~MiqtVirtualQAbstractSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QAbstractSocket::resume(); + return; + } + + + miqt_exec_callback_QAbstractSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QAbstractSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(const QHostAddress& address, quint16 port, QAbstractSocket::BindMode mode) override { + if (handle__Bind == 0) { + return QAbstractSocket::bind(address, port, mode); + } + + const QHostAddress& address_ret = address; + // Cast returned reference into pointer + QHostAddress* sigval1 = const_cast(&address_ret); + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QAbstractSocket::BindMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Bind(this, handle__Bind, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QHostAddress* address, uint16_t port, int mode) { + + return QAbstractSocket::bind(*address, static_cast(port), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODeviceBase::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QAbstractSocket::connectToHost(hostName, port, mode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODeviceBase::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QAbstractSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QAbstractSocket::connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QAbstractSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QAbstractSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QAbstractSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QAbstractSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QAbstractSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QAbstractSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QAbstractSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QAbstractSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QAbstractSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QAbstractSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual qintptr socketDescriptor() const override { + if (handle__SocketDescriptor == 0) { + return QAbstractSocket::socketDescriptor(); + } + + + intptr_t callback_return_value = miqt_exec_callback_QAbstractSocket_SocketDescriptor(const_cast(this), handle__SocketDescriptor); + + return (qintptr)(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_SocketDescriptor() const { + + qintptr _ret = QAbstractSocket::socketDescriptor(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODeviceBase::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QAbstractSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QAbstractSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QAbstractSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QAbstractSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QAbstractSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QAbstractSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QAbstractSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QAbstractSocket::close(); + return; + } + + + miqt_exec_callback_QAbstractSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QAbstractSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QAbstractSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QAbstractSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QAbstractSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QAbstractSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QAbstractSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QAbstractSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QAbstractSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QAbstractSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QAbstractSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QAbstractSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QAbstractSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QAbstractSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QAbstractSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QAbstractSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QAbstractSocket::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QAbstractSocket::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QAbstractSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QAbstractSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode mode) override { + if (handle__Open == 0) { + return QAbstractSocket::open(mode); + } + + QIODeviceBase::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QAbstractSocket::open(static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QAbstractSocket::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QAbstractSocket::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QAbstractSocket::size(); + } + + + long long callback_return_value = miqt_exec_callback_QAbstractSocket_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QAbstractSocket::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QAbstractSocket::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QAbstractSocket::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QAbstractSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QAbstractSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QAbstractSocket::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QAbstractSocket::reset(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QAbstractSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QAbstractSocket::canReadLine(); + + } + +}; + +void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQAbstractSocket* ret = new MiqtVirtualQAbstractSocket(static_cast(socketType), parent); + *outptr_QAbstractSocket = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self) { @@ -48,17 +750,17 @@ void QAbstractSocket_SetPauseMode(QAbstractSocket* self, int pauseMode) { self->setPauseMode(static_cast(pauseMode)); } -bool QAbstractSocket_Bind(QAbstractSocket* self, QHostAddress* address) { - return self->bind(*address); +bool QAbstractSocket_Bind(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode) { + return self->bind(*address, static_cast(port), static_cast(mode)); } bool QAbstractSocket_Bind2(QAbstractSocket* self) { return self->bind(); } -void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port) { +void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port)); + self->connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); } void QAbstractSocket_ConnectToHost2(QAbstractSocket* self, QHostAddress* address, uint16_t port) { @@ -130,8 +832,8 @@ intptr_t QAbstractSocket_SocketDescriptor(const QAbstractSocket* self) { return static_cast(_ret); } -bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor) { - return self->setSocketDescriptor((qintptr)(socketDescriptor)); +bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode) { + return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); } void QAbstractSocket_SetSocketOption(QAbstractSocket* self, int option, QVariant* value) { @@ -169,20 +871,20 @@ bool QAbstractSocket_Flush(QAbstractSocket* self) { return self->flush(); } -bool QAbstractSocket_WaitForConnected(QAbstractSocket* self) { - return self->waitForConnected(); +bool QAbstractSocket_WaitForConnected(QAbstractSocket* self, int msecs) { + return self->waitForConnected(static_cast(msecs)); } -bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self) { - return self->waitForReadyRead(); +bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } -bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self) { - return self->waitForBytesWritten(); +bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } -bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self) { - return self->waitForDisconnected(); +bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self, int msecs) { + return self->waitForDisconnected(static_cast(msecs)); } void QAbstractSocket_SetProxy(QAbstractSocket* self, QNetworkProxy* networkProxy) { @@ -214,7 +916,7 @@ void QAbstractSocket_HostFound(QAbstractSocket* self) { } void QAbstractSocket_connect_HostFound(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::hostFound), self, [=]() { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::hostFound), self, [=]() { miqt_exec_callback_QAbstractSocket_HostFound(slot); }); } @@ -224,7 +926,7 @@ void QAbstractSocket_Connected(QAbstractSocket* self) { } void QAbstractSocket_connect_Connected(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::connected), self, [=]() { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::connected), self, [=]() { miqt_exec_callback_QAbstractSocket_Connected(slot); }); } @@ -234,7 +936,7 @@ void QAbstractSocket_Disconnected(QAbstractSocket* self) { } void QAbstractSocket_connect_Disconnected(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::disconnected), self, [=]() { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::disconnected), self, [=]() { miqt_exec_callback_QAbstractSocket_Disconnected(slot); }); } @@ -244,7 +946,7 @@ void QAbstractSocket_StateChanged(QAbstractSocket* self, int param1) { } void QAbstractSocket_connect_StateChanged(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::stateChanged), self, [=](QAbstractSocket::SocketState param1) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::stateChanged), self, [=](QAbstractSocket::SocketState param1) { QAbstractSocket::SocketState param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractSocket_StateChanged(slot, sigval1); @@ -256,7 +958,7 @@ void QAbstractSocket_ErrorOccurred(QAbstractSocket* self, int param1) { } void QAbstractSocket_connect_ErrorOccurred(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::errorOccurred), self, [=](QAbstractSocket::SocketError param1) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::errorOccurred), self, [=](QAbstractSocket::SocketError param1) { QAbstractSocket::SocketError param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractSocket_ErrorOccurred(slot, sigval1); @@ -268,7 +970,7 @@ void QAbstractSocket_ProxyAuthenticationRequired(QAbstractSocket* self, QNetwork } void QAbstractSocket_connect_ProxyAuthenticationRequired(QAbstractSocket* self, intptr_t slot) { - QAbstractSocket::connect(self, static_cast(&QAbstractSocket::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { + MiqtVirtualQAbstractSocket::connect(self, static_cast(&QAbstractSocket::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { const QNetworkProxy& proxy_ret = proxy; // Cast returned reference into pointer QNetworkProxy* sigval1 = const_cast(&proxy_ret); @@ -299,61 +1001,247 @@ struct miqt_string QAbstractSocket_Tr3(const char* s, const char* c, int n) { return _ms; } -bool QAbstractSocket_Bind22(QAbstractSocket* self, QHostAddress* address, uint16_t port) { - return self->bind(*address, static_cast(port)); +bool QAbstractSocket_Bind1(QAbstractSocket* self, uint16_t port) { + return self->bind(static_cast(port)); } -bool QAbstractSocket_Bind3(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode) { - return self->bind(*address, static_cast(port), static_cast(mode)); +bool QAbstractSocket_Bind22(QAbstractSocket* self, uint16_t port, int mode) { + return self->bind(static_cast(port), static_cast(mode)); } -bool QAbstractSocket_Bind1(QAbstractSocket* self, uint16_t port) { - return self->bind(static_cast(port)); +void QAbstractSocket_ConnectToHost3(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode) { + self->connectToHost(*address, static_cast(port), static_cast(mode)); } -bool QAbstractSocket_Bind23(QAbstractSocket* self, uint16_t port, int mode) { - return self->bind(static_cast(port), static_cast(mode)); +void QAbstractSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Resume = slot; } -void QAbstractSocket_ConnectToHost3(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(mode)); +void QAbstractSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Resume(); } -void QAbstractSocket_ConnectToHost4(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); +void QAbstractSocket_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Bind = slot; } -void QAbstractSocket_ConnectToHost32(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode) { - self->connectToHost(*address, static_cast(port), static_cast(mode)); +bool QAbstractSocket_virtualbase_Bind(void* self, QHostAddress* address, uint16_t port, int mode) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Bind(address, port, mode); } -bool QAbstractSocket_SetSocketDescriptor2(QAbstractSocket* self, intptr_t socketDescriptor, int state) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state)); +void QAbstractSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ConnectToHost = slot; } -bool QAbstractSocket_SetSocketDescriptor3(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); +void QAbstractSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, mode, protocol); } -bool QAbstractSocket_WaitForConnected1(QAbstractSocket* self, int msecs) { - return self->waitForConnected(static_cast(msecs)); +void QAbstractSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__DisconnectFromHost = slot; } -bool QAbstractSocket_WaitForReadyRead1(QAbstractSocket* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); +void QAbstractSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_DisconnectFromHost(); } -bool QAbstractSocket_WaitForBytesWritten1(QAbstractSocket* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); +void QAbstractSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__BytesAvailable = slot; } -bool QAbstractSocket_WaitForDisconnected1(QAbstractSocket* self, int msecs) { - return self->waitForDisconnected(static_cast(msecs)); +long long QAbstractSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QAbstractSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QAbstractSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QAbstractSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QAbstractSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QAbstractSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SocketDescriptor = slot; +} + +intptr_t QAbstractSocket_virtualbase_SocketDescriptor(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SocketDescriptor(); +} + +void QAbstractSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QAbstractSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QAbstractSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QAbstractSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QAbstractSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QAbstractSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QAbstractSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Close = slot; +} + +void QAbstractSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Close(); +} + +void QAbstractSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__IsSequential = slot; +} + +bool QAbstractSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_IsSequential(); +} + +void QAbstractSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QAbstractSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QAbstractSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QAbstractSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QAbstractSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QAbstractSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QAbstractSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QAbstractSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QAbstractSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ReadData = slot; +} + +long long QAbstractSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QAbstractSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QAbstractSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QAbstractSocket_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__SkipData = slot; +} + +long long QAbstractSocket_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_SkipData(maxSize); +} + +void QAbstractSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__WriteData = slot; +} + +long long QAbstractSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QAbstractSocket_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Open = slot; +} + +bool QAbstractSocket_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Open(mode); +} + +void QAbstractSocket_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Pos = slot; +} + +long long QAbstractSocket_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Pos(); +} + +void QAbstractSocket_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Size = slot; +} + +long long QAbstractSocket_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Size(); +} + +void QAbstractSocket_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Seek = slot; +} + +bool QAbstractSocket_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Seek(pos); +} + +void QAbstractSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__AtEnd = slot; +} + +bool QAbstractSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_AtEnd(); +} + +void QAbstractSocket_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__Reset = slot; +} + +bool QAbstractSocket_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQAbstractSocket*)(self) )->virtualbase_Reset(); +} + +void QAbstractSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QAbstractSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQAbstractSocket*)(self) )->virtualbase_CanReadLine(); } -void QAbstractSocket_Delete(QAbstractSocket* self) { - delete self; +void QAbstractSocket_Delete(QAbstractSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qabstractsocket.go b/qt6/network/gen_qabstractsocket.go index 19f0da18..9486dc9c 100644 --- a/qt6/network/gen_qabstractsocket.go +++ b/qt6/network/gen_qabstractsocket.go @@ -104,7 +104,8 @@ const ( ) type QAbstractSocket struct { - h *C.QAbstractSocket + h *C.QAbstractSocket + isSubclass bool *qt6.QIODevice } @@ -122,21 +123,36 @@ func (this *QAbstractSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractSocket(h *C.QAbstractSocket) *QAbstractSocket { +// newQAbstractSocket constructs the type using only CGO pointers. +func newQAbstractSocket(h *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QAbstractSocket { if h == nil { return nil } - return &QAbstractSocket{h: h, QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QAbstractSocket{h: h, + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} } -func UnsafeNewQAbstractSocket(h unsafe.Pointer) *QAbstractSocket { - return newQAbstractSocket((*C.QAbstractSocket)(h)) +// UnsafeNewQAbstractSocket constructs the type using only unsafe pointers. +func UnsafeNewQAbstractSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QAbstractSocket { + if h == nil { + return nil + } + + return &QAbstractSocket{h: (*C.QAbstractSocket)(h), + QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQAbstractSocket constructs a new QAbstractSocket object. func NewQAbstractSocket(socketType QAbstractSocket__SocketType, parent *qt6.QObject) *QAbstractSocket { - ret := C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer())) - return newQAbstractSocket(ret) + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQAbstractSocket(outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QAbstractSocket) MetaObject() *qt6.QMetaObject { @@ -170,20 +186,20 @@ func (this *QAbstractSocket) SetPauseMode(pauseMode QAbstractSocket__PauseMode) C.QAbstractSocket_SetPauseMode(this.h, (C.int)(pauseMode)) } -func (this *QAbstractSocket) Bind(address *QHostAddress) bool { - return (bool)(C.QAbstractSocket_Bind(this.h, address.cPointer())) +func (this *QAbstractSocket) Bind(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool { + return (bool)(C.QAbstractSocket_Bind(this.h, address.cPointer(), (C.uint16_t)(port), (C.int)(mode))) } func (this *QAbstractSocket) Bind2() bool { return (bool)(C.QAbstractSocket_Bind2(this.h)) } -func (this *QAbstractSocket) ConnectToHost(hostName string, port uint16) { +func (this *QAbstractSocket) ConnectToHost(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { hostName_ms := C.struct_miqt_string{} hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QAbstractSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port)) + C.QAbstractSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) } func (this *QAbstractSocket) ConnectToHost2(address *QHostAddress, port uint16) { @@ -251,8 +267,8 @@ func (this *QAbstractSocket) SocketDescriptor() uintptr { return (uintptr)(C.QAbstractSocket_SocketDescriptor(this.h)) } -func (this *QAbstractSocket) SetSocketDescriptor(socketDescriptor uintptr) bool { - return (bool)(C.QAbstractSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor))) +func (this *QAbstractSocket) SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { + return (bool)(C.QAbstractSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) } func (this *QAbstractSocket) SetSocketOption(option QAbstractSocket__SocketOption, value *qt6.QVariant) { @@ -290,20 +306,20 @@ func (this *QAbstractSocket) Flush() bool { return (bool)(C.QAbstractSocket_Flush(this.h)) } -func (this *QAbstractSocket) WaitForConnected() bool { - return (bool)(C.QAbstractSocket_WaitForConnected(this.h)) +func (this *QAbstractSocket) WaitForConnected(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForConnected(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForReadyRead() bool { - return (bool)(C.QAbstractSocket_WaitForReadyRead(this.h)) +func (this *QAbstractSocket) WaitForReadyRead(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForReadyRead(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForBytesWritten() bool { - return (bool)(C.QAbstractSocket_WaitForBytesWritten(this.h)) +func (this *QAbstractSocket) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForBytesWritten(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForDisconnected() bool { - return (bool)(C.QAbstractSocket_WaitForDisconnected(this.h)) +func (this *QAbstractSocket) WaitForDisconnected(msecs int) bool { + return (bool)(C.QAbstractSocket_WaitForDisconnected(this.h, (C.int)(msecs))) } func (this *QAbstractSocket) SetProxy(networkProxy *QNetworkProxy) { @@ -466,69 +482,712 @@ func QAbstractSocket_Tr3(s string, c string, n int) string { return _ret } -func (this *QAbstractSocket) Bind22(address *QHostAddress, port uint16) bool { - return (bool)(C.QAbstractSocket_Bind22(this.h, address.cPointer(), (C.uint16_t)(port))) +func (this *QAbstractSocket) Bind1(port uint16) bool { + return (bool)(C.QAbstractSocket_Bind1(this.h, (C.uint16_t)(port))) } -func (this *QAbstractSocket) Bind3(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool { - return (bool)(C.QAbstractSocket_Bind3(this.h, address.cPointer(), (C.uint16_t)(port), (C.int)(mode))) +func (this *QAbstractSocket) Bind22(port uint16, mode QAbstractSocket__BindFlag) bool { + return (bool)(C.QAbstractSocket_Bind22(this.h, (C.uint16_t)(port), (C.int)(mode))) } -func (this *QAbstractSocket) Bind1(port uint16) bool { - return (bool)(C.QAbstractSocket_Bind1(this.h, (C.uint16_t)(port))) +func (this *QAbstractSocket) ConnectToHost3(address *QHostAddress, port uint16, mode qt6.QIODeviceBase__OpenModeFlag) { + C.QAbstractSocket_ConnectToHost3(this.h, address.cPointer(), (C.uint16_t)(port), (C.int)(mode)) } -func (this *QAbstractSocket) Bind23(port uint16, mode QAbstractSocket__BindFlag) bool { - return (bool)(C.QAbstractSocket_Bind23(this.h, (C.uint16_t)(port), (C.int)(mode))) +func (this *QAbstractSocket) callVirtualBase_Resume() { + + C.QAbstractSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSocket) OnResume(slot func(super func())) { + C.QAbstractSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QAbstractSocket) ConnectToHost3(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag) { - hostName_ms := C.struct_miqt_string{} - hostName_ms.data = C.CString(hostName) - hostName_ms.len = C.size_t(len(hostName)) - defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QAbstractSocket_ConnectToHost3(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(mode)) +//export miqt_exec_callback_QAbstractSocket_Resume +func miqt_exec_callback_QAbstractSocket_Resume(self *C.QAbstractSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QAbstractSocket) callVirtualBase_Bind(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool { + + return (bool)(C.QAbstractSocket_virtualbase_Bind(unsafe.Pointer(this.h), address.cPointer(), (C.uint16_t)(port), (C.int)(mode))) + } +func (this *QAbstractSocket) OnBind(slot func(super func(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool, address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool) { + C.QAbstractSocket_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Bind +func miqt_exec_callback_QAbstractSocket_Bind(self *C.QAbstractSocket, cb C.intptr_t, address *C.QHostAddress, port C.uint16_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool, address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHostAddress(unsafe.Pointer(address)) + slotval2 := (uint16)(port) -func (this *QAbstractSocket) ConnectToHost4(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + slotval3 := (QAbstractSocket__BindFlag)(mode) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Bind, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { hostName_ms := C.struct_miqt_string{} hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QAbstractSocket_ConnectToHost4(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + + C.QAbstractSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + +} +func (this *QAbstractSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QAbstractSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ConnectToHost +func miqt_exec_callback_QAbstractSocket_ConnectToHost(self *C.QAbstractSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, mode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(mode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QAbstractSocket) callVirtualBase_DisconnectFromHost() { + + C.QAbstractSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSocket) OnDisconnectFromHost(slot func(super func())) { + C.QAbstractSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_DisconnectFromHost +func miqt_exec_callback_QAbstractSocket_DisconnectFromHost(self *C.QAbstractSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QAbstractSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_BytesAvailable +func miqt_exec_callback_QAbstractSocket_BytesAvailable(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_BytesToWrite +func miqt_exec_callback_QAbstractSocket_BytesToWrite(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QAbstractSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QAbstractSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QAbstractSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SetReadBufferSize +func miqt_exec_callback_QAbstractSocket_SetReadBufferSize(self *C.QAbstractSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + } -func (this *QAbstractSocket) ConnectToHost32(address *QHostAddress, port uint16, mode qt6.QIODeviceBase__OpenModeFlag) { - C.QAbstractSocket_ConnectToHost32(this.h, address.cPointer(), (C.uint16_t)(port), (C.int)(mode)) +func (this *QAbstractSocket) callVirtualBase_SocketDescriptor() uintptr { + + return (uintptr)(C.QAbstractSocket_virtualbase_SocketDescriptor(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnSocketDescriptor(slot func(super func() uintptr) uintptr) { + C.QAbstractSocket_override_virtual_SocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QAbstractSocket) SetSocketDescriptor2(socketDescriptor uintptr, state QAbstractSocket__SocketState) bool { - return (bool)(C.QAbstractSocket_SetSocketDescriptor2(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state))) +//export miqt_exec_callback_QAbstractSocket_SocketDescriptor +func miqt_exec_callback_QAbstractSocket_SocketDescriptor(self *C.QAbstractSocket, cb C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SocketDescriptor) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QAbstractSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QAbstractSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QAbstractSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SetSocketDescriptor +func miqt_exec_callback_QAbstractSocket_SetSocketDescriptor(self *C.QAbstractSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + } -func (this *QAbstractSocket) SetSocketDescriptor3(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { - return (bool)(C.QAbstractSocket_SetSocketDescriptor3(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) +func (this *QAbstractSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt6.QVariant) { + + C.QAbstractSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + } +func (this *QAbstractSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) { + C.QAbstractSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SetSocketOption +func miqt_exec_callback_QAbstractSocket_SetSocketOption(self *C.QAbstractSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) -func (this *QAbstractSocket) WaitForConnected1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForConnected1(this.h, (C.int)(msecs))) } -func (this *QAbstractSocket) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForReadyRead1(this.h, (C.int)(msecs))) +func (this *QAbstractSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt6.QVariant { + + _ret := C.QAbstractSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) { + C.QAbstractSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) } -func (this *QAbstractSocket) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForBytesWritten1(this.h, (C.int)(msecs))) +//export miqt_exec_callback_QAbstractSocket_SocketOption +func miqt_exec_callback_QAbstractSocket_SocketOption(self *C.QAbstractSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QAbstractSocket) callVirtualBase_Close() { + + C.QAbstractSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QAbstractSocket) OnClose(slot func(super func())) { + C.QAbstractSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Close +func miqt_exec_callback_QAbstractSocket_Close(self *C.QAbstractSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QAbstractSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QAbstractSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_IsSequential +func miqt_exec_callback_QAbstractSocket_IsSequential(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForConnected +func miqt_exec_callback_QAbstractSocket_WaitForConnected(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + } +func (this *QAbstractSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForReadyRead +func miqt_exec_callback_QAbstractSocket_WaitForReadyRead(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForBytesWritten +func miqt_exec_callback_QAbstractSocket_WaitForBytesWritten(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QAbstractSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QAbstractSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QAbstractSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WaitForDisconnected +func miqt_exec_callback_QAbstractSocket_WaitForDisconnected(self *C.QAbstractSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QAbstractSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QAbstractSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QAbstractSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ReadData +func miqt_exec_callback_QAbstractSocket_ReadData(self *C.QAbstractSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QAbstractSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QAbstractSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QAbstractSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_ReadLineData +func miqt_exec_callback_QAbstractSocket_ReadLineData(self *C.QAbstractSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QAbstractSocket_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QAbstractSocket) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QAbstractSocket_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_SkipData +func miqt_exec_callback_QAbstractSocket_SkipData(self *C.QAbstractSocket, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QAbstractSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QAbstractSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QAbstractSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_WriteData +func miqt_exec_callback_QAbstractSocket_WriteData(self *C.QAbstractSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Open(mode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QAbstractSocket_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QAbstractSocket) OnOpen(slot func(super func(mode qt6.QIODeviceBase__OpenModeFlag) bool, mode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QAbstractSocket_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Open +func miqt_exec_callback_QAbstractSocket_Open(self *C.QAbstractSocket, cb C.intptr_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode qt6.QIODeviceBase__OpenModeFlag) bool, mode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QIODeviceBase__OpenModeFlag)(mode) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Pos() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnPos(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Pos +func miqt_exec_callback_QAbstractSocket_Pos(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Size() int64 { + + return (int64)(C.QAbstractSocket_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnSize(slot func(super func() int64) int64) { + C.QAbstractSocket_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Size +func miqt_exec_callback_QAbstractSocket_Size(self *C.QAbstractSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QAbstractSocket_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QAbstractSocket) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QAbstractSocket_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Seek +func miqt_exec_callback_QAbstractSocket_Seek(self *C.QAbstractSocket, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QAbstractSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_AtEnd +func miqt_exec_callback_QAbstractSocket_AtEnd(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_Reset() bool { + + return (bool)(C.QAbstractSocket_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnReset(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_Reset +func miqt_exec_callback_QAbstractSocket_Reset(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QAbstractSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QAbstractSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QAbstractSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractSocket_CanReadLine +func miqt_exec_callback_QAbstractSocket_CanReadLine(self *C.QAbstractSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) -func (this *QAbstractSocket) WaitForDisconnected1(msecs int) bool { - return (bool)(C.QAbstractSocket_WaitForDisconnected1(this.h, (C.int)(msecs))) } // Delete this object from C++ memory. func (this *QAbstractSocket) Delete() { - C.QAbstractSocket_Delete(this.h) + C.QAbstractSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qabstractsocket.h b/qt6/network/gen_qabstractsocket.h index 9d985792..4a1e2765 100644 --- a/qt6/network/gen_qabstractsocket.h +++ b/qt6/network/gen_qabstractsocket.h @@ -18,6 +18,8 @@ extern "C" { class QAbstractSocket; class QAuthenticator; class QHostAddress; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QNetworkProxy; class QObject; @@ -26,22 +28,24 @@ class QVariant; typedef struct QAbstractSocket QAbstractSocket; typedef struct QAuthenticator QAuthenticator; typedef struct QHostAddress QHostAddress; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QNetworkProxy QNetworkProxy; typedef struct QObject QObject; typedef struct QVariant QVariant; #endif -QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent); +void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self); void* QAbstractSocket_Metacast(QAbstractSocket* self, const char* param1); struct miqt_string QAbstractSocket_Tr(const char* s); void QAbstractSocket_Resume(QAbstractSocket* self); int QAbstractSocket_PauseMode(const QAbstractSocket* self); void QAbstractSocket_SetPauseMode(QAbstractSocket* self, int pauseMode); -bool QAbstractSocket_Bind(QAbstractSocket* self, QHostAddress* address); +bool QAbstractSocket_Bind(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); bool QAbstractSocket_Bind2(QAbstractSocket* self); -void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port); +void QAbstractSocket_ConnectToHost(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); void QAbstractSocket_ConnectToHost2(QAbstractSocket* self, QHostAddress* address, uint16_t port); void QAbstractSocket_DisconnectFromHost(QAbstractSocket* self); bool QAbstractSocket_IsValid(const QAbstractSocket* self); @@ -56,7 +60,7 @@ long long QAbstractSocket_ReadBufferSize(const QAbstractSocket* self); void QAbstractSocket_SetReadBufferSize(QAbstractSocket* self, long long size); void QAbstractSocket_Abort(QAbstractSocket* self); intptr_t QAbstractSocket_SocketDescriptor(const QAbstractSocket* self); -bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor); +bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode); void QAbstractSocket_SetSocketOption(QAbstractSocket* self, int option, QVariant* value); QVariant* QAbstractSocket_SocketOption(QAbstractSocket* self, int option); int QAbstractSocket_SocketType(const QAbstractSocket* self); @@ -65,10 +69,10 @@ int QAbstractSocket_Error(const QAbstractSocket* self); void QAbstractSocket_Close(QAbstractSocket* self); bool QAbstractSocket_IsSequential(const QAbstractSocket* self); bool QAbstractSocket_Flush(QAbstractSocket* self); -bool QAbstractSocket_WaitForConnected(QAbstractSocket* self); -bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self); -bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self); -bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self); +bool QAbstractSocket_WaitForConnected(QAbstractSocket* self, int msecs); +bool QAbstractSocket_WaitForReadyRead(QAbstractSocket* self, int msecs); +bool QAbstractSocket_WaitForBytesWritten(QAbstractSocket* self, int msecs); +bool QAbstractSocket_WaitForDisconnected(QAbstractSocket* self, int msecs); void QAbstractSocket_SetProxy(QAbstractSocket* self, QNetworkProxy* networkProxy); QNetworkProxy* QAbstractSocket_Proxy(const QAbstractSocket* self); struct miqt_string QAbstractSocket_ProtocolTag(const QAbstractSocket* self); @@ -85,22 +89,72 @@ void QAbstractSocket_ErrorOccurred(QAbstractSocket* self, int param1); void QAbstractSocket_connect_ErrorOccurred(QAbstractSocket* self, intptr_t slot); void QAbstractSocket_ProxyAuthenticationRequired(QAbstractSocket* self, QNetworkProxy* proxy, QAuthenticator* authenticator); void QAbstractSocket_connect_ProxyAuthenticationRequired(QAbstractSocket* self, intptr_t slot); +long long QAbstractSocket_ReadData(QAbstractSocket* self, char* data, long long maxlen); +long long QAbstractSocket_ReadLineData(QAbstractSocket* self, char* data, long long maxlen); +long long QAbstractSocket_SkipData(QAbstractSocket* self, long long maxSize); +long long QAbstractSocket_WriteData(QAbstractSocket* self, const char* data, long long lenVal); struct miqt_string QAbstractSocket_Tr2(const char* s, const char* c); struct miqt_string QAbstractSocket_Tr3(const char* s, const char* c, int n); -bool QAbstractSocket_Bind22(QAbstractSocket* self, QHostAddress* address, uint16_t port); -bool QAbstractSocket_Bind3(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); bool QAbstractSocket_Bind1(QAbstractSocket* self, uint16_t port); -bool QAbstractSocket_Bind23(QAbstractSocket* self, uint16_t port, int mode); -void QAbstractSocket_ConnectToHost3(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode); -void QAbstractSocket_ConnectToHost4(QAbstractSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); -void QAbstractSocket_ConnectToHost32(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); -bool QAbstractSocket_SetSocketDescriptor2(QAbstractSocket* self, intptr_t socketDescriptor, int state); -bool QAbstractSocket_SetSocketDescriptor3(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode); -bool QAbstractSocket_WaitForConnected1(QAbstractSocket* self, int msecs); -bool QAbstractSocket_WaitForReadyRead1(QAbstractSocket* self, int msecs); -bool QAbstractSocket_WaitForBytesWritten1(QAbstractSocket* self, int msecs); -bool QAbstractSocket_WaitForDisconnected1(QAbstractSocket* self, int msecs); -void QAbstractSocket_Delete(QAbstractSocket* self); +bool QAbstractSocket_Bind22(QAbstractSocket* self, uint16_t port, int mode); +void QAbstractSocket_ConnectToHost3(QAbstractSocket* self, QHostAddress* address, uint16_t port, int mode); +void QAbstractSocket_override_virtual_Resume(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_Resume(void* self); +void QAbstractSocket_override_virtual_Bind(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Bind(void* self, QHostAddress* address, uint16_t port, int mode); +void QAbstractSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QAbstractSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_DisconnectFromHost(void* self); +void QAbstractSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_BytesAvailable(const void* self); +void QAbstractSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_BytesToWrite(const void* self); +void QAbstractSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QAbstractSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot); +intptr_t QAbstractSocket_virtualbase_SocketDescriptor(const void* self); +void QAbstractSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QAbstractSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QAbstractSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QAbstractSocket_virtualbase_SocketOption(void* self, int option); +void QAbstractSocket_override_virtual_Close(void* self, intptr_t slot); +void QAbstractSocket_virtualbase_Close(void* self); +void QAbstractSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_IsSequential(const void* self); +void QAbstractSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QAbstractSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QAbstractSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QAbstractSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QAbstractSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QAbstractSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QAbstractSocket_override_virtual_SkipData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_SkipData(void* self, long long maxSize); +void QAbstractSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QAbstractSocket_override_virtual_Open(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Open(void* self, int mode); +void QAbstractSocket_override_virtual_Pos(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_Pos(const void* self); +void QAbstractSocket_override_virtual_Size(void* self, intptr_t slot); +long long QAbstractSocket_virtualbase_Size(const void* self); +void QAbstractSocket_override_virtual_Seek(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Seek(void* self, long long pos); +void QAbstractSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_AtEnd(const void* self); +void QAbstractSocket_override_virtual_Reset(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_Reset(void* self); +void QAbstractSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QAbstractSocket_virtualbase_CanReadLine(const void* self); +void QAbstractSocket_Delete(QAbstractSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qauthenticator.cpp b/qt6/network/gen_qauthenticator.cpp index 7561038f..d079a9d4 100644 --- a/qt6/network/gen_qauthenticator.cpp +++ b/qt6/network/gen_qauthenticator.cpp @@ -8,12 +8,14 @@ #include "gen_qauthenticator.h" #include "_cgo_export.h" -QAuthenticator* QAuthenticator_new() { - return new QAuthenticator(); +void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator) { + QAuthenticator* ret = new QAuthenticator(); + *outptr_QAuthenticator = ret; } -QAuthenticator* QAuthenticator_new2(QAuthenticator* other) { - return new QAuthenticator(*other); +void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator) { + QAuthenticator* ret = new QAuthenticator(*other); + *outptr_QAuthenticator = ret; } void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other) { @@ -119,7 +121,11 @@ void QAuthenticator_Detach(QAuthenticator* self) { self->detach(); } -void QAuthenticator_Delete(QAuthenticator* self) { - delete self; +void QAuthenticator_Delete(QAuthenticator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qauthenticator.go b/qt6/network/gen_qauthenticator.go index 305a8bf5..088586d4 100644 --- a/qt6/network/gen_qauthenticator.go +++ b/qt6/network/gen_qauthenticator.go @@ -15,7 +15,8 @@ import ( ) type QAuthenticator struct { - h *C.QAuthenticator + h *C.QAuthenticator + isSubclass bool } func (this *QAuthenticator) cPointer() *C.QAuthenticator { @@ -32,6 +33,7 @@ func (this *QAuthenticator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQAuthenticator constructs the type using only CGO pointers. func newQAuthenticator(h *C.QAuthenticator) *QAuthenticator { if h == nil { return nil @@ -39,20 +41,33 @@ func newQAuthenticator(h *C.QAuthenticator) *QAuthenticator { return &QAuthenticator{h: h} } +// UnsafeNewQAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQAuthenticator(h unsafe.Pointer) *QAuthenticator { - return newQAuthenticator((*C.QAuthenticator)(h)) + if h == nil { + return nil + } + + return &QAuthenticator{h: (*C.QAuthenticator)(h)} } // NewQAuthenticator constructs a new QAuthenticator object. func NewQAuthenticator() *QAuthenticator { - ret := C.QAuthenticator_new() - return newQAuthenticator(ret) + var outptr_QAuthenticator *C.QAuthenticator = nil + + C.QAuthenticator_new(&outptr_QAuthenticator) + ret := newQAuthenticator(outptr_QAuthenticator) + ret.isSubclass = true + return ret } // NewQAuthenticator2 constructs a new QAuthenticator object. func NewQAuthenticator2(other *QAuthenticator) *QAuthenticator { - ret := C.QAuthenticator_new2(other.cPointer()) - return newQAuthenticator(ret) + var outptr_QAuthenticator *C.QAuthenticator = nil + + C.QAuthenticator_new2(other.cPointer(), &outptr_QAuthenticator) + ret := newQAuthenticator(outptr_QAuthenticator) + ret.isSubclass = true + return ret } func (this *QAuthenticator) OperatorAssign(other *QAuthenticator) { @@ -161,7 +176,7 @@ func (this *QAuthenticator) Detach() { // Delete this object from C++ memory. func (this *QAuthenticator) Delete() { - C.QAuthenticator_Delete(this.h) + C.QAuthenticator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qauthenticator.h b/qt6/network/gen_qauthenticator.h index 6ab8f215..3176aafb 100644 --- a/qt6/network/gen_qauthenticator.h +++ b/qt6/network/gen_qauthenticator.h @@ -22,8 +22,8 @@ typedef struct QAuthenticator QAuthenticator; typedef struct QVariant QVariant; #endif -QAuthenticator* QAuthenticator_new(); -QAuthenticator* QAuthenticator_new2(QAuthenticator* other); +void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator); +void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator); void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorEqual(const QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorNotEqual(const QAuthenticator* self, QAuthenticator* other); @@ -38,7 +38,7 @@ struct miqt_map /* of struct miqt_string to QVariant* */ QAuthenticator_Options void QAuthenticator_SetOption(QAuthenticator* self, struct miqt_string opt, QVariant* value); bool QAuthenticator_IsNull(const QAuthenticator* self); void QAuthenticator_Detach(QAuthenticator* self); -void QAuthenticator_Delete(QAuthenticator* self); +void QAuthenticator_Delete(QAuthenticator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qdnslookup.cpp b/qt6/network/gen_qdnslookup.cpp index 218cc3f9..71c5af6d 100644 --- a/qt6/network/gen_qdnslookup.cpp +++ b/qt6/network/gen_qdnslookup.cpp @@ -1,27 +1,33 @@ #include +#include #include #include #include #include #include #include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qdnslookup.h" #include "_cgo_export.h" -QDnsDomainNameRecord* QDnsDomainNameRecord_new() { - return new QDnsDomainNameRecord(); +void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { + QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(); + *outptr_QDnsDomainNameRecord = ret; } -QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other) { - return new QDnsDomainNameRecord(*other); +void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { + QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(*other); + *outptr_QDnsDomainNameRecord = ret; } void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other) { @@ -59,16 +65,22 @@ struct miqt_string QDnsDomainNameRecord_Value(const QDnsDomainNameRecord* self) return _ms; } -void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self) { - delete self; +void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsHostAddressRecord* QDnsHostAddressRecord_new() { - return new QDnsHostAddressRecord(); +void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { + QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(); + *outptr_QDnsHostAddressRecord = ret; } -QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other) { - return new QDnsHostAddressRecord(*other); +void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { + QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(*other); + *outptr_QDnsHostAddressRecord = ret; } void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other) { @@ -99,16 +111,22 @@ QHostAddress* QDnsHostAddressRecord_Value(const QDnsHostAddressRecord* self) { return new QHostAddress(self->value()); } -void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self) { - delete self; +void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new() { - return new QDnsMailExchangeRecord(); +void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { + QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(); + *outptr_QDnsMailExchangeRecord = ret; } -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other) { - return new QDnsMailExchangeRecord(*other); +void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { + QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(*other); + *outptr_QDnsMailExchangeRecord = ret; } void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other) { @@ -151,16 +169,22 @@ unsigned int QDnsMailExchangeRecord_TimeToLive(const QDnsMailExchangeRecord* sel return static_cast(_ret); } -void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self) { - delete self; +void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsServiceRecord* QDnsServiceRecord_new() { - return new QDnsServiceRecord(); +void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord) { + QDnsServiceRecord* ret = new QDnsServiceRecord(); + *outptr_QDnsServiceRecord = ret; } -QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other) { - return new QDnsServiceRecord(*other); +void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord) { + QDnsServiceRecord* ret = new QDnsServiceRecord(*other); + *outptr_QDnsServiceRecord = ret; } void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other) { @@ -213,16 +237,22 @@ uint16_t QDnsServiceRecord_Weight(const QDnsServiceRecord* self) { return static_cast(_ret); } -void QDnsServiceRecord_Delete(QDnsServiceRecord* self) { - delete self; +void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsTextRecord* QDnsTextRecord_new() { - return new QDnsTextRecord(); +void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord) { + QDnsTextRecord* ret = new QDnsTextRecord(); + *outptr_QDnsTextRecord = ret; } -QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other) { - return new QDnsTextRecord(*other); +void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord) { + QDnsTextRecord* ret = new QDnsTextRecord(*other); + *outptr_QDnsTextRecord = ret; } void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other) { @@ -267,36 +297,237 @@ struct miqt_array /* of struct miqt_string */ QDnsTextRecord_Values(const QDnsT return _out; } -void QDnsTextRecord_Delete(QDnsTextRecord* self) { - delete self; +void QDnsTextRecord_Delete(QDnsTextRecord* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QDnsLookup* QDnsLookup_new() { - return new QDnsLookup(); +class MiqtVirtualQDnsLookup : public virtual QDnsLookup { +public: + + MiqtVirtualQDnsLookup(): QDnsLookup() {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name): QDnsLookup(typeVal, name) {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name, const QHostAddress& nameserver): QDnsLookup(typeVal, name, nameserver) {}; + MiqtVirtualQDnsLookup(QObject* parent): QDnsLookup(parent) {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name, QObject* parent): QDnsLookup(typeVal, name, parent) {}; + MiqtVirtualQDnsLookup(QDnsLookup::Type typeVal, const QString& name, const QHostAddress& nameserver, QObject* parent): QDnsLookup(typeVal, name, nameserver, parent) {}; + + virtual ~MiqtVirtualQDnsLookup() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDnsLookup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDnsLookup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDnsLookup::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDnsLookup::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDnsLookup_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDnsLookup::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDnsLookup::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDnsLookup_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDnsLookup::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDnsLookup::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDnsLookup_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDnsLookup::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDnsLookup::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDnsLookup_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDnsLookup::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDnsLookup::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDnsLookup_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDnsLookup::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDnsLookup::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDnsLookup_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDnsLookup::disconnectNotify(*signal); + + } + +}; + +void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name) { +void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver) { +void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString, *nameserver); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new4(QObject* parent) { - return new QDnsLookup(parent); +void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(parent); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent) { +void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString, parent); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, parent); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } -QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent) { +void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); + MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); + *outptr_QDnsLookup = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self) { @@ -475,7 +706,7 @@ void QDnsLookup_Finished(QDnsLookup* self) { } void QDnsLookup_connect_Finished(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::finished), self, [=]() { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::finished), self, [=]() { miqt_exec_callback_QDnsLookup_Finished(slot); }); } @@ -486,7 +717,7 @@ void QDnsLookup_NameChanged(QDnsLookup* self, struct miqt_string name) { } void QDnsLookup_connect_NameChanged(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::nameChanged), self, [=](const QString& name) { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::nameChanged), self, [=](const QString& name) { const QString name_ret = name; // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray name_b = name_ret.toUtf8(); @@ -504,7 +735,7 @@ void QDnsLookup_TypeChanged(QDnsLookup* self, int typeVal) { } void QDnsLookup_connect_TypeChanged(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::typeChanged), self, [=](QDnsLookup::Type typeVal) { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::typeChanged), self, [=](QDnsLookup::Type typeVal) { QDnsLookup::Type typeVal_ret = typeVal; int sigval1 = static_cast(typeVal_ret); miqt_exec_callback_QDnsLookup_TypeChanged(slot, sigval1); @@ -516,7 +747,7 @@ void QDnsLookup_NameserverChanged(QDnsLookup* self, QHostAddress* nameserver) { } void QDnsLookup_connect_NameserverChanged(QDnsLookup* self, intptr_t slot) { - QDnsLookup::connect(self, static_cast(&QDnsLookup::nameserverChanged), self, [=](const QHostAddress& nameserver) { + MiqtVirtualQDnsLookup::connect(self, static_cast(&QDnsLookup::nameserverChanged), self, [=](const QHostAddress& nameserver) { const QHostAddress& nameserver_ret = nameserver; // Cast returned reference into pointer QHostAddress* sigval1 = const_cast(&nameserver_ret); @@ -546,7 +777,67 @@ struct miqt_string QDnsLookup_Tr3(const char* s, const char* c, int n) { return _ms; } -void QDnsLookup_Delete(QDnsLookup* self) { - delete self; +void QDnsLookup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__Event = slot; +} + +bool QDnsLookup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_Event(event); +} + +void QDnsLookup_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__EventFilter = slot; +} + +bool QDnsLookup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QDnsLookup_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__TimerEvent = slot; +} + +void QDnsLookup_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_TimerEvent(event); +} + +void QDnsLookup_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__ChildEvent = slot; +} + +void QDnsLookup_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_ChildEvent(event); +} + +void QDnsLookup_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__CustomEvent = slot; +} + +void QDnsLookup_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_CustomEvent(event); +} + +void QDnsLookup_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__ConnectNotify = slot; +} + +void QDnsLookup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDnsLookup_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDnsLookup*)(self) )->handle__DisconnectNotify = slot; +} + +void QDnsLookup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDnsLookup*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDnsLookup_Delete(QDnsLookup* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qdnslookup.go b/qt6/network/gen_qdnslookup.go index aedb8f61..3f78ddf6 100644 --- a/qt6/network/gen_qdnslookup.go +++ b/qt6/network/gen_qdnslookup.go @@ -43,7 +43,8 @@ const ( ) type QDnsDomainNameRecord struct { - h *C.QDnsDomainNameRecord + h *C.QDnsDomainNameRecord + isSubclass bool } func (this *QDnsDomainNameRecord) cPointer() *C.QDnsDomainNameRecord { @@ -60,6 +61,7 @@ func (this *QDnsDomainNameRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsDomainNameRecord constructs the type using only CGO pointers. func newQDnsDomainNameRecord(h *C.QDnsDomainNameRecord) *QDnsDomainNameRecord { if h == nil { return nil @@ -67,20 +69,33 @@ func newQDnsDomainNameRecord(h *C.QDnsDomainNameRecord) *QDnsDomainNameRecord { return &QDnsDomainNameRecord{h: h} } +// UnsafeNewQDnsDomainNameRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsDomainNameRecord(h unsafe.Pointer) *QDnsDomainNameRecord { - return newQDnsDomainNameRecord((*C.QDnsDomainNameRecord)(h)) + if h == nil { + return nil + } + + return &QDnsDomainNameRecord{h: (*C.QDnsDomainNameRecord)(h)} } // NewQDnsDomainNameRecord constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord() *QDnsDomainNameRecord { - ret := C.QDnsDomainNameRecord_new() - return newQDnsDomainNameRecord(ret) + var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil + + C.QDnsDomainNameRecord_new(&outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret.isSubclass = true + return ret } // NewQDnsDomainNameRecord2 constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord2(other *QDnsDomainNameRecord) *QDnsDomainNameRecord { - ret := C.QDnsDomainNameRecord_new2(other.cPointer()) - return newQDnsDomainNameRecord(ret) + var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil + + C.QDnsDomainNameRecord_new2(other.cPointer(), &outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret.isSubclass = true + return ret } func (this *QDnsDomainNameRecord) OperatorAssign(other *QDnsDomainNameRecord) { @@ -111,7 +126,7 @@ func (this *QDnsDomainNameRecord) Value() string { // Delete this object from C++ memory. func (this *QDnsDomainNameRecord) Delete() { - C.QDnsDomainNameRecord_Delete(this.h) + C.QDnsDomainNameRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -124,7 +139,8 @@ func (this *QDnsDomainNameRecord) GoGC() { } type QDnsHostAddressRecord struct { - h *C.QDnsHostAddressRecord + h *C.QDnsHostAddressRecord + isSubclass bool } func (this *QDnsHostAddressRecord) cPointer() *C.QDnsHostAddressRecord { @@ -141,6 +157,7 @@ func (this *QDnsHostAddressRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsHostAddressRecord constructs the type using only CGO pointers. func newQDnsHostAddressRecord(h *C.QDnsHostAddressRecord) *QDnsHostAddressRecord { if h == nil { return nil @@ -148,20 +165,33 @@ func newQDnsHostAddressRecord(h *C.QDnsHostAddressRecord) *QDnsHostAddressRecord return &QDnsHostAddressRecord{h: h} } +// UnsafeNewQDnsHostAddressRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsHostAddressRecord(h unsafe.Pointer) *QDnsHostAddressRecord { - return newQDnsHostAddressRecord((*C.QDnsHostAddressRecord)(h)) + if h == nil { + return nil + } + + return &QDnsHostAddressRecord{h: (*C.QDnsHostAddressRecord)(h)} } // NewQDnsHostAddressRecord constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord() *QDnsHostAddressRecord { - ret := C.QDnsHostAddressRecord_new() - return newQDnsHostAddressRecord(ret) + var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil + + C.QDnsHostAddressRecord_new(&outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret.isSubclass = true + return ret } // NewQDnsHostAddressRecord2 constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord2(other *QDnsHostAddressRecord) *QDnsHostAddressRecord { - ret := C.QDnsHostAddressRecord_new2(other.cPointer()) - return newQDnsHostAddressRecord(ret) + var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil + + C.QDnsHostAddressRecord_new2(other.cPointer(), &outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret.isSubclass = true + return ret } func (this *QDnsHostAddressRecord) OperatorAssign(other *QDnsHostAddressRecord) { @@ -192,7 +222,7 @@ func (this *QDnsHostAddressRecord) Value() *QHostAddress { // Delete this object from C++ memory. func (this *QDnsHostAddressRecord) Delete() { - C.QDnsHostAddressRecord_Delete(this.h) + C.QDnsHostAddressRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -205,7 +235,8 @@ func (this *QDnsHostAddressRecord) GoGC() { } type QDnsMailExchangeRecord struct { - h *C.QDnsMailExchangeRecord + h *C.QDnsMailExchangeRecord + isSubclass bool } func (this *QDnsMailExchangeRecord) cPointer() *C.QDnsMailExchangeRecord { @@ -222,6 +253,7 @@ func (this *QDnsMailExchangeRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsMailExchangeRecord constructs the type using only CGO pointers. func newQDnsMailExchangeRecord(h *C.QDnsMailExchangeRecord) *QDnsMailExchangeRecord { if h == nil { return nil @@ -229,20 +261,33 @@ func newQDnsMailExchangeRecord(h *C.QDnsMailExchangeRecord) *QDnsMailExchangeRec return &QDnsMailExchangeRecord{h: h} } +// UnsafeNewQDnsMailExchangeRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsMailExchangeRecord(h unsafe.Pointer) *QDnsMailExchangeRecord { - return newQDnsMailExchangeRecord((*C.QDnsMailExchangeRecord)(h)) + if h == nil { + return nil + } + + return &QDnsMailExchangeRecord{h: (*C.QDnsMailExchangeRecord)(h)} } // NewQDnsMailExchangeRecord constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord() *QDnsMailExchangeRecord { - ret := C.QDnsMailExchangeRecord_new() - return newQDnsMailExchangeRecord(ret) + var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil + + C.QDnsMailExchangeRecord_new(&outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret.isSubclass = true + return ret } // NewQDnsMailExchangeRecord2 constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord2(other *QDnsMailExchangeRecord) *QDnsMailExchangeRecord { - ret := C.QDnsMailExchangeRecord_new2(other.cPointer()) - return newQDnsMailExchangeRecord(ret) + var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil + + C.QDnsMailExchangeRecord_new2(other.cPointer(), &outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret.isSubclass = true + return ret } func (this *QDnsMailExchangeRecord) OperatorAssign(other *QDnsMailExchangeRecord) { @@ -277,7 +322,7 @@ func (this *QDnsMailExchangeRecord) TimeToLive() uint { // Delete this object from C++ memory. func (this *QDnsMailExchangeRecord) Delete() { - C.QDnsMailExchangeRecord_Delete(this.h) + C.QDnsMailExchangeRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -290,7 +335,8 @@ func (this *QDnsMailExchangeRecord) GoGC() { } type QDnsServiceRecord struct { - h *C.QDnsServiceRecord + h *C.QDnsServiceRecord + isSubclass bool } func (this *QDnsServiceRecord) cPointer() *C.QDnsServiceRecord { @@ -307,6 +353,7 @@ func (this *QDnsServiceRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsServiceRecord constructs the type using only CGO pointers. func newQDnsServiceRecord(h *C.QDnsServiceRecord) *QDnsServiceRecord { if h == nil { return nil @@ -314,20 +361,33 @@ func newQDnsServiceRecord(h *C.QDnsServiceRecord) *QDnsServiceRecord { return &QDnsServiceRecord{h: h} } +// UnsafeNewQDnsServiceRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsServiceRecord(h unsafe.Pointer) *QDnsServiceRecord { - return newQDnsServiceRecord((*C.QDnsServiceRecord)(h)) + if h == nil { + return nil + } + + return &QDnsServiceRecord{h: (*C.QDnsServiceRecord)(h)} } // NewQDnsServiceRecord constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord() *QDnsServiceRecord { - ret := C.QDnsServiceRecord_new() - return newQDnsServiceRecord(ret) + var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil + + C.QDnsServiceRecord_new(&outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret.isSubclass = true + return ret } // NewQDnsServiceRecord2 constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord2(other *QDnsServiceRecord) *QDnsServiceRecord { - ret := C.QDnsServiceRecord_new2(other.cPointer()) - return newQDnsServiceRecord(ret) + var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil + + C.QDnsServiceRecord_new2(other.cPointer(), &outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret.isSubclass = true + return ret } func (this *QDnsServiceRecord) OperatorAssign(other *QDnsServiceRecord) { @@ -370,7 +430,7 @@ func (this *QDnsServiceRecord) Weight() uint16 { // Delete this object from C++ memory. func (this *QDnsServiceRecord) Delete() { - C.QDnsServiceRecord_Delete(this.h) + C.QDnsServiceRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -383,7 +443,8 @@ func (this *QDnsServiceRecord) GoGC() { } type QDnsTextRecord struct { - h *C.QDnsTextRecord + h *C.QDnsTextRecord + isSubclass bool } func (this *QDnsTextRecord) cPointer() *C.QDnsTextRecord { @@ -400,6 +461,7 @@ func (this *QDnsTextRecord) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQDnsTextRecord constructs the type using only CGO pointers. func newQDnsTextRecord(h *C.QDnsTextRecord) *QDnsTextRecord { if h == nil { return nil @@ -407,20 +469,33 @@ func newQDnsTextRecord(h *C.QDnsTextRecord) *QDnsTextRecord { return &QDnsTextRecord{h: h} } +// UnsafeNewQDnsTextRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsTextRecord(h unsafe.Pointer) *QDnsTextRecord { - return newQDnsTextRecord((*C.QDnsTextRecord)(h)) + if h == nil { + return nil + } + + return &QDnsTextRecord{h: (*C.QDnsTextRecord)(h)} } // NewQDnsTextRecord constructs a new QDnsTextRecord object. func NewQDnsTextRecord() *QDnsTextRecord { - ret := C.QDnsTextRecord_new() - return newQDnsTextRecord(ret) + var outptr_QDnsTextRecord *C.QDnsTextRecord = nil + + C.QDnsTextRecord_new(&outptr_QDnsTextRecord) + ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret.isSubclass = true + return ret } // NewQDnsTextRecord2 constructs a new QDnsTextRecord object. func NewQDnsTextRecord2(other *QDnsTextRecord) *QDnsTextRecord { - ret := C.QDnsTextRecord_new2(other.cPointer()) - return newQDnsTextRecord(ret) + var outptr_QDnsTextRecord *C.QDnsTextRecord = nil + + C.QDnsTextRecord_new2(other.cPointer(), &outptr_QDnsTextRecord) + ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret.isSubclass = true + return ret } func (this *QDnsTextRecord) OperatorAssign(other *QDnsTextRecord) { @@ -457,7 +532,7 @@ func (this *QDnsTextRecord) Values() [][]byte { // Delete this object from C++ memory. func (this *QDnsTextRecord) Delete() { - C.QDnsTextRecord_Delete(this.h) + C.QDnsTextRecord_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -470,7 +545,8 @@ func (this *QDnsTextRecord) GoGC() { } type QDnsLookup struct { - h *C.QDnsLookup + h *C.QDnsLookup + isSubclass bool *qt6.QObject } @@ -488,21 +564,34 @@ func (this *QDnsLookup) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDnsLookup(h *C.QDnsLookup) *QDnsLookup { +// newQDnsLookup constructs the type using only CGO pointers. +func newQDnsLookup(h *C.QDnsLookup, h_QObject *C.QObject) *QDnsLookup { if h == nil { return nil } - return &QDnsLookup{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QDnsLookup{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQDnsLookup(h unsafe.Pointer) *QDnsLookup { - return newQDnsLookup((*C.QDnsLookup)(h)) +// UnsafeNewQDnsLookup constructs the type using only unsafe pointers. +func UnsafeNewQDnsLookup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDnsLookup { + if h == nil { + return nil + } + + return &QDnsLookup{h: (*C.QDnsLookup)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQDnsLookup constructs a new QDnsLookup object. func NewQDnsLookup() *QDnsLookup { - ret := C.QDnsLookup_new() - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new(&outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup2 constructs a new QDnsLookup object. @@ -511,8 +600,13 @@ func NewQDnsLookup2(typeVal QDnsLookup__Type, name string) *QDnsLookup { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new2((C.int)(typeVal), name_ms) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new2((C.int)(typeVal), name_ms, &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup3 constructs a new QDnsLookup object. @@ -521,14 +615,24 @@ func NewQDnsLookup3(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer()) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer(), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup4 constructs a new QDnsLookup object. func NewQDnsLookup4(parent *qt6.QObject) *QDnsLookup { - ret := C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer())) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup5 constructs a new QDnsLookup object. @@ -537,8 +641,13 @@ func NewQDnsLookup5(typeVal QDnsLookup__Type, name string, parent *qt6.QObject) name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer())) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDnsLookup6 constructs a new QDnsLookup object. @@ -547,8 +656,13 @@ func NewQDnsLookup6(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer())) - return newQDnsLookup(ret) + var outptr_QDnsLookup *C.QDnsLookup = nil + var outptr_QObject *C.QObject = nil + + C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) + ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDnsLookup) MetaObject() *qt6.QMetaObject { @@ -824,9 +938,175 @@ func QDnsLookup_Tr3(s string, c string, n int) string { return _ret } +func (this *QDnsLookup) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QDnsLookup_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDnsLookup) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QDnsLookup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_Event +func miqt_exec_callback_QDnsLookup_Event(self *C.QDnsLookup, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDnsLookup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDnsLookup) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QDnsLookup_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDnsLookup) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QDnsLookup_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_EventFilter +func miqt_exec_callback_QDnsLookup_EventFilter(self *C.QDnsLookup, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDnsLookup{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDnsLookup) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QDnsLookup_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QDnsLookup) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QDnsLookup_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_TimerEvent +func miqt_exec_callback_QDnsLookup_TimerEvent(self *C.QDnsLookup, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QDnsLookup_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QDnsLookup) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QDnsLookup_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_ChildEvent +func miqt_exec_callback_QDnsLookup_ChildEvent(self *C.QDnsLookup, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QDnsLookup_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QDnsLookup) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QDnsLookup_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_CustomEvent +func miqt_exec_callback_QDnsLookup_CustomEvent(self *C.QDnsLookup, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QDnsLookup_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDnsLookup) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QDnsLookup_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_ConnectNotify +func miqt_exec_callback_QDnsLookup_ConnectNotify(self *C.QDnsLookup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDnsLookup) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QDnsLookup_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDnsLookup) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QDnsLookup_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDnsLookup_DisconnectNotify +func miqt_exec_callback_QDnsLookup_DisconnectNotify(self *C.QDnsLookup, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDnsLookup{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDnsLookup) Delete() { - C.QDnsLookup_Delete(this.h) + C.QDnsLookup_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qdnslookup.h b/qt6/network/gen_qdnslookup.h index 0dd07822..f8221974 100644 --- a/qt6/network/gen_qdnslookup.h +++ b/qt6/network/gen_qdnslookup.h @@ -16,58 +16,66 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QDnsDomainNameRecord; class QDnsHostAddressRecord; class QDnsLookup; class QDnsMailExchangeRecord; class QDnsServiceRecord; class QDnsTextRecord; +class QEvent; class QHostAddress; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QDnsDomainNameRecord QDnsDomainNameRecord; typedef struct QDnsHostAddressRecord QDnsHostAddressRecord; typedef struct QDnsLookup QDnsLookup; typedef struct QDnsMailExchangeRecord QDnsMailExchangeRecord; typedef struct QDnsServiceRecord QDnsServiceRecord; typedef struct QDnsTextRecord QDnsTextRecord; +typedef struct QEvent QEvent; typedef struct QHostAddress QHostAddress; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QDnsDomainNameRecord* QDnsDomainNameRecord_new(); -QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other); +void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); +void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); void QDnsDomainNameRecord_Swap(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); struct miqt_string QDnsDomainNameRecord_Name(const QDnsDomainNameRecord* self); unsigned int QDnsDomainNameRecord_TimeToLive(const QDnsDomainNameRecord* self); struct miqt_string QDnsDomainNameRecord_Value(const QDnsDomainNameRecord* self); -void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self); +void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass); -QDnsHostAddressRecord* QDnsHostAddressRecord_new(); -QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other); +void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); +void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); void QDnsHostAddressRecord_Swap(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); struct miqt_string QDnsHostAddressRecord_Name(const QDnsHostAddressRecord* self); unsigned int QDnsHostAddressRecord_TimeToLive(const QDnsHostAddressRecord* self); QHostAddress* QDnsHostAddressRecord_Value(const QDnsHostAddressRecord* self); -void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self); +void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass); -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new(); -QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other); +void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); +void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); void QDnsMailExchangeRecord_Swap(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); struct miqt_string QDnsMailExchangeRecord_Exchange(const QDnsMailExchangeRecord* self); struct miqt_string QDnsMailExchangeRecord_Name(const QDnsMailExchangeRecord* self); uint16_t QDnsMailExchangeRecord_Preference(const QDnsMailExchangeRecord* self); unsigned int QDnsMailExchangeRecord_TimeToLive(const QDnsMailExchangeRecord* self); -void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self); +void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass); -QDnsServiceRecord* QDnsServiceRecord_new(); -QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other); +void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord); +void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord); void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other); void QDnsServiceRecord_Swap(QDnsServiceRecord* self, QDnsServiceRecord* other); struct miqt_string QDnsServiceRecord_Name(const QDnsServiceRecord* self); @@ -76,23 +84,23 @@ uint16_t QDnsServiceRecord_Priority(const QDnsServiceRecord* self); struct miqt_string QDnsServiceRecord_Target(const QDnsServiceRecord* self); unsigned int QDnsServiceRecord_TimeToLive(const QDnsServiceRecord* self); uint16_t QDnsServiceRecord_Weight(const QDnsServiceRecord* self); -void QDnsServiceRecord_Delete(QDnsServiceRecord* self); +void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass); -QDnsTextRecord* QDnsTextRecord_new(); -QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other); +void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord); +void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord); void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other); void QDnsTextRecord_Swap(QDnsTextRecord* self, QDnsTextRecord* other); struct miqt_string QDnsTextRecord_Name(const QDnsTextRecord* self); unsigned int QDnsTextRecord_TimeToLive(const QDnsTextRecord* self); struct miqt_array /* of struct miqt_string */ QDnsTextRecord_Values(const QDnsTextRecord* self); -void QDnsTextRecord_Delete(QDnsTextRecord* self); +void QDnsTextRecord_Delete(QDnsTextRecord* self, bool isSubclass); -QDnsLookup* QDnsLookup_new(); -QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name); -QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver); -QDnsLookup* QDnsLookup_new4(QObject* parent); -QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent); -QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent); +void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self); void* QDnsLookup_Metacast(QDnsLookup* self, const char* param1); struct miqt_string QDnsLookup_Tr(const char* s); @@ -124,7 +132,21 @@ void QDnsLookup_NameserverChanged(QDnsLookup* self, QHostAddress* nameserver); void QDnsLookup_connect_NameserverChanged(QDnsLookup* self, intptr_t slot); struct miqt_string QDnsLookup_Tr2(const char* s, const char* c); struct miqt_string QDnsLookup_Tr3(const char* s, const char* c, int n); -void QDnsLookup_Delete(QDnsLookup* self); +void QDnsLookup_override_virtual_Event(void* self, intptr_t slot); +bool QDnsLookup_virtualbase_Event(void* self, QEvent* event); +void QDnsLookup_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDnsLookup_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDnsLookup_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDnsLookup_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDnsLookup_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDnsLookup_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDnsLookup_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDnsLookup_virtualbase_CustomEvent(void* self, QEvent* event); +void QDnsLookup_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDnsLookup_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDnsLookup_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDnsLookup_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDnsLookup_Delete(QDnsLookup* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qdtls.cpp b/qt6/network/gen_qdtls.cpp index 2921ac04..45356f06 100644 --- a/qt6/network/gen_qdtls.cpp +++ b/qt6/network/gen_qdtls.cpp @@ -1,9 +1,12 @@ #include +#include #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QDtlsClientVerifier__GeneratorParameters +#include #include #include +#include #include #include #include @@ -13,17 +16,203 @@ #include #include #include +#include #include #include #include "gen_qdtls.h" #include "_cgo_export.h" -QDtlsClientVerifier* QDtlsClientVerifier_new() { - return new QDtlsClientVerifier(); +class MiqtVirtualQDtlsClientVerifier : public virtual QDtlsClientVerifier { +public: + + MiqtVirtualQDtlsClientVerifier(): QDtlsClientVerifier() {}; + MiqtVirtualQDtlsClientVerifier(QObject* parent): QDtlsClientVerifier(parent) {}; + + virtual ~MiqtVirtualQDtlsClientVerifier() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDtlsClientVerifier::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDtlsClientVerifier_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDtlsClientVerifier::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDtlsClientVerifier::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDtlsClientVerifier_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDtlsClientVerifier::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDtlsClientVerifier::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDtlsClientVerifier_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDtlsClientVerifier::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDtlsClientVerifier::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDtlsClientVerifier_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDtlsClientVerifier::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDtlsClientVerifier::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDtlsClientVerifier_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDtlsClientVerifier::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDtlsClientVerifier::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtlsClientVerifier_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDtlsClientVerifier::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDtlsClientVerifier::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtlsClientVerifier_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDtlsClientVerifier::disconnectNotify(*signal); + + } + +}; + +void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { + MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(); + *outptr_QDtlsClientVerifier = ret; + *outptr_QObject = static_cast(ret); } -QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent) { - return new QDtlsClientVerifier(parent); +void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { + MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(parent); + *outptr_QDtlsClientVerifier = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self) { @@ -105,16 +294,261 @@ struct miqt_string QDtlsClientVerifier_Tr3(const char* s, const char* c, int n) return _ms; } -void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self) { - delete self; +void QDtlsClientVerifier_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__Event = slot; +} + +bool QDtlsClientVerifier_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_Event(event); +} + +void QDtlsClientVerifier_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__EventFilter = slot; +} + +bool QDtlsClientVerifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_EventFilter(watched, event); } -QDtls* QDtls_new(int mode) { - return new QDtls(static_cast(mode)); +void QDtlsClientVerifier_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__TimerEvent = slot; } -QDtls* QDtls_new2(int mode, QObject* parent) { - return new QDtls(static_cast(mode), parent); +void QDtlsClientVerifier_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_TimerEvent(event); +} + +void QDtlsClientVerifier_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__ChildEvent = slot; +} + +void QDtlsClientVerifier_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_ChildEvent(event); +} + +void QDtlsClientVerifier_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__CustomEvent = slot; +} + +void QDtlsClientVerifier_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_CustomEvent(event); +} + +void QDtlsClientVerifier_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__ConnectNotify = slot; +} + +void QDtlsClientVerifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDtlsClientVerifier_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtlsClientVerifier*)(self) )->handle__DisconnectNotify = slot; +} + +void QDtlsClientVerifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtlsClientVerifier*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQDtls : public virtual QDtls { +public: + + MiqtVirtualQDtls(QSslSocket::SslMode mode): QDtls(mode) {}; + MiqtVirtualQDtls(QSslSocket::SslMode mode, QObject* parent): QDtls(mode, parent) {}; + + virtual ~MiqtVirtualQDtls() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QDtls::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QDtls_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QDtls::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QDtls::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QDtls_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QDtls::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QDtls::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QDtls_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QDtls::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QDtls::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QDtls_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QDtls::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QDtls::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QDtls_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QDtls::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QDtls::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtls_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QDtls::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QDtls::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QDtls_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QDtls::disconnectNotify(*signal); + + } + +}; + +void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject) { + MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode)); + *outptr_QDtls = ret; + *outptr_QObject = static_cast(ret); +} + +void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject) { + MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode), parent); + *outptr_QDtls = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QDtls_MetaObject(const QDtls* self) { @@ -293,7 +727,7 @@ void QDtls_PskRequired(QDtls* self, QSslPreSharedKeyAuthenticator* authenticator } void QDtls_connect_PskRequired(QDtls* self, intptr_t slot) { - QDtls::connect(self, static_cast(&QDtls::pskRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQDtls::connect(self, static_cast(&QDtls::pskRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { QSslPreSharedKeyAuthenticator* sigval1 = authenticator; miqt_exec_callback_QDtls_PskRequired(slot, sigval1); }); @@ -304,7 +738,7 @@ void QDtls_HandshakeTimeout(QDtls* self) { } void QDtls_connect_HandshakeTimeout(QDtls* self, intptr_t slot) { - QDtls::connect(self, static_cast(&QDtls::handshakeTimeout), self, [=]() { + MiqtVirtualQDtls::connect(self, static_cast(&QDtls::handshakeTimeout), self, [=]() { miqt_exec_callback_QDtls_HandshakeTimeout(slot); }); } @@ -341,28 +775,95 @@ bool QDtls_DoHandshake2(QDtls* self, QUdpSocket* socket, struct miqt_string dgra return self->doHandshake(socket, dgram_QByteArray); } -void QDtls_Delete(QDtls* self) { - delete self; +void QDtls_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__Event = slot; +} + +bool QDtls_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQDtls*)(self) )->virtualbase_Event(event); +} + +void QDtls_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__EventFilter = slot; +} + +bool QDtls_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQDtls*)(self) )->virtualbase_EventFilter(watched, event); } -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new() { - return new QDtlsClientVerifier::GeneratorParameters(); +void QDtls_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__TimerEvent = slot; } -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s) { +void QDtls_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_TimerEvent(event); +} + +void QDtls_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__ChildEvent = slot; +} + +void QDtls_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_ChildEvent(event); +} + +void QDtls_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__CustomEvent = slot; +} + +void QDtls_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_CustomEvent(event); +} + +void QDtls_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__ConnectNotify = slot; +} + +void QDtls_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QDtls_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QDtls*)(self) )->handle__DisconnectNotify = slot; +} + +void QDtls_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQDtls*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QDtls_Delete(QDtls* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { + QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(); + *outptr_QDtlsClientVerifier__GeneratorParameters = ret; +} + +void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { QByteArray s_QByteArray(s.data, s.len); - return new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); + QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); + *outptr_QDtlsClientVerifier__GeneratorParameters = ret; } -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1) { - return new QDtlsClientVerifier::GeneratorParameters(*param1); +void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { + QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(*param1); + *outptr_QDtlsClientVerifier__GeneratorParameters = ret; } void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1) { self->operator=(*param1); } -void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self) { - delete self; +void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qdtls.go b/qt6/network/gen_qdtls.go index edd731f2..c3fc45f2 100644 --- a/qt6/network/gen_qdtls.go +++ b/qt6/network/gen_qdtls.go @@ -39,7 +39,8 @@ const ( ) type QDtlsClientVerifier struct { - h *C.QDtlsClientVerifier + h *C.QDtlsClientVerifier + isSubclass bool *qt6.QObject } @@ -57,27 +58,45 @@ func (this *QDtlsClientVerifier) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDtlsClientVerifier(h *C.QDtlsClientVerifier) *QDtlsClientVerifier { +// newQDtlsClientVerifier constructs the type using only CGO pointers. +func newQDtlsClientVerifier(h *C.QDtlsClientVerifier, h_QObject *C.QObject) *QDtlsClientVerifier { if h == nil { return nil } - return &QDtlsClientVerifier{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QDtlsClientVerifier{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer) *QDtlsClientVerifier { - return newQDtlsClientVerifier((*C.QDtlsClientVerifier)(h)) +// UnsafeNewQDtlsClientVerifier constructs the type using only unsafe pointers. +func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtlsClientVerifier { + if h == nil { + return nil + } + + return &QDtlsClientVerifier{h: (*C.QDtlsClientVerifier)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQDtlsClientVerifier constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier() *QDtlsClientVerifier { - ret := C.QDtlsClientVerifier_new() - return newQDtlsClientVerifier(ret) + var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil + var outptr_QObject *C.QObject = nil + + C.QDtlsClientVerifier_new(&outptr_QDtlsClientVerifier, &outptr_QObject) + ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDtlsClientVerifier2 constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier2(parent *qt6.QObject) *QDtlsClientVerifier { - ret := C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer())) - return newQDtlsClientVerifier(ret) + var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil + var outptr_QObject *C.QObject = nil + + C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QDtlsClientVerifier, &outptr_QObject) + ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDtlsClientVerifier) MetaObject() *qt6.QMetaObject { @@ -157,9 +176,175 @@ func QDtlsClientVerifier_Tr3(s string, c string, n int) string { return _ret } +func (this *QDtlsClientVerifier) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QDtlsClientVerifier_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtlsClientVerifier) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QDtlsClientVerifier_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_Event +func miqt_exec_callback_QDtlsClientVerifier_Event(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QDtlsClientVerifier_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtlsClientVerifier) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QDtlsClientVerifier_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_EventFilter +func miqt_exec_callback_QDtlsClientVerifier_EventFilter(self *C.QDtlsClientVerifier, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QDtlsClientVerifier_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QDtlsClientVerifier_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_TimerEvent +func miqt_exec_callback_QDtlsClientVerifier_TimerEvent(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QDtlsClientVerifier_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QDtlsClientVerifier_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_ChildEvent +func miqt_exec_callback_QDtlsClientVerifier_ChildEvent(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QDtlsClientVerifier_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QDtlsClientVerifier_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_CustomEvent +func miqt_exec_callback_QDtlsClientVerifier_CustomEvent(self *C.QDtlsClientVerifier, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QDtlsClientVerifier_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QDtlsClientVerifier_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_ConnectNotify +func miqt_exec_callback_QDtlsClientVerifier_ConnectNotify(self *C.QDtlsClientVerifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDtlsClientVerifier) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QDtlsClientVerifier_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtlsClientVerifier) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QDtlsClientVerifier_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtlsClientVerifier_DisconnectNotify +func miqt_exec_callback_QDtlsClientVerifier_DisconnectNotify(self *C.QDtlsClientVerifier, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDtlsClientVerifier) Delete() { - C.QDtlsClientVerifier_Delete(this.h) + C.QDtlsClientVerifier_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -172,7 +357,8 @@ func (this *QDtlsClientVerifier) GoGC() { } type QDtls struct { - h *C.QDtls + h *C.QDtls + isSubclass bool *qt6.QObject } @@ -190,27 +376,45 @@ func (this *QDtls) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQDtls(h *C.QDtls) *QDtls { +// newQDtls constructs the type using only CGO pointers. +func newQDtls(h *C.QDtls, h_QObject *C.QObject) *QDtls { if h == nil { return nil } - return &QDtls{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QDtls{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQDtls(h unsafe.Pointer) *QDtls { - return newQDtls((*C.QDtls)(h)) +// UnsafeNewQDtls constructs the type using only unsafe pointers. +func UnsafeNewQDtls(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtls { + if h == nil { + return nil + } + + return &QDtls{h: (*C.QDtls)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQDtls constructs a new QDtls object. func NewQDtls(mode QSslSocket__SslMode) *QDtls { - ret := C.QDtls_new((C.int)(mode)) - return newQDtls(ret) + var outptr_QDtls *C.QDtls = nil + var outptr_QObject *C.QObject = nil + + C.QDtls_new((C.int)(mode), &outptr_QDtls, &outptr_QObject) + ret := newQDtls(outptr_QDtls, outptr_QObject) + ret.isSubclass = true + return ret } // NewQDtls2 constructs a new QDtls object. func NewQDtls2(mode QSslSocket__SslMode, parent *qt6.QObject) *QDtls { - ret := C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer())) - return newQDtls(ret) + var outptr_QDtls *C.QDtls = nil + var outptr_QObject *C.QObject = nil + + C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer()), &outptr_QDtls, &outptr_QObject) + ret := newQDtls(outptr_QDtls, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QDtls) MetaObject() *qt6.QMetaObject { @@ -460,9 +664,175 @@ func (this *QDtls) DoHandshake2(socket *QUdpSocket, dgram []byte) bool { return (bool)(C.QDtls_DoHandshake2(this.h, socket.cPointer(), dgram_alias)) } +func (this *QDtls) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QDtls_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtls) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QDtls_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_Event +func miqt_exec_callback_QDtls_Event(self *C.QDtls, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtls{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtls) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QDtls_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QDtls) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QDtls_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_EventFilter +func miqt_exec_callback_QDtls_EventFilter(self *C.QDtls, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QDtls{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QDtls) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QDtls_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QDtls) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QDtls_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_TimerEvent +func miqt_exec_callback_QDtls_TimerEvent(self *C.QDtls, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtls{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QDtls) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QDtls_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QDtls) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QDtls_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_ChildEvent +func miqt_exec_callback_QDtls_ChildEvent(self *C.QDtls, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QDtls{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QDtls) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QDtls_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QDtls) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QDtls_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_CustomEvent +func miqt_exec_callback_QDtls_CustomEvent(self *C.QDtls, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QDtls{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QDtls) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QDtls_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtls) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QDtls_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_ConnectNotify +func miqt_exec_callback_QDtls_ConnectNotify(self *C.QDtls, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtls{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QDtls) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QDtls_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QDtls) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QDtls_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QDtls_DisconnectNotify +func miqt_exec_callback_QDtls_DisconnectNotify(self *C.QDtls, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QDtls{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QDtls) Delete() { - C.QDtls_Delete(this.h) + C.QDtls_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -475,7 +845,8 @@ func (this *QDtls) GoGC() { } type QDtlsClientVerifier__GeneratorParameters struct { - h *C.QDtlsClientVerifier__GeneratorParameters + h *C.QDtlsClientVerifier__GeneratorParameters + isSubclass bool } func (this *QDtlsClientVerifier__GeneratorParameters) cPointer() *C.QDtlsClientVerifier__GeneratorParameters { @@ -492,6 +863,7 @@ func (this *QDtlsClientVerifier__GeneratorParameters) UnsafePointer() unsafe.Poi return unsafe.Pointer(this.h) } +// newQDtlsClientVerifier__GeneratorParameters constructs the type using only CGO pointers. func newQDtlsClientVerifier__GeneratorParameters(h *C.QDtlsClientVerifier__GeneratorParameters) *QDtlsClientVerifier__GeneratorParameters { if h == nil { return nil @@ -499,14 +871,23 @@ func newQDtlsClientVerifier__GeneratorParameters(h *C.QDtlsClientVerifier__Gener return &QDtlsClientVerifier__GeneratorParameters{h: h} } +// UnsafeNewQDtlsClientVerifier__GeneratorParameters constructs the type using only unsafe pointers. func UnsafeNewQDtlsClientVerifier__GeneratorParameters(h unsafe.Pointer) *QDtlsClientVerifier__GeneratorParameters { - return newQDtlsClientVerifier__GeneratorParameters((*C.QDtlsClientVerifier__GeneratorParameters)(h)) + if h == nil { + return nil + } + + return &QDtlsClientVerifier__GeneratorParameters{h: (*C.QDtlsClientVerifier__GeneratorParameters)(h)} } // NewQDtlsClientVerifier__GeneratorParameters constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters() *QDtlsClientVerifier__GeneratorParameters { - ret := C.QDtlsClientVerifier__GeneratorParameters_new() - return newQDtlsClientVerifier__GeneratorParameters(ret) + var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil + + C.QDtlsClientVerifier__GeneratorParameters_new(&outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret.isSubclass = true + return ret } // NewQDtlsClientVerifier__GeneratorParameters2 constructs a new QDtlsClientVerifier::GeneratorParameters object. @@ -514,14 +895,22 @@ func NewQDtlsClientVerifier__GeneratorParameters2(a qt6.QCryptographicHash__Algo s_alias := C.struct_miqt_string{} s_alias.data = (*C.char)(unsafe.Pointer(&s[0])) s_alias.len = C.size_t(len(s)) - ret := C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias) - return newQDtlsClientVerifier__GeneratorParameters(ret) + var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil + + C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias, &outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret.isSubclass = true + return ret } // NewQDtlsClientVerifier__GeneratorParameters3 constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters3(param1 *QDtlsClientVerifier__GeneratorParameters) *QDtlsClientVerifier__GeneratorParameters { - ret := C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer()) - return newQDtlsClientVerifier__GeneratorParameters(ret) + var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil + + C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer(), &outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret.isSubclass = true + return ret } func (this *QDtlsClientVerifier__GeneratorParameters) OperatorAssign(param1 *QDtlsClientVerifier__GeneratorParameters) { @@ -530,7 +919,7 @@ func (this *QDtlsClientVerifier__GeneratorParameters) OperatorAssign(param1 *QDt // Delete this object from C++ memory. func (this *QDtlsClientVerifier__GeneratorParameters) Delete() { - C.QDtlsClientVerifier__GeneratorParameters_Delete(this.h) + C.QDtlsClientVerifier__GeneratorParameters_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qdtls.h b/qt6/network/gen_qdtls.h index 35ccb24c..514be1ec 100644 --- a/qt6/network/gen_qdtls.h +++ b/qt6/network/gen_qdtls.h @@ -16,6 +16,7 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; class QDtls; class QDtlsClientVerifier; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QDtlsClientVerifier__GeneratorParameters) @@ -23,31 +24,38 @@ typedef QDtlsClientVerifier::GeneratorParameters QDtlsClientVerifier__GeneratorP #else class QDtlsClientVerifier__GeneratorParameters; #endif +class QEvent; class QHostAddress; +class QMetaMethod; class QMetaObject; class QObject; class QSslCipher; class QSslConfiguration; class QSslError; class QSslPreSharedKeyAuthenticator; +class QTimerEvent; class QUdpSocket; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; typedef struct QDtls QDtls; typedef struct QDtlsClientVerifier QDtlsClientVerifier; typedef struct QDtlsClientVerifier__GeneratorParameters QDtlsClientVerifier__GeneratorParameters; +typedef struct QEvent QEvent; typedef struct QHostAddress QHostAddress; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSslCipher QSslCipher; typedef struct QSslConfiguration QSslConfiguration; typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; +typedef struct QTimerEvent QTimerEvent; typedef struct QUdpSocket QUdpSocket; #endif -QDtlsClientVerifier* QDtlsClientVerifier_new(); -QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent); +void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); +void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self); void* QDtlsClientVerifier_Metacast(QDtlsClientVerifier* self, const char* param1); struct miqt_string QDtlsClientVerifier_Tr(const char* s); @@ -59,10 +67,24 @@ unsigned char QDtlsClientVerifier_DtlsError(const QDtlsClientVerifier* self); struct miqt_string QDtlsClientVerifier_DtlsErrorString(const QDtlsClientVerifier* self); struct miqt_string QDtlsClientVerifier_Tr2(const char* s, const char* c); struct miqt_string QDtlsClientVerifier_Tr3(const char* s, const char* c, int n); -void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self); +void QDtlsClientVerifier_override_virtual_Event(void* self, intptr_t slot); +bool QDtlsClientVerifier_virtualbase_Event(void* self, QEvent* event); +void QDtlsClientVerifier_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDtlsClientVerifier_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDtlsClientVerifier_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDtlsClientVerifier_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDtlsClientVerifier_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_CustomEvent(void* self, QEvent* event); +void QDtlsClientVerifier_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDtlsClientVerifier_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDtlsClientVerifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self, bool isSubclass); -QDtls* QDtls_new(int mode); -QDtls* QDtls_new2(int mode, QObject* parent); +void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject); +void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject); QMetaObject* QDtls_MetaObject(const QDtls* self); void* QDtls_Metacast(QDtls* self, const char* param1); struct miqt_string QDtls_Tr(const char* s); @@ -101,13 +123,27 @@ struct miqt_string QDtls_Tr2(const char* s, const char* c); struct miqt_string QDtls_Tr3(const char* s, const char* c, int n); bool QDtls_SetPeer3(QDtls* self, QHostAddress* address, uint16_t port, struct miqt_string verificationName); bool QDtls_DoHandshake2(QDtls* self, QUdpSocket* socket, struct miqt_string dgram); -void QDtls_Delete(QDtls* self); +void QDtls_override_virtual_Event(void* self, intptr_t slot); +bool QDtls_virtualbase_Event(void* self, QEvent* event); +void QDtls_override_virtual_EventFilter(void* self, intptr_t slot); +bool QDtls_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QDtls_override_virtual_TimerEvent(void* self, intptr_t slot); +void QDtls_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QDtls_override_virtual_ChildEvent(void* self, intptr_t slot); +void QDtls_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QDtls_override_virtual_CustomEvent(void* self, intptr_t slot); +void QDtls_virtualbase_CustomEvent(void* self, QEvent* event); +void QDtls_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QDtls_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QDtls_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QDtls_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QDtls_Delete(QDtls* self, bool isSubclass); -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new(); -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s); -QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1); +void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); +void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); +void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1); -void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self); +void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qhostaddress.cpp b/qt6/network/gen_qhostaddress.cpp index ae870dd4..28d10c6f 100644 --- a/qt6/network/gen_qhostaddress.cpp +++ b/qt6/network/gen_qhostaddress.cpp @@ -12,37 +12,48 @@ unsigned char QIPv6Address_OperatorSubscript(const QIPv6Address* self, int index return static_cast(_ret); } -void QIPv6Address_Delete(QIPv6Address* self) { - delete self; +void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHostAddress* QHostAddress_new() { - return new QHostAddress(); +void QHostAddress_new(QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new2(unsigned int ip4Addr) { - return new QHostAddress(static_cast(ip4Addr)); +void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(ip4Addr)); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new3(const unsigned char* ip6Addr) { - return new QHostAddress(static_cast(ip6Addr)); +void QHostAddress_new3(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(ip6Addr)); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new4(QIPv6Address* ip6Addr) { - return new QHostAddress(*ip6Addr); +void QHostAddress_new4(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(*ip6Addr); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new5(struct miqt_string address) { +void QHostAddress_new5(struct miqt_string address, QHostAddress** outptr_QHostAddress) { QString address_QString = QString::fromUtf8(address.data, address.len); - return new QHostAddress(address_QString); + QHostAddress* ret = new QHostAddress(address_QString); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new6(QHostAddress* copyVal) { - return new QHostAddress(*copyVal); +void QHostAddress_new6(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(*copyVal); + *outptr_QHostAddress = ret; } -QHostAddress* QHostAddress_new7(int address) { - return new QHostAddress(static_cast(address)); +void QHostAddress_new7(int address, QHostAddress** outptr_QHostAddress) { + QHostAddress* ret = new QHostAddress(static_cast(address)); + *outptr_QHostAddress = ret; } void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other) { @@ -212,7 +223,11 @@ bool QHostAddress_IsEqual2(const QHostAddress* self, QHostAddress* address, int return self->isEqual(*address, static_cast(mode)); } -void QHostAddress_Delete(QHostAddress* self) { - delete self; +void QHostAddress_Delete(QHostAddress* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qhostaddress.go b/qt6/network/gen_qhostaddress.go index e2f5cbcb..0b97f719 100644 --- a/qt6/network/gen_qhostaddress.go +++ b/qt6/network/gen_qhostaddress.go @@ -37,7 +37,8 @@ const ( ) type QIPv6Address struct { - h *C.QIPv6Address + h *C.QIPv6Address + isSubclass bool } func (this *QIPv6Address) cPointer() *C.QIPv6Address { @@ -54,6 +55,7 @@ func (this *QIPv6Address) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQIPv6Address constructs the type using only CGO pointers. func newQIPv6Address(h *C.QIPv6Address) *QIPv6Address { if h == nil { return nil @@ -61,8 +63,13 @@ func newQIPv6Address(h *C.QIPv6Address) *QIPv6Address { return &QIPv6Address{h: h} } +// UnsafeNewQIPv6Address constructs the type using only unsafe pointers. func UnsafeNewQIPv6Address(h unsafe.Pointer) *QIPv6Address { - return newQIPv6Address((*C.QIPv6Address)(h)) + if h == nil { + return nil + } + + return &QIPv6Address{h: (*C.QIPv6Address)(h)} } func (this *QIPv6Address) OperatorSubscript(index int) byte { @@ -71,7 +78,7 @@ func (this *QIPv6Address) OperatorSubscript(index int) byte { // Delete this object from C++ memory. func (this *QIPv6Address) Delete() { - C.QIPv6Address_Delete(this.h) + C.QIPv6Address_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -84,7 +91,8 @@ func (this *QIPv6Address) GoGC() { } type QHostAddress struct { - h *C.QHostAddress + h *C.QHostAddress + isSubclass bool } func (this *QHostAddress) cPointer() *C.QHostAddress { @@ -101,6 +109,7 @@ func (this *QHostAddress) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHostAddress constructs the type using only CGO pointers. func newQHostAddress(h *C.QHostAddress) *QHostAddress { if h == nil { return nil @@ -108,32 +117,53 @@ func newQHostAddress(h *C.QHostAddress) *QHostAddress { return &QHostAddress{h: h} } +// UnsafeNewQHostAddress constructs the type using only unsafe pointers. func UnsafeNewQHostAddress(h unsafe.Pointer) *QHostAddress { - return newQHostAddress((*C.QHostAddress)(h)) + if h == nil { + return nil + } + + return &QHostAddress{h: (*C.QHostAddress)(h)} } // NewQHostAddress constructs a new QHostAddress object. func NewQHostAddress() *QHostAddress { - ret := C.QHostAddress_new() - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new(&outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress2 constructs a new QHostAddress object. func NewQHostAddress2(ip4Addr uint) *QHostAddress { - ret := C.QHostAddress_new2((C.uint)(ip4Addr)) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new2((C.uint)(ip4Addr), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress3 constructs a new QHostAddress object. func NewQHostAddress3(ip6Addr *byte) *QHostAddress { - ret := C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr))) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr)), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress4 constructs a new QHostAddress object. func NewQHostAddress4(ip6Addr *QIPv6Address) *QHostAddress { - ret := C.QHostAddress_new4(ip6Addr.cPointer()) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new4(ip6Addr.cPointer(), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress5 constructs a new QHostAddress object. @@ -142,20 +172,32 @@ func NewQHostAddress5(address string) *QHostAddress { address_ms.data = C.CString(address) address_ms.len = C.size_t(len(address)) defer C.free(unsafe.Pointer(address_ms.data)) - ret := C.QHostAddress_new5(address_ms) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new5(address_ms, &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress6 constructs a new QHostAddress object. func NewQHostAddress6(copyVal *QHostAddress) *QHostAddress { - ret := C.QHostAddress_new6(copyVal.cPointer()) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new6(copyVal.cPointer(), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } // NewQHostAddress7 constructs a new QHostAddress object. func NewQHostAddress7(address QHostAddress__SpecialAddress) *QHostAddress { - ret := C.QHostAddress_new7((C.int)(address)) - return newQHostAddress(ret) + var outptr_QHostAddress *C.QHostAddress = nil + + C.QHostAddress_new7((C.int)(address), &outptr_QHostAddress) + ret := newQHostAddress(outptr_QHostAddress) + ret.isSubclass = true + return ret } func (this *QHostAddress) OperatorAssign(other *QHostAddress) { @@ -343,7 +385,7 @@ func (this *QHostAddress) IsEqual2(address *QHostAddress, mode QHostAddress__Con // Delete this object from C++ memory. func (this *QHostAddress) Delete() { - C.QHostAddress_Delete(this.h) + C.QHostAddress_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qhostaddress.h b/qt6/network/gen_qhostaddress.h index ae92b56c..6b7ca130 100644 --- a/qt6/network/gen_qhostaddress.h +++ b/qt6/network/gen_qhostaddress.h @@ -23,15 +23,15 @@ typedef struct QIPv6Address QIPv6Address; #endif unsigned char QIPv6Address_OperatorSubscript(const QIPv6Address* self, int index); -void QIPv6Address_Delete(QIPv6Address* self); +void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass); -QHostAddress* QHostAddress_new(); -QHostAddress* QHostAddress_new2(unsigned int ip4Addr); -QHostAddress* QHostAddress_new3(const unsigned char* ip6Addr); -QHostAddress* QHostAddress_new4(QIPv6Address* ip6Addr); -QHostAddress* QHostAddress_new5(struct miqt_string address); -QHostAddress* QHostAddress_new6(QHostAddress* copyVal); -QHostAddress* QHostAddress_new7(int address); +void QHostAddress_new(QHostAddress** outptr_QHostAddress); +void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new3(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new4(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress); +void QHostAddress_new5(struct miqt_string address, QHostAddress** outptr_QHostAddress); +void QHostAddress_new6(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress); +void QHostAddress_new7(int address, QHostAddress** outptr_QHostAddress); void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other); void QHostAddress_OperatorAssignWithAddress(QHostAddress* self, int address); void QHostAddress_Swap(QHostAddress* self, QHostAddress* other); @@ -65,7 +65,7 @@ bool QHostAddress_IsBroadcast(const QHostAddress* self); struct miqt_map /* tuple of QHostAddress* and int */ QHostAddress_ParseSubnet(struct miqt_string subnet); unsigned int QHostAddress_ToIPv4Address1(const QHostAddress* self, bool* ok); bool QHostAddress_IsEqual2(const QHostAddress* self, QHostAddress* address, int mode); -void QHostAddress_Delete(QHostAddress* self); +void QHostAddress_Delete(QHostAddress* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qhostinfo.cpp b/qt6/network/gen_qhostinfo.cpp index 428a71ba..b614b348 100644 --- a/qt6/network/gen_qhostinfo.cpp +++ b/qt6/network/gen_qhostinfo.cpp @@ -8,16 +8,19 @@ #include "gen_qhostinfo.h" #include "_cgo_export.h" -QHostInfo* QHostInfo_new() { - return new QHostInfo(); +void QHostInfo_new(QHostInfo** outptr_QHostInfo) { + QHostInfo* ret = new QHostInfo(); + *outptr_QHostInfo = ret; } -QHostInfo* QHostInfo_new2(QHostInfo* d) { - return new QHostInfo(*d); +void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo) { + QHostInfo* ret = new QHostInfo(*d); + *outptr_QHostInfo = ret; } -QHostInfo* QHostInfo_new3(int lookupId) { - return new QHostInfo(static_cast(lookupId)); +void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo) { + QHostInfo* ret = new QHostInfo(static_cast(lookupId)); + *outptr_QHostInfo = ret; } void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d) { @@ -131,7 +134,11 @@ struct miqt_string QHostInfo_LocalDomainName() { return _ms; } -void QHostInfo_Delete(QHostInfo* self) { - delete self; +void QHostInfo_Delete(QHostInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qhostinfo.go b/qt6/network/gen_qhostinfo.go index 4ae03c78..8487abce 100644 --- a/qt6/network/gen_qhostinfo.go +++ b/qt6/network/gen_qhostinfo.go @@ -22,7 +22,8 @@ const ( ) type QHostInfo struct { - h *C.QHostInfo + h *C.QHostInfo + isSubclass bool } func (this *QHostInfo) cPointer() *C.QHostInfo { @@ -39,6 +40,7 @@ func (this *QHostInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHostInfo constructs the type using only CGO pointers. func newQHostInfo(h *C.QHostInfo) *QHostInfo { if h == nil { return nil @@ -46,26 +48,43 @@ func newQHostInfo(h *C.QHostInfo) *QHostInfo { return &QHostInfo{h: h} } +// UnsafeNewQHostInfo constructs the type using only unsafe pointers. func UnsafeNewQHostInfo(h unsafe.Pointer) *QHostInfo { - return newQHostInfo((*C.QHostInfo)(h)) + if h == nil { + return nil + } + + return &QHostInfo{h: (*C.QHostInfo)(h)} } // NewQHostInfo constructs a new QHostInfo object. func NewQHostInfo() *QHostInfo { - ret := C.QHostInfo_new() - return newQHostInfo(ret) + var outptr_QHostInfo *C.QHostInfo = nil + + C.QHostInfo_new(&outptr_QHostInfo) + ret := newQHostInfo(outptr_QHostInfo) + ret.isSubclass = true + return ret } // NewQHostInfo2 constructs a new QHostInfo object. func NewQHostInfo2(d *QHostInfo) *QHostInfo { - ret := C.QHostInfo_new2(d.cPointer()) - return newQHostInfo(ret) + var outptr_QHostInfo *C.QHostInfo = nil + + C.QHostInfo_new2(d.cPointer(), &outptr_QHostInfo) + ret := newQHostInfo(outptr_QHostInfo) + ret.isSubclass = true + return ret } // NewQHostInfo3 constructs a new QHostInfo object. func NewQHostInfo3(lookupId int) *QHostInfo { - ret := C.QHostInfo_new3((C.int)(lookupId)) - return newQHostInfo(ret) + var outptr_QHostInfo *C.QHostInfo = nil + + C.QHostInfo_new3((C.int)(lookupId), &outptr_QHostInfo) + ret := newQHostInfo(outptr_QHostInfo) + ret.isSubclass = true + return ret } func (this *QHostInfo) OperatorAssign(d *QHostInfo) { @@ -176,7 +195,7 @@ func QHostInfo_LocalDomainName() string { // Delete this object from C++ memory. func (this *QHostInfo) Delete() { - C.QHostInfo_Delete(this.h) + C.QHostInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qhostinfo.h b/qt6/network/gen_qhostinfo.h index a7faea88..409c71ec 100644 --- a/qt6/network/gen_qhostinfo.h +++ b/qt6/network/gen_qhostinfo.h @@ -22,9 +22,9 @@ typedef struct QHostAddress QHostAddress; typedef struct QHostInfo QHostInfo; #endif -QHostInfo* QHostInfo_new(); -QHostInfo* QHostInfo_new2(QHostInfo* d); -QHostInfo* QHostInfo_new3(int lookupId); +void QHostInfo_new(QHostInfo** outptr_QHostInfo); +void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo); +void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo); void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d); void QHostInfo_Swap(QHostInfo* self, QHostInfo* other); struct miqt_string QHostInfo_HostName(const QHostInfo* self); @@ -41,7 +41,7 @@ void QHostInfo_AbortHostLookup(int lookupId); QHostInfo* QHostInfo_FromName(struct miqt_string name); struct miqt_string QHostInfo_LocalHostName(); struct miqt_string QHostInfo_LocalDomainName(); -void QHostInfo_Delete(QHostInfo* self); +void QHostInfo_Delete(QHostInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qhstspolicy.cpp b/qt6/network/gen_qhstspolicy.cpp index f4e5a02b..f82b93ea 100644 --- a/qt6/network/gen_qhstspolicy.cpp +++ b/qt6/network/gen_qhstspolicy.cpp @@ -7,22 +7,26 @@ #include "gen_qhstspolicy.h" #include "_cgo_export.h" -QHstsPolicy* QHstsPolicy_new() { - return new QHstsPolicy(); +void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy) { + QHstsPolicy* ret = new QHstsPolicy(); + *outptr_QHstsPolicy = ret; } -QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host) { +void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy) { QString host_QString = QString::fromUtf8(host.data, host.len); - return new QHstsPolicy(*expiry, static_cast(flags), host_QString); + QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString); + *outptr_QHstsPolicy = ret; } -QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs) { - return new QHstsPolicy(*rhs); +void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy) { + QHstsPolicy* ret = new QHstsPolicy(*rhs); + *outptr_QHstsPolicy = ret; } -QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode) { +void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy) { QString host_QString = QString::fromUtf8(host.data, host.len); - return new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); + QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); + *outptr_QHstsPolicy = ret; } void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs) { @@ -85,7 +89,11 @@ struct miqt_string QHstsPolicy_Host1(const QHstsPolicy* self, unsigned int optio return _ms; } -void QHstsPolicy_Delete(QHstsPolicy* self) { - delete self; +void QHstsPolicy_Delete(QHstsPolicy* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qhstspolicy.go b/qt6/network/gen_qhstspolicy.go index d69e1ff3..c914f4a1 100644 --- a/qt6/network/gen_qhstspolicy.go +++ b/qt6/network/gen_qhstspolicy.go @@ -21,7 +21,8 @@ const ( ) type QHstsPolicy struct { - h *C.QHstsPolicy + h *C.QHstsPolicy + isSubclass bool } func (this *QHstsPolicy) cPointer() *C.QHstsPolicy { @@ -38,6 +39,7 @@ func (this *QHstsPolicy) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHstsPolicy constructs the type using only CGO pointers. func newQHstsPolicy(h *C.QHstsPolicy) *QHstsPolicy { if h == nil { return nil @@ -45,14 +47,23 @@ func newQHstsPolicy(h *C.QHstsPolicy) *QHstsPolicy { return &QHstsPolicy{h: h} } +// UnsafeNewQHstsPolicy constructs the type using only unsafe pointers. func UnsafeNewQHstsPolicy(h unsafe.Pointer) *QHstsPolicy { - return newQHstsPolicy((*C.QHstsPolicy)(h)) + if h == nil { + return nil + } + + return &QHstsPolicy{h: (*C.QHstsPolicy)(h)} } // NewQHstsPolicy constructs a new QHstsPolicy object. func NewQHstsPolicy() *QHstsPolicy { - ret := C.QHstsPolicy_new() - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new(&outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } // NewQHstsPolicy2 constructs a new QHstsPolicy object. @@ -61,14 +72,22 @@ func NewQHstsPolicy2(expiry *qt6.QDateTime, flags QHstsPolicy__PolicyFlag, host host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - ret := C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms) - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, &outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } // NewQHstsPolicy3 constructs a new QHstsPolicy object. func NewQHstsPolicy3(rhs *QHstsPolicy) *QHstsPolicy { - ret := C.QHstsPolicy_new3(rhs.cPointer()) - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new3(rhs.cPointer(), &outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } // NewQHstsPolicy4 constructs a new QHstsPolicy object. @@ -77,8 +96,12 @@ func NewQHstsPolicy4(expiry *qt6.QDateTime, flags QHstsPolicy__PolicyFlag, host host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - ret := C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode)) - return newQHstsPolicy(ret) + var outptr_QHstsPolicy *C.QHstsPolicy = nil + + C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode), &outptr_QHstsPolicy) + ret := newQHstsPolicy(outptr_QHstsPolicy) + ret.isSubclass = true + return ret } func (this *QHstsPolicy) OperatorAssign(rhs *QHstsPolicy) { @@ -144,7 +167,7 @@ func (this *QHstsPolicy) Host1(options qt6.QUrl__ComponentFormattingOption) stri // Delete this object from C++ memory. func (this *QHstsPolicy) Delete() { - C.QHstsPolicy_Delete(this.h) + C.QHstsPolicy_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qhstspolicy.h b/qt6/network/gen_qhstspolicy.h index cf726548..5752315e 100644 --- a/qt6/network/gen_qhstspolicy.h +++ b/qt6/network/gen_qhstspolicy.h @@ -22,10 +22,10 @@ typedef struct QDateTime QDateTime; typedef struct QHstsPolicy QHstsPolicy; #endif -QHstsPolicy* QHstsPolicy_new(); -QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host); -QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs); -QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode); +void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy); +void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy); +void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy); +void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy); void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs); void QHstsPolicy_Swap(QHstsPolicy* self, QHstsPolicy* other); void QHstsPolicy_SetHost(QHstsPolicy* self, struct miqt_string host); @@ -37,7 +37,7 @@ bool QHstsPolicy_IncludesSubDomains(const QHstsPolicy* self); bool QHstsPolicy_IsExpired(const QHstsPolicy* self); void QHstsPolicy_SetHost2(QHstsPolicy* self, struct miqt_string host, int mode); struct miqt_string QHstsPolicy_Host1(const QHstsPolicy* self, unsigned int options); -void QHstsPolicy_Delete(QHstsPolicy* self); +void QHstsPolicy_Delete(QHstsPolicy* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qhttp2configuration.cpp b/qt6/network/gen_qhttp2configuration.cpp index 715c08a3..f5f34f85 100644 --- a/qt6/network/gen_qhttp2configuration.cpp +++ b/qt6/network/gen_qhttp2configuration.cpp @@ -3,12 +3,14 @@ #include "gen_qhttp2configuration.h" #include "_cgo_export.h" -QHttp2Configuration* QHttp2Configuration_new() { - return new QHttp2Configuration(); +void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration) { + QHttp2Configuration* ret = new QHttp2Configuration(); + *outptr_QHttp2Configuration = ret; } -QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other) { - return new QHttp2Configuration(*other); +void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration) { + QHttp2Configuration* ret = new QHttp2Configuration(*other); + *outptr_QHttp2Configuration = ret; } void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other) { @@ -59,7 +61,11 @@ void QHttp2Configuration_Swap(QHttp2Configuration* self, QHttp2Configuration* ot self->swap(*other); } -void QHttp2Configuration_Delete(QHttp2Configuration* self) { - delete self; +void QHttp2Configuration_Delete(QHttp2Configuration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qhttp2configuration.go b/qt6/network/gen_qhttp2configuration.go index 2e98e1d2..6610f15d 100644 --- a/qt6/network/gen_qhttp2configuration.go +++ b/qt6/network/gen_qhttp2configuration.go @@ -14,7 +14,8 @@ import ( ) type QHttp2Configuration struct { - h *C.QHttp2Configuration + h *C.QHttp2Configuration + isSubclass bool } func (this *QHttp2Configuration) cPointer() *C.QHttp2Configuration { @@ -31,6 +32,7 @@ func (this *QHttp2Configuration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHttp2Configuration constructs the type using only CGO pointers. func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration { if h == nil { return nil @@ -38,20 +40,33 @@ func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration { return &QHttp2Configuration{h: h} } +// UnsafeNewQHttp2Configuration constructs the type using only unsafe pointers. func UnsafeNewQHttp2Configuration(h unsafe.Pointer) *QHttp2Configuration { - return newQHttp2Configuration((*C.QHttp2Configuration)(h)) + if h == nil { + return nil + } + + return &QHttp2Configuration{h: (*C.QHttp2Configuration)(h)} } // NewQHttp2Configuration constructs a new QHttp2Configuration object. func NewQHttp2Configuration() *QHttp2Configuration { - ret := C.QHttp2Configuration_new() - return newQHttp2Configuration(ret) + var outptr_QHttp2Configuration *C.QHttp2Configuration = nil + + C.QHttp2Configuration_new(&outptr_QHttp2Configuration) + ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret.isSubclass = true + return ret } // NewQHttp2Configuration2 constructs a new QHttp2Configuration object. func NewQHttp2Configuration2(other *QHttp2Configuration) *QHttp2Configuration { - ret := C.QHttp2Configuration_new2(other.cPointer()) - return newQHttp2Configuration(ret) + var outptr_QHttp2Configuration *C.QHttp2Configuration = nil + + C.QHttp2Configuration_new2(other.cPointer(), &outptr_QHttp2Configuration) + ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret.isSubclass = true + return ret } func (this *QHttp2Configuration) OperatorAssign(other *QHttp2Configuration) { @@ -104,7 +119,7 @@ func (this *QHttp2Configuration) Swap(other *QHttp2Configuration) { // Delete this object from C++ memory. func (this *QHttp2Configuration) Delete() { - C.QHttp2Configuration_Delete(this.h) + C.QHttp2Configuration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qhttp2configuration.h b/qt6/network/gen_qhttp2configuration.h index 77f417e7..4dc031ce 100644 --- a/qt6/network/gen_qhttp2configuration.h +++ b/qt6/network/gen_qhttp2configuration.h @@ -20,8 +20,8 @@ class QHttp2Configuration; typedef struct QHttp2Configuration QHttp2Configuration; #endif -QHttp2Configuration* QHttp2Configuration_new(); -QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other); +void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration); +void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration); void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other); void QHttp2Configuration_SetServerPushEnabled(QHttp2Configuration* self, bool enable); bool QHttp2Configuration_ServerPushEnabled(const QHttp2Configuration* self); @@ -34,7 +34,7 @@ unsigned int QHttp2Configuration_StreamReceiveWindowSize(const QHttp2Configurati bool QHttp2Configuration_SetMaxFrameSize(QHttp2Configuration* self, unsigned int size); unsigned int QHttp2Configuration_MaxFrameSize(const QHttp2Configuration* self); void QHttp2Configuration_Swap(QHttp2Configuration* self, QHttp2Configuration* other); -void QHttp2Configuration_Delete(QHttp2Configuration* self); +void QHttp2Configuration_Delete(QHttp2Configuration* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qhttpmultipart.cpp b/qt6/network/gen_qhttpmultipart.cpp index 28e7d119..56843a0a 100644 --- a/qt6/network/gen_qhttpmultipart.cpp +++ b/qt6/network/gen_qhttpmultipart.cpp @@ -1,23 +1,29 @@ #include +#include +#include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qhttpmultipart.h" #include "_cgo_export.h" -QHttpPart* QHttpPart_new() { - return new QHttpPart(); +void QHttpPart_new(QHttpPart** outptr_QHttpPart) { + QHttpPart* ret = new QHttpPart(); + *outptr_QHttpPart = ret; } -QHttpPart* QHttpPart_new2(QHttpPart* other) { - return new QHttpPart(*other); +void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart) { + QHttpPart* ret = new QHttpPart(*other); + *outptr_QHttpPart = ret; } void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other) { @@ -55,24 +61,219 @@ void QHttpPart_SetBodyDevice(QHttpPart* self, QIODevice* device) { self->setBodyDevice(device); } -void QHttpPart_Delete(QHttpPart* self) { - delete self; +void QHttpPart_Delete(QHttpPart* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QHttpMultiPart* QHttpMultiPart_new() { - return new QHttpMultiPart(); +class MiqtVirtualQHttpMultiPart : public virtual QHttpMultiPart { +public: + + MiqtVirtualQHttpMultiPart(): QHttpMultiPart() {}; + MiqtVirtualQHttpMultiPart(QHttpMultiPart::ContentType contentType): QHttpMultiPart(contentType) {}; + MiqtVirtualQHttpMultiPart(QObject* parent): QHttpMultiPart(parent) {}; + MiqtVirtualQHttpMultiPart(QHttpMultiPart::ContentType contentType, QObject* parent): QHttpMultiPart(contentType, parent) {}; + + virtual ~MiqtVirtualQHttpMultiPart() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QHttpMultiPart::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QHttpMultiPart_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QHttpMultiPart::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QHttpMultiPart::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QHttpMultiPart_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QHttpMultiPart::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QHttpMultiPart::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QHttpMultiPart_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QHttpMultiPart::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QHttpMultiPart::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QHttpMultiPart_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QHttpMultiPart::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QHttpMultiPart::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QHttpMultiPart_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QHttpMultiPart::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QHttpMultiPart::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QHttpMultiPart_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QHttpMultiPart::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QHttpMultiPart::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QHttpMultiPart_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QHttpMultiPart::disconnectNotify(*signal); + + } + +}; + +void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } -QHttpMultiPart* QHttpMultiPart_new2(int contentType) { - return new QHttpMultiPart(static_cast(contentType)); +void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType)); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } -QHttpMultiPart* QHttpMultiPart_new3(QObject* parent) { - return new QHttpMultiPart(parent); +void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(parent); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } -QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent) { - return new QHttpMultiPart(static_cast(contentType), parent); +void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { + MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType), parent); + *outptr_QHttpMultiPart = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self) { @@ -138,7 +339,67 @@ struct miqt_string QHttpMultiPart_Tr3(const char* s, const char* c, int n) { return _ms; } -void QHttpMultiPart_Delete(QHttpMultiPart* self) { - delete self; +void QHttpMultiPart_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__Event = slot; +} + +bool QHttpMultiPart_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_Event(event); +} + +void QHttpMultiPart_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__EventFilter = slot; +} + +bool QHttpMultiPart_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QHttpMultiPart_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__TimerEvent = slot; +} + +void QHttpMultiPart_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_TimerEvent(event); +} + +void QHttpMultiPart_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__ChildEvent = slot; +} + +void QHttpMultiPart_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_ChildEvent(event); +} + +void QHttpMultiPart_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__CustomEvent = slot; +} + +void QHttpMultiPart_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_CustomEvent(event); +} + +void QHttpMultiPart_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__ConnectNotify = slot; +} + +void QHttpMultiPart_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QHttpMultiPart_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QHttpMultiPart*)(self) )->handle__DisconnectNotify = slot; +} + +void QHttpMultiPart_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQHttpMultiPart*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QHttpMultiPart_Delete(QHttpMultiPart* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qhttpmultipart.go b/qt6/network/gen_qhttpmultipart.go index 3945204b..e80ab765 100644 --- a/qt6/network/gen_qhttpmultipart.go +++ b/qt6/network/gen_qhttpmultipart.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -24,7 +25,8 @@ const ( ) type QHttpPart struct { - h *C.QHttpPart + h *C.QHttpPart + isSubclass bool } func (this *QHttpPart) cPointer() *C.QHttpPart { @@ -41,6 +43,7 @@ func (this *QHttpPart) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQHttpPart constructs the type using only CGO pointers. func newQHttpPart(h *C.QHttpPart) *QHttpPart { if h == nil { return nil @@ -48,20 +51,33 @@ func newQHttpPart(h *C.QHttpPart) *QHttpPart { return &QHttpPart{h: h} } +// UnsafeNewQHttpPart constructs the type using only unsafe pointers. func UnsafeNewQHttpPart(h unsafe.Pointer) *QHttpPart { - return newQHttpPart((*C.QHttpPart)(h)) + if h == nil { + return nil + } + + return &QHttpPart{h: (*C.QHttpPart)(h)} } // NewQHttpPart constructs a new QHttpPart object. func NewQHttpPart() *QHttpPart { - ret := C.QHttpPart_new() - return newQHttpPart(ret) + var outptr_QHttpPart *C.QHttpPart = nil + + C.QHttpPart_new(&outptr_QHttpPart) + ret := newQHttpPart(outptr_QHttpPart) + ret.isSubclass = true + return ret } // NewQHttpPart2 constructs a new QHttpPart object. func NewQHttpPart2(other *QHttpPart) *QHttpPart { - ret := C.QHttpPart_new2(other.cPointer()) - return newQHttpPart(ret) + var outptr_QHttpPart *C.QHttpPart = nil + + C.QHttpPart_new2(other.cPointer(), &outptr_QHttpPart) + ret := newQHttpPart(outptr_QHttpPart) + ret.isSubclass = true + return ret } func (this *QHttpPart) OperatorAssign(other *QHttpPart) { @@ -107,7 +123,7 @@ func (this *QHttpPart) SetBodyDevice(device *qt6.QIODevice) { // Delete this object from C++ memory. func (this *QHttpPart) Delete() { - C.QHttpPart_Delete(this.h) + C.QHttpPart_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -120,7 +136,8 @@ func (this *QHttpPart) GoGC() { } type QHttpMultiPart struct { - h *C.QHttpMultiPart + h *C.QHttpMultiPart + isSubclass bool *qt6.QObject } @@ -138,39 +155,67 @@ func (this *QHttpMultiPart) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQHttpMultiPart(h *C.QHttpMultiPart) *QHttpMultiPart { +// newQHttpMultiPart constructs the type using only CGO pointers. +func newQHttpMultiPart(h *C.QHttpMultiPart, h_QObject *C.QObject) *QHttpMultiPart { if h == nil { return nil } - return &QHttpMultiPart{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QHttpMultiPart{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQHttpMultiPart(h unsafe.Pointer) *QHttpMultiPart { - return newQHttpMultiPart((*C.QHttpMultiPart)(h)) +// UnsafeNewQHttpMultiPart constructs the type using only unsafe pointers. +func UnsafeNewQHttpMultiPart(h unsafe.Pointer, h_QObject unsafe.Pointer) *QHttpMultiPart { + if h == nil { + return nil + } + + return &QHttpMultiPart{h: (*C.QHttpMultiPart)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQHttpMultiPart constructs a new QHttpMultiPart object. func NewQHttpMultiPart() *QHttpMultiPart { - ret := C.QHttpMultiPart_new() - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new(&outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHttpMultiPart2 constructs a new QHttpMultiPart object. func NewQHttpMultiPart2(contentType QHttpMultiPart__ContentType) *QHttpMultiPart { - ret := C.QHttpMultiPart_new2((C.int)(contentType)) - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new2((C.int)(contentType), &outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHttpMultiPart3 constructs a new QHttpMultiPart object. func NewQHttpMultiPart3(parent *qt6.QObject) *QHttpMultiPart { - ret := C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer())) - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } // NewQHttpMultiPart4 constructs a new QHttpMultiPart object. func NewQHttpMultiPart4(contentType QHttpMultiPart__ContentType, parent *qt6.QObject) *QHttpMultiPart { - ret := C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer())) - return newQHttpMultiPart(ret) + var outptr_QHttpMultiPart *C.QHttpMultiPart = nil + var outptr_QObject *C.QObject = nil + + C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) + ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QHttpMultiPart) MetaObject() *qt6.QMetaObject { @@ -236,9 +281,175 @@ func QHttpMultiPart_Tr3(s string, c string, n int) string { return _ret } +func (this *QHttpMultiPart) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QHttpMultiPart_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QHttpMultiPart) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QHttpMultiPart_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_Event +func miqt_exec_callback_QHttpMultiPart_Event(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHttpMultiPart{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QHttpMultiPart) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QHttpMultiPart_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QHttpMultiPart) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QHttpMultiPart_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_EventFilter +func miqt_exec_callback_QHttpMultiPart_EventFilter(self *C.QHttpMultiPart, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QHttpMultiPart{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QHttpMultiPart) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QHttpMultiPart_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QHttpMultiPart_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_TimerEvent +func miqt_exec_callback_QHttpMultiPart_TimerEvent(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QHttpMultiPart_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QHttpMultiPart_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_ChildEvent +func miqt_exec_callback_QHttpMultiPart_ChildEvent(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QHttpMultiPart_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QHttpMultiPart_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_CustomEvent +func miqt_exec_callback_QHttpMultiPart_CustomEvent(self *C.QHttpMultiPart, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QHttpMultiPart_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QHttpMultiPart_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_ConnectNotify +func miqt_exec_callback_QHttpMultiPart_ConnectNotify(self *C.QHttpMultiPart, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QHttpMultiPart) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QHttpMultiPart_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QHttpMultiPart) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QHttpMultiPart_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHttpMultiPart_DisconnectNotify +func miqt_exec_callback_QHttpMultiPart_DisconnectNotify(self *C.QHttpMultiPart, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QHttpMultiPart{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QHttpMultiPart) Delete() { - C.QHttpMultiPart_Delete(this.h) + C.QHttpMultiPart_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qhttpmultipart.h b/qt6/network/gen_qhttpmultipart.h index 261dcdb4..d5ed636b 100644 --- a/qt6/network/gen_qhttpmultipart.h +++ b/qt6/network/gen_qhttpmultipart.h @@ -16,24 +16,32 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QHttpMultiPart; class QHttpPart; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QHttpMultiPart QHttpMultiPart; typedef struct QHttpPart QHttpPart; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -QHttpPart* QHttpPart_new(); -QHttpPart* QHttpPart_new2(QHttpPart* other); +void QHttpPart_new(QHttpPart** outptr_QHttpPart); +void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart); void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other); void QHttpPart_Swap(QHttpPart* self, QHttpPart* other); bool QHttpPart_OperatorEqual(const QHttpPart* self, QHttpPart* other); @@ -42,12 +50,12 @@ void QHttpPart_SetHeader(QHttpPart* self, int header, QVariant* value); void QHttpPart_SetRawHeader(QHttpPart* self, struct miqt_string headerName, struct miqt_string headerValue); void QHttpPart_SetBody(QHttpPart* self, struct miqt_string body); void QHttpPart_SetBodyDevice(QHttpPart* self, QIODevice* device); -void QHttpPart_Delete(QHttpPart* self); +void QHttpPart_Delete(QHttpPart* self, bool isSubclass); -QHttpMultiPart* QHttpMultiPart_new(); -QHttpMultiPart* QHttpMultiPart_new2(int contentType); -QHttpMultiPart* QHttpMultiPart_new3(QObject* parent); -QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent); +void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self); void* QHttpMultiPart_Metacast(QHttpMultiPart* self, const char* param1); struct miqt_string QHttpMultiPart_Tr(const char* s); @@ -57,7 +65,21 @@ struct miqt_string QHttpMultiPart_Boundary(const QHttpMultiPart* self); void QHttpMultiPart_SetBoundary(QHttpMultiPart* self, struct miqt_string boundary); struct miqt_string QHttpMultiPart_Tr2(const char* s, const char* c); struct miqt_string QHttpMultiPart_Tr3(const char* s, const char* c, int n); -void QHttpMultiPart_Delete(QHttpMultiPart* self); +void QHttpMultiPart_override_virtual_Event(void* self, intptr_t slot); +bool QHttpMultiPart_virtualbase_Event(void* self, QEvent* event); +void QHttpMultiPart_override_virtual_EventFilter(void* self, intptr_t slot); +bool QHttpMultiPart_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QHttpMultiPart_override_virtual_TimerEvent(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QHttpMultiPart_override_virtual_ChildEvent(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QHttpMultiPart_override_virtual_CustomEvent(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_CustomEvent(void* self, QEvent* event); +void QHttpMultiPart_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QHttpMultiPart_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QHttpMultiPart_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QHttpMultiPart_Delete(QHttpMultiPart* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qlocalserver.cpp b/qt6/network/gen_qlocalserver.cpp index f71f4b73..d83917b3 100644 --- a/qt6/network/gen_qlocalserver.cpp +++ b/qt6/network/gen_qlocalserver.cpp @@ -1,20 +1,278 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qlocalserver.h" #include "_cgo_export.h" -QLocalServer* QLocalServer_new() { - return new QLocalServer(); +class MiqtVirtualQLocalServer : public virtual QLocalServer { +public: + + MiqtVirtualQLocalServer(): QLocalServer() {}; + MiqtVirtualQLocalServer(QObject* parent): QLocalServer(parent) {}; + + virtual ~MiqtVirtualQLocalServer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingConnections = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingConnections() const override { + if (handle__HasPendingConnections == 0) { + return QLocalServer::hasPendingConnections(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalServer_HasPendingConnections(const_cast(this), handle__HasPendingConnections); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasPendingConnections() const { + + return QLocalServer::hasPendingConnections(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextPendingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual QLocalSocket* nextPendingConnection() override { + if (handle__NextPendingConnection == 0) { + return QLocalServer::nextPendingConnection(); + } + + + QLocalSocket* callback_return_value = miqt_exec_callback_QLocalServer_NextPendingConnection(this, handle__NextPendingConnection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLocalSocket* virtualbase_NextPendingConnection() { + + return QLocalServer::nextPendingConnection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IncomingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual void incomingConnection(quintptr socketDescriptor) override { + if (handle__IncomingConnection == 0) { + QLocalServer::incomingConnection(socketDescriptor); + return; + } + + quintptr socketDescriptor_ret = socketDescriptor; + uintptr_t sigval1 = static_cast(socketDescriptor_ret); + + miqt_exec_callback_QLocalServer_IncomingConnection(this, handle__IncomingConnection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_IncomingConnection(uintptr_t socketDescriptor) { + + QLocalServer::incomingConnection(static_cast(socketDescriptor)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QLocalServer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QLocalServer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QLocalServer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QLocalServer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QLocalServer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QLocalServer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QLocalServer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QLocalServer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QLocalServer::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QLocalServer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QLocalServer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QLocalServer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QLocalServer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLocalServer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QLocalServer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QLocalServer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLocalServer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QLocalServer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QLocalServer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLocalServer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QLocalServer::disconnectNotify(*signal); + + } + +}; + +void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { + MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(); + *outptr_QLocalServer = ret; + *outptr_QObject = static_cast(ret); } -QLocalServer* QLocalServer_new2(QObject* parent) { - return new QLocalServer(parent); +void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { + MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(parent); + *outptr_QLocalServer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QLocalServer_MetaObject(const QLocalServer* self) { @@ -41,7 +299,7 @@ void QLocalServer_NewConnection(QLocalServer* self) { } void QLocalServer_connect_NewConnection(QLocalServer* self, intptr_t slot) { - QLocalServer::connect(self, static_cast(&QLocalServer::newConnection), self, [=]() { + MiqtVirtualQLocalServer::connect(self, static_cast(&QLocalServer::newConnection), self, [=]() { miqt_exec_callback_QLocalServer_NewConnection(slot); }); } @@ -178,7 +436,91 @@ bool QLocalServer_WaitForNewConnection2(QLocalServer* self, int msec, bool* time return self->waitForNewConnection(static_cast(msec), timedOut); } -void QLocalServer_Delete(QLocalServer* self) { - delete self; +void QLocalServer_override_virtual_HasPendingConnections(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__HasPendingConnections = slot; +} + +bool QLocalServer_virtualbase_HasPendingConnections(const void* self) { + return ( (const MiqtVirtualQLocalServer*)(self) )->virtualbase_HasPendingConnections(); +} + +void QLocalServer_override_virtual_NextPendingConnection(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__NextPendingConnection = slot; +} + +QLocalSocket* QLocalServer_virtualbase_NextPendingConnection(void* self) { + return ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_NextPendingConnection(); +} + +void QLocalServer_override_virtual_IncomingConnection(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__IncomingConnection = slot; +} + +void QLocalServer_virtualbase_IncomingConnection(void* self, uintptr_t socketDescriptor) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_IncomingConnection(socketDescriptor); +} + +void QLocalServer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__Event = slot; +} + +bool QLocalServer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_Event(event); +} + +void QLocalServer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__EventFilter = slot; +} + +bool QLocalServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QLocalServer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__TimerEvent = slot; +} + +void QLocalServer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_TimerEvent(event); +} + +void QLocalServer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__ChildEvent = slot; +} + +void QLocalServer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_ChildEvent(event); +} + +void QLocalServer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__CustomEvent = slot; +} + +void QLocalServer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_CustomEvent(event); +} + +void QLocalServer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__ConnectNotify = slot; +} + +void QLocalServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QLocalServer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLocalServer*)(self) )->handle__DisconnectNotify = slot; +} + +void QLocalServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLocalServer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QLocalServer_Delete(QLocalServer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qlocalserver.go b/qt6/network/gen_qlocalserver.go index a4ebf679..304bf81e 100644 --- a/qt6/network/gen_qlocalserver.go +++ b/qt6/network/gen_qlocalserver.go @@ -27,7 +27,8 @@ const ( ) type QLocalServer struct { - h *C.QLocalServer + h *C.QLocalServer + isSubclass bool *qt6.QObject } @@ -45,27 +46,45 @@ func (this *QLocalServer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLocalServer(h *C.QLocalServer) *QLocalServer { +// newQLocalServer constructs the type using only CGO pointers. +func newQLocalServer(h *C.QLocalServer, h_QObject *C.QObject) *QLocalServer { if h == nil { return nil } - return &QLocalServer{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QLocalServer{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQLocalServer(h unsafe.Pointer) *QLocalServer { - return newQLocalServer((*C.QLocalServer)(h)) +// UnsafeNewQLocalServer constructs the type using only unsafe pointers. +func UnsafeNewQLocalServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLocalServer { + if h == nil { + return nil + } + + return &QLocalServer{h: (*C.QLocalServer)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQLocalServer constructs a new QLocalServer object. func NewQLocalServer() *QLocalServer { - ret := C.QLocalServer_new() - return newQLocalServer(ret) + var outptr_QLocalServer *C.QLocalServer = nil + var outptr_QObject *C.QObject = nil + + C.QLocalServer_new(&outptr_QLocalServer, &outptr_QObject) + ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQLocalServer2 constructs a new QLocalServer object. func NewQLocalServer2(parent *qt6.QObject) *QLocalServer { - ret := C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer())) - return newQLocalServer(ret) + var outptr_QLocalServer *C.QLocalServer = nil + var outptr_QObject *C.QObject = nil + + C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalServer, &outptr_QObject) + ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QLocalServer) MetaObject() *qt6.QMetaObject { @@ -140,7 +159,7 @@ func (this *QLocalServer) MaxPendingConnections() int { } func (this *QLocalServer) NextPendingConnection() *QLocalSocket { - return UnsafeNewQLocalSocket(unsafe.Pointer(C.QLocalServer_NextPendingConnection(this.h))) + return UnsafeNewQLocalSocket(unsafe.Pointer(C.QLocalServer_NextPendingConnection(this.h)), nil, nil, nil) } func (this *QLocalServer) ServerName() string { @@ -227,9 +246,241 @@ func (this *QLocalServer) WaitForNewConnection2(msec int, timedOut *bool) bool { return (bool)(C.QLocalServer_WaitForNewConnection2(this.h, (C.int)(msec), (*C.bool)(unsafe.Pointer(timedOut)))) } +func (this *QLocalServer) callVirtualBase_HasPendingConnections() bool { + + return (bool)(C.QLocalServer_virtualbase_HasPendingConnections(unsafe.Pointer(this.h))) + +} +func (this *QLocalServer) OnHasPendingConnections(slot func(super func() bool) bool) { + C.QLocalServer_override_virtual_HasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_HasPendingConnections +func miqt_exec_callback_QLocalServer_HasPendingConnections(self *C.QLocalServer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_HasPendingConnections) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalServer) callVirtualBase_NextPendingConnection() *QLocalSocket { + + return UnsafeNewQLocalSocket(unsafe.Pointer(C.QLocalServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))), nil, nil, nil) +} +func (this *QLocalServer) OnNextPendingConnection(slot func(super func() *QLocalSocket) *QLocalSocket) { + C.QLocalServer_override_virtual_NextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_NextPendingConnection +func miqt_exec_callback_QLocalServer_NextPendingConnection(self *C.QLocalServer, cb C.intptr_t) *C.QLocalSocket { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLocalSocket) *QLocalSocket) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_NextPendingConnection) + + return virtualReturn.cPointer() + +} + +func (this *QLocalServer) callVirtualBase_IncomingConnection(socketDescriptor uintptr) { + + C.QLocalServer_virtualbase_IncomingConnection(unsafe.Pointer(this.h), (C.uintptr_t)(socketDescriptor)) + +} +func (this *QLocalServer) OnIncomingConnection(slot func(super func(socketDescriptor uintptr), socketDescriptor uintptr)) { + C.QLocalServer_override_virtual_IncomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_IncomingConnection +func miqt_exec_callback_QLocalServer_IncomingConnection(self *C.QLocalServer, cb C.intptr_t, socketDescriptor C.uintptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr), socketDescriptor uintptr)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + gofunc((&QLocalServer{h: self}).callVirtualBase_IncomingConnection, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QLocalServer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QLocalServer) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QLocalServer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_Event +func miqt_exec_callback_QLocalServer_Event(self *C.QLocalServer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalServer) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QLocalServer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QLocalServer) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QLocalServer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_EventFilter +func miqt_exec_callback_QLocalServer_EventFilter(self *C.QLocalServer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalServer) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QLocalServer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QLocalServer) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QLocalServer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_TimerEvent +func miqt_exec_callback_QLocalServer_TimerEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QLocalServer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QLocalServer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QLocalServer) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QLocalServer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_ChildEvent +func miqt_exec_callback_QLocalServer_ChildEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QLocalServer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QLocalServer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QLocalServer) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QLocalServer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_CustomEvent +func miqt_exec_callback_QLocalServer_CustomEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QLocalServer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QLocalServer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QLocalServer) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QLocalServer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_ConnectNotify +func miqt_exec_callback_QLocalServer_ConnectNotify(self *C.QLocalServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLocalServer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QLocalServer) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QLocalServer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QLocalServer) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QLocalServer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalServer_DisconnectNotify +func miqt_exec_callback_QLocalServer_DisconnectNotify(self *C.QLocalServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QLocalServer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QLocalServer) Delete() { - C.QLocalServer_Delete(this.h) + C.QLocalServer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qlocalserver.h b/qt6/network/gen_qlocalserver.h index 52c855ce..11ecb2a0 100644 --- a/qt6/network/gen_qlocalserver.h +++ b/qt6/network/gen_qlocalserver.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QLocalServer; class QLocalSocket; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLocalServer QLocalServer; typedef struct QLocalSocket QLocalSocket; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QLocalServer* QLocalServer_new(); -QLocalServer* QLocalServer_new2(QObject* parent); +void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); +void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); QMetaObject* QLocalServer_MetaObject(const QLocalServer* self); void* QLocalServer_Metacast(QLocalServer* self, const char* param1); struct miqt_string QLocalServer_Tr(const char* s); @@ -52,11 +60,32 @@ int QLocalServer_ListenBacklogSize(const QLocalServer* self); void QLocalServer_SetSocketOptions(QLocalServer* self, int options); int QLocalServer_SocketOptions(const QLocalServer* self); intptr_t QLocalServer_SocketDescriptor(const QLocalServer* self); +void QLocalServer_IncomingConnection(QLocalServer* self, uintptr_t socketDescriptor); struct miqt_string QLocalServer_Tr2(const char* s, const char* c); struct miqt_string QLocalServer_Tr3(const char* s, const char* c, int n); bool QLocalServer_WaitForNewConnection1(QLocalServer* self, int msec); bool QLocalServer_WaitForNewConnection2(QLocalServer* self, int msec, bool* timedOut); -void QLocalServer_Delete(QLocalServer* self); +void QLocalServer_override_virtual_HasPendingConnections(void* self, intptr_t slot); +bool QLocalServer_virtualbase_HasPendingConnections(const void* self); +void QLocalServer_override_virtual_NextPendingConnection(void* self, intptr_t slot); +QLocalSocket* QLocalServer_virtualbase_NextPendingConnection(void* self); +void QLocalServer_override_virtual_IncomingConnection(void* self, intptr_t slot); +void QLocalServer_virtualbase_IncomingConnection(void* self, uintptr_t socketDescriptor); +void QLocalServer_override_virtual_Event(void* self, intptr_t slot); +bool QLocalServer_virtualbase_Event(void* self, QEvent* event); +void QLocalServer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QLocalServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QLocalServer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLocalServer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QLocalServer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QLocalServer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QLocalServer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QLocalServer_virtualbase_CustomEvent(void* self, QEvent* event); +void QLocalServer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QLocalServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QLocalServer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QLocalServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QLocalServer_Delete(QLocalServer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qlocalsocket.cpp b/qt6/network/gen_qlocalsocket.cpp index 4babb605..b6d7051e 100644 --- a/qt6/network/gen_qlocalsocket.cpp +++ b/qt6/network/gen_qlocalsocket.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -8,12 +10,430 @@ #include "gen_qlocalsocket.h" #include "_cgo_export.h" -QLocalSocket* QLocalSocket_new() { - return new QLocalSocket(); +class MiqtVirtualQLocalSocket : public virtual QLocalSocket { +public: + + MiqtVirtualQLocalSocket(): QLocalSocket() {}; + MiqtVirtualQLocalSocket(QObject* parent): QLocalSocket(parent) {}; + + virtual ~MiqtVirtualQLocalSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QLocalSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QLocalSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QLocalSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QLocalSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QLocalSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QLocalSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QLocalSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QLocalSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual bool open(QIODeviceBase::OpenMode openMode) override { + if (handle__Open == 0) { + return QLocalSocket::open(openMode); + } + + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval1 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QLocalSocket_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int openMode) { + + return QLocalSocket::open(static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QLocalSocket::close(); + return; + } + + + miqt_exec_callback_QLocalSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QLocalSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QLocalSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QLocalSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QLocalSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QLocalSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QLocalSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QLocalSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* param1, qint64 param2) override { + if (handle__ReadData == 0) { + return QLocalSocket::readData(param1, param2); + } + + char* sigval1 = param1; + qint64 param2_ret = param2; + long long sigval2 = static_cast(param2_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* param1, long long param2) { + + qint64 _ret = QLocalSocket::readData(param1, static_cast(param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxSize) override { + if (handle__ReadLineData == 0) { + return QLocalSocket::readLineData(data, maxSize); + } + + char* sigval1 = data; + qint64 maxSize_ret = maxSize; + long long sigval2 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxSize) { + + qint64 _ret = QLocalSocket::readLineData(data, static_cast(maxSize)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QLocalSocket::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QLocalSocket::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* param1, qint64 param2) override { + if (handle__WriteData == 0) { + return QLocalSocket::writeData(param1, param2); + } + + const char* sigval1 = (const char*) param1; + qint64 param2_ret = param2; + long long sigval2 = static_cast(param2_ret); + + long long callback_return_value = miqt_exec_callback_QLocalSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* param1, long long param2) { + + qint64 _ret = QLocalSocket::writeData(param1, static_cast(param2)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pos = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 pos() const override { + if (handle__Pos == 0) { + return QLocalSocket::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_Pos(const_cast(this), handle__Pos); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Pos() const { + + qint64 _ret = QLocalSocket::pos(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Size = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 size() const override { + if (handle__Size == 0) { + return QLocalSocket::size(); + } + + + long long callback_return_value = miqt_exec_callback_QLocalSocket_Size(const_cast(this), handle__Size); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Size() const { + + qint64 _ret = QLocalSocket::size(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Seek = 0; + + // Subclass to allow providing a Go implementation + virtual bool seek(qint64 pos) override { + if (handle__Seek == 0) { + return QLocalSocket::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QLocalSocket_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QLocalSocket::seek(static_cast(pos)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QLocalSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QLocalSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual bool reset() override { + if (handle__Reset == 0) { + return QLocalSocket::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QLocalSocket_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QLocalSocket::reset(); + + } + +}; + +void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(); + *outptr_QLocalSocket = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QLocalSocket* QLocalSocket_new2(QObject* parent) { - return new QLocalSocket(parent); +void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(parent); + *outptr_QLocalSocket = ret; + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self) { @@ -97,8 +517,8 @@ bool QLocalSocket_CanReadLine(const QLocalSocket* self) { return self->canReadLine(); } -bool QLocalSocket_Open(QLocalSocket* self) { - return self->open(); +bool QLocalSocket_Open(QLocalSocket* self, int openMode) { + return self->open(static_cast(openMode)); } void QLocalSocket_Close(QLocalSocket* self) { @@ -150,8 +570,8 @@ int QLocalSocket_State(const QLocalSocket* self) { return static_cast(_ret); } -bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self) { - return self->waitForBytesWritten(); +bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } bool QLocalSocket_WaitForConnected(QLocalSocket* self) { @@ -162,8 +582,8 @@ bool QLocalSocket_WaitForDisconnected(QLocalSocket* self) { return self->waitForDisconnected(); } -bool QLocalSocket_WaitForReadyRead(QLocalSocket* self) { - return self->waitForReadyRead(); +bool QLocalSocket_WaitForReadyRead(QLocalSocket* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } void QLocalSocket_Connected(QLocalSocket* self) { @@ -171,7 +591,7 @@ void QLocalSocket_Connected(QLocalSocket* self) { } void QLocalSocket_connect_Connected(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::connected), self, [=]() { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::connected), self, [=]() { miqt_exec_callback_QLocalSocket_Connected(slot); }); } @@ -181,7 +601,7 @@ void QLocalSocket_Disconnected(QLocalSocket* self) { } void QLocalSocket_connect_Disconnected(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::disconnected), self, [=]() { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::disconnected), self, [=]() { miqt_exec_callback_QLocalSocket_Disconnected(slot); }); } @@ -191,7 +611,7 @@ void QLocalSocket_ErrorOccurred(QLocalSocket* self, int socketError) { } void QLocalSocket_connect_ErrorOccurred(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::errorOccurred), self, [=](QLocalSocket::LocalSocketError socketError) { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::errorOccurred), self, [=](QLocalSocket::LocalSocketError socketError) { QLocalSocket::LocalSocketError socketError_ret = socketError; int sigval1 = static_cast(socketError_ret); miqt_exec_callback_QLocalSocket_ErrorOccurred(slot, sigval1); @@ -203,7 +623,7 @@ void QLocalSocket_StateChanged(QLocalSocket* self, int socketState) { } void QLocalSocket_connect_StateChanged(QLocalSocket* self, intptr_t slot) { - QLocalSocket::connect(self, static_cast(&QLocalSocket::stateChanged), self, [=](QLocalSocket::LocalSocketState socketState) { + MiqtVirtualQLocalSocket::connect(self, static_cast(&QLocalSocket::stateChanged), self, [=](QLocalSocket::LocalSocketState socketState) { QLocalSocket::LocalSocketState socketState_ret = socketState; int sigval1 = static_cast(socketState_ret); miqt_exec_callback_QLocalSocket_StateChanged(slot, sigval1); @@ -241,10 +661,6 @@ void QLocalSocket_ConnectToServer2(QLocalSocket* self, struct miqt_string name, self->connectToServer(name_QString, static_cast(openMode)); } -bool QLocalSocket_Open1(QLocalSocket* self, int openMode) { - return self->open(static_cast(openMode)); -} - bool QLocalSocket_SetSocketDescriptor2(QLocalSocket* self, intptr_t socketDescriptor, int socketState) { return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(socketState)); } @@ -253,10 +669,6 @@ bool QLocalSocket_SetSocketDescriptor3(QLocalSocket* self, intptr_t socketDescri return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(socketState), static_cast(openMode)); } -bool QLocalSocket_WaitForBytesWritten1(QLocalSocket* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); -} - bool QLocalSocket_WaitForConnected1(QLocalSocket* self, int msecs) { return self->waitForConnected(static_cast(msecs)); } @@ -265,11 +677,147 @@ bool QLocalSocket_WaitForDisconnected1(QLocalSocket* self, int msecs) { return self->waitForDisconnected(static_cast(msecs)); } -bool QLocalSocket_WaitForReadyRead1(QLocalSocket* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); +void QLocalSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__IsSequential = slot; +} + +bool QLocalSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_IsSequential(); +} + +void QLocalSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QLocalSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QLocalSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QLocalSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QLocalSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QLocalSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QLocalSocket_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Open = slot; +} + +bool QLocalSocket_virtualbase_Open(void* self, int openMode) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Open(openMode); +} + +void QLocalSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Close = slot; +} + +void QLocalSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Close(); +} + +void QLocalSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QLocalSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QLocalSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QLocalSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QLocalSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__ReadData = slot; +} + +long long QLocalSocket_virtualbase_ReadData(void* self, char* param1, long long param2) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_ReadData(param1, param2); +} + +void QLocalSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QLocalSocket_virtualbase_ReadLineData(void* self, char* data, long long maxSize) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_ReadLineData(data, maxSize); +} + +void QLocalSocket_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__SkipData = slot; +} + +long long QLocalSocket_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_SkipData(maxSize); +} + +void QLocalSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__WriteData = slot; +} + +long long QLocalSocket_virtualbase_WriteData(void* self, const char* param1, long long param2) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_WriteData(param1, param2); +} + +void QLocalSocket_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Pos = slot; +} + +long long QLocalSocket_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_Pos(); +} + +void QLocalSocket_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Size = slot; +} + +long long QLocalSocket_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_Size(); +} + +void QLocalSocket_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Seek = slot; +} + +bool QLocalSocket_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Seek(pos); +} + +void QLocalSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__AtEnd = slot; +} + +bool QLocalSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQLocalSocket*)(self) )->virtualbase_AtEnd(); +} + +void QLocalSocket_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QLocalSocket*)(self) )->handle__Reset = slot; +} + +bool QLocalSocket_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQLocalSocket*)(self) )->virtualbase_Reset(); } -void QLocalSocket_Delete(QLocalSocket* self) { - delete self; +void QLocalSocket_Delete(QLocalSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qlocalsocket.go b/qt6/network/gen_qlocalsocket.go index ebc60133..9d5d5b9a 100644 --- a/qt6/network/gen_qlocalsocket.go +++ b/qt6/network/gen_qlocalsocket.go @@ -48,7 +48,8 @@ const ( ) type QLocalSocket struct { - h *C.QLocalSocket + h *C.QLocalSocket + isSubclass bool *qt6.QIODevice } @@ -66,27 +67,49 @@ func (this *QLocalSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQLocalSocket(h *C.QLocalSocket) *QLocalSocket { +// newQLocalSocket constructs the type using only CGO pointers. +func newQLocalSocket(h *C.QLocalSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QLocalSocket { if h == nil { return nil } - return &QLocalSocket{h: h, QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QLocalSocket{h: h, + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} } -func UnsafeNewQLocalSocket(h unsafe.Pointer) *QLocalSocket { - return newQLocalSocket((*C.QLocalSocket)(h)) +// UnsafeNewQLocalSocket constructs the type using only unsafe pointers. +func UnsafeNewQLocalSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QLocalSocket { + if h == nil { + return nil + } + + return &QLocalSocket{h: (*C.QLocalSocket)(h), + QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQLocalSocket constructs a new QLocalSocket object. func NewQLocalSocket() *QLocalSocket { - ret := C.QLocalSocket_new() - return newQLocalSocket(ret) + var outptr_QLocalSocket *C.QLocalSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QLocalSocket_new(&outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQLocalSocket2 constructs a new QLocalSocket object. func NewQLocalSocket2(parent *qt6.QObject) *QLocalSocket { - ret := C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQLocalSocket(ret) + var outptr_QLocalSocket *C.QLocalSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QLocalSocket) MetaObject() *qt6.QMetaObject { @@ -166,8 +189,8 @@ func (this *QLocalSocket) CanReadLine() bool { return (bool)(C.QLocalSocket_CanReadLine(this.h)) } -func (this *QLocalSocket) Open() bool { - return (bool)(C.QLocalSocket_Open(this.h)) +func (this *QLocalSocket) Open(openMode qt6.QIODeviceBase__OpenModeFlag) bool { + return (bool)(C.QLocalSocket_Open(this.h, (C.int)(openMode))) } func (this *QLocalSocket) Close() { @@ -214,8 +237,8 @@ func (this *QLocalSocket) State() QLocalSocket__LocalSocketState { return (QLocalSocket__LocalSocketState)(C.QLocalSocket_State(this.h)) } -func (this *QLocalSocket) WaitForBytesWritten() bool { - return (bool)(C.QLocalSocket_WaitForBytesWritten(this.h)) +func (this *QLocalSocket) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QLocalSocket_WaitForBytesWritten(this.h, (C.int)(msecs))) } func (this *QLocalSocket) WaitForConnected() bool { @@ -226,8 +249,8 @@ func (this *QLocalSocket) WaitForDisconnected() bool { return (bool)(C.QLocalSocket_WaitForDisconnected(this.h)) } -func (this *QLocalSocket) WaitForReadyRead() bool { - return (bool)(C.QLocalSocket_WaitForReadyRead(this.h)) +func (this *QLocalSocket) WaitForReadyRead(msecs int) bool { + return (bool)(C.QLocalSocket_WaitForReadyRead(this.h, (C.int)(msecs))) } func (this *QLocalSocket) Connected() { @@ -338,10 +361,6 @@ func (this *QLocalSocket) ConnectToServer2(name string, openMode qt6.QIODeviceBa C.QLocalSocket_ConnectToServer2(this.h, name_ms, (C.int)(openMode)) } -func (this *QLocalSocket) Open1(openMode qt6.QIODeviceBase__OpenModeFlag) bool { - return (bool)(C.QLocalSocket_Open1(this.h, (C.int)(openMode))) -} - func (this *QLocalSocket) SetSocketDescriptor2(socketDescriptor uintptr, socketState QLocalSocket__LocalSocketState) bool { return (bool)(C.QLocalSocket_SetSocketDescriptor2(this.h, (C.intptr_t)(socketDescriptor), (C.int)(socketState))) } @@ -350,10 +369,6 @@ func (this *QLocalSocket) SetSocketDescriptor3(socketDescriptor uintptr, socketS return (bool)(C.QLocalSocket_SetSocketDescriptor3(this.h, (C.intptr_t)(socketDescriptor), (C.int)(socketState), (C.int)(openMode))) } -func (this *QLocalSocket) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QLocalSocket_WaitForBytesWritten1(this.h, (C.int)(msecs))) -} - func (this *QLocalSocket) WaitForConnected1(msecs int) bool { return (bool)(C.QLocalSocket_WaitForConnected1(this.h, (C.int)(msecs))) } @@ -362,13 +377,420 @@ func (this *QLocalSocket) WaitForDisconnected1(msecs int) bool { return (bool)(C.QLocalSocket_WaitForDisconnected1(this.h, (C.int)(msecs))) } -func (this *QLocalSocket) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QLocalSocket_WaitForReadyRead1(this.h, (C.int)(msecs))) +func (this *QLocalSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QLocalSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_IsSequential +func miqt_exec_callback_QLocalSocket_IsSequential(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QLocalSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_BytesAvailable +func miqt_exec_callback_QLocalSocket_BytesAvailable(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QLocalSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_BytesToWrite +func miqt_exec_callback_QLocalSocket_BytesToWrite(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QLocalSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_CanReadLine +func miqt_exec_callback_QLocalSocket_CanReadLine(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Open(openMode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QLocalSocket_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(openMode))) + +} +func (this *QLocalSocket) OnOpen(slot func(super func(openMode qt6.QIODeviceBase__OpenModeFlag) bool, openMode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QLocalSocket_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Open +func miqt_exec_callback_QLocalSocket_Open(self *C.QLocalSocket, cb C.intptr_t, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(openMode qt6.QIODeviceBase__OpenModeFlag) bool, openMode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QIODeviceBase__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Close() { + + C.QLocalSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QLocalSocket) OnClose(slot func(super func())) { + C.QLocalSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Close +func miqt_exec_callback_QLocalSocket_Close(self *C.QLocalSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QLocalSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QLocalSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QLocalSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QLocalSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QLocalSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_WaitForBytesWritten +func miqt_exec_callback_QLocalSocket_WaitForBytesWritten(self *C.QLocalSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QLocalSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QLocalSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QLocalSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_WaitForReadyRead +func miqt_exec_callback_QLocalSocket_WaitForReadyRead(self *C.QLocalSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_ReadData(param1 string, param2 int64) int64 { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + + return (int64)(C.QLocalSocket_virtualbase_ReadData(unsafe.Pointer(this.h), param1_Cstring, (C.longlong)(param2))) + +} +func (this *QLocalSocket) OnReadData(slot func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) { + C.QLocalSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_ReadData +func miqt_exec_callback_QLocalSocket_ReadData(self *C.QLocalSocket, cb C.intptr_t, param1 *C.char, param2 C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + param1_ret := param1 + slotval1 := C.GoString(param1_ret) + + slotval2 := (int64)(param2) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_ReadLineData(data string, maxSize int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QLocalSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxSize))) + +} +func (this *QLocalSocket) OnReadLineData(slot func(super func(data string, maxSize int64) int64, data string, maxSize int64) int64) { + C.QLocalSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_ReadLineData +func miqt_exec_callback_QLocalSocket_ReadLineData(self *C.QLocalSocket, cb C.intptr_t, data *C.char, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxSize int64) int64, data string, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxSize) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QLocalSocket_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QLocalSocket) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QLocalSocket_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_SkipData +func miqt_exec_callback_QLocalSocket_SkipData(self *C.QLocalSocket, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_WriteData(param1 string, param2 int64) int64 { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + + return (int64)(C.QLocalSocket_virtualbase_WriteData(unsafe.Pointer(this.h), param1_Cstring, (C.longlong)(param2))) + +} +func (this *QLocalSocket) OnWriteData(slot func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) { + C.QLocalSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_WriteData +func miqt_exec_callback_QLocalSocket_WriteData(self *C.QLocalSocket, cb C.intptr_t, param1 *C.const_char, param2 C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 string, param2 int64) int64, param1 string, param2 int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + param1_ret := param1 + slotval1 := C.GoString(param1_ret) + + slotval2 := (int64)(param2) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Pos() int64 { + + return (int64)(C.QLocalSocket_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnPos(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Pos +func miqt_exec_callback_QLocalSocket_Pos(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Size() int64 { + + return (int64)(C.QLocalSocket_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnSize(slot func(super func() int64) int64) { + C.QLocalSocket_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Size +func miqt_exec_callback_QLocalSocket_Size(self *C.QLocalSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QLocalSocket_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QLocalSocket) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QLocalSocket_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Seek +func miqt_exec_callback_QLocalSocket_Seek(self *C.QLocalSocket, cb C.intptr_t, pos C.longlong) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pos) + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QLocalSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_AtEnd +func miqt_exec_callback_QLocalSocket_AtEnd(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QLocalSocket) callVirtualBase_Reset() bool { + + return (bool)(C.QLocalSocket_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QLocalSocket) OnReset(slot func(super func() bool) bool) { + C.QLocalSocket_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLocalSocket_Reset +func miqt_exec_callback_QLocalSocket_Reset(self *C.QLocalSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLocalSocket{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + } // Delete this object from C++ memory. func (this *QLocalSocket) Delete() { - C.QLocalSocket_Delete(this.h) + C.QLocalSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qlocalsocket.h b/qt6/network/gen_qlocalsocket.h index 2dce947f..8e90d7d0 100644 --- a/qt6/network/gen_qlocalsocket.h +++ b/qt6/network/gen_qlocalsocket.h @@ -15,17 +15,21 @@ extern "C" { #endif #ifdef __cplusplus +class QIODevice; +class QIODeviceBase; class QLocalSocket; class QMetaObject; class QObject; #else +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QLocalSocket QLocalSocket; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -QLocalSocket* QLocalSocket_new(); -QLocalSocket* QLocalSocket_new2(QObject* parent); +void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self); void* QLocalSocket_Metacast(QLocalSocket* self, const char* param1); struct miqt_string QLocalSocket_Tr(const char* s); @@ -40,7 +44,7 @@ bool QLocalSocket_IsSequential(const QLocalSocket* self); long long QLocalSocket_BytesAvailable(const QLocalSocket* self); long long QLocalSocket_BytesToWrite(const QLocalSocket* self); bool QLocalSocket_CanReadLine(const QLocalSocket* self); -bool QLocalSocket_Open(QLocalSocket* self); +bool QLocalSocket_Open(QLocalSocket* self, int openMode); void QLocalSocket_Close(QLocalSocket* self); int QLocalSocket_Error(const QLocalSocket* self); bool QLocalSocket_Flush(QLocalSocket* self); @@ -52,10 +56,10 @@ intptr_t QLocalSocket_SocketDescriptor(const QLocalSocket* self); void QLocalSocket_SetSocketOptions(QLocalSocket* self, int option); int QLocalSocket_SocketOptions(const QLocalSocket* self); int QLocalSocket_State(const QLocalSocket* self); -bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self); +bool QLocalSocket_WaitForBytesWritten(QLocalSocket* self, int msecs); bool QLocalSocket_WaitForConnected(QLocalSocket* self); bool QLocalSocket_WaitForDisconnected(QLocalSocket* self); -bool QLocalSocket_WaitForReadyRead(QLocalSocket* self); +bool QLocalSocket_WaitForReadyRead(QLocalSocket* self, int msecs); void QLocalSocket_Connected(QLocalSocket* self); void QLocalSocket_connect_Connected(QLocalSocket* self, intptr_t slot); void QLocalSocket_Disconnected(QLocalSocket* self); @@ -64,18 +68,53 @@ void QLocalSocket_ErrorOccurred(QLocalSocket* self, int socketError); void QLocalSocket_connect_ErrorOccurred(QLocalSocket* self, intptr_t slot); void QLocalSocket_StateChanged(QLocalSocket* self, int socketState); void QLocalSocket_connect_StateChanged(QLocalSocket* self, intptr_t slot); +long long QLocalSocket_ReadData(QLocalSocket* self, char* param1, long long param2); +long long QLocalSocket_ReadLineData(QLocalSocket* self, char* data, long long maxSize); +long long QLocalSocket_SkipData(QLocalSocket* self, long long maxSize); +long long QLocalSocket_WriteData(QLocalSocket* self, const char* param1, long long param2); struct miqt_string QLocalSocket_Tr2(const char* s, const char* c); struct miqt_string QLocalSocket_Tr3(const char* s, const char* c, int n); void QLocalSocket_ConnectToServer1(QLocalSocket* self, int openMode); void QLocalSocket_ConnectToServer2(QLocalSocket* self, struct miqt_string name, int openMode); -bool QLocalSocket_Open1(QLocalSocket* self, int openMode); bool QLocalSocket_SetSocketDescriptor2(QLocalSocket* self, intptr_t socketDescriptor, int socketState); bool QLocalSocket_SetSocketDescriptor3(QLocalSocket* self, intptr_t socketDescriptor, int socketState, int openMode); -bool QLocalSocket_WaitForBytesWritten1(QLocalSocket* self, int msecs); bool QLocalSocket_WaitForConnected1(QLocalSocket* self, int msecs); bool QLocalSocket_WaitForDisconnected1(QLocalSocket* self, int msecs); -bool QLocalSocket_WaitForReadyRead1(QLocalSocket* self, int msecs); -void QLocalSocket_Delete(QLocalSocket* self); +void QLocalSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_IsSequential(const void* self); +void QLocalSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_BytesAvailable(const void* self); +void QLocalSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_BytesToWrite(const void* self); +void QLocalSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_CanReadLine(const void* self); +void QLocalSocket_override_virtual_Open(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_Open(void* self, int openMode); +void QLocalSocket_override_virtual_Close(void* self, intptr_t slot); +void QLocalSocket_virtualbase_Close(void* self); +void QLocalSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QLocalSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QLocalSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_ReadData(void* self, char* param1, long long param2); +void QLocalSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_ReadLineData(void* self, char* data, long long maxSize); +void QLocalSocket_override_virtual_SkipData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_SkipData(void* self, long long maxSize); +void QLocalSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_WriteData(void* self, const char* param1, long long param2); +void QLocalSocket_override_virtual_Pos(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_Pos(const void* self); +void QLocalSocket_override_virtual_Size(void* self, intptr_t slot); +long long QLocalSocket_virtualbase_Size(const void* self); +void QLocalSocket_override_virtual_Seek(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_Seek(void* self, long long pos); +void QLocalSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_AtEnd(const void* self); +void QLocalSocket_override_virtual_Reset(void* self, intptr_t slot); +bool QLocalSocket_virtualbase_Reset(void* self); +void QLocalSocket_Delete(QLocalSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkaccessmanager.cpp b/qt6/network/gen_qnetworkaccessmanager.cpp index 04223898..8aff3ad9 100644 --- a/qt6/network/gen_qnetworkaccessmanager.cpp +++ b/qt6/network/gen_qnetworkaccessmanager.cpp @@ -1,10 +1,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -19,16 +22,275 @@ #include #include #include +#include #include #include "gen_qnetworkaccessmanager.h" #include "_cgo_export.h" -QNetworkAccessManager* QNetworkAccessManager_new() { - return new QNetworkAccessManager(); +class MiqtVirtualQNetworkAccessManager : public virtual QNetworkAccessManager { +public: + + MiqtVirtualQNetworkAccessManager(): QNetworkAccessManager() {}; + MiqtVirtualQNetworkAccessManager(QObject* parent): QNetworkAccessManager(parent) {}; + + virtual ~MiqtVirtualQNetworkAccessManager() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedSchemes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList supportedSchemes() const override { + if (handle__SupportedSchemes == 0) { + return QNetworkAccessManager::supportedSchemes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QNetworkAccessManager_SupportedSchemes(const_cast(this), handle__SupportedSchemes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_SupportedSchemes() const { + + QStringList _ret = QNetworkAccessManager::supportedSchemes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateRequest = 0; + + // Subclass to allow providing a Go implementation + virtual QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData) override { + if (handle__CreateRequest == 0) { + return QNetworkAccessManager::createRequest(op, request, outgoingData); + } + + QNetworkAccessManager::Operation op_ret = op; + int sigval1 = static_cast(op_ret); + const QNetworkRequest& request_ret = request; + // Cast returned reference into pointer + QNetworkRequest* sigval2 = const_cast(&request_ret); + QIODevice* sigval3 = outgoingData; + + QNetworkReply* callback_return_value = miqt_exec_callback_QNetworkAccessManager_CreateRequest(this, handle__CreateRequest, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QNetworkReply* virtualbase_CreateRequest(int op, QNetworkRequest* request, QIODevice* outgoingData) { + + return QNetworkAccessManager::createRequest(static_cast(op), *request, outgoingData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QNetworkAccessManager::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkAccessManager_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QNetworkAccessManager::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QNetworkAccessManager::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkAccessManager_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QNetworkAccessManager::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QNetworkAccessManager::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QNetworkAccessManager_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QNetworkAccessManager::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QNetworkAccessManager::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QNetworkAccessManager_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QNetworkAccessManager::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QNetworkAccessManager::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QNetworkAccessManager_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QNetworkAccessManager::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QNetworkAccessManager::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkAccessManager_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QNetworkAccessManager::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QNetworkAccessManager::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkAccessManager_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QNetworkAccessManager::disconnectNotify(*signal); + + } + +}; + +void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { + MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(); + *outptr_QNetworkAccessManager = ret; + *outptr_QObject = static_cast(ret); } -QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent) { - return new QNetworkAccessManager(parent); +void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { + MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(parent); + *outptr_QNetworkAccessManager = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self) { @@ -249,7 +511,7 @@ void QNetworkAccessManager_ProxyAuthenticationRequired(QNetworkAccessManager* se } void QNetworkAccessManager_connect_ProxyAuthenticationRequired(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::proxyAuthenticationRequired), self, [=](const QNetworkProxy& proxy, QAuthenticator* authenticator) { const QNetworkProxy& proxy_ret = proxy; // Cast returned reference into pointer QNetworkProxy* sigval1 = const_cast(&proxy_ret); @@ -263,7 +525,7 @@ void QNetworkAccessManager_AuthenticationRequired(QNetworkAccessManager* self, Q } void QNetworkAccessManager_connect_AuthenticationRequired(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::authenticationRequired), self, [=](QNetworkReply* reply, QAuthenticator* authenticator) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::authenticationRequired), self, [=](QNetworkReply* reply, QAuthenticator* authenticator) { QNetworkReply* sigval1 = reply; QAuthenticator* sigval2 = authenticator; miqt_exec_callback_QNetworkAccessManager_AuthenticationRequired(slot, sigval1, sigval2); @@ -275,7 +537,7 @@ void QNetworkAccessManager_Finished(QNetworkAccessManager* self, QNetworkReply* } void QNetworkAccessManager_connect_Finished(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::finished), self, [=](QNetworkReply* reply) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::finished), self, [=](QNetworkReply* reply) { QNetworkReply* sigval1 = reply; miqt_exec_callback_QNetworkAccessManager_Finished(slot, sigval1); }); @@ -286,7 +548,7 @@ void QNetworkAccessManager_Encrypted(QNetworkAccessManager* self, QNetworkReply* } void QNetworkAccessManager_connect_Encrypted(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::encrypted), self, [=](QNetworkReply* reply) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::encrypted), self, [=](QNetworkReply* reply) { QNetworkReply* sigval1 = reply; miqt_exec_callback_QNetworkAccessManager_Encrypted(slot, sigval1); }); @@ -303,7 +565,7 @@ void QNetworkAccessManager_SslErrors(QNetworkAccessManager* self, QNetworkReply* } void QNetworkAccessManager_connect_SslErrors(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast&)>(&QNetworkAccessManager::sslErrors), self, [=](QNetworkReply* reply, const QList& errors) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast&)>(&QNetworkAccessManager::sslErrors), self, [=](QNetworkReply* reply, const QList& errors) { QNetworkReply* sigval1 = reply; const QList& errors_ret = errors; // Convert QList<> from C++ memory to manually-managed C memory @@ -324,7 +586,7 @@ void QNetworkAccessManager_PreSharedKeyAuthenticationRequired(QNetworkAccessMana } void QNetworkAccessManager_connect_PreSharedKeyAuthenticationRequired(QNetworkAccessManager* self, intptr_t slot) { - QNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::preSharedKeyAuthenticationRequired), self, [=](QNetworkReply* reply, QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQNetworkAccessManager::connect(self, static_cast(&QNetworkAccessManager::preSharedKeyAuthenticationRequired), self, [=](QNetworkReply* reply, QSslPreSharedKeyAuthenticator* authenticator) { QNetworkReply* sigval1 = reply; QSslPreSharedKeyAuthenticator* sigval2 = authenticator; miqt_exec_callback_QNetworkAccessManager_PreSharedKeyAuthenticationRequired(slot, sigval1, sigval2); @@ -382,7 +644,83 @@ void QNetworkAccessManager_SetTransferTimeout1(QNetworkAccessManager* self, int self->setTransferTimeout(static_cast(timeout)); } -void QNetworkAccessManager_Delete(QNetworkAccessManager* self) { - delete self; +void QNetworkAccessManager_override_virtual_SupportedSchemes(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__SupportedSchemes = slot; +} + +struct miqt_array /* of struct miqt_string */ QNetworkAccessManager_virtualbase_SupportedSchemes(const void* self) { + return ( (const MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_SupportedSchemes(); +} + +void QNetworkAccessManager_override_virtual_CreateRequest(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__CreateRequest = slot; +} + +QNetworkReply* QNetworkAccessManager_virtualbase_CreateRequest(void* self, int op, QNetworkRequest* request, QIODevice* outgoingData) { + return ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_CreateRequest(op, request, outgoingData); +} + +void QNetworkAccessManager_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__Event = slot; +} + +bool QNetworkAccessManager_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_Event(event); +} + +void QNetworkAccessManager_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__EventFilter = slot; +} + +bool QNetworkAccessManager_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QNetworkAccessManager_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__TimerEvent = slot; +} + +void QNetworkAccessManager_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_TimerEvent(event); +} + +void QNetworkAccessManager_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__ChildEvent = slot; +} + +void QNetworkAccessManager_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_ChildEvent(event); +} + +void QNetworkAccessManager_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__CustomEvent = slot; +} + +void QNetworkAccessManager_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_CustomEvent(event); +} + +void QNetworkAccessManager_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__ConnectNotify = slot; +} + +void QNetworkAccessManager_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QNetworkAccessManager_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkAccessManager*)(self) )->handle__DisconnectNotify = slot; +} + +void QNetworkAccessManager_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkAccessManager*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QNetworkAccessManager_Delete(QNetworkAccessManager* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkaccessmanager.go b/qt6/network/gen_qnetworkaccessmanager.go index dac6bca6..f3812aa8 100644 --- a/qt6/network/gen_qnetworkaccessmanager.go +++ b/qt6/network/gen_qnetworkaccessmanager.go @@ -28,7 +28,8 @@ const ( ) type QNetworkAccessManager struct { - h *C.QNetworkAccessManager + h *C.QNetworkAccessManager + isSubclass bool *qt6.QObject } @@ -46,27 +47,45 @@ func (this *QNetworkAccessManager) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkAccessManager(h *C.QNetworkAccessManager) *QNetworkAccessManager { +// newQNetworkAccessManager constructs the type using only CGO pointers. +func newQNetworkAccessManager(h *C.QNetworkAccessManager, h_QObject *C.QObject) *QNetworkAccessManager { if h == nil { return nil } - return &QNetworkAccessManager{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkAccessManager{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkAccessManager(h unsafe.Pointer) *QNetworkAccessManager { - return newQNetworkAccessManager((*C.QNetworkAccessManager)(h)) +// UnsafeNewQNetworkAccessManager constructs the type using only unsafe pointers. +func UnsafeNewQNetworkAccessManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkAccessManager { + if h == nil { + return nil + } + + return &QNetworkAccessManager{h: (*C.QNetworkAccessManager)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQNetworkAccessManager constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager() *QNetworkAccessManager { - ret := C.QNetworkAccessManager_new() - return newQNetworkAccessManager(ret) + var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkAccessManager_new(&outptr_QNetworkAccessManager, &outptr_QObject) + ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkAccessManager2 constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager2(parent *qt6.QObject) *QNetworkAccessManager { - ret := C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkAccessManager(ret) + var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkAccessManager, &outptr_QObject) + ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkAccessManager) MetaObject() *qt6.QMetaObject { @@ -129,7 +148,7 @@ func (this *QNetworkAccessManager) SetProxyFactory(factory *QNetworkProxyFactory } func (this *QNetworkAccessManager) Cache() *QAbstractNetworkCache { - return UnsafeNewQAbstractNetworkCache(unsafe.Pointer(C.QNetworkAccessManager_Cache(this.h))) + return UnsafeNewQAbstractNetworkCache(unsafe.Pointer(C.QNetworkAccessManager_Cache(this.h)), nil) } func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { @@ -137,7 +156,7 @@ func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { } func (this *QNetworkAccessManager) CookieJar() *QNetworkCookieJar { - return UnsafeNewQNetworkCookieJar(unsafe.Pointer(C.QNetworkAccessManager_CookieJar(this.h))) + return UnsafeNewQNetworkCookieJar(unsafe.Pointer(C.QNetworkAccessManager_CookieJar(this.h)), nil) } func (this *QNetworkAccessManager) SetCookieJar(cookieJar *QNetworkCookieJar) { @@ -184,44 +203,44 @@ func (this *QNetworkAccessManager) StrictTransportSecurityHosts() []QHstsPolicy } func (this *QNetworkAccessManager) Head(request *QNetworkRequest) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Head(this.h, request.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Head(this.h, request.cPointer())), nil, nil, nil) } func (this *QNetworkAccessManager) Get(request *QNetworkRequest) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Get(this.h, request.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Get(this.h, request.cPointer())), nil, nil, nil) } func (this *QNetworkAccessManager) Post(request *QNetworkRequest, data *qt6.QIODevice) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))), nil, nil, nil) } func (this *QNetworkAccessManager) Post2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias)), nil, nil, nil) } func (this *QNetworkAccessManager) Put(request *QNetworkRequest, data *qt6.QIODevice) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))), nil, nil, nil) } func (this *QNetworkAccessManager) Put2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias)), nil, nil, nil) } func (this *QNetworkAccessManager) DeleteResource(request *QNetworkRequest) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer())), nil, nil, nil) } func (this *QNetworkAccessManager) SendCustomRequest(request *QNetworkRequest, verb []byte) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias)), nil, nil, nil) } func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, verb []byte, data []byte) *QNetworkReply { @@ -231,22 +250,22 @@ func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias)), nil, nil, nil) } func (this *QNetworkAccessManager) Post3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer())), nil, nil, nil) } func (this *QNetworkAccessManager) Put3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer())), nil, nil, nil) } func (this *QNetworkAccessManager) SendCustomRequest3(request *QNetworkRequest, verb []byte, multiPart *QHttpMultiPart) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer()))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer())), nil, nil, nil) } func (this *QNetworkAccessManager) ConnectToHostEncrypted(hostName string) { @@ -337,7 +356,7 @@ func miqt_exec_callback_QNetworkAccessManager_AuthenticationRequired(cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil, nil) slotval2 := UnsafeNewQAuthenticator(unsafe.Pointer(authenticator)) gofunc(slotval1, slotval2) @@ -358,7 +377,7 @@ func miqt_exec_callback_QNetworkAccessManager_Finished(cb C.intptr_t, reply *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil, nil) gofunc(slotval1) } @@ -378,7 +397,7 @@ func miqt_exec_callback_QNetworkAccessManager_Encrypted(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil, nil) gofunc(slotval1) } @@ -404,7 +423,7 @@ func miqt_exec_callback_QNetworkAccessManager_SslErrors(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil, nil) var errors_ma C.struct_miqt_array = errors errors_ret := make([]QSslError, int(errors_ma.len)) errors_outCast := (*[0xffff]*C.QSslError)(unsafe.Pointer(errors_ma.data)) // hey ya @@ -434,7 +453,7 @@ func miqt_exec_callback_QNetworkAccessManager_PreSharedKeyAuthenticationRequired } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply)) + slotval1 := UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil, nil) slotval2 := UnsafeNewQSslPreSharedKeyAuthenticator(unsafe.Pointer(authenticator)) gofunc(slotval1, slotval2) @@ -474,7 +493,7 @@ func (this *QNetworkAccessManager) SendCustomRequest32(request *QNetworkRequest, verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer())))) + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer()))), nil, nil, nil) } func (this *QNetworkAccessManager) ConnectToHostEncrypted22(hostName string, port uint16) { @@ -505,9 +524,243 @@ func (this *QNetworkAccessManager) SetTransferTimeout1(timeout int) { C.QNetworkAccessManager_SetTransferTimeout1(this.h, (C.int)(timeout)) } +func (this *QNetworkAccessManager) callVirtualBase_SupportedSchemes() []string { + + var _ma C.struct_miqt_array = C.QNetworkAccessManager_virtualbase_SupportedSchemes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QNetworkAccessManager) OnSupportedSchemes(slot func(super func() []string) []string) { + C.QNetworkAccessManager_override_virtual_SupportedSchemes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_SupportedSchemes +func miqt_exec_callback_QNetworkAccessManager_SupportedSchemes(self *C.QNetworkAccessManager, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_SupportedSchemes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QNetworkAccessManager) callVirtualBase_CreateRequest(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply { + + return UnsafeNewQNetworkReply(unsafe.Pointer(C.QNetworkAccessManager_virtualbase_CreateRequest(unsafe.Pointer(this.h), (C.int)(op), request.cPointer(), (*C.QIODevice)(outgoingData.UnsafePointer()))), nil, nil, nil) +} +func (this *QNetworkAccessManager) OnCreateRequest(slot func(super func(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply, op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply) { + C.QNetworkAccessManager_override_virtual_CreateRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_CreateRequest +func miqt_exec_callback_QNetworkAccessManager_CreateRequest(self *C.QNetworkAccessManager, cb C.intptr_t, op C.int, request *C.QNetworkRequest, outgoingData *C.QIODevice) *C.QNetworkReply { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply, op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QNetworkAccessManager__Operation)(op) + + slotval2 := UnsafeNewQNetworkRequest(unsafe.Pointer(request)) + slotval3 := qt6.UnsafeNewQIODevice(unsafe.Pointer(outgoingData), nil, nil) + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_CreateRequest, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QNetworkAccessManager) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QNetworkAccessManager_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkAccessManager) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QNetworkAccessManager_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_Event +func miqt_exec_callback_QNetworkAccessManager_Event(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkAccessManager) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QNetworkAccessManager_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkAccessManager) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QNetworkAccessManager_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_EventFilter +func miqt_exec_callback_QNetworkAccessManager_EventFilter(self *C.QNetworkAccessManager, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkAccessManager) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QNetworkAccessManager_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QNetworkAccessManager_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_TimerEvent +func miqt_exec_callback_QNetworkAccessManager_TimerEvent(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QNetworkAccessManager_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QNetworkAccessManager_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_ChildEvent +func miqt_exec_callback_QNetworkAccessManager_ChildEvent(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QNetworkAccessManager_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QNetworkAccessManager_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_CustomEvent +func miqt_exec_callback_QNetworkAccessManager_CustomEvent(self *C.QNetworkAccessManager, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QNetworkAccessManager_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QNetworkAccessManager_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_ConnectNotify +func miqt_exec_callback_QNetworkAccessManager_ConnectNotify(self *C.QNetworkAccessManager, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QNetworkAccessManager) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QNetworkAccessManager_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkAccessManager) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QNetworkAccessManager_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkAccessManager_DisconnectNotify +func miqt_exec_callback_QNetworkAccessManager_DisconnectNotify(self *C.QNetworkAccessManager, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QNetworkAccessManager) Delete() { - C.QNetworkAccessManager_Delete(this.h) + C.QNetworkAccessManager_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkaccessmanager.h b/qt6/network/gen_qnetworkaccessmanager.h index 55cd22e3..3513a3a8 100644 --- a/qt6/network/gen_qnetworkaccessmanager.h +++ b/qt6/network/gen_qnetworkaccessmanager.h @@ -18,9 +18,12 @@ extern "C" { class QAbstractNetworkCache; class QAuthenticator; class QByteArray; +class QChildEvent; +class QEvent; class QHstsPolicy; class QHttpMultiPart; class QIODevice; +class QMetaMethod; class QMetaObject; class QNetworkAccessManager; class QNetworkCookieJar; @@ -32,13 +35,17 @@ class QObject; class QSslConfiguration; class QSslError; class QSslPreSharedKeyAuthenticator; +class QTimerEvent; #else typedef struct QAbstractNetworkCache QAbstractNetworkCache; typedef struct QAuthenticator QAuthenticator; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QHstsPolicy QHstsPolicy; typedef struct QHttpMultiPart QHttpMultiPart; typedef struct QIODevice QIODevice; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkAccessManager QNetworkAccessManager; typedef struct QNetworkCookieJar QNetworkCookieJar; @@ -50,10 +57,11 @@ typedef struct QObject QObject; typedef struct QSslConfiguration QSslConfiguration; typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; +typedef struct QTimerEvent QTimerEvent; #endif -QNetworkAccessManager* QNetworkAccessManager_new(); -QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent); +void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); +void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self); void* QNetworkAccessManager_Metacast(QNetworkAccessManager* self, const char* param1); struct miqt_string QNetworkAccessManager_Tr(const char* s); @@ -107,6 +115,7 @@ void QNetworkAccessManager_SslErrors(QNetworkAccessManager* self, QNetworkReply* void QNetworkAccessManager_connect_SslErrors(QNetworkAccessManager* self, intptr_t slot); void QNetworkAccessManager_PreSharedKeyAuthenticationRequired(QNetworkAccessManager* self, QNetworkReply* reply, QSslPreSharedKeyAuthenticator* authenticator); void QNetworkAccessManager_connect_PreSharedKeyAuthenticationRequired(QNetworkAccessManager* self, intptr_t slot); +QNetworkReply* QNetworkAccessManager_CreateRequest(QNetworkAccessManager* self, int op, QNetworkRequest* request, QIODevice* outgoingData); struct miqt_string QNetworkAccessManager_Tr2(const char* s, const char* c); struct miqt_string QNetworkAccessManager_Tr3(const char* s, const char* c, int n); void QNetworkAccessManager_EnableStrictTransportSecurityStore2(QNetworkAccessManager* self, bool enabled, struct miqt_string storeDir); @@ -115,7 +124,25 @@ void QNetworkAccessManager_ConnectToHostEncrypted22(QNetworkAccessManager* self, void QNetworkAccessManager_ConnectToHostEncrypted3(QNetworkAccessManager* self, struct miqt_string hostName, uint16_t port, QSslConfiguration* sslConfiguration); void QNetworkAccessManager_ConnectToHost2(QNetworkAccessManager* self, struct miqt_string hostName, uint16_t port); void QNetworkAccessManager_SetTransferTimeout1(QNetworkAccessManager* self, int timeout); -void QNetworkAccessManager_Delete(QNetworkAccessManager* self); +void QNetworkAccessManager_override_virtual_SupportedSchemes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QNetworkAccessManager_virtualbase_SupportedSchemes(const void* self); +void QNetworkAccessManager_override_virtual_CreateRequest(void* self, intptr_t slot); +QNetworkReply* QNetworkAccessManager_virtualbase_CreateRequest(void* self, int op, QNetworkRequest* request, QIODevice* outgoingData); +void QNetworkAccessManager_override_virtual_Event(void* self, intptr_t slot); +bool QNetworkAccessManager_virtualbase_Event(void* self, QEvent* event); +void QNetworkAccessManager_override_virtual_EventFilter(void* self, intptr_t slot); +bool QNetworkAccessManager_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QNetworkAccessManager_override_virtual_TimerEvent(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QNetworkAccessManager_override_virtual_ChildEvent(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QNetworkAccessManager_override_virtual_CustomEvent(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_CustomEvent(void* self, QEvent* event); +void QNetworkAccessManager_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QNetworkAccessManager_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QNetworkAccessManager_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QNetworkAccessManager_Delete(QNetworkAccessManager* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkcookie.cpp b/qt6/network/gen_qnetworkcookie.cpp index 0b1e49fe..242e5567 100644 --- a/qt6/network/gen_qnetworkcookie.cpp +++ b/qt6/network/gen_qnetworkcookie.cpp @@ -10,23 +10,27 @@ #include "gen_qnetworkcookie.h" #include "_cgo_export.h" -QNetworkCookie* QNetworkCookie_new() { - return new QNetworkCookie(); +void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie) { + QNetworkCookie* ret = new QNetworkCookie(); + *outptr_QNetworkCookie = ret; } -QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other) { - return new QNetworkCookie(*other); +void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie) { + QNetworkCookie* ret = new QNetworkCookie(*other); + *outptr_QNetworkCookie = ret; } -QNetworkCookie* QNetworkCookie_new3(struct miqt_string name) { +void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie) { QByteArray name_QByteArray(name.data, name.len); - return new QNetworkCookie(name_QByteArray); + QNetworkCookie* ret = new QNetworkCookie(name_QByteArray); + *outptr_QNetworkCookie = ret; } -QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value) { +void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie) { QByteArray name_QByteArray(name.data, name.len); QByteArray value_QByteArray(value.data, value.len); - return new QNetworkCookie(name_QByteArray, value_QByteArray); + QNetworkCookie* ret = new QNetworkCookie(name_QByteArray, value_QByteArray); + *outptr_QNetworkCookie = ret; } void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other) { @@ -182,7 +186,11 @@ struct miqt_string QNetworkCookie_ToRawForm1(const QNetworkCookie* self, int for return _ms; } -void QNetworkCookie_Delete(QNetworkCookie* self) { - delete self; +void QNetworkCookie_Delete(QNetworkCookie* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkcookie.go b/qt6/network/gen_qnetworkcookie.go index 78ea178e..f17ea1f3 100644 --- a/qt6/network/gen_qnetworkcookie.go +++ b/qt6/network/gen_qnetworkcookie.go @@ -31,7 +31,8 @@ const ( ) type QNetworkCookie struct { - h *C.QNetworkCookie + h *C.QNetworkCookie + isSubclass bool } func (this *QNetworkCookie) cPointer() *C.QNetworkCookie { @@ -48,6 +49,7 @@ func (this *QNetworkCookie) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkCookie constructs the type using only CGO pointers. func newQNetworkCookie(h *C.QNetworkCookie) *QNetworkCookie { if h == nil { return nil @@ -55,20 +57,33 @@ func newQNetworkCookie(h *C.QNetworkCookie) *QNetworkCookie { return &QNetworkCookie{h: h} } +// UnsafeNewQNetworkCookie constructs the type using only unsafe pointers. func UnsafeNewQNetworkCookie(h unsafe.Pointer) *QNetworkCookie { - return newQNetworkCookie((*C.QNetworkCookie)(h)) + if h == nil { + return nil + } + + return &QNetworkCookie{h: (*C.QNetworkCookie)(h)} } // NewQNetworkCookie constructs a new QNetworkCookie object. func NewQNetworkCookie() *QNetworkCookie { - ret := C.QNetworkCookie_new() - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new(&outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } // NewQNetworkCookie2 constructs a new QNetworkCookie object. func NewQNetworkCookie2(other *QNetworkCookie) *QNetworkCookie { - ret := C.QNetworkCookie_new2(other.cPointer()) - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new2(other.cPointer(), &outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } // NewQNetworkCookie3 constructs a new QNetworkCookie object. @@ -76,8 +91,12 @@ func NewQNetworkCookie3(name []byte) *QNetworkCookie { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - ret := C.QNetworkCookie_new3(name_alias) - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new3(name_alias, &outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } // NewQNetworkCookie4 constructs a new QNetworkCookie object. @@ -88,8 +107,12 @@ func NewQNetworkCookie4(name []byte, value []byte) *QNetworkCookie { value_alias := C.struct_miqt_string{} value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) value_alias.len = C.size_t(len(value)) - ret := C.QNetworkCookie_new4(name_alias, value_alias) - return newQNetworkCookie(ret) + var outptr_QNetworkCookie *C.QNetworkCookie = nil + + C.QNetworkCookie_new4(name_alias, value_alias, &outptr_QNetworkCookie) + ret := newQNetworkCookie(outptr_QNetworkCookie) + ret.isSubclass = true + return ret } func (this *QNetworkCookie) OperatorAssign(other *QNetworkCookie) { @@ -245,7 +268,7 @@ func (this *QNetworkCookie) ToRawForm1(form QNetworkCookie__RawForm) []byte { // Delete this object from C++ memory. func (this *QNetworkCookie) Delete() { - C.QNetworkCookie_Delete(this.h) + C.QNetworkCookie_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkcookie.h b/qt6/network/gen_qnetworkcookie.h index 4f5f142f..f04a1b11 100644 --- a/qt6/network/gen_qnetworkcookie.h +++ b/qt6/network/gen_qnetworkcookie.h @@ -26,10 +26,10 @@ typedef struct QNetworkCookie QNetworkCookie; typedef struct QUrl QUrl; #endif -QNetworkCookie* QNetworkCookie_new(); -QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other); -QNetworkCookie* QNetworkCookie_new3(struct miqt_string name); -QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value); +void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie); +void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie); +void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie); +void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie); void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other); void QNetworkCookie_Swap(QNetworkCookie* self, QNetworkCookie* other); bool QNetworkCookie_OperatorEqual(const QNetworkCookie* self, QNetworkCookie* other); @@ -56,7 +56,7 @@ bool QNetworkCookie_HasSameIdentifier(const QNetworkCookie* self, QNetworkCookie void QNetworkCookie_Normalize(QNetworkCookie* self, QUrl* url); struct miqt_array /* of QNetworkCookie* */ QNetworkCookie_ParseCookies(struct miqt_string cookieString); struct miqt_string QNetworkCookie_ToRawForm1(const QNetworkCookie* self, int form); -void QNetworkCookie_Delete(QNetworkCookie* self); +void QNetworkCookie_Delete(QNetworkCookie* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkcookiejar.cpp b/qt6/network/gen_qnetworkcookiejar.cpp index 43051753..d3b91b8a 100644 --- a/qt6/network/gen_qnetworkcookiejar.cpp +++ b/qt6/network/gen_qnetworkcookiejar.cpp @@ -1,4 +1,7 @@ +#include +#include #include +#include #include #include #include @@ -6,17 +9,387 @@ #include #include #include +#include #include #include #include "gen_qnetworkcookiejar.h" #include "_cgo_export.h" -QNetworkCookieJar* QNetworkCookieJar_new() { - return new QNetworkCookieJar(); +class MiqtVirtualQNetworkCookieJar : public virtual QNetworkCookieJar { +public: + + MiqtVirtualQNetworkCookieJar(): QNetworkCookieJar() {}; + MiqtVirtualQNetworkCookieJar(QObject* parent): QNetworkCookieJar(parent) {}; + + virtual ~MiqtVirtualQNetworkCookieJar() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CookiesForUrl = 0; + + // Subclass to allow providing a Go implementation + virtual QList cookiesForUrl(const QUrl& url) const override { + if (handle__CookiesForUrl == 0) { + return QNetworkCookieJar::cookiesForUrl(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + struct miqt_array /* of QNetworkCookie* */ callback_return_value = miqt_exec_callback_QNetworkCookieJar_CookiesForUrl(const_cast(this), handle__CookiesForUrl, sigval1); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QNetworkCookie** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of QNetworkCookie* */ virtualbase_CookiesForUrl(QUrl* url) const { + + QList _ret = QNetworkCookieJar::cookiesForUrl(*url); + // Convert QList<> from C++ memory to manually-managed C memory + QNetworkCookie** _arr = static_cast(malloc(sizeof(QNetworkCookie*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QNetworkCookie(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetCookiesFromUrl = 0; + + // Subclass to allow providing a Go implementation + virtual bool setCookiesFromUrl(const QList& cookieList, const QUrl& url) override { + if (handle__SetCookiesFromUrl == 0) { + return QNetworkCookieJar::setCookiesFromUrl(cookieList, url); + } + + const QList& cookieList_ret = cookieList; + // Convert QList<> from C++ memory to manually-managed C memory + QNetworkCookie** cookieList_arr = static_cast(malloc(sizeof(QNetworkCookie*) * cookieList_ret.length())); + for (size_t i = 0, e = cookieList_ret.length(); i < e; ++i) { + cookieList_arr[i] = new QNetworkCookie(cookieList_ret[i]); + } + struct miqt_array cookieList_out; + cookieList_out.len = cookieList_ret.length(); + cookieList_out.data = static_cast(cookieList_arr); + struct miqt_array /* of QNetworkCookie* */ sigval1 = cookieList_out; + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&url_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_SetCookiesFromUrl(this, handle__SetCookiesFromUrl, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetCookiesFromUrl(struct miqt_array /* of QNetworkCookie* */ cookieList, QUrl* url) { + QList cookieList_QList; + cookieList_QList.reserve(cookieList.len); + QNetworkCookie** cookieList_arr = static_cast(cookieList.data); + for(size_t i = 0; i < cookieList.len; ++i) { + cookieList_QList.push_back(*(cookieList_arr[i])); + } + + return QNetworkCookieJar::setCookiesFromUrl(cookieList_QList, *url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InsertCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertCookie(const QNetworkCookie& cookie) override { + if (handle__InsertCookie == 0) { + return QNetworkCookieJar::insertCookie(cookie); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_InsertCookie(this, handle__InsertCookie, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_InsertCookie(QNetworkCookie* cookie) { + + return QNetworkCookieJar::insertCookie(*cookie); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool updateCookie(const QNetworkCookie& cookie) override { + if (handle__UpdateCookie == 0) { + return QNetworkCookieJar::updateCookie(cookie); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_UpdateCookie(this, handle__UpdateCookie, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_UpdateCookie(QNetworkCookie* cookie) { + + return QNetworkCookieJar::updateCookie(*cookie); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DeleteCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool deleteCookie(const QNetworkCookie& cookie) override { + if (handle__DeleteCookie == 0) { + return QNetworkCookieJar::deleteCookie(cookie); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_DeleteCookie(this, handle__DeleteCookie, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DeleteCookie(QNetworkCookie* cookie) { + + return QNetworkCookieJar::deleteCookie(*cookie); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ValidateCookie = 0; + + // Subclass to allow providing a Go implementation + virtual bool validateCookie(const QNetworkCookie& cookie, const QUrl& url) const override { + if (handle__ValidateCookie == 0) { + return QNetworkCookieJar::validateCookie(cookie, url); + } + + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&url_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_ValidateCookie(const_cast(this), handle__ValidateCookie, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ValidateCookie(QNetworkCookie* cookie, QUrl* url) const { + + return QNetworkCookieJar::validateCookie(*cookie, *url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QNetworkCookieJar::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QNetworkCookieJar::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QNetworkCookieJar::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QNetworkCookieJar_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QNetworkCookieJar::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QNetworkCookieJar::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QNetworkCookieJar_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QNetworkCookieJar::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QNetworkCookieJar::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QNetworkCookieJar_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QNetworkCookieJar::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QNetworkCookieJar::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QNetworkCookieJar_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QNetworkCookieJar::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QNetworkCookieJar::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkCookieJar_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QNetworkCookieJar::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QNetworkCookieJar::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QNetworkCookieJar_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QNetworkCookieJar::disconnectNotify(*signal); + + } + +}; + +void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { + MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(); + *outptr_QNetworkCookieJar = ret; + *outptr_QObject = static_cast(ret); } -QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent) { - return new QNetworkCookieJar(parent); +void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { + MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(parent); + *outptr_QNetworkCookieJar = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self) { @@ -95,7 +468,115 @@ struct miqt_string QNetworkCookieJar_Tr3(const char* s, const char* c, int n) { return _ms; } -void QNetworkCookieJar_Delete(QNetworkCookieJar* self) { - delete self; +void QNetworkCookieJar_override_virtual_CookiesForUrl(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__CookiesForUrl = slot; +} + +struct miqt_array /* of QNetworkCookie* */ QNetworkCookieJar_virtualbase_CookiesForUrl(const void* self, QUrl* url) { + return ( (const MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_CookiesForUrl(url); +} + +void QNetworkCookieJar_override_virtual_SetCookiesFromUrl(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__SetCookiesFromUrl = slot; +} + +bool QNetworkCookieJar_virtualbase_SetCookiesFromUrl(void* self, struct miqt_array /* of QNetworkCookie* */ cookieList, QUrl* url) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_SetCookiesFromUrl(cookieList, url); +} + +void QNetworkCookieJar_override_virtual_InsertCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__InsertCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_InsertCookie(void* self, QNetworkCookie* cookie) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_InsertCookie(cookie); +} + +void QNetworkCookieJar_override_virtual_UpdateCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__UpdateCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_UpdateCookie(void* self, QNetworkCookie* cookie) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_UpdateCookie(cookie); +} + +void QNetworkCookieJar_override_virtual_DeleteCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__DeleteCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_DeleteCookie(void* self, QNetworkCookie* cookie) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_DeleteCookie(cookie); +} + +void QNetworkCookieJar_override_virtual_ValidateCookie(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__ValidateCookie = slot; +} + +bool QNetworkCookieJar_virtualbase_ValidateCookie(const void* self, QNetworkCookie* cookie, QUrl* url) { + return ( (const MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_ValidateCookie(cookie, url); +} + +void QNetworkCookieJar_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__Event = slot; +} + +bool QNetworkCookieJar_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_Event(event); +} + +void QNetworkCookieJar_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__EventFilter = slot; +} + +bool QNetworkCookieJar_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QNetworkCookieJar_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__TimerEvent = slot; +} + +void QNetworkCookieJar_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_TimerEvent(event); +} + +void QNetworkCookieJar_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__ChildEvent = slot; +} + +void QNetworkCookieJar_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_ChildEvent(event); +} + +void QNetworkCookieJar_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__CustomEvent = slot; +} + +void QNetworkCookieJar_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_CustomEvent(event); +} + +void QNetworkCookieJar_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__ConnectNotify = slot; +} + +void QNetworkCookieJar_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QNetworkCookieJar_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QNetworkCookieJar*)(self) )->handle__DisconnectNotify = slot; +} + +void QNetworkCookieJar_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQNetworkCookieJar*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QNetworkCookieJar_Delete(QNetworkCookieJar* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkcookiejar.go b/qt6/network/gen_qnetworkcookiejar.go index d2f5f671..9efdcfee 100644 --- a/qt6/network/gen_qnetworkcookiejar.go +++ b/qt6/network/gen_qnetworkcookiejar.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QNetworkCookieJar struct { - h *C.QNetworkCookieJar + h *C.QNetworkCookieJar + isSubclass bool *qt6.QObject } @@ -33,27 +35,45 @@ func (this *QNetworkCookieJar) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkCookieJar(h *C.QNetworkCookieJar) *QNetworkCookieJar { +// newQNetworkCookieJar constructs the type using only CGO pointers. +func newQNetworkCookieJar(h *C.QNetworkCookieJar, h_QObject *C.QObject) *QNetworkCookieJar { if h == nil { return nil } - return &QNetworkCookieJar{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkCookieJar{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkCookieJar(h unsafe.Pointer) *QNetworkCookieJar { - return newQNetworkCookieJar((*C.QNetworkCookieJar)(h)) +// UnsafeNewQNetworkCookieJar constructs the type using only unsafe pointers. +func UnsafeNewQNetworkCookieJar(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkCookieJar { + if h == nil { + return nil + } + + return &QNetworkCookieJar{h: (*C.QNetworkCookieJar)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQNetworkCookieJar constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar() *QNetworkCookieJar { - ret := C.QNetworkCookieJar_new() - return newQNetworkCookieJar(ret) + var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkCookieJar_new(&outptr_QNetworkCookieJar, &outptr_QObject) + ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkCookieJar2 constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar2(parent *qt6.QObject) *QNetworkCookieJar { - ret := C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkCookieJar(ret) + var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkCookieJar, &outptr_QObject) + ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkCookieJar) MetaObject() *qt6.QMetaObject { @@ -132,9 +152,358 @@ func QNetworkCookieJar_Tr3(s string, c string, n int) string { return _ret } +func (this *QNetworkCookieJar) callVirtualBase_CookiesForUrl(url *qt6.QUrl) []QNetworkCookie { + + var _ma C.struct_miqt_array = C.QNetworkCookieJar_virtualbase_CookiesForUrl(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())) + _ret := make([]QNetworkCookie, int(_ma.len)) + _outCast := (*[0xffff]*C.QNetworkCookie)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQNetworkCookie(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QNetworkCookieJar) OnCookiesForUrl(slot func(super func(url *qt6.QUrl) []QNetworkCookie, url *qt6.QUrl) []QNetworkCookie) { + C.QNetworkCookieJar_override_virtual_CookiesForUrl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_CookiesForUrl +func miqt_exec_callback_QNetworkCookieJar_CookiesForUrl(self *C.QNetworkCookieJar, cb C.intptr_t, url *C.QUrl) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt6.QUrl) []QNetworkCookie, url *qt6.QUrl) []QNetworkCookie) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_CookiesForUrl, slotval1) + virtualReturn_CArray := (*[0xffff]*C.QNetworkCookie)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = virtualReturn[i].cPointer() + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QNetworkCookieJar) callVirtualBase_SetCookiesFromUrl(cookieList []QNetworkCookie, url *qt6.QUrl) bool { + cookieList_CArray := (*[0xffff]*C.QNetworkCookie)(C.malloc(C.size_t(8 * len(cookieList)))) + defer C.free(unsafe.Pointer(cookieList_CArray)) + for i := range cookieList { + cookieList_CArray[i] = cookieList[i].cPointer() + } + cookieList_ma := C.struct_miqt_array{len: C.size_t(len(cookieList)), data: unsafe.Pointer(cookieList_CArray)} + + return (bool)(C.QNetworkCookieJar_virtualbase_SetCookiesFromUrl(unsafe.Pointer(this.h), cookieList_ma, (*C.QUrl)(url.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnSetCookiesFromUrl(slot func(super func(cookieList []QNetworkCookie, url *qt6.QUrl) bool, cookieList []QNetworkCookie, url *qt6.QUrl) bool) { + C.QNetworkCookieJar_override_virtual_SetCookiesFromUrl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_SetCookiesFromUrl +func miqt_exec_callback_QNetworkCookieJar_SetCookiesFromUrl(self *C.QNetworkCookieJar, cb C.intptr_t, cookieList C.struct_miqt_array, url *C.QUrl) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookieList []QNetworkCookie, url *qt6.QUrl) bool, cookieList []QNetworkCookie, url *qt6.QUrl) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var cookieList_ma C.struct_miqt_array = cookieList + cookieList_ret := make([]QNetworkCookie, int(cookieList_ma.len)) + cookieList_outCast := (*[0xffff]*C.QNetworkCookie)(unsafe.Pointer(cookieList_ma.data)) // hey ya + for i := 0; i < int(cookieList_ma.len); i++ { + cookieList_lv_ret := cookieList_outCast[i] + cookieList_lv_goptr := newQNetworkCookie(cookieList_lv_ret) + cookieList_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + cookieList_ret[i] = *cookieList_lv_goptr + } + slotval1 := cookieList_ret + + slotval2 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_SetCookiesFromUrl, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_InsertCookie(cookie *QNetworkCookie) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_InsertCookie(unsafe.Pointer(this.h), cookie.cPointer())) + +} +func (this *QNetworkCookieJar) OnInsertCookie(slot func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) { + C.QNetworkCookieJar_override_virtual_InsertCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_InsertCookie +func miqt_exec_callback_QNetworkCookieJar_InsertCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_InsertCookie, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_UpdateCookie(cookie *QNetworkCookie) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_UpdateCookie(unsafe.Pointer(this.h), cookie.cPointer())) + +} +func (this *QNetworkCookieJar) OnUpdateCookie(slot func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) { + C.QNetworkCookieJar_override_virtual_UpdateCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_UpdateCookie +func miqt_exec_callback_QNetworkCookieJar_UpdateCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_UpdateCookie, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_DeleteCookie(cookie *QNetworkCookie) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_DeleteCookie(unsafe.Pointer(this.h), cookie.cPointer())) + +} +func (this *QNetworkCookieJar) OnDeleteCookie(slot func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) { + C.QNetworkCookieJar_override_virtual_DeleteCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_DeleteCookie +func miqt_exec_callback_QNetworkCookieJar_DeleteCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie) bool, cookie *QNetworkCookie) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_DeleteCookie, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_ValidateCookie(cookie *QNetworkCookie, url *qt6.QUrl) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_ValidateCookie(unsafe.Pointer(this.h), cookie.cPointer(), (*C.QUrl)(url.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnValidateCookie(slot func(super func(cookie *QNetworkCookie, url *qt6.QUrl) bool, cookie *QNetworkCookie, url *qt6.QUrl) bool) { + C.QNetworkCookieJar_override_virtual_ValidateCookie(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_ValidateCookie +func miqt_exec_callback_QNetworkCookieJar_ValidateCookie(self *C.QNetworkCookieJar, cb C.intptr_t, cookie *C.QNetworkCookie, url *C.QUrl) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(cookie *QNetworkCookie, url *qt6.QUrl) bool, cookie *QNetworkCookie, url *qt6.QUrl) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + slotval2 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ValidateCookie, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QNetworkCookieJar_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_Event +func miqt_exec_callback_QNetworkCookieJar_Event(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QNetworkCookieJar_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QNetworkCookieJar) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QNetworkCookieJar_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_EventFilter +func miqt_exec_callback_QNetworkCookieJar_EventFilter(self *C.QNetworkCookieJar, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkCookieJar) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QNetworkCookieJar_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QNetworkCookieJar_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_TimerEvent +func miqt_exec_callback_QNetworkCookieJar_TimerEvent(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QNetworkCookieJar_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QNetworkCookieJar_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_ChildEvent +func miqt_exec_callback_QNetworkCookieJar_ChildEvent(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QNetworkCookieJar_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QNetworkCookieJar_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_CustomEvent +func miqt_exec_callback_QNetworkCookieJar_CustomEvent(self *C.QNetworkCookieJar, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QNetworkCookieJar_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QNetworkCookieJar_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_ConnectNotify +func miqt_exec_callback_QNetworkCookieJar_ConnectNotify(self *C.QNetworkCookieJar, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QNetworkCookieJar) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QNetworkCookieJar_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QNetworkCookieJar) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QNetworkCookieJar_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkCookieJar_DisconnectNotify +func miqt_exec_callback_QNetworkCookieJar_DisconnectNotify(self *C.QNetworkCookieJar, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QNetworkCookieJar) Delete() { - C.QNetworkCookieJar_Delete(this.h) + C.QNetworkCookieJar_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkcookiejar.h b/qt6/network/gen_qnetworkcookiejar.h index 90b5eabb..5c810821 100644 --- a/qt6/network/gen_qnetworkcookiejar.h +++ b/qt6/network/gen_qnetworkcookiejar.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QNetworkCookie; class QNetworkCookieJar; class QObject; +class QTimerEvent; class QUrl; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkCookie QNetworkCookie; typedef struct QNetworkCookieJar QNetworkCookieJar; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QNetworkCookieJar* QNetworkCookieJar_new(); -QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent); +void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); +void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self); void* QNetworkCookieJar_Metacast(QNetworkCookieJar* self, const char* param1); struct miqt_string QNetworkCookieJar_Tr(const char* s); @@ -38,9 +46,36 @@ bool QNetworkCookieJar_SetCookiesFromUrl(QNetworkCookieJar* self, struct miqt_ar bool QNetworkCookieJar_InsertCookie(QNetworkCookieJar* self, QNetworkCookie* cookie); bool QNetworkCookieJar_UpdateCookie(QNetworkCookieJar* self, QNetworkCookie* cookie); bool QNetworkCookieJar_DeleteCookie(QNetworkCookieJar* self, QNetworkCookie* cookie); +bool QNetworkCookieJar_ValidateCookie(const QNetworkCookieJar* self, QNetworkCookie* cookie, QUrl* url); struct miqt_string QNetworkCookieJar_Tr2(const char* s, const char* c); struct miqt_string QNetworkCookieJar_Tr3(const char* s, const char* c, int n); -void QNetworkCookieJar_Delete(QNetworkCookieJar* self); +void QNetworkCookieJar_override_virtual_CookiesForUrl(void* self, intptr_t slot); +struct miqt_array /* of QNetworkCookie* */ QNetworkCookieJar_virtualbase_CookiesForUrl(const void* self, QUrl* url); +void QNetworkCookieJar_override_virtual_SetCookiesFromUrl(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_SetCookiesFromUrl(void* self, struct miqt_array /* of QNetworkCookie* */ cookieList, QUrl* url); +void QNetworkCookieJar_override_virtual_InsertCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_InsertCookie(void* self, QNetworkCookie* cookie); +void QNetworkCookieJar_override_virtual_UpdateCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_UpdateCookie(void* self, QNetworkCookie* cookie); +void QNetworkCookieJar_override_virtual_DeleteCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_DeleteCookie(void* self, QNetworkCookie* cookie); +void QNetworkCookieJar_override_virtual_ValidateCookie(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_ValidateCookie(const void* self, QNetworkCookie* cookie, QUrl* url); +void QNetworkCookieJar_override_virtual_Event(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_Event(void* self, QEvent* event); +void QNetworkCookieJar_override_virtual_EventFilter(void* self, intptr_t slot); +bool QNetworkCookieJar_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QNetworkCookieJar_override_virtual_TimerEvent(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QNetworkCookieJar_override_virtual_ChildEvent(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QNetworkCookieJar_override_virtual_CustomEvent(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_CustomEvent(void* self, QEvent* event); +void QNetworkCookieJar_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QNetworkCookieJar_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QNetworkCookieJar_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QNetworkCookieJar_Delete(QNetworkCookieJar* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkdatagram.cpp b/qt6/network/gen_qnetworkdatagram.cpp index 8c324f9a..76678bbc 100644 --- a/qt6/network/gen_qnetworkdatagram.cpp +++ b/qt6/network/gen_qnetworkdatagram.cpp @@ -5,27 +5,32 @@ #include "gen_qnetworkdatagram.h" #include "_cgo_export.h" -QNetworkDatagram* QNetworkDatagram_new() { - return new QNetworkDatagram(); +void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram) { + QNetworkDatagram* ret = new QNetworkDatagram(); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data) { +void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram) { QByteArray data_QByteArray(data.data, data.len); - return new QNetworkDatagram(data_QByteArray); + QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other) { - return new QNetworkDatagram(*other); +void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram) { + QNetworkDatagram* ret = new QNetworkDatagram(*other); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress) { +void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram) { QByteArray data_QByteArray(data.data, data.len); - return new QNetworkDatagram(data_QByteArray, *destinationAddress); + QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress); + *outptr_QNetworkDatagram = ret; } -QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port) { +void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram) { QByteArray data_QByteArray(data.data, data.len); - return new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); + QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); + *outptr_QNetworkDatagram = ret; } void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other) { @@ -112,7 +117,11 @@ void QNetworkDatagram_SetSender2(QNetworkDatagram* self, QHostAddress* address, self->setSender(*address, static_cast(port)); } -void QNetworkDatagram_Delete(QNetworkDatagram* self) { - delete self; +void QNetworkDatagram_Delete(QNetworkDatagram* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkdatagram.go b/qt6/network/gen_qnetworkdatagram.go index b6fd6bc8..e3be4d86 100644 --- a/qt6/network/gen_qnetworkdatagram.go +++ b/qt6/network/gen_qnetworkdatagram.go @@ -14,7 +14,8 @@ import ( ) type QNetworkDatagram struct { - h *C.QNetworkDatagram + h *C.QNetworkDatagram + isSubclass bool } func (this *QNetworkDatagram) cPointer() *C.QNetworkDatagram { @@ -31,6 +32,7 @@ func (this *QNetworkDatagram) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkDatagram constructs the type using only CGO pointers. func newQNetworkDatagram(h *C.QNetworkDatagram) *QNetworkDatagram { if h == nil { return nil @@ -38,14 +40,23 @@ func newQNetworkDatagram(h *C.QNetworkDatagram) *QNetworkDatagram { return &QNetworkDatagram{h: h} } +// UnsafeNewQNetworkDatagram constructs the type using only unsafe pointers. func UnsafeNewQNetworkDatagram(h unsafe.Pointer) *QNetworkDatagram { - return newQNetworkDatagram((*C.QNetworkDatagram)(h)) + if h == nil { + return nil + } + + return &QNetworkDatagram{h: (*C.QNetworkDatagram)(h)} } // NewQNetworkDatagram constructs a new QNetworkDatagram object. func NewQNetworkDatagram() *QNetworkDatagram { - ret := C.QNetworkDatagram_new() - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new(&outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram2 constructs a new QNetworkDatagram object. @@ -53,14 +64,22 @@ func NewQNetworkDatagram2(data []byte) *QNetworkDatagram { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QNetworkDatagram_new2(data_alias) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new2(data_alias, &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram3 constructs a new QNetworkDatagram object. func NewQNetworkDatagram3(other *QNetworkDatagram) *QNetworkDatagram { - ret := C.QNetworkDatagram_new3(other.cPointer()) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new3(other.cPointer(), &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram4 constructs a new QNetworkDatagram object. @@ -68,8 +87,12 @@ func NewQNetworkDatagram4(data []byte, destinationAddress *QHostAddress) *QNetwo data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer()) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer(), &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } // NewQNetworkDatagram5 constructs a new QNetworkDatagram object. @@ -77,8 +100,12 @@ func NewQNetworkDatagram5(data []byte, destinationAddress *QHostAddress, port ui data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port)) - return newQNetworkDatagram(ret) + var outptr_QNetworkDatagram *C.QNetworkDatagram = nil + + C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port), &outptr_QNetworkDatagram) + ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret.isSubclass = true + return ret } func (this *QNetworkDatagram) OperatorAssign(other *QNetworkDatagram) { @@ -177,7 +204,7 @@ func (this *QNetworkDatagram) SetSender2(address *QHostAddress, port uint16) { // Delete this object from C++ memory. func (this *QNetworkDatagram) Delete() { - C.QNetworkDatagram_Delete(this.h) + C.QNetworkDatagram_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkdatagram.h b/qt6/network/gen_qnetworkdatagram.h index d909a8c2..6c8b3149 100644 --- a/qt6/network/gen_qnetworkdatagram.h +++ b/qt6/network/gen_qnetworkdatagram.h @@ -24,11 +24,11 @@ typedef struct QHostAddress QHostAddress; typedef struct QNetworkDatagram QNetworkDatagram; #endif -QNetworkDatagram* QNetworkDatagram_new(); -QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data); -QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other); -QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress); -QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port); +void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram); +void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram); void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Swap(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Clear(QNetworkDatagram* self); @@ -48,7 +48,7 @@ struct miqt_string QNetworkDatagram_Data(const QNetworkDatagram* self); void QNetworkDatagram_SetData(QNetworkDatagram* self, struct miqt_string data); QNetworkDatagram* QNetworkDatagram_MakeReply(const QNetworkDatagram* self, struct miqt_string payload); void QNetworkDatagram_SetSender2(QNetworkDatagram* self, QHostAddress* address, uint16_t port); -void QNetworkDatagram_Delete(QNetworkDatagram* self); +void QNetworkDatagram_Delete(QNetworkDatagram* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkdiskcache.cpp b/qt6/network/gen_qnetworkdiskcache.cpp index 2d50fd44..92c167b3 100644 --- a/qt6/network/gen_qnetworkdiskcache.cpp +++ b/qt6/network/gen_qnetworkdiskcache.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -11,12 +12,247 @@ #include "gen_qnetworkdiskcache.h" #include "_cgo_export.h" -QNetworkDiskCache* QNetworkDiskCache_new() { - return new QNetworkDiskCache(); +class MiqtVirtualQNetworkDiskCache : public virtual QNetworkDiskCache { +public: + + MiqtVirtualQNetworkDiskCache(): QNetworkDiskCache() {}; + MiqtVirtualQNetworkDiskCache(QObject* parent): QNetworkDiskCache(parent) {}; + + virtual ~MiqtVirtualQNetworkDiskCache() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CacheSize = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 cacheSize() const override { + if (handle__CacheSize == 0) { + return QNetworkDiskCache::cacheSize(); + } + + + long long callback_return_value = miqt_exec_callback_QNetworkDiskCache_CacheSize(const_cast(this), handle__CacheSize); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_CacheSize() const { + + qint64 _ret = QNetworkDiskCache::cacheSize(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MetaData = 0; + + // Subclass to allow providing a Go implementation + virtual QNetworkCacheMetaData metaData(const QUrl& url) override { + if (handle__MetaData == 0) { + return QNetworkDiskCache::metaData(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + QNetworkCacheMetaData* callback_return_value = miqt_exec_callback_QNetworkDiskCache_MetaData(this, handle__MetaData, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QNetworkCacheMetaData* virtualbase_MetaData(QUrl* url) { + + return new QNetworkCacheMetaData(QNetworkDiskCache::metaData(*url)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateMetaData = 0; + + // Subclass to allow providing a Go implementation + virtual void updateMetaData(const QNetworkCacheMetaData& metaData) override { + if (handle__UpdateMetaData == 0) { + QNetworkDiskCache::updateMetaData(metaData); + return; + } + + const QNetworkCacheMetaData& metaData_ret = metaData; + // Cast returned reference into pointer + QNetworkCacheMetaData* sigval1 = const_cast(&metaData_ret); + + miqt_exec_callback_QNetworkDiskCache_UpdateMetaData(this, handle__UpdateMetaData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateMetaData(QNetworkCacheMetaData* metaData) { + + QNetworkDiskCache::updateMetaData(*metaData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Data = 0; + + // Subclass to allow providing a Go implementation + virtual QIODevice* data(const QUrl& url) override { + if (handle__Data == 0) { + return QNetworkDiskCache::data(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + QIODevice* callback_return_value = miqt_exec_callback_QNetworkDiskCache_Data(this, handle__Data, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QIODevice* virtualbase_Data(QUrl* url) { + + return QNetworkDiskCache::data(*url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Remove = 0; + + // Subclass to allow providing a Go implementation + virtual bool remove(const QUrl& url) override { + if (handle__Remove == 0) { + return QNetworkDiskCache::remove(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + bool callback_return_value = miqt_exec_callback_QNetworkDiskCache_Remove(this, handle__Remove, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Remove(QUrl* url) { + + return QNetworkDiskCache::remove(*url); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Prepare = 0; + + // Subclass to allow providing a Go implementation + virtual QIODevice* prepare(const QNetworkCacheMetaData& metaData) override { + if (handle__Prepare == 0) { + return QNetworkDiskCache::prepare(metaData); + } + + const QNetworkCacheMetaData& metaData_ret = metaData; + // Cast returned reference into pointer + QNetworkCacheMetaData* sigval1 = const_cast(&metaData_ret); + + QIODevice* callback_return_value = miqt_exec_callback_QNetworkDiskCache_Prepare(this, handle__Prepare, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QIODevice* virtualbase_Prepare(QNetworkCacheMetaData* metaData) { + + return QNetworkDiskCache::prepare(*metaData); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Insert = 0; + + // Subclass to allow providing a Go implementation + virtual void insert(QIODevice* device) override { + if (handle__Insert == 0) { + QNetworkDiskCache::insert(device); + return; + } + + QIODevice* sigval1 = device; + + miqt_exec_callback_QNetworkDiskCache_Insert(this, handle__Insert, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Insert(QIODevice* device) { + + QNetworkDiskCache::insert(device); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Clear = 0; + + // Subclass to allow providing a Go implementation + virtual void clear() override { + if (handle__Clear == 0) { + QNetworkDiskCache::clear(); + return; + } + + + miqt_exec_callback_QNetworkDiskCache_Clear(this, handle__Clear); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Clear() { + + QNetworkDiskCache::clear(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Expire = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 expire() override { + if (handle__Expire == 0) { + return QNetworkDiskCache::expire(); + } + + + long long callback_return_value = miqt_exec_callback_QNetworkDiskCache_Expire(this, handle__Expire); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_Expire() { + + qint64 _ret = QNetworkDiskCache::expire(); + return static_cast(_ret); + + } + +}; + +void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { + MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(); + *outptr_QNetworkDiskCache = ret; + *outptr_QAbstractNetworkCache = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent) { - return new QNetworkDiskCache(parent); +void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { + MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(parent); + *outptr_QNetworkDiskCache = ret; + *outptr_QAbstractNetworkCache = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self) { @@ -123,7 +359,83 @@ struct miqt_string QNetworkDiskCache_Tr3(const char* s, const char* c, int n) { return _ms; } -void QNetworkDiskCache_Delete(QNetworkDiskCache* self) { - delete self; +void QNetworkDiskCache_override_virtual_CacheSize(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__CacheSize = slot; +} + +long long QNetworkDiskCache_virtualbase_CacheSize(const void* self) { + return ( (const MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_CacheSize(); +} + +void QNetworkDiskCache_override_virtual_MetaData(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__MetaData = slot; +} + +QNetworkCacheMetaData* QNetworkDiskCache_virtualbase_MetaData(void* self, QUrl* url) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_MetaData(url); +} + +void QNetworkDiskCache_override_virtual_UpdateMetaData(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__UpdateMetaData = slot; +} + +void QNetworkDiskCache_virtualbase_UpdateMetaData(void* self, QNetworkCacheMetaData* metaData) { + ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_UpdateMetaData(metaData); +} + +void QNetworkDiskCache_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Data = slot; +} + +QIODevice* QNetworkDiskCache_virtualbase_Data(void* self, QUrl* url) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Data(url); +} + +void QNetworkDiskCache_override_virtual_Remove(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Remove = slot; +} + +bool QNetworkDiskCache_virtualbase_Remove(void* self, QUrl* url) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Remove(url); +} + +void QNetworkDiskCache_override_virtual_Prepare(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Prepare = slot; +} + +QIODevice* QNetworkDiskCache_virtualbase_Prepare(void* self, QNetworkCacheMetaData* metaData) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Prepare(metaData); +} + +void QNetworkDiskCache_override_virtual_Insert(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Insert = slot; +} + +void QNetworkDiskCache_virtualbase_Insert(void* self, QIODevice* device) { + ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Insert(device); +} + +void QNetworkDiskCache_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Clear = slot; +} + +void QNetworkDiskCache_virtualbase_Clear(void* self) { + ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Clear(); +} + +void QNetworkDiskCache_override_virtual_Expire(void* self, intptr_t slot) { + dynamic_cast( (QNetworkDiskCache*)(self) )->handle__Expire = slot; +} + +long long QNetworkDiskCache_virtualbase_Expire(void* self) { + return ( (MiqtVirtualQNetworkDiskCache*)(self) )->virtualbase_Expire(); +} + +void QNetworkDiskCache_Delete(QNetworkDiskCache* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkdiskcache.go b/qt6/network/gen_qnetworkdiskcache.go index d788fac5..d6dcca3a 100644 --- a/qt6/network/gen_qnetworkdiskcache.go +++ b/qt6/network/gen_qnetworkdiskcache.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QNetworkDiskCache struct { - h *C.QNetworkDiskCache + h *C.QNetworkDiskCache + isSubclass bool *QAbstractNetworkCache } @@ -33,27 +35,47 @@ func (this *QNetworkDiskCache) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkDiskCache(h *C.QNetworkDiskCache) *QNetworkDiskCache { +// newQNetworkDiskCache constructs the type using only CGO pointers. +func newQNetworkDiskCache(h *C.QNetworkDiskCache, h_QAbstractNetworkCache *C.QAbstractNetworkCache, h_QObject *C.QObject) *QNetworkDiskCache { if h == nil { return nil } - return &QNetworkDiskCache{h: h, QAbstractNetworkCache: UnsafeNewQAbstractNetworkCache(unsafe.Pointer(h))} + return &QNetworkDiskCache{h: h, + QAbstractNetworkCache: newQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} } -func UnsafeNewQNetworkDiskCache(h unsafe.Pointer) *QNetworkDiskCache { - return newQNetworkDiskCache((*C.QNetworkDiskCache)(h)) +// UnsafeNewQNetworkDiskCache constructs the type using only unsafe pointers. +func UnsafeNewQNetworkDiskCache(h unsafe.Pointer, h_QAbstractNetworkCache unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkDiskCache { + if h == nil { + return nil + } + + return &QNetworkDiskCache{h: (*C.QNetworkDiskCache)(h), + QAbstractNetworkCache: UnsafeNewQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} } // NewQNetworkDiskCache constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache() *QNetworkDiskCache { - ret := C.QNetworkDiskCache_new() - return newQNetworkDiskCache(ret) + var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil + var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkDiskCache_new(&outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) + ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret.isSubclass = true + return ret } // NewQNetworkDiskCache2 constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache2(parent *qt6.QObject) *QNetworkDiskCache { - ret := C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer())) - return newQNetworkDiskCache(ret) + var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil + var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil + var outptr_QObject *C.QObject = nil + + C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) + ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QNetworkDiskCache) MetaObject() *qt6.QMetaObject { @@ -114,7 +136,7 @@ func (this *QNetworkDiskCache) UpdateMetaData(metaData *QNetworkCacheMetaData) { } func (this *QNetworkDiskCache) Data(url *qt6.QUrl) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil, nil) } func (this *QNetworkDiskCache) Remove(url *qt6.QUrl) bool { @@ -122,7 +144,7 @@ func (this *QNetworkDiskCache) Remove(url *qt6.QUrl) bool { } func (this *QNetworkDiskCache) Prepare(metaData *QNetworkCacheMetaData) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer()))) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer())), nil, nil) } func (this *QNetworkDiskCache) Insert(device *qt6.QIODevice) { @@ -166,9 +188,220 @@ func QNetworkDiskCache_Tr3(s string, c string, n int) string { return _ret } +func (this *QNetworkDiskCache) callVirtualBase_CacheSize() int64 { + + return (int64)(C.QNetworkDiskCache_virtualbase_CacheSize(unsafe.Pointer(this.h))) + +} +func (this *QNetworkDiskCache) OnCacheSize(slot func(super func() int64) int64) { + C.QNetworkDiskCache_override_virtual_CacheSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_CacheSize +func miqt_exec_callback_QNetworkDiskCache_CacheSize(self *C.QNetworkDiskCache, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_CacheSize) + + return (C.longlong)(virtualReturn) + +} + +func (this *QNetworkDiskCache) callVirtualBase_MetaData(url *qt6.QUrl) *QNetworkCacheMetaData { + + _ret := C.QNetworkDiskCache_virtualbase_MetaData(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())) + _goptr := newQNetworkCacheMetaData(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QNetworkDiskCache) OnMetaData(slot func(super func(url *qt6.QUrl) *QNetworkCacheMetaData, url *qt6.QUrl) *QNetworkCacheMetaData) { + C.QNetworkDiskCache_override_virtual_MetaData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_MetaData +func miqt_exec_callback_QNetworkDiskCache_MetaData(self *C.QNetworkDiskCache, cb C.intptr_t, url *C.QUrl) *C.QNetworkCacheMetaData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt6.QUrl) *QNetworkCacheMetaData, url *qt6.QUrl) *QNetworkCacheMetaData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_MetaData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QNetworkDiskCache) callVirtualBase_UpdateMetaData(metaData *QNetworkCacheMetaData) { + + C.QNetworkDiskCache_virtualbase_UpdateMetaData(unsafe.Pointer(this.h), metaData.cPointer()) + +} +func (this *QNetworkDiskCache) OnUpdateMetaData(slot func(super func(metaData *QNetworkCacheMetaData), metaData *QNetworkCacheMetaData)) { + C.QNetworkDiskCache_override_virtual_UpdateMetaData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_UpdateMetaData +func miqt_exec_callback_QNetworkDiskCache_UpdateMetaData(self *C.QNetworkDiskCache, cb C.intptr_t, metaData *C.QNetworkCacheMetaData) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metaData *QNetworkCacheMetaData), metaData *QNetworkCacheMetaData)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCacheMetaData(unsafe.Pointer(metaData)) + + gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_UpdateMetaData, slotval1) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Data(url *qt6.QUrl) *qt6.QIODevice { + + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Data(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()))), nil, nil) +} +func (this *QNetworkDiskCache) OnData(slot func(super func(url *qt6.QUrl) *qt6.QIODevice, url *qt6.QUrl) *qt6.QIODevice) { + C.QNetworkDiskCache_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Data +func miqt_exec_callback_QNetworkDiskCache_Data(self *C.QNetworkDiskCache, cb C.intptr_t, url *C.QUrl) *C.QIODevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt6.QUrl) *qt6.QIODevice, url *qt6.QUrl) *qt6.QIODevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Data, slotval1) + + return (*C.QIODevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Remove(url *qt6.QUrl) bool { + + return (bool)(C.QNetworkDiskCache_virtualbase_Remove(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()))) + +} +func (this *QNetworkDiskCache) OnRemove(slot func(super func(url *qt6.QUrl) bool, url *qt6.QUrl) bool) { + C.QNetworkDiskCache_override_virtual_Remove(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Remove +func miqt_exec_callback_QNetworkDiskCache_Remove(self *C.QNetworkDiskCache, cb C.intptr_t, url *C.QUrl) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt6.QUrl) bool, url *qt6.QUrl) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Remove, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Prepare(metaData *QNetworkCacheMetaData) *qt6.QIODevice { + + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Prepare(unsafe.Pointer(this.h), metaData.cPointer())), nil, nil) +} +func (this *QNetworkDiskCache) OnPrepare(slot func(super func(metaData *QNetworkCacheMetaData) *qt6.QIODevice, metaData *QNetworkCacheMetaData) *qt6.QIODevice) { + C.QNetworkDiskCache_override_virtual_Prepare(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Prepare +func miqt_exec_callback_QNetworkDiskCache_Prepare(self *C.QNetworkDiskCache, cb C.intptr_t, metaData *C.QNetworkCacheMetaData) *C.QIODevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metaData *QNetworkCacheMetaData) *qt6.QIODevice, metaData *QNetworkCacheMetaData) *qt6.QIODevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkCacheMetaData(unsafe.Pointer(metaData)) + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Prepare, slotval1) + + return (*C.QIODevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Insert(device *qt6.QIODevice) { + + C.QNetworkDiskCache_virtualbase_Insert(unsafe.Pointer(this.h), (*C.QIODevice)(device.UnsafePointer())) + +} +func (this *QNetworkDiskCache) OnInsert(slot func(super func(device *qt6.QIODevice), device *qt6.QIODevice)) { + C.QNetworkDiskCache_override_virtual_Insert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Insert +func miqt_exec_callback_QNetworkDiskCache_Insert(self *C.QNetworkDiskCache, cb C.intptr_t, device *C.QIODevice) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(device *qt6.QIODevice), device *qt6.QIODevice)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQIODevice(unsafe.Pointer(device), nil, nil) + + gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Insert, slotval1) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Clear() { + + C.QNetworkDiskCache_virtualbase_Clear(unsafe.Pointer(this.h)) + +} +func (this *QNetworkDiskCache) OnClear(slot func(super func())) { + C.QNetworkDiskCache_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Clear +func miqt_exec_callback_QNetworkDiskCache_Clear(self *C.QNetworkDiskCache, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Clear) + +} + +func (this *QNetworkDiskCache) callVirtualBase_Expire() int64 { + + return (int64)(C.QNetworkDiskCache_virtualbase_Expire(unsafe.Pointer(this.h))) + +} +func (this *QNetworkDiskCache) OnExpire(slot func(super func() int64) int64) { + C.QNetworkDiskCache_override_virtual_Expire(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkDiskCache_Expire +func miqt_exec_callback_QNetworkDiskCache_Expire(self *C.QNetworkDiskCache, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Expire) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QNetworkDiskCache) Delete() { - C.QNetworkDiskCache_Delete(this.h) + C.QNetworkDiskCache_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkdiskcache.h b/qt6/network/gen_qnetworkdiskcache.h index e3ee1250..91a3e414 100644 --- a/qt6/network/gen_qnetworkdiskcache.h +++ b/qt6/network/gen_qnetworkdiskcache.h @@ -15,6 +15,7 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractNetworkCache; class QIODevice; class QMetaObject; class QNetworkCacheMetaData; @@ -22,6 +23,7 @@ class QNetworkDiskCache; class QObject; class QUrl; #else +typedef struct QAbstractNetworkCache QAbstractNetworkCache; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkCacheMetaData QNetworkCacheMetaData; @@ -30,8 +32,8 @@ typedef struct QObject QObject; typedef struct QUrl QUrl; #endif -QNetworkDiskCache* QNetworkDiskCache_new(); -QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent); +void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); +void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self); void* QNetworkDiskCache_Metacast(QNetworkDiskCache* self, const char* param1); struct miqt_string QNetworkDiskCache_Tr(const char* s); @@ -48,9 +50,28 @@ QIODevice* QNetworkDiskCache_Prepare(QNetworkDiskCache* self, QNetworkCacheMetaD void QNetworkDiskCache_Insert(QNetworkDiskCache* self, QIODevice* device); QNetworkCacheMetaData* QNetworkDiskCache_FileMetaData(const QNetworkDiskCache* self, struct miqt_string fileName); void QNetworkDiskCache_Clear(QNetworkDiskCache* self); +long long QNetworkDiskCache_Expire(QNetworkDiskCache* self); struct miqt_string QNetworkDiskCache_Tr2(const char* s, const char* c); struct miqt_string QNetworkDiskCache_Tr3(const char* s, const char* c, int n); -void QNetworkDiskCache_Delete(QNetworkDiskCache* self); +void QNetworkDiskCache_override_virtual_CacheSize(void* self, intptr_t slot); +long long QNetworkDiskCache_virtualbase_CacheSize(const void* self); +void QNetworkDiskCache_override_virtual_MetaData(void* self, intptr_t slot); +QNetworkCacheMetaData* QNetworkDiskCache_virtualbase_MetaData(void* self, QUrl* url); +void QNetworkDiskCache_override_virtual_UpdateMetaData(void* self, intptr_t slot); +void QNetworkDiskCache_virtualbase_UpdateMetaData(void* self, QNetworkCacheMetaData* metaData); +void QNetworkDiskCache_override_virtual_Data(void* self, intptr_t slot); +QIODevice* QNetworkDiskCache_virtualbase_Data(void* self, QUrl* url); +void QNetworkDiskCache_override_virtual_Remove(void* self, intptr_t slot); +bool QNetworkDiskCache_virtualbase_Remove(void* self, QUrl* url); +void QNetworkDiskCache_override_virtual_Prepare(void* self, intptr_t slot); +QIODevice* QNetworkDiskCache_virtualbase_Prepare(void* self, QNetworkCacheMetaData* metaData); +void QNetworkDiskCache_override_virtual_Insert(void* self, intptr_t slot); +void QNetworkDiskCache_virtualbase_Insert(void* self, QIODevice* device); +void QNetworkDiskCache_override_virtual_Clear(void* self, intptr_t slot); +void QNetworkDiskCache_virtualbase_Clear(void* self); +void QNetworkDiskCache_override_virtual_Expire(void* self, intptr_t slot); +long long QNetworkDiskCache_virtualbase_Expire(void* self); +void QNetworkDiskCache_Delete(QNetworkDiskCache* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkinformation.cpp b/qt6/network/gen_qnetworkinformation.cpp index 7d10be81..99b6b0d5 100644 --- a/qt6/network/gen_qnetworkinformation.cpp +++ b/qt6/network/gen_qnetworkinformation.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/network/gen_qnetworkinformation.go b/qt6/network/gen_qnetworkinformation.go index d1096048..b5a1dc07 100644 --- a/qt6/network/gen_qnetworkinformation.go +++ b/qt6/network/gen_qnetworkinformation.go @@ -44,7 +44,8 @@ const ( ) type QNetworkInformation struct { - h *C.QNetworkInformation + h *C.QNetworkInformation + isSubclass bool *qt6.QObject } @@ -62,15 +63,23 @@ func (this *QNetworkInformation) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkInformation(h *C.QNetworkInformation) *QNetworkInformation { +// newQNetworkInformation constructs the type using only CGO pointers. +func newQNetworkInformation(h *C.QNetworkInformation, h_QObject *C.QObject) *QNetworkInformation { if h == nil { return nil } - return &QNetworkInformation{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QNetworkInformation{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQNetworkInformation(h unsafe.Pointer) *QNetworkInformation { - return newQNetworkInformation((*C.QNetworkInformation)(h)) +// UnsafeNewQNetworkInformation constructs the type using only unsafe pointers. +func UnsafeNewQNetworkInformation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkInformation { + if h == nil { + return nil + } + + return &QNetworkInformation{h: (*C.QNetworkInformation)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } func (this *QNetworkInformation) MetaObject() *qt6.QMetaObject { @@ -149,7 +158,7 @@ func QNetworkInformation_AvailableBackends() []string { } func QNetworkInformation_Instance() *QNetworkInformation { - return UnsafeNewQNetworkInformation(unsafe.Pointer(C.QNetworkInformation_Instance())) + return UnsafeNewQNetworkInformation(unsafe.Pointer(C.QNetworkInformation_Instance()), nil) } func (this *QNetworkInformation) ReachabilityChanged(newReachability QNetworkInformation__Reachability) { diff --git a/qt6/network/gen_qnetworkinformation.h b/qt6/network/gen_qnetworkinformation.h index 67c6527b..b084c672 100644 --- a/qt6/network/gen_qnetworkinformation.h +++ b/qt6/network/gen_qnetworkinformation.h @@ -17,9 +17,11 @@ extern "C" { #ifdef __cplusplus class QMetaObject; class QNetworkInformation; +class QObject; #else typedef struct QMetaObject QMetaObject; typedef struct QNetworkInformation QNetworkInformation; +typedef struct QObject QObject; #endif QMetaObject* QNetworkInformation_MetaObject(const QNetworkInformation* self); diff --git a/qt6/network/gen_qnetworkinterface.cpp b/qt6/network/gen_qnetworkinterface.cpp index 66734515..d1607c3d 100644 --- a/qt6/network/gen_qnetworkinterface.cpp +++ b/qt6/network/gen_qnetworkinterface.cpp @@ -10,12 +10,14 @@ #include "gen_qnetworkinterface.h" #include "_cgo_export.h" -QNetworkAddressEntry* QNetworkAddressEntry_new() { - return new QNetworkAddressEntry(); +void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry) { + QNetworkAddressEntry* ret = new QNetworkAddressEntry(); + *outptr_QNetworkAddressEntry = ret; } -QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other) { - return new QNetworkAddressEntry(*other); +void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry) { + QNetworkAddressEntry* ret = new QNetworkAddressEntry(*other); + *outptr_QNetworkAddressEntry = ret; } void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other) { @@ -103,16 +105,22 @@ bool QNetworkAddressEntry_IsTemporary(const QNetworkAddressEntry* self) { return self->isTemporary(); } -void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self) { - delete self; +void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QNetworkInterface* QNetworkInterface_new() { - return new QNetworkInterface(); +void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface) { + QNetworkInterface* ret = new QNetworkInterface(); + *outptr_QNetworkInterface = ret; } -QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other) { - return new QNetworkInterface(*other); +void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface) { + QNetworkInterface* ret = new QNetworkInterface(*other); + *outptr_QNetworkInterface = ret; } void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other) { @@ -242,7 +250,11 @@ struct miqt_array /* of QHostAddress* */ QNetworkInterface_AllAddresses() { return _out; } -void QNetworkInterface_Delete(QNetworkInterface* self) { - delete self; +void QNetworkInterface_Delete(QNetworkInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkinterface.go b/qt6/network/gen_qnetworkinterface.go index 9664e10b..1ec76847 100644 --- a/qt6/network/gen_qnetworkinterface.go +++ b/qt6/network/gen_qnetworkinterface.go @@ -54,7 +54,8 @@ const ( ) type QNetworkAddressEntry struct { - h *C.QNetworkAddressEntry + h *C.QNetworkAddressEntry + isSubclass bool } func (this *QNetworkAddressEntry) cPointer() *C.QNetworkAddressEntry { @@ -71,6 +72,7 @@ func (this *QNetworkAddressEntry) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkAddressEntry constructs the type using only CGO pointers. func newQNetworkAddressEntry(h *C.QNetworkAddressEntry) *QNetworkAddressEntry { if h == nil { return nil @@ -78,20 +80,33 @@ func newQNetworkAddressEntry(h *C.QNetworkAddressEntry) *QNetworkAddressEntry { return &QNetworkAddressEntry{h: h} } +// UnsafeNewQNetworkAddressEntry constructs the type using only unsafe pointers. func UnsafeNewQNetworkAddressEntry(h unsafe.Pointer) *QNetworkAddressEntry { - return newQNetworkAddressEntry((*C.QNetworkAddressEntry)(h)) + if h == nil { + return nil + } + + return &QNetworkAddressEntry{h: (*C.QNetworkAddressEntry)(h)} } // NewQNetworkAddressEntry constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry() *QNetworkAddressEntry { - ret := C.QNetworkAddressEntry_new() - return newQNetworkAddressEntry(ret) + var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil + + C.QNetworkAddressEntry_new(&outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret.isSubclass = true + return ret } // NewQNetworkAddressEntry2 constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry2(other *QNetworkAddressEntry) *QNetworkAddressEntry { - ret := C.QNetworkAddressEntry_new2(other.cPointer()) - return newQNetworkAddressEntry(ret) + var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil + + C.QNetworkAddressEntry_new2(other.cPointer(), &outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret.isSubclass = true + return ret } func (this *QNetworkAddressEntry) OperatorAssign(other *QNetworkAddressEntry) { @@ -195,7 +210,7 @@ func (this *QNetworkAddressEntry) IsTemporary() bool { // Delete this object from C++ memory. func (this *QNetworkAddressEntry) Delete() { - C.QNetworkAddressEntry_Delete(this.h) + C.QNetworkAddressEntry_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -208,7 +223,8 @@ func (this *QNetworkAddressEntry) GoGC() { } type QNetworkInterface struct { - h *C.QNetworkInterface + h *C.QNetworkInterface + isSubclass bool } func (this *QNetworkInterface) cPointer() *C.QNetworkInterface { @@ -225,6 +241,7 @@ func (this *QNetworkInterface) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkInterface constructs the type using only CGO pointers. func newQNetworkInterface(h *C.QNetworkInterface) *QNetworkInterface { if h == nil { return nil @@ -232,20 +249,33 @@ func newQNetworkInterface(h *C.QNetworkInterface) *QNetworkInterface { return &QNetworkInterface{h: h} } +// UnsafeNewQNetworkInterface constructs the type using only unsafe pointers. func UnsafeNewQNetworkInterface(h unsafe.Pointer) *QNetworkInterface { - return newQNetworkInterface((*C.QNetworkInterface)(h)) + if h == nil { + return nil + } + + return &QNetworkInterface{h: (*C.QNetworkInterface)(h)} } // NewQNetworkInterface constructs a new QNetworkInterface object. func NewQNetworkInterface() *QNetworkInterface { - ret := C.QNetworkInterface_new() - return newQNetworkInterface(ret) + var outptr_QNetworkInterface *C.QNetworkInterface = nil + + C.QNetworkInterface_new(&outptr_QNetworkInterface) + ret := newQNetworkInterface(outptr_QNetworkInterface) + ret.isSubclass = true + return ret } // NewQNetworkInterface2 constructs a new QNetworkInterface object. func NewQNetworkInterface2(other *QNetworkInterface) *QNetworkInterface { - ret := C.QNetworkInterface_new2(other.cPointer()) - return newQNetworkInterface(ret) + var outptr_QNetworkInterface *C.QNetworkInterface = nil + + C.QNetworkInterface_new2(other.cPointer(), &outptr_QNetworkInterface) + ret := newQNetworkInterface(outptr_QNetworkInterface) + ret.isSubclass = true + return ret } func (this *QNetworkInterface) OperatorAssign(other *QNetworkInterface) { @@ -371,7 +401,7 @@ func QNetworkInterface_AllAddresses() []QHostAddress { // Delete this object from C++ memory. func (this *QNetworkInterface) Delete() { - C.QNetworkInterface_Delete(this.h) + C.QNetworkInterface_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkinterface.h b/qt6/network/gen_qnetworkinterface.h index fe35f360..57dbfbbd 100644 --- a/qt6/network/gen_qnetworkinterface.h +++ b/qt6/network/gen_qnetworkinterface.h @@ -26,8 +26,8 @@ typedef struct QNetworkAddressEntry QNetworkAddressEntry; typedef struct QNetworkInterface QNetworkInterface; #endif -QNetworkAddressEntry* QNetworkAddressEntry_new(); -QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other); +void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry); +void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry); void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other); void QNetworkAddressEntry_Swap(QNetworkAddressEntry* self, QNetworkAddressEntry* other); bool QNetworkAddressEntry_OperatorEqual(const QNetworkAddressEntry* self, QNetworkAddressEntry* other); @@ -49,10 +49,10 @@ void QNetworkAddressEntry_SetAddressLifetime(QNetworkAddressEntry* self, QDeadli void QNetworkAddressEntry_ClearAddressLifetime(QNetworkAddressEntry* self); bool QNetworkAddressEntry_IsPermanent(const QNetworkAddressEntry* self); bool QNetworkAddressEntry_IsTemporary(const QNetworkAddressEntry* self); -void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self); +void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass); -QNetworkInterface* QNetworkInterface_new(); -QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other); +void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface); +void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface); void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other); void QNetworkInterface_Swap(QNetworkInterface* self, QNetworkInterface* other); bool QNetworkInterface_IsValid(const QNetworkInterface* self); @@ -70,7 +70,7 @@ QNetworkInterface* QNetworkInterface_InterfaceFromIndex(int index); struct miqt_string QNetworkInterface_InterfaceNameFromIndex(int index); struct miqt_array /* of QNetworkInterface* */ QNetworkInterface_AllInterfaces(); struct miqt_array /* of QHostAddress* */ QNetworkInterface_AllAddresses(); -void QNetworkInterface_Delete(QNetworkInterface* self); +void QNetworkInterface_Delete(QNetworkInterface* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkproxy.cpp b/qt6/network/gen_qnetworkproxy.cpp index a52c2ceb..555c423c 100644 --- a/qt6/network/gen_qnetworkproxy.cpp +++ b/qt6/network/gen_qnetworkproxy.cpp @@ -12,51 +12,61 @@ #include "gen_qnetworkproxy.h" #include "_cgo_export.h" -QNetworkProxyQuery* QNetworkProxyQuery_new() { - return new QNetworkProxyQuery(); +void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl) { - return new QNetworkProxyQuery(*requestUrl); +void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port) { +void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); - return new QNetworkProxyQuery(hostname_QString, static_cast(port)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort) { - return new QNetworkProxyQuery(static_cast(bindPort)); +void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkProxyQuery* other) { - return new QNetworkProxyQuery(*other); +void QNetworkProxyQuery_new5(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*other); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType) { - return new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); +void QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { + QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag) { +void QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType) { +void QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag) { +void QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); + *outptr_QNetworkProxyQuery = ret; } -QNetworkProxyQuery* QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType) { +void QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); + QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); + *outptr_QNetworkProxyQuery = ret; } void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other) { @@ -140,43 +150,54 @@ void QNetworkProxyQuery_SetUrl(QNetworkProxyQuery* self, QUrl* url) { self->setUrl(*url); } -void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self) { - delete self; +void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -QNetworkProxy* QNetworkProxy_new() { - return new QNetworkProxy(); +void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy) { + QNetworkProxy* ret = new QNetworkProxy(); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new2(int typeVal) { - return new QNetworkProxy(static_cast(typeVal)); +void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy) { + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal)); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other) { - return new QNetworkProxy(*other); +void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy) { + QNetworkProxy* ret = new QNetworkProxy(*other); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName) { +void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port) { +void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user) { +void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); + *outptr_QNetworkProxy = ret; } -QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password) { +void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); QString password_QString = QString::fromUtf8(password.data, password.len); - return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); + QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); + *outptr_QNetworkProxy = ret; } void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other) { @@ -333,12 +354,16 @@ void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerNa self->setRawHeader(headerName_QByteArray, value_QByteArray); } -void QNetworkProxy_Delete(QNetworkProxy* self) { - delete self; +void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self) { - QList _ret = self->queryProxy(); +struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query) { + QList _ret = self->queryProxy(*query); // Convert QList<> from C++ memory to manually-managed C memory QNetworkProxy** _arr = static_cast(malloc(sizeof(QNetworkProxy*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { @@ -392,19 +417,6 @@ void QNetworkProxyFactory_OperatorAssign(QNetworkProxyFactory* self, QNetworkPro self->operator=(*param1); } -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy1(QNetworkProxyFactory* self, QNetworkProxyQuery* query) { - QList _ret = self->queryProxy(*query); - // Convert QList<> from C++ memory to manually-managed C memory - QNetworkProxy** _arr = static_cast(malloc(sizeof(QNetworkProxy*) * _ret.length())); - for (size_t i = 0, e = _ret.length(); i < e; ++i) { - _arr[i] = new QNetworkProxy(_ret[i]); - } - struct miqt_array _out; - _out.len = _ret.length(); - _out.data = static_cast(_arr); - return _out; -} - struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery1(QNetworkProxyQuery* query) { QList _ret = QNetworkProxyFactory::systemProxyForQuery(*query); // Convert QList<> from C++ memory to manually-managed C memory @@ -418,7 +430,11 @@ struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQu return _out; } -void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self) { - delete self; +void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkproxy.go b/qt6/network/gen_qnetworkproxy.go index f0037563..e6ad8125 100644 --- a/qt6/network/gen_qnetworkproxy.go +++ b/qt6/network/gen_qnetworkproxy.go @@ -49,7 +49,8 @@ const ( ) type QNetworkProxyQuery struct { - h *C.QNetworkProxyQuery + h *C.QNetworkProxyQuery + isSubclass bool } func (this *QNetworkProxyQuery) cPointer() *C.QNetworkProxyQuery { @@ -66,6 +67,7 @@ func (this *QNetworkProxyQuery) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkProxyQuery constructs the type using only CGO pointers. func newQNetworkProxyQuery(h *C.QNetworkProxyQuery) *QNetworkProxyQuery { if h == nil { return nil @@ -73,20 +75,33 @@ func newQNetworkProxyQuery(h *C.QNetworkProxyQuery) *QNetworkProxyQuery { return &QNetworkProxyQuery{h: h} } +// UnsafeNewQNetworkProxyQuery constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyQuery(h unsafe.Pointer) *QNetworkProxyQuery { - return newQNetworkProxyQuery((*C.QNetworkProxyQuery)(h)) + if h == nil { + return nil + } + + return &QNetworkProxyQuery{h: (*C.QNetworkProxyQuery)(h)} } // NewQNetworkProxyQuery constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery() *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new() - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new(&outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery2 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery2(requestUrl *qt6.QUrl) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer())) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer()), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery3 constructs a new QNetworkProxyQuery object. @@ -95,26 +110,42 @@ func NewQNetworkProxyQuery3(hostname string, port int) *QNetworkProxyQuery { hostname_ms.data = C.CString(hostname) hostname_ms.len = C.size_t(len(hostname)) defer C.free(unsafe.Pointer(hostname_ms.data)) - ret := C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery4 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery4(bindPort uint16) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery5 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery5(other *QNetworkProxyQuery) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new5(other.cPointer()) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new5(other.cPointer(), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery6 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery6(requestUrl *qt6.QUrl, queryType QNetworkProxyQuery__QueryType) *QNetworkProxyQuery { - ret := C.QNetworkProxyQuery_new6((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new6((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery7 constructs a new QNetworkProxyQuery object. @@ -127,8 +158,12 @@ func NewQNetworkProxyQuery7(hostname string, port int, protocolTag string) *QNet protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new7(hostname_ms, (C.int)(port), protocolTag_ms) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new7(hostname_ms, (C.int)(port), protocolTag_ms, &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery8 constructs a new QNetworkProxyQuery object. @@ -141,8 +176,12 @@ func NewQNetworkProxyQuery8(hostname string, port int, protocolTag string, query protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new8(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new8(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery9 constructs a new QNetworkProxyQuery object. @@ -151,8 +190,12 @@ func NewQNetworkProxyQuery9(bindPort uint16, protocolTag string) *QNetworkProxyQ protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new9((C.uint16_t)(bindPort), protocolTag_ms) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new9((C.uint16_t)(bindPort), protocolTag_ms, &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } // NewQNetworkProxyQuery10 constructs a new QNetworkProxyQuery object. @@ -161,8 +204,12 @@ func NewQNetworkProxyQuery10(bindPort uint16, protocolTag string, queryType QNet protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - ret := C.QNetworkProxyQuery_new10((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType)) - return newQNetworkProxyQuery(ret) + var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil + + C.QNetworkProxyQuery_new10((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret.isSubclass = true + return ret } func (this *QNetworkProxyQuery) OperatorAssign(other *QNetworkProxyQuery) { @@ -248,7 +295,7 @@ func (this *QNetworkProxyQuery) SetUrl(url *qt6.QUrl) { // Delete this object from C++ memory. func (this *QNetworkProxyQuery) Delete() { - C.QNetworkProxyQuery_Delete(this.h) + C.QNetworkProxyQuery_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -261,7 +308,8 @@ func (this *QNetworkProxyQuery) GoGC() { } type QNetworkProxy struct { - h *C.QNetworkProxy + h *C.QNetworkProxy + isSubclass bool } func (this *QNetworkProxy) cPointer() *C.QNetworkProxy { @@ -278,6 +326,7 @@ func (this *QNetworkProxy) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkProxy constructs the type using only CGO pointers. func newQNetworkProxy(h *C.QNetworkProxy) *QNetworkProxy { if h == nil { return nil @@ -285,26 +334,43 @@ func newQNetworkProxy(h *C.QNetworkProxy) *QNetworkProxy { return &QNetworkProxy{h: h} } +// UnsafeNewQNetworkProxy constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxy(h unsafe.Pointer) *QNetworkProxy { - return newQNetworkProxy((*C.QNetworkProxy)(h)) + if h == nil { + return nil + } + + return &QNetworkProxy{h: (*C.QNetworkProxy)(h)} } // NewQNetworkProxy constructs a new QNetworkProxy object. func NewQNetworkProxy() *QNetworkProxy { - ret := C.QNetworkProxy_new() - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new(&outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy2 constructs a new QNetworkProxy object. func NewQNetworkProxy2(typeVal QNetworkProxy__ProxyType) *QNetworkProxy { - ret := C.QNetworkProxy_new2((C.int)(typeVal)) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new2((C.int)(typeVal), &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy3 constructs a new QNetworkProxy object. func NewQNetworkProxy3(other *QNetworkProxy) *QNetworkProxy { - ret := C.QNetworkProxy_new3(other.cPointer()) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new3(other.cPointer(), &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy4 constructs a new QNetworkProxy object. @@ -313,8 +379,12 @@ func NewQNetworkProxy4(typeVal QNetworkProxy__ProxyType, hostName string) *QNetw hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - ret := C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms, &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy5 constructs a new QNetworkProxy object. @@ -323,8 +393,12 @@ func NewQNetworkProxy5(typeVal QNetworkProxy__ProxyType, hostName string, port u hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - ret := C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port)) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy6 constructs a new QNetworkProxy object. @@ -337,8 +411,12 @@ func NewQNetworkProxy6(typeVal QNetworkProxy__ProxyType, hostName string, port u user_ms.data = C.CString(user) user_ms.len = C.size_t(len(user)) defer C.free(unsafe.Pointer(user_ms.data)) - ret := C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } // NewQNetworkProxy7 constructs a new QNetworkProxy object. @@ -355,8 +433,12 @@ func NewQNetworkProxy7(typeVal QNetworkProxy__ProxyType, hostName string, port u password_ms.data = C.CString(password) password_ms.len = C.size_t(len(password)) defer C.free(unsafe.Pointer(password_ms.data)) - ret := C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms) - return newQNetworkProxy(ret) + var outptr_QNetworkProxy *C.QNetworkProxy = nil + + C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms, &outptr_QNetworkProxy) + ret := newQNetworkProxy(outptr_QNetworkProxy) + ret.isSubclass = true + return ret } func (this *QNetworkProxy) OperatorAssign(other *QNetworkProxy) { @@ -516,7 +598,7 @@ func (this *QNetworkProxy) SetRawHeader(headerName []byte, value []byte) { // Delete this object from C++ memory. func (this *QNetworkProxy) Delete() { - C.QNetworkProxy_Delete(this.h) + C.QNetworkProxy_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted @@ -529,7 +611,8 @@ func (this *QNetworkProxy) GoGC() { } type QNetworkProxyFactory struct { - h *C.QNetworkProxyFactory + h *C.QNetworkProxyFactory + isSubclass bool } func (this *QNetworkProxyFactory) cPointer() *C.QNetworkProxyFactory { @@ -546,6 +629,7 @@ func (this *QNetworkProxyFactory) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkProxyFactory constructs the type using only CGO pointers. func newQNetworkProxyFactory(h *C.QNetworkProxyFactory) *QNetworkProxyFactory { if h == nil { return nil @@ -553,12 +637,17 @@ func newQNetworkProxyFactory(h *C.QNetworkProxyFactory) *QNetworkProxyFactory { return &QNetworkProxyFactory{h: h} } +// UnsafeNewQNetworkProxyFactory constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyFactory(h unsafe.Pointer) *QNetworkProxyFactory { - return newQNetworkProxyFactory((*C.QNetworkProxyFactory)(h)) + if h == nil { + return nil + } + + return &QNetworkProxyFactory{h: (*C.QNetworkProxyFactory)(h)} } -func (this *QNetworkProxyFactory) QueryProxy() []QNetworkProxy { - var _ma C.struct_miqt_array = C.QNetworkProxyFactory_QueryProxy(this.h) +func (this *QNetworkProxyFactory) QueryProxy(query *QNetworkProxyQuery) []QNetworkProxy { + var _ma C.struct_miqt_array = C.QNetworkProxyFactory_QueryProxy(this.h, query.cPointer()) _ret := make([]QNetworkProxy, int(_ma.len)) _outCast := (*[0xffff]*C.QNetworkProxy)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { @@ -612,19 +701,6 @@ func (this *QNetworkProxyFactory) OperatorAssign(param1 *QNetworkProxyFactory) { C.QNetworkProxyFactory_OperatorAssign(this.h, param1.cPointer()) } -func (this *QNetworkProxyFactory) QueryProxy1(query *QNetworkProxyQuery) []QNetworkProxy { - var _ma C.struct_miqt_array = C.QNetworkProxyFactory_QueryProxy1(this.h, query.cPointer()) - _ret := make([]QNetworkProxy, int(_ma.len)) - _outCast := (*[0xffff]*C.QNetworkProxy)(unsafe.Pointer(_ma.data)) // hey ya - for i := 0; i < int(_ma.len); i++ { - _lv_ret := _outCast[i] - _lv_goptr := newQNetworkProxy(_lv_ret) - _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - _ret[i] = *_lv_goptr - } - return _ret -} - func QNetworkProxyFactory_SystemProxyForQuery1(query *QNetworkProxyQuery) []QNetworkProxy { var _ma C.struct_miqt_array = C.QNetworkProxyFactory_SystemProxyForQuery1(query.cPointer()) _ret := make([]QNetworkProxy, int(_ma.len)) @@ -640,7 +716,7 @@ func QNetworkProxyFactory_SystemProxyForQuery1(query *QNetworkProxyQuery) []QNet // Delete this object from C++ memory. func (this *QNetworkProxyFactory) Delete() { - C.QNetworkProxyFactory_Delete(this.h) + C.QNetworkProxyFactory_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkproxy.h b/qt6/network/gen_qnetworkproxy.h index f5bebe92..2f70f949 100644 --- a/qt6/network/gen_qnetworkproxy.h +++ b/qt6/network/gen_qnetworkproxy.h @@ -30,16 +30,16 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QNetworkProxyQuery* QNetworkProxyQuery_new(); -QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl); -QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port); -QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort); -QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkProxyQuery* other); -QNetworkProxyQuery* QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag); -QNetworkProxyQuery* QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType); -QNetworkProxyQuery* QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag); -QNetworkProxyQuery* QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType); +void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new5(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +void QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other); void QNetworkProxyQuery_Swap(QNetworkProxyQuery* self, QNetworkProxyQuery* other); bool QNetworkProxyQuery_OperatorEqual(const QNetworkProxyQuery* self, QNetworkProxyQuery* other); @@ -56,15 +56,15 @@ struct miqt_string QNetworkProxyQuery_ProtocolTag(const QNetworkProxyQuery* self void QNetworkProxyQuery_SetProtocolTag(QNetworkProxyQuery* self, struct miqt_string protocolTag); QUrl* QNetworkProxyQuery_Url(const QNetworkProxyQuery* self); void QNetworkProxyQuery_SetUrl(QNetworkProxyQuery* self, QUrl* url); -void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self); +void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass); -QNetworkProxy* QNetworkProxy_new(); -QNetworkProxy* QNetworkProxy_new2(int typeVal); -QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other); -QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName); -QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port); -QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user); -QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password); +void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy); +void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy); void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other); void QNetworkProxy_Swap(QNetworkProxy* self, QNetworkProxy* other); bool QNetworkProxy_OperatorEqual(const QNetworkProxy* self, QNetworkProxy* other); @@ -91,18 +91,17 @@ bool QNetworkProxy_HasRawHeader(const QNetworkProxy* self, struct miqt_string he struct miqt_array /* of struct miqt_string */ QNetworkProxy_RawHeaderList(const QNetworkProxy* self); struct miqt_string QNetworkProxy_RawHeader(const QNetworkProxy* self, struct miqt_string headerName); void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerName, struct miqt_string value); -void QNetworkProxy_Delete(QNetworkProxy* self); +void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass); -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self); +struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query); bool QNetworkProxyFactory_UsesSystemConfiguration(); void QNetworkProxyFactory_SetUseSystemConfiguration(bool enable); void QNetworkProxyFactory_SetApplicationProxyFactory(QNetworkProxyFactory* factory); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_ProxyForQuery(QNetworkProxyQuery* query); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery(); void QNetworkProxyFactory_OperatorAssign(QNetworkProxyFactory* self, QNetworkProxyFactory* param1); -struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy1(QNetworkProxyFactory* self, QNetworkProxyQuery* query); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery1(QNetworkProxyQuery* query); -void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self); +void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkreply.cpp b/qt6/network/gen_qnetworkreply.cpp index 77f3c5ce..4345eede 100644 --- a/qt6/network/gen_qnetworkreply.cpp +++ b/qt6/network/gen_qnetworkreply.cpp @@ -1,9 +1,12 @@ #include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -354,7 +357,11 @@ struct miqt_string QNetworkReply_Tr3(const char* s, const char* c, int n) { return _ms; } -void QNetworkReply_Delete(QNetworkReply* self) { - delete self; +void QNetworkReply_Delete(QNetworkReply* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkreply.go b/qt6/network/gen_qnetworkreply.go index 67f484c6..dbef8bab 100644 --- a/qt6/network/gen_qnetworkreply.go +++ b/qt6/network/gen_qnetworkreply.go @@ -55,7 +55,8 @@ const ( ) type QNetworkReply struct { - h *C.QNetworkReply + h *C.QNetworkReply + isSubclass bool *qt6.QIODevice } @@ -73,15 +74,23 @@ func (this *QNetworkReply) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQNetworkReply(h *C.QNetworkReply) *QNetworkReply { +// newQNetworkReply constructs the type using only CGO pointers. +func newQNetworkReply(h *C.QNetworkReply, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QNetworkReply { if h == nil { return nil } - return &QNetworkReply{h: h, QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h))} + return &QNetworkReply{h: h, + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} } -func UnsafeNewQNetworkReply(h unsafe.Pointer) *QNetworkReply { - return newQNetworkReply((*C.QNetworkReply)(h)) +// UnsafeNewQNetworkReply constructs the type using only unsafe pointers. +func UnsafeNewQNetworkReply(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QNetworkReply { + if h == nil { + return nil + } + + return &QNetworkReply{h: (*C.QNetworkReply)(h), + QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} } func (this *QNetworkReply) MetaObject() *qt6.QMetaObject { @@ -120,7 +129,7 @@ func (this *QNetworkReply) SetReadBufferSize(size int64) { } func (this *QNetworkReply) Manager() *QNetworkAccessManager { - return UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QNetworkReply_Manager(this.h))) + return UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QNetworkReply_Manager(this.h)), nil) } func (this *QNetworkReply) Operation() QNetworkAccessManager__Operation { @@ -521,7 +530,7 @@ func QNetworkReply_Tr3(s string, c string, n int) string { // Delete this object from C++ memory. func (this *QNetworkReply) Delete() { - C.QNetworkReply_Delete(this.h) + C.QNetworkReply_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkreply.h b/qt6/network/gen_qnetworkreply.h index 4948f624..ed79abd7 100644 --- a/qt6/network/gen_qnetworkreply.h +++ b/qt6/network/gen_qnetworkreply.h @@ -16,10 +16,13 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QNetworkAccessManager; class QNetworkReply; class QNetworkRequest; +class QObject; class QSslConfiguration; class QSslError; class QSslPreSharedKeyAuthenticator; @@ -27,10 +30,13 @@ class QUrl; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QNetworkAccessManager QNetworkAccessManager; typedef struct QNetworkReply QNetworkReply; typedef struct QNetworkRequest QNetworkRequest; +typedef struct QObject QObject; typedef struct QSslConfiguration QSslConfiguration; typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; @@ -87,9 +93,13 @@ void QNetworkReply_UploadProgress(QNetworkReply* self, long long bytesSent, long void QNetworkReply_connect_UploadProgress(QNetworkReply* self, intptr_t slot); void QNetworkReply_DownloadProgress(QNetworkReply* self, long long bytesReceived, long long bytesTotal); void QNetworkReply_connect_DownloadProgress(QNetworkReply* self, intptr_t slot); +long long QNetworkReply_WriteData(QNetworkReply* self, const char* data, long long lenVal); +void QNetworkReply_SslConfigurationImplementation(const QNetworkReply* self, QSslConfiguration* param1); +void QNetworkReply_SetSslConfigurationImplementation(QNetworkReply* self, QSslConfiguration* sslConfigurationImplementation); +void QNetworkReply_IgnoreSslErrorsImplementation(QNetworkReply* self, struct miqt_array /* of QSslError* */ param1); struct miqt_string QNetworkReply_Tr2(const char* s, const char* c); struct miqt_string QNetworkReply_Tr3(const char* s, const char* c, int n); -void QNetworkReply_Delete(QNetworkReply* self); +void QNetworkReply_Delete(QNetworkReply* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qnetworkrequest.cpp b/qt6/network/gen_qnetworkrequest.cpp index b7d5f8bc..d9232cdc 100644 --- a/qt6/network/gen_qnetworkrequest.cpp +++ b/qt6/network/gen_qnetworkrequest.cpp @@ -13,16 +13,19 @@ #include "gen_qnetworkrequest.h" #include "_cgo_export.h" -QNetworkRequest* QNetworkRequest_new() { - return new QNetworkRequest(); +void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest) { + QNetworkRequest* ret = new QNetworkRequest(); + *outptr_QNetworkRequest = ret; } -QNetworkRequest* QNetworkRequest_new2(QUrl* url) { - return new QNetworkRequest(*url); +void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest) { + QNetworkRequest* ret = new QNetworkRequest(*url); + *outptr_QNetworkRequest = ret; } -QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other) { - return new QNetworkRequest(*other); +void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest) { + QNetworkRequest* ret = new QNetworkRequest(*other); + *outptr_QNetworkRequest = ret; } void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other) { @@ -186,7 +189,11 @@ void QNetworkRequest_SetTransferTimeout1(QNetworkRequest* self, int timeout) { self->setTransferTimeout(static_cast(timeout)); } -void QNetworkRequest_Delete(QNetworkRequest* self) { - delete self; +void QNetworkRequest_Delete(QNetworkRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qnetworkrequest.go b/qt6/network/gen_qnetworkrequest.go index 57d4922a..d34227fa 100644 --- a/qt6/network/gen_qnetworkrequest.go +++ b/qt6/network/gen_qnetworkrequest.go @@ -107,7 +107,8 @@ const ( ) type QNetworkRequest struct { - h *C.QNetworkRequest + h *C.QNetworkRequest + isSubclass bool } func (this *QNetworkRequest) cPointer() *C.QNetworkRequest { @@ -124,6 +125,7 @@ func (this *QNetworkRequest) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQNetworkRequest constructs the type using only CGO pointers. func newQNetworkRequest(h *C.QNetworkRequest) *QNetworkRequest { if h == nil { return nil @@ -131,26 +133,43 @@ func newQNetworkRequest(h *C.QNetworkRequest) *QNetworkRequest { return &QNetworkRequest{h: h} } +// UnsafeNewQNetworkRequest constructs the type using only unsafe pointers. func UnsafeNewQNetworkRequest(h unsafe.Pointer) *QNetworkRequest { - return newQNetworkRequest((*C.QNetworkRequest)(h)) + if h == nil { + return nil + } + + return &QNetworkRequest{h: (*C.QNetworkRequest)(h)} } // NewQNetworkRequest constructs a new QNetworkRequest object. func NewQNetworkRequest() *QNetworkRequest { - ret := C.QNetworkRequest_new() - return newQNetworkRequest(ret) + var outptr_QNetworkRequest *C.QNetworkRequest = nil + + C.QNetworkRequest_new(&outptr_QNetworkRequest) + ret := newQNetworkRequest(outptr_QNetworkRequest) + ret.isSubclass = true + return ret } // NewQNetworkRequest2 constructs a new QNetworkRequest object. func NewQNetworkRequest2(url *qt6.QUrl) *QNetworkRequest { - ret := C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer())) - return newQNetworkRequest(ret) + var outptr_QNetworkRequest *C.QNetworkRequest = nil + + C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer()), &outptr_QNetworkRequest) + ret := newQNetworkRequest(outptr_QNetworkRequest) + ret.isSubclass = true + return ret } // NewQNetworkRequest3 constructs a new QNetworkRequest object. func NewQNetworkRequest3(other *QNetworkRequest) *QNetworkRequest { - ret := C.QNetworkRequest_new3(other.cPointer()) - return newQNetworkRequest(ret) + var outptr_QNetworkRequest *C.QNetworkRequest = nil + + C.QNetworkRequest_new3(other.cPointer(), &outptr_QNetworkRequest) + ret := newQNetworkRequest(outptr_QNetworkRequest) + ret.isSubclass = true + return ret } func (this *QNetworkRequest) OperatorAssign(other *QNetworkRequest) { @@ -332,7 +351,7 @@ func (this *QNetworkRequest) SetTransferTimeout1(timeout int) { // Delete this object from C++ memory. func (this *QNetworkRequest) Delete() { - C.QNetworkRequest_Delete(this.h) + C.QNetworkRequest_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qnetworkrequest.h b/qt6/network/gen_qnetworkrequest.h index 06c54519..77a33062 100644 --- a/qt6/network/gen_qnetworkrequest.h +++ b/qt6/network/gen_qnetworkrequest.h @@ -32,9 +32,9 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -QNetworkRequest* QNetworkRequest_new(); -QNetworkRequest* QNetworkRequest_new2(QUrl* url); -QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other); +void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest); +void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest); +void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest); void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other); void QNetworkRequest_Swap(QNetworkRequest* self, QNetworkRequest* other); bool QNetworkRequest_OperatorEqual(const QNetworkRequest* self, QNetworkRequest* other); @@ -67,7 +67,7 @@ int QNetworkRequest_TransferTimeout(const QNetworkRequest* self); void QNetworkRequest_SetTransferTimeout(QNetworkRequest* self); QVariant* QNetworkRequest_Attribute2(const QNetworkRequest* self, int code, QVariant* defaultValue); void QNetworkRequest_SetTransferTimeout1(QNetworkRequest* self, int timeout); -void QNetworkRequest_Delete(QNetworkRequest* self); +void QNetworkRequest_Delete(QNetworkRequest* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qocspresponse.cpp b/qt6/network/gen_qocspresponse.cpp index 4c46a035..c6133b28 100644 --- a/qt6/network/gen_qocspresponse.cpp +++ b/qt6/network/gen_qocspresponse.cpp @@ -4,12 +4,14 @@ #include "gen_qocspresponse.h" #include "_cgo_export.h" -QOcspResponse* QOcspResponse_new() { - return new QOcspResponse(); +void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse) { + QOcspResponse* ret = new QOcspResponse(); + *outptr_QOcspResponse = ret; } -QOcspResponse* QOcspResponse_new2(QOcspResponse* other) { - return new QOcspResponse(*other); +void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse) { + QOcspResponse* ret = new QOcspResponse(*other); + *outptr_QOcspResponse = ret; } void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other) { @@ -38,7 +40,11 @@ void QOcspResponse_Swap(QOcspResponse* self, QOcspResponse* other) { self->swap(*other); } -void QOcspResponse_Delete(QOcspResponse* self) { - delete self; +void QOcspResponse_Delete(QOcspResponse* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qocspresponse.go b/qt6/network/gen_qocspresponse.go index 5f84859d..8d40495f 100644 --- a/qt6/network/gen_qocspresponse.go +++ b/qt6/network/gen_qocspresponse.go @@ -36,7 +36,8 @@ const ( ) type QOcspResponse struct { - h *C.QOcspResponse + h *C.QOcspResponse + isSubclass bool } func (this *QOcspResponse) cPointer() *C.QOcspResponse { @@ -53,6 +54,7 @@ func (this *QOcspResponse) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQOcspResponse constructs the type using only CGO pointers. func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse { if h == nil { return nil @@ -60,20 +62,33 @@ func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse { return &QOcspResponse{h: h} } +// UnsafeNewQOcspResponse constructs the type using only unsafe pointers. func UnsafeNewQOcspResponse(h unsafe.Pointer) *QOcspResponse { - return newQOcspResponse((*C.QOcspResponse)(h)) + if h == nil { + return nil + } + + return &QOcspResponse{h: (*C.QOcspResponse)(h)} } // NewQOcspResponse constructs a new QOcspResponse object. func NewQOcspResponse() *QOcspResponse { - ret := C.QOcspResponse_new() - return newQOcspResponse(ret) + var outptr_QOcspResponse *C.QOcspResponse = nil + + C.QOcspResponse_new(&outptr_QOcspResponse) + ret := newQOcspResponse(outptr_QOcspResponse) + ret.isSubclass = true + return ret } // NewQOcspResponse2 constructs a new QOcspResponse object. func NewQOcspResponse2(other *QOcspResponse) *QOcspResponse { - ret := C.QOcspResponse_new2(other.cPointer()) - return newQOcspResponse(ret) + var outptr_QOcspResponse *C.QOcspResponse = nil + + C.QOcspResponse_new2(other.cPointer(), &outptr_QOcspResponse) + ret := newQOcspResponse(outptr_QOcspResponse) + ret.isSubclass = true + return ret } func (this *QOcspResponse) OperatorAssign(other *QOcspResponse) { @@ -108,7 +123,7 @@ func (this *QOcspResponse) Swap(other *QOcspResponse) { // Delete this object from C++ memory. func (this *QOcspResponse) Delete() { - C.QOcspResponse_Delete(this.h) + C.QOcspResponse_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qocspresponse.h b/qt6/network/gen_qocspresponse.h index 95f43f03..73f98a56 100644 --- a/qt6/network/gen_qocspresponse.h +++ b/qt6/network/gen_qocspresponse.h @@ -22,15 +22,15 @@ typedef struct QOcspResponse QOcspResponse; typedef struct QSslCertificate QSslCertificate; #endif -QOcspResponse* QOcspResponse_new(); -QOcspResponse* QOcspResponse_new2(QOcspResponse* other); +void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse); +void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse); void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other); int QOcspResponse_CertificateStatus(const QOcspResponse* self); int QOcspResponse_RevocationReason(const QOcspResponse* self); QSslCertificate* QOcspResponse_Responder(const QOcspResponse* self); QSslCertificate* QOcspResponse_Subject(const QOcspResponse* self); void QOcspResponse_Swap(QOcspResponse* self, QOcspResponse* other); -void QOcspResponse_Delete(QOcspResponse* self); +void QOcspResponse_Delete(QOcspResponse* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsctpserver.cpp b/qt6/network/gen_qsctpserver.cpp index bcc53147..ee22bd5d 100644 --- a/qt6/network/gen_qsctpserver.cpp +++ b/qt6/network/gen_qsctpserver.cpp @@ -5,16 +5,103 @@ #include #include #include +#include +#include #include #include "gen_qsctpserver.h" #include "_cgo_export.h" -QSctpServer* QSctpServer_new() { - return new QSctpServer(); +class MiqtVirtualQSctpServer : public virtual QSctpServer { +public: + + MiqtVirtualQSctpServer(): QSctpServer() {}; + MiqtVirtualQSctpServer(QObject* parent): QSctpServer(parent) {}; + + virtual ~MiqtVirtualQSctpServer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IncomingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual void incomingConnection(qintptr handle) override { + if (handle__IncomingConnection == 0) { + QSctpServer::incomingConnection(handle); + return; + } + + qintptr handle_ret = handle; + intptr_t sigval1 = static_cast(handle_ret); + + miqt_exec_callback_QSctpServer_IncomingConnection(this, handle__IncomingConnection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_IncomingConnection(intptr_t handle) { + + QSctpServer::incomingConnection((qintptr)(handle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingConnections = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingConnections() const override { + if (handle__HasPendingConnections == 0) { + return QSctpServer::hasPendingConnections(); + } + + + bool callback_return_value = miqt_exec_callback_QSctpServer_HasPendingConnections(const_cast(this), handle__HasPendingConnections); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasPendingConnections() const { + + return QSctpServer::hasPendingConnections(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextPendingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual QTcpSocket* nextPendingConnection() override { + if (handle__NextPendingConnection == 0) { + return QSctpServer::nextPendingConnection(); + } + + + QTcpSocket* callback_return_value = miqt_exec_callback_QSctpServer_NextPendingConnection(this, handle__NextPendingConnection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTcpSocket* virtualbase_NextPendingConnection() { + + return QSctpServer::nextPendingConnection(); + + } + +}; + +void QSctpServer_new(QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQSctpServer* ret = new MiqtVirtualQSctpServer(); + *outptr_QSctpServer = ret; + *outptr_QTcpServer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSctpServer* QSctpServer_new2(QObject* parent) { - return new QSctpServer(parent); +void QSctpServer_new2(QObject* parent, QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQSctpServer* ret = new MiqtVirtualQSctpServer(parent); + *outptr_QSctpServer = ret; + *outptr_QTcpServer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSctpServer_MetaObject(const QSctpServer* self) { @@ -70,7 +157,35 @@ struct miqt_string QSctpServer_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSctpServer_Delete(QSctpServer* self) { - delete self; +void QSctpServer_override_virtual_IncomingConnection(void* self, intptr_t slot) { + dynamic_cast( (QSctpServer*)(self) )->handle__IncomingConnection = slot; +} + +void QSctpServer_virtualbase_IncomingConnection(void* self, intptr_t handle) { + ( (MiqtVirtualQSctpServer*)(self) )->virtualbase_IncomingConnection(handle); +} + +void QSctpServer_override_virtual_HasPendingConnections(void* self, intptr_t slot) { + dynamic_cast( (QSctpServer*)(self) )->handle__HasPendingConnections = slot; +} + +bool QSctpServer_virtualbase_HasPendingConnections(const void* self) { + return ( (const MiqtVirtualQSctpServer*)(self) )->virtualbase_HasPendingConnections(); +} + +void QSctpServer_override_virtual_NextPendingConnection(void* self, intptr_t slot) { + dynamic_cast( (QSctpServer*)(self) )->handle__NextPendingConnection = slot; +} + +QTcpSocket* QSctpServer_virtualbase_NextPendingConnection(void* self) { + return ( (MiqtVirtualQSctpServer*)(self) )->virtualbase_NextPendingConnection(); +} + +void QSctpServer_Delete(QSctpServer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsctpserver.go b/qt6/network/gen_qsctpserver.go index 0f61a245..a99d0412 100644 --- a/qt6/network/gen_qsctpserver.go +++ b/qt6/network/gen_qsctpserver.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QSctpServer struct { - h *C.QSctpServer + h *C.QSctpServer + isSubclass bool *QTcpServer } @@ -33,27 +35,47 @@ func (this *QSctpServer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSctpServer(h *C.QSctpServer) *QSctpServer { +// newQSctpServer constructs the type using only CGO pointers. +func newQSctpServer(h *C.QSctpServer, h_QTcpServer *C.QTcpServer, h_QObject *C.QObject) *QSctpServer { if h == nil { return nil } - return &QSctpServer{h: h, QTcpServer: UnsafeNewQTcpServer(unsafe.Pointer(h))} + return &QSctpServer{h: h, + QTcpServer: newQTcpServer(h_QTcpServer, h_QObject)} } -func UnsafeNewQSctpServer(h unsafe.Pointer) *QSctpServer { - return newQSctpServer((*C.QSctpServer)(h)) +// UnsafeNewQSctpServer constructs the type using only unsafe pointers. +func UnsafeNewQSctpServer(h unsafe.Pointer, h_QTcpServer unsafe.Pointer, h_QObject unsafe.Pointer) *QSctpServer { + if h == nil { + return nil + } + + return &QSctpServer{h: (*C.QSctpServer)(h), + QTcpServer: UnsafeNewQTcpServer(h_QTcpServer, h_QObject)} } // NewQSctpServer constructs a new QSctpServer object. func NewQSctpServer() *QSctpServer { - ret := C.QSctpServer_new() - return newQSctpServer(ret) + var outptr_QSctpServer *C.QSctpServer = nil + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QSctpServer_new(&outptr_QSctpServer, &outptr_QTcpServer, &outptr_QObject) + ret := newQSctpServer(outptr_QSctpServer, outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSctpServer2 constructs a new QSctpServer object. func NewQSctpServer2(parent *qt6.QObject) *QSctpServer { - ret := C.QSctpServer_new2((*C.QObject)(parent.UnsafePointer())) - return newQSctpServer(ret) + var outptr_QSctpServer *C.QSctpServer = nil + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QSctpServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSctpServer, &outptr_QTcpServer, &outptr_QObject) + ret := newQSctpServer(outptr_QSctpServer, outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSctpServer) MetaObject() *qt6.QMetaObject { @@ -84,7 +106,7 @@ func (this *QSctpServer) MaximumChannelCount() int { } func (this *QSctpServer) NextPendingDatagramConnection() *QSctpSocket { - return UnsafeNewQSctpSocket(unsafe.Pointer(C.QSctpServer_NextPendingDatagramConnection(this.h))) + return UnsafeNewQSctpSocket(unsafe.Pointer(C.QSctpServer_NextPendingDatagramConnection(this.h)), nil, nil, nil, nil, nil) } func QSctpServer_Tr2(s string, c string) string { @@ -109,9 +131,75 @@ func QSctpServer_Tr3(s string, c string, n int) string { return _ret } +func (this *QSctpServer) callVirtualBase_IncomingConnection(handle uintptr) { + + C.QSctpServer_virtualbase_IncomingConnection(unsafe.Pointer(this.h), (C.intptr_t)(handle)) + +} +func (this *QSctpServer) OnIncomingConnection(slot func(super func(handle uintptr), handle uintptr)) { + C.QSctpServer_override_virtual_IncomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpServer_IncomingConnection +func miqt_exec_callback_QSctpServer_IncomingConnection(self *C.QSctpServer, cb C.intptr_t, handle C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(handle uintptr), handle uintptr)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(handle) + + gofunc((&QSctpServer{h: self}).callVirtualBase_IncomingConnection, slotval1) + +} + +func (this *QSctpServer) callVirtualBase_HasPendingConnections() bool { + + return (bool)(C.QSctpServer_virtualbase_HasPendingConnections(unsafe.Pointer(this.h))) + +} +func (this *QSctpServer) OnHasPendingConnections(slot func(super func() bool) bool) { + C.QSctpServer_override_virtual_HasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpServer_HasPendingConnections +func miqt_exec_callback_QSctpServer_HasPendingConnections(self *C.QSctpServer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSctpServer{h: self}).callVirtualBase_HasPendingConnections) + + return (C.bool)(virtualReturn) + +} + +func (this *QSctpServer) callVirtualBase_NextPendingConnection() *QTcpSocket { + + return UnsafeNewQTcpSocket(unsafe.Pointer(C.QSctpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QSctpServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { + C.QSctpServer_override_virtual_NextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpServer_NextPendingConnection +func miqt_exec_callback_QSctpServer_NextPendingConnection(self *C.QSctpServer, cb C.intptr_t) *C.QTcpSocket { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTcpSocket) *QTcpSocket) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSctpServer{h: self}).callVirtualBase_NextPendingConnection) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QSctpServer) Delete() { - C.QSctpServer_Delete(this.h) + C.QSctpServer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsctpserver.h b/qt6/network/gen_qsctpserver.h index c77a1c27..c0a29dba 100644 --- a/qt6/network/gen_qsctpserver.h +++ b/qt6/network/gen_qsctpserver.h @@ -19,24 +19,35 @@ class QMetaObject; class QObject; class QSctpServer; class QSctpSocket; +class QTcpServer; +class QTcpSocket; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSctpServer QSctpServer; typedef struct QSctpSocket QSctpSocket; +typedef struct QTcpServer QTcpServer; +typedef struct QTcpSocket QTcpSocket; #endif -QSctpServer* QSctpServer_new(); -QSctpServer* QSctpServer_new2(QObject* parent); +void QSctpServer_new(QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +void QSctpServer_new2(QObject* parent, QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); QMetaObject* QSctpServer_MetaObject(const QSctpServer* self); void* QSctpServer_Metacast(QSctpServer* self, const char* param1); struct miqt_string QSctpServer_Tr(const char* s); void QSctpServer_SetMaximumChannelCount(QSctpServer* self, int count); int QSctpServer_MaximumChannelCount(const QSctpServer* self); QSctpSocket* QSctpServer_NextPendingDatagramConnection(QSctpServer* self); +void QSctpServer_IncomingConnection(QSctpServer* self, intptr_t handle); struct miqt_string QSctpServer_Tr2(const char* s, const char* c); struct miqt_string QSctpServer_Tr3(const char* s, const char* c, int n); -void QSctpServer_Delete(QSctpServer* self); +void QSctpServer_override_virtual_IncomingConnection(void* self, intptr_t slot); +void QSctpServer_virtualbase_IncomingConnection(void* self, intptr_t handle); +void QSctpServer_override_virtual_HasPendingConnections(void* self, intptr_t slot); +bool QSctpServer_virtualbase_HasPendingConnections(const void* self); +void QSctpServer_override_virtual_NextPendingConnection(void* self, intptr_t slot); +QTcpSocket* QSctpServer_virtualbase_NextPendingConnection(void* self); +void QSctpServer_Delete(QSctpServer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsctpsocket.cpp b/qt6/network/gen_qsctpsocket.cpp index 8448a1d4..a0c3d863 100644 --- a/qt6/network/gen_qsctpsocket.cpp +++ b/qt6/network/gen_qsctpsocket.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -5,16 +8,137 @@ #include #include #include +#include #include #include "gen_qsctpsocket.h" #include "_cgo_export.h" -QSctpSocket* QSctpSocket_new() { - return new QSctpSocket(); +class MiqtVirtualQSctpSocket : public virtual QSctpSocket { +public: + + MiqtVirtualQSctpSocket(): QSctpSocket() {}; + MiqtVirtualQSctpSocket(QObject* parent): QSctpSocket(parent) {}; + + virtual ~MiqtVirtualQSctpSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QSctpSocket::close(); + return; + } + + + miqt_exec_callback_QSctpSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QSctpSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QSctpSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QSctpSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QSctpSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QSctpSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSctpSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QSctpSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QSctpSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSctpSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QSctpSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + +}; + +void QSctpSocket_new(QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQSctpSocket* ret = new MiqtVirtualQSctpSocket(); + *outptr_QSctpSocket = ret; + *outptr_QTcpSocket = static_cast(ret); + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QSctpSocket* QSctpSocket_new2(QObject* parent) { - return new QSctpSocket(parent); +void QSctpSocket_new2(QObject* parent, QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQSctpSocket* ret = new MiqtVirtualQSctpSocket(parent); + *outptr_QSctpSocket = ret; + *outptr_QTcpSocket = static_cast(ret); + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QSctpSocket_MetaObject(const QSctpSocket* self) { @@ -86,7 +210,43 @@ struct miqt_string QSctpSocket_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSctpSocket_Delete(QSctpSocket* self) { - delete self; +void QSctpSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QSctpSocket*)(self) )->handle__Close = slot; +} + +void QSctpSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQSctpSocket*)(self) )->virtualbase_Close(); +} + +void QSctpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QSctpSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QSctpSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQSctpSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QSctpSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QSctpSocket*)(self) )->handle__ReadData = slot; +} + +long long QSctpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSctpSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QSctpSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QSctpSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QSctpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSctpSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QSctpSocket_Delete(QSctpSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsctpsocket.go b/qt6/network/gen_qsctpsocket.go index 692e1056..adc8aee5 100644 --- a/qt6/network/gen_qsctpsocket.go +++ b/qt6/network/gen_qsctpsocket.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QSctpSocket struct { - h *C.QSctpSocket + h *C.QSctpSocket + isSubclass bool *QTcpSocket } @@ -33,27 +35,53 @@ func (this *QSctpSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSctpSocket(h *C.QSctpSocket) *QSctpSocket { +// newQSctpSocket constructs the type using only CGO pointers. +func newQSctpSocket(h *C.QSctpSocket, h_QTcpSocket *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QSctpSocket { if h == nil { return nil } - return &QSctpSocket{h: h, QTcpSocket: UnsafeNewQTcpSocket(unsafe.Pointer(h))} + return &QSctpSocket{h: h, + QTcpSocket: newQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQSctpSocket(h unsafe.Pointer) *QSctpSocket { - return newQSctpSocket((*C.QSctpSocket)(h)) +// UnsafeNewQSctpSocket constructs the type using only unsafe pointers. +func UnsafeNewQSctpSocket(h unsafe.Pointer, h_QTcpSocket unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QSctpSocket { + if h == nil { + return nil + } + + return &QSctpSocket{h: (*C.QSctpSocket)(h), + QTcpSocket: UnsafeNewQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQSctpSocket constructs a new QSctpSocket object. func NewQSctpSocket() *QSctpSocket { - ret := C.QSctpSocket_new() - return newQSctpSocket(ret) + var outptr_QSctpSocket *C.QSctpSocket = nil + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSctpSocket_new(&outptr_QSctpSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSctpSocket(outptr_QSctpSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQSctpSocket2 constructs a new QSctpSocket object. func NewQSctpSocket2(parent *qt6.QObject) *QSctpSocket { - ret := C.QSctpSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQSctpSocket(ret) + var outptr_QSctpSocket *C.QSctpSocket = nil + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSctpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSctpSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSctpSocket(outptr_QSctpSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QSctpSocket) MetaObject() *qt6.QMetaObject { @@ -128,9 +156,109 @@ func QSctpSocket_Tr3(s string, c string, n int) string { return _ret } +func (this *QSctpSocket) callVirtualBase_Close() { + + C.QSctpSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QSctpSocket) OnClose(slot func(super func())) { + C.QSctpSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpSocket_Close +func miqt_exec_callback_QSctpSocket_Close(self *C.QSctpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSctpSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QSctpSocket) callVirtualBase_DisconnectFromHost() { + + C.QSctpSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QSctpSocket) OnDisconnectFromHost(slot func(super func())) { + C.QSctpSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpSocket_DisconnectFromHost +func miqt_exec_callback_QSctpSocket_DisconnectFromHost(self *C.QSctpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSctpSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QSctpSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSctpSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSctpSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSctpSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpSocket_ReadData +func miqt_exec_callback_QSctpSocket_ReadData(self *C.QSctpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSctpSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSctpSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSctpSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSctpSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSctpSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSctpSocket_ReadLineData +func miqt_exec_callback_QSctpSocket_ReadLineData(self *C.QSctpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSctpSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSctpSocket) Delete() { - C.QSctpSocket_Delete(this.h) + C.QSctpSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsctpsocket.h b/qt6/network/gen_qsctpsocket.h index 181899c4..15f55500 100644 --- a/qt6/network/gen_qsctpsocket.h +++ b/qt6/network/gen_qsctpsocket.h @@ -15,19 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QNetworkDatagram; class QObject; class QSctpSocket; +class QTcpSocket; #else +typedef struct QAbstractSocket QAbstractSocket; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QNetworkDatagram QNetworkDatagram; typedef struct QObject QObject; typedef struct QSctpSocket QSctpSocket; +typedef struct QTcpSocket QTcpSocket; #endif -QSctpSocket* QSctpSocket_new(); -QSctpSocket* QSctpSocket_new2(QObject* parent); +void QSctpSocket_new(QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QSctpSocket_new2(QObject* parent, QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QSctpSocket_MetaObject(const QSctpSocket* self); void* QSctpSocket_Metacast(QSctpSocket* self, const char* param1); struct miqt_string QSctpSocket_Tr(const char* s); @@ -38,9 +46,19 @@ int QSctpSocket_MaximumChannelCount(const QSctpSocket* self); bool QSctpSocket_IsInDatagramMode(const QSctpSocket* self); QNetworkDatagram* QSctpSocket_ReadDatagram(QSctpSocket* self); bool QSctpSocket_WriteDatagram(QSctpSocket* self, QNetworkDatagram* datagram); +long long QSctpSocket_ReadData(QSctpSocket* self, char* data, long long maxlen); +long long QSctpSocket_ReadLineData(QSctpSocket* self, char* data, long long maxlen); struct miqt_string QSctpSocket_Tr2(const char* s, const char* c); struct miqt_string QSctpSocket_Tr3(const char* s, const char* c, int n); -void QSctpSocket_Delete(QSctpSocket* self); +void QSctpSocket_override_virtual_Close(void* self, intptr_t slot); +void QSctpSocket_virtualbase_Close(void* self); +void QSctpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QSctpSocket_virtualbase_DisconnectFromHost(void* self); +void QSctpSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QSctpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QSctpSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QSctpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QSctpSocket_Delete(QSctpSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslcertificate.cpp b/qt6/network/gen_qsslcertificate.cpp index 01166b92..608f3797 100644 --- a/qt6/network/gen_qsslcertificate.cpp +++ b/qt6/network/gen_qsslcertificate.cpp @@ -13,30 +13,36 @@ #include "gen_qsslcertificate.h" #include "_cgo_export.h" -QSslCertificate* QSslCertificate_new(QIODevice* device) { - return new QSslCertificate(device); +void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(device); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new2() { - return new QSslCertificate(); +void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new3(QSslCertificate* other) { - return new QSslCertificate(*other); +void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(*other); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new4(QIODevice* device, int format) { - return new QSslCertificate(device, static_cast(format)); +void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate) { + QSslCertificate* ret = new QSslCertificate(device, static_cast(format)); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new5(struct miqt_string data) { +void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate) { QByteArray data_QByteArray(data.data, data.len); - return new QSslCertificate(data_QByteArray); + QSslCertificate* ret = new QSslCertificate(data_QByteArray); + *outptr_QSslCertificate = ret; } -QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format) { +void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate) { QByteArray data_QByteArray(data.data, data.len); - return new QSslCertificate(data_QByteArray, static_cast(format)); + QSslCertificate* ret = new QSslCertificate(data_QByteArray, static_cast(format)); + *outptr_QSslCertificate = ret; } void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other) { @@ -466,7 +472,11 @@ bool QSslCertificate_ImportPkcs125(QIODevice* device, QSslKey* key, QSslCertific return QSslCertificate::importPkcs12(device, key, cert, &caCertificates_QList, passPhrase_QByteArray); } -void QSslCertificate_Delete(QSslCertificate* self) { - delete self; +void QSslCertificate_Delete(QSslCertificate* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslcertificate.go b/qt6/network/gen_qsslcertificate.go index b50a3431..6ae304e3 100644 --- a/qt6/network/gen_qsslcertificate.go +++ b/qt6/network/gen_qsslcertificate.go @@ -37,7 +37,8 @@ const ( ) type QSslCertificate struct { - h *C.QSslCertificate + h *C.QSslCertificate + isSubclass bool } func (this *QSslCertificate) cPointer() *C.QSslCertificate { @@ -54,6 +55,7 @@ func (this *QSslCertificate) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslCertificate constructs the type using only CGO pointers. func newQSslCertificate(h *C.QSslCertificate) *QSslCertificate { if h == nil { return nil @@ -61,32 +63,53 @@ func newQSslCertificate(h *C.QSslCertificate) *QSslCertificate { return &QSslCertificate{h: h} } +// UnsafeNewQSslCertificate constructs the type using only unsafe pointers. func UnsafeNewQSslCertificate(h unsafe.Pointer) *QSslCertificate { - return newQSslCertificate((*C.QSslCertificate)(h)) + if h == nil { + return nil + } + + return &QSslCertificate{h: (*C.QSslCertificate)(h)} } // NewQSslCertificate constructs a new QSslCertificate object. func NewQSslCertificate(device *qt6.QIODevice) *QSslCertificate { - ret := C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer())) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate2 constructs a new QSslCertificate object. func NewQSslCertificate2() *QSslCertificate { - ret := C.QSslCertificate_new2() - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new2(&outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate3 constructs a new QSslCertificate object. func NewQSslCertificate3(other *QSslCertificate) *QSslCertificate { - ret := C.QSslCertificate_new3(other.cPointer()) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new3(other.cPointer(), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate4 constructs a new QSslCertificate object. func NewQSslCertificate4(device *qt6.QIODevice, format QSsl__EncodingFormat) *QSslCertificate { - ret := C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format)) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate5 constructs a new QSslCertificate object. @@ -94,8 +117,12 @@ func NewQSslCertificate5(data []byte) *QSslCertificate { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QSslCertificate_new5(data_alias) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new5(data_alias, &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } // NewQSslCertificate6 constructs a new QSslCertificate object. @@ -103,8 +130,12 @@ func NewQSslCertificate6(data []byte, format QSsl__EncodingFormat) *QSslCertific data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - ret := C.QSslCertificate_new6(data_alias, (C.int)(format)) - return newQSslCertificate(ret) + var outptr_QSslCertificate *C.QSslCertificate = nil + + C.QSslCertificate_new6(data_alias, (C.int)(format), &outptr_QSslCertificate) + ret := newQSslCertificate(outptr_QSslCertificate) + ret.isSubclass = true + return ret } func (this *QSslCertificate) OperatorAssign(other *QSslCertificate) { @@ -504,7 +535,7 @@ func QSslCertificate_ImportPkcs125(device *qt6.QIODevice, key *QSslKey, cert *QS // Delete this object from C++ memory. func (this *QSslCertificate) Delete() { - C.QSslCertificate_Delete(this.h) + C.QSslCertificate_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslcertificate.h b/qt6/network/gen_qsslcertificate.h index be605d35..8bada537 100644 --- a/qt6/network/gen_qsslcertificate.h +++ b/qt6/network/gen_qsslcertificate.h @@ -32,12 +32,12 @@ typedef struct QSslError QSslError; typedef struct QSslKey QSslKey; #endif -QSslCertificate* QSslCertificate_new(QIODevice* device); -QSslCertificate* QSslCertificate_new2(); -QSslCertificate* QSslCertificate_new3(QSslCertificate* other); -QSslCertificate* QSslCertificate_new4(QIODevice* device, int format); -QSslCertificate* QSslCertificate_new5(struct miqt_string data); -QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format); +void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate); +void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate); void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other); void QSslCertificate_Swap(QSslCertificate* self, QSslCertificate* other); bool QSslCertificate_OperatorEqual(const QSslCertificate* self, QSslCertificate* other); @@ -78,7 +78,7 @@ struct miqt_array /* of QSslCertificate* */ QSslCertificate_FromData2(struct mi struct miqt_array /* of QSslError* */ QSslCertificate_Verify2(struct miqt_array /* of QSslCertificate* */ certificateChain, struct miqt_string hostName); bool QSslCertificate_ImportPkcs124(QIODevice* device, QSslKey* key, QSslCertificate* cert, struct miqt_array /* of QSslCertificate* */ caCertificates); bool QSslCertificate_ImportPkcs125(QIODevice* device, QSslKey* key, QSslCertificate* cert, struct miqt_array /* of QSslCertificate* */ caCertificates, struct miqt_string passPhrase); -void QSslCertificate_Delete(QSslCertificate* self); +void QSslCertificate_Delete(QSslCertificate* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslcertificateextension.cpp b/qt6/network/gen_qsslcertificateextension.cpp index 0bb9b367..7c04db42 100644 --- a/qt6/network/gen_qsslcertificateextension.cpp +++ b/qt6/network/gen_qsslcertificateextension.cpp @@ -7,12 +7,14 @@ #include "gen_qsslcertificateextension.h" #include "_cgo_export.h" -QSslCertificateExtension* QSslCertificateExtension_new() { - return new QSslCertificateExtension(); +void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension) { + QSslCertificateExtension* ret = new QSslCertificateExtension(); + *outptr_QSslCertificateExtension = ret; } -QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other) { - return new QSslCertificateExtension(*other); +void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension) { + QSslCertificateExtension* ret = new QSslCertificateExtension(*other); + *outptr_QSslCertificateExtension = ret; } void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other) { @@ -57,7 +59,11 @@ bool QSslCertificateExtension_IsSupported(const QSslCertificateExtension* self) return self->isSupported(); } -void QSslCertificateExtension_Delete(QSslCertificateExtension* self) { - delete self; +void QSslCertificateExtension_Delete(QSslCertificateExtension* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslcertificateextension.go b/qt6/network/gen_qsslcertificateextension.go index 05bcaa36..d223b51f 100644 --- a/qt6/network/gen_qsslcertificateextension.go +++ b/qt6/network/gen_qsslcertificateextension.go @@ -15,7 +15,8 @@ import ( ) type QSslCertificateExtension struct { - h *C.QSslCertificateExtension + h *C.QSslCertificateExtension + isSubclass bool } func (this *QSslCertificateExtension) cPointer() *C.QSslCertificateExtension { @@ -32,6 +33,7 @@ func (this *QSslCertificateExtension) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslCertificateExtension constructs the type using only CGO pointers. func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificateExtension { if h == nil { return nil @@ -39,20 +41,33 @@ func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificate return &QSslCertificateExtension{h: h} } +// UnsafeNewQSslCertificateExtension constructs the type using only unsafe pointers. func UnsafeNewQSslCertificateExtension(h unsafe.Pointer) *QSslCertificateExtension { - return newQSslCertificateExtension((*C.QSslCertificateExtension)(h)) + if h == nil { + return nil + } + + return &QSslCertificateExtension{h: (*C.QSslCertificateExtension)(h)} } // NewQSslCertificateExtension constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension() *QSslCertificateExtension { - ret := C.QSslCertificateExtension_new() - return newQSslCertificateExtension(ret) + var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil + + C.QSslCertificateExtension_new(&outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret.isSubclass = true + return ret } // NewQSslCertificateExtension2 constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension2(other *QSslCertificateExtension) *QSslCertificateExtension { - ret := C.QSslCertificateExtension_new2(other.cPointer()) - return newQSslCertificateExtension(ret) + var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil + + C.QSslCertificateExtension_new2(other.cPointer(), &outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret.isSubclass = true + return ret } func (this *QSslCertificateExtension) OperatorAssign(other *QSslCertificateExtension) { @@ -94,7 +109,7 @@ func (this *QSslCertificateExtension) IsSupported() bool { // Delete this object from C++ memory. func (this *QSslCertificateExtension) Delete() { - C.QSslCertificateExtension_Delete(this.h) + C.QSslCertificateExtension_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslcertificateextension.h b/qt6/network/gen_qsslcertificateextension.h index de3e3a68..d30b51ce 100644 --- a/qt6/network/gen_qsslcertificateextension.h +++ b/qt6/network/gen_qsslcertificateextension.h @@ -22,8 +22,8 @@ typedef struct QSslCertificateExtension QSslCertificateExtension; typedef struct QVariant QVariant; #endif -QSslCertificateExtension* QSslCertificateExtension_new(); -QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other); +void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension); +void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension); void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other); void QSslCertificateExtension_Swap(QSslCertificateExtension* self, QSslCertificateExtension* other); struct miqt_string QSslCertificateExtension_Oid(const QSslCertificateExtension* self); @@ -31,7 +31,7 @@ struct miqt_string QSslCertificateExtension_Name(const QSslCertificateExtension* QVariant* QSslCertificateExtension_Value(const QSslCertificateExtension* self); bool QSslCertificateExtension_IsCritical(const QSslCertificateExtension* self); bool QSslCertificateExtension_IsSupported(const QSslCertificateExtension* self); -void QSslCertificateExtension_Delete(QSslCertificateExtension* self); +void QSslCertificateExtension_Delete(QSslCertificateExtension* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslcipher.cpp b/qt6/network/gen_qsslcipher.cpp index 0833bd9d..302398a0 100644 --- a/qt6/network/gen_qsslcipher.cpp +++ b/qt6/network/gen_qsslcipher.cpp @@ -6,22 +6,26 @@ #include "gen_qsslcipher.h" #include "_cgo_export.h" -QSslCipher* QSslCipher_new() { - return new QSslCipher(); +void QSslCipher_new(QSslCipher** outptr_QSslCipher) { + QSslCipher* ret = new QSslCipher(); + *outptr_QSslCipher = ret; } -QSslCipher* QSslCipher_new2(struct miqt_string name) { +void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSslCipher(name_QString); + QSslCipher* ret = new QSslCipher(name_QString); + *outptr_QSslCipher = ret; } -QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol) { +void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher) { QString name_QString = QString::fromUtf8(name.data, name.len); - return new QSslCipher(name_QString, static_cast(protocol)); + QSslCipher* ret = new QSslCipher(name_QString, static_cast(protocol)); + *outptr_QSslCipher = ret; } -QSslCipher* QSslCipher_new4(QSslCipher* other) { - return new QSslCipher(*other); +void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher) { + QSslCipher* ret = new QSslCipher(*other); + *outptr_QSslCipher = ret; } void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other) { @@ -112,7 +116,11 @@ int QSslCipher_Protocol(const QSslCipher* self) { return static_cast(_ret); } -void QSslCipher_Delete(QSslCipher* self) { - delete self; +void QSslCipher_Delete(QSslCipher* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslcipher.go b/qt6/network/gen_qsslcipher.go index 2d05a799..433b60dc 100644 --- a/qt6/network/gen_qsslcipher.go +++ b/qt6/network/gen_qsslcipher.go @@ -14,7 +14,8 @@ import ( ) type QSslCipher struct { - h *C.QSslCipher + h *C.QSslCipher + isSubclass bool } func (this *QSslCipher) cPointer() *C.QSslCipher { @@ -31,6 +32,7 @@ func (this *QSslCipher) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslCipher constructs the type using only CGO pointers. func newQSslCipher(h *C.QSslCipher) *QSslCipher { if h == nil { return nil @@ -38,14 +40,23 @@ func newQSslCipher(h *C.QSslCipher) *QSslCipher { return &QSslCipher{h: h} } +// UnsafeNewQSslCipher constructs the type using only unsafe pointers. func UnsafeNewQSslCipher(h unsafe.Pointer) *QSslCipher { - return newQSslCipher((*C.QSslCipher)(h)) + if h == nil { + return nil + } + + return &QSslCipher{h: (*C.QSslCipher)(h)} } // NewQSslCipher constructs a new QSslCipher object. func NewQSslCipher() *QSslCipher { - ret := C.QSslCipher_new() - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new(&outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } // NewQSslCipher2 constructs a new QSslCipher object. @@ -54,8 +65,12 @@ func NewQSslCipher2(name string) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSslCipher_new2(name_ms) - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new2(name_ms, &outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } // NewQSslCipher3 constructs a new QSslCipher object. @@ -64,14 +79,22 @@ func NewQSslCipher3(name string, protocol QSsl__SslProtocol) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - ret := C.QSslCipher_new3(name_ms, (C.int)(protocol)) - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new3(name_ms, (C.int)(protocol), &outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } // NewQSslCipher4 constructs a new QSslCipher object. func NewQSslCipher4(other *QSslCipher) *QSslCipher { - ret := C.QSslCipher_new4(other.cPointer()) - return newQSslCipher(ret) + var outptr_QSslCipher *C.QSslCipher = nil + + C.QSslCipher_new4(other.cPointer(), &outptr_QSslCipher) + ret := newQSslCipher(outptr_QSslCipher) + ret.isSubclass = true + return ret } func (this *QSslCipher) OperatorAssign(other *QSslCipher) { @@ -143,7 +166,7 @@ func (this *QSslCipher) Protocol() QSsl__SslProtocol { // Delete this object from C++ memory. func (this *QSslCipher) Delete() { - C.QSslCipher_Delete(this.h) + C.QSslCipher_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslcipher.h b/qt6/network/gen_qsslcipher.h index ea75b25c..7ca04acc 100644 --- a/qt6/network/gen_qsslcipher.h +++ b/qt6/network/gen_qsslcipher.h @@ -20,10 +20,10 @@ class QSslCipher; typedef struct QSslCipher QSslCipher; #endif -QSslCipher* QSslCipher_new(); -QSslCipher* QSslCipher_new2(struct miqt_string name); -QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol); -QSslCipher* QSslCipher_new4(QSslCipher* other); +void QSslCipher_new(QSslCipher** outptr_QSslCipher); +void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher); +void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher); +void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher); void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other); void QSslCipher_Swap(QSslCipher* self, QSslCipher* other); bool QSslCipher_OperatorEqual(const QSslCipher* self, QSslCipher* other); @@ -37,7 +37,7 @@ struct miqt_string QSslCipher_AuthenticationMethod(const QSslCipher* self); struct miqt_string QSslCipher_EncryptionMethod(const QSslCipher* self); struct miqt_string QSslCipher_ProtocolString(const QSslCipher* self); int QSslCipher_Protocol(const QSslCipher* self); -void QSslCipher_Delete(QSslCipher* self); +void QSslCipher_Delete(QSslCipher* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslconfiguration.cpp b/qt6/network/gen_qsslconfiguration.cpp index 10698d0c..12e51a39 100644 --- a/qt6/network/gen_qsslconfiguration.cpp +++ b/qt6/network/gen_qsslconfiguration.cpp @@ -14,12 +14,14 @@ #include "gen_qsslconfiguration.h" #include "_cgo_export.h" -QSslConfiguration* QSslConfiguration_new() { - return new QSslConfiguration(); +void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration) { + QSslConfiguration* ret = new QSslConfiguration(); + *outptr_QSslConfiguration = ret; } -QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other) { - return new QSslConfiguration(*other); +void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration) { + QSslConfiguration* ret = new QSslConfiguration(*other); + *outptr_QSslConfiguration = ret; } void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other) { @@ -427,7 +429,11 @@ bool QSslConfiguration_AddCaCertificates3(QSslConfiguration* self, struct miqt_s return self->addCaCertificates(path_QString, static_cast(format), static_cast(syntax)); } -void QSslConfiguration_Delete(QSslConfiguration* self) { - delete self; +void QSslConfiguration_Delete(QSslConfiguration* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslconfiguration.go b/qt6/network/gen_qsslconfiguration.go index 628eccbe..60caa849 100644 --- a/qt6/network/gen_qsslconfiguration.go +++ b/qt6/network/gen_qsslconfiguration.go @@ -23,7 +23,8 @@ const ( ) type QSslConfiguration struct { - h *C.QSslConfiguration + h *C.QSslConfiguration + isSubclass bool } func (this *QSslConfiguration) cPointer() *C.QSslConfiguration { @@ -40,6 +41,7 @@ func (this *QSslConfiguration) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslConfiguration constructs the type using only CGO pointers. func newQSslConfiguration(h *C.QSslConfiguration) *QSslConfiguration { if h == nil { return nil @@ -47,20 +49,33 @@ func newQSslConfiguration(h *C.QSslConfiguration) *QSslConfiguration { return &QSslConfiguration{h: h} } +// UnsafeNewQSslConfiguration constructs the type using only unsafe pointers. func UnsafeNewQSslConfiguration(h unsafe.Pointer) *QSslConfiguration { - return newQSslConfiguration((*C.QSslConfiguration)(h)) + if h == nil { + return nil + } + + return &QSslConfiguration{h: (*C.QSslConfiguration)(h)} } // NewQSslConfiguration constructs a new QSslConfiguration object. func NewQSslConfiguration() *QSslConfiguration { - ret := C.QSslConfiguration_new() - return newQSslConfiguration(ret) + var outptr_QSslConfiguration *C.QSslConfiguration = nil + + C.QSslConfiguration_new(&outptr_QSslConfiguration) + ret := newQSslConfiguration(outptr_QSslConfiguration) + ret.isSubclass = true + return ret } // NewQSslConfiguration2 constructs a new QSslConfiguration object. func NewQSslConfiguration2(other *QSslConfiguration) *QSslConfiguration { - ret := C.QSslConfiguration_new2(other.cPointer()) - return newQSslConfiguration(ret) + var outptr_QSslConfiguration *C.QSslConfiguration = nil + + C.QSslConfiguration_new2(other.cPointer(), &outptr_QSslConfiguration) + ret := newQSslConfiguration(outptr_QSslConfiguration) + ret.isSubclass = true + return ret } func (this *QSslConfiguration) OperatorAssign(other *QSslConfiguration) { @@ -499,7 +514,7 @@ func (this *QSslConfiguration) AddCaCertificates3(path string, format QSsl__Enco // Delete this object from C++ memory. func (this *QSslConfiguration) Delete() { - C.QSslConfiguration_Delete(this.h) + C.QSslConfiguration_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslconfiguration.h b/qt6/network/gen_qsslconfiguration.h index 631e4973..f38fa9e7 100644 --- a/qt6/network/gen_qsslconfiguration.h +++ b/qt6/network/gen_qsslconfiguration.h @@ -34,8 +34,8 @@ typedef struct QSslKey QSslKey; typedef struct QVariant QVariant; #endif -QSslConfiguration* QSslConfiguration_new(); -QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other); +void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration); +void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration); void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other); void QSslConfiguration_Swap(QSslConfiguration* self, QSslConfiguration* other); bool QSslConfiguration_OperatorEqual(const QSslConfiguration* self, QSslConfiguration* other); @@ -100,7 +100,7 @@ struct miqt_string QSslConfiguration_NextNegotiatedProtocol(const QSslConfigurat int QSslConfiguration_NextProtocolNegotiationStatus(const QSslConfiguration* self); bool QSslConfiguration_AddCaCertificates2(QSslConfiguration* self, struct miqt_string path, int format); bool QSslConfiguration_AddCaCertificates3(QSslConfiguration* self, struct miqt_string path, int format, int syntax); -void QSslConfiguration_Delete(QSslConfiguration* self); +void QSslConfiguration_Delete(QSslConfiguration* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qssldiffiehellmanparameters.cpp b/qt6/network/gen_qssldiffiehellmanparameters.cpp index fea655af..a6e3761f 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.cpp +++ b/qt6/network/gen_qssldiffiehellmanparameters.cpp @@ -8,12 +8,14 @@ #include "gen_qssldiffiehellmanparameters.h" #include "_cgo_export.h" -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new() { - return new QSslDiffieHellmanParameters(); +void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { + QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(); + *outptr_QSslDiffieHellmanParameters = ret; } -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other) { - return new QSslDiffieHellmanParameters(*other); +void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { + QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(*other); + *outptr_QSslDiffieHellmanParameters = ret; } QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters() { @@ -70,7 +72,11 @@ QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_FromEncoded22(QIODevice return new QSslDiffieHellmanParameters(QSslDiffieHellmanParameters::fromEncoded(device, static_cast(format))); } -void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self) { - delete self; +void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qssldiffiehellmanparameters.go b/qt6/network/gen_qssldiffiehellmanparameters.go index 1ef4dd27..6710c55d 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.go +++ b/qt6/network/gen_qssldiffiehellmanparameters.go @@ -23,7 +23,8 @@ const ( ) type QSslDiffieHellmanParameters struct { - h *C.QSslDiffieHellmanParameters + h *C.QSslDiffieHellmanParameters + isSubclass bool } func (this *QSslDiffieHellmanParameters) cPointer() *C.QSslDiffieHellmanParameters { @@ -40,6 +41,7 @@ func (this *QSslDiffieHellmanParameters) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslDiffieHellmanParameters constructs the type using only CGO pointers. func newQSslDiffieHellmanParameters(h *C.QSslDiffieHellmanParameters) *QSslDiffieHellmanParameters { if h == nil { return nil @@ -47,20 +49,33 @@ func newQSslDiffieHellmanParameters(h *C.QSslDiffieHellmanParameters) *QSslDiffi return &QSslDiffieHellmanParameters{h: h} } +// UnsafeNewQSslDiffieHellmanParameters constructs the type using only unsafe pointers. func UnsafeNewQSslDiffieHellmanParameters(h unsafe.Pointer) *QSslDiffieHellmanParameters { - return newQSslDiffieHellmanParameters((*C.QSslDiffieHellmanParameters)(h)) + if h == nil { + return nil + } + + return &QSslDiffieHellmanParameters{h: (*C.QSslDiffieHellmanParameters)(h)} } // NewQSslDiffieHellmanParameters constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters() *QSslDiffieHellmanParameters { - ret := C.QSslDiffieHellmanParameters_new() - return newQSslDiffieHellmanParameters(ret) + var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil + + C.QSslDiffieHellmanParameters_new(&outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret.isSubclass = true + return ret } // NewQSslDiffieHellmanParameters2 constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters2(other *QSslDiffieHellmanParameters) *QSslDiffieHellmanParameters { - ret := C.QSslDiffieHellmanParameters_new2(other.cPointer()) - return newQSslDiffieHellmanParameters(ret) + var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil + + C.QSslDiffieHellmanParameters_new2(other.cPointer(), &outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret.isSubclass = true + return ret } func QSslDiffieHellmanParameters_DefaultParameters() *QSslDiffieHellmanParameters { @@ -133,7 +148,7 @@ func QSslDiffieHellmanParameters_FromEncoded22(device *qt6.QIODevice, format QSs // Delete this object from C++ memory. func (this *QSslDiffieHellmanParameters) Delete() { - C.QSslDiffieHellmanParameters_Delete(this.h) + C.QSslDiffieHellmanParameters_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qssldiffiehellmanparameters.h b/qt6/network/gen_qssldiffiehellmanparameters.h index 58e75ea7..9491a770 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.h +++ b/qt6/network/gen_qssldiffiehellmanparameters.h @@ -24,8 +24,8 @@ typedef struct QIODevice QIODevice; typedef struct QSslDiffieHellmanParameters QSslDiffieHellmanParameters; #endif -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new(); -QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other); +void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); +void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters(); void QSslDiffieHellmanParameters_OperatorAssign(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); void QSslDiffieHellmanParameters_Swap(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); @@ -37,7 +37,7 @@ int QSslDiffieHellmanParameters_Error(const QSslDiffieHellmanParameters* self); struct miqt_string QSslDiffieHellmanParameters_ErrorString(const QSslDiffieHellmanParameters* self); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_FromEncoded2(struct miqt_string encoded, int format); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_FromEncoded22(QIODevice* device, int format); -void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self); +void QSslDiffieHellmanParameters_Delete(QSslDiffieHellmanParameters* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslellipticcurve.cpp b/qt6/network/gen_qsslellipticcurve.cpp index 1c1bd626..ba03eb46 100644 --- a/qt6/network/gen_qsslellipticcurve.cpp +++ b/qt6/network/gen_qsslellipticcurve.cpp @@ -6,12 +6,14 @@ #include "gen_qsslellipticcurve.h" #include "_cgo_export.h" -QSslEllipticCurve* QSslEllipticCurve_new() { - return new QSslEllipticCurve(); +void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve) { + QSslEllipticCurve* ret = new QSslEllipticCurve(); + *outptr_QSslEllipticCurve = ret; } -QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1) { - return new QSslEllipticCurve(*param1); +void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve) { + QSslEllipticCurve* ret = new QSslEllipticCurve(*param1); + *outptr_QSslEllipticCurve = ret; } QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name) { @@ -54,7 +56,11 @@ bool QSslEllipticCurve_IsTlsNamedCurve(const QSslEllipticCurve* self) { return self->isTlsNamedCurve(); } -void QSslEllipticCurve_Delete(QSslEllipticCurve* self) { - delete self; +void QSslEllipticCurve_Delete(QSslEllipticCurve* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslellipticcurve.go b/qt6/network/gen_qsslellipticcurve.go index 939a990e..99e0bdfc 100644 --- a/qt6/network/gen_qsslellipticcurve.go +++ b/qt6/network/gen_qsslellipticcurve.go @@ -14,7 +14,8 @@ import ( ) type QSslEllipticCurve struct { - h *C.QSslEllipticCurve + h *C.QSslEllipticCurve + isSubclass bool } func (this *QSslEllipticCurve) cPointer() *C.QSslEllipticCurve { @@ -31,6 +32,7 @@ func (this *QSslEllipticCurve) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslEllipticCurve constructs the type using only CGO pointers. func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve { if h == nil { return nil @@ -38,20 +40,33 @@ func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve { return &QSslEllipticCurve{h: h} } +// UnsafeNewQSslEllipticCurve constructs the type using only unsafe pointers. func UnsafeNewQSslEllipticCurve(h unsafe.Pointer) *QSslEllipticCurve { - return newQSslEllipticCurve((*C.QSslEllipticCurve)(h)) + if h == nil { + return nil + } + + return &QSslEllipticCurve{h: (*C.QSslEllipticCurve)(h)} } // NewQSslEllipticCurve constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve() *QSslEllipticCurve { - ret := C.QSslEllipticCurve_new() - return newQSslEllipticCurve(ret) + var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil + + C.QSslEllipticCurve_new(&outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret.isSubclass = true + return ret } // NewQSslEllipticCurve2 constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve2(param1 *QSslEllipticCurve) *QSslEllipticCurve { - ret := C.QSslEllipticCurve_new2(param1.cPointer()) - return newQSslEllipticCurve(ret) + var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil + + C.QSslEllipticCurve_new2(param1.cPointer(), &outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret.isSubclass = true + return ret } func QSslEllipticCurve_FromShortName(name string) *QSslEllipticCurve { @@ -100,7 +115,7 @@ func (this *QSslEllipticCurve) IsTlsNamedCurve() bool { // Delete this object from C++ memory. func (this *QSslEllipticCurve) Delete() { - C.QSslEllipticCurve_Delete(this.h) + C.QSslEllipticCurve_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslellipticcurve.h b/qt6/network/gen_qsslellipticcurve.h index 47ab7162..242295c4 100644 --- a/qt6/network/gen_qsslellipticcurve.h +++ b/qt6/network/gen_qsslellipticcurve.h @@ -20,15 +20,15 @@ class QSslEllipticCurve; typedef struct QSslEllipticCurve QSslEllipticCurve; #endif -QSslEllipticCurve* QSslEllipticCurve_new(); -QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1); +void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve); +void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve); QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name); QSslEllipticCurve* QSslEllipticCurve_FromLongName(struct miqt_string name); struct miqt_string QSslEllipticCurve_ShortName(const QSslEllipticCurve* self); struct miqt_string QSslEllipticCurve_LongName(const QSslEllipticCurve* self); bool QSslEllipticCurve_IsValid(const QSslEllipticCurve* self); bool QSslEllipticCurve_IsTlsNamedCurve(const QSslEllipticCurve* self); -void QSslEllipticCurve_Delete(QSslEllipticCurve* self); +void QSslEllipticCurve_Delete(QSslEllipticCurve* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslerror.cpp b/qt6/network/gen_qsslerror.cpp index 05d531fe..eefa2eff 100644 --- a/qt6/network/gen_qsslerror.cpp +++ b/qt6/network/gen_qsslerror.cpp @@ -7,20 +7,24 @@ #include "gen_qsslerror.h" #include "_cgo_export.h" -QSslError* QSslError_new() { - return new QSslError(); +void QSslError_new(QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(); + *outptr_QSslError = ret; } -QSslError* QSslError_new2(int error) { - return new QSslError(static_cast(error)); +void QSslError_new2(int error, QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(static_cast(error)); + *outptr_QSslError = ret; } -QSslError* QSslError_new3(int error, QSslCertificate* certificate) { - return new QSslError(static_cast(error), *certificate); +void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(static_cast(error), *certificate); + *outptr_QSslError = ret; } -QSslError* QSslError_new4(QSslError* other) { - return new QSslError(*other); +void QSslError_new4(QSslError* other, QSslError** outptr_QSslError) { + QSslError* ret = new QSslError(*other); + *outptr_QSslError = ret; } void QSslError_Swap(QSslError* self, QSslError* other) { @@ -59,7 +63,11 @@ QSslCertificate* QSslError_Certificate(const QSslError* self) { return new QSslCertificate(self->certificate()); } -void QSslError_Delete(QSslError* self) { - delete self; +void QSslError_Delete(QSslError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslerror.go b/qt6/network/gen_qsslerror.go index 69ba5cff..fe237ef2 100644 --- a/qt6/network/gen_qsslerror.go +++ b/qt6/network/gen_qsslerror.go @@ -57,7 +57,8 @@ const ( ) type QSslError struct { - h *C.QSslError + h *C.QSslError + isSubclass bool } func (this *QSslError) cPointer() *C.QSslError { @@ -74,6 +75,7 @@ func (this *QSslError) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslError constructs the type using only CGO pointers. func newQSslError(h *C.QSslError) *QSslError { if h == nil { return nil @@ -81,32 +83,53 @@ func newQSslError(h *C.QSslError) *QSslError { return &QSslError{h: h} } +// UnsafeNewQSslError constructs the type using only unsafe pointers. func UnsafeNewQSslError(h unsafe.Pointer) *QSslError { - return newQSslError((*C.QSslError)(h)) + if h == nil { + return nil + } + + return &QSslError{h: (*C.QSslError)(h)} } // NewQSslError constructs a new QSslError object. func NewQSslError() *QSslError { - ret := C.QSslError_new() - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new(&outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } // NewQSslError2 constructs a new QSslError object. func NewQSslError2(error QSslError__SslError) *QSslError { - ret := C.QSslError_new2((C.int)(error)) - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new2((C.int)(error), &outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } // NewQSslError3 constructs a new QSslError object. func NewQSslError3(error QSslError__SslError, certificate *QSslCertificate) *QSslError { - ret := C.QSslError_new3((C.int)(error), certificate.cPointer()) - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new3((C.int)(error), certificate.cPointer(), &outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } // NewQSslError4 constructs a new QSslError object. func NewQSslError4(other *QSslError) *QSslError { - ret := C.QSslError_new4(other.cPointer()) - return newQSslError(ret) + var outptr_QSslError *C.QSslError = nil + + C.QSslError_new4(other.cPointer(), &outptr_QSslError) + ret := newQSslError(outptr_QSslError) + ret.isSubclass = true + return ret } func (this *QSslError) Swap(other *QSslError) { @@ -145,7 +168,7 @@ func (this *QSslError) Certificate() *QSslCertificate { // Delete this object from C++ memory. func (this *QSslError) Delete() { - C.QSslError_Delete(this.h) + C.QSslError_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslerror.h b/qt6/network/gen_qsslerror.h index c407ce44..0effd4f1 100644 --- a/qt6/network/gen_qsslerror.h +++ b/qt6/network/gen_qsslerror.h @@ -22,10 +22,10 @@ typedef struct QSslCertificate QSslCertificate; typedef struct QSslError QSslError; #endif -QSslError* QSslError_new(); -QSslError* QSslError_new2(int error); -QSslError* QSslError_new3(int error, QSslCertificate* certificate); -QSslError* QSslError_new4(QSslError* other); +void QSslError_new(QSslError** outptr_QSslError); +void QSslError_new2(int error, QSslError** outptr_QSslError); +void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError); +void QSslError_new4(QSslError* other, QSslError** outptr_QSslError); void QSslError_Swap(QSslError* self, QSslError* other); void QSslError_OperatorAssign(QSslError* self, QSslError* other); bool QSslError_OperatorEqual(const QSslError* self, QSslError* other); @@ -33,7 +33,7 @@ bool QSslError_OperatorNotEqual(const QSslError* self, QSslError* other); int QSslError_Error(const QSslError* self); struct miqt_string QSslError_ErrorString(const QSslError* self); QSslCertificate* QSslError_Certificate(const QSslError* self); -void QSslError_Delete(QSslError* self); +void QSslError_Delete(QSslError* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslkey.cpp b/qt6/network/gen_qsslkey.cpp index 0f5bcdca..a68718f6 100644 --- a/qt6/network/gen_qsslkey.cpp +++ b/qt6/network/gen_qsslkey.cpp @@ -5,58 +5,70 @@ #include "gen_qsslkey.h" #include "_cgo_export.h" -QSslKey* QSslKey_new() { - return new QSslKey(); +void QSslKey_new(QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm) { +void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm)); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new3(QIODevice* device, int algorithm) { - return new QSslKey(device, static_cast(algorithm)); +void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(device, static_cast(algorithm)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new4(void* handle) { - return new QSslKey(handle); +void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(handle); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new5(QSslKey* other) { - return new QSslKey(*other); +void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(*other); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format) { +void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal) { +void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { +void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { QByteArray encoded_QByteArray(encoded.data, encoded.len); QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format) { - return new QSslKey(device, static_cast(algorithm), static_cast(format)); +void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal) { - return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); +void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { +void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); + *outptr_QSslKey = ret; } -QSslKey* QSslKey_new12(void* handle, int typeVal) { - return new QSslKey(handle, static_cast(typeVal)); +void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey) { + QSslKey* ret = new QSslKey(handle, static_cast(typeVal)); + *outptr_QSslKey = ret; } void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other) { @@ -140,7 +152,11 @@ struct miqt_string QSslKey_ToDer1(const QSslKey* self, struct miqt_string passPh return _ms; } -void QSslKey_Delete(QSslKey* self) { - delete self; +void QSslKey_Delete(QSslKey* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslkey.go b/qt6/network/gen_qsslkey.go index 96b45ed8..7039034d 100644 --- a/qt6/network/gen_qsslkey.go +++ b/qt6/network/gen_qsslkey.go @@ -15,7 +15,8 @@ import ( ) type QSslKey struct { - h *C.QSslKey + h *C.QSslKey + isSubclass bool } func (this *QSslKey) cPointer() *C.QSslKey { @@ -32,6 +33,7 @@ func (this *QSslKey) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslKey constructs the type using only CGO pointers. func newQSslKey(h *C.QSslKey) *QSslKey { if h == nil { return nil @@ -39,14 +41,23 @@ func newQSslKey(h *C.QSslKey) *QSslKey { return &QSslKey{h: h} } +// UnsafeNewQSslKey constructs the type using only unsafe pointers. func UnsafeNewQSslKey(h unsafe.Pointer) *QSslKey { - return newQSslKey((*C.QSslKey)(h)) + if h == nil { + return nil + } + + return &QSslKey{h: (*C.QSslKey)(h)} } // NewQSslKey constructs a new QSslKey object. func NewQSslKey() *QSslKey { - ret := C.QSslKey_new() - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new(&outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey2 constructs a new QSslKey object. @@ -54,26 +65,42 @@ func NewQSslKey2(encoded []byte, algorithm QSsl__KeyAlgorithm) *QSslKey { encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - ret := C.QSslKey_new2(encoded_alias, (C.int)(algorithm)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new2(encoded_alias, (C.int)(algorithm), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey3 constructs a new QSslKey object. func NewQSslKey3(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm) *QSslKey { - ret := C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey4 constructs a new QSslKey object. func NewQSslKey4(handle unsafe.Pointer) *QSslKey { - ret := C.QSslKey_new4(handle) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new4(handle, &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey5 constructs a new QSslKey object. func NewQSslKey5(other *QSslKey) *QSslKey { - ret := C.QSslKey_new5(other.cPointer()) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new5(other.cPointer(), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey6 constructs a new QSslKey object. @@ -81,8 +108,12 @@ func NewQSslKey6(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - ret := C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey7 constructs a new QSslKey object. @@ -90,8 +121,12 @@ func NewQSslKey7(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - ret := C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey8 constructs a new QSslKey object. @@ -102,20 +137,32 @@ func NewQSslKey8(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - ret := C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey9 constructs a new QSslKey object. func NewQSslKey9(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat) *QSslKey { - ret := C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey10 constructs a new QSslKey object. func NewQSslKey10(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat, typeVal QSsl__KeyType) *QSslKey { - ret := C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey11 constructs a new QSslKey object. @@ -123,14 +170,22 @@ func NewQSslKey11(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm, format QS passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - ret := C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } // NewQSslKey12 constructs a new QSslKey object. func NewQSslKey12(handle unsafe.Pointer, typeVal QSsl__KeyType) *QSslKey { - ret := C.QSslKey_new12(handle, (C.int)(typeVal)) - return newQSslKey(ret) + var outptr_QSslKey *C.QSslKey = nil + + C.QSslKey_new12(handle, (C.int)(typeVal), &outptr_QSslKey) + ret := newQSslKey(outptr_QSslKey) + ret.isSubclass = true + return ret } func (this *QSslKey) OperatorAssign(other *QSslKey) { @@ -209,7 +264,7 @@ func (this *QSslKey) ToDer1(passPhrase []byte) []byte { // Delete this object from C++ memory. func (this *QSslKey) Delete() { - C.QSslKey_Delete(this.h) + C.QSslKey_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslkey.h b/qt6/network/gen_qsslkey.h index a8b1fb8c..1302d2b0 100644 --- a/qt6/network/gen_qsslkey.h +++ b/qt6/network/gen_qsslkey.h @@ -24,18 +24,18 @@ typedef struct QIODevice QIODevice; typedef struct QSslKey QSslKey; #endif -QSslKey* QSslKey_new(); -QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm); -QSslKey* QSslKey_new3(QIODevice* device, int algorithm); -QSslKey* QSslKey_new4(void* handle); -QSslKey* QSslKey_new5(QSslKey* other); -QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format); -QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal); -QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase); -QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format); -QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal); -QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase); -QSslKey* QSslKey_new12(void* handle, int typeVal); +void QSslKey_new(QSslKey** outptr_QSslKey); +void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey); +void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey); +void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey); +void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey); +void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey); +void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); +void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); +void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey); +void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); +void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); +void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey); void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other); void QSslKey_Swap(QSslKey* self, QSslKey* other); bool QSslKey_IsNull(const QSslKey* self); @@ -50,7 +50,7 @@ bool QSslKey_OperatorEqual(const QSslKey* self, QSslKey* key); bool QSslKey_OperatorNotEqual(const QSslKey* self, QSslKey* key); struct miqt_string QSslKey_ToPem1(const QSslKey* self, struct miqt_string passPhrase); struct miqt_string QSslKey_ToDer1(const QSslKey* self, struct miqt_string passPhrase); -void QSslKey_Delete(QSslKey* self); +void QSslKey_Delete(QSslKey* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.cpp b/qt6/network/gen_qsslpresharedkeyauthenticator.cpp index 7a60ec68..b54b3773 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.cpp +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.cpp @@ -4,12 +4,14 @@ #include "gen_qsslpresharedkeyauthenticator.h" #include "_cgo_export.h" -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new() { - return new QSslPreSharedKeyAuthenticator(); +void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { + QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(); + *outptr_QSslPreSharedKeyAuthenticator = ret; } -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator) { - return new QSslPreSharedKeyAuthenticator(*authenticator); +void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { + QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(*authenticator); + *outptr_QSslPreSharedKeyAuthenticator = ret; } void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator) { @@ -65,7 +67,11 @@ int QSslPreSharedKeyAuthenticator_MaximumPreSharedKeyLength(const QSslPreSharedK return self->maximumPreSharedKeyLength(); } -void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self) { - delete self; +void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.go b/qt6/network/gen_qsslpresharedkeyauthenticator.go index 8d263cab..1f542514 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.go +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.go @@ -14,7 +14,8 @@ import ( ) type QSslPreSharedKeyAuthenticator struct { - h *C.QSslPreSharedKeyAuthenticator + h *C.QSslPreSharedKeyAuthenticator + isSubclass bool } func (this *QSslPreSharedKeyAuthenticator) cPointer() *C.QSslPreSharedKeyAuthenticator { @@ -31,6 +32,7 @@ func (this *QSslPreSharedKeyAuthenticator) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQSslPreSharedKeyAuthenticator constructs the type using only CGO pointers. func newQSslPreSharedKeyAuthenticator(h *C.QSslPreSharedKeyAuthenticator) *QSslPreSharedKeyAuthenticator { if h == nil { return nil @@ -38,20 +40,33 @@ func newQSslPreSharedKeyAuthenticator(h *C.QSslPreSharedKeyAuthenticator) *QSslP return &QSslPreSharedKeyAuthenticator{h: h} } +// UnsafeNewQSslPreSharedKeyAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQSslPreSharedKeyAuthenticator(h unsafe.Pointer) *QSslPreSharedKeyAuthenticator { - return newQSslPreSharedKeyAuthenticator((*C.QSslPreSharedKeyAuthenticator)(h)) + if h == nil { + return nil + } + + return &QSslPreSharedKeyAuthenticator{h: (*C.QSslPreSharedKeyAuthenticator)(h)} } // NewQSslPreSharedKeyAuthenticator constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator() *QSslPreSharedKeyAuthenticator { - ret := C.QSslPreSharedKeyAuthenticator_new() - return newQSslPreSharedKeyAuthenticator(ret) + var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil + + C.QSslPreSharedKeyAuthenticator_new(&outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret.isSubclass = true + return ret } // NewQSslPreSharedKeyAuthenticator2 constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator2(authenticator *QSslPreSharedKeyAuthenticator) *QSslPreSharedKeyAuthenticator { - ret := C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer()) - return newQSslPreSharedKeyAuthenticator(ret) + var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil + + C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer(), &outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret.isSubclass = true + return ret } func (this *QSslPreSharedKeyAuthenticator) OperatorAssign(authenticator *QSslPreSharedKeyAuthenticator) { @@ -107,7 +122,7 @@ func (this *QSslPreSharedKeyAuthenticator) MaximumPreSharedKeyLength() int { // Delete this object from C++ memory. func (this *QSslPreSharedKeyAuthenticator) Delete() { - C.QSslPreSharedKeyAuthenticator_Delete(this.h) + C.QSslPreSharedKeyAuthenticator_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.h b/qt6/network/gen_qsslpresharedkeyauthenticator.h index b48b7a14..3d1d495c 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.h +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.h @@ -22,8 +22,8 @@ typedef struct QByteArray QByteArray; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; #endif -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new(); -QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator); +void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); +void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator); void QSslPreSharedKeyAuthenticator_Swap(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* other); struct miqt_string QSslPreSharedKeyAuthenticator_IdentityHint(const QSslPreSharedKeyAuthenticator* self); @@ -33,7 +33,7 @@ int QSslPreSharedKeyAuthenticator_MaximumIdentityLength(const QSslPreSharedKeyAu void QSslPreSharedKeyAuthenticator_SetPreSharedKey(QSslPreSharedKeyAuthenticator* self, struct miqt_string preSharedKey); struct miqt_string QSslPreSharedKeyAuthenticator_PreSharedKey(const QSslPreSharedKeyAuthenticator* self); int QSslPreSharedKeyAuthenticator_MaximumPreSharedKeyLength(const QSslPreSharedKeyAuthenticator* self); -void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self); +void QSslPreSharedKeyAuthenticator_Delete(QSslPreSharedKeyAuthenticator* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslserver.cpp b/qt6/network/gen_qsslserver.cpp index d30e23b8..a1afbf7a 100644 --- a/qt6/network/gen_qsslserver.cpp +++ b/qt6/network/gen_qsslserver.cpp @@ -9,16 +9,103 @@ #include #include #include +#include +#include #include #include "gen_qsslserver.h" #include "_cgo_export.h" -QSslServer* QSslServer_new() { - return new QSslServer(); +class MiqtVirtualQSslServer : public virtual QSslServer { +public: + + MiqtVirtualQSslServer(): QSslServer() {}; + MiqtVirtualQSslServer(QObject* parent): QSslServer(parent) {}; + + virtual ~MiqtVirtualQSslServer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__IncomingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual void incomingConnection(qintptr socket) override { + if (handle__IncomingConnection == 0) { + QSslServer::incomingConnection(socket); + return; + } + + qintptr socket_ret = socket; + intptr_t sigval1 = static_cast(socket_ret); + + miqt_exec_callback_QSslServer_IncomingConnection(this, handle__IncomingConnection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_IncomingConnection(intptr_t socket) { + + QSslServer::incomingConnection((qintptr)(socket)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingConnections = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingConnections() const override { + if (handle__HasPendingConnections == 0) { + return QSslServer::hasPendingConnections(); + } + + + bool callback_return_value = miqt_exec_callback_QSslServer_HasPendingConnections(const_cast(this), handle__HasPendingConnections); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasPendingConnections() const { + + return QSslServer::hasPendingConnections(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextPendingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual QTcpSocket* nextPendingConnection() override { + if (handle__NextPendingConnection == 0) { + return QSslServer::nextPendingConnection(); + } + + + QTcpSocket* callback_return_value = miqt_exec_callback_QSslServer_NextPendingConnection(this, handle__NextPendingConnection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTcpSocket* virtualbase_NextPendingConnection() { + + return QSslServer::nextPendingConnection(); + + } + +}; + +void QSslServer_new(QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQSslServer* ret = new MiqtVirtualQSslServer(); + *outptr_QSslServer = ret; + *outptr_QTcpServer = static_cast(ret); + *outptr_QObject = static_cast(ret); } -QSslServer* QSslServer_new2(QObject* parent) { - return new QSslServer(parent); +void QSslServer_new2(QObject* parent, QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQSslServer* ret = new MiqtVirtualQSslServer(parent); + *outptr_QSslServer = ret; + *outptr_QTcpServer = static_cast(ret); + *outptr_QObject = static_cast(ret); } QMetaObject* QSslServer_MetaObject(const QSslServer* self) { @@ -67,7 +154,7 @@ void QSslServer_SslErrors(QSslServer* self, QSslSocket* socket, struct miqt_arra } void QSslServer_connect_SslErrors(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast&)>(&QSslServer::sslErrors), self, [=](QSslSocket* socket, const QList& errors) { + MiqtVirtualQSslServer::connect(self, static_cast&)>(&QSslServer::sslErrors), self, [=](QSslSocket* socket, const QList& errors) { QSslSocket* sigval1 = socket; const QList& errors_ret = errors; // Convert QList<> from C++ memory to manually-managed C memory @@ -88,7 +175,7 @@ void QSslServer_PeerVerifyError(QSslServer* self, QSslSocket* socket, QSslError* } void QSslServer_connect_PeerVerifyError(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::peerVerifyError), self, [=](QSslSocket* socket, const QSslError& error) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::peerVerifyError), self, [=](QSslSocket* socket, const QSslError& error) { QSslSocket* sigval1 = socket; const QSslError& error_ret = error; // Cast returned reference into pointer @@ -102,7 +189,7 @@ void QSslServer_ErrorOccurred(QSslServer* self, QSslSocket* socket, int error) { } void QSslServer_connect_ErrorOccurred(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::errorOccurred), self, [=](QSslSocket* socket, QAbstractSocket::SocketError error) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::errorOccurred), self, [=](QSslSocket* socket, QAbstractSocket::SocketError error) { QSslSocket* sigval1 = socket; QAbstractSocket::SocketError error_ret = error; int sigval2 = static_cast(error_ret); @@ -115,7 +202,7 @@ void QSslServer_PreSharedKeyAuthenticationRequired(QSslServer* self, QSslSocket* } void QSslServer_connect_PreSharedKeyAuthenticationRequired(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::preSharedKeyAuthenticationRequired), self, [=](QSslSocket* socket, QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::preSharedKeyAuthenticationRequired), self, [=](QSslSocket* socket, QSslPreSharedKeyAuthenticator* authenticator) { QSslSocket* sigval1 = socket; QSslPreSharedKeyAuthenticator* sigval2 = authenticator; miqt_exec_callback_QSslServer_PreSharedKeyAuthenticationRequired(slot, sigval1, sigval2); @@ -128,7 +215,7 @@ void QSslServer_AlertSent(QSslServer* self, QSslSocket* socket, int level, int t } void QSslServer_connect_AlertSent(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::alertSent), self, [=](QSslSocket* socket, QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::alertSent), self, [=](QSslSocket* socket, QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { QSslSocket* sigval1 = socket; QSsl::AlertLevel level_ret = level; int sigval2 = static_cast(level_ret); @@ -152,7 +239,7 @@ void QSslServer_AlertReceived(QSslServer* self, QSslSocket* socket, int level, i } void QSslServer_connect_AlertReceived(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::alertReceived), self, [=](QSslSocket* socket, QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::alertReceived), self, [=](QSslSocket* socket, QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { QSslSocket* sigval1 = socket; QSsl::AlertLevel level_ret = level; int sigval2 = static_cast(level_ret); @@ -175,7 +262,7 @@ void QSslServer_HandshakeInterruptedOnError(QSslServer* self, QSslSocket* socket } void QSslServer_connect_HandshakeInterruptedOnError(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::handshakeInterruptedOnError), self, [=](QSslSocket* socket, const QSslError& error) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::handshakeInterruptedOnError), self, [=](QSslSocket* socket, const QSslError& error) { QSslSocket* sigval1 = socket; const QSslError& error_ret = error; // Cast returned reference into pointer @@ -189,7 +276,7 @@ void QSslServer_StartedEncryptionHandshake(QSslServer* self, QSslSocket* socket) } void QSslServer_connect_StartedEncryptionHandshake(QSslServer* self, intptr_t slot) { - QSslServer::connect(self, static_cast(&QSslServer::startedEncryptionHandshake), self, [=](QSslSocket* socket) { + MiqtVirtualQSslServer::connect(self, static_cast(&QSslServer::startedEncryptionHandshake), self, [=](QSslSocket* socket) { QSslSocket* sigval1 = socket; miqt_exec_callback_QSslServer_StartedEncryptionHandshake(slot, sigval1); }); @@ -217,7 +304,35 @@ struct miqt_string QSslServer_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSslServer_Delete(QSslServer* self) { - delete self; +void QSslServer_override_virtual_IncomingConnection(void* self, intptr_t slot) { + dynamic_cast( (QSslServer*)(self) )->handle__IncomingConnection = slot; +} + +void QSslServer_virtualbase_IncomingConnection(void* self, intptr_t socket) { + ( (MiqtVirtualQSslServer*)(self) )->virtualbase_IncomingConnection(socket); +} + +void QSslServer_override_virtual_HasPendingConnections(void* self, intptr_t slot) { + dynamic_cast( (QSslServer*)(self) )->handle__HasPendingConnections = slot; +} + +bool QSslServer_virtualbase_HasPendingConnections(const void* self) { + return ( (const MiqtVirtualQSslServer*)(self) )->virtualbase_HasPendingConnections(); +} + +void QSslServer_override_virtual_NextPendingConnection(void* self, intptr_t slot) { + dynamic_cast( (QSslServer*)(self) )->handle__NextPendingConnection = slot; +} + +QTcpSocket* QSslServer_virtualbase_NextPendingConnection(void* self) { + return ( (MiqtVirtualQSslServer*)(self) )->virtualbase_NextPendingConnection(); +} + +void QSslServer_Delete(QSslServer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslserver.go b/qt6/network/gen_qsslserver.go index 0e63091c..14e4cad4 100644 --- a/qt6/network/gen_qsslserver.go +++ b/qt6/network/gen_qsslserver.go @@ -16,7 +16,8 @@ import ( ) type QSslServer struct { - h *C.QSslServer + h *C.QSslServer + isSubclass bool *QTcpServer } @@ -34,27 +35,47 @@ func (this *QSslServer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSslServer(h *C.QSslServer) *QSslServer { +// newQSslServer constructs the type using only CGO pointers. +func newQSslServer(h *C.QSslServer, h_QTcpServer *C.QTcpServer, h_QObject *C.QObject) *QSslServer { if h == nil { return nil } - return &QSslServer{h: h, QTcpServer: UnsafeNewQTcpServer(unsafe.Pointer(h))} + return &QSslServer{h: h, + QTcpServer: newQTcpServer(h_QTcpServer, h_QObject)} } -func UnsafeNewQSslServer(h unsafe.Pointer) *QSslServer { - return newQSslServer((*C.QSslServer)(h)) +// UnsafeNewQSslServer constructs the type using only unsafe pointers. +func UnsafeNewQSslServer(h unsafe.Pointer, h_QTcpServer unsafe.Pointer, h_QObject unsafe.Pointer) *QSslServer { + if h == nil { + return nil + } + + return &QSslServer{h: (*C.QSslServer)(h), + QTcpServer: UnsafeNewQTcpServer(h_QTcpServer, h_QObject)} } // NewQSslServer constructs a new QSslServer object. func NewQSslServer() *QSslServer { - ret := C.QSslServer_new() - return newQSslServer(ret) + var outptr_QSslServer *C.QSslServer = nil + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QSslServer_new(&outptr_QSslServer, &outptr_QTcpServer, &outptr_QObject) + ret := newQSslServer(outptr_QSslServer, outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQSslServer2 constructs a new QSslServer object. func NewQSslServer2(parent *qt6.QObject) *QSslServer { - ret := C.QSslServer_new2((*C.QObject)(parent.UnsafePointer())) - return newQSslServer(ret) + var outptr_QSslServer *C.QSslServer = nil + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QSslServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSslServer, &outptr_QTcpServer, &outptr_QObject) + ret := newQSslServer(outptr_QSslServer, outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSslServer) MetaObject() *qt6.QMetaObject { @@ -116,7 +137,7 @@ func miqt_exec_callback_QSslServer_SslErrors(cb C.intptr_t, socket *C.QSslSocket } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) var errors_ma C.struct_miqt_array = errors errors_ret := make([]QSslError, int(errors_ma.len)) errors_outCast := (*[0xffff]*C.QSslError)(unsafe.Pointer(errors_ma.data)) // hey ya @@ -146,7 +167,7 @@ func miqt_exec_callback_QSslServer_PeerVerifyError(cb C.intptr_t, socket *C.QSsl } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) slotval2 := UnsafeNewQSslError(unsafe.Pointer(error)) gofunc(slotval1, slotval2) @@ -167,7 +188,7 @@ func miqt_exec_callback_QSslServer_ErrorOccurred(cb C.intptr_t, socket *C.QSslSo } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) slotval2 := (QAbstractSocket__SocketError)(error) gofunc(slotval1, slotval2) @@ -188,7 +209,7 @@ func miqt_exec_callback_QSslServer_PreSharedKeyAuthenticationRequired(cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) slotval2 := UnsafeNewQSslPreSharedKeyAuthenticator(unsafe.Pointer(authenticator)) gofunc(slotval1, slotval2) @@ -213,7 +234,7 @@ func miqt_exec_callback_QSslServer_AlertSent(cb C.intptr_t, socket *C.QSslSocket } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) slotval2 := (QSsl__AlertLevel)(level) slotval3 := (QSsl__AlertType)(typeVal) @@ -245,7 +266,7 @@ func miqt_exec_callback_QSslServer_AlertReceived(cb C.intptr_t, socket *C.QSslSo } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) slotval2 := (QSsl__AlertLevel)(level) slotval3 := (QSsl__AlertType)(typeVal) @@ -273,7 +294,7 @@ func miqt_exec_callback_QSslServer_HandshakeInterruptedOnError(cb C.intptr_t, so } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) slotval2 := UnsafeNewQSslError(unsafe.Pointer(error)) gofunc(slotval1, slotval2) @@ -294,7 +315,7 @@ func miqt_exec_callback_QSslServer_StartedEncryptionHandshake(cb C.intptr_t, soc } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket)) + slotval1 := UnsafeNewQSslSocket(unsafe.Pointer(socket), nil, nil, nil, nil, nil) gofunc(slotval1) } @@ -321,9 +342,75 @@ func QSslServer_Tr3(s string, c string, n int) string { return _ret } +func (this *QSslServer) callVirtualBase_IncomingConnection(socket uintptr) { + + C.QSslServer_virtualbase_IncomingConnection(unsafe.Pointer(this.h), (C.intptr_t)(socket)) + +} +func (this *QSslServer) OnIncomingConnection(slot func(super func(socket uintptr), socket uintptr)) { + C.QSslServer_override_virtual_IncomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslServer_IncomingConnection +func miqt_exec_callback_QSslServer_IncomingConnection(self *C.QSslServer, cb C.intptr_t, socket C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socket uintptr), socket uintptr)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socket) + + gofunc((&QSslServer{h: self}).callVirtualBase_IncomingConnection, slotval1) + +} + +func (this *QSslServer) callVirtualBase_HasPendingConnections() bool { + + return (bool)(C.QSslServer_virtualbase_HasPendingConnections(unsafe.Pointer(this.h))) + +} +func (this *QSslServer) OnHasPendingConnections(slot func(super func() bool) bool) { + C.QSslServer_override_virtual_HasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslServer_HasPendingConnections +func miqt_exec_callback_QSslServer_HasPendingConnections(self *C.QSslServer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslServer{h: self}).callVirtualBase_HasPendingConnections) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslServer) callVirtualBase_NextPendingConnection() *QTcpSocket { + + return UnsafeNewQTcpSocket(unsafe.Pointer(C.QSslServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QSslServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { + C.QSslServer_override_virtual_NextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslServer_NextPendingConnection +func miqt_exec_callback_QSslServer_NextPendingConnection(self *C.QSslServer, cb C.intptr_t) *C.QTcpSocket { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTcpSocket) *QTcpSocket) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslServer{h: self}).callVirtualBase_NextPendingConnection) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QSslServer) Delete() { - C.QSslServer_Delete(this.h) + C.QSslServer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslserver.h b/qt6/network/gen_qsslserver.h index 5393ddc8..2c35a60b 100644 --- a/qt6/network/gen_qsslserver.h +++ b/qt6/network/gen_qsslserver.h @@ -22,6 +22,8 @@ class QSslError; class QSslPreSharedKeyAuthenticator; class QSslServer; class QSslSocket; +class QTcpServer; +class QTcpSocket; #else typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; @@ -30,10 +32,12 @@ typedef struct QSslError QSslError; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; typedef struct QSslServer QSslServer; typedef struct QSslSocket QSslSocket; +typedef struct QTcpServer QTcpServer; +typedef struct QTcpSocket QTcpSocket; #endif -QSslServer* QSslServer_new(); -QSslServer* QSslServer_new2(QObject* parent); +void QSslServer_new(QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +void QSslServer_new2(QObject* parent, QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); QMetaObject* QSslServer_MetaObject(const QSslServer* self); void* QSslServer_Metacast(QSslServer* self, const char* param1); struct miqt_string QSslServer_Tr(const char* s); @@ -57,9 +61,16 @@ void QSslServer_HandshakeInterruptedOnError(QSslServer* self, QSslSocket* socket void QSslServer_connect_HandshakeInterruptedOnError(QSslServer* self, intptr_t slot); void QSslServer_StartedEncryptionHandshake(QSslServer* self, QSslSocket* socket); void QSslServer_connect_StartedEncryptionHandshake(QSslServer* self, intptr_t slot); +void QSslServer_IncomingConnection(QSslServer* self, intptr_t socket); struct miqt_string QSslServer_Tr2(const char* s, const char* c); struct miqt_string QSslServer_Tr3(const char* s, const char* c, int n); -void QSslServer_Delete(QSslServer* self); +void QSslServer_override_virtual_IncomingConnection(void* self, intptr_t slot); +void QSslServer_virtualbase_IncomingConnection(void* self, intptr_t socket); +void QSslServer_override_virtual_HasPendingConnections(void* self, intptr_t slot); +bool QSslServer_virtualbase_HasPendingConnections(const void* self); +void QSslServer_override_virtual_NextPendingConnection(void* self, intptr_t slot); +QTcpSocket* QSslServer_virtualbase_NextPendingConnection(void* self); +void QSslServer_Delete(QSslServer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qsslsocket.cpp b/qt6/network/gen_qsslsocket.cpp index 4de76013..6832ff46 100644 --- a/qt6/network/gen_qsslsocket.cpp +++ b/qt6/network/gen_qsslsocket.cpp @@ -1,4 +1,7 @@ +#include #include +#include +#include #include #include #include @@ -13,17 +16,511 @@ #include #include #include +#include #include #include #include "gen_qsslsocket.h" #include "_cgo_export.h" -QSslSocket* QSslSocket_new() { - return new QSslSocket(); +class MiqtVirtualQSslSocket : public virtual QSslSocket { +public: + + MiqtVirtualQSslSocket(): QSslSocket() {}; + MiqtVirtualQSslSocket(QObject* parent): QSslSocket(parent) {}; + + virtual ~MiqtVirtualQSslSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QSslSocket::resume(); + return; + } + + + miqt_exec_callback_QSslSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QSslSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODeviceBase::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QSslSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QSslSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QSslSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODeviceBase::OpenMode openMode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QSslSocket::connectToHost(hostName, port, openMode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QSslSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int openMode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QSslSocket::connectToHost(hostName_QString, static_cast(port), static_cast(openMode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QSslSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QSslSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QSslSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QSslSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QSslSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QSslSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QSslSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSslSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QSslSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QSslSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QSslSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QSslSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QSslSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QSslSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QSslSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanReadLine = 0; + + // Subclass to allow providing a Go implementation + virtual bool canReadLine() const override { + if (handle__CanReadLine == 0) { + return QSslSocket::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QSslSocket_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QSslSocket::canReadLine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QSslSocket::close(); + return; + } + + + miqt_exec_callback_QSslSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QSslSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AtEnd = 0; + + // Subclass to allow providing a Go implementation + virtual bool atEnd() const override { + if (handle__AtEnd == 0) { + return QSslSocket::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QSslSocket_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QSslSocket::atEnd(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QSslSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QSslSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QSslSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QSslSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QSslSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QSslSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QSslSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QSslSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QSslSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QSslSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QSslSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QSslSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QSslSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QSslSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QSslSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QSslSocket::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QSslSocket_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QSslSocket::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QSslSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QSslSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QSslSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + +}; + +void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(); + *outptr_QSslSocket = ret; + *outptr_QTcpSocket = static_cast(ret); + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QSslSocket* QSslSocket_new2(QObject* parent) { - return new QSslSocket(parent); +void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(parent); + *outptr_QSslSocket = ret; + *outptr_QTcpSocket = static_cast(ret); + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QSslSocket_MetaObject(const QSslSocket* self) { @@ -60,13 +557,13 @@ void QSslSocket_ConnectToHostEncrypted2(QSslSocket* self, struct miqt_string hos self->connectToHostEncrypted(hostName_QString, static_cast(port), sslPeerName_QString); } -bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor) { - return self->setSocketDescriptor((qintptr)(socketDescriptor)); +bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode) { + return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); } -void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port) { +void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port)); + self->connectToHost(hostName_QString, static_cast(port), static_cast(openMode), static_cast(protocol)); } void QSslSocket_DisconnectFromHost(QSslSocket* self) { @@ -264,24 +761,24 @@ QSslKey* QSslSocket_PrivateKey(const QSslSocket* self) { return new QSslKey(self->privateKey()); } -bool QSslSocket_WaitForConnected(QSslSocket* self) { - return self->waitForConnected(); +bool QSslSocket_WaitForConnected(QSslSocket* self, int msecs) { + return self->waitForConnected(static_cast(msecs)); } bool QSslSocket_WaitForEncrypted(QSslSocket* self) { return self->waitForEncrypted(); } -bool QSslSocket_WaitForReadyRead(QSslSocket* self) { - return self->waitForReadyRead(); +bool QSslSocket_WaitForReadyRead(QSslSocket* self, int msecs) { + return self->waitForReadyRead(static_cast(msecs)); } -bool QSslSocket_WaitForBytesWritten(QSslSocket* self) { - return self->waitForBytesWritten(); +bool QSslSocket_WaitForBytesWritten(QSslSocket* self, int msecs) { + return self->waitForBytesWritten(static_cast(msecs)); } -bool QSslSocket_WaitForDisconnected(QSslSocket* self) { - return self->waitForDisconnected(); +bool QSslSocket_WaitForDisconnected(QSslSocket* self, int msecs) { + return self->waitForDisconnected(static_cast(msecs)); } struct miqt_array /* of QSslError* */ QSslSocket_SslHandshakeErrors(const QSslSocket* self) { @@ -452,7 +949,7 @@ void QSslSocket_Encrypted(QSslSocket* self) { } void QSslSocket_connect_Encrypted(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::encrypted), self, [=]() { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::encrypted), self, [=]() { miqt_exec_callback_QSslSocket_Encrypted(slot); }); } @@ -462,7 +959,7 @@ void QSslSocket_PeerVerifyError(QSslSocket* self, QSslError* error) { } void QSslSocket_connect_PeerVerifyError(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::peerVerifyError), self, [=](const QSslError& error) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::peerVerifyError), self, [=](const QSslError& error) { const QSslError& error_ret = error; // Cast returned reference into pointer QSslError* sigval1 = const_cast(&error_ret); @@ -481,7 +978,7 @@ void QSslSocket_SslErrors(QSslSocket* self, struct miqt_array /* of QSslError* * } void QSslSocket_connect_SslErrors(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast&)>(&QSslSocket::sslErrors), self, [=](const QList& errors) { + MiqtVirtualQSslSocket::connect(self, static_cast&)>(&QSslSocket::sslErrors), self, [=](const QList& errors) { const QList& errors_ret = errors; // Convert QList<> from C++ memory to manually-managed C memory QSslError** errors_arr = static_cast(malloc(sizeof(QSslError*) * errors_ret.length())); @@ -501,7 +998,7 @@ void QSslSocket_ModeChanged(QSslSocket* self, int newMode) { } void QSslSocket_connect_ModeChanged(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::modeChanged), self, [=](QSslSocket::SslMode newMode) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::modeChanged), self, [=](QSslSocket::SslMode newMode) { QSslSocket::SslMode newMode_ret = newMode; int sigval1 = static_cast(newMode_ret); miqt_exec_callback_QSslSocket_ModeChanged(slot, sigval1); @@ -513,7 +1010,7 @@ void QSslSocket_EncryptedBytesWritten(QSslSocket* self, long long totalBytes) { } void QSslSocket_connect_EncryptedBytesWritten(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::encryptedBytesWritten), self, [=](qint64 totalBytes) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::encryptedBytesWritten), self, [=](qint64 totalBytes) { qint64 totalBytes_ret = totalBytes; long long sigval1 = static_cast(totalBytes_ret); miqt_exec_callback_QSslSocket_EncryptedBytesWritten(slot, sigval1); @@ -525,7 +1022,7 @@ void QSslSocket_PreSharedKeyAuthenticationRequired(QSslSocket* self, QSslPreShar } void QSslSocket_connect_PreSharedKeyAuthenticationRequired(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::preSharedKeyAuthenticationRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::preSharedKeyAuthenticationRequired), self, [=](QSslPreSharedKeyAuthenticator* authenticator) { QSslPreSharedKeyAuthenticator* sigval1 = authenticator; miqt_exec_callback_QSslSocket_PreSharedKeyAuthenticationRequired(slot, sigval1); }); @@ -536,7 +1033,7 @@ void QSslSocket_NewSessionTicketReceived(QSslSocket* self) { } void QSslSocket_connect_NewSessionTicketReceived(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::newSessionTicketReceived), self, [=]() { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::newSessionTicketReceived), self, [=]() { miqt_exec_callback_QSslSocket_NewSessionTicketReceived(slot); }); } @@ -547,7 +1044,7 @@ void QSslSocket_AlertSent(QSslSocket* self, int level, int typeVal, struct miqt_ } void QSslSocket_connect_AlertSent(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::alertSent), self, [=](QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::alertSent), self, [=](QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { QSsl::AlertLevel level_ret = level; int sigval1 = static_cast(level_ret); QSsl::AlertType typeVal_ret = typeVal; @@ -570,7 +1067,7 @@ void QSslSocket_AlertReceived(QSslSocket* self, int level, int typeVal, struct m } void QSslSocket_connect_AlertReceived(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::alertReceived), self, [=](QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::alertReceived), self, [=](QSsl::AlertLevel level, QSsl::AlertType typeVal, const QString& description) { QSsl::AlertLevel level_ret = level; int sigval1 = static_cast(level_ret); QSsl::AlertType typeVal_ret = typeVal; @@ -592,7 +1089,7 @@ void QSslSocket_HandshakeInterruptedOnError(QSslSocket* self, QSslError* error) } void QSslSocket_connect_HandshakeInterruptedOnError(QSslSocket* self, intptr_t slot) { - QSslSocket::connect(self, static_cast(&QSslSocket::handshakeInterruptedOnError), self, [=](const QSslError& error) { + MiqtVirtualQSslSocket::connect(self, static_cast(&QSslSocket::handshakeInterruptedOnError), self, [=](const QSslError& error) { const QSslError& error_ret = error; // Cast returned reference into pointer QSslError* sigval1 = const_cast(&error_ret); @@ -644,24 +1141,6 @@ void QSslSocket_ConnectToHostEncrypted5(QSslSocket* self, struct miqt_string hos self->connectToHostEncrypted(hostName_QString, static_cast(port), sslPeerName_QString, static_cast(mode), static_cast(protocol)); } -bool QSslSocket_SetSocketDescriptor2(QSslSocket* self, intptr_t socketDescriptor, int state) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state)); -} - -bool QSslSocket_SetSocketDescriptor3(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode) { - return self->setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); -} - -void QSslSocket_ConnectToHost3(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(openMode)); -} - -void QSslSocket_ConnectToHost4(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol) { - QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - self->connectToHost(hostName_QString, static_cast(port), static_cast(openMode), static_cast(protocol)); -} - void QSslSocket_SetLocalCertificate2(QSslSocket* self, struct miqt_string fileName, int format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); self->setLocalCertificate(fileName_QString, static_cast(format)); @@ -683,26 +1162,10 @@ void QSslSocket_SetPrivateKey4(QSslSocket* self, struct miqt_string fileName, in self->setPrivateKey(fileName_QString, static_cast(algorithm), static_cast(format), passPhrase_QByteArray); } -bool QSslSocket_WaitForConnected1(QSslSocket* self, int msecs) { - return self->waitForConnected(static_cast(msecs)); -} - bool QSslSocket_WaitForEncrypted1(QSslSocket* self, int msecs) { return self->waitForEncrypted(static_cast(msecs)); } -bool QSslSocket_WaitForReadyRead1(QSslSocket* self, int msecs) { - return self->waitForReadyRead(static_cast(msecs)); -} - -bool QSslSocket_WaitForBytesWritten1(QSslSocket* self, int msecs) { - return self->waitForBytesWritten(static_cast(msecs)); -} - -bool QSslSocket_WaitForDisconnected1(QSslSocket* self, int msecs) { - return self->waitForDisconnected(static_cast(msecs)); -} - struct miqt_array /* of int */ QSslSocket_SupportedProtocols1(struct miqt_string backendName) { QString backendName_QString = QString::fromUtf8(backendName.data, backendName.len); QList _ret = QSslSocket::supportedProtocols(backendName_QString); @@ -763,7 +1226,163 @@ bool QSslSocket_IsFeatureSupported2(int feat, struct miqt_string backendName) { return QSslSocket::isFeatureSupported(static_cast(feat), backendName_QString); } -void QSslSocket_Delete(QSslSocket* self) { - delete self; +void QSslSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__Resume = slot; +} + +void QSslSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_Resume(); +} + +void QSslSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QSslSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QSslSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__ConnectToHost = slot; +} + +void QSslSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, openMode, protocol); +} + +void QSslSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QSslSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QSslSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QSslSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QSslSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QSslSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QSslSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QSslSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QSslSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QSslSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QSslSocket_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__CanReadLine = slot; +} + +bool QSslSocket_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_CanReadLine(); +} + +void QSslSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__Close = slot; +} + +void QSslSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_Close(); +} + +void QSslSocket_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__AtEnd = slot; +} + +bool QSslSocket_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQSslSocket*)(self) )->virtualbase_AtEnd(); +} + +void QSslSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QSslSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QSslSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QSslSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QSslSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QSslSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QSslSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QSslSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QSslSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QSslSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QSslSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__ReadData = slot; +} + +long long QSslSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QSslSocket_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__SkipData = slot; +} + +long long QSslSocket_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_SkipData(maxSize); +} + +void QSslSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QSslSocket*)(self) )->handle__WriteData = slot; +} + +long long QSslSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQSslSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QSslSocket_Delete(QSslSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qsslsocket.go b/qt6/network/gen_qsslsocket.go index 52cbd6e0..aaa9f6b7 100644 --- a/qt6/network/gen_qsslsocket.go +++ b/qt6/network/gen_qsslsocket.go @@ -33,7 +33,8 @@ const ( ) type QSslSocket struct { - h *C.QSslSocket + h *C.QSslSocket + isSubclass bool *QTcpSocket } @@ -51,27 +52,53 @@ func (this *QSslSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSslSocket(h *C.QSslSocket) *QSslSocket { +// newQSslSocket constructs the type using only CGO pointers. +func newQSslSocket(h *C.QSslSocket, h_QTcpSocket *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QSslSocket { if h == nil { return nil } - return &QSslSocket{h: h, QTcpSocket: UnsafeNewQTcpSocket(unsafe.Pointer(h))} + return &QSslSocket{h: h, + QTcpSocket: newQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQSslSocket(h unsafe.Pointer) *QSslSocket { - return newQSslSocket((*C.QSslSocket)(h)) +// UnsafeNewQSslSocket constructs the type using only unsafe pointers. +func UnsafeNewQSslSocket(h unsafe.Pointer, h_QTcpSocket unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QSslSocket { + if h == nil { + return nil + } + + return &QSslSocket{h: (*C.QSslSocket)(h), + QTcpSocket: UnsafeNewQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQSslSocket constructs a new QSslSocket object. func NewQSslSocket() *QSslSocket { - ret := C.QSslSocket_new() - return newQSslSocket(ret) + var outptr_QSslSocket *C.QSslSocket = nil + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSslSocket_new(&outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQSslSocket2 constructs a new QSslSocket object. func NewQSslSocket2(parent *qt6.QObject) *QSslSocket { - ret := C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQSslSocket(ret) + var outptr_QSslSocket *C.QSslSocket = nil + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QSslSocket) MetaObject() *qt6.QMetaObject { @@ -117,16 +144,16 @@ func (this *QSslSocket) ConnectToHostEncrypted2(hostName string, port uint16, ss C.QSslSocket_ConnectToHostEncrypted2(this.h, hostName_ms, (C.uint16_t)(port), sslPeerName_ms) } -func (this *QSslSocket) SetSocketDescriptor(socketDescriptor uintptr) bool { - return (bool)(C.QSslSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor))) +func (this *QSslSocket) SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { + return (bool)(C.QSslSocket_SetSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) } -func (this *QSslSocket) ConnectToHost(hostName string, port uint16) { +func (this *QSslSocket) ConnectToHost(hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { hostName_ms := C.struct_miqt_string{} hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QSslSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port)) + C.QSslSocket_ConnectToHost(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(openMode), (C.int)(protocol)) } func (this *QSslSocket) DisconnectFromHost() { @@ -339,24 +366,24 @@ func (this *QSslSocket) PrivateKey() *QSslKey { return _goptr } -func (this *QSslSocket) WaitForConnected() bool { - return (bool)(C.QSslSocket_WaitForConnected(this.h)) +func (this *QSslSocket) WaitForConnected(msecs int) bool { + return (bool)(C.QSslSocket_WaitForConnected(this.h, (C.int)(msecs))) } func (this *QSslSocket) WaitForEncrypted() bool { return (bool)(C.QSslSocket_WaitForEncrypted(this.h)) } -func (this *QSslSocket) WaitForReadyRead() bool { - return (bool)(C.QSslSocket_WaitForReadyRead(this.h)) +func (this *QSslSocket) WaitForReadyRead(msecs int) bool { + return (bool)(C.QSslSocket_WaitForReadyRead(this.h, (C.int)(msecs))) } -func (this *QSslSocket) WaitForBytesWritten() bool { - return (bool)(C.QSslSocket_WaitForBytesWritten(this.h)) +func (this *QSslSocket) WaitForBytesWritten(msecs int) bool { + return (bool)(C.QSslSocket_WaitForBytesWritten(this.h, (C.int)(msecs))) } -func (this *QSslSocket) WaitForDisconnected() bool { - return (bool)(C.QSslSocket_WaitForDisconnected(this.h)) +func (this *QSslSocket) WaitForDisconnected(msecs int) bool { + return (bool)(C.QSslSocket_WaitForDisconnected(this.h, (C.int)(msecs))) } func (this *QSslSocket) SslHandshakeErrors() []QSslError { @@ -787,30 +814,6 @@ func (this *QSslSocket) ConnectToHostEncrypted5(hostName string, port uint16, ss C.QSslSocket_ConnectToHostEncrypted5(this.h, hostName_ms, (C.uint16_t)(port), sslPeerName_ms, (C.int)(mode), (C.int)(protocol)) } -func (this *QSslSocket) SetSocketDescriptor2(socketDescriptor uintptr, state QAbstractSocket__SocketState) bool { - return (bool)(C.QSslSocket_SetSocketDescriptor2(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state))) -} - -func (this *QSslSocket) SetSocketDescriptor3(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { - return (bool)(C.QSslSocket_SetSocketDescriptor3(this.h, (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) -} - -func (this *QSslSocket) ConnectToHost3(hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag) { - hostName_ms := C.struct_miqt_string{} - hostName_ms.data = C.CString(hostName) - hostName_ms.len = C.size_t(len(hostName)) - defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QSslSocket_ConnectToHost3(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(openMode)) -} - -func (this *QSslSocket) ConnectToHost4(hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { - hostName_ms := C.struct_miqt_string{} - hostName_ms.data = C.CString(hostName) - hostName_ms.len = C.size_t(len(hostName)) - defer C.free(unsafe.Pointer(hostName_ms.data)) - C.QSslSocket_ConnectToHost4(this.h, hostName_ms, (C.uint16_t)(port), (C.int)(openMode), (C.int)(protocol)) -} - func (this *QSslSocket) SetLocalCertificate2(fileName string, format QSsl__EncodingFormat) { fileName_ms := C.struct_miqt_string{} fileName_ms.data = C.CString(fileName) @@ -846,26 +849,10 @@ func (this *QSslSocket) SetPrivateKey4(fileName string, algorithm QSsl__KeyAlgor C.QSslSocket_SetPrivateKey4(this.h, fileName_ms, (C.int)(algorithm), (C.int)(format), passPhrase_alias) } -func (this *QSslSocket) WaitForConnected1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForConnected1(this.h, (C.int)(msecs))) -} - func (this *QSslSocket) WaitForEncrypted1(msecs int) bool { return (bool)(C.QSslSocket_WaitForEncrypted1(this.h, (C.int)(msecs))) } -func (this *QSslSocket) WaitForReadyRead1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForReadyRead1(this.h, (C.int)(msecs))) -} - -func (this *QSslSocket) WaitForBytesWritten1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForBytesWritten1(this.h, (C.int)(msecs))) -} - -func (this *QSslSocket) WaitForDisconnected1(msecs int) bool { - return (bool)(C.QSslSocket_WaitForDisconnected1(this.h, (C.int)(msecs))) -} - func QSslSocket_SupportedProtocols1(backendName string) []QSsl__SslProtocol { backendName_ms := C.struct_miqt_string{} backendName_ms.data = C.CString(backendName) @@ -932,9 +919,482 @@ func QSslSocket_IsFeatureSupported2(feat QSsl__SupportedFeature, backendName str return (bool)(C.QSslSocket_IsFeatureSupported2((C.int)(feat), backendName_ms)) } +func (this *QSslSocket) callVirtualBase_Resume() { + + C.QSslSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QSslSocket) OnResume(slot func(super func())) { + C.QSslSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_Resume +func miqt_exec_callback_QSslSocket_Resume(self *C.QSslSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSslSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QSslSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QSslSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QSslSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QSslSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SetSocketDescriptor +func miqt_exec_callback_QSslSocket_SetSocketDescriptor(self *C.QSslSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + hostName_ms := C.struct_miqt_string{} + hostName_ms.data = C.CString(hostName) + hostName_ms.len = C.size_t(len(hostName)) + defer C.free(unsafe.Pointer(hostName_ms.data)) + + C.QSslSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(openMode), (C.int)(protocol)) + +} +func (this *QSslSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QSslSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_ConnectToHost +func miqt_exec_callback_QSslSocket_ConnectToHost(self *C.QSslSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, openMode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, openMode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(openMode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QSslSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QSslSocket) callVirtualBase_DisconnectFromHost() { + + C.QSslSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QSslSocket) OnDisconnectFromHost(slot func(super func())) { + C.QSslSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_DisconnectFromHost +func miqt_exec_callback_QSslSocket_DisconnectFromHost(self *C.QSslSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSslSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QSslSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt6.QVariant) { + + C.QSslSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QSslSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) { + C.QSslSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SetSocketOption +func miqt_exec_callback_QSslSocket_SetSocketOption(self *C.QSslSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QSslSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QSslSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt6.QVariant { + + _ret := C.QSslSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSslSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) { + C.QSslSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SocketOption +func miqt_exec_callback_QSslSocket_SocketOption(self *C.QSslSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QSslSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QSslSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QSslSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_BytesAvailable +func miqt_exec_callback_QSslSocket_BytesAvailable(self *C.QSslSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QSslSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QSslSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_BytesToWrite +func miqt_exec_callback_QSslSocket_BytesToWrite(self *C.QSslSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QSslSocket_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnCanReadLine(slot func(super func() bool) bool) { + C.QSslSocket_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_CanReadLine +func miqt_exec_callback_QSslSocket_CanReadLine(self *C.QSslSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_Close() { + + C.QSslSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QSslSocket) OnClose(slot func(super func())) { + C.QSslSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_Close +func miqt_exec_callback_QSslSocket_Close(self *C.QSslSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QSslSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QSslSocket) callVirtualBase_AtEnd() bool { + + return (bool)(C.QSslSocket_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QSslSocket) OnAtEnd(slot func(super func() bool) bool) { + C.QSslSocket_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_AtEnd +func miqt_exec_callback_QSslSocket_AtEnd(self *C.QSslSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QSslSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QSslSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QSslSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SetReadBufferSize +func miqt_exec_callback_QSslSocket_SetReadBufferSize(self *C.QSslSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QSslSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QSslSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForConnected +func miqt_exec_callback_QSslSocket_WaitForConnected(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForReadyRead +func miqt_exec_callback_QSslSocket_WaitForReadyRead(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForBytesWritten +func miqt_exec_callback_QSslSocket_WaitForBytesWritten(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QSslSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QSslSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QSslSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WaitForDisconnected +func miqt_exec_callback_QSslSocket_WaitForDisconnected(self *C.QSslSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSslSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QSslSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QSslSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_ReadData +func miqt_exec_callback_QSslSocket_ReadData(self *C.QSslSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QSslSocket_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QSslSocket) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QSslSocket_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_SkipData +func miqt_exec_callback_QSslSocket_SkipData(self *C.QSslSocket, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + +func (this *QSslSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QSslSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QSslSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QSslSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSslSocket_WriteData +func miqt_exec_callback_QSslSocket_WriteData(self *C.QSslSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QSslSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QSslSocket) Delete() { - C.QSslSocket_Delete(this.h) + C.QSslSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qsslsocket.h b/qt6/network/gen_qsslsocket.h index 1f4c3f48..e988119b 100644 --- a/qt6/network/gen_qsslsocket.h +++ b/qt6/network/gen_qsslsocket.h @@ -15,7 +15,10 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; class QByteArray; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; class QOcspResponse; @@ -26,9 +29,13 @@ class QSslError; class QSslKey; class QSslPreSharedKeyAuthenticator; class QSslSocket; +class QTcpSocket; class QVariant; #else +typedef struct QAbstractSocket QAbstractSocket; typedef struct QByteArray QByteArray; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QOcspResponse QOcspResponse; @@ -39,19 +46,20 @@ typedef struct QSslError QSslError; typedef struct QSslKey QSslKey; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; typedef struct QSslSocket QSslSocket; +typedef struct QTcpSocket QTcpSocket; typedef struct QVariant QVariant; #endif -QSslSocket* QSslSocket_new(); -QSslSocket* QSslSocket_new2(QObject* parent); +void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QSslSocket_MetaObject(const QSslSocket* self); void* QSslSocket_Metacast(QSslSocket* self, const char* param1); struct miqt_string QSslSocket_Tr(const char* s); void QSslSocket_Resume(QSslSocket* self); void QSslSocket_ConnectToHostEncrypted(QSslSocket* self, struct miqt_string hostName, uint16_t port); void QSslSocket_ConnectToHostEncrypted2(QSslSocket* self, struct miqt_string hostName, uint16_t port, struct miqt_string sslPeerName); -bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor); -void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port); +bool QSslSocket_SetSocketDescriptor(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode); +void QSslSocket_ConnectToHost(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol); void QSslSocket_DisconnectFromHost(QSslSocket* self); void QSslSocket_SetSocketOption(QSslSocket* self, int option, QVariant* value); QVariant* QSslSocket_SocketOption(QSslSocket* self, int option); @@ -88,11 +96,11 @@ struct miqt_array /* of QOcspResponse* */ QSslSocket_OcspResponses(const QSslSo void QSslSocket_SetPrivateKey(QSslSocket* self, QSslKey* key); void QSslSocket_SetPrivateKeyWithFileName(QSslSocket* self, struct miqt_string fileName); QSslKey* QSslSocket_PrivateKey(const QSslSocket* self); -bool QSslSocket_WaitForConnected(QSslSocket* self); +bool QSslSocket_WaitForConnected(QSslSocket* self, int msecs); bool QSslSocket_WaitForEncrypted(QSslSocket* self); -bool QSslSocket_WaitForReadyRead(QSslSocket* self); -bool QSslSocket_WaitForBytesWritten(QSslSocket* self); -bool QSslSocket_WaitForDisconnected(QSslSocket* self); +bool QSslSocket_WaitForReadyRead(QSslSocket* self, int msecs); +bool QSslSocket_WaitForBytesWritten(QSslSocket* self, int msecs); +bool QSslSocket_WaitForDisconnected(QSslSocket* self, int msecs); struct miqt_array /* of QSslError* */ QSslSocket_SslHandshakeErrors(const QSslSocket* self); bool QSslSocket_SupportsSsl(); long QSslSocket_SslLibraryVersionNumber(); @@ -133,32 +141,65 @@ void QSslSocket_AlertReceived(QSslSocket* self, int level, int typeVal, struct m void QSslSocket_connect_AlertReceived(QSslSocket* self, intptr_t slot); void QSslSocket_HandshakeInterruptedOnError(QSslSocket* self, QSslError* error); void QSslSocket_connect_HandshakeInterruptedOnError(QSslSocket* self, intptr_t slot); +long long QSslSocket_ReadData(QSslSocket* self, char* data, long long maxlen); +long long QSslSocket_SkipData(QSslSocket* self, long long maxSize); +long long QSslSocket_WriteData(QSslSocket* self, const char* data, long long lenVal); struct miqt_string QSslSocket_Tr2(const char* s, const char* c); struct miqt_string QSslSocket_Tr3(const char* s, const char* c, int n); void QSslSocket_ConnectToHostEncrypted3(QSslSocket* self, struct miqt_string hostName, uint16_t port, int mode); void QSslSocket_ConnectToHostEncrypted4(QSslSocket* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); void QSslSocket_ConnectToHostEncrypted42(QSslSocket* self, struct miqt_string hostName, uint16_t port, struct miqt_string sslPeerName, int mode); void QSslSocket_ConnectToHostEncrypted5(QSslSocket* self, struct miqt_string hostName, uint16_t port, struct miqt_string sslPeerName, int mode, int protocol); -bool QSslSocket_SetSocketDescriptor2(QSslSocket* self, intptr_t socketDescriptor, int state); -bool QSslSocket_SetSocketDescriptor3(QSslSocket* self, intptr_t socketDescriptor, int state, int openMode); -void QSslSocket_ConnectToHost3(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode); -void QSslSocket_ConnectToHost4(QSslSocket* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol); void QSslSocket_SetLocalCertificate2(QSslSocket* self, struct miqt_string fileName, int format); void QSslSocket_SetPrivateKey2(QSslSocket* self, struct miqt_string fileName, int algorithm); void QSslSocket_SetPrivateKey3(QSslSocket* self, struct miqt_string fileName, int algorithm, int format); void QSslSocket_SetPrivateKey4(QSslSocket* self, struct miqt_string fileName, int algorithm, int format, struct miqt_string passPhrase); -bool QSslSocket_WaitForConnected1(QSslSocket* self, int msecs); bool QSslSocket_WaitForEncrypted1(QSslSocket* self, int msecs); -bool QSslSocket_WaitForReadyRead1(QSslSocket* self, int msecs); -bool QSslSocket_WaitForBytesWritten1(QSslSocket* self, int msecs); -bool QSslSocket_WaitForDisconnected1(QSslSocket* self, int msecs); struct miqt_array /* of int */ QSslSocket_SupportedProtocols1(struct miqt_string backendName); bool QSslSocket_IsProtocolSupported2(int protocol, struct miqt_string backendName); struct miqt_array /* of int */ QSslSocket_ImplementedClasses1(struct miqt_string backendName); bool QSslSocket_IsClassImplemented2(int cl, struct miqt_string backendName); struct miqt_array /* of int */ QSslSocket_SupportedFeatures1(struct miqt_string backendName); bool QSslSocket_IsFeatureSupported2(int feat, struct miqt_string backendName); -void QSslSocket_Delete(QSslSocket* self); +void QSslSocket_override_virtual_Resume(void* self, intptr_t slot); +void QSslSocket_virtualbase_Resume(void* self); +void QSslSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QSslSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QSslSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QSslSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int openMode, int protocol); +void QSslSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QSslSocket_virtualbase_DisconnectFromHost(void* self); +void QSslSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QSslSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QSslSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QSslSocket_virtualbase_SocketOption(void* self, int option); +void QSslSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QSslSocket_virtualbase_BytesAvailable(const void* self); +void QSslSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QSslSocket_virtualbase_BytesToWrite(const void* self); +void QSslSocket_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QSslSocket_virtualbase_CanReadLine(const void* self); +void QSslSocket_override_virtual_Close(void* self, intptr_t slot); +void QSslSocket_virtualbase_Close(void* self); +void QSslSocket_override_virtual_AtEnd(void* self, intptr_t slot); +bool QSslSocket_virtualbase_AtEnd(const void* self); +void QSslSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QSslSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QSslSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QSslSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QSslSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QSslSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QSslSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QSslSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QSslSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QSslSocket_override_virtual_SkipData(void* self, intptr_t slot); +long long QSslSocket_virtualbase_SkipData(void* self, long long maxSize); +void QSslSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QSslSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QSslSocket_Delete(QSslSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qtcpserver.cpp b/qt6/network/gen_qtcpserver.cpp index 0b191e13..187251a7 100644 --- a/qt6/network/gen_qtcpserver.cpp +++ b/qt6/network/gen_qtcpserver.cpp @@ -1,4 +1,7 @@ +#include +#include #include +#include #include #include #include @@ -7,16 +10,271 @@ #include #include #include +#include #include #include "gen_qtcpserver.h" #include "_cgo_export.h" -QTcpServer* QTcpServer_new() { - return new QTcpServer(); +class MiqtVirtualQTcpServer : public virtual QTcpServer { +public: + + MiqtVirtualQTcpServer(): QTcpServer() {}; + MiqtVirtualQTcpServer(QObject* parent): QTcpServer(parent) {}; + + virtual ~MiqtVirtualQTcpServer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingConnections = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingConnections() const override { + if (handle__HasPendingConnections == 0) { + return QTcpServer::hasPendingConnections(); + } + + + bool callback_return_value = miqt_exec_callback_QTcpServer_HasPendingConnections(const_cast(this), handle__HasPendingConnections); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasPendingConnections() const { + + return QTcpServer::hasPendingConnections(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextPendingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual QTcpSocket* nextPendingConnection() override { + if (handle__NextPendingConnection == 0) { + return QTcpServer::nextPendingConnection(); + } + + + QTcpSocket* callback_return_value = miqt_exec_callback_QTcpServer_NextPendingConnection(this, handle__NextPendingConnection); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QTcpSocket* virtualbase_NextPendingConnection() { + + return QTcpServer::nextPendingConnection(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IncomingConnection = 0; + + // Subclass to allow providing a Go implementation + virtual void incomingConnection(qintptr handle) override { + if (handle__IncomingConnection == 0) { + QTcpServer::incomingConnection(handle); + return; + } + + qintptr handle_ret = handle; + intptr_t sigval1 = static_cast(handle_ret); + + miqt_exec_callback_QTcpServer_IncomingConnection(this, handle__IncomingConnection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_IncomingConnection(intptr_t handle) { + + QTcpServer::incomingConnection((qintptr)(handle)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QTcpServer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QTcpServer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QTcpServer::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QTcpServer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QTcpServer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QTcpServer::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QTcpServer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QTcpServer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QTcpServer::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QTcpServer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QTcpServer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QTcpServer::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QTcpServer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QTcpServer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QTcpServer::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QTcpServer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTcpServer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QTcpServer::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QTcpServer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QTcpServer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QTcpServer::disconnectNotify(*signal); + + } + +}; + +void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(); + *outptr_QTcpServer = ret; + *outptr_QObject = static_cast(ret); } -QTcpServer* QTcpServer_new2(QObject* parent) { - return new QTcpServer(parent); +void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { + MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(parent); + *outptr_QTcpServer = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QTcpServer_MetaObject(const QTcpServer* self) { @@ -133,7 +391,7 @@ void QTcpServer_NewConnection(QTcpServer* self) { } void QTcpServer_connect_NewConnection(QTcpServer* self, intptr_t slot) { - QTcpServer::connect(self, static_cast(&QTcpServer::newConnection), self, [=]() { + MiqtVirtualQTcpServer::connect(self, static_cast(&QTcpServer::newConnection), self, [=]() { miqt_exec_callback_QTcpServer_NewConnection(slot); }); } @@ -143,7 +401,7 @@ void QTcpServer_AcceptError(QTcpServer* self, int socketError) { } void QTcpServer_connect_AcceptError(QTcpServer* self, intptr_t slot) { - QTcpServer::connect(self, static_cast(&QTcpServer::acceptError), self, [=](QAbstractSocket::SocketError socketError) { + MiqtVirtualQTcpServer::connect(self, static_cast(&QTcpServer::acceptError), self, [=](QAbstractSocket::SocketError socketError) { QAbstractSocket::SocketError socketError_ret = socketError; int sigval1 = static_cast(socketError_ret); miqt_exec_callback_QTcpServer_AcceptError(slot, sigval1); @@ -188,7 +446,91 @@ bool QTcpServer_WaitForNewConnection2(QTcpServer* self, int msec, bool* timedOut return self->waitForNewConnection(static_cast(msec), timedOut); } -void QTcpServer_Delete(QTcpServer* self) { - delete self; +void QTcpServer_override_virtual_HasPendingConnections(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__HasPendingConnections = slot; +} + +bool QTcpServer_virtualbase_HasPendingConnections(const void* self) { + return ( (const MiqtVirtualQTcpServer*)(self) )->virtualbase_HasPendingConnections(); +} + +void QTcpServer_override_virtual_NextPendingConnection(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__NextPendingConnection = slot; +} + +QTcpSocket* QTcpServer_virtualbase_NextPendingConnection(void* self) { + return ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_NextPendingConnection(); +} + +void QTcpServer_override_virtual_IncomingConnection(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__IncomingConnection = slot; +} + +void QTcpServer_virtualbase_IncomingConnection(void* self, intptr_t handle) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_IncomingConnection(handle); +} + +void QTcpServer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__Event = slot; +} + +bool QTcpServer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_Event(event); +} + +void QTcpServer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__EventFilter = slot; +} + +bool QTcpServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QTcpServer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__TimerEvent = slot; +} + +void QTcpServer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_TimerEvent(event); +} + +void QTcpServer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__ChildEvent = slot; +} + +void QTcpServer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_ChildEvent(event); +} + +void QTcpServer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__CustomEvent = slot; +} + +void QTcpServer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_CustomEvent(event); +} + +void QTcpServer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__ConnectNotify = slot; +} + +void QTcpServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QTcpServer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QTcpServer*)(self) )->handle__DisconnectNotify = slot; +} + +void QTcpServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQTcpServer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QTcpServer_Delete(QTcpServer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qtcpserver.go b/qt6/network/gen_qtcpserver.go index 99cfc0d9..054f597c 100644 --- a/qt6/network/gen_qtcpserver.go +++ b/qt6/network/gen_qtcpserver.go @@ -16,7 +16,8 @@ import ( ) type QTcpServer struct { - h *C.QTcpServer + h *C.QTcpServer + isSubclass bool *qt6.QObject } @@ -34,27 +35,45 @@ func (this *QTcpServer) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTcpServer(h *C.QTcpServer) *QTcpServer { +// newQTcpServer constructs the type using only CGO pointers. +func newQTcpServer(h *C.QTcpServer, h_QObject *C.QObject) *QTcpServer { if h == nil { return nil } - return &QTcpServer{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QTcpServer{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQTcpServer(h unsafe.Pointer) *QTcpServer { - return newQTcpServer((*C.QTcpServer)(h)) +// UnsafeNewQTcpServer constructs the type using only unsafe pointers. +func UnsafeNewQTcpServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTcpServer { + if h == nil { + return nil + } + + return &QTcpServer{h: (*C.QTcpServer)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQTcpServer constructs a new QTcpServer object. func NewQTcpServer() *QTcpServer { - ret := C.QTcpServer_new() - return newQTcpServer(ret) + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QTcpServer_new(&outptr_QTcpServer, &outptr_QObject) + ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } // NewQTcpServer2 constructs a new QTcpServer object. func NewQTcpServer2(parent *qt6.QObject) *QTcpServer { - ret := C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer())) - return newQTcpServer(ret) + var outptr_QTcpServer *C.QTcpServer = nil + var outptr_QObject *C.QObject = nil + + C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpServer, &outptr_QObject) + ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QTcpServer) MetaObject() *qt6.QMetaObject { @@ -132,7 +151,7 @@ func (this *QTcpServer) HasPendingConnections() bool { } func (this *QTcpServer) NextPendingConnection() *QTcpSocket { - return UnsafeNewQTcpSocket(unsafe.Pointer(C.QTcpServer_NextPendingConnection(this.h))) + return UnsafeNewQTcpSocket(unsafe.Pointer(C.QTcpServer_NextPendingConnection(this.h)), nil, nil, nil, nil) } func (this *QTcpServer) ServerError() QAbstractSocket__SocketError { @@ -240,9 +259,241 @@ func (this *QTcpServer) WaitForNewConnection2(msec int, timedOut *bool) bool { return (bool)(C.QTcpServer_WaitForNewConnection2(this.h, (C.int)(msec), (*C.bool)(unsafe.Pointer(timedOut)))) } +func (this *QTcpServer) callVirtualBase_HasPendingConnections() bool { + + return (bool)(C.QTcpServer_virtualbase_HasPendingConnections(unsafe.Pointer(this.h))) + +} +func (this *QTcpServer) OnHasPendingConnections(slot func(super func() bool) bool) { + C.QTcpServer_override_virtual_HasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_HasPendingConnections +func miqt_exec_callback_QTcpServer_HasPendingConnections(self *C.QTcpServer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_HasPendingConnections) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpServer) callVirtualBase_NextPendingConnection() *QTcpSocket { + + return UnsafeNewQTcpSocket(unsafe.Pointer(C.QTcpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))), nil, nil, nil, nil) +} +func (this *QTcpServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { + C.QTcpServer_override_virtual_NextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_NextPendingConnection +func miqt_exec_callback_QTcpServer_NextPendingConnection(self *C.QTcpServer, cb C.intptr_t) *C.QTcpSocket { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QTcpSocket) *QTcpSocket) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_NextPendingConnection) + + return virtualReturn.cPointer() + +} + +func (this *QTcpServer) callVirtualBase_IncomingConnection(handle uintptr) { + + C.QTcpServer_virtualbase_IncomingConnection(unsafe.Pointer(this.h), (C.intptr_t)(handle)) + +} +func (this *QTcpServer) OnIncomingConnection(slot func(super func(handle uintptr), handle uintptr)) { + C.QTcpServer_override_virtual_IncomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_IncomingConnection +func miqt_exec_callback_QTcpServer_IncomingConnection(self *C.QTcpServer, cb C.intptr_t, handle C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(handle uintptr), handle uintptr)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(handle) + + gofunc((&QTcpServer{h: self}).callVirtualBase_IncomingConnection, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QTcpServer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QTcpServer) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QTcpServer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_Event +func miqt_exec_callback_QTcpServer_Event(self *C.QTcpServer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpServer) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QTcpServer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QTcpServer) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QTcpServer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_EventFilter +func miqt_exec_callback_QTcpServer_EventFilter(self *C.QTcpServer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QTcpServer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpServer) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QTcpServer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QTcpServer) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QTcpServer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_TimerEvent +func miqt_exec_callback_QTcpServer_TimerEvent(self *C.QTcpServer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QTcpServer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QTcpServer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QTcpServer) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QTcpServer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_ChildEvent +func miqt_exec_callback_QTcpServer_ChildEvent(self *C.QTcpServer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QTcpServer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QTcpServer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QTcpServer) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QTcpServer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_CustomEvent +func miqt_exec_callback_QTcpServer_CustomEvent(self *C.QTcpServer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QTcpServer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QTcpServer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QTcpServer) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QTcpServer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_ConnectNotify +func miqt_exec_callback_QTcpServer_ConnectNotify(self *C.QTcpServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTcpServer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QTcpServer) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QTcpServer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QTcpServer) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QTcpServer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpServer_DisconnectNotify +func miqt_exec_callback_QTcpServer_DisconnectNotify(self *C.QTcpServer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QTcpServer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QTcpServer) Delete() { - C.QTcpServer_Delete(this.h) + C.QTcpServer_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qtcpserver.h b/qt6/network/gen_qtcpserver.h index 1b13e9c8..40f19602 100644 --- a/qt6/network/gen_qtcpserver.h +++ b/qt6/network/gen_qtcpserver.h @@ -15,23 +15,31 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QHostAddress; +class QMetaMethod; class QMetaObject; class QNetworkProxy; class QObject; class QTcpServer; class QTcpSocket; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QHostAddress QHostAddress; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QNetworkProxy QNetworkProxy; typedef struct QObject QObject; typedef struct QTcpServer QTcpServer; typedef struct QTcpSocket QTcpSocket; +typedef struct QTimerEvent QTimerEvent; #endif -QTcpServer* QTcpServer_new(); -QTcpServer* QTcpServer_new2(QObject* parent); +void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); QMetaObject* QTcpServer_MetaObject(const QTcpServer* self); void* QTcpServer_Metacast(QTcpServer* self, const char* param1); struct miqt_string QTcpServer_Tr(const char* s); @@ -55,6 +63,7 @@ void QTcpServer_PauseAccepting(QTcpServer* self); void QTcpServer_ResumeAccepting(QTcpServer* self); void QTcpServer_SetProxy(QTcpServer* self, QNetworkProxy* networkProxy); QNetworkProxy* QTcpServer_Proxy(const QTcpServer* self); +void QTcpServer_IncomingConnection(QTcpServer* self, intptr_t handle); void QTcpServer_NewConnection(QTcpServer* self); void QTcpServer_connect_NewConnection(QTcpServer* self, intptr_t slot); void QTcpServer_AcceptError(QTcpServer* self, int socketError); @@ -65,7 +74,27 @@ bool QTcpServer_Listen1(QTcpServer* self, QHostAddress* address); bool QTcpServer_Listen2(QTcpServer* self, QHostAddress* address, uint16_t port); bool QTcpServer_WaitForNewConnection1(QTcpServer* self, int msec); bool QTcpServer_WaitForNewConnection2(QTcpServer* self, int msec, bool* timedOut); -void QTcpServer_Delete(QTcpServer* self); +void QTcpServer_override_virtual_HasPendingConnections(void* self, intptr_t slot); +bool QTcpServer_virtualbase_HasPendingConnections(const void* self); +void QTcpServer_override_virtual_NextPendingConnection(void* self, intptr_t slot); +QTcpSocket* QTcpServer_virtualbase_NextPendingConnection(void* self); +void QTcpServer_override_virtual_IncomingConnection(void* self, intptr_t slot); +void QTcpServer_virtualbase_IncomingConnection(void* self, intptr_t handle); +void QTcpServer_override_virtual_Event(void* self, intptr_t slot); +bool QTcpServer_virtualbase_Event(void* self, QEvent* event); +void QTcpServer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QTcpServer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QTcpServer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QTcpServer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QTcpServer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QTcpServer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QTcpServer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QTcpServer_virtualbase_CustomEvent(void* self, QEvent* event); +void QTcpServer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QTcpServer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QTcpServer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QTcpServer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QTcpServer_Delete(QTcpServer* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qtcpsocket.cpp b/qt6/network/gen_qtcpsocket.cpp index deeb4a91..ff04f4db 100644 --- a/qt6/network/gen_qtcpsocket.cpp +++ b/qt6/network/gen_qtcpsocket.cpp @@ -1,19 +1,571 @@ +#include +#include +#include +#include #include #include #include #include #include #include +#include #include #include "gen_qtcpsocket.h" #include "_cgo_export.h" -QTcpSocket* QTcpSocket_new() { - return new QTcpSocket(); +class MiqtVirtualQTcpSocket : public virtual QTcpSocket { +public: + + MiqtVirtualQTcpSocket(): QTcpSocket() {}; + MiqtVirtualQTcpSocket(QObject* parent): QTcpSocket(parent) {}; + + virtual ~MiqtVirtualQTcpSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QTcpSocket::resume(); + return; + } + + + miqt_exec_callback_QTcpSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QTcpSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(const QHostAddress& address, quint16 port, QAbstractSocket::BindMode mode) override { + if (handle__Bind == 0) { + return QTcpSocket::bind(address, port, mode); + } + + const QHostAddress& address_ret = address; + // Cast returned reference into pointer + QHostAddress* sigval1 = const_cast(&address_ret); + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QAbstractSocket::BindMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QTcpSocket_Bind(this, handle__Bind, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QHostAddress* address, uint16_t port, int mode) { + + return QTcpSocket::bind(*address, static_cast(port), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODeviceBase::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QTcpSocket::connectToHost(hostName, port, mode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODeviceBase::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QTcpSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QTcpSocket::connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QTcpSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QTcpSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QTcpSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QTcpSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QTcpSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QTcpSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QTcpSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QTcpSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QTcpSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QTcpSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QTcpSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QTcpSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual qintptr socketDescriptor() const override { + if (handle__SocketDescriptor == 0) { + return QTcpSocket::socketDescriptor(); + } + + + intptr_t callback_return_value = miqt_exec_callback_QTcpSocket_SocketDescriptor(const_cast(this), handle__SocketDescriptor); + + return (qintptr)(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_SocketDescriptor() const { + + qintptr _ret = QTcpSocket::socketDescriptor(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODeviceBase::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QTcpSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QTcpSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QTcpSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QTcpSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QTcpSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QTcpSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QTcpSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QTcpSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QTcpSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QTcpSocket::close(); + return; + } + + + miqt_exec_callback_QTcpSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QTcpSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QTcpSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QTcpSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QTcpSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QTcpSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QTcpSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QTcpSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QTcpSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QTcpSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QTcpSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QTcpSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QTcpSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QTcpSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QTcpSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QTcpSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QTcpSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QTcpSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QTcpSocket::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QTcpSocket::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QTcpSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QTcpSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QTcpSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + +}; + +void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(); + *outptr_QTcpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QTcpSocket* QTcpSocket_new2(QObject* parent) { - return new QTcpSocket(parent); +void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(parent); + *outptr_QTcpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self) { @@ -69,7 +621,179 @@ bool QTcpSocket_Bind3(QTcpSocket* self, int addr, uint16_t port, int mode) { return self->bind(static_cast(addr), static_cast(port), static_cast(mode)); } -void QTcpSocket_Delete(QTcpSocket* self) { - delete self; +void QTcpSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__Resume = slot; +} + +void QTcpSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_Resume(); +} + +void QTcpSocket_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__Bind = slot; +} + +bool QTcpSocket_virtualbase_Bind(void* self, QHostAddress* address, uint16_t port, int mode) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_Bind(address, port, mode); +} + +void QTcpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__ConnectToHost = slot; +} + +void QTcpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, mode, protocol); +} + +void QTcpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QTcpSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QTcpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QTcpSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QTcpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QTcpSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QTcpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QTcpSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QTcpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SocketDescriptor = slot; +} + +intptr_t QTcpSocket_virtualbase_SocketDescriptor(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_SocketDescriptor(); +} + +void QTcpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QTcpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QTcpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QTcpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QTcpSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QTcpSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QTcpSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__Close = slot; +} + +void QTcpSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_Close(); +} + +void QTcpSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__IsSequential = slot; +} + +bool QTcpSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQTcpSocket*)(self) )->virtualbase_IsSequential(); +} + +void QTcpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QTcpSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QTcpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QTcpSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QTcpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QTcpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QTcpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QTcpSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QTcpSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__ReadData = slot; +} + +long long QTcpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QTcpSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QTcpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QTcpSocket_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__SkipData = slot; +} + +long long QTcpSocket_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_SkipData(maxSize); +} + +void QTcpSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QTcpSocket*)(self) )->handle__WriteData = slot; +} + +long long QTcpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQTcpSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QTcpSocket_Delete(QTcpSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qtcpsocket.go b/qt6/network/gen_qtcpsocket.go index 4f14c7ee..e7597c44 100644 --- a/qt6/network/gen_qtcpsocket.go +++ b/qt6/network/gen_qtcpsocket.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QTcpSocket struct { - h *C.QTcpSocket + h *C.QTcpSocket + isSubclass bool *QAbstractSocket } @@ -33,27 +35,51 @@ func (this *QTcpSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQTcpSocket(h *C.QTcpSocket) *QTcpSocket { +// newQTcpSocket constructs the type using only CGO pointers. +func newQTcpSocket(h *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QTcpSocket { if h == nil { return nil } - return &QTcpSocket{h: h, QAbstractSocket: UnsafeNewQAbstractSocket(unsafe.Pointer(h))} + return &QTcpSocket{h: h, + QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQTcpSocket(h unsafe.Pointer) *QTcpSocket { - return newQTcpSocket((*C.QTcpSocket)(h)) +// UnsafeNewQTcpSocket constructs the type using only unsafe pointers. +func UnsafeNewQTcpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QTcpSocket { + if h == nil { + return nil + } + + return &QTcpSocket{h: (*C.QTcpSocket)(h), + QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQTcpSocket constructs a new QTcpSocket object. func NewQTcpSocket() *QTcpSocket { - ret := C.QTcpSocket_new() - return newQTcpSocket(ret) + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTcpSocket_new(&outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQTcpSocket2 constructs a new QTcpSocket object. func NewQTcpSocket2(parent *qt6.QObject) *QTcpSocket { - ret := C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQTcpSocket(ret) + var outptr_QTcpSocket *C.QTcpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QTcpSocket) MetaObject() *qt6.QMetaObject { @@ -109,9 +135,540 @@ func (this *QTcpSocket) Bind3(addr QHostAddress__SpecialAddress, port uint16, mo return (bool)(C.QTcpSocket_Bind3(this.h, (C.int)(addr), (C.uint16_t)(port), (C.int)(mode))) } +func (this *QTcpSocket) callVirtualBase_Resume() { + + C.QTcpSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QTcpSocket) OnResume(slot func(super func())) { + C.QTcpSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_Resume +func miqt_exec_callback_QTcpSocket_Resume(self *C.QTcpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTcpSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QTcpSocket) callVirtualBase_Bind(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool { + + return (bool)(C.QTcpSocket_virtualbase_Bind(unsafe.Pointer(this.h), address.cPointer(), (C.uint16_t)(port), (C.int)(mode))) + +} +func (this *QTcpSocket) OnBind(slot func(super func(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool, address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool) { + C.QTcpSocket_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_Bind +func miqt_exec_callback_QTcpSocket_Bind(self *C.QTcpSocket, cb C.intptr_t, address *C.QHostAddress, port C.uint16_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool, address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHostAddress(unsafe.Pointer(address)) + slotval2 := (uint16)(port) + + slotval3 := (QAbstractSocket__BindFlag)(mode) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_Bind, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + hostName_ms := C.struct_miqt_string{} + hostName_ms.data = C.CString(hostName) + hostName_ms.len = C.size_t(len(hostName)) + defer C.free(unsafe.Pointer(hostName_ms.data)) + + C.QTcpSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + +} +func (this *QTcpSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QTcpSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_ConnectToHost +func miqt_exec_callback_QTcpSocket_ConnectToHost(self *C.QTcpSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, mode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(mode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QTcpSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QTcpSocket) callVirtualBase_DisconnectFromHost() { + + C.QTcpSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QTcpSocket) OnDisconnectFromHost(slot func(super func())) { + C.QTcpSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_DisconnectFromHost +func miqt_exec_callback_QTcpSocket_DisconnectFromHost(self *C.QTcpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTcpSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QTcpSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QTcpSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QTcpSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_BytesAvailable +func miqt_exec_callback_QTcpSocket_BytesAvailable(self *C.QTcpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QTcpSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QTcpSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_BytesToWrite +func miqt_exec_callback_QTcpSocket_BytesToWrite(self *C.QTcpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QTcpSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QTcpSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QTcpSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SetReadBufferSize +func miqt_exec_callback_QTcpSocket_SetReadBufferSize(self *C.QTcpSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QTcpSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QTcpSocket) callVirtualBase_SocketDescriptor() uintptr { + + return (uintptr)(C.QTcpSocket_virtualbase_SocketDescriptor(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnSocketDescriptor(slot func(super func() uintptr) uintptr) { + C.QTcpSocket_override_virtual_SocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SocketDescriptor +func miqt_exec_callback_QTcpSocket_SocketDescriptor(self *C.QTcpSocket, cb C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SocketDescriptor) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QTcpSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QTcpSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QTcpSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SetSocketDescriptor +func miqt_exec_callback_QTcpSocket_SetSocketDescriptor(self *C.QTcpSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt6.QVariant) { + + C.QTcpSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QTcpSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) { + C.QTcpSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SetSocketOption +func miqt_exec_callback_QTcpSocket_SetSocketOption(self *C.QTcpSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QTcpSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QTcpSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt6.QVariant { + + _ret := C.QTcpSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTcpSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) { + C.QTcpSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SocketOption +func miqt_exec_callback_QTcpSocket_SocketOption(self *C.QTcpSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QTcpSocket) callVirtualBase_Close() { + + C.QTcpSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QTcpSocket) OnClose(slot func(super func())) { + C.QTcpSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_Close +func miqt_exec_callback_QTcpSocket_Close(self *C.QTcpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QTcpSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QTcpSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QTcpSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QTcpSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QTcpSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_IsSequential +func miqt_exec_callback_QTcpSocket_IsSequential(self *C.QTcpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForConnected +func miqt_exec_callback_QTcpSocket_WaitForConnected(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForReadyRead +func miqt_exec_callback_QTcpSocket_WaitForReadyRead(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForBytesWritten +func miqt_exec_callback_QTcpSocket_WaitForBytesWritten(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QTcpSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QTcpSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QTcpSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WaitForDisconnected +func miqt_exec_callback_QTcpSocket_WaitForDisconnected(self *C.QTcpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QTcpSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QTcpSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QTcpSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_ReadData +func miqt_exec_callback_QTcpSocket_ReadData(self *C.QTcpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QTcpSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QTcpSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QTcpSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_ReadLineData +func miqt_exec_callback_QTcpSocket_ReadLineData(self *C.QTcpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QTcpSocket_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QTcpSocket) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QTcpSocket_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_SkipData +func miqt_exec_callback_QTcpSocket_SkipData(self *C.QTcpSocket, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + +func (this *QTcpSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QTcpSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QTcpSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QTcpSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTcpSocket_WriteData +func miqt_exec_callback_QTcpSocket_WriteData(self *C.QTcpSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QTcpSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QTcpSocket) Delete() { - C.QTcpSocket_Delete(this.h) + C.QTcpSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qtcpsocket.h b/qt6/network/gen_qtcpsocket.h index 51f474eb..535ab9c4 100644 --- a/qt6/network/gen_qtcpsocket.h +++ b/qt6/network/gen_qtcpsocket.h @@ -15,17 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; +class QHostAddress; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QObject; class QTcpSocket; +class QVariant; #else +typedef struct QAbstractSocket QAbstractSocket; +typedef struct QHostAddress QHostAddress; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QTcpSocket QTcpSocket; +typedef struct QVariant QVariant; #endif -QTcpSocket* QTcpSocket_new(); -QTcpSocket* QTcpSocket_new2(QObject* parent); +void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self); void* QTcpSocket_Metacast(QTcpSocket* self, const char* param1); struct miqt_string QTcpSocket_Tr(const char* s); @@ -34,7 +44,49 @@ struct miqt_string QTcpSocket_Tr2(const char* s, const char* c); struct miqt_string QTcpSocket_Tr3(const char* s, const char* c, int n); bool QTcpSocket_Bind2(QTcpSocket* self, int addr, uint16_t port); bool QTcpSocket_Bind3(QTcpSocket* self, int addr, uint16_t port, int mode); -void QTcpSocket_Delete(QTcpSocket* self); +void QTcpSocket_override_virtual_Resume(void* self, intptr_t slot); +void QTcpSocket_virtualbase_Resume(void* self); +void QTcpSocket_override_virtual_Bind(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_Bind(void* self, QHostAddress* address, uint16_t port, int mode); +void QTcpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QTcpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QTcpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QTcpSocket_virtualbase_DisconnectFromHost(void* self); +void QTcpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_BytesAvailable(const void* self); +void QTcpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_BytesToWrite(const void* self); +void QTcpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QTcpSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QTcpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot); +intptr_t QTcpSocket_virtualbase_SocketDescriptor(const void* self); +void QTcpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QTcpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QTcpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QTcpSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QTcpSocket_virtualbase_SocketOption(void* self, int option); +void QTcpSocket_override_virtual_Close(void* self, intptr_t slot); +void QTcpSocket_virtualbase_Close(void* self); +void QTcpSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_IsSequential(const void* self); +void QTcpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QTcpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QTcpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QTcpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QTcpSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QTcpSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QTcpSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QTcpSocket_override_virtual_SkipData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_SkipData(void* self, long long maxSize); +void QTcpSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QTcpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QTcpSocket_Delete(QTcpSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/network/gen_qudpsocket.cpp b/qt6/network/gen_qudpsocket.cpp index 48f50dc1..1f644f08 100644 --- a/qt6/network/gen_qudpsocket.cpp +++ b/qt6/network/gen_qudpsocket.cpp @@ -1,5 +1,8 @@ +#include #include #include +#include +#include #include #include #include @@ -8,16 +11,564 @@ #include #include #include +#include #include #include "gen_qudpsocket.h" #include "_cgo_export.h" -QUdpSocket* QUdpSocket_new() { - return new QUdpSocket(); +class MiqtVirtualQUdpSocket : public virtual QUdpSocket { +public: + + MiqtVirtualQUdpSocket(): QUdpSocket() {}; + MiqtVirtualQUdpSocket(QObject* parent): QUdpSocket(parent) {}; + + virtual ~MiqtVirtualQUdpSocket() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Resume = 0; + + // Subclass to allow providing a Go implementation + virtual void resume() override { + if (handle__Resume == 0) { + QUdpSocket::resume(); + return; + } + + + miqt_exec_callback_QUdpSocket_Resume(this, handle__Resume); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Resume() { + + QUdpSocket::resume(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Bind = 0; + + // Subclass to allow providing a Go implementation + virtual bool bind(const QHostAddress& address, quint16 port, QAbstractSocket::BindMode mode) override { + if (handle__Bind == 0) { + return QUdpSocket::bind(address, port, mode); + } + + const QHostAddress& address_ret = address; + // Cast returned reference into pointer + QHostAddress* sigval1 = const_cast(&address_ret); + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QAbstractSocket::BindMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QUdpSocket_Bind(this, handle__Bind, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Bind(QHostAddress* address, uint16_t port, int mode) { + + return QUdpSocket::bind(*address, static_cast(port), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectToHost = 0; + + // Subclass to allow providing a Go implementation + virtual void connectToHost(const QString& hostName, quint16 port, QIODeviceBase::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) override { + if (handle__ConnectToHost == 0) { + QUdpSocket::connectToHost(hostName, port, mode, protocol); + return; + } + + const QString hostName_ret = hostName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray hostName_b = hostName_ret.toUtf8(); + struct miqt_string hostName_ms; + hostName_ms.len = hostName_b.length(); + hostName_ms.data = static_cast(malloc(hostName_ms.len)); + memcpy(hostName_ms.data, hostName_b.data(), hostName_ms.len); + struct miqt_string sigval1 = hostName_ms; + quint16 port_ret = port; + uint16_t sigval2 = static_cast(port_ret); + QIODeviceBase::OpenMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QAbstractSocket::NetworkLayerProtocol protocol_ret = protocol; + int sigval4 = static_cast(protocol_ret); + + miqt_exec_callback_QUdpSocket_ConnectToHost(this, handle__ConnectToHost, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectToHost(struct miqt_string hostName, uint16_t port, int mode, int protocol) { + QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); + + QUdpSocket::connectToHost(hostName_QString, static_cast(port), static_cast(mode), static_cast(protocol)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectFromHost = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectFromHost() override { + if (handle__DisconnectFromHost == 0) { + QUdpSocket::disconnectFromHost(); + return; + } + + + miqt_exec_callback_QUdpSocket_DisconnectFromHost(this, handle__DisconnectFromHost); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectFromHost() { + + QUdpSocket::disconnectFromHost(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesAvailable = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesAvailable() const override { + if (handle__BytesAvailable == 0) { + return QUdpSocket::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QUdpSocket_BytesAvailable(const_cast(this), handle__BytesAvailable); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesAvailable() const { + + qint64 _ret = QUdpSocket::bytesAvailable(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BytesToWrite = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 bytesToWrite() const override { + if (handle__BytesToWrite == 0) { + return QUdpSocket::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QUdpSocket_BytesToWrite(const_cast(this), handle__BytesToWrite); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_BytesToWrite() const { + + qint64 _ret = QUdpSocket::bytesToWrite(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetReadBufferSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setReadBufferSize(qint64 size) override { + if (handle__SetReadBufferSize == 0) { + QUdpSocket::setReadBufferSize(size); + return; + } + + qint64 size_ret = size; + long long sigval1 = static_cast(size_ret); + + miqt_exec_callback_QUdpSocket_SetReadBufferSize(this, handle__SetReadBufferSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetReadBufferSize(long long size) { + + QUdpSocket::setReadBufferSize(static_cast(size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual qintptr socketDescriptor() const override { + if (handle__SocketDescriptor == 0) { + return QUdpSocket::socketDescriptor(); + } + + + intptr_t callback_return_value = miqt_exec_callback_QUdpSocket_SocketDescriptor(const_cast(this), handle__SocketDescriptor); + + return (qintptr)(callback_return_value); + } + + // Wrapper to allow calling protected method + intptr_t virtualbase_SocketDescriptor() const { + + qintptr _ret = QUdpSocket::socketDescriptor(); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketDescriptor = 0; + + // Subclass to allow providing a Go implementation + virtual bool setSocketDescriptor(qintptr socketDescriptor, QAbstractSocket::SocketState state, QIODeviceBase::OpenMode openMode) override { + if (handle__SetSocketDescriptor == 0) { + return QUdpSocket::setSocketDescriptor(socketDescriptor, state, openMode); + } + + qintptr socketDescriptor_ret = socketDescriptor; + intptr_t sigval1 = static_cast(socketDescriptor_ret); + QAbstractSocket::SocketState state_ret = state; + int sigval2 = static_cast(state_ret); + QIODeviceBase::OpenMode openMode_ret = openMode; + int sigval3 = static_cast(openMode_ret); + + bool callback_return_value = miqt_exec_callback_QUdpSocket_SetSocketDescriptor(this, handle__SetSocketDescriptor, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetSocketDescriptor(intptr_t socketDescriptor, int state, int openMode) { + + return QUdpSocket::setSocketDescriptor((qintptr)(socketDescriptor), static_cast(state), static_cast(openMode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetSocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) override { + if (handle__SetSocketOption == 0) { + QUdpSocket::setSocketOption(option, value); + return; + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + miqt_exec_callback_QUdpSocket_SetSocketOption(this, handle__SetSocketOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSocketOption(int option, QVariant* value) { + + QUdpSocket::setSocketOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SocketOption = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant socketOption(QAbstractSocket::SocketOption option) override { + if (handle__SocketOption == 0) { + return QUdpSocket::socketOption(option); + } + + QAbstractSocket::SocketOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QUdpSocket_SocketOption(this, handle__SocketOption, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_SocketOption(int option) { + + return new QVariant(QUdpSocket::socketOption(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Close = 0; + + // Subclass to allow providing a Go implementation + virtual void close() override { + if (handle__Close == 0) { + QUdpSocket::close(); + return; + } + + + miqt_exec_callback_QUdpSocket_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QUdpSocket::close(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsSequential = 0; + + // Subclass to allow providing a Go implementation + virtual bool isSequential() const override { + if (handle__IsSequential == 0) { + return QUdpSocket::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QUdpSocket_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QUdpSocket::isSequential(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForConnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForConnected(int msecs) override { + if (handle__WaitForConnected == 0) { + return QUdpSocket::waitForConnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForConnected(this, handle__WaitForConnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForConnected(int msecs) { + + return QUdpSocket::waitForConnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForReadyRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForReadyRead(int msecs) override { + if (handle__WaitForReadyRead == 0) { + return QUdpSocket::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QUdpSocket::waitForReadyRead(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForBytesWritten = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForBytesWritten(int msecs) override { + if (handle__WaitForBytesWritten == 0) { + return QUdpSocket::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QUdpSocket::waitForBytesWritten(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WaitForDisconnected = 0; + + // Subclass to allow providing a Go implementation + virtual bool waitForDisconnected(int msecs) override { + if (handle__WaitForDisconnected == 0) { + return QUdpSocket::waitForDisconnected(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QUdpSocket_WaitForDisconnected(this, handle__WaitForDisconnected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForDisconnected(int msecs) { + + return QUdpSocket::waitForDisconnected(static_cast(msecs)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readData(char* data, qint64 maxlen) override { + if (handle__ReadData == 0) { + return QUdpSocket::readData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadData(char* data, long long maxlen) { + + qint64 _ret = QUdpSocket::readData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ReadLineData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 readLineData(char* data, qint64 maxlen) override { + if (handle__ReadLineData == 0) { + return QUdpSocket::readLineData(data, maxlen); + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_ReadLineData(this, handle__ReadLineData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_ReadLineData(char* data, long long maxlen) { + + qint64 _ret = QUdpSocket::readLineData(data, static_cast(maxlen)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SkipData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 skipData(qint64 maxSize) override { + if (handle__SkipData == 0) { + return QUdpSocket::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_SkipData(this, handle__SkipData, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_SkipData(long long maxSize) { + + qint64 _ret = QUdpSocket::skipData(static_cast(maxSize)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WriteData = 0; + + // Subclass to allow providing a Go implementation + virtual qint64 writeData(const char* data, qint64 lenVal) override { + if (handle__WriteData == 0) { + return QUdpSocket::writeData(data, lenVal); + } + + const char* sigval1 = (const char*) data; + qint64 lenVal_ret = lenVal; + long long sigval2 = static_cast(lenVal_ret); + + long long callback_return_value = miqt_exec_callback_QUdpSocket_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + long long virtualbase_WriteData(const char* data, long long lenVal) { + + qint64 _ret = QUdpSocket::writeData(data, static_cast(lenVal)); + return static_cast(_ret); + + } + +}; + +void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(); + *outptr_QUdpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } -QUdpSocket* QUdpSocket_new2(QObject* parent) { - return new QUdpSocket(parent); +void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(parent); + *outptr_QUdpSocket = ret; + *outptr_QAbstractSocket = static_cast(ret); + *outptr_QIODevice = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); } QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self) { @@ -145,7 +696,179 @@ long long QUdpSocket_ReadDatagram4(QUdpSocket* self, char* data, long long maxle return static_cast(_ret); } -void QUdpSocket_Delete(QUdpSocket* self) { - delete self; +void QUdpSocket_override_virtual_Resume(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__Resume = slot; +} + +void QUdpSocket_virtualbase_Resume(void* self) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_Resume(); +} + +void QUdpSocket_override_virtual_Bind(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__Bind = slot; +} + +bool QUdpSocket_virtualbase_Bind(void* self, QHostAddress* address, uint16_t port, int mode) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_Bind(address, port, mode); +} + +void QUdpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__ConnectToHost = slot; +} + +void QUdpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_ConnectToHost(hostName, port, mode, protocol); +} + +void QUdpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__DisconnectFromHost = slot; +} + +void QUdpSocket_virtualbase_DisconnectFromHost(void* self) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_DisconnectFromHost(); +} + +void QUdpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__BytesAvailable = slot; +} + +long long QUdpSocket_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_BytesAvailable(); +} + +void QUdpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__BytesToWrite = slot; +} + +long long QUdpSocket_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_BytesToWrite(); +} + +void QUdpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SetReadBufferSize = slot; +} + +void QUdpSocket_virtualbase_SetReadBufferSize(void* self, long long size) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SetReadBufferSize(size); +} + +void QUdpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SocketDescriptor = slot; +} + +intptr_t QUdpSocket_virtualbase_SocketDescriptor(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_SocketDescriptor(); +} + +void QUdpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SetSocketDescriptor = slot; +} + +bool QUdpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SetSocketDescriptor(socketDescriptor, state, openMode); +} + +void QUdpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SetSocketOption = slot; +} + +void QUdpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SetSocketOption(option, value); +} + +void QUdpSocket_override_virtual_SocketOption(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SocketOption = slot; +} + +QVariant* QUdpSocket_virtualbase_SocketOption(void* self, int option) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SocketOption(option); +} + +void QUdpSocket_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__Close = slot; +} + +void QUdpSocket_virtualbase_Close(void* self) { + ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_Close(); +} + +void QUdpSocket_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__IsSequential = slot; +} + +bool QUdpSocket_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQUdpSocket*)(self) )->virtualbase_IsSequential(); +} + +void QUdpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForConnected = slot; +} + +bool QUdpSocket_virtualbase_WaitForConnected(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForConnected(msecs); +} + +void QUdpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QUdpSocket_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QUdpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QUdpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QUdpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WaitForDisconnected = slot; +} + +bool QUdpSocket_virtualbase_WaitForDisconnected(void* self, int msecs) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WaitForDisconnected(msecs); +} + +void QUdpSocket_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__ReadData = slot; +} + +long long QUdpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_ReadData(data, maxlen); +} + +void QUdpSocket_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__ReadLineData = slot; +} + +long long QUdpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QUdpSocket_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__SkipData = slot; +} + +long long QUdpSocket_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_SkipData(maxSize); +} + +void QUdpSocket_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QUdpSocket*)(self) )->handle__WriteData = slot; +} + +long long QUdpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal) { + return ( (MiqtVirtualQUdpSocket*)(self) )->virtualbase_WriteData(data, lenVal); +} + +void QUdpSocket_Delete(QUdpSocket* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/network/gen_qudpsocket.go b/qt6/network/gen_qudpsocket.go index 951e0f1d..6364d1c2 100644 --- a/qt6/network/gen_qudpsocket.go +++ b/qt6/network/gen_qudpsocket.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QUdpSocket struct { - h *C.QUdpSocket + h *C.QUdpSocket + isSubclass bool *QAbstractSocket } @@ -33,27 +35,51 @@ func (this *QUdpSocket) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQUdpSocket(h *C.QUdpSocket) *QUdpSocket { +// newQUdpSocket constructs the type using only CGO pointers. +func newQUdpSocket(h *C.QUdpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QUdpSocket { if h == nil { return nil } - return &QUdpSocket{h: h, QAbstractSocket: UnsafeNewQAbstractSocket(unsafe.Pointer(h))} + return &QUdpSocket{h: h, + QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } -func UnsafeNewQUdpSocket(h unsafe.Pointer) *QUdpSocket { - return newQUdpSocket((*C.QUdpSocket)(h)) +// UnsafeNewQUdpSocket constructs the type using only unsafe pointers. +func UnsafeNewQUdpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QUdpSocket { + if h == nil { + return nil + } + + return &QUdpSocket{h: (*C.QUdpSocket)(h), + QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} } // NewQUdpSocket constructs a new QUdpSocket object. func NewQUdpSocket() *QUdpSocket { - ret := C.QUdpSocket_new() - return newQUdpSocket(ret) + var outptr_QUdpSocket *C.QUdpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QUdpSocket_new(&outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } // NewQUdpSocket2 constructs a new QUdpSocket object. func NewQUdpSocket2(parent *qt6.QObject) *QUdpSocket { - ret := C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer())) - return newQUdpSocket(ret) + var outptr_QUdpSocket *C.QUdpSocket = nil + var outptr_QAbstractSocket *C.QAbstractSocket = nil + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret } func (this *QUdpSocket) MetaObject() *qt6.QMetaObject { @@ -193,9 +219,540 @@ func (this *QUdpSocket) ReadDatagram4(data string, maxlen int64, host *QHostAddr return (int64)(C.QUdpSocket_ReadDatagram4(this.h, data_Cstring, (C.longlong)(maxlen), host.cPointer(), (*C.uint16_t)(unsafe.Pointer(port)))) } +func (this *QUdpSocket) callVirtualBase_Resume() { + + C.QUdpSocket_virtualbase_Resume(unsafe.Pointer(this.h)) + +} +func (this *QUdpSocket) OnResume(slot func(super func())) { + C.QUdpSocket_override_virtual_Resume(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_Resume +func miqt_exec_callback_QUdpSocket_Resume(self *C.QUdpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUdpSocket{h: self}).callVirtualBase_Resume) + +} + +func (this *QUdpSocket) callVirtualBase_Bind(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool { + + return (bool)(C.QUdpSocket_virtualbase_Bind(unsafe.Pointer(this.h), address.cPointer(), (C.uint16_t)(port), (C.int)(mode))) + +} +func (this *QUdpSocket) OnBind(slot func(super func(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool, address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool) { + C.QUdpSocket_override_virtual_Bind(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_Bind +func miqt_exec_callback_QUdpSocket_Bind(self *C.QUdpSocket, cb C.intptr_t, address *C.QHostAddress, port C.uint16_t, mode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool, address *QHostAddress, port uint16, mode QAbstractSocket__BindFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQHostAddress(unsafe.Pointer(address)) + slotval2 := (uint16)(port) + + slotval3 := (QAbstractSocket__BindFlag)(mode) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_Bind, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_ConnectToHost(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol) { + hostName_ms := C.struct_miqt_string{} + hostName_ms.data = C.CString(hostName) + hostName_ms.len = C.size_t(len(hostName)) + defer C.free(unsafe.Pointer(hostName_ms.data)) + + C.QUdpSocket_virtualbase_ConnectToHost(unsafe.Pointer(this.h), hostName_ms, (C.uint16_t)(port), (C.int)(mode), (C.int)(protocol)) + +} +func (this *QUdpSocket) OnConnectToHost(slot func(super func(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) { + C.QUdpSocket_override_virtual_ConnectToHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_ConnectToHost +func miqt_exec_callback_QUdpSocket_ConnectToHost(self *C.QUdpSocket, cb C.intptr_t, hostName C.struct_miqt_string, port C.uint16_t, mode C.int, protocol C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol), hostName string, port uint16, mode qt6.QIODeviceBase__OpenModeFlag, protocol QAbstractSocket__NetworkLayerProtocol)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var hostName_ms C.struct_miqt_string = hostName + hostName_ret := C.GoStringN(hostName_ms.data, C.int(int64(hostName_ms.len))) + C.free(unsafe.Pointer(hostName_ms.data)) + slotval1 := hostName_ret + slotval2 := (uint16)(port) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(mode) + + slotval4 := (QAbstractSocket__NetworkLayerProtocol)(protocol) + + gofunc((&QUdpSocket{h: self}).callVirtualBase_ConnectToHost, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QUdpSocket) callVirtualBase_DisconnectFromHost() { + + C.QUdpSocket_virtualbase_DisconnectFromHost(unsafe.Pointer(this.h)) + +} +func (this *QUdpSocket) OnDisconnectFromHost(slot func(super func())) { + C.QUdpSocket_override_virtual_DisconnectFromHost(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_DisconnectFromHost +func miqt_exec_callback_QUdpSocket_DisconnectFromHost(self *C.QUdpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUdpSocket{h: self}).callVirtualBase_DisconnectFromHost) + +} + +func (this *QUdpSocket) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QUdpSocket_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnBytesAvailable(slot func(super func() int64) int64) { + C.QUdpSocket_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_BytesAvailable +func miqt_exec_callback_QUdpSocket_BytesAvailable(self *C.QUdpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QUdpSocket_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnBytesToWrite(slot func(super func() int64) int64) { + C.QUdpSocket_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_BytesToWrite +func miqt_exec_callback_QUdpSocket_BytesToWrite(self *C.QUdpSocket, cb C.intptr_t) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SetReadBufferSize(size int64) { + + C.QUdpSocket_virtualbase_SetReadBufferSize(unsafe.Pointer(this.h), (C.longlong)(size)) + +} +func (this *QUdpSocket) OnSetReadBufferSize(slot func(super func(size int64), size int64)) { + C.QUdpSocket_override_virtual_SetReadBufferSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SetReadBufferSize +func miqt_exec_callback_QUdpSocket_SetReadBufferSize(self *C.QUdpSocket, cb C.intptr_t, size C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size int64), size int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(size) + + gofunc((&QUdpSocket{h: self}).callVirtualBase_SetReadBufferSize, slotval1) + +} + +func (this *QUdpSocket) callVirtualBase_SocketDescriptor() uintptr { + + return (uintptr)(C.QUdpSocket_virtualbase_SocketDescriptor(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnSocketDescriptor(slot func(super func() uintptr) uintptr) { + C.QUdpSocket_override_virtual_SocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SocketDescriptor +func miqt_exec_callback_QUdpSocket_SocketDescriptor(self *C.QUdpSocket, cb C.intptr_t) C.intptr_t { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() uintptr) uintptr) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SocketDescriptor) + + return (C.intptr_t)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SetSocketDescriptor(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QUdpSocket_virtualbase_SetSocketDescriptor(unsafe.Pointer(this.h), (C.intptr_t)(socketDescriptor), (C.int)(state), (C.int)(openMode))) + +} +func (this *QUdpSocket) OnSetSocketDescriptor(slot func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) { + C.QUdpSocket_override_virtual_SetSocketDescriptor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SetSocketDescriptor +func miqt_exec_callback_QUdpSocket_SetSocketDescriptor(self *C.QUdpSocket, cb C.intptr_t, socketDescriptor C.intptr_t, state C.int, openMode C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool, socketDescriptor uintptr, state QAbstractSocket__SocketState, openMode qt6.QIODeviceBase__OpenModeFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (uintptr)(socketDescriptor) + + slotval2 := (QAbstractSocket__SocketState)(state) + + slotval3 := (qt6.QIODeviceBase__OpenModeFlag)(openMode) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SetSocketDescriptor, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SetSocketOption(option QAbstractSocket__SocketOption, value *qt6.QVariant) { + + C.QUdpSocket_virtualbase_SetSocketOption(unsafe.Pointer(this.h), (C.int)(option), (*C.QVariant)(value.UnsafePointer())) + +} +func (this *QUdpSocket) OnSetSocketOption(slot func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) { + C.QUdpSocket_override_virtual_SetSocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SetSocketOption +func miqt_exec_callback_QUdpSocket_SetSocketOption(self *C.QUdpSocket, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption, value *qt6.QVariant), option QAbstractSocket__SocketOption, value *qt6.QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QUdpSocket{h: self}).callVirtualBase_SetSocketOption, slotval1, slotval2) + +} + +func (this *QUdpSocket) callVirtualBase_SocketOption(option QAbstractSocket__SocketOption) *qt6.QVariant { + + _ret := C.QUdpSocket_virtualbase_SocketOption(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUdpSocket) OnSocketOption(slot func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) { + C.QUdpSocket_override_virtual_SocketOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SocketOption +func miqt_exec_callback_QUdpSocket_SocketOption(self *C.QUdpSocket, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QAbstractSocket__SocketOption) *qt6.QVariant, option QAbstractSocket__SocketOption) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractSocket__SocketOption)(option) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SocketOption, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QUdpSocket) callVirtualBase_Close() { + + C.QUdpSocket_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QUdpSocket) OnClose(slot func(super func())) { + C.QUdpSocket_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_Close +func miqt_exec_callback_QUdpSocket_Close(self *C.QUdpSocket, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QUdpSocket{h: self}).callVirtualBase_Close) + +} + +func (this *QUdpSocket) callVirtualBase_IsSequential() bool { + + return (bool)(C.QUdpSocket_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QUdpSocket) OnIsSequential(slot func(super func() bool) bool) { + C.QUdpSocket_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_IsSequential +func miqt_exec_callback_QUdpSocket_IsSequential(self *C.QUdpSocket, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForConnected(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForConnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForConnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForConnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForConnected +func miqt_exec_callback_QUdpSocket_WaitForConnected(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForConnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForReadyRead +func miqt_exec_callback_QUdpSocket_WaitForReadyRead(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForBytesWritten +func miqt_exec_callback_QUdpSocket_WaitForBytesWritten(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WaitForDisconnected(msecs int) bool { + + return (bool)(C.QUdpSocket_virtualbase_WaitForDisconnected(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QUdpSocket) OnWaitForDisconnected(slot func(super func(msecs int) bool, msecs int) bool) { + C.QUdpSocket_override_virtual_WaitForDisconnected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WaitForDisconnected +func miqt_exec_callback_QUdpSocket_WaitForDisconnected(self *C.QUdpSocket, cb C.intptr_t, msecs C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(msecs) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WaitForDisconnected, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_ReadData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QUdpSocket_virtualbase_ReadData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QUdpSocket) OnReadData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QUdpSocket_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_ReadData +func miqt_exec_callback_QUdpSocket_ReadData(self *C.QUdpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_ReadData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QUdpSocket_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QUdpSocket) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QUdpSocket_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_ReadLineData +func miqt_exec_callback_QUdpSocket_ReadLineData(self *C.QUdpSocket, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(maxlen) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QUdpSocket_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QUdpSocket) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QUdpSocket_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_SkipData +func miqt_exec_callback_QUdpSocket_SkipData(self *C.QUdpSocket, cb C.intptr_t, maxSize C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(maxSize int64) int64, maxSize int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(maxSize) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} + +func (this *QUdpSocket) callVirtualBase_WriteData(data string, lenVal int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QUdpSocket_virtualbase_WriteData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(lenVal))) + +} +func (this *QUdpSocket) OnWriteData(slot func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) { + C.QUdpSocket_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUdpSocket_WriteData +func miqt_exec_callback_QUdpSocket_WriteData(self *C.QUdpSocket, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, lenVal int64) int64, data string, lenVal int64) int64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + data_ret := data + slotval1 := C.GoString(data_ret) + + slotval2 := (int64)(lenVal) + + virtualReturn := gofunc((&QUdpSocket{h: self}).callVirtualBase_WriteData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QUdpSocket) Delete() { - C.QUdpSocket_Delete(this.h) + C.QUdpSocket_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/network/gen_qudpsocket.h b/qt6/network/gen_qudpsocket.h index f3f07e44..fbc0090d 100644 --- a/qt6/network/gen_qudpsocket.h +++ b/qt6/network/gen_qudpsocket.h @@ -15,25 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractSocket; class QByteArray; class QHostAddress; +class QIODevice; +class QIODeviceBase; class QMetaObject; class QNetworkDatagram; class QNetworkInterface; class QObject; class QUdpSocket; +class QVariant; #else +typedef struct QAbstractSocket QAbstractSocket; typedef struct QByteArray QByteArray; typedef struct QHostAddress QHostAddress; +typedef struct QIODevice QIODevice; +typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; typedef struct QNetworkDatagram QNetworkDatagram; typedef struct QNetworkInterface QNetworkInterface; typedef struct QObject QObject; typedef struct QUdpSocket QUdpSocket; +typedef struct QVariant QVariant; #endif -QUdpSocket* QUdpSocket_new(); -QUdpSocket* QUdpSocket_new2(QObject* parent); +void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self); void* QUdpSocket_Metacast(QUdpSocket* self, const char* param1); struct miqt_string QUdpSocket_Tr(const char* s); @@ -58,7 +66,49 @@ bool QUdpSocket_Bind3(QUdpSocket* self, int addr, uint16_t port, int mode); QNetworkDatagram* QUdpSocket_ReceiveDatagram1(QUdpSocket* self, long long maxSize); long long QUdpSocket_ReadDatagram3(QUdpSocket* self, char* data, long long maxlen, QHostAddress* host); long long QUdpSocket_ReadDatagram4(QUdpSocket* self, char* data, long long maxlen, QHostAddress* host, uint16_t* port); -void QUdpSocket_Delete(QUdpSocket* self); +void QUdpSocket_override_virtual_Resume(void* self, intptr_t slot); +void QUdpSocket_virtualbase_Resume(void* self); +void QUdpSocket_override_virtual_Bind(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_Bind(void* self, QHostAddress* address, uint16_t port, int mode); +void QUdpSocket_override_virtual_ConnectToHost(void* self, intptr_t slot); +void QUdpSocket_virtualbase_ConnectToHost(void* self, struct miqt_string hostName, uint16_t port, int mode, int protocol); +void QUdpSocket_override_virtual_DisconnectFromHost(void* self, intptr_t slot); +void QUdpSocket_virtualbase_DisconnectFromHost(void* self); +void QUdpSocket_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_BytesAvailable(const void* self); +void QUdpSocket_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_BytesToWrite(const void* self); +void QUdpSocket_override_virtual_SetReadBufferSize(void* self, intptr_t slot); +void QUdpSocket_virtualbase_SetReadBufferSize(void* self, long long size); +void QUdpSocket_override_virtual_SocketDescriptor(void* self, intptr_t slot); +intptr_t QUdpSocket_virtualbase_SocketDescriptor(const void* self); +void QUdpSocket_override_virtual_SetSocketDescriptor(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_SetSocketDescriptor(void* self, intptr_t socketDescriptor, int state, int openMode); +void QUdpSocket_override_virtual_SetSocketOption(void* self, intptr_t slot); +void QUdpSocket_virtualbase_SetSocketOption(void* self, int option, QVariant* value); +void QUdpSocket_override_virtual_SocketOption(void* self, intptr_t slot); +QVariant* QUdpSocket_virtualbase_SocketOption(void* self, int option); +void QUdpSocket_override_virtual_Close(void* self, intptr_t slot); +void QUdpSocket_virtualbase_Close(void* self); +void QUdpSocket_override_virtual_IsSequential(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_IsSequential(const void* self); +void QUdpSocket_override_virtual_WaitForConnected(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForConnected(void* self, int msecs); +void QUdpSocket_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForReadyRead(void* self, int msecs); +void QUdpSocket_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QUdpSocket_override_virtual_WaitForDisconnected(void* self, intptr_t slot); +bool QUdpSocket_virtualbase_WaitForDisconnected(void* self, int msecs); +void QUdpSocket_override_virtual_ReadData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QUdpSocket_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QUdpSocket_override_virtual_SkipData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_SkipData(void* self, long long maxSize); +void QUdpSocket_override_virtual_WriteData(void* self, intptr_t slot); +long long QUdpSocket_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QUdpSocket_Delete(QUdpSocket* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qabstractprintdialog.cpp b/qt6/printsupport/gen_qabstractprintdialog.cpp index 4dc69ba2..b8283ec1 100644 --- a/qt6/printsupport/gen_qabstractprintdialog.cpp +++ b/qt6/printsupport/gen_qabstractprintdialog.cpp @@ -1,7 +1,17 @@ #include +#include +#include +#include +#include +#include #include #include +#include +#include #include +#include +#include +#include #include #include #include @@ -10,12 +20,359 @@ #include "gen_qabstractprintdialog.h" #include "_cgo_export.h" -QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer) { - return new QAbstractPrintDialog(printer); +class MiqtVirtualQAbstractPrintDialog : public virtual QAbstractPrintDialog { +public: + + MiqtVirtualQAbstractPrintDialog(QPrinter* printer): QAbstractPrintDialog(printer) {}; + MiqtVirtualQAbstractPrintDialog(QPrinter* printer, QWidget* parent): QAbstractPrintDialog(printer, parent) {}; + + virtual ~MiqtVirtualQAbstractPrintDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QAbstractPrintDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractPrintDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractPrintDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QAbstractPrintDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractPrintDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractPrintDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QAbstractPrintDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractPrintDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractPrintDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QAbstractPrintDialog::open(); + return; + } + + + miqt_exec_callback_QAbstractPrintDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QAbstractPrintDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QAbstractPrintDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractPrintDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QAbstractPrintDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int param1) override { + if (handle__Done == 0) { + QAbstractPrintDialog::done(param1); + return; + } + + int sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int param1) { + + QAbstractPrintDialog::done(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QAbstractPrintDialog::accept(); + return; + } + + + miqt_exec_callback_QAbstractPrintDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QAbstractPrintDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QAbstractPrintDialog::reject(); + return; + } + + + miqt_exec_callback_QAbstractPrintDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QAbstractPrintDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QAbstractPrintDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QAbstractPrintDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QAbstractPrintDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QAbstractPrintDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QAbstractPrintDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QAbstractPrintDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QAbstractPrintDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QAbstractPrintDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QAbstractPrintDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QAbstractPrintDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QAbstractPrintDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QAbstractPrintDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QAbstractPrintDialog::eventFilter(param1, param2); + + } + +}; + +void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer); + *outptr_QAbstractPrintDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent) { - return new QAbstractPrintDialog(printer, parent); +void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer, parent); + *outptr_QAbstractPrintDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self) { @@ -106,7 +463,123 @@ struct miqt_string QAbstractPrintDialog_Tr3(const char* s, const char* c, int n) return _ms; } -void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self) { - delete self; +void QAbstractPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__SetVisible = slot; +} + +void QAbstractPrintDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractPrintDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractPrintDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractPrintDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractPrintDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractPrintDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Open = slot; +} + +void QAbstractPrintDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Open(); +} + +void QAbstractPrintDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Exec = slot; +} + +int QAbstractPrintDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Exec(); +} + +void QAbstractPrintDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Done = slot; +} + +void QAbstractPrintDialog_virtualbase_Done(void* self, int param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Done(param1); +} + +void QAbstractPrintDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Accept = slot; +} + +void QAbstractPrintDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Accept(); +} + +void QAbstractPrintDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__Reject = slot; +} + +void QAbstractPrintDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_Reject(); +} + +void QAbstractPrintDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractPrintDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QAbstractPrintDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPrintDialog*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractPrintDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQAbstractPrintDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qabstractprintdialog.go b/qt6/printsupport/gen_qabstractprintdialog.go index bfe11e73..bf8509d1 100644 --- a/qt6/printsupport/gen_qabstractprintdialog.go +++ b/qt6/printsupport/gen_qabstractprintdialog.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -35,7 +36,8 @@ const ( ) type QAbstractPrintDialog struct { - h *C.QAbstractPrintDialog + h *C.QAbstractPrintDialog + isSubclass bool *qt6.QDialog } @@ -53,27 +55,51 @@ func (this *QAbstractPrintDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAbstractPrintDialog(h *C.QAbstractPrintDialog) *QAbstractPrintDialog { +// newQAbstractPrintDialog constructs the type using only CGO pointers. +func newQAbstractPrintDialog(h *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractPrintDialog { if h == nil { return nil } - return &QAbstractPrintDialog{h: h, QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h))} + return &QAbstractPrintDialog{h: h, + QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer) *QAbstractPrintDialog { - return newQAbstractPrintDialog((*C.QAbstractPrintDialog)(h)) +// UnsafeNewQAbstractPrintDialog constructs the type using only unsafe pointers. +func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractPrintDialog { + if h == nil { + return nil + } + + return &QAbstractPrintDialog{h: (*C.QAbstractPrintDialog)(h), + QDialog: qt6.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQAbstractPrintDialog constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog(printer *QPrinter) *QAbstractPrintDialog { - ret := C.QAbstractPrintDialog_new(printer.cPointer()) - return newQAbstractPrintDialog(ret) + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractPrintDialog_new(printer.cPointer(), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQAbstractPrintDialog2 constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog2(printer *QPrinter, parent *qt6.QWidget) *QAbstractPrintDialog { - ret := C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQAbstractPrintDialog(ret) + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QAbstractPrintDialog) MetaObject() *qt6.QMetaObject { @@ -138,7 +164,7 @@ func (this *QAbstractPrintDialog) ToPage() int { } func (this *QAbstractPrintDialog) Printer() *QPrinter { - return UnsafeNewQPrinter(unsafe.Pointer(C.QAbstractPrintDialog_Printer(this.h))) + return UnsafeNewQPrinter(unsafe.Pointer(C.QAbstractPrintDialog_Printer(this.h)), nil, nil) } func QAbstractPrintDialog_Tr2(s string, c string) string { @@ -163,9 +189,328 @@ func QAbstractPrintDialog_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractPrintDialog) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractPrintDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractPrintDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractPrintDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_SetVisible +func miqt_exec_callback_QAbstractPrintDialog_SetVisible(self *C.QAbstractPrintDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QAbstractPrintDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractPrintDialog) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QAbstractPrintDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_SizeHint +func miqt_exec_callback_QAbstractPrintDialog_SizeHint(self *C.QAbstractPrintDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QAbstractPrintDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractPrintDialog) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QAbstractPrintDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_MinimumSizeHint +func miqt_exec_callback_QAbstractPrintDialog_MinimumSizeHint(self *C.QAbstractPrintDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Open() { + + C.QAbstractPrintDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPrintDialog) OnOpen(slot func(super func())) { + C.QAbstractPrintDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Open +func miqt_exec_callback_QAbstractPrintDialog_Open(self *C.QAbstractPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Exec() int { + + return (int)(C.QAbstractPrintDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QAbstractPrintDialog) OnExec(slot func(super func() int) int) { + C.QAbstractPrintDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Exec +func miqt_exec_callback_QAbstractPrintDialog_Exec(self *C.QAbstractPrintDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Done(param1 int) { + + C.QAbstractPrintDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(param1)) + +} +func (this *QAbstractPrintDialog) OnDone(slot func(super func(param1 int), param1 int)) { + C.QAbstractPrintDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Done +func miqt_exec_callback_QAbstractPrintDialog_Done(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int), param1 int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Accept() { + + C.QAbstractPrintDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPrintDialog) OnAccept(slot func(super func())) { + C.QAbstractPrintDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Accept +func miqt_exec_callback_QAbstractPrintDialog_Accept(self *C.QAbstractPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_Reject() { + + C.QAbstractPrintDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPrintDialog) OnReject(slot func(super func())) { + C.QAbstractPrintDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_Reject +func miqt_exec_callback_QAbstractPrintDialog_Reject(self *C.QAbstractPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_KeyPressEvent(param1 *qt6.QKeyEvent) { + + C.QAbstractPrintDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnKeyPressEvent(slot func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) { + C.QAbstractPrintDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent +func miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_CloseEvent(param1 *qt6.QCloseEvent) { + + C.QAbstractPrintDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnCloseEvent(slot func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) { + C.QAbstractPrintDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_CloseEvent +func miqt_exec_callback_QAbstractPrintDialog_CloseEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_ShowEvent(param1 *qt6.QShowEvent) { + + C.QAbstractPrintDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnShowEvent(slot func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) { + C.QAbstractPrintDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_ShowEvent +func miqt_exec_callback_QAbstractPrintDialog_ShowEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_ResizeEvent(param1 *qt6.QResizeEvent) { + + C.QAbstractPrintDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnResizeEvent(slot func(super func(param1 *qt6.QResizeEvent), param1 *qt6.QResizeEvent)) { + C.QAbstractPrintDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_ResizeEvent +func miqt_exec_callback_QAbstractPrintDialog_ResizeEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QResizeEvent), param1 *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_ContextMenuEvent(param1 *qt6.QContextMenuEvent) { + + C.QAbstractPrintDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QAbstractPrintDialog) OnContextMenuEvent(slot func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) { + C.QAbstractPrintDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent +func miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractPrintDialog) callVirtualBase_EventFilter(param1 *qt6.QObject, param2 *qt6.QEvent) bool { + + return (bool)(C.QAbstractPrintDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QAbstractPrintDialog) OnEventFilter(slot func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) { + C.QAbstractPrintDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPrintDialog_EventFilter +func miqt_exec_callback_QAbstractPrintDialog_EventFilter(self *C.QAbstractPrintDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractPrintDialog) Delete() { - C.QAbstractPrintDialog_Delete(this.h) + C.QAbstractPrintDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qabstractprintdialog.h b/qt6/printsupport/gen_qabstractprintdialog.h index e39ab16c..7dd9d45d 100644 --- a/qt6/printsupport/gen_qabstractprintdialog.h +++ b/qt6/printsupport/gen_qabstractprintdialog.h @@ -16,18 +16,38 @@ extern "C" { #ifdef __cplusplus class QAbstractPrintDialog; +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else typedef struct QAbstractPrintDialog QAbstractPrintDialog; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer); -QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent); +void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self); void* QAbstractPrintDialog_Metacast(QAbstractPrintDialog* self, const char* param1); struct miqt_string QAbstractPrintDialog_Tr(const char* s); @@ -43,7 +63,35 @@ int QAbstractPrintDialog_ToPage(const QAbstractPrintDialog* self); QPrinter* QAbstractPrintDialog_Printer(const QAbstractPrintDialog* self); struct miqt_string QAbstractPrintDialog_Tr2(const char* s, const char* c); struct miqt_string QAbstractPrintDialog_Tr3(const char* s, const char* c, int n); -void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self); +void QAbstractPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_SetVisible(void* self, bool visible); +void QAbstractPrintDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractPrintDialog_virtualbase_SizeHint(const void* self); +void QAbstractPrintDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractPrintDialog_virtualbase_MinimumSizeHint(const void* self); +void QAbstractPrintDialog_override_virtual_Open(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Open(void* self); +void QAbstractPrintDialog_override_virtual_Exec(void* self, intptr_t slot); +int QAbstractPrintDialog_virtualbase_Exec(void* self); +void QAbstractPrintDialog_override_virtual_Done(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Done(void* self, int param1); +void QAbstractPrintDialog_override_virtual_Accept(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Accept(void* self); +void QAbstractPrintDialog_override_virtual_Reject(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_Reject(void* self); +void QAbstractPrintDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QAbstractPrintDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QAbstractPrintDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QAbstractPrintDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QAbstractPrintDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractPrintDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QAbstractPrintDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractPrintDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QAbstractPrintDialog_Delete(QAbstractPrintDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qpagesetupdialog.cpp b/qt6/printsupport/gen_qpagesetupdialog.cpp index a08f9999..9e620ea8 100644 --- a/qt6/printsupport/gen_qpagesetupdialog.cpp +++ b/qt6/printsupport/gen_qpagesetupdialog.cpp @@ -1,6 +1,16 @@ +#include +#include +#include +#include +#include #include +#include #include +#include #include +#include +#include +#include #include #include #include @@ -9,20 +19,379 @@ #include "gen_qpagesetupdialog.h" #include "_cgo_export.h" -QPageSetupDialog* QPageSetupDialog_new(QWidget* parent) { - return new QPageSetupDialog(parent); +class MiqtVirtualQPageSetupDialog : public virtual QPageSetupDialog { +public: + + MiqtVirtualQPageSetupDialog(QWidget* parent): QPageSetupDialog(parent) {}; + MiqtVirtualQPageSetupDialog(QPrinter* printer): QPageSetupDialog(printer) {}; + MiqtVirtualQPageSetupDialog(): QPageSetupDialog() {}; + MiqtVirtualQPageSetupDialog(QPrinter* printer, QWidget* parent): QPageSetupDialog(printer, parent) {}; + + virtual ~MiqtVirtualQPageSetupDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QPageSetupDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QPageSetupDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QPageSetupDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QPageSetupDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QPageSetupDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QPageSetupDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPageSetupDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPageSetupDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPageSetupDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPageSetupDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPageSetupDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPageSetupDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPageSetupDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPageSetupDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPageSetupDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QPageSetupDialog::open(); + return; + } + + + miqt_exec_callback_QPageSetupDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QPageSetupDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QPageSetupDialog::accept(); + return; + } + + + miqt_exec_callback_QPageSetupDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QPageSetupDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QPageSetupDialog::reject(); + return; + } + + + miqt_exec_callback_QPageSetupDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QPageSetupDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QPageSetupDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QPageSetupDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QPageSetupDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QPageSetupDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QPageSetupDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QPageSetupDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QPageSetupDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QPageSetupDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QPageSetupDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QPageSetupDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QPageSetupDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QPageSetupDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPageSetupDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QPageSetupDialog::eventFilter(param1, param2); + + } + +}; + +void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(parent); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer) { - return new QPageSetupDialog(printer); +void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPageSetupDialog* QPageSetupDialog_new3() { - return new QPageSetupDialog(); +void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent) { - return new QPageSetupDialog(printer, parent); +void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer, parent); + *outptr_QPageSetupDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self) { @@ -78,7 +447,123 @@ struct miqt_string QPageSetupDialog_Tr3(const char* s, const char* c, int n) { return _ms; } -void QPageSetupDialog_Delete(QPageSetupDialog* self) { - delete self; +void QPageSetupDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Exec = slot; +} + +int QPageSetupDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Exec(); +} + +void QPageSetupDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Done = slot; +} + +void QPageSetupDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Done(result); +} + +void QPageSetupDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__SetVisible = slot; +} + +void QPageSetupDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QPageSetupDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QPageSetupDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_SizeHint(); +} + +void QPageSetupDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPageSetupDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPageSetupDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Open = slot; +} + +void QPageSetupDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Open(); +} + +void QPageSetupDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Accept = slot; +} + +void QPageSetupDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Accept(); +} + +void QPageSetupDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__Reject = slot; +} + +void QPageSetupDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_Reject(); +} + +void QPageSetupDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QPageSetupDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QPageSetupDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__CloseEvent = slot; +} + +void QPageSetupDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QPageSetupDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__ShowEvent = slot; +} + +void QPageSetupDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QPageSetupDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QPageSetupDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QPageSetupDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPageSetupDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QPageSetupDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPageSetupDialog*)(self) )->handle__EventFilter = slot; +} + +bool QPageSetupDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQPageSetupDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QPageSetupDialog_Delete(QPageSetupDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qpagesetupdialog.go b/qt6/printsupport/gen_qpagesetupdialog.go index 7c40c1b5..b6c4b471 100644 --- a/qt6/printsupport/gen_qpagesetupdialog.go +++ b/qt6/printsupport/gen_qpagesetupdialog.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QPageSetupDialog struct { - h *C.QPageSetupDialog + h *C.QPageSetupDialog + isSubclass bool *qt6.QDialog } @@ -33,39 +35,79 @@ func (this *QPageSetupDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPageSetupDialog(h *C.QPageSetupDialog) *QPageSetupDialog { +// newQPageSetupDialog constructs the type using only CGO pointers. +func newQPageSetupDialog(h *C.QPageSetupDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPageSetupDialog { if h == nil { return nil } - return &QPageSetupDialog{h: h, QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h))} + return &QPageSetupDialog{h: h, + QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPageSetupDialog(h unsafe.Pointer) *QPageSetupDialog { - return newQPageSetupDialog((*C.QPageSetupDialog)(h)) +// UnsafeNewQPageSetupDialog constructs the type using only unsafe pointers. +func UnsafeNewQPageSetupDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPageSetupDialog { + if h == nil { + return nil + } + + return &QPageSetupDialog{h: (*C.QPageSetupDialog)(h), + QDialog: qt6.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPageSetupDialog constructs a new QPageSetupDialog object. func NewQPageSetupDialog(parent *qt6.QWidget) *QPageSetupDialog { - ret := C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer())) - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPageSetupDialog2 constructs a new QPageSetupDialog object. func NewQPageSetupDialog2(printer *QPrinter) *QPageSetupDialog { - ret := C.QPageSetupDialog_new2(printer.cPointer()) - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new2(printer.cPointer(), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPageSetupDialog3 constructs a new QPageSetupDialog object. func NewQPageSetupDialog3() *QPageSetupDialog { - ret := C.QPageSetupDialog_new3() - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new3(&outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPageSetupDialog4 constructs a new QPageSetupDialog object. func NewQPageSetupDialog4(printer *QPrinter, parent *qt6.QWidget) *QPageSetupDialog { - ret := C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPageSetupDialog(ret) + var outptr_QPageSetupDialog *C.QPageSetupDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPageSetupDialog) MetaObject() *qt6.QMetaObject { @@ -96,7 +138,7 @@ func (this *QPageSetupDialog) Done(result int) { } func (this *QPageSetupDialog) Printer() *QPrinter { - return UnsafeNewQPrinter(unsafe.Pointer(C.QPageSetupDialog_Printer(this.h))) + return UnsafeNewQPrinter(unsafe.Pointer(C.QPageSetupDialog_Printer(this.h)), nil, nil) } func QPageSetupDialog_Tr2(s string, c string) string { @@ -121,9 +163,328 @@ func QPageSetupDialog_Tr3(s string, c string, n int) string { return _ret } +func (this *QPageSetupDialog) callVirtualBase_Exec() int { + + return (int)(C.QPageSetupDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QPageSetupDialog) OnExec(slot func(super func() int) int) { + C.QPageSetupDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Exec +func miqt_exec_callback_QPageSetupDialog_Exec(self *C.QPageSetupDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QPageSetupDialog) callVirtualBase_Done(result int) { + + C.QPageSetupDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QPageSetupDialog) OnDone(slot func(super func(result int), result int)) { + C.QPageSetupDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Done +func miqt_exec_callback_QPageSetupDialog_Done(self *C.QPageSetupDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_SetVisible(visible bool) { + + C.QPageSetupDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPageSetupDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPageSetupDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_SetVisible +func miqt_exec_callback_QPageSetupDialog_SetVisible(self *C.QPageSetupDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QPageSetupDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPageSetupDialog) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QPageSetupDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_SizeHint +func miqt_exec_callback_QPageSetupDialog_SizeHint(self *C.QPageSetupDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPageSetupDialog) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QPageSetupDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPageSetupDialog) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QPageSetupDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_MinimumSizeHint +func miqt_exec_callback_QPageSetupDialog_MinimumSizeHint(self *C.QPageSetupDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPageSetupDialog) callVirtualBase_Open() { + + C.QPageSetupDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QPageSetupDialog) OnOpen(slot func(super func())) { + C.QPageSetupDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Open +func miqt_exec_callback_QPageSetupDialog_Open(self *C.QPageSetupDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QPageSetupDialog) callVirtualBase_Accept() { + + C.QPageSetupDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QPageSetupDialog) OnAccept(slot func(super func())) { + C.QPageSetupDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Accept +func miqt_exec_callback_QPageSetupDialog_Accept(self *C.QPageSetupDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QPageSetupDialog) callVirtualBase_Reject() { + + C.QPageSetupDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QPageSetupDialog) OnReject(slot func(super func())) { + C.QPageSetupDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_Reject +func miqt_exec_callback_QPageSetupDialog_Reject(self *C.QPageSetupDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QPageSetupDialog) callVirtualBase_KeyPressEvent(param1 *qt6.QKeyEvent) { + + C.QPageSetupDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnKeyPressEvent(slot func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) { + C.QPageSetupDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_KeyPressEvent +func miqt_exec_callback_QPageSetupDialog_KeyPressEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_CloseEvent(param1 *qt6.QCloseEvent) { + + C.QPageSetupDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnCloseEvent(slot func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) { + C.QPageSetupDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_CloseEvent +func miqt_exec_callback_QPageSetupDialog_CloseEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_ShowEvent(param1 *qt6.QShowEvent) { + + C.QPageSetupDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnShowEvent(slot func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) { + C.QPageSetupDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_ShowEvent +func miqt_exec_callback_QPageSetupDialog_ShowEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_ResizeEvent(param1 *qt6.QResizeEvent) { + + C.QPageSetupDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnResizeEvent(slot func(super func(param1 *qt6.QResizeEvent), param1 *qt6.QResizeEvent)) { + C.QPageSetupDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_ResizeEvent +func miqt_exec_callback_QPageSetupDialog_ResizeEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QResizeEvent), param1 *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_ContextMenuEvent(param1 *qt6.QContextMenuEvent) { + + C.QPageSetupDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QPageSetupDialog) OnContextMenuEvent(slot func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) { + C.QPageSetupDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_ContextMenuEvent +func miqt_exec_callback_QPageSetupDialog_ContextMenuEvent(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPageSetupDialog) callVirtualBase_EventFilter(param1 *qt6.QObject, param2 *qt6.QEvent) bool { + + return (bool)(C.QPageSetupDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QPageSetupDialog) OnEventFilter(slot func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) { + C.QPageSetupDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPageSetupDialog_EventFilter +func miqt_exec_callback_QPageSetupDialog_EventFilter(self *C.QPageSetupDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPageSetupDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPageSetupDialog) Delete() { - C.QPageSetupDialog_Delete(this.h) + C.QPageSetupDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qpagesetupdialog.h b/qt6/printsupport/gen_qpagesetupdialog.h index e197d923..57ca377c 100644 --- a/qt6/printsupport/gen_qpagesetupdialog.h +++ b/qt6/printsupport/gen_qpagesetupdialog.h @@ -15,21 +15,41 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; class QPageSetupDialog; +class QPaintDevice; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QPageSetupDialog QPageSetupDialog; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QPageSetupDialog* QPageSetupDialog_new(QWidget* parent); -QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer); -QPageSetupDialog* QPageSetupDialog_new3(); -QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent); +void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self); void* QPageSetupDialog_Metacast(QPageSetupDialog* self, const char* param1); struct miqt_string QPageSetupDialog_Tr(const char* s); @@ -38,7 +58,35 @@ void QPageSetupDialog_Done(QPageSetupDialog* self, int result); QPrinter* QPageSetupDialog_Printer(QPageSetupDialog* self); struct miqt_string QPageSetupDialog_Tr2(const char* s, const char* c); struct miqt_string QPageSetupDialog_Tr3(const char* s, const char* c, int n); -void QPageSetupDialog_Delete(QPageSetupDialog* self); +void QPageSetupDialog_override_virtual_Exec(void* self, intptr_t slot); +int QPageSetupDialog_virtualbase_Exec(void* self); +void QPageSetupDialog_override_virtual_Done(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Done(void* self, int result); +void QPageSetupDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_SetVisible(void* self, bool visible); +void QPageSetupDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPageSetupDialog_virtualbase_SizeHint(const void* self); +void QPageSetupDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPageSetupDialog_virtualbase_MinimumSizeHint(const void* self); +void QPageSetupDialog_override_virtual_Open(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Open(void* self); +void QPageSetupDialog_override_virtual_Accept(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Accept(void* self); +void QPageSetupDialog_override_virtual_Reject(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_Reject(void* self); +void QPageSetupDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QPageSetupDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QPageSetupDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QPageSetupDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QPageSetupDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPageSetupDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QPageSetupDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPageSetupDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QPageSetupDialog_Delete(QPageSetupDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qprintdialog.cpp b/qt6/printsupport/gen_qprintdialog.cpp index 6c722dff..59624de4 100644 --- a/qt6/printsupport/gen_qprintdialog.cpp +++ b/qt6/printsupport/gen_qprintdialog.cpp @@ -1,4 +1,8 @@ +#include +#include #include +#include +#include #include #include #include @@ -9,20 +13,149 @@ #include "gen_qprintdialog.h" #include "_cgo_export.h" -QPrintDialog* QPrintDialog_new(QWidget* parent) { - return new QPrintDialog(parent); +class MiqtVirtualQPrintDialog : public virtual QPrintDialog { +public: + + MiqtVirtualQPrintDialog(QWidget* parent): QPrintDialog(parent) {}; + MiqtVirtualQPrintDialog(QPrinter* printer): QPrintDialog(printer) {}; + MiqtVirtualQPrintDialog(): QPrintDialog() {}; + MiqtVirtualQPrintDialog(QPrinter* printer, QWidget* parent): QPrintDialog(printer, parent) {}; + + virtual ~MiqtVirtualQPrintDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QPrintDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QPrintDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QPrintDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QPrintDialog::accept(); + return; + } + + + miqt_exec_callback_QPrintDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QPrintDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QPrintDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QPrintDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QPrintDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPrintDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPrintDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPrintDialog::setVisible(visible); + + } + +}; + +void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(parent); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintDialog* QPrintDialog_new2(QPrinter* printer) { - return new QPrintDialog(printer); +void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintDialog* QPrintDialog_new3() { - return new QPrintDialog(); +void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent) { - return new QPrintDialog(printer, parent); +void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer, parent); + *outptr_QPrintDialog = ret; + *outptr_QAbstractPrintDialog = static_cast(ret); + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self) { @@ -82,7 +215,7 @@ void QPrintDialog_Accepted(QPrintDialog* self, QPrinter* printer) { } void QPrintDialog_connect_Accepted(QPrintDialog* self, intptr_t slot) { - QPrintDialog::connect(self, static_cast(&QPrintDialog::accepted), self, [=](QPrinter* printer) { + MiqtVirtualQPrintDialog::connect(self, static_cast(&QPrintDialog::accepted), self, [=](QPrinter* printer) { QPrinter* sigval1 = printer; miqt_exec_callback_QPrintDialog_Accepted(slot, sigval1); }); @@ -114,7 +247,43 @@ void QPrintDialog_SetOption2(QPrintDialog* self, int option, bool on) { self->setOption(static_cast(option), on); } -void QPrintDialog_Delete(QPrintDialog* self) { - delete self; +void QPrintDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__Exec = slot; +} + +int QPrintDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_Exec(); +} + +void QPrintDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__Accept = slot; +} + +void QPrintDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_Accept(); +} + +void QPrintDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__Done = slot; +} + +void QPrintDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_Done(result); +} + +void QPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPrintDialog*)(self) )->handle__SetVisible = slot; +} + +void QPrintDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPrintDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QPrintDialog_Delete(QPrintDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qprintdialog.go b/qt6/printsupport/gen_qprintdialog.go index e95f257d..5a79dc71 100644 --- a/qt6/printsupport/gen_qprintdialog.go +++ b/qt6/printsupport/gen_qprintdialog.go @@ -16,7 +16,8 @@ import ( ) type QPrintDialog struct { - h *C.QPrintDialog + h *C.QPrintDialog + isSubclass bool *QAbstractPrintDialog } @@ -34,39 +35,83 @@ func (this *QPrintDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrintDialog(h *C.QPrintDialog) *QPrintDialog { +// newQPrintDialog constructs the type using only CGO pointers. +func newQPrintDialog(h *C.QPrintDialog, h_QAbstractPrintDialog *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintDialog { if h == nil { return nil } - return &QPrintDialog{h: h, QAbstractPrintDialog: UnsafeNewQAbstractPrintDialog(unsafe.Pointer(h))} + return &QPrintDialog{h: h, + QAbstractPrintDialog: newQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } -func UnsafeNewQPrintDialog(h unsafe.Pointer) *QPrintDialog { - return newQPrintDialog((*C.QPrintDialog)(h)) +// UnsafeNewQPrintDialog constructs the type using only unsafe pointers. +func UnsafeNewQPrintDialog(h unsafe.Pointer, h_QAbstractPrintDialog unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintDialog { + if h == nil { + return nil + } + + return &QPrintDialog{h: (*C.QPrintDialog)(h), + QAbstractPrintDialog: UnsafeNewQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPrintDialog constructs a new QPrintDialog object. func NewQPrintDialog(parent *qt6.QWidget) *QPrintDialog { - ret := C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer())) - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintDialog2 constructs a new QPrintDialog object. func NewQPrintDialog2(printer *QPrinter) *QPrintDialog { - ret := C.QPrintDialog_new2(printer.cPointer()) - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new2(printer.cPointer(), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintDialog3 constructs a new QPrintDialog object. func NewQPrintDialog3() *QPrintDialog { - ret := C.QPrintDialog_new3() - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new3(&outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintDialog4 constructs a new QPrintDialog object. func NewQPrintDialog4(printer *QPrinter, parent *qt6.QWidget) *QPrintDialog { - ret := C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPrintDialog(ret) + var outptr_QPrintDialog *C.QPrintDialog = nil + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrintDialog) MetaObject() *qt6.QMetaObject { @@ -135,7 +180,7 @@ func miqt_exec_callback_QPrintDialog_Accepted(cb C.intptr_t, printer *C.QPrinter } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer)) + slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer), nil, nil) gofunc(slotval1) } @@ -166,9 +211,97 @@ func (this *QPrintDialog) SetOption2(option QAbstractPrintDialog__PrintDialogOpt C.QPrintDialog_SetOption2(this.h, (C.int)(option), (C.bool)(on)) } +func (this *QPrintDialog) callVirtualBase_Exec() int { + + return (int)(C.QPrintDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QPrintDialog) OnExec(slot func(super func() int) int) { + C.QPrintDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_Exec +func miqt_exec_callback_QPrintDialog_Exec(self *C.QPrintDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintDialog) callVirtualBase_Accept() { + + C.QPrintDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QPrintDialog) OnAccept(slot func(super func())) { + C.QPrintDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_Accept +func miqt_exec_callback_QPrintDialog_Accept(self *C.QPrintDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QPrintDialog) callVirtualBase_Done(result int) { + + C.QPrintDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QPrintDialog) OnDone(slot func(super func(result int), result int)) { + C.QPrintDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_Done +func miqt_exec_callback_QPrintDialog_Done(self *C.QPrintDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QPrintDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QPrintDialog) callVirtualBase_SetVisible(visible bool) { + + C.QPrintDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPrintDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPrintDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintDialog_SetVisible +func miqt_exec_callback_QPrintDialog_SetVisible(self *C.QPrintDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPrintDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + // Delete this object from C++ memory. func (this *QPrintDialog) Delete() { - C.QPrintDialog_Delete(this.h) + C.QPrintDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qprintdialog.h b/qt6/printsupport/gen_qprintdialog.h index b9daf22f..ad776ec7 100644 --- a/qt6/printsupport/gen_qprintdialog.h +++ b/qt6/printsupport/gen_qprintdialog.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QAbstractPrintDialog; +class QDialog; class QMetaObject; +class QObject; +class QPaintDevice; class QPrintDialog; class QPrinter; class QWidget; #else +typedef struct QAbstractPrintDialog QAbstractPrintDialog; +typedef struct QDialog QDialog; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrintDialog QPrintDialog; typedef struct QPrinter QPrinter; typedef struct QWidget QWidget; #endif -QPrintDialog* QPrintDialog_new(QWidget* parent); -QPrintDialog* QPrintDialog_new2(QPrinter* printer); -QPrintDialog* QPrintDialog_new3(); -QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent); +void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self); void* QPrintDialog_Metacast(QPrintDialog* self, const char* param1); struct miqt_string QPrintDialog_Tr(const char* s); @@ -46,7 +54,15 @@ void QPrintDialog_connect_Accepted(QPrintDialog* self, intptr_t slot); struct miqt_string QPrintDialog_Tr2(const char* s, const char* c); struct miqt_string QPrintDialog_Tr3(const char* s, const char* c, int n); void QPrintDialog_SetOption2(QPrintDialog* self, int option, bool on); -void QPrintDialog_Delete(QPrintDialog* self); +void QPrintDialog_override_virtual_Exec(void* self, intptr_t slot); +int QPrintDialog_virtualbase_Exec(void* self); +void QPrintDialog_override_virtual_Accept(void* self, intptr_t slot); +void QPrintDialog_virtualbase_Accept(void* self); +void QPrintDialog_override_virtual_Done(void* self, intptr_t slot); +void QPrintDialog_virtualbase_Done(void* self, int result); +void QPrintDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QPrintDialog_virtualbase_SetVisible(void* self, bool visible); +void QPrintDialog_Delete(QPrintDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qprintengine.cpp b/qt6/printsupport/gen_qprintengine.cpp index c4f4ea21..5eb5615c 100644 --- a/qt6/printsupport/gen_qprintengine.cpp +++ b/qt6/printsupport/gen_qprintengine.cpp @@ -33,7 +33,11 @@ void QPrintEngine_OperatorAssign(QPrintEngine* self, QPrintEngine* param1) { self->operator=(*param1); } -void QPrintEngine_Delete(QPrintEngine* self) { - delete self; +void QPrintEngine_Delete(QPrintEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qprintengine.go b/qt6/printsupport/gen_qprintengine.go index 36f6049d..0ab61ad1 100644 --- a/qt6/printsupport/gen_qprintengine.go +++ b/qt6/printsupport/gen_qprintengine.go @@ -52,7 +52,8 @@ const ( ) type QPrintEngine struct { - h *C.QPrintEngine + h *C.QPrintEngine + isSubclass bool } func (this *QPrintEngine) cPointer() *C.QPrintEngine { @@ -69,6 +70,7 @@ func (this *QPrintEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPrintEngine constructs the type using only CGO pointers. func newQPrintEngine(h *C.QPrintEngine) *QPrintEngine { if h == nil { return nil @@ -76,8 +78,13 @@ func newQPrintEngine(h *C.QPrintEngine) *QPrintEngine { return &QPrintEngine{h: h} } +// UnsafeNewQPrintEngine constructs the type using only unsafe pointers. func UnsafeNewQPrintEngine(h unsafe.Pointer) *QPrintEngine { - return newQPrintEngine((*C.QPrintEngine)(h)) + if h == nil { + return nil + } + + return &QPrintEngine{h: (*C.QPrintEngine)(h)} } func (this *QPrintEngine) SetProperty(key QPrintEngine__PrintEnginePropertyKey, value *qt6.QVariant) { @@ -113,7 +120,7 @@ func (this *QPrintEngine) OperatorAssign(param1 *QPrintEngine) { // Delete this object from C++ memory. func (this *QPrintEngine) Delete() { - C.QPrintEngine_Delete(this.h) + C.QPrintEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qprintengine.h b/qt6/printsupport/gen_qprintengine.h index a1365351..e68cf218 100644 --- a/qt6/printsupport/gen_qprintengine.h +++ b/qt6/printsupport/gen_qprintengine.h @@ -29,7 +29,7 @@ bool QPrintEngine_Abort(QPrintEngine* self); int QPrintEngine_Metric(const QPrintEngine* self, int param1); int QPrintEngine_PrinterState(const QPrintEngine* self); void QPrintEngine_OperatorAssign(QPrintEngine* self, QPrintEngine* param1); -void QPrintEngine_Delete(QPrintEngine* self); +void QPrintEngine_Delete(QPrintEngine* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qprinter.cpp b/qt6/printsupport/gen_qprinter.cpp index 8788b40d..bd2f86fd 100644 --- a/qt6/printsupport/gen_qprinter.cpp +++ b/qt6/printsupport/gen_qprinter.cpp @@ -1,4 +1,10 @@ #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -11,20 +17,261 @@ #include "gen_qprinter.h" #include "_cgo_export.h" -QPrinter* QPrinter_new() { - return new QPrinter(); +class MiqtVirtualQPrinter : public virtual QPrinter { +public: + + MiqtVirtualQPrinter(): QPrinter() {}; + MiqtVirtualQPrinter(const QPrinterInfo& printer): QPrinter(printer) {}; + MiqtVirtualQPrinter(QPrinter::PrinterMode mode): QPrinter(mode) {}; + MiqtVirtualQPrinter(const QPrinterInfo& printer, QPrinter::PrinterMode mode): QPrinter(printer, mode) {}; + + virtual ~MiqtVirtualQPrinter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPrinter::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPrinter_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPrinter::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewPage = 0; + + // Subclass to allow providing a Go implementation + virtual bool newPage() override { + if (handle__NewPage == 0) { + return QPrinter::newPage(); + } + + + bool callback_return_value = miqt_exec_callback_QPrinter_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NewPage() { + + return QPrinter::newPage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPrinter::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPrinter_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPrinter::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QPrinter::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPrinter_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QPrinter::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageLayout = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageLayout(const QPageLayout& pageLayout) override { + if (handle__SetPageLayout == 0) { + return QPrinter::setPageLayout(pageLayout); + } + + const QPageLayout& pageLayout_ret = pageLayout; + // Cast returned reference into pointer + QPageLayout* sigval1 = const_cast(&pageLayout_ret); + + bool callback_return_value = miqt_exec_callback_QPrinter_SetPageLayout(this, handle__SetPageLayout, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageLayout(QPageLayout* pageLayout) { + + return QPrinter::setPageLayout(*pageLayout); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSize = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageSize(const QPageSize& pageSize) override { + if (handle__SetPageSize == 0) { + return QPrinter::setPageSize(pageSize); + } + + const QPageSize& pageSize_ret = pageSize; + // Cast returned reference into pointer + QPageSize* sigval1 = const_cast(&pageSize_ret); + + bool callback_return_value = miqt_exec_callback_QPrinter_SetPageSize(this, handle__SetPageSize, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageSize(QPageSize* pageSize) { + + return QPrinter::setPageSize(*pageSize); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageOrientation = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageOrientation(QPageLayout::Orientation orientation) override { + if (handle__SetPageOrientation == 0) { + return QPrinter::setPageOrientation(orientation); + } + + QPageLayout::Orientation orientation_ret = orientation; + int sigval1 = static_cast(orientation_ret); + + bool callback_return_value = miqt_exec_callback_QPrinter_SetPageOrientation(this, handle__SetPageOrientation, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageOrientation(int orientation) { + + return QPrinter::setPageOrientation(static_cast(orientation)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageMargins = 0; + + // Subclass to allow providing a Go implementation + virtual bool setPageMargins(const QMarginsF& margins, QPageLayout::Unit units) override { + if (handle__SetPageMargins == 0) { + return QPrinter::setPageMargins(margins, units); + } + + const QMarginsF& margins_ret = margins; + // Cast returned reference into pointer + QMarginsF* sigval1 = const_cast(&margins_ret); + QPageLayout::Unit units_ret = units; + int sigval2 = static_cast(units_ret); + + bool callback_return_value = miqt_exec_callback_QPrinter_SetPageMargins(this, handle__SetPageMargins, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SetPageMargins(QMarginsF* margins, int units) { + + return QPrinter::setPageMargins(*margins, static_cast(units)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageRanges = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageRanges(const QPageRanges& ranges) override { + if (handle__SetPageRanges == 0) { + QPrinter::setPageRanges(ranges); + return; + } + + const QPageRanges& ranges_ret = ranges; + // Cast returned reference into pointer + QPageRanges* sigval1 = const_cast(&ranges_ret); + + miqt_exec_callback_QPrinter_SetPageRanges(this, handle__SetPageRanges, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageRanges(QPageRanges* ranges) { + + QPrinter::setPageRanges(*ranges); + + } + +}; + +void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrinter* QPrinter_new2(QPrinterInfo* printer) { - return new QPrinter(*printer); +void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrinter* QPrinter_new3(int mode) { - return new QPrinter(static_cast(mode)); +void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(static_cast(mode)); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode) { - return new QPrinter(*printer, static_cast(mode)); +void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer, static_cast(mode)); + *outptr_QPrinter = ret; + *outptr_QPagedPaintDevice = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } int QPrinter_DevType(const QPrinter* self) { @@ -292,7 +539,83 @@ int QPrinter_PrintRange(const QPrinter* self) { return static_cast(_ret); } -void QPrinter_Delete(QPrinter* self) { - delete self; +void QPrinter_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__DevType = slot; +} + +int QPrinter_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPrinter*)(self) )->virtualbase_DevType(); +} + +void QPrinter_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__NewPage = slot; +} + +bool QPrinter_virtualbase_NewPage(void* self) { + return ( (MiqtVirtualQPrinter*)(self) )->virtualbase_NewPage(); +} + +void QPrinter_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPrinter_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPrinter*)(self) )->virtualbase_PaintEngine(); +} + +void QPrinter_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__Metric = slot; +} + +int QPrinter_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQPrinter*)(self) )->virtualbase_Metric(param1); +} + +void QPrinter_override_virtual_SetPageLayout(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageLayout = slot; +} + +bool QPrinter_virtualbase_SetPageLayout(void* self, QPageLayout* pageLayout) { + return ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageLayout(pageLayout); +} + +void QPrinter_override_virtual_SetPageSize(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageSize = slot; +} + +bool QPrinter_virtualbase_SetPageSize(void* self, QPageSize* pageSize) { + return ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageSize(pageSize); +} + +void QPrinter_override_virtual_SetPageOrientation(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageOrientation = slot; +} + +bool QPrinter_virtualbase_SetPageOrientation(void* self, int orientation) { + return ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageOrientation(orientation); +} + +void QPrinter_override_virtual_SetPageMargins(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageMargins = slot; +} + +bool QPrinter_virtualbase_SetPageMargins(void* self, QMarginsF* margins, int units) { + return ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageMargins(margins, units); +} + +void QPrinter_override_virtual_SetPageRanges(void* self, intptr_t slot) { + dynamic_cast( (QPrinter*)(self) )->handle__SetPageRanges = slot; +} + +void QPrinter_virtualbase_SetPageRanges(void* self, QPageRanges* ranges) { + ( (MiqtVirtualQPrinter*)(self) )->virtualbase_SetPageRanges(ranges); +} + +void QPrinter_Delete(QPrinter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qprinter.go b/qt6/printsupport/gen_qprinter.go index 34e7d972..d8e93c6b 100644 --- a/qt6/printsupport/gen_qprinter.go +++ b/qt6/printsupport/gen_qprinter.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -105,7 +106,8 @@ const ( ) type QPrinter struct { - h *C.QPrinter + h *C.QPrinter + isSubclass bool *qt6.QPagedPaintDevice } @@ -123,39 +125,71 @@ func (this *QPrinter) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrinter(h *C.QPrinter) *QPrinter { +// newQPrinter constructs the type using only CGO pointers. +func newQPrinter(h *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPrinter { if h == nil { return nil } - return &QPrinter{h: h, QPagedPaintDevice: qt6.UnsafeNewQPagedPaintDevice(unsafe.Pointer(h))} + return &QPrinter{h: h, + QPagedPaintDevice: qt6.UnsafeNewQPagedPaintDevice(unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPrinter(h unsafe.Pointer) *QPrinter { - return newQPrinter((*C.QPrinter)(h)) +// UnsafeNewQPrinter constructs the type using only unsafe pointers. +func UnsafeNewQPrinter(h unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrinter { + if h == nil { + return nil + } + + return &QPrinter{h: (*C.QPrinter)(h), + QPagedPaintDevice: qt6.UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} } // NewQPrinter constructs a new QPrinter object. func NewQPrinter() *QPrinter { - ret := C.QPrinter_new() - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new(&outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrinter2 constructs a new QPrinter object. func NewQPrinter2(printer *QPrinterInfo) *QPrinter { - ret := C.QPrinter_new2(printer.cPointer()) - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new2(printer.cPointer(), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrinter3 constructs a new QPrinter object. func NewQPrinter3(mode QPrinter__PrinterMode) *QPrinter { - ret := C.QPrinter_new3((C.int)(mode)) - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new3((C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrinter4 constructs a new QPrinter object. func NewQPrinter4(printer *QPrinterInfo, mode QPrinter__PrinterMode) *QPrinter { - ret := C.QPrinter_new4(printer.cPointer(), (C.int)(mode)) - return newQPrinter(ret) + var outptr_QPrinter *C.QPrinter = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrinter_new4(printer.cPointer(), (C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrinter) DevType() int { @@ -412,9 +446,223 @@ func (this *QPrinter) PrintRange() QPrinter__PrintRange { return (QPrinter__PrintRange)(C.QPrinter_PrintRange(this.h)) } +func (this *QPrinter) callVirtualBase_DevType() int { + + return (int)(C.QPrinter_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPrinter) OnDevType(slot func(super func() int) int) { + C.QPrinter_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_DevType +func miqt_exec_callback_QPrinter_DevType(self *C.QPrinter, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_NewPage() bool { + + return (bool)(C.QPrinter_virtualbase_NewPage(unsafe.Pointer(this.h))) + +} +func (this *QPrinter) OnNewPage(slot func(super func() bool) bool) { + C.QPrinter_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_NewPage +func miqt_exec_callback_QPrinter_NewPage(self *C.QPrinter, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_NewPage) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QPrinter_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPrinter) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QPrinter_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_PaintEngine +func miqt_exec_callback_QPrinter_PaintEngine(self *C.QPrinter, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrinter) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPrinter_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPrinter) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QPrinter_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_Metric +func miqt_exec_callback_QPrinter_Metric(self *C.QPrinter, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_SetPageLayout(pageLayout *qt6.QPageLayout) bool { + + return (bool)(C.QPrinter_virtualbase_SetPageLayout(unsafe.Pointer(this.h), (*C.QPageLayout)(pageLayout.UnsafePointer()))) + +} +func (this *QPrinter) OnSetPageLayout(slot func(super func(pageLayout *qt6.QPageLayout) bool, pageLayout *qt6.QPageLayout) bool) { + C.QPrinter_override_virtual_SetPageLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageLayout +func miqt_exec_callback_QPrinter_SetPageLayout(self *C.QPrinter, cb C.intptr_t, pageLayout *C.QPageLayout) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pageLayout *qt6.QPageLayout) bool, pageLayout *qt6.QPageLayout) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPageLayout(unsafe.Pointer(pageLayout)) + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_SetPageLayout, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_SetPageSize(pageSize *qt6.QPageSize) bool { + + return (bool)(C.QPrinter_virtualbase_SetPageSize(unsafe.Pointer(this.h), (*C.QPageSize)(pageSize.UnsafePointer()))) + +} +func (this *QPrinter) OnSetPageSize(slot func(super func(pageSize *qt6.QPageSize) bool, pageSize *qt6.QPageSize) bool) { + C.QPrinter_override_virtual_SetPageSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageSize +func miqt_exec_callback_QPrinter_SetPageSize(self *C.QPrinter, cb C.intptr_t, pageSize *C.QPageSize) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pageSize *qt6.QPageSize) bool, pageSize *qt6.QPageSize) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPageSize(unsafe.Pointer(pageSize)) + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_SetPageSize, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_SetPageOrientation(orientation qt6.QPageLayout__Orientation) bool { + + return (bool)(C.QPrinter_virtualbase_SetPageOrientation(unsafe.Pointer(this.h), (C.int)(orientation))) + +} +func (this *QPrinter) OnSetPageOrientation(slot func(super func(orientation qt6.QPageLayout__Orientation) bool, orientation qt6.QPageLayout__Orientation) bool) { + C.QPrinter_override_virtual_SetPageOrientation(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageOrientation +func miqt_exec_callback_QPrinter_SetPageOrientation(self *C.QPrinter, cb C.intptr_t, orientation C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(orientation qt6.QPageLayout__Orientation) bool, orientation qt6.QPageLayout__Orientation) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPageLayout__Orientation)(orientation) + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_SetPageOrientation, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_SetPageMargins(margins *qt6.QMarginsF, units qt6.QPageLayout__Unit) bool { + + return (bool)(C.QPrinter_virtualbase_SetPageMargins(unsafe.Pointer(this.h), (*C.QMarginsF)(margins.UnsafePointer()), (C.int)(units))) + +} +func (this *QPrinter) OnSetPageMargins(slot func(super func(margins *qt6.QMarginsF, units qt6.QPageLayout__Unit) bool, margins *qt6.QMarginsF, units qt6.QPageLayout__Unit) bool) { + C.QPrinter_override_virtual_SetPageMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageMargins +func miqt_exec_callback_QPrinter_SetPageMargins(self *C.QPrinter, cb C.intptr_t, margins *C.QMarginsF, units C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margins *qt6.QMarginsF, units qt6.QPageLayout__Unit) bool, margins *qt6.QMarginsF, units qt6.QPageLayout__Unit) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMarginsF(unsafe.Pointer(margins)) + slotval2 := (qt6.QPageLayout__Unit)(units) + + virtualReturn := gofunc((&QPrinter{h: self}).callVirtualBase_SetPageMargins, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrinter) callVirtualBase_SetPageRanges(ranges *qt6.QPageRanges) { + + C.QPrinter_virtualbase_SetPageRanges(unsafe.Pointer(this.h), (*C.QPageRanges)(ranges.UnsafePointer())) + +} +func (this *QPrinter) OnSetPageRanges(slot func(super func(ranges *qt6.QPageRanges), ranges *qt6.QPageRanges)) { + C.QPrinter_override_virtual_SetPageRanges(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrinter_SetPageRanges +func miqt_exec_callback_QPrinter_SetPageRanges(self *C.QPrinter, cb C.intptr_t, ranges *C.QPageRanges) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ranges *qt6.QPageRanges), ranges *qt6.QPageRanges)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPageRanges(unsafe.Pointer(ranges)) + + gofunc((&QPrinter{h: self}).callVirtualBase_SetPageRanges, slotval1) + +} + // Delete this object from C++ memory. func (this *QPrinter) Delete() { - C.QPrinter_Delete(this.h) + C.QPrinter_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qprinter.h b/qt6/printsupport/gen_qprinter.h index ef5d6b51..77ef96e6 100644 --- a/qt6/printsupport/gen_qprinter.h +++ b/qt6/printsupport/gen_qprinter.h @@ -15,12 +15,24 @@ extern "C" { #endif #ifdef __cplusplus +class QMarginsF; +class QPageLayout; +class QPageRanges; +class QPageSize; +class QPagedPaintDevice; +class QPaintDevice; class QPaintEngine; class QPrintEngine; class QPrinter; class QPrinterInfo; class QRectF; #else +typedef struct QMarginsF QMarginsF; +typedef struct QPageLayout QPageLayout; +typedef struct QPageRanges QPageRanges; +typedef struct QPageSize QPageSize; +typedef struct QPagedPaintDevice QPagedPaintDevice; +typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; typedef struct QPrintEngine QPrintEngine; typedef struct QPrinter QPrinter; @@ -28,10 +40,10 @@ typedef struct QPrinterInfo QPrinterInfo; typedef struct QRectF QRectF; #endif -QPrinter* QPrinter_new(); -QPrinter* QPrinter_new2(QPrinterInfo* printer); -QPrinter* QPrinter_new3(int mode); -QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode); +void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); int QPrinter_DevType(const QPrinter* self); void QPrinter_SetOutputFormat(QPrinter* self, int format); int QPrinter_OutputFormat(const QPrinter* self); @@ -82,7 +94,26 @@ int QPrinter_FromPage(const QPrinter* self); int QPrinter_ToPage(const QPrinter* self); void QPrinter_SetPrintRange(QPrinter* self, int rangeVal); int QPrinter_PrintRange(const QPrinter* self); -void QPrinter_Delete(QPrinter* self); +int QPrinter_Metric(const QPrinter* self, int param1); +void QPrinter_override_virtual_DevType(void* self, intptr_t slot); +int QPrinter_virtualbase_DevType(const void* self); +void QPrinter_override_virtual_NewPage(void* self, intptr_t slot); +bool QPrinter_virtualbase_NewPage(void* self); +void QPrinter_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPrinter_virtualbase_PaintEngine(const void* self); +void QPrinter_override_virtual_Metric(void* self, intptr_t slot); +int QPrinter_virtualbase_Metric(const void* self, int param1); +void QPrinter_override_virtual_SetPageLayout(void* self, intptr_t slot); +bool QPrinter_virtualbase_SetPageLayout(void* self, QPageLayout* pageLayout); +void QPrinter_override_virtual_SetPageSize(void* self, intptr_t slot); +bool QPrinter_virtualbase_SetPageSize(void* self, QPageSize* pageSize); +void QPrinter_override_virtual_SetPageOrientation(void* self, intptr_t slot); +bool QPrinter_virtualbase_SetPageOrientation(void* self, int orientation); +void QPrinter_override_virtual_SetPageMargins(void* self, intptr_t slot); +bool QPrinter_virtualbase_SetPageMargins(void* self, QMarginsF* margins, int units); +void QPrinter_override_virtual_SetPageRanges(void* self, intptr_t slot); +void QPrinter_virtualbase_SetPageRanges(void* self, QPageRanges* ranges); +void QPrinter_Delete(QPrinter* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qprinterinfo.cpp b/qt6/printsupport/gen_qprinterinfo.cpp index 30674afd..ce9912a5 100644 --- a/qt6/printsupport/gen_qprinterinfo.cpp +++ b/qt6/printsupport/gen_qprinterinfo.cpp @@ -9,16 +9,19 @@ #include "gen_qprinterinfo.h" #include "_cgo_export.h" -QPrinterInfo* QPrinterInfo_new() { - return new QPrinterInfo(); +void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo) { + QPrinterInfo* ret = new QPrinterInfo(); + *outptr_QPrinterInfo = ret; } -QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other) { - return new QPrinterInfo(*other); +void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo) { + QPrinterInfo* ret = new QPrinterInfo(*other); + *outptr_QPrinterInfo = ret; } -QPrinterInfo* QPrinterInfo_new3(QPrinter* printer) { - return new QPrinterInfo(*printer); +void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo) { + QPrinterInfo* ret = new QPrinterInfo(*printer); + *outptr_QPrinterInfo = ret; } void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other) { @@ -219,7 +222,11 @@ QPrinterInfo* QPrinterInfo_PrinterInfo(struct miqt_string printerName) { return new QPrinterInfo(QPrinterInfo::printerInfo(printerName_QString)); } -void QPrinterInfo_Delete(QPrinterInfo* self) { - delete self; +void QPrinterInfo_Delete(QPrinterInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qprinterinfo.go b/qt6/printsupport/gen_qprinterinfo.go index 25b1f049..d1f6aa69 100644 --- a/qt6/printsupport/gen_qprinterinfo.go +++ b/qt6/printsupport/gen_qprinterinfo.go @@ -15,7 +15,8 @@ import ( ) type QPrinterInfo struct { - h *C.QPrinterInfo + h *C.QPrinterInfo + isSubclass bool } func (this *QPrinterInfo) cPointer() *C.QPrinterInfo { @@ -32,6 +33,7 @@ func (this *QPrinterInfo) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } +// newQPrinterInfo constructs the type using only CGO pointers. func newQPrinterInfo(h *C.QPrinterInfo) *QPrinterInfo { if h == nil { return nil @@ -39,26 +41,43 @@ func newQPrinterInfo(h *C.QPrinterInfo) *QPrinterInfo { return &QPrinterInfo{h: h} } +// UnsafeNewQPrinterInfo constructs the type using only unsafe pointers. func UnsafeNewQPrinterInfo(h unsafe.Pointer) *QPrinterInfo { - return newQPrinterInfo((*C.QPrinterInfo)(h)) + if h == nil { + return nil + } + + return &QPrinterInfo{h: (*C.QPrinterInfo)(h)} } // NewQPrinterInfo constructs a new QPrinterInfo object. func NewQPrinterInfo() *QPrinterInfo { - ret := C.QPrinterInfo_new() - return newQPrinterInfo(ret) + var outptr_QPrinterInfo *C.QPrinterInfo = nil + + C.QPrinterInfo_new(&outptr_QPrinterInfo) + ret := newQPrinterInfo(outptr_QPrinterInfo) + ret.isSubclass = true + return ret } // NewQPrinterInfo2 constructs a new QPrinterInfo object. func NewQPrinterInfo2(other *QPrinterInfo) *QPrinterInfo { - ret := C.QPrinterInfo_new2(other.cPointer()) - return newQPrinterInfo(ret) + var outptr_QPrinterInfo *C.QPrinterInfo = nil + + C.QPrinterInfo_new2(other.cPointer(), &outptr_QPrinterInfo) + ret := newQPrinterInfo(outptr_QPrinterInfo) + ret.isSubclass = true + return ret } // NewQPrinterInfo3 constructs a new QPrinterInfo object. func NewQPrinterInfo3(printer *QPrinter) *QPrinterInfo { - ret := C.QPrinterInfo_new3(printer.cPointer()) - return newQPrinterInfo(ret) + var outptr_QPrinterInfo *C.QPrinterInfo = nil + + C.QPrinterInfo_new3(printer.cPointer(), &outptr_QPrinterInfo) + ret := newQPrinterInfo(outptr_QPrinterInfo) + ret.isSubclass = true + return ret } func (this *QPrinterInfo) OperatorAssign(other *QPrinterInfo) { @@ -238,7 +257,7 @@ func QPrinterInfo_PrinterInfo(printerName string) *QPrinterInfo { // Delete this object from C++ memory. func (this *QPrinterInfo) Delete() { - C.QPrinterInfo_Delete(this.h) + C.QPrinterInfo_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qprinterinfo.h b/qt6/printsupport/gen_qprinterinfo.h index 5b871647..dbf7d624 100644 --- a/qt6/printsupport/gen_qprinterinfo.h +++ b/qt6/printsupport/gen_qprinterinfo.h @@ -24,9 +24,9 @@ typedef struct QPrinter QPrinter; typedef struct QPrinterInfo QPrinterInfo; #endif -QPrinterInfo* QPrinterInfo_new(); -QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other); -QPrinterInfo* QPrinterInfo_new3(QPrinter* printer); +void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo); +void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo); +void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo); void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other); struct miqt_string QPrinterInfo_PrinterName(const QPrinterInfo* self); struct miqt_string QPrinterInfo_Description(const QPrinterInfo* self); @@ -51,7 +51,7 @@ struct miqt_array /* of QPrinterInfo* */ QPrinterInfo_AvailablePrinters(); struct miqt_string QPrinterInfo_DefaultPrinterName(); QPrinterInfo* QPrinterInfo_DefaultPrinter(); QPrinterInfo* QPrinterInfo_PrinterInfo(struct miqt_string printerName); -void QPrinterInfo_Delete(QPrinterInfo* self); +void QPrinterInfo_Delete(QPrinterInfo* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qprintpreviewdialog.cpp b/qt6/printsupport/gen_qprintpreviewdialog.cpp index c6fe573b..a4ac94c1 100644 --- a/qt6/printsupport/gen_qprintpreviewdialog.cpp +++ b/qt6/printsupport/gen_qprintpreviewdialog.cpp @@ -1,6 +1,16 @@ +#include +#include +#include +#include +#include #include +#include +#include #include #include +#include +#include +#include #include #include #include @@ -9,28 +19,399 @@ #include "gen_qprintpreviewdialog.h" #include "_cgo_export.h" -QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent) { - return new QPrintPreviewDialog(parent); +class MiqtVirtualQPrintPreviewDialog : public virtual QPrintPreviewDialog { +public: + + MiqtVirtualQPrintPreviewDialog(QWidget* parent): QPrintPreviewDialog(parent) {}; + MiqtVirtualQPrintPreviewDialog(): QPrintPreviewDialog() {}; + MiqtVirtualQPrintPreviewDialog(QPrinter* printer): QPrintPreviewDialog(printer) {}; + MiqtVirtualQPrintPreviewDialog(QWidget* parent, Qt::WindowFlags flags): QPrintPreviewDialog(parent, flags) {}; + MiqtVirtualQPrintPreviewDialog(QPrinter* printer, QWidget* parent): QPrintPreviewDialog(printer, parent) {}; + MiqtVirtualQPrintPreviewDialog(QPrinter* printer, QWidget* parent, Qt::WindowFlags flags): QPrintPreviewDialog(printer, parent, flags) {}; + + virtual ~MiqtVirtualQPrintPreviewDialog() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPrintPreviewDialog::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPrintPreviewDialog_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPrintPreviewDialog::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Done = 0; + + // Subclass to allow providing a Go implementation + virtual void done(int result) override { + if (handle__Done == 0) { + QPrintPreviewDialog::done(result); + return; + } + + int sigval1 = result; + + miqt_exec_callback_QPrintPreviewDialog_Done(this, handle__Done, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Done(int result) { + + QPrintPreviewDialog::done(static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPrintPreviewDialog::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewDialog_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPrintPreviewDialog::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPrintPreviewDialog::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewDialog_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPrintPreviewDialog::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Open = 0; + + // Subclass to allow providing a Go implementation + virtual void open() override { + if (handle__Open == 0) { + QPrintPreviewDialog::open(); + return; + } + + + miqt_exec_callback_QPrintPreviewDialog_Open(this, handle__Open); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Open() { + + QPrintPreviewDialog::open(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Exec = 0; + + // Subclass to allow providing a Go implementation + virtual int exec() override { + if (handle__Exec == 0) { + return QPrintPreviewDialog::exec(); + } + + + int callback_return_value = miqt_exec_callback_QPrintPreviewDialog_Exec(this, handle__Exec); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Exec() { + + return QPrintPreviewDialog::exec(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Accept = 0; + + // Subclass to allow providing a Go implementation + virtual void accept() override { + if (handle__Accept == 0) { + QPrintPreviewDialog::accept(); + return; + } + + + miqt_exec_callback_QPrintPreviewDialog_Accept(this, handle__Accept); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Accept() { + + QPrintPreviewDialog::accept(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reject = 0; + + // Subclass to allow providing a Go implementation + virtual void reject() override { + if (handle__Reject == 0) { + QPrintPreviewDialog::reject(); + return; + } + + + miqt_exec_callback_QPrintPreviewDialog_Reject(this, handle__Reject); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reject() { + + QPrintPreviewDialog::reject(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QPrintPreviewDialog::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QPrintPreviewDialog::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QPrintPreviewDialog::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QPrintPreviewDialog::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QPrintPreviewDialog::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QPrintPreviewDialog::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QPrintPreviewDialog::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QPrintPreviewDialog::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QPrintPreviewDialog::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QPrintPreviewDialog::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__EventFilter == 0) { + return QPrintPreviewDialog::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewDialog_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* param1, QEvent* param2) { + + return QPrintPreviewDialog::eventFilter(param1, param2); + + } + +}; + +void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new2() { - return new QPrintPreviewDialog(); +void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer) { - return new QPrintPreviewDialog(printer); +void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags) { - return new QPrintPreviewDialog(parent, static_cast(flags)); +void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent, static_cast(flags)); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent) { - return new QPrintPreviewDialog(printer, parent); +void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags) { - return new QPrintPreviewDialog(printer, parent, static_cast(flags)); +void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent, static_cast(flags)); + *outptr_QPrintPreviewDialog = ret; + *outptr_QDialog = static_cast(ret); + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self) { @@ -69,7 +450,7 @@ void QPrintPreviewDialog_PaintRequested(QPrintPreviewDialog* self, QPrinter* pri } void QPrintPreviewDialog_connect_PaintRequested(QPrintPreviewDialog* self, intptr_t slot) { - QPrintPreviewDialog::connect(self, static_cast(&QPrintPreviewDialog::paintRequested), self, [=](QPrinter* printer) { + MiqtVirtualQPrintPreviewDialog::connect(self, static_cast(&QPrintPreviewDialog::paintRequested), self, [=](QPrinter* printer) { QPrinter* sigval1 = printer; miqt_exec_callback_QPrintPreviewDialog_PaintRequested(slot, sigval1); }); @@ -97,7 +478,123 @@ struct miqt_string QPrintPreviewDialog_Tr3(const char* s, const char* c, int n) return _ms; } -void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self) { - delete self; +void QPrintPreviewDialog_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__SetVisible = slot; +} + +void QPrintPreviewDialog_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_SetVisible(visible); +} + +void QPrintPreviewDialog_override_virtual_Done(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Done = slot; +} + +void QPrintPreviewDialog_virtualbase_Done(void* self, int result) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Done(result); +} + +void QPrintPreviewDialog_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__SizeHint = slot; +} + +QSize* QPrintPreviewDialog_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_SizeHint(); +} + +void QPrintPreviewDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPrintPreviewDialog_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPrintPreviewDialog_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Open = slot; +} + +void QPrintPreviewDialog_virtualbase_Open(void* self) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Open(); +} + +void QPrintPreviewDialog_override_virtual_Exec(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Exec = slot; +} + +int QPrintPreviewDialog_virtualbase_Exec(void* self) { + return ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Exec(); +} + +void QPrintPreviewDialog_override_virtual_Accept(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Accept = slot; +} + +void QPrintPreviewDialog_virtualbase_Accept(void* self) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Accept(); +} + +void QPrintPreviewDialog_override_virtual_Reject(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__Reject = slot; +} + +void QPrintPreviewDialog_virtualbase_Reject(void* self) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_Reject(); +} + +void QPrintPreviewDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__KeyPressEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__CloseEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_CloseEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__ShowEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_ShowEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__ResizeEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPrintPreviewDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QPrintPreviewDialog_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewDialog*)(self) )->handle__EventFilter = slot; +} + +bool QPrintPreviewDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2) { + return ( (MiqtVirtualQPrintPreviewDialog*)(self) )->virtualbase_EventFilter(param1, param2); +} + +void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qprintpreviewdialog.go b/qt6/printsupport/gen_qprintpreviewdialog.go index 8f7c6405..bf28e74b 100644 --- a/qt6/printsupport/gen_qprintpreviewdialog.go +++ b/qt6/printsupport/gen_qprintpreviewdialog.go @@ -16,7 +16,8 @@ import ( ) type QPrintPreviewDialog struct { - h *C.QPrintPreviewDialog + h *C.QPrintPreviewDialog + isSubclass bool *qt6.QDialog } @@ -34,51 +35,107 @@ func (this *QPrintPreviewDialog) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrintPreviewDialog(h *C.QPrintPreviewDialog) *QPrintPreviewDialog { +// newQPrintPreviewDialog constructs the type using only CGO pointers. +func newQPrintPreviewDialog(h *C.QPrintPreviewDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewDialog { if h == nil { return nil } - return &QPrintPreviewDialog{h: h, QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h))} + return &QPrintPreviewDialog{h: h, + QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer) *QPrintPreviewDialog { - return newQPrintPreviewDialog((*C.QPrintPreviewDialog)(h)) +// UnsafeNewQPrintPreviewDialog constructs the type using only unsafe pointers. +func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewDialog { + if h == nil { + return nil + } + + return &QPrintPreviewDialog{h: (*C.QPrintPreviewDialog)(h), + QDialog: qt6.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPrintPreviewDialog constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog(parent *qt6.QWidget) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog2 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog2() *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new2() - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new2(&outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog3 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog3(printer *QPrinter) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new3(printer.cPointer()) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new3(printer.cPointer(), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog4 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog4(parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog5 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog5(printer *QPrinter, parent *qt6.QWidget) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewDialog6 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog6(printer *QPrinter, parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewDialog { - ret := C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewDialog(ret) + var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil + var outptr_QDialog *C.QDialog = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrintPreviewDialog) MetaObject() *qt6.QMetaObject { @@ -101,7 +158,7 @@ func QPrintPreviewDialog_Tr(s string) string { } func (this *QPrintPreviewDialog) Printer() *QPrinter { - return UnsafeNewQPrinter(unsafe.Pointer(C.QPrintPreviewDialog_Printer(this.h))) + return UnsafeNewQPrinter(unsafe.Pointer(C.QPrintPreviewDialog_Printer(this.h)), nil, nil) } func (this *QPrintPreviewDialog) SetVisible(visible bool) { @@ -127,7 +184,7 @@ func miqt_exec_callback_QPrintPreviewDialog_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer)) + slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer), nil, nil) gofunc(slotval1) } @@ -154,9 +211,328 @@ func QPrintPreviewDialog_Tr3(s string, c string, n int) string { return _ret } +func (this *QPrintPreviewDialog) callVirtualBase_SetVisible(visible bool) { + + C.QPrintPreviewDialog_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPrintPreviewDialog) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPrintPreviewDialog_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_SetVisible +func miqt_exec_callback_QPrintPreviewDialog_SetVisible(self *C.QPrintPreviewDialog, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Done(result int) { + + C.QPrintPreviewDialog_virtualbase_Done(unsafe.Pointer(this.h), (C.int)(result)) + +} +func (this *QPrintPreviewDialog) OnDone(slot func(super func(result int), result int)) { + C.QPrintPreviewDialog_override_virtual_Done(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Done +func miqt_exec_callback_QPrintPreviewDialog_Done(self *C.QPrintPreviewDialog, cb C.intptr_t, result C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(result int), result int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(result) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Done, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QPrintPreviewDialog_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewDialog) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QPrintPreviewDialog_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_SizeHint +func miqt_exec_callback_QPrintPreviewDialog_SizeHint(self *C.QPrintPreviewDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QPrintPreviewDialog_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewDialog) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QPrintPreviewDialog_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_MinimumSizeHint +func miqt_exec_callback_QPrintPreviewDialog_MinimumSizeHint(self *C.QPrintPreviewDialog, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Open() { + + C.QPrintPreviewDialog_virtualbase_Open(unsafe.Pointer(this.h)) + +} +func (this *QPrintPreviewDialog) OnOpen(slot func(super func())) { + C.QPrintPreviewDialog_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Open +func miqt_exec_callback_QPrintPreviewDialog_Open(self *C.QPrintPreviewDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Open) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Exec() int { + + return (int)(C.QPrintPreviewDialog_virtualbase_Exec(unsafe.Pointer(this.h))) + +} +func (this *QPrintPreviewDialog) OnExec(slot func(super func() int) int) { + C.QPrintPreviewDialog_override_virtual_Exec(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Exec +func miqt_exec_callback_QPrintPreviewDialog_Exec(self *C.QPrintPreviewDialog, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Exec) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Accept() { + + C.QPrintPreviewDialog_virtualbase_Accept(unsafe.Pointer(this.h)) + +} +func (this *QPrintPreviewDialog) OnAccept(slot func(super func())) { + C.QPrintPreviewDialog_override_virtual_Accept(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Accept +func miqt_exec_callback_QPrintPreviewDialog_Accept(self *C.QPrintPreviewDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Accept) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_Reject() { + + C.QPrintPreviewDialog_virtualbase_Reject(unsafe.Pointer(this.h)) + +} +func (this *QPrintPreviewDialog) OnReject(slot func(super func())) { + C.QPrintPreviewDialog_override_virtual_Reject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_Reject +func miqt_exec_callback_QPrintPreviewDialog_Reject(self *C.QPrintPreviewDialog, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_Reject) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_KeyPressEvent(param1 *qt6.QKeyEvent) { + + C.QPrintPreviewDialog_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnKeyPressEvent(slot func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) { + C.QPrintPreviewDialog_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent +func miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_CloseEvent(param1 *qt6.QCloseEvent) { + + C.QPrintPreviewDialog_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnCloseEvent(slot func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) { + C.QPrintPreviewDialog_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_CloseEvent +func miqt_exec_callback_QPrintPreviewDialog_CloseEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_ShowEvent(param1 *qt6.QShowEvent) { + + C.QPrintPreviewDialog_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnShowEvent(slot func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) { + C.QPrintPreviewDialog_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_ShowEvent +func miqt_exec_callback_QPrintPreviewDialog_ShowEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_ResizeEvent(param1 *qt6.QResizeEvent) { + + C.QPrintPreviewDialog_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnResizeEvent(slot func(super func(param1 *qt6.QResizeEvent), param1 *qt6.QResizeEvent)) { + C.QPrintPreviewDialog_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_ResizeEvent +func miqt_exec_callback_QPrintPreviewDialog_ResizeEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QResizeEvent), param1 *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_ContextMenuEvent(param1 *qt6.QContextMenuEvent) { + + C.QPrintPreviewDialog_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewDialog) OnContextMenuEvent(slot func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) { + C.QPrintPreviewDialog_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent +func miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPrintPreviewDialog) callVirtualBase_EventFilter(param1 *qt6.QObject, param2 *qt6.QEvent) bool { + + return (bool)(C.QPrintPreviewDialog_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QPrintPreviewDialog) OnEventFilter(slot func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) { + C.QPrintPreviewDialog_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewDialog_EventFilter +func miqt_exec_callback_QPrintPreviewDialog_EventFilter(self *C.QPrintPreviewDialog, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(param1)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPrintPreviewDialog) Delete() { - C.QPrintPreviewDialog_Delete(this.h) + C.QPrintPreviewDialog_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qprintpreviewdialog.h b/qt6/printsupport/gen_qprintpreviewdialog.h index 05f3fe60..adab8620 100644 --- a/qt6/printsupport/gen_qprintpreviewdialog.h +++ b/qt6/printsupport/gen_qprintpreviewdialog.h @@ -15,23 +15,43 @@ extern "C" { #endif #ifdef __cplusplus +class QCloseEvent; +class QContextMenuEvent; +class QDialog; +class QEvent; +class QKeyEvent; class QMetaObject; +class QObject; +class QPaintDevice; class QPrintPreviewDialog; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; class QWidget; #else +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDialog QDialog; +typedef struct QEvent QEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; typedef struct QPrintPreviewDialog QPrintPreviewDialog; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent); -QPrintPreviewDialog* QPrintPreviewDialog_new2(); -QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer); -QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags); -QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent); -QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags); +void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self); void* QPrintPreviewDialog_Metacast(QPrintPreviewDialog* self, const char* param1); struct miqt_string QPrintPreviewDialog_Tr(const char* s); @@ -42,7 +62,35 @@ void QPrintPreviewDialog_PaintRequested(QPrintPreviewDialog* self, QPrinter* pri void QPrintPreviewDialog_connect_PaintRequested(QPrintPreviewDialog* self, intptr_t slot); struct miqt_string QPrintPreviewDialog_Tr2(const char* s, const char* c); struct miqt_string QPrintPreviewDialog_Tr3(const char* s, const char* c, int n); -void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self); +void QPrintPreviewDialog_override_virtual_SetVisible(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_SetVisible(void* self, bool visible); +void QPrintPreviewDialog_override_virtual_Done(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Done(void* self, int result); +void QPrintPreviewDialog_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewDialog_virtualbase_SizeHint(const void* self); +void QPrintPreviewDialog_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewDialog_virtualbase_MinimumSizeHint(const void* self); +void QPrintPreviewDialog_override_virtual_Open(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Open(void* self); +void QPrintPreviewDialog_override_virtual_Exec(void* self, intptr_t slot); +int QPrintPreviewDialog_virtualbase_Exec(void* self); +void QPrintPreviewDialog_override_virtual_Accept(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Accept(void* self); +void QPrintPreviewDialog_override_virtual_Reject(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_Reject(void* self); +void QPrintPreviewDialog_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QPrintPreviewDialog_override_virtual_CloseEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QPrintPreviewDialog_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QPrintPreviewDialog_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QPrintPreviewDialog_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPrintPreviewDialog_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QPrintPreviewDialog_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPrintPreviewDialog_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); +void QPrintPreviewDialog_Delete(QPrintPreviewDialog* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/printsupport/gen_qprintpreviewwidget.cpp b/qt6/printsupport/gen_qprintpreviewwidget.cpp index 7e236008..fb648fca 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.cpp +++ b/qt6/printsupport/gen_qprintpreviewwidget.cpp @@ -1,36 +1,1078 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include #include #include #include +#include +#include +#include #include #include #include "gen_qprintpreviewwidget.h" #include "_cgo_export.h" -QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent) { - return new QPrintPreviewWidget(parent); +class MiqtVirtualQPrintPreviewWidget : public virtual QPrintPreviewWidget { +public: + + MiqtVirtualQPrintPreviewWidget(QWidget* parent): QPrintPreviewWidget(parent) {}; + MiqtVirtualQPrintPreviewWidget(QPrinter* printer): QPrintPreviewWidget(printer) {}; + MiqtVirtualQPrintPreviewWidget(): QPrintPreviewWidget() {}; + MiqtVirtualQPrintPreviewWidget(QPrinter* printer, QWidget* parent): QPrintPreviewWidget(printer, parent) {}; + MiqtVirtualQPrintPreviewWidget(QPrinter* printer, QWidget* parent, Qt::WindowFlags flags): QPrintPreviewWidget(printer, parent, flags) {}; + MiqtVirtualQPrintPreviewWidget(QWidget* parent, Qt::WindowFlags flags): QPrintPreviewWidget(parent, flags) {}; + + virtual ~MiqtVirtualQPrintPreviewWidget() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QPrintPreviewWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPrintPreviewWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QPrintPreviewWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QPrintPreviewWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPrintPreviewWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPrintPreviewWidget::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QPrintPreviewWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QPrintPreviewWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QPrintPreviewWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QPrintPreviewWidget::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QPrintPreviewWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QPrintPreviewWidget_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QPrintPreviewWidget::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QPrintPreviewWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QPrintPreviewWidget::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QPrintPreviewWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QPrintPreviewWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QPrintPreviewWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPrintPreviewWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QPrintPreviewWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QPrintPreviewWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QPrintPreviewWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QPrintPreviewWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QPrintPreviewWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QPrintPreviewWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QPrintPreviewWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QPrintPreviewWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QPrintPreviewWidget::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QPrintPreviewWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QPrintPreviewWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QPrintPreviewWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QPrintPreviewWidget::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QPrintPreviewWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QPrintPreviewWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QPrintPreviewWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QPrintPreviewWidget::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QPrintPreviewWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QPrintPreviewWidget::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QPrintPreviewWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QPrintPreviewWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QPrintPreviewWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QPrintPreviewWidget::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QPrintPreviewWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QPrintPreviewWidget::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QPrintPreviewWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QPrintPreviewWidget::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* event) override { + if (handle__ContextMenuEvent == 0) { + QPrintPreviewWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QPrintPreviewWidget::contextMenuEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QPrintPreviewWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QPrintPreviewWidget::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QPrintPreviewWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QPrintPreviewWidget::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* event) override { + if (handle__DragEnterEvent == 0) { + QPrintPreviewWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QPrintPreviewWidget::dragEnterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* event) override { + if (handle__DragMoveEvent == 0) { + QPrintPreviewWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QPrintPreviewWidget::dragMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* event) override { + if (handle__DragLeaveEvent == 0) { + QPrintPreviewWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QPrintPreviewWidget::dragLeaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* event) override { + if (handle__DropEvent == 0) { + QPrintPreviewWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QPrintPreviewWidget::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QPrintPreviewWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QPrintPreviewWidget::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QPrintPreviewWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QPrintPreviewWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QPrintPreviewWidget::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QPrintPreviewWidget::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = static_cast(result_ret); + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QPrintPreviewWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QPrintPreviewWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QPrintPreviewWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QPrintPreviewWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPrintPreviewWidget_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QPrintPreviewWidget::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QPrintPreviewWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPrintPreviewWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPrintPreviewWidget::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QPrintPreviewWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPrintPreviewWidget::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QPrintPreviewWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPrintPreviewWidget::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QPrintPreviewWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QPrintPreviewWidget::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QPrintPreviewWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPrintPreviewWidget_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QPrintPreviewWidget::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QPrintPreviewWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QPrintPreviewWidget::focusNextPrevChild(next); + + } + +}; + +void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer) { - return new QPrintPreviewWidget(printer); +void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new3() { - return new QPrintPreviewWidget(); +void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent) { - return new QPrintPreviewWidget(printer, parent); +void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags) { - return new QPrintPreviewWidget(printer, parent, static_cast(flags)); +void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent, static_cast(flags)); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } -QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags) { - return new QPrintPreviewWidget(parent, static_cast(flags)); +void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent, static_cast(flags)); + *outptr_QPrintPreviewWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); } QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self) { @@ -153,7 +1195,7 @@ void QPrintPreviewWidget_PaintRequested(QPrintPreviewWidget* self, QPrinter* pri } void QPrintPreviewWidget_connect_PaintRequested(QPrintPreviewWidget* self, intptr_t slot) { - QPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::paintRequested), self, [=](QPrinter* printer) { + MiqtVirtualQPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::paintRequested), self, [=](QPrinter* printer) { QPrinter* sigval1 = printer; miqt_exec_callback_QPrintPreviewWidget_PaintRequested(slot, sigval1); }); @@ -164,7 +1206,7 @@ void QPrintPreviewWidget_PreviewChanged(QPrintPreviewWidget* self) { } void QPrintPreviewWidget_connect_PreviewChanged(QPrintPreviewWidget* self, intptr_t slot) { - QPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::previewChanged), self, [=]() { + MiqtVirtualQPrintPreviewWidget::connect(self, static_cast(&QPrintPreviewWidget::previewChanged), self, [=]() { miqt_exec_callback_QPrintPreviewWidget_PreviewChanged(slot); }); } @@ -199,7 +1241,339 @@ void QPrintPreviewWidget_ZoomOut1(QPrintPreviewWidget* self, double zoom) { self->zoomOut(static_cast(zoom)); } -void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self) { - delete self; +void QPrintPreviewWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__SetVisible = slot; +} + +void QPrintPreviewWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QPrintPreviewWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DevType = slot; +} + +int QPrintPreviewWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DevType(); +} + +void QPrintPreviewWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QPrintPreviewWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_SizeHint(); +} + +void QPrintPreviewWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QPrintPreviewWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QPrintPreviewWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QPrintPreviewWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QPrintPreviewWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QPrintPreviewWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QPrintPreviewWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QPrintPreviewWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QPrintPreviewWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__Event = slot; +} + +bool QPrintPreviewWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_Event(event); +} + +void QPrintPreviewWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__WheelEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QPrintPreviewWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QPrintPreviewWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QPrintPreviewWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QPrintPreviewWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QPrintPreviewWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__EnterEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QPrintPreviewWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__PaintEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QPrintPreviewWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__MoveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QPrintPreviewWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__CloseEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QPrintPreviewWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__TabletEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ActionEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QPrintPreviewWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__DropEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QPrintPreviewWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ShowEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QPrintPreviewWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__HideEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QPrintPreviewWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QPrintPreviewWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QPrintPreviewWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QPrintPreviewWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__Metric = slot; +} + +int QPrintPreviewWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_Metric(param1); +} + +void QPrintPreviewWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__InitPainter = slot; +} + +void QPrintPreviewWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QPrintPreviewWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPrintPreviewWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QPrintPreviewWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPrintPreviewWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QPrintPreviewWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QPrintPreviewWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QPrintPreviewWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QPrintPreviewWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QPrintPreviewWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QPrintPreviewWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QPrintPreviewWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQPrintPreviewWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/printsupport/gen_qprintpreviewwidget.go b/qt6/printsupport/gen_qprintpreviewwidget.go index 088d5ff5..882ca420 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.go +++ b/qt6/printsupport/gen_qprintpreviewwidget.go @@ -32,7 +32,8 @@ const ( ) type QPrintPreviewWidget struct { - h *C.QPrintPreviewWidget + h *C.QPrintPreviewWidget + isSubclass bool *qt6.QWidget } @@ -50,51 +51,101 @@ func (this *QPrintPreviewWidget) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQPrintPreviewWidget(h *C.QPrintPreviewWidget) *QPrintPreviewWidget { +// newQPrintPreviewWidget constructs the type using only CGO pointers. +func newQPrintPreviewWidget(h *C.QPrintPreviewWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewWidget { if h == nil { return nil } - return &QPrintPreviewWidget{h: h, QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h))} + return &QPrintPreviewWidget{h: h, + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} } -func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer) *QPrintPreviewWidget { - return newQPrintPreviewWidget((*C.QPrintPreviewWidget)(h)) +// UnsafeNewQPrintPreviewWidget constructs the type using only unsafe pointers. +func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewWidget { + if h == nil { + return nil + } + + return &QPrintPreviewWidget{h: (*C.QPrintPreviewWidget)(h), + QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } // NewQPrintPreviewWidget constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget(parent *qt6.QWidget) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget2 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget2(printer *QPrinter) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new2(printer.cPointer()) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new2(printer.cPointer(), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget3 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget3() *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new3() - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new3(&outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget4 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget4(printer *QPrinter, parent *qt6.QWidget) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer())) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget5 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget5(printer *QPrinter, parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } // NewQPrintPreviewWidget6 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget6(parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewWidget { - ret := C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags)) - return newQPrintPreviewWidget(ret) + var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret } func (this *QPrintPreviewWidget) MetaObject() *qt6.QMetaObject { @@ -223,7 +274,7 @@ func miqt_exec_callback_QPrintPreviewWidget_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer)) + slotval1 := UnsafeNewQPrinter(unsafe.Pointer(printer), nil, nil) gofunc(slotval1) } @@ -275,9 +326,975 @@ func (this *QPrintPreviewWidget) ZoomOut1(zoom float64) { C.QPrintPreviewWidget_ZoomOut1(this.h, (C.double)(zoom)) } +func (this *QPrintPreviewWidget) callVirtualBase_SetVisible(visible bool) { + + C.QPrintPreviewWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPrintPreviewWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QPrintPreviewWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_SetVisible +func miqt_exec_callback_QPrintPreviewWidget_SetVisible(self *C.QPrintPreviewWidget, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DevType() int { + + return (int)(C.QPrintPreviewWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPrintPreviewWidget) OnDevType(slot func(super func() int) int) { + C.QPrintPreviewWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DevType +func miqt_exec_callback_QPrintPreviewWidget_DevType(self *C.QPrintPreviewWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QPrintPreviewWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewWidget) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QPrintPreviewWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_SizeHint +func miqt_exec_callback_QPrintPreviewWidget_SizeHint(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QPrintPreviewWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewWidget) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QPrintPreviewWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MinimumSizeHint +func miqt_exec_callback_QPrintPreviewWidget_MinimumSizeHint(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QPrintPreviewWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPrintPreviewWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QPrintPreviewWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_HeightForWidth +func miqt_exec_callback_QPrintPreviewWidget_HeightForWidth(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QPrintPreviewWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QPrintPreviewWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QPrintPreviewWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_HasHeightForWidth +func miqt_exec_callback_QPrintPreviewWidget_HasHeightForWidth(self *C.QPrintPreviewWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QPrintPreviewWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QPrintPreviewWidget) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QPrintPreviewWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_PaintEngine +func miqt_exec_callback_QPrintPreviewWidget_PaintEngine(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QPrintPreviewWidget_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPrintPreviewWidget) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QPrintPreviewWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_Event +func miqt_exec_callback_QPrintPreviewWidget_Event(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MousePressEvent(event *qt6.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMousePressEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MousePressEvent +func miqt_exec_callback_QPrintPreviewWidget_MousePressEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MouseReleaseEvent(event *qt6.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMouseReleaseEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent +func miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MouseDoubleClickEvent(event *qt6.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMouseDoubleClickEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent +func miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MouseMoveEvent(event *qt6.QMouseEvent) { + + C.QPrintPreviewWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMouseMoveEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QPrintPreviewWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent +func miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_WheelEvent(event *qt6.QWheelEvent) { + + C.QPrintPreviewWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnWheelEvent(slot func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) { + C.QPrintPreviewWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_WheelEvent +func miqt_exec_callback_QPrintPreviewWidget_WheelEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_KeyPressEvent(event *qt6.QKeyEvent) { + + C.QPrintPreviewWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnKeyPressEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QPrintPreviewWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent +func miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_KeyReleaseEvent(event *qt6.QKeyEvent) { + + C.QPrintPreviewWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnKeyReleaseEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QPrintPreviewWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent +func miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_FocusInEvent(event *qt6.QFocusEvent) { + + C.QPrintPreviewWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnFocusInEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QPrintPreviewWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_FocusInEvent +func miqt_exec_callback_QPrintPreviewWidget_FocusInEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_FocusOutEvent(event *qt6.QFocusEvent) { + + C.QPrintPreviewWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnFocusOutEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QPrintPreviewWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent +func miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_EnterEvent(event *qt6.QEnterEvent) { + + C.QPrintPreviewWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEnterEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnEnterEvent(slot func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) { + C.QPrintPreviewWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_EnterEvent +func miqt_exec_callback_QPrintPreviewWidget_EnterEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_LeaveEvent(event *qt6.QEvent) { + + C.QPrintPreviewWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnLeaveEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QPrintPreviewWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_LeaveEvent +func miqt_exec_callback_QPrintPreviewWidget_LeaveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_PaintEvent(event *qt6.QPaintEvent) { + + C.QPrintPreviewWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnPaintEvent(slot func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) { + C.QPrintPreviewWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_PaintEvent +func miqt_exec_callback_QPrintPreviewWidget_PaintEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_MoveEvent(event *qt6.QMoveEvent) { + + C.QPrintPreviewWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnMoveEvent(slot func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) { + C.QPrintPreviewWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_MoveEvent +func miqt_exec_callback_QPrintPreviewWidget_MoveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ResizeEvent(event *qt6.QResizeEvent) { + + C.QPrintPreviewWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnResizeEvent(slot func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) { + C.QPrintPreviewWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ResizeEvent +func miqt_exec_callback_QPrintPreviewWidget_ResizeEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_CloseEvent(event *qt6.QCloseEvent) { + + C.QPrintPreviewWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnCloseEvent(slot func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) { + C.QPrintPreviewWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_CloseEvent +func miqt_exec_callback_QPrintPreviewWidget_CloseEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ContextMenuEvent(event *qt6.QContextMenuEvent) { + + C.QPrintPreviewWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnContextMenuEvent(slot func(super func(event *qt6.QContextMenuEvent), event *qt6.QContextMenuEvent)) { + C.QPrintPreviewWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent +func miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QContextMenuEvent), event *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_TabletEvent(event *qt6.QTabletEvent) { + + C.QPrintPreviewWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnTabletEvent(slot func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) { + C.QPrintPreviewWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_TabletEvent +func miqt_exec_callback_QPrintPreviewWidget_TabletEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ActionEvent(event *qt6.QActionEvent) { + + C.QPrintPreviewWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnActionEvent(slot func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) { + C.QPrintPreviewWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ActionEvent +func miqt_exec_callback_QPrintPreviewWidget_ActionEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DragEnterEvent(event *qt6.QDragEnterEvent) { + + C.QPrintPreviewWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDragEnterEvent(slot func(super func(event *qt6.QDragEnterEvent), event *qt6.QDragEnterEvent)) { + C.QPrintPreviewWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent +func miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragEnterEvent), event *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DragMoveEvent(event *qt6.QDragMoveEvent) { + + C.QPrintPreviewWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDragMoveEvent(slot func(super func(event *qt6.QDragMoveEvent), event *qt6.QDragMoveEvent)) { + C.QPrintPreviewWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent +func miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragMoveEvent), event *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DragLeaveEvent(event *qt6.QDragLeaveEvent) { + + C.QPrintPreviewWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDragLeaveEvent(slot func(super func(event *qt6.QDragLeaveEvent), event *qt6.QDragLeaveEvent)) { + C.QPrintPreviewWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent +func miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragLeaveEvent), event *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_DropEvent(event *qt6.QDropEvent) { + + C.QPrintPreviewWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnDropEvent(slot func(super func(event *qt6.QDropEvent), event *qt6.QDropEvent)) { + C.QPrintPreviewWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_DropEvent +func miqt_exec_callback_QPrintPreviewWidget_DropEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDropEvent), event *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ShowEvent(event *qt6.QShowEvent) { + + C.QPrintPreviewWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnShowEvent(slot func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) { + C.QPrintPreviewWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ShowEvent +func miqt_exec_callback_QPrintPreviewWidget_ShowEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_HideEvent(event *qt6.QHideEvent) { + + C.QPrintPreviewWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnHideEvent(slot func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) { + C.QPrintPreviewWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_HideEvent +func miqt_exec_callback_QPrintPreviewWidget_HideEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QPrintPreviewWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QPrintPreviewWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QPrintPreviewWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_NativeEvent +func miqt_exec_callback_QPrintPreviewWidget_NativeEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_ChangeEvent(param1 *qt6.QEvent) { + + C.QPrintPreviewWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnChangeEvent(slot func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) { + C.QPrintPreviewWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_ChangeEvent +func miqt_exec_callback_QPrintPreviewWidget_ChangeEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPrintPreviewWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPrintPreviewWidget) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QPrintPreviewWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_Metric +func miqt_exec_callback_QPrintPreviewWidget_Metric(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_InitPainter(painter *qt6.QPainter) { + + C.QPrintPreviewWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnInitPainter(slot func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) { + C.QPrintPreviewWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_InitPainter +func miqt_exec_callback_QPrintPreviewWidget_InitPainter(self *C.QPrintPreviewWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_Redirected(offset *qt6.QPoint) *qt6.QPaintDevice { + + return qt6.UnsafeNewQPaintDevice(unsafe.Pointer(C.QPrintPreviewWidget_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QPrintPreviewWidget) OnRedirected(slot func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) { + C.QPrintPreviewWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_Redirected +func miqt_exec_callback_QPrintPreviewWidget_Redirected(self *C.QPrintPreviewWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_SharedPainter() *qt6.QPainter { + + return qt6.UnsafeNewQPainter(unsafe.Pointer(C.QPrintPreviewWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPrintPreviewWidget) OnSharedPainter(slot func(super func() *qt6.QPainter) *qt6.QPainter) { + C.QPrintPreviewWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_SharedPainter +func miqt_exec_callback_QPrintPreviewWidget_SharedPainter(self *C.QPrintPreviewWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPainter) *qt6.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_InputMethodEvent(param1 *qt6.QInputMethodEvent) { + + C.QPrintPreviewWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QPrintPreviewWidget) OnInputMethodEvent(slot func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) { + C.QPrintPreviewWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent +func miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_InputMethodQuery(param1 qt6.InputMethodQuery) *qt6.QVariant { + + _ret := C.QPrintPreviewWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPrintPreviewWidget) OnInputMethodQuery(slot func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) { + C.QPrintPreviewWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_InputMethodQuery +func miqt_exec_callback_QPrintPreviewWidget_InputMethodQuery(self *C.QPrintPreviewWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPrintPreviewWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QPrintPreviewWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QPrintPreviewWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QPrintPreviewWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPrintPreviewWidget_FocusNextPrevChild +func miqt_exec_callback_QPrintPreviewWidget_FocusNextPrevChild(self *C.QPrintPreviewWidget, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QPrintPreviewWidget) Delete() { - C.QPrintPreviewWidget_Delete(this.h) + C.QPrintPreviewWidget_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/printsupport/gen_qprintpreviewwidget.h b/qt6/printsupport/gen_qprintpreviewwidget.h index fc25e4e4..45465dd4 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.h +++ b/qt6/printsupport/gen_qprintpreviewwidget.h @@ -15,23 +15,79 @@ extern "C" { #endif #ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; class QPrintPreviewWidget; class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWheelEvent; class QWidget; #else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QPrintPreviewWidget QPrintPreviewWidget; typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent); -QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer); -QPrintPreviewWidget* QPrintPreviewWidget_new3(); -QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent); -QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags); -QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags); +void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self); void* QPrintPreviewWidget_Metacast(QPrintPreviewWidget* self, const char* param1); struct miqt_string QPrintPreviewWidget_Tr(const char* s); @@ -66,7 +122,89 @@ struct miqt_string QPrintPreviewWidget_Tr2(const char* s, const char* c); struct miqt_string QPrintPreviewWidget_Tr3(const char* s, const char* c, int n); void QPrintPreviewWidget_ZoomIn1(QPrintPreviewWidget* self, double zoom); void QPrintPreviewWidget_ZoomOut1(QPrintPreviewWidget* self, double zoom); -void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self); +void QPrintPreviewWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_SetVisible(void* self, bool visible); +void QPrintPreviewWidget_override_virtual_DevType(void* self, intptr_t slot); +int QPrintPreviewWidget_virtualbase_DevType(const void* self); +void QPrintPreviewWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewWidget_virtualbase_SizeHint(const void* self); +void QPrintPreviewWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QPrintPreviewWidget_virtualbase_MinimumSizeHint(const void* self); +void QPrintPreviewWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QPrintPreviewWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QPrintPreviewWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_HasHeightForWidth(const void* self); +void QPrintPreviewWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPrintPreviewWidget_virtualbase_PaintEngine(const void* self); +void QPrintPreviewWidget_override_virtual_Event(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_Event(void* self, QEvent* event); +void QPrintPreviewWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QPrintPreviewWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QPrintPreviewWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QPrintPreviewWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QPrintPreviewWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QPrintPreviewWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QPrintPreviewWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QPrintPreviewWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QPrintPreviewWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QPrintPreviewWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QPrintPreviewWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QPrintPreviewWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QPrintPreviewWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QPrintPreviewWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QPrintPreviewWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QPrintPreviewWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QPrintPreviewWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QPrintPreviewWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QPrintPreviewWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QPrintPreviewWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QPrintPreviewWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QPrintPreviewWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QPrintPreviewWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QPrintPreviewWidget_override_virtual_Metric(void* self, intptr_t slot); +int QPrintPreviewWidget_virtualbase_Metric(const void* self, int param1); +void QPrintPreviewWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPrintPreviewWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPrintPreviewWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QPrintPreviewWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPrintPreviewWidget_virtualbase_SharedPainter(const void* self); +void QPrintPreviewWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QPrintPreviewWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QPrintPreviewWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QPrintPreviewWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QPrintPreviewWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QPrintPreviewWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QPrintPreviewWidget_Delete(QPrintPreviewWidget* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/spatialaudio/gen_qambientsound.cpp b/qt6/spatialaudio/gen_qambientsound.cpp index 04818801..97092e93 100644 --- a/qt6/spatialaudio/gen_qambientsound.cpp +++ b/qt6/spatialaudio/gen_qambientsound.cpp @@ -1,16 +1,203 @@ #include #include +#include +#include +#include #include +#include #include #include #include +#include #include #include #include "gen_qambientsound.h" #include "_cgo_export.h" -QAmbientSound* QAmbientSound_new(QAudioEngine* engine) { - return new QAmbientSound(engine); +class MiqtVirtualQAmbientSound : public virtual QAmbientSound { +public: + + MiqtVirtualQAmbientSound(QAudioEngine* engine): QAmbientSound(engine) {}; + + virtual ~MiqtVirtualQAmbientSound() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAmbientSound::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAmbientSound_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAmbientSound::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAmbientSound::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAmbientSound_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAmbientSound::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAmbientSound::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAmbientSound_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAmbientSound::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAmbientSound::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAmbientSound_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAmbientSound::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAmbientSound::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAmbientSound_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAmbientSound::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAmbientSound::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAmbientSound_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAmbientSound::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAmbientSound::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAmbientSound_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAmbientSound::disconnectNotify(*signal); + + } + +}; + +void QAmbientSound_new(QAudioEngine* engine, QAmbientSound** outptr_QAmbientSound, QObject** outptr_QObject) { + MiqtVirtualQAmbientSound* ret = new MiqtVirtualQAmbientSound(engine); + *outptr_QAmbientSound = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAmbientSound_MetaObject(const QAmbientSound* self) { @@ -73,7 +260,7 @@ void QAmbientSound_SourceChanged(QAmbientSound* self) { } void QAmbientSound_connect_SourceChanged(QAmbientSound* self, intptr_t slot) { - QAmbientSound::connect(self, static_cast(&QAmbientSound::sourceChanged), self, [=]() { + MiqtVirtualQAmbientSound::connect(self, static_cast(&QAmbientSound::sourceChanged), self, [=]() { miqt_exec_callback_QAmbientSound_SourceChanged(slot); }); } @@ -83,7 +270,7 @@ void QAmbientSound_LoopsChanged(QAmbientSound* self) { } void QAmbientSound_connect_LoopsChanged(QAmbientSound* self, intptr_t slot) { - QAmbientSound::connect(self, static_cast(&QAmbientSound::loopsChanged), self, [=]() { + MiqtVirtualQAmbientSound::connect(self, static_cast(&QAmbientSound::loopsChanged), self, [=]() { miqt_exec_callback_QAmbientSound_LoopsChanged(slot); }); } @@ -93,7 +280,7 @@ void QAmbientSound_AutoPlayChanged(QAmbientSound* self) { } void QAmbientSound_connect_AutoPlayChanged(QAmbientSound* self, intptr_t slot) { - QAmbientSound::connect(self, static_cast(&QAmbientSound::autoPlayChanged), self, [=]() { + MiqtVirtualQAmbientSound::connect(self, static_cast(&QAmbientSound::autoPlayChanged), self, [=]() { miqt_exec_callback_QAmbientSound_AutoPlayChanged(slot); }); } @@ -103,7 +290,7 @@ void QAmbientSound_VolumeChanged(QAmbientSound* self) { } void QAmbientSound_connect_VolumeChanged(QAmbientSound* self, intptr_t slot) { - QAmbientSound::connect(self, static_cast(&QAmbientSound::volumeChanged), self, [=]() { + MiqtVirtualQAmbientSound::connect(self, static_cast(&QAmbientSound::volumeChanged), self, [=]() { miqt_exec_callback_QAmbientSound_VolumeChanged(slot); }); } @@ -142,7 +329,67 @@ struct miqt_string QAmbientSound_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAmbientSound_Delete(QAmbientSound* self) { - delete self; +void QAmbientSound_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__Event = slot; +} + +bool QAmbientSound_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_Event(event); +} + +void QAmbientSound_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__EventFilter = slot; +} + +bool QAmbientSound_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAmbientSound_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__TimerEvent = slot; +} + +void QAmbientSound_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_TimerEvent(event); +} + +void QAmbientSound_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__ChildEvent = slot; +} + +void QAmbientSound_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_ChildEvent(event); +} + +void QAmbientSound_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__CustomEvent = slot; +} + +void QAmbientSound_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_CustomEvent(event); +} + +void QAmbientSound_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__ConnectNotify = slot; +} + +void QAmbientSound_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAmbientSound_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAmbientSound*)(self) )->handle__DisconnectNotify = slot; +} + +void QAmbientSound_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAmbientSound*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAmbientSound_Delete(QAmbientSound* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/spatialaudio/gen_qambientsound.go b/qt6/spatialaudio/gen_qambientsound.go index 9dc964ce..9b709970 100644 --- a/qt6/spatialaudio/gen_qambientsound.go +++ b/qt6/spatialaudio/gen_qambientsound.go @@ -23,7 +23,8 @@ const ( ) type QAmbientSound struct { - h *C.QAmbientSound + h *C.QAmbientSound + isSubclass bool *qt6.QObject } @@ -41,21 +42,34 @@ func (this *QAmbientSound) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAmbientSound(h *C.QAmbientSound) *QAmbientSound { +// newQAmbientSound constructs the type using only CGO pointers. +func newQAmbientSound(h *C.QAmbientSound, h_QObject *C.QObject) *QAmbientSound { if h == nil { return nil } - return &QAmbientSound{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAmbientSound{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAmbientSound(h unsafe.Pointer) *QAmbientSound { - return newQAmbientSound((*C.QAmbientSound)(h)) +// UnsafeNewQAmbientSound constructs the type using only unsafe pointers. +func UnsafeNewQAmbientSound(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAmbientSound { + if h == nil { + return nil + } + + return &QAmbientSound{h: (*C.QAmbientSound)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAmbientSound constructs a new QAmbientSound object. func NewQAmbientSound(engine *QAudioEngine) *QAmbientSound { - ret := C.QAmbientSound_new(engine.cPointer()) - return newQAmbientSound(ret) + var outptr_QAmbientSound *C.QAmbientSound = nil + var outptr_QObject *C.QObject = nil + + C.QAmbientSound_new(engine.cPointer(), &outptr_QAmbientSound, &outptr_QObject) + ret := newQAmbientSound(outptr_QAmbientSound, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAmbientSound) MetaObject() *qt6.QMetaObject { @@ -113,7 +127,7 @@ func (this *QAmbientSound) Volume() float32 { } func (this *QAmbientSound) Engine() *QAudioEngine { - return UnsafeNewQAudioEngine(unsafe.Pointer(C.QAmbientSound_Engine(this.h))) + return UnsafeNewQAudioEngine(unsafe.Pointer(C.QAmbientSound_Engine(this.h)), nil) } func (this *QAmbientSound) SourceChanged() { @@ -218,9 +232,175 @@ func QAmbientSound_Tr3(s string, c string, n int) string { return _ret } +func (this *QAmbientSound) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAmbientSound_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAmbientSound) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAmbientSound_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_Event +func miqt_exec_callback_QAmbientSound_Event(self *C.QAmbientSound, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAmbientSound{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAmbientSound) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAmbientSound_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAmbientSound) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAmbientSound_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_EventFilter +func miqt_exec_callback_QAmbientSound_EventFilter(self *C.QAmbientSound, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAmbientSound{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAmbientSound) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAmbientSound_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAmbientSound) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAmbientSound_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_TimerEvent +func miqt_exec_callback_QAmbientSound_TimerEvent(self *C.QAmbientSound, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAmbientSound{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAmbientSound) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAmbientSound_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAmbientSound) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAmbientSound_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_ChildEvent +func miqt_exec_callback_QAmbientSound_ChildEvent(self *C.QAmbientSound, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAmbientSound{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAmbientSound) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAmbientSound_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAmbientSound) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAmbientSound_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_CustomEvent +func miqt_exec_callback_QAmbientSound_CustomEvent(self *C.QAmbientSound, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAmbientSound{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAmbientSound) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAmbientSound_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAmbientSound) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAmbientSound_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_ConnectNotify +func miqt_exec_callback_QAmbientSound_ConnectNotify(self *C.QAmbientSound, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAmbientSound{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAmbientSound) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAmbientSound_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAmbientSound) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAmbientSound_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAmbientSound_DisconnectNotify +func miqt_exec_callback_QAmbientSound_DisconnectNotify(self *C.QAmbientSound, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAmbientSound{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAmbientSound) Delete() { - C.QAmbientSound_Delete(this.h) + C.QAmbientSound_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/spatialaudio/gen_qambientsound.h b/qt6/spatialaudio/gen_qambientsound.h index 8d3aa1e3..857ecdb9 100644 --- a/qt6/spatialaudio/gen_qambientsound.h +++ b/qt6/spatialaudio/gen_qambientsound.h @@ -17,16 +17,26 @@ extern "C" { #ifdef __cplusplus class QAmbientSound; class QAudioEngine; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; +class QObject; +class QTimerEvent; class QUrl; #else typedef struct QAmbientSound QAmbientSound; typedef struct QAudioEngine QAudioEngine; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -QAmbientSound* QAmbientSound_new(QAudioEngine* engine); +void QAmbientSound_new(QAudioEngine* engine, QAmbientSound** outptr_QAmbientSound, QObject** outptr_QObject); QMetaObject* QAmbientSound_MetaObject(const QAmbientSound* self); void* QAmbientSound_Metacast(QAmbientSound* self, const char* param1); struct miqt_string QAmbientSound_Tr(const char* s); @@ -52,7 +62,21 @@ void QAmbientSound_Pause(QAmbientSound* self); void QAmbientSound_Stop(QAmbientSound* self); struct miqt_string QAmbientSound_Tr2(const char* s, const char* c); struct miqt_string QAmbientSound_Tr3(const char* s, const char* c, int n); -void QAmbientSound_Delete(QAmbientSound* self); +void QAmbientSound_override_virtual_Event(void* self, intptr_t slot); +bool QAmbientSound_virtualbase_Event(void* self, QEvent* event); +void QAmbientSound_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAmbientSound_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAmbientSound_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAmbientSound_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAmbientSound_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAmbientSound_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAmbientSound_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAmbientSound_virtualbase_CustomEvent(void* self, QEvent* event); +void QAmbientSound_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAmbientSound_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAmbientSound_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAmbientSound_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAmbientSound_Delete(QAmbientSound* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/spatialaudio/gen_qaudioengine.cpp b/qt6/spatialaudio/gen_qaudioengine.cpp index b01f8f90..3b060074 100644 --- a/qt6/spatialaudio/gen_qaudioengine.cpp +++ b/qt6/spatialaudio/gen_qaudioengine.cpp @@ -1,28 +1,223 @@ #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaudioengine.h" #include "_cgo_export.h" -QAudioEngine* QAudioEngine_new() { - return new QAudioEngine(); +class MiqtVirtualQAudioEngine : public virtual QAudioEngine { +public: + + MiqtVirtualQAudioEngine(): QAudioEngine() {}; + MiqtVirtualQAudioEngine(QObject* parent): QAudioEngine(parent) {}; + MiqtVirtualQAudioEngine(int sampleRate): QAudioEngine(sampleRate) {}; + MiqtVirtualQAudioEngine(int sampleRate, QObject* parent): QAudioEngine(sampleRate, parent) {}; + + virtual ~MiqtVirtualQAudioEngine() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioEngine::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioEngine_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioEngine::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioEngine::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioEngine_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioEngine::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioEngine::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioEngine_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioEngine::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioEngine::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioEngine_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioEngine::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioEngine::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioEngine_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioEngine::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioEngine::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioEngine_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioEngine::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioEngine::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioEngine_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioEngine::disconnectNotify(*signal); + + } + +}; + +void QAudioEngine_new(QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { + MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(); + *outptr_QAudioEngine = ret; + *outptr_QObject = static_cast(ret); } -QAudioEngine* QAudioEngine_new2(QObject* parent) { - return new QAudioEngine(parent); +void QAudioEngine_new2(QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { + MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(parent); + *outptr_QAudioEngine = ret; + *outptr_QObject = static_cast(ret); } -QAudioEngine* QAudioEngine_new3(int sampleRate) { - return new QAudioEngine(static_cast(sampleRate)); +void QAudioEngine_new3(int sampleRate, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { + MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(static_cast(sampleRate)); + *outptr_QAudioEngine = ret; + *outptr_QObject = static_cast(ret); } -QAudioEngine* QAudioEngine_new4(int sampleRate, QObject* parent) { - return new QAudioEngine(static_cast(sampleRate), parent); +void QAudioEngine_new4(int sampleRate, QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { + MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(static_cast(sampleRate), parent); + *outptr_QAudioEngine = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioEngine_MetaObject(const QAudioEngine* self) { @@ -102,7 +297,7 @@ void QAudioEngine_OutputModeChanged(QAudioEngine* self) { } void QAudioEngine_connect_OutputModeChanged(QAudioEngine* self, intptr_t slot) { - QAudioEngine::connect(self, static_cast(&QAudioEngine::outputModeChanged), self, [=]() { + MiqtVirtualQAudioEngine::connect(self, static_cast(&QAudioEngine::outputModeChanged), self, [=]() { miqt_exec_callback_QAudioEngine_OutputModeChanged(slot); }); } @@ -112,7 +307,7 @@ void QAudioEngine_OutputDeviceChanged(QAudioEngine* self) { } void QAudioEngine_connect_OutputDeviceChanged(QAudioEngine* self, intptr_t slot) { - QAudioEngine::connect(self, static_cast(&QAudioEngine::outputDeviceChanged), self, [=]() { + MiqtVirtualQAudioEngine::connect(self, static_cast(&QAudioEngine::outputDeviceChanged), self, [=]() { miqt_exec_callback_QAudioEngine_OutputDeviceChanged(slot); }); } @@ -122,7 +317,7 @@ void QAudioEngine_MasterVolumeChanged(QAudioEngine* self) { } void QAudioEngine_connect_MasterVolumeChanged(QAudioEngine* self, intptr_t slot) { - QAudioEngine::connect(self, static_cast(&QAudioEngine::masterVolumeChanged), self, [=]() { + MiqtVirtualQAudioEngine::connect(self, static_cast(&QAudioEngine::masterVolumeChanged), self, [=]() { miqt_exec_callback_QAudioEngine_MasterVolumeChanged(slot); }); } @@ -132,7 +327,7 @@ void QAudioEngine_PausedChanged(QAudioEngine* self) { } void QAudioEngine_connect_PausedChanged(QAudioEngine* self, intptr_t slot) { - QAudioEngine::connect(self, static_cast(&QAudioEngine::pausedChanged), self, [=]() { + MiqtVirtualQAudioEngine::connect(self, static_cast(&QAudioEngine::pausedChanged), self, [=]() { miqt_exec_callback_QAudioEngine_PausedChanged(slot); }); } @@ -142,7 +337,7 @@ void QAudioEngine_DistanceScaleChanged(QAudioEngine* self) { } void QAudioEngine_connect_DistanceScaleChanged(QAudioEngine* self, intptr_t slot) { - QAudioEngine::connect(self, static_cast(&QAudioEngine::distanceScaleChanged), self, [=]() { + MiqtVirtualQAudioEngine::connect(self, static_cast(&QAudioEngine::distanceScaleChanged), self, [=]() { miqt_exec_callback_QAudioEngine_DistanceScaleChanged(slot); }); } @@ -185,7 +380,67 @@ struct miqt_string QAudioEngine_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioEngine_Delete(QAudioEngine* self) { - delete self; +void QAudioEngine_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__Event = slot; +} + +bool QAudioEngine_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_Event(event); +} + +void QAudioEngine_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__EventFilter = slot; +} + +bool QAudioEngine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioEngine_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__TimerEvent = slot; +} + +void QAudioEngine_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioEngine_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__ChildEvent = slot; +} + +void QAudioEngine_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioEngine_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__CustomEvent = slot; +} + +void QAudioEngine_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioEngine_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioEngine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioEngine_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioEngine*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioEngine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioEngine*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioEngine_Delete(QAudioEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/spatialaudio/gen_qaudioengine.go b/qt6/spatialaudio/gen_qaudioengine.go index e58986b2..b34764b3 100644 --- a/qt6/spatialaudio/gen_qaudioengine.go +++ b/qt6/spatialaudio/gen_qaudioengine.go @@ -25,7 +25,8 @@ const ( ) type QAudioEngine struct { - h *C.QAudioEngine + h *C.QAudioEngine + isSubclass bool *qt6.QObject } @@ -43,39 +44,67 @@ func (this *QAudioEngine) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioEngine(h *C.QAudioEngine) *QAudioEngine { +// newQAudioEngine constructs the type using only CGO pointers. +func newQAudioEngine(h *C.QAudioEngine, h_QObject *C.QObject) *QAudioEngine { if h == nil { return nil } - return &QAudioEngine{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioEngine{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioEngine(h unsafe.Pointer) *QAudioEngine { - return newQAudioEngine((*C.QAudioEngine)(h)) +// UnsafeNewQAudioEngine constructs the type using only unsafe pointers. +func UnsafeNewQAudioEngine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioEngine { + if h == nil { + return nil + } + + return &QAudioEngine{h: (*C.QAudioEngine)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioEngine constructs a new QAudioEngine object. func NewQAudioEngine() *QAudioEngine { - ret := C.QAudioEngine_new() - return newQAudioEngine(ret) + var outptr_QAudioEngine *C.QAudioEngine = nil + var outptr_QObject *C.QObject = nil + + C.QAudioEngine_new(&outptr_QAudioEngine, &outptr_QObject) + ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioEngine2 constructs a new QAudioEngine object. func NewQAudioEngine2(parent *qt6.QObject) *QAudioEngine { - ret := C.QAudioEngine_new2((*C.QObject)(parent.UnsafePointer())) - return newQAudioEngine(ret) + var outptr_QAudioEngine *C.QAudioEngine = nil + var outptr_QObject *C.QObject = nil + + C.QAudioEngine_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioEngine, &outptr_QObject) + ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioEngine3 constructs a new QAudioEngine object. func NewQAudioEngine3(sampleRate int) *QAudioEngine { - ret := C.QAudioEngine_new3((C.int)(sampleRate)) - return newQAudioEngine(ret) + var outptr_QAudioEngine *C.QAudioEngine = nil + var outptr_QObject *C.QObject = nil + + C.QAudioEngine_new3((C.int)(sampleRate), &outptr_QAudioEngine, &outptr_QObject) + ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret.isSubclass = true + return ret } // NewQAudioEngine4 constructs a new QAudioEngine object. func NewQAudioEngine4(sampleRate int, parent *qt6.QObject) *QAudioEngine { - ret := C.QAudioEngine_new4((C.int)(sampleRate), (*C.QObject)(parent.UnsafePointer())) - return newQAudioEngine(ret) + var outptr_QAudioEngine *C.QAudioEngine = nil + var outptr_QObject *C.QObject = nil + + C.QAudioEngine_new4((C.int)(sampleRate), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioEngine, &outptr_QObject) + ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioEngine) MetaObject() *qt6.QMetaObject { @@ -275,9 +304,175 @@ func QAudioEngine_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioEngine) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioEngine_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioEngine) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioEngine_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_Event +func miqt_exec_callback_QAudioEngine_Event(self *C.QAudioEngine, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioEngine{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioEngine) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioEngine_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioEngine) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioEngine_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_EventFilter +func miqt_exec_callback_QAudioEngine_EventFilter(self *C.QAudioEngine, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioEngine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioEngine) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioEngine_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioEngine) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioEngine_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_TimerEvent +func miqt_exec_callback_QAudioEngine_TimerEvent(self *C.QAudioEngine, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioEngine{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioEngine) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioEngine_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioEngine) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioEngine_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_ChildEvent +func miqt_exec_callback_QAudioEngine_ChildEvent(self *C.QAudioEngine, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioEngine{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioEngine) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioEngine_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioEngine) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioEngine_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_CustomEvent +func miqt_exec_callback_QAudioEngine_CustomEvent(self *C.QAudioEngine, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioEngine{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioEngine) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioEngine_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioEngine) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioEngine_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_ConnectNotify +func miqt_exec_callback_QAudioEngine_ConnectNotify(self *C.QAudioEngine, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioEngine{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioEngine) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioEngine_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioEngine) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioEngine_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioEngine_DisconnectNotify +func miqt_exec_callback_QAudioEngine_DisconnectNotify(self *C.QAudioEngine, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioEngine{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioEngine) Delete() { - C.QAudioEngine_Delete(this.h) + C.QAudioEngine_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/spatialaudio/gen_qaudioengine.h b/qt6/spatialaudio/gen_qaudioengine.h index 8a72cfed..46bc354f 100644 --- a/qt6/spatialaudio/gen_qaudioengine.h +++ b/qt6/spatialaudio/gen_qaudioengine.h @@ -17,19 +17,27 @@ extern "C" { #ifdef __cplusplus class QAudioDevice; class QAudioEngine; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAudioDevice QAudioDevice; typedef struct QAudioEngine QAudioEngine; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif -QAudioEngine* QAudioEngine_new(); -QAudioEngine* QAudioEngine_new2(QObject* parent); -QAudioEngine* QAudioEngine_new3(int sampleRate); -QAudioEngine* QAudioEngine_new4(int sampleRate, QObject* parent); +void QAudioEngine_new(QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); +void QAudioEngine_new2(QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); +void QAudioEngine_new3(int sampleRate, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); +void QAudioEngine_new4(int sampleRate, QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); QMetaObject* QAudioEngine_MetaObject(const QAudioEngine* self); void* QAudioEngine_Metacast(QAudioEngine* self, const char* param1); struct miqt_string QAudioEngine_Tr(const char* s); @@ -62,7 +70,21 @@ void QAudioEngine_Pause(QAudioEngine* self); void QAudioEngine_Resume(QAudioEngine* self); struct miqt_string QAudioEngine_Tr2(const char* s, const char* c); struct miqt_string QAudioEngine_Tr3(const char* s, const char* c, int n); -void QAudioEngine_Delete(QAudioEngine* self); +void QAudioEngine_override_virtual_Event(void* self, intptr_t slot); +bool QAudioEngine_virtualbase_Event(void* self, QEvent* event); +void QAudioEngine_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioEngine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioEngine_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioEngine_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioEngine_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioEngine_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioEngine_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioEngine_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioEngine_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioEngine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioEngine_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioEngine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioEngine_Delete(QAudioEngine* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/spatialaudio/gen_qaudiolistener.cpp b/qt6/spatialaudio/gen_qaudiolistener.cpp index 8b224f02..3df4e6b1 100644 --- a/qt6/spatialaudio/gen_qaudiolistener.cpp +++ b/qt6/spatialaudio/gen_qaudiolistener.cpp @@ -1,13 +1,200 @@ #include #include +#include +#include +#include +#include #include +#include #include #include #include "gen_qaudiolistener.h" #include "_cgo_export.h" -QAudioListener* QAudioListener_new(QAudioEngine* engine) { - return new QAudioListener(engine); +class MiqtVirtualQAudioListener : public virtual QAudioListener { +public: + + MiqtVirtualQAudioListener(QAudioEngine* engine): QAudioListener(engine) {}; + + virtual ~MiqtVirtualQAudioListener() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioListener::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioListener_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioListener::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioListener::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioListener_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioListener::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioListener::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioListener_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioListener::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioListener::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioListener_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioListener::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioListener::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioListener_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioListener::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioListener::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioListener_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioListener::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioListener::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioListener_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioListener::disconnectNotify(*signal); + + } + +}; + +void QAudioListener_new(QAudioEngine* engine, QAudioListener** outptr_QAudioListener, QObject** outptr_QObject) { + MiqtVirtualQAudioListener* ret = new MiqtVirtualQAudioListener(engine); + *outptr_QAudioListener = ret; + *outptr_QObject = static_cast(ret); } void QAudioListener_SetPosition(QAudioListener* self, QVector3D* pos) { @@ -30,7 +217,67 @@ QAudioEngine* QAudioListener_Engine(const QAudioListener* self) { return self->engine(); } -void QAudioListener_Delete(QAudioListener* self) { - delete self; +void QAudioListener_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__Event = slot; +} + +bool QAudioListener_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_Event(event); +} + +void QAudioListener_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__EventFilter = slot; +} + +bool QAudioListener_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioListener_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__TimerEvent = slot; +} + +void QAudioListener_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioListener_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__ChildEvent = slot; +} + +void QAudioListener_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioListener_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__CustomEvent = slot; +} + +void QAudioListener_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioListener_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioListener_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioListener_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioListener*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioListener_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioListener*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioListener_Delete(QAudioListener* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/spatialaudio/gen_qaudiolistener.go b/qt6/spatialaudio/gen_qaudiolistener.go index 9f0135e1..99082538 100644 --- a/qt6/spatialaudio/gen_qaudiolistener.go +++ b/qt6/spatialaudio/gen_qaudiolistener.go @@ -11,11 +11,13 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) type QAudioListener struct { - h *C.QAudioListener + h *C.QAudioListener + isSubclass bool *qt6.QObject } @@ -33,21 +35,34 @@ func (this *QAudioListener) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioListener(h *C.QAudioListener) *QAudioListener { +// newQAudioListener constructs the type using only CGO pointers. +func newQAudioListener(h *C.QAudioListener, h_QObject *C.QObject) *QAudioListener { if h == nil { return nil } - return &QAudioListener{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioListener{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioListener(h unsafe.Pointer) *QAudioListener { - return newQAudioListener((*C.QAudioListener)(h)) +// UnsafeNewQAudioListener constructs the type using only unsafe pointers. +func UnsafeNewQAudioListener(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioListener { + if h == nil { + return nil + } + + return &QAudioListener{h: (*C.QAudioListener)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioListener constructs a new QAudioListener object. func NewQAudioListener(engine *QAudioEngine) *QAudioListener { - ret := C.QAudioListener_new(engine.cPointer()) - return newQAudioListener(ret) + var outptr_QAudioListener *C.QAudioListener = nil + var outptr_QObject *C.QObject = nil + + C.QAudioListener_new(engine.cPointer(), &outptr_QAudioListener, &outptr_QObject) + ret := newQAudioListener(outptr_QAudioListener, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioListener) SetPosition(pos qt6.QVector3D) { @@ -73,12 +88,178 @@ func (this *QAudioListener) Rotation() *qt6.QQuaternion { } func (this *QAudioListener) Engine() *QAudioEngine { - return UnsafeNewQAudioEngine(unsafe.Pointer(C.QAudioListener_Engine(this.h))) + return UnsafeNewQAudioEngine(unsafe.Pointer(C.QAudioListener_Engine(this.h)), nil) +} + +func (this *QAudioListener) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioListener_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioListener) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioListener_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_Event +func miqt_exec_callback_QAudioListener_Event(self *C.QAudioListener, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioListener{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioListener) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioListener_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioListener) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioListener_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_EventFilter +func miqt_exec_callback_QAudioListener_EventFilter(self *C.QAudioListener, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioListener{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioListener) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioListener_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioListener) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioListener_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_TimerEvent +func miqt_exec_callback_QAudioListener_TimerEvent(self *C.QAudioListener, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioListener{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioListener) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioListener_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioListener) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioListener_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_ChildEvent +func miqt_exec_callback_QAudioListener_ChildEvent(self *C.QAudioListener, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioListener{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioListener) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioListener_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioListener) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioListener_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_CustomEvent +func miqt_exec_callback_QAudioListener_CustomEvent(self *C.QAudioListener, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioListener{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioListener) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioListener_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioListener) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioListener_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_ConnectNotify +func miqt_exec_callback_QAudioListener_ConnectNotify(self *C.QAudioListener, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioListener{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioListener) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioListener_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioListener) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioListener_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioListener_DisconnectNotify +func miqt_exec_callback_QAudioListener_DisconnectNotify(self *C.QAudioListener, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioListener{h: self}).callVirtualBase_DisconnectNotify, slotval1) + } // Delete this object from C++ memory. func (this *QAudioListener) Delete() { - C.QAudioListener_Delete(this.h) + C.QAudioListener_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/spatialaudio/gen_qaudiolistener.h b/qt6/spatialaudio/gen_qaudiolistener.h index 3881adf2..d788be13 100644 --- a/qt6/spatialaudio/gen_qaudiolistener.h +++ b/qt6/spatialaudio/gen_qaudiolistener.h @@ -17,22 +17,46 @@ extern "C" { #ifdef __cplusplus class QAudioEngine; class QAudioListener; +class QChildEvent; +class QEvent; +class QMetaMethod; +class QObject; class QQuaternion; +class QTimerEvent; class QVector3D; #else typedef struct QAudioEngine QAudioEngine; typedef struct QAudioListener QAudioListener; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QObject QObject; typedef struct QQuaternion QQuaternion; +typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif -QAudioListener* QAudioListener_new(QAudioEngine* engine); +void QAudioListener_new(QAudioEngine* engine, QAudioListener** outptr_QAudioListener, QObject** outptr_QObject); void QAudioListener_SetPosition(QAudioListener* self, QVector3D* pos); QVector3D* QAudioListener_Position(const QAudioListener* self); void QAudioListener_SetRotation(QAudioListener* self, QQuaternion* q); QQuaternion* QAudioListener_Rotation(const QAudioListener* self); QAudioEngine* QAudioListener_Engine(const QAudioListener* self); -void QAudioListener_Delete(QAudioListener* self); +void QAudioListener_override_virtual_Event(void* self, intptr_t slot); +bool QAudioListener_virtualbase_Event(void* self, QEvent* event); +void QAudioListener_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioListener_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioListener_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioListener_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioListener_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioListener_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioListener_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioListener_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioListener_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioListener_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioListener_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioListener_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioListener_Delete(QAudioListener* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/spatialaudio/gen_qaudioroom.cpp b/qt6/spatialaudio/gen_qaudioroom.cpp index e82d8a85..30cd8eaf 100644 --- a/qt6/spatialaudio/gen_qaudioroom.cpp +++ b/qt6/spatialaudio/gen_qaudioroom.cpp @@ -1,17 +1,204 @@ #include #include +#include +#include +#include #include +#include #include #include #include #include +#include #include #include #include "gen_qaudioroom.h" #include "_cgo_export.h" -QAudioRoom* QAudioRoom_new(QAudioEngine* engine) { - return new QAudioRoom(engine); +class MiqtVirtualQAudioRoom : public virtual QAudioRoom { +public: + + MiqtVirtualQAudioRoom(QAudioEngine* engine): QAudioRoom(engine) {}; + + virtual ~MiqtVirtualQAudioRoom() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QAudioRoom::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioRoom_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioRoom::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QAudioRoom::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioRoom_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioRoom::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QAudioRoom::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioRoom_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioRoom::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QAudioRoom::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioRoom_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioRoom::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QAudioRoom::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioRoom_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioRoom::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QAudioRoom::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioRoom_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioRoom::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QAudioRoom::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioRoom_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioRoom::disconnectNotify(*signal); + + } + +}; + +void QAudioRoom_new(QAudioEngine* engine, QAudioRoom** outptr_QAudioRoom, QObject** outptr_QObject) { + MiqtVirtualQAudioRoom* ret = new MiqtVirtualQAudioRoom(engine); + *outptr_QAudioRoom = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QAudioRoom_MetaObject(const QAudioRoom* self) { @@ -103,7 +290,7 @@ void QAudioRoom_PositionChanged(QAudioRoom* self) { } void QAudioRoom_connect_PositionChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::positionChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::positionChanged), self, [=]() { miqt_exec_callback_QAudioRoom_PositionChanged(slot); }); } @@ -113,7 +300,7 @@ void QAudioRoom_DimensionsChanged(QAudioRoom* self) { } void QAudioRoom_connect_DimensionsChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::dimensionsChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::dimensionsChanged), self, [=]() { miqt_exec_callback_QAudioRoom_DimensionsChanged(slot); }); } @@ -123,7 +310,7 @@ void QAudioRoom_RotationChanged(QAudioRoom* self) { } void QAudioRoom_connect_RotationChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::rotationChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::rotationChanged), self, [=]() { miqt_exec_callback_QAudioRoom_RotationChanged(slot); }); } @@ -133,7 +320,7 @@ void QAudioRoom_WallsChanged(QAudioRoom* self) { } void QAudioRoom_connect_WallsChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::wallsChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::wallsChanged), self, [=]() { miqt_exec_callback_QAudioRoom_WallsChanged(slot); }); } @@ -143,7 +330,7 @@ void QAudioRoom_ReflectionGainChanged(QAudioRoom* self) { } void QAudioRoom_connect_ReflectionGainChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::reflectionGainChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::reflectionGainChanged), self, [=]() { miqt_exec_callback_QAudioRoom_ReflectionGainChanged(slot); }); } @@ -153,7 +340,7 @@ void QAudioRoom_ReverbGainChanged(QAudioRoom* self) { } void QAudioRoom_connect_ReverbGainChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::reverbGainChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::reverbGainChanged), self, [=]() { miqt_exec_callback_QAudioRoom_ReverbGainChanged(slot); }); } @@ -163,7 +350,7 @@ void QAudioRoom_ReverbTimeChanged(QAudioRoom* self) { } void QAudioRoom_connect_ReverbTimeChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::reverbTimeChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::reverbTimeChanged), self, [=]() { miqt_exec_callback_QAudioRoom_ReverbTimeChanged(slot); }); } @@ -173,7 +360,7 @@ void QAudioRoom_ReverbBrightnessChanged(QAudioRoom* self) { } void QAudioRoom_connect_ReverbBrightnessChanged(QAudioRoom* self, intptr_t slot) { - QAudioRoom::connect(self, static_cast(&QAudioRoom::reverbBrightnessChanged), self, [=]() { + MiqtVirtualQAudioRoom::connect(self, static_cast(&QAudioRoom::reverbBrightnessChanged), self, [=]() { miqt_exec_callback_QAudioRoom_ReverbBrightnessChanged(slot); }); } @@ -200,7 +387,67 @@ struct miqt_string QAudioRoom_Tr3(const char* s, const char* c, int n) { return _ms; } -void QAudioRoom_Delete(QAudioRoom* self) { - delete self; +void QAudioRoom_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__Event = slot; +} + +bool QAudioRoom_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_Event(event); +} + +void QAudioRoom_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__EventFilter = slot; +} + +bool QAudioRoom_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioRoom_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__TimerEvent = slot; +} + +void QAudioRoom_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioRoom_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__ChildEvent = slot; +} + +void QAudioRoom_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioRoom_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__CustomEvent = slot; +} + +void QAudioRoom_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioRoom_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioRoom_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioRoom_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioRoom*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioRoom_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioRoom*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QAudioRoom_Delete(QAudioRoom* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/spatialaudio/gen_qaudioroom.go b/qt6/spatialaudio/gen_qaudioroom.go index 7a9d8f4c..af317456 100644 --- a/qt6/spatialaudio/gen_qaudioroom.go +++ b/qt6/spatialaudio/gen_qaudioroom.go @@ -56,7 +56,8 @@ const ( ) type QAudioRoom struct { - h *C.QAudioRoom + h *C.QAudioRoom + isSubclass bool *qt6.QObject } @@ -74,21 +75,34 @@ func (this *QAudioRoom) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQAudioRoom(h *C.QAudioRoom) *QAudioRoom { +// newQAudioRoom constructs the type using only CGO pointers. +func newQAudioRoom(h *C.QAudioRoom, h_QObject *C.QObject) *QAudioRoom { if h == nil { return nil } - return &QAudioRoom{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QAudioRoom{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQAudioRoom(h unsafe.Pointer) *QAudioRoom { - return newQAudioRoom((*C.QAudioRoom)(h)) +// UnsafeNewQAudioRoom constructs the type using only unsafe pointers. +func UnsafeNewQAudioRoom(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioRoom { + if h == nil { + return nil + } + + return &QAudioRoom{h: (*C.QAudioRoom)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQAudioRoom constructs a new QAudioRoom object. func NewQAudioRoom(engine *QAudioEngine) *QAudioRoom { - ret := C.QAudioRoom_new(engine.cPointer()) - return newQAudioRoom(ret) + var outptr_QAudioRoom *C.QAudioRoom = nil + var outptr_QObject *C.QObject = nil + + C.QAudioRoom_new(engine.cPointer(), &outptr_QAudioRoom, &outptr_QObject) + ret := newQAudioRoom(outptr_QAudioRoom, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QAudioRoom) MetaObject() *qt6.QMetaObject { @@ -341,9 +355,175 @@ func QAudioRoom_Tr3(s string, c string, n int) string { return _ret } +func (this *QAudioRoom) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QAudioRoom_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioRoom) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QAudioRoom_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_Event +func miqt_exec_callback_QAudioRoom_Event(self *C.QAudioRoom, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioRoom{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioRoom) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QAudioRoom_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioRoom) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QAudioRoom_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_EventFilter +func miqt_exec_callback_QAudioRoom_EventFilter(self *C.QAudioRoom, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QAudioRoom{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioRoom) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QAudioRoom_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioRoom) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QAudioRoom_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_TimerEvent +func miqt_exec_callback_QAudioRoom_TimerEvent(self *C.QAudioRoom, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioRoom{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioRoom) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QAudioRoom_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioRoom) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QAudioRoom_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_ChildEvent +func miqt_exec_callback_QAudioRoom_ChildEvent(self *C.QAudioRoom, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QAudioRoom{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioRoom) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QAudioRoom_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioRoom) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QAudioRoom_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_CustomEvent +func miqt_exec_callback_QAudioRoom_CustomEvent(self *C.QAudioRoom, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QAudioRoom{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioRoom) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioRoom_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioRoom) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioRoom_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_ConnectNotify +func miqt_exec_callback_QAudioRoom_ConnectNotify(self *C.QAudioRoom, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioRoom{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioRoom) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QAudioRoom_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioRoom) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QAudioRoom_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioRoom_DisconnectNotify +func miqt_exec_callback_QAudioRoom_DisconnectNotify(self *C.QAudioRoom, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QAudioRoom{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAudioRoom) Delete() { - C.QAudioRoom_Delete(this.h) + C.QAudioRoom_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/spatialaudio/gen_qaudioroom.h b/qt6/spatialaudio/gen_qaudioroom.h index 5d522cea..975dd8df 100644 --- a/qt6/spatialaudio/gen_qaudioroom.h +++ b/qt6/spatialaudio/gen_qaudioroom.h @@ -17,18 +17,28 @@ extern "C" { #ifdef __cplusplus class QAudioEngine; class QAudioRoom; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; +class QObject; class QQuaternion; +class QTimerEvent; class QVector3D; #else typedef struct QAudioEngine QAudioEngine; typedef struct QAudioRoom QAudioRoom; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QQuaternion QQuaternion; +typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif -QAudioRoom* QAudioRoom_new(QAudioEngine* engine); +void QAudioRoom_new(QAudioEngine* engine, QAudioRoom** outptr_QAudioRoom, QObject** outptr_QObject); QMetaObject* QAudioRoom_MetaObject(const QAudioRoom* self); void* QAudioRoom_Metacast(QAudioRoom* self, const char* param1); struct miqt_string QAudioRoom_Tr(const char* s); @@ -66,7 +76,21 @@ void QAudioRoom_ReverbBrightnessChanged(QAudioRoom* self); void QAudioRoom_connect_ReverbBrightnessChanged(QAudioRoom* self, intptr_t slot); struct miqt_string QAudioRoom_Tr2(const char* s, const char* c); struct miqt_string QAudioRoom_Tr3(const char* s, const char* c, int n); -void QAudioRoom_Delete(QAudioRoom* self); +void QAudioRoom_override_virtual_Event(void* self, intptr_t slot); +bool QAudioRoom_virtualbase_Event(void* self, QEvent* event); +void QAudioRoom_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioRoom_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioRoom_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioRoom_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioRoom_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioRoom_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioRoom_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioRoom_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioRoom_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioRoom_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioRoom_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioRoom_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QAudioRoom_Delete(QAudioRoom* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/spatialaudio/gen_qspatialsound.cpp b/qt6/spatialaudio/gen_qspatialsound.cpp index 8b96deaa..be55aafd 100644 --- a/qt6/spatialaudio/gen_qspatialsound.cpp +++ b/qt6/spatialaudio/gen_qspatialsound.cpp @@ -1,18 +1,205 @@ #include +#include +#include +#include #include +#include #include #include #include #include #include +#include #include #include #include #include "gen_qspatialsound.h" #include "_cgo_export.h" -QSpatialSound* QSpatialSound_new(QAudioEngine* engine) { - return new QSpatialSound(engine); +class MiqtVirtualQSpatialSound : public virtual QSpatialSound { +public: + + MiqtVirtualQSpatialSound(QAudioEngine* engine): QSpatialSound(engine) {}; + + virtual ~MiqtVirtualQSpatialSound() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSpatialSound::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSpatialSound_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSpatialSound::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QSpatialSound::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSpatialSound_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSpatialSound::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QSpatialSound::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSpatialSound_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSpatialSound::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QSpatialSound::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSpatialSound_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSpatialSound::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QSpatialSound::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSpatialSound_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSpatialSound::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QSpatialSound::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSpatialSound_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSpatialSound::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QSpatialSound::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSpatialSound_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSpatialSound::disconnectNotify(*signal); + + } + +}; + +void QSpatialSound_new(QAudioEngine* engine, QSpatialSound** outptr_QSpatialSound, QObject** outptr_QObject) { + MiqtVirtualQSpatialSound* ret = new MiqtVirtualQSpatialSound(engine); + *outptr_QSpatialSound = ret; + *outptr_QObject = static_cast(ret); } QMetaObject* QSpatialSound_MetaObject(const QSpatialSound* self) { @@ -156,7 +343,7 @@ void QSpatialSound_SourceChanged(QSpatialSound* self) { } void QSpatialSound_connect_SourceChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::sourceChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::sourceChanged), self, [=]() { miqt_exec_callback_QSpatialSound_SourceChanged(slot); }); } @@ -166,7 +353,7 @@ void QSpatialSound_LoopsChanged(QSpatialSound* self) { } void QSpatialSound_connect_LoopsChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::loopsChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::loopsChanged), self, [=]() { miqt_exec_callback_QSpatialSound_LoopsChanged(slot); }); } @@ -176,7 +363,7 @@ void QSpatialSound_AutoPlayChanged(QSpatialSound* self) { } void QSpatialSound_connect_AutoPlayChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::autoPlayChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::autoPlayChanged), self, [=]() { miqt_exec_callback_QSpatialSound_AutoPlayChanged(slot); }); } @@ -186,7 +373,7 @@ void QSpatialSound_PositionChanged(QSpatialSound* self) { } void QSpatialSound_connect_PositionChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::positionChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::positionChanged), self, [=]() { miqt_exec_callback_QSpatialSound_PositionChanged(slot); }); } @@ -196,7 +383,7 @@ void QSpatialSound_RotationChanged(QSpatialSound* self) { } void QSpatialSound_connect_RotationChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::rotationChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::rotationChanged), self, [=]() { miqt_exec_callback_QSpatialSound_RotationChanged(slot); }); } @@ -206,7 +393,7 @@ void QSpatialSound_VolumeChanged(QSpatialSound* self) { } void QSpatialSound_connect_VolumeChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::volumeChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::volumeChanged), self, [=]() { miqt_exec_callback_QSpatialSound_VolumeChanged(slot); }); } @@ -216,7 +403,7 @@ void QSpatialSound_DistanceModelChanged(QSpatialSound* self) { } void QSpatialSound_connect_DistanceModelChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::distanceModelChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::distanceModelChanged), self, [=]() { miqt_exec_callback_QSpatialSound_DistanceModelChanged(slot); }); } @@ -226,7 +413,7 @@ void QSpatialSound_SizeChanged(QSpatialSound* self) { } void QSpatialSound_connect_SizeChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::sizeChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::sizeChanged), self, [=]() { miqt_exec_callback_QSpatialSound_SizeChanged(slot); }); } @@ -236,7 +423,7 @@ void QSpatialSound_DistanceCutoffChanged(QSpatialSound* self) { } void QSpatialSound_connect_DistanceCutoffChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::distanceCutoffChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::distanceCutoffChanged), self, [=]() { miqt_exec_callback_QSpatialSound_DistanceCutoffChanged(slot); }); } @@ -246,7 +433,7 @@ void QSpatialSound_ManualAttenuationChanged(QSpatialSound* self) { } void QSpatialSound_connect_ManualAttenuationChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::manualAttenuationChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::manualAttenuationChanged), self, [=]() { miqt_exec_callback_QSpatialSound_ManualAttenuationChanged(slot); }); } @@ -256,7 +443,7 @@ void QSpatialSound_OcclusionIntensityChanged(QSpatialSound* self) { } void QSpatialSound_connect_OcclusionIntensityChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::occlusionIntensityChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::occlusionIntensityChanged), self, [=]() { miqt_exec_callback_QSpatialSound_OcclusionIntensityChanged(slot); }); } @@ -266,7 +453,7 @@ void QSpatialSound_DirectivityChanged(QSpatialSound* self) { } void QSpatialSound_connect_DirectivityChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::directivityChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::directivityChanged), self, [=]() { miqt_exec_callback_QSpatialSound_DirectivityChanged(slot); }); } @@ -276,7 +463,7 @@ void QSpatialSound_DirectivityOrderChanged(QSpatialSound* self) { } void QSpatialSound_connect_DirectivityOrderChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::directivityOrderChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::directivityOrderChanged), self, [=]() { miqt_exec_callback_QSpatialSound_DirectivityOrderChanged(slot); }); } @@ -286,7 +473,7 @@ void QSpatialSound_NearFieldGainChanged(QSpatialSound* self) { } void QSpatialSound_connect_NearFieldGainChanged(QSpatialSound* self, intptr_t slot) { - QSpatialSound::connect(self, static_cast(&QSpatialSound::nearFieldGainChanged), self, [=]() { + MiqtVirtualQSpatialSound::connect(self, static_cast(&QSpatialSound::nearFieldGainChanged), self, [=]() { miqt_exec_callback_QSpatialSound_NearFieldGainChanged(slot); }); } @@ -325,7 +512,67 @@ struct miqt_string QSpatialSound_Tr3(const char* s, const char* c, int n) { return _ms; } -void QSpatialSound_Delete(QSpatialSound* self) { - delete self; +void QSpatialSound_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__Event = slot; +} + +bool QSpatialSound_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_Event(event); +} + +void QSpatialSound_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__EventFilter = slot; +} + +bool QSpatialSound_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSpatialSound_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__TimerEvent = slot; +} + +void QSpatialSound_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_TimerEvent(event); +} + +void QSpatialSound_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__ChildEvent = slot; +} + +void QSpatialSound_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_ChildEvent(event); +} + +void QSpatialSound_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__CustomEvent = slot; +} + +void QSpatialSound_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_CustomEvent(event); +} + +void QSpatialSound_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__ConnectNotify = slot; +} + +void QSpatialSound_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSpatialSound_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSpatialSound*)(self) )->handle__DisconnectNotify = slot; +} + +void QSpatialSound_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSpatialSound*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSpatialSound_Delete(QSpatialSound* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } } diff --git a/qt6/spatialaudio/gen_qspatialsound.go b/qt6/spatialaudio/gen_qspatialsound.go index a12b0573..cd53ad6a 100644 --- a/qt6/spatialaudio/gen_qspatialsound.go +++ b/qt6/spatialaudio/gen_qspatialsound.go @@ -31,7 +31,8 @@ const ( ) type QSpatialSound struct { - h *C.QSpatialSound + h *C.QSpatialSound + isSubclass bool *qt6.QObject } @@ -49,21 +50,34 @@ func (this *QSpatialSound) UnsafePointer() unsafe.Pointer { return unsafe.Pointer(this.h) } -func newQSpatialSound(h *C.QSpatialSound) *QSpatialSound { +// newQSpatialSound constructs the type using only CGO pointers. +func newQSpatialSound(h *C.QSpatialSound, h_QObject *C.QObject) *QSpatialSound { if h == nil { return nil } - return &QSpatialSound{h: h, QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h))} + return &QSpatialSound{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} } -func UnsafeNewQSpatialSound(h unsafe.Pointer) *QSpatialSound { - return newQSpatialSound((*C.QSpatialSound)(h)) +// UnsafeNewQSpatialSound constructs the type using only unsafe pointers. +func UnsafeNewQSpatialSound(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSpatialSound { + if h == nil { + return nil + } + + return &QSpatialSound{h: (*C.QSpatialSound)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} } // NewQSpatialSound constructs a new QSpatialSound object. func NewQSpatialSound(engine *QAudioEngine) *QSpatialSound { - ret := C.QSpatialSound_new(engine.cPointer()) - return newQSpatialSound(ret) + var outptr_QSpatialSound *C.QSpatialSound = nil + var outptr_QObject *C.QObject = nil + + C.QSpatialSound_new(engine.cPointer(), &outptr_QSpatialSound, &outptr_QObject) + ret := newQSpatialSound(outptr_QSpatialSound, outptr_QObject) + ret.isSubclass = true + return ret } func (this *QSpatialSound) MetaObject() *qt6.QMetaObject { @@ -207,7 +221,7 @@ func (this *QSpatialSound) NearFieldGain() float32 { } func (this *QSpatialSound) Engine() *QAudioEngine { - return UnsafeNewQAudioEngine(unsafe.Pointer(C.QSpatialSound_Engine(this.h))) + return UnsafeNewQAudioEngine(unsafe.Pointer(C.QSpatialSound_Engine(this.h)), nil) } func (this *QSpatialSound) SourceChanged() { @@ -482,9 +496,175 @@ func QSpatialSound_Tr3(s string, c string, n int) string { return _ret } +func (this *QSpatialSound) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QSpatialSound_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSpatialSound) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QSpatialSound_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_Event +func miqt_exec_callback_QSpatialSound_Event(self *C.QSpatialSound, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSpatialSound{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSpatialSound) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QSpatialSound_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSpatialSound) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QSpatialSound_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_EventFilter +func miqt_exec_callback_QSpatialSound_EventFilter(self *C.QSpatialSound, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QSpatialSound{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSpatialSound) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QSpatialSound_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QSpatialSound) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QSpatialSound_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_TimerEvent +func miqt_exec_callback_QSpatialSound_TimerEvent(self *C.QSpatialSound, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpatialSound{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSpatialSound) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QSpatialSound_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QSpatialSound) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QSpatialSound_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_ChildEvent +func miqt_exec_callback_QSpatialSound_ChildEvent(self *C.QSpatialSound, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QSpatialSound{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSpatialSound) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QSpatialSound_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSpatialSound) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QSpatialSound_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_CustomEvent +func miqt_exec_callback_QSpatialSound_CustomEvent(self *C.QSpatialSound, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QSpatialSound{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSpatialSound) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QSpatialSound_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSpatialSound) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QSpatialSound_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_ConnectNotify +func miqt_exec_callback_QSpatialSound_ConnectNotify(self *C.QSpatialSound, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSpatialSound{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSpatialSound) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QSpatialSound_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSpatialSound) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QSpatialSound_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSpatialSound_DisconnectNotify +func miqt_exec_callback_QSpatialSound_DisconnectNotify(self *C.QSpatialSound, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QSpatialSound{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QSpatialSound) Delete() { - C.QSpatialSound_Delete(this.h) + C.QSpatialSound_Delete(this.h, C.bool(this.isSubclass)) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted diff --git a/qt6/spatialaudio/gen_qspatialsound.h b/qt6/spatialaudio/gen_qspatialsound.h index 93341e2d..fef9a565 100644 --- a/qt6/spatialaudio/gen_qspatialsound.h +++ b/qt6/spatialaudio/gen_qspatialsound.h @@ -16,21 +16,31 @@ extern "C" { #ifdef __cplusplus class QAudioEngine; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; +class QObject; class QQuaternion; class QSpatialSound; +class QTimerEvent; class QUrl; class QVector3D; #else typedef struct QAudioEngine QAudioEngine; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; typedef struct QQuaternion QQuaternion; typedef struct QSpatialSound QSpatialSound; +typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; typedef struct QVector3D QVector3D; #endif -QSpatialSound* QSpatialSound_new(QAudioEngine* engine); +void QSpatialSound_new(QAudioEngine* engine, QSpatialSound** outptr_QSpatialSound, QObject** outptr_QObject); QMetaObject* QSpatialSound_MetaObject(const QSpatialSound* self); void* QSpatialSound_Metacast(QSpatialSound* self, const char* param1); struct miqt_string QSpatialSound_Tr(const char* s); @@ -96,7 +106,21 @@ void QSpatialSound_Pause(QSpatialSound* self); void QSpatialSound_Stop(QSpatialSound* self); struct miqt_string QSpatialSound_Tr2(const char* s, const char* c); struct miqt_string QSpatialSound_Tr3(const char* s, const char* c, int n); -void QSpatialSound_Delete(QSpatialSound* self); +void QSpatialSound_override_virtual_Event(void* self, intptr_t slot); +bool QSpatialSound_virtualbase_Event(void* self, QEvent* event); +void QSpatialSound_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSpatialSound_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSpatialSound_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSpatialSound_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSpatialSound_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSpatialSound_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSpatialSound_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSpatialSound_virtualbase_CustomEvent(void* self, QEvent* event); +void QSpatialSound_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSpatialSound_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSpatialSound_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSpatialSound_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSpatialSound_Delete(QSpatialSound* self, bool isSubclass); #ifdef __cplusplus } /* extern C */ From 90de7178f218fec8aa9c36417312cce39da9b899 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 19:59:55 +1300 Subject: [PATCH 16/22] genbindings: fix some cases of missing :: escaping --- cmd/genbindings/emitcabi.go | 6 +++--- cmd/genbindings/emitgo.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 46b9377c..616d00f9 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -759,14 +759,14 @@ func emitParametersCabiConstructor(c *CppClass, ctor *CppMethod) string { plist := slice_copy(ctor.Parameters) // semi-shallow copy plist = append(plist, CppParameter{ - ParameterName: cabiClassName("outptr_" + c.ClassName), + ParameterName: cabiClassName("outptr_" + cabiClassName(c.ClassName)), ParameterType: c.ClassName, Pointer: true, PointerCount: 2, }) for _, baseClass := range c.AllInherits() { plist = append(plist, CppParameter{ - ParameterName: cabiClassName("outptr_" + baseClass), + ParameterName: cabiClassName("outptr_" + cabiClassName(baseClass)), ParameterType: baseClass, Pointer: true, PointerCount: 2, @@ -986,7 +986,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { "\t*outptr_" + cabiClassName(c.ClassName) + " = ret;\n", // Original class name ) for _, baseClass := range c.AllInherits() { - ret.WriteString("\t*outptr_" + baseClass + " = static_cast<" + baseClass + "*>(ret);\n") + ret.WriteString("\t*outptr_" + cabiClassName(baseClass) + " = static_cast<" + baseClass + "*>(ret);\n") } ret.WriteString( diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 4ad60ec4..03f69ff0 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -862,7 +862,7 @@ import "C" ret.WriteString(`var outptr_` + cabiClassName(c.ClassName) + ` *C.` + goClassName + " = nil\n") outptrs = append(outptrs, "outptr_"+cabiClassName(c.ClassName)) for _, baseClass := range c.AllInherits() { - ret.WriteString(`var outptr_` + cabiClassName(baseClass) + ` *C.` + baseClass + " = nil\n") + ret.WriteString(`var outptr_` + cabiClassName(baseClass) + ` *C.` + cabiClassName(baseClass) + " = nil\n") outptrs = append(outptrs, "outptr_"+cabiClassName(baseClass)) } From b50870b9d971d71daa3708539f28437b0fcec2f9 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 20:00:35 +1300 Subject: [PATCH 17/22] genbindings: intptr_t-qintptr pointer casts require C-style casts --- cmd/genbindings/emitcabi.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 616d00f9..79b334eb 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -73,8 +73,8 @@ func (p CppParameter) RenderTypeCabi() string { ret = "_Float16" // No idea where this typedef comes from, but it exists case "qreal": ret = "double" - case "qintptr", "QIntegerForSizeof::Signed": - ret = "intptr_t" + case "qintptr", "QIntegerForSizeof::Signed": // long long int + ret = "intptr_t" // long int case "quintptr", "uintptr", "QIntegerForSizeof::Unsigned": ret = "uintptr_t" case "qsizetype", "qptrdiff", "QIntegerForSizeof::Signed": @@ -513,6 +513,9 @@ func emitAssignCppToCabi(assignExpression string, p CppParameter, rvalue string) if p.QtCppOriginalType != nil && p.QtCppOriginalType.Const != p.Const { afterCall += indent + "" + assignExpression + "const_cast<" + p.RenderTypeCabi() + ">(static_cast<" + p.RenderTypeIntermediateCpp() + ">(" + namePrefix + "_ret));\n" + } else if p.QtCppOriginalType != nil && p.QtCppOriginalType.ParameterType == "qintptr" { + // Hard int cast + afterCall += indent + "" + assignExpression + "(" + p.RenderTypeCabi() + ")(" + namePrefix + "_ret);\n" } else { afterCall += indent + "" + assignExpression + "static_cast<" + p.RenderTypeCabi() + ">(" + namePrefix + "_ret);\n" } From 392a92434a2f7776caa01ab57b7003504ebb8c7e Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 20:00:40 +1300 Subject: [PATCH 18/22] genbindings/config: omit QxxPrivate::xx --- cmd/genbindings/config-allowlist.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 332ee755..5646f5e3 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -131,7 +131,8 @@ func ImportHeaderForClass(className string) bool { func AllowClass(className string) bool { - if strings.HasSuffix(className, "Private") || strings.HasSuffix(className, "PrivateShared") { + if strings.HasSuffix(className, "Private") || strings.HasSuffix(className, "PrivateShared") || + strings.Contains(className, "Private::") || strings.HasSuffix(className, "PrivateShared::") { return false } From 3902c9d36b67f79019f86d333564eaee6e467efd Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 20:01:02 +1300 Subject: [PATCH 19/22] qt: rebuild (hide private classes, fix qintptr pointers) --- qt/gen_qarraydata.cpp | 9 - qt/gen_qarraydata.go | 50 - qt/gen_qarraydata.h | 8 - qt/gen_qdatastream.cpp | 14 - qt/gen_qdatastream.go | 60 - qt/gen_qdatastream.h | 9 - qt/gen_qexception.cpp | 39 - qt/gen_qexception.go | 136 -- qt/gen_qexception.h | 45 - qt/gen_qhashfunctions.cpp | 32 - qt/gen_qhashfunctions.go | 134 -- qt/gen_qhashfunctions.h | 43 - qt/gen_qmetatype.cpp | 242 ---- qt/gen_qmetatype.go | 636 --------- qt/gen_qmetatype.h | 102 -- qt/gen_qrefcount.cpp | 45 - qt/gen_qrefcount.go | 96 -- qt/gen_qrefcount.h | 41 - qt/gen_qresultstore.cpp | 124 -- qt/gen_qresultstore.go | 282 ---- qt/gen_qresultstore.h | 71 - qt/gen_qsocketnotifier.cpp | 2 +- qt/gen_qvariant.cpp | 23 - qt/gen_qvariant.go | 74 - qt/gen_qvariant.h | 11 - qt/network/gen_qabstractsocket.cpp | 6 +- qt/network/gen_qlocalserver.cpp | 2 +- qt/network/gen_qlocalsocket.cpp | 2 +- qt/network/gen_qsslsocket.cpp | 2 +- qt/network/gen_qtcpserver.cpp | 4 +- qt/network/gen_qtcpsocket.cpp | 4 +- qt/network/gen_qudpsocket.cpp | 4 +- qt6/gen_qabstractslider.cpp | 2 +- qt6/gen_qabstractspinbox.cpp | 2 +- qt6/gen_qarraydata.cpp | 9 - qt6/gen_qarraydata.go | 50 - qt6/gen_qarraydata.h | 8 - qt6/gen_qcalendarwidget.cpp | 2 +- qt6/gen_qcombobox.cpp | 2 +- qt6/gen_qdatastream.cpp | 14 - qt6/gen_qdatastream.go | 60 - qt6/gen_qdatastream.h | 9 - qt6/gen_qdialog.cpp | 2 +- qt6/gen_qdialogbuttonbox.cpp | 2 +- qt6/gen_qdockwidget.cpp | 2 +- qt6/gen_qexception.cpp | 25 - qt6/gen_qexception.go | 76 - qt6/gen_qexception.h | 36 - qt6/gen_qfocusframe.cpp | 2 +- qt6/gen_qframe.cpp | 2 +- qt6/gen_qgroupbox.cpp | 2 +- qt6/gen_qhashfunctions.cpp | 28 - qt6/gen_qhashfunctions.go | 120 -- qt6/gen_qhashfunctions.h | 18 - qt6/gen_qkeysequenceedit.cpp | 2 +- qt6/gen_qlineedit.cpp | 2 +- qt6/gen_qmainwindow.cpp | 2 +- qt6/gen_qmdisubwindow.cpp | 2 +- qt6/gen_qmenu.cpp | 2 +- qt6/gen_qmenubar.cpp | 2 +- qt6/gen_qmetacontainer.cpp | 63 +- qt6/gen_qmetacontainer.go | 1334 +++++++----------- qt6/gen_qmetacontainer.h | 32 +- qt6/gen_qmetatype.cpp | 57 - qt6/gen_qmetatype.go | 202 --- qt6/gen_qmetatype.h | 31 - qt6/gen_qnamespace.cpp | 4 +- qt6/gen_qnamespace.h | 4 +- qt6/gen_qprogressbar.cpp | 2 +- qt6/gen_qproperty.cpp | 9 - qt6/gen_qproperty.go | 50 - qt6/gen_qproperty.h | 8 - qt6/gen_qpropertyprivate.cpp | 92 -- qt6/gen_qpropertyprivate.go | 303 ---- qt6/gen_qpropertyprivate.h | 55 - qt6/gen_qrefcount.cpp | 37 - qt6/gen_qrefcount.go | 88 -- qt6/gen_qrefcount.h | 39 - qt6/gen_qregularexpression.cpp | 39 - qt6/gen_qregularexpression.go | 134 -- qt6/gen_qregularexpression.h | 20 - qt6/gen_qresultstore.cpp | 128 -- qt6/gen_qresultstore.go | 286 ---- qt6/gen_qresultstore.h | 72 - qt6/gen_qrubberband.cpp | 2 +- qt6/gen_qsizegrip.cpp | 2 +- qt6/gen_qsocketnotifier.cpp | 2 +- qt6/gen_qsplashscreen.cpp | 2 +- qt6/gen_qsplitter.cpp | 2 +- qt6/gen_qstatusbar.cpp | 2 +- qt6/gen_qtabbar.cpp | 2 +- qt6/gen_qtabwidget.cpp | 2 +- qt6/gen_qtestsupport_widgets.cpp | 2 +- qt6/gen_qtestsupport_widgets.go | 288 ++-- qt6/gen_qtoolbar.cpp | 2 +- qt6/gen_qutf8stringview.cpp | 22 - qt6/gen_qutf8stringview.go | 114 -- qt6/gen_qutf8stringview.h | 41 - qt6/gen_qvariant.cpp | 17 - qt6/gen_qvariant.go | 58 - qt6/gen_qvariant.h | 10 - qt6/gen_qwidget.cpp | 2 +- qt6/gen_qwindow.cpp | 2 +- qt6/gen_qwizard.cpp | 2 +- qt6/gen_qxmlstream.cpp | 30 - qt6/gen_qxmlstream.go | 86 -- qt6/gen_qxmlstream.h | 12 - qt6/multimedia/gen_qvideowidget.cpp | 2 +- qt6/network/gen_qabstractsocket.cpp | 6 +- qt6/network/gen_qlocalserver.cpp | 2 +- qt6/network/gen_qlocalsocket.cpp | 2 +- qt6/network/gen_qsctpserver.cpp | 2 +- qt6/network/gen_qsslserver.cpp | 2 +- qt6/network/gen_qsslsocket.cpp | 2 +- qt6/network/gen_qtcpserver.cpp | 4 +- qt6/network/gen_qtcpsocket.cpp | 4 +- qt6/network/gen_qudpsocket.cpp | 4 +- qt6/printsupport/gen_qprintpreviewwidget.cpp | 2 +- 118 files changed, 750 insertions(+), 5912 deletions(-) delete mode 100644 qt/gen_qexception.cpp delete mode 100644 qt/gen_qexception.go delete mode 100644 qt/gen_qexception.h delete mode 100644 qt/gen_qhashfunctions.cpp delete mode 100644 qt/gen_qhashfunctions.go delete mode 100644 qt/gen_qhashfunctions.h delete mode 100644 qt/gen_qrefcount.cpp delete mode 100644 qt/gen_qrefcount.go delete mode 100644 qt/gen_qrefcount.h delete mode 100644 qt/gen_qresultstore.cpp delete mode 100644 qt/gen_qresultstore.go delete mode 100644 qt/gen_qresultstore.h delete mode 100644 qt6/gen_qexception.cpp delete mode 100644 qt6/gen_qexception.go delete mode 100644 qt6/gen_qexception.h delete mode 100644 qt6/gen_qrefcount.cpp delete mode 100644 qt6/gen_qrefcount.go delete mode 100644 qt6/gen_qrefcount.h delete mode 100644 qt6/gen_qresultstore.cpp delete mode 100644 qt6/gen_qresultstore.go delete mode 100644 qt6/gen_qresultstore.h delete mode 100644 qt6/gen_qutf8stringview.cpp delete mode 100644 qt6/gen_qutf8stringview.go delete mode 100644 qt6/gen_qutf8stringview.h diff --git a/qt/gen_qarraydata.cpp b/qt/gen_qarraydata.cpp index 36521c11..a1ce4cf6 100644 --- a/qt/gen_qarraydata.cpp +++ b/qt/gen_qarraydata.cpp @@ -1,5 +1,4 @@ #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QContainerImplHelper #include #include "gen_qarraydata.h" #include "_cgo_export.h" @@ -62,11 +61,3 @@ void QArrayData_Delete(QArrayData* self, bool isSubclass) { } } -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qarraydata.go b/qt/gen_qarraydata.go index 625a11dc..fe40898b 100644 --- a/qt/gen_qarraydata.go +++ b/qt/gen_qarraydata.go @@ -129,53 +129,3 @@ func (this *QArrayData) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__QContainerImplHelper struct { - h *C.QtPrivate__QContainerImplHelper - isSubclass bool -} - -func (this *QtPrivate__QContainerImplHelper) cPointer() *C.QtPrivate__QContainerImplHelper { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QContainerImplHelper) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QContainerImplHelper constructs the type using only CGO pointers. -func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *QtPrivate__QContainerImplHelper { - if h == nil { - return nil - } - return &QtPrivate__QContainerImplHelper{h: h} -} - -// UnsafeNewQtPrivate__QContainerImplHelper constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QContainerImplHelper(h unsafe.Pointer) *QtPrivate__QContainerImplHelper { - if h == nil { - return nil - } - - return &QtPrivate__QContainerImplHelper{h: (*C.QtPrivate__QContainerImplHelper)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QContainerImplHelper) Delete() { - C.QtPrivate__QContainerImplHelper_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QContainerImplHelper) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QContainerImplHelper) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qarraydata.h b/qt/gen_qarraydata.h index b8006d34..a590eaa9 100644 --- a/qt/gen_qarraydata.h +++ b/qt/gen_qarraydata.h @@ -16,14 +16,8 @@ extern "C" { #ifdef __cplusplus class QArrayData; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QContainerImplHelper) -typedef QtPrivate::QContainerImplHelper QtPrivate__QContainerImplHelper; -#else -class QtPrivate__QContainerImplHelper; -#endif #else typedef struct QArrayData QArrayData; -typedef struct QtPrivate__QContainerImplHelper QtPrivate__QContainerImplHelper; #endif void* QArrayData_Data(QArrayData* self); @@ -40,8 +34,6 @@ QArrayData* QArrayData_Allocate4(size_t objectSize, size_t alignment, size_t cap QArrayData* QArrayData_ReallocateUnaligned4(QArrayData* data, size_t objectSize, size_t newCapacity, int newOptions); void QArrayData_Delete(QArrayData* self, bool isSubclass); -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt/gen_qdatastream.cpp b/qt/gen_qdatastream.cpp index e4cb1318..7c337021 100644 --- a/qt/gen_qdatastream.cpp +++ b/qt/gen_qdatastream.cpp @@ -1,7 +1,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver #include #include "gen_qdatastream.h" #include "_cgo_export.h" @@ -219,16 +218,3 @@ void QDataStream_Delete(QDataStream* self, bool isSubclass) { } } -void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver) { - QtPrivate::StreamStateSaver* ret = new QtPrivate::StreamStateSaver(s); - *outptr_QtPrivate__StreamStateSaver = ret; -} - -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qdatastream.go b/qt/gen_qdatastream.go index 43ca9efe..9cafb169 100644 --- a/qt/gen_qdatastream.go +++ b/qt/gen_qdatastream.go @@ -352,63 +352,3 @@ func (this *QDataStream) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__StreamStateSaver struct { - h *C.QtPrivate__StreamStateSaver - isSubclass bool -} - -func (this *QtPrivate__StreamStateSaver) cPointer() *C.QtPrivate__StreamStateSaver { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__StreamStateSaver) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__StreamStateSaver constructs the type using only CGO pointers. -func newQtPrivate__StreamStateSaver(h *C.QtPrivate__StreamStateSaver) *QtPrivate__StreamStateSaver { - if h == nil { - return nil - } - return &QtPrivate__StreamStateSaver{h: h} -} - -// UnsafeNewQtPrivate__StreamStateSaver constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__StreamStateSaver(h unsafe.Pointer) *QtPrivate__StreamStateSaver { - if h == nil { - return nil - } - - return &QtPrivate__StreamStateSaver{h: (*C.QtPrivate__StreamStateSaver)(h)} -} - -// NewQtPrivate__StreamStateSaver constructs a new QtPrivate::StreamStateSaver object. -func NewQtPrivate__StreamStateSaver(s *QDataStream) *QtPrivate__StreamStateSaver { - var outptr_QtPrivate__StreamStateSaver *C.QtPrivate__StreamStateSaver = nil - - C.QtPrivate__StreamStateSaver_new(s.cPointer(), &outptr_QtPrivate__StreamStateSaver) - ret := newQtPrivate__StreamStateSaver(outptr_QtPrivate__StreamStateSaver) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__StreamStateSaver) Delete() { - C.QtPrivate__StreamStateSaver_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__StreamStateSaver) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__StreamStateSaver) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qdatastream.h b/qt/gen_qdatastream.h index 36f4aef9..4c46f121 100644 --- a/qt/gen_qdatastream.h +++ b/qt/gen_qdatastream.h @@ -18,16 +18,10 @@ extern "C" { class QByteArray; class QDataStream; class QIODevice; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver) -typedef QtPrivate::StreamStateSaver QtPrivate__StreamStateSaver; -#else -class QtPrivate__StreamStateSaver; -#endif #else typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QIODevice QIODevice; -typedef struct QtPrivate__StreamStateSaver QtPrivate__StreamStateSaver; #endif void QDataStream_new(QDataStream** outptr_QDataStream); @@ -81,9 +75,6 @@ void QDataStream_RollbackTransaction(QDataStream* self); void QDataStream_AbortTransaction(QDataStream* self); void QDataStream_Delete(QDataStream* self, bool isSubclass); -void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver); -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt/gen_qexception.cpp b/qt/gen_qexception.cpp deleted file mode 100644 index e073f4a2..00000000 --- a/qt/gen_qexception.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ExceptionHolder -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ExceptionStore -#include -#include "gen_qexception.h" -#include "_cgo_export.h" - -void QtPrivate__ExceptionHolder_new(QtPrivate__ExceptionHolder** outptr_QtPrivate__ExceptionHolder) { - QtPrivate::ExceptionHolder* ret = new QtPrivate::ExceptionHolder(); - *outptr_QtPrivate__ExceptionHolder = ret; -} - -void QtPrivate__ExceptionHolder_Delete(QtPrivate__ExceptionHolder* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self) { - return self->hasException(); -} - -void QtPrivate__ExceptionStore_ThrowPossibleException(QtPrivate__ExceptionStore* self) { - self->throwPossibleException(); -} - -bool QtPrivate__ExceptionStore_HasThrown(const QtPrivate__ExceptionStore* self) { - return self->hasThrown(); -} - -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qexception.go b/qt/gen_qexception.go deleted file mode 100644 index 4779bbfa..00000000 --- a/qt/gen_qexception.go +++ /dev/null @@ -1,136 +0,0 @@ -package qt - -/* - -#include "gen_qexception.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__ExceptionHolder struct { - h *C.QtPrivate__ExceptionHolder - isSubclass bool -} - -func (this *QtPrivate__ExceptionHolder) cPointer() *C.QtPrivate__ExceptionHolder { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ExceptionHolder) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ExceptionHolder constructs the type using only CGO pointers. -func newQtPrivate__ExceptionHolder(h *C.QtPrivate__ExceptionHolder) *QtPrivate__ExceptionHolder { - if h == nil { - return nil - } - return &QtPrivate__ExceptionHolder{h: h} -} - -// UnsafeNewQtPrivate__ExceptionHolder constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ExceptionHolder(h unsafe.Pointer) *QtPrivate__ExceptionHolder { - if h == nil { - return nil - } - - return &QtPrivate__ExceptionHolder{h: (*C.QtPrivate__ExceptionHolder)(h)} -} - -// NewQtPrivate__ExceptionHolder constructs a new QtPrivate::ExceptionHolder object. -func NewQtPrivate__ExceptionHolder() *QtPrivate__ExceptionHolder { - var outptr_QtPrivate__ExceptionHolder *C.QtPrivate__ExceptionHolder = nil - - C.QtPrivate__ExceptionHolder_new(&outptr_QtPrivate__ExceptionHolder) - ret := newQtPrivate__ExceptionHolder(outptr_QtPrivate__ExceptionHolder) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ExceptionHolder) Delete() { - C.QtPrivate__ExceptionHolder_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ExceptionHolder) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ExceptionHolder) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__ExceptionStore struct { - h *C.QtPrivate__ExceptionStore - isSubclass bool -} - -func (this *QtPrivate__ExceptionStore) cPointer() *C.QtPrivate__ExceptionStore { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ExceptionStore) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ExceptionStore constructs the type using only CGO pointers. -func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__ExceptionStore { - if h == nil { - return nil - } - return &QtPrivate__ExceptionStore{h: h} -} - -// UnsafeNewQtPrivate__ExceptionStore constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ExceptionStore(h unsafe.Pointer) *QtPrivate__ExceptionStore { - if h == nil { - return nil - } - - return &QtPrivate__ExceptionStore{h: (*C.QtPrivate__ExceptionStore)(h)} -} - -func (this *QtPrivate__ExceptionStore) HasException() bool { - return (bool)(C.QtPrivate__ExceptionStore_HasException(this.h)) -} - -func (this *QtPrivate__ExceptionStore) ThrowPossibleException() { - C.QtPrivate__ExceptionStore_ThrowPossibleException(this.h) -} - -func (this *QtPrivate__ExceptionStore) HasThrown() bool { - return (bool)(C.QtPrivate__ExceptionStore_HasThrown(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ExceptionStore) Delete() { - C.QtPrivate__ExceptionStore_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ExceptionStore) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ExceptionStore) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qexception.h b/qt/gen_qexception.h deleted file mode 100644 index 9a3584aa..00000000 --- a/qt/gen_qexception.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once -#ifndef MIQT_QT_GEN_QEXCEPTION_H -#define MIQT_QT_GEN_QEXCEPTION_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ExceptionHolder) -typedef QtPrivate::ExceptionHolder QtPrivate__ExceptionHolder; -#else -class QtPrivate__ExceptionHolder; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ExceptionStore) -typedef QtPrivate::ExceptionStore QtPrivate__ExceptionStore; -#else -class QtPrivate__ExceptionStore; -#endif -#else -typedef struct QtPrivate__ExceptionHolder QtPrivate__ExceptionHolder; -typedef struct QtPrivate__ExceptionStore QtPrivate__ExceptionStore; -#endif - -void QtPrivate__ExceptionHolder_new(QtPrivate__ExceptionHolder** outptr_QtPrivate__ExceptionHolder); -void QtPrivate__ExceptionHolder_Delete(QtPrivate__ExceptionHolder* self, bool isSubclass); - -bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_ThrowPossibleException(QtPrivate__ExceptionStore* self); -bool QtPrivate__ExceptionStore_HasThrown(const QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt/gen_qhashfunctions.cpp b/qt/gen_qhashfunctions.cpp deleted file mode 100644 index 9f3a3a06..00000000 --- a/qt/gen_qhashfunctions.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombine -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombineCommutative -#include -#include "gen_qhashfunctions.h" -#include "_cgo_export.h" - -void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine) { - QtPrivate::QHashCombine* ret = new QtPrivate::QHashCombine(); - *outptr_QtPrivate__QHashCombine = ret; -} - -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative) { - QtPrivate::QHashCombineCommutative* ret = new QtPrivate::QHashCombineCommutative(); - *outptr_QtPrivate__QHashCombineCommutative = ret; -} - -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qhashfunctions.go b/qt/gen_qhashfunctions.go deleted file mode 100644 index ceb2fc37..00000000 --- a/qt/gen_qhashfunctions.go +++ /dev/null @@ -1,134 +0,0 @@ -package qt - -/* - -#include "gen_qhashfunctions.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__QHashCombine struct { - h *C.QtPrivate__QHashCombine - isSubclass bool -} - -func (this *QtPrivate__QHashCombine) cPointer() *C.QtPrivate__QHashCombine { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QHashCombine) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QHashCombine constructs the type using only CGO pointers. -func newQtPrivate__QHashCombine(h *C.QtPrivate__QHashCombine) *QtPrivate__QHashCombine { - if h == nil { - return nil - } - return &QtPrivate__QHashCombine{h: h} -} - -// UnsafeNewQtPrivate__QHashCombine constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QHashCombine(h unsafe.Pointer) *QtPrivate__QHashCombine { - if h == nil { - return nil - } - - return &QtPrivate__QHashCombine{h: (*C.QtPrivate__QHashCombine)(h)} -} - -// NewQtPrivate__QHashCombine constructs a new QtPrivate::QHashCombine object. -func NewQtPrivate__QHashCombine() *QtPrivate__QHashCombine { - var outptr_QtPrivate__QHashCombine *C.QtPrivate__QHashCombine = nil - - C.QtPrivate__QHashCombine_new(&outptr_QtPrivate__QHashCombine) - ret := newQtPrivate__QHashCombine(outptr_QtPrivate__QHashCombine) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QHashCombine) Delete() { - C.QtPrivate__QHashCombine_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QHashCombine) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QHashCombine) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__QHashCombineCommutative struct { - h *C.QtPrivate__QHashCombineCommutative - isSubclass bool -} - -func (this *QtPrivate__QHashCombineCommutative) cPointer() *C.QtPrivate__QHashCombineCommutative { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QHashCombineCommutative) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QHashCombineCommutative constructs the type using only CGO pointers. -func newQtPrivate__QHashCombineCommutative(h *C.QtPrivate__QHashCombineCommutative) *QtPrivate__QHashCombineCommutative { - if h == nil { - return nil - } - return &QtPrivate__QHashCombineCommutative{h: h} -} - -// UnsafeNewQtPrivate__QHashCombineCommutative constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QHashCombineCommutative(h unsafe.Pointer) *QtPrivate__QHashCombineCommutative { - if h == nil { - return nil - } - - return &QtPrivate__QHashCombineCommutative{h: (*C.QtPrivate__QHashCombineCommutative)(h)} -} - -// NewQtPrivate__QHashCombineCommutative constructs a new QtPrivate::QHashCombineCommutative object. -func NewQtPrivate__QHashCombineCommutative() *QtPrivate__QHashCombineCommutative { - var outptr_QtPrivate__QHashCombineCommutative *C.QtPrivate__QHashCombineCommutative = nil - - C.QtPrivate__QHashCombineCommutative_new(&outptr_QtPrivate__QHashCombineCommutative) - ret := newQtPrivate__QHashCombineCommutative(outptr_QtPrivate__QHashCombineCommutative) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QHashCombineCommutative) Delete() { - C.QtPrivate__QHashCombineCommutative_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QHashCombineCommutative) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QHashCombineCommutative) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qhashfunctions.h b/qt/gen_qhashfunctions.h deleted file mode 100644 index 80bd216b..00000000 --- a/qt/gen_qhashfunctions.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once -#ifndef MIQT_QT_GEN_QHASHFUNCTIONS_H -#define MIQT_QT_GEN_QHASHFUNCTIONS_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombine) -typedef QtPrivate::QHashCombine QtPrivate__QHashCombine; -#else -class QtPrivate__QHashCombine; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombineCommutative) -typedef QtPrivate::QHashCombineCommutative QtPrivate__QHashCombineCommutative; -#else -class QtPrivate__QHashCombineCommutative; -#endif -#else -typedef struct QtPrivate__QHashCombine QtPrivate__QHashCombine; -typedef struct QtPrivate__QHashCombineCommutative QtPrivate__QHashCombineCommutative; -#endif - -void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine); -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass); - -void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative); -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt/gen_qmetatype.cpp b/qt/gen_qmetatype.cpp index 40de91f0..97fb5e42 100644 --- a/qt/gen_qmetatype.cpp +++ b/qt/gen_qmetatype.cpp @@ -3,57 +3,10 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QAssociativeIterableImpl -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QPairVariantInterfaceImpl -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QSequentialIterableImpl -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__VariantData -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__VectorBoolElements -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__AbstractComparatorFunction -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__AbstractConverterFunction -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__AbstractDebugStreamFunction #include #include "gen_qmetatype.h" #include "_cgo_export.h" -void QtPrivate__AbstractDebugStreamFunction_new(QtPrivate__AbstractDebugStreamFunction** outptr_QtPrivate__AbstractDebugStreamFunction) { - QtPrivate::AbstractDebugStreamFunction* ret = new QtPrivate::AbstractDebugStreamFunction(); - *outptr_QtPrivate__AbstractDebugStreamFunction = ret; -} - -void QtPrivate__AbstractDebugStreamFunction_Delete(QtPrivate__AbstractDebugStreamFunction* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__AbstractComparatorFunction_new(QtPrivate__AbstractComparatorFunction** outptr_QtPrivate__AbstractComparatorFunction) { - QtPrivate::AbstractComparatorFunction* ret = new QtPrivate::AbstractComparatorFunction(); - *outptr_QtPrivate__AbstractComparatorFunction = ret; -} - -void QtPrivate__AbstractComparatorFunction_Delete(QtPrivate__AbstractComparatorFunction* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__AbstractConverterFunction_new(QtPrivate__AbstractConverterFunction** outptr_QtPrivate__AbstractConverterFunction) { - QtPrivate::AbstractConverterFunction* ret = new QtPrivate::AbstractConverterFunction(); - *outptr_QtPrivate__AbstractConverterFunction = ret; -} - -void QtPrivate__AbstractConverterFunction_Delete(QtPrivate__AbstractConverterFunction* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QMetaType_new(QMetaType** outptr_QMetaType) { QMetaType* ret = new QMetaType(); *outptr_QMetaType = ret; @@ -229,198 +182,3 @@ void QMetaType_Delete(QMetaType* self, bool isSubclass) { } } -void QtMetaTypePrivate__VariantData_new(const int metaTypeId_, const void* data_, const unsigned int flags_, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData) { - QtMetaTypePrivate::VariantData* ret = new QtMetaTypePrivate::VariantData(static_cast(metaTypeId_), data_, static_cast(flags_)); - *outptr_QtMetaTypePrivate__VariantData = ret; -} - -void QtMetaTypePrivate__VariantData_new2(QtMetaTypePrivate__VariantData* other, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData) { - QtMetaTypePrivate::VariantData* ret = new QtMetaTypePrivate::VariantData(*other); - *outptr_QtMetaTypePrivate__VariantData = ret; -} - -void QtMetaTypePrivate__VariantData_Delete(QtMetaTypePrivate__VariantData* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtMetaTypePrivate__VectorBoolElements_Delete(QtMetaTypePrivate__VectorBoolElements* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtMetaTypePrivate__QSequentialIterableImpl_new(QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl) { - QtMetaTypePrivate::QSequentialIterableImpl* ret = new QtMetaTypePrivate::QSequentialIterableImpl(); - *outptr_QtMetaTypePrivate__QSequentialIterableImpl = ret; -} - -void QtMetaTypePrivate__QSequentialIterableImpl_new2(QtMetaTypePrivate__QSequentialIterableImpl* param1, QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl) { - QtMetaTypePrivate::QSequentialIterableImpl* ret = new QtMetaTypePrivate::QSequentialIterableImpl(*param1); - *outptr_QtMetaTypePrivate__QSequentialIterableImpl = ret; -} - -int QtMetaTypePrivate__QSequentialIterableImpl_IteratorCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self) { - QtMetaTypePrivate::IteratorCapability _ret = self->iteratorCapabilities(); - return static_cast(_ret); -} - -unsigned int QtMetaTypePrivate__QSequentialIterableImpl_Revision(QtMetaTypePrivate__QSequentialIterableImpl* self) { - uint _ret = self->revision(); - return static_cast(_ret); -} - -unsigned int QtMetaTypePrivate__QSequentialIterableImpl_ContainerCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self) { - uint _ret = self->containerCapabilities(); - return static_cast(_ret); -} - -void QtMetaTypePrivate__QSequentialIterableImpl_MoveToBegin(QtMetaTypePrivate__QSequentialIterableImpl* self) { - self->moveToBegin(); -} - -void QtMetaTypePrivate__QSequentialIterableImpl_MoveToEnd(QtMetaTypePrivate__QSequentialIterableImpl* self) { - self->moveToEnd(); -} - -bool QtMetaTypePrivate__QSequentialIterableImpl_Equal(const QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* other) { - return self->equal(*other); -} - -QtMetaTypePrivate__QSequentialIterableImpl* QtMetaTypePrivate__QSequentialIterableImpl_Advance(QtMetaTypePrivate__QSequentialIterableImpl* self, int i) { - QtMetaTypePrivate::QSequentialIterableImpl& _ret = self->advance(static_cast(i)); - // Cast returned reference into pointer - return &_ret; -} - -void QtMetaTypePrivate__QSequentialIterableImpl_Append(QtMetaTypePrivate__QSequentialIterableImpl* self, const void* newElement) { - self->append(newElement); -} - -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QSequentialIterableImpl_GetCurrent(const QtMetaTypePrivate__QSequentialIterableImpl* self) { - return new QtMetaTypePrivate::VariantData(self->getCurrent()); -} - -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QSequentialIterableImpl_At(const QtMetaTypePrivate__QSequentialIterableImpl* self, int idx) { - return new QtMetaTypePrivate::VariantData(self->at(static_cast(idx))); -} - -int QtMetaTypePrivate__QSequentialIterableImpl_Size(const QtMetaTypePrivate__QSequentialIterableImpl* self) { - return self->size(); -} - -void QtMetaTypePrivate__QSequentialIterableImpl_DestroyIter(QtMetaTypePrivate__QSequentialIterableImpl* self) { - self->destroyIter(); -} - -void QtMetaTypePrivate__QSequentialIterableImpl_Copy(QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* other) { - self->copy(*other); -} - -void QtMetaTypePrivate__QSequentialIterableImpl_OperatorAssign(QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* param1) { - self->operator=(*param1); -} - -void QtMetaTypePrivate__QSequentialIterableImpl_Delete(QtMetaTypePrivate__QSequentialIterableImpl* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_new(QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl) { - QtMetaTypePrivate::QAssociativeIterableImpl* ret = new QtMetaTypePrivate::QAssociativeIterableImpl(); - *outptr_QtMetaTypePrivate__QAssociativeIterableImpl = ret; -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_new2(QtMetaTypePrivate__QAssociativeIterableImpl* param1, QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl) { - QtMetaTypePrivate::QAssociativeIterableImpl* ret = new QtMetaTypePrivate::QAssociativeIterableImpl(*param1); - *outptr_QtMetaTypePrivate__QAssociativeIterableImpl = ret; -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_Begin(QtMetaTypePrivate__QAssociativeIterableImpl* self) { - self->begin(); -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_End(QtMetaTypePrivate__QAssociativeIterableImpl* self) { - self->end(); -} - -bool QtMetaTypePrivate__QAssociativeIterableImpl_Equal(const QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* other) { - return self->equal(*other); -} - -QtMetaTypePrivate__QAssociativeIterableImpl* QtMetaTypePrivate__QAssociativeIterableImpl_Advance(QtMetaTypePrivate__QAssociativeIterableImpl* self, int i) { - QtMetaTypePrivate::QAssociativeIterableImpl& _ret = self->advance(static_cast(i)); - // Cast returned reference into pointer - return &_ret; -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_DestroyIter(QtMetaTypePrivate__QAssociativeIterableImpl* self) { - self->destroyIter(); -} - -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QAssociativeIterableImpl_GetCurrentKey(const QtMetaTypePrivate__QAssociativeIterableImpl* self) { - return new QtMetaTypePrivate::VariantData(self->getCurrentKey()); -} - -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QAssociativeIterableImpl_GetCurrentValue(const QtMetaTypePrivate__QAssociativeIterableImpl* self) { - return new QtMetaTypePrivate::VariantData(self->getCurrentValue()); -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_Find(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__VariantData* key) { - self->find(*key); -} - -int QtMetaTypePrivate__QAssociativeIterableImpl_Size(const QtMetaTypePrivate__QAssociativeIterableImpl* self) { - return self->size(); -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_Copy(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* other) { - self->copy(*other); -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_OperatorAssign(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* param1) { - self->operator=(*param1); -} - -void QtMetaTypePrivate__QAssociativeIterableImpl_Delete(QtMetaTypePrivate__QAssociativeIterableImpl* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { - QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(); - *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { - QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(*param1); - *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; -} - -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self) { - return new QtMetaTypePrivate::VariantData(self->first()); -} - -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self) { - return new QtMetaTypePrivate::VariantData(self->second()); -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qmetatype.go b/qt/gen_qmetatype.go index df2180b5..2d827868 100644 --- a/qt/gen_qmetatype.go +++ b/qt/gen_qmetatype.go @@ -147,186 +147,6 @@ const ( QtMetaTypePrivate__QSequentialIterableImpl__ToEnd QtMetaTypePrivate__QSequentialIterableImpl__Position = 1 ) -type QtPrivate__AbstractDebugStreamFunction struct { - h *C.QtPrivate__AbstractDebugStreamFunction - isSubclass bool -} - -func (this *QtPrivate__AbstractDebugStreamFunction) cPointer() *C.QtPrivate__AbstractDebugStreamFunction { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__AbstractDebugStreamFunction) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__AbstractDebugStreamFunction constructs the type using only CGO pointers. -func newQtPrivate__AbstractDebugStreamFunction(h *C.QtPrivate__AbstractDebugStreamFunction) *QtPrivate__AbstractDebugStreamFunction { - if h == nil { - return nil - } - return &QtPrivate__AbstractDebugStreamFunction{h: h} -} - -// UnsafeNewQtPrivate__AbstractDebugStreamFunction constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__AbstractDebugStreamFunction(h unsafe.Pointer) *QtPrivate__AbstractDebugStreamFunction { - if h == nil { - return nil - } - - return &QtPrivate__AbstractDebugStreamFunction{h: (*C.QtPrivate__AbstractDebugStreamFunction)(h)} -} - -// NewQtPrivate__AbstractDebugStreamFunction constructs a new QtPrivate::AbstractDebugStreamFunction object. -func NewQtPrivate__AbstractDebugStreamFunction() *QtPrivate__AbstractDebugStreamFunction { - var outptr_QtPrivate__AbstractDebugStreamFunction *C.QtPrivate__AbstractDebugStreamFunction = nil - - C.QtPrivate__AbstractDebugStreamFunction_new(&outptr_QtPrivate__AbstractDebugStreamFunction) - ret := newQtPrivate__AbstractDebugStreamFunction(outptr_QtPrivate__AbstractDebugStreamFunction) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__AbstractDebugStreamFunction) Delete() { - C.QtPrivate__AbstractDebugStreamFunction_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__AbstractDebugStreamFunction) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__AbstractDebugStreamFunction) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__AbstractComparatorFunction struct { - h *C.QtPrivate__AbstractComparatorFunction - isSubclass bool -} - -func (this *QtPrivate__AbstractComparatorFunction) cPointer() *C.QtPrivate__AbstractComparatorFunction { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__AbstractComparatorFunction) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__AbstractComparatorFunction constructs the type using only CGO pointers. -func newQtPrivate__AbstractComparatorFunction(h *C.QtPrivate__AbstractComparatorFunction) *QtPrivate__AbstractComparatorFunction { - if h == nil { - return nil - } - return &QtPrivate__AbstractComparatorFunction{h: h} -} - -// UnsafeNewQtPrivate__AbstractComparatorFunction constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__AbstractComparatorFunction(h unsafe.Pointer) *QtPrivate__AbstractComparatorFunction { - if h == nil { - return nil - } - - return &QtPrivate__AbstractComparatorFunction{h: (*C.QtPrivate__AbstractComparatorFunction)(h)} -} - -// NewQtPrivate__AbstractComparatorFunction constructs a new QtPrivate::AbstractComparatorFunction object. -func NewQtPrivate__AbstractComparatorFunction() *QtPrivate__AbstractComparatorFunction { - var outptr_QtPrivate__AbstractComparatorFunction *C.QtPrivate__AbstractComparatorFunction = nil - - C.QtPrivate__AbstractComparatorFunction_new(&outptr_QtPrivate__AbstractComparatorFunction) - ret := newQtPrivate__AbstractComparatorFunction(outptr_QtPrivate__AbstractComparatorFunction) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__AbstractComparatorFunction) Delete() { - C.QtPrivate__AbstractComparatorFunction_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__AbstractComparatorFunction) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__AbstractComparatorFunction) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__AbstractConverterFunction struct { - h *C.QtPrivate__AbstractConverterFunction - isSubclass bool -} - -func (this *QtPrivate__AbstractConverterFunction) cPointer() *C.QtPrivate__AbstractConverterFunction { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__AbstractConverterFunction) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__AbstractConverterFunction constructs the type using only CGO pointers. -func newQtPrivate__AbstractConverterFunction(h *C.QtPrivate__AbstractConverterFunction) *QtPrivate__AbstractConverterFunction { - if h == nil { - return nil - } - return &QtPrivate__AbstractConverterFunction{h: h} -} - -// UnsafeNewQtPrivate__AbstractConverterFunction constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__AbstractConverterFunction(h unsafe.Pointer) *QtPrivate__AbstractConverterFunction { - if h == nil { - return nil - } - - return &QtPrivate__AbstractConverterFunction{h: (*C.QtPrivate__AbstractConverterFunction)(h)} -} - -// NewQtPrivate__AbstractConverterFunction constructs a new QtPrivate::AbstractConverterFunction object. -func NewQtPrivate__AbstractConverterFunction() *QtPrivate__AbstractConverterFunction { - var outptr_QtPrivate__AbstractConverterFunction *C.QtPrivate__AbstractConverterFunction = nil - - C.QtPrivate__AbstractConverterFunction_new(&outptr_QtPrivate__AbstractConverterFunction) - ret := newQtPrivate__AbstractConverterFunction(outptr_QtPrivate__AbstractConverterFunction) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__AbstractConverterFunction) Delete() { - C.QtPrivate__AbstractConverterFunction_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__AbstractConverterFunction) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__AbstractConverterFunction) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QMetaType struct { h *C.QMetaType isSubclass bool @@ -558,459 +378,3 @@ func (this *QMetaType) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtMetaTypePrivate__VariantData struct { - h *C.QtMetaTypePrivate__VariantData - isSubclass bool -} - -func (this *QtMetaTypePrivate__VariantData) cPointer() *C.QtMetaTypePrivate__VariantData { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaTypePrivate__VariantData) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtMetaTypePrivate__VariantData constructs the type using only CGO pointers. -func newQtMetaTypePrivate__VariantData(h *C.QtMetaTypePrivate__VariantData) *QtMetaTypePrivate__VariantData { - if h == nil { - return nil - } - return &QtMetaTypePrivate__VariantData{h: h} -} - -// UnsafeNewQtMetaTypePrivate__VariantData constructs the type using only unsafe pointers. -func UnsafeNewQtMetaTypePrivate__VariantData(h unsafe.Pointer) *QtMetaTypePrivate__VariantData { - if h == nil { - return nil - } - - return &QtMetaTypePrivate__VariantData{h: (*C.QtMetaTypePrivate__VariantData)(h)} -} - -// NewQtMetaTypePrivate__VariantData constructs a new QtMetaTypePrivate::VariantData object. -func NewQtMetaTypePrivate__VariantData(metaTypeId_ int, data_ unsafe.Pointer, flags_ uint) *QtMetaTypePrivate__VariantData { - var outptr_QtMetaTypePrivate__VariantData *C.QtMetaTypePrivate__VariantData = nil - - C.QtMetaTypePrivate__VariantData_new((C.int)(metaTypeId_), data_, (C.uint)(flags_), &outptr_QtMetaTypePrivate__VariantData) - ret := newQtMetaTypePrivate__VariantData(outptr_QtMetaTypePrivate__VariantData) - ret.isSubclass = true - return ret -} - -// NewQtMetaTypePrivate__VariantData2 constructs a new QtMetaTypePrivate::VariantData object. -func NewQtMetaTypePrivate__VariantData2(other *QtMetaTypePrivate__VariantData) *QtMetaTypePrivate__VariantData { - var outptr_QtMetaTypePrivate__VariantData *C.QtMetaTypePrivate__VariantData = nil - - C.QtMetaTypePrivate__VariantData_new2(other.cPointer(), &outptr_QtMetaTypePrivate__VariantData) - ret := newQtMetaTypePrivate__VariantData(outptr_QtMetaTypePrivate__VariantData) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtMetaTypePrivate__VariantData) Delete() { - C.QtMetaTypePrivate__VariantData_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaTypePrivate__VariantData) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaTypePrivate__VariantData) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtMetaTypePrivate__VectorBoolElements struct { - h *C.QtMetaTypePrivate__VectorBoolElements - isSubclass bool -} - -func (this *QtMetaTypePrivate__VectorBoolElements) cPointer() *C.QtMetaTypePrivate__VectorBoolElements { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaTypePrivate__VectorBoolElements) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtMetaTypePrivate__VectorBoolElements constructs the type using only CGO pointers. -func newQtMetaTypePrivate__VectorBoolElements(h *C.QtMetaTypePrivate__VectorBoolElements) *QtMetaTypePrivate__VectorBoolElements { - if h == nil { - return nil - } - return &QtMetaTypePrivate__VectorBoolElements{h: h} -} - -// UnsafeNewQtMetaTypePrivate__VectorBoolElements constructs the type using only unsafe pointers. -func UnsafeNewQtMetaTypePrivate__VectorBoolElements(h unsafe.Pointer) *QtMetaTypePrivate__VectorBoolElements { - if h == nil { - return nil - } - - return &QtMetaTypePrivate__VectorBoolElements{h: (*C.QtMetaTypePrivate__VectorBoolElements)(h)} -} - -// Delete this object from C++ memory. -func (this *QtMetaTypePrivate__VectorBoolElements) Delete() { - C.QtMetaTypePrivate__VectorBoolElements_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaTypePrivate__VectorBoolElements) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaTypePrivate__VectorBoolElements) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtMetaTypePrivate__QSequentialIterableImpl struct { - h *C.QtMetaTypePrivate__QSequentialIterableImpl - isSubclass bool -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) cPointer() *C.QtMetaTypePrivate__QSequentialIterableImpl { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtMetaTypePrivate__QSequentialIterableImpl constructs the type using only CGO pointers. -func newQtMetaTypePrivate__QSequentialIterableImpl(h *C.QtMetaTypePrivate__QSequentialIterableImpl) *QtMetaTypePrivate__QSequentialIterableImpl { - if h == nil { - return nil - } - return &QtMetaTypePrivate__QSequentialIterableImpl{h: h} -} - -// UnsafeNewQtMetaTypePrivate__QSequentialIterableImpl constructs the type using only unsafe pointers. -func UnsafeNewQtMetaTypePrivate__QSequentialIterableImpl(h unsafe.Pointer) *QtMetaTypePrivate__QSequentialIterableImpl { - if h == nil { - return nil - } - - return &QtMetaTypePrivate__QSequentialIterableImpl{h: (*C.QtMetaTypePrivate__QSequentialIterableImpl)(h)} -} - -// NewQtMetaTypePrivate__QSequentialIterableImpl constructs a new QtMetaTypePrivate::QSequentialIterableImpl object. -func NewQtMetaTypePrivate__QSequentialIterableImpl() *QtMetaTypePrivate__QSequentialIterableImpl { - var outptr_QtMetaTypePrivate__QSequentialIterableImpl *C.QtMetaTypePrivate__QSequentialIterableImpl = nil - - C.QtMetaTypePrivate__QSequentialIterableImpl_new(&outptr_QtMetaTypePrivate__QSequentialIterableImpl) - ret := newQtMetaTypePrivate__QSequentialIterableImpl(outptr_QtMetaTypePrivate__QSequentialIterableImpl) - ret.isSubclass = true - return ret -} - -// NewQtMetaTypePrivate__QSequentialIterableImpl2 constructs a new QtMetaTypePrivate::QSequentialIterableImpl object. -func NewQtMetaTypePrivate__QSequentialIterableImpl2(param1 *QtMetaTypePrivate__QSequentialIterableImpl) *QtMetaTypePrivate__QSequentialIterableImpl { - var outptr_QtMetaTypePrivate__QSequentialIterableImpl *C.QtMetaTypePrivate__QSequentialIterableImpl = nil - - C.QtMetaTypePrivate__QSequentialIterableImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QSequentialIterableImpl) - ret := newQtMetaTypePrivate__QSequentialIterableImpl(outptr_QtMetaTypePrivate__QSequentialIterableImpl) - ret.isSubclass = true - return ret -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) IteratorCapabilities() QtMetaTypePrivate__IteratorCapability { - return (QtMetaTypePrivate__IteratorCapability)(C.QtMetaTypePrivate__QSequentialIterableImpl_IteratorCapabilities(this.h)) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Revision() uint { - return (uint)(C.QtMetaTypePrivate__QSequentialIterableImpl_Revision(this.h)) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) ContainerCapabilities() uint { - return (uint)(C.QtMetaTypePrivate__QSequentialIterableImpl_ContainerCapabilities(this.h)) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) MoveToBegin() { - C.QtMetaTypePrivate__QSequentialIterableImpl_MoveToBegin(this.h) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) MoveToEnd() { - C.QtMetaTypePrivate__QSequentialIterableImpl_MoveToEnd(this.h) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Equal(other *QtMetaTypePrivate__QSequentialIterableImpl) bool { - return (bool)(C.QtMetaTypePrivate__QSequentialIterableImpl_Equal(this.h, other.cPointer())) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Advance(i int) *QtMetaTypePrivate__QSequentialIterableImpl { - return UnsafeNewQtMetaTypePrivate__QSequentialIterableImpl(unsafe.Pointer(C.QtMetaTypePrivate__QSequentialIterableImpl_Advance(this.h, (C.int)(i)))) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Append(newElement unsafe.Pointer) { - C.QtMetaTypePrivate__QSequentialIterableImpl_Append(this.h, newElement) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) GetCurrent() *QtMetaTypePrivate__VariantData { - _ret := C.QtMetaTypePrivate__QSequentialIterableImpl_GetCurrent(this.h) - _goptr := newQtMetaTypePrivate__VariantData(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) At(idx int) *QtMetaTypePrivate__VariantData { - _ret := C.QtMetaTypePrivate__QSequentialIterableImpl_At(this.h, (C.int)(idx)) - _goptr := newQtMetaTypePrivate__VariantData(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Size() int { - return (int)(C.QtMetaTypePrivate__QSequentialIterableImpl_Size(this.h)) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) DestroyIter() { - C.QtMetaTypePrivate__QSequentialIterableImpl_DestroyIter(this.h) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Copy(other *QtMetaTypePrivate__QSequentialIterableImpl) { - C.QtMetaTypePrivate__QSequentialIterableImpl_Copy(this.h, other.cPointer()) -} - -func (this *QtMetaTypePrivate__QSequentialIterableImpl) OperatorAssign(param1 *QtMetaTypePrivate__QSequentialIterableImpl) { - C.QtMetaTypePrivate__QSequentialIterableImpl_OperatorAssign(this.h, param1.cPointer()) -} - -// Delete this object from C++ memory. -func (this *QtMetaTypePrivate__QSequentialIterableImpl) Delete() { - C.QtMetaTypePrivate__QSequentialIterableImpl_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaTypePrivate__QSequentialIterableImpl) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaTypePrivate__QSequentialIterableImpl) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtMetaTypePrivate__QAssociativeIterableImpl struct { - h *C.QtMetaTypePrivate__QAssociativeIterableImpl - isSubclass bool -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) cPointer() *C.QtMetaTypePrivate__QAssociativeIterableImpl { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtMetaTypePrivate__QAssociativeIterableImpl constructs the type using only CGO pointers. -func newQtMetaTypePrivate__QAssociativeIterableImpl(h *C.QtMetaTypePrivate__QAssociativeIterableImpl) *QtMetaTypePrivate__QAssociativeIterableImpl { - if h == nil { - return nil - } - return &QtMetaTypePrivate__QAssociativeIterableImpl{h: h} -} - -// UnsafeNewQtMetaTypePrivate__QAssociativeIterableImpl constructs the type using only unsafe pointers. -func UnsafeNewQtMetaTypePrivate__QAssociativeIterableImpl(h unsafe.Pointer) *QtMetaTypePrivate__QAssociativeIterableImpl { - if h == nil { - return nil - } - - return &QtMetaTypePrivate__QAssociativeIterableImpl{h: (*C.QtMetaTypePrivate__QAssociativeIterableImpl)(h)} -} - -// NewQtMetaTypePrivate__QAssociativeIterableImpl constructs a new QtMetaTypePrivate::QAssociativeIterableImpl object. -func NewQtMetaTypePrivate__QAssociativeIterableImpl() *QtMetaTypePrivate__QAssociativeIterableImpl { - var outptr_QtMetaTypePrivate__QAssociativeIterableImpl *C.QtMetaTypePrivate__QAssociativeIterableImpl = nil - - C.QtMetaTypePrivate__QAssociativeIterableImpl_new(&outptr_QtMetaTypePrivate__QAssociativeIterableImpl) - ret := newQtMetaTypePrivate__QAssociativeIterableImpl(outptr_QtMetaTypePrivate__QAssociativeIterableImpl) - ret.isSubclass = true - return ret -} - -// NewQtMetaTypePrivate__QAssociativeIterableImpl2 constructs a new QtMetaTypePrivate::QAssociativeIterableImpl object. -func NewQtMetaTypePrivate__QAssociativeIterableImpl2(param1 *QtMetaTypePrivate__QAssociativeIterableImpl) *QtMetaTypePrivate__QAssociativeIterableImpl { - var outptr_QtMetaTypePrivate__QAssociativeIterableImpl *C.QtMetaTypePrivate__QAssociativeIterableImpl = nil - - C.QtMetaTypePrivate__QAssociativeIterableImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QAssociativeIterableImpl) - ret := newQtMetaTypePrivate__QAssociativeIterableImpl(outptr_QtMetaTypePrivate__QAssociativeIterableImpl) - ret.isSubclass = true - return ret -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Begin() { - C.QtMetaTypePrivate__QAssociativeIterableImpl_Begin(this.h) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) End() { - C.QtMetaTypePrivate__QAssociativeIterableImpl_End(this.h) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Equal(other *QtMetaTypePrivate__QAssociativeIterableImpl) bool { - return (bool)(C.QtMetaTypePrivate__QAssociativeIterableImpl_Equal(this.h, other.cPointer())) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Advance(i int) *QtMetaTypePrivate__QAssociativeIterableImpl { - return UnsafeNewQtMetaTypePrivate__QAssociativeIterableImpl(unsafe.Pointer(C.QtMetaTypePrivate__QAssociativeIterableImpl_Advance(this.h, (C.int)(i)))) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) DestroyIter() { - C.QtMetaTypePrivate__QAssociativeIterableImpl_DestroyIter(this.h) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) GetCurrentKey() *QtMetaTypePrivate__VariantData { - _ret := C.QtMetaTypePrivate__QAssociativeIterableImpl_GetCurrentKey(this.h) - _goptr := newQtMetaTypePrivate__VariantData(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) GetCurrentValue() *QtMetaTypePrivate__VariantData { - _ret := C.QtMetaTypePrivate__QAssociativeIterableImpl_GetCurrentValue(this.h) - _goptr := newQtMetaTypePrivate__VariantData(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Find(key *QtMetaTypePrivate__VariantData) { - C.QtMetaTypePrivate__QAssociativeIterableImpl_Find(this.h, key.cPointer()) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Size() int { - return (int)(C.QtMetaTypePrivate__QAssociativeIterableImpl_Size(this.h)) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Copy(other *QtMetaTypePrivate__QAssociativeIterableImpl) { - C.QtMetaTypePrivate__QAssociativeIterableImpl_Copy(this.h, other.cPointer()) -} - -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) OperatorAssign(param1 *QtMetaTypePrivate__QAssociativeIterableImpl) { - C.QtMetaTypePrivate__QAssociativeIterableImpl_OperatorAssign(this.h, param1.cPointer()) -} - -// Delete this object from C++ memory. -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) Delete() { - C.QtMetaTypePrivate__QAssociativeIterableImpl_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaTypePrivate__QAssociativeIterableImpl) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaTypePrivate__QAssociativeIterableImpl) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtMetaTypePrivate__QPairVariantInterfaceImpl struct { - h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl - isSubclass bool -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) cPointer() *C.QtMetaTypePrivate__QPairVariantInterfaceImpl { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only CGO pointers. -func newQtMetaTypePrivate__QPairVariantInterfaceImpl(h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - if h == nil { - return nil - } - return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: h} -} - -// UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only unsafe pointers. -func UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl(h unsafe.Pointer) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - if h == nil { - return nil - } - - return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: (*C.QtMetaTypePrivate__QPairVariantInterfaceImpl)(h)} -} - -// NewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. -func NewQtMetaTypePrivate__QPairVariantInterfaceImpl() *QtMetaTypePrivate__QPairVariantInterfaceImpl { - var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil - - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new(&outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret.isSubclass = true - return ret -} - -// NewQtMetaTypePrivate__QPairVariantInterfaceImpl2 constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. -func NewQtMetaTypePrivate__QPairVariantInterfaceImpl2(param1 *QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil - - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret.isSubclass = true - return ret -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) First() *QtMetaTypePrivate__VariantData { - _ret := C.QtMetaTypePrivate__QPairVariantInterfaceImpl_First(this.h) - _goptr := newQtMetaTypePrivate__VariantData(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Second() *QtMetaTypePrivate__VariantData { - _ret := C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(this.h) - _goptr := newQtMetaTypePrivate__VariantData(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -// Delete this object from C++ memory. -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Delete() { - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaTypePrivate__QPairVariantInterfaceImpl) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qmetatype.h b/qt/gen_qmetatype.h index 78f3e2b0..9befb0f5 100644 --- a/qt/gen_qmetatype.h +++ b/qt/gen_qmetatype.h @@ -20,71 +20,14 @@ class QDataStream; class QDebug; class QMetaObject; class QMetaType; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QAssociativeIterableImpl) -typedef QtMetaTypePrivate::QAssociativeIterableImpl QtMetaTypePrivate__QAssociativeIterableImpl; -#else -class QtMetaTypePrivate__QAssociativeIterableImpl; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QPairVariantInterfaceImpl) -typedef QtMetaTypePrivate::QPairVariantInterfaceImpl QtMetaTypePrivate__QPairVariantInterfaceImpl; -#else -class QtMetaTypePrivate__QPairVariantInterfaceImpl; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QSequentialIterableImpl) -typedef QtMetaTypePrivate::QSequentialIterableImpl QtMetaTypePrivate__QSequentialIterableImpl; -#else -class QtMetaTypePrivate__QSequentialIterableImpl; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__VariantData) -typedef QtMetaTypePrivate::VariantData QtMetaTypePrivate__VariantData; -#else -class QtMetaTypePrivate__VariantData; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__VectorBoolElements) -typedef QtMetaTypePrivate::VectorBoolElements QtMetaTypePrivate__VectorBoolElements; -#else -class QtMetaTypePrivate__VectorBoolElements; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__AbstractComparatorFunction) -typedef QtPrivate::AbstractComparatorFunction QtPrivate__AbstractComparatorFunction; -#else -class QtPrivate__AbstractComparatorFunction; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__AbstractConverterFunction) -typedef QtPrivate::AbstractConverterFunction QtPrivate__AbstractConverterFunction; -#else -class QtPrivate__AbstractConverterFunction; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__AbstractDebugStreamFunction) -typedef QtPrivate::AbstractDebugStreamFunction QtPrivate__AbstractDebugStreamFunction; -#else -class QtPrivate__AbstractDebugStreamFunction; -#endif #else typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QDebug QDebug; typedef struct QMetaObject QMetaObject; typedef struct QMetaType QMetaType; -typedef struct QtMetaTypePrivate__QAssociativeIterableImpl QtMetaTypePrivate__QAssociativeIterableImpl; -typedef struct QtMetaTypePrivate__QPairVariantInterfaceImpl QtMetaTypePrivate__QPairVariantInterfaceImpl; -typedef struct QtMetaTypePrivate__QSequentialIterableImpl QtMetaTypePrivate__QSequentialIterableImpl; -typedef struct QtMetaTypePrivate__VariantData QtMetaTypePrivate__VariantData; -typedef struct QtMetaTypePrivate__VectorBoolElements QtMetaTypePrivate__VectorBoolElements; -typedef struct QtPrivate__AbstractComparatorFunction QtPrivate__AbstractComparatorFunction; -typedef struct QtPrivate__AbstractConverterFunction QtPrivate__AbstractConverterFunction; -typedef struct QtPrivate__AbstractDebugStreamFunction QtPrivate__AbstractDebugStreamFunction; #endif -void QtPrivate__AbstractDebugStreamFunction_new(QtPrivate__AbstractDebugStreamFunction** outptr_QtPrivate__AbstractDebugStreamFunction); -void QtPrivate__AbstractDebugStreamFunction_Delete(QtPrivate__AbstractDebugStreamFunction* self, bool isSubclass); - -void QtPrivate__AbstractComparatorFunction_new(QtPrivate__AbstractComparatorFunction** outptr_QtPrivate__AbstractComparatorFunction); -void QtPrivate__AbstractComparatorFunction_Delete(QtPrivate__AbstractComparatorFunction* self, bool isSubclass); - -void QtPrivate__AbstractConverterFunction_new(QtPrivate__AbstractConverterFunction** outptr_QtPrivate__AbstractConverterFunction); -void QtPrivate__AbstractConverterFunction_Delete(QtPrivate__AbstractConverterFunction* self, bool isSubclass); - void QMetaType_new(QMetaType** outptr_QMetaType); void QMetaType_new2(const int typeVal, QMetaType** outptr_QMetaType); bool QMetaType_UnregisterType(int typeVal); @@ -126,51 +69,6 @@ void* QMetaType_Create1(const QMetaType* self, const void* copyVal); void* QMetaType_Construct2(const QMetaType* self, void* where, const void* copyVal); void QMetaType_Delete(QMetaType* self, bool isSubclass); -void QtMetaTypePrivate__VariantData_new(const int metaTypeId_, const void* data_, const unsigned int flags_, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData); -void QtMetaTypePrivate__VariantData_new2(QtMetaTypePrivate__VariantData* other, QtMetaTypePrivate__VariantData** outptr_QtMetaTypePrivate__VariantData); -void QtMetaTypePrivate__VariantData_Delete(QtMetaTypePrivate__VariantData* self, bool isSubclass); - -void QtMetaTypePrivate__VectorBoolElements_Delete(QtMetaTypePrivate__VectorBoolElements* self, bool isSubclass); - -void QtMetaTypePrivate__QSequentialIterableImpl_new(QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl); -void QtMetaTypePrivate__QSequentialIterableImpl_new2(QtMetaTypePrivate__QSequentialIterableImpl* param1, QtMetaTypePrivate__QSequentialIterableImpl** outptr_QtMetaTypePrivate__QSequentialIterableImpl); -int QtMetaTypePrivate__QSequentialIterableImpl_IteratorCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self); -unsigned int QtMetaTypePrivate__QSequentialIterableImpl_Revision(QtMetaTypePrivate__QSequentialIterableImpl* self); -unsigned int QtMetaTypePrivate__QSequentialIterableImpl_ContainerCapabilities(QtMetaTypePrivate__QSequentialIterableImpl* self); -void QtMetaTypePrivate__QSequentialIterableImpl_MoveToBegin(QtMetaTypePrivate__QSequentialIterableImpl* self); -void QtMetaTypePrivate__QSequentialIterableImpl_MoveToEnd(QtMetaTypePrivate__QSequentialIterableImpl* self); -bool QtMetaTypePrivate__QSequentialIterableImpl_Equal(const QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* other); -QtMetaTypePrivate__QSequentialIterableImpl* QtMetaTypePrivate__QSequentialIterableImpl_Advance(QtMetaTypePrivate__QSequentialIterableImpl* self, int i); -void QtMetaTypePrivate__QSequentialIterableImpl_Append(QtMetaTypePrivate__QSequentialIterableImpl* self, const void* newElement); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QSequentialIterableImpl_GetCurrent(const QtMetaTypePrivate__QSequentialIterableImpl* self); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QSequentialIterableImpl_At(const QtMetaTypePrivate__QSequentialIterableImpl* self, int idx); -int QtMetaTypePrivate__QSequentialIterableImpl_Size(const QtMetaTypePrivate__QSequentialIterableImpl* self); -void QtMetaTypePrivate__QSequentialIterableImpl_DestroyIter(QtMetaTypePrivate__QSequentialIterableImpl* self); -void QtMetaTypePrivate__QSequentialIterableImpl_Copy(QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* other); -void QtMetaTypePrivate__QSequentialIterableImpl_OperatorAssign(QtMetaTypePrivate__QSequentialIterableImpl* self, QtMetaTypePrivate__QSequentialIterableImpl* param1); -void QtMetaTypePrivate__QSequentialIterableImpl_Delete(QtMetaTypePrivate__QSequentialIterableImpl* self, bool isSubclass); - -void QtMetaTypePrivate__QAssociativeIterableImpl_new(QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl); -void QtMetaTypePrivate__QAssociativeIterableImpl_new2(QtMetaTypePrivate__QAssociativeIterableImpl* param1, QtMetaTypePrivate__QAssociativeIterableImpl** outptr_QtMetaTypePrivate__QAssociativeIterableImpl); -void QtMetaTypePrivate__QAssociativeIterableImpl_Begin(QtMetaTypePrivate__QAssociativeIterableImpl* self); -void QtMetaTypePrivate__QAssociativeIterableImpl_End(QtMetaTypePrivate__QAssociativeIterableImpl* self); -bool QtMetaTypePrivate__QAssociativeIterableImpl_Equal(const QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* other); -QtMetaTypePrivate__QAssociativeIterableImpl* QtMetaTypePrivate__QAssociativeIterableImpl_Advance(QtMetaTypePrivate__QAssociativeIterableImpl* self, int i); -void QtMetaTypePrivate__QAssociativeIterableImpl_DestroyIter(QtMetaTypePrivate__QAssociativeIterableImpl* self); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QAssociativeIterableImpl_GetCurrentKey(const QtMetaTypePrivate__QAssociativeIterableImpl* self); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QAssociativeIterableImpl_GetCurrentValue(const QtMetaTypePrivate__QAssociativeIterableImpl* self); -void QtMetaTypePrivate__QAssociativeIterableImpl_Find(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__VariantData* key); -int QtMetaTypePrivate__QAssociativeIterableImpl_Size(const QtMetaTypePrivate__QAssociativeIterableImpl* self); -void QtMetaTypePrivate__QAssociativeIterableImpl_Copy(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* other); -void QtMetaTypePrivate__QAssociativeIterableImpl_OperatorAssign(QtMetaTypePrivate__QAssociativeIterableImpl* self, QtMetaTypePrivate__QAssociativeIterableImpl* param1); -void QtMetaTypePrivate__QAssociativeIterableImpl_Delete(QtMetaTypePrivate__QAssociativeIterableImpl* self, bool isSubclass); - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self); -QtMetaTypePrivate__VariantData* QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt/gen_qrefcount.cpp b/qt/gen_qrefcount.cpp deleted file mode 100644 index 3ecfc0a1..00000000 --- a/qt/gen_qrefcount.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__RefCount -#include -#include "gen_qrefcount.h" -#include "_cgo_export.h" - -bool QtPrivate__RefCount_Ref(QtPrivate__RefCount* self) { - return self->ref(); -} - -bool QtPrivate__RefCount_Deref(QtPrivate__RefCount* self) { - return self->deref(); -} - -bool QtPrivate__RefCount_SetSharable(QtPrivate__RefCount* self, bool sharable) { - return self->setSharable(sharable); -} - -bool QtPrivate__RefCount_IsSharable(const QtPrivate__RefCount* self) { - return self->isSharable(); -} - -bool QtPrivate__RefCount_IsStatic(const QtPrivate__RefCount* self) { - return self->isStatic(); -} - -bool QtPrivate__RefCount_IsShared(const QtPrivate__RefCount* self) { - return self->isShared(); -} - -void QtPrivate__RefCount_InitializeOwned(QtPrivate__RefCount* self) { - self->initializeOwned(); -} - -void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self) { - self->initializeUnsharable(); -} - -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qrefcount.go b/qt/gen_qrefcount.go deleted file mode 100644 index 3b89f19b..00000000 --- a/qt/gen_qrefcount.go +++ /dev/null @@ -1,96 +0,0 @@ -package qt - -/* - -#include "gen_qrefcount.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__RefCount struct { - h *C.QtPrivate__RefCount - isSubclass bool -} - -func (this *QtPrivate__RefCount) cPointer() *C.QtPrivate__RefCount { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__RefCount) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__RefCount constructs the type using only CGO pointers. -func newQtPrivate__RefCount(h *C.QtPrivate__RefCount) *QtPrivate__RefCount { - if h == nil { - return nil - } - return &QtPrivate__RefCount{h: h} -} - -// UnsafeNewQtPrivate__RefCount constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__RefCount(h unsafe.Pointer) *QtPrivate__RefCount { - if h == nil { - return nil - } - - return &QtPrivate__RefCount{h: (*C.QtPrivate__RefCount)(h)} -} - -func (this *QtPrivate__RefCount) Ref() bool { - return (bool)(C.QtPrivate__RefCount_Ref(this.h)) -} - -func (this *QtPrivate__RefCount) Deref() bool { - return (bool)(C.QtPrivate__RefCount_Deref(this.h)) -} - -func (this *QtPrivate__RefCount) SetSharable(sharable bool) bool { - return (bool)(C.QtPrivate__RefCount_SetSharable(this.h, (C.bool)(sharable))) -} - -func (this *QtPrivate__RefCount) IsSharable() bool { - return (bool)(C.QtPrivate__RefCount_IsSharable(this.h)) -} - -func (this *QtPrivate__RefCount) IsStatic() bool { - return (bool)(C.QtPrivate__RefCount_IsStatic(this.h)) -} - -func (this *QtPrivate__RefCount) IsShared() bool { - return (bool)(C.QtPrivate__RefCount_IsShared(this.h)) -} - -func (this *QtPrivate__RefCount) InitializeOwned() { - C.QtPrivate__RefCount_InitializeOwned(this.h) -} - -func (this *QtPrivate__RefCount) InitializeUnsharable() { - C.QtPrivate__RefCount_InitializeUnsharable(this.h) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__RefCount) Delete() { - C.QtPrivate__RefCount_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__RefCount) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__RefCount) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qrefcount.h b/qt/gen_qrefcount.h deleted file mode 100644 index 9c079239..00000000 --- a/qt/gen_qrefcount.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once -#ifndef MIQT_QT_GEN_QREFCOUNT_H -#define MIQT_QT_GEN_QREFCOUNT_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__RefCount) -typedef QtPrivate::RefCount QtPrivate__RefCount; -#else -class QtPrivate__RefCount; -#endif -#else -typedef struct QtPrivate__RefCount QtPrivate__RefCount; -#endif - -bool QtPrivate__RefCount_Ref(QtPrivate__RefCount* self); -bool QtPrivate__RefCount_Deref(QtPrivate__RefCount* self); -bool QtPrivate__RefCount_SetSharable(QtPrivate__RefCount* self, bool sharable); -bool QtPrivate__RefCount_IsSharable(const QtPrivate__RefCount* self); -bool QtPrivate__RefCount_IsStatic(const QtPrivate__RefCount* self); -bool QtPrivate__RefCount_IsShared(const QtPrivate__RefCount* self); -void QtPrivate__RefCount_InitializeOwned(QtPrivate__RefCount* self); -void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self); -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt/gen_qresultstore.cpp b/qt/gen_qresultstore.cpp deleted file mode 100644 index 51cee81b..00000000 --- a/qt/gen_qresultstore.cpp +++ /dev/null @@ -1,124 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultItem -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultIteratorBase -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultStoreBase -#include -#include "gen_qresultstore.h" -#include "_cgo_export.h" - -void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { - QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result, static_cast(_count)); - *outptr_QtPrivate__ResultItem = ret; -} - -void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { - QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result); - *outptr_QtPrivate__ResultItem = ret; -} - -void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { - QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(); - *outptr_QtPrivate__ResultItem = ret; -} - -bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self) { - return self->isValid(); -} - -bool QtPrivate__ResultItem_IsVector(const QtPrivate__ResultItem* self) { - return self->isVector(); -} - -int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self) { - return self->count(); -} - -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase) { - QtPrivate::ResultIteratorBase* ret = new QtPrivate::ResultIteratorBase(); - *outptr_QtPrivate__ResultIteratorBase = ret; -} - -int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self) { - return self->vectorIndex(); -} - -int QtPrivate__ResultIteratorBase_ResultIndex(const QtPrivate__ResultIteratorBase* self) { - return self->resultIndex(); -} - -int QtPrivate__ResultIteratorBase_BatchSize(const QtPrivate__ResultIteratorBase* self) { - return self->batchSize(); -} - -void QtPrivate__ResultIteratorBase_BatchedAdvance(QtPrivate__ResultIteratorBase* self) { - self->batchedAdvance(); -} - -bool QtPrivate__ResultIteratorBase_IsVector(const QtPrivate__ResultIteratorBase* self) { - return self->isVector(); -} - -bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__ResultIteratorBase* self) { - return self->canIncrementVectorIndex(); -} - -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase) { - QtPrivate::ResultStoreBase* ret = new QtPrivate::ResultStoreBase(); - *outptr_QtPrivate__ResultStoreBase = ret; -} - -void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable) { - self->setFilterMode(enable); -} - -bool QtPrivate__ResultStoreBase_FilterMode(const QtPrivate__ResultStoreBase* self) { - return self->filterMode(); -} - -int QtPrivate__ResultStoreBase_AddResult(QtPrivate__ResultStoreBase* self, int index, const void* result) { - return self->addResult(static_cast(index), result); -} - -int QtPrivate__ResultStoreBase_AddResults(QtPrivate__ResultStoreBase* self, int index, const void* results, int vectorSize, int logicalCount) { - return self->addResults(static_cast(index), results, static_cast(vectorSize), static_cast(logicalCount)); -} - -bool QtPrivate__ResultStoreBase_HasNextResult(const QtPrivate__ResultStoreBase* self) { - return self->hasNextResult(); -} - -bool QtPrivate__ResultStoreBase_Contains(const QtPrivate__ResultStoreBase* self, int index) { - return self->contains(static_cast(index)); -} - -int QtPrivate__ResultStoreBase_Count(const QtPrivate__ResultStoreBase* self) { - return self->count(); -} - -int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* self, int index) { - return self->addCanceledResult(static_cast(index)); -} - -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt/gen_qresultstore.go b/qt/gen_qresultstore.go deleted file mode 100644 index ce1a9a64..00000000 --- a/qt/gen_qresultstore.go +++ /dev/null @@ -1,282 +0,0 @@ -package qt - -/* - -#include "gen_qresultstore.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__ResultItem struct { - h *C.QtPrivate__ResultItem - isSubclass bool -} - -func (this *QtPrivate__ResultItem) cPointer() *C.QtPrivate__ResultItem { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ResultItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ResultItem constructs the type using only CGO pointers. -func newQtPrivate__ResultItem(h *C.QtPrivate__ResultItem) *QtPrivate__ResultItem { - if h == nil { - return nil - } - return &QtPrivate__ResultItem{h: h} -} - -// UnsafeNewQtPrivate__ResultItem constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ResultItem(h unsafe.Pointer) *QtPrivate__ResultItem { - if h == nil { - return nil - } - - return &QtPrivate__ResultItem{h: (*C.QtPrivate__ResultItem)(h)} -} - -// NewQtPrivate__ResultItem constructs a new QtPrivate::ResultItem object. -func NewQtPrivate__ResultItem(_result unsafe.Pointer, _count int) *QtPrivate__ResultItem { - var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil - - C.QtPrivate__ResultItem_new(_result, (C.int)(_count), &outptr_QtPrivate__ResultItem) - ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) - ret.isSubclass = true - return ret -} - -// NewQtPrivate__ResultItem2 constructs a new QtPrivate::ResultItem object. -func NewQtPrivate__ResultItem2(_result unsafe.Pointer) *QtPrivate__ResultItem { - var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil - - C.QtPrivate__ResultItem_new2(_result, &outptr_QtPrivate__ResultItem) - ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) - ret.isSubclass = true - return ret -} - -// NewQtPrivate__ResultItem3 constructs a new QtPrivate::ResultItem object. -func NewQtPrivate__ResultItem3() *QtPrivate__ResultItem { - var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil - - C.QtPrivate__ResultItem_new3(&outptr_QtPrivate__ResultItem) - ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__ResultItem) IsValid() bool { - return (bool)(C.QtPrivate__ResultItem_IsValid(this.h)) -} - -func (this *QtPrivate__ResultItem) IsVector() bool { - return (bool)(C.QtPrivate__ResultItem_IsVector(this.h)) -} - -func (this *QtPrivate__ResultItem) Count() int { - return (int)(C.QtPrivate__ResultItem_Count(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ResultItem) Delete() { - C.QtPrivate__ResultItem_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ResultItem) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ResultItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__ResultIteratorBase struct { - h *C.QtPrivate__ResultIteratorBase - isSubclass bool -} - -func (this *QtPrivate__ResultIteratorBase) cPointer() *C.QtPrivate__ResultIteratorBase { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ResultIteratorBase) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ResultIteratorBase constructs the type using only CGO pointers. -func newQtPrivate__ResultIteratorBase(h *C.QtPrivate__ResultIteratorBase) *QtPrivate__ResultIteratorBase { - if h == nil { - return nil - } - return &QtPrivate__ResultIteratorBase{h: h} -} - -// UnsafeNewQtPrivate__ResultIteratorBase constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ResultIteratorBase(h unsafe.Pointer) *QtPrivate__ResultIteratorBase { - if h == nil { - return nil - } - - return &QtPrivate__ResultIteratorBase{h: (*C.QtPrivate__ResultIteratorBase)(h)} -} - -// NewQtPrivate__ResultIteratorBase constructs a new QtPrivate::ResultIteratorBase object. -func NewQtPrivate__ResultIteratorBase() *QtPrivate__ResultIteratorBase { - var outptr_QtPrivate__ResultIteratorBase *C.QtPrivate__ResultIteratorBase = nil - - C.QtPrivate__ResultIteratorBase_new(&outptr_QtPrivate__ResultIteratorBase) - ret := newQtPrivate__ResultIteratorBase(outptr_QtPrivate__ResultIteratorBase) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__ResultIteratorBase) VectorIndex() int { - return (int)(C.QtPrivate__ResultIteratorBase_VectorIndex(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) ResultIndex() int { - return (int)(C.QtPrivate__ResultIteratorBase_ResultIndex(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) BatchSize() int { - return (int)(C.QtPrivate__ResultIteratorBase_BatchSize(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) BatchedAdvance() { - C.QtPrivate__ResultIteratorBase_BatchedAdvance(this.h) -} - -func (this *QtPrivate__ResultIteratorBase) IsVector() bool { - return (bool)(C.QtPrivate__ResultIteratorBase_IsVector(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) CanIncrementVectorIndex() bool { - return (bool)(C.QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ResultIteratorBase) Delete() { - C.QtPrivate__ResultIteratorBase_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ResultIteratorBase) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ResultIteratorBase) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__ResultStoreBase struct { - h *C.QtPrivate__ResultStoreBase - isSubclass bool -} - -func (this *QtPrivate__ResultStoreBase) cPointer() *C.QtPrivate__ResultStoreBase { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ResultStoreBase) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ResultStoreBase constructs the type using only CGO pointers. -func newQtPrivate__ResultStoreBase(h *C.QtPrivate__ResultStoreBase) *QtPrivate__ResultStoreBase { - if h == nil { - return nil - } - return &QtPrivate__ResultStoreBase{h: h} -} - -// UnsafeNewQtPrivate__ResultStoreBase constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ResultStoreBase(h unsafe.Pointer) *QtPrivate__ResultStoreBase { - if h == nil { - return nil - } - - return &QtPrivate__ResultStoreBase{h: (*C.QtPrivate__ResultStoreBase)(h)} -} - -// NewQtPrivate__ResultStoreBase constructs a new QtPrivate::ResultStoreBase object. -func NewQtPrivate__ResultStoreBase() *QtPrivate__ResultStoreBase { - var outptr_QtPrivate__ResultStoreBase *C.QtPrivate__ResultStoreBase = nil - - C.QtPrivate__ResultStoreBase_new(&outptr_QtPrivate__ResultStoreBase) - ret := newQtPrivate__ResultStoreBase(outptr_QtPrivate__ResultStoreBase) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__ResultStoreBase) SetFilterMode(enable bool) { - C.QtPrivate__ResultStoreBase_SetFilterMode(this.h, (C.bool)(enable)) -} - -func (this *QtPrivate__ResultStoreBase) FilterMode() bool { - return (bool)(C.QtPrivate__ResultStoreBase_FilterMode(this.h)) -} - -func (this *QtPrivate__ResultStoreBase) AddResult(index int, result unsafe.Pointer) int { - return (int)(C.QtPrivate__ResultStoreBase_AddResult(this.h, (C.int)(index), result)) -} - -func (this *QtPrivate__ResultStoreBase) AddResults(index int, results unsafe.Pointer, vectorSize int, logicalCount int) int { - return (int)(C.QtPrivate__ResultStoreBase_AddResults(this.h, (C.int)(index), results, (C.int)(vectorSize), (C.int)(logicalCount))) -} - -func (this *QtPrivate__ResultStoreBase) HasNextResult() bool { - return (bool)(C.QtPrivate__ResultStoreBase_HasNextResult(this.h)) -} - -func (this *QtPrivate__ResultStoreBase) Contains(index int) bool { - return (bool)(C.QtPrivate__ResultStoreBase_Contains(this.h, (C.int)(index))) -} - -func (this *QtPrivate__ResultStoreBase) Count() int { - return (int)(C.QtPrivate__ResultStoreBase_Count(this.h)) -} - -func (this *QtPrivate__ResultStoreBase) AddCanceledResult(index int) int { - return (int)(C.QtPrivate__ResultStoreBase_AddCanceledResult(this.h, (C.int)(index))) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ResultStoreBase) Delete() { - C.QtPrivate__ResultStoreBase_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ResultStoreBase) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ResultStoreBase) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qresultstore.h b/qt/gen_qresultstore.h deleted file mode 100644 index fb006000..00000000 --- a/qt/gen_qresultstore.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once -#ifndef MIQT_QT_GEN_QRESULTSTORE_H -#define MIQT_QT_GEN_QRESULTSTORE_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultItem) -typedef QtPrivate::ResultItem QtPrivate__ResultItem; -#else -class QtPrivate__ResultItem; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultIteratorBase) -typedef QtPrivate::ResultIteratorBase QtPrivate__ResultIteratorBase; -#else -class QtPrivate__ResultIteratorBase; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultStoreBase) -typedef QtPrivate::ResultStoreBase QtPrivate__ResultStoreBase; -#else -class QtPrivate__ResultStoreBase; -#endif -#else -typedef struct QtPrivate__ResultItem QtPrivate__ResultItem; -typedef struct QtPrivate__ResultIteratorBase QtPrivate__ResultIteratorBase; -typedef struct QtPrivate__ResultStoreBase QtPrivate__ResultStoreBase; -#endif - -void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); -void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); -void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); -bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self); -bool QtPrivate__ResultItem_IsVector(const QtPrivate__ResultItem* self); -int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self); -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass); - -void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase); -int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self); -int QtPrivate__ResultIteratorBase_ResultIndex(const QtPrivate__ResultIteratorBase* self); -int QtPrivate__ResultIteratorBase_BatchSize(const QtPrivate__ResultIteratorBase* self); -void QtPrivate__ResultIteratorBase_BatchedAdvance(QtPrivate__ResultIteratorBase* self); -bool QtPrivate__ResultIteratorBase_IsVector(const QtPrivate__ResultIteratorBase* self); -bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__ResultIteratorBase* self); -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass); - -void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase); -void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable); -bool QtPrivate__ResultStoreBase_FilterMode(const QtPrivate__ResultStoreBase* self); -int QtPrivate__ResultStoreBase_AddResult(QtPrivate__ResultStoreBase* self, int index, const void* result); -int QtPrivate__ResultStoreBase_AddResults(QtPrivate__ResultStoreBase* self, int index, const void* results, int vectorSize, int logicalCount); -bool QtPrivate__ResultStoreBase_HasNextResult(const QtPrivate__ResultStoreBase* self); -bool QtPrivate__ResultStoreBase_Contains(const QtPrivate__ResultStoreBase* self, int index); -int QtPrivate__ResultStoreBase_Count(const QtPrivate__ResultStoreBase* self); -int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* self, int index); -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt/gen_qsocketnotifier.cpp b/qt/gen_qsocketnotifier.cpp index 25bbbc9f..03a9e253 100644 --- a/qt/gen_qsocketnotifier.cpp +++ b/qt/gen_qsocketnotifier.cpp @@ -238,7 +238,7 @@ struct miqt_string QSocketNotifier_TrUtf8(const char* s) { intptr_t QSocketNotifier_Socket(const QSocketNotifier* self) { qintptr _ret = self->socket(); - return static_cast(_ret); + return (intptr_t)(_ret); } int QSocketNotifier_Type(const QSocketNotifier* self) { diff --git a/qt/gen_qvariant.cpp b/qt/gen_qvariant.cpp index c340f5fc..ff55fbde 100644 --- a/qt/gen_qvariant.cpp +++ b/qt/gen_qvariant.cpp @@ -34,7 +34,6 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QVariant__Handler -#define WORKAROUND_INNER_CLASS_DEFINITION_QVariant__Private__Data #include #include #include "gen_qvariant.h" @@ -670,28 +669,6 @@ void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self, bool isSubc } } -void QVariant__Private__Data_new(QVariant__Private__Data** outptr_QVariant__Private__Data) { - QVariant::Private::Data* ret = new QVariant::Private::Data(); - *outptr_QVariant__Private__Data = ret; -} - -void QVariant__Private__Data_new2(QVariant__Private__Data* param1, QVariant__Private__Data** outptr_QVariant__Private__Data) { - QVariant::Private::Data* ret = new QVariant::Private::Data(*param1); - *outptr_QVariant__Private__Data = ret; -} - -void QVariant__Private__Data_OperatorAssign(QVariant__Private__Data* self, QVariant__Private__Data* param1) { - self->operator=(*param1); -} - -void QVariant__Private__Data_Delete(QVariant__Private__Data* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QVariant__Handler_Delete(QVariant__Handler* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); diff --git a/qt/gen_qvariant.go b/qt/gen_qvariant.go index a7fb8ed5..c2e99366 100644 --- a/qt/gen_qvariant.go +++ b/qt/gen_qvariant.go @@ -1103,80 +1103,6 @@ func (this *QVariantComparisonHelper) GoGC() { }) } -type QVariant__Private__Data struct { - h *C.QVariant__Private__Data - isSubclass bool -} - -func (this *QVariant__Private__Data) cPointer() *C.QVariant__Private__Data { - if this == nil { - return nil - } - return this.h -} - -func (this *QVariant__Private__Data) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQVariant__Private__Data constructs the type using only CGO pointers. -func newQVariant__Private__Data(h *C.QVariant__Private__Data) *QVariant__Private__Data { - if h == nil { - return nil - } - return &QVariant__Private__Data{h: h} -} - -// UnsafeNewQVariant__Private__Data constructs the type using only unsafe pointers. -func UnsafeNewQVariant__Private__Data(h unsafe.Pointer) *QVariant__Private__Data { - if h == nil { - return nil - } - - return &QVariant__Private__Data{h: (*C.QVariant__Private__Data)(h)} -} - -// NewQVariant__Private__Data constructs a new QVariant::Private::Data object. -func NewQVariant__Private__Data() *QVariant__Private__Data { - var outptr_QVariant__Private__Data *C.QVariant__Private__Data = nil - - C.QVariant__Private__Data_new(&outptr_QVariant__Private__Data) - ret := newQVariant__Private__Data(outptr_QVariant__Private__Data) - ret.isSubclass = true - return ret -} - -// NewQVariant__Private__Data2 constructs a new QVariant::Private::Data object. -func NewQVariant__Private__Data2(param1 *QVariant__Private__Data) *QVariant__Private__Data { - var outptr_QVariant__Private__Data *C.QVariant__Private__Data = nil - - C.QVariant__Private__Data_new2(param1.cPointer(), &outptr_QVariant__Private__Data) - ret := newQVariant__Private__Data(outptr_QVariant__Private__Data) - ret.isSubclass = true - return ret -} - -func (this *QVariant__Private__Data) OperatorAssign(param1 *QVariant__Private__Data) { - C.QVariant__Private__Data_OperatorAssign(this.h, param1.cPointer()) -} - -// Delete this object from C++ memory. -func (this *QVariant__Private__Data) Delete() { - C.QVariant__Private__Data_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QVariant__Private__Data) GoGC() { - runtime.SetFinalizer(this, func(this *QVariant__Private__Data) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QVariant__Handler struct { h *C.QVariant__Handler isSubclass bool diff --git a/qt/gen_qvariant.h b/qt/gen_qvariant.h index 576a5436..9cfa4b87 100644 --- a/qt/gen_qvariant.h +++ b/qt/gen_qvariant.h @@ -58,11 +58,6 @@ typedef QVariant::Handler QVariant__Handler; #else class QVariant__Handler; #endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QVariant__Private__Data) -typedef QVariant::Private::Data QVariant__Private__Data; -#else -class QVariant__Private__Data; -#endif class QVariantComparisonHelper; #else typedef struct QAssociativeIterable__const_iterator QAssociativeIterable__const_iterator; @@ -96,7 +91,6 @@ typedef struct QUrl QUrl; typedef struct QUuid QUuid; typedef struct QVariant QVariant; typedef struct QVariant__Handler QVariant__Handler; -typedef struct QVariant__Private__Data QVariant__Private__Data; typedef struct QVariantComparisonHelper QVariantComparisonHelper; #endif @@ -220,11 +214,6 @@ void QVariantComparisonHelper_new(QVariant* varVal, QVariantComparisonHelper** o void QVariantComparisonHelper_new2(QVariantComparisonHelper* param1, QVariantComparisonHelper** outptr_QVariantComparisonHelper); void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self, bool isSubclass); -void QVariant__Private__Data_new(QVariant__Private__Data** outptr_QVariant__Private__Data); -void QVariant__Private__Data_new2(QVariant__Private__Data* param1, QVariant__Private__Data** outptr_QVariant__Private__Data); -void QVariant__Private__Data_OperatorAssign(QVariant__Private__Data* self, QVariant__Private__Data* param1); -void QVariant__Private__Data_Delete(QVariant__Private__Data* self, bool isSubclass); - void QVariant__Handler_Delete(QVariant__Handler* self, bool isSubclass); void QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other, QSequentialIterable__const_iterator** outptr_QSequentialIterable__const_iterator); diff --git a/qt/network/gen_qabstractsocket.cpp b/qt/network/gen_qabstractsocket.cpp index 4359b832..b72155ba 100644 --- a/qt/network/gen_qabstractsocket.cpp +++ b/qt/network/gen_qabstractsocket.cpp @@ -246,7 +246,7 @@ class MiqtVirtualQAbstractSocket : public virtual QAbstractSocket { intptr_t virtualbase_SocketDescriptor() const { qintptr _ret = QAbstractSocket::socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } @@ -260,7 +260,7 @@ class MiqtVirtualQAbstractSocket : public virtual QAbstractSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODevice::OpenMode openMode_ret = openMode; @@ -818,7 +818,7 @@ void QAbstractSocket_Abort(QAbstractSocket* self) { intptr_t QAbstractSocket_SocketDescriptor(const QAbstractSocket* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode) { diff --git a/qt/network/gen_qlocalserver.cpp b/qt/network/gen_qlocalserver.cpp index 35b1623c..e999f065 100644 --- a/qt/network/gen_qlocalserver.cpp +++ b/qt/network/gen_qlocalserver.cpp @@ -406,7 +406,7 @@ int QLocalServer_SocketOptions(const QLocalServer* self) { intptr_t QLocalServer_SocketDescriptor(const QLocalServer* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } struct miqt_string QLocalServer_Tr2(const char* s, const char* c) { diff --git a/qt/network/gen_qlocalsocket.cpp b/qt/network/gen_qlocalsocket.cpp index d23309c0..c8330e81 100644 --- a/qt/network/gen_qlocalsocket.cpp +++ b/qt/network/gen_qlocalsocket.cpp @@ -536,7 +536,7 @@ bool QLocalSocket_SetSocketDescriptor(QLocalSocket* self, intptr_t socketDescrip intptr_t QLocalSocket_SocketDescriptor(const QLocalSocket* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } int QLocalSocket_State(const QLocalSocket* self) { diff --git a/qt/network/gen_qsslsocket.cpp b/qt/network/gen_qsslsocket.cpp index 95f0e396..426ed327 100644 --- a/qt/network/gen_qsslsocket.cpp +++ b/qt/network/gen_qsslsocket.cpp @@ -62,7 +62,7 @@ class MiqtVirtualQSslSocket : public virtual QSslSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODevice::OpenMode openMode_ret = openMode; diff --git a/qt/network/gen_qtcpserver.cpp b/qt/network/gen_qtcpserver.cpp index 447998ab..4c963f32 100644 --- a/qt/network/gen_qtcpserver.cpp +++ b/qt/network/gen_qtcpserver.cpp @@ -78,7 +78,7 @@ class MiqtVirtualQTcpServer : public virtual QTcpServer { } qintptr handle_ret = handle; - intptr_t sigval1 = static_cast(handle_ret); + intptr_t sigval1 = (intptr_t)(handle_ret); miqt_exec_callback_QTcpServer_IncomingConnection(this, handle__IncomingConnection, sigval1); @@ -338,7 +338,7 @@ QHostAddress* QTcpServer_ServerAddress(const QTcpServer* self) { intptr_t QTcpServer_SocketDescriptor(const QTcpServer* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } bool QTcpServer_SetSocketDescriptor(QTcpServer* self, intptr_t socketDescriptor) { diff --git a/qt/network/gen_qtcpsocket.cpp b/qt/network/gen_qtcpsocket.cpp index 59956002..7022b8d5 100644 --- a/qt/network/gen_qtcpsocket.cpp +++ b/qt/network/gen_qtcpsocket.cpp @@ -215,7 +215,7 @@ class MiqtVirtualQTcpSocket : public virtual QTcpSocket { intptr_t virtualbase_SocketDescriptor() const { qintptr _ret = QTcpSocket::socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } @@ -229,7 +229,7 @@ class MiqtVirtualQTcpSocket : public virtual QTcpSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODevice::OpenMode openMode_ret = openMode; diff --git a/qt/network/gen_qudpsocket.cpp b/qt/network/gen_qudpsocket.cpp index 6879d761..4cfcd33e 100644 --- a/qt/network/gen_qudpsocket.cpp +++ b/qt/network/gen_qudpsocket.cpp @@ -219,7 +219,7 @@ class MiqtVirtualQUdpSocket : public virtual QUdpSocket { intptr_t virtualbase_SocketDescriptor() const { qintptr _ret = QUdpSocket::socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } @@ -233,7 +233,7 @@ class MiqtVirtualQUdpSocket : public virtual QUdpSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODevice::OpenMode openMode_ret = openMode; diff --git a/qt6/gen_qabstractslider.cpp b/qt6/gen_qabstractslider.cpp index 37941421..f43517e3 100644 --- a/qt6/gen_qabstractslider.cpp +++ b/qt6/gen_qabstractslider.cpp @@ -891,7 +891,7 @@ class MiqtVirtualQAbstractSlider : public virtual QAbstractSlider { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QAbstractSlider_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qabstractspinbox.cpp b/qt6/gen_qabstractspinbox.cpp index 2c87408a..2b21e4b6 100644 --- a/qt6/gen_qabstractspinbox.cpp +++ b/qt6/gen_qabstractspinbox.cpp @@ -1050,7 +1050,7 @@ class MiqtVirtualQAbstractSpinBox : public virtual QAbstractSpinBox { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QAbstractSpinBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qarraydata.cpp b/qt6/gen_qarraydata.cpp index e65fe4a8..5948cf3c 100644 --- a/qt6/gen_qarraydata.cpp +++ b/qt6/gen_qarraydata.cpp @@ -1,5 +1,4 @@ #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QContainerImplHelper #include #include "gen_qarraydata.h" #include "_cgo_export.h" @@ -67,11 +66,3 @@ void QArrayData_Delete(QArrayData* self, bool isSubclass) { } } -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qarraydata.go b/qt6/gen_qarraydata.go index c2c0b032..52477e30 100644 --- a/qt6/gen_qarraydata.go +++ b/qt6/gen_qarraydata.go @@ -140,53 +140,3 @@ func (this *QArrayData) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__QContainerImplHelper struct { - h *C.QtPrivate__QContainerImplHelper - isSubclass bool -} - -func (this *QtPrivate__QContainerImplHelper) cPointer() *C.QtPrivate__QContainerImplHelper { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QContainerImplHelper) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QContainerImplHelper constructs the type using only CGO pointers. -func newQtPrivate__QContainerImplHelper(h *C.QtPrivate__QContainerImplHelper) *QtPrivate__QContainerImplHelper { - if h == nil { - return nil - } - return &QtPrivate__QContainerImplHelper{h: h} -} - -// UnsafeNewQtPrivate__QContainerImplHelper constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QContainerImplHelper(h unsafe.Pointer) *QtPrivate__QContainerImplHelper { - if h == nil { - return nil - } - - return &QtPrivate__QContainerImplHelper{h: (*C.QtPrivate__QContainerImplHelper)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QContainerImplHelper) Delete() { - C.QtPrivate__QContainerImplHelper_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QContainerImplHelper) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QContainerImplHelper) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qarraydata.h b/qt6/gen_qarraydata.h index 7389b889..6e0a4788 100644 --- a/qt6/gen_qarraydata.h +++ b/qt6/gen_qarraydata.h @@ -16,14 +16,8 @@ extern "C" { #ifdef __cplusplus class QArrayData; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QContainerImplHelper) -typedef QtPrivate::QContainerImplHelper QtPrivate__QContainerImplHelper; -#else -class QtPrivate__QContainerImplHelper; -#endif #else typedef struct QArrayData QArrayData; -typedef struct QtPrivate__QContainerImplHelper QtPrivate__QContainerImplHelper; #endif ptrdiff_t QArrayData_AllocatedCapacity(QArrayData* self); @@ -37,8 +31,6 @@ struct miqt_map /* tuple of QArrayData* and void* */ QArrayData_ReallocateUnali void QArrayData_Deallocate(QArrayData* data, ptrdiff_t objectSize, ptrdiff_t alignment); void QArrayData_Delete(QArrayData* self, bool isSubclass); -void QtPrivate__QContainerImplHelper_Delete(QtPrivate__QContainerImplHelper* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qcalendarwidget.cpp b/qt6/gen_qcalendarwidget.cpp index 14f64e96..3dd486be 100644 --- a/qt6/gen_qcalendarwidget.cpp +++ b/qt6/gen_qcalendarwidget.cpp @@ -874,7 +874,7 @@ class MiqtVirtualQCalendarWidget : public virtual QCalendarWidget { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QCalendarWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qcombobox.cpp b/qt6/gen_qcombobox.cpp index a6c8aba3..bb917bcb 100644 --- a/qt6/gen_qcombobox.cpp +++ b/qt6/gen_qcombobox.cpp @@ -993,7 +993,7 @@ class MiqtVirtualQComboBox : public virtual QComboBox { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QComboBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qdatastream.cpp b/qt6/gen_qdatastream.cpp index 0501fa3a..bbf9d782 100644 --- a/qt6/gen_qdatastream.cpp +++ b/qt6/gen_qdatastream.cpp @@ -2,7 +2,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver #include #include "gen_qdatastream.h" #include "_cgo_export.h" @@ -231,16 +230,3 @@ void QDataStream_Delete(QDataStream* self, bool isSubclass) { } } -void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver) { - QtPrivate::StreamStateSaver* ret = new QtPrivate::StreamStateSaver(s); - *outptr_QtPrivate__StreamStateSaver = ret; -} - -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qdatastream.go b/qt6/gen_qdatastream.go index 15fd0410..c3e1d42c 100644 --- a/qt6/gen_qdatastream.go +++ b/qt6/gen_qdatastream.go @@ -371,63 +371,3 @@ func (this *QDataStream) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__StreamStateSaver struct { - h *C.QtPrivate__StreamStateSaver - isSubclass bool -} - -func (this *QtPrivate__StreamStateSaver) cPointer() *C.QtPrivate__StreamStateSaver { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__StreamStateSaver) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__StreamStateSaver constructs the type using only CGO pointers. -func newQtPrivate__StreamStateSaver(h *C.QtPrivate__StreamStateSaver) *QtPrivate__StreamStateSaver { - if h == nil { - return nil - } - return &QtPrivate__StreamStateSaver{h: h} -} - -// UnsafeNewQtPrivate__StreamStateSaver constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__StreamStateSaver(h unsafe.Pointer) *QtPrivate__StreamStateSaver { - if h == nil { - return nil - } - - return &QtPrivate__StreamStateSaver{h: (*C.QtPrivate__StreamStateSaver)(h)} -} - -// NewQtPrivate__StreamStateSaver constructs a new QtPrivate::StreamStateSaver object. -func NewQtPrivate__StreamStateSaver(s *QDataStream) *QtPrivate__StreamStateSaver { - var outptr_QtPrivate__StreamStateSaver *C.QtPrivate__StreamStateSaver = nil - - C.QtPrivate__StreamStateSaver_new(s.cPointer(), &outptr_QtPrivate__StreamStateSaver) - ret := newQtPrivate__StreamStateSaver(outptr_QtPrivate__StreamStateSaver) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__StreamStateSaver) Delete() { - C.QtPrivate__StreamStateSaver_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__StreamStateSaver) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__StreamStateSaver) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qdatastream.h b/qt6/gen_qdatastream.h index 2a20f00e..1bb781bb 100644 --- a/qt6/gen_qdatastream.h +++ b/qt6/gen_qdatastream.h @@ -19,17 +19,11 @@ class QByteArray; class QDataStream; class QIODevice; class QIODeviceBase; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver) -typedef QtPrivate::StreamStateSaver QtPrivate__StreamStateSaver; -#else -class QtPrivate__StreamStateSaver; -#endif #else typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; -typedef struct QtPrivate__StreamStateSaver QtPrivate__StreamStateSaver; #endif void QDataStream_new(QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); @@ -85,9 +79,6 @@ void QDataStream_AbortTransaction(QDataStream* self); bool QDataStream_IsDeviceTransactionStarted(const QDataStream* self); void QDataStream_Delete(QDataStream* self, bool isSubclass); -void QtPrivate__StreamStateSaver_new(QDataStream* s, QtPrivate__StreamStateSaver** outptr_QtPrivate__StreamStateSaver); -void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qdialog.cpp b/qt6/gen_qdialog.cpp index 7a9d3adf..82bc789a 100644 --- a/qt6/gen_qdialog.cpp +++ b/qt6/gen_qdialog.cpp @@ -957,7 +957,7 @@ class MiqtVirtualQDialog : public virtual QDialog { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QDialog_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qdialogbuttonbox.cpp b/qt6/gen_qdialogbuttonbox.cpp index 94f9e4b5..74a44c41 100644 --- a/qt6/gen_qdialogbuttonbox.cpp +++ b/qt6/gen_qdialogbuttonbox.cpp @@ -850,7 +850,7 @@ class MiqtVirtualQDialogButtonBox : public virtual QDialogButtonBox { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QDialogButtonBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qdockwidget.cpp b/qt6/gen_qdockwidget.cpp index 3a33b620..91686154 100644 --- a/qt6/gen_qdockwidget.cpp +++ b/qt6/gen_qdockwidget.cpp @@ -871,7 +871,7 @@ class MiqtVirtualQDockWidget : public virtual QDockWidget { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QDockWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qexception.cpp b/qt6/gen_qexception.cpp deleted file mode 100644 index d96ea7be..00000000 --- a/qt6/gen_qexception.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ExceptionStore -#include -#include "gen_qexception.h" -#include "_cgo_export.h" - -bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self) { - return self->hasException(); -} - -void QtPrivate__ExceptionStore_ThrowPossibleException(QtPrivate__ExceptionStore* self) { - self->throwPossibleException(); -} - -void QtPrivate__ExceptionStore_RethrowException(const QtPrivate__ExceptionStore* self) { - self->rethrowException(); -} - -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qexception.go b/qt6/gen_qexception.go deleted file mode 100644 index 60496899..00000000 --- a/qt6/gen_qexception.go +++ /dev/null @@ -1,76 +0,0 @@ -package qt6 - -/* - -#include "gen_qexception.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__ExceptionStore struct { - h *C.QtPrivate__ExceptionStore - isSubclass bool -} - -func (this *QtPrivate__ExceptionStore) cPointer() *C.QtPrivate__ExceptionStore { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ExceptionStore) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ExceptionStore constructs the type using only CGO pointers. -func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__ExceptionStore { - if h == nil { - return nil - } - return &QtPrivate__ExceptionStore{h: h} -} - -// UnsafeNewQtPrivate__ExceptionStore constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ExceptionStore(h unsafe.Pointer) *QtPrivate__ExceptionStore { - if h == nil { - return nil - } - - return &QtPrivate__ExceptionStore{h: (*C.QtPrivate__ExceptionStore)(h)} -} - -func (this *QtPrivate__ExceptionStore) HasException() bool { - return (bool)(C.QtPrivate__ExceptionStore_HasException(this.h)) -} - -func (this *QtPrivate__ExceptionStore) ThrowPossibleException() { - C.QtPrivate__ExceptionStore_ThrowPossibleException(this.h) -} - -func (this *QtPrivate__ExceptionStore) RethrowException() { - C.QtPrivate__ExceptionStore_RethrowException(this.h) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ExceptionStore) Delete() { - C.QtPrivate__ExceptionStore_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ExceptionStore) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ExceptionStore) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qexception.h b/qt6/gen_qexception.h deleted file mode 100644 index e4ae630f..00000000 --- a/qt6/gen_qexception.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once -#ifndef MIQT_QT6_GEN_QEXCEPTION_H -#define MIQT_QT6_GEN_QEXCEPTION_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ExceptionStore) -typedef QtPrivate::ExceptionStore QtPrivate__ExceptionStore; -#else -class QtPrivate__ExceptionStore; -#endif -#else -typedef struct QtPrivate__ExceptionStore QtPrivate__ExceptionStore; -#endif - -bool QtPrivate__ExceptionStore_HasException(const QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_ThrowPossibleException(QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_RethrowException(const QtPrivate__ExceptionStore* self); -void QtPrivate__ExceptionStore_Delete(QtPrivate__ExceptionStore* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt6/gen_qfocusframe.cpp b/qt6/gen_qfocusframe.cpp index c6b0ebb9..4ec80834 100644 --- a/qt6/gen_qfocusframe.cpp +++ b/qt6/gen_qfocusframe.cpp @@ -866,7 +866,7 @@ class MiqtVirtualQFocusFrame : public virtual QFocusFrame { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QFocusFrame_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qframe.cpp b/qt6/gen_qframe.cpp index fe5dfe3e..22d5b99e 100644 --- a/qt6/gen_qframe.cpp +++ b/qt6/gen_qframe.cpp @@ -868,7 +868,7 @@ class MiqtVirtualQFrame : public virtual QFrame { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QFrame_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qgroupbox.cpp b/qt6/gen_qgroupbox.cpp index ed53a7e2..aa81d643 100644 --- a/qt6/gen_qgroupbox.cpp +++ b/qt6/gen_qgroupbox.cpp @@ -893,7 +893,7 @@ class MiqtVirtualQGroupBox : public virtual QGroupBox { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QGroupBox_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qhashfunctions.cpp b/qt6/gen_qhashfunctions.cpp index b4e9a646..6650d757 100644 --- a/qt6/gen_qhashfunctions.cpp +++ b/qt6/gen_qhashfunctions.cpp @@ -1,6 +1,4 @@ #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombine -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombineCommutative #include #include "gen_qhashfunctions.h" #include "_cgo_export.h" @@ -35,29 +33,3 @@ void QHashSeed_Delete(QHashSeed* self, bool isSubclass) { } } -void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine) { - QtPrivate::QHashCombine* ret = new QtPrivate::QHashCombine(); - *outptr_QtPrivate__QHashCombine = ret; -} - -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative) { - QtPrivate::QHashCombineCommutative* ret = new QtPrivate::QHashCombineCommutative(); - *outptr_QtPrivate__QHashCombineCommutative = ret; -} - -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qhashfunctions.go b/qt6/gen_qhashfunctions.go index 3712fa23..2efa2714 100644 --- a/qt6/gen_qhashfunctions.go +++ b/qt6/gen_qhashfunctions.go @@ -97,123 +97,3 @@ func (this *QHashSeed) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__QHashCombine struct { - h *C.QtPrivate__QHashCombine - isSubclass bool -} - -func (this *QtPrivate__QHashCombine) cPointer() *C.QtPrivate__QHashCombine { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QHashCombine) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QHashCombine constructs the type using only CGO pointers. -func newQtPrivate__QHashCombine(h *C.QtPrivate__QHashCombine) *QtPrivate__QHashCombine { - if h == nil { - return nil - } - return &QtPrivate__QHashCombine{h: h} -} - -// UnsafeNewQtPrivate__QHashCombine constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QHashCombine(h unsafe.Pointer) *QtPrivate__QHashCombine { - if h == nil { - return nil - } - - return &QtPrivate__QHashCombine{h: (*C.QtPrivate__QHashCombine)(h)} -} - -// NewQtPrivate__QHashCombine constructs a new QtPrivate::QHashCombine object. -func NewQtPrivate__QHashCombine() *QtPrivate__QHashCombine { - var outptr_QtPrivate__QHashCombine *C.QtPrivate__QHashCombine = nil - - C.QtPrivate__QHashCombine_new(&outptr_QtPrivate__QHashCombine) - ret := newQtPrivate__QHashCombine(outptr_QtPrivate__QHashCombine) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QHashCombine) Delete() { - C.QtPrivate__QHashCombine_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QHashCombine) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QHashCombine) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__QHashCombineCommutative struct { - h *C.QtPrivate__QHashCombineCommutative - isSubclass bool -} - -func (this *QtPrivate__QHashCombineCommutative) cPointer() *C.QtPrivate__QHashCombineCommutative { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QHashCombineCommutative) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QHashCombineCommutative constructs the type using only CGO pointers. -func newQtPrivate__QHashCombineCommutative(h *C.QtPrivate__QHashCombineCommutative) *QtPrivate__QHashCombineCommutative { - if h == nil { - return nil - } - return &QtPrivate__QHashCombineCommutative{h: h} -} - -// UnsafeNewQtPrivate__QHashCombineCommutative constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QHashCombineCommutative(h unsafe.Pointer) *QtPrivate__QHashCombineCommutative { - if h == nil { - return nil - } - - return &QtPrivate__QHashCombineCommutative{h: (*C.QtPrivate__QHashCombineCommutative)(h)} -} - -// NewQtPrivate__QHashCombineCommutative constructs a new QtPrivate::QHashCombineCommutative object. -func NewQtPrivate__QHashCombineCommutative() *QtPrivate__QHashCombineCommutative { - var outptr_QtPrivate__QHashCombineCommutative *C.QtPrivate__QHashCombineCommutative = nil - - C.QtPrivate__QHashCombineCommutative_new(&outptr_QtPrivate__QHashCombineCommutative) - ret := newQtPrivate__QHashCombineCommutative(outptr_QtPrivate__QHashCombineCommutative) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QHashCombineCommutative) Delete() { - C.QtPrivate__QHashCombineCommutative_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QHashCombineCommutative) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QHashCombineCommutative) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qhashfunctions.h b/qt6/gen_qhashfunctions.h index aaae80ec..48a8f833 100644 --- a/qt6/gen_qhashfunctions.h +++ b/qt6/gen_qhashfunctions.h @@ -16,20 +16,8 @@ extern "C" { #ifdef __cplusplus class QHashSeed; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombine) -typedef QtPrivate::QHashCombine QtPrivate__QHashCombine; -#else -class QtPrivate__QHashCombine; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QHashCombineCommutative) -typedef QtPrivate::QHashCombineCommutative QtPrivate__QHashCombineCommutative; -#else -class QtPrivate__QHashCombineCommutative; -#endif #else typedef struct QHashSeed QHashSeed; -typedef struct QtPrivate__QHashCombine QtPrivate__QHashCombine; -typedef struct QtPrivate__QHashCombineCommutative QtPrivate__QHashCombineCommutative; #endif void QHashSeed_new(QHashSeed** outptr_QHashSeed); @@ -39,12 +27,6 @@ void QHashSeed_SetDeterministicGlobalSeed(); void QHashSeed_ResetRandomGlobalSeed(); void QHashSeed_Delete(QHashSeed* self, bool isSubclass); -void QtPrivate__QHashCombine_new(QtPrivate__QHashCombine** outptr_QtPrivate__QHashCombine); -void QtPrivate__QHashCombine_Delete(QtPrivate__QHashCombine* self, bool isSubclass); - -void QtPrivate__QHashCombineCommutative_new(QtPrivate__QHashCombineCommutative** outptr_QtPrivate__QHashCombineCommutative); -void QtPrivate__QHashCombineCommutative_Delete(QtPrivate__QHashCombineCommutative* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qkeysequenceedit.cpp b/qt6/gen_qkeysequenceedit.cpp index 3e9776c2..68249e37 100644 --- a/qt6/gen_qkeysequenceedit.cpp +++ b/qt6/gen_qkeysequenceedit.cpp @@ -845,7 +845,7 @@ class MiqtVirtualQKeySequenceEdit : public virtual QKeySequenceEdit { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QKeySequenceEdit_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qlineedit.cpp b/qt6/gen_qlineedit.cpp index fe341ff8..e4a351e4 100644 --- a/qt6/gen_qlineedit.cpp +++ b/qt6/gen_qlineedit.cpp @@ -947,7 +947,7 @@ class MiqtVirtualQLineEdit : public virtual QLineEdit { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QLineEdit_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qmainwindow.cpp b/qt6/gen_qmainwindow.cpp index 79c56596..4844bd65 100644 --- a/qt6/gen_qmainwindow.cpp +++ b/qt6/gen_qmainwindow.cpp @@ -846,7 +846,7 @@ class MiqtVirtualQMainWindow : public virtual QMainWindow { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QMainWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qmdisubwindow.cpp b/qt6/gen_qmdisubwindow.cpp index 5193f759..0c7c06ac 100644 --- a/qt6/gen_qmdisubwindow.cpp +++ b/qt6/gen_qmdisubwindow.cpp @@ -918,7 +918,7 @@ class MiqtVirtualQMdiSubWindow : public virtual QMdiSubWindow { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QMdiSubWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qmenu.cpp b/qt6/gen_qmenu.cpp index a83800d8..179b945a 100644 --- a/qt6/gen_qmenu.cpp +++ b/qt6/gen_qmenu.cpp @@ -921,7 +921,7 @@ class MiqtVirtualQMenu : public virtual QMenu { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QMenu_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qmenubar.cpp b/qt6/gen_qmenubar.cpp index 8973c1f4..5026b400 100644 --- a/qt6/gen_qmenubar.cpp +++ b/qt6/gen_qmenubar.cpp @@ -920,7 +920,7 @@ class MiqtVirtualQMenuBar : public virtual QMenuBar { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QMenuBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qmetacontainer.cpp b/qt6/gen_qmetacontainer.cpp index 60f94663..08ba5165 100644 --- a/qt6/gen_qmetacontainer.cpp +++ b/qt6/gen_qmetacontainer.cpp @@ -2,65 +2,16 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaContainerPrivate__QMetaAssociationInterface -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaContainerPrivate__QMetaContainerInterface -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaContainerPrivate__QMetaSequenceInterface #include #include "gen_qmetacontainer.h" #include "_cgo_export.h" -void QtMetaContainerPrivate__QMetaContainerInterface_new(QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface) { - QtMetaContainerPrivate::QMetaContainerInterface* ret = new QtMetaContainerPrivate::QMetaContainerInterface(); - *outptr_QtMetaContainerPrivate__QMetaContainerInterface = ret; -} - -void QtMetaContainerPrivate__QMetaContainerInterface_Delete(QtMetaContainerPrivate__QMetaContainerInterface* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtMetaContainerPrivate__QMetaSequenceInterface_new(QtMetaContainerPrivate__QMetaSequenceInterface** outptr_QtMetaContainerPrivate__QMetaSequenceInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface) { - QtMetaContainerPrivate::QMetaSequenceInterface* ret = new QtMetaContainerPrivate::QMetaSequenceInterface(); - *outptr_QtMetaContainerPrivate__QMetaSequenceInterface = ret; - *outptr_QtMetaContainerPrivate::QMetaContainerInterface = static_cast(ret); -} - -void QtMetaContainerPrivate__QMetaSequenceInterface_Delete(QtMetaContainerPrivate__QMetaSequenceInterface* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtMetaContainerPrivate__QMetaAssociationInterface_new(QtMetaContainerPrivate__QMetaAssociationInterface** outptr_QtMetaContainerPrivate__QMetaAssociationInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface) { - QtMetaContainerPrivate::QMetaAssociationInterface* ret = new QtMetaContainerPrivate::QMetaAssociationInterface(); - *outptr_QtMetaContainerPrivate__QMetaAssociationInterface = ret; - *outptr_QtMetaContainerPrivate::QMetaContainerInterface = static_cast(ret); -} - -void QtMetaContainerPrivate__QMetaAssociationInterface_Delete(QtMetaContainerPrivate__QMetaAssociationInterface* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QMetaContainer_new(QMetaContainer** outptr_QMetaContainer) { QMetaContainer* ret = new QMetaContainer(); *outptr_QMetaContainer = ret; } -void QMetaContainer_new2(QtMetaContainerPrivate__QMetaContainerInterface* d, QMetaContainer** outptr_QMetaContainer) { - QMetaContainer* ret = new QMetaContainer(d); - *outptr_QMetaContainer = ret; -} - -void QMetaContainer_new3(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer) { +void QMetaContainer_new2(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer) { QMetaContainer* ret = new QMetaContainer(*param1); *outptr_QMetaContainer = ret; } @@ -178,12 +129,6 @@ void QMetaSequence_new(QMetaSequence** outptr_QMetaSequence, QMetaContainer** ou *outptr_QMetaContainer = static_cast(ret); } -void QMetaSequence_new2(QtMetaContainerPrivate__QMetaSequenceInterface* d, QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer) { - QMetaSequence* ret = new QMetaSequence(d); - *outptr_QMetaSequence = ret; - *outptr_QMetaContainer = static_cast(ret); -} - QMetaType* QMetaSequence_ValueMetaType(const QMetaSequence* self) { return new QMetaType(self->valueMetaType()); } @@ -318,12 +263,6 @@ void QMetaAssociation_new(QMetaAssociation** outptr_QMetaAssociation, QMetaConta *outptr_QMetaContainer = static_cast(ret); } -void QMetaAssociation_new2(QtMetaContainerPrivate__QMetaAssociationInterface* d, QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer) { - QMetaAssociation* ret = new QMetaAssociation(d); - *outptr_QMetaAssociation = ret; - *outptr_QMetaContainer = static_cast(ret); -} - QMetaType* QMetaAssociation_KeyMetaType(const QMetaAssociation* self) { return new QMetaType(self->keyMetaType()); } diff --git a/qt6/gen_qmetacontainer.go b/qt6/gen_qmetacontainer.go index abcbe919..6d816e90 100644 --- a/qt6/gen_qmetacontainer.go +++ b/qt6/gen_qmetacontainer.go @@ -13,807 +13,555 @@ import ( "unsafe" ) - type QtMetaContainerPrivate__IteratorCapability byte - const ( -QtMetaContainerPrivate__InputCapability QtMetaContainerPrivate__IteratorCapability = 1 -QtMetaContainerPrivate__ForwardCapability QtMetaContainerPrivate__IteratorCapability = 2 -QtMetaContainerPrivate__BiDirectionalCapability QtMetaContainerPrivate__IteratorCapability = 4 -QtMetaContainerPrivate__RandomAccessCapability QtMetaContainerPrivate__IteratorCapability = 8 +type QtMetaContainerPrivate__IteratorCapability byte +const ( + QtMetaContainerPrivate__InputCapability QtMetaContainerPrivate__IteratorCapability = 1 + QtMetaContainerPrivate__ForwardCapability QtMetaContainerPrivate__IteratorCapability = 2 + QtMetaContainerPrivate__BiDirectionalCapability QtMetaContainerPrivate__IteratorCapability = 4 + QtMetaContainerPrivate__RandomAccessCapability QtMetaContainerPrivate__IteratorCapability = 8 ) +type QtMetaContainerPrivate__AddRemoveCapability byte - type QtMetaContainerPrivate__AddRemoveCapability byte - const ( -QtMetaContainerPrivate__CanAddAtBegin QtMetaContainerPrivate__AddRemoveCapability = 1 -QtMetaContainerPrivate__CanRemoveAtBegin QtMetaContainerPrivate__AddRemoveCapability = 2 -QtMetaContainerPrivate__CanAddAtEnd QtMetaContainerPrivate__AddRemoveCapability = 4 -QtMetaContainerPrivate__CanRemoveAtEnd QtMetaContainerPrivate__AddRemoveCapability = 8 +const ( + QtMetaContainerPrivate__CanAddAtBegin QtMetaContainerPrivate__AddRemoveCapability = 1 + QtMetaContainerPrivate__CanRemoveAtBegin QtMetaContainerPrivate__AddRemoveCapability = 2 + QtMetaContainerPrivate__CanAddAtEnd QtMetaContainerPrivate__AddRemoveCapability = 4 + QtMetaContainerPrivate__CanRemoveAtEnd QtMetaContainerPrivate__AddRemoveCapability = 8 +) + +type QtMetaContainerPrivate__QMetaContainerInterface__Position byte +const ( + QtMetaContainerPrivate__QMetaContainerInterface__AtBegin QtMetaContainerPrivate__QMetaContainerInterface__Position = 0 + QtMetaContainerPrivate__QMetaContainerInterface__AtEnd QtMetaContainerPrivate__QMetaContainerInterface__Position = 1 + QtMetaContainerPrivate__QMetaContainerInterface__Unspecified QtMetaContainerPrivate__QMetaContainerInterface__Position = 2 ) +type QMetaContainer struct { + h *C.QMetaContainer + isSubclass bool +} - type QtMetaContainerPrivate__QMetaContainerInterface__Position byte - const ( -QtMetaContainerPrivate__QMetaContainerInterface__AtBegin QtMetaContainerPrivate__QMetaContainerInterface__Position = 0 -QtMetaContainerPrivate__QMetaContainerInterface__AtEnd QtMetaContainerPrivate__QMetaContainerInterface__Position = 1 -QtMetaContainerPrivate__QMetaContainerInterface__Unspecified QtMetaContainerPrivate__QMetaContainerInterface__Position = 2 +func (this *QMetaContainer) cPointer() *C.QMetaContainer { + if this == nil { + return nil + } + return this.h +} -) +func (this *QMetaContainer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQMetaContainer constructs the type using only CGO pointers. +func newQMetaContainer(h *C.QMetaContainer) *QMetaContainer { + if h == nil { + return nil + } + return &QMetaContainer{h: h} +} + +// UnsafeNewQMetaContainer constructs the type using only unsafe pointers. +func UnsafeNewQMetaContainer(h unsafe.Pointer) *QMetaContainer { + if h == nil { + return nil + } + + return &QMetaContainer{h: (*C.QMetaContainer)(h)} +} + +// NewQMetaContainer constructs a new QMetaContainer object. +func NewQMetaContainer() *QMetaContainer { + var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaContainer_new(&outptr_QMetaContainer) + ret := newQMetaContainer(outptr_QMetaContainer) + ret.isSubclass = true + return ret +} + +// NewQMetaContainer2 constructs a new QMetaContainer object. +func NewQMetaContainer2(param1 *QMetaContainer) *QMetaContainer { + var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaContainer_new2(param1.cPointer(), &outptr_QMetaContainer) + ret := newQMetaContainer(outptr_QMetaContainer) + ret.isSubclass = true + return ret +} + +func (this *QMetaContainer) HasInputIterator() bool { + return (bool)(C.QMetaContainer_HasInputIterator(this.h)) +} + +func (this *QMetaContainer) HasForwardIterator() bool { + return (bool)(C.QMetaContainer_HasForwardIterator(this.h)) +} + +func (this *QMetaContainer) HasBidirectionalIterator() bool { + return (bool)(C.QMetaContainer_HasBidirectionalIterator(this.h)) +} + +func (this *QMetaContainer) HasRandomAccessIterator() bool { + return (bool)(C.QMetaContainer_HasRandomAccessIterator(this.h)) +} + +func (this *QMetaContainer) HasSize() bool { + return (bool)(C.QMetaContainer_HasSize(this.h)) +} + +func (this *QMetaContainer) Size(container unsafe.Pointer) int64 { + return (int64)(C.QMetaContainer_Size(this.h, container)) +} + +func (this *QMetaContainer) CanClear() bool { + return (bool)(C.QMetaContainer_CanClear(this.h)) +} + +func (this *QMetaContainer) Clear(container unsafe.Pointer) { + C.QMetaContainer_Clear(this.h, container) +} + +func (this *QMetaContainer) HasIterator() bool { + return (bool)(C.QMetaContainer_HasIterator(this.h)) +} + +func (this *QMetaContainer) Begin(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_Begin(this.h, container)) +} + +func (this *QMetaContainer) End(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_End(this.h, container)) +} + +func (this *QMetaContainer) DestroyIterator(iterator unsafe.Pointer) { + C.QMetaContainer_DestroyIterator(this.h, iterator) +} + +func (this *QMetaContainer) CompareIterator(i unsafe.Pointer, j unsafe.Pointer) bool { + return (bool)(C.QMetaContainer_CompareIterator(this.h, i, j)) +} + +func (this *QMetaContainer) CopyIterator(target unsafe.Pointer, source unsafe.Pointer) { + C.QMetaContainer_CopyIterator(this.h, target, source) +} + +func (this *QMetaContainer) AdvanceIterator(iterator unsafe.Pointer, step int64) { + C.QMetaContainer_AdvanceIterator(this.h, iterator, (C.ptrdiff_t)(step)) +} + +func (this *QMetaContainer) DiffIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { + return (int64)(C.QMetaContainer_DiffIterator(this.h, i, j)) +} + +func (this *QMetaContainer) HasConstIterator() bool { + return (bool)(C.QMetaContainer_HasConstIterator(this.h)) +} + +func (this *QMetaContainer) ConstBegin(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_ConstBegin(this.h, container)) +} + +func (this *QMetaContainer) ConstEnd(container unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaContainer_ConstEnd(this.h, container)) +} + +func (this *QMetaContainer) DestroyConstIterator(iterator unsafe.Pointer) { + C.QMetaContainer_DestroyConstIterator(this.h, iterator) +} + +func (this *QMetaContainer) CompareConstIterator(i unsafe.Pointer, j unsafe.Pointer) bool { + return (bool)(C.QMetaContainer_CompareConstIterator(this.h, i, j)) +} + +func (this *QMetaContainer) CopyConstIterator(target unsafe.Pointer, source unsafe.Pointer) { + C.QMetaContainer_CopyConstIterator(this.h, target, source) +} + +func (this *QMetaContainer) AdvanceConstIterator(iterator unsafe.Pointer, step int64) { + C.QMetaContainer_AdvanceConstIterator(this.h, iterator, (C.ptrdiff_t)(step)) +} + +func (this *QMetaContainer) DiffConstIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { + return (int64)(C.QMetaContainer_DiffConstIterator(this.h, i, j)) +} + +// Delete this object from C++ memory. +func (this *QMetaContainer) Delete() { + C.QMetaContainer_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QMetaContainer) GoGC() { + runtime.SetFinalizer(this, func(this *QMetaContainer) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QMetaSequence struct { + h *C.QMetaSequence + isSubclass bool + *QMetaContainer +} + +func (this *QMetaSequence) cPointer() *C.QMetaSequence { + if this == nil { + return nil + } + return this.h +} + +func (this *QMetaSequence) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQMetaSequence constructs the type using only CGO pointers. +func newQMetaSequence(h *C.QMetaSequence, h_QMetaContainer *C.QMetaContainer) *QMetaSequence { + if h == nil { + return nil + } + return &QMetaSequence{h: h, + QMetaContainer: newQMetaContainer(h_QMetaContainer)} +} + +// UnsafeNewQMetaSequence constructs the type using only unsafe pointers. +func UnsafeNewQMetaSequence(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaSequence { + if h == nil { + return nil + } + + return &QMetaSequence{h: (*C.QMetaSequence)(h), + QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} +} + +// NewQMetaSequence constructs a new QMetaSequence object. +func NewQMetaSequence() *QMetaSequence { + var outptr_QMetaSequence *C.QMetaSequence = nil + var outptr_QMetaContainer *C.QMetaContainer = nil + C.QMetaSequence_new(&outptr_QMetaSequence, &outptr_QMetaContainer) + ret := newQMetaSequence(outptr_QMetaSequence, outptr_QMetaContainer) + ret.isSubclass = true + return ret +} + +func (this *QMetaSequence) ValueMetaType() *QMetaType { + _ret := C.QMetaSequence_ValueMetaType(this.h) + _goptr := newQMetaType(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QMetaSequence) IsSortable() bool { + return (bool)(C.QMetaSequence_IsSortable(this.h)) +} + +func (this *QMetaSequence) CanAddValueAtBegin() bool { + return (bool)(C.QMetaSequence_CanAddValueAtBegin(this.h)) +} + +func (this *QMetaSequence) AddValueAtBegin(container unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_AddValueAtBegin(this.h, container, value) +} + +func (this *QMetaSequence) CanAddValueAtEnd() bool { + return (bool)(C.QMetaSequence_CanAddValueAtEnd(this.h)) +} + +func (this *QMetaSequence) AddValueAtEnd(container unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_AddValueAtEnd(this.h, container, value) +} + +func (this *QMetaSequence) CanRemoveValueAtBegin() bool { + return (bool)(C.QMetaSequence_CanRemoveValueAtBegin(this.h)) +} + +func (this *QMetaSequence) RemoveValueAtBegin(container unsafe.Pointer) { + C.QMetaSequence_RemoveValueAtBegin(this.h, container) +} + +func (this *QMetaSequence) CanRemoveValueAtEnd() bool { + return (bool)(C.QMetaSequence_CanRemoveValueAtEnd(this.h)) +} + +func (this *QMetaSequence) RemoveValueAtEnd(container unsafe.Pointer) { + C.QMetaSequence_RemoveValueAtEnd(this.h, container) +} + +func (this *QMetaSequence) CanGetValueAtIndex() bool { + return (bool)(C.QMetaSequence_CanGetValueAtIndex(this.h)) +} + +func (this *QMetaSequence) ValueAtIndex(container unsafe.Pointer, index int64, result unsafe.Pointer) { + C.QMetaSequence_ValueAtIndex(this.h, container, (C.ptrdiff_t)(index), result) +} + +func (this *QMetaSequence) CanSetValueAtIndex() bool { + return (bool)(C.QMetaSequence_CanSetValueAtIndex(this.h)) +} - type QtMetaContainerPrivate__QMetaContainerInterface struct { - h *C.QtMetaContainerPrivate__QMetaContainerInterface - isSubclass bool - - } - - func (this *QtMetaContainerPrivate__QMetaContainerInterface) cPointer() *C.QtMetaContainerPrivate__QMetaContainerInterface { - if this == nil { - return nil - } - return this.h - } - - func (this *QtMetaContainerPrivate__QMetaContainerInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQtMetaContainerPrivate__QMetaContainerInterface constructs the type using only CGO pointers. - func newQtMetaContainerPrivate__QMetaContainerInterface(h *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaContainerInterface { - if h == nil { - return nil - } - return &QtMetaContainerPrivate__QMetaContainerInterface{h: h} - } - - // UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface constructs the type using only unsafe pointers. - func UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h unsafe.Pointer) *QtMetaContainerPrivate__QMetaContainerInterface { - if h == nil { - return nil - } - - return &QtMetaContainerPrivate__QMetaContainerInterface{h: (*C.QtMetaContainerPrivate__QMetaContainerInterface)(h)} - } - - - // NewQtMetaContainerPrivate__QMetaContainerInterface constructs a new QtMetaContainerPrivate::QMetaContainerInterface object. - func NewQtMetaContainerPrivate__QMetaContainerInterface() *QtMetaContainerPrivate__QMetaContainerInterface { - var outptr_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate__QMetaContainerInterface = nil - - C.QtMetaContainerPrivate__QMetaContainerInterface_new(&outptr_QtMetaContainerPrivate__QMetaContainerInterface) - ret := newQtMetaContainerPrivate__QMetaContainerInterface(outptr_QtMetaContainerPrivate__QMetaContainerInterface) - ret.isSubclass = true - return ret - } - - - // Delete this object from C++ memory. - func (this *QtMetaContainerPrivate__QMetaContainerInterface) Delete() { - C.QtMetaContainerPrivate__QMetaContainerInterface_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QtMetaContainerPrivate__QMetaContainerInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaContainerInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - - type QtMetaContainerPrivate__QMetaSequenceInterface struct { - h *C.QtMetaContainerPrivate__QMetaSequenceInterface - isSubclass bool - *QtMetaContainerPrivate__QMetaContainerInterface - - } - - func (this *QtMetaContainerPrivate__QMetaSequenceInterface) cPointer() *C.QtMetaContainerPrivate__QMetaSequenceInterface { - if this == nil { - return nil - } - return this.h - } - - func (this *QtMetaContainerPrivate__QMetaSequenceInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQtMetaContainerPrivate__QMetaSequenceInterface constructs the type using only CGO pointers. - func newQtMetaContainerPrivate__QMetaSequenceInterface(h *C.QtMetaContainerPrivate__QMetaSequenceInterface, h_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaSequenceInterface { - if h == nil { - return nil - } - return &QtMetaContainerPrivate__QMetaSequenceInterface{h: h, -QtMetaContainerPrivate__QMetaContainerInterface: newQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} - } - - // UnsafeNewQtMetaContainerPrivate__QMetaSequenceInterface constructs the type using only unsafe pointers. - func UnsafeNewQtMetaContainerPrivate__QMetaSequenceInterface(h unsafe.Pointer, h_QtMetaContainerPrivate__QMetaContainerInterface unsafe.Pointer) *QtMetaContainerPrivate__QMetaSequenceInterface { - if h == nil { - return nil - } - - return &QtMetaContainerPrivate__QMetaSequenceInterface{h: (*C.QtMetaContainerPrivate__QMetaSequenceInterface)(h), -QtMetaContainerPrivate__QMetaContainerInterface: UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} - } - - - // NewQtMetaContainerPrivate__QMetaSequenceInterface constructs a new QtMetaContainerPrivate::QMetaSequenceInterface object. - func NewQtMetaContainerPrivate__QMetaSequenceInterface() *QtMetaContainerPrivate__QMetaSequenceInterface { - var outptr_QtMetaContainerPrivate__QMetaSequenceInterface *C.QtMetaContainerPrivate__QMetaSequenceInterface = nil -var outptr_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate::QMetaContainerInterface = nil - - C.QtMetaContainerPrivate__QMetaSequenceInterface_new(&outptr_QtMetaContainerPrivate__QMetaSequenceInterface, &outptr_QtMetaContainerPrivate__QMetaContainerInterface) - ret := newQtMetaContainerPrivate__QMetaSequenceInterface(outptr_QtMetaContainerPrivate__QMetaSequenceInterface, outptr_QtMetaContainerPrivate__QMetaContainerInterface) - ret.isSubclass = true - return ret - } - - - // Delete this object from C++ memory. - func (this *QtMetaContainerPrivate__QMetaSequenceInterface) Delete() { - C.QtMetaContainerPrivate__QMetaSequenceInterface_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QtMetaContainerPrivate__QMetaSequenceInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaSequenceInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - - type QtMetaContainerPrivate__QMetaAssociationInterface struct { - h *C.QtMetaContainerPrivate__QMetaAssociationInterface - isSubclass bool - *QtMetaContainerPrivate__QMetaContainerInterface - - } - - func (this *QtMetaContainerPrivate__QMetaAssociationInterface) cPointer() *C.QtMetaContainerPrivate__QMetaAssociationInterface { - if this == nil { - return nil - } - return this.h - } - - func (this *QtMetaContainerPrivate__QMetaAssociationInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQtMetaContainerPrivate__QMetaAssociationInterface constructs the type using only CGO pointers. - func newQtMetaContainerPrivate__QMetaAssociationInterface(h *C.QtMetaContainerPrivate__QMetaAssociationInterface, h_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate__QMetaContainerInterface) *QtMetaContainerPrivate__QMetaAssociationInterface { - if h == nil { - return nil - } - return &QtMetaContainerPrivate__QMetaAssociationInterface{h: h, -QtMetaContainerPrivate__QMetaContainerInterface: newQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} - } - - // UnsafeNewQtMetaContainerPrivate__QMetaAssociationInterface constructs the type using only unsafe pointers. - func UnsafeNewQtMetaContainerPrivate__QMetaAssociationInterface(h unsafe.Pointer, h_QtMetaContainerPrivate__QMetaContainerInterface unsafe.Pointer) *QtMetaContainerPrivate__QMetaAssociationInterface { - if h == nil { - return nil - } - - return &QtMetaContainerPrivate__QMetaAssociationInterface{h: (*C.QtMetaContainerPrivate__QMetaAssociationInterface)(h), -QtMetaContainerPrivate__QMetaContainerInterface: UnsafeNewQtMetaContainerPrivate__QMetaContainerInterface(h_QtMetaContainerPrivate__QMetaContainerInterface)} - } - - - // NewQtMetaContainerPrivate__QMetaAssociationInterface constructs a new QtMetaContainerPrivate::QMetaAssociationInterface object. - func NewQtMetaContainerPrivate__QMetaAssociationInterface() *QtMetaContainerPrivate__QMetaAssociationInterface { - var outptr_QtMetaContainerPrivate__QMetaAssociationInterface *C.QtMetaContainerPrivate__QMetaAssociationInterface = nil -var outptr_QtMetaContainerPrivate__QMetaContainerInterface *C.QtMetaContainerPrivate::QMetaContainerInterface = nil - - C.QtMetaContainerPrivate__QMetaAssociationInterface_new(&outptr_QtMetaContainerPrivate__QMetaAssociationInterface, &outptr_QtMetaContainerPrivate__QMetaContainerInterface) - ret := newQtMetaContainerPrivate__QMetaAssociationInterface(outptr_QtMetaContainerPrivate__QMetaAssociationInterface, outptr_QtMetaContainerPrivate__QMetaContainerInterface) - ret.isSubclass = true - return ret - } - - - // Delete this object from C++ memory. - func (this *QtMetaContainerPrivate__QMetaAssociationInterface) Delete() { - C.QtMetaContainerPrivate__QMetaAssociationInterface_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QtMetaContainerPrivate__QMetaAssociationInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaContainerPrivate__QMetaAssociationInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - - type QMetaContainer struct { - h *C.QMetaContainer - isSubclass bool - - } - - func (this *QMetaContainer) cPointer() *C.QMetaContainer { - if this == nil { - return nil - } - return this.h - } - - func (this *QMetaContainer) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQMetaContainer constructs the type using only CGO pointers. - func newQMetaContainer(h *C.QMetaContainer) *QMetaContainer { - if h == nil { - return nil - } - return &QMetaContainer{h: h} - } - - // UnsafeNewQMetaContainer constructs the type using only unsafe pointers. - func UnsafeNewQMetaContainer(h unsafe.Pointer) *QMetaContainer { - if h == nil { - return nil - } - - return &QMetaContainer{h: (*C.QMetaContainer)(h)} - } - - - // NewQMetaContainer constructs a new QMetaContainer object. - func NewQMetaContainer() *QMetaContainer { - var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaContainer_new(&outptr_QMetaContainer) - ret := newQMetaContainer(outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - // NewQMetaContainer2 constructs a new QMetaContainer object. - func NewQMetaContainer2(d *QtMetaContainerPrivate__QMetaContainerInterface) *QMetaContainer { - var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaContainer_new2(d.cPointer(), &outptr_QMetaContainer) - ret := newQMetaContainer(outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - // NewQMetaContainer3 constructs a new QMetaContainer object. - func NewQMetaContainer3(param1 *QMetaContainer) *QMetaContainer { - var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaContainer_new3(param1.cPointer(), &outptr_QMetaContainer) - ret := newQMetaContainer(outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - func (this *QMetaContainer) HasInputIterator() bool { - return (bool)(C.QMetaContainer_HasInputIterator(this.h)) -} - - func (this *QMetaContainer) HasForwardIterator() bool { - return (bool)(C.QMetaContainer_HasForwardIterator(this.h)) -} - - func (this *QMetaContainer) HasBidirectionalIterator() bool { - return (bool)(C.QMetaContainer_HasBidirectionalIterator(this.h)) -} - - func (this *QMetaContainer) HasRandomAccessIterator() bool { - return (bool)(C.QMetaContainer_HasRandomAccessIterator(this.h)) -} - - func (this *QMetaContainer) HasSize() bool { - return (bool)(C.QMetaContainer_HasSize(this.h)) -} - - func (this *QMetaContainer) Size(container unsafe.Pointer) int64 { - return (int64)(C.QMetaContainer_Size(this.h, container)) -} - - func (this *QMetaContainer) CanClear() bool { - return (bool)(C.QMetaContainer_CanClear(this.h)) -} - - func (this *QMetaContainer) Clear(container unsafe.Pointer) { - C.QMetaContainer_Clear(this.h, container) -} - - func (this *QMetaContainer) HasIterator() bool { - return (bool)(C.QMetaContainer_HasIterator(this.h)) -} - - func (this *QMetaContainer) Begin(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_Begin(this.h, container)) -} - - func (this *QMetaContainer) End(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_End(this.h, container)) -} - - func (this *QMetaContainer) DestroyIterator(iterator unsafe.Pointer) { - C.QMetaContainer_DestroyIterator(this.h, iterator) -} - - func (this *QMetaContainer) CompareIterator(i unsafe.Pointer, j unsafe.Pointer) bool { - return (bool)(C.QMetaContainer_CompareIterator(this.h, i, j)) -} - - func (this *QMetaContainer) CopyIterator(target unsafe.Pointer, source unsafe.Pointer) { - C.QMetaContainer_CopyIterator(this.h, target, source) -} - - func (this *QMetaContainer) AdvanceIterator(iterator unsafe.Pointer, step int64) { - C.QMetaContainer_AdvanceIterator(this.h, iterator, (C.ptrdiff_t)(step)) -} - - func (this *QMetaContainer) DiffIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { - return (int64)(C.QMetaContainer_DiffIterator(this.h, i, j)) -} - - func (this *QMetaContainer) HasConstIterator() bool { - return (bool)(C.QMetaContainer_HasConstIterator(this.h)) -} - - func (this *QMetaContainer) ConstBegin(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_ConstBegin(this.h, container)) -} - - func (this *QMetaContainer) ConstEnd(container unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaContainer_ConstEnd(this.h, container)) -} - - func (this *QMetaContainer) DestroyConstIterator(iterator unsafe.Pointer) { - C.QMetaContainer_DestroyConstIterator(this.h, iterator) -} - - func (this *QMetaContainer) CompareConstIterator(i unsafe.Pointer, j unsafe.Pointer) bool { - return (bool)(C.QMetaContainer_CompareConstIterator(this.h, i, j)) -} - - func (this *QMetaContainer) CopyConstIterator(target unsafe.Pointer, source unsafe.Pointer) { - C.QMetaContainer_CopyConstIterator(this.h, target, source) -} - - func (this *QMetaContainer) AdvanceConstIterator(iterator unsafe.Pointer, step int64) { - C.QMetaContainer_AdvanceConstIterator(this.h, iterator, (C.ptrdiff_t)(step)) -} - - func (this *QMetaContainer) DiffConstIterator(i unsafe.Pointer, j unsafe.Pointer) int64 { - return (int64)(C.QMetaContainer_DiffConstIterator(this.h, i, j)) -} - - // Delete this object from C++ memory. - func (this *QMetaContainer) Delete() { - C.QMetaContainer_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QMetaContainer) GoGC() { - runtime.SetFinalizer(this, func(this *QMetaContainer) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - - type QMetaSequence struct { - h *C.QMetaSequence - isSubclass bool - *QMetaContainer - - } - - func (this *QMetaSequence) cPointer() *C.QMetaSequence { - if this == nil { - return nil - } - return this.h - } - - func (this *QMetaSequence) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQMetaSequence constructs the type using only CGO pointers. - func newQMetaSequence(h *C.QMetaSequence, h_QMetaContainer *C.QMetaContainer) *QMetaSequence { - if h == nil { - return nil - } - return &QMetaSequence{h: h, -QMetaContainer: newQMetaContainer(h_QMetaContainer)} - } - - // UnsafeNewQMetaSequence constructs the type using only unsafe pointers. - func UnsafeNewQMetaSequence(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaSequence { - if h == nil { - return nil - } - - return &QMetaSequence{h: (*C.QMetaSequence)(h), -QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} - } - - - // NewQMetaSequence constructs a new QMetaSequence object. - func NewQMetaSequence() *QMetaSequence { - var outptr_QMetaSequence *C.QMetaSequence = nil -var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaSequence_new(&outptr_QMetaSequence, &outptr_QMetaContainer) - ret := newQMetaSequence(outptr_QMetaSequence, outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - // NewQMetaSequence2 constructs a new QMetaSequence object. - func NewQMetaSequence2(d *QtMetaContainerPrivate__QMetaSequenceInterface) *QMetaSequence { - var outptr_QMetaSequence *C.QMetaSequence = nil -var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaSequence_new2(d.cPointer(), &outptr_QMetaSequence, &outptr_QMetaContainer) - ret := newQMetaSequence(outptr_QMetaSequence, outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - func (this *QMetaSequence) ValueMetaType() *QMetaType { - _ret := C.QMetaSequence_ValueMetaType(this.h) -_goptr := newQMetaType(_ret) -_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer -return _goptr -} - - func (this *QMetaSequence) IsSortable() bool { - return (bool)(C.QMetaSequence_IsSortable(this.h)) -} - - func (this *QMetaSequence) CanAddValueAtBegin() bool { - return (bool)(C.QMetaSequence_CanAddValueAtBegin(this.h)) -} - - func (this *QMetaSequence) AddValueAtBegin(container unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_AddValueAtBegin(this.h, container, value) -} - - func (this *QMetaSequence) CanAddValueAtEnd() bool { - return (bool)(C.QMetaSequence_CanAddValueAtEnd(this.h)) -} - - func (this *QMetaSequence) AddValueAtEnd(container unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_AddValueAtEnd(this.h, container, value) -} - - func (this *QMetaSequence) CanRemoveValueAtBegin() bool { - return (bool)(C.QMetaSequence_CanRemoveValueAtBegin(this.h)) -} - - func (this *QMetaSequence) RemoveValueAtBegin(container unsafe.Pointer) { - C.QMetaSequence_RemoveValueAtBegin(this.h, container) -} - - func (this *QMetaSequence) CanRemoveValueAtEnd() bool { - return (bool)(C.QMetaSequence_CanRemoveValueAtEnd(this.h)) -} - - func (this *QMetaSequence) RemoveValueAtEnd(container unsafe.Pointer) { - C.QMetaSequence_RemoveValueAtEnd(this.h, container) -} - - func (this *QMetaSequence) CanGetValueAtIndex() bool { - return (bool)(C.QMetaSequence_CanGetValueAtIndex(this.h)) -} - - func (this *QMetaSequence) ValueAtIndex(container unsafe.Pointer, index int64, result unsafe.Pointer) { - C.QMetaSequence_ValueAtIndex(this.h, container, (C.ptrdiff_t)(index), result) -} - - func (this *QMetaSequence) CanSetValueAtIndex() bool { - return (bool)(C.QMetaSequence_CanSetValueAtIndex(this.h)) -} - - func (this *QMetaSequence) SetValueAtIndex(container unsafe.Pointer, index int64, value unsafe.Pointer) { - C.QMetaSequence_SetValueAtIndex(this.h, container, (C.ptrdiff_t)(index), value) -} - - func (this *QMetaSequence) CanAddValue() bool { - return (bool)(C.QMetaSequence_CanAddValue(this.h)) -} - - func (this *QMetaSequence) AddValue(container unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_AddValue(this.h, container, value) -} - - func (this *QMetaSequence) CanRemoveValue() bool { - return (bool)(C.QMetaSequence_CanRemoveValue(this.h)) -} - - func (this *QMetaSequence) RemoveValue(container unsafe.Pointer) { - C.QMetaSequence_RemoveValue(this.h, container) -} - - func (this *QMetaSequence) CanGetValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanGetValueAtIterator(this.h)) -} - - func (this *QMetaSequence) ValueAtIterator(iterator unsafe.Pointer, result unsafe.Pointer) { - C.QMetaSequence_ValueAtIterator(this.h, iterator, result) -} - - func (this *QMetaSequence) CanSetValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanSetValueAtIterator(this.h)) -} - - func (this *QMetaSequence) SetValueAtIterator(iterator unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_SetValueAtIterator(this.h, iterator, value) -} - - func (this *QMetaSequence) CanInsertValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanInsertValueAtIterator(this.h)) -} - - func (this *QMetaSequence) InsertValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer, value unsafe.Pointer) { - C.QMetaSequence_InsertValueAtIterator(this.h, container, iterator, value) -} - - func (this *QMetaSequence) CanEraseValueAtIterator() bool { - return (bool)(C.QMetaSequence_CanEraseValueAtIterator(this.h)) -} - - func (this *QMetaSequence) EraseValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer) { - C.QMetaSequence_EraseValueAtIterator(this.h, container, iterator) -} - - func (this *QMetaSequence) CanEraseRangeAtIterator() bool { - return (bool)(C.QMetaSequence_CanEraseRangeAtIterator(this.h)) -} - - func (this *QMetaSequence) EraseRangeAtIterator(container unsafe.Pointer, iterator1 unsafe.Pointer, iterator2 unsafe.Pointer) { - C.QMetaSequence_EraseRangeAtIterator(this.h, container, iterator1, iterator2) -} - - func (this *QMetaSequence) CanGetValueAtConstIterator() bool { - return (bool)(C.QMetaSequence_CanGetValueAtConstIterator(this.h)) -} - - func (this *QMetaSequence) ValueAtConstIterator(iterator unsafe.Pointer, result unsafe.Pointer) { - C.QMetaSequence_ValueAtConstIterator(this.h, iterator, result) -} - - // Delete this object from C++ memory. - func (this *QMetaSequence) Delete() { - C.QMetaSequence_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QMetaSequence) GoGC() { - runtime.SetFinalizer(this, func(this *QMetaSequence) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - - type QMetaAssociation struct { - h *C.QMetaAssociation - isSubclass bool - *QMetaContainer - - } - - func (this *QMetaAssociation) cPointer() *C.QMetaAssociation { - if this == nil { - return nil - } - return this.h - } - - func (this *QMetaAssociation) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQMetaAssociation constructs the type using only CGO pointers. - func newQMetaAssociation(h *C.QMetaAssociation, h_QMetaContainer *C.QMetaContainer) *QMetaAssociation { - if h == nil { - return nil - } - return &QMetaAssociation{h: h, -QMetaContainer: newQMetaContainer(h_QMetaContainer)} - } - - // UnsafeNewQMetaAssociation constructs the type using only unsafe pointers. - func UnsafeNewQMetaAssociation(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaAssociation { - if h == nil { - return nil - } - - return &QMetaAssociation{h: (*C.QMetaAssociation)(h), -QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} - } - - - // NewQMetaAssociation constructs a new QMetaAssociation object. - func NewQMetaAssociation() *QMetaAssociation { - var outptr_QMetaAssociation *C.QMetaAssociation = nil -var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaAssociation_new(&outptr_QMetaAssociation, &outptr_QMetaContainer) - ret := newQMetaAssociation(outptr_QMetaAssociation, outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - // NewQMetaAssociation2 constructs a new QMetaAssociation object. - func NewQMetaAssociation2(d *QtMetaContainerPrivate__QMetaAssociationInterface) *QMetaAssociation { - var outptr_QMetaAssociation *C.QMetaAssociation = nil -var outptr_QMetaContainer *C.QMetaContainer = nil - - C.QMetaAssociation_new2(d.cPointer(), &outptr_QMetaAssociation, &outptr_QMetaContainer) - ret := newQMetaAssociation(outptr_QMetaAssociation, outptr_QMetaContainer) - ret.isSubclass = true - return ret - } - - - func (this *QMetaAssociation) KeyMetaType() *QMetaType { - _ret := C.QMetaAssociation_KeyMetaType(this.h) -_goptr := newQMetaType(_ret) -_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer -return _goptr -} - - func (this *QMetaAssociation) MappedMetaType() *QMetaType { - _ret := C.QMetaAssociation_MappedMetaType(this.h) -_goptr := newQMetaType(_ret) -_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer -return _goptr -} - - func (this *QMetaAssociation) CanInsertKey() bool { - return (bool)(C.QMetaAssociation_CanInsertKey(this.h)) -} - - func (this *QMetaAssociation) InsertKey(container unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_InsertKey(this.h, container, key) -} - - func (this *QMetaAssociation) CanRemoveKey() bool { - return (bool)(C.QMetaAssociation_CanRemoveKey(this.h)) -} - - func (this *QMetaAssociation) RemoveKey(container unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_RemoveKey(this.h, container, key) -} - - func (this *QMetaAssociation) CanContainsKey() bool { - return (bool)(C.QMetaAssociation_CanContainsKey(this.h)) -} - - func (this *QMetaAssociation) ContainsKey(container unsafe.Pointer, key unsafe.Pointer) bool { - return (bool)(C.QMetaAssociation_ContainsKey(this.h, container, key)) -} - - func (this *QMetaAssociation) CanGetMappedAtKey() bool { - return (bool)(C.QMetaAssociation_CanGetMappedAtKey(this.h)) -} - - func (this *QMetaAssociation) MappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_MappedAtKey(this.h, container, key, mapped) -} - - func (this *QMetaAssociation) CanSetMappedAtKey() bool { - return (bool)(C.QMetaAssociation_CanSetMappedAtKey(this.h)) -} - - func (this *QMetaAssociation) SetMappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_SetMappedAtKey(this.h, container, key, mapped) -} - - func (this *QMetaAssociation) CanGetKeyAtIterator() bool { - return (bool)(C.QMetaAssociation_CanGetKeyAtIterator(this.h)) -} - - func (this *QMetaAssociation) KeyAtIterator(iterator unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_KeyAtIterator(this.h, iterator, key) -} - - func (this *QMetaAssociation) CanGetKeyAtConstIterator() bool { - return (bool)(C.QMetaAssociation_CanGetKeyAtConstIterator(this.h)) -} - - func (this *QMetaAssociation) KeyAtConstIterator(iterator unsafe.Pointer, key unsafe.Pointer) { - C.QMetaAssociation_KeyAtConstIterator(this.h, iterator, key) -} - - func (this *QMetaAssociation) CanGetMappedAtIterator() bool { - return (bool)(C.QMetaAssociation_CanGetMappedAtIterator(this.h)) -} - - func (this *QMetaAssociation) MappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_MappedAtIterator(this.h, iterator, mapped) -} - - func (this *QMetaAssociation) CanGetMappedAtConstIterator() bool { - return (bool)(C.QMetaAssociation_CanGetMappedAtConstIterator(this.h)) -} - - func (this *QMetaAssociation) MappedAtConstIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_MappedAtConstIterator(this.h, iterator, mapped) -} - - func (this *QMetaAssociation) CanSetMappedAtIterator() bool { - return (bool)(C.QMetaAssociation_CanSetMappedAtIterator(this.h)) -} - - func (this *QMetaAssociation) SetMappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { - C.QMetaAssociation_SetMappedAtIterator(this.h, iterator, mapped) -} - - func (this *QMetaAssociation) CanCreateIteratorAtKey() bool { - return (bool)(C.QMetaAssociation_CanCreateIteratorAtKey(this.h)) -} - - func (this *QMetaAssociation) CreateIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaAssociation_CreateIteratorAtKey(this.h, container, key)) -} - - func (this *QMetaAssociation) CanCreateConstIteratorAtKey() bool { - return (bool)(C.QMetaAssociation_CanCreateConstIteratorAtKey(this.h)) -} - - func (this *QMetaAssociation) CreateConstIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { - return (unsafe.Pointer)(C.QMetaAssociation_CreateConstIteratorAtKey(this.h, container, key)) -} - - // Delete this object from C++ memory. - func (this *QMetaAssociation) Delete() { - C.QMetaAssociation_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QMetaAssociation) GoGC() { - runtime.SetFinalizer(this, func(this *QMetaAssociation) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - \ No newline at end of file +func (this *QMetaSequence) SetValueAtIndex(container unsafe.Pointer, index int64, value unsafe.Pointer) { + C.QMetaSequence_SetValueAtIndex(this.h, container, (C.ptrdiff_t)(index), value) +} + +func (this *QMetaSequence) CanAddValue() bool { + return (bool)(C.QMetaSequence_CanAddValue(this.h)) +} + +func (this *QMetaSequence) AddValue(container unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_AddValue(this.h, container, value) +} + +func (this *QMetaSequence) CanRemoveValue() bool { + return (bool)(C.QMetaSequence_CanRemoveValue(this.h)) +} + +func (this *QMetaSequence) RemoveValue(container unsafe.Pointer) { + C.QMetaSequence_RemoveValue(this.h, container) +} + +func (this *QMetaSequence) CanGetValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanGetValueAtIterator(this.h)) +} + +func (this *QMetaSequence) ValueAtIterator(iterator unsafe.Pointer, result unsafe.Pointer) { + C.QMetaSequence_ValueAtIterator(this.h, iterator, result) +} + +func (this *QMetaSequence) CanSetValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanSetValueAtIterator(this.h)) +} + +func (this *QMetaSequence) SetValueAtIterator(iterator unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_SetValueAtIterator(this.h, iterator, value) +} + +func (this *QMetaSequence) CanInsertValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanInsertValueAtIterator(this.h)) +} + +func (this *QMetaSequence) InsertValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer, value unsafe.Pointer) { + C.QMetaSequence_InsertValueAtIterator(this.h, container, iterator, value) +} + +func (this *QMetaSequence) CanEraseValueAtIterator() bool { + return (bool)(C.QMetaSequence_CanEraseValueAtIterator(this.h)) +} + +func (this *QMetaSequence) EraseValueAtIterator(container unsafe.Pointer, iterator unsafe.Pointer) { + C.QMetaSequence_EraseValueAtIterator(this.h, container, iterator) +} + +func (this *QMetaSequence) CanEraseRangeAtIterator() bool { + return (bool)(C.QMetaSequence_CanEraseRangeAtIterator(this.h)) +} + +func (this *QMetaSequence) EraseRangeAtIterator(container unsafe.Pointer, iterator1 unsafe.Pointer, iterator2 unsafe.Pointer) { + C.QMetaSequence_EraseRangeAtIterator(this.h, container, iterator1, iterator2) +} + +func (this *QMetaSequence) CanGetValueAtConstIterator() bool { + return (bool)(C.QMetaSequence_CanGetValueAtConstIterator(this.h)) +} + +func (this *QMetaSequence) ValueAtConstIterator(iterator unsafe.Pointer, result unsafe.Pointer) { + C.QMetaSequence_ValueAtConstIterator(this.h, iterator, result) +} + +// Delete this object from C++ memory. +func (this *QMetaSequence) Delete() { + C.QMetaSequence_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QMetaSequence) GoGC() { + runtime.SetFinalizer(this, func(this *QMetaSequence) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QMetaAssociation struct { + h *C.QMetaAssociation + isSubclass bool + *QMetaContainer +} + +func (this *QMetaAssociation) cPointer() *C.QMetaAssociation { + if this == nil { + return nil + } + return this.h +} + +func (this *QMetaAssociation) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQMetaAssociation constructs the type using only CGO pointers. +func newQMetaAssociation(h *C.QMetaAssociation, h_QMetaContainer *C.QMetaContainer) *QMetaAssociation { + if h == nil { + return nil + } + return &QMetaAssociation{h: h, + QMetaContainer: newQMetaContainer(h_QMetaContainer)} +} + +// UnsafeNewQMetaAssociation constructs the type using only unsafe pointers. +func UnsafeNewQMetaAssociation(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaAssociation { + if h == nil { + return nil + } + + return &QMetaAssociation{h: (*C.QMetaAssociation)(h), + QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} +} + +// NewQMetaAssociation constructs a new QMetaAssociation object. +func NewQMetaAssociation() *QMetaAssociation { + var outptr_QMetaAssociation *C.QMetaAssociation = nil + var outptr_QMetaContainer *C.QMetaContainer = nil + + C.QMetaAssociation_new(&outptr_QMetaAssociation, &outptr_QMetaContainer) + ret := newQMetaAssociation(outptr_QMetaAssociation, outptr_QMetaContainer) + ret.isSubclass = true + return ret +} + +func (this *QMetaAssociation) KeyMetaType() *QMetaType { + _ret := C.QMetaAssociation_KeyMetaType(this.h) + _goptr := newQMetaType(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QMetaAssociation) MappedMetaType() *QMetaType { + _ret := C.QMetaAssociation_MappedMetaType(this.h) + _goptr := newQMetaType(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QMetaAssociation) CanInsertKey() bool { + return (bool)(C.QMetaAssociation_CanInsertKey(this.h)) +} + +func (this *QMetaAssociation) InsertKey(container unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_InsertKey(this.h, container, key) +} + +func (this *QMetaAssociation) CanRemoveKey() bool { + return (bool)(C.QMetaAssociation_CanRemoveKey(this.h)) +} + +func (this *QMetaAssociation) RemoveKey(container unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_RemoveKey(this.h, container, key) +} + +func (this *QMetaAssociation) CanContainsKey() bool { + return (bool)(C.QMetaAssociation_CanContainsKey(this.h)) +} + +func (this *QMetaAssociation) ContainsKey(container unsafe.Pointer, key unsafe.Pointer) bool { + return (bool)(C.QMetaAssociation_ContainsKey(this.h, container, key)) +} + +func (this *QMetaAssociation) CanGetMappedAtKey() bool { + return (bool)(C.QMetaAssociation_CanGetMappedAtKey(this.h)) +} + +func (this *QMetaAssociation) MappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_MappedAtKey(this.h, container, key, mapped) +} + +func (this *QMetaAssociation) CanSetMappedAtKey() bool { + return (bool)(C.QMetaAssociation_CanSetMappedAtKey(this.h)) +} + +func (this *QMetaAssociation) SetMappedAtKey(container unsafe.Pointer, key unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_SetMappedAtKey(this.h, container, key, mapped) +} + +func (this *QMetaAssociation) CanGetKeyAtIterator() bool { + return (bool)(C.QMetaAssociation_CanGetKeyAtIterator(this.h)) +} + +func (this *QMetaAssociation) KeyAtIterator(iterator unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_KeyAtIterator(this.h, iterator, key) +} + +func (this *QMetaAssociation) CanGetKeyAtConstIterator() bool { + return (bool)(C.QMetaAssociation_CanGetKeyAtConstIterator(this.h)) +} + +func (this *QMetaAssociation) KeyAtConstIterator(iterator unsafe.Pointer, key unsafe.Pointer) { + C.QMetaAssociation_KeyAtConstIterator(this.h, iterator, key) +} + +func (this *QMetaAssociation) CanGetMappedAtIterator() bool { + return (bool)(C.QMetaAssociation_CanGetMappedAtIterator(this.h)) +} + +func (this *QMetaAssociation) MappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_MappedAtIterator(this.h, iterator, mapped) +} + +func (this *QMetaAssociation) CanGetMappedAtConstIterator() bool { + return (bool)(C.QMetaAssociation_CanGetMappedAtConstIterator(this.h)) +} + +func (this *QMetaAssociation) MappedAtConstIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_MappedAtConstIterator(this.h, iterator, mapped) +} + +func (this *QMetaAssociation) CanSetMappedAtIterator() bool { + return (bool)(C.QMetaAssociation_CanSetMappedAtIterator(this.h)) +} + +func (this *QMetaAssociation) SetMappedAtIterator(iterator unsafe.Pointer, mapped unsafe.Pointer) { + C.QMetaAssociation_SetMappedAtIterator(this.h, iterator, mapped) +} + +func (this *QMetaAssociation) CanCreateIteratorAtKey() bool { + return (bool)(C.QMetaAssociation_CanCreateIteratorAtKey(this.h)) +} + +func (this *QMetaAssociation) CreateIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaAssociation_CreateIteratorAtKey(this.h, container, key)) +} + +func (this *QMetaAssociation) CanCreateConstIteratorAtKey() bool { + return (bool)(C.QMetaAssociation_CanCreateConstIteratorAtKey(this.h)) +} + +func (this *QMetaAssociation) CreateConstIteratorAtKey(container unsafe.Pointer, key unsafe.Pointer) unsafe.Pointer { + return (unsafe.Pointer)(C.QMetaAssociation_CreateConstIteratorAtKey(this.h, container, key)) +} + +// Delete this object from C++ memory. +func (this *QMetaAssociation) Delete() { + C.QMetaAssociation_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QMetaAssociation) GoGC() { + runtime.SetFinalizer(this, func(this *QMetaAssociation) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/gen_qmetacontainer.h b/qt6/gen_qmetacontainer.h index c2703bc4..3009111a 100644 --- a/qt6/gen_qmetacontainer.h +++ b/qt6/gen_qmetacontainer.h @@ -19,43 +19,15 @@ class QMetaAssociation; class QMetaContainer; class QMetaSequence; class QMetaType; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaContainerPrivate__QMetaAssociationInterface) -typedef QtMetaContainerPrivate::QMetaAssociationInterface QtMetaContainerPrivate__QMetaAssociationInterface; -#else -class QtMetaContainerPrivate__QMetaAssociationInterface; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaContainerPrivate__QMetaContainerInterface) -typedef QtMetaContainerPrivate::QMetaContainerInterface QtMetaContainerPrivate__QMetaContainerInterface; -#else -class QtMetaContainerPrivate__QMetaContainerInterface; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaContainerPrivate__QMetaSequenceInterface) -typedef QtMetaContainerPrivate::QMetaSequenceInterface QtMetaContainerPrivate__QMetaSequenceInterface; -#else -class QtMetaContainerPrivate__QMetaSequenceInterface; -#endif #else typedef struct QMetaAssociation QMetaAssociation; typedef struct QMetaContainer QMetaContainer; typedef struct QMetaSequence QMetaSequence; typedef struct QMetaType QMetaType; -typedef struct QtMetaContainerPrivate__QMetaAssociationInterface QtMetaContainerPrivate__QMetaAssociationInterface; -typedef struct QtMetaContainerPrivate__QMetaContainerInterface QtMetaContainerPrivate__QMetaContainerInterface; -typedef struct QtMetaContainerPrivate__QMetaSequenceInterface QtMetaContainerPrivate__QMetaSequenceInterface; #endif -void QtMetaContainerPrivate__QMetaContainerInterface_new(QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface); -void QtMetaContainerPrivate__QMetaContainerInterface_Delete(QtMetaContainerPrivate__QMetaContainerInterface* self, bool isSubclass); - -void QtMetaContainerPrivate__QMetaSequenceInterface_new(QtMetaContainerPrivate__QMetaSequenceInterface** outptr_QtMetaContainerPrivate__QMetaSequenceInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface); -void QtMetaContainerPrivate__QMetaSequenceInterface_Delete(QtMetaContainerPrivate__QMetaSequenceInterface* self, bool isSubclass); - -void QtMetaContainerPrivate__QMetaAssociationInterface_new(QtMetaContainerPrivate__QMetaAssociationInterface** outptr_QtMetaContainerPrivate__QMetaAssociationInterface, QtMetaContainerPrivate__QMetaContainerInterface** outptr_QtMetaContainerPrivate__QMetaContainerInterface); -void QtMetaContainerPrivate__QMetaAssociationInterface_Delete(QtMetaContainerPrivate__QMetaAssociationInterface* self, bool isSubclass); - void QMetaContainer_new(QMetaContainer** outptr_QMetaContainer); -void QMetaContainer_new2(QtMetaContainerPrivate__QMetaContainerInterface* d, QMetaContainer** outptr_QMetaContainer); -void QMetaContainer_new3(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer); +void QMetaContainer_new2(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer); bool QMetaContainer_HasInputIterator(const QMetaContainer* self); bool QMetaContainer_HasForwardIterator(const QMetaContainer* self); bool QMetaContainer_HasBidirectionalIterator(const QMetaContainer* self); @@ -83,7 +55,6 @@ ptrdiff_t QMetaContainer_DiffConstIterator(const QMetaContainer* self, const voi void QMetaContainer_Delete(QMetaContainer* self, bool isSubclass); void QMetaSequence_new(QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer); -void QMetaSequence_new2(QtMetaContainerPrivate__QMetaSequenceInterface* d, QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer); QMetaType* QMetaSequence_ValueMetaType(const QMetaSequence* self); bool QMetaSequence_IsSortable(const QMetaSequence* self); bool QMetaSequence_CanAddValueAtBegin(const QMetaSequence* self); @@ -117,7 +88,6 @@ void QMetaSequence_ValueAtConstIterator(const QMetaSequence* self, const void* i void QMetaSequence_Delete(QMetaSequence* self, bool isSubclass); void QMetaAssociation_new(QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer); -void QMetaAssociation_new2(QtMetaContainerPrivate__QMetaAssociationInterface* d, QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer); QMetaType* QMetaAssociation_KeyMetaType(const QMetaAssociation* self); QMetaType* QMetaAssociation_MappedMetaType(const QMetaAssociation* self); bool QMetaAssociation_CanInsertKey(const QMetaAssociation* self); diff --git a/qt6/gen_qmetatype.cpp b/qt6/gen_qmetatype.cpp index f89e8c78..1ce82bea 100644 --- a/qt6/gen_qmetatype.cpp +++ b/qt6/gen_qmetatype.cpp @@ -5,21 +5,10 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QPairVariantInterfaceImpl -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QMetaTypeInterface -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QTypeNormalizer #include #include "gen_qmetatype.h" #include "_cgo_export.h" -void QtPrivate__QMetaTypeInterface_Delete(QtPrivate__QMetaTypeInterface* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QMetaType_new(int typeVal, QMetaType** outptr_QMetaType) { QMetaType* ret = new QMetaType(static_cast(typeVal)); *outptr_QMetaType = ret; @@ -265,49 +254,3 @@ void QMetaType_Delete(QMetaType* self, bool isSubclass) { } } -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { - QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(); - *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) { - QtMetaTypePrivate::QPairVariantInterfaceImpl* ret = new QtMetaTypePrivate::QPairVariantInterfaceImpl(*param1); - *outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl = ret; -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr) { - self->first(dataPtr); -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr) { - self->second(dataPtr); -} - -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -int QtPrivate__QTypeNormalizer_NormalizeTypeFromSignature(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end) { - return self->normalizeTypeFromSignature(begin, end); -} - -int QtPrivate__QTypeNormalizer_NormalizeType(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end) { - return self->normalizeType(begin, end); -} - -int QtPrivate__QTypeNormalizer_NormalizeType3(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end, bool adjustConst) { - return self->normalizeType(begin, end, adjustConst); -} - -void QtPrivate__QTypeNormalizer_Delete(QtPrivate__QTypeNormalizer* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qmetatype.go b/qt6/gen_qmetatype.go index 2b9767ff..ba2881ae 100644 --- a/qt6/gen_qmetatype.go +++ b/qt6/gen_qmetatype.go @@ -131,56 +131,6 @@ const ( QMetaType__IsConst QMetaType__TypeFlag = 8192 ) -type QtPrivate__QMetaTypeInterface struct { - h *C.QtPrivate__QMetaTypeInterface - isSubclass bool -} - -func (this *QtPrivate__QMetaTypeInterface) cPointer() *C.QtPrivate__QMetaTypeInterface { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QMetaTypeInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QMetaTypeInterface constructs the type using only CGO pointers. -func newQtPrivate__QMetaTypeInterface(h *C.QtPrivate__QMetaTypeInterface) *QtPrivate__QMetaTypeInterface { - if h == nil { - return nil - } - return &QtPrivate__QMetaTypeInterface{h: h} -} - -// UnsafeNewQtPrivate__QMetaTypeInterface constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QMetaTypeInterface(h unsafe.Pointer) *QtPrivate__QMetaTypeInterface { - if h == nil { - return nil - } - - return &QtPrivate__QMetaTypeInterface{h: (*C.QtPrivate__QMetaTypeInterface)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QMetaTypeInterface) Delete() { - C.QtPrivate__QMetaTypeInterface_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QMetaTypeInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QMetaTypeInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QMetaType struct { h *C.QMetaType isSubclass bool @@ -492,155 +442,3 @@ func (this *QMetaType) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtMetaTypePrivate__QPairVariantInterfaceImpl struct { - h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl - isSubclass bool -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) cPointer() *C.QtMetaTypePrivate__QPairVariantInterfaceImpl { - if this == nil { - return nil - } - return this.h -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only CGO pointers. -func newQtMetaTypePrivate__QPairVariantInterfaceImpl(h *C.QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - if h == nil { - return nil - } - return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: h} -} - -// UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs the type using only unsafe pointers. -func UnsafeNewQtMetaTypePrivate__QPairVariantInterfaceImpl(h unsafe.Pointer) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - if h == nil { - return nil - } - - return &QtMetaTypePrivate__QPairVariantInterfaceImpl{h: (*C.QtMetaTypePrivate__QPairVariantInterfaceImpl)(h)} -} - -// NewQtMetaTypePrivate__QPairVariantInterfaceImpl constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. -func NewQtMetaTypePrivate__QPairVariantInterfaceImpl() *QtMetaTypePrivate__QPairVariantInterfaceImpl { - var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil - - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new(&outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret.isSubclass = true - return ret -} - -// NewQtMetaTypePrivate__QPairVariantInterfaceImpl2 constructs a new QtMetaTypePrivate::QPairVariantInterfaceImpl object. -func NewQtMetaTypePrivate__QPairVariantInterfaceImpl2(param1 *QtMetaTypePrivate__QPairVariantInterfaceImpl) *QtMetaTypePrivate__QPairVariantInterfaceImpl { - var outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl *C.QtMetaTypePrivate__QPairVariantInterfaceImpl = nil - - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(param1.cPointer(), &outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret := newQtMetaTypePrivate__QPairVariantInterfaceImpl(outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl) - ret.isSubclass = true - return ret -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) First(dataPtr unsafe.Pointer) { - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_First(this.h, dataPtr) -} - -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Second(dataPtr unsafe.Pointer) { - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(this.h, dataPtr) -} - -// Delete this object from C++ memory. -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) Delete() { - C.QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtMetaTypePrivate__QPairVariantInterfaceImpl) GoGC() { - runtime.SetFinalizer(this, func(this *QtMetaTypePrivate__QPairVariantInterfaceImpl) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__QTypeNormalizer struct { - h *C.QtPrivate__QTypeNormalizer - isSubclass bool -} - -func (this *QtPrivate__QTypeNormalizer) cPointer() *C.QtPrivate__QTypeNormalizer { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QTypeNormalizer) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QTypeNormalizer constructs the type using only CGO pointers. -func newQtPrivate__QTypeNormalizer(h *C.QtPrivate__QTypeNormalizer) *QtPrivate__QTypeNormalizer { - if h == nil { - return nil - } - return &QtPrivate__QTypeNormalizer{h: h} -} - -// UnsafeNewQtPrivate__QTypeNormalizer constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QTypeNormalizer(h unsafe.Pointer) *QtPrivate__QTypeNormalizer { - if h == nil { - return nil - } - - return &QtPrivate__QTypeNormalizer{h: (*C.QtPrivate__QTypeNormalizer)(h)} -} - -func (this *QtPrivate__QTypeNormalizer) NormalizeTypeFromSignature(begin string, end string) int { - begin_Cstring := C.CString(begin) - defer C.free(unsafe.Pointer(begin_Cstring)) - end_Cstring := C.CString(end) - defer C.free(unsafe.Pointer(end_Cstring)) - return (int)(C.QtPrivate__QTypeNormalizer_NormalizeTypeFromSignature(this.h, begin_Cstring, end_Cstring)) -} - -func (this *QtPrivate__QTypeNormalizer) NormalizeType(begin string, end string) int { - begin_Cstring := C.CString(begin) - defer C.free(unsafe.Pointer(begin_Cstring)) - end_Cstring := C.CString(end) - defer C.free(unsafe.Pointer(end_Cstring)) - return (int)(C.QtPrivate__QTypeNormalizer_NormalizeType(this.h, begin_Cstring, end_Cstring)) -} - -func (this *QtPrivate__QTypeNormalizer) NormalizeType3(begin string, end string, adjustConst bool) int { - begin_Cstring := C.CString(begin) - defer C.free(unsafe.Pointer(begin_Cstring)) - end_Cstring := C.CString(end) - defer C.free(unsafe.Pointer(end_Cstring)) - return (int)(C.QtPrivate__QTypeNormalizer_NormalizeType3(this.h, begin_Cstring, end_Cstring, (C.bool)(adjustConst))) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QTypeNormalizer) Delete() { - C.QtPrivate__QTypeNormalizer_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QTypeNormalizer) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QTypeNormalizer) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qmetatype.h b/qt6/gen_qmetatype.h index 3d2e32d9..8baabcec 100644 --- a/qt6/gen_qmetatype.h +++ b/qt6/gen_qmetatype.h @@ -22,21 +22,6 @@ class QDebug; class QMetaObject; class QMetaType; class QPartialOrdering; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtMetaTypePrivate__QPairVariantInterfaceImpl) -typedef QtMetaTypePrivate::QPairVariantInterfaceImpl QtMetaTypePrivate__QPairVariantInterfaceImpl; -#else -class QtMetaTypePrivate__QPairVariantInterfaceImpl; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QMetaTypeInterface) -typedef QtPrivate::QMetaTypeInterface QtPrivate__QMetaTypeInterface; -#else -class QtPrivate__QMetaTypeInterface; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QTypeNormalizer) -typedef QtPrivate::QTypeNormalizer QtPrivate__QTypeNormalizer; -#else -class QtPrivate__QTypeNormalizer; -#endif #else typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; @@ -45,13 +30,8 @@ typedef struct QDebug QDebug; typedef struct QMetaObject QMetaObject; typedef struct QMetaType QMetaType; typedef struct QPartialOrdering QPartialOrdering; -typedef struct QtMetaTypePrivate__QPairVariantInterfaceImpl QtMetaTypePrivate__QPairVariantInterfaceImpl; -typedef struct QtPrivate__QMetaTypeInterface QtPrivate__QMetaTypeInterface; -typedef struct QtPrivate__QTypeNormalizer QtPrivate__QTypeNormalizer; #endif -void QtPrivate__QMetaTypeInterface_Delete(QtPrivate__QMetaTypeInterface* self, bool isSubclass); - void QMetaType_new(int typeVal, QMetaType** outptr_QMetaType); void QMetaType_new2(QMetaType** outptr_QMetaType); void QMetaType_new3(QMetaType* param1, QMetaType** outptr_QMetaType); @@ -111,17 +91,6 @@ void* QMetaType_Create1(const QMetaType* self, const void* copyVal); void* QMetaType_Construct2(const QMetaType* self, void* where, const void* copyVal); void QMetaType_Delete(QMetaType* self, bool isSubclass); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new(QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_new2(QtMetaTypePrivate__QPairVariantInterfaceImpl* param1, QtMetaTypePrivate__QPairVariantInterfaceImpl** outptr_QtMetaTypePrivate__QPairVariantInterfaceImpl); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_First(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Second(const QtMetaTypePrivate__QPairVariantInterfaceImpl* self, void* dataPtr); -void QtMetaTypePrivate__QPairVariantInterfaceImpl_Delete(QtMetaTypePrivate__QPairVariantInterfaceImpl* self, bool isSubclass); - -int QtPrivate__QTypeNormalizer_NormalizeTypeFromSignature(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end); -int QtPrivate__QTypeNormalizer_NormalizeType(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end); -int QtPrivate__QTypeNormalizer_NormalizeType3(QtPrivate__QTypeNormalizer* self, const char* begin, const char* end, bool adjustConst); -void QtPrivate__QTypeNormalizer_Delete(QtPrivate__QTypeNormalizer* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qnamespace.cpp b/qt6/gen_qnamespace.cpp index 380d30e5..32ece54f 100644 --- a/qt6/gen_qnamespace.cpp +++ b/qt6/gen_qnamespace.cpp @@ -5,12 +5,12 @@ #include "gen_qnamespace.h" #include "_cgo_export.h" -void Disambiguated_t_new(Disambiguated_t** outptr_Qt__Disambiguated_t) { +void Disambiguated_t_new(Disambiguated_t** outptr_Disambiguated_t) { Qt::Disambiguated_t* ret = new Qt::Disambiguated_t(); *outptr_Disambiguated_t = ret; } -void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Qt__Disambiguated_t) { +void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Disambiguated_t) { Qt::Disambiguated_t* ret = new Qt::Disambiguated_t(*param1); *outptr_Disambiguated_t = ret; } diff --git a/qt6/gen_qnamespace.h b/qt6/gen_qnamespace.h index 87253b56..d1874802 100644 --- a/qt6/gen_qnamespace.h +++ b/qt6/gen_qnamespace.h @@ -28,8 +28,8 @@ typedef struct QKeyCombination QKeyCombination; typedef struct Disambiguated_t Disambiguated_t; #endif -void Disambiguated_t_new(Disambiguated_t** outptr_Qt__Disambiguated_t); -void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Qt__Disambiguated_t); +void Disambiguated_t_new(Disambiguated_t** outptr_Disambiguated_t); +void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Disambiguated_t); void Disambiguated_t_Delete(Disambiguated_t* self, bool isSubclass); void QInternal_Delete(QInternal* self, bool isSubclass); diff --git a/qt6/gen_qprogressbar.cpp b/qt6/gen_qprogressbar.cpp index a0ad7809..626fb4cc 100644 --- a/qt6/gen_qprogressbar.cpp +++ b/qt6/gen_qprogressbar.cpp @@ -872,7 +872,7 @@ class MiqtVirtualQProgressBar : public virtual QProgressBar { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QProgressBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qproperty.cpp b/qt6/gen_qproperty.cpp index 4885ad26..f8dea8a9 100644 --- a/qt6/gen_qproperty.cpp +++ b/qt6/gen_qproperty.cpp @@ -9,7 +9,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QBindableInterface #include #include "gen_qproperty.h" #include "_cgo_export.h" @@ -166,14 +165,6 @@ void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass) { } } -void QtPrivate__QBindableInterface_Delete(QtPrivate__QBindableInterface* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QUntypedBindable_new(QUntypedBindable** outptr_QUntypedBindable) { QUntypedBindable* ret = new QUntypedBindable(); *outptr_QUntypedBindable = ret; diff --git a/qt6/gen_qproperty.go b/qt6/gen_qproperty.go index bdca2b73..a6f0d7a7 100644 --- a/qt6/gen_qproperty.go +++ b/qt6/gen_qproperty.go @@ -513,56 +513,6 @@ func (this *QPropertyNotifier) GoGC() { }) } -type QtPrivate__QBindableInterface struct { - h *C.QtPrivate__QBindableInterface - isSubclass bool -} - -func (this *QtPrivate__QBindableInterface) cPointer() *C.QtPrivate__QBindableInterface { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QBindableInterface) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QBindableInterface constructs the type using only CGO pointers. -func newQtPrivate__QBindableInterface(h *C.QtPrivate__QBindableInterface) *QtPrivate__QBindableInterface { - if h == nil { - return nil - } - return &QtPrivate__QBindableInterface{h: h} -} - -// UnsafeNewQtPrivate__QBindableInterface constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QBindableInterface(h unsafe.Pointer) *QtPrivate__QBindableInterface { - if h == nil { - return nil - } - - return &QtPrivate__QBindableInterface{h: (*C.QtPrivate__QBindableInterface)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QBindableInterface) Delete() { - C.QtPrivate__QBindableInterface_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QBindableInterface) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QBindableInterface) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QUntypedBindable struct { h *C.QUntypedBindable isSubclass bool diff --git a/qt6/gen_qproperty.h b/qt6/gen_qproperty.h index fab0452a..b3c59c18 100644 --- a/qt6/gen_qproperty.h +++ b/qt6/gen_qproperty.h @@ -23,11 +23,6 @@ class QPropertyObserver; class QPropertyObserverBase; class QUntypedBindable; class QUntypedPropertyBinding; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QBindableInterface) -typedef QtPrivate::QBindableInterface QtPrivate__QBindableInterface; -#else -class QtPrivate__QBindableInterface; -#endif #else typedef struct QMetaType QMetaType; typedef struct QPropertyBindingError QPropertyBindingError; @@ -37,7 +32,6 @@ typedef struct QPropertyObserver QPropertyObserver; typedef struct QPropertyObserverBase QPropertyObserverBase; typedef struct QUntypedBindable QUntypedBindable; typedef struct QUntypedPropertyBinding QUntypedPropertyBinding; -typedef struct QtPrivate__QBindableInterface QtPrivate__QBindableInterface; #endif void QPropertyBindingSourceLocation_new(QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation); @@ -72,8 +66,6 @@ void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass); void QPropertyNotifier_new(QPropertyNotifier** outptr_QPropertyNotifier, QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase); void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass); -void QtPrivate__QBindableInterface_Delete(QtPrivate__QBindableInterface* self, bool isSubclass); - void QUntypedBindable_new(QUntypedBindable** outptr_QUntypedBindable); void QUntypedBindable_new2(QUntypedBindable* param1, QUntypedBindable** outptr_QUntypedBindable); bool QUntypedBindable_IsValid(const QUntypedBindable* self); diff --git a/qt6/gen_qpropertyprivate.cpp b/qt6/gen_qpropertyprivate.cpp index 9cb2ebac..aa243ea5 100644 --- a/qt6/gen_qpropertyprivate.cpp +++ b/qt6/gen_qpropertyprivate.cpp @@ -1,32 +1,9 @@ -#include #include -#include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__BindingFunctionVTable -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__MSVCWorkAround -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QPropertyBindingData -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QPropertyBindingFunction -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__RefCounted #include #include "gen_qpropertyprivate.h" #include "_cgo_export.h" -void QtPrivate__RefCounted_AddRef(QtPrivate__RefCounted* self) { - self->addRef(); -} - -bool QtPrivate__RefCounted_Deref(QtPrivate__RefCounted* self) { - return self->deref(); -} - -void QtPrivate__RefCounted_Delete(QtPrivate__RefCounted* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QUntypedPropertyData_Delete(QUntypedPropertyData* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -43,72 +20,3 @@ void QPropertyProxyBindingData_Delete(QPropertyProxyBindingData* self, bool isSu } } -void QtPrivate__MSVCWorkAround_Delete(QtPrivate__MSVCWorkAround* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__BindingFunctionVTable_Delete(QtPrivate__BindingFunctionVTable* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__QPropertyBindingFunction_Delete(QtPrivate__QPropertyBindingFunction* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__QPropertyBindingData_new(QtPrivate__QPropertyBindingData** outptr_QtPrivate__QPropertyBindingData) { - QtPrivate::QPropertyBindingData* ret = new QtPrivate::QPropertyBindingData(); - *outptr_QtPrivate__QPropertyBindingData = ret; -} - -bool QtPrivate__QPropertyBindingData_HasBinding(const QtPrivate__QPropertyBindingData* self) { - return self->hasBinding(); -} - -bool QtPrivate__QPropertyBindingData_IsNotificationDelayed(const QtPrivate__QPropertyBindingData* self) { - return self->isNotificationDelayed(); -} - -QUntypedPropertyBinding* QtPrivate__QPropertyBindingData_SetBinding(QtPrivate__QPropertyBindingData* self, QUntypedPropertyBinding* newBinding, QUntypedPropertyData* propertyDataPtr) { - return new QUntypedPropertyBinding(self->setBinding(*newBinding, propertyDataPtr)); -} - -void QtPrivate__QPropertyBindingData_EvaluateIfDirty(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* param1) { - self->evaluateIfDirty(param1); -} - -void QtPrivate__QPropertyBindingData_RemoveBinding(QtPrivate__QPropertyBindingData* self) { - self->removeBinding(); -} - -void QtPrivate__QPropertyBindingData_RegisterWithCurrentlyEvaluatingBinding2(const QtPrivate__QPropertyBindingData* self) { - self->registerWithCurrentlyEvaluatingBinding(); -} - -void QtPrivate__QPropertyBindingData_NotifyObservers(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr) { - self->notifyObservers(propertyDataPtr); -} - -void QtPrivate__QPropertyBindingData_NotifyObservers2(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr, QBindingStorage* storage) { - self->notifyObservers(propertyDataPtr, storage); -} - -void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qpropertyprivate.go b/qt6/gen_qpropertyprivate.go index 8596dc9c..db28d382 100644 --- a/qt6/gen_qpropertyprivate.go +++ b/qt6/gen_qpropertyprivate.go @@ -13,64 +13,6 @@ import ( "unsafe" ) -type QtPrivate__RefCounted struct { - h *C.QtPrivate__RefCounted - isSubclass bool -} - -func (this *QtPrivate__RefCounted) cPointer() *C.QtPrivate__RefCounted { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__RefCounted) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__RefCounted constructs the type using only CGO pointers. -func newQtPrivate__RefCounted(h *C.QtPrivate__RefCounted) *QtPrivate__RefCounted { - if h == nil { - return nil - } - return &QtPrivate__RefCounted{h: h} -} - -// UnsafeNewQtPrivate__RefCounted constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__RefCounted(h unsafe.Pointer) *QtPrivate__RefCounted { - if h == nil { - return nil - } - - return &QtPrivate__RefCounted{h: (*C.QtPrivate__RefCounted)(h)} -} - -func (this *QtPrivate__RefCounted) AddRef() { - C.QtPrivate__RefCounted_AddRef(this.h) -} - -func (this *QtPrivate__RefCounted) Deref() bool { - return (bool)(C.QtPrivate__RefCounted_Deref(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__RefCounted) Delete() { - C.QtPrivate__RefCounted_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__RefCounted) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__RefCounted) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QUntypedPropertyData struct { h *C.QUntypedPropertyData isSubclass bool @@ -170,248 +112,3 @@ func (this *QPropertyProxyBindingData) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__MSVCWorkAround struct { - h *C.QtPrivate__MSVCWorkAround - isSubclass bool -} - -func (this *QtPrivate__MSVCWorkAround) cPointer() *C.QtPrivate__MSVCWorkAround { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__MSVCWorkAround) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__MSVCWorkAround constructs the type using only CGO pointers. -func newQtPrivate__MSVCWorkAround(h *C.QtPrivate__MSVCWorkAround) *QtPrivate__MSVCWorkAround { - if h == nil { - return nil - } - return &QtPrivate__MSVCWorkAround{h: h} -} - -// UnsafeNewQtPrivate__MSVCWorkAround constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__MSVCWorkAround(h unsafe.Pointer) *QtPrivate__MSVCWorkAround { - if h == nil { - return nil - } - - return &QtPrivate__MSVCWorkAround{h: (*C.QtPrivate__MSVCWorkAround)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__MSVCWorkAround) Delete() { - C.QtPrivate__MSVCWorkAround_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__MSVCWorkAround) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__MSVCWorkAround) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__BindingFunctionVTable struct { - h *C.QtPrivate__BindingFunctionVTable - isSubclass bool -} - -func (this *QtPrivate__BindingFunctionVTable) cPointer() *C.QtPrivate__BindingFunctionVTable { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__BindingFunctionVTable) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__BindingFunctionVTable constructs the type using only CGO pointers. -func newQtPrivate__BindingFunctionVTable(h *C.QtPrivate__BindingFunctionVTable) *QtPrivate__BindingFunctionVTable { - if h == nil { - return nil - } - return &QtPrivate__BindingFunctionVTable{h: h} -} - -// UnsafeNewQtPrivate__BindingFunctionVTable constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__BindingFunctionVTable(h unsafe.Pointer) *QtPrivate__BindingFunctionVTable { - if h == nil { - return nil - } - - return &QtPrivate__BindingFunctionVTable{h: (*C.QtPrivate__BindingFunctionVTable)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__BindingFunctionVTable) Delete() { - C.QtPrivate__BindingFunctionVTable_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__BindingFunctionVTable) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__BindingFunctionVTable) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__QPropertyBindingFunction struct { - h *C.QtPrivate__QPropertyBindingFunction - isSubclass bool -} - -func (this *QtPrivate__QPropertyBindingFunction) cPointer() *C.QtPrivate__QPropertyBindingFunction { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QPropertyBindingFunction) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QPropertyBindingFunction constructs the type using only CGO pointers. -func newQtPrivate__QPropertyBindingFunction(h *C.QtPrivate__QPropertyBindingFunction) *QtPrivate__QPropertyBindingFunction { - if h == nil { - return nil - } - return &QtPrivate__QPropertyBindingFunction{h: h} -} - -// UnsafeNewQtPrivate__QPropertyBindingFunction constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QPropertyBindingFunction(h unsafe.Pointer) *QtPrivate__QPropertyBindingFunction { - if h == nil { - return nil - } - - return &QtPrivate__QPropertyBindingFunction{h: (*C.QtPrivate__QPropertyBindingFunction)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QPropertyBindingFunction) Delete() { - C.QtPrivate__QPropertyBindingFunction_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QPropertyBindingFunction) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QPropertyBindingFunction) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__QPropertyBindingData struct { - h *C.QtPrivate__QPropertyBindingData - isSubclass bool -} - -func (this *QtPrivate__QPropertyBindingData) cPointer() *C.QtPrivate__QPropertyBindingData { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QPropertyBindingData) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QPropertyBindingData constructs the type using only CGO pointers. -func newQtPrivate__QPropertyBindingData(h *C.QtPrivate__QPropertyBindingData) *QtPrivate__QPropertyBindingData { - if h == nil { - return nil - } - return &QtPrivate__QPropertyBindingData{h: h} -} - -// UnsafeNewQtPrivate__QPropertyBindingData constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QPropertyBindingData(h unsafe.Pointer) *QtPrivate__QPropertyBindingData { - if h == nil { - return nil - } - - return &QtPrivate__QPropertyBindingData{h: (*C.QtPrivate__QPropertyBindingData)(h)} -} - -// NewQtPrivate__QPropertyBindingData constructs a new QtPrivate::QPropertyBindingData object. -func NewQtPrivate__QPropertyBindingData() *QtPrivate__QPropertyBindingData { - var outptr_QtPrivate__QPropertyBindingData *C.QtPrivate__QPropertyBindingData = nil - - C.QtPrivate__QPropertyBindingData_new(&outptr_QtPrivate__QPropertyBindingData) - ret := newQtPrivate__QPropertyBindingData(outptr_QtPrivate__QPropertyBindingData) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__QPropertyBindingData) HasBinding() bool { - return (bool)(C.QtPrivate__QPropertyBindingData_HasBinding(this.h)) -} - -func (this *QtPrivate__QPropertyBindingData) IsNotificationDelayed() bool { - return (bool)(C.QtPrivate__QPropertyBindingData_IsNotificationDelayed(this.h)) -} - -func (this *QtPrivate__QPropertyBindingData) SetBinding(newBinding *QUntypedPropertyBinding, propertyDataPtr *QUntypedPropertyData) *QUntypedPropertyBinding { - _ret := C.QtPrivate__QPropertyBindingData_SetBinding(this.h, newBinding.cPointer(), propertyDataPtr.cPointer()) - _goptr := newQUntypedPropertyBinding(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - -func (this *QtPrivate__QPropertyBindingData) EvaluateIfDirty(param1 *QUntypedPropertyData) { - C.QtPrivate__QPropertyBindingData_EvaluateIfDirty(this.h, param1.cPointer()) -} - -func (this *QtPrivate__QPropertyBindingData) RemoveBinding() { - C.QtPrivate__QPropertyBindingData_RemoveBinding(this.h) -} - -func (this *QtPrivate__QPropertyBindingData) RegisterWithCurrentlyEvaluatingBinding2() { - C.QtPrivate__QPropertyBindingData_RegisterWithCurrentlyEvaluatingBinding2(this.h) -} - -func (this *QtPrivate__QPropertyBindingData) NotifyObservers(propertyDataPtr *QUntypedPropertyData) { - C.QtPrivate__QPropertyBindingData_NotifyObservers(this.h, propertyDataPtr.cPointer()) -} - -func (this *QtPrivate__QPropertyBindingData) NotifyObservers2(propertyDataPtr *QUntypedPropertyData, storage *QBindingStorage) { - C.QtPrivate__QPropertyBindingData_NotifyObservers2(this.h, propertyDataPtr.cPointer(), storage.cPointer()) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QPropertyBindingData) Delete() { - C.QtPrivate__QPropertyBindingData_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QPropertyBindingData) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QPropertyBindingData) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qpropertyprivate.h b/qt6/gen_qpropertyprivate.h index 4159eb5b..9554da30 100644 --- a/qt6/gen_qpropertyprivate.h +++ b/qt6/gen_qpropertyprivate.h @@ -15,72 +15,17 @@ extern "C" { #endif #ifdef __cplusplus -class QBindingStorage; class QPropertyProxyBindingData; -class QUntypedPropertyBinding; class QUntypedPropertyData; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__BindingFunctionVTable) -typedef QtPrivate::BindingFunctionVTable QtPrivate__BindingFunctionVTable; #else -class QtPrivate__BindingFunctionVTable; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__MSVCWorkAround) -typedef QtPrivate::MSVCWorkAround QtPrivate__MSVCWorkAround; -#else -class QtPrivate__MSVCWorkAround; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QPropertyBindingData) -typedef QtPrivate::QPropertyBindingData QtPrivate__QPropertyBindingData; -#else -class QtPrivate__QPropertyBindingData; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QPropertyBindingFunction) -typedef QtPrivate::QPropertyBindingFunction QtPrivate__QPropertyBindingFunction; -#else -class QtPrivate__QPropertyBindingFunction; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__RefCounted) -typedef QtPrivate::RefCounted QtPrivate__RefCounted; -#else -class QtPrivate__RefCounted; -#endif -#else -typedef struct QBindingStorage QBindingStorage; typedef struct QPropertyProxyBindingData QPropertyProxyBindingData; -typedef struct QUntypedPropertyBinding QUntypedPropertyBinding; typedef struct QUntypedPropertyData QUntypedPropertyData; -typedef struct QtPrivate__BindingFunctionVTable QtPrivate__BindingFunctionVTable; -typedef struct QtPrivate__MSVCWorkAround QtPrivate__MSVCWorkAround; -typedef struct QtPrivate__QPropertyBindingData QtPrivate__QPropertyBindingData; -typedef struct QtPrivate__QPropertyBindingFunction QtPrivate__QPropertyBindingFunction; -typedef struct QtPrivate__RefCounted QtPrivate__RefCounted; #endif -void QtPrivate__RefCounted_AddRef(QtPrivate__RefCounted* self); -bool QtPrivate__RefCounted_Deref(QtPrivate__RefCounted* self); -void QtPrivate__RefCounted_Delete(QtPrivate__RefCounted* self, bool isSubclass); - void QUntypedPropertyData_Delete(QUntypedPropertyData* self, bool isSubclass); void QPropertyProxyBindingData_Delete(QPropertyProxyBindingData* self, bool isSubclass); -void QtPrivate__MSVCWorkAround_Delete(QtPrivate__MSVCWorkAround* self, bool isSubclass); - -void QtPrivate__BindingFunctionVTable_Delete(QtPrivate__BindingFunctionVTable* self, bool isSubclass); - -void QtPrivate__QPropertyBindingFunction_Delete(QtPrivate__QPropertyBindingFunction* self, bool isSubclass); - -void QtPrivate__QPropertyBindingData_new(QtPrivate__QPropertyBindingData** outptr_QtPrivate__QPropertyBindingData); -bool QtPrivate__QPropertyBindingData_HasBinding(const QtPrivate__QPropertyBindingData* self); -bool QtPrivate__QPropertyBindingData_IsNotificationDelayed(const QtPrivate__QPropertyBindingData* self); -QUntypedPropertyBinding* QtPrivate__QPropertyBindingData_SetBinding(QtPrivate__QPropertyBindingData* self, QUntypedPropertyBinding* newBinding, QUntypedPropertyData* propertyDataPtr); -void QtPrivate__QPropertyBindingData_EvaluateIfDirty(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* param1); -void QtPrivate__QPropertyBindingData_RemoveBinding(QtPrivate__QPropertyBindingData* self); -void QtPrivate__QPropertyBindingData_RegisterWithCurrentlyEvaluatingBinding2(const QtPrivate__QPropertyBindingData* self); -void QtPrivate__QPropertyBindingData_NotifyObservers(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr); -void QtPrivate__QPropertyBindingData_NotifyObservers2(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr, QBindingStorage* storage); -void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qrefcount.cpp b/qt6/gen_qrefcount.cpp deleted file mode 100644 index 4b43e0ce..00000000 --- a/qt6/gen_qrefcount.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__RefCount -#include -#include "gen_qrefcount.h" -#include "_cgo_export.h" - -bool QtPrivate__RefCount_Ref(QtPrivate__RefCount* self) { - return self->ref(); -} - -bool QtPrivate__RefCount_Deref(QtPrivate__RefCount* self) { - return self->deref(); -} - -bool QtPrivate__RefCount_IsStatic(const QtPrivate__RefCount* self) { - return self->isStatic(); -} - -bool QtPrivate__RefCount_IsShared(const QtPrivate__RefCount* self) { - return self->isShared(); -} - -void QtPrivate__RefCount_InitializeOwned(QtPrivate__RefCount* self) { - self->initializeOwned(); -} - -void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self) { - self->initializeUnsharable(); -} - -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qrefcount.go b/qt6/gen_qrefcount.go deleted file mode 100644 index 6c637210..00000000 --- a/qt6/gen_qrefcount.go +++ /dev/null @@ -1,88 +0,0 @@ -package qt6 - -/* - -#include "gen_qrefcount.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__RefCount struct { - h *C.QtPrivate__RefCount - isSubclass bool -} - -func (this *QtPrivate__RefCount) cPointer() *C.QtPrivate__RefCount { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__RefCount) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__RefCount constructs the type using only CGO pointers. -func newQtPrivate__RefCount(h *C.QtPrivate__RefCount) *QtPrivate__RefCount { - if h == nil { - return nil - } - return &QtPrivate__RefCount{h: h} -} - -// UnsafeNewQtPrivate__RefCount constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__RefCount(h unsafe.Pointer) *QtPrivate__RefCount { - if h == nil { - return nil - } - - return &QtPrivate__RefCount{h: (*C.QtPrivate__RefCount)(h)} -} - -func (this *QtPrivate__RefCount) Ref() bool { - return (bool)(C.QtPrivate__RefCount_Ref(this.h)) -} - -func (this *QtPrivate__RefCount) Deref() bool { - return (bool)(C.QtPrivate__RefCount_Deref(this.h)) -} - -func (this *QtPrivate__RefCount) IsStatic() bool { - return (bool)(C.QtPrivate__RefCount_IsStatic(this.h)) -} - -func (this *QtPrivate__RefCount) IsShared() bool { - return (bool)(C.QtPrivate__RefCount_IsShared(this.h)) -} - -func (this *QtPrivate__RefCount) InitializeOwned() { - C.QtPrivate__RefCount_InitializeOwned(this.h) -} - -func (this *QtPrivate__RefCount) InitializeUnsharable() { - C.QtPrivate__RefCount_InitializeUnsharable(this.h) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__RefCount) Delete() { - C.QtPrivate__RefCount_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__RefCount) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__RefCount) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qrefcount.h b/qt6/gen_qrefcount.h deleted file mode 100644 index 0813be7c..00000000 --- a/qt6/gen_qrefcount.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once -#ifndef MIQT_QT6_GEN_QREFCOUNT_H -#define MIQT_QT6_GEN_QREFCOUNT_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__RefCount) -typedef QtPrivate::RefCount QtPrivate__RefCount; -#else -class QtPrivate__RefCount; -#endif -#else -typedef struct QtPrivate__RefCount QtPrivate__RefCount; -#endif - -bool QtPrivate__RefCount_Ref(QtPrivate__RefCount* self); -bool QtPrivate__RefCount_Deref(QtPrivate__RefCount* self); -bool QtPrivate__RefCount_IsStatic(const QtPrivate__RefCount* self); -bool QtPrivate__RefCount_IsShared(const QtPrivate__RefCount* self); -void QtPrivate__RefCount_InitializeOwned(QtPrivate__RefCount* self); -void QtPrivate__RefCount_InitializeUnsharable(QtPrivate__RefCount* self); -void QtPrivate__RefCount_Delete(QtPrivate__RefCount* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt6/gen_qregularexpression.cpp b/qt6/gen_qregularexpression.cpp index abcea432..09363231 100644 --- a/qt6/gen_qregularexpression.cpp +++ b/qt6/gen_qregularexpression.cpp @@ -5,8 +5,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel #include #include "gen_qregularexpression.h" #include "_cgo_export.h" @@ -385,19 +383,6 @@ void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubcla } } -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) { - QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* ret = new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(); - *outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel = ret; -} - -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(); *outptr_QRegularExpressionMatchIterator = ret; @@ -454,27 +439,3 @@ void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* sel } } -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) { - QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator* ret = new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator(); - *outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = ret; -} - -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(QRegularExpressionMatchIterator* iterator, QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) { - QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator* ret = new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator(*iterator); - *outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = ret; -} - -QRegularExpressionMatch* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_OperatorMultiply(const QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self) { - const QRegularExpressionMatch& _ret = self->operator*(); - // Cast returned reference into pointer - return const_cast(&_ret); -} - -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qregularexpression.go b/qt6/gen_qregularexpression.go index 8da51ecd..3ed4f8c2 100644 --- a/qt6/gen_qregularexpression.go +++ b/qt6/gen_qregularexpression.go @@ -563,66 +563,6 @@ func (this *QRegularExpressionMatch) GoGC() { }) } -type QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel struct { - h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel - isSubclass bool -} - -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) cPointer() *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel constructs the type using only CGO pointers. -func newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { - if h == nil { - return nil - } - return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel{h: h} -} - -// UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(h unsafe.Pointer) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { - if h == nil { - return nil - } - - return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel{h: (*C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel)(h)} -} - -// NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel constructs a new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel object. -func NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel() *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel { - var outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel = nil - - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(&outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) - ret := newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel(outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) - ret.isSubclass = true - return ret -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) Delete() { - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QRegularExpressionMatchIterator struct { h *C.QRegularExpressionMatchIterator isSubclass bool @@ -737,77 +677,3 @@ func (this *QRegularExpressionMatchIterator) GoGC() { runtime.KeepAlive(this.h) }) } - -type QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator struct { - h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator - isSubclass bool -} - -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) cPointer() *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator constructs the type using only CGO pointers. -func newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(h *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - if h == nil { - return nil - } - return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator{h: h} -} - -// UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(h unsafe.Pointer) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - if h == nil { - return nil - } - - return &QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator{h: (*C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator)(h)} -} - -// NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator constructs a new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator object. -func NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator() *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - var outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = nil - - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(&outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) - ret := newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) - ret.isSubclass = true - return ret -} - -// NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator2 constructs a new QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator object. -func NewQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator2(iterator *QRegularExpressionMatchIterator) *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator { - var outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator *C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator = nil - - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(iterator.cPointer(), &outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) - ret := newQtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator(outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) OperatorMultiply() *QRegularExpressionMatch { - return UnsafeNewQRegularExpressionMatch(unsafe.Pointer(C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_OperatorMultiply(this.h))) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) Delete() { - C.QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qregularexpression.h b/qt6/gen_qregularexpression.h index fadc2552..62741655 100644 --- a/qt6/gen_qregularexpression.h +++ b/qt6/gen_qregularexpression.h @@ -18,22 +18,10 @@ extern "C" { class QRegularExpression; class QRegularExpressionMatch; class QRegularExpressionMatchIterator; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator) -typedef QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator; -#else -class QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel) -typedef QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel; -#else -class QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel; -#endif #else typedef struct QRegularExpression QRegularExpression; typedef struct QRegularExpressionMatch QRegularExpressionMatch; typedef struct QRegularExpressionMatchIterator QRegularExpressionMatchIterator; -typedef struct QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator; -typedef struct QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel; #endif void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression); @@ -96,9 +84,6 @@ ptrdiff_t QRegularExpressionMatch_CapturedLength1(const QRegularExpressionMatch* ptrdiff_t QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* self, int nth); void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIteratorSentinel* self, bool isSubclass); - void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator); @@ -112,11 +97,6 @@ int QRegularExpressionMatchIterator_MatchType(const QRegularExpressionMatchItera int QRegularExpressionMatchIterator_MatchOptions(const QRegularExpressionMatchIterator* self); void QRegularExpressionMatchIterator_Delete(QRegularExpressionMatchIterator* self, bool isSubclass); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_new2(QRegularExpressionMatchIterator* iterator, QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator** outptr_QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator); -QRegularExpressionMatch* QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_OperatorMultiply(const QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self); -void QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator_Delete(QtPrivate__QRegularExpressionMatchIteratorRangeBasedForIterator* self, bool isSubclass); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qresultstore.cpp b/qt6/gen_qresultstore.cpp deleted file mode 100644 index a9234e79..00000000 --- a/qt6/gen_qresultstore.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultItem -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultIteratorBase -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultStoreBase -#include -#include "gen_qresultstore.h" -#include "_cgo_export.h" - -void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { - QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result, static_cast(_count)); - *outptr_QtPrivate__ResultItem = ret; -} - -void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { - QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(_result); - *outptr_QtPrivate__ResultItem = ret; -} - -void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem) { - QtPrivate::ResultItem* ret = new QtPrivate::ResultItem(); - *outptr_QtPrivate__ResultItem = ret; -} - -bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self) { - return self->isValid(); -} - -bool QtPrivate__ResultItem_IsVector(const QtPrivate__ResultItem* self) { - return self->isVector(); -} - -int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self) { - return self->count(); -} - -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase) { - QtPrivate::ResultIteratorBase* ret = new QtPrivate::ResultIteratorBase(); - *outptr_QtPrivate__ResultIteratorBase = ret; -} - -int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self) { - return self->vectorIndex(); -} - -int QtPrivate__ResultIteratorBase_ResultIndex(const QtPrivate__ResultIteratorBase* self) { - return self->resultIndex(); -} - -int QtPrivate__ResultIteratorBase_BatchSize(const QtPrivate__ResultIteratorBase* self) { - return self->batchSize(); -} - -void QtPrivate__ResultIteratorBase_BatchedAdvance(QtPrivate__ResultIteratorBase* self) { - self->batchedAdvance(); -} - -bool QtPrivate__ResultIteratorBase_IsVector(const QtPrivate__ResultIteratorBase* self) { - return self->isVector(); -} - -bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__ResultIteratorBase* self) { - return self->canIncrementVectorIndex(); -} - -bool QtPrivate__ResultIteratorBase_IsValid(const QtPrivate__ResultIteratorBase* self) { - return self->isValid(); -} - -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase) { - QtPrivate::ResultStoreBase* ret = new QtPrivate::ResultStoreBase(); - *outptr_QtPrivate__ResultStoreBase = ret; -} - -void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable) { - self->setFilterMode(enable); -} - -bool QtPrivate__ResultStoreBase_FilterMode(const QtPrivate__ResultStoreBase* self) { - return self->filterMode(); -} - -int QtPrivate__ResultStoreBase_AddResult(QtPrivate__ResultStoreBase* self, int index, const void* result) { - return self->addResult(static_cast(index), result); -} - -int QtPrivate__ResultStoreBase_AddResults(QtPrivate__ResultStoreBase* self, int index, const void* results, int vectorSize, int logicalCount) { - return self->addResults(static_cast(index), results, static_cast(vectorSize), static_cast(logicalCount)); -} - -bool QtPrivate__ResultStoreBase_HasNextResult(const QtPrivate__ResultStoreBase* self) { - return self->hasNextResult(); -} - -bool QtPrivate__ResultStoreBase_Contains(const QtPrivate__ResultStoreBase* self, int index) { - return self->contains(static_cast(index)); -} - -int QtPrivate__ResultStoreBase_Count(const QtPrivate__ResultStoreBase* self) { - return self->count(); -} - -int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* self, int index) { - return self->addCanceledResult(static_cast(index)); -} - -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qresultstore.go b/qt6/gen_qresultstore.go deleted file mode 100644 index 861d5e1f..00000000 --- a/qt6/gen_qresultstore.go +++ /dev/null @@ -1,286 +0,0 @@ -package qt6 - -/* - -#include "gen_qresultstore.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__ResultItem struct { - h *C.QtPrivate__ResultItem - isSubclass bool -} - -func (this *QtPrivate__ResultItem) cPointer() *C.QtPrivate__ResultItem { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ResultItem) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ResultItem constructs the type using only CGO pointers. -func newQtPrivate__ResultItem(h *C.QtPrivate__ResultItem) *QtPrivate__ResultItem { - if h == nil { - return nil - } - return &QtPrivate__ResultItem{h: h} -} - -// UnsafeNewQtPrivate__ResultItem constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ResultItem(h unsafe.Pointer) *QtPrivate__ResultItem { - if h == nil { - return nil - } - - return &QtPrivate__ResultItem{h: (*C.QtPrivate__ResultItem)(h)} -} - -// NewQtPrivate__ResultItem constructs a new QtPrivate::ResultItem object. -func NewQtPrivate__ResultItem(_result unsafe.Pointer, _count int) *QtPrivate__ResultItem { - var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil - - C.QtPrivate__ResultItem_new(_result, (C.int)(_count), &outptr_QtPrivate__ResultItem) - ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) - ret.isSubclass = true - return ret -} - -// NewQtPrivate__ResultItem2 constructs a new QtPrivate::ResultItem object. -func NewQtPrivate__ResultItem2(_result unsafe.Pointer) *QtPrivate__ResultItem { - var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil - - C.QtPrivate__ResultItem_new2(_result, &outptr_QtPrivate__ResultItem) - ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) - ret.isSubclass = true - return ret -} - -// NewQtPrivate__ResultItem3 constructs a new QtPrivate::ResultItem object. -func NewQtPrivate__ResultItem3() *QtPrivate__ResultItem { - var outptr_QtPrivate__ResultItem *C.QtPrivate__ResultItem = nil - - C.QtPrivate__ResultItem_new3(&outptr_QtPrivate__ResultItem) - ret := newQtPrivate__ResultItem(outptr_QtPrivate__ResultItem) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__ResultItem) IsValid() bool { - return (bool)(C.QtPrivate__ResultItem_IsValid(this.h)) -} - -func (this *QtPrivate__ResultItem) IsVector() bool { - return (bool)(C.QtPrivate__ResultItem_IsVector(this.h)) -} - -func (this *QtPrivate__ResultItem) Count() int { - return (int)(C.QtPrivate__ResultItem_Count(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ResultItem) Delete() { - C.QtPrivate__ResultItem_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ResultItem) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ResultItem) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__ResultIteratorBase struct { - h *C.QtPrivate__ResultIteratorBase - isSubclass bool -} - -func (this *QtPrivate__ResultIteratorBase) cPointer() *C.QtPrivate__ResultIteratorBase { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ResultIteratorBase) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ResultIteratorBase constructs the type using only CGO pointers. -func newQtPrivate__ResultIteratorBase(h *C.QtPrivate__ResultIteratorBase) *QtPrivate__ResultIteratorBase { - if h == nil { - return nil - } - return &QtPrivate__ResultIteratorBase{h: h} -} - -// UnsafeNewQtPrivate__ResultIteratorBase constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ResultIteratorBase(h unsafe.Pointer) *QtPrivate__ResultIteratorBase { - if h == nil { - return nil - } - - return &QtPrivate__ResultIteratorBase{h: (*C.QtPrivate__ResultIteratorBase)(h)} -} - -// NewQtPrivate__ResultIteratorBase constructs a new QtPrivate::ResultIteratorBase object. -func NewQtPrivate__ResultIteratorBase() *QtPrivate__ResultIteratorBase { - var outptr_QtPrivate__ResultIteratorBase *C.QtPrivate__ResultIteratorBase = nil - - C.QtPrivate__ResultIteratorBase_new(&outptr_QtPrivate__ResultIteratorBase) - ret := newQtPrivate__ResultIteratorBase(outptr_QtPrivate__ResultIteratorBase) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__ResultIteratorBase) VectorIndex() int { - return (int)(C.QtPrivate__ResultIteratorBase_VectorIndex(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) ResultIndex() int { - return (int)(C.QtPrivate__ResultIteratorBase_ResultIndex(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) BatchSize() int { - return (int)(C.QtPrivate__ResultIteratorBase_BatchSize(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) BatchedAdvance() { - C.QtPrivate__ResultIteratorBase_BatchedAdvance(this.h) -} - -func (this *QtPrivate__ResultIteratorBase) IsVector() bool { - return (bool)(C.QtPrivate__ResultIteratorBase_IsVector(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) CanIncrementVectorIndex() bool { - return (bool)(C.QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(this.h)) -} - -func (this *QtPrivate__ResultIteratorBase) IsValid() bool { - return (bool)(C.QtPrivate__ResultIteratorBase_IsValid(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ResultIteratorBase) Delete() { - C.QtPrivate__ResultIteratorBase_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ResultIteratorBase) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ResultIteratorBase) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__ResultStoreBase struct { - h *C.QtPrivate__ResultStoreBase - isSubclass bool -} - -func (this *QtPrivate__ResultStoreBase) cPointer() *C.QtPrivate__ResultStoreBase { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__ResultStoreBase) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__ResultStoreBase constructs the type using only CGO pointers. -func newQtPrivate__ResultStoreBase(h *C.QtPrivate__ResultStoreBase) *QtPrivate__ResultStoreBase { - if h == nil { - return nil - } - return &QtPrivate__ResultStoreBase{h: h} -} - -// UnsafeNewQtPrivate__ResultStoreBase constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__ResultStoreBase(h unsafe.Pointer) *QtPrivate__ResultStoreBase { - if h == nil { - return nil - } - - return &QtPrivate__ResultStoreBase{h: (*C.QtPrivate__ResultStoreBase)(h)} -} - -// NewQtPrivate__ResultStoreBase constructs a new QtPrivate::ResultStoreBase object. -func NewQtPrivate__ResultStoreBase() *QtPrivate__ResultStoreBase { - var outptr_QtPrivate__ResultStoreBase *C.QtPrivate__ResultStoreBase = nil - - C.QtPrivate__ResultStoreBase_new(&outptr_QtPrivate__ResultStoreBase) - ret := newQtPrivate__ResultStoreBase(outptr_QtPrivate__ResultStoreBase) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__ResultStoreBase) SetFilterMode(enable bool) { - C.QtPrivate__ResultStoreBase_SetFilterMode(this.h, (C.bool)(enable)) -} - -func (this *QtPrivate__ResultStoreBase) FilterMode() bool { - return (bool)(C.QtPrivate__ResultStoreBase_FilterMode(this.h)) -} - -func (this *QtPrivate__ResultStoreBase) AddResult(index int, result unsafe.Pointer) int { - return (int)(C.QtPrivate__ResultStoreBase_AddResult(this.h, (C.int)(index), result)) -} - -func (this *QtPrivate__ResultStoreBase) AddResults(index int, results unsafe.Pointer, vectorSize int, logicalCount int) int { - return (int)(C.QtPrivate__ResultStoreBase_AddResults(this.h, (C.int)(index), results, (C.int)(vectorSize), (C.int)(logicalCount))) -} - -func (this *QtPrivate__ResultStoreBase) HasNextResult() bool { - return (bool)(C.QtPrivate__ResultStoreBase_HasNextResult(this.h)) -} - -func (this *QtPrivate__ResultStoreBase) Contains(index int) bool { - return (bool)(C.QtPrivate__ResultStoreBase_Contains(this.h, (C.int)(index))) -} - -func (this *QtPrivate__ResultStoreBase) Count() int { - return (int)(C.QtPrivate__ResultStoreBase_Count(this.h)) -} - -func (this *QtPrivate__ResultStoreBase) AddCanceledResult(index int) int { - return (int)(C.QtPrivate__ResultStoreBase_AddCanceledResult(this.h, (C.int)(index))) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__ResultStoreBase) Delete() { - C.QtPrivate__ResultStoreBase_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__ResultStoreBase) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__ResultStoreBase) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qresultstore.h b/qt6/gen_qresultstore.h deleted file mode 100644 index f603a04d..00000000 --- a/qt6/gen_qresultstore.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once -#ifndef MIQT_QT6_GEN_QRESULTSTORE_H -#define MIQT_QT6_GEN_QRESULTSTORE_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultItem) -typedef QtPrivate::ResultItem QtPrivate__ResultItem; -#else -class QtPrivate__ResultItem; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultIteratorBase) -typedef QtPrivate::ResultIteratorBase QtPrivate__ResultIteratorBase; -#else -class QtPrivate__ResultIteratorBase; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__ResultStoreBase) -typedef QtPrivate::ResultStoreBase QtPrivate__ResultStoreBase; -#else -class QtPrivate__ResultStoreBase; -#endif -#else -typedef struct QtPrivate__ResultItem QtPrivate__ResultItem; -typedef struct QtPrivate__ResultIteratorBase QtPrivate__ResultIteratorBase; -typedef struct QtPrivate__ResultStoreBase QtPrivate__ResultStoreBase; -#endif - -void QtPrivate__ResultItem_new(const void* _result, int _count, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); -void QtPrivate__ResultItem_new2(const void* _result, QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); -void QtPrivate__ResultItem_new3(QtPrivate__ResultItem** outptr_QtPrivate__ResultItem); -bool QtPrivate__ResultItem_IsValid(const QtPrivate__ResultItem* self); -bool QtPrivate__ResultItem_IsVector(const QtPrivate__ResultItem* self); -int QtPrivate__ResultItem_Count(const QtPrivate__ResultItem* self); -void QtPrivate__ResultItem_Delete(QtPrivate__ResultItem* self, bool isSubclass); - -void QtPrivate__ResultIteratorBase_new(QtPrivate__ResultIteratorBase** outptr_QtPrivate__ResultIteratorBase); -int QtPrivate__ResultIteratorBase_VectorIndex(const QtPrivate__ResultIteratorBase* self); -int QtPrivate__ResultIteratorBase_ResultIndex(const QtPrivate__ResultIteratorBase* self); -int QtPrivate__ResultIteratorBase_BatchSize(const QtPrivate__ResultIteratorBase* self); -void QtPrivate__ResultIteratorBase_BatchedAdvance(QtPrivate__ResultIteratorBase* self); -bool QtPrivate__ResultIteratorBase_IsVector(const QtPrivate__ResultIteratorBase* self); -bool QtPrivate__ResultIteratorBase_CanIncrementVectorIndex(const QtPrivate__ResultIteratorBase* self); -bool QtPrivate__ResultIteratorBase_IsValid(const QtPrivate__ResultIteratorBase* self); -void QtPrivate__ResultIteratorBase_Delete(QtPrivate__ResultIteratorBase* self, bool isSubclass); - -void QtPrivate__ResultStoreBase_new(QtPrivate__ResultStoreBase** outptr_QtPrivate__ResultStoreBase); -void QtPrivate__ResultStoreBase_SetFilterMode(QtPrivate__ResultStoreBase* self, bool enable); -bool QtPrivate__ResultStoreBase_FilterMode(const QtPrivate__ResultStoreBase* self); -int QtPrivate__ResultStoreBase_AddResult(QtPrivate__ResultStoreBase* self, int index, const void* result); -int QtPrivate__ResultStoreBase_AddResults(QtPrivate__ResultStoreBase* self, int index, const void* results, int vectorSize, int logicalCount); -bool QtPrivate__ResultStoreBase_HasNextResult(const QtPrivate__ResultStoreBase* self); -bool QtPrivate__ResultStoreBase_Contains(const QtPrivate__ResultStoreBase* self, int index); -int QtPrivate__ResultStoreBase_Count(const QtPrivate__ResultStoreBase* self); -int QtPrivate__ResultStoreBase_AddCanceledResult(QtPrivate__ResultStoreBase* self, int index); -void QtPrivate__ResultStoreBase_Delete(QtPrivate__ResultStoreBase* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt6/gen_qrubberband.cpp b/qt6/gen_qrubberband.cpp index 92aac291..eb2cb29a 100644 --- a/qt6/gen_qrubberband.cpp +++ b/qt6/gen_qrubberband.cpp @@ -867,7 +867,7 @@ class MiqtVirtualQRubberBand : public virtual QRubberBand { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QRubberBand_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qsizegrip.cpp b/qt6/gen_qsizegrip.cpp index 49882581..1cd36974 100644 --- a/qt6/gen_qsizegrip.cpp +++ b/qt6/gen_qsizegrip.cpp @@ -840,7 +840,7 @@ class MiqtVirtualQSizeGrip : public virtual QSizeGrip { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QSizeGrip_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qsocketnotifier.cpp b/qt6/gen_qsocketnotifier.cpp index 864a684c..cdb8260d 100644 --- a/qt6/gen_qsocketnotifier.cpp +++ b/qt6/gen_qsocketnotifier.cpp @@ -245,7 +245,7 @@ void QSocketNotifier_SetSocket(QSocketNotifier* self, intptr_t socket) { intptr_t QSocketNotifier_Socket(const QSocketNotifier* self) { qintptr _ret = self->socket(); - return static_cast(_ret); + return (intptr_t)(_ret); } int QSocketNotifier_Type(const QSocketNotifier* self) { diff --git a/qt6/gen_qsplashscreen.cpp b/qt6/gen_qsplashscreen.cpp index d0e767c6..61dc5f7d 100644 --- a/qt6/gen_qsplashscreen.cpp +++ b/qt6/gen_qsplashscreen.cpp @@ -848,7 +848,7 @@ class MiqtVirtualQSplashScreen : public virtual QSplashScreen { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QSplashScreen_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qsplitter.cpp b/qt6/gen_qsplitter.cpp index 9a07802a..2d374fff 100644 --- a/qt6/gen_qsplitter.cpp +++ b/qt6/gen_qsplitter.cpp @@ -1341,7 +1341,7 @@ class MiqtVirtualQSplitterHandle : public virtual QSplitterHandle { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QSplitterHandle_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qstatusbar.cpp b/qt6/gen_qstatusbar.cpp index 73730526..7dcd9b22 100644 --- a/qt6/gen_qstatusbar.cpp +++ b/qt6/gen_qstatusbar.cpp @@ -817,7 +817,7 @@ class MiqtVirtualQStatusBar : public virtual QStatusBar { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QStatusBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qtabbar.cpp b/qt6/gen_qtabbar.cpp index bcc2bb44..a813c42d 100644 --- a/qt6/gen_qtabbar.cpp +++ b/qt6/gen_qtabbar.cpp @@ -1012,7 +1012,7 @@ class MiqtVirtualQTabBar : public virtual QTabBar { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QTabBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qtabwidget.cpp b/qt6/gen_qtabwidget.cpp index 0e00e328..70aff77b 100644 --- a/qt6/gen_qtabwidget.cpp +++ b/qt6/gen_qtabwidget.cpp @@ -916,7 +916,7 @@ class MiqtVirtualQTabWidget : public virtual QTabWidget { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QTabWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qtestsupport_widgets.cpp b/qt6/gen_qtestsupport_widgets.cpp index ec57cda2..a5e73dc6 100644 --- a/qt6/gen_qtestsupport_widgets.cpp +++ b/qt6/gen_qtestsupport_widgets.cpp @@ -66,7 +66,7 @@ class MiqtVirtualQTestQTouchEventWidgetSequence : public virtual QTest::QTouchEv void QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1, QTest__QTouchEventWidgetSequence** outptr_QTest__QTouchEventWidgetSequence, QTest__QTouchEventSequence** outptr_QTest__QTouchEventSequence) { MiqtVirtualQTestQTouchEventWidgetSequence* ret = new MiqtVirtualQTestQTouchEventWidgetSequence(*param1); *outptr_QTest__QTouchEventWidgetSequence = ret; - *outptr_QTest::QTouchEventSequence = static_cast(ret); + *outptr_QTest__QTouchEventSequence = static_cast(ret); } QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt) { diff --git a/qt6/gen_qtestsupport_widgets.go b/qt6/gen_qtestsupport_widgets.go index d1f1dce4..f9ba4ac2 100644 --- a/qt6/gen_qtestsupport_widgets.go +++ b/qt6/gen_qtestsupport_widgets.go @@ -14,147 +14,147 @@ import ( "unsafe" ) - type QTest__QTouchEventWidgetSequence struct { - h *C.QTest__QTouchEventWidgetSequence - isSubclass bool - *QTest__QTouchEventSequence - - } - - func (this *QTest__QTouchEventWidgetSequence) cPointer() *C.QTest__QTouchEventWidgetSequence { - if this == nil { - return nil - } - return this.h - } - - func (this *QTest__QTouchEventWidgetSequence) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) - } - - - // newQTest__QTouchEventWidgetSequence constructs the type using only CGO pointers. - func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence, h_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence) *QTest__QTouchEventWidgetSequence { - if h == nil { - return nil - } - return &QTest__QTouchEventWidgetSequence{h: h, -QTest__QTouchEventSequence: newQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} - } - - // UnsafeNewQTest__QTouchEventWidgetSequence constructs the type using only unsafe pointers. - func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer, h_QTest__QTouchEventSequence unsafe.Pointer) *QTest__QTouchEventWidgetSequence { - if h == nil { - return nil - } - - return &QTest__QTouchEventWidgetSequence{h: (*C.QTest__QTouchEventWidgetSequence)(h), -QTest__QTouchEventSequence: UnsafeNewQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} - } - - - // NewQTest__QTouchEventWidgetSequence constructs a new QTest::QTouchEventWidgetSequence object. - func NewQTest__QTouchEventWidgetSequence(param1 *QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { - var outptr_QTest__QTouchEventWidgetSequence *C.QTest__QTouchEventWidgetSequence = nil -var outptr_QTest__QTouchEventSequence *C.QTest::QTouchEventSequence = nil - - C.QTest__QTouchEventWidgetSequence_new(param1.cPointer(), &outptr_QTest__QTouchEventWidgetSequence, &outptr_QTest__QTouchEventSequence) - ret := newQTest__QTouchEventWidgetSequence(outptr_QTest__QTouchEventWidgetSequence, outptr_QTest__QTouchEventSequence) - ret.isSubclass = true - return ret - } - - - func (this *QTest__QTouchEventWidgetSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer())), nil)} - - func (this *QTest__QTouchEventWidgetSequence) Move(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer())), nil)} - - func (this *QTest__QTouchEventWidgetSequence) Release(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer())), nil)} - - func (this *QTest__QTouchEventWidgetSequence) Stationary(touchId int) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId))), nil)} - - func (this *QTest__QTouchEventWidgetSequence) Commit(processEvents bool) bool { - return (bool)(C.QTest__QTouchEventWidgetSequence_Commit(this.h, (C.bool)(processEvents))) -} - - func (this *QTest__QTouchEventWidgetSequence) Press3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil)} - - func (this *QTest__QTouchEventWidgetSequence) Move3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil)} - - func (this *QTest__QTouchEventWidgetSequence) Release3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil)} - - func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Stationary(touchId int) *QTest__QTouchEventWidgetSequence { - - return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_virtualbase_Stationary(unsafe.Pointer(this.h), (C.int)(touchId))), nil) - } - func (this *QTest__QTouchEventWidgetSequence) OnStationary(slot func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) { - C.QTest__QTouchEventWidgetSequence_override_virtual_Stationary(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)) ) - } - - //export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary - func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, touchId C.int) *C.QTest__QTouchEventWidgetSequence{ - gofunc, ok := cgo.Handle(cb).Value().(func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters -slotval1 := (int)(touchId) - - -virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Stationary, slotval1 ) - -return virtualReturn.cPointer() - - } - - func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Commit(processEvents bool) bool { - - return (bool)(C.QTest__QTouchEventWidgetSequence_virtualbase_Commit(unsafe.Pointer(this.h), (C.bool)(processEvents))) - - } - func (this *QTest__QTouchEventWidgetSequence) OnCommit(slot func(super func(processEvents bool) bool, processEvents bool) bool) { - C.QTest__QTouchEventWidgetSequence_override_virtual_Commit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)) ) - } - - //export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit - func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, processEvents C.bool) C.bool{ - gofunc, ok := cgo.Handle(cb).Value().(func(super func(processEvents bool) bool, processEvents bool) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters -slotval1 := (bool)(processEvents) - - -virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Commit, slotval1 ) - -return (C.bool)(virtualReturn) - - } - - // Delete this object from C++ memory. - func (this *QTest__QTouchEventWidgetSequence) Delete() { - C.QTest__QTouchEventWidgetSequence_Delete(this.h, C.bool(this.isSubclass)) - } - - // GoGC adds a Go Finalizer to this pointer, so that it will be deleted - // from C++ memory once it is unreachable from Go memory. - func (this *QTest__QTouchEventWidgetSequence) GoGC() { - runtime.SetFinalizer(this, func(this *QTest__QTouchEventWidgetSequence) { - this.Delete() - runtime.KeepAlive(this.h) - }) - } - \ No newline at end of file +type QTest__QTouchEventWidgetSequence struct { + h *C.QTest__QTouchEventWidgetSequence + isSubclass bool + *QTest__QTouchEventSequence +} + +func (this *QTest__QTouchEventWidgetSequence) cPointer() *C.QTest__QTouchEventWidgetSequence { + if this == nil { + return nil + } + return this.h +} + +func (this *QTest__QTouchEventWidgetSequence) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQTest__QTouchEventWidgetSequence constructs the type using only CGO pointers. +func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence, h_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence) *QTest__QTouchEventWidgetSequence { + if h == nil { + return nil + } + return &QTest__QTouchEventWidgetSequence{h: h, + QTest__QTouchEventSequence: newQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} +} + +// UnsafeNewQTest__QTouchEventWidgetSequence constructs the type using only unsafe pointers. +func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer, h_QTest__QTouchEventSequence unsafe.Pointer) *QTest__QTouchEventWidgetSequence { + if h == nil { + return nil + } + + return &QTest__QTouchEventWidgetSequence{h: (*C.QTest__QTouchEventWidgetSequence)(h), + QTest__QTouchEventSequence: UnsafeNewQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} +} + +// NewQTest__QTouchEventWidgetSequence constructs a new QTest::QTouchEventWidgetSequence object. +func NewQTest__QTouchEventWidgetSequence(param1 *QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { + var outptr_QTest__QTouchEventWidgetSequence *C.QTest__QTouchEventWidgetSequence = nil + var outptr_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence = nil + + C.QTest__QTouchEventWidgetSequence_new(param1.cPointer(), &outptr_QTest__QTouchEventWidgetSequence, &outptr_QTest__QTouchEventSequence) + ret := newQTest__QTouchEventWidgetSequence(outptr_QTest__QTouchEventWidgetSequence, outptr_QTest__QTouchEventSequence) + ret.isSubclass = true + return ret +} + +func (this *QTest__QTouchEventWidgetSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer())), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) Move(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer())), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) Release(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer())), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) Stationary(touchId int) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId))), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) Commit(processEvents bool) bool { + return (bool)(C.QTest__QTouchEventWidgetSequence_Commit(this.h, (C.bool)(processEvents))) +} + +func (this *QTest__QTouchEventWidgetSequence) Press3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) Move3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) Release3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())), nil) +} + +func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Stationary(touchId int) *QTest__QTouchEventWidgetSequence { + + return UnsafeNewQTest__QTouchEventWidgetSequence(unsafe.Pointer(C.QTest__QTouchEventWidgetSequence_virtualbase_Stationary(unsafe.Pointer(this.h), (C.int)(touchId))), nil) +} +func (this *QTest__QTouchEventWidgetSequence) OnStationary(slot func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) { + C.QTest__QTouchEventWidgetSequence_override_virtual_Stationary(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary +func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, touchId C.int) *C.QTest__QTouchEventWidgetSequence { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(touchId) + + virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Stationary, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Commit(processEvents bool) bool { + + return (bool)(C.QTest__QTouchEventWidgetSequence_virtualbase_Commit(unsafe.Pointer(this.h), (C.bool)(processEvents))) + +} +func (this *QTest__QTouchEventWidgetSequence) OnCommit(slot func(super func(processEvents bool) bool, processEvents bool) bool) { + C.QTest__QTouchEventWidgetSequence_override_virtual_Commit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit +func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, processEvents C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(processEvents bool) bool, processEvents bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(processEvents) + + virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Commit, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QTest__QTouchEventWidgetSequence) Delete() { + C.QTest__QTouchEventWidgetSequence_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QTest__QTouchEventWidgetSequence) GoGC() { + runtime.SetFinalizer(this, func(this *QTest__QTouchEventWidgetSequence) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/gen_qtoolbar.cpp b/qt6/gen_qtoolbar.cpp index 3ed98d86..8d3a2a76 100644 --- a/qt6/gen_qtoolbar.cpp +++ b/qt6/gen_qtoolbar.cpp @@ -870,7 +870,7 @@ class MiqtVirtualQToolBar : public virtual QToolBar { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QToolBar_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qutf8stringview.cpp b/qt6/gen_qutf8stringview.cpp deleted file mode 100644 index 6ccee24e..00000000 --- a/qt6/gen_qutf8stringview.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__hide_char8_t -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__wrap_char -#include -#include "gen_qutf8stringview.h" -#include "_cgo_export.h" - -void QtPrivate__hide_char8_t_Delete(QtPrivate__hide_char8_t* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - -void QtPrivate__wrap_char_Delete(QtPrivate__wrap_char* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - diff --git a/qt6/gen_qutf8stringview.go b/qt6/gen_qutf8stringview.go deleted file mode 100644 index 5a9c2c21..00000000 --- a/qt6/gen_qutf8stringview.go +++ /dev/null @@ -1,114 +0,0 @@ -package qt6 - -/* - -#include "gen_qutf8stringview.h" -#include - -*/ -import "C" - -import ( - "runtime" - "unsafe" -) - -type QtPrivate__hide_char8_t struct { - h *C.QtPrivate__hide_char8_t - isSubclass bool -} - -func (this *QtPrivate__hide_char8_t) cPointer() *C.QtPrivate__hide_char8_t { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__hide_char8_t) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__hide_char8_t constructs the type using only CGO pointers. -func newQtPrivate__hide_char8_t(h *C.QtPrivate__hide_char8_t) *QtPrivate__hide_char8_t { - if h == nil { - return nil - } - return &QtPrivate__hide_char8_t{h: h} -} - -// UnsafeNewQtPrivate__hide_char8_t constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__hide_char8_t(h unsafe.Pointer) *QtPrivate__hide_char8_t { - if h == nil { - return nil - } - - return &QtPrivate__hide_char8_t{h: (*C.QtPrivate__hide_char8_t)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__hide_char8_t) Delete() { - C.QtPrivate__hide_char8_t_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__hide_char8_t) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__hide_char8_t) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - -type QtPrivate__wrap_char struct { - h *C.QtPrivate__wrap_char - isSubclass bool -} - -func (this *QtPrivate__wrap_char) cPointer() *C.QtPrivate__wrap_char { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__wrap_char) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__wrap_char constructs the type using only CGO pointers. -func newQtPrivate__wrap_char(h *C.QtPrivate__wrap_char) *QtPrivate__wrap_char { - if h == nil { - return nil - } - return &QtPrivate__wrap_char{h: h} -} - -// UnsafeNewQtPrivate__wrap_char constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__wrap_char(h unsafe.Pointer) *QtPrivate__wrap_char { - if h == nil { - return nil - } - - return &QtPrivate__wrap_char{h: (*C.QtPrivate__wrap_char)(h)} -} - -// Delete this object from C++ memory. -func (this *QtPrivate__wrap_char) Delete() { - C.QtPrivate__wrap_char_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__wrap_char) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__wrap_char) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qutf8stringview.h b/qt6/gen_qutf8stringview.h deleted file mode 100644 index 59b8f30f..00000000 --- a/qt6/gen_qutf8stringview.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once -#ifndef MIQT_QT6_GEN_QUTF8STRINGVIEW_H -#define MIQT_QT6_GEN_QUTF8STRINGVIEW_H - -#include -#include -#include - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include "../libmiqt/libmiqt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__hide_char8_t) -typedef QtPrivate::hide_char8_t QtPrivate__hide_char8_t; -#else -class QtPrivate__hide_char8_t; -#endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__wrap_char) -typedef QtPrivate::wrap_char QtPrivate__wrap_char; -#else -class QtPrivate__wrap_char; -#endif -#else -typedef struct QtPrivate__hide_char8_t QtPrivate__hide_char8_t; -typedef struct QtPrivate__wrap_char QtPrivate__wrap_char; -#endif - -void QtPrivate__hide_char8_t_Delete(QtPrivate__hide_char8_t* self, bool isSubclass); - -void QtPrivate__wrap_char_Delete(QtPrivate__wrap_char* self, bool isSubclass); - -#ifdef __cplusplus -} /* extern C */ -#endif - -#endif diff --git a/qt6/gen_qvariant.cpp b/qt6/gen_qvariant.cpp index e438aad9..4b9f02fb 100644 --- a/qt6/gen_qvariant.cpp +++ b/qt6/gen_qvariant.cpp @@ -33,7 +33,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QVariantTypeCoercer #include #include "gen_qvariant.h" #include "_cgo_export.h" @@ -640,22 +639,6 @@ void QVariant_Delete(QVariant* self, bool isSubclass) { } } -const void* QtPrivate__QVariantTypeCoercer_Convert(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal) { - return (const void*) self->convert(*value, *typeVal); -} - -const void* QtPrivate__QVariantTypeCoercer_Coerce(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal) { - return (const void*) self->coerce(*value, *typeVal); -} - -void QtPrivate__QVariantTypeCoercer_Delete(QtPrivate__QVariantTypeCoercer* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QVariantConstPointer_new(QVariant* variant, QVariantConstPointer** outptr_QVariantConstPointer) { QVariantConstPointer* ret = new QVariantConstPointer(*variant); *outptr_QVariantConstPointer = ret; diff --git a/qt6/gen_qvariant.go b/qt6/gen_qvariant.go index 27460a4b..0bb49218 100644 --- a/qt6/gen_qvariant.go +++ b/qt6/gen_qvariant.go @@ -1014,64 +1014,6 @@ func (this *QVariant) GoGC() { }) } -type QtPrivate__QVariantTypeCoercer struct { - h *C.QtPrivate__QVariantTypeCoercer - isSubclass bool -} - -func (this *QtPrivate__QVariantTypeCoercer) cPointer() *C.QtPrivate__QVariantTypeCoercer { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QVariantTypeCoercer) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QVariantTypeCoercer constructs the type using only CGO pointers. -func newQtPrivate__QVariantTypeCoercer(h *C.QtPrivate__QVariantTypeCoercer) *QtPrivate__QVariantTypeCoercer { - if h == nil { - return nil - } - return &QtPrivate__QVariantTypeCoercer{h: h} -} - -// UnsafeNewQtPrivate__QVariantTypeCoercer constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QVariantTypeCoercer(h unsafe.Pointer) *QtPrivate__QVariantTypeCoercer { - if h == nil { - return nil - } - - return &QtPrivate__QVariantTypeCoercer{h: (*C.QtPrivate__QVariantTypeCoercer)(h)} -} - -func (this *QtPrivate__QVariantTypeCoercer) Convert(value *QVariant, typeVal *QMetaType) unsafe.Pointer { - return (unsafe.Pointer)(C.QtPrivate__QVariantTypeCoercer_Convert(this.h, value.cPointer(), typeVal.cPointer())) -} - -func (this *QtPrivate__QVariantTypeCoercer) Coerce(value *QVariant, typeVal *QMetaType) unsafe.Pointer { - return (unsafe.Pointer)(C.QtPrivate__QVariantTypeCoercer_Coerce(this.h, value.cPointer(), typeVal.cPointer())) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QVariantTypeCoercer) Delete() { - C.QtPrivate__QVariantTypeCoercer_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QVariantTypeCoercer) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QVariantTypeCoercer) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QVariantConstPointer struct { h *C.QVariantConstPointer isSubclass bool diff --git a/qt6/gen_qvariant.h b/qt6/gen_qvariant.h index 02522c5f..dd708b6a 100644 --- a/qt6/gen_qvariant.h +++ b/qt6/gen_qvariant.h @@ -45,11 +45,6 @@ class QUrl; class QUuid; class QVariant; class QVariantConstPointer; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QVariantTypeCoercer) -typedef QtPrivate::QVariantTypeCoercer QtPrivate__QVariantTypeCoercer; -#else -class QtPrivate__QVariantTypeCoercer; -#endif #else typedef struct QBitArray QBitArray; typedef struct QByteArray QByteArray; @@ -81,7 +76,6 @@ typedef struct QUrl QUrl; typedef struct QUuid QUuid; typedef struct QVariant QVariant; typedef struct QVariantConstPointer QVariantConstPointer; -typedef struct QtPrivate__QVariantTypeCoercer QtPrivate__QVariantTypeCoercer; #endif void QVariant_new(QVariant** outptr_QVariant); @@ -198,10 +192,6 @@ float QVariant_ToFloat1(const QVariant* self, bool* ok); double QVariant_ToReal1(const QVariant* self, bool* ok); void QVariant_Delete(QVariant* self, bool isSubclass); -const void* QtPrivate__QVariantTypeCoercer_Convert(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal); -const void* QtPrivate__QVariantTypeCoercer_Coerce(QtPrivate__QVariantTypeCoercer* self, QVariant* value, QMetaType* typeVal); -void QtPrivate__QVariantTypeCoercer_Delete(QtPrivate__QVariantTypeCoercer* self, bool isSubclass); - void QVariantConstPointer_new(QVariant* variant, QVariantConstPointer** outptr_QVariantConstPointer); void QVariantConstPointer_new2(QVariantConstPointer* param1, QVariantConstPointer** outptr_QVariantConstPointer); QVariant* QVariantConstPointer_OperatorMultiply(const QVariantConstPointer* self); diff --git a/qt6/gen_qwidget.cpp b/qt6/gen_qwidget.cpp index 6ff73e25..4995d1b2 100644 --- a/qt6/gen_qwidget.cpp +++ b/qt6/gen_qwidget.cpp @@ -862,7 +862,7 @@ class MiqtVirtualQWidget : public virtual QWidget { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qwindow.cpp b/qt6/gen_qwindow.cpp index 8f08d6de..63754737 100644 --- a/qt6/gen_qwindow.cpp +++ b/qt6/gen_qwindow.cpp @@ -630,7 +630,7 @@ class MiqtVirtualQWindow : public virtual QWindow { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QWindow_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qwizard.cpp b/qt6/gen_qwizard.cpp index 2dadb285..342ed9e2 100644 --- a/qt6/gen_qwizard.cpp +++ b/qt6/gen_qwizard.cpp @@ -1907,7 +1907,7 @@ class MiqtVirtualQWizardPage : public virtual QWizardPage { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QWizardPage_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/gen_qxmlstream.cpp b/qt6/gen_qxmlstream.cpp index 4cc0f9af..d28afe68 100644 --- a/qt6/gen_qxmlstream.cpp +++ b/qt6/gen_qxmlstream.cpp @@ -11,40 +11,10 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QXmlString #include #include "gen_qxmlstream.h" #include "_cgo_export.h" -void QtPrivate__QXmlString_new(struct miqt_string s, QtPrivate__QXmlString** outptr_QtPrivate__QXmlString) { - QString s_QString = QString::fromUtf8(s.data, s.len); - QtPrivate::QXmlString* ret = new QtPrivate::QXmlString(s_QString); - *outptr_QtPrivate__QXmlString = ret; -} - -void QtPrivate__QXmlString_new2(QtPrivate__QXmlString** outptr_QtPrivate__QXmlString) { - QtPrivate::QXmlString* ret = new QtPrivate::QXmlString(); - *outptr_QtPrivate__QXmlString = ret; -} - -void QtPrivate__QXmlString_OperatorAssign(QtPrivate__QXmlString* self, struct miqt_string s) { - QString s_QString = QString::fromUtf8(s.data, s.len); - self->operator=(s_QString); -} - -ptrdiff_t QtPrivate__QXmlString_Size(const QtPrivate__QXmlString* self) { - qsizetype _ret = self->size(); - return static_cast(_ret); -} - -void QtPrivate__QXmlString_Delete(QtPrivate__QXmlString* self, bool isSubclass) { - if (isSubclass) { - delete dynamic_cast( self ); - } else { - delete self; - } -} - void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute) { QXmlStreamAttribute* ret = new QXmlStreamAttribute(); *outptr_QXmlStreamAttribute = ret; diff --git a/qt6/gen_qxmlstream.go b/qt6/gen_qxmlstream.go index c5f6f0ef..b8511eb9 100644 --- a/qt6/gen_qxmlstream.go +++ b/qt6/gen_qxmlstream.go @@ -47,92 +47,6 @@ const ( QXmlStreamReader__PrematureEndOfDocumentError QXmlStreamReader__Error = 4 ) -type QtPrivate__QXmlString struct { - h *C.QtPrivate__QXmlString - isSubclass bool -} - -func (this *QtPrivate__QXmlString) cPointer() *C.QtPrivate__QXmlString { - if this == nil { - return nil - } - return this.h -} - -func (this *QtPrivate__QXmlString) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -// newQtPrivate__QXmlString constructs the type using only CGO pointers. -func newQtPrivate__QXmlString(h *C.QtPrivate__QXmlString) *QtPrivate__QXmlString { - if h == nil { - return nil - } - return &QtPrivate__QXmlString{h: h} -} - -// UnsafeNewQtPrivate__QXmlString constructs the type using only unsafe pointers. -func UnsafeNewQtPrivate__QXmlString(h unsafe.Pointer) *QtPrivate__QXmlString { - if h == nil { - return nil - } - - return &QtPrivate__QXmlString{h: (*C.QtPrivate__QXmlString)(h)} -} - -// NewQtPrivate__QXmlString constructs a new QtPrivate::QXmlString object. -func NewQtPrivate__QXmlString(s string) *QtPrivate__QXmlString { - s_ms := C.struct_miqt_string{} - s_ms.data = C.CString(s) - s_ms.len = C.size_t(len(s)) - defer C.free(unsafe.Pointer(s_ms.data)) - var outptr_QtPrivate__QXmlString *C.QtPrivate__QXmlString = nil - - C.QtPrivate__QXmlString_new(s_ms, &outptr_QtPrivate__QXmlString) - ret := newQtPrivate__QXmlString(outptr_QtPrivate__QXmlString) - ret.isSubclass = true - return ret -} - -// NewQtPrivate__QXmlString2 constructs a new QtPrivate::QXmlString object. -func NewQtPrivate__QXmlString2() *QtPrivate__QXmlString { - var outptr_QtPrivate__QXmlString *C.QtPrivate__QXmlString = nil - - C.QtPrivate__QXmlString_new2(&outptr_QtPrivate__QXmlString) - ret := newQtPrivate__QXmlString(outptr_QtPrivate__QXmlString) - ret.isSubclass = true - return ret -} - -func (this *QtPrivate__QXmlString) OperatorAssign(s string) { - s_ms := C.struct_miqt_string{} - s_ms.data = C.CString(s) - s_ms.len = C.size_t(len(s)) - defer C.free(unsafe.Pointer(s_ms.data)) - C.QtPrivate__QXmlString_OperatorAssign(this.h, s_ms) -} - -func (this *QtPrivate__QXmlString) Size() int64 { - return (int64)(C.QtPrivate__QXmlString_Size(this.h)) -} - -// Delete this object from C++ memory. -func (this *QtPrivate__QXmlString) Delete() { - C.QtPrivate__QXmlString_Delete(this.h, C.bool(this.isSubclass)) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QtPrivate__QXmlString) GoGC() { - runtime.SetFinalizer(this, func(this *QtPrivate__QXmlString) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} - type QXmlStreamAttribute struct { h *C.QXmlStreamAttribute isSubclass bool diff --git a/qt6/gen_qxmlstream.h b/qt6/gen_qxmlstream.h index 4b155af7..647231e8 100644 --- a/qt6/gen_qxmlstream.h +++ b/qt6/gen_qxmlstream.h @@ -24,11 +24,6 @@ class QXmlStreamNamespaceDeclaration; class QXmlStreamNotationDeclaration; class QXmlStreamReader; class QXmlStreamWriter; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QXmlString) -typedef QtPrivate::QXmlString QtPrivate__QXmlString; -#else -class QtPrivate__QXmlString; -#endif #else typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; @@ -39,15 +34,8 @@ typedef struct QXmlStreamNamespaceDeclaration QXmlStreamNamespaceDeclaration; typedef struct QXmlStreamNotationDeclaration QXmlStreamNotationDeclaration; typedef struct QXmlStreamReader QXmlStreamReader; typedef struct QXmlStreamWriter QXmlStreamWriter; -typedef struct QtPrivate__QXmlString QtPrivate__QXmlString; #endif -void QtPrivate__QXmlString_new(struct miqt_string s, QtPrivate__QXmlString** outptr_QtPrivate__QXmlString); -void QtPrivate__QXmlString_new2(QtPrivate__QXmlString** outptr_QtPrivate__QXmlString); -void QtPrivate__QXmlString_OperatorAssign(QtPrivate__QXmlString* self, struct miqt_string s); -ptrdiff_t QtPrivate__QXmlString_Size(const QtPrivate__QXmlString* self); -void QtPrivate__QXmlString_Delete(QtPrivate__QXmlString* self, bool isSubclass); - void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute); void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); diff --git a/qt6/multimedia/gen_qvideowidget.cpp b/qt6/multimedia/gen_qvideowidget.cpp index 9bc5b77b..f43b3990 100644 --- a/qt6/multimedia/gen_qvideowidget.cpp +++ b/qt6/multimedia/gen_qvideowidget.cpp @@ -818,7 +818,7 @@ class MiqtVirtualQVideoWidget : public virtual QVideoWidget { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QVideoWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); diff --git a/qt6/network/gen_qabstractsocket.cpp b/qt6/network/gen_qabstractsocket.cpp index fbb39ccf..946c5812 100644 --- a/qt6/network/gen_qabstractsocket.cpp +++ b/qt6/network/gen_qabstractsocket.cpp @@ -224,7 +224,7 @@ class MiqtVirtualQAbstractSocket : public virtual QAbstractSocket { intptr_t virtualbase_SocketDescriptor() const { qintptr _ret = QAbstractSocket::socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } @@ -238,7 +238,7 @@ class MiqtVirtualQAbstractSocket : public virtual QAbstractSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODeviceBase::OpenMode openMode_ret = openMode; @@ -829,7 +829,7 @@ void QAbstractSocket_Abort(QAbstractSocket* self) { intptr_t QAbstractSocket_SocketDescriptor(const QAbstractSocket* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } bool QAbstractSocket_SetSocketDescriptor(QAbstractSocket* self, intptr_t socketDescriptor, int state, int openMode) { diff --git a/qt6/network/gen_qlocalserver.cpp b/qt6/network/gen_qlocalserver.cpp index d83917b3..00d75586 100644 --- a/qt6/network/gen_qlocalserver.cpp +++ b/qt6/network/gen_qlocalserver.cpp @@ -403,7 +403,7 @@ int QLocalServer_SocketOptions(const QLocalServer* self) { intptr_t QLocalServer_SocketDescriptor(const QLocalServer* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } struct miqt_string QLocalServer_Tr2(const char* s, const char* c) { diff --git a/qt6/network/gen_qlocalsocket.cpp b/qt6/network/gen_qlocalsocket.cpp index b6d7051e..53aa5cd0 100644 --- a/qt6/network/gen_qlocalsocket.cpp +++ b/qt6/network/gen_qlocalsocket.cpp @@ -553,7 +553,7 @@ bool QLocalSocket_SetSocketDescriptor(QLocalSocket* self, intptr_t socketDescrip intptr_t QLocalSocket_SocketDescriptor(const QLocalSocket* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } void QLocalSocket_SetSocketOptions(QLocalSocket* self, int option) { diff --git a/qt6/network/gen_qsctpserver.cpp b/qt6/network/gen_qsctpserver.cpp index ee22bd5d..605f4ed4 100644 --- a/qt6/network/gen_qsctpserver.cpp +++ b/qt6/network/gen_qsctpserver.cpp @@ -30,7 +30,7 @@ class MiqtVirtualQSctpServer : public virtual QSctpServer { } qintptr handle_ret = handle; - intptr_t sigval1 = static_cast(handle_ret); + intptr_t sigval1 = (intptr_t)(handle_ret); miqt_exec_callback_QSctpServer_IncomingConnection(this, handle__IncomingConnection, sigval1); diff --git a/qt6/network/gen_qsslserver.cpp b/qt6/network/gen_qsslserver.cpp index a1afbf7a..313083dd 100644 --- a/qt6/network/gen_qsslserver.cpp +++ b/qt6/network/gen_qsslserver.cpp @@ -34,7 +34,7 @@ class MiqtVirtualQSslServer : public virtual QSslServer { } qintptr socket_ret = socket; - intptr_t sigval1 = static_cast(socket_ret); + intptr_t sigval1 = (intptr_t)(socket_ret); miqt_exec_callback_QSslServer_IncomingConnection(this, handle__IncomingConnection, sigval1); diff --git a/qt6/network/gen_qsslsocket.cpp b/qt6/network/gen_qsslsocket.cpp index 6832ff46..69aefa6a 100644 --- a/qt6/network/gen_qsslsocket.cpp +++ b/qt6/network/gen_qsslsocket.cpp @@ -63,7 +63,7 @@ class MiqtVirtualQSslSocket : public virtual QSslSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODeviceBase::OpenMode openMode_ret = openMode; diff --git a/qt6/network/gen_qtcpserver.cpp b/qt6/network/gen_qtcpserver.cpp index 187251a7..86bf8dfb 100644 --- a/qt6/network/gen_qtcpserver.cpp +++ b/qt6/network/gen_qtcpserver.cpp @@ -78,7 +78,7 @@ class MiqtVirtualQTcpServer : public virtual QTcpServer { } qintptr handle_ret = handle; - intptr_t sigval1 = static_cast(handle_ret); + intptr_t sigval1 = (intptr_t)(handle_ret); miqt_exec_callback_QTcpServer_IncomingConnection(this, handle__IncomingConnection, sigval1); @@ -335,7 +335,7 @@ QHostAddress* QTcpServer_ServerAddress(const QTcpServer* self) { intptr_t QTcpServer_SocketDescriptor(const QTcpServer* self) { qintptr _ret = self->socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } bool QTcpServer_SetSocketDescriptor(QTcpServer* self, intptr_t socketDescriptor) { diff --git a/qt6/network/gen_qtcpsocket.cpp b/qt6/network/gen_qtcpsocket.cpp index ff04f4db..c5af076a 100644 --- a/qt6/network/gen_qtcpsocket.cpp +++ b/qt6/network/gen_qtcpsocket.cpp @@ -224,7 +224,7 @@ class MiqtVirtualQTcpSocket : public virtual QTcpSocket { intptr_t virtualbase_SocketDescriptor() const { qintptr _ret = QTcpSocket::socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } @@ -238,7 +238,7 @@ class MiqtVirtualQTcpSocket : public virtual QTcpSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODeviceBase::OpenMode openMode_ret = openMode; diff --git a/qt6/network/gen_qudpsocket.cpp b/qt6/network/gen_qudpsocket.cpp index 1f644f08..93193bfa 100644 --- a/qt6/network/gen_qudpsocket.cpp +++ b/qt6/network/gen_qudpsocket.cpp @@ -227,7 +227,7 @@ class MiqtVirtualQUdpSocket : public virtual QUdpSocket { intptr_t virtualbase_SocketDescriptor() const { qintptr _ret = QUdpSocket::socketDescriptor(); - return static_cast(_ret); + return (intptr_t)(_ret); } @@ -241,7 +241,7 @@ class MiqtVirtualQUdpSocket : public virtual QUdpSocket { } qintptr socketDescriptor_ret = socketDescriptor; - intptr_t sigval1 = static_cast(socketDescriptor_ret); + intptr_t sigval1 = (intptr_t)(socketDescriptor_ret); QAbstractSocket::SocketState state_ret = state; int sigval2 = static_cast(state_ret); QIODeviceBase::OpenMode openMode_ret = openMode; diff --git a/qt6/printsupport/gen_qprintpreviewwidget.cpp b/qt6/printsupport/gen_qprintpreviewwidget.cpp index fb648fca..ecd681a9 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.cpp +++ b/qt6/printsupport/gen_qprintpreviewwidget.cpp @@ -822,7 +822,7 @@ class MiqtVirtualQPrintPreviewWidget : public virtual QPrintPreviewWidget { struct miqt_string sigval1 = eventType_ms; void* sigval2 = message; qintptr* result_ret = result; - intptr_t* sigval3 = static_cast(result_ret); + intptr_t* sigval3 = (intptr_t*)(result_ret); bool callback_return_value = miqt_exec_callback_QPrintPreviewWidget_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); From bbc75b8ef1a416ec64f39d8b45d5ac734d83ec04 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 20:45:45 +1300 Subject: [PATCH 20/22] linuxonly: fix ifdef quirks for building on windows --- cmd/genbindings/emitcabi.go | 8 +++++++- qt/gen_qsocketnotifier.cpp | 3 ++- qt6/gen_qsocketnotifier.cpp | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 79b334eb..36fd366e 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -979,7 +979,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret.WriteString( "#ifndef Q_OS_LINUX\n" + "\treturn;\n" + - "#endif\n", + "#else\n", ) } @@ -992,6 +992,12 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) { ret.WriteString("\t*outptr_" + cabiClassName(baseClass) + " = static_cast<" + baseClass + "*>(ret);\n") } + if ctor.LinuxOnly { + ret.WriteString( + "#endif\n", + ) + } + ret.WriteString( "}\n" + "\n", diff --git a/qt/gen_qsocketnotifier.cpp b/qt/gen_qsocketnotifier.cpp index 03a9e253..7d97a3f3 100644 --- a/qt/gen_qsocketnotifier.cpp +++ b/qt/gen_qsocketnotifier.cpp @@ -375,9 +375,10 @@ void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outpt void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) { #ifndef Q_OS_LINUX return; -#endif +#else QSocketDescriptor* ret = new QSocketDescriptor(static_cast(descriptor)); *outptr_QSocketDescriptor = ret; +#endif } bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) { diff --git a/qt6/gen_qsocketnotifier.cpp b/qt6/gen_qsocketnotifier.cpp index cdb8260d..dd8115fe 100644 --- a/qt6/gen_qsocketnotifier.cpp +++ b/qt6/gen_qsocketnotifier.cpp @@ -364,9 +364,10 @@ void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outpt void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) { #ifndef Q_OS_LINUX return; -#endif +#else QSocketDescriptor* ret = new QSocketDescriptor(static_cast(descriptor)); *outptr_QSocketDescriptor = ret; +#endif } bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) { From 1b577f86bd1690724ed44d3c2e2816ed0e8ce61e Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 20:45:51 +1300 Subject: [PATCH 21/22] doc/README: add note regarding virtual subclassing --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8f0a534e..c26a142a 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,8 @@ Where Qt returns a C++ object by value (e.g. `QSize`), the binding may have move The `connect(sourceObject, sourceSignal, targetObject, targetSlot)` is projected as `targetObject.onSourceSignal(func()...)`. +- You can also override virtual methods like PaintEvent in the same way. Your callback `func()` receives `super()` as a first argument that can be used to call the base class implementation. + Qt class inherited types are projected as a Go embedded struct. For example, to pass a `var myLabel *qt.QLabel` to a function taking only the `*qt.QWidget` base class, write `myLabel.QWidget`. - When a Qt subclass adds a method overload (e.g. `QMenu::addAction(QString)` vs `QWidget::addAction(QAction*)`), the base class version is shadowed and can only be called via `myQMenu.QWidget.AddAction(QAction*)`. From 60e096829aaf87b7997c74dff5978825ec63c52e Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 19 Nov 2024 20:46:42 +1300 Subject: [PATCH 22/22] examples/subclass: add screenshot --- examples/subclass/subclass.png | Bin 0 -> 8262 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 examples/subclass/subclass.png diff --git a/examples/subclass/subclass.png b/examples/subclass/subclass.png new file mode 100644 index 0000000000000000000000000000000000000000..361c2163fa472b188c62b758cf2dca8ac44e96b2 GIT binary patch literal 8262 zcmc(FcT`i`vwswoCLkc9AfQwM0R;geQWTU9f)wdSij>eHlo0SL0g)!XNdT!LCA3fj z*PtLJAiV^Lihz)WNR1H63qJ3?-{1G%^;_S!-XCwRoHgg{GiPS@?7csGW_F_Q8fvjH z@h|}Z02Uo>O%nj%2$*&$F`S^a)J^m3(Fmirwxu5c!20g+I+7~M$_oGp{Ls<7X&N*| z$_dUmJ=zpCKb!qdc=nxU+#Q35UydHF@uE9f`}TKa^mF6Wf$UtjjWro0B%XYcZp?rD zf%T{$wT-RgO2=d3g*=y7J@eXK*vd9v+0NL;hJyaUkepZe09D_}EMWBY@=8P7&a&yI zYl&HZ0Y5;UPt1wG)e`U+$*uqZVD3x+01Px+KqYlZtvH@ddjR0IrUxek^RR7e%Kd;B za3S?l$p`nga!xKkXXk|j0HBZ~`uPp6LOu?N;4RO|nt2KUU=pnvVK)r7l}Rh#uQ3c&S_sJz@(MeS=cK1o=s;b$tbi9ihwr@cPvxbCE4iiJ<;T+f zelQgm746-fa1A>hJv}`wKnEBRezo00u@p}1{jIIh-K3b$c&zPZhX^<-_oA}@x9{yV zTVu(!+E3Ey9JE`U9ml3>wMW`s)|+_XPTHh?WA+&B>Jm(Bp(H32-%iX}@n>3wkU&6*bN>JH#&OHV;8I^iFgYZd3*bta_( zQ*;ij9**fwEpC#&pMV5)l$V#^*$Q?5b=iWVBslG3VNe>vW7IBp_+i=mY4F-c+0lXBBlMwMF1cmsi@cdY}5DCMYh$} z1v{Db(k&+;GwaR79KxvkvSh8fMsNopuU`+k#3Urv6X#oKBmSr-#|{H+UL0|u@JCC2 z&%nf6Fb(DdyiNmt*ZHbBT8HLLoR^AAF`Bq(Nwtt&uFV9aBwWaW{ z!uc-8q)=3+7#XdZhi{?vWJjMxF2|IvNUb{B-mU2Z$}MKdXEz*=fL#{nU3)#~z!zEy$m5VB zwg#!(PLc*=``X6?kb1eEzOQ)mO0PES*WSR)TGjRLw%Lad7Y0iXS7>>y4?dT7ir5?b zO2IxeHcC$lmW_}ywhx`0kDn4H;pk6ZlXD)31J2ZNz0r4ucn+oG^Ncy~wGtfsh{K%4 zu&$G}e&dM7Ve)>ESE`p-drtjlm8x<|O=YzkR=HNVGeDT9#I;8fOy=0?oHZaze}~(~ zBLq{0z_yi{rO5Yv!ORBfl`{slX&!wr3Y!94?@^X5;Y`*SsW;dty|m2yg!n7HV_@wv z)z12uwcUiVl4uXk4)NnR!v zK=|*KU^OQgTKXQD3cH7K_^z9K2=(9VxaO&&By%!_6AewUF`mb;ZoS>|{8RzO*b!&Y zx{7|w#{3|%)s<0wK1h`7s3^9M{K9kgyibYvbQ>0I(=c@7+Sensj&D!iGeP!%^^%Z6 z-O6Tgsc63auNhn$vVkczzME5pVck`&%~h7|K7K_pSJ*)V_CFGvHsf1PL0HZ}T8VXn zmTuQ9sd&7jE{@yJ8<7~9S`azY(c)^#NlqK$?#Y=a#@M1U(i3)$TZW;X=LH74z}9QO zo!k9>Ww_Y`IxH@S>q7tsVnY^`hGc-<8%EvirBb5uZCt84O5P zL56Qn*;S`eha@@mt+Ov(b03^K$-jn_oO79eZstC--d7hh7CA=WpzuN2X5!)Cm!jg^gln}G$kJFO{VX*1od3a7 zL*eb?a6{FbAbXSc{NR9Hg6D3TJR#>aWku~-kf_Uy+^IxJ2O0Y5 zq8P~=)P+-+Vzlw|P@@D7Dhs!0vR4(}HLex~(#4bF%=0O)j_x6$A)esnJpksl4e34_ zqk26gZ~IkvfysQLk4(FBi0$aOf6vOpmGEzgCKzeyDMwatFb+Ir7pg15?%@p^G_f7K z337)?*IRnOLAgphtaZ`DXG&d}YvseCF4GPL2ni9eliORc`KC9c2m&cm6KQcxE*rJb zby@zHk$PuVSPykL=f|tjz7F^vMz88RdwLny)VPdIU7-!>B!8ARbRd(m z|5q3BLoc|sPnl%~%=d7(nGsK6I8}67%o%Z1IJ|h4?Ub-EQDflbHG8}8YVk`GD~6ZC z8bj-w$Zw;t$qop=D7Q={TWmyhvW*dkfxSuH*!kI=NXuM%mn{L+kRD!qIz)nUlF@mh zg|ZSDHO{NJn9h!3ZIHLU;sBekXDo`Skn#1Noot%9RsY=^LvySnF?z|3Y=3N;(vQB5NGtQ^n(Dm<}kbp*BwlekoO|RN_%|#;DOIW z&Us{i-?Bi}C5sH1N;L&hhF9*trAC`pA@vpv6vA7p+a?dTIGtyTr50x2YV>V1F~7_s z*G=BE3MpQiT;!?sp43&`Tis%@EHi`|-hB+p_0s z)W{FK^7!716o++4PAi|l_XgpL%M4MX)WQd5IV1X8?6=}hqbRl4cNnYe7&ke@M|8Rd z7h-N!VAt|t*dNseePftpF)lS5RF4g=s$FNGPr>LUuOn-PfETML!UYAE@xLWwq$51l zIZoe*Vz9P!yz+*D$=ZIJo_Mi^m9Qx?8jaM1SHv2M$)8#yuv!CNZINt#Vm-8yc7JIlBnl ziJtg99!McYb{6%zXZC9M3dCa4)TE(p_O%SyxV5)0IOLh7+7)c*sy{+WVdUI-4AuCoj%EJVe1TnM6xJRqx&nsM?QjUo%3keG4#B zRS~^b0Z~^@EU}Y)TXQ!UcTUo%^MgzdFAoPsDzv9myD#}>|r0+#4idPD%z%qy_}&qUY@P=_H&51BXxX-y68z-{UU38_8E4Ajihb`Y z-Ev}edZ#@2x*1y6eB%N!O9l*eX#wF_Ype4<&@l9C2<#ibAO|Ys`DIIVKNB=LxxRCI zm{DciolUrj?Ba1J>R|b|{H#*ex1$v@CMrBhf!aB^iYVOd^6^(ZD7SSmZ$wTKChhW; zz>SBxTSS&>KMH>>Iw)Oy+VUYJh3LCkpCdrNDk4CZlF#|*&dv(BK$JN3S6&OE16-h` z;t_GkBY;y1m=l0f56nJQt&I*)np{|pR0H~8W=vtE9TotfK0bg~A?pc-Z!93!A{t4! zEqD%-RvzxbgPREC1wowLL-l`Z6QVh4jtQu!NauxiZ=*b#+JbGop+AFZbyxfW;OA*CdXTI6lpG_gok|GZ_ zy~6#5M(qzap9-9PSgfD3fN0;^;a$kQI*_%mi026*A<)zw23$C4ViBPz#19qR2(O!u zKfB!+{B@8$e`%y&aaKZVXVPymXLqL4++#-BYpQOtUQ3HFD?xUr(;&OWXAU1!8;cw@ zl&ZDt9V;G?AJ2l(vwpYKp!Gl^zGg{}_nL%=TCSE>?6m>}4`0&j!n5vn63I5<9R||t zX%lP$N?!^skm!%3v(Ej9ImeQr+kzO+={mTiMyW@YLC}mpIiQF-6v0gWFj!EmMOJm* z?lD_AxZk_CH4qK~reLj6%>_?qVU^L1D;oS^g{F}tX6pg@cG||1mOk3_CR4$om{)Zk z{o3?wK|_PmK8wI7%tVk$Vk5^o>_r!6u$^!I~!!=^3w6m&d#7imj-5R zZCSAuqav{VF8ShWr&T4Q$_Cx(-;eeCvL#1$WQ0=V1&1qPA+LqFMyJHnM_53;nZ70G zpCj{4WWkIgR*`!fa$?XsCwX@Bg11Lk^L^}LdvQvT-Fp_}=1uR?$4YWxXR_{~CGI4g zvvxydh3!9qv%_KG8OWza%!y-HJ5HbBO6^7(h3>sO3bpf|C3R!Cr7gCJ?Pwjo>f`iw!tw4Lt6 zTYX;?{LHk&uHL!A z-K%wexv7UsIe4nbI*@Waw$7HHNBMFY@)0(Z*K7jEgvyR3N{6DBUm)dVWrr#RvM+*5 zYwQF`%KpAX_u?$j(ktkLBVzLQ&&zZISF#o(C9O@PZ>i{3wr%Z{V$3ZX7o>0*yB^2$ zt!mzFCy?9x<^qNcdpG3vPQ+!UaG>12lxYyc1H_2I^JeTu%4OF1$3hlu1G{W1;{hp~ zD>Lo*(Q1+LPliH4{#U?11a1NA^N^$2qKZ{fxD)%VefEL%I=vx_Gu@uSS$DLKhxXH; zF|shfyw=^$NQ}SxZaqN_wil4O;x7R#WzJ)znzirmvFzE-C|Hf7oFvVgL#jjcU8Wwm zs*5qo8w#d*N2#vSBG5N1dtOc0YaWABD`zYHl319mdpVWgmX3#qe9@eq*IkxD?^wAg zR}63(soJ7U9n(d`-T5r4Y^`-Crh;DwMnjmU5+kap`*ifvgHLoXhV0R4@Gr)ho8+qi=ig~znW=i{ny=pZy&UY^yfzM zXWjH~`^*1N+b?r|>istbhlc%2IrfY1s#7|hsbnY{yF!Y_LI5~R-ZWb6HGyzf6&98UjQGaSxjSN{DVfYF!0iv{&@U@{+qE=ZH50U+Wf(y?#5v4nIiOa{l{MhQ+Ktj zv=7fL#@b+1`w0-YAT4x!7a>I}SNmR~g|NSXiH2OX`fUrSBN9K*+e4^ndv94NmjZfAiTIgK!7g#U&+y$ODSzp(l(&?&@6rY5Y7lYMw)q zAj*N_i$DAT%5Ta+Xfk%1)B7noUJ8tR=2!QfNF>I1l!e2K(0pTuwqaD4Zi-ZMppvYb zO!`xRKb^H74l1FY7=7FikDS-tU3|9Md%%|{;Xf}Ylhh~j*O(k%3oBOj!qO@

%HX9;)F7%Yc zETfzzlza=Yl`<5#6is^@axO(fLK>ViGjfZB_+mrd9Z%aq-NcgoGd~|DPwvOuCNgQt z#4UObqq?kY&cqOn6Jk9Npmccz-9MgR4|#yL3_O9jBl zCNZQl*0R~VxM?~=Td7d+m2|2reGy+@jnL+q;J_hAIoOWA-=~l4?^pl#GjGzq;HeHm(yin;KW~#rAS?pNaN}oly1iWV7LH zGK7xI8iqx$gn6{;jSsg1EdsuW(aEYj6Z>HZ3B6+=oJ`NgpSo508V@zXTr}#oZR_&S zJ=KKud)Z8uPp5uWZ@Lmhe&J%FfY7aaaZj1?oYb&69z3Iax1LwtChE9Et9wEL?&Na$ z>yHBqL293Hm!CBZ0RW@%WD&eYTl-g8qy9MbP?Rt%^YAe8C|O}7x<}bHA%k+3F&!0n z6MI~u4$3`dQ;3cWeAKQt@?M0)YBDQ!Je>m|@mtmoI$=SwN#8eZe1usOk-XjtwL7R$ zmL)WbUF?u4HKwB-d@X(}Fa2843C*M&pB;E^`)w1yZ+40-cpmVWN29Ui3F|t?@H#y3 z;i}C5?9uyXxSLZ5$ZM4xiLzO|Sj%!fHuH^N-_k}u$~>3d2hSrH#dn+o?i zWeE|`gwkraIvH}_??(V`%x(Bkd^fBlB%I*ZTL<%@uCX$m2jrnX9ZDp(XQfznVe6iL zVdcI~TVEHa{n`%P9y;^M53@c8X3@Sk$?+c8-hb2mDn5jqs2x#t0ia&Sj`cG0Iqp#O z9B7EYO?v^jAjY2%055qrONyv1A+ R?T-Nfo!f?*mA4)|`7bXXyzl@3 literal 0 HcmV?d00001